diff -Nru cdrtools-2.01.01a33/ABOUT cdrtools-3.02a09/ABOUT --- cdrtools-2.01.01a33/ABOUT 2004-02-29 10:05:43.000000000 +0000 +++ cdrtools-3.02a09/ABOUT 2010-06-03 09:55:18.000000000 +0000 @@ -1,13 +1,14 @@ This package contains the following software: - cdda2wav (an digital CD audio extraction program) - By Heiko Eißfeldt + By Heiko Eißfeldt and + by Jörg Schilling joerg.schilling@fokus.fraunhofer.de - cdrecord (a CD recording program) - By Jörg Schilling + By Jörg Schilling - mkisofs (an ISO-9660 filesystem image creator) - By Jörg Schilling schilling@fokus.fhg.de and + By Jörg Schilling joerg.schilling@fokus.fraunhofer.de and by James Pearson - mkhybrid (an ISO-9660/HFS filesystem image creator) @@ -24,14 +25,14 @@ - isovfy verify an ISO-9660 image - readcd (a stripped down version of scgskeleton) - By Jörg Schilling schilling@fokus.fhg.de and may be used to read data CD's, to write to DVD-RAM and to copy Solaris boot CD's + By Jörg Schilling joerg.schilling@fokus.fraunhofer.de - scgcheck (a program to validate the correct behavior - By Jörg Schilling schilling@fokus.fhg.de and of the low level libscg code and the SCSI transport code of the underlying OS). + By Jörg Schilling joerg.schilling@fokus.fraunhofer.de - libscg (a highly portable SCSI transport library) - By Jörg Schilling schilling@fokus.fhg.de and + By Jörg Schilling joerg.schilling@fokus.fraunhofer.de diff -Nru cdrtools-2.01.01a33/AN-2.01.01a01 cdrtools-3.02a09/AN-2.01.01a01 --- cdrtools-2.01.01a33/AN-2.01.01a01 2004-10-17 11:52:52.000000000 +0000 +++ cdrtools-3.02a09/AN-2.01.01a01 1970-01-01 00:00:00.000000000 +0000 @@ -1,91 +0,0 @@ -Please have a look at the German open Source Center BerliOS at www.berlios.de -BerliOS will continue to support free hosting of cryptography projects even -when US laws change and don't allow to host cryptography projects in the USA. -Also look at sourcewell.berlios.de, the first Open Source announcement service -that itself is implemented as Open Source project. - -***************** Important news **************************** - -For the 'Slottable Source Plugin Module' SSPM Features read README.SSPM - -***************** Please Test ********************************* - -NEW features of cdrtools-2.01.01a01: - -******* -NOTE: this is _not_ a release that starts a new aplha/beta series of dirtibutions. - The only reason is to add certain new CD/DVD features that are important. - - So _please_ do not send any patches except when you like to fix extreme bugs. - I am currently mainly working on stable incremental restore featurs for star-1.5-final. - Once star-1.5-final is out, cdrtools will start a new developent cycle. -******* - -All: - -- Better lint make rules - -- Better autoconf rrules for ACLs - -- Better support for Linux on IBM-390 - -- Better support for Linux on AMD x86-64 - -- Better conforming to lint warnings. - -Libparanoia (Ported by Jörg Schilling, originated by Monty xiphmont@mit.edu): - -Libedc (Optimized by Jörg Schilling, originated by Heiko Eißfeldt heiko@hexco.de): - -Libscg: - -- Modified the remote SCSI library stuff that has been changed due - to a security problem on order to make it compile again on HP-UX. - -Rscsi: - -Cdrecord: - -- Support for the Plextor GigaRec feature. - Use driveropts=gigarec=1.2 to increase CD capacity by 20%. - -Cdda2wav (By Heiko Eißfeldt heiko@hexco.de): - -Readcd: - -Scgcheck: - -Scgskeleton: - -Mkisofs (By Jörg Schilling and James Pearson j.pearson@ge.ucl.ac.uk): - -TODO: - - read Joliet filenames with multi-session if no TRANS.TBL - or RR is present. I am looking for a volouteer for this task! - - Note that this can never be 100% correct as there is no relation - between the names on the master (UNIX) filesystem, the ISO-9660 - names and the Joliet names. Only the Rock Ridge names are - untranslated with respect to the original files on the - master (UNIX) filesystem. - - - add libecc/edc for CDI and similar. - - -CYGWIN NT-4.0 NOTES: - -To compile on Cygwin32, get Cygwin and install it. -For more information read README.win32 - -The files are located on: - -ftp://ftp.berlios.de/pub/cdrecord/alpha ... - -NOTE: These tar archives are 100% POSIX compatible. GNU tar may get some - minor trouble. If you like a 100% POSIX compliant tar, get star from - ftp://ftp.berlios.de/pub/star/ - -WARNING: Do not use 'winzip' to extract the tar file! - Winzip cannot extract symbolic links correctly. - -Joerg diff -Nru cdrtools-2.01.01a33/AN-2.01.01a03 cdrtools-3.02a09/AN-2.01.01a03 --- cdrtools-2.01.01a33/AN-2.01.01a03 2005-05-17 10:20:10.000000000 +0000 +++ cdrtools-3.02a09/AN-2.01.01a03 1970-01-01 00:00:00.000000000 +0000 @@ -1,150 +0,0 @@ -Please have a look at the German open Source Center BerliOS at www.berlios.de -BerliOS will continue to support free hosting of cryptography projects even -when US laws change and don't allow to host cryptography projects in the USA. -Also look at sourcewell.berlios.de, the first Open Source announcement service -that itself is implemented as Open Source project. - -***************** Important news **************************** - -For the 'Slottable Source Plugin Module' SSPM Features read README.SSPM - -***************** Please Test ********************************* - -NEW features of cdrtools-2.01.01a02: - -******* -NOTE: this is _not_ a release that starts a new aplha/beta series of dirtibutions. - The only reason is to add certain new CD/DVD features that are important. - - So _please_ do not send any patches except when you like to fix extreme bugs. - I am currently mainly working on stable incremental restore featurs for star-1.5-final. - Once star-1.5-final is out, cdrtools will start a new developent cycle. -******* - -All: - -- Now using "makefiles-1.5" - -- Compilation on OS/ should work again (-Zexe -> -o xxx.$(EXEEXT) - -- Sleeptime to allow reading Gmake warning reduced to 2 seconds. - I am still waiting for GNU make to fix the bugs I did report in 1999. - -- Support for 'make DESTDIR=xxx install' added - -- Workaround for a Shell Bug on BSDi - -- Install workaround for the fact that BSDI has chown(1) in /usr/sbin/ - -- cc-config shell script reworked - -- Better configure tests for procfs include files - -- Configure tests for fchown, chmod, fchmod, lchmod, futimes, lutimes - -- Configure tests for fdopendir - -- Configure tests for broken ext2fs includes files in Linux kernel - -- Better SRCROOT search function in makefiles shell scripts - -- libunls reworked - -- New autoconf tests for broken , & - on various Linux systems - - -Libparanoia (Ported by Jörg Schilling, originated by Monty xiphmont@mit.edu): - -Libedc (Optimized by Jörg Schilling, originated by Heiko Eißfeldt heiko@hexco.de): - -Libscg: - -- Trying to introduce a workaround for broken & - on various Linux systems. - -- Trying to introduce a workaround for the changed SCSI generic Linux - Kernel interface from Linux-2.6.8.1 and newer. - - Be very careful with testing. The Linux adption layer for libscg - is already full of workarounds for bugs, unstable interfaces and - unwillingness of the Linux Kernel maintainers to give access to the - needed information for libscg. I am not sure whether this workaround - will not have problems. It has been tested on a Pegasus PPC running - Linux-2.6.8.1 - -Rscsi: - -Cdrecord: - -- Allow the -shorttrack option for RAW mode, thanks to a report - from Sebastian Trueg - -- Enhance the minimal grace time from 2 to 3 seconds to make sure - that cdrecord will not get out of sync with locks from the - Volume management system. - -- Better checks and better error messages for /etc/default/cdrecord - -- Correct verbose print mode for old pre-MMC TEAC drives. - -- Added support for Ultra speed+ CD-RW media recognition and a check - whether the drive supports Ultra speed+ CD-RW media. - (Thanks to Alexander Noé). - - -Cdda2wav (By Heiko Eißfeldt heiko@hexco.de): - -Readcd: - -Scgcheck: - -Scgskeleton: - -Mkisofs (By Jörg Schilling and James Pearson j.pearson@ge.ucl.ac.uk): - -- Better error messages with wrong Eltorito boot options - -- Man page is now more explicit about requirements for DVD-video - directory trees. - -- Better warning text for missing Rock Ridge in multi.c - -- Bugs in README.sunx86boot corrected - -- Multi Volume code for reading old image now gives different - error messages on read errors and short reads. - -- Diagnostic programs isodump, isoinfo, ... no longer dump core - when called with dev= parameters. - -TODO: - - read Joliet filenames with multi-session if no TRANS.TBL - or RR is present. I am looking for a volouteer for this task! - - Note that this can never be 100% correct as there is no relation - between the names on the master (UNIX) filesystem, the ISO-9660 - names and the Joliet names. Only the Rock Ridge names are - untranslated with respect to the original files on the - master (UNIX) filesystem. - - - add libecc/edc for CDI and similar. - - -CYGWIN NT-4.0 NOTES: - -To compile on Cygwin32, get Cygwin and install it. -For more information read README.win32 - -The files are located on: - -ftp://ftp.berlios.de/pub/cdrecord/alpha ... - -NOTE: These tar archives are 100% POSIX compatible. GNU tar may get some - minor trouble. If you like a 100% POSIX compliant tar, get star from - ftp://ftp.berlios.de/pub/star/ - -WARNING: Do not use 'winzip' to extract the tar file! - Winzip cannot extract symbolic links correctly. - -Joerg diff -Nru cdrtools-2.01.01a33/AN-2.01.01a04 cdrtools-3.02a09/AN-2.01.01a04 --- cdrtools-2.01.01a33/AN-2.01.01a04 2006-01-12 01:46:06.000000000 +0000 +++ cdrtools-3.02a09/AN-2.01.01a04 1970-01-01 00:00:00.000000000 +0000 @@ -1,164 +0,0 @@ -Please have a look at the German open Source Center BerliOS at www.berlios.de -BerliOS will continue to support free hosting of cryptography projects even -when US laws change and don't allow to host cryptography projects in the USA. -Also look at sourcewell.berlios.de, the first Open Source announcement service -that itself is implemented as Open Source project. - -***************** Important news **************************** - -For the 'Slottable Source Plugin Module' SSPM Features read README.SSPM - -***************** Please Test ********************************* - -NEW features of cdrtools-2.01.01a04: - -******* -NOTE: this is _not_ a release that starts a new aplha/beta series of dirtibutions. - The only reason is to add certain new CD/DVD features that are important. - - So _please_ do not send any patches except when you like to fix extreme bugs. - I am currently mainly working on stable incremental restore featurs for star-1.5-final. - Once star-1.5-final is out, cdrtools will start a new developent cycle. -******* - -All: - -- astoull*() new in schily.h - -- utypes.h now has MAX_ and MIN_ value definitions for all basic - system types. - -- Using Makefiles-1.5a02 - -- Support added to compile in 64 bit mode on Solaris Sparc. - Use: smake CCOM=cc64 - -- Support added to compile shared libraries with version - numbers for interface levels and make inofficial "interfaces" - static - -- Prevent gmake to go into an enless loop on Solaris - in case that /usr/ucb/tr is before /usr/bin/tr in PATH - -- Better autoconf error message ion case that the expected - C-compiler could not be found. - -- Mac OS X now installs files as root:wheel - -- Supply linker mapfiles for all libraries. This allows cdrtools - to be compiles using shared libraries only and to properly - hide inofficial interfaces on Solaris (using ls) - Note that this feature is not available with GNU ld - - -Libparanoia (Ported by Jörg Schilling, originated by Monty xiphmont@mit.edu): - -Libedc (Optimized by Jörg Schilling, originated by Heiko Eißfeldt heiko@hexco.de): - -Libscg: - -- Autoconf test for broken Linux sg.h headers added - -- if libscg is compiles on newer Solaris systems, the warning: - - "Warning: Volume management is running, medialess managed drives are invisible.\n" - - is no longer printed. - - Since Solaris 11 Build 21, vold no longer hides empty drives - that are under volume management. This now allows cdrecord to be even - used to close the tray while vold is running. - - The criteria used to decide whether Solaris is "recent enough" is - #ifndef SEEK_HOLE - The definition SEEK_HOLE has been added with Solaris 11 Build 14 - while the fixed vold appears in Solaris 11 Build 21. - -- Support for root-less cdrecord using fine-grained privileges. - Remote SCSI not tests for PRIV_NET_PRIVADDR instead of (geteuid() == 0) - - If you like all users to be able to call cdrecord root-less, you need - Solaris 10 or newer. - - Edit the file /etc/security/exec_attr and add: - - All:solaris:cmd:::/opt/schily/bin/cdrecord: privs=file_dac_read,sys_devices,proc_lock_memory,proc_priocntl,net_privaddr - All:solaris:cmd:::/opt/schily/bin/readcd: privs=file_dac_read,sys_devices,net_privaddr - All:solaris:cmd:::/opt/schily/bin/cdda2wav: privs=file_dac_read,sys_devices,net_privaddr - - If you like to allow only specific user to use cdrecord, - use something like: - - CD RW:solaris:cmd:::/opt/schily/bin/cdrecord: privs=file_dac_read,sys_devices,proc_lock_memory,proc_priocntl,net_privaddr - - instead and make the users members of the profile "CD RW" - by adding a line like: - - joerg::::profiles=CD RW - - into /etc/user_attr - - Note that you either need to call cdrecord via "pfexec cdrecord ....." - or by using a profile aware shell (e.g. /usr/bin/pfksh) - -Rscsi: - -Cdrecord: - -- Correctly evaluate the write speeds for Ultra speed+ CD-RW media. - This prevents wrong warnings that the "drive does not support Ultra speed+" - -- Fixed a typo in the driveropts=help messages - - -Cdda2wav (By Heiko Eißfeldt heiko@hexco.de): - -- Added a workaround for the _POSIX_PRIORITY_SCHEDULING behavior - on MacosX: defined but not supported# - Thanks to: Emanuele Giaquinta - -- Bugfix: cdda2wav did previously chose to ignore the result of realloc(3) - This prevents core-dumps. - -Readcd: - -Scgcheck: - -Scgskeleton: - -Mkisofs (By Jörg Schilling and James Pearson j.pearson@ge.ucl.ac.uk): - -- mkisofs now detects if a file grows or shrinks while being - read by mkisofs. - - -TODO: - - read Joliet filenames with multi-session if no TRANS.TBL - or RR is present. I am looking for a volouteer for this task! - - Note that this can never be 100% correct as there is no relation - between the names on the master (UNIX) filesystem, the ISO-9660 - names and the Joliet names. Only the Rock Ridge names are - untranslated with respect to the original files on the - master (UNIX) filesystem. - - - add libecc/edc for CDI and similar. - - -CYGWIN NT-4.0 NOTES: - -To compile on Cygwin32, get Cygwin and install it. -For more information read README.win32 - -The files are located on: - -ftp://ftp.berlios.de/pub/cdrecord/alpha ... - -NOTE: These tar archives are 100% POSIX compatible. GNU tar may get some - minor trouble. If you like a 100% POSIX compliant tar, get star from - ftp://ftp.berlios.de/pub/star/ - -WARNING: Do not use 'winzip' to extract the tar file! - Winzip cannot extract symbolic links correctly. - -Joerg diff -Nru cdrtools-2.01.01a33/AN-2.01.01a05 cdrtools-3.02a09/AN-2.01.01a05 --- cdrtools-2.01.01a33/AN-2.01.01a05 2006-01-29 20:20:44.000000000 +0000 +++ cdrtools-3.02a09/AN-2.01.01a05 1970-01-01 00:00:00.000000000 +0000 @@ -1,143 +0,0 @@ -Please have a look at the German open Source Center BerliOS at www.berlios.de -BerliOS will continue to support free hosting of cryptography projects even -when US laws change and don't allow to host cryptography projects in the USA. -Also look at sourcewell.berlios.de, the first Open Source announcement service -that itself is implemented as Open Source project. - -***************** Important news **************************** - -For the 'Slottable Source Plugin Module' SSPM Features read README.SSPM - -***************** Please Test ********************************* - -NEW features of cdrtools-2.01.01a05: - -******* -NOTE: this is _not_ a release that starts a new aplha/beta series of dirtibutions. - The only reason is to add certain new CD/DVD features that are important. - - So _please_ do not send any patches except when you like to fix extreme bugs. - I am currently mainly working on stable incremental restore featurs for star-1.5-final. - Once star-1.5-final is out, cdrtools will start a new developent cycle. -******* - -All: - -- Support for DragonFly BSD added, thanks to joerg@britannica.bec.de - -- Default Cygwin install uid/group adapted to use available ids. - -- Updated the (forgotten) autoconf to include the tests needed for Solaris - fine grained privileges. - -- New program btcflash added. Thanks to David Huang - -- - If you like all users to be able to call cdrecord root-less, you need - Solaris 10 or newer. - - Edit the file /etc/security/exec_attr and add: - - All:solaris:cmd:::/opt/schily/bin/cdrecord: privs=file_dac_read,sys_devices,proc_lock_memory,proc_priocntl,net_privaddr - All:solaris:cmd:::/opt/schily/bin/readcd: privs=file_dac_read,sys_devices,net_privaddr - All:solaris:cmd:::/opt/schily/bin/cdda2wav: privs=file_dac_read,sys_devices,proc_priocntl,net_privaddr - - If you like to allow only specific user to use cdrecord, - use something like: - - CD RW:solaris:cmd:::/opt/schily/bin/cdrecord: privs=file_dac_read,sys_devices,proc_lock_memory,proc_priocntl,net_privaddr - - instead and make the users members of the profile "CD RW" - by adding a line like: - - joerg::::profiles=CD RW - - into /etc/user_attr - - Note that you either need to call cdrecord via "pfexec cdrecord ....." - or by using a profile aware shell (e.g. /usr/bin/pfksh) - - -Libparanoia (Ported by Jörg Schilling, originated by Monty xiphmont@mit.edu): - -Libedc (Optimized by Jörg Schilling, originated by Heiko Eißfeldt heiko@hexco.de): - -Libscg: - -- Support for root-less cdrecord using fine-grained privileges. - Remote SCSI not tests for PRIV_NET_PRIVADDR instead of (geteuid() == 0) - This is now active since the needed autoconf code is out. - -Rscsi: - -Cdrecord: - -- Trying to work around a noncompliance (modified interface) present on newer - Linux kernels that causes cdrecord to be unable to allocate a SCSI transfer - buffer. - - Newer Linux kernels do not honor a contract from mlockall(MCL_FUTURE) - after cdrecord turned off euid == 0 from a suid root installation. - Instead of honoring mlockall(MCL_FUTURE), Linux checks each mmap() - and compares against getrlimit(RLIMIT_MEMLOCK - -- Explicit fine grained privileges support for Solaris. - Cdrecord now switches off all privs that are no longer needed. - - -Cdda2wav (By Heiko Eißfeldt heiko@hexco.de): - -- Explicit fine grained privileges support for Solaris. - Cdda2wav now switches off all privs that are no longer needed. - -Readcd: - -- Allow readcd to work correctly in -scanbus mode - Thanks to Fabian Keil for reporting. - -- Explicit fine grained privileges support for Solaris. - readcd now switches off all privs that are no longer needed. - -Scgcheck: - -Scgskeleton: - -- Allow readcd to work correctly in -scanbus mode - Thanks to Fabian Keil for reporting. - -- Explicit fine grained privileges support for Solaris. - Scgskeleton now switches off all privs that are no longer needed. - -Mkisofs (By Jörg Schilling and James Pearson j.pearson@ge.ucl.ac.uk): - - -TODO: - - read Joliet filenames with multi-session if no TRANS.TBL - or RR is present. I am looking for a volouteer for this task! - - Note that this can never be 100% correct as there is no relation - between the names on the master (UNIX) filesystem, the ISO-9660 - names and the Joliet names. Only the Rock Ridge names are - untranslated with respect to the original files on the - master (UNIX) filesystem. - - - add libecc/edc for CDI and similar. - - -CYGWIN NT-4.0 NOTES: - -To compile on Cygwin32, get Cygwin and install it. -For more information read README.win32 - -The files are located on: - -ftp://ftp.berlios.de/pub/cdrecord/alpha ... - -NOTE: These tar archives are 100% POSIX compatible. GNU tar may get some - minor trouble. If you like a 100% POSIX compliant tar, get star from - ftp://ftp.berlios.de/pub/star/ - -WARNING: Do not use 'winzip' to extract the tar file! - Winzip cannot extract symbolic links correctly. - -Joerg diff -Nru cdrtools-2.01.01a33/AN-2.01.01a06 cdrtools-3.02a09/AN-2.01.01a06 --- cdrtools-2.01.01a33/AN-2.01.01a06 2006-02-08 23:14:35.000000000 +0000 +++ cdrtools-3.02a09/AN-2.01.01a06 1970-01-01 00:00:00.000000000 +0000 @@ -1,141 +0,0 @@ -Please have a look at the German open Source Center BerliOS at www.berlios.de -BerliOS will continue to support free hosting of cryptography projects even -when US laws change and don't allow to host cryptography projects in the USA. -Also look at sourcewell.berlios.de, the first Open Source announcement service -that itself is implemented as Open Source project. - -***************** Important news **************************** - -For the 'Slottable Source Plugin Module' SSPM Features read README.SSPM - -***************** Please Test ********************************* - -NEW features of cdrtools-2.01.01a06: - -******* -NOTE: this is _not_ a release that starts a new aplha/beta series of dirtibutions. - The only reason is to add certain new CD/DVD features that are important. - - So _please_ do not send any patches except when you like to fix extreme bugs. - I am currently mainly working on stable incremental restore featurs for star-1.5-final. - Once star-1.5-final is out, cdrtools will start a new developent cycle. -******* - -All: - -- Better support for BeOS/Zeta in the makefile system - -- Support for armv5teb-linux-cc was added to the makefile system - -- - If you like all users to be able to call cdrecord root-less, you need - Solaris 10 or newer. - - Edit the file /etc/security/exec_attr and add: - - All:solaris:cmd:::/opt/schily/bin/cdrecord: privs=file_dac_read,sys_devices,proc_lock_memory,proc_priocntl,net_privaddr - All:solaris:cmd:::/opt/schily/bin/readcd: privs=file_dac_read,sys_devices,net_privaddr - All:solaris:cmd:::/opt/schily/bin/cdda2wav: privs=file_dac_read,sys_devices,proc_priocntl,net_privaddr - - If you like to allow only specific user to use cdrecord, - use something like: - - CD RW:solaris:cmd:::/opt/schily/bin/cdrecord: privs=file_dac_read,sys_devices,proc_lock_memory,proc_priocntl,net_privaddr - - Also edit /etc/security/prof_attr - - CD RW:::CD-R/RW Recording Authorizations:auths=solaris.device.cdrw - - instead and make the users members of the profile "CD RW" - by adding a line like: - - joerg::::profiles=CD RW - - into /etc/user_attr - - Note that you either need to call cdrecord via "pfexec cdrecord ....." - or by using a profile aware shell (e.g. /usr/bin/pfksh) - - -Libparanoia (Ported by Jörg Schilling, originated by Monty xiphmont@mit.edu): - -Libedc (Optimized by Jörg Schilling, originated by Heiko Eißfeldt heiko@hexco.de): - -Libscg: - -- BeOS/Zeta libscg low level adoption code fixed. - The code now is passing a "scgcheck" test. - -Rscsi: - -Cdrecord: - -- Adjust some timeouts to prevent that the drive buffer of - newer Pioneer DVD writers empties when writing high speed DVD - media. - -- Support for BeOS/Zeta shared memory was added - -- New tag CDR_MAXFIFOSIZE= in /etc/default/cdrecord allows to - limit the size of the FIFO cdrecord is using. This helps the - sysadmin to prevent other people from locking up the system. - -Cdda2wav (By Heiko Eißfeldt heiko@hexco.de): - -Readcd: - -- Support for BeOS/Zeta shared memory was added - -- -scanbus behavior corrected - -Scgcheck: - -- Fixed DMA overrun test. BeOS/Zeta did pass the test but - scgcheck did complain before. - -Scgskeleton: - -- -scanbus behavior corrected - -Btcflash: - -- -scanbus behavior corrected - -- man page added - -Mkisofs (By Jörg Schilling and James Pearson j.pearson@ge.ucl.ac.uk): - -- try to work around a GCC trigraph problem - -- man pages for diag commands added - -TODO: - - read Joliet filenames with multi-session if no TRANS.TBL - or RR is present. I am looking for a volouteer for this task! - - Note that this can never be 100% correct as there is no relation - between the names on the master (UNIX) filesystem, the ISO-9660 - names and the Joliet names. Only the Rock Ridge names are - untranslated with respect to the original files on the - master (UNIX) filesystem. - - - add libecc/edc for CDI and similar. - - -CYGWIN NT-4.0 NOTES: - -To compile on Cygwin32, get Cygwin and install it. -For more information read README.win32 - -The files are located on: - -ftp://ftp.berlios.de/pub/cdrecord/alpha ... - -NOTE: These tar archives are 100% POSIX compatible. GNU tar may get some - minor trouble. If you like a 100% POSIX compliant tar, get star from - ftp://ftp.berlios.de/pub/star/ - -WARNING: Do not use 'winzip' to extract the tar file! - Winzip cannot extract symbolic links correctly. - -Joerg diff -Nru cdrtools-2.01.01a33/AN-2.01.01a07 cdrtools-3.02a09/AN-2.01.01a07 --- cdrtools-2.01.01a33/AN-2.01.01a07 2006-02-15 02:17:49.000000000 +0000 +++ cdrtools-3.02a09/AN-2.01.01a07 1970-01-01 00:00:00.000000000 +0000 @@ -1,96 +0,0 @@ -Please have a look at the German open Source Center BerliOS at www.berlios.de -BerliOS will continue to support free hosting of cryptography projects even -when US laws change and don't allow to host cryptography projects in the USA. -Also look at sourcewell.berlios.de, the first Open Source announcement service -that itself is implemented as Open Source project. - -***************** Important news **************************** - -For the 'Slottable Source Plugin Module' SSPM Features read README.SSPM - -***************** Please Test ********************************* - -NEW features of cdrtools-2.01.01a07: - -******* -NOTE: this is _not_ a release that starts a new aplha/beta series of dirtibutions. - The only reason is to add certain new CD/DVD features that are important. - - So _please_ do not send any patches except when you like to fix extreme bugs. - I am currently mainly working on stable incremental restore featurs for star-1.5-final. - Once star-1.5-final is out, cdrtools will start a new developent cycle. -******* - -All: - -- Autoconf script added to 'conf' directory - -Libparanoia (Ported by Jörg Schilling, originated by Monty xiphmont@mit.edu): - -Libedc (Optimized by Jörg Schilling, originated by Heiko Eißfeldt heiko@hexco.de): - -Libscg: - -Rscsi: - -Cdrecord: - -- Fixed a bug caused by an uninitalized variable when handling - CDR_MAXFIFOSIZE= and no file /etc/default/cdrecord exists - -Cdda2wav (By Heiko Eißfeldt heiko@hexco.de): - -- Write correct error info in case that BeOS/Zeta *_area() calls - fail. - -- As Heiko did not work on cdda2wav during the past 2.5 years, - Heiko did hand over the SCCS history for cdda2wav. - -- Autoconf test for added (FreeBSD) - -- Some FreeBSD related changes from Heiko done in 2004 - - IMPORTANT: I need testers for FreeBSD and DragonFly BSD as - a result of the merge with the complex changes - from Heiko. - -Readcd: - -Scgcheck: - -Scgskeleton: - -Btcflash: - -Mkisofs (By Jörg Schilling and James Pearson j.pearson@ge.ucl.ac.uk): - -TODO: - - read Joliet filenames with multi-session if no TRANS.TBL - or RR is present. I am looking for a volouteer for this task! - - Note that this can never be 100% correct as there is no relation - between the names on the master (UNIX) filesystem, the ISO-9660 - names and the Joliet names. Only the Rock Ridge names are - untranslated with respect to the original files on the - master (UNIX) filesystem. - - - add libecc/edc for CDI and similar. - - -CYGWIN NT-4.0 NOTES: - -To compile on Cygwin32, get Cygwin and install it. -For more information read README.win32 - -The files are located on: - -ftp://ftp.berlios.de/pub/cdrecord/alpha ... - -NOTE: These tar archives are 100% POSIX compatible. GNU tar may get some - minor trouble. If you like a 100% POSIX compliant tar, get star from - ftp://ftp.berlios.de/pub/star/ - -WARNING: Do not use 'winzip' to extract the tar file! - Winzip cannot extract symbolic links correctly. - -Joerg diff -Nru cdrtools-2.01.01a33/AN-2.01.01a08 cdrtools-3.02a09/AN-2.01.01a08 --- cdrtools-2.01.01a33/AN-2.01.01a08 2006-05-07 19:24:01.000000000 +0000 +++ cdrtools-3.02a09/AN-2.01.01a08 1970-01-01 00:00:00.000000000 +0000 @@ -1,96 +0,0 @@ -Please have a look at the German open Source Center BerliOS at www.berlios.de -BerliOS will continue to support free hosting of cryptography projects even -when US laws change and don't allow to host cryptography projects in the USA. -Also look at sourcewell.berlios.de, the first Open Source announcement service -that itself is implemented as Open Source project. - -***************** Important news **************************** - -For the 'Slottable Source Plugin Module' SSPM Features read README.SSPM - -***************** Please Test ********************************* - -NEW features of cdrtools-2.01.01a08: - -******* -NOTE: this is _not_ a release that starts a new aplha/beta series of dirtibutions. - The only reason is to add certain new CD/DVD features that are important. - - So _please_ do not send any patches except when you like to fix extreme bugs. - I am currently mainly working on stable incremental restore featurs for star-1.5-final. - Once star-1.5-final is out, cdrtools will start a new developent cycle. -******* - -All: - -Libparanoia (Ported by Jörg Schilling, originated by Monty xiphmont@mit.edu): - -Libedc (Optimized by Jörg Schilling, originated by Heiko Eißfeldt heiko@hexco.de): - -Libscg: - -Rscsi: - -Cdrecord: - -Cdda2wav (By Heiko Eißfeldt heiko@hexco.de): - -- Started to make cdda2wav Cstyle compliant. - -- Avoid to shutdown the whole system when kill(getppid(), SKGINT) - would result in kill -INT 1 because the parent cdda2wav is - dead and the child is orphaned and cdda2wav has been called by root. - -- __FreeBSD_version >= 600021 have devmajor == 0 for all devices. - Thanks to Marius Strobl for reporting. - -- General #ifdef structure related to FreeBSD in mycdrom.h now - corrected, thanks to Marius Strobl. - -- Try to fix some FreeBSD/DragonFly related problems that have been - introduced with a06 when Heiko's changes from 2004 have been integrated - - IMPORTANT: I need testers for FreeBSD and DragonFly BSD as - a result of the merge with the complex changes - from Heiko. - -Readcd: - -Scgcheck: - -Scgskeleton: - -Btcflash: - -Mkisofs (By Jörg Schilling and James Pearson j.pearson@ge.ucl.ac.uk): - -TODO: - - read Joliet filenames with multi-session if no TRANS.TBL - or RR is present. I am looking for a volouteer for this task! - - Note that this can never be 100% correct as there is no relation - between the names on the master (UNIX) filesystem, the ISO-9660 - names and the Joliet names. Only the Rock Ridge names are - untranslated with respect to the original files on the - master (UNIX) filesystem. - - - add libecc/edc for CDI and similar. - - -CYGWIN NT-4.0 NOTES: - -To compile on Cygwin32, get Cygwin and install it. -For more information read README.win32 - -The files are located on: - -ftp://ftp.berlios.de/pub/cdrecord/alpha ... - -NOTE: These tar archives are 100% POSIX compatible. GNU tar may get some - minor trouble. If you like a 100% POSIX compliant tar, get star from - ftp://ftp.berlios.de/pub/star/ - -WARNING: Do not use 'winzip' to extract the tar file! - Winzip cannot extract symbolic links correctly. - -Joerg diff -Nru cdrtools-2.01.01a33/AN-2.01.01a09 cdrtools-3.02a09/AN-2.01.01a09 --- cdrtools-2.01.01a33/AN-2.01.01a09 2006-05-15 20:54:03.000000000 +0000 +++ cdrtools-3.02a09/AN-2.01.01a09 1970-01-01 00:00:00.000000000 +0000 @@ -1,217 +0,0 @@ -Please have a look at the German open Source Center BerliOS at www.berlios.de -BerliOS will continue to support free hosting of cryptography projects even -when US laws change and don't allow to host cryptography projects in the USA. -Also look at sourcewell.berlios.de, the first Open Source announcement service -that itself is implemented as Open Source project. - -***************** Important news **************************** - -For the 'Slottable Source Plugin Module' SSPM Features read README.SSPM - -***************** Please Test ********************************* - -NEW features of cdrtools-2.01.01a09: - -******* -NOTE: this is _not_ a release that starts a new aplha/beta series of dirtibutions. - The only reason is to add certain new CD/DVD features that are important. - - So _please_ do not send any patches except when you like to fix extreme bugs. - I am currently mainly working on stable incremental restore featurs for star-1.5-final. - Once star-1.5-final is out, cdrtools will start a new developent cycle. -******* - -The license of many programs has been modified. Here is the current stare: - -btcflash/ - A firmwareflash program (CDDL) - Note: uses libscg -cdda2wav/ - A DAE program (CDDL) - Note: uses libscg -cdrecord/ - A CD/DVD-recording program (CDDL) - Note: uses libscg -conf/ - The Schily Autoconf program (GPL) - Support shell scripts for the Schily Makefile system (CDDL) -DEFAULTS/ - Default files for the Schily Makefile system (CDDL) -DEFAULTS_ENG/ - Default files for the Schily Makefile system (CDDL) -inc/ - Support C-Files for the Schily Makefile system (CDDL) -include/ - Support H-Files for the Schily Makefile system (CDDL) -libdeflt/ - A lib for accessing files under /etc/default/ (CDDL) -libedc/ - A Reed Solomon Encoder and Decoder (CDDL) -libfile/ - A lib that implements the 'file' command (GPL) -libhfs_iso/ - HFS support lib (GPL) -libparanoia/ - CD paranoia CD-DAE support lib (LGPL) -librscg/ - A remote SCSI-generic transport lib (CDDL) - This code may only be used together with other - code that is under an approved OpenSource license, - see http://www.opensource.org/. -libscg/ - A local SCSI-generic transport lib (CDDL) - This code may only be used together with other - code that is under an approved OpenSource license, - see http://www.opensource.org/. -libschily/ - The schily basic support library (CDDL) -libunls/ - A simple iconv replacement (GPL) -mkisofs/ - A ISO-9660/Rock-Ridge/Joliet/HFS/UDF filesystem formatter (GPL) - Note: uses libscg -readcd/ - A CD/DVD read utility (CDDL) - Note: uses libscg -rscsi/ - The remote SCSI generic transport daemon (CDDL) - Note: uses libscg -RULES/ - The main part of the Schily Makefilesystem (CDDL) -scgcheck/ - The libscg interface comliance check program (CDDL) - Note: uses libscg -scgskeleton/ - A libscg skeleton demo program (CDDL) - Note: uses libscg -TARGETS/ - Slot support for the Schily Makefile system (CDDL) -TEMPLATES/ - Template support for the Schily Makefile system (CDDL) - - -For more information on the CDDL read the file CDDL.Schily.txt -For more information on the GPL read the file GPL-2.0.txt -For more information on the LGPL read the file LGPL-2.1.txt - - -All: - -- Today, I happily announce new features and the release of the DVD-code - into the OpenSource. After long discussions with various people on - OpenSource Licenses and their effects on interproject usage and the - effect on the authors themselves, I contacted the authors of included - parts in this software suite and got, in most cases their support and - grant on selecting the CDDL as the new license. Altough this took some - time, it was worth reading the different OpenSource licenses completly - with some support of people working in that field. - - Now I know why it took Sun so much time to offer OpenSolaris under - an OpenSource license...if you take a license change seriously, it is - a real hard job. - - -Libparanoia (Ported by Jörg Schilling, originated by Monty xiphmont@mit.edu): - -- Changed from GPL to LGPL with permission from Monty. - -Libedc (Optimized by Jörg Schilling, originated by Heiko Eißfeldt heiko@hexco.de): - -- Changed from GPL to CDDL with permission from Heiko - -- New Reed Solomon decoder from Heiko allows to repair defective - CD-ROM sectors. Note that this code is from ~ Y2000 and note that - I did discuss OpenSource activities for the Reed Solomon Decoder - and the Cdrecord DVD support code with Heiko at that time. - We did agree in 2000 to make both OpenSource at the same time. - - -Libscg: - -- Changed from GPL to CDDL - This code may only be used together with other - code that is under an approved OpenSource license, - see http://www.opensource.org/. - -Rscsi: - -- Changed from GPL to CDDL - -Cdrecord: - -- Changed from GPL to CDDL - -- Moved the DVD support code to the OpenSource part. - - Note that this has been planned in 1998 already. The plan - was to make the DVD support code OpenSource at the time when - the sucessor of the DVD becomes ready. - - In case you do not know the reason why the DVD support - code has not been OpenSourced bofore....Cdrecord is the 3rd - program that did start suporting DVD-R. This was in February 1998. - A company from the MS-WIN area did steal my libscg code - in a way that made it hard if not impossible to sue them. - This company did implement DVD support very late (not much - more than a year ago) and I did not like to "help" them again. - - -Cdda2wav (By Heiko Eißfeldt heiko@hexco.de): - -- Changed from GPL to CDDL with permission from Heiko - -- Code now has been completeley reindented to follow the "Cstyle" - rules. As this did result in touching more than 50% of the - code, and as some of the code is platform specific I cannot grant - that I did not introduce bugs. Please test, in special on - platforms other than Solaris. - -Readcd: - -- Changed from GPL to CDDL - -Scgcheck: - -- Changed from GPL to CDDL - -Scgskeleton: - -- Changed from GPL to CDDL - -Btcflash: - -- Changed from GPL to CDDL - - -Mkisofs (By Jörg Schilling and James Pearson j.pearson@ge.ucl.ac.uk): - -TODO: - - read Joliet filenames with multi-session if no TRANS.TBL - or RR is present. I am looking for a volouteer for this task! - - Note that this can never be 100% correct as there is no relation - between the names on the master (UNIX) filesystem, the ISO-9660 - names and the Joliet names. Only the Rock Ridge names are - untranslated with respect to the original files on the - master (UNIX) filesystem. - - - add libecc/edc for CDI and similar. - - -CYGWIN NT-4.0 NOTES: - -To compile on Cygwin32, get Cygwin and install it. -For more information read README.win32 - -The files are located on: - -ftp://ftp.berlios.de/pub/cdrecord/alpha ... - -NOTE: These tar archives are 100% POSIX compatible. GNU tar may get some - minor trouble. If you like a 100% POSIX compliant tar, get star from - ftp://ftp.berlios.de/pub/star/ - -WARNING: Do not use 'winzip' to extract the tar file! - Winzip cannot extract symbolic links correctly. - -Joerg diff -Nru cdrtools-2.01.01a33/AN-2.01.01a10 cdrtools-3.02a09/AN-2.01.01a10 --- cdrtools-2.01.01a33/AN-2.01.01a10 2006-06-05 22:10:51.000000000 +0000 +++ cdrtools-3.02a09/AN-2.01.01a10 1970-01-01 00:00:00.000000000 +0000 @@ -1,127 +0,0 @@ -Please have a look at the German open Source Center BerliOS at www.berlios.de -BerliOS will continue to support free hosting of cryptography projects even -when US laws change and don't allow to host cryptography projects in the USA. -Also look at sourcewell.berlios.de, the first Open Source announcement service -that itself is implemented as Open Source project. - -***************** Important news **************************** - -For the 'Slottable Source Plugin Module' SSPM Features read README.SSPM - -***************** Please Test ********************************* - -NEW features of cdrtools-2.01.01a10: - -******* -NOTE: this is _not_ a release that starts a new aplha/beta series of dirtibutions. - The only reason is to add certain new CD/DVD features that are important. - - So _please_ do not send any patches except when you like to fix extreme bugs. - I am currently mainly working on stable incremental restore featurs for star-1.5-final. - Once star-1.5-final is out, cdrtools will start a new developent cycle. -******* - - -All: - -- The file "CONTRIBUTING" has been updated. - -Libparanoia (Ported by Jörg Schilling, originated by Monty xiphmont@mit.edu): - -Libedc (Optimized by Jörg Schilling, originated by Heiko Eißfeldt heiko@hexco.de): - -Libscg: - -- scsi-apollo.c & scsi-hpux.c indented properly to follow Cstyle - -- scsi-linux-ata.c cast added to avoid strange warning from GCC - caused by bad coding style in the Linux kernel. - -- scsi-linux-ata.c trying again to add workarounds for new Linux - Kernel self-incompatibilities: Adding the same uid workaround - as for scsi-linux-sg.c. Note that I am not sure if this is the - only incompatibility that has been added with Linux-2.6.16, it may - be that they did also break the behavior of seteuid(). - Please help me with further testing and debugging. - - I am however short before giving up completely with Linux. - - -Rscsi: - -Cdrecord: - -- Fixed a typo in defaults.c & scsimmc.h - -- Fixed a bug (ignoring DVD+R/DL media) that has been introduced - with cdrecord-2.01.01a09 when trying to work around a Pioneer - firmware problem. - -- Introduced a better DMA speed test that now hopefully notices - all cases when the SCSI read buffer command does not work. - -- Print the physical drive buffer size in addition to the logical - drive buffer size when both differ. - -- Added a workaround for a NEC DVD firmwarebug that caused cdrecord - to use the CD write speed instead of the DVD write speed. - -- Added a workaround for the fact that some NEC writers return a too - small size for half written DVD+RW (use end_lba from GET PERFORMANCE - in this case). - -- Better error messages in case of no track options that are called - together with file type arguments. - -- Added new Mt.Fuji6 profile texts for HD-DVD and Blu ray writers. - - -Cdda2wav (By Heiko Eißfeldt heiko@hexco.de): - -- Fixed several typos that have been introduced with 2.01.01a09 and that - did prevent compilation on Linux, FreeBSD and Cygwin. - -Readcd: - -- New experimental option -edc-corr. This has already been added with - 2.01.01a09 but forgotten to list here. - -Scgcheck: - -Scgskeleton: - -Btcflash: - - -Mkisofs (By Jörg Schilling and James Pearson j.pearson@ge.ucl.ac.uk): - -TODO: - - read Joliet filenames with multi-session if no TRANS.TBL - or RR is present. I am looking for a volouteer for this task! - - Note that this can never be 100% correct as there is no relation - between the names on the master (UNIX) filesystem, the ISO-9660 - names and the Joliet names. Only the Rock Ridge names are - untranslated with respect to the original files on the - master (UNIX) filesystem. - - - add libecc/edc for CDI and similar. - - -CYGWIN NT-4.0 NOTES: - -To compile on Cygwin32, get Cygwin and install it. -For more information read README.win32 - -The files are located on: - -ftp://ftp.berlios.de/pub/cdrecord/alpha ... - -NOTE: These tar archives are 100% POSIX compatible. GNU tar may get some - minor trouble. If you like a 100% POSIX compliant tar, get star from - ftp://ftp.berlios.de/pub/star/ - -WARNING: Do not use 'winzip' to extract the tar file! - Winzip cannot extract symbolic links correctly. - -Joerg diff -Nru cdrtools-2.01.01a33/AN-2.01.01a11 cdrtools-3.02a09/AN-2.01.01a11 --- cdrtools-2.01.01a33/AN-2.01.01a11 2006-07-09 20:38:43.000000000 +0000 +++ cdrtools-3.02a09/AN-2.01.01a11 1970-01-01 00:00:00.000000000 +0000 @@ -1,111 +0,0 @@ -Please have a look at the German open Source Center BerliOS at www.berlios.de -BerliOS will continue to support free hosting of cryptography projects even -when US laws change and don't allow to host cryptography projects in the USA. -Also look at sourcewell.berlios.de, the first Open Source announcement service -that itself is implemented as Open Source project. - -***************** Important news **************************** - -For the 'Slottable Source Plugin Module' SSPM Features read README.SSPM - -***************** Please Test ********************************* - -NEW features of cdrtools-2.01.01a11: - -******* -NOTE: this is _not_ a release that starts a new aplha/beta series of dirtibutions. - The only reason is to add certain new CD/DVD features that are important. - - So _please_ do not send any patches except when you like to fix extreme bugs. - I am currently mainly working on stable incremental restore featurs for star-1.5-final. - Once star-1.5-final is out, cdrtools will start a new developent cycle. -******* - - -All: - -- The makefile system has been completely rewritten to be more reusable - and to not replicate code. - -- The makefile system now supports to compile under "Services For Unix", - a free POSIX add on from Microsoft (identifies as "Interix"). - Note that you need the latest 'smake' relase smake-1.2a36 or never - from ftp://ftp.berlios.de/pub/smake/alpha/ - - Currently, cdrecord is not able to send SCSI commands from this - environment. I am looking for help from experienced users. - -- The makefile system now supports to compile using the Microsoft - C-Compiler "cl". - Note that you need the latest 'smake' relase smake-1.2a36 or never - from ftp://ftp.berlios.de/pub/smake/alpha/ - This compilation currently may only be cone from a "Cygwin" environment - using smake with the Environment variables set up in a way that allows - "cl" to work (find it's include files and libraries). - - Run "smake CCOM=cl" for this kiond of compilation. - - Cdrecord has not yet been verified to compile in this environment. - - Note that I am interested in feedback for these new compile possibilities. - - -Libparanoia (Ported by Jörg Schilling, originated by Monty xiphmont@mit.edu): - -Libedc (Optimized by Jörg Schilling, originated by Heiko Eißfeldt heiko@hexco.de): - -Libscg: - -Rscsi: - -Cdrecord: - -- Avoid a GCC warning in the code that works around a Linux DMA residual bug. - - - -Cdda2wav (By Heiko Eißfeldt heiko@hexco.de): - -- Some modifications needed because of the restructured makefiles. - -Readcd: - -Scgcheck: - -Scgskeleton: - -Btcflash: - - -Mkisofs (By Jörg Schilling and James Pearson j.pearson@ge.ucl.ac.uk): - -TODO: - - read Joliet filenames with multi-session if no TRANS.TBL - or RR is present. I am looking for a volouteer for this task! - - Note that this can never be 100% correct as there is no relation - between the names on the master (UNIX) filesystem, the ISO-9660 - names and the Joliet names. Only the Rock Ridge names are - untranslated with respect to the original files on the - master (UNIX) filesystem. - - - add libecc/edc for CDI and similar. - - -CYGWIN NT-4.0 NOTES: - -To compile on Cygwin32, get Cygwin and install it. -For more information read README.win32 - -The files are located on: - -ftp://ftp.berlios.de/pub/cdrecord/alpha ... - -NOTE: These tar archives are 100% POSIX compatible. GNU tar may get some - minor trouble. If you like a 100% POSIX compliant tar, get star from - ftp://ftp.berlios.de/pub/star/ - -WARNING: Do not use 'winzip' to extract the tar file! - Winzip cannot extract symbolic links correctly. - -Joerg diff -Nru cdrtools-2.01.01a33/AN-2.01.01a12 cdrtools-3.02a09/AN-2.01.01a12 --- cdrtools-2.01.01a33/AN-2.01.01a12 2006-09-04 22:28:52.000000000 +0000 +++ cdrtools-3.02a09/AN-2.01.01a12 1970-01-01 00:00:00.000000000 +0000 @@ -1,145 +0,0 @@ -Please have a look at the German open Source Center BerliOS at www.berlios.de -BerliOS will continue to support free hosting of cryptography projects even -when US laws change and don't allow to host cryptography projects in the USA. -Also look at sourcewell.berlios.de, the first Open Source announcement service -that itself is implemented as Open Source project. - -***************** Important news **************************** - -For the 'Slottable Source Plugin Module' SSPM Features read README.SSPM - -***************** Please Test ********************************* - -NEW features of cdrtools-2.01.01a12: - -******* -NOTE: this is _not_ a release that starts a new aplha/beta series of dirtibutions. - The only reason is to add certain new CD/DVD features that are important. - - So _please_ do not send any patches except when you like to fix extreme bugs. - I am currently mainly working on stable incremental restore featurs for star-1.5-final. - Once star-1.5-final is out, cdrtools will start a new developent cycle. -******* - - -All: - -- New function strlcpy() for better portability. - -- New function strncpy() for better portability. - -- Enhanced Makefile system for better MSVC support - -- Enhanced Makefile system for C++ support - -- Fixed some typos in dirdefs.h - -- New functions getvallargs()/getvargs()/getvfiles() - allow to have a vector based interface to the - advanced argument parsing library functions. - Currently used by mkisofs. - -- getargs.c is now at up to date again and libschily - from cdrtools is 100% complete and may be used - as a shared library to be used by e.g. star too. - -- Added a workaround for a core dump problem with - running avoffset.c on FreeBSD/sparc64 (gcc) - - -Libparanoia (Ported by Jörg Schilling, originated by Monty xiphmont@mit.edu): - -Libedc (Optimized by Jörg Schilling, originated by Heiko Eißfeldt heiko@hexco.de): - -Libscg: - -Rscsi: - -Cdrecord: - -- Replace nice(-20) by nice(-NZERO) - -Cdda2wav (By Heiko Eißfeldt heiko@hexco.de): - -- Replace nice(-20) by nice(-NZERO) - -- Renamed Inquiry() by ScsiInquiry() for better VMS support - -- Fixed an unsigned comparison with zero in resample.c - -- Fixed a printf format string with short argument. - -Readcd: - -Scgcheck: - -Scgskeleton: - -Btcflash: - - -Mkisofs (By Jörg Schilling and James Pearson j.pearson@ge.ucl.ac.uk): - -- Replaced GNU getopt_long() by getargs(). This has been done for - several reasons: - - - Get rid of the annoying oddities/bugs of GNU getopt_long() - - - Use a unique option parser for all programs from cdrtools. - - - Find a way to better deal with historic badly planned - options. These problems are caused by the fact that - several options that take arguments start the same way. - With GNU getopt_long, there is no clean way to deal with - the resulting problems. getargs() allows to specify - whether an option needs to have a space between the option - name and the argument or not. - - - Make the code easier to understand and to maintain. - - - Segregation of option parsing and option conflict checking. - - - Code size reduction. - - Note that the intention is that all options still behave as documented - in the man page. If you have problems with scripts, first check whether - your usage is aligned with the the documentation or whether you did - depend from a side effect from GNU getopt_long before sending a bug - report. - -- Fixed an Eltorito Boot bug that happenes together with - ISO-9660:1999 - -- Added some patches for better VMS portability from Steven M. Schweda - sms@antinode.org - -TODO: - - read Joliet filenames with multi-session if no TRANS.TBL - or RR is present. I am looking for a volouteer for this task! - - Note that this can never be 100% correct as there is no relation - between the names on the master (UNIX) filesystem, the ISO-9660 - names and the Joliet names. Only the Rock Ridge names are - untranslated with respect to the original files on the - master (UNIX) filesystem. - - - add libecc/edc for CDI and similar. - - -CYGWIN NT-4.0 NOTES: - -To compile on Cygwin32, get Cygwin and install it. -For more information read README.win32 - -The files are located on: - -ftp://ftp.berlios.de/pub/cdrecord/alpha ... - -NOTE: These tar archives are 100% POSIX compatible. GNU tar may get some - minor trouble. If you like a 100% POSIX compliant tar, get star from - ftp://ftp.berlios.de/pub/star/ - -WARNING: Do not use 'winzip' to extract the tar file! - Winzip cannot extract symbolic links correctly. - -Joerg diff -Nru cdrtools-2.01.01a33/AN-2.01.01a13 cdrtools-3.02a09/AN-2.01.01a13 --- cdrtools-2.01.01a33/AN-2.01.01a13 2006-09-08 08:54:29.000000000 +0000 +++ cdrtools-3.02a09/AN-2.01.01a13 1970-01-01 00:00:00.000000000 +0000 @@ -1,136 +0,0 @@ -Please have a look at the German open Source Center BerliOS at www.berlios.de -BerliOS will continue to support free hosting of cryptography projects even -when US laws change and don't allow to host cryptography projects in the USA. -Also look at sourcewell.berlios.de, the first Open Source announcement service -that itself is implemented as Open Source project. - -***************** Important news **************************** - -For the 'Slottable Source Plugin Module' SSPM Features read README.SSPM - -***************** Please Test ********************************* - -NEW features of cdrtools-2.01.01a13: - -******* -NOTE: this is _not_ a release that starts a new aplha/beta series of dirtibutions. - The only reason is to add certain new CD/DVD features that are important. - - So _please_ do not send any patches except when you like to fix extreme bugs. - I am currently mainly working on stable incremental restore featurs for star-1.5-final. - Once star-1.5-final is out, cdrtools will start a new developent cycle. -******* - - -All: - -- libschily now includes a fallback fnmatch() for better portability - This fnmatch() implementation has been taken from th BSD project. - - -Libparanoia (Ported by Jörg Schilling, originated by Monty xiphmont@mit.edu): - -Libedc (Optimized by Jörg Schilling, originated by Heiko Eißfeldt heiko@hexco.de): - -Libfind: - -- The libfind code (developed as part of the sfind(1) command) has been added - in order to support "mkisofs -find ..." - -Libscg: - -Rscsi: - -Cdrecord: - -Cdda2wav (By Heiko Eißfeldt heiko@hexco.de): - -Readcd: - -Scgcheck: - -Scgskeleton: - -Btcflash: - - -Mkisofs (By Jörg Schilling and James Pearson j.pearson@ge.ucl.ac.uk): - -- mkisofs now includes libfind and allows to use the find(1) command line - syntay to be used. - - The new -find option acts as a option separator. To the right of the - -find option, find(1) syntax is used. No other mkisofs option may - appear anymore. - - Files are considered to be taken into the .ISO image in case that the - find(1) expression used on the command line yields TRUE. - - In addition to the find(1) utility, libfind allows to modify the stat(2) - data for each file before it is included in the .ISO. The following - find(1) primaries are implemented for this feature: - - -chmod mode/onum Modify the permissions for a file usinf the - chmod(1) syntax. - This primary always yields TRUE - - -chown uname/uid Modify the owner for a file. - This primary always yields TRUE - - -chgrp gname/gid Modify the group for a file. - This primary always yields TRUE - - The command line: "mkisofs -o image.iso -R -J somedir" - may be written as: "mkisofs -o image.iso -R -J -find somedir" - to give the same results as before. - - The command line: - - mkisofs -o image.iso -R -J -find somedir -chmod a+r -chown root -chgrp 0 - - will ensure that all files will have at least read permission for all users - and set the user/group to 0. - - The command line: - - mkisofs -o image.iso -R -J -find somedir ( -type d -chown root ) -o -true - - will change the owner of all directories to root, leaving other file - types untouched. - - Graft points are not yet implemented in -find mode. - -- removed fnmatch.c - mkisofs now uses the fnmatch() implementation from the OS if present - and the fallback version from libschily if fnmatch() is missing in the OS. - -TODO: - - read Joliet filenames with multi-session if no TRANS.TBL - or RR is present. I am looking for a volouteer for this task! - - Note that this can never be 100% correct as there is no relation - between the names on the master (UNIX) filesystem, the ISO-9660 - names and the Joliet names. Only the Rock Ridge names are - untranslated with respect to the original files on the - master (UNIX) filesystem. - - - add libecc/edc for CDI and similar. - - -CYGWIN NT-4.0 NOTES: - -To compile on Cygwin32, get Cygwin and install it. -For more information read README.win32 - -The files are located on: - -ftp://ftp.berlios.de/pub/cdrecord/alpha ... - -NOTE: These tar archives are 100% POSIX compatible. GNU tar may get some - minor trouble. If you like a 100% POSIX compliant tar, get star from - ftp://ftp.berlios.de/pub/star/ - -WARNING: Do not use 'winzip' to extract the tar file! - Winzip cannot extract symbolic links correctly. - -Joerg diff -Nru cdrtools-2.01.01a33/AN-2.01.01a14 cdrtools-3.02a09/AN-2.01.01a14 --- cdrtools-2.01.01a33/AN-2.01.01a14 2006-09-11 16:30:41.000000000 +0000 +++ cdrtools-3.02a09/AN-2.01.01a14 1970-01-01 00:00:00.000000000 +0000 @@ -1,111 +0,0 @@ -Please have a look at the German open Source Center BerliOS at www.berlios.de -BerliOS will continue to support free hosting of cryptography projects even -when US laws change and don't allow to host cryptography projects in the USA. -Also look at sourcewell.berlios.de, the first Open Source announcement service -that itself is implemented as Open Source project. - -***************** Important news **************************** - -For the 'Slottable Source Plugin Module' SSPM Features read README.SSPM - -***************** Please Test ********************************* - -NEW features of cdrtools-2.01.01a14: - -******* -NOTE: this is _not_ a release that starts a new aplha/beta series of dirtibutions. - The only reason is to add certain new CD/DVD features that are important. - - So _please_ do not send any patches except when you like to fix extreme bugs. - I am currently mainly working on stable incremental restore featurs for star-1.5-final. - Once star-1.5-final is out, cdrtools will start a new developent cycle. -******* - - -All: - -- Fixed a bug in getvargs() that caused mkisofs -joliet-long to be - declared as illegal option. - -- Several small format enhancements for getargs() - -- getavrgs() is now (like getargs()) able to correctly handle - combinations of single char boolean flags - - -Libparanoia (Ported by Jörg Schilling, originated by Monty xiphmont@mit.edu): - -Libedc (Optimized by Jörg Schilling, originated by Heiko Eißfeldt heiko@hexco.de): - -Libfind: - -Libscg: - -Rscsi: - -Cdrecord: - -Cdda2wav (By Heiko Eißfeldt heiko@hexco.de): - -Readcd: - -Scgcheck: - -Scgskeleton: - -Btcflash: - - -Mkisofs (By Jörg Schilling and James Pearson j.pearson@ge.ucl.ac.uk): - -- man page extended to include a description for the -find - option. - -- Added $(LIB_ACL) tp the mkisofs Makefile to allow the code from - libfind to link properly on all OS. - -- Fixed several small problems with option parsing caused by the - change from GNU getopt_long to getvargs() - Thanks to Ä°smail Dönmez & scdbackup@gmx.net & Sebastian Trüg - -- Changed '%' option format specifier to '%0' to reflect a small - enhancement in libschily. - -- Better checks and better error messages for mkisofs -dvd-video - Mkisofs now correectly checks for the existence of a directory - "VIDEO_TS" in the root diretory of the media. - -- mkisofs -find now allows to use -graft-points - -- mkisofs -find now allows to use -path-list - -TODO: - - read Joliet filenames with multi-session if no TRANS.TBL - or RR is present. I am looking for a volouteer for this task! - - Note that this can never be 100% correct as there is no relation - between the names on the master (UNIX) filesystem, the ISO-9660 - names and the Joliet names. Only the Rock Ridge names are - untranslated with respect to the original files on the - master (UNIX) filesystem. - - - add libecc/edc for CDI and similar. - - -CYGWIN NT-4.0 NOTES: - -To compile on Cygwin32, get Cygwin and install it. -For more information read README.win32 - -The files are located on: - -ftp://ftp.berlios.de/pub/cdrecord/alpha ... - -NOTE: These tar archives are 100% POSIX compatible. GNU tar may get some - minor trouble. If you like a 100% POSIX compliant tar, get star from - ftp://ftp.berlios.de/pub/star/ - -WARNING: Do not use 'winzip' to extract the tar file! - Winzip cannot extract symbolic links correctly. - -Joerg diff -Nru cdrtools-2.01.01a33/AN-2.01.01a15 cdrtools-3.02a09/AN-2.01.01a15 --- cdrtools-2.01.01a33/AN-2.01.01a15 2006-09-17 22:39:17.000000000 +0000 +++ cdrtools-3.02a09/AN-2.01.01a15 1970-01-01 00:00:00.000000000 +0000 @@ -1,138 +0,0 @@ -Please have a look at the German open Source Center BerliOS at www.berlios.de -BerliOS will continue to support free hosting of cryptography projects even -when US laws change and don't allow to host cryptography projects in the USA. -Also look at sourcewell.berlios.de, the first Open Source announcement service -that itself is implemented as Open Source project. - -***************** Important news **************************** - -For the 'Slottable Source Plugin Module' SSPM Features read README.SSPM - -***************** Please Test ********************************* - -NEW features of cdrtools-2.01.01a15: - -******* -NOTE: this is _not_ a release that starts a new aplha/beta series of dirtibutions. - The only reason is to add certain new CD/DVD features that are important. - - So _please_ do not send any patches except when you like to fix extreme bugs. - I am currently mainly working on stable incremental restore featurs for star-1.5-final. - Once star-1.5-final is out, cdrtools will start a new developent cycle. -******* - - -All: - -- include file system completely restructured to avoid future name conflicts. - The include files now have completely moved to include/schily/. - This also allows to make all include files available in /usr/include/schily/ - in the future. - -- fixed a type in include/schily/termios.h thanks to Steven M. Schweda for - reporting. - -- All libraries now include support for compiling the code as shared library. - The code has been tested on Solaris but should also work in *BSD and Linux. - - In order to compile with shared libraries, either call: - - make LINKMODE=dynamic - - or change the line - - DEFLINKMODE= static - - to - DEFLINKMODE= dynamic - - for your os in DEFAULTS/Defaults. - - I am interested in feedback for various OS platforms........ - - -- The order for compiling the libraries has been changed to make the - compile process insensitive against old static libraris in the - library search path. - -- New Schily autoconf text for gettext() and libintl - -- include/schily/nlsdefs.h now also checks for the exstance of HAVE_GETTEXT - - -Libparanoia (Ported by Jörg Schilling, originated by Monty xiphmont@mit.edu): - -Libedc (Optimized by Jörg Schilling, originated by Heiko Eißfeldt heiko@hexco.de): - -Libfind: - -- libfind no longer uses static global data. This version of libfind - is the first real library version that even allows to implement - the find(1) program in less than 200 lines of code. - -Libscg: - -Rscsi: - -Cdrecord: - -- cdrecord now supports to set the layer break for DVD+R/DL. - This reduces the write time but as there is currently no way - to specify the layer break by hand, dual layer DVD-Video does - not yet work. - -- cdrecord -atip now also prints the rzone info for DVD+ media - -- cdrecord -atip now prints more information for DVD-R/DL media - -- cdrecord now also supports to write to DVD-RAM - -Cdda2wav (By Heiko Eißfeldt heiko@hexco.de): - -- Fixed a typo in scsi_cmds.c thanks to Steven M. Schweda for reporting. - -Readcd: - -Scgcheck: - -Scgskeleton: - -Btcflash: - -Mkisofs (By Jörg Schilling and James Pearson j.pearson@ge.ucl.ac.uk): - -- Fixed a buggy error message (a result from the option parser - rewrite, thanks to Steven M. Schweda for reporting. - -- Makefile now uses $(LIB_INTL) because of gettext() in libfind - -TODO: - - read Joliet filenames with multi-session if no TRANS.TBL - or RR is present. I am looking for a volouteer for this task! - - Note that this can never be 100% correct as there is no relation - between the names on the master (UNIX) filesystem, the ISO-9660 - names and the Joliet names. Only the Rock Ridge names are - untranslated with respect to the original files on the - master (UNIX) filesystem. - - - add libecc/edc for CDI and similar. - - -CYGWIN NT-4.0 NOTES: - -To compile on Cygwin32, get Cygwin and install it. -For more information read README.win32 - -The files are located on: - -ftp://ftp.berlios.de/pub/cdrecord/alpha ... - -NOTE: These tar archives are 100% POSIX compatible. GNU tar may get some - minor trouble. If you like a 100% POSIX compliant tar, get star from - ftp://ftp.berlios.de/pub/star/ - -WARNING: Do not use 'winzip' to extract the tar file! - Winzip cannot extract symbolic links correctly. - -Joerg diff -Nru cdrtools-2.01.01a33/AN-2.01.01a16 cdrtools-3.02a09/AN-2.01.01a16 --- cdrtools-2.01.01a33/AN-2.01.01a16 2006-09-25 12:11:42.000000000 +0000 +++ cdrtools-3.02a09/AN-2.01.01a16 1970-01-01 00:00:00.000000000 +0000 @@ -1,102 +0,0 @@ -Please have a look at the German open Source Center BerliOS at www.berlios.de -BerliOS will continue to support free hosting of cryptography projects even -when US laws change and don't allow to host cryptography projects in the USA. -Also look at sourcewell.berlios.de, the first Open Source announcement service -that itself is implemented as Open Source project. - -***************** Important news **************************** - -For the 'Slottable Source Plugin Module' SSPM Features read README.SSPM - -***************** Please Test ********************************* - -NEW features of cdrtools-2.01.01a16: - -******* -NOTE: this is _not_ a release that starts a new aplha/beta series of dirtibutions. - The only reason is to add certain new CD/DVD features that are important. - - So _please_ do not send any patches except when you like to fix extreme bugs. - I am currently mainly working on stable incremental restore featurs for star-1.5-final. - Once star-1.5-final is out, cdrtools will start a new developent cycle. -******* - - -All: - -- #undef SIZE_T_MAX in utypes.h for better FreeBSD support - -Libparanoia (Ported by Jörg Schilling, originated by Monty xiphmont@mit.edu): - -Libedc (Optimized by Jörg Schilling, originated by Heiko Eißfeldt heiko@hexco.de): - -Libfind: - -Libscg: - -Rscsi: - -Cdrecord: - -- New test for DVD-R/DL layer jump write capability - -- Starting to implement a new default write modethat is not always TAO - but fits best to the current writer and medium. - -Cdda2wav (By Heiko Eißfeldt heiko@hexco.de): - -Readcd: - -- readcd meshpoints=# -factor now prints correct CD speed factors - as it now correctly computes sector size. - -Scgcheck: - -Scgskeleton: - -Btcflash: - -Mkisofs (By Jörg Schilling and James Pearson j.pearson@ge.ucl.ac.uk): - -- Fixed some typos, thanks to Vitezslav Samel - -- Cstyle fixes - -- Fxed a bug with an unitialized variable introduced in 2.01.01a14 - This could have caused many different problems! - -- Abort writing in case the function xfwrite() gets called with size 0. - -- isodebug now finds debug desciptor even when the medium includes a - UDF Filesystem. - -TODO: - - read Joliet filenames with multi-session if no TRANS.TBL - or RR is present. I am looking for a volouteer for this task! - - Note that this can never be 100% correct as there is no relation - between the names on the master (UNIX) filesystem, the ISO-9660 - names and the Joliet names. Only the Rock Ridge names are - untranslated with respect to the original files on the - master (UNIX) filesystem. - - - add libecc/edc for CDI and similar. - - -CYGWIN NT-4.0 NOTES: - -To compile on Cygwin32, get Cygwin and install it. -For more information read README.win32 - -The files are located on: - -ftp://ftp.berlios.de/pub/cdrecord/alpha ... - -NOTE: These tar archives are 100% POSIX compatible. GNU tar may get some - minor trouble. If you like a 100% POSIX compliant tar, get star from - ftp://ftp.berlios.de/pub/star/ - -WARNING: Do not use 'winzip' to extract the tar file! - Winzip cannot extract symbolic links correctly. - -Joerg diff -Nru cdrtools-2.01.01a33/AN-2.01.01a17 cdrtools-3.02a09/AN-2.01.01a17 --- cdrtools-2.01.01a33/AN-2.01.01a17 2006-10-02 14:33:03.000000000 +0000 +++ cdrtools-3.02a09/AN-2.01.01a17 1970-01-01 00:00:00.000000000 +0000 @@ -1,112 +0,0 @@ -Please have a look at the German open Source Center BerliOS at www.berlios.de -BerliOS will continue to support free hosting of cryptography projects even -when US laws change and don't allow to host cryptography projects in the USA. -Also look at sourcewell.berlios.de, the first Open Source announcement service -that itself is implemented as Open Source project. - -***************** Important news **************************** - -For the 'Slottable Source Plugin Module' SSPM Features read README.SSPM - -***************** Please Test ********************************* - -NEW features of cdrtools-2.01.01a17: - -******* -NOTE: this is _not_ a release that starts a new aplha/beta series of - dirtibutions. The only reason is to add certain new CD/DVD features - that are important. - - So _please_ do not send any patches except when you like to fix - extreme bugs. I am currently mainly working on stable incremental - restore featurs for star-1.5-final. - Once star-1.5-final is out, cdrtools will start a new developent cycle. -******* - - -All: - -- make file system restructured: all Schily include files are now located - in ..../include/schily/ - -- Now using new definitions from Steven M. Schweda in - include/schily/xmconfig.h - VMS users: in future, you need to specify cc -DUSE_STATIC_CONF - in order to get the old static configuration. - -- new file schily/errno.h - -Libparanoia (Ported by Jörg Schilling, originated by Monty xiphmont@mit.edu): - -Libedc (Optimized by Jörg Schilling, originated by Heiko Eißfeldt heiko@hexco.de): - -Libfind: - -- Next development step makes libfind usable by star again - -Libscg: - -Rscsi: - -Cdrecord: - -- New option driveropts=layerbreak switches DVD-R/DL into layer jump mode - -- New option driveropts=layerbreak=value sets manual layer break - -- cdrecord -prcap now also printf the MMC4 profile list and the feature list - -- SCSI MMC4 print feature codes enhanced - -- SCSI MMC4 print feature now knows more cecent feature numbers - -- "gconf" ebug code removed - no longer needed - -- print formated capacity values with cdrecord -atip - -Cdda2wav (By Heiko Eißfeldt heiko@hexco.de): - -Readcd: - -Scgcheck: - -Scgskeleton: - -Btcflash: - -Mkisofs (By Jörg Schilling and James Pearson j.pearson@ge.ucl.ac.uk): - -- Fixed a bug that could cause mkisofs to core-dump in multi session - mode. Thanks to Fukuhara Kazuhiko <00kazuhiko@bb.excite.co.jp> - for reporting the bug. - -TODO: - - read Joliet filenames with multi-session if no TRANS.TBL - or RR is present. I am looking for a volouteer for this task! - - Note that this can never be 100% correct as there is no relation - between the names on the master (UNIX) filesystem, the ISO-9660 - names and the Joliet names. Only the Rock Ridge names are - untranslated with respect to the original files on the - master (UNIX) filesystem. - - - add libecc/edc for CDI and similar. - - -CYGWIN NT-4.0 NOTES: - -To compile on Cygwin32, get Cygwin and install it. -For more information read README.win32 - -The files are located on: - -ftp://ftp.berlios.de/pub/cdrecord/alpha ... - -NOTE: These tar archives are 100% POSIX compatible. GNU tar may get some - minor trouble. If you like a 100% POSIX compliant tar, get star from - ftp://ftp.berlios.de/pub/star/ - -WARNING: Do not use 'winzip' to extract the tar file! - Winzip cannot extract symbolic links correctly. - -Joerg diff -Nru cdrtools-2.01.01a33/AN-2.01.01a18 cdrtools-3.02a09/AN-2.01.01a18 --- cdrtools-2.01.01a33/AN-2.01.01a18 2006-10-19 11:21:09.000000000 +0000 +++ cdrtools-3.02a09/AN-2.01.01a18 1970-01-01 00:00:00.000000000 +0000 @@ -1,163 +0,0 @@ -Please have a look at the German open Source Center BerliOS at www.berlios.de -BerliOS will continue to support free hosting of cryptography projects even -when US laws change and don't allow to host cryptography projects in the USA. -Also look at sourcewell.berlios.de, the first Open Source announcement service -that itself is implemented as Open Source project. - -***************** Important news **************************** - -For the 'Slottable Source Plugin Module' SSPM Features read README.SSPM - -***************** Please Test ********************************* - -NEW features of cdrtools-2.01.01a18: - -******* -NOTE: this is _not_ a release that starts a new aplha/beta series of - dirtibutions. The only reason is to add certain new CD/DVD features - that are important. - - So _please_ do not send any patches except when you like to fix - extreme bugs. I am currently mainly working on stable incremental - restore featurs for star-1.5-final. - Once star-1.5-final is out, cdrtools will start a new developent cycle. -******* - - -All: - -- Fixed some files that did include instead of - -- Trying to make the floating point printf() support functions work - on systems that implement C99 only with no fallback. - - As this change is a result from a report from a person that does not like - to cooperate, I was not able to test on the reported AIX-5.x platform. - Also note that this change may result in problems on other platforms. - Please test and report! - - -- The Schily Makefilesystem now includes environment definitions - for the Microsoft Studio 8 compiler. If you like to edit these - definitions, check the DEFAULTS directory - -- Next step in supporting Microsoft C-compilers: build in environment - set up for the MS compilers. To compile with the MS C-Compiler, - set up a Cygwin environment and compile a Cygwin 'smake'. - Then use this smake to comile with the MS C-compiler by calling: - - smake CCOM=cl - - This defaults to VC7. If you like to use VC6, call: - - smake CCOM=cl VC=6 - - Note that smake itself (if compiled with "cl") will not work, as - MS does not implement a reliable way to pass a quoted arg vector - to a new program. - - Note that cdrtools do not yet completely compile with MSVC. This - is mostly caused by missing standard comliance in the MS C-compilers. - - -Libparanoia (Ported by Jörg Schilling, originated by Monty xiphmont@mit.edu): - -Libedc (Optimized by Jörg Schilling, originated by Heiko Eißfeldt heiko@hexco.de): - -Libfind: - -Libscg: - -Rscsi: - -Cdrecord: - -- Fixed a bug introduced with 2.01.01a17 that caused cdrecord to complain about - an illegal layer breadk value if called with a single layer DVD and another - driveropts= option. Thanks to Monika Schillling ms@mschilling.com - -Cdda2wav (By Heiko Eißfeldt heiko@hexco.de): - -Readcd: - -Scgcheck: - -Scgskeleton: - -Btcflash: - -Mkisofs (By Jörg Schilling and James Pearson j.pearson@ge.ucl.ac.uk): - -- Implement a new "correct inode number" algorithm for zero length files. - -- Implement a fingerprint that allows to check whether a ISO-9660 file - system image has been created by a new mkisofs and inplements the - new "correct inode number" algorithm. - -- Implementing the new Rock Ridge (rrip) protocol version 1.12 from 1994. - Mkisofs before implemented the old rrip version 1.10 from 1993. - -- New option -rrip110 to disable the "new" 1994 Rock Ridge version. - - This option may be needed if you know of a system that does not deal with - RRip V-1.12. Currently no such system is known. - -- Using better (more portable) values for some special "inode" numbers. - -- Implement correct hard link counts for directories and files with Rock Ridge - -- Mkisofs cannot live without libschily anymore. For this reason, the - #ifdef USE_LIBSCHILY code has been removed. - -- Better & faster hashing: - - - Better hach function in hash.c for more balanced hash tree - - - Number of hash root entries enhanced from 1024 to 16*1024 - - - Avoid string compare in find_file_hash() - -- Corrected check algorithm, for non-zero-length files that are assigned - to a zero extent - -- Avoid uncached entries to clash with real inode numbers. - -- Print correct number of written extents in multi session mode. - -- All ISO-9660 numbers now correctly use the type UInt32_t - -- Convert type of all extent number related variables to UInt32_t - -- Use inode caching by default on newer Cygwin releases that use - 64 bit inode numbers. - -TODO: - - read Joliet filenames with multi-session if no TRANS.TBL - or RR is present. I am looking for a volouteer for this task! - - Note that this can never be 100% correct as there is no relation - between the names on the master (UNIX) filesystem, the ISO-9660 - names and the Joliet names. Only the Rock Ridge names are - untranslated with respect to the original files on the - master (UNIX) filesystem. - - - add libecc/edc for CDI and similar. - - -CYGWIN NT-4.0 NOTES: - -To compile on Cygwin32, get Cygwin and install it. -For more information read README.win32 - -The files are located on: - -ftp://ftp.berlios.de/pub/cdrecord/alpha ... - -NOTE: These tar archives are 100% POSIX compatible. GNU tar may get some - minor trouble. If you like a 100% POSIX compliant tar, get star from - ftp://ftp.berlios.de/pub/star/ - -WARNING: Do not use 'winzip' to extract the tar file! - Winzip cannot extract symbolic links correctly. - -Joerg diff -Nru cdrtools-2.01.01a33/AN-2.01.01a19 cdrtools-3.02a09/AN-2.01.01a19 --- cdrtools-2.01.01a33/AN-2.01.01a19 2006-10-29 13:21:31.000000000 +0000 +++ cdrtools-3.02a09/AN-2.01.01a19 1970-01-01 00:00:00.000000000 +0000 @@ -1,144 +0,0 @@ -Please have a look at the German open Source Center BerliOS at www.berlios.de -BerliOS will continue to support free hosting of cryptography projects even -when US laws change and don't allow to host cryptography projects in the USA. -Also look at sourcewell.berlios.de, the first Open Source announcement service -that itself is implemented as Open Source project. - -***************** Important news **************************** - -For the 'Slottable Source Plugin Module' SSPM Features read README.SSPM - -***************** Please Test ********************************* - -NEW features of cdrtools-2.01.01a19: - -******* -NOTE: this is _not_ a release that starts a new aplha/beta series of - dirtibutions. The only reason is to add certain new CD/DVD features - that are important. - - So _please_ do not send any patches except when you like to fix - extreme bugs. I am currently mainly working on stable incremental - restore featurs for star-1.5-final. - Once star-1.5-final is out, cdrtools will start a new developent cycle. -******* - - -All: - -- A small restructuring of the include file structure: - new file include/schily/xconfig.h - include/schily/xmconfig.h now only contains manual static configuration - for VMS - -- The Makefilesystem now inclucdes links for sparc64 (Fujitsu-Siemens) - -Libschily: - -- Fixed a typo in fconv.c that caused problems on IBM AIX5. - - -Libparanoia (Ported by Jörg Schilling, originated by Monty xiphmont@mit.edu): - -Libedc (Optimized by Jörg Schilling, originated by Heiko Eißfeldt heiko@hexco.de): - -Libfind: - -- -perm now correctly recognises argument parsing errors by - dealing with the fact that mode_t is unsigned. - -Libscg: - -Rscsi: - -Cdrecord: - -- Renamed getdelim() to getworddelim() to avoid a name clash in Cygwin. - - Note that there is still a name clash on Cygwin with getline(). As this - is a hard POSIX violation caused by Cygwin, you need to edit Cygwin's - /usr/include/stdio.h and remove the non-conforming Cygwin getline() - if you like to compile cdrtools. Please also make a bug report against - Cygwin. Tell the Cygwin people that libschily's getline() is compilant - to a commercial interface published since 1982. Cygwin needs to use a - different name if they don't like to follow the official getline() - prototype. - -- The manual layer break code has been modified to deal with the different - GCC behavior with signed/unsigned comparison. - - - -Cdda2wav (By Heiko Eißfeldt heiko@hexco.de): - -- New Option ts= # similar to cdrecord's and readcd's options. - This allows to work around a Linux kernel bug that prevents - cdda2wav to be usable with USB drives. To work around this - Linux bug try cdda2wav ts=128k or less. - - -Readcd: - -Scgcheck: - -Scgskeleton: - -Btcflash: - -Mkisofs (By Jörg Schilling and James Pearson j.pearson@ge.ucl.ac.uk): - -- mkisofs -T & mkisofs -b boot_file now work correctly. - This fixes a bug introduced with 2.01.01a18 - -- Deep directory abortion now happens from the right place, so - mkisofs will allow files but no sub-dirs inside the last - permitted directory nesting level. - -- Mkisofs will now correctly ignore deep directory nesting - in no Rock Ridge mode with mkisofs -find - -- mkisofs -find dir will now correctly deal with Rock Ridge deep - directory relocation. - -- Some small compile problems on Cygwin (caused by a unsigned int - vs. UInt32_t clash) have been fixed. Thanks to Uwe Büdel for reporting. - -- Symlinks now work in mkisofs -find mode too. - -- .. directory in rr_moved now gets the correct mode - -- graft dirs now work even if they cause Rock Ridge deep - directory relocation. - - - -TODO: - - read Joliet filenames with multi-session if no TRANS.TBL - or RR is present. I am looking for a volouteer for this task! - - Note that this can never be 100% correct as there is no relation - between the names on the master (UNIX) filesystem, the ISO-9660 - names and the Joliet names. Only the Rock Ridge names are - untranslated with respect to the original files on the - master (UNIX) filesystem. - - - add libecc/edc for CDI and similar. - - -CYGWIN NT-4.0 NOTES: - -To compile on Cygwin32, get Cygwin and install it. -For more information read README.win32 - -The files are located on: - -ftp://ftp.berlios.de/pub/cdrecord/alpha ... - -NOTE: These tar archives are 100% POSIX compatible. GNU tar may get some - minor trouble. If you like a 100% POSIX compliant tar, get star from - ftp://ftp.berlios.de/pub/star/ - -WARNING: Do not use 'winzip' to extract the tar file! - Winzip cannot extract symbolic links correctly. - -Joerg diff -Nru cdrtools-2.01.01a33/AN-2.01.01a20 cdrtools-3.02a09/AN-2.01.01a20 --- cdrtools-2.01.01a33/AN-2.01.01a20 2006-11-11 20:38:32.000000000 +0000 +++ cdrtools-3.02a09/AN-2.01.01a20 1970-01-01 00:00:00.000000000 +0000 @@ -1,142 +0,0 @@ -Please have a look at the German open Source Center BerliOS at www.berlios.de -BerliOS will continue to support free hosting of cryptography projects even -when US laws change and don't allow to host cryptography projects in the USA. -Also look at sourcewell.berlios.de, the first Open Source announcement service -that itself is implemented as Open Source project. - -***************** Important news **************************** - -For the 'Slottable Source Plugin Module' SSPM Features read README.SSPM - -***************** Please Test ********************************* - -NEW features of cdrtools-2.01.01a20: - -******* -NOTE: this is _not_ a release that starts a new aplha/beta series of - dirtibutions. The only reason is to add certain new CD/DVD features - that are important. - - So _please_ do not send any patches except when you like to fix - extreme bugs. I am currently mainly working on stable incremental - restore featurs for star-1.5-final. - Once star-1.5-final is out, cdrtools will start a new developent cycle. -******* - - -All: - -- Schily includefiles are now installed with "make install". - -- Try to avoid a program execption with a call to access(".", E_OK|F_OK) - caused by a libc bug from the Microsoft C-compiler "cl". - - -Libschily: - -- mem.c moved from libfind to libschily - -Libparanoia (Ported by Jörg Schilling, originated by Monty xiphmont@mit.edu): - -Libedc (Optimized by Jörg Schilling, originated by Heiko Eißfeldt heiko@hexco.de): - -Libfind: - -Libscg: - -- Warn Linux users to prefer dev=ATA: over dev=ATAPI: - -- Print correct error message (using the right errno) in case that - libscg tries to open more than one file on Solaris. - -Rscsi: - -Cdrecord: - -- Cdrecod now default to the write mode "-sao" in case that no write mode - has been specified. Cdrecord -multi continues to default to -tao. - If your drive does not support -sao, or if cdrecord does not support -sao - for your drive, you should now call cdrecod -tao.# - -- If no dev= option has been specified or of dev= only contains a SCSI transport - specifyer but no address, cdrecord now searches the SCSI address space and - if exactly one CD-ROM drive is found, this drive is used. - - Note that this will not work on user unfriendly platforms that do not allow - SCSI address scanning or that do not allow to scan for SCSI drives in a single - address space (like Linux) this new feature does not work. - -The two modifications from above now allow dummies to call "cdrecord iso-image" -in case they are on a user-friendly OS that allows "cdrecord -scanbus" without -any further parameters to find all CD-ROM drives. - -- "cdrecord file file" now works. - -Cdda2wav (By Heiko Eißfeldt heiko@hexco.de): - -- If no dev= option has been specified or of dev= only contains a SCSI transport - specifyer but no address, cdda2wav now searches the SCSI address space and - if exactly one CD-ROM drive is found, this drive is used. - - Note that this will not work on user unfriendly platforms that do not allow - SCSI address scanning or that do not allow to scan for SCSI drives in a single - address space (like Linux) this new feature does not work. - -Readcd: - -- If no dev= option has been specified or of dev= only contains a SCSI transport - specifyer but no address, readcd now searches the SCSI address space and - if exactly one CD-ROM drive is found, this drive is used. - - Note that this will not work on user unfriendly platforms that do not allow - SCSI address scanning or that do not allow to scan for SCSI drives in a single - address space (like Linux) this new feature does not work. - - -Scgcheck: - -Scgskeleton: - -Btcflash: - -Mkisofs (By Jörg Schilling and James Pearson j.pearson@ge.ucl.ac.uk): - -- Print "correct inode" info on stderr in order to avoid problems - from mkisofs | cdrecord in multi session mode. Thanks to a report - from Oliver Valencia. - -- Hide /rr_moved by default. - -- Do not count /rr_moved for the link count of / - - -TODO: - - read Joliet filenames with multi-session if no TRANS.TBL - or RR is present. I am looking for a volouteer for this task! - - Note that this can never be 100% correct as there is no relation - between the names on the master (UNIX) filesystem, the ISO-9660 - names and the Joliet names. Only the Rock Ridge names are - untranslated with respect to the original files on the - master (UNIX) filesystem. - - - add libecc/edc for CDI and similar. - - -CYGWIN NT-4.0 NOTES: - -To compile on Cygwin32, get Cygwin and install it. -For more information read README.win32 - -The files are located on: - -ftp://ftp.berlios.de/pub/cdrecord/alpha ... - -NOTE: These tar archives are 100% POSIX compatible. GNU tar may get some - minor trouble. If you like a 100% POSIX compliant tar, get star from - ftp://ftp.berlios.de/pub/star/ - -WARNING: Do not use 'winzip' to extract the tar file! - Winzip cannot extract symbolic links correctly. - -Joerg diff -Nru cdrtools-2.01.01a33/AN-2.01.01a21 cdrtools-3.02a09/AN-2.01.01a21 --- cdrtools-2.01.01a33/AN-2.01.01a21 2006-11-27 16:16:23.000000000 +0000 +++ cdrtools-3.02a09/AN-2.01.01a21 1970-01-01 00:00:00.000000000 +0000 @@ -1,143 +0,0 @@ -Please have a look at the German open Source Center BerliOS at www.berlios.de -BerliOS will continue to support free hosting of cryptography projects even -when US laws change and don't allow to host cryptography projects in the USA. -Also look at sourcewell.berlios.de, the first Open Source announcement service -that itself is implemented as Open Source project. - -***************** Important news **************************** - -For the 'Slottable Source Plugin Module' SSPM Features read README.SSPM - -***************** Please Test ********************************* - -NEW features of cdrtools-2.01.01a21: - -******* -NOTE: this is _not_ a release that starts a new aplha/beta series of - dirtibutions. The only reason is to add certain new CD/DVD features - that are important. - - So _please_ do not send any patches except when you like to fix - extreme bugs. I am currently mainly working on stable incremental - restore featurs for star-1.5-final. - Once star-1.5-final is out, cdrtools will start a new developent cycle. -******* - - -All: - -- The makefile system now supports the Winsock library - -Libschily: - -Libparanoia (Ported by Jörg Schilling, originated by Monty xiphmont@mit.edu): - -Libedc (Optimized by Jörg Schilling, originated by Heiko Eißfeldt heiko@hexco.de): - -Libfind: - -- Is now quiet on NFSv4 ACLs (ZFS) although it still does not support them. - -Libscg: - -- Bumped libscg version to 0.9 - -- Trying to support FreeBSD Kernel under non-FreeBSD (GNU) userland - -- New interface function scg_numbus() returns the number of SCSI busses. - -- Trying to work around a Linux design problem that has been introduced - about 3 years ago when Linux stopped to support an orthogonal SCSI - Kernel transport for all SCSI devices. Since then, ATAPI drives are - handled different from other SCSI devices. The problem is that - the linux maintainers intentionally reduce the information that - is available in the kernel and this way prevent to allow libscg to - only show only unique drives. - - libscg now tries to map ATAPI drives to SCSI bus numbers >= 1000. - cdrecord -scanbus should now show even ATAPI drives. This allows - cdrecord/readcd/cdda2wav to implement the auto-target feature even - on Linux. - - -Rscsi: - -- New interface function scg_numbus() returns the number of SCSI busses. - This is implemented via the new emote function "N". - -Cdrecord: - -- The messages for the auto-target function are now printed on stderr - to avoid problems with merged output from stdout. - -- The atip information now includes enhanced rzone information - with dual layer values. - -- struct rzone_info now includes the DVD/DL enhancements from MMC - -- print_diskinfo() enhanced for DVD support - -- New option -minfo/-media-info to print Media information/status - - -Cdda2wav (By Heiko Eißfeldt heiko@hexco.de): - -- Trying to support FreeBSD Kernel under non-FreeBSD (GNU) userland - -- The messages for the auto-target function are now printed on stderr - to avoid problems with merged output from stdout. - -Readcd: - -- The messages for the auto-target function are now printed on stderr - to avoid problems with merged output from stdout. - -Scgcheck: - -Scgskeleton: - -Btcflash: - -Mkisofs (By Jörg Schilling and James Pearson j.pearson@ge.ucl.ac.uk): - -- Trying to support FreeBSD Kernel under non-FreeBSD (GNU) userland - -- Now correctly default to "mac-roman" coding with Apple HFS. - -- Trying to better support correct graft-point handling after - 2.01.01a20 is the first release that correctly handles the vanilla case - Thanks to a hint from Udo Büdel - -- Trying to better handle overlapping directory names. - Thanks to a hint from Thomas Flock - -TODO: - - read Joliet filenames with multi-session if no TRANS.TBL - or RR is present. I am looking for a volouteer for this task! - - Note that this can never be 100% correct as there is no relation - between the names on the master (UNIX) filesystem, the ISO-9660 - names and the Joliet names. Only the Rock Ridge names are - untranslated with respect to the original files on the - master (UNIX) filesystem. - - - add libecc/edc for CDI and similar. - - -CYGWIN NT-4.0 NOTES: - -To compile on Cygwin32, get Cygwin and install it. -For more information read README.win32 - -The files are located on: - -ftp://ftp.berlios.de/pub/cdrecord/alpha ... - -NOTE: These tar archives are 100% POSIX compatible. GNU tar may get some - minor trouble. If you like a 100% POSIX compliant tar, get star from - ftp://ftp.berlios.de/pub/star/ - -WARNING: Do not use 'winzip' to extract the tar file! - Winzip cannot extract symbolic links correctly. - -Joerg diff -Nru cdrtools-2.01.01a33/AN-2.01.01a22 cdrtools-3.02a09/AN-2.01.01a22 --- cdrtools-2.01.01a33/AN-2.01.01a22 2006-12-03 19:13:13.000000000 +0000 +++ cdrtools-3.02a09/AN-2.01.01a22 1970-01-01 00:00:00.000000000 +0000 @@ -1,128 +0,0 @@ -Please have a look at the German open Source Center BerliOS at www.berlios.de -BerliOS will continue to support free hosting of cryptography projects even -when US laws change and don't allow to host cryptography projects in the USA. -Also look at sourcewell.berlios.de, the first Open Source announcement service -that itself is implemented as Open Source project. - -***************** Important news **************************** - -For the 'Slottable Source Plugin Module' SSPM Features read README.SSPM - -***************** Please Test ********************************* - -NEW features of cdrtools-2.01.01a22: - -******* -NOTE: this is _not_ a release that starts a new aplha/beta series of - dirtibutions. The only reason is to add certain new CD/DVD features - that are important. - - So _please_ do not send any patches except when you like to fix - extreme bugs. I am currently mainly working on stable incremental - restore featurs for star-1.5-final. - Once star-1.5-final is out, cdrtools will start a new developent cycle. -******* - - -All: - -- Correctly cast all open(name, oflag, 0666) calls to: - open(name, oflag, (mode_t)0666) as open is a vararg function. - -Libschily: - -Libparanoia (Ported/enhanced by Jörg Schilling, originated by Monty xiphmont@mit.edu): - -Libedc (Optimized by Jörg Schilling, originated by Heiko Eißfeldt heiko@hexco.de): - -Libfind: - -Libscg: - -- Try to deal with broken Linux distributions that do not provide a "HZ" macro - in /usr/include/sys/param.h - -- Use USER_HZ in favor of HZ (if available) for computing SCSI timeout values. - -- Disable automatic ATA (dev(hd*) integration and scan on pre-Linux-2.6 systems. - -- Try to skip non-POSIX compliant EROFS error codes when opening /dev/hd* - -Rscsi: - -Cdrecord: - -- prdiskstatus() which is supporting cdrecord -minfo is now a globally implemented - function. - -- cdrecord -minfo extended to print TOC related media info. - The new option -minfo is now almost complete. - -- cdrecord -scanbus now defaults to scan 1024 SCSI busses in case that the "numbus" - function is not yet available on a remote RSCSI server. - -- Make cdrecord -msinfo print the right values for "multi-session" (multi-border) - DVD-R and DVD+R. - -- cdrecord -atip output for DVD media enhanced and updated for DVD+R/DL & HD-DVD - -Cdda2wav (Maintained/enhanced by Jörg Schilling, originated by Heiko Eißfeldt heiko@hexco.de): - -- cdda2wav -scanbus now defaults to scan 1024 SCSI busses in case that the "numbus" - function is not yet available on a remote RSCSI server. - -Readcd: - -- readcd -scanbus now defaults to scan 1024 SCSI busses in case that the "numbus" - function is not yet available on a remote RSCSI server. - - -Scgcheck: - -Scgskeleton: - -Btcflash: - -Mkisofs (By Jörg Schilling and James Pearson j.pearson@ge.ucl.ac.uk): - -- New options -posix-H/-posix-L/-posix-P implement the -H/-L/-P options - defined by POSIX.1-2001 for descending commands like ls/chmod/chown/find/pax/... - - Future versions of mkisofs will implement these options under their original - names -H/-L/-P. The current version of mkisofs cannot implement them as - previous versions did implement different functionality with -H and -P. - -- mkisofs called without any parameters or called with an illegal option - now prints a short overview of the most important options in 80x24 chars. - - -TODO: - - read Joliet filenames with multi-session if no TRANS.TBL - or RR is present. I am looking for a volouteer for this task! - - Note that this can never be 100% correct as there is no relation - between the names on the master (UNIX) filesystem, the ISO-9660 - names and the Joliet names. Only the Rock Ridge names are - untranslated with respect to the original files on the - master (UNIX) filesystem. - - - add libecc/edc for CDI and similar. - - -CYGWIN NT-4.0 NOTES: - -To compile on Cygwin32, get Cygwin and install it. -For more information read README.win32 - -The files are located on: - -ftp://ftp.berlios.de/pub/cdrecord/alpha ... - -NOTE: These tar archives are 100% POSIX compatible. GNU tar may get some - minor trouble. If you like a 100% POSIX compliant tar, get star from - ftp://ftp.berlios.de/pub/star/ - -WARNING: Do not use 'winzip' to extract the tar file! - Winzip cannot extract symbolic links correctly. - -Joerg diff -Nru cdrtools-2.01.01a33/AN-2.01.01a23 cdrtools-3.02a09/AN-2.01.01a23 --- cdrtools-2.01.01a33/AN-2.01.01a23 2006-12-18 00:21:29.000000000 +0000 +++ cdrtools-3.02a09/AN-2.01.01a23 1970-01-01 00:00:00.000000000 +0000 @@ -1,116 +0,0 @@ -Please have a look at the German open Source Center BerliOS at www.berlios.de -BerliOS will continue to support free hosting of cryptography projects even -when US laws change and don't allow to host cryptography projects in the USA. -Also look at sourcewell.berlios.de, the first Open Source announcement service -that itself is implemented as Open Source project. - -***************** Important news **************************** - -For the 'Slottable Source Plugin Module' SSPM Features read README.SSPM - -***************** Please Test ********************************* - -NEW features of cdrtools-2.01.01a23: - -******* -NOTE: this is _not_ a release that starts a new aplha/beta series of - dirtibutions. The only reason is to add certain new CD/DVD features - that are important. - - So _please_ do not send any patches except when you like to fix - extreme bugs. I am currently mainly working on stable incremental - restore featurs for star-1.5-final. - Once star-1.5-final is out, cdrtools will start a new developent cycle. -******* - - -All: - -- "libvms" new from Steven M. Schweda sms@antinode.org - -Libschily: - -Libparanoia (Ported/enhanced by Jörg Schilling, originated by Monty xiphmont@mit.edu): - -Libedc (Optimized by Jörg Schilling, originated by Heiko Eißfeldt heiko@hexco.de): - -Libfind: - -Libscg: - -- Trying to implement a workaround for a Linux USB DMA size problem by implementing - support for a new ioctl proposal from Alan Stern - - UPDATE: It seems that the final fix in the Linux kernel will take some time - and will be incompatible to the current patch. For this reason, I decided to - make the intermediate patch available at: - ftp://ftp.berlios.de/pub/cdrecord/alpha/Linux-USB-DMA-Size.patch - - -Rscsi: - -Cdrecord: - -- Enhanced CUE sheet parser to allow writing the new Zeta CD from - http://www.zeta-os.com/cms/custom/lcd/indexe.php - -- Supporting -raw/-raw16/-raw96r in CUE sheet mode (with cuefile=). - Please test and report as I am not able to test all possible cases. - - As it seems that this new mode works now properly, it it possible - to write SVCDs on Pioneer writers that refuse to write SVCDs in -sao mode - because Pioneer implements a silly internal memory mamagement that - reserves memory for 99 tracks with not more than 2 indices each. - - In RAW mode, cdrecord takes care of subchannel data and is able to work - around this deficit in Pioneer drives. - -- Correctly reset CDRWIN CUE sheet state at the beginning of a new track - -- Added some small changes to help compiling on VMS - -Cdda2wav (Maintained/enhanced by Jörg Schilling, originated by Heiko Eißfeldt heiko@hexco.de): - -- Added some small changes to help compiling on VMS - - -Readcd: - -Scgcheck: - -Scgskeleton: - -Btcflash: - -Mkisofs (By Jörg Schilling and James Pearson j.pearson@ge.ucl.ac.uk): - -TODO: - - read Joliet filenames with multi-session if no TRANS.TBL - or RR is present. I am looking for a volouteer for this task! - - Note that this can never be 100% correct as there is no relation - between the names on the master (UNIX) filesystem, the ISO-9660 - names and the Joliet names. Only the Rock Ridge names are - untranslated with respect to the original files on the - master (UNIX) filesystem. - - - add libecc/edc for CDI and similar. - - -CYGWIN NT-4.0 NOTES: - -To compile on Cygwin32, get Cygwin and install it. -For more information read README.win32 - -The files are located on: - -ftp://ftp.berlios.de/pub/cdrecord/alpha ... - -NOTE: These tar archives are 100% POSIX compatible. GNU tar may get some - minor trouble. If you like a 100% POSIX compliant tar, get star from - ftp://ftp.berlios.de/pub/star/ - -WARNING: Do not use 'winzip' to extract the tar file! - Winzip cannot extract symbolic links correctly. - -Joerg diff -Nru cdrtools-2.01.01a33/AN-2.01.01a24 cdrtools-3.02a09/AN-2.01.01a24 --- cdrtools-2.01.01a33/AN-2.01.01a24 2007-03-11 12:05:28.000000000 +0000 +++ cdrtools-3.02a09/AN-2.01.01a24 1970-01-01 00:00:00.000000000 +0000 @@ -1,247 +0,0 @@ -Please have a look at the German open Source Center BerliOS at www.berlios.de -BerliOS will continue to support free hosting of cryptography projects even -when US laws change and don't allow to host cryptography projects in the USA. -Also look at sourcewell.berlios.de, the first Open Source announcement service -that itself is implemented as Open Source project. - -***************** Important news **************************** - -For the 'Slottable Source Plugin Module' SSPM Features read README.SSPM - -***************** Please Test ********************************* - -NEW features of cdrtools-2.01.01a24: - -******* -NOTE: this is _not_ a release that starts a new aplha/beta series of - distibutions. The only reason is to add certain new CD/DVD features - that are important. - - So _please_ do not send any patches except when you like to fix - extreme bugs. I am currently mainly working on stable incremental - restore featurs for star-1.5-final. - Once star-1.5-final is out, cdrtools will start a new developent cycle. -******* - - -All: - -- -I. removed from standard c-compiler include path - -- /usr/src/linux/include is no longer included if it contains - broken include files. - - Please send a bug report to the Linux Kernel maintainers in case - that the makefile system reports broken Linux kernel include files. - -- Support for WIN-NT-5.2 (MS-Windows 2003) added to the makefile system - -- No longer using -ztext linker option for creating shared libs with GCC - as GCC does not create 100% correct binaries and this would abort - the process of creating a shared library. - -- Better setup for the environment variables that are needed for the - Microsoft "cl" compiler. - - NOTE: The current setup is for "english" versions of MS-WIN. - You may need to edit the files DEFAULTS/vc6-setup or DEFAULTS/vc7-setup - depending on your locale version and the "c"-compiler version you - are using. - -- Prevent MSVC ("cl") from creating silly messages - like: "... Consider using strerror_s instead." - -- Prevent MSVC ("cl") from complaining about deprecated - option "-ofilename" - -- New autoconf tests for POSIX compliant time functions in libc - -- GCC Warning setup no longer includes -Wtraditional - -- Dynamic libraries are now supported for Mac OS X - -- smake CCOM=xx will now result in writing DEFCCOM=xx into incs/Dcc. - if this is done on the initial make run. - conf/cc-config.sh now has one additional parameter - -- Include $(DEFLTSROOT)/$(DEFLTSDIR)/$(VCSETUP) from - DEFAULTS/Defaults.cygwin32_nt already to allow the script - conf/cc-config.sh to detect that "cl" is working. - -- DEFAULTS/vc7-setup & DEFAULTS/vc6-setup now set - .NOWARN: := to tell smake-1.2a41 or newer not to warn - about a nonportable assignment (we do - not have a UNIX "make" in Cygwin). - -- smake COPTX=-DNO_LARGEFILES now allows to compile in non-largefile mode - -- New targets "html" and "htmlx" for Manual page makefiles - allows to convert man pages using "man2html" - -- New include file schily/wchar.h - -- New include file schily/schilyp.h - -- Typo in schily/param.h fixed - -- schily/jmpdefs.h now includes support for sigsetjmp() - -- configure now checks for ctime cftime ascftime strftime and - for libresolv and whether /bin/sh is bash - -- remove libxxx.so link before trying to create it - -- Allow a mixture of static and dynamic libraries to link against - a program - - -Libschily: - -- getnum()/getllnum() & gettnum()/getlltnum() have been moved to libschily - -- printf()/fprintf()/sprintf()/snprintf() have been removed from libschily - we now use js_*printf() instead via -DSCHILY_PRINT - -- Workaround for a Mac OS X linker bug - -- New set of functions: __jmalloc()/__jrealloc()/__jsavestr() - -- New set of functions: __fjmalloc()/__fjrealloc()/__fjsavestr() - -- New set of functions: fcomerr()/fcomerrno()/ferrmsg()/ferrmsgno() - -- getargs() now allows '+' to appear in longopt= - - -Libparanoia (Ported/enhanced by Jörg Schilling, originated by Monty xiphmont@mit.edu): - -- paranoia_init() interface change to work around a deficit - in the Mac OS X linker. - -Libedc (Optimized by Jörg Schilling, originated by Heiko Eißfeldt heiko@hexco.de): - -Libfind: - -- getnum()/getllnum() & gettnum()/getlltnum() have been moved to libschily - -- Using js_*printf() instead of *printf() via -DSCHILY_PRINT - -- Avoid a core dump caused by probably uninitialized data - when using -exec ... {} + - -- Workaround for a Mac OS X linker bug - -- find_parser() now does no longer call exit() on errors. - -- New funtion b_find(int argc, char ** argv, vound * dummmy) - implements the ksh93 builtin function interface - -- b_find() sets the flag WALK_NOEXIT for treewalk to make sure that - the complete find implementation does not call exit() anymore. - -- new function walkinitstate() - -Libfile: - -- Workaround for a Mac OS X linker bug - -- Using js_*printf() instead of *printf() via -DSCHILY_PRINT - -Libhfs_iso: - -- Workaround for a Mac OS X linker bug - -Libscg: - -- Using js_*printf() instead of *printf() via -DSCHILY_PRINT - -- add the new scg_numbus() to the Solaris linker map file - to allow again dynamic linking - -Rscsi: - -Cdrecord: - -- getnum -> libschily - -- Using js_*printf() instead of *printf() via -DSCHILY_PRINT - -- Some %d -> %u changes in printf() formats. - -- Fixed MMC-4 Profile 0x14 name to "DVD-RW sequential recording" - -Cdda2wav (Maintained/enhanced by Jörg Schilling, originated by Heiko Eißfeldt heiko@hexco.de): - -- getnum -> libschily - -- Using js_*printf() instead of *printf() via -DSCHILY_PRINT - -- Use the new paranoia_init() interface - -Readcd: - -- Using js_*printf() instead of *printf() via -DSCHILY_PRINT - -Scgcheck: - -- Using js_*printf() instead of *printf() via -DSCHILY_PRINT - -Scgskeleton: - -- Using js_*printf() instead of *printf() via -DSCHILY_PRINT - -Btcflash: - -- Using js_*printf() instead of *printf() via -DSCHILY_PRINT - -Mkisofs (By Jörg Schilling and James Pearson j.pearson@ge.ucl.ac.uk): - -- The option -stream-file-name has been implemented to allow - setting a user defined file name with -stream-media-size - When using -stream-file-name, mkisofs always uses "-iso-level 4" - -- A bug has been fixed, that caused mkisofs to archive a wrong - time zone offset in case that it was used on a timezone east - to GMT and the local time was already in e.g. Y-2007 while - GMT was still at Y-2006. - -- Several printf format changes from %d -> %u to reflect the changes - that recently made the blocknumber related variables unsigned. - -- Some small typo corrections in the man page - -- getnum()/getllnum() & gettnum()/getlltnum() have been moved to libschily - -- Using js_*printf() instead of *printf() via -DSCHILY_PRINT - - -TODO: - - read Joliet filenames with multi-session if no TRANS.TBL - or RR is present. I am looking for a volunteer for this task! - - Note that this can never be 100% correct as there is no relation - between the names on the master (UNIX) filesystem, the ISO-9660 - names and the Joliet names. Only the Rock Ridge names are - untranslated with respect to the original files on the - master (UNIX) filesystem. - - - add libecc/edc for CDI and similar. - - -CYGWIN NT-4.0 NOTES: - -To compile on Cygwin32, get Cygwin and install it. -For more information read README.win32 - -The files are located on: - -ftp://ftp.berlios.de/pub/cdrecord/alpha ... - -NOTE: These tar archives are 100% POSIX compatible. GNU tar may get some - minor trouble. If you like a 100% POSIX compliant tar, get star from - ftp://ftp.berlios.de/pub/star/ - -WARNING: Do not use 'winzip' to extract the tar file! - Winzip cannot extract symbolic links correctly. - -Joerg diff -Nru cdrtools-2.01.01a33/AN-2.01.01a25 cdrtools-3.02a09/AN-2.01.01a25 --- cdrtools-2.01.01a33/AN-2.01.01a25 2007-04-04 13:10:00.000000000 +0000 +++ cdrtools-3.02a09/AN-2.01.01a25 1970-01-01 00:00:00.000000000 +0000 @@ -1,130 +0,0 @@ -Please have a look at the German open Source Center BerliOS at www.berlios.de -BerliOS will continue to support free hosting of cryptography projects even -when US laws change and don't allow to host cryptography projects in the USA. -Also look at sourcewell.berlios.de, the first Open Source announcement service -that itself is implemented as Open Source project. - -***************** Important news **************************** - -For the 'Slottable Source Plugin Module' SSPM Features read README.SSPM - -***************** Please Test ********************************* - -NEW features of cdrtools-2.01.01a25: - -******* -NOTE: this is _not_ a release that starts a new aplha/beta series of - distibutions. The only reason is to add certain new CD/DVD features - that are important. - - So _please_ do not send any patches except when you like to fix - extreme bugs. I am currently mainly working on stable incremental - restore featurs for star-1.5-final. - Once star-1.5-final is out, cdrtools will start a new developent cycle. -******* - - -All: - -Libschily: - -- __fjmalloc()/__jmalloc() now allow to specify JM_EXIT to exit() instead - of callinf siglongjmp() - -- New function file_getraise() to get the current file raise value. - - -Libparanoia (Ported/enhanced by Jörg Schilling, originated by Monty xiphmont@mit.edu): - -Libedc (Optimized by Jörg Schilling, originated by Heiko Eißfeldt heiko@hexco.de): - -Libfind: - -- Libfind is now close from the final state - -- Added README file to the directory libfind/ that help to learn how - to create a complete find(1) command, a "bsh" find builtin and a - ksh93 find builtin using libfind. - -- Libfind Version is now 1.3 - -- libfind has been restructured to allow it to be used as builtin function - inside shells like e.g. "bsh" and "ksh93". - -- libfind now allows I/O redirection (needed for shell builtins). - -- libfind now may be told to check for abort situations (needed for - shell builtins in order to check for abort on ^C). - -- New function find_free() - -- Libfind no longer leaks memory if called with a commandline with - syntax errors. - - -Libfile: - -Libhfs_iso: - -Libscg: - -- scg_numbus() function for FreeBSD corrected to make cdrtools work again. - Thanks to a hint from Joseph Terner - -Rscsi: - -Cdrecord: - -- A typo in the man page has been fixed (mkisofs does not have a -q but - a -quiet option). - -- A debug message in the DVD+ driver hav been updated to make cdrecord - again compile in -DDEBUG mode. - - -Cdda2wav (Maintained/enhanced by Jörg Schilling, originated by Heiko Eißfeldt heiko@hexco.de): - -- Fixed a bug that caused cdda2wav to hang when retrieving the CDDB information. - This bug has been introduced with cdrtools-2.01.01a21 - - -Readcd: - -Scgcheck: - -Scgskeleton: - -Btcflash: - -Mkisofs (By Jörg Schilling and James Pearson j.pearson@ge.ucl.ac.uk): - -TODO: - - read Joliet filenames with multi-session if no TRANS.TBL - or RR is present. I am looking for a volunteer for this task! - - Note that this can never be 100% correct as there is no relation - between the names on the master (UNIX) filesystem, the ISO-9660 - names and the Joliet names. Only the Rock Ridge names are - untranslated with respect to the original files on the - master (UNIX) filesystem. - - - add libecc/edc for CDI and similar. - - -CYGWIN NT-4.0 NOTES: - -To compile on Cygwin32, get Cygwin and install it. -For more information read README.win32 - -The files are located on: - -ftp://ftp.berlios.de/pub/cdrecord/alpha ... - -NOTE: These tar archives are 100% POSIX compatible. GNU tar may get some - minor trouble. If you like a 100% POSIX compliant tar, get star from - ftp://ftp.berlios.de/pub/star/ - -WARNING: Do not use 'winzip' to extract the tar file! - Winzip cannot extract symbolic links correctly. - -Joerg diff -Nru cdrtools-2.01.01a33/AN-2.01.01a26 cdrtools-3.02a09/AN-2.01.01a26 --- cdrtools-2.01.01a33/AN-2.01.01a26 2007-04-24 20:17:08.000000000 +0000 +++ cdrtools-3.02a09/AN-2.01.01a26 1970-01-01 00:00:00.000000000 +0000 @@ -1,141 +0,0 @@ -Please have a look at the German open Source Center BerliOS at www.berlios.de -BerliOS will continue to support free hosting of cryptography projects even -when US laws change and don't allow to host cryptography projects in the USA. -Also look at sourcewell.berlios.de, the first Open Source announcement service -that itself is implemented as Open Source project. - -***************** Important news **************************** - -For the 'Slottable Source Plugin Module' SSPM Features read README.SSPM - -***************** Please Test ********************************* - -NEW features of cdrtools-2.01.01a26: - -******* -NOTE: this is _not_ a release that starts a new aplha/beta series of - distibutions. The only reason is to add certain new CD/DVD features - that are important. - - So _please_ do not send any patches except when you like to fix - extreme bugs. I am currently mainly working on stable incremental - restore featurs for star-1.5-final. - Once star-1.5-final is out, cdrtools will start a new developent cycle. -******* - - -All: - -- Now using cdrecord/version.h for the global version number - -- New autoconf test for struct timeval in sys/time.h - -- New autoconf test for struct timezone in sys/time.h - -- Changed include/schily/time.h to depend on the - new autoconf #defines HAVE_STRUCT_TIMEVAL and - HAVE_STRUCT_TIMEZONE - -- The Schily makefile system is now also passing OS - specific #defines to "configure". - -- New Schily makefile system Target shell allows to - call "make shell" in order to get a shell with exactly - the same environment as the compilers will see from - the makefile system. This helps testing. - -- New autoconf test checks whether we need to call - "xx.exe" on a plaform. This is needed in order to - be able to call the Microsoft compiler from the - SFU (Services for UNIX) environment. - -- It is now possible to call the Microsoft compiler - from SFU. In order to do this, call "smake CCOM=cl" - - If this does not work, you may need to change the - file DEFAULTS/vc7-interix-setup - -Libschily: - - -Libparanoia (Ported/enhanced by Jörg Schilling, originated by Monty xiphmont@mit.edu): - -- Fixed a typo in paranoia_init() that gas been introduced with 2.01.01a24 - This bug did cause a core dump. - Thanks to Robert Grimm for reporting. - - -Libedc (Optimized by Jörg Schilling, originated by Heiko Eißfeldt heiko@hexco.de): - -Libfind: - -- Fixed a bug in names.c that caused nameinit() to go into an endless - recursion and dump core if there is no "nobody" in /etc/passwd. - This bug has been introduced recently. - - -Libfile: - -Libhfs_iso: - -Libscg: - -Rscsi: - -Cdrecord: - -- Trying to work around a Pioneer firmware bug that causes cdrecord to write - DVDs at lowest speed. - -- Reset SCSI silent mode after cdrecord did use the auto-mode (no dev= parameter) - to find the drive. This again gives visible error messages. - - -Cdda2wav (Maintained/enhanced by Jörg Schilling, originated by Heiko Eißfeldt heiko@hexco.de): - -Readcd: - -Scgcheck: - -Scgskeleton: - -Btcflash: - -Mkisofs (By Jörg Schilling and James Pearson j.pearson@ge.ucl.ac.uk): - -- added a better error message from Helios in volume.c - -- The timezone bug (first fixed in 2.01.01a24 has now been fixed - correctly and works even if the timezone is located east to GMT. - - -TODO: - - read Joliet filenames with multi-session if no TRANS.TBL - or RR is present. I am looking for a volunteer for this task! - - Note that this can never be 100% correct as there is no relation - between the names on the master (UNIX) filesystem, the ISO-9660 - names and the Joliet names. Only the Rock Ridge names are - untranslated with respect to the original files on the - master (UNIX) filesystem. - - - add libecc/edc for CDI and similar. - - -CYGWIN NT-4.0 NOTES: - -To compile on Cygwin32, get Cygwin and install it. -For more information read README.win32 - -The files are located on: - -ftp://ftp.berlios.de/pub/cdrecord/alpha ... - -NOTE: These tar archives are 100% POSIX compatible. GNU tar may get some - minor trouble. If you like a 100% POSIX compliant tar, get star from - ftp://ftp.berlios.de/pub/star/ - -WARNING: Do not use 'winzip' to extract the tar file! - Winzip cannot extract symbolic links correctly. - -Joerg diff -Nru cdrtools-2.01.01a33/AN-2.01.01a27 cdrtools-3.02a09/AN-2.01.01a27 --- cdrtools-2.01.01a33/AN-2.01.01a27 2007-05-23 14:24:45.000000000 +0000 +++ cdrtools-3.02a09/AN-2.01.01a27 1970-01-01 00:00:00.000000000 +0000 @@ -1,146 +0,0 @@ -Please have a look at the German open Source Center BerliOS at www.berlios.de -BerliOS will continue to support free hosting of cryptography projects even -when US laws change and don't allow to host cryptography projects in the USA. -Also look at sourcewell.berlios.de, the first Open Source announcement service -that itself is implemented as Open Source project. - -***************** Important news **************************** - -For the 'Slottable Source Plugin Module' SSPM Features read README.SSPM - -***************** Please Test ********************************* - -NEW features of cdrtools-2.01.01a27: - -******* -NOTE: this is _not_ a release that starts a new aplha/beta series of - distibutions. The only reason is to add certain new CD/DVD features - that are important. - - So _please_ do not send any patches except when you like to fix - extreme bugs. I am currently mainly working on stable incremental - restore featurs for star-1.5-final. - Once star-1.5-final is out, cdrtools will start a new developent cycle. -******* - - -All: - -- Added forgotten file RULES/x86-interix-cl.rul to the Schily Makefilesystem - -- Trying to better deal with MS winsock2.h oddities in schily/time.h - -- #undef iswalnum ... in schily//wchar.h before defining non wchar fallbacks. - -- config.guess now knows about i386 Darwin (Mac OS X on Intel) - -- Schily makefilesystem enhanced to check for extended - fields in struct utsname as seen e.g. in MS SFU (Interix). - -- New predefined macro OSVERSION in the makefilesystem is needed - for SCO OpenServer 6.x support (because this uses a UnixWare - kernel - -- Trying to support Compilation on SCO OpenServer 6.x - -- New macro $(CC_OUTPUT_FILTER) allows to filter away the - unwanted file name echo from cl.exe. - -- Interix now uses uname -m instead of uname -p for $(OARCH) - -- Makefile support for pentium-4-unixware-cc.rul and - pentium-4-unixware-gcc.rul was added. - -- New autoconf test for libiconv - -- The Schily makefilesystem now by default searches in /usr/local/include - and /usr/local/lib if on FreeBSD. This is needed in order to find - libintl and libiconv. - -- make html and make htmlx now works even on the top level directory - and creates html versions of the man pages - -- fixed a typo in the autoconf test for C99 isinf/isnan - -Libschily: - - -Libparanoia (Ported/enhanced by Jörg Schilling, originated by Monty xiphmont@mit.edu): - - -Libedc (Optimized by Jörg Schilling, originated by Heiko Eißfeldt heiko@hexco.de): - -Libfind: - -- find_list.c now #ifdefs names like S_IFLNK - -Libfile: - -- Better portability for strerror() in file.h - -Libhfs_iso: - -Libscg: - -- Better help message for Mac OS X wich dev=help - -Rscsi: - -Cdrecord: - -- Cdrecord now correctly reports Copyright ...2007 with -version - -- Let cdrecord check the available transfer size for more SCSI - commands. - -Cdda2wav (Maintained/enhanced by Jörg Schilling, originated by Heiko Eißfeldt heiko@hexco.de): - -- Let cdda2wav print the -version outout to stdout and in a similar form - as other cdrtools programs. - -Readcd: - -Scgcheck: - -Scgskeleton: - -Btcflash: - -- Make btcflash compile on K&R compilers (like on HP-UX) - -Mkisofs (By Jörg Schilling and James Pearson j.pearson@ge.ucl.ac.uk): - -- mkisofs -J no longer implies -l as done incorrectly after - converting from GNU getopt_long() to getargs() - - -TODO: - - read Joliet filenames with multi-session if no TRANS.TBL - or RR is present. I am looking for a volunteer for this task! - - Note that this can never be 100% correct as there is no relation - between the names on the master (UNIX) filesystem, the ISO-9660 - names and the Joliet names. Only the Rock Ridge names are - untranslated with respect to the original files on the - master (UNIX) filesystem. - - - add libecc/edc for CDI and similar. - - -CYGWIN NT-4.0 NOTES: - -To compile on Cygwin32, get Cygwin and install it. -For more information read README.win32 - -The files are located on: - -ftp://ftp.berlios.de/pub/cdrecord/alpha ... - -NOTE: These tar archives are 100% POSIX compatible. GNU tar may get some - minor trouble. If you like a 100% POSIX compliant tar, get star from - ftp://ftp.berlios.de/pub/star/ - -WARNING: Do not use 'winzip' to extract the tar file! - Winzip cannot extract symbolic links correctly. - -Joerg diff -Nru cdrtools-2.01.01a33/AN-2.01.01a28 cdrtools-3.02a09/AN-2.01.01a28 --- cdrtools-2.01.01a33/AN-2.01.01a28 2007-06-24 22:35:43.000000000 +0000 +++ cdrtools-3.02a09/AN-2.01.01a28 1970-01-01 00:00:00.000000000 +0000 @@ -1,293 +0,0 @@ -Please have a look at the German open Source Center BerliOS at www.berlios.de -BerliOS will continue to support free hosting of cryptography projects even -when US laws change and don't allow to host cryptography projects in the USA. -Also look at sourcewell.berlios.de, the first Open Source announcement service -that itself is implemented as Open Source project. - -***************** Important news **************************** - -For the 'Slottable Source Plugin Module' SSPM Features read README.SSPM - -***************** Please Test ********************************* - -NEW features of cdrtools-2.01.01a28: - ----------> -******** WARNING! This is a release that introduces _massive_ changes -******** in mkisofs. These changes are not yet and cannot yet be complete -******** and are definitely not tested sufficiently already. -******** If you like to test the recent massive mkisofs enhencements, you -******** are welcome! If you lik a "stable" version, ise mkisofs from -******** Cdrtools-2.01.01a27 -<-------- - -******* -NOTE: this is _not_ a release that starts a new aplha/beta series of - distibutions. The only reason is to add certain new CD/DVD features - that are important. - - So _please_ do not send any patches except when you like to fix - extreme bugs. I am currently mainly working on stable incremental - restore featurs for star-1.5-final. - Once star-1.5-final is out, cdrtools will start a new developent cycle. -******* - - -All: - -- Support for SunStudio 12 on Linux was added. - Call "make CCOM=suncc", but note that you then - will not be able to compile Linux specific functions like - support for ext2 file flags. This does not work because the - related include files are not written in clean C. - - Note that nearly all programs from cdrtools depend on libscg - which uses platform speficic code for every OS. As the Linux - kernel include files are not written in clean C, you cannot - compile libscg using Sun Studio. If someone from the Linux kernel - team would rewrite the Linux kernel include files to only use clean - C based constructs, cdrecord could be compiled with Sun Studio - compilers. - -- Added a workaround to config.guess to get correct - platform names from "configure" even thogh suncc - does not #define __ELF__ - -- Linux specific autoconf tests are not only executed on Linux - based platforms - -- Some make rule definitions for Cygwin restructured to allow - compilation with more Cygwin releases. The -D_WIN32_WINNT= - definitions are now only in effect if the selected compiler - is the Microsoft compiler. - -- New include file schily/ioctl.h - - -- Added Support to create Blastwave SVr4 packages. - To create a Blastwave package, call: - - .clean - smake -f Mcsw - - You need the program "fakeroot" and will find the results - in packages/ - - Note that this source tree will allow you to create the package - CSWcdrtools but not the packages CSWschilybase and CSWschilyutils - on which CSWcdrtools depends. - - WARNING: libsiconv.a and it's character translation tables (located in - /opt/*/lib/siconv) are not part of CSWcdrtools but of CSWschilybase. - If you do not update CSWschilybase to include the character translation - tables used by libsiconv, mkisofs will not work correctly. - - NOTE: the SVr4 package specific rules are approx. 10 lines of make rules. - It should be simple to create rule definitions for other package systems - found on platforms other than Solaris. Volunteers who like to help - to deveop support for other packaging systems are welcome! - - -Libschily: - - -Libparanoia (Ported/enhanced by Jörg Schilling, originated by Monty xiphmont@mit.edu): - -- "make install" now also installs the READMEs and other docukmentation to - ..../share/doc/libparanoia/ - - -Libedc (Optimized by Jörg Schilling, originated by Heiko Eißfeldt heiko@hexco.de): - -Libfind: - -Libfile: - -Libhfs_iso: - -Libsiconv: - -- New library libsiconv replaces libunls. - Libsiconv saves ~ 130 kB of executable space in mkisofs and allows to use - iconv() if it is present on the current polatform. - -Libscg: - -Rscsi: - -- "make install" now also installs the READMEs and other docukmentation to - ..../share/doc/rscsi/ - -Cdrecord: - -- "make install" now also installs the READMEs and other docukmentation to - ..../share/doc/cdrecord/ - -- New function verify() in high level code. - -Cdda2wav (Maintained/enhanced by Jörg Schilling, originated by Heiko Eißfeldt heiko@hexco.de): - -- "make install" now also installs the READMEs and other docukmentation to - ..../share/doc/cdda2wav/ - -Readcd: - -Scgcheck: - -Scgskeleton: - -- New merged code from the "sformat" and "cdrecord" consolidation. - -- Bumped to version 1.2 - -Btcflash: - -Mkisofs (Maintained/enhanced by Jörg Schilling since 1997, originated my Eric Youngdale): - -- "make install" now also installs the READMEs and other docukmentation to - ..../share/doc/mkisofs/ - -- The change from libunls to libsiconv fixes a lot of bugs in the - character translation tables. libsiconv now uses the official tables - from Unicode.org. Any other "single char" -> UNICODE table from - Unicode.org may be taken unmodified and copied to /opt/schily/lib/libsiconv - to become usable by libsiconv. - - If you use the same character set names as with old mkisofs, you get - the character translations from the tables in /opt/schily/lib/libsiconv, - if you use ICONV based locale names and iconv() is available on your - platform, then mkisofs used iconv() to translate the character encodings. - - If you like to force to use the iconv() code, use something like: - - mkisofs -input-charset iconv:8859-1 - - ****** IMPORTANT ******** - - You need to install the table files from libsiconv to make mkisofs - behave correctly. - -- Thanks to the new libsiconv, mkisofs now supports to run in a UTF-8 locale. - As long as no automatic locale support is present, call - - mkisofs -input-charset UTF-8 - -- Completed the Symlink implementation for UDF. The code was 20% ready - from Helios.de from the includes from the Helios variant of mkisofs. - -- New option -no-udfsymlinks to turn off support for UDF symlinks. - The UDF standards requires any OS to implement symlink support, but - you never know... - -- New option -UDF implements non-anonymous UDF support. - The relation between -UDF vs. -udf is the same as with -R vs. -r - -- Integrated a larger code drop from Helios.de, thanks to Helmut Tschemernjak - from helios.de. We did integrate the following new features from Helios.de: - - - Support for UID/GID in the UDF file meta data - - - Support for permissions in the UDF file meta data - - - Support for Mac OS X "/..namedfork/rsrc" - - - Avoid Mac OS X syslog entries when "/rsrc" is used. - - - Support for UDF based Mac OS extensions (type/creator and - resource forks). - - - New option -no-hfs allows to turn off creating a ISO9660/HFS hybrid - when UDF based Mac OS extensions are used. - - - Do not chache resorce fork files in the inode cache anymore. - - We did not include the following code from the Helios.de code drop: - - - Helios UNICODE unification (always tries to create "complete" - characters if e.g. a 'ö' is written as 'o'+'"', this is translated - into a 'ö'. - - The reason for not integrating this code is that it did violate - constraints from mkisofs. The translation was done based on UTF-8 - regardless of the current locale of the user. It could only work - in a UTF-8 based locale but mkisofs did not yet support UTF-8 an - based locale. The correct implementation would be in most cases - based on UCS-2 characters as used by Joliet and UDF. - - - Helios code that did prevent mkisofs to abort on certain kind of - read errors. - - The reason for not integrating this code is that it did not work - as expected for all possible cases and that such code should use - a similar mechanism as "star"s error control feature. - - - The Helios option -nolimit-pathtables has not been included as the - implementation did cause the PATH table to contain random data in - case that a PATH table overflow was allowed. - - - The Helios code drop did modify the libfind callback function to - implement Mac OS extensions. This is not correct as all the Mac OS - related stuff should already in the functions that are called - by the unmodified libfind callback. - - Another problem with this code is that it would introduce an - otherwise non-existent path length limitation with "mkisofs -find " - - - Helios did remove the artificial limit for UDF files > 2 GB. - This is currently not done for consistency between ISO-9660 and - UDF. Mkisofs will implement multi-extent files soon and then - the UDF file size limitation will be removed. - - - HELIOS TODO: - - - Add better code for ignoring errors. This should be done - using star's error control module, see star/checkerr.c - - - Add some code that allows to write media with more than 65535 - parent directories, even if this violates ISO-9660 and prevents - DOS from being able to read the resulting FS. This needs to be - done in a way that causes all "overflowing" directories to get - a definitive pointer instead of random values. - - - Add the HELIOS UNICODE mapping code. This needs to be done - at UCS-2 level for Joliet and UDF (instead of UTF-8) and only - for Rock Ridge (in case of a UTF-8 based target locale) using - UTF-8 based translations. - - - Make the Apple extensions work again with "mkisofs -find" - -TODO: - - Support correct inode numbers for UDF hardlinks - - - Support sockets, pipes, char/blk-dev specials with UDF - - - read Joliet filenames with multi-session if no TRANS.TBL - or RR is present. I am looking for a volunteer for this task! - - Note that this can never be 100% correct as there is no relation - between the names on the master (UNIX) filesystem, the ISO-9660 - names and the Joliet names. Only the Rock Ridge names are - untranslated with respect to the original files on the - master (UNIX) filesystem. - - - add libecc/edc for CDI and similar. - - -CYGWIN NT-4.0 NOTES: - -To compile on Cygwin32, get Cygwin and install it. -For more information read README.win32 - -The files are located on: - -ftp://ftp.berlios.de/pub/cdrecord/alpha ... - -NOTE: These tar archives are 100% POSIX compatible. GNU tar may get some - minor trouble. If you like a 100% POSIX compliant tar, get star from - ftp://ftp.berlios.de/pub/star/ - -WARNING: Do not use 'winzip' to extract the tar file! - Winzip cannot extract symbolic links correctly. - -Joerg diff -Nru cdrtools-2.01.01a33/AN-2.01.01a29 cdrtools-3.02a09/AN-2.01.01a29 --- cdrtools-2.01.01a33/AN-2.01.01a29 2007-07-03 23:10:05.000000000 +0000 +++ cdrtools-3.02a09/AN-2.01.01a29 1970-01-01 00:00:00.000000000 +0000 @@ -1,207 +0,0 @@ -Please have a look at the German open Source Center BerliOS at www.berlios.de -BerliOS will continue to support free hosting of cryptography projects even -when US laws change and don't allow to host cryptography projects in the USA. -Also look at sourcewell.berlios.de, the first Open Source announcement service -that itself is implemented as Open Source project. - -***************** Important news **************************** - -For the 'Slottable Source Plugin Module' SSPM Features read README.SSPM - -***************** Please Test ********************************* - -NEW features of cdrtools-2.01.01a29: - ----------> -******** WARNING! This is a release that introduces _massive_ changes -******** in mkisofs. These changes are not yet and cannot yet be complete -******** and are definitely not tested sufficiently already. -******** If you like to test the recent massive mkisofs enhencements, you -******** are welcome! If you lik a "stable" version, use mkisofs from -******** Cdrtools-2.01.01a27 -<-------- - -******* -NOTE: this is _not_ a release that starts a new aplha/beta series of - distibutions. The only reason is to add certain new CD/DVD features - that are important. - - So _please_ do not send any patches except when you like to fix - extreme bugs. I am currently mainly working on stable incremental - restore featurs for star-1.5-final. - Once star-1.5-final is out, cdrtools will start a new developent cycle. -******* - - -All: - -- Added a note to README.compile on how to work around a problem - in /usr/include/linux/types.h that prevents to compile cdrtools - on Linux using the Sun Studio compiler. - -- A workaround against non autoconf friendly code in Cygwin has been - fixed in include/schily/iconv.h (a typo). - -- Compilations with static configuration are now also possible on HP-UX - -- All profiles libraries now have the same name as the non-profiled variants. - To create a profiled version of a command, do something like this: - - cd cdrecord - smake clean - smake COPTX=-xpg LXOPTX=-xpg LINKMODE=profiled - - For GCC use: - - cd cdrecord - smake clean - smake COPTX=-pg LXOPTX=-pg LINKMODE=profiled - - -Libschily: - -- getargs() enhanced to fully support POSIX Command line rules - -- snprintf() is again compiled into libschily in case that the function - is missing on the current platform. - -Libparanoia (Ported/enhanced by Jörg Schilling, originated by Monty xiphmont@mit.edu): - -Libedc (Optimized by Jörg Schilling, originated by Heiko Eißfeldt heiko@hexco.de): - -Libfind: - -Libfile: - -Libhfs_iso: - -Libsiconv: - -- sic_open() now allows to be called with a NULL pointer argument - -- sic_list() now returns the number of listed translations - -Libscg: - -Rscsi: - -Cdrecord: - -- Some small typo fixes in the man page - -- Speed values are now also displayed as multiple of Blu Ray 1x - -- First hacky "support" for Blu Ray media. Note that this support - is based on the assumption that - "cdrecord driver=drv_dvdplusrw driveropts=burnfree" -force - works for BD-RE. - - There was no write testing for this new yet but several of the - parameters have been verified and several modifications have been applied - to make some of the commands work for Blu Ray. - - The code is fully experimental! - -- The read disk structure command has been enhanced to support the - media type field for Blu ray. - -- Speed values are now also displayed as multiple of Blu Ray 1x - -- Cdrecord now aborts with DVD+R if -dummy has been specified as there is - no -dummy mode for DVD+R. This has been forgotten for years.... - - -Cdda2wav (Maintained/enhanced by Jörg Schilling, originated by Heiko Eißfeldt heiko@hexco.de): - -- Added some casts to interface.c and ioctl.c in order to prevent warnings - from the Sun Studio 12 compiler. - -- The man page has been restructured to correctly use bold and italic - with option descriptions. - -Readcd: - -- Speed values are now also displayed as multiple of Blu Ray 1x - -- readcd -factor meshpoints=100 now also displays the speed as multiple - of Blu Ray speed if the medium is a BD - -Scgcheck: - -Scgskeleton: - -Btcflash: - -Mkisofs (Maintained/enhanced by Jörg Schilling since 1997, originated my Eric Youngdale): - -- Avoid a core dump with mkisofs -new-dir-mode XXXX caused by a bad - getargs() option format string. Thanks to Thomas Flock - for reporting. - -- Some small typo fixes in the man page - -- Fix mkisofs to no longer dump core in case that a non-existing locale - is used. Thanks to Dirk Paehl for reporting. - -- mkisofs now warns in case that /opt/schily/libsiconv/ is missing - or not populated. - -- mkisofs no longer requires the Mac OS extension related locale - translations to be present in case that no Mac extensions are requested. - -- diag/isoinfo also has been fixed to correctly use iconv. - Thanks to Kai Raphahn for reporting. - - - HELIOS TODO: - - - Add better code for ignoring errors. This should be done - using star's error control module, see star/checkerr.c - - - Add some code that allows to write media with more than 65535 - parent directories, even if this violates ISO-9660 and prevents - DOS from being able to read the resulting FS. This needs to be - done in a way that causes all "overflowing" directories to get - a definitive pointer instead of random values. - - - Add the HELIOS UNICODE mapping code. This needs to be done - at UCS-2 level for Joliet and UDF (instead of UTF-8) and only - for Rock Ridge (in case of a UTF-8 based target locale) using - UTF-8 based translations. - - - Make the Apple extensions work again with "mkisofs -find" - -TODO: - - Support correct inode numbers for UDF hardlinks - - - Support sockets, pipes, char/blk-dev specials with UDF - - - read Joliet filenames with multi-session if no TRANS.TBL - or RR is present. I am looking for a volunteer for this task! - - Note that this can never be 100% correct as there is no relation - between the names on the master (UNIX) filesystem, the ISO-9660 - names and the Joliet names. Only the Rock Ridge names are - untranslated with respect to the original files on the - master (UNIX) filesystem. - - - add libecc/edc for CDI and similar. - - -CYGWIN NT-4.0 NOTES: - -To compile on Cygwin32, get Cygwin and install it. -For more information read README.win32 - -The files are located on: - -ftp://ftp.berlios.de/pub/cdrecord/alpha ... - -NOTE: These tar archives are 100% POSIX compatible. GNU tar may get some - minor trouble. If you like a 100% POSIX compliant tar, get star from - ftp://ftp.berlios.de/pub/star/ - -WARNING: Do not use 'winzip' to extract the tar file! - Winzip cannot extract symbolic links correctly. - -Joerg diff -Nru cdrtools-2.01.01a33/AN-2.01.01a30 cdrtools-3.02a09/AN-2.01.01a30 --- cdrtools-2.01.01a33/AN-2.01.01a30 2007-07-10 11:13:21.000000000 +0000 +++ cdrtools-3.02a09/AN-2.01.01a30 1970-01-01 00:00:00.000000000 +0000 @@ -1,153 +0,0 @@ -Please have a look at the German open Source Center BerliOS at www.berlios.de -BerliOS will continue to support free hosting of cryptography projects even -when US laws change and don't allow to host cryptography projects in the USA. -Also look at sourcewell.berlios.de, the first Open Source announcement service -that itself is implemented as Open Source project. - -***************** Important news **************************** - -For the 'Slottable Source Plugin Module' SSPM Features read README.SSPM - -***************** Please Test ********************************* - -NEW features of cdrtools-2.01.01a30: - ----------> -******** WARNING! This is a release that introduces _massive_ changes -******** in mkisofs. These changes are not yet and cannot yet be complete -******** and are definitely not tested sufficiently already. -******** If you like to test the recent massive mkisofs enhencements, you -******** are welcome! If you lik a "stable" version, use mkisofs from -******** Cdrtools-2.01.01a27 -<-------- - -******* -NOTE: this is _not_ a release that starts a new aplha/beta series of - distibutions. The only reason is to add certain new CD/DVD features - that are important. - - So _please_ do not send any patches except when you like to fix - extreme bugs. I am currently mainly working on stable incremental - restore featurs for star-1.5-final. - Once star-1.5-final is out, cdrtools will start a new developent cycle. -******* - - -All: - -- More locale related autoconf tests (see mkisofs) - -Libschily: - -Libparanoia (Ported/enhanced by Jörg Schilling, originated by Monty xiphmont@mit.edu): - -Libedc (Optimized by Jörg Schilling, originated by Heiko Eißfeldt heiko@hexco.de): - -Libfind: - -Libfile: - -Libhfs_iso: - -Libsiconv: - -Libscg: - -- Detect & correctly handle SCSI send permission problems with USCSI and Solaris - - -Rscsi: - -Cdrecord: - -- cdrecord -pad cue=file now works as people expect. - Thanks to to Bernd Eggink for reporting - -- Workaround for new Solaris behavor for Console users if hald - is active. Give error message and abort instead of useless messages. - -- Print Linux 2.6.8 warnings only if there really was a problem. - -- Blu Ray driver now supports "cdrecord -atip" to read manufacturer IDs. - -- DVD writing works again. Introducing Blu Ray with 2.01.01a29 did cause - problems with DVDs. - -- Several MMC-3+ Text strings for profiles and media codes have been added. - - -Cdda2wav (Maintained/enhanced by Jörg Schilling, originated by Heiko Eißfeldt heiko@hexco.de): - -- Workaround for new Solaris behavor for Console users if hald - is active. Give error message and abort instead of useless messages. - -Readcd: - -Scgcheck: - -Scgskeleton: - -Btcflash: - -- Workaround for new Solaris behavor for Console users if hald - is active. Give error message and abort instead of useless messages. - -Mkisofs (Maintained/enhanced by Jörg Schilling since 1997, originated my Eric Youngdale): - -- mkisofs now sets up -input-charset to the locale read from the - environment in case that no -input-charset has been specified. - To disable this automatic set up, use -input-charset "". - - - HELIOS TODO: - - - Add better code for ignoring errors. This should be done - using star's error control module, see star/checkerr.c - - - Add some code that allows to write media with more than 65535 - parent directories, even if this violates ISO-9660 and prevents - DOS from being able to read the resulting FS. This needs to be - done in a way that causes all "overflowing" directories to get - a definitive pointer instead of random values. - - - Add the HELIOS UNICODE mapping code. This needs to be done - at UCS-2 level for Joliet and UDF (instead of UTF-8) and only - for Rock Ridge (in case of a UTF-8 based target locale) using - UTF-8 based translations. - - - Make the Apple extensions work again with "mkisofs -find" - -TODO: - - Support correct inode numbers for UDF hardlinks - - - Support sockets, pipes, char/blk-dev specials with UDF - - - read Joliet filenames with multi-session if no TRANS.TBL - or RR is present. I am looking for a volunteer for this task! - - Note that this can never be 100% correct as there is no relation - between the names on the master (UNIX) filesystem, the ISO-9660 - names and the Joliet names. Only the Rock Ridge names are - untranslated with respect to the original files on the - master (UNIX) filesystem. - - - add libecc/edc for CDI and similar. - - -CYGWIN NT-4.0 NOTES: - -To compile on Cygwin32, get Cygwin and install it. -For more information read README.win32 - -The files are located on: - -ftp://ftp.berlios.de/pub/cdrecord/alpha ... - -NOTE: These tar archives are 100% POSIX compatible. GNU tar may get some - minor trouble. If you like a 100% POSIX compliant tar, get star from - ftp://ftp.berlios.de/pub/star/ - -WARNING: Do not use 'winzip' to extract the tar file! - Winzip cannot extract symbolic links correctly. - -Joerg diff -Nru cdrtools-2.01.01a33/AN-2.01.01a31 cdrtools-3.02a09/AN-2.01.01a31 --- cdrtools-2.01.01a33/AN-2.01.01a31 2007-07-19 10:06:17.000000000 +0000 +++ cdrtools-3.02a09/AN-2.01.01a31 1970-01-01 00:00:00.000000000 +0000 @@ -1,144 +0,0 @@ -Please have a look at the German open Source Center BerliOS at www.berlios.de -BerliOS will continue to support free hosting of cryptography projects even -when US laws change and don't allow to host cryptography projects in the USA. -Also look at sourcewell.berlios.de, the first Open Source announcement service -that itself is implemented as Open Source project. - -***************** Important news **************************** - -For the 'Slottable Source Plugin Module' SSPM Features read README.SSPM - -***************** Please Test ********************************* - -NEW features of cdrtools-2.01.01a31: - ----------> -******** WARNING! This is a release that introduces _massive_ changes -******** in mkisofs. These changes are not yet and cannot yet be complete -******** and are definitely not tested sufficiently already. -******** If you like to test the recent massive mkisofs enhencements, you -******** are welcome! If you lik a "stable" version, use mkisofs from -******** Cdrtools-2.01.01a27 -<-------- - -******* -NOTE: this is _not_ a release that starts a new aplha/beta series of - distibutions. The only reason is to add certain new CD/DVD features - that are important. - - So _please_ do not send any patches except when you like to fix - extreme bugs. I am currently mainly working on stable incremental - restore featurs for star-1.5-final. - Once star-1.5-final is out, cdrtools will start a new developent cycle. -******* - - -All: - -Libschily: - -Libparanoia (Ported/enhanced by Jörg Schilling, originated by Monty xiphmont@mit.edu): - -Libedc (Optimized by Jörg Schilling, originated by Heiko Eißfeldt heiko@hexco.de): - -Libfind: - -Libfile: - -Libhfs_iso: - -Libsiconv: - -Libscg: - -Rscsi: - -Cdrecord: - -- New code to better print speed performance values - with cdrecord -prcap - Note: The 'MATSHITA' 'BD-MLT SW-5582 ' seems for unknown - reason not to support to retrieve the current read/write speed - values via get_performance. - -- cdrecord -minfo now prints "Mounted media class" and - "Mounted media type" name. - -- Fixed a bug in auto-target mode introduced with 2.01.01a30 - Cdrecord now again is able to work wihtout a dev= parameter. - - -Cdda2wav (Maintained/enhanced by Jörg Schilling, originated by Heiko Eißfeldt heiko@hexco.de): - -- Fixed a bug in auto-target mode introduced with 2.01.01a30 - Cdda2wav now again is able to work wihtout a dev= parameter. - -Readcd: - -- Fixed a bug in auto-target mode introduced with 2.01.01a30 - Readcd now again is able to work wihtout a dev= parameter. - -Scgcheck: - -Scgskeleton: - -Btcflash: - -Mkisofs (Maintained/enhanced by Jörg Schilling since 1997, originated my Eric Youngdale): - -- New option -no-limit-pathtables allows to create filesystems with - more than 65535 parent directories. Note that this makes the filesystem - violating ISO9660 and the filesystem will not be usable on DOS. - -- New option errctl=name or errctl=control-spec similar as in star. - - This option allows e.g. to tell mkisofs not to abort if a file - did grow or shrink while mkisofs was reading it. - - Currently only OPEN, READ, GROW, SHRINK are implemented more to come - later... - - - HELIOS TODO: - - - Add the HELIOS UNICODE mapping code. This needs to be done - at UCS-2 level for Joliet and UDF (instead of UTF-8) and only - for Rock Ridge (in case of a UTF-8 based target locale) using - UTF-8 based translations. - - - Make the Apple extensions work again with "mkisofs -find" - -TODO: - - Support correct inode numbers for UDF hardlinks - - - Support sockets, pipes, char/blk-dev specials with UDF - - - read Joliet filenames with multi-session if no TRANS.TBL - or RR is present. I am looking for a volunteer for this task! - - Note that this can never be 100% correct as there is no relation - between the names on the master (UNIX) filesystem, the ISO-9660 - names and the Joliet names. Only the Rock Ridge names are - untranslated with respect to the original files on the - master (UNIX) filesystem. - - - add libecc/edc for CDI and similar. - - -CYGWIN NT-4.0 NOTES: - -To compile on Cygwin32, get Cygwin and install it. -For more information read README.win32 - -The files are located on: - -ftp://ftp.berlios.de/pub/cdrecord/alpha ... - -NOTE: These tar archives are 100% POSIX compatible. GNU tar may get some - minor trouble. If you like a 100% POSIX compliant tar, get star from - ftp://ftp.berlios.de/pub/star/ - -WARNING: Do not use 'winzip' to extract the tar file! - Winzip cannot extract symbolic links correctly. - -Joerg diff -Nru cdrtools-2.01.01a33/AN-2.01.01a32 cdrtools-3.02a09/AN-2.01.01a32 --- cdrtools-2.01.01a33/AN-2.01.01a32 2007-07-30 16:21:36.000000000 +0000 +++ cdrtools-3.02a09/AN-2.01.01a32 1970-01-01 00:00:00.000000000 +0000 @@ -1,171 +0,0 @@ -Please have a look at the German open Source Center BerliOS at www.berlios.de -BerliOS will continue to support free hosting of cryptography projects even -when US laws change and don't allow to host cryptography projects in the USA. -Also look at sourcewell.berlios.de, the first Open Source announcement service -that itself is implemented as Open Source project. - -***************** Important news **************************** - -For the 'Slottable Source Plugin Module' SSPM Features read README.SSPM - -***************** Please Test ********************************* - -NEW features of cdrtools-2.01.01a32: - ----------> -******** WARNING! This is a release that introduces _massive_ changes -******** in mkisofs. These changes are not yet and cannot yet be complete -******** and are definitely not tested sufficiently already. -******** If you like to test the recent massive mkisofs enhencements, you -******** are welcome! If you lik a "stable" version, use mkisofs from -******** Cdrtools-2.01.01a27 -<-------- - -******* -NOTE: this is _not_ a release that starts a new aplha/beta series of - distibutions. The only reason is to add certain new CD/DVD features - that are important. - - So _please_ do not send any patches except when you like to fix - extreme bugs. I am currently mainly working on stable incremental - restore featurs for star-1.5-final. - Once star-1.5-final is out, cdrtools will start a new developent cycle. -******* - - -All: - -- Handling non-large file aware systems is now more correct - -Libschily: - -Libparanoia (Ported/enhanced by Jörg Schilling, originated by Monty xiphmont@mit.edu): - -- Fixed some minor problems with K&R compilers - - -Libedc (Optimized by Jörg Schilling, originated by Heiko Eißfeldt heiko@hexco.de): - -- #define memmove() to movebyted for libedc_dec if memmove is missing. - -Libfind: - -Libfile: - -Libhfs_iso: - -Libsiconv: - -- Deactivate TAB_SIZE check for K&R compilers. They cannot - do complex math in cpp. - -Libscg: - -Rscsi: - -Cdrecord: - -Cdda2wav (Maintained/enhanced by Jörg Schilling, originated by Heiko Eißfeldt heiko@hexco.de): - -- cdda2wav now includes a copyright message and a year number - with the -version output. - -- Add a workaround for a definition in on SunOS-4.x - -- Fixed some minor problems with K&R compilers - -Readcd: - -Scgcheck: - -Scgskeleton: - -Btcflash: - -Mkisofs (Maintained/enhanced by Jörg Schilling since 1997, originated my Eric Youngdale): - -- mkisofs now includes a copyright message and a year number - with the -version output. - -- New option -no-limit-pathtables allows to create filesystems with - more than 65535 parent directories. Note that this makes the filesystem - violating ISO9660 and the filesystem will not be usable on DOS. - - With 2.01.01a32, this also applies to the Joliet PATH table. - -- Support for ISO-9660 multi extent files added, thanks to - Frederick Bruckman for sending some experimental sample code - that helped to find the right ideas for a final implementation. - - This allows mkisofs to support files > 4 GB. - - - If you only use ISO-9660 (that may include Rock Ridge) or Joliet, - mkisofs is able to support single files up to a size of 8 TB. - - - If UDF is included, files > 190 GB will not appear in the UDF - file tree. - - IMPORTANT: You need to specify mkisofs -iso-level 3 or - mkisofs -iso-level 4 to allow mkisofs to archive - files > 4 GB. Also note that if you specify -hfs, - mkisofs will not archive fiiles larger than 2 GB. - - NOTE: - - Linux currently does not allow to read the complete content of - multi-extent files and will return EIO at some offset. - - Solaris currently does not allow you to read multi-extent files at all. - It will return EINVAL and print a kernel message - -- New options -hide-udf and -hide-udf-list allow to delectively exclude - files from the UDF tree. Note that mkisofs currently still binds the - UDF tree to the Joliet tree. All files that have been excluded from - the Joliet tree currently are also excluded from the UDF tree. - -- Always hide the Trans table (from mkisofs -T) files from the UDF tree. - - - HELIOS TODO: - - - Add the HELIOS UNICODE mapping code. This needs to be done - at UCS-2 level for Joliet and UDF (instead of UTF-8) and only - for Rock Ridge (in case of a UTF-8 based target locale) using - UTF-8 based translations. - - - Make the Apple extensions work again with "mkisofs -find" - -TODO: - - Support correct inode numbers for UDF hardlinks - - - Support sockets, pipes, char/blk-dev specials with UDF - - - read Joliet filenames with multi-session if no TRANS.TBL - or RR is present. I am looking for a volunteer for this task! - - Note that this can never be 100% correct as there is no relation - between the names on the master (UNIX) filesystem, the ISO-9660 - names and the Joliet names. Only the Rock Ridge names are - untranslated with respect to the original files on the - master (UNIX) filesystem. - - - add libecc/edc for CDI and similar. - - -CYGWIN NT-4.0 NOTES: - -To compile on Cygwin32, get Cygwin and install it. -For more information read README.win32 - -The files are located on: - -ftp://ftp.berlios.de/pub/cdrecord/alpha ... - -NOTE: These tar archives are 100% POSIX compatible. GNU tar may get some - minor trouble. If you like a 100% POSIX compliant tar, get star from - ftp://ftp.berlios.de/pub/star/ - -WARNING: Do not use 'winzip' to extract the tar file! - Winzip cannot extract symbolic links correctly. - -Joerg diff -Nru cdrtools-2.01.01a33/AN-2.01.01a33 cdrtools-3.02a09/AN-2.01.01a33 --- cdrtools-2.01.01a33/AN-2.01.01a33 2007-08-12 22:09:07.000000000 +0000 +++ cdrtools-3.02a09/AN-2.01.01a33 1970-01-01 00:00:00.000000000 +0000 @@ -1,211 +0,0 @@ -Please have a look at the German open Source Center BerliOS at www.berlios.de -BerliOS will continue to support free hosting of cryptography projects even -when US laws change and don't allow to host cryptography projects in the USA. -Also look at sourcewell.berlios.de, the first Open Source announcement service -that itself is implemented as Open Source project. - -***************** Important news **************************** - -For the 'Slottable Source Plugin Module' SSPM Features read README.SSPM - -***************** Please Test ********************************* - -NEW features of cdrtools-2.01.01a33: - ----------> -******** WARNING! This is a release that introduces _massive_ changes -******** in mkisofs. These changes are not yet and cannot yet be complete -******** and are definitely not tested sufficiently already. -******** If you like to test the recent massive mkisofs enhencements, you -******** are welcome! If you lik a "stable" version, use mkisofs from -******** Cdrtools-2.01.01a27 -<-------- - -******* -NOTE: this is _not_ a release that starts a new aplha/beta series of - distibutions. The only reason is to add certain new CD/DVD features - that are important. - - So _please_ do not send any patches except when you like to fix - extreme bugs. I am currently mainly working on stable incremental - restore featurs for star-1.5-final. - Once star-1.5-final is out, cdrtools will start a new developent cycle. -******* - - -All: - -Libschily: - -Libparanoia (Ported/enhanced by Jörg Schilling, originated by Monty xiphmont@mit.edu): - -Libedc (Optimized by Jörg Schilling, originated by Heiko Eißfeldt heiko@hexco.de): - -Libfind: - -Libfile: - -Libhfs_iso: - -Libsiconv: - -Libscg: - -Rscsi: - -Cdrecord: - -- Added support to unlock the free firmware for the Plextor 755 and 760 - drives. Thanks to a hint from Alexander Noé. - This makes the following features available again: - - GIGAREC SINGLESESSION HIDECDR - - Note: You need to install free firmware in the drive first to make this - work. - - If you like, you may turn the feature off using "driveropts=plexdisable" - - -- Added support for enhanced gigarec found in newer Plextor drives. - The gigarec values 0.9 anf 1.1 are now supported. Cdrecord now supports: - - 0.6, 0.7, 0.8, 0.9, 1.0, 1.1, 1.2, 1.3, 1.4 - - Note that not all values are supported by all drives. - - -- Added support for Yamaha AutioMaster in the Plextor Premium 2. - Thanks to a hint from Paolo Saggese. Original Yamaha audiomaster - is like gigarec 0.85, Plextor implemented 0.8666 which still looks - like a useful additional intermdiate value. - - -- Make the man page more obvious that gigarec with values < 1.0 is _very_ - similar to audiomaster except for pit sizes. - -- Code restructured from a CD/DVD only program to a program that - writes multiple different similar media. - -- New simulation driver "bd_simul" - -- Trying to make the text in cdrecord.c that forbids incompatible changes - to be published under the name "cdrecord" more user friendly. - - -Cdda2wav (Maintained/enhanced by Jörg Schilling, originated by Heiko Eißfeldt heiko@hexco.de): - -Readcd: - -- Added support to read C1/C2/CU errors from Plextor and NEC/Optiarc drives. - Thanks to Alexander Noé for the code. - - If you run the test with: - - readcd -cxscan - - you will only see summary output. If you add one -v, you see the error - information for every second that does include errors. If you add -vv, - you see information for every second in the data range. - - Note that the output format will change in future to support GNU plot. - I am looking for suggestions for a useful output format. - -- Added support for pisum8 tests for DVDs on drives made by Plextor - - If you run the test with: - - readcd -pi8scan - -- Added support for pif tests for DVDs on drives made by Plextor - - If you run the test with: - - readcd -pifscan - - Fall all three new options, you will only see summary output. If you - add one -v, you see the error information for every second (CD) - 8 * 32 KB (pisum8) or 32 KB (pif) that does include errors. If you add - -vv, you see information for every interval in the data range. - - Note that the output format may change in future, - I am looking for suggestions for a useful output format. - -- New option -plot allows to modify the outputformat for the options - -cxscan, -pi8scan, -pifscan - - To plot a list of pisum8 and pif errors, call: - - readcd -pi8scan -plot > pisum8 - readcd -pifscan -plot > pif - gnuplot - gnuplot> plot "pisum8" w l - gnuplot> replot "pif" w l - - To plot a list of C1/C2/CU errors call: - - readcd -cxscan > cx - awk '{ print $1 " " $2 }' < cx > c1errs - awk '{ print $1 " " $3 }' < cx > c2errs - awk '{ print $1 " " $4 }' < cx > cuerrs - gnuplot - gnuplot> plot "c1errs" w l - gnuplot> replot "c2errs" w l - gnuplot> replot "cuerrs" w l - -Scgcheck: - -Scgskeleton: - -Btcflash: - -Mkisofs (Maintained/enhanced by Jörg Schilling since 1997, originated by Eric Youngdale): - -- Avoid warnings when compiling tree.c with some compilers. - -- Do no longer warn about violating ISO-9660 if -iso-level 4 has been specified. - - - HELIOS TODO: - - - Add the HELIOS UNICODE mapping code. This needs to be done - at UCS-2 level for Joliet and UDF (instead of UTF-8) and only - for Rock Ridge (in case of a UTF-8 based target locale) using - UTF-8 based translations. - - - Make the Apple extensions work again with "mkisofs -find" - -TODO: - - Support correct inode numbers for UDF hardlinks - - - Support sockets, pipes, char/blk-dev specials with UDF - - - read Joliet filenames with multi-session if no TRANS.TBL - or RR is present. I am looking for a volunteer for this task! - - Note that this can never be 100% correct as there is no relation - between the names on the master (UNIX) filesystem, the ISO-9660 - names and the Joliet names. Only the Rock Ridge names are - untranslated with respect to the original files on the - master (UNIX) filesystem. - - - add libecc/edc for CDI and similar. - - -CYGWIN NT-4.0 NOTES: - -To compile on Cygwin32, get Cygwin and install it. -For more information read README.win32 - -The files are located on: - -ftp://ftp.berlios.de/pub/cdrecord/alpha ... - -NOTE: These tar archives are 100% POSIX compatible. GNU tar may get some - minor trouble. If you like a 100% POSIX compliant tar, get star from - ftp://ftp.berlios.de/pub/star/ - -WARNING: Do not use 'winzip' to extract the tar file! - Winzip cannot extract symbolic links correctly. - -Joerg diff -Nru cdrtools-2.01.01a33/AN-3.00 cdrtools-3.02a09/AN-3.00 --- cdrtools-2.01.01a33/AN-3.00 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/AN-3.00 2010-06-01 22:10:19.000000000 +0000 @@ -0,0 +1,3654 @@ +All: + +- Better lint make rules + +- Better autoconf rules for ACLs + +- Better support for Linux on IBM-390 + +- Better support for Linux on AMD x86-64 + +- Better conforming to lint warnings. + +- Now using "makefiles-1.6" + +- Compilation on OS/2 should work again (-Zexe -> -o xxx.$(EXEEXT) + +- The sleeptime to allow reading a GNU mmake related warning was reduced + to 2 seconds. + I am still waiting for GNU make to fix the bugs I did report in 1999. + +- Support for 'make DESTDIR=xxx install' added + +- Workaround for a Shell Bug on BSDi + +- Install workaround for the fact that BSDI has chown(1) in /usr/sbin/ + +- cc-config shell script reworked + +- Better configure tests for procfs include files + +- Configure tests for fchown, chmod, fchmod, lchmod, futimes, lutimes + +- Configure tests for fdopendir + +- Configure tests for broken ext2fs includes files in Linux kernel + +- Better SRCROOT search function in makefiles shell scripts + +- New autoconf tests for broken , & + on various Linux systems + +- astoull*() new in schily.h + +- utypes.h now has MAX_ and MIN_ value definitions for all basic + system types. + +- Support added to compile in 64 bit mode on Solaris Sparc. + Use: smake CCOM=cc64 + +- Support added to compile shared libraries with version + numbers for interface levels and make inofficial "interfaces" + static + +- Prevent gmake to go into an enless loop on Solaris + in case that /usr/ucb/tr is before /usr/bin/tr in PATH + +- Better autoconf error message in case that the expected + C-compiler could not be found. + +- Mac OS X now installs files as root:wheel + +- Supply linker mapfiles for all libraries. This allows cdrtools + to be compiled using shared libraries only and to properly + hide inofficial interfaces on Solaris (using ls) + Note that this feature is not yet available for GNU ld + +- Support for DragonFly BSD added, thanks to joerg@britannica.bec.de + +- Default Cygwin install uid/group adapted to use available ids. + +- New program btcflash added. Thanks to David Huang + +- + If you like all users to be able to call cdrecord root-less, you need + Solaris 10 or newer. + + Edit the file /etc/security/exec_attr and add: + + All:solaris:cmd:::/opt/schily/bin/cdrecord: privs=file_dac_read,sys_devices,proc_lock_memory,proc_priocntl,net_privaddr + All:solaris:cmd:::/opt/schily/bin/readcd: privs=file_dac_read,sys_devices,net_privaddr + All:solaris:cmd:::/opt/schily/bin/cdda2wav: privs=file_dac_read,sys_devices,proc_priocntl,net_privaddr + + If you like to allow only specific user to use cdrecord, + use something like: + + CD RW:solaris:cmd:::/opt/schily/bin/cdrecord: privs=file_dac_read,sys_devices,proc_lock_memory,proc_priocntl,net_privaddr + + instead and make the related users members of the profile "CD RW" + by adding a line like: + + joerg::::profiles=CD RW + + into /etc/user_attr + + Note that you either need to call cdrecord via "pfexec cdrecord ....." + or by using a profile aware shell (e.g. /usr/bin/pfksh) + +- Better support for BeOS/Zeta in the makefile system + +- Support for armv5teb-linux-cc was added to the makefile system + +- Autoconf script added to 'conf' directory + +- On May 15th 2006, I happily announced new features and the release of + the DVD-code into the OpenSource. After long discussions with various + people on OpenSource Licenses and their effects on interproject usage + and the effect on the authors themselves, I contacted the authors of + included parts in this software suite and got, in most cases their + support and grant on selecting the CDDL as the new license. Although + this took some time, it was worth reading the different OpenSource + licenses completely with some support of people working in that field. + + Now I know why it took Sun so much time to offer OpenSolaris under + an OpenSource license...if you take a license change seriously, it is + a real hard job. + +- The file "CONTRIBUTING" has been updated. + +- The makefile system has been completely rewritten to be more reusable + and to not replicate code. + +- The makefile system now supports to compile under "Services For Unix", + now called "Subsystem for UNIX-based Applications (SUA)", + a free POSIX add on from Microsoft (identifies as "Interix"). + Note that you need the latest 'smake' relase smake-1.2a36 or never + from ftp://ftp.berlios.de/pub/smake/alpha/ + Note that there is smake-1.2.1 available on + ftp://ftp.berlios.de/pub/smake/ + + Currently, cdrecord is not able to send SCSI commands from this + environment. I am looking for help from experienced users. + +- The makefile system now supports to compile using the Microsoft + C-Compiler "cl". + Note that you need the latest 'smake' relase smake-1.2a36 or never + from ftp://ftp.berlios.de/pub/smake/alpha/ + This compilation currently may only be cone from a "Cygwin" environment + using smake with the Environment variables set up in a way that allows + "cl" to work (find it's include files and libraries). + + Run "smake CCOM=cl" for this kind of compilation. + + Cdrecord has not yet been verified to compile in this environment. + + Note that I am interested in feedback for these new compile possibilities. + +- New function strlcpy() for better portability. + +- New function strncpy() for better portability. + +- Enhanced Makefile system for better MSVC support + +- Enhanced Makefile system for C++ support + +- Fixed some typos in dirdefs.h + +- New functions getvallargs()/getvargs()/getvfiles() + allow to have a vector based interface to the + advanced argument parsing library functions. + Currently used by mkisofs. + +- getargs.c is now at up to date again and libschily + from cdrtools is 100% complete and may be used + as a shared library to be used by e.g. star too. + +- Added a workaround for a core dump problem with + running avoffset.c on FreeBSD/sparc64 (gcc) + +- libschily now includes a fallback fnmatch() for better portability + This fnmatch() implementation has been taken from th BSD project. + +- Fixed a bug in getvargs() that caused mkisofs -joliet-long to be + declared as illegal option. + +- Several small format enhancements for getargs() + +- getavrgs() is now (like getargs()) able to correctly handle + combinations of single char boolean flags + +- include file system completely restructured to avoid future name conflicts. + The include files now have completely moved to include/schily/. + This also allows to make all include files available in /usr/include/schily/ + in the future. + +- fixed a type in include/schily/termios.h thanks to Steven M. Schweda for + reporting. + +- All libraries now include support for compiling the code as shared library. + The code has been tested on Solaris but should also work in *BSD and Linux. + + In order to compile with shared libraries, either call: + + make LINKMODE=dynamic + + or change the line + + DEFLINKMODE= static + + to + DEFLINKMODE= dynamic + + for your OS in DEFAULTS/Defaults. + + I am interested in feedback for various OS platforms........ + +- The order for compiling the libraries has been changed to make the + compile process insensitive against old static libraris in the + library search path. + +- New Schily autoconf test for gettext() and libintl + +- include/schily/nlsdefs.h now also checks for the existence of HAVE_GETTEXT + +- #undef SIZE_T_MAX in utypes.h for better FreeBSD support + +- make file system restructured: all Schily include files are now located + in ..../include/schily/ + +- Now using new definitions from Steven M. Schweda in + include/schily/xmconfig.h + VMS users: in future, you need to specify cc -DUSE_STATIC_CONF + in order to get the old static configuration. + +- new file schily/errno.h + +- Fixed some files that did include instead of + +- Trying to make the floating point printf() support functions work + on systems that implement C99 only with no fallback. + + As this change is a result from a report from a person that does not like + to cooperate, I was not able to test on the reported AIX-5.x platform. + Also note that this change may result in problems on other platforms. + Please test and report! + +- The Schily Makefilesystem now includes environment definitions + for the Microsoft Studio 8 compiler. If you like to edit these + definitions, check the DEFAULTS directory + +- Next step in supporting Microsoft C-compilers: build in environment + set up for the MS compilers. To compile with the MS C-Compiler, + set up a Cygwin environment and compile a Cygwin 'smake'. + Then use this smake to compile with the MS C-compiler by calling: + + smake CCOM=cl + + This defaults to VC7. If you like to use VC6, call: + + smake CCOM=cl VC=6 + + Note that smake itself (if compiled with "cl") will not work, as + MS does not implement a reliable way to pass a quoted arg vector + to a new program. + + Note that cdrtools do not yet completely compile with MSVC. This + is mostly caused by missing standard compliance in the MS C-compilers. + +- A small restructuring of the include file structure: + new file include/schily/xconfig.h + include/schily/xmconfig.h now only contains manual static configuration + for VMS + +- The Makefilesystem now includes links for sparc64 (Fujitsu-Siemens) + +- Schily includefiles are now installed with "make install". + +- Try to avoid a program exception with a call to access(".", E_OK|F_OK) + caused by a libc bug from the Microsoft C-compiler "cl". + +- The makefile system now supports the Winsock library + +- Correctly cast all open(name, oflag, 0666) calls to: + open(name, oflag, (mode_t)0666) as open is a vararg function. + +- "libvms" new from Steven M. Schweda sms@antinode.org + +- -I. removed from standard c-compiler include path + +- /usr/src/linux/include is no longer included if it contains + broken include files. + + Please send a bug report to the Linux Kernel maintainers in case + that the makefile system reports broken Linux kernel include files. + +- Support for WIN-NT-5.2 (MS-Windows 2003) added to the makefile system + +- No longer using -ztext linker option for creating shared libs with GCC + as GCC does not create 100% correct binaries and this would abort + the process of creating a shared library. + +- Better setup for the environment variables that are needed for the + Microsoft "cl" compiler. + + NOTE: The current setup is for "english" versions of MS-WIN. + You may need to edit the files DEFAULTS/vc6-setup or DEFAULTS/vc7-setup + depending on your locale version and the "c"-compiler version you + are using. + +- Prevent MSVC ("cl") from creating silly messages + like: "... Consider using strerror_s instead." + +- Prevent MSVC ("cl") from complaining about deprecated + option "-ofilename" + +- New autoconf tests for POSIX compliant time functions in libc + +- GCC Warning setup no longer includes -Wtraditional + +- Dynamic libraries are now supported for Mac OS X + +- smake CCOM=xx will now result in writing DEFCCOM=xx into incs/Dcc. + if this is done on the initial make run. + conf/cc-config.sh now has one additional parameter + +- Include $(DEFLTSROOT)/$(DEFLTSDIR)/$(VCSETUP) from + DEFAULTS/Defaults.cygwin32_nt already to allow the script + conf/cc-config.sh to detect that "cl" is working. + +- DEFAULTS/vc7-setup & DEFAULTS/vc6-setup now set + .NOWARN: := to tell smake-1.2a41 or newer not to warn + about a nonportable assignment (we do + not have a UNIX "make" in Cygwin). + +- smake COPTX=-DNO_LARGEFILES now allows to compile in non-largefile mode + +- New targets "html" and "htmlx" for Manual page makefiles + allows to convert man pages using "man2html" + +- New include file schily/wchar.h + +- New include file schily/schilyp.h + +- Typo in schily/param.h fixed + +- schily/jmpdefs.h now includes support for sigsetjmp() + +- configure now checks for ctime cftime ascftime strftime and + for libresolv and whether /bin/sh is bash + +- remove libxxx.so link before trying to create it + +- Allow a mixture of static and dynamic libraries to link against + a program + +- Now using cdrecord/version.h for the global version number + +- New autoconf test for struct timeval in sys/time.h + +- New autoconf test for struct timezone in sys/time.h + +- Changed include/schily/time.h to depend on the + new autoconf #defines HAVE_STRUCT_TIMEVAL and + HAVE_STRUCT_TIMEZONE + +- The Schily makefile system is now also passing OS + specific #defines to "configure". + +- New Schily makefile system Target "shell" allows to + call "make shell" in order to get a shell with exactly + the same environment as the compilers will see from + the makefile system. This helps testing. + +- New autoconf test checks whether we need to call + "xx.exe" on a platform. This is needed in order to + be able to call the Microsoft compiler from the + SFU (Services for UNIX) environment. + +- It is now possible to call the Microsoft compiler + from SFU. In order to do this, call "smake CCOM=cl" + + If this does not work, you may need to change the + file DEFAULTS/vc7-interix-setup + +- Trying to better deal with MS winsock2.h oddities in schily/time.h + +- #undef iswalnum ... in schily//wchar.h before defining non wchar fallbacks. + +- config.guess now knows about i386 Darwin (Mac OS X on Intel) + +- Schily makefilesystem enhanced to check for extended + fields in struct utsname as seen e.g. in MS SFU (Interix). + +- New predefined macro OSVERSION in the makefilesystem is needed + for SCO OpenServer 6.x support (because this uses a UnixWare + kernel + +- Trying to support Compilation on SCO OpenServer 6.x + +- New macro $(CC_OUTPUT_FILTER) allows to filter away the + unwanted file name echo from cl.exe. + +- Interix now uses uname -m instead of uname -p for $(OARCH) + +- Makefile support for pentium-4-unixware-cc.rul and + pentium-4-unixware-gcc.rul was added. + +- New autoconf test for libiconv + +- The Schily makefilesystem now by default searches in /usr/local/include + and /usr/local/lib if on FreeBSD. This is needed in order to find + libintl and libiconv. + +- make html and make htmlx now works even on the top level directory + and creates html versions of the man pages + +- fixed a typo in the autoconf test for C99 isinf/isnan + +- Support for SunStudio 12 on Linux was added. + Call "make CCOM=suncc", but note that you then + will not be able to compile Linux specific functions like + support for ext2 file flags. This does not work because the + related include files are not written in clean C. + + Note that nearly all programs from cdrtools depend on libscg + which uses platform specific code for every OS. As the Linux + kernel include files are not written in clean C, you cannot + compile libscg using Sun Studio. If someone from the Linux kernel + team would rewrite the Linux kernel include files to only use clean + C based constructs, cdrecord could be compiled with Sun Studio + compilers. + +- Added a workaround to config.guess to get correct + platform names from "configure" even though suncc + does not #define __ELF__ + +- Linux specific autoconf tests are now only executed on Linux + based platforms + +- Some make rule definitions for Cygwin restructured to allow + compilation with more Cygwin releases. The -D_WIN32_WINNT= + definitions are now only in effect if the selected compiler + is the Microsoft compiler. + +- New include file schily/ioctl.h + +- Added Support to create Blastwave SVr4 packages. + To create a Blastwave package, call: + + .clean + smake -f Mcsw + + You need the program "fakeroot" and will find the results + in packages/ + + Note that this source tree will allow you to create the package + CSWcdrtools but not the packages CSWschilybase and CSWschilyutils + on which CSWcdrtools depends. + + WARNING: libsiconv.a and it's character translation tables (located in + /opt/*/lib/siconv) are not part of CSWcdrtools but of CSWschilybase. + If you do not update CSWschilybase to include the character translation + tables used by libsiconv, mkisofs will not work correctly. + + NOTE: the SVr4 package specific rules are approx. 10 lines of make rules. + It should be simple to create rule definitions for other package systems + found on platforms other than Solaris. Volunteers who like to help + to develop support for other packaging systems are welcome! + +- Added a note to README.compile on how to work around a problem + in /usr/include/linux/types.h that prevents to compile cdrtools + on Linux using the Sun Studio compiler. + +- A workaround against non autoconf friendly code in Cygwin has been + fixed in include/schily/iconv.h (a typo). + +- Compilations with static configuration are now also possible on HP-UX + +- All profiles libraries now have the same name as the non-profiled variants. + To create a profiled version of a command, do something like this: + + cd cdrecord + smake clean + smake COPTX=-xpg LXOPTX=-xpg LINKMODE=profiled + + For GCC use: + + cd cdrecord + smake clean + smake COPTX=-pg LXOPTX=-pg LINKMODE=profiled + +- More locale related autoconf tests (see mkisofs) + +- Handling non-large file aware systems is now more correct + +- Autoconfiguration documentation changed to make clear that $(LIB_ACL_TEST) + is sufficient for "test only" acl applications. + +- New rules ip35-irix-cc.rul/ip35-irix-gcc.rul + +- New rules i586-linux-suncc64.rul x86_64-linux-suncc.rul x86_64-linux-suncc64.rul + +- New autoconf test HAVE_SYS_SIGLIST_DEF checks for sys_siglist[] + definition in signal.h Thanks to Tatjana Heuser for reporting + +- Possibly double #defines HAVE_ICONV HAVE_ICONV_OPEN HAVE_ICONV_CLOSE + in include/schily/iconv.h fixed. Thanks to Tatjana Heuser for reporting + +- The Schily Makefile system has been enhanced to install + the profiled version of the archives in a sub-directory "profiled". + This is done via a new macro SUBINSDIR= + +- New autoconf test checks sizeof(time_t) + +- New autoconf test for the existence of stack_t and siginfo_t in signal.h + +- In order to allow better dealing with Solaris linker Mapfiles, + a getfp() function (calling abort(3)) is created when it is not + possible to implement this function because of compiler constraints. + +- Many other enhancements of the autoconfiguration have been a result + of porting the Bourne Shell into the Schily Makefilesystem. + +- added a make rule to automatically create the directory + ./incs/ + +- A CSWscdrtools Blastwave package may be automatically + created from this source. Simply call: + + smake -f Mcsw + + and check the directory packages/ for the resulting package. + +- Several fixes for the Blastwave compile (smake -f Mcsw): + + - CSWcdrtools now depends on CSWpxupgrade, this allows + to either use a dummy (source) package for CSWpxupgrade + or the binary original package that is under NDA. + + - smake now compiles without /opt/csw/ string in the binary + this makes smake100% relocatable. + + - The sccs package is now a non-relocatable packet + because of /$INS_BASE/ccs/bin/* and because of + $INS_BASE/ccs/lib/locale/ + + - RULES/rules.csw now supports to create non-relocatable + packets by adding PKG_RELOC=no to the leaf Makefile + +- Added an autoconf test for SIZEOF_FLOAT & SIZEOF_DOUBLE to allow + to compile the Bourne shell in 64 bit mode. + +- several modification have been made to fix warning messages from + a "coverity" test run. + +- config.guess now supports the "free" Apple Darwin variants + +- New directory autoconf/ contains the complete Schily autoconf system. + It is based on GNU autoconf-2.13, the latest GNU autoconf that worked + correctly even on older systems. + +- Sources and makefilesystem restructured to allow all needed files to be + retrieved from the SCCS repository and to call "make" later. To achieve + this, all symlinks have been removed from the tarball. + +- The Schily Makefile System now includes rules to recreate the file + "configure" by calling "autoconf". This is needed in order to allow the + complete source tree to be extracted from the SCCS repository. + +- Added a workaround for a GNU make design bug that causes the rules + to create file "foo" to be evaluated _past_ the "include foo" + statement in a Makefile has been evaluated. Note that you still need + GNU make 3.81. GNU make 3.80 and before will still fail to compile + cdrtools because of other unfixed GNU make bugs. + + Note that the basic GNU make design bug has been reported to the + GNU make maintainers and accepted as bug by the GNU make maintainers + in 1998 already. It is still unfixed in GNU make although smake and + SunPro make verify that there is no problem to do it right. + +- New autoconf test AC_CHECK_DLIB() checks for lib members while using + specified include files. This is a workaround for the autoconf hostile + gettext() and iconv() implementations on Linux. + +- The gettext()/iconv() tests have been rewritten to use AC_CHECK_DLIB() + +- The autoconf test AC_FUNC_VFORK from Paul Eggert was not written in + clean C and thus failed on a ANSI-C compiler, assuming that vfork() + is not available in the ANSI case. + +- README.compile fixed to refer to READMEs/README.gmake instead of + README.gmake + +- Symlink support in RULES/MKLINKS added for ia64-hp-ux-cc.rul and + ia64-hp-ux-gcc.rul, thanks to a hint from Steven M. Schweda + +- DEFAULTS*/Defaults.dragonfly added + Thanks to a hint from Thomas Klausner + +- Added a workaround for a Sun make bug + +- Next attempt wo work around the non-autoconf friendly implementation + of GNU gettext and GNU libiconv. + +- A new autoconf test allows to check whether the installed system shell + (/bin/sh) properly aborts with failed commands in "sh -ce 'cmd'". + + If failed simple commands in "sh -ce 'cmd'" do not abort complex + commands, "make" will not stop on errors in the build process. + Note that this is a definite POSIX incompatibility. + + The most well known defective shell with respect to this problem is "bash" + but /bin/sh on HP-UX-10.x (a Korn Shell modification) does not work + correctly either. If your system (Linux, HP-HX, ...) suffers from this + problem, I recommend to fetch the Schily Source consolidation from + ftp://ftp.berlios.de/pub/schily/ + Use a version that has been published past September 1st 2008, compile + and install the contained Bourne Shell as "/bin/bosh". Then call + "./.clean" and compile again. The resulting "smake" will then + automatically call "/bin/bosh" instead of "/bin/sh" in order to + execute commands. + +- Several Makefiles have been modified to support not only "make all" + but also "make install" without calling "make all" before. This was needed + after the change that omits the symlinks from the tar archive. + Thanks to a report from Klaus Ditze + +- Extended the file COPYING to mention that the GPL used by the "mkisofs project" + requires to publish the full source for all parts of mkisofs in case that you + publish mkisofs binaries. + +- Added a new Changelog file for the changes since cdrtools-2.01 + +- RUlES/rules.prg no longer includes a line with SHELL=/bin/sh. + This is needed to allow to implement a workaround for various bash + bugs that affect makefiles in case that /bin/sh is linked to bash. + + If your platform installs bash in /bin/sh (Linux, ....) or in case + that your platform offers a broken variant of the Korn Shell in /bin/sh + (like HP-UX), fetch the "Schily source consolidation" from + ftp://ftp.berlios.de/pub/schily/, compile everything and install the + original Bourne Shell, that comes with this packet, into /bin/bosh. + If you then call ./.clean and re-compile everything, you get a "smake" + that calls /bin/bosh instead of the broken system shell. + +- Added an autoconf test for POSIX violations found in POSIX.1-2008. + + The official POSIX rule is not to define "new" interfaces that + are in conflict with older interfaces of the same name. + Our interfaces fexec*() have been defined and published in 1982. + The new POSIX interfaces define a different interface and the + new POSIX interfaces even use names that are not compatible with + POSIX rules. The new POSIX interfaces in question should be called + fdexec*() to follow the rules of other similar POSIX functions. + Similar problems exist with getline()/fgetline(). + + We try to automatically rename our functions in case that the functions + could be found in the local libc. + +- Config.sub now supports NetBSD on AMD64 + +- The email addresses in many files have been updated. + +- config.sub and config.guess now support ATARI MiNT + +- All needed definition files for ATARI MiNT are now in RULES/* + +- configure now checks whether shmget() works (needed for ATARI MiNT) + +- The GNU linker on Linux now seems to support -R to set the LD_RUN_PATH + Added support for -R + +- Added definitions to allow dynamic linking with the Sun Studio compiler + on Linux + +- Added a new #define (NO_ACL) that allowed to disable ACL support via + command line when compiling + +- include/schily/libport.h split into include/schily/libport.h and + include/schily/hostname.h to allow to avoid to include netdb.h for + applications that do not need gethostname() and getdomainname() + +- include/schily/prototype.h now includes the definitions for const... + +- new autoconf test to check whether the Sun Studio compiler needs + -xarch=generic64 or -m64 for 64 bit compilation. + +- Default install user changed from "bin" to "root". + +- The install-sh script now complains if an attept was made to install + a program suid or sticky and the install user has no root privileges + +- The makefile system has been modified to allow a separate set-up + for the install path of the configuration files to e.g. /etc/ + via the DEFAULTS variable INS_RBASE + +- New autoconf test to distinguish between the free of charge + "Bundled" cc on HP-UX and the commercial cc. Only the commercial cc + supports ANSI C and the Bundled cc complains when the ANSI Options + are used: + + (Bundled) cc: warning 480: The -A option is available only with the C/ANSI C product; ignored. + (Bundled) cc: warning 480: The -O option is available only with the C/ANSI C product; ignored. + + These warnings are no longer present. + +- schily/schily.h now auto-includes stdio.h in case that the platform + supports the new POSIX.1-2008 getline()/fgetline() functions that + violate against general POSIX rules and thus overlay our implementation + that exists since 1982. + +- schily/stkframe.h now uses Intptr_t for the fr_savp member to make it + work correctly on 64bit systems without OS supplied stkframe.h. + +- New autoconf test on whether unistd.h defines extern char ** environ. + +- New file schily/stdio.h to simplify layering. + +- New Make rules for Syllable. Syllable is a fork from AtheOS. + +- New make rules for Haiku + +- New include file schily/sysexits.h is needed for Haiku + +- New autoconf test for sysexits.h + +- Autoconf tests for os2.h and os2me.h moved from cdda2wav to + global + +- config.guess and config.sub now have support for Haiku + +- New rule support for linux on "sh3", "sh4" and "sh4a" platforms. + +- autoconf now acts more reliable and more orthogonal with AC_CHECK_TYPE() vs. + AC_CHECK_SIZEOF() and carefully includes include files separately based on + fine grained tests. + +- Changed schily/dirent.h to correctly set up NAME_MAX on ATARI MiNT + +- Changed schily/maxpath.h to correctly set up NAME_MAX on ATARI MiNT + +- Add -D_GNU_SOURCE to the standard include flags for Linux in order + to unhide needed extensions. + +- Trying to add support for compilation on WIN64 using cl and gcc + +- Adding support for NT-6.0 (Win Vista) and NT-6.1 (Win 7) + +- Several typo corrections + +- New include file include/schily/wctype.h + +- New autoconf test that checks for the differences between the original + iconv() implementation from Sun and the deviating POSIX standard. + This allows to avoid compiler warning messages for mkisofs. + +- Trying to work around nasty Linux distributions that try to fool autoconf + function tests and thus may result in incorrect results for the functions + fexecl fexecle fexecv fexecve fspawnv fspawnl fspawnv_nowait getline fgetline + +- New include files include/schily/dlfcn.h and include/schily/shcall.h + +- New autoconf tests for dlopen() and similar functions + +- Fixed a typo in include/schily/fnmatch.h that prevented compilation on BeOS + +- Fixed a typo in include/schily/libport.h that prevented compilation on BeOS + +- New makefile "Mocsw" allows to create packages for "opencsw" + +- RULES/rules.csw enhanced to allow to overwrite EMAIL= and HOTLINE= from + the make command line. + +- New autoconf test for getprogname()/setprogname() + +- Support for using Microsoft "cl" to compile 64 bit binaries from Cygwin now + has been finished + +- Support for 64 bit compilation on mac OS X was added. + Call make CCOM=cc64 as on other platforms. + +- $OLIBSDIR is no longer in the RUNPATH + +- New include file include/schily/limits.h + +- Make sure that all include files in include/schily/ include + include/schily/mconfig.h + +- wide character support new + +- New makefile "Mocsw" sets defaults for "opencsw" instead of Blastwave. + Mcsw for Blastwave of course continues to exist + +- New defaults directory DEFAULTS_CSW includes special defaults that + compile e.g. for Sparc-V8 in order to get working binaries for older + Sparc non 64 Bit hardware. + +- New autoconf test HAVE_SETBUF and HAVE_SETVBUF + +- Several modification in hope to better support MINGW + +- New include files include/schily/ctype.h, include/schily/pwd.h + and include/schily/grp.h + +- All programs are now using schily/stdio.h + for orthogonality. + +- Haiku default install dir is now /boot/opt/schily + +- New rules RULES/os-cygwin_nt-6.0-wow64.id and + RULES/os-cygwin_nt-6.1-wow64.id support Cygwin on 64bit + installations of Win Vista and "Win 7". + +- New rules for compiling 64 Bit binaries on cygwin_nt-wow64 + NOTE: You need to have a 64 bit aware gcc on Cygwin to use this! + +- TEMPLATES/temp-gcc.rul and TEMPLATES/temp-xcc.rul + now correctly include cc-gcc.rul and cc-dumb.rul and thus + make the automake feature working again for completely + unknown platforms. + +- Fixed RULES/rules.inc to make sure we install xx.h instead of + xx.h.exe + +- Workaround an infinite hang in an autoconf test on 64 Bit Vista + with Cygwin + +- Include limits.h in schily/hostname.h for Linux + +- Several "%s" formats have been introduced in order to make gcc-4 + happy even though the original strings have been pointer to constant + and well known strings + +- Change the option order in the autoconf test for calling the linker + in order to avoid problems with the microsoft linker. + +- include/schily/wait.h now includes process.h on DOS systems + +- include/schily/resource.h new include file + +- include/schily/select.h new include file + +- Now all sources use schily/systeminfo.h instead of sys/systeminfo.h + +- Now all sources use schily/assert.h instead of assert.h + +- Now all sources use schily/priv.h instead of priv.h + +- Now all sources use schily/procfs.h instead of profcs.h + +- Now all sources use schily/syslog.h instead of syslog.h + +- Now all sources use schily/float.h instead of float.h + +- Now all sources use schily/ipc.h instead of sys/ipc.h + +- Now all sources use schily/sem.h instead of sys/sem.h + +- Now all sources use schily/shm.h instead of sys/shm.h + +- New autoconf test for "#pragma weak" + +- The schily makefilesystem now by default sets all locale related environment + variables to "C" in order to avoid problems. + +- Make the makefile emulation mode for "non-automake aware" make programs + like SunPro Make and GNU make more immune against oddities in the tr(1) + program that are seen with a locale that differs from LC_ALL=C + Another step to prevent some tr(1) oddities was to replace the call to + tr(1) by a call to sed(1). + +- Added GMAKE_NOWARN=true to allow to disable the gmake warning with nested + make files + +- Enhanced include/schily/priv.h to distinct Solaris and AIX process privileges + +- New include file include/schily/math.h + +- Try to workaround a problem with GCC on newer AIX versions. It seems that + e.g. gcc on AIX is not C99 compliant and does not support isnan(). + + Note that the current solution may compile and run on newer AIX versions + but does not seem to be the optimal solution as it cannot check whether + a float is a number or not. + +- *BSD comes with a broken sed(1), so we need to go back to tr(1) based + code for GNU make in the Schily Makefilesystem. + +- Added support for amd64-netbsd-cc.rul to the Schily Makefilesystem + +- Added support for DragonFly BSD to config.guess and config.sub + +- Added support for 64 bit compilation on HP-HX using "cc". + Use make CCOM=cc64 as usual to switch to 64 bit compilation. + +- Prevent a compiler warning when compiling 64 bit binaries on HP-UX + using make CCOM=cc64 + +- Some files in include/schily/*.h have been enhanced to better support VMS + +- config.guess now knows about OpenVMS + +- Changed bash test to use --version instead of -version as bash on OpenVMS + is bash-1.x + +- include/schily/xmconfig.h (containing a "static" configuration for VMS + because "configure" does not work on VMS) was enhanced. + +- Trying to add support for OpenVMS to RULES/* + +- New autoconf tests for the type "long double" and a new "max size" type. + +- VMS rules for libraries not create an archive XXX.olb instead of libXXX.a + +- schily/utypes.h enhanced to allow to define maxint_t which is + missing on VMS + +- Better autoconf test for union wait vs. int for platforms that + define union wait but use int as wait() parameter. + +- schily/vfork.h now includes unistd.h as the related definitions + are there on Solaris + +- Fixed a configure bug with opendir() inherited from GNU autoconf + +- Enhanced the vfork() autoconf test to avoid a hang on VMS + +- Support for 64 Bit compilation was added for IRIX. + Call smake CCOM=cc64 or smake CCOM=gcc64 as usual. + +- C++ compilation support fior IRIX was added to the makefile system + +- Schily Makefile rules no longer contain Simple Suffix Rules. + All default rules are now based on Pattern Matching Rules. + This speeds up smake. + +- Added autoconf test to distinct Linux ACLs from IRIX ACLs + +- Added support for Hurd on i686 to the Schily Makefilesystem. + +- Modified conf/mkdir.sh to work around a deviation found in + /usr/xpg4/bin/sed on Solaris + +- Modified conf/src-get to include conf/src-get in PATH to make + recursive calls to src-get work. + +- include/schily/stat.h now supports nanosecond timestamps in struct stat on AIX. + +- New autoconf test for nanosecond time stamps on AIX. + +- conf/mkdir.sh + +- conf/mkdep-aix.sh was changed to avoid warnings for #pragma weak a = b + as the IBM C-compiler calls a non "#pragma weak" cpp when called with -E + +- Added support for DragonFly/x86_64 + +- Support for "pcc" on Solaris x86 was added as a first step. + The C-Compiler "pcc" http://pcc.ludd.ltu.se/ is based on the + Portable C-Compiler from AT&T from the late 1970s. It is + under BSDl and thus offers compilation with a really free + build environment. + + Note that due to a pcc bug, the autoconf results for + Large File support are incorrect. Unless you edit the file + incs/i386-sunos5-pcc/xconfig.h and manually correct the + file to contain this: + +#define _FILE_OFFSET_BITS 64 /* # of bits in off_t if settable */ + + You will not get working large file support. + + Support for more Operating system will follow after the issues + in the compiler have been resolved. + +- New autoconf test checks whether fnmatch() has a working FNM_IGNORECASE + +- New autoconf test for strlcat() wcslcat() strnlen() wcsnlen() + +- Trying to add support for 32 bit compilation on newer Mac OS X + version via smake CCOM=cc32 + This only works if 32 Bit development support is installed on Mac OS X. + +- Trying to add support for 32 bit compilation on newer Linux + version via smake CCOM=cc32 + This only works if 32 Bit development support is installed on Linux. + +- include/schily/wchar.h now includes support for the mbr*() multi-byte + character handling routines. + +- include/schily/regex.h added + +- include/schily/libgen.h added + +- New autoconf tests for basename() dirname() strndup() wcsndup() + mbsinit() mbrtowc() wcrtomb() + +- New autoconf tests for wctype_t mbstate_t + +- A new make macro STRIPFLAGS allows to install stripped binaries by calling + smake STRIPFLAGS=-s install + +- Conf-files in /etc/default are now installed 0644 by default + +- Man pages are now by default installed in $(INS_BASE)/share/man + The base directory "share" may be changed by calling + + smake DEFMANBASE=something + +- README.compile now mentions: + + INS_RBASE= Set different "root" install path + DEFMANBASE= Set different man base directory + STRIPFLAGS=-s Strip all binaries with "make install" + RUNPATH= Overwrite ELF RUNPATH + DEFUMASK= Set different default permissions for + creating directories + DEFINSUMASK= Set different default permissions for + creating directories in the install path + +Libschily: + +- Fixed a typo in fconv.c that caused problems on IBM AIX5. + +- mem.c moved from libfind/ to libschily/ + +- getnum()/getllnum() & gettnum()/getlltnum() have been moved to libschily + +- printf()/fprintf()/sprintf()/snprintf() have been removed from libschily + we now use js_*printf() instead via -DSCHILY_PRINT + +- Workaround for a Mac OS X linker bug + +- New set of functions: __jmalloc()/__jrealloc()/__jsavestr() + +- New set of functions: __fjmalloc()/__fjrealloc()/__fjsavestr() + +- New set of functions: fcomerr()/fcomerrno()/ferrmsg()/ferrmsgno() + +- getargs() now allows '+' to appear in strings like "longopt=" + +- __fjmalloc()/__jmalloc() now allow to specify JM_EXIT to exit() instead + of calling siglongjmp() + +- New function file_getraise() to get the current file "raise value". + +- getargs() enhanced to fully support POSIX Command line rules + +- snprintf() is again compiled into libschily in case that the function + is missing on the current platform. + +- Fixed a bug in checkerr.c that was caused by the fact that errflags() + did try to modify it's string argument. + +- The schily *printf routines now correctly support the %j format (intmax_t) + +- getargs now first checks whether an argument can be a combination of + several single char flags before starting to set values. + +- changed __malloc() -> ___malloc() for the ongoing ATARI Port +- changed __realloc() -> ___realloc() for the ongoing ATARI Port +- changed __savestr() -> ___savestr() for the ongoing ATARI Port + +- Added sleep.c and gettimeofday.c that emulate sleep() and gettimeofday() + when using MSVC + +- Try to rename ecvt()/fcgt()/gcvt() in case that one of these functions + does not work and the libc implementation does not allow to overwrite the + function. + +- New functions eaccess() and findinpath() + +- Workaround for a GCC warning with make DEFAULTSDIR=DEFAULTS_ENG + warning: 'sccsid' defined but not used added + +- format() now supports %z for size_t and %t for ptrdiff_t + +- fexec now correctly works on Haiku and BeOS + +- Code in libschily/fexec.c cleaned up for better readability + +- libschily/checkerr.c now correctly handles the "WARN" directive. + +- wide character support new + +- several str*.c functions new for orthogonality with the new wcs* code. + +- Added a wide character patern matcher with: patwcompile(), patwmatch(), patwlmatch() + See files: + + libschily/matchw.c and libschily/matchwl.c + +- libschily/stdio/*.c fixed to use size_t as length parameter for + read*()/write*() operations. + +- libschily now is thread aware and uses the thread specific errno + value on Solaris, Linux and FreeBSD. + +- libschily/fconv.c reworked to deal with non-C99 compliant systems and to deal + with the constraints found in HP-UX-11.11. + +- libschily/*bytes.c now support 64 bit compilation and use a "ssize_t" + typed count parameter instead of "int". + +- libschily/spawn.c now uses vfork() + +- libschily/fexec.c now supports IO redirection on VMS + +- Removed some GCC warnings from libschily/getargs.c + +- Schily fnmatch() now supports FNM_IGNORECASE + +- New files strlcat.c wcslcat.c strnlen.c wcsnlen.c + +- fnmatch.c now supports multi byte characters. + +- New files basename.c and dirname.c + +- New files strndup.c and wcsndup.c + +- A new algorithm in + strncat.c strncmp.c strncpy.c strnlen.c wcsncat.c wcsncmp.c wcsncpy.c wcsnlen.c + makes the code faster and smaller. + +Libparanoia (Ported/enhanced by Jörg Schilling, originated by Monty xiphmont@mit.edu): + +- Changed from GPL to LGPL with permission from Monty. + +- paranoia_init() interface change to work around a deficit + in the Mac OS X linker. + +- "make install" now also installs the READMEs and other documentation to + ..../share/doc/libparanoia/ + +- Fixed some minor problems with K&R compilers + +- Set a useful default for the dynamic sector overlap start sector + in case that the dynamic sector overlap limits are manually changed + +- Plenty of new comments taken from cdparanoia-III-10.2 + This doubles the size of the code! + Thanks to Monty (xiphmont@mit.edu) + +- i_paranoia_overlap_r() does not longer increment beginA/beginB after the + match was found searching backwards. Taken from cdparanoia-III-10.2 + +- paranoia_free() now also frees p->cache and p->fragments taken from + cdparanoia-III-10.2 + +- Some numerical values used in paranoia.c have been replaced by + FLAG_* definitions. + +- Workaround for a GCC warning with make DEFAULTSDIR=DEFAULTS_ENG + warning: 'sccsid' defined but not used added + +- Some #define inline definitions removed as "inline" is already + handled by schily/mconfig.h + +Libedc (Optimized by Jörg Schilling, originated by Heiko Eißfeldt heiko@hexco.de): + +- Changed from GPL to CDDL with permission from Heiko + +- New Reed Solomon decoder from Heiko allows to repair defective + CD-ROM sectors. Note that this code is from ~ Y2000 and note that + I did discuss OpenSource activities for the Reed Solomon Decoder + and the Cdrecord DVD support code with Heiko at that time. + We did agree in 2000 to make both OpenSource at the same time. + +- #define memmove() to movebytes for libedc_dec if memmove is missing. + +- Fixed array index overrun in L1 coder. Thanks to Heiko Eißfeldt. + The problem was reported by the coverity test. Note that the L1 coder + is not used by cdrtools. + +- Workaround for a GCC warning with make DEFAULTSDIR=DEFAULTS_ENG + warning: 'sccsid' defined but not used added + +- Avoid some GCC warnings + +Libcdrdeflt: + +- This is a new library that has been introduced as many programs like + to parse the content of /etc/default/cdrecord + +- Workaround for a GCC warning with make DEFAULTSDIR=DEFAULTS_ENG + warning: 'sccsid' defined but not used added + +Libdeflt: + +- Workaround for a GCC warning with make DEFAULTSDIR=DEFAULTS_ENG + warning: 'sccsid' defined but not used added + +- lbdeflt needs to be compiled before libcdrdeflt when creating + dynamic libs + +Libfind: + +- The libfind code (developed as part of the sfind(1) command) has been added + in order to support "mkisofs -find ..." + +- libfind no longer uses static global data. This version of libfind + is the first real library version that even allows to implement + the find(1) program in less than 200 lines of code. + +- -perm now correctly recognises argument parsing errors by + dealing with the fact that mode_t is unsigned. + +- Is now quiet on NFSv4 ACLs (ZFS) although it still does not support them. + +- getnum()/getllnum() & gettnum()/getlltnum() have been moved to libschily + +- Using js_*printf() instead of *printf() via -DSCHILY_PRINT + +- Avoid a core dump caused by probably uninitialized data + when using -exec ... {} + + +- Workaround for a Mac OS X linker bug + +- find_parser() now does no longer call exit() on errors. + +- New funtion b_find(int argc, char ** argv, vound * dummy) + implements the ksh93 builtin function interface + +- b_find() sets the flag WALK_NOEXIT for treewalk to make sure that + the complete find implementation does not call exit() anymore. + +- new function walkinitstate() + +- Libfind is now close from the final state + +- Added README file to the directory libfind/ that help to learn how + to create a complete find(1) command, a "bsh" find builtin and a + ksh93 find builtin using libfind. + +- libfind has been restructured to allow it to be used as builtin function + inside shells like e.g. "bsh" and "ksh93". + +- libfind now allows I/O redirection (needed for shell builtins). + +- libfind now may be told to check for abort situations (needed for + shell builtins in order to check for abort on ^C). + +- New function find_free() + +- Libfind no longer leaks memory if called with a commandline with + syntax errors. + +- find_list.c now #ifdefs names like S_IFLNK + +- -size now understands things like -size +10m + +- the function getperm() has been moved to libschily + +- find_main() now supports to propagate a different environment + (e.g. with a different PATH) to fexec()) + +- libfind (used by sfind, bsh, star, mkisofs) fixed the -exec {} + + implementation. Before the fix, it could core dump if the built-in + xargs(1) would exactly fill up args to the size of ARG_MAX. + +- This is the final step to make libfind a "real" library + +- find.h walk.h fetchdir.h idcache.h moved to include/schily/ + +- A bug in libfind was fixed that causes + + find . -size -20k -ls + + to check for files smaller than 20480 Blocks instead of + looking for files smaller than 2084 characters. + +- & before some functions removed + +- Workaround for a GCC warning with make DEFAULTSDIR=DEFAULTS_ENG + warning: 'sccsid' defined but not used added + +- libfind now correctly deals with ARG_MAX in case that + the bitness of the libfind executable differs from the bitness + of the executable called by -exec name {} + + +- Fixed a typo in idcache.c + +- let libfind deal with the differences between Linux ACLs and IRIX ACLs + +- Added $(LIB_ACL_TEST) to the libs for libfind to allow a shared libfind + with ACL support on Linux. + +- Fixed a bug in libfind/walk.c (calling strcatl() with last parameter 0 + instead of (char *)0) + +- New file libfind/find_tok.h to separate the token names from the rest of the implementation. + +- Moved token definitions from find.c to find_tok.h + +- The primary -perm now implements a new feature: + + -perm +mode will evaluate as true if any of the bits set in mode are set in the + permission bits fro a file. + +- New primary operators: + -amin deprecated - only for GNU find compatibility + -cmin deprecated - only for GNU find compatibility + -mmin deprecated - only for GNU find compatibility + -empty TRUE zero sized plain file or empty directory + -execdir program [argument ...] \\; + -fls file list files similar to 'ls -ilds' into 'file' (always TRUE) + -fprint file print file names line separated into 'file' (always TRUE) + -fprint0 file print file names nul separated into 'file' (always TRUE) + -fprintnnl file print file names space separated into 'file' (always TRUE) + -ilname glob TRUE if symlink name matches shell glob + -ilpat pattern TRUE if symlink name matches pattern + -iname glob TRUE if path component matches shell glob + -ipat pattern TRUE if path component matches pattern + -ipath glob TRUE if full path matches shell glob + -ippat pattern TRUE if full path matches pattern + -okdir program [argument ...] \\; + -print0 print file names nul separated to stdout (always TRUE) + -executable TRUE if file is executable by real user id of process + -readable TRUE if file is readable by real user id of process + -writable TRUE if file is writable by real user id of process + +- Libfind Version is now 1.5 + +Libfile: + +- Workaround for a Mac OS X linker bug + +- Using js_*printf() instead of *printf() via -DSCHILY_PRINT + +- Better portability for strerror() in file.h + +- The license has been changed from a license (similar to a BSDl 4 clause) + to a new BSDL 2 clause license with permission from all involved authors. + +- Workaround for a GCC warning with make DEFAULTSDIR=DEFAULTS_ENG + warning: 'sccsid' defined but not used added + +- Some changes for better VMS support + +Libhfs_iso: + +- Workaround for a Mac OS X linker bug + +- Workaround for a GCC warning with make DEFAULTSDIR=DEFAULTS_ENG + warning: 'sccsid' defined but not used added + +- Removed a warning from the HP-UX C-compiler about a possible endless loop + +Libsiconv: + +- New library libsiconv replaces libunls. + + The new concept for libsiconv saves ~ 130 kB of executable space in + mkisofs and allows to use iconv() if it is present on the current + platform. + +- sic_open() now allows to be called with a NULL pointer argument + +- sic_list() now returns the number of listed translations + +- Deactivate TAB_SIZE check for K&R compilers. They cannot + do complex math in cpp. + +- Changed sic_nls.c to allow compilation on SCO OpenServer-5.x and + other compilers that set __STDC__ to 0 and are not at least + fully C89 compliant. + +- libsiconv/sic_nls.c modified to allow compilation with older GCC + versions. + +- Workaround for a GCC warning with make DEFAULTSDIR=DEFAULTS_ENG + warning: 'sccsid' defined but not used added + +- Fixed a copy/paste error from libsiconv. Libsiconv now correctly + initializes duplicated data structures to prevent core dumps. + Thanks to Jörg Sonnenberger for reporting. + +- Fixed a problem in libsiconv in case that the the locale is specified as + "iconv:name". + +- Add the VMS C-compiler to the list of exceptions for not fully C99 compliant + compilers to allow compilation. + +- libsiconv now supports sic_close() + +Libscg: + +- Modified the remote SCSI library stuff that has been changed due + to a security problem on order to make it compile again on HP-UX. + +- Trying to introduce a workaround for broken & + on various Linux systems. + +- Trying to introduce a workaround for the changed SCSI generic Linux + Kernel interface from Linux-2.6.8.1 and newer. + + Be very careful with testing. The Linux adaption layer for libscg + is already full of workarounds for bugs, unstable interfaces and + unwillingness of the Linux Kernel maintainers to give access to the + needed information for libscg. I am not sure whether this workaround + will not have problems. It has been tested on a Pegasus PPC running + Linux-2.6.8.1 + +- Autoconf test for broken Linux sg.h headers added + +- if libscg is compiles on newer Solaris systems, the warning: + + "Warning: Volume management is running, medialess managed drives are invisible.\n" + + is no longer printed. + + Since Solaris 11 Build 21, vold no longer hides empty drives + that are under volume management. This now allows cdrecord to be even + used to close the tray while vold is running. + + The criteria used to decide whether Solaris is "recent enough" is + #ifndef SEEK_HOLE + The definition SEEK_HOLE has been added with Solaris 11 Build 14 + while the fixed vold appears in Solaris 11 Build 21. + +- Support for root-less cdrecord using fine-grained privileges. + Remote SCSI not tests for PRIV_NET_PRIVADDR instead of (geteuid() == 0) + + If you like all users to be able to call cdrecord root-less, you need + Solaris 10 or newer. + + Edit the file /etc/security/exec_attr and add: + + All:solaris:cmd:::/opt/schily/bin/cdrecord: privs=file_dac_read,sys_devices,proc_lock_memory,proc_priocntl,net_privaddr + All:solaris:cmd:::/opt/schily/bin/readcd: privs=file_dac_read,sys_devices,net_privaddr + All:solaris:cmd:::/opt/schily/bin/cdda2wav: privs=file_dac_read,sys_devices,net_privaddr + + If you like to allow only specific user to use cdrecord, + use something like: + + CD RW:solaris:cmd:::/opt/schily/bin/cdrecord: privs=file_dac_read,sys_devices,proc_lock_memory,proc_priocntl,net_privaddr + + instead and make the users members of the profile "CD RW" + by adding a line like: + + joerg::::profiles=CD RW + + into /etc/user_attr + + Note that you either need to call cdrecord via "pfexec cdrecord ....." + or by using a profile aware shell (e.g. /usr/bin/pfksh) + +- Support for root-less cdrecord using fine-grained privileges. + Remote SCSI not tests for PRIV_NET_PRIVADDR instead of (geteuid() == 0) + This is now active since the needed autoconf code is out. + +- BeOS/Zeta libscg low level adoption code fixed. + The code now is passing a "scgcheck" test. + +- Changed from GPL to CDDL + NOTE: The libscg code may only be used together with other + code that is under an approved OpenSource license, + see http://www.opensource.org/. + +- scsi-apollo.c & scsi-hpux.c indented properly to follow Cstyle + +- scsi-linux-ata.c cast added to avoid strange warning from GCC + caused by bad coding style in the Linux kernel. + +- scsi-linux-ata.c trying again to add workarounds for new Linux + Kernel self-incompatibilities: Adding the same uid workaround + as for scsi-linux-sg.c. Note that I am not sure if this is the + only incompatibility that has been added with Linux-2.6.16, it may + be that they did also break the behavior of seteuid(). + Please help me with further testing and debugging. + +- Warn Linux users to prefer dev=ATA: over dev=ATAPI: + +- Print correct error message (using the right errno) in case that + libscg tries to open more than one file on Solaris. + +- Bumped libscg version to 0.9 + +- Trying to support FreeBSD Kernel under non-FreeBSD (GNU) userland + +- New interface function scg_numbus() returns the number of SCSI busses. + +- Trying to work around a Linux design problem that has been introduced + about 3 years ago when Linux stopped to support an orthogonal SCSI + Kernel transport for all SCSI devices. Since then, ATAPI drives are + handled different from other SCSI devices. The problem is that + the linux maintainers intentionally reduce the information that + is available in the kernel and this way prevent to allow libscg to + only show only unique drives. + + libscg now tries to map ATAPI drives to SCSI bus numbers >= 1000. + cdrecord -scanbus should now show even ATAPI drives. This allows + cdrecord/readcd/cdda2wav to implement the auto-target feature even + on Linux. + +- Try to deal with broken Linux distributions that do not provide a "HZ" macro + in /usr/include/sys/param.h + +- Use USER_HZ in favor of HZ (if available) for computing SCSI timeout values. + +- Disable automatic ATA (dev(hd*) integration and scan on pre-Linux-2.6 systems. + +- Try to skip non-POSIX compliant EROFS error codes when opening /dev/hd* + +- Trying to implement a workaround for a Linux USB DMA size problem by implementing + support for a new ioctl proposal from Alan Stern + + UPDATE: It seems that the final fix in the Linux kernel will take some time + and will be incompatible to the current patch. For this reason, I decided to + make the intermediate patch available at: + ftp://ftp.berlios.de/pub/cdrecord/alpha/Linux-USB-DMA-Size.patch + +- Using js_*printf() instead of *printf() via -DSCHILY_PRINT + +- add the new scg_numbus() to the Solaris linker map file + to allow again dynamic linking + +- scg_numbus() function for FreeBSD corrected to make cdrtools work again. + Thanks to a hint from Joseph Terner + +- Better help message for Mac OS X with dev=help + +- Detect & correctly handle SCSI send permission problems with USCSI and Solaris + +- scg/scgcmd.h upgraded to be sharable with the "scg" Solaris kernel driver + +- scg/scgio.h upgraded to be sharable with the "scg" Solaris kernel driver + +- Allow libscg to correctly compile in 64 bit mode on amd64 Solaris + platforms + +- "make install" now installs the libscg include files into $(INS_BASE)/include/scg/ + +- aspi-win32.h and spti-wnt.h now in SCCS + +- Included a patch for the CAM interface from the FreeBSD people. + The patch sets up the CAM data structures in a way that allows + SCSI bus and target scanning. + +- Unneeded code from libscg/scsierrs.c removed + +- Workaround for a GCC warning with make DEFAULTSDIR=DEFAULTS_ENG + warning: 'sccsid' defined but not used added + +- Avoid some GCC warnings + +- New SCSI low level transport for ATARI FreeMiNT has been added. + Thanks to Yvan Doyeux + +- A first version of the SCSI adaptation layer for Syllable has been added. + Thanks to Kristian Van Der Vliet for the first + implementation. + +- Haiku is a BeOS clone and thus uses scsi-beos.c as SCSI adaptation layer. + + IMPORTANT NOTICE: if you like to compile libscg with some Haiku releases + you may first need to copy a file: + + cd /boot/develop/headers/os + cp device/CAM.h drivers/CAM.h + + CAM.h was at /boot/develop/headers/os/drivers/CAM.h in BeOS and as CAM + has no own hardware, it seems to belong into /boot/develop/headers/os/drivers/ + +- Added a workaround for the type disaster in the Appls IOKit include files + in order to support 64 bit binaries + +- Raised the SCSI Bus-number limit from 256 to 500 for Linux as a workaround + for a resource leak bug in the linux kernel. The workaround lets the problem + happen much later but cannot completely avoid it. If you are hit by the Linux + kernel resource leak bug, you need to reboot. + +- The low level SCSI transport code for Mac OS X has been reworked. + + The code now supports cdrecord -scanbus + + The code now supports cdrecord's autotarget mode + + The code now supports to communicate with BluRay drives + + The code now prints a longer help text that instructs what to do in order + to work against the "diskarbitrationd" program on Mac OS that tries to + steal us our hardware. + + If someone is able and willing to help, please send mail! + + I like to be able to tell "diskarbitrationd" to give up specific drives + and to set up shared access. + +- Added a hack to liscg to allow cdrecord -scanbus to work on NetBSD + +- Added a hack to liscg to allow cdrecord -scanbus to work on OpenBSD + + libscg now supports -scanbus and cdrecord's autotarget feature on the + following platforms: + + SunOS (SunOS-3.x & SunOS-4.x) + Solaris (SunOS-5.x) + AmigaOS + ATARI MiNT + BeOS + FreeBSD + NetBSD + OpenBSD + DragonFlyBSD + Cygwin on win32 + Cygwin on win64 + Max OS X + Haiku + HP-UX + IRIX + Linux + NextSTep + OSF-1 (Digital UNIX) + OS/2 + SCO OpenServer + SCO UnixWare + VMS + Zeta + +- Make libscg deal with the new error code from HP-UX that + is returned for a non-existing ATAPI slave. + +- Some minor changes in libscg to make scgcheck report less problems + with HP-UX + +- changed a include path in libscg/scsi-mac-iokit.c to allow + compilation on "Snow Leopard" + +- Removed some GCC warnings from libscg/scsi-sgi.c + +- Retry to send SCSI commands for the FreeBSD CAM subsystem in case that + (ccb->ccb_h.status & CAM_STATUS_MASK) == CAM_REQUEUE_REQ) + +Libscgcmd: + +- This is a new SCSI command library + +- Workaround for a GCC warning with make DEFAULTSDIR=DEFAULTS_ENG + warning: 'sccsid' defined but not used added + +Libmdigest: + +- New library + +Rscsi: + +- Changed from GPL to CDDL + +- New interface function scg_numbus() returns the number of SCSI busses. + This is implemented via the new emote function "N". + +- "make install" now also installs the READMEs and other documentation to + ..../share/doc/rscsi/ + +- Workaround for a GCC warning with make DEFAULTSDIR=DEFAULTS_ENG + warning: 'sccsid' defined but not used added + +- Raise the SCSI bus nubmer limit to 1024 to allow the new Linux ATA mapping. + +- the configuration file "rscsi" is now by default installed into + /etc/default/rscsi + +- First complete version of a man page for rscsi. + +- Makefile.dfl now detects whether /etc/default/rscsi already exists + +Cdrecord: + +- Support for the Plextor GigaRec feature. + Use driveropts=gigarec=1.2 to increase CD capacity by 20%. + +- Allow the -shorttrack option for RAW mode, thanks to a report + from Sebastian Trueg + +- Enhance the minimal grace time from 2 to 3 seconds to make sure + that cdrecord will not get out of sync with locks from the + Volume management system. + +- Better checks and better error messages for /etc/default/cdrecord + +- Correct verbose print mode for old pre-MMC TEAC drives. + +- Added support for Ultra speed+ CD-RW media recognition and a check + whether the drive supports Ultra speed+ CD-RW media. + (Thanks to Alexander Noé). + +- Correctly evaluate the write speeds for Ultra speed+ CD-RW media. + This prevents wrong warnings that the "drive does not support Ultra speed+" + +- Fixed a typo in the driveropts=help messages + +- Trying to work around a noncompliance (modified interface) present on newer + Linux kernels that causes cdrecord to be unable to allocate a SCSI transfer + buffer. + + Newer Linux kernels do not honor a contract from mlockall(MCL_FUTURE) + after cdrecord turned off euid == 0 from a suid root installation. + Instead of honoring mlockall(MCL_FUTURE), Linux checks each mmap() + and compares against getrlimit(RLIMIT_MEMLOCK + +- Explicit fine grained privileges support for Solaris. + Cdrecord now switches off all privs that are no longer needed. + +- Adjust some timeouts to prevent that the drive buffer of + newer Pioneer DVD writers empties when writing high speed DVD + media. + +- Support for BeOS/Zeta shared memory was added + +- New tag CDR_MAXFIFOSIZE= in /etc/default/cdrecord allows to + limit the size of the FIFO cdrecord is using. This helps the + sysadmin to prevent other people from locking up the system. + +- Fixed a bug caused by an uninitalized variable when handling + CDR_MAXFIFOSIZE= and no file /etc/default/cdrecord exists + +- Changed from GPL to CDDL + +- Moved the DVD support code to the OpenSource part. + + Note that this has been planned in 1998 already. The plan + was to make the DVD support code OpenSource at the time when + the successor of the DVD becomes ready. + + In case you do not know the reason why the DVD support + code has not been OpenSourced before....Cdrecord is the 3rd + program that did start supporting DVD-R. This was in February 1998. + A company from the MS-WIN area did steal my libscg code + in a way that made it hard if not impossible to sue them. + This company did implement DVD support very late (not much + more than a year ago) and I did not like to "help" them again. + +- Fixed a typo in defaults.c & scsimmc.h + +- Introduced a better DMA speed test that now hopefully notices + all cases when the SCSI read buffer command does not work. + +- Print the physical drive buffer size in addition to the logical + drive buffer size when both differ. + +- Added a workaround for a NEC DVD firmwarebug that caused cdrecord + to use the CD write speed instead of the DVD write speed. + +- Added a workaround for the fact that some NEC writers return a too + small size for half written DVD+RW (use end_lba from GET PERFORMANCE + in this case). + +- Better error messages in case of no track options that are called + together with file type arguments. + +- Added new Mt.Fuji6 profile texts for HD-DVD and Blu ray writers. + +- Avoid a GCC warning in the code that works around a Linux DMA residual bug. + +- Replace nice(-20) by nice(-NZERO) + +- cdrecord now supports to set the layer break for DVD+R/DL. + This reduces the write time but as there is currently no way + to specify the layer break by hand, dual layer DVD-Video does + not yet work. + +- cdrecord -atip now also prints the rzone info for DVD+ media + +- cdrecord -atip now prints more information for DVD-R/DL media + +- cdrecord now also supports to write to DVD-RAM + +- New test for DVD-R/DL layer jump write capability + +- Starting to implement a new default write mode that is not always TAO + but fits best to the current writer and medium. + +- New option driveropts=layerbreak switches DVD-R/DL into layer jump mode + +- New option driveropts=layerbreak=value sets manual layer break + +- cdrecord -prcap now also prints the MMC4 profile list and the feature list + +- SCSI MMC4 print feature codes enhanced + +- SCSI MMC4 print feature now knows more recent feature numbers + +- "gconf" debug code removed - no longer needed + +- print formated capacity values with cdrecord -atip + +- Renamed getdelim() to getworddelim() to avoid a name clash in Cygwin. + + Note that there is still a name clash on Cygwin with getline(). As this + is a hard POSIX violation caused by Cygwin, you need to edit Cygwin's + /usr/include/stdio.h and remove the non-conforming Cygwin getline() + if you like to compile cdrtools. Please also make a bug report against + Cygwin. Tell the Cygwin people that libschily's getline() is compliant + to a commercial interface published since 1982. Cygwin needs to use a + different name if they don't like to follow the official getline() + prototype. + +- Cdrecod now default to the write mode "-sao" in case that no write mode + has been specified. Cdrecord -multi continues to default to -tao. + If your drive does not support -sao, or if cdrecord does not support -sao + for your drive, you should now call cdrecord -tao.# + +- If no dev= option has been specified or of dev= only contains a SCSI transport + specifyer but no address, cdrecord now searches the SCSI address space and + if exactly one CD-ROM drive is found, this drive is used. + + Note that this will not work on user unfriendly platforms that do not allow + SCSI address scanning or that do not allow to scan for SCSI drives in a single + address space (like Linux) this new feature does not work. + +The two modifications from above now allow dummies to call "cdrecord iso-image" +in case they are on a user-friendly OS that allows "cdrecord -scanbus" without +any further parameters to find all CD-ROM drives. + +- Calling "cdrecord file file" now works. + +- The atip information now includes enhanced rzone information + with dual layer values. + +- struct rzone_info now includes the DVD/DL enhancements from MMC + +- print_diskinfo() enhanced for DVD support + +- New option -minfo/-media-info to print Media information/status + +- prdiskstatus() which is supporting cdrecord -minfo is now a globally implemented + function. + +- cdrecord -minfo extended to print TOC related media info. + The new option -minfo is now almost complete. + +- cdrecord -scanbus now defaults to scan 1024 SCSI busses in case that the "numbus" + function is not yet available on a remote RSCSI server. + +- Make cdrecord -msinfo print the right values for "multi-session" (multi-border) + DVD-R and DVD+R. + +- cdrecord -atip output for DVD media enhanced and updated for DVD+R/DL & HD-DVD + +- Enhanced CUE sheet parser to allow writing the new Zeta CD from + http://www.zeta-os.com/cms/custom/lcd/indexe.php + +- Supporting -raw/-raw16/-raw96r in CUE sheet mode (with cuefile=). + Please test and report as I am not able to test all possible cases. + + As it seems that this new mode works now properly, it it possible + to write SVCDs on Pioneer writers that refuse to write SVCDs in -sao mode + because Pioneer implements a silly internal memory management that + reserves memory for 99 tracks with not more than 2 indices each. + + In RAW mode, cdrecord takes care of subchannel data and is able to work + around this deficit in Pioneer drives. + +- Correctly reset CDRWIN CUE sheet state at the beginning of a new track + +- Added some small changes to help compiling on VMS + +- getnum -> libschily + +- Using js_*printf() instead of *printf() via -DSCHILY_PRINT + +- Some %d -> %u changes in printf() formats. + +- Fixed MMC-4 Profile 0x14 name to "DVD-RW sequential recording" + +- A typo in the man page has been fixed (mkisofs does not have a -q but + a -quiet option). + +- A debug message in the DVD+ driver hav been updated to make cdrecord + again compile in -DDEBUG mode. + +- Trying to work around a Pioneer firmware bug that causes cdrecord to write + DVDs at lowest speed. + +- Reset SCSI silent mode after cdrecord did use the auto-mode (no dev= parameter) + to find the drive. This again gives visible error messages. + +- Let cdrecord check the available transfer size for more SCSI + commands. + +- "make install" now also installs the READMEs and other documentation to + ..../share/doc/cdrecord/ + +- New function verify() in high level code. + +- Some small typo fixes in the man page + +- Speed values are now also displayed as multiple of Blu Ray 1x + +- First support for Blu Ray media. + +- The read disk structure command has been enhanced to support the + media type field for Blu ray. + +- Speed values are now also displayed as multiple of Blu Ray 1x + +- Cdrecord now aborts with DVD+R if -dummy has been specified as there is + no -dummy mode for DVD+R. This has been forgotten for years.... + +- cdrecord -pad cue=file now works as people expect. + Thanks to to Bernd Eggink for reporting + +- Workaround for new Solaris behavior for Console users if hald + is active. Give error message and abort instead of useless messages. + +- Print Linux 2.6.8 warnings only if there really was a problem. + +- Blu Ray driver now supports "cdrecord -atip" to read manufacturer IDs. + +- Several MMC-3+ Text strings for profiles and media codes have been added. + +- New code to better print speed performance values + with cdrecord -prcap + Note: The 'MATSHITA' 'BD-MLT SW-5582 ' seems for unknown + reason not to support to retrieve the current read/write speed + values via get_performance. + +- cdrecord -minfo now prints "Mounted media class" and + "Mounted media type" name. + +- Added support to unlock the free firmware for the Plextor 755 and 760 + drives. Thanks to a hint from Alexander Noé. + This makes the following features available again: + + GIGAREC SINGLESESSION HIDECDR + + Note: You need to install free firmware in the drive first to make this + work. + + If you like, you may turn the feature off using "driveropts=plexdisable" + +- Added support for enhanced gigarec found in newer Plextor drives. + The gigarec values 0.9 anf 1.1 are now supported. Cdrecord now supports: + + 0.6, 0.7, 0.8, 0.9, 1.0, 1.1, 1.2, 1.3, 1.4 + + Note that not all values are supported by all drives. + +- Added support for Yamaha AudioMaster in the Plextor Premium 2. + Thanks to a hint from Paolo Saggese. Original Yamaha audiomaster + is like gigarec 0.85, Plextor implemented 0.8666 which still looks + like a useful additional intermediate value. + +- Make the man page more obvious that gigarec with values < 1.0 is _very_ + similar to audiomaster except for pit sizes. + +- Code restructured from a CD/DVD only program to a program that + writes multiple different similar media. + +- New simulation driver "bd_simul" + +- Trying to make the text in cdrecord.c that forbids incompatible changes + to be published under the name "cdrecord" more user friendly. + +- Better code structure for dvd/bd driver recognition. + +- Allow to disable all speed limitations by setting the environment variable + CDR_FORCESPEED to "any". This is needed to allow full write speed on drives + with defective firmware (like e.g. the Plextor PXW-716) that do not enable + DMA with the "read buffer" command. + +- Changed the drive buffer size recognition so that cdrecord now shows + correct size values even for the LG GSA-H55N + +- Take more care with calling SCSI read buffer while trying to find the + DMA speed of the drive + +- Allow to blank DVD-RW/DL. There are no known drives yet, but it seems that + the media is already sold. + +- Add a format-type value column to the formatted capacity table to allow + for better identification of the various entries. + +- New wording for some comment to make clear that the name "cdrecord" cannot be + used after specific parts of the code have been changed. + +- Cdrecord now correctly recognizes unformatted BD-RE media. + +- cdrecord man page now mentions the "lofi" driver for Solaris + +- Cdrecord now re-checks the media after a "blank" or "format" + operation has been issued. This prevents problems with incorrect + media size assumptions. + +- cdrecord now implements a simulated "blank" feature for media that + itself does not support blanking: currently DVD-RAM + DVD+RW + +- cdrecord/readcd/cdda2wav now support an enhanced /etc/default/cdrecord file + with an additional parameter to specify the max. transfer size for a device. + +- CDR_FORCESPEED=any now works for cdrecord to switch off DMA speed test results + +- Make cdrecord compile again with a K&R compiler + +- Add a "blank emulation" layer to the BluRay driver too. + +- Reduced the minimal write speed of a ultraspeed CD-RW capable drive + from 16x to 10x. + +- cdrecord now correctly writes DVD+R/DL media with all drives. + Before, there have been problems at the layer break with some + drives. + +- The cdrecord DVD multi-border code from May 2007 has been made OpenSource. + Multi-Border is the DVD multi-session equivalent. It allows to write + up to 1024 sessions on a single DVD. + + The code currently covers the most important case of writing to DVD-R/DVD-RW + media. + + You need to specify -multi for every session. + +- The cdrecord man page now mentions -multi with respect to DVD multi-border. + +- Make sure that the DVD and BluRay drivers do not lower the default timeout. + cdrecord timeout=# now always allows to raise the default timeout to a larger + value. + +- Added a workaround to prevent the Lite-ON BD B LH-2B1S/AL09 + from hanging up when trying to write a BluRay Medium. + +- Cdrecord now by default tries to set up a DMA Size of 126 kB. + If non-MMC drives are found, we fall back to the old value of 63 kB + +- Converted to use libcdrdeflt + +- Converted to use libscgcmd + +- Man page now includes many small modifications that mention BluRay media. + +- Workaround for a GCC warning with make DEFAULTSDIR=DEFAULTS_ENG + warning: 'sccsid' defined but not used added + +- New driver "mmc_bdrom" is used for profile 0x40 and allows to + retrieve the ADIP data for BD-R media that is reported as BD-ROM + by some drives. + +- Added a workaround for a firmware bug in the drive + 'HL-DT-ST' 'DVD-RAM GH22NP20' + that reports DVD-R media as media with zero size. + +- Added a workaround for a firmware bug in many 'HL-DT-ST' drives + (e.g. 'HL-DT-ST' 'DVD-RAM GSA-H55N') that return unreliable data + with READ BUFFER and makes it impossible to get the drive DMA + transfer speed. + +- Added a workaround for frequent kernel/driver bugs in FreeBSD and Solaris + that prevent the DMA residual count to work. + +- Try to call scg_close() before exiting cdrecord. + +- Default Transfer Size reverted from 126 kB to 63 kB. + Sorry FreeBSD guys - it seems that FreeBSD is the only OS that + correctly deals with larger DMA sizes. + + FreeBSD people may add a line with CDR_TRANSFERSIZE=126k + in /etc/default/cdrecord to raise the default. + + The current problems are: + + - On Solaris 10 Sparc fs=126k causes a kernel panic + + - On Solaris 11 the drivers partially return incorrect + max DMA sizes that may cause cdrecord to fail. + + - On Linux with USB fs=126k may not work at all + + - On Linux with other interfaces, fs=126k may reduce + the DMA speed to a value that always causes buffer + underruns. + + I hope to find a better solution in the next development cycle + after the current code has been release as stable version. + Expect the next stable release to appear very soon. + +- Cdrecord is now by default installed suid root in case that the caller + of make install has root privileges + +- the configuration file "cdrecord" is now by default installed into + /etc/default/cdrecord + +- Some unused variables and functions have been commented out + +- Avoid some GCC warnings + +- Some small typos in error messages have been fixed. + +- Workaround for 'TSSTcorp' 'CDDVDW SE-S224Q ' 'TS01' firmware bug. + The drives does not return SES_UNDEF for unformatted DVD+RW media. + +- Do not install by overwriting /etc/default/cdrecord in case an earlier file + exists. + + Please give feedback on what you like to see in future. + + Do you like to see a sample file installed? + +- README.cdplus has been renewed + +- Fixed a minor typo in cdrecord + +- Some better warnings with cdrecord in case that the environment variables + 'CDR_FORCERAWSPEED=' or 'CDR_FORCSPEED=' have been specified. + +- Better error messages when the media size is unknown + +- Try to work around a firmware bug in the drive: + 'HL-DT-ST' 'DVD-RAM GH22NP20' '1.02' + that is in effect with DVD+R media. + + ***** ATTENTION ***** + + The algorithm to fetch the size information from a DVD+R/RW medium was changed with this + release. Please check for and report problems. + +- cdtext.c now checks for empty CD-Text files to prevent a later endless loop in cdrecord + while writing the TOC. Thanks to Sebastian Trüg for reporting. + +- Man page corrected some problems from hyphen -> minus + +- Cdrecord now calls read_format_capacities() in silent mode in order to + check whether the current drive supports this SCSI command. + +- Correctly abort the FIFO in cdrecord on BeOS and Haiku + in case that the clone ara cannot be made shared. + +- Correctly abort the FIFO in cdrecord on BeOS and Haiku + in case that the clone ara cannot be made shared. + +- The cdrecord man page now mentions that the -clone mode is a bad idea to copy + audio CDs. + +- Better man page with repect to dev= + +- The cdrecord man page has been restructured. + +- Fixed a bug in the workaround code for a firmware bug for DVD+R + media in HL-DT-ST drives. + +- Added a workaround for a firmware oddity with DVD+RW on + '_NEC ' 'DVD_RW ND-3500AG' with media written from other drives. + +- Work around a bug in the firmware from drives + developed by PIONEER in November 2009. This affects + drives labelled "Pioneer", "Plextor" and "TEAC". + Do no longer call cdr_buffer_cap() before the drive + buffer was not at least filled once to avoid that + the the drive throughs away all data. + +- Man page reworked + +- Cdrecord now defaults to -sao in case that cuefile=something was specified + +- man page restructured + +- Cdrecord now is able to use -isosize even in case that the image data + is read from stdin. This makes it easier to use "mkisofs | cdrecord". + +- The CDRWIN cue sheet parser has been enhanced to give better error messages: + + - There are now hints on what is missing in the CUE file + + - The error message now also contains the column where the problem was detected + +- Allow cdrecord to compile again on a pre-C99 compiler (there was a variable declaration + past a statement in a function. + +- A description for the *.inf file fomat was added to the cdrecord man page + +- New (previously missing) CD-Text tags have been added to auinfo.c (*.inf file parser): + + Albumsongwriter= + Albumcomposer= + Albumarranger= + Albummessage= + Albumclosed_info= + + Note that these tags do not appear in the CDDB database. + +- The *.inf file parser now supports a new tag "Track=" that + is intended to carry the absolute track number from the original disk. + +- Cdrecord now supports to copy CDs with hidden track if there are *.inf files + created by cdda2wav. In order to copy a CD with hidden Track with optimal + quality, call: + + cdda2wav -vall -B -paranoia paraports=proof cddb=0 + cdrecord -v -sao -useinfo -text *.wav + +- cdwrite@lists.debian.org removed from man page + please use the official mailing lists for cdrecord that exist since 10 years: + http://developer.berlios.de/mail/?group_id=5 + +- Hidden Track support is now complete: + +- Added support for writing Hidden Audio Tracks before Track #1 + in the Mtsushita CW-7501 device driver. + +- Added support for writing Hidden Audio Tracks before Track #1 + in the Sony CDU-924 / CDU-948 device driver. + +- Added support for writing Hidden Audio Tracks in RAW mode. + +- Added support for Track #1 having a different number than 1 into + the CUE file parser. + +- The CUE file parser now prints much better error messages in case that + a keyword is seen out of the permitted order. + +- The CUE file parser now supports hidden tracks. + +- Fixed a bug in the CUE file parser that caused "pregap size 0" (missing + INDEX 00) to be replaced by the default pregap size of 150 sectors. + +- Added a workaround for a firmware bug in the drive: + 'HL-DT-ST' 'BD-RE BH10LS30 ' '1.00' + That causes the drive to return zero media size for BluRay media. + +- cdrecord now aborts if the cuefile= option was specified with a non-CD + media in the drive. + +- CDRWIN CUE files now may refer to several data files where each data file + contains less than the whole disk but more than a single track. + +- The CUE parser now correctly sets the sector size information for the + lead-in area. + +- The CUE parser now by default only accepts CDRWIN CUE compliant files + but may be switched into an enhanced mode by introducing a special comment + "REM CDRTOOLS" + +- The CUE parser now supports a FILE command between INDEX 00 and INDEX 01. + This is needed in order to write CUE sheets from Exact Audio Copy. + Note that cdrecord needs to be switched into the enhanced CUE parser mode + by either specifying "REM CDRTOOLS" or by specifying: + REM COMMENT "ExactAudioCopy v0.99pb5" + + Also note that cdrecord currently does not support more than one FILE + command per TRACK. For this reason, hidden audio tracks only work if + the hidden audio data is in the same file that also contains data for + track 1. + +- New commands "ARRANGER", "COMPOSER" and "MESSAGE" for adding CD-Text information + in CUE files. Note that these commands are cdrecord specific extensions that + re unknown by CDRWIN and thus need "REM CDRTOOLS" to be enabled. + +- The CUE file format is now documented in the cdrecord man page. + +- Fixed a bug with INDEX 00 support for CUE files from + ExactAudioCopy + +- Cdrecord no longer tries to close a session on a BD-RE media. + This is not supported in the recent MMC Standard and most drives + return a SCSI error when attempting to close such a session. + +- Cdrecord now auto-formats unformatted (maiden) BD-RE media. + Unformatted BD-RE media is rare but it exists. This function + completes the BluRay support in cdrecord. + +- Cdrecord now prints progress messages when formatting DVD+RW media + and called with -v. + +- Many small typo changes in the cdrecord man page + +- The EXAMPLES section in the cdrecord man page has been improved by reordering + abd by creating sub-headlines. Thanks to Lucas Levrel. + + +Cdda2wav (Maintained/enhanced by Jörg Schilling, originated by Heiko Eißfeldt heiko@hexco.de): + +- Added a workaround for the _POSIX_PRIORITY_SCHEDULING behavior + on MacosX: defined but not supported + Thanks to: Emanuele Giaquinta + +- Bugfix: cdda2wav did previously chose to ignore the result of realloc(3) + This prevents core-dumps. + +- Explicit fine grained privileges support for Solaris. + Cdda2wav now switches off all privs that are no longer needed. + +- Write correct error info in case that BeOS/Zeta *_area() calls + fail. + +- As Heiko did not work on cdda2wav since September 2004, + Heiko did hand over the SCCS history for cdda2wav in February 2006 + +- Autoconf test for added (FreeBSD) + +- Added some missing FreeBSD related changes from Heiko done in 2004 + + IMPORTANT: I need testers for FreeBSD and DragonFly BSD as + a result of the merge with the complex changes + from Heiko. + +- Started to make cdda2wav Cstyle compliant. + +- Avoid to shutdown the whole system when kill(getppid(), SKGINT) + would result in kill -INT 1 because the parent cdda2wav is + dead and the child is orphaned and cdda2wav has been called by root. + +- __FreeBSD_version >= 600021 have devmajor == 0 for all devices. + Thanks to Marius Strobl for reporting. + +- General #ifdef structure related to FreeBSD in mycdrom.h now + corrected, thanks to Marius Strobl. + +- Try to fix some FreeBSD/DragonFly related problems that have been + introduced with a06 when Heiko's changes from 2004 have been integrated + + IMPORTANT: I need testers for FreeBSD and DragonFly BSD as + a result of the merge with the complex changes + from Heiko. + +- Changed from GPL to CDDL with permission from Heiko + +- Code now has been completely reindented to follow the "Cstyle" + rules. As this did result in touching more than 50% of the + code, and as some of the code is platform specific I cannot grant + that I did not introduce bugs. Please test, in special on + platforms other than Solaris. + +- Some modifications needed because of the restructured makefiles. + +- Replace nice(-20) by nice(-NZERO) + +- Renamed Inquiry() by ScsiInquiry() for better VMS support + +- Fixed an unsigned comparison with zero in resample.c + +- Fixed a printf format string with short argument. + +- Fixed a typo in scsi_cmds.c thanks to Steven M. Schweda for reporting. + +- New Option ts= # similar to cdrecord's and readcd's options. + This allows to work around a Linux kernel bug that prevents + cdda2wav to be usable with USB drives. To work around this + Linux bug try cdda2wav ts=128k or less. + +- If no dev= option has been specified or of dev= only contains a SCSI transport + specifyer but no address, cdda2wav now searches the SCSI address space and + if exactly one CD-ROM drive is found, this drive is used. + + Note that this will not work on user unfriendly platforms that do not allow + SCSI address scanning or that do not allow to scan for SCSI drives in a single + address space (like Linux) this new feature does not work. + +- Trying to support FreeBSD Kernel under non-FreeBSD (GNU) userland + +- The messages for the auto-target function are now printed on stderr + to avoid problems with merged output from stdout. + +- cdda2wav -scanbus now defaults to scan 1024 SCSI busses in case that the "numbus" + function is not yet available on a remote RSCSI server. + +- Added some small changes to help compiling on VMS + +- getnum -> libschily + +- Using js_*printf() instead of *printf() via -DSCHILY_PRINT + +- Use the new paranoia_init() interface + +- Let cdda2wav print the -version output to stdout and in a similar form + as other cdrtools programs do. + +- "make install" now also installs the READMEs and other documentation to + ..../share/doc/cdda2wav/ + +- Added some casts to interface.c and ioctl.c in order to prevent warnings + from the Sun Studio 12 compiler. + +- The man page has been restructured to correctly use bold and italic + with option descriptions. + +- Workaround for new Solaris behavior for Console users if hald + is active. Give error message and abort instead of useless messages. + +- cdda2wav now includes a copyright message and a year number + with the -version output. + +- Add a workaround for a definition in on SunOS-4.x + +- Fixed some minor problems with K&R compilers + +- Fixed a +- 1 problem in realloc() for TOC handling. + Thanks to a report from Joshua Reuben Roys + +- New option start-sector=sector allows to set an absolute sector number + where to start audio extraction. + + This option has been added as a first step to allow to write a + wrapper for cdda2wav to create a "GStreamer plugin". This helps + to: + + - avoid license problems in libcdio + + - allows to call a privileged programs like cdda2wav from a GUI + to grant full audio extraction quality that needs generic SCSI + commands. + +- Cstyle indentation changes + +- Man page now includes some forgotten options + +- Man page now describes the paraopts= sub option list + +- Man page now describes the statistic output from the paranoia code + +- New option out-fd=descriptor allows to set redirect informational output + to a different file descriptor than stderr. + +- New option audio-fd=descriptor allows to set redirect audio ("-") output + to a different file descriptor than stdout. + + This option has been added as a further step to allow to write a + wrapper for cdda2wav to create a "GStreamer plugin". This helps + to: + + - avoid license problems in libcdio + + - allows to call a privileged programs like cdda2wav from a GUI + to grant full audio extraction quality that needs generic SCSI + commands. + +- Explain that libparanoia is not a different Media access method but a filter + between the lower and the upper layers of cdda2wav. + +- Fixed a typo in the man page according to OpenSolaris bug ID 6489402 + +- cdrecord/readcd/cdda2wav now support an enhanced /etc/default/cdrecord file + with an additional parameter to specify the max. transfer size for a device. + +- New option -no-fork tells cdda2wav to run in unbuffered mode. + +- New option -interactive + + The first test implementation supports the following interactive commands: + + stop stop reading + + If you like to empty the internal buffers, + send "stop" read everything you get from the output pipe + repeat this until no further data is available. + + cont continue reading + + read trasks Start reading from new trackno + + read sectors Start reading from new sector number + + exit + quit exit cdda2wav + + This new option is a result from a collaboration with the GNOME + developers to make "sound-juicer" legal. Sound-juicer suffers from + license problems from libcdio which is usually loaded as a + "gstreamer" plugin. + + The option -interactive together with the related new libgstcdda2wavsrc + gives better quality of the extracted audio-data and does not cause license + violations. + +- Interactive mode for corrected to allow new tests + for replacing libcdio in GStreamer. + +- child_pid variable moved into global var structure. + +- The new -interactive option has now been stabilized for a first integration that + allows to replace libcdio for sound-juicer to come to an implementation without + license violations. + +- The MD5 implementation (although currently unused) has been + changed from the RSA variant (that requires advertizing for RSA) + to a "public domain" implementation from Colin Plumb used + in OpenBSD. + +- The new MD5 implementation has been made portable. + +- Converted to use libcdrdeflt + +- Converted to use libscgcmd + +- The -M/-md5 option now finally works. + Cdda2wav now computes MD5-sums for the audio data and writes the result + into the *.inf files. + +- Workaround for a GCC warning with make DEFAULTSDIR=DEFAULTS_ENG + warning: 'sccsid' defined but not used added + +- Suppress some incorrect warnings from GCC by doing a double cast. + +- Allow longer path names for *.inf files. + +- SCSI *scgp is now a clean parameter to all SCSI transport functions. + +- toc.c changed to support the new schily/hostname.h + +- Cdda2wav is now by default installed suid root in case that the caller + of make install has root privileges + +- Some unused variables and functions have been commented out + +- struct tocdesc has been restructured to prevent struct tail padding on MC-680x0 systems. + Thanks to Yvan Doyeux for reporting this for the ATARI port. + +- The drive 'HP ' 'CD-Writer+ 9600 ' '1.0a' does not like to read SCSI FULL TOC + with a too long transfer lenght. First retrieve the available data count. + +- New options -debug -debug-scsi -kdebug -kdebug-scsi -kd to set SCSI low level + debugging in libscg + +- The option -v not also supports "!" and "not" to invert the list + of "verbose" options (e.g. -v!indices for everything but indices). + +- Avoid some GCC warnings specific to HP-UX + +- Added a workaround for gmake < version 3.81. + Older gmake versions evaluate dependencies in the wrong order. + +- Prevent a core dump from hitting ^C while cdda2wav tries to call + scg_open() to open the SCSI devices. + +- A buggy address computation that caused problems with 64 bit binaries + has been fixed. + +- Cdda2wav now correctly deals with longer CD-Text information. + Thanks to Yvan Doyeux for creating a related test CD... + +- Cdda2wav now uses an autoconf test to decide whether BEOS clone areas + can be used. This gives Haiku compatibility. + +- Fixed a bug introduced with introducing support for MD5 Sums. + Cdda2wav now disables the MD5 sum output in case -no-infofile has been specified + +- Autoconf tests for os2.h and os2me.h moved from cdda2wav to + global + +- cdda2wav now supports new parameters for the -output-endianess option. + "host" or "machine" represent the actual byte order of the host CPU in the current OS. + +- Fixed a man page bug that did hide some text from the visible result. Thanks + to Michael Prokop + +- Man page corrected some problems from hyphen -> minus + +- Removed some Copyright hints to people who did never really enter code into mkisofs + +- Removed a Copyright hint for RSA that is no longer valid. + +- cdda2wav now gives better readable text with cdda2wav -help + +- BeOS has a /boot/develop/headers/be/support/ByteOrder.h that also defines + _BYTEORDER_H and thus interferes with our cdda2wav/byteorder.h + +- The -interactive option is now mentioned in the -help output and the man page. + +- Call unit_ready() before retrieving the TOC data in order to work around a Solaris + scsa2usb (SCSA to USB Driver) bug. + +- Cdda2wav is now using the sha1 implementation from libmdigest + +- Try to avoid an endless loop while parsing ISO-9660 directories + from rotten CD+ sessions. + +- Better man page with repect to dev= + +- The cdda2wav man page has been restructured. + +- cdda2wav now correctly deals with the case when no sound device + was specified. Thanks to Robert Grimm + for reporting. + +- Man page reworked + +- Removed some (int) casts before the SNDCTL_DSP_* ioctl()s + +- The default outout format is now .wav for all platforms. + Before, the default for Solaris was .au. + +- man page restructured + +- New arg "all" to -t option. + + cdda2wav -B extracts all audio tacks into separate files + cdda2wav -tall extracts all audio tacks into a single files + +- cdda2wav now by default writes a file "xxx.cdtext" with raw binary + CD-Text data in case cdda2wav was told to retrieve CD-Text. + +- A new option -no-textfile allows to disable the creation of the file "audio.cdtext" + This version of cdda2wav creates a file "audio.cdtext" or similar (depending on + the set up file name base) in case that there is CD-Text on the medium and that + the drives supports to read the CD-Text data with MMC SCSI commands. + +- Fixed a bug in cdda2wav that caused cdda2wav to set up the file name base too late. + This results in the files "audio.cdindex" and "audio.cddb" always to have this name + while the *.inf files use the name base from the cdda2wav arguments. Now all + files created by cdda2wav honor the file name base. + +- Cdda2wav by default fills empty track specific CD-Text data with the Disk global + value (if present). A new option -no-textdefaults allows to disable this fallback + and leaves the related fields empty if they are empty on the master CD. + +- Fixed a problem with cdda2wav -interactive (used by GNOME GSTREAMER CD-DAE plugin) + that could cause cdda2wav to dump core in case that there is a data + session past the last audio track. + +- New (previously missing) CD-Text tags have been added to the *.inf files: + + Albumsongwriter= + Songwriter= + Albumcomposer= + Composer= + Albumarranger= + Arranger= + Albummessage= + Message= + Albumclosed_info= + Closed_info= + + Note that these tags do not appear in the CDDB database. + +- Cdda2wav now permits to use "max" for the endtrack number. This + allows to specify e.g. -t2+max for a list of tracks from track #2 + to the last audio track on the disk. + +- New option -cuefile allows to tell cdda2wav to create a CDRWIN CUE + file. This currently only works together with wither -tall, or with + -t0+max or -t1+max. + + Note that due to a misconception in the CDRWIN CUE file definition, + it is impossible to create 100% correct CD-audio copy by 100% + following the CDRWIN CUE file definition and having separate audio + files for each track at the same time. For this reason, it is currently + impossible to create CDRWIN CUE files while using cdda2wav -B. + +- Cdda2wav now only writes a binary *.cdtext file in case that this + file would contain more data than a header that tells that there + is no further content. + +- Cdda2wav no longer removes the Index0 entry from a longer Index list + if Index0 is -1. + +- Cdda2wav now automatically scans for hidden audio tracks. This is a + complex task as there are drives that do not allow to read the + hidden data before track 1. + +- New option -no-hidden-track allows to prevent cdda2wav from scanning + for a hidden audio track. + +- Cdda2wav now writes the new tag "Track=" into the *.inf files that + is intended to carry the absolute track number from the original disk. + +- A shortcut for paraopts=sectors-per-track-1,retries=200 was introduced. + The name of the shortcut is "proof", so just use "paraopts=proof" for + selecting the most stringent paranoia mode. + +- Cdda2wav now automatically selects paranoia mode in case that the + paraopts= option was used. + +- Cdda2wav now again works in suid root mode on Solaris 11. It seems that + the development versions from Solaris 11 did change the behavior with + fine grained privileges in a way that was incompatible with the way + cdda2wav did try to handle both suid root and fine grained privileges. + +- Fixed a small bug that made cdda2wav with hidden track support not fully + compatible to earlier versions. In case that only one track is to be extracted, + this is again always track #1 regardless whether the CD has a hidden track. + +- Fixed a bug with CDRWIN CUE file support. Cdda2wav used the tag "WAV" instead + of "WAVE" for the data type specifier in the FILE tag. + +- cdwrite@lists.debian.org removed from man page + please use the official mailing lists for cdrecord that exist since 10 years: + http://developer.berlios.de/mail/?group_id=5 + +- Hidden Track support is now complete: + +- Fixed a bug in the cdda2wav track loop control that caused cdda2wav + not to write the *.inf file for the last track in case of an audio CD + with a hidden track. + +- Introduced an alias "isrc" and "ISRC" for -vtrackid + +- Introduced an alias "mcn" and "MCN" for -vcatalog + +- cdda2wav now emits a "PREGAP" keyword in the CUE file for a CD without + hidden track if it starts with a sector number > 0. + +- New cdda2wav option -vaudio-tracks + +- Make cdda2wav -q silent again (even with CDs with hidden track) to + make it compatible again with scripts. + +- cdda2ogg and cdda2ogg.1 added to standard install + The script cdda2ogg was enhanced to work seamlessly. + +- cdda2mp3 and cdda2mp3.1 added to standard install + The script cdda2mp3 was enhanced to work seamlessly. + +- the scripts cdda2ogg and cdda2mp3 now allow to forward options to + cdda2wav. + + In order to enable "paranoia mode", call: + + cdda2ogg -paranoia + + In order to enable the most proof "paranoia mode", call: + + cdda2ogg -paraopts=proof + +- The cdda2ogg man page was completely reworked + +- The SYSvr4 pkg definition now includes cdda2ogg and cdda2mp3 + +- Added a workaround for a broken ASPI that hangs with + odd transfer counts. + +- Makefile.dfl now detects whether /etc/default/cdrecord already exists + +Readcd: + +- Allow readcd to work correctly in -scanbus mode + Thanks to Fabian Keil for reporting. + +- Explicit fine grained privileges support for Solaris. + readcd now switches off all privs that are no longer needed. + +- Support for BeOS/Zeta shared memory was added + +- -scanbus behavior corrected + +- Changed from GPL to CDDL + +- New experimental option -edc-corr. + +- readcd meshpoints=# -factor now prints correct CD speed factors + as it now correctly computes sector size. + +- If no dev= option has been specified or of dev= only contains a SCSI transport + specifyer but no address, readcd now searches the SCSI address space and + if exactly one CD-ROM drive is found, this drive is used. + + Note that this will not work on user unfriendly platforms that do not allow + SCSI address scanning or that do not allow to scan for SCSI drives in a single + address space (like Linux) this new feature does not work. + +- The messages for the auto-target function are now printed on stderr + to avoid problems with merged output from stdout. + +- readcd -scanbus now defaults to scan 1024 SCSI busses in case that the "numbus" + function is not yet available on a remote RSCSI server. + +- Using js_*printf() instead of *printf() via -DSCHILY_PRINT + +- Speed values are now also displayed as multiple of Blu Ray 1x + +- readcd -factor meshpoints=100 now also displays the speed as multiple + of Blu Ray speed if the medium is a BD + +- Added support to read C1/C2/CU errors from Plextor and NEC/Optiarc drives. + Thanks to Alexander Noé for the code. + + If you run the test with: + + readcd -cxscan + + you will only see summary output. If you add one -v, you see the error + information for every second that does include errors. If you add -vv, + you see information for every second in the data range. + + Note that the output format will change in future to support GNU plot. + I am looking for suggestions for a useful output format. + +- Added support for pisum8 tests for DVDs on drives made by Plextor + + If you run the test with: + + readcd -pi8scan + +- Added support for pif tests for DVDs on drives made by Plextor + + If you run the test with: + + readcd -pifscan + + Fall all three new options, you will only see summary output. If you + add one -v, you see the error information for every second (CD) + 8 * 32 KB (pisum8) or 32 KB (pif) that does include errors. If you add + -vv, you see information for every interval in the data range. + + Note that the output format may change in future, + I am looking for suggestions for a useful output format. + +- New option -plot allows to modify the outputformat for the options + -cxscan, -pi8scan, -pifscan + + To plot a list of pisum8 and pif errors, call: + + readcd -pi8scan -plot > pisum8 + readcd -pifscan -plot > pif + gnuplot + gnuplot> plot "pisum8" w l + gnuplot> replot "pif" w l + + To plot a list of C1/C2/CU errors call: + + readcd -cxscan > cx + awk '{ print $1 " " $2 }' < cx > c1errs + awk '{ print $1 " " $3 }' < cx > c2errs + awk '{ print $1 " " $4 }' < cx > cuerrs + gnuplot + gnuplot> plot "c1errs" w l + gnuplot> replot "c2errs" w l + gnuplot> replot "cuerrs" w l + +- Man page now mentions -edc-corr + +- cdrecord/readcd/cdda2wav now support an enhanced /etc/default/cdrecord file + with an additional parameter to specify the max. transfer size for a device. + +- Converted to use libcdrdeflt + +- Converted to use libscgcmd + +- Workaround for a GCC warning with make DEFAULTSDIR=DEFAULTS_ENG + warning: 'sccsid' defined but not used added + +- Readcd is now by default installed suid root in case that the caller + of make install has root privileges + +- Try to exit(excode) instead of exit(0) in case that siginificant + problems occurred. + +- Prevent readcd from dumping core via raisecond("file_write_err")->abort() + in case that the target filesystem fills up. + +- Added a workaround for gmake < version 3.81. + Older gmake versions evaluate dependencies in the wrong order. + +- Man page corrected some problems from hyphen -> minus + +- "readcd" no longer dumps core if the C2Scan function is selected from the + interactive interface. + +- Fixed a problem in the man page. Some nroff versions abort under + some conditions if "Heiko Eißfeldt" is correctly written with "ß". + +- The readcd man page now mentions that the -clone mode is a bad idea to copy + audio CDs. + +- readcd now only send the Plextor specific SCSI commands for the -cxscan + option in case that the drive identifies as Plextor. + +- Better man page with repect to dev= + +- Man page reworked + +- man page restructured + +- cdwrite@lists.debian.org removed from man page + please use the official mailing lists for cdrecord that exist since 10 years: + http://developer.berlios.de/mail/?group_id=5 + +- Added a workaround for a broken ASPI that hangs with + odd transfer counts. + +Scgcheck: + +- Fixed DMA overrun test. BeOS/Zeta did pass the test but + scgcheck did complain before. + +- Changed from GPL to CDDL + +- Using js_*printf() instead of *printf() via -DSCHILY_PRINT + +- Fixed a typo in the -version output + +- Make clear that "scgcheck" has been written to verify the interface + for libscg. The name "scgcheck" cannot be used if the code has been + changed. + +- New option -auto for fully automated tests + +- Restructured for better results + +- Converted to use libcdrdeflt + +- Converted to use libscgcmd + +- Workaround for a GCC warning with make DEFAULTSDIR=DEFAULTS_ENG + warning: 'sccsid' defined but not used added + +- Avoid some GCC warnings + +- Added a workaround for gmake < version 3.81. + Older gmake versions evaluate dependencies in the wrong order. + +- Man page corrected some problems from hyphen -> minus + +- Better man page with repect to dev= + +- Man page reworked + +- cdwrite@lists.debian.org removed from man page + please use the official mailing lists for cdrecord that exist since 10 years: + http://developer.berlios.de/mail/?group_id=5 + +Scgskeleton: + +- Allow readcd to work correctly in -scanbus mode + Thanks to Fabian Keil for reporting. + +- Explicit fine grained privileges support for Solaris. + Scgskeleton now switches off all privs that are no longer needed. + +- -scanbus behavior corrected + +- Changed from GPL to CDDL + +- Using js_*printf() instead of *printf() via -DSCHILY_PRINT + +- New merged code from the "sformat" and "cdrecord" consolidation. + +- Bumped to version 1.2 + +- Converted to use libcdrdeflt + +- Converted to use libscgcmd + +- Workaround for a GCC warning with make DEFAULTSDIR=DEFAULTS_ENG + warning: 'sccsid' defined but not used added + +- Added a workaround for gmake < version 3.81. + Older gmake versions evaluate dependencies in the wrong order. + +- Better support for large files (using ftello()/fseeko()) + +- A man page was created for scgskeleton. + +Btcflash: + +- -scanbus behavior corrected + +- man page added + +- Changed from GPL to CDDL + +- Using js_*printf() instead of *printf() via -DSCHILY_PRINT + +- Make btcflash compile on K&R compilers (like on HP-UX) + +- Workaround for new Solaris behavior for Console users if hald + is active. Give error message and abort instead of useless messages. + +- Converted to use libcdrdeflt + +- Converted to use libscgcmd + +- Workaround for a GCC warning with make DEFAULTSDIR=DEFAULTS_ENG + warning: 'sccsid' defined but not used added + +- Added a workaround for gmake < version 3.81. + Older gmake versions evaluate dependencies in the wrong order. + +- Better support for large files (using ftello()/fseeko()) + +- Better man page with repect to dev= + +- Man page reworked + +- cdwrite@lists.debian.org removed from man page + please use the official mailing lists for cdrecord that exist since 10 years: + http://developer.berlios.de/mail/?group_id=5 + +Mkisofs (Maintained/enhanced by Jörg Schilling since 1997, originated by Eric Youngdale): + +- Better error messages with wrong Eltorito boot options + +- Man page is now more explicit about requirements for DVD-video + directory trees. + +- Better warning text for missing Rock Ridge in multi.c + +- Bugs in README.sunx86boot corrected + +- Multi Volume code for reading old image now gives different + error messages on read errors and short reads. + +- Diagnostic programs isodump, isoinfo, ... no longer dump core + when called with dev= parameters. + +- mkisofs now detects if a file grows or shrinks while being + read by mkisofs. + +- try to work around a GCC trigraph problem + +- man pages for diag commands added + +- Replaced GNU getopt_long() by getargs(). This has been done for + several reasons: + + - Get rid of the annoying oddities/bugs of GNU getopt_long() + + - Use a unique option parser for all programs from cdrtools. + + - Find a way to better deal with historic badly planned + options. These problems are caused by the fact that + several options that take arguments start the same way. + With GNU getopt_long, there is no clean way to deal with + the resulting problems. getargs() allows to specify + whether an option needs to have a space between the option + name and the argument or not. + + - Make the code easier to understand and to maintain. + + - Segregation of option parsing and option conflict checking. + + - Code size reduction. + + Note that the intention is that all options still behave as documented + in the man page. If you have problems with scripts, first check whether + your usage is aligned with the the documentation or whether you did + depend from a side effect from GNU getopt_long before sending a bug + report. + +- Fixed an Eltorito Boot bug that happens together with + ISO-9660:1999 + +- Added some patches for better VMS portability from Steven M. Schweda + sms@antinode.org + +- mkisofs now includes libfind and allows to use the find(1) command line + syntax to be used. + + The new -find option acts as a option separator. To the right of the + -find option, find(1) syntax is used. No other mkisofs option may + appear anymore. + + Files are considered to be taken into the .ISO image in case that the + find(1) expression used on the command line yields TRUE. + + In addition to the find(1) utility, libfind allows to modify the stat(2) + data for each file before it is included in the .ISO. The following + find(1) primaries are implemented for this feature: + + -chmod mode/onum Modify the permissions for a file using the + chmod(1) syntax. + This primary always yields TRUE + + -chown uname/uid Modify the owner for a file. + This primary always yields TRUE + + -chgrp gname/gid Modify the group for a file. + This primary always yields TRUE + + The command line: "mkisofs -o image.iso -R -J somedir" + may be written as: "mkisofs -o image.iso -R -J -find somedir" + to give the same results as before. + + The command line: + + mkisofs -o image.iso -R -J -find somedir -chmod a+r -chown root -chgrp 0 + + will ensure that all files will have at least read permission for all users + and set the user/group to 0. + + The command line: + + mkisofs -o image.iso -R -J -find somedir ( -type d -chown root ) -o -true + + will change the owner of all directories to root, leaving other file + types untouched. + +- removed fnmatch.c + mkisofs now uses the fnmatch() implementation from the OS if present + and the fallback version from libschily if fnmatch() is missing in the OS. + +- man page extended to include a description for the -find + option. + +- Added $(LIB_ACL) tp the mkisofs Makefile to allow the code from + libfind to link properly on all OS. + +- Fixed several small problems with option parsing caused by the + change from GNU getopt_long to getvargs() + Thanks to Ä°smail Dönmez & scdbackup@gmx.net & Sebastian Trüg + +- Changed '%' option format specifier to '%0' to reflect a small + enhancement in libschily. + +- Better checks and better error messages for mkisofs -dvd-video + Mkisofs now correctly checks for the existence of a directory + "VIDEO_TS" in the root directory of the media. + +- mkisofs -find now allows to use -graft-points + +- mkisofs -find now allows to use -path-list + +- Fixed a buggy error message (a result from the option parser + rewrite, thanks to Steven M. Schweda for reporting. + +- Makefile now uses $(LIB_INTL) because of gettext() in libfind + +- Fixed some typos, thanks to Vitezslav Samel + +- Cstyle fixes + +- Abort writing in case the function xfwrite() gets called with size 0. + +- isodebug now finds debug descriptor even when the medium includes a + UDF Filesystem. + +- Fixed a bug that could cause mkisofs to core-dump in multi session + mode. Thanks to Fukuhara Kazuhiko <00kazuhiko@bb.excite.co.jp> + for reporting the bug. + +- Implement a new "correct inode number" algorithm for zero length files. + +- Implement a fingerprint that allows to check whether a ISO-9660 file + system image has been created by a new mkisofs and implements the + new "correct inode number" algorithm. + +- Implementing the new Rock Ridge (rrip) protocol version 1.12 from 1994. + Mkisofs before implemented the old rrip version 1.10 from 1993. + +- New option -rrip110 to disable the "new" 1994 Rock Ridge version. + + This option may be needed if you know of a system that does not deal with + RRip V-1.12. Currently no such system is known. + +- Using better (more portable) values for some special "inode" numbers. + +- Implement correct hard link counts for directories and files with Rock Ridge + +- Mkisofs cannot live without libschily anymore. For this reason, the + #ifdef USE_LIBSCHILY code has been removed. + +- Better & faster hashing: + + - Better hash function in hash.c for more balanced hash tree + + - Number of hash root entries enhanced from 1024 to 16*1024 + + - Avoid string compare in find_file_hash() + +- Corrected check algorithm, for non-zero-length files that are assigned + to a zero extent + +- Avoid uncached entries to clash with real inode numbers. + +- Print correct number of written extents in multi session mode. + +- All ISO-9660 numbers now correctly use the type UInt32_t + +- Convert type of all extent number related variables to UInt32_t + +- Use inode caching by default on newer Cygwin releases that use + 64 bit inode numbers. + +- Deep directory abortion now happens from the right place, so + mkisofs will allow files but no sub-dirs inside the last + permitted directory nesting level. + +- Mkisofs will now correctly ignore deep directory nesting + in no Rock Ridge mode with mkisofs -find + +- mkisofs -find dir will now correctly deal with Rock Ridge deep + directory relocation. + +- Some small compile problems on Cygwin (caused by a unsigned int + vs. UInt32_t clash) have been fixed. Thanks to Uwe Büdel for reporting. + +- Symlinks now work in mkisofs -find mode too. + +- ".." directory in rr_moved now gets the correct mode + +- graft dirs now work even if they cause Rock Ridge deep + directory relocation. + +- Print "correct inode" info on stderr in order to avoid problems + from mkisofs | cdrecord in multi session mode. Thanks to a report + from Oliver Valencia. + +- Hide /rr_moved by default. + +- Do not count /rr_moved for the link count of / + +- Trying to support FreeBSD Kernel under non-FreeBSD (GNU) userland + +- Now correctly default to "mac-roman" coding with Apple HFS. + +- Trying to better handle overlapping directory names. + Thanks to a hint from Thomas Flock + +- New options -posix-H/-posix-L/-posix-P implement the -H/-L/-P options + defined by POSIX.1-2001 for descending commands like ls/chmod/chown/find/pax/... + + Future versions of mkisofs will implement these options under their original + names -H/-L/-P. The current version of mkisofs cannot implement them as + previous versions did implement different functionality with -H and -P. + +- mkisofs called without any parameters or called with an illegal option + now prints a short overview of the most important options in 80x24 chars. + +- The option -stream-file-name has been implemented to allow + setting a user defined file name with -stream-media-size + When using -stream-file-name, mkisofs always uses "-iso-level 4" + +- A bug has been fixed, that caused mkisofs to archive a wrong + time zone offset in case that it was used on a timezone east + to GMT and the local time was already in e.g. Y-2007 while + GMT was still at Y-2006. + +- Several printf format changes from %d -> %u to reflect the changes + that recently made the blocknumber related variables unsigned. + +- Some small typo corrections in the man page + +- getnum()/getllnum() & gettnum()/getlltnum() have been moved to libschily + +- Using js_*printf() instead of *printf() via -DSCHILY_PRINT + +- added a better error message from Helios in volume.c + +- mkisofs -J no longer implies -l as done incorrectly after + converting from GNU getopt_long() to getargs() + +- "make install" now also installs the READMEs and other documentation to + ..../share/doc/mkisofs/ + +- The change from libunls to libsiconv fixes a lot of bugs in the + character translation tables. libsiconv now uses the official tables + from Unicode.org. Any other "single char" -> UNICODE table from + Unicode.org may be taken unmodified and copied to /opt/schily/lib/libsiconv + to become usable by libsiconv. + + If you use the same character set names as with old mkisofs, you get + the character translations from the tables in /opt/schily/lib/libsiconv, + if you use ICONV based locale names and iconv() is available on your + platform, then mkisofs used iconv() to translate the character encodings. + + If you like to force to use the iconv() code, use something like: + + mkisofs -input-charset iconv:8859-1 + + ****** IMPORTANT ******** + + You need to install the table files from libsiconv to make mkisofs + behave correctly. + +- Thanks to the new libsiconv, mkisofs now supports to run in a UTF-8 locale. + As long as no automatic locale support is present, call + + mkisofs -input-charset UTF-8 + +- Completed the Symlink implementation for UDF. The code was 20% ready + from Helios.de from the includes from the Helios variant of mkisofs. + +- New option -no-udfsymlinks to turn off support for UDF symlinks. + The UDF standards requires any OS to implement symlink support, but + you never know... + +- New option -UDF implements non-anonymous UDF support. + The relation between -UDF vs. -udf is the same as with -R vs. -r + +- Integrated a larger code drop from Helios.de, thanks to Helmut Tschemernjak + from helios.de. We did integrate the following new features from Helios.de: + + - Support for UID/GID in the UDF file meta data + + - Support for permissions in the UDF file meta data + + - Support for Mac OS X "/..namedfork/rsrc" + + - Avoid Mac OS X syslog entries when "/rsrc" is used. + + - Support for UDF based Mac OS extensions (type/creator and + resource forks). + + - New option -no-hfs allows to turn off creating a ISO9660/HFS hybrid + when UDF based Mac OS extensions are used. + + - Do not cache resorce fork files in the inode cache anymore. + + We did not include the following code from the Helios.de code drop: + + - Helios UNICODE unification (always tries to create "complete" + characters if e.g. a 'ö' is written as 'o'+'"', this is translated + into a 'ö'. + + The reason for not integrating this code is that it did violate + constraints from mkisofs. The translation was done based on UTF-8 + regardless of the current locale of the user. It could only work + in a UTF-8 based locale but mkisofs did not yet support UTF-8 an + based locale. The correct implementation would be in most cases + based on UCS-2 characters as used by Joliet and UDF. + + - Helios code that did prevent mkisofs to abort on certain kind of + read errors. + + The reason for not integrating this code is that it did not work + as expected for all possible cases and that such code should use + a similar mechanism as "star"s error control feature. + + - The Helios option -nolimit-pathtables has not been included as the + implementation did cause the PATH table to contain random data in + case that a PATH table overflow was allowed. + + - The Helios code drop did modify the libfind callback function to + implement Mac OS extensions. This is not correct as all the Mac OS + related stuff should already in the functions that are called + by the unmodified libfind callback. + + Another problem with this code is that it would introduce an + otherwise non-existent path length limitation with "mkisofs -find " + + - Helios did remove the artificial limit for UDF files > 2 GB. + This is currently not done for consistency between ISO-9660 and + UDF. Mkisofs will implement multi-extent files soon and then + the UDF file size limitation will be removed. + +- Avoid a core dump with mkisofs -new-dir-mode XXXX caused by a bad + getargs() option format string. Thanks to Thomas Flock + for reporting. + +- Some small typo fixes in the man page + +- Fix mkisofs to no longer dump core in case that a non-existing locale + is used. Thanks to Dirk Paehl for reporting. + +- mkisofs now warns in case that /opt/schily/libsiconv/ is missing + or not populated. + +- mkisofs no longer requires the Mac OS extension related locale + translations to be present in case that no Mac extensions are requested. + +- diag/isoinfo also has been fixed to correctly use iconv. + Thanks to Kai Raphahn for reporting. + +- mkisofs now sets up -input-charset to the locale read from the + environment in case that no -input-charset has been specified. + To disable this automatic set up, use -input-charset "". + +- more than 65535 parent directories. Note that this makes the filesystem + violating ISO9660 and the filesystem will not be usable on DOS. + +- New option errctl=name or errctl=control-spec similar as in star. + + This option allows e.g. to tell mkisofs not to abort if a file + did grow or shrink while mkisofs was reading it. + + Currently only OPEN, READ, GROW, SHRINK are implemented more to come + later... + +- mkisofs now includes a copyright message and a year number + with the -version output. + +- New option -no-limit-pathtables allows to create filesystems with + more than 65535 parent directories. Note that this makes the filesystem + violating ISO9660 and the filesystem will not be usable on DOS. + +- Support for ISO-9660 multi extent files added, thanks to + Frederick Bruckman for sending some experimental sample code + that helped to find the right ideas for a final implementation. + + This allows mkisofs to support files > 4 GB. + + - If you only use ISO-9660 (that may include Rock Ridge) or Joliet, + mkisofs is able to support single files up to a size of 8 TB. + + - If UDF is included, files > 190 GB will not appear in the UDF + file tree. + + IMPORTANT: You need to specify mkisofs -iso-level 3 or + mkisofs -iso-level 4 to allow mkisofs to archive + files > 4 GB. Also note that if you specify -hfs, + mkisofs will not archive fiiles larger than 2 GB. + + NOTE: + + Linux currently does not allow to read the complete content of + multi-extent files and will return EIO at some offset. + + Solaris currently does not allow you to read multi-extent files at all. + It will return EINVAL and print a kernel message + +- New options -hide-udf and -hide-udf-list allow to selectively exclude + files from the UDF tree. Note that mkisofs currently still binds the + UDF tree to the Joliet tree. All files that have been excluded from + the Joliet tree currently are also excluded from the UDF tree. + +- Always hide the Trans table (from mkisofs -T) files from the UDF tree. + +- Avoid warnings when compiling tree.c with some compilers. + +- Do no longer warn about violating ISO-9660 if -iso-level 4 has been specified. + +- Fixed a double free problem caused by multi-extent files + +- New function e_strdup() checks return code from strdup() for all calls. + +- Makefile changes from $(LIB_ACL) to $(LIB_ACL_TEST) as mkisofs only tests + for ACLs on files. + +- Make apple_driver.c compile again. Thanks to a hint from Dieter Jurzitza. + +- Avoid a core dump in the joliet code caused by the new Apple UDF extensions. + +- Avoid a core dump in the Apple code caused by the new Apple UDF extensions. + +- Write the warning: + + Warning: cannot support large files with -hfs + + only if -iso-level 3 or higher has been selected. + +- isoinfo now allows to check the contents of the Joliet Volume descriptor + by calling: + isoinfo -dJ + +- mkisofs bug fix for multi extent files, make UDF part from multi extent + files working again. Thanks to a hint from + Pav Lucistnik + +- Fixed a typo "unides" -> "inodes" + +- Mkisofs now gives better warning for files > 4 GB in hope it + will no direct people to read the documentation. + +- superfluous definition for memmove() on memmove()-less platforms removed + +- Some code in main() has been reordered to allow mkisofs to recognize that + the installation at /opt/schily/lib/siconv is missing even if the --ethershare + option has ben used. Before, mkisofs did dump core in this case, now it + mentions to install libsiconv. + +- mkisofs now prints more explicit error messages if the strings (like + e.g. the volume name) inside the PVD do not fit. This should help + people that use e.g. UTF-8 based locales and don't understand + that the strings may use up more octett space than the number of + characters in the string. + +- mkisofs now supports to import multi-extent files (> 4 GB) from old + sessions. + +- Fixed a bug in the graft -root code from Patrik Ohly thanks to + Ben Korvemaker FreeBSD for reporting. + +- Added a workaround for some Linux filesystems that do not deliver "." and ".." + first with readdir() + +- Fixed -x pattern not to exclude "." and ".." also + +- Always "." and ".." first to the dir content. + +NOTE that all these problems have not been present with "mkisofs .. -find " + +- Try to avoid inconsistencies with USE_ARGEFILES with multi-extent files + +- Corrected the iso directory record size computation in stream-file mode + +- Mkisofs no longer tries to write 8 TB of data in case that -stream-media-size + was too small. + +- Mkisofs now correctly limits filenames with non-ISO-8859-1 characters + to 127 chars max. + +- Mkisofs now correctly sets the permissions for "invented" unreal + directories in UDF instead of using mode 000. + +- Mkisofs now correctly mixes multi-extent-File directory entries from + old sessions made by mkisofs. This is only related to multi-session + with files >= 4 GB. + +- isoinfo now extracts files using 10 sectors at a time to speed up + operation + +- First step of changes intended to allow to remove Mac OS 9 "hfs" support + from mkisofs. Mac OS X supports UDF extensions and "hfs" does not support + large files. For this reason, "hfs" support is an anachronism. + +- mkisofs -UDF now does not longer replace controlchars in case that -J has not + been specified at the same time. This is a workaround for the fact that + mkisofs still shares the file name management code between UDF and Joliet. + +- Converted to use libcdrdeflt + +- Converted to use libscgcmd + +- Workaround for a GCC warning with make DEFAULTSDIR=DEFAULTS_ENG + warning: 'sccsid' defined but not used added + +- Raising PATH_MAX to be at least 1024 for all platforms as Cygwin + defines PATH_MAX to 260 which is too small for Cygwin. + +- Implemented a better error message in case that the boot image + could not be found inside the target tree. + +- A description for the -s/-sector option was added to the man page. + This option is used to allow to create conforming multi-session + images for e.g. the Kodak Photo CD or the Kodak Picture CD. + +- A description forr the -XA and -xa option was added to the man page. + +- Mkisofs now writes a better error message in case that it cannot + sort a directory because more than on directory content was merged + into the ISO image. + +- isoinfo -d now prints the checksum for the Eltorito validation header + +- Some casts have been added to increase the 64 bit compilation support + +- mkisofs and the tools isodump, isovfy and isoinfo now completely + support the SUSP termination signature "ST". + +- Do no longer flag the absence of a "RR" signature as an error in + isodump, isovfy and isoinfo as newer Rock Ridge standard versions removed RR. + +- Fixed a minor problem with a debug print output and 64 bit compile mode. + +- Avoid some GCC warnings + +- Minor typo fix in the mkisofs man page + +- Mkisofs now reports "Haiku" for the OS platform if on Haiku. + +- The isoinfo man page now includes the -debug option + +- Automated support for System ID + + Haiku, Syllable, AMIGA-OS, ATARI-MiNT + +- Fixed some Rock Ridge bugs that have been identified when investigating + in the OpenSolaris bug 6807009 + http://defect.opensolaris.org/bz/show_bug.cgi?id=5385 + +- Man page description for -abstract -biblio -copyright is now better + to understand + +- Better error messages in case that a specific charset translation is not + available. + +- Now using HAVE_ICONV_CONST to avoid iconv() related compiler warnings + +- libschily/checkerr.c (used by mkisofs) now correctly handles the "WARN" directive. + +- Fixed a typo bug in the mkisofs man page that caused the two synopsis lines + to appear as one line when using GNU troff. + +- isoinfo now prints "???" in case that an illegal month is in a ISO-9660 + filesystem. + +- Fixed a potential malloc problem in mkisofs + +- Avoid signed chars ad parameter to toupper + +- mkisofs man page reworked + +- isoinfo man page reworked + +- New file mkisofs/rock.h + +- isodump now prints more information about Rock Ridge attributes to + help debugging non-compliant Rock Ridge ISO images. + +- isoinfo now correctly identifies ISO images made with the Mac OS X + program "hdiutil" by e.g. calling: + + hdiutil makehybrid -iso -hfs -verbose -o xxx.iso some_dir + + As filesystems that violate the Rock Ridge standard. + + Check e.g. by "isoinfo -i xxx.iso -d" + + Interpreting Rock Ridge on such images can be enforced by calling: + + "isoinfo -i xxx.iso -lR -debug" + +- mkisofs now ignores the broken Rock Ridge attributes that have been + created by the Mac OS X program "hdiutil". + +- Make "isovfy" CD-ROM-XA aware + +- Make "isodump" CD-ROM-XA aware + +- "isoinfo" now supports iconv() based locales for Joliet. + +- Various Cstyle changes + +- Fixed a bug with file descriptor handling in mkisofs/apple.c + +- The man page for mkisofs was enhanced in order to better mention + that mkisofs always writes ISO-9660 and that other file systems are + thus always added as a hybrid file system. + +- cdwrite@lists.debian.org removed from man page + please use the official mailing lists for cdrecord that exist since 10 years: + http://developer.berlios.de/mail/?group_id=5 + +- Do no longer archive the output file if it is part of the archives directory + tree. + +- New option -data-change-warn allows to prevent mkisofs from aborting when + a file changes size. + + -data-change-warn is implemented via errctl="WARN|GROW|SHRINK *" + +- Print a hint to the option -data-change-warn if a shrunk/grown file is detected. + +- Print a hint to the option -no-limit-pathtables in case that there are more + than 65535 parent directories in the target filesystem. + +- Print hints on using -joliet-long or on avoiding -J in case that there are + file names that do not fit into 64 chars. + +- Prevent mkisofs from aborting with "... -hide large-file". Thanks for + the bug report from Udo Büdel. + + + HELIOS TODO: + + - Add the HELIOS UNICODE mapping code. This needs to be done + at UCS-2 level for Joliet and UDF (instead of UTF-8) and only + for Rock Ridge (in case of a UTF-8 based target locale) using + UTF-8 based translations. + + - Make the Apple extensions work again with "mkisofs -find" + + +TODO: + - Support correct inode numbers for UDF hardlinks + + - Support sockets, pipes, char/blk-dev specials with UDF + + - read Joliet filenames with multi-session if no TRANS.TBL + or RR is present. I am looking for a volunteer for this task! + + Note that this can never be 100% correct as there is no relation + between the names on the master (UNIX) filesystem, the ISO-9660 + names and the Joliet names. Only the Rock Ridge names are + untranslated with respect to the original files on the + master (UNIX) filesystem. + + - add libecc/edc for CDI and similar. + + +CYGWIN NT-4.0 NOTES: + +To compile on Cygwin32, get Cygwin and install it. +For more information read README.win32 + +The files are located on: + +ftp://ftp.berlios.de/pub/cdrecord/ ... + +NOTE: These tar archives are 100% POSIX compatible. GNU tar may get some + minor trouble. If you like a 100% POSIX compliant tar, get star from + ftp://ftp.berlios.de/pub/star/ + +WARNING: Do not use 'winzip' to extract the tar file! + Winzip cannot extract symbolic links correctly. + +Joerg diff -Nru cdrtools-2.01.01a33/AN-3.01 cdrtools-3.02a09/AN-3.01 --- cdrtools-2.01.01a33/AN-3.01 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/AN-3.01 2015-08-26 12:36:15.000000000 +0000 @@ -0,0 +1,2173 @@ +***************** Important news **************************** + +For the 'Slottable Source Plugin Module' SSPM Features read README.SSPM + +***************** Please Test ********************************* + +NEW features of cdrtools-3.01: + +This is the first localization step for cdrtools. All programs now (hopefully) +call gettext() for all strings that need localization. + +- The next step will include dgettext() calls for the libraries. + +- The following step will include the extracted strings + +- The last step will include German translations and install support + for the resulting binary message object files. + +----------> Please test and report compilation problems! <--------- + +***** NOTE: As mentioned since 2004, frontends to cdrtools should ***** +***** call all programs from cdrtools in the "C" locale ***** +***** by e.g. calling: LC_ALL=C cdrecord .... ***** +***** unless these frontends support localized strings ***** +***** used by the cdrtools with NLS support. ***** + +This version compiles on Win-DOS using the Microsoft compiler cl.exe but +warning: due to missing POSIX compliance with basic features (e.g. stat() +does not return inode numbers), there are many problems with the resulting +code and thus it is recommended to better use a POSIX layer on top of +WIN-DOS. + + *** WARNING *** + *** Need new smake *** + + *** Due to the fact that schily-2014-04-03 introduced to use new macro + *** expansions and a related bug fix in smake, you need a new smake + *** to compile this source. To ensure this, get a recent "schily" + *** tarball from http://sourceforge.net/projects/schilytools/files/ + *** and call: + + cd ./psmake + ./MAKE-all + cd .. + psmake/smake + psmake/smake install + + The new smake version mentioned above is smake-1.2.4. + Note that smake-1.2.5 exists and is preferrable. + + Now you have a new smake that is able to compile this source. + + Note that the major makefile restructuring introduced in + schily-2014-04-03 is now more than one month ago and thus seems + to work without problems. + + WARNING: the new version of the isoinfo program makes use of the + *at() series of functions that have been introduced by Sun + in August 2001 and added to POSIX.1-2008. For older platforms, + libschily now includes emulations for these functions but + these emulations have not yet been tested thoroughly. + Please report problems! + + +All: + +- The macros XARCH_GEN & XARCH_OPT are now in RULES/cc-sunpro*.rul + +- The include file include/schily/ccomdefs.h now allows to disable + the printf() format checks for GCC with -DNO_PRINTFLIKE + This is needed in order to allow star to compile in the Solaris ON + consolidation as GCC id too dumb for the printf() extensions. + +- All include files (even those created by autoconf) are now protected + against multiple inclusion. + +- New autoconf test for pathconf() and fpathconf() + +- New autoconf test for /dev/stdin, /dev/stdout, /dev/stderr, + /dev/fd/0, /dev/fd/1, /dev/fd2 + +- New autoconf tests for: qecvt() qfcvt() qgcvt() + _ldecvt() _ldfcvt() _ldgcvt() _ldecvt_r() _ldfcvt_r() _ldgcvt_r() + qeconvert() qfconvert() qgconvert() + needed for long double support. + +- New autoconf test for _qecvt() _qfcvt() _qgcvt() + and _qecvt_r() _qfcvt_r() _qgcvt_r() on AIX + +- All linker map files have been modified to allow platform + dependent #ifdef's + +- include/schily/wchar.h now includes a workaround for platforms + that do not have wcwidth(). + +- Make NLS the default (i.e. gettext() is called in case that schily/nlsdefs.h + was included) + +- include/schily/nlsdefs.h now includes macros _(s) and __(s) to support + gettext() and xgettext(1) + +- The makefile system now by default disables smake Simple Suffix Rules + and the POSIX Suffix Rules in order to speed up inference rule search. + +- A new rule RULES/profiled.lnk allows to call: + + smake COPTX=-pg LDOPTX=-pg LINKMODE=profiled + + to create binaries that use gprof. + +- The Makefile System is now able to switch gmake-3.82 into a more POSIX + compliant mode to tell the shell to report problems back to gmake. + +- New autoconf tests on whether printf supoorts %lld and %jd + +- Fixed the vc9-setup files to make VC9 work. + +- Newer Cygwin "tail" versions do no longer support UNIX syntax. + change tail +2 to tail -n +2 in RULES/cc-mcs.rul to allow to use + the Microsoft compiler again + +- A new environment variable MKLINKS_COPY allows to tell all + MKLINKS scripts to generate file copies rather than symlinks. + Call: + MKLINKS_COPY=true + export MKLINKS_COPY + to enable this feature + +- Run an additional test -h command in MKLINKS to verify whether mingw + supports symlinks + +- MKLINKS now creates copies instead of symlinks when we use MSC + as MSC does not support to read symlink files + +- Fixed a typo in include/schily/libport.h (group functions have been + defined to return struct passwd* instead of struct group* + +- Fixed wrong bracketing for C++ in include/schily/stdlib.h + +- Fixed wrong bracketing for C++ in include/schily/utypes.h + +- Added a workaround for MSC to include/schily/utypes.h + MSC believes that a 32 bit int and a 32 bit long are incompatible + and cannot even be casted, so we need to make uint32_t a n unsigned long + +- Let include/schily/archdefs.h define the standard processor #defines + when compiling with MSC. + +- New include file include/schily/windows.h works around the oddities + from the MSC include file windows.h + +- include/schily/stdio.h now defines popen()/pclose() to _popen()/_pclose() + if on WIN-DOS + +- include/schily/limits.h now defines PIPE_BUF + +- include/schily/utsname.h now defines struct utsname for our MSC uname() + emulation. + +- The setup for the PATHs needed by Visual Studio 9 has been + corrected. + +- autoconf has been modified to avoid optimizing away code that + is intended for testing. This help to work against a problem + with detecting mbrtowc() on MinGW + +- autoconf now tests for mbtowc() and wctomb() + +- RULES/i*86-mingw32_nt-gcc.rul now link against -lmingw32 instead + of -lmgw32. + +- include/schily/stat.h now defines S_IREAD/S_IWRITE/S_IEXEC + These macros are available on typical UNIX systems but not + on Android. The definition comes from UNIX V7 and is not in + POSIX. Needed by SCCS and the Bourne Shell + +- include/schily/wait.h now defines WIFCONTINUED() if needed + +- include/schily/wchar.h now defines mbtowc() to mbrtowc() if + needed (e.g. on Android) + +- include/schily/ccomdefs.h now correctly knows about the GCC + release that introduced __attribute__ (used). + +- Android is not POSIX (by not defining various functions as functions + in libc as required by POSIX) because it tries to define many + functions that are part of the standard as inline macros in + include files only. This breaks autoconf, so we needed to rewrite + some tests (e.g for getpagesize, tcgetpgrp, tcsetpgrp) + +- The Schily autoconf system has been enhanced to support cross + compilation. Schily autoconf is based on GNU autoconf and + GNU autoconf does not support cross compilation because it needs + to run scripts on the target system for some of the tests. + + The "configure" script that is delivered with the Schily makefile + system runs 718 tests and 68 of them need to be run on the target + system. + + The Schily autoconf system now supports a method to run these 68 + tests natively on a target system. You either need a machine with + remote login features or you need an emulator with a method to + copy files into the emulated system and to run binaries on the + emulated system as e.g. the Android emulator. + + We currently deliver three scripts for "remote" execution of + programs on the target system: + + runrmt_ssh runs the commands remove via ssh + runrmt_rsh runs the commands remove via rsh + runrmt_android runs the commands remove via the debug bridge + + If you need to remotely run programs on a system that is not + supported by one of there three scripts, you need to modify one + of them to match your needs. + + To enable Cross Compilation use the following environment variables: + + CONFIG_RMTCALL= Set up to point to a script that does + the remote execution, e.g.: + + CONFIG_RMTCALL=`pwd`/conf/runrmt_ssh + + CONFIG_RMTHOST= Set up to point to your remote host, e.g.: + + CONFIG_RMTHOST=hostname + or + CONFIG_RMTHOST=user@hostname + + use a dummy if you like to use something + like to the Android emulator. + + CONFIG_RMTDEBUG= Set to something non-null in order to + let the remote execution script mark + remote commands. This will result in + configure messages like: + + checking bits in minor device number... REMOTE 8 + + Note that smake includes automake features that automatically + retrieve system ID information. For this reason, you need to overwrite + related macros from the command line if you like to do a + cross compilation. + + Related make macros: + + K_ARCH= # (sun4v) Kernel ARCH filled from uname -m / arch -k + M_ARCH= # (sun4) Machine filled from arch + P_ARCH= # (sparc) CPU ARCH filled from uname -p / mach + OSNAME= # sunos, linux, .... + OSREL= # 5.11 + OSVERSION= # snv_130 + CCOM= # generic compiler name (e.g. "gcc") + CC_COM= # compiler to call (name + basic args) + + ARCH= overwrites M_ARCH and P_ARCH + + It is usually sufficient to set ARCH and OSNAME. + + In order to use a cross compiler environment instead of a native compiler, + set the make macro CC_COM to something different than "cc". + + If you are on Linux and like to compile for Android, do the following: + + 1) set up CC acording to the instructions from the cross compiler + tool chain + + 2) set environment variables CONFIG_RMTCALL / CONFIG_RMTHOST, e.g.: + setenv CONFIG_RMTCALL `pwd`/conf/runrmt_android + setenv CONFIG_RMTHOST NONE + + 3) call smake: + + smake ARCH=armv5 OSNAME=linux CCOM=gcc "CC_COM=$CC" + + +- Several programs no longer test for HAVE_DEV_* but for HAVE__DEV_* + as we did switch from hand written tests for /dev/tty, /dev/null + and similar to AC_CHECK_FILES(/dev/tty /dev/null /dev/zero) + +- The Makefile system now links dynamic libraries on Mac OS X against + libgcc_s.1 instead of libgcc. + + +- The file COPYING has been reworded to be more obvious with + explaining work limits. + +- A workaround for a bug in llvm-gcc-4.2 has been introduced in + inc/avoffset.c. The llvm-gcc-4.2 bug caused an endless loop at an + unexpected place. + +- New target "htmlxn" to only rebuild html versions of man pages + only in case there was a change + +- The CSW packaging definitions in the schily makefilesystem was + enhanced to permit referencing files in the package definition directory + +- include/schily/sigset.h added new macros: blocked_sigs(), + block_sigs() + +- include/schily/fcntl.h now includes O_SEARCH for POSIX.1-2008 compliance. + +- Schily autoconf now tests for the size of mode_t, uid_t, gid_t, pid_t, + dev_t, major_t, minor_t + +- Schily autoconf now defines a promoted type for mode_t that can be + used together with varargs. This is needed as mode_t is smaller than + int on some systems. + +- New autoconf tests for getdelim() and strncasecmp() + +- Added a workaround for a auto-dependency creation bug in the HP-UX + c-compiler that resulted in wrong dependency files for all files + in libshcily/stdio/ and for these files prevented an automated + recompilation in case that an include file was changed. + +- Added links for: + + amd64-freebsd-cc.rul + amd64-freebsd-gcc.rul + + amd64-openbsd-cc.rul + amd64-openbsd-gcc.rul + + x86_64-darwin-cc.rul + x86_64-darwin-gcc.rul + x86_64-darwin-cc64.rul + x86_64-darwin-gcc64.rul + x86_64-darwin-cc32.rul + x86_64-darwin-gcc32.rul + +- RULES/rules.loc now makes $(PTARGET) depend on $(ARCHDIR) to + support make -j 2 + +- New include files include/schily/inttypes.h and include/schily/stdint.h + +- The script conf/makeinc is no longer confused by OpenBSD + that has man.7 and mandoc.7 and both match on man* + + + +- conf/runrmt_android has been enhanced to better deal with the + "runrmt -r file-to-test" calling variant. + +- configure now ignores a stramge directory that is created on Mac OS X + when compiling with cc -g and that is in conflict with other rules. + +- Introduce a dependency for man page subdiretories to allow syncing + parallel make calls. + +- Try to support Debian with FreeBSD kernel + +- Better support for Win32 sockets when using cl.exe + +- Avoid problems with the non-standard prototypes for link() unlink() + read() and write() from cl.exe + +- Support for Pyro (a Syllable clone) was added. + Thanks to Flemming H. Sørensen + +- Add support for semi-static (preconfigured) include files for Android: + include/schily/armv5tejl-linux-gcc/xconfig.h + +- New include files include/schily/err_*.h are used to encapsulate + #error CPP statements that would otherwise always prevent compilation + with K&R compilers. + +- The make program specific configuration files for the Schily Makefilesystem + RULES/mk-.id (for SunPro make), RULES/mk-smake.id RULES/mk-gmake.id + now include definitions for the macros: + + SPACE A single space character (' ') + NUMBER_SIGN The ASCII number sing ('#') + + Note that the POSIX standard otherwise requires the make program + to be unable to have the '#' appear in non-comment sections of + Makefiles. + +- Try to work around an imprudent change in the file windef.h from + Cygwin-1.7.17 (Autumn 2012) related to the type BOOL that makes + windefs.h from the recent Cygwin no longer compatible to the + original file from Microsoft. The fix is in include/schily/windows.h + + Thanks to Alain Hoang, Thomas Plank and others for reporting and + help with getting a fix for the problem named above + + + +- The Schily makefilesystem now supports CC++_COM for all platforms to + allow to overwrite the low level command for the C++-compiler. + + +- include/schily/stat.h now contains macros to set the nanoseconds + in timestamps in a OS-independent way + + +- Fixed a typo in include/schily/stat.h related to nanosecond + handling for NetBSD and OpenBSD + +- New autoconf tests for sys/capability.h and cap_*() functions + from Linux -lcap + + WARNING: If you do not see this: + + checking for cap_get_proc in -lcap... yes + checking for cap_get_proc... yes + checking for cap_set_proc... yes + checking for cap_set_flag... yes + checking for cap_clear_flag... yes + + your Linux installation is insecure in case you ever use the + command "setcap" to set up file capabilities for executable commands. + + Note that cdrtools (as any other command) need to be capabylity-aware + in order to avoid security leaks with enhanced privileges. In most + cases, privileges are only needed for a very limited set of operations. + If cdrtools (cdrecord, cdda2wav, readcd) are installed suid-root, the + functions to control privileges are in the basic set of supported + functions and thus there is no problem for any program to control it's + privileges - if they have been obtained via suid root, you are on a + secure system. + + If you are however on an incomplete installation, that supports to + raise privileges via fcaps but that does not include developer support + for caps, the programs get the privileges without being able to know + about the additional privileges and thus keep them because they cannot + control them. + + WARNING: If you are on a Linux system that includes support for + fcaps (this is seems to be true for all newer systems with + Linux >= 2.6.24) and there is no development support for capabilities + in the base system, you are on an inherently insecure system that allows + to compile and set up programs with enhanced privileges that cannot + control them. + + In such a case, try to educate the security manager for the related + Linux distribution. Note that you may turn your private installation + into a secure installation by installing development support for libcap. + + +- The autofconf tests for broken Linux kernel headers now avoid to + warn for /usr/src/linux/include if this directory is missing. + +- include/schily/priv.h now includes sys/capabilitiy.h if available. + + +- Due to an incorrect message from last release, here is corrected + information on when a Linux installation is potentially dangerous: + + New autoconf tests for sys/capability.h and cap_*() functions + from Linux -lcap + + WARNING: If you do not see this: + + checking for sys/capability.h... yes + + ... + + checking for cap_get_proc in -lcap... yes + checking for cap_get_proc... yes + checking for cap_set_proc... yes + checking for cap_set_flag... yes + checking for cap_clear_flag... yes + + your Linux installation is insecure in case you ever use the + command "setcap" to set up file capabilities for executable commands. + + Note that cdrtools (as any other command) need to be capabylity-aware + in order to avoid security leaks with enhanced privileges. In most + cases, privileges are only needed for a very limited set of operations. + If cdrtools (cdrecord, cdda2wav, readcd) are installed suid-root, the + functions to control privileges are in the basic set of supported + functions and thus there is no problem for any program to control it's + privileges - if they have been obtained via suid root, you are on a + secure system. + + If you are however on an incomplete installation, that supports to + raise privileges via fcaps but that does not include developer support + for caps, the programs get the privileges without being able to know + about the additional privileges and thus keep them because they cannot + control them. + + WARNING: If you are on a Linux system that includes support for + fcaps (this is seems to be true for all newer systems with + Linux >= 2.6.24) and there is no development support for capabilities + in the base system, you are on an inherently insecure system that allows + to compile and set up programs with enhanced privileges that cannot + control them. + + In such a case, try to educate the security manager for the related + Linux distribution. Note that you may turn your private installation + into a secure installation by installing development support for libcap. + +- WARNING: the include structure of include/schily/*.h and several sources + has been restructured to cause less warnings with older OS platforms. + If you see any new problem on your personal platform, please report. + +- New includefiles: + + schily/poll.h Support poll() + schily/stdarg.h An alias to schily/varargs.h (but using the std name) + schily/sunos4_proto.h Missing prototypes for SunOS-4.x to make gcc quiet + schily/timeb.h Needed for users of ftime() + +- Many minor bug-fixes for the files include/schily/*.h + +- include/schily/archconf.h now defines __SUNOS5 for easier coding + +- include/schily/priv.h now defines platform-independent fine-grained privileges + +- Updated README.compile: + + Some typo patches from Jan Engelhardt + + Documented the "LINKMODE=" macro to explain how to create dynamically + linked bynaries. + + +- The SCCS keyword expansion for "Mocsw" has been limited to + prevent expansion of date '+%Y%m%d%H%M%S' + +- Mocsw now sets link mode to -Bdirect for recent OpenCSW rules + +- pkgdefs/OCSW/*/checkpkg_override modified to match current OpenCSW + rules. + +- Make sure that all schily include files except the primary wrappers + include schily/*.h instead of including the system include files directly. + +- Allow a "static" compilation (a compilation without using dynamic -I + Paths) on Linux x86 by adding static #includes for Linux x86 in: + + include/schily//align.h + include/schily//archdefs.h + include/schily//avoffset.h + include/schily//xconfig.h + + This is needed if you like to install the schily include files + to /usr/include/schily and allow users to "manually" compile + programs that use e.g libparanoia. + + To allow this, the autoconf results need to be installed as: + + + and + + + + +- The Schily Makefilesystem no longer uses CC= for internal tasks. + People who now set $CC to a different value will fail in a similar + way as they would fail with other build systems. + +- Added automatic support for ARMv5 and ARMv6. This makes compilation + on the RaspberryPI also possible with the non automake-aware gmake. + +- Allow "static" compilation (a compilation that does not use the + dynamic defines from the Schily Makefilesystem) on Linux ARMv6 (which + is used by RaspberryPI). + +- Allow a "static" compilation (a compilation without using dynamic -I + Paths) on Linux on ARMv5 and ARMv6 by adding static #includes for + Linux ARM in: + + include/schily//align.h + include/schily//archdefs.h + include/schily//avoffset.h + include/schily//xconfig.h + + This is needed if you like to install the schily include files + to /usr/include/schily and allow users to "manually" compile + programs that use e.g libparanoia. + + To allow this, the autoconf results need to be installed as: + + + and + + + +- Many sources have been modified to deal __CYGWIN32__ like __CYGWIN__ + This is neded as newer Cygwin versions that run in 64 Bit mode + do no longer define __CYGWIN32__ but __CYGWIN__ + +- Added rules for non-automake enabled make programs (like gmake) + for: ppc64-linux-cc.rul and ppc64-linux-gcc.rul + +- Added new OS version ID rules for various WIN-DOS versions: + + os-interix-nt-6.0.id + os-interix-nt-6.1.id + os-cygwin_nt-6.2-wow64.id + os-cygwin_nt-6.2.id + os-cygwin_nt-6.3-wow64.id + os-cygwin_nt-6.3.id + +- New autoconf test in whether struct timespec is defined. + + +- New autoconf tests for: + + - NFSv4 ACL support + + - issetugid() + + - lpathconf() + + - utimens() + - futimens() + - lutimens() + + +- The rules in the Schily Makefilesystem have been restructured in order + to allow to avoid problems on platforms like FreeBSD and Mac OS X: + + FreeBSD and Mac OS X banned the not-free-enough (because GPLd) + software to /usr/local, forcing us to add -I/usr/local/include + and -L/usr/local/lib. Unfortunately, /usr/local/include frequently + carries a _very_ outdated and thus wrong copy of "cdda_paranoia.h" + which is more than 10 years old and definitely incompatible with + dynamic linking on Mac OS X. This defective copy was first in the + search path and prevented compilation. + + We now have a new macro: DEFOSINCDIRS= that grants to add include + directories to the end of the search PATH to allow us to find the + correct "cdda_paranoia.h" first. + + Please test and report in case of problems. + +- gmake and SunPro make include COMPILE.c with wrong content in their + built-in rules. We now clear this macro in RULES/rules.top. It is + still possible to provide a modified version from command line + or from the environment. + +- include/schily/stdio.h was reordered, as it prevented compilation + of the "bsh" on Linux. This was a problem recently introduced, + when we added #ifndef NO_SCHILY_STDIO_H + +- Fixed autoconf typo HAVE_MKNODKAT -> HAVE_MKNODAT + +- include/schily/intcvt.h is now self contained. + +- include/schily/windows.h now includes the same type workaround + for MINGW32 as for the Microsoft C compiler, as there are the same + autoconf detection problems. + +- Added missing include/schily/err_type.h + +- New file include/schily/shedit.h + + +- New Schily Makefiles rules for armv7l-linux + +- autoconf/xconfig.h.in now treats MinGW32 the same as when compiling + with cl.exe + + +- Define DEV_NULL in include/schily/mconfig.h to address the missing + /dev/null on DOS + +- New autoconf tests for: + getc_unlocked getchar_unlocked putc_unlocked putchar_unlocked + flockfile funlockfile ftrylockfile + +- Symlinks for + armv4tl-linux-cc.rul s390x-linux-cc.rul armv5tel-linux-cc.rul + new, to support non automake-aware make programs such as gmake. + + +- Do not define a gethostname() prototype in schily/hostname.h + for MinGW, as MinGW as a wrong prototype is in the non-standard + file winsock.h + +- include/schily/stdio.h now implements code that partially unhides + the FILE * data structures from the 64 bit Solaris libc. + This allows to implement a getc_unlocked() macro even for 64 bit + Solaris as done by libc, so libschily is able to achieve similar + stdio I/O performance, which is needed to be able to implement + a printf() in libschily that is faster than printf() from libc. + + +- include/schily/varargs.h now includes a new type va_lists_t + that is a structure that covers va_list. + +- include/schily/getargs.h now has comments for the arguments and + return code of the getargs() callback functions. + +- The schily makefilesystem now includes a new symlink + ppc64le-linux-cc.rul for non automake-aware make implementations + such as gmake. + +- New autoconf tests for strspn() strcspn() wcsspn() wcscspn() + +- Typo fix in README.compile for the mail address. + Thanks to Dennis Clarke for the catch! + +- Fixed the autoconf test for #pragma weak, so it will not + believe that "clang" supports #pragma weak in a compatible way. + This is needed in order to compile libmdigest/sha2.c using clang. + +- New autoconf tests added for: + + libexpat + libpcsclite / winscard.lib + libcrypto / libeay32.lib + libssl / ssleay32.lib + +- New autoconf test for expat.h + +- The makefile system added the INVERSE_SUBARCHDIR= to allow local + autoconfiguration for shared libraries. + +- RULES/rules.top now also calls MKLINKS in the directory TEMPLATES + +- New compiler configuration files: + + RULES/cc-clang.rul + RULES/cc-clang32.rul + RULES/cc-clang64.rul + +- The Mac OS X related rules now support a new macro: + + LDFRAMEWORKS= + + that allows to add Apple specific libraries. + +- Added a new WIN32_LIBS= macro for Win-DOS specific libraries. + These libraries have to be specified in the portable -lfoo + format for "libfoo" and also work when compiling for MinGW32. + When cl.exe is used, -lfoo is converted to foo.lib. + +- New configuration files: + + RULES/i386-darwin-clang.rul + RULES/i386-darwin-clang32.rul + RULES/i386-darwin-clang64.rul + +- New configuration files: + + RULES/i386-freebsd-clang.rul + RULES/i586-linux-clang.rul + RULES/x86_64-linux-clang.rul + RULES/i86pc-sunos5-clang.rul + RULES/sun4-sunos5-clang.rul + + Note that these files have not been tested yet. + +- RULES/cc-sunpro.rul now also includes rules for + RULES/cc-sunpro32.rul and + RULES/cc-sunpro64.rul + +- RULES/cc-gcc.rul now also includes rules for + RULES/cc-gcc32.rul and + RULES/cc-gcc64.rul + +- RULES/cc-sunpro32.rul added for orthogonality + +- RULES/cc-sunpro32.rul and + RULES/cc-sunpro64.rul are symlinks to RULES/cc-sunpro.rul + and RULES/cc-sunpro.rul uses a macro to include + cc-sunpro.rul + cc-sunpro32.rul + cc-sunpro64.rul + as needed + +- RULES/i86pc-sunos5-cc.rul now also includes rules for + RULES/i86pc-sunos5-cc32.rul and + RULES/i86pc-sunos5-cc64.rul + +- RULES/i86pc-sunos5-gcc.rul now also includes rules for + RULES/i86pc-sunos5-gcc32.rul and + RULES/i86pc-sunos5-gcc64.rul + +- RULES/sun4-sunos5-cc.rul now also includes rules for + RULES/sun4-sunos5-cc32.rul and + RULES/sun4-sunos5-cc64.rul + +- RULES/sun4-sunos5-gcc.rul now also includes rules for + RULES/sun4-sunos5-gcc32.rul and + RULES/sun4-sunos5-gcc64.rul + +- RULES/i586-linux-suncc.rul now also includes rules for + RULES/i586-linux-suncc32.rul and + RULES/i586-linux-suncc64.rul + +- RULES/9000-725-hp-ux-cc.rul now also includes rules for + RULES/9000-725-hp-ux-cc32.rul and + RULES/9000-725-hp-ux-cc64.rul + +- RULES/i486-cygwin32_nt-cc.rul now also includes rules for + RULES/i486-cygwin32_nt-cc32.rul and + RULES/i486-cygwin32_nt-cc64.rul + +- RULES/i486-cygwin32_nt-gcc.rul now also includes rules for + RULES/i486-cygwin32_nt-gcc32.rul and + RULES/i486-cygwin32_nt-gcc64.rul + +- RULES/ip22-irix-cc.rul now also includes rules for + RULES/ip22-irix-cc64.rul + +- RULES/ip22-irix-gcc.rul now also includes rules for + RULES/ip22-irix-gcc64.rul + +- RULES/power-macintosh-darwin-cc.rul now also includes rules for + RULES/power-macintosh-darwin-cc32.rul and + RULES/power-macintosh-darwin-cc64.rul + +- RULES/power-macintosh-darwin-gcc.rul now also includes rules for + RULES/power-macintosh-darwin-gcc32.rul and + RULES/power-macintosh-darwin-gcc64.rul + +- conf/makeinc now knows that a compiler name may not follow + the "cc*" text rule. This helps to support "clang". + +- conf/cc-config.sh has been enhanced to detect whether + "cc" or "gcc" are emulated via "clang". + +- New files in TEMPLATES/ related to "clang" + +- TEMPLATES/ now includes config files for gcc32 and gcc64 + +- TEMPLATES/ now includes config files for clang, clang32 and clang64 + +- Add comment to DEFAULTS_CSW/sparc-cc.defs + +- config.guess now understands Mac OS X on 64 bit Intel + + +- Fixed a typo in autoconf/xconfig.h.in that caused the Win-DOS function + LoadLibrary() not to be recognised correctly. + +- Added compile support for: amd64-freebsd-clang*.rul + +- include/schily/unistd.h now extends some exceptions to work around + problems with the MS C-compiler to MinGW32. + + +- Various README's, scripts and man pages have been revised to replace + berlios.de by sourceforge.net + + Note that some files have not yet been completely updated for that + change as there is no easy way to deal with a site like sourceforge + that does not support ftp: + + ./conf/src-get + ./conf/setup.sh + + Because we now assume that any UNIX distro includes a ftp(1) program, + but we cannot assume that there is wget. + +- include/schily/dlfcn.h now includes a #define HAVE_LOADABLE_LIBS + in case we compile on a system that implements runtime loadable + libraries and that libschily implements an adoption for this + local method to the POSIX dlopen()/dlsym()/dlclose(). This is currently + true for Solaris (and similar) that implement dlopen()/dlsym()/dlclose() + natively and for HP-UX and Win-DOS. + +- The makefile rules for installing man pages have been changed so that + OBJ//man/ is no longer a direct dependency of the man page. + This results in repeated "make install" calls not to reinstall + up-to-date man pages again. + +- The makefile rules for installing localized scripts have been changed so + that OBJ// is no longer a direct dependency of the man page. + This results in repeated "make install" calls not to reinstall + up-to-date scripts again. + +- New autoconf test checks whether printf() supports %z + +- Some documentation now mentions sourceforge instead of BerliOS + +- README.compile now mentions how to use instrumented compilers with + the Schily Makefilesystem. + +- Support for ARM-64 (aarch64) was added + +- rules.dep (r-make.dep, r-smake.dep, r-gmake.dep) now create + $(ARCHDIR)/man together with $(ARCHDIR) to make sure this + directory exists before someone calls "*make install" as root. + +- rules.dep (r-make.dep, r-smake.dep, r-gmake.dep) now make sure + that $(ARCHDIR)/Dnull will not be touched in case it already + exists. This prevents some unneeded file rebuilds if the make + program is changed between two builds. + + Note that echo > $(ARCHDIR)/Dnull already enforces a shell (because + the command contains a ">") and the use of an if statement thus + does not cause extra costs. + +- $(ARCHDIR)/Dnull no longer depends on $(ARCHDIR), this prevents + attempts to re-create $(ARCHDIR)/Dnull after an update in $(ARCHDIR) + +- it is now ensured that $(SRCROOT)/incs/Dnull will not be touched + in case it already exists. + +- TEMPLATES/MKLINKS now creates a dummy link to allow it to recognise + whether the links already exist. + +- include/schily/sysexits.h adopts to the recent changes on Haiku that + prevent usual autoconf tests as #include works but symbols + are only defined with #define _BSD_SOURCE + +- include/schily/wait.h now knows about the Haiku specific macro + WIFCORED() and #defines WCOREDUMP() to WIFCORED(). + +- Support for x86_64-haiku-cc.rul and x86_64-haiku-gcc.rul was added + to the makefile system. + +- The file RULES/r-gmake.dep was modified to make sure that the + dependency files (*.d) depend on the include files as well. + Previous versions included xxx.d instead of $(ARCHDIR)/xxx.d + +- Makefile system: two new targets have been added: + + man creates localized versions of the man pages in the + OBJ directory + + installman installs only the manual pages + +- include/schily/signal.h now includes siginfo.h to make sure it + compiles even on very old Solaris versions where signal.h did not + yet include siginfo.h. + +- include/schily/wait.h add a missing closing bracket for Haiku + +- include/schily/wait.h added CLD_* macros and the enum idtype_t in case + they are missing. This allows to implement a waitid() emulation. + +- include/schily/wait.h now includes schily/signal.h in case that + the local /usrinclude/sys/wait.h is non-POSIX and does not + define siginfo_t. This is e.g. the case on FreeBSD. + +- The configure tests now includes a test that correctly identifies + Mac OS X as non-POSIX with respect to waitid(). This prevents + potential users ofwaitid() from the unusable implementation on + Mac OS X. + + The rule for accepting an existing waitid() is the following: + + - si.si_pid is set to be equal to the awaited pid + + - si.si_code == CLD_EXITED for a chilt terminated by exit(2) + + - si.si_status contains at least 16 bits from the exit(2) + code. This is still not POSIX but better than what we would + get from a historical wait*() call. + +- The configure tests now check for the new FreeBSD wait6() and for + idtype_t. + +- A new symlink for x86_64-cygwin32_nt-gcc.rul was added + +- Added support for cygwin32_wow (not the already present cygwin32_wow64). + +- The makefile system now allows to use: + + COPTX=-DNO_PRAGMA_WEAK + + to disable the use of #pragma weak. This may help to debug some + oddities of the GNU linker. + +- The makefile system now includes a new test that needs constraints + that are not really supported by autoconf: it checks whether the + linker supports to link against external weak symbols in another + file. For this reason, a handcrafted conftest was written. + This (currently) should fail on Cygwin due to a Cygwin bug. + A platform that allows to link against weak symbols defines + HAVE_LINK_WEAK. This permits the system to automatically detect + usability once e.g. linking on Cygwin will be fixed. + + Thanks to Thomas Plank for reporting the known #pragma weak problem + in a new source file (libschily/error.c). Note that error() is a + UNIX (UNOS) libc function that exists since 1980 but some libc + implementors do not follow the rule not to introduce incompatible + interfaces for existing names. So we need to find a workaround + on these platforms. + +- autoconf now checks for the type rlim_t in sys/resource.h + +- README.compile now includes an example on how to cross compile + on Linux for Android. + +- include/schily/find.h modified to avoid a GCC warning from + using libfind in the Bourne Shell. + +- include/schily/dlfcn.h modified to avoid a GCC warning from + the new builtin management code in the Bourne Shell. + +- Support for Win-10 when compiling with no automake-aware + make implementations like "gmake" was added. + +- include/schily/mconfig.h fixed a typo: "-DDBD_MALLOC" + +- include/schily/resource.h better comment + +- include/schily/stat.h fixed a typo S_ISCNT -> S_ISCTG and + S_IFCNT -> S_IFCTG + +- include/schily/stat.h now includes #define lstat stat in case lstat() + does not exist on the current platform. + +- include/schily/dbgmalloc.h: Added a workaround for source files + that first #include and thus have no viable + BOOL defintion while is included. This now permits + to compile the whole libschily with + + smake COPTX=-DDBG_MALLOC LDOPTX=-ldbgmalloc + + in order to debug malloc()/free() calls. + +Libschily: + +- libschily/?eterrno.c no longer overwrite the _TS_ERRNO definition + in order to pass the compile constraints in the Solaris ON consoliation. + +- Several new global symbols in the mapfile for libschily/libschily-mapvers + +- libschily/wcsndup.c had forgotten code and still did internaly implement + strndup() + +- libschily now by default renames getline(), fgetline() and + fexec*() into js_getline(), js_fgetline() and js_fexec*(). + This was needed because the POSIX standard commitee ignored + POSIX basic rules not to define functions that are in conflict + with existing published functions. The functions from libschily + have been in the public since more than 25 years and the + functions defined by POSIX.1-2008 even violate POSIX naming rules. + The POSIX fexec*() functions would e.g. have to be correctly called + fdexec*(). + + Existing programs can keep the official names getline(), fgetline() + and fexec*() as they are by default #defined to the new js_*() names. + To disable this convenience, add: + + #define NO_SCHILY_GETLINE To disable schily getline(), fgetline() + #define NO_SCHILY_FEXEC To disable schily fexec*() + #define NO_SCHILY_FSPAWN To disable schily fspawn*() + +- Libschily now has new "long double" support functions: + qftoes() and qftofs() + +- Libschily now supports a locale dependend decimal point for printing + floating point numbers. + +- Libschily now supports to print long double numbers using the + format() based portable printf() implementation. If this does not + work for your platform or if this does not work correctly for + your platform, please report. This was needed for our new "od" + implementation. + +- The option parsing implementation getargs()/getfiles() from + libschily now supports to combine single character boolean + flags even in case the option string mentions to call a callback + function if a valid option was found. This was needed for our new + "od" implementation. + +- filereopen() from libschily no longer calls open() internally + as long as there is no need to create or truncate the file. + +- libschily's findinpath() now includes a new path parameter + to allow to use the function from bsh. + +- fnmatch is now always available as js_fnmatch() + +- New autoconf test for _qecvt() _qfcvt() _qgcvt() + and _qecvt_r() _qfcvt_r() _qgcvt_r() on AIX + +- smake's searchfileinpath() moved into libschily to allow it + to be generally used for searching for program resources. + +- New functions mkgmtime() mklgmtime() and timegm() + +- New function permtostr() in libschily allows to convert a + mode_t like stat.st_mode into a chmod compliant string like: + + u=rw,g=r,o=r + + that is accepted by libschily::getperm() to allow a conversion + back to a mode_t variable. + +- libschily::rename() now uses mktemp() to temorarily save the + rename target file. + +- comerr() now maps exit codes that would fold to '0' to EX_CLASH + which is -64 + +- New functions zerobytes() and cmpmbytes() added to libschily. + +- New functions strstr() and wcsstr() added to libschily. + +- libschily/fexec.c moved the workaround against the Mac OS X linker + for "environ" upwards to cover the new code also. + +- Fixed libschily/gettimeofday.c to compile with MSC + +- Fixed libschily/sleep.c to compile with MSC + +- Fixed libschily/usleep.c to be empty with MSC as sleep.c includes + a working usleep() + +- libschily/gethostname.c enhanced to support Win-DOS with cl.exe + +- libschily/uname.c New function to support Win-DOS with cl.exe + +- libschily/dirent.c New functions: opendir()/closedir()/readdir() + to support Win-DOS with cl.exe + +- libschily/kill.c New function to support Win-DOS with cl.exe + +- libschily/stdio/fgetline.c 64 bit speedup by calling fgets() in + case that getc() is not a macro. + +- libschily/stdio/fgetstr.c 64 bit speedup by calling fgets() in + case that getc() is not a macro. + +- libschily/chown.c new to support Win-DOS with cl.exe + +- New functions strstr() and wcsstr() + +- New libschily::fgetaline() and libschily::getaline() implement the + functionality of the POSIX violating "getline()" from POSIX.1-2008. + +- New file libschily/abspath.c + +- New file libschily/resolvepath.c + +- New file libschily/mkdirs.c + +- An openat() emulation was added to libschily for platforms that + miss openat(). + +- An fchdir() emulation was added to libschily for platforms that + miss fchdir() + +- libschily/at-defs.h new support file for internals from the *at() + emulation + +- libschily/lxchdir.c new file to support chdir() to long + path names + +- libschily/procnameat.c new file to support *at() functions in case + that a newer /proc file system implementation is available + +- libschily/savewd.c new file to support to save the current working + directory regardless of whether fchdir() is present or not. + +- libschily/wdabort.c new file with abort functions that are needed + in libschily for the case that no system fchdir is available and + an attempt to emulate *at() functions fails + +- New functions strcasecmp() and strncasecmp() for libschily. + +- New functions diropen() dirrdopen() dirclose() for libschily. + These functions are needed in order to emulate fchdir() on platforms + that do not support fchdir(). + +- file_raise(NULL, FALSE) now also affects files that have been + opened before the file_raise() call. + +- getperm.c now correctly supports umask +w + +- Libschily is now linked against $(LIB_INTL) when a shared libschily + is created. + +- Avoid warnings from cl.exe for libschily/gettimeofday.c + +- Better comment in comerr.c to help to understand exit() code folding + to 8 bits and how it may be avoided. + +- libschily::fexecv() now allows to use the parameter "ac" with the + value -1 to indicate that the arg count is to be determined by the + NULL pointer at the end of the arg list. + +- Added #include to libschily/fnmatch.c + +- Various Cstyle changes in the include/schily directory. + +- New include file: include/schily/shedit.h + +- Make sure that include/schily/time.h always includes a struct timespec + definition. + +- new functions getnstimeofday() and setnstimeofday() + +- New files for libschily: + + at-base.c generic implementation for *at() functions. + fchownat.c fchownat() + fdopendir.c fdopendir() + fstatat.c fstatat() + futimens.c futimens() + futimesat.c futimesat() Solaris specific old for utimensat() + lutimens.c lutimens() + linkat.c linkat() + mkdirat.c mkdirat() + mkfifo.c mkfifo() + mkfifoat.c mkfifoat() + mknodat.c mknodat() + readlinkat.c readlinkat() + renameat.c renameat() + symlinkat.c symlinkat() + unlinkat.c unlinkat() + utimens.c utimens() + utimensat.c utimensat() + at-base.c The base code for all single fd *at() functions. + at-base2.c The base code for all double fd *at() functions. + + contain emulations for system interfaces introduced in summer 2001 by Sun + and with POSIX.1-2008. + +- New functions in libschily: + + absfpath() + resolvefpath() + + allow to better control the behavior using flags. + +- The linker map file for libschily now adds some forgotten functions. + +- libschily/strstr.c and libschily/wcsstr.c now include a + CDDL License hint + +- libschily::format.c (printf) now supports length modifiers + like h hh l ll t z for the %n format. + +- libschily::format.c has been restructured for parsing the + field width parameters in a way that would allow to later + introduce support for %n$ + +- Try to take care about the fact that MinGW32 does not support + a standard compliant mkdir() function with two parameters. + This applies top libschily/mkdirat.c and libschily/mkdirs.c + +- Corrected a typo in libschily/mkfifoat.c that called mkdir() + instead of mkfifo() + +- libschily/getdtablesize.c needs the same treatment for MinGW32 as for + cl.exe + +- New functions xcomerr(), xcomerrno(), fxcomerr(), fxcomerrno() + in libschily allow error message and exit with an exit value + that differs from errno. + +- a bug in libschily/format.c that caused %.*s to be printed + incorrectly has been fixed. + +- libschily/format.c has been redesigned to allow the code to be + reused for fprformat() via #include. + +- libschily/fprformat.c + New function fprformat() in libschily is implementing the same + direct interface as doprnt() from libc and thus allows to implement + printf() faster than the printf() from libc on Solaris. + +- libschily/jsprintf.c + For Solaris, jsprintf() now is implemented based on fprformat(). + This allows printf() from libschily to be aprox. 33% faster than + printf() from libc on Solaris and aprox. 2x as fast as jsprintf() + in libschily has been before. This gives another performance boost + for printf() bound programs like hdump/od that is used as a OSS + replacement for the closed source od(1) on OpenSolaris. This + now makes the OSS od(1) on OpenSolaris typically 5x faster then + the closed source version. + +- libschily/getdtablesize.c now treats MinGW the same as when compiling + on Win-DOS using cl.exe. + +- libschily/mkdirat.c and libschily/mkdirs.c now take care of the fact + that MinGW has a non standard compliant mkdir() + +- libschily/mkfifoat.c fixed a type from, cut/paste the file from mkdirat.c + +- libschily now implements strspn() strcspn() wcsspn() wcscspn() + +- libschily/format.c (the low level printf() implementation) now + implements support for %n$ argument repositioning for the + case that "n" is 1..30, or if larger points to an int type arg. + +- libschily/fprformat.c fixed a bug that would prevent to use + stdio macros with newer OpenSolaris versions, making printf() + not as fast as expected. + +- libschily/sleep.c and libschily/usleep.c have been modified to work + with MinGW. + +- libschily/format.c fixed to compile again with K&R C that does + not support "long double". + +- No longer use fgets() for fgetaline(), fgetline() and fgetstr() + as fgets() cannot deal with embedded '\0' chars before the '\n'. + +- libschily/fstream.c now supports local flags (for the caller) + and pushable streams to keep blocks of pushed text atomically. + +- libschily/fchmodat.c was added, it has been forgotten when + the emulations for the *at() functions have been introduced. + It is needed for the new enhanced isoinfo command. + +- libschily/mknodat.c now correctly provides a mknodat() function even + when there is no mknod() command. + +- libschily/futimens.c now is more Sun specific when trying to implement + futimens() via utimensat(), as only Solaris supports a f*() interface + in case that the path name is a NULL pointer. + +- libschily/faccessat.c with a faccessat() was added. This has been forgotten + when the *at() functions have been implemented. + +- libschily/eaccess.c no longer calls access() in case that the OS does not + implement eaccess() but rather first checks whether uid == euid and gid == egid. + +- libschily/eaccess.c compiles again in HP-UX using the HP C-compiler + +- libschily/dlfcn.c new file to emulate dlopen() and friends on Win-DOS + and HP-UX + +- libschily/lchmod.c was added + +- libschily/fchmodat.c no longer contains lchmod() + +- The linker mapfile libschily/libschily-mapvers now correctly + makes the entry faccessat() depend on HAVE_FACCESSAT + +- strlcatl() wcslcatl(): new functions + +- libschily::linkat.c now manually null-terminates the result from + resolvepath() as the Solaris syscall implementation does not + null-terminate it in all cases. + +- libschily::resolvepath.c comment added to remind on the fact that + in contrary to our implementation the Solaris resolvepath() syscall + does not null-terminate the buffer. + + +- New function j_error() works where error() is too generic. + +- make strlcatl() and wcslcatl() work with K&R compilers + +- libschily/getargs.c now is more careful with calling va_arg() + and only calls it as many times as a related format is found in the + format string. + +- libschily now contains a getdelim() implementation and always uses + getdelim() to implement the fgetaline() function. + +- libschily: the *mem.c implementations now include new *mexval() + functions to set the exit code on failure to a static value instead + of the default "errno" value for the failure. + +- libschily: the linker map file now also lists the forgotten new entries: + strlcatl() and wcslcatl() + +- libschily/spawn.c:wait_chld() no longer returns 0 if the child process + was killed by a signal. + +- libschily now adds some of the existing (old) man pages for various + functions from libschily. + +- libschily/comerr.c and libschily/fcomerr.c now have better + comment. + +- libschily now uses the test: + + #if defined(HAVE_PRAGMA_WEAK) && defined(HAVE_LINK_WEAK) + + to prevent assuming that is sufficient when the compiler supports + #pragma weak. We also need to have a linker that links against + weak symbols in libraries. HAVE_LINK_WEAK is e.g. not defined + on Cygwin... + +- libschily/resolvepath.c now #define's lstat stat if lstat() + is missing. + +- libschily/error.c now allows to be compiled without weak + symbols by using -DNO_WEAK_SYMBOLS + + +Libedc (Optimized by Jörg Schilling, originated by Heiko Eißfeldt heiko@hexco.de): + +- Some cstyle changes + +- Added #include + + +Libcdrdeflt: + +Libdeflt: + +- The function defltcntl() in libdeflt is now working and allows to + select a case insensitive mode. + +- New function defltsect() in libdeflt allows to create sub-sections + in configuration files. These subsections need to be named: + "[section-name]" and the '[' must be at the beginning of a line. + +- Added #include + +- Added defltsect() to the list of exported functions for the + shared library version + + +Libfile: + +Libfind: + +- New functions: find_hasprint() and find_hasexec() + +- New flag WALK_STRIPLDOT to strip leading "./" like star does + +- libfind no longer aborts with a lack of memory but writes an error + message + +- libfind now correctly frees memory that has been allocated internaly + from treewalk() + + +- libfind/find.c disables -exec in case there is no fork(). + This is in order to support MINGW + +- libfind/walk.c now uses O_SEARCH to open directories + +- dirname -> dir_name to avoid a gcc warning + +- Fixed a filedesrciptor leak in libfind that hits when using + -empty on empty directories. + +- Libfind now allows to check for -type P (Solaris event port). + A missing "case 'P':" was added to the parser. + +- libfind/idcache.c now saves uname/gname as long as possible and uses + strlcpy() instead of strncpy(). + +- libfind: the forgotten entries find_hasexec() and find_hasprint() + have been added to the linker map file + +- Workaround a problem with vfork() on Linux caused by missing vfork() + definitions in the system include files that cause a coredump from + free() when using find -exec + + +Libhfs_iso: + +- Rename variable "utime" to "uxtime" to avoid a compiler warning + +Libmdigest: + +- Cygwin is broken, when using #pragma weak, so we cannot create + weak symbols on Cygwin for sha2.c + +- Some cstyle changes + +- CSTYLED comment added + +- libmdigest now uses the test: + + #if defined(HAVE_PRAGMA_WEAK) && defined(HAVE_LINK_WEAK) + + to prevent assuming that is sufficuent when the compiler supports + #pragma weak. We also need to have a linker that links against + weak symbols in libraries. HAVE_LINK_WEAK is e.g. not defined + on Cygwin... + +Libparanoia (Ported/enhanced by Jörg Schilling, originated by Monty xiphmont@mit.edu): + +- memset() call in i_silence_match() now uses the correct size + instead of sizeof (avec). + Thanks to a hint from Andrew Dudman + +- Use dynamic arrays instead of alloca()/malloc() if available. + +- libparanoia now implements the first stage in C2 error pointer + support: it now is able to deal with input data that contains + C2 pointers and it implements new callbacks to report C2 + statistics back to the caller. + +- libparanoia now supports to control the size of the read-ahead buffer. + This allows libparanoia to be adapted to the current constraints. + + +Libsiconv: + +- new function sic_base() returns the dynamically retrieved install base + for the siconv database. + +- sic_open() no longer tries to open all characterset names as files in + the current directory but only if the name contains a slash. + Thanks to a report from Vladimir Marek + +- libsiconv: the forgotten sic_base() was added to the linker map file + + +Libscg: + +- libscg/scg/aspi-dos.h now uses void instead of VOID to allow a compilation + with gcc. + +- libscg/scsi-wnt.c (MS-WIN) now supports 64 SCSI busses + +- libscg/scsi-bsd.c tries to better support the SCSI sense data + length in the recently upgrades in FreeBSDs ATAPI/CAM module. + +- try to keep SCSI status and error codes when doing a manual GET SENSE + on AIX, UnixWare, VMS, Linux Parallel Port, Apollo Domain + +- libscg::scsi-aix.c was updated with some experimental code to support + two new SCSI kernel interfaces on AIX. + +- Allow to disable the SCSI low level transport adoption layer + from libscg by adding -DNO_SCSI_IMPL + +- libscg/scsihack.c now supports the MSC compiler + +- Several small changes to work around oddoties fount in MS include files + +- Trying to better support AIX again. + +- struct scsi_inquiry is now using a union around the vendor ID strings in + order to avoid incorrect buffer overflow warnings from GCC-4.x + +- Some cstyle changes + +- For newer Cygwin versions, we need an own PACKED definition in + libscg/scg/aspi-win32.h + +- Trying to support suid-root-less installation of librscg users on Linux. + librscg now understands that a non-root program may be able to + create sockets for a privileged port. + +- Repositioned #ifdefs to avoid unused variable definitions in + libscg/scsi-sun.c + +- libscg/scsi-linux-ata.c now aborts early if errno == EPERM. This now + makes it behave like libscg/scsi-linux-sg.c + +- A new scg flag SCGF_PERM_PRINT tells libscg to print a more verbose error + in case that a SCSI command was aborted with errno == EPERM. + +- Sources have been modified to deal __CYGWIN32__ like __CYGWIN__ + This is neded as newer Cygwin versions that run in 64 Bit mode + do no longer define __CYGWIN32__ but __CYGWIN__ + +- Some cstyle changes + +- For newer Cygwin versions, we need an own PACKED definition in + libscg/scg/aspi-win32.h + +- Trying to support suid-root-less installation of librscg users on Linux. + librscg now understands that a non-root program may be able to + create sockets for a privileged port. + +- Repositioned #ifdefs to avoid unused variable definitions in + libscg/scsi-sun.c + +- libscg/scsi-linux-ata.c now aborts early if errno == EPERM. This now + makes it behave like libscg/scsi-linux-sg.c + +- A new scg flag SCGF_PERM_PRINT tells libscg to print a more verbose error + in case that a SCSI command was aborted with errno == EPERM. + +- Sources have been modified to deal __CYGWIN32__ like __CYGWIN__ + This is neded as newer Cygwin versions that run in 64 Bit mode + do no longer define __CYGWIN32__ but __CYGWIN__ + + +Libscgcmd: + +Libsiconv: + +- sic_open() no longer tries to open all characterset names as files in + the current directory but only if the name contains a slash. + Thanks to a report from Vladimir Marek + +Rscsi: + +Cdrecord: + +- A typo in cdrecord.c was corrected. + +- cdrecord/cue.c now uses a correct byte order for RAW audio data in + Intel byte-order + +- Cdrecord now uses gettext() to translate texts. + There are currently not yet translated texts. The cdrtools project needs help + with translating the texts. + +- cdrecord now warns and aborts if someone tries to write more CD-Text + for a single language than permitted by the standard. + +- cdrecord now warns about the correct max. CD-Text size + for a single language that is permitted by the standard. + +- Several changes to support mingw and MSC + +- cdrecord man page corrected some small typos in the EXAMPLES section. + +- cdrecord has been converted to be able to run completely root-less + and suid-root-less and with no script that calls pfexec(1). This + works on OpenSolaris ONNV_140 or later because the functionality + of pfexec(1) has been integrated into the kernel. + + To enable this feature. edit the file /etc/security/exec_attr and add: + + Basic Solaris User:solaris:cmd:::/usr/bin/cdrecord:privs=file_dac_read,sys_devices,proc_lock_memory,proc_priocntl,net_privaddr + or + Basic Solaris User:solaris:cmd:::/opt/schily/bin/cdrecord:privs=file_dac_read,sys_devices,proc_lock_memory,proc_priocntl,net_privaddr + + depending on where you install cdrecord. + No special shell is needed anymore. + +- struct scsi_inquiry is now using a union around the vendor ID strings in + order to avoid incorrect buffer overflow warnings from GCC-4.x + +- Trying to support suid-root-less installation of cdrecord on Linux. + NOTE: You need "file caps" support built into your Linux installation. + + Call: + + setcap cap_sys_resource,cap_dac_override,cap_sys_admin,cap_sys_nice,cap_net_bind_service,cap_ipc_lock,cap_sys_rawio+ep /opt/schily/bin/cdrecord + To set up the capabilities on Linux. + + +- Allow to compile without Linux libcap using "smake COPTX=-DNO_LINUX_CAPS LIB_CAP=" + +- Cdrecord now checks whether there are sufficient fine-grained privileges. + +- Cdrecord now uses the new flag SCGF_PERM_PRINT to get better warnings if the + permissions granted by the OS are not sufficient. + +- Sources have been modified to deal __CYGWIN32__ like __CYGWIN__ + This is neded as newer Cygwin versions that run in 64 Bit mode + do no longer define __CYGWIN32__ but __CYGWIN__ + +- Typo correction in a comment + +- Trying to avoid to confuse users + on Solaris and Linux where a fine-grained privilege implementation + exists. Before, fine-grained privileges have been given up after + initializing the program and this may result in a root user that + is treated as a normal user that cannot write into directories + without global write permission. The named programs now no longer + give up privileges in case they have been called with the needed + privileges already and thus the programs cannot be used for + privilege escalations anymore. + +- Fixed some typos in cdrecord + +- Better comment about cdrecord specific enhancements in CUE files. + +- cdrecord/cue.c now has a better comment related to cdrtools specific + CUE enhancements. + +- Fixed a typo in cdrecord.dfl + +- The timediff function now in addition prints the time diff in + hours : minutes : seconds . thausands of a second. + + Thanks to a hint from Donald R Laster Jr from Slackware. + +- The programs cdrecord adopts to the recent Haiku + changes with a randomized address space and now use B_EXACT_ADDRESS + instead of B_ANY_ADDRESS for the clone_area() call to get shared memory + for a FIFO. + + +Cdda2wav (Maintained/enhanced by Jörg Schilling, originated by Heiko Eißfeldt heiko@hexco.de): + +- Fixed a typo in cdda2wav/cdda2ogg.1 (man page) + +- Cdda2wav now uses gettext() to translate texts. + There are currently not yet translated texts. The cdrtools project needs help + with translating the texts. + +- many typo fixes to the cdda2wav.1 man page, thanks to John Bradshaw + +- Several changes to support mingw and MSC + +- cdda2wav has been converted to be able to run completely root-less + and suid-root-less and with no script that calls pfexec(1). This + works on OpenSolaris ONNV_140 or later because the functionality + of pfexec(1) has been integrated into the kernel. + + To enable this feature. edit the file /etc/security/exec_attr and add: + + Basic Solaris User:solaris:cmd:::/usr/bin/cdda2wav:privs=file_dac_read,sys_devices,proc_priocntl,net_privaddr + or + Basic Solaris User:solaris:cmd:::/opt/schily/bin/cdda2wav:privs=file_dac_read,sys_devices,proc_priocntl,net_privaddr + + depending on where you install cdda2wav. + No special shell is needed anymore. + +- Better handling of CLONE AREAs on newer Haiku versions. + +- Some cstyle changes + +- cdda2wav now only prints "load cdrom please and press enter" once + per line and does not repeat the text for garbage characters that + have been in stdin. Thanks to Phi Tran from Oracle for reporting. + +- Trying to support suid-root-less installation of cdda2wav on Linux. + NOTE: You need "file caps" support built into your Linux installation. + + Call: + + setcap cap_dac_override,cap_sys_admin,cap_sys_nice,cap_net_bind_service,cap_sys_rawio+ep /opt/schily/bin/cdda2wav + To set up the capabilities on Linux. + + +- Include file reordering to avoid warnings on older platforms + +- Allow to compile without Linux libcap using "smake COPTX=-DNO_LINUX_CAPS LIB_CAP=" + +- Repositioned #ifdefs to avoid unused variable definitions in + cdda2wav/sndconfig.c + +- Cdda2wav now checks whether there are sufficient fine-grained privileges. + +- Work around a bug in sys/param.h FreeBSD-9.1, that #define's __FreeBSD_kernel__ + instead of #define __FreeBSD_kernel__ 9 that would be needed for Debian + k-FreeBSD compatibility. + The bug affects cdda2wav/mycdrom.h + +- Sources have been modified to deal __CYGWIN32__ like __CYGWIN__ + This is neded as newer Cygwin versions that run in 64 Bit mode + do no longer define __CYGWIN32__ but __CYGWIN__ + +- Typo correction in a comment + +- Fixed fine-grained privilege handling for Linux. + Thanks for Daniel Pielmeier from Gentoo for reporting and testing. + +- Trying to avoid to confuse users + on Solaris and Linux where a fine-grained privilege implementation + exists. Before, fine-grained privileges have been given up after + initializing the program and this may result in a root user that + is treated as a normal user that cannot write into directories + without global write permission. The named programs now no longer + give up privileges in case they have been called with the needed + privileges already and thus the programs cannot be used for + privilege escalations anymore. + +- Cddda2wav now flushes stderr before asking for a specific cddb + entry index. It seems that on Linux stderr may not be unbuffered + as expected. + +- Cdda2wav moved the option parsing code into a separate function + gargs(). + +- cdda2wav now prints the number of read operations per track when + in paranoia mode + +- cdda2wav now prints the read overhead (in percent) per track when + in paranoia mode + +- cdda2wav adds a new paraopts= mode: "c2check" to run libparanoia + in C2 mode. + +- cdda2wav did get a major overhoul for libparanoia that may + make the extract quality better up to a factor of 100x: + + A new suboption "readahead=" for paraopts= allows to modify + the read-ahead buffer size to make it large ebough for the amount + of RAM in modern drives. + + The interpratation of "problem sectors" was changed to better deal + with the fact that in case of bad areas, the libparanoia code + tends to do repeated reads in those bad areas. The computation + of the percentage of bad sectors now takes care of re-read sectors. + Repeated reads still increase the value but no longer in a + quadratical way. + +- Better documentation for the libparanoia interface in cdda2wav + allows to better understand how it works and how modifying + parameters could influence the extract quality. + +- Add another instance of #undef interface in hope to help with + compiling using MinGW32 + +- Avoid a redefined xxx warning for cdda2wav/exitcodes.h + +- Added a #undef interface to cdda2wav/interface.h to make sure that + the #define interface from windows.h does not cause problems even + when using MinGW + +- Cdda2wav no longer includes the new paranoia mode "c2check" in the macro + "proof". This has been done because of a report from Géraud Meyer + that gives hints that the drive: + Type: ROM, Vendor 'TSSTcorp' Model 'CDDVDW SH-222AB ' Revision 'SB00' MMC+CDDA + does not handle hidden tracks when "c2check" is active. + +- Flush stderr before a question in cdda2wav. This is a workaround + for a Linux libc bug (stderr must be unbuffered acording to the + standard). + +- The programs cdda2wav adopts to the recent Haiku + changes with a randomized address space and now use B_EXACT_ADDRESS + instead of B_ANY_ADDRESS for the clone_area() call to get shared memory + for a FIFO. + + +Readcd: + + +- Readcd now uses gettext() to translate texts. + There are currently not yet translated texts. The cdrtools project needs help + with translating the texts. + +- Better algorithm for -edc-corr + +- readcd has been converted to be able to run completely root-less + and suid-root-less and with no script that calls pfexec(1). This + works on OpenSolaris ONNV_140 or later because the functionality + of pfexec(1) has been integrated into the kernel. + + To enable this feature. edit the file /etc/security/exec_attr and add: + + Basic Solaris User:solaris:cmd:::/usr/bin/readcd:privs=file_dac_read,sys_devices,net_privaddr + or + Basic Solaris User:solaris:cmd:::/opt/schily/bin/readcd:privs=file_dac_read,sys_devices,net_privaddr + + depending on where you install readcd. + No special shell is needed anymore. + +- Cygwin is broken, when using #pragma weak, so we cannot create + weak symbols on Cygwin for sha2.c + +- avoid a GCC warning when compiling readcd.c + +- Trying to support suid-root-less installation of readcd on Linux. + NOTE: You need "file caps" support built into your Linux installation. + + Call: + + setcap cap_dac_override,cap_sys_admin,cap_net_bind_service,cap_sys_rawio+ep /opt/schily/bin/readcd + To set up the capabilities on Linux. + + +- Allow to compile without Linux libcap using "smake COPTX=-DNO_LINUX_CAPS LIB_CAP=" + +- Readcd now checks whether there are sufficient fine-grained privileges. + +- Typo correction in a comment + +- Trying to avoid to confuse users + on Solaris and Linux where a fine-grained privilege implementation + exists. Before, fine-grained privileges have been given up after + initializing the program and this may result in a root user that + is treated as a normal user that cannot write into directories + without global write permission. The named programs now no longer + give up privileges in case they have been called with the needed + privileges already and thus the programs cannot be used for + privilege escalations anymore. + +- readcd -c2scan now also prints the percentage of sectors with C2 errors. + +Scgcheck: + +- Scgcheck now uses gettext() to translate texts. + There are currently not yet translated texts. The cdrtools project needs help + with translating the texts. + +- Several changes to support mingw and MSC + +- Link now against $(LIB_CAP) also as librscg needs it on Linux + + +Scgskeleton: + +- Scgskeleton now uses gettext() to translate texts. + There are currently not yet translated texts. The cdrtools project needs help + with translating the texts. + +- Link now against $(LIB_CAP) also as librscg needs it on Linux + + +Btcflash: + +- Btcflash now uses gettext() to translate texts. + There are currently not yet translated texts. The cdrtools project needs help + with translating the texts. + +- Link now against $(LIB_CAP) also as librscg needs it on Linux + +Mkisofs (Maintained/enhanced by Jörg Schilling since 1997, originated by Eric Youngdale): + +- Added a hint that the option -b needs a boot image argument that is + located inside the ISO image tree. + +- Added an additional hint on changed files in case that mkisofs encounteres + a file that did grow or shrink. + +- Removed a superfluous second #include from isoinfo.c + +- Typo corrections in mkisofs/mkisofs.8 man page + +- A bug was fixed with -sort and files > 4 GB. Mkisofs now correctly sorts the + disk addresses of the file content is such a case. + +- New options -long-rr-time -no-long-rr-time -short-rr-time allow to control + the time format used for files with Rock Ridge extensions. + + - The short time format supports year 1900..2155 with a one second + granularity + + - The long time format supports year 0..9999 with a 10ms granularity. + + Note that the Linux kernel only implements partial Rock Ridge support and + unfortunately does not support the long time format. It is planned to + make the long time stamp format the default in the future, so I encourage + the Linux kernel folks to add support for this time format. + +- isoinfo now supports the new option -find (via libfind) and allows to use + find expressions on ISO-9660 images. If the find expression neither contains + -print nor -ls and isoinfo is called: + + isoinfo -i xxx.iso -l -find ..... + + the ISO-9660 listing function from isoinfo is called whenever the find expression + returns TRUE. If there is a print or list primary in the find expression, then + the ISO-9660 listing is never called. + + +- Mkisofs and the diagnostic programs now use gettext() to translate texts. + There are currently not yet translated texts. The cdrtools project needs help + with translating the texts. + +- Add several forgotten options to the mkisofs man page. + +- Fixed several typos in the mkisofs man page and in mkisofs + +- Mkisofs now correctly supports El Torito multi boot entries by introducing + a Boot Section Header before a list of alternate boot entries. + +- New option -eltorito-platform allows to set the El Torito platform id + for a boot entry or for a list of boot entries. Supported values for the + parameter are: + + - x86 the standard value vor x86 based PCs + + - PPC the Power PC platform + + - Mac The Apple Mac platform + + - efi EFI based boot for PCs + + - # an arbitrary numerical value + +- New option -modification-date allows to specify a predictable UUID for grub. + + The syntax is: YYYY[MM[DD[HH[MM[SS]]]]][.hh][+-GHGM] and is forgiving + enought to accept the pupular POSIX date format created by: + + date "+%Y-%m-%d %H:%M:%S %z" + +- The mkisofs diagnostic tools now support MSC that does not support + POSIX terminal handling. + +- While introducing the new option -modification-date, we did accidently remove the + code to set up the creation date in te PVD. Now creation date again contains + correct data. + +- Avoid to access illegal memory from dvd_file.c::uniq() + +- Avoid a 32 bit integer overflow while computing sector addresses for + Rock Ridge CE entries. + +- A compile bug with QNX was corrected + +- A new option -ignore-error alows to continue on some errors. + +- Revert a change to dvd_file.c::uniq() that was made because of a "valgrind" + warning that claims illegal memory access. With the change from 3.01a09, mkisofs + however does not deal correctly with DVD-Video padding, so the valgrind warning is + wrong. + +- mkisofs now reserves more space for the file names to avoid a + path buffer overrun + +- Fixed a bug that caused to put more than one UDF direcory entry for a file + in case that the file is a ISO-0660 multi-segment file. + +- Fixed a bug that caused the wrong start sector address to be used for UDF + in case that the file is a ISO-9660 multi-segment file and the -sort option + was used. + +- mkisofs now identifies itdelf by default (inside the APPID string) + as being UDF capable. + +- mkisofs now sets link count and "unique id" == inode number for files. + Note that this may still not result in useful hardlinked files on all + platforms as e.g. Solaris and Linux ignore the UDF unique ID and rather + use the location of the file_entry as inode number. This will never + return the same number for different filenames that point to the + same file data and thus prevents hard linked files from being visible. + + This is however not a Solaris problem, the problem is rather in the + UDF standard that does not require the unique id to be in a 32 bit + range as long as the media size is = 8 TB. Note that 32 bit UNIX + programs cannot access files with an inode number that cannot be + expressed as 32 bit number, so inode numbers that do not fit into + 32 bits may cause problems. Ths only way to work around this problem + would be to enance the Solaris and Linux UDF filesystem module to + recognize whether a filesystem has been created by mkisofs that grants + useful inode numbers. The same is already done for ISO-9660. + +- mkisofs now supports additional file types with UDF: + + - named pipes + - sockets + - character devices + - block devices + +- mkisofs now supports all three UNIX times with microsecond granularity in UDF + +- mkisofs now sets correct user/group/permission for symlinks in UDF + +- mkisofs now supports S_ISUID, S_ISGID, S_ISVTX (set uid, set gid, sticky) in UDF + +- -new-dir-mode now just superseeds the effect of -dir-mode on + directories that have been "invented" by mkisofs. + This is a more intuitive behavior. + +- Link now against $(LIB_CAP) also as librscg needs it on Linux + +- Make mkisofs compile without -DUDF and without -DDVD_VIDEO + Thanks to a hint from rmd4work@mail.ru + +- Fixed a typo in the mkisofs man page (had \-max\-ISO-9660\-filenames + instead of \-max\-iso9660\-filenames) + +- mkisofs/mkisofs.8 fixed illegal troff sequence "\\" to "\e" + +- Try to avoid a direct string "/dev/null" in mkisofs.c to allow + it to work on Win-DOS without POSIX layer. + +- Better error messages in mkisofs/apple.c + +- mkisofs now inplements a new option -legacy that allows to get back the + options -H/-L/-P that have been deprecated in 2002 and disabled in 2006 + in the definition from the 1990s. + If you like to use this feature, write a wrapper shell script that calls: + + mkisofs -legacy "$@" + + Note that -H/-L/-P have been disabled in 2006 and mkisofs will soon + introduce -H/-L/-P with a POSIX compatible definition as announced since + 2002. So take care to convert your scripts to call: + + -map for the old definition of -H + (valid between 2000 and 2002) + -allow-leading-dots for the old definition of -L + (valid between 1995 and 2002) + -publisher for the old definition of -P + (valid between 1993 and 2002) + +- The mkisofs now correctly documents the new behavior from libsiconv + +- mkisofs was slightly modified to reduce CPU time requirements. + It now reads/writes in 64kBytes chunks instead of stdio buffer + size which is typically 8 kB. + +- Fixed a typo in the mkisofs man page. + Thanks to a hint from Donald R Laster Jr from Slackware. + +- Mkisofs now in addition prints "-iso-level 3 or more required" + in case that a large file was skipped because of the current mkisofs settings. + + Thanks to a hint from Donald R Laster Jr from Slackware. + +- A problem in isoinfo has been fixed. + This problem caused "isoinfo -R -find -ls" to print Jan 1 1970 timestamps + in case that Rock Ridge was not present. + + WARNING: the new version of the isoinfo program makes use of the + *at() series of functions that have been introduced by Sun + in August 2001 and added to POSIX.1-2008. For older platforms, + libschily now includes emulations for these functions but + these emulations have not yet been tested thouroughly. + Please report problems! + +- The man page isoinfo.8 was enhanced by mentioning the option -s (print + file sizes in multiple if 2048 byte sectors) and by documenting the + list format that is used with -l. + +- isoinfo now evaluates the Rock Ridge "PN" signature and thus supports + to display and use the major/minor device numbers. + +- isoinfo now extracts time stamps with sub second granularity in + order to be able to set fine-grained file timestamps, see -X option + below. + +- isoinfo now knows how to find out whether a ISO-9660 filesystem was + created by a newer mkisofs and thus includes useful inode numbers + in ISO-9660. These ISO-9660 based inode numbers are used in case that + there is no Rock Ridge-1.12 that includes inode numbers in the "PX" + signature. + +- isoinfo now has a new option -X that extracts all files (in case that + -find is not used) or files selected by a -find expression. Note that + -find expressions may include -chown, -chgrp and -chmod to modify the + meta data of files. + +- Fixed a bug in mkisofs: -eltorito-platform Mac no longer uses the + constant EL_TORITO_ARCH_PPC but EL_TORITO_ARCH_MAC as expected. + Thanks to Ady for reporting. + +- Fixed an option parsing bug in mkisofs that was a result from + option names that are beginning substrings of others. Mkisofs did + try to fix this in 2006, but it seems that one option was missed + in 2006. Now -hide-hfs was fixed, thanks to: Valery Ushakov + +- The mkisofs program isoinfo no longer tries to print Rock Ridge + attribute data for ISO images that do not have correct RR data. + +- The mkisofs program isovfy no longer tries to print Rock Ridge + attribute data for ISO images that do not have correct RR data. + +- The mkisofs program isodump no longer tries to print Rock Ridge + attribute data for ISO images that do not have correct RR data. + + This is a result from trying to use these programs on the + plan9 CD image. + + +- mkisofs: isodump did not compile on non c99 compilers. + +- mkisofs/diag/isoinfo.c now test for HAVE_MKNOD in order to avoid + calling mknod() on MINGW32. + +- mkisofs has also been corrected to use + S_IFCTG and S_ISCTG instead of the S_IFCNT and S_ISCNT + + +HELIOS TODO: + + - Add the HELIOS UNICODE mapping code. This needs to be done + at UCS-2 level for Joliet and UDF (instead of UTF-8) and only + for Rock Ridge (in case of a UTF-8 based target locale) using + UTF-8 based translations. + + - Make the Apple extensions work again with "mkisofs -find" + +TODO: + + - read Joliet filenames with multi-session if no TRANS.TBL + or RR is present. I am looking for a volunteer for this task! + + Note that this can never be 100% correct as there is no relation + between the names on the master (UNIX) filesystem, the ISO-9660 + names and the Joliet names. Only the Rock Ridge names are + untranslated with respect to the original files on the + master (UNIX) filesystem. + + - add libecc/edc for CDI and similar. + + +CYGWIN NT-4.0 NOTES: + +To compile on Cygwin32, get Cygwin and install it. +For more information read README.win32 + +The files are located on: + +http://sourceforge.net/projects/cdrtools/files/alpha/ ... + +NOTE: These tar archives are 100% POSIX compatible. GNU tar may get some + minor trouble. If you like a 100% POSIX compliant tar, get star from + http://sourceforge.net/projects/s-tar/files/ of from the schily-* + tarball at: http://sourceforge.net/projects/schilytools/files/ + +WARNING: Do not use 'winzip' to extract the tar file! + Winzip cannot extract symbolic links correctly. + +Joerg diff -Nru cdrtools-2.01.01a33/AN-3.02a01 cdrtools-3.02a09/AN-3.02a01 --- cdrtools-2.01.01a33/AN-3.02a01 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/AN-3.02a01 2015-11-09 11:36:53.000000000 +0000 @@ -0,0 +1,218 @@ +***************** Important news **************************** + +For the 'Slottable Source Plugin Module' SSPM Features read README.SSPM + +***************** Please Test ********************************* + +NEW features of cdrtools-3.02a01: + +This is the first localization step for cdrtools. All programs now (hopefully) +call gettext() for all strings that need localization. + +- The next step will include dgettext() calls for the libraries. + +- The following step will include the extracted strings + +- The last step will include German translations and install support + for the resulting binary message object files. + +----------> Please test and report compilation problems! <--------- + +***** NOTE: As mentioned since 2004, frontends to cdrtools should ***** +***** call all programs from cdrtools in the "C" locale ***** +***** by e.g. calling: LC_ALL=C cdrecord .... ***** +***** unless these frontends support localized strings ***** +***** used by the cdrtools with NLS support. ***** + +This version compiles on Win-DOS using the Microsoft compiler cl.exe but +warning: due to missing POSIX compliance with basic features (e.g. stat() +does not return inode numbers), there are many problems with the resulting +code and thus it is recommended to better use a POSIX layer on top of +WIN-DOS. + + *** WARNING *** + *** Need new smake *** + + *** Due to the fact that schily-2014-04-03 introduced to use new macro + *** expansions and a related bug fix in smake, you need a new smake + *** to compile this source. To ensure this, get a recent "schily" + *** tarball from http://sourceforge.net/projects/schilytools/files/ + *** and call: + + cd ./psmake + ./MAKE-all + cd .. + psmake/smake + psmake/smake install + + The new smake version mentioned above is smake-1.2.4. + Note that smake-1.2.5 exists and is preferrable. + + Now you have a new smake that is able to compile this source. + + Note that the major makefile restructuring introduced in + schily-2014-04-03 is now more than one month ago and thus seems + to work without problems. + + WARNING: the new version of the isoinfo program makes use of the + *at() series of functions that have been introduced by Sun + in August 2001 and added to POSIX.1-2008. For older platforms, + libschily now includes emulations for these functions but + these emulations have not yet been tested thoroughly. + Please report problems! + + +All: + +- As the defective typedef for idtype_t is already in NetBSD-5, + we added a workaround based on a new related autoconf test. + Thanks to Heiko Eißfeldt for reporting. + +- Added support to compile on "Bitrig", an OpenBSD fork for non + automake aware make implementations like gmake. + Thanks to Heiko Eißfeldt for reporting. + +- Added an autoconf test for tcgetsid() + +Libschily: + +Libcdrdeflt: + +Libdeflt: + +Libedc (Optimized by Jörg Schilling, originated by Heiko Eißfeldt heiko@hexco.de): + +Libfile: + +Libfind: + +- libfind: a final workaround for the problems with vfork() in the linux + system include files has been introduced and a variable has been declared + volatile. + +- libfind no longer uses gettext() but dgettext() and thus no longer + destroys the message binding from the Bourne Shell + +- libfind: find -mtime +2s -mtime +20s now works, as file timestamps + are now compared to the current time. Before, the current time +60s + was used - a timestamp that is needed for switching between both + time stamp variants for -ls. + +Libhfs_iso: + +Libmdigest: + +Libparanoia (Ported/enhanced by Jörg Schilling, originated by Monty xiphmont@mit.edu): + +- libparanoia: Make abs() a self defined macro as ISO-C defines abs() + to be a function with int parameter. + Thanks to Heiko Eißfeldt for reporting. + +- libparanoia: work around a bug that resulted from uninitalized + statistics data for C2 checks in case that C2 checking was disabled. + Thanks to Heiko Eißfeldt for reporting. + +Libscg: + +- libscg: added a new error code to make search for the right + device node work again with newer OpenBSD versions. + Thanks to Heiko Eißfeldt. + +Libscgcmd: + +Libsiconv: + +Rscsi: + +Cdrecord: + +- The man page now mentions that root-less operation is possible with + Solaris fine grained privileges or Linux capabilties. + +- The man page now mentions the SCSI CAM standard for dev= + +Cdda2wav (Maintained/enhanced by Jörg Schilling, originated by Heiko Eißfeldt heiko@hexco.de): + +- cdda2wav: Comparison of function name with NULL replaced with + comparison of function pointer with NULL. + Thanks to Heiko Eißfeldt for reporting. + +- cdda2wav: Do no longer initialize the sound card from the main process + as pulseaudio does not follow UNIX rules for forked processes. + Thanks to Heiko Eißfeldt. + +- cdda2wav: Fixed a bug in the DMA residual computation for the C2 read + functions where a wrong divisor (2353 instead of 2646) was used. + Thanks to Heiko Eißfeldt for reporting. + +- cdda2wav: Heiko make the audio output work on OpenBSD + +- cdda2wav: Heiko added code for pulseaudio support in Linux + +- cdda2wav: Fixed a typo ("KHz" -> "kHz") + +- cdda2wav: fixed a problem related to position differences between + the CD extract part and the filesystemwrite part. + +- cdda2wav: We now include "c2check" in the paranoia mode "proof" + again and fallback to a non-C2 mode in case the drive does not + support C2checks. + +- The man page now mentions the SCSI CAM standard for dev= + +Readcd: + +- The man page now mentions the SCSI CAM standard for dev= + +Scgcheck: + +Scgskeleton: + +Btcflash: + +Mkisofs (Maintained/enhanced by Jörg Schilling since 1997, originated by Eric Youngdale): + +- mkisofs: HFS creation: fixed comparison of array with 0 to become + comparison of array value with 0. + +HELIOS TODO: + + - Add the HELIOS UNICODE mapping code. This needs to be done + at UCS-2 level for Joliet and UDF (instead of UTF-8) and only + for Rock Ridge (in case of a UTF-8 based target locale) using + UTF-8 based translations. + + - Make the Apple extensions work again with "mkisofs -find" + +TODO: + + - read Joliet filenames with multi-session if no TRANS.TBL + or RR is present. I am looking for a volunteer for this task! + + Note that this can never be 100% correct as there is no relation + between the names on the master (UNIX) filesystem, the ISO-9660 + names and the Joliet names. Only the Rock Ridge names are + untranslated with respect to the original files on the + master (UNIX) filesystem. + + - add libecc/edc for CDI and similar. + + +CYGWIN NT-4.0 NOTES: + +To compile on Cygwin32, get Cygwin and install it. +For more information read README.win32 + +The files are located on: + +http://sourceforge.net/projects/cdrtools/files/alpha/ ... + +NOTE: These tar archives are 100% POSIX compatible. GNU tar may get some + minor trouble. If you like a 100% POSIX compliant tar, get star from + http://sourceforge.net/projects/s-tar/files/ of from the schily-* + tarball at: http://sourceforge.net/projects/schilytools/files/ + +WARNING: Do not use 'winzip' to extract the tar file! + Winzip cannot extract symbolic links correctly. + +Joerg diff -Nru cdrtools-2.01.01a33/AN-3.02a02 cdrtools-3.02a09/AN-3.02a02 --- cdrtools-2.01.01a33/AN-3.02a02 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/AN-3.02a02 2015-11-20 15:55:16.000000000 +0000 @@ -0,0 +1,199 @@ +***************** Important news ****************************** + +For the 'Slottable Source Plugin Module' SSPM Features read README.SSPM + +***************** Please Test ********************************* + +NEW features of cdrtools-3.02a02: + +This is the first localization step for cdrtools. All programs now (hopefully) +call gettext() for all strings that need localization. + +- The next step will include dgettext() calls for the libraries. + +- The following step will include the extracted strings + +- The last step will include German translations and install support + for the resulting binary message object files. + +----------> Please test and report compilation problems! <--------- + +***** NOTE: As mentioned since 2004, frontends to cdrtools should ***** +***** call all programs from cdrtools in the "C" locale ***** +***** by e.g. calling: LC_ALL=C cdrecord .... ***** +***** unless these frontends support localized strings ***** +***** used by the cdrtools with NLS support. ***** + +This version compiles on Win-DOS using the Microsoft compiler cl.exe but +warning: due to missing POSIX compliance with basic features (e.g. stat() +does not return inode numbers), there are many problems with the resulting +code and thus it is recommended to better use a POSIX layer on top of +WIN-DOS. + + *** WARNING *** + *** Need new smake *** + + *** Due to the fact that schily-2014-04-03 introduced to use new macro + *** expansions and a related bug fix in smake, you need a new smake + *** to compile this source. To ensure this, get a recent "schily" + *** tarball from http://sourceforge.net/projects/schilytools/files/ + *** and call: + + cd ./psmake + ./MAKE-all + cd .. + psmake/smake + psmake/smake install + + The new smake version mentioned above is smake-1.2.4. + Note that smake-1.2.5 exists and is preferrable. + + Now you have a new smake that is able to compile this source. + + Note that the major makefile restructuring introduced in + schily-2014-04-03 is now more than one month ago and thus seems + to work without problems. + + WARNING: the new version of the isoinfo program makes use of the + *at() series of functions that have been introduced by Sun + in August 2001 and added to POSIX.1-2008. For older platforms, + libschily now includes emulations for these functions but + these emulations have not yet been tested thoroughly. + Please report problems! + + +All: + +- Makefile system: the rules for running "configure" have been changed so + that an updated autoconf/configure file only results in a single + "configure" run as now, the two resulting files are both removed before + "configure" is called. + +- Trying to support "Minix" and "Bitrig" in config.guess and config.sub. + +- Added support for Minix 3 in the makefile rules. + Thanks to Heiko Eißfeldt for reporting. + + Note that there is no SCSI pass through driver support for Minix. + +- Minix and Bitrig seem to have tsort, lorder and ranlib. + +Libschily: + +- libschily/renameat.c now includes stdio.h as POSIX requires + stdio.h to be included for rename() + +Libcdrdeflt: + +Libdeflt: + +Libedc (Optimized by Jörg Schilling, originated by Heiko Eißfeldt heiko@hexco.de): + +Libfile: + +Libfind: + +Libhfs_iso: + +Libmdigest: + +Libparanoia (Ported/enhanced by Jörg Schilling, originated by Monty xiphmont@mit.edu): + +- libparanoia: Avoid GCC uninitialized warning even though the main + problem was fixed some time ago already. + Thanks to Heiko Eißfeldt for reporting. + +Libscg: + +Libscgcmd: + +Libsiconv: + +Rscsi: + +Cdrecord: + +- cdrecord & cdda2wav: POSIX real time scheduling is no longer + used in case that sched_setscheduler() is missing. Minix comes + with miss-configured system include files that announce the + presence of sched_setscheduler() but the functions are not + implemented. + Thanks to Heiko Eißfeldt for reporting. + +Cdda2wav (Maintained/enhanced by Jörg Schilling, originated by Heiko Eißfeldt heiko@hexco.de): + +- cdda2wav: man page now mentions that Heiko modified source code + in 2015 + +Readcd: + +Scgcheck: + +Scgskeleton: + +Btcflash: + +Mkisofs (Maintained/enhanced by Jörg Schilling since 1997, originated by Eric Youngdale): + +- mkisofs -> isoinfo: Implement a workaround for filesystem images that + have been created with "mkisofs -r" and add directory write permission + for the owner if not run by root. + +- mkisofs -> isoinfo: Call chmod() after chown() to avoid a reset + of the suid and sgid bits. + +- mkisofs -> isoinfo: Skip the "rr_moved" directory in Rock Ridge mode. + +- mkisofs -> isoinfo: Support for following relocated Rock Ridge + directories was added. + +- mkisofs/diag/isoinfo.c: removed an unused variable. + +- mkisofs/diag/isoinfo.c: The "todo" directory list handling was + rewritten to speed up things by not looping over the whole + list anymore everytime a new directory is added. + +- mkisofs/diag/isoinfo.c: Abort with error message when malloc() + returns NULL. + +HELIOS TODO: + + - Add the HELIOS UNICODE mapping code. This needs to be done + at UCS-2 level for Joliet and UDF (instead of UTF-8) and only + for Rock Ridge (in case of a UTF-8 based target locale) using + UTF-8 based translations. + + - Make the Apple extensions work again with "mkisofs -find" + +TODO: + + - read Joliet filenames with multi-session if no TRANS.TBL + or RR is present. I am looking for a volunteer for this task! + + Note that this can never be 100% correct as there is no relation + between the names on the master (UNIX) filesystem, the ISO-9660 + names and the Joliet names. Only the Rock Ridge names are + untranslated with respect to the original files on the + master (UNIX) filesystem. + + - add libecc/edc for CDI and similar. + + +CYGWIN NT-4.0 NOTES: + +To compile on Cygwin32, get Cygwin and install it. +For more information read README.win32 + +The files are located on: + +http://sourceforge.net/projects/cdrtools/files/alpha/ ... + +NOTE: These tar archives are 100% POSIX compatible. GNU tar may get some + minor trouble. If you like a 100% POSIX compliant tar, get star from + http://sourceforge.net/projects/s-tar/files/ of from the schily-* + tarball at: http://sourceforge.net/projects/schilytools/files/ + +WARNING: Do not use 'winzip' to extract the tar file! + Winzip cannot extract symbolic links correctly. + +Joerg diff -Nru cdrtools-2.01.01a33/AN-3.02a03 cdrtools-3.02a09/AN-3.02a03 --- cdrtools-2.01.01a33/AN-3.02a03 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/AN-3.02a03 2015-12-01 23:28:21.000000000 +0000 @@ -0,0 +1,193 @@ +***************** Important news ****************************** + +For the 'Slottable Source Plugin Module' SSPM Features read README.SSPM + +***************** Please Test ********************************* + +NEW features of cdrtools-3.02a03: + +This is the first localization step for cdrtools. All programs now (hopefully) +call gettext() for all strings that need localization. + +- The next step will include dgettext() calls for the libraries. + +- The following step will include the extracted strings + +- The last step will include German translations and install support + for the resulting binary message object files. + +----------> Please test and report compilation problems! <--------- + +***** NOTE: As mentioned since 2004, frontends to cdrtools should ***** +***** call all programs from cdrtools in the "C" locale ***** +***** by e.g. calling: LC_ALL=C cdrecord .... ***** +***** unless these frontends support localized strings ***** +***** used by the cdrtools with NLS support. ***** + +This version compiles on Win-DOS using the Microsoft compiler cl.exe but +warning: due to missing POSIX compliance with basic features (e.g. stat() +does not return inode numbers), there are many problems with the resulting +code and thus it is recommended to better use a POSIX layer on top of +WIN-DOS. + + *** WARNING *** + *** Need new smake *** + + *** Due to the fact that schily-2014-04-03 introduced to use new macro + *** expansions and a related bug fix in smake, you need a new smake + *** to compile this source. To ensure this, get a recent "schily" + *** tarball from http://sourceforge.net/projects/schilytools/files/ + *** and call: + + cd ./psmake + ./MAKE-all + cd .. + psmake/smake + psmake/smake install + + The new smake version mentioned above is smake-1.2.4. + Note that smake-1.2.5 exists and is preferrable. + + Now you have a new smake that is able to compile this source. + + Note that the major makefile restructuring introduced in + schily-2014-04-03 is now more than one month ago and thus seems + to work without problems. + + WARNING: the new version of the isoinfo program makes use of the + *at() series of functions that have been introduced by Sun + in August 2001 and added to POSIX.1-2008. For older platforms, + libschily now includes emulations for these functions but + these emulations have not yet been tested thoroughly. + Please report problems! + + +All: + +- An autoconf test was added for the include file posix/malloc.h from Haiku + +- An autoconf test was added to check whether waitpid() supports the flag + WNOWAIT. This flag was added by AT&T/Sun for SVr4 in 1989 for both + waitid() and waitpid() but it seems to be unimplemented on various platforms. + Thanks to Heiko Eißfeldt for reporting. + +- New autoconf test for AIX arpa/aixrcmds.h + +- include/schily/netdb.h now may #include + +- inc/align_test.c avoids some warnings with GCC-4.8.3 + +- Make rs6000-aix-gcc.rul aware of 64 bit support and create links: + rs6000-aix-gcc32.rul rs6000-aix-gcc64.rul + +- Trying to make rs6000-aix-cc.rul aware of 64 bit support and + create links: + rs6000-aix-cc32.rul rs6000-aix-cc64.rul + + Note that this code could not yet be tested because of the lack of a + compiler + +- Trying to add support for CCOM=gcc64 on IRIX + +Libschily: + +Libcdrdeflt: + +Libdeflt: + +Libedc (Optimized by Jörg Schilling, originated by Heiko Eißfeldt heiko@hexco.de): + +Libfile: + +Libfind: + +Libhfs_iso: + +Libmdigest: + +- libmdigest: sha3 support was added + +Libparanoia (Ported/enhanced by Jörg Schilling, originated by Monty xiphmont@mit.edu): + +Libscg: + +Libscgcmd: + +Libsiconv: + +Rscsi: + +Cdrecord: + +Cdda2wav (Maintained/enhanced by Jörg Schilling, originated by Heiko Eißfeldt heiko@hexco.de): + +Readcd: + +Scgcheck: + +Scgskeleton: + +Btcflash: + +Mkisofs (Maintained/enhanced by Jörg Schilling since 1997, originated by Eric Youngdale): + +- mkisofs: some structure part copies have been rewritten to avoid compiler + warnigs about virtual variable overrun. + Thanks to Heiko Eißfeldt for reporting. + +- mkisofs: Both UDF volume descriptors need to have the same ID that is + derived from the time. Thanks to a report and patch from: + "Ganssauge, Gottfried" + +- mkisofs/diag all diagnostic helper programs had a typo in the usage() + -inore-errs instead of -ignore-errs + Thanks to Heiko Eißfeldt for reporting + +- mkisofs/diag/isoinfo.c: add a directory loop regognition to avoid + endless loops that eat up all memory with file system images that + contain loops. + Thanks to Heiko Eißfeldt for doing some handcrafted + tests based on iso images created by "american fuzzy lop". + + +HELIOS TODO: + + - Add the HELIOS UNICODE mapping code. This needs to be done + at UCS-2 level for Joliet and UDF (instead of UTF-8) and only + for Rock Ridge (in case of a UTF-8 based target locale) using + UTF-8 based translations. + + - Make the Apple extensions work again with "mkisofs -find" + +TODO: + + - read Joliet filenames with multi-session if no TRANS.TBL + or RR is present. I am looking for a volunteer for this task! + + Note that this can never be 100% correct as there is no relation + between the names on the master (UNIX) filesystem, the ISO-9660 + names and the Joliet names. Only the Rock Ridge names are + untranslated with respect to the original files on the + master (UNIX) filesystem. + + - add libecc/edc for CDI and similar. + + +CYGWIN NT-4.0 NOTES: + +To compile on Cygwin32, get Cygwin and install it. +For more information read README.win32 + +The files are located on: + +http://sourceforge.net/projects/cdrtools/files/alpha/ ... + +NOTE: These tar archives are 100% POSIX compatible. GNU tar may get some + minor trouble. If you like a 100% POSIX compliant tar, get star from + http://sourceforge.net/projects/s-tar/files/ of from the schily-* + tarball at: http://sourceforge.net/projects/schilytools/files/ + +WARNING: Do not use 'winzip' to extract the tar file! + Winzip cannot extract symbolic links correctly. + +Joerg diff -Nru cdrtools-2.01.01a33/AN-3.02a04 cdrtools-3.02a09/AN-3.02a04 --- cdrtools-2.01.01a33/AN-3.02a04 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/AN-3.02a04 2015-12-16 11:14:08.000000000 +0000 @@ -0,0 +1,204 @@ +***************** Important news ****************************** + +For the 'Slottable Source Plugin Module' SSPM Features read README.SSPM + +***************** Please Test ********************************* + +NEW features of cdrtools-3.02a04: + +This is the first localization step for cdrtools. All programs now (hopefully) +call gettext() for all strings that need localization. + +- The next step will include dgettext() calls for the libraries. + +- The following step will include the extracted strings + +- The last step will include German translations and install support + for the resulting binary message object files. + +----------> Please test and report compilation problems! <--------- + +***** NOTE: As mentioned since 2004, frontends to cdrtools should ***** +***** call all programs from cdrtools in the "C" locale ***** +***** by e.g. calling: LC_ALL=C cdrecord .... ***** +***** unless these frontends support localized strings ***** +***** used by the cdrtools with NLS support. ***** + +This version compiles on Win-DOS using the Microsoft compiler cl.exe but +warning: due to missing POSIX compliance with basic features (e.g. stat() +does not return inode numbers), there are many problems with the resulting +code and thus it is recommended to better use a POSIX layer on top of +WIN-DOS. + + *** WARNING *** + *** Need new smake *** + + *** Due to the fact that schily-2014-04-03 introduced to use new macro + *** expansions and a related bug fix in smake, you need a new smake + *** to compile this source. To ensure this, get a recent "schily" + *** tarball from http://sourceforge.net/projects/schilytools/files/ + *** and call: + + cd ./psmake + ./MAKE-all + cd .. + psmake/smake + psmake/smake install + + The new smake version mentioned above is smake-1.2.4. + Note that smake-1.2.5 exists and is preferrable. + + Now you have a new smake that is able to compile this source. + + Note that the major makefile restructuring introduced in + schily-2014-04-03 is now more than one month ago and thus seems + to work without problems. + + WARNING: the new version of the isoinfo program makes use of the + *at() series of functions that have been introduced by Sun + in August 2001 and added to POSIX.1-2008. For older platforms, + libschily now includes emulations for these functions but + these emulations have not yet been tested thoroughly. + Please report problems! + + +All: + +- Added new files RULES/os-mingw32_nt-6.*.id + +- include/schily/stdint.h Better comment on how to set up an unsigned + with the positive value of TYPE_MINVAL(type). + + +Libschily: + +- libschily: New file astoul.c + +- libschily: astoi.c now supports ERANGE and parsing TYPE_MINVAL(long) + +- libschily: astoll.c now supports ERANGE and parsing TYPE_MINVAL(long long) + +Libcdrdeflt: + +Libdeflt: + +Libedc (Optimized by Jörg Schilling, originated by Heiko Eißfeldt heiko@hexco.de): + +Libfile: + +Libfind: + +Libhfs_iso: + +Libmdigest: + +Libparanoia (Ported/enhanced by Jörg Schilling, originated by Monty xiphmont@mit.edu): + +Libscg: + +Libscgcmd: + +Libsiconv: + +Rscsi: + +Cdrecord: + +Cdda2wav (Maintained/enhanced by Jörg Schilling, originated by Heiko Eißfeldt heiko@hexco.de): + +- cdda2wav: A new local autoconfiguration from Heiko Eißfeldt that + is indended to better deal with incomplete Linux installations + +Readcd: + +Scgcheck: + +Scgskeleton: + +Btcflash: + +Mkisofs (Maintained/enhanced by Jörg Schilling since 1997, originated by Eric Youngdale): + +- mkisofs/diag/isoinfo.c: fixed directory loop recognition. + +- mkisofs/diag/isoinfo.c: now adds write permission to directories only + temporarily. + +- mkisofs/diag/isovfy.c add a directory loop recognition to avoid + endless loops that eat up all memory with file system images that + contain loops. + +- mkisofs: make sure that the stream media filename honors the + -omit-version-number option + +- mkisofs: use the correct directory size for the stream media filename. + mkisofs did write 1 Byte too few data in case of an odd file name length. + +- mkisofs/diag all diagnostic helper programs had a typo in the usage() + speficied instead of specified + +- mkisofs + diag all diagnostic helper programs have been vulnerable + to endless loops when a defective iso image with Rock Ridge was read. + Thanks to Heiko Eißfeldt for running related automated tests. + +- mkisofs: avoid an endless loop in multi session mode and with certain + defective ISO filesystem images. + +- mkisofs now includes DVD-Audio support. To impelemt this, the automated + sort routine for DVD/audio/video has been replaced. If there are any + problems, please recompile with "smake COPTX=-DOLD_DVD_WEIGHTS" test + and report. + + IMPORTANT: This modification may affect the rare but exitent problem + with DVD-Video that aborts with: + + "Implementation botch. Video pad for file %s is %d\n" + + because of a negative patch value. It may be that the old weighting + algorith let some files slip through the mesh and did not sort them + so such a file could appear on a wrong position on the medium. Please + test and report. + + + +HELIOS TODO: + + - Add the HELIOS UNICODE mapping code. This needs to be done + at UCS-2 level for Joliet and UDF (instead of UTF-8) and only + for Rock Ridge (in case of a UTF-8 based target locale) using + UTF-8 based translations. + + - Make the Apple extensions work again with "mkisofs -find" + +TODO: + + - read Joliet filenames with multi-session if no TRANS.TBL + or RR is present. I am looking for a volunteer for this task! + + Note that this can never be 100% correct as there is no relation + between the names on the master (UNIX) filesystem, the ISO-9660 + names and the Joliet names. Only the Rock Ridge names are + untranslated with respect to the original files on the + master (UNIX) filesystem. + + - add libecc/edc for CDI and similar. + + +CYGWIN NT-4.0 NOTES: + +To compile on Cygwin32, get Cygwin and install it. +For more information read README.win32 + +The files are located on: + +http://sourceforge.net/projects/cdrtools/files/alpha/ ... + +NOTE: These tar archives are 100% POSIX compatible. GNU tar may get some + minor trouble. If you like a 100% POSIX compliant tar, get star from + http://sourceforge.net/projects/s-tar/files/ of from the schily-* + tarball at: http://sourceforge.net/projects/schilytools/files/ + +WARNING: Do not use 'winzip' to extract the tar file! + Winzip cannot extract symbolic links correctly. + +Joerg diff -Nru cdrtools-2.01.01a33/AN-3.02a05 cdrtools-3.02a09/AN-3.02a05 --- cdrtools-2.01.01a33/AN-3.02a05 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/AN-3.02a05 2015-12-30 20:03:05.000000000 +0000 @@ -0,0 +1,187 @@ +***************** Important news ****************************** + +For the 'Slottable Source Plugin Module' SSPM Features read README.SSPM + +***************** Please Test ********************************* + +NEW features of cdrtools-3.02a05: + +This is the first localization step for cdrtools. All programs now (hopefully) +call gettext() for all strings that need localization. + +- The next step will include dgettext() calls for the libraries. + +- The following step will include the extracted strings + +- The last step will include German translations and install support + for the resulting binary message object files. + +----------> Please test and report compilation problems! <--------- + +***** NOTE: As mentioned since 2004, frontends to cdrtools should ***** +***** call all programs from cdrtools in the "C" locale ***** +***** by e.g. calling: LC_ALL=C cdrecord .... ***** +***** unless these frontends support localized strings ***** +***** used by the cdrtools with NLS support. ***** + +This version compiles on Win-DOS using the Microsoft compiler cl.exe but +warning: due to missing POSIX compliance with basic features (e.g. stat() +does not return inode numbers), there are many problems with the resulting +code and thus it is recommended to better use a POSIX layer on top of +WIN-DOS. + + *** WARNING *** + *** Need new smake *** + + *** Due to the fact that schily-2014-04-03 introduced to use new macro + *** expansions and a related bug fix in smake, you need a new smake + *** to compile this source. To ensure this, get a recent "schily" + *** tarball from http://sourceforge.net/projects/schilytools/files/ + *** and call: + + cd ./psmake + ./MAKE-all + cd .. + psmake/smake + psmake/smake install + + The new smake version mentioned above is smake-1.2.4. + Note that smake-1.2.5 exists and is preferrable. + + Now you have a new smake that is able to compile this source. + + Note that the major makefile restructuring introduced in + schily-2014-04-03 is now more than one month ago and thus seems + to work without problems. + + WARNING: the new version of the isoinfo program makes use of the + *at() series of functions that have been introduced by Sun + in August 2001 and added to POSIX.1-2008. For older platforms, + libschily now includes emulations for these functions but + these emulations have not yet been tested thoroughly. + Please report problems! + + +All: + +- include/schily/prototyp.h now defines ALERT to abstract from + the K&R C vs. ANSI C and the missing support for \a in K&R C + +Libschily: + +- libschily/getfp.c Try to disable the address sanitizer for getfp() + to avoid unhelpful messages. + Thanks to a hint from Heiko Eißfeldt. + +- libschily/searchinpath.c Avoid a memory leak on platforms that do not + support getexecname() + Thanks to a hint from Heiko Eißfeldt. + +Libcdrdeflt: + +Libdeflt: + +Libedc (Optimized by Jörg Schilling, originated by Heiko Eißfeldt heiko@hexco.de): + +Libfile: + +Libfind: + +Libhfs_iso: + +Libmdigest: + +- libmdigest: sha3 entry function names changed to match + other digest functions. + +- libmdigest: the shared library mapfile now includes the sha3 functions + +Libparanoia (Ported/enhanced by Jörg Schilling, originated by Monty xiphmont@mit.edu): + +Libscg: + +Libscgcmd: + +Libsiconv: + +Rscsi: + +Cdrecord: + +Cdda2wav (Maintained/enhanced by Jörg Schilling, originated by Heiko Eißfeldt heiko@hexco.de): + +Readcd: + +Scgcheck: + +Scgskeleton: + +Btcflash: + +Mkisofs (Maintained/enhanced by Jörg Schilling since 1997, originated by Eric Youngdale): + +- mkisofs: Avoid coredumps from dereferencing NULL pointers with some + kind of rotten iso images when in multi session mode. + Thanks for Heiko Eißfeldt for reporting this problem based on a test + using "The American fuzzy lop". + +- mkisofs: Avoid coredumps from dereferencing NULL pointers with some + kind of rotten iso images when in multi session mode and other incorrect + length computations. This in special means multi.c + Thanks for Heiko Eißfeldt for reporting and for doing a code review. + +- mkisofs: Avoid to address wrong memory when scanning old ISO images. + Thanks for Heiko Eißfeldt for reporting and for doing a code review. + +- mkisofs/joliet.c: convert_to_unicode() no longer tries to access the + input string past the null byte. + Thanks to a hint from Heiko Eißfeldt. + +- mkisofs/write.c: mkisofs -sort with multi extent files (files > 4 GB) + no longer computes the size of the file twice while computing the + start sectors for files. + Thanks to a report from Arpad Biro + + + +HELIOS TODO: + + - Add the HELIOS UNICODE mapping code. This needs to be done + at UCS-2 level for Joliet and UDF (instead of UTF-8) and only + for Rock Ridge (in case of a UTF-8 based target locale) using + UTF-8 based translations. + + - Make the Apple extensions work again with "mkisofs -find" + +TODO: + + - read Joliet filenames with multi-session if no TRANS.TBL + or RR is present. I am looking for a volunteer for this task! + + Note that this can never be 100% correct as there is no relation + between the names on the master (UNIX) filesystem, the ISO-9660 + names and the Joliet names. Only the Rock Ridge names are + untranslated with respect to the original files on the + master (UNIX) filesystem. + + - add libecc/edc for CDI and similar. + + +CYGWIN NT-4.0 NOTES: + +To compile on Cygwin32, get Cygwin and install it. +For more information read README.win32 + +The files are located on: + +http://sourceforge.net/projects/cdrtools/files/alpha/ ... + +NOTE: These tar archives are 100% POSIX compatible. GNU tar may get some + minor trouble. If you like a 100% POSIX compliant tar, get star from + http://sourceforge.net/projects/s-tar/files/ of from the schily-* + tarball at: http://sourceforge.net/projects/schilytools/files/ + +WARNING: Do not use 'winzip' to extract the tar file! + Winzip cannot extract symbolic links correctly. + +Joerg diff -Nru cdrtools-2.01.01a33/AN-3.02a06 cdrtools-3.02a09/AN-3.02a06 --- cdrtools-2.01.01a33/AN-3.02a06 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/AN-3.02a06 2016-01-28 14:49:41.000000000 +0000 @@ -0,0 +1,204 @@ +***************** Important news ****************************** + +For the 'Slottable Source Plugin Module' SSPM Features read README.SSPM + +***************** Please Test ********************************* + +NEW features of cdrtools-3.02a06: + +This is the first localization step for cdrtools. All programs now (hopefully) +call gettext() for all strings that need localization. + +- The next step will include dgettext() calls for the libraries. + +- The following step will include the extracted strings + +- The last step will include German translations and install support + for the resulting binary message object files. + +----------> Please test and report compilation problems! <--------- + +***** NOTE: As mentioned since 2004, frontends to cdrtools should ***** +***** call all programs from cdrtools in the "C" locale ***** +***** by e.g. calling: LC_ALL=C cdrecord .... ***** +***** unless these frontends support localized strings ***** +***** used by the cdrtools with NLS support. ***** + +This version compiles on Win-DOS using the Microsoft compiler cl.exe but +warning: due to missing POSIX compliance with basic features (e.g. stat() +does not return inode numbers), there are many problems with the resulting +code and thus it is recommended to better use a POSIX layer on top of +WIN-DOS. + + *** WARNING *** + *** Need new smake *** + + *** Due to the fact that schily-2014-04-03 introduced to use new macro + *** expansions and a related bug fix in smake, you need a new smake + *** to compile this source. To ensure this, get a recent "schily" + *** tarball from http://sourceforge.net/projects/schilytools/files/ + *** and call: + + cd ./psmake + ./MAKE-all + cd .. + psmake/smake + psmake/smake install + + The new smake version mentioned above is smake-1.2.4. + Note that smake-1.2.5 exists and is preferrable. + + Now you have a new smake that is able to compile this source. + + Note that the major makefile restructuring introduced in + schily-2014-04-03 is now more than one month ago and thus seems + to work without problems. + + WARNING: the new version of the isoinfo program makes use of the + *at() series of functions that have been introduced by Sun + in August 2001 and added to POSIX.1-2008. For older platforms, + libschily now includes emulations for these functions but + these emulations have not yet been tested thoroughly. + Please report problems! + + +All: + +Libschily: + +- libschily: fprformat.c now compiles with format.c in a way that is useful + on all possible targets by implementing a double buffered macro based + internal method for fprfprmat(). + + This is aprox. 10% slower than the previous single buffered solution for + Solaris (based on the putc_unlocked() macro) but it works anywhere and + it does not have the problems with unbuffered streams (like stderr) + that have been seen on Solaris since fprformat() was introduced in 2013. + +- libschily: js_printf() and js_fprintf() now by default uses fprfprmat() + on all platforms. This reduces the performance on Solaris by 10% but it + enhances the performance on all other platforms. Our "od" implementation + via "hdump" is now 70% faster than "gnu od" on Linux instead of + being 50% faster before that change. It seems to be a good idea to get + a fast and POSIX compliant "od" implementation on Linux. + +- Some typos in some manpages have been fixed. + +Libcdrdeflt: + +Libdeflt: + +Libedc (Optimized by Jörg Schilling, originated by Heiko Eißfeldt heiko@hexco.de): + +Libfile: + +Libfind: + +Libhfs_iso: + +Libmdigest: + +Libparanoia (Ported/enhanced by Jörg Schilling, originated by Monty xiphmont@mit.edu): + +Libscg: + +- libscg: fix a comparison with the timeout value that was wrong + because of a wrong copy/paste action. This code fragment is + used when the Linux kernel returns unspecific SCSI error codes + and previously caused cdrecord to incorrectly assume a timeout + that than incorrectly stopped the write operation. + +- libscg: added a debug message (in non-silent mode) that prints + the sg_io.host_status value in case of unknown states. + +- libscg: A new interface function "scg_opts()" has been introduced to parse + and set op generic SCSI options. The only new implemented general option + for now is: "ignore-resid". This option was introduced in order to be able + to work around a Linux kernel bug that results in a DMA residual count + != 0 even though all data was transferred. + +Libscgcmd: + +Libsiconv: + +Rscsi: + +Cdrecord: + +- cdrecord: A new option scgopts=list has been introduced. Call + "cdrecord scgopts=ignore-resid ..." in order to work around the mentioned + Linus kernel bug. + +- cdrecord: The man page now also mentions scgopts=ignore-resid + +Cdda2wav (Maintained/enhanced by Jörg Schilling, originated by Heiko Eißfeldt heiko@hexco.de): + +- cdda2wav: A new option scgopts=list has been introduced. + +Readcd: + +- readcd: A new option scgopts=list has been introduced. + +Scgcheck: + +- scgcheck: A new option scgopts=list has been introduced. + +Scgskeleton: + +- scgskeleton: A new option scgopts=list has been introduced. + +Btcflash: + +- btcflash: A new option scgopts=list has been introduced. + +Mkisofs (Maintained/enhanced by Jörg Schilling since 1997, originated by Eric Youngdale): + +- mkisofs call free(mroot) in main to quiet the address sanitzier. + Thanks to Heiko Eißfeldt for reporting. + +- mkisofs: better error messages for rotten ISO-9660 directories + that are encountered in multi-session mode. + Thanks to Heiko Eißfeldt for reporting. + + +HELIOS TODO: + + - Add the HELIOS UNICODE mapping code. This needs to be done + at UCS-2 level for Joliet and UDF (instead of UTF-8) and only + for Rock Ridge (in case of a UTF-8 based target locale) using + UTF-8 based translations. + + - Make the Apple extensions work again with "mkisofs -find" + +TODO: + + - read Joliet filenames with multi-session if no TRANS.TBL + or RR is present. I am looking for a volunteer for this task! + + Note that this can never be 100% correct as there is no relation + between the names on the master (UNIX) filesystem, the ISO-9660 + names and the Joliet names. Only the Rock Ridge names are + untranslated with respect to the original files on the + master (UNIX) filesystem. + + - add libecc/edc for CDI and similar. + + +CYGWIN NT-4.0 NOTES: + +To compile on Cygwin32, get Cygwin and install it. +For more information read README.win32 + +The files are located on: + +http://sourceforge.net/projects/cdrtools/files/alpha/ ... + +NOTE: These tar archives are 100% POSIX compatible. GNU tar may get some + minor trouble. If you like a 100% POSIX compliant tar, get star from + http://sourceforge.net/projects/s-tar/files/ of from the schily-* + tarball at: http://sourceforge.net/projects/schilytools/files/ + +WARNING: Do not use 'winzip' to extract the tar file! + Winzip cannot extract symbolic links correctly. + +Joerg diff -Nru cdrtools-2.01.01a33/AN-3.02a07 cdrtools-3.02a09/AN-3.02a07 --- cdrtools-2.01.01a33/AN-3.02a07 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/AN-3.02a07 2016-12-15 14:10:21.000000000 +0000 @@ -0,0 +1,258 @@ +***************** Important news ****************************** + +For the 'Slottable Source Plugin Module' SSPM Features read README.SSPM + +***************** Please Test ********************************* + +NEW features of cdrtools-3.02a07: + +This is the first localization step for cdrtools. All programs now (hopefully) +call gettext() for all strings that need localization. + +- The next step will include dgettext() calls for the libraries. + +- The following step will include the extracted strings + +- The last step will include German translations and install support + for the resulting binary message object files. + +----------> Please test and report compilation problems! <--------- + +***** NOTE: As mentioned since 2004, frontends to cdrtools should ***** +***** call all programs from cdrtools in the "C" locale ***** +***** by e.g. calling: LC_ALL=C cdrecord .... ***** +***** unless these frontends support localized strings ***** +***** used by the cdrtools with NLS support. ***** + +This version compiles on Win-DOS using the Microsoft compiler cl.exe but +warning: due to missing POSIX compliance with basic features (e.g. stat() +does not return inode numbers), there are many problems with the resulting +code and thus it is recommended to better use a POSIX layer on top of +WIN-DOS. + + *** WARNING *** + *** Need new smake *** + + *** Due to the fact that schily-2014-04-03 introduced to use new macro + *** expansions and a related bug fix in smake, you need a new smake + *** to compile this source. To ensure this, get a recent "schily" + *** tarball from http://sourceforge.net/projects/schilytools/files/ + *** and call: + + cd ./psmake + ./MAKE-all + cd .. + psmake/smake + psmake/smake install + + The new smake version mentioned above is smake-1.2.4. + Note that smake-1.2.5 exists and is preferrable. + + Now you have a new smake that is able to compile this source. + + Note that the major makefile restructuring introduced in + schily-2014-04-03 is now more than one month ago and thus seems + to work without problems. + + WARNING: the new version of the isoinfo program makes use of the + *at() series of functions that have been introduced by Sun + in August 2001 and added to POSIX.1-2008. For older platforms, + libschily now includes emulations for these functions but + these emulations have not yet been tested thoroughly. + Please report problems! + + +All: + +- REAME.compile: added documentation on how to compile with clang + +- README.SCCS has been enhanced and now documents compile time and + installation options. + +- "cstyle", "installman" and other new targets have been added to the makefile + system + +- Rules for the automated testing "make tests" added to the makefile system + +- include/schily/wait.h reworked + +- include/schily/stdio.h enhanced to include speed up code got getc() with + Solaris 64 bit compilations. + +- New autoconf test for haiku posix/malloc.h + +- New autoconf test for arpa/aixrcmds.h + +- New autoconf test for tcgetsid() + +- New autoconf test whether waitpid() supports NOWAIT + +- New autoconf test whether we have d_type in struct dirent + +Libschily: + +- libschily/jsdprintf.c added + +- libschily/movecbytes.c added + +- libschily/astoi.c and libschily/astoll.c now check for overflows + and report ERANGE + +- libschily/*printf.c now support a locale dependent decimal separator + +- libschily/format.c (the printf worker code) has been enhanced to + be faster with STDIO on most platforms. + +- libschily: getargs, getallargs and getfiles man pages have been reworked + +- libschily/getargs.c: combined single char boolean flags now work + with callback type formats. + +- libschily/searchinpath.c added a new flag SIP_NO_STRIPBIN + +- libschily/stdio/fgetline.c now includes a speedup for AT&T stdio using + the new movecbytes() + +- libschily/stdio/fgetstr.c now includes a speedup for AT&T stdio using + the new movecbytes() + +- libschily/stdio/getdelim.c now includes a speedup for AT&T stdio using + the new movecbytes() + +Libcdrdeflt: + +Libdeflt: + +Libedc (Optimized by Jörg Schilling, originated by Heiko Eißfeldt heiko@hexco.de): + +- libedc_ecc_dec: Avoid an array out of bound subscription. Thanks to + Heiko Eißfeldt for cheking the code after a compiler warning. + +Libfile: + +Libfind: + +- libfind: the code now supports the *BSD enhancement "d_ino" in struct dirent. + This speeds up stat()less jobs. + +Libhfs_iso: + +Libmdigest: + +Libparanoia (Ported/enhanced by Jörg Schilling, originated by Monty xiphmont@mit.edu): + +Libscg: + +Libscgcmd: + +Libsiconv: + +Rscsi: + +Cdrecord: + +Cdda2wav (Maintained/enhanced by Jörg Schilling, originated by Heiko Eißfeldt heiko@hexco.de): + +- cdda2wav: Many small rewrites from Heiko Eißfeldt, mainly to reduce the + scope of variables and to correctly use the "%u" printf format for + unsigned variables. + +Readcd: + +Scgcheck: + +Scgskeleton: + +Btcflash: + +Mkisofs (Maintained/enhanced by Jörg Schilling since 1997, originated by Eric Youngdale): + +- mkisofs/mac_label.c: fixed a file descriptor leak + Thanks to heiko Eißfeldt for reporting. + +- mkisofs: Allow to compile the code again when USE_FIND APPLE_HFS_HYB + APPLE_HYB UDF DVD_AUD_VID are not #define'd Thanks to a hint from + Colin Finck + +- mkisofs: mkisofs -version now mentions James Pearson and HELIOS GMBH + +- mkisofs: the getvargs() call now honors the parameter order change in + libschily::getvargs(). + +- mkisofs: when stripping off "./" and "//" from graft points, mkisofs + now uses ovstrcpy() that supports to copy overlapping strings as Mac OS + has a strlcpy() that fails with overlapping strings. + Thanks to a hint from Colin Finck + +- mkisofs: the function prototype readsecs() is now available even when + USE_SCG is not defined. + Thanks to a hint from Colin Finck + +- mkisofs: The option -no-cache-inodes is available again in all compile + versions. + +- mkisofs: Some unused variables have been removed. + +- mkisofs: New option -isort behaves like -sort but ignores the case of + filenames in the sort file. + +- mkisofs: new option -hide-ignorecase allows to ignore case with the + -hide* options and with -exclude-list + +- mkisofs: New option -no-allow-lowercase allows to revert the effect to + -allow-lowercase from macro options like -untranslated-filenames or + -iso-level 4 + +- mkisofs: New option -duplicates-once to hard link identical files even + on non POSIX platforms. + The code was modeled similar to the code from + Alex Kopylov cdrtools@bootcd.ru but better fits into the idea of + current versions of mkisofs + +- mkisofs: defaults.h no longer sets the system to "UNIX" if it was + compiles by MSVC. + Thanks to Collin Finck colin@reactos.org for reporting + + + +HELIOS TODO: + + - Add the HELIOS UNICODE mapping code. This needs to be done + at UCS-2 level for Joliet and UDF (instead of UTF-8) and only + for Rock Ridge (in case of a UTF-8 based target locale) using + UTF-8 based translations. + + - Make the Apple extensions work again with "mkisofs -find" + +TODO: + + - read Joliet filenames with multi-session if no TRANS.TBL + or RR is present. I am looking for a volunteer for this task! + + Note that this can never be 100% correct as there is no relation + between the names on the master (UNIX) filesystem, the ISO-9660 + names and the Joliet names. Only the Rock Ridge names are + untranslated with respect to the original files on the + master (UNIX) filesystem. + + - add libecc/edc for CDI and similar. + + +CYGWIN NT-4.0 NOTES: + +To compile on Cygwin32, get Cygwin and install it. +For more information read README.win32 + +The files are located on: + +http://sourceforge.net/projects/cdrtools/files/alpha/ ... + +NOTE: These tar archives are 100% POSIX compatible. GNU tar may get some + minor trouble. If you like a 100% POSIX compliant tar, get star from + http://sourceforge.net/projects/s-tar/files/ of from the schily-* + tarball at: http://sourceforge.net/projects/schilytools/files/ + +WARNING: Do not use 'winzip' to extract the tar file! + Winzip cannot extract symbolic links correctly. + +Joerg diff -Nru cdrtools-2.01.01a33/AN-3.02a08 cdrtools-3.02a09/AN-3.02a08 --- cdrtools-2.01.01a33/AN-3.02a08 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/AN-3.02a08 2017-12-07 12:48:33.000000000 +0000 @@ -0,0 +1,218 @@ +***************** Important news ****************************** + +For the 'Slottable Source Plugin Module' SSPM Features read README.SSPM + +***************** Please Test ********************************* + +NEW features of cdrtools-3.02a08: + +WARNING: cdrtools-3.02a08 only has been distributed as part of "schilytools". +See http://sourceforge.net/projects/schilytools/files/schily-2017-03-30.tar.bz2 + +This is the first localization step for cdrtools. All programs now (hopefully) +call gettext() for all strings that need localization. + +- The next step will include dgettext() calls for the libraries. + +- The following step will include the extracted strings + +- The last step will include German translations and install support + for the resulting binary message object files. + +----------> Please test and report compilation problems! <--------- + +***** NOTE: As mentioned since 2004, frontends to cdrtools should ***** +***** call all programs from cdrtools in the "C" locale ***** +***** by e.g. calling: LC_ALL=C cdrecord .... ***** +***** unless these frontends support localized strings ***** +***** used by the cdrtools with NLS support. ***** + +This version compiles on Win-DOS using the Microsoft compiler cl.exe but +warning: due to missing POSIX compliance with basic features (e.g. stat() +does not return inode numbers), there are many problems with the resulting +code and thus it is recommended to better use a POSIX layer on top of +WIN-DOS. + + *** WARNING *** + *** Need new smake *** + + *** Due to the fact that schily-2014-04-03 introduced to use new macro + *** expansions and a related bug fix in smake, you need a new smake + *** to compile this source. To ensure this, get a recent "schily" + *** tarball from http://sourceforge.net/projects/schilytools/files/ + *** and call: + + cd ./psmake + ./MAKE-all + cd .. + psmake/smake + psmake/smake install + + The new smake version mentioned above is smake-1.2.4. + Note that smake-1.2.5 exists and is preferrable. + + Now you have a new smake that is able to compile this source. + + Note that the major makefile restructuring introduced in + schily-2014-04-03 is now more than one month ago and thus seems + to work without problems. + + WARNING: the new version of the isoinfo program makes use of the + *at() series of functions that have been introduced by Sun + in August 2001 and added to POSIX.1-2008. For older platforms, + libschily now includes emulations for these functions but + these emulations have not yet been tested thoroughly. + Please report problems! + + +All: + +- README.compile was updated and made more readable. + +- The file README.compile now explains how to compile with the + gcc address sanitizer and with afl-gcc (American Fuzzy Lop). + Thanks to a hint from Heiko Eißfeldt. + +- A typo in the autoconf file xconfig.h.in has been fixed + +- The auto configuration code now avoids to #define HAVE_SUN_ACL + when HAVE_POSIX_ACL has already been #defined. + This is needed in order to make everything compile again under + recent Cygwin versions. + + NOTE: Cygwin used to implement the Sun UFS ACL interface but recently + changed to the POSIX draft that has been withdrawn in 1997. + + Thanks to a hint from Thomas Plank + +- include/schily/schily.h: better comment + + +Libschily: + +- libschily: added a missing null-byte to the filename in the + opendir() emulation for Win-DOS. + + Thanks to Collin Finck colin@reactos.org for reporting + +- libschily: The movebytes() man page now mentions other *bytes() + functions. + +- libschily: cmpbytes() new man page + +- libschily:comexit() the memory allocated via on_comerr() is now + freed with comexit(). + Thanks to a hint from Heiko Eißfeldt. + + +Libcdrdeflt: + +Libdeflt: + +Libedc (Optimized by Jörg Schilling, originated by Heiko Eißfeldt heiko@hexco.de): + +Libfile: + +Libfind: + +Libhfs_iso: + +Libmdigest: + +Libparanoia (Ported/enhanced by Jörg Schilling, originated by Monty xiphmont@mit.edu): + +Libscg: + +Libscgcmd: + +Libsiconv: + +Rscsi: + +Cdrecord: + +Cdda2wav (Maintained/enhanced by Jörg Schilling, originated by Heiko Eißfeldt heiko@hexco.de): + +- Cdda2wav: changed the variable userverbose from "int" to "long". + This is needed as getargs() always uses a long * argument for a + function for a callback option. The result of this bug was that + "cdda2wav -vall" did set the output fd to 0 and as a result, + error messages have been printed to stdin instead of stderr. + This of course created problems with GUI frontends if the + cdda2wav binary was a 64-bit binary. + + Thanks to a hint from Thomas Niederreiter + +- Cdda2wav: cdda2wav out-fd=2 no longer delays the output because the + output is buffered. + + Thanks to a hint from Thomas Niederreiter + +- Cdda2wav: modified the man page to make it obvious that the new cdda2wav + auto-detects whether a drive supports to read C2-error lists. + + Thanks to a hint from Thomas Niederreiter + +- Cdda2wav: added a workaround for a problem caused by a Linux stdio bug + that causes "stderr" to be buffered even though POSIX requires it + to be unbuffered. + + Thanks to a hint from Thomas Niederreiter + + +Readcd: + +Scgcheck: + +Scgskeleton: + +Btcflash: + +Mkisofs (Maintained/enhanced by Jörg Schilling since 1997, originated by Eric Youngdale): + +- mkisofs no longer needs -no-cache-inodes to make -duplicates-once + work on UNIX. + + + +HELIOS TODO: + + - Add the HELIOS UNICODE mapping code. This needs to be done + at UCS-2 level for Joliet and UDF (instead of UTF-8) and only + for Rock Ridge (in case of a UTF-8 based target locale) using + UTF-8 based translations. + + - Make the Apple extensions work again with "mkisofs -find" + +TODO: + + - read Joliet filenames with multi-session if no TRANS.TBL + or RR is present. I am looking for a volunteer for this task! + + Note that this can never be 100% correct as there is no relation + between the names on the master (UNIX) filesystem, the ISO-9660 + names and the Joliet names. Only the Rock Ridge names are + untranslated with respect to the original files on the + master (UNIX) filesystem. + + - add libecc/edc for CDI and similar. + + +CYGWIN NT-4.0 NOTES: + +To compile on Cygwin32, get Cygwin and install it. +For more information read README.win32 + +The files are located on: + +http://sourceforge.net/projects/cdrtools/files/alpha/ ... + +NOTE: These tar archives are 100% POSIX compatible. GNU tar may get some + minor trouble. If you like a 100% POSIX compliant tar, get star from + http://sourceforge.net/projects/s-tar/files/ of from the schily-* + tarball at: http://sourceforge.net/projects/schilytools/files/ + +WARNING: Do not use 'winzip' to extract the tar file! + Winzip cannot extract symbolic links correctly. + +Joerg diff -Nru cdrtools-2.01.01a33/AN-3.02a09 cdrtools-3.02a09/AN-3.02a09 --- cdrtools-2.01.01a33/AN-3.02a09 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/AN-3.02a09 2017-12-10 18:51:28.000000000 +0000 @@ -0,0 +1,514 @@ +***************** Important news ****************************** + +For the 'Slottable Source Plugin Module' SSPM Features read README.SSPM + +***************** Please Test ********************************* + +NEW features of cdrtools-3.02a09: + +This is the first localization step for cdrtools. All programs now (hopefully) +call gettext() for all strings that need localization. + +- The next step will include dgettext() calls for the libraries. + +- The following step will include the extracted strings + +- The last step will include German translations and install support + for the resulting binary message object files. + +----------> Please test and report compilation problems! <--------- + +***** NOTE: As mentioned since 2004, frontends to cdrtools should ***** +***** call all programs from cdrtools in the "C" locale ***** +***** by e.g. calling: LC_ALL=C cdrecord .... ***** +***** unless these frontends support localized strings ***** +***** used by the cdrtools with NLS support. ***** + +This version compiles on Win-DOS using the Microsoft compiler cl.exe but +warning: due to missing POSIX compliance with basic features (e.g. stat() +does not return inode numbers), there are many problems with the resulting +code and thus it is recommended to better use a POSIX layer on top of +WIN-DOS. + + *** WARNING *** + *** Need new smake *** + + *** Due to the fact that schily-2014-04-03 introduced to use new macro + *** expansions and a related bug fix in smake, you need a new smake + *** to compile this source. To ensure this, get a recent "schily" + *** tarball from http://sourceforge.net/projects/schilytools/files/ + *** and call: + + cd ./psmake + ./MAKE-all + cd .. + psmake/smake + psmake/smake install + + The new smake version mentioned above is smake-1.2.4. + Note that smake-1.2.5 exists and is preferrable. + + Now you have a new smake that is able to compile this source. + + Note that the major makefile restructuring introduced in + schily-2014-04-03 is now more than one month ago and thus seems + to work without problems. + + WARNING: the new version of the isoinfo program makes use of the + *at() series of functions that have been introduced by Sun + in August 2001 and added to POSIX.1-2008. For older platforms, + libschily now includes emulations for these functions but + these emulations have not yet been tested thoroughly. + Please report problems! + + +All: + +- RULES/cc-*.rul: The compiler files without C++ support no longer + have a tab after $(NUMBER_SIGN) as this prevents the intended use case. + +- RULES/9000-725-hp-ux-gcc.rul and RULES/cc-hp.rul now support creating + shared libraries by using "ld -b" instead of using the compiler to + link. + +- RULES/*haiku-*.rul The rules for shared libraries now work + + Thanks to a report from Heiko Eißfeldt + +- RULES/cc-*.rul: added a LIB_C=-lc to prepare compilation on Haiku + +- RULES/bepc-haiku-cc.rul and RULES/bepc-haiku-gcc.rul: Added LIB_C= + to clean the name of libc on Haiku that does not have libc. + We need to link all shared libraries against -lc in case they use + system interfaces but are not allowed to do the same on Haiku. + + Thanks to a report from Heiko Eißfeldt + +- Schily Makefilesystem: Use the correct rules to create shared libraries + on Cygwin. Before this release, shared libraries with Cygwin have not + been tested and the old rules have been guessed. + +- RULES/rules.ins: fixed a typo in the symlink install rule + +- RULES/rules.top: we now clear the macro COMPILE.cc= from SunPro make + as well, in order to get our definition from the Schily Makefilesystem. + Before, when using SunPro Make, C++ code was compiled without enabling + the optimizer, as the SunPro Make default rule definition was used. + +- RULES/: Since SunPro Make from Schilytools now supports multiple + includes with a single include directive, we added a new configuration + for a SunPro Make that itself identifies now as "sunpro" via MAKE_NAME. + +- DEFAULTS/Defaults.cygwin*: We no longer read the Microsoft configuration + for cl.exe except when the makeprogram in use is "smake". This is needed + as neither GNU make nor SunPro make support spaces in filenames and + SunPro make aborts in case ".NO_WARN: :=" from DEFAULTS/vc7-cygwin-setup + is seen. + + Thanks to Heiko Eißfeldt for reporting + +- autoconf: now checks for the existence of "tsort" and "lorder" + in order to help to compile on the new platform "aarch64" for Solaris. + This platform is currently still missing many of the ELF tools and + thus "lorder" + + +- Schily Makefilesystem: Changed $(MAKE) -> "$(MAKE)" + + Thanks to Heiko Eißfeldt for reporting + +- Schily Makefilesystem: added a new target "uninstall" that removes + all non-directory type files that previously may have been installed via + the "install" target. + + Thanks to a report from Michael Siegel + +- Schily Makefilesystem: RULES/rules.loc and RULES/rules.man have been + made safe against a parallel make program like SunPro Make. + + Thanks to a report from Heiko Eißfeldt + +- The Schily Makefilesystem now uses .PHONY again (and no longer "FRC") + unless the make program was identified as an old unfixed "SunPro Make" + from Sun or Oracle. + +- README.compile now better explains that CCOM= does not just set the + C-compiler but the compiler family that includes a C++ compiler. + +- New include file include/schily/strar.h + +- include/schily/device.h: XDEV_T is now Ullong. This file was forgotten + to distribute with schilytools-2017-10-10. The change is however needed + for a bugfix in "star". + +- include/schily/archdefs.h: With Sun Studio-12.4 on Oracle Solaris-11.2, + we had a problem with __SUNPRO_C and needed to change it to __IS_SUNPRO_C + + Thanks to Jens Elkner for reporting. + +- include/schily/maxpath.h now supports MAXNAMELEN to help with SunPro Make + +- include/schily/unistd.h extern char **environ is now in the + cplusplus guard + +- include/schily/libport.h no longer uses a formal parameter named "new" in + order to avoid problems with C++ + +- configure: Added tests for isblank() and iswblank() that have not + been available in historix UNIX. + +- autoconf/config.sub now groks ppc64 on Linux. + +- autoconf: new tests for ar.h and rpc/rpc.h + +- autoconf: new test for semaphore.h + +- autoconf now checks for "libelf" and "libelf.h". This is needed for + libmakestate that is part of SunPro Make. Libmakestate is based on the + standard libelf that is not part of all platforms. + +- autoconf now first checks whether the pthread*() functions are in libc + before checking for -lpthread. This helps to avoid to link against + libpthread on Solaris. + +- autoconf/config.sub now knows the architecture "aarch64". This + helps to deal with Solaris and Linux on the Raspberry Pi3 and the + Odroid C2. + +- autoconf/config.guess now knows the architecture "aarch64" for Solaris. + This helps to deal with Solaris on the Raspberry Pi3 and the Odroid C2. + +- autoconf: now checks for the existence of "tsort" and "lorder" + in order to help to compile on the new platform "aarch64" for Solaris. + This platform is currently still missing many of the ELF tools and + thus "lorder" + +- RULES/MKLINKS: New links for RULES/aarch64-sunos5-gcc*.rul and + RULES/aarch64-sunos5-clang*.rul have been added. + +- RULES/rules.ins: before installing symlinks or hardlinks, the + directory the links are in is made. + +- RULES: Added a new method that allows to skip building C++ based code + in case we are on a platform that does not support a C++ compiler. + This is needed for SunPro Make that was written on C++. + Note that if you are e.g. on SunOS-4.x where the system does not include + a C++ compiler, compiling with CCOM=cc will skip SunPro Make, but + using CCOM=gcc on the same platform will compile SunPro Make. + +- DEFAULTS_CSW/Defaults.sunos5 now uses the same enhanced optiomization + for C++ as used for C. This helps to compile the new SunPro Make + sources. + +- README.compile: The documentation for using the Address Sanitizer was + enhanced. + +- README.compile now better explains that CCOM= does not just set the + C-compiler but the compiler family that includes a C++ compiler. + +- configure: The tests for -lsocket and for -lnsl/-lnetwork + have been better separated to correctly recognize -lnetwork + on Haiku. + + Thanks to a report from Heiko Eißfeldt + +- configure: the vfork() test has been enhanced to check whether + a modification in the data segment of the child affects the + parent as well. This feature is used (needed) by the Bourne Shell + to signal a ENOEXEC case for shell scripts to the parent and in + general to report the reason for a failed execve() call back + to the parent. + + Note that vfork() in Haiku does not share data and thus canot + be used by the Bourne Shell. + +- configure: a new test AC_STAT_FILES has been written to replace + AC_CHECK_FILES. AC_CHECK_FILES does not work on Haiku due to + a bug in "bash" that makes "test -r /dev/stdin" to report an exit + code of 0 even though the file /dev/stdin does not exist. + +- conf/oarch.sh: Fixed a typo that caused oarch to output e.g. + + i686-cygwin_nt-5.1-cc + + instead of + + i686-cygwin32_nt-cc + + Thanks to Heiko Eißfeldt for reporting + +- inc/avoffset.c: added a workaround for a clang bug with FreeBSD on ARM64. + clang creates incorrect code for a while loop that results in an endless + loop. The last line in that while loop is never executed. It turned + out that adding + read(-1, "", 0); + at the beginning of the while loop works around the clang bug. + + Thanks to Robert Clausecker for reporting. + +- inc/avoffset.c: added a workaround for a problem with clang that causes + the function stack_direction() to be inlined even though this was never + requested. + + + +Libschily: + +- libschily::getargs.c: Added a new flag that allows to implement POSIX + option rule #5: + + One or more options without option-arguments, followed by + at most one option that takes an option-argument, should be + accepted when grouped behind one '-' delimiter. + + This new mode is needed to implement spax with a POSIX compliant CLI. + +- libschily: The environment "COMERR_EXCODE" now directs the comerr() + group of functions not to map exit codes to -64 in case they are + ambiguous to callers of the historic wait() call. + + If you like to get the unmodified exit code, use the "new" (since 1989) + POSIX waitid() call and add the "COMERR_EXCODE" before creating + the child process. + +- libschily: Addd a implementation for the functions: + + wctype() and iswctype() to allow porting to older platforms. + +- libschily: New pattern matcher functions + + patmbmatch() and patmblmatch() + + support multi byte strings with a wchar_t * pattern. The pattern is + a wide char string for performance reasons. + +- libschily::match.c Added support for '[:alpha:]' and similar. + This is needed to make patmatch() POSIX compliant. + We still miss support for '[=char=]' and '[.char.]'. + +- libschily: added a missing null-byte to the filename in the + opendir() emulation for Win-DOS. + + Thanks to Colin Finck colin@reactos.org for reporting + +- libschily: The movebytes() man page now mentions other *bytes() + functions. + +- libschily: cmpbytes() new man page + +- libschily::fnmatch.c The code was rewritten to avoid recursion + using the recent code from FreeBSD. + +- libschily::fnmatch.c The behavior with a pattern that ends in + a single escape character ('\') was modified to match the + current POSIX text and the implementation from Sun/IBM/HP, see + http://austingroupbugs.net/view.php?id=806 + +- libschily::fnmatch.c Added support for '[:alpha:]' and similar. + This is needed to make fnmatch() POSIX compliant. + We still miss support for '[=char=]' and '[.char.]'. + +- libschily::fnmatch(): The POSIX specifiers [:upper:] and [:lower:] now + work together with FNM_CASEFOLD. + +- libschily::format.c: a former "long" parameter in the format() routine + has been changed to be now "void *". This is needed as sizeof(long) + is less than sizeof(void *) on Win-DOS-64. This caused the printf() + implementation from libschily to fail on Win64. + + Thanks to Colin Finck from the ReactOS team for reporting. + +- libschily: format() (the printf worker) now supports the floating + point formats: 'E', 'F', 'G'. + +- libschily/fstream.c: fsgetc() now allows to return more expeptional + return values from the transfer callback function. Before, only + 0 and EOF have been supported, now other negative values are OK as well. + +- libschily: added a va_end() call after a va_copy() + call in getargs.c + + Thanks to Heiko Eißfeldt for reporting + +Libcdrdeflt: + +Libdeflt: + +- libdefault: Avoid a possible double fclose() call. + + Thanks to Heiko Eißfeldt for reporting + +Libedc (Optimized by Jörg Schilling, originated by Heiko Eißfeldt heiko@hexco.de): + +- libedc: avoid a free()less malloc() in the speedtest + program. + + Thanks to Heiko Eißfeldt for reporting + +Libfile: + +- libfile: better realloc() handling in case of a failure. + + Thanks to Heiko Eißfeldt for reporting + +Libfind: + +- libfind: use $(LIB_INTL) to support Cygwin when creating a shared library + +- libfind: As libfind uses fnmatch(), it now supports + [[:alpha:]] with "-name" and "-path" in case the schily version of + fnmatch() is used. + +Libhfs_iso: + +- libhsf: removed a superfluous "*/" in DEBUG code. + + Thanks to a report from Heiko Eißfeldt + +Libmdigest: + +Libparanoia (Ported/enhanced by Jörg Schilling, originated by Monty xiphmont@mit.edu): + +Libscg: + +- libscg::scsi-vms.c: abort scg__open() in case that "busno" + has an illegal value. This avoids using uninitialized data + as index in an array. + + Thanks to Heiko Eißfeldt for reporting + +- libscg: scsi-wnt.c corrected the DMA size for the WIN drive type inquiry. + +Libscgcmd: + +Libsiconv: + +Rscsi: + +Cdrecord: + +- cdrecord: man page now mentions the exit code + +- cdrecord: updated the man page to list the names of the drives that support + the defpregap= option. + +- cdrecord::subchan.c changed #ifdef sss -> #if 0 to calm down a + static code analyzer. + + Thanks to Heiko Eißfeldt for reporting + +- cdrecord: the man page now comes with an enhanced section + "EXIT STATUS" + + Thanks to a report from Mathias + + +Cdda2wav (Maintained/enhanced by Jörg Schilling, originated by Heiko Eißfeldt heiko@hexco.de): + +- cdda2wav: a patch from Heiko Eißfeldt results in only trying + to read the ISRC values for the tracks that should be extracted + later. + +- cdda2wav man page: The man page now mentions that c2check should always be + used with "proof" in case the drive supports it. + +- cdda2wav: The output is now unbuffered in case it has been redirected using + the out-fd=# option. + + Thanks to a report from Mathias + +- Cdda2wav: changed the variable userverbose from "int" to "long". + This is needed as getargs() always uses a long * argument for a + function for a callback option. The result of this bug was that + "cdda2wav -vall" did set the output fd to 0 and as a result, + error messages have been printed to stdin instead of stderr. + This of course created problems with GUI frontends if the + cdda2wav binary was a 64-bit binary. + + Thanks to a hint from Thomas Niederreiter + +- Cdda2wav: modified the man page to make it obvious that the new cdda2wav + auto-detects whether a drive supports to read C2-error lists. + + Thanks to a hint from Thomas Niederreiter + +- Cdda2wav: added a workaround for a problem caused by a Linux stdio bug + that causes "stderr" to be buffered even though POSIX requires it + to be unbuffered. + + Thanks to a hint from Thomas Niederreiter + +Readcd: + +- readcd: man page now mentions the exit code + + +Scgcheck: + +Scgskeleton: + +Btcflash: + +- btcflash: added a missing (but not really needed) free() + and fclose() call. + + Thanks to Heiko Eißfeldt for reporting + +Mkisofs (Maintained/enhanced by Jörg Schilling since 1997, originated by Eric Youngdale): + +- mkisofs::apple_drive.c added a missing fclose(fp); + + Thanks to Heiko Eißfeldt for reporting + +- mkisofs::vms.c corrected a typo and now call ISO_ROUND_UP(use) instead + of ROUND_UP(use) + + Thanks to Heiko Eißfeldt for reporting + +- A better documentation for -D was added to the man page. + + + + + +HELIOS TODO: + + - Add the HELIOS UNICODE mapping code. This needs to be done + at UCS-2 level for Joliet and UDF (instead of UTF-8) and only + for Rock Ridge (in case of a UTF-8 based target locale) using + UTF-8 based translations. + + - Make the Apple extensions work again with "mkisofs -find" + +TODO: + + - read Joliet filenames with multi-session if no TRANS.TBL + or RR is present. I am looking for a volunteer for this task! + + Note that this can never be 100% correct as there is no relation + between the names on the master (UNIX) filesystem, the ISO-9660 + names and the Joliet names. Only the Rock Ridge names are + untranslated with respect to the original files on the + master (UNIX) filesystem. + + - add libecc/edc for CDI and similar. + + +CYGWIN NT-4.0 NOTES: + +To compile on Cygwin32, get Cygwin and install it. +For more information read README.win32 + +The files are located on: + +http://sourceforge.net/projects/cdrtools/files/alpha/ ... + +NOTE: These tar archives are 100% POSIX compatible. GNU tar may get some + minor trouble. If you like a 100% POSIX compliant tar, get star from + http://sourceforge.net/projects/s-tar/files/ of from the schily-* + tarball at: http://sourceforge.net/projects/schilytools/files/ + +WARNING: Do not use 'winzip' to extract the tar file! + Winzip cannot extract symbolic links correctly. + +Joerg diff -Nru cdrtools-2.01.01a33/autoconf/acgeneral.m4 cdrtools-3.02a09/autoconf/acgeneral.m4 --- cdrtools-2.01.01a33/autoconf/acgeneral.m4 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/autoconf/acgeneral.m4 2016-03-22 22:26:24.000000000 +0000 @@ -0,0 +1,2751 @@ +dnl @(#)acgeneral.m4 1.17 16/03/22 Copyright 1998-2016 J. Schilling +dnl +dnl Parameterized macros. +dnl Requires GNU m4. +dnl This file is part of Autoconf. +dnl Copyright (C) 1992, 93, 94, 95, 96, 1998 Free Software Foundation, Inc. +dnl +dnl This program is free software; you can redistribute it and/or modify +dnl it under the terms of the GNU General Public License as published by +dnl the Free Software Foundation; either version 2, or (at your option) +dnl any later version. +dnl +dnl This program is distributed in the hope that it will be useful, +dnl but WITHOUT ANY WARRANTY; without even the implied warranty of +dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +dnl GNU General Public License for more details. +dnl +dnl You should have received a copy of the GNU General Public License +dnl along with this program; if not, write to the Free Software +dnl Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA +dnl 02111-1307, USA. +dnl +dnl As a special exception, the Free Software Foundation gives unlimited +dnl permission to copy, distribute and modify the configure scripts that +dnl are the output of Autoconf. You need not follow the terms of the GNU +dnl General Public License when using or distributing such scripts, even +dnl though portions of the text of Autoconf appear in them. The GNU +dnl General Public License (GPL) does govern all other use of the material +dnl that constitutes the Autoconf program. +dnl +dnl Certain portions of the Autoconf source text are designed to be copied +dnl (in certain cases, depending on the input) into the output of +dnl Autoconf. We call these the "data" portions. The rest of the Autoconf +dnl source text consists of comments plus executable code that decides which +dnl of the data portions to output in any given case. We call these +dnl comments and executable code the "non-data" portions. Autoconf never +dnl copies any of the non-data portions into its output. +dnl +dnl This special exception to the GPL applies to versions of Autoconf +dnl released by the Free Software Foundation. When you make and +dnl distribute a modified version of Autoconf, you may extend this special +dnl exception to the GPL to apply to your modified version as well, *unless* +dnl your modified version has the potential to copy into its output some +dnl of the text that was the non-data portion of the version that you started +dnl with. (In other words, unless your change moves or copies text from +dnl the non-data portions to the data portions.) If your modification has +dnl such potential, you must delete any notice of this special exception +dnl to the GPL from your modified version. +dnl +dnl Written by David MacKenzie, with help from +dnl Franc,ois Pinard, Karl Berry, Richard Pixley, Ian Lance Taylor, +dnl Roland McGrath, Noah Friedman, david d zuhn, and many others. +dnl +divert(-1)dnl Throw away output until AC_INIT is called. +changequote([, ]) + +define(AC_ACVERSION, 2.13) +define(AC_ACVERSION_SCHILY, 1.17-Schily) + +dnl Some old m4's don't support m4exit. But they provide +dnl equivalent functionality by core dumping because of the +dnl long macros we define. +ifdef([__gnu__], , [errprint(Autoconf requires GNU m4. +Install it before installing Autoconf or set the +M4 environment variable to its path name. +)m4exit(2)]) + +undefine([eval]) +undefine([include]) +undefine([shift]) +undefine([format]) + + +dnl ### Defining macros + + +dnl m4 output diversions. We let m4 output them all in order at the end, +dnl except that we explicitly undivert AC_DIVERSION_SED, AC_DIVERSION_CMDS, +dnl and AC_DIVERSION_ICMDS. + +dnl AC_DIVERSION_NOTICE - 1 (= 0) AC_REQUIRE'd #! /bin/sh line +define(AC_DIVERSION_NOTICE, 1)dnl copyright notice & option help strings +define(AC_DIVERSION_INIT, 2)dnl initialization code +define(AC_DIVERSION_NORMAL_4, 3)dnl AC_REQUIRE'd code, 4 level deep +define(AC_DIVERSION_NORMAL_3, 4)dnl AC_REQUIRE'd code, 3 level deep +define(AC_DIVERSION_NORMAL_2, 5)dnl AC_REQUIRE'd code, 2 level deep +define(AC_DIVERSION_NORMAL_1, 6)dnl AC_REQUIRE'd code, 1 level deep +define(AC_DIVERSION_NORMAL, 7)dnl the tests and output code +define(AC_DIVERSION_SED, 8)dnl variable substitutions in config.status +define(AC_DIVERSION_CMDS, 9)dnl extra shell commands in config.status +define(AC_DIVERSION_ICMDS, 10)dnl extra initialization in config.status + +dnl Change the diversion stream to STREAM, while stacking old values. +dnl AC_DIVERT_PUSH(STREAM) +define(AC_DIVERT_PUSH, +[pushdef([AC_DIVERSION_CURRENT], $1)dnl +divert(AC_DIVERSION_CURRENT)dnl +]) + +dnl Change the diversion stream to its previous value, unstacking it. +dnl AC_DIVERT_POP() +define(AC_DIVERT_POP, +[popdef([AC_DIVERSION_CURRENT])dnl +divert(AC_DIVERSION_CURRENT)dnl +]) + +dnl Initialize the diversion setup. +define([AC_DIVERSION_CURRENT], AC_DIVERSION_NORMAL) +dnl This will be popped by AC_REQUIRE in AC_INIT. +pushdef([AC_DIVERSION_CURRENT], AC_DIVERSION_NOTICE) + +dnl The prologue for Autoconf macros. +dnl AC_PRO(MACRO-NAME) +define(AC_PRO, +[define([AC_PROVIDE_$1], )dnl +ifelse(AC_DIVERSION_CURRENT, AC_DIVERSION_NORMAL, +[AC_DIVERT_PUSH(builtin(eval, AC_DIVERSION_CURRENT - 1))], +[pushdef([AC_DIVERSION_CURRENT], AC_DIVERSION_CURRENT)])dnl +]) + +dnl The Epilogue for Autoconf macros. +dnl AC_EPI() +define(AC_EPI, +[AC_DIVERT_POP()dnl +ifelse(AC_DIVERSION_CURRENT, AC_DIVERSION_NORMAL, +[undivert(AC_DIVERSION_NORMAL_4)dnl +undivert(AC_DIVERSION_NORMAL_3)dnl +undivert(AC_DIVERSION_NORMAL_2)dnl +undivert(AC_DIVERSION_NORMAL_1)dnl +])dnl +]) + +dnl Define a macro which automatically provides itself. Add machinery +dnl so the macro automatically switches expansion to the diversion +dnl stack if it is not already using it. In this case, once finished, +dnl it will bring back all the code accumulated in the diversion stack. +dnl This, combined with AC_REQUIRE, achieves the topological ordering of +dnl macros. We don't use this macro to define some frequently called +dnl macros that are not involved in ordering constraints, to save m4 +dnl processing. +dnl AC_DEFUN(NAME, EXPANSION) +define([AC_DEFUN], +[define($1, [AC_PRO([$1])$2[]AC_EPI()])]) + + +dnl ### Initialization + + +dnl AC_INIT_NOTICE() +AC_DEFUN(AC_INIT_NOTICE, +[# Guess values for system-dependent variables and create Makefiles. +# Generated automatically using autoconf version] AC_ACVERSION AC_ACVERSION_SCHILY [ +# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc. +# Copyright (C) 1998-2016 J. Schilling +# +# This configure script is free software; the Free Software Foundation +# gives unlimited permission to copy, distribute and modify it. + +# Defaults: +ac_help= +ac_default_prefix=/usr/local +[#] Any additions from configure.in:]) + +dnl AC_PREFIX_DEFAULT(PREFIX) +AC_DEFUN(AC_PREFIX_DEFAULT, +[AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)dnl +ac_default_prefix=$1 +AC_DIVERT_POP()]) + +dnl AC_INIT_PARSE_ARGS() +AC_DEFUN(AC_INIT_PARSE_ARGS, +[ +# Initialize some variables set by options. +# The variables have the same names as the options, with +# dashes changed to underlines. +build=NONE +cache_file=./config.cache +exec_prefix=NONE +host=NONE +no_create= +nonopt=NONE +no_recursion= +prefix=NONE +program_prefix=NONE +program_suffix=NONE +program_transform_name=s,x,x, +silent= +site= +srcdir= +target=NONE +verbose= +rmttest=test +rmtcall= +CONFIG_RMTCALL=${CONFIG_RMTCALL-NONE} +x_includes=NONE +x_libraries=NONE +dnl Installation directory options. +dnl These are left unexpanded so users can "make install exec_prefix=/foo" +dnl and all the variables that are supposed to be based on exec_prefix +dnl by default will actually change. +dnl Use braces instead of parens because sh, perl, etc. also accept them. +bindir='${exec_prefix}/bin' +sbindir='${exec_prefix}/sbin' +libexecdir='${exec_prefix}/libexec' +datadir='${prefix}/share' +sysconfdir='${prefix}/etc' +sharedstatedir='${prefix}/com' +localstatedir='${prefix}/var' +libdir='${exec_prefix}/lib' +includedir='${prefix}/include' +oldincludedir='/usr/include' +infodir='${prefix}/info' +mandir='${prefix}/man' + +# Initialize some other variables. +subdirs= +MFLAGS= MAKEFLAGS= +SHELL=${CONFIG_SHELL-/bin/sh} +# Maximum number of lines to put in a shell here document. +ac_max_here_lines=12 + +ac_prev= +for ac_option +do + + # If the previous option needs an argument, assign it. + if test -n "$ac_prev"; then + eval "$ac_prev=\$ac_option" + ac_prev= + continue + fi + + case "$ac_option" in +changequote(, )dnl + -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;; +changequote([, ])dnl + *) ac_optarg= ;; + esac + + # Accept the important Cygnus configure options, so we can diagnose typos. + + case "$ac_option" in + + -bindir | --bindir | --bindi | --bind | --bin | --bi) + ac_prev=bindir ;; + -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) + bindir="$ac_optarg" ;; + + -build | --build | --buil | --bui | --bu) + ac_prev=build ;; + -build=* | --build=* | --buil=* | --bui=* | --bu=*) + build="$ac_optarg" ;; + + -cache-file | --cache-file | --cache-fil | --cache-fi \ + | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) + ac_prev=cache_file ;; + -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ + | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) + cache_file="$ac_optarg" ;; + + -cc=* | --cc=* ) + CC="$ac_optarg" ; echo using $CC as compiler ;; + + -datadir | --datadir | --datadi | --datad | --data | --dat | --da) + ac_prev=datadir ;; + -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \ + | --da=*) + datadir="$ac_optarg" ;; + + -disable-* | --disable-*) + ac_feature=`echo $ac_option|sed -e 's/-*disable-//'` + # Reject names that are not valid shell variable names. +changequote(, )dnl + if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then +changequote([, ])dnl + AC_MSG_ERROR($ac_feature: invalid feature name) + fi + ac_feature=`echo $ac_feature| sed 's/-/_/g'` + eval "enable_${ac_feature}=no" ;; + + -enable-* | --enable-*) + ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'` + # Reject names that are not valid shell variable names. +changequote(, )dnl + if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then +changequote([, ])dnl + AC_MSG_ERROR($ac_feature: invalid feature name) + fi + ac_feature=`echo $ac_feature| sed 's/-/_/g'` + case "$ac_option" in + *=*) ;; + *) ac_optarg=yes ;; + esac + eval "enable_${ac_feature}='$ac_optarg'" ;; + + -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ + | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ + | --exec | --exe | --ex) + ac_prev=exec_prefix ;; + -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ + | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ + | --exec=* | --exe=* | --ex=*) + exec_prefix="$ac_optarg" ;; + + -gas | --gas | --ga | --g) + # Obsolete; use --with-gas. + with_gas=yes ;; + + -help | --help | --hel | --he) + # Omit some internal or obsolete options to make the list less imposing. + # This message is too long to be a string in the A/UX 3.1 sh. + cat << EOF +changequote(, )dnl +Usage: configure [options] [host] +Options: [defaults in brackets after descriptions] +Configuration: + --cache-file=FILE cache test results in FILE + --help print this message + --no-create do not create output files + --quiet, --silent do not print \`checking...' messages + --version print the version of autoconf that created configure +Directory and file names: + --prefix=PREFIX install architecture-independent files in PREFIX + [$ac_default_prefix] + --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX + [same as prefix] + --bindir=DIR user executables in DIR [EPREFIX/bin] + --sbindir=DIR system admin executables in DIR [EPREFIX/sbin] + --libexecdir=DIR program executables in DIR [EPREFIX/libexec] + --datadir=DIR read-only architecture-independent data in DIR + [PREFIX/share] + --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc] + --sharedstatedir=DIR modifiable architecture-independent data in DIR + [PREFIX/com] + --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var] + --libdir=DIR object code libraries in DIR [EPREFIX/lib] + --includedir=DIR C header files in DIR [PREFIX/include] + --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include] + --infodir=DIR info documentation in DIR [PREFIX/info] + --mandir=DIR man documentation in DIR [PREFIX/man] + --srcdir=DIR find the sources in DIR [configure dir or ..] + --program-prefix=PREFIX prepend PREFIX to installed program names + --program-suffix=SUFFIX append SUFFIX to installed program names + --program-transform-name=PROGRAM + run sed PROGRAM on installed program names +EOF + cat << EOF +Host type: + --build=BUILD configure for building on BUILD [BUILD=HOST] + --host=HOST configure for HOST [guessed] + --target=TARGET configure for TARGET [TARGET=HOST] +Features and packages: + --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) + --enable-FEATURE[=ARG] include FEATURE [ARG=yes] + --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] + --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) + --x-includes=DIR X include files are in DIR + --x-libraries=DIR X library files are in DIR +changequote([, ])dnl +EOF + if test -n "$ac_help"; then + echo "--enable and --with options recognized:$ac_help" + fi + exit 0 ;; + + -host | --host | --hos | --ho) + ac_prev=host ;; + -host=* | --host=* | --hos=* | --ho=*) + host="$ac_optarg" ;; + + -includedir | --includedir | --includedi | --included | --include \ + | --includ | --inclu | --incl | --inc) + ac_prev=includedir ;; + -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ + | --includ=* | --inclu=* | --incl=* | --inc=*) + includedir="$ac_optarg" ;; + + -infodir | --infodir | --infodi | --infod | --info | --inf) + ac_prev=infodir ;; + -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) + infodir="$ac_optarg" ;; + + -libdir | --libdir | --libdi | --libd) + ac_prev=libdir ;; + -libdir=* | --libdir=* | --libdi=* | --libd=*) + libdir="$ac_optarg" ;; + + -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ + | --libexe | --libex | --libe) + ac_prev=libexecdir ;; + -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ + | --libexe=* | --libex=* | --libe=*) + libexecdir="$ac_optarg" ;; + + -localstatedir | --localstatedir | --localstatedi | --localstated \ + | --localstate | --localstat | --localsta | --localst \ + | --locals | --local | --loca | --loc | --lo) + ac_prev=localstatedir ;; + -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ + | --localstate=* | --localstat=* | --localsta=* | --localst=* \ + | --locals=* | --local=* | --loca=* | --loc=* | --lo=*) + localstatedir="$ac_optarg" ;; + + -mandir | --mandir | --mandi | --mand | --man | --ma | --m) + ac_prev=mandir ;; + -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) + mandir="$ac_optarg" ;; + + -nfp | --nfp | --nf) + # Obsolete; use --without-fp. + with_fp=no ;; + + -no-create | --no-create | --no-creat | --no-crea | --no-cre \ + | --no-cr | --no-c) + no_create=yes ;; + + -no-recursion | --no-recursion | --no-recursio | --no-recursi \ + | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) + no_recursion=yes ;; + + -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ + | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ + | --oldin | --oldi | --old | --ol | --o) + ac_prev=oldincludedir ;; + -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ + | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ + | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) + oldincludedir="$ac_optarg" ;; + + -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) + ac_prev=prefix ;; + -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) + prefix="$ac_optarg" ;; + + -program-prefix | --program-prefix | --program-prefi | --program-pref \ + | --program-pre | --program-pr | --program-p) + ac_prev=program_prefix ;; + -program-prefix=* | --program-prefix=* | --program-prefi=* \ + | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) + program_prefix="$ac_optarg" ;; + + -program-suffix | --program-suffix | --program-suffi | --program-suff \ + | --program-suf | --program-su | --program-s) + ac_prev=program_suffix ;; + -program-suffix=* | --program-suffix=* | --program-suffi=* \ + | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) + program_suffix="$ac_optarg" ;; + + -program-transform-name | --program-transform-name \ + | --program-transform-nam | --program-transform-na \ + | --program-transform-n | --program-transform- \ + | --program-transform | --program-transfor \ + | --program-transfo | --program-transf \ + | --program-trans | --program-tran \ + | --progr-tra | --program-tr | --program-t) + ac_prev=program_transform_name ;; + -program-transform-name=* | --program-transform-name=* \ + | --program-transform-nam=* | --program-transform-na=* \ + | --program-transform-n=* | --program-transform-=* \ + | --program-transform=* | --program-transfor=* \ + | --program-transfo=* | --program-transf=* \ + | --program-trans=* | --program-tran=* \ + | --progr-tra=* | --program-tr=* | --program-t=*) + program_transform_name="$ac_optarg" ;; + + -q | -quiet | --quiet | --quie | --qui | --qu | --q \ + | -silent | --silent | --silen | --sile | --sil) + silent=yes ;; + + -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) + ac_prev=sbindir ;; + -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ + | --sbi=* | --sb=*) + sbindir="$ac_optarg" ;; + + -sharedstatedir | --sharedstatedir | --sharedstatedi \ + | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ + | --sharedst | --shareds | --shared | --share | --shar \ + | --sha | --sh) + ac_prev=sharedstatedir ;; + -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ + | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ + | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ + | --sha=* | --sh=*) + sharedstatedir="$ac_optarg" ;; + + -site | --site | --sit) + ac_prev=site ;; + -site=* | --site=* | --sit=*) + site="$ac_optarg" ;; + + -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) + ac_prev=srcdir ;; + -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) + srcdir="$ac_optarg" ;; + + -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ + | --syscon | --sysco | --sysc | --sys | --sy) + ac_prev=sysconfdir ;; + -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ + | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) + sysconfdir="$ac_optarg" ;; + + -target | --target | --targe | --targ | --tar | --ta | --t) + ac_prev=target ;; + -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) + target="$ac_optarg" ;; + + -v | -verbose | --verbose | --verbos | --verbo | --verb) + verbose=yes ;; + + -version | --version | --versio | --versi | --vers) + echo "configure generated by autoconf version AC_ACVERSION AC_ACVERSION_SCHILY" + exit 0 ;; + + -with-* | --with-*) + ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'` + # Reject names that are not valid shell variable names. +changequote(, )dnl + if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then +changequote([, ])dnl + AC_MSG_ERROR($ac_package: invalid package name) + fi + ac_package=`echo $ac_package| sed 's/-/_/g'` + case "$ac_option" in + *=*) ;; + *) ac_optarg=yes ;; + esac + eval "with_${ac_package}='$ac_optarg'" ;; + + -without-* | --without-*) + ac_package=`echo $ac_option|sed -e 's/-*without-//'` + # Reject names that are not valid shell variable names. +changequote(, )dnl + if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then +changequote([, ])dnl + AC_MSG_ERROR($ac_package: invalid package name) + fi + ac_package=`echo $ac_package| sed 's/-/_/g'` + eval "with_${ac_package}=no" ;; + + --x) + # Obsolete; use --with-x. + with_x=yes ;; + + -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ + | --x-incl | --x-inc | --x-in | --x-i) + ac_prev=x_includes ;; + -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ + | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) + x_includes="$ac_optarg" ;; + + -x-libraries | --x-libraries | --x-librarie | --x-librari \ + | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) + ac_prev=x_libraries ;; + -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ + | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) + x_libraries="$ac_optarg" ;; + + -*) AC_MSG_ERROR([$ac_option: invalid option; use --help to show usage]) + ;; + + *) +changequote(, )dnl + if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then +changequote([, ])dnl + AC_MSG_WARN($ac_option: invalid host type) + fi + if test "x$nonopt" != xNONE; then + AC_MSG_ERROR(can only configure for one host and one target at a time) + fi + nonopt="$ac_option" + ;; + + esac +done + +if test -n "$ac_prev"; then + AC_MSG_ERROR(missing argument to --`echo $ac_prev | sed 's/_/-/g'`) +fi +]) + +dnl Try to have only one #! line, so the script doesn't look funny +dnl for users of AC_REVISION. +dnl AC_INIT_BINSH() +AC_DEFUN(AC_INIT_BINSH, +[#! /bin/sh +]) + +dnl AC_INIT(UNIQUE-FILE-IN-SOURCE-DIR) +AC_DEFUN(AC_INIT, +[sinclude(acsite.m4)dnl +sinclude(./aclocal.m4)dnl +AC_REQUIRE([AC_INIT_BINSH])dnl +AC_INIT_NOTICE +AC_DIVERT_POP()dnl to NORMAL +AC_DIVERT_PUSH(AC_DIVERSION_INIT)dnl +AC_INIT_PARSE_ARGS +AC_INIT_PREPARE($1)dnl +AC_DIVERT_POP()dnl to NORMAL +]) + +dnl AC_INIT_PREPARE(UNIQUE-FILE-IN-SOURCE-DIR) +AC_DEFUN(AC_INIT_PREPARE, +[trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15 + +# File descriptor usage: +# 0 standard input +# 1 file creation +# 2 errors and warnings +# 3 some systems may open it to /dev/tty +# 4 used on the Kubota Titan +define(AC_FD_MSG, 6)dnl +[#] AC_FD_MSG checking for... messages and results +define(AC_FD_CC, 5)dnl +[#] AC_FD_CC compiler messages saved in config.log +if test "$silent" = yes; then + exec AC_FD_MSG>/dev/null +else + exec AC_FD_MSG>&1 +fi +exec AC_FD_CC>./config.log + +echo "\ +This file contains any messages produced by compilers while +running configure, to aid debugging if configure makes a mistake. +" 1>&AC_FD_CC + +# Strip out --no-create and --no-recursion so they do not pile up. +# Also quote any args containing shell metacharacters. +ac_configure_args= +for ac_arg +do + case "$ac_arg" in + -no-create | --no-create | --no-creat | --no-crea | --no-cre \ + | --no-cr | --no-c) ;; + -no-recursion | --no-recursion | --no-recursio | --no-recursi \ + | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;; +changequote(<<, >>)dnl +dnl If you change this globbing pattern, test it on an old shell -- +dnl it's sensitive. Putting any kind of quote in it causes syntax errors. + *" "*|*" "*|*[\[\]\~\<<#>>\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*) + ac_configure_args="$ac_configure_args '$ac_arg'" ;; +changequote([, ])dnl + *) ac_configure_args="$ac_configure_args $ac_arg" ;; + esac +done + +# NLS nuisances. +# Only set these to C if already set. These must not be set unconditionally +# because not all systems understand e.g. LANG=C (notably SCO). +# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'! +# Non-C LC_CTYPE values break the ctype check. +if test "${LANG+set}" = set; then LANG=C; export LANG; fi +if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi +if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi +if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi + +# confdefs.h avoids OS command line length limits that DEFS can exceed. +rm -rf conftest* confdefs.h +# AIX cpp loses on an empty file, so make sure it contains at least a newline. +echo > confdefs.h + +# A filename unique to this package, relative to the directory that +# configure is in, which we can look for to find out if srcdir is correct. +ac_unique_file=$1 + +# Find the source files, if location was not specified. +if test -z "$srcdir"; then + ac_srcdir_defaulted=yes + # Try the directory containing this script, then its parent. + ac_prog=[$]0 +changequote(, )dnl + ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'` +changequote([, ])dnl + test "x$ac_confdir" = "x$ac_prog" && ac_confdir=. + srcdir=$ac_confdir + if test ! -r $srcdir/$ac_unique_file; then + srcdir=.. + fi +else + ac_srcdir_defaulted=no +fi +if test ! -r $srcdir/$ac_unique_file; then + if test "$ac_srcdir_defaulted" = yes; then + AC_MSG_ERROR(can not find sources in $ac_confdir or ..) + else + AC_MSG_ERROR(can not find sources in $srcdir) + fi +fi +dnl Double slashes in pathnames in object file debugging info +dnl mess up M-x gdb in Emacs. +changequote(, )dnl +srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'` +changequote([, ])dnl + +dnl Let the site file select an alternate cache file if it wants to. +AC_SITE_LOAD +AC_CACHE_LOAD +AC_LANG_C +dnl By default always use an empty string as the executable +dnl extension. Only change it if the script calls AC_EXEEXT. +ac_exeext= +ac_xexeext= +dnl By default assume that objects files use an extension of .o. Only +dnl change it if the script calls AC_OBJEXT. +ac_objext=o +AC_PROG_ECHO_N +dnl Substitute for predefined variables. +AC_SUBST(SHELL)dnl +AC_SUBST(CFLAGS)dnl +AC_SUBST(CPPFLAGS)dnl +AC_SUBST(CXXFLAGS)dnl +AC_SUBST(FFLAGS)dnl +AC_SUBST(DEFS)dnl +AC_SUBST(LDFLAGS)dnl +AC_SUBST(LIBS)dnl +AC_SUBST(exec_prefix)dnl +AC_SUBST(prefix)dnl +AC_SUBST(program_transform_name)dnl +dnl Installation directory options. +AC_SUBST(bindir)dnl +AC_SUBST(sbindir)dnl +AC_SUBST(libexecdir)dnl +AC_SUBST(datadir)dnl +AC_SUBST(sysconfdir)dnl +AC_SUBST(sharedstatedir)dnl +AC_SUBST(localstatedir)dnl +AC_SUBST(libdir)dnl +AC_SUBST(includedir)dnl +AC_SUBST(oldincludedir)dnl +AC_SUBST(infodir)dnl +AC_SUBST(mandir)dnl +]) + + +dnl ### Selecting optional features + + +dnl AC_ARG_ENABLE(FEATURE, HELP-STRING, ACTION-IF-TRUE [, ACTION-IF-FALSE]) +AC_DEFUN(AC_ARG_ENABLE, +[AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)dnl +ac_help="$ac_help +[$2]" +AC_DIVERT_POP()dnl +[#] Check whether --enable-[$1] or --disable-[$1] was given. +if test "[${enable_]patsubst([$1], -, _)+set}" = set; then + enableval="[$enable_]patsubst([$1], -, _)" + ifelse([$3], , :, [$3]) +ifelse([$4], , , [else + $4 +])dnl +fi +]) + +AC_DEFUN(AC_ENABLE, +[AC_OBSOLETE([$0], [; instead use AC_ARG_ENABLE])dnl +AC_ARG_ENABLE([$1], [ --enable-$1], [$2], [$3])dnl +]) + + +dnl ### Working with optional software + + +dnl AC_ARG_WITH(PACKAGE, HELP-STRING, ACTION-IF-TRUE [, ACTION-IF-FALSE]) +AC_DEFUN(AC_ARG_WITH, +[AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)dnl +ac_help="$ac_help +[$2]" +AC_DIVERT_POP()dnl +[#] Check whether --with-[$1] or --without-[$1] was given. +if test "[${with_]patsubst([$1], -, _)+set}" = set; then + withval="[$with_]patsubst([$1], -, _)" + ifelse([$3], , :, [$3]) +ifelse([$4], , , [else + $4 +])dnl +fi +]) + +AC_DEFUN(AC_WITH, +[AC_OBSOLETE([$0], [; instead use AC_ARG_WITH])dnl +AC_ARG_WITH([$1], [ --with-$1], [$2], [$3])dnl +]) + + +dnl ### Transforming program names. + + +dnl AC_ARG_PROGRAM() +AC_DEFUN(AC_ARG_PROGRAM, +[if test "$program_transform_name" = s,x,x,; then + program_transform_name= +else + # Double any \ or $. echo might interpret backslashes. + cat <<\EOF_SED > conftestsed +s,\\,\\\\,g; s,\$,$$,g +EOF_SED + program_transform_name="`echo $program_transform_name|sed -f conftestsed`" + rm -f conftestsed +fi +test "$program_prefix" != NONE && + program_transform_name="s,^,${program_prefix},; $program_transform_name" +# Use a double $ so make ignores it. +test "$program_suffix" != NONE && + program_transform_name="s,\$\$,${program_suffix},; $program_transform_name" + +# sed with no file args requires a program. +test "$program_transform_name" = "" && program_transform_name="s,x,x," +]) + + +dnl ### Version numbers + + +dnl AC_REVISION(REVISION-INFO) +AC_DEFUN(AC_REVISION, +[AC_REQUIRE([AC_INIT_BINSH])dnl +[# From configure.in] translit([$1], $")]) + +dnl Subroutines of AC_PREREQ. + +dnl Change the dots in NUMBER into commas. +dnl AC_PREREQ_SPLIT(NUMBER) +define(AC_PREREQ_SPLIT, +[translit($1, ., [, ])]) + +dnl Default the ternary version number to 0 (e.g., 1, 7 -> 1, 7, 0). +dnl AC_PREREQ_CANON(MAJOR, MINOR [,TERNARY]) +define(AC_PREREQ_CANON, +[$1, $2, ifelse([$3], , 0, [$3])]) + +dnl Complain and exit if version number 1 is less than version number 2. +dnl PRINTABLE2 is the printable version of version number 2. +dnl AC_PREREQ_COMPARE(MAJOR1, MINOR1, TERNARY1, MAJOR2, MINOR2, TERNARY2, +dnl PRINTABLE2) +define(AC_PREREQ_COMPARE, +[ifelse(builtin([eval], +[$3 + $2 * 1000 + $1 * 1000000 < $6 + $5 * 1000 + $4 * 1000000]), 1, +[errprint(dnl +FATAL ERROR: Autoconf version $7 or higher is required for this script +)m4exit(3)])]) + +dnl Complain and exit if the Autoconf version is less than VERSION. +dnl AC_PREREQ(VERSION) +define(AC_PREREQ, +[AC_PREREQ_COMPARE(AC_PREREQ_CANON(AC_PREREQ_SPLIT(AC_ACVERSION)), +AC_PREREQ_CANON(AC_PREREQ_SPLIT([$1])), [$1])]) + + +dnl ### Getting the canonical system type + + +dnl Find install-sh, config.sub, config.guess, and Cygnus configure +dnl in directory DIR. These are auxiliary files used in configuration. +dnl DIR can be either absolute or relative to $srcdir. +dnl AC_CONFIG_AUX_DIR(DIR) +AC_DEFUN(AC_CONFIG_AUX_DIR, +[AC_CONFIG_AUX_DIRS($1 $srcdir/$1)]) + +dnl The default is `$srcdir' or `$srcdir/..' or `$srcdir/../..'. +dnl There's no need to call this macro explicitly; just AC_REQUIRE it. +AC_DEFUN(AC_CONFIG_AUX_DIR_DEFAULT, +[AC_CONFIG_AUX_DIRS($srcdir $srcdir/.. $srcdir/../..)]) + +dnl Internal subroutine. +dnl Search for the configuration auxiliary files in directory list $1. +dnl We look only for install-sh, so users of AC_PROG_INSTALL +dnl do not automatically need to distribute the other auxiliary files. +dnl AC_CONFIG_AUX_DIRS(DIR ...) +AC_DEFUN(AC_CONFIG_AUX_DIRS, +[ac_aux_dir= +for ac_dir in $1; do + if test -f $ac_dir/install-sh; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/install-sh -c" + break + elif test -f $ac_dir/install.sh; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/install.sh -c" + break + fi +done +if test -z "$ac_aux_dir"; then + AC_MSG_ERROR([can not find install-sh or install.sh in $1]) +fi +ac_config_guess=$ac_aux_dir/config.guess +ac_config_sub=$ac_aux_dir/config.sub +ac_configure=$ac_aux_dir/configure # This should be Cygnus configure. +AC_PROVIDE([AC_CONFIG_AUX_DIR_DEFAULT])dnl +]) + +dnl Canonicalize the host, target, and build system types. +AC_DEFUN(AC_CANONICAL_SYSTEM, +[AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl +AC_BEFORE([$0], [AC_ARG_PROGRAM]) +# Do some error checking and defaulting for the host and target type. +# The inputs are: +# configure --host=HOST --target=TARGET --build=BUILD NONOPT +# +# The rules are: +# 1. You are not allowed to specify --host, --target, and nonopt at the +# same time. +# 2. Host defaults to nonopt. +# 3. If nonopt is not specified, then host defaults to the current host, +# as determined by config.guess. +# 4. Target and build default to nonopt. +# 5. If nonopt is not specified, then target and build default to host. + +# The aliases save the names the user supplied, while $host etc. +# will get canonicalized. +case $host---$target---$nonopt in +NONE---*---* | *---NONE---* | *---*---NONE) ;; +*) AC_MSG_ERROR(can only configure for one host and one target at a time) ;; +esac + +AC_CANONICAL_HOST +AC_CANONICAL_TARGET +AC_CANONICAL_BUILD +test "$host_alias" != "$target_alias" && + test "$program_prefix$program_suffix$program_transform_name" = \ + NONENONEs,x,x, && + program_prefix=${target_alias}- +]) + +dnl Subroutines of AC_CANONICAL_SYSTEM. + +AC_DEFUN(AC_CANONICAL_HOST, +[AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl + +# Make sure we can run config.sub. +if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then : +else AC_MSG_ERROR(can not run $ac_config_sub) +fi + +AC_MSG_CHECKING(host system type) + +dnl Set host_alias. +host_alias=$host +case "$host_alias" in +NONE) + case $nonopt in + NONE) + if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then : + else AC_MSG_ERROR(can not guess host type; you must specify one) + fi ;; + *) host_alias=$nonopt ;; + esac ;; +esac + +dnl Set the other host vars. +changequote(<<, >>)dnl +host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias` +host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` +host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` +host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` +changequote([, ])dnl +AC_MSG_RESULT($host) +AC_SUBST(host)dnl +AC_SUBST(host_alias)dnl +AC_SUBST(host_cpu)dnl +AC_SUBST(host_vendor)dnl +AC_SUBST(host_os)dnl +]) + +dnl Internal use only. +AC_DEFUN(AC_CANONICAL_TARGET, +[AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl +AC_MSG_CHECKING(target system type) + +dnl Set target_alias. +target_alias=$target +case "$target_alias" in +NONE) + case $nonopt in + NONE) target_alias=$host_alias ;; + *) target_alias=$nonopt ;; + esac ;; +esac + +dnl Set the other target vars. +changequote(<<, >>)dnl +target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias` +target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` +target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` +target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` +changequote([, ])dnl +AC_MSG_RESULT($target) +AC_SUBST(target)dnl +AC_SUBST(target_alias)dnl +AC_SUBST(target_cpu)dnl +AC_SUBST(target_vendor)dnl +AC_SUBST(target_os)dnl +]) + +dnl Internal use only. +AC_DEFUN(AC_CANONICAL_BUILD, +[AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl +AC_MSG_CHECKING(build system type) + +dnl Set build_alias. +build_alias=$build +case "$build_alias" in +NONE) + case $nonopt in + NONE) build_alias=$host_alias ;; + *) build_alias=$nonopt ;; + esac ;; +esac + +dnl Set the other build vars. +changequote(<<, >>)dnl +build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias` +build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` +build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` +build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` +changequote([, ])dnl +AC_MSG_RESULT($build) +AC_SUBST(build)dnl +AC_SUBST(build_alias)dnl +AC_SUBST(build_cpu)dnl +AC_SUBST(build_vendor)dnl +AC_SUBST(build_os)dnl +]) + + +dnl AC_VALIDATE_CACHED_SYSTEM_TUPLE[(cmd)] +dnl if the cache file is inconsistent with the current host, +dnl target and build system types, execute CMD or print a default +dnl error message. +AC_DEFUN(AC_VALIDATE_CACHED_SYSTEM_TUPLE, [ + AC_REQUIRE([AC_CANONICAL_SYSTEM]) + AC_MSG_CHECKING([cached system tuple]) + if { test x"${ac_cv_host_system_type+set}" = x"set" && + test x"$ac_cv_host_system_type" != x"$host"; } || + { test x"${ac_cv_build_system_type+set}" = x"set" && + test x"$ac_cv_build_system_type" != x"$build"; } || + { test x"${ac_cv_target_system_type+set}" = x"set" && + test x"$ac_cv_target_system_type" != x"$target"; }; then + AC_MSG_RESULT([different]) + ifelse($#, 1, [$1], + [AC_MSG_ERROR([remove config.cache and re-run configure])]) + else + AC_MSG_RESULT(ok) + fi + ac_cv_host_system_type="$host" + ac_cv_build_system_type="$build" + ac_cv_target_system_type="$target" +]) + + +dnl ### Caching test results + + +dnl Look for site or system specific initialization scripts. +dnl AC_SITE_LOAD() +define(AC_SITE_LOAD, +[# Prefer explicitly selected file to automatically selected ones. +if test -z "$CONFIG_SITE"; then + if test "x$prefix" != xNONE; then + CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site" + else + CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" + fi +fi +for ac_site_file in $CONFIG_SITE; do + if test -r "$ac_site_file"; then + echo "loading site script $ac_site_file" + . "$ac_site_file" + fi +done +]) + +dnl AC_CACHE_LOAD() +define(AC_CACHE_LOAD, +[if test -r "$cache_file"; then + echo "loading cache $cache_file" + . $cache_file +else + echo "creating cache $cache_file" + > $cache_file +fi +]) + +dnl AC_CACHE_SAVE() +define(AC_CACHE_SAVE, +[cat > confcache <<\EOF +# This file is a shell script that caches the results of configure +# tests run on this system so they can be shared between configure +# scripts and configure runs. It is not useful on other systems. +# If it contains results you don't want to keep, you may remove or edit it. +# +# By default, configure uses ./config.cache as the cache file, +# creating it if it does not exist already. You can give configure +# the --cache-file=FILE option to use a different cache file; that is +# what configure does when it calls configure scripts in +# subdirectories, so they share the cache. +# Giving --cache-file=/dev/null disables caching, for debugging configure. +# config.status only pays attention to the cache file if you give it the +# --recheck option to rerun configure. +# +EOF +dnl Allow a site initialization script to override cache values. +# The following way of writing the cache mishandles newlines in values, +# but we know of no workaround that is simple, portable, and efficient. +# So, don't put newlines in cache variables' values. +# Ultrix sh set writes to stderr and can't be redirected directly, +# and sets the high bit in the cache file unless we assign to the vars. +changequote(, )dnl +(set) 2>&1 | + case `(ac_space=' '; set | grep ac_space) 2>&1` in + *ac_space=\ *) + # `set' does not quote correctly, so add quotes (double-quote substitution + # turns \\\\ into \\, and sed turns \\ into \). + sed -n \ + -e "s/'/'\\\\''/g" \ + -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p" + ;; + *) + # `set' quotes correctly as required by POSIX, so do not add quotes. + sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p' + ;; + esac >> confcache +changequote([, ])dnl +if cmp -s $cache_file confcache; then + : +else + if test -w $cache_file; then + echo "updating cache $cache_file" + cat confcache > $cache_file + else + echo "not updating unwritable cache $cache_file" + fi +fi +rm -f confcache +]) + +dnl The name of shell var CACHE-ID must contain `_cv_' in order to get saved. +dnl AC_CACHE_VAL(CACHE-ID, COMMANDS-TO-SET-IT) +define(AC_CACHE_VAL, +[dnl We used to use the below line, but it fails if the 1st arg is a +dnl shell variable, so we need the eval. +dnl if test "${$1+set}" = set; then +dnl the '' avoids an AIX 4.1 sh bug ("invalid expansion"). +if eval "test \"`echo '$''{'$1'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&AC_FD_MSG +else + $2 +fi +]) + +dnl AC_CACHE_CHECK(MESSAGE, CACHE-ID, COMMANDS) +define(AC_CACHE_CHECK, +[AC_MSG_CHECKING([$1]) +AC_CACHE_VAL([$2], [$3]) +AC_MSG_RESULT([$]$2)]) + + +dnl ### Defining symbols + + +dnl Set VARIABLE to VALUE, verbatim, or 1. +dnl AC_DEFINE(VARIABLE [, VALUE]) +define(AC_DEFINE, +[cat >> confdefs.h <<\EOF +[#define] $1 ifelse($#, 2, [$2], $#, 3, [$2], 1) +EOF +]) + +dnl Similar, but perform shell substitutions $ ` \ once on VALUE. +define(AC_DEFINE_UNQUOTED, +[cat >> confdefs.h <&AC_FD_MSG +echo "configure:__oline__: checking $1" >&AC_FD_CC]) + +dnl AC_CHECKING(FEATURE-DESCRIPTION) +define(AC_CHECKING, +[echo "checking $1" 1>&AC_FD_MSG +echo "configure:__oline__: checking $1" >&AC_FD_CC]) + +dnl AC_MSG_RESULT(RESULT-DESCRIPTION) +define(AC_MSG_RESULT, +[eval echo "$ac_t""$1" 1>&AC_FD_MSG]) + +dnl AC_VERBOSE(RESULT-DESCRIPTION) +define(AC_VERBOSE, +[AC_OBSOLETE([$0], [; instead use AC_MSG_RESULT])dnl +echo " $1" 1>&AC_FD_MSG]) + +dnl AC_MSG_WARN(PROBLEM-DESCRIPTION) +define(AC_MSG_WARN, +[echo "configure: warning: $1" 1>&2]) + +dnl AC_MSG_ERROR(ERROR-DESCRIPTION) +define(AC_MSG_ERROR, +[{ echo "configure: error: $1" 1>&2; exit 1; }]) + + +dnl ### Selecting which language to use for testing + + +dnl AC_LANG_C() +AC_DEFUN(AC_LANG_C, +[define([AC_LANG], [C])dnl +ac_ext=c +# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. +ac_cpp='$CPP $CPPFLAGS' +ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&AC_FD_CC' +ac_compile2='${CC-cc} -c $CFLAGS $CPPFLAGS conftest2.$ac_ext 1>&AC_FD_CC' +ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS conftest.$ac_ext $LDFLAGS $LIBS 1>&AC_FD_CC' +cross_compiling=$ac_cv_prog_cc_cross +if test "$cross_compiling" = yes -a "$CONFIG_RMTCALL" != NONE ; then + cross_compiling=remote + rmtcall="$CONFIG_RMTCALL" + rmttest="$CONFIG_RMTCALL" +fi +]) + +dnl AC_LANG_CPLUSPLUS() +AC_DEFUN(AC_LANG_CPLUSPLUS, +[define([AC_LANG], [CPLUSPLUS])dnl +ac_ext=C +# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&AC_FD_CC' +ac_compile2='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest2.$ac_ext 1>&AC_FD_CC' +ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS conftest.$ac_ext $LDFLAGS $LIBS 1>&AC_FD_CC' +cross_compiling=$ac_cv_prog_cxx_cross +if test "$cross_compiling" = yes -a "$CONFIG_RMTCALL" != NONE ; then + cross_compiling=remote + rmtcall="$CONFIG_RMTCALL" + rmttest="$CONFIG_RMTCALL" +fi +]) + +dnl AC_LANG_FORTRAN77() +AC_DEFUN(AC_LANG_FORTRAN77, +[define([AC_LANG], [FORTRAN77])dnl +ac_ext=f +ac_compile='${F77-f77} -c $FFLAGS conftest.$ac_ext 1>&AC_FD_CC' +ac_compile2='${F77-f77} -c $FFLAGS conftest2.$ac_ext 1>&AC_FD_CC' +ac_link='${F77-f77} -o conftest${ac_exeext} $FFLAGS conftest.$ac_ext $LDFLAGS $LIBS 1>&AC_FD_CC' +cross_compiling=$ac_cv_prog_f77_cross +if test "$cross_compiling" = yes -a "$CONFIG_RMTCALL" != NONE ; then + cross_compiling=remote + rmtcall="$CONFIG_RMTCALL" + rmttest="$CONFIG_RMTCALL" +fi +]) + +dnl Push the current language on a stack. +dnl AC_LANG_SAVE() +define(AC_LANG_SAVE, +[pushdef([AC_LANG_STACK], AC_LANG)]) + +dnl Restore the current language from the stack. +dnl AC_LANG_RESTORE() +pushdef([AC_LANG_RESTORE], +[ifelse(AC_LANG_STACK, [C], [AC_LANG_C],dnl +AC_LANG_STACK, [CPLUSPLUS], [AC_LANG_CPLUSPLUS],dnl +AC_LANG_STACK, [FORTRAN77], [AC_LANG_FORTRAN77])[]popdef([AC_LANG_STACK])]) + + +dnl ### Compiler-running mechanics + + +dnl The purpose of this macro is to "configure:123: command line" +dnl written into config.log for every test run. +dnl +dnl Note that previous versions of AC_TRY_EVAL did use () around the complete +dnl eval commands. This causes unneeded sub-shells and reduces the performance +dnl by 5% with a typical shell. +dnl Given that the command passed to "eval" is in a shell variable, I/O +dnl redirections and pipe calls in that variable are not parsed by the first +dnl shell parser call but passed as textual arguments to the "eval" builtin and +dnl then parsed inside "eval". For this reason there is no need for the () even +dnl in case that the command contains an I/O redirection. +dnl +dnl AC_TRY_EVAL(VARIABLE) +AC_DEFUN(AC_TRY_EVAL, +[{ eval echo configure:__oline__: \"[$]$1\" 1>&AC_FD_CC; dnl +eval [$]$1 2>&AC_FD_CC; }]) + +dnl AC_TRY_COMMAND(COMMAND) +AC_DEFUN(AC_TRY_COMMAND, +[{ ac_try='$1'; AC_TRY_EVAL(ac_try); }]) + + +dnl ### Dependencies between macros + + +dnl AC_BEFORE(THIS-MACRO-NAME, CALLED-MACRO-NAME) +define(AC_BEFORE, +[ifdef([AC_PROVIDE_$2], [errprint(__file__:__line__: [$2 was called before $1 +])])]) + +dnl AC_REQUIRE(MACRO-NAME) +define(AC_REQUIRE, +[ifdef([AC_PROVIDE_$1], , +[AC_DIVERT_PUSH(builtin(eval, AC_DIVERSION_CURRENT - 1))dnl +indir([$1]) +AC_DIVERT_POP()dnl +])]) + +dnl AC_PROVIDE(MACRO-NAME) +define(AC_PROVIDE, +[define([AC_PROVIDE_$1], )]) + +dnl AC_OBSOLETE(THIS-MACRO-NAME [, SUGGESTION]) +define(AC_OBSOLETE, +[errprint(__file__:__line__: warning: [$1] is obsolete[$2] +)]) + + +dnl ### Checking for programs + + +dnl AC_CHECK_PROG(VARIABLE, PROG-TO-CHECK-FOR, VALUE-IF-FOUND +dnl [, [VALUE-IF-NOT-FOUND] [, [PATH] [, [REJECT]]]]) +AC_DEFUN(AC_CHECK_PROG, +[# Extract the first word of "$2", so it can be a program name with args. +set dummy $2; ac_word=[$]2 +AC_MSG_CHECKING([for $ac_word]) +AC_CACHE_VAL(ac_cv_prog_$1, +[if test -n "[$]$1"; then + ac_cv_prog_$1="[$]$1" # Let the user override the test. +else + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" +ifelse([$6], , , [ ac_prog_rejected=no +])dnl +dnl $ac_dummy forces splitting on constant user-supplied paths. +dnl POSIX.2 word splitting is done only on the output of word expansions, +dnl not every word. This closes a longstanding sh security hole. + ac_dummy="ifelse([$5], , $PATH, [$5])" + for ac_dir in $ac_dummy; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then +ifelse([$6], , , dnl +[ if test "[$ac_dir/$ac_word]" = "$6"; then + ac_prog_rejected=yes + continue + fi +])dnl + ac_cv_prog_$1="$3" + break + fi + done + IFS="$ac_save_ifs" +ifelse([$6], , , [if test $ac_prog_rejected = yes; then + # We found a bogon in the path, so make sure we never use it. + set dummy [$]ac_cv_prog_$1 + shift + if test [$]# -gt 0; then + # We chose a different compiler from the bogus one. + # However, it has the same basename, so the bogon will be chosen + # first if we set $1 to just the basename; use the full file name. + shift + set dummy "$ac_dir/$ac_word" "[$]@" + shift + ac_cv_prog_$1="[$]@" +ifelse([$2], [$4], dnl +[ else + # Default is a loser. + AC_MSG_ERROR([$1=$6 unacceptable, but no other $4 found in dnl +ifelse([$5], , [\$]PATH, [$5])]) +])dnl + fi +fi +])dnl +dnl If no 4th arg is given, leave the cache variable unset, +dnl so AC_CHECK_PROGS will keep looking. +ifelse([$4], , , [ test -z "[$]ac_cv_prog_$1" && ac_cv_prog_$1="$4" +])dnl +fi])dnl +$1="$ac_cv_prog_$1" +if test -n "[$]$1"; then + AC_MSG_RESULT([$]$1) +else + AC_MSG_RESULT(no) +fi +AC_SUBST($1)dnl +]) + +dnl AC_PATH_PROG(VARIABLE, PROG-TO-CHECK-FOR [, VALUE-IF-NOT-FOUND [, PATH]]) +AC_DEFUN(AC_PATH_PROG, +[# Extract the first word of "$2", so it can be a program name with args. +set dummy $2; ac_word=[$]2 +AC_MSG_CHECKING([for $ac_word]) +AC_CACHE_VAL(ac_cv_path_$1, +[case "[$]$1" in + /*) + ac_cv_path_$1="[$]$1" # Let the user override the test with a path. + ;; + ?:/*) + ac_cv_path_$1="[$]$1" # Let the user override the test with a dos path. + ;; + *) + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" +dnl $ac_dummy forces splitting on constant user-supplied paths. +dnl POSIX.2 word splitting is done only on the output of word expansions, +dnl not every word. This closes a longstanding sh security hole. + ac_dummy="ifelse([$4], , $PATH, [$4])" + for ac_dir in $ac_dummy; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + ac_cv_path_$1="$ac_dir/$ac_word" + break + fi + done + IFS="$ac_save_ifs" +dnl If no 3rd arg is given, leave the cache variable unset, +dnl so AC_PATH_PROGS will keep looking. +ifelse([$3], , , [ test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$3" +])dnl + ;; +esac])dnl +$1="$ac_cv_path_$1" +if test -n "[$]$1"; then + AC_MSG_RESULT([$]$1) +else + AC_MSG_RESULT(no) +fi +AC_SUBST($1)dnl +]) + +dnl AC_CHECK_PROGS(VARIABLE, PROGS-TO-CHECK-FOR [, VALUE-IF-NOT-FOUND +dnl [, PATH]]) +AC_DEFUN(AC_CHECK_PROGS, +[for ac_prog in $2 +do +AC_CHECK_PROG($1, [$]ac_prog, [$]ac_prog, , $4) +test -n "[$]$1" && break +done +ifelse([$3], , , [test -n "[$]$1" || $1="$3" +])]) + +dnl AC_PATH_PROGS(VARIABLE, PROGS-TO-CHECK-FOR [, VALUE-IF-NOT-FOUND +dnl [, PATH]]) +AC_DEFUN(AC_PATH_PROGS, +[for ac_prog in $2 +do +AC_PATH_PROG($1, [$]ac_prog, , $4) +test -n "[$]$1" && break +done +ifelse([$3], , , [test -n "[$]$1" || $1="$3" +])]) + +dnl Internal subroutine. +AC_DEFUN(AC_CHECK_TOOL_PREFIX, +[AC_REQUIRE([AC_CANONICAL_HOST])AC_REQUIRE([AC_CANONICAL_BUILD])dnl +if test $host != $build; then + ac_tool_prefix=${host_alias}- +else + ac_tool_prefix= +fi +]) + +dnl AC_CHECK_TOOL(VARIABLE, PROG-TO-CHECK-FOR[, VALUE-IF-NOT-FOUND [, PATH]]) +AC_DEFUN(AC_CHECK_TOOL, +[AC_REQUIRE([AC_CHECK_TOOL_PREFIX])dnl +AC_CHECK_PROG($1, ${ac_tool_prefix}$2, ${ac_tool_prefix}$2, + ifelse([$3], , [$2], ), $4) +ifelse([$3], , , [ +if test -z "$ac_cv_prog_$1"; then +if test -n "$ac_tool_prefix"; then + AC_CHECK_PROG($1, $2, $2, $3) +else + $1="$3" +fi +fi]) +]) + +dnl Guess the value for the `prefix' variable by looking for +dnl the argument program along PATH and taking its parent. +dnl Example: if the argument is `gcc' and we find /usr/local/gnu/bin/gcc, +dnl set `prefix' to /usr/local/gnu. +dnl This comes too late to find a site file based on the prefix, +dnl and it might use a cached value for the path. +dnl No big loss, I think, since most configures don't use this macro anyway. +dnl AC_PREFIX_PROGRAM(PROGRAM) +AC_DEFUN(AC_PREFIX_PROGRAM, +[if test "x$prefix" = xNONE; then +changequote(<<, >>)dnl +define(<>, translit($1, [a-z], [A-Z]))dnl +changequote([, ])dnl +dnl We reimplement AC_MSG_CHECKING (mostly) to avoid the ... in the middle. +echo $ac_n "checking for prefix by $ac_c" 1>&AC_FD_MSG +AC_PATH_PROG(AC_VAR_NAME, $1) +changequote(<<, >>)dnl + if test -n "$ac_cv_path_<<>>AC_VAR_NAME"; then + prefix=`echo $ac_cv_path_<<>>AC_VAR_NAME|sed 's%/[^/][^/]*//*[^/][^/]*$%%'` +changequote([, ])dnl + fi +fi +undefine([AC_VAR_NAME])dnl +]) + +dnl Try to compile, link and execute TEST-PROGRAM. Set WORKING-VAR to +dnl `yes' if the current compiler works, otherwise set it ti `no'. Set +dnl CROSS-VAR to `yes' if the compiler and linker produce non-native +dnl executables, otherwise set it to `no'. Before calling +dnl `AC_TRY_COMPILER()', call `AC_LANG_*' to set-up for the right +dnl language. +dnl +dnl AC_TRY_COMPILER(TEST-PROGRAM, WORKING-VAR, CROSS-VAR) +AC_DEFUN(AC_TRY_COMPILER, +[cat > conftest.$ac_ext << EOF +ifelse(AC_LANG, [FORTRAN77], , +[ +[#]line __oline__ "configure" +#include "confdefs.h" +]) +[$1] +EOF +if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then + [$2]=yes + # If we can't run a trivial program, we are probably using a cross compiler. + if (./conftest${ac_xexeext}; exit) 2>/dev/null; then + [$3]=no + else + [$3]=yes + fi +else + echo "configure: failed program was:" >&AC_FD_CC + cat conftest.$ac_ext >&AC_FD_CC + [$2]=no +fi +rm -fr conftest*]) + + +dnl ### Checking for libraries + + +dnl AC_TRY_LINK_FUNC(func, action-if-found, action-if-not-found) +dnl Try to link a program that calls FUNC, handling GCC builtins. If +dnl the link succeeds, execute ACTION-IF-FOUND; otherwise, execute +dnl ACTION-IF-NOT-FOUND. + +AC_DEFUN(AC_TRY_LINK_FUNC, +AC_TRY_LINK(dnl +ifelse([$1], [main], , dnl Avoid conflicting decl of main. +[/* Override any gcc2 internal prototype to avoid an error. */ +]ifelse(AC_LANG, CPLUSPLUS, [#ifdef __cplusplus +extern "C" +#endif +])dnl +[/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $1(); +]), +[$1()], +[$2], +[$3])) + + +dnl AC_SEARCH_LIBS(FUNCTION, SEARCH-LIBS [, ACTION-IF-FOUND +dnl [, ACTION-IF-NOT-FOUND [, OTHER-LIBRARIES]]]) +dnl Search for a library defining FUNC, if it's not already available. + +AC_DEFUN(AC_SEARCH_LIBS, +[AC_PREREQ([2.13]) +AC_CACHE_CHECK([for library containing $1], [ac_cv_search_$1], +[ac_func_search_save_LIBS="$LIBS" +ac_cv_search_$1="no" +AC_TRY_LINK_FUNC([$1], [ac_cv_search_$1="none required"]) +test "$ac_cv_search_$1" = "no" && for i in $2; do +LIBS="-l$i $5 $ac_func_search_save_LIBS" +AC_TRY_LINK_FUNC([$1], +[ac_cv_search_$1="-l$i" +break]) +done +LIBS="$ac_func_search_save_LIBS"]) +if test "$ac_cv_search_$1" != "no"; then + test "$ac_cv_search_$1" = "none required" || LIBS="$ac_cv_search_$1 $LIBS" + $3 +else : + $4 +fi]) + + + +dnl AC_CHECK_LIB(LIBRARY, FUNCTION [, ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND +dnl [, OTHER-LIBRARIES]]]) +AC_DEFUN(AC_CHECK_LIB, +[AC_MSG_CHECKING([for $2 in -l$1]) +dnl Use a cache variable name containing both the library and function name, +dnl because the test really is for library $1 defining function $2, not +dnl just for library $1. Separate tests with the same $1 and different $2s +dnl may have different results. +ac_lib_var=`echo $1['_']$2 | sed 'y%./+-%__p_%'` +AC_CACHE_VAL(ac_cv_lib_$ac_lib_var, +[ac_save_LIBS="$LIBS" +LIBS=`echo "-l$1 $5 $LIBS" | sed -e 's/-lc //'` +AC_TRY_LINK(dnl +ifelse(AC_LANG, [FORTRAN77], , +ifelse([$2], [main], , dnl Avoid conflicting decl of main. +[/* Override any gcc2 internal prototype to avoid an error. */ +]ifelse(AC_LANG, CPLUSPLUS, [#ifdef __cplusplus +extern "C" +#endif +])dnl +[/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $2(); +])), + [$2()], + eval "ac_cv_lib_$ac_lib_var=yes", + eval "ac_cv_lib_$ac_lib_var=no") +LIBS="$ac_save_LIBS" +])dnl +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + AC_MSG_RESULT(yes) + ifelse([$3], , +[changequote(, )dnl + ac_tr_lib=HAVE_LIB`echo $1 | sed -e 's/[^a-zA-Z0-9_]/_/g' \ + -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` +changequote([, ])dnl + AC_DEFINE_UNQUOTED($ac_tr_lib) + LIBS="-l$1 $LIBS" +], [$3]) +else + AC_MSG_RESULT(no) +ifelse([$4], , , [$4 +])dnl +fi +]) + +dnl AC_HAVE_LIBRARY(LIBRARY, [, ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND +dnl [, OTHER-LIBRARIES]]]) +AC_DEFUN(AC_HAVE_LIBRARY, +[AC_OBSOLETE([$0], [; instead use AC_CHECK_LIB])dnl +changequote(<<, >>)dnl +define(<>, dnl +patsubst(patsubst($1, <>, <<\1>>), <<-l>>, <<>>))dnl +define(<>, ac_cv_lib_<<>>AC_LIB_NAME)dnl +changequote([, ])dnl +AC_MSG_CHECKING([for -l[]AC_LIB_NAME]) +AC_CACHE_VAL(AC_CV_NAME, +[ac_save_LIBS="$LIBS" +LIBS="-l[]AC_LIB_NAME[] $4 $LIBS" +AC_TRY_LINK( , [main()], AC_CV_NAME=yes, AC_CV_NAME=no) +LIBS="$ac_save_LIBS" +])dnl +AC_MSG_RESULT($AC_CV_NAME) +if test "$AC_CV_NAME" = yes; then + ifelse([$2], , +[AC_DEFINE([HAVE_LIB]translit(AC_LIB_NAME, [a-z], [A-Z])) + LIBS="-l[]AC_LIB_NAME[] $LIBS" +], [$2]) +ifelse([$3], , , [else + $3 +])dnl +fi +undefine([AC_LIB_NAME])dnl +undefine([AC_CV_NAME])dnl +]) + + +dnl ### Examining declarations + + +dnl AC_TRY_CPP(INCLUDES, [ACTION-IF-TRUE [, ACTION-IF-FALSE]]) +AC_DEFUN(AC_TRY_CPP, +[AC_REQUIRE_CPP()dnl +cat > conftest.$ac_ext <&AC_FD_CC + echo "configure: failed program was:" >&AC_FD_CC + cat conftest.$ac_ext >&AC_FD_CC +ifelse([$3], , , [ rm -rf conftest* + $3 +])dnl +fi +rm -f conftest*]) + +dnl AC_EGREP_HEADER(PATTERN, HEADER-FILE, ACTION-IF-FOUND [, +dnl ACTION-IF-NOT-FOUND]) +AC_DEFUN(AC_EGREP_HEADER, +[AC_EGREP_CPP([$1], [#include <$2>], [$3], [$4])]) + +dnl Because this macro is used by AC_PROG_GCC_TRADITIONAL, which must +dnl come early, it is not included in AC_BEFORE checks. +dnl AC_EGREP_CPP(PATTERN, PROGRAM, [ACTION-IF-FOUND [, +dnl ACTION-IF-NOT-FOUND]]) +AC_DEFUN(AC_EGREP_CPP, +[AC_REQUIRE_CPP()dnl +cat > conftest.$ac_ext <&AC_FD_CC | +dnl Prevent m4 from eating character classes: +changequote(, )dnl + egrep "$1" >/dev/null 2>&1; then +changequote([, ])dnl + ifelse([$3], , :, [rm -rf conftest* + $3]) +ifelse([$4], , , [else + rm -rf conftest* + $4 +])dnl +fi +rm -f conftest* +]) + + +dnl ### Examining syntax + + +dnl AC_TRY_COMPILE(INCLUDES, FUNCTION-BODY, +dnl [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]) +AC_DEFUN(AC_TRY_COMPILE, +[cat > conftest.$ac_ext <&AC_FD_CC + cat conftest.$ac_ext >&AC_FD_CC +ifelse([$4], , , [ rm -rf conftest* + $4 +])dnl +fi +rm -f conftest*]) + + +dnl AC_TRY_COMPILE2(INCLUDES, FUNCTION-BODY, +dnl [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]) +AC_DEFUN(AC_TRY_COMPILE2, +[cat > conftest2.$ac_ext <&AC_FD_CC + cat conftest.$ac_ext >&AC_FD_CC +ifelse([$4], , , [$4 +])dnl +fi +]) + + +dnl ### Examining libraries + + +dnl AC_COMPILE_CHECK(ECHO-TEXT, INCLUDES, FUNCTION-BODY, +dnl ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]) +AC_DEFUN(AC_COMPILE_CHECK, +[AC_OBSOLETE([$0], [; instead use AC_TRY_COMPILE or AC_TRY_LINK, and AC_MSG_CHECKING and AC_MSG_RESULT])dnl +ifelse([$1], , , [AC_CHECKING([for $1]) +])dnl +AC_TRY_LINK([$2], [$3], [$4], [$5]) +]) + +dnl AC_TRY_LINK(INCLUDES, FUNCTION-BODY, +dnl [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]) +AC_DEFUN(AC_TRY_LINK, +[cat > conftest.$ac_ext <&AC_FD_CC + cat conftest.$ac_ext >&AC_FD_CC +ifelse([$4], , , [ rm -rf conftest* + $4 +])dnl +fi +rm -f conftest*]) + + +dnl ### Checking for run-time features + + +dnl AC_TRY_RUN(PROGRAM, [ACTION-IF-TRUE [, ACTION-IF-FALSE +dnl [, ACTION-IF-CROSS-COMPILING]]]) +AC_DEFUN(AC_TRY_RUN, +[if test "$cross_compiling" = yes; then + ifelse([$4], , + [errprint(__file__:__line__: warning: [AC_TRY_RUN] called without default to allow cross compiling +)dnl + AC_MSG_ERROR(can not run test program while cross compiling)], + [$4]) +else + AC_TRY_RUN_NATIVE([$1], [$2], [$3]) +fi +]) + +dnl Like AC_TRY_RUN but assumes a native-environment (non-cross) compiler. +dnl AC_TRY_RUN_NATIVE(PROGRAM, [ACTION-IF-TRUE [, ACTION-IF-FALSE]]) +AC_DEFUN(AC_TRY_RUN_NATIVE, +[cat > conftest.$ac_ext </dev/null +then +dnl Don't remove the temporary files here, so they can be examined. + ifelse([$2], , :, [$2]) +else + echo "configure: failed program was:" >&AC_FD_CC + cat conftest.$ac_ext >&AC_FD_CC +ifelse([$3], , , [ rm -fr conftest* + $3 +])dnl +fi +rm -fr conftest*]) + + +dnl ### Checking for header files + + +dnl AC_CHECK_HEADER(HEADER-FILE, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]) +AC_DEFUN(AC_CHECK_HEADER, +[dnl Do the transliteration at runtime so arg 1 can be a shell variable. +ac_safe=`echo "$1" | sed 'y%./+-%__p_%'` +AC_MSG_CHECKING([for $1]) +AC_CACHE_VAL(ac_cv_header_$ac_safe, +[AC_TRY_CPP([#include <$1>], eval "ac_cv_header_$ac_safe=yes", + eval "ac_cv_header_$ac_safe=no")])dnl +if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then + AC_MSG_RESULT(yes) + ifelse([$2], , :, [$2]) +else + AC_MSG_RESULT(no) +ifelse([$3], , , [$3 +])dnl +fi +]) + +dnl AC_CHECK_HEADERS(HEADER-FILE... [, ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]) +AC_DEFUN(AC_CHECK_HEADERS, +[for ac_hdr in $1 +do +AC_CHECK_HEADER($ac_hdr, +[changequote(, )dnl + ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` +changequote([, ])dnl + AC_DEFINE_UNQUOTED($ac_tr_hdr) $2], $3)dnl +done +]) + + +dnl ### Checking for the existence of files + +dnl AC_CHECK_FILE(FILE, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]) +AC_DEFUN(AC_CHECK_FILE, +[AC_REQUIRE([AC_PROG_CC]) +dnl Do the transliteration at runtime so arg 1 can be a shell variable. +ac_safe=`echo "$1" | sed 'y%./+-%__p_%'` +AC_MSG_CHECKING([for $1]) +AC_CACHE_VAL(ac_cv_file_$ac_safe, +[if test "$cross_compiling" = yes; then + errprint(__file__:__line__: warning: Cannot check for file existence when cross compiling +)dnl + AC_MSG_ERROR(Cannot check for file existence when cross compiling) +else + if $rmttest -r $1; then + eval "ac_cv_file_$ac_safe=yes" + else + eval "ac_cv_file_$ac_safe=no" + fi +fi])dnl +if eval "test \"`echo '$ac_cv_file_'$ac_safe`\" = yes"; then + AC_MSG_RESULT(yes) + ifelse([$2], , :, [$2]) +else + AC_MSG_RESULT(no) +ifelse([$3], , , [$3]) +fi +]) + +dnl AC_CHECK_FILES(FILE... [, ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]) +AC_DEFUN(AC_CHECK_FILES, +[for ac_file in $1 +do +AC_CHECK_FILE($ac_file, +[changequote(, )dnl + ac_tr_file=HAVE_`echo $ac_file | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` +changequote([, ])dnl + AC_DEFINE_UNQUOTED($ac_tr_file) $2], $3)dnl +done +]) + + +dnl ### Checking for library functions + + +dnl AC_CHECK_FUNC(FUNCTION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]) +AC_DEFUN(AC_CHECK_FUNC, +[AC_MSG_CHECKING([for $1]) +AC_CACHE_VAL(ac_cv_func_$1, +[AC_TRY_LINK( +dnl Don't include because on OSF/1 3.0 it includes +dnl which includes which contains a prototype for +dnl select. Similarly for bzero. +[/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $1(); below. */ +#include +/* Override any gcc2 internal prototype to avoid an error. */ +]ifelse(AC_LANG, CPLUSPLUS, [#ifdef __cplusplus +extern "C" +#endif +])dnl +[/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $1(); +], [ +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$1) || defined (__stub___$1) +choke me +#else +$1(); +#endif +], eval "ac_cv_func_$1=yes", eval "ac_cv_func_$1=no")]) +if eval "test \"`echo '$ac_cv_func_'$1`\" = yes"; then + AC_MSG_RESULT(yes) + ifelse([$2], , :, [$2]) +else + AC_MSG_RESULT(no) +ifelse([$3], , , [$3 +])dnl +fi +]) + +dnl AC_CHECK_FUNCS(FUNCTION... [, ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]) +AC_DEFUN(AC_CHECK_FUNCS, +[for ac_func in $1 +do +AC_CHECK_FUNC($ac_func, +[changequote(, )dnl + ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` +changequote([, ])dnl + AC_DEFINE_UNQUOTED($ac_tr_func) $2], $3)dnl +done +]) + +dnl AC_REPLACE_FUNCS(FUNCTION...) +AC_DEFUN(AC_REPLACE_FUNCS, +[AC_CHECK_FUNCS([$1], , [LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"]) +AC_SUBST(LIBOBJS)dnl +]) + + +dnl ### Raw Checking for the pure existence of library functions + + +dnl AC_RCHECK_FUNC(FUNCTION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]) +AC_DEFUN(AC_RCHECK_FUNC, +[AC_MSG_CHECKING([for raw availability of $1]) +AC_CACHE_VAL(ac_cv_rfunc_$1, +[AC_TRY_LINK( +dnl Don't include because on OSF/1 3.0 it includes +dnl which includes which contains a prototype for +dnl select. Similarly for bzero. +[/* Override any gcc2 internal prototype to avoid an error. */ +]ifelse(AC_LANG, CPLUSPLUS, [#ifdef __cplusplus +extern "C" +#endif +])dnl +[/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $1(); +], [ +$1(); +], eval "ac_cv_rfunc_$1=yes", eval "ac_cv_rfunc_$1=no")]) +if eval "test \"`echo '$ac_cv_rfunc_'$1`\" = yes"; then + AC_MSG_RESULT(yes) + ifelse([$2], , :, [$2]) +else + AC_MSG_RESULT(no) +ifelse([$3], , , [$3 +])dnl +fi +]) + +dnl AC_RCHECK_FUNCS(FUNCTION... [, ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]) +AC_DEFUN(AC_RCHECK_FUNCS, +[for ac_func in $1 +do +AC_RCHECK_FUNC($ac_func, +[changequote(, )dnl + ac_tr_func=HAVE_RAW_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` +changequote([, ])dnl + AC_DEFINE_UNQUOTED($ac_tr_func) $2], $3)dnl +done +]) + + +dnl ### Checking compiler characteristics + + +dnl AC_CHECK_SIZEOF(TYPE [, CROSS-SIZE]) +AC_DEFUN(AC_CHECK_SIZEOF, +[changequote(<<, >>)dnl +dnl The name to #define. +define(<>, translit(sizeof_$1, [a-z *], [A-Z_P]))dnl +dnl The cache variable name. +define(<>, translit(ac_cv_sizeof_$1, [ *], [_p]))dnl +changequote([, ])dnl +AC_MSG_CHECKING(size of $1) +AC_CACHE_VAL(AC_CV_NAME, +[AC_TRY_RUN([#include +#if HAVE_STDDEF_H || STDC_HEADERS +#include /* For ptrdiff_t, wchar_t, size_t */ +#endif +#ifdef HAVE_SYS_TYPES_H +#include +#endif +main() +{ + FILE *f=fopen("conftestval", "w"); + if (!f) exit(1); + fprintf(f, "%d\n", sizeof($1)); + exit(0); +}], AC_CV_NAME=`cat conftestval`, AC_CV_NAME=0, ifelse([$2], , , AC_CV_NAME=$2))])dnl +AC_MSG_RESULT($AC_CV_NAME) +AC_DEFINE_UNQUOTED(AC_TYPE_NAME, $AC_CV_NAME) +undefine([AC_TYPE_NAME])dnl +undefine([AC_CV_NAME])dnl +]) + + +dnl ### Checking for typedefs + + +dnl AC_CHECK_TYPE(TYPE, DEFAULT) +AC_DEFUN(AC_CHECK_TYPE, +[AC_REQUIRE([AC_HEADER_STDC])dnl +AC_MSG_CHECKING(for $1) +AC_CACHE_VAL(ac_cv_type_$1, +[AC_EGREP_CPP(dnl +changequote(<<,>>)dnl +<<(^|[^a-zA-Z_0-9])$1[^a-zA-Z_0-9]>>dnl +changequote([,]), [#include +#if HAVE_STDLIB_H || STDC_HEADERS +#include +#endif +#if HAVE_STDDEF_H || STDC_HEADERS +#include +#endif], ac_cv_type_$1=yes, ac_cv_type_$1=no)])dnl +AC_MSG_RESULT($ac_cv_type_$1) +if test $ac_cv_type_$1 = no; then + AC_DEFINE($1, $2) +fi +]) + +dnl AC_INCL_CHECK_TYPE(INCLUDES, TYPE, DEFAULT) +AC_DEFUN(AC_INCL_CHECK_TYPE, +[AC_REQUIRE([AC_HEADER_STDC])dnl +AC_MSG_CHECKING(for $2) +AC_CACHE_VAL(ac_cv_type_$2, +[AC_EGREP_CPP(dnl +changequote(<<,>>)dnl +<<(^|[^a-zA-Z_0-9])$2[^a-zA-Z_0-9]>>dnl +changequote([,]), [#include +#if HAVE_STDLIB_H || STDC_HEADERS +#include +#endif +#if HAVE_STDDEF_H || STDC_HEADERS +#include +#endif +$1], ac_cv_type_$2=yes, ac_cv_type_$2=no)])dnl +AC_MSG_RESULT($ac_cv_type_$2) +if test $ac_cv_type_$2 = no; then + AC_DEFINE($2, $3) +fi +]) + + +dnl ### Creating output files + + +dnl AC_CONFIG_HEADER(HEADER-TO-CREATE ...) +AC_DEFUN(AC_CONFIG_HEADER, +[define(AC_LIST_HEADER, $1)]) + +dnl Link each of the existing files SOURCE... to the corresponding +dnl link name in DEST... +dnl AC_LINK_FILES(SOURCE..., DEST...) +AC_DEFUN(AC_LINK_FILES, +[dnl +define([AC_LIST_FILES], ifdef([AC_LIST_FILES], [AC_LIST_FILES ],)[$1])dnl +define([AC_LIST_LINKS], ifdef([AC_LIST_LINKS], [AC_LIST_LINKS ],)[$2])]) + +dnl Add additional commands for AC_OUTPUT to put into config.status. +dnl Use diversions instead of macros so we can be robust in the +dnl presence of commas in $1 and/or $2. +dnl AC_OUTPUT_COMMANDS(EXTRA-CMDS, INIT-CMDS) +AC_DEFUN(AC_OUTPUT_COMMANDS, +[AC_DIVERT_PUSH(AC_DIVERSION_CMDS)dnl +[$1] +AC_DIVERT_POP()dnl +AC_DIVERT_PUSH(AC_DIVERSION_ICMDS)dnl +[$2] +AC_DIVERT_POP()]) + +dnl AC_CONFIG_SUBDIRS(DIR ...) +AC_DEFUN(AC_CONFIG_SUBDIRS, +[AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl +define([AC_LIST_SUBDIRS], ifdef([AC_LIST_SUBDIRS], [AC_LIST_SUBDIRS ],)[$1])dnl +subdirs="AC_LIST_SUBDIRS" +AC_SUBST(subdirs)dnl +]) + +dnl The big finish. +dnl Produce config.status, config.h, and links; and configure subdirs. +dnl AC_OUTPUT([FILE...] [, EXTRA-CMDS] [, INIT-CMDS]) +define(AC_OUTPUT, +[trap '' 1 2 15 +AC_CACHE_SAVE +trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15 + +test "x$prefix" = xNONE && prefix=$ac_default_prefix +# Let make expand exec_prefix. +test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' + +# Any assignment to VPATH causes Sun make to only execute +# the first set of double-colon rules, so remove it if not needed. +# If there is a colon in the path, we need to keep it. +if test "x$srcdir" = x.; then +changequote(, )dnl + ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d' +changequote([, ])dnl +fi + +trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15 + +ifdef([AC_LIST_HEADER], [DEFS=-DHAVE_CONFIG_H], [AC_OUTPUT_MAKE_DEFS()]) + +# Without the "./", some shells look in PATH for config.status. +: ${CONFIG_STATUS=./config.status} + +echo creating $CONFIG_STATUS +rm -f $CONFIG_STATUS +cat > $CONFIG_STATUS </dev/null | sed 1q`: +# +[#] [$]0 [$]ac_configure_args +# +# Compiler output produced by configure, useful for debugging +# configure, is in ./config.log if it exists. + +changequote(, )dnl +ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]" +changequote([, ])dnl +for ac_option +do + case "[\$]ac_option" in + -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) + echo "running [\$]{CONFIG_SHELL-/bin/sh} [$]0 [$]ac_configure_args --no-create --no-recursion" + exec [\$]{CONFIG_SHELL-/bin/sh} [$]0 [$]ac_configure_args --no-create --no-recursion ;; + -version | --version | --versio | --versi | --vers | --ver | --ve | --v) + echo "$CONFIG_STATUS generated by autoconf version AC_ACVERSION AC_ACVERSION_SCHILY" + exit 0 ;; + -help | --help | --hel | --he | --h) + echo "[\$]ac_cs_usage"; exit 0 ;; + *) echo "[\$]ac_cs_usage"; exit 1 ;; + esac +done + +ac_given_srcdir=$srcdir +ifdef([AC_PROVIDE_AC_PROG_INSTALL], [ac_given_INSTALL="$INSTALL" +])dnl + +changequote(<<, >>)dnl +ifdef(<>, +<>, +<>) +changequote([, ])dnl +EOF +cat >> $CONFIG_STATUS <> $CONFIG_STATUS <> $CONFIG_STATUS <<\EOF +undivert(AC_DIVERSION_CMDS)dnl +$2 +exit 0 +EOF +chmod +x $CONFIG_STATUS +rm -fr confdefs* $ac_clean_files +test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1 +dnl config.status should not do recursion. +ifdef([AC_LIST_SUBDIRS], [AC_OUTPUT_SUBDIRS(AC_LIST_SUBDIRS)])dnl +])dnl + +dnl Set the DEFS variable to the -D options determined earlier. +dnl This is a subroutine of AC_OUTPUT. +dnl It is called inside configure, outside of config.status. +dnl AC_OUTPUT_MAKE_DEFS() +define(AC_OUTPUT_MAKE_DEFS, +[# Transform confdefs.h into DEFS. +dnl Using a here document instead of a string reduces the quoting nightmare. +# Protect against shell expansion while executing Makefile rules. +# Protect against Makefile macro expansion. +cat > conftest.defs <<\EOF +changequote(<<, >>)dnl +s%<<#define>> \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%-D\1=\2%g +s%[ `~<<#>>$^&*(){}\\|;'"<>?]%\\&%g +s%\[%\\&%g +s%\]%\\&%g +s%\$%$$%g +changequote([, ])dnl +EOF +DEFS=`sed -f conftest.defs confdefs.h | tr '\012' ' '` +rm -f conftest.defs +]) + +dnl Do the variable substitutions to create the Makefiles or whatever. +dnl This is a subroutine of AC_OUTPUT. It is called inside an unquoted +dnl here document whose contents are going into config.status, but +dnl upon returning, the here document is being quoted. +dnl AC_OUTPUT_FILES(FILE...) +define(AC_OUTPUT_FILES, +[# Protect against being on the right side of a sed subst in config.status. +changequote(, )dnl +sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g; + s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF +changequote([, ])dnl +dnl These here document variables are unquoted when configure runs +dnl but quoted when config.status runs, so variables are expanded once. +$ac_vpsub +dnl Shell code in configure.in might set extrasub. +$extrasub +dnl Insert the sed substitutions of variables. +undivert(AC_DIVERSION_SED) +CEOF +EOF + +cat >> $CONFIG_STATUS <<\EOF + +# Split the substitutions into bite-sized pieces for seds with +# small command number limits, like on Digital OSF/1 and HP-UX. +ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script. +ac_file=1 # Number of current file. +ac_beg=1 # First line for current file. +ac_end=$ac_max_sed_cmds # Line after last line for current file. +ac_more_lines=: +ac_sed_cmds="" +while $ac_more_lines; do + if test $ac_beg -gt 1; then + sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file + else + sed "${ac_end}q" conftest.subs > conftest.s$ac_file + fi + if test ! -s conftest.s$ac_file; then + ac_more_lines=false + rm -f conftest.s$ac_file + else + if test -z "$ac_sed_cmds"; then + ac_sed_cmds="sed -f conftest.s$ac_file" + else + ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file" + fi + ac_file=`expr $ac_file + 1` + ac_beg=$ac_end + ac_end=`expr $ac_end + $ac_max_sed_cmds` + fi +done +if test -z "$ac_sed_cmds"; then + ac_sed_cmds=cat +fi +EOF + +cat >> $CONFIG_STATUS <> $CONFIG_STATUS <<\EOF +for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then +changequote(, )dnl + # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". + case "$ac_file" in + *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'` + ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; + *) ac_file_in="${ac_file}.in" ;; + esac + + # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories. + + # Remove last slash and all that follows it. Not all systems have dirname. + ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'` +changequote([, ])dnl + if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then + # The file is in a subdirectory. + test ! -d "$ac_dir" && mkdir "$ac_dir" + ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`" + # A "../" for each directory in $ac_dir_suffix. +changequote(, )dnl + ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'` +changequote([, ])dnl + else + ac_dir_suffix= ac_dots= + fi + + case "$ac_given_srcdir" in + .) srcdir=. + if test -z "$ac_dots"; then top_srcdir=. + else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;; + /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;; + *) # Relative path. + srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix" + top_srcdir="$ac_dots$ac_given_srcdir" ;; + esac + +ifdef([AC_PROVIDE_AC_PROG_INSTALL], +[ case "$ac_given_INSTALL" in +changequote(, )dnl + [/$]*) INSTALL="$ac_given_INSTALL" ;; +changequote([, ])dnl + *) INSTALL="$ac_dots$ac_given_INSTALL" ;; + esac +])dnl + + echo creating "$ac_file" + rm -f "$ac_file" + configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure." + case "$ac_file" in + *Makefile*) ac_comsub="1i\\ +# $configure_input" ;; + *) ac_comsub= ;; + esac + + ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"` + sed -e "$ac_comsub +s%@configure_input@%$configure_input%g +s%@srcdir@%$srcdir%g +s%@top_srcdir@%$top_srcdir%g +ifdef([AC_PROVIDE_AC_PROG_INSTALL], [s%@INSTALL@%$INSTALL%g +])dnl +dnl The parens around the eval prevent an "illegal io" in Ultrix sh. +" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file +dnl This would break Makefile dependencies. +dnl if cmp -s $ac_file conftest.out 2>/dev/null; then +dnl echo "$ac_file is unchanged" +dnl rm -f conftest.out +dnl else +dnl rm -f $ac_file +dnl mv conftest.out $ac_file +dnl fi +fi; done +rm -f conftest.s* +]) + +dnl Create the config.h files from the config.h.in files. +dnl This is a subroutine of AC_OUTPUT. It is called inside a quoted +dnl here document whose contents are going into config.status. +dnl AC_OUTPUT_HEADER(HEADER-FILE...) +define(AC_OUTPUT_HEADER, +[changequote(<<, >>)dnl +# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where +# NAME is the cpp macro being defined and VALUE is the value it is being given. +# +# ac_d sets the value in "#define NAME VALUE" lines. +ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)' +ac_dB='\([ ][ ]*\)[^ ]*%\1#\2' +ac_dC='\3' +ac_dD='%g' +# ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE". +ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' +ac_uB='\([ ]\)%\1#\2define\3' +ac_uC=' ' +ac_uD='\4%g' +# ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE". +ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' +ac_eB='<<$>>%\1#\2define\3' +ac_eC=' ' +ac_eD='%g' +changequote([, ])dnl + +if test "${CONFIG_HEADERS+set}" != set; then +EOF +dnl Support passing AC_CONFIG_HEADER a value containing shell variables. +cat >> $CONFIG_STATUS <> $CONFIG_STATUS <<\EOF +fi +for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then +changequote(, )dnl + # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". + case "$ac_file" in + *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'` + ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; + *) ac_file_in="${ac_file}.in" ;; + esac +changequote([, ])dnl + + echo creating $ac_file + + rm -f conftest.frag conftest.in conftest.out + ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"` + cat $ac_file_inputs > conftest.in + +EOF + +# Transform confdefs.h into a sed script conftest.vals that substitutes +# the proper values into config.h.in to produce config.h. And first: +# Protect against being on the right side of a sed subst in config.status. +# Protect against being in an unquoted here document in config.status. +rm -f conftest.vals +dnl Using a here document instead of a string reduces the quoting nightmare. +dnl Putting comments in sed scripts is not portable. +cat > conftest.hdr <<\EOF +changequote(<<, >>)dnl +s/[\\&%]/\\&/g +s%[\\$`]%\\&%g +s%<<#define>> \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp +s%ac_d%ac_u%gp +s%ac_u%ac_e%gp +changequote([, ])dnl +EOF +sed -n -f conftest.hdr confdefs.h > conftest.vals +rm -f conftest.hdr + +# This sed command replaces #undef with comments. This is necessary, for +# example, in the case of _POSIX_SOURCE, which is predefined and required +# on some systems where configure will not decide to define it. +cat >> conftest.vals <<\EOF +changequote(, )dnl +s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */% +changequote([, ])dnl +EOF + +# Break up conftest.vals because some shells have a limit on +# the size of here documents, and old seds have small limits too. + +rm -f conftest.tail +while : +do + ac_lines=`grep -c . conftest.vals` + # grep -c gives empty output for an empty file on some AIX systems. + if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi + # Write a limited-size here document to conftest.frag. + echo ' cat > conftest.frag <> $CONFIG_STATUS + sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS + echo 'CEOF + sed -f conftest.frag conftest.in > conftest.out + rm -f conftest.in + mv conftest.out conftest.in +' >> $CONFIG_STATUS + sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail + rm -f conftest.vals + mv conftest.tail conftest.vals +done +rm -f conftest.vals + +dnl Now back to your regularly scheduled config.status. +cat >> $CONFIG_STATUS <<\EOF + rm -f conftest.frag conftest.h + echo "/* $ac_file. Generated automatically by configure. */" > conftest.h + cat conftest.in >> conftest.h + rm -f conftest.in + if cmp -s $ac_file conftest.h 2>/dev/null; then + echo "$ac_file is unchanged" + rm -f conftest.h + else + # Remove last slash and all that follows it. Not all systems have dirname. + changequote(, )dnl + ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'` + changequote([, ])dnl + if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then + # The file is in a subdirectory. + test ! -d "$ac_dir" && mkdir "$ac_dir" + fi + rm -f $ac_file + mv conftest.h $ac_file + fi +fi; done + +]) + +dnl This is a subroutine of AC_OUTPUT. It is called inside a quoted +dnl here document whose contents are going into config.status. +dnl AC_OUTPUT_LINKS(SOURCE..., DEST...) +define(AC_OUTPUT_LINKS, +[EOF + +cat >> $CONFIG_STATUS <> $CONFIG_STATUS <<\EOF +srcdir=$ac_given_srcdir +while test -n "$ac_sources"; do + set $ac_dests; ac_dest=[$]1; shift; ac_dests=[$]* + set $ac_sources; ac_source=[$]1; shift; ac_sources=[$]* + + echo "linking $srcdir/$ac_source to $ac_dest" + + if test ! -r $srcdir/$ac_source; then + AC_MSG_ERROR($srcdir/$ac_source: File not found) + fi + rm -f $ac_dest + + # Make relative symlinks. + # Remove last slash and all that follows it. Not all systems have dirname. +changequote(, )dnl + ac_dest_dir=`echo $ac_dest|sed 's%/[^/][^/]*$%%'` +changequote([, ])dnl + if test "$ac_dest_dir" != "$ac_dest" && test "$ac_dest_dir" != .; then + # The dest file is in a subdirectory. + test ! -d "$ac_dest_dir" && mkdir "$ac_dest_dir" + ac_dest_dir_suffix="/`echo $ac_dest_dir|sed 's%^\./%%'`" + # A "../" for each directory in $ac_dest_dir_suffix. +changequote(, )dnl + ac_dots=`echo $ac_dest_dir_suffix|sed 's%/[^/]*%../%g'` +changequote([, ])dnl + else + ac_dest_dir_suffix= ac_dots= + fi + + case "$srcdir" in +changequote(, )dnl + [/$]*) ac_rel_source="$srcdir/$ac_source" ;; +changequote([, ])dnl + *) ac_rel_source="$ac_dots$srcdir/$ac_source" ;; + esac + + # Make a symlink if possible; otherwise try a hard link. + if ln -s $ac_rel_source $ac_dest 2>/dev/null || + ln $srcdir/$ac_source $ac_dest; then : + else + AC_MSG_ERROR(can not link $ac_dest to $srcdir/$ac_source) + fi +done +]) + +dnl This is a subroutine of AC_OUTPUT. +dnl It is called after running config.status. +dnl AC_OUTPUT_SUBDIRS(DIRECTORY...) +define(AC_OUTPUT_SUBDIRS, +[ +if test "$no_recursion" != yes; then + + # Remove --cache-file and --srcdir arguments so they do not pile up. + ac_sub_configure_args= + ac_prev= + for ac_arg in $ac_configure_args; do + if test -n "$ac_prev"; then + ac_prev= + continue + fi + case "$ac_arg" in + -cache-file | --cache-file | --cache-fil | --cache-fi \ + | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) + ac_prev=cache_file ;; + -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ + | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) + ;; + -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) + ac_prev=srcdir ;; + -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) + ;; + *) ac_sub_configure_args="$ac_sub_configure_args $ac_arg" ;; + esac + done + + for ac_config_dir in $1; do + + # Do not complain, so a configure script can configure whichever + # parts of a large source tree are present. + if test ! -d $srcdir/$ac_config_dir; then + continue + fi + + echo configuring in $ac_config_dir + + case "$srcdir" in + .) ;; + *) + if test -d ./$ac_config_dir || mkdir ./$ac_config_dir; then :; + else + AC_MSG_ERROR(can not create `pwd`/$ac_config_dir) + fi + ;; + esac + + ac_popdir=`pwd` + cd $ac_config_dir + +changequote(, )dnl + # A "../" for each directory in /$ac_config_dir. + ac_dots=`echo $ac_config_dir|sed -e 's%^\./%%' -e 's%[^/]$%&/%' -e 's%[^/]*/%../%g'` +changequote([, ])dnl + + case "$srcdir" in + .) # No --srcdir option. We are building in place. + ac_sub_srcdir=$srcdir ;; + /*) # Absolute path. + ac_sub_srcdir=$srcdir/$ac_config_dir ;; + *) # Relative path. + ac_sub_srcdir=$ac_dots$srcdir/$ac_config_dir ;; + esac + + # Check for guested configure; otherwise get Cygnus style configure. + if test -f $ac_sub_srcdir/configure; then + ac_sub_configure=$ac_sub_srcdir/configure + elif test -f $ac_sub_srcdir/configure.in; then + ac_sub_configure=$ac_configure + else + AC_MSG_WARN(no configuration information is in $ac_config_dir) + ac_sub_configure= + fi + + # The recursion is here. + if test -n "$ac_sub_configure"; then + + # Make the cache file name correct relative to the subdirectory. + case "$cache_file" in + /*) ac_sub_cache_file=$cache_file ;; + *) # Relative path. + ac_sub_cache_file="$ac_dots$cache_file" ;; + esac +ifdef([AC_PROVIDE_AC_PROG_INSTALL], + [ case "$ac_given_INSTALL" in +changequote(, )dnl + [/$]*) INSTALL="$ac_given_INSTALL" ;; +changequote([, ])dnl + *) INSTALL="$ac_dots$ac_given_INSTALL" ;; + esac +])dnl + + echo "[running ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file] --srcdir=$ac_sub_srcdir" + # The eval makes quoting arguments work. + if eval ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir + then : + else + AC_MSG_ERROR($ac_sub_configure failed for $ac_config_dir) + fi + fi + + cd $ac_popdir + done +fi +]) diff -Nru cdrtools-2.01.01a33/autoconf/aclocal.m4 cdrtools-3.02a09/autoconf/aclocal.m4 --- cdrtools-2.01.01a33/autoconf/aclocal.m4 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/autoconf/aclocal.m4 2017-06-28 18:18:37.000000000 +0000 @@ -0,0 +1,3500 @@ +dnl @(#)aclocal.m4 1.109 17/06/28 Copyright 1998-2015 J. Schilling + +dnl Set VARIABLE to VALUE in C-string form, verbatim, or 1. +dnl AC_DEFINE_STRING(VARIABLE [, VALUE]) +define(AC_DEFINE_STRING, +[cat >> confdefs.h <<\EOF +[#define] $1 ifelse($#, 2, "[$2]", $#, 3, "[$2]", 1) +EOF +]) + +dnl Similar, but perform shell substitutions $ ` \ once on VALUE. +define(AC_DEFINE_UNQUOTED_STRING, +[cat >> confdefs.h <>)dnl +<<(^|[^a-zA-Z_0-9])$2[^a-zA-Z_0-9]>>dnl +changequote([,]), [#include +#if HAVE_STDLIB_H || STDC_HEADERS +#include +#endif +#if HAVE_STDDEF_H || STDC_HEADERS +#include +#endif +$1], eval ac_cv_have_type_$2=yes, eval ac_cv_have_type_$2=no)])dnl +AC_MSG_RESULT($ac_cv_have_type_$2) +changequote(, )dnl + ac_tr_type=HAVE_TYPE_`echo $2 | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` +changequote([, ])dnl +if test $ac_cv_have_type_$2 = yes; then + AC_DEFINE_UNQUOTED($ac_tr_type) +fi +]) + +AC_DEFUN(AC_ICONV_CONST, +[AC_CACHE_CHECK(whether iconv() uses const char **, ac_cv_iconv_const, +[cat > conftest.c < +EOF +if AC_TRY_COMMAND(${CC-cc} -E conftest.c) | grep 'size_t.*iconv.*iconv_t.*const' >/dev/null 2>&1; then + ac_cv_iconv_const=yes +else + ac_cv_iconv_const=no +fi]) +if test $ac_cv_iconv_const = yes; then + AC_DEFINE(HAVE_ICONV_CONST) +fi]) + +AC_DEFUN(AC_PROG_CPPX, +[AC_REQUIRE([AC_PROG_CPP])dnl +AC_MSG_CHECKING(how to run the C preprocessor for any type of file) +if test -z "$CPPX"; then +AC_CACHE_VAL(ac_cv_prog_CPPX, +[ # This must be in double quotes, not single quotes, because CPP may get + # substituted into the Makefile and "${CC-cc}" will confuse make. + CPPX="$CPP" + cat > conftestcpp << EOF + xxzzy +EOF + # gcc -E does not accept any file suffix, so we need to test + # and if $CC -E fails, we try to use dirname(which($CC))/cpp + # We cannot use AC_TRY_EVAL(CPPX conftestcpp | grep xxzzy) because + # of a bug in the parser from bash + ac_result=`(echo configure:1288: "$CPPX conftestcpp | grep xxzzy" 1>&5; eval $CPPX conftestcpp | grep xxzzy) 2>&5` + if test -z "$ac_result"; then + changequote(, )dnl + ac_file=`eval type ${CC-cc} 2>/dev/null | sed 's%[^/]*/%/%'` + # Remove last slash and all that follows it. Not all systems have dirname. + ac_dir=`echo "$ac_file" | sed 's%/[^/][^/]*$%%'` + changequote([, ])dnl + if test -f "$ac_dir"/cpp; then + CPPX="$ac_dir"/cpp + fi + fi + ac_cv_prog_CPPX="$CPPX"])dnl + CPPX="$ac_cv_prog_CPPX" +else + ac_cv_prog_CPPX="$CPPX" +fi +AC_MSG_RESULT($CPPX) +AC_SUBST(CPPX)dnl +]) + +dnl Checks if /bin/sh is bash +dnl Defines BIN_SHELL_IS_BASH on success. +AC_DEFUN([AC_BIN_SHELL_BASH], +[AC_CACHE_CHECK([if /bin/sh is bash], ac_cv_bin_shell_is_bash, + [ +ac_err=`< /dev/null /bin/sh --version 2> /dev/null | egrep 'GNU sh|bash'` +if test -n "$ac_err"; then + ac_cv_bin_shell_is_bash=yes +else + ac_cv_bin_shell_is_bash=no +fi +]) +if test $ac_cv_bin_shell_is_bash = yes; then + AC_DEFINE(BIN_SHELL_IS_BASH) +fi]) + +dnl Checks if sh is bash +dnl Defines SHELL_IS_BASH on success. +AC_DEFUN([AC_SHELL_BASH], +[AC_CACHE_CHECK([if sh is bash], ac_cv_shell_is_bash, + [ +ac_err=`< /dev/null sh --version 2> /dev/null | egrep 'GNU sh|bash'` +if test -n "$ac_err"; then + ac_cv_shell_is_bash=yes +else + ac_cv_shell_is_bash=no +fi +]) +if test $ac_cv_shell_is_bash = yes; then + AC_DEFINE(SHELL_IS_BASH) +fi]) + +dnl Checks if /bin/sh -ce is broken +dnl Defines BIN_SHELL_CE_IS_BROKEN on success. +AC_DEFUN([AC_BIN_SHELL_CE_BROKEN], +[AC_CACHE_CHECK([whether /bin/sh -ce is broken], ac_cv_bin_shell_ce_is_broken, + [ +ac_err=`/bin/sh -ce 'for i in 1 2 3; do ( echo $i; if test -d . ; then (false; echo 4); fi ) ; done' | grep 2` +if test -n "$ac_err"; then + ac_cv_bin_shell_ce_is_broken=yes +else + ac_cv_bin_shell_ce_is_broken=no +fi +]) +if test $ac_cv_bin_shell_ce_is_broken = yes; then + AC_DEFINE(BIN_SHELL_CE_IS_BROKEN) +fi]) + +dnl Checks if /bin/bosh is a working shell +dnl Defines BIN_SHELL_BOSH on success. +AC_DEFUN([AC_BIN_SHELL_BOSH], +[AC_CACHE_CHECK([whether /bin/bosh is a working shell], ac_cv_bin_shell_bosh, + [ +ac_err=`< /dev/null /bin/bosh -c 'echo abc' 2> /dev/null | grep abc` +if test "$ac_err" != "abc"; then + ac_cv_bin_shell_bosh=no +else + ac_err=`/bin/bosh -ce 'for i in 1 2 3; do ( echo $i; if test -d . ; then (false; echo 4); fi ) ; done' | grep 2` + if test -z "$ac_err"; then + ac_cv_bin_shell_bosh=yes + else + ac_cv_bin_shell_bosh=no + fi +fi +]) +if test $ac_cv_bin_shell_bosh = yes; then + AC_DEFINE(BIN_SHELL_BOSH) +fi]) + +dnl Checks if /opt/schily/bin/bosh is a working shell +dnl Defines OPT_SCHILY_BIN_SHELL_BOSH on success. +AC_DEFUN([AC_OPT_SCHILY_BIN_SHELL_BOSH], +[AC_CACHE_CHECK([whether /opt/schily/bin/bosh is a working shell], ac_cv_opt_schily_bin_shell_bosh, + [ +ac_err=`< /dev/null /opt/schily/bin/bosh -c 'echo abc' 2> /dev/null | grep abc` +if test "$ac_err" != "abc"; then + ac_cv_opt_schily_bin_shell_bosh=no +else + ac_err=`/opt/schily/bin/bosh -ce 'for i in 1 2 3; do ( echo $i; if test -d . ; then (false; echo 4); fi ) ; done' | grep 2` + if test -z "$ac_err"; then + ac_cv_opt_schily_bin_shell_bosh=yes + else + ac_cv_opt_schily_bin_shell_bosh=no + fi +fi +]) +if test $ac_cv_opt_schily_bin_shell_bosh = yes; then + AC_DEFINE(OPT_SCHILY_BIN_SHELL_BOSH) +fi]) + +dnl Checks if sh -ce is broken +dnl Defines SHELL_CE_IS_BROKEN on success. +AC_DEFUN([AC_SHELL_CE_BROKEN], +[AC_CACHE_CHECK([whether sh -ce is broken], ac_cv_shell_ce_is_broken, + [ +ac_err=`sh -ce 'for i in 1 2 3; do ( echo $i; if test -d . ; then (false; echo 4); fi ) ; done' | grep 2` +if test -n "$ac_err"; then + ac_cv_shell_ce_is_broken=yes +else + ac_cv_shell_ce_is_broken=no +fi +]) +if test $ac_cv_shell_ce_is_broken = yes; then + AC_DEFINE(SHELL_CE_IS_BROKEN) +fi]) + +dnl Checks if Sun cc supports -m64 +dnl Defines sun_cc64_opt on success. +AC_DEFUN([AC_SUN_CC64_OPT], +[AC_CACHE_CHECK([if suncc/cc supports -m64], ac_cv_sun_cc64_opt, + [ +sun_cc64=cc +sun_cc64_opt='' +ac_cv_sun_cc64_opt=no +if test "$GCC" != yes; then + if test "$CC" = suncc; then + sun_cc64=suncc + fi + ac_err=`< /dev/null eval $sun_cc64 -m64 -c 2>&1 | grep illegal` + if test -n "$ac_err"; then + ac_cv_sun_cc64_opt=no + else + ac_cv_sun_cc64_opt=yes + fi +fi +]) +if test $ac_cv_sun_cc64_opt = yes; then + sun_cc64_opt='-m64' +fi]) + +dnl Checks if HP cc supports -Ae +dnl Defines hp_cc_ansi_opt on success. +AC_DEFUN([AC_HP_CC_ANSI_OPT], +[AC_CACHE_CHECK([if HP cc supports -Ae], ac_cv_hp_cc_ansi_opt, + [ +hp_cc=cc +hp_cc_ansi_opt='' +ac_cv_hp_cc_ansi_opt=no +if test "$GCC" != yes; then + os_name=`(uname -s) 2> /dev/null` + if test ."$os_name" = .HP-UX ; then + ac_err=`< /dev/null eval $hp_cc -Ae -c 2>&1 | grep 'Bundled.*option is available only'` + if test -n "$ac_err"; then + ac_cv_hp_cc_ansi_opt=no + else + ac_cv_hp_cc_ansi_opt=yes + fi + fi +fi +]) +if test $ac_cv_hp_cc_ansi_opt = yes; then + hp_cc_ansi_opt='-Ae' +fi]) + +dnl Checks if HP cc supports -O +dnl Defines hp_cc_opt_opt on success. +AC_DEFUN([AC_HP_CC_OPT_OPT], +[AC_CACHE_CHECK([if HP cc supports -O], ac_cv_hp_cc_opt_opt, + [ +hp_cc=cc +hp_cc_opt_opt='' +ac_cv_hp_cc_opt_opt=no +if test "$GCC" != yes; then + os_name=`(uname -s) 2> /dev/null` + if test ."$os_name" = .HP-UX ; then + ac_err=`< /dev/null eval $hp_cc -O -c 2>&1 | grep 'Bundled.*option is available only'` + if test -n "$ac_err"; then + ac_cv_hp_cc_opt_opt=no + else + ac_cv_hp_cc_opt_opt=yes + fi + fi +fi +]) +if test $ac_cv_hp_cc_opt_opt = yes; then + hp_cc_opt_opt='-O' +fi]) + +dnl Checks if HP cc supports -G +dnl Defines hp_cc_gprof_opt on success. +AC_DEFUN([AC_HP_CC_GPROF_OPT], +[AC_CACHE_CHECK([if HP cc supports -G], ac_cv_hp_cc_gprof_opt, + [ +hp_cc=cc +hp_cc_gprof_opt='' +ac_cv_hp_cc_gprof_opt=no +if test "$GCC" != yes; then + os_name=`(uname -s) 2> /dev/null` + if test ."$os_name" = .HP-UX ; then + ac_err=`< /dev/null eval $hp_cc -O -c 2>&1 | grep 'Bundled.*option is available only'` + if test -n "$ac_err"; then + ac_cv_hp_cc_gprof_opt=no + else + ac_cv_hp_cc_gprof_opt=yes + fi + fi +fi +]) +if test $ac_cv_hp_cc_gprof_opt = yes; then + hp_cc_gprof_opt='-G' +fi]) + +dnl XXX this used to be: +dnl #ifndef $2 +dnl char *p = (char *) $2; +dnl #endif +dnl but we use this test in order to check whether we are able to get the +dnl address of a function from this name, so we did replace this by: +dnl char *p = (char *) $2; +dnl exit (p != (char *)0 && *p != 0); Prevent optimizer from removing previous line +dnl +dnl AC_CHECK_DECLARE(INCLUDES, SYMBOL) +dnl Checks if symbol is declared +dnl Defines HAVE_DECL_SYMBOL on success. +AC_DEFUN([AC_CHECK_DECLARE], +[AC_CACHE_CHECK([if $2 is declared], ac_cv_have_decl_$2, + [AC_TRY_COMPILE([$1], +[ char *p = (char *) $2; exit (p != (char *)0 && *p != 0); ], + [eval ac_cv_have_decl_$2=yes], + [eval ac_cv_have_decl_$2=no])]) +changequote(, )dnl + ac_tr_decl=HAVE_DECL_`echo $2 | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` +changequote([, ])dnl +if test $ac_cv_have_decl_$2 = yes; then + AC_DEFINE_UNQUOTED($ac_tr_decl) +fi]) + +dnl AC_CHECK_DFUNC(INCLUDES, SYMBOL) +dnl Checks if symbol is defined or a function +dnl Defines HAVE_SYMBOL on success. +AC_DEFUN([AC_CHECK_DFUNC], +[AC_CACHE_CHECK([if $2 is defined or function], ["ac_cv_have_$2"], + [AC_TRY_LINK([$1], +[ +#ifndef $2 + char *p = (char *) $2; + exit (p != (char *)0 && *p != 0); +#endif], + [eval ac_cv_have_$2=yes], + [eval ac_cv_have_$2=no])]) +changequote(, )dnl + ac_tr_dfunc=HAVE_`echo $2 | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` +changequote([, ])dnl +if eval "test \"`echo '$ac_cv_have_'$2`\" = yes"; then + AC_DEFINE_UNQUOTED($ac_tr_dfunc) +fi +]) + +dnl AC_CHECK_DFUNCS(INCLUDES, FUNCTION...) +AC_DEFUN(AC_CHECK_DFUNCS, +[for ac_func in [$2] +do +AC_CHECK_DFUNC([$1], $ac_func)dnl +done +]) + +dnl Checks whether symbol is defined or a function in a lib +dnl AC_CHECK_DLIB(INCLUDES, LIBRARY, FUNCTION [, ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND +dnl [, OTHER-LIBRARIES]]]) +AC_DEFUN(AC_CHECK_DLIB, +[AC_MSG_CHECKING([for $3 in -l$2]) +dnl Use a cache variable name containing both the library and function name, +dnl because the test really is for library $2 defining function $3, not +dnl just for library $2. Separate tests with the same $2 and different $3s +dnl may have different results. +ac_lib_var=`echo $2['_']$3 | sed 'y%./+-%__p_%'` +AC_CACHE_VAL(ac_cv_lib_$ac_lib_var, +[ac_save_LIBS="$LIBS" +LIBS="-l$2 $6 $LIBS" +AC_TRY_LINK([$1], +[ +#ifndef $3 + char *p = (char *) $3; + exit (p != (char *)0 && *p != 0); +#endif], + eval "ac_cv_lib_$ac_lib_var=yes", + eval "ac_cv_lib_$ac_lib_var=no") +LIBS="$ac_save_LIBS" +])dnl +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + AC_MSG_RESULT(yes) + ifelse([$4], , +[changequote(, )dnl + ac_tr_lib=HAVE_LIB`echo $2 | sed -e 's/[^a-zA-Z0-9_]/_/g' \ + -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` +changequote([, ])dnl + AC_DEFINE_UNQUOTED($ac_tr_lib) + LIBS="-l$2 $LIBS" +], [$4]) +else + AC_MSG_RESULT(no) +ifelse([$5], , , [$5 +])dnl +fi +]) + +dnl Checks whether symbol is in a lib +dnl this does not work for void func() +dnl AC_CHECK_ILIB(INCLUDES, LIBRARY, FUNCTION [, ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND +dnl [, OTHER-LIBRARIES]]]) +AC_DEFUN(AC_CHECK_ILIB, +[AC_MSG_CHECKING([for $3 in -l$2]) +dnl Use a cache variable name containing both the library and function name, +dnl because the test really is for library $2 defining function $3, not +dnl just for library $2. Separate tests with the same $2 and different $3s +dnl may have different results. +ac_lib_var=`echo $2['_']$3 | sed 'y%./+-%__p_%'` +AC_CACHE_VAL(ac_cv_lib_$ac_lib_var, +[ac_save_LIBS="$LIBS" +LIBS="-l$2 $6 $LIBS" +AC_TRY_LINK([$1], +[ + char *p = (char *) $3; + + return ((int)p); +], + eval "ac_cv_lib_$ac_lib_var=yes", + eval "ac_cv_lib_$ac_lib_var=no") +LIBS="$ac_save_LIBS" +])dnl +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + AC_MSG_RESULT(yes) + ifelse([$4], , +[changequote(, )dnl + ac_tr_lib=HAVE_LIB`echo $2 | sed -e 's/[^a-zA-Z0-9_]/_/g' \ + -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` +changequote([, ])dnl + AC_DEFINE_UNQUOTED($ac_tr_lib) + LIBS="-l$2 $LIBS" +], [$4]) +else + AC_MSG_RESULT(no) +ifelse([$5], , , [$5 +])dnl +fi +]) + +dnl getpagesize is a inline function in unistd.h on Android +AC_DEFUN([AC_FUNC_GETPAGESIZE], +[AC_CHECK_DFUNC([ +#ifdef HAVE_UNISTD_H +#include +#endif +], getpagesize)]) + + +dnl Checks if structure 'stat' have field 'st_spare1'. +dnl Defines HAVE_ST_SPARE1 on success. +AC_DEFUN([AC_STRUCT_ST_SPARE1], +[AC_CACHE_CHECK([if struct stat contains st_spare1], ac_cv_struct_st_spare1, + [AC_TRY_COMPILE([#include +#include ], + [struct stat s; s.st_spare1 = 0;], + [ac_cv_struct_st_spare1=yes], + [ac_cv_struct_st_spare1=no])]) +if test $ac_cv_struct_st_spare1 = yes; then + AC_DEFINE(HAVE_ST_SPARE1) +fi]) + +dnl Checks if structure 'stat' have field 'st_atimensec'. +dnl Defines HAVE_ST_ATIMENSEC on success. +AC_DEFUN([AC_STRUCT_ST_ATIMENSEC], +[AC_CACHE_CHECK([if struct stat contains st_atimensec], ac_cv_struct_st_atimensec, + [AC_TRY_COMPILE([#include +#include ], + [struct stat s; s.st_atimensec = 0;], + [ac_cv_struct_st_atimensec=yes], + [ac_cv_struct_st_atimensec=no])]) +if test $ac_cv_struct_st_atimensec = yes; then + AC_DEFINE(HAVE_ST_ATIMENSEC) +fi]) + +dnl Checks if structure 'stat' have field 'st_atime_n'. +dnl Defines HAVE_ST_ATIME_N on success. +AC_DEFUN([AC_STRUCT_ST_ATIME_N], +[AC_CACHE_CHECK([if struct stat contains st_atime_n], ac_cv_struct_st_atime_n, + [AC_TRY_COMPILE([#include +#include ], + [struct stat s; s.st_atime_n = 0;], + [ac_cv_struct_st_atime_n=yes], + [ac_cv_struct_st_atime_n=no])]) +if test $ac_cv_struct_st_atime_n = yes; then + AC_DEFINE(HAVE_ST_ATIME_N) +fi]) + +dnl Checks if structure 'stat' have field 'st_atim.tv_nsec'. +dnl Defines HAVE_ST_NSEC on success. +AC_DEFUN([AC_STRUCT_ST_NSEC], +[AC_CACHE_CHECK([if struct stat contains st_atim.tv_nsec], ac_cv_struct_st_nsec, + [AC_TRY_COMPILE([#include +#include ], + [struct stat s; s.st_atim.tv_nsec = 0;], + [ac_cv_struct_st_nsec=yes], + [ac_cv_struct_st_nsec=no])]) +if test $ac_cv_struct_st_nsec = yes; then + AC_DEFINE(HAVE_ST_NSEC) +fi]) + +dnl Checks if structure 'stat' have field 'st_atim.st__tim.tv_nsec'. +dnl Defines HAVE_ST__TIM on success. +AC_DEFUN([AC_STRUCT_ST__TIM], +[AC_CACHE_CHECK([if struct stat contains st_atim.st__tim.tv_nsec], ac_cv_struct_st__tim, + [AC_TRY_COMPILE([#include +#include ], + [struct stat s; s.st_atim.st__tim.tv_nsec = 0;], + [ac_cv_struct_st__tim=yes], + [ac_cv_struct_st__tim=no])]) +if test $ac_cv_struct_st__tim = yes; then + AC_DEFINE(HAVE_ST__TIM) +fi]) + +dnl Checks if structure 'stat' have field 'st_atimspec.tv_nsec'. +dnl Defines HAVE_ST_ATIMESPEC on success. +AC_DEFUN([AC_STRUCT_ST_ATIMESPEC], +[AC_CACHE_CHECK([if struct stat contains st_atimespec.tv_nsec], ac_cv_struct_st_atimespec, + [AC_TRY_COMPILE([#include +#include ], + [struct stat s; s.st_atimespec.tv_nsec = 0;], + [ac_cv_struct_st_atimespec=yes], + [ac_cv_struct_st_atimespec=no])]) +if test $ac_cv_struct_st_atimespec = yes; then + AC_DEFINE(HAVE_ST_ATIMESPEC) +fi]) + +dnl Checks if structure 'stat' have field 'st_flag'. +dnl Defines HAVE_ST_FLAG on success. +AC_DEFUN([AC_STRUCT_ST_FLAG], +[AC_CACHE_CHECK([if struct stat contains st_flag], ac_cv_struct_st_flag, + [AC_TRY_COMPILE([#include +#include ], + [struct stat s; s.st_flag = 0;], + [ac_cv_struct_st_flag=yes], + [ac_cv_struct_st_flag=no])]) +if test $ac_cv_struct_st_flag = yes; then + AC_DEFINE(HAVE_ST_FLAG) +fi]) + +dnl Checks if structure 'stat' have field 'st_flags'. +dnl Defines HAVE_ST_FLAGS on success. +AC_DEFUN([AC_STRUCT_ST_FLAGS], +[AC_CACHE_CHECK([if struct stat contains st_flags], ac_cv_struct_st_flags, + [AC_TRY_COMPILE([#include +#include ], + [struct stat s; s.st_flags = 0;], + [ac_cv_struct_st_flags=yes], + [ac_cv_struct_st_flags=no])]) +if test $ac_cv_struct_st_flags = yes; then + AC_DEFINE(HAVE_ST_FLAGS) +fi]) + +dnl Checks if structure 'stat' have field 'st_fstype'. +dnl Defines HAVE_ST_FSTYPE on success. +AC_DEFUN([AC_STRUCT_ST_FSTYPE], +[AC_CACHE_CHECK([if struct stat contains st_fstype], ac_cv_struct_st_fstype, + [AC_TRY_COMPILE([#include +#include ], + [struct stat s; s.st_fstype[0] = 0;], + [ac_cv_struct_st_fstype=yes], + [ac_cv_struct_st_fstype=no])]) +if test $ac_cv_struct_st_fstype = yes; then + AC_DEFINE(HAVE_ST_FSTYPE) +fi]) + +dnl Checks if structure 'stat' have field 'st_aclcnt'. +dnl Defines HAVE_ST_ACLCNT on success. +AC_DEFUN([AC_STRUCT_ST_ACLCNT], +[AC_CACHE_CHECK([if struct stat contains st_aclcnt], ac_cv_struct_st_aclcnt, + [AC_TRY_COMPILE([#include +#include ], + [struct stat s; s.st_aclcnt = 0;], + [ac_cv_struct_st_aclcnt=yes], + [ac_cv_struct_st_aclcnt=no])]) +if test $ac_cv_struct_st_aclcnt = yes; then + AC_DEFINE(HAVE_ST_ACLCNT) +fi]) + +dnl Checks if structure 'utsname' have field 'arch'. +dnl Defines HAVE_UTSNAME_ARCH on success. +AC_DEFUN([AC_STRUCT_UTSNAME_ARCH], +[AC_CACHE_CHECK([if struct utsname contains arch], ac_cv_struct_utsname_arch, + [AC_TRY_COMPILE([#include ], + [struct utsname u; u.arch[0] = 0;], + [ac_cv_struct_utsname_arch=yes], + [ac_cv_struct_utsname_arch=no])]) +if test $ac_cv_struct_utsname_arch = yes; then + AC_DEFINE(HAVE_UTSNAME_ARCH) +fi]) + +dnl Checks if structure 'utsname' have field 'processor'. +dnl Defines HAVE_UTSNAME_PROCESSOR on success. +AC_DEFUN([AC_STRUCT_UTSNAME_PROCESSOR], +[AC_CACHE_CHECK([if struct utsname contains processor], ac_cv_struct_utsname_processor, + [AC_TRY_COMPILE([#include ], + [struct utsname u; u.processor[0] = 0;], + [ac_cv_struct_utsname_processor=yes], + [ac_cv_struct_utsname_processor=no])]) +if test $ac_cv_struct_utsname_processor = yes; then + AC_DEFINE(HAVE_UTSNAME_PROCESSOR) +fi]) + +dnl Checks if structure 'utsname' have field 'sysname_host'. +dnl Defines HAVE_UTSNAME_SYSNAME_HOST on success. +AC_DEFUN([AC_STRUCT_UTSNAME_SYSNAME_HOST], +[AC_CACHE_CHECK([if struct utsname contains sysname_host], ac_cv_struct_utsname_sysname_host, + [AC_TRY_COMPILE([#include ], + [struct utsname u; u.sysname_host[0] = 0;], + [ac_cv_struct_utsname_sysname_host=yes], + [ac_cv_struct_utsname_sysname_host=no])]) +if test $ac_cv_struct_utsname_sysname_host = yes; then + AC_DEFINE(HAVE_UTSNAME_SYSNAME_HOST) +fi]) + +dnl Checks if structure 'utsname' have field 'release_host'. +dnl Defines HAVE_UTSNAME_RELEASE_HOST on success. +AC_DEFUN([AC_STRUCT_UTSNAME_RELEASE_HOST], +[AC_CACHE_CHECK([if struct utsname contains release_host], ac_cv_struct_utsname_release_host, + [AC_TRY_COMPILE([#include ], + [struct utsname u; u.release_host[0] = 0;], + [ac_cv_struct_utsname_release_host=yes], + [ac_cv_struct_utsname_release_host=no])]) +if test $ac_cv_struct_utsname_release_host = yes; then + AC_DEFINE(HAVE_UTSNAME_RELEASE_HOST) +fi]) + +dnl Checks if structure 'utsname' have field 'version_host'. +dnl Defines HAVE_UTSNAME_VERSION_HOST on success. +AC_DEFUN([AC_STRUCT_UTSNAME_VERSION_HOST], +[AC_CACHE_CHECK([if struct utsname contains version_host], ac_cv_struct_utsname_version_host, + [AC_TRY_COMPILE([#include ], + [struct utsname u; u.version_host[0] = 0;], + [ac_cv_struct_utsname_version_host=yes], + [ac_cv_struct_utsname_version_host=no])]) +if test $ac_cv_struct_utsname_version_host = yes; then + AC_DEFINE(HAVE_UTSNAME_VERSION_HOST) +fi]) + +dnl Checks if structure 'mtget' have field 'mt_type'. +dnl Defines HAVE_MTGET_TYPE on success. +AC_DEFUN([AC_STRUCT_MTGET_TYPE], +[AC_CACHE_CHECK([if struct mtget contains mt_type], ac_cv_struct_mtget_type, + [AC_TRY_COMPILE([#include +#include ], + [struct mtget t; t.mt_type = 0;], + [ac_cv_struct_mtget_type=yes], + [ac_cv_struct_mtget_type=no])]) +if test $ac_cv_struct_mtget_type = yes; then + AC_DEFINE(HAVE_MTGET_TYPE) +fi]) + +dnl Checks if structure 'mtget' have field 'mt_model'. +dnl Defines HAVE_MTGET_MODEL on success. +AC_DEFUN([AC_STRUCT_MTGET_MODEL], +[AC_CACHE_CHECK([if struct mtget contains mt_model], ac_cv_struct_mtget_model, + [AC_TRY_COMPILE([#include +#include ], + [struct mtget t; t.mt_model = 0;], + [ac_cv_struct_mtget_model=yes], + [ac_cv_struct_mtget_model=no])]) +if test $ac_cv_struct_mtget_model = yes; then + AC_DEFINE(HAVE_MTGET_MODEL) +fi]) + +dnl Checks if structure 'mtget' have field 'mt_dsreg'. +dnl Defines HAVE_MTGET_DSREG on success. +AC_DEFUN([AC_STRUCT_MTGET_DSREG], +[AC_CACHE_CHECK([if struct mtget contains mt_dsreg], ac_cv_struct_mtget_dsreg, + [AC_TRY_COMPILE([#include +#include ], + [struct mtget t; t.mt_dsreg = 0;], + [ac_cv_struct_mtget_dsreg=yes], + [ac_cv_struct_mtget_dsreg=no])]) +if test $ac_cv_struct_mtget_dsreg = yes; then + AC_DEFINE(HAVE_MTGET_DSREG) +fi]) + +dnl Checks if structure 'mtget' have field 'mt_dsreg1'. +dnl Defines HAVE_MTGET_DSREG on success. +AC_DEFUN([AC_STRUCT_MTGET_DSREG1], +[AC_CACHE_CHECK([if struct mtget contains mt_dsreg1], ac_cv_struct_mtget_dsreg1, + [AC_TRY_COMPILE([#include +#include ], + [struct mtget t; t.mt_dsreg1 = 0;], + [ac_cv_struct_mtget_dsreg1=yes], + [ac_cv_struct_mtget_dsreg1=no])]) +if test $ac_cv_struct_mtget_dsreg1 = yes; then + AC_DEFINE(HAVE_MTGET_DSREG1) +fi]) + +dnl Checks if structure 'mtget' have field 'mt_dsreg2'. +dnl Defines HAVE_MTGET_DSREG2 on success. +AC_DEFUN([AC_STRUCT_MTGET_DSREG2], +[AC_CACHE_CHECK([if struct mtget contains mt_dsreg2], ac_cv_struct_mtget_dsreg2, + [AC_TRY_COMPILE([#include +#include ], + [struct mtget t; t.mt_dsreg2 = 0;], + [ac_cv_struct_mtget_dsreg2=yes], + [ac_cv_struct_mtget_dsreg2=no])]) +if test $ac_cv_struct_mtget_dsreg2 = yes; then + AC_DEFINE(HAVE_MTGET_DSREG2) +fi]) + +dnl Checks if structure 'mtget' have field 'mt_gstat'. +dnl Defines HAVE_MTGET_GSTAT on success. +AC_DEFUN([AC_STRUCT_MTGET_GSTAT], +[AC_CACHE_CHECK([if struct mtget contains mt_gstat], ac_cv_struct_mtget_gstat, + [AC_TRY_COMPILE([#include +#include ], + [struct mtget t; t.mt_gstat = 0;], + [ac_cv_struct_mtget_gstat=yes], + [ac_cv_struct_mtget_gstat=no])]) +if test $ac_cv_struct_mtget_gstat = yes; then + AC_DEFINE(HAVE_MTGET_GSTAT) +fi]) + +dnl Checks if structure 'mtget' have field 'mt_erreg'. +dnl Defines HAVE_MTGET_ERREG on success. +AC_DEFUN([AC_STRUCT_MTGET_ERREG], +[AC_CACHE_CHECK([if struct mtget contains mt_erreg], ac_cv_struct_mtget_erreg, + [AC_TRY_COMPILE([#include +#include ], + [struct mtget t; t.mt_erreg = 0;], + [ac_cv_struct_mtget_erreg=yes], + [ac_cv_struct_mtget_erreg=no])]) +if test $ac_cv_struct_mtget_erreg = yes; then + AC_DEFINE(HAVE_MTGET_ERREG) +fi]) + +dnl Checks if structure 'mtget' have field 'mt_resid'. +dnl Defines HAVE_MTGET_RESID on success. +AC_DEFUN([AC_STRUCT_MTGET_RESID], +[AC_CACHE_CHECK([if struct mtget contains mt_resid], ac_cv_struct_mtget_resid, + [AC_TRY_COMPILE([#include +#include ], + [struct mtget t; t.mt_resid = 0;], + [ac_cv_struct_mtget_resid=yes], + [ac_cv_struct_mtget_resid=no])]) +if test $ac_cv_struct_mtget_resid = yes; then + AC_DEFINE(HAVE_MTGET_RESID) +fi]) + +dnl Checks if structure 'mtget' have field 'mt_fileno'. +dnl Defines HAVE_MTGET_FILENO on success. +AC_DEFUN([AC_STRUCT_MTGET_FILENO], +[AC_CACHE_CHECK([if struct mtget contains mt_fileno], + ac_cv_struct_mtget_fileno, + [AC_TRY_COMPILE([#include +#include ], + [struct mtget t; t.mt_fileno = 0;], + [ac_cv_struct_mtget_fileno=yes], + [ac_cv_struct_mtget_fileno=no])]) +if test $ac_cv_struct_mtget_fileno = yes; then + AC_DEFINE(HAVE_MTGET_FILENO) +fi]) + +dnl Checks if structure 'mtget' have field 'mt_blkno'. +dnl Defines HAVE_MTGET_BLKNO on success. +AC_DEFUN([AC_STRUCT_MTGET_BLKNO], +[AC_CACHE_CHECK([if struct mtget contains mt_blkno], ac_cv_struct_mtget_blkno, + [AC_TRY_COMPILE([#include +#include ], + [struct mtget t; t.mt_blkno = 0;], + [ac_cv_struct_mtget_blkno=yes], + [ac_cv_struct_mtget_blkno=no])]) +if test $ac_cv_struct_mtget_blkno = yes; then + AC_DEFINE(HAVE_MTGET_BLKNO) +fi]) + +dnl Checks if structure 'mtget' have field 'mt_flags'. +dnl Defines HAVE_MTGET_FLAGS on success. +AC_DEFUN([AC_STRUCT_MTGET_FLAGS], +[AC_CACHE_CHECK([if struct mtget contains mt_flags], ac_cv_struct_mtget_flags, + [AC_TRY_COMPILE([#include +#include ], + [struct mtget t; t.mt_flags = 0;], + [ac_cv_struct_mtget_flags=yes], + [ac_cv_struct_mtget_flags=no])]) +if test $ac_cv_struct_mtget_flags = yes; then + AC_DEFINE(HAVE_MTGET_FLAGS) +fi]) + +dnl Checks if structure 'mtget' have field 'mt_bf'. +dnl Defines HAVE_MTGET_BF on success. +AC_DEFUN([AC_STRUCT_MTGET_BF], +[AC_CACHE_CHECK([if struct mtget contains mt_bf], ac_cv_struct_mtget_bf, + [AC_TRY_COMPILE([#include +#include ], + [struct mtget t; t.mt_bf = 0;], + [ac_cv_struct_mtget_bf=yes], + [ac_cv_struct_mtget_bf=no])]) +if test $ac_cv_struct_mtget_bf = yes; then + AC_DEFINE(HAVE_MTGET_BF) +fi]) + +dnl Checks for illegal declaration of 'union semun' in sys/sem.h. +dnl Defines HAVE_UNION_SEMUN on success. +AC_DEFUN([AC_STRUCT_UNION_SEMUN], +[AC_CACHE_CHECK([if an illegal declaration for union semun in sys/sem.h exists], ac_cv_struct_union_semun, + [AC_TRY_COMPILE([#include +#include +#include ], [union semun s;], + [ac_cv_struct_union_semun=yes], + [ac_cv_struct_union_semun=no])]) +if test $ac_cv_struct_union_semun = yes; then + AC_DEFINE(HAVE_UNION_SEMUN) +fi]) + +dnl Checks if 'union wait' is declared in 'wait.h' or 'sys/wait.h'. +dnl Defines HAVE_UNION_WAIT on success. +AC_DEFUN([AC_STRUCT_UNION_WAIT], +[AC_CACHE_CHECK([if union wait is declared in wait.h or sys/wait.h], ac_cv_struct_union_wait, + [AC_TRY_COMPILE([#include +#if defined(HAVE_WAIT_H) +# include +#else +#include +#endif], [union wait w;], + [ac_cv_struct_union_wait=yes], + [ac_cv_struct_union_wait=no])]) +if test $ac_cv_struct_union_wait = yes; then + AC_DEFINE(HAVE_UNION_WAIT) +fi]) + +dnl Checks if union wait is used by default +dnl Defines USE_UNION_WAIT to int on failure. +AC_DEFUN([AC_USE_STRUCT_UNION_WAIT], +[AC_REQUIRE([AC_HEADER_STDC])dnl +AC_MSG_CHECKING(if union wait is used by default) +AC_CACHE_VAL(ac_cv_use_union_wait, +[AC_EGREP_CPP(dnl +changequote(<<,>>)dnl +<>dnl +changequote([,]), [#include +#if defined(HAVE_WAIT_H) +# include +#else +#include +#endif +xxzzy WTERMSIG(status) +xxzzy WCOREDUMP(status) +xxzzy WEXITSTATUS(status) +xxzzy WSTOPSIG(status) +xxzzy WIFSTOPPED(status) +xxzzy WIFSIGNALED(status) +xxzzy WIFEXITED(status)], ac_cv_use_union_wait=yes, ac_cv_use_union_wait=no)])dnl +AC_MSG_RESULT($ac_cv_use_union_wait) +if test $ac_cv_use_union_wait = yes; then + AC_DEFINE(USE_UNION_WAIT) +fi]) + +dnl Checks if 'struct rusage' is declared in sys/resource.h. +dnl Defines HAVE_STRUCT_RUSAGE on success. +AC_DEFUN([AC_STRUCT_RUSAGE], +[AC_CACHE_CHECK([if struct rusage is declared in sys/resource.h], ac_cv_struct_rusage, + [AC_TRY_COMPILE([#include +#include ], [struct rusage r;], + [ac_cv_struct_rusage=yes], + [ac_cv_struct_rusage=no])]) +if test $ac_cv_struct_rusage = yes; then + AC_DEFINE(HAVE_STRUCT_RUSAGE) +fi]) + +dnl Checks if structure 'siginfo' have field 'si_utime'. +dnl Defines HAVE_SI_UTIME on success. +AC_DEFUN([AC_STRUCT_SI_UTIME], +[AC_CACHE_CHECK([if struct siginfo contains si_utime], ac_cv_struct_si_utime, + [AC_TRY_COMPILE([#include +#include ], + [struct siginfo si; si.si_utime = 0;], + [ac_cv_struct_si_utime=yes], + [ac_cv_struct_si_utime=no])]) +if test $ac_cv_struct_si_utime = yes; then + AC_DEFINE(HAVE_SI_UTIME) +fi]) + + +dnl Checks if structure 'dirent' have field 'd_ino'. +dnl Defines HAVE_DIRENT_D_INO on success. +AC_DEFUN([AC_STRUCT_DIRENT_D_INO], +[AC_CACHE_CHECK([if struct dirent contains d_ino], ac_cv_struct_dirent_d_ino, + [AC_TRY_COMPILE([ +/* + * This must be kept in sync with schily/dirent.h + */ +#ifdef HAVE_SYS_TYPES_H +# include +#endif +#ifdef HAVE_SYS_STAT_H +# include +#endif +# ifdef HAVE_DIRENT_H /* This a POSIX compliant system */ +# include +# define _FOUND_DIR_ +# else /* This is a Pre POSIX system */ + +# define dirent direct + +# if defined(HAVE_SYS_DIR_H) +# include +# define _FOUND_DIR_ +# endif + +# if defined(HAVE_NDIR_H) && !defined(_FOUND_DIR_) +# include +# define _FOUND_DIR_ +# endif + +# if defined(HAVE_SYS_NDIR_H) && !defined(_FOUND_DIR_) +# include +# define _FOUND_DIR_ +# endif +# endif /* HAVE_DIRENT_H */ + ], + [struct dirent d; d.d_ino = 0;], + [ac_cv_struct_dirent_d_ino=yes], + [ac_cv_struct_dirent_d_ino=no])]) +if test $ac_cv_struct_dirent_d_ino = yes; then + AC_DEFINE(HAVE_DIRENT_D_INO) +fi]) + +dnl Checks if structure 'dirent' have field 'd_type'. +dnl Defines HAVE_DIRENT_D_TYPE on success. +AC_DEFUN([AC_STRUCT_DIRENT_D_TYPE], +[AC_CACHE_CHECK([if struct dirent contains d_type], ac_cv_struct_dirent_d_type, + [AC_TRY_COMPILE([ +/* + * This must be kept in sync with schily/dirent.h + */ +#ifdef HAVE_SYS_TYPES_H +# include +#endif +#ifdef HAVE_SYS_STAT_H +# include +#endif +# ifdef HAVE_DIRENT_H /* This a POSIX compliant system */ +# include +# define _FOUND_DIR_ +# else /* This is a Pre POSIX system */ + +# define dirent direct + +# if defined(HAVE_SYS_DIR_H) +# include +# define _FOUND_DIR_ +# endif + +# if defined(HAVE_NDIR_H) && !defined(_FOUND_DIR_) +# include +# define _FOUND_DIR_ +# endif + +# if defined(HAVE_SYS_NDIR_H) && !defined(_FOUND_DIR_) +# include +# define _FOUND_DIR_ +# endif +# endif /* HAVE_DIRENT_H */ + ], + [struct dirent d; d.d_type = 0;], + [ac_cv_struct_dirent_d_type=yes], + [ac_cv_struct_dirent_d_type=no])]) +if test $ac_cv_struct_dirent_d_type = yes; then + AC_DEFINE(HAVE_DIRENT_D_TYPE) +fi]) + +dnl Checks if structure 'DIR' have field 'dd_fd'. +dnl Defines HAVE_DIR_DD_FD on success. +AC_DEFUN([AC_STRUCT_DIR_DD_FD], +[AC_CACHE_CHECK([if DIR * contains dd_fd], ac_cv_struct_dir_dd_fd, + [AC_TRY_COMPILE([#include ], + [DIR d; d.dd_fd = 0; exit (d.dd_fd == 0);], + [ac_cv_struct_dir_dd_fd=yes], + [ac_cv_struct_dir_dd_fd=no])]) +if test $ac_cv_struct_dir_dd_fd = yes; then + AC_DEFINE(HAVE_DIR_DD_FD) +fi]) + +dnl Checks wether major(), minor() and makedev() are defined in +dnl 'sys/mkdev.h' or in 'sys/sysmacros.h. Defines MAJOR_IN_MKDEV or +dnl MAJOR_IN_SYSMACROS or nothing. +AC_DEFUN([AC_HEADER_MAKEDEV], +[AC_CACHE_CHECK([for header file containing major(), minor() and makedev()], + ac_cv_header_makedev, +[ac_cv_header_makedev=none +AC_TRY_COMPILE([#include +#include ], + [int i = major(0); i = minor(0); i = makedev(0,0);], + [ac_cv_header_makedev=sys/mkdev.h]) +if test $ac_cv_header_makedev = none; then + AC_TRY_COMPILE([#include +#include ], + [int i = major(0); i = minor(0); i = makedev(0,0);], + [ac_cv_header_makedev=sys/sysmacros.h]) +fi]) +if test $ac_cv_header_makedev = sys/mkdev.h; then + AC_DEFINE(MAJOR_IN_MKDEV) +fi +if test $ac_cv_header_makedev = sys/sysmacros.h; then + AC_DEFINE(MAJOR_IN_SYSMACROS) +fi]) + +dnl Checks for USG derived STDIO that uses _filbuf() +dnl Defines HAVE__FILBUF on success. +AC_DEFUN([AC_HEADER__FILBUF], +[AC_CACHE_CHECK([for _filbuf()], ac_cv_func__filbuf, + [AC_TRY_LINK([#include ], +[FILE *f; +int flag; +int count; +char *ptr; +char c = 0; +f = fopen("confdefs.h", "r"); +_filbuf(f); +_flsbuf(c, f); +flag = f->_flag & _IONBF; +flag |= f->_flag & _IOERR; +flag |= f->_flag & _IOEOF; +count = f->_cnt; +ptr = (char *)f->_ptr; +fclose(f);], + [ac_cv_func__filbuf=yes], + [ac_cv_func__filbuf=no])]) +if test $ac_cv_func__filbuf = yes; then + AC_DEFINE(HAVE__FILBUF) +fi]) + +dnl Checks for USG derived STDIO that uses __filbuf() +dnl Defines HAVE___FILBUF on success. +AC_DEFUN([AC_HEADER___FILBUF], +[AC_CACHE_CHECK([for __filbuf()], ac_cv_func___filbuf, + [AC_TRY_LINK([#include ], +[FILE *f; +int flag; +int count; +char *ptr; +char c = 0; +f = fopen("confdefs.h", "r"); +__filbuf(f); +__flsbuf(c, f); +flag = f->_flag & _IONBF; +flag |= f->_flag & _IOERR; +flag |= f->_flag & _IOEOF; +count = f->_cnt; +ptr = (char *)f->_ptr; +fclose(f);], + [ac_cv_func___filbuf=yes], + [ac_cv_func___filbuf=no])]) +if test $ac_cv_func___filbuf = yes; then + AC_DEFINE(HAVE___FILBUF) +fi]) + +dnl Checks for USG derived STDIO +dnl Defines HAVE_USG_STDIO on success. +AC_DEFUN([AC_HEADER_USG_STDIO], +[AC_REQUIRE([AC_HEADER__FILBUF])AC_REQUIRE([AC_HEADER___FILBUF])dnl +AC_CACHE_CHECK([for USG derived STDIO], ac_cv_header_usg_stdio, + [AC_TRY_LINK([#include ], +[FILE *f; +int flag; +int count; +char *ptr; +char c = 0; +f = fopen("confdefs.h", "r"); +#ifdef HAVE___FILBUF +__filbuf(f); +__flsbuf(c, f); +#else +# ifdef HAVE__FILBUF +_filbuf(f); +_flsbuf(c, f); +# else +no filbuf() +# endif +#endif +flag = f->_flag & _IONBF; +flag |= f->_flag & _IOERR; +flag |= f->_flag & _IOEOF; +count = f->_cnt; +ptr = (char *)f->_ptr; +fclose(f);], + [ac_cv_header_usg_stdio=yes], + [ac_cv_header_usg_stdio=no])]) +if test $ac_cv_header_usg_stdio = yes; then + AC_DEFINE(HAVE_USG_STDIO) +fi]) + +dnl Checks for Linux stdio with f->_flags +dnl Defines HAVE_FILE__FLAGS on success. +AC_DEFUN([AC_HEADER_FILE__FLAGS], +[AC_CACHE_CHECK([for f->_flags in FILE *], ac_cv_file__flags, + [AC_TRY_LINK([#include ], +[FILE *f; +int flags; +f = fopen("confdefs.h", "r"); +flags = f->_flags; +fclose(f);], + [ac_cv_file__flags=yes], + [ac_cv_file__flags=no])]) +if test $ac_cv_file__flags = yes; then + AC_DEFINE(HAVE_FILE__FLAGS) +fi]) + +dnl Checks for Linux stdio with f->_IO_buf_base +dnl Defines HAVE_FILE__IO_BUF_BASE on success. +AC_DEFUN([AC_HEADER_FILE__IO_BUF_BASE], +[AC_CACHE_CHECK([for f->_IO_buf_base in FILE *], ac_cv_file__io_buf_base, + [AC_TRY_LINK([#include ], +[FILE *f; +char *ptr; +f = fopen("confdefs.h", "r"); +ptr = f->_IO_buf_base; +fclose(f);], + [ac_cv_file__io_buf_base=yes], + [ac_cv_file__io_buf_base=no])]) +if test $ac_cv_file__io_buf_base = yes; then + AC_DEFINE(HAVE_FILE__IO_BUF_BASE) +fi]) + +dnl Checks for errno definition in +dnl Defines HAVE_ERRNO_DEF on success. +AC_DEFUN([AC_HEADER_ERRNO_DEF], +[AC_CACHE_CHECK([for errno definition in errno.h], ac_cv_header_errno_def, + [AC_TRY_COMPILE([#include ], +[errno = 0;], + [ac_cv_header_errno_def=yes], + [ac_cv_header_errno_def=no])]) +if test $ac_cv_header_errno_def = yes; then + AC_DEFINE(HAVE_ERRNO_DEF) +fi]) + +dnl Checks for environ definition in +dnl Defines HAVE_ENVIRON_DEF on success. +AC_DEFUN([AC_HEADER_ENVIRON_DEF], +[AC_CACHE_CHECK([for environ definition in unistd.h/stdlib.h], ac_cv_header_environ_def, + [AC_TRY_COMPILE([ +#ifdef HAVE_UNISTD_H +#include +#else +#ifdef HAVE_STDLIB_H +#include /* MSC no unistd.h but environ in stdlib.h */ +#endif +#endif +], +[environ = 0;], + [ac_cv_header_environ_def=yes], + [ac_cv_header_environ_def=no])]) +if test $ac_cv_header_environ_def = yes; then + AC_DEFINE(HAVE_ENVIRON_DEF) +fi]) + +dnl Checks for sys_siglist definition in +dnl Defines HAVE_SYS_SIGLIST_DEF on success. +AC_DEFUN([AC_HEADER_SYS_SIGLIST_DEF], +[AC_CACHE_CHECK([for sys_siglist definition in signal.h], ac_cv_header_sys_siglist_def, + [AC_TRY_COMPILE([#include ], +[char *cp = (char *)sys_siglist[0]; exit (cp != (char *)0 && *cp != 0);], + [ac_cv_header_sys_siglist_def=yes], + [ac_cv_header_sys_siglist_def=no])]) +if test $ac_cv_header_sys_siglist_def = yes; then + AC_DEFINE(HAVE_SYS_SIGLIST_DEF) +fi]) + +dnl Checks for extern timezone in time.h or sys/time.h +dnl Defines HAVE_VAR_TIMEZONE_DEF on success. +AC_DEFUN([AC_VAR_TIMEZONE_DEF], +[AC_REQUIRE([AC_HEADER_TIME])dnl +AC_CACHE_CHECK([for extern timezone in time.h or sys/time.h], ac_cv_var_timezone_def, + [AC_TRY_COMPILE([ +#include +#ifdef TIME_WITH_SYS_TIME_H +# include +# include +#else +#ifdef HAVE_SYS_TIME_H +# include +#else +# include +#endif +#endif], [timezone = 1;], + [ac_cv_var_timezone_def=yes], + [ac_cv_var_timezone_def=no])]) +if test $ac_cv_var_timezone_def = yes; then + AC_DEFINE(HAVE_VAR_TIMEZONE_DEF) +fi]) + +dnl Checks if extern long timezone exists in libc +dnl Defines HAVE_VAR_TIMEZONE on success. +AC_DEFUN([AC_VAR_TIMEZONE], +[AC_CACHE_CHECK([for working extern long timezone ], ac_cv_var_timezone, + [AC_TRY_RUN([ +extern long timezone; + +int +main() +{ + exit(timezone != 0); +}], + [ac_cv_var_timezone=yes], + [ac_cv_var_timezone=no])]) +if test $ac_cv_var_timezone = yes; then + AC_DEFINE(HAVE_VAR_TIMEZONE) +fi]) + +dnl Checks if extern char *__progname exists in libc +dnl Defines HAVE_VAR___PROGNAME on success. +AC_DEFUN([AC_VAR___PROGNAME], +[AC_CACHE_CHECK([for working extern char *__progname ], ac_cv_var___progname, + [AC_TRY_RUN([ +extern char *__progname; + +int +main() +{ + exit (!(__progname != 0 && *__progname != '\0')); +}], + [ac_cv_var___progname=yes], + [ac_cv_var___progname=no])]) +if test $ac_cv_var___progname = yes; then + AC_DEFINE(HAVE_VAR___PROGNAME) +fi]) + +dnl Checks if extern char *__progname_full exists in libc +dnl Defines HAVE_VAR___PROGNAME_FULL on success. +AC_DEFUN([AC_VAR___PROGNAME_FULL], +[AC_CACHE_CHECK([for working extern char *__progname_full ], ac_cv_var___progname_full, + [AC_TRY_RUN([ +extern char *__progname_full; + +int +main() +{ + exit (!(__progname_full != 0 && *__progname_full != '\0')); +}], + [ac_cv_var___progname_full=yes], + [ac_cv_var___progname_full=no])]) +if test $ac_cv_var___progname_full = yes; then + AC_DEFINE(HAVE_VAR___PROGNAME_FULL) +fi]) + +dnl Checks for UNIX-98 compliant +dnl Defines HAVE_INTTYPES_H on success. +AC_DEFUN([AC_HEADER_INTTYPES], +[AC_CACHE_CHECK([for UNIX-98 compliant inttypes.h], ac_cv_header_inttypes, + [AC_TRY_COMPILE([#include ], +[int8_t c; uint8_t uc; int16_t s; uint16_t us; int32_t i; uint32_t ui; +int64_t ll; uint64_t ull; +intptr_t ip; uintptr_t uip;], + [ac_cv_header_inttypes=yes], + [ac_cv_header_inttypes=no])]) +if test $ac_cv_header_inttypes = yes; then + AC_DEFINE(HAVE_INTTYPES_H) +fi]) + +dnl Checks for SUSv3 compliant +dnl Defines HAVE_STDINT_H and HAVE_TYPE_INTMAX_T/HAVE_TYPE_UINTMAX_T on success. +AC_DEFUN([AC_HEADER_STDINT], +[AC_CACHE_CHECK([for SUSv3 compliant stdint.h], ac_cv_header_stdint, + [AC_TRY_COMPILE([#include ], +[int8_t c; uint8_t uc; int16_t s; uint16_t us; int32_t i; uint32_t ui; +int64_t ll; uint64_t ull; +intptr_t ip; uintptr_t uip; +intmax_t im; uintmax_t uim;], + [ac_cv_header_stdint=yes], + [ac_cv_header_stdint=no])]) +if test $ac_cv_header_stdint = yes; then + AC_DEFINE(HAVE_STDINT_H) + AC_DEFINE(HAVE_TYPE_INTMAX_T) + AC_DEFINE(HAVE_TYPE_UINTMAX_T) +fi]) + +dnl Checks for struct timeval in time.h or sys/time.h +dnl Defines HAVE_STRUCT_TIMEVAL on success. +AC_DEFUN([AC_STRUCT_TIMEVAL], +[AC_REQUIRE([AC_HEADER_TIME])dnl +AC_CACHE_CHECK([for struct timeval in time.h or sys/time.h], ac_cv_struct_timeval, + [AC_TRY_COMPILE([ +#include +#ifdef TIME_WITH_SYS_TIME_H +# include +# include +#else +#ifdef HAVE_SYS_TIME_H +# include +#else +# include +#endif +#endif], [struct timeval tv;], + [ac_cv_struct_timeval=yes], + [ac_cv_struct_timeval=no])]) +if test $ac_cv_struct_timeval = yes; then + AC_DEFINE(HAVE_STRUCT_TIMEVAL) +fi]) + +dnl Checks for struct timezone in time.h or sys/time.h +dnl Defines HAVE_STRUCT_TIMEZONE on success. +AC_DEFUN([AC_STRUCT_TIMEZONE], +[AC_REQUIRE([AC_HEADER_TIME])dnl +AC_CACHE_CHECK([for struct timezone in time.h or sys/time.h], ac_cv_struct_timezone, + [AC_TRY_COMPILE([ +#include +#ifdef TIME_WITH_SYS_TIME_H +# include +# include +#else +#ifdef HAVE_SYS_TIME_H +# include +#else +# include +#endif +#endif], [struct timezone tz;], + [ac_cv_struct_timezone=yes], + [ac_cv_struct_timezone=no])]) +if test $ac_cv_struct_timezone = yes; then + AC_DEFINE(HAVE_STRUCT_TIMEZONE) +fi]) + +dnl Checks for struct timespec in time.h or sys/time.h +dnl Defines HAVE_STRUCT_TIMESPEC on success. +AC_DEFUN([AC_STRUCT_TIMESPEC], +[AC_REQUIRE([AC_HEADER_TIME])dnl +AC_CACHE_CHECK([for struct timespec in time.h or sys/time.h], ac_cv_struct_timespec, + [AC_TRY_COMPILE([ +#include +#ifdef TIME_WITH_SYS_TIME_H +# include +# include +#else +#ifdef HAVE_SYS_TIME_H +# include +#else +# include +#endif +#endif], [struct timespec ts;], + [ac_cv_struct_timespec=yes], + [ac_cv_struct_timespec=no])]) +if test $ac_cv_struct_timespec = yes; then + AC_DEFINE(HAVE_STRUCT_TIMESPEC) +fi]) + +dnl Checks for type time_t +dnl Defines time_t to long on failure. +AC_DEFUN([AC_TYPE_TIME_T], +[AC_REQUIRE([AC_HEADER_TIME])dnl +AC_CACHE_CHECK([for time_t], ac_cv_type_time_t, + [AC_TRY_COMPILE([ +#include +#ifdef TIME_WITH_SYS_TIME_H +# include +# include +#else +#ifdef HAVE_SYS_TIME_H +# include +#else +# include +#endif +#endif], [time_t t;], + [ac_cv_type_time_t=yes], + [ac_cv_type_time_t=no])]) +if test $ac_cv_type_time_t = no; then + AC_DEFINE(time_t, long) +fi]) + +dnl AC_CHECK_SIZE_TIME([CROSS-SIZE]) +dnl This must be called past AC_CHECK_SIZEOF(long int) +AC_DEFUN(AC_CHECK_SIZE_TIME_T, +[changequote(<<, >>)dnl +dnl The name to #define. +define(<>, translit(sizeof_time_t, [a-z *], [A-Z_P]))dnl +dnl The cache variable name. +define(<>, translit(ac_cv_sizeof_time_t, [ *], [_p]))dnl +changequote([, ])dnl +AC_MSG_CHECKING(size of time_t) +AC_CACHE_VAL(AC_CV_NAME, +[AC_TRY_RUN([#include +#include +#ifdef TIME_WITH_SYS_TIME_H +# include +# include +#else +#ifdef HAVE_SYS_TIME_H +# include +#else +# include +#endif +#endif +main() +{ + FILE *f=fopen("conftestval", "w"); + if (!f) exit(1); + fprintf(f, "%d\n", sizeof(time_t)); + exit(0); +}], AC_CV_NAME=`cat conftestval`, AC_CV_NAME=SIZEOF_LONG_INT, ifelse([$1], , , AC_CV_NAME=$1))])dnl +AC_MSG_RESULT($AC_CV_NAME) +AC_DEFINE_UNQUOTED(AC_TYPE_NAME, $AC_CV_NAME) +undefine([AC_TYPE_NAME])dnl +undefine([AC_CV_NAME])dnl +]) + +dnl AC_CHECK_SIZE_WCHAR([CROSS-SIZE]) +AC_DEFUN(AC_CHECK_SIZE_WCHAR, +[changequote(<<, >>)dnl +dnl The name to #define. +define(<>, translit(sizeof_wchar, [a-z *], [A-Z_P]))dnl +dnl The cache variable name. +define(<>, translit(ac_cv_sizeof_wchar, [ *], [_p]))dnl +changequote([, ])dnl +AC_MSG_CHECKING(size of wchar) +AC_CACHE_VAL(AC_CV_NAME, +[AC_TRY_RUN([#include +main() +{ + FILE *f=fopen("conftestval", "w"); + if (!f) exit(1); + fprintf(f, "%d\n", sizeof(L'a')); + exit(0); +}], AC_CV_NAME=`cat conftestval`, AC_CV_NAME=0, ifelse([$1], , , AC_CV_NAME=$1))])dnl +AC_MSG_RESULT($AC_CV_NAME) +AC_DEFINE_UNQUOTED(AC_TYPE_NAME, $AC_CV_NAME) +undefine([AC_TYPE_NAME])dnl +undefine([AC_CV_NAME])dnl +]) + +dnl AC_CHECK_SIZE_WCHAR([CROSS-SIZE]) +AC_DEFUN(AC_CHECK_SIZE_WCHAR_T, +[changequote(<<, >>)dnl +dnl The name to #define. +define(<>, translit(sizeof_wchar_t, [a-z *], [A-Z_P]))dnl +dnl The cache variable name. +define(<>, translit(ac_cv_sizeof_wchar_t, [ *], [_p]))dnl +changequote([, ])dnl +AC_MSG_CHECKING(size of wchar_t) +AC_CACHE_VAL(AC_CV_NAME, +[AC_TRY_RUN([#include +#ifdef HAVE_SYS_TYPES_H +#include +#endif +#ifdef HAVE_STDLIB_H +#include +#endif +#ifdef HAVE_WCHAR_H +#include +#endif +main() +{ + FILE *f=fopen("conftestval", "w"); + if (!f) exit(1); + fprintf(f, "%d\n", sizeof(wchar_t)); + exit(0); +}], AC_CV_NAME=`cat conftestval`, AC_CV_NAME=SIZEOF_CHAR, ifelse([$1], , , AC_CV_NAME=$1))])dnl +AC_MSG_RESULT($AC_CV_NAME) +AC_DEFINE_UNQUOTED(AC_TYPE_NAME, $AC_CV_NAME) +undefine([AC_TYPE_NAME])dnl +undefine([AC_CV_NAME])dnl +]) + + +dnl Checks for type clock_t +dnl Defines clock_t to long on failure. +dnl XXX we cannot check for AC_CHECK_HEADERS(sys/times.h) +AC_DEFUN([AC_TYPE_CLOCK_T], +[AC_REQUIRE([AC_HEADER_TIME])dnl +AC_CACHE_CHECK([for clock_t], ac_cv_type_clock_t, + [AC_TRY_COMPILE([ +#include +/* + * time.h is needed because of a bug in Next Step. + * Next Step needs time.h for clock_t + */ +#ifdef TIME_WITH_SYS_TIME +# ifndef _INCL_SYS_TIME_H +# include +# define _INCL_SYS_TIME_H +# endif +# ifndef _INCL_TIME_H +# include +# define _INCL_TIME_H +# endif +#else +#ifdef HAVE_SYS_TIME_H +# ifndef _INCL_SYS_TIME_H +# include +# define _INCL_SYS_TIME_H +# endif +#else +# ifndef _INCL_TIME_H +# include +# define _INCL_TIME_H +# endif +#endif +#endif +#ifdef HAVE_SYS_TIMES_H +#include +#endif + ], [clock_t t;], + [ac_cv_type_clock_t=yes], + [ac_cv_type_clock_t=no])]) +if test $ac_cv_type_clock_t = no; then + AC_DEFINE(clock_t, long) +fi]) + +dnl Checks for type socklen_t +dnl Defines socklen_t to int on failure. +AC_DEFUN([AC_TYPE_SOCKLEN_T], +[AC_REQUIRE([AC_HEADER_STDC])dnl +AC_MSG_CHECKING(for socklen_t) +AC_CACHE_VAL(ac_cv_type_socklen_t, +[AC_EGREP_CPP(dnl +changequote(<<,>>)dnl +<<(^|[^a-zA-Z_0-9])socklen_t[^a-zA-Z_0-9]>>dnl +changequote([,]), [#include +#if HAVE_STDLIB_H || STDC_HEADERS +#include +#endif +#if HAVE_STDDEF_H || STDC_HEADERS +#include +#endif +#include ], ac_cv_type_socklen_t=yes, ac_cv_type_socklen_t=no)])dnl +AC_MSG_RESULT($ac_cv_type_socklen_t) +if test $ac_cv_type_socklen_t = no; then + AC_DEFINE(socklen_t, int) +fi]) + +dnl Checks for type stack_t +dnl Defines HAVE_STACK_T on success. +AC_DEFUN([AC_TYPE_STACK_T], +[AC_CACHE_CHECK([if stack_t is declared in signal.h], ac_cv_stack_t, + [AC_TRY_COMPILE([#include ], + [stack_t ss; ss.ss_size = 0; exit (ss.ss_size == 0);], + [ac_cv_stack_t=yes], + [ac_cv_stack_t=no])]) +if test $ac_cv_stack_t = yes; then + AC_DEFINE(HAVE_STACK_T) +fi]) + +dnl Checks for type siginfo_t +dnl Defines HAVE_SIGINFO_T on success. +AC_DEFUN([AC_TYPE_SIGINFO_T], +[AC_CACHE_CHECK([if siginfo_t is declared in signal.h], ac_cv_siginfo_t, + [AC_TRY_COMPILE([#include +#ifdef HAVE_SIGINFO_H +#include +#else +#ifdef HAVE_SYS_SIGINFO_H +#include +#endif +#endif], + [siginfo_t si; si.si_signo = 0; exit (si.si_signo == 0);], + [ac_cv_siginfo_t=yes], + [ac_cv_siginfo_t=no])]) +if test $ac_cv_siginfo_t = yes; then + AC_DEFINE(HAVE_SIGINFO_T) +fi]) + +dnl Checks for type idtype_t +dnl Defines HAVE_TYPE_IDTYPE_T on success. +AC_DEFUN([AC_TYPE_IDTYPE_T], +[AC_CACHE_CHECK([if idtype_t is declared correctly in wait.h], ac_cv_have_type_idtype_t, + [AC_TRY_COMPILE([ +#if defined(HAVE_WAIT_H) +# include +#else +#include +#endif], + [idtype_t idt; idt = P_ALL; idt = P_PGID; idt = P_PID; exit (idt == P_PID);], + [ac_cv_have_type_idtype_t=yes], + [ac_cv_have_type_idtype_t=no])]) +if test $ac_cv_have_type_idtype_t = yes; then + AC_DEFINE(HAVE_TYPE_IDTYPE_T) +fi]) + +dnl Checks for type struct sockaddr_storage +dnl Defines HAVE_SOCKADDR_STORAGE on success. +AC_DEFUN([AC_STRUCT_SOCKADDR_STORAGE], +[AC_CACHE_CHECK([if struct sockaddr_storage is declared in socket.h], ac_cv_struct_sockaddr_storage, + [AC_TRY_COMPILE([#include ], + [struct sockaddr_storage ss; ss.ss_family = 0; exit (ss.ss_family == 0);], + [ac_cv_struct_sockaddr_storage=yes], + [ac_cv_struct_sockaddr_storage=no])]) +if test $ac_cv_struct_sockaddr_storage = yes; then + AC_DEFINE(HAVE_SOCKADDR_STORAGE) +fi]) + +dnl Checks for type long long +dnl Defines HAVE_LONGLONG on success. +AC_DEFUN([AC_TYPE_LONGLONG], +[AC_CACHE_CHECK([for type long long], ac_cv_type_longlong, + [AC_TRY_COMPILE([], [long long i;], + [ac_cv_type_longlong=yes], + [ac_cv_type_longlong=no])]) +if test $ac_cv_type_longlong = yes; then + AC_DEFINE(HAVE_LONGLONG) +fi]) + +dnl Checks for type __int64 +dnl Defines HAVE___INT64 on success. +AC_DEFUN([AC_TYPE___INT64], +[AC_CACHE_CHECK([for type __int64], ac_cv_type___int64, + [AC_TRY_COMPILE([], [__int64 i;], + [ac_cv_type___int64=yes], + [ac_cv_type___int64=no])]) +if test $ac_cv_type___int64 = yes; then + AC_DEFINE(HAVE___INT64) +fi]) + +dnl Checks for type long double +dnl Defines HAVE_LONGDOUBLE on success. +AC_DEFUN([AC_TYPE_LONGDOUBLE], +[AC_CACHE_CHECK([for type long double], ac_cv_type_longdouble, + [AC_TRY_COMPILE([], [long double ld;], + [ac_cv_type_longdouble=yes], + [ac_cv_type_longdouble=no])]) +if test $ac_cv_type_longdouble = yes; then + AC_DEFINE(HAVE_LONGDOUBLE) +fi]) + +dnl Checks if C-compiler orders bitfields htol +dnl Defines BITFIELDS_HTOL on success. +AC_DEFUN([AC_C_BITFIELDS], +[AC_CACHE_CHECK([whether bitorder in bitfields is htol], ac_cv_c_bitfields_htol, + [AC_TRY_RUN([ +struct { + unsigned char x1:4; + unsigned char x2:4; +} a; +int +main() +{ +char *cp; + +cp = (char *)&a; +*cp = 0x12; +exit(a.x1 == 2);}], + [ac_cv_c_bitfields_htol=yes], + [ac_cv_c_bitfields_htol=no])]) +if test $ac_cv_c_bitfields_htol = yes; then + AC_DEFINE(BITFIELDS_HTOL) +fi]) + +dnl Checks if C-compiler understands prototypes +dnl Defines PROTOTYPES on success. +AC_DEFUN([AC_TYPE_PROTOTYPES], +[AC_CACHE_CHECK([for prototypes], ac_cv_type_prototypes, + [AC_TRY_RUN([ +doit(int i, ...) +{return 0;} +int +main(int ac, char *av[]) +{ doit(1, 2, 3); +exit(0);}], + [ac_cv_type_prototypes=yes], + [ac_cv_type_prototypes=no])]) +if test $ac_cv_type_prototypes = yes; then + AC_DEFINE(PROTOTYPES) +fi]) + +dnl Checks for type size_t +dnl Defines HAVE_SIZE_T_ on success. +AC_DEFUN([AC_TYPE_SIZE_T_], +[AC_CACHE_CHECK([for type size_t], ac_cv_type_size_t_, + [AC_TRY_COMPILE([ +#ifdef HAVE_SYS_TYPES_H +#include +#endif +#ifdef HAVE_STDLIB_H +#include +#endif +#ifdef HAVE_STDDEF_H +#include +#endif +#ifdef HAVE_STDIO_H +#include +#endif + ], [size_t s;], + [ac_cv_type_size_t_=yes], + [ac_cv_type_size_t_=no])]) +if test $ac_cv_type_size_t_ = yes; then + AC_DEFINE(HAVE_SIZE_T) +else + AC_DEFINE(NO_SIZE_T) +fi]) + +dnl Checks if type char is unsigned +dnl Defines CHAR_IS_UNSIGNED on success. +AC_DEFUN([AC_TYPE_CHAR], +[AC_CACHE_CHECK([if char is unsigned], ac_cv_type_char_unsigned, + [AC_TRY_RUN([ +int +main() +{ + char c; + + c = -1; + exit(c < 0);}], + [ac_cv_type_char_unsigned=yes], + [ac_cv_type_char_unsigned=no], + [ac_cv_type_char_unsigned=no])]) +if test $ac_cv_type_char_unsigned = yes; then + AC_DEFINE(CHAR_IS_UNSIGNED) +fi]) + +dnl Checks if function/macro va_copy() is available +dnl Defines HAVE_VA_COPY on success. +AC_DEFUN([AC_FUNC_VA_COPY], +[AC_CACHE_CHECK([for va_copy], ac_cv_func_va_copy, + [AC_TRY_LINK([ +#ifdef HAVE_STDARG_H +# include +#else +# include +#endif], + [ +va_list a, b; + +va_copy(a, b);], + [ac_cv_func_va_copy=yes], + [ac_cv_func_va_copy=no])]) +if test $ac_cv_func_va_copy = yes; then + AC_DEFINE(HAVE_VA_COPY) +fi]) + +dnl Checks if function/macro __va_copy() is available +dnl Defines HAVE__VA_COPY on success. +AC_DEFUN([AC_FUNC__VA_COPY], +[AC_CACHE_CHECK([for __va_copy], ac_cv_func__va_copy, + [AC_TRY_LINK([ +#ifdef HAVE_STDARG_H +# include +#else +# include +#endif], + [ +va_list a, b; + +__va_copy(a, b);], + + [ac_cv_func__va_copy=yes], + [ac_cv_func__va_copy=no])]) +if test $ac_cv_func__va_copy = yes; then + AC_DEFINE(HAVE__VA_COPY) +fi]) + +dnl Checks if va_list is an array +dnl Defines VA_LIST_IS_ARRAY on success. +AC_DEFUN([AC_TYPE_VA_LIST], +[AC_CACHE_CHECK([if va_list is an array], ac_cv_type_va_list_array, + [AC_TRY_LINK([ +#ifdef HAVE_STDARG_H +# include +#else +# include +#endif +], + [ +va_list a, b; + +a = b;], + [ac_cv_type_va_list_array=no], + [ac_cv_type_va_list_array=yes])]) +if test $ac_cv_type_va_list_array = yes; then + AC_DEFINE(VA_LIST_IS_ARRAY) +fi]) + +dnl Checks if quotactl is present as ioctl +dnl Defines HAVE_QUOTAIOCTL on success. +AC_DEFUN([AC_FUNC_QUOTAIOCTL], +[AC_CACHE_CHECK([if quotactl is an ioctl], ac_cv_func_quotaioctl, + [AC_TRY_LINK([#include +#include ], + [struct quotctl q; ioctl(0, Q_QUOTACTL, &q)], + [ac_cv_func_quotaioctl=yes], + [ac_cv_func_quotaioctl=no])]) +if test $ac_cv_func_quotaioctl = yes; then + AC_DEFINE(HAVE_QUOTAIOCTL) +fi]) + +dnl Checks if function __dtoa() is available +dnl Defines HAVE_DTOA on success. +AC_DEFUN([AC_FUNC_DTOA], +[AC_CACHE_CHECK([for __dtoa], ac_cv_func_dtoa, + [AC_TRY_LINK([extern char *__dtoa();], +[int decpt; int sign; char *ep; char *bp; +bp = __dtoa(0.0, 2, 6, &decpt, &sign, &ep);], + [ac_cv_func_dtoa=yes], + [ac_cv_func_dtoa=no])]) +if test $ac_cv_func_dtoa = yes; then + AC_DEFINE(HAVE_DTOA) +fi]) + +dnl Checks if reentrant __dtoa() exists (needs a result prt) +dnl Defines HAVE_DTOA_R on success. +AC_DEFUN([AC_FUNC_DTOA_R], +[AC_REQUIRE([AC_FUNC_DTOA])dnl +AC_CACHE_CHECK([for __dtoa that needs result ptr], ac_cv_func_dtoa_r, + [AC_TRY_RUN([ +extern char *__dtoa(); +int +main() +{ +#ifdef HAVE_DTOA + int decpt, sign; + char *bp; + char *ep; + char *result; + + result = 0; + bp = __dtoa(1.9, 2, 5, &decpt, &sign, &ep, &result); + exit(result == 0); +#else + exit(1); +#endif +}], + [ac_cv_func_dtoa_r=yes], + [ac_cv_func_dtoa_r=no])]) +if test $ac_cv_func_dtoa_r = yes; then + AC_DEFINE(HAVE_DTOA_R) +fi]) + +dnl Checks if working ecvt() exists +dnl Defines HAVE_ECVT on success. +AC_DEFUN([AC_FUNC_ECVT], +[AC_CACHE_CHECK([for working ecvt() ], ac_cv_func_ecvt, + [AC_TRY_RUN([ +extern char *ecvt(); + +sprintf(s) + char *s; +{ + strcpy(s, "DEAD"); +} + +int +main() +{ + int a, b; + +/* exit (strcmp("DEAD", ecvt(1.9, 2, &a, &b)) == 0);*/ + exit (strcmp("19", ecvt(1.9, 2, &a, &b)) != 0); +}], + [ac_cv_func_ecvt=yes], + [ac_cv_func_ecvt=no])]) +if test $ac_cv_func_ecvt = yes; then + AC_DEFINE(HAVE_ECVT) +fi]) + +dnl Checks if working fcvt() exists +dnl Defines HAVE_FCVT on success. +AC_DEFUN([AC_FUNC_FCVT], +[AC_CACHE_CHECK([for working fcvt() ], ac_cv_func_fcvt, + [AC_TRY_RUN([ +extern char *fcvt(); + +sprintf(s) + char *s; +{ + strcpy(s, "DEAD"); +} + +int +main() +{ + int a, b; + +/* exit (strcmp("DEAD", fcvt(1.9, 2, &a, &b)) == 0);*/ + exit (strcmp("190", fcvt(1.9, 2, &a, &b)) != 0); +}], + [ac_cv_func_fcvt=yes], + [ac_cv_func_fcvt=no])]) +if test $ac_cv_func_fcvt = yes; then + AC_DEFINE(HAVE_FCVT) +fi]) + +dnl Checks if working gcvt() exists +dnl Defines HAVE_GCVT on success. +AC_DEFUN([AC_FUNC_GCVT], +[AC_CACHE_CHECK([for working gcvt() ], ac_cv_func_gcvt, + [AC_TRY_RUN([ +extern char *gcvt(); + +sprintf(s) + char *s; +{ + strcpy(s, "DEAD"); +} + +int +main() +{ + char buf[32]; + +/* exit (strcmp("DEAD", gcvt(1.9, 10, buf)) == 0);*/ + exit (strcmp("1.9", gcvt(1.9, 10, buf)) != 0); +}], + [ac_cv_func_gcvt=yes], + [ac_cv_func_gcvt=no])]) +if test $ac_cv_func_gcvt = yes; then + AC_DEFINE(HAVE_GCVT) +fi]) + +dnl Checks if function uname() is available +dnl Defines HAVE_UNAME on success. +AC_DEFUN([AC_FUNC_UNAME], +[AC_CACHE_CHECK([for uname], ac_cv_func_uname, + [AC_TRY_LINK([#include ], +[struct utsname un; +uname(&un);], + [ac_cv_func_uname=yes], + [ac_cv_func_uname=no])]) +if test $ac_cv_func_uname = yes; then + AC_DEFINE(HAVE_UNAME) +fi]) + +dnl Checks if function mlock() is available +dnl beware HP-UX 10.x it contains a bad mlock() in libc +dnl Defines HAVE_MLOCK on success. +AC_DEFUN([AC_FUNC_MLOCK], +[AC_REQUIRE([AC_HEADER_ERRNO_DEF])dnl +AC_CACHE_CHECK([for mlock], ac_cv_func_mlock, + [AC_TRY_RUN([ +#include +#include +#ifndef HAVE_ERRNO_DEF +extern int errno; +#endif + +main() +{ + if (mlock(0, 0) < 0) { + if (errno == EINVAL || errno == ENOMEM || + errno == EPERM || errno == EACCES) + exit(0); + exit(-1); + } + exit(0); +}], + [ac_cv_func_mlock=yes], + [ac_cv_func_mlock=no]) +rm -f core core.* *.core]) +if test $ac_cv_func_mlock = yes; then + AC_DEFINE(HAVE_MLOCK) +fi]) + +dnl Checks if function mlockall() is available +dnl beware HP-UX 10.x it contains a bad mlockall() in libc +dnl Defines HAVE_MLOCKALL on success. +AC_DEFUN([AC_FUNC_MLOCKALL], +[AC_REQUIRE([AC_HEADER_ERRNO_DEF])dnl +AC_CACHE_CHECK([for mlockall], ac_cv_func_mlockall, + [AC_TRY_RUN([ +#include +#include +#include +#ifndef HAVE_ERRNO_DEF +extern int errno; +#endif + +int +main() +{ + if (mlockall(MCL_CURRENT|MCL_FUTURE) < 0) { + if (errno == EINVAL || errno == ENOMEM || + errno == EPERM || errno == EACCES) + exit(0); + exit(-1); + } + exit(0); +} +], + [ac_cv_func_mlockall=yes], + [ac_cv_func_mlockall=no]) +rm -f core core.* *.core]) +if test $ac_cv_func_mlockall = yes; then + AC_DEFINE(HAVE_MLOCKALL) +fi]) + +AC_DEFUN([jsAC_FUNC_MMAP], +[AC_CHECK_HEADERS(unistd.h)dnl +AC_REQUIRE([AC_MMAP_SIZEP])dnl +AC_REQUIRE([AC_FUNC_GETPAGESIZE])dnl +AC_CACHE_CHECK(for working mmap, ac_cv_func_mmap_fixed_mapped, +[AC_TRY_RUN([ +/* Thanks to Mike Haertel and Jim Avera for this test. + Here is a matrix of mmap possibilities: + mmap private not fixed + mmap private fixed at somewhere currently unmapped + mmap private fixed at somewhere already mapped + mmap shared not fixed + mmap shared fixed at somewhere currently unmapped + mmap shared fixed at somewhere already mapped + For private mappings, we should verify that changes cannot be read() + back from the file, nor mmap's back from the file at a different + address. (There have been systems where private was not correctly + implemented like the infamous i386 svr4.0, and systems where the + VM page cache was not coherent with the filesystem buffer cache + like early versions of FreeBSD and possibly contemporary NetBSD.) + For shared mappings, we should conversely verify that changes get + propogated back to all the places they're supposed to be. + + Grep wants private fixed already mapped. + The main things grep needs to know about mmap are: + * does it exist and is it safe to write into the mmap'd area + * how to use it (BSD variants) */ +#include +#include +#include + +/* + * Needed for Apollo Domain/OS and may be for others? + */ +#ifdef _MMAP_WITH_SIZEP +# define mmap_sizeparm(s) (&(s)) +#else +# define mmap_sizeparm(s) (s) +#endif + +/* This mess was copied from the GNU getpagesize.h. */ +#ifndef HAVE_GETPAGESIZE +# ifdef HAVE_UNISTD_H +# include +# endif + +/* Assume that all systems that can run configure have sys/param.h. */ +# ifndef HAVE_SYS_PARAM_H +# define HAVE_SYS_PARAM_H 1 +# endif + +# ifdef _SC_PAGESIZE +# define getpagesize() sysconf(_SC_PAGESIZE) +# else /* no _SC_PAGESIZE */ +# ifdef HAVE_SYS_PARAM_H +# include +# ifdef EXEC_PAGESIZE +# define getpagesize() EXEC_PAGESIZE +# else /* no EXEC_PAGESIZE */ +# ifdef NBPG +# define getpagesize() NBPG * CLSIZE +# ifndef CLSIZE +# define CLSIZE 1 +# endif /* no CLSIZE */ +# else /* no NBPG */ +# ifdef NBPC +# define getpagesize() NBPC +# else /* no NBPC */ +# ifdef PAGESIZE +# define getpagesize() PAGESIZE +# endif /* PAGESIZE */ +# endif /* no NBPC */ +# endif /* no NBPG */ +# endif /* no EXEC_PAGESIZE */ +# else /* no HAVE_SYS_PARAM_H */ +# define getpagesize() 8192 /* punt totally */ +# endif /* no HAVE_SYS_PARAM_H */ +# endif /* no _SC_PAGESIZE */ + +#endif /* no HAVE_GETPAGESIZE */ + +#ifdef __cplusplus +extern "C" { void *malloc(unsigned); } +#else +char *malloc(); +#endif + +int +main() +{ + char *data, *data2, *data3; + int i, pagesize; + int fd; + + pagesize = getpagesize(); + + /* + * First, make a file with some known garbage in it. + */ + data = malloc(pagesize); + if (!data) + exit(1); + for (i = 0; i < pagesize; ++i) + *(data + i) = rand(); + umask(0); + fd = creat("conftestmmap", 0600); + if (fd < 0) + exit(1); + if (write(fd, data, pagesize) != pagesize) + exit(1); + close(fd); + + /* + * Next, try to mmap the file at a fixed address which + * already has something else allocated at it. If we can, + * also make sure that we see the same garbage. + */ + fd = open("conftestmmap", O_RDWR); + if (fd < 0) + exit(1); + data2 = malloc(2 * pagesize); + if (!data2) + exit(1); + data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1); + if (data2 != mmap(data2, mmap_sizeparm(pagesize), PROT_READ | PROT_WRITE, + MAP_PRIVATE | MAP_FIXED, fd, 0L)) + exit(1); + for (i = 0; i < pagesize; ++i) + if (*(data + i) != *(data2 + i)) + exit(1); + + /* + * Finally, make sure that changes to the mapped area + * do not percolate back to the file as seen by read(). + * (This is a bug on some variants of i386 svr4.0.) + */ + for (i = 0; i < pagesize; ++i) + *(data2 + i) = *(data2 + i) + 1; + data3 = malloc(pagesize); + if (!data3) + exit(1); + if (read(fd, data3, pagesize) != pagesize) + exit(1); + for (i = 0; i < pagesize; ++i) + if (*(data + i) != *(data3 + i)) + exit(1); + close(fd); + unlink("conftestmmap"); + exit(0); +} +], ac_cv_func_mmap_fixed_mapped=yes, ac_cv_func_mmap_fixed_mapped=no, +ac_cv_func_mmap_fixed_mapped=no)]) +if test $ac_cv_func_mmap_fixed_mapped = yes; then + AC_DEFINE(HAVE_MMAP) +fi +]) + +AC_DEFUN([AC_MMAP_SIZEP], +[AC_CHECK_HEADERS(unistd.h)dnl +AC_REQUIRE([AC_FUNC_GETPAGESIZE])dnl +AC_CACHE_CHECK(for mmap that needs ptr to size, ac_cv_func_mmap_sizep, +[AC_TRY_RUN([ +#include +#include +#include +#include +#include + +#ifndef MAP_FILE +#define MAP_FILE 0 /* Needed on Apollo Domain/OS */ +#endif + +/* This mess was copied from the GNU getpagesize.h. */ +#ifndef HAVE_GETPAGESIZE +# ifdef HAVE_UNISTD_H +# include +# endif + +/* Assume that all systems that can run configure have sys/param.h. */ +# ifndef HAVE_SYS_PARAM_H +# define HAVE_SYS_PARAM_H 1 +# endif + +# ifdef _SC_PAGESIZE +# define getpagesize() sysconf(_SC_PAGESIZE) +# else /* no _SC_PAGESIZE */ +# ifdef HAVE_SYS_PARAM_H +# include +# ifdef EXEC_PAGESIZE +# define getpagesize() EXEC_PAGESIZE +# else /* no EXEC_PAGESIZE */ +# ifdef NBPG +# define getpagesize() NBPG * CLSIZE +# ifndef CLSIZE +# define CLSIZE 1 +# endif /* no CLSIZE */ +# else /* no NBPG */ +# ifdef NBPC +# define getpagesize() NBPC +# else /* no NBPC */ +# ifdef PAGESIZE +# define getpagesize() PAGESIZE +# endif /* PAGESIZE */ +# endif /* no NBPC */ +# endif /* no NBPG */ +# endif /* no EXEC_PAGESIZE */ +# else /* no HAVE_SYS_PARAM_H */ +# define getpagesize() 8192 /* punt totally */ +# endif /* no HAVE_SYS_PARAM_H */ +# endif /* no _SC_PAGESIZE */ + +#endif /* no HAVE_GETPAGESIZE */ + +#ifdef __cplusplus +extern "C" { void *malloc(unsigned); } +#else +char *malloc(); +#endif + +jmp_buf jenv; + +int +intr() +{ + signal(SIGSEGV, intr); + longjmp(jenv, 1); +} + +int +main() +{ + char *data, *data2; + int i, pagesize, ps; + int fd; + + pagesize = getpagesize(); + + /* + * First, make a file with some known garbage in it. + */ + data = malloc(pagesize); + if (!data) + exit(1); + for (i = 0; i < pagesize; ++i) + *(data + i) = rand(); + umask(0); + fd = creat("conftestmmap", 0600); + if (fd < 0) + exit(1); + if (write(fd, data, pagesize) != pagesize) + exit(1); + close(fd); + + /* + * Next, try to mmap the file at a fixed address which + * already has something else allocated at it. If we can, + * also make sure that we see the same garbage. + */ + fd = open("conftestmmap", O_RDWR); + if (fd < 0) + exit(1); + + /* + * Keep a copy, Apollo modifies the value... + */ + ps = pagesize; + + /* + * Apollo mmap() is not a syscall but a library function and fails + * if it tries to dereference 'ps'. We must use setjmp in order to + * catch the failure. + */ + signal(SIGSEGV, intr); + if (setjmp(jenv) == 0) { + data2 = mmap(0, ps, PROT_READ, MAP_FILE | MAP_PRIVATE, fd, 0L); + } else { + data2 = (char *)-1; + } + if (data2 != (char *)-1) + exit(1); + + signal(SIGSEGV, intr); + if (setjmp(jenv) == 0) { + data2 = mmap(0, &ps, PROT_READ, MAP_FILE | MAP_PRIVATE, fd, 0L); + } else { + data2 = (char *)-1; + } + if (data2 == (char *)-1) + exit(1); + + for (i = 0; i < pagesize; ++i) + if (*(data + i) != *(data2 + i)) + exit(1); + + close(fd); + unlink("conftestmmap"); + exit(0); +} +], ac_cv_func_mmap_sizep=yes, ac_cv_func_mmap_sizep=no, +ac_cv_func_mmap_sizep=no)]) +if test $ac_cv_func_mmap_sizep = yes; then + AC_DEFINE(_MMAP_WITH_SIZEP) +fi +]) + +dnl Checks if mmap() works to get shared memory +dnl Defines HAVE_SMMAP on success. +AC_DEFUN([AC_FUNC_SMMAP], +[AC_CACHE_CHECK([if mmap works to get shared memory], ac_cv_func_smmap, + [AC_TRY_RUN([ +#include +#include + +#ifndef MAP_ANONYMOUS +# ifdef MAP_ANON +# define MAP_ANONYMOUS MAP_ANON +# endif +#endif + +/* + * Needed for Apollo Domain/OS and may be for others? + */ +#ifdef _MMAP_WITH_SIZEP +# define mmap_sizeparm(s) (&(s)) +#else +# define mmap_sizeparm(s) (s) +#endif + +char * +mkshare() +{ + int size = 8192; + int f; + char *addr; + +#ifdef MAP_ANONYMOUS /* HP/UX */ + f = -1; + addr = mmap(0, mmap_sizeparm(size), PROT_READ|PROT_WRITE, MAP_SHARED|MAP_ANONYMOUS, f, 0); +#else + if ((f = open("/dev/zero", 2)) < 0) + exit(1); + addr = mmap(0, mmap_sizeparm(size), PROT_READ|PROT_WRITE, MAP_SHARED, f, 0); +#endif + if (addr == (char *)-1) + exit(1); + close(f); + + return (addr); +} + +int +main() +{ + char *addr; + + addr = mkshare(); + *addr = 'I'; + + switch (fork()) { + + case -1: + printf("help\n"); exit(1); + + case 0: /* child */ + *addr = 'N'; + _exit(0); + break; + default: /* parent */ + wait(0); + sleep(1); + break; + } + + if (*addr != 'N') + exit(1); + exit(0); +} +], + [ac_cv_func_smmap=yes], + [ac_cv_func_smmap=no], + [ac_cv_func_smmap=no])]) +if test $ac_cv_func_smmap = yes; then + AC_DEFINE(HAVE_SMMAP) +fi]) + +dnl Checks if shmget() works to get shared memory +dnl Defines HAVE_SHMGET on success. +AC_DEFUN([AC_FUNC_SHMGET], +[AC_CACHE_CHECK([if shmget works to get shared memory], ac_cv_func_shmget, + [AC_TRY_RUN([ +#include +#include +#include +int +main() +{ + int id; + + id = shmget(IPC_PRIVATE, 0x1, IPC_CREAT|0600); + if (id == -1) + exit(1); + shmctl(id, IPC_RMID, 0); + exit(0); +} +], + [ac_cv_func_shmget=yes], + [ac_cv_func_shmget=no], + [ac_cv_func_shmget=no])]) +if test $ac_cv_func_shmget = yes; then + AC_DEFINE(HAVE_SHMGET) +fi]) + +dnl Checks if sys_siglist[] exists +dnl Defines HAVE_SYS_SIGLIST on success. +AC_DEFUN([AC_FUNC_SYS_SIGLIST], +[AC_CACHE_CHECK([for sys_siglist], ac_cv_func_sys_siglist, + [AC_TRY_RUN([ +int +main() +{ extern char *sys_siglist[]; +if (sys_siglist[1] == 0) + exit(1); +exit(0);}], + [ac_cv_func_sys_siglist=yes], + [ac_cv_func_sys_siglist=no])]) +if test $ac_cv_func_sys_siglist = yes; then + AC_DEFINE(HAVE_SYS_SIGLIST) +fi]) + +dnl Checks for maximum number of bits in minor device number +AC_DEFUN([AC_CHECK_MINOR_BITS], +[AC_REQUIRE([AC_HEADER_MAKEDEV])dnl +changequote(<<, >>)dnl +define(<>, DEV_MINOR_BITS)dnl +dnl The cache variable name. +define(<>, ac_cv_dev_minor_bits)dnl +changequote([, ])dnl +AC_MSG_CHECKING(bits in minor device number) +AC_CACHE_VAL(AC_CV_NAME, +[AC_TRY_RUN([#include +#include +#ifdef major +# define _FOUND_MAJOR_ +#endif + +#ifdef MAJOR_IN_MKDEV +# include +# define _FOUND_MAJOR_ +#endif + +#ifndef _FOUND_MAJOR_ +# ifdef MAJOR_IN_SYSMACROS +# include +# define _FOUND_MAJOR_ +# endif +#endif + +#ifndef _FOUND_MAJOR_ +# if defined(hpux) || defined(__hpux__) || defined(__hpux) +# include +# define _FOUND_MAJOR_ +# endif +#endif + +#ifndef _FOUND_MAJOR_ +# define major(dev) (((dev) >> 8) & 0xFF) +# define minor(dev) ((dev) & 0xFF) +# define makedev(majo, mino) (((majo) << 8) | (mino)) +#endif +int +main() +{ + long l = 1; + int i; + int m; + int c = 0; + FILE *f=fopen("conftestval", "w"); + int maxloop = 32; + + if (sizeof (long) > 4) + maxloop = 64; + + if (!f) exit(1); + + for (i=1, m=0; i <= maxloop; i++, l<<=1) { + if (minor(l) == 0 && c == 0) + c = m; + if (minor(l) != 0) + m = i; + } + fprintf(f, "%d\n", m); + exit(0); +}], AC_CV_NAME=`cat conftestval`, AC_CV_NAME=0, ifelse([$2], , , AC_CV_NAME=$2))])dnl +AC_MSG_RESULT($AC_CV_NAME) +AC_DEFINE_UNQUOTED(AC_MACRO_NAME, $AC_CV_NAME) +undefine([AC_MACRO_NAME])dnl +undefine([AC_CV_NAME])dnl +]) + +dnl Checks for maximum number of bits in minor device numbers are non contiguous +dnl Defines DEV_MINOR_NONCONTIG on success. +AC_DEFUN([AC_CHECK_MINOR_NONCONTIG], +[AC_REQUIRE([AC_HEADER_MAKEDEV])dnl +AC_CACHE_CHECK([whether bits in minor device numbers are non contiguous], ac_cv_dev_minor_noncontig, + [AC_TRY_RUN([ +#include +#ifdef major +# define _FOUND_MAJOR_ +#endif + +#ifdef MAJOR_IN_MKDEV +# include +# define _FOUND_MAJOR_ +#endif + +#ifndef _FOUND_MAJOR_ +# ifdef MAJOR_IN_SYSMACROS +# include +# define _FOUND_MAJOR_ +# endif +#endif + +#ifndef _FOUND_MAJOR_ +# if defined(hpux) || defined(__hpux__) || defined(__hpux) +# include +# define _FOUND_MAJOR_ +# endif +#endif + +#ifndef _FOUND_MAJOR_ +# define major(dev) (((dev) >> 8) & 0xFF) +# define minor(dev) ((dev) & 0xFF) +# define makedev(majo, mino) (((majo) << 8) | (mino)) +#endif +int +main() +{ + long l = 1; + int i; + int m; + int c = 0; + int maxloop = 32; + + if (sizeof (long) > 4) + maxloop = 64; + + for (i=1, m=0; i <= maxloop; i++, l<<=1) { + if (minor(l) == 0 && c == 0) + c = m; + if (minor(l) != 0) + m = i; + } +exit (m == c);}], + [ac_cv_dev_minor_noncontig=yes], + [ac_cv_dev_minor_noncontig=no])]) +if test $ac_cv_dev_minor_noncontig = yes; then + AC_DEFINE(DEV_MINOR_NONCONTIG) +fi]) + +dnl Checks if we may not define our own malloc() +dnl Defines NO_USER_MALLOC if we cannot. +AC_DEFUN([AC_USER_MALLOC], +[AC_CACHE_CHECK([if we may not define our own malloc()], ac_cv_no_user_malloc, + [AC_TRY_RUN([ +#if !defined(__CYGWIN32__) && !defined(__CYGWIN__) +static int mcalled; +char * +malloc(s) + int s; +{ + extern char *sbrk(); + + /* + * Don't ask me why, but with Cygwin on 64 Bit Vista this hangs + * infinitely and is undebuggable unless we call write() here... + */ + write(2, "", 0); + mcalled++; + _exit(0); + return (sbrk(s)); +} + +free(p) char *p;{} +#endif /* !defined(__CYGWIN32__) && !defined(__CYGWIN__) */ + +main() +{ +#if !defined(__CYGWIN32__) && !defined(__CYGWIN__) +#ifdef HAVE_STRDUP + strdup("aaa"); +#else + exit(0); +#endif +#endif /* !defined(__CYGWIN32__) && !defined(__CYGWIN__) */ + exit(1);}], + [ac_cv_no_user_malloc=no], + [ac_cv_no_user_malloc=yes])]) +if test $ac_cv_no_user_malloc = yes; then + AC_DEFINE(NO_USER_MALLOC) +fi]) + +dnl Checks if ecvt()/fcvt()/gcvt() may be replaced by local implementations +dnl There are known problems on ATARI MINT and older Linux version and statical linking +dnl Defines NO_USER_XCVT on failure. +AC_DEFUN([AC_USER_XCVT], +[AC_CACHE_CHECK([if we may not define our own ecvt()/fcvt()/gcvt()], ac_cv_no_user_xcvt, + [AC_TRY_LINK([ +#include + +char * +ecvt(value, ndig, decpt, sign) + double value; + int ndig; + int *decpt; + int *sign; +{ + return ("ecvt-test"); +} + +char * +fcvt(value, ndig, decpt, sign) + double value; + int ndig; + int *decpt; + int *sign; +{ + return ("fcvt-test"); +} + +char * +gcvt(value, ndig, bp) + double value; + int ndig; + char *bp; +{ + return ("gcvt-test"); +} +], + [ + char buf[64]; + + printf("E: %e F: %f G: %g local gcvt: %s\n", 1.234, 1.234, 1.234, gcvt(1.234, 4, buf)); +], + [ac_cv_no_user_xcvt=no], + [ac_cv_no_user_xcvt=yes])]) +if test $ac_cv_no_user_xcvt = yes; then + AC_DEFINE(NO_USER_XCVT) +fi]) + +dnl Checks if BSD-4.2 compliant getpgrp() exists +dnl Defines HAVE_BSD_GETPGRP on success. +AC_DEFUN([AC_FUNC_BSD_GETPGRP], +[AC_CACHE_CHECK([for BSD compliant getpgrp], ac_cv_func_bsd_getpgrp, + [AC_TRY_RUN([ +int +main() +{ long p; +/* + * POSIX getpgrp() has void parameter... + */ + p = getpgrp(-1); + if (p == getpgrp(1) && p == getpgrp(getpid())) + exit(1); +exit(0);}], + [ac_cv_func_bsd_getpgrp=yes], + [ac_cv_func_bsd_getpgrp=no])]) +if test $ac_cv_func_bsd_getpgrp = yes; then + AC_DEFINE(HAVE_BSD_GETPGRP) +fi]) + +dnl Checks if BSD-4.2 compliant setpgrp() exists +dnl Defines HAVE_BSD_SETPGRP on success. +AC_DEFUN([AC_FUNC_BSD_SETPGRP], +[AC_REQUIRE([AC_HEADER_ERRNO_DEF])dnl +AC_CACHE_CHECK([for BSD compliant setpgrp], ac_cv_func_bsd_setpgrp, + [AC_TRY_RUN([ +#include +#ifndef HAVE_ERRNO_DEF +extern int errno; +#endif +int +main() +{ errno = 0; +/* + * Force illegal pid on BSD + */ +if (setpgrp(-1, 100) < 0 && errno == ESRCH) + exit(0); +exit(1);}], + [ac_cv_func_bsd_setpgrp=yes], + [ac_cv_func_bsd_setpgrp=no])]) +if test $ac_cv_func_bsd_setpgrp = yes; then + AC_DEFINE(HAVE_BSD_SETPGRP) +fi]) + +dnl Checks if *printf() supports %jd +dnl Defines HAVE_PRINTF_J on success. +AC_DEFUN([AC_FUNC_PRINTF_J], +[AC_CACHE_CHECK([whether *printf() supports %jd], ac_cv_func_printf_j, + [AC_TRY_RUN([ +#include +int +main() +{ intmax_t m = 123456789012LL; +char buf[32]; +sprintf(buf, "%jd", m); +if (strcmp(buf, "123456789012") == 0) + exit(0); +exit(1);}], + [ac_cv_func_printf_j=yes], + [ac_cv_func_printf_j=no])]) +if test $ac_cv_func_printf_j = yes; then + AC_DEFINE(HAVE_PRINTF_J) +fi]) + +dnl Checks if *printf() supports %zd +dnl Defines HAVE_PRINTF_Z on success. +AC_DEFUN([AC_FUNC_PRINTF_Z], +[AC_CACHE_CHECK([whether *printf() supports %zd], ac_cv_func_printf_z, + [AC_TRY_RUN([ +#include +int +main() +{ size_t m = 1234567890; +char buf[32]; +sprintf(buf, "%zd", m); +if (strcmp(buf, "1234567890") == 0) + exit(0); +exit(1);}], + [ac_cv_func_printf_z=yes], + [ac_cv_func_printf_z=no])]) +if test $ac_cv_func_printf_z = yes; then + AC_DEFINE(HAVE_PRINTF_Z) +fi]) + +dnl Checks if *printf() supports %lld +dnl Defines HAVE_PRINTF_LL on success. +AC_DEFUN([AC_FUNC_PRINTF_LL], +[AC_CACHE_CHECK([whether *printf() supports %lld], ac_cv_func_printf_ll, + [AC_TRY_RUN([ +int +main() +{ long long ll = 123456789012LL; +char buf[32]; +sprintf(buf, "%lld", ll); +if (strcmp(buf, "123456789012") == 0) + exit(0); +exit(1);}], + [ac_cv_func_printf_ll=yes], + [ac_cv_func_printf_ll=no])]) +if test $ac_cv_func_printf_ll = yes; then + AC_DEFINE(HAVE_PRINTF_LL) +fi]) + +dnl Checks if C99 compliant isinf() exists +dnl Defines HAVE_C99_ISINF on success. +AC_DEFUN([AC_FUNC_C99_ISINF], +[AC_CACHE_CHECK([for C99 compliant isinf], ac_cv_func_c99_isinf, + [AC_TRY_LINK([#include ], [ double d; +#ifndef isinf +The isinf macro is not defined +#endif +return (isinf(d)); +], + [ac_cv_func_c99_isinf=yes], + [ac_cv_func_c99_isinf=no])]) +if test $ac_cv_func_c99_isinf = yes; then + AC_DEFINE(HAVE_C99_ISINF) +fi]) + +dnl Checks if C99 compliant isnan() exists +dnl Defines HAVE_C99_ISNAN on success. +AC_DEFUN([AC_FUNC_C99_ISNAN], +[AC_CACHE_CHECK([for C99 compliant isnan], ac_cv_func_c99_isnan, + [AC_TRY_LINK([#include ], [ double d; +#ifndef isnan +The isnan macro is not defined +#endif +return (isnan(d)); +], + [ac_cv_func_c99_isnan=yes], + [ac_cv_func_c99_isnan=no])]) +if test $ac_cv_func_c99_isnan = yes; then + AC_DEFINE(HAVE_C99_ISNAN) +fi]) + +dnl Checks if select() needs more than sys/time.h & sys/types.h +dnl Defines SELECT_NONSTD_HDR on success. +AC_DEFUN([AC_HEADER_SELECT_NONSTD], +[AC_CACHE_CHECK([if select needs nonstd include files], ac_cv_header_slect_nonstd_hdr, + [AC_TRY_COMPILE([#include +#include ], + [fd_set rfd; FD_ZERO(&rfd); select(1, &rfd, 0, 0, 0);], + [ac_cv_header_slect_nonstd_hdr=no], + [ac_cv_header_slect_nonstd_hdr=yes])]) +if test $ac_cv_header_slect_nonstd_hdr = yes; then + AC_DEFINE(SELECT_NONSTD_HDR) +fi]) + +dnl Checks if select() needs sys/select.h +dnl Defines NEED_SYS_SELECT_H on success. +AC_DEFUN([AC_HEADER_SYS_SELECT], +[AC_REQUIRE([AC_HEADER_SELECT_NONSTD])dnl +AC_CACHE_CHECK([if sys/select.h is needed for select], ac_cv_header_need_sys_select_h, + [AC_TRY_COMPILE([#include +#include +#include +#ifndef SELECT_NONSTD_HDR +do not compile if we do not need nonstandard headers +#endif], + [fd_set rfd; FD_ZERO(&rfd); select(1, &rfd, 0, 0, 0);], + [ac_cv_header_need_sys_select_h=yes], + [ac_cv_header_need_sys_select_h=no])]) +if test $ac_cv_header_need_sys_select_h = yes; then + AC_DEFINE(NEED_SYS_SELECT_H) +fi]) + +dnl Checks if select() needs sys/socket.h +dnl Defines NEED_SYS_SOCKET_H on success. +AC_DEFUN([AC_HEADER_SELECT2], +[AC_REQUIRE([AC_HEADER_SELECT_NONSTD])dnl +AC_CACHE_CHECK([if sys/socket.h is needed for select], ac_cv_header_need_sys_socket_h, + [AC_TRY_COMPILE([#include +#include +#include +#ifndef SELECT_NONSTD_HDR +do not compile if we do not need nonstandard headers +#endif], + [fd_set rfd; FD_ZERO(&rfd); select(1, &rfd, 0, 0, 0);], + [ac_cv_header_need_sys_socket_h=yes], + [ac_cv_header_need_sys_socket_h=no])]) +if test $ac_cv_header_need_sys_socket_h = yes; then + AC_DEFINE(NEED_SYS_SOCKET_H) +fi]) + +dnl Checks if file locking via fcntl() is available +dnl Defines HAVE_FCNTL_LOCKF on success. +AC_DEFUN([AC_FUNC_FCNTL_LOCKF], +[AC_CACHE_CHECK([for file locking via fcntl], ac_cv_func_fcntl_lock, + [AC_TRY_LINK([ +#include +#include ], + [ +struct flock fl; +fcntl(0, F_SETLK, &fl);], + [ac_cv_func_fcntl_lock=yes], + [ac_cv_func_fcntl_lock=no])]) +if test $ac_cv_func_fcntl_lock = yes; then + AC_DEFINE(HAVE_FCNTL_LOCKF) +fi]) + + +dnl Checks if sigsetjmp() is available +dnl Defines HAVE_SIGSETJMP on success. +AC_DEFUN([AC_FUNC_SIGSETJMP], +[AC_CACHE_CHECK([for sigsetjmp], ac_cv_func_sigsetjmp, + [AC_TRY_LINK([ +#include ], + [ +sigjmp_buf jb; +sigsetjmp(jb, 1);], + [ac_cv_func_sigsetjmp=yes], + [ac_cv_func_sigsetjmp=no])]) +if test $ac_cv_func_sigsetjmp = yes; then + AC_DEFINE(HAVE_SIGSETJMP) +fi]) + +dnl Checks if siglongjmp() is available +dnl Defines HAVE_SIGLONGJMP on success. +AC_DEFUN([AC_FUNC_SIGLONGJMP], +[AC_CACHE_CHECK([for siglongjmp], ac_cv_func_siglongjmp, + [AC_TRY_LINK([ +#include ], + [ +sigjmp_buf jb; +sigsetjmp(jb, 1); +siglongjmp(jb, 1);], + [ac_cv_func_siglongjmp=yes], + [ac_cv_func_siglongjmp=no])]) +if test $ac_cv_func_siglongjmp = yes; then + AC_DEFINE(HAVE_SIGLONGJMP) +fi]) + + +dnl Checks if link() allows hard links on symlinks +dnl Defines HAVE_HARD_SYMLINKS on success. +AC_DEFUN([AC_HARD_SYMLINKS], +[AC_CACHE_CHECK([if link() allows hard links on symlinks], ac_cv_hard_symlinks, + [AC_TRY_RUN([ +main() +{ + int ret = 0; + + unlink("confdefs.f1"); + unlink("confdefs.l1"); + unlink("confdefs.h1"); + + if (symlink("confdefs.f1", "confdefs.l1") < 0) + ret = 1; + if (link("confdefs.l1", "confdefs.h1") < 0) + ret = 1; + + unlink("confdefs.l1"); + unlink("confdefs.h1"); + + exit(ret); +}], + [ac_cv_hard_symlinks=yes], + [ac_cv_hard_symlinks=no])]) +if test $ac_cv_hard_symlinks = yes; then + AC_DEFINE(HAVE_HARD_SYMLINKS) +fi]) + + +dnl Checks if link() does not follow symlinks +dnl Defines HAVE_LINK_NOFOLLOW on success. +AC_DEFUN([AC_LINK_NOFOLLOW], +[AC_CACHE_CHECK([if link() does not folow symlinks], ac_cv_link_nofollow, + [AC_TRY_RUN([ +#include +#include + +main() +{ + int ret = 0; + int f; + struct stat sb; + + unlink("confdefs.f1"); + unlink("confdefs.l1"); + unlink("confdefs.h1"); + + f = creat("confdefs.f1", 0666); + close(f); + if (symlink("confdefs.f1", "confdefs.l1") < 0) + ret = 1; + if (link("confdefs.l1", "confdefs.h1") < 0) + ret = 1; + + stat("confdefs.f1", &sb); + if (sb.st_nlink == 2) + ret = 1; + + unlink("confdefs.f1"); + unlink("confdefs.l1"); + unlink("confdefs.h1"); + + exit(ret); +}], + [ac_cv_link_nofollow=yes], + [ac_cv_link_nofollow=no])]) +if test $ac_cv_link_nofollow = yes; then + AC_DEFINE(HAVE_LINK_NOFOLLOW) +fi]) + +dnl Checks if access() does implement E_OK (010) for effective UIDs +dnl Defines HAVE_ACCESS_E_OK on success. +AC_DEFUN([AC_ACCESS_E_OK], +[AC_REQUIRE([AC_HEADER_ERRNO_DEF])dnl +AC_CHECK_HEADERS(unistd.h) +AC_CACHE_CHECK([if access() does implement E_OK], ac_cv_access_e_ok, + [AC_TRY_RUN([ +# ifdef HAVE_UNISTD_H +# include +# endif +#ifndef R_OK +#define R_OK 4 /* Test for Read permission */ +#define W_OK 2 /* Test for Write permission */ +#define X_OK 1 /* Test for eXecute permission */ +#define F_OK 0 /* Test for existence of File */ +#endif + +#ifndef E_OK +#ifdef EFF_ONLY_OK +#define E_OK EFF_ONLY_OK /* Irix */ +#else +#ifdef EUID_OK +#define E_OK EUID_OK /* UNICOS (0400) */ +#else +#define E_OK 010 /* Test effective uids */ +#endif +#endif +#endif + +#include +#ifndef HAVE_ERRNO_DEF +extern int errno; +#endif + +main() +{ +#ifdef _MSC_VER +/* + * If we use "cl" to compile and call access(".", E_OK|F_OK), the program will + * cause an exception that results in a popup window. For this reason, the test + * is disabled for "cl", it would not work anyway. + */ + int ret = 1; +#else + int ret = 0; + + if (access(".", F_OK) != 0) + ret = 1; + else if (access(".", E_OK|F_OK) != 0) + ret = 1; + else if (access(".", (R_OK<<4)|F_OK) == 0) + ret = 1; +#endif + + exit(ret); +}], + [ac_cv_access_e_ok=yes], + [ac_cv_access_e_ok=no])]) +if test $ac_cv_access_e_ok = yes; then + AC_DEFINE(HAVE_ACCESS_E_OK) +fi]) + +dnl Checks if fnmatch() does implement FNM_IGNORECASE +dnl Defines HAVE_FNMATCH_IGNORECASE on success. +AC_DEFUN([AC_FNMATCH_IGNORECASE], +[AC_CHECK_HEADERS(fnmatch.h) +AC_CACHE_CHECK([if fnmatch() does implement FNM_IGNORECASE or FNM_CASEFOLD], ac_cv_fnmatch_igncase, + [AC_TRY_RUN([ +#ifdef HAVE_FNMATCH +#include +#endif + +#ifndef FNM_IGNORECASE +#ifdef FNM_CASEFOLD +#define FNM_IGNORECASE FNM_CASEFOLD +#endif +#endif + +main() +{ + int ret; + + ret = fnmatch("a", "A", FNM_IGNORECASE); + exit(ret); +}], + [ac_cv_fnmatch_igncase=yes], + [ac_cv_fnmatch_igncase=no])]) +if test $ac_cv_fnmatch_igncase = yes; then + AC_DEFINE(HAVE_FNMATCH_IGNORECASE) +fi]) + + + +dnl Checks if realloc() does implement realloc(NULL, size) +dnl Defines HAVE_REALLOC_NULL on success. +AC_DEFUN([AC_FUNC_REALLOC_NULL], +[AC_CHECK_HEADERS(stdlib.h) +AC_TYPE_SIGNAL +AC_CACHE_CHECK([if realloc() does implement realloc(NULL, size)], ac_cv_realloc_null, + [AC_TRY_RUN([ +#ifdef HAVE_STDLIB_H +#include +#endif +#include + +RETSIGTYPE +sig(s) + int s; +{ + exit(1); +} +int +main() +{ + char *p; + + signal(SIGSEGV, sig); + p = realloc((char *)0, 10); + if (p == (char *)0) + exit(1); + exit(0); +}], + [ac_cv_realloc_null=yes], + [ac_cv_realloc_null=no])]) +if test $ac_cv_realloc_null = yes; then + AC_DEFINE(HAVE_REALLOC_NULL) +fi]) + + +dnl Checks if waitid() is present and is at least minimally usable. +dnl Mac OS X is POSIX certified but definitely not POSIX compliant +dnl so we need to to implement a complex test for waitid(). +dnl Defines HAVE_WAITID on success. +AC_DEFUN([AC_FUNC_WAITID], +[AC_CHECK_HEADERS(stdlib.h) +AC_CHECK_HEADERS(unistd.h) +AC_CHECK_HEADERS(wait.h) +AC_HEADER_SYS_WAIT +AC_CACHE_CHECK([for halfway POSIX compliant waitid()], ac_cv_func_waitid, + [AC_TRY_RUN([ +#ifdef HAVE_STDLIB_H +#include +#endif +#ifdef HAVE_UNISTD_H +#include +#endif +#if defined(HAVE_WAIT_H) +# include +#else +#include +#endif +#include +/* + * Non-standard compliant platforms may need + * #include or something similar + * in addition to the include files above. + */ + +int +main() +{ + siginfo_t si; + pid_t pid; + int ret; + + if ((pid = fork()) < 0) + exit(1); + if (pid == 0) { + _exit(1234567890); + } + ret = waitid(P_PID, pid, &si, WEXITED); + if (ret < 0) + exit(1); + if (pid != si.si_pid) /* Mac OS X has si.si_pid == 0 */ + exit(2); + if (si.si_code != CLD_EXITED) /* Mac OS X has si.si_code == 0 */ + exit(3); + if ((si.si_status & 0xFFFF) != (1234567890 & 0xFFFF)) + exit(4); /* Should deliver more than 8 bits */ + /* Linux only delivers 8 bits */ + /* Mac OS X delivers 24 bits */ + + exit(0); +}], + [ac_cv_func_waitid=yes], + [ac_cv_func_waitid=no])]) +if test $ac_cv_func_waitid = yes; then + AC_DEFINE(HAVE_WAITID) +fi]) + + +dnl Checks whether waitpid() is present and supports WNOWAIT. +dnl SVr4 supports it but POSIX does not list it. +dnl Defines HAVE_WNOWAIT_WAITPID on success. +AC_DEFUN([AC_WNOWAIT_WAITPID], +[AC_CHECK_HEADERS(stdlib.h) +AC_CHECK_HEADERS(unistd.h) +AC_CHECK_HEADERS(wait.h) +AC_HEADER_SYS_WAIT +AC_HEADER_ERRNO_DEF +AC_CACHE_CHECK([for SVr4 compliant waitpid() with WNOWAIT support], ac_cv_wnowait_waitpid, + [AC_TRY_RUN([ +#ifdef HAVE_STDLIB_H +#include +#endif +#ifdef HAVE_UNISTD_H +#include +#endif +#if defined(HAVE_WAIT_H) +# include +#else +#include +#endif +#include +#ifndef HAVE_ERRNO_DEF +extern int errno; +#endif + +int +main() +{ + int xstat; + pid_t pid = -1; + int ret; + + ret = waitpid(pid, &xstat, WNOWAIT); + if (ret < 0 && errno == EINVAL) + exit(1); + exit(0); +}], + [ac_cv_wnowait_waitpid=yes], + [ac_cv_wnowait_waitpid=no])]) +if test $ac_cv_wnowait_waitpid = yes; then + AC_DEFINE(HAVE_WNOWAIT_WAITPID) +fi]) + + +dnl XXXXXXXXXXXXXXXXXX Begin Stolen (but modified) from GNU tar XXXXXXXXXXXXXXXXXXXXXXXXXXX +dnl Changes: + +dnl One line has been changed to: [ac_save_CC="${CC-cc}" to default to "'cc" + +dnl AC_SYS_LARGEFILE_MACRO_VALUE test moved from AC_FUNC_FSEEKO into AC_SYS_LARGEFILE +dnl Do not call AC_FUNC_FSEEKO because it does not check whether fseeko() is +dnl available on non Large File mode. There are additionoal tests for fseeko()/ftello() +dnl inside the AC_HAVE_LARGEFILES test. + +dnl largefile_cc_opt definition added + +#serial 18 + +dnl By default, many hosts won't let programs access large files; +dnl one must use special compiler options to get large-file access to work. +dnl For more details about this brain damage please see: +dnl http://www.sas.com/standards/large.file/x_open.20Mar96.html + +dnl Written by Paul Eggert . + +dnl Internal subroutine of AC_SYS_LARGEFILE. +dnl AC_SYS_LARGEFILE_TEST_INCLUDES +AC_DEFUN([AC_SYS_LARGEFILE_TEST_INCLUDES], + [[#include + /* Check that off_t can represent 2**63 - 1 correctly. + We can't simply "#define LARGE_OFF_T 9223372036854775807", + since some C++ compilers masquerading as C compilers + incorrectly reject 9223372036854775807. */ +# define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) + int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 + && LARGE_OFF_T % 2147483647 == 1) + ? 1 : -1]; + ]]) + +dnl Internal subroutine of AC_SYS_LARGEFILE. +dnl AC_SYS_LARGEFILE_MACRO_VALUE(C-MACRO, VALUE, CACHE-VAR, COMMENT, INCLUDES, FUNCTION-BODY) +AC_DEFUN([AC_SYS_LARGEFILE_MACRO_VALUE], + [AC_CACHE_CHECK([for $1 value needed for large files], $3, + [$3=no + AC_TRY_COMPILE([$5], + [$6], + , + [AC_TRY_COMPILE([#define $1 $2] +[$5] + , + [$6], + [$3=$2])])]) + if test "[$]$3" != no; then + AC_DEFINE_UNQUOTED([$1], [$]$3, [$4]) + fi]) + +AC_DEFUN([AC_SYS_LARGEFILE], + [AC_ARG_ENABLE(largefile, + [ --disable-largefile omit support for large files]) + if test "$enable_largefile" != no; then + + AC_CACHE_CHECK([for special C compiler options needed for large files], + ac_cv_sys_largefile_CC, + [ac_cv_sys_largefile_CC=no + largefile_cc_opt="" + if test "$GCC" != yes; then + # IRIX 6.2 and later do not support large files by default, + # so use the C compiler's -n32 option if that helps. + AC_TRY_COMPILE(AC_SYS_LARGEFILE_TEST_INCLUDES, , , + [ac_save_CC="${CC-cc}" + CC="$CC -n32" + AC_TRY_COMPILE(AC_SYS_LARGEFILE_TEST_INCLUDES, , + ac_cv_sys_largefile_CC=' -n32') + CC="$ac_save_CC"]) + fi]) + if test "$ac_cv_sys_largefile_CC" != no; then + CC="$CC$ac_cv_sys_largefile_CC" + largefile_cc_opt="$ac_cv_sys_largefile_CC" + fi + + AC_SYS_LARGEFILE_MACRO_VALUE(_FILE_OFFSET_BITS, 64, + ac_cv_sys_file_offset_bits, + [Number of bits in a file offset, on hosts where this is settable.], + AC_SYS_LARGEFILE_TEST_INCLUDES) + AC_SYS_LARGEFILE_MACRO_VALUE(_LARGE_FILES, 1, + ac_cv_sys_large_files, + [Define for large files, on AIX-style hosts.], + AC_SYS_LARGEFILE_TEST_INCLUDES) + AC_SYS_LARGEFILE_MACRO_VALUE(_LARGEFILE_SOURCE, 1, + ac_cv_sys_largefile_source, + [Define to make fseeko visible on some hosts (e.g. glibc 2.2).], + [#include ], [return !fseeko;]) + fi + ]) + + +AC_DEFUN([AC_FUNC_FSEEKO], + [AC_SYS_LARGEFILE_MACRO_VALUE(_LARGEFILE_SOURCE, 1, + ac_cv_sys_largefile_source, + [Define to make fseeko visible on some hosts (e.g. glibc 2.2).], + [#include ], [return !fseeko;]) + # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug + # in glibc 2.1.3, but that breaks too many other things. + # If you want fseeko and ftello with glibc, upgrade to a fixed glibc. + + AC_CACHE_CHECK([for fseeko], ac_cv_func_fseeko, + [ac_cv_func_fseeko=no + AC_TRY_LINK([#include ], + [return fseeko && fseeko (stdin, 0, 0);], + [ac_cv_func_fseeko=yes])]) + if test $ac_cv_func_fseeko != no; then + AC_DEFINE(HAVE_FSEEKO, 1, + [Define if fseeko (and presumably ftello) exists and is declared.]) + fi]) + + +dnl XXXXXXXXXXXXXXXXXX End Stolen (but modified) from GNU tar XXXXXXXXXXXXXXXXXXXXXXXXXXXXX + +AC_DEFUN([AC_HAVE_LARGEFILES], +[AC_CACHE_CHECK([if system supports Large Files at all], ac_cv_largefiles, + [AC_TRY_COMPILE([#include +#include ], + [ +/* + * Check that off_t can represent 2**63 - 1 correctly. + * We can't simply "#define LARGE_OFF_T 9223372036854775807", + * since some C++ compilers masquerading as C compilers + * incorrectly reject 9223372036854775807. + */ +# define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) + int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 + && LARGE_OFF_T % 2147483647 == 1) + ? 1 : -1]; +return !fseeko; +return !ftello;], + [ac_cv_largefiles=yes], + [ac_cv_largefiles=no])]) + if test $ac_cv_largefiles = yes; then + AC_DEFINE(HAVE_LARGEFILES) + fi]) + +dnl Checks for whether fseeko() is available in non large file mode +dnl and whether there is a prototype for fseeko() +dnl Defines HAVE_FSEEKO on success. +AC_DEFUN([AC_SMALL_FSEEKO], +[AC_CACHE_CHECK([for fseeko()], ac_cv_func_fseeko, + [AC_TRY_LINK([#include ], +[return !fseeko;], + [ac_cv_func_fseeko=yes], + [ac_cv_func_fseeko=no])]) +if test $ac_cv_func_fseeko = yes; then + AC_DEFINE(HAVE_FSEEKO) +fi]) + +dnl Checks for whether ftello() is available in non large file mode +dnl and whether there is a prototype for ftello() +dnl Defines HAVE_FTELLO on success. +AC_DEFUN([AC_SMALL_FTELLO], +[AC_CACHE_CHECK([for ftello()], ac_cv_func_ftello, + [AC_TRY_LINK([#include ], +[return !ftello;], + [ac_cv_func_ftello=yes], + [ac_cv_func_ftello=no])]) +if test $ac_cv_func_ftello = yes; then + AC_DEFINE(HAVE_FTELLO) +fi]) + +dnl Checks if compiler allows dynamic arrays. +dnl Defines HAVE_DYN_ARRAYS on success. +AC_DEFUN([AC_DYN_ARRAYS], +[AC_CACHE_CHECK([if compiler allows dynamic arrays], ac_cv_dyn_arrays, + [AC_TRY_COMPILE([], + [extern int __aa(); int len = __aa(); char some_array[len];], + [ac_cv_dyn_arrays=yes], + [ac_cv_dyn_arrays=no])]) +if test $ac_cv_dyn_arrays = yes; then + AC_DEFINE(HAVE_DYN_ARRAYS) +fi]) + +dnl Checks if the compiler allows #pragma weak +dnl Defines HAVE_PRAGMA_WEAK on success. +AC_DEFUN([AC_PRAGMA_WEAK], +[AC_CACHE_CHECK([if compiler allows pragma weak], ac_cv_pragma_weak, + [AC_TRY_LINK([extern int test2(); +#pragma weak test2 = test1 +int test1() {return 0;}], +[return test2();], + [ac_cv_pragma_weak=yes], + [ac_cv_pragma_weak=no])]) +if test $ac_cv_pragma_weak = yes; then + AC_DEFINE(HAVE_PRAGMA_WEAK) +fi]) + +dnl Checks if Linux include file linux/ext2_fs.h is broken +dnl Defines HAVE_BROKEN_LINUX_EXT2_FS_H on success. +AC_DEFUN([AC_BROKEN_LINUX_EXT2_FS_H], +[AC_CACHE_CHECK([if Linux include file linux/ext2_fs.h is broken], ac_cv_broken_linux_ext2_fs_h, + [AC_TRY_COMPILE([ +#if defined(__linux__) || defined(__linux) || defined(linux) +#include +#endif], + [], + [ac_cv_broken_linux_ext2_fs_h=no], + [ac_cv_broken_linux_ext2_fs_h=yes])]) +if test $ac_cv_broken_linux_ext2_fs_h = yes; then + AC_DEFINE(HAVE_BROKEN_LINUX_EXT2_FS_H) +fi]) + +dnl Checks if Linux include file /usr/src/linux/include/linux/ext2_fs.h is broken +dnl Defines HAVE_BROKEN_SRC_LINUX_EXT2_FS_H on success. +AC_DEFUN([AC_BROKEN_SRC_LINUX_EXT2_FS_H], +[AC_CACHE_CHECK([if Linux include file /usr/src/linux/include/linux/ext2_fs.h is broken], ac_cv_broken_src_linux_ext2_fs_h, + [___CPPFLAGS=$CPPFLAGS; CPPFLAGS="-I/usr/src/linux/include $CPPFLAGS" + AC_TRY_COMPILE([ +#if defined(__linux__) || defined(__linux) || defined(linux) +#include +#endif], + [], + [ac_cv_broken_src_linux_ext2_fs_h=no], + [ac_cv_broken_src_linux_ext2_fs_h=yes])]) +CPPFLAGS=$___CPPFLAGS +if test $ac_cv_broken_src_linux_ext2_fs_h = yes; then + AC_DEFINE(HAVE_BROKEN_SRC_LINUX_EXT2_FS_H) +fi]) + +dnl Checks if Linux include file scsi/scsi.h is broken +dnl Defines HAVE_BROKEN_SCSI_SCSI_H on success. +AC_DEFUN([AC_BROKEN_SCSI_SCSI_H], +[AC_CACHE_CHECK([if Linux include file scsi/scsi.h is broken], ac_cv_broken_scsi_scsi_h, + [AC_TRY_COMPILE([ +#if defined(__linux__) || defined(__linux) || defined(linux) +#include +#endif], + [], + [ac_cv_broken_scsi_scsi_h=no], + [ac_cv_broken_scsi_scsi_h=yes])]) +if test $ac_cv_broken_scsi_scsi_h = yes; then + AC_DEFINE(HAVE_BROKEN_SCSI_SCSI_H) +fi]) + +dnl Checks if Linux include file /usr/src/linux/include/scsi/scsi.h is broken +dnl Defines HAVE_BROKEN_SRC_SCSI_SCSI_H on success. +AC_DEFUN([AC_BROKEN_SRC_SCSI_SCSI_H], +[AC_CACHE_CHECK([if Linux include file /usr/src/linux/include/scsi/scsi.h is broken], ac_cv_broken_src_scsi_scsi_h, + [___CPPFLAGS=$CPPFLAGS; CPPFLAGS="-I/usr/src/linux/include $CPPFLAGS" + AC_TRY_COMPILE([ +#if defined(__linux__) || defined(__linux) || defined(linux) +#include +#endif], + [], + [ac_cv_broken_src_scsi_scsi_h=no], + [ac_cv_broken_src_scsi_scsi_h=yes])]) +CPPFLAGS=$___CPPFLAGS +if test $ac_cv_broken_src_scsi_scsi_h = yes; then + AC_DEFINE(HAVE_BROKEN_SRC_SCSI_SCSI_H) +fi]) + +dnl Checks if Linux include file scsi/sg.h is broken +dnl Defines HAVE_BROKEN_SCSI_SG_H on success. +AC_DEFUN([AC_BROKEN_SCSI_SG_H], +[AC_CACHE_CHECK([if Linux include file scsi/sg.h is broken], ac_cv_broken_scsi_sg_h, + [AC_TRY_COMPILE([ +#if defined(__linux__) || defined(__linux) || defined(linux) +#include +#include +#endif], + [], + [ac_cv_broken_scsi_sg_h=no], + [ac_cv_broken_scsi_sg_h=yes])]) +if test $ac_cv_broken_scsi_sg_h = yes; then + AC_DEFINE(HAVE_BROKEN_SCSI_SG_H) +fi]) + +dnl Checks if Linux include file /usr/src/linux/include/scsi/sg.h is broken +dnl Defines HAVE_BROKEN_SRC_SCSI_SG_H on success. +AC_DEFUN([AC_BROKEN_SRC_SCSI_SG_H], +[AC_CACHE_CHECK([if Linux include file /usr/src/linux/include/scsi/sg.h is broken], ac_cv_broken_src_scsi_sg_h, + [___CPPFLAGS=$CPPFLAGS; CPPFLAGS="-I/usr/src/linux/include $CPPFLAGS" + AC_TRY_COMPILE([ +#if defined(__linux__) || defined(__linux) || defined(linux) +#include +#include +#endif], + [], + [ac_cv_broken_src_scsi_sg_h=no], + [ac_cv_broken_src_scsi_sg_h=yes])]) +CPPFLAGS=$___CPPFLAGS +if test $ac_cv_broken_src_scsi_sg_h = yes; then + AC_DEFINE(HAVE_BROKEN_SRC_SCSI_SG_H) +fi]) + +AC_DEFUN(AC_PROG_SHELL_BROKEN_E, +[AC_CACHE_CHECK(whether handling of /bin/sh -ce 'command' is broken, ac_cv_prog_shell_broken_e, +[if AC_TRY_COMMAND(/bin/sh -ce 'if false; true; then echo yes; else echo no; fi') | egrep yes >/dev/null 2>&1; then + ac_cv_prog_shell_broken_e=no +else + ac_cv_prog_shell_broken_e=yes +fi +if test $ac_cv_prog_shell_broken_e = yes; then + AC_DEFINE(HAVE_PROG_SHELL_BROKEN_E) +fi])]) + +dnl Checks if a file exists +dnl Do not use test -r as bash on Haiku returns 0 for test -r /dev/stdin +dnl even though /dev/stdin does not exist. +dnl +dnl Defines HAVE_ on success. +dnl AC_STAT_FILE(FILE, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]) +AC_DEFUN([AC_STAT_FILE], +[AC_REQUIRE([AC_PROG_CC]) +dnl Do the transliteration at runtime so arg 1 can be a shell variable. +ac_safe=`echo "$1" | sed 'y%./+-%__p_%'` +AC_MSG_CHECKING([for $1]) +AC_CACHE_VAL(ac_cv_file_$ac_safe, + [AC_TRY_RUN([ +#include +#include + +int +main() +{ + struct stat sb; + + exit(stat("$1", &sb) < 0); +}], + [eval ac_cv_file_$ac_safe=yes], + [eval ac_cv_file_$ac_safe=no])]) +if eval "test \"`echo '$ac_cv_file_'$ac_safe`\" = yes"; then + AC_MSG_RESULT(yes) + ifelse([$2], , :, [$2]) +else + AC_MSG_RESULT(no) + ifelse([$3], , , [$3]) +fi +]) + +dnl AC_STAT_FILES(FILE... [, ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]) +AC_DEFUN(AC_STAT_FILES, +[for ac_file in $1 +do +AC_STAT_FILE($ac_file, +[changequote(, )dnl + ac_tr_file=HAVE_`echo $ac_file | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` +changequote([, ])dnl + AC_DEFINE_UNQUOTED($ac_tr_file) $2], $3)dnl +done +]) diff -Nru cdrtools-2.01.01a33/autoconf/acoldnames.m4 cdrtools-3.02a09/autoconf/acoldnames.m4 --- cdrtools-2.01.01a33/autoconf/acoldnames.m4 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/autoconf/acoldnames.m4 2009-08-12 21:13:33.000000000 +0000 @@ -0,0 +1,82 @@ +dnl @(#)acoldnames.m4 1.3 08/08/01 Copyright 1998-2008 J. Schilling +dnl +dnl Map old names of Autoconf macros to new regularized names. +dnl This file is part of Autoconf. +dnl Copyright (C) 1994 Free Software Foundation, Inc. +dnl +dnl This program is free software; you can redistribute it and/or modify +dnl it under the terms of the GNU General Public License as published by +dnl the Free Software Foundation; either version 2, or (at your option) +dnl any later version. +dnl +dnl This program is distributed in the hope that it will be useful, +dnl but WITHOUT ANY WARRANTY; without even the implied warranty of +dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +dnl GNU General Public License for more details. +dnl +dnl You should have received a copy of the GNU General Public License +dnl along with this program; if not, write to the Free Software +dnl Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA +dnl 02111-1307, USA. +dnl +dnl General macros. +dnl +define(AC_WARN, [indir([AC_MSG_WARN], $@)])dnl +define(AC_ERROR, [indir([AC_MSG_ERROR], $@)])dnl +AC_DEFUN(AC_PROGRAM_CHECK, [indir([AC_CHECK_PROG], $@)])dnl +AC_DEFUN(AC_PROGRAM_PATH, [indir([AC_PATH_PROG], $@)])dnl +AC_DEFUN(AC_PROGRAMS_CHECK, [indir([AC_CHECK_PROGS], $@)])dnl +AC_DEFUN(AC_PROGRAMS_PATH, [indir([AC_PATH_PROGS], $@)])dnl +AC_DEFUN(AC_PREFIX, [indir([AC_PREFIX_PROGRAM], $@)])dnl +AC_DEFUN(AC_HEADER_EGREP, [indir([AC_EGREP_HEADER], $@)])dnl +AC_DEFUN(AC_PROGRAM_EGREP, [indir([AC_EGREP_CPP], $@)])dnl +AC_DEFUN(AC_TEST_PROGRAM, [indir([AC_TRY_RUN], $@)])dnl +AC_DEFUN(AC_TEST_CPP, [indir([AC_TRY_CPP], $@)])dnl +AC_DEFUN(AC_HEADER_CHECK, [indir([AC_CHECK_HEADER], $@)])dnl +AC_DEFUN(AC_FUNC_CHECK, [indir([AC_CHECK_FUNC], $@)])dnl +AC_DEFUN(AC_HAVE_FUNCS, [indir([AC_CHECK_FUNCS], $@)])dnl +AC_DEFUN(AC_HAVE_HEADERS, [indir([AC_CHECK_HEADERS], $@)])dnl +AC_DEFUN(AC_SIZEOF_TYPE, [indir([AC_CHECK_SIZEOF], $@)])dnl +dnl +dnl Specific macros. +dnl +AC_DEFUN(AC_GCC_TRADITIONAL, [indir([AC_PROG_GCC_TRADITIONAL])])dnl +AC_DEFUN(AC_MINUS_C_MINUS_O, [indir([AC_PROG_CC_C_O])])dnl +AC_DEFUN(AC_SET_MAKE, [indir([AC_PROG_MAKE_SET])])dnl +AC_DEFUN(AC_YYTEXT_POINTER, [indir([AC_DECL_YYTEXT])])dnl +AC_DEFUN(AC_LN_S, [indir([AC_PROG_LN_S])])dnl +AC_DEFUN(AC_STDC_HEADERS, [indir([AC_HEADER_STDC])])dnl +AC_DEFUN(AC_MAJOR_HEADER, [indir([AC_HEADER_MAJOR])])dnl +AC_DEFUN(AC_STAT_MACROS_BROKEN, [indir([AC_HEADER_STAT])])dnl +AC_DEFUN(AC_SYS_SIGLIST_DECLARED, [indir([AC_DECL_SYS_SIGLIST])])dnl +AC_DEFUN(AC_GETGROUPS_T, [indir([AC_TYPE_GETGROUPS])])dnl +AC_DEFUN(AC_UID_T, [indir([AC_TYPE_UID_T])])dnl +AC_DEFUN(AC_SIZE_T, [indir([AC_TYPE_SIZE_T])])dnl +AC_DEFUN(AC_PID_T, [indir([AC_TYPE_PID_T])])dnl +AC_DEFUN(AC_OFF_T, [indir([AC_TYPE_OFF_T])])dnl +AC_DEFUN(AC_MODE_T, [indir([AC_TYPE_MODE_T])])dnl +AC_DEFUN(AC_RETSIGTYPE, [indir([AC_TYPE_SIGNAL])])dnl +AC_DEFUN(AC_MMAP, [indir([AC_FUNC_MMAP])])dnl +AC_DEFUN(AC_VPRINTF, [indir([AC_FUNC_VPRINTF])])dnl +AC_DEFUN(AC_VFORK, [indir([AC_FUNC_VFORK])])dnl +AC_DEFUN(AC_WAIT3, [indir([AC_FUNC_WAIT3])])dnl +AC_DEFUN(AC_ALLOCA, [indir([AC_FUNC_ALLOCA])])dnl +AC_DEFUN(AC_GETLOADAVG, [indir([AC_FUNC_GETLOADAVG])])dnl +AC_DEFUN(AC_UTIME_NULL, [indir([AC_FUNC_UTIME_NULL])])dnl +AC_DEFUN(AC_STRCOLL, [indir([AC_FUNC_STRCOLL])])dnl +AC_DEFUN(AC_SETVBUF_REVERSED, [indir([AC_FUNC_SETVBUF_REVERSED])])dnl +AC_DEFUN(AC_TIME_WITH_SYS_TIME, [indir([AC_HEADER_TIME])])dnl +AC_DEFUN(AC_TIMEZONE, [indir([AC_STRUCT_TM_ZONE])])dnl +AC_DEFUN(AC_ST_BLOCKS, [indir([AC_STRUCT_ST_BLOCKS])])dnl +AC_DEFUN(AC_ST_BLKSIZE, [indir([AC_STRUCT_ST_BLKSIZE])])dnl +AC_DEFUN(AC_ST_RDEV, [indir([AC_STRUCT_ST_RDEV])])dnl +AC_DEFUN(AC_CROSS_CHECK, [indir([AC_C_CROSS])])dnl +AC_DEFUN(AC_CHAR_UNSIGNED, [indir([AC_C_CHAR_UNSIGNED])])dnl +AC_DEFUN(AC_LONG_DOUBLE, [indir([AC_C_LONG_DOUBLE])])dnl +AC_DEFUN(AC_WORDS_BIGENDIAN, [indir([AC_C_BIGENDIAN])])dnl +AC_DEFUN(AC_INLINE, [indir([AC_C_INLINE])])dnl +AC_DEFUN(AC_CONST, [indir([AC_C_CONST])])dnl +AC_DEFUN(AC_LONG_FILE_NAMES, [indir([AC_SYS_LONG_FILE_NAMES])])dnl +AC_DEFUN(AC_RESTARTABLE_SYSCALLS, [indir([AC_SYS_RESTARTABLE_SYSCALLS])])dnl +AC_DEFUN(AC_FIND_X, [indir([AC_PATH_X])])dnl +AC_DEFUN(AC_FIND_XTRA, [indir([AC_PATH_XTRA])])dnl diff -Nru cdrtools-2.01.01a33/autoconf/acspecific.m4 cdrtools-3.02a09/autoconf/acspecific.m4 --- cdrtools-2.01.01a33/autoconf/acspecific.m4 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/autoconf/acspecific.m4 2017-06-26 22:40:38.000000000 +0000 @@ -0,0 +1,2913 @@ +dnl @(#)acspecific.m4 1.17 17/06/27 Copyright 1998-2017 J. Schilling +dnl +dnl Macros that test for specific features. +dnl This file is part of Autoconf. +dnl Copyright (C) 1992, 93, 94, 95, 96, 1998 Free Software Foundation, Inc. +dnl +dnl This program is free software; you can redistribute it and/or modify +dnl it under the terms of the GNU General Public License as published by +dnl the Free Software Foundation; either version 2, or (at your option) +dnl any later version. +dnl +dnl This program is distributed in the hope that it will be useful, +dnl but WITHOUT ANY WARRANTY; without even the implied warranty of +dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +dnl GNU General Public License for more details. +dnl +dnl You should have received a copy of the GNU General Public License +dnl along with this program; if not, write to the Free Software +dnl Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA +dnl 02111-1307, USA. +dnl +dnl As a special exception, the Free Software Foundation gives unlimited +dnl permission to copy, distribute and modify the configure scripts that +dnl are the output of Autoconf. You need not follow the terms of the GNU +dnl General Public License when using or distributing such scripts, even +dnl though portions of the text of Autoconf appear in them. The GNU +dnl General Public License (GPL) does govern all other use of the material +dnl that constitutes the Autoconf program. +dnl +dnl Certain portions of the Autoconf source text are designed to be copied +dnl (in certain cases, depending on the input) into the output of +dnl Autoconf. We call these the "data" portions. The rest of the Autoconf +dnl source text consists of comments plus executable code that decides which +dnl of the data portions to output in any given case. We call these +dnl comments and executable code the "non-data" portions. Autoconf never +dnl copies any of the non-data portions into its output. +dnl +dnl This special exception to the GPL applies to versions of Autoconf +dnl released by the Free Software Foundation. When you make and +dnl distribute a modified version of Autoconf, you may extend this special +dnl exception to the GPL to apply to your modified version as well, *unless* +dnl your modified version has the potential to copy into its output some +dnl of the text that was the non-data portion of the version that you started +dnl with. (In other words, unless your change moves or copies text from +dnl the non-data portions to the data portions.) If your modification has +dnl such potential, you must delete any notice of this special exception +dnl to the GPL from your modified version. +dnl +dnl Written by David MacKenzie, with help from +dnl Franc,ois Pinard, Karl Berry, Richard Pixley, Ian Lance Taylor, +dnl Roland McGrath, Noah Friedman, david d zuhn, and many others. + + +dnl ### Checks for programs + + +dnl Check whether to use -n, \c, or newline-tab to separate +dnl checking messages from result messages. +dnl Idea borrowed from dist 3.0. +dnl Internal use only. +AC_DEFUN(AC_PROG_ECHO_N, +[if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then + # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu. + if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then + ac_n= ac_c=' +' ac_t=' ' + else + ac_n=-n ac_c= ac_t= + fi +else + ac_n= ac_c='\c' ac_t= +fi +]) + +AC_DEFUN(AC_PROG_CC, +[AC_BEFORE([$0], [AC_PROG_CPP])dnl +AC_CHECK_PROG(CC, gcc, gcc) +if test -z "$CC"; then + AC_CHECK_PROG(CC, cc, cc, , , /usr/ucb/cc) + if test -z "$CC"; then + case "`uname -s`" in + *win32* | *WIN32*) + AC_CHECK_PROG(CC, cl, cl) ;; + esac + fi + test -z "$CC" && AC_MSG_ERROR([no acceptable cc found in \$PATH]) +fi + +AC_PROG_CC_WORKS +AC_PROG_CC_GNU + +if test $ac_cv_prog_gcc = yes; then + GCC=yes +else + GCC= +fi + +dnl Check whether -g works, even if CFLAGS is set, in case the package +dnl plays around with CFLAGS (such as to build both debugging and +dnl normal versions of a library), tasteless as that idea is. +ac_test_CFLAGS="${CFLAGS+set}" +ac_save_CFLAGS="$CFLAGS" +CFLAGS= +AC_PROG_CC_G +if test "$ac_test_CFLAGS" = set; then + CFLAGS="$ac_save_CFLAGS" +elif test $ac_cv_prog_cc_g = yes; then + if test "$GCC" = yes; then + CFLAGS="-g -O2" + else + CFLAGS="-g" + fi +else + if test "$GCC" = yes; then + CFLAGS="-O2" + else + CFLAGS= + fi +fi +]) + +AC_DEFUN(AC_PROG_CXX, +[AC_BEFORE([$0], [AC_PROG_CXXCPP])dnl +AC_CHECK_PROGS(CXX, $CCC c++ g++ gcc CC cxx cc++ cl, gcc) + +AC_PROG_CXX_WORKS +AC_PROG_CXX_GNU + +if test $ac_cv_prog_gxx = yes; then + GXX=yes +else + GXX= +fi + +dnl Check whether -g works, even if CXXFLAGS is set, in case the package +dnl plays around with CXXFLAGS (such as to build both debugging and +dnl normal versions of a library), tasteless as that idea is. +ac_test_CXXFLAGS="${CXXFLAGS+set}" +ac_save_CXXFLAGS="$CXXFLAGS" +CXXFLAGS= +AC_PROG_CXX_G +if test "$ac_test_CXXFLAGS" = set; then + CXXFLAGS="$ac_save_CXXFLAGS" +elif test $ac_cv_prog_cxx_g = yes; then + if test "$GXX" = yes; then + CXXFLAGS="-g -O2" + else + CXXFLAGS="-g" + fi +else + if test "$GXX" = yes; then + CXXFLAGS="-O2" + else + CXXFLAGS= + fi +fi +]) + +dnl Determine a Fortran 77 compiler to use. If `F77' is not already set +dnl in the environment, check for `g77', `f77' and `f2c', in that order. +dnl Set the output variable `F77' to the name of the compiler found. +dnl +dnl If using `g77' (the GNU Fortran 77 compiler), then `AC_PROG_F77' +dnl will set the shell variable `G77' to `yes', and empty otherwise. If +dnl the output variable `FFLAGS' was not already set in the environment, +dnl then set it to `-g -02' for `g77' (or `-O2' where `g77' does not +dnl accept `-g'). Otherwise, set `FFLAGS' to `-g' for all other Fortran +dnl 77 compilers. +dnl +dnl AC_PROG_F77() +AC_DEFUN(AC_PROG_F77, +[AC_BEFORE([$0], [AC_PROG_CPP])dnl +if test -z "$F77"; then + AC_CHECK_PROGS(F77, g77 f77 f2c) + test -z "$F77" && AC_MSG_ERROR([no acceptable Fortran 77 compiler found in \$PATH]) +fi + +AC_PROG_F77_WORKS +AC_PROG_F77_GNU + +if test $ac_cv_prog_g77 = yes; then + G77=yes +dnl Check whether -g works, even if FFLAGS is set, in case the package +dnl plays around with FFLAGS (such as to build both debugging and +dnl normal versions of a library), tasteless as that idea is. + ac_test_FFLAGS="${FFLAGS+set}" + ac_save_FFLAGS="$FFLAGS" + FFLAGS= + AC_PROG_F77_G + if test "$ac_test_FFLAGS" = set; then + FFLAGS="$ac_save_FFLAGS" + elif test $ac_cv_prog_f77_g = yes; then + FFLAGS="-g -O2" + else + FFLAGS="-O2" + fi +else + G77= + test "${FFLAGS+set}" = set || FFLAGS="-g" +fi +]) + +AC_DEFUN(AC_PROG_CC_WORKS, +[AC_MSG_CHECKING([whether the C compiler ($CC $CFLAGS $LDFLAGS) works]) +AC_LANG_SAVE +AC_LANG_C +AC_TRY_COMPILER([main(){return(0);}], ac_cv_prog_cc_works, ac_cv_prog_cc_cross) +AC_LANG_RESTORE +AC_MSG_RESULT($ac_cv_prog_cc_works) +if test $ac_cv_prog_cc_works = no; then + ccout=`eval "${CC-cc} 2>&1" 2> /dev/null` + ret=$? + nf=`echo "$ccout" | grep 'not found'` + if test $ret = 127 -a -n "$nf" ; then # Korn Shell + ccout="" + fi + if test "$ret" -ne 0 -a ! -n "$ccout" ; then + AC_MSG_ERROR([installation or configuration problem: C compiler ${CC-cc} not found.]) + fi + AC_MSG_ERROR([installation or configuration problem: C compiler cannot create executables.]) +fi +AC_MSG_CHECKING([whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler]) +AC_MSG_RESULT($ac_cv_prog_cc_cross) +cross_compiling=$ac_cv_prog_cc_cross +if test "$cross_compiling" = yes -a "$CONFIG_RMTCALL" != NONE ; then + cross_compiling=remote + rmtcall="$CONFIG_RMTCALL" + rmttest="$CONFIG_RMTCALL" +fi +]) + +AC_DEFUN(AC_PROG_CXX_WORKS, +[AC_MSG_CHECKING([whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works]) +AC_LANG_SAVE +AC_LANG_CPLUSPLUS +AC_TRY_COMPILER([int main(){return(0);}], ac_cv_prog_cxx_works, ac_cv_prog_cxx_cross) +AC_LANG_RESTORE +AC_MSG_RESULT($ac_cv_prog_cxx_works) +if test $ac_cv_prog_cxx_works = no; then + AC_MSG_ERROR([installation or configuration problem: C++ compiler cannot create executables.]) +fi +AC_MSG_CHECKING([whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler]) +AC_MSG_RESULT($ac_cv_prog_cxx_cross) +cross_compiling=$ac_cv_prog_cxx_cross +if test "$cross_compiling" = yes -a "$CONFIG_RMTCALL" != NONE ; then + cross_compiling=remote + rmtcall="$CONFIG_RMTCALL" + rmttest="$CONFIG_RMTCALL" +fi +]) + +dnl Test whether the Fortran 77 compiler can compile and link a trivial +dnl Fortran program. Also, test whether the Fortran 77 compiler is a +dnl cross-compiler (which may realistically be the case if the Fortran +dnl compiler is `g77'). +dnl +dnl AC_PROG_F77_WORKS() +AC_DEFUN(AC_PROG_F77_WORKS, +[AC_MSG_CHECKING([whether the Fortran 77 compiler ($F77 $FFLAGS $LDFLAGS) works]) +AC_LANG_SAVE +AC_LANG_FORTRAN77 +AC_TRY_COMPILER(dnl +[ program conftest + end +], ac_cv_prog_f77_works, ac_cv_prog_f77_cross) +AC_LANG_RESTORE +AC_MSG_RESULT($ac_cv_prog_f77_works) +if test $ac_cv_prog_f77_works = no; then + AC_MSG_ERROR([installation or configuration problem: Fortran 77 compiler cannot create executables.]) +fi +AC_MSG_CHECKING([whether the Fortran 77 compiler ($F77 $FFLAGS $LDFLAGS) is a cross-compiler]) +AC_MSG_RESULT($ac_cv_prog_f77_cross) +cross_compiling=$ac_cv_prog_f77_cross +if test "$cross_compiling" = yes -a "$CONFIG_RMTCALL" != NONE ; then + cross_compiling=remote + rmtcall="$CONFIG_RMTCALL" + rmttest="$CONFIG_RMTCALL" +fi +]) + +dnl Checks whether $CONFIG_RMTCALL and $CONFIG_RMTHOST are both set up +dnl in our enviroment to avoid hidden failures in the tests. +dnl In case of calling programs on an emulator, set CONFIG_RMTHOST=none +AC_DEFUN(AC_REMOTE_PARMS,[ +if test "$cross_compiling" = remote -a ."$CONFIG_RMTCALL" = . ; then + echo 'CONFIG_RMTCALL=script-path required for remote execution' 1>&2 + exit 1 +fi +if test "$cross_compiling" = remote -a ."$CONFIG_RMTHOST" = . ; then + echo 'CONFIG_RMTHOST=host or CONFIG_RMTHOST=user@host required for remote execution' 1>&2 + exit 1 +fi +if test "$cross_compiling" = remote ; then + echo "Cross-Compiling with remote execution of test programs" + echo "Cross-Compile script: $CONFIG_RMTCALL" + echo "Cross-Compile host: $CONFIG_RMTHOST" +fi +]) + + +AC_DEFUN(AC_PROG_CC_GNU, +[AC_CACHE_CHECK(whether we are using GNU C, ac_cv_prog_gcc, +[dnl The semicolon is to pacify NeXT's syntax-checking cpp. +cat > conftest.c </dev/null 2>&1; then + ac_cv_prog_gcc=yes +else + ac_cv_prog_gcc=no +fi])]) + +AC_DEFUN(AC_PROG_CXX_GNU, +[AC_CACHE_CHECK(whether we are using GNU C++, ac_cv_prog_gxx, +[dnl The semicolon is to pacify NeXT's syntax-checking cpp. +cat > conftest.C </dev/null 2>&1; then + ac_cv_prog_gxx=yes +else + ac_cv_prog_gxx=no +fi])]) + +dnl Test whether for Fortran 77 compiler is `g77' (the GNU Fortran 77 +dnl Compiler). This test depends on whether the Fortran 77 compiler can +dnl do CPP pre-processing. +dnl +dnl AC_PROG_F77_GNU() +AC_DEFUN(AC_PROG_F77_GNU, +[AC_CACHE_CHECK(whether we are using GNU Fortran 77, ac_cv_prog_g77, +[cat > conftest.fpp </dev/null 2>&1; then + ac_cv_prog_g77=yes +else + ac_cv_prog_g77=no +fi])]) + +AC_DEFUN(AC_PROG_CC_G, +[AC_CACHE_CHECK(whether ${CC-cc} accepts -g, ac_cv_prog_cc_g, +[echo 'void f(){}' > conftest.c +if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then + ac_cv_prog_cc_g=yes +else + ac_cv_prog_cc_g=no +fi +rm -f conftest* +])]) + +AC_DEFUN(AC_PROG_CXX_G, +[AC_CACHE_CHECK(whether ${CXX-g++} accepts -g, ac_cv_prog_cxx_g, +[echo 'void f(){}' > conftest.cc +if test -z "`${CXX-g++} -g -c conftest.cc 2>&1`"; then + ac_cv_prog_cxx_g=yes +else + ac_cv_prog_cxx_g=no +fi +rm -f conftest* +])]) + +dnl Test whether the Fortran 77 compiler can accept the `-g' option to +dnl enable debugging. +dnl +dnl AC_PROG_F77_G() +AC_DEFUN(AC_PROG_F77_G, +[AC_CACHE_CHECK(whether $F77 accepts -g, ac_cv_prog_f77_g, +[cat > conftest.f << EOF + program conftest + end +EOF +if test -z "`$F77 -g -c conftest.f 2>&1`"; then + ac_cv_prog_f77_g=yes +else + ac_cv_prog_f77_g=no +fi +rm -f conftest* +])]) + +AC_DEFUN(AC_PROG_GCC_TRADITIONAL, +[AC_REQUIRE([AC_PROG_CC])dnl +AC_REQUIRE([AC_PROG_CPP])dnl +if test $ac_cv_prog_gcc = yes; then + AC_CACHE_CHECK(whether ${CC-cc} needs -traditional, + ac_cv_prog_gcc_traditional, +[ ac_pattern="Autoconf.*'x'" + AC_EGREP_CPP($ac_pattern, [#include +Autoconf TIOCGETP], + ac_cv_prog_gcc_traditional=yes, ac_cv_prog_gcc_traditional=no) + + if test $ac_cv_prog_gcc_traditional = no; then + AC_EGREP_CPP($ac_pattern, [#include +Autoconf TCGETA], + ac_cv_prog_gcc_traditional=yes) + fi]) + if test $ac_cv_prog_gcc_traditional = yes; then + CC="$CC -traditional" + fi +fi +]) + +AC_DEFUN(AC_PROG_CC_C_O, +[if test "x$CC" != xcc; then + AC_MSG_CHECKING(whether $CC and cc understand -c and -o together) +else + AC_MSG_CHECKING(whether cc understands -c and -o together) +fi +set dummy $CC; ac_cc="`echo [$]2 | +changequote(, )dnl + sed -e 's/[^a-zA-Z0-9_]/_/g' -e 's/^[0-9]/_/'`" +changequote([, ])dnl +AC_CACHE_VAL(ac_cv_prog_cc_${ac_cc}_c_o, +[echo 'foo(){}' > conftest.c +# Make sure it works both with $CC and with simple cc. +# We do the test twice because some compilers refuse to overwrite an +# existing .o file with -o, though they will create one. +ac_try='${CC-cc} -c conftest.c -o conftest.o 1>&AC_FD_CC' +if AC_TRY_EVAL(ac_try) && + test -f conftest.o && AC_TRY_EVAL(ac_try); +then + eval ac_cv_prog_cc_${ac_cc}_c_o=yes + if test "x$CC" != xcc; then + # Test first that cc exists at all. + if AC_TRY_COMMAND(cc -c conftest.c 1>&AC_FD_CC); then + ac_try='cc -c conftest.c -o conftest.o 1>&AC_FD_CC' + if AC_TRY_EVAL(ac_try) && + test -f conftest.o && AC_TRY_EVAL(ac_try); + then + # cc works too. + : + else + # cc exists but doesn't like -o. + eval ac_cv_prog_cc_${ac_cc}_c_o=no + fi + fi + fi +else + eval ac_cv_prog_cc_${ac_cc}_c_o=no +fi +rm -f conftest* +])dnl +if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" = yes"; then + AC_MSG_RESULT(yes) +else + AC_MSG_RESULT(no) + AC_DEFINE(NO_MINUS_C_MINUS_O) +fi +]) + +dnl Test if the Fortran 77 compiler accepts the options `-c' and `-o' +dnl simultaneously, and define `F77_NO_MINUS_C_MINUS_O' if it does not. +dnl +dnl The usefulness of this macro is questionable, as I can't really see +dnl why anyone would use it. The only reason I include it is for +dnl completeness, since a similar test exists for the C compiler. +dnl +dnl AC_PROG_F77_C_O +AC_DEFUN(AC_PROG_F77_C_O, +[AC_BEFORE([$0], [AC_PROG_F77])dnl +AC_MSG_CHECKING(whether $F77 understand -c and -o together) +set dummy $F77; ac_f77="`echo [$]2 | +changequote(, )dnl +sed -e 's/[^a-zA-Z0-9_]/_/g' -e 's/^[0-9]/_/'`" +changequote([, ])dnl +AC_CACHE_VAL(ac_cv_prog_f77_${ac_f77}_c_o, +[cat > conftest.f << EOF + program conftest + end +EOF +# We do the `AC_TRY_EVAL' test twice because some compilers refuse to +# overwrite an existing `.o' file with `-o', although they will create +# one. +ac_try='$F77 $FFLAGS -c conftest.f -o conftest.o 1>&AC_FD_CC' +if AC_TRY_EVAL(ac_try) && test -f conftest.o && AC_TRY_EVAL(ac_try); then + eval ac_cv_prog_f77_${ac_f77}_c_o=yes +else + eval ac_cv_prog_f77_${ac_f77}_c_o=no +fi +rm -f conftest* +])dnl +if eval "test \"`echo '$ac_cv_prog_f77_'${ac_f77}_c_o`\" = yes"; then + AC_MSG_RESULT(yes) +else + AC_MSG_RESULT(no) + AC_DEFINE(F77_NO_MINUS_C_MINUS_O) +fi +]) + +dnl Define SET_MAKE to set ${MAKE} if make doesn't. +AC_DEFUN(AC_PROG_MAKE_SET, +[AC_MSG_CHECKING(whether ${MAKE-make} sets \${MAKE}) +set dummy ${MAKE-make}; ac_make=`echo "[$]2" | sed 'y%./+-%__p_%'` +AC_CACHE_VAL(ac_cv_prog_make_${ac_make}_set, +[cat > conftestmake <<\EOF +all: + @echo 'ac_maketemp="${MAKE}"' +EOF +changequote(, )dnl +# GNU make sometimes prints "make[1]: Entering...", which would confuse us. +eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=` +changequote([, ])dnl +if test -n "$ac_maketemp"; then + eval ac_cv_prog_make_${ac_make}_set=yes +else + eval ac_cv_prog_make_${ac_make}_set=no +fi +rm -f conftestmake])dnl +if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then + AC_MSG_RESULT(yes) + SET_MAKE= +else + AC_MSG_RESULT(no) + SET_MAKE="MAKE=${MAKE-make}" +fi +AC_SUBST([SET_MAKE])dnl +]) + +AC_DEFUN(AC_PROG_RANLIB, +[AC_CHECK_PROG(RANLIB, ranlib, ranlib, :)]) + +dnl Check for mawk first since it's generally faster. +AC_DEFUN(AC_PROG_AWK, +[AC_CHECK_PROGS(AWK, mawk gawk nawk awk, )]) + +AC_DEFUN(AC_PROG_YACC, +[AC_CHECK_PROGS(YACC, 'bison -y' byacc, yacc)]) + +AC_DEFUN(AC_PROG_CPP, +[AC_MSG_CHECKING(how to run the C preprocessor) +# On Suns, sometimes $CPP names a directory. +if test -n "$CPP" && test -d "$CPP"; then + CPP= +fi +if test -z "$CPP"; then +AC_CACHE_VAL(ac_cv_prog_CPP, +[ # This must be in double quotes, not single quotes, because CPP may get + # substituted into the Makefile and "${CC-cc}" will confuse make. + CPP="${CC-cc} -E" + # On the NeXT, cc -E runs the code through the compiler's parser, + # not just through cpp. +dnl Use a header file that comes with gcc, so configuring glibc +dnl with a fresh cross-compiler works. + AC_TRY_CPP([#include +Syntax Error], , + CPP="${CC-cc} -E -traditional-cpp" + AC_TRY_CPP([#include +Syntax Error], , + CPP="${CC-cc} -nologo -E" + AC_TRY_CPP([#include +Syntax Error], , CPP=/lib/cpp))) + ac_cv_prog_CPP="$CPP"])dnl + CPP="$ac_cv_prog_CPP" +else + ac_cv_prog_CPP="$CPP" +fi +AC_MSG_RESULT($CPP) +AC_SUBST(CPP)dnl +]) + +AC_DEFUN(AC_PROG_CXXCPP, +[AC_MSG_CHECKING(how to run the C++ preprocessor) +if test -z "$CXXCPP"; then +AC_CACHE_VAL(ac_cv_prog_CXXCPP, +[AC_LANG_SAVE[]dnl +AC_LANG_CPLUSPLUS[]dnl + CXXCPP="${CXX-g++} -E" + AC_TRY_CPP([#include ], , CXXCPP=/lib/cpp) + ac_cv_prog_CXXCPP="$CXXCPP" +AC_LANG_RESTORE[]dnl +fi])dnl +CXXCPP="$ac_cv_prog_CXXCPP" +AC_MSG_RESULT($CXXCPP) +AC_SUBST(CXXCPP)dnl +]) + +dnl Require finding the C or C++ preprocessor, whichever is the +dnl current language. +AC_DEFUN(AC_REQUIRE_CPP, +[ifelse(AC_LANG, C, [AC_REQUIRE([AC_PROG_CPP])], [AC_REQUIRE([AC_PROG_CXXCPP])])]) + +AC_DEFUN(AC_PROG_LEX, +[AC_CHECK_PROG(LEX, flex, flex, lex) +if test -z "$LEXLIB" +then + case "$LEX" in + flex*) ac_lib=fl ;; + *) ac_lib=l ;; + esac + AC_CHECK_LIB($ac_lib, yywrap, LEXLIB="-l$ac_lib") +fi +AC_SUBST(LEXLIB)]) + +dnl Check if lex declares yytext as a char * by default, not a char[]. +undefine([AC_DECL_YYTEXT]) +AC_DEFUN(AC_DECL_YYTEXT, +[AC_REQUIRE_CPP()dnl +AC_REQUIRE([AC_PROG_LEX])dnl +AC_CACHE_CHECK(lex output file root, ac_cv_prog_lex_root, +[# The minimal lex program is just a single line: %%. But some broken lexes +# (Solaris, I think it was) want two %% lines, so accommodate them. +echo '%% +%%' | $LEX +if test -f lex.yy.c; then + ac_cv_prog_lex_root=lex.yy +elif test -f lexyy.c; then + ac_cv_prog_lex_root=lexyy +else + AC_MSG_ERROR(cannot find output from $LEX; giving up) +fi]) +LEX_OUTPUT_ROOT=$ac_cv_prog_lex_root +AC_SUBST(LEX_OUTPUT_ROOT)dnl + +AC_CACHE_CHECK(whether yytext is a pointer, ac_cv_prog_lex_yytext_pointer, +[# POSIX says lex can declare yytext either as a pointer or an array; the +# default is implementation-dependent. Figure out which it is, since +# not all implementations provide the %pointer and %array declarations. +ac_cv_prog_lex_yytext_pointer=no +echo 'extern char *yytext;' >>$LEX_OUTPUT_ROOT.c +ac_save_LIBS="$LIBS" +LIBS="$LIBS $LEXLIB" +AC_TRY_LINK(`cat $LEX_OUTPUT_ROOT.c`, , ac_cv_prog_lex_yytext_pointer=yes) +LIBS="$ac_save_LIBS" +rm -f "${LEX_OUTPUT_ROOT}.c" +]) +dnl +if test $ac_cv_prog_lex_yytext_pointer = yes; then + AC_DEFINE(YYTEXT_POINTER) +fi +]) + +AC_DEFUN(AC_PROG_INSTALL, +[AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl +# Find a good install program. We prefer a C program (faster), +# so one script is as good as another. But avoid the broken or +# incompatible versions: +# SysV /etc/install, /usr/sbin/install +# SunOS /usr/etc/install +# IRIX /sbin/install +# AIX /bin/install +# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag +# AFS /usr/afsws/bin/install, which mishandles nonexistent args +# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" +# ./install, which can be erroneously created by make from ./install.sh. +AC_MSG_CHECKING(for a BSD compatible install) +if test -z "$INSTALL"; then +AC_CACHE_VAL(ac_cv_path_install, +[ IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":" + for ac_dir in $PATH; do + # Account for people who put trailing slashes in PATH elements. + case "$ac_dir/" in + /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;; + *) + # OSF1 and SCO ODT 3.0 have their own names for install. + # Don't use installbsd from OSF since it installs stuff as root + # by default. + for ac_prog in ginstall scoinst install; do + if test -f $ac_dir/$ac_prog; then + if test $ac_prog = install && + grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then + # AIX install. It has an incompatible calling convention. + : + else + ac_cv_path_install="$ac_dir/$ac_prog -c" + break 2 + fi + fi + done + ;; + esac + done + IFS="$ac_save_IFS" +])dnl + if test "${ac_cv_path_install+set}" = set; then + INSTALL="$ac_cv_path_install" + else + # As a last resort, use the slow shell script. We don't cache a + # path for INSTALL within a source directory, because that will + # break other packages using the cache if that directory is + # removed, or if the path is relative. + INSTALL="$ac_install_sh" + fi +fi +dnl We do special magic for INSTALL instead of AC_SUBST, to get +dnl relative paths right. +AC_MSG_RESULT($INSTALL) + +# Use test -z because SunOS4 sh mishandles braces in ${var-val}. +# It thinks the first close brace ends the variable substitution. +test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' +AC_SUBST(INSTALL_PROGRAM)dnl + +test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}' +AC_SUBST(INSTALL_SCRIPT)dnl + +test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' +AC_SUBST(INSTALL_DATA)dnl +]) + +AC_DEFUN(AC_PROG_LN_S, +[AC_MSG_CHECKING(whether ln -s works) +AC_CACHE_VAL(ac_cv_prog_LN_S, +[rm -f conftestdata +if ln -s X conftestdata 2>/dev/null +then + rm -f conftestdata + ac_cv_prog_LN_S="ln -s" +else + ac_cv_prog_LN_S=ln +fi])dnl +LN_S="$ac_cv_prog_LN_S" +if test "$ac_cv_prog_LN_S" = "ln -s"; then + AC_MSG_RESULT(yes) +else + AC_MSG_RESULT(no) +fi +AC_SUBST(LN_S)dnl +]) + +define(AC_RSH, +[errprint(__file__:__line__: [$0] has been removed; replace it with equivalent code +)m4exit(4)]) + + +dnl ### Checks for header files + + +AC_DEFUN(AC_HEADER_STDC, +[AC_REQUIRE_CPP()dnl +AC_CACHE_CHECK(for ANSI C header files, ac_cv_header_stdc, +[AC_TRY_CPP([#include +#include +#include +#include ], ac_cv_header_stdc=yes, ac_cv_header_stdc=no) + +if test $ac_cv_header_stdc = yes; then + # SunOS 4.x string.h does not declare mem*, contrary to ANSI. +AC_EGREP_HEADER(memchr, string.h, , ac_cv_header_stdc=no) +fi + +if test $ac_cv_header_stdc = yes; then + # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. +AC_EGREP_HEADER(free, stdlib.h, , ac_cv_header_stdc=no) +fi + +if test $ac_cv_header_stdc = yes; then + # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. +AC_TRY_RUN([#include +#define ISLOWER(c) ('a' <= (c) && (c) <= 'z') +#define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) +#define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) +int main () { int i; for (i = 0; i < 256; i++) +if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); +exit (0); } +], , ac_cv_header_stdc=no, :) +fi]) +if test $ac_cv_header_stdc = yes; then + AC_DEFINE(STDC_HEADERS) + AC_DEFINE(HAVE_STDARG_H) + AC_DEFINE(HAVE_STDLIB_H) + AC_DEFINE(HAVE_STRING_H) + AC_DEFINE(HAVE_FLOAT_H) +fi +]) + +AC_DEFUN(AC_UNISTD_H, +[AC_OBSOLETE([$0], [; instead use AC_CHECK_HEADERS(unistd.h)])dnl +AC_CHECK_HEADER(unistd.h, AC_DEFINE(HAVE_UNISTD_H))]) + +AC_DEFUN(AC_USG, +[AC_OBSOLETE([$0], + [; instead use AC_CHECK_HEADERS(string.h) and HAVE_STRING_H])dnl +AC_MSG_CHECKING([for BSD string and memory functions]) +AC_TRY_LINK([#include ], [rindex(0, 0); bzero(0, 0);], + [AC_MSG_RESULT(yes)], [AC_MSG_RESULT(no); AC_DEFINE(USG)])]) + + +dnl If memchr and the like aren't declared in , include . +dnl To avoid problems, don't check for gcc2 built-ins. +AC_DEFUN(AC_MEMORY_H, +[AC_OBSOLETE([$0], [; instead use AC_CHECK_HEADERS(memory.h) and HAVE_MEMORY_H])dnl +AC_MSG_CHECKING(whether string.h declares mem functions) +AC_EGREP_HEADER(memchr, string.h, ac_found=yes, ac_found=no) +AC_MSG_RESULT($ac_found) +if test $ac_found = no; then + AC_CHECK_HEADER(memory.h, [AC_DEFINE(NEED_MEMORY_H)]) +fi +]) + +AC_DEFUN(AC_HEADER_MAJOR, +[AC_CACHE_CHECK(whether sys/types.h defines makedev, + ac_cv_header_sys_types_h_makedev, +[AC_TRY_LINK([#include ], [return makedev(0, 0);], + ac_cv_header_sys_types_h_makedev=yes, ac_cv_header_sys_types_h_makedev=no) +]) + +if test $ac_cv_header_sys_types_h_makedev = no; then +AC_CHECK_HEADER(sys/mkdev.h, [AC_DEFINE(MAJOR_IN_MKDEV)]) + + if test $ac_cv_header_sys_mkdev_h = no; then +AC_CHECK_HEADER(sys/sysmacros.h, [AC_DEFINE(MAJOR_IN_SYSMACROS)]) + fi +fi +]) + +AC_DEFUN(AC_HEADER_DIRENT, +[ac_header_dirent=no +AC_CHECK_HEADERS_DIRENT(dirent.h sys/ndir.h sys/dir.h ndir.h, + [ac_header_dirent=$ac_hdr; break]) +# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix. +if test $ac_header_dirent = dirent.h; then +AC_CHECK_LIB(c, opendir, :, + [AC_CHECK_LIB(dir, opendir, LIBS="$LIBS -ldir")]) +else +AC_CHECK_LIB(c, opendir, :, + [AC_CHECK_LIB(x, opendir, LIBS="$LIBS -lx")]) +fi +]) + +dnl Like AC_CHECK_HEADER, except also make sure that HEADER-FILE +dnl defines the type `DIR'. dirent.h on NextStep 3.2 doesn't. +dnl AC_CHECK_HEADER_DIRENT(HEADER-FILE, ACTION-IF-FOUND) +AC_DEFUN(AC_CHECK_HEADER_DIRENT, +[ac_safe=`echo "$1" | sed 'y%./+-%__p_%'` +AC_MSG_CHECKING([for $1 that defines DIR]) +AC_CACHE_VAL(ac_cv_header_dirent_$ac_safe, +[AC_TRY_COMPILE([#include +#include <$1>], [DIR *dirp = 0;], + eval "ac_cv_header_dirent_$ac_safe=yes", + eval "ac_cv_header_dirent_$ac_safe=no")])dnl +if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then + AC_MSG_RESULT(yes) + $2 +else + AC_MSG_RESULT(no) +fi +]) + +dnl Like AC_CHECK_HEADERS, except succeed only for a HEADER-FILE that +dnl defines `DIR'. +dnl AC_CHECK_HEADERS_DIRENT(HEADER-FILE... [, ACTION]) +define(AC_CHECK_HEADERS_DIRENT, +[for ac_hdr in $1 +do +AC_CHECK_HEADER_DIRENT($ac_hdr, +[changequote(, )dnl + ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` +changequote([, ])dnl + AC_DEFINE_UNQUOTED($ac_tr_hdr) $2])dnl +done]) + +AC_DEFUN(AC_DIR_HEADER, +[AC_OBSOLETE([$0], [; instead use AC_HEADER_DIRENT])dnl +ac_header_dirent=no +for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do + AC_CHECK_HEADER_DIRENT($ac_hdr, [ac_header_dirent=$ac_hdr; break]) +done + +case "$ac_header_dirent" in +dirent.h) AC_DEFINE(DIRENT) ;; +sys/ndir.h) AC_DEFINE(SYSNDIR) ;; +sys/dir.h) AC_DEFINE(SYSDIR) ;; +ndir.h) AC_DEFINE(NDIR) ;; +esac + +AC_CACHE_CHECK(whether closedir returns void, ac_cv_func_closedir_void, +[AC_TRY_RUN([#include +#include <$ac_header_dirent> +int closedir(); main() { exit(closedir(opendir(".")) != 0); }], + ac_cv_func_closedir_void=no, ac_cv_func_closedir_void=yes, ac_cv_func_closedir_void=yes)]) +if test $ac_cv_func_closedir_void = yes; then + AC_DEFINE(VOID_CLOSEDIR) +fi +]) + +AC_DEFUN(AC_HEADER_STAT, +[AC_CACHE_CHECK(whether stat file-mode macros are broken, + ac_cv_header_stat_broken, +[AC_EGREP_CPP([You lose], [#include +#include + +#if defined(S_ISBLK) && defined(S_IFDIR) +# if S_ISBLK (S_IFDIR) +You lose. +# endif +#endif + +#if defined(S_ISBLK) && defined(S_IFCHR) +# if S_ISBLK (S_IFCHR) +You lose. +# endif +#endif + +#if defined(S_ISLNK) && defined(S_IFREG) +# if S_ISLNK (S_IFREG) +You lose. +# endif +#endif + +#if defined(S_ISSOCK) && defined(S_IFREG) +# if S_ISSOCK (S_IFREG) +You lose. +# endif +#endif +], ac_cv_header_stat_broken=yes, ac_cv_header_stat_broken=no)]) +if test $ac_cv_header_stat_broken = yes; then + AC_DEFINE(STAT_MACROS_BROKEN) +fi +]) + +AC_DEFUN(AC_DECL_SYS_SIGLIST, +[AC_CACHE_CHECK([for sys_siglist declaration in signal.h or unistd.h], + ac_cv_decl_sys_siglist, +[AC_TRY_COMPILE([#include +#include +/* NetBSD declares sys_siglist in unistd.h. */ +#ifdef HAVE_UNISTD_H +#include +#endif], [char *msg = *(sys_siglist + 1);], + ac_cv_decl_sys_siglist=yes, ac_cv_decl_sys_siglist=no)]) +if test $ac_cv_decl_sys_siglist = yes; then + AC_DEFINE(SYS_SIGLIST_DECLARED) +fi +]) + +AC_DEFUN(AC_HEADER_SYS_WAIT, +[AC_CACHE_CHECK([for sys/wait.h that is POSIX.1 compatible], + ac_cv_header_sys_wait_h, +[AC_TRY_COMPILE([#include +#include +#ifndef WEXITSTATUS +#define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8) +#endif +#ifndef WIFEXITED +#define WIFEXITED(stat_val) (((stat_val) & 255) == 0) +#endif], [int s; +wait (&s); +s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;], +ac_cv_header_sys_wait_h=yes, ac_cv_header_sys_wait_h=no)]) +if test $ac_cv_header_sys_wait_h = yes; then + AC_DEFINE(HAVE_SYS_WAIT_H) +fi +]) + + +dnl ### Checks for typedefs + + +AC_DEFUN(AC_TYPE_GETGROUPS, +[AC_REQUIRE([AC_TYPE_UID_T])dnl +AC_CACHE_CHECK(type of array argument to getgroups, ac_cv_type_getgroups, +[AC_TRY_RUN( +changequote(<<, >>)dnl +<< +/* Thanks to Mike Rendell for this test. */ +#include +#define NGID 256 +#undef MAX +#define MAX(x, y) ((x) > (y) ? (x) : (y)) +main() +{ + gid_t gidset[NGID]; + int i, n; + union { gid_t gval; long lval; } val; + + val.lval = -1; + for (i = 0; i < NGID; i++) + gidset[i] = val.gval; + n = getgroups (sizeof (gidset) / MAX (sizeof (int), sizeof (gid_t)) - 1, + gidset); + /* Exit non-zero if getgroups seems to require an array of ints. This + happens when gid_t is short but getgroups modifies an array of ints. */ + exit ((n > 0 && gidset[n] != val.gval) ? 1 : 0); +} +>>, +changequote([, ])dnl + ac_cv_type_getgroups=gid_t, ac_cv_type_getgroups=int, + ac_cv_type_getgroups=cross) +if test $ac_cv_type_getgroups = cross; then + dnl When we can't run the test program (we are cross compiling), presume + dnl that has either an accurate prototype for getgroups or none. + dnl Old systems without prototypes probably use int. + AC_EGREP_HEADER([getgroups.*int.*gid_t], unistd.h, + ac_cv_type_getgroups=gid_t, ac_cv_type_getgroups=int) +fi]) +AC_DEFINE_UNQUOTED(GETGROUPS_T, $ac_cv_type_getgroups) +]) + +AC_DEFUN(AC_TYPE_UID_T, +[AC_CACHE_CHECK(for uid_t in sys/types.h, ac_cv_type_uid_t, +[AC_EGREP_HEADER(uid_t, sys/types.h, + ac_cv_type_uid_t=yes, ac_cv_type_uid_t=no)]) +if test $ac_cv_type_uid_t = no; then + AC_DEFINE(uid_t, int) + AC_DEFINE(gid_t, int) +fi +]) + +AC_DEFUN(AC_TYPE_SIZE_T, +[AC_CHECK_TYPE(size_t, unsigned)]) + +AC_DEFUN(AC_TYPE_PID_T, +[AC_CHECK_TYPE(pid_t, int)]) + +AC_DEFUN(AC_TYPE_OFF_T, +[AC_CHECK_TYPE(off_t, long)]) + +AC_DEFUN(AC_TYPE_MODE_T, +[AC_CHECK_TYPE(mode_t, int)]) + +dnl Note that identifiers starting with SIG are reserved by ANSI C. +AC_DEFUN(AC_TYPE_SIGNAL, +[AC_CACHE_CHECK([return type of signal handlers], ac_cv_type_signal, +[AC_TRY_COMPILE([#include +#include +#ifdef signal +#undef signal +#endif +#ifdef __cplusplus +extern "C" void (*signal (int, void (*)(int)))(int); +#else +void (*signal ()) (); +#endif +], +[int i;], ac_cv_type_signal=void, ac_cv_type_signal=int)]) +AC_DEFINE_UNQUOTED(RETSIGTYPE, $ac_cv_type_signal) +]) + + +dnl ### Checks for functions + + +AC_DEFUN(AC_FUNC_CLOSEDIR_VOID, +[AC_REQUIRE([AC_HEADER_DIRENT])dnl +AC_CACHE_CHECK(whether closedir returns void, ac_cv_func_closedir_void, +[AC_TRY_RUN([#include +#include <$ac_header_dirent> +int closedir(); main() { exit(closedir(opendir(".")) != 0); }], + ac_cv_func_closedir_void=no, ac_cv_func_closedir_void=yes, ac_cv_func_closedir_void=yes)]) +if test $ac_cv_func_closedir_void = yes; then + AC_DEFINE(CLOSEDIR_VOID) +fi +]) + +AC_DEFUN(AC_FUNC_FNMATCH, +[AC_CACHE_CHECK(for working fnmatch, ac_cv_func_fnmatch_works, +# Some versions of Solaris or SCO have a broken fnmatch function. +# So we run a test program. If we are cross-compiling, take no chance. +# Thanks to John Oleynick and Franc,ois Pinard for this test. +[AC_TRY_RUN([main() { exit (fnmatch ("a*", "abc", 0) != 0); }], +ac_cv_func_fnmatch_works=yes, ac_cv_func_fnmatch_works=no, +ac_cv_func_fnmatch_works=no)]) +if test $ac_cv_func_fnmatch_works = yes; then + AC_DEFINE(HAVE_FNMATCH) +fi +]) + +AC_DEFUN(AC_FUNC_MMAP, +[AC_CHECK_HEADERS(unistd.h) +AC_CHECK_FUNCS(getpagesize) +AC_CACHE_CHECK(for working mmap, ac_cv_func_mmap_fixed_mapped, +[AC_TRY_RUN([ +/* Thanks to Mike Haertel and Jim Avera for this test. + Here is a matrix of mmap possibilities: + mmap private not fixed + mmap private fixed at somewhere currently unmapped + mmap private fixed at somewhere already mapped + mmap shared not fixed + mmap shared fixed at somewhere currently unmapped + mmap shared fixed at somewhere already mapped + For private mappings, we should verify that changes cannot be read() + back from the file, nor mmap's back from the file at a different + address. (There have been systems where private was not correctly + implemented like the infamous i386 svr4.0, and systems where the + VM page cache was not coherent with the filesystem buffer cache + like early versions of FreeBSD and possibly contemporary NetBSD.) + For shared mappings, we should conversely verify that changes get + propogated back to all the places they're supposed to be. + + Grep wants private fixed already mapped. + The main things grep needs to know about mmap are: + * does it exist and is it safe to write into the mmap'd area + * how to use it (BSD variants) */ +#include +#include +#include + +/* This mess was copied from the GNU getpagesize.h. */ +#ifndef HAVE_GETPAGESIZE +# ifdef HAVE_UNISTD_H +# include +# endif + +/* Assume that all systems that can run configure have sys/param.h. */ +# ifndef HAVE_SYS_PARAM_H +# define HAVE_SYS_PARAM_H 1 +# endif + +# ifdef _SC_PAGESIZE +# define getpagesize() sysconf(_SC_PAGESIZE) +# else /* no _SC_PAGESIZE */ +# ifdef HAVE_SYS_PARAM_H +# include +# ifdef EXEC_PAGESIZE +# define getpagesize() EXEC_PAGESIZE +# else /* no EXEC_PAGESIZE */ +# ifdef NBPG +# define getpagesize() NBPG * CLSIZE +# ifndef CLSIZE +# define CLSIZE 1 +# endif /* no CLSIZE */ +# else /* no NBPG */ +# ifdef NBPC +# define getpagesize() NBPC +# else /* no NBPC */ +# ifdef PAGESIZE +# define getpagesize() PAGESIZE +# endif /* PAGESIZE */ +# endif /* no NBPC */ +# endif /* no NBPG */ +# endif /* no EXEC_PAGESIZE */ +# else /* no HAVE_SYS_PARAM_H */ +# define getpagesize() 8192 /* punt totally */ +# endif /* no HAVE_SYS_PARAM_H */ +# endif /* no _SC_PAGESIZE */ + +#endif /* no HAVE_GETPAGESIZE */ + +#ifdef __cplusplus +extern "C" { void *malloc(unsigned); } +#else +char *malloc(); +#endif + +int +main() +{ + char *data, *data2, *data3; + int i, pagesize; + int fd; + + pagesize = getpagesize(); + + /* + * First, make a file with some known garbage in it. + */ + data = malloc(pagesize); + if (!data) + exit(1); + for (i = 0; i < pagesize; ++i) + *(data + i) = rand(); + umask(0); + fd = creat("conftestmmap", 0600); + if (fd < 0) + exit(1); + if (write(fd, data, pagesize) != pagesize) + exit(1); + close(fd); + + /* + * Next, try to mmap the file at a fixed address which + * already has something else allocated at it. If we can, + * also make sure that we see the same garbage. + */ + fd = open("conftestmmap", O_RDWR); + if (fd < 0) + exit(1); + data2 = malloc(2 * pagesize); + if (!data2) + exit(1); + data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1); + if (data2 != mmap(data2, pagesize, PROT_READ | PROT_WRITE, + MAP_PRIVATE | MAP_FIXED, fd, 0L)) + exit(1); + for (i = 0; i < pagesize; ++i) + if (*(data + i) != *(data2 + i)) + exit(1); + + /* + * Finally, make sure that changes to the mapped area + * do not percolate back to the file as seen by read(). + * (This is a bug on some variants of i386 svr4.0.) + */ + for (i = 0; i < pagesize; ++i) + *(data2 + i) = *(data2 + i) + 1; + data3 = malloc(pagesize); + if (!data3) + exit(1); + if (read(fd, data3, pagesize) != pagesize) + exit(1); + for (i = 0; i < pagesize; ++i) + if (*(data + i) != *(data3 + i)) + exit(1); + close(fd); + unlink("conftestmmap"); + exit(0); +} +], ac_cv_func_mmap_fixed_mapped=yes, ac_cv_func_mmap_fixed_mapped=no, +ac_cv_func_mmap_fixed_mapped=no)]) +if test $ac_cv_func_mmap_fixed_mapped = yes; then + AC_DEFINE(HAVE_MMAP) +fi +]) + +AC_DEFUN(AC_FUNC_GETPGRP, +[AC_CACHE_CHECK(whether getpgrp takes no argument, ac_cv_func_getpgrp_void, +[AC_TRY_RUN([ +/* + * If this system has a BSD-style getpgrp(), + * which takes a pid argument, exit unsuccessfully. + * + * Snarfed from Chet Ramey's bash pgrp.c test program + */ +#include +#include + +int pid; +int pg1, pg2, pg3, pg4; +int ng, np, s, child; + +main() +{ + pid = getpid(); + pg1 = getpgrp(0); + pg2 = getpgrp(); + pg3 = getpgrp(pid); + pg4 = getpgrp(1); + + /* + * If all of these values are the same, it's pretty sure that + * we're on a system that ignores getpgrp's first argument. + */ + if (pg2 == pg4 && pg1 == pg3 && pg2 == pg3) + exit(0); + + child = fork(); + if (child < 0) + exit(1); + else if (child == 0) { + np = getpid(); + /* + * If this is Sys V, this will not work; pgrp will be + * set to np because setpgrp just changes a pgrp to be + * the same as the pid. + */ + setpgrp(np, pg1); + ng = getpgrp(0); /* Same result for Sys V and BSD */ + if (ng == pg1) { + exit(1); + } else { + exit(0); + } + } else { + wait(&s); + exit(s>>8); + } +} +], ac_cv_func_getpgrp_void=yes, ac_cv_func_getpgrp_void=no, + AC_MSG_ERROR(cannot check getpgrp if cross compiling)) +]) +if test $ac_cv_func_getpgrp_void = yes; then + AC_DEFINE(GETPGRP_VOID) +fi +]) + +AC_DEFUN(AC_FUNC_SETPGRP, +[AC_CACHE_CHECK(whether setpgrp takes no argument, ac_cv_func_setpgrp_void, +AC_TRY_RUN([ +#ifdef HAVE_UNISTD_H +#include +#endif + +/* + * If this system has a BSD-style setpgrp, which takes arguments, exit + * successfully. + */ +main() +{ + if (setpgrp(1,1) == -1) + exit(0); + else + exit(1); +} +], ac_cv_func_setpgrp_void=no, ac_cv_func_setpgrp_void=yes, + AC_MSG_ERROR(cannot check setpgrp if cross compiling)) +) +if test $ac_cv_func_setpgrp_void = yes; then + AC_DEFINE(SETPGRP_VOID) +fi +]) + +AC_DEFUN(AC_FUNC_VPRINTF, +[AC_CHECK_FUNC(vprintf, AC_DEFINE(HAVE_VPRINTF)) +if test "$ac_cv_func_vprintf" != yes; then +AC_CHECK_FUNC(_doprnt, AC_DEFINE(HAVE_DOPRNT)) +fi +]) + +AC_DEFUN(AC_FUNC_VFORK, +[AC_REQUIRE([AC_TYPE_PID_T])dnl +AC_CHECK_HEADER(vfork.h, AC_DEFINE(HAVE_VFORK_H)) +AC_CACHE_CHECK(for working vfork, ac_cv_func_vfork_works, +[AC_TRY_RUN([/* Thanks to Paul Eggert for first version of this test. */ +#include +#include +#include +#ifdef HAVE_UNISTD_H +#include +#endif +#ifdef HAVE_VFORK_H +#include +#endif +#ifdef HAVE_STDLIB_H +#include +#endif +#if defined(HAVE_WAIT_H) +#include +#else +#include +#endif +/* On some sparc systems, changes by the child to local and incoming + argument registers are propagated back to the parent. + The compiler is told about this with #include , + but some compilers (e.g. gcc -O) don't grok . + Test for this by using a static variable whose address + is put into a register that is clobbered by the vfork. */ +#ifndef VMS +static int +#ifdef __cplusplus +sparc_address_test (int arg) +#else +sparc_address_test (arg) int arg; +#endif +{ + static pid_t child; + if (!child) { + child = vfork (); + if (child < 0) { + perror ("vfork"); + _exit(2); + } + if (!child) { + arg = getpid(); + write(-1, "", 0); + _exit (arg); + } + } + return (0); +} +#endif +int exc = 0; +int data = 0; + +int +main() { + pid_t parent = getpid (); + pid_t child; + +#ifndef VMS + sparc_address_test(0); +#endif + + child = vfork (); + + if (child == 0) { + /* Here is another test for sparc vfork register problems. + This test uses lots of local variables, at least + as many local variables as main has allocated so far + including compiler temporaries. 4 locals are enough for + gcc 1.40.3 on a Solaris 4.1.3 sparc, but we use 8 to be safe. + A buggy compiler should reuse the register of parent + for one of the local variables, since it will think that + parent can't possibly be used any more in this routine. + Assigning to the local variable will thus munge parent + in the parent process. */ + pid_t + p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(), + p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid(); + /* Convince the compiler that p..p7 are live; otherwise, it might + use the same hardware register for all 8 local variables. */ + if (p != p1 || p != p2 || p != p3 || p != p4 + || p != p5 || p != p6 || p != p7) + exc = 1; + + /* On some systems (e.g. IRIX 3.3), + vfork doesn't separate parent from child file descriptors. + If the child closes a descriptor before it execs or exits, + this munges the parent's descriptor as well. + Test for this by closing stdout in the child. */ + if (exc == 0) + exc = close(fileno(stdout)) != 0; + + /* + * Check whether a modification in the data segment of the child + * is forwarded to the data segment of the parent, vfork() on Haiku + * fails to do this. We cannot use vfork() in this case as vfork() + * children usually signal things to their parent by modifying the + * data segment. + */ + data = 1; + + /* + * VMS hangs if we do not call execl() + */ +#ifdef HAVE_EXECL + /* + * On VMS, things hang unless the child calls exec() + */ + if (exc == 0) + execl("/bin/true", "true", (char *)0); + else + execl("/bin/false", "false", (char *)0); +#endif + _exit(exc); + } else { + int status; + struct stat st; + + while (wait(&status) != child) + ; + exit( + /* Was there some problem with vforking? */ + child < 0 + + /* Did the child fail? (This shouldn't happen.) */ + || status + + /* Did the vfork/compiler bug occur? */ + || parent != getpid() + + || data == 0 + + /* Did the file descriptor bug occur? */ + || fstat(fileno(stdout), &st) != 0 + ); + } +}], +ac_cv_func_vfork_works=yes, ac_cv_func_vfork_works=no, AC_CHECK_FUNC(vfork) +ac_cv_func_vfork_works=$ac_cv_func_vfork)]) +if test $ac_cv_func_vfork_works = no; then + AC_DEFINE(vfork, fork) +else + AC_DEFINE(HAVE_VFORK) +fi +]) + +AC_DEFUN(AC_FUNC_WAIT3, +[AC_CACHE_CHECK(for wait3 that fills in rusage, ac_cv_func_wait3_rusage, +[AC_TRY_RUN([#include +#include +#include +#include +/* HP-UX has wait3 but does not fill in rusage at all. */ +main() { + struct rusage r; + int i; + /* Use a field that we can force nonzero -- + voluntary context switches. + For systems like NeXT and OSF/1 that don't set it, + also use the system CPU time. And page faults (I/O) for Linux. */ + r.ru_nvcsw = 0; + r.ru_utime.tv_sec = 0; + r.ru_utime.tv_usec = 0; + r.ru_stime.tv_sec = 0; + r.ru_stime.tv_usec = 0; + r.ru_majflt = r.ru_minflt = 0; + switch (fork()) { + case 0: /* Child. */ + sleep(1); /* Give up the CPU. */ + for (i=200000; --i > 0;) getpid(); /* Use up some CPU time */ + _exit(0); + case -1: _exit(0); /* What can we do? */ + default: /* Parent. */ + wait3(&i, 0, &r); + sleep(2); /* Avoid "text file busy" from rm on fast HP-UX machines. */ + exit(r.ru_nvcsw == 0 && r.ru_majflt == 0 && r.ru_minflt == 0 + && r.ru_utime.tv_sec == 0 && r.ru_utime.tv_usec == 0 + && r.ru_stime.tv_sec == 0 && r.ru_stime.tv_usec == 0); + } +}], ac_cv_func_wait3_rusage=yes, ac_cv_func_wait3_rusage=no, +ac_cv_func_wait3_rusage=no)]) +if test $ac_cv_func_wait3_rusage = yes; then + AC_DEFINE(HAVE_WAIT3) +fi +]) + +AC_DEFUN(AC_FUNC_ALLOCA, +[AC_REQUIRE_CPP()dnl Set CPP; we run AC_EGREP_CPP conditionally. +# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works +# for constant arguments. Useless! +AC_CACHE_CHECK([for working alloca.h], ac_cv_header_alloca_h, +[AC_TRY_LINK([#include ], [char *p = alloca(2 * sizeof(int));], + ac_cv_header_alloca_h=yes, ac_cv_header_alloca_h=no)]) +if test $ac_cv_header_alloca_h = yes; then + AC_DEFINE(HAVE_ALLOCA_H) +fi + +AC_CACHE_CHECK([for alloca], ac_cv_func_alloca_works, +[AC_TRY_LINK([ +#ifdef __GNUC__ +# define alloca __builtin_alloca +#else +# ifdef _MSC_VER +# include +# define alloca _alloca +# else +# if HAVE_ALLOCA_H +# include +# else +# ifdef _AIX + #pragma alloca +# else +# ifndef alloca /* predefined by HP cc +Olibcalls */ +char *alloca (); +# endif +# endif +# endif +# endif +#endif +], [char *p = (char *) alloca(1);], + ac_cv_func_alloca_works=yes, ac_cv_func_alloca_works=no)]) +if test $ac_cv_func_alloca_works = yes; then + AC_DEFINE(HAVE_ALLOCA) +fi + +if test $ac_cv_func_alloca_works = no; then + # The SVR3 libPW and SVR4 libucb both contain incompatible functions + # that cause trouble. Some versions do not even contain alloca or + # contain a buggy version. If you still want to use their alloca, + # use ar to extract alloca.o from them instead of compiling alloca.c. + ALLOCA=alloca.${ac_objext} + AC_DEFINE(C_ALLOCA) + +AC_CACHE_CHECK(whether alloca needs Cray hooks, ac_cv_os_cray, +[AC_EGREP_CPP(webecray, +[#if defined(CRAY) && ! defined(CRAY2) +webecray +#else +wenotbecray +#endif +], ac_cv_os_cray=yes, ac_cv_os_cray=no)]) +if test $ac_cv_os_cray = yes; then +for ac_func in _getb67 GETB67 getb67; do + AC_CHECK_FUNC($ac_func, [AC_DEFINE_UNQUOTED(CRAY_STACKSEG_END, $ac_func) + break]) +done +fi + +AC_CACHE_CHECK(stack direction for C alloca, ac_cv_c_stack_direction, +[AC_TRY_RUN([find_stack_direction () +{ + static char *addr = 0; + auto char dummy; + if (addr == 0) + { + addr = &dummy; + return find_stack_direction (); + } + else + return (&dummy > addr) ? 1 : -1; +} +main () +{ + exit (find_stack_direction() < 0); +}], ac_cv_c_stack_direction=1, ac_cv_c_stack_direction=-1, + ac_cv_c_stack_direction=0)]) +AC_DEFINE_UNQUOTED(STACK_DIRECTION, $ac_cv_c_stack_direction) +fi +AC_SUBST(ALLOCA)dnl +]) + +AC_DEFUN(AC_FUNC_GETLOADAVG, +[ac_have_func=no # yes means we've found a way to get the load average. + +# Some systems with -lutil have (and need) -lkvm as well, some do not. +# On Solaris, -lkvm requires nlist from -lelf, so check that first +# to get the right answer into the cache. +AC_CHECK_LIB(elf, elf_begin, LIBS="-lelf $LIBS") +AC_CHECK_LIB(kvm, kvm_open, LIBS="-lkvm $LIBS") +# Check for the 4.4BSD definition of getloadavg. +AC_CHECK_LIB(util, getloadavg, + [LIBS="-lutil $LIBS" ac_have_func=yes ac_cv_func_getloadavg_setgid=yes]) + +if test $ac_have_func = no; then + # There is a commonly available library for RS/6000 AIX. + # Since it is not a standard part of AIX, it might be installed locally. + ac_getloadavg_LIBS="$LIBS"; LIBS="-L/usr/local/lib $LIBS" + AC_CHECK_LIB(getloadavg, getloadavg, + LIBS="-lgetloadavg $LIBS", LIBS="$ac_getloadavg_LIBS") +fi + +# Make sure it is really in the library, if we think we found it. +AC_REPLACE_FUNCS(getloadavg) + +if test $ac_cv_func_getloadavg = yes; then + AC_DEFINE(HAVE_GETLOADAVG) + ac_have_func=yes +else + # Figure out what our getloadavg.c needs. + ac_have_func=no + AC_CHECK_HEADER(sys/dg_sys_info.h, + [ac_have_func=yes; AC_DEFINE(DGUX) + AC_CHECK_LIB(dgc, dg_sys_info)]) + + # We cannot check for , because Solaris 2 does not use dwarf (it + # uses stabs), but it is still SVR4. We cannot check for because + # Irix 4.0.5F has the header but not the library. + if test $ac_have_func = no && test $ac_cv_lib_elf_elf_begin = yes; then + ac_have_func=yes; AC_DEFINE(SVR4) + fi + + if test $ac_have_func = no; then + AC_CHECK_HEADER(inq_stats/cpustats.h, + [ac_have_func=yes; AC_DEFINE(UMAX) + AC_DEFINE(UMAX4_3)]) + fi + + if test $ac_have_func = no; then + AC_CHECK_HEADER(sys/cpustats.h, + [ac_have_func=yes; AC_DEFINE(UMAX)]) + fi + + if test $ac_have_func = no; then + AC_CHECK_HEADERS(mach/mach.h) + fi + + AC_CHECK_HEADER(nlist.h, + [AC_DEFINE(NLIST_STRUCT) + AC_CACHE_CHECK([for n_un in struct nlist], ac_cv_struct_nlist_n_un, + [AC_TRY_COMPILE([#include ], + [struct nlist n; n.n_un.n_name = 0;], + ac_cv_struct_nlist_n_un=yes, ac_cv_struct_nlist_n_un=no)]) + if test $ac_cv_struct_nlist_n_un = yes; then + AC_DEFINE(NLIST_NAME_UNION) + fi + ])dnl +fi # Do not have getloadavg in system libraries. + +# Some definitions of getloadavg require that the program be installed setgid. +dnl FIXME Don't hardwire the path of getloadavg.c in the top-level directory. +AC_CACHE_CHECK(whether getloadavg requires setgid, + ac_cv_func_getloadavg_setgid, +[AC_EGREP_CPP([Yowza Am I SETGID yet], +[#include "$srcdir/getloadavg.c" +#ifdef LDAV_PRIVILEGED +Yowza Am I SETGID yet +#endif], + ac_cv_func_getloadavg_setgid=yes, ac_cv_func_getloadavg_setgid=no)]) +if test $ac_cv_func_getloadavg_setgid = yes; then + NEED_SETGID=true; AC_DEFINE(GETLOADAVG_PRIVILEGED) +else + NEED_SETGID=false +fi +AC_SUBST(NEED_SETGID)dnl + +if test $ac_cv_func_getloadavg_setgid = yes; then + AC_CACHE_CHECK(group of /dev/kmem, ac_cv_group_kmem, +[changequote(, )dnl + # On Solaris, /dev/kmem is a symlink. Get info on the real file. + ac_ls_output=`ls -lgL /dev/kmem 2>/dev/null` + # If we got an error (system does not support symlinks), try without -L. + test -z "$ac_ls_output" && ac_ls_output=`ls -lg /dev/kmem` + ac_cv_group_kmem=`echo $ac_ls_output \ + | sed -ne 's/[ ][ ]*/ /g; + s/^.[sSrwx-]* *[0-9]* *\([^0-9]*\) *.*/\1/; + / /s/.* //;p;'` +changequote([, ])dnl +]) + KMEM_GROUP=$ac_cv_group_kmem +fi +AC_SUBST(KMEM_GROUP)dnl +]) + +AC_DEFUN(AC_FUNC_UTIME_NULL, +[AC_CACHE_CHECK(whether utime accepts a null argument, ac_cv_func_utime_null, +[rm -f conftestdata; > conftestdata +# Sequent interprets utime(file, 0) to mean use start of epoch. Wrong. +AC_TRY_RUN([#include +#include +main() { +struct stat s, t; +exit(!(stat ("conftestdata", &s) == 0 && utime("conftestdata", (long *)0) == 0 +&& stat("conftestdata", &t) == 0 && t.st_mtime >= s.st_mtime +&& t.st_mtime - s.st_mtime < 120)); +}], ac_cv_func_utime_null=yes, ac_cv_func_utime_null=no, + ac_cv_func_utime_null=no) +rm -f core core.* *.core]) +if test $ac_cv_func_utime_null = yes; then + AC_DEFINE(HAVE_UTIME_NULL) +fi +]) + +AC_DEFUN(AC_FUNC_STRCOLL, +[AC_CACHE_CHECK(for working strcoll, ac_cv_func_strcoll_works, +[AC_TRY_RUN([#include +main () +{ + exit (strcoll ("abc", "def") >= 0 || + strcoll ("ABC", "DEF") >= 0 || + strcoll ("123", "456") >= 0); +}], ac_cv_func_strcoll_works=yes, ac_cv_func_strcoll_works=no, +ac_cv_func_strcoll_works=no)]) +if test $ac_cv_func_strcoll_works = yes; then + AC_DEFINE(HAVE_STRCOLL) +fi +]) + +AC_DEFUN(AC_FUNC_SETVBUF_REVERSED, +[AC_CACHE_CHECK(whether setvbuf arguments are reversed, + ac_cv_func_setvbuf_reversed, +[AC_TRY_RUN([#include +/* If setvbuf has the reversed format, exit 0. */ +main () { + /* This call has the arguments reversed. + A reversed system may check and see that the address of main + is not _IOLBF, _IONBF, or _IOFBF, and return nonzero. */ + if (setvbuf(stdout, _IOLBF, (char *) main, BUFSIZ) != 0) + exit(1); + putc('\r', stdout); + exit(0); /* Non-reversed systems segv here. */ +}], ac_cv_func_setvbuf_reversed=yes, ac_cv_func_setvbuf_reversed=no) +rm -f core core.* *.core]) +if test $ac_cv_func_setvbuf_reversed = yes; then + AC_DEFINE(SETVBUF_REVERSED) +fi +]) + +AC_DEFUN(AC_FUNC_GETMNTENT, +[# getmntent is in -lsun on Irix 4, -lseq on Dynix/PTX, -lgen on Unixware. +AC_CHECK_LIB(sun, getmntent, LIBS="-lsun $LIBS", + [AC_CHECK_LIB(seq, getmntent, LIBS="-lseq $LIBS", + [AC_CHECK_LIB(gen, getmntent, LIBS="-lgen $LIBS")])]) +AC_CHECK_FUNC(getmntent, [AC_DEFINE(HAVE_GETMNTENT)])]) + +AC_DEFUN(AC_FUNC_STRFTIME, +[AC_CHECK_FUNC(strftime, [AC_DEFINE(HAVE_STRFTIME)], +[# strftime is in -lintl on SCO UNIX. +AC_CHECK_LIB(intl, strftime, +[AC_DEFINE(HAVE_STRFTIME) +LIBS="-lintl $LIBS"])])]) + +AC_DEFUN(AC_FUNC_MEMCMP, +[AC_CACHE_CHECK(for 8-bit clean memcmp, ac_cv_func_memcmp_clean, +[AC_TRY_RUN([ +main() +{ + char c0 = 0x40, c1 = 0x80, c2 = 0x81; + exit(memcmp(&c0, &c2, 1) < 0 && memcmp(&c1, &c2, 1) < 0 ? 0 : 1); +} +], ac_cv_func_memcmp_clean=yes, ac_cv_func_memcmp_clean=no, +ac_cv_func_memcmp_clean=no)]) +test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.${ac_objext}" +AC_SUBST(LIBOBJS)dnl +]) + +AC_DEFUN(AC_FUNC_SELECT_ARGTYPES, +[AC_MSG_CHECKING([types of arguments for select()]) + AC_CACHE_VAL(ac_cv_func_select_arg234,dnl + [AC_CACHE_VAL(ac_cv_func_select_arg1,dnl + [AC_CACHE_VAL(ac_cv_func_select_arg5,dnl + [for ac_cv_func_select_arg234 in 'fd_set *' 'int *' 'void *'; do + for ac_cv_func_select_arg1 in 'int' 'size_t' 'unsigned long' 'unsigned'; do + for ac_cv_func_select_arg5 in 'struct timeval *' 'const struct timeval *'; do + AC_TRY_COMPILE(dnl +[#ifdef HAVE_SYS_TYPES_H +#include +#endif +#ifdef HAVE_SYS_TIME_H +#include +#endif +#ifdef HAVE_SYS_SELECT_H +#include +#endif +#ifdef HAVE_SYS_SOCKET_H +#include +#endif +extern select ($ac_cv_func_select_arg1,$ac_cv_func_select_arg234,$ac_cv_func_select_arg234,$ac_cv_func_select_arg234,$ac_cv_func_select_arg5);],,dnl + [ac_not_found=no ; break 3],ac_not_found=yes) + done + done + done + ])dnl AC_CACHE_VAL + ])dnl AC_CACHE_VAL + ])dnl AC_CACHE_VAL + if test "$ac_not_found" = yes; then + ac_cv_func_select_arg1=int + ac_cv_func_select_arg234='int *' + ac_cv_func_select_arg5='struct timeval *' + fi + AC_MSG_RESULT([$ac_cv_func_select_arg1,$ac_cv_func_select_arg234,$ac_cv_func_select_arg5]) + AC_DEFINE_UNQUOTED(SELECT_TYPE_ARG1,$ac_cv_func_select_arg1) + AC_DEFINE_UNQUOTED(SELECT_TYPE_ARG234,($ac_cv_func_select_arg234)) + AC_DEFINE_UNQUOTED(SELECT_TYPE_ARG5,($ac_cv_func_select_arg5)) +]) + + +dnl ### Checks for structure members + + +AC_DEFUN(AC_HEADER_TIME, +[AC_CACHE_CHECK([whether time.h and sys/time.h may both be included], + ac_cv_header_time, +[AC_TRY_COMPILE([#include +#include +#include ], +[struct tm *tp;], ac_cv_header_time=yes, ac_cv_header_time=no)]) +if test $ac_cv_header_time = yes; then + AC_DEFINE(TIME_WITH_SYS_TIME) +fi +]) + +AC_DEFUN(AC_STRUCT_TM, +[AC_CACHE_CHECK([whether struct tm is in sys/time.h or time.h], + ac_cv_struct_tm, +[AC_TRY_COMPILE([#include +#include ], +[struct tm *tp; tp->tm_sec;], + ac_cv_struct_tm=time.h, ac_cv_struct_tm=sys/time.h)]) +if test $ac_cv_struct_tm = sys/time.h; then + AC_DEFINE(TM_IN_SYS_TIME) +fi +]) + +AC_DEFUN(AC_STRUCT_TM_ZONE, +[AC_REQUIRE([AC_STRUCT_TM])dnl +AC_CACHE_CHECK([for tm_zone in struct tm], ac_cv_struct_tm_zone, +[AC_TRY_COMPILE([#include +#include <$ac_cv_struct_tm>], [struct tm tm; tm.tm_zone;], + ac_cv_struct_tm_zone=yes, ac_cv_struct_tm_zone=no)]) +if test "$ac_cv_struct_tm_zone" = yes; then + AC_DEFINE(HAVE_TM_ZONE) +else + AC_CACHE_CHECK(for tzname, ac_cv_var_tzname, +[AC_TRY_LINK( +changequote(<<, >>)dnl +<<#include +#ifndef tzname /* For SGI. */ +extern char *tzname[]; /* RS6000 and others reject char **tzname. */ +#endif>>, +changequote([, ])dnl +[atoi(*tzname);], ac_cv_var_tzname=yes, ac_cv_var_tzname=no)]) + if test $ac_cv_var_tzname = yes; then + AC_DEFINE(HAVE_TZNAME) + fi +fi +]) + +AC_DEFUN(AC_STRUCT_ST_BLOCKS, +[AC_CACHE_CHECK([for st_blocks in struct stat], ac_cv_struct_st_blocks, +[AC_TRY_COMPILE([#include +#include ], [struct stat s; s.st_blocks;], +ac_cv_struct_st_blocks=yes, ac_cv_struct_st_blocks=no)]) +if test $ac_cv_struct_st_blocks = yes; then + AC_DEFINE(HAVE_ST_BLOCKS) +else + LIBOBJS="$LIBOBJS fileblocks.${ac_objext}" +fi +AC_SUBST(LIBOBJS)dnl +]) + +AC_DEFUN(AC_STRUCT_ST_BLKSIZE, +[AC_CACHE_CHECK([for st_blksize in struct stat], ac_cv_struct_st_blksize, +[AC_TRY_COMPILE([#include +#include ], [struct stat s; s.st_blksize;], +ac_cv_struct_st_blksize=yes, ac_cv_struct_st_blksize=no)]) +if test $ac_cv_struct_st_blksize = yes; then + AC_DEFINE(HAVE_ST_BLKSIZE) +fi +]) + +AC_DEFUN(AC_STRUCT_ST_RDEV, +[AC_CACHE_CHECK([for st_rdev in struct stat], ac_cv_struct_st_rdev, +[AC_TRY_COMPILE([#include +#include ], [struct stat s; s.st_rdev;], +ac_cv_struct_st_rdev=yes, ac_cv_struct_st_rdev=no)]) +if test $ac_cv_struct_st_rdev = yes; then + AC_DEFINE(HAVE_ST_RDEV) +fi +]) + + +dnl ### Checks for compiler characteristics + + +AC_DEFUN(AC_C_CROSS, +[AC_OBSOLETE([$0], [; it has been merged into AC_PROG_CC])]) + +AC_DEFUN(AC_C_CHAR_UNSIGNED, +[AC_CACHE_CHECK(whether char is unsigned, ac_cv_c_char_unsigned, +[if test "$GCC" = yes; then + # GCC predefines this symbol on systems where it applies. +AC_EGREP_CPP(yes, +[#ifdef __CHAR_UNSIGNED__ + yes +#endif +], ac_cv_c_char_unsigned=yes, ac_cv_c_char_unsigned=no) +else +AC_TRY_RUN( +[/* volatile prevents gcc2 from optimizing the test away on sparcs. */ +#if !defined(__STDC__) || __STDC__ != 1 +#define volatile +#endif +main() { + volatile char c = 255; exit(c < 0); +}], ac_cv_c_char_unsigned=yes, ac_cv_c_char_unsigned=no) +fi]) +if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then + AC_DEFINE(__CHAR_UNSIGNED__) +fi +]) + +AC_DEFUN(AC_C_LONG_DOUBLE, +[AC_CACHE_CHECK(for long double, ac_cv_c_long_double, +[if test "$GCC" = yes; then + ac_cv_c_long_double=yes +else +AC_TRY_RUN([int main() { +/* The Stardent Vistra knows sizeof(long double), but does not support it. */ +long double foo = 0.0; +/* On Ultrix 4.3 cc, long double is 4 and double is 8. */ +exit(sizeof(long double) < sizeof(double)); }], +ac_cv_c_long_double=yes, ac_cv_c_long_double=no) +fi]) +if test $ac_cv_c_long_double = yes; then + AC_DEFINE(HAVE_LONG_DOUBLE) +fi +]) + +AC_DEFUN(AC_INT_16_BITS, +[AC_OBSOLETE([$0], [; instead use AC_CHECK_SIZEOF(int)])dnl +AC_MSG_CHECKING(whether int is 16 bits) +AC_TRY_RUN([main() { exit(sizeof(int) != 2); }], + [AC_MSG_RESULT(yes) + AC_DEFINE(INT_16_BITS)], AC_MSG_RESULT(no)) +]) + +AC_DEFUN(AC_LONG_64_BITS, +[AC_OBSOLETE([$0], [; instead use AC_CHECK_SIZEOF(long)])dnl +AC_MSG_CHECKING(whether long int is 64 bits) +AC_TRY_RUN([main() { exit(sizeof(long int) != 8); }], + [AC_MSG_RESULT(yes) + AC_DEFINE(LONG_64_BITS)], AC_MSG_RESULT(no)) +]) + +AC_DEFUN(AC_C_BIGENDIAN, +[AC_CACHE_CHECK(whether byte ordering is bigendian, ac_cv_c_bigendian, +[ac_cv_c_bigendian=unknown +# See if sys/param.h defines the BYTE_ORDER macro. +AC_TRY_COMPILE([#include +#include ], [ +#if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN + bogus endian macros +#endif], [# It does; now see whether it defined to BIG_ENDIAN or not. +AC_TRY_COMPILE([#include +#include ], [ +#if BYTE_ORDER != BIG_ENDIAN + not big endian +#endif], ac_cv_c_bigendian=yes, ac_cv_c_bigendian=no)]) +if test $ac_cv_c_bigendian = unknown; then +AC_TRY_RUN([main () { + /* Are we little or big endian? From Harbison&Steele. */ + union + { + long l; + char c[sizeof (long)]; + } u; + u.l = 1; + exit (u.c[sizeof (long) - 1] == 1); +}], ac_cv_c_bigendian=no, ac_cv_c_bigendian=yes) +fi]) +if test $ac_cv_c_bigendian = yes; then + AC_DEFINE(WORDS_BIGENDIAN) +fi +]) + +dnl Do nothing if the compiler accepts the inline keyword. +dnl Otherwise define inline to __inline__ or __inline if one of those work, +dnl otherwise define inline to be empty. +AC_DEFUN(AC_C_INLINE, +[AC_CACHE_CHECK([for inline], ac_cv_c_inline, +[ac_cv_c_inline=no +for ac_kw in inline __inline__ __inline; do + AC_TRY_COMPILE(, [} $ac_kw foo() {], [ac_cv_c_inline=$ac_kw; break]) +done +]) +case "$ac_cv_c_inline" in + inline | yes) + AC_DEFINE(HAVE_INLINE) + ;; + no) AC_DEFINE(inline, ) + ;; + *) AC_DEFINE_UNQUOTED(inline, $ac_cv_c_inline) + AC_DEFINE(HAVE_INLINE) + ;; +esac +]) + +AC_DEFUN(AC_C_CONST, +[dnl This message is consistent in form with the other checking messages, +dnl and with the result message. +AC_CACHE_CHECK([for working const], ac_cv_c_const, +[AC_TRY_COMPILE(, +changequote(<<, >>)dnl +<< +/* Ultrix mips cc rejects this. */ +typedef int charset[2]; const charset x; +/* SunOS 4.1.1 cc rejects this. */ +char const *const *ccp; +char **p; +/* NEC SVR4.0.2 mips cc rejects this. */ +struct point {int x, y;}; +static struct point const zero = {0,0}; +/* AIX XL C 1.02.0.0 rejects this. + It does not let you subtract one const X* pointer from another in an arm + of an if-expression whose if-part is not a constant expression */ +const char *g = "string"; +ccp = &g + (g ? g-g : 0); +/* HPUX 7.0 cc rejects these. */ +++ccp; +p = (char**) ccp; +ccp = (char const *const *) p; +{ /* SCO 3.2v4 cc rejects this. */ + char *t; + char const *s = 0 ? (char *) 0 : (char const *) 0; + + *t++ = 0; +} +{ /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */ + int x[] = {25, 17}; + const int *foo = &x[0]; + ++foo; +} +{ /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */ + typedef const int *iptr; + iptr p = 0; + ++p; +} +{ /* AIX XL C 1.02.0.0 rejects this saying + "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ + struct s { int j; const int *ap[3]; }; + struct s *b; b->j = 5; +} +{ /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ + const int foo = 10; +} +>>, +changequote([, ])dnl +ac_cv_c_const=yes, ac_cv_c_const=no)]) +if test $ac_cv_c_const = no; then + AC_DEFINE(const, ) +fi +]) + +AC_DEFUN(AC_C_STRINGIZE, [ +AC_REQUIRE([AC_PROG_CPP]) +AC_MSG_CHECKING([for preprocessor stringizing operator]) +AC_CACHE_VAL(ac_cv_c_stringize, +AC_EGREP_CPP([#teststring],[ +#define x(y) #y + +char *s = x(teststring); +], ac_cv_c_stringize=no, ac_cv_c_stringize=yes)) +if test "${ac_cv_c_stringize}" = yes +then + AC_DEFINE(HAVE_STRINGIZE) +fi +AC_MSG_RESULT([${ac_cv_c_stringize}]) +])dnl + +define(AC_ARG_ARRAY, +[errprint(__file__:__line__: [$0] has been removed; don't do unportable things with arguments +)m4exit(4)]) + +dnl Check the object extension used by the compiler: typically .o or +dnl .obj. If this is called, some other behaviour will change, +dnl determined by ac_objext. +AC_DEFUN(AC_OBJEXT, +[AC_MSG_CHECKING([for object suffix]) +AC_CACHE_VAL(ac_cv_objext, +[rm -f conftest* +echo 'int i = 1;' > conftest.$ac_ext +if AC_TRY_EVAL(ac_compile); then + for ac_file in conftest.*; do + case $ac_file in + *.c) ;; + *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;; + esac + done +else + AC_MSG_ERROR([installation or configuration problem; compiler does not work]) +fi +rm -f conftest*]) +AC_MSG_RESULT($ac_cv_objext) +OBJEXT=$ac_cv_objext +ac_objext=$ac_cv_objext +AC_SUBST(OBJEXT)]) + +dnl Determine the linker flags (e.g. `-L' and `-l') for the Fortran 77 +dnl intrinsic and run-time libraries that are required to successfully +dnl link a Fortran 77 program or shared library. The output variable +dnl FLIBS is set to these flags. +dnl +dnl This macro is intended to be used in those situations when it is +dnl necessary to mix, e.g. C++ and Fortran 77, source code into a single +dnl program or shared library. +dnl +dnl For example, if object files from a C++ and Fortran 77 compiler must +dnl be linked together, then the C++ compiler/linker must be used for +dnl linking (since special C++-ish things need to happen at link time +dnl like calling global constructors, instantiating templates, enabling +dnl exception support, etc.). +dnl +dnl However, the Fortran 77 intrinsic and run-time libraries must be +dnl linked in as well, but the C++ compiler/linker doesn't know how to +dnl add these Fortran 77 libraries. Hence, the macro +dnl `AC_F77_LIBRARY_LDFLAGS' was created to determine these Fortran 77 +dnl libraries. +dnl +dnl This macro was packaged in its current form by Matthew D. Langston +dnl . However, nearly all of this macro +dnl came from the `OCTAVE_FLIBS' macro in `octave-2.0.13/aclocal.m4', +dnl and full credit should go to John W. Eaton for writing this +dnl extremely useful macro. Thank you John. +dnl +dnl AC_F77_LIBRARY_LDFLAGS() +AC_DEFUN(AC_F77_LIBRARY_LDFLAGS, +[AC_MSG_CHECKING([for Fortran 77 libraries]) +AC_REQUIRE([AC_PROG_F77]) +AC_REQUIRE([AC_CANONICAL_HOST]) +AC_CACHE_VAL(ac_cv_flibs, +[changequote(, )dnl +dnl Write a minimal program and compile it with -v. I don't know what +dnl to do if your compiler doesn't have -v... +echo " END" > conftest.f +foutput=`${F77} -v -o conftest conftest.f 2>&1` +dnl +dnl The easiest thing to do for xlf output is to replace all the commas +dnl with spaces. Try to only do that if the output is really from xlf, +dnl since doing that causes problems on other systems. +dnl +xlf_p=`echo $foutput | grep xlfentry` +if test -n "$xlf_p"; then + foutput=`echo $foutput | sed 's/,/ /g'` +fi +dnl +ld_run_path=`echo $foutput | \ + sed -n -e 's/^.*LD_RUN_PATH *= *\([^ ]*\).*/\1/p'` +dnl +dnl We are only supposed to find this on Solaris systems... +dnl Uh, the run path should be absolute, shouldn't it? +dnl +case "$ld_run_path" in + /*) + if test "$ac_cv_prog_gcc" = yes; then + ld_run_path="-Xlinker -R -Xlinker $ld_run_path" + else + ld_run_path="-R $ld_run_path" + fi + ;; + *) + ld_run_path= + ;; +esac +dnl +flibs= +lflags= +dnl +dnl If want_arg is set, we know we want the arg to be added to the list, +dnl so we don't have to examine it. +dnl +want_arg= +dnl +for arg in $foutput; do + old_want_arg=$want_arg + want_arg= +dnl +dnl None of the options that take arguments expect the argument to +dnl start with a -, so pretend we didn't see anything special. +dnl + if test -n "$old_want_arg"; then + case "$arg" in + -*) + old_want_arg= + ;; + esac + fi + case "$old_want_arg" in + '') + case $arg in + /*.a) + exists=false + for f in $lflags; do + if test x$arg = x$f; then + exists=true + fi + done + if $exists; then + arg= + else + lflags="$lflags $arg" + fi + ;; + -bI:*) + exists=false + for f in $lflags; do + if test x$arg = x$f; then + exists=true + fi + done + if $exists; then + arg= + else + if test "$ac_cv_prog_gcc" = yes; then + lflags="$lflags -Xlinker $arg" + else + lflags="$lflags $arg" + fi + fi + ;; + -lang* | -lcrt0.o | -lc | -lgcc) + arg= + ;; + -[lLR]) + want_arg=$arg + arg= + ;; + -[lLR]*) + exists=false + for f in $lflags; do + if test x$arg = x$f; then + exists=true + fi + done + if $exists; then + arg= + else + case "$arg" in + -lkernel32) + case "$canonical_host_type" in + *-*-cygwin*) + arg= + ;; + *) + lflags="$lflags $arg" + ;; + esac + ;; + -lm) + ;; + *) + lflags="$lflags $arg" + ;; + esac + fi + ;; + -u) + want_arg=$arg + arg= + ;; + -Y) + want_arg=$arg + arg= + ;; + *) + arg= + ;; + esac + ;; + -[lLR]) + arg="$old_want_arg $arg" + ;; + -u) + arg="-u $arg" + ;; + -Y) +dnl +dnl Should probably try to ensure unique directory options here too. +dnl This probably only applies to Solaris systems, and then will only +dnl work with gcc... +dnl + arg=`echo $arg | sed -e 's%^P,%%'` + SAVE_IFS=$IFS + IFS=: + list= + for elt in $arg; do + list="$list -L$elt" + done + IFS=$SAVE_IFS + arg="$list" + ;; + esac +dnl + if test -n "$arg"; then + flibs="$flibs $arg" + fi +done +if test -n "$ld_run_path"; then + flibs_result="$ld_run_path $flibs" +else + flibs_result="$flibs" +fi +changequote([, ])dnl +ac_cv_flibs="$flibs_result"]) +FLIBS="$ac_cv_flibs" +AC_SUBST(FLIBS)dnl +AC_MSG_RESULT($FLIBS) +]) + + +dnl ### Checks for operating system services + + +AC_DEFUN(AC_SYS_INTERPRETER, +[# Pull the hash mark out of the macro call to avoid m4 problems. +ac_msg="whether #! works in shell scripts" +AC_CACHE_CHECK($ac_msg, ac_cv_sys_interpreter, +[echo '#! /bin/cat +exit 69 +' > conftest +chmod u+x conftest +(SHELL=/bin/sh; export SHELL; ./conftest >/dev/null) +if test $? -ne 69; then + ac_cv_sys_interpreter=yes +else + ac_cv_sys_interpreter=no +fi +rm -f conftest]) +interpval="$ac_cv_sys_interpreter" +]) + +define(AC_HAVE_POUNDBANG, +[errprint(__file__:__line__: [$0 has been replaced by AC_SYS_INTERPRETER, taking no arguments +])m4exit(4)]) + +AC_DEFUN(AC_SYS_LONG_FILE_NAMES, +[AC_CACHE_CHECK(for long file names, ac_cv_sys_long_file_names, +[ac_cv_sys_long_file_names=yes +# Test for long file names in all the places we know might matter: +# . the current directory, where building will happen +# $prefix/lib where we will be installing things +# $exec_prefix/lib likewise +# eval it to expand exec_prefix. +# $TMPDIR if set, where it might want to write temporary files +# if $TMPDIR is not set: +# /tmp where it might want to write temporary files +# /var/tmp likewise +# /usr/tmp likewise +if test -n "$TMPDIR" && test -d "$TMPDIR" && test -w "$TMPDIR"; then + ac_tmpdirs="$TMPDIR" +else + ac_tmpdirs='/tmp /var/tmp /usr/tmp' +fi +for ac_dir in . $ac_tmpdirs `eval echo $prefix/lib $exec_prefix/lib` ; do + test -d $ac_dir || continue + test -w $ac_dir || continue # It is less confusing to not echo anything here. + (echo 1 > $ac_dir/conftest9012345) 2>/dev/null + (echo 2 > $ac_dir/conftest9012346) 2>/dev/null + val=`cat $ac_dir/conftest9012345 2>/dev/null` + if test ! -f $ac_dir/conftest9012345 || test "$val" != 1; then + ac_cv_sys_long_file_names=no + rm -f $ac_dir/conftest9012345 $ac_dir/conftest9012346 2>/dev/null + break + fi + rm -f $ac_dir/conftest9012345 $ac_dir/conftest9012346 2>/dev/null +done]) +if test $ac_cv_sys_long_file_names = yes; then + AC_DEFINE(HAVE_LONG_FILE_NAMES) +fi +]) + +AC_DEFUN(AC_SYS_RESTARTABLE_SYSCALLS, +[AC_CACHE_CHECK(for restartable system calls, ac_cv_sys_restartable_syscalls, +[AC_TRY_RUN( +[/* Exit 0 (true) if wait returns something other than -1, + i.e. the pid of the child, which means that wait was restarted + after getting the signal. */ +#include +#include +ucatch (isig) { } +main () { + int i = fork (), status; + if (i == 0) { sleep (3); kill (getppid (), SIGINT); sleep (3); exit (0); } + signal (SIGINT, ucatch); + status = wait(&i); + if (status == -1) wait(&i); + exit (status == -1); +} +], ac_cv_sys_restartable_syscalls=yes, ac_cv_sys_restartable_syscalls=no)]) +if test $ac_cv_sys_restartable_syscalls = yes; then + AC_DEFINE(HAVE_RESTARTABLE_SYSCALLS) +fi +]) + +AC_DEFUN(AC_PATH_X, +[AC_REQUIRE_CPP()dnl Set CPP; we run AC_PATH_X_DIRECT conditionally. +# If we find X, set shell vars x_includes and x_libraries to the +# paths, otherwise set no_x=yes. +# Uses ac_ vars as temps to allow command line to override cache and checks. +# --without-x overrides everything else, but does not touch the cache. +AC_MSG_CHECKING(for X) + +AC_ARG_WITH(x, [ --with-x use the X Window System]) +# $have_x is `yes', `no', `disabled', or empty when we do not yet know. +if test "x$with_x" = xno; then + # The user explicitly disabled X. + have_x=disabled +else + if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then + # Both variables are already set. + have_x=yes + else +AC_CACHE_VAL(ac_cv_have_x, +[# One or both of the vars are not set, and there is no cached value. +ac_x_includes=NO ac_x_libraries=NO +AC_PATH_X_XMKMF +AC_PATH_X_DIRECT +if test "$ac_x_includes" = NO || test "$ac_x_libraries" = NO; then + # Didn't find X anywhere. Cache the known absence of X. + ac_cv_have_x="have_x=no" +else + # Record where we found X for the cache. + ac_cv_have_x="have_x=yes \ + ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries" +fi])dnl + fi + eval "$ac_cv_have_x" +fi # $with_x != no + +if test "$have_x" != yes; then + AC_MSG_RESULT($have_x) + no_x=yes +else + # If each of the values was on the command line, it overrides each guess. + test "x$x_includes" = xNONE && x_includes=$ac_x_includes + test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries + # Update the cache value to reflect the command line values. + ac_cv_have_x="have_x=yes \ + ac_x_includes=$x_includes ac_x_libraries=$x_libraries" + AC_MSG_RESULT([libraries $x_libraries, headers $x_includes]) +fi +]) + +dnl Internal subroutine of AC_PATH_X. +dnl Set ac_x_includes and/or ac_x_libraries. +AC_DEFUN(AC_PATH_X_XMKMF, +[rm -fr conftestdir +if mkdir conftestdir; then + cd conftestdir + # Make sure to not put "make" in the Imakefile rules, since we grep it out. + cat > Imakefile <<'EOF' +acfindx: + @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"' +EOF + if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then + # GNU make sometimes prints "make[1]: Entering...", which would confuse us. + eval `${MAKE-make} acfindx 2>/dev/null | grep -v make` + # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR. + for ac_extension in a so sl; do + if test ! -f $ac_im_usrlibdir/libX11.$ac_extension && + test -f $ac_im_libdir/libX11.$ac_extension; then + ac_im_usrlibdir=$ac_im_libdir; break + fi + done + # Screen out bogus values from the imake configuration. They are + # bogus both because they are the default anyway, and because + # using them would break gcc on systems where it needs fixed includes. + case "$ac_im_incroot" in + /usr/include) ;; + *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes="$ac_im_incroot" ;; + esac + case "$ac_im_usrlibdir" in + /usr/lib | /lib) ;; + *) test -d "$ac_im_usrlibdir" && ac_x_libraries="$ac_im_usrlibdir" ;; + esac + fi + cd .. + rm -fr conftestdir +fi +]) + +dnl Internal subroutine of AC_PATH_X. +dnl Set ac_x_includes and/or ac_x_libraries. +AC_DEFUN(AC_PATH_X_DIRECT, +[if test "$ac_x_includes" = NO; then + # Guess where to find include files, by looking for this one X11 .h file. + test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h + + # First, try using that file with no special directory specified. +AC_TRY_CPP([#include <$x_direct_test_include>], +[# We can compile using X headers with no special include directory. +ac_x_includes=], +[# Look for the header file in a standard set of common directories. +# Check X11 before X11Rn because it is often a symlink to the current release. + for ac_dir in \ + /usr/X11/include \ + /usr/X11R6/include \ + /usr/X11R5/include \ + /usr/X11R4/include \ + \ + /usr/include/X11 \ + /usr/include/X11R6 \ + /usr/include/X11R5 \ + /usr/include/X11R4 \ + \ + /usr/local/X11/include \ + /usr/local/X11R6/include \ + /usr/local/X11R5/include \ + /usr/local/X11R4/include \ + \ + /usr/local/include/X11 \ + /usr/local/include/X11R6 \ + /usr/local/include/X11R5 \ + /usr/local/include/X11R4 \ + \ + /usr/X386/include \ + /usr/x386/include \ + /usr/XFree86/include/X11 \ + \ + /usr/include \ + /usr/local/include \ + /usr/unsupported/include \ + /usr/athena/include \ + /usr/local/x11r5/include \ + /usr/lpp/Xamples/include \ + \ + /usr/openwin/include \ + /usr/openwin/share/include \ + ; \ + do + if test -r "$ac_dir/$x_direct_test_include"; then + ac_x_includes=$ac_dir + break + fi + done]) +fi # $ac_x_includes = NO + +if test "$ac_x_libraries" = NO; then + # Check for the libraries. + + test -z "$x_direct_test_library" && x_direct_test_library=Xt + test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc + + # See if we find them without any special options. + # Don't add to $LIBS permanently. + ac_save_LIBS="$LIBS" + LIBS="-l$x_direct_test_library $LIBS" +AC_TRY_LINK(, [${x_direct_test_function}()], +[LIBS="$ac_save_LIBS" +# We can link X programs with no special library path. +ac_x_libraries=], +[LIBS="$ac_save_LIBS" +# First see if replacing the include by lib works. +# Check X11 before X11Rn because it is often a symlink to the current release. +for ac_dir in `echo "$ac_x_includes" | sed s/include/lib/` \ + /usr/X11/lib \ + /usr/X11R6/lib \ + /usr/X11R5/lib \ + /usr/X11R4/lib \ + \ + /usr/lib/X11 \ + /usr/lib/X11R6 \ + /usr/lib/X11R5 \ + /usr/lib/X11R4 \ + \ + /usr/local/X11/lib \ + /usr/local/X11R6/lib \ + /usr/local/X11R5/lib \ + /usr/local/X11R4/lib \ + \ + /usr/local/lib/X11 \ + /usr/local/lib/X11R6 \ + /usr/local/lib/X11R5 \ + /usr/local/lib/X11R4 \ + \ + /usr/X386/lib \ + /usr/x386/lib \ + /usr/XFree86/lib/X11 \ + \ + /usr/lib \ + /usr/local/lib \ + /usr/unsupported/lib \ + /usr/athena/lib \ + /usr/local/x11r5/lib \ + /usr/lpp/Xamples/lib \ + /lib/usr/lib/X11 \ + \ + /usr/openwin/lib \ + /usr/openwin/share/lib \ + ; \ +do +dnl Don't even attempt the hair of trying to link an X program! + for ac_extension in a so sl; do + if test -r $ac_dir/lib${x_direct_test_library}.$ac_extension; then + ac_x_libraries=$ac_dir + break 2 + fi + done +done]) +fi # $ac_x_libraries = NO +]) + +dnl Find additional X libraries, magic flags, etc. +AC_DEFUN(AC_PATH_XTRA, +[AC_REQUIRE([AC_PATH_X])dnl +if test "$no_x" = yes; then + # Not all programs may use this symbol, but it does not hurt to define it. + AC_DEFINE(X_DISPLAY_MISSING) + X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS= +else + if test -n "$x_includes"; then + X_CFLAGS="$X_CFLAGS -I$x_includes" + fi + + # It would also be nice to do this for all -L options, not just this one. + if test -n "$x_libraries"; then + X_LIBS="$X_LIBS -L$x_libraries" +dnl FIXME banish uname from this macro! + # For Solaris; some versions of Sun CC require a space after -R and + # others require no space. Words are not sufficient . . . . + case "`(uname -sr) 2>/dev/null`" in + "SunOS 5"*) + AC_MSG_CHECKING(whether -R must be followed by a space) + ac_xsave_LIBS="$LIBS"; LIBS="$LIBS -R$x_libraries" + AC_TRY_LINK(, , ac_R_nospace=yes, ac_R_nospace=no) + if test $ac_R_nospace = yes; then + AC_MSG_RESULT(no) + X_LIBS="$X_LIBS -R$x_libraries" + else + LIBS="$ac_xsave_LIBS -R $x_libraries" + AC_TRY_LINK(, , ac_R_space=yes, ac_R_space=no) + if test $ac_R_space = yes; then + AC_MSG_RESULT(yes) + X_LIBS="$X_LIBS -R $x_libraries" + else + AC_MSG_RESULT(neither works) + fi + fi + LIBS="$ac_xsave_LIBS" + esac + fi + + # Check for system-dependent libraries X programs must link with. + # Do this before checking for the system-independent R6 libraries + # (-lICE), since we may need -lsocket or whatever for X linking. + + if test "$ISC" = yes; then + X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet" + else + # Martyn.Johnson@cl.cam.ac.uk says this is needed for Ultrix, if the X + # libraries were built with DECnet support. And karl@cs.umb.edu says + # the Alpha needs dnet_stub (dnet does not exist). + AC_CHECK_LIB(dnet, dnet_ntoa, [X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"]) + if test $ac_cv_lib_dnet_dnet_ntoa = no; then + AC_CHECK_LIB(dnet_stub, dnet_ntoa, + [X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"]) + fi + + # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT, + # to get the SysV transport functions. + # chad@anasazi.com says the Pyramis MIS-ES running DC/OSx (SVR4) + # needs -lnsl. + # The nsl library prevents programs from opening the X display + # on Irix 5.2, according to dickey@clark.net. + AC_CHECK_FUNC(gethostbyname) + if test $ac_cv_func_gethostbyname = no; then + AC_CHECK_LIB(nsl, gethostbyname, X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl") + fi + + # lieder@skyler.mavd.honeywell.com says without -lsocket, + # socket/setsockopt and other routines are undefined under SCO ODT + # 2.0. But -lsocket is broken on IRIX 5.2 (and is not necessary + # on later versions), says simon@lia.di.epfl.ch: it contains + # gethostby* variants that don't use the nameserver (or something). + # -lsocket must be given before -lnsl if both are needed. + # We assume that if connect needs -lnsl, so does gethostbyname. + AC_CHECK_FUNC(connect) + if test $ac_cv_func_connect = no; then + AC_CHECK_LIB(socket, connect, X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS", , + $X_EXTRA_LIBS) + fi + + # gomez@mi.uni-erlangen.de says -lposix is necessary on A/UX. + AC_CHECK_FUNC(remove) + if test $ac_cv_func_remove = no; then + AC_CHECK_LIB(posix, remove, X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix") + fi + + # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay. + AC_CHECK_FUNC(shmat) + if test $ac_cv_func_shmat = no; then + AC_CHECK_LIB(ipc, shmat, X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc") + fi + fi + + # Check for libraries that X11R6 Xt/Xaw programs need. + ac_save_LDFLAGS="$LDFLAGS" + test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries" + # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to + # check for ICE first), but we must link in the order -lSM -lICE or + # we get undefined symbols. So assume we have SM if we have ICE. + # These have to be linked with before -lX11, unlike the other + # libraries we check for below, so use a different variable. + # --interran@uluru.Stanford.EDU, kb@cs.umb.edu. + AC_CHECK_LIB(ICE, IceConnectionNumber, + [X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"], , $X_EXTRA_LIBS) + LDFLAGS="$ac_save_LDFLAGS" + +fi +AC_SUBST(X_CFLAGS)dnl +AC_SUBST(X_PRE_LIBS)dnl +AC_SUBST(X_LIBS)dnl +AC_SUBST(X_EXTRA_LIBS)dnl +]) + +dnl The old Cygwin32 macro is deprecated. +AC_DEFUN(AC_CYGWIN32, +[AC_OBSOLETE([$0], [; instead use AC_CYGWIN])dnl +AC_CYGWIN]) + +dnl Check for Cygwin. This is a way to set the right value for +dnl EXEEXT. +AC_DEFUN(AC_CYGWIN, +[AC_CACHE_CHECK(for Cygwin environment, ac_cv_cygwin, +[AC_TRY_COMPILE(,[ +#ifndef __CYGWIN__ +#define __CYGWIN__ __CYGWIN32__ +#endif +return __CYGWIN__;], +ac_cv_cygwin=yes, ac_cv_cygwin=no) +rm -f conftest*]) +CYGWIN= +test "$ac_cv_cygwin" = yes && CYGWIN=yes]) + +dnl Check for mingw32. This is another way to set the right value for +dnl EXEEXT. +AC_DEFUN(AC_MINGW32, +[AC_CACHE_CHECK(for mingw32 environment, ac_cv_mingw32, +[AC_TRY_COMPILE(,[return __MINGW32__;], +ac_cv_mingw32=yes, ac_cv_mingw32=no) +rm -f conftest*]) +MINGW32= +test "$ac_cv_mingw32" = yes && MINGW32=yes]) + +dnl Check for EMX/OS2. This is another way to set the right value for +dnl EXEEXT. +AC_DEFUN(AC_EMXOS2, +[AC_CACHE_CHECK(for EMX/OS2 environment, ac_cv_emxos2, +[AC_TRY_COMPILE(,[return __EMX__;], +ac_cv_emxos2=yes, ac_cv_emxos2=no) +rm -f conftest*]) +AC_CACHE_VAL(ac_cv_libpre, +if test "$ac_cv_emxos2" = yes ; then + ac_cv_libpre= +else + ac_cv_libpre=lib +fi +) +EMXOS2= +test "$ac_cv_emxos2" = yes && EMXOS2=yes]) + +dnl Check for the extension used for executables. This knows that we +dnl add .exe for Cygwin or mingw32. Otherwise, it compiles a test +dnl executable. If this is called, the executable extensions will be +dnl automatically used by link commands run by the configure script. +dnl +dnl exeext -> whether prog.exe ist created instead of prog +dnl xexeect -> whether prog.exe needs to be called instead of prog +dnl +AC_DEFUN(AC_EXEEXT, +[AC_REQUIRE([AC_CYGWIN]) +AC_REQUIRE([AC_MINGW32]) +AC_REQUIRE([AC_EMXOS2]) +AC_MSG_CHECKING([for executable suffix]) +AC_CACHE_VAL(ac_cv_exeext, +[if test "$CYGWIN" = yes || test "$MINGW32" = yes || test "$EMXOS2" = yes; then + ac_cv_exeext=.exe + ac_cv_xexeext="" +else + rm -f conftest* + echo 'int main () { return 0; }' > conftest.$ac_ext + ac_cv_exeext= + if AC_TRY_EVAL(ac_link); then + for file in conftest.*; do + case $file in + *.c | *.o | *.obj) ;; + *.dSYM) ;; # Ignore strange directory found on Mac OS X with cc -g + *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;; + esac + done + else + ccout=`eval "${CC-cc} 2>&1" 2> /dev/null` + ret=$? + nf=`echo "$ccout" | grep 'not found'` + if test $ret = 127 -a -n "$nf" ; then # Korn Shell + ccout="" + fi + if test "$ret" -ne 0 -a ! -n "$ccout" ; then + AC_MSG_ERROR([installation or configuration problem: C compiler ${CC-cc} not found.]) + fi + AC_MSG_ERROR([installation or configuration problem: compiler cannot create executables.]) + fi + (./conftest ; exit) 2> /dev/null + if test $? != 0 ; then + ac_cv_xexeext="${ac_cv_exeext}" + (./conftest${ac_cv_xexeext} ; exit) 2> /dev/null + if test $? != 0 ; then + ac_cv_xexeext="" + fi + fi + rm -f conftest* + test x"${ac_cv_exeext}" = x && ac_cv_exeext=no + test x"${ac_cv_xexeext}" = x && ac_cv_xexeext=no +fi]) +EXEEXT="" +XEXEEXT="" +test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext} +test x"${ac_cv_xexeext}" != xno && XEXEEXT=${ac_cv_xexeext} +AC_MSG_RESULT(${ac_cv_exeext}) +AC_MSG_CHECKING([for executable calling suffix]) +AC_MSG_RESULT(${ac_cv_xexeext}) +dnl Setting ac_exeext will implicitly change the ac_link command. +ac_exeext=$EXEEXT +ac_xexeext=$XEXEEXT +AC_SUBST(EXEEXT) +AC_SUBST(XEXEEXT) +]) + + +dnl ### Checks for UNIX variants +dnl These are kludges which should be replaced by a single POSIX check. +dnl They aren't cached, to discourage their use. + + +AC_DEFUN(AC_AIX, +[AC_BEFORE([$0], [AC_TRY_COMPILE])dnl +AC_BEFORE([$0], [AC_TRY_RUN])dnl +AC_MSG_CHECKING(for AIX) +AC_EGREP_CPP(yes, +[#ifdef _AIX + yes +#endif +], [AC_MSG_RESULT(yes); AC_DEFINE(_ALL_SOURCE)], AC_MSG_RESULT(no)) +]) + +AC_DEFUN(AC_MINIX, +[AC_BEFORE([$0], [AC_TRY_COMPILE])dnl +AC_BEFORE([$0], [AC_TRY_RUN])dnl +AC_CHECK_HEADER(minix/config.h, MINIX=yes, MINIX=) +if test "$MINIX" = yes; then + AC_DEFINE(_POSIX_SOURCE) + AC_DEFINE(_POSIX_1_SOURCE, 2) + AC_DEFINE(_MINIX) +fi +]) + +AC_DEFUN(AC_ISC_POSIX, +[AC_REQUIRE([AC_PROG_CC])dnl +AC_BEFORE([$0], [AC_TRY_COMPILE])dnl +AC_BEFORE([$0], [AC_TRY_RUN])dnl +AC_MSG_CHECKING(for POSIXized ISC) +if test -d /etc/conf/kconfig.d && + grep _POSIX_VERSION [/usr/include/sys/unistd.h] >/dev/null 2>&1 +then + AC_MSG_RESULT(yes) + ISC=yes # If later tests want to check for ISC. + AC_DEFINE(_POSIX_SOURCE) + if test "$GCC" = yes; then + CC="$CC -posix" + else + CC="$CC -Xp" + fi +else + AC_MSG_RESULT(no) + ISC= +fi +]) + +AC_DEFUN(AC_XENIX_DIR, +[AC_OBSOLETE([$0], [; instead use AC_HEADER_DIRENT])dnl +AC_REQUIRE([AC_DIR_HEADER])dnl +AC_MSG_CHECKING(for Xenix) +AC_EGREP_CPP(yes, +[#if defined(M_XENIX) && !defined(M_UNIX) + yes +#endif +], [AC_MSG_RESULT(yes); XENIX=yes], [AC_MSG_RESULT(no); XENIX=]) +if test "$XENIX" = yes; then + # Make sure -ldir precedes -lx. + test $ac_header_dirent = dirent.h && LIBS="-ldir $LIBS" + LIBS="$LIBS -lx" +fi +]) + +AC_DEFUN(AC_DYNIX_SEQ, +[AC_OBSOLETE([$0], [; instead use AC_FUNC_GETMNTENT])dnl +AC_CHECK_LIB(seq, getmntent, LIBS="-lseq $LIBS") +]) + +AC_DEFUN(AC_IRIX_SUN, +[AC_OBSOLETE([$0], [; instead use AC_FUNC_GETMNTENT or AC_CHECK_LIB(sun, getpwnam)])dnl +AC_CHECK_LIB(sun, getmntent, LIBS="-lsun $LIBS") +]) + +AC_DEFUN(AC_SCO_INTL, +[AC_OBSOLETE([$0], [; instead use AC_FUNC_STRFTIME])dnl +AC_CHECK_LIB(intl, strftime, LIBS="-lintl $LIBS") +]) diff -Nru cdrtools-2.01.01a33/autoconf/autoconf cdrtools-3.02a09/autoconf/autoconf --- cdrtools-2.01.01a33/autoconf/autoconf 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/autoconf/autoconf 2009-04-19 12:45:00.000000000 +0000 @@ -0,0 +1,176 @@ +#! /bin/sh +# @(#)autoconf 1.8 09/04/19 Copyright 1999-2009 J. Schilling +# +# autoconf -- create `configure' using m4 macros +# Copyright (C) 1992, 1993, 1994, 1996 Free Software Foundation, Inc. + +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. + +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA +# 02111-1307, USA. + +# If given no args, create `configure' from template file `configure.in'. +# With one arg, create a configure script on standard output from +# the given template file. + +usage="\ +Usage: autoconf [-h] [--help] [-m dir] [--macrodir=dir] + [-l dir] [--localdir=dir] [--version] [template-file]" + +# NLS nuisances. +# Only set these to C if already set. These must not be set unconditionally +# because not all systems understand e.g. LANG=C (notably SCO). +# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'! +# Non-C LC_CTYPE values break the ctype check. +if test "${LANG+set}" = set; then LANG=C; export LANG; fi +if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi +if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi +if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi + +: ${AC_MACRODIR=.} + +: ${M4=/usr/bin/gm4} +$M4 < /dev/null 2> /dev/null || M4=/opt/sfw/bin/gm4 +$M4 < /dev/null 2> /dev/null || M4=/usr/sfw/bin/gm4 +$M4 < /dev/null 2> /dev/null || M4=/opt/csw/bin/gm4 +$M4 < /dev/null 2> /dev/null || M4=gm4 +$M4 < /dev/null 2> /dev/null || M4=m4 + +: ${AWK=/usr/bin/gawk} +$AWK '{print 1}' < /dev/null 2> /dev/null || AWK=/opt/sfw/bin/gawk +$AWK '{print 1}' < /dev/null 2> /dev/null || AWK=/usr/sfw/bin/gawk +$AWK '{print 1}' < /dev/null 2> /dev/null || AWK=/opt/csw/bin/gawk +$AWK '{print 1}' < /dev/null 2> /dev/null || AWK=gawk +$AWK '{print 1}' < /dev/null 2> /dev/null || AWK=nawk +$AWK '{print 1}' < /dev/null 2> /dev/null || AWK=awk + +case "${M4}" in +/*) # Handle the case that m4 has moved since we were configured. + # It may have been found originally in a build directory. + test -f "${M4}" || M4=/usr/sfw/bin/gm4 + test -f "${M4}" || M4=m4 ;; +esac + +: ${TMPDIR=/tmp} +tmpout=${TMPDIR}/acout.$$ +localdir= +show_version=no + +while test $# -gt 0 ; do + case "${1}" in + -h | --help | --h* ) + echo "${usage}" 1>&2; exit 0 ;; + --localdir=* | --l*=* ) + localdir="`echo \"${1}\" | sed -e 's/^[^=]*=//'`" + shift ;; + -l | --localdir | --l*) + shift + test $# -eq 0 && { echo "${usage}" 1>&2; exit 1; } + localdir="${1}" + shift ;; + --macrodir=* | --m*=* ) + AC_MACRODIR="`echo \"${1}\" | sed -e 's/^[^=]*=//'`" + shift ;; + -m | --macrodir | --m* ) + shift + test $# -eq 0 && { echo "${usage}" 1>&2; exit 1; } + AC_MACRODIR="${1}" + shift ;; + --version | --v* ) + show_version=yes; shift ;; + -- ) # Stop option processing + shift; break ;; + - ) # Use stdin as input. + break ;; + -* ) + echo "${usage}" 1>&2; exit 1 ;; + * ) + break ;; + esac +done + +if test $show_version = yes; then + version=`sed -n 's/define.AC_ACVERSION.[ ]*\([0-9.]*\).*/\1/p' \ + $AC_MACRODIR/acgeneral.m4` + echo "Autoconf version $version" + exit 0 +fi + +case $# in + 0) infile=configure.in ;; + 1) infile="$1" ;; + *) echo "$usage" >&2; exit 1 ;; +esac + +trap 'rm -f $tmpin $tmpout; exit 1' 1 2 15 + +tmpin=${TMPDIR}/acin.$$ # Always set this, to avoid bogus errors from some rm's. +if test z$infile = z-; then + infile=$tmpin + cat > $infile +elif test ! -r "$infile"; then + echo "autoconf: ${infile}: No such file or directory" >&2 + exit 1 +fi + +if test -n "$localdir"; then + use_localdir="-I$localdir -DAC_LOCALDIR=$localdir" +else + use_localdir= +fi + +# Use the frozen version of Autoconf if available. +r= f= +# Some non-GNU m4's don't reject the --help option, so give them /dev/null. +case `$M4 --help < /dev/null 2>&1` in +*reload-state*) test -r $AC_MACRODIR/autoconf.m4f && { r=--reload f=f; } ;; +*traditional*) ;; +*) echo Autoconf requires GNU m4 1.1 or later >&2; rm -f $tmpin; exit 1 ;; +esac + +$M4 -I$AC_MACRODIR $use_localdir $r autoconf.m4$f $infile > $tmpout || + { rm -f $tmpin $tmpout; exit 2; } + +# You could add your own prefixes to pattern if you wanted to check for +# them too, e.g. pattern='\(AC_\|ILT_\)', except that UNIX sed doesn't do +# alternation. +pattern="AC_" + +status=0 +if grep "^[^#]*${pattern}" $tmpout > /dev/null 2>&1; then + echo "autoconf: Undefined macros:" >&2 + sed -n "s/^[^#]*\\(${pattern}[_A-Za-z0-9]*\\).*/\\1/p" $tmpout | + while read macro; do + grep -n "^[^#]*$macro" $infile /dev/null + test $? -eq 1 && echo >&2 "***BUG in Autoconf--please report*** $macro" + done | sort -u >&2 + status=1 +fi + +if test $# -eq 0; then + exec 4> configure; chmod +x configure +else + exec 4>&1 +fi + +# Put the real line numbers into configure to make config.log more helpful. +$AWK ' +/__oline__/ { printf "%d:", NR + 1 } + { print } +' $tmpout | sed ' +/__oline__/s/^\([0-9][0-9]*\):\(.*\)__oline__/\2\1/ +' >&4 + +rm -f $tmpout + +exit $status diff -Nru cdrtools-2.01.01a33/autoconf/autoconf.m4 cdrtools-3.02a09/autoconf/autoconf.m4 --- cdrtools-2.01.01a33/autoconf/autoconf.m4 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/autoconf/autoconf.m4 1999-01-05 13:27:52.000000000 +0000 @@ -0,0 +1,28 @@ +dnl Driver that loads the Autoconf macro files. +dnl Requires GNU m4. +dnl This file is part of Autoconf. +dnl Copyright (C) 1994 Free Software Foundation, Inc. +dnl +dnl This program is free software; you can redistribute it and/or modify +dnl it under the terms of the GNU General Public License as published by +dnl the Free Software Foundation; either version 2, or (at your option) +dnl any later version. +dnl +dnl This program is distributed in the hope that it will be useful, +dnl but WITHOUT ANY WARRANTY; without even the implied warranty of +dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +dnl GNU General Public License for more details. +dnl +dnl You should have received a copy of the GNU General Public License +dnl along with this program; if not, write to the Free Software +dnl Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA +dnl 02111-1307, USA. +dnl +dnl Written by David MacKenzie. +dnl +include(acgeneral.m4)dnl +builtin(include, acspecific.m4)dnl +builtin(include, acoldnames.m4)dnl +dnl Do not sinclude acsite.m4 here, because it may not be installed +dnl yet when Autoconf is frozen. +dnl Do not sinclude ./aclocal.m4 here, to prevent it from being frozen. diff -Nru cdrtools-2.01.01a33/autoconf/autoheader.m4 cdrtools-3.02a09/autoconf/autoheader.m4 --- cdrtools-2.01.01a33/autoconf/autoheader.m4 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/autoconf/autoheader.m4 1999-01-05 13:28:37.000000000 +0000 @@ -0,0 +1,110 @@ +dnl Driver and redefinitions of some Autoconf macros for autoheader. +dnl This file is part of Autoconf. +dnl Copyright (C) 1994, 1995 Free Software Foundation, Inc. +dnl +dnl This program is free software; you can redistribute it and/or modify +dnl it under the terms of the GNU General Public License as published by +dnl the Free Software Foundation; either version 2, or (at your option) +dnl any later version. +dnl +dnl This program is distributed in the hope that it will be useful, +dnl but WITHOUT ANY WARRANTY; without even the implied warranty of +dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +dnl GNU General Public License for more details. +dnl +dnl You should have received a copy of the GNU General Public License +dnl along with this program; if not, write to the Free Software +dnl Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA +dnl 02111-1307, USA. +dnl +dnl Written by Roland McGrath. +dnl +include(acgeneral.m4)dnl +builtin(include, acspecific.m4)dnl +builtin(include, acoldnames.m4)dnl + +dnl These are alternate definitions of some macros, which produce +dnl strings in the output marked with "@@@" so we can easily extract +dnl the information we want. The `#' at the end of the first line of +dnl each definition seems to be necessary to prevent m4 from eating +dnl the newline, which makes the @@@ not always be at the beginning of +dnl a line. + +define([AC_CHECK_FUNCS], [# +@@@funcs="$funcs $1"@@@ +ifelse([$2], , , [ +# If it was found, we do: +$2 +# If it was not found, we do: +$3 +]) +]) + +define([AC_CHECK_HEADERS], [# +@@@headers="$headers $1"@@@ +ifelse([$2], , , [ +# If it was found, we do: +$2 +# If it was not found, we do: +$3 +]) +]) + +define([AC_CHECK_HEADERS_DIRENT], [# +@@@headers="$headers $1"@@@ +]) + +define([AC_CHECK_LIB], [# + ifelse([$3], , [ +@@@libs="$libs $1"@@@ +], [ +# If it was found, we do: +$3 +# If it was not found, we do: +$4 +]) +]) + +define([AC_HAVE_LIBRARY], [# +changequote(<<, >>)dnl +define(<>, dnl +patsubst(patsubst($1, <>, <<\1>>), <<-l>>, <<>>))dnl +changequote([, ])dnl + ifelse([$2], , [ +@@@libs="$libs AC_LIB_NAME"@@@ +], [ +# If it was found, we do: +$2 +# If it was not found, we do: +$3 +]) +]) + +define([AC_CHECK_SIZEOF], [# +@@@types="$types,$1"@@@ +]) + +define([AC_CONFIG_HEADER], [# +define([AC_CONFIG_H], patsubst($1, [ .*$], []))dnl +@@@config_h=AC_CONFIG_H@@@ +]) + +define([AC_DEFINE], [# +ifelse([$3],,[# +@@@syms="$syms $1"@@@ +], [# +@@@verbatim="$verbatim +/* $3 */ +#undef $1 +"@@@ +])]) + +define([AC_DEFINE_UNQUOTED], [# +ifelse([$3],,[# +@@@syms="$syms $1"@@@ +], [# +@@@verbatim="$verbatim +/* $3 */ +#undef $1 +"@@@ +])]) diff -Nru cdrtools-2.01.01a33/autoconf/config.guess cdrtools-3.02a09/autoconf/config.guess --- cdrtools-2.01.01a33/autoconf/config.guess 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/autoconf/config.guess 2017-05-09 18:24:23.000000000 +0000 @@ -0,0 +1,1031 @@ +#! /bin/sh +# @(#)config.guess 1.19 17/05/09 Copyright 1999-2014 J. Schilling +# +# Attempt to guess a canonical system name. +# Copyright (C) 1992, 93, 94, 95, 96, 97, 1998 Free Software Foundation, Inc. +# +# This file is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that program. + +# Written by Per Bothner . +# The master version of this file is at the FSF in /home/gd/gnu/lib. +# +# This script attempts to guess a canonical system name similar to +# config.sub. If it succeeds, it prints the system name on stdout, and +# exits with 0. Otherwise, it exits with 1. +# +# The plan is that this can be called by configure scripts if you +# don't specify an explicit system type (host/target name). +# +# Only a few systems have been added to this list; please add others +# (but try to keep the structure clean). +# + +# This is needed to find uname on a Pyramid OSx when run in the BSD universe. +# (ghazi@noc.rutgers.edu 8/24/94.) +if (test -f /.attbin/uname) >/dev/null 2>&1 ; then + PATH=$PATH:/.attbin ; export PATH +fi + +UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown +UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown +UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown +UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown + +trap 'rm -f dummy.c dummy.o dummy; exit 1' 1 2 15 + +# Note: order is significant - the case branches are not exclusive. + +# +# This command helps to debug the script via "sh -x" +# +: "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" + +case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in + alpha:OSF1:*:*) + if test $UNAME_RELEASE = "V4.0"; then + UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` + fi + # A Vn.n version is a released version. + # A Tn.n version is a released field test version. + # A Xn.n version is an unreleased experimental baselevel. + # 1.2 uses "1.2" for uname -r. + cat <dummy.s + .globl main + .ent main +main: + .frame \$30,0,\$26,0 + .prologue 0 + .long 0x47e03d80 # implver $0 + lda \$2,259 + .long 0x47e20c21 # amask $2,$1 + srl \$1,8,\$2 + sll \$2,2,\$2 + sll \$0,3,\$0 + addl \$1,\$0,\$0 + addl \$2,\$0,\$0 + ret \$31,(\$26),1 + .end main +EOF + ${CC-cc} dummy.s -o dummy 2>/dev/null + if test "$?" = 0 ; then + ./dummy + case "$?" in + 7) + UNAME_MACHINE="alpha" + ;; + 15) + UNAME_MACHINE="alphaev5" + ;; + 14) + UNAME_MACHINE="alphaev56" + ;; + 10) + UNAME_MACHINE="alphapca56" + ;; + 16) + UNAME_MACHINE="alphaev6" + ;; + esac + fi + rm -f dummy.s dummy + echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[VTX]//' | tr [[A-Z]] [[a-z]]` + exit 0 ;; + 21064:Windows_NT:50:3) + echo alpha-dec-winnt3.5 + exit 0 ;; + *:FreeMiNT:*:*) + echo m68k-atari-freemint + exit 0 ;; + *:MiNT:*:*) + echo m68k-atari-mint + exit 0 ;; + *:TOS:*:*) + echo m68k-atari-tos + exit 0 ;; + Amiga*:UNIX_System_V:4.0:*) + echo m68k-cbm-sysv4 + exit 0;; + amiga:NetBSD:*:*) + echo m68k-cbm-netbsd${UNAME_RELEASE} + exit 0 ;; + amiga:OpenBSD:*:*) + echo m68k-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + *:[Aa]miga[Oo][Ss]:*:*) + echo ${UNAME_MACHINE}-unknown-amigaos + exit 0 ;; + arc64:OpenBSD:*:*) + echo mips64el-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + arc:OpenBSD:*:*) + echo mipsel-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + hkmips:OpenBSD:*:*) + echo mips-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + pmax:OpenBSD:*:*) + echo mipsel-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + sgi:OpenBSD:*:*) + echo mips-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + wgrisc:OpenBSD:*:*) + echo mipsel-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) + echo arm-acorn-riscix${UNAME_RELEASE} + exit 0;; + arm32:NetBSD:*:*) + echo arm-unknown-netbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` + exit 0 ;; + SR2?01:HI-UX/MPP:*:*) + echo hppa1.1-hitachi-hiuxmpp + exit 0;; + Pyramid*:OSx*:*:*|MIS*:OSx*:*:*|MIS*:SMP_DC-OSx*:*:*) + # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. + if test "`(/bin/universe) 2>/dev/null`" = att ; then + echo pyramid-pyramid-sysv3 + else + echo pyramid-pyramid-bsd + fi + exit 0 ;; + NILE:*:*:dcosx) + echo pyramid-pyramid-svr4 + exit 0 ;; + sun4H:SunOS:5.*:*) + echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit 0 ;; + sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) + echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit 0 ;; + i86pc:SunOS:5.*:*) + echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit 0 ;; + sun4*:SunOS:6*:*) + # According to config.sub, this is the proper way to canonicalize + # SunOS6. Hard to guess exactly what SunOS6 will be like, but + # it's likely to be more like Solaris than SunOS4. + echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit 0 ;; + sun4*:SunOS:*:*) + case "`/usr/bin/arch -k`" in + Series*|S4*) + UNAME_RELEASE=`uname -v` + ;; + esac + # Japanese Language versions have a version number like `4.1.3-JL'. + echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'` + exit 0 ;; + sun3*:SunOS:*:*) + echo m68k-sun-sunos${UNAME_RELEASE} + exit 0 ;; + sun*:*:4.2BSD:*) + UNAME_RELEASE=`(head -1 /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` + test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 + case "`/bin/arch`" in + sun3) + echo m68k-sun-sunos${UNAME_RELEASE} + ;; + sun4) + echo sparc-sun-sunos${UNAME_RELEASE} + ;; + esac + exit 0 ;; + aushp:SunOS:*:*) + echo sparc-auspex-sunos${UNAME_RELEASE} + exit 0 ;; + atari*:NetBSD:*:*) + echo m68k-atari-netbsd${UNAME_RELEASE} + exit 0 ;; + atari*:OpenBSD:*:*) + echo m68k-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + sun3*:NetBSD:*:*) + echo m68k-sun-netbsd${UNAME_RELEASE} + exit 0 ;; + sun3*:OpenBSD:*:*) + echo m68k-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + mac68k:NetBSD:*:*) + echo m68k-apple-netbsd${UNAME_RELEASE} + exit 0 ;; + mac68k:OpenBSD:*:*) + echo m68k-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + mvme68k:OpenBSD:*:*) + echo m68k-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + mvme88k:OpenBSD:*:*) + echo m88k-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + powerpc:machten:*:*) + echo powerpc-apple-machten${UNAME_RELEASE} + exit 0 ;; + macppc:NetBSD:*:*) + echo powerpc-apple-netbsd${UNAME_RELEASE} + exit 0 ;; + RISC*:Mach:*:*) + echo mips-dec-mach_bsd4.3 + exit 0 ;; + RISC*:ULTRIX:*:*) + echo mips-dec-ultrix${UNAME_RELEASE} + exit 0 ;; + VAX*:ULTRIX*:*:*) + echo vax-dec-ultrix${UNAME_RELEASE} + exit 0 ;; + 2020:CLIX:*:*) + echo clipper-intergraph-clix${UNAME_RELEASE} + exit 0 ;; + mips:*:*:UMIPS | mips:*:*:RISCos) + sed 's/^ //' << EOF >dummy.c + int main (argc, argv) int argc; char **argv; { + #if defined (host_mips) && defined (MIPSEB) + #if defined (SYSTYPE_SYSV) + printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0); + #endif + #if defined (SYSTYPE_SVR4) + printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0); + #endif + #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD) + printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0); + #endif + #endif + exit (-1); + } +EOF + ${CC-cc} dummy.c -o dummy \ + && ./dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \ + && rm dummy.c dummy && exit 0 + rm -f dummy.c dummy + echo mips-mips-riscos${UNAME_RELEASE} + exit 0 ;; + Night_Hawk:Power_UNIX:*:*) + echo powerpc-harris-powerunix + exit 0 ;; + m88k:CX/UX:7*:*) + echo m88k-harris-cxux7 + exit 0 ;; + m88k:*:4*:R4*) + echo m88k-motorola-sysv4 + exit 0 ;; + m88k:*:3*:R3*) + echo m88k-motorola-sysv3 + exit 0 ;; + AViiON:dgux:*:*) + # DG/UX returns AViiON for all architectures + UNAME_PROCESSOR=`/usr/bin/uname -p` + if [ $UNAME_PROCESSOR = mc88100 -o $UNAME_PROCESSOR = mc88110 ] ; then + if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx \ + -o ${TARGET_BINARY_INTERFACE}x = x ] ; then + echo m88k-dg-dgux${UNAME_RELEASE} + else + echo m88k-dg-dguxbcs${UNAME_RELEASE} + fi + else echo i586-dg-dgux${UNAME_RELEASE} + fi + exit 0 ;; + M88*:DolphinOS:*:*) # DolphinOS (SVR3) + echo m88k-dolphin-sysv3 + exit 0 ;; + M88*:*:R3*:*) + # Delta 88k system running SVR3 + echo m88k-motorola-sysv3 + exit 0 ;; + XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) + echo m88k-tektronix-sysv3 + exit 0 ;; + Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) + echo m68k-tektronix-bsd + exit 0 ;; + *:IRIX*:*:*) + echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'` + exit 0 ;; + ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. + echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id + exit 0 ;; # Note that: echo "'`uname -s`'" gives 'AIX ' + i?86:AIX:*:*) + echo i386-ibm-aix + exit 0 ;; + *:AIX:2:3) + if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then + sed 's/^ //' << EOF >dummy.c + #include + + main() + { + if (!__power_pc()) + exit(1); + puts("powerpc-ibm-aix3.2.5"); + exit(0); + } +EOF + ${CC-cc} dummy.c -o dummy && ./dummy && rm dummy.c dummy && exit 0 + rm -f dummy.c dummy + echo rs6000-ibm-aix3.2.5 + elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then + echo rs6000-ibm-aix3.2.4 + else + echo rs6000-ibm-aix3.2 + fi + exit 0 ;; + *:AIX:*:4) + IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | head -1 | awk '{ print $1 }'` + if /usr/sbin/lsattr -EHl ${IBM_CPU_ID} | grep POWER >/dev/null 2>&1; then + IBM_ARCH=rs6000 + else + IBM_ARCH=powerpc + fi + if [ -x /usr/bin/oslevel ] ; then + IBM_REV=`/usr/bin/oslevel` + else + IBM_REV=4.${UNAME_RELEASE} + fi + echo ${IBM_ARCH}-ibm-aix${IBM_REV} + exit 0 ;; + *:AIX:*:*) + echo rs6000-ibm-aix + exit 0 ;; + ibmrt:4.4BSD:*|romp-ibm:BSD:*) + echo romp-ibm-bsd4.4 + exit 0 ;; + ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC NetBSD and + echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to + exit 0 ;; # report: romp-ibm BSD 4.3 + *:BOSX:*:*) + echo rs6000-bull-bosx + exit 0 ;; + DPX/2?00:B.O.S.:*:*) + echo m68k-bull-sysv3 + exit 0 ;; + 9000/[34]??:4.3bsd:1.*:*) + echo m68k-hp-bsd + exit 0 ;; + hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) + echo m68k-hp-bsd4.4 + exit 0 ;; + 9000/[34678]??:HP-UX:*:*) + case "${UNAME_MACHINE}" in + 9000/31? ) HP_ARCH=m68000 ;; + 9000/[34]?? ) HP_ARCH=m68k ;; + 9000/6?? | 9000/7?? | 9000/80[24] | 9000/8?[13679] | 9000/892 | 9000/820 | 9000/800 ) + sed 's/^ //' << EOF >dummy.c + #include + #include + + int main () + { + #if defined(_SC_KERNEL_BITS) + long bits = sysconf(_SC_KERNEL_BITS); + #endif + long cpu = sysconf (_SC_CPU_VERSION); + + switch (cpu) + { + case CPU_PA_RISC1_0: puts ("hppa1.0"); break; + case CPU_PA_RISC1_1: puts ("hppa1.1"); break; + case CPU_PA_RISC2_0: + #if defined(_SC_KERNEL_BITS) + switch (bits) + { + case 64: puts ("hppa2.0w"); break; + case 32: puts ("hppa2.0n"); break; + default: puts ("hppa2.0"); break; + } break; + #else /* !defined(_SC_KERNEL_BITS) */ + puts ("hppa2.0"); break; + #endif + default: puts ("hppa1.0"); break; + } + exit (0); + } +EOF + (${CC-cc} dummy.c -o dummy 2>/dev/null ) && HP_ARCH=`./dummy` + rm -f dummy.c dummy + esac + HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` + echo ${HP_ARCH}-hp-hpux${HPUX_REV} + exit 0 ;; + 3050*:HI-UX:*:*) + sed 's/^ //' << EOF >dummy.c + #include + int + main () + { + long cpu = sysconf (_SC_CPU_VERSION); + /* The order matters, because CPU_IS_HP_MC68K erroneously returns + true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct + results, however. */ + if (CPU_IS_PA_RISC (cpu)) + { + switch (cpu) + { + case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break; + case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break; + case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break; + default: puts ("hppa-hitachi-hiuxwe2"); break; + } + } + else if (CPU_IS_HP_MC68K (cpu)) + puts ("m68k-hitachi-hiuxwe2"); + else puts ("unknown-hitachi-hiuxwe2"); + exit (0); + } +EOF + ${CC-cc} dummy.c -o dummy && ./dummy && rm dummy.c dummy && exit 0 + rm -f dummy.c dummy + echo unknown-hitachi-hiuxwe2 + exit 0 ;; + 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) + echo hppa1.1-hp-bsd + exit 0 ;; + 9000/8??:4.3bsd:*:*) + echo hppa1.0-hp-bsd + exit 0 ;; + hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) + echo hppa1.1-hp-osf + exit 0 ;; + hp8??:OSF1:*:*) + echo hppa1.0-hp-osf + exit 0 ;; + i?86:OSF1:*:*) + if [ -x /usr/sbin/sysversion ] ; then + echo ${UNAME_MACHINE}-unknown-osf1mk + else + echo ${UNAME_MACHINE}-unknown-osf1 + fi + exit 0 ;; + parisc*:Lites*:*:*) + echo hppa1.1-hp-lites + exit 0 ;; + *:Bitrig:*:*) + echo ${UNAME_MACHINE}-unknown-bitrig + exit 0 ;; + C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) + echo c1-convex-bsd + exit 0 ;; + C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) + if getsysinfo -f scalar_acc + then echo c32-convex-bsd + else echo c2-convex-bsd + fi + exit 0 ;; + C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) + echo c34-convex-bsd + exit 0 ;; + C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) + echo c38-convex-bsd + exit 0 ;; + C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) + echo c4-convex-bsd + exit 0 ;; + CRAY*X-MP:*:*:*) + echo xmp-cray-unicos + exit 0 ;; + CRAY*Y-MP:*:*:*) + echo ymp-cray-unicos${UNAME_RELEASE} + exit 0 ;; + CRAY*[A-Z]90:*:*:*) + echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ + | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ + -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ + exit 0 ;; + CRAY*TS:*:*:*) + echo t90-cray-unicos${UNAME_RELEASE} + exit 0 ;; + CRAY-2:*:*:*) + echo cray2-cray-unicos + exit 0 ;; + F300:UNIX_System_V:*:*) + FUJITSU_SYS=`uname -p | tr [A-Z] [a-z] | sed -e 's/\///'` + FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` + echo "f300-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" + exit 0 ;; + F301:UNIX_System_V:*:*) + echo f301-fujitsu-uxpv`echo $UNAME_RELEASE | sed 's/ .*//'` + exit 0 ;; + hp3[0-9][05]:NetBSD:*:*) + echo m68k-hp-netbsd${UNAME_RELEASE} + exit 0 ;; + hp300:OpenBSD:*:*) + echo m68k-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + sparc*:BSD/OS:*:*) + echo sparc-unknown-bsdi${UNAME_RELEASE} + exit 0 ;; + i?86:BSD/386:*:* | *:BSD/OS:*:*) + echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} + exit 0 ;; + *:FreeBSD:*:*) + echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` + exit 0 ;; + *:DragonFly:*:*) + echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` + exit 0 ;; + *:NetBSD:*:*) + echo ${UNAME_MACHINE}-unknown-netbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` + exit 0 ;; + *:OpenBSD:*:*) + echo ${UNAME_MACHINE}-unknown-openbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` + exit 0 ;; + i*:CYGWIN*:*) + echo ${UNAME_MACHINE}-pc-cygwin + exit 0 ;; + x*:CYGWIN*:*) + echo ${UNAME_MACHINE}-pc-cygwin + exit 0 ;; + i*:MINGW*:*) + echo ${UNAME_MACHINE}-pc-mingw32 + exit 0 ;; + p*:CYGWIN*:*) + echo powerpcle-unknown-cygwin + exit 0 ;; + x86:Interix*:3*) + echo i586-pc-interix3 + exit 0 ;; + prep*:SunOS:5.*:*) + echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit 0 ;; + aarch64:SunOS:5.*:*) + echo aarch64-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit 0 ;; + *:GNU:*:*) + echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` + exit 0 ;; + s390:Linux:*:* | s390x:Linux:*:*) + echo ${UNAME_MACHINE}-ibm-linux + exit 0 ;; + *:Linux:*:*) + # uname on the ARM produces all sorts of strangeness, and we need to + # filter it out. + case "$UNAME_MACHINE" in + arm* | sa110*) UNAME_MACHINE="arm" ;; + esac + + # The BFD linker knows what the default object file format is, so + # first see if it will tell us. + ld_help_string=`ld --help 2>&1` + ld_supported_emulations=`echo $ld_help_string \ + | sed -ne '/supported emulations:/!d + s/[ ][ ]*/ /g + s/.*supported emulations: *// + s/ .*// + p'` + case "$ld_supported_emulations" in + i?86linux) echo "${UNAME_MACHINE}-pc-linux-gnuaout" ; exit 0 ;; + i?86coff) echo "${UNAME_MACHINE}-pc-linux-gnucoff" ; exit 0 ;; + sparclinux) echo "${UNAME_MACHINE}-unknown-linux-gnuaout" ; exit 0 ;; + armlinux) echo "${UNAME_MACHINE}-unknown-linux-gnuaout" ; exit 0 ;; + m68klinux) echo "${UNAME_MACHINE}-unknown-linux-gnuaout" ; exit 0 ;; + elf32ppc) echo "powerpc-unknown-linux-gnu" ; exit 0 ;; + esac + + if test "${UNAME_MACHINE}" = "alpha" ; then + sed 's/^ //' <dummy.s + .globl main + .ent main + main: + .frame \$30,0,\$26,0 + .prologue 0 + .long 0x47e03d80 # implver $0 + lda \$2,259 + .long 0x47e20c21 # amask $2,$1 + srl \$1,8,\$2 + sll \$2,2,\$2 + sll \$0,3,\$0 + addl \$1,\$0,\$0 + addl \$2,\$0,\$0 + ret \$31,(\$26),1 + .end main +EOF + LIBC="" + ${CC-cc} dummy.s -o dummy 2>/dev/null + if test "$?" = 0 ; then + ./dummy + case "$?" in + 7) + UNAME_MACHINE="alpha" + ;; + 15) + UNAME_MACHINE="alphaev5" + ;; + 14) + UNAME_MACHINE="alphaev56" + ;; + 10) + UNAME_MACHINE="alphapca56" + ;; + 16) + UNAME_MACHINE="alphaev6" + ;; + esac + + objdump --private-headers dummy | \ + grep ld.so.1 > /dev/null + if test "$?" = 0 ; then + LIBC="libc1" + fi + fi + rm -f dummy.s dummy + echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} ; exit 0 + elif test "${UNAME_MACHINE}" = "mips" ; then + cat >dummy.c </dev/null && ./dummy "${UNAME_MACHINE}" && rm dummy.c dummy && exit 0 + rm -f dummy.c dummy + else + # Either a pre-BFD a.out linker (linux-gnuoldld) + # or one that does not give us useful --help. + # GCC wants to distinguish between linux-gnuoldld and linux-gnuaout. + # If ld does not provide *any* "supported emulations:" + # that means it is gnuoldld. + echo "$ld_help_string" | grep >/dev/null 2>&1 "supported emulations:" + test $? != 0 && echo "${UNAME_MACHINE}-pc-linux-gnuoldld" && exit 0 + + case "${UNAME_MACHINE}" in + i?86) + VENDOR=pc; + ;; + *) + VENDOR=unknown; + ;; + esac + # Determine whether the default compiler is a.out or elf + cat >dummy.c < +main(argc, argv) + int argc; + char *argv[]; +{ +#if defined __ELF__ || defined __SUNPRO_C +# ifdef __GLIBC__ +# if __GLIBC__ >= 2 + printf ("%s-${VENDOR}-linux-gnu\n", argv[1]); +# else + printf ("%s-${VENDOR}-linux-gnulibc1\n", argv[1]); +# endif +# else + printf ("%s-${VENDOR}-linux-gnulibc1\n", argv[1]); +# endif +#else + printf ("%s-${VENDOR}-linux-gnuaout\n", argv[1]); +#endif + return 0; +} +EOF + ${CC-cc} dummy.c -o dummy 2>/dev/null && ./dummy "${UNAME_MACHINE}" && rm dummy.c dummy && exit 0 + rm -f dummy.c dummy + fi ;; +# ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. earlier versions +# are messed up and put the nodename in both sysname and nodename. + i?86:DYNIX/ptx:4*:*) + echo i386-sequent-sysv4 + exit 0 ;; + i?86:UNIX_SV:4.2MP:2.*) + # Unixware is an offshoot of SVR4, but it has its own version + # number series starting with 2... + # I am not positive that other SVR4 systems won't match this, + # I just have to hope. -- rms. + # Use sysv4.2uw... so that sysv4* matches it. + echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} + exit 0 ;; + i?86:*:4.*:* | i?86:SYSTEM_V:4.*:*) + if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then + echo ${UNAME_MACHINE}-univel-sysv${UNAME_RELEASE} + else + echo ${UNAME_MACHINE}-pc-sysv${UNAME_RELEASE} + fi + exit 0 ;; + i?86:MS-DOS:5:50) + # DJGPP v2 + echo ${UNAME_MACHINE}-pc-msdos + exit 0 ;; + i?86:*:5:*) + # Fixed at (any) Pentium or better + UNAME_MACHINE=i586 + if [ ${UNAME_SYSTEM} = "UnixWare" ] || + [ ${UNAME_SYSTEM} = "OpenUNIX" ]; then + echo ${UNAME_MACHINE}-sco-sysv${UNAME_RELEASE}uw${UNAME_VERSION} + else + echo ${UNAME_MACHINE}-pc-sysv${UNAME_RELEASE} + fi + exit 0 ;; + i?86:*:3.2:*) + if test -f /usr/options/cb.name; then + UNAME_REL=`sed -n 's/.*Version //p' /dev/null >/dev/null ; then + UNAME_REL=`(/bin/uname -X|egrep Release|sed -e 's/.*= //')` + (/bin/uname -X|egrep i80486 >/dev/null) && UNAME_MACHINE=i486 + (/bin/uname -X|egrep '^Machine.*Pentium' >/dev/null) \ + && UNAME_MACHINE=i586 + echo ${UNAME_MACHINE}-pc-sco$UNAME_REL + else + echo ${UNAME_MACHINE}-pc-sysv32 + fi + exit 0 ;; + pc:*:*:*) + # uname -m prints for DJGPP always 'pc', but it prints nothing about + # the processor, so we play safe by assuming i386. + echo i386-pc-msdosdjgpp + exit 0 ;; + Intel:Mach:3*:*) + echo i386-pc-mach3 + exit 0 ;; + paragon:*:*:*) + echo i860-intel-osf1 + exit 0 ;; + i860:*:4.*:*) # i860-SVR4 + if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then + echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4 + else # Add other i860-SVR4 vendors below as they are discovered. + echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4 + fi + exit 0 ;; + *:Minix:*:*) + echo i386-pc-minix + exit 0 ;; + mini*:CTIX:SYS*5:*) + # "miniframe" + echo m68010-convergent-sysv + exit 0 ;; + M68*:*:R3V[567]*:*) + test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;; + 3[34]??:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 4850:*:4.0:3.0) + OS_REL='' + test -r /etc/.relid \ + && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` + /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ + && echo i486-ncr-sysv4.3${OS_REL} && exit 0 + /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ + && echo i586-ncr-sysv4.3${OS_REL} && exit 0 ;; + 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) + /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ + && echo i486-ncr-sysv4 && exit 0 ;; + m68*:LynxOS:2.*:*) + echo m68k-unknown-lynxos${UNAME_RELEASE} + exit 0 ;; + mc68030:UNIX_System_V:4.*:*) + echo m68k-atari-sysv4 + exit 0 ;; + i?86:LynxOS:2.*:*) + echo i386-unknown-lynxos${UNAME_RELEASE} + exit 0 ;; + TSUNAMI:LynxOS:2.*:*) + echo sparc-unknown-lynxos${UNAME_RELEASE} + exit 0 ;; + rs6000:LynxOS:2.*:* | PowerPC:LynxOS:2.*:*) + echo rs6000-unknown-lynxos${UNAME_RELEASE} + exit 0 ;; + SM[BE]S:UNIX_SV:*:*) + echo mips-dde-sysv${UNAME_RELEASE} + exit 0 ;; + RM*:SINIX-*:*:*) + echo mips-sni-sysv4 + exit 0 ;; + *:SINIX-*:*:*) + if uname -p 2>/dev/null >/dev/null ; then + UNAME_MACHINE=`(uname -p) 2>/dev/null` + echo ${UNAME_MACHINE}-sni-sysv4 + else + echo ns32k-sni-sysv + fi + exit 0 ;; + PENTIUM:CPunix:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort + # says + echo i586-unisys-sysv4 + exit 0 ;; + *:UNIX_System_V:4*:FTX*) + # From Gerald Hewes . + # How about differentiating between stratus architectures? -djm + echo hppa1.1-stratus-sysv4 + exit 0 ;; + *:*:*:FTX*) + # From seanf@swdc.stratus.com. + echo i860-stratus-sysv4 + exit 0 ;; + mc68*:A/UX:*:*) + echo m68k-apple-aux${UNAME_RELEASE} + exit 0 ;; + news*:NEWS-OS:*:6*) + echo mips-sony-newsos6 + exit 0 ;; + R3000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R4000:UNIX_SV:*:*) + if [ -d /usr/nec ]; then + echo mips-nec-sysv${UNAME_RELEASE} + else + echo mips-unknown-sysv${UNAME_RELEASE} + fi + exit 0 ;; + BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. + echo powerpc-be-beos + exit 0 ;; + BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. + echo powerpc-apple-beos + exit 0 ;; + BePC:BeOS:*:*) # BeOS running on Intel PC compatible. + echo i586-pc-beos + exit 0 ;; + BeMac:Haiku:*:*) + echo powerpc-apple-haiku + exit ;; + BePC:Haiku:*:*) + echo i586-pc-haiku + exit ;; + "Power Macintosh":Rhapsody:*) + echo powerpc-apple-rhapsody${UNAME_RELEASE} + exit 0 ;; + "Power Macintosh":"Mac OS":*) + echo powerpc-apple-macosx${UNAME_RELEASE} + exit 0 ;; + "Power Macintosh":"Darwin":*) + echo powerpc-apple-macosx${UNAME_RELEASE} + exit 0 ;; + "i386":"Darwin":*) + echo i386-apple-macosx${UNAME_RELEASE} + exit 0 ;; + "x86_64":"Darwin":*) + echo x86_64-apple-macosx${UNAME_RELEASE} + exit 0 ;; + "x86":"Darwin":*) + echo i386-apple-macosx${UNAME_RELEASE} + exit 0 ;; + *:OS/2:*:*) + echo "i386-pc-os2_emx" + exit 0;; + *:OpenVMS:*:*) + UNAME_PROCESSOR=`uname -p | tr [A-Z] [a-z]` + echo "${UNAME_PROCESSOR}-hp-openvms" + exit 0;; +esac + +#echo '(No uname command or uname output not recognized.)' 1>&2 +#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2 + +cat >dummy.c < +# include +#endif +main () +{ +#if defined (sony) +#if defined (MIPSEB) + /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed, + I don't know.... */ + printf ("mips-sony-bsd\n"); exit (0); +#else +#include + printf ("m68k-sony-newsos%s\n", +#ifdef NEWSOS4 + "4" +#else + "" +#endif + ); exit (0); +#endif +#endif + +#if defined (__arm) && defined (__acorn) && defined (__unix) + printf ("arm-acorn-riscix"); exit (0); +#endif + +#if defined (hp300) && !defined (hpux) + printf ("m68k-hp-bsd\n"); exit (0); +#endif + +#if defined (NeXT) +#if !defined (__ARCHITECTURE__) +#define __ARCHITECTURE__ "m68k" +#endif + int version; + version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`; + printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version); + exit (0); +#endif + +#if defined (MULTIMAX) || defined (n16) +#if defined (UMAXV) + printf ("ns32k-encore-sysv\n"); exit (0); +#else +#if defined (CMU) + printf ("ns32k-encore-mach\n"); exit (0); +#else + printf ("ns32k-encore-bsd\n"); exit (0); +#endif +#endif +#endif + +#if defined (__386BSD__) + printf ("i386-pc-bsd\n"); exit (0); +#endif + +#if defined (sequent) +#if defined (i386) + printf ("i386-sequent-dynix\n"); exit (0); +#endif +#if defined (ns32000) + printf ("ns32k-sequent-dynix\n"); exit (0); +#endif +#endif + +#if defined (_SEQUENT_) + struct utsname un; + + uname(&un); + + if (strncmp(un.version, "V2", 2) == 0) { + printf ("i386-sequent-ptx2\n"); exit (0); + } + if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */ + printf ("i386-sequent-ptx1\n"); exit (0); + } + printf ("i386-sequent-ptx\n"); exit (0); + +#endif + +#if defined (vax) +#if !defined (ultrix) + printf ("vax-dec-bsd\n"); exit (0); +#else + printf ("vax-dec-ultrix\n"); exit (0); +#endif +#endif + +#if defined (alliant) && defined (i860) + printf ("i860-alliant-bsd\n"); exit (0); +#endif + + exit (1); +} +EOF + +${CC-cc} dummy.c -o dummy 2>/dev/null && ./dummy && rm dummy.c dummy && exit 0 +rm -f dummy.c dummy + +# Apollos put the system type in the environment. + +test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit 0; } + +# Convex versions that predate uname can use getsysinfo(1) + +if [ -x /usr/convex/getsysinfo ] +then + case `getsysinfo -f cpu_type` in + c1*) + echo c1-convex-bsd + exit 0 ;; + c2*) + if getsysinfo -f scalar_acc + then echo c32-convex-bsd + else echo c2-convex-bsd + fi + exit 0 ;; + c34*) + echo c34-convex-bsd + exit 0 ;; + c38*) + echo c38-convex-bsd + exit 0 ;; + c4*) + echo c4-convex-bsd + exit 0 ;; + esac +fi + +if [ x$CONFIG_NOFAIL = xTRUE ]; then + echo unknownCPU-unknownMFR-unknownOS + exit 0 +fi + +#echo '(Unable to guess system type)' 1>&2 + +exit 1 diff -Nru cdrtools-2.01.01a33/autoconf/config.sub cdrtools-3.02a09/autoconf/config.sub --- cdrtools-2.01.01a33/autoconf/config.sub 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/autoconf/config.sub 2017-05-18 21:47:27.000000000 +0000 @@ -0,0 +1,998 @@ +#! /bin/sh +# @(#)config.sub 1.12 17/05/18 Copyright 1999-2017 J. Schilling +# +# Configuration validation subroutine script, version 1.1. +# Copyright (C) 1991, 92-97, 1998 Free Software Foundation, Inc. +# This file is (in principle) common to ALL GNU software. +# The presence of a machine in this file suggests that SOME GNU software +# can handle that machine. It does not imply ALL GNU software can. +# +# This file is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, +# Boston, MA 02111-1307, USA. + +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that program. + +# Configuration subroutine to validate and canonicalize a configuration type. +# Supply the specified configuration type as an argument. +# If it is invalid, we print an error message on stderr and exit with code 1. +# Otherwise, we print the canonical config type on stdout and succeed. + +# This file is supposed to be the same for all GNU packages +# and recognize all the CPU types, system types and aliases +# that are meaningful with *any* GNU software. +# Each package is responsible for reporting which valid configurations +# it does not support. The user should be able to distinguish +# a failure to support a valid configuration from a meaningless +# configuration. + +# The goal of this file is to map all the various variations of a given +# machine specification into a single specification in the form: +# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM +# or in some cases, the newer four-part form: +# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM +# It is wrong to echo any other type of specification. + +if [ x$1 = x ] +then + echo Configuration name missing. 1>&2 + echo "Usage: $0 CPU-MFR-OPSYS" 1>&2 + echo "or $0 ALIAS" 1>&2 + echo where ALIAS is a recognized configuration type. 1>&2 + exit 1 +fi + +# First pass through any local machine types. +case $1 in + *local*) + echo $1 + exit 0 + ;; + *) + ;; +esac + +# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any). +# Here we must recognize all the valid KERNEL-OS combinations. +maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` +case $maybe_os in + linux-gnu*) + os=-$maybe_os + basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` + ;; + *) + basic_machine=`echo $1 | sed 's/-[^-]*$//'` + if [ $basic_machine != $1 ] + then os=`echo $1 | sed 's/.*-/-/'` + else os=; fi + ;; +esac + +### Let's recognize common machines as not being operating systems so +### that things like config.sub decstation-3100 work. We also +### recognize some manufacturers as not being operating systems, so we +### can provide default operating systems below. +case $os in + -sun*os*) + # Prevent following clause from handling this invalid input. + ;; + -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \ + -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \ + -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \ + -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ + -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ + -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ + -apple) + os= + basic_machine=$1 + ;; + -hiux*) + os=-hiuxwe2 + ;; + -sco5) + os=sco3.2v5 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -sco4) + os=-sco3.2v4 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -sco3.2.[4-9]*) + os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -sco3.2v[4-9]*) + # Don't forget version if it is 3.2v4 or newer. + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -sco*) + os=-sco3.2v2 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -isc) + os=-isc2.2 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -clix*) + basic_machine=clipper-intergraph + ;; + -isc*) + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -lynx*) + os=-lynxos + ;; + -ptx*) + basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'` + ;; + -windowsnt*) + os=`echo $os | sed -e 's/windowsnt/winnt/'` + ;; + -psos*) + os=-psos + ;; +esac + +# Decode aliases for certain CPU-COMPANY combinations. +case $basic_machine in + # Recognize the basic CPU types without company name. + # Some are omitted here because they have special meanings below. + tahoe | i860 | m32r | m68k | m68000 | m88k | ns32k | arc \ + | aarch64 | arm \ + | arme[lb] | pyramid | mn10200 | mn10300 | tron | a29k \ + | 580 | i960 | h8300 | hppa | hppa1.0 | hppa1.1 | hppa2.0 | hppa2.0? \ + | alpha | alphaev5 | alphaev56 | we32k | ns16k | clipper \ + | i370 | sh | powerpc | powerpcle | 1750a | dsp16xx | pdp11 \ + | mips64 | mipsel | mips64el | mips64orion | mips64orionel \ + | mipstx39 | mipstx39el \ + | sparc | sparclet | sparclite | sparc64 | v850) + basic_machine=$basic_machine-unknown + ;; + + # We use `pc' rather than `unknown' + # because (1) that's what they normally are, and + # (2) the word "unknown" tends to confuse beginning users. + i[34567]86) + basic_machine=$basic_machine-pc + ;; + # Object if more than one company name word. + *-*-*) + echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 + exit 1 + ;; + # Recognize the basic CPU types with company name. + vax-* | tahoe-* | i[34567]86-* | i860-* | m32r-* | m68k-* | m68000-* \ + | m88k-* | sparc-* | ns32k-* | fx80-* | arc-* \ + | aarch64-* | arm-* \ + | c[123]* \ + | mips-* | pyramid-* | tron-* | a29k-* | romp-* | rs6000-* \ + | power-* | none-* | 580-* | cray2-* | h8300-* | i960-* \ + | xmp-* | ymp-* | hppa-* | hppa1.0-* | hppa1.1-* | hppa2.0-* | hppa2.0?-* \ + | ia64-* \ + | alpha-* | alphaev5-* | alphaev56-* | alphaev6-* | we32k-* | cydra-* \ + | ns16k-* | pn-* | np1-* | xps100-* | clipper-* | orion-* \ + | sparclite-* | pdp11-* | sh-* | powerpc-* | powerpcle-* \ + | sparc64-* | mips64-* | mipsel-* \ + | mips64el-* | mips64orion-* | mips64orionel-* \ + | mipstx39-* | mipstx39el-* \ + | f301-* \ + | x86-* | x86_64-* | amd64-*) + ;; + # Recognize the various machine names and aliases which stand + # for a CPU type and a company and sometimes even an OS. + 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) + basic_machine=m68000-att + ;; + 3b*) + basic_machine=we32k-att + ;; + alliant | fx80) + basic_machine=fx80-alliant + ;; + altos | altos3068) + basic_machine=m68k-altos + ;; + am29k) + basic_machine=a29k-none + os=-bsd + ;; + amdahl) + basic_machine=580-amdahl + os=-sysv + ;; + amiga | amiga-*) + basic_machine=m68k-cbm + ;; + amigaos | amigados) + basic_machine=m68k-cbm + os=-amigaos + ;; + amigaunix | amix) + basic_machine=m68k-cbm + os=-sysv4 + ;; + apollo68) + basic_machine=m68k-apollo + os=-sysv + ;; + aux) + basic_machine=m68k-apple + os=-aux + ;; + balance) + basic_machine=ns32k-sequent + os=-dynix + ;; + convex-c1) + basic_machine=c1-convex + os=-bsd + ;; + convex-c2) + basic_machine=c2-convex + os=-bsd + ;; + convex-c32) + basic_machine=c32-convex + os=-bsd + ;; + convex-c34) + basic_machine=c34-convex + os=-bsd + ;; + convex-c38) + basic_machine=c38-convex + os=-bsd + ;; + cray | ymp) + basic_machine=ymp-cray + os=-unicos + ;; + cray2) + basic_machine=cray2-cray + os=-unicos + ;; + [ctj]90-cray) + basic_machine=c90-cray + os=-unicos + ;; + crds | unos) + basic_machine=m68k-crds + ;; + da30 | da30-*) + basic_machine=m68k-da30 + ;; + decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn) + basic_machine=mips-dec + ;; + delta | 3300 | motorola-3300 | motorola-delta \ + | 3300-motorola | delta-motorola) + basic_machine=m68k-motorola + ;; + delta88) + basic_machine=m88k-motorola + os=-sysv3 + ;; + dpx20 | dpx20-*) + basic_machine=rs6000-bull + os=-bosx + ;; + dpx2* | dpx2*-bull) + basic_machine=m68k-bull + os=-sysv3 + ;; + ebmon29k) + basic_machine=a29k-amd + os=-ebmon + ;; + elxsi) + basic_machine=elxsi-elxsi + os=-bsd + ;; + encore | umax | mmax) + basic_machine=ns32k-encore + ;; + fx2800) + basic_machine=i860-alliant + ;; + genix) + basic_machine=ns32k-ns + ;; + gmicro) + basic_machine=tron-gmicro + os=-sysv + ;; + h3050r* | hiux*) + basic_machine=hppa1.1-hitachi + os=-hiuxwe2 + ;; + h8300hms) + basic_machine=h8300-hitachi + os=-hms + ;; + harris) + basic_machine=m88k-harris + os=-sysv3 + ;; + hp300-*) + basic_machine=m68k-hp + ;; + hp300bsd) + basic_machine=m68k-hp + os=-bsd + ;; + hp300hpux) + basic_machine=m68k-hp + os=-hpux + ;; + hp9k2[0-9][0-9] | hp9k31[0-9]) + basic_machine=m68000-hp + ;; + hp9k3[2-9][0-9]) + basic_machine=m68k-hp + ;; + hp9k7[0-9][0-9] | hp7[0-9][0-9] | hp9k8[0-9]7 | hp8[0-9]7) + basic_machine=hppa1.1-hp + ;; + hp9k8[0-9][0-9] | hp8[0-9][0-9]) + basic_machine=hppa1.0-hp + ;; + hppa-next) + os=-nextstep3 + ;; + i370-ibm* | ibm*) + basic_machine=i370-ibm + os=-mvs + ;; +# I'm not sure what "Sysv32" means. Should this be sysv3.2? + i[34567]86v32) + basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` + os=-sysv32 + ;; + i[34567]86v4*) + basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` + os=-sysv4 + ;; + i[34567]86v) + basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` + os=-sysv + ;; + i[34567]86sol2) + basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` + os=-solaris2 + ;; + iris | iris4d) + basic_machine=mips-sgi + case $os in + -irix*) + ;; + *) + os=-irix4 + ;; + esac + ;; + isi68 | isi) + basic_machine=m68k-isi + os=-sysv + ;; + m88k-omron*) + basic_machine=m88k-omron + ;; + magnum | m3230) + basic_machine=mips-mips + os=-sysv + ;; + merlin) + basic_machine=ns32k-utek + os=-sysv + ;; + miniframe) + basic_machine=m68000-convergent + ;; + mipsel*-linux*) + basic_machine=mipsel-unknown + os=-linux-gnu + ;; + mips*-linux*) + basic_machine=mips-unknown + os=-linux-gnu + ;; + mips3*-*) + basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'` + ;; + mips3*) + basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown + ;; + ncr3000) + basic_machine=i486-ncr + os=-sysv4 + ;; + news | news700 | news800 | news900) + basic_machine=m68k-sony + os=-newsos + ;; + news1000) + basic_machine=m68030-sony + os=-newsos + ;; + news-3600 | risc-news) + basic_machine=mips-sony + os=-newsos + ;; + next | m*-next ) + basic_machine=m68k-next + case $os in + -nextstep* ) + ;; + -ns2*) + os=-nextstep2 + ;; + *) + os=-nextstep3 + ;; + esac + ;; + nh3000) + basic_machine=m68k-harris + os=-cxux + ;; + nh[45]000) + basic_machine=m88k-harris + os=-cxux + ;; + nindy960) + basic_machine=i960-intel + os=-nindy + ;; + np1) + basic_machine=np1-gould + ;; + pa-hitachi) + basic_machine=hppa1.1-hitachi + os=-hiuxwe2 + ;; + paragon) + basic_machine=i860-intel + os=-osf + ;; + parisc-unknown) + basic_machine=parisc-unknown + ;; + pbd) + basic_machine=sparc-tti + ;; + pbb) + basic_machine=m68k-tti + ;; + pc532 | pc532-*) + basic_machine=ns32k-pc532 + ;; + pentium | p5 | k5 | nexen) + basic_machine=i586-pc + ;; + pentiumpro | p6 | k6 | 6x86) + basic_machine=i686-pc + ;; + pentiumii | pentium2) + basic_machine=i786-pc + ;; + pentium-* | p5-* | k5-* | nexen-*) + basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + pentiumpro-* | p6-* | k6-* | 6x86-*) + basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + pentiumii-* | pentium2-*) + basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + pn) + basic_machine=pn-gould + ;; + power) basic_machine=rs6000-ibm + ;; + ppc) basic_machine=powerpc-unknown + ;; + ppc64) basic_machine=powerpc64-unknown + ;; + ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + ppcle | powerpclittle | ppc-le | powerpc-little) + basic_machine=powerpcle-unknown + ;; + ppcle-* | powerpclittle-*) + basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + ps2) + basic_machine=i386-ibm + ;; + rm[46]00) + basic_machine=mips-siemens + ;; + rtpc | rtpc-*) + basic_machine=romp-ibm + ;; + s390 | s390-*) + basic_machine=s390-ibm + ;; + s390x | s390x-*) + basic_machine=s390x-ibm + ;; + sequent) + basic_machine=i386-sequent + ;; + sh) + basic_machine=sh-hitachi + os=-hms + ;; + sps7) + basic_machine=m68k-bull + os=-sysv2 + ;; + spur) + basic_machine=spur-unknown + ;; + sun2) + basic_machine=m68000-sun + ;; + sun2os3) + basic_machine=m68000-sun + os=-sunos3 + ;; + sun2os4) + basic_machine=m68000-sun + os=-sunos4 + ;; + sun3os3) + basic_machine=m68k-sun + os=-sunos3 + ;; + sun3os4) + basic_machine=m68k-sun + os=-sunos4 + ;; + sun4os3) + basic_machine=sparc-sun + os=-sunos3 + ;; + sun4os4) + basic_machine=sparc-sun + os=-sunos4 + ;; + sun4sol2) + basic_machine=sparc-sun + os=-solaris2 + ;; + sun3 | sun3-*) + basic_machine=m68k-sun + ;; + sun4) + basic_machine=sparc-sun + ;; + sun386 | sun386i | roadrunner) + basic_machine=i386-sun + ;; + symmetry) + basic_machine=i386-sequent + os=-dynix + ;; + tx39) + basic_machine=mipstx39-unknown + ;; + tx39el) + basic_machine=mipstx39el-unknown + ;; + tower | tower-32) + basic_machine=m68k-ncr + ;; + udi29k) + basic_machine=a29k-amd + os=-udi + ;; + ultra3) + basic_machine=a29k-nyu + os=-sym1 + ;; + vaxv) + basic_machine=vax-dec + os=-sysv + ;; + vms) + basic_machine=vax-dec + os=-vms + ;; + vpp*|vx|vx-*) + basic_machine=f301-fujitsu + ;; + vxworks960) + basic_machine=i960-wrs + os=-vxworks + ;; + vxworks68) + basic_machine=m68k-wrs + os=-vxworks + ;; + vxworks29k) + basic_machine=a29k-wrs + os=-vxworks + ;; + xmp) + basic_machine=xmp-cray + os=-unicos + ;; + xps | xps100) + basic_machine=xps100-honeywell + ;; + none) + basic_machine=none-none + os=-none + ;; + +# Here we handle the default manufacturer of certain CPU types. It is in +# some cases the only manufacturer, in others, it is the most popular. + mips) + if [ x$os = x-linux-gnu ]; then + basic_machine=mips-unknown + else + basic_machine=mips-mips + fi + ;; + romp) + basic_machine=romp-ibm + ;; + rs6000) + basic_machine=rs6000-ibm + ;; + vax) + basic_machine=vax-dec + ;; + pdp11) + basic_machine=pdp11-dec + ;; + we32k) + basic_machine=we32k-att + ;; + sparc) + basic_machine=sparc-sun + ;; + cydra) + basic_machine=cydra-cydrome + ;; + orion) + basic_machine=orion-highlevel + ;; + orion105) + basic_machine=clipper-highlevel + ;; + *) + echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 + exit 1 + ;; +esac + +# Here we canonicalize certain aliases for manufacturers. +case $basic_machine in + *-digital*) + basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'` + ;; + *-commodore*) + basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'` + ;; + *) + ;; +esac + +# Decode manufacturer-specific aliases for certain operating systems. + +if [ x"$os" != x"" ] +then +case $os in + # First match some system type aliases + # that might get confused with valid system types. + # -solaris* is a basic system type, with this one exception. + -solaris1 | -solaris1.*) + os=`echo $os | sed -e 's|solaris1|sunos4|'` + ;; + -solaris) + os=-solaris2 + ;; + -svr4*) + os=-sysv4 + ;; + -unixware*) + os=-sysv4.2uw + ;; + -gnu/linux*) + os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'` + ;; + # First accept the basic system types. + # The portable systems comes first. + # Each alternative MUST END IN A *, to match a version number. + # -sysv* is not here because it comes later, after sysvr4. + -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ + | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\ + | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \ + | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ + | -aos* \ + | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ + | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ + | -hiux* | -386bsd* | -netbsd* | -openbsd* | -freebsd* | -dragonfly* \ + | -bitrig* \ + | -minix* \ + | -riscix* \ + | -lynxos* | -bosx* | -nextstep* | -cxux* | -aout* | -elf* \ + | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ + | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ + | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ + | -mingw32* | -linux-gnu* | -uxpv* | -beos* | -os2* \ + | -interix* | -uwin* | -mks* | -rhapsody* | -macos* | -pyro* \ + | -haiku* | -syllable* ) + # Remember, each alternative MUST END IN *, to match a version number. + ;; + -linux*) + os=`echo $os | sed -e 's|linux|linux-gnu|'` + ;; + -sunos5*) + os=`echo $os | sed -e 's|sunos5|solaris2|'` + ;; + -sunos6*) + os=`echo $os | sed -e 's|sunos6|solaris3|'` + ;; + -osfrose*) + os=-osfrose + ;; + -osf*) + os=-osf + ;; + -utek*) + os=-bsd + ;; + -dynix*) + os=-bsd + ;; + -acis*) + os=-aos + ;; + -ctix* | -uts*) + os=-sysv + ;; + -ns2 ) + os=-nextstep2 + ;; + # Preserve the version number of sinix5. + -sinix5.*) + os=`echo $os | sed -e 's|sinix|sysv|'` + ;; + -sinix*) + os=-sysv4 + ;; + -triton*) + os=-sysv3 + ;; + -oss*) + os=-sysv3 + ;; + -svr4) + os=-sysv4 + ;; + -svr3) + os=-sysv3 + ;; + # For sys5.3 apollo + -sys5.3) + os=-sysv3 + ;; + -sysvr4) + os=-sysv4 + ;; + # This must come after -sysvr4. + -sysv*) + ;; + -xenix) + os=-xenix + ;; + -freemint) + os=-freemint + ;; + -mint) + os=-mint + ;; + -tos) + os=-tos + ;; + + -none) + ;; + *) + # Get rid of the `-' at the beginning of $os. + os=`echo $os | sed 's/[^-]*-//'` + echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2 + exit 1 + ;; +esac +else + +# Here we handle the default operating systems that come with various machines. +# The value should be what the vendor currently ships out the door with their +# machine or put another way, the most popular os provided with the machine. + +# Note that if you're going to try to match "-MANUFACTURER" here (say, +# "-sun"), then you have to tell the case statement up towards the top +# that MANUFACTURER isn't an operating system. Otherwise, code above +# will signal an error saying that MANUFACTURER isn't an operating +# system, and we'll never get to this point. + +case $basic_machine in + *-acorn) + os=-riscix1.2 + ;; + arm*-semi) + os=-aout + ;; + pdp11-*) + os=-none + ;; + *-dec | vax-*) + os=-ultrix4.2 + ;; + m68*-apollo) + os=-domain + ;; + i386-sun) + os=-sunos4.0.2 + ;; + m68000-sun) + os=-sunos3 + # This also exists in the configure program, but was not the + # default. + # os=-sunos4 + ;; + *-tti) # must be before sparc entry or we get the wrong os. + os=-sysv3 + ;; + sparc-* | *-sun) + os=-sunos4.1.1 + ;; + *-be) + os=-beos + ;; + *-haiku) + os=-haiku + ;; + *-ibm) + os=-aix + ;; + *-hp) + os=-hpux + ;; + *-hitachi) + os=-hiux + ;; + i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent) + os=-sysv + ;; + *-cbm) + os=-amigaos + ;; + *-dg) + os=-dgux + ;; + *-dolphin) + os=-sysv3 + ;; + m68k-ccur) + os=-rtu + ;; + m88k-omron*) + os=-luna + ;; + *-next ) + os=-nextstep + ;; + *-sequent) + os=-ptx + ;; + *-crds) + os=-unos + ;; + *-ns) + os=-genix + ;; + i370-*) + os=-mvs + ;; + *-next) + os=-nextstep3 + ;; + *-gould) + os=-sysv + ;; + *-highlevel) + os=-bsd + ;; + *-encore) + os=-bsd + ;; + *-sgi) + os=-irix + ;; + *-siemens) + os=-sysv4 + ;; + *-masscomp) + os=-rtu + ;; + f301-fujitsu) + os=-uxpv + ;; + *) + os=-none + ;; +esac +fi + +# Here we handle the case where we know the os, and the CPU type, but not the +# manufacturer. We pick the logical manufacturer. +vendor=unknown +case $basic_machine in + *-unknown) + case $os in + -riscix*) + vendor=acorn + ;; + -sunos*) + vendor=sun + ;; + -aix*) + vendor=ibm + ;; + -hpux*) + vendor=hp + ;; + -hiux*) + vendor=hitachi + ;; + -unos*) + vendor=crds + ;; + -dgux*) + vendor=dg + ;; + -luna*) + vendor=omron + ;; + -genix*) + vendor=ns + ;; + -mvs*) + vendor=ibm + ;; + -ptx*) + vendor=sequent + ;; + -vxsim* | -vxworks*) + vendor=wrs + ;; + -aux*) + vendor=apple + ;; + esac + basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"` + ;; +esac + +echo $basic_machine$os diff -Nru cdrtools-2.01.01a33/autoconf/configure cdrtools-3.02a09/autoconf/configure --- cdrtools-2.01.01a33/autoconf/configure 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/autoconf/configure 2017-08-05 17:31:17.000000000 +0000 @@ -0,0 +1,24885 @@ +#! /bin/sh + +# From configure.in 1.289 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +#serial 18 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +# Guess values for system-dependent variables and create Makefiles. +# Generated automatically using autoconf version 2.13 1.17-Schily +# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc. +# Copyright (C) 1998-2016 J. Schilling +# +# This configure script is free software; the Free Software Foundation +# gives unlimited permission to copy, distribute and modify it. + +# Defaults: +ac_help= +ac_default_prefix=/usr/local +# Any additions from configure.in: +ac_help="$ac_help + --disable-largefile omit support for large files" + +# Initialize some variables set by options. +# The variables have the same names as the options, with +# dashes changed to underlines. +build=NONE +cache_file=./config.cache +exec_prefix=NONE +host=NONE +no_create= +nonopt=NONE +no_recursion= +prefix=NONE +program_prefix=NONE +program_suffix=NONE +program_transform_name=s,x,x, +silent= +site= +srcdir= +target=NONE +verbose= +rmttest=test +rmtcall= +CONFIG_RMTCALL=${CONFIG_RMTCALL-NONE} +x_includes=NONE +x_libraries=NONE +bindir='${exec_prefix}/bin' +sbindir='${exec_prefix}/sbin' +libexecdir='${exec_prefix}/libexec' +datadir='${prefix}/share' +sysconfdir='${prefix}/etc' +sharedstatedir='${prefix}/com' +localstatedir='${prefix}/var' +libdir='${exec_prefix}/lib' +includedir='${prefix}/include' +oldincludedir='/usr/include' +infodir='${prefix}/info' +mandir='${prefix}/man' + +# Initialize some other variables. +subdirs= +MFLAGS= MAKEFLAGS= +SHELL=${CONFIG_SHELL-/bin/sh} +# Maximum number of lines to put in a shell here document. +ac_max_here_lines=12 + +ac_prev= +for ac_option +do + + # If the previous option needs an argument, assign it. + if test -n "$ac_prev"; then + eval "$ac_prev=\$ac_option" + ac_prev= + continue + fi + + case "$ac_option" in + -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;; + *) ac_optarg= ;; + esac + + # Accept the important Cygnus configure options, so we can diagnose typos. + + case "$ac_option" in + + -bindir | --bindir | --bindi | --bind | --bin | --bi) + ac_prev=bindir ;; + -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) + bindir="$ac_optarg" ;; + + -build | --build | --buil | --bui | --bu) + ac_prev=build ;; + -build=* | --build=* | --buil=* | --bui=* | --bu=*) + build="$ac_optarg" ;; + + -cache-file | --cache-file | --cache-fil | --cache-fi \ + | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) + ac_prev=cache_file ;; + -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ + | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) + cache_file="$ac_optarg" ;; + + -cc=* | --cc=* ) + CC="$ac_optarg" ; echo using $CC as compiler ;; + + -datadir | --datadir | --datadi | --datad | --data | --dat | --da) + ac_prev=datadir ;; + -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \ + | --da=*) + datadir="$ac_optarg" ;; + + -disable-* | --disable-*) + ac_feature=`echo $ac_option|sed -e 's/-*disable-//'` + # Reject names that are not valid shell variable names. + if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then + { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; } + fi + ac_feature=`echo $ac_feature| sed 's/-/_/g'` + eval "enable_${ac_feature}=no" ;; + + -enable-* | --enable-*) + ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'` + # Reject names that are not valid shell variable names. + if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then + { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; } + fi + ac_feature=`echo $ac_feature| sed 's/-/_/g'` + case "$ac_option" in + *=*) ;; + *) ac_optarg=yes ;; + esac + eval "enable_${ac_feature}='$ac_optarg'" ;; + + -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ + | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ + | --exec | --exe | --ex) + ac_prev=exec_prefix ;; + -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ + | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ + | --exec=* | --exe=* | --ex=*) + exec_prefix="$ac_optarg" ;; + + -gas | --gas | --ga | --g) + # Obsolete; use --with-gas. + with_gas=yes ;; + + -help | --help | --hel | --he) + # Omit some internal or obsolete options to make the list less imposing. + # This message is too long to be a string in the A/UX 3.1 sh. + cat << EOF +Usage: configure [options] [host] +Options: [defaults in brackets after descriptions] +Configuration: + --cache-file=FILE cache test results in FILE + --help print this message + --no-create do not create output files + --quiet, --silent do not print \`checking...' messages + --version print the version of autoconf that created configure +Directory and file names: + --prefix=PREFIX install architecture-independent files in PREFIX + [$ac_default_prefix] + --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX + [same as prefix] + --bindir=DIR user executables in DIR [EPREFIX/bin] + --sbindir=DIR system admin executables in DIR [EPREFIX/sbin] + --libexecdir=DIR program executables in DIR [EPREFIX/libexec] + --datadir=DIR read-only architecture-independent data in DIR + [PREFIX/share] + --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc] + --sharedstatedir=DIR modifiable architecture-independent data in DIR + [PREFIX/com] + --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var] + --libdir=DIR object code libraries in DIR [EPREFIX/lib] + --includedir=DIR C header files in DIR [PREFIX/include] + --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include] + --infodir=DIR info documentation in DIR [PREFIX/info] + --mandir=DIR man documentation in DIR [PREFIX/man] + --srcdir=DIR find the sources in DIR [configure dir or ..] + --program-prefix=PREFIX prepend PREFIX to installed program names + --program-suffix=SUFFIX append SUFFIX to installed program names + --program-transform-name=PROGRAM + run sed PROGRAM on installed program names +EOF + cat << EOF +Host type: + --build=BUILD configure for building on BUILD [BUILD=HOST] + --host=HOST configure for HOST [guessed] + --target=TARGET configure for TARGET [TARGET=HOST] +Features and packages: + --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) + --enable-FEATURE[=ARG] include FEATURE [ARG=yes] + --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] + --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) + --x-includes=DIR X include files are in DIR + --x-libraries=DIR X library files are in DIR +EOF + if test -n "$ac_help"; then + echo "--enable and --with options recognized:$ac_help" + fi + exit 0 ;; + + -host | --host | --hos | --ho) + ac_prev=host ;; + -host=* | --host=* | --hos=* | --ho=*) + host="$ac_optarg" ;; + + -includedir | --includedir | --includedi | --included | --include \ + | --includ | --inclu | --incl | --inc) + ac_prev=includedir ;; + -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ + | --includ=* | --inclu=* | --incl=* | --inc=*) + includedir="$ac_optarg" ;; + + -infodir | --infodir | --infodi | --infod | --info | --inf) + ac_prev=infodir ;; + -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) + infodir="$ac_optarg" ;; + + -libdir | --libdir | --libdi | --libd) + ac_prev=libdir ;; + -libdir=* | --libdir=* | --libdi=* | --libd=*) + libdir="$ac_optarg" ;; + + -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ + | --libexe | --libex | --libe) + ac_prev=libexecdir ;; + -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ + | --libexe=* | --libex=* | --libe=*) + libexecdir="$ac_optarg" ;; + + -localstatedir | --localstatedir | --localstatedi | --localstated \ + | --localstate | --localstat | --localsta | --localst \ + | --locals | --local | --loca | --loc | --lo) + ac_prev=localstatedir ;; + -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ + | --localstate=* | --localstat=* | --localsta=* | --localst=* \ + | --locals=* | --local=* | --loca=* | --loc=* | --lo=*) + localstatedir="$ac_optarg" ;; + + -mandir | --mandir | --mandi | --mand | --man | --ma | --m) + ac_prev=mandir ;; + -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) + mandir="$ac_optarg" ;; + + -nfp | --nfp | --nf) + # Obsolete; use --without-fp. + with_fp=no ;; + + -no-create | --no-create | --no-creat | --no-crea | --no-cre \ + | --no-cr | --no-c) + no_create=yes ;; + + -no-recursion | --no-recursion | --no-recursio | --no-recursi \ + | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) + no_recursion=yes ;; + + -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ + | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ + | --oldin | --oldi | --old | --ol | --o) + ac_prev=oldincludedir ;; + -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ + | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ + | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) + oldincludedir="$ac_optarg" ;; + + -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) + ac_prev=prefix ;; + -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) + prefix="$ac_optarg" ;; + + -program-prefix | --program-prefix | --program-prefi | --program-pref \ + | --program-pre | --program-pr | --program-p) + ac_prev=program_prefix ;; + -program-prefix=* | --program-prefix=* | --program-prefi=* \ + | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) + program_prefix="$ac_optarg" ;; + + -program-suffix | --program-suffix | --program-suffi | --program-suff \ + | --program-suf | --program-su | --program-s) + ac_prev=program_suffix ;; + -program-suffix=* | --program-suffix=* | --program-suffi=* \ + | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) + program_suffix="$ac_optarg" ;; + + -program-transform-name | --program-transform-name \ + | --program-transform-nam | --program-transform-na \ + | --program-transform-n | --program-transform- \ + | --program-transform | --program-transfor \ + | --program-transfo | --program-transf \ + | --program-trans | --program-tran \ + | --progr-tra | --program-tr | --program-t) + ac_prev=program_transform_name ;; + -program-transform-name=* | --program-transform-name=* \ + | --program-transform-nam=* | --program-transform-na=* \ + | --program-transform-n=* | --program-transform-=* \ + | --program-transform=* | --program-transfor=* \ + | --program-transfo=* | --program-transf=* \ + | --program-trans=* | --program-tran=* \ + | --progr-tra=* | --program-tr=* | --program-t=*) + program_transform_name="$ac_optarg" ;; + + -q | -quiet | --quiet | --quie | --qui | --qu | --q \ + | -silent | --silent | --silen | --sile | --sil) + silent=yes ;; + + -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) + ac_prev=sbindir ;; + -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ + | --sbi=* | --sb=*) + sbindir="$ac_optarg" ;; + + -sharedstatedir | --sharedstatedir | --sharedstatedi \ + | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ + | --sharedst | --shareds | --shared | --share | --shar \ + | --sha | --sh) + ac_prev=sharedstatedir ;; + -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ + | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ + | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ + | --sha=* | --sh=*) + sharedstatedir="$ac_optarg" ;; + + -site | --site | --sit) + ac_prev=site ;; + -site=* | --site=* | --sit=*) + site="$ac_optarg" ;; + + -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) + ac_prev=srcdir ;; + -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) + srcdir="$ac_optarg" ;; + + -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ + | --syscon | --sysco | --sysc | --sys | --sy) + ac_prev=sysconfdir ;; + -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ + | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) + sysconfdir="$ac_optarg" ;; + + -target | --target | --targe | --targ | --tar | --ta | --t) + ac_prev=target ;; + -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) + target="$ac_optarg" ;; + + -v | -verbose | --verbose | --verbos | --verbo | --verb) + verbose=yes ;; + + -version | --version | --versio | --versi | --vers) + echo "configure generated by autoconf version 2.13 1.17-Schily" + exit 0 ;; + + -with-* | --with-*) + ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'` + # Reject names that are not valid shell variable names. + if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then + { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; } + fi + ac_package=`echo $ac_package| sed 's/-/_/g'` + case "$ac_option" in + *=*) ;; + *) ac_optarg=yes ;; + esac + eval "with_${ac_package}='$ac_optarg'" ;; + + -without-* | --without-*) + ac_package=`echo $ac_option|sed -e 's/-*without-//'` + # Reject names that are not valid shell variable names. + if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then + { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; } + fi + ac_package=`echo $ac_package| sed 's/-/_/g'` + eval "with_${ac_package}=no" ;; + + --x) + # Obsolete; use --with-x. + with_x=yes ;; + + -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ + | --x-incl | --x-inc | --x-in | --x-i) + ac_prev=x_includes ;; + -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ + | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) + x_includes="$ac_optarg" ;; + + -x-libraries | --x-libraries | --x-librarie | --x-librari \ + | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) + ac_prev=x_libraries ;; + -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ + | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) + x_libraries="$ac_optarg" ;; + + -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; } + ;; + + *) + if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then + echo "configure: warning: $ac_option: invalid host type" 1>&2 + fi + if test "x$nonopt" != xNONE; then + { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } + fi + nonopt="$ac_option" + ;; + + esac +done + +if test -n "$ac_prev"; then + { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; } +fi + +trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15 + +# File descriptor usage: +# 0 standard input +# 1 file creation +# 2 errors and warnings +# 3 some systems may open it to /dev/tty +# 4 used on the Kubota Titan +# 6 checking for... messages and results +# 5 compiler messages saved in config.log +if test "$silent" = yes; then + exec 6>/dev/null +else + exec 6>&1 +fi +exec 5>./config.log + +echo "\ +This file contains any messages produced by compilers while +running configure, to aid debugging if configure makes a mistake. +" 1>&5 + +# Strip out --no-create and --no-recursion so they do not pile up. +# Also quote any args containing shell metacharacters. +ac_configure_args= +for ac_arg +do + case "$ac_arg" in + -no-create | --no-create | --no-creat | --no-crea | --no-cre \ + | --no-cr | --no-c) ;; + -no-recursion | --no-recursion | --no-recursio | --no-recursi \ + | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;; + *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*) + ac_configure_args="$ac_configure_args '$ac_arg'" ;; + *) ac_configure_args="$ac_configure_args $ac_arg" ;; + esac +done + +# NLS nuisances. +# Only set these to C if already set. These must not be set unconditionally +# because not all systems understand e.g. LANG=C (notably SCO). +# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'! +# Non-C LC_CTYPE values break the ctype check. +if test "${LANG+set}" = set; then LANG=C; export LANG; fi +if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi +if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi +if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi + +# confdefs.h avoids OS command line length limits that DEFS can exceed. +rm -rf conftest* confdefs.h +# AIX cpp loses on an empty file, so make sure it contains at least a newline. +echo > confdefs.h + +# A filename unique to this package, relative to the directory that +# configure is in, which we can look for to find out if srcdir is correct. +ac_unique_file=config.guess + +# Find the source files, if location was not specified. +if test -z "$srcdir"; then + ac_srcdir_defaulted=yes + # Try the directory containing this script, then its parent. + ac_prog=$0 + ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'` + test "x$ac_confdir" = "x$ac_prog" && ac_confdir=. + srcdir=$ac_confdir + if test ! -r $srcdir/$ac_unique_file; then + srcdir=.. + fi +else + ac_srcdir_defaulted=no +fi +if test ! -r $srcdir/$ac_unique_file; then + if test "$ac_srcdir_defaulted" = yes; then + { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; } + else + { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; } + fi +fi +srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'` + +# Prefer explicitly selected file to automatically selected ones. +if test -z "$CONFIG_SITE"; then + if test "x$prefix" != xNONE; then + CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site" + else + CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" + fi +fi +for ac_site_file in $CONFIG_SITE; do + if test -r "$ac_site_file"; then + echo "loading site script $ac_site_file" + . "$ac_site_file" + fi +done + +if test -r "$cache_file"; then + echo "loading cache $cache_file" + . $cache_file +else + echo "creating cache $cache_file" + > $cache_file +fi + +ac_ext=c +# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. +ac_cpp='$CPP $CPPFLAGS' +ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' +ac_compile2='${CC-cc} -c $CFLAGS $CPPFLAGS conftest2.$ac_ext 1>&5' +ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS conftest.$ac_ext $LDFLAGS $LIBS 1>&5' +cross_compiling=$ac_cv_prog_cc_cross +if test "$cross_compiling" = yes -a "$CONFIG_RMTCALL" != NONE ; then + cross_compiling=remote + rmtcall="$CONFIG_RMTCALL" + rmttest="$CONFIG_RMTCALL" +fi + +ac_exeext= +ac_xexeext= +ac_objext=o +if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then + # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu. + if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then + ac_n= ac_c=' +' ac_t=' ' + else + ac_n=-n ac_c= ac_t= + fi +else + ac_n= ac_c='\c' ac_t= +fi + + + +ac_aux_dir= +for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do + if test -f $ac_dir/install-sh; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/install-sh -c" + break + elif test -f $ac_dir/install.sh; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/install.sh -c" + break + fi +done +if test -z "$ac_aux_dir"; then + { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; } +fi +ac_config_guess=$ac_aux_dir/config.guess +ac_config_sub=$ac_aux_dir/config.sub +ac_configure=$ac_aux_dir/configure # This should be Cygnus configure. + + +# Make sure we can run config.sub. +if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then : +else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; } +fi + +echo $ac_n "checking host system type""... $ac_c" 1>&6 +echo "configure:892: checking host system type" >&5 + +host_alias=$host +case "$host_alias" in +NONE) + case $nonopt in + NONE) + if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then : + else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; } + fi ;; + *) host_alias=$nonopt ;; + esac ;; +esac + +host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias` +host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` +host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` +host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` +eval echo "$ac_t""$host" 1>&6 + + +echo $ac_n "checking if sh is bash""... $ac_c" 1>&6 +echo "configure:914: checking if sh is bash" >&5 +if eval "test \"`echo '$''{'ac_cv_shell_is_bash'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + +ac_err=`< /dev/null sh --version 2> /dev/null | egrep 'GNU sh|bash'` +if test -n "$ac_err"; then + ac_cv_shell_is_bash=yes +else + ac_cv_shell_is_bash=no +fi + +fi + +eval echo "$ac_t""$ac_cv_shell_is_bash" 1>&6 +if test $ac_cv_shell_is_bash = yes; then + cat >> confdefs.h <<\EOF +#define SHELL_IS_BASH 1 +EOF + +fi +echo $ac_n "checking if /bin/sh is bash""... $ac_c" 1>&6 +echo "configure:936: checking if /bin/sh is bash" >&5 +if eval "test \"`echo '$''{'ac_cv_bin_shell_is_bash'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + +ac_err=`< /dev/null /bin/sh --version 2> /dev/null | egrep 'GNU sh|bash'` +if test -n "$ac_err"; then + ac_cv_bin_shell_is_bash=yes +else + ac_cv_bin_shell_is_bash=no +fi + +fi + +eval echo "$ac_t""$ac_cv_bin_shell_is_bash" 1>&6 +if test $ac_cv_bin_shell_is_bash = yes; then + cat >> confdefs.h <<\EOF +#define BIN_SHELL_IS_BASH 1 +EOF + +fi +echo $ac_n "checking whether sh -ce is broken""... $ac_c" 1>&6 +echo "configure:958: checking whether sh -ce is broken" >&5 +if eval "test \"`echo '$''{'ac_cv_shell_ce_is_broken'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + +ac_err=`sh -ce 'for i in 1 2 3; do ( echo $i; if test -d . ; then (false; echo 4); fi ) ; done' | grep 2` +if test -n "$ac_err"; then + ac_cv_shell_ce_is_broken=yes +else + ac_cv_shell_ce_is_broken=no +fi + +fi + +eval echo "$ac_t""$ac_cv_shell_ce_is_broken" 1>&6 +if test $ac_cv_shell_ce_is_broken = yes; then + cat >> confdefs.h <<\EOF +#define SHELL_CE_IS_BROKEN 1 +EOF + +fi +echo $ac_n "checking whether /bin/sh -ce is broken""... $ac_c" 1>&6 +echo "configure:980: checking whether /bin/sh -ce is broken" >&5 +if eval "test \"`echo '$''{'ac_cv_bin_shell_ce_is_broken'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + +ac_err=`/bin/sh -ce 'for i in 1 2 3; do ( echo $i; if test -d . ; then (false; echo 4); fi ) ; done' | grep 2` +if test -n "$ac_err"; then + ac_cv_bin_shell_ce_is_broken=yes +else + ac_cv_bin_shell_ce_is_broken=no +fi + +fi + +eval echo "$ac_t""$ac_cv_bin_shell_ce_is_broken" 1>&6 +if test $ac_cv_bin_shell_ce_is_broken = yes; then + cat >> confdefs.h <<\EOF +#define BIN_SHELL_CE_IS_BROKEN 1 +EOF + +fi +echo $ac_n "checking whether /bin/bosh is a working shell""... $ac_c" 1>&6 +echo "configure:1002: checking whether /bin/bosh is a working shell" >&5 +if eval "test \"`echo '$''{'ac_cv_bin_shell_bosh'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + +ac_err=`< /dev/null /bin/bosh -c 'echo abc' 2> /dev/null | grep abc` +if test "$ac_err" != "abc"; then + ac_cv_bin_shell_bosh=no +else + ac_err=`/bin/bosh -ce 'for i in 1 2 3; do ( echo $i; if test -d . ; then (false; echo 4); fi ) ; done' | grep 2` + if test -z "$ac_err"; then + ac_cv_bin_shell_bosh=yes + else + ac_cv_bin_shell_bosh=no + fi +fi + +fi + +eval echo "$ac_t""$ac_cv_bin_shell_bosh" 1>&6 +if test $ac_cv_bin_shell_bosh = yes; then + cat >> confdefs.h <<\EOF +#define BIN_SHELL_BOSH 1 +EOF + +fi +echo $ac_n "checking whether /opt/schily/bin/bosh is a working shell""... $ac_c" 1>&6 +echo "configure:1029: checking whether /opt/schily/bin/bosh is a working shell" >&5 +if eval "test \"`echo '$''{'ac_cv_opt_schily_bin_shell_bosh'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + +ac_err=`< /dev/null /opt/schily/bin/bosh -c 'echo abc' 2> /dev/null | grep abc` +if test "$ac_err" != "abc"; then + ac_cv_opt_schily_bin_shell_bosh=no +else + ac_err=`/opt/schily/bin/bosh -ce 'for i in 1 2 3; do ( echo $i; if test -d . ; then (false; echo 4); fi ) ; done' | grep 2` + if test -z "$ac_err"; then + ac_cv_opt_schily_bin_shell_bosh=yes + else + ac_cv_opt_schily_bin_shell_bosh=no + fi +fi + +fi + +eval echo "$ac_t""$ac_cv_opt_schily_bin_shell_bosh" 1>&6 +if test $ac_cv_opt_schily_bin_shell_bosh = yes; then + cat >> confdefs.h <<\EOF +#define OPT_SCHILY_BIN_SHELL_BOSH 1 +EOF + +fi +# Extract the first word of "cc", so it can be a program name with args. +set dummy cc; ac_word=$2 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:1058: checking for $ac_word" >&5 +if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + ac_dummy="$PATH" + for ac_dir in $ac_dummy; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + ac_cv_prog_CC="cc" + break + fi + done + IFS="$ac_save_ifs" + test -z "$ac_cv_prog_CC" && ac_cv_prog_CC="gcc" +fi +fi +CC="$ac_cv_prog_CC" +if test -n "$CC"; then + eval echo "$ac_t""$CC" 1>&6 +else + eval echo "$ac_t""no" 1>&6 +fi + # Extract the first word of "gcc", so it can be a program name with args. +set dummy gcc; ac_word=$2 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:1087: checking for $ac_word" >&5 +if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + ac_dummy="$PATH" + for ac_dir in $ac_dummy; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + ac_cv_prog_CC="gcc" + break + fi + done + IFS="$ac_save_ifs" +fi +fi +CC="$ac_cv_prog_CC" +if test -n "$CC"; then + eval echo "$ac_t""$CC" 1>&6 +else + eval echo "$ac_t""no" 1>&6 +fi + +if test -z "$CC"; then + # Extract the first word of "cc", so it can be a program name with args. +set dummy cc; ac_word=$2 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:1117: checking for $ac_word" >&5 +if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + ac_prog_rejected=no + ac_dummy="$PATH" + for ac_dir in $ac_dummy; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then + ac_prog_rejected=yes + continue + fi + ac_cv_prog_CC="cc" + break + fi + done + IFS="$ac_save_ifs" +if test $ac_prog_rejected = yes; then + # We found a bogon in the path, so make sure we never use it. + set dummy $ac_cv_prog_CC + shift + if test $# -gt 0; then + # We chose a different compiler from the bogus one. + # However, it has the same basename, so the bogon will be chosen + # first if we set CC to just the basename; use the full file name. + shift + set dummy "$ac_dir/$ac_word" "$@" + shift + ac_cv_prog_CC="$@" + fi +fi +fi +fi +CC="$ac_cv_prog_CC" +if test -n "$CC"; then + eval echo "$ac_t""$CC" 1>&6 +else + eval echo "$ac_t""no" 1>&6 +fi + + if test -z "$CC"; then + case "`uname -s`" in + *win32* | *WIN32*) + # Extract the first word of "cl", so it can be a program name with args. +set dummy cl; ac_word=$2 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:1168: checking for $ac_word" >&5 +if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + ac_dummy="$PATH" + for ac_dir in $ac_dummy; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + ac_cv_prog_CC="cl" + break + fi + done + IFS="$ac_save_ifs" +fi +fi +CC="$ac_cv_prog_CC" +if test -n "$CC"; then + eval echo "$ac_t""$CC" 1>&6 +else + eval echo "$ac_t""no" 1>&6 +fi + ;; + esac + fi + test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; } +fi + +echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 +echo "configure:1200: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 + +ac_ext=c +# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. +ac_cpp='$CPP $CPPFLAGS' +ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' +ac_compile2='${CC-cc} -c $CFLAGS $CPPFLAGS conftest2.$ac_ext 1>&5' +ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS conftest.$ac_ext $LDFLAGS $LIBS 1>&5' +cross_compiling=$ac_cv_prog_cc_cross +if test "$cross_compiling" = yes -a "$CONFIG_RMTCALL" != NONE ; then + cross_compiling=remote + rmtcall="$CONFIG_RMTCALL" + rmttest="$CONFIG_RMTCALL" +fi + +cat > conftest.$ac_ext << EOF + +#line 1217 "configure" +#include "confdefs.h" + +main(){return(0);} +EOF +if { eval echo configure:1222: \"$ac_link\" 1>&5; eval $ac_link 2>&5; } && test -s conftest${ac_exeext}; then + ac_cv_prog_cc_works=yes + # If we can't run a trivial program, we are probably using a cross compiler. + if (./conftest${ac_xexeext}; exit) 2>/dev/null; then + ac_cv_prog_cc_cross=no + else + ac_cv_prog_cc_cross=yes + fi +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + ac_cv_prog_cc_works=no +fi +rm -fr conftest* +ac_ext=c +# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. +ac_cpp='$CPP $CPPFLAGS' +ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' +ac_compile2='${CC-cc} -c $CFLAGS $CPPFLAGS conftest2.$ac_ext 1>&5' +ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS conftest.$ac_ext $LDFLAGS $LIBS 1>&5' +cross_compiling=$ac_cv_prog_cc_cross +if test "$cross_compiling" = yes -a "$CONFIG_RMTCALL" != NONE ; then + cross_compiling=remote + rmtcall="$CONFIG_RMTCALL" + rmttest="$CONFIG_RMTCALL" +fi + +eval echo "$ac_t""$ac_cv_prog_cc_works" 1>&6 +if test $ac_cv_prog_cc_works = no; then + ccout=`eval "${CC-cc} 2>&1" 2> /dev/null` + ret=$? + nf=`echo "$ccout" | grep 'not found'` + if test $ret = 127 -a -n "$nf" ; then # Korn Shell + ccout="" + fi + if test "$ret" -ne 0 -a ! -n "$ccout" ; then + { echo "configure: error: installation or configuration problem: C compiler ${CC-cc} not found." 1>&2; exit 1; } + fi + { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } +fi +echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 +echo "configure:1263: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 +eval echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 +cross_compiling=$ac_cv_prog_cc_cross +if test "$cross_compiling" = yes -a "$CONFIG_RMTCALL" != NONE ; then + cross_compiling=remote + rmtcall="$CONFIG_RMTCALL" + rmttest="$CONFIG_RMTCALL" +fi + +echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 +echo "configure:1273: checking whether we are using GNU C" >&5 +if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.c <&5; eval $ac_try 2>&5; }; } | egrep yes >/dev/null 2>&1; then + ac_cv_prog_gcc=yes +else + ac_cv_prog_gcc=no +fi +fi + +eval echo "$ac_t""$ac_cv_prog_gcc" 1>&6 + +if test $ac_cv_prog_gcc = yes; then + GCC=yes +else + GCC= +fi + +ac_test_CFLAGS="${CFLAGS+set}" +ac_save_CFLAGS="$CFLAGS" +CFLAGS= +echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 +echo "configure:1301: checking whether ${CC-cc} accepts -g" >&5 +if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + echo 'void f(){}' > conftest.c +if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then + ac_cv_prog_cc_g=yes +else + ac_cv_prog_cc_g=no +fi +rm -f conftest* + +fi + +eval echo "$ac_t""$ac_cv_prog_cc_g" 1>&6 +if test "$ac_test_CFLAGS" = set; then + CFLAGS="$ac_save_CFLAGS" +elif test $ac_cv_prog_cc_g = yes; then + if test "$GCC" = yes; then + CFLAGS="-g -O2" + else + CFLAGS="-g" + fi +else + if test "$GCC" = yes; then + CFLAGS="-O2" + else + CFLAGS= + fi +fi + +if test "$cross_compiling" = remote -a ."$CONFIG_RMTCALL" = . ; then + echo 'CONFIG_RMTCALL=script-path required for remote execution' 1>&2 + exit 1 +fi +if test "$cross_compiling" = remote -a ."$CONFIG_RMTHOST" = . ; then + echo 'CONFIG_RMTHOST=host or CONFIG_RMTHOST=user@host required for remote execution' 1>&2 + exit 1 +fi +if test "$cross_compiling" = remote ; then + echo "Cross-Compiling with remote execution of test programs" + echo "Cross-Compile script: $CONFIG_RMTCALL" + echo "Cross-Compile host: $CONFIG_RMTHOST" +fi + echo $ac_n "checking for object suffix""... $ac_c" 1>&6 +echo "configure:1346: checking for object suffix" >&5 +if eval "test \"`echo '$''{'ac_cv_objext'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + rm -f conftest* +echo 'int i = 1;' > conftest.$ac_ext +if { eval echo configure:1352: \"$ac_compile\" 1>&5; eval $ac_compile 2>&5; }; then + for ac_file in conftest.*; do + case $ac_file in + *.c) ;; + *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;; + esac + done +else + { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; } +fi +rm -f conftest* +fi + +eval echo "$ac_t""$ac_cv_objext" 1>&6 +OBJEXT=$ac_cv_objext +ac_objext=$ac_cv_objext + +echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6 +echo "configure:1370: checking for Cygwin environment" >&5 +if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext <&5; eval $ac_compile 2>&5; }; then + rm -rf conftest* + ac_cv_cygwin=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + ac_cv_cygwin=no +fi +rm -f conftest* +rm -f conftest* +fi + +eval echo "$ac_t""$ac_cv_cygwin" 1>&6 +CYGWIN= +test "$ac_cv_cygwin" = yes && CYGWIN=yes +echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6 +echo "configure:1403: checking for mingw32 environment" >&5 +if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext <&5; eval $ac_compile 2>&5; }; then + rm -rf conftest* + ac_cv_mingw32=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + ac_cv_mingw32=no +fi +rm -f conftest* +rm -f conftest* +fi + +eval echo "$ac_t""$ac_cv_mingw32" 1>&6 +MINGW32= +test "$ac_cv_mingw32" = yes && MINGW32=yes +echo $ac_n "checking for EMX/OS2 environment""... $ac_c" 1>&6 +echo "configure:1432: checking for EMX/OS2 environment" >&5 +if eval "test \"`echo '$''{'ac_cv_emxos2'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext <&5; eval $ac_compile 2>&5; }; then + rm -rf conftest* + ac_cv_emxos2=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + ac_cv_emxos2=no +fi +rm -f conftest* +rm -f conftest* +fi + +eval echo "$ac_t""$ac_cv_emxos2" 1>&6 +if eval "test \"`echo '$''{'ac_cv_libpre'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test "$ac_cv_emxos2" = yes ; then + ac_cv_libpre= +else + ac_cv_libpre=lib +fi + +fi + +EMXOS2= +test "$ac_cv_emxos2" = yes && EMXOS2=yes + + + +echo $ac_n "checking for executable suffix""... $ac_c" 1>&6 +echo "configure:1475: checking for executable suffix" >&5 +if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test "$CYGWIN" = yes || test "$MINGW32" = yes || test "$EMXOS2" = yes; then + ac_cv_exeext=.exe + ac_cv_xexeext="" +else + rm -f conftest* + echo 'int main () { return 0; }' > conftest.$ac_ext + ac_cv_exeext= + if { eval echo configure:1486: \"$ac_link\" 1>&5; eval $ac_link 2>&5; }; then + for file in conftest.*; do + case $file in + *.c | *.o | *.obj) ;; + *.dSYM) ;; # Ignore strange directory found on Mac OS X with cc -g + *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;; + esac + done + else + ccout=`eval "${CC-cc} 2>&1" 2> /dev/null` + ret=$? + nf=`echo "$ccout" | grep 'not found'` + if test $ret = 127 -a -n "$nf" ; then # Korn Shell + ccout="" + fi + if test "$ret" -ne 0 -a ! -n "$ccout" ; then + { echo "configure: error: installation or configuration problem: C compiler ${CC-cc} not found." 1>&2; exit 1; } + fi + { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; } + fi + (./conftest ; exit) 2> /dev/null + if test $? != 0 ; then + ac_cv_xexeext="${ac_cv_exeext}" + (./conftest${ac_cv_xexeext} ; exit) 2> /dev/null + if test $? != 0 ; then + ac_cv_xexeext="" + fi + fi + rm -f conftest* + test x"${ac_cv_exeext}" = x && ac_cv_exeext=no + test x"${ac_cv_xexeext}" = x && ac_cv_xexeext=no +fi +fi + +EXEEXT="" +XEXEEXT="" +test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext} +test x"${ac_cv_xexeext}" != xno && XEXEEXT=${ac_cv_xexeext} +eval echo "$ac_t""${ac_cv_exeext}" 1>&6 +echo $ac_n "checking for executable calling suffix""... $ac_c" 1>&6 +echo "configure:1526: checking for executable calling suffix" >&5 +eval echo "$ac_t""${ac_cv_xexeext}" 1>&6 +ac_exeext=$EXEEXT +ac_xexeext=$XEXEEXT + + + +echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 +echo "configure:1534: checking how to run the C preprocessor" >&5 +# On Suns, sometimes $CPP names a directory. +if test -n "$CPP" && test -d "$CPP"; then + CPP= +fi +if test -z "$CPP"; then +if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + # This must be in double quotes, not single quotes, because CPP may get + # substituted into the Makefile and "${CC-cc}" will confuse make. + CPP="${CC-cc} -E" + # On the NeXT, cc -E runs the code through the compiler's parser, + # not just through cpp. + cat > conftest.$ac_ext < +Syntax Error +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ eval echo configure:1555: \"$ac_try\" 1>&5; eval $ac_try 2>&5; } +ac_err=`tr -d '\015' < conftest.out | grep -v '^ *+' | grep -v "^conftest.${ac_ext}\$"` +if test -z "$ac_err"; then + : +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + CPP="${CC-cc} -E -traditional-cpp" + cat > conftest.$ac_ext < +Syntax Error +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ eval echo configure:1572: \"$ac_try\" 1>&5; eval $ac_try 2>&5; } +ac_err=`tr -d '\015' < conftest.out | grep -v '^ *+' | grep -v "^conftest.${ac_ext}\$"` +if test -z "$ac_err"; then + : +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + CPP="${CC-cc} -nologo -E" + cat > conftest.$ac_ext < +Syntax Error +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ eval echo configure:1589: \"$ac_try\" 1>&5; eval $ac_try 2>&5; } +ac_err=`tr -d '\015' < conftest.out | grep -v '^ *+' | grep -v "^conftest.${ac_ext}\$"` +if test -z "$ac_err"; then + : +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + CPP=/lib/cpp +fi +rm -f conftest* +fi +rm -f conftest* +fi +rm -f conftest* + ac_cv_prog_CPP="$CPP" +fi + CPP="$ac_cv_prog_CPP" +else + ac_cv_prog_CPP="$CPP" +fi +eval echo "$ac_t""$CPP" 1>&6 + +echo $ac_n "checking how to run the C preprocessor for any type of file""... $ac_c" 1>&6 +echo "configure:1614: checking how to run the C preprocessor for any type of file" >&5 +if test -z "$CPPX"; then +if eval "test \"`echo '$''{'ac_cv_prog_CPPX'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + # This must be in double quotes, not single quotes, because CPP may get + # substituted into the Makefile and "${CC-cc}" will confuse make. + CPPX="$CPP" + cat > conftestcpp << EOF + xxzzy +EOF + # gcc -E does not accept any file suffix, so we need to test + # and if $CC -E fails, we try to use dirname(which($CC))/cpp + # We cannot use AC_TRY_EVAL(CPPX conftestcpp | grep xxzzy) because + # of a bug in the parser from bash + ac_result=`(echo configure:1288: "$CPPX conftestcpp | grep xxzzy" 1>&5; eval $CPPX conftestcpp | grep xxzzy) 2>&5` + if test -z "$ac_result"; then + ac_file=`eval type ${CC-cc} 2>/dev/null | sed 's%[^/]*/%/%'` + # Remove last slash and all that follows it. Not all systems have dirname. + ac_dir=`echo "$ac_file" | sed 's%/[^/][^/]*$%%'` + if test -f "$ac_dir"/cpp; then + CPPX="$ac_dir"/cpp + fi + fi + ac_cv_prog_CPPX="$CPPX" +fi + CPPX="$ac_cv_prog_CPPX" +else + ac_cv_prog_CPPX="$CPPX" +fi +eval echo "$ac_t""$CPPX" 1>&6 + +echo $ac_n "checking if suncc/cc supports -m64""... $ac_c" 1>&6 +echo "configure:1647: checking if suncc/cc supports -m64" >&5 +if eval "test \"`echo '$''{'ac_cv_sun_cc64_opt'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + +sun_cc64=cc +sun_cc64_opt='' +ac_cv_sun_cc64_opt=no +if test "$GCC" != yes; then + if test "$CC" = suncc; then + sun_cc64=suncc + fi + ac_err=`< /dev/null eval $sun_cc64 -m64 -c 2>&1 | grep illegal` + if test -n "$ac_err"; then + ac_cv_sun_cc64_opt=no + else + ac_cv_sun_cc64_opt=yes + fi +fi + +fi + +eval echo "$ac_t""$ac_cv_sun_cc64_opt" 1>&6 +if test $ac_cv_sun_cc64_opt = yes; then + sun_cc64_opt='-m64' +fi +echo $ac_n "checking if HP cc supports -Ae""... $ac_c" 1>&6 +echo "configure:1674: checking if HP cc supports -Ae" >&5 +if eval "test \"`echo '$''{'ac_cv_hp_cc_ansi_opt'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + +hp_cc=cc +hp_cc_ansi_opt='' +ac_cv_hp_cc_ansi_opt=no +if test "$GCC" != yes; then + os_name=`(uname -s) 2> /dev/null` + if test ."$os_name" = .HP-UX ; then + ac_err=`< /dev/null eval $hp_cc -Ae -c 2>&1 | grep 'Bundled.*option is available only'` + if test -n "$ac_err"; then + ac_cv_hp_cc_ansi_opt=no + else + ac_cv_hp_cc_ansi_opt=yes + fi + fi +fi + +fi + +eval echo "$ac_t""$ac_cv_hp_cc_ansi_opt" 1>&6 +if test $ac_cv_hp_cc_ansi_opt = yes; then + hp_cc_ansi_opt='-Ae' +fi +echo $ac_n "checking if HP cc supports -O""... $ac_c" 1>&6 +echo "configure:1701: checking if HP cc supports -O" >&5 +if eval "test \"`echo '$''{'ac_cv_hp_cc_opt_opt'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + +hp_cc=cc +hp_cc_opt_opt='' +ac_cv_hp_cc_opt_opt=no +if test "$GCC" != yes; then + os_name=`(uname -s) 2> /dev/null` + if test ."$os_name" = .HP-UX ; then + ac_err=`< /dev/null eval $hp_cc -O -c 2>&1 | grep 'Bundled.*option is available only'` + if test -n "$ac_err"; then + ac_cv_hp_cc_opt_opt=no + else + ac_cv_hp_cc_opt_opt=yes + fi + fi +fi + +fi + +eval echo "$ac_t""$ac_cv_hp_cc_opt_opt" 1>&6 +if test $ac_cv_hp_cc_opt_opt = yes; then + hp_cc_opt_opt='-O' +fi +echo $ac_n "checking if HP cc supports -G""... $ac_c" 1>&6 +echo "configure:1728: checking if HP cc supports -G" >&5 +if eval "test \"`echo '$''{'ac_cv_hp_cc_gprof_opt'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + +hp_cc=cc +hp_cc_gprof_opt='' +ac_cv_hp_cc_gprof_opt=no +if test "$GCC" != yes; then + os_name=`(uname -s) 2> /dev/null` + if test ."$os_name" = .HP-UX ; then + ac_err=`< /dev/null eval $hp_cc -O -c 2>&1 | grep 'Bundled.*option is available only'` + if test -n "$ac_err"; then + ac_cv_hp_cc_gprof_opt=no + else + ac_cv_hp_cc_gprof_opt=yes + fi + fi +fi + +fi + +eval echo "$ac_t""$ac_cv_hp_cc_gprof_opt" 1>&6 +if test $ac_cv_hp_cc_gprof_opt = yes; then + hp_cc_gprof_opt='-G' +fi +# Extract the first word of "ranlib", so it can be a program name with args. +set dummy ranlib; ac_word=$2 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:1757: checking for $ac_word" >&5 +if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test -n "$RANLIB"; then + ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. +else + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + ac_dummy="$PATH" + for ac_dir in $ac_dummy; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + ac_cv_prog_RANLIB="ranlib" + break + fi + done + IFS="$ac_save_ifs" + test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":" +fi +fi +RANLIB="$ac_cv_prog_RANLIB" +if test -n "$RANLIB"; then + eval echo "$ac_t""$RANLIB" 1>&6 +else + eval echo "$ac_t""no" 1>&6 +fi + +echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6 +echo "configure:1785: checking whether ${MAKE-make} sets \${MAKE}" >&5 +set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftestmake <<\EOF +all: + @echo 'ac_maketemp="${MAKE}"' +EOF +# GNU make sometimes prints "make[1]: Entering...", which would confuse us. +eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=` +if test -n "$ac_maketemp"; then + eval ac_cv_prog_make_${ac_make}_set=yes +else + eval ac_cv_prog_make_${ac_make}_set=no +fi +rm -f conftestmake +fi +if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then + eval echo "$ac_t""yes" 1>&6 + SET_MAKE= +else + eval echo "$ac_t""no" 1>&6 + SET_MAKE="MAKE=${MAKE-make}" +fi + +for ac_prog in yacc 'bison -y' byacc +do +# Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:1816: checking for $ac_word" >&5 +if eval "test \"`echo '$''{'ac_cv_prog_YACC'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test -n "$YACC"; then + ac_cv_prog_YACC="$YACC" # Let the user override the test. +else + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + ac_dummy="$PATH" + for ac_dir in $ac_dummy; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + ac_cv_prog_YACC="$ac_prog" + break + fi + done + IFS="$ac_save_ifs" +fi +fi +YACC="$ac_cv_prog_YACC" +if test -n "$YACC"; then + eval echo "$ac_t""$YACC" 1>&6 +else + eval echo "$ac_t""no" 1>&6 +fi + +test -n "$YACC" && break +done +test -n "$YACC" || YACC="noyacc" + +for ac_prog in bison +do +# Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:1851: checking for $ac_word" >&5 +if eval "test \"`echo '$''{'ac_cv_prog_BISON'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test -n "$BISON"; then + ac_cv_prog_BISON="$BISON" # Let the user override the test. +else + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + ac_dummy="$PATH" + for ac_dir in $ac_dummy; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + ac_cv_prog_BISON="$ac_prog" + break + fi + done + IFS="$ac_save_ifs" +fi +fi +BISON="$ac_cv_prog_BISON" +if test -n "$BISON"; then + eval echo "$ac_t""$BISON" 1>&6 +else + eval echo "$ac_t""no" 1>&6 +fi + +test -n "$BISON" && break +done +test -n "$BISON" || BISON="nobison" + +# +# We need both tsort/lorder or none of them +# +# Extract the first word of "lorder", so it can be a program name with args. +set dummy lorder; ac_word=$2 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:1887: checking for $ac_word" >&5 +if eval "test \"`echo '$''{'ac_cv_path_LORDER'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + case "$LORDER" in + /*) + ac_cv_path_LORDER="$LORDER" # Let the user override the test with a path. + ;; + ?:/*) + ac_cv_path_LORDER="$LORDER" # Let the user override the test with a dos path. + ;; + *) + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + ac_dummy="$PATH:/usr/ccs/bin" + for ac_dir in $ac_dummy; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + ac_cv_path_LORDER="$ac_dir/$ac_word" + break + fi + done + IFS="$ac_save_ifs" + test -z "$ac_cv_path_LORDER" && ac_cv_path_LORDER="echo" + ;; +esac +fi +LORDER="$ac_cv_path_LORDER" +if test -n "$LORDER"; then + eval echo "$ac_t""$LORDER" 1>&6 +else + eval echo "$ac_t""no" 1>&6 +fi + +if test "$LORDER" = echo; then + TSORT=cat +else + # Extract the first word of "tsort", so it can be a program name with args. +set dummy tsort; ac_word=$2 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:1926: checking for $ac_word" >&5 +if eval "test \"`echo '$''{'ac_cv_path_TSORT'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + case "$TSORT" in + /*) + ac_cv_path_TSORT="$TSORT" # Let the user override the test with a path. + ;; + ?:/*) + ac_cv_path_TSORT="$TSORT" # Let the user override the test with a dos path. + ;; + *) + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + ac_dummy="$PATH:/usr/ccs/bin" + for ac_dir in $ac_dummy; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + ac_cv_path_TSORT="$ac_dir/$ac_word" + break + fi + done + IFS="$ac_save_ifs" + test -z "$ac_cv_path_TSORT" && ac_cv_path_TSORT="cat" + ;; +esac +fi +TSORT="$ac_cv_path_TSORT" +if test -n "$TSORT"; then + eval echo "$ac_t""$TSORT" 1>&6 +else + eval echo "$ac_t""no" 1>&6 +fi + + if test "$TSORT" = cat; then + LORDER=echo + fi +fi + +echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 +echo "configure:1965: checking for ANSI C header files" >&5 +if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +#include +#include +#include +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ eval echo configure:1978: \"$ac_try\" 1>&5; eval $ac_try 2>&5; } +ac_err=`tr -d '\015' < conftest.out | grep -v '^ *+' | grep -v "^conftest.${ac_ext}\$"` +if test -z "$ac_err"; then + rm -rf conftest* + ac_cv_header_stdc=yes +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + ac_cv_header_stdc=no +fi +rm -f conftest* + +if test $ac_cv_header_stdc = yes; then + # SunOS 4.x string.h does not declare mem*, contrary to ANSI. +cat > conftest.$ac_ext < +EOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + egrep "memchr" >/dev/null 2>&1; then + : +else + rm -rf conftest* + ac_cv_header_stdc=no +fi +rm -f conftest* + +fi + +if test $ac_cv_header_stdc = yes; then + # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. +cat > conftest.$ac_ext < +EOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + egrep "free" >/dev/null 2>&1; then + : +else + rm -rf conftest* + ac_cv_header_stdc=no +fi +rm -f conftest* + +fi + +if test $ac_cv_header_stdc = yes; then + # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. +if test "$cross_compiling" = yes; then + : +else + cat > conftest.$ac_ext < +#define ISLOWER(c) ('a' <= (c) && (c) <= 'z') +#define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) +#define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) +int main () { int i; for (i = 0; i < 256; i++) +if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); +exit (0); } + +EOF +if { eval echo configure:2045: \"$ac_link\" 1>&5; eval $ac_link 2>&5; } && test -s conftest${ac_exeext} && ($rmtcall ./conftest${ac_xexeext}; exit) 2>/dev/null +then + : +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* + ac_cv_header_stdc=no +fi +rm -fr conftest* +fi + +fi +fi + +eval echo "$ac_t""$ac_cv_header_stdc" 1>&6 +if test $ac_cv_header_stdc = yes; then + cat >> confdefs.h <<\EOF +#define STDC_HEADERS 1 +EOF + + cat >> confdefs.h <<\EOF +#define HAVE_STDARG_H 1 +EOF + + cat >> confdefs.h <<\EOF +#define HAVE_STDLIB_H 1 +EOF + + cat >> confdefs.h <<\EOF +#define HAVE_STRING_H 1 +EOF + + cat >> confdefs.h <<\EOF +#define HAVE_FLOAT_H 1 +EOF + +fi + +for ac_hdr in stdarg.h stdlib.h string.h float.h +do +ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` +echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 +echo "configure:2088: checking for $ac_hdr" >&5 +if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ eval echo configure:2098: \"$ac_try\" 1>&5; eval $ac_try 2>&5; } +ac_err=`tr -d '\015' < conftest.out | grep -v '^ *+' | grep -v "^conftest.${ac_ext}\$"` +if test -z "$ac_err"; then + rm -rf conftest* + eval "ac_cv_header_$ac_safe=yes" +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_header_$ac_safe=no" +fi +rm -f conftest* +fi +if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then + eval echo "$ac_t""yes" 1>&6 + ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` + cat >> confdefs.h <&6 +fi +done + echo $ac_n "checking for UNIX-98 compliant inttypes.h""... $ac_c" 1>&6 +echo "configure:2124: checking for UNIX-98 compliant inttypes.h" >&5 +if eval "test \"`echo '$''{'ac_cv_header_inttypes'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +int main() { +int8_t c; uint8_t uc; int16_t s; uint16_t us; int32_t i; uint32_t ui; +int64_t ll; uint64_t ull; +intptr_t ip; uintptr_t uip; +; return 0; } +EOF +if { eval echo configure:2138: \"$ac_compile\" 1>&5; eval $ac_compile 2>&5; }; then + rm -rf conftest* + ac_cv_header_inttypes=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + ac_cv_header_inttypes=no +fi +rm -f conftest* +fi + +eval echo "$ac_t""$ac_cv_header_inttypes" 1>&6 +if test $ac_cv_header_inttypes = yes; then + cat >> confdefs.h <<\EOF +#define HAVE_INTTYPES_H 1 +EOF + +fi +echo $ac_n "checking for SUSv3 compliant stdint.h""... $ac_c" 1>&6 +echo "configure:2158: checking for SUSv3 compliant stdint.h" >&5 +if eval "test \"`echo '$''{'ac_cv_header_stdint'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +int main() { +int8_t c; uint8_t uc; int16_t s; uint16_t us; int32_t i; uint32_t ui; +int64_t ll; uint64_t ull; +intptr_t ip; uintptr_t uip; +intmax_t im; uintmax_t uim; +; return 0; } +EOF +if { eval echo configure:2173: \"$ac_compile\" 1>&5; eval $ac_compile 2>&5; }; then + rm -rf conftest* + ac_cv_header_stdint=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + ac_cv_header_stdint=no +fi +rm -f conftest* +fi + +eval echo "$ac_t""$ac_cv_header_stdint" 1>&6 +if test $ac_cv_header_stdint = yes; then + cat >> confdefs.h <<\EOF +#define HAVE_STDINT_H 1 +EOF + + cat >> confdefs.h <<\EOF +#define HAVE_TYPE_INTMAX_T 1 +EOF + + cat >> confdefs.h <<\EOF +#define HAVE_TYPE_UINTMAX_T 1 +EOF + +fi +ac_xsave_LIBS="$LIBS" +LIBS="" +ac_header_dirent=no +for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h +do +ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` +echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6 +echo "configure:2207: checking for $ac_hdr that defines DIR" >&5 +if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +#include <$ac_hdr> +int main() { +DIR *dirp = 0; +; return 0; } +EOF +if { eval echo configure:2220: \"$ac_compile\" 1>&5; eval $ac_compile 2>&5; }; then + rm -rf conftest* + eval "ac_cv_header_dirent_$ac_safe=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_header_dirent_$ac_safe=no" +fi +rm -f conftest* +fi +if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then + eval echo "$ac_t""yes" 1>&6 + ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` + cat >> confdefs.h <&6 +fi +done +# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix. +if test $ac_header_dirent = dirent.h; then +echo $ac_n "checking for opendir in -lc""... $ac_c" 1>&6 +echo "configure:2245: checking for opendir in -lc" >&5 +ac_lib_var=`echo c'_'opendir | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS=`echo "-lc $LIBS" | sed -e 's/-lc //'` +cat > conftest.$ac_ext <&5; eval $ac_link 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + eval echo "$ac_t""yes" 1>&6 + : +else + eval echo "$ac_t""no" 1>&6 +echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6 +echo "configure:2283: checking for opendir in -ldir" >&5 +ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS=`echo "-ldir $LIBS" | sed -e 's/-lc //'` +cat > conftest.$ac_ext <&5; eval $ac_link 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + eval echo "$ac_t""yes" 1>&6 + LIBS="$LIBS -ldir" +else + eval echo "$ac_t""no" 1>&6 +fi + +fi + +else +echo $ac_n "checking for opendir in -lc""... $ac_c" 1>&6 +echo "configure:2326: checking for opendir in -lc" >&5 +ac_lib_var=`echo c'_'opendir | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS=`echo "-lc $LIBS" | sed -e 's/-lc //'` +cat > conftest.$ac_ext <&5; eval $ac_link 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + eval echo "$ac_t""yes" 1>&6 + : +else + eval echo "$ac_t""no" 1>&6 +echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6 +echo "configure:2364: checking for opendir in -lx" >&5 +ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS=`echo "-lx $LIBS" | sed -e 's/-lc //'` +cat > conftest.$ac_ext <&5; eval $ac_link 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + eval echo "$ac_t""yes" 1>&6 + LIBS="$LIBS -lx" +else + eval echo "$ac_t""no" 1>&6 +fi + +fi + +fi + +lib_dir="$LIBS" +LIBS="$ac_xsave_LIBS" +echo $ac_n "checking whether stat file-mode macros are broken""... $ac_c" 1>&6 +echo "configure:2410: checking whether stat file-mode macros are broken" >&5 +if eval "test \"`echo '$''{'ac_cv_header_stat_broken'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +#include + +#if defined(S_ISBLK) && defined(S_IFDIR) +# if S_ISBLK (S_IFDIR) +You lose. +# endif +#endif + +#if defined(S_ISBLK) && defined(S_IFCHR) +# if S_ISBLK (S_IFCHR) +You lose. +# endif +#endif + +#if defined(S_ISLNK) && defined(S_IFREG) +# if S_ISLNK (S_IFREG) +You lose. +# endif +#endif + +#if defined(S_ISSOCK) && defined(S_IFREG) +# if S_ISSOCK (S_IFREG) +You lose. +# endif +#endif + +EOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + egrep "You lose" >/dev/null 2>&1; then + rm -rf conftest* + ac_cv_header_stat_broken=yes +else + rm -rf conftest* + ac_cv_header_stat_broken=no +fi +rm -f conftest* + +fi + +eval echo "$ac_t""$ac_cv_header_stat_broken" 1>&6 +if test $ac_cv_header_stat_broken = yes; then + cat >> confdefs.h <<\EOF +#define STAT_MACROS_BROKEN 1 +EOF + +fi + +echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6 +echo "configure:2466: checking whether time.h and sys/time.h may both be included" >&5 +if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +#include +#include +int main() { +struct tm *tp; +; return 0; } +EOF +if { eval echo configure:2480: \"$ac_compile\" 1>&5; eval $ac_compile 2>&5; }; then + rm -rf conftest* + ac_cv_header_time=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + ac_cv_header_time=no +fi +rm -f conftest* +fi + +eval echo "$ac_t""$ac_cv_header_time" 1>&6 +if test $ac_cv_header_time = yes; then + cat >> confdefs.h <<\EOF +#define TIME_WITH_SYS_TIME 1 +EOF + +fi + +echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6 +echo "configure:2501: checking for sys/wait.h that is POSIX.1 compatible" >&5 +if eval "test \"`echo '$''{'ac_cv_header_sys_wait_h'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +#include +#ifndef WEXITSTATUS +#define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8) +#endif +#ifndef WIFEXITED +#define WIFEXITED(stat_val) (((stat_val) & 255) == 0) +#endif +int main() { +int s; +wait (&s); +s = WIFEXITED (s) ? WEXITSTATUS (s) : 1; +; return 0; } +EOF +if { eval echo configure:2522: \"$ac_compile\" 1>&5; eval $ac_compile 2>&5; }; then + rm -rf conftest* + ac_cv_header_sys_wait_h=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + ac_cv_header_sys_wait_h=no +fi +rm -f conftest* +fi + +eval echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6 +if test $ac_cv_header_sys_wait_h = yes; then + cat >> confdefs.h <<\EOF +#define HAVE_SYS_WAIT_H 1 +EOF + +fi + +echo $ac_n "checking if select needs nonstd include files""... $ac_c" 1>&6 +echo "configure:2543: checking if select needs nonstd include files" >&5 +if eval "test \"`echo '$''{'ac_cv_header_slect_nonstd_hdr'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +#include +int main() { +fd_set rfd; FD_ZERO(&rfd); select(1, &rfd, 0, 0, 0); +; return 0; } +EOF +if { eval echo configure:2556: \"$ac_compile\" 1>&5; eval $ac_compile 2>&5; }; then + rm -rf conftest* + ac_cv_header_slect_nonstd_hdr=no +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + ac_cv_header_slect_nonstd_hdr=yes +fi +rm -f conftest* +fi + +eval echo "$ac_t""$ac_cv_header_slect_nonstd_hdr" 1>&6 +if test $ac_cv_header_slect_nonstd_hdr = yes; then + cat >> confdefs.h <<\EOF +#define SELECT_NONSTD_HDR 1 +EOF + +fi +echo $ac_n "checking if sys/select.h is needed for select""... $ac_c" 1>&6 +echo "configure:2576: checking if sys/select.h is needed for select" >&5 +if eval "test \"`echo '$''{'ac_cv_header_need_sys_select_h'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +#include +#include +#ifndef SELECT_NONSTD_HDR +do not compile if we do not need nonstandard headers +#endif +int main() { +fd_set rfd; FD_ZERO(&rfd); select(1, &rfd, 0, 0, 0); +; return 0; } +EOF +if { eval echo configure:2593: \"$ac_compile\" 1>&5; eval $ac_compile 2>&5; }; then + rm -rf conftest* + ac_cv_header_need_sys_select_h=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + ac_cv_header_need_sys_select_h=no +fi +rm -f conftest* +fi + +eval echo "$ac_t""$ac_cv_header_need_sys_select_h" 1>&6 +if test $ac_cv_header_need_sys_select_h = yes; then + cat >> confdefs.h <<\EOF +#define NEED_SYS_SELECT_H 1 +EOF + +fi +echo $ac_n "checking if sys/socket.h is needed for select""... $ac_c" 1>&6 +echo "configure:2613: checking if sys/socket.h is needed for select" >&5 +if eval "test \"`echo '$''{'ac_cv_header_need_sys_socket_h'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +#include +#include +#ifndef SELECT_NONSTD_HDR +do not compile if we do not need nonstandard headers +#endif +int main() { +fd_set rfd; FD_ZERO(&rfd); select(1, &rfd, 0, 0, 0); +; return 0; } +EOF +if { eval echo configure:2630: \"$ac_compile\" 1>&5; eval $ac_compile 2>&5; }; then + rm -rf conftest* + ac_cv_header_need_sys_socket_h=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + ac_cv_header_need_sys_socket_h=no +fi +rm -f conftest* +fi + +eval echo "$ac_t""$ac_cv_header_need_sys_socket_h" 1>&6 +if test $ac_cv_header_need_sys_socket_h = yes; then + cat >> confdefs.h <<\EOF +#define NEED_SYS_SOCKET_H 1 +EOF + +fi +for ac_hdr in ar.h +do +ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` +echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 +echo "configure:2653: checking for $ac_hdr" >&5 +if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ eval echo configure:2663: \"$ac_try\" 1>&5; eval $ac_try 2>&5; } +ac_err=`tr -d '\015' < conftest.out | grep -v '^ *+' | grep -v "^conftest.${ac_ext}\$"` +if test -z "$ac_err"; then + rm -rf conftest* + eval "ac_cv_header_$ac_safe=yes" +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_header_$ac_safe=no" +fi +rm -f conftest* +fi +if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then + eval echo "$ac_t""yes" 1>&6 + ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` + cat >> confdefs.h <&6 +fi +done + +for ac_hdr in assert.h +do +ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` +echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 +echo "configure:2693: checking for $ac_hdr" >&5 +if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ eval echo configure:2703: \"$ac_try\" 1>&5; eval $ac_try 2>&5; } +ac_err=`tr -d '\015' < conftest.out | grep -v '^ *+' | grep -v "^conftest.${ac_ext}\$"` +if test -z "$ac_err"; then + rm -rf conftest* + eval "ac_cv_header_$ac_safe=yes" +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_header_$ac_safe=no" +fi +rm -f conftest* +fi +if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then + eval echo "$ac_t""yes" 1>&6 + ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` + cat >> confdefs.h <&6 +fi +done + +for ac_hdr in stdio.h varargs.h stdarg.h stdlib.h stddef.h string.h strings.h unistd.h fcntl.h io.h sys/file.h +do +ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` +echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 +echo "configure:2733: checking for $ac_hdr" >&5 +if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ eval echo configure:2743: \"$ac_try\" 1>&5; eval $ac_try 2>&5; } +ac_err=`tr -d '\015' < conftest.out | grep -v '^ *+' | grep -v "^conftest.${ac_ext}\$"` +if test -z "$ac_err"; then + rm -rf conftest* + eval "ac_cv_header_$ac_safe=yes" +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_header_$ac_safe=no" +fi +rm -f conftest* +fi +if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then + eval echo "$ac_t""yes" 1>&6 + ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` + cat >> confdefs.h <&6 +fi +done + +for ac_hdr in conio.h +do +ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` +echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 +echo "configure:2773: checking for $ac_hdr" >&5 +if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ eval echo configure:2783: \"$ac_try\" 1>&5; eval $ac_try 2>&5; } +ac_err=`tr -d '\015' < conftest.out | grep -v '^ *+' | grep -v "^conftest.${ac_ext}\$"` +if test -z "$ac_err"; then + rm -rf conftest* + eval "ac_cv_header_$ac_safe=yes" +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_header_$ac_safe=no" +fi +rm -f conftest* +fi +if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then + eval echo "$ac_t""yes" 1>&6 + ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` + cat >> confdefs.h <&6 +fi +done + +for ac_hdr in getopt.h +do +ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` +echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 +echo "configure:2813: checking for $ac_hdr" >&5 +if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ eval echo configure:2823: \"$ac_try\" 1>&5; eval $ac_try 2>&5; } +ac_err=`tr -d '\015' < conftest.out | grep -v '^ *+' | grep -v "^conftest.${ac_ext}\$"` +if test -z "$ac_err"; then + rm -rf conftest* + eval "ac_cv_header_$ac_safe=yes" +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_header_$ac_safe=no" +fi +rm -f conftest* +fi +if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then + eval echo "$ac_t""yes" 1>&6 + ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` + cat >> confdefs.h <&6 +fi +done + +for ac_hdr in limits.h +do +ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` +echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 +echo "configure:2853: checking for $ac_hdr" >&5 +if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ eval echo configure:2863: \"$ac_try\" 1>&5; eval $ac_try 2>&5; } +ac_err=`tr -d '\015' < conftest.out | grep -v '^ *+' | grep -v "^conftest.${ac_ext}\$"` +if test -z "$ac_err"; then + rm -rf conftest* + eval "ac_cv_header_$ac_safe=yes" +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_header_$ac_safe=no" +fi +rm -f conftest* +fi +if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then + eval echo "$ac_t""yes" 1>&6 + ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` + cat >> confdefs.h <&6 +fi +done + +for ac_hdr in a.out.h aouthdr.h elf.h +do +ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` +echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 +echo "configure:2893: checking for $ac_hdr" >&5 +if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ eval echo configure:2903: \"$ac_try\" 1>&5; eval $ac_try 2>&5; } +ac_err=`tr -d '\015' < conftest.out | grep -v '^ *+' | grep -v "^conftest.${ac_ext}\$"` +if test -z "$ac_err"; then + rm -rf conftest* + eval "ac_cv_header_$ac_safe=yes" +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_header_$ac_safe=no" +fi +rm -f conftest* +fi +if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then + eval echo "$ac_t""yes" 1>&6 + ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` + cat >> confdefs.h <&6 +fi +done + +for ac_hdr in sysexits.h +do +ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` +echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 +echo "configure:2933: checking for $ac_hdr" >&5 +if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ eval echo configure:2943: \"$ac_try\" 1>&5; eval $ac_try 2>&5; } +ac_err=`tr -d '\015' < conftest.out | grep -v '^ *+' | grep -v "^conftest.${ac_ext}\$"` +if test -z "$ac_err"; then + rm -rf conftest* + eval "ac_cv_header_$ac_safe=yes" +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_header_$ac_safe=no" +fi +rm -f conftest* +fi +if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then + eval echo "$ac_t""yes" 1>&6 + ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` + cat >> confdefs.h <&6 +fi +done + +for ac_hdr in malloc.h posix/malloc.h sgtty.h termios.h termio.h +do +ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` +echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 +echo "configure:2973: checking for $ac_hdr" >&5 +if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ eval echo configure:2983: \"$ac_try\" 1>&5; eval $ac_try 2>&5; } +ac_err=`tr -d '\015' < conftest.out | grep -v '^ *+' | grep -v "^conftest.${ac_ext}\$"` +if test -z "$ac_err"; then + rm -rf conftest* + eval "ac_cv_header_$ac_safe=yes" +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_header_$ac_safe=no" +fi +rm -f conftest* +fi +if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then + eval echo "$ac_t""yes" 1>&6 + ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` + cat >> confdefs.h <&6 +fi +done + +for ac_hdr in pwd.h grp.h sys/acl.h aclutils.h acllib.h acl/libacl.h +do +ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` +echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 +echo "configure:3013: checking for $ac_hdr" >&5 +if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ eval echo configure:3023: \"$ac_try\" 1>&5; eval $ac_try 2>&5; } +ac_err=`tr -d '\015' < conftest.out | grep -v '^ *+' | grep -v "^conftest.${ac_ext}\$"` +if test -z "$ac_err"; then + rm -rf conftest* + eval "ac_cv_header_$ac_safe=yes" +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_header_$ac_safe=no" +fi +rm -f conftest* +fi +if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then + eval echo "$ac_t""yes" 1>&6 + ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` + cat >> confdefs.h <&6 +fi +done + +for ac_hdr in signal.h siginfo.h sys/siginfo.h ucontext.h +do +ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` +echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 +echo "configure:3053: checking for $ac_hdr" >&5 +if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ eval echo configure:3063: \"$ac_try\" 1>&5; eval $ac_try 2>&5; } +ac_err=`tr -d '\015' < conftest.out | grep -v '^ *+' | grep -v "^conftest.${ac_ext}\$"` +if test -z "$ac_err"; then + rm -rf conftest* + eval "ac_cv_header_$ac_safe=yes" +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_header_$ac_safe=no" +fi +rm -f conftest* +fi +if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then + eval echo "$ac_t""yes" 1>&6 + ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` + cat >> confdefs.h <&6 +fi +done + +for ac_hdr in shadow.h syslog.h +do +ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` +echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 +echo "configure:3093: checking for $ac_hdr" >&5 +if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ eval echo configure:3103: \"$ac_try\" 1>&5; eval $ac_try 2>&5; } +ac_err=`tr -d '\015' < conftest.out | grep -v '^ *+' | grep -v "^conftest.${ac_ext}\$"` +if test -z "$ac_err"; then + rm -rf conftest* + eval "ac_cv_header_$ac_safe=yes" +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_header_$ac_safe=no" +fi +rm -f conftest* +fi +if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then + eval echo "$ac_t""yes" 1>&6 + ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` + cat >> confdefs.h <&6 +fi +done + +for ac_hdr in sys/time.h sys/times.h utime.h sys/utime.h sys/ioctl.h sys/filio.h sys/param.h sys/systeminfo.h sys/sysctl.h +do +ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` +echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 +echo "configure:3133: checking for $ac_hdr" >&5 +if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ eval echo configure:3143: \"$ac_try\" 1>&5; eval $ac_try 2>&5; } +ac_err=`tr -d '\015' < conftest.out | grep -v '^ *+' | grep -v "^conftest.${ac_ext}\$"` +if test -z "$ac_err"; then + rm -rf conftest* + eval "ac_cv_header_$ac_safe=yes" +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_header_$ac_safe=no" +fi +rm -f conftest* +fi +if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then + eval echo "$ac_t""yes" 1>&6 + ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` + cat >> confdefs.h <&6 +fi +done + +for ac_hdr in sys/loadavg.h +do +ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` +echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 +echo "configure:3173: checking for $ac_hdr" >&5 +if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ eval echo configure:3183: \"$ac_try\" 1>&5; eval $ac_try 2>&5; } +ac_err=`tr -d '\015' < conftest.out | grep -v '^ *+' | grep -v "^conftest.${ac_ext}\$"` +if test -z "$ac_err"; then + rm -rf conftest* + eval "ac_cv_header_$ac_safe=yes" +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_header_$ac_safe=no" +fi +rm -f conftest* +fi +if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then + eval echo "$ac_t""yes" 1>&6 + ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` + cat >> confdefs.h <&6 +fi +done + +for ac_hdr in sys/syscall.h +do +ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` +echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 +echo "configure:3213: checking for $ac_hdr" >&5 +if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ eval echo configure:3223: \"$ac_try\" 1>&5; eval $ac_try 2>&5; } +ac_err=`tr -d '\015' < conftest.out | grep -v '^ *+' | grep -v "^conftest.${ac_ext}\$"` +if test -z "$ac_err"; then + rm -rf conftest* + eval "ac_cv_header_$ac_safe=yes" +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_header_$ac_safe=no" +fi +rm -f conftest* +fi +if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then + eval echo "$ac_t""yes" 1>&6 + ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` + cat >> confdefs.h <&6 +fi +done + +for ac_hdr in mach/machine.h +do +ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` +echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 +echo "configure:3253: checking for $ac_hdr" >&5 +if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ eval echo configure:3263: \"$ac_try\" 1>&5; eval $ac_try 2>&5; } +ac_err=`tr -d '\015' < conftest.out | grep -v '^ *+' | grep -v "^conftest.${ac_ext}\$"` +if test -z "$ac_err"; then + rm -rf conftest* + eval "ac_cv_header_$ac_safe=yes" +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_header_$ac_safe=no" +fi +rm -f conftest* +fi +if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then + eval echo "$ac_t""yes" 1>&6 + ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` + cat >> confdefs.h <&6 +fi +done + +for ac_hdr in mntent.h sys/mntent.h sys/mnttab.h sys/mount.h +do +ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` +echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 +echo "configure:3293: checking for $ac_hdr" >&5 +if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ eval echo configure:3303: \"$ac_try\" 1>&5; eval $ac_try 2>&5; } +ac_err=`tr -d '\015' < conftest.out | grep -v '^ *+' | grep -v "^conftest.${ac_ext}\$"` +if test -z "$ac_err"; then + rm -rf conftest* + eval "ac_cv_header_$ac_safe=yes" +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_header_$ac_safe=no" +fi +rm -f conftest* +fi +if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then + eval echo "$ac_t""yes" 1>&6 + ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` + cat >> confdefs.h <&6 +fi +done + +for ac_hdr in sys/fork.h vfork.h wait.h sys/wait.h sys/resource.h procfs.h sys/procfs.h libproc.h +do +ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` +echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 +echo "configure:3333: checking for $ac_hdr" >&5 +if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ eval echo configure:3343: \"$ac_try\" 1>&5; eval $ac_try 2>&5; } +ac_err=`tr -d '\015' < conftest.out | grep -v '^ *+' | grep -v "^conftest.${ac_ext}\$"` +if test -z "$ac_err"; then + rm -rf conftest* + eval "ac_cv_header_$ac_safe=yes" +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_header_$ac_safe=no" +fi +rm -f conftest* +fi +if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then + eval echo "$ac_t""yes" 1>&6 + ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` + cat >> confdefs.h <&6 +fi +done + +for ac_hdr in ulimit.h +do +ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` +echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 +echo "configure:3373: checking for $ac_hdr" >&5 +if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ eval echo configure:3383: \"$ac_try\" 1>&5; eval $ac_try 2>&5; } +ac_err=`tr -d '\015' < conftest.out | grep -v '^ *+' | grep -v "^conftest.${ac_ext}\$"` +if test -z "$ac_err"; then + rm -rf conftest* + eval "ac_cv_header_$ac_safe=yes" +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_header_$ac_safe=no" +fi +rm -f conftest* +fi +if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then + eval echo "$ac_t""yes" 1>&6 + ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` + cat >> confdefs.h <&6 +fi +done + +for ac_hdr in process.h +do +ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` +echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 +echo "configure:3413: checking for $ac_hdr" >&5 +if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ eval echo configure:3423: \"$ac_try\" 1>&5; eval $ac_try 2>&5; } +ac_err=`tr -d '\015' < conftest.out | grep -v '^ *+' | grep -v "^conftest.${ac_ext}\$"` +if test -z "$ac_err"; then + rm -rf conftest* + eval "ac_cv_header_$ac_safe=yes" +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_header_$ac_safe=no" +fi +rm -f conftest* +fi +if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then + eval echo "$ac_t""yes" 1>&6 + ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` + cat >> confdefs.h <&6 +fi +done + +for ac_hdr in sys/utsname.h sys/priocntl.h sys/rtpriocntl.h sys/procset.h +do +ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` +echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 +echo "configure:3453: checking for $ac_hdr" >&5 +if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ eval echo configure:3463: \"$ac_try\" 1>&5; eval $ac_try 2>&5; } +ac_err=`tr -d '\015' < conftest.out | grep -v '^ *+' | grep -v "^conftest.${ac_ext}\$"` +if test -z "$ac_err"; then + rm -rf conftest* + eval "ac_cv_header_$ac_safe=yes" +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_header_$ac_safe=no" +fi +rm -f conftest* +fi +if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then + eval echo "$ac_t""yes" 1>&6 + ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` + cat >> confdefs.h <&6 +fi +done + +for ac_hdr in sys/mtio.h sys/tape.h sys/mman.h linux/pg.h camlib.h +do +ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` +echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 +echo "configure:3493: checking for $ac_hdr" >&5 +if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ eval echo configure:3503: \"$ac_try\" 1>&5; eval $ac_try 2>&5; } +ac_err=`tr -d '\015' < conftest.out | grep -v '^ *+' | grep -v "^conftest.${ac_ext}\$"` +if test -z "$ac_err"; then + rm -rf conftest* + eval "ac_cv_header_$ac_safe=yes" +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_header_$ac_safe=no" +fi +rm -f conftest* +fi +if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then + eval echo "$ac_t""yes" 1>&6 + ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` + cat >> confdefs.h <&6 +fi +done + +for ac_hdr in sys/shm.h sys/sem.h sys/ipc.h semaphore.h +do +ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` +echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 +echo "configure:3533: checking for $ac_hdr" >&5 +if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ eval echo configure:3543: \"$ac_try\" 1>&5; eval $ac_try 2>&5; } +ac_err=`tr -d '\015' < conftest.out | grep -v '^ *+' | grep -v "^conftest.${ac_ext}\$"` +if test -z "$ac_err"; then + rm -rf conftest* + eval "ac_cv_header_$ac_safe=yes" +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_header_$ac_safe=no" +fi +rm -f conftest* +fi +if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then + eval echo "$ac_t""yes" 1>&6 + ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` + cat >> confdefs.h <&6 +fi +done + +for ac_hdr in sys/dkio.h sys/dklabel.h sun/dkio.h sun/dklabel.h +do +ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` +echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 +echo "configure:3573: checking for $ac_hdr" >&5 +if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ eval echo configure:3583: \"$ac_try\" 1>&5; eval $ac_try 2>&5; } +ac_err=`tr -d '\015' < conftest.out | grep -v '^ *+' | grep -v "^conftest.${ac_ext}\$"` +if test -z "$ac_err"; then + rm -rf conftest* + eval "ac_cv_header_$ac_safe=yes" +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_header_$ac_safe=no" +fi +rm -f conftest* +fi +if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then + eval echo "$ac_t""yes" 1>&6 + ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` + cat >> confdefs.h <&6 +fi +done + +for ac_hdr in sys/types.h sys/stat.h types.h stat.h +do +ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` +echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 +echo "configure:3613: checking for $ac_hdr" >&5 +if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ eval echo configure:3623: \"$ac_try\" 1>&5; eval $ac_try 2>&5; } +ac_err=`tr -d '\015' < conftest.out | grep -v '^ *+' | grep -v "^conftest.${ac_ext}\$"` +if test -z "$ac_err"; then + rm -rf conftest* + eval "ac_cv_header_$ac_safe=yes" +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_header_$ac_safe=no" +fi +rm -f conftest* +fi +if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then + eval echo "$ac_t""yes" 1>&6 + ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` + cat >> confdefs.h <&6 +fi +done + +for ac_hdr in sys/stypes.h sys/filedesc.h +do +ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` +echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 +echo "configure:3653: checking for $ac_hdr" >&5 +if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ eval echo configure:3663: \"$ac_try\" 1>&5; eval $ac_try 2>&5; } +ac_err=`tr -d '\015' < conftest.out | grep -v '^ *+' | grep -v "^conftest.${ac_ext}\$"` +if test -z "$ac_err"; then + rm -rf conftest* + eval "ac_cv_header_$ac_safe=yes" +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_header_$ac_safe=no" +fi +rm -f conftest* +fi +if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then + eval echo "$ac_t""yes" 1>&6 + ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` + cat >> confdefs.h <&6 +fi +done + +for ac_hdr in sys/acct.h +do +ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` +echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 +echo "configure:3693: checking for $ac_hdr" >&5 +if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ eval echo configure:3703: \"$ac_try\" 1>&5; eval $ac_try 2>&5; } +ac_err=`tr -d '\015' < conftest.out | grep -v '^ *+' | grep -v "^conftest.${ac_ext}\$"` +if test -z "$ac_err"; then + rm -rf conftest* + eval "ac_cv_header_$ac_safe=yes" +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_header_$ac_safe=no" +fi +rm -f conftest* +fi +if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then + eval echo "$ac_t""yes" 1>&6 + ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` + cat >> confdefs.h <&6 +fi +done + +for ac_hdr in poll.h sys/poll.h sys/select.h +do +ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` +echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 +echo "configure:3733: checking for $ac_hdr" >&5 +if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ eval echo configure:3743: \"$ac_try\" 1>&5; eval $ac_try 2>&5; } +ac_err=`tr -d '\015' < conftest.out | grep -v '^ *+' | grep -v "^conftest.${ac_ext}\$"` +if test -z "$ac_err"; then + rm -rf conftest* + eval "ac_cv_header_$ac_safe=yes" +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_header_$ac_safe=no" +fi +rm -f conftest* +fi +if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then + eval echo "$ac_t""yes" 1>&6 + ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` + cat >> confdefs.h <&6 +fi +done + +for ac_hdr in netdb.h arpa/aixrcmds.h sys/socket.h netinet/in.h stropts.h +do +ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` +echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 +echo "configure:3773: checking for $ac_hdr" >&5 +if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ eval echo configure:3783: \"$ac_try\" 1>&5; eval $ac_try 2>&5; } +ac_err=`tr -d '\015' < conftest.out | grep -v '^ *+' | grep -v "^conftest.${ac_ext}\$"` +if test -z "$ac_err"; then + rm -rf conftest* + eval "ac_cv_header_$ac_safe=yes" +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_header_$ac_safe=no" +fi +rm -f conftest* +fi +if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then + eval echo "$ac_t""yes" 1>&6 + ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` + cat >> confdefs.h <&6 +fi +done + +for ac_hdr in ieeefp.h fp.h +do +ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` +echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 +echo "configure:3813: checking for $ac_hdr" >&5 +if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ eval echo configure:3823: \"$ac_try\" 1>&5; eval $ac_try 2>&5; } +ac_err=`tr -d '\015' < conftest.out | grep -v '^ *+' | grep -v "^conftest.${ac_ext}\$"` +if test -z "$ac_err"; then + rm -rf conftest* + eval "ac_cv_header_$ac_safe=yes" +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_header_$ac_safe=no" +fi +rm -f conftest* +fi +if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then + eval echo "$ac_t""yes" 1>&6 + ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` + cat >> confdefs.h <&6 +fi +done + +for ac_hdr in values.h float.h math.h +do +ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` +echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 +echo "configure:3853: checking for $ac_hdr" >&5 +if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ eval echo configure:3863: \"$ac_try\" 1>&5; eval $ac_try 2>&5; } +ac_err=`tr -d '\015' < conftest.out | grep -v '^ *+' | grep -v "^conftest.${ac_ext}\$"` +if test -z "$ac_err"; then + rm -rf conftest* + eval "ac_cv_header_$ac_safe=yes" +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_header_$ac_safe=no" +fi +rm -f conftest* +fi +if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then + eval echo "$ac_t""yes" 1>&6 + ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` + cat >> confdefs.h <&6 +fi +done + +for ac_hdr in arpa/inet.h +do +ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` +echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 +echo "configure:3893: checking for $ac_hdr" >&5 +if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ eval echo configure:3903: \"$ac_try\" 1>&5; eval $ac_try 2>&5; } +ac_err=`tr -d '\015' < conftest.out | grep -v '^ *+' | grep -v "^conftest.${ac_ext}\$"` +if test -z "$ac_err"; then + rm -rf conftest* + eval "ac_cv_header_$ac_safe=yes" +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_header_$ac_safe=no" +fi +rm -f conftest* +fi +if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then + eval echo "$ac_t""yes" 1>&6 + ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` + cat >> confdefs.h <&6 +fi +done + +for ac_hdr in rpc/rpc.h +do +ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` +echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 +echo "configure:3933: checking for $ac_hdr" >&5 +if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ eval echo configure:3943: \"$ac_try\" 1>&5; eval $ac_try 2>&5; } +ac_err=`tr -d '\015' < conftest.out | grep -v '^ *+' | grep -v "^conftest.${ac_ext}\$"` +if test -z "$ac_err"; then + rm -rf conftest* + eval "ac_cv_header_$ac_safe=yes" +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_header_$ac_safe=no" +fi +rm -f conftest* +fi +if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then + eval echo "$ac_t""yes" 1>&6 + ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` + cat >> confdefs.h <&6 +fi +done + +for ac_hdr in bsd/dev/scsireg.h +do +ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` +echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 +echo "configure:3973: checking for $ac_hdr" >&5 +if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ eval echo configure:3983: \"$ac_try\" 1>&5; eval $ac_try 2>&5; } +ac_err=`tr -d '\015' < conftest.out | grep -v '^ *+' | grep -v "^conftest.${ac_ext}\$"` +if test -z "$ac_err"; then + rm -rf conftest* + eval "ac_cv_header_$ac_safe=yes" +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_header_$ac_safe=no" +fi +rm -f conftest* +fi +if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then + eval echo "$ac_t""yes" 1>&6 + ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` + cat >> confdefs.h <&6 +fi +done + +for ac_hdr in sys/bsdtty.h +do +ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` +echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 +echo "configure:4013: checking for $ac_hdr" >&5 +if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ eval echo configure:4023: \"$ac_try\" 1>&5; eval $ac_try 2>&5; } +ac_err=`tr -d '\015' < conftest.out | grep -v '^ *+' | grep -v "^conftest.${ac_ext}\$"` +if test -z "$ac_err"; then + rm -rf conftest* + eval "ac_cv_header_$ac_safe=yes" +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_header_$ac_safe=no" +fi +rm -f conftest* +fi +if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then + eval echo "$ac_t""yes" 1>&6 + ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` + cat >> confdefs.h <&6 +fi +done + +for ac_hdr in scsi/scsi.h scsi/sg.h linux/scsi.h linux.sg.h +do +ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` +echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 +echo "configure:4053: checking for $ac_hdr" >&5 +if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ eval echo configure:4063: \"$ac_try\" 1>&5; eval $ac_try 2>&5; } +ac_err=`tr -d '\015' < conftest.out | grep -v '^ *+' | grep -v "^conftest.${ac_ext}\$"` +if test -z "$ac_err"; then + rm -rf conftest* + eval "ac_cv_header_$ac_safe=yes" +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_header_$ac_safe=no" +fi +rm -f conftest* +fi +if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then + eval echo "$ac_t""yes" 1>&6 + ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` + cat >> confdefs.h <&6 +fi +done + +for ac_hdr in linux/types.h linux/gfp.h asm/types.h +do +ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` +echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 +echo "configure:4093: checking for $ac_hdr" >&5 +if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ eval echo configure:4103: \"$ac_try\" 1>&5; eval $ac_try 2>&5; } +ac_err=`tr -d '\015' < conftest.out | grep -v '^ *+' | grep -v "^conftest.${ac_ext}\$"` +if test -z "$ac_err"; then + rm -rf conftest* + eval "ac_cv_header_$ac_safe=yes" +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_header_$ac_safe=no" +fi +rm -f conftest* +fi +if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then + eval echo "$ac_t""yes" 1>&6 + ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` + cat >> confdefs.h <&6 +fi +done + +for ac_hdr in sys/capability.h +do +ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` +echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 +echo "configure:4133: checking for $ac_hdr" >&5 +if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ eval echo configure:4143: \"$ac_try\" 1>&5; eval $ac_try 2>&5; } +ac_err=`tr -d '\015' < conftest.out | grep -v '^ *+' | grep -v "^conftest.${ac_ext}\$"` +if test -z "$ac_err"; then + rm -rf conftest* + eval "ac_cv_header_$ac_safe=yes" +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_header_$ac_safe=no" +fi +rm -f conftest* +fi +if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then + eval echo "$ac_t""yes" 1>&6 + ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` + cat >> confdefs.h <&6 +fi +done + +for ac_hdr in OS.h +do +ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` +echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 +echo "configure:4173: checking for $ac_hdr" >&5 +if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ eval echo configure:4183: \"$ac_try\" 1>&5; eval $ac_try 2>&5; } +ac_err=`tr -d '\015' < conftest.out | grep -v '^ *+' | grep -v "^conftest.${ac_ext}\$"` +if test -z "$ac_err"; then + rm -rf conftest* + eval "ac_cv_header_$ac_safe=yes" +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_header_$ac_safe=no" +fi +rm -f conftest* +fi +if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then + eval echo "$ac_t""yes" 1>&6 + ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` + cat >> confdefs.h <&6 +fi +done + +for ac_hdr in os2.h +do +ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` +echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 +echo "configure:4213: checking for $ac_hdr" >&5 +if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ eval echo configure:4223: \"$ac_try\" 1>&5; eval $ac_try 2>&5; } +ac_err=`tr -d '\015' < conftest.out | grep -v '^ *+' | grep -v "^conftest.${ac_ext}\$"` +if test -z "$ac_err"; then + rm -rf conftest* + eval "ac_cv_header_$ac_safe=yes" +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_header_$ac_safe=no" +fi +rm -f conftest* +fi +if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then + eval echo "$ac_t""yes" 1>&6 + ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` + cat >> confdefs.h <&6 +fi +done + +for ac_hdr in os2me.h +do +ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` +echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 +echo "configure:4253: checking for $ac_hdr" >&5 +if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ eval echo configure:4263: \"$ac_try\" 1>&5; eval $ac_try 2>&5; } +ac_err=`tr -d '\015' < conftest.out | grep -v '^ *+' | grep -v "^conftest.${ac_ext}\$"` +if test -z "$ac_err"; then + rm -rf conftest* + eval "ac_cv_header_$ac_safe=yes" +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_header_$ac_safe=no" +fi +rm -f conftest* +fi +if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then + eval echo "$ac_t""yes" 1>&6 + ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` + cat >> confdefs.h <&6 +fi +done + +for ac_hdr in windows.h +do +ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` +echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 +echo "configure:4293: checking for $ac_hdr" >&5 +if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ eval echo configure:4303: \"$ac_try\" 1>&5; eval $ac_try 2>&5; } +ac_err=`tr -d '\015' < conftest.out | grep -v '^ *+' | grep -v "^conftest.${ac_ext}\$"` +if test -z "$ac_err"; then + rm -rf conftest* + eval "ac_cv_header_$ac_safe=yes" +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_header_$ac_safe=no" +fi +rm -f conftest* +fi +if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then + eval echo "$ac_t""yes" 1>&6 + ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` + cat >> confdefs.h <&6 +fi +done + +for ac_hdr in ext2fs/ext2_fs.h +do +ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` +echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 +echo "configure:4333: checking for $ac_hdr" >&5 +if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ eval echo configure:4343: \"$ac_try\" 1>&5; eval $ac_try 2>&5; } +ac_err=`tr -d '\015' < conftest.out | grep -v '^ *+' | grep -v "^conftest.${ac_ext}\$"` +if test -z "$ac_err"; then + rm -rf conftest* + eval "ac_cv_header_$ac_safe=yes" +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_header_$ac_safe=no" +fi +rm -f conftest* +fi +if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then + eval echo "$ac_t""yes" 1>&6 + ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` + cat >> confdefs.h <&6 +fi +done + +for ac_hdr in attr/xattr.h +do +ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` +echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 +echo "configure:4373: checking for $ac_hdr" >&5 +if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ eval echo configure:4383: \"$ac_try\" 1>&5; eval $ac_try 2>&5; } +ac_err=`tr -d '\015' < conftest.out | grep -v '^ *+' | grep -v "^conftest.${ac_ext}\$"` +if test -z "$ac_err"; then + rm -rf conftest* + eval "ac_cv_header_$ac_safe=yes" +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_header_$ac_safe=no" +fi +rm -f conftest* +fi +if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then + eval echo "$ac_t""yes" 1>&6 + ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` + cat >> confdefs.h <&6 +fi +done + +for ac_hdr in crt_externs.h +do +ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` +echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 +echo "configure:4413: checking for $ac_hdr" >&5 +if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ eval echo configure:4423: \"$ac_try\" 1>&5; eval $ac_try 2>&5; } +ac_err=`tr -d '\015' < conftest.out | grep -v '^ *+' | grep -v "^conftest.${ac_ext}\$"` +if test -z "$ac_err"; then + rm -rf conftest* + eval "ac_cv_header_$ac_safe=yes" +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_header_$ac_safe=no" +fi +rm -f conftest* +fi +if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then + eval echo "$ac_t""yes" 1>&6 + ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` + cat >> confdefs.h <&6 +fi +done + +for ac_hdr in fnmatch.h +do +ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` +echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 +echo "configure:4453: checking for $ac_hdr" >&5 +if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ eval echo configure:4463: \"$ac_try\" 1>&5; eval $ac_try 2>&5; } +ac_err=`tr -d '\015' < conftest.out | grep -v '^ *+' | grep -v "^conftest.${ac_ext}\$"` +if test -z "$ac_err"; then + rm -rf conftest* + eval "ac_cv_header_$ac_safe=yes" +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_header_$ac_safe=no" +fi +rm -f conftest* +fi +if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then + eval echo "$ac_t""yes" 1>&6 + ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` + cat >> confdefs.h <&6 +fi +done + +for ac_hdr in libintl.h locale.h langinfo.h nl_types.h +do +ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` +echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 +echo "configure:4493: checking for $ac_hdr" >&5 +if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ eval echo configure:4503: \"$ac_try\" 1>&5; eval $ac_try 2>&5; } +ac_err=`tr -d '\015' < conftest.out | grep -v '^ *+' | grep -v "^conftest.${ac_ext}\$"` +if test -z "$ac_err"; then + rm -rf conftest* + eval "ac_cv_header_$ac_safe=yes" +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_header_$ac_safe=no" +fi +rm -f conftest* +fi +if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then + eval echo "$ac_t""yes" 1>&6 + ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` + cat >> confdefs.h <&6 +fi +done + +for ac_hdr in ctype.h wctype.h wchar.h iconv.h +do +ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` +echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 +echo "configure:4533: checking for $ac_hdr" >&5 +if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ eval echo configure:4543: \"$ac_try\" 1>&5; eval $ac_try 2>&5; } +ac_err=`tr -d '\015' < conftest.out | grep -v '^ *+' | grep -v "^conftest.${ac_ext}\$"` +if test -z "$ac_err"; then + rm -rf conftest* + eval "ac_cv_header_$ac_safe=yes" +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_header_$ac_safe=no" +fi +rm -f conftest* +fi +if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then + eval echo "$ac_t""yes" 1>&6 + ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` + cat >> confdefs.h <&6 +fi +done + +for ac_hdr in priv.h sys/priv.h +do +ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` +echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 +echo "configure:4573: checking for $ac_hdr" >&5 +if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ eval echo configure:4583: \"$ac_try\" 1>&5; eval $ac_try 2>&5; } +ac_err=`tr -d '\015' < conftest.out | grep -v '^ *+' | grep -v "^conftest.${ac_ext}\$"` +if test -z "$ac_err"; then + rm -rf conftest* + eval "ac_cv_header_$ac_safe=yes" +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_header_$ac_safe=no" +fi +rm -f conftest* +fi +if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then + eval echo "$ac_t""yes" 1>&6 + ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` + cat >> confdefs.h <&6 +fi +done + +for ac_hdr in exec_attr.h secdb.h +do +ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` +echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 +echo "configure:4613: checking for $ac_hdr" >&5 +if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ eval echo configure:4623: \"$ac_try\" 1>&5; eval $ac_try 2>&5; } +ac_err=`tr -d '\015' < conftest.out | grep -v '^ *+' | grep -v "^conftest.${ac_ext}\$"` +if test -z "$ac_err"; then + rm -rf conftest* + eval "ac_cv_header_$ac_safe=yes" +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_header_$ac_safe=no" +fi +rm -f conftest* +fi +if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then + eval echo "$ac_t""yes" 1>&6 + ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` + cat >> confdefs.h <&6 +fi +done + +for ac_hdr in direct.h +do +ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` +echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 +echo "configure:4653: checking for $ac_hdr" >&5 +if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ eval echo configure:4663: \"$ac_try\" 1>&5; eval $ac_try 2>&5; } +ac_err=`tr -d '\015' < conftest.out | grep -v '^ *+' | grep -v "^conftest.${ac_ext}\$"` +if test -z "$ac_err"; then + rm -rf conftest* + eval "ac_cv_header_$ac_safe=yes" +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_header_$ac_safe=no" +fi +rm -f conftest* +fi +if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then + eval echo "$ac_t""yes" 1>&6 + ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` + cat >> confdefs.h <&6 +fi +done + +for ac_hdr in pthread.h thread.h +do +ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` +echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 +echo "configure:4693: checking for $ac_hdr" >&5 +if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ eval echo configure:4703: \"$ac_try\" 1>&5; eval $ac_try 2>&5; } +ac_err=`tr -d '\015' < conftest.out | grep -v '^ *+' | grep -v "^conftest.${ac_ext}\$"` +if test -z "$ac_err"; then + rm -rf conftest* + eval "ac_cv_header_$ac_safe=yes" +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_header_$ac_safe=no" +fi +rm -f conftest* +fi +if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then + eval echo "$ac_t""yes" 1>&6 + ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` + cat >> confdefs.h <&6 +fi +done + +for ac_hdr in libgen.h +do +ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` +echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 +echo "configure:4733: checking for $ac_hdr" >&5 +if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ eval echo configure:4743: \"$ac_try\" 1>&5; eval $ac_try 2>&5; } +ac_err=`tr -d '\015' < conftest.out | grep -v '^ *+' | grep -v "^conftest.${ac_ext}\$"` +if test -z "$ac_err"; then + rm -rf conftest* + eval "ac_cv_header_$ac_safe=yes" +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_header_$ac_safe=no" +fi +rm -f conftest* +fi +if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then + eval echo "$ac_t""yes" 1>&6 + ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` + cat >> confdefs.h <&6 +fi +done + +for ac_hdr in regex.h regexp.h regexpr.h +do +ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` +echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 +echo "configure:4773: checking for $ac_hdr" >&5 +if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ eval echo configure:4783: \"$ac_try\" 1>&5; eval $ac_try 2>&5; } +ac_err=`tr -d '\015' < conftest.out | grep -v '^ *+' | grep -v "^conftest.${ac_ext}\$"` +if test -z "$ac_err"; then + rm -rf conftest* + eval "ac_cv_header_$ac_safe=yes" +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_header_$ac_safe=no" +fi +rm -f conftest* +fi +if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then + eval echo "$ac_t""yes" 1>&6 + ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` + cat >> confdefs.h <&6 +fi +done + +for ac_hdr in dlfcn.h link.h dl.h libelf.h +do +ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` +echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 +echo "configure:4813: checking for $ac_hdr" >&5 +if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ eval echo configure:4823: \"$ac_try\" 1>&5; eval $ac_try 2>&5; } +ac_err=`tr -d '\015' < conftest.out | grep -v '^ *+' | grep -v "^conftest.${ac_ext}\$"` +if test -z "$ac_err"; then + rm -rf conftest* + eval "ac_cv_header_$ac_safe=yes" +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_header_$ac_safe=no" +fi +rm -f conftest* +fi +if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then + eval echo "$ac_t""yes" 1>&6 + ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` + cat >> confdefs.h <&6 +fi +done + +for ac_hdr in ranlib.h +do +ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` +echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 +echo "configure:4853: checking for $ac_hdr" >&5 +if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ eval echo configure:4863: \"$ac_try\" 1>&5; eval $ac_try 2>&5; } +ac_err=`tr -d '\015' < conftest.out | grep -v '^ *+' | grep -v "^conftest.${ac_ext}\$"` +if test -z "$ac_err"; then + rm -rf conftest* + eval "ac_cv_header_$ac_safe=yes" +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_header_$ac_safe=no" +fi +rm -f conftest* +fi +if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then + eval echo "$ac_t""yes" 1>&6 + ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` + cat >> confdefs.h <&6 +fi +done + +for ac_hdr in expat.h +do +ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` +echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 +echo "configure:4893: checking for $ac_hdr" >&5 +if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ eval echo configure:4903: \"$ac_try\" 1>&5; eval $ac_try 2>&5; } +ac_err=`tr -d '\015' < conftest.out | grep -v '^ *+' | grep -v "^conftest.${ac_ext}\$"` +if test -z "$ac_err"; then + rm -rf conftest* + eval "ac_cv_header_$ac_safe=yes" +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_header_$ac_safe=no" +fi +rm -f conftest* +fi +if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then + eval echo "$ac_t""yes" 1>&6 + ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` + cat >> confdefs.h <&6 +fi +done + + +echo $ac_n "checking for header file containing major(), minor() and makedev()""... $ac_c" 1>&6 +echo "configure:4931: checking for header file containing major(), minor() and makedev()" >&5 +if eval "test \"`echo '$''{'ac_cv_header_makedev'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_cv_header_makedev=none +cat > conftest.$ac_ext < +#include +int main() { +int i = major(0); i = minor(0); i = makedev(0,0); +; return 0; } +EOF +if { eval echo configure:4945: \"$ac_compile\" 1>&5; eval $ac_compile 2>&5; }; then + rm -rf conftest* + ac_cv_header_makedev=sys/mkdev.h +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 +fi +rm -f conftest* +if test $ac_cv_header_makedev = none; then + cat > conftest.$ac_ext < +#include +int main() { +int i = major(0); i = minor(0); i = makedev(0,0); +; return 0; } +EOF +if { eval echo configure:4963: \"$ac_compile\" 1>&5; eval $ac_compile 2>&5; }; then + rm -rf conftest* + ac_cv_header_makedev=sys/sysmacros.h +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 +fi +rm -f conftest* +fi +fi + +eval echo "$ac_t""$ac_cv_header_makedev" 1>&6 +if test $ac_cv_header_makedev = sys/mkdev.h; then + cat >> confdefs.h <<\EOF +#define MAJOR_IN_MKDEV 1 +EOF + +fi +if test $ac_cv_header_makedev = sys/sysmacros.h; then + cat >> confdefs.h <<\EOF +#define MAJOR_IN_SYSMACROS 1 +EOF + +fi + + +echo $ac_n "checking bits in minor device number""... $ac_c" 1>&6 +echo "configure:4990: checking bits in minor device number" >&5 +if eval "test \"`echo '$''{'ac_cv_dev_minor_bits'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test "$cross_compiling" = yes; then + { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } +else + cat > conftest.$ac_ext < +#include +#ifdef major +# define _FOUND_MAJOR_ +#endif + +#ifdef MAJOR_IN_MKDEV +# include +# define _FOUND_MAJOR_ +#endif + +#ifndef _FOUND_MAJOR_ +# ifdef MAJOR_IN_SYSMACROS +# include +# define _FOUND_MAJOR_ +# endif +#endif + +#ifndef _FOUND_MAJOR_ +# if defined(hpux) || defined(__hpux__) || defined(__hpux) +# include +# define _FOUND_MAJOR_ +# endif +#endif + +#ifndef _FOUND_MAJOR_ +# define major(dev) (((dev) >> 8) & 0xFF) +# define minor(dev) ((dev) & 0xFF) +# define makedev(majo, mino) (((majo) << 8) | (mino)) +#endif +int +main() +{ + long l = 1; + int i; + int m; + int c = 0; + FILE *f=fopen("conftestval", "w"); + int maxloop = 32; + + if (sizeof (long) > 4) + maxloop = 64; + + if (!f) exit(1); + + for (i=1, m=0; i <= maxloop; i++, l<<=1) { + if (minor(l) == 0 && c == 0) + c = m; + if (minor(l) != 0) + m = i; + } + fprintf(f, "%d\n", m); + exit(0); +} +EOF +if { eval echo configure:5055: \"$ac_link\" 1>&5; eval $ac_link 2>&5; } && test -s conftest${ac_exeext} && ($rmtcall ./conftest${ac_xexeext}; exit) 2>/dev/null +then + ac_cv_dev_minor_bits=`cat conftestval` +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* + ac_cv_dev_minor_bits=0 +fi +rm -fr conftest* +fi + +fi +eval echo "$ac_t""$ac_cv_dev_minor_bits" 1>&6 +cat >> confdefs.h <&6 +echo "configure:5075: checking whether bits in minor device numbers are non contiguous" >&5 +if eval "test \"`echo '$''{'ac_cv_dev_minor_noncontig'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test "$cross_compiling" = yes; then + { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } +else + cat > conftest.$ac_ext < +#ifdef major +# define _FOUND_MAJOR_ +#endif + +#ifdef MAJOR_IN_MKDEV +# include +# define _FOUND_MAJOR_ +#endif + +#ifndef _FOUND_MAJOR_ +# ifdef MAJOR_IN_SYSMACROS +# include +# define _FOUND_MAJOR_ +# endif +#endif + +#ifndef _FOUND_MAJOR_ +# if defined(hpux) || defined(__hpux__) || defined(__hpux) +# include +# define _FOUND_MAJOR_ +# endif +#endif + +#ifndef _FOUND_MAJOR_ +# define major(dev) (((dev) >> 8) & 0xFF) +# define minor(dev) ((dev) & 0xFF) +# define makedev(majo, mino) (((majo) << 8) | (mino)) +#endif +int +main() +{ + long l = 1; + int i; + int m; + int c = 0; + int maxloop = 32; + + if (sizeof (long) > 4) + maxloop = 64; + + for (i=1, m=0; i <= maxloop; i++, l<<=1) { + if (minor(l) == 0 && c == 0) + c = m; + if (minor(l) != 0) + m = i; + } +exit (m == c);} +EOF +if { eval echo configure:5135: \"$ac_link\" 1>&5; eval $ac_link 2>&5; } && test -s conftest${ac_exeext} && ($rmtcall ./conftest${ac_xexeext}; exit) 2>/dev/null +then + ac_cv_dev_minor_noncontig=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* + ac_cv_dev_minor_noncontig=no +fi +rm -fr conftest* +fi + +fi + +eval echo "$ac_t""$ac_cv_dev_minor_noncontig" 1>&6 +if test $ac_cv_dev_minor_noncontig = yes; then + cat >> confdefs.h <<\EOF +#define DEV_MINOR_NONCONTIG 1 +EOF + +fi + +echo $ac_n "checking for _filbuf()""... $ac_c" 1>&6 +echo "configure:5158: checking for _filbuf()" >&5 +if eval "test \"`echo '$''{'ac_cv_func__filbuf'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +int main() { +FILE *f; +int flag; +int count; +char *ptr; +char c = 0; +f = fopen("confdefs.h", "r"); +_filbuf(f); +_flsbuf(c, f); +flag = f->_flag & _IONBF; +flag |= f->_flag & _IOERR; +flag |= f->_flag & _IOEOF; +count = f->_cnt; +ptr = (char *)f->_ptr; +fclose(f); +; return 0; } +EOF +if { eval echo configure:5183: \"$ac_link\" 1>&5; eval $ac_link 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + ac_cv_func__filbuf=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + ac_cv_func__filbuf=no +fi +rm -f conftest* +fi + +eval echo "$ac_t""$ac_cv_func__filbuf" 1>&6 +if test $ac_cv_func__filbuf = yes; then + cat >> confdefs.h <<\EOF +#define HAVE__FILBUF 1 +EOF + +fi +echo $ac_n "checking for __filbuf()""... $ac_c" 1>&6 +echo "configure:5203: checking for __filbuf()" >&5 +if eval "test \"`echo '$''{'ac_cv_func___filbuf'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +int main() { +FILE *f; +int flag; +int count; +char *ptr; +char c = 0; +f = fopen("confdefs.h", "r"); +__filbuf(f); +__flsbuf(c, f); +flag = f->_flag & _IONBF; +flag |= f->_flag & _IOERR; +flag |= f->_flag & _IOEOF; +count = f->_cnt; +ptr = (char *)f->_ptr; +fclose(f); +; return 0; } +EOF +if { eval echo configure:5228: \"$ac_link\" 1>&5; eval $ac_link 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + ac_cv_func___filbuf=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + ac_cv_func___filbuf=no +fi +rm -f conftest* +fi + +eval echo "$ac_t""$ac_cv_func___filbuf" 1>&6 +if test $ac_cv_func___filbuf = yes; then + cat >> confdefs.h <<\EOF +#define HAVE___FILBUF 1 +EOF + +fi +echo $ac_n "checking for USG derived STDIO""... $ac_c" 1>&6 +echo "configure:5248: checking for USG derived STDIO" >&5 +if eval "test \"`echo '$''{'ac_cv_header_usg_stdio'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +int main() { +FILE *f; +int flag; +int count; +char *ptr; +char c = 0; +f = fopen("confdefs.h", "r"); +#ifdef HAVE___FILBUF +__filbuf(f); +__flsbuf(c, f); +#else +# ifdef HAVE__FILBUF +_filbuf(f); +_flsbuf(c, f); +# else +no filbuf() +# endif +#endif +flag = f->_flag & _IONBF; +flag |= f->_flag & _IOERR; +flag |= f->_flag & _IOEOF; +count = f->_cnt; +ptr = (char *)f->_ptr; +fclose(f); +; return 0; } +EOF +if { eval echo configure:5282: \"$ac_link\" 1>&5; eval $ac_link 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + ac_cv_header_usg_stdio=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + ac_cv_header_usg_stdio=no +fi +rm -f conftest* +fi + +eval echo "$ac_t""$ac_cv_header_usg_stdio" 1>&6 +if test $ac_cv_header_usg_stdio = yes; then + cat >> confdefs.h <<\EOF +#define HAVE_USG_STDIO 1 +EOF + +fi +echo $ac_n "checking for errno definition in errno.h""... $ac_c" 1>&6 +echo "configure:5302: checking for errno definition in errno.h" >&5 +if eval "test \"`echo '$''{'ac_cv_header_errno_def'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +int main() { +errno = 0; +; return 0; } +EOF +if { eval echo configure:5314: \"$ac_compile\" 1>&5; eval $ac_compile 2>&5; }; then + rm -rf conftest* + ac_cv_header_errno_def=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + ac_cv_header_errno_def=no +fi +rm -f conftest* +fi + +eval echo "$ac_t""$ac_cv_header_errno_def" 1>&6 +if test $ac_cv_header_errno_def = yes; then + cat >> confdefs.h <<\EOF +#define HAVE_ERRNO_DEF 1 +EOF + +fi +echo $ac_n "checking for environ definition in unistd.h/stdlib.h""... $ac_c" 1>&6 +echo "configure:5334: checking for environ definition in unistd.h/stdlib.h" >&5 +if eval "test \"`echo '$''{'ac_cv_header_environ_def'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +#else +#ifdef HAVE_STDLIB_H +#include /* MSC no unistd.h but environ in stdlib.h */ +#endif +#endif + +int main() { +environ = 0; +; return 0; } +EOF +if { eval echo configure:5354: \"$ac_compile\" 1>&5; eval $ac_compile 2>&5; }; then + rm -rf conftest* + ac_cv_header_environ_def=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + ac_cv_header_environ_def=no +fi +rm -f conftest* +fi + +eval echo "$ac_t""$ac_cv_header_environ_def" 1>&6 +if test $ac_cv_header_environ_def = yes; then + cat >> confdefs.h <<\EOF +#define HAVE_ENVIRON_DEF 1 +EOF + +fi +echo $ac_n "checking for sys_siglist definition in signal.h""... $ac_c" 1>&6 +echo "configure:5374: checking for sys_siglist definition in signal.h" >&5 +if eval "test \"`echo '$''{'ac_cv_header_sys_siglist_def'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +int main() { +char *cp = (char *)sys_siglist[0]; exit (cp != (char *)0 && *cp != 0); +; return 0; } +EOF +if { eval echo configure:5386: \"$ac_compile\" 1>&5; eval $ac_compile 2>&5; }; then + rm -rf conftest* + ac_cv_header_sys_siglist_def=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + ac_cv_header_sys_siglist_def=no +fi +rm -f conftest* +fi + +eval echo "$ac_t""$ac_cv_header_sys_siglist_def" 1>&6 +if test $ac_cv_header_sys_siglist_def = yes; then + cat >> confdefs.h <<\EOF +#define HAVE_SYS_SIGLIST_DEF 1 +EOF + +fi +for ac_hdr in stdlib.h +do +ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` +echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 +echo "configure:5409: checking for $ac_hdr" >&5 +if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ eval echo configure:5419: \"$ac_try\" 1>&5; eval $ac_try 2>&5; } +ac_err=`tr -d '\015' < conftest.out | grep -v '^ *+' | grep -v "^conftest.${ac_ext}\$"` +if test -z "$ac_err"; then + rm -rf conftest* + eval "ac_cv_header_$ac_safe=yes" +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_header_$ac_safe=no" +fi +rm -f conftest* +fi +if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then + eval echo "$ac_t""yes" 1>&6 + ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` + cat >> confdefs.h <&6 +fi +done + +for ac_hdr in unistd.h +do +ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` +echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 +echo "configure:5449: checking for $ac_hdr" >&5 +if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ eval echo configure:5459: \"$ac_try\" 1>&5; eval $ac_try 2>&5; } +ac_err=`tr -d '\015' < conftest.out | grep -v '^ *+' | grep -v "^conftest.${ac_ext}\$"` +if test -z "$ac_err"; then + rm -rf conftest* + eval "ac_cv_header_$ac_safe=yes" +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_header_$ac_safe=no" +fi +rm -f conftest* +fi +if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then + eval echo "$ac_t""yes" 1>&6 + ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` + cat >> confdefs.h <&6 +fi +done + +for ac_hdr in wait.h +do +ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` +echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 +echo "configure:5489: checking for $ac_hdr" >&5 +if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ eval echo configure:5499: \"$ac_try\" 1>&5; eval $ac_try 2>&5; } +ac_err=`tr -d '\015' < conftest.out | grep -v '^ *+' | grep -v "^conftest.${ac_ext}\$"` +if test -z "$ac_err"; then + rm -rf conftest* + eval "ac_cv_header_$ac_safe=yes" +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_header_$ac_safe=no" +fi +rm -f conftest* +fi +if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then + eval echo "$ac_t""yes" 1>&6 + ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` + cat >> confdefs.h <&6 +fi +done + +echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6 +echo "configure:5526: checking for sys/wait.h that is POSIX.1 compatible" >&5 +if eval "test \"`echo '$''{'ac_cv_header_sys_wait_h'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +#include +#ifndef WEXITSTATUS +#define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8) +#endif +#ifndef WIFEXITED +#define WIFEXITED(stat_val) (((stat_val) & 255) == 0) +#endif +int main() { +int s; +wait (&s); +s = WIFEXITED (s) ? WEXITSTATUS (s) : 1; +; return 0; } +EOF +if { eval echo configure:5547: \"$ac_compile\" 1>&5; eval $ac_compile 2>&5; }; then + rm -rf conftest* + ac_cv_header_sys_wait_h=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + ac_cv_header_sys_wait_h=no +fi +rm -f conftest* +fi + +eval echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6 +if test $ac_cv_header_sys_wait_h = yes; then + cat >> confdefs.h <<\EOF +#define HAVE_SYS_WAIT_H 1 +EOF + +fi + +echo $ac_n "checking for errno definition in errno.h""... $ac_c" 1>&6 +echo "configure:5568: checking for errno definition in errno.h" >&5 +if eval "test \"`echo '$''{'ac_cv_header_errno_def'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +int main() { +errno = 0; +; return 0; } +EOF +if { eval echo configure:5580: \"$ac_compile\" 1>&5; eval $ac_compile 2>&5; }; then + rm -rf conftest* + ac_cv_header_errno_def=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + ac_cv_header_errno_def=no +fi +rm -f conftest* +fi + +eval echo "$ac_t""$ac_cv_header_errno_def" 1>&6 +if test $ac_cv_header_errno_def = yes; then + cat >> confdefs.h <<\EOF +#define HAVE_ERRNO_DEF 1 +EOF + +fi +echo $ac_n "checking for SVr4 compliant waitpid() with WNOWAIT support""... $ac_c" 1>&6 +echo "configure:5600: checking for SVr4 compliant waitpid() with WNOWAIT support" >&5 +if eval "test \"`echo '$''{'ac_cv_wnowait_waitpid'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test "$cross_compiling" = yes; then + { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } +else + cat > conftest.$ac_ext < +#endif +#ifdef HAVE_UNISTD_H +#include +#endif +#if defined(HAVE_WAIT_H) +# include +#else +#include +#endif +#include +#ifndef HAVE_ERRNO_DEF +extern int errno; +#endif + +int +main() +{ + int xstat; + pid_t pid = -1; + int ret; + + ret = waitpid(pid, &xstat, WNOWAIT); + if (ret < 0 && errno == EINVAL) + exit(1); + exit(0); +} +EOF +if { eval echo configure:5640: \"$ac_link\" 1>&5; eval $ac_link 2>&5; } && test -s conftest${ac_exeext} && ($rmtcall ./conftest${ac_xexeext}; exit) 2>/dev/null +then + ac_cv_wnowait_waitpid=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* + ac_cv_wnowait_waitpid=no +fi +rm -fr conftest* +fi + +fi + +eval echo "$ac_t""$ac_cv_wnowait_waitpid" 1>&6 +if test $ac_cv_wnowait_waitpid = yes; then + cat >> confdefs.h <<\EOF +#define HAVE_WNOWAIT_WAITPID 1 +EOF + +fi + +echo $ac_n "checking for working const""... $ac_c" 1>&6 +echo "configure:5663: checking for working const" >&5 +if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext <j = 5; +} +{ /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ + const int foo = 10; +} + +; return 0; } +EOF +if { eval echo configure:5717: \"$ac_compile\" 1>&5; eval $ac_compile 2>&5; }; then + rm -rf conftest* + ac_cv_c_const=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + ac_cv_c_const=no +fi +rm -f conftest* +fi + +eval echo "$ac_t""$ac_cv_c_const" 1>&6 +if test $ac_cv_c_const = no; then + cat >> confdefs.h <<\EOF +#define const +EOF + +fi + +echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6 +echo "configure:5738: checking whether byte ordering is bigendian" >&5 +if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_cv_c_bigendian=unknown +# See if sys/param.h defines the BYTE_ORDER macro. +cat > conftest.$ac_ext < +#include +int main() { + +#if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN + bogus endian macros +#endif +; return 0; } +EOF +if { eval echo configure:5756: \"$ac_compile\" 1>&5; eval $ac_compile 2>&5; }; then + rm -rf conftest* + # It does; now see whether it defined to BIG_ENDIAN or not. +cat > conftest.$ac_ext < +#include +int main() { + +#if BYTE_ORDER != BIG_ENDIAN + not big endian +#endif +; return 0; } +EOF +if { eval echo configure:5771: \"$ac_compile\" 1>&5; eval $ac_compile 2>&5; }; then + rm -rf conftest* + ac_cv_c_bigendian=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + ac_cv_c_bigendian=no +fi +rm -f conftest* +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 +fi +rm -f conftest* +if test $ac_cv_c_bigendian = unknown; then +if test "$cross_compiling" = yes; then + { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } +else + cat > conftest.$ac_ext <&5; eval $ac_link 2>&5; } && test -s conftest${ac_exeext} && ($rmtcall ./conftest${ac_xexeext}; exit) 2>/dev/null +then + ac_cv_c_bigendian=no +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* + ac_cv_c_bigendian=yes +fi +rm -fr conftest* +fi + +fi +fi + +eval echo "$ac_t""$ac_cv_c_bigendian" 1>&6 +if test $ac_cv_c_bigendian = yes; then + cat >> confdefs.h <<\EOF +#define WORDS_BIGENDIAN 1 +EOF + +fi + +echo $ac_n "checking whether bitorder in bitfields is htol""... $ac_c" 1>&6 +echo "configure:5828: checking whether bitorder in bitfields is htol" >&5 +if eval "test \"`echo '$''{'ac_cv_c_bitfields_htol'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test "$cross_compiling" = yes; then + { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } +else + cat > conftest.$ac_ext <&5; eval $ac_link 2>&5; } && test -s conftest${ac_exeext} && ($rmtcall ./conftest${ac_xexeext}; exit) 2>/dev/null +then + ac_cv_c_bitfields_htol=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* + ac_cv_c_bitfields_htol=no +fi +rm -fr conftest* +fi + +fi + +eval echo "$ac_t""$ac_cv_c_bitfields_htol" 1>&6 +if test $ac_cv_c_bitfields_htol = yes; then + cat >> confdefs.h <<\EOF +#define BITFIELDS_HTOL 1 +EOF + +fi + + +echo $ac_n "checking for preprocessor stringizing operator""... $ac_c" 1>&6 +echo "configure:5876: checking for preprocessor stringizing operator" >&5 +if eval "test \"`echo '$''{'ac_cv_c_stringize'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext <&5 | + egrep "#teststring" >/dev/null 2>&1; then + rm -rf conftest* + ac_cv_c_stringize=no +else + rm -rf conftest* + ac_cv_c_stringize=yes +fi +rm -f conftest* + +fi + +if test "${ac_cv_c_stringize}" = yes +then + cat >> confdefs.h <<\EOF +#define HAVE_STRINGIZE 1 +EOF + +fi +eval echo "$ac_t""${ac_cv_c_stringize}" 1>&6 + +echo $ac_n "checking for inline""... $ac_c" 1>&6 +echo "configure:5911: checking for inline" >&5 +if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_cv_c_inline=no +for ac_kw in inline __inline__ __inline; do + cat > conftest.$ac_ext <&5; eval $ac_compile 2>&5; }; then + rm -rf conftest* + ac_cv_c_inline=$ac_kw; break +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 +fi +rm -f conftest* +done + +fi + +eval echo "$ac_t""$ac_cv_c_inline" 1>&6 +case "$ac_cv_c_inline" in + inline | yes) + cat >> confdefs.h <<\EOF +#define HAVE_INLINE 1 +EOF + + ;; + no) cat >> confdefs.h <<\EOF +#define inline +EOF + + ;; + *) cat >> confdefs.h <> confdefs.h <<\EOF +#define HAVE_INLINE 1 +EOF + + ;; +esac + +echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6 +echo "configure:5962: checking return type of signal handlers" >&5 +if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +#include +#ifdef signal +#undef signal +#endif +#ifdef __cplusplus +extern "C" void (*signal (int, void (*)(int)))(int); +#else +void (*signal ()) (); +#endif + +int main() { +int i; +; return 0; } +EOF +if { eval echo configure:5984: \"$ac_compile\" 1>&5; eval $ac_compile 2>&5; }; then + rm -rf conftest* + ac_cv_type_signal=void +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + ac_cv_type_signal=int +fi +rm -f conftest* +fi + +eval echo "$ac_t""$ac_cv_type_signal" 1>&6 +cat >> confdefs.h <&6 +echo "configure:6003: checking for uid_t in sys/types.h" >&5 +if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +EOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + egrep "uid_t" >/dev/null 2>&1; then + rm -rf conftest* + ac_cv_type_uid_t=yes +else + rm -rf conftest* + ac_cv_type_uid_t=no +fi +rm -f conftest* + +fi + +eval echo "$ac_t""$ac_cv_type_uid_t" 1>&6 +if test $ac_cv_type_uid_t = no; then + cat >> confdefs.h <<\EOF +#define uid_t int +EOF + + cat >> confdefs.h <<\EOF +#define gid_t int +EOF + +fi + +echo $ac_n "checking type of array argument to getgroups""... $ac_c" 1>&6 +echo "configure:6037: checking type of array argument to getgroups" >&5 +if eval "test \"`echo '$''{'ac_cv_type_getgroups'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test "$cross_compiling" = yes; then + ac_cv_type_getgroups=cross +else + cat > conftest.$ac_ext < +#define NGID 256 +#undef MAX +#define MAX(x, y) ((x) > (y) ? (x) : (y)) +main() +{ + gid_t gidset[NGID]; + int i, n; + union { gid_t gval; long lval; } val; + + val.lval = -1; + for (i = 0; i < NGID; i++) + gidset[i] = val.gval; + n = getgroups (sizeof (gidset) / MAX (sizeof (int), sizeof (gid_t)) - 1, + gidset); + /* Exit non-zero if getgroups seems to require an array of ints. This + happens when gid_t is short but getgroups modifies an array of ints. */ + exit ((n > 0 && gidset[n] != val.gval) ? 1 : 0); +} + +EOF +if { eval echo configure:6070: \"$ac_link\" 1>&5; eval $ac_link 2>&5; } && test -s conftest${ac_exeext} && ($rmtcall ./conftest${ac_xexeext}; exit) 2>/dev/null +then + ac_cv_type_getgroups=gid_t +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* + ac_cv_type_getgroups=int +fi +rm -fr conftest* +fi + +if test $ac_cv_type_getgroups = cross; then + cat > conftest.$ac_ext < +EOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + egrep "getgroups.*int.*gid_t" >/dev/null 2>&1; then + rm -rf conftest* + ac_cv_type_getgroups=gid_t +else + rm -rf conftest* + ac_cv_type_getgroups=int +fi +rm -f conftest* + +fi +fi + +eval echo "$ac_t""$ac_cv_type_getgroups" 1>&6 +cat >> confdefs.h <&6 +echo "configure:6108: checking for type long long" >&5 +if eval "test \"`echo '$''{'ac_cv_type_longlong'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext <&5; eval $ac_compile 2>&5; }; then + rm -rf conftest* + ac_cv_type_longlong=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + ac_cv_type_longlong=no +fi +rm -f conftest* +fi + +eval echo "$ac_t""$ac_cv_type_longlong" 1>&6 +if test $ac_cv_type_longlong = yes; then + cat >> confdefs.h <<\EOF +#define HAVE_LONGLONG 1 +EOF + +fi +echo $ac_n "checking for type __int64""... $ac_c" 1>&6 +echo "configure:6140: checking for type __int64" >&5 +if eval "test \"`echo '$''{'ac_cv_type___int64'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext <&5; eval $ac_compile 2>&5; }; then + rm -rf conftest* + ac_cv_type___int64=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + ac_cv_type___int64=no +fi +rm -f conftest* +fi + +eval echo "$ac_t""$ac_cv_type___int64" 1>&6 +if test $ac_cv_type___int64 = yes; then + cat >> confdefs.h <<\EOF +#define HAVE___INT64 1 +EOF + +fi +echo $ac_n "checking for type long double""... $ac_c" 1>&6 +echo "configure:6172: checking for type long double" >&5 +if eval "test \"`echo '$''{'ac_cv_type_longdouble'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext <&5; eval $ac_compile 2>&5; }; then + rm -rf conftest* + ac_cv_type_longdouble=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + ac_cv_type_longdouble=no +fi +rm -f conftest* +fi + +eval echo "$ac_t""$ac_cv_type_longdouble" 1>&6 +if test $ac_cv_type_longdouble = yes; then + cat >> confdefs.h <<\EOF +#define HAVE_LONGDOUBLE 1 +EOF + +fi +echo $ac_n "checking for prototypes""... $ac_c" 1>&6 +echo "configure:6204: checking for prototypes" >&5 +if eval "test \"`echo '$''{'ac_cv_type_prototypes'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test "$cross_compiling" = yes; then + { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } +else + cat > conftest.$ac_ext <&5; eval $ac_link 2>&5; } && test -s conftest${ac_exeext} && ($rmtcall ./conftest${ac_xexeext}; exit) 2>/dev/null +then + ac_cv_type_prototypes=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* + ac_cv_type_prototypes=no +fi +rm -fr conftest* +fi + +fi + +eval echo "$ac_t""$ac_cv_type_prototypes" 1>&6 +if test $ac_cv_type_prototypes = yes; then + cat >> confdefs.h <<\EOF +#define PROTOTYPES 1 +EOF + +fi +echo $ac_n "checking if compiler allows dynamic arrays""... $ac_c" 1>&6 +echo "configure:6244: checking if compiler allows dynamic arrays" >&5 +if eval "test \"`echo '$''{'ac_cv_dyn_arrays'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext <&5; eval $ac_compile 2>&5; }; then + rm -rf conftest* + ac_cv_dyn_arrays=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + ac_cv_dyn_arrays=no +fi +rm -f conftest* +fi + +eval echo "$ac_t""$ac_cv_dyn_arrays" 1>&6 +if test $ac_cv_dyn_arrays = yes; then + cat >> confdefs.h <<\EOF +#define HAVE_DYN_ARRAYS 1 +EOF + +fi +echo $ac_n "checking if compiler allows pragma weak""... $ac_c" 1>&6 +echo "configure:6276: checking if compiler allows pragma weak" >&5 +if eval "test \"`echo '$''{'ac_cv_pragma_weak'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext <&5; eval $ac_link 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + ac_cv_pragma_weak=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + ac_cv_pragma_weak=no +fi +rm -f conftest* +fi + +eval echo "$ac_t""$ac_cv_pragma_weak" 1>&6 +if test $ac_cv_pragma_weak = yes; then + cat >> confdefs.h <<\EOF +#define HAVE_PRAGMA_WEAK 1 +EOF + +fi + + +if test $ac_cv_pragma_weak = yes; then +cat > conftest2.$ac_ext <&5; eval $ac_compile2 2>&5; }; then + true + +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 +true +fi + +ac_save_LIBS="$LIBS" +LIBS="conftest2.$ac_cv_objext" +echo $ac_n "checking if linker allows pragma weak""... $ac_c" 1>&6 +echo "configure:6332: checking if linker allows pragma weak" >&5 +if eval "test \"`echo '$''{'ac_cv_link_weak'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext <&5; eval $ac_link 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + ac_cv_link_weak=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + ac_cv_link_weak=no +fi +rm -f conftest* +fi + +eval echo "$ac_t""$ac_cv_link_weak" 1>&6 +LIBS="$ac_save_LIBS" +if test $ac_cv_link_weak = yes; then + cat >> confdefs.h <<\EOF +#define HAVE_LINK_WEAK 1 +EOF + +fi +rm -f conftest2.* +fi + +echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6 +echo "configure:6368: checking for uid_t in sys/types.h" >&5 +if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +EOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + egrep "uid_t" >/dev/null 2>&1; then + rm -rf conftest* + ac_cv_type_uid_t=yes +else + rm -rf conftest* + ac_cv_type_uid_t=no +fi +rm -f conftest* + +fi + +eval echo "$ac_t""$ac_cv_type_uid_t" 1>&6 +if test $ac_cv_type_uid_t = no; then + cat >> confdefs.h <<\EOF +#define uid_t int +EOF + + cat >> confdefs.h <<\EOF +#define gid_t int +EOF + +fi + +echo $ac_n "checking for size_t""... $ac_c" 1>&6 +echo "configure:6402: checking for size_t" >&5 +if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +#if HAVE_STDLIB_H || STDC_HEADERS +#include +#endif +#if HAVE_STDDEF_H || STDC_HEADERS +#include +#endif +EOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then + rm -rf conftest* + ac_cv_type_size_t=yes +else + rm -rf conftest* + ac_cv_type_size_t=no +fi +rm -f conftest* + +fi +eval echo "$ac_t""$ac_cv_type_size_t" 1>&6 +if test $ac_cv_type_size_t = no; then + cat >> confdefs.h <<\EOF +#define size_t unsigned +EOF + +fi + +echo $ac_n "checking for ssize_t""... $ac_c" 1>&6 +echo "configure:6437: checking for ssize_t" >&5 +if eval "test \"`echo '$''{'ac_cv_type_ssize_t'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +#if HAVE_STDLIB_H || STDC_HEADERS +#include +#endif +#if HAVE_STDDEF_H || STDC_HEADERS +#include +#endif +EOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + egrep "(^|[^a-zA-Z_0-9])ssize_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then + rm -rf conftest* + ac_cv_type_ssize_t=yes +else + rm -rf conftest* + ac_cv_type_ssize_t=no +fi +rm -f conftest* + +fi +eval echo "$ac_t""$ac_cv_type_ssize_t" 1>&6 +if test $ac_cv_type_ssize_t = no; then + cat >> confdefs.h <<\EOF +#define ssize_t int +EOF + +fi + +echo $ac_n "checking for ptrdiff_t""... $ac_c" 1>&6 +echo "configure:6472: checking for ptrdiff_t" >&5 +if eval "test \"`echo '$''{'ac_cv_type_ptrdiff_t'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +#if HAVE_STDLIB_H || STDC_HEADERS +#include +#endif +#if HAVE_STDDEF_H || STDC_HEADERS +#include +#endif +EOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + egrep "(^|[^a-zA-Z_0-9])ptrdiff_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then + rm -rf conftest* + ac_cv_type_ptrdiff_t=yes +else + rm -rf conftest* + ac_cv_type_ptrdiff_t=no +fi +rm -f conftest* + +fi +eval echo "$ac_t""$ac_cv_type_ptrdiff_t" 1>&6 +if test $ac_cv_type_ptrdiff_t = no; then + cat >> confdefs.h <<\EOF +#define ptrdiff_t int +EOF + +fi + +echo $ac_n "checking for pid_t""... $ac_c" 1>&6 +echo "configure:6507: checking for pid_t" >&5 +if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +#if HAVE_STDLIB_H || STDC_HEADERS +#include +#endif +#if HAVE_STDDEF_H || STDC_HEADERS +#include +#endif +EOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then + rm -rf conftest* + ac_cv_type_pid_t=yes +else + rm -rf conftest* + ac_cv_type_pid_t=no +fi +rm -f conftest* + +fi +eval echo "$ac_t""$ac_cv_type_pid_t" 1>&6 +if test $ac_cv_type_pid_t = no; then + cat >> confdefs.h <<\EOF +#define pid_t int +EOF + +fi + +echo $ac_n "checking for off_t""... $ac_c" 1>&6 +echo "configure:6542: checking for off_t" >&5 +if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +#if HAVE_STDLIB_H || STDC_HEADERS +#include +#endif +#if HAVE_STDDEF_H || STDC_HEADERS +#include +#endif +EOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then + rm -rf conftest* + ac_cv_type_off_t=yes +else + rm -rf conftest* + ac_cv_type_off_t=no +fi +rm -f conftest* + +fi +eval echo "$ac_t""$ac_cv_type_off_t" 1>&6 +if test $ac_cv_type_off_t = no; then + cat >> confdefs.h <<\EOF +#define off_t long +EOF + +fi + +echo $ac_n "checking for mode_t""... $ac_c" 1>&6 +echo "configure:6577: checking for mode_t" >&5 +if eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +#if HAVE_STDLIB_H || STDC_HEADERS +#include +#endif +#if HAVE_STDDEF_H || STDC_HEADERS +#include +#endif +EOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then + rm -rf conftest* + ac_cv_type_mode_t=yes +else + rm -rf conftest* + ac_cv_type_mode_t=no +fi +rm -f conftest* + +fi +eval echo "$ac_t""$ac_cv_type_mode_t" 1>&6 +if test $ac_cv_type_mode_t = no; then + cat >> confdefs.h <<\EOF +#define mode_t int +EOF + +fi + +echo $ac_n "checking for time_t""... $ac_c" 1>&6 +echo "configure:6612: checking for time_t" >&5 +if eval "test \"`echo '$''{'ac_cv_type_time_t'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +#ifdef TIME_WITH_SYS_TIME_H +# include +# include +#else +#ifdef HAVE_SYS_TIME_H +# include +#else +# include +#endif +#endif +int main() { +time_t t; +; return 0; } +EOF +if { eval echo configure:6635: \"$ac_compile\" 1>&5; eval $ac_compile 2>&5; }; then + rm -rf conftest* + ac_cv_type_time_t=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + ac_cv_type_time_t=no +fi +rm -f conftest* +fi + +eval echo "$ac_t""$ac_cv_type_time_t" 1>&6 +if test $ac_cv_type_time_t = no; then + cat >> confdefs.h <<\EOF +#define time_t long +EOF + +fi +echo $ac_n "checking for caddr_t""... $ac_c" 1>&6 +echo "configure:6655: checking for caddr_t" >&5 +if eval "test \"`echo '$''{'ac_cv_type_caddr_t'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +#if HAVE_STDLIB_H || STDC_HEADERS +#include +#endif +#if HAVE_STDDEF_H || STDC_HEADERS +#include +#endif +EOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + egrep "(^|[^a-zA-Z_0-9])caddr_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then + rm -rf conftest* + ac_cv_type_caddr_t=yes +else + rm -rf conftest* + ac_cv_type_caddr_t=no +fi +rm -f conftest* + +fi +eval echo "$ac_t""$ac_cv_type_caddr_t" 1>&6 +if test $ac_cv_type_caddr_t = no; then + cat >> confdefs.h <<\EOF +#define caddr_t char * +EOF + +fi + +echo $ac_n "checking for daddr_t""... $ac_c" 1>&6 +echo "configure:6690: checking for daddr_t" >&5 +if eval "test \"`echo '$''{'ac_cv_type_daddr_t'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +#if HAVE_STDLIB_H || STDC_HEADERS +#include +#endif +#if HAVE_STDDEF_H || STDC_HEADERS +#include +#endif +EOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + egrep "(^|[^a-zA-Z_0-9])daddr_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then + rm -rf conftest* + ac_cv_type_daddr_t=yes +else + rm -rf conftest* + ac_cv_type_daddr_t=no +fi +rm -f conftest* + +fi +eval echo "$ac_t""$ac_cv_type_daddr_t" 1>&6 +if test $ac_cv_type_daddr_t = no; then + cat >> confdefs.h <<\EOF +#define daddr_t long +EOF + +fi + +echo $ac_n "checking for dev_t""... $ac_c" 1>&6 +echo "configure:6725: checking for dev_t" >&5 +if eval "test \"`echo '$''{'ac_cv_type_dev_t'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +#if HAVE_STDLIB_H || STDC_HEADERS +#include +#endif +#if HAVE_STDDEF_H || STDC_HEADERS +#include +#endif +EOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + egrep "(^|[^a-zA-Z_0-9])dev_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then + rm -rf conftest* + ac_cv_type_dev_t=yes +else + rm -rf conftest* + ac_cv_type_dev_t=no +fi +rm -f conftest* + +fi +eval echo "$ac_t""$ac_cv_type_dev_t" 1>&6 +if test $ac_cv_type_dev_t = no; then + cat >> confdefs.h <<\EOF +#define dev_t unsigned short +EOF + +fi + +echo $ac_n "checking for major_t""... $ac_c" 1>&6 +echo "configure:6760: checking for major_t" >&5 +if eval "test \"`echo '$''{'ac_cv_type_major_t'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +#if HAVE_STDLIB_H || STDC_HEADERS +#include +#endif +#if HAVE_STDDEF_H || STDC_HEADERS +#include +#endif +EOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + egrep "(^|[^a-zA-Z_0-9])major_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then + rm -rf conftest* + ac_cv_type_major_t=yes +else + rm -rf conftest* + ac_cv_type_major_t=no +fi +rm -f conftest* + +fi +eval echo "$ac_t""$ac_cv_type_major_t" 1>&6 +if test $ac_cv_type_major_t = no; then + cat >> confdefs.h <<\EOF +#define major_t dev_t +EOF + +fi + +echo $ac_n "checking for minor_t""... $ac_c" 1>&6 +echo "configure:6795: checking for minor_t" >&5 +if eval "test \"`echo '$''{'ac_cv_type_minor_t'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +#if HAVE_STDLIB_H || STDC_HEADERS +#include +#endif +#if HAVE_STDDEF_H || STDC_HEADERS +#include +#endif +EOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + egrep "(^|[^a-zA-Z_0-9])minor_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then + rm -rf conftest* + ac_cv_type_minor_t=yes +else + rm -rf conftest* + ac_cv_type_minor_t=no +fi +rm -f conftest* + +fi +eval echo "$ac_t""$ac_cv_type_minor_t" 1>&6 +if test $ac_cv_type_minor_t = no; then + cat >> confdefs.h <<\EOF +#define minor_t dev_t +EOF + +fi + +echo $ac_n "checking for ino_t""... $ac_c" 1>&6 +echo "configure:6830: checking for ino_t" >&5 +if eval "test \"`echo '$''{'ac_cv_type_ino_t'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +#if HAVE_STDLIB_H || STDC_HEADERS +#include +#endif +#if HAVE_STDDEF_H || STDC_HEADERS +#include +#endif +EOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + egrep "(^|[^a-zA-Z_0-9])ino_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then + rm -rf conftest* + ac_cv_type_ino_t=yes +else + rm -rf conftest* + ac_cv_type_ino_t=no +fi +rm -f conftest* + +fi +eval echo "$ac_t""$ac_cv_type_ino_t" 1>&6 +if test $ac_cv_type_ino_t = no; then + cat >> confdefs.h <<\EOF +#define ino_t unsigned long +EOF + +fi + +echo $ac_n "checking for nlink_t""... $ac_c" 1>&6 +echo "configure:6865: checking for nlink_t" >&5 +if eval "test \"`echo '$''{'ac_cv_type_nlink_t'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +#if HAVE_STDLIB_H || STDC_HEADERS +#include +#endif +#if HAVE_STDDEF_H || STDC_HEADERS +#include +#endif +EOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + egrep "(^|[^a-zA-Z_0-9])nlink_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then + rm -rf conftest* + ac_cv_type_nlink_t=yes +else + rm -rf conftest* + ac_cv_type_nlink_t=no +fi +rm -f conftest* + +fi +eval echo "$ac_t""$ac_cv_type_nlink_t" 1>&6 +if test $ac_cv_type_nlink_t = no; then + cat >> confdefs.h <<\EOF +#define nlink_t unsigned long +EOF + +fi + +echo $ac_n "checking for blksize_t""... $ac_c" 1>&6 +echo "configure:6900: checking for blksize_t" >&5 +if eval "test \"`echo '$''{'ac_cv_type_blksize_t'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +#if HAVE_STDLIB_H || STDC_HEADERS +#include +#endif +#if HAVE_STDDEF_H || STDC_HEADERS +#include +#endif +EOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + egrep "(^|[^a-zA-Z_0-9])blksize_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then + rm -rf conftest* + ac_cv_type_blksize_t=yes +else + rm -rf conftest* + ac_cv_type_blksize_t=no +fi +rm -f conftest* + +fi +eval echo "$ac_t""$ac_cv_type_blksize_t" 1>&6 +if test $ac_cv_type_blksize_t = no; then + cat >> confdefs.h <<\EOF +#define blksize_t long +EOF + +fi + +echo $ac_n "checking for blkcnt_t""... $ac_c" 1>&6 +echo "configure:6935: checking for blkcnt_t" >&5 +if eval "test \"`echo '$''{'ac_cv_type_blkcnt_t'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +#if HAVE_STDLIB_H || STDC_HEADERS +#include +#endif +#if HAVE_STDDEF_H || STDC_HEADERS +#include +#endif +EOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + egrep "(^|[^a-zA-Z_0-9])blkcnt_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then + rm -rf conftest* + ac_cv_type_blkcnt_t=yes +else + rm -rf conftest* + ac_cv_type_blkcnt_t=no +fi +rm -f conftest* + +fi +eval echo "$ac_t""$ac_cv_type_blkcnt_t" 1>&6 +if test $ac_cv_type_blkcnt_t = no; then + cat >> confdefs.h <<\EOF +#define blkcnt_t Intmax_t +EOF + +fi + +echo $ac_n "checking for clock_t""... $ac_c" 1>&6 +echo "configure:6970: checking for clock_t" >&5 +if eval "test \"`echo '$''{'ac_cv_type_clock_t'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +/* + * time.h is needed because of a bug in Next Step. + * Next Step needs time.h for clock_t + */ +#ifdef TIME_WITH_SYS_TIME +# ifndef _INCL_SYS_TIME_H +# include +# define _INCL_SYS_TIME_H +# endif +# ifndef _INCL_TIME_H +# include +# define _INCL_TIME_H +# endif +#else +#ifdef HAVE_SYS_TIME_H +# ifndef _INCL_SYS_TIME_H +# include +# define _INCL_SYS_TIME_H +# endif +#else +# ifndef _INCL_TIME_H +# include +# define _INCL_TIME_H +# endif +#endif +#endif +#ifdef HAVE_SYS_TIMES_H +#include +#endif + +int main() { +clock_t t; +; return 0; } +EOF +if { eval echo configure:7013: \"$ac_compile\" 1>&5; eval $ac_compile 2>&5; }; then + rm -rf conftest* + ac_cv_type_clock_t=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + ac_cv_type_clock_t=no +fi +rm -f conftest* +fi + +eval echo "$ac_t""$ac_cv_type_clock_t" 1>&6 +if test $ac_cv_type_clock_t = no; then + cat >> confdefs.h <<\EOF +#define clock_t long +EOF + +fi +echo $ac_n "checking for socklen_t""... $ac_c" 1>&6 +echo "configure:7033: checking for socklen_t" >&5 +if eval "test \"`echo '$''{'ac_cv_type_socklen_t'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +#if HAVE_STDLIB_H || STDC_HEADERS +#include +#endif +#if HAVE_STDDEF_H || STDC_HEADERS +#include +#endif +#include +EOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + egrep "(^|[^a-zA-Z_0-9])socklen_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then + rm -rf conftest* + ac_cv_type_socklen_t=yes +else + rm -rf conftest* + ac_cv_type_socklen_t=no +fi +rm -f conftest* + +fi +eval echo "$ac_t""$ac_cv_type_socklen_t" 1>&6 +if test $ac_cv_type_socklen_t = no; then + cat >> confdefs.h <<\EOF +#define socklen_t int +EOF + +fi +echo $ac_n "checking for greg_t""... $ac_c" 1>&6 +echo "configure:7068: checking for greg_t" >&5 +if eval "test \"`echo '$''{'ac_cv_have_type_greg_t'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +#if HAVE_STDLIB_H || STDC_HEADERS +#include +#endif +#if HAVE_STDDEF_H || STDC_HEADERS +#include +#endif +#include +EOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + egrep "(^|[^a-zA-Z_0-9])greg_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then + rm -rf conftest* + eval ac_cv_have_type_greg_t=yes +else + rm -rf conftest* + eval ac_cv_have_type_greg_t=no +fi +rm -f conftest* + +fi +eval echo "$ac_t""$ac_cv_have_type_greg_t" 1>&6 + ac_tr_type=HAVE_TYPE_`echo greg_t | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` +if test $ac_cv_have_type_greg_t = yes; then + cat >> confdefs.h <&6 +echo "configure:7105: checking for rlim_t" >&5 +if eval "test \"`echo '$''{'ac_cv_have_type_rlim_t'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +#if HAVE_STDLIB_H || STDC_HEADERS +#include +#endif +#if HAVE_STDDEF_H || STDC_HEADERS +#include +#endif +#include +EOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + egrep "(^|[^a-zA-Z_0-9])rlim_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then + rm -rf conftest* + eval ac_cv_have_type_rlim_t=yes +else + rm -rf conftest* + eval ac_cv_have_type_rlim_t=no +fi +rm -f conftest* + +fi +eval echo "$ac_t""$ac_cv_have_type_rlim_t" 1>&6 + ac_tr_type=HAVE_TYPE_`echo rlim_t | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` +if test $ac_cv_have_type_rlim_t = yes; then + cat >> confdefs.h <&6 +echo "configure:7142: checking if idtype_t is declared correctly in wait.h" >&5 +if eval "test \"`echo '$''{'ac_cv_have_type_idtype_t'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +#else +#include +#endif +int main() { +idtype_t idt; idt = P_ALL; idt = P_PGID; idt = P_PID; exit (idt == P_PID); +; return 0; } +EOF +if { eval echo configure:7159: \"$ac_compile\" 1>&5; eval $ac_compile 2>&5; }; then + rm -rf conftest* + ac_cv_have_type_idtype_t=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + ac_cv_have_type_idtype_t=no +fi +rm -f conftest* +fi + +eval echo "$ac_t""$ac_cv_have_type_idtype_t" 1>&6 +if test $ac_cv_have_type_idtype_t = yes; then + cat >> confdefs.h <<\EOF +#define HAVE_TYPE_IDTYPE_T 1 +EOF + +fi +echo $ac_n "checking for siginfo_t""... $ac_c" 1>&6 +echo "configure:7179: checking for siginfo_t" >&5 +if eval "test \"`echo '$''{'ac_cv_have_type_siginfo_t'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +#if HAVE_STDLIB_H || STDC_HEADERS +#include +#endif +#if HAVE_STDDEF_H || STDC_HEADERS +#include +#endif +#include +EOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + egrep "(^|[^a-zA-Z_0-9])siginfo_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then + rm -rf conftest* + eval ac_cv_have_type_siginfo_t=yes +else + rm -rf conftest* + eval ac_cv_have_type_siginfo_t=no +fi +rm -f conftest* + +fi +eval echo "$ac_t""$ac_cv_have_type_siginfo_t" 1>&6 + ac_tr_type=HAVE_TYPE_`echo siginfo_t | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` +if test $ac_cv_have_type_siginfo_t = yes; then + cat >> confdefs.h <&6 +echo "configure:7216: checking if stack_t is declared in signal.h" >&5 +if eval "test \"`echo '$''{'ac_cv_stack_t'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +int main() { +stack_t ss; ss.ss_size = 0; exit (ss.ss_size == 0); +; return 0; } +EOF +if { eval echo configure:7228: \"$ac_compile\" 1>&5; eval $ac_compile 2>&5; }; then + rm -rf conftest* + ac_cv_stack_t=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + ac_cv_stack_t=no +fi +rm -f conftest* +fi + +eval echo "$ac_t""$ac_cv_stack_t" 1>&6 +if test $ac_cv_stack_t = yes; then + cat >> confdefs.h <<\EOF +#define HAVE_STACK_T 1 +EOF + +fi +echo $ac_n "checking if siginfo_t is declared in signal.h""... $ac_c" 1>&6 +echo "configure:7248: checking if siginfo_t is declared in signal.h" >&5 +if eval "test \"`echo '$''{'ac_cv_siginfo_t'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +#ifdef HAVE_SIGINFO_H +#include +#else +#ifdef HAVE_SYS_SIGINFO_H +#include +#endif +#endif +int main() { +siginfo_t si; si.si_signo = 0; exit (si.si_signo == 0); +; return 0; } +EOF +if { eval echo configure:7267: \"$ac_compile\" 1>&5; eval $ac_compile 2>&5; }; then + rm -rf conftest* + ac_cv_siginfo_t=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + ac_cv_siginfo_t=no +fi +rm -f conftest* +fi + +eval echo "$ac_t""$ac_cv_siginfo_t" 1>&6 +if test $ac_cv_siginfo_t = yes; then + cat >> confdefs.h <<\EOF +#define HAVE_SIGINFO_T 1 +EOF + +fi + +echo $ac_n "checking for u_char""... $ac_c" 1>&6 +echo "configure:7288: checking for u_char" >&5 +if eval "test \"`echo '$''{'ac_cv_type_u_char'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +#if HAVE_STDLIB_H || STDC_HEADERS +#include +#endif +#if HAVE_STDDEF_H || STDC_HEADERS +#include +#endif +EOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + egrep "(^|[^a-zA-Z_0-9])u_char[^a-zA-Z_0-9]" >/dev/null 2>&1; then + rm -rf conftest* + ac_cv_type_u_char=yes +else + rm -rf conftest* + ac_cv_type_u_char=no +fi +rm -f conftest* + +fi +eval echo "$ac_t""$ac_cv_type_u_char" 1>&6 +if test $ac_cv_type_u_char = no; then + cat >> confdefs.h <<\EOF +#define u_char unsigned char +EOF + +fi + +echo $ac_n "checking for u_short""... $ac_c" 1>&6 +echo "configure:7323: checking for u_short" >&5 +if eval "test \"`echo '$''{'ac_cv_type_u_short'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +#if HAVE_STDLIB_H || STDC_HEADERS +#include +#endif +#if HAVE_STDDEF_H || STDC_HEADERS +#include +#endif +EOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + egrep "(^|[^a-zA-Z_0-9])u_short[^a-zA-Z_0-9]" >/dev/null 2>&1; then + rm -rf conftest* + ac_cv_type_u_short=yes +else + rm -rf conftest* + ac_cv_type_u_short=no +fi +rm -f conftest* + +fi +eval echo "$ac_t""$ac_cv_type_u_short" 1>&6 +if test $ac_cv_type_u_short = no; then + cat >> confdefs.h <<\EOF +#define u_short unsigned short +EOF + +fi + +echo $ac_n "checking for u_int""... $ac_c" 1>&6 +echo "configure:7358: checking for u_int" >&5 +if eval "test \"`echo '$''{'ac_cv_type_u_int'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +#if HAVE_STDLIB_H || STDC_HEADERS +#include +#endif +#if HAVE_STDDEF_H || STDC_HEADERS +#include +#endif +EOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + egrep "(^|[^a-zA-Z_0-9])u_int[^a-zA-Z_0-9]" >/dev/null 2>&1; then + rm -rf conftest* + ac_cv_type_u_int=yes +else + rm -rf conftest* + ac_cv_type_u_int=no +fi +rm -f conftest* + +fi +eval echo "$ac_t""$ac_cv_type_u_int" 1>&6 +if test $ac_cv_type_u_int = no; then + cat >> confdefs.h <<\EOF +#define u_int unsigned int +EOF + +fi + +echo $ac_n "checking for u_long""... $ac_c" 1>&6 +echo "configure:7393: checking for u_long" >&5 +if eval "test \"`echo '$''{'ac_cv_type_u_long'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +#if HAVE_STDLIB_H || STDC_HEADERS +#include +#endif +#if HAVE_STDDEF_H || STDC_HEADERS +#include +#endif +EOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + egrep "(^|[^a-zA-Z_0-9])u_long[^a-zA-Z_0-9]" >/dev/null 2>&1; then + rm -rf conftest* + ac_cv_type_u_long=yes +else + rm -rf conftest* + ac_cv_type_u_long=no +fi +rm -f conftest* + +fi +eval echo "$ac_t""$ac_cv_type_u_long" 1>&6 +if test $ac_cv_type_u_long = no; then + cat >> confdefs.h <<\EOF +#define u_long unsigned long +EOF + +fi + + +echo $ac_n "checking for int8_t""... $ac_c" 1>&6 +echo "configure:7429: checking for int8_t" >&5 +if eval "test \"`echo '$''{'ac_cv_type_int8_t'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +#if HAVE_STDLIB_H || STDC_HEADERS +#include +#endif +#if HAVE_STDDEF_H || STDC_HEADERS +#include +#endif +#ifdef HAVE_INTTYPES_H +#include +#endif +#ifdef HAVE_STDINT_H +#include +#endif + +EOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + egrep "(^|[^a-zA-Z_0-9])int8_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then + rm -rf conftest* + ac_cv_type_int8_t=yes +else + rm -rf conftest* + ac_cv_type_int8_t=no +fi +rm -f conftest* + +fi +eval echo "$ac_t""$ac_cv_type_int8_t" 1>&6 +if test $ac_cv_type_int8_t = no; then + cat >> confdefs.h <<\EOF +#define int8_t Int8_t +EOF + +fi + + +echo $ac_n "checking for int16_t""... $ac_c" 1>&6 +echo "configure:7472: checking for int16_t" >&5 +if eval "test \"`echo '$''{'ac_cv_type_int16_t'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +#if HAVE_STDLIB_H || STDC_HEADERS +#include +#endif +#if HAVE_STDDEF_H || STDC_HEADERS +#include +#endif +#ifdef HAVE_INTTYPES_H +#include +#endif +#ifdef HAVE_STDINT_H +#include +#endif + +EOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + egrep "(^|[^a-zA-Z_0-9])int16_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then + rm -rf conftest* + ac_cv_type_int16_t=yes +else + rm -rf conftest* + ac_cv_type_int16_t=no +fi +rm -f conftest* + +fi +eval echo "$ac_t""$ac_cv_type_int16_t" 1>&6 +if test $ac_cv_type_int16_t = no; then + cat >> confdefs.h <<\EOF +#define int16_t Int16_t +EOF + +fi + + +echo $ac_n "checking for int32_t""... $ac_c" 1>&6 +echo "configure:7515: checking for int32_t" >&5 +if eval "test \"`echo '$''{'ac_cv_type_int32_t'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +#if HAVE_STDLIB_H || STDC_HEADERS +#include +#endif +#if HAVE_STDDEF_H || STDC_HEADERS +#include +#endif +#ifdef HAVE_INTTYPES_H +#include +#endif +#ifdef HAVE_STDINT_H +#include +#endif + +EOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + egrep "(^|[^a-zA-Z_0-9])int32_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then + rm -rf conftest* + ac_cv_type_int32_t=yes +else + rm -rf conftest* + ac_cv_type_int32_t=no +fi +rm -f conftest* + +fi +eval echo "$ac_t""$ac_cv_type_int32_t" 1>&6 +if test $ac_cv_type_int32_t = no; then + cat >> confdefs.h <<\EOF +#define int32_t Int32_t +EOF + +fi + + +echo $ac_n "checking for int64_t""... $ac_c" 1>&6 +echo "configure:7558: checking for int64_t" >&5 +if eval "test \"`echo '$''{'ac_cv_type_int64_t'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +#if HAVE_STDLIB_H || STDC_HEADERS +#include +#endif +#if HAVE_STDDEF_H || STDC_HEADERS +#include +#endif +#ifdef HAVE_INTTYPES_H +#include +#endif +#ifdef HAVE_STDINT_H +#include +#endif + +EOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + egrep "(^|[^a-zA-Z_0-9])int64_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then + rm -rf conftest* + ac_cv_type_int64_t=yes +else + rm -rf conftest* + ac_cv_type_int64_t=no +fi +rm -f conftest* + +fi +eval echo "$ac_t""$ac_cv_type_int64_t" 1>&6 +if test $ac_cv_type_int64_t = no; then + cat >> confdefs.h <<\EOF +#define int64_t Int64_t +EOF + +fi + + +echo $ac_n "checking for intmax_t""... $ac_c" 1>&6 +echo "configure:7601: checking for intmax_t" >&5 +if eval "test \"`echo '$''{'ac_cv_type_intmax_t'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +#if HAVE_STDLIB_H || STDC_HEADERS +#include +#endif +#if HAVE_STDDEF_H || STDC_HEADERS +#include +#endif +#ifdef HAVE_INTTYPES_H +#include +#endif +#ifdef HAVE_STDINT_H +#include +#endif + +EOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + egrep "(^|[^a-zA-Z_0-9])intmax_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then + rm -rf conftest* + ac_cv_type_intmax_t=yes +else + rm -rf conftest* + ac_cv_type_intmax_t=no +fi +rm -f conftest* + +fi +eval echo "$ac_t""$ac_cv_type_intmax_t" 1>&6 +if test $ac_cv_type_intmax_t = no; then + cat >> confdefs.h <<\EOF +#define intmax_t Intmax_t +EOF + +fi + + +echo $ac_n "checking for intptr_t""... $ac_c" 1>&6 +echo "configure:7644: checking for intptr_t" >&5 +if eval "test \"`echo '$''{'ac_cv_type_intptr_t'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +#if HAVE_STDLIB_H || STDC_HEADERS +#include +#endif +#if HAVE_STDDEF_H || STDC_HEADERS +#include +#endif +#ifdef HAVE_INTTYPES_H +#include +#endif +#ifdef HAVE_STDINT_H +#include +#endif + +EOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + egrep "(^|[^a-zA-Z_0-9])intptr_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then + rm -rf conftest* + ac_cv_type_intptr_t=yes +else + rm -rf conftest* + ac_cv_type_intptr_t=no +fi +rm -f conftest* + +fi +eval echo "$ac_t""$ac_cv_type_intptr_t" 1>&6 +if test $ac_cv_type_intptr_t = no; then + cat >> confdefs.h <<\EOF +#define intptr_t Intptr_t +EOF + +fi + + +echo $ac_n "checking for uint8_t""... $ac_c" 1>&6 +echo "configure:7687: checking for uint8_t" >&5 +if eval "test \"`echo '$''{'ac_cv_type_uint8_t'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +#if HAVE_STDLIB_H || STDC_HEADERS +#include +#endif +#if HAVE_STDDEF_H || STDC_HEADERS +#include +#endif +#ifdef HAVE_INTTYPES_H +#include +#endif +#ifdef HAVE_STDINT_H +#include +#endif + +EOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + egrep "(^|[^a-zA-Z_0-9])uint8_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then + rm -rf conftest* + ac_cv_type_uint8_t=yes +else + rm -rf conftest* + ac_cv_type_uint8_t=no +fi +rm -f conftest* + +fi +eval echo "$ac_t""$ac_cv_type_uint8_t" 1>&6 +if test $ac_cv_type_uint8_t = no; then + cat >> confdefs.h <<\EOF +#define uint8_t UInt8_t +EOF + +fi + + +echo $ac_n "checking for uint16_t""... $ac_c" 1>&6 +echo "configure:7730: checking for uint16_t" >&5 +if eval "test \"`echo '$''{'ac_cv_type_uint16_t'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +#if HAVE_STDLIB_H || STDC_HEADERS +#include +#endif +#if HAVE_STDDEF_H || STDC_HEADERS +#include +#endif +#ifdef HAVE_INTTYPES_H +#include +#endif +#ifdef HAVE_STDINT_H +#include +#endif + +EOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + egrep "(^|[^a-zA-Z_0-9])uint16_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then + rm -rf conftest* + ac_cv_type_uint16_t=yes +else + rm -rf conftest* + ac_cv_type_uint16_t=no +fi +rm -f conftest* + +fi +eval echo "$ac_t""$ac_cv_type_uint16_t" 1>&6 +if test $ac_cv_type_uint16_t = no; then + cat >> confdefs.h <<\EOF +#define uint16_t UInt16_t +EOF + +fi + + +echo $ac_n "checking for uint32_t""... $ac_c" 1>&6 +echo "configure:7773: checking for uint32_t" >&5 +if eval "test \"`echo '$''{'ac_cv_type_uint32_t'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +#if HAVE_STDLIB_H || STDC_HEADERS +#include +#endif +#if HAVE_STDDEF_H || STDC_HEADERS +#include +#endif +#ifdef HAVE_INTTYPES_H +#include +#endif +#ifdef HAVE_STDINT_H +#include +#endif + +EOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + egrep "(^|[^a-zA-Z_0-9])uint32_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then + rm -rf conftest* + ac_cv_type_uint32_t=yes +else + rm -rf conftest* + ac_cv_type_uint32_t=no +fi +rm -f conftest* + +fi +eval echo "$ac_t""$ac_cv_type_uint32_t" 1>&6 +if test $ac_cv_type_uint32_t = no; then + cat >> confdefs.h <<\EOF +#define uint32_t UInt32_t +EOF + +fi + + +echo $ac_n "checking for uint64_t""... $ac_c" 1>&6 +echo "configure:7816: checking for uint64_t" >&5 +if eval "test \"`echo '$''{'ac_cv_type_uint64_t'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +#if HAVE_STDLIB_H || STDC_HEADERS +#include +#endif +#if HAVE_STDDEF_H || STDC_HEADERS +#include +#endif +#ifdef HAVE_INTTYPES_H +#include +#endif +#ifdef HAVE_STDINT_H +#include +#endif + +EOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + egrep "(^|[^a-zA-Z_0-9])uint64_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then + rm -rf conftest* + ac_cv_type_uint64_t=yes +else + rm -rf conftest* + ac_cv_type_uint64_t=no +fi +rm -f conftest* + +fi +eval echo "$ac_t""$ac_cv_type_uint64_t" 1>&6 +if test $ac_cv_type_uint64_t = no; then + cat >> confdefs.h <<\EOF +#define uint64_t UInt64_t +EOF + +fi + + +echo $ac_n "checking for uintmax_t""... $ac_c" 1>&6 +echo "configure:7859: checking for uintmax_t" >&5 +if eval "test \"`echo '$''{'ac_cv_type_uintmax_t'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +#if HAVE_STDLIB_H || STDC_HEADERS +#include +#endif +#if HAVE_STDDEF_H || STDC_HEADERS +#include +#endif +#ifdef HAVE_INTTYPES_H +#include +#endif +#ifdef HAVE_STDINT_H +#include +#endif + +EOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + egrep "(^|[^a-zA-Z_0-9])uintmax_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then + rm -rf conftest* + ac_cv_type_uintmax_t=yes +else + rm -rf conftest* + ac_cv_type_uintmax_t=no +fi +rm -f conftest* + +fi +eval echo "$ac_t""$ac_cv_type_uintmax_t" 1>&6 +if test $ac_cv_type_uintmax_t = no; then + cat >> confdefs.h <<\EOF +#define uintmax_t UIntmax_t +EOF + +fi + + +echo $ac_n "checking for uintptr_t""... $ac_c" 1>&6 +echo "configure:7902: checking for uintptr_t" >&5 +if eval "test \"`echo '$''{'ac_cv_type_uintptr_t'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +#if HAVE_STDLIB_H || STDC_HEADERS +#include +#endif +#if HAVE_STDDEF_H || STDC_HEADERS +#include +#endif +#ifdef HAVE_INTTYPES_H +#include +#endif +#ifdef HAVE_STDINT_H +#include +#endif + +EOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + egrep "(^|[^a-zA-Z_0-9])uintptr_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then + rm -rf conftest* + ac_cv_type_uintptr_t=yes +else + rm -rf conftest* + ac_cv_type_uintptr_t=no +fi +rm -f conftest* + +fi +eval echo "$ac_t""$ac_cv_type_uintptr_t" 1>&6 +if test $ac_cv_type_uintptr_t = no; then + cat >> confdefs.h <<\EOF +#define uintptr_t UIntptr_t +EOF + +fi + + +echo $ac_n "checking for wctype_t""... $ac_c" 1>&6 +echo "configure:7945: checking for wctype_t" >&5 +if eval "test \"`echo '$''{'ac_cv_type_wctype_t'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +#if HAVE_STDLIB_H || STDC_HEADERS +#include +#endif +#if HAVE_STDDEF_H || STDC_HEADERS +#include +#endif +#ifdef HAVE_WCHAR_H +#include +#endif +#ifdef HAVE_WCTYPE_H +#include +#endif + +EOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + egrep "(^|[^a-zA-Z_0-9])wctype_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then + rm -rf conftest* + ac_cv_type_wctype_t=yes +else + rm -rf conftest* + ac_cv_type_wctype_t=no +fi +rm -f conftest* + +fi +eval echo "$ac_t""$ac_cv_type_wctype_t" 1>&6 +if test $ac_cv_type_wctype_t = no; then + cat >> confdefs.h <<\EOF +#define wctype_t int +EOF + +fi + + +echo $ac_n "checking for wint_t""... $ac_c" 1>&6 +echo "configure:7988: checking for wint_t" >&5 +if eval "test \"`echo '$''{'ac_cv_type_wint_t'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +#if HAVE_STDLIB_H || STDC_HEADERS +#include +#endif +#if HAVE_STDDEF_H || STDC_HEADERS +#include +#endif +#ifdef HAVE_WCHAR_H +#include +#endif +#ifdef HAVE_WCTYPE_H +#include +#endif +#include + +EOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + egrep "(^|[^a-zA-Z_0-9])wint_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then + rm -rf conftest* + ac_cv_type_wint_t=yes +else + rm -rf conftest* + ac_cv_type_wint_t=no +fi +rm -f conftest* + +fi +eval echo "$ac_t""$ac_cv_type_wint_t" 1>&6 +if test $ac_cv_type_wint_t = no; then + cat >> confdefs.h <<\EOF +#define wint_t int +EOF + +fi + + +echo $ac_n "checking for mbstate_t""... $ac_c" 1>&6 +echo "configure:8032: checking for mbstate_t" >&5 +if eval "test \"`echo '$''{'ac_cv_type_mbstate_t'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +#if HAVE_STDLIB_H || STDC_HEADERS +#include +#endif +#if HAVE_STDDEF_H || STDC_HEADERS +#include +#endif +#ifdef HAVE_WCHAR_H +#include +#endif +#ifdef HAVE_WCTYPE_H +#include +#endif + +EOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + egrep "(^|[^a-zA-Z_0-9])mbstate_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then + rm -rf conftest* + ac_cv_type_mbstate_t=yes +else + rm -rf conftest* + ac_cv_type_mbstate_t=no +fi +rm -f conftest* + +fi +eval echo "$ac_t""$ac_cv_type_mbstate_t" 1>&6 +if test $ac_cv_type_mbstate_t = no; then + cat >> confdefs.h <<\EOF +#define mbstate_t int +EOF + +fi + + +echo $ac_n "checking for timestruc_t""... $ac_c" 1>&6 +echo "configure:8075: checking for timestruc_t" >&5 +if eval "test \"`echo '$''{'ac_cv_type_timestruc_t'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +#if HAVE_STDLIB_H || STDC_HEADERS +#include +#endif +#if HAVE_STDDEF_H || STDC_HEADERS +#include +#endif +#ifdef HAVE_SYS_STAT_H +#include +#endif +#ifdef HAVE_STAT_H +#include +#endif + +EOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + egrep "(^|[^a-zA-Z_0-9])timestruc_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then + rm -rf conftest* + ac_cv_type_timestruc_t=yes +else + rm -rf conftest* + ac_cv_type_timestruc_t=no +fi +rm -f conftest* + +fi +eval echo "$ac_t""$ac_cv_type_timestruc_t" 1>&6 +if test $ac_cv_type_timestruc_t = no; then + cat >> confdefs.h <<\EOF +#define timestruc_t timespec +EOF + +fi + + +echo $ac_n "checking size of char""... $ac_c" 1>&6 +echo "configure:8118: checking size of char" >&5 +if eval "test \"`echo '$''{'ac_cv_sizeof_char'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test "$cross_compiling" = yes; then + { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } +else + cat > conftest.$ac_ext < +#if HAVE_STDDEF_H || STDC_HEADERS +#include /* For ptrdiff_t, wchar_t, size_t */ +#endif +#ifdef HAVE_SYS_TYPES_H +#include +#endif +main() +{ + FILE *f=fopen("conftestval", "w"); + if (!f) exit(1); + fprintf(f, "%d\n", sizeof(char)); + exit(0); +} +EOF +if { eval echo configure:8143: \"$ac_link\" 1>&5; eval $ac_link 2>&5; } && test -s conftest${ac_exeext} && ($rmtcall ./conftest${ac_xexeext}; exit) 2>/dev/null +then + ac_cv_sizeof_char=`cat conftestval` +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* + ac_cv_sizeof_char=0 +fi +rm -fr conftest* +fi + +fi +eval echo "$ac_t""$ac_cv_sizeof_char" 1>&6 +cat >> confdefs.h <&6 +echo "configure:8163: checking size of short int" >&5 +if eval "test \"`echo '$''{'ac_cv_sizeof_short_int'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test "$cross_compiling" = yes; then + { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } +else + cat > conftest.$ac_ext < +#if HAVE_STDDEF_H || STDC_HEADERS +#include /* For ptrdiff_t, wchar_t, size_t */ +#endif +#ifdef HAVE_SYS_TYPES_H +#include +#endif +main() +{ + FILE *f=fopen("conftestval", "w"); + if (!f) exit(1); + fprintf(f, "%d\n", sizeof(short int)); + exit(0); +} +EOF +if { eval echo configure:8188: \"$ac_link\" 1>&5; eval $ac_link 2>&5; } && test -s conftest${ac_exeext} && ($rmtcall ./conftest${ac_xexeext}; exit) 2>/dev/null +then + ac_cv_sizeof_short_int=`cat conftestval` +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* + ac_cv_sizeof_short_int=0 +fi +rm -fr conftest* +fi + +fi +eval echo "$ac_t""$ac_cv_sizeof_short_int" 1>&6 +cat >> confdefs.h <&6 +echo "configure:8208: checking size of int" >&5 +if eval "test \"`echo '$''{'ac_cv_sizeof_int'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test "$cross_compiling" = yes; then + { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } +else + cat > conftest.$ac_ext < +#if HAVE_STDDEF_H || STDC_HEADERS +#include /* For ptrdiff_t, wchar_t, size_t */ +#endif +#ifdef HAVE_SYS_TYPES_H +#include +#endif +main() +{ + FILE *f=fopen("conftestval", "w"); + if (!f) exit(1); + fprintf(f, "%d\n", sizeof(int)); + exit(0); +} +EOF +if { eval echo configure:8233: \"$ac_link\" 1>&5; eval $ac_link 2>&5; } && test -s conftest${ac_exeext} && ($rmtcall ./conftest${ac_xexeext}; exit) 2>/dev/null +then + ac_cv_sizeof_int=`cat conftestval` +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* + ac_cv_sizeof_int=0 +fi +rm -fr conftest* +fi + +fi +eval echo "$ac_t""$ac_cv_sizeof_int" 1>&6 +cat >> confdefs.h <&6 +echo "configure:8253: checking size of long int" >&5 +if eval "test \"`echo '$''{'ac_cv_sizeof_long_int'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test "$cross_compiling" = yes; then + { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } +else + cat > conftest.$ac_ext < +#if HAVE_STDDEF_H || STDC_HEADERS +#include /* For ptrdiff_t, wchar_t, size_t */ +#endif +#ifdef HAVE_SYS_TYPES_H +#include +#endif +main() +{ + FILE *f=fopen("conftestval", "w"); + if (!f) exit(1); + fprintf(f, "%d\n", sizeof(long int)); + exit(0); +} +EOF +if { eval echo configure:8278: \"$ac_link\" 1>&5; eval $ac_link 2>&5; } && test -s conftest${ac_exeext} && ($rmtcall ./conftest${ac_xexeext}; exit) 2>/dev/null +then + ac_cv_sizeof_long_int=`cat conftestval` +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* + ac_cv_sizeof_long_int=0 +fi +rm -fr conftest* +fi + +fi +eval echo "$ac_t""$ac_cv_sizeof_long_int" 1>&6 +cat >> confdefs.h <&6 +echo "configure:8298: checking size of long long" >&5 +if eval "test \"`echo '$''{'ac_cv_sizeof_long_long'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test "$cross_compiling" = yes; then + { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } +else + cat > conftest.$ac_ext < +#if HAVE_STDDEF_H || STDC_HEADERS +#include /* For ptrdiff_t, wchar_t, size_t */ +#endif +#ifdef HAVE_SYS_TYPES_H +#include +#endif +main() +{ + FILE *f=fopen("conftestval", "w"); + if (!f) exit(1); + fprintf(f, "%d\n", sizeof(long long)); + exit(0); +} +EOF +if { eval echo configure:8323: \"$ac_link\" 1>&5; eval $ac_link 2>&5; } && test -s conftest${ac_exeext} && ($rmtcall ./conftest${ac_xexeext}; exit) 2>/dev/null +then + ac_cv_sizeof_long_long=`cat conftestval` +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* + ac_cv_sizeof_long_long=0 +fi +rm -fr conftest* +fi + +fi +eval echo "$ac_t""$ac_cv_sizeof_long_long" 1>&6 +cat >> confdefs.h <&6 +echo "configure:8343: checking size of __int64" >&5 +if eval "test \"`echo '$''{'ac_cv_sizeof___int64'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test "$cross_compiling" = yes; then + { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } +else + cat > conftest.$ac_ext < +#if HAVE_STDDEF_H || STDC_HEADERS +#include /* For ptrdiff_t, wchar_t, size_t */ +#endif +#ifdef HAVE_SYS_TYPES_H +#include +#endif +main() +{ + FILE *f=fopen("conftestval", "w"); + if (!f) exit(1); + fprintf(f, "%d\n", sizeof(__int64)); + exit(0); +} +EOF +if { eval echo configure:8368: \"$ac_link\" 1>&5; eval $ac_link 2>&5; } && test -s conftest${ac_exeext} && ($rmtcall ./conftest${ac_xexeext}; exit) 2>/dev/null +then + ac_cv_sizeof___int64=`cat conftestval` +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* + ac_cv_sizeof___int64=0 +fi +rm -fr conftest* +fi + +fi +eval echo "$ac_t""$ac_cv_sizeof___int64" 1>&6 +cat >> confdefs.h <&6 +echo "configure:8388: checking size of char *" >&5 +if eval "test \"`echo '$''{'ac_cv_sizeof_char_p'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test "$cross_compiling" = yes; then + { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } +else + cat > conftest.$ac_ext < +#if HAVE_STDDEF_H || STDC_HEADERS +#include /* For ptrdiff_t, wchar_t, size_t */ +#endif +#ifdef HAVE_SYS_TYPES_H +#include +#endif +main() +{ + FILE *f=fopen("conftestval", "w"); + if (!f) exit(1); + fprintf(f, "%d\n", sizeof(char *)); + exit(0); +} +EOF +if { eval echo configure:8413: \"$ac_link\" 1>&5; eval $ac_link 2>&5; } && test -s conftest${ac_exeext} && ($rmtcall ./conftest${ac_xexeext}; exit) 2>/dev/null +then + ac_cv_sizeof_char_p=`cat conftestval` +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* + ac_cv_sizeof_char_p=0 +fi +rm -fr conftest* +fi + +fi +eval echo "$ac_t""$ac_cv_sizeof_char_p" 1>&6 +cat >> confdefs.h <&6 +echo "configure:8434: checking size of unsigned char" >&5 +if eval "test \"`echo '$''{'ac_cv_sizeof_unsigned_char'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test "$cross_compiling" = yes; then + { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } +else + cat > conftest.$ac_ext < +#if HAVE_STDDEF_H || STDC_HEADERS +#include /* For ptrdiff_t, wchar_t, size_t */ +#endif +#ifdef HAVE_SYS_TYPES_H +#include +#endif +main() +{ + FILE *f=fopen("conftestval", "w"); + if (!f) exit(1); + fprintf(f, "%d\n", sizeof(unsigned char)); + exit(0); +} +EOF +if { eval echo configure:8459: \"$ac_link\" 1>&5; eval $ac_link 2>&5; } && test -s conftest${ac_exeext} && ($rmtcall ./conftest${ac_xexeext}; exit) 2>/dev/null +then + ac_cv_sizeof_unsigned_char=`cat conftestval` +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* + ac_cv_sizeof_unsigned_char=0 +fi +rm -fr conftest* +fi + +fi +eval echo "$ac_t""$ac_cv_sizeof_unsigned_char" 1>&6 +cat >> confdefs.h <&6 +echo "configure:8479: checking size of unsigned short int" >&5 +if eval "test \"`echo '$''{'ac_cv_sizeof_unsigned_short_int'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test "$cross_compiling" = yes; then + { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } +else + cat > conftest.$ac_ext < +#if HAVE_STDDEF_H || STDC_HEADERS +#include /* For ptrdiff_t, wchar_t, size_t */ +#endif +#ifdef HAVE_SYS_TYPES_H +#include +#endif +main() +{ + FILE *f=fopen("conftestval", "w"); + if (!f) exit(1); + fprintf(f, "%d\n", sizeof(unsigned short int)); + exit(0); +} +EOF +if { eval echo configure:8504: \"$ac_link\" 1>&5; eval $ac_link 2>&5; } && test -s conftest${ac_exeext} && ($rmtcall ./conftest${ac_xexeext}; exit) 2>/dev/null +then + ac_cv_sizeof_unsigned_short_int=`cat conftestval` +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* + ac_cv_sizeof_unsigned_short_int=0 +fi +rm -fr conftest* +fi + +fi +eval echo "$ac_t""$ac_cv_sizeof_unsigned_short_int" 1>&6 +cat >> confdefs.h <&6 +echo "configure:8524: checking size of unsigned int" >&5 +if eval "test \"`echo '$''{'ac_cv_sizeof_unsigned_int'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test "$cross_compiling" = yes; then + { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } +else + cat > conftest.$ac_ext < +#if HAVE_STDDEF_H || STDC_HEADERS +#include /* For ptrdiff_t, wchar_t, size_t */ +#endif +#ifdef HAVE_SYS_TYPES_H +#include +#endif +main() +{ + FILE *f=fopen("conftestval", "w"); + if (!f) exit(1); + fprintf(f, "%d\n", sizeof(unsigned int)); + exit(0); +} +EOF +if { eval echo configure:8549: \"$ac_link\" 1>&5; eval $ac_link 2>&5; } && test -s conftest${ac_exeext} && ($rmtcall ./conftest${ac_xexeext}; exit) 2>/dev/null +then + ac_cv_sizeof_unsigned_int=`cat conftestval` +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* + ac_cv_sizeof_unsigned_int=0 +fi +rm -fr conftest* +fi + +fi +eval echo "$ac_t""$ac_cv_sizeof_unsigned_int" 1>&6 +cat >> confdefs.h <&6 +echo "configure:8569: checking size of unsigned long int" >&5 +if eval "test \"`echo '$''{'ac_cv_sizeof_unsigned_long_int'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test "$cross_compiling" = yes; then + { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } +else + cat > conftest.$ac_ext < +#if HAVE_STDDEF_H || STDC_HEADERS +#include /* For ptrdiff_t, wchar_t, size_t */ +#endif +#ifdef HAVE_SYS_TYPES_H +#include +#endif +main() +{ + FILE *f=fopen("conftestval", "w"); + if (!f) exit(1); + fprintf(f, "%d\n", sizeof(unsigned long int)); + exit(0); +} +EOF +if { eval echo configure:8594: \"$ac_link\" 1>&5; eval $ac_link 2>&5; } && test -s conftest${ac_exeext} && ($rmtcall ./conftest${ac_xexeext}; exit) 2>/dev/null +then + ac_cv_sizeof_unsigned_long_int=`cat conftestval` +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* + ac_cv_sizeof_unsigned_long_int=0 +fi +rm -fr conftest* +fi + +fi +eval echo "$ac_t""$ac_cv_sizeof_unsigned_long_int" 1>&6 +cat >> confdefs.h <&6 +echo "configure:8614: checking size of unsigned long long" >&5 +if eval "test \"`echo '$''{'ac_cv_sizeof_unsigned_long_long'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test "$cross_compiling" = yes; then + { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } +else + cat > conftest.$ac_ext < +#if HAVE_STDDEF_H || STDC_HEADERS +#include /* For ptrdiff_t, wchar_t, size_t */ +#endif +#ifdef HAVE_SYS_TYPES_H +#include +#endif +main() +{ + FILE *f=fopen("conftestval", "w"); + if (!f) exit(1); + fprintf(f, "%d\n", sizeof(unsigned long long)); + exit(0); +} +EOF +if { eval echo configure:8639: \"$ac_link\" 1>&5; eval $ac_link 2>&5; } && test -s conftest${ac_exeext} && ($rmtcall ./conftest${ac_xexeext}; exit) 2>/dev/null +then + ac_cv_sizeof_unsigned_long_long=`cat conftestval` +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* + ac_cv_sizeof_unsigned_long_long=0 +fi +rm -fr conftest* +fi + +fi +eval echo "$ac_t""$ac_cv_sizeof_unsigned_long_long" 1>&6 +cat >> confdefs.h <&6 +echo "configure:8659: checking size of unsigned __int64" >&5 +if eval "test \"`echo '$''{'ac_cv_sizeof_unsigned___int64'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test "$cross_compiling" = yes; then + { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } +else + cat > conftest.$ac_ext < +#if HAVE_STDDEF_H || STDC_HEADERS +#include /* For ptrdiff_t, wchar_t, size_t */ +#endif +#ifdef HAVE_SYS_TYPES_H +#include +#endif +main() +{ + FILE *f=fopen("conftestval", "w"); + if (!f) exit(1); + fprintf(f, "%d\n", sizeof(unsigned __int64)); + exit(0); +} +EOF +if { eval echo configure:8684: \"$ac_link\" 1>&5; eval $ac_link 2>&5; } && test -s conftest${ac_exeext} && ($rmtcall ./conftest${ac_xexeext}; exit) 2>/dev/null +then + ac_cv_sizeof_unsigned___int64=`cat conftestval` +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* + ac_cv_sizeof_unsigned___int64=0 +fi +rm -fr conftest* +fi + +fi +eval echo "$ac_t""$ac_cv_sizeof_unsigned___int64" 1>&6 +cat >> confdefs.h <&6 +echo "configure:8704: checking size of unsigned char *" >&5 +if eval "test \"`echo '$''{'ac_cv_sizeof_unsigned_char_p'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test "$cross_compiling" = yes; then + { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } +else + cat > conftest.$ac_ext < +#if HAVE_STDDEF_H || STDC_HEADERS +#include /* For ptrdiff_t, wchar_t, size_t */ +#endif +#ifdef HAVE_SYS_TYPES_H +#include +#endif +main() +{ + FILE *f=fopen("conftestval", "w"); + if (!f) exit(1); + fprintf(f, "%d\n", sizeof(unsigned char *)); + exit(0); +} +EOF +if { eval echo configure:8729: \"$ac_link\" 1>&5; eval $ac_link 2>&5; } && test -s conftest${ac_exeext} && ($rmtcall ./conftest${ac_xexeext}; exit) 2>/dev/null +then + ac_cv_sizeof_unsigned_char_p=`cat conftestval` +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* + ac_cv_sizeof_unsigned_char_p=0 +fi +rm -fr conftest* +fi + +fi +eval echo "$ac_t""$ac_cv_sizeof_unsigned_char_p" 1>&6 +cat >> confdefs.h <&6 +echo "configure:8749: checking size of float" >&5 +if eval "test \"`echo '$''{'ac_cv_sizeof_float'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test "$cross_compiling" = yes; then + { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } +else + cat > conftest.$ac_ext < +#if HAVE_STDDEF_H || STDC_HEADERS +#include /* For ptrdiff_t, wchar_t, size_t */ +#endif +#ifdef HAVE_SYS_TYPES_H +#include +#endif +main() +{ + FILE *f=fopen("conftestval", "w"); + if (!f) exit(1); + fprintf(f, "%d\n", sizeof(float)); + exit(0); +} +EOF +if { eval echo configure:8774: \"$ac_link\" 1>&5; eval $ac_link 2>&5; } && test -s conftest${ac_exeext} && ($rmtcall ./conftest${ac_xexeext}; exit) 2>/dev/null +then + ac_cv_sizeof_float=`cat conftestval` +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* + ac_cv_sizeof_float=0 +fi +rm -fr conftest* +fi + +fi +eval echo "$ac_t""$ac_cv_sizeof_float" 1>&6 +cat >> confdefs.h <&6 +echo "configure:8794: checking size of double" >&5 +if eval "test \"`echo '$''{'ac_cv_sizeof_double'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test "$cross_compiling" = yes; then + { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } +else + cat > conftest.$ac_ext < +#if HAVE_STDDEF_H || STDC_HEADERS +#include /* For ptrdiff_t, wchar_t, size_t */ +#endif +#ifdef HAVE_SYS_TYPES_H +#include +#endif +main() +{ + FILE *f=fopen("conftestval", "w"); + if (!f) exit(1); + fprintf(f, "%d\n", sizeof(double)); + exit(0); +} +EOF +if { eval echo configure:8819: \"$ac_link\" 1>&5; eval $ac_link 2>&5; } && test -s conftest${ac_exeext} && ($rmtcall ./conftest${ac_xexeext}; exit) 2>/dev/null +then + ac_cv_sizeof_double=`cat conftestval` +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* + ac_cv_sizeof_double=0 +fi +rm -fr conftest* +fi + +fi +eval echo "$ac_t""$ac_cv_sizeof_double" 1>&6 +cat >> confdefs.h <&6 +echo "configure:8839: checking size of long double" >&5 +if eval "test \"`echo '$''{'ac_cv_sizeof_long_double'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test "$cross_compiling" = yes; then + { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } +else + cat > conftest.$ac_ext < +#if HAVE_STDDEF_H || STDC_HEADERS +#include /* For ptrdiff_t, wchar_t, size_t */ +#endif +#ifdef HAVE_SYS_TYPES_H +#include +#endif +main() +{ + FILE *f=fopen("conftestval", "w"); + if (!f) exit(1); + fprintf(f, "%d\n", sizeof(long double)); + exit(0); +} +EOF +if { eval echo configure:8864: \"$ac_link\" 1>&5; eval $ac_link 2>&5; } && test -s conftest${ac_exeext} && ($rmtcall ./conftest${ac_xexeext}; exit) 2>/dev/null +then + ac_cv_sizeof_long_double=`cat conftestval` +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* + ac_cv_sizeof_long_double=0 +fi +rm -fr conftest* +fi + +fi +eval echo "$ac_t""$ac_cv_sizeof_long_double" 1>&6 +cat >> confdefs.h <&6 +echo "configure:8885: checking size of size_t" >&5 +if eval "test \"`echo '$''{'ac_cv_sizeof_size_t'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test "$cross_compiling" = yes; then + { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } +else + cat > conftest.$ac_ext < +#if HAVE_STDDEF_H || STDC_HEADERS +#include /* For ptrdiff_t, wchar_t, size_t */ +#endif +#ifdef HAVE_SYS_TYPES_H +#include +#endif +main() +{ + FILE *f=fopen("conftestval", "w"); + if (!f) exit(1); + fprintf(f, "%d\n", sizeof(size_t)); + exit(0); +} +EOF +if { eval echo configure:8910: \"$ac_link\" 1>&5; eval $ac_link 2>&5; } && test -s conftest${ac_exeext} && ($rmtcall ./conftest${ac_xexeext}; exit) 2>/dev/null +then + ac_cv_sizeof_size_t=`cat conftestval` +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* + ac_cv_sizeof_size_t=0 +fi +rm -fr conftest* +fi + +fi +eval echo "$ac_t""$ac_cv_sizeof_size_t" 1>&6 +cat >> confdefs.h <&6 +echo "configure:8930: checking size of ssize_t" >&5 +if eval "test \"`echo '$''{'ac_cv_sizeof_ssize_t'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test "$cross_compiling" = yes; then + { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } +else + cat > conftest.$ac_ext < +#if HAVE_STDDEF_H || STDC_HEADERS +#include /* For ptrdiff_t, wchar_t, size_t */ +#endif +#ifdef HAVE_SYS_TYPES_H +#include +#endif +main() +{ + FILE *f=fopen("conftestval", "w"); + if (!f) exit(1); + fprintf(f, "%d\n", sizeof(ssize_t)); + exit(0); +} +EOF +if { eval echo configure:8955: \"$ac_link\" 1>&5; eval $ac_link 2>&5; } && test -s conftest${ac_exeext} && ($rmtcall ./conftest${ac_xexeext}; exit) 2>/dev/null +then + ac_cv_sizeof_ssize_t=`cat conftestval` +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* + ac_cv_sizeof_ssize_t=0 +fi +rm -fr conftest* +fi + +fi +eval echo "$ac_t""$ac_cv_sizeof_ssize_t" 1>&6 +cat >> confdefs.h <&6 +echo "configure:8975: checking size of ptrdiff_t" >&5 +if eval "test \"`echo '$''{'ac_cv_sizeof_ptrdiff_t'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test "$cross_compiling" = yes; then + { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } +else + cat > conftest.$ac_ext < +#if HAVE_STDDEF_H || STDC_HEADERS +#include /* For ptrdiff_t, wchar_t, size_t */ +#endif +#ifdef HAVE_SYS_TYPES_H +#include +#endif +main() +{ + FILE *f=fopen("conftestval", "w"); + if (!f) exit(1); + fprintf(f, "%d\n", sizeof(ptrdiff_t)); + exit(0); +} +EOF +if { eval echo configure:9000: \"$ac_link\" 1>&5; eval $ac_link 2>&5; } && test -s conftest${ac_exeext} && ($rmtcall ./conftest${ac_xexeext}; exit) 2>/dev/null +then + ac_cv_sizeof_ptrdiff_t=`cat conftestval` +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* + ac_cv_sizeof_ptrdiff_t=0 +fi +rm -fr conftest* +fi + +fi +eval echo "$ac_t""$ac_cv_sizeof_ptrdiff_t" 1>&6 +cat >> confdefs.h <&6 +echo "configure:9021: checking size of mode_t" >&5 +if eval "test \"`echo '$''{'ac_cv_sizeof_mode_t'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test "$cross_compiling" = yes; then + { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } +else + cat > conftest.$ac_ext < +#if HAVE_STDDEF_H || STDC_HEADERS +#include /* For ptrdiff_t, wchar_t, size_t */ +#endif +#ifdef HAVE_SYS_TYPES_H +#include +#endif +main() +{ + FILE *f=fopen("conftestval", "w"); + if (!f) exit(1); + fprintf(f, "%d\n", sizeof(mode_t)); + exit(0); +} +EOF +if { eval echo configure:9046: \"$ac_link\" 1>&5; eval $ac_link 2>&5; } && test -s conftest${ac_exeext} && ($rmtcall ./conftest${ac_xexeext}; exit) 2>/dev/null +then + ac_cv_sizeof_mode_t=`cat conftestval` +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* + ac_cv_sizeof_mode_t=0 +fi +rm -fr conftest* +fi + +fi +eval echo "$ac_t""$ac_cv_sizeof_mode_t" 1>&6 +cat >> confdefs.h <&6 +echo "configure:9066: checking size of uid_t" >&5 +if eval "test \"`echo '$''{'ac_cv_sizeof_uid_t'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test "$cross_compiling" = yes; then + { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } +else + cat > conftest.$ac_ext < +#if HAVE_STDDEF_H || STDC_HEADERS +#include /* For ptrdiff_t, wchar_t, size_t */ +#endif +#ifdef HAVE_SYS_TYPES_H +#include +#endif +main() +{ + FILE *f=fopen("conftestval", "w"); + if (!f) exit(1); + fprintf(f, "%d\n", sizeof(uid_t)); + exit(0); +} +EOF +if { eval echo configure:9091: \"$ac_link\" 1>&5; eval $ac_link 2>&5; } && test -s conftest${ac_exeext} && ($rmtcall ./conftest${ac_xexeext}; exit) 2>/dev/null +then + ac_cv_sizeof_uid_t=`cat conftestval` +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* + ac_cv_sizeof_uid_t=0 +fi +rm -fr conftest* +fi + +fi +eval echo "$ac_t""$ac_cv_sizeof_uid_t" 1>&6 +cat >> confdefs.h <&6 +echo "configure:9111: checking size of gid_t" >&5 +if eval "test \"`echo '$''{'ac_cv_sizeof_gid_t'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test "$cross_compiling" = yes; then + { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } +else + cat > conftest.$ac_ext < +#if HAVE_STDDEF_H || STDC_HEADERS +#include /* For ptrdiff_t, wchar_t, size_t */ +#endif +#ifdef HAVE_SYS_TYPES_H +#include +#endif +main() +{ + FILE *f=fopen("conftestval", "w"); + if (!f) exit(1); + fprintf(f, "%d\n", sizeof(gid_t)); + exit(0); +} +EOF +if { eval echo configure:9136: \"$ac_link\" 1>&5; eval $ac_link 2>&5; } && test -s conftest${ac_exeext} && ($rmtcall ./conftest${ac_xexeext}; exit) 2>/dev/null +then + ac_cv_sizeof_gid_t=`cat conftestval` +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* + ac_cv_sizeof_gid_t=0 +fi +rm -fr conftest* +fi + +fi +eval echo "$ac_t""$ac_cv_sizeof_gid_t" 1>&6 +cat >> confdefs.h <&6 +echo "configure:9156: checking size of pid_t" >&5 +if eval "test \"`echo '$''{'ac_cv_sizeof_pid_t'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test "$cross_compiling" = yes; then + { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } +else + cat > conftest.$ac_ext < +#if HAVE_STDDEF_H || STDC_HEADERS +#include /* For ptrdiff_t, wchar_t, size_t */ +#endif +#ifdef HAVE_SYS_TYPES_H +#include +#endif +main() +{ + FILE *f=fopen("conftestval", "w"); + if (!f) exit(1); + fprintf(f, "%d\n", sizeof(pid_t)); + exit(0); +} +EOF +if { eval echo configure:9181: \"$ac_link\" 1>&5; eval $ac_link 2>&5; } && test -s conftest${ac_exeext} && ($rmtcall ./conftest${ac_xexeext}; exit) 2>/dev/null +then + ac_cv_sizeof_pid_t=`cat conftestval` +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* + ac_cv_sizeof_pid_t=0 +fi +rm -fr conftest* +fi + +fi +eval echo "$ac_t""$ac_cv_sizeof_pid_t" 1>&6 +cat >> confdefs.h <&6 +echo "configure:9202: checking size of dev_t" >&5 +if eval "test \"`echo '$''{'ac_cv_sizeof_dev_t'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test "$cross_compiling" = yes; then + { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } +else + cat > conftest.$ac_ext < +#if HAVE_STDDEF_H || STDC_HEADERS +#include /* For ptrdiff_t, wchar_t, size_t */ +#endif +#ifdef HAVE_SYS_TYPES_H +#include +#endif +main() +{ + FILE *f=fopen("conftestval", "w"); + if (!f) exit(1); + fprintf(f, "%d\n", sizeof(dev_t)); + exit(0); +} +EOF +if { eval echo configure:9227: \"$ac_link\" 1>&5; eval $ac_link 2>&5; } && test -s conftest${ac_exeext} && ($rmtcall ./conftest${ac_xexeext}; exit) 2>/dev/null +then + ac_cv_sizeof_dev_t=`cat conftestval` +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* + ac_cv_sizeof_dev_t=0 +fi +rm -fr conftest* +fi + +fi +eval echo "$ac_t""$ac_cv_sizeof_dev_t" 1>&6 +cat >> confdefs.h <&6 +echo "configure:9247: checking size of major_t" >&5 +if eval "test \"`echo '$''{'ac_cv_sizeof_major_t'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test "$cross_compiling" = yes; then + { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } +else + cat > conftest.$ac_ext < +#if HAVE_STDDEF_H || STDC_HEADERS +#include /* For ptrdiff_t, wchar_t, size_t */ +#endif +#ifdef HAVE_SYS_TYPES_H +#include +#endif +main() +{ + FILE *f=fopen("conftestval", "w"); + if (!f) exit(1); + fprintf(f, "%d\n", sizeof(major_t)); + exit(0); +} +EOF +if { eval echo configure:9272: \"$ac_link\" 1>&5; eval $ac_link 2>&5; } && test -s conftest${ac_exeext} && ($rmtcall ./conftest${ac_xexeext}; exit) 2>/dev/null +then + ac_cv_sizeof_major_t=`cat conftestval` +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* + ac_cv_sizeof_major_t=0 +fi +rm -fr conftest* +fi + +fi +eval echo "$ac_t""$ac_cv_sizeof_major_t" 1>&6 +cat >> confdefs.h <&6 +echo "configure:9292: checking size of minor_t" >&5 +if eval "test \"`echo '$''{'ac_cv_sizeof_minor_t'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test "$cross_compiling" = yes; then + { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } +else + cat > conftest.$ac_ext < +#if HAVE_STDDEF_H || STDC_HEADERS +#include /* For ptrdiff_t, wchar_t, size_t */ +#endif +#ifdef HAVE_SYS_TYPES_H +#include +#endif +main() +{ + FILE *f=fopen("conftestval", "w"); + if (!f) exit(1); + fprintf(f, "%d\n", sizeof(minor_t)); + exit(0); +} +EOF +if { eval echo configure:9317: \"$ac_link\" 1>&5; eval $ac_link 2>&5; } && test -s conftest${ac_exeext} && ($rmtcall ./conftest${ac_xexeext}; exit) 2>/dev/null +then + ac_cv_sizeof_minor_t=`cat conftestval` +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* + ac_cv_sizeof_minor_t=0 +fi +rm -fr conftest* +fi + +fi +eval echo "$ac_t""$ac_cv_sizeof_minor_t" 1>&6 +cat >> confdefs.h <&6 +echo "configure:9338: checking size of time_t" >&5 +if eval "test \"`echo '$''{'ac_cv_sizeof_time_t'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test "$cross_compiling" = yes; then + { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } +else + cat > conftest.$ac_ext < +#include +#ifdef TIME_WITH_SYS_TIME_H +# include +# include +#else +#ifdef HAVE_SYS_TIME_H +# include +#else +# include +#endif +#endif +main() +{ + FILE *f=fopen("conftestval", "w"); + if (!f) exit(1); + fprintf(f, "%d\n", sizeof(time_t)); + exit(0); +} +EOF +if { eval echo configure:9368: \"$ac_link\" 1>&5; eval $ac_link 2>&5; } && test -s conftest${ac_exeext} && ($rmtcall ./conftest${ac_xexeext}; exit) 2>/dev/null +then + ac_cv_sizeof_time_t=`cat conftestval` +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* + ac_cv_sizeof_time_t=SIZEOF_LONG_INT +fi +rm -fr conftest* +fi + +fi +eval echo "$ac_t""$ac_cv_sizeof_time_t" 1>&6 +cat >> confdefs.h <&6 +echo "configure:9388: checking size of wchar" >&5 +if eval "test \"`echo '$''{'ac_cv_sizeof_wchar'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test "$cross_compiling" = yes; then + { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } +else + cat > conftest.$ac_ext < +main() +{ + FILE *f=fopen("conftestval", "w"); + if (!f) exit(1); + fprintf(f, "%d\n", sizeof(L'a')); + exit(0); +} +EOF +if { eval echo configure:9407: \"$ac_link\" 1>&5; eval $ac_link 2>&5; } && test -s conftest${ac_exeext} && ($rmtcall ./conftest${ac_xexeext}; exit) 2>/dev/null +then + ac_cv_sizeof_wchar=`cat conftestval` +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* + ac_cv_sizeof_wchar=0 +fi +rm -fr conftest* +fi + +fi +eval echo "$ac_t""$ac_cv_sizeof_wchar" 1>&6 +cat >> confdefs.h <&6 +echo "configure:9427: checking size of wchar_t" >&5 +if eval "test \"`echo '$''{'ac_cv_sizeof_wchar_t'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test "$cross_compiling" = yes; then + { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } +else + cat > conftest.$ac_ext < +#ifdef HAVE_SYS_TYPES_H +#include +#endif +#ifdef HAVE_STDLIB_H +#include +#endif +#ifdef HAVE_WCHAR_H +#include +#endif +main() +{ + FILE *f=fopen("conftestval", "w"); + if (!f) exit(1); + fprintf(f, "%d\n", sizeof(wchar_t)); + exit(0); +} +EOF +if { eval echo configure:9455: \"$ac_link\" 1>&5; eval $ac_link 2>&5; } && test -s conftest${ac_exeext} && ($rmtcall ./conftest${ac_xexeext}; exit) 2>/dev/null +then + ac_cv_sizeof_wchar_t=`cat conftestval` +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* + ac_cv_sizeof_wchar_t=SIZEOF_CHAR +fi +rm -fr conftest* +fi + +fi +eval echo "$ac_t""$ac_cv_sizeof_wchar_t" 1>&6 +cat >> confdefs.h <&6 +echo "configure:9476: checking if char is unsigned" >&5 +if eval "test \"`echo '$''{'ac_cv_type_char_unsigned'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test "$cross_compiling" = yes; then + ac_cv_type_char_unsigned=no +else + cat > conftest.$ac_ext <&5; eval $ac_link 2>&5; } && test -s conftest${ac_exeext} && ($rmtcall ./conftest${ac_xexeext}; exit) 2>/dev/null +then + ac_cv_type_char_unsigned=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* + ac_cv_type_char_unsigned=no +fi +rm -fr conftest* +fi + +fi + +eval echo "$ac_t""$ac_cv_type_char_unsigned" 1>&6 +if test $ac_cv_type_char_unsigned = yes; then + cat >> confdefs.h <<\EOF +#define CHAR_IS_UNSIGNED 1 +EOF + +fi +echo $ac_n "checking if va_list is an array""... $ac_c" 1>&6 +echo "configure:9517: checking if va_list is an array" >&5 +if eval "test \"`echo '$''{'ac_cv_type_va_list_array'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +#else +# include +#endif + +int main() { + +va_list a, b; + +a = b; +; return 0; } +EOF +if { eval echo configure:9538: \"$ac_link\" 1>&5; eval $ac_link 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + ac_cv_type_va_list_array=no +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + ac_cv_type_va_list_array=yes +fi +rm -f conftest* +fi + +eval echo "$ac_t""$ac_cv_type_va_list_array" 1>&6 +if test $ac_cv_type_va_list_array = yes; then + cat >> confdefs.h <<\EOF +#define VA_LIST_IS_ARRAY 1 +EOF + +fi +echo $ac_n "checking for f->_flags in FILE *""... $ac_c" 1>&6 +echo "configure:9558: checking for f->_flags in FILE *" >&5 +if eval "test \"`echo '$''{'ac_cv_file__flags'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +int main() { +FILE *f; +int flags; +f = fopen("confdefs.h", "r"); +flags = f->_flags; +fclose(f); +; return 0; } +EOF +if { eval echo configure:9574: \"$ac_link\" 1>&5; eval $ac_link 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + ac_cv_file__flags=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + ac_cv_file__flags=no +fi +rm -f conftest* +fi + +eval echo "$ac_t""$ac_cv_file__flags" 1>&6 +if test $ac_cv_file__flags = yes; then + cat >> confdefs.h <<\EOF +#define HAVE_FILE__FLAGS 1 +EOF + +fi +echo $ac_n "checking for f->_IO_buf_base in FILE *""... $ac_c" 1>&6 +echo "configure:9594: checking for f->_IO_buf_base in FILE *" >&5 +if eval "test \"`echo '$''{'ac_cv_file__io_buf_base'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +int main() { +FILE *f; +char *ptr; +f = fopen("confdefs.h", "r"); +ptr = f->_IO_buf_base; +fclose(f); +; return 0; } +EOF +if { eval echo configure:9610: \"$ac_link\" 1>&5; eval $ac_link 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + ac_cv_file__io_buf_base=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + ac_cv_file__io_buf_base=no +fi +rm -f conftest* +fi + +eval echo "$ac_t""$ac_cv_file__io_buf_base" 1>&6 +if test $ac_cv_file__io_buf_base = yes; then + cat >> confdefs.h <<\EOF +#define HAVE_FILE__IO_BUF_BASE 1 +EOF + +fi +echo $ac_n "checking for struct timeval in time.h or sys/time.h""... $ac_c" 1>&6 +echo "configure:9630: checking for struct timeval in time.h or sys/time.h" >&5 +if eval "test \"`echo '$''{'ac_cv_struct_timeval'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +#ifdef TIME_WITH_SYS_TIME_H +# include +# include +#else +#ifdef HAVE_SYS_TIME_H +# include +#else +# include +#endif +#endif +int main() { +struct timeval tv; +; return 0; } +EOF +if { eval echo configure:9653: \"$ac_compile\" 1>&5; eval $ac_compile 2>&5; }; then + rm -rf conftest* + ac_cv_struct_timeval=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + ac_cv_struct_timeval=no +fi +rm -f conftest* +fi + +eval echo "$ac_t""$ac_cv_struct_timeval" 1>&6 +if test $ac_cv_struct_timeval = yes; then + cat >> confdefs.h <<\EOF +#define HAVE_STRUCT_TIMEVAL 1 +EOF + +fi +echo $ac_n "checking for struct timezone in time.h or sys/time.h""... $ac_c" 1>&6 +echo "configure:9673: checking for struct timezone in time.h or sys/time.h" >&5 +if eval "test \"`echo '$''{'ac_cv_struct_timezone'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +#ifdef TIME_WITH_SYS_TIME_H +# include +# include +#else +#ifdef HAVE_SYS_TIME_H +# include +#else +# include +#endif +#endif +int main() { +struct timezone tz; +; return 0; } +EOF +if { eval echo configure:9696: \"$ac_compile\" 1>&5; eval $ac_compile 2>&5; }; then + rm -rf conftest* + ac_cv_struct_timezone=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + ac_cv_struct_timezone=no +fi +rm -f conftest* +fi + +eval echo "$ac_t""$ac_cv_struct_timezone" 1>&6 +if test $ac_cv_struct_timezone = yes; then + cat >> confdefs.h <<\EOF +#define HAVE_STRUCT_TIMEZONE 1 +EOF + +fi +echo $ac_n "checking for struct timespec in time.h or sys/time.h""... $ac_c" 1>&6 +echo "configure:9716: checking for struct timespec in time.h or sys/time.h" >&5 +if eval "test \"`echo '$''{'ac_cv_struct_timespec'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +#ifdef TIME_WITH_SYS_TIME_H +# include +# include +#else +#ifdef HAVE_SYS_TIME_H +# include +#else +# include +#endif +#endif +int main() { +struct timespec ts; +; return 0; } +EOF +if { eval echo configure:9739: \"$ac_compile\" 1>&5; eval $ac_compile 2>&5; }; then + rm -rf conftest* + ac_cv_struct_timespec=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + ac_cv_struct_timespec=no +fi +rm -f conftest* +fi + +eval echo "$ac_t""$ac_cv_struct_timespec" 1>&6 +if test $ac_cv_struct_timespec = yes; then + cat >> confdefs.h <<\EOF +#define HAVE_STRUCT_TIMESPEC 1 +EOF + +fi +echo $ac_n "checking if struct mtget contains mt_type""... $ac_c" 1>&6 +echo "configure:9759: checking if struct mtget contains mt_type" >&5 +if eval "test \"`echo '$''{'ac_cv_struct_mtget_type'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +#include +int main() { +struct mtget t; t.mt_type = 0; +; return 0; } +EOF +if { eval echo configure:9772: \"$ac_compile\" 1>&5; eval $ac_compile 2>&5; }; then + rm -rf conftest* + ac_cv_struct_mtget_type=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + ac_cv_struct_mtget_type=no +fi +rm -f conftest* +fi + +eval echo "$ac_t""$ac_cv_struct_mtget_type" 1>&6 +if test $ac_cv_struct_mtget_type = yes; then + cat >> confdefs.h <<\EOF +#define HAVE_MTGET_TYPE 1 +EOF + +fi +echo $ac_n "checking if struct mtget contains mt_model""... $ac_c" 1>&6 +echo "configure:9792: checking if struct mtget contains mt_model" >&5 +if eval "test \"`echo '$''{'ac_cv_struct_mtget_model'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +#include +int main() { +struct mtget t; t.mt_model = 0; +; return 0; } +EOF +if { eval echo configure:9805: \"$ac_compile\" 1>&5; eval $ac_compile 2>&5; }; then + rm -rf conftest* + ac_cv_struct_mtget_model=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + ac_cv_struct_mtget_model=no +fi +rm -f conftest* +fi + +eval echo "$ac_t""$ac_cv_struct_mtget_model" 1>&6 +if test $ac_cv_struct_mtget_model = yes; then + cat >> confdefs.h <<\EOF +#define HAVE_MTGET_MODEL 1 +EOF + +fi +echo $ac_n "checking if struct mtget contains mt_dsreg""... $ac_c" 1>&6 +echo "configure:9825: checking if struct mtget contains mt_dsreg" >&5 +if eval "test \"`echo '$''{'ac_cv_struct_mtget_dsreg'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +#include +int main() { +struct mtget t; t.mt_dsreg = 0; +; return 0; } +EOF +if { eval echo configure:9838: \"$ac_compile\" 1>&5; eval $ac_compile 2>&5; }; then + rm -rf conftest* + ac_cv_struct_mtget_dsreg=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + ac_cv_struct_mtget_dsreg=no +fi +rm -f conftest* +fi + +eval echo "$ac_t""$ac_cv_struct_mtget_dsreg" 1>&6 +if test $ac_cv_struct_mtget_dsreg = yes; then + cat >> confdefs.h <<\EOF +#define HAVE_MTGET_DSREG 1 +EOF + +fi +echo $ac_n "checking if struct mtget contains mt_dsreg1""... $ac_c" 1>&6 +echo "configure:9858: checking if struct mtget contains mt_dsreg1" >&5 +if eval "test \"`echo '$''{'ac_cv_struct_mtget_dsreg1'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +#include +int main() { +struct mtget t; t.mt_dsreg1 = 0; +; return 0; } +EOF +if { eval echo configure:9871: \"$ac_compile\" 1>&5; eval $ac_compile 2>&5; }; then + rm -rf conftest* + ac_cv_struct_mtget_dsreg1=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + ac_cv_struct_mtget_dsreg1=no +fi +rm -f conftest* +fi + +eval echo "$ac_t""$ac_cv_struct_mtget_dsreg1" 1>&6 +if test $ac_cv_struct_mtget_dsreg1 = yes; then + cat >> confdefs.h <<\EOF +#define HAVE_MTGET_DSREG1 1 +EOF + +fi +echo $ac_n "checking if struct mtget contains mt_dsreg2""... $ac_c" 1>&6 +echo "configure:9891: checking if struct mtget contains mt_dsreg2" >&5 +if eval "test \"`echo '$''{'ac_cv_struct_mtget_dsreg2'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +#include +int main() { +struct mtget t; t.mt_dsreg2 = 0; +; return 0; } +EOF +if { eval echo configure:9904: \"$ac_compile\" 1>&5; eval $ac_compile 2>&5; }; then + rm -rf conftest* + ac_cv_struct_mtget_dsreg2=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + ac_cv_struct_mtget_dsreg2=no +fi +rm -f conftest* +fi + +eval echo "$ac_t""$ac_cv_struct_mtget_dsreg2" 1>&6 +if test $ac_cv_struct_mtget_dsreg2 = yes; then + cat >> confdefs.h <<\EOF +#define HAVE_MTGET_DSREG2 1 +EOF + +fi +echo $ac_n "checking if struct mtget contains mt_gstat""... $ac_c" 1>&6 +echo "configure:9924: checking if struct mtget contains mt_gstat" >&5 +if eval "test \"`echo '$''{'ac_cv_struct_mtget_gstat'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +#include +int main() { +struct mtget t; t.mt_gstat = 0; +; return 0; } +EOF +if { eval echo configure:9937: \"$ac_compile\" 1>&5; eval $ac_compile 2>&5; }; then + rm -rf conftest* + ac_cv_struct_mtget_gstat=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + ac_cv_struct_mtget_gstat=no +fi +rm -f conftest* +fi + +eval echo "$ac_t""$ac_cv_struct_mtget_gstat" 1>&6 +if test $ac_cv_struct_mtget_gstat = yes; then + cat >> confdefs.h <<\EOF +#define HAVE_MTGET_GSTAT 1 +EOF + +fi +echo $ac_n "checking if struct mtget contains mt_erreg""... $ac_c" 1>&6 +echo "configure:9957: checking if struct mtget contains mt_erreg" >&5 +if eval "test \"`echo '$''{'ac_cv_struct_mtget_erreg'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +#include +int main() { +struct mtget t; t.mt_erreg = 0; +; return 0; } +EOF +if { eval echo configure:9970: \"$ac_compile\" 1>&5; eval $ac_compile 2>&5; }; then + rm -rf conftest* + ac_cv_struct_mtget_erreg=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + ac_cv_struct_mtget_erreg=no +fi +rm -f conftest* +fi + +eval echo "$ac_t""$ac_cv_struct_mtget_erreg" 1>&6 +if test $ac_cv_struct_mtget_erreg = yes; then + cat >> confdefs.h <<\EOF +#define HAVE_MTGET_ERREG 1 +EOF + +fi +echo $ac_n "checking if struct mtget contains mt_resid""... $ac_c" 1>&6 +echo "configure:9990: checking if struct mtget contains mt_resid" >&5 +if eval "test \"`echo '$''{'ac_cv_struct_mtget_resid'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +#include +int main() { +struct mtget t; t.mt_resid = 0; +; return 0; } +EOF +if { eval echo configure:10003: \"$ac_compile\" 1>&5; eval $ac_compile 2>&5; }; then + rm -rf conftest* + ac_cv_struct_mtget_resid=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + ac_cv_struct_mtget_resid=no +fi +rm -f conftest* +fi + +eval echo "$ac_t""$ac_cv_struct_mtget_resid" 1>&6 +if test $ac_cv_struct_mtget_resid = yes; then + cat >> confdefs.h <<\EOF +#define HAVE_MTGET_RESID 1 +EOF + +fi +echo $ac_n "checking if struct mtget contains mt_fileno""... $ac_c" 1>&6 +echo "configure:10023: checking if struct mtget contains mt_fileno" >&5 +if eval "test \"`echo '$''{'ac_cv_struct_mtget_fileno'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +#include +int main() { +struct mtget t; t.mt_fileno = 0; +; return 0; } +EOF +if { eval echo configure:10036: \"$ac_compile\" 1>&5; eval $ac_compile 2>&5; }; then + rm -rf conftest* + ac_cv_struct_mtget_fileno=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + ac_cv_struct_mtget_fileno=no +fi +rm -f conftest* +fi + +eval echo "$ac_t""$ac_cv_struct_mtget_fileno" 1>&6 +if test $ac_cv_struct_mtget_fileno = yes; then + cat >> confdefs.h <<\EOF +#define HAVE_MTGET_FILENO 1 +EOF + +fi +echo $ac_n "checking if struct mtget contains mt_blkno""... $ac_c" 1>&6 +echo "configure:10056: checking if struct mtget contains mt_blkno" >&5 +if eval "test \"`echo '$''{'ac_cv_struct_mtget_blkno'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +#include +int main() { +struct mtget t; t.mt_blkno = 0; +; return 0; } +EOF +if { eval echo configure:10069: \"$ac_compile\" 1>&5; eval $ac_compile 2>&5; }; then + rm -rf conftest* + ac_cv_struct_mtget_blkno=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + ac_cv_struct_mtget_blkno=no +fi +rm -f conftest* +fi + +eval echo "$ac_t""$ac_cv_struct_mtget_blkno" 1>&6 +if test $ac_cv_struct_mtget_blkno = yes; then + cat >> confdefs.h <<\EOF +#define HAVE_MTGET_BLKNO 1 +EOF + +fi +echo $ac_n "checking if struct mtget contains mt_flags""... $ac_c" 1>&6 +echo "configure:10089: checking if struct mtget contains mt_flags" >&5 +if eval "test \"`echo '$''{'ac_cv_struct_mtget_flags'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +#include +int main() { +struct mtget t; t.mt_flags = 0; +; return 0; } +EOF +if { eval echo configure:10102: \"$ac_compile\" 1>&5; eval $ac_compile 2>&5; }; then + rm -rf conftest* + ac_cv_struct_mtget_flags=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + ac_cv_struct_mtget_flags=no +fi +rm -f conftest* +fi + +eval echo "$ac_t""$ac_cv_struct_mtget_flags" 1>&6 +if test $ac_cv_struct_mtget_flags = yes; then + cat >> confdefs.h <<\EOF +#define HAVE_MTGET_FLAGS 1 +EOF + +fi +echo $ac_n "checking if struct mtget contains mt_bf""... $ac_c" 1>&6 +echo "configure:10122: checking if struct mtget contains mt_bf" >&5 +if eval "test \"`echo '$''{'ac_cv_struct_mtget_bf'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +#include +int main() { +struct mtget t; t.mt_bf = 0; +; return 0; } +EOF +if { eval echo configure:10135: \"$ac_compile\" 1>&5; eval $ac_compile 2>&5; }; then + rm -rf conftest* + ac_cv_struct_mtget_bf=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + ac_cv_struct_mtget_bf=no +fi +rm -f conftest* +fi + +eval echo "$ac_t""$ac_cv_struct_mtget_bf" 1>&6 +if test $ac_cv_struct_mtget_bf = yes; then + cat >> confdefs.h <<\EOF +#define HAVE_MTGET_BF 1 +EOF + +fi +echo $ac_n "checking if struct rusage is declared in sys/resource.h""... $ac_c" 1>&6 +echo "configure:10155: checking if struct rusage is declared in sys/resource.h" >&5 +if eval "test \"`echo '$''{'ac_cv_struct_rusage'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +#include +int main() { +struct rusage r; +; return 0; } +EOF +if { eval echo configure:10168: \"$ac_compile\" 1>&5; eval $ac_compile 2>&5; }; then + rm -rf conftest* + ac_cv_struct_rusage=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + ac_cv_struct_rusage=no +fi +rm -f conftest* +fi + +eval echo "$ac_t""$ac_cv_struct_rusage" 1>&6 +if test $ac_cv_struct_rusage = yes; then + cat >> confdefs.h <<\EOF +#define HAVE_STRUCT_RUSAGE 1 +EOF + +fi +echo $ac_n "checking if struct siginfo contains si_utime""... $ac_c" 1>&6 +echo "configure:10188: checking if struct siginfo contains si_utime" >&5 +if eval "test \"`echo '$''{'ac_cv_struct_si_utime'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +#include +int main() { +struct siginfo si; si.si_utime = 0; +; return 0; } +EOF +if { eval echo configure:10201: \"$ac_compile\" 1>&5; eval $ac_compile 2>&5; }; then + rm -rf conftest* + ac_cv_struct_si_utime=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + ac_cv_struct_si_utime=no +fi +rm -f conftest* +fi + +eval echo "$ac_t""$ac_cv_struct_si_utime" 1>&6 +if test $ac_cv_struct_si_utime = yes; then + cat >> confdefs.h <<\EOF +#define HAVE_SI_UTIME 1 +EOF + +fi +echo $ac_n "checking if struct sockaddr_storage is declared in socket.h""... $ac_c" 1>&6 +echo "configure:10221: checking if struct sockaddr_storage is declared in socket.h" >&5 +if eval "test \"`echo '$''{'ac_cv_struct_sockaddr_storage'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +int main() { +struct sockaddr_storage ss; ss.ss_family = 0; exit (ss.ss_family == 0); +; return 0; } +EOF +if { eval echo configure:10233: \"$ac_compile\" 1>&5; eval $ac_compile 2>&5; }; then + rm -rf conftest* + ac_cv_struct_sockaddr_storage=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + ac_cv_struct_sockaddr_storage=no +fi +rm -f conftest* +fi + +eval echo "$ac_t""$ac_cv_struct_sockaddr_storage" 1>&6 +if test $ac_cv_struct_sockaddr_storage = yes; then + cat >> confdefs.h <<\EOF +#define HAVE_SOCKADDR_STORAGE 1 +EOF + +fi +echo $ac_n "checking if an illegal declaration for union semun in sys/sem.h exists""... $ac_c" 1>&6 +echo "configure:10253: checking if an illegal declaration for union semun in sys/sem.h exists" >&5 +if eval "test \"`echo '$''{'ac_cv_struct_union_semun'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +#include +#include +int main() { +union semun s; +; return 0; } +EOF +if { eval echo configure:10267: \"$ac_compile\" 1>&5; eval $ac_compile 2>&5; }; then + rm -rf conftest* + ac_cv_struct_union_semun=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + ac_cv_struct_union_semun=no +fi +rm -f conftest* +fi + +eval echo "$ac_t""$ac_cv_struct_union_semun" 1>&6 +if test $ac_cv_struct_union_semun = yes; then + cat >> confdefs.h <<\EOF +#define HAVE_UNION_SEMUN 1 +EOF + +fi +echo $ac_n "checking if union wait is declared in wait.h or sys/wait.h""... $ac_c" 1>&6 +echo "configure:10287: checking if union wait is declared in wait.h or sys/wait.h" >&5 +if eval "test \"`echo '$''{'ac_cv_struct_union_wait'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +#if defined(HAVE_WAIT_H) +# include +#else +#include +#endif +int main() { +union wait w; +; return 0; } +EOF +if { eval echo configure:10304: \"$ac_compile\" 1>&5; eval $ac_compile 2>&5; }; then + rm -rf conftest* + ac_cv_struct_union_wait=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + ac_cv_struct_union_wait=no +fi +rm -f conftest* +fi + +eval echo "$ac_t""$ac_cv_struct_union_wait" 1>&6 +if test $ac_cv_struct_union_wait = yes; then + cat >> confdefs.h <<\EOF +#define HAVE_UNION_WAIT 1 +EOF + +fi +echo $ac_n "checking if union wait is used by default""... $ac_c" 1>&6 +echo "configure:10324: checking if union wait is used by default" >&5 +if eval "test \"`echo '$''{'ac_cv_use_union_wait'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +#if defined(HAVE_WAIT_H) +# include +#else +#include +#endif +xxzzy WTERMSIG(status) +xxzzy WCOREDUMP(status) +xxzzy WEXITSTATUS(status) +xxzzy WSTOPSIG(status) +xxzzy WIFSTOPPED(status) +xxzzy WIFSIGNALED(status) +xxzzy WIFEXITED(status) +EOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + egrep "xxzzy.*x_|xxzzy.*union" >/dev/null 2>&1; then + rm -rf conftest* + ac_cv_use_union_wait=yes +else + rm -rf conftest* + ac_cv_use_union_wait=no +fi +rm -f conftest* + +fi +eval echo "$ac_t""$ac_cv_use_union_wait" 1>&6 +if test $ac_cv_use_union_wait = yes; then + cat >> confdefs.h <<\EOF +#define USE_UNION_WAIT 1 +EOF + +fi +echo $ac_n "checking if struct stat contains st_spare1""... $ac_c" 1>&6 +echo "configure:10364: checking if struct stat contains st_spare1" >&5 +if eval "test \"`echo '$''{'ac_cv_struct_st_spare1'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +#include +int main() { +struct stat s; s.st_spare1 = 0; +; return 0; } +EOF +if { eval echo configure:10377: \"$ac_compile\" 1>&5; eval $ac_compile 2>&5; }; then + rm -rf conftest* + ac_cv_struct_st_spare1=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + ac_cv_struct_st_spare1=no +fi +rm -f conftest* +fi + +eval echo "$ac_t""$ac_cv_struct_st_spare1" 1>&6 +if test $ac_cv_struct_st_spare1 = yes; then + cat >> confdefs.h <<\EOF +#define HAVE_ST_SPARE1 1 +EOF + +fi +echo $ac_n "checking if struct stat contains st_atimensec""... $ac_c" 1>&6 +echo "configure:10397: checking if struct stat contains st_atimensec" >&5 +if eval "test \"`echo '$''{'ac_cv_struct_st_atimensec'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +#include +int main() { +struct stat s; s.st_atimensec = 0; +; return 0; } +EOF +if { eval echo configure:10410: \"$ac_compile\" 1>&5; eval $ac_compile 2>&5; }; then + rm -rf conftest* + ac_cv_struct_st_atimensec=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + ac_cv_struct_st_atimensec=no +fi +rm -f conftest* +fi + +eval echo "$ac_t""$ac_cv_struct_st_atimensec" 1>&6 +if test $ac_cv_struct_st_atimensec = yes; then + cat >> confdefs.h <<\EOF +#define HAVE_ST_ATIMENSEC 1 +EOF + +fi +echo $ac_n "checking if struct stat contains st_atime_n""... $ac_c" 1>&6 +echo "configure:10430: checking if struct stat contains st_atime_n" >&5 +if eval "test \"`echo '$''{'ac_cv_struct_st_atime_n'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +#include +int main() { +struct stat s; s.st_atime_n = 0; +; return 0; } +EOF +if { eval echo configure:10443: \"$ac_compile\" 1>&5; eval $ac_compile 2>&5; }; then + rm -rf conftest* + ac_cv_struct_st_atime_n=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + ac_cv_struct_st_atime_n=no +fi +rm -f conftest* +fi + +eval echo "$ac_t""$ac_cv_struct_st_atime_n" 1>&6 +if test $ac_cv_struct_st_atime_n = yes; then + cat >> confdefs.h <<\EOF +#define HAVE_ST_ATIME_N 1 +EOF + +fi +echo $ac_n "checking if struct stat contains st_atim.tv_nsec""... $ac_c" 1>&6 +echo "configure:10463: checking if struct stat contains st_atim.tv_nsec" >&5 +if eval "test \"`echo '$''{'ac_cv_struct_st_nsec'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +#include +int main() { +struct stat s; s.st_atim.tv_nsec = 0; +; return 0; } +EOF +if { eval echo configure:10476: \"$ac_compile\" 1>&5; eval $ac_compile 2>&5; }; then + rm -rf conftest* + ac_cv_struct_st_nsec=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + ac_cv_struct_st_nsec=no +fi +rm -f conftest* +fi + +eval echo "$ac_t""$ac_cv_struct_st_nsec" 1>&6 +if test $ac_cv_struct_st_nsec = yes; then + cat >> confdefs.h <<\EOF +#define HAVE_ST_NSEC 1 +EOF + +fi +echo $ac_n "checking if struct stat contains st_atim.st__tim.tv_nsec""... $ac_c" 1>&6 +echo "configure:10496: checking if struct stat contains st_atim.st__tim.tv_nsec" >&5 +if eval "test \"`echo '$''{'ac_cv_struct_st__tim'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +#include +int main() { +struct stat s; s.st_atim.st__tim.tv_nsec = 0; +; return 0; } +EOF +if { eval echo configure:10509: \"$ac_compile\" 1>&5; eval $ac_compile 2>&5; }; then + rm -rf conftest* + ac_cv_struct_st__tim=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + ac_cv_struct_st__tim=no +fi +rm -f conftest* +fi + +eval echo "$ac_t""$ac_cv_struct_st__tim" 1>&6 +if test $ac_cv_struct_st__tim = yes; then + cat >> confdefs.h <<\EOF +#define HAVE_ST__TIM 1 +EOF + +fi +echo $ac_n "checking if struct stat contains st_atimespec.tv_nsec""... $ac_c" 1>&6 +echo "configure:10529: checking if struct stat contains st_atimespec.tv_nsec" >&5 +if eval "test \"`echo '$''{'ac_cv_struct_st_atimespec'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +#include +int main() { +struct stat s; s.st_atimespec.tv_nsec = 0; +; return 0; } +EOF +if { eval echo configure:10542: \"$ac_compile\" 1>&5; eval $ac_compile 2>&5; }; then + rm -rf conftest* + ac_cv_struct_st_atimespec=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + ac_cv_struct_st_atimespec=no +fi +rm -f conftest* +fi + +eval echo "$ac_t""$ac_cv_struct_st_atimespec" 1>&6 +if test $ac_cv_struct_st_atimespec = yes; then + cat >> confdefs.h <<\EOF +#define HAVE_ST_ATIMESPEC 1 +EOF + +fi +echo $ac_n "checking for st_blksize in struct stat""... $ac_c" 1>&6 +echo "configure:10562: checking for st_blksize in struct stat" >&5 +if eval "test \"`echo '$''{'ac_cv_struct_st_blksize'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +#include +int main() { +struct stat s; s.st_blksize; +; return 0; } +EOF +if { eval echo configure:10575: \"$ac_compile\" 1>&5; eval $ac_compile 2>&5; }; then + rm -rf conftest* + ac_cv_struct_st_blksize=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + ac_cv_struct_st_blksize=no +fi +rm -f conftest* +fi + +eval echo "$ac_t""$ac_cv_struct_st_blksize" 1>&6 +if test $ac_cv_struct_st_blksize = yes; then + cat >> confdefs.h <<\EOF +#define HAVE_ST_BLKSIZE 1 +EOF + +fi + +echo $ac_n "checking for st_blocks in struct stat""... $ac_c" 1>&6 +echo "configure:10596: checking for st_blocks in struct stat" >&5 +if eval "test \"`echo '$''{'ac_cv_struct_st_blocks'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +#include +int main() { +struct stat s; s.st_blocks; +; return 0; } +EOF +if { eval echo configure:10609: \"$ac_compile\" 1>&5; eval $ac_compile 2>&5; }; then + rm -rf conftest* + ac_cv_struct_st_blocks=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + ac_cv_struct_st_blocks=no +fi +rm -f conftest* +fi + +eval echo "$ac_t""$ac_cv_struct_st_blocks" 1>&6 +if test $ac_cv_struct_st_blocks = yes; then + cat >> confdefs.h <<\EOF +#define HAVE_ST_BLOCKS 1 +EOF + +else + LIBOBJS="$LIBOBJS fileblocks.${ac_objext}" +fi + +echo $ac_n "checking if struct stat contains st_fstype""... $ac_c" 1>&6 +echo "configure:10632: checking if struct stat contains st_fstype" >&5 +if eval "test \"`echo '$''{'ac_cv_struct_st_fstype'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +#include +int main() { +struct stat s; s.st_fstype[0] = 0; +; return 0; } +EOF +if { eval echo configure:10645: \"$ac_compile\" 1>&5; eval $ac_compile 2>&5; }; then + rm -rf conftest* + ac_cv_struct_st_fstype=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + ac_cv_struct_st_fstype=no +fi +rm -f conftest* +fi + +eval echo "$ac_t""$ac_cv_struct_st_fstype" 1>&6 +if test $ac_cv_struct_st_fstype = yes; then + cat >> confdefs.h <<\EOF +#define HAVE_ST_FSTYPE 1 +EOF + +fi +echo $ac_n "checking if struct stat contains st_aclcnt""... $ac_c" 1>&6 +echo "configure:10665: checking if struct stat contains st_aclcnt" >&5 +if eval "test \"`echo '$''{'ac_cv_struct_st_aclcnt'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +#include +int main() { +struct stat s; s.st_aclcnt = 0; +; return 0; } +EOF +if { eval echo configure:10678: \"$ac_compile\" 1>&5; eval $ac_compile 2>&5; }; then + rm -rf conftest* + ac_cv_struct_st_aclcnt=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + ac_cv_struct_st_aclcnt=no +fi +rm -f conftest* +fi + +eval echo "$ac_t""$ac_cv_struct_st_aclcnt" 1>&6 +if test $ac_cv_struct_st_aclcnt = yes; then + cat >> confdefs.h <<\EOF +#define HAVE_ST_ACLCNT 1 +EOF + +fi +echo $ac_n "checking for st_rdev in struct stat""... $ac_c" 1>&6 +echo "configure:10698: checking for st_rdev in struct stat" >&5 +if eval "test \"`echo '$''{'ac_cv_struct_st_rdev'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +#include +int main() { +struct stat s; s.st_rdev; +; return 0; } +EOF +if { eval echo configure:10711: \"$ac_compile\" 1>&5; eval $ac_compile 2>&5; }; then + rm -rf conftest* + ac_cv_struct_st_rdev=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + ac_cv_struct_st_rdev=no +fi +rm -f conftest* +fi + +eval echo "$ac_t""$ac_cv_struct_st_rdev" 1>&6 +if test $ac_cv_struct_st_rdev = yes; then + cat >> confdefs.h <<\EOF +#define HAVE_ST_RDEV 1 +EOF + +fi + +echo $ac_n "checking if struct stat contains st_flag""... $ac_c" 1>&6 +echo "configure:10732: checking if struct stat contains st_flag" >&5 +if eval "test \"`echo '$''{'ac_cv_struct_st_flag'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +#include +int main() { +struct stat s; s.st_flag = 0; +; return 0; } +EOF +if { eval echo configure:10745: \"$ac_compile\" 1>&5; eval $ac_compile 2>&5; }; then + rm -rf conftest* + ac_cv_struct_st_flag=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + ac_cv_struct_st_flag=no +fi +rm -f conftest* +fi + +eval echo "$ac_t""$ac_cv_struct_st_flag" 1>&6 +if test $ac_cv_struct_st_flag = yes; then + cat >> confdefs.h <<\EOF +#define HAVE_ST_FLAG 1 +EOF + +fi +echo $ac_n "checking if struct stat contains st_flags""... $ac_c" 1>&6 +echo "configure:10765: checking if struct stat contains st_flags" >&5 +if eval "test \"`echo '$''{'ac_cv_struct_st_flags'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +#include +int main() { +struct stat s; s.st_flags = 0; +; return 0; } +EOF +if { eval echo configure:10778: \"$ac_compile\" 1>&5; eval $ac_compile 2>&5; }; then + rm -rf conftest* + ac_cv_struct_st_flags=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + ac_cv_struct_st_flags=no +fi +rm -f conftest* +fi + +eval echo "$ac_t""$ac_cv_struct_st_flags" 1>&6 +if test $ac_cv_struct_st_flags = yes; then + cat >> confdefs.h <<\EOF +#define HAVE_ST_FLAGS 1 +EOF + +fi +echo $ac_n "checking if struct dirent contains d_ino""... $ac_c" 1>&6 +echo "configure:10798: checking if struct dirent contains d_ino" >&5 +if eval "test \"`echo '$''{'ac_cv_struct_dirent_d_ino'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +#endif +#ifdef HAVE_SYS_STAT_H +# include +#endif +# ifdef HAVE_DIRENT_H /* This a POSIX compliant system */ +# include +# define _FOUND_DIR_ +# else /* This is a Pre POSIX system */ + +# define dirent direct + +# if defined(HAVE_SYS_DIR_H) +# include +# define _FOUND_DIR_ +# endif + +# if defined(HAVE_NDIR_H) && !defined(_FOUND_DIR_) +# include +# define _FOUND_DIR_ +# endif + +# if defined(HAVE_SYS_NDIR_H) && !defined(_FOUND_DIR_) +# include +# define _FOUND_DIR_ +# endif +# endif /* HAVE_DIRENT_H */ + +int main() { +struct dirent d; d.d_ino = 0; +; return 0; } +EOF +if { eval echo configure:10842: \"$ac_compile\" 1>&5; eval $ac_compile 2>&5; }; then + rm -rf conftest* + ac_cv_struct_dirent_d_ino=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + ac_cv_struct_dirent_d_ino=no +fi +rm -f conftest* +fi + +eval echo "$ac_t""$ac_cv_struct_dirent_d_ino" 1>&6 +if test $ac_cv_struct_dirent_d_ino = yes; then + cat >> confdefs.h <<\EOF +#define HAVE_DIRENT_D_INO 1 +EOF + +fi +echo $ac_n "checking if struct dirent contains d_type""... $ac_c" 1>&6 +echo "configure:10862: checking if struct dirent contains d_type" >&5 +if eval "test \"`echo '$''{'ac_cv_struct_dirent_d_type'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +#endif +#ifdef HAVE_SYS_STAT_H +# include +#endif +# ifdef HAVE_DIRENT_H /* This a POSIX compliant system */ +# include +# define _FOUND_DIR_ +# else /* This is a Pre POSIX system */ + +# define dirent direct + +# if defined(HAVE_SYS_DIR_H) +# include +# define _FOUND_DIR_ +# endif + +# if defined(HAVE_NDIR_H) && !defined(_FOUND_DIR_) +# include +# define _FOUND_DIR_ +# endif + +# if defined(HAVE_SYS_NDIR_H) && !defined(_FOUND_DIR_) +# include +# define _FOUND_DIR_ +# endif +# endif /* HAVE_DIRENT_H */ + +int main() { +struct dirent d; d.d_type = 0; +; return 0; } +EOF +if { eval echo configure:10906: \"$ac_compile\" 1>&5; eval $ac_compile 2>&5; }; then + rm -rf conftest* + ac_cv_struct_dirent_d_type=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + ac_cv_struct_dirent_d_type=no +fi +rm -f conftest* +fi + +eval echo "$ac_t""$ac_cv_struct_dirent_d_type" 1>&6 +if test $ac_cv_struct_dirent_d_type = yes; then + cat >> confdefs.h <<\EOF +#define HAVE_DIRENT_D_TYPE 1 +EOF + +fi +echo $ac_n "checking if DIR * contains dd_fd""... $ac_c" 1>&6 +echo "configure:10926: checking if DIR * contains dd_fd" >&5 +if eval "test \"`echo '$''{'ac_cv_struct_dir_dd_fd'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +int main() { +DIR d; d.dd_fd = 0; exit (d.dd_fd == 0); +; return 0; } +EOF +if { eval echo configure:10938: \"$ac_compile\" 1>&5; eval $ac_compile 2>&5; }; then + rm -rf conftest* + ac_cv_struct_dir_dd_fd=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + ac_cv_struct_dir_dd_fd=no +fi +rm -f conftest* +fi + +eval echo "$ac_t""$ac_cv_struct_dir_dd_fd" 1>&6 +if test $ac_cv_struct_dir_dd_fd = yes; then + cat >> confdefs.h <<\EOF +#define HAVE_DIR_DD_FD 1 +EOF + +fi +echo $ac_n "checking if struct utsname contains arch""... $ac_c" 1>&6 +echo "configure:10958: checking if struct utsname contains arch" >&5 +if eval "test \"`echo '$''{'ac_cv_struct_utsname_arch'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +int main() { +struct utsname u; u.arch[0] = 0; +; return 0; } +EOF +if { eval echo configure:10970: \"$ac_compile\" 1>&5; eval $ac_compile 2>&5; }; then + rm -rf conftest* + ac_cv_struct_utsname_arch=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + ac_cv_struct_utsname_arch=no +fi +rm -f conftest* +fi + +eval echo "$ac_t""$ac_cv_struct_utsname_arch" 1>&6 +if test $ac_cv_struct_utsname_arch = yes; then + cat >> confdefs.h <<\EOF +#define HAVE_UTSNAME_ARCH 1 +EOF + +fi +echo $ac_n "checking if struct utsname contains processor""... $ac_c" 1>&6 +echo "configure:10990: checking if struct utsname contains processor" >&5 +if eval "test \"`echo '$''{'ac_cv_struct_utsname_processor'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +int main() { +struct utsname u; u.processor[0] = 0; +; return 0; } +EOF +if { eval echo configure:11002: \"$ac_compile\" 1>&5; eval $ac_compile 2>&5; }; then + rm -rf conftest* + ac_cv_struct_utsname_processor=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + ac_cv_struct_utsname_processor=no +fi +rm -f conftest* +fi + +eval echo "$ac_t""$ac_cv_struct_utsname_processor" 1>&6 +if test $ac_cv_struct_utsname_processor = yes; then + cat >> confdefs.h <<\EOF +#define HAVE_UTSNAME_PROCESSOR 1 +EOF + +fi +echo $ac_n "checking if struct utsname contains sysname_host""... $ac_c" 1>&6 +echo "configure:11022: checking if struct utsname contains sysname_host" >&5 +if eval "test \"`echo '$''{'ac_cv_struct_utsname_sysname_host'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +int main() { +struct utsname u; u.sysname_host[0] = 0; +; return 0; } +EOF +if { eval echo configure:11034: \"$ac_compile\" 1>&5; eval $ac_compile 2>&5; }; then + rm -rf conftest* + ac_cv_struct_utsname_sysname_host=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + ac_cv_struct_utsname_sysname_host=no +fi +rm -f conftest* +fi + +eval echo "$ac_t""$ac_cv_struct_utsname_sysname_host" 1>&6 +if test $ac_cv_struct_utsname_sysname_host = yes; then + cat >> confdefs.h <<\EOF +#define HAVE_UTSNAME_SYSNAME_HOST 1 +EOF + +fi +echo $ac_n "checking if struct utsname contains release_host""... $ac_c" 1>&6 +echo "configure:11054: checking if struct utsname contains release_host" >&5 +if eval "test \"`echo '$''{'ac_cv_struct_utsname_release_host'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +int main() { +struct utsname u; u.release_host[0] = 0; +; return 0; } +EOF +if { eval echo configure:11066: \"$ac_compile\" 1>&5; eval $ac_compile 2>&5; }; then + rm -rf conftest* + ac_cv_struct_utsname_release_host=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + ac_cv_struct_utsname_release_host=no +fi +rm -f conftest* +fi + +eval echo "$ac_t""$ac_cv_struct_utsname_release_host" 1>&6 +if test $ac_cv_struct_utsname_release_host = yes; then + cat >> confdefs.h <<\EOF +#define HAVE_UTSNAME_RELEASE_HOST 1 +EOF + +fi +echo $ac_n "checking if struct utsname contains version_host""... $ac_c" 1>&6 +echo "configure:11086: checking if struct utsname contains version_host" >&5 +if eval "test \"`echo '$''{'ac_cv_struct_utsname_version_host'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +int main() { +struct utsname u; u.version_host[0] = 0; +; return 0; } +EOF +if { eval echo configure:11098: \"$ac_compile\" 1>&5; eval $ac_compile 2>&5; }; then + rm -rf conftest* + ac_cv_struct_utsname_version_host=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + ac_cv_struct_utsname_version_host=no +fi +rm -f conftest* +fi + +eval echo "$ac_t""$ac_cv_struct_utsname_version_host" 1>&6 +if test $ac_cv_struct_utsname_version_host = yes; then + cat >> confdefs.h <<\EOF +#define HAVE_UTSNAME_VERSION_HOST 1 +EOF + +fi + +echo $ac_n "checking whether iconv() uses const char **""... $ac_c" 1>&6 +echo "configure:11119: checking whether iconv() uses const char **" >&5 +if eval "test \"`echo '$''{'ac_cv_iconv_const'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.c < +EOF +if { ac_try='${CC-cc} -E conftest.c'; { eval echo configure:11126: \"$ac_try\" 1>&5; eval $ac_try 2>&5; }; } | grep 'size_t.*iconv.*iconv_t.*const' >/dev/null 2>&1; then + ac_cv_iconv_const=yes +else + ac_cv_iconv_const=no +fi +fi + +eval echo "$ac_t""$ac_cv_iconv_const" 1>&6 +if test $ac_cv_iconv_const = yes; then + cat >> confdefs.h <<\EOF +#define HAVE_ICONV_CONST 1 +EOF + +fi + +echo $ac_n "checking if stat is declared""... $ac_c" 1>&6 +echo "configure:11142: checking if stat is declared" >&5 +if eval "test \"`echo '$''{'ac_cv_have_decl_stat'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +#include +int main() { + char *p = (char *) stat; exit (p != (char *)0 && *p != 0); +; return 0; } +EOF +if { eval echo configure:11156: \"$ac_compile\" 1>&5; eval $ac_compile 2>&5; }; then + rm -rf conftest* + eval ac_cv_have_decl_stat=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval ac_cv_have_decl_stat=no +fi +rm -f conftest* +fi + +eval echo "$ac_t""$ac_cv_have_decl_stat" 1>&6 + ac_tr_decl=HAVE_DECL_`echo stat | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` +if test $ac_cv_have_decl_stat = yes; then + cat >> confdefs.h <&6 +echo "configure:11177: checking if lstat is declared" >&5 +if eval "test \"`echo '$''{'ac_cv_have_decl_lstat'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +#include +int main() { + char *p = (char *) lstat; exit (p != (char *)0 && *p != 0); +; return 0; } +EOF +if { eval echo configure:11191: \"$ac_compile\" 1>&5; eval $ac_compile 2>&5; }; then + rm -rf conftest* + eval ac_cv_have_decl_lstat=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval ac_cv_have_decl_lstat=no +fi +rm -f conftest* +fi + +eval echo "$ac_t""$ac_cv_have_decl_lstat" 1>&6 + ac_tr_decl=HAVE_DECL_`echo lstat | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` +if test $ac_cv_have_decl_lstat = yes; then + cat >> confdefs.h <&6 +echo "configure:11213: checking for wait3 that fills in rusage" >&5 +if eval "test \"`echo '$''{'ac_cv_func_wait3_rusage'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test "$cross_compiling" = yes; then + ac_cv_func_wait3_rusage=no +else + cat > conftest.$ac_ext < +#include +#include +#include +/* HP-UX has wait3 but does not fill in rusage at all. */ +main() { + struct rusage r; + int i; + /* Use a field that we can force nonzero -- + voluntary context switches. + For systems like NeXT and OSF/1 that don't set it, + also use the system CPU time. And page faults (I/O) for Linux. */ + r.ru_nvcsw = 0; + r.ru_utime.tv_sec = 0; + r.ru_utime.tv_usec = 0; + r.ru_stime.tv_sec = 0; + r.ru_stime.tv_usec = 0; + r.ru_majflt = r.ru_minflt = 0; + switch (fork()) { + case 0: /* Child. */ + sleep(1); /* Give up the CPU. */ + for (i=200000; --i > 0;) getpid(); /* Use up some CPU time */ + _exit(0); + case -1: _exit(0); /* What can we do? */ + default: /* Parent. */ + wait3(&i, 0, &r); + sleep(2); /* Avoid "text file busy" from rm on fast HP-UX machines. */ + exit(r.ru_nvcsw == 0 && r.ru_majflt == 0 && r.ru_minflt == 0 + && r.ru_utime.tv_sec == 0 && r.ru_utime.tv_usec == 0 + && r.ru_stime.tv_sec == 0 && r.ru_stime.tv_usec == 0); + } +} +EOF +if { eval echo configure:11256: \"$ac_link\" 1>&5; eval $ac_link 2>&5; } && test -s conftest${ac_exeext} && ($rmtcall ./conftest${ac_xexeext}; exit) 2>/dev/null +then + ac_cv_func_wait3_rusage=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* + ac_cv_func_wait3_rusage=no +fi +rm -fr conftest* +fi + +fi + +eval echo "$ac_t""$ac_cv_func_wait3_rusage" 1>&6 +if test $ac_cv_func_wait3_rusage = yes; then + cat >> confdefs.h <<\EOF +#define HAVE_WAIT3 1 +EOF + +fi + +echo $ac_n "checking for mlock""... $ac_c" 1>&6 +echo "configure:11279: checking for mlock" >&5 +if eval "test \"`echo '$''{'ac_cv_func_mlock'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test "$cross_compiling" = yes; then + { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } +else + cat > conftest.$ac_ext < +#include +#ifndef HAVE_ERRNO_DEF +extern int errno; +#endif + +main() +{ + if (mlock(0, 0) < 0) { + if (errno == EINVAL || errno == ENOMEM || + errno == EPERM || errno == EACCES) + exit(0); + exit(-1); + } + exit(0); +} +EOF +if { eval echo configure:11307: \"$ac_link\" 1>&5; eval $ac_link 2>&5; } && test -s conftest${ac_exeext} && ($rmtcall ./conftest${ac_xexeext}; exit) 2>/dev/null +then + ac_cv_func_mlock=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* + ac_cv_func_mlock=no +fi +rm -fr conftest* +fi + +rm -f core core.* *.core +fi + +eval echo "$ac_t""$ac_cv_func_mlock" 1>&6 +if test $ac_cv_func_mlock = yes; then + cat >> confdefs.h <<\EOF +#define HAVE_MLOCK 1 +EOF + +fi +echo $ac_n "checking for mlockall""... $ac_c" 1>&6 +echo "configure:11330: checking for mlockall" >&5 +if eval "test \"`echo '$''{'ac_cv_func_mlockall'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test "$cross_compiling" = yes; then + { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } +else + cat > conftest.$ac_ext < +#include +#include +#ifndef HAVE_ERRNO_DEF +extern int errno; +#endif + +int +main() +{ + if (mlockall(MCL_CURRENT|MCL_FUTURE) < 0) { + if (errno == EINVAL || errno == ENOMEM || + errno == EPERM || errno == EACCES) + exit(0); + exit(-1); + } + exit(0); +} + +EOF +if { eval echo configure:11361: \"$ac_link\" 1>&5; eval $ac_link 2>&5; } && test -s conftest${ac_exeext} && ($rmtcall ./conftest${ac_xexeext}; exit) 2>/dev/null +then + ac_cv_func_mlockall=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* + ac_cv_func_mlockall=no +fi +rm -fr conftest* +fi + +rm -f core core.* *.core +fi + +eval echo "$ac_t""$ac_cv_func_mlockall" 1>&6 +if test $ac_cv_func_mlockall = yes; then + cat >> confdefs.h <<\EOF +#define HAVE_MLOCKALL 1 +EOF + +fi +echo $ac_n "checking for va_copy""... $ac_c" 1>&6 +echo "configure:11384: checking for va_copy" >&5 +if eval "test \"`echo '$''{'ac_cv_func_va_copy'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +#else +# include +#endif +int main() { + +va_list a, b; + +va_copy(a, b); +; return 0; } +EOF +if { eval echo configure:11404: \"$ac_link\" 1>&5; eval $ac_link 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + ac_cv_func_va_copy=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + ac_cv_func_va_copy=no +fi +rm -f conftest* +fi + +eval echo "$ac_t""$ac_cv_func_va_copy" 1>&6 +if test $ac_cv_func_va_copy = yes; then + cat >> confdefs.h <<\EOF +#define HAVE_VA_COPY 1 +EOF + +fi +echo $ac_n "checking for __va_copy""... $ac_c" 1>&6 +echo "configure:11424: checking for __va_copy" >&5 +if eval "test \"`echo '$''{'ac_cv_func__va_copy'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +#else +# include +#endif +int main() { + +va_list a, b; + +__va_copy(a, b); +; return 0; } +EOF +if { eval echo configure:11444: \"$ac_link\" 1>&5; eval $ac_link 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + ac_cv_func__va_copy=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + ac_cv_func__va_copy=no +fi +rm -f conftest* +fi + +eval echo "$ac_t""$ac_cv_func__va_copy" 1>&6 +if test $ac_cv_func__va_copy = yes; then + cat >> confdefs.h <<\EOF +#define HAVE__VA_COPY 1 +EOF + +fi +echo $ac_n "checking for working ecvt() ""... $ac_c" 1>&6 +echo "configure:11464: checking for working ecvt() " >&5 +if eval "test \"`echo '$''{'ac_cv_func_ecvt'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test "$cross_compiling" = yes; then + { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } +else + cat > conftest.$ac_ext <&5; eval $ac_link 2>&5; } && test -s conftest${ac_exeext} && ($rmtcall ./conftest${ac_xexeext}; exit) 2>/dev/null +then + ac_cv_func_ecvt=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* + ac_cv_func_ecvt=no +fi +rm -fr conftest* +fi + +fi + +eval echo "$ac_t""$ac_cv_func_ecvt" 1>&6 +if test $ac_cv_func_ecvt = yes; then + cat >> confdefs.h <<\EOF +#define HAVE_ECVT 1 +EOF + +fi +echo $ac_n "checking for working fcvt() ""... $ac_c" 1>&6 +echo "configure:11514: checking for working fcvt() " >&5 +if eval "test \"`echo '$''{'ac_cv_func_fcvt'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test "$cross_compiling" = yes; then + { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } +else + cat > conftest.$ac_ext <&5; eval $ac_link 2>&5; } && test -s conftest${ac_exeext} && ($rmtcall ./conftest${ac_xexeext}; exit) 2>/dev/null +then + ac_cv_func_fcvt=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* + ac_cv_func_fcvt=no +fi +rm -fr conftest* +fi + +fi + +eval echo "$ac_t""$ac_cv_func_fcvt" 1>&6 +if test $ac_cv_func_fcvt = yes; then + cat >> confdefs.h <<\EOF +#define HAVE_FCVT 1 +EOF + +fi +echo $ac_n "checking for working gcvt() ""... $ac_c" 1>&6 +echo "configure:11564: checking for working gcvt() " >&5 +if eval "test \"`echo '$''{'ac_cv_func_gcvt'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test "$cross_compiling" = yes; then + { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } +else + cat > conftest.$ac_ext <&5; eval $ac_link 2>&5; } && test -s conftest${ac_exeext} && ($rmtcall ./conftest${ac_xexeext}; exit) 2>/dev/null +then + ac_cv_func_gcvt=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* + ac_cv_func_gcvt=no +fi +rm -fr conftest* +fi + +fi + +eval echo "$ac_t""$ac_cv_func_gcvt" 1>&6 +if test $ac_cv_func_gcvt = yes; then + cat >> confdefs.h <<\EOF +#define HAVE_GCVT 1 +EOF + +fi +echo $ac_n "checking for __dtoa""... $ac_c" 1>&6 +echo "configure:11614: checking for __dtoa" >&5 +if eval "test \"`echo '$''{'ac_cv_func_dtoa'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext <&5; eval $ac_link 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + ac_cv_func_dtoa=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + ac_cv_func_dtoa=no +fi +rm -f conftest* +fi + +eval echo "$ac_t""$ac_cv_func_dtoa" 1>&6 +if test $ac_cv_func_dtoa = yes; then + cat >> confdefs.h <<\EOF +#define HAVE_DTOA 1 +EOF + +fi +echo $ac_n "checking for __dtoa that needs result ptr""... $ac_c" 1>&6 +echo "configure:11647: checking for __dtoa that needs result ptr" >&5 +if eval "test \"`echo '$''{'ac_cv_func_dtoa_r'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test "$cross_compiling" = yes; then + { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } +else + cat > conftest.$ac_ext <&5; eval $ac_link 2>&5; } && test -s conftest${ac_exeext} && ($rmtcall ./conftest${ac_xexeext}; exit) 2>/dev/null +then + ac_cv_func_dtoa_r=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* + ac_cv_func_dtoa_r=no +fi +rm -fr conftest* +fi + +fi + +eval echo "$ac_t""$ac_cv_func_dtoa_r" 1>&6 +if test $ac_cv_func_dtoa_r = yes; then + cat >> confdefs.h <<\EOF +#define HAVE_DTOA_R 1 +EOF + +fi +echo $ac_n "checking if getpagesize is defined or function""... $ac_c" 1>&6 +echo "configure:11698: checking if getpagesize is defined or function" >&5 +if eval "test \"`echo '$''{'"ac_cv_have_getpagesize"'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +#endif + +int main() { + +#ifndef getpagesize + char *p = (char *) getpagesize; + exit (p != (char *)0 && *p != 0); +#endif +; return 0; } +EOF +if { eval echo configure:11718: \"$ac_link\" 1>&5; eval $ac_link 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval ac_cv_have_getpagesize=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval ac_cv_have_getpagesize=no +fi +rm -f conftest* +fi + +eval echo "$ac_t""$"ac_cv_have_getpagesize"" 1>&6 + ac_tr_dfunc=HAVE_`echo getpagesize | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` +if eval "test \"`echo '$ac_cv_have_'getpagesize`\" = yes"; then + cat >> confdefs.h <&6 +echo "configure:11743: checking for $ac_hdr" >&5 +if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ eval echo configure:11753: \"$ac_try\" 1>&5; eval $ac_try 2>&5; } +ac_err=`tr -d '\015' < conftest.out | grep -v '^ *+' | grep -v "^conftest.${ac_ext}\$"` +if test -z "$ac_err"; then + rm -rf conftest* + eval "ac_cv_header_$ac_safe=yes" +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_header_$ac_safe=no" +fi +rm -f conftest* +fi +if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then + eval echo "$ac_t""yes" 1>&6 + ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` + cat >> confdefs.h <&6 +fi +done +echo $ac_n "checking for mmap that needs ptr to size""... $ac_c" 1>&6 +echo "configure:11779: checking for mmap that needs ptr to size" >&5 +if eval "test \"`echo '$''{'ac_cv_func_mmap_sizep'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test "$cross_compiling" = yes; then + ac_cv_func_mmap_sizep=no +else + cat > conftest.$ac_ext < +#include +#include +#include +#include + +#ifndef MAP_FILE +#define MAP_FILE 0 /* Needed on Apollo Domain/OS */ +#endif + +/* This mess was copied from the GNU getpagesize.h. */ +#ifndef HAVE_GETPAGESIZE +# ifdef HAVE_UNISTD_H +# include +# endif + +/* Assume that all systems that can run configure have sys/param.h. */ +# ifndef HAVE_SYS_PARAM_H +# define HAVE_SYS_PARAM_H 1 +# endif + +# ifdef _SC_PAGESIZE +# define getpagesize() sysconf(_SC_PAGESIZE) +# else /* no _SC_PAGESIZE */ +# ifdef HAVE_SYS_PARAM_H +# include +# ifdef EXEC_PAGESIZE +# define getpagesize() EXEC_PAGESIZE +# else /* no EXEC_PAGESIZE */ +# ifdef NBPG +# define getpagesize() NBPG * CLSIZE +# ifndef CLSIZE +# define CLSIZE 1 +# endif /* no CLSIZE */ +# else /* no NBPG */ +# ifdef NBPC +# define getpagesize() NBPC +# else /* no NBPC */ +# ifdef PAGESIZE +# define getpagesize() PAGESIZE +# endif /* PAGESIZE */ +# endif /* no NBPC */ +# endif /* no NBPG */ +# endif /* no EXEC_PAGESIZE */ +# else /* no HAVE_SYS_PARAM_H */ +# define getpagesize() 8192 /* punt totally */ +# endif /* no HAVE_SYS_PARAM_H */ +# endif /* no _SC_PAGESIZE */ + +#endif /* no HAVE_GETPAGESIZE */ + +#ifdef __cplusplus +extern "C" { void *malloc(unsigned); } +#else +char *malloc(); +#endif + +jmp_buf jenv; + +int +intr() +{ + signal(SIGSEGV, intr); + longjmp(jenv, 1); +} + +int +main() +{ + char *data, *data2; + int i, pagesize, ps; + int fd; + + pagesize = getpagesize(); + + /* + * First, make a file with some known garbage in it. + */ + data = malloc(pagesize); + if (!data) + exit(1); + for (i = 0; i < pagesize; ++i) + *(data + i) = rand(); + umask(0); + fd = creat("conftestmmap", 0600); + if (fd < 0) + exit(1); + if (write(fd, data, pagesize) != pagesize) + exit(1); + close(fd); + + /* + * Next, try to mmap the file at a fixed address which + * already has something else allocated at it. If we can, + * also make sure that we see the same garbage. + */ + fd = open("conftestmmap", O_RDWR); + if (fd < 0) + exit(1); + + /* + * Keep a copy, Apollo modifies the value... + */ + ps = pagesize; + + /* + * Apollo mmap() is not a syscall but a library function and fails + * if it tries to dereference 'ps'. We must use setjmp in order to + * catch the failure. + */ + signal(SIGSEGV, intr); + if (setjmp(jenv) == 0) { + data2 = mmap(0, ps, PROT_READ, MAP_FILE | MAP_PRIVATE, fd, 0L); + } else { + data2 = (char *)-1; + } + if (data2 != (char *)-1) + exit(1); + + signal(SIGSEGV, intr); + if (setjmp(jenv) == 0) { + data2 = mmap(0, &ps, PROT_READ, MAP_FILE | MAP_PRIVATE, fd, 0L); + } else { + data2 = (char *)-1; + } + if (data2 == (char *)-1) + exit(1); + + for (i = 0; i < pagesize; ++i) + if (*(data + i) != *(data2 + i)) + exit(1); + + close(fd); + unlink("conftestmmap"); + exit(0); +} + +EOF +if { eval echo configure:11928: \"$ac_link\" 1>&5; eval $ac_link 2>&5; } && test -s conftest${ac_exeext} && ($rmtcall ./conftest${ac_xexeext}; exit) 2>/dev/null +then + ac_cv_func_mmap_sizep=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* + ac_cv_func_mmap_sizep=no +fi +rm -fr conftest* +fi + +fi + +eval echo "$ac_t""$ac_cv_func_mmap_sizep" 1>&6 +if test $ac_cv_func_mmap_sizep = yes; then + cat >> confdefs.h <<\EOF +#define _MMAP_WITH_SIZEP 1 +EOF + +fi + +for ac_hdr in unistd.h +do +ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` +echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 +echo "configure:11954: checking for $ac_hdr" >&5 +if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ eval echo configure:11964: \"$ac_try\" 1>&5; eval $ac_try 2>&5; } +ac_err=`tr -d '\015' < conftest.out | grep -v '^ *+' | grep -v "^conftest.${ac_ext}\$"` +if test -z "$ac_err"; then + rm -rf conftest* + eval "ac_cv_header_$ac_safe=yes" +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_header_$ac_safe=no" +fi +rm -f conftest* +fi +if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then + eval echo "$ac_t""yes" 1>&6 + ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` + cat >> confdefs.h <&6 +fi +done +echo $ac_n "checking for working mmap""... $ac_c" 1>&6 +echo "configure:11990: checking for working mmap" >&5 +if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test "$cross_compiling" = yes; then + ac_cv_func_mmap_fixed_mapped=no +else + cat > conftest.$ac_ext < +#include +#include + +/* + * Needed for Apollo Domain/OS and may be for others? + */ +#ifdef _MMAP_WITH_SIZEP +# define mmap_sizeparm(s) (&(s)) +#else +# define mmap_sizeparm(s) (s) +#endif + +/* This mess was copied from the GNU getpagesize.h. */ +#ifndef HAVE_GETPAGESIZE +# ifdef HAVE_UNISTD_H +# include +# endif + +/* Assume that all systems that can run configure have sys/param.h. */ +# ifndef HAVE_SYS_PARAM_H +# define HAVE_SYS_PARAM_H 1 +# endif + +# ifdef _SC_PAGESIZE +# define getpagesize() sysconf(_SC_PAGESIZE) +# else /* no _SC_PAGESIZE */ +# ifdef HAVE_SYS_PARAM_H +# include +# ifdef EXEC_PAGESIZE +# define getpagesize() EXEC_PAGESIZE +# else /* no EXEC_PAGESIZE */ +# ifdef NBPG +# define getpagesize() NBPG * CLSIZE +# ifndef CLSIZE +# define CLSIZE 1 +# endif /* no CLSIZE */ +# else /* no NBPG */ +# ifdef NBPC +# define getpagesize() NBPC +# else /* no NBPC */ +# ifdef PAGESIZE +# define getpagesize() PAGESIZE +# endif /* PAGESIZE */ +# endif /* no NBPC */ +# endif /* no NBPG */ +# endif /* no EXEC_PAGESIZE */ +# else /* no HAVE_SYS_PARAM_H */ +# define getpagesize() 8192 /* punt totally */ +# endif /* no HAVE_SYS_PARAM_H */ +# endif /* no _SC_PAGESIZE */ + +#endif /* no HAVE_GETPAGESIZE */ + +#ifdef __cplusplus +extern "C" { void *malloc(unsigned); } +#else +char *malloc(); +#endif + +int +main() +{ + char *data, *data2, *data3; + int i, pagesize; + int fd; + + pagesize = getpagesize(); + + /* + * First, make a file with some known garbage in it. + */ + data = malloc(pagesize); + if (!data) + exit(1); + for (i = 0; i < pagesize; ++i) + *(data + i) = rand(); + umask(0); + fd = creat("conftestmmap", 0600); + if (fd < 0) + exit(1); + if (write(fd, data, pagesize) != pagesize) + exit(1); + close(fd); + + /* + * Next, try to mmap the file at a fixed address which + * already has something else allocated at it. If we can, + * also make sure that we see the same garbage. + */ + fd = open("conftestmmap", O_RDWR); + if (fd < 0) + exit(1); + data2 = malloc(2 * pagesize); + if (!data2) + exit(1); + data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1); + if (data2 != mmap(data2, mmap_sizeparm(pagesize), PROT_READ | PROT_WRITE, + MAP_PRIVATE | MAP_FIXED, fd, 0L)) + exit(1); + for (i = 0; i < pagesize; ++i) + if (*(data + i) != *(data2 + i)) + exit(1); + + /* + * Finally, make sure that changes to the mapped area + * do not percolate back to the file as seen by read(). + * (This is a bug on some variants of i386 svr4.0.) + */ + for (i = 0; i < pagesize; ++i) + *(data2 + i) = *(data2 + i) + 1; + data3 = malloc(pagesize); + if (!data3) + exit(1); + if (read(fd, data3, pagesize) != pagesize) + exit(1); + for (i = 0; i < pagesize; ++i) + if (*(data + i) != *(data3 + i)) + exit(1); + close(fd); + unlink("conftestmmap"); + exit(0); +} + +EOF +if { eval echo configure:12147: \"$ac_link\" 1>&5; eval $ac_link 2>&5; } && test -s conftest${ac_exeext} && ($rmtcall ./conftest${ac_xexeext}; exit) 2>/dev/null +then + ac_cv_func_mmap_fixed_mapped=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* + ac_cv_func_mmap_fixed_mapped=no +fi +rm -fr conftest* +fi + +fi + +eval echo "$ac_t""$ac_cv_func_mmap_fixed_mapped" 1>&6 +if test $ac_cv_func_mmap_fixed_mapped = yes; then + cat >> confdefs.h <<\EOF +#define HAVE_MMAP 1 +EOF + +fi + +for ac_hdr in unistd.h +do +ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` +echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 +echo "configure:12173: checking for $ac_hdr" >&5 +if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ eval echo configure:12183: \"$ac_try\" 1>&5; eval $ac_try 2>&5; } +ac_err=`tr -d '\015' < conftest.out | grep -v '^ *+' | grep -v "^conftest.${ac_ext}\$"` +if test -z "$ac_err"; then + rm -rf conftest* + eval "ac_cv_header_$ac_safe=yes" +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_header_$ac_safe=no" +fi +rm -f conftest* +fi +if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then + eval echo "$ac_t""yes" 1>&6 + ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` + cat >> confdefs.h <&6 +fi +done +echo $ac_n "checking for mmap that needs ptr to size""... $ac_c" 1>&6 +echo "configure:12209: checking for mmap that needs ptr to size" >&5 +if eval "test \"`echo '$''{'ac_cv_func_mmap_sizep'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test "$cross_compiling" = yes; then + ac_cv_func_mmap_sizep=no +else + cat > conftest.$ac_ext < +#include +#include +#include +#include + +#ifndef MAP_FILE +#define MAP_FILE 0 /* Needed on Apollo Domain/OS */ +#endif + +/* This mess was copied from the GNU getpagesize.h. */ +#ifndef HAVE_GETPAGESIZE +# ifdef HAVE_UNISTD_H +# include +# endif + +/* Assume that all systems that can run configure have sys/param.h. */ +# ifndef HAVE_SYS_PARAM_H +# define HAVE_SYS_PARAM_H 1 +# endif + +# ifdef _SC_PAGESIZE +# define getpagesize() sysconf(_SC_PAGESIZE) +# else /* no _SC_PAGESIZE */ +# ifdef HAVE_SYS_PARAM_H +# include +# ifdef EXEC_PAGESIZE +# define getpagesize() EXEC_PAGESIZE +# else /* no EXEC_PAGESIZE */ +# ifdef NBPG +# define getpagesize() NBPG * CLSIZE +# ifndef CLSIZE +# define CLSIZE 1 +# endif /* no CLSIZE */ +# else /* no NBPG */ +# ifdef NBPC +# define getpagesize() NBPC +# else /* no NBPC */ +# ifdef PAGESIZE +# define getpagesize() PAGESIZE +# endif /* PAGESIZE */ +# endif /* no NBPC */ +# endif /* no NBPG */ +# endif /* no EXEC_PAGESIZE */ +# else /* no HAVE_SYS_PARAM_H */ +# define getpagesize() 8192 /* punt totally */ +# endif /* no HAVE_SYS_PARAM_H */ +# endif /* no _SC_PAGESIZE */ + +#endif /* no HAVE_GETPAGESIZE */ + +#ifdef __cplusplus +extern "C" { void *malloc(unsigned); } +#else +char *malloc(); +#endif + +jmp_buf jenv; + +int +intr() +{ + signal(SIGSEGV, intr); + longjmp(jenv, 1); +} + +int +main() +{ + char *data, *data2; + int i, pagesize, ps; + int fd; + + pagesize = getpagesize(); + + /* + * First, make a file with some known garbage in it. + */ + data = malloc(pagesize); + if (!data) + exit(1); + for (i = 0; i < pagesize; ++i) + *(data + i) = rand(); + umask(0); + fd = creat("conftestmmap", 0600); + if (fd < 0) + exit(1); + if (write(fd, data, pagesize) != pagesize) + exit(1); + close(fd); + + /* + * Next, try to mmap the file at a fixed address which + * already has something else allocated at it. If we can, + * also make sure that we see the same garbage. + */ + fd = open("conftestmmap", O_RDWR); + if (fd < 0) + exit(1); + + /* + * Keep a copy, Apollo modifies the value... + */ + ps = pagesize; + + /* + * Apollo mmap() is not a syscall but a library function and fails + * if it tries to dereference 'ps'. We must use setjmp in order to + * catch the failure. + */ + signal(SIGSEGV, intr); + if (setjmp(jenv) == 0) { + data2 = mmap(0, ps, PROT_READ, MAP_FILE | MAP_PRIVATE, fd, 0L); + } else { + data2 = (char *)-1; + } + if (data2 != (char *)-1) + exit(1); + + signal(SIGSEGV, intr); + if (setjmp(jenv) == 0) { + data2 = mmap(0, &ps, PROT_READ, MAP_FILE | MAP_PRIVATE, fd, 0L); + } else { + data2 = (char *)-1; + } + if (data2 == (char *)-1) + exit(1); + + for (i = 0; i < pagesize; ++i) + if (*(data + i) != *(data2 + i)) + exit(1); + + close(fd); + unlink("conftestmmap"); + exit(0); +} + +EOF +if { eval echo configure:12358: \"$ac_link\" 1>&5; eval $ac_link 2>&5; } && test -s conftest${ac_exeext} && ($rmtcall ./conftest${ac_xexeext}; exit) 2>/dev/null +then + ac_cv_func_mmap_sizep=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* + ac_cv_func_mmap_sizep=no +fi +rm -fr conftest* +fi + +fi + +eval echo "$ac_t""$ac_cv_func_mmap_sizep" 1>&6 +if test $ac_cv_func_mmap_sizep = yes; then + cat >> confdefs.h <<\EOF +#define _MMAP_WITH_SIZEP 1 +EOF + +fi + +echo $ac_n "checking if mmap works to get shared memory""... $ac_c" 1>&6 +echo "configure:12381: checking if mmap works to get shared memory" >&5 +if eval "test \"`echo '$''{'ac_cv_func_smmap'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test "$cross_compiling" = yes; then + ac_cv_func_smmap=no +else + cat > conftest.$ac_ext < +#include + +#ifndef MAP_ANONYMOUS +# ifdef MAP_ANON +# define MAP_ANONYMOUS MAP_ANON +# endif +#endif + +/* + * Needed for Apollo Domain/OS and may be for others? + */ +#ifdef _MMAP_WITH_SIZEP +# define mmap_sizeparm(s) (&(s)) +#else +# define mmap_sizeparm(s) (s) +#endif + +char * +mkshare() +{ + int size = 8192; + int f; + char *addr; + +#ifdef MAP_ANONYMOUS /* HP/UX */ + f = -1; + addr = mmap(0, mmap_sizeparm(size), PROT_READ|PROT_WRITE, MAP_SHARED|MAP_ANONYMOUS, f, 0); +#else + if ((f = open("/dev/zero", 2)) < 0) + exit(1); + addr = mmap(0, mmap_sizeparm(size), PROT_READ|PROT_WRITE, MAP_SHARED, f, 0); +#endif + if (addr == (char *)-1) + exit(1); + close(f); + + return (addr); +} + +int +main() +{ + char *addr; + + addr = mkshare(); + *addr = 'I'; + + switch (fork()) { + + case -1: + printf("help\n"); exit(1); + + case 0: /* child */ + *addr = 'N'; + _exit(0); + break; + default: /* parent */ + wait(0); + sleep(1); + break; + } + + if (*addr != 'N') + exit(1); + exit(0); +} + +EOF +if { eval echo configure:12461: \"$ac_link\" 1>&5; eval $ac_link 2>&5; } && test -s conftest${ac_exeext} && ($rmtcall ./conftest${ac_xexeext}; exit) 2>/dev/null +then + ac_cv_func_smmap=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* + ac_cv_func_smmap=no +fi +rm -fr conftest* +fi + +fi + +eval echo "$ac_t""$ac_cv_func_smmap" 1>&6 +if test $ac_cv_func_smmap = yes; then + cat >> confdefs.h <<\EOF +#define HAVE_SMMAP 1 +EOF + +fi +echo $ac_n "checking if shmget works to get shared memory""... $ac_c" 1>&6 +echo "configure:12483: checking if shmget works to get shared memory" >&5 +if eval "test \"`echo '$''{'ac_cv_func_shmget'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test "$cross_compiling" = yes; then + ac_cv_func_shmget=no +else + cat > conftest.$ac_ext < +#include +#include +int +main() +{ + int id; + + id = shmget(IPC_PRIVATE, 0x1, IPC_CREAT|0600); + if (id == -1) + exit(1); + shmctl(id, IPC_RMID, 0); + exit(0); +} + +EOF +if { eval echo configure:12510: \"$ac_link\" 1>&5; eval $ac_link 2>&5; } && test -s conftest${ac_exeext} && ($rmtcall ./conftest${ac_xexeext}; exit) 2>/dev/null +then + ac_cv_func_shmget=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* + ac_cv_func_shmget=no +fi +rm -fr conftest* +fi + +fi + +eval echo "$ac_t""$ac_cv_func_shmget" 1>&6 +if test $ac_cv_func_shmget = yes; then + cat >> confdefs.h <<\EOF +#define HAVE_SHMGET 1 +EOF + +fi +# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works +# for constant arguments. Useless! +echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6 +echo "configure:12534: checking for working alloca.h" >&5 +if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +int main() { +char *p = alloca(2 * sizeof(int)); +; return 0; } +EOF +if { eval echo configure:12546: \"$ac_link\" 1>&5; eval $ac_link 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + ac_cv_header_alloca_h=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + ac_cv_header_alloca_h=no +fi +rm -f conftest* +fi + +eval echo "$ac_t""$ac_cv_header_alloca_h" 1>&6 +if test $ac_cv_header_alloca_h = yes; then + cat >> confdefs.h <<\EOF +#define HAVE_ALLOCA_H 1 +EOF + +fi + +echo $ac_n "checking for alloca""... $ac_c" 1>&6 +echo "configure:12567: checking for alloca" >&5 +if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +# define alloca _alloca +# else +# if HAVE_ALLOCA_H +# include +# else +# ifdef _AIX + #pragma alloca +# else +# ifndef alloca /* predefined by HP cc +Olibcalls */ +char *alloca (); +# endif +# endif +# endif +# endif +#endif + +int main() { +char *p = (char *) alloca(1); +; return 0; } +EOF +if { eval echo configure:12600: \"$ac_link\" 1>&5; eval $ac_link 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + ac_cv_func_alloca_works=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + ac_cv_func_alloca_works=no +fi +rm -f conftest* +fi + +eval echo "$ac_t""$ac_cv_func_alloca_works" 1>&6 +if test $ac_cv_func_alloca_works = yes; then + cat >> confdefs.h <<\EOF +#define HAVE_ALLOCA 1 +EOF + +fi + +if test $ac_cv_func_alloca_works = no; then + # The SVR3 libPW and SVR4 libucb both contain incompatible functions + # that cause trouble. Some versions do not even contain alloca or + # contain a buggy version. If you still want to use their alloca, + # use ar to extract alloca.o from them instead of compiling alloca.c. + ALLOCA=alloca.${ac_objext} + cat >> confdefs.h <<\EOF +#define C_ALLOCA 1 +EOF + + +echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6 +echo "configure:12632: checking whether alloca needs Cray hooks" >&5 +if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext <&5 | + egrep "webecray" >/dev/null 2>&1; then + rm -rf conftest* + ac_cv_os_cray=yes +else + rm -rf conftest* + ac_cv_os_cray=no +fi +rm -f conftest* + +fi + +eval echo "$ac_t""$ac_cv_os_cray" 1>&6 +if test $ac_cv_os_cray = yes; then +for ac_func in _getb67 GETB67 getb67; do + echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +echo "configure:12662: checking for $ac_func" >&5 +if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func(); + +int main() { + +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +$ac_func(); +#endif + +; return 0; } +EOF +if { eval echo configure:12690: \"$ac_link\" 1>&5; eval $ac_link 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_$ac_func=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func_$ac_func=no" +fi +rm -f conftest* +fi + +if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then + eval echo "$ac_t""yes" 1>&6 + cat >> confdefs.h <&6 +fi + +done +fi + +echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6 +echo "configure:12717: checking stack direction for C alloca" >&5 +if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test "$cross_compiling" = yes; then + ac_cv_c_stack_direction=0 +else + cat > conftest.$ac_ext < addr) ? 1 : -1; +} +main () +{ + exit (find_stack_direction() < 0); +} +EOF +if { eval echo configure:12744: \"$ac_link\" 1>&5; eval $ac_link 2>&5; } && test -s conftest${ac_exeext} && ($rmtcall ./conftest${ac_xexeext}; exit) 2>/dev/null +then + ac_cv_c_stack_direction=1 +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* + ac_cv_c_stack_direction=-1 +fi +rm -fr conftest* +fi + +fi + +eval echo "$ac_t""$ac_cv_c_stack_direction" 1>&6 +cat >> confdefs.h <&6 +echo "configure:12766: checking if quotactl is an ioctl" >&5 +if eval "test \"`echo '$''{'ac_cv_func_quotaioctl'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +#include +int main() { +struct quotctl q; ioctl(0, Q_QUOTACTL, &q) +; return 0; } +EOF +if { eval echo configure:12779: \"$ac_link\" 1>&5; eval $ac_link 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + ac_cv_func_quotaioctl=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + ac_cv_func_quotaioctl=no +fi +rm -f conftest* +fi + +eval echo "$ac_t""$ac_cv_func_quotaioctl" 1>&6 +if test $ac_cv_func_quotaioctl = yes; then + cat >> confdefs.h <<\EOF +#define HAVE_QUOTAIOCTL 1 +EOF + +fi +echo $ac_n "checking for file locking via fcntl""... $ac_c" 1>&6 +echo "configure:12799: checking for file locking via fcntl" >&5 +if eval "test \"`echo '$''{'ac_cv_func_fcntl_lock'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +#include +int main() { + +struct flock fl; +fcntl(0, F_SETLK, &fl); +; return 0; } +EOF +if { eval echo configure:12815: \"$ac_link\" 1>&5; eval $ac_link 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + ac_cv_func_fcntl_lock=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + ac_cv_func_fcntl_lock=no +fi +rm -f conftest* +fi + +eval echo "$ac_t""$ac_cv_func_fcntl_lock" 1>&6 +if test $ac_cv_func_fcntl_lock = yes; then + cat >> confdefs.h <<\EOF +#define HAVE_FCNTL_LOCKF 1 +EOF + +fi +echo $ac_n "checking for uname""... $ac_c" 1>&6 +echo "configure:12835: checking for uname" >&5 +if eval "test \"`echo '$''{'ac_cv_func_uname'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +int main() { +struct utsname un; +uname(&un); +; return 0; } +EOF +if { eval echo configure:12848: \"$ac_link\" 1>&5; eval $ac_link 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + ac_cv_func_uname=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + ac_cv_func_uname=no +fi +rm -f conftest* +fi + +eval echo "$ac_t""$ac_cv_func_uname" 1>&6 +if test $ac_cv_func_uname = yes; then + cat >> confdefs.h <<\EOF +#define HAVE_UNAME 1 +EOF + +fi +for ac_func in execl +do +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +echo "configure:12870: checking for $ac_func" >&5 +if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func(); + +int main() { + +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +$ac_func(); +#endif + +; return 0; } +EOF +if { eval echo configure:12898: \"$ac_link\" 1>&5; eval $ac_link 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_$ac_func=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func_$ac_func=no" +fi +rm -f conftest* +fi + +if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then + eval echo "$ac_t""yes" 1>&6 + ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` + cat >> confdefs.h <&6 +fi +done + +ac_safe=`echo "vfork.h" | sed 'y%./+-%__p_%'` +echo $ac_n "checking for vfork.h""... $ac_c" 1>&6 +echo "configure:12924: checking for vfork.h" >&5 +if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ eval echo configure:12934: \"$ac_try\" 1>&5; eval $ac_try 2>&5; } +ac_err=`tr -d '\015' < conftest.out | grep -v '^ *+' | grep -v "^conftest.${ac_ext}\$"` +if test -z "$ac_err"; then + rm -rf conftest* + eval "ac_cv_header_$ac_safe=yes" +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_header_$ac_safe=no" +fi +rm -f conftest* +fi +if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then + eval echo "$ac_t""yes" 1>&6 + cat >> confdefs.h <<\EOF +#define HAVE_VFORK_H 1 +EOF + +else + eval echo "$ac_t""no" 1>&6 +fi + +echo $ac_n "checking for working vfork""... $ac_c" 1>&6 +echo "configure:12959: checking for working vfork" >&5 +if eval "test \"`echo '$''{'ac_cv_func_vfork_works'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test "$cross_compiling" = yes; then + echo $ac_n "checking for vfork""... $ac_c" 1>&6 +echo "configure:12965: checking for vfork" >&5 +if eval "test \"`echo '$''{'ac_cv_func_vfork'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char vfork(); + +int main() { + +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_vfork) || defined (__stub___vfork) +choke me +#else +vfork(); +#endif + +; return 0; } +EOF +if { eval echo configure:12993: \"$ac_link\" 1>&5; eval $ac_link 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_vfork=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func_vfork=no" +fi +rm -f conftest* +fi + +if eval "test \"`echo '$ac_cv_func_'vfork`\" = yes"; then + eval echo "$ac_t""yes" 1>&6 + : +else + eval echo "$ac_t""no" 1>&6 +fi + +ac_cv_func_vfork_works=$ac_cv_func_vfork +else + cat > conftest.$ac_ext < +#include +#include +#ifdef HAVE_UNISTD_H +#include +#endif +#ifdef HAVE_VFORK_H +#include +#endif +#ifdef HAVE_STDLIB_H +#include +#endif +#if defined(HAVE_WAIT_H) +#include +#else +#include +#endif +/* On some sparc systems, changes by the child to local and incoming + argument registers are propagated back to the parent. + The compiler is told about this with #include , + but some compilers (e.g. gcc -O) don't grok . + Test for this by using a static variable whose address + is put into a register that is clobbered by the vfork. */ +#ifndef VMS +static int +#ifdef __cplusplus +sparc_address_test (int arg) +#else +sparc_address_test (arg) int arg; +#endif +{ + static pid_t child; + if (!child) { + child = vfork (); + if (child < 0) { + perror ("vfork"); + _exit(2); + } + if (!child) { + arg = getpid(); + write(-1, "", 0); + _exit (arg); + } + } + return (0); +} +#endif +int exc = 0; +int data = 0; + +int +main() { + pid_t parent = getpid (); + pid_t child; + +#ifndef VMS + sparc_address_test(0); +#endif + + child = vfork (); + + if (child == 0) { + /* Here is another test for sparc vfork register problems. + This test uses lots of local variables, at least + as many local variables as main has allocated so far + including compiler temporaries. 4 locals are enough for + gcc 1.40.3 on a Solaris 4.1.3 sparc, but we use 8 to be safe. + A buggy compiler should reuse the register of parent + for one of the local variables, since it will think that + parent can't possibly be used any more in this routine. + Assigning to the local variable will thus munge parent + in the parent process. */ + pid_t + p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(), + p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid(); + /* Convince the compiler that p..p7 are live; otherwise, it might + use the same hardware register for all 8 local variables. */ + if (p != p1 || p != p2 || p != p3 || p != p4 + || p != p5 || p != p6 || p != p7) + exc = 1; + + /* On some systems (e.g. IRIX 3.3), + vfork doesn't separate parent from child file descriptors. + If the child closes a descriptor before it execs or exits, + this munges the parent's descriptor as well. + Test for this by closing stdout in the child. */ + if (exc == 0) + exc = close(fileno(stdout)) != 0; + + /* + * Check whether a modification in the data segment of the child + * is forwarded to the data segment of the parent, vfork() on Haiku + * fails to do this. We cannot use vfork() in this case as vfork() + * children usually signal things to their parent by modifying the + * data segment. + */ + data = 1; + + /* + * VMS hangs if we do not call execl() + */ +#ifdef HAVE_EXECL + /* + * On VMS, things hang unless the child calls exec() + */ + if (exc == 0) + execl("/bin/true", "true", (char *)0); + else + execl("/bin/false", "false", (char *)0); +#endif + _exit(exc); + } else { + int status; + struct stat st; + + while (wait(&status) != child) + ; + exit( + /* Was there some problem with vforking? */ + child < 0 + + /* Did the child fail? (This shouldn't happen.) */ + || status + + /* Did the vfork/compiler bug occur? */ + || parent != getpid() + + || data == 0 + + /* Did the file descriptor bug occur? */ + || fstat(fileno(stdout), &st) != 0 + ); + } +} +EOF +if { eval echo configure:13153: \"$ac_link\" 1>&5; eval $ac_link 2>&5; } && test -s conftest${ac_exeext} && ($rmtcall ./conftest${ac_xexeext}; exit) 2>/dev/null +then + ac_cv_func_vfork_works=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* + ac_cv_func_vfork_works=no +fi +rm -fr conftest* +fi + +fi + +eval echo "$ac_t""$ac_cv_func_vfork_works" 1>&6 +if test $ac_cv_func_vfork_works = no; then + cat >> confdefs.h <<\EOF +#define vfork fork +EOF + +else + cat >> confdefs.h <<\EOF +#define HAVE_VFORK 1 +EOF + +fi + +echo $ac_n "checking for sys_siglist""... $ac_c" 1>&6 +echo "configure:13181: checking for sys_siglist" >&5 +if eval "test \"`echo '$''{'ac_cv_func_sys_siglist'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test "$cross_compiling" = yes; then + { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } +else + cat > conftest.$ac_ext <&5; eval $ac_link 2>&5; } && test -s conftest${ac_exeext} && ($rmtcall ./conftest${ac_xexeext}; exit) 2>/dev/null +then + ac_cv_func_sys_siglist=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* + ac_cv_func_sys_siglist=no +fi +rm -fr conftest* +fi + +fi + +eval echo "$ac_t""$ac_cv_func_sys_siglist" 1>&6 +if test $ac_cv_func_sys_siglist = yes; then + cat >> confdefs.h <<\EOF +#define HAVE_SYS_SIGLIST 1 +EOF + +fi +echo $ac_n "checking for BSD compliant getpgrp""... $ac_c" 1>&6 +echo "configure:13221: checking for BSD compliant getpgrp" >&5 +if eval "test \"`echo '$''{'ac_cv_func_bsd_getpgrp'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test "$cross_compiling" = yes; then + { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } +else + cat > conftest.$ac_ext <&5; eval $ac_link 2>&5; } && test -s conftest${ac_exeext} && ($rmtcall ./conftest${ac_xexeext}; exit) 2>/dev/null +then + ac_cv_func_bsd_getpgrp=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* + ac_cv_func_bsd_getpgrp=no +fi +rm -fr conftest* +fi + +fi + +eval echo "$ac_t""$ac_cv_func_bsd_getpgrp" 1>&6 +if test $ac_cv_func_bsd_getpgrp = yes; then + cat >> confdefs.h <<\EOF +#define HAVE_BSD_GETPGRP 1 +EOF + +fi +echo $ac_n "checking for BSD compliant setpgrp""... $ac_c" 1>&6 +echo "configure:13265: checking for BSD compliant setpgrp" >&5 +if eval "test \"`echo '$''{'ac_cv_func_bsd_setpgrp'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test "$cross_compiling" = yes; then + { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } +else + cat > conftest.$ac_ext < +#ifndef HAVE_ERRNO_DEF +extern int errno; +#endif +int +main() +{ errno = 0; +/* + * Force illegal pid on BSD + */ +if (setpgrp(-1, 100) < 0 && errno == ESRCH) + exit(0); +exit(1);} +EOF +if { eval echo configure:13290: \"$ac_link\" 1>&5; eval $ac_link 2>&5; } && test -s conftest${ac_exeext} && ($rmtcall ./conftest${ac_xexeext}; exit) 2>/dev/null +then + ac_cv_func_bsd_setpgrp=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* + ac_cv_func_bsd_setpgrp=no +fi +rm -fr conftest* +fi + +fi + +eval echo "$ac_t""$ac_cv_func_bsd_setpgrp" 1>&6 +if test $ac_cv_func_bsd_setpgrp = yes; then + cat >> confdefs.h <<\EOF +#define HAVE_BSD_SETPGRP 1 +EOF + +fi +echo $ac_n "checking for C99 compliant isinf""... $ac_c" 1>&6 +echo "configure:13312: checking for C99 compliant isinf" >&5 +if eval "test \"`echo '$''{'ac_cv_func_c99_isinf'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +int main() { + double d; +#ifndef isinf +The isinf macro is not defined +#endif +return (isinf(d)); + +; return 0; } +EOF +if { eval echo configure:13329: \"$ac_link\" 1>&5; eval $ac_link 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + ac_cv_func_c99_isinf=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + ac_cv_func_c99_isinf=no +fi +rm -f conftest* +fi + +eval echo "$ac_t""$ac_cv_func_c99_isinf" 1>&6 +if test $ac_cv_func_c99_isinf = yes; then + cat >> confdefs.h <<\EOF +#define HAVE_C99_ISINF 1 +EOF + +fi +echo $ac_n "checking for C99 compliant isnan""... $ac_c" 1>&6 +echo "configure:13349: checking for C99 compliant isnan" >&5 +if eval "test \"`echo '$''{'ac_cv_func_c99_isnan'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +int main() { + double d; +#ifndef isnan +The isnan macro is not defined +#endif +return (isnan(d)); + +; return 0; } +EOF +if { eval echo configure:13366: \"$ac_link\" 1>&5; eval $ac_link 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + ac_cv_func_c99_isnan=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + ac_cv_func_c99_isnan=no +fi +rm -f conftest* +fi + +eval echo "$ac_t""$ac_cv_func_c99_isnan" 1>&6 +if test $ac_cv_func_c99_isnan = yes; then + cat >> confdefs.h <<\EOF +#define HAVE_C99_ISNAN 1 +EOF + +fi +echo $ac_n "checking for sigsetjmp""... $ac_c" 1>&6 +echo "configure:13386: checking for sigsetjmp" >&5 +if eval "test \"`echo '$''{'ac_cv_func_sigsetjmp'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +int main() { + +sigjmp_buf jb; +sigsetjmp(jb, 1); +; return 0; } +EOF +if { eval echo configure:13401: \"$ac_link\" 1>&5; eval $ac_link 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + ac_cv_func_sigsetjmp=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + ac_cv_func_sigsetjmp=no +fi +rm -f conftest* +fi + +eval echo "$ac_t""$ac_cv_func_sigsetjmp" 1>&6 +if test $ac_cv_func_sigsetjmp = yes; then + cat >> confdefs.h <<\EOF +#define HAVE_SIGSETJMP 1 +EOF + +fi +echo $ac_n "checking for siglongjmp""... $ac_c" 1>&6 +echo "configure:13421: checking for siglongjmp" >&5 +if eval "test \"`echo '$''{'ac_cv_func_siglongjmp'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +int main() { + +sigjmp_buf jb; +sigsetjmp(jb, 1); +siglongjmp(jb, 1); +; return 0; } +EOF +if { eval echo configure:13437: \"$ac_link\" 1>&5; eval $ac_link 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + ac_cv_func_siglongjmp=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + ac_cv_func_siglongjmp=no +fi +rm -f conftest* +fi + +eval echo "$ac_t""$ac_cv_func_siglongjmp" 1>&6 +if test $ac_cv_func_siglongjmp = yes; then + cat >> confdefs.h <<\EOF +#define HAVE_SIGLONGJMP 1 +EOF + +fi +echo $ac_n "checking whether *printf() supports %jd""... $ac_c" 1>&6 +echo "configure:13457: checking whether *printf() supports %jd" >&5 +if eval "test \"`echo '$''{'ac_cv_func_printf_j'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test "$cross_compiling" = yes; then + { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } +else + cat > conftest.$ac_ext < +int +main() +{ intmax_t m = 123456789012LL; +char buf[32]; +sprintf(buf, "%jd", m); +if (strcmp(buf, "123456789012") == 0) + exit(0); +exit(1);} +EOF +if { eval echo configure:13478: \"$ac_link\" 1>&5; eval $ac_link 2>&5; } && test -s conftest${ac_exeext} && ($rmtcall ./conftest${ac_xexeext}; exit) 2>/dev/null +then + ac_cv_func_printf_j=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* + ac_cv_func_printf_j=no +fi +rm -fr conftest* +fi + +fi + +eval echo "$ac_t""$ac_cv_func_printf_j" 1>&6 +if test $ac_cv_func_printf_j = yes; then + cat >> confdefs.h <<\EOF +#define HAVE_PRINTF_J 1 +EOF + +fi +echo $ac_n "checking whether *printf() supports %zd""... $ac_c" 1>&6 +echo "configure:13500: checking whether *printf() supports %zd" >&5 +if eval "test \"`echo '$''{'ac_cv_func_printf_z'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test "$cross_compiling" = yes; then + { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } +else + cat > conftest.$ac_ext < +int +main() +{ size_t m = 1234567890; +char buf[32]; +sprintf(buf, "%zd", m); +if (strcmp(buf, "1234567890") == 0) + exit(0); +exit(1);} +EOF +if { eval echo configure:13521: \"$ac_link\" 1>&5; eval $ac_link 2>&5; } && test -s conftest${ac_exeext} && ($rmtcall ./conftest${ac_xexeext}; exit) 2>/dev/null +then + ac_cv_func_printf_z=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* + ac_cv_func_printf_z=no +fi +rm -fr conftest* +fi + +fi + +eval echo "$ac_t""$ac_cv_func_printf_z" 1>&6 +if test $ac_cv_func_printf_z = yes; then + cat >> confdefs.h <<\EOF +#define HAVE_PRINTF_Z 1 +EOF + +fi +echo $ac_n "checking whether *printf() supports %lld""... $ac_c" 1>&6 +echo "configure:13543: checking whether *printf() supports %lld" >&5 +if eval "test \"`echo '$''{'ac_cv_func_printf_ll'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test "$cross_compiling" = yes; then + { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } +else + cat > conftest.$ac_ext <&5; eval $ac_link 2>&5; } && test -s conftest${ac_exeext} && ($rmtcall ./conftest${ac_xexeext}; exit) 2>/dev/null +then + ac_cv_func_printf_ll=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* + ac_cv_func_printf_ll=no +fi +rm -fr conftest* +fi + +fi + +eval echo "$ac_t""$ac_cv_func_printf_ll" 1>&6 +if test $ac_cv_func_printf_ll = yes; then + cat >> confdefs.h <<\EOF +#define HAVE_PRINTF_LL 1 +EOF + +fi +for ac_hdr in stdlib.h +do +ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` +echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 +echo "configure:13588: checking for $ac_hdr" >&5 +if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ eval echo configure:13598: \"$ac_try\" 1>&5; eval $ac_try 2>&5; } +ac_err=`tr -d '\015' < conftest.out | grep -v '^ *+' | grep -v "^conftest.${ac_ext}\$"` +if test -z "$ac_err"; then + rm -rf conftest* + eval "ac_cv_header_$ac_safe=yes" +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_header_$ac_safe=no" +fi +rm -f conftest* +fi +if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then + eval echo "$ac_t""yes" 1>&6 + ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` + cat >> confdefs.h <&6 +fi +done + +echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6 +echo "configure:13625: checking return type of signal handlers" >&5 +if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +#include +#ifdef signal +#undef signal +#endif +#ifdef __cplusplus +extern "C" void (*signal (int, void (*)(int)))(int); +#else +void (*signal ()) (); +#endif + +int main() { +int i; +; return 0; } +EOF +if { eval echo configure:13647: \"$ac_compile\" 1>&5; eval $ac_compile 2>&5; }; then + rm -rf conftest* + ac_cv_type_signal=void +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + ac_cv_type_signal=int +fi +rm -f conftest* +fi + +eval echo "$ac_t""$ac_cv_type_signal" 1>&6 +cat >> confdefs.h <&6 +echo "configure:13666: checking if realloc() does implement realloc(NULL, size)" >&5 +if eval "test \"`echo '$''{'ac_cv_realloc_null'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test "$cross_compiling" = yes; then + { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } +else + cat > conftest.$ac_ext < +#endif +#include + +RETSIGTYPE +sig(s) + int s; +{ + exit(1); +} +int +main() +{ + char *p; + + signal(SIGSEGV, sig); + p = realloc((char *)0, 10); + if (p == (char *)0) + exit(1); + exit(0); +} +EOF +if { eval echo configure:13700: \"$ac_link\" 1>&5; eval $ac_link 2>&5; } && test -s conftest${ac_exeext} && ($rmtcall ./conftest${ac_xexeext}; exit) 2>/dev/null +then + ac_cv_realloc_null=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* + ac_cv_realloc_null=no +fi +rm -fr conftest* +fi + +fi + +eval echo "$ac_t""$ac_cv_realloc_null" 1>&6 +if test $ac_cv_realloc_null = yes; then + cat >> confdefs.h <<\EOF +#define HAVE_REALLOC_NULL 1 +EOF + +fi +for ac_hdr in stdlib.h +do +ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` +echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 +echo "configure:13725: checking for $ac_hdr" >&5 +if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ eval echo configure:13735: \"$ac_try\" 1>&5; eval $ac_try 2>&5; } +ac_err=`tr -d '\015' < conftest.out | grep -v '^ *+' | grep -v "^conftest.${ac_ext}\$"` +if test -z "$ac_err"; then + rm -rf conftest* + eval "ac_cv_header_$ac_safe=yes" +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_header_$ac_safe=no" +fi +rm -f conftest* +fi +if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then + eval echo "$ac_t""yes" 1>&6 + ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` + cat >> confdefs.h <&6 +fi +done + +for ac_hdr in unistd.h +do +ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` +echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 +echo "configure:13765: checking for $ac_hdr" >&5 +if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ eval echo configure:13775: \"$ac_try\" 1>&5; eval $ac_try 2>&5; } +ac_err=`tr -d '\015' < conftest.out | grep -v '^ *+' | grep -v "^conftest.${ac_ext}\$"` +if test -z "$ac_err"; then + rm -rf conftest* + eval "ac_cv_header_$ac_safe=yes" +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_header_$ac_safe=no" +fi +rm -f conftest* +fi +if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then + eval echo "$ac_t""yes" 1>&6 + ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` + cat >> confdefs.h <&6 +fi +done + +for ac_hdr in wait.h +do +ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` +echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 +echo "configure:13805: checking for $ac_hdr" >&5 +if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ eval echo configure:13815: \"$ac_try\" 1>&5; eval $ac_try 2>&5; } +ac_err=`tr -d '\015' < conftest.out | grep -v '^ *+' | grep -v "^conftest.${ac_ext}\$"` +if test -z "$ac_err"; then + rm -rf conftest* + eval "ac_cv_header_$ac_safe=yes" +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_header_$ac_safe=no" +fi +rm -f conftest* +fi +if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then + eval echo "$ac_t""yes" 1>&6 + ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` + cat >> confdefs.h <&6 +fi +done + +echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6 +echo "configure:13842: checking for sys/wait.h that is POSIX.1 compatible" >&5 +if eval "test \"`echo '$''{'ac_cv_header_sys_wait_h'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +#include +#ifndef WEXITSTATUS +#define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8) +#endif +#ifndef WIFEXITED +#define WIFEXITED(stat_val) (((stat_val) & 255) == 0) +#endif +int main() { +int s; +wait (&s); +s = WIFEXITED (s) ? WEXITSTATUS (s) : 1; +; return 0; } +EOF +if { eval echo configure:13863: \"$ac_compile\" 1>&5; eval $ac_compile 2>&5; }; then + rm -rf conftest* + ac_cv_header_sys_wait_h=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + ac_cv_header_sys_wait_h=no +fi +rm -f conftest* +fi + +eval echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6 +if test $ac_cv_header_sys_wait_h = yes; then + cat >> confdefs.h <<\EOF +#define HAVE_SYS_WAIT_H 1 +EOF + +fi + +echo $ac_n "checking for halfway POSIX compliant waitid()""... $ac_c" 1>&6 +echo "configure:13884: checking for halfway POSIX compliant waitid()" >&5 +if eval "test \"`echo '$''{'ac_cv_func_waitid'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test "$cross_compiling" = yes; then + { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } +else + cat > conftest.$ac_ext < +#endif +#ifdef HAVE_UNISTD_H +#include +#endif +#if defined(HAVE_WAIT_H) +# include +#else +#include +#endif +#include +/* + * Non-standard compliant platforms may need + * #include or something similar + * in addition to the include files above. + */ + +int +main() +{ + siginfo_t si; + pid_t pid; + int ret; + + if ((pid = fork()) < 0) + exit(1); + if (pid == 0) { + _exit(1234567890); + } + ret = waitid(P_PID, pid, &si, WEXITED); + if (ret < 0) + exit(1); + if (pid != si.si_pid) /* Mac OS X has si.si_pid == 0 */ + exit(2); + if (si.si_code != CLD_EXITED) /* Mac OS X has si.si_code == 0 */ + exit(3); + if ((si.si_status & 0xFFFF) != (1234567890 & 0xFFFF)) + exit(4); /* Should deliver more than 8 bits */ + /* Linux only delivers 8 bits */ + /* Mac OS X delivers 24 bits */ + + exit(0); +} +EOF +if { eval echo configure:13940: \"$ac_link\" 1>&5; eval $ac_link 2>&5; } && test -s conftest${ac_exeext} && ($rmtcall ./conftest${ac_xexeext}; exit) 2>/dev/null +then + ac_cv_func_waitid=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* + ac_cv_func_waitid=no +fi +rm -fr conftest* +fi + +fi + +eval echo "$ac_t""$ac_cv_func_waitid" 1>&6 +if test $ac_cv_func_waitid = yes; then + cat >> confdefs.h <<\EOF +#define HAVE_WAITID 1 +EOF + +fi +for ac_func in access eaccess euidaccess +do +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +echo "configure:13964: checking for $ac_func" >&5 +if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func(); + +int main() { + +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +$ac_func(); +#endif + +; return 0; } +EOF +if { eval echo configure:13992: \"$ac_link\" 1>&5; eval $ac_link 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_$ac_func=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func_$ac_func=no" +fi +rm -f conftest* +fi + +if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then + eval echo "$ac_t""yes" 1>&6 + ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` + cat >> confdefs.h <&6 +fi +done + +for ac_func in memchr memcmp memcpy memccpy memmove memset +do +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +echo "configure:14019: checking for $ac_func" >&5 +if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func(); + +int main() { + +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +$ac_func(); +#endif + +; return 0; } +EOF +if { eval echo configure:14047: \"$ac_link\" 1>&5; eval $ac_link 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_$ac_func=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func_$ac_func=no" +fi +rm -f conftest* +fi + +if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then + eval echo "$ac_t""yes" 1>&6 + ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` + cat >> confdefs.h <&6 +fi +done + +for ac_func in brk sbrk strerror nice flock lockf fchdir statvfs quotactl +do +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +echo "configure:14074: checking for $ac_func" >&5 +if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func(); + +int main() { + +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +$ac_func(); +#endif + +; return 0; } +EOF +if { eval echo configure:14102: \"$ac_link\" 1>&5; eval $ac_link 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_$ac_func=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func_$ac_func=no" +fi +rm -f conftest* +fi + +if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then + eval echo "$ac_t""yes" 1>&6 + ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` + cat >> confdefs.h <&6 +fi +done + +for ac_func in realpath resolvepath +do +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +echo "configure:14129: checking for $ac_func" >&5 +if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func(); + +int main() { + +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +$ac_func(); +#endif + +; return 0; } +EOF +if { eval echo configure:14157: \"$ac_link\" 1>&5; eval $ac_link 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_$ac_func=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func_$ac_func=no" +fi +rm -f conftest* +fi + +if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then + eval echo "$ac_t""yes" 1>&6 + ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` + cat >> confdefs.h <&6 +fi +done + +for ac_func in dup dup2 +do +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +echo "configure:14184: checking for $ac_func" >&5 +if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func(); + +int main() { + +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +$ac_func(); +#endif + +; return 0; } +EOF +if { eval echo configure:14212: \"$ac_link\" 1>&5; eval $ac_link 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_$ac_func=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func_$ac_func=no" +fi +rm -f conftest* +fi + +if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then + eval echo "$ac_t""yes" 1>&6 + ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` + cat >> confdefs.h <&6 +fi +done + +for ac_func in getcwd shmat semget +do +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +echo "configure:14239: checking for $ac_func" >&5 +if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func(); + +int main() { + +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +$ac_func(); +#endif + +; return 0; } +EOF +if { eval echo configure:14267: \"$ac_link\" 1>&5; eval $ac_link 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_$ac_func=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func_$ac_func=no" +fi +rm -f conftest* +fi + +if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then + eval echo "$ac_t""yes" 1>&6 + ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` + cat >> confdefs.h <&6 +fi +done + +for ac_func in lstat readlink symlink link rename mkfifo mknod +do +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +echo "configure:14294: checking for $ac_func" >&5 +if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func(); + +int main() { + +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +$ac_func(); +#endif + +; return 0; } +EOF +if { eval echo configure:14322: \"$ac_link\" 1>&5; eval $ac_link 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_$ac_func=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func_$ac_func=no" +fi +rm -f conftest* +fi + +if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then + eval echo "$ac_t""yes" 1>&6 + ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` + cat >> confdefs.h <&6 +fi +done + +for ac_func in setreuid setresuid seteuid setuid +do +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +echo "configure:14349: checking for $ac_func" >&5 +if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func(); + +int main() { + +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +$ac_func(); +#endif + +; return 0; } +EOF +if { eval echo configure:14377: \"$ac_link\" 1>&5; eval $ac_link 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_$ac_func=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func_$ac_func=no" +fi +rm -f conftest* +fi + +if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then + eval echo "$ac_t""yes" 1>&6 + ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` + cat >> confdefs.h <&6 +fi +done + +for ac_func in setregid setresgid setegid setgid +do +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +echo "configure:14404: checking for $ac_func" >&5 +if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func(); + +int main() { + +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +$ac_func(); +#endif + +; return 0; } +EOF +if { eval echo configure:14432: \"$ac_link\" 1>&5; eval $ac_link 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_$ac_func=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func_$ac_func=no" +fi +rm -f conftest* +fi + +if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then + eval echo "$ac_t""yes" 1>&6 + ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` + cat >> confdefs.h <&6 +fi +done + +for ac_func in getuid geteuid getgid getegid +do +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +echo "configure:14459: checking for $ac_func" >&5 +if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func(); + +int main() { + +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +$ac_func(); +#endif + +; return 0; } +EOF +if { eval echo configure:14487: \"$ac_link\" 1>&5; eval $ac_link 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_$ac_func=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func_$ac_func=no" +fi +rm -f conftest* +fi + +if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then + eval echo "$ac_t""yes" 1>&6 + ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` + cat >> confdefs.h <&6 +fi +done + +for ac_func in getpid getppid +do +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +echo "configure:14514: checking for $ac_func" >&5 +if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func(); + +int main() { + +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +$ac_func(); +#endif + +; return 0; } +EOF +if { eval echo configure:14542: \"$ac_link\" 1>&5; eval $ac_link 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_$ac_func=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func_$ac_func=no" +fi +rm -f conftest* +fi + +if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then + eval echo "$ac_t""yes" 1>&6 + ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` + cat >> confdefs.h <&6 +fi +done + +for ac_func in getpgid setpgid getsid setsid +do +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +echo "configure:14569: checking for $ac_func" >&5 +if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func(); + +int main() { + +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +$ac_func(); +#endif + +; return 0; } +EOF +if { eval echo configure:14597: \"$ac_link\" 1>&5; eval $ac_link 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_$ac_func=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func_$ac_func=no" +fi +rm -f conftest* +fi + +if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then + eval echo "$ac_t""yes" 1>&6 + ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` + cat >> confdefs.h <&6 +fi +done + +for ac_func in getpgrp setpgrp +do +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +echo "configure:14624: checking for $ac_func" >&5 +if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func(); + +int main() { + +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +$ac_func(); +#endif + +; return 0; } +EOF +if { eval echo configure:14652: \"$ac_link\" 1>&5; eval $ac_link 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_$ac_func=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func_$ac_func=no" +fi +rm -f conftest* +fi + +if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then + eval echo "$ac_t""yes" 1>&6 + ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` + cat >> confdefs.h <&6 +fi +done + +for ac_func in getpwnam getpwent getpwuid setpwent endpwent +do +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +echo "configure:14679: checking for $ac_func" >&5 +if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func(); + +int main() { + +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +$ac_func(); +#endif + +; return 0; } +EOF +if { eval echo configure:14707: \"$ac_link\" 1>&5; eval $ac_link 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_$ac_func=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func_$ac_func=no" +fi +rm -f conftest* +fi + +if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then + eval echo "$ac_t""yes" 1>&6 + ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` + cat >> confdefs.h <&6 +fi +done + +for ac_func in getgrnam getgrent getgrgid setgrent endgrent +do +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +echo "configure:14734: checking for $ac_func" >&5 +if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func(); + +int main() { + +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +$ac_func(); +#endif + +; return 0; } +EOF +if { eval echo configure:14762: \"$ac_link\" 1>&5; eval $ac_link 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_$ac_func=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func_$ac_func=no" +fi +rm -f conftest* +fi + +if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then + eval echo "$ac_t""yes" 1>&6 + ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` + cat >> confdefs.h <&6 +fi +done + +for ac_func in getspnam getspwnam +do +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +echo "configure:14789: checking for $ac_func" >&5 +if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func(); + +int main() { + +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +$ac_func(); +#endif + +; return 0; } +EOF +if { eval echo configure:14817: \"$ac_link\" 1>&5; eval $ac_link 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_$ac_func=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func_$ac_func=no" +fi +rm -f conftest* +fi + +if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then + eval echo "$ac_t""yes" 1>&6 + ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` + cat >> confdefs.h <&6 +fi +done + +for ac_func in getlogin +do +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +echo "configure:14844: checking for $ac_func" >&5 +if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func(); + +int main() { + +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +$ac_func(); +#endif + +; return 0; } +EOF +if { eval echo configure:14872: \"$ac_link\" 1>&5; eval $ac_link 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_$ac_func=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func_$ac_func=no" +fi +rm -f conftest* +fi + +if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then + eval echo "$ac_t""yes" 1>&6 + ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` + cat >> confdefs.h <&6 +fi +done + +for ac_func in sync fsync fork forkx vforkx forkall forkallx wait wait4 wait6 waitpid getrusage getrlimit setrlimit ulimit +do +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +echo "configure:14899: checking for $ac_func" >&5 +if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func(); + +int main() { + +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +$ac_func(); +#endif + +; return 0; } +EOF +if { eval echo configure:14927: \"$ac_link\" 1>&5; eval $ac_link 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_$ac_func=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func_$ac_func=no" +fi +rm -f conftest* +fi + +if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then + eval echo "$ac_t""yes" 1>&6 + ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` + cat >> confdefs.h <&6 +fi +done + +for ac_func in execl execle execlp execv execve execvp +do +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +echo "configure:14954: checking for $ac_func" >&5 +if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func(); + +int main() { + +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +$ac_func(); +#endif + +; return 0; } +EOF +if { eval echo configure:14982: \"$ac_link\" 1>&5; eval $ac_link 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_$ac_func=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func_$ac_func=no" +fi +rm -f conftest* +fi + +if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then + eval echo "$ac_t""yes" 1>&6 + ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` + cat >> confdefs.h <&6 +fi +done + +for ac_func in spawnl spawnle spawnlp spawnlpe +do +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +echo "configure:15009: checking for $ac_func" >&5 +if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func(); + +int main() { + +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +$ac_func(); +#endif + +; return 0; } +EOF +if { eval echo configure:15037: \"$ac_link\" 1>&5; eval $ac_link 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_$ac_func=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func_$ac_func=no" +fi +rm -f conftest* +fi + +if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then + eval echo "$ac_t""yes" 1>&6 + ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` + cat >> confdefs.h <&6 +fi +done + +for ac_func in spawnv spawnve spawnvp spawnvpe +do +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +echo "configure:15064: checking for $ac_func" >&5 +if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func(); + +int main() { + +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +$ac_func(); +#endif + +; return 0; } +EOF +if { eval echo configure:15092: \"$ac_link\" 1>&5; eval $ac_link 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_$ac_func=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func_$ac_func=no" +fi +rm -f conftest* +fi + +if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then + eval echo "$ac_t""yes" 1>&6 + ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` + cat >> confdefs.h <&6 +fi +done + +for ac_func in cwait +do +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +echo "configure:15119: checking for $ac_func" >&5 +if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func(); + +int main() { + +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +$ac_func(); +#endif + +; return 0; } +EOF +if { eval echo configure:15147: \"$ac_link\" 1>&5; eval $ac_link 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_$ac_func=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func_$ac_func=no" +fi +rm -f conftest* +fi + +if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then + eval echo "$ac_t""yes" 1>&6 + ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` + cat >> confdefs.h <&6 +fi +done + +for ac_func in getexecname +do +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +echo "configure:15174: checking for $ac_func" >&5 +if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func(); + +int main() { + +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +$ac_func(); +#endif + +; return 0; } +EOF +if { eval echo configure:15202: \"$ac_link\" 1>&5; eval $ac_link 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_$ac_func=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func_$ac_func=no" +fi +rm -f conftest* +fi + +if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then + eval echo "$ac_t""yes" 1>&6 + ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` + cat >> confdefs.h <&6 +fi +done + +for ac_func in getprogname setprogname +do +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +echo "configure:15229: checking for $ac_func" >&5 +if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func(); + +int main() { + +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +$ac_func(); +#endif + +; return 0; } +EOF +if { eval echo configure:15257: \"$ac_link\" 1>&5; eval $ac_link 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_$ac_func=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func_$ac_func=no" +fi +rm -f conftest* +fi + +if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then + eval echo "$ac_t""yes" 1>&6 + ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` + cat >> confdefs.h <&6 +fi +done + +for ac_func in proc_pidpath +do +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +echo "configure:15284: checking for $ac_func" >&5 +if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func(); + +int main() { + +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +$ac_func(); +#endif + +; return 0; } +EOF +if { eval echo configure:15312: \"$ac_link\" 1>&5; eval $ac_link 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_$ac_func=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func_$ac_func=no" +fi +rm -f conftest* +fi + +if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then + eval echo "$ac_t""yes" 1>&6 + ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` + cat >> confdefs.h <&6 +fi +done + +for ac_func in getloadavg +do +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +echo "configure:15339: checking for $ac_func" >&5 +if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func(); + +int main() { + +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +$ac_func(); +#endif + +; return 0; } +EOF +if { eval echo configure:15367: \"$ac_link\" 1>&5; eval $ac_link 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_$ac_func=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func_$ac_func=no" +fi +rm -f conftest* +fi + +if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then + eval echo "$ac_t""yes" 1>&6 + ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` + cat >> confdefs.h <&6 +fi +done + +for ac_func in gethostid gethostname getdomainname getdtablesize +do +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +echo "configure:15394: checking for $ac_func" >&5 +if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func(); + +int main() { + +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +$ac_func(); +#endif + +; return 0; } +EOF +if { eval echo configure:15422: \"$ac_link\" 1>&5; eval $ac_link 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_$ac_func=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func_$ac_func=no" +fi +rm -f conftest* +fi + +if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then + eval echo "$ac_t""yes" 1>&6 + ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` + cat >> confdefs.h <&6 +fi +done + +for ac_func in gettimeofday settimeofday time stime gethrtime +do +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +echo "configure:15449: checking for $ac_func" >&5 +if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func(); + +int main() { + +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +$ac_func(); +#endif + +; return 0; } +EOF +if { eval echo configure:15477: \"$ac_link\" 1>&5; eval $ac_link 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_$ac_func=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func_$ac_func=no" +fi +rm -f conftest* +fi + +if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then + eval echo "$ac_t""yes" 1>&6 + ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` + cat >> confdefs.h <&6 +fi +done + +for ac_func in ftime tzset mktime gmtime localtime timegm timelocal +do +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +echo "configure:15504: checking for $ac_func" >&5 +if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func(); + +int main() { + +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +$ac_func(); +#endif + +; return 0; } +EOF +if { eval echo configure:15532: \"$ac_link\" 1>&5; eval $ac_link 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_$ac_func=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func_$ac_func=no" +fi +rm -f conftest* +fi + +if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then + eval echo "$ac_t""yes" 1>&6 + ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` + cat >> confdefs.h <&6 +fi +done + +for ac_func in ctime cftime ascftime strftime +do +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +echo "configure:15559: checking for $ac_func" >&5 +if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func(); + +int main() { + +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +$ac_func(); +#endif + +; return 0; } +EOF +if { eval echo configure:15587: \"$ac_link\" 1>&5; eval $ac_link 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_$ac_func=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func_$ac_func=no" +fi +rm -f conftest* +fi + +if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then + eval echo "$ac_t""yes" 1>&6 + ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` + cat >> confdefs.h <&6 +fi +done + +for ac_func in poll select isastream +do +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +echo "configure:15614: checking for $ac_func" >&5 +if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func(); + +int main() { + +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +$ac_func(); +#endif + +; return 0; } +EOF +if { eval echo configure:15642: \"$ac_link\" 1>&5; eval $ac_link 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_$ac_func=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func_$ac_func=no" +fi +rm -f conftest* +fi + +if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then + eval echo "$ac_t""yes" 1>&6 + ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` + cat >> confdefs.h <&6 +fi +done + +for ac_func in chown fchown lchown chmod fchmod lchmod times utime utimes futimes lutimes +do +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +echo "configure:15669: checking for $ac_func" >&5 +if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func(); + +int main() { + +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +$ac_func(); +#endif + +; return 0; } +EOF +if { eval echo configure:15697: \"$ac_link\" 1>&5; eval $ac_link 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_$ac_func=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func_$ac_func=no" +fi +rm -f conftest* +fi + +if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then + eval echo "$ac_t""yes" 1>&6 + ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` + cat >> confdefs.h <&6 +fi +done + +for ac_func in utimens lutimens +do +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +echo "configure:15724: checking for $ac_func" >&5 +if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func(); + +int main() { + +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +$ac_func(); +#endif + +; return 0; } +EOF +if { eval echo configure:15752: \"$ac_link\" 1>&5; eval $ac_link 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_$ac_func=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func_$ac_func=no" +fi +rm -f conftest* +fi + +if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then + eval echo "$ac_t""yes" 1>&6 + ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` + cat >> confdefs.h <&6 +fi +done + +for ac_func in futimens utimensat +do +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +echo "configure:15779: checking for $ac_func" >&5 +if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func(); + +int main() { + +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +$ac_func(); +#endif + +; return 0; } +EOF +if { eval echo configure:15807: \"$ac_link\" 1>&5; eval $ac_link 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_$ac_func=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func_$ac_func=no" +fi +rm -f conftest* +fi + +if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then + eval echo "$ac_t""yes" 1>&6 + ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` + cat >> confdefs.h <&6 +fi +done + +for ac_func in ioctl fcntl +do +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +echo "configure:15834: checking for $ac_func" >&5 +if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func(); + +int main() { + +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +$ac_func(); +#endif + +; return 0; } +EOF +if { eval echo configure:15862: \"$ac_link\" 1>&5; eval $ac_link 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_$ac_func=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func_$ac_func=no" +fi +rm -f conftest* +fi + +if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then + eval echo "$ac_t""yes" 1>&6 + ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` + cat >> confdefs.h <&6 +fi +done + +for ac_func in qecvt qfcvt qgcvt +do +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +echo "configure:15889: checking for $ac_func" >&5 +if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func(); + +int main() { + +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +$ac_func(); +#endif + +; return 0; } +EOF +if { eval echo configure:15917: \"$ac_link\" 1>&5; eval $ac_link 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_$ac_func=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func_$ac_func=no" +fi +rm -f conftest* +fi + +if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then + eval echo "$ac_t""yes" 1>&6 + ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` + cat >> confdefs.h <&6 +fi +done + +for ac_func in _qecvt _qfcvt _qgcvt +do +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +echo "configure:15944: checking for $ac_func" >&5 +if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func(); + +int main() { + +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +$ac_func(); +#endif + +; return 0; } +EOF +if { eval echo configure:15972: \"$ac_link\" 1>&5; eval $ac_link 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_$ac_func=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func_$ac_func=no" +fi +rm -f conftest* +fi + +if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then + eval echo "$ac_t""yes" 1>&6 + ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` + cat >> confdefs.h <&6 +fi +done + +for ac_func in _qecvt_r _qfcvt_r _qgcvt_r +do +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +echo "configure:15999: checking for $ac_func" >&5 +if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func(); + +int main() { + +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +$ac_func(); +#endif + +; return 0; } +EOF +if { eval echo configure:16027: \"$ac_link\" 1>&5; eval $ac_link 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_$ac_func=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func_$ac_func=no" +fi +rm -f conftest* +fi + +if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then + eval echo "$ac_t""yes" 1>&6 + ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` + cat >> confdefs.h <&6 +fi +done + +for ac_func in _ldecvt _ldfcvt _ldgcvt +do +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +echo "configure:16054: checking for $ac_func" >&5 +if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func(); + +int main() { + +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +$ac_func(); +#endif + +; return 0; } +EOF +if { eval echo configure:16082: \"$ac_link\" 1>&5; eval $ac_link 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_$ac_func=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func_$ac_func=no" +fi +rm -f conftest* +fi + +if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then + eval echo "$ac_t""yes" 1>&6 + ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` + cat >> confdefs.h <&6 +fi +done + +for ac_func in ecvt_r fcvt_r gcvt_r +do +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +echo "configure:16109: checking for $ac_func" >&5 +if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func(); + +int main() { + +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +$ac_func(); +#endif + +; return 0; } +EOF +if { eval echo configure:16137: \"$ac_link\" 1>&5; eval $ac_link 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_$ac_func=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func_$ac_func=no" +fi +rm -f conftest* +fi + +if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then + eval echo "$ac_t""yes" 1>&6 + ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` + cat >> confdefs.h <&6 +fi +done + +for ac_func in _ldecvt_r _ldfcvt_r _ldgcvt_r +do +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +echo "configure:16164: checking for $ac_func" >&5 +if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func(); + +int main() { + +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +$ac_func(); +#endif + +; return 0; } +EOF +if { eval echo configure:16192: \"$ac_link\" 1>&5; eval $ac_link 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_$ac_func=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func_$ac_func=no" +fi +rm -f conftest* +fi + +if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then + eval echo "$ac_t""yes" 1>&6 + ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` + cat >> confdefs.h <&6 +fi +done + +for ac_func in econvert fconvert gconvert +do +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +echo "configure:16219: checking for $ac_func" >&5 +if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func(); + +int main() { + +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +$ac_func(); +#endif + +; return 0; } +EOF +if { eval echo configure:16247: \"$ac_link\" 1>&5; eval $ac_link 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_$ac_func=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func_$ac_func=no" +fi +rm -f conftest* +fi + +if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then + eval echo "$ac_t""yes" 1>&6 + ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` + cat >> confdefs.h <&6 +fi +done + +for ac_func in qeconvert qfconvert qgconvert +do +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +echo "configure:16274: checking for $ac_func" >&5 +if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func(); + +int main() { + +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +$ac_func(); +#endif + +; return 0; } +EOF +if { eval echo configure:16302: \"$ac_link\" 1>&5; eval $ac_link 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_$ac_func=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func_$ac_func=no" +fi +rm -f conftest* +fi + +if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then + eval echo "$ac_t""yes" 1>&6 + ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` + cat >> confdefs.h <&6 +fi +done + +for ac_func in isinf isnan +do +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +echo "configure:16329: checking for $ac_func" >&5 +if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func(); + +int main() { + +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +$ac_func(); +#endif + +; return 0; } +EOF +if { eval echo configure:16357: \"$ac_link\" 1>&5; eval $ac_link 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_$ac_func=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func_$ac_func=no" +fi +rm -f conftest* +fi + +if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then + eval echo "$ac_t""yes" 1>&6 + ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` + cat >> confdefs.h <&6 +fi +done + +for ac_func in getc_unlocked getchar_unlocked putc_unlocked putchar_unlocked +do +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +echo "configure:16384: checking for $ac_func" >&5 +if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func(); + +int main() { + +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +$ac_func(); +#endif + +; return 0; } +EOF +if { eval echo configure:16412: \"$ac_link\" 1>&5; eval $ac_link 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_$ac_func=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func_$ac_func=no" +fi +rm -f conftest* +fi + +if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then + eval echo "$ac_t""yes" 1>&6 + ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` + cat >> confdefs.h <&6 +fi +done + +for ac_func in flockfile funlockfile ftrylockfile +do +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +echo "configure:16439: checking for $ac_func" >&5 +if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func(); + +int main() { + +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +$ac_func(); +#endif + +; return 0; } +EOF +if { eval echo configure:16467: \"$ac_link\" 1>&5; eval $ac_link 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_$ac_func=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func_$ac_func=no" +fi +rm -f conftest* +fi + +if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then + eval echo "$ac_t""yes" 1>&6 + ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` + cat >> confdefs.h <&6 +fi +done + +for ac_func in rand drand48 +do +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +echo "configure:16494: checking for $ac_func" >&5 +if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func(); + +int main() { + +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +$ac_func(); +#endif + +; return 0; } +EOF +if { eval echo configure:16522: \"$ac_link\" 1>&5; eval $ac_link 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_$ac_func=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func_$ac_func=no" +fi +rm -f conftest* +fi + +if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then + eval echo "$ac_t""yes" 1>&6 + ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` + cat >> confdefs.h <&6 +fi +done + +for ac_func in strtol strtoll strtoul strtoull strtod +do +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +echo "configure:16549: checking for $ac_func" >&5 +if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func(); + +int main() { + +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +$ac_func(); +#endif + +; return 0; } +EOF +if { eval echo configure:16577: \"$ac_link\" 1>&5; eval $ac_link 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_$ac_func=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func_$ac_func=no" +fi +rm -f conftest* +fi + +if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then + eval echo "$ac_t""yes" 1>&6 + ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` + cat >> confdefs.h <&6 +fi +done + +for ac_func in setpriority DosSetPriority +do +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +echo "configure:16604: checking for $ac_func" >&5 +if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func(); + +int main() { + +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +$ac_func(); +#endif + +; return 0; } +EOF +if { eval echo configure:16632: \"$ac_link\" 1>&5; eval $ac_link 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_$ac_func=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func_$ac_func=no" +fi +rm -f conftest* +fi + +if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then + eval echo "$ac_t""yes" 1>&6 + ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` + cat >> confdefs.h <&6 +fi +done + +for ac_func in DosAllocSharedMem +do +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +echo "configure:16659: checking for $ac_func" >&5 +if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func(); + +int main() { + +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +$ac_func(); +#endif + +; return 0; } +EOF +if { eval echo configure:16687: \"$ac_link\" 1>&5; eval $ac_link 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_$ac_func=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func_$ac_func=no" +fi +rm -f conftest* +fi + +if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then + eval echo "$ac_t""yes" 1>&6 + ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` + cat >> confdefs.h <&6 +fi +done + +for ac_func in getdelim +do +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +echo "configure:16714: checking for $ac_func" >&5 +if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func(); + +int main() { + +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +$ac_func(); +#endif + +; return 0; } +EOF +if { eval echo configure:16742: \"$ac_link\" 1>&5; eval $ac_link 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_$ac_func=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func_$ac_func=no" +fi +rm -f conftest* +fi + +if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then + eval echo "$ac_t""yes" 1>&6 + ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` + cat >> confdefs.h <&6 +fi +done + +for ac_func in seekdir fdopendir +do +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +echo "configure:16769: checking for $ac_func" >&5 +if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func(); + +int main() { + +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +$ac_func(); +#endif + +; return 0; } +EOF +if { eval echo configure:16797: \"$ac_link\" 1>&5; eval $ac_link 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_$ac_func=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func_$ac_func=no" +fi +rm -f conftest* +fi + +if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then + eval echo "$ac_t""yes" 1>&6 + ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` + cat >> confdefs.h <&6 +fi +done + +for ac_func in openat fstatat fchownat futimesat renameat unlinkat +do +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +echo "configure:16824: checking for $ac_func" >&5 +if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func(); + +int main() { + +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +$ac_func(); +#endif + +; return 0; } +EOF +if { eval echo configure:16852: \"$ac_link\" 1>&5; eval $ac_link 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_$ac_func=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func_$ac_func=no" +fi +rm -f conftest* +fi + +if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then + eval echo "$ac_t""yes" 1>&6 + ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` + cat >> confdefs.h <&6 +fi +done + +for ac_func in attropen +do +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +echo "configure:16879: checking for $ac_func" >&5 +if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func(); + +int main() { + +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +$ac_func(); +#endif + +; return 0; } +EOF +if { eval echo configure:16907: \"$ac_link\" 1>&5; eval $ac_link 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_$ac_func=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func_$ac_func=no" +fi +rm -f conftest* +fi + +if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then + eval echo "$ac_t""yes" 1>&6 + ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` + cat >> confdefs.h <&6 +fi +done + +for ac_func in __accessat +do +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +echo "configure:16934: checking for $ac_func" >&5 +if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func(); + +int main() { + +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +$ac_func(); +#endif + +; return 0; } +EOF +if { eval echo configure:16962: \"$ac_link\" 1>&5; eval $ac_link 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_$ac_func=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func_$ac_func=no" +fi +rm -f conftest* +fi + +if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then + eval echo "$ac_t""yes" 1>&6 + ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` + cat >> confdefs.h <&6 +fi +done + +for ac_func in accessat +do +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +echo "configure:16989: checking for $ac_func" >&5 +if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func(); + +int main() { + +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +$ac_func(); +#endif + +; return 0; } +EOF +if { eval echo configure:17017: \"$ac_link\" 1>&5; eval $ac_link 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_$ac_func=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func_$ac_func=no" +fi +rm -f conftest* +fi + +if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then + eval echo "$ac_t""yes" 1>&6 + ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` + cat >> confdefs.h <&6 +fi +done + +for ac_func in mkdirat faccessat fchmodat linkat mkfifoat mknodat readlinkat symlinkat +do +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +echo "configure:17044: checking for $ac_func" >&5 +if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func(); + +int main() { + +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +$ac_func(); +#endif + +; return 0; } +EOF +if { eval echo configure:17072: \"$ac_link\" 1>&5; eval $ac_link 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_$ac_func=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func_$ac_func=no" +fi +rm -f conftest* +fi + +if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then + eval echo "$ac_t""yes" 1>&6 + ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` + cat >> confdefs.h <&6 +fi +done + +for ac_func in pipe _pipe +do +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +echo "configure:17099: checking for $ac_func" >&5 +if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func(); + +int main() { + +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +$ac_func(); +#endif + +; return 0; } +EOF +if { eval echo configure:17127: \"$ac_link\" 1>&5; eval $ac_link 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_$ac_func=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func_$ac_func=no" +fi +rm -f conftest* +fi + +if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then + eval echo "$ac_t""yes" 1>&6 + ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` + cat >> confdefs.h <&6 +fi +done + +for ac_func in popen pclose _popen _pclose +do +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +echo "configure:17154: checking for $ac_func" >&5 +if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func(); + +int main() { + +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +$ac_func(); +#endif + +; return 0; } +EOF +if { eval echo configure:17182: \"$ac_link\" 1>&5; eval $ac_link 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_$ac_func=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func_$ac_func=no" +fi +rm -f conftest* +fi + +if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then + eval echo "$ac_t""yes" 1>&6 + ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` + cat >> confdefs.h <&6 +fi +done + +for ac_func in closefrom +do +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +echo "configure:17209: checking for $ac_func" >&5 +if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func(); + +int main() { + +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +$ac_func(); +#endif + +; return 0; } +EOF +if { eval echo configure:17237: \"$ac_link\" 1>&5; eval $ac_link 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_$ac_func=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func_$ac_func=no" +fi +rm -f conftest* +fi + +if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then + eval echo "$ac_t""yes" 1>&6 + ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` + cat >> confdefs.h <&6 +fi +done + +for ac_func in strsignal str2sig sig2str +do +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +echo "configure:17264: checking for $ac_func" >&5 +if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func(); + +int main() { + +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +$ac_func(); +#endif + +; return 0; } +EOF +if { eval echo configure:17292: \"$ac_link\" 1>&5; eval $ac_link 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_$ac_func=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func_$ac_func=no" +fi +rm -f conftest* +fi + +if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then + eval echo "$ac_t""yes" 1>&6 + ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` + cat >> confdefs.h <&6 +fi +done + +for ac_func in kill killpg +do +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +echo "configure:17319: checking for $ac_func" >&5 +if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func(); + +int main() { + +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +$ac_func(); +#endif + +; return 0; } +EOF +if { eval echo configure:17347: \"$ac_link\" 1>&5; eval $ac_link 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_$ac_func=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func_$ac_func=no" +fi +rm -f conftest* +fi + +if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then + eval echo "$ac_t""yes" 1>&6 + ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` + cat >> confdefs.h <&6 +fi +done + +for ac_func in signal sighold sigrelse sigignore sigpause sigprocmask sigsetmask sigset sigaltstack sigblock +do +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +echo "configure:17374: checking for $ac_func" >&5 +if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func(); + +int main() { + +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +$ac_func(); +#endif + +; return 0; } +EOF +if { eval echo configure:17402: \"$ac_link\" 1>&5; eval $ac_link 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_$ac_func=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func_$ac_func=no" +fi +rm -f conftest* +fi + +if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then + eval echo "$ac_t""yes" 1>&6 + ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` + cat >> confdefs.h <&6 +fi +done + +for ac_func in alarm sleep usleep yield +do +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +echo "configure:17429: checking for $ac_func" >&5 +if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func(); + +int main() { + +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +$ac_func(); +#endif + +; return 0; } +EOF +if { eval echo configure:17457: \"$ac_link\" 1>&5; eval $ac_link 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_$ac_func=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func_$ac_func=no" +fi +rm -f conftest* +fi + +if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then + eval echo "$ac_t""yes" 1>&6 + ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` + cat >> confdefs.h <&6 +fi +done + +for ac_func in atexit on_exit +do +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +echo "configure:17484: checking for $ac_func" >&5 +if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func(); + +int main() { + +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +$ac_func(); +#endif + +; return 0; } +EOF +if { eval echo configure:17512: \"$ac_link\" 1>&5; eval $ac_link 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_$ac_func=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func_$ac_func=no" +fi +rm -f conftest* +fi + +if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then + eval echo "$ac_t""yes" 1>&6 + ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` + cat >> confdefs.h <&6 +fi +done + +echo $ac_n "checking if tcgetattr is defined or function""... $ac_c" 1>&6 +echo "configure:17537: checking if tcgetattr is defined or function" >&5 +if eval "test \"`echo '$''{'"ac_cv_have_tcgetattr"'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +#endif + +int main() { + +#ifndef tcgetattr + char *p = (char *) tcgetattr; + exit (p != (char *)0 && *p != 0); +#endif +; return 0; } +EOF +if { eval echo configure:17557: \"$ac_link\" 1>&5; eval $ac_link 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval ac_cv_have_tcgetattr=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval ac_cv_have_tcgetattr=no +fi +rm -f conftest* +fi + +eval echo "$ac_t""$"ac_cv_have_tcgetattr"" 1>&6 + ac_tr_dfunc=HAVE_`echo tcgetattr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` +if eval "test \"`echo '$ac_cv_have_'tcgetattr`\" = yes"; then + cat >> confdefs.h <&6 +echo "configure:17579: checking if tcsetattr is defined or function" >&5 +if eval "test \"`echo '$''{'"ac_cv_have_tcsetattr"'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +#endif + +int main() { + +#ifndef tcsetattr + char *p = (char *) tcsetattr; + exit (p != (char *)0 && *p != 0); +#endif +; return 0; } +EOF +if { eval echo configure:17599: \"$ac_link\" 1>&5; eval $ac_link 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval ac_cv_have_tcsetattr=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval ac_cv_have_tcsetattr=no +fi +rm -f conftest* +fi + +eval echo "$ac_t""$"ac_cv_have_tcsetattr"" 1>&6 + ac_tr_dfunc=HAVE_`echo tcsetattr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` +if eval "test \"`echo '$ac_cv_have_'tcsetattr`\" = yes"; then + cat >> confdefs.h <&6 +echo "configure:17623: checking for $ac_func" >&5 +if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func(); + +int main() { + +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +$ac_func(); +#endif + +; return 0; } +EOF +if { eval echo configure:17651: \"$ac_link\" 1>&5; eval $ac_link 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_$ac_func=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func_$ac_func=no" +fi +rm -f conftest* +fi + +if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then + eval echo "$ac_t""yes" 1>&6 + ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` + cat >> confdefs.h <&6 +fi +done + +for ac_func in getenv putenv setenv unsetenv +do +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +echo "configure:17678: checking for $ac_func" >&5 +if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func(); + +int main() { + +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +$ac_func(); +#endif + +; return 0; } +EOF +if { eval echo configure:17706: \"$ac_link\" 1>&5; eval $ac_link 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_$ac_func=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func_$ac_func=no" +fi +rm -f conftest* +fi + +if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then + eval echo "$ac_t""yes" 1>&6 + ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` + cat >> confdefs.h <&6 +fi +done + +for ac_func in snprintf strcasecmp strncasecmp +do +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +echo "configure:17733: checking for $ac_func" >&5 +if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func(); + +int main() { + +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +$ac_func(); +#endif + +; return 0; } +EOF +if { eval echo configure:17761: \"$ac_link\" 1>&5; eval $ac_link 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_$ac_func=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func_$ac_func=no" +fi +rm -f conftest* +fi + +if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then + eval echo "$ac_t""yes" 1>&6 + ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` + cat >> confdefs.h <&6 +fi +done + +for ac_func in vprintf vfprintf vsprintf vsnprintf +do +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +echo "configure:17788: checking for $ac_func" >&5 +if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func(); + +int main() { + +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +$ac_func(); +#endif + +; return 0; } +EOF +if { eval echo configure:17816: \"$ac_link\" 1>&5; eval $ac_link 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_$ac_func=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func_$ac_func=no" +fi +rm -f conftest* +fi + +if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then + eval echo "$ac_t""yes" 1>&6 + ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` + cat >> confdefs.h <&6 +fi +done + + +for ac_func in strcat strncat strcmp strncmp strcpy strlcat strlcpy strncpy strdup strndup strlen strnlen strchr strrchr strstr strspn strcspn +do +echo $ac_n "checking if $ac_func is defined or function""... $ac_c" 1>&6 +echo "configure:17844: checking if $ac_func is defined or function" >&5 +if eval "test \"`echo '$''{'"ac_cv_have_$ac_func"'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +#endif + +int main() { + +#ifndef $ac_func + char *p = (char *) $ac_func; + exit (p != (char *)0 && *p != 0); +#endif +; return 0; } +EOF +if { eval echo configure:17864: \"$ac_link\" 1>&5; eval $ac_link 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval ac_cv_have_$ac_func=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval ac_cv_have_$ac_func=no +fi +rm -f conftest* +fi + +eval echo "$ac_t""$"ac_cv_have_$ac_func"" 1>&6 + ac_tr_dfunc=HAVE_`echo $ac_func | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` +if eval "test \"`echo '$ac_cv_have_'$ac_func`\" = yes"; then + cat >> confdefs.h <&6 +echo "configure:17889: checking if $ac_func is defined or function" >&5 +if eval "test \"`echo '$''{'"ac_cv_have_$ac_func"'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +#endif + +int main() { + +#ifndef $ac_func + char *p = (char *) $ac_func; + exit (p != (char *)0 && *p != 0); +#endif +; return 0; } +EOF +if { eval echo configure:17909: \"$ac_link\" 1>&5; eval $ac_link 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval ac_cv_have_$ac_func=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval ac_cv_have_$ac_func=no +fi +rm -f conftest* +fi + +eval echo "$ac_t""$"ac_cv_have_$ac_func"" 1>&6 + ac_tr_dfunc=HAVE_`echo $ac_func | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` +if eval "test \"`echo '$ac_cv_have_'$ac_func`\" = yes"; then + cat >> confdefs.h <&6 +echo "configure:17935: checking for $ac_func" >&5 +if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func(); + +int main() { + +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +$ac_func(); +#endif + +; return 0; } +EOF +if { eval echo configure:17963: \"$ac_link\" 1>&5; eval $ac_link 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_$ac_func=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func_$ac_func=no" +fi +rm -f conftest* +fi + +if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then + eval echo "$ac_t""yes" 1>&6 + ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` + cat >> confdefs.h <&6 +fi +done + +for ac_func in basename dirname +do +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +echo "configure:17990: checking for $ac_func" >&5 +if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func(); + +int main() { + +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +$ac_func(); +#endif + +; return 0; } +EOF +if { eval echo configure:18018: \"$ac_link\" 1>&5; eval $ac_link 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_$ac_func=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func_$ac_func=no" +fi +rm -f conftest* +fi + +if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then + eval echo "$ac_t""yes" 1>&6 + ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` + cat >> confdefs.h <&6 +fi +done + +for ac_func in pathconf fpathconf lpathconf +do +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +echo "configure:18045: checking for $ac_func" >&5 +if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func(); + +int main() { + +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +$ac_func(); +#endif + +; return 0; } +EOF +if { eval echo configure:18073: \"$ac_link\" 1>&5; eval $ac_link 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_$ac_func=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func_$ac_func=no" +fi +rm -f conftest* +fi + +if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then + eval echo "$ac_t""yes" 1>&6 + ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` + cat >> confdefs.h <&6 +fi +done + +for ac_func in malloc calloc valloc realloc memalign posix_memalign +do +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +echo "configure:18100: checking for $ac_func" >&5 +if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func(); + +int main() { + +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +$ac_func(); +#endif + +; return 0; } +EOF +if { eval echo configure:18128: \"$ac_link\" 1>&5; eval $ac_link 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_$ac_func=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func_$ac_func=no" +fi +rm -f conftest* +fi + +if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then + eval echo "$ac_t""yes" 1>&6 + ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` + cat >> confdefs.h <&6 +fi +done + +for ac_func in madvise +do +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +echo "configure:18155: checking for $ac_func" >&5 +if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func(); + +int main() { + +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +$ac_func(); +#endif + +; return 0; } +EOF +if { eval echo configure:18183: \"$ac_link\" 1>&5; eval $ac_link 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_$ac_func=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func_$ac_func=no" +fi +rm -f conftest* +fi + +if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then + eval echo "$ac_t""yes" 1>&6 + ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` + cat >> confdefs.h <&6 +fi +done + +for ac_func in mktemp mkstemp +do +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +echo "configure:18210: checking for $ac_func" >&5 +if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func(); + +int main() { + +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +$ac_func(); +#endif + +; return 0; } +EOF +if { eval echo configure:18238: \"$ac_link\" 1>&5; eval $ac_link 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_$ac_func=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func_$ac_func=no" +fi +rm -f conftest* +fi + +if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then + eval echo "$ac_t""yes" 1>&6 + ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` + cat >> confdefs.h <&6 +fi +done + +for ac_func in chflags fchflags fflagstostr strtofflags +do +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +echo "configure:18265: checking for $ac_func" >&5 +if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func(); + +int main() { + +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +$ac_func(); +#endif + +; return 0; } +EOF +if { eval echo configure:18293: \"$ac_link\" 1>&5; eval $ac_link 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_$ac_func=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func_$ac_func=no" +fi +rm -f conftest* +fi + +if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then + eval echo "$ac_t""yes" 1>&6 + ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` + cat >> confdefs.h <&6 +fi +done + +for ac_func in fnmatch +do +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +echo "configure:18320: checking for $ac_func" >&5 +if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func(); + +int main() { + +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +$ac_func(); +#endif + +; return 0; } +EOF +if { eval echo configure:18348: \"$ac_link\" 1>&5; eval $ac_link 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_$ac_func=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func_$ac_func=no" +fi +rm -f conftest* +fi + +if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then + eval echo "$ac_t""yes" 1>&6 + ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` + cat >> confdefs.h <&6 +fi +done + +for ac_func in truncate ftruncate +do +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +echo "configure:18375: checking for $ac_func" >&5 +if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func(); + +int main() { + +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +$ac_func(); +#endif + +; return 0; } +EOF +if { eval echo configure:18403: \"$ac_link\" 1>&5; eval $ac_link 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_$ac_func=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func_$ac_func=no" +fi +rm -f conftest* +fi + +if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then + eval echo "$ac_t""yes" 1>&6 + ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` + cat >> confdefs.h <&6 +fi +done + +for ac_func in getppriv setppriv priv_set +do +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +echo "configure:18430: checking for $ac_func" >&5 +if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func(); + +int main() { + +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +$ac_func(); +#endif + +; return 0; } +EOF +if { eval echo configure:18458: \"$ac_link\" 1>&5; eval $ac_link 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_$ac_func=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func_$ac_func=no" +fi +rm -f conftest* +fi + +if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then + eval echo "$ac_t""yes" 1>&6 + ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` + cat >> confdefs.h <&6 +fi +done + +for ac_func in issetugid +do +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +echo "configure:18485: checking for $ac_func" >&5 +if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func(); + +int main() { + +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +$ac_func(); +#endif + +; return 0; } +EOF +if { eval echo configure:18513: \"$ac_link\" 1>&5; eval $ac_link 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_$ac_func=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func_$ac_func=no" +fi +rm -f conftest* +fi + +if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then + eval echo "$ac_t""yes" 1>&6 + ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` + cat >> confdefs.h <&6 +fi +done + +for ac_func in getroles privbit_set +do +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +echo "configure:18540: checking for $ac_func" >&5 +if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func(); + +int main() { + +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +$ac_func(); +#endif + +; return 0; } +EOF +if { eval echo configure:18568: \"$ac_link\" 1>&5; eval $ac_link 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_$ac_func=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func_$ac_func=no" +fi +rm -f conftest* +fi + +if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then + eval echo "$ac_t""yes" 1>&6 + ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` + cat >> confdefs.h <&6 +fi +done + +for ac_func in setlocale localeconv nl_langinfo +do +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +echo "configure:18595: checking for $ac_func" >&5 +if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func(); + +int main() { + +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +$ac_func(); +#endif + +; return 0; } +EOF +if { eval echo configure:18623: \"$ac_link\" 1>&5; eval $ac_link 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_$ac_func=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func_$ac_func=no" +fi +rm -f conftest* +fi + +if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then + eval echo "$ac_t""yes" 1>&6 + ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` + cat >> confdefs.h <&6 +fi +done + +for ac_func in setbuf setvbuf +do +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +echo "configure:18650: checking for $ac_func" >&5 +if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func(); + +int main() { + +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +$ac_func(); +#endif + +; return 0; } +EOF +if { eval echo configure:18678: \"$ac_link\" 1>&5; eval $ac_link 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_$ac_func=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func_$ac_func=no" +fi +rm -f conftest* +fi + +if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then + eval echo "$ac_t""yes" 1>&6 + ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` + cat >> confdefs.h <&6 +fi +done + +for ac_func in clone_area create_area delete_area +do +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +echo "configure:18705: checking for $ac_func" >&5 +if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func(); + +int main() { + +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +$ac_func(); +#endif + +; return 0; } +EOF +if { eval echo configure:18733: \"$ac_link\" 1>&5; eval $ac_link 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_$ac_func=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func_$ac_func=no" +fi +rm -f conftest* +fi + +if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then + eval echo "$ac_t""yes" 1>&6 + ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` + cat >> confdefs.h <&6 +fi +done + + +echo Checking for POSIX violations by the POSIX.1-2008 standard: +for ac_func in fexecl fexecle fexecv fexecve +do +echo $ac_n "checking for raw availability of $ac_func""... $ac_c" 1>&6 +echo "configure:18762: checking for raw availability of $ac_func" >&5 +if eval "test \"`echo '$''{'ac_cv_rfunc_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext <&5; eval $ac_link 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_rfunc_$ac_func=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_rfunc_$ac_func=no" +fi +rm -f conftest* +fi + +if eval "test \"`echo '$ac_cv_rfunc_'$ac_func`\" = yes"; then + eval echo "$ac_t""yes" 1>&6 + ac_tr_func=HAVE_RAW_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` + cat >> confdefs.h <&6 +fi +done + +for ac_func in fspawnv fspawnl fspawnv_nowait +do +echo $ac_n "checking for raw availability of $ac_func""... $ac_c" 1>&6 +echo "configure:18807: checking for raw availability of $ac_func" >&5 +if eval "test \"`echo '$''{'ac_cv_rfunc_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext <&5; eval $ac_link 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_rfunc_$ac_func=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_rfunc_$ac_func=no" +fi +rm -f conftest* +fi + +if eval "test \"`echo '$ac_cv_rfunc_'$ac_func`\" = yes"; then + eval echo "$ac_t""yes" 1>&6 + ac_tr_func=HAVE_RAW_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` + cat >> confdefs.h <&6 +fi +done + + +for ac_func in getline fgetline +do +echo $ac_n "checking for raw availability of $ac_func""... $ac_c" 1>&6 +echo "configure:18853: checking for raw availability of $ac_func" >&5 +if eval "test \"`echo '$''{'ac_cv_rfunc_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext <&5; eval $ac_link 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_rfunc_$ac_func=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_rfunc_$ac_func=no" +fi +rm -f conftest* +fi + +if eval "test \"`echo '$ac_cv_rfunc_'$ac_func`\" = yes"; then + eval echo "$ac_t""yes" 1>&6 + ac_tr_func=HAVE_RAW_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` + cat >> confdefs.h <&6 +fi +done + +echo End of tests for POSIX violations by the POSIX.1-2008 standard. + +echo $ac_n "checking if dirfd is defined or function""... $ac_c" 1>&6 +echo "configure:18898: checking if dirfd is defined or function" >&5 +if eval "test \"`echo '$''{'"ac_cv_have_dirfd"'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +int main() { + +#ifndef dirfd + char *p = (char *) dirfd; + exit (p != (char *)0 && *p != 0); +#endif +; return 0; } +EOF +if { eval echo configure:18914: \"$ac_link\" 1>&5; eval $ac_link 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval ac_cv_have_dirfd=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval ac_cv_have_dirfd=no +fi +rm -f conftest* +fi + +eval echo "$ac_t""$"ac_cv_have_dirfd"" 1>&6 + ac_tr_dfunc=HAVE_`echo dirfd | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` +if eval "test \"`echo '$ac_cv_have_'dirfd`\" = yes"; then + cat >> confdefs.h <&6 +echo "configure:18937: checking if iswprint is defined or function" >&5 +if eval "test \"`echo '$''{'"ac_cv_have_iswprint"'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +#endif +#ifdef HAVE_WCTYPE_H +#include +#endif + +int main() { + +#ifndef iswprint + char *p = (char *) iswprint; + exit (p != (char *)0 && *p != 0); +#endif +; return 0; } +EOF +if { eval echo configure:18960: \"$ac_link\" 1>&5; eval $ac_link 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval ac_cv_have_iswprint=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval ac_cv_have_iswprint=no +fi +rm -f conftest* +fi + +eval echo "$ac_t""$"ac_cv_have_iswprint"" 1>&6 + ac_tr_dfunc=HAVE_`echo iswprint | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` +if eval "test \"`echo '$ac_cv_have_'iswprint`\" = yes"; then + cat >> confdefs.h <&6 +echo "configure:18983: checking if iswblank is defined or function" >&5 +if eval "test \"`echo '$''{'"ac_cv_have_iswblank"'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +#endif +#ifdef HAVE_WCTYPE_H +#include +#endif + +int main() { + +#ifndef iswblank + char *p = (char *) iswblank; + exit (p != (char *)0 && *p != 0); +#endif +; return 0; } +EOF +if { eval echo configure:19006: \"$ac_link\" 1>&5; eval $ac_link 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval ac_cv_have_iswblank=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval ac_cv_have_iswblank=no +fi +rm -f conftest* +fi + +eval echo "$ac_t""$"ac_cv_have_iswblank"" 1>&6 + ac_tr_dfunc=HAVE_`echo iswblank | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` +if eval "test \"`echo '$ac_cv_have_'iswblank`\" = yes"; then + cat >> confdefs.h <&6 +echo "configure:19029: checking if isblank is defined or function" >&5 +if eval "test \"`echo '$''{'"ac_cv_have_isblank"'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +#endif + +int main() { + +#ifndef isblank + char *p = (char *) isblank; + exit (p != (char *)0 && *p != 0); +#endif +; return 0; } +EOF +if { eval echo configure:19049: \"$ac_link\" 1>&5; eval $ac_link 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval ac_cv_have_isblank=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval ac_cv_have_isblank=no +fi +rm -f conftest* +fi + +eval echo "$ac_t""$"ac_cv_have_isblank"" 1>&6 + ac_tr_dfunc=HAVE_`echo isblank | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` +if eval "test \"`echo '$ac_cv_have_'isblank`\" = yes"; then + cat >> confdefs.h <&6 +echo "configure:19072: checking if mbsinit is defined or function" >&5 +if eval "test \"`echo '$''{'"ac_cv_have_mbsinit"'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +#endif +#ifdef HAVE_WCTYPE_H +#include +#endif + +int main() { + +#ifndef mbsinit + char *p = (char *) mbsinit; + exit (p != (char *)0 && *p != 0); +#endif +; return 0; } +EOF +if { eval echo configure:19095: \"$ac_link\" 1>&5; eval $ac_link 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval ac_cv_have_mbsinit=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval ac_cv_have_mbsinit=no +fi +rm -f conftest* +fi + +eval echo "$ac_t""$"ac_cv_have_mbsinit"" 1>&6 + ac_tr_dfunc=HAVE_`echo mbsinit | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` +if eval "test \"`echo '$ac_cv_have_'mbsinit`\" = yes"; then + cat >> confdefs.h <&6 +echo "configure:19118: checking if mbtowc is defined or function" >&5 +if eval "test \"`echo '$''{'"ac_cv_have_mbtowc"'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +#endif + +int main() { + +#ifndef mbtowc + char *p = (char *) mbtowc; + exit (p != (char *)0 && *p != 0); +#endif +; return 0; } +EOF +if { eval echo configure:19138: \"$ac_link\" 1>&5; eval $ac_link 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval ac_cv_have_mbtowc=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval ac_cv_have_mbtowc=no +fi +rm -f conftest* +fi + +eval echo "$ac_t""$"ac_cv_have_mbtowc"" 1>&6 + ac_tr_dfunc=HAVE_`echo mbtowc | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` +if eval "test \"`echo '$ac_cv_have_'mbtowc`\" = yes"; then + cat >> confdefs.h <&6 +echo "configure:19161: checking if wctomb is defined or function" >&5 +if eval "test \"`echo '$''{'"ac_cv_have_wctomb"'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +#endif + +int main() { + +#ifndef wctomb + char *p = (char *) wctomb; + exit (p != (char *)0 && *p != 0); +#endif +; return 0; } +EOF +if { eval echo configure:19181: \"$ac_link\" 1>&5; eval $ac_link 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval ac_cv_have_wctomb=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval ac_cv_have_wctomb=no +fi +rm -f conftest* +fi + +eval echo "$ac_t""$"ac_cv_have_wctomb"" 1>&6 + ac_tr_dfunc=HAVE_`echo wctomb | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` +if eval "test \"`echo '$ac_cv_have_'wctomb`\" = yes"; then + cat >> confdefs.h <&6 +echo "configure:19204: checking if mbrtowc is defined or function" >&5 +if eval "test \"`echo '$''{'"ac_cv_have_mbrtowc"'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +#endif +#ifdef HAVE_WCTYPE_H +#include +#endif + +int main() { + +#ifndef mbrtowc + char *p = (char *) mbrtowc; + exit (p != (char *)0 && *p != 0); +#endif +; return 0; } +EOF +if { eval echo configure:19227: \"$ac_link\" 1>&5; eval $ac_link 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval ac_cv_have_mbrtowc=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval ac_cv_have_mbrtowc=no +fi +rm -f conftest* +fi + +eval echo "$ac_t""$"ac_cv_have_mbrtowc"" 1>&6 + ac_tr_dfunc=HAVE_`echo mbrtowc | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` +if eval "test \"`echo '$ac_cv_have_'mbrtowc`\" = yes"; then + cat >> confdefs.h <&6 +echo "configure:19250: checking if wcrtomb is defined or function" >&5 +if eval "test \"`echo '$''{'"ac_cv_have_wcrtomb"'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +#endif +#ifdef HAVE_WCTYPE_H +#include +#endif + +int main() { + +#ifndef wcrtomb + char *p = (char *) wcrtomb; + exit (p != (char *)0 && *p != 0); +#endif +; return 0; } +EOF +if { eval echo configure:19273: \"$ac_link\" 1>&5; eval $ac_link 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval ac_cv_have_wcrtomb=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval ac_cv_have_wcrtomb=no +fi +rm -f conftest* +fi + +eval echo "$ac_t""$"ac_cv_have_wcrtomb"" 1>&6 + ac_tr_dfunc=HAVE_`echo wcrtomb | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` +if eval "test \"`echo '$ac_cv_have_'wcrtomb`\" = yes"; then + cat >> confdefs.h <&6 +echo "configure:19296: checking if finite is defined or function" >&5 +if eval "test \"`echo '$''{'"ac_cv_have_finite"'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +int main() { + +#ifndef finite + char *p = (char *) finite; + exit (p != (char *)0 && *p != 0); +#endif +; return 0; } +EOF +if { eval echo configure:19312: \"$ac_link\" 1>&5; eval $ac_link 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval ac_cv_have_finite=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval ac_cv_have_finite=no +fi +rm -f conftest* +fi + +eval echo "$ac_t""$"ac_cv_have_finite"" 1>&6 + ac_tr_dfunc=HAVE_`echo finite | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` +if eval "test \"`echo '$ac_cv_have_'finite`\" = yes"; then + cat >> confdefs.h <&6 +echo "configure:19334: checking if isnand is defined or function" >&5 +if eval "test \"`echo '$''{'"ac_cv_have_isnand"'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +int main() { + +#ifndef isnand + char *p = (char *) isnand; + exit (p != (char *)0 && *p != 0); +#endif +; return 0; } +EOF +if { eval echo configure:19350: \"$ac_link\" 1>&5; eval $ac_link 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval ac_cv_have_isnand=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval ac_cv_have_isnand=no +fi +rm -f conftest* +fi + +eval echo "$ac_t""$"ac_cv_have_isnand"" 1>&6 + ac_tr_dfunc=HAVE_`echo isnand | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` +if eval "test \"`echo '$ac_cv_have_'isnand`\" = yes"; then + cat >> confdefs.h <&6 +echo "configure:19373: checking if we may not define our own malloc()" >&5 +if eval "test \"`echo '$''{'ac_cv_no_user_malloc'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test "$cross_compiling" = yes; then + { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } +else + cat > conftest.$ac_ext <&5; eval $ac_link 2>&5; } && test -s conftest${ac_exeext} && ($rmtcall ./conftest${ac_xexeext}; exit) 2>/dev/null +then + ac_cv_no_user_malloc=no +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* + ac_cv_no_user_malloc=yes +fi +rm -fr conftest* +fi + +fi + +eval echo "$ac_t""$ac_cv_no_user_malloc" 1>&6 +if test $ac_cv_no_user_malloc = yes; then + cat >> confdefs.h <<\EOF +#define NO_USER_MALLOC 1 +EOF + +fi +echo $ac_n "checking for working extern long timezone ""... $ac_c" 1>&6 +echo "configure:19438: checking for working extern long timezone " >&5 +if eval "test \"`echo '$''{'ac_cv_var_timezone'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test "$cross_compiling" = yes; then + { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } +else + cat > conftest.$ac_ext <&5; eval $ac_link 2>&5; } && test -s conftest${ac_exeext} && ($rmtcall ./conftest${ac_xexeext}; exit) 2>/dev/null +then + ac_cv_var_timezone=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* + ac_cv_var_timezone=no +fi +rm -fr conftest* +fi + +fi + +eval echo "$ac_t""$ac_cv_var_timezone" 1>&6 +if test $ac_cv_var_timezone = yes; then + cat >> confdefs.h <<\EOF +#define HAVE_VAR_TIMEZONE 1 +EOF + +fi +echo $ac_n "checking for extern timezone in time.h or sys/time.h""... $ac_c" 1>&6 +echo "configure:19479: checking for extern timezone in time.h or sys/time.h" >&5 +if eval "test \"`echo '$''{'ac_cv_var_timezone_def'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +#ifdef TIME_WITH_SYS_TIME_H +# include +# include +#else +#ifdef HAVE_SYS_TIME_H +# include +#else +# include +#endif +#endif +int main() { +timezone = 1; +; return 0; } +EOF +if { eval echo configure:19502: \"$ac_compile\" 1>&5; eval $ac_compile 2>&5; }; then + rm -rf conftest* + ac_cv_var_timezone_def=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + ac_cv_var_timezone_def=no +fi +rm -f conftest* +fi + +eval echo "$ac_t""$ac_cv_var_timezone_def" 1>&6 +if test $ac_cv_var_timezone_def = yes; then + cat >> confdefs.h <<\EOF +#define HAVE_VAR_TIMEZONE_DEF 1 +EOF + +fi +echo $ac_n "checking for working extern char *__progname ""... $ac_c" 1>&6 +echo "configure:19522: checking for working extern char *__progname " >&5 +if eval "test \"`echo '$''{'ac_cv_var___progname'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test "$cross_compiling" = yes; then + { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } +else + cat > conftest.$ac_ext <&5; eval $ac_link 2>&5; } && test -s conftest${ac_exeext} && ($rmtcall ./conftest${ac_xexeext}; exit) 2>/dev/null +then + ac_cv_var___progname=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* + ac_cv_var___progname=no +fi +rm -fr conftest* +fi + +fi + +eval echo "$ac_t""$ac_cv_var___progname" 1>&6 +if test $ac_cv_var___progname = yes; then + cat >> confdefs.h <<\EOF +#define HAVE_VAR___PROGNAME 1 +EOF + +fi +echo $ac_n "checking for working extern char *__progname_full ""... $ac_c" 1>&6 +echo "configure:19563: checking for working extern char *__progname_full " >&5 +if eval "test \"`echo '$''{'ac_cv_var___progname_full'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test "$cross_compiling" = yes; then + { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } +else + cat > conftest.$ac_ext <&5; eval $ac_link 2>&5; } && test -s conftest${ac_exeext} && ($rmtcall ./conftest${ac_xexeext}; exit) 2>/dev/null +then + ac_cv_var___progname_full=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* + ac_cv_var___progname_full=no +fi +rm -fr conftest* +fi + +fi + +eval echo "$ac_t""$ac_cv_var___progname_full" 1>&6 +if test $ac_cv_var___progname_full = yes; then + cat >> confdefs.h <<\EOF +#define HAVE_VAR___PROGNAME_FULL 1 +EOF + +fi + +echo $ac_n "checking if link() allows hard links on symlinks""... $ac_c" 1>&6 +echo "configure:19605: checking if link() allows hard links on symlinks" >&5 +if eval "test \"`echo '$''{'ac_cv_hard_symlinks'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test "$cross_compiling" = yes; then + { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } +else + cat > conftest.$ac_ext <&5; eval $ac_link 2>&5; } && test -s conftest${ac_exeext} && ($rmtcall ./conftest${ac_xexeext}; exit) 2>/dev/null +then + ac_cv_hard_symlinks=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* + ac_cv_hard_symlinks=no +fi +rm -fr conftest* +fi + +fi + +eval echo "$ac_t""$ac_cv_hard_symlinks" 1>&6 +if test $ac_cv_hard_symlinks = yes; then + cat >> confdefs.h <<\EOF +#define HAVE_HARD_SYMLINKS 1 +EOF + +fi +echo $ac_n "checking if link() does not folow symlinks""... $ac_c" 1>&6 +echo "configure:19657: checking if link() does not folow symlinks" >&5 +if eval "test \"`echo '$''{'ac_cv_link_nofollow'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test "$cross_compiling" = yes; then + { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } +else + cat > conftest.$ac_ext < +#include + +main() +{ + int ret = 0; + int f; + struct stat sb; + + unlink("confdefs.f1"); + unlink("confdefs.l1"); + unlink("confdefs.h1"); + + f = creat("confdefs.f1", 0666); + close(f); + if (symlink("confdefs.f1", "confdefs.l1") < 0) + ret = 1; + if (link("confdefs.l1", "confdefs.h1") < 0) + ret = 1; + + stat("confdefs.f1", &sb); + if (sb.st_nlink == 2) + ret = 1; + + unlink("confdefs.f1"); + unlink("confdefs.l1"); + unlink("confdefs.h1"); + + exit(ret); +} +EOF +if { eval echo configure:19699: \"$ac_link\" 1>&5; eval $ac_link 2>&5; } && test -s conftest${ac_exeext} && ($rmtcall ./conftest${ac_xexeext}; exit) 2>/dev/null +then + ac_cv_link_nofollow=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* + ac_cv_link_nofollow=no +fi +rm -fr conftest* +fi + +fi + +eval echo "$ac_t""$ac_cv_link_nofollow" 1>&6 +if test $ac_cv_link_nofollow = yes; then + cat >> confdefs.h <<\EOF +#define HAVE_LINK_NOFOLLOW 1 +EOF + +fi +for ac_hdr in unistd.h +do +ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` +echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 +echo "configure:19724: checking for $ac_hdr" >&5 +if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ eval echo configure:19734: \"$ac_try\" 1>&5; eval $ac_try 2>&5; } +ac_err=`tr -d '\015' < conftest.out | grep -v '^ *+' | grep -v "^conftest.${ac_ext}\$"` +if test -z "$ac_err"; then + rm -rf conftest* + eval "ac_cv_header_$ac_safe=yes" +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_header_$ac_safe=no" +fi +rm -f conftest* +fi +if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then + eval echo "$ac_t""yes" 1>&6 + ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` + cat >> confdefs.h <&6 +fi +done + +echo $ac_n "checking if access() does implement E_OK""... $ac_c" 1>&6 +echo "configure:19761: checking if access() does implement E_OK" >&5 +if eval "test \"`echo '$''{'ac_cv_access_e_ok'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test "$cross_compiling" = yes; then + { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } +else + cat > conftest.$ac_ext < +# endif +#ifndef R_OK +#define R_OK 4 /* Test for Read permission */ +#define W_OK 2 /* Test for Write permission */ +#define X_OK 1 /* Test for eXecute permission */ +#define F_OK 0 /* Test for existence of File */ +#endif + +#ifndef E_OK +#ifdef EFF_ONLY_OK +#define E_OK EFF_ONLY_OK /* Irix */ +#else +#ifdef EUID_OK +#define E_OK EUID_OK /* UNICOS (0400) */ +#else +#define E_OK 010 /* Test effective uids */ +#endif +#endif +#endif + +#include +#ifndef HAVE_ERRNO_DEF +extern int errno; +#endif + +main() +{ +#ifdef _MSC_VER +/* + * If we use "cl" to compile and call access(".", E_OK|F_OK), the program will + * cause an exception that results in a popup window. For this reason, the test + * is disabled for "cl", it would not work anyway. + */ + int ret = 1; +#else + int ret = 0; + + if (access(".", F_OK) != 0) + ret = 1; + else if (access(".", E_OK|F_OK) != 0) + ret = 1; + else if (access(".", (R_OK<<4)|F_OK) == 0) + ret = 1; +#endif + + exit(ret); +} +EOF +if { eval echo configure:19822: \"$ac_link\" 1>&5; eval $ac_link 2>&5; } && test -s conftest${ac_exeext} && ($rmtcall ./conftest${ac_xexeext}; exit) 2>/dev/null +then + ac_cv_access_e_ok=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* + ac_cv_access_e_ok=no +fi +rm -fr conftest* +fi + +fi + +eval echo "$ac_t""$ac_cv_access_e_ok" 1>&6 +if test $ac_cv_access_e_ok = yes; then + cat >> confdefs.h <<\EOF +#define HAVE_ACCESS_E_OK 1 +EOF + +fi +for ac_hdr in fnmatch.h +do +ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` +echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 +echo "configure:19847: checking for $ac_hdr" >&5 +if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ eval echo configure:19857: \"$ac_try\" 1>&5; eval $ac_try 2>&5; } +ac_err=`tr -d '\015' < conftest.out | grep -v '^ *+' | grep -v "^conftest.${ac_ext}\$"` +if test -z "$ac_err"; then + rm -rf conftest* + eval "ac_cv_header_$ac_safe=yes" +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_header_$ac_safe=no" +fi +rm -f conftest* +fi +if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then + eval echo "$ac_t""yes" 1>&6 + ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` + cat >> confdefs.h <&6 +fi +done + +echo $ac_n "checking if fnmatch() does implement FNM_IGNORECASE or FNM_CASEFOLD""... $ac_c" 1>&6 +echo "configure:19884: checking if fnmatch() does implement FNM_IGNORECASE or FNM_CASEFOLD" >&5 +if eval "test \"`echo '$''{'ac_cv_fnmatch_igncase'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test "$cross_compiling" = yes; then + { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } +else + cat > conftest.$ac_ext < +#endif + +#ifndef FNM_IGNORECASE +#ifdef FNM_CASEFOLD +#define FNM_IGNORECASE FNM_CASEFOLD +#endif +#endif + +main() +{ + int ret; + + ret = fnmatch("a", "A", FNM_IGNORECASE); + exit(ret); +} +EOF +if { eval echo configure:19913: \"$ac_link\" 1>&5; eval $ac_link 2>&5; } && test -s conftest${ac_exeext} && ($rmtcall ./conftest${ac_xexeext}; exit) 2>/dev/null +then + ac_cv_fnmatch_igncase=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* + ac_cv_fnmatch_igncase=no +fi +rm -fr conftest* +fi + +fi + +eval echo "$ac_t""$ac_cv_fnmatch_igncase" 1>&6 +if test $ac_cv_fnmatch_igncase = yes; then + cat >> confdefs.h <<\EOF +#define HAVE_FNMATCH_IGNORECASE 1 +EOF + +fi + +echo $ac_n "checking for fseeko()""... $ac_c" 1>&6 +echo "configure:19936: checking for fseeko()" >&5 +if eval "test \"`echo '$''{'ac_cv_func_fseeko'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +int main() { +return !fseeko; +; return 0; } +EOF +if { eval echo configure:19948: \"$ac_link\" 1>&5; eval $ac_link 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + ac_cv_func_fseeko=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + ac_cv_func_fseeko=no +fi +rm -f conftest* +fi + +eval echo "$ac_t""$ac_cv_func_fseeko" 1>&6 +if test $ac_cv_func_fseeko = yes; then + cat >> confdefs.h <<\EOF +#define HAVE_FSEEKO 1 +EOF + +fi +echo $ac_n "checking for ftello()""... $ac_c" 1>&6 +echo "configure:19968: checking for ftello()" >&5 +if eval "test \"`echo '$''{'ac_cv_func_ftello'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +int main() { +return !ftello; +; return 0; } +EOF +if { eval echo configure:19980: \"$ac_link\" 1>&5; eval $ac_link 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + ac_cv_func_ftello=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + ac_cv_func_ftello=no +fi +rm -f conftest* +fi + +eval echo "$ac_t""$ac_cv_func_ftello" 1>&6 +if test $ac_cv_func_ftello = yes; then + cat >> confdefs.h <<\EOF +#define HAVE_FTELLO 1 +EOF + +fi + +echo $ac_n "checking for dlopen in -lc""... $ac_c" 1>&6 +echo "configure:20001: checking for dlopen in -lc" >&5 +ac_lib_var=`echo c'_'dlopen | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS=`echo "-lc $LIBS" | sed -e 's/-lc //'` +cat > conftest.$ac_ext <&5; eval $ac_link 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + eval echo "$ac_t""yes" 1>&6 + lib_dl="" +else + eval echo "$ac_t""no" 1>&6 +echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6 +echo "configure:20039: checking for dlopen in -ldl" >&5 +ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS=`echo "-ldl $LIBS" | sed -e 's/-lc //'` +cat > conftest.$ac_ext <&5; eval $ac_link 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + eval echo "$ac_t""yes" 1>&6 + lib_dl="-ldl" +else + eval echo "$ac_t""no" 1>&6 +fi + +fi + +ac_save_LIBS="$LIBS" +LIBS="$LIBS $lib_dl" +for ac_func in dlopen dlclose dlsym dlerror dlinfo +do +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +echo "configure:20085: checking for $ac_func" >&5 +if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func(); + +int main() { + +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +$ac_func(); +#endif + +; return 0; } +EOF +if { eval echo configure:20113: \"$ac_link\" 1>&5; eval $ac_link 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_$ac_func=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func_$ac_func=no" +fi +rm -f conftest* +fi + +if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then + eval echo "$ac_t""yes" 1>&6 + ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` + cat >> confdefs.h <&6 +fi +done + +for ac_func in shl_load shl_unload shl_gethandle +do +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +echo "configure:20140: checking for $ac_func" >&5 +if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func(); + +int main() { + +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +$ac_func(); +#endif + +; return 0; } +EOF +if { eval echo configure:20168: \"$ac_link\" 1>&5; eval $ac_link 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_$ac_func=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func_$ac_func=no" +fi +rm -f conftest* +fi + +if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then + eval echo "$ac_t""yes" 1>&6 + ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` + cat >> confdefs.h <&6 +fi +done + +LIBS="$ac_save_LIBS" +if test ."$lib_dl" = .""; then + cat >> confdefs.h <<\EOF +#define HAVE_DLOPEN_IN_LIBC 1 +EOF + +fi + +for ac_func in LoadLibrary FreeLibrary GetProcAddress +do +echo $ac_n "checking if $ac_func is defined or function""... $ac_c" 1>&6 +echo "configure:20203: checking if $ac_func is defined or function" >&5 +if eval "test \"`echo '$''{'"ac_cv_have_$ac_func"'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +#endif + +int main() { + +#ifndef $ac_func + char *p = (char *) $ac_func; + exit (p != (char *)0 && *p != 0); +#endif +; return 0; } +EOF +if { eval echo configure:20227: \"$ac_link\" 1>&5; eval $ac_link 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval ac_cv_have_$ac_func=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval ac_cv_have_$ac_func=no +fi +rm -f conftest* +fi + +eval echo "$ac_t""$"ac_cv_have_$ac_func"" 1>&6 + ac_tr_dfunc=HAVE_`echo $ac_func | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` +if eval "test \"`echo '$ac_cv_have_'$ac_func`\" = yes"; then + cat >> confdefs.h <&6 +echo "configure:20252: checking for socket in -lc" >&5 +ac_lib_var=`echo c'_'socket | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS=`echo "-lc $LIBS" | sed -e 's/-lc //'` +cat > conftest.$ac_ext <&5; eval $ac_link 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + eval echo "$ac_t""yes" 1>&6 + lib_socket="" +else + eval echo "$ac_t""no" 1>&6 +echo $ac_n "checking for socket in -lsocket""... $ac_c" 1>&6 +echo "configure:20290: checking for socket in -lsocket" >&5 +ac_lib_var=`echo socket'_'socket | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS=`echo "-lsocket $LIBS" | sed -e 's/-lc //'` +cat > conftest.$ac_ext <&5; eval $ac_link 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + eval echo "$ac_t""yes" 1>&6 + lib_socket="-lsocket" +else + eval echo "$ac_t""no" 1>&6 +fi + +fi + +LIBS="$ac_save_LIBS" +echo $ac_n "checking for gethostbyname in -lc""... $ac_c" 1>&6 +echo "configure:20333: checking for gethostbyname in -lc" >&5 +ac_lib_var=`echo c'_'gethostbyname | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS=`echo "-lc $LIBS" | sed -e 's/-lc //'` +cat > conftest.$ac_ext <&5; eval $ac_link 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + eval echo "$ac_t""yes" 1>&6 + lib_nsl="" +else + eval echo "$ac_t""no" 1>&6 +echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6 +echo "configure:20371: checking for gethostbyname in -lnsl" >&5 +ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS=`echo "-lnsl $LIBS" | sed -e 's/-lc //'` +cat > conftest.$ac_ext <&5; eval $ac_link 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + eval echo "$ac_t""yes" 1>&6 + lib_nsl="-lnsl" +else + eval echo "$ac_t""no" 1>&6 +echo $ac_n "checking for gethostbyname in -lnetwork""... $ac_c" 1>&6 +echo "configure:20409: checking for gethostbyname in -lnetwork" >&5 +ac_lib_var=`echo network'_'gethostbyname | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS=`echo "-lnetwork $LIBS" | sed -e 's/-lc //'` +cat > conftest.$ac_ext <&5; eval $ac_link 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + eval echo "$ac_t""yes" 1>&6 + lib_nsl="-lnetwork" +else + eval echo "$ac_t""no" 1>&6 +fi + +fi + +fi + +LIBS="$ac_save_LIBS" +LIBS="$LIBS $lib_nsl $lib_socket" +for ac_func in rcmd socket socketpair +do +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +echo "configure:20457: checking for $ac_func" >&5 +if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func(); + +int main() { + +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +$ac_func(); +#endif + +; return 0; } +EOF +if { eval echo configure:20485: \"$ac_link\" 1>&5; eval $ac_link 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_$ac_func=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func_$ac_func=no" +fi +rm -f conftest* +fi + +if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then + eval echo "$ac_t""yes" 1>&6 + ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` + cat >> confdefs.h <&6 +fi +done + +for ac_func in getservbyname inet_ntoa +do +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +echo "configure:20512: checking for $ac_func" >&5 +if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func(); + +int main() { + +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +$ac_func(); +#endif + +; return 0; } +EOF +if { eval echo configure:20540: \"$ac_link\" 1>&5; eval $ac_link 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_$ac_func=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func_$ac_func=no" +fi +rm -f conftest* +fi + +if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then + eval echo "$ac_t""yes" 1>&6 + ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` + cat >> confdefs.h <&6 +fi +done + +for ac_func in getaddrinfo getnameinfo +do +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +echo "configure:20567: checking for $ac_func" >&5 +if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func(); + +int main() { + +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +$ac_func(); +#endif + +; return 0; } +EOF +if { eval echo configure:20595: \"$ac_link\" 1>&5; eval $ac_link 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_$ac_func=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func_$ac_func=no" +fi +rm -f conftest* +fi + +if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then + eval echo "$ac_t""yes" 1>&6 + ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` + cat >> confdefs.h <&6 +fi +done + +for ac_func in host2netname netname2host +do +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +echo "configure:20622: checking for $ac_func" >&5 +if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func(); + +int main() { + +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +$ac_func(); +#endif + +; return 0; } +EOF +if { eval echo configure:20650: \"$ac_link\" 1>&5; eval $ac_link 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_$ac_func=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func_$ac_func=no" +fi +rm -f conftest* +fi + +if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then + eval echo "$ac_t""yes" 1>&6 + ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` + cat >> confdefs.h <&6 +fi +done + +LIBS="$ac_save_LIBS" + +ac_save_LIBS="$LIBS" +echo $ac_n "checking for res_init in -lc""... $ac_c" 1>&6 +echo "configure:20678: checking for res_init in -lc" >&5 +ac_lib_var=`echo c'_'res_init | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS=`echo "-lc $LIBS" | sed -e 's/-lc //'` +cat > conftest.$ac_ext <&5; eval $ac_link 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + eval echo "$ac_t""yes" 1>&6 + lib_resolv="" +else + eval echo "$ac_t""no" 1>&6 +echo $ac_n "checking for res_init in -lresolv""... $ac_c" 1>&6 +echo "configure:20716: checking for res_init in -lresolv" >&5 +ac_lib_var=`echo resolv'_'res_init | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS=`echo "-lresolv $LIBS" | sed -e 's/-lc //'` +cat > conftest.$ac_ext <&5; eval $ac_link 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + eval echo "$ac_t""yes" 1>&6 + lib_resolv="-lresolv" +else + eval echo "$ac_t""no" 1>&6 +fi + +fi + +LIBS="$ac_save_LIBS" +if test ."$lib_resolv" = .""; then + cat >> confdefs.h <<\EOF +#define HAVE_RESOLV_IN_LIBC 1 +EOF + +fi + +# Check whether --enable-largefile or --disable-largefile was given. +if test "${enable_largefile+set}" = set; then + enableval="$enable_largefile" + : +fi + + if test "$enable_largefile" != no; then + + echo $ac_n "checking for special C compiler options needed for large files""... $ac_c" 1>&6 +echo "configure:20774: checking for special C compiler options needed for large files" >&5 +if eval "test \"`echo '$''{'ac_cv_sys_largefile_CC'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_cv_sys_largefile_CC=no + largefile_cc_opt="" + if test "$GCC" != yes; then + # IRIX 6.2 and later do not support large files by default, + # so use the C compiler's -n32 option if that helps. + cat > conftest.$ac_ext < + /* Check that off_t can represent 2**63 - 1 correctly. + We can't simply "#define LARGE_OFF_T 9223372036854775807", + since some C++ compilers masquerading as C compilers + incorrectly reject 9223372036854775807. */ +# define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) + int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 + && LARGE_OFF_T % 2147483647 == 1) + ? 1 : -1]; + +int main() { + +; return 0; } +EOF +if { eval echo configure:20800: \"$ac_compile\" 1>&5; eval $ac_compile 2>&5; }; then + : +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + ac_save_CC="${CC-cc}" + CC="$CC -n32" + cat > conftest.$ac_ext < + /* Check that off_t can represent 2**63 - 1 correctly. + We can't simply "#define LARGE_OFF_T 9223372036854775807", + since some C++ compilers masquerading as C compilers + incorrectly reject 9223372036854775807. */ +# define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) + int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 + && LARGE_OFF_T % 2147483647 == 1) + ? 1 : -1]; + +int main() { + +; return 0; } +EOF +if { eval echo configure:20825: \"$ac_compile\" 1>&5; eval $ac_compile 2>&5; }; then + rm -rf conftest* + ac_cv_sys_largefile_CC=' -n32' +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 +fi +rm -f conftest* + CC="$ac_save_CC" +fi +rm -f conftest* + fi +fi + +eval echo "$ac_t""$ac_cv_sys_largefile_CC" 1>&6 + if test "$ac_cv_sys_largefile_CC" != no; then + CC="$CC$ac_cv_sys_largefile_CC" + largefile_cc_opt="$ac_cv_sys_largefile_CC" + fi + + echo $ac_n "checking for _FILE_OFFSET_BITS value needed for large files""... $ac_c" 1>&6 +echo "configure:20846: checking for _FILE_OFFSET_BITS value needed for large files" >&5 +if eval "test \"`echo '$''{'ac_cv_sys_file_offset_bits'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_cv_sys_file_offset_bits=no + cat > conftest.$ac_ext < + /* Check that off_t can represent 2**63 - 1 correctly. + We can't simply "#define LARGE_OFF_T 9223372036854775807", + since some C++ compilers masquerading as C compilers + incorrectly reject 9223372036854775807. */ +# define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) + int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 + && LARGE_OFF_T % 2147483647 == 1) + ? 1 : -1]; + +int main() { + +; return 0; } +EOF +if { eval echo configure:20868: \"$ac_compile\" 1>&5; eval $ac_compile 2>&5; }; then + : +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + cat > conftest.$ac_ext < + /* Check that off_t can represent 2**63 - 1 correctly. + We can't simply "#define LARGE_OFF_T 9223372036854775807", + since some C++ compilers masquerading as C compilers + incorrectly reject 9223372036854775807. */ +# define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) + int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 + && LARGE_OFF_T % 2147483647 == 1) + ? 1 : -1]; + + +int main() { + +; return 0; } +EOF +if { eval echo configure:20893: \"$ac_compile\" 1>&5; eval $ac_compile 2>&5; }; then + rm -rf conftest* + ac_cv_sys_file_offset_bits=64 +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 +fi +rm -f conftest* +fi +rm -f conftest* +fi + +eval echo "$ac_t""$ac_cv_sys_file_offset_bits" 1>&6 + if test "$ac_cv_sys_file_offset_bits" != no; then + cat >> confdefs.h <&6 +echo "configure:20913: checking for _LARGE_FILES value needed for large files" >&5 +if eval "test \"`echo '$''{'ac_cv_sys_large_files'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_cv_sys_large_files=no + cat > conftest.$ac_ext < + /* Check that off_t can represent 2**63 - 1 correctly. + We can't simply "#define LARGE_OFF_T 9223372036854775807", + since some C++ compilers masquerading as C compilers + incorrectly reject 9223372036854775807. */ +# define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) + int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 + && LARGE_OFF_T % 2147483647 == 1) + ? 1 : -1]; + +int main() { + +; return 0; } +EOF +if { eval echo configure:20935: \"$ac_compile\" 1>&5; eval $ac_compile 2>&5; }; then + : +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + cat > conftest.$ac_ext < + /* Check that off_t can represent 2**63 - 1 correctly. + We can't simply "#define LARGE_OFF_T 9223372036854775807", + since some C++ compilers masquerading as C compilers + incorrectly reject 9223372036854775807. */ +# define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) + int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 + && LARGE_OFF_T % 2147483647 == 1) + ? 1 : -1]; + + +int main() { + +; return 0; } +EOF +if { eval echo configure:20960: \"$ac_compile\" 1>&5; eval $ac_compile 2>&5; }; then + rm -rf conftest* + ac_cv_sys_large_files=1 +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 +fi +rm -f conftest* +fi +rm -f conftest* +fi + +eval echo "$ac_t""$ac_cv_sys_large_files" 1>&6 + if test "$ac_cv_sys_large_files" != no; then + cat >> confdefs.h <&6 +echo "configure:20980: checking for _LARGEFILE_SOURCE value needed for large files" >&5 +if eval "test \"`echo '$''{'ac_cv_sys_largefile_source'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_cv_sys_largefile_source=no + cat > conftest.$ac_ext < +int main() { +return !fseeko; +; return 0; } +EOF +if { eval echo configure:20993: \"$ac_compile\" 1>&5; eval $ac_compile 2>&5; }; then + : +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + cat > conftest.$ac_ext < + +int main() { +return !fseeko; +; return 0; } +EOF +if { eval echo configure:21009: \"$ac_compile\" 1>&5; eval $ac_compile 2>&5; }; then + rm -rf conftest* + ac_cv_sys_largefile_source=1 +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 +fi +rm -f conftest* +fi +rm -f conftest* +fi + +eval echo "$ac_t""$ac_cv_sys_largefile_source" 1>&6 + if test "$ac_cv_sys_largefile_source" != no; then + cat >> confdefs.h <&6 +echo "configure:21031: checking if system supports Large Files at all" >&5 +if eval "test \"`echo '$''{'ac_cv_largefiles'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +#include +int main() { + +/* + * Check that off_t can represent 2**63 - 1 correctly. + * We can't simply "#define LARGE_OFF_T 9223372036854775807", + * since some C++ compilers masquerading as C compilers + * incorrectly reject 9223372036854775807. + */ +# define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) + int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 + && LARGE_OFF_T % 2147483647 == 1) + ? 1 : -1]; +return !fseeko; +return !ftello; +; return 0; } +EOF +if { eval echo configure:21056: \"$ac_compile\" 1>&5; eval $ac_compile 2>&5; }; then + rm -rf conftest* + ac_cv_largefiles=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + ac_cv_largefiles=no +fi +rm -f conftest* +fi + +eval echo "$ac_t""$ac_cv_largefiles" 1>&6 + if test $ac_cv_largefiles = yes; then + cat >> confdefs.h <<\EOF +#define HAVE_LARGEFILES 1 +EOF + + fi + +cat >> confdefs.h <> confdefs.h <> confdefs.h <> confdefs.h <> confdefs.h <&6 +echo "configure:21099: checking for crypt in -lc" >&5 +ac_lib_var=`echo c'_'crypt | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS=`echo "-lc $LIBS" | sed -e 's/-lc //'` +cat > conftest.$ac_ext <&5; eval $ac_link 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + eval echo "$ac_t""yes" 1>&6 + lib_crypt="" +else + eval echo "$ac_t""no" 1>&6 +echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6 +echo "configure:21137: checking for crypt in -lcrypt" >&5 +ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS=`echo "-lcrypt $LIBS" | sed -e 's/-lc //'` +cat > conftest.$ac_ext <&5; eval $ac_link 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + eval echo "$ac_t""yes" 1>&6 + lib_crypt="-lcrypt" +else + eval echo "$ac_t""no" 1>&6 +fi + +fi + +if test ."$lib_crypt" = .""; then + cat >> confdefs.h <<\EOF +#define HAVE_CRYPT_IN_LIBC 1 +EOF + +fi + +ac_save_LIBS="$LIBS" +LIBS="$LIBS $lib_crypt" +for ac_func in crypt +do +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +echo "configure:21190: checking for $ac_func" >&5 +if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func(); + +int main() { + +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +$ac_func(); +#endif + +; return 0; } +EOF +if { eval echo configure:21218: \"$ac_link\" 1>&5; eval $ac_link 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_$ac_func=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func_$ac_func=no" +fi +rm -f conftest* +fi + +if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then + eval echo "$ac_t""yes" 1>&6 + ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` + cat >> confdefs.h <&6 +fi +done + +LIBS="$ac_save_LIBS" + +echo $ac_n "checking for gettext in -lc""... $ac_c" 1>&6 +echo "configure:21245: checking for gettext in -lc" >&5 +ac_lib_var=`echo c'_'gettext | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-lc $LIBS" +cat > conftest.$ac_ext < +int main() { + + char *p = (char *) gettext; + + return ((int)p); + +; return 0; } +EOF +if { eval echo configure:21264: \"$ac_link\" 1>&5; eval $ac_link 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + eval echo "$ac_t""yes" 1>&6 + lib_intl="" +else + eval echo "$ac_t""no" 1>&6 +echo $ac_n "checking for gettext in -lintl""... $ac_c" 1>&6 +echo "configure:21283: checking for gettext in -lintl" >&5 +ac_lib_var=`echo intl'_'gettext | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-lintl $LIBS" +cat > conftest.$ac_ext < +int main() { + + char *p = (char *) gettext; + + return ((int)p); + +; return 0; } +EOF +if { eval echo configure:21302: \"$ac_link\" 1>&5; eval $ac_link 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + eval echo "$ac_t""yes" 1>&6 + lib_intl="-lintl" +else + eval echo "$ac_t""no" 1>&6 +fi + +fi + +if test ."$lib_intl" = .""; then + cat >> confdefs.h <<\EOF +#define HAVE_GETTEXT_IN_LIBC 1 +EOF + +fi + +ac_save_LIBS="$LIBS" +LIBS="$LIBS $lib_intl" +echo $ac_n "checking if gettext is defined or function""... $ac_c" 1>&6 +echo "configure:21334: checking if gettext is defined or function" >&5 +if eval "test \"`echo '$''{'"ac_cv_have_gettext"'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +int main() { + +#ifndef gettext + char *p = (char *) gettext; + exit (p != (char *)0 && *p != 0); +#endif +; return 0; } +EOF +if { eval echo configure:21350: \"$ac_link\" 1>&5; eval $ac_link 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval ac_cv_have_gettext=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval ac_cv_have_gettext=no +fi +rm -f conftest* +fi + +eval echo "$ac_t""$"ac_cv_have_gettext"" 1>&6 + ac_tr_dfunc=HAVE_`echo gettext | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` +if eval "test \"`echo '$ac_cv_have_'gettext`\" = yes"; then + cat >> confdefs.h <&6 +echo "configure:21374: checking for iconv_open in -lc" >&5 +ac_lib_var=`echo c'_'iconv_open | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-lc $LIBS" +cat > conftest.$ac_ext < +int main() { + + char *p = (char *) iconv_open; + + return ((int)p); + +; return 0; } +EOF +if { eval echo configure:21393: \"$ac_link\" 1>&5; eval $ac_link 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + eval echo "$ac_t""yes" 1>&6 + lib_iconv="" +else + eval echo "$ac_t""no" 1>&6 +echo $ac_n "checking for iconv_open in -liconv""... $ac_c" 1>&6 +echo "configure:21412: checking for iconv_open in -liconv" >&5 +ac_lib_var=`echo iconv'_'iconv_open | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-liconv $LIBS" +cat > conftest.$ac_ext < +int main() { + + char *p = (char *) iconv_open; + + return ((int)p); + +; return 0; } +EOF +if { eval echo configure:21431: \"$ac_link\" 1>&5; eval $ac_link 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + eval echo "$ac_t""yes" 1>&6 + lib_iconv="-liconv" +else + eval echo "$ac_t""no" 1>&6 +fi + +fi + +if test ."$lib_iconv" = .""; then + cat >> confdefs.h <<\EOF +#define HAVE_ICONV_IN_LIBC 1 +EOF + +fi + +ac_save_LIBS="$LIBS" +LIBS="$LIBS $lib_iconv" +echo $ac_n "checking if iconv is defined or function""... $ac_c" 1>&6 +echo "configure:21463: checking if iconv is defined or function" >&5 +if eval "test \"`echo '$''{'"ac_cv_have_iconv"'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +int main() { + +#ifndef iconv + char *p = (char *) iconv; + exit (p != (char *)0 && *p != 0); +#endif +; return 0; } +EOF +if { eval echo configure:21479: \"$ac_link\" 1>&5; eval $ac_link 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval ac_cv_have_iconv=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval ac_cv_have_iconv=no +fi +rm -f conftest* +fi + +eval echo "$ac_t""$"ac_cv_have_iconv"" 1>&6 + ac_tr_dfunc=HAVE_`echo iconv | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` +if eval "test \"`echo '$ac_cv_have_'iconv`\" = yes"; then + cat >> confdefs.h <&6 +echo "configure:21501: checking if iconv_open is defined or function" >&5 +if eval "test \"`echo '$''{'"ac_cv_have_iconv_open"'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +int main() { + +#ifndef iconv_open + char *p = (char *) iconv_open; + exit (p != (char *)0 && *p != 0); +#endif +; return 0; } +EOF +if { eval echo configure:21517: \"$ac_link\" 1>&5; eval $ac_link 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval ac_cv_have_iconv_open=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval ac_cv_have_iconv_open=no +fi +rm -f conftest* +fi + +eval echo "$ac_t""$"ac_cv_have_iconv_open"" 1>&6 + ac_tr_dfunc=HAVE_`echo iconv_open | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` +if eval "test \"`echo '$ac_cv_have_'iconv_open`\" = yes"; then + cat >> confdefs.h <&6 +echo "configure:21539: checking if iconv_close is defined or function" >&5 +if eval "test \"`echo '$''{'"ac_cv_have_iconv_close"'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +int main() { + +#ifndef iconv_close + char *p = (char *) iconv_close; + exit (p != (char *)0 && *p != 0); +#endif +; return 0; } +EOF +if { eval echo configure:21555: \"$ac_link\" 1>&5; eval $ac_link 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval ac_cv_have_iconv_close=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval ac_cv_have_iconv_close=no +fi +rm -f conftest* +fi + +eval echo "$ac_t""$"ac_cv_have_iconv_close"" 1>&6 + ac_tr_dfunc=HAVE_`echo iconv_close | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` +if eval "test \"`echo '$ac_cv_have_'iconv_close`\" = yes"; then + cat >> confdefs.h <&6 +echo "configure:21577: checking if libiconv is defined or function" >&5 +if eval "test \"`echo '$''{'"ac_cv_have_libiconv"'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +int main() { + +#ifndef libiconv + char *p = (char *) libiconv; + exit (p != (char *)0 && *p != 0); +#endif +; return 0; } +EOF +if { eval echo configure:21593: \"$ac_link\" 1>&5; eval $ac_link 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval ac_cv_have_libiconv=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval ac_cv_have_libiconv=no +fi +rm -f conftest* +fi + +eval echo "$ac_t""$"ac_cv_have_libiconv"" 1>&6 + ac_tr_dfunc=HAVE_`echo libiconv | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` +if eval "test \"`echo '$ac_cv_have_'libiconv`\" = yes"; then + cat >> confdefs.h <&6 +echo "configure:21615: checking if libiconv_open is defined or function" >&5 +if eval "test \"`echo '$''{'"ac_cv_have_libiconv_open"'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +int main() { + +#ifndef libiconv_open + char *p = (char *) libiconv_open; + exit (p != (char *)0 && *p != 0); +#endif +; return 0; } +EOF +if { eval echo configure:21631: \"$ac_link\" 1>&5; eval $ac_link 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval ac_cv_have_libiconv_open=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval ac_cv_have_libiconv_open=no +fi +rm -f conftest* +fi + +eval echo "$ac_t""$"ac_cv_have_libiconv_open"" 1>&6 + ac_tr_dfunc=HAVE_`echo libiconv_open | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` +if eval "test \"`echo '$ac_cv_have_'libiconv_open`\" = yes"; then + cat >> confdefs.h <&6 +echo "configure:21653: checking if libiconv_close is defined or function" >&5 +if eval "test \"`echo '$''{'"ac_cv_have_libiconv_close"'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +int main() { + +#ifndef libiconv_close + char *p = (char *) libiconv_close; + exit (p != (char *)0 && *p != 0); +#endif +; return 0; } +EOF +if { eval echo configure:21669: \"$ac_link\" 1>&5; eval $ac_link 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval ac_cv_have_libiconv_close=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval ac_cv_have_libiconv_close=no +fi +rm -f conftest* +fi + +eval echo "$ac_t""$"ac_cv_have_libiconv_close"" 1>&6 + ac_tr_dfunc=HAVE_`echo libiconv_close | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` +if eval "test \"`echo '$ac_cv_have_'libiconv_close`\" = yes"; then + cat >> confdefs.h <&6 +echo "configure:21693: checking for XML_Parse in -lc" >&5 +ac_lib_var=`echo c'_'XML_Parse | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS=`echo "-lc $LIBS" | sed -e 's/-lc //'` +cat > conftest.$ac_ext <&5; eval $ac_link 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + eval echo "$ac_t""yes" 1>&6 + lib_expat="" +else + eval echo "$ac_t""no" 1>&6 +echo $ac_n "checking for XML_Parse in -lexpat""... $ac_c" 1>&6 +echo "configure:21731: checking for XML_Parse in -lexpat" >&5 +ac_lib_var=`echo expat'_'XML_Parse | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS=`echo "-lexpat $LIBS" | sed -e 's/-lc //'` +cat > conftest.$ac_ext <&5; eval $ac_link 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + eval echo "$ac_t""yes" 1>&6 + lib_expat="-lexpat" +else + eval echo "$ac_t""no" 1>&6 +fi + +fi + +if test ."$lib_expat" = ."" -a "$ac_cv_lib_c_XML_Parse" = yes ; then + cat >> confdefs.h <<\EOF +#define HAVE_EXPAT_IN_LIBC 1 +EOF + +fi +ac_save_LIBS="$LIBS" +LIBS="$LIBS $lib_expat" +for ac_func in XML_Parse +do +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +echo "configure:21783: checking for $ac_func" >&5 +if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func(); + +int main() { + +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +$ac_func(); +#endif + +; return 0; } +EOF +if { eval echo configure:21811: \"$ac_link\" 1>&5; eval $ac_link 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_$ac_func=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func_$ac_func=no" +fi +rm -f conftest* +fi + +if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then + eval echo "$ac_t""yes" 1>&6 + ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` + cat >> confdefs.h <&6 +fi +done + +LIBS="$ac_save_LIBS" + +if test "$CC" = cl.exe; then + echo configure does not yet support library checks for cl.exe: + echo checking for SCardEstablishContext in -lwinscard... we know it is present + lib_pcsc="-lwinscard" + cat >> confdefs.h <<\EOF +#define HAVE_SCARDESTABLISHCONTEXT 1 +EOF + +else + echo $ac_n "checking for SCardEstablishContext in -lc""... $ac_c" 1>&6 +echo "configure:21847: checking for SCardEstablishContext in -lc" >&5 +ac_lib_var=`echo c'_'SCardEstablishContext | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS=`echo "-lc $LIBS" | sed -e 's/-lc //'` +cat > conftest.$ac_ext <&5; eval $ac_link 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + eval echo "$ac_t""yes" 1>&6 + lib_pcsc="" +else + eval echo "$ac_t""no" 1>&6 +echo $ac_n "checking for SCardEstablishContext in -lwinscard""... $ac_c" 1>&6 +echo "configure:21885: checking for SCardEstablishContext in -lwinscard" >&5 +ac_lib_var=`echo winscard'_'SCardEstablishContext | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS=`echo "-lwinscard $LIBS" | sed -e 's/-lc //'` +cat > conftest.$ac_ext <&5; eval $ac_link 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + eval echo "$ac_t""yes" 1>&6 + lib_pcsc="-lwinscard" +else + eval echo "$ac_t""no" 1>&6 +echo $ac_n "checking for SCardEstablishContext in -lpcsclite""... $ac_c" 1>&6 +echo "configure:21923: checking for SCardEstablishContext in -lpcsclite" >&5 +ac_lib_var=`echo pcsclite'_'SCardEstablishContext | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS=`echo "-lpcsclite $LIBS" | sed -e 's/-lc //'` +cat > conftest.$ac_ext <&5; eval $ac_link 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + eval echo "$ac_t""yes" 1>&6 + lib_pcsc="-lpcsclite" +else + eval echo "$ac_t""no" 1>&6 +fi + +fi + +fi + + if test ."$lib_pcsc" = ."" -a "$ac_cv_lib_c_SCardEstablishContext" = yes ; then + cat >> confdefs.h <<\EOF +#define HAVE_PCSC_IN_LIBC 1 +EOF + + fi + ac_save_LIBS="$LIBS" + LIBS="$LIBS $lib_pcsc" + for ac_func in SCardEstablishContext +do +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +echo "configure:21977: checking for $ac_func" >&5 +if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func(); + +int main() { + +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +$ac_func(); +#endif + +; return 0; } +EOF +if { eval echo configure:22005: \"$ac_link\" 1>&5; eval $ac_link 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_$ac_func=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func_$ac_func=no" +fi +rm -f conftest* +fi + +if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then + eval echo "$ac_t""yes" 1>&6 + ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` + cat >> confdefs.h <&6 +fi +done + + LIBS="$ac_save_LIBS" +fi + +if test "$CC" = cl.exe; then + echo configure does not yet support library checks for cl.exe: + echo checking for CRYPTO_free in -llibeay32... we know it is present + echo checking for SSL_free in -lssleay32... we know it is present + lib_crypto="-llibeay32" + lib_ssl="-lssleay32" +else + echo $ac_n "checking for CRYPTO_free in -lc""... $ac_c" 1>&6 +echo "configure:22040: checking for CRYPTO_free in -lc" >&5 +ac_lib_var=`echo c'_'CRYPTO_free | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS=`echo "-lc $LIBS" | sed -e 's/-lc //'` +cat > conftest.$ac_ext <&5; eval $ac_link 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + eval echo "$ac_t""yes" 1>&6 + lib_crypto="" +else + eval echo "$ac_t""no" 1>&6 +echo $ac_n "checking for CRYPTO_free in -lcrypto""... $ac_c" 1>&6 +echo "configure:22078: checking for CRYPTO_free in -lcrypto" >&5 +ac_lib_var=`echo crypto'_'CRYPTO_free | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS=`echo "-lcrypto $LIBS" | sed -e 's/-lc //'` +cat > conftest.$ac_ext <&5; eval $ac_link 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + eval echo "$ac_t""yes" 1>&6 + lib_crypto="-lcrypto" +else + eval echo "$ac_t""no" 1>&6 +fi + +fi + + if test ."$lib_crypto" = ."" -a "$ac_cv_lib_c_CRYPTO_free" = yes ; then + cat >> confdefs.h <<\EOF +#define HAVE_CRYPTO_IN_LIBC 1 +EOF + + fi + ac_save_LIBS="$LIBS" + LIBS="$LIBS $lib_crypto" + for ac_func in CRYPTO_free +do +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +echo "configure:22130: checking for $ac_func" >&5 +if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func(); + +int main() { + +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +$ac_func(); +#endif + +; return 0; } +EOF +if { eval echo configure:22158: \"$ac_link\" 1>&5; eval $ac_link 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_$ac_func=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func_$ac_func=no" +fi +rm -f conftest* +fi + +if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then + eval echo "$ac_t""yes" 1>&6 + ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` + cat >> confdefs.h <&6 +fi +done + + LIBS="$ac_save_LIBS" + echo $ac_n "checking for SSL_free in -lc""... $ac_c" 1>&6 +echo "configure:22184: checking for SSL_free in -lc" >&5 +ac_lib_var=`echo c'_'SSL_free | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS=`echo "-lc $LIBS" | sed -e 's/-lc //'` +cat > conftest.$ac_ext <&5; eval $ac_link 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + eval echo "$ac_t""yes" 1>&6 + lib_ssl="" +else + eval echo "$ac_t""no" 1>&6 +echo $ac_n "checking for SSL_free in -lssl""... $ac_c" 1>&6 +echo "configure:22222: checking for SSL_free in -lssl" >&5 +ac_lib_var=`echo ssl'_'SSL_free | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS=`echo "-lssl $LIBS" | sed -e 's/-lc //'` +cat > conftest.$ac_ext <&5; eval $ac_link 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + eval echo "$ac_t""yes" 1>&6 + lib_ssl="-lssl" +else + eval echo "$ac_t""no" 1>&6 +fi + +fi + + if test ."$lib_ssl" = ."" -a "$ac_cv_lib_c_SSL_free" = yes ; then + cat >> confdefs.h <<\EOF +#define HAVE_SSL_IN_LIBC 1 +EOF + + fi + ac_save_LIBS="$LIBS" + LIBS="$LIBS $lib_ssl" + for ac_func in SSL_free +do +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +echo "configure:22274: checking for $ac_func" >&5 +if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func(); + +int main() { + +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +$ac_func(); +#endif + +; return 0; } +EOF +if { eval echo configure:22302: \"$ac_link\" 1>&5; eval $ac_link 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_$ac_func=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func_$ac_func=no" +fi +rm -f conftest* +fi + +if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then + eval echo "$ac_t""yes" 1>&6 + ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` + cat >> confdefs.h <&6 +fi +done + + LIBS="$ac_save_LIBS" +fi + +if test $ac_cv_header_camlib_h = yes; then + scsi_lib=-lcam + lib_scsi=-lcam +fi + +if test "$ac_cv_header_sys_acl_h" = yes; then + + echo "checking for Posix Access Control List support" 1>&6 +echo "configure:22337: checking for Posix Access Control List support" >&5 + echo $ac_n "checking for acl_get_file in -lacl""... $ac_c" 1>&6 +echo "configure:22339: checking for acl_get_file in -lacl" >&5 +ac_lib_var=`echo acl'_'acl_get_file | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS=`echo "-lacl $LIBS" | sed -e 's/-lc //'` +cat > conftest.$ac_ext <&5; eval $ac_link 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + eval echo "$ac_t""yes" 1>&6 + lib_acl="-lacl" +else + eval echo "$ac_t""no" 1>&6 +fi + + echo $ac_n "checking for acl_get_file in -lpacl""... $ac_c" 1>&6 +echo "configure:22379: checking for acl_get_file in -lpacl" >&5 +ac_lib_var=`echo pacl'_'acl_get_file | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS=`echo "-lpacl $LIBS" | sed -e 's/-lc //'` +cat > conftest.$ac_ext <&5; eval $ac_link 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + eval echo "$ac_t""yes" 1>&6 + lib_acl="-lpacl" +else + eval echo "$ac_t""no" 1>&6 +fi + + + + if test ".$lib_acl" != .; then + lib_acl_test="$lib_acl" + fi + + ac_save_LIBS="$LIBS" + LIBS="$LIBS $lib_acl" + for ac_func in acl_get_file acl_set_file acl_from_text acl_to_text acl_free acl_delete_def_file +do +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +echo "configure:22429: checking for $ac_func" >&5 +if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func(); + +int main() { + +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +$ac_func(); +#endif + +; return 0; } +EOF +if { eval echo configure:22457: \"$ac_link\" 1>&5; eval $ac_link 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_$ac_func=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func_$ac_func=no" +fi +rm -f conftest* +fi + +if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then + eval echo "$ac_t""yes" 1>&6 + ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` + cat >> confdefs.h <&6 +fi +done + + for ac_func in acl_extended_file +do +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +echo "configure:22484: checking for $ac_func" >&5 +if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func(); + +int main() { + +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +$ac_func(); +#endif + +; return 0; } +EOF +if { eval echo configure:22512: \"$ac_link\" 1>&5; eval $ac_link 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_$ac_func=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func_$ac_func=no" +fi +rm -f conftest* +fi + +if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then + eval echo "$ac_t""yes" 1>&6 + ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` + cat >> confdefs.h <&6 +fi +done + + for ac_func in acl_get_entry +do +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +echo "configure:22539: checking for $ac_func" >&5 +if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func(); + +int main() { + +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +$ac_func(); +#endif + +; return 0; } +EOF +if { eval echo configure:22567: \"$ac_link\" 1>&5; eval $ac_link 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_$ac_func=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func_$ac_func=no" +fi +rm -f conftest* +fi + +if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then + eval echo "$ac_t""yes" 1>&6 + ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` + cat >> confdefs.h <&6 +fi +done + + for ac_func in acl_to_text_np acl_get_brand_np acl_is_trivial_np acl_strip_np +do +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +echo "configure:22594: checking for $ac_func" >&5 +if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func(); + +int main() { + +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +$ac_func(); +#endif + +; return 0; } +EOF +if { eval echo configure:22622: \"$ac_link\" 1>&5; eval $ac_link 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_$ac_func=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func_$ac_func=no" +fi +rm -f conftest* +fi + +if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then + eval echo "$ac_t""yes" 1>&6 + ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` + cat >> confdefs.h <&6 +fi +done + + LIBS="$ac_save_LIBS" + + echo "checking for Solaris UFS Access Control List support" 1>&6 +echo "configure:22649: checking for Solaris UFS Access Control List support" >&5 + echo $ac_n "checking for acltotext in -lsec""... $ac_c" 1>&6 +echo "configure:22651: checking for acltotext in -lsec" >&5 +ac_lib_var=`echo sec'_'acltotext | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS=`echo "-lsec $LIBS" | sed -e 's/-lc //'` +cat > conftest.$ac_ext <&5; eval $ac_link 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + eval echo "$ac_t""yes" 1>&6 + lib_acl="-lsec" +else + eval echo "$ac_t""no" 1>&6 +fi + + ac_save_LIBS="$LIBS" + LIBS="$LIBS $lib_acl" + for ac_func in acl facl aclfromtext acltotext +do +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +echo "configure:22695: checking for $ac_func" >&5 +if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func(); + +int main() { + +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +$ac_func(); +#endif + +; return 0; } +EOF +if { eval echo configure:22723: \"$ac_link\" 1>&5; eval $ac_link 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_$ac_func=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func_$ac_func=no" +fi +rm -f conftest* +fi + +if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then + eval echo "$ac_t""yes" 1>&6 + ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` + cat >> confdefs.h <&6 +fi +done + + + echo "checking for NFSv4 Access Control List support" 1>&6 +echo "configure:22749: checking for NFSv4 Access Control List support" >&5 + for ac_func in acl_get acl_set facl_get facl_set acl_fromtext acl_totext +do +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +echo "configure:22753: checking for $ac_func" >&5 +if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func(); + +int main() { + +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +$ac_func(); +#endif + +; return 0; } +EOF +if { eval echo configure:22781: \"$ac_link\" 1>&5; eval $ac_link 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_$ac_func=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func_$ac_func=no" +fi +rm -f conftest* +fi + +if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then + eval echo "$ac_t""yes" 1>&6 + ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` + cat >> confdefs.h <&6 +fi +done + + LIBS="$ac_save_LIBS" + + + echo "checking for HP-UX Access Control List support" 1>&6 +echo "configure:22809: checking for HP-UX Access Control List support" >&5 + for ac_func in getacl fgetacl setacl fsetacl strtoacl acltostr cpacl fcpacl chownacl setaclentry fsetaclentry +do +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +echo "configure:22813: checking for $ac_func" >&5 +if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func(); + +int main() { + +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +$ac_func(); +#endif + +; return 0; } +EOF +if { eval echo configure:22841: \"$ac_link\" 1>&5; eval $ac_link 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_$ac_func=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func_$ac_func=no" +fi +rm -f conftest* +fi + +if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then + eval echo "$ac_t""yes" 1>&6 + ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` + cat >> confdefs.h <&6 +fi +done + + + +fi + +if test "$ac_cv_header_attr_xattr_h" = yes; then + echo "checking for Linux flavor Extended Attribute support" 1>&6 +echo "configure:22871: checking for Linux flavor Extended Attribute support" >&5 + echo $ac_n "checking for getxattr in -lattr""... $ac_c" 1>&6 +echo "configure:22873: checking for getxattr in -lattr" >&5 +ac_lib_var=`echo attr'_'getxattr | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS=`echo "-lattr $LIBS" | sed -e 's/-lc //'` +cat > conftest.$ac_ext <&5; eval $ac_link 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + eval echo "$ac_t""yes" 1>&6 + lib_attr="-lattr" +else + eval echo "$ac_t""no" 1>&6 +fi + + ac_save_LIBS="$LIBS" + LIBS="$LIBS $lib_attr" + for ac_func in getxattr setxattr listxattr lgetxattr lsetxattr llistxattr +do +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +echo "configure:22917: checking for $ac_func" >&5 +if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func(); + +int main() { + +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +$ac_func(); +#endif + +; return 0; } +EOF +if { eval echo configure:22945: \"$ac_link\" 1>&5; eval $ac_link 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_$ac_func=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func_$ac_func=no" +fi +rm -f conftest* +fi + +if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then + eval echo "$ac_t""yes" 1>&6 + ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` + cat >> confdefs.h <&6 +fi +done + + LIBS="$ac_save_LIBS" +fi + +echo "checking for RBAC support" 1>&6 +echo "configure:22973: checking for RBAC support" >&5 +echo $ac_n "checking for getuserattr in -lsecdb""... $ac_c" 1>&6 +echo "configure:22975: checking for getuserattr in -lsecdb" >&5 +ac_lib_var=`echo secdb'_'getuserattr | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS=`echo "-lsecdb $LIBS" | sed -e 's/-lc //'` +cat > conftest.$ac_ext <&5; eval $ac_link 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + eval echo "$ac_t""yes" 1>&6 + lib_secdb="-lsecdb" +else + eval echo "$ac_t""no" 1>&6 +fi + +ac_save_LIBS="$LIBS" +LIBS="$LIBS $lib_secdb" +for ac_func in getauthattr getuserattr getexecattr getprofattr +do +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +echo "configure:23019: checking for $ac_func" >&5 +if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func(); + +int main() { + +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +$ac_func(); +#endif + +; return 0; } +EOF +if { eval echo configure:23047: \"$ac_link\" 1>&5; eval $ac_link 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_$ac_func=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func_$ac_func=no" +fi +rm -f conftest* +fi + +if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then + eval echo "$ac_t""yes" 1>&6 + ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` + cat >> confdefs.h <&6 +fi +done + +LIBS="$ac_save_LIBS" + +echo "checking for gmatch() support" 1>&6 +echo "configure:23074: checking for gmatch() support" >&5 +echo $ac_n "checking for gmatch in -lgen""... $ac_c" 1>&6 +echo "configure:23076: checking for gmatch in -lgen" >&5 +ac_lib_var=`echo gen'_'gmatch | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS=`echo "-lgen $LIBS" | sed -e 's/-lc //'` +cat > conftest.$ac_ext <&5; eval $ac_link 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + eval echo "$ac_t""yes" 1>&6 + lib_gen="-lgen" +else + eval echo "$ac_t""no" 1>&6 +fi + +ac_save_LIBS="$LIBS" +LIBS="$LIBS $lib_gen" +for ac_func in gmatch +do +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +echo "configure:23120: checking for $ac_func" >&5 +if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func(); + +int main() { + +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +$ac_func(); +#endif + +; return 0; } +EOF +if { eval echo configure:23148: \"$ac_link\" 1>&5; eval $ac_link 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_$ac_func=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func_$ac_func=no" +fi +rm -f conftest* +fi + +if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then + eval echo "$ac_t""yes" 1>&6 + ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` + cat >> confdefs.h <&6 +fi +done + +LIBS="$ac_save_LIBS" + +echo "checking for ELF support" 1>&6 +echo "configure:23175: checking for ELF support" >&5 +echo $ac_n "checking for elf_begin in -lelf""... $ac_c" 1>&6 +echo "configure:23177: checking for elf_begin in -lelf" >&5 +ac_lib_var=`echo elf'_'elf_begin | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS=`echo "-lelf $LIBS" | sed -e 's/-lc //'` +cat > conftest.$ac_ext <&5; eval $ac_link 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + eval echo "$ac_t""yes" 1>&6 + lib_elf="-lelf" +else + eval echo "$ac_t""no" 1>&6 +fi + +ac_save_LIBS="$LIBS" +LIBS="$LIBS $lib_elf" +for ac_func in elf_begin +do +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +echo "configure:23221: checking for $ac_func" >&5 +if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func(); + +int main() { + +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +$ac_func(); +#endif + +; return 0; } +EOF +if { eval echo configure:23249: \"$ac_link\" 1>&5; eval $ac_link 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_$ac_func=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func_$ac_func=no" +fi +rm -f conftest* +fi + +if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then + eval echo "$ac_t""yes" 1>&6 + ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` + cat >> confdefs.h <&6 +fi +done + +LIBS="$ac_save_LIBS" + +for ac_func in thr_yield +do +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +echo "configure:23278: checking for $ac_func" >&5 +if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func(); + +int main() { + +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +$ac_func(); +#endif + +; return 0; } +EOF +if { eval echo configure:23306: \"$ac_link\" 1>&5; eval $ac_link 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_$ac_func=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func_$ac_func=no" +fi +rm -f conftest* +fi + +if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then + eval echo "$ac_t""yes" 1>&6 + ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` + cat >> confdefs.h <&6 +fi +done + + + +echo $ac_n "checking for pthread_create in -lc""... $ac_c" 1>&6 +echo "configure:23333: checking for pthread_create in -lc" >&5 +ac_lib_var=`echo c'_'pthread_create | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS=`echo "-lc $LIBS" | sed -e 's/-lc //'` +cat > conftest.$ac_ext <&5; eval $ac_link 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + eval echo "$ac_t""yes" 1>&6 + lib_pthread="" +else + eval echo "$ac_t""no" 1>&6 +echo $ac_n "checking for pthread_create in -lpthread""... $ac_c" 1>&6 +echo "configure:23371: checking for pthread_create in -lpthread" >&5 +ac_lib_var=`echo pthread'_'pthread_create | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS=`echo "-lpthread $LIBS" | sed -e 's/-lc //'` +cat > conftest.$ac_ext <&5; eval $ac_link 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + eval echo "$ac_t""yes" 1>&6 + lib_pthread="-lpthread" +else + eval echo "$ac_t""no" 1>&6 +fi + +fi + + +ac_save_LIBS="$LIBS" +LIBS="$LIBS $lib_pthread" +for ac_func in pthread_create pthread_kill +do +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +echo "configure:23418: checking for $ac_func" >&5 +if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func(); + +int main() { + +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +$ac_func(); +#endif + +; return 0; } +EOF +if { eval echo configure:23446: \"$ac_link\" 1>&5; eval $ac_link 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_$ac_func=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func_$ac_func=no" +fi +rm -f conftest* +fi + +if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then + eval echo "$ac_t""yes" 1>&6 + ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` + cat >> confdefs.h <&6 +fi +done + +for ac_func in pthread_mutex_lock pthread_cond_wait pthread_spin_lock +do +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +echo "configure:23473: checking for $ac_func" >&5 +if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func(); + +int main() { + +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +$ac_func(); +#endif + +; return 0; } +EOF +if { eval echo configure:23501: \"$ac_link\" 1>&5; eval $ac_link 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_$ac_func=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func_$ac_func=no" +fi +rm -f conftest* +fi + +if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then + eval echo "$ac_t""yes" 1>&6 + ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` + cat >> confdefs.h <&6 +fi +done + +LIBS="$ac_save_LIBS" + +echo $ac_n "checking for clock_gettime in -lc""... $ac_c" 1>&6 +echo "configure:23528: checking for clock_gettime in -lc" >&5 +ac_lib_var=`echo c'_'clock_gettime | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS=`echo "-lc $LIBS" | sed -e 's/-lc //'` +cat > conftest.$ac_ext <&5; eval $ac_link 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + eval echo "$ac_t""yes" 1>&6 + lib_rt="" +else + eval echo "$ac_t""no" 1>&6 +echo $ac_n "checking for clock_gettime in -lrt""... $ac_c" 1>&6 +echo "configure:23566: checking for clock_gettime in -lrt" >&5 +ac_lib_var=`echo rt'_'clock_gettime | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS=`echo "-lrt $LIBS" | sed -e 's/-lc //'` +cat > conftest.$ac_ext <&5; eval $ac_link 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + eval echo "$ac_t""yes" 1>&6 + lib_rt="-lrt" +else + eval echo "$ac_t""no" 1>&6 +echo $ac_n "checking for clock_gettime in -lposix4""... $ac_c" 1>&6 +echo "configure:23604: checking for clock_gettime in -lposix4" >&5 +ac_lib_var=`echo posix4'_'clock_gettime | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS=`echo "-lposix4 $LIBS" | sed -e 's/-lc //'` +cat > conftest.$ac_ext <&5; eval $ac_link 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + eval echo "$ac_t""yes" 1>&6 + lib_rt="-lposix4" +else + eval echo "$ac_t""no" 1>&6 +fi + +fi + +fi + +if test ."$lib_rt" = .""; then + cat >> confdefs.h <<\EOF +#define HAVE_CLOCK_GETTIME_IN_LIBC 1 +EOF + +fi + +ac_save_LIBS="$LIBS" +LIBS="$LIBS $lib_rt" +for ac_func in clock_gettime clock_settime clock_getres +do +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +echo "configure:23659: checking for $ac_func" >&5 +if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func(); + +int main() { + +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +$ac_func(); +#endif + +; return 0; } +EOF +if { eval echo configure:23687: \"$ac_link\" 1>&5; eval $ac_link 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_$ac_func=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func_$ac_func=no" +fi +rm -f conftest* +fi + +if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then + eval echo "$ac_t""yes" 1>&6 + ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` + cat >> confdefs.h <&6 +fi +done + +for ac_func in sched_getparam sched_setparam sched_getscheduler sched_setscheduler +do +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +echo "configure:23714: checking for $ac_func" >&5 +if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func(); + +int main() { + +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +$ac_func(); +#endif + +; return 0; } +EOF +if { eval echo configure:23742: \"$ac_link\" 1>&5; eval $ac_link 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_$ac_func=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func_$ac_func=no" +fi +rm -f conftest* +fi + +if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then + eval echo "$ac_t""yes" 1>&6 + ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` + cat >> confdefs.h <&6 +fi +done + +for ac_func in sched_yield +do +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +echo "configure:23769: checking for $ac_func" >&5 +if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func(); + +int main() { + +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +$ac_func(); +#endif + +; return 0; } +EOF +if { eval echo configure:23797: \"$ac_link\" 1>&5; eval $ac_link 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_$ac_func=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func_$ac_func=no" +fi +rm -f conftest* +fi + +if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then + eval echo "$ac_t""yes" 1>&6 + ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` + cat >> confdefs.h <&6 +fi +done + +for ac_func in nanosleep +do +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +echo "configure:23824: checking for $ac_func" >&5 +if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func(); + +int main() { + +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +$ac_func(); +#endif + +; return 0; } +EOF +if { eval echo configure:23852: \"$ac_link\" 1>&5; eval $ac_link 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_$ac_func=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func_$ac_func=no" +fi +rm -f conftest* +fi + +if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then + eval echo "$ac_t""yes" 1>&6 + ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` + cat >> confdefs.h <&6 +fi +done + +LIBS="$ac_save_LIBS" + +echo $ac_n "checking for cap_get_proc in -lcap""... $ac_c" 1>&6 +echo "configure:23879: checking for cap_get_proc in -lcap" >&5 +ac_lib_var=`echo cap'_'cap_get_proc | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS=`echo "-lcap $LIBS" | sed -e 's/-lc //'` +cat > conftest.$ac_ext <&5; eval $ac_link 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + eval echo "$ac_t""yes" 1>&6 + lib_cap="-lcap" +else + eval echo "$ac_t""no" 1>&6 +fi + +ac_save_LIBS="$LIBS" +LIBS="$LIBS $lib_cap" +for ac_func in cap_get_proc cap_set_proc cap_set_flag cap_clear_flag +do +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +echo "configure:23923: checking for $ac_func" >&5 +if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func(); + +int main() { + +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +$ac_func(); +#endif + +; return 0; } +EOF +if { eval echo configure:23951: \"$ac_link\" 1>&5; eval $ac_link 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_$ac_func=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func_$ac_func=no" +fi +rm -f conftest* +fi + +if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then + eval echo "$ac_t""yes" 1>&6 + ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` + cat >> confdefs.h <&6 +fi +done + +LIBS="$ac_save_LIBS" + + +for ac_file in /dev/tty /dev/null /dev/zero +do + +ac_safe=`echo "$ac_file" | sed 'y%./+-%__p_%'` +echo $ac_n "checking for $ac_file""... $ac_c" 1>&6 +echo "configure:23983: checking for $ac_file" >&5 +if eval "test \"`echo '$''{'ac_cv_file_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test "$cross_compiling" = yes; then + { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } +else + cat > conftest.$ac_ext < +#include + +int +main() +{ + struct stat sb; + + exit(stat("$ac_file", &sb) < 0); +} +EOF +if { eval echo configure:24005: \"$ac_link\" 1>&5; eval $ac_link 2>&5; } && test -s conftest${ac_exeext} && ($rmtcall ./conftest${ac_xexeext}; exit) 2>/dev/null +then + eval ac_cv_file_$ac_safe=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* + eval ac_cv_file_$ac_safe=no +fi +rm -fr conftest* +fi + +fi + +if eval "test \"`echo '$ac_cv_file_'$ac_safe`\" = yes"; then + eval echo "$ac_t""yes" 1>&6 + ac_tr_file=HAVE_`echo $ac_file | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` + cat >> confdefs.h <&6 + +fi +done + +for ac_file in /dev/stdin /dev/stdout /dev/stderr +do + +ac_safe=`echo "$ac_file" | sed 'y%./+-%__p_%'` +echo $ac_n "checking for $ac_file""... $ac_c" 1>&6 +echo "configure:24037: checking for $ac_file" >&5 +if eval "test \"`echo '$''{'ac_cv_file_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test "$cross_compiling" = yes; then + { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } +else + cat > conftest.$ac_ext < +#include + +int +main() +{ + struct stat sb; + + exit(stat("$ac_file", &sb) < 0); +} +EOF +if { eval echo configure:24059: \"$ac_link\" 1>&5; eval $ac_link 2>&5; } && test -s conftest${ac_exeext} && ($rmtcall ./conftest${ac_xexeext}; exit) 2>/dev/null +then + eval ac_cv_file_$ac_safe=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* + eval ac_cv_file_$ac_safe=no +fi +rm -fr conftest* +fi + +fi + +if eval "test \"`echo '$ac_cv_file_'$ac_safe`\" = yes"; then + eval echo "$ac_t""yes" 1>&6 + ac_tr_file=HAVE_`echo $ac_file | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` + cat >> confdefs.h <&6 + +fi +done + +for ac_file in /dev/fd/0 /dev/fd/1 /dev/fd/2 +do + +ac_safe=`echo "$ac_file" | sed 'y%./+-%__p_%'` +echo $ac_n "checking for $ac_file""... $ac_c" 1>&6 +echo "configure:24091: checking for $ac_file" >&5 +if eval "test \"`echo '$''{'ac_cv_file_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test "$cross_compiling" = yes; then + { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } +else + cat > conftest.$ac_ext < +#include + +int +main() +{ + struct stat sb; + + exit(stat("$ac_file", &sb) < 0); +} +EOF +if { eval echo configure:24113: \"$ac_link\" 1>&5; eval $ac_link 2>&5; } && test -s conftest${ac_exeext} && ($rmtcall ./conftest${ac_xexeext}; exit) 2>/dev/null +then + eval ac_cv_file_$ac_safe=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* + eval ac_cv_file_$ac_safe=no +fi +rm -fr conftest* +fi + +fi + +if eval "test \"`echo '$ac_cv_file_'$ac_safe`\" = yes"; then + eval echo "$ac_t""yes" 1>&6 + ac_tr_file=HAVE_`echo $ac_file | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` + cat >> confdefs.h <&6 + +fi +done + +for ac_file in /usr/src/linux/include /usr/xpg4/bin/sh /opt/schily/xpg4/bin/sh +do + +ac_safe=`echo "$ac_file" | sed 'y%./+-%__p_%'` +echo $ac_n "checking for $ac_file""... $ac_c" 1>&6 +echo "configure:24145: checking for $ac_file" >&5 +if eval "test \"`echo '$''{'ac_cv_file_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test "$cross_compiling" = yes; then + { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } +else + cat > conftest.$ac_ext < +#include + +int +main() +{ + struct stat sb; + + exit(stat("$ac_file", &sb) < 0); +} +EOF +if { eval echo configure:24167: \"$ac_link\" 1>&5; eval $ac_link 2>&5; } && test -s conftest${ac_exeext} && ($rmtcall ./conftest${ac_xexeext}; exit) 2>/dev/null +then + eval ac_cv_file_$ac_safe=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* + eval ac_cv_file_$ac_safe=no +fi +rm -fr conftest* +fi + +fi + +if eval "test \"`echo '$ac_cv_file_'$ac_safe`\" = yes"; then + eval echo "$ac_t""yes" 1>&6 + ac_tr_file=HAVE_`echo $ac_file | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` + cat >> confdefs.h <&6 + +fi +done + + +UNAME=`uname || true` + +if test ."$UNAME" = .Linux; then + + +echo $ac_n "checking if Linux include file linux/ext2_fs.h is broken""... $ac_c" 1>&6 +echo "configure:24201: checking if Linux include file linux/ext2_fs.h is broken" >&5 +if eval "test \"`echo '$''{'ac_cv_broken_linux_ext2_fs_h'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +#endif +int main() { + +; return 0; } +EOF +if { eval echo configure:24216: \"$ac_compile\" 1>&5; eval $ac_compile 2>&5; }; then + rm -rf conftest* + ac_cv_broken_linux_ext2_fs_h=no +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + ac_cv_broken_linux_ext2_fs_h=yes +fi +rm -f conftest* +fi + +eval echo "$ac_t""$ac_cv_broken_linux_ext2_fs_h" 1>&6 +if test $ac_cv_broken_linux_ext2_fs_h = yes; then + cat >> confdefs.h <<\EOF +#define HAVE_BROKEN_LINUX_EXT2_FS_H 1 +EOF + +fi +echo $ac_n "checking if Linux include file /usr/src/linux/include/linux/ext2_fs.h is broken""... $ac_c" 1>&6 +echo "configure:24236: checking if Linux include file /usr/src/linux/include/linux/ext2_fs.h is broken" >&5 +if eval "test \"`echo '$''{'ac_cv_broken_src_linux_ext2_fs_h'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ___CPPFLAGS=$CPPFLAGS; CPPFLAGS="-I/usr/src/linux/include $CPPFLAGS" + cat > conftest.$ac_ext < +#endif +int main() { + +; return 0; } +EOF +if { eval echo configure:24252: \"$ac_compile\" 1>&5; eval $ac_compile 2>&5; }; then + rm -rf conftest* + ac_cv_broken_src_linux_ext2_fs_h=no +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + ac_cv_broken_src_linux_ext2_fs_h=yes +fi +rm -f conftest* +fi + +eval echo "$ac_t""$ac_cv_broken_src_linux_ext2_fs_h" 1>&6 +CPPFLAGS=$___CPPFLAGS +if test $ac_cv_broken_src_linux_ext2_fs_h = yes; then + cat >> confdefs.h <<\EOF +#define HAVE_BROKEN_SRC_LINUX_EXT2_FS_H 1 +EOF + +fi +if test .$ac_cv_broken_linux_ext2_fs_h = .no -o .$ac_cv_broken_src_linux_ext2_fs_h = .no; then + # + # If either /usr/include/linux/ex2_fs.h works or + # /usr/src/linux/include/linux/ex2_fs.h works, we will + # #define HAVE_USABLE_LINUX_EXT2_FS_H + # + # If HAVE_USABLE_LINUX_EXT2_FS_H is defined, a simple + # #include will work. + # + ac_cv_usable_linux_ext2_fs_h=yes + cat >> confdefs.h <<\EOF +#define HAVE_USABLE_LINUX_EXT2_FS_H 1 +EOF + +else + ac_cv_usable_linux_ext2_fs_h=no +fi +echo $ac_n "checking if Linux include file scsi/scsi.h is broken""... $ac_c" 1>&6 +echo "configure:24290: checking if Linux include file scsi/scsi.h is broken" >&5 +if eval "test \"`echo '$''{'ac_cv_broken_scsi_scsi_h'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +#endif +int main() { + +; return 0; } +EOF +if { eval echo configure:24305: \"$ac_compile\" 1>&5; eval $ac_compile 2>&5; }; then + rm -rf conftest* + ac_cv_broken_scsi_scsi_h=no +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + ac_cv_broken_scsi_scsi_h=yes +fi +rm -f conftest* +fi + +eval echo "$ac_t""$ac_cv_broken_scsi_scsi_h" 1>&6 +if test $ac_cv_broken_scsi_scsi_h = yes; then + cat >> confdefs.h <<\EOF +#define HAVE_BROKEN_SCSI_SCSI_H 1 +EOF + +fi +echo $ac_n "checking if Linux include file /usr/src/linux/include/scsi/scsi.h is broken""... $ac_c" 1>&6 +echo "configure:24325: checking if Linux include file /usr/src/linux/include/scsi/scsi.h is broken" >&5 +if eval "test \"`echo '$''{'ac_cv_broken_src_scsi_scsi_h'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ___CPPFLAGS=$CPPFLAGS; CPPFLAGS="-I/usr/src/linux/include $CPPFLAGS" + cat > conftest.$ac_ext < +#endif +int main() { + +; return 0; } +EOF +if { eval echo configure:24341: \"$ac_compile\" 1>&5; eval $ac_compile 2>&5; }; then + rm -rf conftest* + ac_cv_broken_src_scsi_scsi_h=no +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + ac_cv_broken_src_scsi_scsi_h=yes +fi +rm -f conftest* +fi + +eval echo "$ac_t""$ac_cv_broken_src_scsi_scsi_h" 1>&6 +CPPFLAGS=$___CPPFLAGS +if test $ac_cv_broken_src_scsi_scsi_h = yes; then + cat >> confdefs.h <<\EOF +#define HAVE_BROKEN_SRC_SCSI_SCSI_H 1 +EOF + +fi +echo $ac_n "checking if Linux include file scsi/sg.h is broken""... $ac_c" 1>&6 +echo "configure:24362: checking if Linux include file scsi/sg.h is broken" >&5 +if eval "test \"`echo '$''{'ac_cv_broken_scsi_sg_h'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +#include +#endif +int main() { + +; return 0; } +EOF +if { eval echo configure:24378: \"$ac_compile\" 1>&5; eval $ac_compile 2>&5; }; then + rm -rf conftest* + ac_cv_broken_scsi_sg_h=no +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + ac_cv_broken_scsi_sg_h=yes +fi +rm -f conftest* +fi + +eval echo "$ac_t""$ac_cv_broken_scsi_sg_h" 1>&6 +if test $ac_cv_broken_scsi_sg_h = yes; then + cat >> confdefs.h <<\EOF +#define HAVE_BROKEN_SCSI_SG_H 1 +EOF + +fi +echo $ac_n "checking if Linux include file /usr/src/linux/include/scsi/sg.h is broken""... $ac_c" 1>&6 +echo "configure:24398: checking if Linux include file /usr/src/linux/include/scsi/sg.h is broken" >&5 +if eval "test \"`echo '$''{'ac_cv_broken_src_scsi_sg_h'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ___CPPFLAGS=$CPPFLAGS; CPPFLAGS="-I/usr/src/linux/include $CPPFLAGS" + cat > conftest.$ac_ext < +#include +#endif +int main() { + +; return 0; } +EOF +if { eval echo configure:24415: \"$ac_compile\" 1>&5; eval $ac_compile 2>&5; }; then + rm -rf conftest* + ac_cv_broken_src_scsi_sg_h=no +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + ac_cv_broken_src_scsi_sg_h=yes +fi +rm -f conftest* +fi + +eval echo "$ac_t""$ac_cv_broken_src_scsi_sg_h" 1>&6 +CPPFLAGS=$___CPPFLAGS +if test $ac_cv_broken_src_scsi_sg_h = yes; then + cat >> confdefs.h <<\EOF +#define HAVE_BROKEN_SRC_SCSI_SG_H 1 +EOF + +fi + +if test .$ac_cv_broken_src_scsi_scsi_h = .yes; then + may_linux_src_include=no +fi +if test .$ac_cv_broken_src_linux_ext2_fs_h = .yes; then + may_linux_src_include=no +fi +if test .$ac_cv_file__usr_src_linux_include = .yes; then # only warn if there is /usr/src/linux/include +if test .$may_linux_src_include = .no; then + echo + echo "Warning: *** /usr/src/linux/include contains broken include files ***" + echo "Warning: *** /usr/src/linux/include is not used this reason ***" + echo "Warning: This may result in the inability to use recent Linux kernel interfaces" + echo +fi +fi +if test .$ac_cv_header_ext2fs_ext2_fs_h = .no; then # only if there is no +if test .$ac_cv_usable_linux_ext2_fs_h = .no; then + echo + echo "Warning: *** linux/ext2_fs.h is not usable at all ***" + echo "Warning: *** This makes it impossible to support Linux file flags ***" + echo "You may try to compile using 'make COPTX=-DTRY_EXT2_FS'" + echo + sleep 10 +fi +fi # was missing +fi # Linux only tests + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +trap '' 1 2 15 +cat > confcache <<\EOF +# This file is a shell script that caches the results of configure +# tests run on this system so they can be shared between configure +# scripts and configure runs. It is not useful on other systems. +# If it contains results you don't want to keep, you may remove or edit it. +# +# By default, configure uses ./config.cache as the cache file, +# creating it if it does not exist already. You can give configure +# the --cache-file=FILE option to use a different cache file; that is +# what configure does when it calls configure scripts in +# subdirectories, so they share the cache. +# Giving --cache-file=/dev/null disables caching, for debugging configure. +# config.status only pays attention to the cache file if you give it the +# --recheck option to rerun configure. +# +EOF +# The following way of writing the cache mishandles newlines in values, +# but we know of no workaround that is simple, portable, and efficient. +# So, don't put newlines in cache variables' values. +# Ultrix sh set writes to stderr and can't be redirected directly, +# and sets the high bit in the cache file unless we assign to the vars. +(set) 2>&1 | + case `(ac_space=' '; set | grep ac_space) 2>&1` in + *ac_space=\ *) + # `set' does not quote correctly, so add quotes (double-quote substitution + # turns \\\\ into \\, and sed turns \\ into \). + sed -n \ + -e "s/'/'\\\\''/g" \ + -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p" + ;; + *) + # `set' quotes correctly as required by POSIX, so do not add quotes. + sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p' + ;; + esac >> confcache +if cmp -s $cache_file confcache; then + : +else + if test -w $cache_file; then + echo "updating cache $cache_file" + cat confcache > $cache_file + else + echo "not updating unwritable cache $cache_file" + fi +fi +rm -f confcache + +trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15 + +test "x$prefix" = xNONE && prefix=$ac_default_prefix +# Let make expand exec_prefix. +test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' + +# Any assignment to VPATH causes Sun make to only execute +# the first set of double-colon rules, so remove it if not needed. +# If there is a colon in the path, we need to keep it. +if test "x$srcdir" = x.; then + ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d' +fi + +trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15 + +DEFS=-DHAVE_CONFIG_H + +# Without the "./", some shells look in PATH for config.status. +: ${CONFIG_STATUS=./config.status} + +echo creating $CONFIG_STATUS +rm -f $CONFIG_STATUS +cat > $CONFIG_STATUS </dev/null | sed 1q`: +# +# $0 $ac_configure_args +# +# Compiler output produced by configure, useful for debugging +# configure, is in ./config.log if it exists. + +ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]" +for ac_option +do + case "\$ac_option" in + -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) + echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion" + exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;; + -version | --version | --versio | --versi | --vers | --ver | --ve | --v) + echo "$CONFIG_STATUS generated by autoconf version 2.13 1.17-Schily" + exit 0 ;; + -help | --help | --hel | --he | --h) + echo "\$ac_cs_usage"; exit 0 ;; + *) echo "\$ac_cs_usage"; exit 1 ;; + esac +done + +ac_given_srcdir=$srcdir + +trap 'rm -fr `echo "rules.cnf xconfig.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15 +EOF +cat >> $CONFIG_STATUS < conftest.subs <<\\CEOF +$ac_vpsub +$extrasub +s%@SHELL@%$SHELL%g +s%@CFLAGS@%$CFLAGS%g +s%@CPPFLAGS@%$CPPFLAGS%g +s%@CXXFLAGS@%$CXXFLAGS%g +s%@FFLAGS@%$FFLAGS%g +s%@DEFS@%$DEFS%g +s%@LDFLAGS@%$LDFLAGS%g +s%@LIBS@%$LIBS%g +s%@exec_prefix@%$exec_prefix%g +s%@prefix@%$prefix%g +s%@program_transform_name@%$program_transform_name%g +s%@bindir@%$bindir%g +s%@sbindir@%$sbindir%g +s%@libexecdir@%$libexecdir%g +s%@datadir@%$datadir%g +s%@sysconfdir@%$sysconfdir%g +s%@sharedstatedir@%$sharedstatedir%g +s%@localstatedir@%$localstatedir%g +s%@libdir@%$libdir%g +s%@includedir@%$includedir%g +s%@oldincludedir@%$oldincludedir%g +s%@infodir@%$infodir%g +s%@mandir@%$mandir%g +s%@host@%$host%g +s%@host_alias@%$host_alias%g +s%@host_cpu@%$host_cpu%g +s%@host_vendor@%$host_vendor%g +s%@host_os@%$host_os%g +s%@CC@%$CC%g +s%@OBJEXT@%$OBJEXT%g +s%@EXEEXT@%$EXEEXT%g +s%@XEXEEXT@%$XEXEEXT%g +s%@CPP@%$CPP%g +s%@CPPX@%$CPPX%g +s%@RANLIB@%$RANLIB%g +s%@SET_MAKE@%$SET_MAKE%g +s%@YACC@%$YACC%g +s%@BISON@%$BISON%g +s%@LORDER@%$LORDER%g +s%@TSORT@%$TSORT%g +s%@LIBOBJS@%$LIBOBJS%g +s%@ALLOCA@%$ALLOCA%g +s%@may_linux_src_include@%$may_linux_src_include%g +s%@largefile_cc_opt@%$largefile_cc_opt%g +s%@sun_cc64_opt@%$sun_cc64_opt%g +s%@hp_cc_ansi_opt@%$hp_cc_ansi_opt%g +s%@hp_cc_opt_opt@%$hp_cc_opt_opt%g +s%@hp_cc_gprof_opt@%$hp_cc_gprof_opt%g +s%@lib_crypt@%$lib_crypt%g +s%@lib_resolv@%$lib_resolv%g +s%@lib_intl@%$lib_intl%g +s%@lib_iconv@%$lib_iconv%g +s%@lib_expat@%$lib_expat%g +s%@lib_pcsc@%$lib_pcsc%g +s%@lib_crypto@%$lib_crypto%g +s%@lib_ssl@%$lib_ssl%g +s%@lib_nsl@%$lib_nsl%g +s%@scsi_lib@%$scsi_lib%g +s%@lib_scsi@%$lib_scsi%g +s%@lib_acl@%$lib_acl%g +s%@lib_acl_test@%$lib_acl_test%g +s%@lib_attr@%$lib_attr%g +s%@lib_secdb@%$lib_secdb%g +s%@lib_gen@%$lib_gen%g +s%@lib_elf@%$lib_elf%g +s%@lib_pthread@%$lib_pthread%g +s%@lib_rt@%$lib_rt%g +s%@lib_dl@%$lib_dl%g +s%@lib_dir@%$lib_dir%g +s%@lib_cap@%$lib_cap%g + +CEOF +EOF + +cat >> $CONFIG_STATUS <<\EOF + +# Split the substitutions into bite-sized pieces for seds with +# small command number limits, like on Digital OSF/1 and HP-UX. +ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script. +ac_file=1 # Number of current file. +ac_beg=1 # First line for current file. +ac_end=$ac_max_sed_cmds # Line after last line for current file. +ac_more_lines=: +ac_sed_cmds="" +while $ac_more_lines; do + if test $ac_beg -gt 1; then + sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file + else + sed "${ac_end}q" conftest.subs > conftest.s$ac_file + fi + if test ! -s conftest.s$ac_file; then + ac_more_lines=false + rm -f conftest.s$ac_file + else + if test -z "$ac_sed_cmds"; then + ac_sed_cmds="sed -f conftest.s$ac_file" + else + ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file" + fi + ac_file=`expr $ac_file + 1` + ac_beg=$ac_end + ac_end=`expr $ac_end + $ac_max_sed_cmds` + fi +done +if test -z "$ac_sed_cmds"; then + ac_sed_cmds=cat +fi +EOF + +cat >> $CONFIG_STATUS <> $CONFIG_STATUS <<\EOF +for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then + # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". + case "$ac_file" in + *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'` + ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; + *) ac_file_in="${ac_file}.in" ;; + esac + + # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories. + + # Remove last slash and all that follows it. Not all systems have dirname. + ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'` + if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then + # The file is in a subdirectory. + test ! -d "$ac_dir" && mkdir "$ac_dir" + ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`" + # A "../" for each directory in $ac_dir_suffix. + ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'` + else + ac_dir_suffix= ac_dots= + fi + + case "$ac_given_srcdir" in + .) srcdir=. + if test -z "$ac_dots"; then top_srcdir=. + else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;; + /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;; + *) # Relative path. + srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix" + top_srcdir="$ac_dots$ac_given_srcdir" ;; + esac + + + echo creating "$ac_file" + rm -f "$ac_file" + configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure." + case "$ac_file" in + *Makefile*) ac_comsub="1i\\ +# $configure_input" ;; + *) ac_comsub= ;; + esac + + ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"` + sed -e "$ac_comsub +s%@configure_input@%$configure_input%g +s%@srcdir@%$srcdir%g +s%@top_srcdir@%$top_srcdir%g +" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file +fi; done +rm -f conftest.s* + +# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where +# NAME is the cpp macro being defined and VALUE is the value it is being given. +# +# ac_d sets the value in "#define NAME VALUE" lines. +ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)' +ac_dB='\([ ][ ]*\)[^ ]*%\1#\2' +ac_dC='\3' +ac_dD='%g' +# ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE". +ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' +ac_uB='\([ ]\)%\1#\2define\3' +ac_uC=' ' +ac_uD='\4%g' +# ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE". +ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' +ac_eB='$%\1#\2define\3' +ac_eC=' ' +ac_eD='%g' + +if test "${CONFIG_HEADERS+set}" != set; then +EOF +cat >> $CONFIG_STATUS <> $CONFIG_STATUS <<\EOF +fi +for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then + # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". + case "$ac_file" in + *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'` + ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; + *) ac_file_in="${ac_file}.in" ;; + esac + + echo creating $ac_file + + rm -f conftest.frag conftest.in conftest.out + ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"` + cat $ac_file_inputs > conftest.in + +EOF + +# Transform confdefs.h into a sed script conftest.vals that substitutes +# the proper values into config.h.in to produce config.h. And first: +# Protect against being on the right side of a sed subst in config.status. +# Protect against being in an unquoted here document in config.status. +rm -f conftest.vals +cat > conftest.hdr <<\EOF +s/[\\&%]/\\&/g +s%[\\$`]%\\&%g +s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp +s%ac_d%ac_u%gp +s%ac_u%ac_e%gp +EOF +sed -n -f conftest.hdr confdefs.h > conftest.vals +rm -f conftest.hdr + +# This sed command replaces #undef with comments. This is necessary, for +# example, in the case of _POSIX_SOURCE, which is predefined and required +# on some systems where configure will not decide to define it. +cat >> conftest.vals <<\EOF +s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */% +EOF + +# Break up conftest.vals because some shells have a limit on +# the size of here documents, and old seds have small limits too. + +rm -f conftest.tail +while : +do + ac_lines=`grep -c . conftest.vals` + # grep -c gives empty output for an empty file on some AIX systems. + if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi + # Write a limited-size here document to conftest.frag. + echo ' cat > conftest.frag <> $CONFIG_STATUS + sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS + echo 'CEOF + sed -f conftest.frag conftest.in > conftest.out + rm -f conftest.in + mv conftest.out conftest.in +' >> $CONFIG_STATUS + sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail + rm -f conftest.vals + mv conftest.tail conftest.vals +done +rm -f conftest.vals + +cat >> $CONFIG_STATUS <<\EOF + rm -f conftest.frag conftest.h + echo "/* $ac_file. Generated automatically by configure. */" > conftest.h + cat conftest.in >> conftest.h + rm -f conftest.in + if cmp -s $ac_file conftest.h 2>/dev/null; then + echo "$ac_file is unchanged" + rm -f conftest.h + else + # Remove last slash and all that follows it. Not all systems have dirname. + ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'` + if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then + # The file is in a subdirectory. + test ! -d "$ac_dir" && mkdir "$ac_dir" + fi + rm -f $ac_file + mv conftest.h $ac_file + fi +fi; done + +EOF +cat >> $CONFIG_STATUS <> $CONFIG_STATUS <<\EOF + +exit 0 +EOF +chmod +x $CONFIG_STATUS +rm -fr confdefs* $ac_clean_files +test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1 + diff -Nru cdrtools-2.01.01a33/autoconf/configure.in cdrtools-3.02a09/autoconf/configure.in --- cdrtools-2.01.01a33/autoconf/configure.in 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/autoconf/configure.in 2017-08-05 17:31:13.000000000 +0000 @@ -0,0 +1,1115 @@ +dnl @(#)configure.in 1.289 17/08/05 Copyright 1998-2015 J. Schilling +dnl Process this file with autoconf to produce a configure script. +AC_REVISION(1.289)dnl + +dnl AC_INIT(xconfig.h.in) +AC_INIT(config.guess) +AC_CONFIG_HEADER(xconfig.h) +AC_CANONICAL_HOST + +dnl Checks for programs. +AC_SHELL_BASH +AC_BIN_SHELL_BASH +AC_SHELL_CE_BROKEN +AC_BIN_SHELL_CE_BROKEN +AC_BIN_SHELL_BOSH +AC_OPT_SCHILY_BIN_SHELL_BOSH +dnl CC=${CC-cc} +dnl AC_PROG_CC +AC_CHECK_PROG(CC, cc, cc, gcc) dnl we default to cc not gcc +dnl The cross compile concepts from GNU autoconf are not usable. +dnl We permit to execute test programs on a remote machine while +dnl running "configure" in a cross compile environment. +AC_PROG_CC dnl now check for cross compiling +dnl cross_compiling=remote dnl disable GNU cross compile "defaults" +dnl rmtcall="$CONFIG_RMTCALL" dnl enable script for remote execution +dnl remote execution of test programs may be set up with: +dnl CONFIG_RMTCALL=script-path +dnl and +dnl CONFIG_RMTHOST=host or CONFIG_RMTHOST=user@host +dnl If AC_PROG_CC detects a cross compiler and CONFIG_RMTCALL is set, then +dnl all test programs are automatically transferred to the test machine +dnl and run on that machine. +AC_REMOTE_PARMS dnl check for correct remote parameters +AC_OBJEXT +AC_EXEEXT +AC_PROG_CPP +AC_PROG_CPPX +AC_SUN_CC64_OPT +AC_HP_CC_ANSI_OPT +AC_HP_CC_OPT_OPT +AC_HP_CC_GPROF_OPT +dnl AC_PROG_INSTALL +AC_PROG_RANLIB +AC_PROG_MAKE_SET +AC_CHECK_PROGS(YACC, yacc 'bison -y' byacc, noyacc) +AC_CHECK_PROGS(BISON, bison, nobison) +# +# We need both tsort/lorder or none of them +# +AC_PATH_PROG(LORDER, lorder, echo, $PATH:/usr/ccs/bin) +if test "$LORDER" = echo; then + TSORT=cat +else + AC_PATH_PROG(TSORT, tsort, cat, $PATH:/usr/ccs/bin) + if test "$TSORT" = cat; then + LORDER=echo + fi +fi + +dnl Checks for header files. +AC_HEADER_STDC +AC_CHECK_HEADERS(stdarg.h stdlib.h string.h float.h) dnl AC_HEADER_STDC in particular +AC_HEADER_INTTYPES +AC_HEADER_STDINT +ac_xsave_LIBS="$LIBS" +LIBS="" +AC_HEADER_DIRENT +lib_dir="$LIBS" +LIBS="$ac_xsave_LIBS" +AC_HEADER_STAT +AC_HEADER_TIME +AC_HEADER_SYS_WAIT +dnl check whether select() needs sys/select.h +AC_HEADER_SYS_SELECT +dnl check whether select() needs sys/socket.h (BeOS) +AC_HEADER_SELECT2 +AC_CHECK_HEADERS(ar.h) +AC_CHECK_HEADERS(assert.h) +AC_CHECK_HEADERS(stdio.h varargs.h stdarg.h stdlib.h stddef.h string.h strings.h unistd.h fcntl.h io.h sys/file.h) +AC_CHECK_HEADERS(conio.h) +AC_CHECK_HEADERS(getopt.h) +AC_CHECK_HEADERS(limits.h) +AC_CHECK_HEADERS(a.out.h aouthdr.h elf.h) +AC_CHECK_HEADERS(sysexits.h) +AC_CHECK_HEADERS(malloc.h posix/malloc.h sgtty.h termios.h termio.h) +AC_CHECK_HEADERS(pwd.h grp.h sys/acl.h aclutils.h acllib.h acl/libacl.h) +AC_CHECK_HEADERS(signal.h siginfo.h sys/siginfo.h ucontext.h) +AC_CHECK_HEADERS(shadow.h syslog.h) +AC_CHECK_HEADERS(sys/time.h sys/times.h utime.h sys/utime.h sys/ioctl.h sys/filio.h sys/param.h sys/systeminfo.h sys/sysctl.h) +AC_CHECK_HEADERS(sys/loadavg.h) +AC_CHECK_HEADERS(sys/syscall.h) +AC_CHECK_HEADERS(mach/machine.h) +AC_CHECK_HEADERS(mntent.h sys/mntent.h sys/mnttab.h sys/mount.h) +AC_CHECK_HEADERS(sys/fork.h vfork.h wait.h sys/wait.h sys/resource.h procfs.h sys/procfs.h libproc.h) +AC_CHECK_HEADERS(ulimit.h) +AC_CHECK_HEADERS(process.h) +AC_CHECK_HEADERS(sys/utsname.h sys/priocntl.h sys/rtpriocntl.h sys/procset.h) +AC_CHECK_HEADERS(sys/mtio.h sys/tape.h sys/mman.h linux/pg.h camlib.h) +AC_CHECK_HEADERS(sys/shm.h sys/sem.h sys/ipc.h semaphore.h) +AC_CHECK_HEADERS(sys/dkio.h sys/dklabel.h sun/dkio.h sun/dklabel.h) +AC_CHECK_HEADERS(sys/types.h sys/stat.h types.h stat.h) +AC_CHECK_HEADERS(sys/stypes.h sys/filedesc.h) +AC_CHECK_HEADERS(sys/acct.h) +AC_CHECK_HEADERS(poll.h sys/poll.h sys/select.h) +AC_CHECK_HEADERS(netdb.h arpa/aixrcmds.h sys/socket.h netinet/in.h stropts.h) +AC_CHECK_HEADERS(ieeefp.h fp.h) +AC_CHECK_HEADERS(values.h float.h math.h) +AC_CHECK_HEADERS(arpa/inet.h) +AC_CHECK_HEADERS(rpc/rpc.h) +AC_CHECK_HEADERS(bsd/dev/scsireg.h) +dnl Check for HP-UX sys/bsdtty.h (needed for TIOCGPGRP) +AC_CHECK_HEADERS(sys/bsdtty.h) +dnl Check for Linux kernel definitions +AC_CHECK_HEADERS(scsi/scsi.h scsi/sg.h linux/scsi.h linux.sg.h) +AC_CHECK_HEADERS(linux/types.h linux/gfp.h asm/types.h) +AC_CHECK_HEADERS(sys/capability.h) +dnl Check for BeOS kernel definitions (e.g. B_PAGE_SIZE) +AC_CHECK_HEADERS(OS.h) +dnl needed for newer OS/2 versions of EMX +AC_CHECK_HEADERS(os2.h) +AC_CHECK_HEADERS(os2me.h) +dnl Check for MS-Win's junkyard +AC_CHECK_HEADERS(windows.h) +dnl Check for moving Linux targets caused by missing concepts +AC_CHECK_HEADERS(ext2fs/ext2_fs.h) +dnl Check for Linux Extended File Attributes definitions +AC_CHECK_HEADERS(attr/xattr.h) +dnl Check for Mas OS X ac, av, env delarations +AC_CHECK_HEADERS(crt_externs.h) +AC_CHECK_HEADERS(fnmatch.h) +AC_CHECK_HEADERS(libintl.h locale.h langinfo.h nl_types.h) +AC_CHECK_HEADERS(ctype.h wctype.h wchar.h iconv.h) +AC_CHECK_HEADERS(priv.h sys/priv.h) +AC_CHECK_HEADERS(exec_attr.h secdb.h) +AC_CHECK_HEADERS(direct.h) +AC_CHECK_HEADERS(pthread.h thread.h) +AC_CHECK_HEADERS(libgen.h) +AC_CHECK_HEADERS(regex.h regexp.h regexpr.h) +AC_CHECK_HEADERS(dlfcn.h link.h dl.h libelf.h) +AC_CHECK_HEADERS(ranlib.h) +AC_CHECK_HEADERS(expat.h) + +dnl from aclocal.m4 (uses AC_TRY_COMPILE) +AC_HEADER_MAKEDEV + +dnl don't use GNU original +dnl from GNU acspecific.m4 (uses AC_CHECK_HEADER) +dnl AC_HEADER_MAJOR + +AC_CHECK_MINOR_BITS +AC_CHECK_MINOR_NONCONTIG + +AC_HEADER_USG_STDIO +AC_HEADER_ERRNO_DEF +AC_HEADER_ENVIRON_DEF +AC_HEADER_SYS_SIGLIST_DEF +AC_WNOWAIT_WAITPID + +dnl Checks for typedefs, structures, and compiler characteristics. +AC_C_CONST +AC_C_BIGENDIAN +AC_C_BITFIELDS +AC_C_STRINGIZE +AC_C_INLINE +AC_TYPE_SIGNAL +AC_TYPE_GETGROUPS +AC_TYPE_LONGLONG +AC_TYPE___INT64 +AC_TYPE_LONGDOUBLE +AC_TYPE_PROTOTYPES +dnl AC_USER_MALLOC must be past AC_CHECK_FUNCS(strdup) +AC_DYN_ARRAYS +AC_PRAGMA_WEAK + +dnl This is a hack to compile two files and to check whether a weak alias from +dnl one file can be seen in another file. The reason for this test is to detect +dnl a bug on Cygwin that causes waek symbols to become "local" symbols that +dnl are useless because they would be invisible for other parts of the code. + +if test $ac_cv_pragma_weak = yes; then +AC_TRY_COMPILE2([#pragma weak weakname = conffunc],[],[true],[true]) +ac_save_LIBS="$LIBS" +LIBS="conftest2.$ac_cv_objext" +AC_CACHE_CHECK([if linker allows pragma weak], ac_cv_link_weak, + [AC_TRY_LINK([extern int weakname();], +[return weakname();], + [ac_cv_link_weak=yes], + [ac_cv_link_weak=no])]) +LIBS="$ac_save_LIBS" +if test $ac_cv_link_weak = yes; then + AC_DEFINE(HAVE_LINK_WEAK) +fi +rm -f conftest2.* +fi + +AC_TYPE_UID_T +AC_TYPE_SIZE_T +AC_CHECK_TYPE(ssize_t, int) +AC_CHECK_TYPE(ptrdiff_t, int) +AC_TYPE_PID_T +AC_TYPE_OFF_T +AC_TYPE_MODE_T +AC_TYPE_TIME_T +AC_CHECK_TYPE(caddr_t, char *) +AC_CHECK_TYPE(daddr_t, long) +AC_CHECK_TYPE(dev_t, unsigned short) +AC_CHECK_TYPE(major_t, dev_t) +AC_CHECK_TYPE(minor_t, dev_t) +AC_CHECK_TYPE(ino_t, unsigned long) +AC_CHECK_TYPE(nlink_t, unsigned long) +AC_CHECK_TYPE(blksize_t, long) +AC_CHECK_TYPE(blkcnt_t, Intmax_t) +AC_TYPE_CLOCK_T +AC_TYPE_SOCKLEN_T +AC_HAVE_TYPE([#include ], greg_t) +AC_HAVE_TYPE([#include ], rlim_t) +dnl NetBSD-5 has an idtype_t that is in conflict with POSIX +dnl AC_HAVE_TYPE([#include ], idtype_t) +AC_TYPE_IDTYPE_T +AC_HAVE_TYPE([#include ], siginfo_t) +AC_TYPE_STACK_T +AC_TYPE_SIGINFO_T + +dnl These types are present on all UNIX systems but should be avoided +dnl for portability. +dnl On Apollo/Domain OS we don't have them.... +dnl Better include and use Uchar, Uint & Ulong +AC_CHECK_TYPE(u_char, unsigned char) +AC_CHECK_TYPE(u_short, unsigned short) +AC_CHECK_TYPE(u_int, unsigned int) +AC_CHECK_TYPE(u_long, unsigned long) + +AC_INCL_CHECK_TYPE( +[#ifdef HAVE_INTTYPES_H +#include +#endif +#ifdef HAVE_STDINT_H +#include +#endif +], int8_t, Int8_t) + +AC_INCL_CHECK_TYPE( +[#ifdef HAVE_INTTYPES_H +#include +#endif +#ifdef HAVE_STDINT_H +#include +#endif +], int16_t, Int16_t) + +AC_INCL_CHECK_TYPE( +[#ifdef HAVE_INTTYPES_H +#include +#endif +#ifdef HAVE_STDINT_H +#include +#endif +], int32_t, Int32_t) + +AC_INCL_CHECK_TYPE( +[#ifdef HAVE_INTTYPES_H +#include +#endif +#ifdef HAVE_STDINT_H +#include +#endif +], int64_t, Int64_t) + +AC_INCL_CHECK_TYPE( +[#ifdef HAVE_INTTYPES_H +#include +#endif +#ifdef HAVE_STDINT_H +#include +#endif +], intmax_t, Intmax_t) + +AC_INCL_CHECK_TYPE( +[#ifdef HAVE_INTTYPES_H +#include +#endif +#ifdef HAVE_STDINT_H +#include +#endif +], intptr_t, Intptr_t) + +AC_INCL_CHECK_TYPE( +[#ifdef HAVE_INTTYPES_H +#include +#endif +#ifdef HAVE_STDINT_H +#include +#endif +], uint8_t, UInt8_t) + +AC_INCL_CHECK_TYPE( +[#ifdef HAVE_INTTYPES_H +#include +#endif +#ifdef HAVE_STDINT_H +#include +#endif +], uint16_t, UInt16_t) + +AC_INCL_CHECK_TYPE( +[#ifdef HAVE_INTTYPES_H +#include +#endif +#ifdef HAVE_STDINT_H +#include +#endif +], uint32_t, UInt32_t) + +AC_INCL_CHECK_TYPE( +[#ifdef HAVE_INTTYPES_H +#include +#endif +#ifdef HAVE_STDINT_H +#include +#endif +], uint64_t, UInt64_t) + +AC_INCL_CHECK_TYPE( +[#ifdef HAVE_INTTYPES_H +#include +#endif +#ifdef HAVE_STDINT_H +#include +#endif +], uintmax_t, UIntmax_t) + +AC_INCL_CHECK_TYPE( +[#ifdef HAVE_INTTYPES_H +#include +#endif +#ifdef HAVE_STDINT_H +#include +#endif +], uintptr_t, UIntptr_t) + +AC_INCL_CHECK_TYPE( +[#ifdef HAVE_WCHAR_H +#include +#endif +#ifdef HAVE_WCTYPE_H +#include +#endif +], wctype_t, int) + +AC_INCL_CHECK_TYPE( +[#ifdef HAVE_WCHAR_H +#include +#endif +#ifdef HAVE_WCTYPE_H +#include +#endif +#include +], wint_t, int) + +AC_INCL_CHECK_TYPE( +[#ifdef HAVE_WCHAR_H +#include +#endif +#ifdef HAVE_WCTYPE_H +#include +#endif +], mbstate_t, int) + +AC_INCL_CHECK_TYPE( +#ifdef HAVE_SYS_STAT_H +[#include +#endif +#ifdef HAVE_STAT_H +#include +#endif +], timestruc_t, timespec) + +AC_CHECK_SIZEOF(char) +AC_CHECK_SIZEOF(short int) +AC_CHECK_SIZEOF(int) +AC_CHECK_SIZEOF(long int) +AC_CHECK_SIZEOF(long long) +AC_CHECK_SIZEOF(__int64) +AC_CHECK_SIZEOF(char *) + +AC_CHECK_SIZEOF(unsigned char) +AC_CHECK_SIZEOF(unsigned short int) +AC_CHECK_SIZEOF(unsigned int) +AC_CHECK_SIZEOF(unsigned long int) +AC_CHECK_SIZEOF(unsigned long long) +AC_CHECK_SIZEOF(unsigned __int64) +AC_CHECK_SIZEOF(unsigned char *) +AC_CHECK_SIZEOF(float) +AC_CHECK_SIZEOF(double) +AC_CHECK_SIZEOF(long double) + +AC_CHECK_SIZEOF(size_t) +AC_CHECK_SIZEOF(ssize_t) +AC_CHECK_SIZEOF(ptrdiff_t) + +AC_CHECK_SIZEOF(mode_t) +AC_CHECK_SIZEOF(uid_t) +AC_CHECK_SIZEOF(gid_t) +AC_CHECK_SIZEOF(pid_t) + +AC_CHECK_SIZEOF(dev_t) +AC_CHECK_SIZEOF(major_t) +AC_CHECK_SIZEOF(minor_t) + +dnl This call must be past AC_CHECK_SIZEOF(long int) +AC_CHECK_SIZE_TIME_T +AC_CHECK_SIZE_WCHAR +AC_CHECK_SIZE_WCHAR_T + +dnl # AC_TYPE_SIZE_T_ # Defines HAVE_SIZE_T / NO_SIZE_T +AC_TYPE_CHAR +AC_TYPE_VA_LIST +AC_HEADER_FILE__FLAGS +AC_HEADER_FILE__IO_BUF_BASE +AC_STRUCT_TIMEVAL +AC_STRUCT_TIMEZONE +AC_STRUCT_TIMESPEC +AC_STRUCT_MTGET_TYPE +AC_STRUCT_MTGET_MODEL +AC_STRUCT_MTGET_DSREG +AC_STRUCT_MTGET_DSREG1 +AC_STRUCT_MTGET_DSREG2 +AC_STRUCT_MTGET_GSTAT +AC_STRUCT_MTGET_ERREG +AC_STRUCT_MTGET_RESID +AC_STRUCT_MTGET_FILENO +AC_STRUCT_MTGET_BLKNO +AC_STRUCT_MTGET_FLAGS +AC_STRUCT_MTGET_BF +AC_STRUCT_RUSAGE +AC_STRUCT_SI_UTIME +AC_STRUCT_SOCKADDR_STORAGE +AC_STRUCT_UNION_SEMUN +AC_STRUCT_UNION_WAIT +AC_USE_STRUCT_UNION_WAIT +AC_STRUCT_ST_SPARE1 +AC_STRUCT_ST_ATIMENSEC +AC_STRUCT_ST_ATIME_N +AC_STRUCT_ST_NSEC +AC_STRUCT_ST__TIM +AC_STRUCT_ST_ATIMESPEC +AC_STRUCT_ST_BLKSIZE +AC_STRUCT_ST_BLOCKS +AC_STRUCT_ST_FSTYPE +AC_STRUCT_ST_ACLCNT +AC_STRUCT_ST_RDEV +AC_STRUCT_ST_FLAG +AC_STRUCT_ST_FLAGS +AC_STRUCT_DIRENT_D_INO +AC_STRUCT_DIRENT_D_TYPE +AC_STRUCT_DIR_DD_FD +AC_STRUCT_UTSNAME_ARCH +AC_STRUCT_UTSNAME_PROCESSOR +AC_STRUCT_UTSNAME_SYSNAME_HOST +AC_STRUCT_UTSNAME_RELEASE_HOST +AC_STRUCT_UTSNAME_VERSION_HOST + +dnl Check whether iconv() uses const char ** arguments +AC_ICONV_CONST + +dnl Check whether we are able to get the address of a function +dnl or whether the symbol is declared and usable as rhs +AC_CHECK_DECLARE([ +#include +#include ], stat) +AC_CHECK_DECLARE([ +#include +#include ], lstat) + +dnl Checks for library functions. +AC_FUNC_WAIT3 +AC_FUNC_MLOCK +AC_FUNC_MLOCKALL +AC_FUNC_VA_COPY +AC_FUNC__VA_COPY +AC_FUNC_ECVT +AC_FUNC_FCVT +AC_FUNC_GCVT +AC_FUNC_DTOA +AC_FUNC_DTOA_R +AC_FUNC_GETPAGESIZE +jsAC_FUNC_MMAP +AC_MMAP_SIZEP +AC_FUNC_SMMAP +AC_FUNC_SHMGET +AC_FUNC_ALLOCA +AC_FUNC_QUOTAIOCTL +AC_FUNC_FCNTL_LOCKF +AC_FUNC_UNAME +AC_CHECK_FUNCS(execl) +AC_FUNC_VFORK +AC_FUNC_SYS_SIGLIST +AC_FUNC_BSD_GETPGRP +AC_FUNC_BSD_SETPGRP +AC_FUNC_C99_ISINF +AC_FUNC_C99_ISNAN +AC_FUNC_SIGSETJMP +AC_FUNC_SIGLONGJMP +AC_FUNC_PRINTF_J +AC_FUNC_PRINTF_Z +AC_FUNC_PRINTF_LL +AC_FUNC_REALLOC_NULL +AC_FUNC_WAITID +AC_CHECK_FUNCS(access eaccess euidaccess) +AC_CHECK_FUNCS(memchr memcmp memcpy memccpy memmove memset) +AC_CHECK_FUNCS(brk sbrk strerror nice flock lockf fchdir statvfs quotactl) +AC_CHECK_FUNCS(realpath resolvepath) +AC_CHECK_FUNCS(dup dup2) +AC_CHECK_FUNCS(getcwd shmat semget) +AC_CHECK_FUNCS(lstat readlink symlink link rename mkfifo mknod) +AC_CHECK_FUNCS(setreuid setresuid seteuid setuid) +AC_CHECK_FUNCS(setregid setresgid setegid setgid) +AC_CHECK_FUNCS(getuid geteuid getgid getegid) +AC_CHECK_FUNCS(getpid getppid) +AC_CHECK_FUNCS(getpgid setpgid getsid setsid) +AC_CHECK_FUNCS(getpgrp setpgrp) +AC_CHECK_FUNCS(getpwnam getpwent getpwuid setpwent endpwent) +AC_CHECK_FUNCS(getgrnam getgrent getgrgid setgrent endgrent) +dnl getspwnam() on HP-UX is in libsec.a +AC_CHECK_FUNCS(getspnam getspwnam) +AC_CHECK_FUNCS(getlogin) +dnl Cannot simply include "waitid" here as the so called POSIX compliant +dnl Mac OS X comes with a completely broken waitid() implementation. +AC_CHECK_FUNCS(sync fsync fork forkx vforkx forkall forkallx wait wait4 wait6 waitpid getrusage getrlimit setrlimit ulimit) +AC_CHECK_FUNCS(execl execle execlp execv execve execvp) +AC_CHECK_FUNCS(spawnl spawnle spawnlp spawnlpe) +AC_CHECK_FUNCS(spawnv spawnve spawnvp spawnvpe) +AC_CHECK_FUNCS(cwait) +AC_CHECK_FUNCS(getexecname) +AC_CHECK_FUNCS(getprogname setprogname) +AC_CHECK_FUNCS(proc_pidpath) +AC_CHECK_FUNCS(getloadavg) +AC_CHECK_FUNCS(gethostid gethostname getdomainname getdtablesize) +AC_CHECK_FUNCS(gettimeofday settimeofday time stime gethrtime) +AC_CHECK_FUNCS(ftime tzset mktime gmtime localtime timegm timelocal) +AC_CHECK_FUNCS(ctime cftime ascftime strftime) +AC_CHECK_FUNCS(poll select isastream) +AC_CHECK_FUNCS(chown fchown lchown chmod fchmod lchmod times utime utimes futimes lutimes) +AC_CHECK_FUNCS(utimens lutimens) +AC_CHECK_FUNCS(futimens utimensat) +AC_CHECK_FUNCS(ioctl fcntl) +dnl AC_CHECK_FUNCS(ecvt fcvt gcvt) +AC_CHECK_FUNCS(qecvt qfcvt qgcvt) +AC_CHECK_FUNCS(_qecvt _qfcvt _qgcvt) +AC_CHECK_FUNCS(_qecvt_r _qfcvt_r _qgcvt_r) +AC_CHECK_FUNCS(_ldecvt _ldfcvt _ldgcvt) +AC_CHECK_FUNCS(ecvt_r fcvt_r gcvt_r) +AC_CHECK_FUNCS(_ldecvt_r _ldfcvt_r _ldgcvt_r) +AC_CHECK_FUNCS(econvert fconvert gconvert) +AC_CHECK_FUNCS(qeconvert qfconvert qgconvert) +AC_CHECK_FUNCS(isinf isnan) +AC_CHECK_FUNCS(getc_unlocked getchar_unlocked putc_unlocked putchar_unlocked) +AC_CHECK_FUNCS(flockfile funlockfile ftrylockfile) +AC_CHECK_FUNCS(rand drand48) +AC_CHECK_FUNCS(strtol strtoll strtoul strtoull strtod) +AC_CHECK_FUNCS(setpriority DosSetPriority) +AC_CHECK_FUNCS(DosAllocSharedMem) +AC_CHECK_FUNCS(getdelim) +AC_CHECK_FUNCS(seekdir fdopendir) +dnl These are POSIX.1 functions (syscalls on Solaris) +AC_CHECK_FUNCS(openat fstatat fchownat futimesat renameat unlinkat) +dnl This is a library function for the Solaris extended attr interface +AC_CHECK_FUNCS(attropen) +dnl This appeared on Solaris 11 Build 63 +AC_CHECK_FUNCS(__accessat) +dnl This appeared not yet in POSIX +AC_CHECK_FUNCS(accessat) +dnl This are POSIX extensions not found on Solaris 10 +AC_CHECK_FUNCS(mkdirat faccessat fchmodat linkat mkfifoat mknodat readlinkat symlinkat) +AC_CHECK_FUNCS(pipe _pipe) +AC_CHECK_FUNCS(popen pclose _popen _pclose) +AC_CHECK_FUNCS(closefrom) +AC_CHECK_FUNCS(strsignal str2sig sig2str) +AC_CHECK_FUNCS(kill killpg) +AC_CHECK_FUNCS(signal sighold sigrelse sigignore sigpause sigprocmask sigsetmask sigset sigaltstack sigblock) +AC_CHECK_FUNCS(alarm sleep usleep yield) +AC_CHECK_FUNCS(atexit on_exit) +dnl tcgetattr and tcsetattr are a inline functions in termios.h on Android +AC_CHECK_DFUNC([ +#ifdef HAVE_TERMIOS_H +#include +#endif +], tcgetattr) +AC_CHECK_DFUNC([ +#ifdef HAVE_TERMIOS_H +#include +#endif +], tcsetattr) +AC_CHECK_FUNCS(tcgetpgrp tcsetpgrp tcgetsid) +AC_CHECK_FUNCS(getenv putenv setenv unsetenv) +AC_CHECK_FUNCS(snprintf strcasecmp strncasecmp) +AC_CHECK_FUNCS(vprintf vfprintf vsprintf vsnprintf) + +AC_CHECK_DFUNCS([ +#ifdef HAVE_STRING_H +#include +#endif +], strcat strncat strcmp strncmp strcpy strlcat strlcpy strncpy strdup strndup strlen strnlen strchr strrchr strstr strspn strcspn) +AC_CHECK_DFUNCS([ +#ifdef HAVE_WCHAR_H +#include +#endif +], wcscat wcsncat wcscmp wcsncmp wcscpy wcslcat wcslcpy wcsncpy wcsdup wcsndup wcslen wcsnlen wcschr wcsrchr wcsstr wcsspn wcscspn) + +AC_CHECK_FUNCS(wcwidth wcswidth wctype iswctype) +AC_CHECK_FUNCS(basename dirname) +AC_CHECK_FUNCS(pathconf fpathconf lpathconf) +AC_CHECK_FUNCS(malloc calloc valloc realloc memalign posix_memalign) +AC_CHECK_FUNCS(madvise) +AC_CHECK_FUNCS(mktemp mkstemp) +AC_CHECK_FUNCS(chflags fchflags fflagstostr strtofflags) +AC_CHECK_FUNCS(fnmatch) +AC_CHECK_FUNCS(truncate ftruncate) +AC_CHECK_FUNCS(getppriv setppriv priv_set) +AC_CHECK_FUNCS(issetugid) +AC_CHECK_FUNCS(getroles privbit_set) +AC_CHECK_FUNCS(setlocale localeconv nl_langinfo) +AC_CHECK_FUNCS(setbuf setvbuf) +AC_CHECK_FUNCS(clone_area create_area delete_area) + +dnl The official POSIX rule is not to define "new" interfaces that +dnl are in conflict with older interfaces of the same name. +dnl Our interfaces fexec*() have been defined and published in 1982. +dnl The new POSIX interfaces define a different interface and the +dnl new POSIX interfaces even use names that are not compatible with +dnl POSIX rules. The new POSIX interfaces in question should be called +dnl fdexec*() to follow the rules of other similar POSIX functions. +dnl +dnl We use AC_RCHECK_FUNCS() because some Linux distros define a +dnl fexecve() that returns ENOSYS an AC_CHECK_FUNCS() would return FALSE +dnl +echo Checking for POSIX violations by the POSIX.1-2008 standard: +AC_RCHECK_FUNCS(fexecl fexecle fexecv fexecve) +AC_RCHECK_FUNCS(fspawnv fspawnl fspawnv_nowait) + +dnl A similar problem exists with the new POSIX.1-2008 interfaces +dnl getline() and fgetline(). These interfaces are also incompatible +dnl with our interfaces defined in 1982. +AC_RCHECK_FUNCS(getline fgetline) +echo End of tests for POSIX violations by the POSIX.1-2008 standard. + +dnl Check whether a symbol is either defined in an include file or +dnl otherwise usable (e.g. as function) +AC_CHECK_DFUNC([#include ], dirfd) + +AC_CHECK_DFUNC([ +#ifdef HAVE_WCHAR_H +#include +#endif +#ifdef HAVE_WCTYPE_H +#include +#endif +], iswprint) + +AC_CHECK_DFUNC([ +#ifdef HAVE_WCHAR_H +#include +#endif +#ifdef HAVE_WCTYPE_H +#include +#endif +], iswblank) + +AC_CHECK_DFUNC([ +#ifdef HAVE_CTYPE_H +#include +#endif +], isblank) + +AC_CHECK_DFUNC([ +#ifdef HAVE_WCHAR_H +#include +#endif +#ifdef HAVE_WCTYPE_H +#include +#endif +], mbsinit) + +AC_CHECK_DFUNC([ +#ifdef HAVE_STDLIB_H +#include +#endif +], mbtowc) + +AC_CHECK_DFUNC([ +#ifdef HAVE_STDLIB_H +#include +#endif +], wctomb) + +AC_CHECK_DFUNC([ +#ifdef HAVE_WCHAR_H +#include +#endif +#ifdef HAVE_WCTYPE_H +#include +#endif +], mbrtowc) + +AC_CHECK_DFUNC([ +#ifdef HAVE_WCHAR_H +#include +#endif +#ifdef HAVE_WCTYPE_H +#include +#endif +], wcrtomb) + +AC_CHECK_DFUNC([#include ], finite) +AC_CHECK_DFUNC([#include ], isnand) + +dnl Checks for typedefs, structures, and compiler characteristics. +dnl that need results from the AC_CHECK_FUNCS() calls. +AC_USER_MALLOC +dnl AC_USER_XCVT test macro does not yet work +AC_VAR_TIMEZONE +AC_VAR_TIMEZONE_DEF +AC_VAR___PROGNAME +AC_VAR___PROGNAME_FULL + +dnl Checks for OS characteristics. +AC_HARD_SYMLINKS +AC_LINK_NOFOLLOW +AC_ACCESS_E_OK +AC_FNMATCH_IGNORECASE + +dnl Need to check this in default compilation mode to find out +dnl whether this platform supports both functions by default too. +dnl We cannot use the standard tests because they would find +dnl that fseeko()/ftello() are present in small file mode on +dnl Limnux while there is no prototype for these functions. +AC_SMALL_FSEEKO +AC_SMALL_FTELLO + +AC_CHECK_LIB(c, dlopen, lib_dl="", + [AC_CHECK_LIB(dl, dlopen, lib_dl="-ldl")]) +ac_save_LIBS="$LIBS" +LIBS="$LIBS $lib_dl" +AC_CHECK_FUNCS(dlopen dlclose dlsym dlerror dlinfo) +AC_CHECK_FUNCS(shl_load shl_unload shl_gethandle) +LIBS="$ac_save_LIBS" +if test ."$lib_dl" = .""; then + AC_DEFINE(HAVE_DLOPEN_IN_LIBC) +fi + +AC_CHECK_DFUNCS([ +#ifdef HAVE_WINDOWS_H +#undef u_char +#undef u_short +#undef u_int +#undef u_long +#include +#endif +], LoadLibrary FreeLibrary GetProcAddress) + +dnl ??? AC_CHECK_LIB(socket, socket, lib_socket="-lsocket") +dnl +ac_save_LIBS="$LIBS" +AC_CHECK_LIB(c, socket, lib_socket="", + [AC_CHECK_LIB(socket, socket, lib_socket="-lsocket")]) +LIBS="$ac_save_LIBS" +AC_CHECK_LIB(c, gethostbyname, lib_nsl="", + [AC_CHECK_LIB(nsl, gethostbyname, lib_nsl="-lnsl", + [AC_CHECK_LIB(network, gethostbyname, lib_nsl="-lnetwork")])]) +LIBS="$ac_save_LIBS" +LIBS="$LIBS $lib_nsl $lib_socket" +AC_CHECK_FUNCS(rcmd socket socketpair) +AC_CHECK_FUNCS(getservbyname inet_ntoa) +AC_CHECK_FUNCS(getaddrinfo getnameinfo) +AC_CHECK_FUNCS(host2netname netname2host) +LIBS="$ac_save_LIBS" + +ac_save_LIBS="$LIBS" +AC_CHECK_LIB(c, res_init, lib_resolv="", + [AC_CHECK_LIB(resolv, res_init, lib_resolv="-lresolv")]) +LIBS="$ac_save_LIBS" +if test ."$lib_resolv" = .""; then + AC_DEFINE(HAVE_RESOLV_IN_LIBC) +fi + +dnl Check for largefile support +dnl Do this last to make sure that no large file definition +dnl in confdefs.h will modify our results +AC_SYS_LARGEFILE +dnl Warning do not run this test. it interferes with the test +dnl AC_CHECK_FUNCS(fseeko ftello) from above. +dnl The test AC_HAVE_LARGEFILES will check whether ftello/fseeko +dnl are available in Large File mode +dnl AC_FUNC_FSEEKO +AC_HAVE_LARGEFILES + +AC_DEFINE_UNQUOTED_STRING(HOST_ALIAS,$host_alias) +AC_DEFINE_UNQUOTED_STRING(HOST_SUB,$host) +AC_DEFINE_UNQUOTED_STRING(HOST_CPU,$host_cpu) +AC_DEFINE_UNQUOTED_STRING(HOST_VENDOR,$host_vendor) +AC_DEFINE_UNQUOTED_STRING(HOST_OS,$host_os) + +dnl AC_CHECK_LIB(crypt, crypt, lib_crypt="-lcrypt") + +AC_CHECK_LIB(c, crypt, lib_crypt="", + [AC_CHECK_LIB(crypt, crypt, lib_crypt="-lcrypt")]) +if test ."$lib_crypt" = .""; then + AC_DEFINE(HAVE_CRYPT_IN_LIBC) +fi + +ac_save_LIBS="$LIBS" +LIBS="$LIBS $lib_crypt" +AC_CHECK_FUNCS(crypt) +LIBS="$ac_save_LIBS" + +AC_CHECK_ILIB([#include ], c, gettext, lib_intl="", + [AC_CHECK_ILIB([#include ], intl, gettext, lib_intl="-lintl")]) +if test ."$lib_intl" = .""; then + AC_DEFINE(HAVE_GETTEXT_IN_LIBC) +fi + +ac_save_LIBS="$LIBS" +LIBS="$LIBS $lib_intl" +AC_CHECK_DFUNC([#include ], gettext) +LIBS="$ac_save_LIBS" + +AC_CHECK_ILIB([#include ], c, iconv_open, lib_iconv="", + [AC_CHECK_ILIB([#include ], iconv, iconv_open, lib_iconv="-liconv")]) +if test ."$lib_iconv" = .""; then + AC_DEFINE(HAVE_ICONV_IN_LIBC) +fi + +ac_save_LIBS="$LIBS" +LIBS="$LIBS $lib_iconv" +AC_CHECK_DFUNC([#include ], iconv) +AC_CHECK_DFUNC([#include ], iconv_open) +AC_CHECK_DFUNC([#include ], iconv_close) +dnl GNU libiconv on Linux and Cygwin may make "configure" fail :-( +AC_CHECK_DFUNC([#include ], libiconv) +AC_CHECK_DFUNC([#include ], libiconv_open) +AC_CHECK_DFUNC([#include ], libiconv_close) +LIBS="$ac_save_LIBS" + +AC_CHECK_LIB(c, XML_Parse, lib_expat="", + [AC_CHECK_LIB(expat, XML_Parse, lib_expat="-lexpat")]) +if test ."$lib_expat" = ."" -a "$ac_cv_lib_c_XML_Parse" = yes ; then + AC_DEFINE(HAVE_EXPAT_IN_LIBC) +fi +ac_save_LIBS="$LIBS" +LIBS="$LIBS $lib_expat" +AC_CHECK_FUNCS(XML_Parse) +LIBS="$ac_save_LIBS" + +if test "$CC" = cl.exe; then + echo configure does not yet support library checks for cl.exe: + echo checking for SCardEstablishContext in -lwinscard... we know it is present + lib_pcsc="-lwinscard" + AC_DEFINE(HAVE_SCARDESTABLISHCONTEXT) +else + AC_CHECK_LIB(c, SCardEstablishContext, lib_pcsc="", + [AC_CHECK_LIB(winscard, SCardEstablishContext, lib_pcsc="-lwinscard", + [AC_CHECK_LIB(pcsclite, SCardEstablishContext, lib_pcsc="-lpcsclite")])]) + if test ."$lib_pcsc" = ."" -a "$ac_cv_lib_c_SCardEstablishContext" = yes ; then + AC_DEFINE(HAVE_PCSC_IN_LIBC) + fi + ac_save_LIBS="$LIBS" + LIBS="$LIBS $lib_pcsc" + AC_CHECK_FUNCS(SCardEstablishContext) + LIBS="$ac_save_LIBS" +fi + +if test "$CC" = cl.exe; then + echo configure does not yet support library checks for cl.exe: + echo checking for CRYPTO_free in -llibeay32... we know it is present + echo checking for SSL_free in -lssleay32... we know it is present + lib_crypto="-llibeay32" + lib_ssl="-lssleay32" +else + AC_CHECK_LIB(c, CRYPTO_free, lib_crypto="", + [AC_CHECK_LIB(crypto, CRYPTO_free, lib_crypto="-lcrypto")]) + if test ."$lib_crypto" = ."" -a "$ac_cv_lib_c_CRYPTO_free" = yes ; then + AC_DEFINE(HAVE_CRYPTO_IN_LIBC) + fi + ac_save_LIBS="$LIBS" + LIBS="$LIBS $lib_crypto" + AC_CHECK_FUNCS(CRYPTO_free) + LIBS="$ac_save_LIBS" + AC_CHECK_LIB(c, SSL_free, lib_ssl="", + [AC_CHECK_LIB(ssl, SSL_free, lib_ssl="-lssl")]) + if test ."$lib_ssl" = ."" -a "$ac_cv_lib_c_SSL_free" = yes ; then + AC_DEFINE(HAVE_SSL_IN_LIBC) + fi + ac_save_LIBS="$LIBS" + LIBS="$LIBS $lib_ssl" + AC_CHECK_FUNCS(SSL_free) + LIBS="$ac_save_LIBS" +fi + +if test $ac_cv_header_camlib_h = yes; then + scsi_lib=-lcam + lib_scsi=-lcam +fi + +if test "$ac_cv_header_sys_acl_h" = yes; then + + AC_CHECKING(for Posix Access Control List support) + AC_CHECK_LIB(acl, acl_get_file, lib_acl="-lacl") + AC_CHECK_LIB(pacl, acl_get_file, lib_acl="-lpacl") + + dnl If $lib_acl is nonempty, save it in $lib_acl_test + + if test ".$lib_acl" != .; then + lib_acl_test="$lib_acl" + fi + + ac_save_LIBS="$LIBS" + LIBS="$LIBS $lib_acl" + AC_CHECK_FUNCS(acl_get_file acl_set_file acl_from_text acl_to_text acl_free acl_delete_def_file) + AC_CHECK_FUNCS(acl_extended_file) + AC_CHECK_FUNCS(acl_get_entry) + AC_CHECK_FUNCS(acl_to_text_np acl_get_brand_np acl_is_trivial_np acl_strip_np) + LIBS="$ac_save_LIBS" + + AC_CHECKING(for Solaris UFS Access Control List support) + AC_CHECK_LIB(sec, acltotext, lib_acl="-lsec") + ac_save_LIBS="$LIBS" + LIBS="$LIBS $lib_acl" + AC_CHECK_FUNCS(acl facl aclfromtext acltotext) + + AC_CHECKING(for NFSv4 Access Control List support) + dnl These functions support NFSv4 ACLs + dnl Do not check for acl_free because of a name clash with the withdrawn POSIX draft + AC_CHECK_FUNCS(acl_get acl_set facl_get facl_set acl_fromtext acl_totext) + LIBS="$ac_save_LIBS" + + dnl On Solaris, there is no need for lib_acl_test as acl(2) is in -libc + + AC_CHECKING(for HP-UX Access Control List support) + AC_CHECK_FUNCS(getacl fgetacl setacl fsetacl strtoacl acltostr cpacl fcpacl chownacl setaclentry fsetaclentry) + + dnl XXX lib_acl_test: How do we test for ACLs on HP-UX? + +fi + +if test "$ac_cv_header_attr_xattr_h" = yes; then + AC_CHECKING(for Linux flavor Extended Attribute support) + AC_CHECK_LIB(attr, getxattr, lib_attr="-lattr") + ac_save_LIBS="$LIBS" + LIBS="$LIBS $lib_attr" + AC_CHECK_FUNCS(getxattr setxattr listxattr lgetxattr lsetxattr llistxattr) + LIBS="$ac_save_LIBS" +fi + +AC_CHECKING(for RBAC support) +AC_CHECK_LIB(secdb, getuserattr, lib_secdb="-lsecdb") +ac_save_LIBS="$LIBS" +LIBS="$LIBS $lib_secdb" +AC_CHECK_FUNCS(getauthattr getuserattr getexecattr getprofattr) +LIBS="$ac_save_LIBS" + +AC_CHECKING(for gmatch() support) +AC_CHECK_LIB(gen, gmatch, lib_gen="-lgen") +ac_save_LIBS="$LIBS" +LIBS="$LIBS $lib_gen" +AC_CHECK_FUNCS(gmatch) +LIBS="$ac_save_LIBS" + +AC_CHECKING(for ELF support) +AC_CHECK_LIB(elf, elf_begin, lib_elf="-lelf") +ac_save_LIBS="$LIBS" +LIBS="$LIBS $lib_elf" +AC_CHECK_FUNCS(elf_begin) +LIBS="$ac_save_LIBS" + +AC_CHECK_FUNCS(thr_yield) + +dnl AC_CHECK_LIB(c, sem_post, lib_sem="", +dnl [AC_CHECK_LIB(pthread, sem_post, lib_sem="-lpthread")]) +dnl ac_save_LIBS="$LIBS" +dnl LIBS="$LIBS $lib_sem" +dnl AC_CHECK_FUNCS(sem_post) +dnl LIBS="$ac_save_LIBS" + +AC_CHECK_LIB(c, pthread_create, lib_pthread="", + [AC_CHECK_LIB(pthread, pthread_create, lib_pthread="-lpthread")]) + +ac_save_LIBS="$LIBS" +LIBS="$LIBS $lib_pthread" +AC_CHECK_FUNCS(pthread_create pthread_kill) +AC_CHECK_FUNCS(pthread_mutex_lock pthread_cond_wait pthread_spin_lock) +LIBS="$ac_save_LIBS" + +AC_CHECK_LIB(c, clock_gettime, lib_rt="", + [AC_CHECK_LIB(rt, clock_gettime, lib_rt="-lrt", + [AC_CHECK_LIB(posix4, clock_gettime, lib_rt="-lposix4")])]) +if test ."$lib_rt" = .""; then + AC_DEFINE(HAVE_CLOCK_GETTIME_IN_LIBC) +fi + +ac_save_LIBS="$LIBS" +LIBS="$LIBS $lib_rt" +AC_CHECK_FUNCS(clock_gettime clock_settime clock_getres) +AC_CHECK_FUNCS(sched_getparam sched_setparam sched_getscheduler sched_setscheduler) +AC_CHECK_FUNCS(sched_yield) +AC_CHECK_FUNCS(nanosleep) +LIBS="$ac_save_LIBS" + +AC_CHECK_LIB(cap, cap_get_proc, lib_cap="-lcap") +ac_save_LIBS="$LIBS" +LIBS="$LIBS $lib_cap" +AC_CHECK_FUNCS(cap_get_proc cap_set_proc cap_set_flag cap_clear_flag) +LIBS="$ac_save_LIBS" + +dnl Misc OS checks. +dnl +dnl WARNING: AC_CHECK_FILES uses "test -r file" and bash on Haiku returns wrong results +dnl for /dev/stdin /dev/stdout /dev/stderr /dev/fd/0 /dev/fd/1 /dev/fd/2 +dnl For this reason, we rather use AC_STAT_FILES +dnl AC_CHECK_FILES(/dev/tty /dev/null /dev/zero) +dnl AC_CHECK_FILES(/dev/stdin /dev/stdout /dev/stderr) +dnl AC_CHECK_FILES(/dev/fd/0 /dev/fd/1 /dev/fd/2) +dnl AC_CHECK_FILES(/usr/src/linux/include) + +AC_STAT_FILES(/dev/tty /dev/null /dev/zero) +AC_STAT_FILES(/dev/stdin /dev/stdout /dev/stderr) +AC_STAT_FILES(/dev/fd/0 /dev/fd/1 /dev/fd/2) +AC_STAT_FILES(/usr/src/linux/include /usr/xpg4/bin/sh /opt/schily/xpg4/bin/sh) + +dnl Checks for OS madness. +UNAME=`uname || true` + +if test ."$UNAME" = .Linux; then + +dnl Linux madness tests: + +AC_BROKEN_LINUX_EXT2_FS_H +AC_BROKEN_SRC_LINUX_EXT2_FS_H +if test .$ac_cv_broken_linux_ext2_fs_h = .no -o .$ac_cv_broken_src_linux_ext2_fs_h = .no; then + # + # If either /usr/include/linux/ex2_fs.h works or + # /usr/src/linux/include/linux/ex2_fs.h works, we will + # #define HAVE_USABLE_LINUX_EXT2_FS_H + # + # If HAVE_USABLE_LINUX_EXT2_FS_H is defined, a simple + # #include will work. + # + ac_cv_usable_linux_ext2_fs_h=yes + AC_DEFINE(HAVE_USABLE_LINUX_EXT2_FS_H) +else + ac_cv_usable_linux_ext2_fs_h=no +fi +AC_BROKEN_SCSI_SCSI_H +AC_BROKEN_SRC_SCSI_SCSI_H +AC_BROKEN_SCSI_SG_H +AC_BROKEN_SRC_SCSI_SG_H + +if test .$ac_cv_broken_src_scsi_scsi_h = .yes; then + may_linux_src_include=no +fi +if test .$ac_cv_broken_src_linux_ext2_fs_h = .yes; then + may_linux_src_include=no +fi +if test .$ac_cv_file__usr_src_linux_include = .yes; then # only warn if there is /usr/src/linux/include +if test .$may_linux_src_include = .no; then + echo + echo "Warning: *** /usr/src/linux/include contains broken include files ***" + echo "Warning: *** /usr/src/linux/include is not used this reason ***" + echo "Warning: This may result in the inability to use recent Linux kernel interfaces" + echo +fi +fi +if test .$ac_cv_header_ext2fs_ext2_fs_h = .no; then # only if there is no +if test .$ac_cv_usable_linux_ext2_fs_h = .no; then + echo + echo "Warning: *** linux/ext2_fs.h is not usable at all ***" + echo "Warning: *** This makes it impossible to support Linux file flags ***" + echo "You may try to compile using 'make COPTX=-DTRY_EXT2_FS'" + echo + sleep 10 +fi +fi # was missing +fi # Linux only tests + +AC_SUBST(may_linux_src_include) + +AC_SUBST(largefile_cc_opt) +AC_SUBST(sun_cc64_opt) +AC_SUBST(hp_cc_ansi_opt) +AC_SUBST(hp_cc_opt_opt) +AC_SUBST(hp_cc_gprof_opt) + +AC_SUBST(lib_crypt) +AC_SUBST(lib_resolv) +AC_SUBST(lib_intl) +AC_SUBST(lib_iconv) +AC_SUBST(lib_expat) +AC_SUBST(lib_pcsc) +AC_SUBST(lib_crypto) +AC_SUBST(lib_ssl) +AC_SUBST(lib_nsl) +AC_SUBST(scsi_lib) +AC_SUBST(lib_scsi) +AC_SUBST(lib_acl) +AC_SUBST(lib_acl_test) +AC_SUBST(lib_attr) +AC_SUBST(lib_secdb) +AC_SUBST(lib_gen) +AC_SUBST(lib_elf) +AC_SUBST(lib_pthread) +AC_SUBST(lib_rt) +AC_SUBST(lib_dl) +AC_SUBST(lib_dir) +AC_SUBST(lib_cap) + +AC_OUTPUT(rules.cnf) diff -Nru cdrtools-2.01.01a33/autoconf/install-sh cdrtools-3.02a09/autoconf/install-sh --- cdrtools-2.01.01a33/autoconf/install-sh 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/autoconf/install-sh 1996-11-20 21:28:55.000000000 +0000 @@ -0,0 +1,250 @@ +#! /bin/sh +# +# install - install a program, script, or datafile +# This comes from X11R5 (mit/util/scripts/install.sh). +# +# Copyright 1991 by the Massachusetts Institute of Technology +# +# Permission to use, copy, modify, distribute, and sell this software and its +# documentation for any purpose is hereby granted without fee, provided that +# the above copyright notice appear in all copies and that both that +# copyright notice and this permission notice appear in supporting +# documentation, and that the name of M.I.T. not be used in advertising or +# publicity pertaining to distribution of the software without specific, +# written prior permission. M.I.T. makes no representations about the +# suitability of this software for any purpose. It is provided "as is" +# without express or implied warranty. +# +# Calling this script install-sh is preferred over install.sh, to prevent +# `make' implicit rules from creating a file called install from it +# when there is no Makefile. +# +# This script is compatible with the BSD install script, but was written +# from scratch. It can only install one file at a time, a restriction +# shared with many OS's install programs. + + +# set DOITPROG to echo to test this script + +# Don't use :- since 4.3BSD and earlier shells don't like it. +doit="${DOITPROG-}" + + +# put in absolute paths if you don't have them in your path; or use env. vars. + +mvprog="${MVPROG-mv}" +cpprog="${CPPROG-cp}" +chmodprog="${CHMODPROG-chmod}" +chownprog="${CHOWNPROG-chown}" +chgrpprog="${CHGRPPROG-chgrp}" +stripprog="${STRIPPROG-strip}" +rmprog="${RMPROG-rm}" +mkdirprog="${MKDIRPROG-mkdir}" + +transformbasename="" +transform_arg="" +instcmd="$mvprog" +chmodcmd="$chmodprog 0755" +chowncmd="" +chgrpcmd="" +stripcmd="" +rmcmd="$rmprog -f" +mvcmd="$mvprog" +src="" +dst="" +dir_arg="" + +while [ x"$1" != x ]; do + case $1 in + -c) instcmd="$cpprog" + shift + continue;; + + -d) dir_arg=true + shift + continue;; + + -m) chmodcmd="$chmodprog $2" + shift + shift + continue;; + + -o) chowncmd="$chownprog $2" + shift + shift + continue;; + + -g) chgrpcmd="$chgrpprog $2" + shift + shift + continue;; + + -s) stripcmd="$stripprog" + shift + continue;; + + -t=*) transformarg=`echo $1 | sed 's/-t=//'` + shift + continue;; + + -b=*) transformbasename=`echo $1 | sed 's/-b=//'` + shift + continue;; + + *) if [ x"$src" = x ] + then + src=$1 + else + # this colon is to work around a 386BSD /bin/sh bug + : + dst=$1 + fi + shift + continue;; + esac +done + +if [ x"$src" = x ] +then + echo "install: no input file specified" + exit 1 +else + true +fi + +if [ x"$dir_arg" != x ]; then + dst=$src + src="" + + if [ -d $dst ]; then + instcmd=: + else + instcmd=mkdir + fi +else + +# Waiting for this to be detected by the "$instcmd $src $dsttmp" command +# might cause directories to be created, which would be especially bad +# if $src (and thus $dsttmp) contains '*'. + + if [ -f $src -o -d $src ] + then + true + else + echo "install: $src does not exist" + exit 1 + fi + + if [ x"$dst" = x ] + then + echo "install: no destination specified" + exit 1 + else + true + fi + +# If destination is a directory, append the input filename; if your system +# does not like double slashes in filenames, you may need to add some logic + + if [ -d $dst ] + then + dst="$dst"/`basename $src` + else + true + fi +fi + +## this sed command emulates the dirname command +dstdir=`echo $dst | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'` + +# Make sure that the destination directory exists. +# this part is taken from Noah Friedman's mkinstalldirs script + +# Skip lots of stat calls in the usual case. +if [ ! -d "$dstdir" ]; then +defaultIFS=' +' +IFS="${IFS-${defaultIFS}}" + +oIFS="${IFS}" +# Some sh's can't handle IFS=/ for some reason. +IFS='%' +set - `echo ${dstdir} | sed -e 's@/@%@g' -e 's@^%@/@'` +IFS="${oIFS}" + +pathcomp='' + +while [ $# -ne 0 ] ; do + pathcomp="${pathcomp}${1}" + shift + + if [ ! -d "${pathcomp}" ] ; + then + $mkdirprog "${pathcomp}" + else + true + fi + + pathcomp="${pathcomp}/" +done +fi + +if [ x"$dir_arg" != x ] +then + $doit $instcmd $dst && + + if [ x"$chowncmd" != x ]; then $doit $chowncmd $dst; else true ; fi && + if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dst; else true ; fi && + if [ x"$stripcmd" != x ]; then $doit $stripcmd $dst; else true ; fi && + if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dst; else true ; fi +else + +# If we're going to rename the final executable, determine the name now. + + if [ x"$transformarg" = x ] + then + dstfile=`basename $dst` + else + dstfile=`basename $dst $transformbasename | + sed $transformarg`$transformbasename + fi + +# don't allow the sed command to completely eliminate the filename + + if [ x"$dstfile" = x ] + then + dstfile=`basename $dst` + else + true + fi + +# Make a temp file name in the proper directory. + + dsttmp=$dstdir/#inst.$$# + +# Move or copy the file name to the temp name + + $doit $instcmd $src $dsttmp && + + trap "rm -f ${dsttmp}" 0 && + +# and set any options; do chmod last to preserve setuid bits + +# If any of these fail, we abort the whole thing. If we want to +# ignore errors from any of these, just make sure not to ignore +# errors from the above "$doit $instcmd $src $dsttmp" command. + + if [ x"$chowncmd" != x ]; then $doit $chowncmd $dsttmp; else true;fi && + if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dsttmp; else true;fi && + if [ x"$stripcmd" != x ]; then $doit $stripcmd $dsttmp; else true;fi && + if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dsttmp; else true;fi && + +# Now rename the file to the real destination. + + $doit $rmcmd -f $dstdir/$dstfile && + $doit $mvcmd $dsttmp $dstdir/$dstfile + +fi && + + +exit 0 diff -Nru cdrtools-2.01.01a33/autoconf/rules.cnf.in cdrtools-3.02a09/autoconf/rules.cnf.in --- cdrtools-2.01.01a33/autoconf/rules.cnf.in 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/autoconf/rules.cnf.in 2017-04-27 19:31:22.000000000 +0000 @@ -0,0 +1,43 @@ +# @(#)rules.cnf.in 1.32 17/04/27 Copyright 1998-2014 J. Schilling + +EXEEXT= @EXEEXT@ +XEXEEXT= @XEXEEXT@ +OBJEXT= @OBJEXT@ + +YACC= @YACC@ +BISON= @BISON@ +TSORT_PROG= @TSORT@ +LORDER_PROG= @LORDER@ +CPP= @CPP@ +CPPX= @CPPX@ + +LARGEFILE_CC_OPT= @largefile_cc_opt@ +SUN_CC64_OPT= @sun_cc64_opt@ # Used on e.g. Solaris and Linux +HP_CC_ANSI_OPT= @hp_cc_ansi_opt@ # Used on HP-UX +HP_CC_OPT_OPT= @hp_cc_opt_opt@ # Used on HP-UX +HP_CC_GPROF_OPT= @hp_cc_gprof_opt@ # Used on HP-UX + +MAY_LINUX_SRC_INCLUDE= @may_linux_src_include@ + +SCSILIB= @scsi_lib@ +LIB_SCSI= @lib_scsi@ +LIB_RESOLV= @lib_resolv@ +LIB_CRYPT= @lib_crypt@ +LIB_INTL= @lib_intl@ +LIB_ICONV= @lib_iconv@ +LIB_EXPAT= @lib_expat@ +LIB_PCSC= @lib_pcsc@ +LIB_CRYPTO= @lib_crypto@ +LIB_SSL= @lib_ssl@ +LIB_NSL= @lib_nsl@ # For gethostbyname() users +LIB_ACL= @lib_acl@ # Full (test/set) ACL users like star +LIB_ACL_TEST= @lib_acl_test@ # Test only ACL users like libfind +LIB_ATTR = @lib_attr@ +LIB_SECDB = @lib_secdb@ +LIB_GEN = @lib_gen@ +LIB_ELF= @lib_elf@ +LIB_PTHREAD = @lib_pthread@ +LIB_RT = @lib_rt@ +LIB_DL= @lib_dl@ +LIB_DIR= @lib_dir@ +LIB_CAP= @lib_cap@ diff -Nru cdrtools-2.01.01a33/autoconf/xconfig.h.in cdrtools-3.02a09/autoconf/xconfig.h.in --- cdrtools-2.01.01a33/autoconf/xconfig.h.in 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/autoconf/xconfig.h.in 2017-08-05 17:31:13.000000000 +0000 @@ -0,0 +1,1180 @@ +/* @(#)xconfig.h.in 1.271 17/08/05 Copyright 1998-2017 J. Schilling */ +/* + * Dynamic autoconf C-include code. + * Do not edit, this file has been created automatically. + * + * Copyright (c) 1998-2017 J. Schilling + * + * The layout for this file is controlled by "configure". + * Switch off cstyle(1) checks for now. + */ +#ifndef __XCONFIG_H +#define __XCONFIG_H +/* BEGIN CSTYLED */ + +/* + * Header Files + */ +#undef PROTOTYPES /* if Compiler supports ANSI C prototypes */ +#undef HAVE_INLINE /* if Compiler supports "inline" keyword */ +#undef HAVE_AR_H /* to use ar.h */ +#undef HAVE_ASSERT_H /* to use assert.h */ +#undef HAVE_STDIO_H /* to use stdio.h */ +#undef HAVE_STDARG_H /* to use stdarg.h, else use varargs.h NOTE: SaberC on a Sun has prototypes but no stdarg.h */ +#undef HAVE_VARARGS_H /* to use use varargs.h NOTE: The free HP-UX C-compiler has stdarg.h but no PROTOTYPES */ +#undef HAVE_STDLIB_H /* to use general utility defines (malloc(), size_t ...) and general C library prototypes */ +#undef HAVE_STDDEF_H /* to use offsetof(), ptrdiff_t, wchar_t, size_t */ +#undef HAVE_STRING_H /* to get NULL and ANSI C string function prototypes */ +#undef HAVE_STRINGS_H /* to get BSD string function prototypes */ +#undef STDC_HEADERS /* if ANSI compliant stdlib.h, stdarg.h, string.h, float.h are present */ +#undef HAVE_UNISTD_H /* to get POSIX syscall prototypes XXX sys/file.h fcntl.h (unixstd/fctl)XXX*/ +#undef HAVE_GETOPT_H /* to get getopt() prototype from getopt.h instead of unistd.h */ +#undef HAVE_LIMITS_H /* to get POSIX numeric limits constants */ +#undef HAVE_A_OUT_H /* if a.out.h is present (may be a system using a.out format) */ +#undef HAVE_AOUTHDR_H /* if aouthdr.h is present. This is a COFF system */ +#undef HAVE_ELF_H /* if elf.h is present. This is an ELF system */ +#undef HAVE_FCNTL_H /* to access, O_XXX constants for open(), otherwise use sys/file.h */ +#undef HAVE_IO_H /* to access setmode()... from WIN-DOS, OS/2 and similar */ +#undef HAVE_CONIO_H /* to access getch()... from WIN-DOS, OS/2 and similar */ +#undef HAVE_SYS_FILE_H /* to use O_XXX constants for open() and flock() defs */ +#undef HAVE_INTTYPES_H /* to use UNIX-98 inttypes.h */ +#undef HAVE_STDINT_H /* to use SUSv3 stdint.h */ +#undef HAVE_DIRENT_H /* to use POSIX dirent.h */ +#undef HAVE_SYS_DIR_H /* to use BSD sys/dir.h */ +#undef HAVE_NDIR_H /* to use ndir.h */ +#undef HAVE_SYS_NDIR_H /* to use sys/ndir.h */ +#undef HAVE_ALLOCA_H /* if alloca.h exists */ +#undef HAVE_MALLOC_H /* if malloc.h exists */ +#undef HAVE_POSIX_MALLOC_H /* The Haiku include file for malloc()/valloc()/... */ +#undef HAVE_SGTTY_H /* if sgtty.h exists */ +#undef HAVE_TERMIOS_H /* to use POSIX termios.h */ +#undef HAVE_TERMIO_H /* to use SVR4 termio.h */ +#undef HAVE_PWD_H /* if pwd.h exists */ +#undef HAVE_GRP_H /* if grp.h exists */ +#undef HAVE_SIGNAL_H /* if signal.h exists */ +#undef HAVE_SIGINFO_H /* if siginfo.h exists */ +#undef HAVE_SYS_SIGINFO_H /* if sys/siginfo.h exists */ +#undef HAVE_UCONTEXT_H /* if ucontext.h exists */ +#undef HAVE_SYS_ACL_H /* to use for ACL definitions */ +#undef HAVE_ACLUTILS_H /* to use for NFSv4 ACL extensions */ +#undef HAVE_ACLLIB_H /* if HP-UX is present */ +#undef HAVE_ACL_LIBACL_H /* if Linux is present */ +#undef HAVE_SHADOW_H /* if shadow.h exists */ +#undef HAVE_SYSLOG_H /* if syslog.h exists */ +#undef HAVE_SYS_TIME_H /* may include sys/time.h for struct timeval */ +#undef TIME_WITH_SYS_TIME /* may include both time.h and sys/time.h */ +#undef HAVE_TIMES /* to use times() and sys/times.h */ +#undef HAVE_SYS_TIMES_H /* may include sys/times.h for struct tms */ +#undef HAVE_UTIME /* to use AT&T utime() and utimbuf */ +#undef HAVE_UTIMES /* to use BSD utimes() and sys/time.h */ +#undef HAVE_FUTIMES /* to use BSD futimes() and sys/time.h */ +#undef HAVE_LUTIMES /* to use BSD lutimes() and sys/time.h */ +#undef HAVE_UTIMENS /* to use BSD utimens() and sys/time.h */ +#undef HAVE_FUTIMENS /* to use BSD futimens() and sys/time.h */ +#undef HAVE_LUTIMENS /* to use BSD lutimens() and sys/time.h */ +#undef HAVE_UTIME_H /* to use utime.h for the utimbuf structure declaration, else declare struct utimbuf yourself */ +#undef HAVE_SYS_UTIME_H /* to use sys/utime.h if utime.h does not exist */ +#undef HAVE_SYS_IOCTL_H /* if sys/ioctl.h is present */ +#undef HAVE_SYS_FILIO_H /* if sys/filio.h is present */ +#undef HAVE_SYS_PARAM_H /* if sys/param.h is present */ +#undef HAVE_MACH_MACHINE_H /* if mach/machine.h is present */ +#undef HAVE_MNTENT_H /* if mntent.h is present */ +#undef HAVE_SYS_MNTENT_H /* if sys/mntent.h is present */ +#undef HAVE_SYS_MNTTAB_H /* if sys/mnttab.h is present */ +#undef HAVE_SYS_MOUNT_H /* if sys/mount.h is present */ +#undef HAVE_WAIT_H /* to use wait.h for prototypes and union wait */ +#undef HAVE_SYS_WAIT_H /* else use sys/wait.h */ +#undef HAVE_ULIMIT_H /* to use ulimit() as fallback for getrlimit() */ +#undef HAVE_PROCESS_H /* to use process.h for spawn*() and cwait() */ +#undef HAVE_SYS_RESOURCE_H /* to use sys/resource.h for rlimit() and wait3() */ +#undef HAVE_PROCFS_H /* to use procfs.h instead of sys/procfs.h (Solaris forces profcs-2) */ +#undef HAVE_SYS_PROCFS_H /* to use sys/procfs.h for wait3() emulation */ +#undef HAVE_LIBPROC_H /* to use libproc.h (Mac OS X) */ +#undef HAVE_SYS_SYSTEMINFO_H /* to use SVr4 sysinfo() */ +#undef HAVE_SYS_SYSCTL_H /* to use BSD sysctl() */ +#undef HAVE_SYS_UTSNAME_H /* to use uname() */ +#undef HAVE_SYS_PRIOCNTL_H /* to use SVr4 priocntl() instead of nice()/setpriority() */ +#undef HAVE_SYS_RTPRIOCNTL_H /* if the system supports SVr4 real time classes */ +#undef HAVE_SYS_PROCSET_H /* if the system supports SVr4 process sets */ +#undef HAVE_SYS_LOADAVG_H /* to use getloadavg() */ +#undef HAVE_SYS_SYSCALL_H /* to use syscall() */ +#undef HAVE_SYS_MTIO_H /* to use mtio definitions from sys/mtio.h */ +#undef HAVE_SYS_TAPE_H /* to use mtio definitions from AIX sys/tape.h */ +#undef HAVE_SYS_MMAN_H /* to use definitions for mmap()/madvise()... from sys/mman.h */ +#undef HAVE_SYS_SHM_H /* to use definitions for shmget() ... from sys/shm.h */ +#undef HAVE_SYS_SEM_H /* to use definitions for semget() ... from sys/sem.h */ +#undef HAVE_SYS_IPC_H /* to use definitions for ftok() ... from sys/ipc.h */ +#undef HAVE_SEMAPHORE_H /* to use definitions for sema_init() ... from semaphore.h */ +#undef MAJOR_IN_MKDEV /* if we should include sys/mkdev.h to get major()/minor()/makedev() */ +#undef MAJOR_IN_SYSMACROS /* if we should include sys/sysmacros.h to get major()/minor()/makedev() */ +#undef HAVE_SYS_DKIO_H /* if we may include sys/dkio.h for disk ioctls */ +#undef HAVE_SYS_DKLABEL_H /* if we may include sys/dklabel.h for disk label */ +#undef HAVE_SUN_DKIO_H /* if we may include sun/dkio.h for disk ioctls */ +#undef HAVE_SUN_DKLABEL_H /* if we may include sun/dklabel.h for disk label */ +#undef HAVE_SYS_TYPES_H /* if we may include sys/types.h (the standard) */ +#undef HAVE_SYS_STYPES_H /* if we may include sys/stypes.h (JOS) */ +#undef HAVE_SYS_FILEDESC_H /* if we may include sys/filedesc.h (JOS) */ +#undef HAVE_SYS_STAT_H /* if we may include sys/stat.h (the standard) */ +#undef HAVE_SYS_ACCT_H /* if we may include sys/acct.h */ +#undef HAVE_TYPES_H /* if we may include types.h (rare cases e.g. ATARI TOS) */ +#undef HAVE_STAT_H /* if we may include stat.h (rare cases e.g. ATARI TOS) */ +#undef HAVE_POLL_H /* if we may include poll.h to use poll() */ +#undef HAVE_SYS_POLL_H /* if we may include sys/poll.h to use poll() */ +#undef HAVE_SYS_SELECT_H /* if we may have sys/select.h nonstandard use for select() on some systems*/ +#undef NEED_SYS_SELECT_H /* if we need sys/select.h to use select() (this is nonstandard) */ +#undef HAVE_NETDB_H /* if we have netdb.h for get*by*() and rcmd() */ +#undef HAVE_ARPA_AIXRCMDS_H /* if we have arpa/aixrcmds.h for get*by*() and rcmd() */ +#undef HAVE_SYS_SOCKET_H /* if we have sys/socket.h for socket() */ +#undef NEED_SYS_SOCKET_H /* if we need sys/socket.h to use select() (this is nonstandard) */ +#undef HAVE_NETINET_IN_H /* if we have netinet/in.h */ +#undef HAVE_STROPTS_H /* if we have stropts.h */ +#undef HAVE_LINUX_PG_H /* if we may include linux/pg.h for PP ATAPI sypport */ +#undef HAVE_CAMLIB_H /* if we may include camlib.h for CAM SCSI transport definitions */ +#undef HAVE_IEEEFP_H /* if we may include ieeefp.h for finite()/isnand() */ +#undef HAVE_FP_H /* if we may include fp.h for FINITE()/IS_INF()/IS_NAN() */ +#undef HAVE_VALUES_H /* if we may include values.h for MAXFLOAT */ +#undef HAVE_FLOAT_H /* if we may include float.h for FLT_MAX */ +#undef HAVE_MATH_H /* if we may include math.h for e.g. isinf()/isnan() */ +#undef HAVE__FILBUF /* if we have _filbuf() for USG derived STDIO */ +#undef HAVE___FILBUF /* if we have __filbuf() for USG derived STDIO */ +#undef HAVE_USG_STDIO /* if we have USG derived STDIO */ +#undef HAVE_ERRNO_DEF /* if we have errno definition in */ +#undef HAVE_ENVIRON_DEF /* if we have environ definition in */ +#undef HAVE_SYS_SIGLIST_DEF /* if we have sys_siglist definition in */ +#undef HAVE_SYS_FORK_H /* if we should include sys/fork.h for forkx() definitions */ +#undef HAVE_VFORK_H /* if we should include vfork.h for vfork() definitions */ +#undef HAVE_ARPA_INET_H /* if we have arpa/inet.h (missing on BeOS) */ + /* BeOS has inet_ntoa() in */ +#undef HAVE_RPC_RPC_H /* if we may include rpc/rpc.h */ +#undef HAVE_BSD_DEV_SCSIREG_H /* if we have a NeXT Step compatible sg driver */ +#undef HAVE_SCSI_SCSI_H /* if we may include scsi/scsi.h */ +#undef HAVE_SCSI_SG_H /* if we may include scsi/sg.h */ +#undef HAVE_LINUX_SCSI_H /* if we may include linux/scsi.h */ +#undef HAVE_LINUX_SG_H /* if we may include linux/sg.h */ +#undef HAVE_LINUX_TYPES_H /* if we may include linux/types.h */ +#undef HAVE_LINUX_GFP_H /* if we may include linux/gfp.h */ +#undef HAVE_ASM_TYPES_H /* if we may include asm/types.h */ +#undef HAVE_SYS_CAPABILITY_H /* if we may include sys/capability.h */ +#undef HAVE_SYS_BSDTTY_H /* if we have sys/bsdtty.h on HP-UX for TIOCGPGRP */ +#undef HAVE_OS_H /* if we have the BeOS kernel definitions in OS.h */ +#undef HAVE_OS2_H /* if we have the OS/2 definitions in os2.h */ +#undef HAVE_OS2ME_H /* if we have the OS/2 definitions in os2me.h */ +#undef HAVE_WINDOWS_H /* if we have the MS-Win definitions in windows.h */ +#undef HAVE_EXT2FS_EXT2_FS_H /* if we have the Linux moving target ext2fs/ext2_fs.h */ +#undef HAVE_ATTR_XATTR_H /* if we have the Linux Extended File Attr definitions in attr/xattr.h */ +#undef HAVE_CRT_EXTERNS_H /* if we have the Mac OS X env definitions in crt_externs.h */ +#undef HAVE_FNMATCH_H /* if we may include fnmatch.h */ +#undef HAVE_DIRECT_H /* if we may include direct.h (MSVC for getcwd()/chdir()/mkdir()/rmdir()) */ +#undef HAVE_SYSEXITS_H /* if we may include sysexits.h */ + +#undef HAVE_LIBINTL_H /* if we may include libintl.h */ +#undef HAVE_LOCALE_H /* if we may include locale.h */ +#undef HAVE_LANGINFO_H /* if we may include langinfo.h */ +#undef HAVE_NL_TYPES_H /* if we may include nl_types.h */ +#undef HAVE_CTYPE_H /* if we may include ctype.h */ +#undef HAVE_WCTYPE_H /* if we may include wctype.h */ +#undef HAVE_WCHAR_H /* if we may include wchar.h */ +#undef HAVE_ICONV_H /* if we may include iconv.h */ + +#undef HAVE_PRIV_H /* if we may include priv.h */ +#undef HAVE_SYS_PRIV_H /* if we may include sys/priv.h */ +#undef HAVE_EXEC_ATTR_H /* if we may include exec_attr.h */ +#undef HAVE_SECDB_H /* if we may include secdb.h */ +#undef HAVE_PTHREAD_H /* if we may include pthread.h */ +#undef HAVE_THREAD_H /* if we may include thread.h */ + +#undef HAVE_LIBGEN_H /* if we may include libgen.h */ +#undef HAVE_REGEX_H /* if we may include regex.h */ +#undef HAVE_REGEXP_H /* if we may include regexp.h */ +#undef HAVE_REGEXPR_H /* if we may include regexpr.h */ + +#undef HAVE_DLFCN_H /* if we may include dlfcn.h */ +#undef HAVE_LINK_H /* if we may include link.h */ +#undef HAVE_DL_H /* if we may include dl.h */ +#undef HAVE_LIBELF_H /* if we may include libelf.h */ + +#undef HAVE_RANLIB_H /* if we may include ranlib.h */ + +#undef HAVE_EXPAT_H /* if we may include expat.h */ + +/* + * Convert to SCHILY name + */ +#ifdef STDC_HEADERS +# ifndef HAVE_STDC_HEADERS +# define HAVE_STDC_HEADERS +# endif +#endif + +#ifdef HAVE_ELF_H +#define HAVE_ELF /* This system uses ELF */ +#else +# ifdef HAVE_AOUTHDR_H +# define HAVE_COFF /* This system uses COFF */ +# else +# ifdef HAVE_A_OUT_H +# define HAVE_AOUT /* This system uses AOUT */ +# endif +# endif +#endif + +/* + * Function declarations + */ +#undef HAVE_DECL_STAT /* Whether defines extern stat(); */ +#undef HAVE_DECL_LSTAT /* Whether defines extern lstat(); */ + +/* + * Library Functions + */ +#undef HAVE_ACCESS /* access() is present in libc */ +#undef HAVE_EACCESS /* eaccess() is present in libc */ +#undef HAVE_EUIDACCESS /* euidaccess() is present in libc */ +#undef HAVE_ACCESS_E_OK /* access() implements E_OK (010) for effective UIDs */ +#undef HAVE_CRYPT_IN_LIBC /* whether crypt() is in libc (needs no -lcrypt) */ +#undef HAVE_CRYPT /* crypt() is present in libc or libcrypt */ +#undef HAVE_STRERROR /* strerror() is present in libc */ +#undef HAVE_MEMCHR /* memchr() is present in libc */ +#undef HAVE_MEMCMP /* memcmp() is present in libc */ +#undef HAVE_MEMCPY /* memcpy() is present in libc */ +#undef HAVE_MEMCCPY /* memccpy() is present in libc */ +#undef HAVE_MEMMOVE /* memmove() is present in libc */ +#undef HAVE_MEMSET /* memset() is present in libc */ +#undef HAVE_MADVISE /* madvise() is present in libc */ +#undef HAVE_MLOCK /* mlock() is present in libc */ +#undef HAVE_MLOCKALL /* working mlockall() is present in libc */ +#undef HAVE_MMAP /* working mmap() is present in libc */ +#undef _MMAP_WITH_SIZEP /* mmap() needs address of size parameter */ +#undef HAVE_FLOCK /* *BSD flock() is present in libc */ +#undef HAVE_LOCKF /* lockf() is present in libc (XOPEN) */ +#undef HAVE_FCNTL_LOCKF /* file locking via fcntl() is present in libc */ +#undef HAVE_FCHDIR /* fchdir() is present in libc */ +#undef HAVE_FDOPENDIR /* fdopendir() is present in libc */ +#undef HAVE_GETDELIM /* getdelim() is present in libc */ +#undef HAVE_OPENAT /* openat() is present in libc */ +#undef HAVE_ATTROPEN /* attropen() is present in libc */ +#undef HAVE_FSTATAT /* fstatat() is present in libc */ +#undef HAVE_FCHOWNAT /* fchownat() is present in libc */ +#undef HAVE_FUTIMESAT /* futimesat() is present in libc */ +#undef HAVE_RENAMEAT /* renameat() is present in libc */ +#undef HAVE_UNLINKAT /* unlinkat() is present in libc */ +#undef HAVE___ACCESSAT /* __accessat() is present in libc */ +#undef HAVE_ACCESSAT /* accessat() is present in libc */ +#undef HAVE_REALPATH /* realpath() is present in libc */ +#undef HAVE_RESOLVEPATH /* resolvepath() is present in libc */ +/* + * See e.g. http://www.die.net/doc/linux/man/man2/mkdirat.2.html + */ +#undef HAVE_MKDIRAT /* mkdirat() is present in libc */ +#undef HAVE_FACCESSAT /* faccessat() is present in libc */ +#undef HAVE_FCHMODAT /* fchmodat() is present in libc */ +#undef HAVE_LINKAT /* inkat() is present in libc */ +#undef HAVE_MKFIFOAT /* mkfifoat() is present in libc */ +#undef HAVE_MKNODAT /* mknodat() is present in libc */ +#undef HAVE_READLINKAT /* readlinkat() is present in libc */ +#undef HAVE_SYMLINKAT /* symlinkat() is present in libc */ +#undef HAVE_UTIMENSAT /* utimensat() is present in libc */ +#undef HAVE_IOCTL /* ioctl() is present in libc */ +#undef HAVE_FCNTL /* fcntl() is present in libc */ +#undef HAVE_PIPE /* pipe() is present in libc */ +#undef HAVE__PIPE /* _pipe() is present in libc */ +#undef HAVE_POPEN /* popen() is present in libc */ +#undef HAVE_PCLOSE /* pclose() is present in libc */ +#undef HAVE__POPEN /* _popen() is present in libc */ +#undef HAVE__PCLOSE /* _pclose() is present in libc */ +#undef HAVE_CLOSEFROM /* closefrom() is present in libc */ +#undef HAVE_STATVFS /* statvfs() is present in libc */ +#undef HAVE_QUOTACTL /* quotactl() is present in libc */ +#undef HAVE_QUOTAIOCTL /* use ioctl(f, Q_QUOTACTL, &q) instead of quotactl() */ +#undef HAVE_GETPID /* getpid() is present in libc */ +#undef HAVE_GETPPID /* getppid() is present in libc */ +#undef HAVE_SETREUID /* setreuid() is present in libc */ +#undef HAVE_SETRESUID /* setresuid() is present in libc */ +#undef HAVE_SETEUID /* seteuid() is present in libc */ +#undef HAVE_SETUID /* setuid() is present in libc */ +#undef HAVE_SETREGID /* setregid() is present in libc */ +#undef HAVE_SETRESGID /* setresgid() is present in libc */ +#undef HAVE_SETEGID /* setegid() is present in libc */ +#undef HAVE_SETGID /* setgid() is present in libc */ +#undef HAVE_GETUID /* getuid() is present in libc */ +#undef HAVE_GETEUID /* geteuid() is present in libc */ +#undef HAVE_GETGID /* getgid() is present in libc */ +#undef HAVE_GETEGID /* getegid() is present in libc */ +#undef HAVE_GETPGID /* getpgid() is present in libc (POSIX) */ +#undef HAVE_SETPGID /* setpgid() is present in libc (POSIX) */ +#undef HAVE_GETPGRP /* getpgrp() is present in libc (ANY) */ +#undef HAVE_GETSID /* getsid() is present in libc (POSIX) */ +#undef HAVE_SETSID /* setsid() is present in libc (POSIX) */ +#undef HAVE_SETPGRP /* setpgrp() is present in libc (ANY) */ +#undef HAVE_BSD_GETPGRP /* getpgrp() in libc is BSD-4.2 compliant */ +#undef HAVE_BSD_SETPGRP /* setpgrp() in libc is BSD-4.2 compliant */ +#undef HAVE_GETPWNAM /* getpwnam() in libc */ +#undef HAVE_GETPWENT /* getpwent() in libc */ +#undef HAVE_GETPWUID /* getpwuid() in libc */ +#undef HAVE_SETPWENT /* setpwent() in libc */ +#undef HAVE_ENDPWENT /* endpwent() in libc */ +#undef HAVE_GETGRNAM /* getgrnam() in libc */ +#undef HAVE_GETGRENT /* getgrent() in libc */ +#undef HAVE_GETGRGID /* getgrgid() in libc */ +#undef HAVE_SETGRENT /* setgrent() in libc */ +#undef HAVE_ENDGRENT /* endgrent() in libc */ +#undef HAVE_GETSPNAM /* getspnam() in libc (SVR4 compliant) */ +#undef HAVE_GETSPWNAM /* getspwnam() in libsec.a (HP-UX) */ +#undef HAVE_GETLOGIN /* getlogin() in libc */ +#undef HAVE_SYNC /* sync() is present in libc */ +#undef HAVE_FSYNC /* fsync() is present in libc */ +#undef HAVE_TCGETATTR /* tcgetattr() is present in libc */ +#undef HAVE_TCSETATTR /* tcsetattr() is present in libc */ +#undef HAVE_TCGETPGRP /* tcgetpgrp() is present in libc */ +#undef HAVE_TCSETPGRP /* tcsetpgrp() is present in libc */ +#undef HAVE_TCGETSID /* tcgetsid() is present in libc */ +#undef HAVE_WAIT /* wait() is present in libc */ +#undef HAVE_WAIT3 /* working wait3() is present in libc */ +#undef HAVE_WAIT4 /* wait4() is present in libc */ +#undef HAVE_WAIT6 /* wait6() is present in libc */ +#undef HAVE_WAITID /* waitid() is present in libc */ +#undef HAVE_WAITPID /* waitpid() is present in libc */ +#undef HAVE_WNOWAIT_WAITPID /* waitpid() supports NOWAIT */ +#undef HAVE_CWAIT /* cwait() is present in libc */ +#undef HAVE_GETHOSTID /* gethostid() is present in libc */ +#undef HAVE_GETHOSTNAME /* gethostname() is present in libc */ +#undef HAVE_GETDOMAINNAME /* getdomainname() is present in libc */ +#undef HAVE_GETPAGESIZE /* getpagesize() is present in libc */ +#undef HAVE_GETDTABLESIZE /* getdtablesize() is present in libc */ +#undef HAVE_GETRUSAGE /* getrusage() is present in libc */ +#undef HAVE_GETRLIMIT /* getrlimit() is present in libc */ +#undef HAVE_SETRLIMIT /* setrlimit() is present in libc */ +#undef HAVE_ULIMIT /* ulimit() is present in libc */ +#undef HAVE_GETTIMEOFDAY /* gettimeofday() is present in libc */ +#undef HAVE_SETTIMEOFDAY /* settimeofday() is present in libc */ +#undef HAVE_VAR_TIMEZONE /* extern long timezone is present in libc */ +#undef HAVE_VAR_TIMEZONE_DEF /* extern long timezone is present in time.h */ +#undef HAVE_TIME /* time() is present in libc */ +#undef HAVE_GMTIME /* gmtime() is present in libc */ +#undef HAVE_LOCALTIME /* localtime() is present in libc */ +#undef HAVE_MKTIME /* mktime() is present in libc */ +#undef HAVE_TIMEGM /* timegm() is present in libc */ +#undef HAVE_TIMELOCAL /* timelocal() is present in libc */ +#undef HAVE_FTIME /* ftime() is present in libc */ +#undef HAVE_STIME /* stime() is present in libc */ +#undef HAVE_TZSET /* tzset() is present in libc */ +#undef HAVE_CTIME /* ctime() is present in libc */ +#undef HAVE_CFTIME /* cftime() is present in libc */ +#undef HAVE_ASCFTIME /* ascftime() is present in libc */ +#undef HAVE_STRFTIME /* strftime() is present in libc */ +#undef HAVE_GETHRTIME /* gethrtime() is present in libc */ +#undef HAVE_POLL /* poll() is present in libc */ +#undef HAVE_SELECT /* select() is present in libc */ +#undef HAVE_ISASTREAM /* isastream() is present in libc */ +#undef HAVE_CHMOD /* chmod() is present in libc */ +#undef HAVE_FCHMOD /* fchmod() is present in libc */ +#undef HAVE_LCHMOD /* lchmod() is present in libc */ +#undef HAVE_CHOWN /* chown() is present in libc */ +#undef HAVE_FCHOWN /* fchown() is present in libc */ +#undef HAVE_LCHOWN /* lchown() is present in libc */ +#undef HAVE_TRUNCATE /* truncate() is present in libc */ +#undef HAVE_FTRUNCATE /* ftruncate() is present in libc */ +#undef HAVE_BRK /* brk() is present in libc */ +#undef HAVE_SBRK /* sbrk() is present in libc */ +#undef HAVE_VA_COPY /* va_copy() is present in varargs.h/stdarg.h */ +#undef HAVE__VA_COPY /* __va_copy() is present in varargs.h/stdarg.h */ +#undef HAVE_DTOA /* BSD-4.4 __dtoa() is present in libc */ +#undef HAVE_DTOA_R /* BSD-4.4 __dtoa() with result ptr (reentrant) */ +#undef HAVE_DUP /* dup() is present in libc */ +#undef HAVE_DUP2 /* dup2() is present in libc */ +#undef HAVE_GETCWD /* POSIX getcwd() is present in libc */ +#undef HAVE_SMMAP /* may map anonymous memory to get shared mem */ +#undef HAVE_SHMAT /* shmat() is present in libc */ +#undef HAVE_SHMGET /* shmget() is present in libc and working */ +#undef HAVE_SEMGET /* semget() is present in libc */ +#undef HAVE_LSTAT /* lstat() is present in libc */ +#undef HAVE_READLINK /* readlink() is present in libc */ +#undef HAVE_SYMLINK /* symlink() is present in libc */ +#undef HAVE_LINK /* link() is present in libc */ +#undef HAVE_HARD_SYMLINKS /* link() allows hard links on symlinks */ +#undef HAVE_LINK_NOFOLLOW /* link() does not follow symlinks when hard linking symlinks */ +#undef HAVE_RENAME /* rename() is present in libc */ +#undef HAVE_MKFIFO /* mkfifo() is present in libc */ +#undef HAVE_MKNOD /* mknod() is present in libc */ +#undef HAVE_ECVT /* ecvt() is present in libc */ +#undef HAVE_FCVT /* fcvt() is present in libc */ +#undef HAVE_GCVT /* gcvt() is present in libc */ +#undef HAVE_ECVT_R /* ecvt_r() is present in libc */ +#undef HAVE_FCVT_R /* fcvt_r() is present in libc */ +#undef HAVE_GCVT_R /* gcvt_r() is present in libc */ +#undef HAVE_QECVT /* qecvt() is present in libc */ +#undef HAVE_QFCVT /* qfcvt() is present in libc */ +#undef HAVE_QGCVT /* qgcvt() is present in libc */ +#undef HAVE__QECVT /* _qecvt() is present in libc */ +#undef HAVE__QFCVT /* _qfcvt() is present in libc */ +#undef HAVE__QGCVT /* _qgcvt() is present in libc */ +#undef HAVE__QECVT_R /* _qecvt_r() is present in libc */ +#undef HAVE__QFCVT_R /* _qfcvt_r() is present in libc */ +#undef HAVE__QGCVT_R /* _qgcvt_r() is present in libc */ +#undef HAVE__LDECVT /* _ldecvt() is present in libc */ +#undef HAVE__LDFCVT /* _ldfcvt() is present in libc */ +#undef HAVE__LDGCVT /* _ldgcvt() is present in libc */ +#undef HAVE__LDECVT_R /* _ldecvt_r() is present in libc */ +#undef HAVE__LDFCVT_R /* _ldfcvt_r() is present in libc */ +#undef HAVE__LDGCVT_R /* _ldgcvt_r() is present in libc */ +#undef HAVE_ECONVERT /* econvert() is present in libc */ +#undef HAVE_FCONVERT /* fconvert() is present in libc */ +#undef HAVE_GCONVERT /* gconvert() is present in libc */ +#undef HAVE_QECONVERT /* qeconvert() is present in libc */ +#undef HAVE_QFCONVERT /* qfconvert() is present in libc */ +#undef HAVE_QGCONVERT /* qgconvert() is present in libc */ +#undef HAVE_ISINF /* isinf() is present in libc */ +#undef HAVE_ISNAN /* isnan() is present in libc */ +#undef HAVE_C99_ISINF /* isinf() is present in math.h/libc */ +#undef HAVE_C99_ISNAN /* isnan() is present in math.h/libc */ +#undef HAVE_GETC_UNLOCKED /* getc_unlocked() is present in libc */ +#undef HAVE_GETCHAR_UNLOCKED /* getchar_unlocked() is present in libc */ +#undef HAVE_PUTC_UNLOCKED /* putc_unlocked() is present in libc */ +#undef HAVE_PUTCHAR_UNLOCKED /* putchar_unlocked() is present in libc */ +#undef HAVE_FLOCKFILE /* flockfile() is present in libc */ +#undef HAVE_FUNLOCKFILE /* funlockfile() is present in libc */ +#undef HAVE_FTRYLOCKFILE /* ftrylockfile() is present in libc */ +#undef HAVE_FINITE /* finite() is present in libc/ieeefp.h (SVr4) */ +#undef HAVE_ISNAND /* isnand() is present in libc/ieeefp.h (SVr4) */ +#undef HAVE_RAND /* rand() is present in libc */ +#undef HAVE_DRAND48 /* drand48() is present in libc */ +#undef HAVE_ICONV_IN_LIBC /* whether iconv() is in libc (needs no -liconv) */ +#undef HAVE_ICONV /* iconv() is present in libiconv */ +#undef HAVE_ICONV_OPEN /* iconv_open() is present in libiconv */ +#undef HAVE_ICONV_CLOSE /* iconv_close() is present in libiconc */ +#undef HAVE_LIBICONV /* libiconv() is present in libiconv */ +#undef HAVE_LIBICONV_OPEN /* libiconv_open() is present in liiconv */ +#undef HAVE_LIBICONV_CLOSE /* libiconv_close() is present in libiconv */ +#undef HAVE_SETPRIORITY /* setpriority() is present in libc */ +#undef HAVE_NICE /* nice() is present in libc */ +#undef HAVE_DOSSETPRIORITY /* DosSetPriority() is present in libc */ +#undef HAVE_DOSALLOCSHAREDMEM /* DosAllocSharedMem() is present in libc */ +#undef HAVE_SEEKDIR /* seekdir() is present in libc */ +#undef HAVE_GETENV /* getenv() is present in libc */ +#undef HAVE_PUTENV /* putenv() is present in libc (preferred function) */ +#undef HAVE_SETENV /* setenv() is present in libc (use instead of putenv()) */ +#undef HAVE_UNSETENV /* unsetenv() is present in libc */ +#undef HAVE_UNAME /* uname() is present in libc */ +#undef HAVE_SNPRINTF /* snprintf() is present in libc */ +#undef HAVE_VPRINTF /* vprintf() is present in libc */ +#undef HAVE_VFPRINTF /* vfprintf() is present in libc */ +#undef HAVE_VSPRINTF /* vsprintf() is present in libc */ +#undef HAVE_VSNPRINTF /* vsnprintf() is present in libc */ +#undef HAVE_STRCAT /* strcat() is present in libc */ +#undef HAVE_STRNCAT /* strncat() is present in libc */ +#undef HAVE_STRCMP /* strcmp() is present in libc */ +#undef HAVE_STRNCMP /* strncmp() is present in libc */ +#undef HAVE_STRCPY /* strcpy() is present in libc */ +#undef HAVE_STRLCAT /* strlcat() is present in libc */ +#undef HAVE_STRLCPY /* strlcpy() is present in libc */ +#undef HAVE_STRNCPY /* strncpy() is present in libc */ +#undef HAVE_STRDUP /* strdup() is present in libc */ +#undef HAVE_STRNDUP /* strndup() is present in libc */ +#undef HAVE_STRLEN /* strlen() is present in libc */ +#undef HAVE_STRNLEN /* strnlen() is present in libc */ +#undef HAVE_STRCHR /* strchr() is present in libc */ +#undef HAVE_STRRCHR /* strrchr() is present in libc */ +#undef HAVE_STRSTR /* strstr() is present in libc */ +#undef HAVE_STRSPN /* strspn() is present in libc */ +#undef HAVE_STRCSPN /* strcspn() is present in libc */ +#undef HAVE_STRCASECMP /* strcasecmp() is present in libc */ +#undef HAVE_STRNCASECMP /* strncasecmp() is present in libc */ +#undef HAVE_BASENAME /* basename() is present in libc */ +#undef HAVE_DIRNAME /* dirname() is present in libc */ +#undef HAVE_PATHCONF /* pathconf() is present in libc */ +#undef HAVE_FPATHCONF /* fpathconf() is present in libc */ +#undef HAVE_LPATHCONF /* lpathconf() is present in libc */ +#undef HAVE_STRTOL /* strtol() is present in libc */ +#undef HAVE_STRTOLL /* strtoll() is present in libc */ +#undef HAVE_STRTOUL /* strtoul() is present in libc */ +#undef HAVE_STRTOULL /* strtoull() is present in libc */ +#undef HAVE_STRTOD /* strtold() is present in libc */ +#undef HAVE_STRSIGNAL /* strsignal() is present in libc */ +#undef HAVE_STR2SIG /* str2sig() is present in libc */ +#undef HAVE_SIG2STR /* sig2str() is present in libc */ +#undef HAVE_SIGSETJMP /* sigsetjmp() is present in libc */ +#undef HAVE_SIGLONGJMP /* siglongjmp() is present in libc */ +#undef HAVE_KILL /* kill() is present in libc */ +#undef HAVE_KILLPG /* killpg() is present in libc */ +#undef HAVE_SIGNAL /* signal() is present in libc */ +#undef HAVE_SIGHOLD /* sighold() is present in libc */ +#undef HAVE_SIGRELSE /* sigrelse() is present in libc */ +#undef HAVE_SIGIGNORE /* sigignore() is present in libc */ +#undef HAVE_SIGPAUSE /* sigpause() is present in libc */ +#undef HAVE_SIGPROCMASK /* sigprocmask() is present in libc (POSIX) */ +#undef HAVE_SIGSETMASK /* sigsetmask() is present in libc (BSD) */ +#undef HAVE_SIGSET /* sigset() is present in libc (POSIX) */ +#undef HAVE_SIGALTSTACK /* sigaltstack() is present in libc (POSIX) */ +#undef HAVE_SIGBLOCK /* sigblock() is present in libc (BSD) */ +#undef HAVE_SYS_SIGLIST /* char *sys_siglist[] is present in libc */ +#undef HAVE_ALARM /* alarm() is present in libc */ +#undef HAVE_SLEEP /* sleep() is present in libc */ +#undef HAVE_USLEEP /* usleep() is present in libc */ +#undef HAVE_FORK /* fork() is present in libc */ +#undef HAVE_FORKX /* forkx() is present in libc */ +#undef HAVE_FORKALL /* forkall() is present in libc */ +#undef HAVE_FORKALLX /* forkallx() is present in libc */ +#undef HAVE_VFORK /* working vfork() is present in libc */ +#undef HAVE_VFORKX /* working vforkx() is present in libc */ +#undef HAVE_EXECL /* execl() is present in libc */ +#undef HAVE_EXECLE /* execle() is present in libc */ +#undef HAVE_EXECLP /* execlp() is present in libc */ +#undef HAVE_EXECV /* execv() is present in libc */ +#undef HAVE_EXECVE /* execve() is present in libc */ +#undef HAVE_EXECVP /* execvp() is present in libc */ +#undef HAVE_SPAWNL /* spawnl() is present in libc */ +#undef HAVE_SPAWNLE /* spawnle() is present in libc */ +#undef HAVE_SPAWNLP /* spawnlp() is present in libc */ +#undef HAVE_SPAWNLPE /* spawnlpe() is present in libc */ +#undef HAVE_SPAWNV /* spawnv() is present in libc */ +#undef HAVE_SPAWNVE /* spawnve() is present in libc */ +#undef HAVE_SPAWNVP /* spawnvp() is present in libc */ +#undef HAVE_SPAWNVPE /* spawnvpe() is present in libc */ +#undef HAVE_ATEXIT /* atexit() is present in libc */ +#undef HAVE_ON_EXIT /* on_exit() (SunOS-4.x) is present in libc */ +#undef HAVE_GETEXECNAME /* getexecname() is present in libc */ +#undef HAVE_GETPROGNAME /* getprogname() is present in libc */ +#undef HAVE_SETPROGNAME /* setprogname() is present in libc */ +#undef HAVE_PROC_PIDPATH /* proc_pidpath() is present in libc */ +#undef HAVE_VAR_PROGNAME /* extern char *__progname is present in libc */ +#undef HAVE_VAR_PROGNAME_FULL /* extern char *__progname_full is present in libc */ +#undef HAVE_GETLOADAVG /* getloadavg() is present in libc */ +#undef HAVE_ALLOCA /* alloca() is present (else use malloc())*/ +#undef HAVE_MALLOC /* malloc() is present in libc */ +#undef HAVE_CALLOC /* calloc() is present in libc */ +#undef HAVE_REALLOC /* realloc() is present in libc */ +#undef HAVE_REALLOC_NULL /* realloc() implements realloc(NULL, size) */ +#undef HAVE_VALLOC /* valloc() is present in libc (else use malloc())*/ +#undef HAVE_MEMALIGN /* memalign() is present in libc */ +#undef HAVE_POSIX_MEMALIGN /* posix_memalign() is present in libc */ +#undef vfork +#undef HAVE_WCSCAT /* wcscat() is present in libc */ +#undef HAVE_WCSNCAT /* wcsncat() is present in libc */ +#undef HAVE_WCSCMP /* wcscmp() is present in libc */ +#undef HAVE_WCSNCMP /* wcsncmp() is present in libc */ +#undef HAVE_WCSCPY /* wcscpy() is present in libc */ +#undef HAVE_WCSLCAT /* wcsncat() is present in libc */ +#undef HAVE_WCSLCPY /* wcsncpy() is present in libc */ +#undef HAVE_WCSNCPY /* wcsncpy() is present in libc */ +#undef HAVE_WCSDUP /* wcsdup() is present in libc */ +#undef HAVE_WCSNDUP /* wcsndup() is present in libc */ +#undef HAVE_WCSLEN /* wcslen() is present in libc */ +#undef HAVE_WCSNLEN /* wcsnlen() is present in libc */ +#undef HAVE_WCSCHR /* wcschr() is present in libc */ +#undef HAVE_WCSRCHR /* wcsrchr() is present in libc */ +#undef HAVE_WCSSTR /* wcsstr() is present in libc */ +#undef HAVE_WCSSPN /* wcsspn() is present in libc */ +#undef HAVE_WCSCSPN /* wcscspn() is present in libc */ +#undef HAVE_WCWIDTH /* wcwidth() is present in libc */ +#undef HAVE_WCSWIDTH /* wcswidth() is present in libc */ +#undef HAVE_WCTYPE /* wctype() is present in libc */ +#undef HAVE_ISWCTYPE /* iswctype() is present in libc */ + + +#undef HAVE_CHFLAGS /* chflags() is present in libc */ +#undef HAVE_FCHFLAGS /* fchflags() is present in libc */ +#undef HAVE_FFLAGSTOSTR /* fflagstostr() is present in libc */ +#undef HAVE_STRTOFFLAGS /* strtofflags() is present in libc */ + +#undef HAVE_GETTEXT_IN_LIBC /* whether gettext() is in libc (needs no -lintl) */ +#undef HAVE_GETTEXT /* gettext() is present in -lintl */ +#undef HAVE_SETLOCALE /* setlocale() is present in libc */ +#undef HAVE_LOCALECONV /* localeconv() is present in libc */ +#undef HAVE_NL_LANGINFO /* nl_langinfo() is present in libc */ + +#undef HAVE_EXPAT_IN_LIBC /* whether XML_Parse() is in libc (needs no -lexpat) */ +#undef HAVE_XML_PARSE /* whether XML_Parse() libc or -lexpat */ + +#undef HAVE_PCSC_IN_LIBC /* whether SCardEstablishContext() is in libc (needs no -lpcsclite) */ +#undef HAVE_SCARDESTABLISHCONTEXT /* whether SCardEstablishContext() libc or -lpcsclite */ + +#undef HAVE_CRYPTO_IN_LIBC /* whether CRYPTO_free() is in libc (needs no -lcrypto) */ +#undef HAVE_CRYPTO_FREE /* whether CRYPTO_free() libc or -lcrypto */ + +#undef HAVE_SSL_IN_LIBC /* whether SSL_free() is in libc (needs no -lssl) */ +#undef HAVE_SSL_FREE /* whether SSL_free() libc or -lssl */ + +#undef HAVE_SETBUF /* setbuf() is present in libc */ +#undef HAVE_SETVBUF /* setvbuf() is present in libc */ + +#undef HAVE_FNMATCH /* fnmatch() is present in libc */ +#undef HAVE_FNMATCH_IGNORECASE /* fnmatch() implements FNM_IGNORECASE */ + +#undef HAVE_MKTEMP /* mktemp() is present in libc */ +#undef HAVE_MKSTEMP /* mkstemp() is present in libc */ + +#undef HAVE_GETPPRIV /* getppriv() is present in libc */ +#undef HAVE_SETPPRIV /* setppriv() is present in libc */ +#undef HAVE_PRIV_SET /* priv_set() is present in libc */ +#undef HAVE_ISSETUGID /* issetugid() is present in libc */ +#undef HAVE_GETROLES /* getroles() is present in libc (AIX) */ +#undef HAVE_PRIVBIT_SET /* privbit_set() is present in libc (AIX) */ + +#undef HAVE_GETAUTHATTR /* getauthattr() is present in -lsecdb */ +#undef HAVE_GETUSERATTR /* getuserattr() is present in -lsecdb */ +#undef HAVE_GETEXECATTR /* getexecattr() is present in -lsecdb */ +#undef HAVE_GETPROFATTR /* getprofattr() is present in -lsecdb */ + +#undef HAVE_GMATCH /* gmatch() is present in -lgen */ + +#undef HAVE_ELF_BEGIN /* elf_begin() is present in -lelf */ + +#undef HAVE_CLONE_AREA /* clone_area() is present in libc */ +#undef HAVE_CREATE_AREA /* create_area() is present in libc */ +#undef HAVE_DELETE_AREA /* delete_area() is present in libc */ + +#undef HAVE_RES_INIT_IN_LIBC /* whether res_init() is in libc (needs no -lresolv) */ + +#undef HAVE_DLOPEN_IN_LIBC /* whether dlopen() is in libc (needs no -ldl) */ +#undef HAVE_DLOPEN /* dlopen() is present in libc */ +#undef HAVE_DLCLOSE /* dlclose() is present in libc */ +#undef HAVE_DLSYM /* dlsym() is present in libc */ +#undef HAVE_DLERROR /* dlerror() is present in libc */ +#undef HAVE_DLINFO /* dlinfo() is present in libc */ +#undef HAVE_SHL_LOAD /* shl_load() is present in libc */ +#undef HAVE_SHL_UNLOAD /* shl_unload() is present in libc */ +#undef HAVE_SHL_GETHANDLE /* shl_gethandle() is present in libc */ +#undef HAVE_LOADLIBRARY /* LoadLibrary() as present in libc */ +#undef HAVE_FREELIBRARY /* FreeLibrary() is present in libc */ +#undef HAVE_GETPROCADDRESS /* GetProcAddress() is present in libc */ + +#undef HAVE_YIELD /* yield() is present in libc */ +#undef HAVE_THR_YIELD /* thr_yield() is present in libc */ + +#undef HAVE_PTHREAD_CREATE /* pthread_create() is present in libpthread */ +#undef HAVE_PTHREAD_KILL /* pthread_kill() is present in libpthread */ +#undef HAVE_PTHREAD_MUTEX_LOCK /* pthread_mutex_lock() is present in libpthread */ +#undef HAVE_PTHREAD_COND_WAIT /* pthread_cond_wait() is present in libpthread */ +#undef HAVE_PTHREAD_SPIN_LOCK /* pthread_spin_lock() is present in libpthread */ + +#undef HAVE_CLOCK_GETTIME_IN_LIBC /* whether clock_gettime() is in libc (needs no -lrt) */ +#undef HAVE_CLOCK_GETTIME /* clock_gettime() is present in librt */ +#undef HAVE_CLOCK_SETTIME /* clock_settime() is present in librt */ +#undef HAVE_CLOCK_GETRES /* clock_getres() is present in librt */ +#undef HAVE_SCHED_GETPARAM /* sched_getparam() is present in librt */ +#undef HAVE_SCHED_SETPARAM /* sched_setparam() is present in librt */ +#undef HAVE_SCHED_GETSCHEDULER /* sched_getscheduler() is present in librt */ +#undef HAVE_SCHED_SETSCHEDULER /* sched_setscheduler() is present in librt */ +#undef HAVE_SCHED_YIELD /* sched_yield() is present in librt */ +#undef HAVE_NANOSLEEP /* nanosleep() is present in librt */ + +/* + * The POSIX.1e draft has been withdrawn in 1997. + * Linux started to implement this outdated concept in 1997. + */ +#undef HAVE_CAP_GET_PROC /* cap_get_proc() is present in libcap */ +#undef HAVE_CAP_SET_PROC /* cap_set_proc() is present in libcap */ +#undef HAVE_CAP_SET_FLAG /* cap_set_flag() is present in libcap */ +#undef HAVE_CAP_CLEAR_FLAG /* cap_clear_flag() is present in libcap */ + + +#undef HAVE_DIRFD /* dirfd() is present in libc */ +#undef HAVE_ISWPRINT /* iswprint() is present in libc */ +#undef HAVE_ISWBLANK /* iswblank() is present in libc */ +#undef HAVE_ISBLANK /* isblank() is present in libc */ +#undef HAVE_MBSINIT /* mbsinit() is present in libc */ +#undef HAVE_MBTOWC /* mbtowc() is present in libc */ +#undef HAVE_WCTOMB /* wctomb() is present in libc */ +#undef HAVE_MBRTOWC /* mbrtowc() is present in libc */ +#undef HAVE_WCRTOMB /* wcrtomb() is present in libc */ + +#undef HAVE_PRINTF_J /* *printf() in libc supports %jd */ +#undef HAVE_PRINTF_Z /* *printf() in libc supports %zd */ +#undef HAVE_PRINTF_LL /* *printf() in libc supports %lld */ + +/* + * Functions that we defined in 1982 but where POSIX.1-2008 defined + * a POSIX violating incompatible definition. + * We use AC_RCHECK_FUNCS(), so we get HAVE_RAW_* results as some + * Linux distros have fexecve() that returns ENOSYS. + */ +#undef HAVE_RAW_FEXECL /* fexecl() */ +#undef HAVE_RAW_FEXECLE /* fexecle() */ +#undef HAVE_RAW_FEXECV /* fexecv() */ +#undef HAVE_RAW_FEXECVE /* fexecve() */ +#undef HAVE_RAW_FSPAWNV /* fspawnv() */ +#undef HAVE_RAW_FSPAWNL /* fspawnl() */ +#undef HAVE_RAW_FSPAWNV_NOWAIT /* fspawnv_nowait() */ +#undef HAVE_RAW_GETLINE /* getline() */ +#undef HAVE_RAW_FGETLINE /* fgetline() */ + + +/* + * Misc OS stuff + */ + /* Dirty hack, better use C program not test */ +#if !defined(_MSC_VER) && !defined(__MINGW32__) +#undef HAVE__DEV_TTY /* /dev/tty present */ +#undef HAVE__DEV_NULL /* /dev/null present */ +#undef HAVE__DEV_ZERO /* /dev/zero present */ +#undef HAVE__DEV_STDIN /* /dev/stdin present */ +#undef HAVE__DEV_STDOUT /* /dev/stdout present */ +#undef HAVE__DEV_STDERR /* /dev/stderr present */ +#undef HAVE__DEV_FD_0 /* /dev/fd/0 present */ +#undef HAVE__DEV_FD_1 /* /dev/fd/1 present */ +#undef HAVE__DEV_FD_2 /* /dev/fd/2 present */ +#undef HAVE__USR_SRC_LINUX_INCLUDE /* /usr/src/linux/include present */ +#undef HAVE__USR_XPG4_BIN_SH /* /usr/xpg4/bin/sh present */ +#undef HAVE__OPT_SCHILY_XPG4_BIN_SH /* /opt/schily/xpg4/bin/sh present */ +#endif + +/* + * Misc OS programs + */ +#undef SHELL_IS_BASH /* sh is bash */ +#undef BIN_SHELL_IS_BASH /* /bin/sh is bash */ +#undef SHELL_CE_IS_BROKEN /* sh -ce is broken */ +#undef BIN_SHELL_CE_IS_BROKEN /* /bin/sh -ce is broken */ +#undef BIN_SHELL_BOSH /* /bin/bosh is a working Bourne Shell */ +#undef OPT_SCHILY_BIN_SHELL_BOSH /* /opt/schily/bin/bosh is a working Bourne Shell */ + +/* + * OS madness + */ +#undef HAVE_BROKEN_LINUX_EXT2_FS_H /* whether is broken */ +#undef HAVE_BROKEN_SRC_LINUX_EXT2_FS_H /* whether /usr/src/linux/include/linux/ext2_fs.h is broken */ +#undef HAVE_USABLE_LINUX_EXT2_FS_H /* whether linux/ext2_fs.h is usable at all */ +#undef HAVE_BROKEN_SCSI_SCSI_H /* whether is broken */ +#undef HAVE_BROKEN_SRC_SCSI_SCSI_H /* whether /usr/src/linux/include/scsi/scsi.h is broken */ +#undef HAVE_BROKEN_SCSI_SG_H /* whether is broken */ +#undef HAVE_BROKEN_SRC_SCSI_SG_H /* whether /usr/src/linux/include/scsi/sg.h is broken */ + +/* + * Linux Extended File Attributes + */ +#undef HAVE_GETXATTR /* getxattr() */ +#undef HAVE_SETXATTR /* setxattr() */ +#undef HAVE_LISTXATTR /* listxattr() */ +#undef HAVE_LGETXATTR /* lgetxattr() */ +#undef HAVE_LSETXATTR /* lsetxattr() */ +#undef HAVE_LLISTXATTR /* llistxattr() */ + +/* + * Important: This must be a result from a check _before_ the Large File test + * has been run. It then tells us whether these functions are + * available even when not in Large File mode. + * + * Do not run the AC_FUNC_FSEEKO test from the GNU tar Large File test + * siute. It will use the same cache names and interfere with our test. + * Instead use the tests AC_SMALL_FSEEKO/AC_SMALL/STELLO and make sure + * they are placed before the large file tests. + */ +#undef HAVE_FSEEKO /* fseeko() is present in default compile mode */ +#undef HAVE_FTELLO /* ftello() is present in default compile mode */ + +#undef HAVE_RCMD /* rcmd() is present in libc/libsocket */ +#undef HAVE_SOCKET /* socket() is present in libc/libsocket */ +#undef HAVE_SOCKETPAIR /* socketpair() is present in libc/libsocket */ +#undef HAVE_GETSERVBYNAME /* getservbyname() is present in libc/libsocket */ +#undef HAVE_INET_NTOA /* inet_ntoa() is present in libc/libsocket */ +#undef HAVE_GETADDRINFO /* getaddrinfo() is present in libc/libsocket */ +#undef HAVE_GETNAMEINFO /* getnameinfo() is present in libc/libsocket */ +#undef HAVE_HOST2NETNAME /* host2netname() is present in libc/libsocket */ +#undef HAVE_NETNAME2HOST /* netname2host() is present in libc/libsocket */ + + +#if defined(HAVE_QUOTACTL) || defined(HAVE_QUOTAIOCTL) +# define HAVE_QUOTA /* The system inludes quota */ +#endif + +/* + * We need to test for the include files too because Apollo Domain/OS has a + * libc that includes the functions but the includes files are not visible + * from the BSD compile environment. + * + * ATARI MiNT has a non-working shmget(), so we test for it separately. + */ +#if defined(HAVE_SHMAT) && defined(HAVE_SHMGET) && \ + defined(HAVE_SYS_SHM_H) && defined(HAVE_SYS_IPC_H) +# define HAVE_USGSHM /* USG shared memory is present */ +#endif +#if defined(HAVE_SEMGET) && defined(HAVE_SYS_SHM_H) && defined(HAVE_SYS_IPC_H) +# define HAVE_USGSEM /* USG semaphores are present */ +#endif + +#if defined(HAVE_GETPGRP) && !defined(HAVE_BSD_GETPGRP) +#define HAVE_POSIX_GETPGRP 1 /* getpgrp() in libc is POSIX compliant */ +#endif +#if defined(HAVE_SETPGRP) && !defined(HAVE_BSD_SETPGRP) +#define HAVE_POSIX_SETPGRP 1 /* setpgrp() in libc is POSIX compliant */ +#endif + +/* + * Structures + */ +#undef HAVE_FILE__FLAGS /* if FILE * contains _flags */ +#undef HAVE_FILE__IO_BUF_BASE /* if FILE * contains _IO_buf_base */ + +#undef HAVE_MTGET_TYPE /* if struct mtget contains mt_type (drive type) */ +#undef HAVE_MTGET_MODEL /* if struct mtget contains mt_model (drive type) */ +#undef HAVE_MTGET_DSREG /* if struct mtget contains mt_dsreg (drive status) */ +#undef HAVE_MTGET_DSREG1 /* if struct mtget contains mt_dsreg1 (drive status msb) */ +#undef HAVE_MTGET_DSREG2 /* if struct mtget contains mt_dsreg2 (drive status lsb) */ +#undef HAVE_MTGET_GSTAT /* if struct mtget contains mt_gstat (generic status) */ +#undef HAVE_MTGET_ERREG /* if struct mtget contains mt_erreg (error register) */ +#undef HAVE_MTGET_RESID /* if struct mtget contains mt_resid (residual count) */ +#undef HAVE_MTGET_FILENO /* if struct mtget contains mt_fileno (file #) */ +#undef HAVE_MTGET_BLKNO /* if struct mtget contains mt_blkno (block #) */ +#undef HAVE_MTGET_FLAGS /* if struct mtget contains mt_flags (flags) */ +#undef HAVE_MTGET_BF /* if struct mtget contains mt_bf (optimum blocking factor) */ +#undef HAVE_STRUCT_TIMEVAL /* have struct timeval in time.h or sys/time.h */ +#undef HAVE_STRUCT_TIMEZONE /* have struct timezone in time.h or sys/time.h */ +#undef HAVE_STRUCT_TIMESPEC /* have struct timespec in time.h or sys/time.h */ +#undef HAVE_STRUCT_RUSAGE /* have struct rusage in sys/resource.h */ +#undef HAVE_SI_UTIME /* if struct siginfo contains si_utime */ +#undef HAVE_UNION_SEMUN /* have an illegal definition for union semun in sys/sem.h */ +#undef HAVE_UNION_WAIT /* have union wait in wait.h */ +#undef USE_UNION_WAIT /* union wait in wait.h is used by default */ +#undef HAVE_DIRENT_D_INO /* have d_ino in struct dirent */ +#undef HAVE_DIRENT_D_TYPE /* have d_type in struct dirent */ +#undef HAVE_DIR_DD_FD /* have dd_fd in DIR * */ +/* + * SCO UnixWare has st_atim.st__tim.tv_nsec but the st_atim.tv_nsec tests also + * succeeds. If you use st_atim.tv_nsec on UnixWare, you get a warning about + * illegal structure usage. For this reason, your code needs to have + * #ifdef HAVE_ST__TIM before #ifdef HAVE_ST_NSEC. + */ +#undef HAVE_ST_SPARE1 /* if struct stat contains st_spare1 (usecs) */ +#undef HAVE_ST_ATIMENSEC /* if struct stat contains st_atimensec (nanosecs) */ +#undef HAVE_ST_ATIME_N /* if struct stat contains st_atime_n (nanosecs) */ +#undef HAVE_ST_NSEC /* if struct stat contains st_atim.tv_nsec (nanosecs) */ +#undef HAVE_ST__TIM /* if struct stat contains st_atim.st__tim.tv_nsec (nanosecs) */ +#undef HAVE_ST_ATIMESPEC /* if struct stat contains st_atimespec.tv_nsec (nanosecs) */ +#undef HAVE_ST_BLKSIZE /* if struct stat contains st_blksize */ +#undef HAVE_ST_BLOCKS /* if struct stat contains st_blocks */ +#undef HAVE_ST_FSTYPE /* if struct stat contains st_fstype */ +#undef HAVE_ST_ACLCNT /* if struct stat contains st_aclcnt */ +#undef HAVE_ST_RDEV /* if struct stat contains st_rdev */ +#undef HAVE_ST_FLAG /* if struct stat contains st_flag */ +#undef HAVE_ST_FLAGS /* if struct stat contains st_flags */ +#undef STAT_MACROS_BROKEN /* if the macros S_ISDIR, S_ISREG .. don't work */ + +#undef HAVE_UTSNAME_ARCH /* if struct utsname contains processor as arch */ +#undef HAVE_UTSNAME_PROCESSOR /* if struct utsname contains processor */ +#undef HAVE_UTSNAME_SYSNAME_HOST /* if struct utsname contains sysname_host */ +#undef HAVE_UTSNAME_RELEASE_HOST /* if struct utsname contains release_host */ +#undef HAVE_UTSNAME_VERSION_HOST /* if struct utsname contains version_host */ + +#undef DEV_MINOR_BITS /* # if bits needed to hold minor device number */ +#undef DEV_MINOR_NONCONTIG /* if bits in minor device number are noncontiguous */ + +#undef HAVE_SOCKADDR_STORAGE /* if socket.h defines struct sockaddr_storage */ + + +/* + * Byteorder/Bitorder + */ +#define HAVE_C_BIGENDIAN /* Flag that WORDS_BIGENDIAN test was done */ +#undef WORDS_BIGENDIAN /* If using network byte order */ +#define HAVE_C_BITFIELDS /* Flag that BITFIELDS_HTOL test was done */ +#undef BITFIELDS_HTOL /* If high bits come first in structures */ + +/* + * Types/Keywords + */ +#undef SIZEOF_CHAR +#undef SIZEOF_SHORT_INT +#undef SIZEOF_INT +#undef SIZEOF_LONG_INT +#undef SIZEOF_LONG_LONG +#undef SIZEOF___INT64 +#undef SIZEOF_CHAR_P +#undef SIZEOF_UNSIGNED_CHAR +#undef SIZEOF_UNSIGNED_SHORT_INT +#undef SIZEOF_UNSIGNED_INT +#undef SIZEOF_UNSIGNED_LONG_INT +#undef SIZEOF_UNSIGNED_LONG_LONG +#undef SIZEOF_UNSIGNED___INT64 +#undef SIZEOF_UNSIGNED_CHAR_P +#undef SIZEOF_FLOAT +#undef SIZEOF_DOUBLE +#undef SIZEOF_LONG_DOUBLE + +#undef SIZEOF_SIZE_T +#undef SIZEOF_SSIZE_T +#undef SIZEOF_PTRDIFF_T + +#undef SIZEOF_MODE_T +#undef SIZEOF_UID_T +#undef SIZEOF_GID_T +#undef SIZEOF_PID_T + +/* + * If sizeof (mode_t) is < sizeof (int) and used with va_arg(), + * GCC4 will abort the code. So we need to use the promoted size. + */ +#if SIZEOF_MODE_T < SIZEOF_INT +#define PROMOTED_MODE_T int +#else +#define PROMOTED_MODE_T mode_t +#endif + +#undef SIZEOF_DEV_T +#undef SIZEOF_MAJOR_T +#undef SIZEOF_MINOR_T + +#undef SIZEOF_TIME_T +#undef SIZEOF_WCHAR /* sizeof (L'a') */ +#undef SIZEOF_WCHAR_T /* sizeof (wchar_t) */ + +#undef HAVE_LONGLONG /* Compiler defines long long type */ +#undef HAVE___INT64 /* Compiler defines __int64 type */ +#undef HAVE_LONGDOUBLE /* Compiler defines long double type */ +#undef CHAR_IS_UNSIGNED /* Compiler defines char to be unsigned */ + +#undef const /* Define to empty if const doesn't work */ +#undef uid_t /* To be used if uid_t is not present */ +#undef gid_t /* To be used if gid_t is not present */ +#undef size_t /* To be used if size_t is not present */ +#undef ssize_t /* To be used if ssize_t is not present */ +#undef ptrdiff_t /* To be used if ptrdiff_t is not present */ +#undef pid_t /* To be used if pid_t is not present */ +#undef off_t /* To be used if off_t is not present */ +#undef mode_t /* To be used if mode_t is not present */ +#undef time_t /* To be used if time_t is not present */ +#undef caddr_t /* To be used if caddr_t is not present */ +#undef daddr_t /* To be used if daddr_t is not present */ +#undef dev_t /* To be used if dev_t is not present */ +#undef major_t /* To be used if major_t is not present */ +#undef minor_t /* To be used if minor_t is not present */ +#undef ino_t /* To be used if ino_t is not present */ +#undef nlink_t /* To be used if nlink_t is not present */ +#undef blksize_t /* To be used if blksize_t is not present */ +#undef blkcnt_t /* To be used if blkcnt_t is not present */ + +#undef HAVE_TYPE_INTMAX_T /* if defines intmax_t */ +#undef HAVE_TYPE_UINTMAX_T /* if defines uintmax_t */ + +#undef int8_t /* To be used if int8_t is not present */ +#undef int16_t /* To be used if int16_t is not present */ +#undef int32_t /* To be used if int32_t is not present */ +#if defined(HAVE_LONGLONG) || defined(HAVE___INT64) +#undef int64_t /* To be used if int64_t is not present */ +#endif +#undef intmax_t /* To be used if intmax_t is not present */ +#undef uint8_t /* To be used if uint8_t is not present */ +#undef uint16_t /* To be used if uint16_t is not present */ +#undef uint32_t /* To be used if uint32_t is not present */ +#if defined(HAVE_LONGLONG) || defined(HAVE___INT64) +#undef uint64_t /* To be used if uint64_t is not present */ +#endif +#undef uintmax_t /* To be used if uintmax_t is not present */ + +#undef HAVE_TYPE_GREG_T /* if defines greg_t */ + +#undef HAVE_TYPE_RLIM_T /* if defines rlim_t */ +#undef HAVE_TYPE_IDTYPE_T /* if defines idtype_t */ +#undef HAVE_TYPE_SIGINFO_T /* if defines siginfo_t */ + +#undef HAVE_STACK_T /* if defines stack_t */ +#undef HAVE_SIGINFO_T /* if defines siginfo_t */ + +/* + * Important: Next Step needs time.h for clock_t (because of a bug) + */ +#undef clock_t /* To be used if clock_t is not present */ +#undef socklen_t /* To be used if socklen_t is not present */ + +/* + * These types are present on all UNIX systems but should be avoided + * for portability. + * On Apollo/Domain OS we don't have them.... + * + * Better include and use Uchar, Uint & Ulong + */ +#undef u_char /* To be used if u_char is not present */ +#undef u_short /* To be used if u_short is not present */ +#undef u_int /* To be used if u_int is not present */ +#undef u_long /* To be used if u_long is not present */ + +#undef wctype_t /* To be used if wctype_t is not in wchar.h */ +#undef wint_t /* To be used if wint_t is not in wchar.h */ +#undef mbstate_t /* To be used if mbstate_t is not in wchar.h */ + +#undef timestruc_t /* To be used if timestruc_t is not in sys/stat.h */ + +/*#undef HAVE_SIZE_T*/ +/*#undef NO_SIZE_T*/ +#undef VA_LIST_IS_ARRAY /* va_list is an array */ +#undef GETGROUPS_T +#define GID_T GETGROUPS_T + +/* + * Define as the return type of signal handlers (int or void). + */ +#undef RETSIGTYPE + +/* + * Defined in case that we have iconv(iconv_t, const char **, site_t *, ...) + */ +#undef HAVE_ICONV_CONST + +/* + * Defines needed to get large file support. + */ +#ifdef USE_LARGEFILES + +#undef HAVE_LARGEFILES + +#ifdef HAVE_LARGEFILES /* If we have working largefiles at all */ + /* This is not defined with glibc-2.1.3 */ + +#undef _FILE_OFFSET_BITS /* # of bits in off_t if settable */ +#undef _LARGEFILE_SOURCE /* To make ftello() visible (HP-UX 10.20). */ +#undef _LARGE_FILES /* Large file defined on AIX-style hosts. */ +#undef _XOPEN_SOURCE /* To make ftello() visible (glibc 2.1.3). */ + /* XXX We don't use this because glibc2.1.3*/ + /* XXX is bad anyway. If we define */ + /* XXX _XOPEN_SOURCE we will loose caddr_t */ + +#undef HAVE_FSEEKO /* Do we need this? If HAVE_LARGEFILES is */ + /* defined, we have fseeko() */ + +#endif /* HAVE_LARGEFILES */ +#endif /* USE_LARGEFILES */ + +#ifdef USE_ACL /* Enable/disable ACL support */ +/* + * The withdrawn POSIX.1e ACL draft support. + * It has been written in 1993 and withdrawn in 1997. + * Linux started to implement it in 2001. + */ +#undef HAVE_ACL_GET_FILE /* acl_get_file() function */ +#undef HAVE_ACL_SET_FILE /* acl_set_file() function */ +#undef HAVE_ACL_GET_ENTRY /* acl_get_entry() function */ +#undef HAVE_ACL_FROM_TEXT /* acl_from_text() function */ +#undef HAVE_ACL_TO_TEXT /* acl_to_text() function */ +#undef HAVE_ACL_TO_TEXT_NP /* acl_to_text_np() function */ +#undef HAVE_ACL_GET_BRAND_NP /* acl_get_brand_np() function */ +#undef HAVE_ACL_IS_TRIVIAL_NP /* acl_is_trivial_np() function */ +#undef HAVE_ACL_STRIP_NP /* acl_strip_np() function */ +#undef HAVE_ACL_FREE /* acl_free() function */ +#undef HAVE_ACL_DELETE_DEF_FILE /* acl_delete_def_file() function */ +#undef HAVE_ACL_EXTENDED_FILE /* acl_extended_file() function (Linux only)*/ + +#if defined(HAVE_ACL_GET_FILE) && defined(HAVE_ACL_SET_FILE) && \ + defined(HAVE_ACL_FROM_TEXT) && defined(HAVE_ACL_TO_TEXT) && \ + defined(HAVE_ACL_FREE) +# define HAVE_POSIX_ACL 1 /* Withdrawn POSIX draft ACL's present */ +#endif + +/* + * Sun UFS ACL support. + * Note: unfortunately, HP-UX has an (undocumented) acl() function in libc. + */ +#undef HAVE_ACL /* acl() function */ +#undef HAVE_FACL /* facl() function */ +#undef HAVE_ACLFROMTEXT /* aclfromtext() function */ +#undef HAVE_ACLTOTEXT /* acltotext() function */ + +/* + * NFSv4 ACL support. + * Note: There is an unfortunate name clash for acl_free() with the + * withdrawn POSIX.1e draft. We correct this below. + */ +#undef HAVE_ACL_GET /* acl_get() function */ +#undef HAVE_ACL_SET /* acl_set() function */ +#undef HAVE_FACL_GET /* facl_get() function */ +#undef HAVE_FACL_SET /* facl_set() function */ +#undef HAVE_ACL_FROMTEXT /* acl_fromtext() function */ +#undef HAVE_ACL_TOTEXT /* acl_totext() function */ + +#if !defined(HAVE_POSIX_ACL) +/* + * Cygwin used to implement the Sun UFS ACL interface but in 2016 + * moved towards the withdrawn POSIX draft. + * Make sure that we do not #define HAVE_POSIX_ACL and HAVE_SUN_ACL + * at the same time. + */ +#if defined(HAVE_ACL) && defined(HAVE_FACL) && \ + defined(HAVE_ACLFROMTEXT) && defined(HAVE_ACLTOTEXT) +# define HAVE_SUN_ACL 1 /* Sun UFS ACL's present */ +#endif +#endif /* !defined(HAVE_POSIX_ACL) */ + +#if defined(HAVE_ACL_GET) && defined(HAVE_ACL_SET) && \ + defined(HAVE_FACL_GET) && defined(HAVE_FACL_SET) && \ + defined(HAVE_ACL_FROMTEXT) && defined(HAVE_ACL_TOTEXT) +# define HAVE_ACL_FREE 1 /* acl_fre() function */ +# define HAVE_NFSV4_ACL 1 /* NFSv4 ACL's present */ +#endif + +#if defined(HAVE_ACL_GET_BRAND_NP) +#ifndef HAVE_NFSV4_ACL +# define HAVE_NFSV4_ACL 1 /* NFSv4 ACL's present */ +#endif +# define HAVE_FREEBSD_NFSV4_ACL 1 /* FreeBSD NFSv4 ACL implementation */ +#endif + +/* + * HP-UX ACL support. + * Note: unfortunately, HP-UX has an (undocumented) acl() function in libc. + */ +#undef HAVE_GETACL /* getacl() function */ +#undef HAVE_FGETACL /* fgetacl() function */ +#undef HAVE_SETACL /* setacl() function */ +#undef HAVE_FSETACL /* fsetacl() function */ +#undef HAVE_STRTOACL /* strtoacl() function */ +#undef HAVE_ACLTOSTR /* acltostr() function */ +#undef HAVE_CPACL /* cpacl() function */ +#undef HAVE_FCPACL /* fcpacl() function */ +#undef HAVE_CHOWNACL /* chownacl() function */ +#undef HAVE_SETACLENTRY /* setaclentry() function */ +#undef HAVE_FSETACLENTRY /* fsetaclentry() function */ + +#if defined(HAVE_GETACL) && defined(HAVE_FGETACL) && \ + defined(HAVE_SETACL) && defined(HAVE_FSETACL) && \ + defined(HAVE_STRTOACL) && defined(HAVE_ACLTOTEXT) +# define HAVE_HP_ACL 1 /* HP-UX ACL's present */ +#endif + +/* + * Global definition whether ACL support is present. + * As HP-UX differs too much from other implementations, HAVE_HP_ACL is not + * included in HAVE_ANY_ACL. + */ +#if defined(HAVE_POSIX_ACL) || defined(HAVE_SUN_ACL) || defined(HAVE_NFSV4_ACL) +# define HAVE_ANY_ACL 1 /* Any ACL implementation present */ +#endif + +#endif /* USE_ACL */ + +/* + * Misc CC / LD related stuff + */ +#undef NO_USER_MALLOC /* If we cannot define our own malloc() */ +#undef NO_USER_XCVT /* If we cannot define our own ecvt()/fcvt()/gcvt() */ +#undef HAVE_DYN_ARRAYS /* If the compiler allows dynamic sized arrays */ +#undef HAVE_PRAGMA_WEAK /* If the compiler allows #pragma weak */ +#undef HAVE_LINK_WEAK /* If the linker sees weak entries in other files */ +#undef HAVE_STRINGIZE /* If the cpp supports ANSI C stringize */ +#undef inline + +/* + * Strings that help to maintain OS/platform id's in C-programs + */ +#undef HOST_ALIAS /* Output from config.guess (orig) */ +#undef HOST_SUB /* Output from config.sub (modified) */ +#undef HOST_CPU /* CPU part from HOST_SUB */ +#undef HOST_VENDOR /* VENDOR part from HOST_SUB */ +#undef HOST_OS /* CPU part from HOST_SUB */ + + +/* + * Begin restricted code for quality assurance. + * + * Warning: you are not allowed to include the #define below if you are not + * using the Schily makefile system or if you modified the autoconfiguration + * tests. + * + * If you only added other tests you are allowed to keep this #define. + * + * This restiction is introduced because this way, I hope that people + * contribute to the project instead of creating branches. + */ +#define IS_SCHILY_XCONFIG +/* + * End restricted code for quality assurance. + */ + +#endif /* __XCONFIG_H */ diff -Nru cdrtools-2.01.01a33/btcflash/btcflash.1 cdrtools-3.02a09/btcflash/btcflash.1 --- cdrtools-2.01.01a33/btcflash/btcflash.1 2006-02-08 22:13:24.000000000 +0000 +++ cdrtools-3.02a09/btcflash/btcflash.1 2016-01-26 21:46:49.000000000 +0000 @@ -1,4 +1,4 @@ -.\" @(#)btcflash.1 1.2 06/02/08 Copyr 2006 J. Schilling +.\" @(#)btcflash.1 1.10 16/01/26 Copyr 2006-2016 J. Schilling .\" Manual page for btcflash .\" .if t .ds a \v'-0.55m'\h'0.00n'\z.\h'0.40n'\z.\v'0.55m'\h'-0.40n'a @@ -13,7 +13,7 @@ .if n .ds o oe .if n .ds u ue .if n .ds s sz -.TH BTCFLASH 1L "06/02/08" "J\*org Schilling" "Schily\'s USER COMMANDS" +.TH BTCFLASH 1L "2016/01/26" "J\*org Schilling" "Schily\'s USER COMMANDS" .SH NAME btcflash \- Firmware flash utility for BTC DRW1008 DVD+/-RW recorder .SH SYNOPSIS @@ -33,11 +33,54 @@ Be very careful when writing firmware as this program does not check for the correctness of the target device. .PP +.SS "Device naming" +For a list of possible device name parameters call +.B "btcflash \-scanbus +or +.B "btcflash dev=help +and then use the right +.B dev= +parameter based on the device listing. + +.SH OPTIONS +.TP +.B \-help +Prints a short summary of the +.B p +options and exists. +.TP +.B \-version +Print version information and exit. +.TP +.BI dev= target +Set the SCSI target for the CD/DVD/BluRay-Recorder, see notes above. +A typical target device specification is +.BI dev= 1,6,0 +\&. +If a filename must be provided together with the numerical target +specification, the filename is implementation specific. +The correct filename in this case can be found in the system specific +manuals of the target operating system. +On a +.I FreeBSD +system without +.I CAM +support, you need to use the control device (e.g. +.IR /dev/rcd0.ctl ). +A correct device specification in this case may be +.BI dev= /dev/rcd0.ctl:@ +\&. +.sp +.B \h'-2m'General SCSI addressing +.br The -.I device +.I target device +to the +.B dev= +option refers to .IR scsibus / target / lun -of the drive. Communication on +of the CD/DVD/BluRay-Recorder. Communication on .I SunOS is done with the SCSI general driver .B scg. @@ -48,7 +91,7 @@ or .B dev= .IR target , lun . -In the latter case, the drive has to be connected to the default +In the latter case, the CD/DVD/BluRay-Recorder has to be connected to the default SCSI bus of the machine. .IR Scsibus , .I target @@ -73,24 +116,44 @@ may be used instead of .B dev= .IR devicename : scsibus , target , lun . - -.PP +.sp +.B \h'-2m'Remote SCSI addressing +.br To access remote SCSI devices, you need to prepend the SCSI device name by a remote device indicator. The remote device indicator is either .BI REMOTE: user@host: or -.BR .BI REMOTE: host: -.br A valid remote SCSI device name may be: .BI REMOTE: user@host: to allow remote SCSI bus scanning or .BI REMOTE: user@host:1,0,0 to access the SCSI device at .I host -connected to SCSI bus # 1,target 0 lun 0. - -.PP +connected to SCSI bus # 1,target 0, lun 0. +In order to allow remote access to a specific +.IR host , +the +.BR rscsi (1) +program needs to be present and configured on the +.IR host . +.sp +.B \h'-2m'Alternate SCSI transports +.br +.B ATAPI +drives are just +.B SCSI +drives that inherently use the +.I "ATA packet interface +as +.B SCSI +command transport layer build into the IDE (ATA) transport. +You may need to specify an alternate transport layer on the command line +if your OS does not implement a fully integrated kernel driver subsystem that +allows to access any drive using +.B SCSI +commands via a single unique user interface. +.sp To access SCSI devices via alternate transport layers, you need to prepend the SCSI device name by a transport layer indicator. The transport layer indicator may be something like @@ -100,19 +163,19 @@ To get a list of supported transport layers for your platform, use .B dev= .IR HELP : - -.PP +.sp +.B \h'-2m'Portability Background +.br To make .B btcflash portable to all \s-2UNIX\s0 platforms, the syntax .B dev= .IR devicename : scsibus , target , lun -is preferred as is hides OS specific knowledge about device names from the user. -A specific OS must not necessarily support a way to specify a real device file name nor a +is preferred as it hides OS specific knowledge about device names from the user. +A specific OS may not necessarily support a way to specify a real device file name nor a way to specify .IR scsibus , target , lun . - -.PP +.sp .I Scsibus 0 is the default SCSI bus on the machine. Watch the boot messages for more information or look into @@ -123,53 +186,43 @@ should be used, try the .B \-scanbus option of -.BR btcflash . -.SH OPTIONS -.TP -.B \-help -Prints a short summary of the -.B p -options and exists. -.TP -.B \-version -Print version information and exit. -.TP -.BI dev= target -Sets the SCSI target for the drive, see notes above. -A typical device specification is -.BI dev= 6,0 -\&. -If a filename must be provided together with the numerical target -specification, the filename is implementation specific. -The correct filename in this case can be found in the system specific -manuals of the target operating system. -On a -.I FreeBSD -system without -.I CAM -support, you need to use the control device (e.g. -.IR /dev/rcd0.ctl ). -A correct device specification in this case may be -.BI dev= /dev/rcd0.ctl:@ -\&. -.sp -On Linux, drives connected to a parallel port adapter are mapped -to a virtual SCSI bus. Different adapters are mapped to different -targets on this virtual SCSI bus. +.B btcflash +described below. .sp +.B \h'-2m'Using logical names for devices +.br If no .I dev option is present, -.B cdrecord +.B btcflash will try to get the device from the .B CDR_DEVICE environment. .sp -If the argument to the +If a file /etc/default/cdrecord exists, and +if the argument to the .B dev= -option does not contain the characters ',', '/', '@' or ':', -it is interpreted as an label name that may be found in the file +option +or the +.B CDR_DEVICE +environment +does not contain the characters ',', '/', '@' or ':', +it is interpreted as a device label name that was defined in the file /etc/default/cdrecord (see FILES section). +.sp +.B \h'-2m'Autotarget Mode +.br +If no +.B dev= +option +and no +.B CDR_DEVICE +environment +is present, or if it +only contains a transport specifyer but no address notation, +.B btcflash +tries to scan the SCSI address space for CD-ROM drives. +If exactly one is found, this is used by default. .TP .BI timeout= # Set the default SCSI command timeout value to @@ -233,6 +286,13 @@ The numbers printed out as labels are computed by: .B "bus * 100 + target .TP +.BI scgopts= list +A comma separated list of SCSI options that are handled by libscg. +The implemented options may be uptated indepentendly from applications. +Currently, one option: +.B ignore\-resid +is supported to work around a Linux kernel bug. +.TP .BR ts= # Set the maximum transfer size for a single SCSI command to #. The syntax for the @@ -365,31 +425,27 @@ .PP Additional information can be found on: .br -http://www.fokus.fhg.de/usr/schilling/cdrecord.html +http://cdrecord.org/private/cdrecord.html .PP If you have support questions, send them to: .PP .B -cdrecord-support@berlios.de -.br -or -.B -other-cdwrite@lists.debian.org +cdrtools-support@lists.sourceforge.net .PP If you have definitely found a bug, send a mail to: .PP .B -cdrecord-developers@berlios.de +cdrtools-developers@lists.sourceforge.net .br or .B -schilling@fokus.fhg.de +joerg.schilling@fokus.fraunhofer.de .PP To subscribe, use: .PP .B -http://lists.berlios.de/mailman/listinfo/cdrecord-developers +https://lists.sourceforge.net/lists/listinfo/cdrtools-developers .br or .B -http://lists.berlios.de/mailman/listinfo/cdrecord-support +https://lists.sourceforge.net/lists/listinfo/cdrtools-support diff -Nru cdrtools-2.01.01a33/btcflash/btcflash.c cdrtools-3.02a09/btcflash/btcflash.c --- cdrtools-2.01.01a33/btcflash/btcflash.c 2007-07-28 14:26:36.000000000 +0000 +++ cdrtools-3.02a09/btcflash/btcflash.c 2017-07-15 16:12:55.000000000 +0000 @@ -1,7 +1,7 @@ -/* @(#)btcflash.c 1.11 07/07/28 2004 J. Schilling */ +/* @(#)btcflash.c 1.18 17/07/15 2004-2017 J. Schilling */ #ifndef lint -static char _sccsid[] = - "@(#)btcflash.c 1.11 07/07/28 2004 J. Schilling"; +static const char _sccsid[] = + "@(#)btcflash.c 1.18 17/07/15 2004-2017 J. Schilling"; #endif /*--------------------------------------------------------------------------*/ /* @@ -27,7 +27,7 @@ */ #ifdef DO_INCLUDE -#include +#include #include #include #include @@ -59,14 +59,15 @@ fwbuf = malloc(FLASHSIZE); if (!fwbuf) { - fprintf(stderr, "Could not allocate memory for firmware\n"); + fprintf(stderr, _("Could not allocate memory for firmware\n")); return (NULL); } f = fopen(firmware, "r"); if (!f) { - fprintf(stderr, "%s: Unable to open: ", firmware); + fprintf(stderr, _("%s: Unable to open: "), firmware); perror(NULL); + free(fwbuf); return (NULL); } @@ -78,7 +79,9 @@ if (ftell(f) == FLASHSIZE) { rewind(f); if (fread(fwbuf, 1, FLASHSIZE, f) != FLASHSIZE) { - fprintf(stderr, "%s: Short read\n", firmware); + fprintf(stderr, _("%s: Short read\n"), firmware); + fclose(f); + free(fwbuf); return (NULL); } fclose(f); @@ -100,20 +103,26 @@ type = getbyte(&p); if (length < 0 || offset < 0 || type < 0 || (type != 0 && length != 0)) { - errmsgno(EX_BAD, "Malformed line: %.79s\n", line); + errmsgno(EX_BAD, _("Malformed line: %.79s\n"), line); + fclose(f); + free(fwbuf); return (NULL); } else if (length == 0) { if (strncmp(line, ":00000155AA", 11) == 0) { if (++bank >= 16) { errmsgno(EX_BAD, - "Firmware file larger than 1MB\n"); + _("Firmware file larger than 1MB\n")); + fclose(f); + free(fwbuf); return (NULL); } continue; } else if (strncmp(line, ":00000001FF", 11) == 0) { break; } else { - errmsgno(EX_BAD, "Malformed line: %.79s\n", line); + errmsgno(EX_BAD, _("Malformed line: %.79s\n"), line); + fclose(f); + free(fwbuf); return (NULL); } } @@ -123,14 +132,18 @@ b = getbyte(&p); hexsum = (hexsum + b) & 0xff; if (b < 0) { - errmsgno(EX_BAD, "Short line: %.79s\n", line); + errmsgno(EX_BAD, _("Short line: %.79s\n"), line); + fclose(f); + free(fwbuf); return (NULL); } fwbuf[(bank << 16) | offset] = (char)b; } hexsum = (0x100 - hexsum) & 0xff; if (hexsum != getbyte(&p)) { - errmsgno(EX_BAD, "Checksum mismatch: %.79s", line); + errmsgno(EX_BAD, _("Checksum mismatch: %.79s\n"), line); + fclose(f); + free(fwbuf); return (NULL); } } @@ -138,7 +151,8 @@ fclose(f); if (bank != 15) { - errmsgno(EX_BAD, "Firmware file too small\n"); + errmsgno(EX_BAD, _("Firmware file too small\n")); + free(fwbuf); return (NULL); } @@ -201,42 +215,42 @@ unsigned short checksum; unsigned int offset; - printf("BTC DVD+/-RW firmware flash utility release %s %s\n", "1.11", "07/07/28"); - printf("USE AT YOUR OWN RISK!\n\n"); + printf(_("BTC DVD+/-RW firmware flash utility release %s %s\n"), "1.18", "17/07/15"); + printf(_("USE AT YOUR OWN RISK!\n\n")); if (!(fwbuf = loadfirmware(fwfile))) return (1); checksum = calcsum(fwbuf); - printf("Loaded firmware from %s\nFirmware checksum is %04X\n", + printf(_("Loaded firmware from %s\nFirmware checksum is %04X\n"), fwfile, checksum); if (inquiry(scgp, (char *)inq, 36) < 0) return (1); - printf("Drive is currently: [%.8s][%.16s][%.4s]\n", + printf(_("Drive is currently: [%.8s][%.16s][%.4s]\n"), inq+8, inq+16, inq+32); - printf("Firmware appears to be: [%.8s][%.16s][%.4s]\n\n", + printf(_("Firmware appears to be: [%.8s][%.16s][%.4s]\n\n"), fwbuf+0x40bc, fwbuf+0x40c4, fwbuf+0x40d4); if (strncmp((char *)inq + 8, (char *)fwbuf + 0x40bc, 24) != 0) printf( "**********************************************************\n"); - printf( - "WARNING! THIS FIRMWARE DOES NOT SEEM TO BE FOR THIS DRIVE!\n"); + printf( + _("WARNING! THIS FIRMWARE DOES NOT SEEM TO BE FOR THIS DRIVE!\n")); printf( "**********************************************************\n"); - printf("Type \"YES\" to proceed with flash: "); + printf(_("Type \"YES\" to proceed with flash: ")); fflush(stdout); fgets(confirm, sizeof (confirm), stdin); if (strcmp(confirm, "YES\n") != 0) { - printf("\nFlash canceled.\n"); + printf(_("\nFlash canceled.\n")); return (0); } - printf("\nUploading firmware...\n"); + printf(_("\nUploading firmware...\n")); /* Upload firmware */ for (offset = 0; offset < FLASHSIZE; offset += 0x1000) { @@ -245,7 +259,7 @@ 6 /* Download Microcode with Offsets */, 0 /* Buffer ID 0 */, offset + 0x20) < 0) { - errmsgno(EX_BAD, "Cannot write microcode\n"); + errmsgno(EX_BAD, _("Cannot write microcode\n")); return (1); } } @@ -258,21 +272,21 @@ if (write_buffer(scgp, (char *)csbuf, 0x20, 6 /* Download Microcode with Offsets */, 0 /* Buffer ID 0 */, - 0 /* Offset 0 */ - ) < 0) { - errmsgno(EX_BAD, "Cannot write microcode checksum\n"); + 0) /* Offset 0 */ + < 0) { + errmsgno(EX_BAD, _("Cannot write microcode checksum\n")); return (1); } - printf("Flashing drive...\n"); + printf(_("Flashing drive...\n")); /* Firmware uploaded; now flash it! */ if (write_buffer(scgp, NULL, 0, 7 /* Download Microcode with Offsets and Save */, 0 /* Buffer ID 0 */, - 0 /* Offset 0 */ - ) < 0) { - errmsgno(EX_BAD, "Cannot save microcode\n"); + 0) /* Offset 0 */ + < 0) { + errmsgno(EX_BAD, _("Cannot save microcode\n")); return (1); } @@ -285,9 +299,9 @@ if (inquiry(scgp, (char *)inq, 36) < 0) return (1); - printf("Drive is now: [%.8s][%.16s][%.4s]\n\n", + printf(_("Drive is now: [%.8s][%.16s][%.4s]\n\n"), inq+8, inq+16, inq+32); - printf("Please reboot before using the drive.\n"); + printf(_("Please reboot before using the drive.\n")); return (0); } diff -Nru cdrtools-2.01.01a33/btcflash/cd_misc.c cdrtools-3.02a09/btcflash/cd_misc.c --- cdrtools-2.01.01a33/btcflash/cd_misc.c 2006-10-05 19:07:47.000000000 +0000 +++ cdrtools-3.02a09/btcflash/cd_misc.c 1970-01-01 00:00:00.000000000 +0000 @@ -1,189 +0,0 @@ -/* @(#)cd_misc.c 1.14 06/10/05 Copyright 1997-2006 J. Schilling */ -#ifndef lint -static char sccsid[] = - "@(#)cd_misc.c 1.14 06/10/05 Copyright 1997-2006 J. Schilling"; -#endif -/* - * Misc CD support routines - * - * Copyright (c) 1997-2006 J. Schilling - */ -/* - * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. - * - * See the file CDDL.Schily.txt in this distribution for details. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file CDDL.Schily.txt from this distribution. - */ - -#include -#include -#include /* Includes for caddr_t */ -#include -#include - -#include "cdrecord.h" - -EXPORT int from_bcd __PR((int b)); -EXPORT int to_bcd __PR((int i)); -EXPORT long msf_to_lba __PR((int m, int s, int f, BOOL force_positive)); -EXPORT BOOL lba_to_msf __PR((long lba, msf_t *mp)); -EXPORT void sec_to_msf __PR((long sec, msf_t *mp)); -EXPORT void print_min_atip __PR((long li, long lo)); -EXPORT BOOL is_cdspeed __PR((int speed)); - -EXPORT int -from_bcd(b) - int b; -{ - return ((b & 0x0F) + 10 * (((b)>> 4) & 0x0F)); -} - -EXPORT int -to_bcd(i) - int i; -{ - return (i % 10 | ((i / 10) % 10) << 4); -} - -EXPORT long -msf_to_lba(m, s, f, force_positive) - int m; - int s; - int f; - BOOL force_positive; -{ - long ret = m * 60 + s; - - ret *= 75; - ret += f; - if (m < 90 || force_positive) - ret -= 150; - else - ret -= 450150; - return (ret); -} - -EXPORT BOOL -lba_to_msf(lba, mp) - long lba; - msf_t *mp; -{ - int m; - int s; - int f; - -#ifdef __follow_redbook__ - if (lba >= -150 && lba < 405000) { /* lba <= 404849 */ -#else - if (lba >= -150) { -#endif - m = (lba + 150) / 60 / 75; - s = (lba + 150 - m*60*75) / 75; - f = (lba + 150 - m*60*75 - s*75); - - } else if (lba >= -45150 && lba <= -151) { - m = (lba + 450150) / 60 / 75; - s = (lba + 450150 - m*60*75) / 75; - f = (lba + 450150 - m*60*75 - s*75); - - } else { - mp->msf_min = -1; - mp->msf_sec = -1; - mp->msf_frame = -1; - - return (FALSE); - } - mp->msf_min = m; - mp->msf_sec = s; - mp->msf_frame = f; - - if (lba > 404849) /* 404850 -> 404999: lead out */ - return (FALSE); - return (TRUE); -} - -EXPORT void -sec_to_msf(sec, mp) - long sec; - msf_t *mp; -{ - int m; - int s; - int f; - - m = (sec) / 60 / 75; - s = (sec - m*60*75) / 75; - f = (sec - m*60*75 - s*75); - - mp->msf_min = m; - mp->msf_sec = s; - mp->msf_frame = f; -} - -EXPORT void -print_min_atip(li, lo) - long li; - long lo; -{ - msf_t msf; - - if (li < 0) { - lba_to_msf(li, &msf); - - printf(" ATIP start of lead in: %ld (%02d:%02d/%02d)\n", - li, msf.msf_min, msf.msf_sec, msf.msf_frame); - } - if (lo > 0) { - lba_to_msf(lo, &msf); - printf(" ATIP start of lead out: %ld (%02d:%02d/%02d)\n", - lo, msf.msf_min, msf.msf_sec, msf.msf_frame); - } -} - -/* - * Make a probability guess whether the speed is related to CD or DVD speed. - */ -EXPORT BOOL -is_cdspeed(speed) - int speed; -{ - int cdspeed; - long cdrest; - int dvdspeed; - long dvdrest; - - cdspeed = speed / 176; - cdrest = cdspeed * 1764; - cdrest = speed * 10 - cdrest; - if (cdrest < 0) - cdrest *= -1; - if (cdrest > 1764/2) - cdrest = 1764 - cdrest; - - /* - * 3324 = 1382 * 2.4 - * speed > 0.9 * 3324 && speed < 1.1 * 3324 - */ - if (speed >= 2990 && speed <= 3656) { - dvdrest = 33240; - dvdrest = speed * 10 - dvdrest; - } else { - dvdspeed = speed / 1385; - dvdrest = dvdspeed * 13850; - dvdrest = speed * 10 - dvdrest; - } - if (dvdrest < 0) - dvdrest *= -1; - if (dvdrest > 13850/2) - dvdrest = 13850 - dvdrest; - - /* - * 1385 / 176.4 = 7.85, so we need to multiply the CD rest by 7.85 - */ - return (dvdrest > (cdrest*8 - cdrest/6)); -} diff -Nru cdrtools-2.01.01a33/btcflash/cdrecord.h cdrtools-3.02a09/btcflash/cdrecord.h --- cdrtools-2.01.01a33/btcflash/cdrecord.h 2007-08-09 22:10:00.000000000 +0000 +++ cdrtools-3.02a09/btcflash/cdrecord.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,1206 +0,0 @@ -/* @(#)cdrecord.h 1.194 07/08/10 Copyright 1995-2007 J. Schilling */ -/* - * Definitions for cdrecord - * - * Copyright (c) 1995-2007 J. Schilling - */ -/* - * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. - * - * See the file CDDL.Schily.txt in this distribution for details. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file CDDL.Schily.txt from this distribution. - */ - -/* - * Make sure it is there. We need it for off_t. - */ -#ifndef _INCL_SYS_TYPES_H -#include -#define _INCL_SYS_TYPES_H -#endif - -#ifndef _SCHILY_UTYPES_H -#include -#endif - -/* - * Defines for command line option flags - */ -#define F_DUMMY 0x00000001L /* Do dummy (simulation) writes */ -#define F_TOC 0x00000002L /* Get TOC */ -#define F_EJECT 0x00000004L /* Eject disk after doing the work */ -#define F_LOAD 0x00000008L /* Load disk only */ -#define F_MULTI 0x00000010L /* Create linkable TOC/multi-session */ -#define F_MSINFO 0x00000020L /* Get multi-session info */ -#define F_FIX 0x00000040L /* Fixate disk only */ -#define F_NOFIX 0x00000080L /* Do not fixate disk */ -#define F_VERSION 0x00000100L /* Print version info */ -#define F_CHECKDRIVE 0x00000200L /* Check for driver */ -#define F_INQUIRY 0x00000400L /* Do inquiry */ -#define F_PRCAP 0x00000800L /* Print capabilities */ -#define F_SCANBUS 0x00001000L /* Scan SCSI Bus */ -#define F_RESET 0x00002000L /* Reset SCSI Bus */ -#define F_BLANK 0x00004000L /* Blank CD-RW */ -#define F_PRATIP 0x00008000L /* Print ATIP info */ -#define F_PRDINFO 0x00010000L /* Print disk info (XXX not yet used) */ -#define F_IGNSIZE 0x00020000L /* Ignore disk size */ -#define F_SAO 0x00040000L /* Session at once */ -#define F_RAW 0x00080000L /* Raw mode */ -#define F_WRITE 0x00100000L /* Disk is going to be written */ -#define F_FORCE 0x00200000L /* Force things (e.g. blank on dead disk) */ -#define F_WAITI 0x00400000L /* Wait until data is available on stdin */ -#define F_OVERBURN 0x00800000L /* Allow oveburning */ -#define F_CLONE 0x01000000L /* Do clone writing */ -#define F_STDIN 0x02000000L /* We are using stdin as CD data */ -#define F_IMMED 0x04000000L /* Try tu use IMMED SCSI flag if possible */ -#define F_DLCK 0x08000000L /* Load disk and lock door */ -#define F_SETDROPTS 0x10000000L /* Set driver opts and exit */ -#define F_FORMAT 0x20000000L /* Format media */ -#define F_ABORT 0x40000000L /* Send abort sequence to drive */ -#ifdef PROTOTYPES -#define F_MEDIAINFO 0x80000000UL /* Print media info */ -#else -#define F_MEDIAINFO 0x80000000L /* Print media info */ -#endif - -/* - * Defines for command extended line option flags2 - */ -#define F2_XX 0x01 /* Not yet */ - -#ifdef min -#undef min -#endif -#define min(a, b) ((a) < (b) ? (a):(b)) - -#ifdef max -#undef max -#endif -#define max(a, b) ((a) < (b) ? (b):(a)) - -#undef roundup -#define roundup(x, y) ((((x)+((y)-1))/(y))*(y)) - -/* - * NOTICE: You should not make CDR_BUF_SIZE more than - * the buffer size of the CD-Recorder. - * - * The Philips CDD 521 is the recorder with the smallest buffer. - * It only has 256kB of buffer RAM. - * - * WARNING: Philips CDD 521 dies if CDR_BUF_SIZE is to big. - * If you like to support the CDD 521 keep the buffer - * at 63kB. - */ -/*#define CDR_BUF_SIZE (126*1024)*/ -#define CDR_BUF_SIZE (63*1024) -#define CDR_MAX_BUF_SIZE (256*1024) - -/* - * Never set MIN_GRACE_TIME < 3 seconds. We need to give - * the volume management a chance to settle before we - * start writing. - */ -#ifndef MIN_GRACE_TIME -#define MIN_GRACE_TIME 3 /* 3 seconds */ -#endif -#ifndef GRACE_TIME -#define GRACE_TIME 9 /* 9 seconds */ -#endif - -/* - * Some sector sizes used for reading/writing ... - */ -#define DATA_SEC_SIZE 2048 /* 2048 bytes */ -#define MODE2_SEC_SIZE 2336 /* 2336 bytes */ -#define AUDIO_SEC_SIZE 2352 /* 2352 bytes */ -#define RAW16_SEC_SIZE (2352+16) /* 2368 bytes */ -#define RAW96_SEC_SIZE (2352+96) /* 2448 bytes */ - -#define MAX_TRACK 99 /* Red Book track limit */ - -#define PAD_SECS 15 /* NOTE: pad must be less than BUF_SIZE */ -#define PAD_SIZE (PAD_SECS * DATA_SEC_SIZE) - -/* - * FIFO size must be at least 2x CDR_MAX_BUF_SIZE - */ -#define DEFAULT_FIFOSIZE (4L*1024L*1024L) - -#if !defined(HAVE_LARGEFILES) && SIZEOF_LLONG > SIZEOF_LONG -typedef Llong tsize_t; -#else -typedef off_t tsize_t; -#endif - -#ifdef nono -typedef struct tindex { - int dummy; /* Not yet implemented */ -} tindex_t; -#endif - -typedef struct ofile { - struct ofile *next; /* Next open file */ - int f; /* Open file */ - char *filename; /* File name */ - int refcnt; /* open reference count */ -} ofile_t; - -typedef struct track { - void *xfp; /* Open file for this track from xopen()*/ - char *filename; /* File name for this track */ - - tsize_t itracksize; /* Size of track bytes (-1 == until EOF)*/ - /* This is in units of isecsize */ - tsize_t tracksize; /* Size of track bytes (-1 == until EOF)*/ - /* This is in units of secsize */ - - long trackstart; /* Start sector # of this track */ - long tracksecs; /* Size of this track (sectors) */ - long padsecs; /* Pad size for this track (sectors) */ - long pregapsize; /* Pre-gap size for this track (sectors)*/ - long index0start; /* Index 0 start within this tr(sectors)*/ - int isecsize; /* Read input sector size for this track*/ - int secsize; /* Sector size for this track (bytes) */ - int secspt; /* # of sectors to copy for one transfer*/ - int pktsize; /* # of blocks per write packet */ - Uchar dataoff; /* offset of user data in raw sector */ - Uchar tracks; /* Number of tracks on this disk */ - Uchar track; /* Track # as offset in track[] array */ - Uchar trackno; /* Track # on disk for this track */ - Uchar tracktype; /* Track type (toc type) */ - Uchar dbtype; /* Data block type for this track */ - int sectype; /* Sector type */ - int flags; /* Flags (see below) */ - int nindex; /* Number of indices for track */ - long *tindex; /* Track index descriptor */ - char *isrc; /* ISRC code for this track / disk MCN */ - void *text; /* Opaque CD-Text data (txtptr_t *) */ -} track_t; - -#define track_base(tp) ((tp) - (tp)->track) - -/* - * Defines for tp->flags - */ -#define TI_AUDIO 0x00001 /* File is an audio track */ -#define TI_PREEMP 0x00002 /* Audio track recorded w/preemphasis */ -#define TI_MIX 0x00004 /* This is a mixed mode track */ -#define TI_RAW 0x00008 /* Write this track in raw mode */ -#define TI_PAD 0x00010 /* Pad data track */ -#define TI_SWAB 0x00020 /* Swab audio data */ -#define TI_ISOSIZE 0x00040 /* Use iso size for track */ -#define TI_NOAUHDR 0x00080 /* Don't look for audio header */ -#define TI_FIRST 0x00100 /* This is the first track */ -#define TI_LAST 0x00200 /* This is the last track */ -#define TI_PACKET 0x00400 /* Fixed- or variable-packet track */ -#define TI_NOCLOSE 0x00800 /* Don't close the track after writing */ -#define TI_TAO 0x01000 /* This track is written in TAO mode */ -#define TI_PREGAP 0x02000 /* Prev. track incl. pregap of this tr. */ -#define TI_SCMS 0x04000 /* Force to follow the SCMS rules */ -#define TI_COPY 0x08000 /* Allow digital copy */ -#define TI_SHORT_TRACK 0x10000 /* Ignore min 4 second Red Book std. */ -#define TI_RAW16 0x20000 /* This track uses 16 bytes subch. */ -#define TI_RAW96R 0x40000 /* This track uses 96 bytes RAW subch. */ -#define TI_CLONE 0x80000 /* Special clone treatment needed */ -#define TI_TEXT 0x100000 /* This track holds CD-Text information */ -#define TI_NOCD 0x200000 /* We are not writing a CD track */ -#define TI_SAO 0x400000 /* This track is written in SAO mode */ -#define TI_USEINFO 0x800000 /* Use information from *.inf files */ -#define TI_QUADRO 0x1000000 /* Four Channel Audio Data */ - - -#define is_audio(tp) (((tp)->flags & TI_AUDIO) != 0) -#define is_preemp(tp) (((tp)->flags & TI_PREEMP) != 0) -#define is_pad(tp) (((tp)->flags & TI_PAD) != 0) -#define is_swab(tp) (((tp)->flags & TI_SWAB) != 0) -#define is_first(tp) (((tp)->flags & TI_FIRST) != 0) -#define is_last(tp) (((tp)->flags & TI_LAST) != 0) -#define is_packet(tp) (((tp)->flags & TI_PACKET) != 0) -#define is_noclose(tp) (((tp)->flags & TI_NOCLOSE) != 0) -#define is_tao(tp) (((tp)->flags & TI_TAO) != 0) -#define is_sao(tp) (((tp)->flags & TI_SAO) != 0) -#define is_raw(tp) (((tp)->flags & TI_RAW) != 0) -#define is_raw16(tp) (((tp)->flags & TI_RAW16) != 0) -#define is_raw96(tp) (((tp)->flags & (TI_RAW|TI_RAW16)) == TI_RAW) -#define is_raw96p(tp) (((tp)->flags & (TI_RAW|TI_RAW16|TI_RAW96R)) == TI_RAW) -#define is_raw96r(tp) (((tp)->flags & (TI_RAW|TI_RAW16|TI_RAW96R)) == (TI_RAW|TI_RAW96R)) -#define is_pregap(tp) (((tp)->flags & TI_PREGAP) != 0) -#define is_scms(tp) (((tp)->flags & TI_SCMS) != 0) -#define is_copy(tp) (((tp)->flags & TI_COPY) != 0) -#define is_shorttrk(tp) (((tp)->flags & TI_SHORT_TRACK) != 0) -#define is_clone(tp) (((tp)->flags & TI_CLONE) != 0) -#define is_text(tp) (((tp)->flags & TI_TEXT) != 0) -#define is_quadro(tp) (((tp)->flags & TI_QUADRO) != 0) - -/* - * Defines for toc type / track type - */ -#define TOC_DA 0 /* CD-DA */ -#define TOC_ROM 1 /* CD-ROM */ -#define TOC_XA1 2 /* CD_ROM XA with first track in mode 1 */ -#define TOC_XA2 3 /* CD_ROM XA with first track in mode 2 */ -#define TOC_CDI 4 /* CDI */ - -#define TOC_MASK 7 /* Mask needed for toctname[] */ - -/* - * Additional flags in toc type / trackp->tracktype - * XXX TOCF_DUMMY istr schon in dp->cdr_cmdflags & F_DUMMY - * XXX TOCF_MULTI istr schon in dp->cdr_cmdflags & F_MULTI - */ -#define TOCF_DUMMY 0x10 /* Write in dummy (simulation) mode */ -#define TOCF_MULTI 0x20 /* Multisession (Open Next Programarea) */ - -#define TOCF_MASK 0xF0 /* All possible flags in tracktype */ - -extern char *toc2name[]; /* Convert toc type to name */ -extern int toc2sess[]; /* Convert toc type to session format */ - -/* - * Defines for sector type - * - * Mode is 2 bits - * Aud is 1 bit - * - * Sector is: aud << 2 | mode - */ -#define ST_ROM_MODE1 1 /* CD-ROM in mode 1 (vanilla cdrom) */ -#define ST_ROM_MODE2 2 /* CD-ROM in mode 2 */ -#define ST_AUDIO_NOPRE 4 /* CD-DA stereo without preemphasis */ -#define ST_AUDIO_PRE 5 /* CD-DA stereo with preemphasis */ - -#define ST_PREEMPMASK 0x01 /* Mask for preemphasis bit */ -#define ST_AUDIOMASK 0x04 /* Mask for audio bit */ -#define ST_MODEMASK 0x03 /* Mask for mode bits in sector type */ -#define ST_MASK 0x07 /* Mask needed for sectname[] */ - -/* - * There are 6 different generic basic sector types. - */ -#define ST_MODE_AUDIO 0x00 /* Generic Audio mode */ -#define ST_MODE_0 0x10 /* Generic Zero mode */ -#define ST_MODE_1 0x20 /* Generic CD-ROM mode (ISO/IEC 10149) */ -#define ST_MODE_2 0x30 /* Generic Mode 2 (ISO/IEC 10149) */ -#define ST_MODE_2_FORM_1 0x40 /* Generic Mode 2 form 1 */ -#define ST_MODE_2_FORM_2 0x50 /* Generic Mode 2 form 2 */ -#define ST_MODE_2_MIXED 0x60 /* Generic Mode 2 mixed form (1/2) */ - -#define ST_MODE_MASK 0x70 /* Mask needed to get generic sectype */ - -#define ST_MODE_RAW 0x08 /* Do not touch EDC & subchannels */ -#define ST_NOSCRAMBLE 0x80 /* Do not srcamble sectors */ - -#define SECT_AUDIO (ST_AUDIO_NOPRE | ST_MODE_AUDIO) -#define SECT_AUDIO_NOPRE (ST_AUDIO_NOPRE | ST_MODE_AUDIO) -#define SECT_AUDIO_PRE (ST_AUDIO_PRE | ST_MODE_AUDIO) -#define SECT_MODE_0 (ST_ROM_MODE1 | ST_MODE_0) -#define SECT_ROM (ST_ROM_MODE1 | ST_MODE_1) -#define SECT_MODE_2 (ST_ROM_MODE2 | ST_MODE_2) -#define SECT_MODE_2_F1 (ST_ROM_MODE2 | ST_MODE_2_FORM_1) -#define SECT_MODE_2_F2 (ST_ROM_MODE2 | ST_MODE_2_FORM_2) -#define SECT_MODE_2_MIX (ST_ROM_MODE2 | ST_MODE_2_MIXED) - -extern char *st2name[]; /* Convert sector type to name */ -extern int st2mode[]; /* Convert sector type to control nibble*/ - -/* - * Control nibble bits: - * - * 0 with preemphasis (audio) / incremental (data) - * 1 digital copy permitted - * 2 data (not audio) track - * 3 4 channels (not 2) - */ -#define TM_PREEM 0x1 /* Audio track with preemphasis */ -#define TM_INCREMENTAL 0x1 /* Incremental data track */ -#define TM_ALLOW_COPY 0x2 /* Digital copy permitted */ -#define TM_DATA 0x4 /* This is a data track */ -#define TM_QUADRO 0x8 /* Four channel audio */ - -/* - * Adr nibble: - */ -#define ADR_NONE 0 /* Sub-Q mode info not supplied */ -#define ADR_POS 1 /* Sub-Q encodes position data */ -#define ADR_MCN 2 /* Sub-Q encodes Media Catalog Number */ -#define ADR_ISRC 3 /* Sub-Q encodes ISRC */ - -/* - * Defines for write type (from SCSI-3/mmc) - */ -#define WT_PACKET 0x0 /* Packet writing */ -#define WT_TAO 0x1 /* Track at once */ -#define WT_SAO 0x2 /* Session at once */ -#define WT_RAW 0x3 /* Raw */ -#define WT_LAYER_JUMP 0x4 /* DVD-R/DL Layer jump */ -#define WT_RES_5 0x5 /* Reserved */ -#define WT_RES_6 0x6 /* Reserved */ -#define WT_RES_7 0x7 /* Reserved */ -#define WT_RES_8 0x8 /* Reserved */ -#define WT_RES_9 0x9 /* Reserved */ -#define WT_RES_A 0xA /* Reserved */ -#define WT_RES_B 0xB /* Reserved */ -#define WT_RES_C 0xC /* Reserved */ -#define WT_RES_D 0xD /* Reserved */ -#define WT_RES_E 0xE /* Reserved */ -#define WT_RES_F 0xF /* Reserved */ - -/* - * Data block layout: - * - * - Sync pattern 12 Bytes: 0x00 0xFF 0xFF ... 0xFF 0xFF 0x00 - * - Block header 4 Bytes: | minute | second | frame | mode | - * Mode byte: - * Bits 7, 6, 5 Run-in/Run-out/Link - * Bits 4, 3, 2 Reserved - * Bits 1, 0 Mode - * - Rest of sector see below. - * - * Mode 0 Format: - * 0 12 Bytes Sync header - * 12 4 Bytes Block header with Data mode == 0 - * 16 2336 Bytes of zero data - * - * Mode 1 Format: - * 0 12 Bytes Sync header - * 12 4 Bytes Block header with Data mode == 1 - * 16 2048 Bytes of user data - * 2064 4 Bytes CRC for Bytes 0-2063 - * 2068 8 Bytes Zero fill - * 2076 172 Bytes P parity symbols - * 2248 104 Bytes Q parity symbols - * - * Mode 2 Format (formless): - * 0 12 Bytes Sync header - * 12 4 Bytes Block header with Data mode == 2 - * 16 2336 Bytes of user data - * - * Mode 2 form 1 Format: - * 0 12 Bytes Sync header - * 12 4 Bytes Block header with Data mode == 2 - * 16 4 Bytes subheader first copy - * 20 4 Bytes subheader second copy - * 24 2048 Bytes of user data - * 2072 4 Bytes CRC for Bytes 16-2071 - * 2076 172 Bytes P parity symbols - * 2248 104 Bytes Q parity symbols - * - * Mode 2 form 2 Format: - * 0 12 Bytes Sync header - * 12 4 Bytes Block header with Data mode == 2 - * 16 4 Bytes subheader first copy - * 20 4 Bytes subheader second copy - * 24 2324 Bytes of user data - * 2348 4 Bytes Optional CRC for Bytes 16-2347 - */ - -/* - * Mode Byte definitions (the 4th Byte in the Block header) - */ -#define SH_MODE_DATA 0x00 /* User Data Block */ -#define SH_MODE_RI4 0x20 /* Fourth run in Block */ -#define SH_MODE_RI3 0x40 /* Third run in Block */ -#define SH_MODE_RI2 0x60 /* Second run in Block */ -#define SH_MODE_RI1 0x80 /* First run in Block */ -#define SH_MODE_LINK 0xA0 /* Link Block */ -#define SH_MODE_RO2 0xC0 /* Second run out Block */ -#define SH_MODE_RO1 0xE0 /* First run out Block */ -#define SH_MODE_M0 0x00 /* Mode 0 Data */ -#define SH_MODE_M1 0x01 /* Mode 1 Data */ -#define SH_MODE_M2 0x02 /* Mode 2 Data */ -#define SH_MODE_MR 0x03 /* Reserved */ - -/* - * Defines for data block type (from SCSI-3/mmc) - * - * Mandatory are only: - * DB_ROM_MODE1 (8) Mode 1 (ISO/IEC 10149) - * DB_XA_MODE2 (10) Mode 2-F1 (CD-ROM XA form 1) - * DB_XA_MODE2_MIX (13) Mode 2-MIX (CD-ROM XA 1/2+subhdr) - */ -#define DB_RAW 0 /* 2352 bytes of raw data */ -#define DB_RAW_PQ 1 /* 2368 bytes (raw data + P/Q Subchannel) */ -#define DB_RAW_PW 2 /* 2448 bytes (raw data + P-W Subchannel) */ -#define DB_RAW_PW_R 3 /* 2448 bytes (raw data + P-W raw Subchannel)*/ -#define DB_RES_4 4 /* - Reserved */ -#define DB_RES_5 5 /* - Reserved */ -#define DB_RES_6 6 /* - Reserved */ -#define DB_VU_7 7 /* - Vendor specific */ -#define DB_ROM_MODE1 8 /* 2048 bytes Mode 1 (ISO/IEC 10149) */ -#define DB_ROM_MODE2 9 /* 2336 bytes Mode 2 (ISO/IEC 10149) */ -#define DB_XA_MODE2 10 /* 2048 bytes Mode 2 (CD-ROM XA form 1) */ -#define DB_XA_MODE2_F1 11 /* 2056 bytes Mode 2 (CD-ROM XA form 1) */ -#define DB_XA_MODE2_F2 12 /* 2324 bytes Mode 2 (CD-ROM XA form 2) */ -#define DB_XA_MODE2_MIX 13 /* 2332 bytes Mode 2 (CD-ROM XA 1/2+subhdr) */ -#define DB_RES_14 14 /* - Reserved */ -#define DB_VU_15 15 /* - Vendor specific */ - -extern char *db2name[]; /* Convert data block type to name */ - -/* - * Defines for multi session type (from SCSI-3/mmc) - */ -#define MS_NONE 0 /* No B0 pointer. Next session not allowed*/ -#define MS_FINAL 1 /* B0 = FF:FF:FF. Next session not allowed*/ -#define MS_RES 2 /* Reserved */ -#define MS_MULTI 3 /* B0 = Next PA. Next session allowed */ - -/* - * Defines for session format (from SCSI-3/mmc) - */ -#define SES_DA_ROM 0x00 /* CD-DA or CD-ROM disk */ -#define SES_CDI 0x10 /* CD-I disk */ -#define SES_XA 0x20 /* CD-ROM XA disk */ -#define SES_UNDEF 0xFF /* Undefined disk type (read disk info) */ - -/* - * Defines for blanking of CD-RW discs (from SCSI-3/mmc) - */ -#define BLANK_DISC 0x00 /* Erase the entire disc */ -#define BLANK_MINIMAL 0x01 /* Erase the PMA, 1st session TOC, pregap */ -#define BLANK_TRACK 0x02 /* Erase an incomplete track */ -#define BLANK_UNRESERVE 0x03 /* Unreserve a track */ -#define BLANK_TAIL 0x04 /* Erase the tail of a track */ -#define BLANK_UNCLOSE 0x05 /* Unclose the last session */ -#define BLANK_SESSION 0x06 /* Erase the last session */ - -/* - * Useful definitions for audio tracks - */ -#define msample (44100 * 2) /* one 16bit audio sample */ -#define ssample (msample * 2) /* one stereo sample */ -#define samples(v) ((v) / ssample) /* # of stereo samples */ -#define hsamples(v) ((v) / (ssample/100)) /* 100* # of stereo samples/s*/ -#define fsamples(v) ((v) / (ssample/75)) /* 75* # of stereo samples/s */ - -#define minutes(v) ((int)(samples(v) / 60)) -#define seconds(v) ((int)(samples(v) % 60)) -#define hseconds(v) ((int)(hsamples(v) % 100)) -#define frames(v) ((int)(fsamples(v) % 75)) - -/* - * sector based macros - */ -#define Sminutes(s) ((int)((s) / (60*75))) -#define Sseconds(s) ((int)((s) / 75)) -#define Shseconds(s) ((int)(((s) % 75)*100)/75) -#define Sframes(s) ((int)((s) % 75)) - -typedef struct msf { - char msf_min; - char msf_sec; - char msf_frame; -} msf_t; - -/* - * Definitions for read TOC/PMA/ATIP command - */ -#define FMT_TOC 0 -#define FMT_SINFO 1 -#define FMT_FULLTOC 2 -#define FMT_PMA 3 -#define FMT_ATIP 4 -#define FMT_CDTEXT 5 - -/* - * Definitions for read disk information "recording flags" - * used in UInt16_t "ds_cdrflags". - */ -#define RF_WRITE 0x0001 /* Disk is going to be written */ -#define RF_BLANK 0x0002 /* Disk is going to be erased */ -#define RF_PRATIP 0x0004 /* Print ATIP info */ -#define RF_LEADIN 0x0008 /* Lead-in has been "manually" written */ -#define RF_BURNFREE 0x0010 /* BUFFER underrun free recording */ -#define RF_VARIREC 0x0020 /* Plextor VariRec */ -#define RF_AUDIOMASTER 0x0040 /* Yamaha AudioMaster */ -#define RF_FORCESPEED 0x0080 /* WriteSpeed forced high */ -#define RF_DID_STAT 0x0100 /* Already did call cdrstats() */ -#define RF_DID_CDRSTAT 0x0200 /* Already did call (*dp->cdr_stats)() */ -#define RF_WR_WAIT 0x0400 /* Wait during writing to free bus */ -#define RF_SINGLESESS 0x0800 /* Plextor single sess. mode */ -#define RF_HIDE_CDR 0x1000 /* Plextor hide CDR features */ -#define RF_SPEEDREAD 0x2000 /* Plextor SpeedReed */ -#define RF_GIGAREC 0x4000 /* Plextor GigaRec */ - -/* - * Definitions for read disk information "disk status" - * used in "ds_diskstat". - */ -#define DS_EMPTY 0 /* Empty disk */ -#define DS_APPENDABLE 1 /* Incomplete disk (appendable) */ -#define DS_COMPLETE 2 /* Complete disk (closed/no B0 pointer) */ -#define DS_RESERVED 3 /* Reserved */ - -/* - * Definitions for read disk information "session status" - * used in "ds_sessstat". - */ -#define SS_EMPTY 0 /* Empty session */ -#define SS_APPENDABLE 1 /* Incomplete session */ -#define SS_RESERVED 2 /* Reserved */ -#define SS_COMPLETE 3 /* Complete session (needs DS_COMPLETE) */ - -/* - * Definitions for disk_status write mode - * used in "ds_wrmode". - */ -#define WM_NONE 0 /* No write mode selected */ -#define WM_BLANK 1 /* Blanking mode */ -#define WM_FORMAT 2 /* Formatting */ -#define WM_PACKET 4 /* Packet writing */ -#define WM_TAO 8 /* Track at Once */ -#define WM_SAO 12 /* Session at Once w/ cooked sectors */ -#define WM_SAO_RAW16 13 /* Session at Once RAW+16 byte sectors */ -#define WM_SAO_RAW96P 14 /* Session at Once RAW+96P byte sectors */ -#define WM_SAO_RAW96R 15 /* Session at Once RAW+96R byte sectors */ -#define WM_RAW 16 /* RAW with cooked sectors is impossible*/ -#define WM_RAW_RAW16 17 /* RAW with RAW+16 byte sectors */ -#define WM_RAW_RAW96P 18 /* RAW with RAW+96P byte sectors */ -#define WM_RAW_RAW96R 19 /* RAW with RAW+96R byte sectors */ - -#define wm_base(wm) ((wm)/4*4) /* The basic write mode for this mode */ - -/* - * Definitions for disk_status flags - * used in UInt16_t "ds_flags". - */ -#define DSF_DID_V 0x0001 /* Disk id valid */ -#define DSF_DBC_V 0x0002 /* Disk bar code valid */ -#define DSF_URU 0x0004 /* Disk is for unrestricted use */ -#define DSF_ERA 0x0008 /* Disk is erasable */ -#define DSF_HIGHSP_ERA 0x0010 /* Disk is high speed erasable */ -#define DSF_ULTRASP_ERA 0x0020 /* Disk is ultra speed erasable */ -#define DSF_ULTRASPP_ERA 0x0040 /* Disk is ultra speed+ erasable */ -#define DSF_NOCD 0x0080 /* Disk is not a CD */ - -#define DSF_DVD 0x0100 /* Disk is a DVD */ -#define DSF_DVD_PLUS_R 0x0200 /* Disk is a DVD+R */ -#define DSF_DVD_PLUS_RW 0x0400 /* Disk is a DVD+RW */ -#define DSF_NEED_FORMAT 0x0800 /* Disk needs to be formatted */ -#define DSF_BD 0x1000 /* Disk is a BD */ -#define DSF_BD_RE 0x2000 /* Disk is a BD-RE */ - -/* - * Definitions for disk_status disk type - * used in "ds_type". - */ -#define DST_UNKNOWN 0 -#define DST_CD_ROM 0x08 -#define DST_CD_R 0x09 -#define DST_CD_RW 0x0A -#define DST_DVD_ROM 0x10 -#define DST_DVD_R 0x11 -#define DST_DVD_RAM 0x12 -#define DST_DVD_RW 0x13 -#define DST_DVD_RW_SEQ 0x14 -#define DST_DVD_R_DL 0x15 -#define DST_DVD_R_DL_LJ 0x16 -#define DST_DVD_PLUS_RW 0x1A -#define DST_DVD_PLUS_R 0x1B -#define DST_DVD_PLUS_R_DL 0x2B -#define DST_BD_ROM 0x40 -#define DST_BD_R_SEQ 0x41 -#define DST_BD_R 0x42 -#define DST_BD_RE 0x43 - -typedef struct disk_status dstat_t; - -struct disk_status { - UInt32_t ds_diskid; /* Disk identification */ - UInt16_t ds_cdrflags; /* Recording flags from cdrecord*/ - UInt16_t ds_flags; /* Disk_status flags */ - Uchar ds_wrmode; /* Selected write mode */ - Uchar ds_type; /* Abstract disk type */ - - Uchar ds_disktype; /* Disk type (from TOC/PMA) */ - Uchar ds_diskstat; /* Disk status (MMC) */ - Uchar ds_sessstat; /* Status of last sesion (MMC) */ - Uchar ds_trfirst; /* first track # */ - Uchar ds_trlast; /* last track # */ - Uchar ds_trfirst_ls; /* first track # in last session*/ - Uchar ds_barcode[8]; /* Disk bar code */ - - Int32_t ds_first_leadin; /* Start of first lead in (ATIP)*/ - Int32_t ds_last_leadout; /* Start of last lead out (ATIP)*/ - Int32_t ds_curr_leadin; /* Start of next lead in */ - Int32_t ds_curr_leadout; /* Start of next lead out */ - - Int32_t ds_maxblocks; /* # of official blocks on disk */ - Int32_t ds_maxrblocks; /* # real blocks on disk */ - Int32_t ds_fwa; /* first writable addr */ - - Int32_t ds_startsec; /* Actual start sector */ - Int32_t ds_endsec; /* Actual end sector */ - Int32_t ds_buflow; /* # of times drive buffer empty*/ - - UInt16_t ds_minbuf; /* Minimum drive bufer fill rt. */ - - UInt16_t ds_at_min_speed; /* The minimal ATIP write speed */ - UInt16_t ds_at_max_speed; /* The maximal ATIP write speed */ - UInt16_t ds_dr_cur_rspeed; /* The drive's cur read speed */ - UInt16_t ds_dr_max_rspeed; /* The drive's max read speed */ - UInt16_t ds_dr_cur_wspeed; /* The drive's cur write speed */ - UInt16_t ds_dr_max_wspeed; /* The drive's max write speed */ - UInt16_t ds_wspeed; /* The selected/drive wr. speed */ - - Int32_t ds_layer_break; /* Start of layer break */ -}; - -/* - * First approach of a CDR device abstraction layer. - * This interface will change as long as I did not find the - * optimum that fits for all devices. - * - * Called with pointer to whole track array: - * cdr_send_cue() - * cdr_write_leadin() - * cdr_open_session() - * cdr_fixate() - * - * Called with (track_t *) 0 or pointer to current track: - * cdr_next_wr_address() - * - * Called with pointer to current track: - * cdr_open_track() - * cdr_close_track() - * - * Calling sequence: - * cdr_identify() May modify driver - * Here, the cdr_t will be allocated and - * copied to a new writable area. - * cdr_attach() Get drive properties - * cdr_buffer_cap() - * cdr_getdisktype() GET ATIP - * cdr_init() set TAO for -msinfo - * cdr_check_session XXX ???? - * cdr_opt1() set early options - * cdr_set_speed_dummy(scgp, dp, &speed) - * <--- Grace time processing goes here - * { do_opc(); cdr_blank() } - * cdr_opt2() set late options - * cdr_open_session() set up params (no wrt.) - * do_opc() - * cdr_write_leadin() start writing - * LOOP { - * cdr_open_track() - * cdr_next_wr_address() only TAO / Packet - * write_track_data() - * cdr_close_track() - * } - * write_leadout() XXX should go -> driver! - * cdr_fixate() - * cdr_stats() - */ -/*--------------------------------------------------------------------------*/ -typedef struct cdr_cmd cdr_t; - -#ifdef _SCG_SCSITRANSP_H -struct cdr_cmd { - int cdr_dev; /* Numerical device type */ - UInt32_t cdr_cmdflags; /* Command line options */ - UInt32_t cdr_cmdflags2; /* More cmdline options */ - UInt32_t cdr_flags; /* Drive related flags */ - UInt32_t cdr_flags2; /* More Drive flags */ - UInt8_t cdr_cdrw_support; /* CD-RW write media types */ - UInt8_t cdr_wrmodedef; /* Default write mode */ - UInt16_t cdr_speeddef; /* Default write speed */ - UInt16_t cdr_speedmax; /* Max. write speed */ - - char *cdr_drname; /* Driver ID string */ - char *cdr_drtext; /* Driver ID text */ - struct cd_mode_page_2A *cdr_cdcap; - dstat_t *cdr_dstat; -#ifdef _SCG_SCSIREG_H - cdr_t *(*cdr_identify) __PR((SCSI *scgp, cdr_t *, struct scsi_inquiry *)); /* identify drive */ -#else - cdr_t *(*cdr_identify) __PR((SCSI *scgp, cdr_t *, void *)); /* identify drive */ -#endif - int (*cdr_attach) __PR((SCSI *scgp, cdr_t *)); /* init error decoding etc*/ - int (*cdr_init) __PR((SCSI *scgp, cdr_t *)); /* init drive to useful deflts */ - int (*cdr_getdisktype) __PR((SCSI *scgp, cdr_t *)); /* get disk type */ - int (*cdr_prdiskstatus) __PR((SCSI *scgp, cdr_t *)); /* print disk status */ - int (*cdr_load) __PR((SCSI *scgp, cdr_t *)); /* load disk */ - int (*cdr_unload) __PR((SCSI *scgp, cdr_t *)); /* unload disk */ - int (*cdr_buffer_cap) __PR((SCSI *scgp, long *sizep, long *freep)); /* read buffer capacity */ - int (*cdr_check_recovery) __PR((SCSI *scgp, cdr_t *)); /* check if recover is needed */ - int (*cdr_recover) __PR((SCSI *scgp, cdr_t *, int track)); /* do recover */ - int (*cdr_set_speed_dummy) __PR((SCSI *scgp, cdr_t *, int *speedp)); /* set recording speed & dummy write */ - int (*cdr_set_secsize) __PR((SCSI *scgp, int secsize)); /* set sector size */ - int (*cdr_next_wr_address) __PR((SCSI *scgp, track_t *trackp, long *ap)); /* get next writable addr. */ - int (*cdr_reserve_track) __PR((SCSI *scgp, Ulong len)); /* reserve track for future use */ - int (*cdr_write_trackdata) __PR((SCSI *scgp, caddr_t buf, long daddr, long bytecnt, int seccnt, BOOL islast)); - int (*cdr_gen_cue) __PR((track_t *trackp, void *cuep, BOOL needgap)); /* generate cue sheet */ - int (*cdr_send_cue) __PR((SCSI *scgp, cdr_t *, track_t *trackp)); /* send cue sheet */ - int (*cdr_write_leadin) __PR((SCSI *scgp, cdr_t *, track_t *trackp)); /* write leadin */ - int (*cdr_open_track) __PR((SCSI *scgp, cdr_t *, track_t *trackp)); /* open new track */ - int (*cdr_close_track) __PR((SCSI *scgp, cdr_t *, track_t *trackp)); /* close written track */ - int (*cdr_open_session) __PR((SCSI *scgp, cdr_t *, track_t *trackp)); /* open new session */ - int (*cdr_close_session) __PR((SCSI *scgp, cdr_t *)); /* really needed ??? */ - int (*cdr_abort_session) __PR((SCSI *scgp, cdr_t *)); /* abort current write */ - int (*cdr_session_offset) __PR((SCSI *scgp, long *soff)); /* read session offset*/ - int (*cdr_fixate) __PR((SCSI *scgp, cdr_t *, track_t *trackp)); /* write toc on disk */ - int (*cdr_stats) __PR((SCSI *scgp, cdr_t *)); /* final statistics printing*/ - int (*cdr_blank) __PR((SCSI *scgp, cdr_t *, long addr, int blanktype)); /* blank something */ - int (*cdr_format) __PR((SCSI *scgp, cdr_t *, int fmtflags)); /* format media */ - int (*cdr_opc) __PR((SCSI *scgp, caddr_t bp, int cnt, int doopc)); /* Do OPC */ - int (*cdr_opt1) __PR((SCSI *scgp, cdr_t *)); /* do early option processing*/ - int (*cdr_opt2) __PR((SCSI *scgp, cdr_t *)); /* do late option processing */ -}; -#endif - -/* - * Definitions for cdr_flags - */ -#define CDR_TAO 0x01 /* Drive supports Track at once */ -#define CDR_SAO 0x02 /* Drive supports Sess at once */ -#define CDR_PACKET 0x04 /* Drive supports packet writing*/ -#define CDR_RAW 0x08 /* Drive supports raw writing */ -#define CDR_RAW16 0x10 /* Drive supports RAW raw16 */ -#define CDR_RAW96P 0x20 /* Drive supports RAW raw96 pak */ -#define CDR_RAW96R 0x40 /* Drive supports RAW raw96 raw */ -#ifdef __needed__ -#define CDR_SRAW16 0x100 /* Drive supports SAO raw16 */ -#endif -#define CDR_SRAW96P 0x200 /* Drive supports SAO raw96 pak */ -#define CDR_SRAW96R 0x400 /* Drive supports SAO raw96 raw */ -#define CDR_LAYER_JUMP 0x800 /* Drive s. DVD-R/DL Layer jump */ -#define CDR_SWABAUDIO 0x1000 /* Drive swabs audio data */ -#define CDR_ISREADER 0x2000 /* Drive is s CD-ROM reader */ -#define CDR_TRAYLOAD 0x4000 /* Drive loads CD with tray */ -#define CDR_CADDYLOAD 0x8000 /* Drive loads CD with caddy */ -#define CDR_NO_LOLIMIT 0x10000 /* Drive ignores lead-out limit */ -#define CDR_DVD 0x20000 /* Drive is a DVD drive */ -#define CDR_SIMUL 0x40000 /* Drive is simulated */ -#define CDR_BURNFREE 0x80000 /* Drive sup. BUFund. free rec. */ -#define CDR_VARIREC 0x100000 /* Drive sup. VariRec Plex. */ -#define CDR_AUDIOMASTER 0x200000 /* Drive sup. AudioMaster Yamah.*/ -#define CDR_FORCESPEED 0x400000 /* Drive sup. WriteSpeed ctl. */ -#define CDR_DISKTATTOO 0x800000 /* Drive sup. Yamaha DiskT@2 */ -#define CDR_SINGLESESS 0x1000000 /* Drive sup. single sess. mode */ -#define CDR_HIDE_CDR 0x2000000 /* Drive sup. hide CDR features */ -#define CDR_SPEEDREAD 0x4000000 /* Drive sup. SpeedReed */ -#define CDR_GIGAREC 0x8000000 /* Drive sup. GigaRec Plex. */ -#define CDR_MMC 0x10000000 /* Drive is MMC compliant */ -#define CDR_MMC2 0x20000000 /* Drive is MMC-2 compliant */ -#define CDR_MMC3 0x40000000 /* Drive is MMC-3 compliant */ -#ifdef PROTOTYPES -#define CDR_ALLOC 0x80000000UL /* structure is allocated */ -#else -#define CDR_ALLOC 0x80000000 /* structure is allocated */ -#endif - -/* - * Definitions for cdr_flags - */ -#define CDR2_NOCD 0x01 /* Drive not operating on a CD */ -#define CDR2_BD 0x02 /* Drive is a BluRay drive */ - -/* - * Definitions for cdr_cdrw_support - */ -#define CDR_CDRW_NONE 0x00 /* CD-RW writing not supported */ -#define CDR_CDRW_MULTI 0x01 /* CD-RW multi speed supported */ -#define CDR_CDRW_HIGH 0x02 /* CD-RW high speed supported */ -#define CDR_CDRW_ULTRA 0x04 /* CD-RW ultra high speed supported */ -#define CDR_CDRW_ULTRAP 0x08 /* CD-RW ultra high speed+ supported */ -#define CDR_CDRW_ALL 0xFF /* All bits set: unknown - support all */ - -/* - * cdrecord.c - */ -extern int read_buf __PR((int f, char *bp, int size)); -extern int fill_buf __PR((int f, track_t *trackp, long secno, char *bp, int size)); -extern int get_buf __PR((int f, track_t *trackp, long secno, char **bpp, int size)); -#ifdef _SCG_SCSITRANSP_H -extern int write_secs __PR((SCSI *scgp, cdr_t *dp, char *bp, long startsec, int bytespt, int secspt, BOOL islast)); -extern int pad_track __PR((SCSI *scgp, cdr_t *dp, track_t *trackp, - long startsec, Llong amt, - BOOL dolast, Llong *bytesp)); -extern void load_media __PR((SCSI *scgp, cdr_t *, BOOL)); -extern void unload_media __PR((SCSI *scgp, cdr_t *, UInt32_t)); -extern void reload_media __PR((SCSI *scgp, cdr_t *)); -#endif -extern void raisepri __PR((int)); -extern int getnum __PR((char *arg, long *valp)); - -/* - * cd_misc.c - */ -extern int from_bcd __PR((int b)); -extern int to_bcd __PR((int i)); -extern long msf_to_lba __PR((int m, int s, int f, BOOL force_positive)); -extern BOOL lba_to_msf __PR((long lba, msf_t *mp)); -extern void sec_to_msf __PR((long sec, msf_t *mp)); -extern void print_min_atip __PR((long li, long lo)); -extern BOOL is_cdspeed __PR((int speed)); - -/* - * fifo.c - */ -extern void init_fifo __PR((long)); -extern BOOL init_faio __PR((track_t *track, int)); -extern BOOL await_faio __PR((void)); -extern void kill_faio __PR((void)); -extern int wait_faio __PR((void)); -extern int faio_read_buf __PR((int f, char *bp, int size)); -extern int faio_get_buf __PR((int f, char **bpp, int size)); -extern void fifo_stats __PR((void)); -extern int fifo_percent __PR((BOOL addone)); - -/* - * wm_session.c - */ -#ifdef _SCG_SCSITRANSP_H -extern int write_session_data __PR((SCSI *scgp, cdr_t *dp, track_t *trackp)); -#endif - -/* - * wm_track.c - */ -#ifdef _SCG_SCSITRANSP_H -/*extern int write_track_data __PR((SCSI *scgp, cdr_t *dp, track_t *trackp));*/ -#endif - -/* - * wm_packet.c - */ -#ifdef _SCG_SCSITRANSP_H -extern int write_packet_data __PR((SCSI *scgp, cdr_t *dp, track_t *trackp)); -#endif - -/* - * modes.c - */ -#ifdef _SCG_SCSITRANSP_H -extern BOOL get_mode_params __PR((SCSI *scgp, int page, char *pagename, - Uchar *modep, Uchar *cmodep, - Uchar *dmodep, Uchar *smodep, - int *lenp)); -extern BOOL set_mode_params __PR((SCSI *scgp, char *pagename, Uchar *modep, - int len, int save, int secsize)); -#endif - -/* - * misc.c - */ -#ifdef timerclear -extern void timevaldiff __PR((struct timeval *start, struct timeval *stop)); -extern void prtimediff __PR((const char *fmt, - struct timeval *start, - struct timeval *stop)); -#endif - -/* - * getnum.c - */ -extern int getnum __PR((char *arg, long *valp)); -extern int getllnum __PR((char *arg, Llong *lvalp)); - -/* - * scsi_cdr.c - */ -#ifdef _SCG_SCSITRANSP_H -extern BOOL unit_ready __PR((SCSI *scgp)); -extern BOOL wait_unit_ready __PR((SCSI *scgp, int secs)); -extern BOOL scsi_in_progress __PR((SCSI *scgp)); -extern BOOL cdr_underrun __PR((SCSI *scgp)); -extern int test_unit_ready __PR((SCSI *scgp)); -extern int rezero_unit __PR((SCSI *scgp)); -extern int request_sense __PR((SCSI *scgp)); -extern int request_sense_b __PR((SCSI *scgp, caddr_t bp, int cnt)); -extern int inquiry __PR((SCSI *scgp, caddr_t, int)); -extern int read_capacity __PR((SCSI *scgp)); -#ifdef EOF /* stdio.h has been included */ -extern void print_capacity __PR((SCSI *scgp, FILE *f)); -#endif -extern int scsi_load_unload __PR((SCSI *scgp, int)); -extern int scsi_prevent_removal __PR((SCSI *scgp, int)); -extern int scsi_start_stop_unit __PR((SCSI *scgp, int, int, BOOL immed)); - -#define ROTCTL_CLV 0 /* CLV or PCAV */ -#define ROTCTL_CAV 1 /* True CAV */ - -extern int scsi_set_speed __PR((SCSI *scgp, int readspeed, int writespeed, int rotctl)); -extern int scsi_get_speed __PR((SCSI *scgp, int *readspeedp, int *writespeedp)); -extern int qic02 __PR((SCSI *scgp, int)); -extern int write_xscsi __PR((SCSI *scgp, caddr_t, long, long, int)); -extern int write_xg0 __PR((SCSI *scgp, caddr_t, long, long, int)); -extern int write_xg1 __PR((SCSI *scgp, caddr_t, long, long, int)); -extern int write_xg5 __PR((SCSI *scgp, caddr_t, long, long, int)); -extern int seek_scsi __PR((SCSI *scgp, long addr)); -extern int seek_g0 __PR((SCSI *scgp, long addr)); -extern int seek_g1 __PR((SCSI *scgp, long addr)); -extern int scsi_flush_cache __PR((SCSI *scgp, BOOL immed)); -extern int read_buffer __PR((SCSI *scgp, caddr_t bp, int cnt, int mode)); -extern int write_buffer __PR((SCSI *scgp, char *buffer, long length, int mode, int bufferid, long offset)); -extern int read_subchannel __PR((SCSI *scgp, caddr_t bp, int track, - int cnt, int msf, int subq, int fmt)); -extern int read_toc __PR((SCSI *scgp, caddr_t, int, int, int, int)); -extern int read_toc_philips __PR((SCSI *scgp, caddr_t, int, int, int, int)); -extern int read_header __PR((SCSI *scgp, caddr_t, long, int, int)); -extern int read_disk_info __PR((SCSI *scgp, caddr_t, int)); - -#define TI_TYPE_LBA 0 /* Address is LBA */ -#define TI_TYPE_TRACK 1 /* Address: 0 -> TOC, xx -> Track xx, 0xFF -> Inv Track */ -#define TI_TYPE_SESS 2 /* Address is session # */ -extern int read_track_info __PR((SCSI *scgp, caddr_t, int type, int addr, int cnt)); -extern int get_trackinfo __PR((SCSI *scgp, caddr_t, int type, int addr, int cnt)); -extern int read_rzone_info __PR((SCSI *scgp, caddr_t bp, int cnt)); -extern int reserve_tr_rzone __PR((SCSI *scgp, long size)); -extern int read_dvd_structure __PR((SCSI *scgp, caddr_t bp, int cnt, int mt, int addr, int layer, int fmt)); -extern int send_dvd_structure __PR((SCSI *scgp, caddr_t bp, int cnt, int fmt)); -extern int send_opc __PR((SCSI *scgp, caddr_t, int cnt, int doopc)); - -#define CL_TYPE_STOP_DEICE 0 /* Stop De-icing a DVD+RW Media */ -#define CL_TYPE_TRACK 1 /* Close Track # */ -#define CL_TYPE_SESSION 2 /* Close Session/Border / Stop backgrnd. format */ -#define CL_TYPE_INTER_BORDER 3 /* Close intermediate Border */ -extern int scsi_close_tr_session __PR((SCSI *scgp, int type, int track, BOOL immed)); -extern int read_master_cue __PR((SCSI *scgp, caddr_t bp, int sheet, int cnt)); -extern int send_cue_sheet __PR((SCSI *scgp, caddr_t bp, long size)); -extern int read_buff_cap __PR((SCSI *scgp, long *, long *)); -extern int scsi_blank __PR((SCSI *scgp, long addr, int blanktype, BOOL immed)); -extern BOOL allow_atapi __PR((SCSI *scgp, BOOL new)); -extern int mode_select __PR((SCSI *scgp, Uchar *, int, int, int)); -extern int mode_sense __PR((SCSI *scgp, Uchar *dp, int cnt, int page, int pcf)); -extern int mode_select_sg0 __PR((SCSI *scgp, Uchar *, int, int, int)); -extern int mode_sense_sg0 __PR((SCSI *scgp, Uchar *dp, int cnt, int page, int pcf)); -extern int mode_select_g0 __PR((SCSI *scgp, Uchar *, int, int, int)); -extern int mode_select_g1 __PR((SCSI *scgp, Uchar *, int, int, int)); -extern int mode_sense_g0 __PR((SCSI *scgp, Uchar *dp, int cnt, int page, int pcf)); -extern int mode_sense_g1 __PR((SCSI *scgp, Uchar *dp, int cnt, int page, int pcf)); -extern int read_tochdr __PR((SCSI *scgp, cdr_t *, int *, int *)); -extern int read_cdtext __PR((SCSI *scgp)); -extern int read_trackinfo __PR((SCSI *scgp, int, long *, struct msf *, int *, int *, int *)); -extern int read_B0 __PR((SCSI *scgp, BOOL isbcd, long *b0p, long *lop)); -extern int read_session_offset __PR((SCSI *scgp, long *)); -extern int read_session_offset_philips __PR((SCSI *scgp, long *)); -extern int sense_secsize __PR((SCSI *scgp, int current)); -extern int select_secsize __PR((SCSI *scgp, int)); -extern BOOL is_cddrive __PR((SCSI *scgp)); -extern BOOL is_unknown_dev __PR((SCSI *scgp)); -extern int read_scsi __PR((SCSI *scgp, caddr_t, long, int)); -extern int read_g0 __PR((SCSI *scgp, caddr_t, long, int)); -extern int read_g1 __PR((SCSI *scgp, caddr_t, long, int)); -extern BOOL getdev __PR((SCSI *scgp, BOOL)); -#ifdef EOF /* stdio.h has been included */ -extern void printinq __PR((SCSI *scgp, FILE *f)); -#endif -extern void printdev __PR((SCSI *scgp)); -extern BOOL do_inquiry __PR((SCSI *scgp, BOOL)); -extern BOOL recovery_needed __PR((SCSI *scgp, cdr_t *)); -extern int scsi_load __PR((SCSI *scgp, cdr_t *)); -extern int scsi_unload __PR((SCSI *scgp, cdr_t *)); -extern int scsi_cdr_write __PR((SCSI *scgp, caddr_t bp, long sectaddr, long size, int blocks, BOOL islast)); -extern struct cd_mode_page_2A * mmc_cap __PR((SCSI *scgp, Uchar *modep)); -extern void mmc_getval __PR((struct cd_mode_page_2A *mp, - BOOL *cdrrp, BOOL *cdwrp, - BOOL *cdrrwp, BOOL *cdwrwp, - BOOL *dvdp, BOOL *dvdwp)); -extern BOOL is_mmc __PR((SCSI *scgp, BOOL *cdwp, BOOL *dvdwp)); -extern BOOL mmc_check __PR((SCSI *scgp, BOOL *cdrrp, BOOL *cdwrp, - BOOL *cdrrwp, BOOL *cdwrwp, - BOOL *dvdp, BOOL *dvdwp)); -extern void print_capabilities __PR((SCSI *scgp)); - -extern int verify __PR((SCSI *scgp, long start, int count, long *bad_block)); -#endif - -/* - * scsi_cdr.c - */ -#ifdef _SCG_SCSITRANSP_H -extern void print_capabilities_mmc4 __PR((SCSI *scgp)); -#endif - -/* - * scsi_mmc.c - */ - -/* - * Definitions for the return value of get_mediatype() - */ -#define MT_NONE 0 /* Unknown or unsupported */ -#define MT_CD 1 /* CD type media */ -#define MT_DVD 2 /* DVD type media */ -#define MT_BD 3 /* Blu Ray type media */ -#define MT_HDDVD 4 /* HD-DVD type media */ - -#ifdef _SCG_SCSITRANSP_H -extern int get_configuration __PR((SCSI *scgp, caddr_t bp, int cnt, int st_feature, int rt)); -extern int get_curprofile __PR((SCSI *scgp)); -extern int has_profile __PR((SCSI *scgp, int profile)); -extern int print_profiles __PR((SCSI *scgp)); -extern int get_proflist __PR((SCSI *scgp, BOOL *wp, BOOL *cdp, BOOL *dvdp, - BOOL *dvdplusp, BOOL *ddcdp)); -extern int get_wproflist __PR((SCSI *scgp, BOOL *cdp, BOOL *dvdp, - BOOL *dvdplusp, BOOL *ddcdp)); -extern int get_mediatype __PR((SCSI *scgp)); -#endif /* _SCG_SCSITRANSP_H */ -extern int get_singlespeed __PR((int mt)); -extern float get_secsps __PR((int mt)); -extern char *get_mclassname __PR((int mt)); -#ifdef _SCG_SCSITRANSP_H -extern int print_features __PR((SCSI *scgp)); -extern int check_writemodes_mmc __PR((SCSI *scgp, cdr_t *dp)); -extern int scsi_get_perf_maxspeed __PR((SCSI *scgp, Ulong *readp, Ulong *writep, Ulong *endp)); -extern int scsi_get_perf_curspeed __PR((SCSI *scgp, Ulong *readp, Ulong *writep, Ulong *endp)); -extern int speed_select_mdvd __PR((SCSI *scgp, int readspeed, int writespeed)); -extern void print_format_capacities __PR((SCSI *scgp)); -extern int get_format_capacities __PR((SCSI *scgp, caddr_t bp, int cnt)); -extern int read_format_capacities __PR((SCSI *scgp, caddr_t bp, int cnt)); -#endif /* _SCG_SCSITRANSP_H */ -#ifdef _SCSIMMC_H -extern void przone __PR((struct rzone_info *rp)); -#endif /* _SCSIMMC_H */ -#ifdef _SCG_SCSITRANSP_H -#ifdef _SCSIMMC_H -extern int get_diskinfo __PR((SCSI *scgp, struct disk_info *dip, int cnt)); -extern void print_diskinfo __PR((struct disk_info *dip, BOOL is_cd)); -#endif -extern int prdiskstatus __PR((SCSI *scgp, cdr_t *dp, BOOL is_cd)); -extern int sessstatus __PR((SCSI *scgp, BOOL is_cd, long *offp, long *nwap)); -extern void print_performance_mmc __PR((SCSI *scgp)); -#endif /* _SCG_SCSITRANSP_H */ - -/* - * scsi_mmc4.c - */ -#ifdef _SCG_SCSITRANSP_H -extern int get_supported_cdrw_media_types __PR((SCSI *scgp)); -#endif - -/* - * cdr_drv.c - */ -#ifdef _SCG_SCSITRANSP_H -#ifdef _SCG_SCSIREG_H -extern cdr_t *drive_identify __PR((SCSI *scgp, cdr_t *, struct scsi_inquiry *ip)); -#else -extern cdr_t *drive_identify __PR((SCSI *scgp, cdr_t *, void *ip)); -#endif -extern int drive_attach __PR((SCSI *scgp, cdr_t *)); -#endif -extern int attach_unknown __PR((void)); -#ifdef _SCG_SCSITRANSP_H -extern int blank_dummy __PR((SCSI *scgp, cdr_t *, long addr, int blanktype)); -EXPORT int format_dummy __PR((SCSI *scgp, cdr_t *, int fmtflags)); -extern int drive_getdisktype __PR((SCSI *scgp, cdr_t *dp)); -extern int cmd_ill __PR((SCSI *scgp)); -extern int cmd_dummy __PR((SCSI *scgp, cdr_t *)); -extern int no_sendcue __PR((SCSI *scgp, cdr_t *, track_t *trackp)); -extern int no_diskstatus __PR((SCSI *scgp, cdr_t *)); -extern int buf_dummy __PR((SCSI *scgp, long *sp, long *fp)); -#endif -extern BOOL set_cdrcmds __PR((char *name, cdr_t **dpp)); -#ifdef _SCG_SCSITRANSP_H -extern cdr_t *get_cdrcmds __PR((SCSI *scgp)); -#endif - - -/* - * drv_mmc.c - */ -#ifdef _SCG_SCSITRANSP_H -extern void mmc_opthelp __PR((SCSI *scgp, cdr_t *dp, int excode)); -#endif -extern char *hasdrvopt __PR((char *optstr, char *optname)); -extern char *hasdrvoptx __PR((char *optstr, char *optname, int flag)); -#ifdef _SCG_SCSITRANSP_H -extern struct ricoh_mode_page_30 * get_justlink_ricoh __PR((SCSI *scgp, Uchar *mode)); -#endif - -/* - * isosize.c - */ -extern Llong isosize __PR((int f)); - -/* - * audiosize.c - */ -extern BOOL is_auname __PR((const char *name)); -extern off_t ausize __PR((int f)); -extern BOOL is_wavname __PR((const char *name)); -extern off_t wavsize __PR((int f)); - -/* - * auinfo.c - */ -extern BOOL auinfosize __PR((char *name, track_t *trackp)); -extern void auinfo __PR((char *name, int track, track_t *trackp)); -#ifdef CDTEXT_H -extern textptr_t *gettextptr __PR((int track, track_t *trackp)); -#endif -extern void setmcn __PR((char *mcn, track_t *trackp)); -extern void setisrc __PR((char *isrc, track_t *trackp)); -extern void setindex __PR((char *tindex, track_t *trackp)); - -/* - * diskid.c - */ -extern void pr_manufacturer __PR((msf_t *mp, BOOL rw, BOOL audio)); -extern int manufacturer_id __PR((msf_t *mp)); -extern long disk_rcap __PR((msf_t *mp, long maxblock, BOOL rw, BOOL audio)); - -/*--------------------------------------------------------------------------*/ -/* Test only */ -/*--------------------------------------------------------------------------*/ -#ifdef _SCSIMMC_H -/*extern int do_cue __PR((track_t *trackp, struct mmc_cue **cuep));*/ -#else -/*extern int do_cue __PR((track_t *trackp, void *cuep));*/ -#endif - -/* - * subchan.c - */ -extern int do_leadin __PR((track_t *trackp)); -#ifdef _SCG_SCSITRANSP_H -extern int write_leadin __PR((SCSI *scgp, cdr_t *dp, track_t *trackp, int leadinstart)); -extern int write_leadout __PR((SCSI *scgp, cdr_t *dp, track_t *trackp)); -#endif -extern void fillsubch __PR((track_t *trackp, Uchar *sp, int secno, int nsecs)); -extern void filltpoint __PR((Uchar *sub, int ctrl_adr, int point, msf_t *mp)); -extern void fillttime __PR((Uchar *sub, msf_t *mp)); -extern void qpto96 __PR((Uchar *sub, Uchar *subq, int dop)); -extern void addrw __PR((Uchar *sub, Uchar *subrwptr)); -extern void qwto16 __PR((Uchar *subq, Uchar *subptr)); -extern void subrecodesecs __PR((track_t *trackp, Uchar *bp, int address, int nsecs)); - -/* - * sector.c - */ -extern int encspeed __PR((BOOL be_verbose)); -extern void encsectors __PR((track_t *trackp, Uchar *bp, int address, int nsecs)); -extern void scrsectors __PR((track_t *trackp, Uchar *bp, int address, int nsecs)); -extern void encodesector __PR((Uchar *sp, int sectype, int address)); -extern void fillsector __PR((Uchar *sp, int sectype, int address)); - -/* - * clone.c - */ -extern void clone_toc __PR((track_t *trackp)); -extern void clone_tracktype __PR((track_t *trackp)); - -/* - * cdtext.c - */ -extern BOOL checktextfile __PR((char *fname)); -extern void packtext __PR((int tracks, track_t *trackp)); -#ifdef _SCG_SCSITRANSP_H -extern int write_cdtext __PR((SCSI *scgp, cdr_t *dp, long startsec)); -#endif - -/* - * cue.c - */ -extern int parsecue __PR((char *cuefname, track_t trackp[])); -#ifdef EOF /* stdio.h has been included */ -extern void fparsecue __PR((FILE *f, track_t trackp[])); -#endif diff -Nru cdrtools-2.01.01a33/btcflash/defaults.c cdrtools-3.02a09/btcflash/defaults.c --- cdrtools-2.01.01a33/btcflash/defaults.c 2006-09-13 15:35:12.000000000 +0000 +++ cdrtools-3.02a09/btcflash/defaults.c 1970-01-01 00:00:00.000000000 +0000 @@ -1,235 +0,0 @@ -/* @(#)defaults.c 1.20 06/09/13 Copyright 1998-2006 J. Schilling */ -#ifndef lint -static char sccsid[] = - "@(#)defaults.c 1.20 06/09/13 Copyright 1998-2006 J. Schilling"; -#endif -/* - * Copyright (c) 1998-2006 J. Schilling - */ -/* - * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. - * - * See the file CDDL.Schily.txt in this distribution for details. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file CDDL.Schily.txt from this distribution. - */ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include "cdrecord.h" /* only for getnum() */ -#include "defaults.h" - -LOCAL int open_cdrdefaults __PR((void)); -EXPORT void cdr_defaults __PR((char **devp, int *speedp, long *fsp, char **drvoptp)); -LOCAL void cdr_xdefaults __PR((char **devp, int *speedp, long *fsp, char **drvoptp)); -LOCAL char * strsv __PR((char *s)); - -LOCAL int -open_cdrdefaults() -{ - /* - * WARNING you are only allowed to change this filename if you also - * change the documentation and add a statement that makes clear - * where the official location of the file is why you did choose a - * nonstandard location and that the nonstandard location only refers - * to inofficial cdrecord versions. - * - * I was forced to add this because some people change cdrecord without - * rational reason and then publish the result. As those people - * don't contribute work and don't give support, they are causing extra - * work for me and this way slow down the cdrecord development. - */ - return (defltopen("/etc/default/cdrecord")); -} - -EXPORT void -cdr_defaults(devp, speedp, fsp, drvoptp) - char **devp; - int *speedp; - long *fsp; - char **drvoptp; -{ - char *dev = NULL; - int speed = 0; - long fs = 0L; - - if (devp != NULL) - dev = *devp; - if (speedp != NULL) - speed = *speedp; - if (fsp != NULL) - fs = *fsp; - - if (!dev && devp != NULL) { - *devp = getenv("CDR_DEVICE"); - - if (!*devp && open_cdrdefaults() == 0) { - dev = defltread("CDR_DEVICE="); - if (dev != NULL) - *devp = strsv(dev); - } - } - if (devp != NULL && *devp) - cdr_xdefaults(devp, &speed, &fs, drvoptp); - - if (speed < 0) { - char *p = getenv("CDR_SPEED"); - - if (!p) { - if (open_cdrdefaults() == 0) { - p = defltread("CDR_SPEED="); - } - } - if (p) { - speed = atoi(p); - if (speed < 0 && speed != -1) { - comerrno(EX_BAD, - "Bad speed environment (%s).\n", p); - } - } - } - if (speed >= 0 && speedp != NULL) - *speedp = speed; - - if (fs < 0L) { - char *p = getenv("CDR_FIFOSIZE"); - - if (!p) { - if (open_cdrdefaults() == 0) { - p = defltread("CDR_FIFOSIZE="); - } - } - if (p) { - if (getnum(p, &fs) != 1) { - comerrno(EX_BAD, - "Bad fifo size environment (%s).\n", p); - } - } - } - if (fs > 0L && fsp != NULL) { - char *p = NULL; - long maxfs; - - if (open_cdrdefaults() == 0) { - p = defltread("CDR_MAXFIFOSIZE="); - } - if (p) { - if (getnum(p, &maxfs) != 1) { - comerrno(EX_BAD, - "Bad max fifo size default (%s).\n", p); - } - if (fs > maxfs) - fs = maxfs; - } - *fsp = fs; - } - - - defltclose(); -} - -/* - * All args except "drvoptp" are granted to be non NULL pointers. - */ -LOCAL void -cdr_xdefaults(devp, speedp, fsp, drvoptp) - char **devp; - int *speedp; - long *fsp; - char **drvoptp; -{ - char dname[256]; - char *p = *devp; - char *x = ",:/@"; - - while (*x) { - if (strchr(p, *x)) - return; - x++; - } - js_snprintf(dname, sizeof (dname), "%s=", p); - if (open_cdrdefaults() != 0) - return; - - p = defltread(dname); - if (p != NULL) { - while (*p == '\t' || *p == ' ') - p++; - if ((x = strchr(p, '\t')) != NULL) - *x = '\0'; - else if ((x = strchr(p, ' ')) != NULL) - *x = '\0'; - *devp = strsv(p); - if (x) { - p = ++x; - while (*p == '\t' || *p == ' ') - p++; - if ((x = strchr(p, '\t')) != NULL) - *x = '\0'; - else if ((x = strchr(p, ' ')) != NULL) - *x = '\0'; - if (*speedp < 0) - *speedp = atoi(p); - if (*speedp < 0 && *speedp != -1) { - comerrno(EX_BAD, - "Bad speed in defaults (%s).\n", p); - } - } - if (x) { - p = ++x; - while (*p == '\t' || *p == ' ') - p++; - if ((x = strchr(p, '\t')) != NULL) - *x = '\0'; - else if ((x = strchr(p, ' ')) != NULL) - *x = '\0'; - if (*fsp < 0L) { - if (getnum(p, fsp) != 1) { - comerrno(EX_BAD, - "Bad fifo size in defaults (%s).\n", - p); - } - } - } - if (x) { - p = ++x; - while (*p == '\t' || *p == ' ') - p++; - if ((x = strchr(p, '\t')) != NULL) - *x = '\0'; - else if ((x = strchr(p, ' ')) != NULL) - *x = '\0'; - if (strcmp(p, "\"\"") != '\0') { - /* - * Driver opts found. - */ - if (drvoptp && *drvoptp == NULL) - *drvoptp = strsv(p); - } - } - } -} - -LOCAL char * -strsv(s) - char *s; -{ - char *p; - int len = strlen(s); - - p = malloc(len+1); - if (p) - strcpy(p, s); - return (p); -} diff -Nru cdrtools-2.01.01a33/btcflash/defaults.h cdrtools-3.02a09/btcflash/defaults.h --- cdrtools-2.01.01a33/btcflash/defaults.h 2004-02-22 14:53:00.000000000 +0000 +++ cdrtools-3.02a09/btcflash/defaults.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,26 +0,0 @@ -/* @(#)defaults.h 1.1 04/02/22 Copyright 1998-2004 J. Schilling */ -/* - * The cdrecord defaults (/etc/default/cdrecord) interface - * - * Copyright (c) 1998-2004 J. Schilling - */ -/* - * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. - * - * See the file CDDL.Schily.txt in this distribution for details. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file CDDL.Schily.txt from this distribution. - */ - -#ifndef _DEFAULTS_H -#define _DEFAULTS_H -/* - * defaults.c - */ -extern void cdr_defaults __PR((char **devp, int *speedp, long *fsp, char **drvoptp)); - -#endif /* _DEFAULTS_H */ diff -Nru cdrtools-2.01.01a33/btcflash/io.c cdrtools-3.02a09/btcflash/io.c --- cdrtools-2.01.01a33/btcflash/io.c 2007-06-10 12:14:07.000000000 +0000 +++ cdrtools-3.02a09/btcflash/io.c 1970-01-01 00:00:00.000000000 +0000 @@ -1,218 +0,0 @@ -/* @(#)io.c 1.4 07/06/10 Copyright 1988 J. Schilling */ -#ifndef lint -static char sccsid[] = - "@(#)io.c 1.4 07/06/10 Copyright 1988 J. Schilling"; -#endif -/* - * Copyright (c) 1988 J. Schilling - */ -/* - * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. - * - * See the file CDDL.Schily.txt in this distribution for details. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file CDDL.Schily.txt from this distribution. - */ - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include "iodefs.h" - -struct disk { - int dummy; -}; - -LOCAL char *skipwhite __PR((const char *)); -LOCAL void prt_std __PR((char *, long, long, long, struct disk *)); -EXPORT BOOL cvt_std __PR((char *, long *, long, long, struct disk *)); -extern BOOL getvalue __PR((char *, long *, long, long, - void (*)(char *, long, long, long, struct disk *), - BOOL (*)(char *, long *, long, long, struct disk *), - struct disk *)); -extern BOOL getlong __PR((char *, long *, long, long)); -extern BOOL getint __PR((char *, int *, int, int)); -extern BOOL yes __PR((char *, ...)); - -LOCAL char * -skipwhite(s) - const char *s; -{ - register const Uchar *p = (const Uchar *)s; - - while (*p) { - if (!isspace(*p)) - break; - p++; - } - return ((char *)p); -} - -/* ARGSUSED */ -EXPORT BOOL -cvt_std(linep, lp, mini, maxi, dp) - char *linep; - long *lp; - long mini; - long maxi; - struct disk *dp; -{ - long l = -1L; - -/* printf("cvt_std(\"%s\", %d, %d, %d);\n", linep, *lp, mini, maxi);*/ - - if (linep[0] == '?') { - printf("Enter a number in the range from %ld to %ld\n", - mini, maxi); - printf("The default radix is 10\n"); - printf("Precede number with '0x' for hexadecimal or with '0' for octal\n"); - printf("Shorthands are:\n"); - printf("\t'^' for minimum value (%ld)\n", mini); - printf("\t'$' for maximum value (%ld)\n", maxi); - printf("\t'+' for incrementing value to %ld\n", *lp + 1); - printf("\t'-' for decrementing value to %ld\n", *lp - 1); - return (FALSE); - } - if (linep[0] == '^' && *skipwhite(&linep[1]) == '\0') { - l = mini; - } else if (linep[0] == '$' && *skipwhite(&linep[1]) == '\0') { - l = maxi; - } else if (linep[0] == '+' && *skipwhite(&linep[1]) == '\0') { - if (*lp < maxi) - l = *lp + 1; - } else if (linep[0] == '-' && *skipwhite(&linep[1]) == '\0') { - if (*lp > mini) - l = *lp - 1; - } else if (*astol(linep, &l)) { - printf("Not a number: '%s'.\n", linep); - return (FALSE); - } - if (l < mini || l > maxi) { - printf("'%s' is out of range.\n", linep); - return (FALSE); - } - *lp = l; - return (TRUE); -} - -/* ARGSUSED */ -LOCAL void -prt_std(s, l, mini, maxi, dp) - char *s; - long l; - long mini; - long maxi; - struct disk *dp; -{ - printf("%s %ld (%ld - %ld)/:", s, l, mini, maxi); -} - -EXPORT BOOL -getvalue(s, lp, mini, maxi, prt, cvt, dp) - char *s; - long *lp; - long mini; - long maxi; - void (*prt) __PR((char *, long, long, long, struct disk *)); - BOOL (*cvt) __PR((char *, long *, long, long, struct disk *)); - struct disk *dp; -{ - char line[128]; - char *linep; - - for (;;) { - (*prt)(s, *lp, mini, maxi, dp); - flush(); - line[0] = '\0'; - if (getline(line, 80) == EOF) - exit(EX_BAD); - - linep = skipwhite(line); - /* - * Nicht initialisierte Variablen - * duerfen nicht uebernommen werden - */ - if (linep[0] == '\0' && *lp != -1L) - return (FALSE); - - if (strlen(linep) == 0) { - /* Leere Eingabe */ - /* EMPTY */ - } else if ((*cvt)(linep, lp, mini, maxi, dp)) - return (TRUE); - } - /* NOTREACHED */ -} - -EXPORT BOOL -getlong(s, lp, mini, maxi) - char *s; - long *lp; - long mini; - long maxi; -{ - return (getvalue(s, lp, mini, maxi, prt_std, cvt_std, (void *)0)); -} - -EXPORT BOOL -getint(s, ip, mini, maxi) - char *s; - int *ip; - int mini; - int maxi; -{ - long l = *ip; - BOOL ret; - - ret = getlong(s, &l, (long)mini, (long)maxi); - *ip = l; - return (ret); -} - -/* VARARGS1 */ -#ifdef PROTOTYPES -EXPORT BOOL -yes(char *form, ...) -#else -EXPORT BOOL -yes(form, va_alist) - char *form; - va_dcl -#endif -{ - va_list args; - char okbuf[10]; - -again: -#ifdef PROTOTYPES - va_start(args, form); -#else - va_start(args); -#endif - printf("%r", form, args); - va_end(args); - flush(); - if (getline(okbuf, sizeof (okbuf)) == EOF) - exit(EX_BAD); - if (okbuf[0] == '?') { - printf("Enter 'y', 'Y', 'yes' or 'YES' if you agree with the previous asked question.\n"); - printf("All other input will be handled as if the question has beed answered with 'no'.\n"); - goto again; - } - if (streql(okbuf, "y") || streql(okbuf, "yes") || - streql(okbuf, "Y") || streql(okbuf, "YES")) - return (TRUE); - else - return (FALSE); -} diff -Nru cdrtools-2.01.01a33/btcflash/iodefs.h cdrtools-3.02a09/btcflash/iodefs.h --- cdrtools-2.01.01a33/btcflash/iodefs.h 2007-06-10 12:15:03.000000000 +0000 +++ cdrtools-3.02a09/btcflash/iodefs.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,34 +0,0 @@ -/* @(#)iodefs.h 1.1 07/06/10 Copyright 1988-2007 J. Schilling */ -/* - * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. - * - * See the file CDDL.Schily.txt in this distribution for details. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file CDDL.Schily.txt from this distribution. - */ - -#ifndef _IODEFS_H -#define _IODEFS_H - -#include - -/* - * io.c: - */ -#ifdef D_OK_MASK -extern BOOL cvt_std __PR((char *, long *, long, long, - struct disk *)); -extern BOOL getvalue __PR((char *, long *, long, long, - void (*)(char *, long, long, long, struct disk *), - BOOL (*)(char *, long *, long, long, struct disk *), - struct disk *)); -#endif -extern BOOL getlong __PR((char *, long *, long, long)); -extern BOOL getint __PR((char *, int *, int, int)); -extern BOOL yes __PR((char *, ...)) __printflike__(1, 2); - -#endif /* _IODEFS_H */ diff -Nru cdrtools-2.01.01a33/btcflash/Makefile cdrtools-3.02a09/btcflash/Makefile --- cdrtools-2.01.01a33/btcflash/Makefile 2007-02-04 23:09:43.000000000 +0000 +++ cdrtools-3.02a09/btcflash/Makefile 2013-04-21 18:21:20.000000000 +0000 @@ -1,4 +1,4 @@ -#ident @(#)Makefile 1.3 07/02/05 +#ident @(#)Makefile 1.13 13/04/21 ########################################################################### SRCROOT= .. RULESDIR= RULES @@ -9,16 +9,30 @@ TARGET= btcflash CPPOPTS += -DUSE_LARGEFILES CPPOPTS += -DSCHILY_PRINT +CPPOPTS += -I../cdrecord +CPPOPTS += -I../libcdrdeflt +CPPOPTS += -I../libscg +CPPOPTS += -I../readcd +CPPOPTS += -DINS_BASE=\"${INS_BASE}\" +CPPOPTS += -DTEXT_DOMAIN=\"SCHILY_cdrtools\" + CFILES= skel.c \ io.c cd_misc.c scsi_cdr.c \ scsi_scan.c \ - modes.c misc.c \ - defaults.c + misc.c + HFILES= -LIBS= -lrscg -lscg $(LIB_VOLMGT) -ldeflt -lschily $(SCSILIB) $(LIB_SOCKET) +# +# LIB_CAP is needed for Linux capability support in librscg. +# +LIBS= -lscgcmd -lrscg -lscg $(LIB_VOLMGT) -lcdrdeflt -ldeflt -lschily $(SCSILIB) $(LIB_SOCKET) $(LIB_INTL) $(LIB_CAP) XMK_FILE= Makefile.man +scsi_scan.c io.c scsi_cdr.c misc.c: + @echo " ==> MAKING SYMLINKS in ." && sh ./MKLINKS +$(ALLTARGETS): scsi_scan.c io.c scsi_cdr.c + ########################################################################### include $(SRCROOT)/$(RULESDIR)/rules.cmd ########################################################################### diff -Nru cdrtools-2.01.01a33/btcflash/misc.c cdrtools-3.02a09/btcflash/misc.c --- cdrtools-2.01.01a33/btcflash/misc.c 2006-09-13 15:35:12.000000000 +0000 +++ cdrtools-3.02a09/btcflash/misc.c 1970-01-01 00:00:00.000000000 +0000 @@ -1,78 +0,0 @@ -/* @(#)misc.c 1.5 06/09/13 Copyright 1998, 2001-2004 J. Schilling */ -#ifndef lint -static char sccsid[] = - "@(#)misc.c 1.5 06/09/13 Copyright 1998, 2001-2004 J. Schilling"; -#endif -/* - * Misc support functions - * - * Copyright (c) 1998, 2001-2004 J. Schilling - */ -/* - * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. - * - * See the file CDDL.Schily.txt in this distribution for details. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file CDDL.Schily.txt from this distribution. - */ - -#include -#include -#include -#include -#include - -EXPORT void timevaldiff __PR((struct timeval *start, struct timeval *stop)); -EXPORT void prtimediff __PR((const char *fmt, - struct timeval *start, - struct timeval *stop)); - -EXPORT void -timevaldiff(start, stop) - struct timeval *start; - struct timeval *stop; -{ - struct timeval tv; - - tv.tv_sec = stop->tv_sec - start->tv_sec; - tv.tv_usec = stop->tv_usec - start->tv_usec; - while (tv.tv_usec > 1000000) { - tv.tv_usec -= 1000000; - tv.tv_sec += 1; - } - while (tv.tv_usec < 0) { - tv.tv_usec += 1000000; - tv.tv_sec -= 1; - } - *stop = tv; -} - -EXPORT void -prtimediff(fmt, start, stop) - const char *fmt; - struct timeval *start; - struct timeval *stop; -{ - struct timeval tv; - - tv.tv_sec = stop->tv_sec - start->tv_sec; - tv.tv_usec = stop->tv_usec - start->tv_usec; - while (tv.tv_usec > 1000000) { - tv.tv_usec -= 1000000; - tv.tv_sec += 1; - } - while (tv.tv_usec < 0) { - tv.tv_usec += 1000000; - tv.tv_sec -= 1; - } - /* - * We need to cast timeval->* to long because - * of the broken sys/time.h in Linux. - */ - printf("%s%4ld.%03lds\n", fmt, (long)tv.tv_sec, (long)tv.tv_usec/1000); - flush(); -} diff -Nru cdrtools-2.01.01a33/btcflash/MKLINKS cdrtools-3.02a09/btcflash/MKLINKS --- cdrtools-2.01.01a33/btcflash/MKLINKS 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/btcflash/MKLINKS 2011-08-04 21:45:27.000000000 +0000 @@ -0,0 +1,38 @@ +#!/bin/sh +########################################################################### +#ident "@(#)MKLINKS 1.7 11/08/04 " +########################################################################### +# Written 2008-2011 by J. Schilling +########################################################################### +# Copyright (c) 2008-2011 J. Schilling +########################################################################### +# The contents of this file are subject to the terms of the +# Common Development and Distribution License, Version 1.0 only +# (the "License"). You may not use this file except in compliance +# with the License. +# +# See the file CDDL.Schily.txt in this distribution for details. +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file CDDL.Schily.txt from this distribution. +########################################################################### +symlink="ln -s" +MKLINKS_TEST=${MKLINKS_TEST-:} +if [ ".$MKLINKS_COPY" = '.' ]; then + rm -f xxzzy.123 xxzzy.345 + echo test > xxzzy.123 + $symlink xxzzy.123 xxzzy.345 + test $? = 0 || symlink=cp + test -r xxzzy.345 || symlink=cp + ${MKLINKS_TEST} -h xxzzy.345 || symlink=cp + rm -f xxzzy.123 xxzzy.345 +else + symlink=cp +fi +########################################################################### + +$symlink ../cdrecord/cd_misc.c . +$symlink ../readcd/io.c . +$symlink ../cdrecord/misc.c . +$symlink ../cdrecord/scsi_cdr.c . +$symlink ../cdrecord/scsi_scan.c . diff -Nru cdrtools-2.01.01a33/btcflash/modes.c cdrtools-3.02a09/btcflash/modes.c --- cdrtools-2.01.01a33/btcflash/modes.c 2006-09-13 15:35:12.000000000 +0000 +++ cdrtools-3.02a09/btcflash/modes.c 1970-01-01 00:00:00.000000000 +0000 @@ -1,296 +0,0 @@ -/* @(#)modes.c 1.26 06/09/13 Copyright 1988, 1997-2001, 2004 J. Schilling */ -#ifndef lint -static char sccsid[] = - "@(#)modes.c 1.26 06/09/13 Copyright 1988, 1997-2001, 2004 J. Schilling"; -#endif -/* - * SCSI mode page handling - * - * Copyright (c) 1988, 1997-2001, 2004 J. Schilling - */ -/* - * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. - * - * See the file CDDL.Schily.txt in this distribution for details. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file CDDL.Schily.txt from this distribution. - */ - -#include -#include -#include -#include -#include -#include -#include - -#include "cdrecord.h" - -EXPORT int scsi_compliant; - -LOCAL BOOL has_mode_page __PR((SCSI *scgp, int page, char *pagename, int *lenp)); -EXPORT BOOL get_mode_params __PR((SCSI *scgp, int page, char *pagename, - Uchar *modep, Uchar *cmodep, - Uchar *dmodep, Uchar *smodep, - int *lenp)); -EXPORT BOOL set_mode_params __PR((SCSI *scgp, char *pagename, Uchar *modep, - int len, int save, int secsize)); - -#define XXX - -#ifdef XXX -LOCAL BOOL -has_mode_page(scgp, page, pagename, lenp) - SCSI *scgp; - int page; - char *pagename; - int *lenp; -{ - Uchar mode[0x100]; - int hdlen; - int len = 1; /* Nach SCSI Norm */ - int try = 0; - struct scsi_mode_page_header *mp; - - /* - * ATAPI drives (used e.g. by IOMEGA) from y2k have the worst firmware - * I've seen. They create DMA buffer overruns if we request less than - * 3 bytes with 6 byte mode sense which equals 4 byte with 10 byte mode - * sense. In order to prevent repeated bus resets, we remember this - * bug. - * - * IOMEGA claims that they are using Philips clone drives but a Philips - * drive I own does not have the problem. - */ - if ((scgp->dflags & DRF_MODE_DMA_OVR) != 0) - len = sizeof (struct scsi_mode_header); -again: - fillbytes((caddr_t)mode, sizeof (mode), '\0'); - if (lenp) - *lenp = 0; - - scgp->silent++; - (void) unit_ready(scgp); -/* Maxoptix bringt Aborted cmd 0x0B mit code 0x4E (overlapping cmds)*/ - - /* - * The Matsushita CW-7502 will sometimes deliver a zeroed - * mode page 2A if "Page n default" is used instead of "current". - */ - if (mode_sense(scgp, mode, len, page, 0) < 0) { /* Page n current */ - scgp->silent--; - if (len < (int)sizeof (struct scsi_mode_header) && try == 0) { - len = sizeof (struct scsi_mode_header); - goto again; - } - return (FALSE); - } else { - if (len > 1 && try == 0) { - /* - * If we come here, we got a hard failure with the - * fist try. Remember this (IOMEGA USB) firmware bug. - */ - if ((scgp->dflags & DRF_MODE_DMA_OVR) == 0) { - /* XXX if (!nowarn) */ - errmsgno(EX_BAD, - "Warning: controller creates hard SCSI failure when retrieving %s page.\n", - pagename); - scgp->dflags |= DRF_MODE_DMA_OVR; - } - } - len = ((struct scsi_mode_header *)mode)->sense_data_len + 1; - } - /* - * ATAPI drives as used by IOMEGA may receive a SCSI bus device reset - * in between these two mode sense commands. - */ - (void) unit_ready(scgp); - if (mode_sense(scgp, mode, len, page, 0) < 0) { /* Page n current */ - scgp->silent--; - return (FALSE); - } - scgp->silent--; - - if (scgp->verbose) - scg_prbytes("Mode Sense Data", mode, len - scg_getresid(scgp)); - hdlen = sizeof (struct scsi_mode_header) + - ((struct scsi_mode_header *)mode)->blockdesc_len; - mp = (struct scsi_mode_page_header *)(mode + hdlen); - if (scgp->verbose) - scg_prbytes("Mode Page Data", (Uchar *)mp, mp->p_len+2); - - if (mp->p_len == 0) { - if (!scsi_compliant && try == 0) { - len = hdlen; - /* - * add sizeof page header (page # + len byte) - * (should normaly result in len == 14) - * this allowes to work with: - * Quantum Q210S (wants at least 13) - * MD2x (wants at least 4) - */ - len += 2; - try++; - goto again; - } - /* XXX if (!nowarn) */ - errmsgno(EX_BAD, - "Warning: controller returns zero sized %s page.\n", - pagename); - } - if (!scsi_compliant && - (len < (int)(mp->p_len + hdlen + 2))) { - len = mp->p_len + hdlen + 2; - - /* XXX if (!nowarn) */ - errmsgno(EX_BAD, - "Warning: controller returns wrong size for %s page.\n", - pagename); - } - if (mp->p_code != page) { - /* XXX if (!nowarn) */ - errmsgno(EX_BAD, - "Warning: controller returns wrong page %X for %s page (%X).\n", - mp->p_code, pagename, page); - return (FALSE); - } - - if (lenp) - *lenp = len; - return (mp->p_len > 0); -} -#endif - -EXPORT BOOL -get_mode_params(scgp, page, pagename, modep, cmodep, dmodep, smodep, lenp) - SCSI *scgp; - int page; - char *pagename; - Uchar *modep; - Uchar *cmodep; - Uchar *dmodep; - Uchar *smodep; - int *lenp; -{ - int len; - BOOL ret = TRUE; - -#ifdef XXX - if (lenp) - *lenp = 0; - if (!has_mode_page(scgp, page, pagename, &len)) { - if (!scgp->silent) errmsgno(EX_BAD, - "Warning: controller does not support %s page.\n", - pagename); - return (FALSE); - } - if (lenp) - *lenp = len; -#else - if (lenp == 0) - len = 0xFF; -#endif - - if (modep) { - fillbytes(modep, 0x100, '\0'); - scgp->silent++; - (void) unit_ready(scgp); - scgp->silent--; - if (mode_sense(scgp, modep, len, page, 0) < 0) { /* Page x current */ - errmsgno(EX_BAD, "Cannot get %s data.\n", pagename); - ret = FALSE; - } else if (scgp->verbose) { - scg_prbytes("Mode Sense Data", modep, len - scg_getresid(scgp)); - } - } - - if (cmodep) { - fillbytes(cmodep, 0x100, '\0'); - scgp->silent++; - (void) unit_ready(scgp); - scgp->silent--; - if (mode_sense(scgp, cmodep, len, page, 1) < 0) { /* Page x change */ - errmsgno(EX_BAD, "Cannot get %s mask.\n", pagename); - ret = FALSE; - } else if (scgp->verbose) { - scg_prbytes("Mode Sense Data", cmodep, len - scg_getresid(scgp)); - } - } - - if (dmodep) { - fillbytes(dmodep, 0x100, '\0'); - scgp->silent++; - (void) unit_ready(scgp); - scgp->silent--; - if (mode_sense(scgp, dmodep, len, page, 2) < 0) { /* Page x default */ - errmsgno(EX_BAD, "Cannot get default %s data.\n", - pagename); - ret = FALSE; - } else if (scgp->verbose) { - scg_prbytes("Mode Sense Data", dmodep, len - scg_getresid(scgp)); - } - } - - if (smodep) { - fillbytes(smodep, 0x100, '\0'); - scgp->silent++; - (void) unit_ready(scgp); - scgp->silent--; - if (mode_sense(scgp, smodep, len, page, 3) < 0) { /* Page x saved */ - errmsgno(EX_BAD, "Cannot get saved %s data.\n", pagename); - ret = FALSE; - } else if (scgp->verbose) { - scg_prbytes("Mode Sense Data", smodep, len - scg_getresid(scgp)); - } - } - - return (ret); -} - -EXPORT BOOL -set_mode_params(scgp, pagename, modep, len, save, secsize) - SCSI *scgp; - char *pagename; - Uchar *modep; - int len; - int save; - int secsize; -{ - int i; - - ((struct scsi_modesel_header *)modep)->sense_data_len = 0; - ((struct scsi_modesel_header *)modep)->res2 = 0; - - i = ((struct scsi_mode_header *)modep)->blockdesc_len; - if (i > 0) { - i_to_3_byte( - ((struct scsi_mode_data *)modep)->blockdesc.nlblock, - 0); - if (secsize >= 0) - i_to_3_byte(((struct scsi_mode_data *)modep)->blockdesc.lblen, - secsize); - } - - scgp->silent++; - (void) unit_ready(scgp); - scgp->silent--; - if (save == 0 || mode_select(scgp, modep, len, save, scgp->inq->data_format >= 2) < 0) { - scgp->silent++; - (void) unit_ready(scgp); - scgp->silent--; - if (mode_select(scgp, modep, len, 0, scgp->inq->data_format >= 2) < 0) { - if (scgp->silent == 0) { - errmsgno(EX_BAD, - "Warning: using default %s data.\n", - pagename); - scg_prbytes("Mode Select Data", modep, len); - } - return (FALSE); - } - } - return (TRUE); -} diff -Nru cdrtools-2.01.01a33/btcflash/scsi_cdr.c cdrtools-3.02a09/btcflash/scsi_cdr.c --- cdrtools-2.01.01a33/btcflash/scsi_cdr.c 2007-07-08 18:37:18.000000000 +0000 +++ cdrtools-3.02a09/btcflash/scsi_cdr.c 1970-01-01 00:00:00.000000000 +0000 @@ -1,3108 +0,0 @@ -/* @(#)scsi_cdr.c 1.150 07/07/08 Copyright 1995-2007 J. Schilling */ -#ifndef lint -static char sccsid[] = - "@(#)scsi_cdr.c 1.150 07/07/08 Copyright 1995-2007 J. Schilling"; -#endif -/* - * SCSI command functions for cdrecord - * covering pre-MMC standard functions up to MMC-2 - * - * Copyright (c) 1995-2007 J. Schilling - */ -/* - * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. - * - * See the file CDDL.Schily.txt in this distribution for details. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file CDDL.Schily.txt from this distribution. - */ - -/* - * NOTICE: The Philips CDD 521 has several firmware bugs. - * One of them is not to respond to a SCSI selection - * within 200ms if the general load on the - * SCSI bus is high. To deal with this problem - * most of the SCSI commands are send with the - * SCG_CMD_RETRY flag enabled. - */ -#include - -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include - -#include -#include -#include -#include - -#include "scsimmc.h" -#include "cdrecord.h" - -#define strbeg(s1, s2) (strstr((s2), (s1)) == (s2)) - -EXPORT BOOL unit_ready __PR((SCSI *scgp)); -EXPORT BOOL wait_unit_ready __PR((SCSI *scgp, int secs)); -EXPORT BOOL scsi_in_progress __PR((SCSI *scgp)); -EXPORT BOOL cdr_underrun __PR((SCSI *scgp)); -EXPORT int test_unit_ready __PR((SCSI *scgp)); -EXPORT int rezero_unit __PR((SCSI *scgp)); -EXPORT int request_sense __PR((SCSI *scgp)); -EXPORT int request_sense_b __PR((SCSI *scgp, caddr_t bp, int cnt)); -EXPORT int inquiry __PR((SCSI *scgp, caddr_t, int)); -EXPORT int read_capacity __PR((SCSI *scgp)); -EXPORT void print_capacity __PR((SCSI *scgp, FILE *f)); -EXPORT int scsi_load_unload __PR((SCSI *scgp, int)); -EXPORT int scsi_prevent_removal __PR((SCSI *scgp, int)); -EXPORT int scsi_start_stop_unit __PR((SCSI *scgp, int, int, BOOL immed)); -EXPORT int scsi_set_speed __PR((SCSI *scgp, int readspeed, int writespeed, int rotctl)); -EXPORT int scsi_get_speed __PR((SCSI *scgp, int *readspeedp, int *writespeedp)); -EXPORT int qic02 __PR((SCSI *scgp, int)); -EXPORT int write_xscsi __PR((SCSI *scgp, caddr_t, long, long, int)); -EXPORT int write_xg0 __PR((SCSI *scgp, caddr_t, long, long, int)); -EXPORT int write_xg1 __PR((SCSI *scgp, caddr_t, long, long, int)); -EXPORT int write_xg5 __PR((SCSI *scgp, caddr_t, long, long, int)); -EXPORT int seek_scsi __PR((SCSI *scgp, long addr)); -EXPORT int seek_g0 __PR((SCSI *scgp, long addr)); -EXPORT int seek_g1 __PR((SCSI *scgp, long addr)); -EXPORT int scsi_flush_cache __PR((SCSI *scgp, BOOL immed)); -EXPORT int read_buffer __PR((SCSI *scgp, caddr_t bp, int cnt, int mode)); -EXPORT int write_buffer __PR((SCSI *scgp, char *buffer, long length, int mode, int bufferid, long offset)); -EXPORT int read_subchannel __PR((SCSI *scgp, caddr_t bp, int track, - int cnt, int msf, int subq, int fmt)); -EXPORT int read_toc __PR((SCSI *scgp, caddr_t, int, int, int, int)); -EXPORT int read_toc_philips __PR((SCSI *scgp, caddr_t, int, int, int, int)); -EXPORT int read_header __PR((SCSI *scgp, caddr_t, long, int, int)); -EXPORT int read_disk_info __PR((SCSI *scgp, caddr_t, int)); -EXPORT int read_track_info __PR((SCSI *scgp, caddr_t, int type, int addr, int cnt)); -EXPORT int get_trackinfo __PR((SCSI *scgp, caddr_t, int type, int addr, int cnt)); -EXPORT int read_rzone_info __PR((SCSI *scgp, caddr_t bp, int cnt)); -EXPORT int reserve_tr_rzone __PR((SCSI *scgp, long size)); -EXPORT int read_dvd_structure __PR((SCSI *scgp, caddr_t bp, int cnt, int mt, int addr, int layer, int fmt)); -EXPORT int send_dvd_structure __PR((SCSI *scgp, caddr_t bp, int cnt, int fmt)); -EXPORT int send_opc __PR((SCSI *scgp, caddr_t, int cnt, int doopc)); -EXPORT int read_track_info_philips __PR((SCSI *scgp, caddr_t, int, int)); -EXPORT int scsi_close_tr_session __PR((SCSI *scgp, int type, int track, BOOL immed)); -EXPORT int read_master_cue __PR((SCSI *scgp, caddr_t bp, int sheet, int cnt)); -EXPORT int send_cue_sheet __PR((SCSI *scgp, caddr_t bp, long size)); -EXPORT int read_buff_cap __PR((SCSI *scgp, long *, long *)); -EXPORT int scsi_blank __PR((SCSI *scgp, long addr, int blanktype, BOOL immed)); -EXPORT BOOL allow_atapi __PR((SCSI *scgp, BOOL new)); -EXPORT int mode_select __PR((SCSI *scgp, Uchar *, int, int, int)); -EXPORT int mode_sense __PR((SCSI *scgp, Uchar *dp, int cnt, int page, int pcf)); -EXPORT int mode_select_sg0 __PR((SCSI *scgp, Uchar *, int, int, int)); -EXPORT int mode_sense_sg0 __PR((SCSI *scgp, Uchar *dp, int cnt, int page, int pcf)); -EXPORT int mode_select_g0 __PR((SCSI *scgp, Uchar *, int, int, int)); -EXPORT int mode_select_g1 __PR((SCSI *scgp, Uchar *, int, int, int)); -EXPORT int mode_sense_g0 __PR((SCSI *scgp, Uchar *dp, int cnt, int page, int pcf)); -EXPORT int mode_sense_g1 __PR((SCSI *scgp, Uchar *dp, int cnt, int page, int pcf)); -EXPORT int read_tochdr __PR((SCSI *scgp, cdr_t *, int *, int *)); -EXPORT int read_cdtext __PR((SCSI *scgp)); -EXPORT int read_trackinfo __PR((SCSI *scgp, int, long *, struct msf *, int *, int *, int *)); -EXPORT int read_B0 __PR((SCSI *scgp, BOOL isbcd, long *b0p, long *lop)); -EXPORT int read_session_offset __PR((SCSI *scgp, long *)); -EXPORT int read_session_offset_philips __PR((SCSI *scgp, long *)); -EXPORT int sense_secsize __PR((SCSI *scgp, int current)); -EXPORT int select_secsize __PR((SCSI *scgp, int)); -EXPORT BOOL is_cddrive __PR((SCSI *scgp)); -EXPORT BOOL is_unknown_dev __PR((SCSI *scgp)); -EXPORT int read_scsi __PR((SCSI *scgp, caddr_t, long, int)); -EXPORT int read_g0 __PR((SCSI *scgp, caddr_t, long, int)); -EXPORT int read_g1 __PR((SCSI *scgp, caddr_t, long, int)); -EXPORT BOOL getdev __PR((SCSI *scgp, BOOL)); -EXPORT void printinq __PR((SCSI *scgp, FILE *f)); -EXPORT void printdev __PR((SCSI *scgp)); -EXPORT BOOL do_inquiry __PR((SCSI *scgp, BOOL)); -EXPORT BOOL recovery_needed __PR((SCSI *scgp, cdr_t *)); -EXPORT int scsi_load __PR((SCSI *scgp, cdr_t *)); -EXPORT int scsi_unload __PR((SCSI *scgp, cdr_t *)); -EXPORT int scsi_cdr_write __PR((SCSI *scgp, caddr_t bp, long sectaddr, long size, int blocks, BOOL islast)); -EXPORT struct cd_mode_page_2A * mmc_cap __PR((SCSI *scgp, Uchar *modep)); -EXPORT void mmc_getval __PR((struct cd_mode_page_2A *mp, - BOOL *cdrrp, BOOL *cdwrp, - BOOL *cdrrwp, BOOL *cdwrwp, - BOOL *dvdp, BOOL *dvdwp)); -EXPORT BOOL is_mmc __PR((SCSI *scgp, BOOL *cdwp, BOOL *dvdwp)); -EXPORT BOOL mmc_check __PR((SCSI *scgp, BOOL *cdrrp, BOOL *cdwrp, - BOOL *cdrrwp, BOOL *cdwrwp, - BOOL *dvdp, BOOL *dvdwp)); -LOCAL void print_speed __PR((char *fmt, int val)); -EXPORT void print_capabilities __PR((SCSI *scgp)); -extern int verify __PR((SCSI *scgp, long start, int count, long *bad_block)); - -EXPORT BOOL -unit_ready(scgp) - SCSI *scgp; -{ - register struct scg_cmd *scmd = scgp->scmd; - - if (test_unit_ready(scgp) >= 0) /* alles OK */ - return (TRUE); - else if (scmd->error >= SCG_FATAL) /* nicht selektierbar */ - return (FALSE); - - if (scg_sense_key(scgp) == SC_UNIT_ATTENTION) { - if (test_unit_ready(scgp) >= 0) /* alles OK */ - return (TRUE); - } - if ((scg_cmd_status(scgp) & ST_BUSY) != 0) { - /* - * Busy/reservation_conflict - */ - usleep(500000); - if (test_unit_ready(scgp) >= 0) /* alles OK */ - return (TRUE); - } - if (scg_sense_key(scgp) == -1) { /* non extended Sense */ - if (scg_sense_code(scgp) == 4) /* NOT_READY */ - return (FALSE); - return (TRUE); - } - /* FALSE wenn NOT_READY */ - return (scg_sense_key(scgp) != SC_NOT_READY); -} - -EXPORT BOOL -wait_unit_ready(scgp, secs) - SCSI *scgp; - int secs; -{ - int i; - int c; - int k; - int ret; - int err; - - seterrno(0); - scgp->silent++; - ret = test_unit_ready(scgp); /* eat up unit attention */ - if (ret < 0) { - err = geterrno(); - - if (err == EPERM || err == EACCES) { - scgp->silent--; - return (FALSE); - } - ret = test_unit_ready(scgp); /* got power on condition? */ - } - scgp->silent--; - - if (ret >= 0) /* success that's enough */ - return (TRUE); - - scgp->silent++; - for (i = 0; i < secs && (ret = test_unit_ready(scgp)) < 0; i++) { - if (scgp->scmd->scb.busy != 0) { - sleep(1); - continue; - } - c = scg_sense_code(scgp); - k = scg_sense_key(scgp); - /* - * Abort quickly if it does not make sense to wait. - * 0x30 == Cannot read medium - * 0x3A == Medium not present - */ - if ((k == SC_NOT_READY && (c == 0x3A || c == 0x30)) || - (k == SC_MEDIUM_ERROR)) { - if (scgp->silent <= 1) - scg_printerr(scgp); - scgp->silent--; - return (FALSE); - } - sleep(1); - } - scgp->silent--; - if (ret < 0) - return (FALSE); - return (TRUE); -} - -EXPORT BOOL -scsi_in_progress(scgp) - SCSI *scgp; -{ - if (scg_sense_key(scgp) == SC_NOT_READY && - /* - * Logigal unit not ready operation/long_write in progress - */ - scg_sense_code(scgp) == 0x04 && - (scg_sense_qual(scgp) == 0x04 || /* CyberDr. "format in progress"*/ - scg_sense_qual(scgp) == 0x07 || /* "operation in progress" */ - scg_sense_qual(scgp) == 0x08)) { /* "long write in progress" */ - return (TRUE); - } else { - if (scgp->silent <= 1) - scg_printerr(scgp); - } - return (FALSE); -} - -EXPORT BOOL -cdr_underrun(scgp) - SCSI *scgp; -{ - if ((scg_sense_key(scgp) != SC_ILLEGAL_REQUEST && - scg_sense_key(scgp) != SC_MEDIUM_ERROR)) - return (FALSE); - - if ((scg_sense_code(scgp) == 0x21 && - (scg_sense_qual(scgp) == 0x00 || /* logical block address out of range */ - scg_sense_qual(scgp) == 0x02)) || /* invalid address for write */ - - (scg_sense_code(scgp) == 0x0C && - scg_sense_qual(scgp) == 0x09)) { /* write error - loss of streaming */ - return (TRUE); - } - /* - * XXX Bei manchen Brennern kommt mach dem der Brennvorgang bereits - * XXX eine Weile gelaufen ist ein 5/24/0 Invalid field in CDB. - * XXX Daher sollte man testen ob schon geschrieben wurde... - */ - return (FALSE); -} - -EXPORT int -test_unit_ready(scgp) - SCSI *scgp; -{ - register struct scg_cmd *scmd = scgp->scmd; - - fillbytes((caddr_t)scmd, sizeof (*scmd), '\0'); - scmd->addr = (caddr_t)0; - scmd->size = 0; - scmd->flags = SCG_DISRE_ENA | (scgp->silent ? SCG_SILENT:0); - scmd->cdb_len = SC_G0_CDBLEN; - scmd->sense_len = CCS_SENSE_LEN; - scmd->cdb.g0_cdb.cmd = SC_TEST_UNIT_READY; - scmd->cdb.g0_cdb.lun = scg_lun(scgp); - - scgp->cmdname = "test unit ready"; - - return (scg_cmd(scgp)); -} - -EXPORT int -rezero_unit(scgp) - SCSI *scgp; -{ - register struct scg_cmd *scmd = scgp->scmd; - - fillbytes((caddr_t)scmd, sizeof (*scmd), '\0'); - scmd->addr = (caddr_t)0; - scmd->size = 0; - scmd->flags = SCG_DISRE_ENA; - scmd->cdb_len = SC_G0_CDBLEN; - scmd->sense_len = CCS_SENSE_LEN; - scmd->cdb.g0_cdb.cmd = SC_REZERO_UNIT; - scmd->cdb.g0_cdb.lun = scg_lun(scgp); - - scgp->cmdname = "rezero unit"; - - return (scg_cmd(scgp)); -} - -EXPORT int -request_sense(scgp) - SCSI *scgp; -{ - char sensebuf[CCS_SENSE_LEN]; - char *cmdsave; - - cmdsave = scgp->cmdname; - - if (request_sense_b(scgp, sensebuf, sizeof (sensebuf)) < 0) - return (-1); - scgp->cmdname = cmdsave; - scg_prsense((Uchar *)sensebuf, CCS_SENSE_LEN - scg_getresid(scgp)); - return (0); -} - -EXPORT int -request_sense_b(scgp, bp, cnt) - SCSI *scgp; - caddr_t bp; - int cnt; -{ - register struct scg_cmd *scmd = scgp->scmd; - - - fillbytes((caddr_t)scmd, sizeof (*scmd), '\0'); - scmd->addr = bp; - scmd->size = cnt; - scmd->flags = SCG_RECV_DATA|SCG_DISRE_ENA; - scmd->cdb_len = SC_G0_CDBLEN; - scmd->sense_len = CCS_SENSE_LEN; - scmd->cdb.g0_cdb.cmd = SC_REQUEST_SENSE; - scmd->cdb.g0_cdb.lun = scg_lun(scgp); - scmd->cdb.g0_cdb.count = cnt; - - scgp->cmdname = "request_sense"; - - if (scg_cmd(scgp) < 0) - return (-1); - return (0); -} - -EXPORT int -inquiry(scgp, bp, cnt) - SCSI *scgp; - caddr_t bp; - int cnt; -{ - register struct scg_cmd *scmd = scgp->scmd; - - fillbytes(bp, cnt, '\0'); - fillbytes((caddr_t)scmd, sizeof (*scmd), '\0'); - scmd->addr = bp; - scmd->size = cnt; - scmd->flags = SCG_RECV_DATA|SCG_DISRE_ENA; - scmd->cdb_len = SC_G0_CDBLEN; - scmd->sense_len = CCS_SENSE_LEN; - scmd->cdb.g0_cdb.cmd = SC_INQUIRY; - scmd->cdb.g0_cdb.lun = scg_lun(scgp); - scmd->cdb.g0_cdb.count = cnt; - - scgp->cmdname = "inquiry"; - - if (scg_cmd(scgp) < 0) - return (-1); - if (scgp->verbose) - scg_prbytes("Inquiry Data :", (Uchar *)bp, cnt - scg_getresid(scgp)); - return (0); -} - -EXPORT int -read_capacity(scgp) - SCSI *scgp; -{ - register struct scg_cmd *scmd = scgp->scmd; - - fillbytes((caddr_t)scmd, sizeof (*scmd), '\0'); - scmd->addr = (caddr_t)scgp->cap; - scmd->size = sizeof (struct scsi_capacity); - scmd->flags = SCG_RECV_DATA|SCG_DISRE_ENA; - scmd->cdb_len = SC_G1_CDBLEN; - scmd->sense_len = CCS_SENSE_LEN; - scmd->cdb.g1_cdb.cmd = 0x25; /* Read Capacity */ - scmd->cdb.g1_cdb.lun = scg_lun(scgp); - g1_cdblen(&scmd->cdb.g1_cdb, 0); /* Full Media */ - - scgp->cmdname = "read capacity"; - - if (scg_cmd(scgp) < 0) { - return (-1); - } else { - long cbsize; - long cbaddr; - - /* - * c_bsize & c_baddr are signed Int32_t - * so we use signed int conversion here. - */ - cbsize = a_to_4_byte(&scgp->cap->c_bsize); - cbaddr = a_to_4_byte(&scgp->cap->c_baddr); - scgp->cap->c_bsize = cbsize; - scgp->cap->c_baddr = cbaddr; - } - return (0); -} - -EXPORT void -print_capacity(scgp, f) - SCSI *scgp; - FILE *f; -{ - long kb; - long mb; - long prmb; - double dkb; - - dkb = (scgp->cap->c_baddr+1.0) * (scgp->cap->c_bsize/1024.0); - kb = dkb; - mb = dkb / 1024.0; - prmb = dkb / 1000.0 * 1.024; - fprintf(f, "Capacity: %ld Blocks = %ld kBytes = %ld MBytes = %ld prMB\n", - (long)scgp->cap->c_baddr+1, kb, mb, prmb); - fprintf(f, "Sectorsize: %ld Bytes\n", (long)scgp->cap->c_bsize); -} - -EXPORT int -scsi_load_unload(scgp, load) - SCSI *scgp; - int load; -{ - register struct scg_cmd *scmd = scgp->scmd; - - fillbytes((caddr_t)scmd, sizeof (*scmd), '\0'); - scmd->flags = SCG_DISRE_ENA; - scmd->cdb_len = SC_G5_CDBLEN; - scmd->sense_len = CCS_SENSE_LEN; - scmd->cdb.g5_cdb.cmd = 0xA6; - scmd->cdb.g5_cdb.lun = scg_lun(scgp); - scmd->cdb.g5_cdb.addr[1] = load?3:2; - scmd->cdb.g5_cdb.count[2] = 0; /* slot # */ - - scgp->cmdname = "medium load/unload"; - - if (scg_cmd(scgp) < 0) - return (-1); - return (0); -} - -EXPORT int -scsi_prevent_removal(scgp, prevent) - SCSI *scgp; - int prevent; -{ - register struct scg_cmd *scmd = scgp->scmd; - - fillbytes((caddr_t)scmd, sizeof (*scmd), '\0'); - scmd->flags = SCG_DISRE_ENA; - scmd->cdb_len = SC_G0_CDBLEN; - scmd->sense_len = CCS_SENSE_LEN; - scmd->cdb.g0_cdb.cmd = 0x1E; - scmd->cdb.g0_cdb.lun = scg_lun(scgp); - scmd->cdb.g0_cdb.count = prevent & 1; - - scgp->cmdname = "prevent/allow medium removal"; - - if (scg_cmd(scgp) < 0) - return (-1); - return (0); -} - - -EXPORT int -scsi_start_stop_unit(scgp, flg, loej, immed) - SCSI *scgp; - int flg; - int loej; - BOOL immed; -{ - register struct scg_cmd *scmd = scgp->scmd; - - fillbytes((caddr_t)scmd, sizeof (*scmd), '\0'); - scmd->flags = SCG_DISRE_ENA; - scmd->cdb_len = SC_G0_CDBLEN; - scmd->sense_len = CCS_SENSE_LEN; - scmd->cdb.g0_cdb.cmd = 0x1B; /* Start Stop Unit */ - scmd->cdb.g0_cdb.lun = scg_lun(scgp); - scmd->cdb.g0_cdb.count = (flg ? 1:0) | (loej ? 2:0); - - if (immed) - scmd->cdb.cmd_cdb[1] |= 0x01; - - scgp->cmdname = "start/stop unit"; - - return (scg_cmd(scgp)); -} - -EXPORT int -scsi_set_speed(scgp, readspeed, writespeed, rotctl) - SCSI *scgp; - int readspeed; - int writespeed; - int rotctl; -{ - register struct scg_cmd *scmd = scgp->scmd; - - fillbytes((caddr_t)scmd, sizeof (*scmd), '\0'); - scmd->flags = SCG_DISRE_ENA; - scmd->cdb_len = SC_G5_CDBLEN; - scmd->sense_len = CCS_SENSE_LEN; - scmd->cdb.g5_cdb.cmd = 0xBB; - scmd->cdb.g5_cdb.lun = scg_lun(scgp); - - if (readspeed < 0) - i_to_2_byte(&scmd->cdb.g5_cdb.addr[0], 0xFFFF); - else - i_to_2_byte(&scmd->cdb.g5_cdb.addr[0], readspeed); - if (writespeed < 0) - i_to_2_byte(&scmd->cdb.g5_cdb.addr[2], 0xFFFF); - else - i_to_2_byte(&scmd->cdb.g5_cdb.addr[2], writespeed); - - scmd->cdb.cmd_cdb[1] |= rotctl & 0x03; - - scgp->cmdname = "set cd speed"; - - if (scg_cmd(scgp) < 0) - return (-1); - return (0); -} - -EXPORT int -scsi_get_speed(scgp, readspeedp, writespeedp) - SCSI *scgp; - int *readspeedp; - int *writespeedp; -{ - struct cd_mode_page_2A *mp; - Uchar m[256]; - int val; - - scgp->silent++; - mp = mmc_cap(scgp, m); /* Get MMC capabilities in allocated mp */ - scgp->silent--; - if (mp == NULL) - return (-1); /* Pre SCSI-3/mmc drive */ - - val = a_to_u_2_byte(mp->cur_read_speed); - if (readspeedp) - *readspeedp = val; - - if (mp->p_len >= 28) - val = a_to_u_2_byte(mp->v3_cur_write_speed); - else - val = a_to_u_2_byte(mp->cur_write_speed); - if (writespeedp) - *writespeedp = val; - - return (0); -} - - -EXPORT int -qic02(scgp, cmd) - SCSI *scgp; - int cmd; -{ - register struct scg_cmd *scmd = scgp->scmd; - - fillbytes((caddr_t)scmd, sizeof (*scmd), '\0'); - scmd->addr = (caddr_t)0; - scmd->size = 0; - scmd->flags = SCG_DISRE_ENA; - scmd->cdb_len = SC_G0_CDBLEN; - scmd->sense_len = DEF_SENSE_LEN; - scmd->cdb.g0_cdb.cmd = 0x0D; /* qic02 Sysgen SC4000 */ - scmd->cdb.g0_cdb.lun = scg_lun(scgp); - scmd->cdb.g0_cdb.mid_addr = cmd; - - scgp->cmdname = "qic 02"; - return (scg_cmd(scgp)); -} - -#define G0_MAXADDR 0x1FFFFFL - -EXPORT int -write_xscsi(scgp, bp, addr, size, cnt) - SCSI *scgp; - caddr_t bp; /* address of buffer */ - long addr; /* disk address (sector) to put */ - long size; /* number of bytes to transfer */ - int cnt; /* sectorcount */ -{ - if (addr <= G0_MAXADDR) - return (write_xg0(scgp, bp, addr, size, cnt)); - else - return (write_xg1(scgp, bp, addr, size, cnt)); -} - -EXPORT int -write_xg0(scgp, bp, addr, size, cnt) - SCSI *scgp; - caddr_t bp; /* address of buffer */ - long addr; /* disk address (sector) to put */ - long size; /* number of bytes to transfer */ - int cnt; /* sectorcount */ -{ - register struct scg_cmd *scmd = scgp->scmd; - - fillbytes((caddr_t)scmd, sizeof (*scmd), '\0'); - scmd->addr = bp; - scmd->size = size; - scmd->flags = SCG_DISRE_ENA|SCG_CMD_RETRY; -/* scmd->flags = SCG_DISRE_ENA;*/ - scmd->cdb_len = SC_G0_CDBLEN; - scmd->sense_len = CCS_SENSE_LEN; - scmd->cdb.g0_cdb.cmd = SC_WRITE; - scmd->cdb.g0_cdb.lun = scg_lun(scgp); - g0_cdbaddr(&scmd->cdb.g0_cdb, addr); - scmd->cdb.g0_cdb.count = cnt; - - scgp->cmdname = "write_g0"; - - if (scg_cmd(scgp) < 0) - return (-1); - return (size - scg_getresid(scgp)); -} - -EXPORT int -write_xg1(scgp, bp, addr, size, cnt) - SCSI *scgp; - caddr_t bp; /* address of buffer */ - long addr; /* disk address (sector) to put */ - long size; /* number of bytes to transfer */ - int cnt; /* sectorcount */ -{ - register struct scg_cmd *scmd = scgp->scmd; - - fillbytes((caddr_t)scmd, sizeof (*scmd), '\0'); - scmd->addr = bp; - scmd->size = size; - scmd->flags = SCG_DISRE_ENA|SCG_CMD_RETRY; -/* scmd->flags = SCG_DISRE_ENA;*/ - scmd->cdb_len = SC_G1_CDBLEN; - scmd->sense_len = CCS_SENSE_LEN; - scmd->cdb.g1_cdb.cmd = SC_EWRITE; - scmd->cdb.g1_cdb.lun = scg_lun(scgp); - g1_cdbaddr(&scmd->cdb.g1_cdb, addr); - g1_cdblen(&scmd->cdb.g1_cdb, cnt); - - scgp->cmdname = "write_g1"; - - if (scg_cmd(scgp) < 0) - return (-1); - return (size - scg_getresid(scgp)); -} - -EXPORT int -write_xg5(scgp, bp, addr, size, cnt) - SCSI *scgp; - caddr_t bp; /* address of buffer */ - long addr; /* disk address (sector) to put */ - long size; /* number of bytes to transfer */ - int cnt; /* sectorcount */ -{ - register struct scg_cmd *scmd = scgp->scmd; - - fillbytes((caddr_t)scmd, sizeof (*scmd), '\0'); - scmd->addr = bp; - scmd->size = size; - scmd->flags = SCG_DISRE_ENA|SCG_CMD_RETRY; -/* scmd->flags = SCG_DISRE_ENA;*/ - scmd->cdb_len = SC_G5_CDBLEN; - scmd->sense_len = CCS_SENSE_LEN; - scmd->cdb.g5_cdb.cmd = 0xAA; - scmd->cdb.g5_cdb.lun = scg_lun(scgp); - g5_cdbaddr(&scmd->cdb.g5_cdb, addr); - g5_cdblen(&scmd->cdb.g5_cdb, cnt); - - scgp->cmdname = "write_g5"; - - if (scg_cmd(scgp) < 0) - return (-1); - return (size - scg_getresid(scgp)); -} - -EXPORT int -seek_scsi(scgp, addr) - SCSI *scgp; - long addr; -{ - if (addr <= G0_MAXADDR) - return (seek_g0(scgp, addr)); - else - return (seek_g1(scgp, addr)); -} - -EXPORT int -seek_g0(scgp, addr) - SCSI *scgp; - long addr; -{ - register struct scg_cmd *scmd = scgp->scmd; - - fillbytes((caddr_t)scmd, sizeof (*scmd), '\0'); - scmd->flags = SCG_DISRE_ENA; - scmd->cdb_len = SC_G0_CDBLEN; - scmd->sense_len = CCS_SENSE_LEN; - scmd->cdb.g0_cdb.cmd = 0x0B; /* Seek */ - scmd->cdb.g0_cdb.lun = scg_lun(scgp); - g0_cdbaddr(&scmd->cdb.g0_cdb, addr); - - scgp->cmdname = "seek_g0"; - - return (scg_cmd(scgp)); -} - -EXPORT int -seek_g1(scgp, addr) - SCSI *scgp; - long addr; -{ - register struct scg_cmd *scmd = scgp->scmd; - - fillbytes((caddr_t)scmd, sizeof (*scmd), '\0'); - scmd->flags = SCG_DISRE_ENA; - scmd->cdb_len = SC_G1_CDBLEN; - scmd->sense_len = CCS_SENSE_LEN; - scmd->cdb.g1_cdb.cmd = 0x2B; /* Seek G1 */ - scmd->cdb.g1_cdb.lun = scg_lun(scgp); - g1_cdbaddr(&scmd->cdb.g1_cdb, addr); - - scgp->cmdname = "seek_g1"; - - return (scg_cmd(scgp)); -} - -EXPORT int -scsi_flush_cache(scgp, immed) - SCSI *scgp; - BOOL immed; -{ - register struct scg_cmd *scmd = scgp->scmd; - - fillbytes((caddr_t)scmd, sizeof (*scmd), '\0'); - scmd->flags = SCG_DISRE_ENA; - scmd->cdb_len = SC_G1_CDBLEN; - scmd->sense_len = CCS_SENSE_LEN; - scmd->timeout = 2 * 60; /* Max: sizeof (CDR-cache)/150KB/s */ - scmd->cdb.g1_cdb.cmd = 0x35; - scmd->cdb.g1_cdb.lun = scg_lun(scgp); - - if (immed) - scmd->cdb.cmd_cdb[1] |= 0x02; - - scgp->cmdname = "flush cache"; - - if (scg_cmd(scgp) < 0) - return (-1); - return (0); -} - -EXPORT int -read_buffer(scgp, bp, cnt, mode) - SCSI *scgp; - caddr_t bp; - int cnt; - int mode; -{ - register struct scg_cmd *scmd = scgp->scmd; - - fillbytes((caddr_t)scmd, sizeof (*scmd), '\0'); - scmd->addr = bp; - scmd->size = cnt; - scmd->dma_read = 1; - scmd->cdb_len = SC_G1_CDBLEN; - scmd->sense_len = CCS_SENSE_LEN; - scmd->cdb.g1_cdb.cmd = 0x3C; /* Read Buffer */ - scmd->cdb.g1_cdb.lun = scg_lun(scgp); - scmd->cdb.cmd_cdb[1] |= (mode & 7); - g1_cdblen(&scmd->cdb.g1_cdb, cnt); - - scgp->cmdname = "read buffer"; - - return (scg_cmd(scgp)); -} - -EXPORT int -write_buffer(scgp, buffer, length, mode, bufferid, offset) - SCSI *scgp; - char *buffer; - long length; - int mode; - int bufferid; - long offset; -{ - register struct scg_cmd *scmd = scgp->scmd; - char *cdb; - - fillbytes((caddr_t)scmd, sizeof (*scmd), '\0'); - scmd->addr = buffer; - scmd->size = length; - scmd->flags = SCG_DISRE_ENA|SCG_CMD_RETRY; - scmd->cdb_len = SC_G1_CDBLEN; - scmd->sense_len = CCS_SENSE_LEN; - - cdb = (char *)scmd->cdb.cmd_cdb; - - cdb[0] = 0x3B; - cdb[1] = mode & 7; - cdb[2] = bufferid; - cdb[3] = offset >> 16; - cdb[4] = (offset >> 8) & 0xff; - cdb[5] = offset & 0xff; - cdb[6] = length >> 16; - cdb[7] = (length >> 8) & 0xff; - cdb[8] = length & 0xff; - - scgp->cmdname = "write_buffer"; - - if (scg_cmd(scgp) >= 0) - return (1); - return (0); -} - -EXPORT int -read_subchannel(scgp, bp, track, cnt, msf, subq, fmt) - SCSI *scgp; - caddr_t bp; - int track; - int cnt; - int msf; - int subq; - int fmt; - -{ - register struct scg_cmd *scmd = scgp->scmd; - - fillbytes((caddr_t)scmd, sizeof (*scmd), '\0'); - scmd->addr = bp; - scmd->size = cnt; - scmd->flags = SCG_RECV_DATA|SCG_DISRE_ENA; - scmd->cdb_len = SC_G1_CDBLEN; - scmd->sense_len = CCS_SENSE_LEN; - scmd->cdb.g1_cdb.cmd = 0x42; - scmd->cdb.g1_cdb.lun = scg_lun(scgp); - if (msf) - scmd->cdb.g1_cdb.res = 1; - if (subq) - scmd->cdb.g1_cdb.addr[0] = 0x40; - scmd->cdb.g1_cdb.addr[1] = fmt; - scmd->cdb.g1_cdb.res6 = track; - g1_cdblen(&scmd->cdb.g1_cdb, cnt); - - scgp->cmdname = "read subchannel"; - - if (scg_cmd(scgp) < 0) - return (-1); - return (0); -} - -EXPORT int -read_toc(scgp, bp, track, cnt, msf, fmt) - SCSI *scgp; - caddr_t bp; - int track; - int cnt; - int msf; - int fmt; - -{ - register struct scg_cmd *scmd = scgp->scmd; - - fillbytes((caddr_t)scmd, sizeof (*scmd), '\0'); - scmd->addr = bp; - scmd->size = cnt; - scmd->flags = SCG_RECV_DATA|SCG_DISRE_ENA; - scmd->cdb_len = SC_G1_CDBLEN; - scmd->sense_len = CCS_SENSE_LEN; - scmd->cdb.g1_cdb.cmd = 0x43; - scmd->cdb.g1_cdb.lun = scg_lun(scgp); - if (msf) - scmd->cdb.g1_cdb.res = 1; - scmd->cdb.g1_cdb.addr[0] = fmt & 0x0F; - scmd->cdb.g1_cdb.res6 = track; - g1_cdblen(&scmd->cdb.g1_cdb, cnt); - - scgp->cmdname = "read toc"; - - if (scg_cmd(scgp) < 0) - return (-1); - return (0); -} - -EXPORT int -read_toc_philips(scgp, bp, track, cnt, msf, fmt) - SCSI *scgp; - caddr_t bp; - int track; - int cnt; - int msf; - int fmt; - -{ - register struct scg_cmd *scmd = scgp->scmd; - - fillbytes((caddr_t)scmd, sizeof (*scmd), '\0'); - scmd->addr = bp; - scmd->size = cnt; - scmd->flags = SCG_RECV_DATA|SCG_DISRE_ENA; - scmd->cdb_len = SC_G1_CDBLEN; - scmd->sense_len = CCS_SENSE_LEN; - scmd->timeout = 4 * 60; /* May last 174s on a TEAC CD-R55S */ - scmd->cdb.g1_cdb.cmd = 0x43; - scmd->cdb.g1_cdb.lun = scg_lun(scgp); - if (msf) - scmd->cdb.g1_cdb.res = 1; - scmd->cdb.g1_cdb.res6 = track; - g1_cdblen(&scmd->cdb.g1_cdb, cnt); - - if (fmt & 1) - scmd->cdb.g1_cdb.vu_96 = 1; - if (fmt & 2) - scmd->cdb.g1_cdb.vu_97 = 1; - - scgp->cmdname = "read toc"; - - if (scg_cmd(scgp) < 0) - return (-1); - return (0); -} - -EXPORT int -read_header(scgp, bp, addr, cnt, msf) - SCSI *scgp; - caddr_t bp; - long addr; - int cnt; - int msf; -{ - register struct scg_cmd *scmd = scgp->scmd; - - fillbytes((caddr_t)scmd, sizeof (*scmd), '\0'); - scmd->addr = bp; - scmd->size = cnt; - scmd->flags = SCG_RECV_DATA|SCG_DISRE_ENA; - scmd->cdb_len = SC_G1_CDBLEN; - scmd->sense_len = CCS_SENSE_LEN; - scmd->cdb.g1_cdb.cmd = 0x44; - scmd->cdb.g1_cdb.lun = scg_lun(scgp); - if (msf) - scmd->cdb.g1_cdb.res = 1; - g1_cdbaddr(&scmd->cdb.g1_cdb, addr); - g1_cdblen(&scmd->cdb.g1_cdb, cnt); - - scgp->cmdname = "read header"; - - if (scg_cmd(scgp) < 0) - return (-1); - return (0); -} - -EXPORT int -read_disk_info(scgp, bp, cnt) - SCSI *scgp; - caddr_t bp; - int cnt; - -{ - register struct scg_cmd *scmd = scgp->scmd; - - fillbytes((caddr_t)scmd, sizeof (*scmd), '\0'); - scmd->addr = bp; - scmd->size = cnt; - scmd->flags = SCG_RECV_DATA|SCG_DISRE_ENA; - scmd->cdb_len = SC_G1_CDBLEN; - scmd->sense_len = CCS_SENSE_LEN; - scmd->timeout = 4 * 60; /* Needs up to 2 minutes */ - scmd->cdb.g1_cdb.cmd = 0x51; - scmd->cdb.g1_cdb.lun = scg_lun(scgp); - g1_cdblen(&scmd->cdb.g1_cdb, cnt); - - scgp->cmdname = "read disk info"; - - if (scg_cmd(scgp) < 0) - return (-1); - return (0); -} - -EXPORT int -read_track_info(scgp, bp, type, addr, cnt) - SCSI *scgp; - caddr_t bp; - int type; - int addr; - int cnt; - -{ - register struct scg_cmd *scmd = scgp->scmd; - - fillbytes((caddr_t)scmd, sizeof (*scmd), '\0'); - scmd->addr = bp; - scmd->size = cnt; - scmd->flags = SCG_RECV_DATA|SCG_DISRE_ENA; - scmd->cdb_len = SC_G1_CDBLEN; - scmd->sense_len = CCS_SENSE_LEN; - scmd->timeout = 4 * 60; /* Needs up to 2 minutes */ - scmd->cdb.g1_cdb.cmd = 0x52; - scmd->cdb.g1_cdb.lun = scg_lun(scgp); -/* scmd->cdb.cmd_cdb[1] = type & 0x03;*/ - scmd->cdb.cmd_cdb[1] = type; - g1_cdbaddr(&scmd->cdb.g1_cdb, addr); /* LBA/Track/Session */ - g1_cdblen(&scmd->cdb.g1_cdb, cnt); - - scgp->cmdname = "read track info"; - - if (scg_cmd(scgp) < 0) - return (-1); - return (0); -} - -EXPORT int -get_trackinfo(scgp, bp, type, addr, cnt) - SCSI *scgp; - caddr_t bp; - int type; - int addr; - int cnt; -{ - int len; - int ret; - - fillbytes(bp, cnt, '\0'); - - /* - * Used to be 2 instead of 4 (now). But some Y2k ATAPI drives as used - * by IOMEGA create a DMA overrun if we try to transfer only 2 bytes. - */ - if (read_track_info(scgp, bp, type, addr, 4) < 0) - return (-1); - - len = a_to_u_2_byte(bp); - len += 2; - if (len > cnt) - len = cnt; - ret = read_track_info(scgp, bp, type, addr, len); - -#ifdef DEBUG - if (lverbose > 1) - scg_prbytes("Track info:", (Uchar *)bp, - len-scg_getresid(scgp)); -#endif - return (ret); -} - -EXPORT int -read_rzone_info(scgp, bp, cnt) - SCSI *scgp; - caddr_t bp; - int cnt; -{ - return (get_trackinfo(scgp, bp, TI_TYPE_LBA, 0, cnt)); -} - -EXPORT int -reserve_tr_rzone(scgp, size) - SCSI *scgp; - long size; /* number of blocks */ -{ - register struct scg_cmd *scmd = scgp->scmd; - - fillbytes((caddr_t)scmd, sizeof (*scmd), '\0'); - scmd->addr = (caddr_t)0; - scmd->size = 0; - scmd->flags = SCG_DISRE_ENA|SCG_CMD_RETRY; - scmd->cdb_len = SC_G1_CDBLEN; - scmd->sense_len = CCS_SENSE_LEN; - scmd->cdb.g1_cdb.cmd = 0x53; - scmd->cdb.g1_cdb.lun = scg_lun(scgp); - - i_to_4_byte(&scmd->cdb.g1_cdb.addr[3], size); - - scgp->cmdname = "reserve_track_rzone"; - - if (scg_cmd(scgp) < 0) - return (-1); - return (0); -} - -EXPORT int -read_dvd_structure(scgp, bp, cnt, mt, addr, layer, fmt) - SCSI *scgp; - caddr_t bp; - int cnt; - int mt; - int addr; - int layer; - int fmt; -{ - register struct scg_cmd *scmd = scgp->scmd; - - fillbytes((caddr_t)scmd, sizeof (*scmd), '\0'); - scmd->addr = bp; - scmd->size = cnt; - scmd->flags = SCG_RECV_DATA|SCG_DISRE_ENA; - scmd->cdb_len = SC_G5_CDBLEN; - scmd->sense_len = CCS_SENSE_LEN; - scmd->timeout = 4 * 60; /* Needs up to 2 minutes ??? */ - scmd->cdb.g5_cdb.cmd = 0xAD; - scmd->cdb.g5_cdb.lun = scg_lun(scgp); - scmd->cdb.cmd_cdb[1] |= (mt & 0x0F); /* Media Type */ - g5_cdbaddr(&scmd->cdb.g5_cdb, addr); - g5_cdblen(&scmd->cdb.g5_cdb, cnt); - scmd->cdb.g5_cdb.count[0] = layer; - scmd->cdb.g5_cdb.count[1] = fmt; - - scgp->cmdname = "read dvd structure"; - - if (scg_cmd(scgp) < 0) - return (-1); - return (0); -} - -EXPORT int -send_dvd_structure(scgp, bp, cnt, fmt) - SCSI *scgp; - caddr_t bp; - int cnt; - int fmt; -{ - register struct scg_cmd *scmd = scgp->scmd; - - fillbytes((caddr_t)scmd, sizeof (*scmd), '\0'); - scmd->addr = bp; - scmd->size = cnt; - scmd->flags = SCG_DISRE_ENA; - scmd->cdb_len = SC_G5_CDBLEN; - scmd->sense_len = CCS_SENSE_LEN; - scmd->timeout = 4 * 60; /* Needs up to 2 minutes ??? */ - scmd->cdb.g5_cdb.cmd = 0xBF; - scmd->cdb.g5_cdb.lun = scg_lun(scgp); - g5_cdblen(&scmd->cdb.g5_cdb, cnt); - scmd->cdb.g5_cdb.count[0] = 0; - scmd->cdb.g5_cdb.count[1] = fmt; - - scgp->cmdname = "send dvd structure"; - - if (scg_cmd(scgp) < 0) - return (-1); - return (0); -} - -EXPORT int -send_opc(scgp, bp, cnt, doopc) - SCSI *scgp; - caddr_t bp; - int cnt; - int doopc; -{ - register struct scg_cmd *scmd = scgp->scmd; - - fillbytes((caddr_t)scmd, sizeof (*scmd), '\0'); - scmd->addr = bp; - scmd->size = cnt; - scmd->flags = SCG_DISRE_ENA; - scmd->cdb_len = SC_G1_CDBLEN; - scmd->sense_len = CCS_SENSE_LEN; - scmd->timeout = 60; - scmd->cdb.g1_cdb.cmd = 0x54; - scmd->cdb.g1_cdb.lun = scg_lun(scgp); - scmd->cdb.g1_cdb.reladr = doopc?1:0; - g1_cdblen(&scmd->cdb.g1_cdb, cnt); - - scgp->cmdname = "send opc"; - - if (scg_cmd(scgp) < 0) - return (-1); - return (0); -} - -EXPORT int -read_track_info_philips(scgp, bp, track, cnt) - SCSI *scgp; - caddr_t bp; - int track; - int cnt; - -{ - register struct scg_cmd *scmd = scgp->scmd; - - fillbytes((caddr_t)scmd, sizeof (*scmd), '\0'); - scmd->addr = bp; - scmd->size = cnt; - scmd->flags = SCG_RECV_DATA|SCG_DISRE_ENA; - scmd->cdb_len = SC_G1_CDBLEN; - scmd->sense_len = CCS_SENSE_LEN; - scmd->cdb.g1_cdb.cmd = 0xE5; - scmd->cdb.g1_cdb.lun = scg_lun(scgp); - g1_cdbaddr(&scmd->cdb.g1_cdb, track); - g1_cdblen(&scmd->cdb.g1_cdb, cnt); - - scgp->cmdname = "read track info"; - - if (scg_cmd(scgp) < 0) - return (-1); - return (0); -} - -EXPORT int -scsi_close_tr_session(scgp, type, track, immed) - SCSI *scgp; - int type; - int track; - BOOL immed; -{ - register struct scg_cmd *scmd = scgp->scmd; - - fillbytes((caddr_t)scmd, sizeof (*scmd), '\0'); - scmd->flags = SCG_DISRE_ENA; - scmd->cdb_len = SC_G1_CDBLEN; - scmd->sense_len = CCS_SENSE_LEN; - scmd->timeout = 8 * 60; /* Needs up to 4 minutes */ - scmd->cdb.g1_cdb.cmd = 0x5B; - scmd->cdb.g1_cdb.lun = scg_lun(scgp); - scmd->cdb.g1_cdb.addr[0] = type; - scmd->cdb.g1_cdb.addr[3] = track; - - if (immed) - scmd->cdb.g1_cdb.reladr = 1; -/* scmd->cdb.cmd_cdb[1] |= 0x01;*/ -#ifdef nono - scmd->cdb.g1_cdb.reladr = 1; /* IMM hack to test Mitsumi behaviour*/ -#endif - - scgp->cmdname = "close track/session"; - - if (scg_cmd(scgp) < 0) - return (-1); - return (0); -} - -EXPORT int -read_master_cue(scgp, bp, sheet, cnt) - SCSI *scgp; - caddr_t bp; /* address of master cue sheet */ - int sheet; /* Sheet number */ - int cnt; /* Transfer count */ -{ - register struct scg_cmd *scmd = scgp->scmd; - - fillbytes((caddr_t)scmd, sizeof (*scmd), '\0'); - scmd->addr = bp; - scmd->size = cnt; - scmd->flags = SCG_RECV_DATA|SCG_DISRE_ENA; - scmd->cdb_len = SC_G1_CDBLEN; - scmd->sense_len = CCS_SENSE_LEN; - scmd->cdb.g1_cdb.cmd = 0x59; /* Read master cue */ - scmd->cdb.g1_cdb.lun = scg_lun(scgp); - scmd->cdb.g1_cdb.addr[2] = sheet; - g1_cdblen(&scmd->cdb.g1_cdb, cnt); - - scgp->cmdname = "read master cue"; - - if (scg_cmd(scgp) < 0) - return (-1); - return (0); -} - -EXPORT int -send_cue_sheet(scgp, bp, size) - SCSI *scgp; - caddr_t bp; /* address of cue sheet buffer */ - long size; /* number of bytes to transfer */ -{ - register struct scg_cmd *scmd = scgp->scmd; - - fillbytes((caddr_t)scmd, sizeof (*scmd), '\0'); - scmd->addr = bp; - scmd->size = size; - scmd->flags = SCG_DISRE_ENA; - scmd->cdb_len = SC_G1_CDBLEN; - scmd->sense_len = CCS_SENSE_LEN; - scmd->cdb.g1_cdb.cmd = 0x5D; /* Send CUE sheet */ - scmd->cdb.g1_cdb.lun = scg_lun(scgp); - g1_cdblen(&scmd->cdb.g1_cdb, size); - - scgp->cmdname = "send_cue_sheet"; - - if (scg_cmd(scgp) < 0) - return (-1); - return (size - scmd->resid); -} - -EXPORT int -read_buff_cap(scgp, sp, fp) - SCSI *scgp; - long *sp; /* Size pointer */ - long *fp; /* Free pointer */ -{ - char resp[12]; - Ulong freespace; - Ulong bufsize; - int per; - register struct scg_cmd *scmd = scgp->scmd; - - fillbytes((caddr_t)scmd, sizeof (*scmd), '\0'); - scmd->addr = (caddr_t)resp; - scmd->size = sizeof (resp); - scmd->flags = SCG_RECV_DATA|SCG_DISRE_ENA; - scmd->cdb_len = SC_G1_CDBLEN; - scmd->sense_len = CCS_SENSE_LEN; - scmd->cdb.g1_cdb.cmd = 0x5C; /* Read buffer cap */ - scmd->cdb.g1_cdb.lun = scg_lun(scgp); - g1_cdblen(&scmd->cdb.g1_cdb, sizeof (resp)); - - scgp->cmdname = "read buffer cap"; - - if (scg_cmd(scgp) < 0) - return (-1); - - bufsize = a_to_u_4_byte(&resp[4]); - freespace = a_to_u_4_byte(&resp[8]); - if (sp) - *sp = bufsize; - if (fp) - *fp = freespace; - - if (scgp->verbose || (sp == 0 && fp == 0)) - printf("BFree: %ld K BSize: %ld K\n", freespace >> 10, bufsize >> 10); - - if (bufsize == 0) - return (0); - per = (100 * (bufsize - freespace)) / bufsize; - if (per < 0) - return (0); - if (per > 100) - return (100); - return (per); -} - -EXPORT int -scsi_blank(scgp, addr, blanktype, immed) - SCSI *scgp; - long addr; - int blanktype; - BOOL immed; -{ - register struct scg_cmd *scmd = scgp->scmd; - - fillbytes((caddr_t)scmd, sizeof (*scmd), '\0'); - scmd->flags = SCG_DISRE_ENA; - scmd->cdb_len = SC_G5_CDBLEN; - scmd->sense_len = CCS_SENSE_LEN; - scmd->timeout = 160 * 60; /* full blank at 1x could take 80 minutes */ - scmd->cdb.g5_cdb.cmd = 0xA1; /* Blank */ - scmd->cdb.g0_cdb.high_addr = blanktype; - g1_cdbaddr(&scmd->cdb.g5_cdb, addr); - - if (immed) - scmd->cdb.g5_cdb.res |= 8; -/* scmd->cdb.cmd_cdb[1] |= 0x10;*/ - - scgp->cmdname = "blank unit"; - - return (scg_cmd(scgp)); -} - -/* - * XXX First try to handle ATAPI: - * XXX ATAPI cannot handle SCSI 6 byte commands. - * XXX We try to simulate 6 byte mode sense/select. - */ -LOCAL BOOL is_atapi; - -EXPORT BOOL -allow_atapi(scgp, new) - SCSI *scgp; - BOOL new; -{ - BOOL old = is_atapi; - Uchar mode[256]; - - if (new == old) - return (old); - - scgp->silent++; - /* - * If a bad drive has been reset before, we may need to fire up two - * test unit ready commands to clear status. - */ - (void) unit_ready(scgp); - if (new && - mode_sense_g1(scgp, mode, 8, 0x3F, 0) < 0) { /* All pages current */ - new = FALSE; - } - scgp->silent--; - - is_atapi = new; - return (old); -} - -EXPORT int -mode_select(scgp, dp, cnt, smp, pf) - SCSI *scgp; - Uchar *dp; - int cnt; - int smp; - int pf; -{ - if (is_atapi) - return (mode_select_sg0(scgp, dp, cnt, smp, pf)); - return (mode_select_g0(scgp, dp, cnt, smp, pf)); -} - -EXPORT int -mode_sense(scgp, dp, cnt, page, pcf) - SCSI *scgp; - Uchar *dp; - int cnt; - int page; - int pcf; -{ - if (is_atapi) - return (mode_sense_sg0(scgp, dp, cnt, page, pcf)); - return (mode_sense_g0(scgp, dp, cnt, page, pcf)); -} - -/* - * Simulate mode select g0 with mode select g1. - */ -EXPORT int -mode_select_sg0(scgp, dp, cnt, smp, pf) - SCSI *scgp; - Uchar *dp; - int cnt; - int smp; - int pf; -{ - Uchar xmode[256+4]; - int amt = cnt; - - if (amt < 1 || amt > 255) { - /* XXX clear SCSI error codes ??? */ - return (-1); - } - - if (amt < 4) { /* Data length. medium type & VU */ - amt += 1; - } else { - amt += 4; - movebytes(&dp[4], &xmode[8], cnt-4); - } - xmode[0] = 0; - xmode[1] = 0; - xmode[2] = dp[1]; - xmode[3] = dp[2]; - xmode[4] = 0; - xmode[5] = 0; - i_to_2_byte(&xmode[6], (unsigned int)dp[3]); - - if (scgp->verbose) scg_prbytes("Mode Parameters (un-converted)", dp, cnt); - - return (mode_select_g1(scgp, xmode, amt, smp, pf)); -} - -/* - * Simulate mode sense g0 with mode sense g1. - */ -EXPORT int -mode_sense_sg0(scgp, dp, cnt, page, pcf) - SCSI *scgp; - Uchar *dp; - int cnt; - int page; - int pcf; -{ - Uchar xmode[256+4]; - int amt = cnt; - int len; - - if (amt < 1 || amt > 255) { - /* XXX clear SCSI error codes ??? */ - return (-1); - } - - fillbytes((caddr_t)xmode, sizeof (xmode), '\0'); - if (amt < 4) { /* Data length. medium type & VU */ - amt += 1; - } else { - amt += 4; - } - if (mode_sense_g1(scgp, xmode, amt, page, pcf) < 0) - return (-1); - - amt = cnt - scg_getresid(scgp); -/* - * For tests: Solaris 8 & LG CD-ROM always returns resid == amt - */ -/* amt = cnt;*/ - if (amt > 4) - movebytes(&xmode[8], &dp[4], amt-4); - len = a_to_u_2_byte(xmode); - if (len == 0) { - dp[0] = 0; - } else if (len < 6) { - if (len > 2) - len = 2; - dp[0] = len; - } else { - dp[0] = len - 3; - } - dp[1] = xmode[2]; - dp[2] = xmode[3]; - len = a_to_u_2_byte(&xmode[6]); - dp[3] = len; - - if (scgp->verbose) scg_prbytes("Mode Sense Data (converted)", dp, amt); - return (0); -} - -EXPORT int -mode_select_g0(scgp, dp, cnt, smp, pf) - SCSI *scgp; - Uchar *dp; - int cnt; - int smp; - int pf; -{ - register struct scg_cmd *scmd = scgp->scmd; - - fillbytes((caddr_t)scmd, sizeof (*scmd), '\0'); - scmd->addr = (caddr_t)dp; - scmd->size = cnt; - scmd->flags = SCG_DISRE_ENA; - scmd->cdb_len = SC_G0_CDBLEN; - scmd->sense_len = CCS_SENSE_LEN; - scmd->cdb.g0_cdb.cmd = SC_MODE_SELECT; - scmd->cdb.g0_cdb.lun = scg_lun(scgp); - scmd->cdb.g0_cdb.high_addr = smp ? 1 : 0 | pf ? 0x10 : 0; - scmd->cdb.g0_cdb.count = cnt; - - if (scgp->verbose) { - error("%s ", smp?"Save":"Set "); - scg_prbytes("Mode Parameters", dp, cnt); - } - - scgp->cmdname = "mode select g0"; - - return (scg_cmd(scgp)); -} - -EXPORT int -mode_select_g1(scgp, dp, cnt, smp, pf) - SCSI *scgp; - Uchar *dp; - int cnt; - int smp; - int pf; -{ - register struct scg_cmd *scmd = scgp->scmd; - - fillbytes((caddr_t)scmd, sizeof (*scmd), '\0'); - scmd->addr = (caddr_t)dp; - scmd->size = cnt; - scmd->flags = SCG_DISRE_ENA; - scmd->cdb_len = SC_G1_CDBLEN; - scmd->sense_len = CCS_SENSE_LEN; - scmd->cdb.g1_cdb.cmd = 0x55; - scmd->cdb.g1_cdb.lun = scg_lun(scgp); - scmd->cdb.g0_cdb.high_addr = smp ? 1 : 0 | pf ? 0x10 : 0; - g1_cdblen(&scmd->cdb.g1_cdb, cnt); - - if (scgp->verbose) { - printf("%s ", smp?"Save":"Set "); - scg_prbytes("Mode Parameters", dp, cnt); - } - - scgp->cmdname = "mode select g1"; - - return (scg_cmd(scgp)); -} - -EXPORT int -mode_sense_g0(scgp, dp, cnt, page, pcf) - SCSI *scgp; - Uchar *dp; - int cnt; - int page; - int pcf; -{ - register struct scg_cmd *scmd = scgp->scmd; - - fillbytes((caddr_t)scmd, sizeof (*scmd), '\0'); - scmd->addr = (caddr_t)dp; - scmd->size = 0xFF; - scmd->size = cnt; - scmd->flags = SCG_RECV_DATA|SCG_DISRE_ENA; - scmd->cdb_len = SC_G0_CDBLEN; - scmd->sense_len = CCS_SENSE_LEN; - scmd->cdb.g0_cdb.cmd = SC_MODE_SENSE; - scmd->cdb.g0_cdb.lun = scg_lun(scgp); -#ifdef nonono - scmd->cdb.g0_cdb.high_addr = 1<<4; /* DBD Disable Block desc. */ -#endif - scmd->cdb.g0_cdb.mid_addr = (page&0x3F) | ((pcf<<6)&0xC0); - scmd->cdb.g0_cdb.count = page ? 0xFF : 24; - scmd->cdb.g0_cdb.count = cnt; - - scgp->cmdname = "mode sense g0"; - - if (scg_cmd(scgp) < 0) - return (-1); - if (scgp->verbose) scg_prbytes("Mode Sense Data", dp, cnt - scg_getresid(scgp)); - return (0); -} - -EXPORT int -mode_sense_g1(scgp, dp, cnt, page, pcf) - SCSI *scgp; - Uchar *dp; - int cnt; - int page; - int pcf; -{ - register struct scg_cmd *scmd = scgp->scmd; - - fillbytes((caddr_t)scmd, sizeof (*scmd), '\0'); - scmd->addr = (caddr_t)dp; - scmd->size = cnt; - scmd->flags = SCG_RECV_DATA|SCG_DISRE_ENA; - scmd->cdb_len = SC_G1_CDBLEN; - scmd->sense_len = CCS_SENSE_LEN; - scmd->cdb.g1_cdb.cmd = 0x5A; - scmd->cdb.g1_cdb.lun = scg_lun(scgp); -#ifdef nonono - scmd->cdb.g0_cdb.high_addr = 1<<4; /* DBD Disable Block desc. */ -#endif - scmd->cdb.g1_cdb.addr[0] = (page&0x3F) | ((pcf<<6)&0xC0); - g1_cdblen(&scmd->cdb.g1_cdb, cnt); - - scgp->cmdname = "mode sense g1"; - - if (scg_cmd(scgp) < 0) - return (-1); - if (scgp->verbose) scg_prbytes("Mode Sense Data", dp, cnt - scg_getresid(scgp)); - return (0); -} - -struct trackdesc { - Uchar res0; - -#if defined(_BIT_FIELDS_LTOH) /* Intel byteorder */ - Ucbit control : 4; - Ucbit adr : 4; -#else /* Motorola byteorder */ - Ucbit adr : 4; - Ucbit control : 4; -#endif - - Uchar track; - Uchar res3; - Uchar addr[4]; -}; - -struct diskinfo { - struct tocheader hd; - struct trackdesc desc[1]; -}; - -struct siheader { - Uchar len[2]; - Uchar finished; - Uchar unfinished; -}; - -struct sidesc { - Uchar sess_number; - Uchar res1; - Uchar track; - Uchar res3; - Uchar addr[4]; -}; - -struct sinfo { - struct siheader hd; - struct sidesc desc[1]; -}; - -struct trackheader { - Uchar mode; - Uchar res[3]; - Uchar addr[4]; -}; -#define TRM_ZERO 0 -#define TRM_USER_ECC 1 /* 2048 bytes user data + 288 Bytes ECC/EDC */ -#define TRM_USER 2 /* All user data (2336 bytes) */ - - -EXPORT int -read_tochdr(scgp, dp, fp, lp) - SCSI *scgp; - cdr_t *dp; - int *fp; - int *lp; -{ - struct tocheader *tp; - char xb[256]; - int len; - - tp = (struct tocheader *)xb; - - fillbytes((caddr_t)xb, sizeof (xb), '\0'); - if (read_toc(scgp, xb, 0, sizeof (struct tocheader), 0, FMT_TOC) < 0) { - if (scgp->silent == 0) - errmsgno(EX_BAD, "Cannot read TOC header\n"); - return (-1); - } - len = a_to_u_2_byte(tp->len) + sizeof (struct tocheader)-2; - if (len >= 4) { - if (fp) - *fp = tp->first; - if (lp) - *lp = tp->last; - return (0); - } - return (-1); -} - -EXPORT int -read_cdtext(scgp) - SCSI *scgp; -{ - struct tocheader *tp; - char xb[256]; - int len; - char xxb[10000]; - - tp = (struct tocheader *)xb; - - fillbytes((caddr_t)xb, sizeof (xb), '\0'); - if (read_toc(scgp, xb, 0, sizeof (struct tocheader), 0, FMT_CDTEXT) < 0) { - if (scgp->silent == 0 || scgp->verbose > 0) - errmsgno(EX_BAD, "Cannot read CD-Text header\n"); - return (-1); - } - len = a_to_u_2_byte(tp->len) + sizeof (struct tocheader)-2; - printf("CD-Text len: %d\n", len); - - if (read_toc(scgp, xxb, 0, len, 0, FMT_CDTEXT) < 0) { - if (scgp->silent == 0) - errmsgno(EX_BAD, "Cannot read CD-Text\n"); - return (-1); - } - { - FILE *f = fileopen("cdtext.dat", "wctb"); - filewrite(f, xxb, len); - } - return (0); -} - -EXPORT int -read_trackinfo(scgp, track, offp, msfp, adrp, controlp, modep) - SCSI *scgp; - int track; - long *offp; - struct msf *msfp; - int *adrp; - int *controlp; - int *modep; -{ - struct diskinfo *dp; - char xb[256]; - int len; - - dp = (struct diskinfo *)xb; - - fillbytes((caddr_t)xb, sizeof (xb), '\0'); - if (read_toc(scgp, xb, track, sizeof (struct diskinfo), 0, FMT_TOC) < 0) { - if (scgp->silent <= 0) - errmsgno(EX_BAD, "Cannot read TOC\n"); - return (-1); - } - len = a_to_u_2_byte(dp->hd.len) + sizeof (struct tocheader)-2; - if (len < (int)sizeof (struct diskinfo)) - return (-1); - - if (offp) - *offp = a_to_4_byte(dp->desc[0].addr); - if (adrp) - *adrp = dp->desc[0].adr; - if (controlp) - *controlp = dp->desc[0].control; - - if (msfp) { - scgp->silent++; - if (read_toc(scgp, xb, track, sizeof (struct diskinfo), 1, FMT_TOC) - >= 0) { - msfp->msf_min = dp->desc[0].addr[1]; - msfp->msf_sec = dp->desc[0].addr[2]; - msfp->msf_frame = dp->desc[0].addr[3]; - } else if (read_toc(scgp, xb, track, sizeof (struct diskinfo), 0, FMT_TOC) - >= 0) { - /* - * Some drives (e.g. the Philips CDD-522) don't support - * to read the TOC in MSF mode. - */ - long off = a_to_4_byte(dp->desc[0].addr); - - lba_to_msf(off, msfp); - } else { - msfp->msf_min = 0; - msfp->msf_sec = 0; - msfp->msf_frame = 0; - } - scgp->silent--; - } - - if (modep == NULL) - return (0); - - if (track == 0xAA) { - *modep = -1; - return (0); - } - - fillbytes((caddr_t)xb, sizeof (xb), '\0'); - - scgp->silent++; - if (read_header(scgp, xb, *offp, 8, 0) >= 0) { - *modep = xb[0]; - } else if (read_track_info_philips(scgp, xb, track, 14) >= 0) { - *modep = xb[0xb] & 0xF; - } else { - *modep = -1; - } - scgp->silent--; - return (0); -} - -EXPORT int -read_B0(scgp, isbcd, b0p, lop) - SCSI *scgp; - BOOL isbcd; - long *b0p; - long *lop; -{ - struct fdiskinfo *dp; - struct ftrackdesc *tp; - char xb[8192]; - char *pe; - int len; - long l; - - dp = (struct fdiskinfo *)xb; - - fillbytes((caddr_t)xb, sizeof (xb), '\0'); - if (read_toc_philips(scgp, xb, 1, sizeof (struct tocheader), 0, FMT_FULLTOC) < 0) { - return (-1); - } - len = a_to_u_2_byte(dp->hd.len) + sizeof (struct tocheader)-2; - if (len < (int)sizeof (struct fdiskinfo)) - return (-1); - if (read_toc_philips(scgp, xb, 1, len, 0, FMT_FULLTOC) < 0) { - return (-1); - } - if (scgp->verbose) { - scg_prbytes("TOC data: ", (Uchar *)xb, - len > (int)sizeof (xb) - scg_getresid(scgp) ? - sizeof (xb) - scg_getresid(scgp) : len); - - tp = &dp->desc[0]; - pe = &xb[len]; - - while ((char *)tp < pe) { - scg_prbytes("ENT: ", (Uchar *)tp, 11); - tp++; - } - } - tp = &dp->desc[0]; - pe = &xb[len]; - - for (; (char *)tp < pe; tp++) { - if (tp->sess_number != dp->hd.last) - continue; - if (tp->point != 0xB0) - continue; - if (scgp->verbose) - scg_prbytes("B0: ", (Uchar *)tp, 11); - if (isbcd) { - l = msf_to_lba(from_bcd(tp->amin), - from_bcd(tp->asec), - from_bcd(tp->aframe), TRUE); - } else { - l = msf_to_lba(tp->amin, - tp->asec, - tp->aframe, TRUE); - } - if (b0p) - *b0p = l; - - if (scgp->verbose) - printf("B0 start: %ld\n", l); - - if (isbcd) { - l = msf_to_lba(from_bcd(tp->pmin), - from_bcd(tp->psec), - from_bcd(tp->pframe), TRUE); - } else { - l = msf_to_lba(tp->pmin, - tp->psec, - tp->pframe, TRUE); - } - - if (scgp->verbose) - printf("B0 lout: %ld\n", l); - if (lop) - *lop = l; - return (0); - } - return (-1); -} - - -/* - * Return address of first track in last session (SCSI-3/mmc version). - */ -EXPORT int -read_session_offset(scgp, offp) - SCSI *scgp; - long *offp; -{ - struct diskinfo *dp; - char xb[256]; - int len; - - dp = (struct diskinfo *)xb; - - fillbytes((caddr_t)xb, sizeof (xb), '\0'); - if (read_toc(scgp, (caddr_t)xb, 0, sizeof (struct tocheader), 0, FMT_SINFO) < 0) - return (-1); - - if (scgp->verbose) - scg_prbytes("tocheader: ", - (Uchar *)xb, sizeof (struct tocheader) - scg_getresid(scgp)); - - len = a_to_u_2_byte(dp->hd.len) + sizeof (struct tocheader)-2; - if (len > (int)sizeof (xb)) { - errmsgno(EX_BAD, "Session info too big.\n"); - return (-1); - } - if (read_toc(scgp, (caddr_t)xb, 0, len, 0, FMT_SINFO) < 0) - return (-1); - - if (scgp->verbose) - scg_prbytes("tocheader: ", - (Uchar *)xb, len - scg_getresid(scgp)); - - dp = (struct diskinfo *)xb; - if (offp) - *offp = a_to_u_4_byte(dp->desc[0].addr); - return (0); -} - -/* - * Return address of first track in last session (pre SCSI-3 version). - */ -EXPORT int -read_session_offset_philips(scgp, offp) - SCSI *scgp; - long *offp; -{ - struct sinfo *sp; - char xb[256]; - int len; - - sp = (struct sinfo *)xb; - - fillbytes((caddr_t)xb, sizeof (xb), '\0'); - if (read_toc_philips(scgp, (caddr_t)xb, 0, sizeof (struct siheader), 0, FMT_SINFO) < 0) - return (-1); - len = a_to_u_2_byte(sp->hd.len) + sizeof (struct siheader)-2; - if (len > (int)sizeof (xb)) { - errmsgno(EX_BAD, "Session info too big.\n"); - return (-1); - } - if (read_toc_philips(scgp, (caddr_t)xb, 0, len, 0, FMT_SINFO) < 0) - return (-1); - /* - * Old drives return the number of finished sessions in first/finished - * a descriptor is returned for each session. - * New drives return the number of the first and last session - * one descriptor for the last finished session is returned - * as in SCSI-3 - * In all cases the lowest session number is set to 1. - */ - sp = (struct sinfo *)xb; - if (offp) - *offp = a_to_u_4_byte(sp->desc[sp->hd.finished-1].addr); - return (0); -} - -EXPORT int -sense_secsize(scgp, current) - SCSI *scgp; - int current; -{ - Uchar mode[0x100]; - Uchar *p; - Uchar *ep; - int len; - int secsize = -1; - - scgp->silent++; - (void) unit_ready(scgp); - scgp->silent--; - - /* XXX Quick and dirty, musz verallgemeinert werden !!! */ - - fillbytes(mode, sizeof (mode), '\0'); - scgp->silent++; - - len = sizeof (struct scsi_mode_header) + - sizeof (struct scsi_mode_blockdesc); - /* - * Wenn wir hier get_mode_params() nehmen bekommen wir die Warnung: - * Warning: controller returns wrong page 1 for All pages page (3F). - */ - if (mode_sense(scgp, mode, len, 0x3F, current?0:2) < 0) { - fillbytes(mode, sizeof (mode), '\0'); - if (mode_sense(scgp, mode, len, 0, current?0:2) < 0) { /* VU (block desc) */ - scgp->silent--; - return (-1); - } - } - if (mode[3] == 8) { - if (scgp->debug) { - printf("Density: 0x%X\n", mode[4]); - printf("Blocks: %ld\n", a_to_u_3_byte(&mode[5])); - printf("Blocklen:%ld\n", a_to_u_3_byte(&mode[9])); - } - secsize = a_to_u_3_byte(&mode[9]); - } - fillbytes(mode, sizeof (mode), '\0'); - /* - * The ACARD TECH AEC-7720 ATAPI<->SCSI adaptor - * chokes if we try to transfer more than 0x40 bytes with - * mode_sense of all pages. So try to avoid to run this - * command if possible. - */ - if (scgp->debug && - mode_sense(scgp, mode, 0xFE, 0x3F, current?0:2) >= 0) { /* All Pages */ - - ep = mode+mode[0]; /* Points to last byte of data */ - p = &mode[4]; - p += mode[3]; - printf("Pages: "); - while (p < ep) { - printf("0x%X ", *p&0x3F); - p += p[1]+2; - } - printf("\n"); - } - scgp->silent--; - - return (secsize); -} - -EXPORT int -select_secsize(scgp, secsize) - SCSI *scgp; - int secsize; -{ - struct scsi_mode_data md; - int count = sizeof (struct scsi_mode_header) + - sizeof (struct scsi_mode_blockdesc); - - (void) test_unit_ready(scgp); /* clear any error situation */ - - fillbytes((caddr_t)&md, sizeof (md), '\0'); - md.header.blockdesc_len = 8; - i_to_3_byte(md.blockdesc.lblen, secsize); - - return (mode_select(scgp, (Uchar *)&md, count, 0, scgp->inq->data_format >= 2)); -} - -EXPORT BOOL -is_cddrive(scgp) - SCSI *scgp; -{ - return (scgp->inq->type == INQ_ROMD || scgp->inq->type == INQ_WORM); -} - -EXPORT BOOL -is_unknown_dev(scgp) - SCSI *scgp; -{ - return (scgp->dev == DEV_UNKNOWN); -} - -#ifndef DEBUG -#define DEBUG -#endif -#ifdef DEBUG - -EXPORT int -read_scsi(scgp, bp, addr, cnt) - SCSI *scgp; - caddr_t bp; - long addr; - int cnt; -{ - if (addr <= G0_MAXADDR && cnt < 256 && !is_atapi) - return (read_g0(scgp, bp, addr, cnt)); - else - return (read_g1(scgp, bp, addr, cnt)); -} - -EXPORT int -read_g0(scgp, bp, addr, cnt) - SCSI *scgp; - caddr_t bp; - long addr; - int cnt; -{ - register struct scg_cmd *scmd = scgp->scmd; - - if (scgp->cap->c_bsize <= 0) - raisecond("capacity_not_set", 0L); - - fillbytes((caddr_t)scmd, sizeof (*scmd), '\0'); - scmd->addr = bp; - scmd->size = cnt*scgp->cap->c_bsize; - scmd->flags = SCG_RECV_DATA|SCG_DISRE_ENA; - scmd->cdb_len = SC_G0_CDBLEN; - scmd->sense_len = CCS_SENSE_LEN; - scmd->cdb.g0_cdb.cmd = SC_READ; - scmd->cdb.g0_cdb.lun = scg_lun(scgp); - g0_cdbaddr(&scmd->cdb.g0_cdb, addr); - scmd->cdb.g0_cdb.count = cnt; -/* scmd->cdb.g0_cdb.vu_56 = 1;*/ - - scgp->cmdname = "read_g0"; - - return (scg_cmd(scgp)); -} - -EXPORT int -read_g1(scgp, bp, addr, cnt) - SCSI *scgp; - caddr_t bp; - long addr; - int cnt; -{ - register struct scg_cmd *scmd = scgp->scmd; - - if (scgp->cap->c_bsize <= 0) - raisecond("capacity_not_set", 0L); - - fillbytes((caddr_t)scmd, sizeof (*scmd), '\0'); - scmd->addr = bp; - scmd->size = cnt*scgp->cap->c_bsize; - scmd->flags = SCG_RECV_DATA|SCG_DISRE_ENA; - scmd->cdb_len = SC_G1_CDBLEN; - scmd->sense_len = CCS_SENSE_LEN; - scmd->cdb.g1_cdb.cmd = SC_EREAD; - scmd->cdb.g1_cdb.lun = scg_lun(scgp); - g1_cdbaddr(&scmd->cdb.g1_cdb, addr); - g1_cdblen(&scmd->cdb.g1_cdb, cnt); - - scgp->cmdname = "read_g1"; - - return (scg_cmd(scgp)); -} -#endif /* DEBUG */ - -EXPORT BOOL -getdev(scgp, print) - SCSI *scgp; - BOOL print; -{ - BOOL got_inquiry = TRUE; - char vendor_info[8+1]; - char prod_ident[16+1]; - char prod_revision[4+1]; - int inq_len = 0; - register struct scg_cmd *scmd = scgp->scmd; - register struct scsi_inquiry *inq = scgp->inq; - - - fillbytes((caddr_t)inq, sizeof (*inq), '\0'); - scgp->dev = DEV_UNKNOWN; - scgp->silent++; - (void) unit_ready(scgp); - if (scmd->error >= SCG_FATAL && - !(scmd->scb.chk && scmd->sense_count > 0)) { - scgp->silent--; - return (FALSE); - } - - -/* if (scmd->error < SCG_FATAL || scmd->scb.chk && scmd->sense_count > 0){*/ - - if (inquiry(scgp, (caddr_t)inq, sizeof (*inq)) < 0) { - got_inquiry = FALSE; - } else { - inq_len = sizeof (*inq) - scg_getresid(scgp); - } - if (!got_inquiry) { - if (scgp->verbose) { - printf( - "error: %d scb.chk: %d sense_count: %d sense.code: 0x%x\n", - scmd->error, scmd->scb.chk, - scmd->sense_count, scmd->sense.code); - } - /* - * Folgende Kontroller kennen das Kommando - * INQUIRY nicht: - * - * ADAPTEC ACB-4000, ACB-4010, ACB 4070 - * SYSGEN SC4000 - * - * Leider reagieren ACB40X0 und ACB5500 identisch - * wenn drive not ready (code == not ready), - * sie sind dann nicht zu unterscheiden. - */ - - if (scmd->scb.chk && scmd->sense_count == 4) { - /* Test auf SYSGEN */ - (void) qic02(scgp, 0x12); /* soft lock on */ - if (qic02(scgp, 1) < 0) { /* soft lock off */ - scgp->dev = DEV_ACB40X0; -/* scgp->dev = acbdev();*/ - } else { - scgp->dev = DEV_SC4000; - inq->type = INQ_SEQD; - inq->removable = 1; - } - } - } else if (scgp->verbose) { - int i; - int len = inq->add_len + 5; - Uchar ibuf[256+5]; - Uchar *ip = (Uchar *)inq; - Uchar c; - - if (len > (int)sizeof (*inq) && - inquiry(scgp, (caddr_t)ibuf, inq->add_len+5) >= 0) { - len = inq->add_len+5 - scg_getresid(scgp); - ip = ibuf; - } else { - len = sizeof (*inq); - } - printf("Inquiry Data : "); - for (i = 0; i < len; i++) { - c = ip[i]; - if (c >= ' ' && c < 0177) - printf("%c", c); - else - printf("."); - } - printf("\n"); - } - - strncpy(vendor_info, inq->vendor_info, sizeof (inq->vendor_info)); - strncpy(prod_ident, inq->prod_ident, sizeof (inq->prod_ident)); - strncpy(prod_revision, inq->prod_revision, sizeof (inq->prod_revision)); - - vendor_info[sizeof (inq->vendor_info)] = '\0'; - prod_ident[sizeof (inq->prod_ident)] = '\0'; - prod_revision[sizeof (inq->prod_revision)] = '\0'; - - switch (inq->type) { - - case INQ_DASD: - if (inq->add_len == 0 && inq->vendor_info[0] != '\0') { - Uchar *p; - /* - * NT-4.0 creates fake inquiry data for IDE disks. - * Unfortunately, it does not set add_len wo we - * check if vendor_info, prod_ident and prod_revision - * contains valid chars for a CCS inquiry. - */ - if (inq_len >= 36) - inq->add_len = 31; - - for (p = (Uchar *)&inq->vendor_info[0]; - p < (Uchar *)&inq->prod_revision[4]; - p++) { - if (*p < 0x20 || *p > 0x7E) { - inq->add_len = 0; - break; - } - } - } - if (inq->add_len == 0) { - if (scgp->dev == DEV_UNKNOWN && got_inquiry) { - scgp->dev = DEV_ACB5500; - strcpy(inq->vendor_info, - "ADAPTEC ACB-5500 FAKE"); - - } else switch (scgp->dev) { - - case DEV_ACB40X0: - strcpy(inq->vendor_info, - "ADAPTEC ACB-40X0 FAKE"); - break; - case DEV_ACB4000: - strcpy(inq->vendor_info, - "ADAPTEC ACB-4000 FAKE"); - break; - case DEV_ACB4010: - strcpy(inq->vendor_info, - "ADAPTEC ACB-4010 FAKE"); - break; - case DEV_ACB4070: - strcpy(inq->vendor_info, - "ADAPTEC ACB-4070 FAKE"); - break; - } - } else if (inq->add_len < 31) { - scgp->dev = DEV_NON_CCS_DSK; - - } else if (strbeg("EMULEX", vendor_info)) { - if (strbeg("MD21", prod_ident)) - scgp->dev = DEV_MD21; - if (strbeg("MD23", prod_ident)) - scgp->dev = DEV_MD23; - else - scgp->dev = DEV_CCS_GENDISK; - } else if (strbeg("ADAPTEC", vendor_info)) { - if (strbeg("ACB-4520", prod_ident)) - scgp->dev = DEV_ACB4520A; - if (strbeg("ACB-4525", prod_ident)) - scgp->dev = DEV_ACB4525; - else - scgp->dev = DEV_CCS_GENDISK; - } else if (strbeg("SONY", vendor_info) && - strbeg("SMO-C501", prod_ident)) { - scgp->dev = DEV_SONY_SMO; - } else { - scgp->dev = DEV_CCS_GENDISK; - } - break; - - case INQ_SEQD: - if (scgp->dev == DEV_SC4000) { - strcpy(inq->vendor_info, - "SYSGEN SC4000 FAKE"); - } else if (inq->add_len == 0 && - inq->removable && - inq->ansi_version == 1) { - scgp->dev = DEV_MT02; - strcpy(inq->vendor_info, - "EMULEX MT02 FAKE"); - } - break; - -/* case INQ_OPTD:*/ - case INQ_ROMD: - case INQ_WORM: - if (strbeg("RXT-800S", prod_ident)) - scgp->dev = DEV_RXT800S; - - /* - * Start of CD-Recorders: - */ - if (strbeg("ACER", vendor_info)) { - if (strbeg("CR-4020C", prod_ident)) - scgp->dev = DEV_RICOH_RO_1420C; - - } else if (strbeg("CREATIVE", vendor_info)) { - if (strbeg("CDR2000", prod_ident)) - scgp->dev = DEV_RICOH_RO_1060C; - - } else if (strbeg("GRUNDIG", vendor_info)) { - if (strbeg("CDR100IPW", prod_ident)) - scgp->dev = DEV_CDD_2000; - - } else if (strbeg("JVC", vendor_info)) { - if (strbeg("XR-W2001", prod_ident)) - scgp->dev = DEV_TEAC_CD_R50S; - else if (strbeg("XR-W2010", prod_ident)) - scgp->dev = DEV_TEAC_CD_R50S; - else if (strbeg("R2626", prod_ident)) - scgp->dev = DEV_TEAC_CD_R50S; - - } else if (strbeg("MITSBISH", vendor_info)) { - -#ifdef XXXX_REALLY - /* It's MMC compliant */ - if (strbeg("CDRW226", prod_ident)) - scgp->dev = DEV_MMC_CDRW; -#else - /* EMPTY */ -#endif - - } else if (strbeg("MITSUMI", vendor_info)) { - /* Don't know any product string */ - scgp->dev = DEV_CDD_522; - - } else if (strbeg("OPTIMA", vendor_info)) { - if (strbeg("CD-R 650", prod_ident)) - scgp->dev = DEV_SONY_CDU_924; - - } else if (strbeg("PHILIPS", vendor_info) || - strbeg("IMS", vendor_info) || - strbeg("KODAK", vendor_info) || - strbeg("HP", vendor_info)) { - - if (strbeg("CDD521/00", prod_ident)) - scgp->dev = DEV_CDD_521_OLD; - else if (strbeg("CDD521/02", prod_ident)) - scgp->dev = DEV_CDD_521_OLD; /* PCD 200R? */ - else if (strbeg("CDD521", prod_ident)) - scgp->dev = DEV_CDD_521; - - if (strbeg("CDD522", prod_ident)) - scgp->dev = DEV_CDD_522; - if (strbeg("PCD225", prod_ident)) - scgp->dev = DEV_CDD_522; - if (strbeg("KHSW/OB", prod_ident)) /* PCD600 */ - scgp->dev = DEV_PCD_600; - if (strbeg("CDR-240", prod_ident)) - scgp->dev = DEV_CDD_2000; - - if (strbeg("CDD20", prod_ident)) - scgp->dev = DEV_CDD_2000; - if (strbeg("CDD26", prod_ident)) - scgp->dev = DEV_CDD_2600; - - if (strbeg("C4324/C4325", prod_ident)) - scgp->dev = DEV_CDD_2000; - if (strbeg("CD-Writer 6020", prod_ident)) - scgp->dev = DEV_CDD_2600; - - } else if (strbeg("PINNACLE", vendor_info)) { - if (strbeg("RCD-1000", prod_ident)) - scgp->dev = DEV_TEAC_CD_R50S; - if (strbeg("RCD5020", prod_ident)) - scgp->dev = DEV_TEAC_CD_R50S; - if (strbeg("RCD5040", prod_ident)) - scgp->dev = DEV_TEAC_CD_R50S; - if (strbeg("RCD 4X4", prod_ident)) - scgp->dev = DEV_TEAC_CD_R50S; - - } else if (strbeg("PIONEER", vendor_info)) { - if (strbeg("CD-WO DW-S114X", prod_ident)) - scgp->dev = DEV_PIONEER_DW_S114X; - else if (strbeg("CD-WO DR-R504X", prod_ident)) /* Reoprt from philip@merge.com */ - scgp->dev = DEV_PIONEER_DW_S114X; - else if (strbeg("DVD-R DVR-S101", prod_ident)) - scgp->dev = DEV_PIONEER_DVDR_S101; - - } else if (strbeg("PLASMON", vendor_info)) { - if (strbeg("RF4100", prod_ident)) - scgp->dev = DEV_PLASMON_RF_4100; - else if (strbeg("CDR4220", prod_ident)) - scgp->dev = DEV_CDD_2000; - - } else if (strbeg("PLEXTOR", vendor_info)) { - if (strbeg("CD-R PX-R24CS", prod_ident)) - scgp->dev = DEV_RICOH_RO_1420C; - - } else if (strbeg("RICOH", vendor_info)) { - if (strbeg("RO-1420C", prod_ident)) - scgp->dev = DEV_RICOH_RO_1420C; - if (strbeg("RO1060C", prod_ident)) - scgp->dev = DEV_RICOH_RO_1060C; - - } else if (strbeg("SAF", vendor_info)) { /* Smart & Friendly */ - if (strbeg("CD-R2004", prod_ident) || - strbeg("CD-R2006 ", prod_ident)) - scgp->dev = DEV_SONY_CDU_924; - else if (strbeg("CD-R2006PLUS", prod_ident)) - scgp->dev = DEV_TEAC_CD_R50S; - else if (strbeg("CD-RW226", prod_ident)) - scgp->dev = DEV_TEAC_CD_R50S; - else if (strbeg("CD-R4012", prod_ident)) - scgp->dev = DEV_TEAC_CD_R50S; - - } else if (strbeg("SANYO", vendor_info)) { - if (strbeg("CD-WO CRD-R24S", prod_ident)) - scgp->dev = DEV_CDD_521; - - } else if (strbeg("SONY", vendor_info)) { - if (strbeg("CD-R CDU92", prod_ident) || - strbeg("CD-R CDU94", prod_ident)) - scgp->dev = DEV_SONY_CDU_924; - - } else if (strbeg("TEAC", vendor_info)) { - if (strbeg("CD-R50S", prod_ident) || - strbeg("CD-R55S", prod_ident)) - scgp->dev = DEV_TEAC_CD_R50S; - - } else if (strbeg("TRAXDATA", vendor_info) || - strbeg("Traxdata", vendor_info)) { - if (strbeg("CDR4120", prod_ident)) - scgp->dev = DEV_TEAC_CD_R50S; - - } else if (strbeg("T.YUDEN", vendor_info)) { - if (strbeg("CD-WO EW-50", prod_ident)) - scgp->dev = DEV_TYUDEN_EW50; - - } else if (strbeg("WPI", vendor_info)) { /* Wearnes */ - if (strbeg("CDR-632P", prod_ident)) - scgp->dev = DEV_CDD_2600; - - } else if (strbeg("YAMAHA", vendor_info)) { - if (strbeg("CDR10", prod_ident)) - scgp->dev = DEV_YAMAHA_CDR_100; - if (strbeg("CDR200", prod_ident)) - scgp->dev = DEV_YAMAHA_CDR_400; - if (strbeg("CDR400", prod_ident)) - scgp->dev = DEV_YAMAHA_CDR_400; - - } else if (strbeg("MATSHITA", vendor_info)) { - if (strbeg("CD-R CW-7501", prod_ident)) - scgp->dev = DEV_MATSUSHITA_7501; - if (strbeg("CD-R CW-7502", prod_ident)) - scgp->dev = DEV_MATSUSHITA_7502; - } - if (scgp->dev == DEV_UNKNOWN) { - /* - * We do not have Manufacturer strings for - * the following drives. - */ - if (strbeg("CDS615E", prod_ident)) /* Olympus */ - scgp->dev = DEV_SONY_CDU_924; - } - if (scgp->dev == DEV_UNKNOWN && inq->type == INQ_ROMD) { - BOOL cdrr = FALSE; - BOOL cdwr = FALSE; - BOOL cdrrw = FALSE; - BOOL cdwrw = FALSE; - BOOL dvd = FALSE; - BOOL dvdwr = FALSE; - - scgp->dev = DEV_CDROM; - - if (mmc_check(scgp, &cdrr, &cdwr, &cdrrw, &cdwrw, - &dvd, &dvdwr)) - scgp->dev = DEV_MMC_CDROM; - if (cdwr) - scgp->dev = DEV_MMC_CDR; - if (cdwrw) - scgp->dev = DEV_MMC_CDRW; - if (dvd) - scgp->dev = DEV_MMC_DVD; - if (dvdwr) - scgp->dev = DEV_MMC_DVD_WR; - } - break; - - case INQ_PROCD: - if (strbeg("BERTHOLD", vendor_info)) { - if (strbeg("", prod_ident)) - scgp->dev = DEV_HRSCAN; - } - break; - - case INQ_SCAN: - scgp->dev = DEV_MS300A; - break; - } - scgp->silent--; - if (!print) - return (TRUE); - - if (scgp->dev == DEV_UNKNOWN && !got_inquiry) { -#ifdef PRINT_INQ_ERR - scg_printerr(scgp); -#endif - return (FALSE); - } - - printinq(scgp, stdout); - return (TRUE); -} - -EXPORT void -printinq(scgp, f) - SCSI *scgp; - FILE *f; -{ - register struct scsi_inquiry *inq = scgp->inq; - - fprintf(f, "Device type : "); - scg_fprintdev(f, inq); - fprintf(f, "Version : %d\n", inq->ansi_version); - fprintf(f, "Response Format: %d\n", inq->data_format); - if (inq->data_format >= 2) { - fprintf(f, "Capabilities : "); - if (inq->aenc) fprintf(f, "AENC "); - if (inq->termiop) fprintf(f, "TERMIOP "); - if (inq->reladr) fprintf(f, "RELADR "); - if (inq->wbus32) fprintf(f, "WBUS32 "); - if (inq->wbus16) fprintf(f, "WBUS16 "); - if (inq->sync) fprintf(f, "SYNC "); - if (inq->linked) fprintf(f, "LINKED "); - if (inq->cmdque) fprintf(f, "CMDQUE "); - if (inq->softreset) fprintf(f, "SOFTRESET "); - fprintf(f, "\n"); - } - if (inq->add_len >= 31 || - inq->vendor_info[0] || - inq->prod_ident[0] || - inq->prod_revision[0]) { - fprintf(f, "Vendor_info : '%.8s'\n", inq->vendor_info); - fprintf(f, "Identifikation : '%.16s'\n", inq->prod_ident); - fprintf(f, "Revision : '%.4s'\n", inq->prod_revision); - } -} - -EXPORT void -printdev(scgp) - SCSI *scgp; -{ - printf("Device seems to be: "); - - switch (scgp->dev) { - - case DEV_UNKNOWN: printf("unknown"); break; - case DEV_ACB40X0: printf("Adaptec 4000/4010/4070"); break; - case DEV_ACB4000: printf("Adaptec 4000"); break; - case DEV_ACB4010: printf("Adaptec 4010"); break; - case DEV_ACB4070: printf("Adaptec 4070"); break; - case DEV_ACB5500: printf("Adaptec 5500"); break; - case DEV_ACB4520A: printf("Adaptec 4520A"); break; - case DEV_ACB4525: printf("Adaptec 4525"); break; - case DEV_MD21: printf("Emulex MD21"); break; - case DEV_MD23: printf("Emulex MD23"); break; - case DEV_NON_CCS_DSK: printf("Generic NON CCS Disk"); break; - case DEV_CCS_GENDISK: printf("Generic CCS Disk"); break; - case DEV_SONY_SMO: printf("Sony SMO-C501"); break; - case DEV_MT02: printf("Emulex MT02"); break; - case DEV_SC4000: printf("Sysgen SC4000"); break; - case DEV_RXT800S: printf("Maxtor RXT800S"); break; - case DEV_HRSCAN: printf("Berthold HR-Scanner"); break; - case DEV_MS300A: printf("Microtek MS300A"); break; - - case DEV_CDROM: printf("Generic CD-ROM"); break; - case DEV_MMC_CDROM: printf("Generic mmc CD-ROM"); break; - case DEV_MMC_CDR: printf("Generic mmc CD-R"); break; - case DEV_MMC_CDRW: printf("Generic mmc CD-RW"); break; - case DEV_MMC_DVD: printf("Generic mmc2 DVD-ROM"); break; - case DEV_MMC_DVD_WR: printf("Generic mmc2 DVD-R/DVD-RW/DVD-RAM"); break; - case DEV_CDD_521_OLD: printf("Philips old CDD-521"); break; - case DEV_CDD_521: printf("Philips CDD-521"); break; - case DEV_CDD_522: printf("Philips CDD-522"); break; - case DEV_PCD_600: printf("Kodak PCD-600"); break; - case DEV_CDD_2000: printf("Philips CDD-2000"); break; - case DEV_CDD_2600: printf("Philips CDD-2600"); break; - case DEV_YAMAHA_CDR_100:printf("Yamaha CDR-100"); break; - case DEV_YAMAHA_CDR_400:printf("Yamaha CDR-400"); break; - case DEV_PLASMON_RF_4100:printf("Plasmon RF-4100"); break; - case DEV_SONY_CDU_924: printf("Sony CDU-924S"); break; - case DEV_RICOH_RO_1060C:printf("Ricoh RO-1060C"); break; - case DEV_RICOH_RO_1420C:printf("Ricoh RO-1420C"); break; - case DEV_TEAC_CD_R50S: printf("Teac CD-R50S"); break; - case DEV_MATSUSHITA_7501:printf("Matsushita CW-7501"); break; - case DEV_MATSUSHITA_7502:printf("Matsushita CW-7502"); break; - - case DEV_PIONEER_DW_S114X: printf("Pioneer DW-S114X"); break; - case DEV_PIONEER_DVDR_S101:printf("Pioneer DVD-R S101"); break; - - default: printf("Missing Entry for dev %d", - scgp->dev); break; - - } - printf(".\n"); - -} - -EXPORT BOOL -do_inquiry(scgp, print) - SCSI *scgp; - int print; -{ - if (getdev(scgp, print)) { - if (print) - printdev(scgp); - return (TRUE); - } else { - return (FALSE); - } -} - -EXPORT BOOL -recovery_needed(scgp, dp) - SCSI *scgp; - cdr_t *dp; -{ - int err; - register struct scg_cmd *scmd = scgp->scmd; - - scgp->silent++; - err = test_unit_ready(scgp); - scgp->silent--; - - if (err >= 0) - return (FALSE); - else if (scmd->error >= SCG_FATAL) /* nicht selektierbar */ - return (FALSE); - - if (scmd->sense.code < 0x70) /* non extended Sense */ - return (FALSE); - - /* XXX Old Philips code */ - return (((struct scsi_ext_sense *)&scmd->sense)->sense_code == 0xD0); -} - -EXPORT int -scsi_load(scgp, dp) - SCSI *scgp; - cdr_t *dp; -{ - int key; - int code; - - if ((dp->cdr_flags & CDR_CADDYLOAD) == 0) { - if (scsi_start_stop_unit(scgp, 1, 1, dp && (dp->cdr_cmdflags&F_IMMED)) >= 0) - return (0); - } - - if (wait_unit_ready(scgp, 60)) - return (0); - - key = scg_sense_key(scgp); - code = scg_sense_code(scgp); - - if (key == SC_NOT_READY && (code == 0x3A || code == 0x30)) { - errmsgno(EX_BAD, "Cannot load media with %s drive!\n", - (dp->cdr_flags & CDR_CADDYLOAD) ? "caddy" : "this"); - errmsgno(EX_BAD, "Try to load media by hand.\n"); - } - return (-1); -} - -EXPORT int -scsi_unload(scgp, dp) - SCSI *scgp; - cdr_t *dp; -{ - return (scsi_start_stop_unit(scgp, 0, 1, dp && (dp->cdr_cmdflags&F_IMMED))); -} - -EXPORT int -scsi_cdr_write(scgp, bp, sectaddr, size, blocks, islast) - SCSI *scgp; - caddr_t bp; /* address of buffer */ - long sectaddr; /* disk address (sector) to put */ - long size; /* number of bytes to transfer */ - int blocks; /* sector count */ - BOOL islast; /* last write for track */ -{ - return (write_xg1(scgp, bp, sectaddr, size, blocks)); -} - -EXPORT struct cd_mode_page_2A * -mmc_cap(scgp, modep) - SCSI *scgp; - Uchar *modep; -{ - int len; - int val; - Uchar mode[0x100]; - struct cd_mode_page_2A *mp; - struct cd_mode_page_2A *mp2; - - -retry: - fillbytes((caddr_t)mode, sizeof (mode), '\0'); - - if (!get_mode_params(scgp, 0x2A, "CD capabilities", - mode, (Uchar *)0, (Uchar *)0, (Uchar *)0, &len)) { - - if (scg_sense_key(scgp) == SC_NOT_READY) { - if (wait_unit_ready(scgp, 60)) - goto retry; - } - return (NULL); /* Pre SCSI-3/mmc drive */ - } - - if (len == 0) /* Pre SCSI-3/mmc drive */ - return (NULL); - - mp = (struct cd_mode_page_2A *) - (mode + sizeof (struct scsi_mode_header) + - ((struct scsi_mode_header *)mode)->blockdesc_len); - - /* - * Do some heuristics against pre SCSI-3/mmc VU page 2A - * We should test for a minimum p_len of 0x14, but some - * buggy CD-ROM readers ommit the write speed values. - */ - if (mp->p_len < 0x10) - return (NULL); - - val = a_to_u_2_byte(mp->max_read_speed); - if (val != 0 && val < 176) - return (NULL); - - val = a_to_u_2_byte(mp->cur_read_speed); - if (val != 0 && val < 176) - return (NULL); - - len -= sizeof (struct scsi_mode_header) + - ((struct scsi_mode_header *)mode)->blockdesc_len; - if (modep) - mp2 = (struct cd_mode_page_2A *)modep; - else - mp2 = malloc(len); - if (mp2) - movebytes(mp, mp2, len); - - return (mp2); -} - -EXPORT void -mmc_getval(mp, cdrrp, cdwrp, cdrrwp, cdwrwp, dvdp, dvdwp) - struct cd_mode_page_2A *mp; - BOOL *cdrrp; /* CD ROM */ - BOOL *cdwrp; /* CD-R writer */ - BOOL *cdrrwp; /* CD-RW reader */ - BOOL *cdwrwp; /* CD-RW writer */ - BOOL *dvdp; /* DVD reader */ - BOOL *dvdwp; /* DVD writer */ -{ - BOOL isdvd; /* Any DVD reader */ - BOOL isdvd_wr; /* DVD writer (R / RAM) */ - BOOL iscd_wr; /* CD writer */ - - iscd_wr = (mp->cd_r_write != 0) || /* SCSI-3/mmc CD-R */ - (mp->cd_rw_write != 0); /* SCSI-3/mmc CD-RW */ - - if (cdrrp) - *cdrrp = (mp->cd_r_read != 0); /* SCSI-3/mmc CD */ - if (cdwrp) - *cdwrp = (mp->cd_r_write != 0); /* SCSI-3/mmc CD-R */ - - if (cdrrwp) - *cdrrwp = (mp->cd_rw_read != 0); /* SCSI-3/mmc CD */ - if (cdwrwp) - *cdwrwp = (mp->cd_rw_write != 0); /* SCSI-3/mmc CD-RW */ - - isdvd = /* SCSI-3/mmc2 DVD */ - (mp->dvd_ram_read + mp->dvd_r_read + - mp->dvd_rom_read) != 0; - - isdvd_wr = /* SCSI-3/mmc2 DVD writer*/ - (mp->dvd_ram_write + mp->dvd_r_write) != 0; - - if (dvdp) - *dvdp = isdvd; - if (dvdwp) - *dvdwp = isdvd_wr; -} - -EXPORT BOOL -is_mmc(scgp, cdwp, dvdwp) - SCSI *scgp; - BOOL *cdwp; /* CD writer */ - BOOL *dvdwp; /* DVD writer */ -{ - BOOL cdwr = FALSE; - BOOL cdwrw = FALSE; - - if (cdwp) - *cdwp = FALSE; - if (dvdwp) - *dvdwp = FALSE; - - if (!mmc_check(scgp, NULL, &cdwr, NULL, &cdwrw, NULL, dvdwp)) - return (FALSE); - - if (cdwp) - *cdwp = cdwr | cdwrw; - - return (TRUE); -} - -EXPORT BOOL -mmc_check(scgp, cdrrp, cdwrp, cdrrwp, cdwrwp, dvdp, dvdwp) - SCSI *scgp; - BOOL *cdrrp; /* CD ROM */ - BOOL *cdwrp; /* CD-R writer */ - BOOL *cdrrwp; /* CD-RW reader */ - BOOL *cdwrwp; /* CD-RW writer */ - BOOL *dvdp; /* DVD reader */ - BOOL *dvdwp; /* DVD writer */ -{ - Uchar mode[0x100]; - BOOL was_atapi; - struct cd_mode_page_2A *mp; - - if (scgp->inq->type != INQ_ROMD) - return (FALSE); - - fillbytes((caddr_t)mode, sizeof (mode), '\0'); - - was_atapi = allow_atapi(scgp, TRUE); - scgp->silent++; - mp = mmc_cap(scgp, mode); - scgp->silent--; - allow_atapi(scgp, was_atapi); - if (mp == NULL) - return (FALSE); - - mmc_getval(mp, cdrrp, cdwrp, cdrrwp, cdwrwp, dvdp, dvdwp); - - return (TRUE); /* Generic SCSI-3/mmc CD */ -} - -LOCAL void -print_speed(fmt, val) - char *fmt; - int val; -{ - printf(" %s: %5d kB/s", fmt, val); - printf(" (CD %3ux,", val/176); - printf(" DVD %2ux,", val/1385); - printf(" BD %2ux)\n", val/4495); -} - -#define DOES(what, flag) printf(" Does %s%s\n", flag?"":"not ", what) -#define IS(what, flag) printf(" Is %s%s\n", flag?"":"not ", what) -#define VAL(what, val) printf(" %s: %d\n", what, val[0]*256 + val[1]) -#define SVAL(what, val) printf(" %s: %s\n", what, val) - -EXPORT void -print_capabilities(scgp) - SCSI *scgp; -{ - BOOL was_atapi; - Uchar mode[0x100]; - struct cd_mode_page_2A *mp; -static const char *bclk[4] = {"32", "16", "24", "24 (I2S)"}; -static const char *load[8] = {"caddy", "tray", "pop-up", "reserved(3)", - "disc changer", "cartridge changer", - "reserved(6)", "reserved(7)" }; -static const char *rotctl[4] = {"CLV/PCAV", "CAV", "reserved(2)", "reserved(3)"}; - - - if (scgp->inq->type != INQ_ROMD) - return; - - fillbytes((caddr_t)mode, sizeof (mode), '\0'); - - was_atapi = allow_atapi(scgp, TRUE); /* Try to switch to 10 byte mode cmds */ - scgp->silent++; - mp = mmc_cap(scgp, mode); - scgp->silent--; - allow_atapi(scgp, was_atapi); - if (mp == NULL) - return; - - printf("\nDrive capabilities, per"); - if (mp->p_len >= 28) - printf(" MMC-3"); - else if (mp->p_len >= 24) - printf(" MMC-2"); - else - printf(" MMC"); - printf(" page 2A:\n\n"); - - DOES("read CD-R media", mp->cd_r_read); - DOES("write CD-R media", mp->cd_r_write); - DOES("read CD-RW media", mp->cd_rw_read); - DOES("write CD-RW media", mp->cd_rw_write); - DOES("read DVD-ROM media", mp->dvd_rom_read); - DOES("read DVD-R media", mp->dvd_r_read); - DOES("write DVD-R media", mp->dvd_r_write); - DOES("read DVD-RAM media", mp->dvd_ram_read); - DOES("write DVD-RAM media", mp->dvd_ram_write); - DOES("support test writing", mp->test_write); - printf("\n"); - DOES("read Mode 2 Form 1 blocks", mp->mode_2_form_1); - DOES("read Mode 2 Form 2 blocks", mp->mode_2_form_2); - DOES("read digital audio blocks", mp->cd_da_supported); - if (mp->cd_da_supported) - DOES("restart non-streamed digital audio reads accurately", mp->cd_da_accurate); - DOES("support Buffer-Underrun-Free recording", mp->BUF); - DOES("read multi-session CDs", mp->multi_session); - DOES("read fixed-packet CD media using Method 2", mp->method2); - DOES("read CD bar code", mp->read_bar_code); - DOES("read R-W subcode information", mp->rw_supported); - if (mp->rw_supported) - DOES("return R-W subcode de-interleaved and error-corrected", mp->rw_deint_corr); - DOES("read raw P-W subcode data from lead in", mp->pw_in_lead_in); - DOES("return CD media catalog number", mp->UPC); - DOES("return CD ISRC information", mp->ISRC); - DOES("support C2 error pointers", mp->c2_pointers); - DOES("deliver composite A/V data", mp->composite); - printf("\n"); - DOES("play audio CDs", mp->audio_play); - if (mp->audio_play) { - VAL("Number of volume control levels", mp->num_vol_levels); - DOES("support individual volume control setting for each channel", mp->sep_chan_vol); - DOES("support independent mute setting for each channel", mp->sep_chan_mute); - DOES("support digital output on port 1", mp->digital_port_1); - DOES("support digital output on port 2", mp->digital_port_2); - if (mp->digital_port_1 || mp->digital_port_2) { - DOES("send digital data LSB-first", mp->LSBF); - DOES("set LRCK high for left-channel data", mp->RCK); - DOES("have valid data on falling edge of clock", mp->BCK); - SVAL("Length of data in BCLKs", bclk[mp->length]); - } - } - printf("\n"); - SVAL("Loading mechanism type", load[mp->loading_type]); - DOES("support ejection of CD via START/STOP command", mp->eject); - DOES("lock media on power up via prevent jumper", mp->prevent_jumper); - DOES("allow media to be locked in the drive via PREVENT/ALLOW command", mp->lock); - IS("currently in a media-locked state", mp->lock_state); - DOES("support changing side of disk", mp->side_change); - DOES("have load-empty-slot-in-changer feature", mp->sw_slot_sel); - DOES("support Individual Disk Present feature", mp->disk_present_rep); - printf("\n"); - print_speed("Maximum read speed", a_to_u_2_byte(mp->max_read_speed)); - print_speed("Current read speed", a_to_u_2_byte(mp->cur_read_speed)); - print_speed("Maximum write speed", a_to_u_2_byte(mp->max_write_speed)); - if (mp->p_len >= 28) - print_speed("Current write speed", a_to_u_2_byte(mp->v3_cur_write_speed)); - else - print_speed("Current write speed", a_to_u_2_byte(mp->cur_write_speed)); - if (mp->p_len >= 28) { - SVAL("Rotational control selected", rotctl[mp->rot_ctl_sel]); - } - VAL("Buffer size in KB", mp->buffer_size); - - if (mp->p_len >= 24) { - VAL("Copy management revision supported", mp->copy_man_rev); - } - - if (mp->p_len >= 28) { - struct cd_wr_speed_performance *pp; - Uint ndesc; - Uint i; - Uint n; - - ndesc = a_to_u_2_byte(mp->num_wr_speed_des); - pp = mp->wr_speed_des; - printf(" Number of supported write speeds: %d\n", ndesc); - for (i = 0; i < ndesc; i++, pp++) { - printf(" Write speed # %d:", i); - n = a_to_u_2_byte(pp->wr_speed_supp); - printf(" %5d kB/s", n); - printf(" %s", rotctl[pp->rot_ctl_sel]); - printf(" (CD %3ux,", n/176); - printf(" DVD %2ux,", n/1385); - printf(" BD %2ux)\n", n/4495); - } - } - - /* Generic SCSI-3/mmc CD */ -} - -EXPORT int -verify(scgp, start, count, bad_block) - SCSI *scgp; - long start; - int count; - long *bad_block; -{ - register struct scg_cmd *scmd = scgp->scmd; - - fillbytes((caddr_t)scmd, sizeof (*scmd), '\0'); - scmd->addr = (caddr_t)0; - scmd->size = 0; - scmd->flags = SCG_DISRE_ENA; - scmd->cdb_len = SC_G1_CDBLEN; - scmd->sense_len = CCS_SENSE_LEN; - scmd->cdb.g1_cdb.cmd = 0x2F; /* Verify */ - scmd->cdb.g1_cdb.lun = scg_lun(scgp); - g1_cdbaddr(&scmd->cdb.g1_cdb, start); - g1_cdblen(&scmd->cdb.g1_cdb, count); - - scgp->cmdname = "verify"; - - if (scg_cmd(scgp) < 0) { - if (scmd->sense.code >= 0x70) { /* extended Sense */ - *bad_block = - a_to_4_byte(&((struct scsi_ext_sense *) - &scmd->sense)->info_1); - } else { - *bad_block = a_to_u_3_byte(&scmd->sense.high_addr); - } - return (-1); - } - return (0); -} diff -Nru cdrtools-2.01.01a33/btcflash/scsimmc.h cdrtools-3.02a09/btcflash/scsimmc.h --- cdrtools-2.01.01a33/btcflash/scsimmc.h 2006-12-02 22:10:16.000000000 +0000 +++ cdrtools-3.02a09/btcflash/scsimmc.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,623 +0,0 @@ -/* @(#)scsimmc.h 1.19 06/12/02 Copyright 1997-2006 J. Schilling */ -/* - * Definitions for SCSI/mmc compliant drives - * - * Copyright (c) 1997-2006 J. Schilling - */ -/* - * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. - * - * See the file CDDL.Schily.txt in this distribution for details. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file CDDL.Schily.txt from this distribution. - */ - -#ifndef _SCSIMMC_H -#define _SCSIMMC_H - -#include -#include - -typedef struct opc { - Uchar opc_speed[2]; - Uchar opc_val[6]; -} opc_t; - -#if defined(_BIT_FIELDS_LTOH) /* Intel bitorder */ - -struct disk_info { - Uchar data_len[2]; /* Data len without this info */ - Ucbit disk_status : 2; /* Status of the disk */ - Ucbit sess_status : 2; /* Status of last session */ - Ucbit erasable : 1; /* Disk is erasable */ - Ucbit dtype : 3; /* Disk information data type */ - Uchar first_track; /* # of first track on disk */ - Uchar numsess; /* # of sessions */ - Uchar first_track_ls; /* First track in last session */ - Uchar last_track_ls; /* Last track in last session */ - Ucbit bg_format_stat : 2; /* Background format status */ - Ucbit dbit : 1; /* Dirty Bit of defect table */ - Ucbit res7_3 : 1; /* Reserved */ - Ucbit dac_v : 1; /* Disk application code valid */ - Ucbit uru : 1; /* This is an unrestricted disk */ - Ucbit dbc_v : 1; /* Disk bar code valid */ - Ucbit did_v : 1; /* Disk id valid */ - Uchar disk_type; /* Disk type */ - Uchar numsess_msb; /* # of sessions (MSB) */ - Uchar first_track_ls_msb; /* First tr. in last ses. (MSB) */ - Uchar last_track_ls_msb; /* Last tr. in last ses. (MSB) */ - Uchar disk_id[4]; /* Disk identification */ - Uchar last_lead_in[4]; /* Last session lead in time */ - Uchar last_lead_out[4]; /* Last session lead out time */ - Uchar disk_barcode[8]; /* Disk bar code */ - Uchar disk_appl_code; /* Disk application code */ - Uchar num_opc_entries; /* # of OPC table entries */ - opc_t opc_table[1]; /* OPC table */ -}; - -#else /* Motorola bitorder */ - -struct disk_info { - Uchar data_len[2]; /* Data len without this info */ - Ucbit dtype : 3; /* Disk information data type */ - Ucbit erasable : 1; /* Disk is erasable */ - Ucbit sess_status : 2; /* Status of last session */ - Ucbit disk_status : 2; /* Status of the disk */ - Uchar first_track; /* # of first track on disk */ - Uchar numsess; /* # of sessions */ - Uchar first_track_ls; /* First track in last session */ - Uchar last_track_ls; /* Last track in last session */ - Ucbit did_v : 1; /* Disk id valid */ - Ucbit dbc_v : 1; /* Disk bar code valid */ - Ucbit uru : 1; /* This is an unrestricted disk */ - Ucbit dac_v : 1; /* Disk application code valid */ - Ucbit res7_3 : 1; /* Reserved */ - Ucbit dbit : 1; /* Dirty Bit of defect table */ - Ucbit bg_format_stat : 2; /* Background format status */ - Uchar disk_type; /* Disk type */ - Uchar numsess_msb; /* # of sessions (MSB) */ - Uchar first_track_ls_msb; /* First tr. in last ses. (MSB) */ - Uchar last_track_ls_msb; /* Last tr. in last ses. (MSB) */ - Uchar disk_id[4]; /* Disk identification */ - Uchar last_lead_in[4]; /* Last session lead in time */ - Uchar last_lead_out[4]; /* Last session lead out time */ - Uchar disk_barcode[8]; /* Disk bar code */ - Uchar disk_appl_code; /* Disk application code */ - Uchar num_opc_entries; /* # of OPC table entries */ - opc_t opc_table[1]; /* OPC table */ -}; - -#endif - -struct cd_mode_data { - struct scsi_mode_header header; - union cd_pagex { - struct cd_mode_page_05 page05; - struct cd_mode_page_2A page2A; - } pagex; -}; - -struct tocheader { - Uchar len[2]; - Uchar first; - Uchar last; -}; - -/* - * Full TOC entry - */ -struct ftrackdesc { - Uchar sess_number; - -#if defined(_BIT_FIELDS_LTOH) /* Intel byteorder */ - Ucbit control : 4; - Ucbit adr : 4; -#else /* Motorola byteorder */ - Ucbit adr : 4; - Ucbit control : 4; -#endif - - Uchar track; - Uchar point; - Uchar amin; - Uchar asec; - Uchar aframe; - Uchar res7; - Uchar pmin; - Uchar psec; - Uchar pframe; -}; - -struct fdiskinfo { - struct tocheader hd; - struct ftrackdesc desc[1]; -}; - - - -#if defined(_BIT_FIELDS_LTOH) /* Intel bitorder */ - -struct atipdesc { - Ucbit ref_speed : 3; /* Reference speed */ - Ucbit res4_3 : 1; /* Reserved */ - Ucbit ind_wr_power : 3; /* Indicative tgt writing power */ - Ucbit res4_7 : 1; /* Reserved (must be "1") */ - Ucbit res5_05 : 6; /* Reserved */ - Ucbit uru : 1; /* Disk is for unrestricted use */ - Ucbit res5_7 : 1; /* Reserved (must be "0") */ - Ucbit a3_v : 1; /* A 3 Values valid */ - Ucbit a2_v : 1; /* A 2 Values valid */ - Ucbit a1_v : 1; /* A 1 Values valid */ - Ucbit sub_type : 3; /* Disc sub type */ - Ucbit erasable : 1; /* Disk is erasable */ - Ucbit res6_7 : 1; /* Reserved (must be "1") */ - Uchar lead_in[4]; /* Lead in time */ - Uchar lead_out[4]; /* Lead out time */ - Uchar res15; /* Reserved */ - Ucbit clv_high : 4; /* Highes usable CLV recording speed */ - Ucbit clv_low : 3; /* Lowest usable CLV recording speed */ - Ucbit res16_7 : 1; /* Reserved (must be "0") */ - Ucbit res17_0 : 1; /* Reserved */ - Ucbit tgt_y_pow : 3; /* Tgt y val of the power mod fun */ - Ucbit power_mult : 3; /* Power multiplication factor */ - Ucbit res17_7 : 1; /* Reserved (must be "0") */ - Ucbit res_18_30 : 4; /* Reserved */ - Ucbit rerase_pwr_ratio: 3; /* Recommended erase/write power*/ - Ucbit res18_7 : 1; /* Reserved (must be "1") */ - Uchar res19; /* Reserved */ - Uchar a2[3]; /* A 2 Values */ - Uchar res23; /* Reserved */ - Uchar a3[3]; /* A 3 Vaules */ - Uchar res27; /* Reserved */ -}; - -#else /* Motorola bitorder */ - -struct atipdesc { - Ucbit res4_7 : 1; /* Reserved (must be "1") */ - Ucbit ind_wr_power : 3; /* Indicative tgt writing power */ - Ucbit res4_3 : 1; /* Reserved */ - Ucbit ref_speed : 3; /* Reference speed */ - Ucbit res5_7 : 1; /* Reserved (must be "0") */ - Ucbit uru : 1; /* Disk is for unrestricted use */ - Ucbit res5_05 : 6; /* Reserved */ - Ucbit res6_7 : 1; /* Reserved (must be "1") */ - Ucbit erasable : 1; /* Disk is erasable */ - Ucbit sub_type : 3; /* Disc sub type */ - Ucbit a1_v : 1; /* A 1 Values valid */ - Ucbit a2_v : 1; /* A 2 Values valid */ - Ucbit a3_v : 1; /* A 3 Values valid */ - Uchar lead_in[4]; /* Lead in time */ - Uchar lead_out[4]; /* Lead out time */ - Uchar res15; /* Reserved */ - Ucbit res16_7 : 1; /* Reserved (must be "0") */ - Ucbit clv_low : 3; /* Lowest usable CLV recording speed */ - Ucbit clv_high : 4; /* Highes usable CLV recording speed */ - Ucbit res17_7 : 1; /* Reserved (must be "0") */ - Ucbit power_mult : 3; /* Power multiplication factor */ - Ucbit tgt_y_pow : 3; /* Tgt y val of the power mod fun */ - Ucbit res17_0 : 1; /* Reserved */ - Ucbit res18_7 : 1; /* Reserved (must be "1") */ - Ucbit rerase_pwr_ratio: 3; /* Recommended erase/write power*/ - Ucbit res_18_30 : 4; /* Reserved */ - Uchar res19; /* Reserved */ - Uchar a2[3]; /* A 2 Values */ - Uchar res23; /* Reserved */ - Uchar a3[3]; /* A 3 Vaules */ - Uchar res27; /* Reserved */ -}; - -#endif - -struct atipinfo { - struct tocheader hd; - struct atipdesc desc; -}; - -/* - * XXX Check how we may merge Track_info & Rzone_info - */ -#if defined(_BIT_FIELDS_LTOH) /* Intel bitorder */ - -struct track_info { - Uchar data_len[2]; /* Data len without this info */ - Uchar track_number; /* Track number for this info */ - Uchar session_number; /* Session number for this info */ - Uchar res4; /* Reserved */ - Ucbit track_mode : 4; /* Track mode (Q-sub control) */ - Ucbit copy : 1; /* This track is a higher copy */ - Ucbit damage : 1; /* if 1 & nwa_valid 0: inc track*/ - Ucbit res5_67 : 2; /* Reserved */ - Ucbit data_mode : 4; /* Data mode of this track */ - Ucbit fp : 1; /* This is a fixed packet track */ - Ucbit packet : 1; /* This track is in packet mode */ - Ucbit blank : 1; /* This is an invisible track */ - Ucbit rt : 1; /* This is a reserved track */ - Ucbit nwa_valid : 1; /* Next writable addr valid */ - Ucbit res7_17 : 7; /* Reserved */ - Uchar track_start[4]; /* Track start address */ - Uchar next_writable_addr[4]; /* Next writable address */ - Uchar free_blocks[4]; /* Free usr blocks in this track*/ - Uchar packet_size[4]; /* Packet size if in fixed mode */ - Uchar track_size[4]; /* # of user data blocks in trk */ -}; - -#else /* Motorola bitorder */ - -struct track_info { - Uchar data_len[2]; /* Data len without this info */ - Uchar track_number; /* Track number for this info */ - Uchar session_number; /* Session number for this info */ - Uchar res4; /* Reserved */ - Ucbit res5_67 : 2; /* Reserved */ - Ucbit damage : 1; /* if 1 & nwa_valid 0: inc track*/ - Ucbit copy : 1; /* This track is a higher copy */ - Ucbit track_mode : 4; /* Track mode (Q-sub control) */ - Ucbit rt : 1; /* This is a reserved track */ - Ucbit blank : 1; /* This is an invisible track */ - Ucbit packet : 1; /* This track is in packet mode */ - Ucbit fp : 1; /* This is a fixed packet track */ - Ucbit data_mode : 4; /* Data mode of this track */ - Ucbit res7_17 : 7; /* Reserved */ - Ucbit nwa_valid : 1; /* Next writable addr valid */ - Uchar track_start[4]; /* Track start address */ - Uchar next_writable_addr[4]; /* Next writable address */ - Uchar free_blocks[4]; /* Free usr blocks in this track*/ - Uchar packet_size[4]; /* Packet size if in fixed mode */ - Uchar track_size[4]; /* # of user data blocks in trk */ -}; - -#endif - -/* - * XXX Check how we may merge Track_info & Rzone_info - */ -#if defined(_BIT_FIELDS_LTOH) /* Intel bitorder */ - -struct rzone_info { - Uchar data_len[2]; /* Data len without this info */ - Uchar rzone_num_lsb; /* RZone number LSB */ - Uchar border_num_lsb; /* Border number LSB */ - Uchar res_4; /* Reserved */ - Ucbit trackmode : 4; /* Track mode */ - Ucbit copy : 1; /* Higher generation CD copy */ - Ucbit damage : 1; /* Damaged RZone */ - Ucbit ljrs : 2; /* Layer jump recording status */ - Ucbit datamode : 4; /* Data mode */ - Ucbit fp : 1; /* Fixed packet */ - Ucbit incremental : 1; /* RZone is to be written incremental */ - Ucbit blank : 1; /* RZone is blank */ - Ucbit rt : 1; /* RZone is reserved */ - Ucbit nwa_v : 1; /* Next WR address is valid */ - Ucbit lra_v : 1; /* Last rec address is valid */ - Ucbit res7_27 : 6; /* Reserved */ - Uchar rzone_start[4]; /* RZone start address */ - Uchar next_recordable_addr[4]; /* Next recordable address */ - Uchar free_blocks[4]; /* Free blocks in RZone */ - Uchar block_factor[4]; /* # of sectors of disc acc unit */ - Uchar rzone_size[4]; /* RZone size */ - Uchar last_recorded_addr[4]; /* Last Recorded addr in RZone */ - Uchar rzone_num_msb; /* RZone number MSB */ - Uchar border_num_msb; /* Border number MSB */ - Uchar res_34_35[2]; /* Reserved */ - Uchar read_compat_lba[4]; /* Read Compatibilty LBA */ - Uchar next_layer_jump[4]; /* Next layer jump address */ - Uchar last_layer_jump[4]; /* Last layer jump address */ -}; - -#else /* Motorola bitorder */ - -struct rzone_info { - Uchar data_len[2]; /* Data len without this info */ - Uchar rzone_num_lsb; /* RZone number LSB */ - Uchar border_num_lsb; /* Border number LSB */ - Uchar res_4; /* Reserved */ - Ucbit ljrs : 2; /* Layer jump recording status */ - Ucbit damage : 1; /* Damaged RZone */ - Ucbit copy : 1; /* Higher generation CD copy */ - Ucbit trackmode : 4; /* Track mode */ - Ucbit rt : 1; /* RZone is reserved */ - Ucbit blank : 1; /* RZone is blank */ - Ucbit incremental : 1; /* RZone is to be written incremental */ - Ucbit fp : 1; /* Fixed packet */ - Ucbit datamode : 4; /* Data mode */ - Ucbit res7_27 : 6; /* Reserved */ - Ucbit lra_v : 1; /* Last rec address is valid */ - Ucbit nwa_v : 1; /* Next WR address is valid */ - Uchar rzone_start[4]; /* RZone start address */ - Uchar next_recordable_addr[4]; /* Next recordable address */ - Uchar free_blocks[4]; /* Free blocks in RZone */ - Uchar block_factor[4]; /* # of sectors of disc acc unit */ - Uchar rzone_size[4]; /* RZone size */ - Uchar last_recorded_addr[4]; /* Last Recorded addr in RZone */ - Uchar rzone_num_msb; /* RZone number MSB */ - Uchar border_num_msb; /* Border number MSB */ - Uchar res_34_35[2]; /* Reserved */ - Uchar read_compat_lba[4]; /* Read Compatibilty LBA */ - Uchar next_layer_jump[4]; /* Next layer jump address */ - Uchar last_layer_jump[4]; /* Last layer jump address */ -}; - -#endif - -/* - * The lrjs values: - */ -#define LRJS_NONE 0 /* DAO/Incremental/Blank */ -#define LRJS_UNSPEC 1 /* WT == LJ but layerjump not set */ -#define LRJS_MANUAL 2 /* Manual layer jump set */ -#define LRJS_INTERVAL 3 /* Jump interval size set */ - -#if defined(_BIT_FIELDS_LTOH) /* Intel bitorder */ - -struct dvd_structure_00 { - Uchar data_len[2]; /* Data len without this info */ - Uchar res23[2]; /* Reserved */ - Ucbit book_version : 4; /* DVD Book version */ - Ucbit book_type : 4; /* DVD Book type */ - Ucbit maximum_rate : 4; /* Maximum data rate (coded) */ - Ucbit disc_size : 4; /* Disc size (coded) */ - Ucbit layer_type : 4; /* Layer type */ - Ucbit track_path : 1; /* 0 = parallel, 1 = opposit dir*/ - Ucbit numlayers : 2; /* Number of Layers (0 == 1) */ - Ucbit res2_7 : 1; /* Reserved */ - Ucbit track_density : 4; /* Track density (coded) */ - Ucbit linear_density : 4; /* Linear data density (coded) */ - Uchar res8; /* Reserved */ - Uchar phys_start[3]; /* Starting Physical sector # */ - Uchar res12; /* Reserved */ - Uchar phys_end[3]; /* End physical data sector # */ - Uchar res16; /* Reserved */ - Uchar end_layer0[3]; /* End sector # in layer */ - Ucbit res20 : 7; /* Reserved */ - Ucbit bca : 1; /* BCA flag bit */ -}; - -#else /* Motorola bitorder */ - -struct dvd_structure_00 { - Uchar data_len[2]; /* Data len without this info */ - Uchar res23[2]; /* Reserved */ - Ucbit book_type : 4; /* DVD Book type */ - Ucbit book_version : 4; /* DVD Book version */ - Ucbit disc_size : 4; /* Disc size (coded) */ - Ucbit maximum_rate : 4; /* Maximum data rate (coded) */ - Ucbit res2_7 : 1; /* Reserved */ - Ucbit numlayers : 2; /* Number of Layers (0 == 1) */ - Ucbit track_path : 1; /* 0 = parallel, 1 = opposit dir*/ - Ucbit layer_type : 4; /* Layer type */ - Ucbit linear_density : 4; /* Linear data density (coded) */ - Ucbit track_density : 4; /* Track density (coded) */ - Uchar res8; /* Reserved */ - Uchar phys_start[3]; /* Starting Physical sector # */ - Uchar res12; /* Reserved */ - Uchar phys_end[3]; /* End physical data sector # */ - Uchar res16; /* Reserved */ - Uchar end_layer0[3]; /* End sector # in layer */ - Ucbit bca : 1; /* BCA flag bit */ - Ucbit res20 : 7; /* Reserved */ -}; - -#endif - -struct dvd_structure_01 { - Uchar data_len[2]; /* Data len without this info */ - Uchar res23[2]; /* Reserved */ - Uchar copyr_prot_type; /* Copyright prot system type */ - Uchar region_mgt_info; /* Region management info */ - Uchar res67[2]; /* Reserved */ -}; - -struct dvd_structure_02 { - Uchar data_len[2]; /* Data len without this info */ - Uchar res23[2]; /* Reserved */ - Uchar key_data[2048]; /* Disc Key data */ -}; - -struct dvd_structure_03 { - Uchar data_len[2]; /* Data len without this info */ - Uchar res23[2]; /* Reserved */ - Uchar bca_info[1]; /* BCA information (12-188 bytes)*/ -}; - -struct dvd_structure_04 { - Uchar data_len[2]; /* Data len without this info */ - Uchar res23[2]; /* Reserved */ - Uchar man_info[2048]; /* Disc manufacturing info */ -}; - -#if defined(_BIT_FIELDS_LTOH) /* Intel bitorder */ - -struct dvd_structure_05 { - Uchar data_len[2]; /* Data len without this info */ - Uchar res23[2]; /* Reserved */ - Ucbit res4_03 : 4; /* Reserved */ - Ucbit cgms : 2; /* CGMS (see below) */ - Ucbit res4_6 : 1; /* Reserved */ - Ucbit cpm : 1; /* This is copyrighted material */ - Uchar res57[3]; /* Reserved */ -}; - -#else /* Motorola bitorder */ - -struct dvd_structure_05 { - Uchar data_len[2]; /* Data len without this info */ - Uchar res23[2]; /* Reserved */ - Ucbit cpm : 1; /* This is copyrighted material */ - Ucbit res4_6 : 1; /* Reserved */ - Ucbit cgms : 2; /* CGMS (see below) */ - Ucbit res4_03 : 4; /* Reserved */ - Uchar res57[3]; /* Reserved */ -}; - -#endif - -#define CGMS_PERMITTED 0 /* Unlimited copy permitted */ -#define CGMS_RES 1 /* Reserved */ -#define CGMS_ONE_COPY 2 /* One copy permitted */ -#define CGMS_NO_COPY 3 /* No copy permitted */ - -struct dvd_structure_0D { - Uchar data_len[2]; /* Data len without this info */ - Uchar res23[2]; /* Reserved */ - Uchar last_rma_sector[2]; /* Last recorded RMA sector # */ - Uchar rmd_bytes[1]; /* Content of Record man area */ -}; - -struct dvd_structure_0E { - Uchar data_len[2]; /* Data len without this info */ - Uchar res23[2]; /* Reserved */ - Uchar field_id; /* Field ID (1) */ - Uchar application_code; /* Disc Application code */ - Uchar phys_data; /* Disc Phisical Data */ - Uchar last_recordable_addr[3]; /* Last addr of recordable area */ - Uchar res_a[2]; /* Reserved */ - Uchar field_id_2; /* Field ID (2) */ - Uchar ind_wr_power; /* Recommended writing power */ - Uchar ind_wavelength; /* Wavelength for ind_wr_power */ - Uchar opt_wr_strategy[4]; /* Optimum write Strategy */ - Uchar res_b[1]; /* Reserved */ - Uchar field_id_3; /* Field ID (3) */ - Uchar man_id[6]; /* Manufacturer ID */ - Uchar res_m1; /* Reserved */ - Uchar field_id_4; /* Field ID (4) */ - Uchar man_id2[6]; /* Manufacturer ID */ - Uchar res_m2; /* Reserved */ -}; - -struct dvd_structure_0F { - Uchar data_len[2]; /* Data len without this info */ - Uchar res23[2]; /* Reserved */ - Uchar res45[2]; /* Reserved */ - Uchar random[2]; /* Random number */ - Uchar year[4]; /* Year (ascii) */ - Uchar month[2]; /* Month (ascii) */ - Uchar day[2]; /* Day (ascii) */ - Uchar hour[2]; /* Hour (ascii) */ - Uchar minute[2]; /* Minute (ascii) */ - Uchar second[2]; /* Second (ascii) */ -}; - -struct dvd_structure_0F_w { - Uchar data_len[2]; /* Data len without this info */ - Uchar res23[2]; /* Reserved */ - Uchar res45[2]; /* Reserved */ - Uchar year[4]; /* Year (ascii) */ - Uchar month[2]; /* Month (ascii) */ - Uchar day[2]; /* Day (ascii) */ - Uchar hour[2]; /* Hour (ascii) */ - Uchar minute[2]; /* Minute (ascii) */ - Uchar second[2]; /* Second (ascii) */ -}; - -struct dvd_structure_20 { - Uchar data_len[2]; /* Data len without this info */ - Uchar res23[2]; /* Reserved */ - Uchar res47[4]; /* Reserved */ - Uchar l0_area_cap[4]; /* Layer 0 area capacity */ -}; - -struct dvd_structure_22 { - Uchar data_len[2]; /* Data len without this info */ - Uchar res23[2]; /* Reserved */ - Uchar res47[4]; /* Reserved */ - Uchar jump_interval_size[4]; /* Jump interval size */ -}; - -struct dvd_structure_23 { - Uchar data_len[2]; /* Data len without this info */ - Uchar res23[2]; /* Reserved */ - Uchar res47[4]; /* Reserved */ - Uchar jump_lba[4]; /* Jump logical block address */ -}; - -struct mmc_cue { - Uchar cs_ctladr; /* CTL/ADR for this track */ - Uchar cs_tno; /* This track number */ - Uchar cs_index; /* Index within this track */ - Uchar cs_dataform; /* Data form */ - Uchar cs_scms; /* Serial copy management */ - Uchar cs_min; /* Absolute time minutes */ - Uchar cs_sec; /* Absolute time seconds */ - Uchar cs_frame; /* Absolute time frames */ -}; - -struct mmc_performance_header { - Uchar p_datalen[4]; /* Performance Data length */ -#if defined(_BIT_FIELDS_LTOH) /* Intel bitorder */ - Ucbit p_exept :1; /* Nominal vs. Exept. conditions*/ - Ucbit p_write :1; /* Write vs. Read performance */ - Ucbit p_res_4 :6; /* Reserved bits... */ -#else /* Motorola bitorder */ - Ucbit p_res_4 :6; /* Reserved bits... */ - Ucbit p_write :1; /* Write vs. Read performance */ - Ucbit p_exept :1; /* Nominal vs. Exept. conditions*/ -#endif - Uchar p_res[3]; /* Reserved bytes */ -}; - - -struct mmc_performance { /* Type == 00 (nominal) */ - Uchar start_lba[4]; /* Starting LBA */ - Uchar start_perf[4]; /* Start Performance */ - Uchar end_lba[4]; /* Ending LBA */ - Uchar end_perf[4]; /* Ending Performance */ -}; - -struct mmc_exceptions { /* Type == 00 (exceptions) */ - Uchar lba[4]; /* LBA */ - Uchar time[2]; /* Time */ -}; - -struct mmc_write_speed { /* Type == 00 (write speed) */ -#if defined(_BIT_FIELDS_LTOH) /* Intel bitorder */ - Ucbit p_mrw :1; /* Suitable for mixed read/write*/ - Ucbit p_exact :1; /* Speed count for whole media */ - Ucbit p_rdd :1; /* Media rotational control */ - Ucbit p_wrc :2; /* Write rotational control */ - Ucbit p_res :3; /* Reserved bits... */ -#else /* Motorola bitorder */ - Ucbit p_res :3; /* Reserved bits... */ - Ucbit p_wrc :2; /* Write rotational control */ - Ucbit p_rdd :1; /* Media rotational control */ - Ucbit p_exact :1; /* Speed count for whole media */ - Ucbit p_mrw :1; /* Suitable for mixed read/write*/ -#endif - Uchar res[3]; /* Reserved Bytes */ - Uchar end_lba[4]; /* Ending LBA */ - Uchar read_speed[4]; /* Read Speed */ - Uchar write_speed[4]; /* Write Speed */ -}; - -#define WRC_DEF_RC 0 /* Media default rotational control */ -#define WRC_CAV 1 /* CAV */ - - -struct mmc_streaming { /* Performance for set streaming*/ -#if defined(_BIT_FIELDS_LTOH) /* Intel bitorder */ - Ucbit p_ra :1; /* Random Acess */ - Ucbit p_exact :1; /* Set values exactly */ - Ucbit p_rdd :1; /* Restore unit defaults */ - Ucbit p_wrc :2; /* Write rotational control */ - Ucbit p_res :3; /* Reserved bits... */ -#else /* Motorola bitorder */ - Ucbit p_res :3; /* Reserved bits... */ - Ucbit p_wrc :2; /* Write rotational control */ - Ucbit p_rdd :1; /* Restore unit defaults */ - Ucbit p_exact :1; /* Set values exactly */ - Ucbit p_ra :1; /* Random Acess */ -#endif - Uchar res[3]; /* Reserved Bytes */ - Uchar start_lba[4]; /* Starting LBA */ - Uchar end_lba[4]; /* Ending LBA */ - Uchar read_size[4]; /* Read Size */ - Uchar read_time[4]; /* Read Time */ - Uchar write_size[4]; /* Write Size */ - Uchar write_time[4]; /* Write Time */ -}; - -#endif /* _SCSIMMC_H */ diff -Nru cdrtools-2.01.01a33/btcflash/scsi_scan.c cdrtools-3.02a09/btcflash/scsi_scan.c --- cdrtools-2.01.01a33/btcflash/scsi_scan.c 2007-07-12 07:04:53.000000000 +0000 +++ cdrtools-3.02a09/btcflash/scsi_scan.c 1970-01-01 00:00:00.000000000 +0000 @@ -1,270 +0,0 @@ -/* @(#)scsi_scan.c 1.30 07/07/12 Copyright 1997-2007 J. Schilling */ -#ifndef lint -static char sccsid[] = - "@(#)scsi_scan.c 1.30 07/07/12 Copyright 1997-2007 J. Schilling"; -#endif -/* - * Scan SCSI Bus. - * Stolen from sformat. Need a more general form to - * re-use it in sformat too. - * - * Copyright (c) 1997-2007 J. Schilling - */ -/* - * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. - * - * See the file CDDL.Schily.txt in this distribution for details. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file CDDL.Schily.txt from this distribution. - */ - -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include - -#include "scsi_scan.h" -#include "cdrecord.h" - -LOCAL void print_product __PR((FILE *f, struct scsi_inquiry *ip)); -EXPORT int select_target __PR((SCSI *scgp, FILE *f)); -EXPORT int find_target __PR((SCSI *scgp, int type, int idx)); -LOCAL int _select_target __PR((SCSI *scgp, FILE *f, int type, int idx)); -LOCAL int select_unit __PR((SCSI *scgp, FILE *f)); - -LOCAL void -print_product(f, ip) - FILE *f; - struct scsi_inquiry *ip; -{ - fprintf(f, "'%.8s' ", ip->vendor_info); - fprintf(f, "'%.16s' ", ip->prod_ident); - fprintf(f, "'%.4s' ", ip->prod_revision); - if (ip->add_len < 31) { - fprintf(f, "NON CCS "); - } - scg_fprintdev(f, ip); -} - -EXPORT int -select_target(scgp, f) - SCSI *scgp; - FILE *f; -{ - return (_select_target(scgp, f, -1, -1)); -} - -EXPORT int -find_target(scgp, type, idx) - SCSI *scgp; - int type; - int idx; -{ - return (_select_target(scgp, (FILE *)NULL, type, idx)); -} - -LOCAL int -_select_target(scgp, f, type, idx) - SCSI *scgp; - FILE *f; - int type; - int idx; -{ - int initiator; - int cscsibus = scg_scsibus(scgp); - int ctarget = scg_target(scgp); - int clun = scg_lun(scgp); - int numbus = scg_numbus(scgp); - int n; - int low = -1; - int high = -1; - int amt = -1; - int bus; - int tgt; - int lun = 0; - int err; - BOOL have_tgt; - - if (numbus < 0) - numbus = 1024; - scgp->silent++; - - for (bus = 0; bus < numbus; bus++) { - scg_settarget(scgp, bus, 0, 0); - - if (!scg_havebus(scgp, bus)) - continue; - - initiator = scg_initiator_id(scgp); - if (f) - fprintf(f, "scsibus%d:\n", bus); - - for (tgt = 0; tgt < 16; tgt++) { - n = bus*100 + tgt; - - scg_settarget(scgp, bus, tgt, lun); - seterrno(0); - have_tgt = unit_ready(scgp) || scgp->scmd->error != SCG_FATAL; - err = geterrno(); - if (err == EPERM || err == EACCES) - return (-1); - - if (!have_tgt && tgt > 7) { - if (scgp->scmd->ux_errno == EINVAL) - break; - continue; - } - if (f) { -#ifdef FMT - if (print_disknames(bus, tgt, -1) < 8) - fprintf(f, "\t"); - else - fprintf(f, " "); -#else - fprintf(f, "\t"); -#endif - if (fprintf(f, "%d,%d,%d", bus, tgt, lun) < 8) - fprintf(f, "\t"); - else - fprintf(f, " "); - fprintf(f, "%3d) ", n); - } - if (tgt == initiator) { - if (f) - fprintf(f, "HOST ADAPTOR\n"); - continue; - } - if (!have_tgt) { - /* - * Hack: fd -> -2 means no access - */ - if (f) { - fprintf(f, "%c\n", - scgp->fd == -2 ? '?':'*'); - } - continue; - } - if (low < 0) - low = n; - high = n; - - getdev(scgp, FALSE); - if (f) - print_product(f, scgp->inq); - if (type >= 0 && scgp->inq->type == type) { - amt++; - if (amt == 0) /* amt starts at -1 */ - amt++; - if (amt == idx) { - scgp->silent--; - return (amt); - } - } else if (type < 0) { - amt++; - } - if (amt == 0) /* amt starts at -1 */ - amt++; - } - } - scgp->silent--; - - if (low < 0) { - errmsgno(EX_BAD, "No target found.\n"); - return (0); - } - n = -1; -#ifdef FMT - getint("Select target", &n, low, high); - bus = n/100; - tgt = n%100; - scg_settarget(scgp, bus, tgt, lun); - return (select_unit(scgp)); - -#endif - scg_settarget(scgp, cscsibus, ctarget, clun); - return (amt); -} - -LOCAL int -select_unit(scgp, f) - SCSI *scgp; - FILE *f; -{ - int initiator; - int clun = scg_lun(scgp); - int low = -1; - int high = -1; - int lun; - - scgp->silent++; - - fprintf(f, "scsibus%d target %d:\n", scg_scsibus(scgp), scg_target(scgp)); - - initiator = scg_initiator_id(scgp); - for (lun = 0; lun < 8; lun++) { - -#ifdef FMT - if (print_disknames(scg_scsibus(scgp), scg_target(scgp), lun) < 8) - fprintf(f, "\t"); - else - fprintf(f, " "); -#else - fprintf(f, "\t"); -#endif - if (fprintf(f, "%d,%d,%d", scg_scsibus(scgp), scg_target(scgp), lun) < 8) - fprintf(f, "\t"); - else - fprintf(f, " "); - fprintf(f, "%3d) ", lun); - if (scg_target(scgp) == initiator) { - fprintf(f, "HOST ADAPTOR\n"); - continue; - } - scg_settarget(scgp, scg_scsibus(scgp), scg_target(scgp), lun); - if (!unit_ready(scgp) && scgp->scmd->error == SCG_FATAL) { - fprintf(f, "*\n"); - continue; - } - if (unit_ready(scgp)) { - /* non extended sense illegal lun */ - if (scgp->scmd->sense.code == 0x25) { - fprintf(f, "BAD UNIT\n"); - continue; - } - } - if (low < 0) - low = lun; - high = lun; - - getdev(scgp, FALSE); - print_product(f, scgp->inq); - } - scgp->silent--; - - if (low < 0) { - errmsgno(EX_BAD, "No lun found.\n"); - return (0); - } - lun = -1; -#ifdef FMT - getint("Select lun", &lun, low, high); - scg_settarget(scgp, scg_scsibus(scgp), scg_target(scgp), lun); - format_one(scgp); - return (1); -#endif - - scg_settarget(scgp, scg_scsibus(scgp), scg_target(scgp), clun); - return (1); -} diff -Nru cdrtools-2.01.01a33/btcflash/scsi_scan.h cdrtools-3.02a09/btcflash/scsi_scan.h --- cdrtools-2.01.01a33/btcflash/scsi_scan.h 2006-11-26 00:39:41.000000000 +0000 +++ cdrtools-3.02a09/btcflash/scsi_scan.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,25 +0,0 @@ -/* @(#)scsi_scan.h 1.5 06/11/26 Copyright 1997 J. Schilling */ -/* - * Interface to scan SCSI Bus. - * - * Copyright (c) 1997 J. Schilling - */ -/* - * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. - * - * See the file CDDL.Schily.txt in this distribution for details. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file CDDL.Schily.txt from this distribution. - */ - -#ifndef _SCSI_SCAN_H -#define _SCSI_SCAN_H - -extern int select_target __PR((SCSI *scgp, FILE *f)); -extern int find_target __PR((SCSI *scgp, int type, int idx)); - -#endif /* _SCSI_SCAN_H */ diff -Nru cdrtools-2.01.01a33/btcflash/skel.c cdrtools-3.02a09/btcflash/skel.c --- cdrtools-2.01.01a33/btcflash/skel.c 2007-07-07 15:50:55.000000000 +0000 +++ cdrtools-3.02a09/btcflash/skel.c 2016-01-24 16:25:27.000000000 +0000 @@ -1,12 +1,13 @@ -/* @(#)skel.c 1.13 07/07/07 Copyright 1987, 1995-2007 J. Schilling */ +/* @(#)skel.c 1.26 16/01/24 Copyright 1987, 1995-2016 J. Schilling */ +#include #ifndef lint -static char sccsid[] = - "@(#)skel.c 1.13 07/07/07 Copyright 1987, 1995-2007 J. Schilling"; +static UConst char sccsid[] = + "@(#)skel.c 1.26 16/01/24 Copyright 1987, 1995-2016 J. Schilling"; #endif /* * Skeleton for the use of the scg genearal SCSI - driver * - * Copyright (c) 1987, 1995-2007 J. Schilling + * Copyright (c) 1987, 1995-2016 J. Schilling */ /* * The contents of this file are subject to the terms of the @@ -15,13 +16,14 @@ * with the License. * * See the file CDDL.Schily.txt in this distribution for details. + * A copy of the CDDL is also available via the Internet at + * http://www.opensource.org/licenses/cddl1.txt * * When distributing Covered Code, include this CDDL HEADER in each * file and include the License file CDDL.Schily.txt from this distribution. */ -#include -#include +#include #include #include #include @@ -29,15 +31,11 @@ #include #include #include -#include +#include #include -#ifdef HAVE_PRIV_H -#include -#endif - -#if defined(__CYGWIN32__) || defined(__EMX__) || defined(__DJGPP__) -#include /* for setmode() prototype */ -#endif +#include +#include +#include /* for setmode() prototype */ #include #include @@ -45,7 +43,7 @@ #include "scsi_scan.h" #include "cdrecord.h" -#include "defaults.h" +#include "cdrdeflt.h" char skel_version[] = "1.1"; @@ -64,9 +62,11 @@ EXPORT int main __PR((int ac, char **av)); LOCAL void intr __PR((int sig)); LOCAL void exscsi __PR((int excode, void *arg)); +#ifdef __needed__ LOCAL void excdr __PR((int excode, void *arg)); LOCAL int prstats __PR((void)); LOCAL int prstats_silent __PR((void)); +#endif LOCAL void doit __PR((SCSI *scgp)); LOCAL void dofile __PR((SCSI *scgp, char *filename)); @@ -76,7 +76,7 @@ int exsig; char *Sbuf; -long Sbufsize; +long Sbufsize = -1L; int help; int xdebug; @@ -88,25 +88,26 @@ usage(ret) int ret; { - error("Usage:\tbtcflash [options] f=firmwarefile\n"); - error("options:\n"); - error("\t-version print version information and exit\n"); - error("\tdev=target SCSI target to use\n"); - error("\tf=filename Name of firmware file to read from\n"); - error("\tts=# set maximum transfer size for a single SCSI command\n"); - error("\ttimeout=# set the default SCSI command timeout to #.\n"); - error("\tdebug=#,-d Set to # or increment misc debug level\n"); - error("\tkdebug=#,kd=# do Kernel debugging\n"); - error("\t-quiet,-q be more quiet in error retry mode\n"); - error("\t-verbose,-v increment general verbose level by one\n"); - error("\t-Verbose,-V increment SCSI command transport verbose level by one\n"); - error("\t-silent,-s do not print status of failed SCSI commands\n"); - error("\t-scanbus scan the SCSI bus and exit\n"); + error(_("Usage:\tbtcflash [options] f=firmwarefile\n")); + error(_("Options:\n")); + error(_("\t-version print version information and exit\n")); + error(_("\tdev=target SCSI target to use\n")); + error(_("\tscgopts=spec SCSI options for libscg\n")); + error(_("\tf=filename Name of firmware file to read from\n")); + error(_("\tts=# set maximum transfer size for a single SCSI command\n")); + error(_("\ttimeout=# set the default SCSI command timeout to #.\n")); + error(_("\tdebug=#,-d Set to # or increment misc debug level\n")); + error(_("\tkdebug=#,kd=# do Kernel debugging\n")); + error(_("\t-quiet,-q be more quiet in error retry mode\n")); + error(_("\t-verbose,-v increment general verbose level by one\n")); + error(_("\t-Verbose,-V increment SCSI command transport verbose level by one\n")); + error(_("\t-silent,-s do not print status of failed SCSI commands\n")); + error(_("\t-scanbus scan the SCSI bus and exit\n")); exit(ret); } /* CSTYLED */ -char opts[] = "debug#,d+,kdebug#,kd#,timeout#,quiet,q,verbose+,v+,Verbose+,V+,x+,xd#,silent,s,help,h,version,scanbus,dev*,ts&,f*"; +char opts[] = "debug#,d+,kdebug#,kd#,timeout#,quiet,q,verbose+,v+,Verbose+,V+,x+,xd#,silent,s,help,h,version,scanbus,dev*,scgopts*,ts&,f*"; EXPORT int main(ac, av) @@ -114,9 +115,13 @@ char *av[]; { char *dev = NULL; + char *scgopts = NULL; int fcount; int cac; char * const *cav; +#if defined(USE_NLS) + char *dir; +#endif int scsibus = -1; int target = -1; int lun = -1; @@ -133,6 +138,24 @@ save_args(ac, av); +#if defined(USE_NLS) + (void) setlocale(LC_ALL, ""); +#if !defined(TEXT_DOMAIN) /* Should be defined by cc -D */ +#define TEXT_DOMAIN "btcflash" /* Use this only if it weren't */ +#endif + dir = searchfileinpath("share/locale", F_OK, + SIP_ANY_FILE|SIP_NO_PATH, NULL); + if (dir) + (void) bindtextdomain(TEXT_DOMAIN, dir); + else +#if defined(PROTOTYPES) && defined(INS_BASE) + (void) bindtextdomain(TEXT_DOMAIN, INS_BASE "/share/locale"); +#else + (void) bindtextdomain(TEXT_DOMAIN, "/usr/share/locale"); +#endif + (void) textdomain(TEXT_DOMAIN); +#endif + cac = --ac; cav = ++av; @@ -147,18 +170,19 @@ &silent, &silent, &help, &help, &pversion, &scanbus, - &dev, + &dev, &scgopts, getnum, &Sbufsize, &filename) < 0) { - errmsgno(EX_BAD, "Bad flag: %s.\n", cav[0]); + errmsgno(EX_BAD, _("Bad flag: %s.\n"), cav[0]); usage(EX_BAD); } if (help) usage(0); if (pversion) { - printf("btcflash %s (%s-%s-%s) Copyright (C) 1987, 1995-2007 Jörg Schilling (C) 2004 David Huang\n", + printf(_("btcflash %s (%s-%s-%s) Copyright (C) 1987, 1995-2016 %s (C) 2004 David Huang\n"), skel_version, - HOST_CPU, HOST_VENDOR, HOST_OS); + HOST_CPU, HOST_VENDOR, HOST_OS, + _("Joerg Schilling")); exit(0); } @@ -171,7 +195,7 @@ if (fcount == 1) { if (*astoi(cav[0], &target) != '\0') { errmsgno(EX_BAD, - "Target '%s' is not a Number.\n", + _("Target '%s' is not a Number.\n"), cav[0]); usage(EX_BAD); /* NOTREACHED */ @@ -180,7 +204,7 @@ if (fcount == 2) { if (*astoi(cav[0], &lun) != '\0') { errmsgno(EX_BAD, - "Lun is '%s' not a Number.\n", + _("Lun is '%s' not a Number.\n"), cav[0]); usage(EX_BAD); /* NOTREACHED */ @@ -189,7 +213,7 @@ if (fcount == 3) { if (*astoi(cav[0], &scsibus) != '\0') { errmsgno(EX_BAD, - "Scsibus is '%s' not a Number.\n", + _("Scsibus is '%s' not a Number.\n"), cav[0]); usage(EX_BAD); /* NOTREACHED */ @@ -202,13 +226,13 @@ } /*error("dev: '%s'\n", dev);*/ - cdr_defaults(&dev, NULL, NULL, NULL); + cdr_defaults(&dev, NULL, NULL, &Sbufsize, NULL); if (debug) { - printf("dev: '%s'\n", dev); + printf(_("dev: '%s'\n"), dev); } if (!scanbus && dev == NULL && scsibus == -1 && (target == -1 || lun == -1)) { - errmsgno(EX_BAD, "No SCSI device specified.\n"); + errmsgno(EX_BAD, _("No SCSI device specified.\n")); usage(EX_BAD); } if (dev || scanbus) { @@ -227,11 +251,11 @@ exit(0); } if ((scgp = scg_open(dev, errstr, sizeof (errstr), debug, lverbose)) == (SCSI *)0) { - int err = geterrno(); + err = geterrno(); - errmsgno(err, "%s%sCannot open SCSI driver.\n", errstr, errstr[0]?". ":""); - errmsgno(EX_BAD, "For possible targets try 'scgskeleton -scanbus'. Make sure you are root.\n"); - errmsgno(EX_BAD, "For possible transport specifiers try 'scgskeleton dev=help'.\n"); + errmsgno(err, _("%s%sCannot open SCSI driver.\n"), errstr, errstr[0]?". ":""); + errmsgno(EX_BAD, _("For possible targets try 'btcflash -scanbus'. Make sure you are root.\n")); + errmsgno(EX_BAD, _("For possible transport specifiers try 'btcflash dev=help'.\n")); exit(err); } } else { @@ -244,7 +268,12 @@ scg_settarget(scgp, scsibus, target, lun); if (scg__open(scgp, NULL) <= 0) - comerr("Cannot open SCSI driver.\n"); + comerr(_("Cannot open SCSI driver.\n")); + } + if (scgopts) { + int i = scg_opts(scgp, scgopts); + if (i <= 0) + exit(i < 0 ? EX_BAD : 0); } scgp->silent = silent; scgp->verbose = verbose; @@ -252,11 +281,11 @@ scgp->kdebug = kdebug; scg_settimeout(scgp, deftimeout); - if (Sbufsize == 0) + if (Sbufsize < 0) Sbufsize = 256*1024L; Sbufsize = scg_bufsize(scgp, Sbufsize); if ((Sbuf = scg_getbuf(scgp, Sbufsize)) == NULL) - comerr("Cannot get SCSI I/O buffer.\n"); + comerr(_("Cannot get SCSI I/O buffer.\n")); #ifdef HAVE_PRIV_SET /* @@ -289,7 +318,7 @@ if (setuid(getuid()) < 0) #endif #endif - comerr("Panic cannot set back effective uid.\n"); + comerr(_("Panic cannot set back effective uid.\n")); /* code to use SCG */ @@ -320,7 +349,7 @@ if (filename) { dofile(scgp, filename); } else { - errmsgno(EX_BAD, "Firmware file missing.\n"); + errmsgno(EX_BAD, _("Firmware file missing.\n")); doit(scgp); } @@ -360,7 +389,7 @@ break; if (i == 10) { errmsgno(EX_BAD, - "Waiting for current SCSI command to finish.\n"); + _("Waiting for current SCSI command to finish.\n")); } usleep(100000); } @@ -381,6 +410,7 @@ } } +#ifdef __needed__ LOCAL void excdr(excode, arg) int excode; @@ -392,7 +422,9 @@ /* Do several other restores/statistics here (see cdrecord.c) */ #endif } +#endif +#ifdef __needed__ /* * Return milliseconds since start time. */ @@ -404,7 +436,7 @@ int tmsec; if (gettimeofday(&stoptime, (struct timezone *)0) < 0) - comerr("Cannot get time\n"); + comerr(_("Cannot get time\n")); sec = stoptime.tv_sec - starttime.tv_sec; usec = stoptime.tv_usec - starttime.tv_usec; @@ -417,10 +449,12 @@ usec += 1000000; } - error("Time total: %d.%03dsec\n", sec, usec/1000); + error(_("Time total: %d.%03dsec\n"), sec, usec/1000); return (1000*sec + (usec / 1000)); } +#endif +#ifdef __needed__ /* * Return milliseconds since start time, but be silent this time. */ @@ -432,7 +466,7 @@ int tmsec; if (gettimeofday(&stoptime, (struct timezone *)0) < 0) - comerr("Cannot get time\n"); + comerr(_("Cannot get time\n")); sec = stoptime.tv_sec - starttime.tv_sec; usec = stoptime.tv_usec - starttime.tv_usec; @@ -447,6 +481,7 @@ return (1000*sec + (usec / 1000)); } +#endif LOCAL void doit(scgp) @@ -456,12 +491,12 @@ for (;;) { if (!wait_unit_ready(scgp, 60)) - comerrno(EX_BAD, "Device not ready.\n"); + comerrno(EX_BAD, _("Device not ready.\n")); - printf("0:read\n"); + printf(_("0:read\n")); /* printf("7:wne 8:floppy 9:verify 10:checkcmds 11:read disk 12:write disk\n");*/ - getint("Enter selection:", &i, 0, 20); + getint(_("Enter selection:"), &i, 0, 20); if (didintr) return; @@ -469,7 +504,7 @@ /* case 1: read_disk(scgp, 0); break;*/ - default: error("Unimplemented selection %d\n", i); + default: error(_("Unimplemented selection %d\n"), i); } } } diff -Nru cdrtools-2.01.01a33/BUILD cdrtools-3.02a09/BUILD --- cdrtools-2.01.01a33/BUILD 2007-07-01 13:04:59.000000000 +0000 +++ cdrtools-3.02a09/BUILD 2017-11-28 19:19:10.000000000 +0000 @@ -1,3 +1,5 @@ +# @(#)README.compile 1.35 17/11/28 Copyright 1997-2017 J. Schilling + Short overview for those who don't read manuals: Calling configure manually is outdated because this is a task of the @@ -13,16 +15,16 @@ All results in general will be placed into a directory named OBJ// in the current projects leaf directory. - You **need** either my "smake" program, the SunPRO make + You **need** either the Schily "smake" program, the SunPRO make from /usr/bin/make (SunOS 4.x) or /usr/ccs/bin/make (SunOS 5.x) - or GNU make to compile this program. Read README.gmake for + or GNU make to compile this program. Read READMEs/README.gmake for more information on gmake and a list of the most annoying bugs in gmake. All other make programs are either not smart enough or have bugs. My "smake" source is at: - ftp://ftp.berlios.de/pub/smake/alpha/ + https://sourceforge.net/projects/s-make/files/ It is easy to compile and doesn't need a working make program on your machine. If you don't have a working "make" program on the @@ -42,28 +44,32 @@ ***** Schily makefilesystem you cannot use GNU make. ***** ***** In this case, the automake features of smake are required. ***** + Note that GNU make has major bugs on various platforms and thus cannot + be used at all on VMS and OS/2. GNU make on Cygwin causes problems + because it does not deal with spaces and newlines correctly. + Please read the README's for your operating system too. WARNING Do not use 'mc' to extract the tar file! All mc versions before 4.0.14 cannot extract symbolic links correctly. - The versions of WinZip that support tar archives cannot be used too. + The versions of WinZip that support tar archives cannot be used either. The reason is that they don't support symbolic links. Star and Gnutar do support symbolic links even on win32 systems. To support symbolic links on win32, you need to link with the Cygwin32 POSIX library. - To unpack an archive use: + To unpack an archive, use: - gzip -d < some-arch.tar.gz | tar -xpf - + gzip -d < some-arch.tar.gz | tar xpf - - Replace 'star' by the actual archive name. + Replace 'some-arch.tar.gz' by the actual archive name. - If your Platform does not support hard links or symbolic links, you + If your platform does not support hard links or symbolic links, you first need to compile "star" and then call: - star -xpz -copy-links < some-arch.tar.gz + star -xp -copy-links < some-arch.tar.gz If your platform does not support hard links but supports symbolic links, you only need to call the command above once. @@ -87,10 +93,11 @@ all needed targets. Calling 'make install' will install all needed files. - This program uses a new makefilesystem. This makefilesystem uses - techniques and ideas from the 1980s and 1990s, is designed in a - modular way and allows sources to be combined in a modular way. - For mor information on the modular features read README.SSPM. + This program uses a new makefilesystem, introduced in 1993. This + makefilesystem uses techniques and ideas from the 1980s and 1990s, + is designed in a modular way and allows sources to be combined in a + modular way. For mor information on the modular features read + README.SSPM. The makefilesystem is optimized for a program called 'smake' Copyright 1985 by Jörg Schilling, but SunPro make (the make program @@ -104,10 +111,10 @@ Finding Compilation Results: - To allow this, all binaries and results of a 'compilation' in any form - are placed in sub-directories. This includes automatically generated - include files. Results in general will be placed into - a directory named OBJ// in the current projects + To allow simultaneous compilations, all binaries and results of a + 'compilation' in any form are placed in sub-directories. This includes + automatically generated include files. Results will in general be + placed into a directory named OBJ// in the current project's leaf directory, libraries will be placed into a directory called libs// that is located in the source tree root directory. @@ -121,8 +128,10 @@ To compile a system or sub-system, simply enter 'smake', 'make' or 'Gmake'. Compilation may be initialized at any point of the source - tree of a system. If compilation is started in a sub tree, all objects - in that sub tree will be made. + tree of a system. + + WARNING: If compilation is started in a sub tree, only all objects + in that sub tree will be made. This usually excludes needed libraries. How to install results: @@ -149,14 +158,17 @@ Using a different installation directory: - If your system does not yet use the standard installation path /opt + If your system does not yet use the standard installation path in + + /opt/ + or if you don't like this installation directory, you can easily change the installation directory. You may edit the DEFAULTS file for your system and modify the macro INS_BASE. You may use a different installation directory without editing the - DEFAULTS files. If you like to install everything in /usr/local, call: - + DEFAULTS files. If you like to install everything in the deprecated path + /usr/local, the next paragraph describes the procedure. If your make program supports to propagate make macros to sub make programs which is the case for recent smake releases as well as for a recent gnumake: @@ -165,19 +177,148 @@ or gmake INS_BASE=/usr/local install - If you make program doesn't propagate make macros (e.g. SunPRO make) call: + If your make program doesn't propagate make macros (e.g. SunPRO make), + call: env INS_BASE=/usr/local make -e install + Note that INS_BASE=/usr/local needs to be specified for every operation + that compiles or links programs, as the path may be stored inside the + binaries. + + The location for the root specific configuratin files is controlled + via the INS_RBASE= make macro. The default vaulue for this macro is "/". + If you like to install global default configuration files into + /usr/local/etc instead of /etc, you need to spefify INS_RBASE=/usr/local + + Note that some binaries have $(INS_BASE) and $(INS_RBASE) compiled into. + If you like to like to modify the compiled-in path values, call: + + smake clean + smake INS_BASE=/usr/local INS_RBASE=/usr/local + + +Setting up a different Link mode: + + The following link modes are available: + + static statical linking as in historical UNIX + + dynamic dynamic linking as introduced by SunOS + in 1987, Microsoft's DLLs, ... + The knowledge on how to achieve this for + a particular platform is hidden in the + makefile system. + + profiled Linking against profiled libraries. + Profiled libraries are prepared for the + use with "gprof" (introduced by BSD in the + late 1970s). + + The makefile system sets up a default linkmode in the patform + related defaults file (typically in the file DEFAULTS/Defaults.) + in the projects root directory. This is done with the entry: + + DEFLINKMODE= + + A different linkmode may be selected at compile/link time by e.g. calling: + + smake LINKMODE=dynamic + + If there are already existing binaries, call: + + smake relink LINKMODE=dynamic + + instead. + + +Compiling a different ELF RUNPATH into the binaries: + + In order to allow binaries to work correctly even if the shared + libraries are not in the default search path of the runtime linker, + a RUNPATH needs to be set. + + The ELF RUNPATH is by default derived from $(INS_BASE). If you like to + set INS_BASE=/usr and create binaries that do not include a RUNPATH at all, + call: + + smake relink RUNPATH= + + +Using a different man path prefix: + + Manual pages are by default installed under: + + $(INS_BASE)/$(MANBASE)/man + and MANBASE=share + + If you like a different prefix for man pages, call: + + smake DEFMANBASE=something install + + to install man pages into $(INS_BASE)/something/man/* + + If you like to install man pages under $(INS_BASE)/man/*, call + + smake DEFMANBASE=. install -Using a different C-compiler: +Installing stripped binaries: - If the configured default compiler is not present on the current machine, - the makefilesystem will try an automatic fallback to GCC. For this reason - in most cases you will not need to manually select a compiler. + If you like to install stripped binaries via "smake install", call: - The default C-compiler can be modified in the files in the - DEFAULT directory. If you want to have a different compiler + smake STRIPFLAGS=-s install + + This calls "strip" on every final install path for all executable + binaries. + +Installing to a prototype directory to implement package creation staging: + + If you like to create a prototype directory tree that is used as an + intermediate store for package creation, use the DESTDIR macro: + + smake INS_BASE=/usr/local DESTDIR=/tmp install + + This will compile in "/usr/local" as prefix into all related binaries + and then create a usr/local tree below /tmp (i.e. /tmp/usr/local). + + Note that you need to call "smake clean" before in case that the code + was previously compiled with different defaults with regards to INS_BASE + +Setting different default directory permissions for install directories: + + All directories that are created by the Schily makefile system in the + target directory path when + + smake install + + is called system use a special default 022 that is in DEFINSUMASK= + This causes all directories in the target install path to be created + with 0755 permissions. + + All other directories that are created by the Schily makefile system + use a single global default 002 that is in DEFUMASK= + + If you like to create install directories with e.g. 0775 permissions, + call: + + smake DEFINSUMASK=002 install + +Using a different C compiler: + + The *compiler family* is configured via the CCOM= make macro. This + selects a whole set of related macros that are needed to support a + specific compiler family. + + The *compiler family* usually defines a C compiler and a related + C++ compiler. + + If the configured default compiler family is not present on the current + machine, the makefilesystem will try an automatic fallback to GCC. For + this reason, in most cases, you will not need to manually select a + compiler. + + The default compiler family can be modified in the files in the + DEFAULT directory. If you want to have a different compiler family for one compilation, call: make CCOM=gcc @@ -197,8 +338,8 @@ It is not clear if GCC already supports other platforms in 64 bit mode. As all GCC versions before 3.1 did emit hundreds of compilation - warnings related to 64 bit bugs when compiling itself, there is little - hope that other platforms are already supported in 64 bit mode. + warnings related to 64 bit bugs when compiling itself, so there may be + other platforms are not supported in 64 bit mode. Creating executables using the Sun Studio compiler on Linux: @@ -215,14 +356,44 @@ lines like: "#if defined(__GNUC__) && !defined(__STRICT_ANSI__)" as well as the related #endif. +Creating executables using the clang compiler: + + Simply call: + + make CCOM=clang + + And in order to intentionally create 32 bit or 64 bit binaries, call: + make CCOM=clang64 + or + make CCOM=clang64 + + +Using a different compiler binary name: + + Call: -Getting help from make: + make CC=/opt/instrumented/bin/cc + + Note that all knowledge about the options of a compiler is derived + from the CCOM= variable, so if you like to use an instrumented gcc + variant, you may like to call: + + make CCOM=gcc CC=fluffy-gcc + + You may use CC="fluffy-gcc fluffy-gcc-specific options" if you like + to enforce specific options with the compiler. See hints on cross + compilation below. + + +Getting help from the make file system: For a list of targets call: make .help + .help is a special target that prints help for the makefile system. + Getting more information on the make file system: @@ -235,7 +406,7 @@ For further information read - ftp://ftp.berlios.de/pub/makefiles/PortableSoftware.ps.gz + http://sf.net/projects/schilytools/files/makefiles/PortableSoftware.ps.gz Hints for compilation: @@ -245,7 +416,7 @@ SunPro make will work as is. GNU make need some special preparation. - Read README.gmake for more information on gmake. + Read READMEs/README.gmake for more information on gmake. To use GNU make create a file called 'Gmake' in your search path that contains: @@ -255,14 +426,14 @@ export MAKEPROG exec gmake "$@" - and call 'Gmake' instead of gmake. On Linux there is no gmake, 'make' - on Linux is really a gmake. + and call 'Gmake' instead of gmake. On Linux, there is no gmake, the + program installed as 'make' on Linux is really a gmake. 'Gmake' and 'Gmake.linux' are part of this distribution. Some versions of gmake are very buggy. There are e.g. versions of gmake on some architectures that will not correctly recognize the default - target. In this case call 'make all' or ../Gmake all'. + target. In this case, call 'make all' or '../Gmake all'. Note that pseudo error messages from gmake similar to: @@ -270,7 +441,7 @@ ../RULES/rules.cnf:58: ../incs/sparc-sunos5-cc/Inull: No such file or directory ../RULES/rules.cnf:59: ../incs/sparc-sunos5-cc/rules.cnf: No such file or directory - Are a result of a bug un GNU make. The make file system itself is + are a result of a bug in GNU make. The make file system itself is correct (as you could prove by using smake). If your gmake version still has this bug, send a bug report to: @@ -281,7 +452,7 @@ If you like to use 'smake', please always compile it from source. The packages are located on: - ftp://ftp.berlios.de/pub/smake/alpha/ + https://sourceforge.net/projects/s-make/files/alpha/ Smake has a -D flag to see the actual makefile source used and a -d flag that gives easy to read debugging info. Use smake -xM @@ -292,8 +463,8 @@ The defaults found in the directory DEFAULTS are configured to give minimum warnings. This is made because many people will - be irritated by warning messages and because the GNU c-compiler - will give warnings for perfectly correct and portable c-code. + be irritated by warning messages and because the GNU C compiler + will give warnings for perfectly correct and portable C code. If you want to port code to new platforms or do engineering on the code, you should use the alternate set of defaults found @@ -303,6 +474,19 @@ make DEFAULTSDIR=DEFAULTS_ENG + Note however, that some GCC versions print a lot of wrong warnings + in this mode. Well known problems with GCC warnings are: + + - The recursive printf format "%r" that is in use since ~ 1980 + is not supported and causes a lot of incorrect warnings as + GCC does not know that "%r" takes 2 parameters. + + - The standard C construct "(void) read(fd, buf, sizeof (buf))" + is flagged by some versions of GCC even though the void cast + is a clear expression of the fact that the return code from read + is intentionally ignored. This may cause many useless warnings + for last resort error messages used in programs. + Compiling the project to allow debugging with dbx/gdb: @@ -312,15 +496,38 @@ make clean make COPTX=-g LDOPTX=-g + If your debugger does not like optimized binaries, call something + like: + + make "COPTX=-g -xO0" LDOPTX=-g + or + make "COPTX=-g -O0" LDOPTX=-g + + depending on the option system used by your C compiler. + + +Compiling the project to allow performance monitoring with gprof from BSD: + + If you like to compile for performance monitoriing with gprof, + call: + + make clean + make COPTX=-xpg LDOPTX=-xpg LINKMODE=profiled + + or + make COPTX=-pg LDOPTX=-pg LINKMODE=profiled -Creting Blastwave packages: + depending on the option system used by your C compiler. + + +Creating Blastwave packages: Call: .clean smake -f Mcsw You need the program "fakeroot" and will find the results - in packages/ + in packages/. Note that a single program source tree will allow you to create packages like CSWstar but not the packages CSWschilybase and @@ -332,7 +539,7 @@ If you want to see an example, please have a look at the "star" source. It may be found on: - ftp://ftp.berlios.de/pub/star + http://sourceforge.net/projects/s-tar/files/ Have a look at the manual page, it is included in the distribution. Install the manual page with @@ -345,6 +552,205 @@ man -F +Compiling in a cross compilation environment: + + The Schily autoconf system has been enhanced to support cross + compilation. Schily autoconf is based on GNU autoconf-2.13 and + GNU autoconf does not support cross compilation because it needs + to run scripts on the target system for some of the tests. + + The "configure" script that is delivered with the Schily makefile + system runs more than 770 tests and aprox 70 of them need to be + run on the target system. + + The Schily autoconf system now supports a method to run these ~70 + tests natively on a target system. You either need a target machine + with remote login features or you need an emulator with a method to + copy files into the emulated system and to run binaries on the + emulated system as e.g. the Android emulator. + + We currently deliver three scripts for "remote" execution of + programs on the target system: + + runrmt_ssh runs the commands remove via ssh + runrmt_rsh runs the commands remove via rsh + runrmt_android runs the commands remove via the debug bridge + + If you need to remotely run programs on a system that is not + supported by one of there three scripts, you need to modify one + of them to match your needs. + + To enable Cross Compilation use the following environment variables: + + CONFIG_RMTCALL= Set up to point to a script that does + the remote execution, e.g.: + + CONFIG_RMTCALL=`pwd`/conf/runrmt_ssh + + CONFIG_RMTHOST= Set up to point to your remote host, e.g.: + + CONFIG_RMTHOST=hostname + or + CONFIG_RMTHOST=user@hostname + + use a dummy if you like to use something + like the Android emulator. + + CONFIG_RMTDEBUG= Set to something non-null in order to + let the remote execution script mark + remote comands. This will result in + configure messages like: + + checking bits in minor device number... REMOTE 8 + + If you cannot run commands on the target + platform, you may set: + + CONFIG_RMTDEBUG=true + CONFIG_RMTCALL=: + + carefully watch for the "REMOTE" flagged test + output and later manually edit the file: + + incs//xconfig.h + + Do not forget to manually edit the files: + + incs//align.h + and + incs//avoffset.h + + Note that smake includes automake features that automatically + retrieve system ID information. For this reason, you need to overwrite + related macros from the command line if you like to do a + cross compilation. + + Related make macros: + + K_ARCH= # (sun4v) Kernel ARCH filled from uname -m / arch -k + M_ARCH= # (sun4) Machine filled from arch + P_ARCH= # (sparc) CPU ARCH filled from uname -p / mach + OSNAME= # sunos, linux, .... + OSREL= # 5.11 + OSVERSION= # snv_130 + CCOM= # generic compiler name (e.g. "gcc") + CC= # compiler to call (name for binary) + CC_COM= # compiler to call (name + basic args) + + ARCH= overwrites M_ARCH and P_ARCH + + It is usually suffucient to set ARCH and OSNAME. + + In order to use a cross compiler environment instead of a native compiler, + set the make macro CC_COM or CC to something different than "cc". + + If you are on Linux and like to compile for Android, do the following: + + 1) set up CC acording to the instructions from the cross compiler + tool chain. Important: you need to read the information for your + tool chain. A working setup may look similar to: + + NDK=/home/joerg/android-ndk-r7 + SYSROOT=\$NDK/platforms/android-14/arch-arm + CC="\$NDK/toolchains/arm-linux-androideabi-4.4.3/prebuilt/linux-x86/bin/arm-linux-androideabi-gcc --sysroot=\$SYSROOT" + export NDK + export SYSROOT + export CC + + + 2) set environment variables CONFIG_RMTCALL / CONFIG_RMTHOST, e.g.: + setenv CONFIG_RMTCALL `pwd`/conf/runrmt_android + setenv CONFIG_RMTHOST NONE + + 3) call smake: + + smake ARCH=armv5 OSNAME=linux CCOM=gcc "CC_COM=$CC" + + or + + smake ARCH=armv5 OSNAME=linux CCOM=gcc "CC=$CC" + + +Compiling with the address sanitizer: + + Be careful with a compiler enhancement called "addess sanitizer". + + First a note: the address sanitizer needs a lot of memory when in + 64-bit mode. For this reason, it is recommended to run the tests + in 32-bit mode as it may be impossible to provdie a sufficient amount + of memory for the 64-bit mode. + + 1) The address sanitizer may cause autoconf to behave incorrectly in + case that the compiler options used by the "configure" run include the + address sanitizer. It seems that in addition, the address sanitizer + adds more libraries to the link list and as a result prevents + the correct autoconf decision on whether a specific library from + a "configure" test is needed by some binaries. + + If you are not sure about the current state of the source tree, start + with calling: + + ./.clean + + in the top level source directory. This makes the source tree to behave + as if if was recently unpacked from the tar archive. + + Then run run e.g.: + + cd inc/ + smake CCOM=gcc32 + cd .. + + to prepare the auto-configuration without using the address sanitizer. + This special treatment is needed as the assumptions in the address + sanitizer would not allow us to run the autoconfiguration code + correctly. + + 2) The address sanitizer by default ignores installed SIGSEGV handlers + and thus ignores the intention of the author of the code. + + The correct behavior may be switched on via setting the environment + variable: + + ASAN_OPTIONS=allow_user_segv_handler=true + + As a redult, the command line to compile the code after the + auto-configuration has been done as mentioned above is: + + ASAN_OPTIONS=allow_user_segv_handler=true smake CCOM=gcc32 COPTX="-g -O0 -fsanitize=address" LDOPTX="-g -fsanitize=address" + + 3) If you are on Linux, do not forget to call "ulimit -c unlimited", + before calling the binary. This is needed as the default on Linux is + not to create a core file. + + 4) Set the environment ASAN_OPTIONS= for the execution of the binary + to control the behavior of the Address Sanitizer while the binary + is run. + + If you like to disable the memory leak detection because your program + is a short running program that intentionally does not free() resources + before calling exit(), use: + + ASAN_OPTIONS=allow_user_segv_handler=true:detect_leaks=0 + + If you also like to get a core dump on error to debug, you may like + to use: + + ASAN_OPTIONS=allow_user_segv_handler=true:detect_leaks=0:abort_on_error=1 + + Note that the Address Sanitizer disables the creation of a core file + for 64 bit binaries as the tables used by the Address Sanitizer may + cause the core file to have a size of 16 TB. + + +Compiling with the "Americal fuzzy lop": + + Follow the instruction from above for the address sanitizer, but + use this command line to call the compiler: + + ASAN_OPTIONS=allow_user_segv_handler=true AFL_HARDEN=1 AFL_USE_ASAN=1 smake CC=afl-gcc CCOM=gcc32 + + Author: Joerg Schilling @@ -353,6 +759,6 @@ Germany Email: joerg@schily.isdn.cs.tu-berlin.de, js@cs.tu-berlin.de - schilling@fokus.fhg.de + joerg.schilling@fokus.fraunhofer.de Please mail bugs and suggestions to me. diff -Nru cdrtools-2.01.01a33/cdda2wav/acgeneral.m4 cdrtools-3.02a09/cdda2wav/acgeneral.m4 --- cdrtools-2.01.01a33/cdda2wav/acgeneral.m4 2007-04-20 11:04:49.000000000 +0000 +++ cdrtools-3.02a09/cdda2wav/acgeneral.m4 1970-01-01 00:00:00.000000000 +0000 @@ -1,2612 +0,0 @@ -dnl Parameterized macros. -dnl Requires GNU m4. -dnl This file is part of Autoconf. -dnl Copyright (C) 1992, 93, 94, 95, 96, 1998 Free Software Foundation, Inc. -dnl -dnl This program is free software; you can redistribute it and/or modify -dnl it under the terms of the GNU General Public License as published by -dnl the Free Software Foundation; either version 2, or (at your option) -dnl any later version. -dnl -dnl This program is distributed in the hope that it will be useful, -dnl but WITHOUT ANY WARRANTY; without even the implied warranty of -dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -dnl GNU General Public License for more details. -dnl -dnl You should have received a copy of the GNU General Public License -dnl along with this program; if not, write to the Free Software -dnl Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA -dnl 02111-1307, USA. -dnl -dnl As a special exception, the Free Software Foundation gives unlimited -dnl permission to copy, distribute and modify the configure scripts that -dnl are the output of Autoconf. You need not follow the terms of the GNU -dnl General Public License when using or distributing such scripts, even -dnl though portions of the text of Autoconf appear in them. The GNU -dnl General Public License (GPL) does govern all other use of the material -dnl that constitutes the Autoconf program. -dnl -dnl Certain portions of the Autoconf source text are designed to be copied -dnl (in certain cases, depending on the input) into the output of -dnl Autoconf. We call these the "data" portions. The rest of the Autoconf -dnl source text consists of comments plus executable code that decides which -dnl of the data portions to output in any given case. We call these -dnl comments and executable code the "non-data" portions. Autoconf never -dnl copies any of the non-data portions into its output. -dnl -dnl This special exception to the GPL applies to versions of Autoconf -dnl released by the Free Software Foundation. When you make and -dnl distribute a modified version of Autoconf, you may extend this special -dnl exception to the GPL to apply to your modified version as well, *unless* -dnl your modified version has the potential to copy into its output some -dnl of the text that was the non-data portion of the version that you started -dnl with. (In other words, unless your change moves or copies text from -dnl the non-data portions to the data portions.) If your modification has -dnl such potential, you must delete any notice of this special exception -dnl to the GPL from your modified version. -dnl -dnl Written by David MacKenzie, with help from -dnl Franc,ois Pinard, Karl Berry, Richard Pixley, Ian Lance Taylor, -dnl Roland McGrath, Noah Friedman, david d zuhn, and many others. -dnl -divert(-1)dnl Throw away output until AC_INIT is called. -changequote([, ]) - -define(AC_ACVERSION, 2.13) - -dnl Some old m4's don't support m4exit. But they provide -dnl equivalent functionality by core dumping because of the -dnl long macros we define. -ifdef([__gnu__], , [errprint(Autoconf requires GNU m4. -Install it before installing Autoconf or set the -M4 environment variable to its path name. -)m4exit(2)]) - -undefine([eval]) -undefine([include]) -undefine([shift]) -undefine([format]) - - -dnl ### Defining macros - - -dnl m4 output diversions. We let m4 output them all in order at the end, -dnl except that we explicitly undivert AC_DIVERSION_SED, AC_DIVERSION_CMDS, -dnl and AC_DIVERSION_ICMDS. - -dnl AC_DIVERSION_NOTICE - 1 (= 0) AC_REQUIRE'd #! /bin/sh line -define(AC_DIVERSION_NOTICE, 1)dnl copyright notice & option help strings -define(AC_DIVERSION_INIT, 2)dnl initialization code -define(AC_DIVERSION_NORMAL_4, 3)dnl AC_REQUIRE'd code, 4 level deep -define(AC_DIVERSION_NORMAL_3, 4)dnl AC_REQUIRE'd code, 3 level deep -define(AC_DIVERSION_NORMAL_2, 5)dnl AC_REQUIRE'd code, 2 level deep -define(AC_DIVERSION_NORMAL_1, 6)dnl AC_REQUIRE'd code, 1 level deep -define(AC_DIVERSION_NORMAL, 7)dnl the tests and output code -define(AC_DIVERSION_SED, 8)dnl variable substitutions in config.status -define(AC_DIVERSION_CMDS, 9)dnl extra shell commands in config.status -define(AC_DIVERSION_ICMDS, 10)dnl extra initialization in config.status - -dnl Change the diversion stream to STREAM, while stacking old values. -dnl AC_DIVERT_PUSH(STREAM) -define(AC_DIVERT_PUSH, -[pushdef([AC_DIVERSION_CURRENT], $1)dnl -divert(AC_DIVERSION_CURRENT)dnl -]) - -dnl Change the diversion stream to its previous value, unstacking it. -dnl AC_DIVERT_POP() -define(AC_DIVERT_POP, -[popdef([AC_DIVERSION_CURRENT])dnl -divert(AC_DIVERSION_CURRENT)dnl -]) - -dnl Initialize the diversion setup. -define([AC_DIVERSION_CURRENT], AC_DIVERSION_NORMAL) -dnl This will be popped by AC_REQUIRE in AC_INIT. -pushdef([AC_DIVERSION_CURRENT], AC_DIVERSION_NOTICE) - -dnl The prologue for Autoconf macros. -dnl AC_PRO(MACRO-NAME) -define(AC_PRO, -[define([AC_PROVIDE_$1], )dnl -ifelse(AC_DIVERSION_CURRENT, AC_DIVERSION_NORMAL, -[AC_DIVERT_PUSH(builtin(eval, AC_DIVERSION_CURRENT - 1))], -[pushdef([AC_DIVERSION_CURRENT], AC_DIVERSION_CURRENT)])dnl -]) - -dnl The Epilogue for Autoconf macros. -dnl AC_EPI() -define(AC_EPI, -[AC_DIVERT_POP()dnl -ifelse(AC_DIVERSION_CURRENT, AC_DIVERSION_NORMAL, -[undivert(AC_DIVERSION_NORMAL_4)dnl -undivert(AC_DIVERSION_NORMAL_3)dnl -undivert(AC_DIVERSION_NORMAL_2)dnl -undivert(AC_DIVERSION_NORMAL_1)dnl -])dnl -]) - -dnl Define a macro which automatically provides itself. Add machinery -dnl so the macro automatically switches expansion to the diversion -dnl stack if it is not already using it. In this case, once finished, -dnl it will bring back all the code accumulated in the diversion stack. -dnl This, combined with AC_REQUIRE, achieves the topological ordering of -dnl macros. We don't use this macro to define some frequently called -dnl macros that are not involved in ordering constraints, to save m4 -dnl processing. -dnl AC_DEFUN(NAME, EXPANSION) -define([AC_DEFUN], -[define($1, [AC_PRO([$1])$2[]AC_EPI()])]) - - -dnl ### Initialization - - -dnl AC_INIT_NOTICE() -AC_DEFUN(AC_INIT_NOTICE, -[# Guess values for system-dependent variables and create Makefiles. -# Generated automatically using autoconf version] AC_ACVERSION [ -# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc. -# -# This configure script is free software; the Free Software Foundation -# gives unlimited permission to copy, distribute and modify it. - -# Defaults: -ac_help= -ac_default_prefix=/usr/local -[#] Any additions from configure.in:]) - -dnl AC_PREFIX_DEFAULT(PREFIX) -AC_DEFUN(AC_PREFIX_DEFAULT, -[AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)dnl -ac_default_prefix=$1 -AC_DIVERT_POP()]) - -dnl AC_INIT_PARSE_ARGS() -AC_DEFUN(AC_INIT_PARSE_ARGS, -[ -# Initialize some variables set by options. -# The variables have the same names as the options, with -# dashes changed to underlines. -build=NONE -cache_file=./config.cache -exec_prefix=NONE -host=NONE -no_create= -nonopt=NONE -no_recursion= -prefix=NONE -program_prefix=NONE -program_suffix=NONE -program_transform_name=s,x,x, -silent= -site= -srcdir= -target=NONE -verbose= -x_includes=NONE -x_libraries=NONE -dnl Installation directory options. -dnl These are left unexpanded so users can "make install exec_prefix=/foo" -dnl and all the variables that are supposed to be based on exec_prefix -dnl by default will actually change. -dnl Use braces instead of parens because sh, perl, etc. also accept them. -bindir='${exec_prefix}/bin' -sbindir='${exec_prefix}/sbin' -libexecdir='${exec_prefix}/libexec' -datadir='${prefix}/share' -sysconfdir='${prefix}/etc' -sharedstatedir='${prefix}/com' -localstatedir='${prefix}/var' -libdir='${exec_prefix}/lib' -includedir='${prefix}/include' -oldincludedir='/usr/include' -infodir='${prefix}/info' -mandir='${prefix}/man' - -# Initialize some other variables. -subdirs= -MFLAGS= MAKEFLAGS= -SHELL=${CONFIG_SHELL-/bin/sh} -# Maximum number of lines to put in a shell here document. -ac_max_here_lines=12 - -ac_prev= -for ac_option -do - - # If the previous option needs an argument, assign it. - if test -n "$ac_prev"; then - eval "$ac_prev=\$ac_option" - ac_prev= - continue - fi - - case "$ac_option" in -changequote(, )dnl - -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;; -changequote([, ])dnl - *) ac_optarg= ;; - esac - - # Accept the important Cygnus configure options, so we can diagnose typos. - - case "$ac_option" in - - -bindir | --bindir | --bindi | --bind | --bin | --bi) - ac_prev=bindir ;; - -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) - bindir="$ac_optarg" ;; - - -build | --build | --buil | --bui | --bu) - ac_prev=build ;; - -build=* | --build=* | --buil=* | --bui=* | --bu=*) - build="$ac_optarg" ;; - - -cache-file | --cache-file | --cache-fil | --cache-fi \ - | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) - ac_prev=cache_file ;; - -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ - | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) - cache_file="$ac_optarg" ;; - - -cc=* | --cc=* ) - CC="$ac_optarg" ; echo using $CC as compiler ;; - - -datadir | --datadir | --datadi | --datad | --data | --dat | --da) - ac_prev=datadir ;; - -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \ - | --da=*) - datadir="$ac_optarg" ;; - - -disable-* | --disable-*) - ac_feature=`echo $ac_option|sed -e 's/-*disable-//'` - # Reject names that are not valid shell variable names. -changequote(, )dnl - if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then -changequote([, ])dnl - AC_MSG_ERROR($ac_feature: invalid feature name) - fi - ac_feature=`echo $ac_feature| sed 's/-/_/g'` - eval "enable_${ac_feature}=no" ;; - - -enable-* | --enable-*) - ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'` - # Reject names that are not valid shell variable names. -changequote(, )dnl - if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then -changequote([, ])dnl - AC_MSG_ERROR($ac_feature: invalid feature name) - fi - ac_feature=`echo $ac_feature| sed 's/-/_/g'` - case "$ac_option" in - *=*) ;; - *) ac_optarg=yes ;; - esac - eval "enable_${ac_feature}='$ac_optarg'" ;; - - -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ - | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ - | --exec | --exe | --ex) - ac_prev=exec_prefix ;; - -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ - | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ - | --exec=* | --exe=* | --ex=*) - exec_prefix="$ac_optarg" ;; - - -gas | --gas | --ga | --g) - # Obsolete; use --with-gas. - with_gas=yes ;; - - -help | --help | --hel | --he) - # Omit some internal or obsolete options to make the list less imposing. - # This message is too long to be a string in the A/UX 3.1 sh. - cat << EOF -changequote(, )dnl -Usage: configure [options] [host] -Options: [defaults in brackets after descriptions] -Configuration: - --cache-file=FILE cache test results in FILE - --help print this message - --no-create do not create output files - --quiet, --silent do not print \`checking...' messages - --version print the version of autoconf that created configure -Directory and file names: - --prefix=PREFIX install architecture-independent files in PREFIX - [$ac_default_prefix] - --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX - [same as prefix] - --bindir=DIR user executables in DIR [EPREFIX/bin] - --sbindir=DIR system admin executables in DIR [EPREFIX/sbin] - --libexecdir=DIR program executables in DIR [EPREFIX/libexec] - --datadir=DIR read-only architecture-independent data in DIR - [PREFIX/share] - --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc] - --sharedstatedir=DIR modifiable architecture-independent data in DIR - [PREFIX/com] - --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var] - --libdir=DIR object code libraries in DIR [EPREFIX/lib] - --includedir=DIR C header files in DIR [PREFIX/include] - --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include] - --infodir=DIR info documentation in DIR [PREFIX/info] - --mandir=DIR man documentation in DIR [PREFIX/man] - --srcdir=DIR find the sources in DIR [configure dir or ..] - --program-prefix=PREFIX prepend PREFIX to installed program names - --program-suffix=SUFFIX append SUFFIX to installed program names - --program-transform-name=PROGRAM - run sed PROGRAM on installed program names -EOF - cat << EOF -Host type: - --build=BUILD configure for building on BUILD [BUILD=HOST] - --host=HOST configure for HOST [guessed] - --target=TARGET configure for TARGET [TARGET=HOST] -Features and packages: - --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) - --enable-FEATURE[=ARG] include FEATURE [ARG=yes] - --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] - --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) - --x-includes=DIR X include files are in DIR - --x-libraries=DIR X library files are in DIR -changequote([, ])dnl -EOF - if test -n "$ac_help"; then - echo "--enable and --with options recognized:$ac_help" - fi - exit 0 ;; - - -host | --host | --hos | --ho) - ac_prev=host ;; - -host=* | --host=* | --hos=* | --ho=*) - host="$ac_optarg" ;; - - -includedir | --includedir | --includedi | --included | --include \ - | --includ | --inclu | --incl | --inc) - ac_prev=includedir ;; - -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ - | --includ=* | --inclu=* | --incl=* | --inc=*) - includedir="$ac_optarg" ;; - - -infodir | --infodir | --infodi | --infod | --info | --inf) - ac_prev=infodir ;; - -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) - infodir="$ac_optarg" ;; - - -libdir | --libdir | --libdi | --libd) - ac_prev=libdir ;; - -libdir=* | --libdir=* | --libdi=* | --libd=*) - libdir="$ac_optarg" ;; - - -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ - | --libexe | --libex | --libe) - ac_prev=libexecdir ;; - -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ - | --libexe=* | --libex=* | --libe=*) - libexecdir="$ac_optarg" ;; - - -localstatedir | --localstatedir | --localstatedi | --localstated \ - | --localstate | --localstat | --localsta | --localst \ - | --locals | --local | --loca | --loc | --lo) - ac_prev=localstatedir ;; - -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ - | --localstate=* | --localstat=* | --localsta=* | --localst=* \ - | --locals=* | --local=* | --loca=* | --loc=* | --lo=*) - localstatedir="$ac_optarg" ;; - - -mandir | --mandir | --mandi | --mand | --man | --ma | --m) - ac_prev=mandir ;; - -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) - mandir="$ac_optarg" ;; - - -nfp | --nfp | --nf) - # Obsolete; use --without-fp. - with_fp=no ;; - - -no-create | --no-create | --no-creat | --no-crea | --no-cre \ - | --no-cr | --no-c) - no_create=yes ;; - - -no-recursion | --no-recursion | --no-recursio | --no-recursi \ - | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) - no_recursion=yes ;; - - -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ - | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ - | --oldin | --oldi | --old | --ol | --o) - ac_prev=oldincludedir ;; - -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ - | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ - | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) - oldincludedir="$ac_optarg" ;; - - -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) - ac_prev=prefix ;; - -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) - prefix="$ac_optarg" ;; - - -program-prefix | --program-prefix | --program-prefi | --program-pref \ - | --program-pre | --program-pr | --program-p) - ac_prev=program_prefix ;; - -program-prefix=* | --program-prefix=* | --program-prefi=* \ - | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) - program_prefix="$ac_optarg" ;; - - -program-suffix | --program-suffix | --program-suffi | --program-suff \ - | --program-suf | --program-su | --program-s) - ac_prev=program_suffix ;; - -program-suffix=* | --program-suffix=* | --program-suffi=* \ - | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) - program_suffix="$ac_optarg" ;; - - -program-transform-name | --program-transform-name \ - | --program-transform-nam | --program-transform-na \ - | --program-transform-n | --program-transform- \ - | --program-transform | --program-transfor \ - | --program-transfo | --program-transf \ - | --program-trans | --program-tran \ - | --progr-tra | --program-tr | --program-t) - ac_prev=program_transform_name ;; - -program-transform-name=* | --program-transform-name=* \ - | --program-transform-nam=* | --program-transform-na=* \ - | --program-transform-n=* | --program-transform-=* \ - | --program-transform=* | --program-transfor=* \ - | --program-transfo=* | --program-transf=* \ - | --program-trans=* | --program-tran=* \ - | --progr-tra=* | --program-tr=* | --program-t=*) - program_transform_name="$ac_optarg" ;; - - -q | -quiet | --quiet | --quie | --qui | --qu | --q \ - | -silent | --silent | --silen | --sile | --sil) - silent=yes ;; - - -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) - ac_prev=sbindir ;; - -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ - | --sbi=* | --sb=*) - sbindir="$ac_optarg" ;; - - -sharedstatedir | --sharedstatedir | --sharedstatedi \ - | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ - | --sharedst | --shareds | --shared | --share | --shar \ - | --sha | --sh) - ac_prev=sharedstatedir ;; - -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ - | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ - | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ - | --sha=* | --sh=*) - sharedstatedir="$ac_optarg" ;; - - -site | --site | --sit) - ac_prev=site ;; - -site=* | --site=* | --sit=*) - site="$ac_optarg" ;; - - -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) - ac_prev=srcdir ;; - -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) - srcdir="$ac_optarg" ;; - - -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ - | --syscon | --sysco | --sysc | --sys | --sy) - ac_prev=sysconfdir ;; - -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ - | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) - sysconfdir="$ac_optarg" ;; - - -target | --target | --targe | --targ | --tar | --ta | --t) - ac_prev=target ;; - -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) - target="$ac_optarg" ;; - - -v | -verbose | --verbose | --verbos | --verbo | --verb) - verbose=yes ;; - - -version | --version | --versio | --versi | --vers) - echo "configure generated by autoconf version AC_ACVERSION" - exit 0 ;; - - -with-* | --with-*) - ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'` - # Reject names that are not valid shell variable names. -changequote(, )dnl - if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then -changequote([, ])dnl - AC_MSG_ERROR($ac_package: invalid package name) - fi - ac_package=`echo $ac_package| sed 's/-/_/g'` - case "$ac_option" in - *=*) ;; - *) ac_optarg=yes ;; - esac - eval "with_${ac_package}='$ac_optarg'" ;; - - -without-* | --without-*) - ac_package=`echo $ac_option|sed -e 's/-*without-//'` - # Reject names that are not valid shell variable names. -changequote(, )dnl - if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then -changequote([, ])dnl - AC_MSG_ERROR($ac_package: invalid package name) - fi - ac_package=`echo $ac_package| sed 's/-/_/g'` - eval "with_${ac_package}=no" ;; - - --x) - # Obsolete; use --with-x. - with_x=yes ;; - - -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ - | --x-incl | --x-inc | --x-in | --x-i) - ac_prev=x_includes ;; - -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ - | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) - x_includes="$ac_optarg" ;; - - -x-libraries | --x-libraries | --x-librarie | --x-librari \ - | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) - ac_prev=x_libraries ;; - -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ - | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) - x_libraries="$ac_optarg" ;; - - -*) AC_MSG_ERROR([$ac_option: invalid option; use --help to show usage]) - ;; - - *) -changequote(, )dnl - if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then -changequote([, ])dnl - AC_MSG_WARN($ac_option: invalid host type) - fi - if test "x$nonopt" != xNONE; then - AC_MSG_ERROR(can only configure for one host and one target at a time) - fi - nonopt="$ac_option" - ;; - - esac -done - -if test -n "$ac_prev"; then - AC_MSG_ERROR(missing argument to --`echo $ac_prev | sed 's/_/-/g'`) -fi -]) - -dnl Try to have only one #! line, so the script doesn't look funny -dnl for users of AC_REVISION. -dnl AC_INIT_BINSH() -AC_DEFUN(AC_INIT_BINSH, -[#! /bin/sh -]) - -dnl AC_INIT(UNIQUE-FILE-IN-SOURCE-DIR) -AC_DEFUN(AC_INIT, -[sinclude(acsite.m4)dnl -sinclude(./aclocal.m4)dnl -AC_REQUIRE([AC_INIT_BINSH])dnl -AC_INIT_NOTICE -AC_DIVERT_POP()dnl to NORMAL -AC_DIVERT_PUSH(AC_DIVERSION_INIT)dnl -AC_INIT_PARSE_ARGS -AC_INIT_PREPARE($1)dnl -AC_DIVERT_POP()dnl to NORMAL -]) - -dnl AC_INIT_PREPARE(UNIQUE-FILE-IN-SOURCE-DIR) -AC_DEFUN(AC_INIT_PREPARE, -[trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15 - -# File descriptor usage: -# 0 standard input -# 1 file creation -# 2 errors and warnings -# 3 some systems may open it to /dev/tty -# 4 used on the Kubota Titan -define(AC_FD_MSG, 6)dnl -[#] AC_FD_MSG checking for... messages and results -define(AC_FD_CC, 5)dnl -[#] AC_FD_CC compiler messages saved in config.log -if test "$silent" = yes; then - exec AC_FD_MSG>/dev/null -else - exec AC_FD_MSG>&1 -fi -exec AC_FD_CC>./config.log - -echo "\ -This file contains any messages produced by compilers while -running configure, to aid debugging if configure makes a mistake. -" 1>&AC_FD_CC - -# Strip out --no-create and --no-recursion so they do not pile up. -# Also quote any args containing shell metacharacters. -ac_configure_args= -for ac_arg -do - case "$ac_arg" in - -no-create | --no-create | --no-creat | --no-crea | --no-cre \ - | --no-cr | --no-c) ;; - -no-recursion | --no-recursion | --no-recursio | --no-recursi \ - | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;; -changequote(<<, >>)dnl -dnl If you change this globbing pattern, test it on an old shell -- -dnl it's sensitive. Putting any kind of quote in it causes syntax errors. - *" "*|*" "*|*[\[\]\~\<<#>>\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*) - ac_configure_args="$ac_configure_args '$ac_arg'" ;; -changequote([, ])dnl - *) ac_configure_args="$ac_configure_args $ac_arg" ;; - esac -done - -# NLS nuisances. -# Only set these to C if already set. These must not be set unconditionally -# because not all systems understand e.g. LANG=C (notably SCO). -# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'! -# Non-C LC_CTYPE values break the ctype check. -if test "${LANG+set}" = set; then LANG=C; export LANG; fi -if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi -if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi -if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi - -# confdefs.h avoids OS command line length limits that DEFS can exceed. -rm -rf conftest* confdefs.h -# AIX cpp loses on an empty file, so make sure it contains at least a newline. -echo > confdefs.h - -# A filename unique to this package, relative to the directory that -# configure is in, which we can look for to find out if srcdir is correct. -ac_unique_file=$1 - -# Find the source files, if location was not specified. -if test -z "$srcdir"; then - ac_srcdir_defaulted=yes - # Try the directory containing this script, then its parent. - ac_prog=[$]0 -changequote(, )dnl - ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'` -changequote([, ])dnl - test "x$ac_confdir" = "x$ac_prog" && ac_confdir=. - srcdir=$ac_confdir - if test ! -r $srcdir/$ac_unique_file; then - srcdir=.. - fi -else - ac_srcdir_defaulted=no -fi -if test ! -r $srcdir/$ac_unique_file; then - if test "$ac_srcdir_defaulted" = yes; then - AC_MSG_ERROR(can not find sources in $ac_confdir or ..) - else - AC_MSG_ERROR(can not find sources in $srcdir) - fi -fi -dnl Double slashes in pathnames in object file debugging info -dnl mess up M-x gdb in Emacs. -changequote(, )dnl -srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'` -changequote([, ])dnl - -dnl Let the site file select an alternate cache file if it wants to. -AC_SITE_LOAD -AC_CACHE_LOAD -AC_LANG_C -dnl By default always use an empty string as the executable -dnl extension. Only change it if the script calls AC_EXEEXT. -ac_exeext= -ac_xexeext= -dnl By default assume that objects files use an extension of .o. Only -dnl change it if the script calls AC_OBJEXT. -ac_objext=o -AC_PROG_ECHO_N -dnl Substitute for predefined variables. -AC_SUBST(SHELL)dnl -AC_SUBST(CFLAGS)dnl -AC_SUBST(CPPFLAGS)dnl -AC_SUBST(CXXFLAGS)dnl -AC_SUBST(FFLAGS)dnl -AC_SUBST(DEFS)dnl -AC_SUBST(LDFLAGS)dnl -AC_SUBST(LIBS)dnl -AC_SUBST(exec_prefix)dnl -AC_SUBST(prefix)dnl -AC_SUBST(program_transform_name)dnl -dnl Installation directory options. -AC_SUBST(bindir)dnl -AC_SUBST(sbindir)dnl -AC_SUBST(libexecdir)dnl -AC_SUBST(datadir)dnl -AC_SUBST(sysconfdir)dnl -AC_SUBST(sharedstatedir)dnl -AC_SUBST(localstatedir)dnl -AC_SUBST(libdir)dnl -AC_SUBST(includedir)dnl -AC_SUBST(oldincludedir)dnl -AC_SUBST(infodir)dnl -AC_SUBST(mandir)dnl -]) - - -dnl ### Selecting optional features - - -dnl AC_ARG_ENABLE(FEATURE, HELP-STRING, ACTION-IF-TRUE [, ACTION-IF-FALSE]) -AC_DEFUN(AC_ARG_ENABLE, -[AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)dnl -ac_help="$ac_help -[$2]" -AC_DIVERT_POP()dnl -[#] Check whether --enable-[$1] or --disable-[$1] was given. -if test "[${enable_]patsubst([$1], -, _)+set}" = set; then - enableval="[$enable_]patsubst([$1], -, _)" - ifelse([$3], , :, [$3]) -ifelse([$4], , , [else - $4 -])dnl -fi -]) - -AC_DEFUN(AC_ENABLE, -[AC_OBSOLETE([$0], [; instead use AC_ARG_ENABLE])dnl -AC_ARG_ENABLE([$1], [ --enable-$1], [$2], [$3])dnl -]) - - -dnl ### Working with optional software - - -dnl AC_ARG_WITH(PACKAGE, HELP-STRING, ACTION-IF-TRUE [, ACTION-IF-FALSE]) -AC_DEFUN(AC_ARG_WITH, -[AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)dnl -ac_help="$ac_help -[$2]" -AC_DIVERT_POP()dnl -[#] Check whether --with-[$1] or --without-[$1] was given. -if test "[${with_]patsubst([$1], -, _)+set}" = set; then - withval="[$with_]patsubst([$1], -, _)" - ifelse([$3], , :, [$3]) -ifelse([$4], , , [else - $4 -])dnl -fi -]) - -AC_DEFUN(AC_WITH, -[AC_OBSOLETE([$0], [; instead use AC_ARG_WITH])dnl -AC_ARG_WITH([$1], [ --with-$1], [$2], [$3])dnl -]) - - -dnl ### Transforming program names. - - -dnl AC_ARG_PROGRAM() -AC_DEFUN(AC_ARG_PROGRAM, -[if test "$program_transform_name" = s,x,x,; then - program_transform_name= -else - # Double any \ or $. echo might interpret backslashes. - cat <<\EOF_SED > conftestsed -s,\\,\\\\,g; s,\$,$$,g -EOF_SED - program_transform_name="`echo $program_transform_name|sed -f conftestsed`" - rm -f conftestsed -fi -test "$program_prefix" != NONE && - program_transform_name="s,^,${program_prefix},; $program_transform_name" -# Use a double $ so make ignores it. -test "$program_suffix" != NONE && - program_transform_name="s,\$\$,${program_suffix},; $program_transform_name" - -# sed with no file args requires a program. -test "$program_transform_name" = "" && program_transform_name="s,x,x," -]) - - -dnl ### Version numbers - - -dnl AC_REVISION(REVISION-INFO) -AC_DEFUN(AC_REVISION, -[AC_REQUIRE([AC_INIT_BINSH])dnl -[# From configure.in] translit([$1], $")]) - -dnl Subroutines of AC_PREREQ. - -dnl Change the dots in NUMBER into commas. -dnl AC_PREREQ_SPLIT(NUMBER) -define(AC_PREREQ_SPLIT, -[translit($1, ., [, ])]) - -dnl Default the ternary version number to 0 (e.g., 1, 7 -> 1, 7, 0). -dnl AC_PREREQ_CANON(MAJOR, MINOR [,TERNARY]) -define(AC_PREREQ_CANON, -[$1, $2, ifelse([$3], , 0, [$3])]) - -dnl Complain and exit if version number 1 is less than version number 2. -dnl PRINTABLE2 is the printable version of version number 2. -dnl AC_PREREQ_COMPARE(MAJOR1, MINOR1, TERNARY1, MAJOR2, MINOR2, TERNARY2, -dnl PRINTABLE2) -define(AC_PREREQ_COMPARE, -[ifelse(builtin([eval], -[$3 + $2 * 1000 + $1 * 1000000 < $6 + $5 * 1000 + $4 * 1000000]), 1, -[errprint(dnl -FATAL ERROR: Autoconf version $7 or higher is required for this script -)m4exit(3)])]) - -dnl Complain and exit if the Autoconf version is less than VERSION. -dnl AC_PREREQ(VERSION) -define(AC_PREREQ, -[AC_PREREQ_COMPARE(AC_PREREQ_CANON(AC_PREREQ_SPLIT(AC_ACVERSION)), -AC_PREREQ_CANON(AC_PREREQ_SPLIT([$1])), [$1])]) - - -dnl ### Getting the canonical system type - - -dnl Find install-sh, config.sub, config.guess, and Cygnus configure -dnl in directory DIR. These are auxiliary files used in configuration. -dnl DIR can be either absolute or relative to $srcdir. -dnl AC_CONFIG_AUX_DIR(DIR) -AC_DEFUN(AC_CONFIG_AUX_DIR, -[AC_CONFIG_AUX_DIRS($1 $srcdir/$1)]) - -dnl The default is `$srcdir' or `$srcdir/..' or `$srcdir/../..'. -dnl There's no need to call this macro explicitly; just AC_REQUIRE it. -AC_DEFUN(AC_CONFIG_AUX_DIR_DEFAULT, -[AC_CONFIG_AUX_DIRS($srcdir $srcdir/.. $srcdir/../..)]) - -dnl Internal subroutine. -dnl Search for the configuration auxiliary files in directory list $1. -dnl We look only for install-sh, so users of AC_PROG_INSTALL -dnl do not automatically need to distribute the other auxiliary files. -dnl AC_CONFIG_AUX_DIRS(DIR ...) -AC_DEFUN(AC_CONFIG_AUX_DIRS, -[ac_aux_dir= -for ac_dir in $1; do - if test -f $ac_dir/install-sh; then - ac_aux_dir=$ac_dir - ac_install_sh="$ac_aux_dir/install-sh -c" - break - elif test -f $ac_dir/install.sh; then - ac_aux_dir=$ac_dir - ac_install_sh="$ac_aux_dir/install.sh -c" - break - fi -done -if test -z "$ac_aux_dir"; then - AC_MSG_ERROR([can not find install-sh or install.sh in $1]) -fi -ac_config_guess=$ac_aux_dir/config.guess -ac_config_sub=$ac_aux_dir/config.sub -ac_configure=$ac_aux_dir/configure # This should be Cygnus configure. -AC_PROVIDE([AC_CONFIG_AUX_DIR_DEFAULT])dnl -]) - -dnl Canonicalize the host, target, and build system types. -AC_DEFUN(AC_CANONICAL_SYSTEM, -[AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl -AC_BEFORE([$0], [AC_ARG_PROGRAM]) -# Do some error checking and defaulting for the host and target type. -# The inputs are: -# configure --host=HOST --target=TARGET --build=BUILD NONOPT -# -# The rules are: -# 1. You are not allowed to specify --host, --target, and nonopt at the -# same time. -# 2. Host defaults to nonopt. -# 3. If nonopt is not specified, then host defaults to the current host, -# as determined by config.guess. -# 4. Target and build default to nonopt. -# 5. If nonopt is not specified, then target and build default to host. - -# The aliases save the names the user supplied, while $host etc. -# will get canonicalized. -case $host---$target---$nonopt in -NONE---*---* | *---NONE---* | *---*---NONE) ;; -*) AC_MSG_ERROR(can only configure for one host and one target at a time) ;; -esac - -AC_CANONICAL_HOST -AC_CANONICAL_TARGET -AC_CANONICAL_BUILD -test "$host_alias" != "$target_alias" && - test "$program_prefix$program_suffix$program_transform_name" = \ - NONENONEs,x,x, && - program_prefix=${target_alias}- -]) - -dnl Subroutines of AC_CANONICAL_SYSTEM. - -AC_DEFUN(AC_CANONICAL_HOST, -[AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl - -# Make sure we can run config.sub. -if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then : -else AC_MSG_ERROR(can not run $ac_config_sub) -fi - -AC_MSG_CHECKING(host system type) - -dnl Set host_alias. -host_alias=$host -case "$host_alias" in -NONE) - case $nonopt in - NONE) - if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then : - else AC_MSG_ERROR(can not guess host type; you must specify one) - fi ;; - *) host_alias=$nonopt ;; - esac ;; -esac - -dnl Set the other host vars. -changequote(<<, >>)dnl -host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias` -host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` -host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` -host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` -changequote([, ])dnl -AC_MSG_RESULT($host) -AC_SUBST(host)dnl -AC_SUBST(host_alias)dnl -AC_SUBST(host_cpu)dnl -AC_SUBST(host_vendor)dnl -AC_SUBST(host_os)dnl -]) - -dnl Internal use only. -AC_DEFUN(AC_CANONICAL_TARGET, -[AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl -AC_MSG_CHECKING(target system type) - -dnl Set target_alias. -target_alias=$target -case "$target_alias" in -NONE) - case $nonopt in - NONE) target_alias=$host_alias ;; - *) target_alias=$nonopt ;; - esac ;; -esac - -dnl Set the other target vars. -changequote(<<, >>)dnl -target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias` -target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` -target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` -target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` -changequote([, ])dnl -AC_MSG_RESULT($target) -AC_SUBST(target)dnl -AC_SUBST(target_alias)dnl -AC_SUBST(target_cpu)dnl -AC_SUBST(target_vendor)dnl -AC_SUBST(target_os)dnl -]) - -dnl Internal use only. -AC_DEFUN(AC_CANONICAL_BUILD, -[AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl -AC_MSG_CHECKING(build system type) - -dnl Set build_alias. -build_alias=$build -case "$build_alias" in -NONE) - case $nonopt in - NONE) build_alias=$host_alias ;; - *) build_alias=$nonopt ;; - esac ;; -esac - -dnl Set the other build vars. -changequote(<<, >>)dnl -build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias` -build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` -build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` -build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` -changequote([, ])dnl -AC_MSG_RESULT($build) -AC_SUBST(build)dnl -AC_SUBST(build_alias)dnl -AC_SUBST(build_cpu)dnl -AC_SUBST(build_vendor)dnl -AC_SUBST(build_os)dnl -]) - - -dnl AC_VALIDATE_CACHED_SYSTEM_TUPLE[(cmd)] -dnl if the cache file is inconsistent with the current host, -dnl target and build system types, execute CMD or print a default -dnl error message. -AC_DEFUN(AC_VALIDATE_CACHED_SYSTEM_TUPLE, [ - AC_REQUIRE([AC_CANONICAL_SYSTEM]) - AC_MSG_CHECKING([cached system tuple]) - if { test x"${ac_cv_host_system_type+set}" = x"set" && - test x"$ac_cv_host_system_type" != x"$host"; } || - { test x"${ac_cv_build_system_type+set}" = x"set" && - test x"$ac_cv_build_system_type" != x"$build"; } || - { test x"${ac_cv_target_system_type+set}" = x"set" && - test x"$ac_cv_target_system_type" != x"$target"; }; then - AC_MSG_RESULT([different]) - ifelse($#, 1, [$1], - [AC_MSG_ERROR([remove config.cache and re-run configure])]) - else - AC_MSG_RESULT(ok) - fi - ac_cv_host_system_type="$host" - ac_cv_build_system_type="$build" - ac_cv_target_system_type="$target" -]) - - -dnl ### Caching test results - - -dnl Look for site or system specific initialization scripts. -dnl AC_SITE_LOAD() -define(AC_SITE_LOAD, -[# Prefer explicitly selected file to automatically selected ones. -if test -z "$CONFIG_SITE"; then - if test "x$prefix" != xNONE; then - CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site" - else - CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" - fi -fi -for ac_site_file in $CONFIG_SITE; do - if test -r "$ac_site_file"; then - echo "loading site script $ac_site_file" - . "$ac_site_file" - fi -done -]) - -dnl AC_CACHE_LOAD() -define(AC_CACHE_LOAD, -[if test -r "$cache_file"; then - echo "loading cache $cache_file" - . $cache_file -else - echo "creating cache $cache_file" - > $cache_file -fi -]) - -dnl AC_CACHE_SAVE() -define(AC_CACHE_SAVE, -[cat > confcache <<\EOF -# This file is a shell script that caches the results of configure -# tests run on this system so they can be shared between configure -# scripts and configure runs. It is not useful on other systems. -# If it contains results you don't want to keep, you may remove or edit it. -# -# By default, configure uses ./config.cache as the cache file, -# creating it if it does not exist already. You can give configure -# the --cache-file=FILE option to use a different cache file; that is -# what configure does when it calls configure scripts in -# subdirectories, so they share the cache. -# Giving --cache-file=/dev/null disables caching, for debugging configure. -# config.status only pays attention to the cache file if you give it the -# --recheck option to rerun configure. -# -EOF -dnl Allow a site initialization script to override cache values. -# The following way of writing the cache mishandles newlines in values, -# but we know of no workaround that is simple, portable, and efficient. -# So, don't put newlines in cache variables' values. -# Ultrix sh set writes to stderr and can't be redirected directly, -# and sets the high bit in the cache file unless we assign to the vars. -changequote(, )dnl -(set) 2>&1 | - case `(ac_space=' '; set | grep ac_space) 2>&1` in - *ac_space=\ *) - # `set' does not quote correctly, so add quotes (double-quote substitution - # turns \\\\ into \\, and sed turns \\ into \). - sed -n \ - -e "s/'/'\\\\''/g" \ - -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p" - ;; - *) - # `set' quotes correctly as required by POSIX, so do not add quotes. - sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p' - ;; - esac >> confcache -changequote([, ])dnl -if cmp -s $cache_file confcache; then - : -else - if test -w $cache_file; then - echo "updating cache $cache_file" - cat confcache > $cache_file - else - echo "not updating unwritable cache $cache_file" - fi -fi -rm -f confcache -]) - -dnl The name of shell var CACHE-ID must contain `_cv_' in order to get saved. -dnl AC_CACHE_VAL(CACHE-ID, COMMANDS-TO-SET-IT) -define(AC_CACHE_VAL, -[dnl We used to use the below line, but it fails if the 1st arg is a -dnl shell variable, so we need the eval. -dnl if test "${$1+set}" = set; then -dnl the '' avoids an AIX 4.1 sh bug ("invalid expansion"). -if eval "test \"`echo '$''{'$1'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&AC_FD_MSG -else - $2 -fi -]) - -dnl AC_CACHE_CHECK(MESSAGE, CACHE-ID, COMMANDS) -define(AC_CACHE_CHECK, -[AC_MSG_CHECKING([$1]) -AC_CACHE_VAL([$2], [$3]) -AC_MSG_RESULT([$]$2)]) - - -dnl ### Defining symbols - - -dnl Set VARIABLE to VALUE, verbatim, or 1. -dnl AC_DEFINE(VARIABLE [, VALUE]) -define(AC_DEFINE, -[cat >> confdefs.h <<\EOF -[#define] $1 ifelse($#, 2, [$2], $#, 3, [$2], 1) -EOF -]) - -dnl Similar, but perform shell substitutions $ ` \ once on VALUE. -define(AC_DEFINE_UNQUOTED, -[cat >> confdefs.h <&AC_FD_MSG -echo "configure:__oline__: checking $1" >&AC_FD_CC]) - -dnl AC_CHECKING(FEATURE-DESCRIPTION) -define(AC_CHECKING, -[echo "checking $1" 1>&AC_FD_MSG -echo "configure:__oline__: checking $1" >&AC_FD_CC]) - -dnl AC_MSG_RESULT(RESULT-DESCRIPTION) -define(AC_MSG_RESULT, -[echo "$ac_t""$1" 1>&AC_FD_MSG]) - -dnl AC_VERBOSE(RESULT-DESCRIPTION) -define(AC_VERBOSE, -[AC_OBSOLETE([$0], [; instead use AC_MSG_RESULT])dnl -echo " $1" 1>&AC_FD_MSG]) - -dnl AC_MSG_WARN(PROBLEM-DESCRIPTION) -define(AC_MSG_WARN, -[echo "configure: warning: $1" 1>&2]) - -dnl AC_MSG_ERROR(ERROR-DESCRIPTION) -define(AC_MSG_ERROR, -[{ echo "configure: error: $1" 1>&2; exit 1; }]) - - -dnl ### Selecting which language to use for testing - - -dnl AC_LANG_C() -AC_DEFUN(AC_LANG_C, -[define([AC_LANG], [C])dnl -ac_ext=c -# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. -ac_cpp='$CPP $CPPFLAGS' -ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&AC_FD_CC' -ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&AC_FD_CC' -cross_compiling=$ac_cv_prog_cc_cross -]) - -dnl AC_LANG_CPLUSPLUS() -AC_DEFUN(AC_LANG_CPLUSPLUS, -[define([AC_LANG], [CPLUSPLUS])dnl -ac_ext=C -# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&AC_FD_CC' -ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&AC_FD_CC' -cross_compiling=$ac_cv_prog_cxx_cross -]) - -dnl AC_LANG_FORTRAN77() -AC_DEFUN(AC_LANG_FORTRAN77, -[define([AC_LANG], [FORTRAN77])dnl -ac_ext=f -ac_compile='${F77-f77} -c $FFLAGS conftest.$ac_ext 1>&AC_FD_CC' -ac_link='${F77-f77} -o conftest${ac_exeext} $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&AC_FD_CC' -cross_compiling=$ac_cv_prog_f77_cross -]) - -dnl Push the current language on a stack. -dnl AC_LANG_SAVE() -define(AC_LANG_SAVE, -[pushdef([AC_LANG_STACK], AC_LANG)]) - -dnl Restore the current language from the stack. -dnl AC_LANG_RESTORE() -pushdef([AC_LANG_RESTORE], -[ifelse(AC_LANG_STACK, [C], [AC_LANG_C],dnl -AC_LANG_STACK, [CPLUSPLUS], [AC_LANG_CPLUSPLUS],dnl -AC_LANG_STACK, [FORTRAN77], [AC_LANG_FORTRAN77])[]popdef([AC_LANG_STACK])]) - - -dnl ### Compiler-running mechanics - - -dnl The purpose of this macro is to "configure:123: command line" -dnl written into config.log for every test run. -dnl AC_TRY_EVAL(VARIABLE) -AC_DEFUN(AC_TRY_EVAL, -[{ (eval echo configure:__oline__: \"[$]$1\") 1>&AC_FD_CC; dnl -(eval [$]$1) 2>&AC_FD_CC; }]) - -dnl AC_TRY_COMMAND(COMMAND) -AC_DEFUN(AC_TRY_COMMAND, -[{ ac_try='$1'; AC_TRY_EVAL(ac_try); }]) - - -dnl ### Dependencies between macros - - -dnl AC_BEFORE(THIS-MACRO-NAME, CALLED-MACRO-NAME) -define(AC_BEFORE, -[ifdef([AC_PROVIDE_$2], [errprint(__file__:__line__: [$2 was called before $1 -])])]) - -dnl AC_REQUIRE(MACRO-NAME) -define(AC_REQUIRE, -[ifdef([AC_PROVIDE_$1], , -[AC_DIVERT_PUSH(builtin(eval, AC_DIVERSION_CURRENT - 1))dnl -indir([$1]) -AC_DIVERT_POP()dnl -])]) - -dnl AC_PROVIDE(MACRO-NAME) -define(AC_PROVIDE, -[define([AC_PROVIDE_$1], )]) - -dnl AC_OBSOLETE(THIS-MACRO-NAME [, SUGGESTION]) -define(AC_OBSOLETE, -[errprint(__file__:__line__: warning: [$1] is obsolete[$2] -)]) - - -dnl ### Checking for programs - - -dnl AC_CHECK_PROG(VARIABLE, PROG-TO-CHECK-FOR, VALUE-IF-FOUND -dnl [, [VALUE-IF-NOT-FOUND] [, [PATH] [, [REJECT]]]]) -AC_DEFUN(AC_CHECK_PROG, -[# Extract the first word of "$2", so it can be a program name with args. -set dummy $2; ac_word=[$]2 -AC_MSG_CHECKING([for $ac_word]) -AC_CACHE_VAL(ac_cv_prog_$1, -[if test -n "[$]$1"; then - ac_cv_prog_$1="[$]$1" # Let the user override the test. -else - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" -ifelse([$6], , , [ ac_prog_rejected=no -])dnl -dnl $ac_dummy forces splitting on constant user-supplied paths. -dnl POSIX.2 word splitting is done only on the output of word expansions, -dnl not every word. This closes a longstanding sh security hole. - ac_dummy="ifelse([$5], , $PATH, [$5])" - for ac_dir in $ac_dummy; do - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$ac_word; then -ifelse([$6], , , dnl -[ if test "[$ac_dir/$ac_word]" = "$6"; then - ac_prog_rejected=yes - continue - fi -])dnl - ac_cv_prog_$1="$3" - break - fi - done - IFS="$ac_save_ifs" -ifelse([$6], , , [if test $ac_prog_rejected = yes; then - # We found a bogon in the path, so make sure we never use it. - set dummy [$]ac_cv_prog_$1 - shift - if test [$]# -gt 0; then - # We chose a different compiler from the bogus one. - # However, it has the same basename, so the bogon will be chosen - # first if we set $1 to just the basename; use the full file name. - shift - set dummy "$ac_dir/$ac_word" "[$]@" - shift - ac_cv_prog_$1="[$]@" -ifelse([$2], [$4], dnl -[ else - # Default is a loser. - AC_MSG_ERROR([$1=$6 unacceptable, but no other $4 found in dnl -ifelse([$5], , [\$]PATH, [$5])]) -])dnl - fi -fi -])dnl -dnl If no 4th arg is given, leave the cache variable unset, -dnl so AC_CHECK_PROGS will keep looking. -ifelse([$4], , , [ test -z "[$]ac_cv_prog_$1" && ac_cv_prog_$1="$4" -])dnl -fi])dnl -$1="$ac_cv_prog_$1" -if test -n "[$]$1"; then - AC_MSG_RESULT([$]$1) -else - AC_MSG_RESULT(no) -fi -AC_SUBST($1)dnl -]) - -dnl AC_PATH_PROG(VARIABLE, PROG-TO-CHECK-FOR [, VALUE-IF-NOT-FOUND [, PATH]]) -AC_DEFUN(AC_PATH_PROG, -[# Extract the first word of "$2", so it can be a program name with args. -set dummy $2; ac_word=[$]2 -AC_MSG_CHECKING([for $ac_word]) -AC_CACHE_VAL(ac_cv_path_$1, -[case "[$]$1" in - /*) - ac_cv_path_$1="[$]$1" # Let the user override the test with a path. - ;; - ?:/*) - ac_cv_path_$1="[$]$1" # Let the user override the test with a dos path. - ;; - *) - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" -dnl $ac_dummy forces splitting on constant user-supplied paths. -dnl POSIX.2 word splitting is done only on the output of word expansions, -dnl not every word. This closes a longstanding sh security hole. - ac_dummy="ifelse([$4], , $PATH, [$4])" - for ac_dir in $ac_dummy; do - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$ac_word; then - ac_cv_path_$1="$ac_dir/$ac_word" - break - fi - done - IFS="$ac_save_ifs" -dnl If no 3rd arg is given, leave the cache variable unset, -dnl so AC_PATH_PROGS will keep looking. -ifelse([$3], , , [ test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$3" -])dnl - ;; -esac])dnl -$1="$ac_cv_path_$1" -if test -n "[$]$1"; then - AC_MSG_RESULT([$]$1) -else - AC_MSG_RESULT(no) -fi -AC_SUBST($1)dnl -]) - -dnl AC_CHECK_PROGS(VARIABLE, PROGS-TO-CHECK-FOR [, VALUE-IF-NOT-FOUND -dnl [, PATH]]) -AC_DEFUN(AC_CHECK_PROGS, -[for ac_prog in $2 -do -AC_CHECK_PROG($1, [$]ac_prog, [$]ac_prog, , $4) -test -n "[$]$1" && break -done -ifelse([$3], , , [test -n "[$]$1" || $1="$3" -])]) - -dnl AC_PATH_PROGS(VARIABLE, PROGS-TO-CHECK-FOR [, VALUE-IF-NOT-FOUND -dnl [, PATH]]) -AC_DEFUN(AC_PATH_PROGS, -[for ac_prog in $2 -do -AC_PATH_PROG($1, [$]ac_prog, , $4) -test -n "[$]$1" && break -done -ifelse([$3], , , [test -n "[$]$1" || $1="$3" -])]) - -dnl Internal subroutine. -AC_DEFUN(AC_CHECK_TOOL_PREFIX, -[AC_REQUIRE([AC_CANONICAL_HOST])AC_REQUIRE([AC_CANONICAL_BUILD])dnl -if test $host != $build; then - ac_tool_prefix=${host_alias}- -else - ac_tool_prefix= -fi -]) - -dnl AC_CHECK_TOOL(VARIABLE, PROG-TO-CHECK-FOR[, VALUE-IF-NOT-FOUND [, PATH]]) -AC_DEFUN(AC_CHECK_TOOL, -[AC_REQUIRE([AC_CHECK_TOOL_PREFIX])dnl -AC_CHECK_PROG($1, ${ac_tool_prefix}$2, ${ac_tool_prefix}$2, - ifelse([$3], , [$2], ), $4) -ifelse([$3], , , [ -if test -z "$ac_cv_prog_$1"; then -if test -n "$ac_tool_prefix"; then - AC_CHECK_PROG($1, $2, $2, $3) -else - $1="$3" -fi -fi]) -]) - -dnl Guess the value for the `prefix' variable by looking for -dnl the argument program along PATH and taking its parent. -dnl Example: if the argument is `gcc' and we find /usr/local/gnu/bin/gcc, -dnl set `prefix' to /usr/local/gnu. -dnl This comes too late to find a site file based on the prefix, -dnl and it might use a cached value for the path. -dnl No big loss, I think, since most configures don't use this macro anyway. -dnl AC_PREFIX_PROGRAM(PROGRAM) -AC_DEFUN(AC_PREFIX_PROGRAM, -[if test "x$prefix" = xNONE; then -changequote(<<, >>)dnl -define(<>, translit($1, [a-z], [A-Z]))dnl -changequote([, ])dnl -dnl We reimplement AC_MSG_CHECKING (mostly) to avoid the ... in the middle. -echo $ac_n "checking for prefix by $ac_c" 1>&AC_FD_MSG -AC_PATH_PROG(AC_VAR_NAME, $1) -changequote(<<, >>)dnl - if test -n "$ac_cv_path_<<>>AC_VAR_NAME"; then - prefix=`echo $ac_cv_path_<<>>AC_VAR_NAME|sed 's%/[^/][^/]*//*[^/][^/]*$%%'` -changequote([, ])dnl - fi -fi -undefine([AC_VAR_NAME])dnl -]) - -dnl Try to compile, link and execute TEST-PROGRAM. Set WORKING-VAR to -dnl `yes' if the current compiler works, otherwise set it ti `no'. Set -dnl CROSS-VAR to `yes' if the compiler and linker produce non-native -dnl executables, otherwise set it to `no'. Before calling -dnl `AC_TRY_COMPILER()', call `AC_LANG_*' to set-up for the right -dnl language. -dnl -dnl AC_TRY_COMPILER(TEST-PROGRAM, WORKING-VAR, CROSS-VAR) -AC_DEFUN(AC_TRY_COMPILER, -[cat > conftest.$ac_ext << EOF -ifelse(AC_LANG, [FORTRAN77], , -[ -[#]line __oline__ "configure" -#include "confdefs.h" -]) -[$1] -EOF -if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then - [$2]=yes - # If we can't run a trivial program, we are probably using a cross compiler. - if (./conftest${ac_xexeext}; exit) 2>/dev/null; then - [$3]=no - else - [$3]=yes - fi -else - echo "configure: failed program was:" >&AC_FD_CC - cat conftest.$ac_ext >&AC_FD_CC - [$2]=no -fi -rm -fr conftest*]) - - -dnl ### Checking for libraries - - -dnl AC_TRY_LINK_FUNC(func, action-if-found, action-if-not-found) -dnl Try to link a program that calls FUNC, handling GCC builtins. If -dnl the link succeeds, execute ACTION-IF-FOUND; otherwise, execute -dnl ACTION-IF-NOT-FOUND. - -AC_DEFUN(AC_TRY_LINK_FUNC, -AC_TRY_LINK(dnl -ifelse([$1], [main], , dnl Avoid conflicting decl of main. -[/* Override any gcc2 internal prototype to avoid an error. */ -]ifelse(AC_LANG, CPLUSPLUS, [#ifdef __cplusplus -extern "C" -#endif -])dnl -[/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char $1(); -]), -[$1()], -[$2], -[$3])) - - -dnl AC_SEARCH_LIBS(FUNCTION, SEARCH-LIBS [, ACTION-IF-FOUND -dnl [, ACTION-IF-NOT-FOUND [, OTHER-LIBRARIES]]]) -dnl Search for a library defining FUNC, if it's not already available. - -AC_DEFUN(AC_SEARCH_LIBS, -[AC_PREREQ([2.13]) -AC_CACHE_CHECK([for library containing $1], [ac_cv_search_$1], -[ac_func_search_save_LIBS="$LIBS" -ac_cv_search_$1="no" -AC_TRY_LINK_FUNC([$1], [ac_cv_search_$1="none required"]) -test "$ac_cv_search_$1" = "no" && for i in $2; do -LIBS="-l$i $5 $ac_func_search_save_LIBS" -AC_TRY_LINK_FUNC([$1], -[ac_cv_search_$1="-l$i" -break]) -done -LIBS="$ac_func_search_save_LIBS"]) -if test "$ac_cv_search_$1" != "no"; then - test "$ac_cv_search_$1" = "none required" || LIBS="$ac_cv_search_$1 $LIBS" - $3 -else : - $4 -fi]) - - - -dnl AC_CHECK_LIB(LIBRARY, FUNCTION [, ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND -dnl [, OTHER-LIBRARIES]]]) -AC_DEFUN(AC_CHECK_LIB, -[AC_MSG_CHECKING([for $2 in -l$1]) -dnl Use a cache variable name containing both the library and function name, -dnl because the test really is for library $1 defining function $2, not -dnl just for library $1. Separate tests with the same $1 and different $2s -dnl may have different results. -ac_lib_var=`echo $1['_']$2 | sed 'y%./+-%__p_%'` -AC_CACHE_VAL(ac_cv_lib_$ac_lib_var, -[ac_save_LIBS="$LIBS" -LIBS="-l$1 $5 $LIBS" -AC_TRY_LINK(dnl -ifelse(AC_LANG, [FORTRAN77], , -ifelse([$2], [main], , dnl Avoid conflicting decl of main. -[/* Override any gcc2 internal prototype to avoid an error. */ -]ifelse(AC_LANG, CPLUSPLUS, [#ifdef __cplusplus -extern "C" -#endif -])dnl -[/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char $2(); -])), - [$2()], - eval "ac_cv_lib_$ac_lib_var=yes", - eval "ac_cv_lib_$ac_lib_var=no") -LIBS="$ac_save_LIBS" -])dnl -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then - AC_MSG_RESULT(yes) - ifelse([$3], , -[changequote(, )dnl - ac_tr_lib=HAVE_LIB`echo $1 | sed -e 's/[^a-zA-Z0-9_]/_/g' \ - -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` -changequote([, ])dnl - AC_DEFINE_UNQUOTED($ac_tr_lib) - LIBS="-l$1 $LIBS" -], [$3]) -else - AC_MSG_RESULT(no) -ifelse([$4], , , [$4 -])dnl -fi -]) - -dnl AC_HAVE_LIBRARY(LIBRARY, [, ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND -dnl [, OTHER-LIBRARIES]]]) -AC_DEFUN(AC_HAVE_LIBRARY, -[AC_OBSOLETE([$0], [; instead use AC_CHECK_LIB])dnl -changequote(<<, >>)dnl -define(<>, dnl -patsubst(patsubst($1, <>, <<\1>>), <<-l>>, <<>>))dnl -define(<>, ac_cv_lib_<<>>AC_LIB_NAME)dnl -changequote([, ])dnl -AC_MSG_CHECKING([for -l[]AC_LIB_NAME]) -AC_CACHE_VAL(AC_CV_NAME, -[ac_save_LIBS="$LIBS" -LIBS="-l[]AC_LIB_NAME[] $4 $LIBS" -AC_TRY_LINK( , [main()], AC_CV_NAME=yes, AC_CV_NAME=no) -LIBS="$ac_save_LIBS" -])dnl -AC_MSG_RESULT($AC_CV_NAME) -if test "$AC_CV_NAME" = yes; then - ifelse([$2], , -[AC_DEFINE([HAVE_LIB]translit(AC_LIB_NAME, [a-z], [A-Z])) - LIBS="-l[]AC_LIB_NAME[] $LIBS" -], [$2]) -ifelse([$3], , , [else - $3 -])dnl -fi -undefine([AC_LIB_NAME])dnl -undefine([AC_CV_NAME])dnl -]) - - -dnl ### Examining declarations - - -dnl AC_TRY_CPP(INCLUDES, [ACTION-IF-TRUE [, ACTION-IF-FALSE]]) -AC_DEFUN(AC_TRY_CPP, -[AC_REQUIRE_CPP()dnl -cat > conftest.$ac_ext <&AC_FD_CC - echo "configure: failed program was:" >&AC_FD_CC - cat conftest.$ac_ext >&AC_FD_CC -ifelse([$3], , , [ rm -rf conftest* - $3 -])dnl -fi -rm -f conftest*]) - -dnl AC_EGREP_HEADER(PATTERN, HEADER-FILE, ACTION-IF-FOUND [, -dnl ACTION-IF-NOT-FOUND]) -AC_DEFUN(AC_EGREP_HEADER, -[AC_EGREP_CPP([$1], [#include <$2>], [$3], [$4])]) - -dnl Because this macro is used by AC_PROG_GCC_TRADITIONAL, which must -dnl come early, it is not included in AC_BEFORE checks. -dnl AC_EGREP_CPP(PATTERN, PROGRAM, [ACTION-IF-FOUND [, -dnl ACTION-IF-NOT-FOUND]]) -AC_DEFUN(AC_EGREP_CPP, -[AC_REQUIRE_CPP()dnl -cat > conftest.$ac_ext <&AC_FD_CC | -dnl Prevent m4 from eating character classes: -changequote(, )dnl - egrep "$1" >/dev/null 2>&1; then -changequote([, ])dnl - ifelse([$3], , :, [rm -rf conftest* - $3]) -ifelse([$4], , , [else - rm -rf conftest* - $4 -])dnl -fi -rm -f conftest* -]) - - -dnl ### Examining syntax - - -dnl AC_TRY_COMPILE(INCLUDES, FUNCTION-BODY, -dnl [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]) -AC_DEFUN(AC_TRY_COMPILE, -[cat > conftest.$ac_ext <&AC_FD_CC - cat conftest.$ac_ext >&AC_FD_CC -ifelse([$4], , , [ rm -rf conftest* - $4 -])dnl -fi -rm -f conftest*]) - - -dnl ### Examining libraries - - -dnl AC_COMPILE_CHECK(ECHO-TEXT, INCLUDES, FUNCTION-BODY, -dnl ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]) -AC_DEFUN(AC_COMPILE_CHECK, -[AC_OBSOLETE([$0], [; instead use AC_TRY_COMPILE or AC_TRY_LINK, and AC_MSG_CHECKING and AC_MSG_RESULT])dnl -ifelse([$1], , , [AC_CHECKING([for $1]) -])dnl -AC_TRY_LINK([$2], [$3], [$4], [$5]) -]) - -dnl AC_TRY_LINK(INCLUDES, FUNCTION-BODY, -dnl [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]) -AC_DEFUN(AC_TRY_LINK, -[cat > conftest.$ac_ext <&AC_FD_CC - cat conftest.$ac_ext >&AC_FD_CC -ifelse([$4], , , [ rm -rf conftest* - $4 -])dnl -fi -rm -f conftest*]) - - -dnl ### Checking for run-time features - - -dnl AC_TRY_RUN(PROGRAM, [ACTION-IF-TRUE [, ACTION-IF-FALSE -dnl [, ACTION-IF-CROSS-COMPILING]]]) -AC_DEFUN(AC_TRY_RUN, -[if test "$cross_compiling" = yes; then - ifelse([$4], , - [errprint(__file__:__line__: warning: [AC_TRY_RUN] called without default to allow cross compiling -)dnl - AC_MSG_ERROR(can not run test program while cross compiling)], - [$4]) -else - AC_TRY_RUN_NATIVE([$1], [$2], [$3]) -fi -]) - -dnl Like AC_TRY_RUN but assumes a native-environment (non-cross) compiler. -dnl AC_TRY_RUN_NATIVE(PROGRAM, [ACTION-IF-TRUE [, ACTION-IF-FALSE]]) -AC_DEFUN(AC_TRY_RUN_NATIVE, -[cat > conftest.$ac_ext </dev/null -then -dnl Don't remove the temporary files here, so they can be examined. - ifelse([$2], , :, [$2]) -else - echo "configure: failed program was:" >&AC_FD_CC - cat conftest.$ac_ext >&AC_FD_CC -ifelse([$3], , , [ rm -fr conftest* - $3 -])dnl -fi -rm -fr conftest*]) - - -dnl ### Checking for header files - - -dnl AC_CHECK_HEADER(HEADER-FILE, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]) -AC_DEFUN(AC_CHECK_HEADER, -[dnl Do the transliteration at runtime so arg 1 can be a shell variable. -ac_safe=`echo "$1" | sed 'y%./+-%__p_%'` -AC_MSG_CHECKING([for $1]) -AC_CACHE_VAL(ac_cv_header_$ac_safe, -[AC_TRY_CPP([#include <$1>], eval "ac_cv_header_$ac_safe=yes", - eval "ac_cv_header_$ac_safe=no")])dnl -if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then - AC_MSG_RESULT(yes) - ifelse([$2], , :, [$2]) -else - AC_MSG_RESULT(no) -ifelse([$3], , , [$3 -])dnl -fi -]) - -dnl AC_CHECK_HEADERS(HEADER-FILE... [, ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]) -AC_DEFUN(AC_CHECK_HEADERS, -[for ac_hdr in $1 -do -AC_CHECK_HEADER($ac_hdr, -[changequote(, )dnl - ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` -changequote([, ])dnl - AC_DEFINE_UNQUOTED($ac_tr_hdr) $2], $3)dnl -done -]) - - -dnl ### Checking for the existence of files - -dnl AC_CHECK_FILE(FILE, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]) -AC_DEFUN(AC_CHECK_FILE, -[AC_REQUIRE([AC_PROG_CC]) -dnl Do the transliteration at runtime so arg 1 can be a shell variable. -ac_safe=`echo "$1" | sed 'y%./+-%__p_%'` -AC_MSG_CHECKING([for $1]) -AC_CACHE_VAL(ac_cv_file_$ac_safe, -[if test "$cross_compiling" = yes; then - errprint(__file__:__line__: warning: Cannot check for file existence when cross compiling -)dnl - AC_MSG_ERROR(Cannot check for file existence when cross compiling) -else - if test -r $1; then - eval "ac_cv_file_$ac_safe=yes" - else - eval "ac_cv_file_$ac_safe=no" - fi -fi])dnl -if eval "test \"`echo '$ac_cv_file_'$ac_safe`\" = yes"; then - AC_MSG_RESULT(yes) - ifelse([$2], , :, [$2]) -else - AC_MSG_RESULT(no) -ifelse([$3], , , [$3]) -fi -]) - -dnl AC_CHECK_FILES(FILE... [, ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]) -AC_DEFUN(AC_CHECK_FILES, -[for ac_file in $1 -do -AC_CHECK_FILE($ac_file, -[changequote(, )dnl - ac_tr_file=HAVE_`echo $ac_file | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` -changequote([, ])dnl - AC_DEFINE_UNQUOTED($ac_tr_file) $2], $3)dnl -done -]) - - -dnl ### Checking for library functions - - -dnl AC_CHECK_FUNC(FUNCTION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]) -AC_DEFUN(AC_CHECK_FUNC, -[AC_MSG_CHECKING([for $1]) -AC_CACHE_VAL(ac_cv_func_$1, -[AC_TRY_LINK( -dnl Don't include because on OSF/1 3.0 it includes -dnl which includes which contains a prototype for -dnl select. Similarly for bzero. -[/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $1(); below. */ -#include -/* Override any gcc2 internal prototype to avoid an error. */ -]ifelse(AC_LANG, CPLUSPLUS, [#ifdef __cplusplus -extern "C" -#endif -])dnl -[/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char $1(); -], [ -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined (__stub_$1) || defined (__stub___$1) -choke me -#else -$1(); -#endif -], eval "ac_cv_func_$1=yes", eval "ac_cv_func_$1=no")]) -if eval "test \"`echo '$ac_cv_func_'$1`\" = yes"; then - AC_MSG_RESULT(yes) - ifelse([$2], , :, [$2]) -else - AC_MSG_RESULT(no) -ifelse([$3], , , [$3 -])dnl -fi -]) - -dnl AC_CHECK_FUNCS(FUNCTION... [, ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]) -AC_DEFUN(AC_CHECK_FUNCS, -[for ac_func in $1 -do -AC_CHECK_FUNC($ac_func, -[changequote(, )dnl - ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` -changequote([, ])dnl - AC_DEFINE_UNQUOTED($ac_tr_func) $2], $3)dnl -done -]) - -dnl AC_REPLACE_FUNCS(FUNCTION...) -AC_DEFUN(AC_REPLACE_FUNCS, -[AC_CHECK_FUNCS([$1], , [LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"]) -AC_SUBST(LIBOBJS)dnl -]) - - -dnl ### Checking compiler characteristics - - -dnl AC_CHECK_SIZEOF(TYPE [, CROSS-SIZE]) -AC_DEFUN(AC_CHECK_SIZEOF, -[changequote(<<, >>)dnl -dnl The name to #define. -define(<>, translit(sizeof_$1, [a-z *], [A-Z_P]))dnl -dnl The cache variable name. -define(<>, translit(ac_cv_sizeof_$1, [ *], [_p]))dnl -changequote([, ])dnl -AC_MSG_CHECKING(size of $1) -AC_CACHE_VAL(AC_CV_NAME, -[AC_TRY_RUN([#include -main() -{ - FILE *f=fopen("conftestval", "w"); - if (!f) exit(1); - fprintf(f, "%d\n", sizeof($1)); - exit(0); -}], AC_CV_NAME=`cat conftestval`, AC_CV_NAME=0, ifelse([$2], , , AC_CV_NAME=$2))])dnl -AC_MSG_RESULT($AC_CV_NAME) -AC_DEFINE_UNQUOTED(AC_TYPE_NAME, $AC_CV_NAME) -undefine([AC_TYPE_NAME])dnl -undefine([AC_CV_NAME])dnl -]) - - -dnl ### Checking for typedefs - - -dnl AC_CHECK_TYPE(TYPE, DEFAULT) -AC_DEFUN(AC_CHECK_TYPE, -[AC_REQUIRE([AC_HEADER_STDC])dnl -AC_MSG_CHECKING(for $1) -AC_CACHE_VAL(ac_cv_type_$1, -[AC_EGREP_CPP(dnl -changequote(<<,>>)dnl -<<(^|[^a-zA-Z_0-9])$1[^a-zA-Z_0-9]>>dnl -changequote([,]), [#include -#if STDC_HEADERS -#include -#include -#endif], ac_cv_type_$1=yes, ac_cv_type_$1=no)])dnl -AC_MSG_RESULT($ac_cv_type_$1) -if test $ac_cv_type_$1 = no; then - AC_DEFINE($1, $2) -fi -]) - - -dnl ### Creating output files - - -dnl AC_CONFIG_HEADER(HEADER-TO-CREATE ...) -AC_DEFUN(AC_CONFIG_HEADER, -[define(AC_LIST_HEADER, $1)]) - -dnl Link each of the existing files SOURCE... to the corresponding -dnl link name in DEST... -dnl AC_LINK_FILES(SOURCE..., DEST...) -AC_DEFUN(AC_LINK_FILES, -[dnl -define([AC_LIST_FILES], ifdef([AC_LIST_FILES], [AC_LIST_FILES ],)[$1])dnl -define([AC_LIST_LINKS], ifdef([AC_LIST_LINKS], [AC_LIST_LINKS ],)[$2])]) - -dnl Add additional commands for AC_OUTPUT to put into config.status. -dnl Use diversions instead of macros so we can be robust in the -dnl presence of commas in $1 and/or $2. -dnl AC_OUTPUT_COMMANDS(EXTRA-CMDS, INIT-CMDS) -AC_DEFUN(AC_OUTPUT_COMMANDS, -[AC_DIVERT_PUSH(AC_DIVERSION_CMDS)dnl -[$1] -AC_DIVERT_POP()dnl -AC_DIVERT_PUSH(AC_DIVERSION_ICMDS)dnl -[$2] -AC_DIVERT_POP()]) - -dnl AC_CONFIG_SUBDIRS(DIR ...) -AC_DEFUN(AC_CONFIG_SUBDIRS, -[AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl -define([AC_LIST_SUBDIRS], ifdef([AC_LIST_SUBDIRS], [AC_LIST_SUBDIRS ],)[$1])dnl -subdirs="AC_LIST_SUBDIRS" -AC_SUBST(subdirs)dnl -]) - -dnl The big finish. -dnl Produce config.status, config.h, and links; and configure subdirs. -dnl AC_OUTPUT([FILE...] [, EXTRA-CMDS] [, INIT-CMDS]) -define(AC_OUTPUT, -[trap '' 1 2 15 -AC_CACHE_SAVE -trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15 - -test "x$prefix" = xNONE && prefix=$ac_default_prefix -# Let make expand exec_prefix. -test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' - -# Any assignment to VPATH causes Sun make to only execute -# the first set of double-colon rules, so remove it if not needed. -# If there is a colon in the path, we need to keep it. -if test "x$srcdir" = x.; then -changequote(, )dnl - ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d' -changequote([, ])dnl -fi - -trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15 - -ifdef([AC_LIST_HEADER], [DEFS=-DHAVE_CONFIG_H], [AC_OUTPUT_MAKE_DEFS()]) - -# Without the "./", some shells look in PATH for config.status. -: ${CONFIG_STATUS=./config.status} - -echo creating $CONFIG_STATUS -rm -f $CONFIG_STATUS -cat > $CONFIG_STATUS </dev/null | sed 1q`: -# -[#] [$]0 [$]ac_configure_args -# -# Compiler output produced by configure, useful for debugging -# configure, is in ./config.log if it exists. - -changequote(, )dnl -ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]" -changequote([, ])dnl -for ac_option -do - case "[\$]ac_option" in - -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) - echo "running [\$]{CONFIG_SHELL-/bin/sh} [$]0 [$]ac_configure_args --no-create --no-recursion" - exec [\$]{CONFIG_SHELL-/bin/sh} [$]0 [$]ac_configure_args --no-create --no-recursion ;; - -version | --version | --versio | --versi | --vers | --ver | --ve | --v) - echo "$CONFIG_STATUS generated by autoconf version AC_ACVERSION" - exit 0 ;; - -help | --help | --hel | --he | --h) - echo "[\$]ac_cs_usage"; exit 0 ;; - *) echo "[\$]ac_cs_usage"; exit 1 ;; - esac -done - -ac_given_srcdir=$srcdir -ifdef([AC_PROVIDE_AC_PROG_INSTALL], [ac_given_INSTALL="$INSTALL" -])dnl - -changequote(<<, >>)dnl -ifdef(<>, -<>, -<>) -changequote([, ])dnl -EOF -cat >> $CONFIG_STATUS <> $CONFIG_STATUS <> $CONFIG_STATUS <<\EOF -undivert(AC_DIVERSION_CMDS)dnl -$2 -exit 0 -EOF -chmod +x $CONFIG_STATUS -rm -fr confdefs* $ac_clean_files -test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1 -dnl config.status should not do recursion. -ifdef([AC_LIST_SUBDIRS], [AC_OUTPUT_SUBDIRS(AC_LIST_SUBDIRS)])dnl -])dnl - -dnl Set the DEFS variable to the -D options determined earlier. -dnl This is a subroutine of AC_OUTPUT. -dnl It is called inside configure, outside of config.status. -dnl AC_OUTPUT_MAKE_DEFS() -define(AC_OUTPUT_MAKE_DEFS, -[# Transform confdefs.h into DEFS. -dnl Using a here document instead of a string reduces the quoting nightmare. -# Protect against shell expansion while executing Makefile rules. -# Protect against Makefile macro expansion. -cat > conftest.defs <<\EOF -changequote(<<, >>)dnl -s%<<#define>> \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%-D\1=\2%g -s%[ `~<<#>>$^&*(){}\\|;'"<>?]%\\&%g -s%\[%\\&%g -s%\]%\\&%g -s%\$%$$%g -changequote([, ])dnl -EOF -DEFS=`sed -f conftest.defs confdefs.h | tr '\012' ' '` -rm -f conftest.defs -]) - -dnl Do the variable substitutions to create the Makefiles or whatever. -dnl This is a subroutine of AC_OUTPUT. It is called inside an unquoted -dnl here document whose contents are going into config.status, but -dnl upon returning, the here document is being quoted. -dnl AC_OUTPUT_FILES(FILE...) -define(AC_OUTPUT_FILES, -[# Protect against being on the right side of a sed subst in config.status. -changequote(, )dnl -sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g; - s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF -changequote([, ])dnl -dnl These here document variables are unquoted when configure runs -dnl but quoted when config.status runs, so variables are expanded once. -$ac_vpsub -dnl Shell code in configure.in might set extrasub. -$extrasub -dnl Insert the sed substitutions of variables. -undivert(AC_DIVERSION_SED) -CEOF -EOF - -cat >> $CONFIG_STATUS <<\EOF - -# Split the substitutions into bite-sized pieces for seds with -# small command number limits, like on Digital OSF/1 and HP-UX. -ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script. -ac_file=1 # Number of current file. -ac_beg=1 # First line for current file. -ac_end=$ac_max_sed_cmds # Line after last line for current file. -ac_more_lines=: -ac_sed_cmds="" -while $ac_more_lines; do - if test $ac_beg -gt 1; then - sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file - else - sed "${ac_end}q" conftest.subs > conftest.s$ac_file - fi - if test ! -s conftest.s$ac_file; then - ac_more_lines=false - rm -f conftest.s$ac_file - else - if test -z "$ac_sed_cmds"; then - ac_sed_cmds="sed -f conftest.s$ac_file" - else - ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file" - fi - ac_file=`expr $ac_file + 1` - ac_beg=$ac_end - ac_end=`expr $ac_end + $ac_max_sed_cmds` - fi -done -if test -z "$ac_sed_cmds"; then - ac_sed_cmds=cat -fi -EOF - -cat >> $CONFIG_STATUS <> $CONFIG_STATUS <<\EOF -for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then -changequote(, )dnl - # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". - case "$ac_file" in - *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'` - ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; - *) ac_file_in="${ac_file}.in" ;; - esac - - # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories. - - # Remove last slash and all that follows it. Not all systems have dirname. - ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'` -changequote([, ])dnl - if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then - # The file is in a subdirectory. - test ! -d "$ac_dir" && mkdir "$ac_dir" - ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`" - # A "../" for each directory in $ac_dir_suffix. -changequote(, )dnl - ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'` -changequote([, ])dnl - else - ac_dir_suffix= ac_dots= - fi - - case "$ac_given_srcdir" in - .) srcdir=. - if test -z "$ac_dots"; then top_srcdir=. - else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;; - /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;; - *) # Relative path. - srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix" - top_srcdir="$ac_dots$ac_given_srcdir" ;; - esac - -ifdef([AC_PROVIDE_AC_PROG_INSTALL], -[ case "$ac_given_INSTALL" in -changequote(, )dnl - [/$]*) INSTALL="$ac_given_INSTALL" ;; -changequote([, ])dnl - *) INSTALL="$ac_dots$ac_given_INSTALL" ;; - esac -])dnl - - echo creating "$ac_file" - rm -f "$ac_file" - configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure." - case "$ac_file" in - *Makefile*) ac_comsub="1i\\ -# $configure_input" ;; - *) ac_comsub= ;; - esac - - ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"` - sed -e "$ac_comsub -s%@configure_input@%$configure_input%g -s%@srcdir@%$srcdir%g -s%@top_srcdir@%$top_srcdir%g -ifdef([AC_PROVIDE_AC_PROG_INSTALL], [s%@INSTALL@%$INSTALL%g -])dnl -dnl The parens around the eval prevent an "illegal io" in Ultrix sh. -" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file -dnl This would break Makefile dependencies. -dnl if cmp -s $ac_file conftest.out 2>/dev/null; then -dnl echo "$ac_file is unchanged" -dnl rm -f conftest.out -dnl else -dnl rm -f $ac_file -dnl mv conftest.out $ac_file -dnl fi -fi; done -rm -f conftest.s* -]) - -dnl Create the config.h files from the config.h.in files. -dnl This is a subroutine of AC_OUTPUT. It is called inside a quoted -dnl here document whose contents are going into config.status. -dnl AC_OUTPUT_HEADER(HEADER-FILE...) -define(AC_OUTPUT_HEADER, -[changequote(<<, >>)dnl -# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where -# NAME is the cpp macro being defined and VALUE is the value it is being given. -# -# ac_d sets the value in "#define NAME VALUE" lines. -ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)' -ac_dB='\([ ][ ]*\)[^ ]*%\1#\2' -ac_dC='\3' -ac_dD='%g' -# ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE". -ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' -ac_uB='\([ ]\)%\1#\2define\3' -ac_uC=' ' -ac_uD='\4%g' -# ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE". -ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' -ac_eB='<<$>>%\1#\2define\3' -ac_eC=' ' -ac_eD='%g' -changequote([, ])dnl - -if test "${CONFIG_HEADERS+set}" != set; then -EOF -dnl Support passing AC_CONFIG_HEADER a value containing shell variables. -cat >> $CONFIG_STATUS <> $CONFIG_STATUS <<\EOF -fi -for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then -changequote(, )dnl - # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". - case "$ac_file" in - *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'` - ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; - *) ac_file_in="${ac_file}.in" ;; - esac -changequote([, ])dnl - - echo creating $ac_file - - rm -f conftest.frag conftest.in conftest.out - ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"` - cat $ac_file_inputs > conftest.in - -EOF - -# Transform confdefs.h into a sed script conftest.vals that substitutes -# the proper values into config.h.in to produce config.h. And first: -# Protect against being on the right side of a sed subst in config.status. -# Protect against being in an unquoted here document in config.status. -rm -f conftest.vals -dnl Using a here document instead of a string reduces the quoting nightmare. -dnl Putting comments in sed scripts is not portable. -cat > conftest.hdr <<\EOF -changequote(<<, >>)dnl -s/[\\&%]/\\&/g -s%[\\$`]%\\&%g -s%<<#define>> \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp -s%ac_d%ac_u%gp -s%ac_u%ac_e%gp -changequote([, ])dnl -EOF -sed -n -f conftest.hdr confdefs.h > conftest.vals -rm -f conftest.hdr - -# This sed command replaces #undef with comments. This is necessary, for -# example, in the case of _POSIX_SOURCE, which is predefined and required -# on some systems where configure will not decide to define it. -cat >> conftest.vals <<\EOF -changequote(, )dnl -s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */% -changequote([, ])dnl -EOF - -# Break up conftest.vals because some shells have a limit on -# the size of here documents, and old seds have small limits too. - -rm -f conftest.tail -while : -do - ac_lines=`grep -c . conftest.vals` - # grep -c gives empty output for an empty file on some AIX systems. - if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi - # Write a limited-size here document to conftest.frag. - echo ' cat > conftest.frag <> $CONFIG_STATUS - sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS - echo 'CEOF - sed -f conftest.frag conftest.in > conftest.out - rm -f conftest.in - mv conftest.out conftest.in -' >> $CONFIG_STATUS - sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail - rm -f conftest.vals - mv conftest.tail conftest.vals -done -rm -f conftest.vals - -dnl Now back to your regularly scheduled config.status. -cat >> $CONFIG_STATUS <<\EOF - rm -f conftest.frag conftest.h - echo "/* $ac_file. Generated automatically by configure. */" > conftest.h - cat conftest.in >> conftest.h - rm -f conftest.in - if cmp -s $ac_file conftest.h 2>/dev/null; then - echo "$ac_file is unchanged" - rm -f conftest.h - else - # Remove last slash and all that follows it. Not all systems have dirname. - changequote(, )dnl - ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'` - changequote([, ])dnl - if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then - # The file is in a subdirectory. - test ! -d "$ac_dir" && mkdir "$ac_dir" - fi - rm -f $ac_file - mv conftest.h $ac_file - fi -fi; done - -]) - -dnl This is a subroutine of AC_OUTPUT. It is called inside a quoted -dnl here document whose contents are going into config.status. -dnl AC_OUTPUT_LINKS(SOURCE..., DEST...) -define(AC_OUTPUT_LINKS, -[EOF - -cat >> $CONFIG_STATUS <> $CONFIG_STATUS <<\EOF -srcdir=$ac_given_srcdir -while test -n "$ac_sources"; do - set $ac_dests; ac_dest=[$]1; shift; ac_dests=[$]* - set $ac_sources; ac_source=[$]1; shift; ac_sources=[$]* - - echo "linking $srcdir/$ac_source to $ac_dest" - - if test ! -r $srcdir/$ac_source; then - AC_MSG_ERROR($srcdir/$ac_source: File not found) - fi - rm -f $ac_dest - - # Make relative symlinks. - # Remove last slash and all that follows it. Not all systems have dirname. -changequote(, )dnl - ac_dest_dir=`echo $ac_dest|sed 's%/[^/][^/]*$%%'` -changequote([, ])dnl - if test "$ac_dest_dir" != "$ac_dest" && test "$ac_dest_dir" != .; then - # The dest file is in a subdirectory. - test ! -d "$ac_dest_dir" && mkdir "$ac_dest_dir" - ac_dest_dir_suffix="/`echo $ac_dest_dir|sed 's%^\./%%'`" - # A "../" for each directory in $ac_dest_dir_suffix. -changequote(, )dnl - ac_dots=`echo $ac_dest_dir_suffix|sed 's%/[^/]*%../%g'` -changequote([, ])dnl - else - ac_dest_dir_suffix= ac_dots= - fi - - case "$srcdir" in -changequote(, )dnl - [/$]*) ac_rel_source="$srcdir/$ac_source" ;; -changequote([, ])dnl - *) ac_rel_source="$ac_dots$srcdir/$ac_source" ;; - esac - - # Make a symlink if possible; otherwise try a hard link. - if ln -s $ac_rel_source $ac_dest 2>/dev/null || - ln $srcdir/$ac_source $ac_dest; then : - else - AC_MSG_ERROR(can not link $ac_dest to $srcdir/$ac_source) - fi -done -]) - -dnl This is a subroutine of AC_OUTPUT. -dnl It is called after running config.status. -dnl AC_OUTPUT_SUBDIRS(DIRECTORY...) -define(AC_OUTPUT_SUBDIRS, -[ -if test "$no_recursion" != yes; then - - # Remove --cache-file and --srcdir arguments so they do not pile up. - ac_sub_configure_args= - ac_prev= - for ac_arg in $ac_configure_args; do - if test -n "$ac_prev"; then - ac_prev= - continue - fi - case "$ac_arg" in - -cache-file | --cache-file | --cache-fil | --cache-fi \ - | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) - ac_prev=cache_file ;; - -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ - | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) - ;; - -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) - ac_prev=srcdir ;; - -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) - ;; - *) ac_sub_configure_args="$ac_sub_configure_args $ac_arg" ;; - esac - done - - for ac_config_dir in $1; do - - # Do not complain, so a configure script can configure whichever - # parts of a large source tree are present. - if test ! -d $srcdir/$ac_config_dir; then - continue - fi - - echo configuring in $ac_config_dir - - case "$srcdir" in - .) ;; - *) - if test -d ./$ac_config_dir || mkdir ./$ac_config_dir; then :; - else - AC_MSG_ERROR(can not create `pwd`/$ac_config_dir) - fi - ;; - esac - - ac_popdir=`pwd` - cd $ac_config_dir - -changequote(, )dnl - # A "../" for each directory in /$ac_config_dir. - ac_dots=`echo $ac_config_dir|sed -e 's%^\./%%' -e 's%[^/]$%&/%' -e 's%[^/]*/%../%g'` -changequote([, ])dnl - - case "$srcdir" in - .) # No --srcdir option. We are building in place. - ac_sub_srcdir=$srcdir ;; - /*) # Absolute path. - ac_sub_srcdir=$srcdir/$ac_config_dir ;; - *) # Relative path. - ac_sub_srcdir=$ac_dots$srcdir/$ac_config_dir ;; - esac - - # Check for guested configure; otherwise get Cygnus style configure. - if test -f $ac_sub_srcdir/configure; then - ac_sub_configure=$ac_sub_srcdir/configure - elif test -f $ac_sub_srcdir/configure.in; then - ac_sub_configure=$ac_configure - else - AC_MSG_WARN(no configuration information is in $ac_config_dir) - ac_sub_configure= - fi - - # The recursion is here. - if test -n "$ac_sub_configure"; then - - # Make the cache file name correct relative to the subdirectory. - case "$cache_file" in - /*) ac_sub_cache_file=$cache_file ;; - *) # Relative path. - ac_sub_cache_file="$ac_dots$cache_file" ;; - esac -ifdef([AC_PROVIDE_AC_PROG_INSTALL], - [ case "$ac_given_INSTALL" in -changequote(, )dnl - [/$]*) INSTALL="$ac_given_INSTALL" ;; -changequote([, ])dnl - *) INSTALL="$ac_dots$ac_given_INSTALL" ;; - esac -])dnl - - echo "[running ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file] --srcdir=$ac_sub_srcdir" - # The eval makes quoting arguments work. - if eval ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir - then : - else - AC_MSG_ERROR($ac_sub_configure failed for $ac_config_dir) - fi - fi - - cd $ac_popdir - done -fi -]) diff -Nru cdrtools-2.01.01a33/cdda2wav/aclocal.m4 cdrtools-3.02a09/cdda2wav/aclocal.m4 --- cdrtools-2.01.01a33/cdda2wav/aclocal.m4 2007-05-23 10:13:32.000000000 +0000 +++ cdrtools-3.02a09/cdda2wav/aclocal.m4 1970-01-01 00:00:00.000000000 +0000 @@ -1,2356 +0,0 @@ -dnl @(#)aclocal.m4 1.58 07/05/23 Copyright 1998 J. Schilling - -dnl Set VARIABLE to VALUE in C-string form, verbatim, or 1. -dnl AC_DEFINE_STRING(VARIABLE [, VALUE]) -define(AC_DEFINE_STRING, -[cat >> confdefs.h <<\EOF -[#define] $1 ifelse($#, 2, "[$2]", $#, 3, "[$2]", 1) -EOF -]) - -dnl Similar, but perform shell substitutions $ ` \ once on VALUE. -define(AC_DEFINE_UNQUOTED_STRING, -[cat >> confdefs.h <>)dnl -<<(^|[^a-zA-Z_0-9])$2[^a-zA-Z_0-9]>>dnl -changequote([,]), [#include -#if STDC_HEADERS -#include -#include -#endif -$1], ac_cv_have_type_$2=yes, ac_cv_have_type_$2=no)])dnl -AC_MSG_RESULT($ac_cv_have_type_$2) -changequote(, )dnl - ac_tr_type=HAVE_TYPE_`echo $2 | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` -changequote([, ])dnl -if test $ac_cv_have_type_$2 = yes; then - AC_DEFINE_UNQUOTED($ac_tr_type) -fi -]) - -dnl Checks if /bin/sh is bash -dnl Defines SHELL_IS_BASH on success. -AC_DEFUN([AC_SHELL_BASH], -[AC_CACHE_CHECK([if /bin/sh is bash], ac_cv_shell_is_bash, - [ -ac_err=`< /dev/null sh -version 2> /dev/null | grep bash` -if test -n "$ac_err"; then - ac_cv_shell_is_bash=yes -else - ac_cv_shell_is_bash=no -fi -]) -if test $ac_cv_shell_is_bash = yes; then - AC_DEFINE(SHELL_IS_BASH) -fi]) - -dnl XXX this used to be: -dnl #ifndef $2 -dnl char *p = (char *) $2; -dnl #endif -dnl but we use this test un order to check whether we are able to get the -dnl address of a function from this name, so we did replace this by: -dnl char *p = (char *) $2; -dnl -dnl AC_CHECK_DECLARE(INCLUDES, SYMBOL) -dnl Checks if symbol is declared -dnl Defines HAVE_DECL_SYMBOL on success. -AC_DEFUN([AC_CHECK_DECLARE], -[AC_CACHE_CHECK([if $2 is declared], ac_cv_have_decl_$2, - [AC_TRY_COMPILE([$1], -[ char *p = (char *) $2; ], - [ac_cv_have_decl_$2=yes], - [ac_cv_have_decl_$2=no])]) -changequote(, )dnl - ac_tr_decl=HAVE_DECL_`echo $2 | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` -changequote([, ])dnl -if test $ac_cv_have_decl_$2 = yes; then - AC_DEFINE_UNQUOTED($ac_tr_decl) -fi]) - -dnl AC_CHECK_DFUNC(INCLUDES, SYMBOL) -dnl Checks if symbol is defined or a function -dnl Defines HAVE_SYMBOL on success. -AC_DEFUN([AC_CHECK_DFUNC], -[AC_CACHE_CHECK([if $2 is defined or function], ac_cv_have_$2, - [AC_TRY_LINK([$1], -[ -#ifndef $2 - char *p = (char *) $2; -#endif], - [ac_cv_have_$2=yes], - [ac_cv_have_$2=no])]) -changequote(, )dnl - ac_tr_dfunc=HAVE_`echo $2 | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` -changequote([, ])dnl -if test $ac_cv_have_$2 = yes; then - AC_DEFINE_UNQUOTED($ac_tr_dfunc) -fi]) - -dnl Checks if structure 'stat' have field 'st_spare1'. -dnl Defines HAVE_ST_SPARE1 on success. -AC_DEFUN([AC_STRUCT_ST_SPARE1], -[AC_CACHE_CHECK([if struct stat contains st_spare1], ac_cv_struct_st_spare1, - [AC_TRY_COMPILE([#include -#include ], - [struct stat s; s.st_spare1 = 0;], - [ac_cv_struct_st_spare1=yes], - [ac_cv_struct_st_spare1=no])]) -if test $ac_cv_struct_st_spare1 = yes; then - AC_DEFINE(HAVE_ST_SPARE1) -fi]) - -dnl Checks if structure 'stat' have field 'st_atimensec'. -dnl Defines HAVE_ST_ATIMENSEC on success. -AC_DEFUN([AC_STRUCT_ST_ATIMENSEC], -[AC_CACHE_CHECK([if struct stat contains st_atimensec], ac_cv_struct_st_atimensec, - [AC_TRY_COMPILE([#include -#include ], - [struct stat s; s.st_atimensec = 0;], - [ac_cv_struct_st_atimensec=yes], - [ac_cv_struct_st_atimensec=no])]) -if test $ac_cv_struct_st_atimensec = yes; then - AC_DEFINE(HAVE_ST_ATIMENSEC) -fi]) - -dnl Checks if structure 'stat' have field 'st_atim.tv_nsec'. -dnl Defines HAVE_ST_NSEC on success. -AC_DEFUN([AC_STRUCT_ST_NSEC], -[AC_CACHE_CHECK([if struct stat contains st_atim.tv_nsec], ac_cv_struct_st_nsec, - [AC_TRY_COMPILE([#include -#include ], - [struct stat s; s.st_atim.tv_nsec = 0;], - [ac_cv_struct_st_nsec=yes], - [ac_cv_struct_st_nsec=no])]) -if test $ac_cv_struct_st_nsec = yes; then - AC_DEFINE(HAVE_ST_NSEC) -fi]) - -dnl Checks if structure 'stat' have field 'st_atim.st__tim.tv_nsec'. -dnl Defines HAVE_ST__TIM on success. -AC_DEFUN([AC_STRUCT_ST__TIM], -[AC_CACHE_CHECK([if struct stat contains st_atim.st__tim.tv_nsec], ac_cv_struct_st__tim, - [AC_TRY_COMPILE([#include -#include ], - [struct stat s; s.st_atim.st__tim.tv_nsec = 0;], - [ac_cv_struct_st__tim=yes], - [ac_cv_struct_st__tim=no])]) -if test $ac_cv_struct_st__tim = yes; then - AC_DEFINE(HAVE_ST__TIM) -fi]) - -dnl Checks if structure 'stat' have field 'st_atimspec.tv_nsec'. -dnl Defines HAVE_ST_ATIMESPEC on success. -AC_DEFUN([AC_STRUCT_ST_ATIMESPEC], -[AC_CACHE_CHECK([if struct stat contains st_atimespec.tv_nsec], ac_cv_struct_st_atimespec, - [AC_TRY_COMPILE([#include -#include ], - [struct stat s; s.st_atimespec.tv_nsec = 0;], - [ac_cv_struct_st_atimespec=yes], - [ac_cv_struct_st_atimespec=no])]) -if test $ac_cv_struct_st_atimespec = yes; then - AC_DEFINE(HAVE_ST_ATIMESPEC) -fi]) - -dnl Checks if structure 'stat' have field 'st_flags'. -dnl Defines HAVE_ST_FLAGS on success. -AC_DEFUN([AC_STRUCT_ST_FLAGS], -[AC_CACHE_CHECK([if struct stat contains st_flags], ac_cv_struct_st_flags, - [AC_TRY_COMPILE([#include -#include ], - [struct stat s; s.st_flags = 0;], - [ac_cv_struct_st_flags=yes], - [ac_cv_struct_st_flags=no])]) -if test $ac_cv_struct_st_flags = yes; then - AC_DEFINE(HAVE_ST_FLAGS) -fi]) - -dnl Checks if structure 'stat' have field 'st_fstype'. -dnl Defines HAVE_ST_FSTYPE on success. -AC_DEFUN([AC_STRUCT_ST_FSTYPE], -[AC_CACHE_CHECK([if struct stat contains st_fstype], ac_cv_struct_st_fstype, - [AC_TRY_COMPILE([#include -#include ], - [struct stat s; s.st_fstype[0] = 0;], - [ac_cv_struct_st_fstype=yes], - [ac_cv_struct_st_fstype=no])]) -if test $ac_cv_struct_st_fstype = yes; then - AC_DEFINE(HAVE_ST_FSTYPE) -fi]) - -dnl Checks if structure 'stat' have field 'st_aclcnt'. -dnl Defines HAVE_ST_ACLCNT on success. -AC_DEFUN([AC_STRUCT_ST_ACLCNT], -[AC_CACHE_CHECK([if struct stat contains st_aclcnt], ac_cv_struct_st_aclcnt, - [AC_TRY_COMPILE([#include -#include ], - [struct stat s; s.st_aclcnt = 0;], - [ac_cv_struct_st_aclcnt=yes], - [ac_cv_struct_st_aclcnt=no])]) -if test $ac_cv_struct_st_aclcnt = yes; then - AC_DEFINE(HAVE_ST_ACLCNT) -fi]) - -dnl Checks if structure 'utsname' have field 'processor'. -dnl Defines HAVE_UTSNAME_PROCESSOR on success. -AC_DEFUN([AC_STRUCT_UTSNAME_PROCESSOR], -[AC_CACHE_CHECK([if struct utsname contains processor], ac_cv_struct_utsname_processor, - [AC_TRY_COMPILE([#include ], - [struct utsname u; u.processor[0] = 0;], - [ac_cv_struct_utsname_processor=yes], - [ac_cv_struct_utsname_processor=no])]) -if test $ac_cv_struct_utsname_processor = yes; then - AC_DEFINE(HAVE_UTSNAME_PROCESSOR) -fi]) - -dnl Checks if structure 'utsname' have field 'sysname_host'. -dnl Defines HAVE_UTSNAME_SYSNAME_HOST on success. -AC_DEFUN([AC_STRUCT_UTSNAME_SYSNAME_HOST], -[AC_CACHE_CHECK([if struct utsname contains sysname_host], ac_cv_struct_utsname_sysname_host, - [AC_TRY_COMPILE([#include ], - [struct utsname u; u.sysname_host[0] = 0;], - [ac_cv_struct_utsname_sysname_host=yes], - [ac_cv_struct_utsname_sysname_host=no])]) -if test $ac_cv_struct_utsname_sysname_host = yes; then - AC_DEFINE(HAVE_UTSNAME_SYSNAME_HOST) -fi]) - -dnl Checks if structure 'utsname' have field 'release_host'. -dnl Defines HAVE_UTSNAME_RELEASE_HOST on success. -AC_DEFUN([AC_STRUCT_UTSNAME_RELEASE_HOST], -[AC_CACHE_CHECK([if struct utsname contains release_host], ac_cv_struct_utsname_release_host, - [AC_TRY_COMPILE([#include ], - [struct utsname u; u.release_host[0] = 0;], - [ac_cv_struct_utsname_release_host=yes], - [ac_cv_struct_utsname_release_host=no])]) -if test $ac_cv_struct_utsname_release_host = yes; then - AC_DEFINE(HAVE_UTSNAME_RELEASE_HOST) -fi]) - -dnl Checks if structure 'utsname' have field 'version_host'. -dnl Defines HAVE_UTSNAME_VERSION_HOST on success. -AC_DEFUN([AC_STRUCT_UTSNAME_VERSION_HOST], -[AC_CACHE_CHECK([if struct utsname contains version_host], ac_cv_struct_utsname_version_host, - [AC_TRY_COMPILE([#include ], - [struct utsname u; u.version_host[0] = 0;], - [ac_cv_struct_utsname_version_host=yes], - [ac_cv_struct_utsname_version_host=no])]) -if test $ac_cv_struct_utsname_version_host = yes; then - AC_DEFINE(HAVE_UTSNAME_VERSION_HOST) -fi]) - -dnl Checks if structure 'mtget' have field 'mt_type'. -dnl Defines HAVE_MTGET_TYPE on success. -AC_DEFUN([AC_STRUCT_MTGET_TYPE], -[AC_CACHE_CHECK([if struct mtget contains mt_type], ac_cv_struct_mtget_type, - [AC_TRY_COMPILE([#include -#include ], - [struct mtget t; t.mt_type = 0;], - [ac_cv_struct_mtget_type=yes], - [ac_cv_struct_mtget_type=no])]) -if test $ac_cv_struct_mtget_type = yes; then - AC_DEFINE(HAVE_MTGET_TYPE) -fi]) - -dnl Checks if structure 'mtget' have field 'mt_model'. -dnl Defines HAVE_MTGET_MODEL on success. -AC_DEFUN([AC_STRUCT_MTGET_MODEL], -[AC_CACHE_CHECK([if struct mtget contains mt_model], ac_cv_struct_mtget_model, - [AC_TRY_COMPILE([#include -#include ], - [struct mtget t; t.mt_model = 0;], - [ac_cv_struct_mtget_model=yes], - [ac_cv_struct_mtget_model=no])]) -if test $ac_cv_struct_mtget_model = yes; then - AC_DEFINE(HAVE_MTGET_MODEL) -fi]) - -dnl Checks if structure 'mtget' have field 'mt_dsreg'. -dnl Defines HAVE_MTGET_DSREG on success. -AC_DEFUN([AC_STRUCT_MTGET_DSREG], -[AC_CACHE_CHECK([if struct mtget contains mt_dsreg], ac_cv_struct_mtget_dsreg, - [AC_TRY_COMPILE([#include -#include ], - [struct mtget t; t.mt_dsreg = 0;], - [ac_cv_struct_mtget_dsreg=yes], - [ac_cv_struct_mtget_dsreg=no])]) -if test $ac_cv_struct_mtget_dsreg = yes; then - AC_DEFINE(HAVE_MTGET_DSREG) -fi]) - -dnl Checks if structure 'mtget' have field 'mt_dsreg1'. -dnl Defines HAVE_MTGET_DSREG on success. -AC_DEFUN([AC_STRUCT_MTGET_DSREG1], -[AC_CACHE_CHECK([if struct mtget contains mt_dsreg1], ac_cv_struct_mtget_dsreg1, - [AC_TRY_COMPILE([#include -#include ], - [struct mtget t; t.mt_dsreg1 = 0;], - [ac_cv_struct_mtget_dsreg1=yes], - [ac_cv_struct_mtget_dsreg1=no])]) -if test $ac_cv_struct_mtget_dsreg1 = yes; then - AC_DEFINE(HAVE_MTGET_DSREG1) -fi]) - -dnl Checks if structure 'mtget' have field 'mt_dsreg2'. -dnl Defines HAVE_MTGET_DSREG2 on success. -AC_DEFUN([AC_STRUCT_MTGET_DSREG2], -[AC_CACHE_CHECK([if struct mtget contains mt_dsreg2], ac_cv_struct_mtget_dsreg2, - [AC_TRY_COMPILE([#include -#include ], - [struct mtget t; t.mt_dsreg2 = 0;], - [ac_cv_struct_mtget_dsreg2=yes], - [ac_cv_struct_mtget_dsreg2=no])]) -if test $ac_cv_struct_mtget_dsreg2 = yes; then - AC_DEFINE(HAVE_MTGET_DSREG2) -fi]) - -dnl Checks if structure 'mtget' have field 'mt_gstat'. -dnl Defines HAVE_MTGET_GSTAT on success. -AC_DEFUN([AC_STRUCT_MTGET_GSTAT], -[AC_CACHE_CHECK([if struct mtget contains mt_gstat], ac_cv_struct_mtget_gstat, - [AC_TRY_COMPILE([#include -#include ], - [struct mtget t; t.mt_gstat = 0;], - [ac_cv_struct_mtget_gstat=yes], - [ac_cv_struct_mtget_gstat=no])]) -if test $ac_cv_struct_mtget_gstat = yes; then - AC_DEFINE(HAVE_MTGET_GSTAT) -fi]) - -dnl Checks if structure 'mtget' have field 'mt_erreg'. -dnl Defines HAVE_MTGET_ERREG on success. -AC_DEFUN([AC_STRUCT_MTGET_ERREG], -[AC_CACHE_CHECK([if struct mtget contains mt_erreg], ac_cv_struct_mtget_erreg, - [AC_TRY_COMPILE([#include -#include ], - [struct mtget t; t.mt_erreg = 0;], - [ac_cv_struct_mtget_erreg=yes], - [ac_cv_struct_mtget_erreg=no])]) -if test $ac_cv_struct_mtget_erreg = yes; then - AC_DEFINE(HAVE_MTGET_ERREG) -fi]) - -dnl Checks if structure 'mtget' have field 'mt_resid'. -dnl Defines HAVE_MTGET_RESID on success. -AC_DEFUN([AC_STRUCT_MTGET_RESID], -[AC_CACHE_CHECK([if struct mtget contains mt_resid], ac_cv_struct_mtget_resid, - [AC_TRY_COMPILE([#include -#include ], - [struct mtget t; t.mt_resid = 0;], - [ac_cv_struct_mtget_resid=yes], - [ac_cv_struct_mtget_resid=no])]) -if test $ac_cv_struct_mtget_resid = yes; then - AC_DEFINE(HAVE_MTGET_RESID) -fi]) - -dnl Checks if structure 'mtget' have field 'mt_fileno'. -dnl Defines HAVE_MTGET_FILENO on success. -AC_DEFUN([AC_STRUCT_MTGET_FILENO], -[AC_CACHE_CHECK([if struct mtget contains mt_fileno], - ac_cv_struct_mtget_fileno, - [AC_TRY_COMPILE([#include -#include ], - [struct mtget t; t.mt_fileno = 0;], - [ac_cv_struct_mtget_fileno=yes], - [ac_cv_struct_mtget_fileno=no])]) -if test $ac_cv_struct_mtget_fileno = yes; then - AC_DEFINE(HAVE_MTGET_FILENO) -fi]) - -dnl Checks if structure 'mtget' have field 'mt_blkno'. -dnl Defines HAVE_MTGET_BLKNO on success. -AC_DEFUN([AC_STRUCT_MTGET_BLKNO], -[AC_CACHE_CHECK([if struct mtget contains mt_blkno], ac_cv_struct_mtget_blkno, - [AC_TRY_COMPILE([#include -#include ], - [struct mtget t; t.mt_blkno = 0;], - [ac_cv_struct_mtget_blkno=yes], - [ac_cv_struct_mtget_blkno=no])]) -if test $ac_cv_struct_mtget_blkno = yes; then - AC_DEFINE(HAVE_MTGET_BLKNO) -fi]) - -dnl Checks if structure 'mtget' have field 'mt_flags'. -dnl Defines HAVE_MTGET_FLAGS on success. -AC_DEFUN([AC_STRUCT_MTGET_FLAGS], -[AC_CACHE_CHECK([if struct mtget contains mt_flags], ac_cv_struct_mtget_flags, - [AC_TRY_COMPILE([#include -#include ], - [struct mtget t; t.mt_flags = 0;], - [ac_cv_struct_mtget_flags=yes], - [ac_cv_struct_mtget_flags=no])]) -if test $ac_cv_struct_mtget_flags = yes; then - AC_DEFINE(HAVE_MTGET_FLAGS) -fi]) - -dnl Checks if structure 'mtget' have field 'mt_bf'. -dnl Defines HAVE_MTGET_BF on success. -AC_DEFUN([AC_STRUCT_MTGET_BF], -[AC_CACHE_CHECK([if struct mtget contains mt_bf], ac_cv_struct_mtget_bf, - [AC_TRY_COMPILE([#include -#include ], - [struct mtget t; t.mt_bf = 0;], - [ac_cv_struct_mtget_bf=yes], - [ac_cv_struct_mtget_bf=no])]) -if test $ac_cv_struct_mtget_bf = yes; then - AC_DEFINE(HAVE_MTGET_BF) -fi]) - -dnl Checks for illegal declaration of 'union semun' in sys/sem.h. -dnl Defines HAVE_UNION_SEMUN on success. -AC_DEFUN([AC_STRUCT_UNION_SEMUN], -[AC_CACHE_CHECK([if an illegal declaration for union semun in sys/sem.h exists], ac_cv_struct_union_semun, - [AC_TRY_COMPILE([#include -#include -#include ], [union semun s;], - [ac_cv_struct_union_semun=yes], - [ac_cv_struct_union_semun=no])]) -if test $ac_cv_struct_union_semun = yes; then - AC_DEFINE(HAVE_UNION_SEMUN) -fi]) - -dnl Checks if 'union wait' is declared in 'wait.h' or 'sys/wait.h'. -dnl Defines HAVE_UNION_WAIT on success. -AC_DEFUN([AC_STRUCT_UNION_WAIT], -[AC_CACHE_CHECK([if union wait is declared in wait.h or sys/wait.h], ac_cv_struct_union_wait, - [AC_TRY_COMPILE([#include -#if defined(HAVE_WAIT_H) -# include -#else -#include -#endif], [union wait w;], - [ac_cv_struct_union_wait=yes], - [ac_cv_struct_union_wait=no])]) -if test $ac_cv_struct_union_wait = yes; then - AC_DEFINE(HAVE_UNION_WAIT) -fi]) - -dnl Checks if 'struct rusage' is declared in sys/resource.h. -dnl Defines HAVE_STRUCT_RUSAGE on success. -AC_DEFUN([AC_STRUCT_RUSAGE], -[AC_CACHE_CHECK([if struct rusage is declared in sys/resource.h], ac_cv_struct_rusage, - [AC_TRY_COMPILE([#include -#include ], [struct rusage r;], - [ac_cv_struct_rusage=yes], - [ac_cv_struct_rusage=no])]) -if test $ac_cv_struct_rusage = yes; then - AC_DEFINE(HAVE_STRUCT_RUSAGE) -fi]) - -dnl Checks if structure 'siginfo' have field 'si_utime'. -dnl Defines HAVE_SI_UTIME on success. -AC_DEFUN([AC_STRUCT_SI_UTIME], -[AC_CACHE_CHECK([if struct siginfo contains si_utime], ac_cv_struct_si_utime, - [AC_TRY_COMPILE([#include -#include ], - [struct siginfo si; si.si_utime = 0;], - [ac_cv_struct_si_utime=yes], - [ac_cv_struct_si_utime=no])]) -if test $ac_cv_struct_si_utime = yes; then - AC_DEFINE(HAVE_SI_UTIME) -fi]) - - -dnl Checks if structure 'dirent' have field 'd_ino'. -dnl Defines HAVE_DIRENT_D_INO on success. -AC_DEFUN([AC_STRUCT_DIRENT_D_INO], -[AC_CACHE_CHECK([if struct dirent contains d_ino], ac_cv_struct_dirent_d_ino, - [AC_TRY_COMPILE([ -/* - * This must be kept in sync with schily/dirdesf.h - */ -#ifdef HAVE_SYS_TYPES_H -# include -#endif -#ifdef HAVE_SYS_STAT_H -# include -#endif -# ifdef HAVE_DIRENT_H /* This a POSIX compliant system */ -# include -# define _FOUND_DIR_ -# else /* This is a Pre POSIX system */ - -# define dirent direct - -# if defined(HAVE_SYS_DIR_H) -# include -# define _FOUND_DIR_ -# endif - -# if defined(HAVE_NDIR_H) && !defined(_FOUND_DIR_) -# include -# define _FOUND_DIR_ -# endif - -# if defined(HAVE_SYS_NDIR_H) && !defined(_FOUND_DIR_) -# include -# define _FOUND_DIR_ -# endif -# endif /* HAVE_DIRENT_H */ - ], - [struct dirent d; d.d_ino = 0;], - [ac_cv_struct_dirent_d_ino=yes], - [ac_cv_struct_dirent_d_ino=no])]) -if test $ac_cv_struct_dirent_d_ino = yes; then - AC_DEFINE(HAVE_DIRENT_D_INO) -fi]) - -dnl Checks if structure 'DIR' have field 'dd_fd'. -dnl Defines HAVE_DIR_DD_FD on success. -AC_DEFUN([AC_STRUCT_DIR_DD_FD], -[AC_CACHE_CHECK([if DIR * contains dd_fd], ac_cv_struct_dir_dd_fd, - [AC_TRY_COMPILE([#include ], - [DIR d; d.dd_fd = 0;], - [ac_cv_struct_dir_dd_fd=yes], - [ac_cv_struct_dir_dd_fd=no])]) -if test $ac_cv_struct_dir_dd_fd = yes; then - AC_DEFINE(HAVE_DIR_DD_FD) -fi]) - -dnl Checks wether major(), minor() and makedev() are defined in -dnl 'sys/mkdev.h' or in 'sys/sysmacros.h. Defines MAJOR_IN_MKDEV or -dnl MAJOR_IN_SYSMACROS or nothing. -AC_DEFUN([AC_HEADER_MAKEDEV], -[AC_CACHE_CHECK([for header file containing major(), minor() and makedev()], - ac_cv_header_makedev, -[ac_cv_header_makedev=none -AC_TRY_COMPILE([#include -#include ], - [int i = major(0); i = minor(0); i = makedev(0,0);], - [ac_cv_header_makedev=sys/mkdev.h]) -if test $ac_cv_header_makedev = none; then - AC_TRY_COMPILE([#include -#include ], - [int i = major(0); i = minor(0); i = makedev(0,0);], - [ac_cv_header_makedev=sys/sysmacros.h]) -fi]) -if test $ac_cv_header_makedev = sys/mkdev.h; then - AC_DEFINE(MAJOR_IN_MKDEV) -fi -if test $ac_cv_header_makedev = sys/sysmacros.h; then - AC_DEFINE(MAJOR_IN_SYSMACROS) -fi]) - -dnl Checks for USG derived STDIO that uses _filbuf() -dnl Defines HAVE__FILBUF on success. -AC_DEFUN([AC_HEADER__FILBUF], -[AC_CACHE_CHECK([for _filbuf()], ac_cv_func__filbuf, - [AC_TRY_LINK([#include ], -[FILE *f; -int flag; -int count; -char *ptr; -char c = 0; -f = fopen("confdefs.h", "r"); -_filbuf(f); -_flsbuf(c, f); -flag = f->_flag & _IONBF; -flag |= f->_flag & _IOERR; -flag |= f->_flag & _IOEOF; -count = f->_cnt; -ptr = (char *)f->_ptr; -fclose(f);], - [ac_cv_func__filbuf=yes], - [ac_cv_func__filbuf=no])]) -if test $ac_cv_func__filbuf = yes; then - AC_DEFINE(HAVE__FILBUF) -fi]) - -dnl Checks for USG derived STDIO that uses __filbuf() -dnl Defines HAVE___FILBUF on success. -AC_DEFUN([AC_HEADER___FILBUF], -[AC_CACHE_CHECK([for __filbuf()], ac_cv_func___filbuf, - [AC_TRY_LINK([#include ], -[FILE *f; -int flag; -int count; -char *ptr; -char c = 0; -f = fopen("confdefs.h", "r"); -__filbuf(f); -__flsbuf(c, f); -flag = f->_flag & _IONBF; -flag |= f->_flag & _IOERR; -flag |= f->_flag & _IOEOF; -count = f->_cnt; -ptr = (char *)f->_ptr; -fclose(f);], - [ac_cv_func___filbuf=yes], - [ac_cv_func___filbuf=no])]) -if test $ac_cv_func___filbuf = yes; then - AC_DEFINE(HAVE___FILBUF) -fi]) - -dnl Checks for USG derived STDIO -dnl Defines HAVE_USG_STDIO on success. -AC_DEFUN([AC_HEADER_USG_STDIO], -[AC_REQUIRE([AC_HEADER__FILBUF])AC_REQUIRE([AC_HEADER___FILBUF])dnl -AC_CACHE_CHECK([for USG derived STDIO], ac_cv_header_usg_stdio, - [AC_TRY_LINK([#include ], -[FILE *f; -int flag; -int count; -char *ptr; -char c = 0; -f = fopen("confdefs.h", "r"); -#ifdef HAVE___FILBUF -__filbuf(f); -__flsbuf(c, f); -#else -# ifdef HAVE__FILBUF -_filbuf(f); -_flsbuf(c, f); -# else -no filbuf() -# endif -#endif -flag = f->_flag & _IONBF; -flag |= f->_flag & _IOERR; -flag |= f->_flag & _IOEOF; -count = f->_cnt; -ptr = (char *)f->_ptr; -fclose(f);], - [ac_cv_header_usg_stdio=yes], - [ac_cv_header_usg_stdio=no])]) -if test $ac_cv_header_usg_stdio = yes; then - AC_DEFINE(HAVE_USG_STDIO) -fi]) - -dnl Checks for errno definition in -dnl Defines HAVE_ERRNO_DEF on success. -AC_DEFUN([AC_HEADER_ERRNO_DEF], -[AC_CACHE_CHECK([for errno definition in errno.h], ac_cv_header_errno_def, - [AC_TRY_COMPILE([#include ], -[errno = 0;], - [ac_cv_header_errno_def=yes], - [ac_cv_header_errno_def=no])]) -if test $ac_cv_header_errno_def = yes; then - AC_DEFINE(HAVE_ERRNO_DEF) -fi]) - -dnl Checks if extern long timezone exists in libc -dnl Defines HAVE_VAR_TIMEZONE on success. -AC_DEFUN([AC_VAR_TIMEZONE], -[AC_CACHE_CHECK([for working extern long timezone ], ac_cv_var_timezone, - [AC_TRY_RUN([ -extern long timezone; - -int -main() -{ - exit(timezone != 0); -}], - [ac_cv_var_timezone=yes], - [ac_cv_var_timezone=no])]) -if test $ac_cv_var_timezone = yes; then - AC_DEFINE(HAVE_VAR_TIMEZONE) -fi]) - -dnl Checks for UNIX-98 compliant -dnl Defines HAVE_INTTYPES_H on success. -AC_DEFUN([AC_HEADER_INTTYPES], -[AC_CACHE_CHECK([for UNIX-98 compliant inttypes.h], ac_cv_header_inttypes, - [AC_TRY_COMPILE([#include ], -[int8_t c; uint8_t uc; int16_t s; uint16_t us; int32_t i; uint32_t ui; -int64_t ll; uint64_t ull; -intptr_t ip; uintptr_t uip;], - [ac_cv_header_inttypes=yes], - [ac_cv_header_inttypes=no])]) -if test $ac_cv_header_inttypes = yes; then - AC_DEFINE(HAVE_INTTYPES_H) -fi]) - -dnl Checks for struct timeval in time.h or sys/time.h -dnl Defines HAVE_STRUCT_TIMEVAL on success. -AC_DEFUN([AC_STRUCT_TIMEVAL], -[AC_REQUIRE([AC_HEADER_TIME])dnl -AC_CACHE_CHECK([for struct timeval in time.h or sys/time.h], ac_cv_struct_timeval, - [AC_TRY_COMPILE([ -#include -#ifdef TIME_WITH_SYS_TIME_H -# include -# include -#else -#ifdef HAVE_SYS_TIME_H -# include -#else -# include -#endif -#endif], [struct timeval tv;], - [ac_cv_struct_timeval=yes], - [ac_cv_struct_timeval=no])]) -if test $ac_cv_struct_timeval = yes; then - AC_DEFINE(HAVE_STRUCT_TIMEVAL) -fi]) - -dnl Checks for struct timezone in time.h or sys/time.h -dnl Defines HAVE_STRUCT_TIMEZONE on success. -AC_DEFUN([AC_STRUCT_TIMEZONE], -[AC_REQUIRE([AC_HEADER_TIME])dnl -AC_CACHE_CHECK([for struct timezone in time.h or sys/time.h], ac_cv_struct_timezone, - [AC_TRY_COMPILE([ -#include -#ifdef TIME_WITH_SYS_TIME_H -# include -# include -#else -#ifdef HAVE_SYS_TIME_H -# include -#else -# include -#endif -#endif], [struct timezone tz;], - [ac_cv_struct_timezone=yes], - [ac_cv_struct_timezone=no])]) -if test $ac_cv_struct_timezone = yes; then - AC_DEFINE(HAVE_STRUCT_TIMEZONE) -fi]) - -dnl Checks for type time_t -dnl Defines time_t to long on failure. -AC_DEFUN([AC_TYPE_TIME_T], -[AC_REQUIRE([AC_HEADER_TIME])dnl -AC_CACHE_CHECK([for time_t], ac_cv_type_time_t, - [AC_TRY_COMPILE([ -#include -#ifdef TIME_WITH_SYS_TIME_H -# include -# include -#else -#ifdef HAVE_SYS_TIME_H -# include -#else -# include -#endif -#endif], [time_t t;], - [ac_cv_type_time_t=yes], - [ac_cv_type_time_t=no])]) -if test $ac_cv_type_time_t = no; then - AC_DEFINE(time_t, long) -fi]) - -dnl Checks for type clock_t -dnl Defines clock_t to long on failure. -dnl XXX we cannot check for AC_CHECK_HEADERS(sys/times.h) -AC_DEFUN([AC_TYPE_CLOCK_T], -[AC_REQUIRE([AC_HEADER_TIME])dnl -AC_CACHE_CHECK([for clock_t], ac_cv_type_clock_t, - [AC_TRY_COMPILE([ -#include -/* - * time.h is needed because of a bug in Next Step. - * Next Step needs time.h for clock_t - */ -#ifdef TIME_WITH_SYS_TIME -# ifndef _INCL_SYS_TIME_H -# include -# define _INCL_SYS_TIME_H -# endif -# ifndef _INCL_TIME_H -# include -# define _INCL_TIME_H -# endif -#else -#ifdef HAVE_SYS_TIME_H -# ifndef _INCL_SYS_TIME_H -# include -# define _INCL_SYS_TIME_H -# endif -#else -# ifndef _INCL_TIME_H -# include -# define _INCL_TIME_H -# endif -#endif -#endif -#ifdef HAVE_SYS_TIMES_H -#include -#endif - ], [clock_t t;], - [ac_cv_type_clock_t=yes], - [ac_cv_type_clock_t=no])]) -if test $ac_cv_type_clock_t = no; then - AC_DEFINE(clock_t, long) -fi]) - -dnl Checks for type socklen_t -dnl Defines socklen_t to int on failure. -AC_DEFUN([AC_TYPE_SOCKLEN_T], -[AC_REQUIRE([AC_HEADER_STDC])dnl -AC_MSG_CHECKING(for socklen_t) -AC_CACHE_VAL(ac_cv_type_socklen_t, -[AC_EGREP_CPP(dnl -changequote(<<,>>)dnl -<<(^|[^a-zA-Z_0-9])socklen_t[^a-zA-Z_0-9]>>dnl -changequote([,]), [#include -#if STDC_HEADERS -#include -#include -#endif -#include ], ac_cv_type_socklen_t=yes, ac_cv_type_socklen_t=no)])dnl -AC_MSG_RESULT($ac_cv_type_socklen_t) -if test $ac_cv_type_socklen_t = no; then - AC_DEFINE(socklen_t, int) -fi]) - -dnl Checks for type struct sockaddr_storage -dnl Defines HAVE_SOCKADDR_STORAGE on success. -AC_DEFUN([AC_STRUCT_SOCKADDR_STORAGE], -[AC_CACHE_CHECK([if struct sockaddr_storage is declared in socket.h], ac_cv_struct_sockaddr_storage, - [AC_TRY_COMPILE([#include ], - [struct sockaddr_storage ss; ss.ss_family = 0;], - [ac_cv_struct_sockaddr_storage=yes], - [ac_cv_struct_sockaddr_storage=no])]) -if test $ac_cv_struct_sockaddr_storage = yes; then - AC_DEFINE(HAVE_SOCKADDR_STORAGE) -fi]) - -dnl Checks for type long long -dnl Defines HAVE_LONGLONG on success. -AC_DEFUN([AC_TYPE_LONGLONG], -[AC_CACHE_CHECK([for type long long], ac_cv_type_longlong, - [AC_TRY_COMPILE([], [long long i;], - [ac_cv_type_longlong=yes], - [ac_cv_type_longlong=no])]) -if test $ac_cv_type_longlong = yes; then - AC_DEFINE(HAVE_LONGLONG) -fi]) - -dnl Checks for type __int64 -dnl Defines HAVE___INT64 on success. -AC_DEFUN([AC_TYPE___INT64], -[AC_CACHE_CHECK([for type __int64], ac_cv_type___int64, - [AC_TRY_COMPILE([], [__int64 i;], - [ac_cv_type___int64=yes], - [ac_cv_type___int64=no])]) -if test $ac_cv_type___int64 = yes; then - AC_DEFINE(HAVE___INT64) -fi]) - -dnl Checks if C-compiler orders bitfields htol -dnl Defines BITFIELDS_HTOL on success. -AC_DEFUN([AC_C_BITFIELDS], -[AC_CACHE_CHECK([whether bitorder in bitfields is htol], ac_cv_c_bitfields_htol, - [AC_TRY_RUN([ -struct { - unsigned char x1:4; - unsigned char x2:4; -} a; -int -main() -{ -char *cp; - -cp = (char *)&a; -*cp = 0x12; -exit(a.x1 == 2);}], - [ac_cv_c_bitfields_htol=yes], - [ac_cv_c_bitfields_htol=no])]) -if test $ac_cv_c_bitfields_htol = yes; then - AC_DEFINE(BITFIELDS_HTOL) -fi]) - -dnl Checks if C-compiler understands prototypes -dnl Defines PROTOTYPES on success. -AC_DEFUN([AC_TYPE_PROTOTYPES], -[AC_CACHE_CHECK([for prototypes], ac_cv_type_prototypes, - [AC_TRY_RUN([ -doit(int i, ...) -{return 0;} -int -main(int ac, char *av[]) -{ doit(1, 2, 3); -exit(0);}], - [ac_cv_type_prototypes=yes], - [ac_cv_type_prototypes=no])]) -if test $ac_cv_type_prototypes = yes; then - AC_DEFINE(PROTOTYPES) -fi]) - -dnl Checks for type size_t -dnl Defines HAVE_SIZE_T_ on success. -AC_DEFUN([AC_TYPE_SIZE_T_], -[AC_CACHE_CHECK([for type size_t], ac_cv_type_size_t_, - [AC_TRY_COMPILE([ -#ifdef HAVE_SYS_TYPES_H -#include -#endif -#ifdef HAVE_STDLIB_H -#include -#endif -#ifdef HAVE_STDDEF_H -#include -#endif -#ifdef HAVE_STDIO_H -#include -#endif - ], [size_t s;], - [ac_cv_type_size_t_=yes], - [ac_cv_type_size_t_=no])]) -if test $ac_cv_type_size_t_ = yes; then - AC_DEFINE(HAVE_SIZE_T) -else - AC_DEFINE(NO_SIZE_T) -fi]) - -dnl Checks if type char is unsigned -dnl Defines CHAR_IS_UNSIGNED on success. -AC_DEFUN([AC_TYPE_CHAR], -[AC_CACHE_CHECK([if char is unsigned], ac_cv_type_char_unsigned, - [AC_TRY_RUN([ -int -main() -{ - char c; - - c = -1; - exit(c < 0);}], - [ac_cv_type_char_unsigned=yes], - [ac_cv_type_char_unsigned=no], - [ac_cv_type_char_unsigned=no])]) -if test $ac_cv_type_char_unsigned = yes; then - AC_DEFINE(CHAR_IS_UNSIGNED) -fi]) - -dnl Checks if function/macro va_copy() is available -dnl Defines HAVE_VA_COPY on success. -AC_DEFUN([AC_FUNC_VA_COPY], -[AC_CACHE_CHECK([for va_copy], ac_cv_func_va_copy, - [AC_TRY_LINK([ -#ifdef HAVE_STDARG_H -# include -#else -# include -#endif], - [ -va_list a, b; - -va_copy(a, b);], - [ac_cv_func_va_copy=yes], - [ac_cv_func_va_copy=no])]) -if test $ac_cv_func_va_copy = yes; then - AC_DEFINE(HAVE_VA_COPY) -fi]) - -dnl Checks if function/macro __va_copy() is available -dnl Defines HAVE__VA_COPY on success. -AC_DEFUN([AC_FUNC__VA_COPY], -[AC_CACHE_CHECK([for __va_copy], ac_cv_func__va_copy, - [AC_TRY_LINK([ -#ifdef HAVE_STDARG_H -# include -#else -# include -#endif], - [ -va_list a, b; - -__va_copy(a, b);], - - [ac_cv_func__va_copy=yes], - [ac_cv_func__va_copy=no])]) -if test $ac_cv_func__va_copy = yes; then - AC_DEFINE(HAVE__VA_COPY) -fi]) - -dnl Checks if va_list is an array -dnl Defines VA_LIST_IS_ARRAY on success. -AC_DEFUN([AC_TYPE_VA_LIST], -[AC_CACHE_CHECK([if va_list is an array], ac_cv_type_va_list_array, - [AC_TRY_LINK([ -#ifdef HAVE_STDARG_H -# include -#else -# include -#endif -], - [ -va_list a, b; - -a = b;], - [ac_cv_type_va_list_array=no], - [ac_cv_type_va_list_array=yes])]) -if test $ac_cv_type_va_list_array = yes; then - AC_DEFINE(VA_LIST_IS_ARRAY) -fi]) - -dnl Checks if quotactl is present as ioctl -dnl Defines HAVE_QUOTAIOCTL on success. -AC_DEFUN([AC_FUNC_QUOTAIOCTL], -[AC_CACHE_CHECK([if quotactl is an ioctl], ac_cv_func_quotaioctl, - [AC_TRY_LINK([#include -#include ], - [struct quotctl q; ioctl(0, Q_QUOTACTL, &q)], - [ac_cv_func_quotaioctl=yes], - [ac_cv_func_quotaioctl=no])]) -if test $ac_cv_func_quotaioctl = yes; then - AC_DEFINE(HAVE_QUOTAIOCTL) -fi]) - -dnl Checks if function __dtoa() is available -dnl Defines HAVE_DTOA on success. -AC_DEFUN([AC_FUNC_DTOA], -[AC_CACHE_CHECK([for __dtoa], ac_cv_func_dtoa, - [AC_TRY_LINK([extern char *__dtoa();], -[int decpt; int sign; char *ep; char *bp; -bp = __dtoa(0.0, 2, 6, &decpt, &sign, &ep);], - [ac_cv_func_dtoa=yes], - [ac_cv_func_dtoa=no])]) -if test $ac_cv_func_dtoa = yes; then - AC_DEFINE(HAVE_DTOA) -fi]) - -dnl Checks if reentrant __dtoa() exists (needs a result prt) -dnl Defines HAVE_DTOA_R on success. -AC_DEFUN([AC_FUNC_DTOA_R], -[AC_REQUIRE([AC_FUNC_DTOA])dnl -AC_CACHE_CHECK([for __dtoa that needs result ptr], ac_cv_func_dtoa_r, - [AC_TRY_RUN([ -extern char *__dtoa(); -int -main() -{ -#ifdef HAVE_DTOA - int decpt, sign; - char *bp; - char *ep; - char *result; - - result = 0; - bp = __dtoa(1.9, 2, 5, &decpt, &sign, &ep, &result); - exit(result == 0); -#else - exit(1); -#endif -}], - [ac_cv_func_dtoa_r=yes], - [ac_cv_func_dtoa_r=no])]) -if test $ac_cv_func_dtoa_r = yes; then - AC_DEFINE(HAVE_DTOA_R) -fi]) - -dnl Checks if working ecvt() exists -dnl Defines HAVE_ECVT on success. -AC_DEFUN([AC_FUNC_ECVT], -[AC_CACHE_CHECK([for working ecvt() ], ac_cv_func_ecvt, - [AC_TRY_RUN([ -extern char *ecvt(); - -sprintf(s) - char *s; -{ - strcpy(s, "DEAD"); -} - -int -main() -{ - int a, b; - -/* exit (strcmp("DEAD", ecvt(1.9, 2, &a, &b)) == 0);*/ - exit (strcmp("19", ecvt(1.9, 2, &a, &b)) != 0); -}], - [ac_cv_func_ecvt=yes], - [ac_cv_func_ecvt=no])]) -if test $ac_cv_func_ecvt = yes; then - AC_DEFINE(HAVE_ECVT) -fi]) - -dnl Checks if working fcvt() exists -dnl Defines HAVE_FCVT on success. -AC_DEFUN([AC_FUNC_FCVT], -[AC_CACHE_CHECK([for working fcvt() ], ac_cv_func_fcvt, - [AC_TRY_RUN([ -extern char *fcvt(); - -sprintf(s) - char *s; -{ - strcpy(s, "DEAD"); -} - -int -main() -{ - int a, b; - -/* exit (strcmp("DEAD", fcvt(1.9, 2, &a, &b)) == 0);*/ - exit (strcmp("190", fcvt(1.9, 2, &a, &b)) != 0); -}], - [ac_cv_func_fcvt=yes], - [ac_cv_func_fcvt=no])]) -if test $ac_cv_func_fcvt = yes; then - AC_DEFINE(HAVE_FCVT) -fi]) - -dnl Checks if working gcvt() exists -dnl Defines HAVE_GCVT on success. -AC_DEFUN([AC_FUNC_GCVT], -[AC_CACHE_CHECK([for working gcvt() ], ac_cv_func_gcvt, - [AC_TRY_RUN([ -extern char *gcvt(); - -sprintf(s) - char *s; -{ - strcpy(s, "DEAD"); -} - -int -main() -{ - char buf[32]; - -/* exit (strcmp("DEAD", gcvt(1.9, 10, buf)) == 0);*/ - exit (strcmp("1.9", gcvt(1.9, 10, buf)) != 0); -}], - [ac_cv_func_gcvt=yes], - [ac_cv_func_gcvt=no])]) -if test $ac_cv_func_gcvt = yes; then - AC_DEFINE(HAVE_GCVT) -fi]) - -dnl Checks if function uname() is available -dnl Defines HAVE_UNAME on success. -AC_DEFUN([AC_FUNC_UNAME], -[AC_CACHE_CHECK([for uname], ac_cv_func_uname, - [AC_TRY_LINK([#include ], -[struct utsname un; -uname(&un);], - [ac_cv_func_uname=yes], - [ac_cv_func_uname=no])]) -if test $ac_cv_func_uname = yes; then - AC_DEFINE(HAVE_UNAME) -fi]) - -dnl Checks if function mlockall() is available -dnl beware HP-UX 10.x it contains a bad mlockall() in libc -dnl Defines HAVE_MLOCK on success. -AC_DEFUN([AC_FUNC_MLOCK], -[AC_REQUIRE([AC_HEADER_ERRNO_DEF])dnl -AC_CACHE_CHECK([for mlock], ac_cv_func_mlock, - [AC_TRY_RUN([ -#include -#include -#ifndef HAVE_ERRNO_DEF -extern int errno; -#endif - -main() -{ - if (mlock(0, 0) < 0) { - if (errno == EINVAL || errno == ENOMEM || - errno == EPERM || errno == EACCES) - exit(0); - exit(-1); - } - exit(0); -}], - [ac_cv_func_mlock=yes], - [ac_cv_func_mlock=no])]) -if test $ac_cv_func_mlock = yes; then - AC_DEFINE(HAVE_MLOCK) -fi]) - -dnl Checks if function mlockall() is available -dnl beware HP-UX 10.x it contains a bad mlockall() in libc -dnl Defines HAVE_MLOCKALL on success. -AC_DEFUN([AC_FUNC_MLOCKALL], -[AC_REQUIRE([AC_HEADER_ERRNO_DEF])dnl -AC_CACHE_CHECK([for mlockall], ac_cv_func_mlockall, - [AC_TRY_RUN([ -#include -#include -#include -#ifndef HAVE_ERRNO_DEF -extern int errno; -#endif - -int -main() -{ - if (mlockall(MCL_CURRENT|MCL_FUTURE) < 0) { - if (errno == EINVAL || errno == ENOMEM || - errno == EPERM || errno == EACCES) - exit(0); - exit(-1); - } - exit(0); -} -], - [ac_cv_func_mlockall=yes], - [ac_cv_func_mlockall=no])]) -if test $ac_cv_func_mlockall = yes; then - AC_DEFINE(HAVE_MLOCKALL) -fi]) - -AC_DEFUN([jsAC_FUNC_MMAP], -[AC_REQUIRE([AC_MMAP_SIZEP])dnl -AC_CHECK_HEADERS(unistd.h) -AC_CHECK_FUNCS(getpagesize) -AC_CACHE_CHECK(for working mmap, ac_cv_func_mmap_fixed_mapped, -[AC_TRY_RUN([ -/* Thanks to Mike Haertel and Jim Avera for this test. - Here is a matrix of mmap possibilities: - mmap private not fixed - mmap private fixed at somewhere currently unmapped - mmap private fixed at somewhere already mapped - mmap shared not fixed - mmap shared fixed at somewhere currently unmapped - mmap shared fixed at somewhere already mapped - For private mappings, we should verify that changes cannot be read() - back from the file, nor mmap's back from the file at a different - address. (There have been systems where private was not correctly - implemented like the infamous i386 svr4.0, and systems where the - VM page cache was not coherent with the filesystem buffer cache - like early versions of FreeBSD and possibly contemporary NetBSD.) - For shared mappings, we should conversely verify that changes get - propogated back to all the places they're supposed to be. - - Grep wants private fixed already mapped. - The main things grep needs to know about mmap are: - * does it exist and is it safe to write into the mmap'd area - * how to use it (BSD variants) */ -#include -#include -#include - -/* - * Needed for Apollo Domain/OS and may be for others? - */ -#ifdef _MMAP_WITH_SIZEP -# define mmap_sizeparm(s) (&(s)) -#else -# define mmap_sizeparm(s) (s) -#endif - -/* This mess was copied from the GNU getpagesize.h. */ -#ifndef HAVE_GETPAGESIZE -# ifdef HAVE_UNISTD_H -# include -# endif - -/* Assume that all systems that can run configure have sys/param.h. */ -# ifndef HAVE_SYS_PARAM_H -# define HAVE_SYS_PARAM_H 1 -# endif - -# ifdef _SC_PAGESIZE -# define getpagesize() sysconf(_SC_PAGESIZE) -# else /* no _SC_PAGESIZE */ -# ifdef HAVE_SYS_PARAM_H -# include -# ifdef EXEC_PAGESIZE -# define getpagesize() EXEC_PAGESIZE -# else /* no EXEC_PAGESIZE */ -# ifdef NBPG -# define getpagesize() NBPG * CLSIZE -# ifndef CLSIZE -# define CLSIZE 1 -# endif /* no CLSIZE */ -# else /* no NBPG */ -# ifdef NBPC -# define getpagesize() NBPC -# else /* no NBPC */ -# ifdef PAGESIZE -# define getpagesize() PAGESIZE -# endif /* PAGESIZE */ -# endif /* no NBPC */ -# endif /* no NBPG */ -# endif /* no EXEC_PAGESIZE */ -# else /* no HAVE_SYS_PARAM_H */ -# define getpagesize() 8192 /* punt totally */ -# endif /* no HAVE_SYS_PARAM_H */ -# endif /* no _SC_PAGESIZE */ - -#endif /* no HAVE_GETPAGESIZE */ - -#ifdef __cplusplus -extern "C" { void *malloc(unsigned); } -#else -char *malloc(); -#endif - -int -main() -{ - char *data, *data2, *data3; - int i, pagesize; - int fd; - - pagesize = getpagesize(); - - /* - * First, make a file with some known garbage in it. - */ - data = malloc(pagesize); - if (!data) - exit(1); - for (i = 0; i < pagesize; ++i) - *(data + i) = rand(); - umask(0); - fd = creat("conftestmmap", 0600); - if (fd < 0) - exit(1); - if (write(fd, data, pagesize) != pagesize) - exit(1); - close(fd); - - /* - * Next, try to mmap the file at a fixed address which - * already has something else allocated at it. If we can, - * also make sure that we see the same garbage. - */ - fd = open("conftestmmap", O_RDWR); - if (fd < 0) - exit(1); - data2 = malloc(2 * pagesize); - if (!data2) - exit(1); - data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1); - if (data2 != mmap(data2, mmap_sizeparm(pagesize), PROT_READ | PROT_WRITE, - MAP_PRIVATE | MAP_FIXED, fd, 0L)) - exit(1); - for (i = 0; i < pagesize; ++i) - if (*(data + i) != *(data2 + i)) - exit(1); - - /* - * Finally, make sure that changes to the mapped area - * do not percolate back to the file as seen by read(). - * (This is a bug on some variants of i386 svr4.0.) - */ - for (i = 0; i < pagesize; ++i) - *(data2 + i) = *(data2 + i) + 1; - data3 = malloc(pagesize); - if (!data3) - exit(1); - if (read(fd, data3, pagesize) != pagesize) - exit(1); - for (i = 0; i < pagesize; ++i) - if (*(data + i) != *(data3 + i)) - exit(1); - close(fd); - unlink("conftestmmap"); - exit(0); -} -], ac_cv_func_mmap_fixed_mapped=yes, ac_cv_func_mmap_fixed_mapped=no, -ac_cv_func_mmap_fixed_mapped=no)]) -if test $ac_cv_func_mmap_fixed_mapped = yes; then - AC_DEFINE(HAVE_MMAP) -fi -]) - -AC_DEFUN([AC_MMAP_SIZEP], -[AC_CHECK_HEADERS(unistd.h) -AC_CHECK_FUNCS(getpagesize) -AC_CACHE_CHECK(for mmap that needs ptr to size, ac_cv_func_mmap_sizep, -[AC_TRY_RUN([ -#include -#include -#include -#include -#include - -#ifndef MAP_FILE -#define MAP_FILE 0 /* Needed on Apollo Domain/OS */ -#endif - -/* This mess was copied from the GNU getpagesize.h. */ -#ifndef HAVE_GETPAGESIZE -# ifdef HAVE_UNISTD_H -# include -# endif - -/* Assume that all systems that can run configure have sys/param.h. */ -# ifndef HAVE_SYS_PARAM_H -# define HAVE_SYS_PARAM_H 1 -# endif - -# ifdef _SC_PAGESIZE -# define getpagesize() sysconf(_SC_PAGESIZE) -# else /* no _SC_PAGESIZE */ -# ifdef HAVE_SYS_PARAM_H -# include -# ifdef EXEC_PAGESIZE -# define getpagesize() EXEC_PAGESIZE -# else /* no EXEC_PAGESIZE */ -# ifdef NBPG -# define getpagesize() NBPG * CLSIZE -# ifndef CLSIZE -# define CLSIZE 1 -# endif /* no CLSIZE */ -# else /* no NBPG */ -# ifdef NBPC -# define getpagesize() NBPC -# else /* no NBPC */ -# ifdef PAGESIZE -# define getpagesize() PAGESIZE -# endif /* PAGESIZE */ -# endif /* no NBPC */ -# endif /* no NBPG */ -# endif /* no EXEC_PAGESIZE */ -# else /* no HAVE_SYS_PARAM_H */ -# define getpagesize() 8192 /* punt totally */ -# endif /* no HAVE_SYS_PARAM_H */ -# endif /* no _SC_PAGESIZE */ - -#endif /* no HAVE_GETPAGESIZE */ - -#ifdef __cplusplus -extern "C" { void *malloc(unsigned); } -#else -char *malloc(); -#endif - -jmp_buf jenv; - -int -intr() -{ - signal(SIGSEGV, intr); - longjmp(jenv, 1); -} - -int -main() -{ - char *data, *data2; - int i, pagesize, ps; - int fd; - - pagesize = getpagesize(); - - /* - * First, make a file with some known garbage in it. - */ - data = malloc(pagesize); - if (!data) - exit(1); - for (i = 0; i < pagesize; ++i) - *(data + i) = rand(); - umask(0); - fd = creat("conftestmmap", 0600); - if (fd < 0) - exit(1); - if (write(fd, data, pagesize) != pagesize) - exit(1); - close(fd); - - /* - * Next, try to mmap the file at a fixed address which - * already has something else allocated at it. If we can, - * also make sure that we see the same garbage. - */ - fd = open("conftestmmap", O_RDWR); - if (fd < 0) - exit(1); - - /* - * Keep a copy, Apollo modifies the value... - */ - ps = pagesize; - - /* - * Apollo mmap() is not a syscall but a library function and fails - * if it tries to dereference 'ps'. We must use setjmp in order to - * catch the failure. - */ - signal(SIGSEGV, intr); - if (setjmp(jenv) == 0) { - data2 = mmap(0, ps, PROT_READ, MAP_FILE | MAP_PRIVATE, fd, 0L); - } else { - data2 = (char *)-1; - } - if (data2 != (char *)-1) - exit(1); - - signal(SIGSEGV, intr); - if (setjmp(jenv) == 0) { - data2 = mmap(0, &ps, PROT_READ, MAP_FILE | MAP_PRIVATE, fd, 0L); - } else { - data2 = (char *)-1; - } - if (data2 == (char *)-1) - exit(1); - - for (i = 0; i < pagesize; ++i) - if (*(data + i) != *(data2 + i)) - exit(1); - - close(fd); - unlink("conftestmmap"); - exit(0); -} -], ac_cv_func_mmap_sizep=yes, ac_cv_func_mmap_sizep=no, -ac_cv_func_mmap_sizep=no)]) -if test $ac_cv_func_mmap_sizep = yes; then - AC_DEFINE(_MMAP_WITH_SIZEP) -fi -]) - -dnl Checks if mmap() works to get shared memory -dnl Defines HAVE_SMMAP on success. -AC_DEFUN([AC_FUNC_SMMAP], -[AC_CACHE_CHECK([if mmap works to get shared memory], ac_cv_func_smmap, - [AC_TRY_RUN([ -#include -#include - -#ifndef MAP_ANONYMOUS -# ifdef MAP_ANON -# define MAP_ANONYMOUS MAP_ANON -# endif -#endif - -/* - * Needed for Apollo Domain/OS and may be for others? - */ -#ifdef _MMAP_WITH_SIZEP -# define mmap_sizeparm(s) (&(s)) -#else -# define mmap_sizeparm(s) (s) -#endif - -char * -mkshare() -{ - int size = 8192; - int f; - char *addr; - -#ifdef MAP_ANONYMOUS /* HP/UX */ - f = -1; - addr = mmap(0, mmap_sizeparm(size), PROT_READ|PROT_WRITE, MAP_SHARED|MAP_ANONYMOUS, f, 0); -#else - if ((f = open("/dev/zero", 2)) < 0) - exit(1); - addr = mmap(0, mmap_sizeparm(size), PROT_READ|PROT_WRITE, MAP_SHARED, f, 0); -#endif - if (addr == (char *)-1) - exit(1); - close(f); - - return (addr); -} - -int -main() -{ - char *addr; - - addr = mkshare(); - *addr = 'I'; - - switch (fork()) { - - case -1: - printf("help\n"); exit(1); - - case 0: /* child */ - *addr = 'N'; - _exit(0); - break; - default: /* parent */ - wait(0); - sleep(1); - break; - } - - if (*addr != 'N') - exit(1); - exit(0); -} -], - [ac_cv_func_smmap=yes], - [ac_cv_func_smmap=no], - [ac_cv_func_smmap=no])]) -if test $ac_cv_func_smmap = yes; then - AC_DEFINE(HAVE_SMMAP) -fi]) - -dnl Checks if sys_siglist[] exists -dnl Defines HAVE_SYS_SIGLIST on success. -AC_DEFUN([AC_FUNC_SYS_SIGLIST], -[AC_CACHE_CHECK([for sys_siglist], ac_cv_func_sys_siglist, - [AC_TRY_RUN([ -int -main() -{ extern char *sys_siglist[]; -if (sys_siglist[1] == 0) - exit(1); -exit(0);}], - [ac_cv_func_sys_siglist=yes], - [ac_cv_func_sys_siglist=no])]) -if test $ac_cv_func_sys_siglist = yes; then - AC_DEFINE(HAVE_SYS_SIGLIST) -fi]) - -dnl Checks for maximum number of bits in minor device number -AC_DEFUN([AC_CHECK_MINOR_BITS], -[AC_REQUIRE([AC_HEADER_MAKEDEV])dnl -changequote(<<, >>)dnl -define(<>, DEV_MINOR_BITS)dnl -dnl The cache variable name. -define(<>, ac_cv_dev_minor_bits)dnl -changequote([, ])dnl -AC_MSG_CHECKING(bits in minor device number) -AC_CACHE_VAL(AC_CV_NAME, -[AC_TRY_RUN([#include -#include -#ifdef major -# define _FOUND_MAJOR_ -#endif - -#ifdef MAJOR_IN_MKDEV -# include -# define _FOUND_MAJOR_ -#endif - -#ifndef _FOUND_MAJOR_ -# ifdef MAJOR_IN_SYSMACROS -# include -# define _FOUND_MAJOR_ -# endif -#endif - -#ifndef _FOUND_MAJOR_ -# if defined(hpux) || defined(__hpux__) || defined(__hpux) -# include -# define _FOUND_MAJOR_ -# endif -#endif - -#ifndef _FOUND_MAJOR_ -# define major(dev) (((dev) >> 8) & 0xFF) -# define minor(dev) ((dev) & 0xFF) -# define makedev(majo, mino) (((majo) << 8) | (mino)) -#endif -int -main() -{ - long l = 1; - int i; - int m; - int c = 0; - FILE *f=fopen("conftestval", "w"); - int maxloop = 32; - - if (sizeof (long) > 4) - maxloop = 64; - - if (!f) exit(1); - - for (i=1, m=0; i <= maxloop; i++, l<<=1) { - if (minor(l) == 0 && c == 0) - c = m; - if (minor(l) != 0) - m = i; - } - fprintf(f, "%d\n", m); - exit(0); -}], AC_CV_NAME=`cat conftestval`, AC_CV_NAME=0, ifelse([$2], , , AC_CV_NAME=$2))])dnl -AC_MSG_RESULT($AC_CV_NAME) -AC_DEFINE_UNQUOTED(AC_MACRO_NAME, $AC_CV_NAME) -undefine([AC_MACRO_NAME])dnl -undefine([AC_CV_NAME])dnl -]) - -dnl Checks for maximum number of bits in minor device numbers are non contiguous -dnl Defines DEV_MINOR_NONCONTIG on success. -AC_DEFUN([AC_CHECK_MINOR_NONCONTIG], -[AC_REQUIRE([AC_HEADER_MAKEDEV])dnl -AC_CACHE_CHECK([whether bits in minor device numbers are non contiguous], ac_cv_dev_minor_noncontig, - [AC_TRY_RUN([ -#include -#ifdef major -# define _FOUND_MAJOR_ -#endif - -#ifdef MAJOR_IN_MKDEV -# include -# define _FOUND_MAJOR_ -#endif - -#ifndef _FOUND_MAJOR_ -# ifdef MAJOR_IN_SYSMACROS -# include -# define _FOUND_MAJOR_ -# endif -#endif - -#ifndef _FOUND_MAJOR_ -# if defined(hpux) || defined(__hpux__) || defined(__hpux) -# include -# define _FOUND_MAJOR_ -# endif -#endif - -#ifndef _FOUND_MAJOR_ -# define major(dev) (((dev) >> 8) & 0xFF) -# define minor(dev) ((dev) & 0xFF) -# define makedev(majo, mino) (((majo) << 8) | (mino)) -#endif -int -main() -{ - long l = 1; - int i; - int m; - int c = 0; - int maxloop = 32; - - if (sizeof (long) > 4) - maxloop = 64; - - for (i=1, m=0; i <= maxloop; i++, l<<=1) { - if (minor(l) == 0 && c == 0) - c = m; - if (minor(l) != 0) - m = i; - } -exit (m == c);}], - [ac_cv_dev_minor_noncontig=yes], - [ac_cv_dev_minor_noncontig=no])]) -if test $ac_cv_dev_minor_noncontig = yes; then - AC_DEFINE(DEV_MINOR_NONCONTIG) -fi]) - -dnl Checks if we may not define our own malloc() -dnl Defines NO_USER_MALLOC if we cannot. -AC_DEFUN([AC_USER_MALLOC], -[AC_CACHE_CHECK([if we may not define our own malloc()], ac_cv_no_user_malloc, - [AC_TRY_RUN([ -static int mcalled; -char * -malloc(s) - int s; -{ - extern char *sbrk(); - - mcalled++; - _exit(0); - return (sbrk(s)); -} - -free(p) char *p;{} - -main() -{ -#ifdef HAVE_STRDUP - strdup("aaa"); -#else - exit(0); -#endif - exit(1);}], - [ac_cv_no_user_malloc=no], - [ac_cv_no_user_malloc=yes])]) -if test $ac_cv_no_user_malloc = yes; then - AC_DEFINE(NO_USER_MALLOC) -fi]) - -dnl Checks if BSD-4.2 compliant getpgrp() exists -dnl Defines HAVE_BSD_GETPGRP on success. -AC_DEFUN([AC_FUNC_BSD_GETPGRP], -[AC_CACHE_CHECK([for BSD compliant getpgrp], ac_cv_func_bsd_getpgrp, - [AC_TRY_RUN([ -int -main() -{ long p; -/* - * POSIX getpgrp() has void parameter... - */ - p = getpgrp(-1); - if (p == getpgrp(1) && p == getpgrp(getpid())) - exit(1); -exit(0);}], - [ac_cv_func_bsd_getpgrp=yes], - [ac_cv_func_bsd_getpgrp=no])]) -if test $ac_cv_func_bsd_getpgrp = yes; then - AC_DEFINE(HAVE_BSD_GETPGRP) -fi]) - -dnl Checks if BSD-4.2 compliant setpgrp() exists -dnl Defines HAVE_BSD_SETPGRP on success. -AC_DEFUN([AC_FUNC_BSD_SETPGRP], -[AC_REQUIRE([AC_HEADER_ERRNO_DEF])dnl -AC_CACHE_CHECK([for BSD compliant setpgrp], ac_cv_func_bsd_setpgrp, - [AC_TRY_RUN([ -#include -#ifndef HAVE_ERRNO_DEF -extern int errno; -#endif -int -main() -{ errno = 0; -/* - * Force illegal pid on BSD - */ -if (setpgrp(-1, 100) < 0 && errno == ESRCH) - exit(0); -exit(1);}], - [ac_cv_func_bsd_setpgrp=yes], - [ac_cv_func_bsd_setpgrp=no])]) -if test $ac_cv_func_bsd_setpgrp = yes; then - AC_DEFINE(HAVE_BSD_SETPGRP) -fi]) - -dnl Checks if C99 compliant isinf() exists -dnl Defines HAVE_C99_ISINF on success. -AC_DEFUN([AC_FUNC_C99_ISINF], -[AC_CACHE_CHECK([for C99 compliant isinf], ac_cv_func_c99_isinf, - [AC_TRY_LINK([#include ], [ double d; -#ifndef isinf -The isinf macro is not defined -#endif -return (isinf(d)); -], - [ac_cv_func_c99_isinf=yes], - [ac_cv_func_c99_isinf=no])]) -if test $ac_cv_func_c99_isinf = yes; then - AC_DEFINE(HAVE_C99_ISINF) -fi]) - -dnl Checks if C99 compliant isnan() exists -dnl Defines HAVE_C99_ISNAN on success. -AC_DEFUN([AC_FUNC_C99_ISNAN], -[AC_CACHE_CHECK([for C99 compliant isnan], ac_cv_func_c99_isnan, - [AC_TRY_LINK([#include ], [ double d; -#ifndef isnan -The isnan macro is not defined -#endif -return (isnan(d)); -], - [ac_cv_func_c99_isnan=yes], - [ac_cv_func_c99_isnan=no])]) -if test $ac_cv_func_c99_isnan = yes; then - AC_DEFINE(HAVE_C99_ISNAN) -fi]) - -dnl Checks if select() needs more than sys/time.h & sys/types.h -dnl Defines SELECT_NONSTD_HDR on success. -AC_DEFUN([AC_HEADER_SELECT_NONSTD], -[AC_CACHE_CHECK([if select needs nonstd include files], ac_cv_header_slect_nonstd_hdr, - [AC_TRY_COMPILE([#include -#include ], - [fd_set rfd; FD_ZERO(&rfd); select(1, &rfd, 0, 0, 0);], - [ac_cv_header_slect_nonstd_hdr=no], - [ac_cv_header_slect_nonstd_hdr=yes])]) -if test $ac_cv_header_slect_nonstd_hdr = yes; then - AC_DEFINE(SELECT_NONSTD_HDR) -fi]) - -dnl Checks if select() needs sys/select.h -dnl Defines NEED_SYS_SELECT_H on success. -AC_DEFUN([AC_HEADER_SYS_SELECT], -[AC_REQUIRE([AC_HEADER_SELECT_NONSTD])dnl -AC_CACHE_CHECK([if sys/select.h is needed for select], ac_cv_header_need_sys_select_h, - [AC_TRY_COMPILE([#include -#include -#include -#ifndef SELECT_NONSTD_HDR -do not compile if we do not need nonstandard headers -#endif], - [fd_set rfd; FD_ZERO(&rfd); select(1, &rfd, 0, 0, 0);], - [ac_cv_header_need_sys_select_h=yes], - [ac_cv_header_need_sys_select_h=no])]) -if test $ac_cv_header_need_sys_select_h = yes; then - AC_DEFINE(NEED_SYS_SELECT_H) -fi]) - -dnl Checks if select() needs sys/socket.h -dnl Defines NEED_SYS_SOCKET_H on success. -AC_DEFUN([AC_HEADER_SELECT2], -[AC_REQUIRE([AC_HEADER_SELECT_NONSTD])dnl -AC_CACHE_CHECK([if sys/socket.h is needed for select], ac_cv_header_need_sys_socket_h, - [AC_TRY_COMPILE([#include -#include -#include -#ifndef SELECT_NONSTD_HDR -do not compile if we do not need nonstandard headers -#endif], - [fd_set rfd; FD_ZERO(&rfd); select(1, &rfd, 0, 0, 0);], - [ac_cv_header_need_sys_socket_h=yes], - [ac_cv_header_need_sys_socket_h=no])]) -if test $ac_cv_header_need_sys_socket_h = yes; then - AC_DEFINE(NEED_SYS_SOCKET_H) -fi]) - -dnl Checks if file locking via fcntl() is available -dnl Defines HAVE_FCNTL_LOCKF on success. -AC_DEFUN([AC_FUNC_FCNTL_LOCKF], -[AC_CACHE_CHECK([for file locking via fcntl], ac_cv_func_fcntl_lock, - [AC_TRY_LINK([ -#include -#include ], - [ -struct flock fl; -fcntl(0, F_SETLK, &fl);], - [ac_cv_func_fcntl_lock=yes], - [ac_cv_func_fcntl_lock=no])]) -if test $ac_cv_func_fcntl_lock = yes; then - AC_DEFINE(HAVE_FCNTL_LOCKF) -fi]) - - -dnl Checks if sigsetjmp() is available -dnl Defines HAVE_SIGSETJMP on success. -AC_DEFUN([AC_FUNC_SIGSETJMP], -[AC_CACHE_CHECK([for sigsetjmp], ac_cv_func_sigsetjmp, - [AC_TRY_LINK([ -#include ], - [ -sigjmp_buf jb; -sigsetjmp(jb, 1);], - [ac_cv_func_sigsetjmp=yes], - [ac_cv_func_sigsetjmp=no])]) -if test $ac_cv_func_sigsetjmp = yes; then - AC_DEFINE(HAVE_SIGSETJMP) -fi]) - -dnl Checks if siglongjmp() is available -dnl Defines HAVE_SIGLONGJMP on success. -AC_DEFUN([AC_FUNC_SIGLONGJMP], -[AC_CACHE_CHECK([for siglongjmp], ac_cv_func_siglongjmp, - [AC_TRY_LINK([ -#include ], - [ -sigjmp_buf jb; -sigsetjmp(jb, 1); -siglongjmp(jb, 1);], - [ac_cv_func_siglongjmp=yes], - [ac_cv_func_siglongjmp=no])]) -if test $ac_cv_func_siglongjmp = yes; then - AC_DEFINE(HAVE_SIGLONGJMP) -fi]) - - -dnl Checks if link() allows hard links on symlinks -dnl Defines HAVE_HARD_SYMLINKS on success. -AC_DEFUN([AC_HARD_SYMLINKS], -[AC_CACHE_CHECK([if link() allows hard links on symlinks], ac_cv_hard_symlinks, - [AC_TRY_RUN([ -main() -{ - int ret = 0; - - unlink("confdefs.f1"); - unlink("confdefs.l1"); - unlink("confdefs.h1"); - - if (symlink("confdefs.f1", "confdefs.l1") < 0) - ret = 1; - if (link("confdefs.l1", "confdefs.h1") < 0) - ret = 1; - - unlink("confdefs.l1"); - unlink("confdefs.h1"); - - exit(ret); -}], - [ac_cv_hard_symlinks=yes], - [ac_cv_hard_symlinks=no])]) -if test $ac_cv_hard_symlinks = yes; then - AC_DEFINE(HAVE_HARD_SYMLINKS) -fi]) - - -dnl Checks if link() does not follow symlinks -dnl Defines HAVE_LINK_NOFOLLOW on success. -AC_DEFUN([AC_LINK_NOFOLLOW], -[AC_CACHE_CHECK([if link() does not folow symlinks], ac_cv_link_nofollow, - [AC_TRY_RUN([ -#include -#include - -main() -{ - int ret = 0; - int f; - struct stat sb; - - unlink("confdefs.f1"); - unlink("confdefs.l1"); - unlink("confdefs.h1"); - - f = creat("confdefs.f1", 0666); - close(f); - if (symlink("confdefs.f1", "confdefs.l1") < 0) - ret = 1; - if (link("confdefs.l1", "confdefs.h1") < 0) - ret = 1; - - stat("confdefs.f1", &sb); - if (sb.st_nlink == 2) - ret = 1; - - unlink("confdefs.f1"); - unlink("confdefs.l1"); - unlink("confdefs.h1"); - - exit(ret); -}], - [ac_cv_link_nofollow=yes], - [ac_cv_link_nofollow=no])]) -if test $ac_cv_link_nofollow = yes; then - AC_DEFINE(HAVE_LINK_NOFOLLOW) -fi]) - -dnl Checks if access() does implement E_OK (010) for effective UIDs -dnl Defines HAVE_ACCESS_E_OK on success. -AC_DEFUN([AC_ACCESS_E_OK], -[AC_REQUIRE([AC_HEADER_ERRNO_DEF])dnl -AC_CHECK_HEADERS(unistd.h) -AC_CACHE_CHECK([if access() does implement E_OK], ac_cv_access_e_ok, - [AC_TRY_RUN([ -# ifdef HAVE_UNISTD_H -# include -# endif -#ifndef R_OK -#define R_OK 4 /* Test for Read permission */ -#define W_OK 2 /* Test for Write permission */ -#define X_OK 1 /* Test for eXecute permission */ -#define F_OK 0 /* Test for existence of File */ -#endif - -#ifndef E_OK -#ifdef EFF_ONLY_OK -#define E_OK EFF_ONLY_OK /* Irix */ -#else -#ifdef EUID_OK -#define E_OK EUID_OK /* UNICOS (0400) */ -#else -#define E_OK 010 /* Test effective uids */ -#endif -#endif -#endif - -#include -#ifndef HAVE_ERRNO_DEF -extern int errno; -#endif - -main() -{ -#ifdef _MSC_VER -/* - * If we use "cl" to compile and call access(".", E_OK|F_OK), the program will - * cause an exception that results in a popup window. For this reason, the test - * is disabled for "cl", it would not work anyway. - */ - int ret = 1; -#else - int ret = 0; - - if (access(".", F_OK) != 0) - ret = 1; - else if (access(".", E_OK|F_OK) != 0) - ret = 1; - else if (access(".", (R_OK<<4)|F_OK) == 0) - ret = 1; -#endif - - exit(ret); -}], - [ac_cv_access_e_ok=yes], - [ac_cv_access_e_ok=no])]) -if test $ac_cv_access_e_ok = yes; then - AC_DEFINE(HAVE_ACCESS_E_OK) -fi]) - - -dnl XXXXXXXXXXXXXXXXXX Begin Stolen (but modified) from GNU tar XXXXXXXXXXXXXXXXXXXXXXXXXXX -dnl Changes: - -dnl One line has been changed to: [ac_save_CC="${CC-cc}" to default to "'cc" - -dnl AC_SYS_LARGEFILE_MACRO_VALUE test moved from AC_FUNC_FSEEKO into AC_SYS_LARGEFILE -dnl Do not call AC_FUNC_FSEEKO because it does not check whether fseeko() is -dnl available on non Large File mode. There are additionoal tests for fseeko()/ftello() -dnl inside the AC_HAVE_LARGEFILES test. - -dnl largefile_cc_opt definition added - -#serial 18 - -dnl By default, many hosts won't let programs access large files; -dnl one must use special compiler options to get large-file access to work. -dnl For more details about this brain damage please see: -dnl http://www.sas.com/standards/large.file/x_open.20Mar96.html - -dnl Written by Paul Eggert . - -dnl Internal subroutine of AC_SYS_LARGEFILE. -dnl AC_SYS_LARGEFILE_TEST_INCLUDES -AC_DEFUN([AC_SYS_LARGEFILE_TEST_INCLUDES], - [[#include - /* Check that off_t can represent 2**63 - 1 correctly. - We can't simply "#define LARGE_OFF_T 9223372036854775807", - since some C++ compilers masquerading as C compilers - incorrectly reject 9223372036854775807. */ -# define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) - int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 - && LARGE_OFF_T % 2147483647 == 1) - ? 1 : -1]; - ]]) - -dnl Internal subroutine of AC_SYS_LARGEFILE. -dnl AC_SYS_LARGEFILE_MACRO_VALUE(C-MACRO, VALUE, CACHE-VAR, COMMENT, INCLUDES, FUNCTION-BODY) -AC_DEFUN([AC_SYS_LARGEFILE_MACRO_VALUE], - [AC_CACHE_CHECK([for $1 value needed for large files], $3, - [$3=no - AC_TRY_COMPILE([$5], - [$6], - , - [AC_TRY_COMPILE([#define $1 $2] -[$5] - , - [$6], - [$3=$2])])]) - if test "[$]$3" != no; then - AC_DEFINE_UNQUOTED([$1], [$]$3, [$4]) - fi]) - -AC_DEFUN([AC_SYS_LARGEFILE], - [AC_ARG_ENABLE(largefile, - [ --disable-largefile omit support for large files]) - if test "$enable_largefile" != no; then - - AC_CACHE_CHECK([for special C compiler options needed for large files], - ac_cv_sys_largefile_CC, - [ac_cv_sys_largefile_CC=no - largefile_cc_opt="" - if test "$GCC" != yes; then - # IRIX 6.2 and later do not support large files by default, - # so use the C compiler's -n32 option if that helps. - AC_TRY_COMPILE(AC_SYS_LARGEFILE_TEST_INCLUDES, , , - [ac_save_CC="${CC-cc}" - CC="$CC -n32" - AC_TRY_COMPILE(AC_SYS_LARGEFILE_TEST_INCLUDES, , - ac_cv_sys_largefile_CC=' -n32') - CC="$ac_save_CC"]) - fi]) - if test "$ac_cv_sys_largefile_CC" != no; then - CC="$CC$ac_cv_sys_largefile_CC" - largefile_cc_opt="$ac_cv_sys_largefile_CC" - fi - - AC_SYS_LARGEFILE_MACRO_VALUE(_FILE_OFFSET_BITS, 64, - ac_cv_sys_file_offset_bits, - [Number of bits in a file offset, on hosts where this is settable.], - AC_SYS_LARGEFILE_TEST_INCLUDES) - AC_SYS_LARGEFILE_MACRO_VALUE(_LARGE_FILES, 1, - ac_cv_sys_large_files, - [Define for large files, on AIX-style hosts.], - AC_SYS_LARGEFILE_TEST_INCLUDES) - AC_SYS_LARGEFILE_MACRO_VALUE(_LARGEFILE_SOURCE, 1, - ac_cv_sys_largefile_source, - [Define to make fseeko visible on some hosts (e.g. glibc 2.2).], - [#include ], [return !fseeko;]) - fi - ]) - - -AC_DEFUN([AC_FUNC_FSEEKO], - [AC_SYS_LARGEFILE_MACRO_VALUE(_LARGEFILE_SOURCE, 1, - ac_cv_sys_largefile_source, - [Define to make fseeko visible on some hosts (e.g. glibc 2.2).], - [#include ], [return !fseeko;]) - # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug - # in glibc 2.1.3, but that breaks too many other things. - # If you want fseeko and ftello with glibc, upgrade to a fixed glibc. - - AC_CACHE_CHECK([for fseeko], ac_cv_func_fseeko, - [ac_cv_func_fseeko=no - AC_TRY_LINK([#include ], - [return fseeko && fseeko (stdin, 0, 0);], - [ac_cv_func_fseeko=yes])]) - if test $ac_cv_func_fseeko != no; then - AC_DEFINE(HAVE_FSEEKO, 1, - [Define if fseeko (and presumably ftello) exists and is declared.]) - fi]) - - -dnl XXXXXXXXXXXXXXXXXX End Stolen (but modified) from GNU tar XXXXXXXXXXXXXXXXXXXXXXXXXXXXX - -AC_DEFUN([AC_HAVE_LARGEFILES], -[AC_CACHE_CHECK([if system supports Large Files at all], ac_cv_largefiles, - [AC_TRY_COMPILE([#include -#include ], - [ -/* - * Check that off_t can represent 2**63 - 1 correctly. - * We can't simply "#define LARGE_OFF_T 9223372036854775807", - * since some C++ compilers masquerading as C compilers - * incorrectly reject 9223372036854775807. - */ -# define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) - int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 - && LARGE_OFF_T % 2147483647 == 1) - ? 1 : -1]; -return !fseeko; -return !ftello;], - [ac_cv_largefiles=yes], - [ac_cv_largefiles=no])]) - if test $ac_cv_largefiles = yes; then - AC_DEFINE(HAVE_LARGEFILES) - fi]) - -dnl Checks for whether fseeko() is available in non large file mode -dnl and whether there is a prototype for fseeko() -dnl Defines HAVE_FSEEKO on success. -AC_DEFUN([AC_SMALL_FSEEKO], -[AC_CACHE_CHECK([for fseeko()], ac_cv_func_fseeko, - [AC_TRY_LINK([#include ], -[return !fseeko;], - [ac_cv_func_fseeko=yes], - [ac_cv_func_fseeko=no])]) -if test $ac_cv_func_fseeko = yes; then - AC_DEFINE(HAVE_FSEEKO) -fi]) - -dnl Checks for whether ftello() is available in non large file mode -dnl and whether there is a prototype for ftello() -dnl Defines HAVE_FTELLO on success. -AC_DEFUN([AC_SMALL_FTELLO], -[AC_CACHE_CHECK([for ftello()], ac_cv_func_ftello, - [AC_TRY_LINK([#include ], -[return !ftello;], - [ac_cv_func_ftello=yes], - [ac_cv_func_ftello=no])]) -if test $ac_cv_func_ftello = yes; then - AC_DEFINE(HAVE_FTELLO) -fi]) - -dnl Checks if compiler allows dynamic arrays. -dnl Defines HAVE_DYN_ARRAYS on success. -AC_DEFUN([AC_DYN_ARRAYS], -[AC_CACHE_CHECK([if compiler allows dynamic arrays], ac_cv_dyn_arrays, - [AC_TRY_COMPILE([], - [extern int __aa(); int len = __aa(); char some_array[len];], - [ac_cv_dyn_arrays=yes], - [ac_cv_dyn_arrays=no])]) -if test $ac_cv_dyn_arrays = yes; then - AC_DEFINE(HAVE_DYN_ARRAYS) -fi]) - -dnl Checks if Linux include file linux/ext2_fs.h is broken -dnl Defines HAVE_BROKEN_LINUX_EXT2_FS_H on success. -AC_DEFUN([AC_BROKEN_LINUX_EXT2_FS_H], -[AC_CACHE_CHECK([if Linux include file linux/ext2_fs.h is broken], ac_cv_broken_linux_ext2_fs_h, - [AC_TRY_COMPILE([ -#if defined(__linux__) || defined(__linux) || defined(linux) -#include -#endif], - [], - [ac_cv_broken_linux_ext2_fs_h=no], - [ac_cv_broken_linux_ext2_fs_h=yes])]) -if test $ac_cv_broken_linux_ext2_fs_h = yes; then - AC_DEFINE(HAVE_BROKEN_LINUX_EXT2_FS_H) -fi]) - -dnl Checks if Linux include file /usr/src/linux/include/linux/ext2_fs.h is broken -dnl Defines HAVE_BROKEN_SRC_LINUX_EXT2_FS_H on success. -AC_DEFUN([AC_BROKEN_SRC_LINUX_EXT2_FS_H], -[AC_CACHE_CHECK([if Linux include file /usr/src/linux/include/linux/ext2_fs.h is broken], ac_cv_broken_src_linux_ext2_fs_h, - [___CPPFLAGS=$CPPFLAGS; CPPFLAGS="-I/usr/src/linux/include $CPPFLAGS" - AC_TRY_COMPILE([ -#if defined(__linux__) || defined(__linux) || defined(linux) -#include -#endif], - [], - [ac_cv_broken_src_linux_ext2_fs_h=no], - [ac_cv_broken_src_linux_ext2_fs_h=yes])]) -CPPFLAGS=$___CPPFLAGS -if test $ac_cv_broken_src_linux_ext2_fs_h = yes; then - AC_DEFINE(HAVE_BROKEN_SRC_LINUX_EXT2_FS_H) -fi]) - -dnl Checks if Linux include file scsi/scsi.h is broken -dnl Defines HAVE_BROKEN_SCSI_SCSI_H on success. -AC_DEFUN([AC_BROKEN_SCSI_SCSI_H], -[AC_CACHE_CHECK([if Linux include file scsi/scsi.h is broken], ac_cv_broken_scsi_scsi_h, - [AC_TRY_COMPILE([ -#if defined(__linux__) || defined(__linux) || defined(linux) -#include -#endif], - [], - [ac_cv_broken_scsi_scsi_h=no], - [ac_cv_broken_scsi_scsi_h=yes])]) -if test $ac_cv_broken_scsi_scsi_h = yes; then - AC_DEFINE(HAVE_BROKEN_SCSI_SCSI_H) -fi]) - -dnl Checks if Linux include file /usr/src/linux/include/scsi/scsi.h is broken -dnl Defines HAVE_BROKEN_SRC_SCSI_SCSI_H on success. -AC_DEFUN([AC_BROKEN_SRC_SCSI_SCSI_H], -[AC_CACHE_CHECK([if Linux include file /usr/src/linux/include/scsi/scsi.h is broken], ac_cv_broken_src_scsi_scsi_h, - [___CPPFLAGS=$CPPFLAGS; CPPFLAGS="-I/usr/src/linux/include $CPPFLAGS" - AC_TRY_COMPILE([ -#if defined(__linux__) || defined(__linux) || defined(linux) -#include -#endif], - [], - [ac_cv_broken_src_scsi_scsi_h=no], - [ac_cv_broken_src_scsi_scsi_h=yes])]) -CPPFLAGS=$___CPPFLAGS -if test $ac_cv_broken_src_scsi_scsi_h = yes; then - AC_DEFINE(HAVE_BROKEN_SRC_SCSI_SCSI_H) -fi]) - -dnl Checks if Linux include file scsi/sg.h is broken -dnl Defines HAVE_BROKEN_SCSI_SG_H on success. -AC_DEFUN([AC_BROKEN_SCSI_SG_H], -[AC_CACHE_CHECK([if Linux include file scsi/sg.h is broken], ac_cv_broken_scsi_sg_h, - [AC_TRY_COMPILE([ -#if defined(__linux__) || defined(__linux) || defined(linux) -#include -#include -#endif], - [], - [ac_cv_broken_scsi_sg_h=no], - [ac_cv_broken_scsi_sg_h=yes])]) -if test $ac_cv_broken_scsi_sg_h = yes; then - AC_DEFINE(HAVE_BROKEN_SCSI_SG_H) -fi]) - -dnl Checks if Linux include file /usr/src/linux/include/scsi/sg.h is broken -dnl Defines HAVE_BROKEN_SRC_SCSI_SG_H on success. -AC_DEFUN([AC_BROKEN_SRC_SCSI_SG_H], -[AC_CACHE_CHECK([if Linux include file /usr/src/linux/include/scsi/sg.h is broken], ac_cv_broken_src_scsi_sg_h, - [___CPPFLAGS=$CPPFLAGS; CPPFLAGS="-I/usr/src/linux/include $CPPFLAGS" - AC_TRY_COMPILE([ -#if defined(__linux__) || defined(__linux) || defined(linux) -#include -#include -#endif], - [], - [ac_cv_broken_src_scsi_sg_h=no], - [ac_cv_broken_src_scsi_sg_h=yes])]) -CPPFLAGS=$___CPPFLAGS -if test $ac_cv_broken_src_scsi_sg_h = yes; then - AC_DEFINE(HAVE_BROKEN_SRC_SCSI_SG_H) -fi]) - -AC_DEFUN(AC_PROG_SHELL_BROKEN_E, -[AC_CACHE_CHECK(whether handling of /bin/sh -ce 'command' is broken, ac_cv_prog_shell_broken_e, -[if AC_TRY_COMMAND(/bin/sh -ce 'if false; true; then echo yes; else echo no; fi') | egrep yes >/dev/null 2>&1; then - ac_cv_prog_shell_broken_e=no -else - ac_cv_prog_shell_broken_e=yes -fi -if test $ac_cv_prog_shell_broken_e = yes; then - AC_DEFINE(HAVE_PROG_SHELL_BROKEN_E) -fi])]) diff -Nru cdrtools-2.01.01a33/cdda2wav/aifc.c cdrtools-3.02a09/cdda2wav/aifc.c --- cdrtools-2.01.01a33/cdda2wav/aifc.c 2006-09-13 15:46:08.000000000 +0000 +++ cdrtools-3.02a09/cdda2wav/aifc.c 2016-02-14 21:53:40.000000000 +0000 @@ -1,12 +1,13 @@ -/* @(#)aifc.c 1.9 06/09/13 Copyright 1998,1999 Heiko Eissfeldt, Copyright 2006 J. Schilling */ +/* @(#)aifc.c 1.16 16/02/14 Copyright 1998,1999 Heiko Eissfeldt, Copyright 2006-2010 J. Schilling */ +#include "config.h" #ifndef lint -static char sccsid[] = -"@(#)aifc.c 1.9 06/09/13 Copyright 1998,1999 Heiko Eissfeldt, Copyright 2006 J. Schilling"; +static UConst char sccsid[] = +"@(#)aifc.c 1.16 16/02/14 Copyright 1998,1999 Heiko Eissfeldt, Copyright 2006-2010 J. Schilling"; #endif /* * Copyright (C) by Heiko Eissfeldt - * Copyright (c) 2006 J. Schilling + * Copyright (c) 2006-2010 J. Schilling * * definitions for aifc pcm output */ @@ -17,13 +18,15 @@ * with the License. * * See the file CDDL.Schily.txt in this distribution for details. + * A copy of the CDDL is also available via the Internet at + * http://www.opensource.org/licenses/cddl1.txt * * When distributing Covered Code, include this CDDL HEADER in each * file and include the License file CDDL.Schily.txt from this distribution. */ #include "config.h" -#include +#include #include #include #include @@ -31,6 +34,7 @@ #include "mytype.h" #include "byteorder.h" #include "sndfile.h" +#include "global.h" typedef UINT4 FOURCC; /* a four character code */ typedef struct CHUNKHDR { @@ -148,7 +152,7 @@ fillbytes(&AifcHdr, sizeof (AifcHdr), '\0'); AifcHdr.formChk.ckid = cpu_to_be32(FOURCC_FORM); AifcHdr.formChk.dwSize = cpu_to_be32(expected_bytes + - offset_of(AIFCHDR, blocksize) + + offsetof(AIFCHDR, blocksize) + sizeof (AifcHdr.blocksize) - offsetof(AIFCHDR, commChk)); AifcHdr.formType = cpu_to_be32(FOURCC_AIFC); @@ -169,8 +173,8 @@ AifcHdr.timestamp = cpu_to_be32(UINT4_C(0xA2805140)); AifcHdr.commChk.ckid = cpu_to_be32(FOURCC_COMM); - AifcHdr.commChk.dwSize = cpu_to_be32(offset_of(AIFCHDR, ssndChkid) - - offset_of(AIFCHDR, numChannels)); + AifcHdr.commChk.dwSize = cpu_to_be32(offsetof(AIFCHDR, ssndChkid) + - offsetof(AIFCHDR, numChannels)); AifcHdr.numChannels[1] = channels; @@ -183,13 +187,15 @@ Format_samplerate(rate, AifcHdr.sample_rate); memcpy(AifcHdr.ssndChkid, "SSND", 4); - tmp = cpu_to_be32(expected_bytes + offset_of(AIFCHDR, blocksize) + - sizeof (AifcHdr.blocksize) - offset_of(AIFCHDR, offset)); + tmp = cpu_to_be32(expected_bytes + offsetof(AIFCHDR, blocksize) + + sizeof (AifcHdr.blocksize) - offsetof(AIFCHDR, offset)); AifcHdr.dwSize[0] = tmp >> 24; AifcHdr.dwSize[1] = tmp >> 16; AifcHdr.dwSize[2] = tmp >> 8; AifcHdr.dwSize[3] = tmp >> 0; + global.md5offset = sizeof (AifcHdr); + return (write(audio, &AifcHdr, sizeof (AifcHdr))); } @@ -248,5 +254,6 @@ Uchar *buf, size_t BytesToDo))) write, /* get sound samples out */ InSizeToOutSize, /* compressed? output file size */ - 1 /* needs big endian samples */ + 1, /* needs big endian samples */ + "AIFC" }; diff -Nru cdrtools-2.01.01a33/cdda2wav/aiff.c cdrtools-3.02a09/cdda2wav/aiff.c --- cdrtools-2.01.01a33/cdda2wav/aiff.c 2006-09-13 15:46:08.000000000 +0000 +++ cdrtools-3.02a09/cdda2wav/aiff.c 2016-02-14 21:53:40.000000000 +0000 @@ -1,12 +1,13 @@ -/* @(#)aiff.c 1.8 06/09/13 Copyright 1998,1999 Heiko Eissfeldt, Copyright 2006 J. Schilling */ +/* @(#)aiff.c 1.15 16/02/14 Copyright 1998,1999 Heiko Eissfeldt, Copyright 2006-2010 J. Schilling */ +#include "config.h" #ifndef lint -static char sccsid[] = -"@(#)aiff.c 1.8 06/09/13 Copyright 1998,1999 Heiko Eissfeldt, Copyright 2006 J. Schilling"; +static UConst char sccsid[] = +"@(#)aiff.c 1.15 16/02/14 Copyright 1998,1999 Heiko Eissfeldt, Copyright 2006-2010 J. Schilling"; #endif /* * Copyright (C) by Heiko Eissfeldt - * Copyright (c) 2006 J. Schilling + * Copyright (c) 2006-2010 J. Schilling * * definitions for aiff pcm output */ @@ -17,13 +18,15 @@ * with the License. * * See the file CDDL.Schily.txt in this distribution for details. + * A copy of the CDDL is also available via the Internet at + * http://www.opensource.org/licenses/cddl1.txt * * When distributing Covered Code, include this CDDL HEADER in each * file and include the License file CDDL.Schily.txt from this distribution. */ #include "config.h" -#include +#include #include #include #include @@ -31,6 +34,7 @@ #include "mytype.h" #include "byteorder.h" #include "sndfile.h" +#include "global.h" typedef UINT4 FOURCC; /* a four character code */ typedef struct CHUNKHDR { @@ -135,14 +139,14 @@ fillbytes(&AiffHdr, sizeof (AiffHdr), '\0'); AiffHdr.formChk.ckid = cpu_to_be32(FOURCC_FORM); AiffHdr.formChk.dwSize = cpu_to_be32(expected_bytes + - offset_of(AIFFHDR, blocksize) + + offsetof(AIFFHDR, blocksize) + sizeof (AiffHdr.blocksize) - offsetof(AIFFHDR, formType)); AiffHdr.formType = cpu_to_be32(FOURCC_AIFF); AiffHdr.commChk.ckid = cpu_to_be32(FOURCC_COMM); - AiffHdr.commChk.dwSize = cpu_to_be32(offset_of(AIFFHDR, ssndChkid) - - offset_of(AIFFHDR, numChannels)); + AiffHdr.commChk.dwSize = cpu_to_be32(offsetof(AIFFHDR, ssndChkid) + - offsetof(AIFFHDR, numChannels)); AiffHdr.numChannels[1] = channels; tmp = cpu_to_be32(expected_bytes/(channels * (nBitsPerSample/8))); @@ -154,13 +158,15 @@ Format_samplerate(rate, AiffHdr.sample_rate); memcpy(AiffHdr.ssndChkid, "SSND", 4); - tmp = cpu_to_be32(expected_bytes + offset_of(AIFFHDR, blocksize) + - sizeof (AiffHdr.blocksize) - offset_of(AIFFHDR, offset)); + tmp = cpu_to_be32(expected_bytes + offsetof(AIFFHDR, blocksize) + + sizeof (AiffHdr.blocksize) - offsetof(AIFFHDR, offset)); AiffHdr.dwSize[0] = tmp >> 24; AiffHdr.dwSize[1] = tmp >> 16; AiffHdr.dwSize[2] = tmp >> 8; AiffHdr.dwSize[3] = tmp >> 0; + global.md5offset = sizeof (AiffHdr); + return (write(audio, &AiffHdr, sizeof (AiffHdr))); } @@ -220,5 +226,6 @@ Uchar *buf, size_t BytesToDo))) write, /* get sound samples out */ InSizeToOutSize, /* compressed? output file size */ - 1 /* needs big endian samples */ + 1, /* needs big endian samples */ + "AIFF" }; diff -Nru cdrtools-2.01.01a33/cdda2wav/base64.c cdrtools-3.02a09/cdda2wav/base64.c --- cdrtools-2.01.01a33/cdda2wav/base64.c 2006-09-13 15:46:08.000000000 +0000 +++ cdrtools-3.02a09/cdda2wav/base64.c 2009-07-10 20:36:47.000000000 +0000 @@ -1,7 +1,8 @@ -/* @(#)base64.c 1.7 06/09/13 Copyright 1998,1999 Heiko Eissfeldt */ +/* @(#)base64.c 1.10 09/07/10 Copyright 1998,1999 Heiko Eissfeldt, Copyright 2006-2009 J. Schilling */ +#include "config.h" #ifndef lint -static char sccsid[] = -"@(#)base64.c 1.7 06/09/13 Copyright 1998,1999 Heiko Eissfeldt"; +static UConst char sccsid[] = +"@(#)base64.c 1.10 09/07/10 Copyright 1998,1999 Heiko Eissfeldt, Copyright 2006-2009 J. Schilling"; #endif /* @@ -56,7 +57,7 @@ */ #include "config.h" -#include +#include #include #include "base64.h" diff -Nru cdrtools-2.01.01a33/cdda2wav/byteorder.h cdrtools-3.02a09/cdda2wav/byteorder.h --- cdrtools-2.01.01a33/cdda2wav/byteorder.h 2006-05-13 21:02:12.000000000 +0000 +++ cdrtools-3.02a09/cdda2wav/byteorder.h 2009-05-05 21:25:20.000000000 +0000 @@ -1,10 +1,14 @@ -/* @(#)byteorder.h 1.5 06/05/13 Copyright 1998,1999 Heiko Eissfeldt */ +/* @(#)byteorder.h 1.8 09/05/05 Copyright 1998,1999 Heiko Eissfeldt, Copyright 2006-2009 J. Schilling */ -#ifndef _BYTEORDER_H +#if !defined(_BYTEORDER_H) || !defined(MYBYTE_ORDER) +#undef _BYTEORDER_H #define _BYTEORDER_H - +#undef MYBYTE_ORDER #define MYBYTE_ORDER 1 +#include + + /* * supply the byte order macros */ diff -Nru cdrtools-2.01.01a33/cdda2wav/cdda2mp3 cdrtools-3.02a09/cdda2wav/cdda2mp3 --- cdrtools-2.01.01a33/cdda2wav/cdda2mp3 2000-06-24 05:47:48.000000000 +0000 +++ cdrtools-3.02a09/cdda2wav/cdda2mp3 2010-02-14 13:38:52.000000000 +0000 @@ -1,9 +1,8 @@ #! /bin/sh +# @(#)cdda2mp3 1.5 10/02/14 Copyright 2010 J. Schilling +# # Demo script for processing all audio tracks with a mp3 decoder # based on a news article by Tom Kludy -# This variant uses named pipes in order to save space. -# There is another variant of this script, which uses temporary -# wav files (see cdda2mp3.new). # # usage: cdda2mp3 # @@ -11,11 +10,23 @@ # and used to generate a list of audio track numbers and start # sectors, which in turn are used in a loop to spawn cdda2wav # and the post processor on a track by track basis. +########################################################################### +# The contents of this file are subject to the terms of the +# Common Development and Distribution License, Version 1.0 only +# (the "License"). You may not use this file except in compliance +# with the License. +# +# See the file CDDL.Schily.txt in this distribution for details. +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file CDDL.Schily.txt from this distribution. +########################################################################### # specify the sampling program and its options # do not specify the track option here! CDDA2WAV=cdda2wav -CDDA2WAV_OPTS='-H -P0 -q' +CDDA2WAV_OPTS='-H -q' +CDDA2WAV_XOPTS='' # for normal use, comment out the next line #DEBUG='-d1' @@ -23,25 +34,78 @@ # the post processor is fed through a pipe to avoid space waste # specify the post processing program and its options MP_CODER=lame -#MP_OPTIONS='' - -FILEPREFIX=${1:-audiotrack} - -TRACK=1 -while : -do - $CDDA2WAV $CDDA2WAV_OPTS -t$TRACK $DEBUG - | \ -# echo n | $MP_CODER $NPIPE $FILEPREFIX$TRACK.mp3 $MP_OPTIONS - $MP_CODER $MP_OPTIONS - $FILEPREFIX$TRACK.mp3 - - # check result code - RES=$? - if [ $RES = 0 ] ; then - echo File $FILEPREFIX$TRACK.mp3 finished successfully. - else - echo File $FILEPREFIX$TRACK.mp3 failed \(result $RES\). Aborted. >&2 - break - fi - TRACK=`echo $(($TRACK+1))` +MP_CODER_HELP=--help +MP_OPTIONS='' +MP_XOPTS='' + +found_fileprefix=FALSE + +$MP_CODER $MP_CODER_HELP > /dev/null 2> /dev/null +if [ $? != 0 ] ; then + echo '"'$MP_CODER'"' "not found. Install first!" + exit 1 +fi + +usage() { + echo "Usage: cdda2mp3 [dev=] [cdda2wav options] [] [ogg options]" +} + +while [ $# -gt 0 ]; do + case "$1" in + -help) + usage + exit 0 + ;; + + dev=*) + CDDA2WAV_DEV="$1" + shift + ;; + + -*) + if [ $found_fileprefix = TRUE ]; then + MP_XOPTS="$MP_XOPTS $1" + else + CDDA2WAV_XOPTS="$CDDA2WAV_XOPTS $1" + fi + shift + ;; + + *) + if [ $found_fileprefix = TRUE ]; then + echo "Too many file type args." + usage + exit 1 + fi + FILEPREFIX=${1-audiotrack} + found_fileprefix=TRUE + #echo "arg: $1" + #echo "args: $@" + shift + ;; + esac done +if [ -r /etc/default/cdda2mp3 ]; then + . /etc/default/cdda2mp3 2>/dev/null +fi +TRACKS=`$CDDA2WAV $CDDA2WAV_DEV -H -J -vtoc -N -g 2>&1 | grep '^T..:' | sed -e 's/T\(..\):.*/\1/g'` +if [ -z "$TRACKS" ]; then + $CDDA2WAV $CDDA2WAV_DEV -H -J -vtoc -N -g + exit 1 +fi + +for TRACK in $TRACKS; do + NAME=$TRACK-$FILEPREFIX.mp3 + $CDDA2WAV $CDDA2WAV_DEV $CDDA2WAV_OPTS -t$TRACK $DEBUG $CDDA2WAV_XOPTS -Owav - | \ + $MP_CODER $MP_OPTIONS $MP_XOPTS - > $NAME + + # check result code + RES=$? + if [ $RES = 0 ] ; then + echo File '"'$NAME'"' finished successfully. + else + echo File '"'$NAME'"' failed \(result $RES\). Aborted. >&2 + break + fi +done diff -Nru cdrtools-2.01.01a33/cdda2wav/cdda2mp3.1 cdrtools-3.02a09/cdda2wav/cdda2mp3.1 --- cdrtools-2.01.01a33/cdda2wav/cdda2mp3.1 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/cdda2wav/cdda2mp3.1 2010-02-10 23:04:52.000000000 +0000 @@ -0,0 +1,2 @@ +.so man1/cdda2ogg.1 +.\" "@(#)cdda2mp3.1 1.1 10/02/11 " diff -Nru cdrtools-2.01.01a33/cdda2wav/cdda2mp3.mk cdrtools-3.02a09/cdda2wav/cdda2mp3.mk --- cdrtools-2.01.01a33/cdda2wav/cdda2mp3.mk 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/cdda2wav/cdda2mp3.mk 2010-02-10 23:40:15.000000000 +0000 @@ -0,0 +1,16 @@ +#ident "@(#)cdda2mp3.mk 1.2 10/02/11 " +########################################################################### +SRCROOT= .. +RULESDIR= RULES +include $(SRCROOT)/$(RULESDIR)/rules.top +########################################################################### + +INSDIR= bin +INSMODE= 755 +TARGET= cdda2mp3 +SCRFILE= cdda2mp3 +XMK_FILE= cdda2mp3.mk1 + +########################################################################### +include $(SRCROOT)/$(RULESDIR)/rules.scr +########################################################################### diff -Nru cdrtools-2.01.01a33/cdda2wav/cdda2mp3.mk1 cdrtools-3.02a09/cdda2wav/cdda2mp3.mk1 --- cdrtools-2.01.01a33/cdda2wav/cdda2mp3.mk1 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/cdda2wav/cdda2mp3.mk1 2010-02-10 23:01:18.000000000 +0000 @@ -0,0 +1,18 @@ +#ident "@(#)cdda2mp3.mk1 1.1 10/02/11 " +########################################################################### +# Sample makefile for installing manual pages +########################################################################### +SRCROOT= .. +RULESDIR= RULES +include $(SRCROOT)/$(RULESDIR)/rules.top +########################################################################### + +MANDIR= man +TARGETMAN= cdda2mp3 +MANSECT= $(MANSECT_CMD) +MANSUFFIX= $(MANSUFF_CMD) +MANFILE= cdda2mp3.1 + +########################################################################### +include $(SRCROOT)/$(RULESDIR)/rules.man +########################################################################### diff -Nru cdrtools-2.01.01a33/cdda2wav/cdda2ogg cdrtools-3.02a09/cdda2wav/cdda2ogg --- cdrtools-2.01.01a33/cdda2wav/cdda2ogg 2002-04-09 11:18:15.000000000 +0000 +++ cdrtools-3.02a09/cdda2wav/cdda2ogg 2010-02-14 13:38:52.000000000 +0000 @@ -1,9 +1,8 @@ #! /bin/sh +# @(#)cdda2ogg 1.5 10/02/14 Copyright 2010 J. Schilling +# # Demo script for processing all audio tracks with a mp3 decoder # based on a news article by Tom Kludy -# This variant uses named pipes in order to save space. -# There is another variant of this script, which uses temporary -# wav files (see cdda2mp3.new). # # usage: cdda2ogg # @@ -11,11 +10,23 @@ # and used to generate a list of audio track numbers and start # sectors, which in turn are used in a loop to spawn cdda2wav # and the post processor on a track by track basis. +########################################################################### +# The contents of this file are subject to the terms of the +# Common Development and Distribution License, Version 1.0 only +# (the "License"). You may not use this file except in compliance +# with the License. +# +# See the file CDDL.Schily.txt in this distribution for details. +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file CDDL.Schily.txt from this distribution. +########################################################################### # specify the sampling program and its options # do not specify the track option here! CDDA2WAV=cdda2wav -CDDA2WAV_OPTS='-H -P0 -q' +CDDA2WAV_OPTS='-H -q' +CDDA2WAV_XOPTS='' # for normal use, comment out the next line #DEBUG='-d1' @@ -23,33 +34,78 @@ # the post processor is fed through a pipe to avoid space waste # specify the post processing program and its options MP_CODER=oggenc +MP_CODER_HELP=--help MP_OPTIONS='' +MP_XOPTS='' + +found_fileprefix=FALSE -$MP_CODER -h > /dev/null 2> /dev/null +$MP_CODER $MP_CODER_HELP > /dev/null 2> /dev/null if [ $? != 0 ] ; then - echo "Oggenc not found. Install vorbis-tools first!" - exit 1 + echo '"'$MP_CODER'"' "not found. Install vorbis-tools first!" + exit 1 fi -FILEPREFIX=${1:-audiotrack} +usage() { + echo "Usage: cdda2ogg [dev=] [cdda2wav options] [] [ogg options]" +} + +while [ $# -gt 0 ]; do + case "$1" in + -help) + usage + exit 0 + ;; + + dev=*) + CDDA2WAV_DEV="$1" + shift + ;; + + -*) + if [ $found_fileprefix = TRUE ]; then + MP_XOPTS="$MP_XOPTS $1" + else + CDDA2WAV_XOPTS="$CDDA2WAV_XOPTS $1" + fi + shift + ;; + + *) + if [ $found_fileprefix = TRUE ]; then + echo "Too many file type args." + usage + exit 1 + fi + FILEPREFIX=${1-audiotrack} + found_fileprefix=TRUE + #echo "arg: $1" + #echo "args: $@" + shift + ;; + esac +done -. /etc/default/cdda2ogg 2>/dev/null || true +if [ -r /etc/default/cdda2ogg ]; then + . /etc/default/cdda2ogg 2>/dev/null +fi +TRACKS=`$CDDA2WAV $CDDA2WAV_DEV -H -J -vtoc -N -g 2>&1 | grep '^T..:' | sed -e 's/T\(..\):.*/\1/g'` +if [ -z "$TRACKS" ]; then + $CDDA2WAV $CDDA2WAV_DEV -H -J -vtoc -N -g + exit 1 +fi -TRACK=1 -while : -do - NAME=`printf "%02d" $TRACK`-$FILEPREFIX.ogg - $CDDA2WAV $CDDA2WAV_OPTS -t$TRACK $DEBUG - | \ - $MP_CODER $MP_OPTIONS - > $NAME - - # check result code - RES=$? - if [ $RES = 0 ] ; then - echo File $NAME finished successfully. - else - echo File $NAME failed \(result $RES\). Aborted. >&2 - break - fi - TRACK=`echo $(($TRACK+1))` +for TRACK in $TRACKS; do + NAME=$TRACK-$FILEPREFIX.ogg + $CDDA2WAV $CDDA2WAV_DEV $CDDA2WAV_OPTS -t$TRACK $DEBUG $CDDA2WAV_XOPTS -Owav - | \ + $MP_CODER $MP_OPTIONS $MP_XOPTS - > $NAME + + # check result code + RES=$? + if [ $RES = 0 ] ; then + echo File '"'$NAME'"' finished successfully. + else + echo File '"'$NAME'"' failed \(result $RES\). Aborted. >&2 + break + fi done - diff -Nru cdrtools-2.01.01a33/cdda2wav/cdda2ogg.1 cdrtools-3.02a09/cdda2wav/cdda2ogg.1 --- cdrtools-2.01.01a33/cdda2wav/cdda2ogg.1 2004-07-03 09:28:20.000000000 +0000 +++ cdrtools-3.02a09/cdda2wav/cdda2ogg.1 2010-09-21 20:53:46.000000000 +0000 @@ -1,79 +1,191 @@ '\" -.TH "cdda2ogg" "1" -.SH "NAME" -cdda2ogg, cdda2mp3 \(em extract audio CD audio tracks and encode them -.SH "SYNOPSIS" +.\" @(#)cdda2ogg.1 1.5 10/09/21 Copyright 2010 J. Schilling +.\" +.\" The contents of this file are subject to the terms of the +.\" Common Development and Distribution License, Version 1.0 only +.\" (the "License"). You may not use this file except in compliance +.\" with the License. +.\" +.\" See the file CDDL.Schily.txt in this distribution for details. +.\" +.\" When distributing Covered Code, include this CDDL HEADER in each +.\" file and include the License file CDDL.Schily.txt from this distribution. +.\" +.if t .ds a \v'-0.55m'\h'0.00n'\z.\h'0.40n'\z.\v'0.55m'\h'-0.40n'a +.if t .ds o \v'-0.55m'\h'0.00n'\z.\h'0.45n'\z.\v'0.55m'\h'-0.45n'o +.if t .ds u \v'-0.55m'\h'0.00n'\z.\h'0.40n'\z.\v'0.55m'\h'-0.40n'u +.if t .ds A \v'-0.77m'\h'0.25n'\z.\h'0.45n'\z.\v'0.77m'\h'-0.70n'A +.if t .ds O \v'-0.77m'\h'0.25n'\z.\h'0.45n'\z.\v'0.77m'\h'-0.70n'O +.if t .ds U \v'-0.77m'\h'0.30n'\z.\h'0.45n'\z.\v'0.77m'\h'-0.75n'U +.if t .ds s \\(*b +.if t .ds S SS +.if n .ds a ae +.if n .ds o oe +.if n .ds u ue +.if n .ds s sz +.if t .ds m \\(*m +.if n .ds m micro +.TH "cdda2ogg" 1 "Version 3.0" +.SH NAME +cdda2ogg, cdda2mp3 \- extract CD audio tracks and encode them +.SH SYNOPSIS .PP .B cdda2ogg +[ +.I options +][ +.BI dev= device +] +.RI [ "file prefix" ] +.RI [ "ogg opts" ] .PP .B cdda2mp3 -.SH "DESCRIPTION" +[ +.I options +][ +.BI dev= device +] +.RI [ "file prefix" ] +.RI [ "lame opts" ] +.SH DESCRIPTION .PP -.B cdda2ogg is a simple script that uses the +.B cdda2ogg +is a script that uses the +.B cdda2wav +command to extract all audio tracks with the +.B cdda2wav +command and encode them using the +.BR oggenc (1) +.B Ogg Vorbis +encoder. +.PP +.B cdda2mp3 +is a script that uses the .B cdda2wav command to extract all audio tracks with the .B cdda2wav command and encode them using the -.B ogg123 -respective -.I -MP3 -encoder. The scripts are not intended to be full-featured music archiving -programs, but only for quick storing of few audio data. -It does not use databases like CDDB or have any extra features. You may look -at +.BR lame (1) +.B MP3 +encoder. +.PP +There is no CDDB support yet. + +.SH OPTIONS +.TP 12 +.B \-help +print a short online usage message and exit. +.TP +.BI dev= device +The device to read the data from. If there is only +one CD-ROM drive in the system, the +.B dev= +option may be omitted. For possible values of the +.I device +parameter, see the +.BR cdrecord (1) +man page. +.TP +.B \-* +Any other option beginning with a '-' sign is passed to the .B cdda2wav -if you need them. +program. .PP -.B ogg123 -is provided by the -.B vorbis-tools -which needs to be installed separately. -See -.B www.ogg.org -for more information. - -.SH "CONFIGURATION" +Any other option past the +.B file prefix +argument and beginning with a '-' sign is passed to the +encoder program. .PP +.SH "ENVIRONMENT VARIABLES" +The following environment variables may be used to change the behavior of the +.B cdda2ogg +and the +.B cdda2mp3 +command: +.TP +.B CDDA2WAV +Defines the command to extract WAV data from the CD. +The default value is +.BR cdda2wav . +.TP +.B CDDA2WAV_OPTS +Defines the options passed to the CDDA program while extracting +from the CD. +The default value is +.BR "\-H \-q" . +.TP +.B MP_CODER +The encoder program used to compress the audio data. +The default value is +.B oggenc +for .B cdda2ogg and +.B lame +for +.BR cdda2mp3 . +.TP +.B MP_OPTIONS +Options passed to the encoder program. +The default is empty. +.TP +.B FILEPREFIX +The base filename part of the resulting audio files. +The default file name is +.B $TRACK-$FILEPREFIX.ogg +for +.B cdda2ogg +and +.B $TRACK-$FILEPREFIX.mp3 +for .B cdda2mp3 -have predefined values for reading and labeling of the target files. -You can overwrite them with following environment variables: - -.IP "CDDA2WAV" 10 -Defines the command to run the cdda2wav program - -.IP "CDDA2WAV_OPTS" 10 -Miscelaneous options passed to -.IR $CDDA2WAV . - -.IP "MP_CODER" 10 -The encoder program - -.IP "MP_OPTIONS" 10 -Additional options passed to -.IR $MP_CODER . - -.IP "FILEPREFIX" 10 -The base part of the filename of resulting audio files - +if no +.I file prefix +argument was given on the command line. +.ne 15 +.SH FILES +.PP +If the following files are present, then the scripts source them +to set up local defaults: +.TP +.B /etc/default/cdda2ogg +To set up default values for +.BR cdda2ogg . +.TP +.B /etc/default/cdda2mp3 +To set up default values for +.BR cdda2mp3 . .PP -See /opt/schily/bin/cdda2ogg (cdda2mp3) files to get the default values -.PP -System administrator can also set default values by creating of a shell -include file, defining the variables for the POSIX shell, and storing them as -/etc/default/cdda2ogg (resp. cdda2mp3). +The content may be set up to modify environment variables or to set up +local defaults. .SH "SEE ALSO" -.BR cdda2wav (1) -.SH "AUTHOR" +.BR cdda2wav (1), +.BR cdrecord (1), +.BR oggenc (1), +.BR lame (1). +.SH NOTES +.PP +If a CD contains a hidden audio track before track 1, a file name +with track number 00 is created with the content of the hidden track. +.PP +The program +.BR oggenc (1) +is part of the +.B vorbis-tools +project +See +.B http://www.vorbis.com +for more information. +.sp +The program +.BR lame (1) +is part of the +.B lame +project. +See +.B http://lame.sourceforge.net/ +for more information. +.SH AUTHOR .PP -This manual page was written by Eduard Bloch -(blade@debian.org) for the -.B "Debian GNU/Linux -system (but may be used by others). Permission is -granted to copy, distribute and/or modify this document under the terms of -the GNU Free Documentation License, Version 1.1 or any -later version published by the Free Software Foundation; with no Invariant -Sections, no Front-Cover Texts and no Back-Cover Texts. +The first versions of the scripts have been based on a news article by Tom Kludy. diff -Nru cdrtools-2.01.01a33/cdda2wav/cdda2ogg.mk cdrtools-3.02a09/cdda2wav/cdda2ogg.mk --- cdrtools-2.01.01a33/cdda2wav/cdda2ogg.mk 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/cdda2wav/cdda2ogg.mk 2010-02-10 23:40:15.000000000 +0000 @@ -0,0 +1,16 @@ +#ident "@(#)cdda2ogg.mk 1.2 10/02/11 " +########################################################################### +SRCROOT= .. +RULESDIR= RULES +include $(SRCROOT)/$(RULESDIR)/rules.top +########################################################################### + +INSDIR= bin +INSMODE= 755 +TARGET= cdda2ogg +SCRFILE= cdda2ogg +XMK_FILE= cdda2ogg.mk1 + +########################################################################### +include $(SRCROOT)/$(RULESDIR)/rules.scr +########################################################################### diff -Nru cdrtools-2.01.01a33/cdda2wav/cdda2wav.1 cdrtools-3.02a09/cdda2wav/cdda2wav.1 --- cdrtools-2.01.01a33/cdda2wav/cdda2wav.1 2007-07-01 13:09:39.000000000 +0000 +++ cdrtools-3.02a09/cdda2wav/cdda2wav.1 2017-03-29 19:21:41.000000000 +0000 @@ -1,5 +1,5 @@ '\" t -.\" @(#)cdda2wav.1 1.20 07/07/01 Copyright 1998,1999,2000 Heiko Eissfeldt, Copyright 2004-2007 J. Schilling +.\" @(#)cdda2wav.1 1.64 17/03/29 Copyright 1998,1999,2000 Heiko Eissfeldt, Copyright 2004-2017 J. Schilling .if t .ds a \v'-0.55m'\h'0.00n'\z.\h'0.40n'\z.\v'0.55m'\h'-0.40n'a .if t .ds o \v'-0.55m'\h'0.00n'\z.\h'0.45n'\z.\v'0.55m'\h'-0.45n'o .if t .ds u \v'-0.55m'\h'0.00n'\z.\h'0.40n'\z.\v'0.55m'\h'-0.40n'u @@ -14,251 +14,314 @@ .if n .ds s sz .if t .ds m \\(*m .if n .ds m micro -.TH CDDA2WAV 1 +.TH CDDA2WAV 1 "Version 3.02 2017/03/29" .SH NAME -cdda2wav \- a sampling utility that dumps CD audio data into wav sound -files +cdda2wav \- dumps CD audio data into sound files with extra data verification .SH SYNOPSIS .B cdda2wav -.RB [ \-c -.IR chans ] -.RB [ \-s ] -.RB [ \-m ] -.RB [ \-b -.IR bits ] -.RB [ \-r -.IR rate ] -.RB [ \-a -.IR divider ] -.RB [ \-t -.IR track [ +endtrack ]] -.RB [ \-i -.IR index ] -.RB [ \-o -.IR offset ] -.RB [ \-d -.IR duration ] -.RB [ \-x ] -.RB [ \-q ] -.RB [ \-w ] -.RB [ \-v -.IR optlist ] -.RB [ \-V ] -.RB [ \-Q ] -.RB [ \-J ] -.RB [ \-L -.IR cddbmode ] -.RB [ \-R ] -.RB [ \-P -.IR sectors ] -.RB [ \-F ] -.RB [ \-G ] -.RB [ \-T ] -.RB [ \-e ] -.RB [ \-p -.IR percentage ] -.RB [ \-n -.IR sectors ] -.RB [ \-l -.IR buffers ] -.RB [ \-N ] -.RB [ \-J ] -.RB [ \-H ] -.RB [ \-g ] -.RB [ \-B ] -.RB [ dev= -.IR device ] -.RB [ \-A -.IR auxdevice ] -.RB [ \-I -.IR interface ] -.RB [ \-O -.IR audiotype ] -.RB [ \-C -.IR input-endianess ] -.RB [ \-E -.IR output-endianess ] -.RB [ \-M -.IR count ] -.RB [ \-S -.IR speed ] -.RB [ \-paranoia ] -.RB [ cddbp\-server=\fIservername\fP ] -.RB [ cddbp\-port=\fIportnumber\fP ] -.RI [ filename(s) +[ +.I options +][ +.BI dev= device +] +.RI [ file(s) or .IR directories ] .SH DESCRIPTION .B cdda2wav -can retrieve audio tracks from CDROM drives (see README for a list of drives) that are -capable of reading audio data digitally to the host +can retrieve audio tracks from CDROM drives which are +capable of reading audio data digitally via SCSI .RB ( CDDA ). +.LP +As +.B cdda2wav +implements strategies to work around typical defects on audio CDs it reads many disks that +cannot be read by other software. +As +.B cdda2wav +can use +.B libparanoia +(see +.B \-paranoia +option below) +to verify the data that has been read from the medium, it delivers superior quality even +if the medium is dusty, scratched or if other problems occur. +.LP +As +.B cdda2wav +may be directed to write the audio data to stdout, it writes all its informational output +to stderr by default. See +.BI out\-fd= descriptor +option below. +.PP +.SS "Default settings +.PP +.B Cdda2wav +defaults to read the first audio track from the medium and the default verbose level is set to +.BR "\-vtoc,summary,sectors,titles" +and +.B cdda2wav +by default writes +.B "*.inf +files. +To extract all audio tracks with quality verification, it is recommended to call: +.PP +.B "cdda2wav -vall cddb=0 speed=4 -paranoia paraopts=proof -B" +.PP +For hints on how to specify better parameters manually, see the +.B paraopts= +description below. +.SS "Device naming" +Most users do not need to care about device naming. +If no +.B dev= +option was specified, +.B cdda2wav +implements +.B auto target +support and automagically finds the drive when exactly +one CD-ROM type drive is available in the system. +When more than one CD-ROM type drive exists, +a list of possible device name parameters may be retrieved with +.B "cdda2wav \-scanbus +or from the target example from the output of +.BR "cdda2wav dev=help" , +then the +.B dev= +parameter may be set based on the device listing. +.PP +The +.I device +parameter to the +.B dev= +option +explained below refers to the +.B SCSI\ CAM +standard notation for +.IR scsibus / target / lun +of the CD/DVD/BluRay-Recorder. +If a file /etc/default/cdrecord exists, the parameter to the +.B dev= +option may also be a drive name label in said file (see FILES section). + .SH OPTIONS +.SS "Informative options" .TP -.BI dev= device +.B \-h .TP -.BI \-D " device +.B \-help +display version information for cdda2wav on standard output. .TP -.BI \-device " device -uses -.I device -as the source for CDDA reading. -For example /dev/cdrom for the -.B cooked_ioctl -interface and Bus,ID,Lun for the -.B generic_scsi -interface. The -.I device -has to correspond with the interface setting (see below). -.sp -Using the -.B cooked_ioctl -is not recommended as this makes -.B cdda2wav -mainly depend on the audio extraction quality of the operating system -which is usually extremely bad. -.sp -The setting of the environment variable -.B CDDA_DEVICE -is overridden by this option. -.sp -If no -.B dev= -option is present, or if the -.B dev= -option only contains a transport specifyer but no address, -.B cdda2wav -tries to scan the SCSI address space for CD-ROM drives. -If exactly one is found, this is used by default. +.B \-version +display version and Copyright information. +.SS "Audio options" .TP -.BI ts= # -Set the maximum transfer size for a single SCSI command to #. -The syntax for the -.B ts= -option is the same as for cdrecord fs=# or sdd bs=#. -.sp -If no -.B ts= -option has been specified, -.B cdda2wav -defaults to a transfer size of 3\ MB. If libscg gets lower values from the -operating system, the value is reduced to the maximum value that is possible -with the current operating system. -Sometimes, it may help to further reduce the transfer size or to enhance it, -but note that it may take a long time to find a better value by experimenting -with the -.B ts= +.BI \-a " divider +.TP +.BI \-divider " divider +sets rate to 44100Hz / +.IR divider . +Possible values are listed with the +.B \-R option. +.sp +The default divider value is 1. .TP -.BI \-A " auxdevice +.B \-B .TP -.BI \-auxdevice " auxdevice -uses -.I auxdevice -as CDROM drive for ioctl usage. +.B \-bulk .TP -.BI \-I " interface +.B \-alltracks +copies each track into a separate file. +.sp +The default is not to extract all tracks. .TP -.BI \-interface " interface -specifies the -.I interface -for CDROM access: -.B generic_scsi -or (on Linux, and FreeBSD systems) -.BR cooked_ioctl . +.BI \-b " bits +.TP +.BI \-bits\-per\-sample " bits +sets +.I bits +per sample per channel: +.BR 8 , +.B 12 +or +.BR 16 . +.sp +The default is 16 bits per sample. .TP .BI \-c " channels .TP .BI \-channels " channels -uses +use: +.RS +.TP .B 1 -for mono, or -.B 2 -for stereo recording, -or -.B s -for stereo recording with both channels swapped. +for mono recording .TP -.B \-s +.B 2 +for stereo recording .TP -.B \-stereo -sets to stereo recording. +.B s +for stereo recording with both channels swapped +.PP +The default is stereo recording. +.RE .TP -.B \-m +.BI \-C " endianess .TP -.B \-mono -sets to mono recording. +.BI \-cdrom\-endianess " endianess +sets endianess of the input samples to 'little', 'big', 'machine' or 'guess' to override defaults. +The value 'machine' or 'host' is evaluated as the actual byte order of +the host CPU in the current OS. +.sp +The default is to detect cdrom endianess automatically. +.TP +.B \-cuefile +Create a CDRWIN compatible CUE file. +A CUE file that completely follows the CDRWIN documentation can only be used to +create 1:1 copies if there is a single file with audio data for the whole disk. +The *.inf file format implements more audio CD features than the CDRWIN CUE format +and it allows to create 1:1 copies if there is one audio data file per track. +Use the CUE file format for meta data only if you really need this format. +.sp +To allow +.B cdda2wav +to create CUE files, you must also specify +.B \-t all +to switch +.B cdda2wav +into a mode that creates a single audio data file for the whole CD. .TP -.B \-x +.B \-T .TP -.B \-max -sets maximum (CD) quality. +.B \-deemphasize +undo the effect of pre-emphasis in the input samples. +.sp +The default is to keep the audio data in the same state as on the medium and to +mark the pre-emphasis state in the +.B "*.inf +files. .TP -.BI \-b " bits +.BI \-L " cddb mode .TP -.BI \-bits\-per\-sample " bits -sets -.I bits -per sample per channel: -.BR 8 , -.B 12 -or -.BR 16 . +.BI \-cddb " cddb mode +does a cddbp album- and track title lookup based on the cddb id. +The parameter cddb mode defines how multiple entries shall be handled. +.TS H +center box; +r | l. +Parameter Description +_ +-1 disable cddb queries. This is the default. +0 interactive mode. The user selects the entry to use. +1 first fit mode. The first entry is taken unconditionally. +.TE .TP -.BI \-r " rate +.BI cddbp\-server= servername +sets the server to be contacted for title lookups. .TP -.BI \-rate " rate -sets -.I rate -in samples per second. Possible values are listed with the -.B \-R -option. +.BI cddbp\-port= portnumber +sets the port number to be used for title lookups. .TP -.BI \-a " divider +.BI \-d " duration .TP -.BI \-divider " divider -sets rate to 44100Hz / -.IR divider . -Possible values are listed with the -.B \-R -option. +.BI \-duration " duration +sets recording time in seconds or frames (sectors). +Frames are indicated by a 'f' suffix (e.g. 75f for 75 sectors). +.B 0 +sets the time for whole track. +.sp +The default is to extract the whole track. .TP -.B \-R +.BI \-E " endianess .TP -.B \-dump\-rates -shows a list of all sample rates and their dividers. +.BI \-output\-endianess " endianess +sets endianess of the output samples to 'little', 'big' or 'machine' to +override the default which is 'network byte order' (big endian). +The value 'machine' or 'host' is evaluated as the actual byte order of +the host CPU in the current OS. .TP -.B \-P " sectors +.B \-F .TP -.BI \-set\-overlap " sectors -sets the initial number of overlap -.I sectors -for jitter correction. +.B \-find\-extremes +finds extreme amplitudes in samples. .TP -.BI \-n " sectors +.B \-G .TP -.BI \-sectors\-per\-request " sectors -reads -.I sectors -per request. +.B \-find\-mono +finds if input samples are in mono. .TP -.BI \-l " buffers +.B \-g .TP -.BI \-buffers\-in\-ring " buffers -uses a ring buffer with -.I buffers -total. +.B \-gui +reformats the output for parsing by gui frontends. +.br +.ne 5 .TP -.BI \-t " track+endtrack +.B \-H .TP -.BI \-track " track+endtrack -selects the start track and optionally the end track. +.B \-no\-infofile +does not write info file, cddb file or cdtext file. .TP .BI \-i " index .TP .BI \-index " index selects the start index. .TP +.B \-J +.TP +.B \-info\-only +does not write to a file, it just gives information about the disc. +.TP +.B \-M +.TP +.B \-md5 +enables calculation of MD-5 checksum for all audio bytes from the beginning +of a track. The audio header is skipped when calculating the MD-5 checksum +to allow comparison of MD-5 sums for files with different header types. +.br +.ne 5 +.TP +.B \-m +.TP +.B \-mono +sets to mono recording. +.TP +.B \-no\-hidden\-track +Ignore hidden tracks on the CD. +By default, +.B cdda2wav +checks whether there might be a hidden track before track 1. +This check may take a few seconds and thus can be disabled with +.BR \-no\-hidden\-track . +.TP +.B \-N +.TP +.B \-no\-write +does not write to a file, it just reads (e.g. for debugging purposes). +If this option is used together with the +.B \-e +option, the CD is read and the audio content is played back to the sound device +without creating output files with audio data. +.TP +.B \-no\-textdefaults +By default, +.B cdda2wav +replaces empty CD-Text fields from tracks with the related CD-Text field (when +defined) for the whole CD. If the option +.B \-no\-textdefaults +is used, +.B cdda2wav +leaves the track related CD-Text fields empty in such a case. +.TP +.B \-no\-textfile +If +.B cdda2wav +encounters useful CD-Text information on the CD, it writes a .cdtext file. +The option +.B \-no\-textfile +allows to suppress the creation of the .cdtext file. +.TP .BI \-o " offset .TP .BI \-offset " offset @@ -266,7 +329,7 @@ .I offset sectors behind start track (one sector equivalents 1/75 seconds). .TP -.B \-O " audiotype +.BI \-O " audiotype .TP .BI \-output\-format " audiotype can be @@ -284,180 +347,716 @@ or .I raw (for headerless files to be used for cd writers). +.sp +The default output format is now +.B wav +for all platforms as it has become the most +common format. Note that former versions of +.B cdda2wav +made an exception and by default created +.B au +type files on Solaris. .TP -.BI \-C " endianess +.BI \-p " percentage .TP -.BI \-cdrom\-endianess " endianess -sets endianess of the input samples to 'little', 'big' or 'guess' to override defaults. +.BI \-playback\-realtime " percentage +changes pitch of audio data copied to sound device. .TP -.BI \-E " endianess +.BI \-P " sectors .TP -.BI \-output\-endianess " endianess -sets endianess of the output samples to 'little' or 'big' to override defaults. +.BI \-set\-overlap " sectors +sets the initial number of overlap +.I sectors +for jitter correction in non-paranoia mode. Note that overlapped reads are handled +differently in paranoia mode. +.sp +The default overlap in non-paranoia mode is 1. .TP -.BI \-d " duration +.B \-paranoia +use the paranoia library as a filter on top of cdda2wav's routines for reading. +In +.B paranoia +mode, the latency time +for the +.B \-interactive +mode and with a read ahead buffer size of 150..300 sectors, +is increased to typically 5..10 seconds. This is due to the +.B paranoia +code reading everything at least twice and having to empty the +cache RAM of the CD-ROM drive. +.sp +The size of the read ahead area must be larger than the size of the +RAM of the drive in order to allow +.B libparanoia +to empty the cache RAM in the drive. +As the size of the read ahead area in former times was a constant compiled +into the +.B libparanoia +code, the extract quality with using libparanoia was no longer sufficient +with drives built after year 2000. See +.B readahead= +parameter to the +.B paraopts= +option below. +.sp +.ne 10 +If the +.B paranoia +mode is used, +.B cdda2wav +displays some quality statistics for each extracted track. +The following items appear in the list: +.TS H +center box; +r | l. +Value Description +_ +rderr Number of hard read errors +skip Number of sectors skipped due to exhausted retries +atom Number of intra sector jitters (frame jitters) detected +edge Number of jitters between sectors detected +drop Number of dropped bytes fixed +dup Number of duplicate bytes fixed +drift Number of drifts detected +c2 Number of sectors with C2 errors +reads Number of readahead blocks read and percentage to track size +overlap Number of dynamic overlap size raises +.TE +.RS +.LP +The quality indicators in detail: +.TP +.B rderr +The number of failed low level read requests. +Each read appears for +.B sectors\-per\-request +sectors. +The +.B sectors\-per\-request +size is typically less than the read ahead size. .TP -.BI \-duration " duration -sets recording time in seconds or frames. -Frames (sectors) are indicated by a 'f' suffix (like 75f for 75 sectors). -.B 0 -sets the time for whole track. +.B skip +The number of sectors that have been skipped because the read error retry +count was exhausted and no successful read was possible. +.TP +.B atom +The number of jitters that have been detected inside sectors. +This should never happen, but whenever a non-correctable C2 error occurs, +the drive could lose streaming. +Increasing the read ahead buffer size may reduce the results from atom +errors. +.TP +.B edge +The number of jitters that have been detected at the edges of sectors. +This could be caused by sector positioning errors. +Increasing the read ahead buffer size may reduce the results from edge +errors. +.TP +.B drop +The number of dropped samples. +This could be caused by sector positioning errors. +Increasing the read ahead buffer size may reduce the results from edge +errors. +.TP +.B dup +Duplicated samples could be caused by sector positioning errors like dripped samples. +Increasing the read ahead buffer size may reduce the results from edge +errors. +.TP +.B drift +This is the amount of drifts detected when checking the overlap area. +.TP +.B c2 +The number of sectors with C2 errors seen when reading the last track. +As the paranoia code tends to read bad parts of the disk many times, this +number usually is above the number that would appear when the disk is just +read once in a linear way. +Use +.B paraopts=disable,c2check +to see a number that represents the state of the medium. +.TP +.B reads +The number of read ahead blocks read for the last track by the upper layer +and the percentage of the amount of data read compared to the size of the track. +This percentage is typically 200% because the paranoia code reads all data +at least twice. If there is a lot of overlap and a lof of read problems, this +percentage raises. +.TP +.B overlap +The number the overlap size has been raised. This happens when the overlap +size is below the maximum overlap size and errors in the overlap area are detected. +.RE +.br +.ne 15 .TP -.B \-B +.BI \-paraopts= list +.I List +is a comma separated list of suboptions passed to the paranoia library. +.TS H +center box; +r | l. +Option Description +_ +help lists all paranoia options. +disable disables paranoia mode. Libparanoia is still being used +no-verify switches verify off, and static overlap on +retries=amount set the number of maximum retries per sector +readahead=amount set the number of sectors to use for the read ahead buffer +overlap=amount set the number of sectors used for static overlap +minoverlap=amt set the min. number of sectors for dynamic overlap +maxoverlap=amt set the max. number of sectors for dynamic overlap +c2check check C2 pointers from drive to rate quality +proof set minoverlap=20,retries=200,readahead=600,c2check +.TE +.RS +.LP +The +.B paraopts= +parameters in detail: .TP -.B \-bulk +.B disable +The paranoia corrections are disabled, but the data is still directed +through the code from +.BR libparanoia . +This allows to switch on C2 error detection and to check the C2 error +statistics for a CD. +.TP +.B no\-verify +This switches off the verification of the data integrity in the overlap +area and turns off dynamic overlap control in favor of a static overlap +value. +.TP +.BI retries= amount +Set the maximum number of read retries per sector in case of hard read +errors. The default value for this parameter is +.BR 20 . +This is the same value as used by the old +.BR cdparanoia (1) +command. +.TP +.BI readahead= amount +Set the number of sectors to use for the read ahead buffer. +Except when at the end of the medium, +.B libparanoia +never requests less than this amount of data from the low level +I/O code. +The size of the read ahead buffer is usually bigger than the +maximum size for a single DMA in the system. For this reason, +.B libparanoia +calls several read operations in order to fill the read ahead buffer. +The default value used by +.B cdda2wav +is 400, which is more than the 150 sectors that +.BR cdparanoia (1) +uses but still a compromise for not requiring too much memory. +.sp +It is recommended to use a read ahead buffer size that is not less than +the RAM size in the CD-ROM drive. If the drive has more than 1MB of RAM, +use 425 sectors per MB of RAM in the drive. +.sp +Note that as long as the +.B readahead= +value is too small, the extract quality varies a lot with the value in use. +The value used by +.BR cdparanoia (1) +may cause an extract quality below what +.B cdda2wav +delivers without +.BR libparanoia . .TP -.B \-alltracks -copies each track into a seperate file. +.BI overlap= amount +Set the number of sectors used for static overlap. This switches dynamic +overlap off. +It is recommended not to use static overlapping. To get a larger +overlapping, better use a higher +.B minoverlap= +value. +.TP +.BI minoverlap= amount +Set the minimum number of sectors for dynamic overlap. +The default value used by +.B cdda2wav +is +.BR 0.5 , +this is more than the default used by +.BR cdparanoia (1) +which is 0.1. +.sp +For old drives that do not support accurate streaming, it is not +recommended to specify a +.B minoverlap= +value greater or equal to the maximal DMA size. +.sp +For best results on other drives, it is recommended to use a +.B minoverlap= +value that is not less than half of the readahead size. +.sp +The extract quality varies a lot with the +.B minoverlap= +value, but increasing the value also increases the extract +time. +.TP +.BI maxoverlap= amount +Set the maximum number of sectors for dynamic overlap. +If +.B maxoverlap= +was not specified and a large +.B minoverlap= +value was specified, this results in a quasi static overlapping. +The default value used by +.B cda2wav +is +.BR 32 . +.TP +.B c2check +Turn on C2 error checking. +For now, this just results in printing C2 error statistics. +.sp +Warning: some drives have been reported to fail reading hidden tracks when +the +.B c2check +mode is in effect. +If you encounter a drive where +.B cdda2wav +is not able to auto-detect whether +.B c2check +is usable, please report. +.sp +When you plan to use +.B c2check +while extracting hidden tracks, first verify that your drive will report +hidden tracks the same with and without the +.B c2check +option. +.br +.ne 5 .TP -.B \-w +.B proof +This option is a macro for better extract parameters than used by default. +The macro +.B proof +expands to: +.sp +.B " paraopts=minoverlap=\fIsectors\-per\-request\fP-1,\e +.br +.B " retries=200,readahead=600 +.sp +If +.I sectors\-per\-request\f\-1 +is more than 20, 20 is used as minimal overlap value. +.sp +The parameters used by +.B proof +are still not the best and there is no best parameter set for all cases. +A larger value for the read ahead buffer size may e.g be too large for +the available RAM in the system and the best value for the minimal overlap +depends on whether the drive supports exact streaming. +It is recommended to run experiments with larger values for the parameters +.B minoverlap= +and +.B readahead= +to get the best results for a specific platform. +.sp +Note that previous versions did include +.B c2check +with the +.B proof +macro, but this has been reported to fail on some drives and thus +.B c2check +was disabled by default. +Current versions of +.B cdda2wav +auto-detect whether the actual drive supports the +.B c2check +feature and use it if possible. + +.RE +.br +.TP +.B \-q +.TP +.B \-quiet +quiet operation, no screen output. +.TP +.BI \-r " rate +.TP +.BI \-rate " rate +sets +.I rate +in samples per second. Possible values are listed with the +.B \-R +option. .TP -.B \-wait -waits for signal, then start recording. +.B \-R .TP -.B \-F +.B \-dump\-rates +shows a list of all sample rates and their dividers. .TP -.B \-find\-extremes -finds extrem amplitudes in samples. +.BI \-S " speed .TP -.B \-G +.BI \-speed " speed +sets the cdrom device to one of the selectable speeds for reading. +For maximum extraction quality, it is recommended to use speed values of 8 or below. +.sp +The default is to extract at maximum speed. .TP -.B \-find\-mono -finds if input samples are in mono. +.B \-s .TP -.B \-T +.B \-stereo +sets to stereo recording. .TP -.B \-deemphasize -undo the effect of pre-emphasis in the input samples. +.BI \-start\-sector " sector +set an absolute start sector. This option is mutually exclusive to +.B \-track +and +.BR \-offset . +.br +.ne 10 +.br .TP -.B \-e +.BI \-t " track[+endtrack] .TP -.B \-echo -copies audio data to sound device e.g. -.BR /dev/dsp . -.ne 5 +.BI \-track " track[+endtrack] .TP -.BI \-p " percentage +.BI \-track " track" +max .TP -.BI \-set\-pitch " percentage -changes pitch of audio data copied to sound device. +.B "\-track\ all" +selects the start track and optionally the end track. +If +.B "\-t\ all" +is used, all audio tracks are selected. +If +.B "\-t\ 2+max" +is used, all audio tracks starting with track 2 are selected. .br .ne 5 .TP .BI \-v " itemlist .TP .BI \-verbose\-level " itemlist -prints verbose information about the CD. +Retrieves and prints verbose information about the CD. .B Level -is a list of comma seperated suboptions. Each suboption controls the type of information to be reported. +is a list of comma separated suboptions. Each suboption controls the type of information to be reported. + .TS H center box; r | l. Suboption Description _ +! invert the meaning of the following string +not invert the meaning of the following string disable no information is given, warnings appear however all all information is given toc show table of contents summary show a summary of the recording parameters indices determine and display index offsets catalog retrieve and display the media catalog number MCN +mcn retrieve and display the media catalog number MCN trackid retrieve and display all Intern. Standard Recording Codes ISRC +isrc retrieve and display all Intern. Standard Recording Codes ISRC sectors show the table of contents in start sector notation titles show the table of contents with track titles (when available) +audio-tracks list the audio tracks and their start sectors .TE +.sp +The default verbose-level is +.BR "toc,summary,sectors,titles" " ." .TP -.B \-N -.TP -.B \-no\-write -does not write to a file, it just reads (for debugging purposes). -.TP -.B \-J -.TP -.B \-info\-only -does not write to a file, it just gives information about the disc. +.B \-w .TP -.BI \-L " cddb mode +.B \-wait +waits for signal, then start recording. .TP -.BI \-cddb " cddb mode -does a cddbp album- and track title lookup based on the cddb id. -The parameter cddb mode defines how multiple entries shall be handled. -.TS H -center box; -r | l. -Parameter Description -_ -0 interactive mode. The user selects the entry to use. -1 first fit mode. The first entry is taken unconditionally. -.TE +.B \-x .TP -.BI cddbp\-server= servername -sets the server to be contacted for title lookups. +.B \-max +sets maximum (CD) quality. +.SS "SCSI options" .TP -.BI cddbp\-port= portnumber -sets the port number to be used for title lookups. +.BI dev= device .TP -.B \-H +.BI \-D " device .TP -.B \-no\-infofile -does not write an info file and a cddb file. +.BI \-device " device +uses +.I device +as the source for CDDA reading. +For example /dev/cdrom for the +.B cooked_ioctl +interface and Bus,ID,Lun for the +.B generic_scsi +interface. The +.I device +has to correspond with the interface setting if given (see +.BR \-I " and " \-interface +option below). +.sp +If no +.BR \-I " or " \-interface +option has been specified, the interface setting is derived from +the device name syntax. A device name that is in the form +Bus,ID,Lun or contains a colon (':') defaults to the +.B generic_scsi +interface. +.sp +Using the +.B cooked_ioctl +is not recommended as this makes +.B cdda2wav +mainly depend on the audio extraction quality of the operating system +which is usually extremely bad. For this reason, avoid using parameters like +.BR dev= /dev/cdrom +for the device. +.sp +The setting of the environment variable +.B CDDA_DEVICE +is overridden by this option. +.sp +If no +.B dev= +option is present, or if the +.B dev= +option only contains a transport specifier but no address, +.B cdda2wav +tries to scan the SCSI address space for CD-ROM drives. +If exactly one is found, this is used by default. +.sp +For more information, see the description of the +.B dev= +option from +.BR cdrecord (1). .TP -.B \-g +.BI debug= # .TP -.B \-gui -formats the output to be better parsable by gui frontends. +.BI debug-scsi= # +Set the debug level for the +.B libscg +SCSI OS abstraction layer. .TP -.BI \-M " count +.BI kdebug= # .TP -.BI \-md5 " count -enables calculation of MD-5 checksum for 'count' bytes from a beginning of a -track. +.BI kdebug-scsi= # .TP -.BI \-S " speed +.BI kd= # +Set the kernel debug level for the kernel driver called by the +.B libscg +SCSI OS abstraction layer. This option is not supported on all platforms. .TP -.BI \-speed " speed -sets the cdrom device to one of the selectable speeds for reading. +.B \-scanbus +Scan all SCSI devices on all SCSI buses and print the inquiry +strings. This option may be used to find SCSI address of the +CD/DVD-Recorder on a system. +The numbers printed out as labels are computed by: +.B "bus * 100 + target .TP -.B \-q +.BI scgopts= list +A comma separated list of SCSI options that are handled by libscg. +The implemented options may be uptated indepentendly from applications. +Currently, one option: +.B ignore\-resid +is supported to work around a Linux kernel bug. .TP -.B \-quiet -quiet operation, no screen output. +.BI ts= # +Set the maximum transfer size for a single SCSI command to #. +The syntax for the +.B ts= +option is the same as for cdrecord fs=# or sdd bs=#. +.sp +If no +.B ts= +option has been specified, +.B cdda2wav +defaults to a transfer size of 3\ MB. If libscg gets lower values from the +operating system, the value is reduced to the maximum value that is possible +with the current operating system. +Sometimes, it may help to further reduce the transfer size or to enhance it, +but note that it may take a long time to find a better value by experimenting +with the +.B ts= +option. +.sp +Some operating systems return wrong values for the maximum transfer size. +If the transfer totally hangs or resets occur, it may be appropriate to reduce +the transfer size to less than 64 kB or even less than 32 kB. .TP .B \-V .TP -.B \-verbose\-SCSI +.B \-verbose\-scsi enable SCSI command logging to the console. This is mainly used for debugging. .TP .B \-Q .TP -.B \-silent\-SCSI +.B \-silent\-scsi suppress SCSI command error reports to the console. This is mainly used for guis. + +.SS "OS Interface options" .TP -.B \-scanbus -Scan all SCSI devices on all SCSI busses and print the inquiry -strings. This option may be used to find SCSI address of the -CD/DVD-Recorder on a system. -The numbers printed out as labels are computed by: -.B "bus * 100 + target +.BI \-A " auxdevice .TP -.B \-paranoia -use the paranoia library instead of cdda2wav's routines for reading. +.BI \-auxdevice " auxdevice +uses +.I auxdevice +as CDROM drive to allow to send the CDROMMULTISESSION ioctl on Linux +although the +.B generic_scsi +interface is in use. .TP -.B \-h +.BI \-I " interface .TP -.B \-help -display version of cdda2wav on standard output. +.BI \-interface " interface +specifies the +.I interface +to use for accessing the CDROM: +.sp +.RS +.TP +.B generic_scsi +for sending SCSI commands directly to the drive. +.TP +.B cooked_ioctl +for using the programming interface supplied by the OS kernel. +.RE +.sp +.RS +The latter is not recommended as it gives lower quality and only +works on a limited number of platforms. +.RE +.br +.ne 20 +.TP +.B \-interactive +Go into interactive mode that reads commands from +.B stdin +and writes the textual replies to +.BR stderr , +or the file descriptor specified by the +.B out\-fd +option. +This mode has been introduced mainly to allow cdrecord to be called by gstreamer plugins. +.sp +.ne 20 +If +.B cdda2wav +was called with the option +.BR \-interactive , +it reads the TOC from the medium and then waits for command input as if it +has been issued a +.B stop +command. If the next command is a +.B cont +command, then +.B cdda2wav +extracts the whole audio part of the medium. +If the next command is a +.B read +command, then +.B cdda2wav +starts extracting from the position that was indicated by the +.B read +command parameter. +.TS H +center box; +c | l | l +c | l | l. +Command Parameters Description +_ +cont continue processing at current position +exit exit processing +help print command help and wait for input +quit exit processing +read sectors \fIsector number\fP read sectors starting from \fIsector number\fP +read tracks \fItrack number\fP read sectors starting from \fItrack number\fP +stop stop processing and wait for new input +.TE +.TP +.BI out\-fd= descriptor +Redirect informational output to the file descriptor named by +.BR descriptor . +The parameter +.B descriptor +specifies a UNIX file descriptor number. +By default, +.B cdda2wav +sends informational output to +.BR stderr . +Redirecting the informational output to a different file descriptor +helps guis and other programs that call +.B cdda2wav +via pipes. +.TP +.BI audio\-fd= descriptor +In case that the file name for the audio data file is "-", +redirect audio output to the file descriptor named by +.BR descriptor . +The parameter +.B descriptor +specifies a UNIX file descriptor number. +By default, +.B cdda2wav +sends audio data to +.B stdout +if the output is not directed into a file. +Redirecting the audio output to a different file descriptor +helps guis and other programs that call +.B cdda2wav +via pipes. +.br +.ne 7 +.TP +.B \-no-fork +Do not fork for extended buffering. If +.B \-no-fork +is used and +.B cdda2wav +is used to play back audio CDs in +.B paranoia +mode, the playback may be interrupted due to lack of buffering. +On the other hand, allowing +.B cdda2wav +to fork will increase the latency time for the +.B \-interactive +mode. +.TP +.B \-e +.TP +.B \-echo +copies audio data to the operating system's sound device e.g. +.BR /dev/dsp . +.TP +.BI "sound\-device=" sounddevice +set an alternate sound device to use for +.BR \-e . +.ne 5 +.TP +.BI \-n " sectors +.TP +.BI \-sectors\-per\-request " sectors +reads +.I sectors +per request. +.TP +.BI \-l " buffers .TP -Defaults depend on the +.BI \-buffers\-in\-ring " buffers +uses a ring buffer with +.I buffers +total. + +.SH "ENVIRONMENT VARIABLES" +.PP +Some defaults for +.B cdda2wav +are compiled in and depend on the .B Makefile -and +others on the .B environment variable -settings (currently -.B CDDA_DEVICE -). -.SH "ENVIRONMENT VARIABLES" +settings. +.br +.ne 5 +.TP .B CDDA_DEVICE -is used to set the device name. The device naming is compatible with J\*org -Schilling's cdrecord package. +is used to set the device name. The device naming is compatible with +.BR cdrecord (1). .TP .B CDDBP_SERVER is used for cddbp title lookups when supplied. @@ -500,9 +1099,9 @@ Note that the remote SCSI server program name will be ignored if you log in using an account that has been created with a remote SCSI server program as login shell. -.SH "RETURN VALUES" +.SH "EXIT STATUS" .B cdda2wav -uses the following exit codes to indicate various degress of success: +uses the following exit codes to indicate various degrees of success: .TS H center box; r | l. @@ -553,14 +1152,15 @@ .B WAV or other formats. .PP -The latest versions try to get higher real-time scheduling priorities to ensure +Some versions of +.B cdda2wav +may try to get higher real-time scheduling priorities to ensure smooth (uninterrupted) operation. These priorities are available for super users and are higher than those of 'normal' processes. Thus delays are minimized. .PP -If your CDROM is on device -.B DEV +If you only have one CDROM and it is loaded with an audio CD, you may simply invoke -.B cdda2wav dev=DEV +.B cdda2wav and it will create the sound file .B audio.wav recording the whole track beginning with track 1 in stereo at 16 bit at 44100 @@ -568,35 +1168,51 @@ recording time will be limited. For details see files .B README and -.B README.INSTALL -. +.BR README.INSTALL . +.PP +If you have more then one CD-ROM type drive in the system, you need +to specify the +.B dev= +option. .SH "HINTS ON OPTIONS" -.IP "Options" +.PP Most of the options are used to control the format of the WAV file. In -the following text all of them are described. -.IP "Select Device" -.BI \-D " device" +the following text most of them are discussed in a more verbose way. +.SS "Select Device" +.BI dev= "device" selects the CDROM drive device to be used. The specifier given should correspond to the selected interface (see below). -.B CHANGE! -For the cooked_ioctl interface this is the cdrom device descriptor as before. -.B The SCSI devices used with the generic SCSI interface however are now -.B addressed with their SCSI-Bus, SCSI-Id, and SCSI-Lun instead of the generic -.B SCSI device descriptor!!! -One example for a SCSI CDROM drive on bus 0 with SCSI ID 3 and lun 0 is \-D0,3,0. -.IP "Select Auxiliary device" +For the +.B cooked_ioctl +interface this is the cdrom device descriptor. +.B "The SCSI devices used with the generic SCSI interface however are +.B "addressed with their SCSI-Bus, SCSI-Id, and SCSI-Lun instead of the generic +.B "SCSI device descriptor. +One example for a SCSI CDROM drive on bus 0 with SCSI ID 3 and lun 0 is +.BR dev=0,3,0 . +.SS "Select Auxiliary device" .BI \-A " auxdevice" -is necessary for CD-Extra handling. For Non-SCSI-CDROM drives this is the -same device as given by \-D (see above). For SCSI-CDROM drives it is the +may be needed in some rare cases for CD-Extra handling. +.B Cdda2wav +usually has no problem to get the multi-session information for +CD-Extra using raw SCSI commands. +For Non-SCSI-CDROM drives this is the +same device as given by +.B dev= +(see above). For SCSI-CDROM drives it is the CDROM drive (SCSI) device (i.e. .B /dev/sr0 ) corresponding to the SCSI device (i.e. .B 0,3,0 ). It has to match the device used for sampling. -.IP "Select Interface" +.SS "Select Interface" .BI \-I " interface" -selects the CDROM drive interface. For SCSI drives use generic_scsi -(cooked_ioctl may not yet be available for all devices): +selects the CDROM drive communication method. +This interface method is typically automatically selected from the device name. +For SCSI drives +.B generic_scsi +is used (cooked_ioctl may not be available for all devices). +Valid names are .B generic_scsi and .BR cooked_ioctl . @@ -604,7 +1220,7 @@ the CDROM driver. The latter variant works only when the kernel driver supports .B CDDA reading. This entry has to match the selected CDROM device (see above). -.IP "Enable echo to soundcard" +.SS "Enable echo to soundcard" .B \-e copies audio data to the sound card while recording, so you hear it nearly simultaneously. The soundcard gets the same data that is recorded. This @@ -613,22 +1229,28 @@ option. To use .B cdda2wav as a pseudo CD player without recording in a file you could use +.PP .B "cdda2wav \-q \-e \-t2 \-d0 \-N" -to play the whole second track. This feature reduces the recording speed -to at most onefold speed. You cannot make better recordings than your sound card -can play (since the same data is used). -.IP "Change pitch of echoed audio" +.PP +to play the whole second track or +.PP +.B "cdda2wav \-q \-e \-B \-N" +.PP +to play the whole disk. +This feature reduces the recording speed +to at most onefold speed. +.SS "Change pitch of echoed audio" .B "\-p percentage" changes the pitch of all audio echoed to a sound card. Only the copy to the soundcard is affected, the recorded audio samples in a file remain the same. -Normal pitch, which is the default, is given by 100%. +Normal pitch, which is the default, is given by 100. Lower percentages correspond to lower pitches, i.e. \-p 50 transposes the audio output one octave lower. See also the script .B pitchplay as an example. This option was contributed by Raul Sobon. -.IP "Select mono or stereo recording" +.SS "Select mono or stereo recording" .B \-m or .B "\-c 1" @@ -640,11 +1262,11 @@ .B "\-c s" selects stereo recording. Parameter s will swap both sound channels. -.IP "Select maximum quality" +.SS "Select maximum quality" .B \-x -will set stereo, 16 bits per sample at 44.1 KHz (full CD quality). Note +will set stereo, 16 bits per sample at 44.1 kHz (full CD quality). Note that other format options given later can change this setting. -.IP "Select sample quality" +.SS "Select sample quality" .B "\-b 8" specifies 8 bit (1 Byte) for each sample in each channel; .B "\-b 12" @@ -654,22 +1276,21 @@ your sample player or sound card is capable of playing 12-bit or 16-bit samples). Selecting 12 or 16 bits doubles file size. 12-bit samples are aligned to 16-bit samples, so they waste some disk space. -.IP "Select sample rate" +.SS "Select sample rate" .BI \-r " samplerate" selects a sample rate. .I samplerate -can be in a range between 44100 and 900. Option +can be in a range between 900 and 44100. Option .B \-R lists all available rates. -.IP "Select sample rate divider" +.SS "Select sample rate divider" .BI \-a " divider" selects a sample rate divider. .I divider -can be minimally 1 and maximally 50.5 and everything between in steps of 0.5. -Option +can be from 1 to 50.5 in steps of 0.5. Option .B \-R lists all available rates. -.IP +.sp To make the sound smoother at lower sampling rates, .B cdda2wav sums over @@ -681,13 +1302,13 @@ higher frequencies. Standard sector size of an audio CD (ignoring additional information) is 2352 Bytes. In order to finish summing for an output sample at sector boundaries the rates above have to be -choosen. Arbitrary sampling rates in high quality would require some +chosen. Arbitrary sampling rates in high quality would require some interpolation scheme, which needs much more sophisticated programming. -.IP "List a table of all sampling rates" +.SS "List a table of all sampling rates" .BI \-R shows a list of all sample rates and their dividers. Dividers can range from 1 to 50.5 in steps of 0.5. -.IP "Select start track and optionally end track" +.SS "Select start track and optionally end track" .BI \-t " n+m" selects .B n @@ -701,12 +1322,12 @@ then created depends on the .B \-B option (see below). -.IP "Select start index" +.SS "Select start index" .BI \-i " n" selects the index to start recording with. Indices other than 1 will invoke the index scanner, which will take some time to find the correct start position. An offset may be given additionally (see below). -.IP "Set recording time" +.SS "Set recording duration" .B \-d " n" sets recording time to .I n @@ -719,7 +1340,7 @@ time as well thus overriding any .BR \-d " option" specified times. -.IP +.sp Recording time is defined as the time the generated sample will play (at the defined sample rate). Since it's related to the amount of generated samples, it's not the time of the sampling process itself (which can be @@ -730,13 +1351,13 @@ option (see below). Notice that recording time will be shortened, unless enough disk space exists. Recording can be aborted at anytime by pressing the break character (signal SIGQUIT). -.IP "Record all tracks of a complete audio CD in seperate files" +.SS "Record all tracks of a complete audio CD in separate files" .B \-B -copies each track into a seperate file. A base name can be given. File names +copies each track into a separate file. A base name can be given. File names have an appended track number and an extension corresponding to the audio format. To record all audio tracks of a CD, use a sufficient high duration (i.e. \-d99999). -.IP "Set start sector offset" +.SS "Set start sector offset" .BI \-o " sectors" increments start sector of the track by .IR sectors . @@ -748,14 +1369,14 @@ introductory quiet passages automagically, use the .B \-w option see below.) -.IP "Wait for signal option" +.SS "Wait for signal option" .B \-w Turning on this option will suppress all silent output at startup, reducing possibly file size. .B cdda2wav will watch for any signal in the output signal and switches on writing to file. -.IP "Find extrem samples" +.SS "Find extreme samples" .B \-F Turning on this option will display the most negative and the most positive sample value found during recording for both channels. This can be useful @@ -763,12 +1384,12 @@ boundaries, they cover the complete sampling process. They are taken from the original samples and have the same format (i.e. they are independent of the selected output format). -.IP "Find if input samples are in mono" +.SS "Find if input samples are in mono" .B \-G If this option is given, input samples for both channels will be compared. At the end of the program the result is printed. Differences in the channels indicate stereo, otherwise when both channels are equal it will indicate mono. -.IP "Undo the pre-emphasis in the input samples" +.SS "Undo the pre-emphasis in the input samples" .B \-T Some older audio CDs are recorded with a modified frequency response called pre-emphasis. This is found mostly in classical recordings. The correction @@ -779,7 +1400,7 @@ but not in the TOC, pre-emphasis will be assumed to be present, and subsequently a reverse filtering is done for this track before the samples are written into the audio file. -.IP "Set audio format" +.SS "Set audio format" .B \-O " audiotype" can be .I wav @@ -795,7 +1416,8 @@ All file samples are coded in linear pulse code modulation (as done in the audio compact disc format). This holds for all audio formats. Wav files are compatible to Wind*ws sound files, they have lsb,msb byte order -as being used on the audio cd. The default filename extension is '.wav'. +which is the opposite byte order to the one used on the audio cd. +The default filename extension is '.wav'. Sun type files are not like the older common logarithmically coded .au files, but instead as mentioned above linear PCM is used. The byte order is msb,lsb to be compatible. The default filename extension is '.au'. @@ -805,19 +1427,19 @@ the cdr aka raw format. It is done per default in msb,lsb byte order to satisfy the order wanted by most cd writers. Since there is no header information in this format, the sample parameters can only be identified by playing the samples -on a soundcard or similiar. The default filename extension is '.cdr' or '.raw'. -.IP "Select cdrom drive reading speed" +on a soundcard or similar. The default filename extension is '.cdr' or '.raw'. +.SS "Select cdrom drive reading speed" .B \-S " speed" -allows to switch the cdrom drive to a certain level of speed in order to -reduce read errors. The argument is transfered verbatim to the drive. +allows to switch the cdrom drive to a certain speed in order to +reduce read errors. The argument is transferred verbatim to the drive. Details depend very much on the cdrom drives. An argument of 0 for example is often the default speed of the drive, a value of 1 often selects single speed. -.IP "Enable MD5 checksums" +.SS "Enable MD5 checksums" .B \-M " count" enables calculation of MD-5 checksum for 'count' bytes from the beginning of a track. This was introduced for quick comparisons of tracks. -.IP "Use Monty's libparanoia for reading of sectors" +.SS "Use Monty's libparanoia for reading of sectors" .B \-paranoia selects an alternate way of extracting audio sectors. Monty's library is used with the following default options: @@ -828,7 +1450,7 @@ In this case the option .B \-P has no effect. -.IP "Do linear or overlapping reading of sectors" +.SS "Do linear or overlapping reading of sectors" (This applies unless option .B \-paranoia is used.) @@ -848,50 +1470,73 @@ below). Cdda2wav will check this setting and issues a error message otherwise. The case of zero sectors is nice on low load situations or errorfree (perfect) -cdrom drives and perfect (not scratched) audio cds. -.IP "Set the transfer size" +cdrom drives and perfect (unscratched) audio cds. +.SS "Set the transfer size" .B \-n " sectors" will set the transfer size to the specified sectors per request. -.IP "Set number of ring buffer elements" +.SS "Set number of ring buffer elements" .B \-l " buffers" will allocate the specified number of ring buffer elements. -.IP "Set endianess of input samples" +.SS "Set endianess of input samples" .B \-C " endianess" will override the default settings of the input format. -Endianess can be set explicitly to "little" or "big" or to the automatic +Endianess can be set explicitly to "little", "big" or "machine" or to the automatic endianess detection based on voting with "guess". -.IP "Set endianess of output samples" +.SS "Set endianess of output samples" .B \-E " endianess" -(endianess can be "little" or "big") will override the default settings -of the output format. -.IP "Verbose option" +(endianess can be "little", "big" or "machine") will override the +default settings of the output format. +.SS "Verbose option" .B \-v " itemlist" prints more information. A list allows selection of different information items. .sp +.TP 10 +.B help +Print a summary of possible members of the diffopts list. +.TP +.B ! +Invert the meaning of the following string. No comma is needed after the +exclamation mark. +.TP 10 +.B not +Invert the meaning of all members in the diffopts list i.e. exclude +all present options from an initially complete set compare list. +When using +.BR csh (1) +you might have problems with +.B "!" +due to its strange parser. +This is why the +.B "not" +alias exists. +.TP .B "disable" -keeps quiet -.sp +disables verbosity +.TP +.B "all" +all information is given +.TP .B "toc" displays the table of contents -.sp +.TP .B "summary" displays a summary of recording parameters -.sp +.TP .B "indices" invokes the index scanner and displays start positions of indices -.sp +.TP .B "catalog" retrieves and displays a media catalog number -.sp +.TP .B "trackid" retrieves and displays international standard recording codes -.sp +.TP .B "sectors" displays track start positions in absolute sector notation -.sp -To combine several requests just list the suboptions seperated with commas. -.IP "The table of contents" +.PP +To combine several requests just list the suboptions separated with commas. +.SS "The table of contents" The display will show the table of contents with number of tracks and total time (displayed in .IR mm : ss . hh @@ -920,49 +1565,50 @@ both of them should be present. .B "channels" is defined for audio tracks only. There can be two or four channels. -.IP "No file output" +.SS "No file output" .B \-N this debugging option switches off writing to a file. -.IP "No infofile generation" +.SS "No infofile generation" .B \-H this option switches off creation of an info file and a cddb file. -.IP "Generation of simple output for gui frontends" +.SS "Generation of simple output for gui frontends" .B \-g this option switches on simple line formatting, which is needed to support gui frontends (like xcd-roast). -.IP "Verbose SCSI logging" +.SS "Verbose SCSI logging" .B \-V this option switches on logging of SCSI commands. This will produce a lot of output (when SCSI devices are being used). This is needed for debugging purposes. The format -is the same as being used with the cdrecord program from J\*org Schilling. -I will not describe it here. -.IP "Quiet option" +is the same as being used with the cdrecord program, see +.BR cdrecord (1) +for more information. +.SS "Quiet option" .B \-q suppresses all screen output except error messages. That reduces cpu time resources. -.IP "Just show information option" +.SS "Just show information option" .B \-J does not write a file, it only prints information about the disc (depending on the .B \-v option). This is just for information purposes. .SH "CDDBP support" -.IP "Lookup album and track titles option" +.SS "Lookup album and track titles option" .B \-L " cddbp mode" Cdda2wav tries to retrieve performer, album-, and track titles from a cddbp server. The default server right now is 'freedb.freedb.org'. It is planned to have more control over the server handling later. The parameter defines how multiple entries are handled: -.PP -0 interactive mode, the user chooses one of the entries. -.PP -1 take the first entry without asking. -.IP "Set server for title lookups" +.IP \fB0\fP +interactive mode, the user chooses one of the entries. +.IP \fB1\fP +take the first entry without asking. +.SS "Set server for title lookups" .B cddbp\-server " servername" When using \-L or \-cddb, the server being contacted can be set with this option. -.IP "Set portnumber for title lookups" +.SS "Set portnumber for title lookups" .B cddbp\-port " portnumber" When using \-L or \-cddb, the server port being contacted can be set with this option. @@ -987,16 +1633,16 @@ option. You can specify how much sectors should be requested in one go. .PP Cdda2wav supports -.B pipes -now. Use a filename of +.BR pipes . +Use a filename of .B \- to let cdda2wav output its samples to standard output. .PP -Conversion to other sound formats can be done using the +Conversion to other sound formats is possible using the .B sox -program package (although the use of +program package (it should no longer be necessary to use .B sox \-x -to change the byte order of samples should be no more necessary; see option +to change the byte order of samples; see option .B \-E to change the output byteorder). .PP @@ -1007,11 +1653,10 @@ be opened for the next track. .SH FILES Cdda2wav can generate a lot of files for various purposes. -.sp -Audio files: -.sp +.SS "Audio files: +.PP There are audio files containing samples with default extensions -.wav, .au, .aifc, .aiff, and .cdr according to the selected sound format. +\&.wav, .au, .aifc, .aiff, and .cdr according to the selected sound format. These files are not generated when option .RB ( \-N ) is given. Multiple files may @@ -1023,21 +1668,19 @@ Otherwise, if there are less file names than files needed to write the included tracks, the part of the file name before the extension is extended with '_dd' where dd represents the current track number. -.sp -Cddb and Cdindex files: -.sp +.SS "Cddb and Cdindex files: +.PP If cdda2wav detects cd-extra or cd-text (album/track) title information, -then .cddb and .cdindex files are generated unless suppressed by the +then .cddb, .cdindex and .cdtext files are generated unless suppressed by the option .BR \-H . They contain suitable formatted entries for submission to -audio cd track title databases in the internet. The CDINDEX and CDDB(tm) +audio cd track title databases in the Internet. The CDINDEX and CDDB(tm) systems are currently supported. For more information please visit www.musicbrainz.org and www.freedb.com. -.sp -Inf files: -.sp -The inf files are describing the sample files and the part from the audio cd, +.SS "Inf files: +.PP +The inf files describe the sample files and the part of the audio cd it was taken from. They are a means to transfer information to a cd burning program like cdrecord. For example, if the original audio cd had pre-emphasis enabled, and cdda2wav @@ -1051,20 +1694,14 @@ holders. This program may not be used to circumvent copyrights. The user acknowledges this constraint when using the software. .SH BUGS -Generation of md5 checksums is currently broken. -.sp -Performance may not be optimal on slower systems. -.sp The index scanner may give timeouts. .sp The resampling (rate conversion code) uses polynomial interpolation, which is not optimal. .sp Cdda2wav should use threads. -.sp -Cdda2wav currently cannot sample hidden audio tracks (track 1 index 0). .SH ACKNOWLEDGEMENTS -Thanks goto Project MODE (http://www.mode.net/) and Fraunhofer Institut f\*ur +Thanks go to Project MODE (http://www.mode.net/) and Fraunhofer Institut f\*ur integrierte Schaltungen (FhG-IIS) (http://www.iis.fhg.de/) for financial support. Plextor Europe and Ricoh Japan provided cdrom disk drives and cd burners @@ -1073,6 +1710,30 @@ hearing 100 times the first 16 seconds of the first track of the Krupps CD. Libparanoia contributed by Monty (Christopher Montgomery) xiphmont@mit.edu. .SH AUTHOR -Heiko Eissfeldt heiko@colossus.escape.de +Heiko Eissfeldt heiko@colossus.escape.de (1993-2004,2015) +.PP +2004-today: + +.nf +J\*org Schilling +Seestr. 110 +D-13353 Berlin +Germany +.fi .SH DATE -11 Sep 2002 +2017/03/29 +.br +.ne 7 +.SH "INTERFACE STABILITY +The interfaces provided by +.B cdda2wav +are designed for long term stability. +As +.B cdda2wav +depends on interfaces provided by the underlying operating system, +the stability of the interfaces offered by +.B cdda2wav +depends on the interface stability of the OS interfaces. +Modified interfaces in the OS may enforce modified interfaces +in +.BR cdda2wav . diff -Nru cdrtools-2.01.01a33/cdda2wav/cdda2wav.c cdrtools-3.02a09/cdda2wav/cdda2wav.c --- cdrtools-2.01.01a33/cdda2wav/cdda2wav.c 2007-07-26 16:32:57.000000000 +0000 +++ cdrtools-3.02a09/cdda2wav/cdda2wav.c 2017-12-06 23:10:44.000000000 +0000 @@ -1,7 +1,8 @@ -/* @(#)cdda2wav.c 1.82 07/07/26 Copyright 1998-2004 Heiko Eissfeldt, Copyright 2004-2007 J. Schilling */ +/* @(#)cdda2wav.c 1.170 17/12/07 Copyright 1993-2004,2015,2017 Heiko Eissfeldt, Copyright 2004-2017 J. Schilling */ +#include "config.h" #ifndef lint -static char sccsid[] = -"@(#)cdda2wav.c 1.82 07/07/26 Copyright 1998-2004 Heiko Eissfeldt, Copyright 2004-2007 J. Schilling"; +static UConst char sccsid[] = +"@(#)cdda2wav.c 1.170 17/12/07 Copyright 1993-2004,2015,2017 Heiko Eissfeldt, Copyright 2004-2017 J. Schilling"; #endif #undef DEBUG_BUFFER_ADDRESSES @@ -19,15 +20,15 @@ * with the License. * * See the file CDDL.Schily.txt in this distribution for details. + * A copy of the CDDL is also available via the Internet at + * http://www.opensource.org/licenses/cddl1.txt * * When distributing Covered Code, include this CDDL HEADER in each * file and include the License file CDDL.Schily.txt from this distribution. */ /* - * parts (C) Peter Widow - * parts (C) Thomas Niederreiter - * parts (C) RSA Data Security, Inc. - * parts (C) J. Schilling + * Copright 1993-2004,2015,2017 (C) Heiko Eissfeldt + * Copright 2004-2017 (C) J. Schilling * * last changes: * 18.12.93 - first version, OK @@ -66,32 +67,37 @@ #include "config.h" #include -#include +#include #include #include #include -#include -#include -#include +#include +#include +#include #include #include -#if defined(HAVE_LIMITS_H) && (HAVE_LIMITS_H == 1) -#include -#endif +#include #include #include #include #include -#if defined(HAVE_SETPRIORITY) && (HAVE_SETPRIORITY == 1) -#include -#endif +#include #include +#include +#include +#include /* for setmode() prototype */ +#include /* To get PRIV_PFEXEC definition */ +#include #include #ifdef HAVE_AREAS +#ifdef HAVE_OS_H +#include +#else #include #endif +#endif #include "mytype.h" #include "sndconfig.h" @@ -118,7 +124,8 @@ #ifdef USE_PARANOIA #include "cdda_paranoia.h" #endif -#include "defaults.h" +#include "parse.h" +#include "cdrdeflt.h" #include "version.h" #ifdef VMS @@ -129,27 +136,46 @@ #endif EXPORT int main __PR((int argc, char **argv)); -static void RestrictPlaybackRate __PR((long newrate)); -static void output_indices __PR((FILE *fp, index_list *p, +#ifdef ECHO_TO_SOUNDCARD +LOCAL void RestrictPlaybackRate __PR((long newrate)); +#endif +LOCAL void output_indices __PR((FILE *fp, index_list *p, unsigned trackstart)); -static int write_info_file __PR((char *fname_baseval, +LOCAL FILE *info_file_open __PR((char *fname_baseval, + unsigned int track, + BOOL doappend, + BOOL numbered)); +LOCAL FILE *cue_file_open __PR((char *fname_baseval)); +LOCAL void get_datetime __PR((char *datetime, int size)); +LOCAL int write_info_file __PR((char *fname_baseval, unsigned int track, unsigned long SamplesDone, int numbered)); -static void CloseAudio __PR((int channels_val, +LOCAL int write_md5_info __PR((char *fname_baseval, + unsigned int track, + BOOL numbered)); +LOCAL void write_cue_global __PR((FILE *cuef, char *fname_baseval)); +LOCAL char *index_str __PR((long sector)); +LOCAL void write_cue_track __PR((FILE *cuef, char *fname_baseval, + unsigned int track)); +LOCAL void CloseAudio __PR((int channels_val, unsigned long nSamples, struct soundfile *audio_out)); -static void CloseAll __PR((void)); -static void OpenAudio __PR((char *fname, double rate, +LOCAL void CloseAll __PR((void)); +LOCAL void OpenAudio __PR((char *fname, double rate, long nBitsPerSample, long channels_val, unsigned long expected_bytes, struct soundfile *audio_out)); -static void set_offset __PR((myringbuff *p, int offset)); -static int get_offset __PR((myringbuff *p)); -static void usage __PR((void)); -static void init_globals __PR((void)); -static int is_fifo __PR((char * filename)); +LOCAL void set_offset __PR((myringbuff *p, int offset)); +LOCAL int get_offset __PR((myringbuff *p)); +LOCAL void usage __PR((void)); +LOCAL void prdefaults __PR((FILE *f)); +LOCAL void init_globals __PR((void)); +LOCAL int is_fifo __PR((char * filename)); +LOCAL const char *get_audiotype __PR((void)); +LOCAL void priv_warn __PR((const char *what, const char *msg)); +LOCAL void gargs __PR((int argc, char *argv[])); /* @@ -160,51 +186,48 @@ * ambigious string parametrized option names last */ /* BEGIN CSTYLED */ -static const char *opts = "paranoia,paraopts&,version,help,h,\ +LOCAL const char *opts = "paranoia,paraopts&,version,help,h,\ no-write,N,dump-rates,R,bulk,B,alltracks,verbose-scsi+,V+,\ -find-extremes,F,find-mono,G,no-infofile,H,\ +find-extremes,F,find-mono,G,no-infofile,H,no-textdefaults,\ +no-textfile,cuefile,no-hidden-track,\ deemphasize,T,info-only,J,silent-scsi,Q,\ cddbp-server*,cddbp-port*,\ -scanbus,device*,dev*,D*,ts&,auxdevice*,A*,interface*,I*,output-format*,O*,\ +scanbus,device*,dev*,D*,scgopts*,debug#,debug-scsi#,kdebug#,kd#,kdebug-scsi#,ts&,\ +auxdevice*,A*,interface*,I*,output-format*,O*,\ output-endianess*,E*,cdrom-endianess*,C*,speed#,S#,\ -playback-realtime#L,p#L,md5#,M#,set-overlap#,P#,sound-device*,K*,\ +playback-realtime#L,p#L,md5,M,set-overlap#,P#,sound-device*,K*,\ cddb#,L#,channels*,c*,bits-per-sample#,b#,rate#,r#,gui,g,\ -divider*,a*,track*,t*,index#,i#,duration*,d*,offset#,o#,\ +divider*,a*,track*,t*,index#,i#,duration*,d*,offset#L,o#L,start-sector#L,\ sectors-per-request#,n#,verbose-level&,v&,buffers-in-ring#,l#,\ -stereo,s,mono,m,wait,w,echo,e,quiet,q,max,x\ +stereo,s,mono,m,wait,w,echo,e,quiet,q,max,x,out-fd#,audio-fd#,no-fork,interactive\ "; /* END CSTYLED */ -#ifdef NEED_O_BINARY -#include /* for setmode() prototype */ -#endif - /* - * global variables + * Global variables */ -global_t global; +EXPORT global_t global; /* - * static variables + * Local variables */ -static unsigned long nSamplesDone = 0; - -static int child_pid = -2; +LOCAL unsigned long nSamplesDone = 0; +LOCAL unsigned long *nSamplesToDo; +LOCAL unsigned int current_track_reading; +LOCAL unsigned int current_track_writing; +LOCAL int bulk = 0; -static unsigned long *nSamplesToDo; -static unsigned int current_track; -static int bulk = 0; - -unsigned int get_current_track __PR((void)); +unsigned int get_current_track_writing __PR((void)); unsigned int -get_current_track() +get_current_track_writing() { - return (current_track); + return (current_track_writing); } -static void +#ifdef ECHO_TO_SOUNDCARD +LOCAL void RestrictPlaybackRate(newrate) long newrate; { @@ -221,7 +244,7 @@ if (global.playback_rate < 100) global.nsectors = (global.nsectors*global.playback_rate)/100; } - +#endif long SamplesNeeded(amount, undersampling_val) @@ -235,20 +258,20 @@ return (retval); } -static int argc2; -static int argc3; -static char **argv2; +LOCAL int argc2; +LOCAL int argc3; +LOCAL char **argv2; -static void reset_name_iterator __PR((void)); -static void +LOCAL void reset_name_iterator __PR((void)); +LOCAL void reset_name_iterator() { argv2 -= argc3 - argc2; argc2 = argc3; } -static char *get_next_name __PR((void)); -static char +LOCAL char *get_next_name __PR((void)); +LOCAL char *get_next_name() { if (argc2 > 0) { @@ -259,9 +282,9 @@ } } -static char *cut_extension __PR((char * fname)); +LOCAL char *cut_extension __PR((char * fname)); -static char +LOCAL char *cut_extension(fname) char *fname; { @@ -278,7 +301,7 @@ } #ifdef INFOFILES -static void +LOCAL void output_indices(fp, p, trackstart) FILE *fp; index_list *p; @@ -310,13 +333,74 @@ fputs("\n", fp); } +LOCAL FILE * +info_file_open(fname_baseval, track, doappend, numbered) + char *fname_baseval; + unsigned int track; + BOOL doappend; + BOOL numbered; +{ + char fname[PATH_MAX+1]; + + /* + * write info file + */ + if (strcmp(fname_baseval, "-") == 0) + return ((FILE *)0); + + strncpy(fname, fname_baseval, sizeof (fname) -1); + fname[sizeof (fname) -1] = 0; + if (numbered) + sprintf(cut_extension(fname), "_%02u.inf", track); + else + strcpy(cut_extension(fname), ".inf"); + + return (fopen(fname, doappend ? "a" : "w")); +} + +LOCAL FILE * +cue_file_open(fname_baseval) + char *fname_baseval; +{ + char fname[PATH_MAX+1]; + + /* + * write info file + */ + if (strcmp(fname_baseval, "-") == 0) + return ((FILE *)0); + + strncpy(fname, fname_baseval, sizeof (fname) -1); + fname[sizeof (fname) -1] = 0; + strcpy(cut_extension(fname), ".cue"); + + return (fopen(fname, "w")); +} + +LOCAL void +get_datetime(datetime, size) + char *datetime; + int size; +{ + time_t utc_time; + struct tm *tmptr; + + utc_time = time(NULL); + tmptr = localtime(&utc_time); + if (tmptr) { + strftime(datetime, size, "%x %X", tmptr); + } else { + strlcpy(datetime, "unknown", size); + } +} + /* * write information before the start of the sampling process * * * uglyfied for Joerg Schillings ultra dumb line parser */ -static int +LOCAL int write_info_file(fname_baseval, track, SamplesDone, numbered) char *fname_baseval; unsigned int track; @@ -324,7 +408,6 @@ int numbered; { FILE *info_fp; - char fname[200]; char datetime[30]; time_t utc_time; struct tm *tmptr; @@ -335,24 +418,10 @@ if (strcmp(fname_baseval, "-") == 0) return (0); - strncpy(fname, fname_baseval, sizeof (fname) -1); - fname[sizeof (fname) -1] = 0; - if (numbered) - sprintf(cut_extension(fname), "_%02u.inf", track); - else - strcpy(cut_extension(fname), ".inf"); - - info_fp = fopen(fname, "w"); + info_fp = info_file_open(fname_baseval, track, FALSE, numbered); if (!info_fp) return (-1); -#if 0 -#ifdef MD5_SIGNATURES - if (global.md5blocksize) - MD5Final(global.MD5_result, &global.context); -#endif -#endif - utc_time = time(NULL); tmptr = localtime(&utc_time); if (tmptr) { @@ -360,7 +429,7 @@ } else { strncpy(datetime, "unknown", sizeof (datetime)); } - fprintf(info_fp, "#created by cdda2wav %s%s %s\n#\n", + fprintf(info_fp, "#created by cdda2wav %s%s %s\n#\n", VERSION, VERSION_OS, datetime); @@ -370,26 +439,75 @@ "CDDB_DISCID=\t0x%08lx\n\ MCN=\t\t%s\n\ ISRC=\t\t%15.15s\n\ -#\n\ -Albumperformer=\t'%s'\n\ -Performer=\t'%s'\n\ -Albumtitle=\t'%s'\n", +#\n", (unsigned long) global.cddb_id, Get_MCN(), - Get_ISRC(track), - global.creator != NULL ? - global.creator : (const unsigned char *)"", - global.trackcreator[track] != NULL ? - global.trackcreator[track] : - (global.creator != NULL ? - global.creator : (const unsigned char *)""), + Get_ISRC(track)); + /* END CSTYLED */ + + fprintf(info_fp, "Albumperformer=\t'%s'\n", + global.performer != NULL ? + global.performer : (const unsigned char *)""); + fprintf(info_fp, "Performer=\t'%s'\n", + global.trackperformer[track] != NULL ? + global.trackperformer[track] : + (global.no_textdefaults == 0 && global.performer != NULL ? + global.performer : (const unsigned char *)"")); + + fprintf(info_fp, "Albumsongwriter='%s'\n", + global.songwriter != NULL ? + global.songwriter : (const unsigned char *)""); + fprintf(info_fp, "Songwriter=\t'%s'\n", + global.tracksongwriter[track] != NULL ? + global.tracksongwriter[track] : + (global.no_textdefaults == 0 && global.songwriter != NULL ? + global.songwriter : (const unsigned char *)"")); + + fprintf(info_fp, "Albumcomposer=\t'%s'\n", + global.composer != NULL ? + global.composer : (const unsigned char *)""); + fprintf(info_fp, "Composer=\t'%s'\n", + global.trackcomposer[track] != NULL ? + global.trackcomposer[track] : + (global.no_textdefaults == 0 && global.composer != NULL ? + global.composer : (const unsigned char *)"")); + + fprintf(info_fp, "Albumarranger=\t'%s'\n", + global.arranger != NULL ? + global.arranger : (const unsigned char *)""); + fprintf(info_fp, "Arranger=\t'%s'\n", + global.trackarranger[track] != NULL ? + global.trackarranger[track] : + (global.no_textdefaults == 0 && global.arranger != NULL ? + global.arranger : (const unsigned char *)"")); + + fprintf(info_fp, "Albummessage=\t'%s'\n", + global.message != NULL ? + global.message : (const unsigned char *)""); + fprintf(info_fp, "Message=\t'%s'\n", + global.trackmessage[track] != NULL ? + global.trackmessage[track] : + (global.no_textdefaults == 0 && global.message != NULL ? + global.message : (const unsigned char *)"")); + + fprintf(info_fp, "Albumclosed_info='%s'\n", + global.closed_info != NULL ? + global.closed_info : (const unsigned char *)""); + fprintf(info_fp, "Closed_info=\t'%s'\n", + global.trackclosed_info[track] != NULL ? + global.trackclosed_info[track] : + (global.no_textdefaults == 0 && global.closed_info != NULL ? + global.closed_info : (const unsigned char *)"")); + + fprintf(info_fp, "Albumtitle=\t'%s'\n", global.disctitle != NULL ? global.disctitle : (const unsigned char *)""); - /* END CSTYLED */ fprintf(info_fp, "Tracktitle=\t'%s'\n", global.tracktitle[track] ? global.tracktitle[track] : (const unsigned char *)""); - fprintf(info_fp, "Tracknumber=\t%u\n", track); + + fprintf(info_fp, "Track=\t\t%u\n", track); + fprintf(info_fp, "Tracknumber=\t%u\n", Get_Tracknumber(track)); fprintf(info_fp, "Trackstart=\t%ld\n", Get_AudioStartSector(track)); fprintf(info_fp, "# track length in sectors (1/75 seconds each), rest samples\nTracklength=\t%ld, %d\n", @@ -408,7 +526,7 @@ fputs("once (copyright protected)\n", info_fp); break; case 1: - fputs("no (SCMS first copy)\n", info_fp); + fputs("no (SCMS first copy, not made by copyright holder)\n", info_fp); break; case 2: fputs("yes (not copyright protected)\n", @@ -423,41 +541,248 @@ fprintf(info_fp, "# index list\n"); output_indices(info_fp, global.trackindexlist[track], Get_AudioStartSector(track)); -#if 0 + + fclose(info_fp); + return (0); +} + +LOCAL int +write_md5_info(fname_baseval, track, numbered) + char *fname_baseval; + unsigned int track; + BOOL numbered; +{ +#ifdef MD5_SIGNATURES + FILE *info_fp; + /* - * MD5 checksums in info files are currently broken. - * for on-the-fly-recording the generation of info files has been - * shifted before the recording starts, so there is no checksum at - * that point. + * write info file */ -#ifdef MD5_SIGNATURES + if (strcmp(fname_baseval, "-") == 0) + return (0); + + info_fp = info_file_open(fname_baseval, track, TRUE, numbered); + if (!info_fp) + return (-1); + + if (global.md5blocksize) + MD5Final(global.MD5_result, global.context); + fprintf(info_fp, - "#(blocksize) checksum\nMD-5=\t\t(%d) %02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x\n", - global.md5blocksize, - global.MD5_result[0], - global.MD5_result[1], - global.MD5_result[2], - global.MD5_result[3], - global.MD5_result[4], - global.MD5_result[5], - global.MD5_result[6], - global.MD5_result[7], - global.MD5_result[8], - global.MD5_result[9], - global.MD5_result[10], - global.MD5_result[11], - global.MD5_result[12], - global.MD5_result[13], - global.MD5_result[14], - global.MD5_result[15]); -#endif -#endif + "# md5 sum\nMD5-offset=\t%d\n", global.md5offset); + if (global.md5blocksize) { + fprintf(info_fp, + "MD5-size=\t%d\n", global.md5size); + fprintf(info_fp, + "MD5-sum=\t%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x\n", + global.MD5_result[0], + global.MD5_result[1], + global.MD5_result[2], + global.MD5_result[3], + global.MD5_result[4], + global.MD5_result[5], + global.MD5_result[6], + global.MD5_result[7], + global.MD5_result[8], + global.MD5_result[9], + global.MD5_result[10], + global.MD5_result[11], + global.MD5_result[12], + global.MD5_result[13], + global.MD5_result[14], + global.MD5_result[15]); + } fclose(info_fp); +#endif return (0); } -#endif +#endif /* INFOFILES */ + +LOCAL void +write_cue_global(cuef, fname_baseval) + FILE *cuef; + char *fname_baseval; +{ + char datetime[30]; + char fname[200]; + + if (cuef == NULL) + return; + + get_datetime(datetime, sizeof (datetime)); + + fprintf(cuef, "REM created by cdda2wav %s%s %s\n", + VERSION, + VERSION_OS, + datetime); + fprintf(cuef, "REM CDRTOOLS\n"); + fprintf(cuef, "REM\n"); + + if (Get_MCN()[0] != '\0') + fprintf(cuef, "CATALOG %s\n", Get_MCN()); + if (global.did_textfile) { + char *pp; + + strncpy(fname, fname_baseval, sizeof (fname) -1); + fname[sizeof (fname) -1] = 0; + pp = strrchr(fname, '.'); + if (pp == NULL) + pp = fname + strlen(fname); + strncpy(pp, ".cdtext", sizeof (fname) - 1 - (pp - fname)); + fprintf(cuef, "CDTEXTFILE \"%s\"\n", fname); + } + if (global.performer) + fprintf(cuef, "PERFORMER \"%s\"\n", global.performer); + if (global.songwriter) + fprintf(cuef, "SONGWRITER \"%s\"\n", global.songwriter); + if (global.disctitle) + fprintf(cuef, "TITLE \"%s\"\n", global.disctitle); + + /* + * If we allow to wite cue files with -B, we need to remove the FILE + * entry here. + */ + snprintf(fname, sizeof (fname), + "%s.%s", + global.fname_base, + get_audiotype()); + fprintf(cuef, "FILE \"%s\" %s\n", fname, global.audio_out->auf_cuename); +} + +LOCAL char * +index_str(sector) + long sector; +{ +static char strbuf[10]; + long val; + + val = sector / (60 * 75); + if (val > 99) + return ("err"); + strbuf[0] = (val / 10) + '0'; + strbuf[1] = (val % 10) + '0'; + strbuf[2] = ':'; + + sector = sector % (60 * 75); + val = sector / 75; + strbuf[3] = (val / 10) + '0'; + strbuf[4] = (val % 10) + '0'; + strbuf[5] = ':'; + + val = sector % 75; + strbuf[6] = (val / 10) + '0'; + strbuf[7] = (val % 10) + '0'; + strbuf[8] = '\0'; + + return (strbuf); +} + +LOCAL void +write_cue_track(cuef, fname_baseval, track) + FILE *cuef; + char *fname_baseval; + unsigned int track; +{ + long off_01; + int i; + index_list *ip; + + if (cuef == NULL) + return; + if (track == 0) + return; + + /* + * If we allow to write cue files with -B, we need to add the FILE + * entry here. + */ -static void + fprintf(cuef, " TRACK %2.2d AUDIO\n", Get_Tracknumber(track)); + if (global.tracktitle[track]) + fprintf(cuef, " TITLE \"%s\"\n", global.tracktitle[track]); + if (global.trackperformer[track] || + (global.no_textdefaults == 0 && global.performer != NULL)) { + fprintf(cuef, " PERFORMER \"%s\"\n", + global.trackperformer[track] != NULL ? + global.trackperformer[track] : + global.performer); + } + if (global.tracksongwriter[track] || + (global.no_textdefaults == 0 && global.songwriter != NULL)) { + fprintf(cuef, " SONGWRITER \"%s\"\n", + global.tracksongwriter[track] != NULL ? + global.tracksongwriter[track] : + global.songwriter); + } + if (Get_ISRC(track)[0]) { + char *p = (char *)Get_ISRC(track); + fprintf(cuef, " ISRC "); + while (*p) { + if (*p == '-') + p++; + putc(*p++, cuef); + } + fprintf(cuef, "\n"); + } + if ((Get_Preemphasis(track) && (global.deemphasize == 0)) || + Get_Copyright(track) != 0 || + Get_Channels(track)) { + fprintf(cuef, " FLAGS"); + switch (Get_Copyright(track)) { + + case 1: fprintf(cuef, " SCMS"); break; + case 2: fprintf(cuef, " DCP"); break; + } + if (Get_Channels(track)) + fprintf(cuef, " 4CH"); + if (Get_Preemphasis(track) && (global.deemphasize == 0)) + fprintf(cuef, " PRE"); + fprintf(cuef, "\n"); + } + for (ip = global.trackindexlist[track]; ip; ip = ip->next) { + if (ip->next == NULL) + break; + } + if (useHiddenTrack()) + off_01 = 0L; + else + off_01 = Get_AudioStartSector(FirstAudioTrack()); + if (global.trackindexlist[track] == NULL) { + if (track == 1) { + if (useHiddenTrack()) + fprintf(cuef, " INDEX 00 %s\n", "00:00:00"); + else + fprintf(cuef, " PREGAP %s\n", index_str(off_01)); + } + fprintf(cuef, " INDEX 01 %s\n", + index_str(Get_AudioStartSector(track) - off_01)); + } else if (track == 1 && + global.trackindexlist[track] && + global.trackindexlist[track]->frameoffset != 0) { + if (useHiddenTrack()) + fprintf(cuef, " INDEX 00 %s\n", "00:00:00"); + else + fprintf(cuef, " PREGAP %s\n", index_str(off_01)); + } else if (track > 1) { + for (ip = global.trackindexlist[track-1]; ip; ip = ip->next) { + if (ip->next == NULL) + break; + } + if (ip && ip->frameoffset != -1) + fprintf(cuef, " INDEX 00 %s\n", + index_str((long)ip->frameoffset - off_01)); + } + for (i = 1, ip = global.trackindexlist[track]; ip; i++, ip = ip->next) { + if (ip->next == NULL) + break; + if (ip->frameoffset == -1) + continue; + fprintf(cuef, " INDEX %2.2d %s\n", i, + index_str((long)ip->frameoffset - off_01)); + } +} + +LOCAL void CloseAudio(channels_val, nSamples, audio_out) int channels_val; unsigned long nSamples; @@ -474,22 +799,21 @@ global.audio = -1; } -static unsigned int track = 1; +LOCAL unsigned int track = (unsigned int)-1; /* * On terminating: * define size-related entries in audio file header, update and close file */ -static void +LOCAL void CloseAll() { - WAIT_T chld_return_status; int amiparent; /* * terminate child process first */ - amiparent = child_pid > 0; + amiparent = global.child_pid > 0; if (global.iloop > 0) { /* set to zero */ @@ -498,16 +822,16 @@ #if defined HAVE_FORK_AND_SHAREDMEM #ifdef DEBUG_CLEANUP - fprintf(stderr, "%s terminating, \n", amiparent ? - "Parent (READER)" : "Child (WRITER)"); + fprintf(stderr, _("%s terminating, \n"), amiparent ? + _("Parent (READER)") : _("Child (WRITER)")); #endif #else #ifdef DEBUG_CLEANUP - fprintf(stderr, "Cdda2wav single process terminating, \n"); + fprintf(stderr, _("Cdda2wav single process terminating, \n")); #endif #endif - if (amiparent || child_pid < 0) { + if (amiparent || global.child_pid < 0) { /* switch to original mode and close device */ EnableCdda(get_scsi_p(), 0, 0); } @@ -531,19 +855,19 @@ /* tell minimum and maximum amplitudes, if required */ if (global.findminmax) { - fprintf(stderr, - "Right channel: minimum amplitude :%d/-32768, maximum amplitude :%d/32767\n", + fprintf(outfp, + _("Right channel: minimum amplitude :%d/-32768, maximum amplitude :%d/32767\n"), global.minamp[0], global.maxamp[0]); - fprintf(stderr, - "Left channel: minimum amplitude :%d/-32768, maximum amplitude :%d/32767\n", + fprintf(outfp, + _("Left channel: minimum amplitude :%d/-32768, maximum amplitude :%d/32767\n"), global.minamp[1], global.maxamp[1]); } /* tell mono or stereo recording, if required */ if (global.findmono) { - fprintf(stderr, - "Audio samples are originally %s.\n", - global.ismono ? "mono" : "stereo"); + fprintf(outfp, + _("Audio samples are originally %s.\n"), + global.ismono ? _("mono") : _("stereo")); } return; /* end of child or single process */ @@ -551,38 +875,47 @@ if (global.have_forked == 1) { +#ifdef HAVE_FORK + WAIT_T chld_return_status; +#endif #ifdef DEBUG_CLEANUP - fprintf(stderr, "Parent wait for child death, \n"); + fprintf(stderr, _("Parent wait for child death, \n")); #endif + semdestroy(); - /* wait for child to terminate */ +#ifdef HAVE_FORK + /* + * If we don't have fork don't wait() either, + * else wait for child to terminate. + */ if (0 > wait(&chld_return_status)) { - errmsg("Error waiting for child.\n"); + errmsg(_("Error waiting for child.\n")); } else { if (WIFEXITED(chld_return_status)) { if (WEXITSTATUS(chld_return_status)) { fprintf(stderr, - "\nW Child exited with %d\n", + _("\nW Child exited with %d\n"), WEXITSTATUS(chld_return_status)); } } if (WIFSIGNALED(chld_return_status)) { fprintf(stderr, - "\nW Child exited due to signal %d\n", + _("\nW Child exited due to signal %d\n"), WTERMSIG(chld_return_status)); } if (WIFSTOPPED(chld_return_status)) { fprintf(stderr, - "\nW Child is stopped due to signal %d\n", + _("\nW Child is stopped due to signal %d\n"), WSTOPSIG(chld_return_status)); } } #ifdef DEBUG_CLEANUP fprintf(stderr, - "\nW Parent child death, state:%d\n", + _("\nW Parent child death, state:%d\n"), chld_return_status); #endif +#endif } #ifdef GPROF @@ -595,10 +928,10 @@ * report a usage error and exit */ #ifdef PROTOTYPES -static void +LOCAL void usage2(const char *szMessage, ...) #else -static void +LOCAL void usage2(szMessage, va_alist) const char *szMessage; va_dcl @@ -616,7 +949,7 @@ va_end(marker); fprintf(stderr, - "\nPlease use -help or consult the man page for help.\n"); + _("Please use -help or consult the man page for help.\n")); exit(1); } @@ -648,8 +981,9 @@ va_end(marker); - if (child_pid >= 0) { - if (child_pid == 0) { +#ifdef HAVE_KILL + if (global.child_pid >= 0) { + if (global.child_pid == 0) { pid_t ppid; /* * Kill the parent too if we are not orphaned. @@ -658,9 +992,10 @@ if (ppid > 1) kill(ppid, SIGINT); } else { - kill(child_pid, SIGINT); + kill(global.child_pid, SIGINT); } } +#endif exit(1); } @@ -671,7 +1006,7 @@ * is known). So hitting the interrupt key leaves an intact * file. */ -static void +LOCAL void OpenAudio(fname, rate, nBitsPerSample, channels_val, expected_bytes, audio_out) char *fname; double rate; @@ -693,11 +1028,11 @@ if (global.audio == -1) { if (errno == EAGAIN && is_fifo(fname)) { FatalError(errno, - "Could not open fifo %s. Probably no fifo reader present.\n", + _("Could not open fifo %s. Probably no fifo reader present.\n"), fname); } FatalError(errno, - "Could not open audio sample file %s.\n", + _("Could not open audio sample file %s.\n"), fname); } } @@ -707,17 +1042,18 @@ nBitsPerSample, expected_bytes); #ifdef MD5_SIGNATURES + global.md5size = 0; if (global.md5blocksize) - MD5Init(&global.context); + MD5Init(global.context); global.md5count = global.md5blocksize; #endif } #include "scsi_cmds.h" -static int RealEnd __PR((SCSI *scgp, UINT4 *buff)); +LOCAL int RealEnd __PR((SCSI *scgp, UINT4 *buff)); -static int +LOCAL int RealEnd(scgp, buff) SCSI *scgp; UINT4 *buff; @@ -757,56 +1093,59 @@ return (0); } -static void +LOCAL void set_offset(p, offset) myringbuff *p; int offset; { #ifdef DEBUG_SHM - fprintf(stderr, "Write offset %d at %p\n", offset, &p->offset); + fprintf(stderr, _("Write offset %d at %p\n"), offset, &p->offset); #endif p->offset = offset; } -static int +LOCAL int get_offset(p) myringbuff *p; { #ifdef DEBUG_SHM - fprintf(stderr, "Read offset %d from %p\n", p->offset, &p->offset); + fprintf(stderr, _("Read offset %d from %p\n"), p->offset, &p->offset); #endif return (p->offset); } -static void +LOCAL void usage() { /* BEGIN CSTYLED */ - fputs("usage: cdda2wav [OPTIONS ...] [trackfilenames ...]\n\ + fputs(_("Usage: cdda2wav [OPTIONS ...] [trackfilenames ...]\n\ OPTIONS:\n\ [-c chans] [-s] [-m] [-b bits] [-r rate] [-a divider] [-S speed] [-x]\n\ [-t track[+endtrack]] [-i index] [-o offset] [-d duration] [-F] [-G]\n\ [-q] [-w] [-v vopts] [-R] [-P overlap] [-B] [-T] [-C input-endianess]\n\ [-e] [-n sectors] [-N] [-J] [-L cddbp-mode] [-H] [-g] [-l buffers] [-D cd-device]\n\ [-I interface] [-K sound-device] [-O audiotype] [-E output-endianess]\n\ - [-A auxdevice] [-paranoia] [-cddbp-server=name] [-cddbp-port=port] [-version]\n", + [-A auxdevice] [-paranoia] [-cddbp-server=name] [-cddbp-port=port] [-version]\n"), stderr); /* END CSTYLED */ /* BEGIN CSTYLED */ - fputs("\ + fputs(_("\ (-D) dev=device set the cdrom or scsi device (as Bus,Id,Lun).\n\ + scgopts=spec SCSI options for libscg\n\ ts=# set maximum transfer size for a single SCSI command\n\ (-A) auxdevice=device set the aux device (typically /dev/cdrom).\n\ (-K) sound-device=device set the sound device to use for -e (typically /dev/dsp).\n\ + out-fd=descriptor set the file descriptor for general output to descriptor.\n\ + audio-fd=descriptor set the file descriptor for '-' audio output.\n\ (-I) interface=interface specify the interface for cdrom access.\n\ (generic_scsi or cooked_ioctl).\n\ (-c) channels=channels set 1 for mono, 2 or s for stereo (s: channels swapped).\n\ (-s) -stereo select stereo recording.\n\ (-m) -mono select mono recording.\n\ - (-x) -max select maximum quality (stereo/16-bit/44.1 KHz).\n\ + (-x) -max select maximum quality (stereo/16-bit/44.1 kHz).\n\ (-b) bits=bits set bits per sample per channel (8, 12 or 16 bits).\n\ (-r) rate=rate set rate in samples per second. -R gives all rates\n\ (-a) divider=divider set rate to 44100Hz / divider. -R gives all rates\n\ @@ -819,6 +1158,7 @@ (-i) index=index select start index.\n\ (-o) offset=offset start at 'offset' sectors behind start track/index.\n\ one sector equivalents 1/75 second.\n\ + start-sector=sector set absolute start sector.\n\ (-O) output-format=audiotype set to wav, au (sun), cdr (raw), aiff or aifc format.\n\ (-C) cdrom-endianess=endian set little, big or guess input sample endianess.\n\ (-E) output-endianess=endian set little or big output sample endianess.\n\ @@ -833,82 +1173,124 @@ (-J) -info-only give disc information only.\n\ (-L) cddb=cddbpmode do cddbp title lookups.\n\ resolve multiple entries according to cddbpmode: 0=interactive, 1=first entry\n\ + -cuefile create a CDRWIN CUE file instead of info files.\n\ (-H) -no-infofile no info file generation.\n\ + -no-textdefaults do not fill missing track CD-Text from album CD-Text.\n\ + -no-textfile no binary cdtext file generation.\n\ + -no-hidden-track do not scan for hidden audio track (before track #1).\n\ + -no-fork do not fork for better buffering.\n\ (-g) -gui generate special output suitable for gui frontends.\n\ (-Q) -silent-scsi do not print status of erreneous scsi-commands.\n\ - -scanbus scan the SCSI bus and exit\n\ - (-M) md5=count calculate MD-5 checksum for blocks of 'count' bytes.\n\ + -scanbus scan the SCSI bus and exit.\n\ + (-M) -md5 calculate MD-5 checksum for audio data.\n\ (-q) -quiet quiet operation, no screen output.\n\ (-p) playback-realtime=perc play (echo) audio pitched at perc percent (50%-200%).\n\ (-V) -verbose-scsi each option increases verbosity for SCSI commands.\n\ (-h) -help show this help screen.\n\ - (-B) -alltracks, -bulk record each track into a seperate file.\n\ + (-B) -alltracks, -bulk record each track into a separate file.\n\ -paranoia use the lib paranoia for reading.\n\ -paraopts=opts set options for lib paranoia (see -paraopts=help).\n\ -cddbp-server=servername set the cddbp server to use for title lookups.\n\ -cddbp-port=portnumber set the cddbp port to use for title lookups.\n\ + -interactive select interactive mode (used by gstreamer plugin).\n\ -version print version information.\n\ \n\ Please note: some short options will be phased out soon (disappear)!\n\ \n\ parameters: (optional) one or more file names or - for standard output.\n\ -", +"), stderr); /* END CSTYLED */ - fputs("Version ", stderr); + fputs(_("Version "), stderr); fputs(VERSION, stderr); fputs(VERSION_OS, stderr); + prdefaults(stderr); + exit(SYNTAX_ERROR); +} + +LOCAL void +prdefaults(f) + FILE *f; +{ /* BEGIN CSTYLED */ - fprintf(stderr, "\n\ -defaults %s, %d bit, %d.%02d Hz, track 1, no offset, one track,\n", - CHANNELS-1?"stereo":"mono", BITS_P_S, + fprintf(f, _("\n\ +Defaults: %s, %d bit, %d.%02d Hz, track 1, no offset, one track,\n"), + (CHANNELS-1) ? _("stereo") : _("mono"), BITS_P_S, 44100 / UNDERSAMPLING, (4410000 / UNDERSAMPLING) % 100); - fprintf(stderr, "\ - type %s '%s', don't wait for signal, not quiet,\n", + fprintf(f, _("\ + type: %s filename: '%s', don't wait for signal, not quiet,\n"), AUDIOTYPE, FILENAME); - fprintf(stderr, "\ - use %s, device %s, aux %s\n", + fprintf(f, _("\ + use: '%s', device: '%s', aux: '%s'\n"), DEF_INTERFACE, CD_DEVICE, AUX_DEVICE); /* END CSTYLED */ - exit(SYNTAX_ERROR); } -static void +LOCAL void init_globals() { #ifdef HISTORICAL_JUNK global.dev_name = CD_DEVICE; /* device name */ #endif - global.aux_name = AUX_DEVICE; /* auxiliary cdrom device */ + global.dev_opts = NULL; /* scg device options */ + global.aux_name = AUX_DEVICE; /* auxiliary cdrom device name */ + global.out_fp = stderr; /* -out-fd FILE * for messages */ strncpy(global.fname_base, FILENAME, - sizeof (global.fname_base)); /* auxiliary cdrom device */ + sizeof (global.fname_base)); /* current file name base */ global.have_forked = 0; /* state variable for clean up */ + global.child_pid = -2; /* state variable for clean up */ global.parent_died = 0; /* state variable for clean up */ - global.audio = -1; /* audio file desc */ - global.cooked_fd = -1; /* cdrom file desc */ - global.no_file = 0; /* flag no_file */ - global.no_infofile = 0; /* flag no_infofile */ - global.no_cddbfile = 0; /* flag no_cddbfile */ - global.quiet = 0; /* flag quiet */ + global.audio = -1; /* audio-out file desc */ + global.cooked_fd = -1; /* cdrom-in file desc */ + global.no_file = 0; /* -N option */ + global.no_infofile = 0; /* -no-infofile option */ + global.no_textfile = 0; /* -no-textfile option */ + global.did_textfile = 0; /* flag: did create textfile */ + global.no_textdefaults = 0; /* -no-textdefaults option */ + global.no_cddbfile = 0; /* flag: do not create cddbfile */ + global.cuefile = 0; /* -cuefile option */ + global.no_hidden_track = 0; /* -no-hidden-track option */ + global.no_fork = 0; /* -no-fork option */ + global.interactive = 0; /* -interactive option */ + global.quiet = 0; /* -quiet option */ global.verbose = SHOW_TOC + SHOW_SUMMARY + SHOW_STARTPOSITIONS + - SHOW_TITLES; /* verbose level */ - global.scsi_silent = 0; + SHOW_TITLES; /* -v verbose level */ + global.scsi_silent = 0; /* SCSI silent flag */ global.scsi_verbose = 0; /* SCSI verbose level */ - global.scanbus = 0; + global.scsi_debug = 0; /* SCSI debug level */ + global.scsi_kdebug = 0; /* SCSI kernel debug level */ + global.scanbus = 0; /* -scanbus option */ + + global.uid = 0; + global.euid = 0; + global.issetuid = FALSE; + + global.sector_offset = 0; + global.start_sector = -1; + global.endtrack = (unsigned int)-1; + global.alltracks = FALSE; + global.maxtrack = FALSE; + global.cd_index = -1; + global.littleendian = -1; + global.rectime = DURATION; + global.int_part = 0; + global.user_sound_device = ""; + global.moreargs = 0; + global.multiname = 0; /* multiple file names given */ global.sh_bits = 0; /* sh_bits: sample bit shift */ global.Remainder = 0; /* remainder */ - global.iloop = 0; /* todo counter */ + global.iloop = 0; /* todo counter (frames) */ global.SkippedSamples = 0; /* skipped samples */ global.OutSampleSize = 0; /* output sample size */ global.channels = CHANNELS; /* output sound channels */ global.nSamplesDoneInTrack = 0; /* written samples in current track */ global.buffers = 4; /* buffers to use */ - global.bufsize = DEF_BUFSIZE; /* The SCSI buffer size */ + global.bufsize = -1L; /* The SCSI buffer size */ global.nsectors = NSECTORS; /* sectors to read in one request */ global.overlap = 1; /* amount of overlapping sectors */ global.useroverlap = -1; /* amt of overl. sect. user override */ @@ -944,29 +1326,51 @@ global.cddbp_port = 0; /* user supplied CDDBP port */ global.illleadout_cd = 0; /* flag if illegal leadout is present */ global.reads_illleadout = 0; /* flag if cdrom drive reads cds with illegal leadouts */ - global.disctitle = NULL; - global.creator = NULL; global.copyright_message = NULL; + global.disctitle = NULL; + global.performer = NULL; + global.songwriter = NULL; + global.composer = NULL; + global.arranger = NULL; + global.message = NULL; + global.closed_info = NULL; memset(global.tracktitle, 0, sizeof (global.tracktitle)); + memset(global.trackperformer, 0, sizeof (global.trackperformer)); + memset(global.tracksongwriter, 0, sizeof (global.tracksongwriter)); + memset(global.trackcomposer, 0, sizeof (global.trackcomposer)); + memset(global.trackarranger, 0, sizeof (global.trackarranger)); + memset(global.trackmessage, 0, sizeof (global.trackmessage)); + memset(global.trackclosed_info, 0, sizeof (global.trackclosed_info)); memset(global.trackindexlist, 0, sizeof (global.trackindexlist)); global.just_the_toc = 0; + global.paranoia_selected = 0; + global.paranoia_flags = 0; + global.paranoia_mode = 0; #ifdef USE_PARANOIA global.paranoia_parms.disable_paranoia = global.paranoia_parms.disable_extra_paranoia = global.paranoia_parms.disable_scratch_detect = - global.paranoia_parms.disable_scratch_repair = 0; + global.paranoia_parms.disable_scratch_repair = + global.paranoia_parms.enable_c2_check = 0; global.paranoia_parms.retries = 20; + global.paranoia_parms.readahead = -1; global.paranoia_parms.overlap = -1; global.paranoia_parms.mindynoverlap = -1; global.paranoia_parms.maxdynoverlap = -1; #endif + global.md5offset = 0; + global.md5blocksize = 0; +#ifdef MD5_SIGNATURES + global.md5count = 0; + global.md5size = 0; +#endif } #if !defined(HAVE_STRCASECMP) || (HAVE_STRCASECMP != 1) -#include -static int strcasecmp __PR((const char *s1, const char *s2)); -static int +#include +LOCAL int strcasecmp __PR((const char *s1, const char *s2)); +LOCAL int strcasecmp(s1, s2) const char *s1; const char *s2; @@ -988,7 +1392,7 @@ } #endif -static int +LOCAL int is_fifo(filename) char *filename; { @@ -1002,7 +1406,7 @@ if (errno == ENOENT) return (0); else - comerr("Error during stat for output file\n"); + comerr(_("Error during stat for output file\n")); } else { if (S_ISFIFO(statstruct.st_mode)) { return (1); @@ -1016,8 +1420,8 @@ #if !defined(HAVE_STRTOUL) || (HAVE_STRTOUL != 1) -static unsigned int strtoul __PR((const char *s1, char **s2, int base)); -static unsigned int +LOCAL unsigned int strtoul __PR((const char *s1, char **s2, int base)); +LOCAL unsigned int strtoul(s1, s2, base) const char *s1; char **s2; @@ -1040,20 +1444,20 @@ } #endif -static unsigned long SectorBurst; +LOCAL unsigned long SectorBurst; #if (SENTINEL > CD_FRAMESIZE_RAW) error block size for overlap check has to be < sector size #endif -static void +LOCAL void switch_to_realtime_priority __PR((void)); #ifdef HAVE_SYS_PRIOCNTL_H #include #include -static void +LOCAL void switch_to_realtime_priority() { pcinfo_t info; @@ -1069,7 +1473,7 @@ */ strcpy(info.pc_clname, "RT"); if (-1 == priocntl(P_PID, pid, PC_GETCID, (void *)&info)) { - errmsg("Cannot get priority class id priocntl(PC_GETCID)\n"); + errmsg(_("Cannot get priority class id priocntl(PC_GETCID)\n")); goto prio_done; } @@ -1083,28 +1487,32 @@ rtparam.rt_tqnsecs = RT_TQDEF; param.pc_cid = info.pc_cid; memmove(param.pc_clparms, &rtparam, sizeof (rtparms_t)); - priv_on(); + if (global.issetuid || global.uid != 0) + priv_on(); needroot(0); if (-1 == priocntl(P_PID, pid, PC_SETPARMS, (void *)¶m)) errmsg( - "Cannot set priority class parameters priocntl(PC_SETPARMS)\n"); + _("Cannot set priority class parameters priocntl(PC_SETPARMS)\n")); prio_done: - priv_off(); + if (global.issetuid || global.uid != 0) + priv_off(); dontneedroot(); } #else -#if defined(_POSIX_PRIORITY_SCHEDULING) && _POSIX_PRIORITY_SCHEDULING -0 >= 0 +#if defined(_POSIX_PRIORITY_SCHEDULING) && _POSIX_PRIORITY_SCHEDULING -0 >= 0 && \ + defined(HAVE_SCHED_SETSCHEDULER) #define USE_POSIX_PRIORITY_SCHEDULING #endif + #ifdef USE_POSIX_PRIORITY_SCHEDULING #include -static void +LOCAL void switch_to_realtime_priority() { #ifdef _SC_PRIORITY_SCHEDULING if (sysconf(_SC_PRIORITY_SCHEDULING) == -1) { - errmsg("WARNING: RR-scheduler not available, disabling.\n"); + errmsg(_("WARNING: RR-scheduler not available, disabling.\n")); } else #endif { @@ -1114,17 +1522,19 @@ sched_fifo_min = sched_get_priority_min(SCHED_FIFO); sched_fifo_max = sched_get_priority_max(SCHED_FIFO); sched_parms.sched_priority = sched_fifo_max - 1; - priv_on(); + if (global.issetuid || global.uid != 0) + priv_on(); needroot(0); if (-1 == sched_setscheduler(getpid(), SCHED_FIFO, &sched_parms) && global.quiet != 1) - errmsg("cannot set posix realtime scheduling policy\n"); - priv_off(); + errmsg(_("Cannot set posix realtime scheduling policy.\n")); + if (global.issetuid || global.uid != 0) + priv_off(); dontneedroot(); } } #else -#if defined(__CYGWIN32__) +#if defined(__CYGWIN32__) || defined(__CYGWIN__) || defined(__MINGW32__) || defined(_MSC_VER) /* * NOTE: Base.h from Cygwin-B20 has a second typedef for BOOL. @@ -1141,14 +1551,13 @@ * NOTE: windows.h defines interface as an alias for struct, this * is used by COM/OLE2, I guess it is class on C++ * We man need to #undef 'interface' + * + * These workarounds are now applied in schily/windows.h */ -#define BOOL WBOOL /* This is the Win BOOL */ -#define format __format /* Avoid format parameter hides global ... */ -#include -#undef format +#include #undef interface -static void +LOCAL void switch_to_realtime_priority() { /* @@ -1159,7 +1568,7 @@ /* * XXX No errno? */ - errmsgno(EX_BAD, "No realtime priority possible.\n"); + errmsgno(EX_BAD, _("No realtime priority possible.\n")); return; } @@ -1171,11 +1580,11 @@ /* * XXX No errno? */ - errmsgno(EX_BAD, "Could not set realtime priority.\n"); + errmsgno(EX_BAD, _("Could not set realtime priority.\n")); } } #else -static void +LOCAL void switch_to_realtime_priority() { } @@ -1190,30 +1599,37 @@ on_exitscsi(status) void *status; { - exit((int)status); + /* + * The double cast is only needed for GCC in LP64 mode. + */ + exit((int)(Intptr_t)status); return (0); } /* wrapper for signal handler exit needed for Mac-OS-X */ -static void exit_wrapper __PR((int status)); +LOCAL void exit_wrapper __PR((int status)); -static void +LOCAL void exit_wrapper(status) int status; { #if defined DEBUG_CLEANUP - fprintf(stderr, "Exit(%d) for %s\n", - status, child_pid == 0 ? "Child" : "Parent"); + fprintf(stderr, _("Exit(%d) for %s\n"), + status, global.child_pid == 0 ? _("Child") : _("Parent")); fflush(stderr); #endif - if (child_pid != 0) { + if (global.child_pid != 0) { SCSI *scgp = get_scsi_p(); - if (scgp->running) { + + /* + * The double cast is only needed for GCC in LP64 mode. + */ + if (scgp != NULL && scgp->running) { scgp->cb_fun = on_exitscsi; - scgp->cb_arg = (void *)status; + scgp->cb_arg = (void *)(Intptr_t)status; } else { - on_exitscsi((void *)status); + on_exitscsi((void *)(Intptr_t)status); } } else { exit(status); @@ -1221,19 +1637,20 @@ } /* signal handler for process communication */ -static void set_nonforked __PR((int status)); +LOCAL void set_nonforked __PR((int status)); /* ARGSUSED */ -static void +LOCAL void set_nonforked(status) int status; { global.parent_died = 1; #if defined DEBUG_CLEANUP - fprintf(stderr, "SIGPIPE received from %s\n.", - child_pid == 0 ? "Child" : "Parent"); + fprintf(stderr, _("SIGPIPE received from %s.\n"), + global.child_pid == 0 ? _("Child") : _("Parent")); #endif - if (child_pid == 0) { +#ifdef HAVE_KILL + if (global.child_pid == 0) { pid_t ppid; /* * Kill the parent too if we are not orphaned. @@ -1242,15 +1659,16 @@ if (ppid > 1) kill(ppid, SIGINT); } else { - kill(child_pid, SIGINT); + kill(global.child_pid, SIGINT); } +#endif exit(SIGPIPE_ERROR); } #ifdef USE_PARANOIA -static struct paranoia_statistics +LOCAL struct paranoia_statistics { long c_sector; long v_sector; @@ -1266,9 +1684,15 @@ int rip_smile_level; unsigned verifies; unsigned reads; + unsigned sectors; unsigned fixup_edges; unsigned fixup_atoms; unsigned readerrs; + unsigned c2errs; + unsigned c2bytes; + unsigned c2secs; + unsigned c2maxerrs; + unsigned c2badsecs; unsigned skips; unsigned overlaps; unsigned scratchs; @@ -1278,9 +1702,9 @@ } *para_stat; -static void paranoia_reset __PR((void)); -static void -paranoia_reset() +LOCAL void paranoia_statreset __PR((void)); +LOCAL void +paranoia_statreset() { para_stat->c_sector = 0; para_stat->v_sector = 0; @@ -1296,7 +1720,13 @@ para_stat->rip_smile_level = 0; para_stat->verifies = 0; para_stat->reads = 0; + para_stat->sectors = 0; para_stat->readerrs = 0; + para_stat->c2errs = 0; + para_stat->c2bytes = 0; + para_stat->c2secs = 0; + para_stat->c2maxerrs = 0; + para_stat->c2badsecs = 0; para_stat->fixup_edges = 0; para_stat->fixup_atoms = 0; para_stat->fixup_droppeds = 0; @@ -1307,9 +1737,9 @@ para_stat->skips = 0; } -static void paranoia_callback __PR((long inpos, int function)); +LOCAL void paranoia_callback __PR((long inpos, int function)); -static void +LOCAL void paranoia_callback(inpos, function) long inpos; int function; @@ -1321,12 +1751,14 @@ case -2: para_stat->v_sector = inpos / CD_FRAMEWORDS; return; + case -1: para_stat->last_heartbeatstate = 8; para_stat->heartbeat = '*'; para_stat->slevel = 0; para_stat->v_sector = inpos / CD_FRAMEWORDS; - break; + break; + case PARANOIA_CB_VERIFY: if (para_stat->stimeout >= 30) { if (para_stat->curoverlap > CD_FRAMEWORDS) { @@ -1336,13 +1768,19 @@ } } para_stat->verifies++; - break; + break; + case PARANOIA_CB_READ: if (inpos / CD_FRAMEWORDS > para_stat->c_sector) { para_stat->c_sector = inpos / CD_FRAMEWORDS; } para_stat->reads++; - break; + break; + + case PARANOIA_CB_SECS: + para_stat->sectors += inpos; + break; + case PARANOIA_CB_FIXUP_EDGE: if (para_stat->stimeout >= 5) { if (para_stat->curoverlap > CD_FRAMEWORDS) { @@ -1352,21 +1790,45 @@ } } para_stat->fixup_edges++; - break; + break; + case PARANOIA_CB_FIXUP_ATOM: if (para_stat->slevel < 3 || para_stat->stimeout > 5) { para_stat->slevel = 3; } para_stat->fixup_atoms++; - break; + break; + case PARANOIA_CB_READERR: para_stat->slevel = 6; para_stat->readerrs++; - break; + break; + + case PARANOIA_CB_C2ERR: + para_stat->slevel = 3; + para_stat->c2errs++; + break; + + case PARANOIA_CB_C2BYTES: + para_stat->c2bytes += inpos; + break; + + case PARANOIA_CB_C2SECS: + para_stat->c2secs += inpos; + break; + + case PARANOIA_CB_C2MAXERRS: + if (inpos > para_stat->c2maxerrs) + para_stat->c2maxerrs = inpos; + if (inpos > 100) + para_stat->c2badsecs++; + break; + case PARANOIA_CB_SKIP: para_stat->slevel = 8; para_stat->skips++; - break; + break; + case PARANOIA_CB_OVERLAP: para_stat->curoverlap = inpos; if (inpos > para_stat->maxoverlap) @@ -1374,25 +1836,29 @@ if (inpos < para_stat->minoverlap) para_stat->minoverlap = inpos; para_stat->overlaps++; - break; + break; + case PARANOIA_CB_SCRATCH: para_stat->slevel = 7; para_stat->scratchs++; - break; + break; + case PARANOIA_CB_DRIFT: if (para_stat->slevel < 4 || para_stat->stimeout > 5) { para_stat->slevel = 4; } para_stat->drifts++; - break; + break; + case PARANOIA_CB_FIXUP_DROPPED: para_stat->slevel = 5; para_stat->fixup_droppeds++; - break; + break; + case PARANOIA_CB_FIXUP_DUPED: para_stat->slevel = 5; para_stat->fixup_dupeds++; - break; + break; } gettimeofday(&thistime, NULL); @@ -1437,19 +1903,27 @@ } #endif -static long lSector; -static long lSector_p2; -static double rate = 44100.0 / UNDERSAMPLING; -static int bits = BITS_P_S; -static char fname[200]; -static const char *audio_type; -static long BeginAtSample; -static unsigned long SamplesToWrite; -static unsigned minover; -static unsigned maxover; +LOCAL long lSector; /* Current sector # */ +LOCAL long lSector_p2; /* Last sector to read */ +LOCAL double rate = 44100.0 / UNDERSAMPLING; +LOCAL int bits = BITS_P_S; +LOCAL char fname[200]; +LOCAL const char *audio_type; +LOCAL long BeginAtSample; +LOCAL unsigned long SamplesToWrite; +LOCAL unsigned minover; +LOCAL unsigned maxover; + +LOCAL unsigned long calc_SectorBurst __PR((void)); +LOCAL void set_newstart __PR((long newstart)); -static unsigned long calc_SectorBurst __PR((void)); -static unsigned long +LOCAL const char * +get_audiotype() +{ + return (audio_type); +} + +LOCAL unsigned long calc_SectorBurst() { unsigned long SectorBurstVal; @@ -1461,6 +1935,26 @@ return (SectorBurstVal); } +LOCAL void +set_newstart(newstart) + long newstart; +{ + lSector = newstart; + global.iloop = (lSector_p2 - lSector) * CD_FRAMESAMPLES; + *nSamplesToDo = global.iloop; + nSamplesDone = 0; + if (global.paranoia_selected) + paranoia_seek(global.cdp, lSector, SEEK_SET); + +#ifdef DEBUG_INTERACTIVE + error("iloop %lu (%lu sects == %lu s) lSector %ld -> %ld\n", + global.iloop, global.iloop/588, global.iloop/588/75, + lSector, lSector_p2); + error("*nSamplesToDo %ld nSamplesDone %ld\n", + *nSamplesToDo, nSamplesDone); +#endif +} + /* * if PERCENTAGE_PER_TRACK is defined, the percentage message will reach * 100% every time a track end is reached or the time limit is reached. @@ -1470,8 +1964,8 @@ */ #define PERCENTAGE_PER_TRACK -static int do_read __PR((myringbuff *p, unsigned *total_unsuccessful_retries)); -static int +LOCAL int do_read __PR((myringbuff *p, unsigned *total_unsuccessful_retries)); +LOCAL int do_read(p, total_unsuccessful_retries) myringbuff *p; unsigned *total_unsuccessful_retries; @@ -1514,7 +2008,7 @@ CD_FRAMESIZE_RAW); } else { errmsgno(EX_BAD, - "E unrecoverable error!\n"); + _("E unrecoverable error!\n")); exit(READ_ERROR); } } @@ -1533,7 +2027,6 @@ retry_count = 0; do { SCSI *scgp = get_scsi_p(); - int retval; #ifdef DEBUG_READS fprintf(stderr, "reading from %lu to %lu, overlap %u\n", @@ -1561,8 +2054,7 @@ */ scgp->silent++; do { - int retval2 = ReadCdRomSub(scgp, - bufferSub, + ReadCdRomSub(scgp, bufferSub, lSector+singles, 1); *eorecording = RealEnd(scgp, bufferSub); @@ -1599,8 +2091,7 @@ } } else { - retval = ReadCdRom(scgp, p->data, lSector, - SectorBurst); + ReadCdRom(scgp, p->data, lSector, SectorBurst); } handle_inputendianess(p->data, SectorBurst * CD_FRAMESAMPLES); @@ -1676,11 +2167,11 @@ lSector += SectorBurst - global.overlap; #if defined PERCENTAGE_PER_TRACK && defined HAVE_FORK_AND_SHAREDMEM - { + if (global.iloop > 0) { int as; - while ((as = Get_StartSector(current_track+1)) != -1 && + while ((as = Get_StartSector(current_track_reading+1)) != -1 && lSector >= as) { - current_track++; + current_track_reading++; } } #endif @@ -1688,10 +2179,10 @@ return (offset); } -static void +LOCAL void print_percentage __PR((unsigned *poper, int c_offset)); -static void +LOCAL void print_percentage(poper, c_offset) unsigned *poper; int c_offset; @@ -1700,32 +2191,35 @@ #ifdef PERCENTAGE_PER_TRACK /* Thomas Niederreiter wants percentage per track */ unsigned start_in_track = max(BeginAtSample, - Get_AudioStartSector(current_track)*CD_FRAMESAMPLES); + Get_AudioStartSector(current_track_writing)*CD_FRAMESAMPLES); per = min(BeginAtSample + (long)*nSamplesToDo, - Get_StartSector(current_track+1)*CD_FRAMESAMPLES) + Get_StartSector(current_track_writing+1)*CD_FRAMESAMPLES) - (long)start_in_track; - per = (BeginAtSample+nSamplesDone - start_in_track)/(per/100); + if (per > 0) + per = (BeginAtSample+nSamplesDone - start_in_track)/(per/100); + else + per = 0; #else per = global.iloop ? (nSamplesDone)/(*nSamplesToDo/100) : 100; #endif if (global.overlap > 0) { - fprintf(stderr, "\r%2d/%2d/%2d/%7d %3d%%", + fprintf(outfp, "\r%2u/%2u/%2u/%7d %3u%%", minover, maxover, global.overlap, c_offset - global.overlap*CD_FRAMESIZE_RAW, per); } else if (*poper != per) { - fprintf(stderr, "\r%3d%%", per); + fprintf(outfp, "\r%3u%%", per); } *poper = per; - fflush(stderr); + fflush(outfp); } -static unsigned long do_write __PR((myringbuff *p)); -static unsigned long +LOCAL unsigned long do_write __PR((myringbuff *p)); +LOCAL unsigned long do_write(p) myringbuff *p; { @@ -1740,16 +2234,15 @@ /* how many samples are wanted? */ InSamples = min((*nSamplesToDo-nSamplesDone), InSamples); - /* when track end is reached, close current file and start a new one */ while ((nSamplesDone < *nSamplesToDo) && (InSamples != 0)) { long unsigned int how_much = InSamples; long int left_in_track; - left_in_track = Get_StartSector(current_track+1) * + left_in_track = Get_StartSector(current_track_writing+1) * CD_FRAMESAMPLES - (int)(BeginAtSample+nSamplesDone); - if (*eorecording != 0 && current_track == cdtracks+1 && + if (*eorecording != 0 && current_track_writing == cdtracks+1 && (*total_segments_read) == (*total_segments_written)+1) { /* * limit, if the actual end of the last track is @@ -1760,8 +2253,8 @@ if (left_in_track < 0) { errmsgno(EX_BAD, - "internal error: negative left_in_track:%ld, current_track=%d\n", - left_in_track, current_track); + _("internal error: negative left_in_track:%ld, current_track_writing=%d\n"), + left_in_track, current_track_writing); } if (bulk) { @@ -1769,17 +2262,10 @@ (unsigned long) left_in_track); } -#ifdef MD5_SIGNATURES - if (global.md5count) { - MD5Update(&global.context, - ((unsigned char *)p->data) +current_offset, - min(global.md5count, how_much)); - global.md5count -= min(global.md5count, how_much); - } -#endif if (SaveBuffer(p->data + current_offset/4, how_much, &nSamplesDone)) { +#ifdef HAVE_KILL if (global.have_forked == 1) { pid_t ppid; /* @@ -1789,6 +2275,7 @@ if (ppid > 1) kill(ppid, SIGINT); } +#endif exit(WRITE_ERROR); } @@ -1804,6 +2291,7 @@ (InSamples - how_much) * 4); } + /* when track end is reached, close current file and start a new one */ if ((unsigned long) left_in_track <= InSamples || SamplesToWrite == 0) { /* @@ -1822,27 +2310,39 @@ (unsigned int) *nSamplesToDo, global.audio_out); } - +#ifdef INFOFILES + if (global.no_infofile == 0) { + write_md5_info(global.fname_base, + current_track_writing, + bulk && global.multiname == 0); + } +#endif if (global.verbose) { #ifdef USE_PARANOIA double f; + double fc2 = 0.0; + + if (global.paranoia_mode & PARANOIA_MODE_C2CHECK) + fc2 = para_stat->c2secs * 100.0 / + (para_stat->sectors * 1.0); #endif print_percentage(&oper, current_offset); - fputc(' ', stderr); + fputc(' ', outfp); + #ifndef THOMAS_SCHAU_MAL if ((unsigned long)left_in_track > InSamples) { - fputs(" incomplete", stderr); + fputs(_(" incomplete"), outfp); } #endif - if (global.tracktitle[current_track] != NULL) { - fprintf(stderr, - " track %2u '%s' recorded", - current_track, - global.tracktitle[current_track]); + if (global.tracktitle[current_track_writing] != NULL) { + fprintf(outfp, + _(" track %2u '%s' recorded"), + current_track_writing, + global.tracktitle[current_track_writing]); } else { - fprintf(stderr, - " track %2u recorded", - current_track); + fprintf(outfp, + _(" track %2u recorded"), + current_track_writing); } #ifdef USE_PARANOIA oper = para_stat->readerrs + para_stat->skips + @@ -1852,55 +2352,69 @@ para_stat->fixup_dupeds + para_stat->drifts; f = (100.0 * oper) / - (((double)global.nSamplesDoneInTrack)/588.0); + (para_stat->sectors * 1.0); - if (para_stat->readerrs) { - fprintf(stderr, - " with audible hard errors"); + if (para_stat->readerrs || para_stat->c2badsecs) { + fprintf(outfp, + _(" with audible hard errors")); + fprintf(outfp, + _(" %u c2badsecs"), para_stat->c2badsecs); } else if ((para_stat->skips) > 0) { - fprintf(stderr, - " with %sretry/skip errors", - f < 2.0 ? "":"audible "); + fprintf(outfp, + _(" with %sretry/skip errors"), + f < 2.0 ? "":_("audible ")); } else if (oper > 0) { oper = f; - fprintf(stderr, " with "); - if (oper < 2) - fprintf(stderr, "minor"); - else if (oper < 10) - fprintf(stderr, "medium"); + fprintf(outfp, _(" with ")); + if (oper < 4) + fprintf(outfp, _("minor")); + else if (oper < 16) + fprintf(outfp, _("medium")); else if (oper < 67) - fprintf(stderr, - "noticable audible"); + fprintf(outfp, + _("noticeable audible")); else if (oper < 100) - fprintf(stderr, - "major audible"); + fprintf(outfp, + _("major audible")); else - fprintf(stderr, - "extreme audible"); - fprintf(stderr, " problems"); + fprintf(outfp, + _("extreme audible")); + fprintf(outfp, _(" problems")); } else { - fprintf(stderr, " successfully"); + fprintf(outfp, _(" successfully")); + } + if (f >= 0.1 || fc2 > 0.1) { + fprintf(outfp, " ("); } if (f >= 0.1) { - fprintf(stderr, - " (%.1f%% problem sectors)", f); + fprintf(outfp, + _("%.1f%% problem sectors"), f); + } + if (fc2 >= 0.1) { + if (f >= 0.1) + fprintf(outfp, ", "); + fprintf(outfp, + _("%.2f%% c2 sectors"), fc2); + } + if (f >= 0.1 || fc2 > 0.1) { + fprintf(outfp, ")"); } #else - fprintf(stderr, " successfully"); + fprintf(outfp, _(" successfully")); #endif if (waitforsignal == 1) { - fprintf(stderr, - ". %d silent samples omitted", + fprintf(outfp, + _(". %d silent samples omitted"), global.SkippedSamples); } - fputs("\n", stderr); + fputs("\n", outfp); if (global.reads_illleadout && *eorecording == 1) { - fprintf(stderr, - "Real lead out at: %ld sectors\n", + fprintf(outfp, + _("Real lead out at: %ld sectors\n"), (*nSamplesToDo+BeginAtSample)/CD_FRAMESAMPLES); } #ifdef USE_PARANOIA @@ -1909,8 +2423,8 @@ print_percentage(&oper, current_offset); if (para_stat->minoverlap == 0x7FFFFFFF) para_stat->minoverlap = 0; - fprintf(stderr, - " %u rderr, %u skip, %u atom, %u edge, %u drop, %u dup, %u drift\n", + fprintf(outfp, + _(" %u rderr, %u skip, %u atom, %u edge, %u drop, %u dup, %u drift"), para_stat->readerrs, para_stat->skips, para_stat->fixup_atoms, @@ -1918,16 +2432,35 @@ para_stat->fixup_droppeds, para_stat->fixup_dupeds, para_stat->drifts); + if (global.paranoia_mode & PARANOIA_MODE_C2CHECK) { + fprintf(outfp, + _(", %u %u c2\n"), para_stat->c2errs, para_stat->c2secs); +#ifdef PARANOIA_DEBUG + fprintf(outfp, + ", %u c2b", para_stat->c2bytes); + fprintf(outfp, + ", %u c2s", para_stat->c2secs); + fprintf(outfp, + ", %u c2m", para_stat->c2maxerrs); + fprintf(outfp, + ", %u c2B\n", para_stat->c2badsecs); +#endif + } else { + fprintf(outfp, "\n"); + } oper = 200; /* force new output */ print_percentage(&oper, current_offset); - fprintf(stderr, - " %u overlap(%.4g .. %.4g)\n", + fprintf(outfp, + _(" %u reads(%.1f%%) %u overlap(%.4g .. %.4g)\n"), + para_stat->reads, + para_stat->sectors*1.0 / + (global.nSamplesDoneInTrack/588.0/100.0), para_stat->overlaps, (float)para_stat->minoverlap / (2352.0/2.0), (float)para_stat->maxoverlap / (2352.0/2.0)); - paranoia_reset(); + paranoia_statreset(); } #endif } @@ -1948,29 +2481,30 @@ '\0'; } - tmp_fname = cut_extension(global.fname_base); - tmp_fname[0] = '\0'; + cut_extension(global.fname_base); if (global.multiname == 0) { - sprintf(fname, "%s_%02u.%s", + snprintf(fname, sizeof (fname), + "%s_%02u.%s", global.fname_base, - current_track+1, + current_track_writing+1, audio_type); } else { - sprintf(fname, "%s.%s", + snprintf(fname, sizeof (fname), + "%s.%s", global.fname_base, audio_type); } OpenAudio(fname, rate, bits, global.channels, - (Get_AudioStartSector(current_track+1) - - Get_AudioStartSector(current_track)) + (Get_AudioStartSector(current_track_writing+1) - + Get_AudioStartSector(current_track_writing)) *CD_FRAMESIZE_RAW, global.audio_out); } /* global.nofile */ } /* if (bulk && SamplesToWrite > 0) */ - current_track++; + current_track_writing++; } /* left_in_track <= InSamples */ InSamples -= how_much; @@ -1985,19 +2519,19 @@ #define PRINT_OVERLAP_INIT \ if (global.verbose) { \ if (global.overlap > 0) \ - fprintf(stderr, "overlap:min/max/cur, jitter, percent_done:\n / / / 0%%"); \ + fprintf(outfp, _("overlap:min/max/cur, jitter, percent_done:\n / / / 0%%")); \ else \ - fputs("percent_done:\n 0%", stderr); \ + fputs(_("percent_done:\n 0%"), outfp); \ } #if defined HAVE_FORK_AND_SHAREDMEM -static void forked_read __PR((void)); +LOCAL void forked_read __PR((void)); /* * This function does all audio cdrom reads * until there is nothing more to do */ -static void +LOCAL void forked_read() { unsigned total_unsuccessful_retries = 0; @@ -2008,8 +2542,44 @@ minover = global.nsectors; + if (global.interactive) { + int r; + +#ifdef DEBUG_INTERACTIVE + error("iloop %lu (%lu sects == %lu s) lSector %ld -> %ld\n", + global.iloop, global.iloop/588, global.iloop/588/75, + lSector, lSector_p2); + error("*nSamplesToDo %ld nSamplesDone %ld\n", + *nSamplesToDo, nSamplesDone); +#endif + lSector = Get_StartSector(FirstAudioTrack()); + lSector_p2 = Get_LastSectorOnCd(cdtracks); + set_newstart(lSector); + + r = parse(&lSector); + if (r < 0) { + set_nonforked(-1); + /* NOTREACHED */ + } + set_newstart(lSector); + } + PRINT_OVERLAP_INIT while (global.iloop) { +/* while (global.interactive || global.iloop) {*/ +/* + * So blockiert es mit get_next_buffer() + get_oldest_buffer() + * mit -interactive nach Ablauf des Auslesens des aktuellen Auftrags. + */ + + if (global.interactive && poll_in() > 0) { + int r = parse(&lSector); + if (r < 0) { + set_nonforked(-1); + /* NOTREACHED */ + } + set_newstart(lSector); + } do_read(get_next_buffer(), &total_unsuccessful_retries); @@ -2018,14 +2588,14 @@ if (total_unsuccessful_retries) { fprintf(stderr, - "%u unsuccessful matches while reading\n", + _("%u unsuccessful matches while reading\n"), total_unsuccessful_retries); } } -static void forked_write __PR((void)); +LOCAL void forked_write __PR((void)); -static void +LOCAL void forked_write() { @@ -2033,7 +2603,8 @@ * don't need these anymore. Good security policy says we get rid * of them ASAP */ - priv_off(); + if (global.issetuid || global.uid != 0) + priv_off(); neverneedroot(); neverneedgroup(); @@ -2042,7 +2613,9 @@ init_parent(); #endif - for (; nSamplesDone < *nSamplesToDo; ) { + for (; global.interactive || nSamplesDone < *nSamplesToDo; ) { + myringbuff *oldest_buffer; + if (*eorecording == 1 && (*total_segments_read) == (*total_segments_written)) break; @@ -2050,7 +2623,10 @@ /* * get oldest buffers */ - nSamplesDone = do_write(get_oldest_buffer()); + oldest_buffer = get_oldest_buffer(); + if (oldest_buffer == NULL) + break; + nSamplesDone = do_write(oldest_buffer); drop_buffer(); } @@ -2062,34 +2638,60 @@ * there is no fork/thread_create system call). * This means reads and writes have to wait for each other to complete. */ -static void nonforked_loop __PR((void)); +LOCAL void nonforked_loop __PR((void)); -static void +LOCAL void nonforked_loop() { unsigned total_unsuccessful_retries = 0; minover = global.nsectors; - PRINT_OVERLAP_INIT + if (global.interactive) { + int r; + + lSector = Get_StartSector(FirstAudioTrack()); + lSector_p2 = Get_LastSectorOnCd(cdtracks); + set_newstart(lSector); + + r = parse(&lSector); + if (r < 0) { + return; + } + set_newstart(lSector); + } + + PRINT_OVERLAP_INIT while (global.iloop) { + myringbuff *oldest_buffer; + + if (global.interactive && poll_in() > 0) { + int r = parse(&lSector); + if (r < 0) { + break; + } + set_newstart(lSector); + } do_read(get_next_buffer(), &total_unsuccessful_retries); - do_write(get_oldest_buffer()); + oldest_buffer = get_oldest_buffer(); + if (oldest_buffer == NULL) + break; + do_write(oldest_buffer); } if (total_unsuccessful_retries) { - fprintf(stderr, "%u unsuccessful matches while reading\n", total_unsuccessful_retries); + fprintf(stderr, _("%u unsuccessful matches while reading\n"), total_unsuccessful_retries); } } -void verbose_usage __PR((void)); +LOCAL void verbose_usage __PR((void)); -void +LOCAL void verbose_usage() { - fputs("\ + fputs(_("\ help lists all verbose options.\n\ disable disables verbose mode.\n\ all enables all verbose options.\n\ @@ -2097,37 +2699,43 @@ summary display a summary of track parameters.\n\ indices retrieve/display index positions.\n\ catalog retrieve/display media catalog number.\n\ + mcn retrieve/display media catalog number.\n\ trackid retrieve/display international standard recording code.\n\ + isrc retrieve/display international standard recording code.\n\ sectors display the start sectors of each track.\n\ titles display any known track titles.\n\ -", stderr); + audio-tracks list the audio tracks and their start sectors.\n\ +"), stderr); } #ifdef USE_PARANOIA -void paranoia_usage __PR((void)); +LOCAL void paranoia_usage __PR((void)); -void +LOCAL void paranoia_usage() { /* BEGIN CSTYLED */ - fputs("\ + fputs(_("\ help lists all paranoia options.\n\ disable disables paranoia mode. Paranoia is still being used.\n\ no-verify switches verify off, and overlap on.\n\ retries=amount set the number of maximum retries per sector.\n\ - overlap=amount set the number of sectors used for statical paranoia overlap.\n\ - minoverlap=amt set the min. number of sectors used for dynamic paranoia overlap.\n\ - maxoverlap=amt set the max. number of sectors used for dynamic paranoia overlap.\n\ -", + readahead=amount set the number of sectors to use for the read ahead buffer.\n\ + overlap=amount set the number of sectors used for statical overlap.\n\ + minoverlap=amt set the min. number of sectors used for dynamic overlap.\n\ + maxoverlap=amt set the max. number of sectors used for dynamic overlap.\n\ + c2check check C2 pointers from drive to rate quality.\n\ + proof alias: minoverlap=20,retries=200,readahead=600,c2check.\n\ +"), stderr); /* END CSTYLED */ } #endif -int +LOCAL int handle_verbose_opts __PR((char *optstr, long *flagp)); -int +LOCAL int handle_verbose_opts(optstr, flagp) char *optstr; long *flagp; @@ -2135,6 +2743,7 @@ char *ep; char *np; int optlen; + BOOL not = FALSE; *flagp = 0; while (*optstr) { @@ -2145,7 +2754,15 @@ optlen = strlen(optstr); np = optstr + optlen; } - if (strncmp(optstr, "toc", optlen) == 0) { + if (optstr[0] == '!') { + optstr++; + optlen--; + not = TRUE; + } + if (strncmp(optstr, "not", optlen) == 0 || + strncmp(optstr, "!", optlen) == 0) { + not = TRUE; + } else if (strncmp(optstr, "toc", optlen) == 0) { *flagp |= SHOW_TOC; } else if (strncmp(optstr, "summary", optlen) == 0) { *flagp |= SHOW_SUMMARY; @@ -2153,12 +2770,22 @@ *flagp |= SHOW_INDICES; } else if (strncmp(optstr, "catalog", optlen) == 0) { *flagp |= SHOW_MCN; + } else if (strncmp(optstr, "MCN", optlen) == 0) { + *flagp |= SHOW_MCN; + } else if (strncmp(optstr, "mcn", optlen) == 0) { + *flagp |= SHOW_MCN; } else if (strncmp(optstr, "trackid", optlen) == 0) { *flagp |= SHOW_ISRC; + } else if (strncmp(optstr, "ISRC", optlen) == 0) { + *flagp |= SHOW_ISRC; + } else if (strncmp(optstr, "isrc", optlen) == 0) { + *flagp |= SHOW_ISRC; } else if (strncmp(optstr, "sectors", optlen) == 0) { *flagp |= SHOW_STARTPOSITIONS; } else if (strncmp(optstr, "titles", optlen) == 0) { *flagp |= SHOW_TITLES; + } else if (strncmp(optstr, "audio-tracks", optlen) == 0) { + *flagp |= SHOW_JUSTAUDIOTRACKS; } else if (strncmp(optstr, "all", optlen) == 0) { *flagp |= SHOW_MAX; } else if (strncmp(optstr, "disable", optlen) == 0) { @@ -2173,24 +2800,26 @@ arg <= SHOW_MAX) { *flagp |= arg; errmsgno(EX_BAD, - "Warning: numerical parameters for -v are no more supported in the next releases!\n"); + _("Warning: numerical parameters for -v are no more supported in the next releases!\n")); } else { errmsgno(EX_BAD, - "Unknown option '%s'.\n", optstr); + _("Unknown option '%s'.\n"), optstr); verbose_usage(); exit(SYNTAX_ERROR); } } optstr = np; } + if (not) + *flagp = (~ *flagp) & SHOW_MAX; return (1); } -int +LOCAL int handle_paranoia_opts __PR((char *optstr, long *flagp)); -int +LOCAL int handle_paranoia_opts(optstr, flagp) char *optstr; long *flagp; @@ -2216,6 +2845,14 @@ if (rets >= 0) { global.paranoia_parms.retries = rets; } + } else if (strncmp(optstr, "readahead=", min(10, optlen)) == 0) { + char *eqp = strchr(optstr, '='); + int readahead; + + astoi(eqp+1, &readahead); + if (readahead >= 0) { + global.paranoia_parms.readahead = readahead; + } } else if (strncmp(optstr, "overlap=", min(8, optlen)) == 0) { char *eqp = strchr(optstr, '='); int rets; @@ -2246,19 +2883,35 @@ global.paranoia_parms.disable_extra_paranoia = 1; } else if (strncmp(optstr, "disable", optlen) == 0) { global.paranoia_parms.disable_paranoia = 1; + } else if (strncmp(optstr, "c2check", optlen) == 0) { + global.paranoia_parms.enable_c2_check = 1; } else if (strncmp(optstr, "help", optlen) == 0) { paranoia_usage(); exit(NO_ERROR); + } else if (strncmp(optstr, "proof", optlen) == 0) { + *flagp = 1; + global.paranoia_parms.mindynoverlap = -1; + global.paranoia_parms.retries = 200; + global.paranoia_parms.readahead = 600; +#define __should_we__ +#ifdef __should_we__ + /* + * c2check may cause some drives to become unable + * to read hidden tracks. + */ + global.paranoia_parms.enable_c2_check = 1; +#endif } else { - errmsgno(EX_BAD, "Unknown option '%s'.\n", optstr); + errmsgno(EX_BAD, _("Unknown option '%s'.\n"), optstr); paranoia_usage(); exit(SYNTAX_ERROR); } optstr = np; } + global.paranoia_selected = TRUE; return (1); #else - errmsgno(EX_BAD, "lib paranoia support is not configured!\n"); + errmsgno(EX_BAD, _("lib paranoia support is not configured!\n")); return (0); #endif } @@ -2267,28 +2920,51 @@ /* * and finally: the MAIN program */ -int +EXPORT int main(argc, argv) int argc; char *argv[]; { long lSector_p1; - long sector_offset = 0; - unsigned long endtrack = 1; - double rectime = DURATION; - int cd_index = -1; - double int_part; - int littleendian = -1; - char *int_name; -static char *user_sound_device = ""; char *env_p; +#if defined(USE_NLS) + char *dir; +#endif int tracks_included; - int moreargs; - int_name = DEF_INTERFACE; audio_type = AUDIOTYPE; + +#ifdef HAVE_SOLARIS_PPRIV + /* + * Try to gain additional privs on Solaris + */ + do_pfexec(argc, argv, + PRIV_FILE_DAC_READ, + PRIV_SYS_DEVICES, + PRIV_PROC_PRIOCNTL, + PRIV_NET_PRIVADDR, + NULL); +#endif save_args(argc, argv); +#if defined(USE_NLS) + (void) setlocale(LC_ALL, ""); +#if !defined(TEXT_DOMAIN) /* Should be defined by cc -D */ +#define TEXT_DOMAIN "cdda2wav" /* Use this only if it weren't */ +#endif + dir = searchfileinpath("share/locale", F_OK, + SIP_ANY_FILE|SIP_NO_PATH, NULL); + if (dir) + (void) bindtextdomain(TEXT_DOMAIN, dir); + else +#if defined(PROTOTYPES) && defined(INS_BASE) + (void) bindtextdomain(TEXT_DOMAIN, INS_BASE "/share/locale"); +#else + (void) bindtextdomain(TEXT_DOMAIN, "/usr/share/locale"); +#endif + (void) textdomain(TEXT_DOMAIN); +#endif + /* * init global variables */ @@ -2305,9 +2981,38 @@ if (!am_i_cdda2wav) global.verbose = SHOW_JUSTAUDIOTRACKS; } + /* - * Control those set-id privileges... + * Control those set-id and privileges... + * + * At this point, we should have the needed privileges, either because: + * + * 1) We have been called by a privileged user (eg. root) + * 2) This is a suid-root process + * 3) This is a process that did call pfexec to gain privs + * 4) This is a process that has been called via pfexec + * 5) This is a process that gained privs via fcaps + * + * Case (1) is the only case where whe should not give up privileges + * because people would not expect it and because there will be no + * privilege escalation in this process. */ + global.uid = getuid(); + global.euid = geteuid(); +#ifdef HAVE_ISSETUGID + global.issetuid = issetugid(); +#else + global.issetuid = global.uid != global.euid; +#endif + if (global.issetuid || global.uid != 0) { + /* + * If this is a suid-root process or if the real uid of + * this process is not root, we may have gained privileges + * from suid-root or pfexec and need to manage privileges in + * order to prevent privilege escalations for the user. + */ + priv_init(); + } initsecurity(); env_p = getenv("CDDA_DEVICE"); @@ -2325,1111 +3030,1450 @@ global.cddbp_port = env_p; } -{ - int cac; - char *const*cav; + gargs(argc, argv); - BOOL version = FALSE; - BOOL help = FALSE; - char *channels = NULL; - int irate = -1; - char *divider = NULL; - char *trackspec = NULL; - char *duration = NULL; + /* + * The check has been introduced as some Linux distributions miss the + * skills to perceive the necessity for the needed privileges. So we + * warn which features are impaired by actually missing privileges. + */ + if (global.issetuid || global.uid != 0) + priv_on(); + needroot(0); + if (!priv_eff_priv(SCHILY_PRIV_FILE_DAC_READ)) + priv_warn("file read", "You will not be able to open all needed devices."); +#ifndef __SUNOS5 + /* + * Due to a design bug in the Solaris USCSI ioctl, we don't need + * PRIV_FILE_DAC_WRITE to send SCSI commands and most installations + * probably don't grant PRIV_FILE_DAC_WRITE. Once we need /dev/scg*, + * we would need to test for PRIV_FILE_DAC_WRITE also. + */ + if (!priv_eff_priv(SCHILY_PRIV_FILE_DAC_WRITE)) + priv_warn("file write", "You will not be able to open all needed devices."); +#endif + if (!priv_eff_priv(SCHILY_PRIV_SYS_DEVICES)) + priv_warn("device", + "You may not be able to send all needed SCSI commands, this my cause various unexplainable problems."); + if (!priv_eff_priv(SCHILY_PRIV_PROC_PRIOCNTL)) + priv_warn("priocntl", "You may get jitter."); + if (!priv_eff_priv(SCHILY_PRIV_NET_PRIVADDR)) + priv_warn("network", "You will not be able to do remote SCSI."); + if (global.issetuid || global.uid != 0) + priv_off(); + dontneedroot(); - char *oendianess = NULL; - char *cendianess = NULL; - int cddbp = -1; - BOOL stereo = FALSE; - BOOL mono = FALSE; - BOOL domax = FALSE; - BOOL dump_rates = FALSE; - int userverbose = -1; - long paraopts = 0; +#define SETSIGHAND(PROC, SIG, SIGNAME) if (signal(SIG, PROC) == SIG_ERR) \ + { errmsg(_("Cannot set signal %s handler.\n"), SIGNAME); exit(SETSIG_ERROR); } +#ifdef SIGINT + SETSIGHAND(exit_wrapper, SIGINT, "SIGINT") +#endif +#ifdef SIGQUIT + SETSIGHAND(exit_wrapper, SIGQUIT, "SIGQUIT") +#endif +#ifdef SIGTERM + SETSIGHAND(exit_wrapper, SIGTERM, "SIGTERM") +#endif +#ifdef SIGHUP + SETSIGHAND(exit_wrapper, SIGHUP, "SIGHUP") +#endif +#ifdef SIGPIPE + SETSIGHAND(set_nonforked, SIGPIPE, "SIGPIPE") +#endif - cac = argc; - cav = argv; - cac--; - cav++; - if (getargs(&cac, &cav, opts, - &global.paranoia_selected, - handle_paranoia_opts, ¶opts, - &version, - &help, &help, + /* setup interface and open cdrom device */ + /* + * request sychronization facilities and shared memory + */ + SetupInterface(); - &global.no_file, &global.no_file, + /* + * use global.useroverlap to set our overlap + */ + if (global.useroverlap != -1) + global.overlap = global.useroverlap; - &dump_rates, &dump_rates, - &bulk, &bulk, &bulk, - &global.scsi_verbose, &global.scsi_verbose, + /* + * check for more valid option combinations + */ + if (global.nsectors < 1+global.overlap) { + errmsgno(EX_BAD, + _("Warning: Setting #nsectors to minimum of %d, due to jitter correction!\n"), + global.overlap+1); + global.nsectors = global.overlap+1; + } - &global.findminmax, &global.findminmax, - &global.findmono, &global.findmono, - &global.no_infofile, &global.no_infofile, + if (global.overlap > 0 && global.buffers < 2) { + errmsgno(EX_BAD, + _("Warning: Setting #buffers to minimum of 2, due to jitter correction!\n")); + global.buffers = 2; + } - &global.deemphasize, &global.deemphasize, - &global.just_the_toc, &global.just_the_toc, - &global.scsi_silent, &global.scsi_silent, + /* + * Value of 'nsectors' must be defined here + */ + global.shmsize = 0; +#ifdef USE_PARANOIA + while (global.shmsize < sizeof (struct paranoia_statistics)) + global.shmsize += global.pagesize; +#endif +#ifdef MD5_SIGNATURES + { int i = 0; + while (i < sizeof (MD5_CTX)) + i += global.pagesize; + global.shmsize += i; + } +#endif + global.shmsize += 10*global.pagesize; /* XXX Der Speicherfehler ist nicht in libparanoia sondern in cdda2wav :-( */ + global.shmsize += HEADER_SIZE + ENTRY_SIZE_PAGE_AL * global.buffers; - &global.cddbp_server, &global.cddbp_port, - &global.scanbus, - &global.dev_name, &global.dev_name, &global.dev_name, - getnum, &global.bufsize, - &global.aux_name, &global.aux_name, - &int_name, &int_name, - &audio_type, &audio_type, +#if defined(HAVE_FORK_AND_SHAREDMEM) + /* + * The (void *) cast is to avoid a GCC warning like: + * warning: dereferencing type-punned pointer will break + * strict-aliasing rules + * which does not apply to this code. (void *) introduces a compatible + * intermediate type in the cast list. + */ + he_fill_buffer = request_shm_sem(global.shmsize, + (unsigned char **)(void *)&he_fill_buffer); + if (he_fill_buffer == NULL) { + errmsgno(EX_BAD, _("No shared memory available!\n")); + exit(SHMMEM_ERROR); + } +#else /* do not have fork() and shared memory */ + he_fill_buffer = malloc(global.shmsize); + if (he_fill_buffer == NULL) { + errmsg(_("No buffer memory available!\n")); + exit(NOMEM_ERROR); + } +#endif +#ifdef USE_PARANOIA + { + int i = 0; + char *ptr = (char *)he_fill_buffer; - &oendianess, &oendianess, - &cendianess, &cendianess, - &global.userspeed, &global.userspeed, + para_stat = (struct paranoia_statistics *)he_fill_buffer; + while (i < sizeof (struct paranoia_statistics)) { + i += global.pagesize; + ptr += global.pagesize; + global.shmsize -= global.pagesize; + } + he_fill_buffer = (myringbuff **)ptr; + } +#endif +#ifdef MD5_SIGNATURES + { + int i = 0; + char *ptr = (char *)he_fill_buffer; - &global.playback_rate, &global.playback_rate, - &global.md5blocksize, &global.md5blocksize, - &global.useroverlap, &global.useroverlap, - &user_sound_device, &user_sound_device, + global.context = (MD5_CTX*)he_fill_buffer; + while (i < sizeof (MD5_CTX)) + i += global.pagesize; + ptr += i; + global.shmsize -= i; - &cddbp, &cddbp, - &channels, &channels, - &bits, &bits, - &irate, &irate, - &global.gui, &global.gui, + he_fill_buffer = (myringbuff **)ptr; + } +#endif - ÷r, ÷r, - &trackspec, &trackspec, - &cd_index, &cd_index, - &duration, &duration, - §or_offset, §or_offset, + if (global.verbose != 0) { + fprintf(outfp, + _("%u bytes buffer memory requested, transfer size %ld bytes, %u buffers, %u sectors\n"), + global.shmsize, global.bufsize, global.buffers, global.nsectors); + } - &global.nsectors, &global.nsectors, - handle_verbose_opts, &userverbose, - handle_verbose_opts, &userverbose, - &global.buffers, &global.buffers, + /* + * initialize pointers into shared memory segment + */ + last_buffer = he_fill_buffer + 1; + total_segments_read = (unsigned long *) (last_buffer + 1); + total_segments_written = total_segments_read + 1; + child_waits = (int *) (total_segments_written + 1); + parent_waits = child_waits + 1; + in_lendian = parent_waits + 1; + eorecording = in_lendian + 1; + *total_segments_read = *total_segments_written = 0; + nSamplesToDo = (unsigned long *)(eorecording + 1); + *eorecording = 0; + *in_lendian = global.in_lendian; - &stereo, &stereo, - &mono, &mono, - &waitforsignal, &waitforsignal, - &global.echo, &global.echo, - &global.quiet, &global.quiet, - &domax, &domax) < 0) { - errmsgno(EX_BAD, "Bad Option: %s.\n", cav[0]); - fputs("use 'cdda2wav -help' to get more information.\n", - stderr); - exit(SYNTAX_ERROR); + set_total_buffers(global.buffers, sem_id); + + +#if defined(HAVE_SEMGET) && defined(USE_SEMAPHORES) + atexit(free_sem); +#endif + + /* + * set input endian default + */ + if (global.littleendian != -1) + *in_lendian = global.littleendian; + + /* + * get table of contents + */ + cdtracks = ReadToc(); + if (cdtracks == 0) { + errmsgno(EX_BAD, + _("No track in table of contents! Aborting...\n")); + exit(MEDIA_ERROR); + } else if (global.maxtrack) { + global.endtrack = cdtracks; } - if (getfiles(&cac, &cav, opts) == 0) - /* No more file type arguments */; - moreargs = cav - argv; - if (version) { -#ifdef OLD_VERSION_PRINT - fputs("cdda2wav version ", stderr); - fputs(VERSION, stderr); - fputs(VERSION_OS, stderr); - fputs("\n", stderr); -#else + + calc_cddb_id(); + calc_cdindex_id(); + +#if 1 + Check_Toc(); +#endif + + if (ReadTocText != NULL && FirstAudioTrack() != -1) { + ReadTocText(get_scsi_p()); + handle_cdtext(); /* - * Make the version string similar for all cdrtools programs. + * Starting from here, we cannot issue any SCSI command that + * overwrites the buffer used to read on the CD-Text data until + * FixupTOC() has been called. */ - printf("cdda2wav %s (%s-%s-%s) Copyright (C) 1993-2004 Heiko Eißfeldt (C) 2004-2007 Jörg Schilling\n", - VERSION, - HOST_CPU, HOST_VENDOR, HOST_OS); -#endif - exit(NO_ERROR); } - if (help) { - usage(); - } - if (!global.scanbus) - cdr_defaults(&global.dev_name, NULL, NULL, NULL); - if (dump_rates) { /* list available rates */ - int ii; + if (global.verbose == SHOW_JUSTAUDIOTRACKS) { + unsigned int z; - /* BEGIN CSTYLED */ - fputs("\ -Available rates are:\n\ -Rate Divider Rate Divider Rate Divider Rate Divider\n\ -", - stderr); - /* END CSTYLED */ - for (ii = 1; ii <= 44100 / 880 / 2; ii++) { - long i2 = ii; - fprintf(stderr, "%7.1f %2ld %7.1f %2ld.5 ", - 44100.0/i2, i2, 44100.0/(i2+0.5), i2); - i2 += 25; - fprintf(stderr, "%7.1f %2ld %7.1f %2ld.5\n", - 44100.0/i2, i2, 44100.0/(i2+0.5), i2); - i2 -= 25; + /* + * XXX We did not check for hidden Track here + */ + for (z = 0; z <= cdtracks; z++) { + if (Get_Datatrack(z) == 0) { + printf("%02d\t%06ld\n", + Get_Tracknumber(z), + Get_AudioStartSector(z)); + } } exit(NO_ERROR); } - if (channels) { - if (*channels == 's') { - global.channels = 2; - global.swapchannels = 1; - } else { - global.channels = strtol(channels, NULL, 10); - } - } - if (irate >= 0) { - rate = irate; - } - if (divider) { - double divider_d; - divider_d = strtod(divider, NULL); - if (divider_d > 0.0) { - rate = 44100.0 / divider_d; - } else { - errmsgno(EX_BAD, - "E option -divider requires a nonzero, positive argument.\nSee -dump-rates.\n"); - exit(SYNTAX_ERROR); - } - } - if (trackspec) { - char * endptr; - char * endptr2; - track = strtoul(trackspec, &endptr, 10); - endtrack = strtoul(endptr, &endptr2, 10); - if (endptr2 == endptr) { - endtrack = track; - } else if (track == endtrack) { - bulk = -1; - } - } - if (duration) { - char *end_ptr = NULL; - rectime = strtod(duration, &end_ptr); - if (*end_ptr == 'f') { - rectime = rectime / 75.0; - /* TODO: add an absolute end of recording. */ -#if 0 - } else if (*end_ptr == 'F') { - rectime = rectime / 75.0; + + if (global.verbose != 0) { + fputs(_("#Cdda2wav version "), outfp); + fputs(VERSION, outfp); + fputs(VERSION_OS, outfp); +#if defined USE_POSIX_PRIORITY_SCHEDULING || defined HAVE_SYS_PRIOCNTL_H + fputs(_(", real time sched."), outfp); #endif - } else if (*end_ptr != '\0') { - rectime = -1.0; - } - } - if (oendianess) { - if (strcasecmp(oendianess, "little") == 0) { - global.outputendianess = LITTLE; - } else if (strcasecmp(oendianess, "big") == 0) { - global.outputendianess = BIG; - } else { - usage2("Wrong parameter '%s' for option -E", oendianess); - } - } - if (cendianess) { - if (strcasecmp(cendianess, "little") == 0) { - littleendian = 1; - } else if (strcasecmp(cendianess, "big") == 0) { - littleendian = 0; - } else if (strcasecmp(cendianess, "guess") == 0) { - littleendian = -2; - } else { - usage2("Wrong parameter '%s' for option -C", cendianess); - } - } - if (cddbp >= 0) { - global.cddbp = 1 + cddbp; - } - if (stereo) { - global.channels = 2; - } - if (mono) { - global.channels = 1; - global.need_hostorder = 1; - } - if (global.echo) { -#ifdef ECHO_TO_SOUNDCARD - if (global.playback_rate != 100) { - RestrictPlaybackRate(global.playback_rate); - } - global.need_hostorder = 1; -#else - errmsgno(EX_BAD, - "There is no sound support compiled into %s.\n", - argv[0]); - global.echo = 0; +#if defined ECHO_TO_SOUNDCARD + fputs(_(", soundcard"), outfp); #endif - } - if (global.quiet) { - global.verbose = 0; - } - if (domax) { - global.channels = 2; bits = 16; rate = 44100; - } - if (global.findminmax) { - global.need_hostorder = 1; - } - if (global.deemphasize) { - global.need_hostorder = 1; - } - if (global.just_the_toc) { - global.verbose = SHOW_MAX; - bulk = 1; - } - if (global.gui) { -#ifdef Thomas_will_es - global.no_file = 1; - global.no_infofile = 1; - global.verbose = SHOW_MAX; +#if defined USE_PARANOIA + fputs(_(", libparanoia"), outfp); #endif - global.no_cddbfile = 1; - } - if (global.no_file) { - global.no_infofile = 1; - global.no_cddbfile = 1; + fputs(_(" support\n"), outfp); } - if (global.no_infofile) { - global.no_cddbfile = 1; + + /* + * Also handles the CD-Text or CD-Extra information that has been read + * avove with ReadTocText(). + */ + FixupTOC(cdtracks + 1); + + if (track == (unsigned int)-1) { + if (useHiddenTrack() && (bulk || global.alltracks)) + global.endtrack = track = 0; + else + global.endtrack = track = 1; + if (bulk || global.alltracks) + global.endtrack = cdtracks; } - if (global.md5blocksize) { -#ifdef MD5_SIGNATURES - errmsgno(EX_BAD, - "MD5 signatures are currently broken! Sorry\n"); + +#if 0 + if (!global.paranoia_selected) { + error("NICE\n"); + /* + * try to get some extra kicks + */ + if (global.issetuid || global.uid != 0) + priv_on(); + needroot(0); +#if defined HAVE_SETPRIORITY + setpriority(PRIO_PROCESS, 0, -20); #else - errmsgno(EX_BAD, - "The option MD5 signatures is not configured!\n"); +#if defined(HAVE_NICE) && (HAVE_NICE == 1) + nice(-NZERO); #endif - } - if (user_sound_device) { -#ifndef ECHO_TO_SOUNDCARD - errmsgno(EX_BAD, "There is no sound support configured!\n"); #endif + if (global.issetuid || global.uid != 0) + priv_off(); + dontneedroot(); } - if (global.paranoia_selected) { - global.useroverlap = 0; - } - if (userverbose >= 0) { - global.verbose = userverbose; - } -} +#endif /* - * check all parameters + * switch cdrom to audio mode */ - if (global.bufsize < CD_FRAMESIZE_RAW) { - usage2("Incorrect transfer size setting: %d", global.bufsize); - } - - if (global.buffers < 1) { - usage2("Incorrect buffer setting: %d", global.buffers); - } + EnableCdda(get_scsi_p(), 1, CD_FRAMESIZE_RAW); - if (global.nsectors < 1) { - usage2("Incorrect nsectors setting: %d", global.nsectors); - } + atexit(CloseAll); - if (global.verbose < 0 || global.verbose > SHOW_MAX) { - usage2("Incorrect verbose level setting: %d", global.verbose); + DisplayToc(); + if (FirstAudioTrack() == -1) { + if (no_disguised_audiotracks()) { + FatalError(EX_BAD, + _("This disk has no audio tracks.\n")); + } } - if (global.verbose == 0) - global.quiet = 1; - if (rectime < 0.0) { - usage2("Incorrect recording time setting: %d.%02d", - (int)rectime, (int)(rectime*100+0.5) % 100); + /* + * check if start track is in range + */ + if (track < 1 || track > cdtracks) { + if (!(track == 0 && useHiddenTrack())) + usage2(_("Incorrect start track setting: %d\n"), track); } - if (global.channels != 1 && global.channels != 2) { - usage2("Incorrect channel setting: %d", global.channels); + /* + * check if end track is in range + */ + if (global.endtrack < track || global.endtrack > cdtracks) { + usage2(_("Incorrect end track setting: %ld\n"), global.endtrack); } - if (bits != 8 && bits != 12 && bits != 16) { - usage2("Incorrect bits_per_sample setting: %d", bits); - } + /* + * Find track that is related to the absolute sector offset. + */ + if (global.start_sector != -1) { + int t; - if (rate < 827.0 || rate > 44100.0) { - usage2("Incorrect sample rate setting: %d.%02d", - (int)rate, ((int)rate*100) % 100); + for (t = 1; t <= cdtracks; t++) { + lSector = Get_AudioStartSector(t); + lSector_p1 = Get_EndSector(t) + 1; + if (lSector < 0) + continue; + if (global.start_sector >= lSector && + global.start_sector < lSector_p1) { + track = t; + global.sector_offset = global.start_sector - lSector; + } else if (t == 1 && useHiddenTrack() && + global.start_sector >= 0 && + global.start_sector < lSector) { + lSector = global.start_sector; + track = 0; + } + if (bulk || global.alltracks) + global.endtrack = t; + } } - int_part = (double)(long) (2*44100.0 / rate); + do { + if (track == 0) { + lSector = 0; + lSector_p1 = Get_AudioStartSector(1); + } else { + lSector = Get_AudioStartSector(track); + lSector_p1 = Get_EndSector(track) + 1; + } + if (lSector < 0) { + if (bulk == 0 && !global.alltracks) { + FatalError(EX_BAD, + _("Track %u not found.\n"), track); + } else { + fprintf(outfp, + _("Skipping data track %u...\n"), track); + if (global.endtrack == track) + global.endtrack++; + track++; + } + } + } while ((bulk != 0 || global.alltracks) && track <= cdtracks && lSector < 0); - if (2*44100.0 / rate - int_part >= 0.5) { - int_part += 1.0; - fprintf(stderr, - "Nearest available sample rate is %d.%02d Hertz\n", - 2*44100 / (int)int_part, - (2*4410000 / (int)int_part) % 100); - } - Halved = ((int) int_part) & 1; - rate = 2*44100.0 / int_part; - undersampling = (int) int_part / 2.0; - samples_to_do = undersampling; + Read_MCN_ISRC(track, global.endtrack); - if (strcmp((char *)int_name, "generic_scsi") == 0) { - interface = GENERIC_SCSI; - } else if (strcmp((char *)int_name, "cooked_ioctl") == 0) { - interface = COOKED_IOCTL; - } else { - usage2("Incorrect interface setting: %s", int_name); + if ((global.illleadout_cd == 0 || global.reads_illleadout != 0) && + global.cd_index != -1) { + if (global.verbose && !global.quiet) { + global.verbose |= SHOW_INDICES; + } + global.sector_offset += ScanIndices(track, global.cd_index, bulk || global.alltracks); + } else { + global.cd_index = 1; + if (global.deemphasize || (global.verbose & SHOW_INDICES)) { + ScanIndices(track, global.cd_index, bulk || global.alltracks); + } } + lSector += global.sector_offset; /* - * check * init audio file + * check against end sector of track */ - if (strncmp(audio_type, "wav", 3) == 0) { - global.audio_out = &wavsound; - } else if (strncmp(audio_type, "sun", 3) == 0 || - strncmp(audio_type, "au", 2) == 0) { - /* - * Enhanced compatibility - */ - audio_type = "au"; - global.audio_out = &sunsound; - } else if (strncmp(audio_type, "cdr", 3) == 0|| - strncmp(audio_type, "raw", 3) == 0) { - global.audio_out = &rawsound; - } else if (strncmp(audio_type, "aiff", 4) == 0) { - global.audio_out = &aiffsound; - } else if (strncmp(audio_type, "aifc", 4) == 0) { - global.audio_out = &aifcsound; -#ifdef USE_LAME - } else if (strncmp(audio_type, "mp3", 3) == 0) { - global.audio_out = &mp3sound; - if (!global.quiet) { - unsigned char Lame_version[20]; + if (lSector >= lSector_p1) { + fprintf(stderr, + _("W Sector offset %ld exceeds track size (ignored)\n"), + global.sector_offset); + lSector -= global.sector_offset; + } - fetch_lame_version(Lame_version); - fprintf(stderr, - "Using LAME version %s.\n", Lame_version); - } - if (bits < 9) { - bits = 16; - fprintf(stderr, - "Warning: sample size forced to 16 bit for MP3 format.\n"); - } -#endif /* USE_LAME */ - } else { - usage2("Incorrect audio type setting: %3s", audio_type); + if (lSector < 0L) { + fputs(_("Negative start sector! Set to zero.\n"), stderr); + lSector = 0L; } - if (bulk == -1) - bulk = 0; - - global.need_big_endian = global.audio_out->need_big_endian; - if (global.outputendianess != NONE) - global.need_big_endian = global.outputendianess == BIG; + lSector_p2 = Get_LastSectorOnCd(track); + if ((bulk == 1 || global.alltracks) && track == global.endtrack && global.rectime == 0.0) + global.rectime = 99999.0; + if (global.rectime == 0.0) { + /* + * set time to track time + */ + *nSamplesToDo = (lSector_p1 - lSector) * CD_FRAMESAMPLES; + global.rectime = (lSector_p1 - lSector) / 75.0; + if (CheckTrackrange(track, global.endtrack) == 1) { + lSector_p2 = Get_EndSector(global.endtrack) + 1; - if (global.no_file) - global.fname_base[0] = '\0'; + if (lSector_p2 >= 0) { + global.rectime = (lSector_p2 - lSector) / 75.0; + *nSamplesToDo = (long)(global.rectime*44100.0 + 0.5); + } else { + fputs( + _("End track is no valid audio track (ignored)\n"), + stderr); + } + } else { + fputs( + _("Track range does not consist of audio tracks only (ignored)\n"), + stderr); + } + } else { + /* + * Prepare the maximum recording duration. + * It is defined as the biggest amount of + * adjacent audio sectors beginning with the + * specified track/index/offset. + */ + if (global.rectime > (lSector_p2 - lSector) / 75.0) { + global.rectime = (lSector_p2 - lSector) / 75.0; + lSector_p1 = lSector_p2; + } - if (!bulk) { - strcat(global.fname_base, "."); - strcat(global.fname_base, audio_type); + /* calculate # of samples to read */ + *nSamplesToDo = (long)(global.rectime*44100.0 + 0.5); } - /* - * If we need to calculate with samples or write them to a soundcard, - * we need a conversion to host byte order. - */ - if (global.channels != 2 || - bits != 16 || - rate != 44100) { - global.need_hostorder = 1; + global.OutSampleSize = (1+bits/12); + if (*nSamplesToDo/undersampling == 0L) { + usage2(_("Time interval is too short. Choose a duration greater than %d.%02d secs!\n"), + undersampling/44100, (int)(undersampling/44100) % 100); } - - /* - * Bad hack!! - * Remove for release 2.0 - * this is a bug compatibility feature. - */ - if (global.gui && global.verbose == SHOW_TOC) - global.verbose |= SHOW_STARTPOSITIONS | SHOW_SUMMARY | - SHOW_TITLES; - - /* - * all options processed. - * Now a file name per track may follow - */ - argc2 = argc3 = argc - moreargs; - argv2 = argv + moreargs; - if (moreargs < argc) { - if (strcmp(argv[moreargs], "-") == 0) { -#ifdef NEED_O_BINARY - setmode(fileno(stdout), O_BINARY); -#endif - global.audio = dup(fileno(stdout)); - strncpy(global.fname_base, "standard_output", - sizeof (global.fname_base)); - global.fname_base[sizeof (global.fname_base)-1] = 0; - } else if (!is_fifo(argv[moreargs])) { + if (global.moreargs < argc) { + if (strcmp(argv[global.moreargs], "-") == 0 || + is_fifo(argv[global.moreargs])) { /* - * we do have at least one argument + * pipe mode */ - global.multiname = 1; + if (bulk == 1) { + fprintf(stderr, + _("W Bulk mode is disabled while outputting to a %spipe\n"), + is_fifo(argv[global.moreargs]) ? + "named " : ""); + bulk = 0; + } + global.no_cddbfile = 1; } } - -#define SETSIGHAND(PROC, SIG, SIGNAME) if (signal(SIG, PROC) == SIG_ERR) \ - { errmsg("Cannot set signal %s handler.\n", SIGNAME); exit(SETSIG_ERROR); } - SETSIGHAND(exit_wrapper, SIGINT, "SIGINT") - SETSIGHAND(exit_wrapper, SIGQUIT, "SIGQUIT") - SETSIGHAND(exit_wrapper, SIGTERM, "SIGTERM") - SETSIGHAND(exit_wrapper, SIGHUP, "SIGHUP") - - SETSIGHAND(set_nonforked, SIGPIPE, "SIGPIPE") - - /* setup interface and open cdrom device */ - /* - * request sychronization facilities and shared memory - */ - SetupInterface(); - - /* - * use global.useroverlap to set our overlap - */ - if (global.useroverlap != -1) - global.overlap = global.useroverlap; - - /* - * check for more valid option combinations - */ - if (global.nsectors < 1+global.overlap) { - errmsgno(EX_BAD, - "Warning: Setting #nsectors to minimum of %d, due to jitter correction!\n", - global.overlap+1); - global.nsectors = global.overlap+1; + if (global.no_infofile == 0) { + global.no_infofile = 1; + if (global.channels == 1 || bits != 16 || rate != 44100) { + fprintf(stderr, + _("W Sample conversions disable generation of info files!\n")); + } else if (waitforsignal == 1) { + fprintf(stderr, + _("W Option -w 'wait for signal' disables generation of info files!\n")); + } else if (global.alltracks) { + fprintf(stderr, + _("W Option -tall 'all tracks into one file' disables generation of info files!\n")); + } else if (global.sector_offset != 0) { + fprintf(stderr, + _("W Using an start offset (option -o) disables generation of info files!\n")); + } else if (!bulk && !global.alltracks && + !((lSector == Get_AudioStartSector(track)) && + ((long)(lSector + global.rectime*75.0 + 0.5) == + Get_EndSector(global.endtrack) + 1))) { + fprintf(stderr, + _("W Duration is not set for complete tracks (option -d), this disables generation\n of info files!\n")); + } else { + global.no_infofile = 0; + } } - - if (global.overlap > 0 && global.buffers < 2) { - errmsgno(EX_BAD, - "Warning: Setting #buffers to minimum of 2, due to jitter correction!\n"); - global.buffers = 2; + if (global.cuefile) { + if (global.outputendianess != NONE) { + fprintf(stderr, + _("W Option -E 'outout endianess' disables generation of cue file!\n")); + global.cuefile = 0; + } else if (!global.alltracks) { + fprintf(stderr, + _("W Not selecting all tracks disables generation of cue file!\n")); + global.cuefile = 0; + } } - /* - * Value of 'nsectors' must be defined here - */ - global.shmsize = 0; -#ifdef USE_PARANOIA - while (global.shmsize < sizeof (struct paranoia_statistics)) - global.shmsize += global.pagesize; -#endif - global.shmsize += 10*global.pagesize; /* XXX Der Speicherfehler ist nicht in libparanoia sondern in cdda2wav :-( */ - global.shmsize += HEADER_SIZE + ENTRY_SIZE_PAGE_AL * global.buffers; + SamplesToWrite = *nSamplesToDo*2/(int)global.int_part; -#if defined(HAVE_FORK_AND_SHAREDMEM) - /* - * The (void *) cast is to avoid a GCC warning like: - * warning: dereferencing type-punned pointer will break - * strict-aliasing rules - * which does not apply to this code. (void *) introduces a compatible - * intermediate type in the cast list. - */ - he_fill_buffer = request_shm_sem(global.shmsize, - (unsigned char **)(void *)&he_fill_buffer); - if (he_fill_buffer == NULL) { - errmsgno(EX_BAD, "No shared memory available!\n"); - exit(SHMMEM_ERROR); - } -#else /* do not have fork() and shared memory */ - he_fill_buffer = malloc(global.shmsize); - if (he_fill_buffer == NULL) { - errmsg("No buffer memory available!\n"); - exit(NOMEM_ERROR); - } -#endif -#ifdef USE_PARANOIA { - int i = 0; + int first = FirstAudioTrack(); - para_stat = (struct paranoia_statistics *)he_fill_buffer; - while (i < sizeof (struct paranoia_statistics)) { - i += global.pagesize; - he_fill_buffer += global.pagesize; - global.shmsize -= global.pagesize; - } + tracks_included = Get_Track( + (unsigned) (lSector + + *nSamplesToDo/CD_FRAMESAMPLES -1)) + - max((int)track, first) +1; } -#endif - if (global.verbose != 0) { - fprintf(stderr, - "%u bytes buffer memory requested, transfer size %ld bytes, %d buffers, %d sectors\n", - global.shmsize, global.bufsize, global.buffers, global.nsectors); + if (global.multiname != 0 && global.moreargs + tracks_included > argc) { + global.multiname = 0; } - /* - * initialize pointers into shared memory segment - */ - last_buffer = he_fill_buffer + 1; - total_segments_read = (unsigned long *) (last_buffer + 1); - total_segments_written = total_segments_read + 1; - child_waits = (int *) (total_segments_written + 1); - parent_waits = child_waits + 1; - in_lendian = parent_waits + 1; - eorecording = in_lendian + 1; - *total_segments_read = *total_segments_written = 0; - nSamplesToDo = (unsigned long *)(eorecording + 1); - *eorecording = 0; - *in_lendian = global.in_lendian; + if (!waitforsignal) { - set_total_buffers(global.buffers, sem_id); +#ifdef INFOFILES + if (!global.no_infofile) { + int i; + for (i = track; i < (int)track + tracks_included; i++) { + unsigned minsec, maxsec; + char *tmp_fname; -#if defined(HAVE_SEMGET) && defined(USE_SEMAPHORES) - atexit(free_sem); + /* + * build next filename + */ + tmp_fname = get_next_name(); + if (tmp_fname != NULL) + strncpy(global.fname_base, tmp_fname, + sizeof (global.fname_base)-8); + global.fname_base[sizeof (global.fname_base)-1] = 0; + minsec = max(lSector, Get_AudioStartSector(i)); + maxsec = min(lSector + global.rectime*75.0 + 0.5, + 1+Get_EndSector(i)); + if ((int)minsec == Get_AudioStartSector(i) && + (int)maxsec == 1+Get_EndSector(i)) { + write_info_file(global.fname_base, i, + (maxsec-minsec)*CD_FRAMESAMPLES, + bulk && global.multiname == 0); + } else { + fprintf(stderr, + _("Partial length copy for track %d, no info file will be generated for this track!\n"), i); + } + if (!bulk) + break; + } + reset_name_iterator(); + } #endif + if (global.cuefile) { + int i; + char *tmp_fname; + FILE *cuef; - /* - * set input endian default - */ - if (littleendian != -1) - *in_lendian = littleendian; + /* + * build next filename + */ + tmp_fname = get_next_name(); + if (tmp_fname != NULL) + strncpy(global.fname_base, tmp_fname, + sizeof (global.fname_base)-8); + global.fname_base[sizeof (global.fname_base)-1] = 0; + cut_extension(global.fname_base); - /* - * get table of contents - */ - cdtracks = ReadToc(); - if (cdtracks == 0) { - errmsgno(EX_BAD, - "No track in table of contents! Aborting...\n"); - exit(MEDIA_ERROR); - } + cuef = cue_file_open(global.fname_base); + write_cue_global(cuef, global.fname_base); - calc_cddb_id(); - calc_cdindex_id(); + for (i = track; i < (int)track + tracks_included; i++) { + unsigned minsec, maxsec; -#if 1 - Check_Toc(); -#endif + minsec = max(lSector, Get_AudioStartSector(i)); + maxsec = min(lSector + global.rectime*75.0 + 0.5, + 1+Get_EndSector(i)); + if ((int)minsec == Get_AudioStartSector(i) && + (int)maxsec == 1+Get_EndSector(i)) { + write_cue_track(cuef, global.fname_base, i); + } - if (ReadTocText != NULL && FirstAudioTrack() != -1) { - ReadTocText(get_scsi_p()); - handle_cdtext(); + /* + * build next filename + */ + tmp_fname = get_next_name(); + if (tmp_fname != NULL) + strncpy(global.fname_base, tmp_fname, + sizeof (global.fname_base)-8); + global.fname_base[sizeof (global.fname_base)-1] = 0; + cut_extension(global.fname_base); + } + reset_name_iterator(); + if (cuef) + fclose(cuef); + } } - if (global.verbose == SHOW_JUSTAUDIOTRACKS) { - unsigned int z; - for (z = 0; z < cdtracks; z++) { - if (Get_Datatrack(z) == 0) { - printf("%02d\t%06ld\n", - Get_Tracknumber(z), - Get_AudioStartSector(z)); - } - } + if (global.just_the_toc) exit(NO_ERROR); - } - if (global.verbose != 0) { - fputs("#Cdda2wav version ", stderr); - fputs(VERSION, stderr); - fputs(VERSION_OS, stderr); -#if defined USE_POSIX_PRIORITY_SCHEDULING || defined HAVE_SYS_PRIOCNTL_H - fputs(", real time sched.", stderr); -#endif -#if defined ECHO_TO_SOUNDCARD - fputs(", soundcard", stderr); -#endif -#if defined USE_PARANOIA - fputs(", libparanoia", stderr); -#endif - fputs(" support\n", stderr); +#ifdef ECHO_TO_SOUNDCARD + if (global.user_sound_device[0] != '\0') { + set_snd_device(global.user_sound_device); } + if (global.no_fork) + init_soundcard(rate, bits); +#endif /* ECHO_TO_SOUNDCARD */ - FixupTOC(cdtracks + 1); + if (global.userspeed > -1) + global.speed = global.userspeed; -#if 0 - if (!global.paranoia_selected) { - error("NICE\n"); - /* - * try to get some extra kicks - */ - priv_on(); - needroot(0); -#if defined HAVE_SETPRIORITY - setpriority(PRIO_PROCESS, 0, -20); -#else -#if defined(HAVE_NICE) && (HAVE_NICE == 1) - nice(-NZERO); -#endif -#endif - priv_off(); - dontneedroot(); + if (global.speed != 0 && SelectSpeed != NULL) { + SelectSpeed(get_scsi_p(), global.speed); } -#endif - /* - * switch cdrom to audio mode - */ - EnableCdda(get_scsi_p(), 1, CD_FRAMESIZE_RAW); + current_track_reading = current_track_writing = track; - atexit(CloseAll); + if (!global.no_file) { + { + char *myfname; - DisplayToc(); - if (FirstAudioTrack() == -1) { - if (no_disguised_audiotracks()) { - FatalError(EX_BAD, - "This disk has no audio tracks.\n"); + myfname = get_next_name(); + + if (myfname != NULL) { + strncpy(global.fname_base, myfname, + sizeof (global.fname_base)-8); + global.fname_base[sizeof (global.fname_base)-1] = 0; + } } - } - Read_MCN_ISRC(); + /* strip audio_type extension */ + cut_extension(global.fname_base); + if (bulk && global.multiname == 0) { + sprintf(fname, "%s_%02u.%s", + global.fname_base, current_track_writing, audio_type); + } else { + sprintf(fname, "%s.%s", global.fname_base, audio_type); + } - /* - * check if start track is in range - */ - if (track < 1 || track > cdtracks) { - usage2("Incorrect start track setting: %d", track); + OpenAudio(fname, rate, bits, global.channels, + (unsigned)(SamplesToWrite*global.OutSampleSize*global.channels), + global.audio_out); } - /* - * check if end track is in range - */ - if (endtrack < track || endtrack > cdtracks) { - usage2("Incorrect end track setting: %ld", endtrack); - } + global.Remainder = (75 % global.nsectors)+1; - do { - lSector = Get_AudioStartSector(track); - lSector_p1 = Get_EndSector(track) + 1; + global.sh_bits = 16 - bits; /* shift counter */ - if (lSector < 0) { - if (bulk == 0) { - FatalError(EX_BAD, - "Track %d not found.\n", track); - } else { - fprintf(stderr, - "Skipping data track %d...\n", track); - if (endtrack == track) - endtrack++; - track++; - } - } - } while (bulk != 0 && track <= cdtracks && lSector < 0); + global.iloop = *nSamplesToDo; + if (Halved && (global.iloop&1)) + global.iloop += 2; - if ((global.illleadout_cd == 0 || global.reads_illleadout != 0) && - cd_index != -1) { - if (global.verbose && !global.quiet) { - global.verbose |= SHOW_INDICES; - } - sector_offset += ScanIndices(track, cd_index, bulk); - } else { - cd_index = 1; - if (global.deemphasize || (global.verbose & SHOW_INDICES)) { - ScanIndices(track, cd_index, bulk); - } - } + BeginAtSample = lSector * CD_FRAMESAMPLES; - lSector += sector_offset; - /* - * check against end sector of track - */ - if (lSector >= lSector_p1) { - fprintf(stderr, - "W Sector offset %lu exceeds track size (ignored)\n", - sector_offset); - lSector -= sector_offset; - } +#if 1 + if ((global.verbose & SHOW_SUMMARY) && !global.just_the_toc && + (global.reads_illleadout == 0 || + lSector+*nSamplesToDo/CD_FRAMESAMPLES + <= (unsigned) Get_AudioStartSector(cdtracks-1))) { - if (lSector < 0L) { - fputs("Negative start sector! Set to zero.\n", stderr); - lSector = 0L; + fprintf(outfp, _("samplefile size will be %lu bytes.\n"), + global.audio_out->GetHdrSize() + + global.audio_out->InSizeToOutSize(SamplesToWrite*global.OutSampleSize*global.channels)); + fprintf(outfp, + _("recording %d.%04d seconds %s with %d bits @ %5d.%01d Hz"), + (int)global.rectime, (int)(global.rectime * 10000) % 10000, + global.channels == 1 ? _("mono"):_("stereo"), + bits, (int)rate, (int)(rate*10)%10); + if (!global.no_file && *global.fname_base) + fprintf(outfp, " ->'%s'...", global.fname_base); + fputs("\n", outfp); } +#endif - lSector_p2 = Get_LastSectorOnCd(track); - if (bulk == 1 && track == endtrack && rectime == 0.0) - rectime = 99999.0; - if (rectime == 0.0) { - /* - * set time to track time - */ - *nSamplesToDo = (lSector_p1 - lSector) * CD_FRAMESAMPLES; - rectime = (lSector_p1 - lSector) / 75.0; - if (CheckTrackrange(track, endtrack) == 1) { - lSector_p2 = Get_EndSector(endtrack) + 1; +#if defined(HAVE_SEMGET) && defined(USE_SEMAPHORES) +#else + init_pipes(); +#endif - if (lSector_p2 >= 0) { - rectime = (lSector_p2 - lSector) / 75.0; - *nSamplesToDo = (long)(rectime*44100.0 + 0.5); +#ifdef USE_PARANOIA + if (global.paranoia_selected) { + long paranoia_mode; + + paranoia_mode = PARANOIA_MODE_FULL ^ PARANOIA_MODE_NEVERSKIP; + + if (global.paranoia_parms.disable_paranoia) { + paranoia_mode = PARANOIA_MODE_DISABLE; + } + if (global.paranoia_parms.disable_extra_paranoia) { + paranoia_mode |= PARANOIA_MODE_OVERLAP; + paranoia_mode &= ~PARANOIA_MODE_VERIFY; + } + /* not yet implemented */ + if (global.paranoia_parms.disable_scratch_detect) { + paranoia_mode &= ~(PARANOIA_MODE_SCRATCH|PARANOIA_MODE_REPAIR); + } + /* not yet implemented */ + if (global.paranoia_parms.disable_scratch_repair) { + paranoia_mode &= ~PARANOIA_MODE_REPAIR; + } + if (global.paranoia_parms.enable_c2_check) { + /* test if we can read C2 with ReadCdRom_C2() */ + char buffer[3000]; + cdda_read_c2(get_scsi_p(), buffer, Get_StartSector(1), 1); + if (ReadCdRom_C2 == NULL) { + if (global.verbose) + fprintf(outfp, _("c2check not supported by drive.\n")); } else { - fputs( - "End track is no valid audio track (ignored)\n", - stderr); + if (global.verbose) + fprintf(outfp, _("using c2check to verify reads.\n")); + paranoia_mode |= PARANOIA_MODE_C2CHECK; } - } else { - fputs( - "Track range does not consist of audio tracks only (ignored)\n", - stderr); } - } else { + + global.cdp = paranoia_init(get_scsi_p(), global.nsectors, + (paranoia_mode & PARANOIA_MODE_C2CHECK) ? + cdda_read_c2 : cdda_read, + cdda_disc_firstsector, cdda_disc_lastsector, + cdda_tracks, + cdda_track_firstsector, cdda_track_lastsector, + cdda_sector_gettrack, cdda_track_audiop); + + if (global.paranoia_parms.overlap >= 0) { + int overlap = global.paranoia_parms.overlap; + + if (overlap > global.nsectors - 1) + overlap = global.nsectors - 1; + paranoia_overlapset(global.cdp, overlap); + } /* - * Prepare the maximum recording duration. - * It is defined as the biggest amount of - * adjacent audio sectors beginning with the - * specified track/index/offset. + * Implement the shortcut "paraopts=proof" */ - if (rectime > (lSector_p2 - lSector) / 75.0) { - rectime = (lSector_p2 - lSector) / 75.0; - lSector_p1 = lSector_p2; + if ((global.paranoia_flags & 1) && + global.paranoia_parms.mindynoverlap < 0) { + if (global.nsectors > 20) + global.paranoia_parms.mindynoverlap = 20; + else + global.paranoia_parms.mindynoverlap = global.nsectors - 1; } + /* + * Default to a minimum of dynamic overlapping == 0.5 sectors. + * If we don't do this, we get the default from libparanoia + * which is approx. 0.1. + */ + if (global.paranoia_parms.mindynoverlap < 0) + paranoia_dynoverlapset(global.cdp, CD_FRAMEWORDS/2, -1); + paranoia_dynoverlapset(global.cdp, + global.paranoia_parms.mindynoverlap * CD_FRAMEWORDS, + global.paranoia_parms.maxdynoverlap * CD_FRAMEWORDS); - /* calculate # of samples to read */ - *nSamplesToDo = (long)(rectime*44100.0 + 0.5); - } + paranoia_modeset(global.cdp, paranoia_mode); + global.paranoia_mode = paranoia_mode; - global.OutSampleSize = (1+bits/12); - if (*nSamplesToDo/undersampling == 0L) { - usage2("Time interval is too short. Choose a duration greater than %d.%02d secs!", - undersampling/44100, (int)(undersampling/44100) % 100); - } - if (moreargs < argc) { - if (strcmp(argv[moreargs], "-") == 0 || - is_fifo(argv[moreargs])) { - /* - * pipe mode - */ - if (bulk == 1) { - fprintf(stderr, - "W Bulk mode is disabled while outputting to a %spipe\n", - is_fifo(argv[moreargs]) ? - "named " : ""); - bulk = 0; + if (global.paranoia_parms.readahead < 0) { + global.paranoia_parms.readahead = paranoia_get_readahead(global.cdp); + if (global.paranoia_parms.readahead < 400) { + global.paranoia_parms.readahead = 400; + paranoia_set_readahead(global.cdp, 400); } - global.no_cddbfile = 1; - } - } - if (global.no_infofile == 0) { - global.no_infofile = 1; - if (global.channels == 1 || bits != 16 || rate != 44100) { - fprintf(stderr, - "W Sample conversions disable generation of info files!\n"); - } else if (waitforsignal == 1) { - fprintf(stderr, - "W Option -w 'wait for signal' disables generation of info files!\n"); - } else if (sector_offset != 0) { - fprintf(stderr, - "W Using an start offset (option -o) disables generation of info files!\n"); - } else if (!bulk && - !((lSector == Get_AudioStartSector(track)) && - ((long)(lSector + rectime*75.0 + 0.5) == - Get_EndSector(track) + 1))) { - fprintf(stderr, - "W Duration is not set for complete tracks (option -d), this disables generation\n of info files!\n"); } else { - global.no_infofile = 0; + paranoia_set_readahead(global.cdp, global.paranoia_parms.readahead); } + if (global.verbose) + fprintf(outfp, _("using lib paranoia for reading.\n")); + paranoia_seek(global.cdp, lSector, SEEK_SET); + paranoia_statreset(); } +#endif +#if defined(HAVE_FORK_AND_SHAREDMEM) - SamplesToWrite = *nSamplesToDo*2/(int)int_part; + /* + * Linux comes with a broken libc that makes "stderr" buffered even + * though POSIX requires "stderr" to be never "fully buffered". + * As a result, we would get garbled output once our fork()d child + * calls exit(). We work around the Linux bug by calling fflush() + * before fork()ing. + */ + fflush(outfp); - { - int first = FirstAudioTrack(); + /* + * Everything is set up. Now fork and let one process read cdda sectors + * and let the other one store them in a wav file + */ - tracks_included = Get_Track( - (unsigned) (lSector + - *nSamplesToDo/CD_FRAMESAMPLES -1)) - - max((int)track, first) +1; - } + /* forking */ + if (!global.no_fork) + global.child_pid = fork(); - if (global.multiname != 0 && moreargs + tracks_included > argc) { - global.multiname = 0; - } + if (global.child_pid > 0 && global.gui > 0 && global.verbose > 0) + fprintf(stderr, _("child pid is %lld\n"), (Llong)global.child_pid); - if (!waitforsignal) { + /* ********************** fork ************************************* */ + if (global.child_pid == 0) { + /* child WRITER section */ -#ifdef INFOFILES - if (!global.no_infofile) { - int i; - - for (i = track; i < (int)track + tracks_included; i++) { - unsigned minsec, maxsec; - char *tmp_fname; +#ifdef ECHO_TO_SOUNDCARD + init_soundcard(rate, bits); +#endif /* ECHO_TO_SOUNDCARD */ +#ifdef HAVE_AREAS + /* + * Under BeOS a fork() with shared memory does not work as + * it does under System V Rel. 4. The mapping of the child + * works with copy on write semantics, so changes do not + * propagate back and forth. The existing mapping has to be + * deleted and replaced by an clone without copy on write + * semantics. + * This is done with clone_area(..., B_ANY_ADDRESS,...). + * Thanks to file support.c from the postgreSQL project. + */ + area_info inf; + int32 cook = 0; + /* + * iterate over all mappings to find our shared memory mapping. + */ + while (get_next_area_info(0, &cook, &inf) == B_OK) { + /* check the name of the mapping. */ + if (strcmp(inf.name, AREA_NAME) == 0) { + void *area_address; + area_id area_parent; + /* kill the cow mapping. */ + area_address = inf.address; + if (B_OK != delete_area(inf.area)) { + errmsgno(EX_BAD, + _("delete_area: no valid area.\n")); + exit(SHMMEM_ERROR); + } + /* get the parent mapping. */ + area_parent = find_area(inf.name); + if (area_parent == B_NAME_NOT_FOUND) { + errmsgno(EX_BAD, + _("find_area: no such area name.\n")); + exit(SHMMEM_ERROR); + } /* - * build next filename + * clone the parent mapping without cow. + * The original implementaion used + * B_ANY_ADDRESS, but newer Haiku versions + * implement address randomization that + * prevents us from using the pointer in the + * child. So we now use B_EXACT_ADDRESS. */ - tmp_fname = get_next_name(); - if (tmp_fname != NULL) - strncpy(global.fname_base, tmp_fname, - sizeof (global.fname_base)-8); - global.fname_base[sizeof (global.fname_base)-1] = 0; - minsec = max(lSector, Get_AudioStartSector(i)); - maxsec = min(lSector + rectime*75.0 + 0.5, - 1+Get_EndSector(i)); - if ((int)minsec == Get_AudioStartSector(i) && - (int)maxsec == 1+Get_EndSector(i)) { - write_info_file(global.fname_base, i, - (maxsec-minsec)*CD_FRAMESAMPLES, - bulk && global.multiname == 0); - } else { - fprintf(stderr, - "Partial length copy for track %d, no info file will be generated for this track!\n", i); + if (B_OK > clone_area("shm_child", + &area_address, B_EXACT_ADDRESS, + B_READ_AREA | B_WRITE_AREA, area_parent)) { + errmsgno(EX_BAD, + _("clone_area failed\n")); + exit(SHMMEM_ERROR); } - if (!bulk) - break; } - reset_name_iterator(); } #endif - } +#ifdef __EMX__ + if (DosGetSharedMem(he_fill_buffer, 3)) { + comerr(_("DosGetSharedMem() failed.\n")); + } +#endif + global.have_forked = 1; + forked_write(); +#ifdef __EMX__ + DosFreeMem(he_fill_buffer); + _exit(NO_ERROR); + /* NOTREACHED */ +#endif + exit_wrapper(NO_ERROR); + /* NOTREACHED */ + } else if (global.child_pid > 0) { + /* parent READER section */ - if (global.just_the_toc) - exit(NO_ERROR); + global.have_forked = 1; + switch_to_realtime_priority(); -#ifdef ECHO_TO_SOUNDCARD - if (user_sound_device[0] != '\0') { - set_snd_device(user_sound_device); + forked_read(); +#ifdef HAVE_AREAS + { + area_id aid; + aid = find_area(AREA_NAME); + if (aid < B_OK) { + comerrno(aid, _("find_area() failed.\n")); + } + delete_area(aid); + } +#endif +#ifdef __EMX__ + DosFreeMem(he_fill_buffer); +#endif + exit_wrapper(NO_ERROR); + /* NOTREACHED */ + } else { + if (global.child_pid != -2) + errmsg(_("Cannot fork.\n")); } - init_soundcard(rate, bits); -#endif /* ECHO_TO_SOUNDCARD */ - if (global.userspeed > -1) - global.speed = global.userspeed; +#endif /* defined(HAVE_FORK_AND_SHAREDMEM) */ - if (global.speed != 0 && SelectSpeed != NULL) { - SelectSpeed(get_scsi_p(), global.speed); + /* version without fork */ + { + global.have_forked = 0; +#if 0 + if (!global.paranoia_selected) { + error("REAL\n"); + switch_to_realtime_priority(); + } +#endif + if (!global.quiet) + fprintf(stderr, _("a nonforking version is running...\n")); + nonforked_loop(); + exit_wrapper(NO_ERROR); + /* NOTREACHED */ } +#ifdef USE_PARANOIA + if (global.paranoia_selected) + paranoia_free(global.cdp); +#endif - current_track = track; + return (0); +} - if (!global.no_file) { - { - char *myfname; +LOCAL void +priv_warn(what, msg) + const char *what; + const char *msg; +{ + errmsgno(EX_BAD, "Insufficient '%s' privileges. %s\n", what, msg); +} - myfname = get_next_name(); +LOCAL void +gargs(argc, argv) + int argc; + char *argv[]; +{ + int cac; + char *const*cav; - if (myfname != NULL) { - strncpy(global.fname_base, myfname, - sizeof (global.fname_base)-8); - global.fname_base[sizeof (global.fname_base)-1] = 0; - } - } + BOOL version = FALSE; + BOOL help = FALSE; + char *channels = NULL; + int irate = -1; + char *divider = NULL; + char *trackspec = NULL; + char *duration = NULL; + char *int_name = DEF_INTERFACE; - /* strip audio_type extension */ - { - char *cp = global.fname_base; + char *oendianess = NULL; + char *cendianess = NULL; + int cddbp = -1; + BOOL stereo = FALSE; + BOOL mono = FALSE; + BOOL domax = FALSE; + BOOL dump_rates = FALSE; + BOOL md5blocksize = FALSE; + long userverbose = -1; + int outfd = -1; + int audiofd = -1; - cp = strrchr(cp, '.'); - if (cp == NULL) { - cp = global.fname_base + - strlen(global.fname_base); - } - *cp = '\0'; + cac = argc; + cav = argv; + cac--; + cav++; + if (getargs(&cac, &cav, opts, + &global.paranoia_selected, + handle_paranoia_opts, &global.paranoia_flags, + &version, + &help, &help, + + &global.no_file, &global.no_file, + + &dump_rates, &dump_rates, + &bulk, &bulk, &bulk, + &global.scsi_verbose, &global.scsi_verbose, + + &global.findminmax, &global.findminmax, + &global.findmono, &global.findmono, + &global.no_infofile, &global.no_infofile, + &global.no_textdefaults, + &global.no_textfile, + &global.cuefile, + &global.no_hidden_track, + + &global.deemphasize, &global.deemphasize, + &global.just_the_toc, &global.just_the_toc, + &global.scsi_silent, &global.scsi_silent, + + &global.cddbp_server, &global.cddbp_port, + &global.scanbus, + &global.dev_name, &global.dev_name, &global.dev_name, + &global.dev_opts, + &global.scsi_debug, &global.scsi_debug, + &global.scsi_kdebug, &global.scsi_kdebug, &global.scsi_kdebug, + getnum, &global.bufsize, + &global.aux_name, &global.aux_name, + &int_name, &int_name, + &audio_type, &audio_type, + + &oendianess, &oendianess, + &cendianess, &cendianess, + &global.userspeed, &global.userspeed, + + &global.playback_rate, &global.playback_rate, + &md5blocksize, &md5blocksize, + &global.useroverlap, &global.useroverlap, + &global.user_sound_device, &global.user_sound_device, + + &cddbp, &cddbp, + &channels, &channels, + &bits, &bits, + &irate, &irate, + &global.gui, &global.gui, + + ÷r, ÷r, + &trackspec, &trackspec, + &global.cd_index, &global.cd_index, + &duration, &duration, + &global.sector_offset, &global.sector_offset, + &global.start_sector, + + &global.nsectors, &global.nsectors, + handle_verbose_opts, &userverbose, + handle_verbose_opts, &userverbose, + &global.buffers, &global.buffers, + + &stereo, &stereo, + &mono, &mono, + &waitforsignal, &waitforsignal, + &global.echo, &global.echo, + &global.quiet, &global.quiet, + &domax, &domax, &outfd, &audiofd, + &global.no_fork, &global.interactive) < 0) { + errmsgno(EX_BAD, _("Bad Option: %s.\n"), cav[0]); + fputs(_("Use 'cdda2wav -help' to get more information.\n"), + stderr); + exit(SYNTAX_ERROR); + } + if (getfiles(&cac, &cav, opts) == 0) + /* No more file type arguments */; + global.moreargs = cav - argv; + if (version) { +#ifdef OLD_VERSION_PRINT + fputs(_("cdda2wav version "), outfp); + fputs(VERSION, outfp); + fputs(VERSION_OS, outfp); + fputs("\n", outfp); +#else + /* + * Make the version string similar for all cdrtools programs. + */ + printf(_("cdda2wav %s (%s-%s-%s) Copyright (C) 1993-2004,2015,2017 %s (C) 2004-2017 %s\n"), + VERSION, + HOST_CPU, HOST_VENDOR, HOST_OS, + _("Heiko Eissfeldt"), + _("Joerg Schilling")); + prdefaults(stdout); +#endif + exit(NO_ERROR); + } + if (help) { + usage(); + } + if (outfd >= 0) { +#ifdef F_GETFD + if (fcntl(outfd, F_GETFD, 0) < 0) + comerr(_("Cannot redirect output to fd %d.\n"), outfd); +#endif + global.out_fp = fdopen(outfd, "wa"); + if (global.out_fp == NULL) + comerr(_("Cannot open output fd %d.\n"), outfd); +#ifdef HAVE_SETVBUF + setvbuf(global.out_fp, NULL, _IONBF, 0); +#else +#ifdef HAVE_SETVBUF + setbuf(global.out_fp, NULL); +#endif +#endif + } + if (!global.scanbus) + cdr_defaults(&global.dev_name, NULL, NULL, &global.bufsize, NULL); + if (global.bufsize < 0L) + global.bufsize = DEF_BUFSIZE; /* The SCSI buffer size */ + + if (dump_rates) { /* list available rates */ + int ii; + + /* BEGIN CSTYLED */ + fputs(_("\ +Available rates are:\n\ +Rate Divider Rate Divider Rate Divider Rate Divider\n\ +"), + outfp); + /* END CSTYLED */ + for (ii = 1; ii <= 44100 / 880 / 2; ii++) { + long i2 = ii; + fprintf(outfp, "%7.1f %2ld %7.1f %2ld.5 ", + 44100.0/i2, i2, 44100.0/(i2+0.5), i2); + i2 += 25; + fprintf(outfp, "%7.1f %2ld %7.1f %2ld.5\n", + 44100.0/i2, i2, 44100.0/(i2+0.5), i2); + i2 -= 25; } - if (bulk && global.multiname == 0) { - sprintf(fname, "%s_%02u.%s", - global.fname_base, current_track, audio_type); + exit(NO_ERROR); + } + if (channels) { + if (*channels == 's') { + global.channels = 2; + global.swapchannels = 1; } else { - sprintf(fname, "%s.%s", global.fname_base, audio_type); + global.channels = strtol(channels, NULL, 10); } + } + if (irate >= 0) { + rate = irate; + } + if (divider) { + double divider_d; + divider_d = strtod(divider, NULL); + if (divider_d > 0.0) { + rate = 44100.0 / divider_d; + } else { + errmsgno(EX_BAD, + _("E option -divider requires a nonzero, positive argument.\nSee -dump-rates.\n")); + exit(SYNTAX_ERROR); + } + } + if (global.sector_offset != 0 && global.start_sector != -1) { + errmsgno(EX_BAD, _("-offset and -start-sector are mutual exclusive.\n")); + exit(SYNTAX_ERROR); + } + if (trackspec) { + char * endptr; + char * endptr2; - OpenAudio(fname, rate, bits, global.channels, - (unsigned)(SamplesToWrite*global.OutSampleSize*global.channels), - global.audio_out); + if (streql(trackspec, "all")) { + global.alltracks = TRUE; + } else { + track = strtoul(trackspec, &endptr, 10); + if (trackspec == endptr) + comerrno(EX_BAD, + _("Invalid track specification '%s'.\n"), + trackspec); + if (streql(endptr, "+max")) { + if (track <= 1) { + global.alltracks = TRUE; + /* + * Hack for write_cue_track() to + * use correct INDEX offsets. + */ + if (track == 1) + global.no_hidden_track = TRUE; + } + global.maxtrack = TRUE; + endptr2 = endptr; + } else { + global.endtrack = strtoul(endptr, &endptr2, 10); + } + if (endptr2 == endptr) { /* endtrack empty */ + global.endtrack = track; + } else if (track == global.endtrack) { /* manually -tn+n */ + bulk = -1; + } + } + if (global.start_sector != -1 && !global.alltracks) { + errmsgno(EX_BAD, _("-t and -start-sector are mutual exclusive.\n")); + exit(SYNTAX_ERROR); + } + } + if (duration) { + char *end_ptr = NULL; + global.rectime = strtod(duration, &end_ptr); + if (*end_ptr == 'f') { + global.rectime = global.rectime / 75.0; + /* TODO: add an absolute end of recording. */ +#if 0 + } else if (*end_ptr == 'F') { + global.rectime = global.rectime / 75.0; +#endif + } else if (*end_ptr != '\0') { + global.rectime = -1.0; + } + } + if (oendianess) { + if (strcasecmp(oendianess, "little") == 0) { + global.outputendianess = LITTLE; + } else if (strcasecmp(oendianess, "big") == 0) { + global.outputendianess = BIG; + } else if (strcasecmp(oendianess, "machine") == 0 || + strcasecmp(oendianess, "host") == 0) { +#ifdef WORDS_BIGENDIAN + global.outputendianess = BIG; +#else + global.outputendianess = LITTLE; +#endif + } else { + usage2(_("Wrong parameter '%s' for option -E\n"), oendianess); + } + } + if (cendianess) { + if (strcasecmp(cendianess, "little") == 0) { + global.littleendian = 1; + } else if (strcasecmp(cendianess, "big") == 0) { + global.littleendian = 0; + } else if (strcasecmp(cendianess, "machine") == 0 || + strcasecmp(cendianess, "host") == 0) { +#ifdef WORDS_BIGENDIAN + global.littleendian = 0; +#else + global.littleendian = 1; +#endif + } else if (strcasecmp(cendianess, "guess") == 0) { + global.littleendian = -2; + } else { + usage2(_("Wrong parameter '%s' for option -C\n"), cendianess); + } + } + if (cddbp >= 0) { + global.cddbp = 1 + cddbp; + } + if (stereo) { + global.channels = 2; + } + if (mono) { + global.channels = 1; + global.need_hostorder = 1; + } + if (global.echo) { +#ifdef ECHO_TO_SOUNDCARD + if (global.playback_rate != 100) { + RestrictPlaybackRate(global.playback_rate); + } + global.need_hostorder = 1; +#else + errmsgno(EX_BAD, + _("There is no sound support compiled into %s.\n"), + argv[0]); + global.echo = 0; +#endif + } + if (global.quiet) { + global.verbose = 0; + } + if (domax) { + global.channels = 2; bits = 16; rate = 44100; + } + if (global.findminmax) { + global.need_hostorder = 1; + } + if (global.deemphasize) { + global.need_hostorder = 1; + } + if (global.just_the_toc) { + global.verbose = SHOW_MAX; + bulk = 1; + } + if (global.gui) { +#ifdef Thomas_will_es + global.no_file = 1; + global.no_infofile = 1; + global.verbose = SHOW_MAX; +#endif + global.no_cddbfile = 1; + } + if (global.no_file) { + global.no_infofile = 1; + global.no_cddbfile = 1; + global.no_textfile = 1; + global.cuefile = 0; + } + if (global.no_infofile) { + global.no_cddbfile = 1; + global.no_textfile = 1; + global.cuefile = 0; + } + if (global.cuefile) { + global.no_infofile = 1; + } + if (md5blocksize) + global.md5blocksize = -1; + if (global.md5blocksize) { +#ifndef MD5_SIGNATURES + errmsgno(EX_BAD, + _("The option MD5 signatures is not configured!\n")); +#endif + } + if (global.user_sound_device[0] != '\0') { +#ifndef ECHO_TO_SOUNDCARD + errmsgno(EX_BAD, _("There is no sound support configured!\n")); +#else + global.echo = TRUE; +#endif + } + if (global.paranoia_selected) { + global.useroverlap = 0; + } + if (userverbose >= 0) { + global.verbose = userverbose; + } + /* + * check all parameters + */ + if (global.bufsize < CD_FRAMESIZE_RAW) { + usage2(_("Incorrect transfer size setting: %d\n"), global.bufsize); } - global.Remainder = (75 % global.nsectors)+1; + if (global.buffers < 1) { + usage2(_("Incorrect buffer setting: %d\n"), global.buffers); + } - global.sh_bits = 16 - bits; /* shift counter */ + if (global.nsectors < 1) { + usage2(_("Incorrect nsectors setting: %d\n"), global.nsectors); + } - global.iloop = *nSamplesToDo; - if (Halved && (global.iloop&1)) - global.iloop += 2; + if (global.verbose < 0 || global.verbose > SHOW_MAX) { + usage2(_("Incorrect verbose level setting: %d\n"), global.verbose); + } + if (global.verbose == 0) + global.quiet = 1; - BeginAtSample = lSector * CD_FRAMESAMPLES; + if (global.rectime < 0.0) { + usage2(_("Incorrect recording time setting: %d.%02d\n"), + (int)global.rectime, (int)(global.rectime*100+0.5) % 100); + } -#if 1 - if ((global.verbose & SHOW_SUMMARY) && !global.just_the_toc && - (global.reads_illleadout == 0 || - lSector+*nSamplesToDo/CD_FRAMESAMPLES - <= (unsigned) Get_AudioStartSector(cdtracks-1))) { + if (global.channels != 1 && global.channels != 2) { + usage2(_("Incorrect channel setting: %d\n"), global.channels); + } - fprintf(stderr, "samplefile size will be %lu bytes.\n", - global.audio_out->GetHdrSize() + - global.audio_out->InSizeToOutSize(SamplesToWrite*global.OutSampleSize*global.channels)); - fprintf(stderr, - "recording %d.%04d seconds %s with %d bits @ %5d.%01d Hz", - (int)rectime, (int)(rectime * 10000) % 10000, - global.channels == 1 ? "mono":"stereo", - bits, (int)rate, (int)(rate*10)%10); - if (!global.no_file && *global.fname_base) - fprintf(stderr, " ->'%s'...", global.fname_base); - fputs("\n", stderr); + if (bits != 8 && bits != 12 && bits != 16) { + usage2(_("Incorrect bits_per_sample setting: %d\n"), bits); } -#endif -#if defined(HAVE_SEMGET) && defined(USE_SEMAPHORES) -#else - init_pipes(); -#endif + if (rate < 827.0 || rate > 44100.0) { + usage2(_("Incorrect sample rate setting: %d.%02d\n"), + (int)rate, ((int)rate*100) % 100); + } -#ifdef USE_PARANOIA - if (global.paranoia_selected) { - long paranoia_mode; + global.int_part = (double)(long) (2*44100.0 / rate); - global.cdp = paranoia_init(get_scsi_p(), global.nsectors, - cdda_read, - cdda_disc_firstsector, cdda_disc_lastsector, - cdda_tracks, - cdda_track_firstsector, cdda_track_lastsector, - cdda_sector_gettrack, cdda_track_audiop); + if (2*44100.0 / rate - global.int_part >= 0.5) { + global.int_part += 1.0; + fprintf(outfp, + _("Nearest available sample rate is %d.%02d Hertz\n"), + 2*44100 / (int)global.int_part, + (2*4410000 / (int)global.int_part) % 100); + } + Halved = ((int) global.int_part) & 1; + rate = 2*44100.0 / global.int_part; + undersampling = (int) global.int_part / 2.0; + samples_to_do = undersampling; - if (global.paranoia_parms.overlap >= 0) { - int overlap = global.paranoia_parms.overlap; + if (strcmp((char *)int_name, "generic_scsi") == 0) { + interface = GENERIC_SCSI; + } else if (strcmp((char *)int_name, "cooked_ioctl") == 0) { + interface = COOKED_IOCTL; + } else { + usage2(_("Incorrect interface setting: %s\n"), int_name); + } - if (overlap > global.nsectors - 1) - overlap = global.nsectors - 1; - paranoia_overlapset(global.cdp, overlap); - } + /* + * check * init audio file + */ + if (strncmp(audio_type, "wav", 3) == 0) { + global.audio_out = &wavsound; + } else if (strncmp(audio_type, "sun", 3) == 0 || + strncmp(audio_type, "au", 2) == 0) { /* - * Default to a minimum of dynamic overlapping == 0.5 sectors. - * If we don't do this, we get the default from libparanoia - * which is approx. 0.1. + * Enhanced compatibility */ - if (global.paranoia_parms.mindynoverlap < 0) - paranoia_dynoverlapset(global.cdp, CD_FRAMEWORDS/2, -1); - paranoia_dynoverlapset(global.cdp, - global.paranoia_parms.mindynoverlap * CD_FRAMEWORDS, - global.paranoia_parms.maxdynoverlap * CD_FRAMEWORDS); - - paranoia_mode = PARANOIA_MODE_FULL ^ PARANOIA_MODE_NEVERSKIP; + audio_type = "au"; + global.audio_out = &sunsound; + } else if (strncmp(audio_type, "cdr", 3) == 0|| + strncmp(audio_type, "raw", 3) == 0) { + global.audio_out = &rawsound; + } else if (strncmp(audio_type, "aiff", 4) == 0) { + global.audio_out = &aiffsound; + } else if (strncmp(audio_type, "aifc", 4) == 0) { + global.audio_out = &aifcsound; +#ifdef USE_LAME + } else if (strncmp(audio_type, "mp3", 3) == 0) { + global.audio_out = &mp3sound; + if (!global.quiet) { + unsigned char Lame_version[20]; - if (global.paranoia_parms.disable_paranoia) { - paranoia_mode = PARANOIA_MODE_DISABLE; - } - if (global.paranoia_parms.disable_extra_paranoia) { - paranoia_mode |= PARANOIA_MODE_OVERLAP; - paranoia_mode &= ~PARANOIA_MODE_VERIFY; - } - /* not yet implemented */ - if (global.paranoia_parms.disable_scratch_detect) { - paranoia_mode &= ~(PARANOIA_MODE_SCRATCH|PARANOIA_MODE_REPAIR); + fetch_lame_version(Lame_version); + fprintf(outfp, + _("Using LAME version %s.\n"), Lame_version); } - /* not yet implemented */ - if (global.paranoia_parms.disable_scratch_repair) { - paranoia_mode &= ~PARANOIA_MODE_REPAIR; + if (bits < 9) { + bits = 16; + fprintf(outfp, + _("Warning: sample size forced to 16 bit for MP3 format.\n")); } +#endif /* USE_LAME */ + } else { + usage2(_("Incorrect audio type setting: %3s\n"), audio_type); + } - paranoia_modeset(global.cdp, paranoia_mode); - if (global.verbose) - fprintf(stderr, "using lib paranoia for reading.\n"); - paranoia_seek(global.cdp, lSector, SEEK_SET); - paranoia_reset(); + if (bulk == -1) + bulk = 0; + + global.need_big_endian = global.audio_out->need_big_endian; + if (global.outputendianess != NONE) + global.need_big_endian = global.outputendianess == BIG; + + if (global.no_file) + global.fname_base[0] = '\0'; + + if (!bulk) { + strcat(global.fname_base, "."); + strcat(global.fname_base, audio_type); } -#endif -#if defined(HAVE_FORK_AND_SHAREDMEM) /* - * Everything is set up. Now fork and let one process read cdda sectors - * and let the other one store them in a wav file + * If we need to calculate with samples or write them to a soundcard, + * we need a conversion to host byte order. */ + if (global.channels != 2 || + bits != 16 || + rate != 44100) { + global.need_hostorder = 1; + } - /* forking */ - child_pid = fork(); - if (child_pid > 0 && global.gui > 0 && global.verbose > 0) - fprintf(stderr, "child pid is %d\n", child_pid); - - /* ********************** fork ************************************* */ - if (child_pid == 0) { - /* child WRITER section */ - -#ifdef HAVE_AREAS - /* - * Under BeOS a fork() with shared memory does not work as - * it does under System V Rel. 4. The mapping of the child - * works with copy on write semantics, so changes do not - * propagate back and forth. The existing mapping has to be - * deleted and replaced by an clone without copy on write - * semantics. - * This is done with clone_area(...,B_CLONE_ADDRESS,...). - * Thanks to file support.c from the postgreSQL project. - */ - area_info inf; - int32 cook = 0; - /* - * iterate over all mappings to find our shared memory mapping. - */ - while (get_next_area_info(0, &cook, &inf) == B_OK) { - /* check the name of the mapping. */ - if (strcmp(inf.name, AREA_NAME) == 0) { - void *area_address; - area_id area_parent; + /* + * Bad hack!! + * Remove for release 2.0 + * this is a bug compatibility feature. + */ + if (global.gui && global.verbose == SHOW_TOC) + global.verbose |= SHOW_STARTPOSITIONS | SHOW_SUMMARY | + SHOW_TITLES; - /* kill the cow mapping. */ - area_address = inf.address; - if (B_OK != delete_area(inf.area)) { - errmsgno(EX_BAD, - "delete_area: no valid area.\n"); - exit(SHMMEM_ERROR); - } - /* get the parent mapping. */ - area_parent = find_area(inf.name); - if (area_parent == B_NAME_NOT_FOUND) { - errmsgno(EX_BAD, - "find_area: no such area name.\n"); - exit(SHMMEM_ERROR); - } - /* clone the parent mapping without cow. */ - if (B_OK > clone_area("shm_child", - &area_address, B_CLONE_ADDRESS, - B_READ_AREA | B_WRITE_AREA, area_parent)) { - errmsgno(EX_BAD, - "clone_area failed\n"); - exit(SHMMEM_ERROR); + /* + * all options processed. + * Now a file name per track may follow + */ + argc2 = argc3 = argc - global.moreargs; + argv2 = argv + global.moreargs; + if (global.moreargs < argc) { + if (strcmp(argv[global.moreargs], "-") == 0) { + if (audiofd >= 0) { +#ifdef F_GETFD + if (fcntl(audiofd, F_GETFD, 0) < 0) { + comerr( + _("Cannot redirect audio data to fd %d.\n"), + audiofd); } - } - } -#endif -#ifdef __EMX__ - if (DosGetSharedMem(he_fill_buffer, 3)) { - comerr("DosGetSharedMem() failed.\n"); - } -#endif - global.have_forked = 1; - forked_write(); -#ifdef __EMX__ - DosFreeMem(he_fill_buffer); - _exit(NO_ERROR); - /* NOTREACHED */ #endif - exit_wrapper(NO_ERROR); - /* NOTREACHED */ - } else if (child_pid > 0) { - /* parent READER section */ - - global.have_forked = 1; - switch_to_realtime_priority(); - - forked_read(); -#ifdef HAVE_AREAS - { - area_id aid; - aid = find_area(AREA_NAME); - if (aid < B_OK) { - comerrno(aid, "find_area() failed.\n"); + global.audio = audiofd; + } else { + global.audio = dup(fileno(stdout)); } - delete_area(aid); - } -#endif -#ifdef __EMX__ - DosFreeMem(he_fill_buffer); -#endif - exit_wrapper(NO_ERROR); - /* NOTREACHED */ - } else { - errmsg("Cannot fork.\n"); - } - -#endif - /* version without fork */ - { - global.have_forked = 0; -#if 0 - if (!global.paranoia_selected) { - error("REAL\n"); - switch_to_realtime_priority(); + setmode(global.audio, O_BINARY); + strncpy(global.fname_base, "standard_output", + sizeof (global.fname_base)); + global.fname_base[sizeof (global.fname_base)-1] = 0; + } else if (!is_fifo(argv[global.moreargs])) { + /* + * we do have at least one argument + */ + global.multiname = 1; + strlcpy(global.fname_base, + argv[global.moreargs], + sizeof (global.fname_base)); } -#endif - fprintf(stderr, "a nonforking version is running...\n"); - nonforked_loop(); - exit_wrapper(NO_ERROR); - /* NOTREACHED */ } -#ifdef USE_PARANOIA - if (global.paranoia_selected) - paranoia_free(global.cdp); -#endif - - return (0); } diff -Nru cdrtools-2.01.01a33/cdda2wav/cdda2wav.h cdrtools-3.02a09/cdda2wav/cdda2wav.h --- cdrtools-2.01.01a33/cdda2wav/cdda2wav.h 2006-05-13 20:31:29.000000000 +0000 +++ cdrtools-3.02a09/cdda2wav/cdda2wav.h 2015-10-19 19:58:09.000000000 +0000 @@ -1,7 +1,7 @@ -/* @(#)cdda2wav.h 1.8 06/05/13 Copyright 1998,1999,2000 Heiko Eissfeldt, Copyright 2004-2006 J. Schilling */ +/* @(#)cdda2wav.h 1.9 15/10/19 Copyright 1998-2000,2015 Heiko Eissfeldt, Copyright 2004-2006 J. Schilling */ /* - * Copyright (C) by Heiko Eissfeldt - * Copyright (c) 2004-2006 J. Schilling + * Copyright (C) 1998-2000,2015 Heiko Eissfeldt + * Copyright (c) 2004-2006 J. Schilling * * prototypes from cdda2wav.c */ @@ -12,6 +12,8 @@ * with the License. * * See the file CDDL.Schily.txt in this distribution for details. + * A copy of the CDDL is also available via the Internet at + * http://www.opensource.org/licenses/cddl1.txt * * When distributing Covered Code, include this CDDL HEADER in each * file and include the License file CDDL.Schily.txt from this distribution. @@ -46,7 +48,7 @@ extern void FatalError __PR((int err, const char *szMessage, ...)); extern void AnalyzeQchannel __PR((unsigned frame)); extern long SamplesNeeded __PR((long amount, long undersampling)); -extern unsigned int get_current_track __PR((void)); +extern unsigned int get_current_track_writing __PR((void)); #if defined(sun) && !defined(SVR4) #define atexit(f) on_exit(f, 0) diff -Nru cdrtools-2.01.01a33/cdda2wav/cdda_paranoia.h cdrtools-3.02a09/cdda2wav/cdda_paranoia.h --- cdrtools-2.01.01a33/cdda2wav/cdda_paranoia.h 2007-07-28 13:01:57.000000000 +0000 +++ cdrtools-3.02a09/cdda2wav/cdda_paranoia.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,89 +0,0 @@ -/* @(#)cdda_paranoia.h 1.24 07/07/28 J. Schilling from cdparanoia-III-alpha9.8 */ -/* - * CopyPolicy: GNU Lesser General Public License v2.1 applies - * Copyright (C) 1997-2001 by Monty (xiphmont@mit.edu) - * Copyright (C) 2002-2006 by J. Schilling - */ - -#ifndef _CDROM_PARANOIA_H -#define _CDROM_PARANOIA_H - -#ifndef _SCHILY_MCONFIG_H -#include -#endif -#ifndef _SCHILY_UTYPES_H -#include -#endif - -#ifndef __GNUC__ -#define inline -#endif - -#define CD_FRAMESIZE_RAW 2352 -#define CD_FRAMEWORDS (CD_FRAMESIZE_RAW/2) - -/* - * Second parameter of the callback function - */ -#define PARANOIA_CB_READ 0 /* Read off adjust ??? */ -#define PARANOIA_CB_VERIFY 1 /* Verifying jitter */ -#define PARANOIA_CB_FIXUP_EDGE 2 /* Fixed edge jitter */ -#define PARANOIA_CB_FIXUP_ATOM 3 /* Fixed atom jitter */ -#define PARANOIA_CB_SCRATCH 4 /* Unsupported */ -#define PARANOIA_CB_REPAIR 5 /* Unsupported */ -#define PARANOIA_CB_SKIP 6 /* Skip exhausted retry */ -#define PARANOIA_CB_DRIFT 7 /* Drift detected */ -#define PARANOIA_CB_BACKOFF 8 /* Unsupported */ -#define PARANOIA_CB_OVERLAP 9 /* Dyn Overlap adjust */ -#define PARANOIA_CB_FIXUP_DROPPED 10 /* Fixed dropped bytes */ -#define PARANOIA_CB_FIXUP_DUPED 11 /* Fixed duplicate bytes */ -#define PARANOIA_CB_READERR 12 /* Hard read error */ - -/* - * Cdparanoia modes to be set with paranoia_modeset() - */ -#define PARANOIA_MODE_FULL 0xFF -#define PARANOIA_MODE_DISABLE 0 - -#define PARANOIA_MODE_VERIFY 1 /* Verify data integrity in overlap area */ -#define PARANOIA_MODE_FRAGMENT 2 /* unsupported */ -#define PARANOIA_MODE_OVERLAP 4 /* Perform overlapped reads */ -#define PARANOIA_MODE_SCRATCH 8 /* unsupported */ -#define PARANOIA_MODE_REPAIR 16 /* unsupported */ -#define PARANOIA_MODE_NEVERSKIP 32 /* Do not skip failed reads (retry maxretries) */ - - -#ifndef CDP_COMPILE -typedef void cdrom_paranoia; -#endif - -/* - * The interface from libcdparanoia to the high level caller - */ -extern cdrom_paranoia *paranoia_init __PR((void * d, int nsectors, - long (*d_read) __PR((void *d, void *buffer, - long beginsector, - long sectors)), - long (*d_disc_firstsector) __PR((void *d)), - long (*d_disc_lastsector) __PR((void *d)), - int (*d_tracks) __PR((void *d)), - long (*d_track_firstsector) __PR((void *d, int track)), - long (*d_track_lastsector) __PR((void *d, int track)), - int (*d_sector_gettrack) __PR((void *d, long sector)), - int (*d_track_audiop) __PR((void *d, int track)))); - -extern void paranoia_dynoverlapset __PR((cdrom_paranoia * p, - int minoverlap, - int maxoverlap)); -extern void paranoia_modeset __PR((cdrom_paranoia * p, int mode)); -extern long paranoia_seek __PR((cdrom_paranoia * p, long seek, int mode)); -extern Int16_t *paranoia_read __PR((cdrom_paranoia * p, void (*callback) (long, int))); -extern Int16_t *paranoia_read_limited __PR((cdrom_paranoia * p, void (*callback) (long, int), int maxretries)); -extern void paranoia_free __PR((cdrom_paranoia * p)); -extern void paranoia_overlapset __PR((cdrom_paranoia * p, long overlap)); - -#ifndef HAVE_MEMMOVE -#define memmove(dst, src, size) movebytes((src), (dst), (size)) -#endif - -#endif /* _CDROM_PARANOIA_H */ diff -Nru cdrtools-2.01.01a33/cdda2wav/cd_extra.c cdrtools-3.02a09/cdda2wav/cd_extra.c --- cdrtools-2.01.01a33/cdda2wav/cd_extra.c 2006-05-13 20:43:41.000000000 +0000 +++ cdrtools-3.02a09/cdda2wav/cd_extra.c 2016-02-14 21:53:40.000000000 +0000 @@ -1,7 +1,7 @@ -/* @(#)cd_extra.c 1.13 06/05/13 Copyright 2000-2001 Heiko Eissfeldt, Copyright 2004-2006 J. Schilling */ +/* @(#)cd_extra.c 1.20 16/02/14 Copyright 2000-2001 Heiko Eissfeldt, Copyright 2004-2010 J. Schilling */ #ifndef lint -static char _sccsid[] = -"@(#)cd_extra.c 1.13 06/05/13 Copyright 2000-2001 Heiko Eissfeldt, Copyright 2004-2006 J. Schilling"; +static const char _sccsid[] = +"@(#)cd_extra.c 1.20 16/02/14 Copyright 2000-2001 Heiko Eissfeldt, Copyright 2004-2010 J. Schilling"; #endif /* @@ -14,6 +14,8 @@ * with the License. * * See the file CDDL.Schily.txt in this distribution for details. + * A copy of the CDDL is also available via the Internet at + * http://www.opensource.org/licenses/cddl1.txt * * When distributing Covered Code, include this CDDL HEADER in each * file and include the License file CDDL.Schily.txt from this distribution. @@ -21,7 +23,7 @@ /**************** CD-Extra special treatment *********************************/ -#include +#include static unsigned long Read_CD_Extra_File __PR((unsigned char *Extra_buf, unsigned long sector)); @@ -84,10 +86,14 @@ int namelength; namelength = p[32]; + if (namelength < 1) /* Not a valid filename */ + return (0); if (namelength == 10 && !memcmp(p+33, "INFO.CDP;1", 10)) break; p += p[0]; + if (p[0] == 0) /* Avoid endless loop */ + return (0); /* with bad dir content */ } if (p+33 >= Extra_buf + CD_FRAMESIZE_RAW) return (0); @@ -199,7 +205,7 @@ orgSubp = Subp = malloc(length); if (Subp == NULL) { - errmsg("Read_Subinfo no memory(%d).\n", length); + errmsg(_("Read_Subinfo no memory(%d).\n"), length); goto errorout; } @@ -207,7 +213,7 @@ num_infos = Subp[45]+(Subp[44] << 8); #ifdef DEBUG_XTRA - fprintf(stderr, "subinfo version %c%c.%c%c, %d info packets\n", + fprintf(stderr, "subinfo version %c%c.%c%c, %u info packets\n", Subp[8], Subp[9], Subp[10], @@ -265,7 +271,7 @@ if (id >= INFOPACKETTYPES) { fprintf(stderr, - "Off=%4d, ind=%2d/%2d, unknown Id=%2u, len=%2u ", + "Off=%4d, ind=%2u/%2u, unknown Id=%2u, len=%2u ", /* * this pointer difference is assumed to be * small enough for an int. @@ -277,7 +283,7 @@ break; } #ifdef DEBUG_XTRA - fprintf(stderr, "info packet %d\n", id); + fprintf(stderr, "info packet %u\n", id); #endif switch (id) { @@ -328,12 +334,12 @@ } break; - case 0x08: /* creator */ - if (global.creator == NULL) { - global.creator = malloc(len + 1); - if (global.creator != NULL) { - memcpy(global.creator, Subp + 2, len); - global.creator[len] = '\0'; + case 0x08: /* creator -> CD-Text performer */ + if (global.performer == NULL) { + global.performer = malloc(len + 1); + if (global.performer != NULL) { + memcpy(global.performer, Subp + 2, len); + global.performer[len] = '\0'; } } break; @@ -358,7 +364,7 @@ case 0x0e: case 0x0f: #ifdef INFOPACKETSTRINGS - fprintf(stderr, "%s: %*.*s\n", + fprintf(outfp, "%s: %*.*s\n", infopacketID[id], (int) len, (int) len, (Subp +2)); #endif @@ -370,20 +376,20 @@ case 0x1c: case 0x1d: #ifdef INFOPACKETSTRINGS - fprintf(stderr, "%s %scopyrighted\n", + fprintf(outfp, _("%s %scopyrighted\n"), infopacketID[id], *(Subp + 2) == 0 ? - "not " : ""); + _("not ") : ""); #endif break; case 0x21: - fprintf(stderr, "lyrics file beginning at sector %u", + fprintf(outfp, _("lyrics file beginning at sector %u"), (unsigned) GET_BE_UINT_FROM_CHARP(Subp + 2)); if (len == 8) - fprintf(stderr, ", having length: %u\n", + fprintf(outfp, _(", having length: %u\n"), (unsigned) GET_BE_UINT_FROM_CHARP(Subp + 6)); else - fputs("\n", stderr); + fputs("\n", outfp); break; case 0x30: @@ -391,7 +397,7 @@ while (sp < Subp + 2 + len) { /*while (len >= 10) {*/ s = be16_to_cpu((*(sp)) | (*(sp) << 8)); - fprintf(stderr, "%04x, ", s); + fprintf(outfp, "%04x, ", s); sp += 2; up = sp; switch (s) { @@ -405,35 +411,35 @@ break; } u = GET_BE_UINT_FROM_CHARP(up); - fprintf(stderr, "%04lx, ", (long) u); + fprintf(outfp, "%04lx, ", (long) u); up += 4; u = GET_BE_UINT_FROM_CHARP(up); - fprintf(stderr, "%04lx, ", (long) u); + fprintf(outfp, "%04lx, ", (long) u); up += 4; sp += 8; } - fputs("\n", stderr); + fputs("\n", outfp); break; case 0x40: - fprintf(stderr, "MIDI file beginning at sector %u", + fprintf(outfp, _("MIDI file beginning at sector %u"), (unsigned) GET_BE_UINT_FROM_CHARP(Subp + 2)); if (len == 8) - fprintf(stderr, ", having length: %u\n", + fprintf(outfp, _(", having length: %u\n"), (unsigned) GET_BE_UINT_FROM_CHARP(Subp + 6)); else - fputs("\n", stderr); + fputs("\n", outfp); break; #ifdef INFOPACKETSTRINGS case 0x42: - fprintf(stderr, "%s: %d beats per minute\n", + fprintf(outfp, _("%s: %d beats per minute\n"), infopacketID[id], *(Subp + 2)); break; case 0x41: if (len == 8) { - fprintf(stderr, + fprintf(outfp, "%s: %x, %x, %x, %x, %x, %x, %x, %x\n", infopacketID[id], *(Subp + 2), @@ -445,17 +451,17 @@ *(Subp + 8), *(Subp + 9)); } else { - fprintf(stderr, "%s:\n", infopacketID[id]); + fprintf(outfp, "%s:\n", infopacketID[id]); } break; case 0x43: - fprintf(stderr, + fprintf(outfp, "%s: %x\n", infopacketID[id], *(Subp + 2)); break; default: - fprintf(stderr, + fprintf(outfp, "%s: %*.*s\n", infopacketID[id], (int)len, (int)len, (Subp +2)); #endif diff -Nru cdrtools-2.01.01a33/cdda2wav/cd_misc.c cdrtools-3.02a09/cdda2wav/cd_misc.c --- cdrtools-2.01.01a33/cdda2wav/cd_misc.c 2006-10-05 19:07:47.000000000 +0000 +++ cdrtools-3.02a09/cdda2wav/cd_misc.c 1970-01-01 00:00:00.000000000 +0000 @@ -1,189 +0,0 @@ -/* @(#)cd_misc.c 1.14 06/10/05 Copyright 1997-2006 J. Schilling */ -#ifndef lint -static char sccsid[] = - "@(#)cd_misc.c 1.14 06/10/05 Copyright 1997-2006 J. Schilling"; -#endif -/* - * Misc CD support routines - * - * Copyright (c) 1997-2006 J. Schilling - */ -/* - * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. - * - * See the file CDDL.Schily.txt in this distribution for details. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file CDDL.Schily.txt from this distribution. - */ - -#include -#include -#include /* Includes for caddr_t */ -#include -#include - -#include "cdrecord.h" - -EXPORT int from_bcd __PR((int b)); -EXPORT int to_bcd __PR((int i)); -EXPORT long msf_to_lba __PR((int m, int s, int f, BOOL force_positive)); -EXPORT BOOL lba_to_msf __PR((long lba, msf_t *mp)); -EXPORT void sec_to_msf __PR((long sec, msf_t *mp)); -EXPORT void print_min_atip __PR((long li, long lo)); -EXPORT BOOL is_cdspeed __PR((int speed)); - -EXPORT int -from_bcd(b) - int b; -{ - return ((b & 0x0F) + 10 * (((b)>> 4) & 0x0F)); -} - -EXPORT int -to_bcd(i) - int i; -{ - return (i % 10 | ((i / 10) % 10) << 4); -} - -EXPORT long -msf_to_lba(m, s, f, force_positive) - int m; - int s; - int f; - BOOL force_positive; -{ - long ret = m * 60 + s; - - ret *= 75; - ret += f; - if (m < 90 || force_positive) - ret -= 150; - else - ret -= 450150; - return (ret); -} - -EXPORT BOOL -lba_to_msf(lba, mp) - long lba; - msf_t *mp; -{ - int m; - int s; - int f; - -#ifdef __follow_redbook__ - if (lba >= -150 && lba < 405000) { /* lba <= 404849 */ -#else - if (lba >= -150) { -#endif - m = (lba + 150) / 60 / 75; - s = (lba + 150 - m*60*75) / 75; - f = (lba + 150 - m*60*75 - s*75); - - } else if (lba >= -45150 && lba <= -151) { - m = (lba + 450150) / 60 / 75; - s = (lba + 450150 - m*60*75) / 75; - f = (lba + 450150 - m*60*75 - s*75); - - } else { - mp->msf_min = -1; - mp->msf_sec = -1; - mp->msf_frame = -1; - - return (FALSE); - } - mp->msf_min = m; - mp->msf_sec = s; - mp->msf_frame = f; - - if (lba > 404849) /* 404850 -> 404999: lead out */ - return (FALSE); - return (TRUE); -} - -EXPORT void -sec_to_msf(sec, mp) - long sec; - msf_t *mp; -{ - int m; - int s; - int f; - - m = (sec) / 60 / 75; - s = (sec - m*60*75) / 75; - f = (sec - m*60*75 - s*75); - - mp->msf_min = m; - mp->msf_sec = s; - mp->msf_frame = f; -} - -EXPORT void -print_min_atip(li, lo) - long li; - long lo; -{ - msf_t msf; - - if (li < 0) { - lba_to_msf(li, &msf); - - printf(" ATIP start of lead in: %ld (%02d:%02d/%02d)\n", - li, msf.msf_min, msf.msf_sec, msf.msf_frame); - } - if (lo > 0) { - lba_to_msf(lo, &msf); - printf(" ATIP start of lead out: %ld (%02d:%02d/%02d)\n", - lo, msf.msf_min, msf.msf_sec, msf.msf_frame); - } -} - -/* - * Make a probability guess whether the speed is related to CD or DVD speed. - */ -EXPORT BOOL -is_cdspeed(speed) - int speed; -{ - int cdspeed; - long cdrest; - int dvdspeed; - long dvdrest; - - cdspeed = speed / 176; - cdrest = cdspeed * 1764; - cdrest = speed * 10 - cdrest; - if (cdrest < 0) - cdrest *= -1; - if (cdrest > 1764/2) - cdrest = 1764 - cdrest; - - /* - * 3324 = 1382 * 2.4 - * speed > 0.9 * 3324 && speed < 1.1 * 3324 - */ - if (speed >= 2990 && speed <= 3656) { - dvdrest = 33240; - dvdrest = speed * 10 - dvdrest; - } else { - dvdspeed = speed / 1385; - dvdrest = dvdspeed * 13850; - dvdrest = speed * 10 - dvdrest; - } - if (dvdrest < 0) - dvdrest *= -1; - if (dvdrest > 13850/2) - dvdrest = 13850 - dvdrest; - - /* - * 1385 / 176.4 = 7.85, so we need to multiply the CD rest by 7.85 - */ - return (dvdrest > (cdrest*8 - cdrest/6)); -} diff -Nru cdrtools-2.01.01a33/cdda2wav/cd_text.c cdrtools-3.02a09/cdda2wav/cd_text.c --- cdrtools-2.01.01a33/cdda2wav/cd_text.c 2006-05-13 20:43:41.000000000 +0000 +++ cdrtools-3.02a09/cdda2wav/cd_text.c 2010-12-19 19:06:01.000000000 +0000 @@ -1,4 +1,4 @@ -/* @(#)cd_text.c 1.7 06/05/13 Copyright 2000-2001 Heiko Eissfeldt */ +/* @(#)cd_text.c 1.11 10/12/19 Copyright 2000-2001 Heiko Eissfeldt, Copyright 2006-2010 J. Schilling */ /* * This is an include file! @@ -173,7 +173,7 @@ dump_binary(c) cdtextpackdata *c; { - fprintf(stderr, ": header fields %02x %02x %02x ", + fprintf(stderr, _(": header fields %02x %02x %02x "), c->headerfield[1], c->headerfield[2], c->headerfield[3]); fprintf(stderr, "%02x %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x", @@ -206,7 +206,7 @@ case 0x80: /* Title of album or track */ #if DETAILED - fprintf(stderr, "Title"); + fprintf(stderr, _("Title")); #endif if (tracknr > 0 && tracknr < 100 && global.tracktitle[tracknr] == NULL) { @@ -237,79 +237,220 @@ case 0x81: /* Name(s) of the performer(s) */ #if DETAILED - fprintf(stderr, "Performer(s)"); + fprintf(stderr, _("Performer(s)")); #endif if (tracknr > 0 && tracknr < 100 && - global.trackcreator[tracknr] == NULL) { + global.trackperformer[tracknr] == NULL) { unsigned len; len = strlen((char *)line); if (len > 0) - global.trackcreator[tracknr] = malloc(len + 1); + global.trackperformer[tracknr] = malloc(len + 1); - if (global.trackcreator[tracknr] != NULL) { - memcpy(global.trackcreator[tracknr], line, + if (global.trackperformer[tracknr] != NULL) { + memcpy(global.trackperformer[tracknr], line, len); - global.trackcreator[tracknr][len] = '\0'; + global.trackperformer[tracknr][len] = '\0'; } } else if (tracknr == 0 && - global.creator == NULL) { + global.performer == NULL) { unsigned len; len = strlen((char *)line); if (len > 0) - global.creator = malloc(len + 1); - if (global.creator != NULL) { - memcpy(global.creator, line, len); - global.creator[len] = '\0'; + global.performer = malloc(len + 1); + if (global.performer != NULL) { + memcpy(global.performer, line, len); + global.performer[len] = '\0'; } } break; case 0x82: /* Name(s) of the songwriter(s) */ #if DETAILED - fprintf(stderr, "Songwriter(s)"); + fprintf(stderr, _("Songwriter(s)")); #endif + if (tracknr > 0 && tracknr < 100 && + global.tracksongwriter[tracknr] == NULL) { + unsigned len; + + len = strlen((char *)line); + + if (len > 0) + global.tracksongwriter[tracknr] = malloc(len + 1); + + if (global.tracksongwriter[tracknr] != NULL) { + memcpy(global.tracksongwriter[tracknr], line, + len); + global.tracksongwriter[tracknr][len] = '\0'; + } + } else if (tracknr == 0 && + global.songwriter == NULL) { + unsigned len; + + len = strlen((char *)line); + + if (len > 0) + global.songwriter = malloc(len + 1); + if (global.songwriter != NULL) { + memcpy(global.songwriter, line, len); + global.songwriter[len] = '\0'; + } + } break; case 0x83: /* Name(s) of the composer(s) */ #if DETAILED - fprintf(stderr, "Composer(s)"); + fprintf(stderr, _("Composer(s)")); #endif + if (tracknr > 0 && tracknr < 100 && + global.trackcomposer[tracknr] == NULL) { + unsigned len; + + len = strlen((char *)line); + + if (len > 0) + global.trackcomposer[tracknr] = malloc(len + 1); + + if (global.trackcomposer[tracknr] != NULL) { + memcpy(global.trackcomposer[tracknr], line, + len); + global.trackcomposer[tracknr][len] = '\0'; + } + } else if (tracknr == 0 && + global.composer == NULL) { + unsigned len; + + len = strlen((char *)line); + + if (len > 0) + global.composer = malloc(len + 1); + if (global.composer != NULL) { + memcpy(global.composer, line, len); + global.composer[len] = '\0'; + } + } break; case 0x84: /* Name(s) of the arranger(s) */ #if DETAILED - fprintf(stderr, "Arranger(s)"); + fprintf(stderr, _("Arranger(s)")); #endif + if (tracknr > 0 && tracknr < 100 && + global.trackarranger[tracknr] == NULL) { + unsigned len; + + len = strlen((char *)line); + + if (len > 0) + global.trackarranger[tracknr] = malloc(len + 1); + + if (global.trackarranger[tracknr] != NULL) { + memcpy(global.trackarranger[tracknr], line, + len); + global.trackarranger[tracknr][len] = '\0'; + } + } else if (tracknr == 0 && + global.arranger == NULL) { + unsigned len; + + len = strlen((char *)line); + + if (len > 0) + global.arranger = malloc(len + 1); + if (global.arranger != NULL) { + memcpy(global.arranger, line, len); + global.arranger[len] = '\0'; + } + } break; case 0x85: /* Message from content provider and/or artist */ #if DETAILED - fprintf(stderr, "Message"); + fprintf(stderr, _("Message")); #endif + if (tracknr > 0 && tracknr < 100 && + global.trackmessage[tracknr] == NULL) { + unsigned len; + + len = strlen((char *)line); + + if (len > 0) + global.trackmessage[tracknr] = malloc(len + 1); + + if (global.trackmessage[tracknr] != NULL) { + memcpy(global.trackmessage[tracknr], line, + len); + global.trackmessage[tracknr][len] = '\0'; + } + } else if (tracknr == 0 && + global.message == NULL) { + unsigned len; + + len = strlen((char *)line); + + if (len > 0) + global.message = malloc(len + 1); + if (global.message != NULL) { + memcpy(global.message, line, len); + global.message[len] = '\0'; + } + } break; case 0x86: /* Disc Identification and information */ #if DETAILED - fprintf(stderr, "Disc identification"); + fprintf(stderr, _("Disc identification")); #endif if (tracknr == 0 && line[0] != '\0') { - fprintf(stderr, "Disc identification: %s\n", line); + fprintf(stderr, _("Disc identification: %s\n"), line); } break; case 0x87: /* Genre Identification and information */ #if DETAILED - fprintf(stderr, "Genre identification"); + fprintf(stderr, _("Genre identification")); +#endif + break; + + case 0x8d: /* Closed information */ +#if DETAILED + fprintf(stderr, _("Closed information")); #endif + if (tracknr > 0 && tracknr < 100 && + global.trackclosed_info[tracknr] == NULL) { + unsigned len; + + len = strlen((char *)line); + + if (len > 0) + global.trackclosed_info[tracknr] = malloc(len + 1); + + if (global.trackclosed_info[tracknr] != NULL) { + memcpy(global.trackclosed_info[tracknr], line, + len); + global.trackclosed_info[tracknr][len] = '\0'; + } + } else if (tracknr == 0 && + global.closed_info == NULL) { + unsigned len; + + len = strlen((char *)line); + + if (len > 0) + global.closed_info = malloc(len + 1); + if (global.closed_info != NULL) { + memcpy(global.closed_info, line, len); + global.closed_info[len] = '\0'; + } + } break; case 0x8e: /* UPC/EAN code or ISRC code */ #if DETAILED - fprintf(stderr, "UPC or ISRC"); + fprintf(stderr, _("UPC or ISRC")); #endif if (tracknr > 0 && tracknr < 100) { Set_ISRC(tracknr, line); @@ -320,14 +461,14 @@ case 0x88: /* Table of Content information */ #if DETAILED - fprintf(stderr, "Table of Content identification"); + fprintf(stderr, _("Table of Content identification")); dump_binary(c); #endif return (0); case 0x89: /* Second Table of Content information */ #if DETAILED - fprintf(stderr, "Second Table of Content identification"); + fprintf(stderr, _("Second Table of Content identification")); dump_binary(c); #endif return (0); @@ -339,84 +480,84 @@ switch (tracknr) { case 0: - fprintf(stderr, - "first track is %d, last track is %d\n", + fprintf(outfp, + _("first track is %d, last track is %d\n"), c->textdatafield[1], c->textdatafield[2]); if (c->textdatafield[3] & 0x80) { - fprintf(stderr, - "Program Area CD Text information available\n"); + fprintf(outfp, + _("Program Area CD Text information available\n")); if (c->textdatafield[3] & 0x40) { - fprintf(stderr, "Program Area copy protection available\n"); + fprintf(outfp, _("Program Area copy protection available\n")); } } if (c->textdatafield[3] & 0x07) { - fprintf(stderr, - "message information is %scopyrighted\n", + fprintf(outfp, + _("message information is %scopyrighted\n"), c->textdatafield[3] & 0x04 ? - "": "not "); - fprintf(stderr, - "Names of performer/songwriter/composer/arranger(s) are %scopyrighted\n", + "": _("not ")); + fprintf(outfp, + _("Names of performer/songwriter/composer/arranger(s) are %scopyrighted\n"), c->textdatafield[3] & 0x02 ? - "": "not "); - fprintf(stderr, - "album and track names are %scopyrighted\n", + "": _("not ")); + fprintf(outfp, + _("album and track names are %scopyrighted\n"), c->textdatafield[3] & 0x01 ? - "": "not "); + "": _("not ")); } - fprintf(stderr, - "%d packs with album/track names\n", + fprintf(outfp, + _("%d packs with album/track names\n"), c->textdatafield[4]); - fprintf(stderr, - "%d packs with performer names\n", + fprintf(outfp, + _("%d packs with performer names\n"), c->textdatafield[5]); - fprintf(stderr, - "%d packs with songwriter names\n", + fprintf(outfp, + _("%d packs with songwriter names\n"), c->textdatafield[6]); - fprintf(stderr, - "%d packs with composer names\n", + fprintf(outfp, + _("%d packs with composer names\n"), c->textdatafield[7]); - fprintf(stderr, - "%d packs with arranger names\n", + fprintf(outfp, + _("%d packs with arranger names\n"), c->textdatafield[8]); - fprintf(stderr, - "%d packs with artist or content provider messages\n", + fprintf(outfp, + _("%d packs with artist or content provider messages\n"), c->textdatafield[9]); - fprintf(stderr, - "%d packs with disc identification information\n", + fprintf(outfp, + _("%d packs with disc identification information\n"), c->textdatafield[10]); - fprintf(stderr, - "%d packs with genre identification/information\n", + fprintf(outfp, + _("%d packs with genre identification/information\n"), c->textdatafield[11]); break; case 1: - fprintf(stderr, - "%d packs with table of contents information\n", + fprintf(outfp, + _("%d packs with table of contents information\n"), c->textdatafield[0]); - fprintf(stderr, - "%d packs with second table of contents information\n", + fprintf(outfp, + _("%d packs with second table of contents information\n"), c->textdatafield[1]); - fprintf(stderr, - "%d packs with reserved information\n", + fprintf(outfp, + _("%d packs with reserved information\n"), c->textdatafield[2]); - fprintf(stderr, - "%d packs with reserved information\n", + fprintf(outfp, + _("%d packs with reserved information\n"), c->textdatafield[3]); - fprintf(stderr, - "%d packs with reserved information\n", + fprintf(outfp, + _("%d packs with reserved information\n"), c->textdatafield[4]); - fprintf(stderr, - "%d packs with closed information\n", + fprintf(outfp, + _("%d packs with closed information\n"), c->textdatafield[5]); - fprintf(stderr, - "%d packs with UPC/EAN ISRC information\n", + fprintf(outfp, + _("%d packs with UPC/EAN ISRC information\n"), c->textdatafield[6]); - fprintf(stderr, - "%d packs with size information\n", + fprintf(outfp, + _("%d packs with size information\n"), c->textdatafield[7]); - fprintf(stderr, - "last sequence numbers for blocks 1-8: %d %d %d %d ", + fprintf(outfp, + _("last sequence numbers for blocks 1-8: %d %d %d %d "), c->textdatafield[8], c->textdatafield[9], c->textdatafield[10], @@ -424,13 +565,13 @@ break; case 2: - fprintf(stderr, "%d %d %d %d\n", + fprintf(outfp, "%d %d %d %d\n", c->textdatafield[0], c->textdatafield[1], c->textdatafield[2], c->textdatafield[3]); - fprintf(stderr, - "Language codes for blocks 1-8: %d %d %d %d %d %d %d %d\n", + fprintf(outfp, + _("Language codes for blocks 1-8: %d %d %d %d %d %d %d %d\n"), c->textdatafield[4], c->textdatafield[5], c->textdatafield[6], @@ -442,7 +583,7 @@ break; } - fprintf(stderr, "Blocksize"); + fprintf(stderr, _("Blocksize")); dump_binary(c); return (0); @@ -452,7 +593,7 @@ } #endif - fprintf(stderr, ": header fields %02x %02x %02x ", + fprintf(stderr, _(": header fields %02x %02x %02x "), c->headerfield[1], c->headerfield[2], c->headerfield[3]); #endif /* DETAILED */ @@ -461,9 +602,9 @@ } #if DETAILED if (tracknr == 0) { - fprintf(stderr, " for album : ->"); + fprintf(stderr, _(" for album : ->")); } else { - fprintf(stderr, " for track %2u: ->", tracknr); + fprintf(stderr, _(" for track %2u: ->"), tracknr); } fputs((char *)line, stderr); fputs("<-", stderr); diff -Nru cdrtools-2.01.01a33/cdda2wav/config.guess cdrtools-3.02a09/cdda2wav/config.guess --- cdrtools-2.01.01a33/cdda2wav/config.guess 2007-06-05 12:25:01.000000000 +0000 +++ cdrtools-3.02a09/cdda2wav/config.guess 1970-01-01 00:00:00.000000000 +0000 @@ -1,984 +0,0 @@ -#! /bin/sh -# Attempt to guess a canonical system name. -# Copyright (C) 1992, 93, 94, 95, 96, 97, 1998 Free Software Foundation, Inc. -# -# This file is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -# -# As a special exception to the GNU General Public License, if you -# distribute this file as part of a program that contains a -# configuration script generated by Autoconf, you may include it under -# the same distribution terms that you use for the rest of that program. - -# Written by Per Bothner . -# The master version of this file is at the FSF in /home/gd/gnu/lib. -# -# This script attempts to guess a canonical system name similar to -# config.sub. If it succeeds, it prints the system name on stdout, and -# exits with 0. Otherwise, it exits with 1. -# -# The plan is that this can be called by configure scripts if you -# don't specify an explicit system type (host/target name). -# -# Only a few systems have been added to this list; please add others -# (but try to keep the structure clean). -# - -# This is needed to find uname on a Pyramid OSx when run in the BSD universe. -# (ghazi@noc.rutgers.edu 8/24/94.) -if (test -f /.attbin/uname) >/dev/null 2>&1 ; then - PATH=$PATH:/.attbin ; export PATH -fi - -UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown -UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown -UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown -UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown - -trap 'rm -f dummy.c dummy.o dummy; exit 1' 1 2 15 - -# Note: order is significant - the case branches are not exclusive. - -case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in - alpha:OSF1:*:*) - if test $UNAME_RELEASE = "V4.0"; then - UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` - fi - # A Vn.n version is a released version. - # A Tn.n version is a released field test version. - # A Xn.n version is an unreleased experimental baselevel. - # 1.2 uses "1.2" for uname -r. - cat <dummy.s - .globl main - .ent main -main: - .frame \$30,0,\$26,0 - .prologue 0 - .long 0x47e03d80 # implver $0 - lda \$2,259 - .long 0x47e20c21 # amask $2,$1 - srl \$1,8,\$2 - sll \$2,2,\$2 - sll \$0,3,\$0 - addl \$1,\$0,\$0 - addl \$2,\$0,\$0 - ret \$31,(\$26),1 - .end main -EOF - ${CC-cc} dummy.s -o dummy 2>/dev/null - if test "$?" = 0 ; then - ./dummy - case "$?" in - 7) - UNAME_MACHINE="alpha" - ;; - 15) - UNAME_MACHINE="alphaev5" - ;; - 14) - UNAME_MACHINE="alphaev56" - ;; - 10) - UNAME_MACHINE="alphapca56" - ;; - 16) - UNAME_MACHINE="alphaev6" - ;; - esac - fi - rm -f dummy.s dummy - echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[VTX]//' | tr [[A-Z]] [[a-z]]` - exit 0 ;; - 21064:Windows_NT:50:3) - echo alpha-dec-winnt3.5 - exit 0 ;; - Amiga*:UNIX_System_V:4.0:*) - echo m68k-cbm-sysv4 - exit 0;; - amiga:NetBSD:*:*) - echo m68k-cbm-netbsd${UNAME_RELEASE} - exit 0 ;; - amiga:OpenBSD:*:*) - echo m68k-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - *:[Aa]miga[Oo][Ss]:*:*) - echo ${UNAME_MACHINE}-unknown-amigaos - exit 0 ;; - arc64:OpenBSD:*:*) - echo mips64el-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - arc:OpenBSD:*:*) - echo mipsel-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - hkmips:OpenBSD:*:*) - echo mips-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - pmax:OpenBSD:*:*) - echo mipsel-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - sgi:OpenBSD:*:*) - echo mips-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - wgrisc:OpenBSD:*:*) - echo mipsel-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) - echo arm-acorn-riscix${UNAME_RELEASE} - exit 0;; - arm32:NetBSD:*:*) - echo arm-unknown-netbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` - exit 0 ;; - SR2?01:HI-UX/MPP:*:*) - echo hppa1.1-hitachi-hiuxmpp - exit 0;; - Pyramid*:OSx*:*:*|MIS*:OSx*:*:*|MIS*:SMP_DC-OSx*:*:*) - # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. - if test "`(/bin/universe) 2>/dev/null`" = att ; then - echo pyramid-pyramid-sysv3 - else - echo pyramid-pyramid-bsd - fi - exit 0 ;; - NILE:*:*:dcosx) - echo pyramid-pyramid-svr4 - exit 0 ;; - sun4H:SunOS:5.*:*) - echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit 0 ;; - sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) - echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit 0 ;; - i86pc:SunOS:5.*:*) - echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit 0 ;; - sun4*:SunOS:6*:*) - # According to config.sub, this is the proper way to canonicalize - # SunOS6. Hard to guess exactly what SunOS6 will be like, but - # it's likely to be more like Solaris than SunOS4. - echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit 0 ;; - sun4*:SunOS:*:*) - case "`/usr/bin/arch -k`" in - Series*|S4*) - UNAME_RELEASE=`uname -v` - ;; - esac - # Japanese Language versions have a version number like `4.1.3-JL'. - echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'` - exit 0 ;; - sun3*:SunOS:*:*) - echo m68k-sun-sunos${UNAME_RELEASE} - exit 0 ;; - sun*:*:4.2BSD:*) - UNAME_RELEASE=`(head -1 /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` - test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 - case "`/bin/arch`" in - sun3) - echo m68k-sun-sunos${UNAME_RELEASE} - ;; - sun4) - echo sparc-sun-sunos${UNAME_RELEASE} - ;; - esac - exit 0 ;; - aushp:SunOS:*:*) - echo sparc-auspex-sunos${UNAME_RELEASE} - exit 0 ;; - atari*:NetBSD:*:*) - echo m68k-atari-netbsd${UNAME_RELEASE} - exit 0 ;; - atari*:OpenBSD:*:*) - echo m68k-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - sun3*:NetBSD:*:*) - echo m68k-sun-netbsd${UNAME_RELEASE} - exit 0 ;; - sun3*:OpenBSD:*:*) - echo m68k-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - mac68k:NetBSD:*:*) - echo m68k-apple-netbsd${UNAME_RELEASE} - exit 0 ;; - mac68k:OpenBSD:*:*) - echo m68k-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - mvme68k:OpenBSD:*:*) - echo m68k-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - mvme88k:OpenBSD:*:*) - echo m88k-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - powerpc:machten:*:*) - echo powerpc-apple-machten${UNAME_RELEASE} - exit 0 ;; - macppc:NetBSD:*:*) - echo powerpc-apple-netbsd${UNAME_RELEASE} - exit 0 ;; - RISC*:Mach:*:*) - echo mips-dec-mach_bsd4.3 - exit 0 ;; - RISC*:ULTRIX:*:*) - echo mips-dec-ultrix${UNAME_RELEASE} - exit 0 ;; - VAX*:ULTRIX*:*:*) - echo vax-dec-ultrix${UNAME_RELEASE} - exit 0 ;; - 2020:CLIX:*:*) - echo clipper-intergraph-clix${UNAME_RELEASE} - exit 0 ;; - mips:*:*:UMIPS | mips:*:*:RISCos) - sed 's/^ //' << EOF >dummy.c - int main (argc, argv) int argc; char **argv; { - #if defined (host_mips) && defined (MIPSEB) - #if defined (SYSTYPE_SYSV) - printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0); - #endif - #if defined (SYSTYPE_SVR4) - printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0); - #endif - #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD) - printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0); - #endif - #endif - exit (-1); - } -EOF - ${CC-cc} dummy.c -o dummy \ - && ./dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \ - && rm dummy.c dummy && exit 0 - rm -f dummy.c dummy - echo mips-mips-riscos${UNAME_RELEASE} - exit 0 ;; - Night_Hawk:Power_UNIX:*:*) - echo powerpc-harris-powerunix - exit 0 ;; - m88k:CX/UX:7*:*) - echo m88k-harris-cxux7 - exit 0 ;; - m88k:*:4*:R4*) - echo m88k-motorola-sysv4 - exit 0 ;; - m88k:*:3*:R3*) - echo m88k-motorola-sysv3 - exit 0 ;; - AViiON:dgux:*:*) - # DG/UX returns AViiON for all architectures - UNAME_PROCESSOR=`/usr/bin/uname -p` - if [ $UNAME_PROCESSOR = mc88100 -o $UNAME_PROCESSOR = mc88110 ] ; then - if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx \ - -o ${TARGET_BINARY_INTERFACE}x = x ] ; then - echo m88k-dg-dgux${UNAME_RELEASE} - else - echo m88k-dg-dguxbcs${UNAME_RELEASE} - fi - else echo i586-dg-dgux${UNAME_RELEASE} - fi - exit 0 ;; - M88*:DolphinOS:*:*) # DolphinOS (SVR3) - echo m88k-dolphin-sysv3 - exit 0 ;; - M88*:*:R3*:*) - # Delta 88k system running SVR3 - echo m88k-motorola-sysv3 - exit 0 ;; - XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) - echo m88k-tektronix-sysv3 - exit 0 ;; - Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) - echo m68k-tektronix-bsd - exit 0 ;; - *:IRIX*:*:*) - echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'` - exit 0 ;; - ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. - echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id - exit 0 ;; # Note that: echo "'`uname -s`'" gives 'AIX ' - i?86:AIX:*:*) - echo i386-ibm-aix - exit 0 ;; - *:AIX:2:3) - if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then - sed 's/^ //' << EOF >dummy.c - #include - - main() - { - if (!__power_pc()) - exit(1); - puts("powerpc-ibm-aix3.2.5"); - exit(0); - } -EOF - ${CC-cc} dummy.c -o dummy && ./dummy && rm dummy.c dummy && exit 0 - rm -f dummy.c dummy - echo rs6000-ibm-aix3.2.5 - elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then - echo rs6000-ibm-aix3.2.4 - else - echo rs6000-ibm-aix3.2 - fi - exit 0 ;; - *:AIX:*:4) - IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | head -1 | awk '{ print $1 }'` - if /usr/sbin/lsattr -EHl ${IBM_CPU_ID} | grep POWER >/dev/null 2>&1; then - IBM_ARCH=rs6000 - else - IBM_ARCH=powerpc - fi - if [ -x /usr/bin/oslevel ] ; then - IBM_REV=`/usr/bin/oslevel` - else - IBM_REV=4.${UNAME_RELEASE} - fi - echo ${IBM_ARCH}-ibm-aix${IBM_REV} - exit 0 ;; - *:AIX:*:*) - echo rs6000-ibm-aix - exit 0 ;; - ibmrt:4.4BSD:*|romp-ibm:BSD:*) - echo romp-ibm-bsd4.4 - exit 0 ;; - ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC NetBSD and - echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to - exit 0 ;; # report: romp-ibm BSD 4.3 - *:BOSX:*:*) - echo rs6000-bull-bosx - exit 0 ;; - DPX/2?00:B.O.S.:*:*) - echo m68k-bull-sysv3 - exit 0 ;; - 9000/[34]??:4.3bsd:1.*:*) - echo m68k-hp-bsd - exit 0 ;; - hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) - echo m68k-hp-bsd4.4 - exit 0 ;; - 9000/[34678]??:HP-UX:*:*) - case "${UNAME_MACHINE}" in - 9000/31? ) HP_ARCH=m68000 ;; - 9000/[34]?? ) HP_ARCH=m68k ;; - 9000/6?? | 9000/7?? | 9000/80[24] | 9000/8?[13679] | 9000/892 | 9000/820 | 9000/800 ) - sed 's/^ //' << EOF >dummy.c - #include - #include - - int main () - { - #if defined(_SC_KERNEL_BITS) - long bits = sysconf(_SC_KERNEL_BITS); - #endif - long cpu = sysconf (_SC_CPU_VERSION); - - switch (cpu) - { - case CPU_PA_RISC1_0: puts ("hppa1.0"); break; - case CPU_PA_RISC1_1: puts ("hppa1.1"); break; - case CPU_PA_RISC2_0: - #if defined(_SC_KERNEL_BITS) - switch (bits) - { - case 64: puts ("hppa2.0w"); break; - case 32: puts ("hppa2.0n"); break; - default: puts ("hppa2.0"); break; - } break; - #else /* !defined(_SC_KERNEL_BITS) */ - puts ("hppa2.0"); break; - #endif - default: puts ("hppa1.0"); break; - } - exit (0); - } -EOF - (${CC-cc} dummy.c -o dummy 2>/dev/null ) && HP_ARCH=`./dummy` - rm -f dummy.c dummy - esac - HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` - echo ${HP_ARCH}-hp-hpux${HPUX_REV} - exit 0 ;; - 3050*:HI-UX:*:*) - sed 's/^ //' << EOF >dummy.c - #include - int - main () - { - long cpu = sysconf (_SC_CPU_VERSION); - /* The order matters, because CPU_IS_HP_MC68K erroneously returns - true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct - results, however. */ - if (CPU_IS_PA_RISC (cpu)) - { - switch (cpu) - { - case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break; - case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break; - case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break; - default: puts ("hppa-hitachi-hiuxwe2"); break; - } - } - else if (CPU_IS_HP_MC68K (cpu)) - puts ("m68k-hitachi-hiuxwe2"); - else puts ("unknown-hitachi-hiuxwe2"); - exit (0); - } -EOF - ${CC-cc} dummy.c -o dummy && ./dummy && rm dummy.c dummy && exit 0 - rm -f dummy.c dummy - echo unknown-hitachi-hiuxwe2 - exit 0 ;; - 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) - echo hppa1.1-hp-bsd - exit 0 ;; - 9000/8??:4.3bsd:*:*) - echo hppa1.0-hp-bsd - exit 0 ;; - hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) - echo hppa1.1-hp-osf - exit 0 ;; - hp8??:OSF1:*:*) - echo hppa1.0-hp-osf - exit 0 ;; - i?86:OSF1:*:*) - if [ -x /usr/sbin/sysversion ] ; then - echo ${UNAME_MACHINE}-unknown-osf1mk - else - echo ${UNAME_MACHINE}-unknown-osf1 - fi - exit 0 ;; - parisc*:Lites*:*:*) - echo hppa1.1-hp-lites - exit 0 ;; - C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) - echo c1-convex-bsd - exit 0 ;; - C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) - if getsysinfo -f scalar_acc - then echo c32-convex-bsd - else echo c2-convex-bsd - fi - exit 0 ;; - C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) - echo c34-convex-bsd - exit 0 ;; - C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) - echo c38-convex-bsd - exit 0 ;; - C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) - echo c4-convex-bsd - exit 0 ;; - CRAY*X-MP:*:*:*) - echo xmp-cray-unicos - exit 0 ;; - CRAY*Y-MP:*:*:*) - echo ymp-cray-unicos${UNAME_RELEASE} - exit 0 ;; - CRAY*[A-Z]90:*:*:*) - echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ - | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ - -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ - exit 0 ;; - CRAY*TS:*:*:*) - echo t90-cray-unicos${UNAME_RELEASE} - exit 0 ;; - CRAY-2:*:*:*) - echo cray2-cray-unicos - exit 0 ;; - F300:UNIX_System_V:*:*) - FUJITSU_SYS=`uname -p | tr [A-Z] [a-z] | sed -e 's/\///'` - FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` - echo "f300-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" - exit 0 ;; - F301:UNIX_System_V:*:*) - echo f301-fujitsu-uxpv`echo $UNAME_RELEASE | sed 's/ .*//'` - exit 0 ;; - hp3[0-9][05]:NetBSD:*:*) - echo m68k-hp-netbsd${UNAME_RELEASE} - exit 0 ;; - hp300:OpenBSD:*:*) - echo m68k-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - sparc*:BSD/OS:*:*) - echo sparc-unknown-bsdi${UNAME_RELEASE} - exit 0 ;; - i?86:BSD/386:*:* | *:BSD/OS:*:*) - echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} - exit 0 ;; - *:FreeBSD:*:*) - echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` - exit 0 ;; - *:NetBSD:*:*) - echo ${UNAME_MACHINE}-unknown-netbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` - exit 0 ;; - *:OpenBSD:*:*) - echo ${UNAME_MACHINE}-unknown-openbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` - exit 0 ;; - i*:CYGWIN*:*) - echo ${UNAME_MACHINE}-pc-cygwin - exit 0 ;; - i*:MINGW*:*) - echo ${UNAME_MACHINE}-pc-mingw32 - exit 0 ;; - p*:CYGWIN*:*) - echo powerpcle-unknown-cygwin - exit 0 ;; - x86:Interix*:3*) - echo i586-pc-interix3 - exit 0 ;; - prep*:SunOS:5.*:*) - echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit 0 ;; - *:GNU:*:*) - echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` - exit 0 ;; - s390:Linux:*:* | s390x:Linux:*:*) - echo ${UNAME_MACHINE}-ibm-linux - exit 0 ;; - *:Linux:*:*) - # uname on the ARM produces all sorts of strangeness, and we need to - # filter it out. - case "$UNAME_MACHINE" in - arm* | sa110*) UNAME_MACHINE="arm" ;; - esac - - # The BFD linker knows what the default object file format is, so - # first see if it will tell us. - ld_help_string=`ld --help 2>&1` - ld_supported_emulations=`echo $ld_help_string \ - | sed -ne '/supported emulations:/!d - s/[ ][ ]*/ /g - s/.*supported emulations: *// - s/ .*// - p'` - case "$ld_supported_emulations" in - i?86linux) echo "${UNAME_MACHINE}-pc-linux-gnuaout" ; exit 0 ;; - i?86coff) echo "${UNAME_MACHINE}-pc-linux-gnucoff" ; exit 0 ;; - sparclinux) echo "${UNAME_MACHINE}-unknown-linux-gnuaout" ; exit 0 ;; - armlinux) echo "${UNAME_MACHINE}-unknown-linux-gnuaout" ; exit 0 ;; - m68klinux) echo "${UNAME_MACHINE}-unknown-linux-gnuaout" ; exit 0 ;; - elf32ppc) echo "powerpc-unknown-linux-gnu" ; exit 0 ;; - esac - - if test "${UNAME_MACHINE}" = "alpha" ; then - sed 's/^ //' <dummy.s - .globl main - .ent main - main: - .frame \$30,0,\$26,0 - .prologue 0 - .long 0x47e03d80 # implver $0 - lda \$2,259 - .long 0x47e20c21 # amask $2,$1 - srl \$1,8,\$2 - sll \$2,2,\$2 - sll \$0,3,\$0 - addl \$1,\$0,\$0 - addl \$2,\$0,\$0 - ret \$31,(\$26),1 - .end main -EOF - LIBC="" - ${CC-cc} dummy.s -o dummy 2>/dev/null - if test "$?" = 0 ; then - ./dummy - case "$?" in - 7) - UNAME_MACHINE="alpha" - ;; - 15) - UNAME_MACHINE="alphaev5" - ;; - 14) - UNAME_MACHINE="alphaev56" - ;; - 10) - UNAME_MACHINE="alphapca56" - ;; - 16) - UNAME_MACHINE="alphaev6" - ;; - esac - - objdump --private-headers dummy | \ - grep ld.so.1 > /dev/null - if test "$?" = 0 ; then - LIBC="libc1" - fi - fi - rm -f dummy.s dummy - echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} ; exit 0 - elif test "${UNAME_MACHINE}" = "mips" ; then - cat >dummy.c </dev/null && ./dummy "${UNAME_MACHINE}" && rm dummy.c dummy && exit 0 - rm -f dummy.c dummy - else - # Either a pre-BFD a.out linker (linux-gnuoldld) - # or one that does not give us useful --help. - # GCC wants to distinguish between linux-gnuoldld and linux-gnuaout. - # If ld does not provide *any* "supported emulations:" - # that means it is gnuoldld. - echo "$ld_help_string" | grep >/dev/null 2>&1 "supported emulations:" - test $? != 0 && echo "${UNAME_MACHINE}-pc-linux-gnuoldld" && exit 0 - - case "${UNAME_MACHINE}" in - i?86) - VENDOR=pc; - ;; - *) - VENDOR=unknown; - ;; - esac - # Determine whether the default compiler is a.out or elf - cat >dummy.c < -main(argc, argv) - int argc; - char *argv[]; -{ -#if defined __ELF__ || defined __SUNPRO_C -# ifdef __GLIBC__ -# if __GLIBC__ >= 2 - printf ("%s-${VENDOR}-linux-gnu\n", argv[1]); -# else - printf ("%s-${VENDOR}-linux-gnulibc1\n", argv[1]); -# endif -# else - printf ("%s-${VENDOR}-linux-gnulibc1\n", argv[1]); -# endif -#else - printf ("%s-${VENDOR}-linux-gnuaout\n", argv[1]); -#endif - return 0; -} -EOF - ${CC-cc} dummy.c -o dummy 2>/dev/null && ./dummy "${UNAME_MACHINE}" && rm dummy.c dummy && exit 0 - rm -f dummy.c dummy - fi ;; -# ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. earlier versions -# are messed up and put the nodename in both sysname and nodename. - i?86:DYNIX/ptx:4*:*) - echo i386-sequent-sysv4 - exit 0 ;; - i?86:UNIX_SV:4.2MP:2.*) - # Unixware is an offshoot of SVR4, but it has its own version - # number series starting with 2... - # I am not positive that other SVR4 systems won't match this, - # I just have to hope. -- rms. - # Use sysv4.2uw... so that sysv4* matches it. - echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} - exit 0 ;; - i?86:*:4.*:* | i?86:SYSTEM_V:4.*:*) - if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then - echo ${UNAME_MACHINE}-univel-sysv${UNAME_RELEASE} - else - echo ${UNAME_MACHINE}-pc-sysv${UNAME_RELEASE} - fi - exit 0 ;; - i?86:MS-DOS:5:50) - # DJGPP v2 - echo ${UNAME_MACHINE}-pc-msdos - exit 0 ;; - i?86:*:5:*) - # Fixed at (any) Pentium or better - UNAME_MACHINE=i586 - if [ ${UNAME_SYSTEM} = "UnixWare" ] || - [ ${UNAME_SYSTEM} = "OpenUNIX" ]; then - echo ${UNAME_MACHINE}-sco-sysv${UNAME_RELEASE}uw${UNAME_VERSION} - else - echo ${UNAME_MACHINE}-pc-sysv${UNAME_RELEASE} - fi - exit 0 ;; - i?86:*:3.2:*) - if test -f /usr/options/cb.name; then - UNAME_REL=`sed -n 's/.*Version //p' /dev/null >/dev/null ; then - UNAME_REL=`(/bin/uname -X|egrep Release|sed -e 's/.*= //')` - (/bin/uname -X|egrep i80486 >/dev/null) && UNAME_MACHINE=i486 - (/bin/uname -X|egrep '^Machine.*Pentium' >/dev/null) \ - && UNAME_MACHINE=i586 - echo ${UNAME_MACHINE}-pc-sco$UNAME_REL - else - echo ${UNAME_MACHINE}-pc-sysv32 - fi - exit 0 ;; - pc:*:*:*) - # uname -m prints for DJGPP always 'pc', but it prints nothing about - # the processor, so we play safe by assuming i386. - echo i386-pc-msdosdjgpp - exit 0 ;; - Intel:Mach:3*:*) - echo i386-pc-mach3 - exit 0 ;; - paragon:*:*:*) - echo i860-intel-osf1 - exit 0 ;; - i860:*:4.*:*) # i860-SVR4 - if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then - echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4 - else # Add other i860-SVR4 vendors below as they are discovered. - echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4 - fi - exit 0 ;; - mini*:CTIX:SYS*5:*) - # "miniframe" - echo m68010-convergent-sysv - exit 0 ;; - M68*:*:R3V[567]*:*) - test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;; - 3[34]??:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 4850:*:4.0:3.0) - OS_REL='' - test -r /etc/.relid \ - && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` - /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ - && echo i486-ncr-sysv4.3${OS_REL} && exit 0 - /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ - && echo i586-ncr-sysv4.3${OS_REL} && exit 0 ;; - 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) - /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ - && echo i486-ncr-sysv4 && exit 0 ;; - m68*:LynxOS:2.*:*) - echo m68k-unknown-lynxos${UNAME_RELEASE} - exit 0 ;; - mc68030:UNIX_System_V:4.*:*) - echo m68k-atari-sysv4 - exit 0 ;; - i?86:LynxOS:2.*:*) - echo i386-unknown-lynxos${UNAME_RELEASE} - exit 0 ;; - TSUNAMI:LynxOS:2.*:*) - echo sparc-unknown-lynxos${UNAME_RELEASE} - exit 0 ;; - rs6000:LynxOS:2.*:* | PowerPC:LynxOS:2.*:*) - echo rs6000-unknown-lynxos${UNAME_RELEASE} - exit 0 ;; - SM[BE]S:UNIX_SV:*:*) - echo mips-dde-sysv${UNAME_RELEASE} - exit 0 ;; - RM*:SINIX-*:*:*) - echo mips-sni-sysv4 - exit 0 ;; - *:SINIX-*:*:*) - if uname -p 2>/dev/null >/dev/null ; then - UNAME_MACHINE=`(uname -p) 2>/dev/null` - echo ${UNAME_MACHINE}-sni-sysv4 - else - echo ns32k-sni-sysv - fi - exit 0 ;; - PENTIUM:CPunix:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort - # says - echo i586-unisys-sysv4 - exit 0 ;; - *:UNIX_System_V:4*:FTX*) - # From Gerald Hewes . - # How about differentiating between stratus architectures? -djm - echo hppa1.1-stratus-sysv4 - exit 0 ;; - *:*:*:FTX*) - # From seanf@swdc.stratus.com. - echo i860-stratus-sysv4 - exit 0 ;; - mc68*:A/UX:*:*) - echo m68k-apple-aux${UNAME_RELEASE} - exit 0 ;; - news*:NEWS-OS:*:6*) - echo mips-sony-newsos6 - exit 0 ;; - R3000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R4000:UNIX_SV:*:*) - if [ -d /usr/nec ]; then - echo mips-nec-sysv${UNAME_RELEASE} - else - echo mips-unknown-sysv${UNAME_RELEASE} - fi - exit 0 ;; - BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. - echo powerpc-be-beos - exit 0 ;; - BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. - echo powerpc-apple-beos - exit 0 ;; - BePC:BeOS:*:*) # BeOS running on Intel PC compatible. - echo i586-pc-beos - exit 0 ;; - "Power Macintosh":Rhapsody:*) - echo powerpc-apple-rhapsody${UNAME_RELEASE} - exit 0 ;; - "Power Macintosh":"Mac OS":*) - echo powerpc-apple-macosx${UNAME_RELEASE} - exit 0 ;; - "Power Macintosh":"Darwin":*) - echo powerpc-apple-macosx${UNAME_RELEASE} - exit 0 ;; - "i386":"Darwin":*) - echo i386-apple-macosx${UNAME_RELEASE} - exit 0 ;; - *:OS/2:*:*) - echo "i386-pc-os2_emx" - exit 0;; -esac - -#echo '(No uname command or uname output not recognized.)' 1>&2 -#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2 - -cat >dummy.c < -# include -#endif -main () -{ -#if defined (sony) -#if defined (MIPSEB) - /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed, - I don't know.... */ - printf ("mips-sony-bsd\n"); exit (0); -#else -#include - printf ("m68k-sony-newsos%s\n", -#ifdef NEWSOS4 - "4" -#else - "" -#endif - ); exit (0); -#endif -#endif - -#if defined (__arm) && defined (__acorn) && defined (__unix) - printf ("arm-acorn-riscix"); exit (0); -#endif - -#if defined (hp300) && !defined (hpux) - printf ("m68k-hp-bsd\n"); exit (0); -#endif - -#if defined (NeXT) -#if !defined (__ARCHITECTURE__) -#define __ARCHITECTURE__ "m68k" -#endif - int version; - version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`; - printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version); - exit (0); -#endif - -#if defined (MULTIMAX) || defined (n16) -#if defined (UMAXV) - printf ("ns32k-encore-sysv\n"); exit (0); -#else -#if defined (CMU) - printf ("ns32k-encore-mach\n"); exit (0); -#else - printf ("ns32k-encore-bsd\n"); exit (0); -#endif -#endif -#endif - -#if defined (__386BSD__) - printf ("i386-pc-bsd\n"); exit (0); -#endif - -#if defined (sequent) -#if defined (i386) - printf ("i386-sequent-dynix\n"); exit (0); -#endif -#if defined (ns32000) - printf ("ns32k-sequent-dynix\n"); exit (0); -#endif -#endif - -#if defined (_SEQUENT_) - struct utsname un; - - uname(&un); - - if (strncmp(un.version, "V2", 2) == 0) { - printf ("i386-sequent-ptx2\n"); exit (0); - } - if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */ - printf ("i386-sequent-ptx1\n"); exit (0); - } - printf ("i386-sequent-ptx\n"); exit (0); - -#endif - -#if defined (vax) -#if !defined (ultrix) - printf ("vax-dec-bsd\n"); exit (0); -#else - printf ("vax-dec-ultrix\n"); exit (0); -#endif -#endif - -#if defined (alliant) && defined (i860) - printf ("i860-alliant-bsd\n"); exit (0); -#endif - - exit (1); -} -EOF - -${CC-cc} dummy.c -o dummy 2>/dev/null && ./dummy && rm dummy.c dummy && exit 0 -rm -f dummy.c dummy - -# Apollos put the system type in the environment. - -test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit 0; } - -# Convex versions that predate uname can use getsysinfo(1) - -if [ -x /usr/convex/getsysinfo ] -then - case `getsysinfo -f cpu_type` in - c1*) - echo c1-convex-bsd - exit 0 ;; - c2*) - if getsysinfo -f scalar_acc - then echo c32-convex-bsd - else echo c2-convex-bsd - fi - exit 0 ;; - c34*) - echo c34-convex-bsd - exit 0 ;; - c38*) - echo c38-convex-bsd - exit 0 ;; - c4*) - echo c4-convex-bsd - exit 0 ;; - esac -fi - -if [ x$CONFIG_NOFAIL = xTRUE ]; then - echo unknownCPU-unknownMFR-unknownOS - exit 0 -fi - -#echo '(Unable to guess system type)' 1>&2 - -exit 1 diff -Nru cdrtools-2.01.01a33/cdda2wav/config.h cdrtools-3.02a09/cdda2wav/config.h --- cdrtools-2.01.01a33/cdda2wav/config.h 2006-09-13 15:42:39.000000000 +0000 +++ cdrtools-3.02a09/cdda2wav/config.h 2009-04-19 12:20:47.000000000 +0000 @@ -1,4 +1,4 @@ -/* @(#)config.h 1.11 06/09/13 Copyright 1998-2003 Heiko Eissfeldt */ +/* @(#)config.h 1.14 09/04/19 Copyright 1998-2003 Heiko Eissfeldt, Copyright 2006-2009 J. Schilling */ /* * a central configuration file */ @@ -14,6 +14,8 @@ * file and include the License file CDDL.Schily.txt from this distribution. */ +#ifndef _CONFIG_H +#define _CONFIG_H #include #if __STDC__-0 != 0 || (defined PROTOTYPES && defined STDC_HEADERS) @@ -31,11 +33,23 @@ #include "lconfig.h" -/* temporary until a autoconf check is present */ +/* + * First the old static check. + */ #ifdef __BEOS__ #define HAVE_AREAS 1 #endif +#if defined(HAVE_OS_H) && \ + defined(HAVE_CLONE_AREA) && defined(HAVE_CREATE_AREA) && \ + defined(HAVE_DELETE_AREA) +# define HAVE_BEOS_AREAS /* BeOS/Zeta/Haiku */ +# ifndef HAVE_AREAS +# define HAVE_AREAS 1 +# endif +#endif + + #if defined HAVE_FORK && (defined(HAVE_SMMAP) || defined(HAVE_USGSHM) || \ defined(HAVE_DOSALLOCSHAREDMEM) || defined(HAVE_AREAS)) #define HAVE_FORK_AND_SHAREDMEM @@ -47,3 +61,5 @@ #if !defined HAVE_MEMMOVE #define memmove(dst, src, size) movebytes((src), (dst), (size)) #endif + +#endif /* _CONFIG_H */ diff -Nru cdrtools-2.01.01a33/cdda2wav/config.sub cdrtools-3.02a09/cdda2wav/config.sub --- cdrtools-2.01.01a33/cdda2wav/config.sub 2006-06-29 13:11:48.000000000 +0000 +++ cdrtools-3.02a09/cdda2wav/config.sub 1970-01-01 00:00:00.000000000 +0000 @@ -1,972 +0,0 @@ -#! /bin/sh -# Configuration validation subroutine script, version 1.1. -# Copyright (C) 1991, 92-97, 1998 Free Software Foundation, Inc. -# This file is (in principle) common to ALL GNU software. -# The presence of a machine in this file suggests that SOME GNU software -# can handle that machine. It does not imply ALL GNU software can. -# -# This file is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, -# Boston, MA 02111-1307, USA. - -# As a special exception to the GNU General Public License, if you -# distribute this file as part of a program that contains a -# configuration script generated by Autoconf, you may include it under -# the same distribution terms that you use for the rest of that program. - -# Configuration subroutine to validate and canonicalize a configuration type. -# Supply the specified configuration type as an argument. -# If it is invalid, we print an error message on stderr and exit with code 1. -# Otherwise, we print the canonical config type on stdout and succeed. - -# This file is supposed to be the same for all GNU packages -# and recognize all the CPU types, system types and aliases -# that are meaningful with *any* GNU software. -# Each package is responsible for reporting which valid configurations -# it does not support. The user should be able to distinguish -# a failure to support a valid configuration from a meaningless -# configuration. - -# The goal of this file is to map all the various variations of a given -# machine specification into a single specification in the form: -# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM -# or in some cases, the newer four-part form: -# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM -# It is wrong to echo any other type of specification. - -if [ x$1 = x ] -then - echo Configuration name missing. 1>&2 - echo "Usage: $0 CPU-MFR-OPSYS" 1>&2 - echo "or $0 ALIAS" 1>&2 - echo where ALIAS is a recognized configuration type. 1>&2 - exit 1 -fi - -# First pass through any local machine types. -case $1 in - *local*) - echo $1 - exit 0 - ;; - *) - ;; -esac - -# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any). -# Here we must recognize all the valid KERNEL-OS combinations. -maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` -case $maybe_os in - linux-gnu*) - os=-$maybe_os - basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` - ;; - *) - basic_machine=`echo $1 | sed 's/-[^-]*$//'` - if [ $basic_machine != $1 ] - then os=`echo $1 | sed 's/.*-/-/'` - else os=; fi - ;; -esac - -### Let's recognize common machines as not being operating systems so -### that things like config.sub decstation-3100 work. We also -### recognize some manufacturers as not being operating systems, so we -### can provide default operating systems below. -case $os in - -sun*os*) - # Prevent following clause from handling this invalid input. - ;; - -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \ - -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \ - -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \ - -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ - -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ - -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ - -apple) - os= - basic_machine=$1 - ;; - -hiux*) - os=-hiuxwe2 - ;; - -sco5) - os=sco3.2v5 - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -sco4) - os=-sco3.2v4 - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -sco3.2.[4-9]*) - os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -sco3.2v[4-9]*) - # Don't forget version if it is 3.2v4 or newer. - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -sco*) - os=-sco3.2v2 - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -isc) - os=-isc2.2 - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -clix*) - basic_machine=clipper-intergraph - ;; - -isc*) - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -lynx*) - os=-lynxos - ;; - -ptx*) - basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'` - ;; - -windowsnt*) - os=`echo $os | sed -e 's/windowsnt/winnt/'` - ;; - -psos*) - os=-psos - ;; -esac - -# Decode aliases for certain CPU-COMPANY combinations. -case $basic_machine in - # Recognize the basic CPU types without company name. - # Some are omitted here because they have special meanings below. - tahoe | i860 | m32r | m68k | m68000 | m88k | ns32k | arc | arm \ - | arme[lb] | pyramid | mn10200 | mn10300 | tron | a29k \ - | 580 | i960 | h8300 | hppa | hppa1.0 | hppa1.1 | hppa2.0 | hppa2.0? \ - | alpha | alphaev5 | alphaev56 | we32k | ns16k | clipper \ - | i370 | sh | powerpc | powerpcle | 1750a | dsp16xx | pdp11 \ - | mips64 | mipsel | mips64el | mips64orion | mips64orionel \ - | mipstx39 | mipstx39el \ - | sparc | sparclet | sparclite | sparc64 | v850) - basic_machine=$basic_machine-unknown - ;; - - # We use `pc' rather than `unknown' - # because (1) that's what they normally are, and - # (2) the word "unknown" tends to confuse beginning users. - i[34567]86) - basic_machine=$basic_machine-pc - ;; - # Object if more than one company name word. - *-*-*) - echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 - exit 1 - ;; - # Recognize the basic CPU types with company name. - vax-* | tahoe-* | i[34567]86-* | i860-* | m32r-* | m68k-* | m68000-* \ - | m88k-* | sparc-* | ns32k-* | fx80-* | arc-* | arm-* | c[123]* \ - | mips-* | pyramid-* | tron-* | a29k-* | romp-* | rs6000-* \ - | power-* | none-* | 580-* | cray2-* | h8300-* | i960-* \ - | xmp-* | ymp-* | hppa-* | hppa1.0-* | hppa1.1-* | hppa2.0-* | hppa2.0?-* \ - | ia64-* \ - | alpha-* | alphaev5-* | alphaev56-* | alphaev6-* | we32k-* | cydra-* \ - | ns16k-* | pn-* | np1-* | xps100-* | clipper-* | orion-* \ - | sparclite-* | pdp11-* | sh-* | powerpc-* | powerpcle-* \ - | sparc64-* | mips64-* | mipsel-* \ - | mips64el-* | mips64orion-* | mips64orionel-* \ - | mipstx39-* | mipstx39el-* \ - | f301-* \ - | x86-* | x86_64-*) - ;; - # Recognize the various machine names and aliases which stand - # for a CPU type and a company and sometimes even an OS. - 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) - basic_machine=m68000-att - ;; - 3b*) - basic_machine=we32k-att - ;; - alliant | fx80) - basic_machine=fx80-alliant - ;; - altos | altos3068) - basic_machine=m68k-altos - ;; - am29k) - basic_machine=a29k-none - os=-bsd - ;; - amdahl) - basic_machine=580-amdahl - os=-sysv - ;; - amiga | amiga-*) - basic_machine=m68k-cbm - ;; - amigaos | amigados) - basic_machine=m68k-cbm - os=-amigaos - ;; - amigaunix | amix) - basic_machine=m68k-cbm - os=-sysv4 - ;; - apollo68) - basic_machine=m68k-apollo - os=-sysv - ;; - aux) - basic_machine=m68k-apple - os=-aux - ;; - balance) - basic_machine=ns32k-sequent - os=-dynix - ;; - convex-c1) - basic_machine=c1-convex - os=-bsd - ;; - convex-c2) - basic_machine=c2-convex - os=-bsd - ;; - convex-c32) - basic_machine=c32-convex - os=-bsd - ;; - convex-c34) - basic_machine=c34-convex - os=-bsd - ;; - convex-c38) - basic_machine=c38-convex - os=-bsd - ;; - cray | ymp) - basic_machine=ymp-cray - os=-unicos - ;; - cray2) - basic_machine=cray2-cray - os=-unicos - ;; - [ctj]90-cray) - basic_machine=c90-cray - os=-unicos - ;; - crds | unos) - basic_machine=m68k-crds - ;; - da30 | da30-*) - basic_machine=m68k-da30 - ;; - decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn) - basic_machine=mips-dec - ;; - delta | 3300 | motorola-3300 | motorola-delta \ - | 3300-motorola | delta-motorola) - basic_machine=m68k-motorola - ;; - delta88) - basic_machine=m88k-motorola - os=-sysv3 - ;; - dpx20 | dpx20-*) - basic_machine=rs6000-bull - os=-bosx - ;; - dpx2* | dpx2*-bull) - basic_machine=m68k-bull - os=-sysv3 - ;; - ebmon29k) - basic_machine=a29k-amd - os=-ebmon - ;; - elxsi) - basic_machine=elxsi-elxsi - os=-bsd - ;; - encore | umax | mmax) - basic_machine=ns32k-encore - ;; - fx2800) - basic_machine=i860-alliant - ;; - genix) - basic_machine=ns32k-ns - ;; - gmicro) - basic_machine=tron-gmicro - os=-sysv - ;; - h3050r* | hiux*) - basic_machine=hppa1.1-hitachi - os=-hiuxwe2 - ;; - h8300hms) - basic_machine=h8300-hitachi - os=-hms - ;; - harris) - basic_machine=m88k-harris - os=-sysv3 - ;; - hp300-*) - basic_machine=m68k-hp - ;; - hp300bsd) - basic_machine=m68k-hp - os=-bsd - ;; - hp300hpux) - basic_machine=m68k-hp - os=-hpux - ;; - hp9k2[0-9][0-9] | hp9k31[0-9]) - basic_machine=m68000-hp - ;; - hp9k3[2-9][0-9]) - basic_machine=m68k-hp - ;; - hp9k7[0-9][0-9] | hp7[0-9][0-9] | hp9k8[0-9]7 | hp8[0-9]7) - basic_machine=hppa1.1-hp - ;; - hp9k8[0-9][0-9] | hp8[0-9][0-9]) - basic_machine=hppa1.0-hp - ;; - hppa-next) - os=-nextstep3 - ;; - i370-ibm* | ibm*) - basic_machine=i370-ibm - os=-mvs - ;; -# I'm not sure what "Sysv32" means. Should this be sysv3.2? - i[34567]86v32) - basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` - os=-sysv32 - ;; - i[34567]86v4*) - basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` - os=-sysv4 - ;; - i[34567]86v) - basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` - os=-sysv - ;; - i[34567]86sol2) - basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` - os=-solaris2 - ;; - iris | iris4d) - basic_machine=mips-sgi - case $os in - -irix*) - ;; - *) - os=-irix4 - ;; - esac - ;; - isi68 | isi) - basic_machine=m68k-isi - os=-sysv - ;; - m88k-omron*) - basic_machine=m88k-omron - ;; - magnum | m3230) - basic_machine=mips-mips - os=-sysv - ;; - merlin) - basic_machine=ns32k-utek - os=-sysv - ;; - miniframe) - basic_machine=m68000-convergent - ;; - mipsel*-linux*) - basic_machine=mipsel-unknown - os=-linux-gnu - ;; - mips*-linux*) - basic_machine=mips-unknown - os=-linux-gnu - ;; - mips3*-*) - basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'` - ;; - mips3*) - basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown - ;; - ncr3000) - basic_machine=i486-ncr - os=-sysv4 - ;; - news | news700 | news800 | news900) - basic_machine=m68k-sony - os=-newsos - ;; - news1000) - basic_machine=m68030-sony - os=-newsos - ;; - news-3600 | risc-news) - basic_machine=mips-sony - os=-newsos - ;; - next | m*-next ) - basic_machine=m68k-next - case $os in - -nextstep* ) - ;; - -ns2*) - os=-nextstep2 - ;; - *) - os=-nextstep3 - ;; - esac - ;; - nh3000) - basic_machine=m68k-harris - os=-cxux - ;; - nh[45]000) - basic_machine=m88k-harris - os=-cxux - ;; - nindy960) - basic_machine=i960-intel - os=-nindy - ;; - np1) - basic_machine=np1-gould - ;; - pa-hitachi) - basic_machine=hppa1.1-hitachi - os=-hiuxwe2 - ;; - paragon) - basic_machine=i860-intel - os=-osf - ;; - parisc-unknown) - basic_machine=parisc-unknown - ;; - pbd) - basic_machine=sparc-tti - ;; - pbb) - basic_machine=m68k-tti - ;; - pc532 | pc532-*) - basic_machine=ns32k-pc532 - ;; - pentium | p5 | k5 | nexen) - basic_machine=i586-pc - ;; - pentiumpro | p6 | k6 | 6x86) - basic_machine=i686-pc - ;; - pentiumii | pentium2) - basic_machine=i786-pc - ;; - pentium-* | p5-* | k5-* | nexen-*) - basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - pentiumpro-* | p6-* | k6-* | 6x86-*) - basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - pentiumii-* | pentium2-*) - basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - pn) - basic_machine=pn-gould - ;; - power) basic_machine=rs6000-ibm - ;; - ppc) basic_machine=powerpc-unknown - ;; - ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - ppcle | powerpclittle | ppc-le | powerpc-little) - basic_machine=powerpcle-unknown - ;; - ppcle-* | powerpclittle-*) - basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - ps2) - basic_machine=i386-ibm - ;; - rm[46]00) - basic_machine=mips-siemens - ;; - rtpc | rtpc-*) - basic_machine=romp-ibm - ;; - s390 | s390-*) - basic_machine=s390-ibm - ;; - s390x | s390x-*) - basic_machine=s390x-ibm - ;; - sequent) - basic_machine=i386-sequent - ;; - sh) - basic_machine=sh-hitachi - os=-hms - ;; - sps7) - basic_machine=m68k-bull - os=-sysv2 - ;; - spur) - basic_machine=spur-unknown - ;; - sun2) - basic_machine=m68000-sun - ;; - sun2os3) - basic_machine=m68000-sun - os=-sunos3 - ;; - sun2os4) - basic_machine=m68000-sun - os=-sunos4 - ;; - sun3os3) - basic_machine=m68k-sun - os=-sunos3 - ;; - sun3os4) - basic_machine=m68k-sun - os=-sunos4 - ;; - sun4os3) - basic_machine=sparc-sun - os=-sunos3 - ;; - sun4os4) - basic_machine=sparc-sun - os=-sunos4 - ;; - sun4sol2) - basic_machine=sparc-sun - os=-solaris2 - ;; - sun3 | sun3-*) - basic_machine=m68k-sun - ;; - sun4) - basic_machine=sparc-sun - ;; - sun386 | sun386i | roadrunner) - basic_machine=i386-sun - ;; - symmetry) - basic_machine=i386-sequent - os=-dynix - ;; - tx39) - basic_machine=mipstx39-unknown - ;; - tx39el) - basic_machine=mipstx39el-unknown - ;; - tower | tower-32) - basic_machine=m68k-ncr - ;; - udi29k) - basic_machine=a29k-amd - os=-udi - ;; - ultra3) - basic_machine=a29k-nyu - os=-sym1 - ;; - vaxv) - basic_machine=vax-dec - os=-sysv - ;; - vms) - basic_machine=vax-dec - os=-vms - ;; - vpp*|vx|vx-*) - basic_machine=f301-fujitsu - ;; - vxworks960) - basic_machine=i960-wrs - os=-vxworks - ;; - vxworks68) - basic_machine=m68k-wrs - os=-vxworks - ;; - vxworks29k) - basic_machine=a29k-wrs - os=-vxworks - ;; - xmp) - basic_machine=xmp-cray - os=-unicos - ;; - xps | xps100) - basic_machine=xps100-honeywell - ;; - none) - basic_machine=none-none - os=-none - ;; - -# Here we handle the default manufacturer of certain CPU types. It is in -# some cases the only manufacturer, in others, it is the most popular. - mips) - if [ x$os = x-linux-gnu ]; then - basic_machine=mips-unknown - else - basic_machine=mips-mips - fi - ;; - romp) - basic_machine=romp-ibm - ;; - rs6000) - basic_machine=rs6000-ibm - ;; - vax) - basic_machine=vax-dec - ;; - pdp11) - basic_machine=pdp11-dec - ;; - we32k) - basic_machine=we32k-att - ;; - sparc) - basic_machine=sparc-sun - ;; - cydra) - basic_machine=cydra-cydrome - ;; - orion) - basic_machine=orion-highlevel - ;; - orion105) - basic_machine=clipper-highlevel - ;; - *) - echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 - exit 1 - ;; -esac - -# Here we canonicalize certain aliases for manufacturers. -case $basic_machine in - *-digital*) - basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'` - ;; - *-commodore*) - basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'` - ;; - *) - ;; -esac - -# Decode manufacturer-specific aliases for certain operating systems. - -if [ x"$os" != x"" ] -then -case $os in - # First match some system type aliases - # that might get confused with valid system types. - # -solaris* is a basic system type, with this one exception. - -solaris1 | -solaris1.*) - os=`echo $os | sed -e 's|solaris1|sunos4|'` - ;; - -solaris) - os=-solaris2 - ;; - -svr4*) - os=-sysv4 - ;; - -unixware*) - os=-sysv4.2uw - ;; - -gnu/linux*) - os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'` - ;; - # First accept the basic system types. - # The portable systems comes first. - # Each alternative MUST END IN A *, to match a version number. - # -sysv* is not here because it comes later, after sysvr4. - -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ - | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\ - | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \ - | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ - | -aos* \ - | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ - | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ - | -hiux* | -386bsd* | -netbsd* | -openbsd* | -freebsd* | -riscix* \ - | -lynxos* | -bosx* | -nextstep* | -cxux* | -aout* | -elf* \ - | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ - | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ - | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ - | -mingw32* | -linux-gnu* | -uxpv* | -beos* | -os2* \ - | -interix* | -uwin* | -mks* | -rhapsody* | -macos* ) - # Remember, each alternative MUST END IN *, to match a version number. - ;; - -linux*) - os=`echo $os | sed -e 's|linux|linux-gnu|'` - ;; - -sunos5*) - os=`echo $os | sed -e 's|sunos5|solaris2|'` - ;; - -sunos6*) - os=`echo $os | sed -e 's|sunos6|solaris3|'` - ;; - -osfrose*) - os=-osfrose - ;; - -osf*) - os=-osf - ;; - -utek*) - os=-bsd - ;; - -dynix*) - os=-bsd - ;; - -acis*) - os=-aos - ;; - -ctix* | -uts*) - os=-sysv - ;; - -ns2 ) - os=-nextstep2 - ;; - # Preserve the version number of sinix5. - -sinix5.*) - os=`echo $os | sed -e 's|sinix|sysv|'` - ;; - -sinix*) - os=-sysv4 - ;; - -triton*) - os=-sysv3 - ;; - -oss*) - os=-sysv3 - ;; - -svr4) - os=-sysv4 - ;; - -svr3) - os=-sysv3 - ;; - # For sys5.3 apollo - -sys5.3) - os=-sysv3 - ;; - -sysvr4) - os=-sysv4 - ;; - # This must come after -sysvr4. - -sysv*) - ;; - -xenix) - os=-xenix - ;; - -none) - ;; - *) - # Get rid of the `-' at the beginning of $os. - os=`echo $os | sed 's/[^-]*-//'` - echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2 - exit 1 - ;; -esac -else - -# Here we handle the default operating systems that come with various machines. -# The value should be what the vendor currently ships out the door with their -# machine or put another way, the most popular os provided with the machine. - -# Note that if you're going to try to match "-MANUFACTURER" here (say, -# "-sun"), then you have to tell the case statement up towards the top -# that MANUFACTURER isn't an operating system. Otherwise, code above -# will signal an error saying that MANUFACTURER isn't an operating -# system, and we'll never get to this point. - -case $basic_machine in - *-acorn) - os=-riscix1.2 - ;; - arm*-semi) - os=-aout - ;; - pdp11-*) - os=-none - ;; - *-dec | vax-*) - os=-ultrix4.2 - ;; - m68*-apollo) - os=-domain - ;; - i386-sun) - os=-sunos4.0.2 - ;; - m68000-sun) - os=-sunos3 - # This also exists in the configure program, but was not the - # default. - # os=-sunos4 - ;; - *-tti) # must be before sparc entry or we get the wrong os. - os=-sysv3 - ;; - sparc-* | *-sun) - os=-sunos4.1.1 - ;; - *-be) - os=-beos - ;; - *-ibm) - os=-aix - ;; - *-hp) - os=-hpux - ;; - *-hitachi) - os=-hiux - ;; - i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent) - os=-sysv - ;; - *-cbm) - os=-amigaos - ;; - *-dg) - os=-dgux - ;; - *-dolphin) - os=-sysv3 - ;; - m68k-ccur) - os=-rtu - ;; - m88k-omron*) - os=-luna - ;; - *-next ) - os=-nextstep - ;; - *-sequent) - os=-ptx - ;; - *-crds) - os=-unos - ;; - *-ns) - os=-genix - ;; - i370-*) - os=-mvs - ;; - *-next) - os=-nextstep3 - ;; - *-gould) - os=-sysv - ;; - *-highlevel) - os=-bsd - ;; - *-encore) - os=-bsd - ;; - *-sgi) - os=-irix - ;; - *-siemens) - os=-sysv4 - ;; - *-masscomp) - os=-rtu - ;; - f301-fujitsu) - os=-uxpv - ;; - *) - os=-none - ;; -esac -fi - -# Here we handle the case where we know the os, and the CPU type, but not the -# manufacturer. We pick the logical manufacturer. -vendor=unknown -case $basic_machine in - *-unknown) - case $os in - -riscix*) - vendor=acorn - ;; - -sunos*) - vendor=sun - ;; - -aix*) - vendor=ibm - ;; - -hpux*) - vendor=hp - ;; - -hiux*) - vendor=hitachi - ;; - -unos*) - vendor=crds - ;; - -dgux*) - vendor=dg - ;; - -luna*) - vendor=omron - ;; - -genix*) - vendor=ns - ;; - -mvs*) - vendor=ibm - ;; - -ptx*) - vendor=sequent - ;; - -vxsim* | -vxworks*) - vendor=wrs - ;; - -aux*) - vendor=apple - ;; - esac - basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"` - ;; -esac - -echo $basic_machine$os diff -Nru cdrtools-2.01.01a33/cdda2wav/configure cdrtools-3.02a09/cdda2wav/configure --- cdrtools-2.01.01a33/cdda2wav/configure 2007-04-23 22:20:09.000000000 +0000 +++ cdrtools-3.02a09/cdda2wav/configure 2017-06-28 18:21:05.000000000 +0000 @@ -1,8 +1,9 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated automatically using autoconf version 2.13 +# Generated automatically using autoconf version 2.13 1.17-Schily # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc. +# Copyright (C) 1998-2016 J. Schilling # # This configure script is free software; the Free Software Foundation # gives unlimited permission to copy, distribute and modify it. @@ -31,6 +32,9 @@ srcdir= target=NONE verbose= +rmttest=test +rmtcall= +CONFIG_RMTCALL=${CONFIG_RMTCALL-NONE} x_includes=NONE x_libraries=NONE bindir='${exec_prefix}/bin' @@ -336,7 +340,7 @@ verbose=yes ;; -version | --version | --versio | --versi | --vers) - echo "configure generated by autoconf version 2.13" + echo "configure generated by autoconf version 2.13 1.17-Schily" exit 0 ;; -with-* | --with-*) @@ -506,8 +510,14 @@ # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. ac_cpp='$CPP $CPPFLAGS' ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' -ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' +ac_compile2='${CC-cc} -c $CFLAGS $CPPFLAGS conftest2.$ac_ext 1>&5' +ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS conftest.$ac_ext $LDFLAGS $LIBS 1>&5' cross_compiling=$ac_cv_prog_cc_cross +if test "$cross_compiling" = yes -a "$CONFIG_RMTCALL" != NONE ; then + cross_compiling=remote + rmtcall="$CONFIG_RMTCALL" + rmttest="$CONFIG_RMTCALL" +fi ac_exeext= ac_xexeext= @@ -553,7 +563,7 @@ fi echo $ac_n "checking host system type""... $ac_c" 1>&6 -echo "configure:557: checking host system type" >&5 +echo "configure:567: checking host system type" >&5 host_alias=$host case "$host_alias" in @@ -571,7 +581,7 @@ host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` -echo "$ac_t""$host" 1>&6 +eval echo "$ac_t""$host" 1>&6 @@ -579,15 +589,15 @@ case "$host_os" in solaris*|sunos*) echo $ac_n "checking for sched_get_priority_max in -lposix4""... $ac_c" 1>&6 -echo "configure:583: checking for sched_get_priority_max in -lposix4" >&5 +echo "configure:593: checking for sched_get_priority_max in -lposix4" >&5 ac_lib_var=`echo posix4'_'sched_get_priority_max | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_save_LIBS="$LIBS" -LIBS="-lposix4 $LIBS" +LIBS=`echo "-lposix4 $LIBS" | sed -e 's/-lc //'` cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { eval echo configure:612: \"$ac_link\" 1>&5; eval $ac_link 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -612,7 +622,7 @@ fi if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then - echo "$ac_t""yes" 1>&6 + eval echo "$ac_t""yes" 1>&6 ac_tr_lib=HAVE_LIB`echo posix4 | sed -e 's/[^a-zA-Z0-9_]/_/g' \ -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` cat >> confdefs.h <&6 + eval echo "$ac_t""no" 1>&6 fi ;; esac echo $ac_n "checking for _oss_ioctl in -lossaudio""... $ac_c" 1>&6 -echo "configure:632: checking for _oss_ioctl in -lossaudio" >&5 +echo "configure:642: checking for _oss_ioctl in -lossaudio" >&5 ac_lib_var=`echo ossaudio'_'_oss_ioctl | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_save_LIBS="$LIBS" -LIBS="-lossaudio $LIBS" +LIBS=`echo "-lossaudio $LIBS" | sed -e 's/-lc //'` cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { eval echo configure:661: \"$ac_link\" 1>&5; eval $ac_link 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -661,7 +671,7 @@ fi if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then - echo "$ac_t""yes" 1>&6 + eval echo "$ac_t""yes" 1>&6 ac_tr_lib=HAVE_LIB`echo ossaudio | sed -e 's/[^a-zA-Z0-9_]/_/g' \ -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` cat >> confdefs.h <&6 + eval echo "$ac_t""no" 1>&6 +fi + +echo $ac_n "checking for snd_pcm_open in -lasound""... $ac_c" 1>&6 +echo "configure:689: checking for snd_pcm_open in -lasound" >&5 +ac_lib_var=`echo asound'_'snd_pcm_open | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS=`echo "-lasound $LIBS" | sed -e 's/-lc //'` +cat > conftest.$ac_ext <&5; eval $ac_link 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + eval echo "$ac_t""yes" 1>&6 + ac_tr_lib=HAVE_LIB`echo asound | sed -e 's/[^a-zA-Z0-9_]/_/g' \ + -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` + cat >> confdefs.h <&6 +fi + +echo $ac_n "checking for sio_open in -lsndio""... $ac_c" 1>&6 +echo "configure:736: checking for sio_open in -lsndio" >&5 +ac_lib_var=`echo sndio'_'sio_open | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS=`echo "-lsndio $LIBS" | sed -e 's/-lc //'` +cat > conftest.$ac_ext <&5; eval $ac_link 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + eval echo "$ac_t""yes" 1>&6 + ac_tr_lib=HAVE_LIB`echo sndio | sed -e 's/[^a-zA-Z0-9_]/_/g' \ + -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` + cat >> confdefs.h <&6 +fi + +echo $ac_n "checking for pa_strerror in -lpulse""... $ac_c" 1>&6 +echo "configure:783: checking for pa_strerror in -lpulse" >&5 +ac_lib_var=`echo pulse'_'pa_strerror | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS=`echo "-lpulse $LIBS" | sed -e 's/-lc //'` +cat > conftest.$ac_ext <&5; eval $ac_link 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + eval echo "$ac_t""yes" 1>&6 + ac_tr_lib=HAVE_LIB`echo pulse | sed -e 's/[^a-zA-Z0-9_]/_/g' \ + -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` + cat >> confdefs.h <&6 +fi + +echo $ac_n "checking for pa_simple_new in -lpulse-simple""... $ac_c" 1>&6 +echo "configure:830: checking for pa_simple_new in -lpulse-simple" >&5 +ac_lib_var=`echo pulse-simple'_'pa_simple_new | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS=`echo "-lpulse-simple $LIBS" | sed -e 's/-lc //'` +cat > conftest.$ac_ext <&5; eval $ac_link 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + eval echo "$ac_t""yes" 1>&6 + ac_tr_lib=HAVE_LIB`echo pulse-simple | sed -e 's/[^a-zA-Z0-9_]/_/g' \ + -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` + cat >> confdefs.h <&6 fi + EXTRALIBS="$LIBS" echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 -echo "configure:684: checking how to run the C preprocessor" >&5 +echo "configure:883: checking how to run the C preprocessor" >&5 # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= @@ -695,13 +894,13 @@ # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:705: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ eval echo configure:904: \"$ac_try\" 1>&5; eval $ac_try 2>&5; } ac_err=`tr -d '\015' < conftest.out | grep -v '^ *+' | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then : @@ -712,13 +911,13 @@ rm -rf conftest* CPP="${CC-cc} -E -traditional-cpp" cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:722: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ eval echo configure:921: \"$ac_try\" 1>&5; eval $ac_try 2>&5; } ac_err=`tr -d '\015' < conftest.out | grep -v '^ *+' | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then : @@ -729,13 +928,13 @@ rm -rf conftest* CPP="${CC-cc} -nologo -E" cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:739: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ eval echo configure:938: \"$ac_try\" 1>&5; eval $ac_try 2>&5; } ac_err=`tr -d '\015' < conftest.out | grep -v '^ *+' | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then : @@ -757,23 +956,23 @@ else ac_cv_prog_CPP="$CPP" fi -echo "$ac_t""$CPP" 1>&6 +eval echo "$ac_t""$CPP" 1>&6 for ac_hdr in sys/cdio.h sys/cdrio.h sundev/srreg.h sys/audioio.h sun/audioio.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:767: checking for $ac_hdr" >&5 +echo "configure:966: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:777: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ eval echo configure:976: \"$ac_try\" 1>&5; eval $ac_try 2>&5; } ac_err=`tr -d '\015' < conftest.out | grep -v '^ *+' | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -788,14 +987,14 @@ rm -f conftest* fi if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then - echo "$ac_t""yes" 1>&6 + eval echo "$ac_t""yes" 1>&6 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` cat >> confdefs.h <&6 + eval echo "$ac_t""no" 1>&6 fi done @@ -803,17 +1002,17 @@ do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:807: checking for $ac_hdr" >&5 +echo "configure:1006: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:817: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ eval echo configure:1016: \"$ac_try\" 1>&5; eval $ac_try 2>&5; } ac_err=`tr -d '\015' < conftest.out | grep -v '^ *+' | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -828,32 +1027,34 @@ rm -f conftest* fi if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then - echo "$ac_t""yes" 1>&6 + eval echo "$ac_t""yes" 1>&6 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` cat >> confdefs.h <&6 + eval echo "$ac_t""no" 1>&6 fi done -for ac_hdr in sys/asoundlib.h windows.h mmsystem.h +case "${ac_cv_lib_asound_snd_pcm_open}" in + *yes*) + for ac_hdr in alsa/asoundlib.h sys/asoundlib.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:847: checking for $ac_hdr" >&5 +echo "configure:1048: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:857: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ eval echo configure:1058: \"$ac_try\" 1>&5; eval $ac_try 2>&5; } ac_err=`tr -d '\015' < conftest.out | grep -v '^ *+' | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -868,32 +1069,36 @@ rm -f conftest* fi if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then - echo "$ac_t""yes" 1>&6 + eval echo "$ac_t""yes" 1>&6 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` cat >> confdefs.h <&6 + eval echo "$ac_t""no" 1>&6 fi done -for ac_hdr in os2.h os2me.h +;; +esac +case "${ac_cv_lib_sndio_sio_open}" in + *yes*) + for ac_hdr in sndio.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:887: checking for $ac_hdr" >&5 +echo "configure:1092: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:897: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ eval echo configure:1102: \"$ac_try\" 1>&5; eval $ac_try 2>&5; } ac_err=`tr -d '\015' < conftest.out | grep -v '^ *+' | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -908,17 +1113,113 @@ rm -f conftest* fi if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then - echo "$ac_t""yes" 1>&6 + eval echo "$ac_t""yes" 1>&6 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` cat >> confdefs.h <&6 + eval echo "$ac_t""no" 1>&6 fi done +;; +esac +case "${ac_cv_lib_pulse_simple_pa_simple_new}""${ac_cv_lib_pulse_pa_strerror}" in + *yesyes*) + for ac_hdr in pulse/pulseaudio.h pulse/simple.h +do +ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` +echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 +echo "configure:1136: checking for $ac_hdr" >&5 +if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ eval echo configure:1146: \"$ac_try\" 1>&5; eval $ac_try 2>&5; } +ac_err=`tr -d '\015' < conftest.out | grep -v '^ *+' | grep -v "^conftest.${ac_ext}\$"` +if test -z "$ac_err"; then + rm -rf conftest* + eval "ac_cv_header_$ac_safe=yes" +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_header_$ac_safe=no" +fi +rm -f conftest* +fi +if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then + eval echo "$ac_t""yes" 1>&6 + ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` + cat >> confdefs.h <&6 +fi +done + +;; +esac +for ac_hdr in windows.h mmsystem.h +do +ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` +echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 +echo "configure:1178: checking for $ac_hdr" >&5 +if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ eval echo configure:1188: \"$ac_try\" 1>&5; eval $ac_try 2>&5; } +ac_err=`tr -d '\015' < conftest.out | grep -v '^ *+' | grep -v "^conftest.${ac_ext}\$"` +if test -z "$ac_err"; then + rm -rf conftest* + eval "ac_cv_header_$ac_safe=yes" +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_header_$ac_safe=no" +fi +rm -f conftest* +fi +if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then + eval echo "$ac_t""yes" 1>&6 + ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` + cat >> confdefs.h <&6 +fi +done + + +case "${ac_cv_header_sndio_h}""${ac_cv_lib_sndio_sio_open}" in + *yes*) +HAVE_SNDIO=1 +;; + *) +HAVE_SNDIO= +;; +esac + case "${ac_cv_header_sys_cdio_h}""${ac_cv_header_sundev_srreg_h}" in *yes*) @@ -950,6 +1251,27 @@ esac +case "${ac_cv_header_alsa_asoundlib_h}""${ac_cv_header_sys_asoundlib_h}" in + *yes*) +HAVE_ALSA=1 +;; + *) +HAVE_ALSA= +;; +esac +case "${HAVE_ALSA}""${ac_cv_lib_asound_snd_pcm_open}" in + 1*yes*) +HAVE_ALSA=1 +;; + *) +HAVE_ALSA= +HAVE_SYS_ASOUNDLIB_H= +HAVE_ALSA_ASOUNDLIB_H= +;; +esac + + + case "${ac_cv_header_windows_h}""${ac_cv_header_mmsystem_h}" in @@ -972,60 +1294,17 @@ esac -for ac_func in strtoul -do -echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:979: checking for $ac_func" >&5 -if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -/* Override any gcc2 internal prototype to avoid an error. */ -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char $ac_func(); - -int main() { +case "${ac_cv_header_pulse_pulseaudio_h}""${ac_cv_lib_pulse_simple_pa_simple_new}""${ac_cv_lib_pulse_pa_strerror}" in + *yesyesyes*) +HAVE_PULSE_SIMPLE_H=1 +;; + *) +HAVE_PULSE_SIMPLE_H= +HAVE_PULSE_PULSEAUDIO_H= +;; +esac -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined (__stub_$ac_func) || defined (__stub___$ac_func) -choke me -#else -$ac_func(); -#endif -; return 0; } -EOF -if { (eval echo configure:1007: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_func_$ac_func=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_func_$ac_func=no" -fi -rm -f conftest* -fi - -if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` - cat >> confdefs.h <&6 -fi -done trap '' 1 2 15 cat > confcache <<\EOF @@ -1117,7 +1396,7 @@ echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion" exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;; -version | --version | --versio | --versi | --vers | --ver | --ve | --v) - echo "$CONFIG_STATUS generated by autoconf version 2.13" + echo "$CONFIG_STATUS generated by autoconf version 2.13 1.17-Schily" exit 0 ;; -help | --help | --hel | --he | --h) echo "\$ac_cs_usage"; exit 0 ;; @@ -1166,12 +1445,16 @@ s%@host_os@%$host_os%g s%@EXTRALIBS@%$EXTRALIBS%g s%@CPP@%$CPP%g +s%@HAVE_SNDIO@%$HAVE_SNDIO%g s%@HAVE_SUN_IOCTL@%$HAVE_SUN_IOCTL%g s%@HAVE_SUNSOUND@%$HAVE_SUNSOUND%g s%@HAVE_OSS@%$HAVE_OSS%g +s%@HAVE_ALSA@%$HAVE_ALSA%g s%@HAVE_SYS_ASOUNDLIB_H@%$HAVE_SYS_ASOUNDLIB_H%g +s%@HAVE_ALSA_ASOUNDLIB_H@%$HAVE_ALSA_ASOUNDLIB_H%g s%@HAVE_WINSOUND@%$HAVE_WINSOUND%g s%@HAVE_OS2SOUND@%$HAVE_OS2SOUND%g +s%@HAVE_PULSE_SIMPLE_H@%$HAVE_PULSE_SIMPLE_H%g CEOF EOF diff -Nru cdrtools-2.01.01a33/cdda2wav/configure.in cdrtools-3.02a09/cdda2wav/configure.in --- cdrtools-2.01.01a33/cdda2wav/configure.in 2007-04-23 22:20:08.000000000 +0000 +++ cdrtools-3.02a09/cdda2wav/configure.in 2015-12-13 23:49:33.000000000 +0000 @@ -1,4 +1,4 @@ -dnl @(#)configure.in 1.9 07/04/24 Copyright 1998-2003 Heiko Eißfeldt +dnl @(#)configure.in 1.13 15/12/14 Copyright 1998-2003,2015 Heiko Eißfeldt dnl Process this file with autoconf to produce a configure script. AC_INIT(cdda2wav.c) AC_CONFIG_HEADER(lconfig.h) @@ -20,6 +20,11 @@ ;; esac AC_CHECK_LIB(ossaudio, _oss_ioctl) +AC_CHECK_LIB(asound, snd_pcm_open) +AC_CHECK_LIB(sndio, sio_open) +AC_CHECK_LIB(pulse, pa_strerror) +AC_CHECK_LIB(pulse-simple, pa_simple_new) + EXTRALIBS="$LIBS" @@ -28,8 +33,34 @@ dnl check header files AC_CHECK_HEADERS(sys/cdio.h sys/cdrio.h sundev/srreg.h sys/audioio.h sun/audioio.h) AC_CHECK_HEADERS(soundcard.h sys/soundcard.h linux/soundcard.h machine/soundcard.h) -AC_CHECK_HEADERS(sys/asoundlib.h windows.h mmsystem.h) -AC_CHECK_HEADERS(os2.h os2me.h) +case "${ac_cv_lib_asound_snd_pcm_open}" in + *yes*) + AC_CHECK_HEADERS(alsa/asoundlib.h sys/asoundlib.h) +;; +esac +case "${ac_cv_lib_sndio_sio_open}" in + *yes*) + AC_CHECK_HEADERS(sndio.h) +;; +esac +case "${ac_cv_lib_pulse_simple_pa_simple_new}""${ac_cv_lib_pulse_pa_strerror}" in + *yesyes*) + AC_CHECK_HEADERS(pulse/pulseaudio.h pulse/simple.h) +;; +esac +dnl We no longer include HAVE_WINDOWS_H in lconfig.h but we need the test +dnl result together with the test for mmsystem.h +AC_CHECK_HEADERS(windows.h mmsystem.h) + +case "${ac_cv_header_sndio_h}""${ac_cv_lib_sndio_sio_open}" in + *yes*) +HAVE_SNDIO=1 +;; + *) +HAVE_SNDIO= +;; +esac +AC_SUBST(HAVE_SNDIO) case "${ac_cv_header_sys_cdio_h}""${ac_cv_header_sundev_srreg_h}" in *yes*) @@ -61,7 +92,28 @@ esac AC_SUBST(HAVE_OSS) +case "${ac_cv_header_alsa_asoundlib_h}""${ac_cv_header_sys_asoundlib_h}" in + *yes*) +HAVE_ALSA=1 +;; + *) +HAVE_ALSA= +;; +esac +case "${HAVE_ALSA}""${ac_cv_lib_asound_snd_pcm_open}" in + 1*yes*) +HAVE_ALSA=1 +;; + *) +HAVE_ALSA= +HAVE_SYS_ASOUNDLIB_H= +HAVE_ALSA_ASOUNDLIB_H= +;; +esac +AC_SUBST(HAVE_ALSA) + AC_SUBST(HAVE_SYS_ASOUNDLIB_H) +AC_SUBST(HAVE_ALSA_ASOUNDLIB_H) case "${ac_cv_header_windows_h}""${ac_cv_header_mmsystem_h}" in *yesyes*) @@ -83,6 +135,17 @@ esac AC_SUBST(HAVE_OS2SOUND) +case "${ac_cv_header_pulse_pulseaudio_h}""${ac_cv_lib_pulse_simple_pa_simple_new}""${ac_cv_lib_pulse_pa_strerror}" in + *yesyesyes*) +HAVE_PULSE_SIMPLE_H=1 +;; + *) +HAVE_PULSE_SIMPLE_H= +HAVE_PULSE_PULSEAUDIO_H= +;; +esac +AC_SUBST(HAVE_PULSE_SIMPLE_H) + dnl Checks for library functions. -AC_CHECK_FUNCS(strtoul) + AC_OUTPUT(local.cnf) diff -Nru cdrtools-2.01.01a33/cdda2wav/defaults.c cdrtools-3.02a09/cdda2wav/defaults.c --- cdrtools-2.01.01a33/cdda2wav/defaults.c 2006-09-13 15:35:12.000000000 +0000 +++ cdrtools-3.02a09/cdda2wav/defaults.c 1970-01-01 00:00:00.000000000 +0000 @@ -1,235 +0,0 @@ -/* @(#)defaults.c 1.20 06/09/13 Copyright 1998-2006 J. Schilling */ -#ifndef lint -static char sccsid[] = - "@(#)defaults.c 1.20 06/09/13 Copyright 1998-2006 J. Schilling"; -#endif -/* - * Copyright (c) 1998-2006 J. Schilling - */ -/* - * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. - * - * See the file CDDL.Schily.txt in this distribution for details. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file CDDL.Schily.txt from this distribution. - */ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include "cdrecord.h" /* only for getnum() */ -#include "defaults.h" - -LOCAL int open_cdrdefaults __PR((void)); -EXPORT void cdr_defaults __PR((char **devp, int *speedp, long *fsp, char **drvoptp)); -LOCAL void cdr_xdefaults __PR((char **devp, int *speedp, long *fsp, char **drvoptp)); -LOCAL char * strsv __PR((char *s)); - -LOCAL int -open_cdrdefaults() -{ - /* - * WARNING you are only allowed to change this filename if you also - * change the documentation and add a statement that makes clear - * where the official location of the file is why you did choose a - * nonstandard location and that the nonstandard location only refers - * to inofficial cdrecord versions. - * - * I was forced to add this because some people change cdrecord without - * rational reason and then publish the result. As those people - * don't contribute work and don't give support, they are causing extra - * work for me and this way slow down the cdrecord development. - */ - return (defltopen("/etc/default/cdrecord")); -} - -EXPORT void -cdr_defaults(devp, speedp, fsp, drvoptp) - char **devp; - int *speedp; - long *fsp; - char **drvoptp; -{ - char *dev = NULL; - int speed = 0; - long fs = 0L; - - if (devp != NULL) - dev = *devp; - if (speedp != NULL) - speed = *speedp; - if (fsp != NULL) - fs = *fsp; - - if (!dev && devp != NULL) { - *devp = getenv("CDR_DEVICE"); - - if (!*devp && open_cdrdefaults() == 0) { - dev = defltread("CDR_DEVICE="); - if (dev != NULL) - *devp = strsv(dev); - } - } - if (devp != NULL && *devp) - cdr_xdefaults(devp, &speed, &fs, drvoptp); - - if (speed < 0) { - char *p = getenv("CDR_SPEED"); - - if (!p) { - if (open_cdrdefaults() == 0) { - p = defltread("CDR_SPEED="); - } - } - if (p) { - speed = atoi(p); - if (speed < 0 && speed != -1) { - comerrno(EX_BAD, - "Bad speed environment (%s).\n", p); - } - } - } - if (speed >= 0 && speedp != NULL) - *speedp = speed; - - if (fs < 0L) { - char *p = getenv("CDR_FIFOSIZE"); - - if (!p) { - if (open_cdrdefaults() == 0) { - p = defltread("CDR_FIFOSIZE="); - } - } - if (p) { - if (getnum(p, &fs) != 1) { - comerrno(EX_BAD, - "Bad fifo size environment (%s).\n", p); - } - } - } - if (fs > 0L && fsp != NULL) { - char *p = NULL; - long maxfs; - - if (open_cdrdefaults() == 0) { - p = defltread("CDR_MAXFIFOSIZE="); - } - if (p) { - if (getnum(p, &maxfs) != 1) { - comerrno(EX_BAD, - "Bad max fifo size default (%s).\n", p); - } - if (fs > maxfs) - fs = maxfs; - } - *fsp = fs; - } - - - defltclose(); -} - -/* - * All args except "drvoptp" are granted to be non NULL pointers. - */ -LOCAL void -cdr_xdefaults(devp, speedp, fsp, drvoptp) - char **devp; - int *speedp; - long *fsp; - char **drvoptp; -{ - char dname[256]; - char *p = *devp; - char *x = ",:/@"; - - while (*x) { - if (strchr(p, *x)) - return; - x++; - } - js_snprintf(dname, sizeof (dname), "%s=", p); - if (open_cdrdefaults() != 0) - return; - - p = defltread(dname); - if (p != NULL) { - while (*p == '\t' || *p == ' ') - p++; - if ((x = strchr(p, '\t')) != NULL) - *x = '\0'; - else if ((x = strchr(p, ' ')) != NULL) - *x = '\0'; - *devp = strsv(p); - if (x) { - p = ++x; - while (*p == '\t' || *p == ' ') - p++; - if ((x = strchr(p, '\t')) != NULL) - *x = '\0'; - else if ((x = strchr(p, ' ')) != NULL) - *x = '\0'; - if (*speedp < 0) - *speedp = atoi(p); - if (*speedp < 0 && *speedp != -1) { - comerrno(EX_BAD, - "Bad speed in defaults (%s).\n", p); - } - } - if (x) { - p = ++x; - while (*p == '\t' || *p == ' ') - p++; - if ((x = strchr(p, '\t')) != NULL) - *x = '\0'; - else if ((x = strchr(p, ' ')) != NULL) - *x = '\0'; - if (*fsp < 0L) { - if (getnum(p, fsp) != 1) { - comerrno(EX_BAD, - "Bad fifo size in defaults (%s).\n", - p); - } - } - } - if (x) { - p = ++x; - while (*p == '\t' || *p == ' ') - p++; - if ((x = strchr(p, '\t')) != NULL) - *x = '\0'; - else if ((x = strchr(p, ' ')) != NULL) - *x = '\0'; - if (strcmp(p, "\"\"") != '\0') { - /* - * Driver opts found. - */ - if (drvoptp && *drvoptp == NULL) - *drvoptp = strsv(p); - } - } - } -} - -LOCAL char * -strsv(s) - char *s; -{ - char *p; - int len = strlen(s); - - p = malloc(len+1); - if (p) - strcpy(p, s); - return (p); -} diff -Nru cdrtools-2.01.01a33/cdda2wav/exitcodes.h cdrtools-3.02a09/cdda2wav/exitcodes.h --- cdrtools-2.01.01a33/cdda2wav/exitcodes.h 2006-05-13 21:02:12.000000000 +0000 +++ cdrtools-3.02a09/cdda2wav/exitcodes.h 2014-01-01 18:01:37.000000000 +0000 @@ -1,4 +1,4 @@ -/* @(#)exitcodes.h 1.2 06/05/13 Copyright 2002 Heiko Eissfeldt */ +/* @(#)exitcodes.h 1.4 14/01/01 Copyright 2002 Heiko Eissfeldt, Copyright 2006-2014 J. Schilling */ /* * header file for system wide exit codes. */ @@ -9,6 +9,8 @@ * with the License. * * See the file CDDL.Schily.txt in this distribution for details. + * A copy of the CDDL is also available via the Internet at + * http://www.opensource.org/licenses/cddl1.txt * * When distributing Covered Code, include this CDDL HEADER in each * file and include the License file CDDL.Schily.txt from this distribution. @@ -17,23 +19,24 @@ #ifndef _EXITCODES_H #define _EXITCODES_H -#define NO_ERROR 0 -#define SYNTAX_ERROR 1 -#define PERM_ERROR 2 -#define READ_ERROR 3 -#define WRITE_ERROR 4 -#define SOUND_ERROR 5 -#define STAT_ERROR 6 -#define SIGPIPE_ERROR 7 -#define SETSIG_ERROR 8 -#define SHMMEM_ERROR 9 -#define NOMEM_ERROR 10 -#define MEDIA_ERROR 11 -#define DEVICEOPEN_ERROR 12 -#define RACE_ERROR 13 -#define DEVICE_ERROR 14 -#define INTERNAL_ERROR 15 -#define SEMAPHORE_ERROR 16 -#define SETUPSCSI_ERROR 17 -#define PIPE_ERROR 18 +#undef NO_ERROR /* #define on MinGW not similar enough */ +#define NO_ERROR 0 +#define SYNTAX_ERROR 1 +#define PERM_ERROR 2 +#define READ_ERROR 3 +#define WRITE_ERROR 4 +#define SOUND_ERROR 5 +#define STAT_ERROR 6 +#define SIGPIPE_ERROR 7 +#define SETSIG_ERROR 8 +#define SHMMEM_ERROR 9 +#define NOMEM_ERROR 10 +#define MEDIA_ERROR 11 +#define DEVICEOPEN_ERROR 12 +#define RACE_ERROR 13 +#define DEVICE_ERROR 14 +#define INTERNAL_ERROR 15 +#define SEMAPHORE_ERROR 16 +#define SETUPSCSI_ERROR 17 +#define PIPE_ERROR 18 #endif diff -Nru cdrtools-2.01.01a33/cdda2wav/global.h cdrtools-3.02a09/cdda2wav/global.h --- cdrtools-2.01.01a33/cdda2wav/global.h 2006-10-29 12:41:42.000000000 +0000 +++ cdrtools-3.02a09/cdda2wav/global.h 2016-01-24 16:13:57.000000000 +0000 @@ -1,4 +1,4 @@ -/* @(#)global.h 1.15 06/10/29 Copyright 1998-2004 Heiko Eissfeldt, Copyright 2004-2006 J. Schilling */ +/* @(#)global.h 1.37 16/01/24 Copyright 1998-2004 Heiko Eissfeldt, Copyright 2004-2016 J. Schilling */ /* * Global Variables */ @@ -9,18 +9,22 @@ * with the License. * * See the file CDDL.Schily.txt in this distribution for details. + * A copy of the CDDL is also available via the Internet at + * http://www.opensource.org/licenses/cddl1.txt * * When distributing Covered Code, include this CDDL HEADER in each * file and include the License file CDDL.Schily.txt from this distribution. */ #ifdef MD5_SIGNATURES -#include "md5.h" +#include #endif #ifdef USE_PARANOIA #include "cdda_paranoia.h" #endif +#define outfp global.out_fp + typedef struct index_list { struct index_list *next; int frameoffset; @@ -29,37 +33,66 @@ typedef struct global { char *dev_name; /* device name */ - char *aux_name; /* device name */ - char fname_base[200]; + char *dev_opts; /* SCG device options */ + char *aux_name; /* auxiliary cdrom device name */ + char fname_base[200]; /* current file name base */ + + int have_forked; /* TRUE after we did fork */ + pid_t child_pid; /* return value from fork() */ + int parent_died; /* TRUE after we killed the parent */ + int audio; /* audio-out file desc */ + struct soundfile *audio_out; /* audio-out sound functions */ + int cooked_fd; /* cdrom-in file desc */ + int no_file; /* -N option */ + int no_infofile; /* -no-infofile option */ + int no_textfile; /* -no-textfile option */ + int did_textfile; /* flag: did create textfile */ + int no_textdefaults; /* -no-textdefaults option */ + int no_cddbfile; /* flag: do not create cddbfile */ + int cuefile; /* -cuefile option */ + int no_hidden_track; /* -no-hidden-track option */ + int no_fork; /* -no-fork option */ + int interactive; /* -interactive option */ + int quiet; /* -quiet option */ + int verbose; /* -v verbose level */ + int scsi_silent; /* SCSI silent flag */ + int scsi_verbose; /* SCSI verbose level */ + int scsi_debug; /* SCSI debug level */ + int scsi_kdebug; /* SCSI kernel debug level */ + int scanbus; /* -scanbus option */ + + uid_t uid; + uid_t euid; + BOOL issetuid; + long sector_offset; + long start_sector; + unsigned long endtrack; + BOOL alltracks; + BOOL maxtrack; + int cd_index; + int littleendian; + double rectime; + double int_part; + char *user_sound_device; + int moreargs; - int have_forked; - int parent_died; - int audio; - struct soundfile *audio_out; - int cooked_fd; - int no_file; - int no_infofile; - int no_cddbfile; - int quiet; - int verbose; - int scsi_silent; - int scsi_verbose; - int scanbus; - int multiname; - int sh_bits; + int multiname; /* multiple file names given */ + int sh_bits; /* sh_bits: sample bit shift */ int Remainder; int SkippedSamples; int OutSampleSize; int need_big_endian; int need_hostorder; - int channels; - unsigned long iloop; - unsigned long nSamplesDoneInTrack; - unsigned overlap; - int useroverlap; - long bufsize; /* The size of the SCSI buffer */ - unsigned nsectors; - unsigned buffers; + int channels; /* output sound channels */ + unsigned long iloop; /* todo counter (frames) */ + unsigned long nSamplesDoneInTrack; /* written samples in current track */ + unsigned overlap; /* dynamic cdda2wav overlap */ + int useroverlap; /* -set-overlap # option */ + FILE *out_fp; /* -out-fd FILE * for messages */ + char *buf; /* The SCSI buffer */ + long bufsize; /* The size of the SCSI buffer */ + unsigned nsectors; /* -sectors-per-request option */ + unsigned buffers; /* -buffers-in-ring option */ unsigned shmsize; long pagesize; int in_lendian; @@ -75,8 +108,8 @@ int deemphasize; int gui; long playback_rate; - int target; /* SCSI Id to be used */ - int lun; /* SCSI Lun to be used */ + int target; /* SCSI Id to be used */ + int lun; /* SCSI Lun to be used */ UINT4 cddb_id; int cddbp; char * cddbp_server; @@ -87,14 +120,29 @@ int illleadout_cd; int reads_illleadout; unsigned char *cdindex_id; - unsigned char *creator; - unsigned char *copyright_message; - unsigned char *disctitle; - unsigned char *tracktitle[100]; - unsigned char *trackcreator[100]; + unsigned char *copyright_message; /* CD Extra specific */ + + unsigned char *disctitle; /* 0x80 Album Ttitle */ + unsigned char *performer; /* 0x81 Album Performer */ + unsigned char *songwriter; /* 0x82 Album Songwriter */ + unsigned char *composer; /* 0x83 Album Composer */ + unsigned char *arranger; /* 0x84 Album Arranger */ + unsigned char *message; /* 0x85 Album Message */ + unsigned char *closed_info; /* 0x8d Album Closed Info */ + + unsigned char *tracktitle[100]; /* 0x80 Track Title */ + unsigned char *trackperformer[100]; /* 0x81 Track Performer */ + unsigned char *tracksongwriter[100]; /* 0x82 Track Songwriter */ + unsigned char *trackcomposer[100]; /* 0x83 Track Composer */ + unsigned char *trackarranger[100]; /* 0x84 Track Arranger */ + unsigned char *trackmessage[100]; /* 0x85 Track Message */ + unsigned char *trackclosed_info[100]; /* 0x8d Track Closed Info */ + index_list *trackindexlist[100]; int paranoia_selected; + long paranoia_flags; + int paranoia_mode; #ifdef USE_PARANOIA cdrom_paranoia *cdp; @@ -103,17 +151,21 @@ Ucbit disable_extra_paranoia:1; Ucbit disable_scratch_detect:1; Ucbit disable_scratch_repair:1; + Ucbit enable_c2_check:1; int retries; + int readahead; int overlap; int mindynoverlap; int maxdynoverlap; } paranoia_parms; #endif - unsigned md5blocksize; + int md5offset; + int md5blocksize; #ifdef MD5_SIGNATURES int md5count; - MD5_CTX context; + int md5size; + MD5_CTX *context; unsigned char MD5_result[16]; #endif diff -Nru cdrtools-2.01.01a33/cdda2wav/install-sh cdrtools-3.02a09/cdda2wav/install-sh --- cdrtools-2.01.01a33/cdda2wav/install-sh 2005-05-03 13:04:43.000000000 +0000 +++ cdrtools-3.02a09/cdda2wav/install-sh 1970-01-01 00:00:00.000000000 +0000 @@ -1,291 +0,0 @@ -#! /bin/sh -# -# @(#)install-sh 1.7 05/05/03 1999 J. Schilling -# -# install - install a program, script, or datafile -# This comes from X11R5 (mit/util/scripts/install.sh). -# Mods to make install-sh behave reasonable when called by -# non root user by J. Schilling -# -# Copyright 1991 by the Massachusetts Institute of Technology -# Copyright 1999 by J. Schilling -# -# Permission to use, copy, modify, distribute, and sell this software and its -# documentation for any purpose is hereby granted without fee, provided that -# the above copyright notice appear in all copies and that both that -# copyright notice and this permission notice appear in supporting -# documentation, and that the name of M.I.T. not be used in advertising or -# publicity pertaining to distribution of the software without specific, -# written prior permission. M.I.T. makes no representations about the -# suitability of this software for any purpose. It is provided "as is" -# without express or implied warranty. -# -# Calling this script install-sh is preferred over install.sh, to prevent -# `make' implicit rules from creating a file called install from it -# when there is no Makefile. -# -# This script is compatible with the BSD install script, but was written -# from scratch. It can only install one file at a time, a restriction -# shared with many OS's install programs. - -# on BSDi chown is in /usr/sbin - -PATH="${PATH}:/usr/sbin" - -# set DOITPROG to echo to test this script - -# Don't use :- since 4.3BSD and earlier shells don't like it. -doit="${DOITPROG-}" - - -# put in absolute paths if you don't have them in your path; or use env. vars. - -mvprog="${MVPROG-mv}" -cpprog="${CPPROG-cp}" -chmodprog="${CHMODPROG-chmod}" -chownprog="${CHOWNPROG-chown}" -chgrpprog="${CHGRPPROG-chgrp}" -stripprog="${STRIPPROG-strip}" -rmprog="${RMPROG-rm}" -mkdirprog="${MKDIRPROG-mkdir}" - -transformbasename="" -transform_arg="" -instcmd="$mvprog" -chmodcmd="$chmodprog 0755" -chowncmd="" -chgrpcmd="" -stripcmd="" -rmcmd="$rmprog -f" -mvcmd="$mvprog" -src="" -dst="" -dir_arg="" - -# -# Check if we are 'root' to avoid chown as non root user -# -rootflag=FALSE -dstdir=/tmp/xd.$$ -dsttmp=${dstdir}/xx.$$ -trap "rm -f ${dsttmp}; rm -rf ${dstdir}" 0 -mkdir ${dstdir} -${chmodcmd} ${dstdir} -echo > ${dsttmp} -${chownprog} root ${dsttmp} 2> /dev/null && ${chmodcmd} ${dsttmp} 2> /dev/null && rootflag=TRUE -# -# Win95 has no user 'root' and chown succeeds always. -# Unfortunately, there is also no user 'bin' and chown complains about -# user 'bin' being non-existant. -# Check if the fie is now really owned by 'root' to avoid the Win95 probems -# -if [ $rootflag = TRUE ]; then - ls -l ${dsttmp} 2> /dev/null | grep root > /dev/null || rootflag=FALSE -fi -rm -f ${dsttmp} -rm -rf ${dstdir} - -while [ x"$1" != x ]; do - case $1 in - -c) instcmd="$cpprog" - shift - continue;; - - -d) dir_arg=true - shift - continue;; - - -m) chmodcmd="$chmodprog $2" - shift - shift - continue;; - - -o) if [ $rootflag = TRUE ] - then - chowncmd="$chownprog $2" - else - echo "install: -o option available only to root -- ignored" - fi - shift - shift - continue;; - - -g) if [ $rootflag = TRUE ] - then - chgrpcmd="$chgrpprog $2" - else - echo "install: -g option available only to root -- ignored" - fi - shift - shift - continue;; - - -s) stripcmd="$stripprog" - shift - continue;; - - -t=*) transformarg=`echo $1 | sed 's/-t=//'` - shift - continue;; - - -b=*) transformbasename=`echo $1 | sed 's/-b=//'` - shift - continue;; - - *) if [ x"$src" = x ] - then - src=$1 - else - # this colon is to work around a 386BSD /bin/sh bug - : - dst=$1 - fi - shift - continue;; - esac -done - -if [ x"$src" = x ] -then - echo "install: no input file specified" - exit 1 -else - true -fi - -if [ x"$dir_arg" != x ]; then - dst=$src - src="" - - if [ -d $dst ]; then - instcmd=: - else - instcmd=mkdir - fi -else - -# Waiting for this to be detected by the "$instcmd $src $dsttmp" command -# might cause directories to be created, which would be especially bad -# if $src (and thus $dsttmp) contains '*'. - - if [ -f $src -o -d $src ] - then - true - else - echo "install: $src does not exist" - exit 1 - fi - - if [ x"$dst" = x ] - then - echo "install: no destination specified" - exit 1 - else - true - fi - -# If destination is a directory, append the input filename; if your system -# does not like double slashes in filenames, you may need to add some logic - - if [ -d $dst ] - then - dst="$dst"/`basename $src` - else - true - fi -fi - -## this sed command emulates the dirname command -dstdir=`echo $dst | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'` - -# Make sure that the destination directory exists. -# this part is taken from Noah Friedman's mkinstalldirs script - -# Skip lots of stat calls in the usual case. -if [ ! -d "$dstdir" ]; then -defaultIFS=' -' -IFS="${IFS-${defaultIFS}}" - -oIFS="${IFS}" -# Some sh's can't handle IFS=/ for some reason. -IFS='%' -set - `echo ${dstdir} | sed -e 's@/@%@g' -e 's@^%@/@'` -IFS="${oIFS}" - -pathcomp='' - -while [ $# -ne 0 ] ; do - pathcomp="${pathcomp}${1}" - shift - - if [ ! -d "${pathcomp}" ] ; - then - $mkdirprog "${pathcomp}" - else - true - fi - - pathcomp="${pathcomp}/" -done -fi - -if [ x"$dir_arg" != x ] -then - $doit $instcmd $dst && - - if [ x"$chowncmd" != x ]; then $doit $chowncmd $dst; else true ; fi && - if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dst; else true ; fi && - if [ x"$stripcmd" != x ]; then $doit $stripcmd $dst; else true ; fi && - if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dst; else true ; fi -else - -# If we're going to rename the final executable, determine the name now. - - if [ x"$transformarg" = x ] - then - dstfile=`basename $dst` - else - dstfile=`basename $dst $transformbasename | - sed $transformarg`$transformbasename - fi - -# don't allow the sed command to completely eliminate the filename - - if [ x"$dstfile" = x ] - then - dstfile=`basename $dst` - else - true - fi - -# Make a temp file name in the proper directory. - - dsttmp=$dstdir/#inst.$$# - -# Move or copy the file name to the temp name - - $doit $instcmd $src $dsttmp && - - trap "rm -f ${dsttmp}" 0 && - -# and set any options; do chmod last to preserve setuid bits - -# If any of these fail, we abort the whole thing. If we want to -# ignore errors from any of these, just make sure not to ignore -# errors from the above "$doit $instcmd $src $dsttmp" command. - - if [ x"$chowncmd" != x ]; then $doit $chowncmd $dsttmp; else true;fi && - if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dsttmp; else true;fi && - if [ x"$stripcmd" != x ]; then $doit $stripcmd $dsttmp; else true;fi && - if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dsttmp; else true;fi && - -# Now rename the file to the real destination. - - $doit $rmcmd -f $dstdir/$dstfile && - $doit $mvcmd $dsttmp $dstdir/$dstfile - -fi && - - -exit 0 diff -Nru cdrtools-2.01.01a33/cdda2wav/interface.c cdrtools-3.02a09/cdda2wav/interface.c --- cdrtools-2.01.01a33/cdda2wav/interface.c 2007-07-07 15:18:47.000000000 +0000 +++ cdrtools-3.02a09/cdda2wav/interface.c 2016-02-14 21:53:41.000000000 +0000 @@ -1,12 +1,13 @@ -/* @(#)interface.c 1.56 07/07/07 Copyright 1998-2002 Heiko Eissfeldt, Copyright 2006-2007 J. Schilling */ +/* @(#)interface.c 1.83 16/02/14 Copyright 1998-2002,2015 Heiko Eissfeldt, Copyright 2006-2016 J. Schilling */ +#include "config.h" #ifndef lint -static char sccsid[] = -"@(#)interface.c 1.56 07/07/07 Copyright 1998-2002 Heiko Eissfeldt, Copyright 2006-2007 J. Schilling"; +static UConst char sccsid[] = +"@(#)interface.c 1.83 16/02/14 Copyright 1998-2002,2015 Heiko Eissfeldt, Copyright 2006-2016 J. Schilling"; #endif /* - * Copyright (C) 1994-1997 Heiko Eissfeldt heiko@colossus.escape.de - * Copyright (c) 2006-2007 J. Schilling + * Copyright (C) 1998-2002,2015 Heiko Eissfeldt heiko@colossus.escape.de + * Copyright (c) 2006-2016 J. Schilling * * Interface module for cdrom drive access * @@ -35,6 +36,8 @@ * with the License. * * See the file CDDL.Schily.txt in this distribution for details. + * A copy of the CDDL is also available via the Internet at + * http://www.opensource.org/licenses/cddl1.txt * * When distributing Covered Code, include this CDDL HEADER in each * file and include the License file CDDL.Schily.txt from this distribution. @@ -44,20 +47,22 @@ #endif #include "config.h" -#include +#include #include #include #include #include #include -#include +#include #include -#include -#include +#include +#include #include - #include #include +#include +#include +#include #include "mycdrom.h" @@ -99,16 +104,14 @@ int trackindex_disp = 0; -EXPORT void priv_init __PR((void)); -EXPORT void priv_on __PR((void)); -EXPORT void priv_off __PR((void)); - void (*EnableCdda) __PR((SCSI *, int Switch, unsigned uSectorsize)); unsigned (*doReadToc) __PR((SCSI *scgp)); void (*ReadTocText) __PR((SCSI *scgp)); unsigned (*ReadLastAudio) __PR((SCSI *scgp)); int (*ReadCdRom) __PR((SCSI *scgp, UINT4 *p, unsigned lSector, unsigned SectorBurstVal)); +int (*ReadCdRom_C2) __PR((SCSI *scgp, UINT4 *p, unsigned lSector, + unsigned SectorBurstVal)); int (*ReadCdRomData) __PR((SCSI *scgp, unsigned char *p, unsigned lSector, unsigned SectorBurstVal)); int (*ReadCdRomSub) __PR((SCSI *scgp, UINT4 *p, unsigned lSector, @@ -126,6 +129,8 @@ #if defined USE_PARANOIA long cdda_read __PR((void *d, void * buffer, long beginsector, long sectors)); +long cdda_read_c2 __PR((void *d, void * buffer, long beginsector, + long sectors)); long cdda_read(d, buffer, beginsector, sectors) @@ -137,6 +142,17 @@ long ret = ReadCdRom(d, buffer, beginsector, sectors); return (ret); } + +long +cdda_read_c2(d, buffer, beginsector, sectors) + void *d; + void *buffer; + long beginsector; + long sectors; +{ + long ret = ReadCdRom_C2(d, buffer, beginsector, sectors); + return (ret); +} #endif typedef struct string_len { @@ -172,14 +188,14 @@ { } -static SCSI *scgp; +static SCSI *_scgp; SCSI *get_scsi_p __PR((void)); SCSI * get_scsi_p() { - return (scgp); + return (_scgp); } #if !defined(SIM_CD) @@ -209,10 +225,11 @@ LOCAL void scg_openerr __PR((char *errstr)); LOCAL int find_drive __PR((SCSI *scgp, char *dev)); -static void SetupSCSI __PR((void)); +static void SetupSCSI __PR((SCSI *scgp)); static void -SetupSCSI() +SetupSCSI(scgp) + SCSI *scgp; { unsigned char *p; int err; @@ -223,7 +240,7 @@ * not able to change on the fly */ errmsgno(EX_BAD, - "The generic SCSI interface and devices are required\n"); + _("The generic SCSI interface and devices are required\n")); exit(SYNTAX_ERROR); } @@ -248,19 +265,19 @@ #undef TYPE_WORM #define TYPE_WORM 4 if (p == NULL) { - errmsgno(EX_BAD, "Inquiry command failed. Aborting...\n"); + errmsgno(EX_BAD, _("Inquiry command failed. Aborting...\n")); exit(DEVICE_ERROR); } if ((*p != TYPE_ROM && *p != TYPE_WORM)) { errmsgno(EX_BAD, - "This is neither a scsi cdrom nor a worm device.\n"); + _("This is neither a scsi cdrom nor a worm device.\n")); exit(SYNTAX_ERROR); } if (global.quiet == 0) { - fprintf(stderr, - "Type: %s, Vendor '%8.8s' Model '%16.16s' Revision '%4.4s' ", + fprintf(outfp, + _("Type: %s, Vendor '%8.8s' Model '%16.16s' Revision '%4.4s' "), *p == TYPE_ROM ? "ROM" : "WORM", p+8, p+16, @@ -274,6 +291,7 @@ EnableCdda = (void (*) __PR((SCSI *, int, unsigned)))Dummy; ReadCdRom = ReadCdda12; ReadCdRomSub = ReadCddaSubSony; + ReadCdRom_C2 = ReadCddaNoFallback_C2; ReadCdRomData = (int (*) __PR((SCSI *, unsigned char *, unsigned, unsigned))) ReadStandardData; @@ -358,6 +376,7 @@ else global.overlap = 1; ReadCdRom = ReadCddaFallbackMMC; + ReadCdRom_C2 = ReadCddaFallbackMMC_C2; ReadCdRomSub = ReadCddaSubSony; ReadLastAudio = ReadFirstSessionTOCMMC; SelectSpeed = SpeedSelectSCSIMMC; @@ -367,15 +386,15 @@ if (!memcmp(p+8, "SONY CD-RW CRX100E 1.0", 27)) ReadTocText = (void (*) __PR((SCSI *)))NULL; if (!global.quiet) - fprintf(stderr, "MMC+CDDA\n"); + fprintf(outfp, "MMC+CDDA\n"); break; case -1: /* "MMC drive does not support cdda reading, sorry\n." */ doReadToc = ReadTocMMC; if (!global.quiet) - fprintf(stderr, "MMC-CDDA\n"); + fprintf(outfp, "MMC-CDDA\n"); /* FALLTHROUGH */ case 0: /* non SCSI-3 cdrom drive */ - if (!global.quiet) fprintf(stderr, "no MMC\n"); + if (!global.quiet) fprintf(outfp, _("no MMC\n")); ReadLastAudio = (unsigned (*) __PR((SCSI *)))NULL; if (!memcmp(p+8, "TOSHIBA", 7) || !memcmp(p+8, "IBM", 3) || @@ -473,9 +492,17 @@ if (interface == GENERIC_SCSI) { scgp->silent++; while (!wait_unit_ready(scgp, 60)) { - fprintf(stderr, - "load cdrom please and press enter"); - getchar(); + int c; + + fprintf(outfp, + _("load cdrom please and press enter")); + fflush(outfp); + while ((c = getchar()) != '\n') { + if (c == EOF) + break; + } + if (c == EOF) + exit(DEVICE_ERROR); } scgp->silent--; } @@ -497,7 +524,7 @@ #if !defined(STAT_MACROS_BROKEN) || (STAT_MACROS_BROKEN != 1) if (!S_ISCHR(statstruct->st_mode) && !S_ISBLK(statstruct->st_mode)) { - errmsgno(EX_BAD, "%s is not a device.\n", + errmsgno(EX_BAD, _("%s is not a device.\n"), pdev_name); exit(SYNTAX_ERROR); } @@ -513,14 +540,14 @@ #if !defined(STAT_MACROS_BROKEN) || (STAT_MACROS_BROKEN != 1) #if defined(__linux__) if (!S_ISCHR(statstruct->st_mode)) { - errmsgno(EX_BAD, "%s is not a char device.\n", + errmsgno(EX_BAD, _("%s is not a char device.\n"), pdev_name); exit(SYNTAX_ERROR); } if (interface != GENERIC_SCSI) { - fprintf(stderr, - "wrong interface (cooked_ioctl) for this device (%s)\nset to generic_scsi\n", + fprintf(outfp, + _("wrong interface (cooked_ioctl) for this device (%s)\nset to generic_scsi\n"), pdev_name); interface = GENERIC_SCSI; } @@ -546,14 +573,14 @@ #endif case 117: /* pre-GEOM atapi cd */ if (!S_ISCHR(statstruct->st_mode)) { - errmsgno(EX_BAD, "%s is not a char device.\n", + errmsgno(EX_BAD, _("%s is not a char device.\n"), pdev_name); exit(SYNTAX_ERROR); } if (interface != COOKED_IOCTL) { - fprintf(stderr, -"cdrom device (%s) is not of type generic SCSI. \ -Setting interface to cooked_ioctl.\n", pdev_name); + fprintf(outfp, +_("cdrom device (%s) is not of type generic SCSI. \ +Setting interface to cooked_ioctl.\n"), pdev_name); interface = COOKED_IOCTL; } break; @@ -561,7 +588,7 @@ #endif #endif if (!S_ISBLK(statstruct->st_mode)) { - errmsgno(EX_BAD, "%s is not a block device.\n", + errmsgno(EX_BAD, _("%s is not a block device.\n"), pdev_name); exit(SYNTAX_ERROR); } @@ -575,19 +602,19 @@ #endif #endif if (interface != COOKED_IOCTL) { - fprintf(stderr, -"cdrom device (%s) is not of type generic SCSI. \ -Setting interface to cooked_ioctl.\n", pdev_name); + fprintf(outfp, +_("cdrom device (%s) is not of type generic SCSI. \ +Setting interface to cooked_ioctl.\n"), pdev_name); interface = COOKED_IOCTL; } if (interface == COOKED_IOCTL) { - fprintf(stderr, - "\nW: The cooked_ioctl interface is functionally very limited!!\n"); + fprintf(outfp, + _("\nW: The cooked_ioctl interface is functionally very limited!!\n")); #if defined(__linux__) - fprintf(stderr, - "\nW: For good sampling quality simply use the generic SCSI interface!\n" - "For example dev=ATA:1,0,0\n"); + fprintf(outfp, + _("\nW: For good sampling quality simply use the generic SCSI interface!\n" + "For example dev=1,0,0\n")); #endif } @@ -608,6 +635,12 @@ { int retval = 0; struct stat fstatstruct; +#ifdef HAVE_IOCTL_INTERFACE + struct stat statstruct; + int have_named_device = 0; +#endif + + interface = GENERIC_SCSI; /* * The device (given by pdevname) can be: @@ -616,18 +649,17 @@ * c. a non-SCSI device such as ATAPI or proprietary CDROM devices. */ #ifdef HAVE_IOCTL_INTERFACE - struct stat statstruct; - int have_named_device = 0; - have_named_device = FALSE; if (pdev_name) { have_named_device = strchr(pdev_name, ':') == NULL && memcmp(pdev_name, "/dev/", 5) == 0; + } else { + interface = GENERIC_SCSI; /* Paranoia for "coverity" */ } if (have_named_device) { if (stat(pdev_name, &statstruct)) { - errmsg("Cannot stat device %s.\n", pdev_name); + errmsg(_("Cannot stat device %s.\n"), pdev_name); exit(STAT_ERROR); } else { Check_interface_for_device(&statstruct, pdev_name); @@ -636,11 +668,13 @@ #endif if (interface == GENERIC_SCSI) { + SCSI *scgp; char errstr[80]; - priv_on(); needroot(0); needgroup(0); + if (global.issetuid || global.uid != 0) + priv_on(); /* * Call scg_remote() to force loading the remote SCSI transport * library code that is located in librscg instead of the dummy @@ -657,22 +691,36 @@ /* * device name, debug, verboseopen */ - scgp = scg_open(pdev_name, errstr, sizeof (errstr), 0, 0); + _scgp = scg_open(pdev_name, errstr, sizeof (errstr), 0, 0); - if (scgp == NULL) { + if (_scgp == NULL) { scg_openerr(errstr); /* NOTREACHED */ } + scgp = _scgp; scg_settimeout(scgp, 300); scg_settimeout(scgp, 60); + if (global.dev_opts) { + int i = scg_opts(scgp, global.dev_opts); + if (i <= 0) + exit(i < 0 ? EX_BAD : 0); + } scgp->silent = global.scsi_silent; scgp->verbose = global.scsi_verbose; + scgp->debug = global.scsi_debug; + scgp->kdebug = global.scsi_kdebug; global.bufsize = scg_bufsize(scgp, global.bufsize); if (global.nsectors > (unsigned)global.bufsize/CD_FRAMESIZE_RAW) { global.nsectors = global.bufsize/CD_FRAMESIZE_RAW; } +#ifdef USE_PARANOIA + if (global.paranoia_parms.enable_c2_check && global.nsectors > + (unsigned)global.bufsize/CD_FRAMESIZE_RAWER) { + global.nsectors = global.bufsize/CD_FRAMESIZE_RAWER; + } +#endif if (global.overlap >= global.nsectors) global.overlap = global.nsectors-1; @@ -683,12 +731,13 @@ * mlockall(MCL_FUTURE). */ init_scsibuf(scgp, global.bufsize); - priv_off(); + if (global.issetuid || global.uid != 0) + priv_off(); dontneedgroup(); dontneedroot(); if (global.scanbus) { - int i = select_target(scgp, stdout); + int i = select_target(scgp, outfp); if (i < 0) { scg_openerr(""); @@ -715,7 +764,7 @@ dontneedgroup(); if (retval < 0) { - errmsg("Cannot open '%s'.\n", pdev_name); + errmsg(_("Cannot open '%s'.\n"), pdev_name); exit(DEVICEOPEN_ERROR); } @@ -723,7 +772,7 @@ * Do final security checks here */ if (fstat(retval, &fstatstruct)) { - errmsg("Could not fstat %s (fd %d).\n", + errmsg(_("Could not fstat %s (fd %d).\n"), pdev_name, retval); exit(STAT_ERROR); } @@ -735,17 +784,17 @@ (fstatstruct.st_dev != statstruct.st_dev || fstatstruct.st_ino != statstruct.st_ino)) { errmsgno(EX_BAD, - "Race condition attempted in OpenCdRom. Exiting now.\n"); + _("Race condition attempted in OpenCdRom. Exiting now.\n")); exit(RACE_ERROR); } #endif /* - * The structure looks like a desaster :-( + * The program structure looks like a desaster :-( * We do this more than once as it is impossible to understand * where the right place would be to do this.... */ - if (scgp != NULL) { - scgp->verbose = global.scsi_verbose; + if (_scgp != NULL) { + _scgp->verbose = global.scsi_verbose; } } return (retval); @@ -757,32 +806,33 @@ { int err = geterrno(); - errmsgno(err, "%s%sCannot open or use SCSI driver.\n", + errmsgno(err, _("%s%sCannot open or use SCSI driver.\n"), errstr, errstr[0]?". ":""); errmsgno(EX_BAD, - "For possible targets try 'cdda2wav -scanbus'.%s\n", + _("For possible targets try 'cdda2wav -scanbus'.%s\n"), geteuid() ? - " Make sure you are root.":""); + _(" Make sure you are root."):""); - priv_off(); + if (global.issetuid || global.uid != 0) + priv_off(); dontneedgroup(); dontneedroot(); #if defined(sun) || defined(__sun) fprintf(stderr, - "On SunOS/Solaris make sure you have Joerg Schillings scg SCSI driver installed.\n"); + _("On SunOS/Solaris make sure you have Joerg Schillings scg SCSI driver installed.\n")); #endif #if defined(__linux__) fprintf(stderr, - "Use the script scan_scsi.linux to find out more.\n"); + _("Use the script scan_scsi.linux to find out more.\n")); #endif fprintf(stderr, - "Probably you did not define your SCSI device.\n"); + _("Probably you did not define your SCSI device.\n")); fprintf(stderr, - "Set the CDDA_DEVICE environment variable or use the -D option.\n"); + _("Set the CDDA_DEVICE environment variable or use the -D option.\n")); fprintf(stderr, - "You can also define the default device in the Makefile.\n"); + _("You can also define the default device in the Makefile.\n")); fprintf(stderr, - "For possible transport specifiers try 'cdda2wav dev=help'.\n"); + _("For possible transport specifiers try 'cdda2wav dev=help'.\n")); exit(SYNTAX_ERROR); } @@ -793,7 +843,7 @@ { int ntarget; - error("No target specified, trying to find one...\n"); + fprintf(outfp, _("No target specified, trying to find one...\n")); ntarget = find_target(scgp, INQ_ROMD, -1); if (ntarget < 0) return (ntarget); @@ -812,19 +862,19 @@ /* * No single CD-ROM or WORM found. */ - errmsgno(EX_BAD, "No CD/DVD/BD-Recorder target found.\n"); + errmsgno(EX_BAD, _("No CD/DVD/BD-Recorder target found.\n")); errmsgno(EX_BAD, - "Your platform may not allow to scan for SCSI devices.\n"); + _("Your platform may not allow to scan for SCSI devices.\n")); comerrno(EX_BAD, - "Call 'cdda2wav dev=help' or ask your sysadmin for possible targets.\n"); + _("Call 'cdda2wav dev=help' or ask your sysadmin for possible targets.\n")); } else { - errmsgno(EX_BAD, "Too many CD/DVD/BD-Recorder targets found.\n"); - select_target(scgp, stdout); + errmsgno(EX_BAD, _("Too many CD/DVD/BD-Recorder targets found.\n")); + select_target(scgp, outfp); comerrno(EX_BAD, - "Select a target from the list above and use 'cdda2wav dev=%s%sb,t,l'.\n", + _("Select a target from the list above and use 'cdda2wav dev=%s%sb,t,l'.\n"), dev?dev:"", dev?(dev[strlen(dev)-1] == ':'?"":":"):""); } - error("Using dev=%s%s%d,%d,%d.\n", + fprintf(outfp, _("Using dev=%s%s%d,%d,%d.\n"), dev?dev:"", dev?(dev[strlen(dev)-1] == ':'?"":":"):"", scg_scsibus(scgp), scg_target(scgp), scg_lun(scgp)); return (ntarget); @@ -858,7 +908,7 @@ if (lSector > g_toc[cdtracks].dwStartSector || lSector + SectorBurstVal > g_toc[cdtracks].dwStartSector + 1) { fprintf(stderr, - "Read request out of bounds: %u - %u (%d - %d allowed)\n", + _("Read request out of bounds: %u - %u (%d - %d allowed)\n"), lSector, lSector + SectorBurstVal, 0, g_toc[cdtracks].dwStartSector); } @@ -976,14 +1026,14 @@ toc[i].frms = (toc[i].dwStartSector+150) % (75); #else { - int starts[15] = { 23625, 30115, 39050, 51777, 67507, + int starts[15] = { 23625, 30115, 39050, 51777, 67507, 88612, 112962, 116840, 143387, 162662, 173990, 186427, 188077, 209757, 257120}; - trcks = 14 + 1; - sim_indices = 1; + trcks = 14 + 1; + sim_indices = 1; - for (i = 0; i < trcks; i++) { + for (i = 0; i < trcks; i++) { toc[i].bFlags = 0x0; toc[i].bTrack = i + 1; toc[i].dwStartSector = starts[i]; @@ -1112,21 +1162,21 @@ /* * request one sector for table of contents */ - bufferTOC = malloc(CD_FRAMESIZE_RAW + 96); /* assumes sufficient aligned addresses */ + bufTOCsize = CD_FRAMESIZE_RAW + 96; /* Sufficient space for 222 TOC entries */ + bufferTOC = malloc(bufTOCsize); /* assumes sufficient aligned addresses */ /* * SubQchannel buffer */ - SubQbuffer = malloc(48); /* assumes sufficient aligned addresses */ - cmd = malloc(18); /* aassumes sufficient aligned addresses */ - if (!bufferTOC || !SubQbuffer || !cmd) { - errmsg("Too low on memory. Giving up.\n"); + SubQbuffer = malloc(48); /* assumes sufficient aligned addresses */ + if (!bufferTOC || !SubQbuffer) { + errmsg(_("Too low on memory. Giving up.\n")); exit(NOMEM_ERROR); } #if defined SIM_CD scgp = malloc(sizeof (* scgp)); if (scgp == NULL) { - FatalError(geterrno(), "No memory for SCSI structure.\n"); + FatalError(geterrno(), _("No memory for SCSI structure.\n")); } scgp->silent = 0; SetupSimCd(); @@ -1136,38 +1186,37 @@ */ if (interface == GENERIC_SCSI) { unsigned sector_size; + SCSI *scgp = _scgp; - SetupSCSI(); + SetupSCSI(scgp); sector_size = get_orig_sectorsize(scgp, &orgmode4, &orgmode10, &orgmode11); if (!SCSI_emulated_ATAPI_on(scgp)) { if (sector_size != 2048 && set_sectorsize(scgp, 2048)) { fprintf(stderr, - "Could not change sector size from %d to 2048\n", + _("Could not change sector size from %u to 2048\n"), sector_size); } - } else { - sector_size = 2048; } - /* - * get cache setting - * - * set cache to zero - */ + /* + * get cache setting + * + * set cache to zero + */ } else { #if defined(HAVE_IOCTL_INTERFACE) - scgp = malloc(sizeof (* scgp)); - if (scgp == NULL) { + _scgp = malloc(sizeof (* _scgp)); + if (_scgp == NULL) { FatalError(geterrno(), - "No memory for SCSI structure.\n"); + _("No memory for SCSI structure.\n")); } - scgp->silent = 0; + _scgp->silent = 0; SetupCookedIoctl(global.dev_name); #else FatalError(EX_BAD, - "Sorry, there is no known method to access the device.\n"); + _("Sorry, there is no known method to access the device.\n")); #endif } #endif /* if def SIM_CD */ @@ -1176,59 +1225,34 @@ * We do this more than once as it is impossible to understand where * the right place would be to do this.... */ - if (scgp != NULL) { - scgp->verbose = global.scsi_verbose; + if (_scgp != NULL) { + _scgp->verbose = global.scsi_verbose; } } -#ifdef HAVE_PRIV_H -#include -#endif - -EXPORT void -priv_init() +EXPORT int +poll_in() { -#ifdef HAVE_PRIV_SET - /* - * Give up privs we do not need anymore. - * We no longer need: - * file_dac_read,sys_devices,proc_priocntl,net_privaddr - */ - priv_set(PRIV_OFF, PRIV_EFFECTIVE, - PRIV_FILE_DAC_READ, PRIV_PROC_PRIOCNTL, - PRIV_NET_PRIVADDR, NULL); - priv_set(PRIV_OFF, PRIV_INHERITABLE, - PRIV_FILE_DAC_READ, PRIV_PROC_PRIOCNTL, - PRIV_NET_PRIVADDR, PRIV_SYS_DEVICES, NULL); -#endif -} +#ifdef HAVE_POLL + struct pollfd pfd[1]; -EXPORT void -priv_on() -{ -#ifdef HAVE_PRIV_SET - /* - * Get back privs we may need now. - * We need: - * file_dac_read,sys_devices,proc_priocntl,net_privaddr - */ - priv_set(PRIV_ON, PRIV_EFFECTIVE, - PRIV_FILE_DAC_READ, PRIV_PROC_PRIOCNTL, - PRIV_NET_PRIVADDR, NULL); + pfd[0].fd = fileno(stdin); + pfd[0].events = POLLIN; + pfd[0].revents = 0; + return (poll(pfd, 1, 0)); +#else +#ifdef HAVE_SELECT + struct timeval tv; + fd_set rd; + + FD_ZERO(&rd); + FD_SET(fileno(stdin), &rd); + + tv.tv_sec = 0; + tv.tv_usec = 0; + return (select(1, &rd, NULL, NULL, &tv)); +#else + comerrno(EX_BAD, _("Poll/Select not available.\n")); #endif -} - -EXPORT void -priv_off() -{ -#ifdef HAVE_PRIV_SET - /* - * Give up privs we do not need anymore. - * We no longer need: - * file_dac_read,sys_devices,proc_priocntl,net_privaddr - */ - priv_set(PRIV_OFF, PRIV_EFFECTIVE, - PRIV_FILE_DAC_READ, PRIV_PROC_PRIOCNTL, - PRIV_NET_PRIVADDR, NULL); #endif } diff -Nru cdrtools-2.01.01a33/cdda2wav/interface.h cdrtools-3.02a09/cdda2wav/interface.h --- cdrtools-2.01.01a33/cdda2wav/interface.h 2007-02-14 16:58:16.000000000 +0000 +++ cdrtools-3.02a09/cdda2wav/interface.h 2013-12-26 17:45:18.000000000 +0000 @@ -1,8 +1,8 @@ -/* @(#)interface.h 1.19 07/02/14 Copyright 1998-2001 Heiko Eissfeldt, Copyright 2005-2007 J. Schilling */ +/* @(#)interface.h 1.27 13/12/26 Copyright 1998-2001 Heiko Eissfeldt, Copyright 2005-2013 J. Schilling */ /* * Copyright (C) by Heiko Eissfeldt - * Copyright (c) 2005-2007 J. Schilling + * Copyright (c) 2005-2013 J. Schilling * * header file interface.h for cdda2wav */ @@ -13,6 +13,8 @@ * with the License. * * See the file CDDL.Schily.txt in this distribution for details. + * A copy of the CDDL is also available via the Internet at + * http://www.opensource.org/licenses/cddl1.txt * * When distributing Covered Code, include this CDDL HEADER in each * file and include the License file CDDL.Schily.txt from this distribution. @@ -32,6 +34,13 @@ #define CD_FRAMESAMPLES (CD_FRAMESIZE_RAW / 4) +/* + * NOTE: windows.h defines interface as an alias for struct, this + * is used by COM/OLE2, I guess it is class on C++ + * We man need to #undef 'interface' + */ +#undef interface + extern unsigned interface; extern int trackindex_disp; @@ -111,6 +120,8 @@ extern unsigned (*ReadLastAudio) __PR((SCSI *scgp)); extern int (*ReadCdRom) __PR((SCSI *scgp, UINT4 *p, unsigned lSector, unsigned SectorBurstVal)); +extern int (*ReadCdRom_C2) __PR((SCSI *scgp, UINT4 *p, unsigned lSector, + unsigned SectorBurstVal)); extern int (*ReadCdRomSub) __PR((SCSI *scgp, UINT4 *p, unsigned lSector, unsigned SectorBurstVal)); extern int (*ReadCdRomData) __PR((SCSI *scgp, unsigned char *p, @@ -130,15 +141,14 @@ #endif extern unsigned char *bufferTOC; +extern int bufTOCsize; extern subq_chnl *SubQbuffer; extern void SetupInterface __PR((void)); extern int Toshiba3401 __PR((void)); -extern void priv_init __PR((void)); -extern void priv_on __PR((void)); -extern void priv_off __PR((void)); +extern int poll_in __PR((void)); /* * The callback interface for libparanoia to the CD-ROM interface @@ -148,6 +158,7 @@ extern long cdda_disc_firstsector __PR((void *d)); /* -> long sector */ extern long cdda_disc_lastsector __PR((void *d)); /* -> long sector */ extern long cdda_read __PR((void *d, void *buffer, long beginsector, long sectors)); /* -> long sectors */ +extern long cdda_read_c2 __PR((void *d, void *buffer, long beginsector, long sectors)); /* -> long sectors */ extern int cdda_sector_gettrack __PR((void *d, long sector)); /* -> int trackno */ extern int cdda_track_audiop __PR((void *d, int track)); /* -> int Is audiotrack */ extern long cdda_track_firstsector __PR((void *d, int track)); /* -> long sector */ diff -Nru cdrtools-2.01.01a33/cdda2wav/ioctl.c cdrtools-3.02a09/cdda2wav/ioctl.c --- cdrtools-2.01.01a33/cdda2wav/ioctl.c 2007-06-26 16:26:41.000000000 +0000 +++ cdrtools-3.02a09/cdda2wav/ioctl.c 2010-12-19 19:06:01.000000000 +0000 @@ -1,12 +1,13 @@ -/* @(#)ioctl.c 1.33 07/06/26 Copyright 1998,1999,2000 Heiko Eissfeldt, Copyright 2006-2007 J. Schilling */ +/* @(#)ioctl.c 1.39 10/12/19 Copyright 1998,1999,2000 Heiko Eissfeldt, Copyright 2006-2010 J. Schilling */ +#include "config.h" #ifndef lint -static char sccsid[] = -"@(#)ioctl.c 1.33 07/06/26 Copyright 1998,1999,2000 Heiko Eissfeldt, Copyright 2006-2006 J. Schilling"; +static UConst char sccsid[] = +"@(#)ioctl.c 1.39 10/12/19 Copyright 1998,1999,2000 Heiko Eissfeldt, Copyright 2006-2010 J. Schilling"; #endif /* * Copyright (C) 1999 Heiko Eissfeldt heiko@colossus.escape.de - * Copyright (c) 2006-2007 J. Schilling + * Copyright (c) 2006-2010 J. Schilling * * Ioctl interface module for cdrom drive access * @@ -26,19 +27,19 @@ */ #include "config.h" -#include +#include #include #include #include #include #include -#include +#include #include -#include - +#include #include #include #include +#include #include #include @@ -98,7 +99,7 @@ __FreeBSD_version >= 400014) || \ defined(__DragonFly__) if (scgp && scgp->verbose) - fprintf(stderr, "EnableCdda_cooked (CDRIOCSETBLOCKSIZE)...\n"); + fprintf(stderr, _("EnableCdda_cooked (CDRIOCSETBLOCKSIZE)...\n")); if (fAudioMode) { if (ioctl(global.cooked_fd, CDRIOCGETBLOCKSIZE, @@ -110,15 +111,15 @@ #else #if defined CDIOCSETCDDA if (scgp && scgp->verbose) { - fprintf(stderr, "EnableCdda_cooked (CDIOCSETCDDA)...\n"); + fprintf(stderr, _("EnableCdda_cooked (CDIOCSETCDDA)...\n")); if (uSectorsize != CD_FRAMESIZE_RAW) - fprintf(stderr, "non audio sector size is ignored.\n"); + fprintf(stderr, _("non audio sector size is ignored.\n")); } ioctl(global.cooked_fd, CDIOCSETCDDA, &fAudioMode); #else fprintf(stderr, - "EnableCdda_cooked (CDIOCSETCDDA) is not available...\n"); + _("EnableCdda_cooked (CDIOCSETCDDA) is not available...\n")); #endif #endif @@ -139,7 +140,7 @@ struct cdrom_tocentry entryMSF[100]; if (x && x->verbose) { - fprintf(stderr, "ReadToc_cooked (CDROMREADTOCHDR)...\n"); + fprintf(stderr, _("ReadToc_cooked (CDROMREADTOCHDR)...\n")); } /* @@ -153,13 +154,13 @@ if (err == -1) { if (errno == EPERM) { fprintf(stderr, - "Please run this program setuid root.\n"); + _("Please run this program setuid root.\n")); } - errmsg("Cooked: Error in read TOC.\n"); + errmsg(_("Cooked: Error in read TOC.\n")); exit(DEVICE_ERROR); } else { errmsgno(EX_BAD, - "Can't get TocHeader (error %d).\n", err); + _("Can't get TocHeader (error %d).\n"), err); exit(MEDIA_ERROR); } } @@ -174,7 +175,7 @@ /* * error handling */ - errmsg("Can't get TocEntry #%d msf (error %d).\n", + errmsg(("Can't get TocEntry #%d msf (error %d).\n"), i+1, err); exit(MEDIA_ERROR); } @@ -186,7 +187,7 @@ /* * error handling */ - errmsg("Can't get TocEntry LEADOUT msf (error %d).\n", + errmsg(_("Can't get TocEntry LEADOUT msf (error %d).\n"), err); exit(MEDIA_ERROR); } @@ -211,7 +212,7 @@ /* * error handling */ - errmsg("Can't get TocEntry #%d lba (error %d).\n", + errmsg(_("Can't get TocEntry #%d lba (error %d).\n"), i+1, err); exit(MEDIA_ERROR); } @@ -226,7 +227,7 @@ /* * error handling */ - errmsg("Can't get TocEntry LEADOUT lba (error %d).\n", + errmsg(_("Can't get TocEntry LEADOUT lba (error %d).\n"), err); exit(MEDIA_ERROR); } @@ -318,16 +319,16 @@ int retval; if (x && x->verbose) { - fprintf(stderr, "ReadCdRomData_cooked (lseek & read)...\n"); + fprintf(stderr, _("ReadCdRomData_cooked (lseek & read)...\n")); } if ((retval = lseek(global.cooked_fd, lSector*CD_FRAMESIZE, SEEK_SET)) != (int)lSector*CD_FRAMESIZE) { - errmsg("Cannot seek sector.\n"); + errmsg(_("Cannot seek sector.\n")); } if ((retval = read(global.cooked_fd, p, SectorBurstVal*CD_FRAMESIZE)) != (int)SectorBurstVal*CD_FRAMESIZE) { - errmsg("Cannot read sector.\n"); + errmsg(_("Cannot read sector.\n")); } } @@ -353,7 +354,7 @@ #if (defined(__FreeBSD__) || defined(__FreeBSD_kernel__)) && \ __FreeBSD_version >= 501112 if (x && x->verbose) { - fprintf(stderr, "ReadCdRom_cooked (pread)...\n"); + fprintf(stderr, _("ReadCdRom_cooked (pread)...\n")); } do { @@ -370,7 +371,7 @@ arg.buffer = (unsigned char *) &p[0]; if (x && x->verbose) { - fprintf(stderr, "ReadCdRom_cooked (CDROMREADAUDIO)...\n"); + fprintf(stderr, _("ReadCdRom_cooked (CDROMREADAUDIO)...\n")); } do { @@ -384,7 +385,7 @@ arg.buf = (unsigned char *) &p[0]; if (x && x->verbose) { - fprintf(stderr, "ReadCdRom_cooked (CDROMREADAUDIO)...\n"); + fprintf(stderr, _("ReadCdRom_cooked (CDROMREADAUDIO)...\n")); } do { @@ -400,7 +401,7 @@ suncdda.cdda_subcode = CDROM_DA_NO_SUBCODE; if (x && x->verbose) { - fprintf(stderr, "ReadCdRom_cooked (CDROMCDDA)...\n"); + fprintf(stderr, _("ReadCdRom_cooked (CDROMCDDA)...\n")); } do { @@ -423,14 +424,14 @@ if (nothing_read && (errno == EINVAL || errno == EIO)) { fprintf(stderr, - "Sorry, this driver and/or drive does not support cdda reading.\n"); + _("Sorry, this driver and/or drive does not support cdda reading.\n")); } - errmsg("Cooked: Error read cdda sector %u + %u, buffer %p + %x\n", + errmsg(_("Cooked: Error read cdda sector %u + %u, buffer %p + %x\n"), lSector, SectorBurstVal, p, global.shmsize); } else { errmsgno(EX_BAD, - "Can't read frame #%u (error %d).\n", + _("Can't read frame #%u (error %d).\n"), lSector, err); } } @@ -448,7 +449,7 @@ SCSI *x; { if (x && x->verbose) { - fprintf(stderr, "StopPlay_cooked (CDROMSTOP)...\n"); + fprintf(stderr, _("StopPlay_cooked (CDROMSTOP)...\n")); } return (ioctl(global.cooked_fd, CDROMSTOP, 0) ? 0 : -1); @@ -467,7 +468,7 @@ if (x && x->verbose) { fprintf(stderr, - "Play_at_cooked (CDROMSTART & CDROMPLAYMSF)... (%u-%u)", + _("Play_at_cooked (CDROMSTART & CDROMPLAYMSF)... (%u-%u)"), from_sector, from_sector+sectors-1); fprintf(stderr, "\n"); } @@ -484,12 +485,12 @@ * makes index scanning under FreeBSD too slow */ if ((retval = ioctl(global.cooked_fd, CDROMSTART, 0)) != 0) { - errmsg("Cannot do ioctl(%d, CDROMSTART, 0).\n", + errmsg(_("Cannot do ioctl(%d, CDROMSTART, 0).\n"), global.cooked_fd); } #endif if ((retval = ioctl(global.cooked_fd, CDROMPLAYMSF, &cmsf)) != 0) { - errmsg("Cannot do ioctl(%d, CDROMPLAYMSF, ...).\n", + errmsg(_("Cannot do ioctl(%d, CDROMPLAYMSF, ...).\n"), global.cooked_fd); } return (retval); @@ -518,7 +519,7 @@ if (x && x->verbose) { fprintf(stderr, - "ReadSubQ_cooked (CDROM_GET_MCN or CDROMSUBCHNL)...\n"); + _("ReadSubQ_cooked (CDROM_GET_MCN or CDROMSUBCHNL)...\n")); } sub_ch.address_format = CD_MSF_FORMAT; @@ -533,7 +534,7 @@ #else if (x && x->verbose) { fprintf(stderr, - "ReadSubQ_cooked (CDROM_GET_MCN or CDROMSUBCHNL)...\n"); + _("ReadSubQ_cooked (CDROM_GET_MCN or CDROMSUBCHNL)...\n")); } switch (sq_format) { @@ -586,12 +587,12 @@ if (err == -1) { if (errno == EPERM) fprintf(stderr, - "Please run this program setuid root.\n"); - errmsg("Cooked: Error in read subq.\n"); + _("Please run this program setuid root.\n")); + errmsg(_("Cooked: Error in read subq.\n")); exit(DEVICE_ERROR); } else { errmsgno(EX_BAD, - "Can't read sub q channel (error %d).\n", + _("Can't read sub q channel (error %d).\n"), err); exit(DEVICE_ERROR); } @@ -617,7 +618,7 @@ { if (x && x->verbose) { fprintf(stderr, - "SpeedSelect_cooked (CDROM_SELECT_SPEED)...\n"); + _("SpeedSelect_cooked (CDROM_SELECT_SPEED)...\n")); } #ifdef CDROM_SELECT_SPEED @@ -628,13 +629,13 @@ if (err == -1) { if (errno == EPERM) { fprintf(stderr, - "Please run this program setuid root.\n"); + _("Please run this program setuid root.\n")); } - errmsg("Cooked: Error in speed select.\n"); + errmsg(_("Cooked: Error in speed select.\n")); /* exit(err); */ } else { errmsgno(EX_BAD, - "Can't set speed %d (error %d).\n", + _("Can't set speed %d (error %d).\n"), speed, err); exit(DEVICE_ERROR); } @@ -653,7 +654,7 @@ struct stat statstruct; if (fstat(global.cooked_fd, &statstruct)) { - errmsg("Cannot stat cd %d (%s).\n", + errmsg(_("Cannot stat cd %d (%s).\n"), global.cooked_fd, pdev_name); exit(STAT_ERROR); } @@ -692,7 +693,7 @@ case MATSUSHITA_CDROM4_MAJOR: /* sbpcd 4 */ if (err == -1) { - errmsg("Error doing ioctl(CDROMAUDIOBUFSIZ).\n"); + errmsg(_("Error doing ioctl(CDROMAUDIOBUFSIZ).\n")); } } #endif diff -Nru cdrtools-2.01.01a33/cdda2wav/ioctl.h cdrtools-3.02a09/cdda2wav/ioctl.h --- cdrtools-2.01.01a33/cdda2wav/ioctl.h 2000-01-02 16:30:38.000000000 +0000 +++ cdrtools-3.02a09/cdda2wav/ioctl.h 2012-12-02 13:03:14.000000000 +0000 @@ -1,2 +1,2 @@ -/* @(#)ioctl.h 1.2 99/12/19 Copyright 1998,1999 Heiko Eissfeldt */ -void SetupCookedIoctl __PR(( char *pdev_name)); +/* @(#)ioctl.h 1.3 12/12/02 Copyright 1998,1999 Heiko Eissfeldt */ +void SetupCookedIoctl __PR((char *pdev_name)); diff -Nru cdrtools-2.01.01a33/cdda2wav/lconfig.h.in cdrtools-3.02a09/cdda2wav/lconfig.h.in --- cdrtools-2.01.01a33/cdda2wav/lconfig.h.in 2006-02-15 01:07:45.000000000 +0000 +++ cdrtools-3.02a09/cdda2wav/lconfig.h.in 2015-12-13 23:49:33.000000000 +0000 @@ -1,5 +1,5 @@ #if 0 -/* @(#)lconfig.h.in 1.6 06/02/15 Copyright 1998-2003 Heiko Eissfeldt */ +/* @(#)lconfig.h.in 1.12 15/12/14 Copyright 1998-2003,2015 Heiko Eissfeldt, Copyright 2006-2009 J. Schilling */ #endif #undef HAVE_SYS_CDIO_H /* if we should use sys/cdio.h */ @@ -19,26 +19,14 @@ #undef HAVE_MACHINE_SOUNDCARD_H /* if we should use machine/soundcard.h */ -#undef HAVE_SYS_ASOUNDLIB_H /* if we should use sys/asoundlib.h */ - -#undef HAVE_WINDOWS_H /* if we should use windows.h */ - -#undef HAVE_MMSYSTEM_H /* if we should use mmsystem.h */ - -#undef HAVE_OS2_H /* if we should use os2.h */ +#undef HAVE_SNDIO_H /* if we should use sndio.h */ -#undef HAVE_OS2ME_H /* if we should use os2me.h */ +#undef HAVE_ALSA_ASOUNDLIB_H /* if we should use alsa/asoundlib.h */ -#if defined HAVE_SOUNDCARD_H || defined HAVE_SYS_SOUNDCARD_H || defined HAVE_LINUX_SOUNDCARD_H || defined HAVE_MACHINE_SOUNDCARD_H -#define HAVE_OSS 1 -#endif +#undef HAVE_SYS_ASOUNDLIB_H /* if we should use sys/asoundlib.h */ -#if defined HAVE_WINDOWS_H && defined HAVE_MMSYSTEM_H -#define HAVE_WINSOUND 1 -#endif +#undef HAVE_MMSYSTEM_H /* if we should use mmsystem.h */ -#if defined HAVE_OS2_H && defined HAVE_OS2ME_H -#define HAVE_OS2SOUND 1 -#endif +#undef HAVE_PULSE_PULSEAUDIO_H /* if we should use pulse/pulseaudio.h */ -#undef HAVE_STRTOUL +#undef HAVE_PULSE_SIMPLE_H /* if we should use pulse/simple.h */ diff -Nru cdrtools-2.01.01a33/cdda2wav/local.cnf.in cdrtools-3.02a09/cdda2wav/local.cnf.in --- cdrtools-2.01.01a33/cdda2wav/local.cnf.in 2007-04-23 22:20:08.000000000 +0000 +++ cdrtools-3.02a09/cdda2wav/local.cnf.in 2015-10-07 20:00:37.000000000 +0000 @@ -1,4 +1,4 @@ -# @(#)local.cnf.in 1.7 07/04/24 Copyright 1998-2002 Heiko Eissfeldt +# @(#)local.cnf.in 1.11 15/10/07 Copyright 1998-2002,2015 Heiko Eissfeldt. Copyright 2007-2015 J. Schilling # # Makefile for cdda2wav, a sampling utility. # @@ -43,25 +43,38 @@ ############# Sound device support #to disable sound support comment out the corresponding line with HAVE_SOUND +ALSA_SOUND_DEV= '"default"' OSS_SOUND_DEV= '"/dev/dsp"' SUN_SOUND_DEV= '"/dev/audio"' +SNDIO_SOUND_DEV='SIO_DEVANY' +NO_SOUND_DEV='""' -HAVE_OSS= @HAVE_OSS@ +HAVE_ALSA= @HAVE_ALSA@ HAVE_SUNSOUND= @HAVE_SUNSOUND@ HAVE_WINSOUND= @HAVE_WINSOUND@ HAVE_OS2SOUND= @HAVE_OS2SOUND@ HAVE_QNXSOUND= @HAVE_SYS_ASOUNDLIB_H@ -#_HAVE_SOUND= $(_UNIQ)$(HAVE_OSS)$(HAVE_SUNSOUND) -_HAVE_SOUND= $(_UNIQ)$(HAVE_OSS)$(HAVE_SUNSOUND)$(HAVE_WINSOUND)$(HAVE_OS2SOUND)$(HAVE_QNXSOUND) +HAVE_SNDIO= @HAVE_SNDIO@ +_HAVE_OSS= @HAVE_OSS@ +__HAVE_OSS= $(_UNIQ)$(_HAVE_OSS)_$(HAVE_SUNSOUND)$(HAVE_ALSA)$(HAVE_SNDIO)$(HAVE_OS2SOUND)$(HAVE_QNXSOUND) +___HAVE_OSS= $(__HAVE_OSS:$(_UNIQ)1_=$(_HAVE_OSS)) +____HAVE_OSS= $(___HAVE_OSS:$(_UNIQ)1_%=) +HAVE_OSS= $(____HAVE_OSS:$(_UNIQ)_%=) +_HAVE_SOUND= $(_UNIQ)$(HAVE_ALSA)$(HAVE_OSS)$(HAVE_SUNSOUND)$(HAVE_OS2SOUND)$(HAVE_SNDIO) __HAVE_SOUND= $(_HAVE_SOUND:$(_UNIQ)=) -#HAVE_SOUND= $(__HAVE_SOUND:$(_UNIQ)$(HAVE_OSS)$(HAVE_SUNSOUND)=-DECHO_TO_SOUNDCARD) -HAVE_SOUND= $(__HAVE_SOUND:$(_UNIQ)$(HAVE_OSS)$(HAVE_SUNSOUND)$(HAVE_WINSOUND)$(HAVE_OS2SOUND)$(HAVE_QNXSOUND)=-DECHO_TO_SOUNDCARD) +HAVE_SOUND= $(__HAVE_SOUND:$(_UNIQ)$(HAVE_ALSA)$(HAVE_OSS)$(HAVE_SUNSOUND)$(HAVE_OS2SOUND)$(HAVE_SNDIO)=-DECHO_TO_SOUNDCARD) -_SOUND_DEVICE= $(_UNIQ)$(HAVE_OSS)$(HAVE_SOUND)$(HAVE_SUNSOUND) -__SOUND_DEVICE= $(_SOUND_DEVICE:$(_UNIQ)='""') -___SOUND_DEVICE= $(__SOUND_DEVICE:$(_UNIQ)$(HAVE_OSS)$(HAVE_SOUND)=$(OSS_SOUND_DEV)) -____SOUND_DEVICE= $(___SOUND_DEVICE:$(_UNIQ)$(HAVE_SOUND)$(HAVE_SUNSOUND)=$(SUN_SOUND_DEV)) -SOUND_DEVICE= $(____SOUND_DEVICE:$(_UNIQ)$(HAVE_OSS)$(HAVE_SOUND)$(HAVE_SUNSOUND)=$(OSS_SOUND_DEV)) + +# SNDIO -> SNDIO_SOUND_DEV +# ALSA -> ALSA_SOUND_DEV +# SUNSOUND -> SUN_SOUND_DEV +# OSS -> OSS_SOUND_DEV +_SOUND_DEVICE= $(_UNIQ)$(HAVE_SOUND)_$(HAVE_SNDIO)_$(HAVE_ALSA)_$(HAVE_SUNSOUND)_$(HAVE_OSS) +__SOUND_DEVICE= $(_SOUND_DEVICE:$(_UNIQ)$(HAVE_SOUND)____='""') +___SOUND_DEVICE= $(__SOUND_DEVICE:$(_UNIQ)$(HAVE_SOUND)_1_%=$(SNDIO_SOUND_DEV)) +____SOUND_DEVICE= $(___SOUND_DEVICE:$(_UNIQ)$(HAVE_SOUND)__1%=$(ALSA_SOUND_DEV)) +_____SOUND_DEVICE= $(____SOUND_DEVICE:$(_UNIQ)$(HAVE_SOUND)___1%=$(SUN_SOUND_DEV)) +SOUND_DEVICE= $(_____SOUND_DEVICE:$(_UNIQ)$(HAVE_SOUND)____1=$(OSS_SOUND_DEV)) _EXTRALIB= $(_UNIQ)$(HAVE_WINSOUND)$(HAVE_OS2SOUND)$(HAVE_QNXSOUND) __EXTRALIB= $(_EXTRALIB:$(_UNIQ)=@EXTRALIBS@) @@ -93,11 +106,11 @@ _DEF_TYPE= $(_UNIQ)$(HAVE_SUN_OS) __DEF_TYPE= $(_DEF_TYPE:$(_UNIQ)='"wav"') DEF_TYPE= $(__DEF_TYPE:$(_UNIQ)$(HAVE_SUN_OS)='"au"') -#DEF_TYPE= "wav" -#DEF_TYPE= "au" -#DEF_TYPE= "cdr" -#DEF_TYPE= "aiff" -#DEF_TYPE= "aifc" +DEF_TYPE= '"wav"' +#DEF_TYPE= '"au"' +#DEF_TYPE= '"cdr"' +#DEF_TYPE= '"aiff"' +#DEF_TYPE= '"aifc"' # default file name for sound file DEF_FILE='"audio"' @@ -112,7 +125,7 @@ ############## enable/disable MD5 signatures in info files ################## # Comment out if you don't want this. WANT_MD5=-DMD5_SIGNATURES -MD5OBJECTS=md5c.o +MD5OBJECTS=md5.o # CDINDEX server support # Comment out if you don't want a disk description file for the cdindex server diff -Nru cdrtools-2.01.01a33/cdda2wav/Makefile cdrtools-3.02a09/cdda2wav/Makefile --- cdrtools-2.01.01a33/cdda2wav/Makefile 2007-06-15 15:43:04.000000000 +0000 +++ cdrtools-3.02a09/cdda2wav/Makefile 2013-04-21 18:13:20.000000000 +0000 @@ -1,31 +1,52 @@ -#ident @(#)Makefile 1.14 07/06/15 +#ident @(#)Makefile 1.29 13/04/21 ########################################################################### SRCROOT= .. RULESDIR= RULES LCONFIG= local.cnf +LCONFIG_DEP= install-sh + +########################################################################### +all: +all clean depend config install: install-sh scsi_scan.c scsi_cdr.c priv.c + +install-sh scsi_scan.c scsi_cdr.c cd_misc.c priv.c: + @echo " ==> MAKING SYMLINKS in ." && sh ./MKLINKS +########################################################################### + include $(SRCROOT)/$(RULESDIR)/rules.top ########################################################################### INSDIR= bin TARGET= cdda2wav -CPPOPTS += -DFIFO -I../libscg -I../cdrecord $(CDDA2WAVDEFS) +INSMODE= 4711 +INSUSR= root +CPPOPTS += -I../libcdrdeflt +CPPOPTS += -DFIFO -I../libscg -I../libparanoia -I../cdrecord $(CDDA2WAVDEFS) +CPPOPTS += -DCDDA2WAV # Signal that we compile cdda2wav CPPOPTS += -DSCHILY_PRINT +CPPOPTS += -DINS_BASE=\"${INS_BASE}\" +CPPOPTS += -DTEXT_DOMAIN=\"SCHILY_cdrtools\" CFILES= cdda2wav.c interface.c semshm.c resample.c \ scsi_scan.c \ - toc.c wav.c sun.c raw.c md5c.c setuid.c ringbuff.c \ + toc.c wav.c sun.c raw.c setuid.c ringbuff.c \ sndconfig.c scsi_cmds.c aiff.c aifc.c \ - scsi_cdr.c cd_misc.c modes.c ioctl.c sha_func.c base64.c \ - defaults.c + scsi_cdr.c cd_misc.c ioctl.c base64.c \ + parse.c priv.c HFILES= cdda2wav.h interface.h semshm.h global.h resample.h \ + exitcodes.h \ scsi_scan.h \ - mytype.h toc.h wav.h sun.h raw.h md5.h setuid.h ringbuff.h \ + mytype.h toc.h wav.h sun.h raw.h setuid.h ringbuff.h \ config.h saveargs.h sndfile.h aiff.h aifc.h \ sndconfig.h scsi_cmds.h lowlevel.h byteorder.h mycdrom.h \ - base64.h sha.h mmsystem.h cd_text.c cd_extra.c \ - defaults.h version.h -LIBS= -lrscg -lscg $(LIB_VOLMGT) -lparanoia -ldeflt -lschily $(SCSILIB) $(EXTRALIB) $(LIB_SOCKET) -XMK_FILE= Makefile.man Makefile.rd cdda2ogg.mk1 + base64.h mmsystem.h cd_text.c cd_extra.c ioctl.h \ + parse.h version.h + +# +# LIB_CAP is needed for Linux capability support in librscg. +# +LIBS= -lscgcmd -lrscg -lscg $(LIB_VOLMGT) -lparanoia -lcdrdeflt -ldeflt -lmdigest -lschily $(SCSILIB) $(EXTRALIB) $(LIB_SOCKET) $(LIB_INTL) $(LIB_CAP) +XMK_FILE= Makefile.man Makefile.rd cdda2ogg.mk cdda2mp3.mk # cdda2ogg.mk1 fehlt noch für make rel xall: all diff -Nru cdrtools-2.01.01a33/cdda2wav/md5c.c cdrtools-3.02a09/cdda2wav/md5c.c --- cdrtools-2.01.01a33/cdda2wav/md5c.c 2006-05-02 19:37:48.000000000 +0000 +++ cdrtools-3.02a09/cdda2wav/md5c.c 1970-01-01 00:00:00.000000000 +0000 @@ -1,395 +0,0 @@ -/* @(#)md5c.c 1.4 06/05/02 Copyright 1998,1999 Heiko Eissfeldt */ -#ifndef lint -static char sccsid[] = -"@(#)md5c.c 1.4 06/05/02 Copyright 1998,1999 Heiko Eissfeldt"; - -#endif -/* - * MD5C.C - RSA Data Security, Inc., MD5 message-digest algorithm - */ - -/* - * Copyright (C) 1991-2, RSA Data Security, Inc. Created 1991. All - * rights reserved. - * - * License to copy and use this software is granted provided that it - * is identified as the "RSA Data Security, Inc. MD5 Message-Digest - * Algorithm" in all material mentioning or referencing this software - * or this function. - * - * License is also granted to make and use derivative works provided - * that such works are identified as "derived from the RSA Data - * Security, Inc. MD5 Message-Digest Algorithm" in all material - * mentioning or referencing the derived work. - * - * RSA Data Security, Inc. makes no representations concerning either - * the merchantability of this software or the suitability of this - * software for any particular purpose. It is provided "as is" - * without express or implied warranty of any kind. - * - * These notices must be retained in any copies of any part of this - * documentation and/or software. - */ - -#include "config.h" -#include "mytype.h" -#include "md5.h" - -/* - * Constants for MD5Transform routine. - */ -#define S11 7L -#define S12 12L -#define S13 17L -#define S14 22L -#define S21 5L -#define S22 9L -#define S23 14L -#define S24 20L -#define S31 4L -#define S32 11L -#define S33 16L -#define S34 23L -#define S41 6L -#define S42 10L -#define S43 15L -#define S44 21L - -typedef unsigned char *POINTER; - -static void MD5Transform __PR((UINT4 [4], unsigned char [64])); -static void Encode __PR((unsigned char *, UINT4 *, unsigned int)); -static void Decode __PR((UINT4 *, unsigned char *, unsigned int)); -static void MD5_memcpy __PR((POINTER, POINTER, unsigned int)); -static void MD5_memset __PR((POINTER, int, unsigned int)); - -static unsigned char PADDING[64] = { - 0x80, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 -}; - -/* - * F, G, H and I are basic MD5 functions. - */ -#define F(x, y, z) (((x) & (y)) | ((~x) & (z))) -#define G(x, y, z) (((x) & (z)) | ((y) & (~z))) -#define H(x, y, z) ((x) ^ (y) ^ (z)) -#define I(x, y, z) ((y) ^ ((x) | (~z))) - -/* - * ROTATE_LEFT rotates x left n bits. - */ -#define ROTATE_LEFT(x, n) (((x) << (n)) | ((x) >> (32L-(n)))) - -/* - * FF, GG, HH, and II transformations for rounds 1, 2, 3, and 4. - * Rotation is separate from addition to prevent recomputation. - */ -#define FF(a, b, c, d, x, s, ac) { \ - (a) += F((b), (c), (d)) + (x) + (UINT4)(ac); \ - (a) = ROTATE_LEFT((a), (s)); \ - (a) += (b); \ -} -#define GG(a, b, c, d, x, s, ac) { \ - (a) += G((b), (c), (d)) + (x) + (UINT4)(ac); \ - (a) = ROTATE_LEFT((a), (s)); \ - (a) += (b); \ -} -#define HH(a, b, c, d, x, s, ac) { \ - (a) += H((b), (c), (d)) + (x) + (UINT4)(ac); \ - (a) = ROTATE_LEFT((a), (s)); \ - (a) += (b); \ -} -#define II(a, b, c, d, x, s, ac) { \ - (a) += I((b), (c), (d)) + (x) + (UINT4)(ac); \ - (a) = ROTATE_LEFT((a), (s)); \ - (a) += (b); \ -} - -/* - * MD5 initialization. Begins an MD5 operation, writing a new context. - */ -void -MD5Init(context) - MD5_CTX *context; /* context */ -{ - context->count[0] = context->count[1] = 0; - /* - * Load magic initialization constants. - */ - context->state[0] = UINT4_C(0x67452301); - context->state[1] = UINT4_C(0xefcdab89); - context->state[2] = UINT4_C(0x98badcfe); - context->state[3] = UINT4_C(0x10325476); -} - -/* - * MD5 block update operation. Continues an MD5 message-digest - * operation, processing another message block, and updating the - * context. - */ -void -MD5Update(context, input, inputLen) - MD5_CTX *context; /* context */ - unsigned char *input; /* input block */ - unsigned int inputLen; /* length of input block */ -{ - unsigned int i; - unsigned int indx; - unsigned int partLen; - - /* - * Compute number of bytes mod 64 - */ - indx = (unsigned int)((context->count[0] >> 3L) & 0x3F); - - /* - * Update number of bits - */ - if ((context->count[0] += ((UINT4)inputLen << 3L)) - < ((UINT4)inputLen << 3L)) - context->count[1]++; - - context->count[1] += ((UINT4)inputLen >> 29L); - - partLen = 64 - indx; - - /* - * Transform as many times as possible. - */ - if (inputLen >= partLen) { - MD5_memcpy((POINTER)&context->buffer[indx], - (POINTER)input, partLen); - MD5Transform(context->state, context->buffer); - - for (i = partLen; i + 63 < inputLen; i += 64) - MD5Transform(context->state, &input[i]); - - indx = 0; - } else - i = 0; - - /* - * Buffer remaining input - */ - MD5_memcpy((POINTER)&context->buffer[indx], - (POINTER)&input[i], - inputLen-i); -} - -/* - * MD5 finalization. Ends an MD5 message-digest operation, writing the - * the message digest and zeroizing the context. - */ -void -MD5Final(digest, context) - unsigned char digest[16]; /* message digest */ - MD5_CTX *context; /* context */ -{ - unsigned char bits[8]; - unsigned int indx; - unsigned int padLen; - - /* - * Save number of bits - */ - Encode(bits, context->count, 8); - - /* - * Pad out to 56 mod 64. - */ - indx = (unsigned int)((context->count[0] >> 3L) & 0x3f); - padLen = (indx < 56) ? (56 - indx) : (120 - indx); - MD5Update(context, PADDING, padLen); - - /* - * Append length (before padding) - */ - MD5Update(context, bits, 8); - - /* - * Store state in digest - */ - Encode(digest, context->state, 16); - - /* - * Zeroize sensitive information. - */ - MD5_memset((POINTER)context, 0, sizeof (*context)); -} - -/* - * MD5 basic transformation. Transforms state based on block. - */ -static void -MD5Transform(state, block) - UINT4 state[4]; - unsigned char block[64]; -{ - UINT4 a = state[0], b = state[1], c = state[2], d = state[3], x[16]; - - Decode(x, block, 64); - - /* - * Round 1 - */ - FF(a, b, c, d, x[ 0], S11, UINT4_C(0xd76aa478)); /* 1 */ - FF(d, a, b, c, x[ 1], S12, UINT4_C(0xe8c7b756)); /* 2 */ - FF(c, d, a, b, x[ 2], S13, UINT4_C(0x242070db)); /* 3 */ - FF(b, c, d, a, x[ 3], S14, UINT4_C(0xc1bdceee)); /* 4 */ - FF(a, b, c, d, x[ 4], S11, UINT4_C(0xf57c0faf)); /* 5 */ - FF(d, a, b, c, x[ 5], S12, UINT4_C(0x4787c62a)); /* 6 */ - FF(c, d, a, b, x[ 6], S13, UINT4_C(0xa8304613)); /* 7 */ - FF(b, c, d, a, x[ 7], S14, UINT4_C(0xfd469501)); /* 8 */ - FF(a, b, c, d, x[ 8], S11, UINT4_C(0x698098d8)); /* 9 */ - FF(d, a, b, c, x[ 9], S12, UINT4_C(0x8b44f7af)); /* 10 */ - FF(c, d, a, b, x[10], S13, UINT4_C(0xffff5bb1)); /* 11 */ - FF(b, c, d, a, x[11], S14, UINT4_C(0x895cd7be)); /* 12 */ - FF(a, b, c, d, x[12], S11, UINT4_C(0x6b901122)); /* 13 */ - FF(d, a, b, c, x[13], S12, UINT4_C(0xfd987193)); /* 14 */ - FF(c, d, a, b, x[14], S13, UINT4_C(0xa679438e)); /* 15 */ - FF(b, c, d, a, x[15], S14, UINT4_C(0x49b40821)); /* 16 */ - - /* - * Round 2 - */ - GG(a, b, c, d, x[ 1], S21, UINT4_C(0xf61e2562)); /* 17 */ - GG(d, a, b, c, x[ 6], S22, UINT4_C(0xc040b340)); /* 18 */ - GG(c, d, a, b, x[11], S23, UINT4_C(0x265e5a51)); /* 19 */ - GG(b, c, d, a, x[ 0], S24, UINT4_C(0xe9b6c7aa)); /* 20 */ - GG(a, b, c, d, x[ 5], S21, UINT4_C(0xd62f105d)); /* 21 */ - GG(d, a, b, c, x[10], S22, UINT4_C(0x2441453)); /* 22 */ - GG(c, d, a, b, x[15], S23, UINT4_C(0xd8a1e681)); /* 23 */ - GG(b, c, d, a, x[ 4], S24, UINT4_C(0xe7d3fbc8)); /* 24 */ - GG(a, b, c, d, x[ 9], S21, UINT4_C(0x21e1cde6)); /* 25 */ - GG(d, a, b, c, x[14], S22, UINT4_C(0xc33707d6)); /* 26 */ - GG(c, d, a, b, x[ 3], S23, UINT4_C(0xf4d50d87)); /* 27 */ - GG(b, c, d, a, x[ 8], S24, UINT4_C(0x455a14ed)); /* 28 */ - GG(a, b, c, d, x[13], S21, UINT4_C(0xa9e3e905)); /* 29 */ - GG(d, a, b, c, x[ 2], S22, UINT4_C(0xfcefa3f8)); /* 30 */ - GG(c, d, a, b, x[ 7], S23, UINT4_C(0x676f02d9)); /* 31 */ - GG(b, c, d, a, x[12], S24, UINT4_C(0x8d2a4c8a)); /* 32 */ - - /* - * Round 3 - */ - HH(a, b, c, d, x[ 5], S31, UINT4_C(0xfffa3942)); /* 33 */ - HH(d, a, b, c, x[ 8], S32, UINT4_C(0x8771f681)); /* 34 */ - HH(c, d, a, b, x[11], S33, UINT4_C(0x6d9d6122)); /* 35 */ - HH(b, c, d, a, x[14], S34, UINT4_C(0xfde5380c)); /* 36 */ - HH(a, b, c, d, x[ 1], S31, UINT4_C(0xa4beea44)); /* 37 */ - HH(d, a, b, c, x[ 4], S32, UINT4_C(0x4bdecfa9)); /* 38 */ - HH(c, d, a, b, x[ 7], S33, UINT4_C(0xf6bb4b60)); /* 39 */ - HH(b, c, d, a, x[10], S34, UINT4_C(0xbebfbc70)); /* 40 */ - HH(a, b, c, d, x[13], S31, UINT4_C(0x289b7ec6)); /* 41 */ - HH(d, a, b, c, x[ 0], S32, UINT4_C(0xeaa127fa)); /* 42 */ - HH(c, d, a, b, x[ 3], S33, UINT4_C(0xd4ef3085)); /* 43 */ - HH(b, c, d, a, x[ 6], S34, UINT4_C(0x4881d05)); /* 44 */ - HH(a, b, c, d, x[ 9], S31, UINT4_C(0xd9d4d039)); /* 45 */ - HH(d, a, b, c, x[12], S32, UINT4_C(0xe6db99e5)); /* 46 */ - HH(c, d, a, b, x[15], S33, UINT4_C(0x1fa27cf8)); /* 47 */ - HH(b, c, d, a, x[ 2], S34, UINT4_C(0xc4ac5665)); /* 48 */ - - /* - * Round 4 - */ - II(a, b, c, d, x[ 0], S41, UINT4_C(0xf4292244)); /* 49 */ - II(d, a, b, c, x[ 7], S42, UINT4_C(0x432aff97)); /* 50 */ - II(c, d, a, b, x[14], S43, UINT4_C(0xab9423a7)); /* 51 */ - II(b, c, d, a, x[ 5], S44, UINT4_C(0xfc93a039)); /* 52 */ - II(a, b, c, d, x[12], S41, UINT4_C(0x655b59c3)); /* 53 */ - II(d, a, b, c, x[ 3], S42, UINT4_C(0x8f0ccc92)); /* 54 */ - II(c, d, a, b, x[10], S43, UINT4_C(0xffeff47d)); /* 55 */ - II(b, c, d, a, x[ 1], S44, UINT4_C(0x85845dd1)); /* 56 */ - II(a, b, c, d, x[ 8], S41, UINT4_C(0x6fa87e4f)); /* 57 */ - II(d, a, b, c, x[15], S42, UINT4_C(0xfe2ce6e0)); /* 58 */ - II(c, d, a, b, x[ 6], S43, UINT4_C(0xa3014314)); /* 59 */ - II(b, c, d, a, x[13], S44, UINT4_C(0x4e0811a1)); /* 60 */ - II(a, b, c, d, x[ 4], S41, UINT4_C(0xf7537e82)); /* 61 */ - II(d, a, b, c, x[11], S42, UINT4_C(0xbd3af235)); /* 62 */ - II(c, d, a, b, x[ 2], S43, UINT4_C(0x2ad7d2bb)); /* 63 */ - II(b, c, d, a, x[ 9], S44, UINT4_C(0xeb86d391)); /* 64 */ - - state[0] += a; - state[1] += b; - state[2] += c; - state[3] += d; - - /* - * Zeroize sensitive information. - */ - MD5_memset((POINTER)x, 0, sizeof (x)); -} - -/* - * Encodes input (UINT4) into output (unsigned char). Assumes len is - * a multiple of 4. - */ -static void -Encode(output, input, len) - unsigned char *output; - UINT4 *input; - unsigned int len; -{ - unsigned int i; - unsigned int j; - - for (i = 0, j = 0; j < len; i++, j += 4) { - output[j] = (unsigned char)(input[i] & 0xff); - output[j+1] = (unsigned char)((input[i] >> 8L) & 0xff); - output[j+2] = (unsigned char)((input[i] >> 16L) & 0xff); - output[j+3] = (unsigned char)((input[i] >> 24L) & 0xff); - } -} - -/* - * Decodes input (unsigned char) into output (UINT4). Assumes len is - * a multiple of 4. - */ -static void -Decode(output, input, len) - UINT4 *output; - unsigned char *input; - unsigned int len; -{ - unsigned int i; - unsigned int j; - - for (i = 0, j = 0; j < len; i++, j += 4) { - output[i] = ((UINT4)input[j]) | - (((UINT4)input[j+1]) << 8L) | - (((UINT4)input[j+2]) << 16L) | - (((UINT4)input[j+3]) << 24L); - } -} - -/* - * Note: Replace "for loop" with standard memcpy if possible. - */ -static void -MD5_memcpy(output, input, len) - POINTER output; - POINTER input; - unsigned int len; -{ - unsigned int i; - - for (i = 0; i < len; i++) - output[i] = input[i]; -} - -/* - * Note: Replace "for loop" with standard memset if possible. - */ -static void -MD5_memset(output, value, len) - POINTER output; - int value; - unsigned int len; -{ - unsigned int i; - - for (i = 0; i < len; i++) - ((char *)output)[i] = (char)value; -} diff -Nru cdrtools-2.01.01a33/cdda2wav/md5.h cdrtools-3.02a09/cdda2wav/md5.h --- cdrtools-2.01.01a33/cdda2wav/md5.h 2006-04-19 11:37:53.000000000 +0000 +++ cdrtools-3.02a09/cdda2wav/md5.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,38 +0,0 @@ -/* @(#)md5.h 1.3 06/04/19 Copyright 1998,1999 Heiko Eissfeldt */ -/* - * MD5.H - header file for MD5C.C - */ - -/* - * Copyright (C) 1991-2, RSA Data Security, Inc. Created 1991. All - * rights reserved. - * - * License to copy and use this software is granted provided that it - * is identified as the "RSA Data Security, Inc. MD5 Message-Digest - * Algorithm" in all material mentioning or referencing this software - * or this function. - * - * License is also granted to make and use derivative works provided - * that such works are identified as "derived from the RSA Data - * Security, Inc. MD5 Message-Digest Algorithm" in all material - * mentioning or referencing the derived work. - * - * RSA Data Security, Inc. makes no representations concerning either - * the merchantability of this software or the suitability of this - * software for any particular purpose. It is provided "as is" - * without express or implied warranty of any kind. - * - * These notices must be retained in any copies of any part of this - * documentation and/or software. - */ - -/* MD5 context. */ -typedef struct { - UINT4 state[4]; /* state (ABCD) */ - UINT4 count[2]; /* number of bits, modulo 2^64 (lsb first) */ - unsigned char buffer[64]; /* input buffer */ -} MD5_CTX; - -extern void MD5Init __PR((MD5_CTX *)); -extern void MD5Update __PR((MD5_CTX *, unsigned char *, unsigned int)); -extern void MD5Final __PR((unsigned char [16], MD5_CTX *)); diff -Nru cdrtools-2.01.01a33/cdda2wav/MKLINKS cdrtools-3.02a09/cdda2wav/MKLINKS --- cdrtools-2.01.01a33/cdda2wav/MKLINKS 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/cdda2wav/MKLINKS 2013-04-21 18:13:20.000000000 +0000 @@ -0,0 +1,49 @@ +#!/bin/sh +########################################################################### +#ident "@(#)MKLINKS 1.7 13/04/21 " +########################################################################### +# Written 2008-2011 by J. Schilling +########################################################################### +# Copyright (c) 2008-2011 J. Schilling +########################################################################### +# The contents of this file are subject to the terms of the +# Common Development and Distribution License, Version 1.0 only +# (the "License"). You may not use this file except in compliance +# with the License. +# +# See the file CDDL.Schily.txt in this distribution for details. +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file CDDL.Schily.txt from this distribution. +########################################################################### +symlink="ln -s" +MKLINKS_TEST=${MKLINKS_TEST-:} +if [ ".$MKLINKS_COPY" = '.' ]; then + rm -f xxzzy.123 xxzzy.345 + echo test > xxzzy.123 + $symlink xxzzy.123 xxzzy.345 + test $? = 0 || symlink=cp + test -r xxzzy.345 || symlink=cp + ${MKLINKS_TEST} -h xxzzy.345 || symlink=cp + rm -f xxzzy.123 xxzzy.345 +else + symlink=cp +fi +########################################################################### + +$symlink ../cdrecord/cd_misc.c . +$symlink ../cdrecord/scsi_cdr.c . +$symlink ../cdrecord/scsi_scan.c . +$symlink ../cdrecord/priv.c . + +$symlink ../autoconf/acgeneral.m4 . +$symlink ../autoconf/aclocal.m4 . +$symlink ../autoconf/acoldnames.m4 . +$symlink ../autoconf/acspecific.m4 . +$symlink ../autoconf/autoconf.m4 . +$symlink ../autoconf/autoconf . +$symlink ../autoconf/autoheader.m4 . +$symlink ../autoconf/config.guess . +$symlink ../autoconf/config.sub . + +$symlink ../conf/install-sh . diff -Nru cdrtools-2.01.01a33/cdda2wav/modes.c cdrtools-3.02a09/cdda2wav/modes.c --- cdrtools-2.01.01a33/cdda2wav/modes.c 2006-09-13 15:35:12.000000000 +0000 +++ cdrtools-3.02a09/cdda2wav/modes.c 1970-01-01 00:00:00.000000000 +0000 @@ -1,296 +0,0 @@ -/* @(#)modes.c 1.26 06/09/13 Copyright 1988, 1997-2001, 2004 J. Schilling */ -#ifndef lint -static char sccsid[] = - "@(#)modes.c 1.26 06/09/13 Copyright 1988, 1997-2001, 2004 J. Schilling"; -#endif -/* - * SCSI mode page handling - * - * Copyright (c) 1988, 1997-2001, 2004 J. Schilling - */ -/* - * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. - * - * See the file CDDL.Schily.txt in this distribution for details. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file CDDL.Schily.txt from this distribution. - */ - -#include -#include -#include -#include -#include -#include -#include - -#include "cdrecord.h" - -EXPORT int scsi_compliant; - -LOCAL BOOL has_mode_page __PR((SCSI *scgp, int page, char *pagename, int *lenp)); -EXPORT BOOL get_mode_params __PR((SCSI *scgp, int page, char *pagename, - Uchar *modep, Uchar *cmodep, - Uchar *dmodep, Uchar *smodep, - int *lenp)); -EXPORT BOOL set_mode_params __PR((SCSI *scgp, char *pagename, Uchar *modep, - int len, int save, int secsize)); - -#define XXX - -#ifdef XXX -LOCAL BOOL -has_mode_page(scgp, page, pagename, lenp) - SCSI *scgp; - int page; - char *pagename; - int *lenp; -{ - Uchar mode[0x100]; - int hdlen; - int len = 1; /* Nach SCSI Norm */ - int try = 0; - struct scsi_mode_page_header *mp; - - /* - * ATAPI drives (used e.g. by IOMEGA) from y2k have the worst firmware - * I've seen. They create DMA buffer overruns if we request less than - * 3 bytes with 6 byte mode sense which equals 4 byte with 10 byte mode - * sense. In order to prevent repeated bus resets, we remember this - * bug. - * - * IOMEGA claims that they are using Philips clone drives but a Philips - * drive I own does not have the problem. - */ - if ((scgp->dflags & DRF_MODE_DMA_OVR) != 0) - len = sizeof (struct scsi_mode_header); -again: - fillbytes((caddr_t)mode, sizeof (mode), '\0'); - if (lenp) - *lenp = 0; - - scgp->silent++; - (void) unit_ready(scgp); -/* Maxoptix bringt Aborted cmd 0x0B mit code 0x4E (overlapping cmds)*/ - - /* - * The Matsushita CW-7502 will sometimes deliver a zeroed - * mode page 2A if "Page n default" is used instead of "current". - */ - if (mode_sense(scgp, mode, len, page, 0) < 0) { /* Page n current */ - scgp->silent--; - if (len < (int)sizeof (struct scsi_mode_header) && try == 0) { - len = sizeof (struct scsi_mode_header); - goto again; - } - return (FALSE); - } else { - if (len > 1 && try == 0) { - /* - * If we come here, we got a hard failure with the - * fist try. Remember this (IOMEGA USB) firmware bug. - */ - if ((scgp->dflags & DRF_MODE_DMA_OVR) == 0) { - /* XXX if (!nowarn) */ - errmsgno(EX_BAD, - "Warning: controller creates hard SCSI failure when retrieving %s page.\n", - pagename); - scgp->dflags |= DRF_MODE_DMA_OVR; - } - } - len = ((struct scsi_mode_header *)mode)->sense_data_len + 1; - } - /* - * ATAPI drives as used by IOMEGA may receive a SCSI bus device reset - * in between these two mode sense commands. - */ - (void) unit_ready(scgp); - if (mode_sense(scgp, mode, len, page, 0) < 0) { /* Page n current */ - scgp->silent--; - return (FALSE); - } - scgp->silent--; - - if (scgp->verbose) - scg_prbytes("Mode Sense Data", mode, len - scg_getresid(scgp)); - hdlen = sizeof (struct scsi_mode_header) + - ((struct scsi_mode_header *)mode)->blockdesc_len; - mp = (struct scsi_mode_page_header *)(mode + hdlen); - if (scgp->verbose) - scg_prbytes("Mode Page Data", (Uchar *)mp, mp->p_len+2); - - if (mp->p_len == 0) { - if (!scsi_compliant && try == 0) { - len = hdlen; - /* - * add sizeof page header (page # + len byte) - * (should normaly result in len == 14) - * this allowes to work with: - * Quantum Q210S (wants at least 13) - * MD2x (wants at least 4) - */ - len += 2; - try++; - goto again; - } - /* XXX if (!nowarn) */ - errmsgno(EX_BAD, - "Warning: controller returns zero sized %s page.\n", - pagename); - } - if (!scsi_compliant && - (len < (int)(mp->p_len + hdlen + 2))) { - len = mp->p_len + hdlen + 2; - - /* XXX if (!nowarn) */ - errmsgno(EX_BAD, - "Warning: controller returns wrong size for %s page.\n", - pagename); - } - if (mp->p_code != page) { - /* XXX if (!nowarn) */ - errmsgno(EX_BAD, - "Warning: controller returns wrong page %X for %s page (%X).\n", - mp->p_code, pagename, page); - return (FALSE); - } - - if (lenp) - *lenp = len; - return (mp->p_len > 0); -} -#endif - -EXPORT BOOL -get_mode_params(scgp, page, pagename, modep, cmodep, dmodep, smodep, lenp) - SCSI *scgp; - int page; - char *pagename; - Uchar *modep; - Uchar *cmodep; - Uchar *dmodep; - Uchar *smodep; - int *lenp; -{ - int len; - BOOL ret = TRUE; - -#ifdef XXX - if (lenp) - *lenp = 0; - if (!has_mode_page(scgp, page, pagename, &len)) { - if (!scgp->silent) errmsgno(EX_BAD, - "Warning: controller does not support %s page.\n", - pagename); - return (FALSE); - } - if (lenp) - *lenp = len; -#else - if (lenp == 0) - len = 0xFF; -#endif - - if (modep) { - fillbytes(modep, 0x100, '\0'); - scgp->silent++; - (void) unit_ready(scgp); - scgp->silent--; - if (mode_sense(scgp, modep, len, page, 0) < 0) { /* Page x current */ - errmsgno(EX_BAD, "Cannot get %s data.\n", pagename); - ret = FALSE; - } else if (scgp->verbose) { - scg_prbytes("Mode Sense Data", modep, len - scg_getresid(scgp)); - } - } - - if (cmodep) { - fillbytes(cmodep, 0x100, '\0'); - scgp->silent++; - (void) unit_ready(scgp); - scgp->silent--; - if (mode_sense(scgp, cmodep, len, page, 1) < 0) { /* Page x change */ - errmsgno(EX_BAD, "Cannot get %s mask.\n", pagename); - ret = FALSE; - } else if (scgp->verbose) { - scg_prbytes("Mode Sense Data", cmodep, len - scg_getresid(scgp)); - } - } - - if (dmodep) { - fillbytes(dmodep, 0x100, '\0'); - scgp->silent++; - (void) unit_ready(scgp); - scgp->silent--; - if (mode_sense(scgp, dmodep, len, page, 2) < 0) { /* Page x default */ - errmsgno(EX_BAD, "Cannot get default %s data.\n", - pagename); - ret = FALSE; - } else if (scgp->verbose) { - scg_prbytes("Mode Sense Data", dmodep, len - scg_getresid(scgp)); - } - } - - if (smodep) { - fillbytes(smodep, 0x100, '\0'); - scgp->silent++; - (void) unit_ready(scgp); - scgp->silent--; - if (mode_sense(scgp, smodep, len, page, 3) < 0) { /* Page x saved */ - errmsgno(EX_BAD, "Cannot get saved %s data.\n", pagename); - ret = FALSE; - } else if (scgp->verbose) { - scg_prbytes("Mode Sense Data", smodep, len - scg_getresid(scgp)); - } - } - - return (ret); -} - -EXPORT BOOL -set_mode_params(scgp, pagename, modep, len, save, secsize) - SCSI *scgp; - char *pagename; - Uchar *modep; - int len; - int save; - int secsize; -{ - int i; - - ((struct scsi_modesel_header *)modep)->sense_data_len = 0; - ((struct scsi_modesel_header *)modep)->res2 = 0; - - i = ((struct scsi_mode_header *)modep)->blockdesc_len; - if (i > 0) { - i_to_3_byte( - ((struct scsi_mode_data *)modep)->blockdesc.nlblock, - 0); - if (secsize >= 0) - i_to_3_byte(((struct scsi_mode_data *)modep)->blockdesc.lblen, - secsize); - } - - scgp->silent++; - (void) unit_ready(scgp); - scgp->silent--; - if (save == 0 || mode_select(scgp, modep, len, save, scgp->inq->data_format >= 2) < 0) { - scgp->silent++; - (void) unit_ready(scgp); - scgp->silent--; - if (mode_select(scgp, modep, len, 0, scgp->inq->data_format >= 2) < 0) { - if (scgp->silent == 0) { - errmsgno(EX_BAD, - "Warning: using default %s data.\n", - pagename); - scg_prbytes("Mode Select Data", modep, len); - } - return (FALSE); - } - } - return (TRUE); -} diff -Nru cdrtools-2.01.01a33/cdda2wav/mycdrom.h cdrtools-3.02a09/cdda2wav/mycdrom.h --- cdrtools-2.01.01a33/cdda2wav/mycdrom.h 2007-07-28 19:12:38.000000000 +0000 +++ cdrtools-3.02a09/cdda2wav/mycdrom.h 2013-06-01 10:17:32.000000000 +0000 @@ -1,4 +1,4 @@ -/* @(#)mycdrom.h 1.14 07/07/28 Copyright 1998,1999 Heiko Eissfeldt, Copyright 2005-2006 J. Schilling */ +/* @(#)mycdrom.h 1.15 13/06/01 Copyright 1998,1999 Heiko Eissfeldt, Copyright 2005-2013 J. Schilling */ /* * The contents of this file are subject to the terms of the @@ -17,8 +17,17 @@ #else # if defined HAVE_SYS_CDIO_H # include -# if (defined(__FreeBSD__) || defined(__FreeBSD_kernel__)) && \ - (__FreeBSD__ >= 2 || __FreeBSD_kernel__ > 2) +/* + * Work around a bug in FreeBSD-9.1 + * FreeBSD-9.1 has an incompatible #define __FreeBSD_kernel__ + * in sys/param.h that is in conflict with Debian k-FreeBSD. + */ +# ifdef __FreeBSD__ +# undef __FreeBSD_kernel__ +# define __FreeBSD_kernel__ 1 +# endif +# if ((defined(__FreeBSD__) && (__FreeBSD__ >= 2)) || \ + (defined(__FreeBSD_kernel__) && (__FreeBSD_kernel__ > 2))) # include # endif # if defined HAVE_SYS_CDRIO_H /* Was: if __FreeBSD_version >= 400014 */ diff -Nru cdrtools-2.01.01a33/cdda2wav/mytype.h cdrtools-3.02a09/cdda2wav/mytype.h --- cdrtools-2.01.01a33/cdda2wav/mytype.h 2006-05-13 21:02:13.000000000 +0000 +++ cdrtools-3.02a09/cdda2wav/mytype.h 2016-02-14 21:53:40.000000000 +0000 @@ -1,4 +1,4 @@ -/* @(#)mytype.h 1.4 06/05/13 Copyright 1998,1999 Heiko Eissfeldt */ +/* @(#)mytype.h 1.5 16/02/14 Copyright 1998,1999 Heiko Eissfeldt */ /* * The contents of this file are subject to the terms of the @@ -7,6 +7,8 @@ * with the License. * * See the file CDDL.Schily.txt in this distribution for details. + * A copy of the CDDL is also available via the Internet at + * http://www.opensource.org/licenses/cddl1.txt * * When distributing Covered Code, include this CDDL HEADER in each * file and include the License file CDDL.Schily.txt from this distribution. @@ -28,12 +30,13 @@ #endif #endif #endif +#ifndef TRUE #define TRUE 1 +#endif +#ifndef FALSE #define FALSE 0 - -#ifndef offset_of -#define offset_of(TYPE, MEMBER) ((size_t) ((TYPE *)0)->MEMBER) #endif + #ifndef offsetof #define offsetof(TYPE, MEMBER) ((size_t) &((TYPE *)0)->MEMBER) #endif diff -Nru cdrtools-2.01.01a33/cdda2wav/parse.c cdrtools-3.02a09/cdda2wav/parse.c --- cdrtools-2.01.01a33/cdda2wav/parse.c 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/cdda2wav/parse.c 2016-02-14 21:53:40.000000000 +0000 @@ -0,0 +1,510 @@ +/* @(#)parse.c 1.11 16/02/14 Copyright 2001-2010 J. Schilling */ +#include +#ifndef lint +static UConst char sccsid[] = + "@(#)parse.c 1.11 16/02/14 Copyright 2001-2010 J. Schilling"; +#endif +/* + * Interactive command parser for cdda2wav + * + * Copyright (c) 2001-2010 J. Schilling + */ +/* + * The contents of this file are subject to the terms of the + * Common Development and Distribution License, Version 1.0 only + * (the "License"). You may not use this file except in compliance + * with the License. + * + * See the file CDDL.Schily.txt in this distribution for details. + * A copy of the CDDL is also available via the Internet at + * http://www.opensource.org/licenses/cddl1.txt + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file CDDL.Schily.txt from this distribution. + */ + +/* + * Commands: + * read + * + * Replies: + * 200 OK + * 400 Bad Request + * 404 Not Found + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "toc.h" + +#define E_ISOK 200 /* E_OK is used with euid access() */ +#define E_BAD 400 +#define E_NOTFOUND 404 + +#define C_BAD 0 +#define C_STOP 1 +#define C_CONT 2 +#define C_READ 3 +#define C_EXIT 4 +#define C_HELP 5 + +typedef struct cmd { + int cmd; + int argtype; + long arg; +} cmd_t; + +typedef struct keyw { + char *k_name; + int k_type; +} keyw_t; + +LOCAL keyw_t keywords[] = { + { "stop", C_STOP }, + { "cont", C_CONT }, + { "read", C_READ }, + { "exit", C_EXIT }, + { "quit", C_EXIT }, + { "help", C_HELP }, + { NULL, 0 }, +}; + +typedef struct err { + int num; + char *name; +} err_t; + +LOCAL err_t errs[] = { + { E_ISOK, "OK" }, + { E_BAD, "Bad Request" }, + { E_NOTFOUND, "Not Found" }, + { -1, NULL }, +}; + +LOCAL sigjmps_t jmp; + + +EXPORT int parse __PR((long *lp)); +LOCAL keyw_t *lookup __PR((char *word, keyw_t table[])); + +LOCAL FILE *pfopen __PR((char *name)); +#ifdef __needed__ +LOCAL char *pfname __PR((void)); +#endif +LOCAL char *nextline __PR((FILE *f)); +#ifdef __needed__ +LOCAL void ungetline __PR((void)); +#endif +LOCAL char *skipwhite __PR((const char *s)); +LOCAL char *peekword __PR((void)); +LOCAL char *lineend __PR((void)); +LOCAL char *markword __PR((char *delim)); +#ifdef __needed__ +LOCAL char getworddelim __PR((void)); +#endif +LOCAL char *getnextitem __PR((char *delim)); +#ifdef __needed__ +LOCAL char *neednextitem __PR((char *delim)); +#endif +LOCAL char *nextword __PR((void)); +#ifdef __needed__ +LOCAL char *needword __PR((void)); +LOCAL char *curword __PR((void)); +LOCAL char *nextitem __PR((void)); +LOCAL char *needitem __PR((void)); +#endif +LOCAL void checkextra __PR((void)); +LOCAL void pabort __PR((int errnum, const char *fmt, ...)); +LOCAL void wok __PR((void)); +LOCAL void pusage __PR((void)); + + +EXPORT int +parse(lp) + long *lp; +{ + long l; + register keyw_t *kp; + char *p; + cmd_t cmd; +static FILE *f; + + if (f == NULL) + f = pfopen(NULL); + if (f == NULL) + return (-1); +again: + if (sigsetjmp(jmp.jb, 1) != 0) { + /* + * We come here from siglongjmp() + */ + ; + } + if ((p = nextline(f)) == NULL) + return (-1); + + p = nextword(); + kp = lookup(p, keywords); + if (kp) { + extern void drop_all_buffers __PR((void)); + + cmd.cmd = kp->k_type; + switch (kp->k_type) { + + case C_STOP: + /* Flush buffers */ +#ifdef _is_working_ + drop_all_buffers(); +#endif + wok(); + goto again; + case C_CONT: + wok(); + return (0); + case C_READ: + p = nextword(); + if (streql(p, "sectors")) { + p = nextword(); + if (*astol(p, &l) != '\0') { + pabort(E_BAD, _("Not a number '%s'"), p); + } + *lp = l; + } else if (streql(p, "tracks")) { + p = nextword(); + if (*astol(p, &l) != '\0') { + pabort(E_BAD, _("Not a number '%s'"), p); + } + if (l < FirstAudioTrack() || l > LastAudioTrack()) + pabort(E_BAD, _("Bad track number '%s'"), p); + *lp = Get_StartSector(l); + } else { + pabort(E_BAD, _("Bad 'read' parameter '%s'"), p); + } + wok(); + break; + case C_EXIT: + wok(); + return (-1); + case C_HELP: + pusage(); + wok(); + goto again; + default: + pabort(E_NOTFOUND, _("Unknown command '%s'"), p); + return (0); + } + checkextra(); + return (0); + } +/* checkextra();*/ + pabort(E_NOTFOUND, _("Unknown command '%s'"), p); + return (0); +} + +LOCAL keyw_t * +lookup(word, table) + char *word; + keyw_t table[]; +{ + register keyw_t *kp = table; + + while (kp->k_name) { + if (streql(kp->k_name, word)) + return (kp); + kp++; + } + return (NULL); +} + +/*--------------------------------------------------------------------------*/ +/* + * Parser low level functions start here... + */ + +LOCAL char linebuf[4096]; +LOCAL char *fname; +LOCAL char *linep; +LOCAL char *wordendp; +LOCAL char wordendc; +LOCAL int olinelen; +LOCAL int linelen; +LOCAL int lineno; + +LOCAL char worddelim[] = "=:,/"; +#ifdef __needed__ +LOCAL char nulldelim[] = ""; +#endif + +#ifdef DEBUG +LOCAL void +wdebug() +{ + printf("WORD: '%s' rest '%s'\n", linep, peekword()); + printf("linep %lX peekword %lX end %lX\n", + (long)linep, (long)peekword(), (long)&linebuf[linelen]); +} +#endif + +LOCAL FILE * +pfopen(name) + char *name; +{ + FILE *f; + + if (name == NULL) { + fname = "stdin"; + return (stdin); + } + f = fileopen(name, "r"); + if (f == NULL) + comerr(_("Cannot open '%s'.\n"), name); + + fname = name; + return (f); +} + +#ifdef __needed__ +LOCAL char * +pfname() +{ + return (fname); +} +#endif + +LOCAL char * +nextline(f) + FILE *f; +{ + do { + register int len; + + fillbytes(linebuf, sizeof (linebuf), '\0'); + len = fgetline(f, linebuf, sizeof (linebuf)); + if (len < 0) + return (NULL); + if (len > 0 && linebuf[len-1] == '\r') { + linebuf[len-1] = '\0'; + len--; + } + linelen = len; + lineno++; + } while (linebuf[0] == '#'); + + olinelen = linelen; + linep = linebuf; + wordendp = linep; + wordendc = *linep; + + return (linep); +} + +#ifdef __needed__ +LOCAL void +ungetline() +{ + linelen = olinelen; + linep = linebuf; + *wordendp = wordendc; + wordendp = linep; + wordendc = *linep; +} +#endif + +LOCAL char * +skipwhite(s) + const char *s; +{ + register const Uchar *p = (const Uchar *)s; + + while (*p) { + if (!isspace(*p)) + break; + p++; + } + return ((char *)p); +} + +LOCAL char * +peekword() +{ + return (&wordendp[1]); +} + +LOCAL char * +lineend() +{ + return (&linebuf[linelen]); +} + +LOCAL char * +markword(delim) + char *delim; +{ + register BOOL quoted = FALSE; + register Uchar c; + register Uchar *s; + register Uchar *from; + register Uchar *to; + + for (s = (Uchar *)linep; (c = *s) != '\0'; s++) { + if (c == '"') { + quoted = !quoted; + for (to = s, from = &s[1]; *from; ) { + c = *from++; + if (c == '\\' && quoted && (*from == '\\' || *from == '"')) + c = *from++; + *to++ = c; + } + *to = '\0'; + c = *s; +linelen--; + } + if (!quoted && isspace(c)) + break; + if (!quoted && strchr(delim, c) && s > (Uchar *)linep) + break; + } + wordendp = (char *)s; + wordendc = (char)*s; + *s = '\0'; + + return (linep); +} + +#ifdef __needed__ +LOCAL char +getworddelim() +{ + return (wordendc); +} +#endif + +LOCAL char * +getnextitem(delim) + char *delim; +{ + *wordendp = wordendc; + + linep = skipwhite(wordendp); + return (markword(delim)); +} + +#ifdef __needed__ +LOCAL char * +neednextitem(delim) + char *delim; +{ + char *olinep = linep; + char *nlinep; + + nlinep = getnextitem(delim); + + if ((olinep == nlinep) || (*nlinep == '\0')) + pabort(E_BAD, _("Missing text")); + + return (nlinep); +} +#endif + +LOCAL char * +nextword() +{ + return (getnextitem(worddelim)); +} + +#ifdef __needed__ +LOCAL char * +needword() +{ + return (neednextitem(worddelim)); +} + +LOCAL char * +curword() +{ + return (linep); +} + +LOCAL char * +nextitem() +{ + return (getnextitem(nulldelim)); +} + +LOCAL char * +needitem() +{ + return (neednextitem(nulldelim)); +} +#endif + +LOCAL void +checkextra() +{ + if (peekword() < lineend()) + pabort(E_BAD, _("Extra text '%s'"), peekword()); +} + +/* VARARGS1 */ +#ifdef PROTOTYPES +LOCAL void +pabort(int errnum, const char *fmt, ...) +#else +LOCAL void +pabort(errnum, fmt, va_alist) + int errnum; + char *fmt; + va_dcl +#endif +{ + va_list args; + err_t *ep = errs; + +#ifdef PROTOTYPES + va_start(args, fmt); +#else + va_start(args); +#endif + while (ep->num >= 0) { + if (ep->num == errnum) + break; + ep++; + } + if (ep->num >= 0) { + error("%d %s. ", ep->num, ep->name); + } + errmsgno(EX_BAD, _("%r on line %d in '%s'.\n"), + fmt, args, lineno, fname); + va_end(args); + siglongjmp(jmp.jb, 1); +} + +LOCAL void +wok() +{ + error("200 OK\n"); +} + +LOCAL void +pusage() +{ + error(_("Usage:\n")); + error(_(" command parameters descriptionn\n")); + error(_(" ============================================\n")); + error(_(" stop stop processing and wait for new input.\n")); + error(_(" cont continue processing.\n")); + error(_(" read sectors read sectors starting from sector number.\n")); + error(_(" read tracks read sectors starting from track number.\n")); + error(_(" exit exit processing.\n")); + error(_(" quit exit processing.\n")); + error(_(" help print this help and wait for new input.\n")); +} diff -Nru cdrtools-2.01.01a33/cdda2wav/parse.h cdrtools-3.02a09/cdda2wav/parse.h --- cdrtools-2.01.01a33/cdda2wav/parse.h 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/cdda2wav/parse.h 2008-06-24 20:12:37.000000000 +0000 @@ -0,0 +1,28 @@ +/* @(#)parse.h 1.1 08/06/24 Copyright 2008 J. Schilling */ +/* + * Interactive command parser for cdda2wav + * + * Copyright (c) 2008 J. Schilling + */ +/* + * The contents of this file are subject to the terms of the + * Common Development and Distribution License, Version 1.0 only + * (the "License"). You may not use this file except in compliance + * with the License. + * + * See the file CDDL.Schily.txt in this distribution for details. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file CDDL.Schily.txt from this distribution. + */ + +#ifndef _PARSE_H +#define _PARSE_H + +#ifndef _SCHILY_MCONFIG_H +#include +#endif + +EXPORT int parse __PR((long *lp)); + +#endif /* _PARSE_H */ diff -Nru cdrtools-2.01.01a33/cdda2wav/raw.c cdrtools-3.02a09/cdda2wav/raw.c --- cdrtools-2.01.01a33/cdda2wav/raw.c 2006-09-13 15:46:08.000000000 +0000 +++ cdrtools-3.02a09/cdda2wav/raw.c 2010-01-12 21:41:45.000000000 +0000 @@ -1,7 +1,8 @@ -/* @(#)raw.c 1.7 06/09/13 Copyright 1998,1999 Heiko Eissfeldt, Copyright 2006 J. Schilling */ +/* @(#)raw.c 1.13 10/01/12 Copyright 1998,1999 Heiko Eissfeldt, Copyright 2006-2010 J. Schilling */ +#include "config.h" #ifndef lint -static char sccsid[] = -"@(#)raw.c 1.7 06/09/13 Copyright 1998,1999 Heiko Eissfeldt, Copyright 2006 J. Schilling"; +static UConst char sccsid[] = +"@(#)raw.c 1.13 10/01/12 Copyright 1998,1999 Heiko Eissfeldt, Copyright 2006-2010 J. Schilling"; #endif /* @@ -20,9 +21,12 @@ */ #include "config.h" +#include #include #include +#include "mytype.h" #include "sndfile.h" +#include "global.h" LOCAL int InitSound __PR((int audio, long channels, Ulong rate, @@ -41,6 +45,7 @@ long nBitsPerSample; Ulong expected_bytes; { + global.md5offset = 0; return (0); } @@ -74,5 +79,6 @@ size_t BytesToDo))) write, /* get sound samples out */ InSizeToOutSize, /* compressed? output file size */ - 1 /* needs big endian samples */ + 1, /* needs big endian samples */ + "MOTOROLA" }; diff -Nru cdrtools-2.01.01a33/cdda2wav/README cdrtools-3.02a09/cdda2wav/README --- cdrtools-2.01.01a33/cdda2wav/README 1999-10-01 08:12:24.000000000 +0000 +++ cdrtools-3.02a09/cdda2wav/README 2009-04-10 21:16:11.000000000 +0000 @@ -337,7 +337,7 @@ If you cannot get good samples from your drives you might consider an alternative program. Monty's cdparanoia program goes to great lengths -in order to seperate the good bits from the bad ones. +in order to separate the good bits from the bad ones. 2. The index scanner has caused timeouts on my toshiba 3401 due to fast random accesses. diff -Nru cdrtools-2.01.01a33/cdda2wav/resample.c cdrtools-3.02a09/cdda2wav/resample.c --- cdrtools-2.01.01a33/cdda2wav/resample.c 2007-07-28 14:39:33.000000000 +0000 +++ cdrtools-3.02a09/cdda2wav/resample.c 2016-02-14 21:53:41.000000000 +0000 @@ -1,7 +1,8 @@ -/* @(#)resample.c 1.24 07/07/28 Copyright 1998,1999,2000 Heiko Eissfeldt, Copyright 2004-2006 J. Schilling */ +/* @(#)resample.c 1.36 16/02/14 Copyright 1998-2000,2015 Heiko Eissfeldt, Copyright 2004-2010 J. Schilling */ +#include "config.h" #ifndef lint -static char sccsid[] = -"@(#)resample.c 1.24 07/07/28 Copyright 1998,1999,2000 Heiko Eissfeldt, Copyright 2004-2006 J. Schilling"; +static UConst char sccsid[] = +"@(#)resample.c 1.36 16/02/14 Copyright 1998-2000,2015 Heiko Eissfeldt, Copyright 2004-2010 J. Schilling"; #endif /* * resampling module @@ -19,6 +20,8 @@ * with the License. * * See the file CDDL.Schily.txt in this distribution for details. + * A copy of the CDDL is also available via the Internet at + * http://www.opensource.org/licenses/cddl1.txt * * When distributing Covered Code, include this CDDL HEADER in each * file and include the License file CDDL.Schily.txt from this distribution. @@ -32,16 +35,17 @@ #include "config.h" #include -#include +#include #include #include #include #include #include -#include -#include -#include +#include +#include +#include #include +#include #include @@ -108,7 +112,7 @@ { if (p < q || p+amount > q + ENTRY_SIZE) { errmsgno(EX_BAD, - "File %s, line %u: invalid buffer range (%p - %p), allowed is (%p - %p).\n", + _("File %s, line %u: invalid buffer range (%p - %p), allowed is (%p - %p).\n"), file, line, p, p+amount-1, q, q + ENTRY_SIZE-1); exit(INTERNAL_ERROR); } @@ -304,7 +308,7 @@ fprintf(stderr, "%d\n", retval-(newbuf+global.overlap*CD_FRAMESIZE_RAW)); } else { - fprintf(stderr, "no match\n"); + fprintf(stderr, _("no match\n")); } #endif } @@ -580,20 +584,24 @@ long samples; int samplesize; { - double idx = 0.0; UINT4 di = 0; - UINT4 si = 0; if (global.playback_rate == 100.0) { memcpy(newp, p, samplesize* samples); di = samples; - } else while (si < (UINT4)samples) { - memcpy(newp+(di*samplesize), p+(si*samplesize), samplesize); - idx += (double)(global.playback_rate/100.0); - si = (UINT4)idx; - di++; + } else { + UINT4 si = 0; + double idx = 0.0; + + while (si < (UINT4)samples) { + memcpy(newp+(di*samplesize), p+(si*samplesize), + samplesize); + idx += (double)(global.playback_rate/100.0); + si = (UINT4)idx; + di++; + } } - return (di*samplesize); + return ((long)di*samplesize); } #endif @@ -727,7 +735,6 @@ unsigned SamplesToDo; unsigned TotSamplesDone; { -static int jitter = 0; char *pSrc; /* start of cdrom buffer */ /* @@ -741,6 +748,8 @@ return (NULL); } if (pSrc) { + int jitter; + jitter = ((unsigned char *)pSrc - (((unsigned char *)p) + global.overlap*CD_FRAMESIZE_RAW))/4; @@ -780,7 +789,7 @@ /* * in case of different endianness between host and output format, * or channel swaps, or deemphasizing - * copy in a seperate buffer and modify the local copy + * copy in a separate buffer and modify the local copy */ if (((((!global.need_hostorder && global.need_big_endian == (*in_lendian)) || @@ -792,7 +801,7 @@ if (localoutputbuffer == NULL) { localoutputbuffer = malloc(global.nsectors*CD_FRAMESIZE_RAW); if (localoutputbuffer == NULL) { - errmsg("Cannot allocate local buffer.\n"); + errmsg(_("Cannot allocate local buffer.\n")); return (1); } } @@ -851,7 +860,7 @@ pDst = (unsigned char *) pSrcStop; /* set pDst to end */ if (global.deemphasize && - (Get_Preemphasis(get_current_track()))) { + (Get_Preemphasis(get_current_track_writing()))) { /* * this implements an attenuation treble shelving * filter to undo the effect of pre-emphasis. @@ -1155,13 +1164,19 @@ todo = outlen; while (todo != 0) { - int retval_; - - retval_ = global.audio_out->WriteSound(global.audio, p2, todo); - if (retval_ < 0) +#ifdef MD5_SIGNATURES + if (global.md5count) { + global.md5size += todo; + MD5Update(global.context, p2, todo); + if (global.md5blocksize > 0) + global.md5count -= todo; + } +#endif + retval = global.audio_out->WriteSound(global.audio, p2, todo); + if (retval < 0) break; - p2 += retval_; - todo -= retval_; + p2 += retval; + todo -= retval; } } if (todo == 0) { @@ -1169,7 +1184,7 @@ return (0); } else { errmsg( - "Error in write(audio, 0x%p, %u) = %d\nProbably disk space exhausted.\n", + _("Error in write(audio, 0x%p, %u) = %d\nProbably disk space exhausted.\n"), pStart, outlen, retval); return (1); } diff -Nru cdrtools-2.01.01a33/cdda2wav/ringbuff.c cdrtools-3.02a09/cdda2wav/ringbuff.c --- cdrtools-2.01.01a33/cdda2wav/ringbuff.c 2006-09-13 15:46:08.000000000 +0000 +++ cdrtools-3.02a09/cdda2wav/ringbuff.c 2010-12-19 19:06:01.000000000 +0000 @@ -1,7 +1,8 @@ -/* @(#)ringbuff.c 1.14 06/09/13 Copyright 1998,1999,2000 Heiko Eissfeldt, Copyright 2004-2006 J. Schilling */ +/* @(#)ringbuff.c 1.24 10/12/19 Copyright 1998,1999,2000 Heiko Eissfeldt, Copyright 2004-2010 J. Schilling */ +#include "config.h" #ifndef lint -static char sccsid[] = -"@(#)ringbuff.c 1.14 06/09/13 Copyright 1998,1999,2000 Heiko Eissfeldt, Copyright 2004-2006 J. Schilling"; +static UConst char sccsid[] = +"@(#)ringbuff.c 1.24 10/12/19 Copyright 1998,1999,2000 Heiko Eissfeldt, Copyright 2004-2010 J. Schilling"; #endif /* * Ringbuffer handling @@ -21,14 +22,15 @@ #include "config.h" #include -#include +#include #include #include #include +#include #if defined(HAVE_SEMGET) && defined(USE_SEMAPHORES) -#include -#include +#include +#include #endif #include @@ -42,7 +44,7 @@ #undef WARN_INTERRUPT #undef _DEBUG -#include +#include static void occupy_buffer __PR((void)); @@ -76,12 +78,12 @@ mysemun.val = 0; if (semctl(mysem_id, (int) DEF_SEM, SETVAL, mysemun) < 0) { - errmsg("Error in semctl DEF_SEM.\n"); + errmsg(_("Error in semctl DEF_SEM.\n")); } mysemun.val = num_buffers; if (semctl(mysem_id, (int) FREE_SEM, SETVAL, mysemun) < 0) { - errmsg("Error in semctl FREE_SEM.\n"); + errmsg(_("Error in semctl FREE_SEM.\n")); } #endif @@ -189,10 +191,14 @@ myringbuff * get_next_buffer() { + if (!global.have_forked) { + occupy_buffer(); + return (*he_fill_buffer); + } #ifdef WARN_INTERRUPT if (free_buffers() <= 0) { fprintf(stderr, - "READER waits!! r=%lu, w=%lu\n", *total_segments_read, + _("READER waits!! r=%lu, w=%lu\n"), *total_segments_read, *total_segments_written); } #endif @@ -205,7 +211,7 @@ * semaphore operation failed. * try again... */ - errmsgno(EX_BAD, "Child reader sem request failed.\n"); + errmsgno(EX_BAD, _("Child reader sem request failed.\n")); exit(SEMAPHORE_ERROR); } #if 0 @@ -228,21 +234,28 @@ { myringbuff *retval; + if (!global.have_forked) + return (*he_fill_buffer); + #ifdef WARN_INTERRUPT if (free_buffers() == total_buffers) { fprintf(stderr, - "WRITER waits!! r=%lu, w=%lu\n", *total_segments_read, + _("WRITER waits!! r=%lu, w=%lu\n"), *total_segments_read, *total_segments_written); } #endif /* * wait for buffer to be defined */ + seterrno(0); if (semrequest(sem_id, DEF_SEM) != 0) { + if (geterrno() == 0) + return ((myringbuff *)NULL); /* * semaphore operation failed. */ - errmsg("Parent writer sem request failed.\n"); + errmsg(_("Parent writer sem request failed.\n")); + return ((myringbuff *)NULL); } retval = *last_buffer; diff -Nru cdrtools-2.01.01a33/cdda2wav/ringbuff.h cdrtools-3.02a09/cdda2wav/ringbuff.h --- cdrtools-2.01.01a33/cdda2wav/ringbuff.h 2006-05-13 21:02:13.000000000 +0000 +++ cdrtools-3.02a09/cdda2wav/ringbuff.h 2016-02-14 21:53:40.000000000 +0000 @@ -1,4 +1,4 @@ -/* @(#)ringbuff.h 1.7 06/05/13 Copyright 1998,1999,2000 Heiko Eissfeldt */ +/* @(#)ringbuff.h 1.8 16/02/14 Copyright 1998,1999,2000 Heiko Eissfeldt */ /* * This file contains data structures that reside in the shared memory * segment. @@ -10,6 +10,8 @@ * with the License. * * See the file CDDL.Schily.txt in this distribution for details. + * A copy of the CDDL is also available via the Internet at + * http://www.opensource.org/licenses/cddl1.txt * * When distributing Covered Code, include this CDDL HEADER in each * file and include the License file CDDL.Schily.txt from this distribution. @@ -86,13 +88,13 @@ #define palign(x, a) (((char *)(x)) + ((a) - 1 - (((unsigned)((x)-1))%(a)))) #define multpage(x, a) ((((x) + (a) - 1) / (a)) * (a)) -#define HEADER_SIZE multpage(offset_of(struct ringbuffheader, data), global.pagesize) +#define HEADER_SIZE multpage(offsetof(struct ringbuffheader, data), global.pagesize) #define SEGMENT_SIZE (global.nsectors*CD_FRAMESIZE_RAW) #define ENTRY_SIZE_PAGE_AL multpage(SEGMENT_SIZE + \ - offset_of(myringbuff, data), global.pagesize) + offsetof(myringbuff, data), global.pagesize) #define RB_BASE ((myringbuff *)(((unsigned char *)he_fill_buffer) + \ - HEADER_SIZE - offset_of(myringbuff, data))) + HEADER_SIZE - offsetof(myringbuff, data))) #define INC(a) (myringbuff *)(((char *)RB_BASE) + \ (((((char *) (a))-((char *)RB_BASE))/ENTRY_SIZE_PAGE_AL + 1) % \ diff -Nru cdrtools-2.01.01a33/cdda2wav/scsi_cdr.c cdrtools-3.02a09/cdda2wav/scsi_cdr.c --- cdrtools-2.01.01a33/cdda2wav/scsi_cdr.c 2007-07-08 18:37:18.000000000 +0000 +++ cdrtools-3.02a09/cdda2wav/scsi_cdr.c 1970-01-01 00:00:00.000000000 +0000 @@ -1,3108 +0,0 @@ -/* @(#)scsi_cdr.c 1.150 07/07/08 Copyright 1995-2007 J. Schilling */ -#ifndef lint -static char sccsid[] = - "@(#)scsi_cdr.c 1.150 07/07/08 Copyright 1995-2007 J. Schilling"; -#endif -/* - * SCSI command functions for cdrecord - * covering pre-MMC standard functions up to MMC-2 - * - * Copyright (c) 1995-2007 J. Schilling - */ -/* - * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. - * - * See the file CDDL.Schily.txt in this distribution for details. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file CDDL.Schily.txt from this distribution. - */ - -/* - * NOTICE: The Philips CDD 521 has several firmware bugs. - * One of them is not to respond to a SCSI selection - * within 200ms if the general load on the - * SCSI bus is high. To deal with this problem - * most of the SCSI commands are send with the - * SCG_CMD_RETRY flag enabled. - */ -#include - -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include - -#include -#include -#include -#include - -#include "scsimmc.h" -#include "cdrecord.h" - -#define strbeg(s1, s2) (strstr((s2), (s1)) == (s2)) - -EXPORT BOOL unit_ready __PR((SCSI *scgp)); -EXPORT BOOL wait_unit_ready __PR((SCSI *scgp, int secs)); -EXPORT BOOL scsi_in_progress __PR((SCSI *scgp)); -EXPORT BOOL cdr_underrun __PR((SCSI *scgp)); -EXPORT int test_unit_ready __PR((SCSI *scgp)); -EXPORT int rezero_unit __PR((SCSI *scgp)); -EXPORT int request_sense __PR((SCSI *scgp)); -EXPORT int request_sense_b __PR((SCSI *scgp, caddr_t bp, int cnt)); -EXPORT int inquiry __PR((SCSI *scgp, caddr_t, int)); -EXPORT int read_capacity __PR((SCSI *scgp)); -EXPORT void print_capacity __PR((SCSI *scgp, FILE *f)); -EXPORT int scsi_load_unload __PR((SCSI *scgp, int)); -EXPORT int scsi_prevent_removal __PR((SCSI *scgp, int)); -EXPORT int scsi_start_stop_unit __PR((SCSI *scgp, int, int, BOOL immed)); -EXPORT int scsi_set_speed __PR((SCSI *scgp, int readspeed, int writespeed, int rotctl)); -EXPORT int scsi_get_speed __PR((SCSI *scgp, int *readspeedp, int *writespeedp)); -EXPORT int qic02 __PR((SCSI *scgp, int)); -EXPORT int write_xscsi __PR((SCSI *scgp, caddr_t, long, long, int)); -EXPORT int write_xg0 __PR((SCSI *scgp, caddr_t, long, long, int)); -EXPORT int write_xg1 __PR((SCSI *scgp, caddr_t, long, long, int)); -EXPORT int write_xg5 __PR((SCSI *scgp, caddr_t, long, long, int)); -EXPORT int seek_scsi __PR((SCSI *scgp, long addr)); -EXPORT int seek_g0 __PR((SCSI *scgp, long addr)); -EXPORT int seek_g1 __PR((SCSI *scgp, long addr)); -EXPORT int scsi_flush_cache __PR((SCSI *scgp, BOOL immed)); -EXPORT int read_buffer __PR((SCSI *scgp, caddr_t bp, int cnt, int mode)); -EXPORT int write_buffer __PR((SCSI *scgp, char *buffer, long length, int mode, int bufferid, long offset)); -EXPORT int read_subchannel __PR((SCSI *scgp, caddr_t bp, int track, - int cnt, int msf, int subq, int fmt)); -EXPORT int read_toc __PR((SCSI *scgp, caddr_t, int, int, int, int)); -EXPORT int read_toc_philips __PR((SCSI *scgp, caddr_t, int, int, int, int)); -EXPORT int read_header __PR((SCSI *scgp, caddr_t, long, int, int)); -EXPORT int read_disk_info __PR((SCSI *scgp, caddr_t, int)); -EXPORT int read_track_info __PR((SCSI *scgp, caddr_t, int type, int addr, int cnt)); -EXPORT int get_trackinfo __PR((SCSI *scgp, caddr_t, int type, int addr, int cnt)); -EXPORT int read_rzone_info __PR((SCSI *scgp, caddr_t bp, int cnt)); -EXPORT int reserve_tr_rzone __PR((SCSI *scgp, long size)); -EXPORT int read_dvd_structure __PR((SCSI *scgp, caddr_t bp, int cnt, int mt, int addr, int layer, int fmt)); -EXPORT int send_dvd_structure __PR((SCSI *scgp, caddr_t bp, int cnt, int fmt)); -EXPORT int send_opc __PR((SCSI *scgp, caddr_t, int cnt, int doopc)); -EXPORT int read_track_info_philips __PR((SCSI *scgp, caddr_t, int, int)); -EXPORT int scsi_close_tr_session __PR((SCSI *scgp, int type, int track, BOOL immed)); -EXPORT int read_master_cue __PR((SCSI *scgp, caddr_t bp, int sheet, int cnt)); -EXPORT int send_cue_sheet __PR((SCSI *scgp, caddr_t bp, long size)); -EXPORT int read_buff_cap __PR((SCSI *scgp, long *, long *)); -EXPORT int scsi_blank __PR((SCSI *scgp, long addr, int blanktype, BOOL immed)); -EXPORT BOOL allow_atapi __PR((SCSI *scgp, BOOL new)); -EXPORT int mode_select __PR((SCSI *scgp, Uchar *, int, int, int)); -EXPORT int mode_sense __PR((SCSI *scgp, Uchar *dp, int cnt, int page, int pcf)); -EXPORT int mode_select_sg0 __PR((SCSI *scgp, Uchar *, int, int, int)); -EXPORT int mode_sense_sg0 __PR((SCSI *scgp, Uchar *dp, int cnt, int page, int pcf)); -EXPORT int mode_select_g0 __PR((SCSI *scgp, Uchar *, int, int, int)); -EXPORT int mode_select_g1 __PR((SCSI *scgp, Uchar *, int, int, int)); -EXPORT int mode_sense_g0 __PR((SCSI *scgp, Uchar *dp, int cnt, int page, int pcf)); -EXPORT int mode_sense_g1 __PR((SCSI *scgp, Uchar *dp, int cnt, int page, int pcf)); -EXPORT int read_tochdr __PR((SCSI *scgp, cdr_t *, int *, int *)); -EXPORT int read_cdtext __PR((SCSI *scgp)); -EXPORT int read_trackinfo __PR((SCSI *scgp, int, long *, struct msf *, int *, int *, int *)); -EXPORT int read_B0 __PR((SCSI *scgp, BOOL isbcd, long *b0p, long *lop)); -EXPORT int read_session_offset __PR((SCSI *scgp, long *)); -EXPORT int read_session_offset_philips __PR((SCSI *scgp, long *)); -EXPORT int sense_secsize __PR((SCSI *scgp, int current)); -EXPORT int select_secsize __PR((SCSI *scgp, int)); -EXPORT BOOL is_cddrive __PR((SCSI *scgp)); -EXPORT BOOL is_unknown_dev __PR((SCSI *scgp)); -EXPORT int read_scsi __PR((SCSI *scgp, caddr_t, long, int)); -EXPORT int read_g0 __PR((SCSI *scgp, caddr_t, long, int)); -EXPORT int read_g1 __PR((SCSI *scgp, caddr_t, long, int)); -EXPORT BOOL getdev __PR((SCSI *scgp, BOOL)); -EXPORT void printinq __PR((SCSI *scgp, FILE *f)); -EXPORT void printdev __PR((SCSI *scgp)); -EXPORT BOOL do_inquiry __PR((SCSI *scgp, BOOL)); -EXPORT BOOL recovery_needed __PR((SCSI *scgp, cdr_t *)); -EXPORT int scsi_load __PR((SCSI *scgp, cdr_t *)); -EXPORT int scsi_unload __PR((SCSI *scgp, cdr_t *)); -EXPORT int scsi_cdr_write __PR((SCSI *scgp, caddr_t bp, long sectaddr, long size, int blocks, BOOL islast)); -EXPORT struct cd_mode_page_2A * mmc_cap __PR((SCSI *scgp, Uchar *modep)); -EXPORT void mmc_getval __PR((struct cd_mode_page_2A *mp, - BOOL *cdrrp, BOOL *cdwrp, - BOOL *cdrrwp, BOOL *cdwrwp, - BOOL *dvdp, BOOL *dvdwp)); -EXPORT BOOL is_mmc __PR((SCSI *scgp, BOOL *cdwp, BOOL *dvdwp)); -EXPORT BOOL mmc_check __PR((SCSI *scgp, BOOL *cdrrp, BOOL *cdwrp, - BOOL *cdrrwp, BOOL *cdwrwp, - BOOL *dvdp, BOOL *dvdwp)); -LOCAL void print_speed __PR((char *fmt, int val)); -EXPORT void print_capabilities __PR((SCSI *scgp)); -extern int verify __PR((SCSI *scgp, long start, int count, long *bad_block)); - -EXPORT BOOL -unit_ready(scgp) - SCSI *scgp; -{ - register struct scg_cmd *scmd = scgp->scmd; - - if (test_unit_ready(scgp) >= 0) /* alles OK */ - return (TRUE); - else if (scmd->error >= SCG_FATAL) /* nicht selektierbar */ - return (FALSE); - - if (scg_sense_key(scgp) == SC_UNIT_ATTENTION) { - if (test_unit_ready(scgp) >= 0) /* alles OK */ - return (TRUE); - } - if ((scg_cmd_status(scgp) & ST_BUSY) != 0) { - /* - * Busy/reservation_conflict - */ - usleep(500000); - if (test_unit_ready(scgp) >= 0) /* alles OK */ - return (TRUE); - } - if (scg_sense_key(scgp) == -1) { /* non extended Sense */ - if (scg_sense_code(scgp) == 4) /* NOT_READY */ - return (FALSE); - return (TRUE); - } - /* FALSE wenn NOT_READY */ - return (scg_sense_key(scgp) != SC_NOT_READY); -} - -EXPORT BOOL -wait_unit_ready(scgp, secs) - SCSI *scgp; - int secs; -{ - int i; - int c; - int k; - int ret; - int err; - - seterrno(0); - scgp->silent++; - ret = test_unit_ready(scgp); /* eat up unit attention */ - if (ret < 0) { - err = geterrno(); - - if (err == EPERM || err == EACCES) { - scgp->silent--; - return (FALSE); - } - ret = test_unit_ready(scgp); /* got power on condition? */ - } - scgp->silent--; - - if (ret >= 0) /* success that's enough */ - return (TRUE); - - scgp->silent++; - for (i = 0; i < secs && (ret = test_unit_ready(scgp)) < 0; i++) { - if (scgp->scmd->scb.busy != 0) { - sleep(1); - continue; - } - c = scg_sense_code(scgp); - k = scg_sense_key(scgp); - /* - * Abort quickly if it does not make sense to wait. - * 0x30 == Cannot read medium - * 0x3A == Medium not present - */ - if ((k == SC_NOT_READY && (c == 0x3A || c == 0x30)) || - (k == SC_MEDIUM_ERROR)) { - if (scgp->silent <= 1) - scg_printerr(scgp); - scgp->silent--; - return (FALSE); - } - sleep(1); - } - scgp->silent--; - if (ret < 0) - return (FALSE); - return (TRUE); -} - -EXPORT BOOL -scsi_in_progress(scgp) - SCSI *scgp; -{ - if (scg_sense_key(scgp) == SC_NOT_READY && - /* - * Logigal unit not ready operation/long_write in progress - */ - scg_sense_code(scgp) == 0x04 && - (scg_sense_qual(scgp) == 0x04 || /* CyberDr. "format in progress"*/ - scg_sense_qual(scgp) == 0x07 || /* "operation in progress" */ - scg_sense_qual(scgp) == 0x08)) { /* "long write in progress" */ - return (TRUE); - } else { - if (scgp->silent <= 1) - scg_printerr(scgp); - } - return (FALSE); -} - -EXPORT BOOL -cdr_underrun(scgp) - SCSI *scgp; -{ - if ((scg_sense_key(scgp) != SC_ILLEGAL_REQUEST && - scg_sense_key(scgp) != SC_MEDIUM_ERROR)) - return (FALSE); - - if ((scg_sense_code(scgp) == 0x21 && - (scg_sense_qual(scgp) == 0x00 || /* logical block address out of range */ - scg_sense_qual(scgp) == 0x02)) || /* invalid address for write */ - - (scg_sense_code(scgp) == 0x0C && - scg_sense_qual(scgp) == 0x09)) { /* write error - loss of streaming */ - return (TRUE); - } - /* - * XXX Bei manchen Brennern kommt mach dem der Brennvorgang bereits - * XXX eine Weile gelaufen ist ein 5/24/0 Invalid field in CDB. - * XXX Daher sollte man testen ob schon geschrieben wurde... - */ - return (FALSE); -} - -EXPORT int -test_unit_ready(scgp) - SCSI *scgp; -{ - register struct scg_cmd *scmd = scgp->scmd; - - fillbytes((caddr_t)scmd, sizeof (*scmd), '\0'); - scmd->addr = (caddr_t)0; - scmd->size = 0; - scmd->flags = SCG_DISRE_ENA | (scgp->silent ? SCG_SILENT:0); - scmd->cdb_len = SC_G0_CDBLEN; - scmd->sense_len = CCS_SENSE_LEN; - scmd->cdb.g0_cdb.cmd = SC_TEST_UNIT_READY; - scmd->cdb.g0_cdb.lun = scg_lun(scgp); - - scgp->cmdname = "test unit ready"; - - return (scg_cmd(scgp)); -} - -EXPORT int -rezero_unit(scgp) - SCSI *scgp; -{ - register struct scg_cmd *scmd = scgp->scmd; - - fillbytes((caddr_t)scmd, sizeof (*scmd), '\0'); - scmd->addr = (caddr_t)0; - scmd->size = 0; - scmd->flags = SCG_DISRE_ENA; - scmd->cdb_len = SC_G0_CDBLEN; - scmd->sense_len = CCS_SENSE_LEN; - scmd->cdb.g0_cdb.cmd = SC_REZERO_UNIT; - scmd->cdb.g0_cdb.lun = scg_lun(scgp); - - scgp->cmdname = "rezero unit"; - - return (scg_cmd(scgp)); -} - -EXPORT int -request_sense(scgp) - SCSI *scgp; -{ - char sensebuf[CCS_SENSE_LEN]; - char *cmdsave; - - cmdsave = scgp->cmdname; - - if (request_sense_b(scgp, sensebuf, sizeof (sensebuf)) < 0) - return (-1); - scgp->cmdname = cmdsave; - scg_prsense((Uchar *)sensebuf, CCS_SENSE_LEN - scg_getresid(scgp)); - return (0); -} - -EXPORT int -request_sense_b(scgp, bp, cnt) - SCSI *scgp; - caddr_t bp; - int cnt; -{ - register struct scg_cmd *scmd = scgp->scmd; - - - fillbytes((caddr_t)scmd, sizeof (*scmd), '\0'); - scmd->addr = bp; - scmd->size = cnt; - scmd->flags = SCG_RECV_DATA|SCG_DISRE_ENA; - scmd->cdb_len = SC_G0_CDBLEN; - scmd->sense_len = CCS_SENSE_LEN; - scmd->cdb.g0_cdb.cmd = SC_REQUEST_SENSE; - scmd->cdb.g0_cdb.lun = scg_lun(scgp); - scmd->cdb.g0_cdb.count = cnt; - - scgp->cmdname = "request_sense"; - - if (scg_cmd(scgp) < 0) - return (-1); - return (0); -} - -EXPORT int -inquiry(scgp, bp, cnt) - SCSI *scgp; - caddr_t bp; - int cnt; -{ - register struct scg_cmd *scmd = scgp->scmd; - - fillbytes(bp, cnt, '\0'); - fillbytes((caddr_t)scmd, sizeof (*scmd), '\0'); - scmd->addr = bp; - scmd->size = cnt; - scmd->flags = SCG_RECV_DATA|SCG_DISRE_ENA; - scmd->cdb_len = SC_G0_CDBLEN; - scmd->sense_len = CCS_SENSE_LEN; - scmd->cdb.g0_cdb.cmd = SC_INQUIRY; - scmd->cdb.g0_cdb.lun = scg_lun(scgp); - scmd->cdb.g0_cdb.count = cnt; - - scgp->cmdname = "inquiry"; - - if (scg_cmd(scgp) < 0) - return (-1); - if (scgp->verbose) - scg_prbytes("Inquiry Data :", (Uchar *)bp, cnt - scg_getresid(scgp)); - return (0); -} - -EXPORT int -read_capacity(scgp) - SCSI *scgp; -{ - register struct scg_cmd *scmd = scgp->scmd; - - fillbytes((caddr_t)scmd, sizeof (*scmd), '\0'); - scmd->addr = (caddr_t)scgp->cap; - scmd->size = sizeof (struct scsi_capacity); - scmd->flags = SCG_RECV_DATA|SCG_DISRE_ENA; - scmd->cdb_len = SC_G1_CDBLEN; - scmd->sense_len = CCS_SENSE_LEN; - scmd->cdb.g1_cdb.cmd = 0x25; /* Read Capacity */ - scmd->cdb.g1_cdb.lun = scg_lun(scgp); - g1_cdblen(&scmd->cdb.g1_cdb, 0); /* Full Media */ - - scgp->cmdname = "read capacity"; - - if (scg_cmd(scgp) < 0) { - return (-1); - } else { - long cbsize; - long cbaddr; - - /* - * c_bsize & c_baddr are signed Int32_t - * so we use signed int conversion here. - */ - cbsize = a_to_4_byte(&scgp->cap->c_bsize); - cbaddr = a_to_4_byte(&scgp->cap->c_baddr); - scgp->cap->c_bsize = cbsize; - scgp->cap->c_baddr = cbaddr; - } - return (0); -} - -EXPORT void -print_capacity(scgp, f) - SCSI *scgp; - FILE *f; -{ - long kb; - long mb; - long prmb; - double dkb; - - dkb = (scgp->cap->c_baddr+1.0) * (scgp->cap->c_bsize/1024.0); - kb = dkb; - mb = dkb / 1024.0; - prmb = dkb / 1000.0 * 1.024; - fprintf(f, "Capacity: %ld Blocks = %ld kBytes = %ld MBytes = %ld prMB\n", - (long)scgp->cap->c_baddr+1, kb, mb, prmb); - fprintf(f, "Sectorsize: %ld Bytes\n", (long)scgp->cap->c_bsize); -} - -EXPORT int -scsi_load_unload(scgp, load) - SCSI *scgp; - int load; -{ - register struct scg_cmd *scmd = scgp->scmd; - - fillbytes((caddr_t)scmd, sizeof (*scmd), '\0'); - scmd->flags = SCG_DISRE_ENA; - scmd->cdb_len = SC_G5_CDBLEN; - scmd->sense_len = CCS_SENSE_LEN; - scmd->cdb.g5_cdb.cmd = 0xA6; - scmd->cdb.g5_cdb.lun = scg_lun(scgp); - scmd->cdb.g5_cdb.addr[1] = load?3:2; - scmd->cdb.g5_cdb.count[2] = 0; /* slot # */ - - scgp->cmdname = "medium load/unload"; - - if (scg_cmd(scgp) < 0) - return (-1); - return (0); -} - -EXPORT int -scsi_prevent_removal(scgp, prevent) - SCSI *scgp; - int prevent; -{ - register struct scg_cmd *scmd = scgp->scmd; - - fillbytes((caddr_t)scmd, sizeof (*scmd), '\0'); - scmd->flags = SCG_DISRE_ENA; - scmd->cdb_len = SC_G0_CDBLEN; - scmd->sense_len = CCS_SENSE_LEN; - scmd->cdb.g0_cdb.cmd = 0x1E; - scmd->cdb.g0_cdb.lun = scg_lun(scgp); - scmd->cdb.g0_cdb.count = prevent & 1; - - scgp->cmdname = "prevent/allow medium removal"; - - if (scg_cmd(scgp) < 0) - return (-1); - return (0); -} - - -EXPORT int -scsi_start_stop_unit(scgp, flg, loej, immed) - SCSI *scgp; - int flg; - int loej; - BOOL immed; -{ - register struct scg_cmd *scmd = scgp->scmd; - - fillbytes((caddr_t)scmd, sizeof (*scmd), '\0'); - scmd->flags = SCG_DISRE_ENA; - scmd->cdb_len = SC_G0_CDBLEN; - scmd->sense_len = CCS_SENSE_LEN; - scmd->cdb.g0_cdb.cmd = 0x1B; /* Start Stop Unit */ - scmd->cdb.g0_cdb.lun = scg_lun(scgp); - scmd->cdb.g0_cdb.count = (flg ? 1:0) | (loej ? 2:0); - - if (immed) - scmd->cdb.cmd_cdb[1] |= 0x01; - - scgp->cmdname = "start/stop unit"; - - return (scg_cmd(scgp)); -} - -EXPORT int -scsi_set_speed(scgp, readspeed, writespeed, rotctl) - SCSI *scgp; - int readspeed; - int writespeed; - int rotctl; -{ - register struct scg_cmd *scmd = scgp->scmd; - - fillbytes((caddr_t)scmd, sizeof (*scmd), '\0'); - scmd->flags = SCG_DISRE_ENA; - scmd->cdb_len = SC_G5_CDBLEN; - scmd->sense_len = CCS_SENSE_LEN; - scmd->cdb.g5_cdb.cmd = 0xBB; - scmd->cdb.g5_cdb.lun = scg_lun(scgp); - - if (readspeed < 0) - i_to_2_byte(&scmd->cdb.g5_cdb.addr[0], 0xFFFF); - else - i_to_2_byte(&scmd->cdb.g5_cdb.addr[0], readspeed); - if (writespeed < 0) - i_to_2_byte(&scmd->cdb.g5_cdb.addr[2], 0xFFFF); - else - i_to_2_byte(&scmd->cdb.g5_cdb.addr[2], writespeed); - - scmd->cdb.cmd_cdb[1] |= rotctl & 0x03; - - scgp->cmdname = "set cd speed"; - - if (scg_cmd(scgp) < 0) - return (-1); - return (0); -} - -EXPORT int -scsi_get_speed(scgp, readspeedp, writespeedp) - SCSI *scgp; - int *readspeedp; - int *writespeedp; -{ - struct cd_mode_page_2A *mp; - Uchar m[256]; - int val; - - scgp->silent++; - mp = mmc_cap(scgp, m); /* Get MMC capabilities in allocated mp */ - scgp->silent--; - if (mp == NULL) - return (-1); /* Pre SCSI-3/mmc drive */ - - val = a_to_u_2_byte(mp->cur_read_speed); - if (readspeedp) - *readspeedp = val; - - if (mp->p_len >= 28) - val = a_to_u_2_byte(mp->v3_cur_write_speed); - else - val = a_to_u_2_byte(mp->cur_write_speed); - if (writespeedp) - *writespeedp = val; - - return (0); -} - - -EXPORT int -qic02(scgp, cmd) - SCSI *scgp; - int cmd; -{ - register struct scg_cmd *scmd = scgp->scmd; - - fillbytes((caddr_t)scmd, sizeof (*scmd), '\0'); - scmd->addr = (caddr_t)0; - scmd->size = 0; - scmd->flags = SCG_DISRE_ENA; - scmd->cdb_len = SC_G0_CDBLEN; - scmd->sense_len = DEF_SENSE_LEN; - scmd->cdb.g0_cdb.cmd = 0x0D; /* qic02 Sysgen SC4000 */ - scmd->cdb.g0_cdb.lun = scg_lun(scgp); - scmd->cdb.g0_cdb.mid_addr = cmd; - - scgp->cmdname = "qic 02"; - return (scg_cmd(scgp)); -} - -#define G0_MAXADDR 0x1FFFFFL - -EXPORT int -write_xscsi(scgp, bp, addr, size, cnt) - SCSI *scgp; - caddr_t bp; /* address of buffer */ - long addr; /* disk address (sector) to put */ - long size; /* number of bytes to transfer */ - int cnt; /* sectorcount */ -{ - if (addr <= G0_MAXADDR) - return (write_xg0(scgp, bp, addr, size, cnt)); - else - return (write_xg1(scgp, bp, addr, size, cnt)); -} - -EXPORT int -write_xg0(scgp, bp, addr, size, cnt) - SCSI *scgp; - caddr_t bp; /* address of buffer */ - long addr; /* disk address (sector) to put */ - long size; /* number of bytes to transfer */ - int cnt; /* sectorcount */ -{ - register struct scg_cmd *scmd = scgp->scmd; - - fillbytes((caddr_t)scmd, sizeof (*scmd), '\0'); - scmd->addr = bp; - scmd->size = size; - scmd->flags = SCG_DISRE_ENA|SCG_CMD_RETRY; -/* scmd->flags = SCG_DISRE_ENA;*/ - scmd->cdb_len = SC_G0_CDBLEN; - scmd->sense_len = CCS_SENSE_LEN; - scmd->cdb.g0_cdb.cmd = SC_WRITE; - scmd->cdb.g0_cdb.lun = scg_lun(scgp); - g0_cdbaddr(&scmd->cdb.g0_cdb, addr); - scmd->cdb.g0_cdb.count = cnt; - - scgp->cmdname = "write_g0"; - - if (scg_cmd(scgp) < 0) - return (-1); - return (size - scg_getresid(scgp)); -} - -EXPORT int -write_xg1(scgp, bp, addr, size, cnt) - SCSI *scgp; - caddr_t bp; /* address of buffer */ - long addr; /* disk address (sector) to put */ - long size; /* number of bytes to transfer */ - int cnt; /* sectorcount */ -{ - register struct scg_cmd *scmd = scgp->scmd; - - fillbytes((caddr_t)scmd, sizeof (*scmd), '\0'); - scmd->addr = bp; - scmd->size = size; - scmd->flags = SCG_DISRE_ENA|SCG_CMD_RETRY; -/* scmd->flags = SCG_DISRE_ENA;*/ - scmd->cdb_len = SC_G1_CDBLEN; - scmd->sense_len = CCS_SENSE_LEN; - scmd->cdb.g1_cdb.cmd = SC_EWRITE; - scmd->cdb.g1_cdb.lun = scg_lun(scgp); - g1_cdbaddr(&scmd->cdb.g1_cdb, addr); - g1_cdblen(&scmd->cdb.g1_cdb, cnt); - - scgp->cmdname = "write_g1"; - - if (scg_cmd(scgp) < 0) - return (-1); - return (size - scg_getresid(scgp)); -} - -EXPORT int -write_xg5(scgp, bp, addr, size, cnt) - SCSI *scgp; - caddr_t bp; /* address of buffer */ - long addr; /* disk address (sector) to put */ - long size; /* number of bytes to transfer */ - int cnt; /* sectorcount */ -{ - register struct scg_cmd *scmd = scgp->scmd; - - fillbytes((caddr_t)scmd, sizeof (*scmd), '\0'); - scmd->addr = bp; - scmd->size = size; - scmd->flags = SCG_DISRE_ENA|SCG_CMD_RETRY; -/* scmd->flags = SCG_DISRE_ENA;*/ - scmd->cdb_len = SC_G5_CDBLEN; - scmd->sense_len = CCS_SENSE_LEN; - scmd->cdb.g5_cdb.cmd = 0xAA; - scmd->cdb.g5_cdb.lun = scg_lun(scgp); - g5_cdbaddr(&scmd->cdb.g5_cdb, addr); - g5_cdblen(&scmd->cdb.g5_cdb, cnt); - - scgp->cmdname = "write_g5"; - - if (scg_cmd(scgp) < 0) - return (-1); - return (size - scg_getresid(scgp)); -} - -EXPORT int -seek_scsi(scgp, addr) - SCSI *scgp; - long addr; -{ - if (addr <= G0_MAXADDR) - return (seek_g0(scgp, addr)); - else - return (seek_g1(scgp, addr)); -} - -EXPORT int -seek_g0(scgp, addr) - SCSI *scgp; - long addr; -{ - register struct scg_cmd *scmd = scgp->scmd; - - fillbytes((caddr_t)scmd, sizeof (*scmd), '\0'); - scmd->flags = SCG_DISRE_ENA; - scmd->cdb_len = SC_G0_CDBLEN; - scmd->sense_len = CCS_SENSE_LEN; - scmd->cdb.g0_cdb.cmd = 0x0B; /* Seek */ - scmd->cdb.g0_cdb.lun = scg_lun(scgp); - g0_cdbaddr(&scmd->cdb.g0_cdb, addr); - - scgp->cmdname = "seek_g0"; - - return (scg_cmd(scgp)); -} - -EXPORT int -seek_g1(scgp, addr) - SCSI *scgp; - long addr; -{ - register struct scg_cmd *scmd = scgp->scmd; - - fillbytes((caddr_t)scmd, sizeof (*scmd), '\0'); - scmd->flags = SCG_DISRE_ENA; - scmd->cdb_len = SC_G1_CDBLEN; - scmd->sense_len = CCS_SENSE_LEN; - scmd->cdb.g1_cdb.cmd = 0x2B; /* Seek G1 */ - scmd->cdb.g1_cdb.lun = scg_lun(scgp); - g1_cdbaddr(&scmd->cdb.g1_cdb, addr); - - scgp->cmdname = "seek_g1"; - - return (scg_cmd(scgp)); -} - -EXPORT int -scsi_flush_cache(scgp, immed) - SCSI *scgp; - BOOL immed; -{ - register struct scg_cmd *scmd = scgp->scmd; - - fillbytes((caddr_t)scmd, sizeof (*scmd), '\0'); - scmd->flags = SCG_DISRE_ENA; - scmd->cdb_len = SC_G1_CDBLEN; - scmd->sense_len = CCS_SENSE_LEN; - scmd->timeout = 2 * 60; /* Max: sizeof (CDR-cache)/150KB/s */ - scmd->cdb.g1_cdb.cmd = 0x35; - scmd->cdb.g1_cdb.lun = scg_lun(scgp); - - if (immed) - scmd->cdb.cmd_cdb[1] |= 0x02; - - scgp->cmdname = "flush cache"; - - if (scg_cmd(scgp) < 0) - return (-1); - return (0); -} - -EXPORT int -read_buffer(scgp, bp, cnt, mode) - SCSI *scgp; - caddr_t bp; - int cnt; - int mode; -{ - register struct scg_cmd *scmd = scgp->scmd; - - fillbytes((caddr_t)scmd, sizeof (*scmd), '\0'); - scmd->addr = bp; - scmd->size = cnt; - scmd->dma_read = 1; - scmd->cdb_len = SC_G1_CDBLEN; - scmd->sense_len = CCS_SENSE_LEN; - scmd->cdb.g1_cdb.cmd = 0x3C; /* Read Buffer */ - scmd->cdb.g1_cdb.lun = scg_lun(scgp); - scmd->cdb.cmd_cdb[1] |= (mode & 7); - g1_cdblen(&scmd->cdb.g1_cdb, cnt); - - scgp->cmdname = "read buffer"; - - return (scg_cmd(scgp)); -} - -EXPORT int -write_buffer(scgp, buffer, length, mode, bufferid, offset) - SCSI *scgp; - char *buffer; - long length; - int mode; - int bufferid; - long offset; -{ - register struct scg_cmd *scmd = scgp->scmd; - char *cdb; - - fillbytes((caddr_t)scmd, sizeof (*scmd), '\0'); - scmd->addr = buffer; - scmd->size = length; - scmd->flags = SCG_DISRE_ENA|SCG_CMD_RETRY; - scmd->cdb_len = SC_G1_CDBLEN; - scmd->sense_len = CCS_SENSE_LEN; - - cdb = (char *)scmd->cdb.cmd_cdb; - - cdb[0] = 0x3B; - cdb[1] = mode & 7; - cdb[2] = bufferid; - cdb[3] = offset >> 16; - cdb[4] = (offset >> 8) & 0xff; - cdb[5] = offset & 0xff; - cdb[6] = length >> 16; - cdb[7] = (length >> 8) & 0xff; - cdb[8] = length & 0xff; - - scgp->cmdname = "write_buffer"; - - if (scg_cmd(scgp) >= 0) - return (1); - return (0); -} - -EXPORT int -read_subchannel(scgp, bp, track, cnt, msf, subq, fmt) - SCSI *scgp; - caddr_t bp; - int track; - int cnt; - int msf; - int subq; - int fmt; - -{ - register struct scg_cmd *scmd = scgp->scmd; - - fillbytes((caddr_t)scmd, sizeof (*scmd), '\0'); - scmd->addr = bp; - scmd->size = cnt; - scmd->flags = SCG_RECV_DATA|SCG_DISRE_ENA; - scmd->cdb_len = SC_G1_CDBLEN; - scmd->sense_len = CCS_SENSE_LEN; - scmd->cdb.g1_cdb.cmd = 0x42; - scmd->cdb.g1_cdb.lun = scg_lun(scgp); - if (msf) - scmd->cdb.g1_cdb.res = 1; - if (subq) - scmd->cdb.g1_cdb.addr[0] = 0x40; - scmd->cdb.g1_cdb.addr[1] = fmt; - scmd->cdb.g1_cdb.res6 = track; - g1_cdblen(&scmd->cdb.g1_cdb, cnt); - - scgp->cmdname = "read subchannel"; - - if (scg_cmd(scgp) < 0) - return (-1); - return (0); -} - -EXPORT int -read_toc(scgp, bp, track, cnt, msf, fmt) - SCSI *scgp; - caddr_t bp; - int track; - int cnt; - int msf; - int fmt; - -{ - register struct scg_cmd *scmd = scgp->scmd; - - fillbytes((caddr_t)scmd, sizeof (*scmd), '\0'); - scmd->addr = bp; - scmd->size = cnt; - scmd->flags = SCG_RECV_DATA|SCG_DISRE_ENA; - scmd->cdb_len = SC_G1_CDBLEN; - scmd->sense_len = CCS_SENSE_LEN; - scmd->cdb.g1_cdb.cmd = 0x43; - scmd->cdb.g1_cdb.lun = scg_lun(scgp); - if (msf) - scmd->cdb.g1_cdb.res = 1; - scmd->cdb.g1_cdb.addr[0] = fmt & 0x0F; - scmd->cdb.g1_cdb.res6 = track; - g1_cdblen(&scmd->cdb.g1_cdb, cnt); - - scgp->cmdname = "read toc"; - - if (scg_cmd(scgp) < 0) - return (-1); - return (0); -} - -EXPORT int -read_toc_philips(scgp, bp, track, cnt, msf, fmt) - SCSI *scgp; - caddr_t bp; - int track; - int cnt; - int msf; - int fmt; - -{ - register struct scg_cmd *scmd = scgp->scmd; - - fillbytes((caddr_t)scmd, sizeof (*scmd), '\0'); - scmd->addr = bp; - scmd->size = cnt; - scmd->flags = SCG_RECV_DATA|SCG_DISRE_ENA; - scmd->cdb_len = SC_G1_CDBLEN; - scmd->sense_len = CCS_SENSE_LEN; - scmd->timeout = 4 * 60; /* May last 174s on a TEAC CD-R55S */ - scmd->cdb.g1_cdb.cmd = 0x43; - scmd->cdb.g1_cdb.lun = scg_lun(scgp); - if (msf) - scmd->cdb.g1_cdb.res = 1; - scmd->cdb.g1_cdb.res6 = track; - g1_cdblen(&scmd->cdb.g1_cdb, cnt); - - if (fmt & 1) - scmd->cdb.g1_cdb.vu_96 = 1; - if (fmt & 2) - scmd->cdb.g1_cdb.vu_97 = 1; - - scgp->cmdname = "read toc"; - - if (scg_cmd(scgp) < 0) - return (-1); - return (0); -} - -EXPORT int -read_header(scgp, bp, addr, cnt, msf) - SCSI *scgp; - caddr_t bp; - long addr; - int cnt; - int msf; -{ - register struct scg_cmd *scmd = scgp->scmd; - - fillbytes((caddr_t)scmd, sizeof (*scmd), '\0'); - scmd->addr = bp; - scmd->size = cnt; - scmd->flags = SCG_RECV_DATA|SCG_DISRE_ENA; - scmd->cdb_len = SC_G1_CDBLEN; - scmd->sense_len = CCS_SENSE_LEN; - scmd->cdb.g1_cdb.cmd = 0x44; - scmd->cdb.g1_cdb.lun = scg_lun(scgp); - if (msf) - scmd->cdb.g1_cdb.res = 1; - g1_cdbaddr(&scmd->cdb.g1_cdb, addr); - g1_cdblen(&scmd->cdb.g1_cdb, cnt); - - scgp->cmdname = "read header"; - - if (scg_cmd(scgp) < 0) - return (-1); - return (0); -} - -EXPORT int -read_disk_info(scgp, bp, cnt) - SCSI *scgp; - caddr_t bp; - int cnt; - -{ - register struct scg_cmd *scmd = scgp->scmd; - - fillbytes((caddr_t)scmd, sizeof (*scmd), '\0'); - scmd->addr = bp; - scmd->size = cnt; - scmd->flags = SCG_RECV_DATA|SCG_DISRE_ENA; - scmd->cdb_len = SC_G1_CDBLEN; - scmd->sense_len = CCS_SENSE_LEN; - scmd->timeout = 4 * 60; /* Needs up to 2 minutes */ - scmd->cdb.g1_cdb.cmd = 0x51; - scmd->cdb.g1_cdb.lun = scg_lun(scgp); - g1_cdblen(&scmd->cdb.g1_cdb, cnt); - - scgp->cmdname = "read disk info"; - - if (scg_cmd(scgp) < 0) - return (-1); - return (0); -} - -EXPORT int -read_track_info(scgp, bp, type, addr, cnt) - SCSI *scgp; - caddr_t bp; - int type; - int addr; - int cnt; - -{ - register struct scg_cmd *scmd = scgp->scmd; - - fillbytes((caddr_t)scmd, sizeof (*scmd), '\0'); - scmd->addr = bp; - scmd->size = cnt; - scmd->flags = SCG_RECV_DATA|SCG_DISRE_ENA; - scmd->cdb_len = SC_G1_CDBLEN; - scmd->sense_len = CCS_SENSE_LEN; - scmd->timeout = 4 * 60; /* Needs up to 2 minutes */ - scmd->cdb.g1_cdb.cmd = 0x52; - scmd->cdb.g1_cdb.lun = scg_lun(scgp); -/* scmd->cdb.cmd_cdb[1] = type & 0x03;*/ - scmd->cdb.cmd_cdb[1] = type; - g1_cdbaddr(&scmd->cdb.g1_cdb, addr); /* LBA/Track/Session */ - g1_cdblen(&scmd->cdb.g1_cdb, cnt); - - scgp->cmdname = "read track info"; - - if (scg_cmd(scgp) < 0) - return (-1); - return (0); -} - -EXPORT int -get_trackinfo(scgp, bp, type, addr, cnt) - SCSI *scgp; - caddr_t bp; - int type; - int addr; - int cnt; -{ - int len; - int ret; - - fillbytes(bp, cnt, '\0'); - - /* - * Used to be 2 instead of 4 (now). But some Y2k ATAPI drives as used - * by IOMEGA create a DMA overrun if we try to transfer only 2 bytes. - */ - if (read_track_info(scgp, bp, type, addr, 4) < 0) - return (-1); - - len = a_to_u_2_byte(bp); - len += 2; - if (len > cnt) - len = cnt; - ret = read_track_info(scgp, bp, type, addr, len); - -#ifdef DEBUG - if (lverbose > 1) - scg_prbytes("Track info:", (Uchar *)bp, - len-scg_getresid(scgp)); -#endif - return (ret); -} - -EXPORT int -read_rzone_info(scgp, bp, cnt) - SCSI *scgp; - caddr_t bp; - int cnt; -{ - return (get_trackinfo(scgp, bp, TI_TYPE_LBA, 0, cnt)); -} - -EXPORT int -reserve_tr_rzone(scgp, size) - SCSI *scgp; - long size; /* number of blocks */ -{ - register struct scg_cmd *scmd = scgp->scmd; - - fillbytes((caddr_t)scmd, sizeof (*scmd), '\0'); - scmd->addr = (caddr_t)0; - scmd->size = 0; - scmd->flags = SCG_DISRE_ENA|SCG_CMD_RETRY; - scmd->cdb_len = SC_G1_CDBLEN; - scmd->sense_len = CCS_SENSE_LEN; - scmd->cdb.g1_cdb.cmd = 0x53; - scmd->cdb.g1_cdb.lun = scg_lun(scgp); - - i_to_4_byte(&scmd->cdb.g1_cdb.addr[3], size); - - scgp->cmdname = "reserve_track_rzone"; - - if (scg_cmd(scgp) < 0) - return (-1); - return (0); -} - -EXPORT int -read_dvd_structure(scgp, bp, cnt, mt, addr, layer, fmt) - SCSI *scgp; - caddr_t bp; - int cnt; - int mt; - int addr; - int layer; - int fmt; -{ - register struct scg_cmd *scmd = scgp->scmd; - - fillbytes((caddr_t)scmd, sizeof (*scmd), '\0'); - scmd->addr = bp; - scmd->size = cnt; - scmd->flags = SCG_RECV_DATA|SCG_DISRE_ENA; - scmd->cdb_len = SC_G5_CDBLEN; - scmd->sense_len = CCS_SENSE_LEN; - scmd->timeout = 4 * 60; /* Needs up to 2 minutes ??? */ - scmd->cdb.g5_cdb.cmd = 0xAD; - scmd->cdb.g5_cdb.lun = scg_lun(scgp); - scmd->cdb.cmd_cdb[1] |= (mt & 0x0F); /* Media Type */ - g5_cdbaddr(&scmd->cdb.g5_cdb, addr); - g5_cdblen(&scmd->cdb.g5_cdb, cnt); - scmd->cdb.g5_cdb.count[0] = layer; - scmd->cdb.g5_cdb.count[1] = fmt; - - scgp->cmdname = "read dvd structure"; - - if (scg_cmd(scgp) < 0) - return (-1); - return (0); -} - -EXPORT int -send_dvd_structure(scgp, bp, cnt, fmt) - SCSI *scgp; - caddr_t bp; - int cnt; - int fmt; -{ - register struct scg_cmd *scmd = scgp->scmd; - - fillbytes((caddr_t)scmd, sizeof (*scmd), '\0'); - scmd->addr = bp; - scmd->size = cnt; - scmd->flags = SCG_DISRE_ENA; - scmd->cdb_len = SC_G5_CDBLEN; - scmd->sense_len = CCS_SENSE_LEN; - scmd->timeout = 4 * 60; /* Needs up to 2 minutes ??? */ - scmd->cdb.g5_cdb.cmd = 0xBF; - scmd->cdb.g5_cdb.lun = scg_lun(scgp); - g5_cdblen(&scmd->cdb.g5_cdb, cnt); - scmd->cdb.g5_cdb.count[0] = 0; - scmd->cdb.g5_cdb.count[1] = fmt; - - scgp->cmdname = "send dvd structure"; - - if (scg_cmd(scgp) < 0) - return (-1); - return (0); -} - -EXPORT int -send_opc(scgp, bp, cnt, doopc) - SCSI *scgp; - caddr_t bp; - int cnt; - int doopc; -{ - register struct scg_cmd *scmd = scgp->scmd; - - fillbytes((caddr_t)scmd, sizeof (*scmd), '\0'); - scmd->addr = bp; - scmd->size = cnt; - scmd->flags = SCG_DISRE_ENA; - scmd->cdb_len = SC_G1_CDBLEN; - scmd->sense_len = CCS_SENSE_LEN; - scmd->timeout = 60; - scmd->cdb.g1_cdb.cmd = 0x54; - scmd->cdb.g1_cdb.lun = scg_lun(scgp); - scmd->cdb.g1_cdb.reladr = doopc?1:0; - g1_cdblen(&scmd->cdb.g1_cdb, cnt); - - scgp->cmdname = "send opc"; - - if (scg_cmd(scgp) < 0) - return (-1); - return (0); -} - -EXPORT int -read_track_info_philips(scgp, bp, track, cnt) - SCSI *scgp; - caddr_t bp; - int track; - int cnt; - -{ - register struct scg_cmd *scmd = scgp->scmd; - - fillbytes((caddr_t)scmd, sizeof (*scmd), '\0'); - scmd->addr = bp; - scmd->size = cnt; - scmd->flags = SCG_RECV_DATA|SCG_DISRE_ENA; - scmd->cdb_len = SC_G1_CDBLEN; - scmd->sense_len = CCS_SENSE_LEN; - scmd->cdb.g1_cdb.cmd = 0xE5; - scmd->cdb.g1_cdb.lun = scg_lun(scgp); - g1_cdbaddr(&scmd->cdb.g1_cdb, track); - g1_cdblen(&scmd->cdb.g1_cdb, cnt); - - scgp->cmdname = "read track info"; - - if (scg_cmd(scgp) < 0) - return (-1); - return (0); -} - -EXPORT int -scsi_close_tr_session(scgp, type, track, immed) - SCSI *scgp; - int type; - int track; - BOOL immed; -{ - register struct scg_cmd *scmd = scgp->scmd; - - fillbytes((caddr_t)scmd, sizeof (*scmd), '\0'); - scmd->flags = SCG_DISRE_ENA; - scmd->cdb_len = SC_G1_CDBLEN; - scmd->sense_len = CCS_SENSE_LEN; - scmd->timeout = 8 * 60; /* Needs up to 4 minutes */ - scmd->cdb.g1_cdb.cmd = 0x5B; - scmd->cdb.g1_cdb.lun = scg_lun(scgp); - scmd->cdb.g1_cdb.addr[0] = type; - scmd->cdb.g1_cdb.addr[3] = track; - - if (immed) - scmd->cdb.g1_cdb.reladr = 1; -/* scmd->cdb.cmd_cdb[1] |= 0x01;*/ -#ifdef nono - scmd->cdb.g1_cdb.reladr = 1; /* IMM hack to test Mitsumi behaviour*/ -#endif - - scgp->cmdname = "close track/session"; - - if (scg_cmd(scgp) < 0) - return (-1); - return (0); -} - -EXPORT int -read_master_cue(scgp, bp, sheet, cnt) - SCSI *scgp; - caddr_t bp; /* address of master cue sheet */ - int sheet; /* Sheet number */ - int cnt; /* Transfer count */ -{ - register struct scg_cmd *scmd = scgp->scmd; - - fillbytes((caddr_t)scmd, sizeof (*scmd), '\0'); - scmd->addr = bp; - scmd->size = cnt; - scmd->flags = SCG_RECV_DATA|SCG_DISRE_ENA; - scmd->cdb_len = SC_G1_CDBLEN; - scmd->sense_len = CCS_SENSE_LEN; - scmd->cdb.g1_cdb.cmd = 0x59; /* Read master cue */ - scmd->cdb.g1_cdb.lun = scg_lun(scgp); - scmd->cdb.g1_cdb.addr[2] = sheet; - g1_cdblen(&scmd->cdb.g1_cdb, cnt); - - scgp->cmdname = "read master cue"; - - if (scg_cmd(scgp) < 0) - return (-1); - return (0); -} - -EXPORT int -send_cue_sheet(scgp, bp, size) - SCSI *scgp; - caddr_t bp; /* address of cue sheet buffer */ - long size; /* number of bytes to transfer */ -{ - register struct scg_cmd *scmd = scgp->scmd; - - fillbytes((caddr_t)scmd, sizeof (*scmd), '\0'); - scmd->addr = bp; - scmd->size = size; - scmd->flags = SCG_DISRE_ENA; - scmd->cdb_len = SC_G1_CDBLEN; - scmd->sense_len = CCS_SENSE_LEN; - scmd->cdb.g1_cdb.cmd = 0x5D; /* Send CUE sheet */ - scmd->cdb.g1_cdb.lun = scg_lun(scgp); - g1_cdblen(&scmd->cdb.g1_cdb, size); - - scgp->cmdname = "send_cue_sheet"; - - if (scg_cmd(scgp) < 0) - return (-1); - return (size - scmd->resid); -} - -EXPORT int -read_buff_cap(scgp, sp, fp) - SCSI *scgp; - long *sp; /* Size pointer */ - long *fp; /* Free pointer */ -{ - char resp[12]; - Ulong freespace; - Ulong bufsize; - int per; - register struct scg_cmd *scmd = scgp->scmd; - - fillbytes((caddr_t)scmd, sizeof (*scmd), '\0'); - scmd->addr = (caddr_t)resp; - scmd->size = sizeof (resp); - scmd->flags = SCG_RECV_DATA|SCG_DISRE_ENA; - scmd->cdb_len = SC_G1_CDBLEN; - scmd->sense_len = CCS_SENSE_LEN; - scmd->cdb.g1_cdb.cmd = 0x5C; /* Read buffer cap */ - scmd->cdb.g1_cdb.lun = scg_lun(scgp); - g1_cdblen(&scmd->cdb.g1_cdb, sizeof (resp)); - - scgp->cmdname = "read buffer cap"; - - if (scg_cmd(scgp) < 0) - return (-1); - - bufsize = a_to_u_4_byte(&resp[4]); - freespace = a_to_u_4_byte(&resp[8]); - if (sp) - *sp = bufsize; - if (fp) - *fp = freespace; - - if (scgp->verbose || (sp == 0 && fp == 0)) - printf("BFree: %ld K BSize: %ld K\n", freespace >> 10, bufsize >> 10); - - if (bufsize == 0) - return (0); - per = (100 * (bufsize - freespace)) / bufsize; - if (per < 0) - return (0); - if (per > 100) - return (100); - return (per); -} - -EXPORT int -scsi_blank(scgp, addr, blanktype, immed) - SCSI *scgp; - long addr; - int blanktype; - BOOL immed; -{ - register struct scg_cmd *scmd = scgp->scmd; - - fillbytes((caddr_t)scmd, sizeof (*scmd), '\0'); - scmd->flags = SCG_DISRE_ENA; - scmd->cdb_len = SC_G5_CDBLEN; - scmd->sense_len = CCS_SENSE_LEN; - scmd->timeout = 160 * 60; /* full blank at 1x could take 80 minutes */ - scmd->cdb.g5_cdb.cmd = 0xA1; /* Blank */ - scmd->cdb.g0_cdb.high_addr = blanktype; - g1_cdbaddr(&scmd->cdb.g5_cdb, addr); - - if (immed) - scmd->cdb.g5_cdb.res |= 8; -/* scmd->cdb.cmd_cdb[1] |= 0x10;*/ - - scgp->cmdname = "blank unit"; - - return (scg_cmd(scgp)); -} - -/* - * XXX First try to handle ATAPI: - * XXX ATAPI cannot handle SCSI 6 byte commands. - * XXX We try to simulate 6 byte mode sense/select. - */ -LOCAL BOOL is_atapi; - -EXPORT BOOL -allow_atapi(scgp, new) - SCSI *scgp; - BOOL new; -{ - BOOL old = is_atapi; - Uchar mode[256]; - - if (new == old) - return (old); - - scgp->silent++; - /* - * If a bad drive has been reset before, we may need to fire up two - * test unit ready commands to clear status. - */ - (void) unit_ready(scgp); - if (new && - mode_sense_g1(scgp, mode, 8, 0x3F, 0) < 0) { /* All pages current */ - new = FALSE; - } - scgp->silent--; - - is_atapi = new; - return (old); -} - -EXPORT int -mode_select(scgp, dp, cnt, smp, pf) - SCSI *scgp; - Uchar *dp; - int cnt; - int smp; - int pf; -{ - if (is_atapi) - return (mode_select_sg0(scgp, dp, cnt, smp, pf)); - return (mode_select_g0(scgp, dp, cnt, smp, pf)); -} - -EXPORT int -mode_sense(scgp, dp, cnt, page, pcf) - SCSI *scgp; - Uchar *dp; - int cnt; - int page; - int pcf; -{ - if (is_atapi) - return (mode_sense_sg0(scgp, dp, cnt, page, pcf)); - return (mode_sense_g0(scgp, dp, cnt, page, pcf)); -} - -/* - * Simulate mode select g0 with mode select g1. - */ -EXPORT int -mode_select_sg0(scgp, dp, cnt, smp, pf) - SCSI *scgp; - Uchar *dp; - int cnt; - int smp; - int pf; -{ - Uchar xmode[256+4]; - int amt = cnt; - - if (amt < 1 || amt > 255) { - /* XXX clear SCSI error codes ??? */ - return (-1); - } - - if (amt < 4) { /* Data length. medium type & VU */ - amt += 1; - } else { - amt += 4; - movebytes(&dp[4], &xmode[8], cnt-4); - } - xmode[0] = 0; - xmode[1] = 0; - xmode[2] = dp[1]; - xmode[3] = dp[2]; - xmode[4] = 0; - xmode[5] = 0; - i_to_2_byte(&xmode[6], (unsigned int)dp[3]); - - if (scgp->verbose) scg_prbytes("Mode Parameters (un-converted)", dp, cnt); - - return (mode_select_g1(scgp, xmode, amt, smp, pf)); -} - -/* - * Simulate mode sense g0 with mode sense g1. - */ -EXPORT int -mode_sense_sg0(scgp, dp, cnt, page, pcf) - SCSI *scgp; - Uchar *dp; - int cnt; - int page; - int pcf; -{ - Uchar xmode[256+4]; - int amt = cnt; - int len; - - if (amt < 1 || amt > 255) { - /* XXX clear SCSI error codes ??? */ - return (-1); - } - - fillbytes((caddr_t)xmode, sizeof (xmode), '\0'); - if (amt < 4) { /* Data length. medium type & VU */ - amt += 1; - } else { - amt += 4; - } - if (mode_sense_g1(scgp, xmode, amt, page, pcf) < 0) - return (-1); - - amt = cnt - scg_getresid(scgp); -/* - * For tests: Solaris 8 & LG CD-ROM always returns resid == amt - */ -/* amt = cnt;*/ - if (amt > 4) - movebytes(&xmode[8], &dp[4], amt-4); - len = a_to_u_2_byte(xmode); - if (len == 0) { - dp[0] = 0; - } else if (len < 6) { - if (len > 2) - len = 2; - dp[0] = len; - } else { - dp[0] = len - 3; - } - dp[1] = xmode[2]; - dp[2] = xmode[3]; - len = a_to_u_2_byte(&xmode[6]); - dp[3] = len; - - if (scgp->verbose) scg_prbytes("Mode Sense Data (converted)", dp, amt); - return (0); -} - -EXPORT int -mode_select_g0(scgp, dp, cnt, smp, pf) - SCSI *scgp; - Uchar *dp; - int cnt; - int smp; - int pf; -{ - register struct scg_cmd *scmd = scgp->scmd; - - fillbytes((caddr_t)scmd, sizeof (*scmd), '\0'); - scmd->addr = (caddr_t)dp; - scmd->size = cnt; - scmd->flags = SCG_DISRE_ENA; - scmd->cdb_len = SC_G0_CDBLEN; - scmd->sense_len = CCS_SENSE_LEN; - scmd->cdb.g0_cdb.cmd = SC_MODE_SELECT; - scmd->cdb.g0_cdb.lun = scg_lun(scgp); - scmd->cdb.g0_cdb.high_addr = smp ? 1 : 0 | pf ? 0x10 : 0; - scmd->cdb.g0_cdb.count = cnt; - - if (scgp->verbose) { - error("%s ", smp?"Save":"Set "); - scg_prbytes("Mode Parameters", dp, cnt); - } - - scgp->cmdname = "mode select g0"; - - return (scg_cmd(scgp)); -} - -EXPORT int -mode_select_g1(scgp, dp, cnt, smp, pf) - SCSI *scgp; - Uchar *dp; - int cnt; - int smp; - int pf; -{ - register struct scg_cmd *scmd = scgp->scmd; - - fillbytes((caddr_t)scmd, sizeof (*scmd), '\0'); - scmd->addr = (caddr_t)dp; - scmd->size = cnt; - scmd->flags = SCG_DISRE_ENA; - scmd->cdb_len = SC_G1_CDBLEN; - scmd->sense_len = CCS_SENSE_LEN; - scmd->cdb.g1_cdb.cmd = 0x55; - scmd->cdb.g1_cdb.lun = scg_lun(scgp); - scmd->cdb.g0_cdb.high_addr = smp ? 1 : 0 | pf ? 0x10 : 0; - g1_cdblen(&scmd->cdb.g1_cdb, cnt); - - if (scgp->verbose) { - printf("%s ", smp?"Save":"Set "); - scg_prbytes("Mode Parameters", dp, cnt); - } - - scgp->cmdname = "mode select g1"; - - return (scg_cmd(scgp)); -} - -EXPORT int -mode_sense_g0(scgp, dp, cnt, page, pcf) - SCSI *scgp; - Uchar *dp; - int cnt; - int page; - int pcf; -{ - register struct scg_cmd *scmd = scgp->scmd; - - fillbytes((caddr_t)scmd, sizeof (*scmd), '\0'); - scmd->addr = (caddr_t)dp; - scmd->size = 0xFF; - scmd->size = cnt; - scmd->flags = SCG_RECV_DATA|SCG_DISRE_ENA; - scmd->cdb_len = SC_G0_CDBLEN; - scmd->sense_len = CCS_SENSE_LEN; - scmd->cdb.g0_cdb.cmd = SC_MODE_SENSE; - scmd->cdb.g0_cdb.lun = scg_lun(scgp); -#ifdef nonono - scmd->cdb.g0_cdb.high_addr = 1<<4; /* DBD Disable Block desc. */ -#endif - scmd->cdb.g0_cdb.mid_addr = (page&0x3F) | ((pcf<<6)&0xC0); - scmd->cdb.g0_cdb.count = page ? 0xFF : 24; - scmd->cdb.g0_cdb.count = cnt; - - scgp->cmdname = "mode sense g0"; - - if (scg_cmd(scgp) < 0) - return (-1); - if (scgp->verbose) scg_prbytes("Mode Sense Data", dp, cnt - scg_getresid(scgp)); - return (0); -} - -EXPORT int -mode_sense_g1(scgp, dp, cnt, page, pcf) - SCSI *scgp; - Uchar *dp; - int cnt; - int page; - int pcf; -{ - register struct scg_cmd *scmd = scgp->scmd; - - fillbytes((caddr_t)scmd, sizeof (*scmd), '\0'); - scmd->addr = (caddr_t)dp; - scmd->size = cnt; - scmd->flags = SCG_RECV_DATA|SCG_DISRE_ENA; - scmd->cdb_len = SC_G1_CDBLEN; - scmd->sense_len = CCS_SENSE_LEN; - scmd->cdb.g1_cdb.cmd = 0x5A; - scmd->cdb.g1_cdb.lun = scg_lun(scgp); -#ifdef nonono - scmd->cdb.g0_cdb.high_addr = 1<<4; /* DBD Disable Block desc. */ -#endif - scmd->cdb.g1_cdb.addr[0] = (page&0x3F) | ((pcf<<6)&0xC0); - g1_cdblen(&scmd->cdb.g1_cdb, cnt); - - scgp->cmdname = "mode sense g1"; - - if (scg_cmd(scgp) < 0) - return (-1); - if (scgp->verbose) scg_prbytes("Mode Sense Data", dp, cnt - scg_getresid(scgp)); - return (0); -} - -struct trackdesc { - Uchar res0; - -#if defined(_BIT_FIELDS_LTOH) /* Intel byteorder */ - Ucbit control : 4; - Ucbit adr : 4; -#else /* Motorola byteorder */ - Ucbit adr : 4; - Ucbit control : 4; -#endif - - Uchar track; - Uchar res3; - Uchar addr[4]; -}; - -struct diskinfo { - struct tocheader hd; - struct trackdesc desc[1]; -}; - -struct siheader { - Uchar len[2]; - Uchar finished; - Uchar unfinished; -}; - -struct sidesc { - Uchar sess_number; - Uchar res1; - Uchar track; - Uchar res3; - Uchar addr[4]; -}; - -struct sinfo { - struct siheader hd; - struct sidesc desc[1]; -}; - -struct trackheader { - Uchar mode; - Uchar res[3]; - Uchar addr[4]; -}; -#define TRM_ZERO 0 -#define TRM_USER_ECC 1 /* 2048 bytes user data + 288 Bytes ECC/EDC */ -#define TRM_USER 2 /* All user data (2336 bytes) */ - - -EXPORT int -read_tochdr(scgp, dp, fp, lp) - SCSI *scgp; - cdr_t *dp; - int *fp; - int *lp; -{ - struct tocheader *tp; - char xb[256]; - int len; - - tp = (struct tocheader *)xb; - - fillbytes((caddr_t)xb, sizeof (xb), '\0'); - if (read_toc(scgp, xb, 0, sizeof (struct tocheader), 0, FMT_TOC) < 0) { - if (scgp->silent == 0) - errmsgno(EX_BAD, "Cannot read TOC header\n"); - return (-1); - } - len = a_to_u_2_byte(tp->len) + sizeof (struct tocheader)-2; - if (len >= 4) { - if (fp) - *fp = tp->first; - if (lp) - *lp = tp->last; - return (0); - } - return (-1); -} - -EXPORT int -read_cdtext(scgp) - SCSI *scgp; -{ - struct tocheader *tp; - char xb[256]; - int len; - char xxb[10000]; - - tp = (struct tocheader *)xb; - - fillbytes((caddr_t)xb, sizeof (xb), '\0'); - if (read_toc(scgp, xb, 0, sizeof (struct tocheader), 0, FMT_CDTEXT) < 0) { - if (scgp->silent == 0 || scgp->verbose > 0) - errmsgno(EX_BAD, "Cannot read CD-Text header\n"); - return (-1); - } - len = a_to_u_2_byte(tp->len) + sizeof (struct tocheader)-2; - printf("CD-Text len: %d\n", len); - - if (read_toc(scgp, xxb, 0, len, 0, FMT_CDTEXT) < 0) { - if (scgp->silent == 0) - errmsgno(EX_BAD, "Cannot read CD-Text\n"); - return (-1); - } - { - FILE *f = fileopen("cdtext.dat", "wctb"); - filewrite(f, xxb, len); - } - return (0); -} - -EXPORT int -read_trackinfo(scgp, track, offp, msfp, adrp, controlp, modep) - SCSI *scgp; - int track; - long *offp; - struct msf *msfp; - int *adrp; - int *controlp; - int *modep; -{ - struct diskinfo *dp; - char xb[256]; - int len; - - dp = (struct diskinfo *)xb; - - fillbytes((caddr_t)xb, sizeof (xb), '\0'); - if (read_toc(scgp, xb, track, sizeof (struct diskinfo), 0, FMT_TOC) < 0) { - if (scgp->silent <= 0) - errmsgno(EX_BAD, "Cannot read TOC\n"); - return (-1); - } - len = a_to_u_2_byte(dp->hd.len) + sizeof (struct tocheader)-2; - if (len < (int)sizeof (struct diskinfo)) - return (-1); - - if (offp) - *offp = a_to_4_byte(dp->desc[0].addr); - if (adrp) - *adrp = dp->desc[0].adr; - if (controlp) - *controlp = dp->desc[0].control; - - if (msfp) { - scgp->silent++; - if (read_toc(scgp, xb, track, sizeof (struct diskinfo), 1, FMT_TOC) - >= 0) { - msfp->msf_min = dp->desc[0].addr[1]; - msfp->msf_sec = dp->desc[0].addr[2]; - msfp->msf_frame = dp->desc[0].addr[3]; - } else if (read_toc(scgp, xb, track, sizeof (struct diskinfo), 0, FMT_TOC) - >= 0) { - /* - * Some drives (e.g. the Philips CDD-522) don't support - * to read the TOC in MSF mode. - */ - long off = a_to_4_byte(dp->desc[0].addr); - - lba_to_msf(off, msfp); - } else { - msfp->msf_min = 0; - msfp->msf_sec = 0; - msfp->msf_frame = 0; - } - scgp->silent--; - } - - if (modep == NULL) - return (0); - - if (track == 0xAA) { - *modep = -1; - return (0); - } - - fillbytes((caddr_t)xb, sizeof (xb), '\0'); - - scgp->silent++; - if (read_header(scgp, xb, *offp, 8, 0) >= 0) { - *modep = xb[0]; - } else if (read_track_info_philips(scgp, xb, track, 14) >= 0) { - *modep = xb[0xb] & 0xF; - } else { - *modep = -1; - } - scgp->silent--; - return (0); -} - -EXPORT int -read_B0(scgp, isbcd, b0p, lop) - SCSI *scgp; - BOOL isbcd; - long *b0p; - long *lop; -{ - struct fdiskinfo *dp; - struct ftrackdesc *tp; - char xb[8192]; - char *pe; - int len; - long l; - - dp = (struct fdiskinfo *)xb; - - fillbytes((caddr_t)xb, sizeof (xb), '\0'); - if (read_toc_philips(scgp, xb, 1, sizeof (struct tocheader), 0, FMT_FULLTOC) < 0) { - return (-1); - } - len = a_to_u_2_byte(dp->hd.len) + sizeof (struct tocheader)-2; - if (len < (int)sizeof (struct fdiskinfo)) - return (-1); - if (read_toc_philips(scgp, xb, 1, len, 0, FMT_FULLTOC) < 0) { - return (-1); - } - if (scgp->verbose) { - scg_prbytes("TOC data: ", (Uchar *)xb, - len > (int)sizeof (xb) - scg_getresid(scgp) ? - sizeof (xb) - scg_getresid(scgp) : len); - - tp = &dp->desc[0]; - pe = &xb[len]; - - while ((char *)tp < pe) { - scg_prbytes("ENT: ", (Uchar *)tp, 11); - tp++; - } - } - tp = &dp->desc[0]; - pe = &xb[len]; - - for (; (char *)tp < pe; tp++) { - if (tp->sess_number != dp->hd.last) - continue; - if (tp->point != 0xB0) - continue; - if (scgp->verbose) - scg_prbytes("B0: ", (Uchar *)tp, 11); - if (isbcd) { - l = msf_to_lba(from_bcd(tp->amin), - from_bcd(tp->asec), - from_bcd(tp->aframe), TRUE); - } else { - l = msf_to_lba(tp->amin, - tp->asec, - tp->aframe, TRUE); - } - if (b0p) - *b0p = l; - - if (scgp->verbose) - printf("B0 start: %ld\n", l); - - if (isbcd) { - l = msf_to_lba(from_bcd(tp->pmin), - from_bcd(tp->psec), - from_bcd(tp->pframe), TRUE); - } else { - l = msf_to_lba(tp->pmin, - tp->psec, - tp->pframe, TRUE); - } - - if (scgp->verbose) - printf("B0 lout: %ld\n", l); - if (lop) - *lop = l; - return (0); - } - return (-1); -} - - -/* - * Return address of first track in last session (SCSI-3/mmc version). - */ -EXPORT int -read_session_offset(scgp, offp) - SCSI *scgp; - long *offp; -{ - struct diskinfo *dp; - char xb[256]; - int len; - - dp = (struct diskinfo *)xb; - - fillbytes((caddr_t)xb, sizeof (xb), '\0'); - if (read_toc(scgp, (caddr_t)xb, 0, sizeof (struct tocheader), 0, FMT_SINFO) < 0) - return (-1); - - if (scgp->verbose) - scg_prbytes("tocheader: ", - (Uchar *)xb, sizeof (struct tocheader) - scg_getresid(scgp)); - - len = a_to_u_2_byte(dp->hd.len) + sizeof (struct tocheader)-2; - if (len > (int)sizeof (xb)) { - errmsgno(EX_BAD, "Session info too big.\n"); - return (-1); - } - if (read_toc(scgp, (caddr_t)xb, 0, len, 0, FMT_SINFO) < 0) - return (-1); - - if (scgp->verbose) - scg_prbytes("tocheader: ", - (Uchar *)xb, len - scg_getresid(scgp)); - - dp = (struct diskinfo *)xb; - if (offp) - *offp = a_to_u_4_byte(dp->desc[0].addr); - return (0); -} - -/* - * Return address of first track in last session (pre SCSI-3 version). - */ -EXPORT int -read_session_offset_philips(scgp, offp) - SCSI *scgp; - long *offp; -{ - struct sinfo *sp; - char xb[256]; - int len; - - sp = (struct sinfo *)xb; - - fillbytes((caddr_t)xb, sizeof (xb), '\0'); - if (read_toc_philips(scgp, (caddr_t)xb, 0, sizeof (struct siheader), 0, FMT_SINFO) < 0) - return (-1); - len = a_to_u_2_byte(sp->hd.len) + sizeof (struct siheader)-2; - if (len > (int)sizeof (xb)) { - errmsgno(EX_BAD, "Session info too big.\n"); - return (-1); - } - if (read_toc_philips(scgp, (caddr_t)xb, 0, len, 0, FMT_SINFO) < 0) - return (-1); - /* - * Old drives return the number of finished sessions in first/finished - * a descriptor is returned for each session. - * New drives return the number of the first and last session - * one descriptor for the last finished session is returned - * as in SCSI-3 - * In all cases the lowest session number is set to 1. - */ - sp = (struct sinfo *)xb; - if (offp) - *offp = a_to_u_4_byte(sp->desc[sp->hd.finished-1].addr); - return (0); -} - -EXPORT int -sense_secsize(scgp, current) - SCSI *scgp; - int current; -{ - Uchar mode[0x100]; - Uchar *p; - Uchar *ep; - int len; - int secsize = -1; - - scgp->silent++; - (void) unit_ready(scgp); - scgp->silent--; - - /* XXX Quick and dirty, musz verallgemeinert werden !!! */ - - fillbytes(mode, sizeof (mode), '\0'); - scgp->silent++; - - len = sizeof (struct scsi_mode_header) + - sizeof (struct scsi_mode_blockdesc); - /* - * Wenn wir hier get_mode_params() nehmen bekommen wir die Warnung: - * Warning: controller returns wrong page 1 for All pages page (3F). - */ - if (mode_sense(scgp, mode, len, 0x3F, current?0:2) < 0) { - fillbytes(mode, sizeof (mode), '\0'); - if (mode_sense(scgp, mode, len, 0, current?0:2) < 0) { /* VU (block desc) */ - scgp->silent--; - return (-1); - } - } - if (mode[3] == 8) { - if (scgp->debug) { - printf("Density: 0x%X\n", mode[4]); - printf("Blocks: %ld\n", a_to_u_3_byte(&mode[5])); - printf("Blocklen:%ld\n", a_to_u_3_byte(&mode[9])); - } - secsize = a_to_u_3_byte(&mode[9]); - } - fillbytes(mode, sizeof (mode), '\0'); - /* - * The ACARD TECH AEC-7720 ATAPI<->SCSI adaptor - * chokes if we try to transfer more than 0x40 bytes with - * mode_sense of all pages. So try to avoid to run this - * command if possible. - */ - if (scgp->debug && - mode_sense(scgp, mode, 0xFE, 0x3F, current?0:2) >= 0) { /* All Pages */ - - ep = mode+mode[0]; /* Points to last byte of data */ - p = &mode[4]; - p += mode[3]; - printf("Pages: "); - while (p < ep) { - printf("0x%X ", *p&0x3F); - p += p[1]+2; - } - printf("\n"); - } - scgp->silent--; - - return (secsize); -} - -EXPORT int -select_secsize(scgp, secsize) - SCSI *scgp; - int secsize; -{ - struct scsi_mode_data md; - int count = sizeof (struct scsi_mode_header) + - sizeof (struct scsi_mode_blockdesc); - - (void) test_unit_ready(scgp); /* clear any error situation */ - - fillbytes((caddr_t)&md, sizeof (md), '\0'); - md.header.blockdesc_len = 8; - i_to_3_byte(md.blockdesc.lblen, secsize); - - return (mode_select(scgp, (Uchar *)&md, count, 0, scgp->inq->data_format >= 2)); -} - -EXPORT BOOL -is_cddrive(scgp) - SCSI *scgp; -{ - return (scgp->inq->type == INQ_ROMD || scgp->inq->type == INQ_WORM); -} - -EXPORT BOOL -is_unknown_dev(scgp) - SCSI *scgp; -{ - return (scgp->dev == DEV_UNKNOWN); -} - -#ifndef DEBUG -#define DEBUG -#endif -#ifdef DEBUG - -EXPORT int -read_scsi(scgp, bp, addr, cnt) - SCSI *scgp; - caddr_t bp; - long addr; - int cnt; -{ - if (addr <= G0_MAXADDR && cnt < 256 && !is_atapi) - return (read_g0(scgp, bp, addr, cnt)); - else - return (read_g1(scgp, bp, addr, cnt)); -} - -EXPORT int -read_g0(scgp, bp, addr, cnt) - SCSI *scgp; - caddr_t bp; - long addr; - int cnt; -{ - register struct scg_cmd *scmd = scgp->scmd; - - if (scgp->cap->c_bsize <= 0) - raisecond("capacity_not_set", 0L); - - fillbytes((caddr_t)scmd, sizeof (*scmd), '\0'); - scmd->addr = bp; - scmd->size = cnt*scgp->cap->c_bsize; - scmd->flags = SCG_RECV_DATA|SCG_DISRE_ENA; - scmd->cdb_len = SC_G0_CDBLEN; - scmd->sense_len = CCS_SENSE_LEN; - scmd->cdb.g0_cdb.cmd = SC_READ; - scmd->cdb.g0_cdb.lun = scg_lun(scgp); - g0_cdbaddr(&scmd->cdb.g0_cdb, addr); - scmd->cdb.g0_cdb.count = cnt; -/* scmd->cdb.g0_cdb.vu_56 = 1;*/ - - scgp->cmdname = "read_g0"; - - return (scg_cmd(scgp)); -} - -EXPORT int -read_g1(scgp, bp, addr, cnt) - SCSI *scgp; - caddr_t bp; - long addr; - int cnt; -{ - register struct scg_cmd *scmd = scgp->scmd; - - if (scgp->cap->c_bsize <= 0) - raisecond("capacity_not_set", 0L); - - fillbytes((caddr_t)scmd, sizeof (*scmd), '\0'); - scmd->addr = bp; - scmd->size = cnt*scgp->cap->c_bsize; - scmd->flags = SCG_RECV_DATA|SCG_DISRE_ENA; - scmd->cdb_len = SC_G1_CDBLEN; - scmd->sense_len = CCS_SENSE_LEN; - scmd->cdb.g1_cdb.cmd = SC_EREAD; - scmd->cdb.g1_cdb.lun = scg_lun(scgp); - g1_cdbaddr(&scmd->cdb.g1_cdb, addr); - g1_cdblen(&scmd->cdb.g1_cdb, cnt); - - scgp->cmdname = "read_g1"; - - return (scg_cmd(scgp)); -} -#endif /* DEBUG */ - -EXPORT BOOL -getdev(scgp, print) - SCSI *scgp; - BOOL print; -{ - BOOL got_inquiry = TRUE; - char vendor_info[8+1]; - char prod_ident[16+1]; - char prod_revision[4+1]; - int inq_len = 0; - register struct scg_cmd *scmd = scgp->scmd; - register struct scsi_inquiry *inq = scgp->inq; - - - fillbytes((caddr_t)inq, sizeof (*inq), '\0'); - scgp->dev = DEV_UNKNOWN; - scgp->silent++; - (void) unit_ready(scgp); - if (scmd->error >= SCG_FATAL && - !(scmd->scb.chk && scmd->sense_count > 0)) { - scgp->silent--; - return (FALSE); - } - - -/* if (scmd->error < SCG_FATAL || scmd->scb.chk && scmd->sense_count > 0){*/ - - if (inquiry(scgp, (caddr_t)inq, sizeof (*inq)) < 0) { - got_inquiry = FALSE; - } else { - inq_len = sizeof (*inq) - scg_getresid(scgp); - } - if (!got_inquiry) { - if (scgp->verbose) { - printf( - "error: %d scb.chk: %d sense_count: %d sense.code: 0x%x\n", - scmd->error, scmd->scb.chk, - scmd->sense_count, scmd->sense.code); - } - /* - * Folgende Kontroller kennen das Kommando - * INQUIRY nicht: - * - * ADAPTEC ACB-4000, ACB-4010, ACB 4070 - * SYSGEN SC4000 - * - * Leider reagieren ACB40X0 und ACB5500 identisch - * wenn drive not ready (code == not ready), - * sie sind dann nicht zu unterscheiden. - */ - - if (scmd->scb.chk && scmd->sense_count == 4) { - /* Test auf SYSGEN */ - (void) qic02(scgp, 0x12); /* soft lock on */ - if (qic02(scgp, 1) < 0) { /* soft lock off */ - scgp->dev = DEV_ACB40X0; -/* scgp->dev = acbdev();*/ - } else { - scgp->dev = DEV_SC4000; - inq->type = INQ_SEQD; - inq->removable = 1; - } - } - } else if (scgp->verbose) { - int i; - int len = inq->add_len + 5; - Uchar ibuf[256+5]; - Uchar *ip = (Uchar *)inq; - Uchar c; - - if (len > (int)sizeof (*inq) && - inquiry(scgp, (caddr_t)ibuf, inq->add_len+5) >= 0) { - len = inq->add_len+5 - scg_getresid(scgp); - ip = ibuf; - } else { - len = sizeof (*inq); - } - printf("Inquiry Data : "); - for (i = 0; i < len; i++) { - c = ip[i]; - if (c >= ' ' && c < 0177) - printf("%c", c); - else - printf("."); - } - printf("\n"); - } - - strncpy(vendor_info, inq->vendor_info, sizeof (inq->vendor_info)); - strncpy(prod_ident, inq->prod_ident, sizeof (inq->prod_ident)); - strncpy(prod_revision, inq->prod_revision, sizeof (inq->prod_revision)); - - vendor_info[sizeof (inq->vendor_info)] = '\0'; - prod_ident[sizeof (inq->prod_ident)] = '\0'; - prod_revision[sizeof (inq->prod_revision)] = '\0'; - - switch (inq->type) { - - case INQ_DASD: - if (inq->add_len == 0 && inq->vendor_info[0] != '\0') { - Uchar *p; - /* - * NT-4.0 creates fake inquiry data for IDE disks. - * Unfortunately, it does not set add_len wo we - * check if vendor_info, prod_ident and prod_revision - * contains valid chars for a CCS inquiry. - */ - if (inq_len >= 36) - inq->add_len = 31; - - for (p = (Uchar *)&inq->vendor_info[0]; - p < (Uchar *)&inq->prod_revision[4]; - p++) { - if (*p < 0x20 || *p > 0x7E) { - inq->add_len = 0; - break; - } - } - } - if (inq->add_len == 0) { - if (scgp->dev == DEV_UNKNOWN && got_inquiry) { - scgp->dev = DEV_ACB5500; - strcpy(inq->vendor_info, - "ADAPTEC ACB-5500 FAKE"); - - } else switch (scgp->dev) { - - case DEV_ACB40X0: - strcpy(inq->vendor_info, - "ADAPTEC ACB-40X0 FAKE"); - break; - case DEV_ACB4000: - strcpy(inq->vendor_info, - "ADAPTEC ACB-4000 FAKE"); - break; - case DEV_ACB4010: - strcpy(inq->vendor_info, - "ADAPTEC ACB-4010 FAKE"); - break; - case DEV_ACB4070: - strcpy(inq->vendor_info, - "ADAPTEC ACB-4070 FAKE"); - break; - } - } else if (inq->add_len < 31) { - scgp->dev = DEV_NON_CCS_DSK; - - } else if (strbeg("EMULEX", vendor_info)) { - if (strbeg("MD21", prod_ident)) - scgp->dev = DEV_MD21; - if (strbeg("MD23", prod_ident)) - scgp->dev = DEV_MD23; - else - scgp->dev = DEV_CCS_GENDISK; - } else if (strbeg("ADAPTEC", vendor_info)) { - if (strbeg("ACB-4520", prod_ident)) - scgp->dev = DEV_ACB4520A; - if (strbeg("ACB-4525", prod_ident)) - scgp->dev = DEV_ACB4525; - else - scgp->dev = DEV_CCS_GENDISK; - } else if (strbeg("SONY", vendor_info) && - strbeg("SMO-C501", prod_ident)) { - scgp->dev = DEV_SONY_SMO; - } else { - scgp->dev = DEV_CCS_GENDISK; - } - break; - - case INQ_SEQD: - if (scgp->dev == DEV_SC4000) { - strcpy(inq->vendor_info, - "SYSGEN SC4000 FAKE"); - } else if (inq->add_len == 0 && - inq->removable && - inq->ansi_version == 1) { - scgp->dev = DEV_MT02; - strcpy(inq->vendor_info, - "EMULEX MT02 FAKE"); - } - break; - -/* case INQ_OPTD:*/ - case INQ_ROMD: - case INQ_WORM: - if (strbeg("RXT-800S", prod_ident)) - scgp->dev = DEV_RXT800S; - - /* - * Start of CD-Recorders: - */ - if (strbeg("ACER", vendor_info)) { - if (strbeg("CR-4020C", prod_ident)) - scgp->dev = DEV_RICOH_RO_1420C; - - } else if (strbeg("CREATIVE", vendor_info)) { - if (strbeg("CDR2000", prod_ident)) - scgp->dev = DEV_RICOH_RO_1060C; - - } else if (strbeg("GRUNDIG", vendor_info)) { - if (strbeg("CDR100IPW", prod_ident)) - scgp->dev = DEV_CDD_2000; - - } else if (strbeg("JVC", vendor_info)) { - if (strbeg("XR-W2001", prod_ident)) - scgp->dev = DEV_TEAC_CD_R50S; - else if (strbeg("XR-W2010", prod_ident)) - scgp->dev = DEV_TEAC_CD_R50S; - else if (strbeg("R2626", prod_ident)) - scgp->dev = DEV_TEAC_CD_R50S; - - } else if (strbeg("MITSBISH", vendor_info)) { - -#ifdef XXXX_REALLY - /* It's MMC compliant */ - if (strbeg("CDRW226", prod_ident)) - scgp->dev = DEV_MMC_CDRW; -#else - /* EMPTY */ -#endif - - } else if (strbeg("MITSUMI", vendor_info)) { - /* Don't know any product string */ - scgp->dev = DEV_CDD_522; - - } else if (strbeg("OPTIMA", vendor_info)) { - if (strbeg("CD-R 650", prod_ident)) - scgp->dev = DEV_SONY_CDU_924; - - } else if (strbeg("PHILIPS", vendor_info) || - strbeg("IMS", vendor_info) || - strbeg("KODAK", vendor_info) || - strbeg("HP", vendor_info)) { - - if (strbeg("CDD521/00", prod_ident)) - scgp->dev = DEV_CDD_521_OLD; - else if (strbeg("CDD521/02", prod_ident)) - scgp->dev = DEV_CDD_521_OLD; /* PCD 200R? */ - else if (strbeg("CDD521", prod_ident)) - scgp->dev = DEV_CDD_521; - - if (strbeg("CDD522", prod_ident)) - scgp->dev = DEV_CDD_522; - if (strbeg("PCD225", prod_ident)) - scgp->dev = DEV_CDD_522; - if (strbeg("KHSW/OB", prod_ident)) /* PCD600 */ - scgp->dev = DEV_PCD_600; - if (strbeg("CDR-240", prod_ident)) - scgp->dev = DEV_CDD_2000; - - if (strbeg("CDD20", prod_ident)) - scgp->dev = DEV_CDD_2000; - if (strbeg("CDD26", prod_ident)) - scgp->dev = DEV_CDD_2600; - - if (strbeg("C4324/C4325", prod_ident)) - scgp->dev = DEV_CDD_2000; - if (strbeg("CD-Writer 6020", prod_ident)) - scgp->dev = DEV_CDD_2600; - - } else if (strbeg("PINNACLE", vendor_info)) { - if (strbeg("RCD-1000", prod_ident)) - scgp->dev = DEV_TEAC_CD_R50S; - if (strbeg("RCD5020", prod_ident)) - scgp->dev = DEV_TEAC_CD_R50S; - if (strbeg("RCD5040", prod_ident)) - scgp->dev = DEV_TEAC_CD_R50S; - if (strbeg("RCD 4X4", prod_ident)) - scgp->dev = DEV_TEAC_CD_R50S; - - } else if (strbeg("PIONEER", vendor_info)) { - if (strbeg("CD-WO DW-S114X", prod_ident)) - scgp->dev = DEV_PIONEER_DW_S114X; - else if (strbeg("CD-WO DR-R504X", prod_ident)) /* Reoprt from philip@merge.com */ - scgp->dev = DEV_PIONEER_DW_S114X; - else if (strbeg("DVD-R DVR-S101", prod_ident)) - scgp->dev = DEV_PIONEER_DVDR_S101; - - } else if (strbeg("PLASMON", vendor_info)) { - if (strbeg("RF4100", prod_ident)) - scgp->dev = DEV_PLASMON_RF_4100; - else if (strbeg("CDR4220", prod_ident)) - scgp->dev = DEV_CDD_2000; - - } else if (strbeg("PLEXTOR", vendor_info)) { - if (strbeg("CD-R PX-R24CS", prod_ident)) - scgp->dev = DEV_RICOH_RO_1420C; - - } else if (strbeg("RICOH", vendor_info)) { - if (strbeg("RO-1420C", prod_ident)) - scgp->dev = DEV_RICOH_RO_1420C; - if (strbeg("RO1060C", prod_ident)) - scgp->dev = DEV_RICOH_RO_1060C; - - } else if (strbeg("SAF", vendor_info)) { /* Smart & Friendly */ - if (strbeg("CD-R2004", prod_ident) || - strbeg("CD-R2006 ", prod_ident)) - scgp->dev = DEV_SONY_CDU_924; - else if (strbeg("CD-R2006PLUS", prod_ident)) - scgp->dev = DEV_TEAC_CD_R50S; - else if (strbeg("CD-RW226", prod_ident)) - scgp->dev = DEV_TEAC_CD_R50S; - else if (strbeg("CD-R4012", prod_ident)) - scgp->dev = DEV_TEAC_CD_R50S; - - } else if (strbeg("SANYO", vendor_info)) { - if (strbeg("CD-WO CRD-R24S", prod_ident)) - scgp->dev = DEV_CDD_521; - - } else if (strbeg("SONY", vendor_info)) { - if (strbeg("CD-R CDU92", prod_ident) || - strbeg("CD-R CDU94", prod_ident)) - scgp->dev = DEV_SONY_CDU_924; - - } else if (strbeg("TEAC", vendor_info)) { - if (strbeg("CD-R50S", prod_ident) || - strbeg("CD-R55S", prod_ident)) - scgp->dev = DEV_TEAC_CD_R50S; - - } else if (strbeg("TRAXDATA", vendor_info) || - strbeg("Traxdata", vendor_info)) { - if (strbeg("CDR4120", prod_ident)) - scgp->dev = DEV_TEAC_CD_R50S; - - } else if (strbeg("T.YUDEN", vendor_info)) { - if (strbeg("CD-WO EW-50", prod_ident)) - scgp->dev = DEV_TYUDEN_EW50; - - } else if (strbeg("WPI", vendor_info)) { /* Wearnes */ - if (strbeg("CDR-632P", prod_ident)) - scgp->dev = DEV_CDD_2600; - - } else if (strbeg("YAMAHA", vendor_info)) { - if (strbeg("CDR10", prod_ident)) - scgp->dev = DEV_YAMAHA_CDR_100; - if (strbeg("CDR200", prod_ident)) - scgp->dev = DEV_YAMAHA_CDR_400; - if (strbeg("CDR400", prod_ident)) - scgp->dev = DEV_YAMAHA_CDR_400; - - } else if (strbeg("MATSHITA", vendor_info)) { - if (strbeg("CD-R CW-7501", prod_ident)) - scgp->dev = DEV_MATSUSHITA_7501; - if (strbeg("CD-R CW-7502", prod_ident)) - scgp->dev = DEV_MATSUSHITA_7502; - } - if (scgp->dev == DEV_UNKNOWN) { - /* - * We do not have Manufacturer strings for - * the following drives. - */ - if (strbeg("CDS615E", prod_ident)) /* Olympus */ - scgp->dev = DEV_SONY_CDU_924; - } - if (scgp->dev == DEV_UNKNOWN && inq->type == INQ_ROMD) { - BOOL cdrr = FALSE; - BOOL cdwr = FALSE; - BOOL cdrrw = FALSE; - BOOL cdwrw = FALSE; - BOOL dvd = FALSE; - BOOL dvdwr = FALSE; - - scgp->dev = DEV_CDROM; - - if (mmc_check(scgp, &cdrr, &cdwr, &cdrrw, &cdwrw, - &dvd, &dvdwr)) - scgp->dev = DEV_MMC_CDROM; - if (cdwr) - scgp->dev = DEV_MMC_CDR; - if (cdwrw) - scgp->dev = DEV_MMC_CDRW; - if (dvd) - scgp->dev = DEV_MMC_DVD; - if (dvdwr) - scgp->dev = DEV_MMC_DVD_WR; - } - break; - - case INQ_PROCD: - if (strbeg("BERTHOLD", vendor_info)) { - if (strbeg("", prod_ident)) - scgp->dev = DEV_HRSCAN; - } - break; - - case INQ_SCAN: - scgp->dev = DEV_MS300A; - break; - } - scgp->silent--; - if (!print) - return (TRUE); - - if (scgp->dev == DEV_UNKNOWN && !got_inquiry) { -#ifdef PRINT_INQ_ERR - scg_printerr(scgp); -#endif - return (FALSE); - } - - printinq(scgp, stdout); - return (TRUE); -} - -EXPORT void -printinq(scgp, f) - SCSI *scgp; - FILE *f; -{ - register struct scsi_inquiry *inq = scgp->inq; - - fprintf(f, "Device type : "); - scg_fprintdev(f, inq); - fprintf(f, "Version : %d\n", inq->ansi_version); - fprintf(f, "Response Format: %d\n", inq->data_format); - if (inq->data_format >= 2) { - fprintf(f, "Capabilities : "); - if (inq->aenc) fprintf(f, "AENC "); - if (inq->termiop) fprintf(f, "TERMIOP "); - if (inq->reladr) fprintf(f, "RELADR "); - if (inq->wbus32) fprintf(f, "WBUS32 "); - if (inq->wbus16) fprintf(f, "WBUS16 "); - if (inq->sync) fprintf(f, "SYNC "); - if (inq->linked) fprintf(f, "LINKED "); - if (inq->cmdque) fprintf(f, "CMDQUE "); - if (inq->softreset) fprintf(f, "SOFTRESET "); - fprintf(f, "\n"); - } - if (inq->add_len >= 31 || - inq->vendor_info[0] || - inq->prod_ident[0] || - inq->prod_revision[0]) { - fprintf(f, "Vendor_info : '%.8s'\n", inq->vendor_info); - fprintf(f, "Identifikation : '%.16s'\n", inq->prod_ident); - fprintf(f, "Revision : '%.4s'\n", inq->prod_revision); - } -} - -EXPORT void -printdev(scgp) - SCSI *scgp; -{ - printf("Device seems to be: "); - - switch (scgp->dev) { - - case DEV_UNKNOWN: printf("unknown"); break; - case DEV_ACB40X0: printf("Adaptec 4000/4010/4070"); break; - case DEV_ACB4000: printf("Adaptec 4000"); break; - case DEV_ACB4010: printf("Adaptec 4010"); break; - case DEV_ACB4070: printf("Adaptec 4070"); break; - case DEV_ACB5500: printf("Adaptec 5500"); break; - case DEV_ACB4520A: printf("Adaptec 4520A"); break; - case DEV_ACB4525: printf("Adaptec 4525"); break; - case DEV_MD21: printf("Emulex MD21"); break; - case DEV_MD23: printf("Emulex MD23"); break; - case DEV_NON_CCS_DSK: printf("Generic NON CCS Disk"); break; - case DEV_CCS_GENDISK: printf("Generic CCS Disk"); break; - case DEV_SONY_SMO: printf("Sony SMO-C501"); break; - case DEV_MT02: printf("Emulex MT02"); break; - case DEV_SC4000: printf("Sysgen SC4000"); break; - case DEV_RXT800S: printf("Maxtor RXT800S"); break; - case DEV_HRSCAN: printf("Berthold HR-Scanner"); break; - case DEV_MS300A: printf("Microtek MS300A"); break; - - case DEV_CDROM: printf("Generic CD-ROM"); break; - case DEV_MMC_CDROM: printf("Generic mmc CD-ROM"); break; - case DEV_MMC_CDR: printf("Generic mmc CD-R"); break; - case DEV_MMC_CDRW: printf("Generic mmc CD-RW"); break; - case DEV_MMC_DVD: printf("Generic mmc2 DVD-ROM"); break; - case DEV_MMC_DVD_WR: printf("Generic mmc2 DVD-R/DVD-RW/DVD-RAM"); break; - case DEV_CDD_521_OLD: printf("Philips old CDD-521"); break; - case DEV_CDD_521: printf("Philips CDD-521"); break; - case DEV_CDD_522: printf("Philips CDD-522"); break; - case DEV_PCD_600: printf("Kodak PCD-600"); break; - case DEV_CDD_2000: printf("Philips CDD-2000"); break; - case DEV_CDD_2600: printf("Philips CDD-2600"); break; - case DEV_YAMAHA_CDR_100:printf("Yamaha CDR-100"); break; - case DEV_YAMAHA_CDR_400:printf("Yamaha CDR-400"); break; - case DEV_PLASMON_RF_4100:printf("Plasmon RF-4100"); break; - case DEV_SONY_CDU_924: printf("Sony CDU-924S"); break; - case DEV_RICOH_RO_1060C:printf("Ricoh RO-1060C"); break; - case DEV_RICOH_RO_1420C:printf("Ricoh RO-1420C"); break; - case DEV_TEAC_CD_R50S: printf("Teac CD-R50S"); break; - case DEV_MATSUSHITA_7501:printf("Matsushita CW-7501"); break; - case DEV_MATSUSHITA_7502:printf("Matsushita CW-7502"); break; - - case DEV_PIONEER_DW_S114X: printf("Pioneer DW-S114X"); break; - case DEV_PIONEER_DVDR_S101:printf("Pioneer DVD-R S101"); break; - - default: printf("Missing Entry for dev %d", - scgp->dev); break; - - } - printf(".\n"); - -} - -EXPORT BOOL -do_inquiry(scgp, print) - SCSI *scgp; - int print; -{ - if (getdev(scgp, print)) { - if (print) - printdev(scgp); - return (TRUE); - } else { - return (FALSE); - } -} - -EXPORT BOOL -recovery_needed(scgp, dp) - SCSI *scgp; - cdr_t *dp; -{ - int err; - register struct scg_cmd *scmd = scgp->scmd; - - scgp->silent++; - err = test_unit_ready(scgp); - scgp->silent--; - - if (err >= 0) - return (FALSE); - else if (scmd->error >= SCG_FATAL) /* nicht selektierbar */ - return (FALSE); - - if (scmd->sense.code < 0x70) /* non extended Sense */ - return (FALSE); - - /* XXX Old Philips code */ - return (((struct scsi_ext_sense *)&scmd->sense)->sense_code == 0xD0); -} - -EXPORT int -scsi_load(scgp, dp) - SCSI *scgp; - cdr_t *dp; -{ - int key; - int code; - - if ((dp->cdr_flags & CDR_CADDYLOAD) == 0) { - if (scsi_start_stop_unit(scgp, 1, 1, dp && (dp->cdr_cmdflags&F_IMMED)) >= 0) - return (0); - } - - if (wait_unit_ready(scgp, 60)) - return (0); - - key = scg_sense_key(scgp); - code = scg_sense_code(scgp); - - if (key == SC_NOT_READY && (code == 0x3A || code == 0x30)) { - errmsgno(EX_BAD, "Cannot load media with %s drive!\n", - (dp->cdr_flags & CDR_CADDYLOAD) ? "caddy" : "this"); - errmsgno(EX_BAD, "Try to load media by hand.\n"); - } - return (-1); -} - -EXPORT int -scsi_unload(scgp, dp) - SCSI *scgp; - cdr_t *dp; -{ - return (scsi_start_stop_unit(scgp, 0, 1, dp && (dp->cdr_cmdflags&F_IMMED))); -} - -EXPORT int -scsi_cdr_write(scgp, bp, sectaddr, size, blocks, islast) - SCSI *scgp; - caddr_t bp; /* address of buffer */ - long sectaddr; /* disk address (sector) to put */ - long size; /* number of bytes to transfer */ - int blocks; /* sector count */ - BOOL islast; /* last write for track */ -{ - return (write_xg1(scgp, bp, sectaddr, size, blocks)); -} - -EXPORT struct cd_mode_page_2A * -mmc_cap(scgp, modep) - SCSI *scgp; - Uchar *modep; -{ - int len; - int val; - Uchar mode[0x100]; - struct cd_mode_page_2A *mp; - struct cd_mode_page_2A *mp2; - - -retry: - fillbytes((caddr_t)mode, sizeof (mode), '\0'); - - if (!get_mode_params(scgp, 0x2A, "CD capabilities", - mode, (Uchar *)0, (Uchar *)0, (Uchar *)0, &len)) { - - if (scg_sense_key(scgp) == SC_NOT_READY) { - if (wait_unit_ready(scgp, 60)) - goto retry; - } - return (NULL); /* Pre SCSI-3/mmc drive */ - } - - if (len == 0) /* Pre SCSI-3/mmc drive */ - return (NULL); - - mp = (struct cd_mode_page_2A *) - (mode + sizeof (struct scsi_mode_header) + - ((struct scsi_mode_header *)mode)->blockdesc_len); - - /* - * Do some heuristics against pre SCSI-3/mmc VU page 2A - * We should test for a minimum p_len of 0x14, but some - * buggy CD-ROM readers ommit the write speed values. - */ - if (mp->p_len < 0x10) - return (NULL); - - val = a_to_u_2_byte(mp->max_read_speed); - if (val != 0 && val < 176) - return (NULL); - - val = a_to_u_2_byte(mp->cur_read_speed); - if (val != 0 && val < 176) - return (NULL); - - len -= sizeof (struct scsi_mode_header) + - ((struct scsi_mode_header *)mode)->blockdesc_len; - if (modep) - mp2 = (struct cd_mode_page_2A *)modep; - else - mp2 = malloc(len); - if (mp2) - movebytes(mp, mp2, len); - - return (mp2); -} - -EXPORT void -mmc_getval(mp, cdrrp, cdwrp, cdrrwp, cdwrwp, dvdp, dvdwp) - struct cd_mode_page_2A *mp; - BOOL *cdrrp; /* CD ROM */ - BOOL *cdwrp; /* CD-R writer */ - BOOL *cdrrwp; /* CD-RW reader */ - BOOL *cdwrwp; /* CD-RW writer */ - BOOL *dvdp; /* DVD reader */ - BOOL *dvdwp; /* DVD writer */ -{ - BOOL isdvd; /* Any DVD reader */ - BOOL isdvd_wr; /* DVD writer (R / RAM) */ - BOOL iscd_wr; /* CD writer */ - - iscd_wr = (mp->cd_r_write != 0) || /* SCSI-3/mmc CD-R */ - (mp->cd_rw_write != 0); /* SCSI-3/mmc CD-RW */ - - if (cdrrp) - *cdrrp = (mp->cd_r_read != 0); /* SCSI-3/mmc CD */ - if (cdwrp) - *cdwrp = (mp->cd_r_write != 0); /* SCSI-3/mmc CD-R */ - - if (cdrrwp) - *cdrrwp = (mp->cd_rw_read != 0); /* SCSI-3/mmc CD */ - if (cdwrwp) - *cdwrwp = (mp->cd_rw_write != 0); /* SCSI-3/mmc CD-RW */ - - isdvd = /* SCSI-3/mmc2 DVD */ - (mp->dvd_ram_read + mp->dvd_r_read + - mp->dvd_rom_read) != 0; - - isdvd_wr = /* SCSI-3/mmc2 DVD writer*/ - (mp->dvd_ram_write + mp->dvd_r_write) != 0; - - if (dvdp) - *dvdp = isdvd; - if (dvdwp) - *dvdwp = isdvd_wr; -} - -EXPORT BOOL -is_mmc(scgp, cdwp, dvdwp) - SCSI *scgp; - BOOL *cdwp; /* CD writer */ - BOOL *dvdwp; /* DVD writer */ -{ - BOOL cdwr = FALSE; - BOOL cdwrw = FALSE; - - if (cdwp) - *cdwp = FALSE; - if (dvdwp) - *dvdwp = FALSE; - - if (!mmc_check(scgp, NULL, &cdwr, NULL, &cdwrw, NULL, dvdwp)) - return (FALSE); - - if (cdwp) - *cdwp = cdwr | cdwrw; - - return (TRUE); -} - -EXPORT BOOL -mmc_check(scgp, cdrrp, cdwrp, cdrrwp, cdwrwp, dvdp, dvdwp) - SCSI *scgp; - BOOL *cdrrp; /* CD ROM */ - BOOL *cdwrp; /* CD-R writer */ - BOOL *cdrrwp; /* CD-RW reader */ - BOOL *cdwrwp; /* CD-RW writer */ - BOOL *dvdp; /* DVD reader */ - BOOL *dvdwp; /* DVD writer */ -{ - Uchar mode[0x100]; - BOOL was_atapi; - struct cd_mode_page_2A *mp; - - if (scgp->inq->type != INQ_ROMD) - return (FALSE); - - fillbytes((caddr_t)mode, sizeof (mode), '\0'); - - was_atapi = allow_atapi(scgp, TRUE); - scgp->silent++; - mp = mmc_cap(scgp, mode); - scgp->silent--; - allow_atapi(scgp, was_atapi); - if (mp == NULL) - return (FALSE); - - mmc_getval(mp, cdrrp, cdwrp, cdrrwp, cdwrwp, dvdp, dvdwp); - - return (TRUE); /* Generic SCSI-3/mmc CD */ -} - -LOCAL void -print_speed(fmt, val) - char *fmt; - int val; -{ - printf(" %s: %5d kB/s", fmt, val); - printf(" (CD %3ux,", val/176); - printf(" DVD %2ux,", val/1385); - printf(" BD %2ux)\n", val/4495); -} - -#define DOES(what, flag) printf(" Does %s%s\n", flag?"":"not ", what) -#define IS(what, flag) printf(" Is %s%s\n", flag?"":"not ", what) -#define VAL(what, val) printf(" %s: %d\n", what, val[0]*256 + val[1]) -#define SVAL(what, val) printf(" %s: %s\n", what, val) - -EXPORT void -print_capabilities(scgp) - SCSI *scgp; -{ - BOOL was_atapi; - Uchar mode[0x100]; - struct cd_mode_page_2A *mp; -static const char *bclk[4] = {"32", "16", "24", "24 (I2S)"}; -static const char *load[8] = {"caddy", "tray", "pop-up", "reserved(3)", - "disc changer", "cartridge changer", - "reserved(6)", "reserved(7)" }; -static const char *rotctl[4] = {"CLV/PCAV", "CAV", "reserved(2)", "reserved(3)"}; - - - if (scgp->inq->type != INQ_ROMD) - return; - - fillbytes((caddr_t)mode, sizeof (mode), '\0'); - - was_atapi = allow_atapi(scgp, TRUE); /* Try to switch to 10 byte mode cmds */ - scgp->silent++; - mp = mmc_cap(scgp, mode); - scgp->silent--; - allow_atapi(scgp, was_atapi); - if (mp == NULL) - return; - - printf("\nDrive capabilities, per"); - if (mp->p_len >= 28) - printf(" MMC-3"); - else if (mp->p_len >= 24) - printf(" MMC-2"); - else - printf(" MMC"); - printf(" page 2A:\n\n"); - - DOES("read CD-R media", mp->cd_r_read); - DOES("write CD-R media", mp->cd_r_write); - DOES("read CD-RW media", mp->cd_rw_read); - DOES("write CD-RW media", mp->cd_rw_write); - DOES("read DVD-ROM media", mp->dvd_rom_read); - DOES("read DVD-R media", mp->dvd_r_read); - DOES("write DVD-R media", mp->dvd_r_write); - DOES("read DVD-RAM media", mp->dvd_ram_read); - DOES("write DVD-RAM media", mp->dvd_ram_write); - DOES("support test writing", mp->test_write); - printf("\n"); - DOES("read Mode 2 Form 1 blocks", mp->mode_2_form_1); - DOES("read Mode 2 Form 2 blocks", mp->mode_2_form_2); - DOES("read digital audio blocks", mp->cd_da_supported); - if (mp->cd_da_supported) - DOES("restart non-streamed digital audio reads accurately", mp->cd_da_accurate); - DOES("support Buffer-Underrun-Free recording", mp->BUF); - DOES("read multi-session CDs", mp->multi_session); - DOES("read fixed-packet CD media using Method 2", mp->method2); - DOES("read CD bar code", mp->read_bar_code); - DOES("read R-W subcode information", mp->rw_supported); - if (mp->rw_supported) - DOES("return R-W subcode de-interleaved and error-corrected", mp->rw_deint_corr); - DOES("read raw P-W subcode data from lead in", mp->pw_in_lead_in); - DOES("return CD media catalog number", mp->UPC); - DOES("return CD ISRC information", mp->ISRC); - DOES("support C2 error pointers", mp->c2_pointers); - DOES("deliver composite A/V data", mp->composite); - printf("\n"); - DOES("play audio CDs", mp->audio_play); - if (mp->audio_play) { - VAL("Number of volume control levels", mp->num_vol_levels); - DOES("support individual volume control setting for each channel", mp->sep_chan_vol); - DOES("support independent mute setting for each channel", mp->sep_chan_mute); - DOES("support digital output on port 1", mp->digital_port_1); - DOES("support digital output on port 2", mp->digital_port_2); - if (mp->digital_port_1 || mp->digital_port_2) { - DOES("send digital data LSB-first", mp->LSBF); - DOES("set LRCK high for left-channel data", mp->RCK); - DOES("have valid data on falling edge of clock", mp->BCK); - SVAL("Length of data in BCLKs", bclk[mp->length]); - } - } - printf("\n"); - SVAL("Loading mechanism type", load[mp->loading_type]); - DOES("support ejection of CD via START/STOP command", mp->eject); - DOES("lock media on power up via prevent jumper", mp->prevent_jumper); - DOES("allow media to be locked in the drive via PREVENT/ALLOW command", mp->lock); - IS("currently in a media-locked state", mp->lock_state); - DOES("support changing side of disk", mp->side_change); - DOES("have load-empty-slot-in-changer feature", mp->sw_slot_sel); - DOES("support Individual Disk Present feature", mp->disk_present_rep); - printf("\n"); - print_speed("Maximum read speed", a_to_u_2_byte(mp->max_read_speed)); - print_speed("Current read speed", a_to_u_2_byte(mp->cur_read_speed)); - print_speed("Maximum write speed", a_to_u_2_byte(mp->max_write_speed)); - if (mp->p_len >= 28) - print_speed("Current write speed", a_to_u_2_byte(mp->v3_cur_write_speed)); - else - print_speed("Current write speed", a_to_u_2_byte(mp->cur_write_speed)); - if (mp->p_len >= 28) { - SVAL("Rotational control selected", rotctl[mp->rot_ctl_sel]); - } - VAL("Buffer size in KB", mp->buffer_size); - - if (mp->p_len >= 24) { - VAL("Copy management revision supported", mp->copy_man_rev); - } - - if (mp->p_len >= 28) { - struct cd_wr_speed_performance *pp; - Uint ndesc; - Uint i; - Uint n; - - ndesc = a_to_u_2_byte(mp->num_wr_speed_des); - pp = mp->wr_speed_des; - printf(" Number of supported write speeds: %d\n", ndesc); - for (i = 0; i < ndesc; i++, pp++) { - printf(" Write speed # %d:", i); - n = a_to_u_2_byte(pp->wr_speed_supp); - printf(" %5d kB/s", n); - printf(" %s", rotctl[pp->rot_ctl_sel]); - printf(" (CD %3ux,", n/176); - printf(" DVD %2ux,", n/1385); - printf(" BD %2ux)\n", n/4495); - } - } - - /* Generic SCSI-3/mmc CD */ -} - -EXPORT int -verify(scgp, start, count, bad_block) - SCSI *scgp; - long start; - int count; - long *bad_block; -{ - register struct scg_cmd *scmd = scgp->scmd; - - fillbytes((caddr_t)scmd, sizeof (*scmd), '\0'); - scmd->addr = (caddr_t)0; - scmd->size = 0; - scmd->flags = SCG_DISRE_ENA; - scmd->cdb_len = SC_G1_CDBLEN; - scmd->sense_len = CCS_SENSE_LEN; - scmd->cdb.g1_cdb.cmd = 0x2F; /* Verify */ - scmd->cdb.g1_cdb.lun = scg_lun(scgp); - g1_cdbaddr(&scmd->cdb.g1_cdb, start); - g1_cdblen(&scmd->cdb.g1_cdb, count); - - scgp->cmdname = "verify"; - - if (scg_cmd(scgp) < 0) { - if (scmd->sense.code >= 0x70) { /* extended Sense */ - *bad_block = - a_to_4_byte(&((struct scsi_ext_sense *) - &scmd->sense)->info_1); - } else { - *bad_block = a_to_u_3_byte(&scmd->sense.high_addr); - } - return (-1); - } - return (0); -} diff -Nru cdrtools-2.01.01a33/cdda2wav/scsi_cmds.c cdrtools-3.02a09/cdda2wav/scsi_cmds.c --- cdrtools-2.01.01a33/cdda2wav/scsi_cmds.c 2006-10-29 12:18:04.000000000 +0000 +++ cdrtools-3.02a09/cdda2wav/scsi_cmds.c 2016-02-14 21:53:41.000000000 +0000 @@ -1,7 +1,8 @@ -/* @(#)scsi_cmds.c 1.38 06/10/29 Copyright 1998-2002 Heiko Eissfeldt, Copyright 2004-2006 J. Schilling */ +/* @(#)scsi_cmds.c 1.56 16/02/14 Copyright 1998-2002,2015 Heiko Eissfeldt, Copyright 2004-2015 J. Schilling */ +#include "config.h" #ifndef lint -static char sccsid[] = -"@(#)scsi_cmds.c 1.38 06/10/29 Copyright 1998-2002 Heiko Eissfeldt, Copyright 2004-2006 J. Schilling"; +static UConst char sccsid[] = +"@(#)scsi_cmds.c 1.56 16/02/14 Copyright 1998-2002,2015 Heiko Eissfeldt, Copyright 2004-2015 J. Schilling"; #endif /* * file for all SCSI commands @@ -14,6 +15,8 @@ * with the License. * * See the file CDDL.Schily.txt in this distribution for details. + * A copy of the CDDL is also available via the Internet at + * http://www.opensource.org/licenses/cddl1.txt * * When distributing Covered Code, include this CDDL HEADER in each * file and include the License file CDDL.Schily.txt from this distribution. @@ -24,11 +27,13 @@ #define TESTSUBQFALLBACK 0 #include "config.h" -#include +#include #include +#include #include #include #include +#include #include @@ -53,9 +58,9 @@ #include "scsi_cmds.h" #include "exitcodes.h" -unsigned char *bufferTOC; -subq_chnl *SubQbuffer; -unsigned char *cmd; +unsigned char *bufferTOC; /* Global TOC data buffer */ +int bufTOCsize; /* Size of global TOC buffer */ +subq_chnl *SubQbuffer; /* Global Sub-channel buffer */ static unsigned ReadFullTOCSony __PR((SCSI *scgp)); static unsigned ReadFullTOCMMC __PR((SCSI *scgp)); @@ -128,7 +133,7 @@ modesense = malloc(12); if (modesense == NULL) { errmsg( - "Cannot allocate memory for mode sense command in line %d.\n", + _("Cannot allocate memory for mode sense command in line %d.\n"), __LINE__); return (0); } @@ -138,9 +143,9 @@ * do the scsi cmd */ if (scgp->verbose) - fprintf(stderr, "\nget density and sector size..."); + fprintf(stderr, _("\nget density and sector size...")); if (mode_sense(scgp, modesense, 12, 0x01, 0) < 0) - fprintf(stderr, "get_orig_sectorsize mode sense failed\n"); + fprintf(stderr, _("get_orig_sectorsize mode sense failed\n")); /* * FIXME: some drives dont deliver block descriptors !!! @@ -192,13 +197,13 @@ mode[11] = secsize & 0xFF; /* block length lsb */ if (scgp->verbose) - fprintf(stderr, "\nset density and sector size..."); + fprintf(stderr, _("\nset density and sector size...")); /* * do the scsi cmd */ if ((retval = mode_select(scgp, mode, 12, 0, scgp->inq->data_format >= 2)) < 0) - errmsgno(EX_BAD, "Setting sector size failed.\n"); + errmsgno(EX_BAD, _("Setting sector size failed.\n")); return (retval); } @@ -271,13 +276,13 @@ if (scgp->verbose) { fprintf(stderr, - "\nset density/sector size (EnableCddaModeSelect)...\n"); + _("\nset density/sector size (EnableCddaModeSelect)...\n")); } /* * do the scsi cmd */ if (mode_select(scgp, mode, 12, 0, scgp->inq->data_format >= 2) < 0) - errmsgno(EX_BAD, "Audio mode switch failed.\n"); + errmsgno(EX_BAD, _("Audio mode switch failed.\n")); } @@ -295,11 +300,15 @@ * READTOC, MSF, format, res, res, res, Start track/session, len msb, * len lsb, control */ - unsigned char *p = bufferTOC; + unsigned char *p = (unsigned char *)global.buf; register struct scg_cmd *scmd = scgp->scmd; + scgp->silent++; + unit_ready(scgp); + scgp->silent--; + fillbytes((caddr_t)scmd, sizeof (*scmd), '\0'); - scmd->addr = (caddr_t)bufferTOC; + scmd->addr = (caddr_t)global.buf; scmd->size = 4; scmd->flags = SCG_RECV_DATA|SCG_DISRE_ENA; scmd->cdb_len = SC_G1_CDBLEN; @@ -312,7 +321,7 @@ scgp->silent++; if (scgp->verbose) - fprintf(stderr, "\nRead TOC CD Text size ..."); + fprintf(stderr, _("\nRead TOC CD Text size ...")); scgp->cmdname = "read toc size (text)"; @@ -320,7 +329,7 @@ scgp->silent--; if (global.quiet != 1) { errmsgno(EX_BAD, - "Read TOC CD Text failed (probably not supported).\n"); + _("Read TOC CD Text failed (probably not supported).\n")); } p[0] = p[1] = '\0'; return; @@ -330,10 +339,17 @@ datalength = (p[0] << 8) | (p[1]); if (datalength <= 2) return; + datalength += 2; + if ((datalength) > global.bufsize) + datalength = global.bufsize; + + scgp->silent++; + unit_ready(scgp); + scgp->silent--; fillbytes((caddr_t)scmd, sizeof (*scmd), '\0'); - scmd->addr = (caddr_t)bufferTOC; - scmd->size = 2+datalength; + scmd->addr = (caddr_t)global.buf; + scmd->size = datalength; scmd->flags = SCG_RECV_DATA|SCG_DISRE_ENA; scmd->cdb_len = SC_G1_CDBLEN; scmd->sense_len = CCS_SENSE_LEN; @@ -341,22 +357,23 @@ scmd->cdb.g1_cdb.lun = scg_lun(scgp); scmd->cdb.g1_cdb.addr[0] = 5; /* format field */ scmd->cdb.g1_cdb.res6 = 0; /* track/session is reserved */ - g1_cdblen(&scmd->cdb.g1_cdb, 2+datalength); + g1_cdblen(&scmd->cdb.g1_cdb, datalength); scgp->silent++; if (scgp->verbose) { fprintf(stderr, - "\nRead TOC CD Text data (length %d)...", (int)(2+datalength)); + _("\nRead TOC CD Text data (length %d)..."), (int)datalength); } scgp->cmdname = "read toc data (text)"; if (scg_cmd(scgp) < 0) { - scgp->silent--; if (global.quiet != 1) { errmsgno(EX_BAD, - "Read TOC CD Text data failed (probably not supported).\n"); + _("Read TOC CD Text data failed (probably not supported).\n")); } p[0] = p[1] = '\0'; + unit_ready(scgp); + scgp->silent--; return; } scgp->silent--; @@ -369,14 +386,14 @@ /*fp = fopen("celine.cdtext", "rb");*/ fp = fopen("japan.cdtext", "rb"); if (fp == NULL) { - errmsg("Cannot open '%s'.\n", "japan.cdtext"); + errmsg(_("Cannot open '%s'.\n"), "japan.cdtext"); return; } - fillbytes(bufferTOC, CD_FRAMESIZE, '\0'); - read_ = fread(bufferTOC, 1, CD_FRAMESIZE, fp); - fprintf(stderr, "read %d bytes. sizeof(bufferTOC)=%u\n", - read_, CD_FRAMESIZE); - datalength = (bufferTOC[0] << 8) | (bufferTOC[1]); + fillbytes(global.buf, global.bufsize, '\0'); + read_ = fread(global.buf, 1, global.bufsize, fp); + fprintf(stderr, _("read %d bytes. sizeof(buffer)=%u\n"), + read_, global.bufsize); + datalength = ((global.buf[0] & 0xFF) << 8) | (global.buf[1] & 0xFF) + 2; fclose(fp); } #endif @@ -396,6 +413,10 @@ register struct scg_cmd *scmd = scgp->scmd; unsigned tracks = 99; + scgp->silent++; + unit_ready(scgp); + scgp->silent--; + fillbytes((caddr_t)scmd, sizeof (*scmd), '\0'); scmd->addr = (caddr_t)bufferTOC; scmd->size = 4 + (3 + tracks + 6) * 11; @@ -410,16 +431,17 @@ scgp->silent++; if (scgp->verbose) - fprintf(stderr, "\nRead Full TOC Sony ..."); + fprintf(stderr, _("\nRead Full TOC Sony ...")); scgp->cmdname = "read full toc sony"; if (scg_cmd(scgp) < 0) { - scgp->silent--; if (global.quiet != 1) { errmsgno(EX_BAD, - "Read Full TOC Sony failed (probably not supported).\n"); + _("Read Full TOC Sony failed (probably not supported).\n")); } + unit_ready(scgp); + scgp->silent--; return (0); } scgp->silent--; @@ -460,7 +482,7 @@ return (ad->zero*1053696 + ad->mins*60*75 + ad->secs*75 + ad->frame); } -struct tocdesc { +struct tocdesc_old { unsigned char session; unsigned char adrctl; unsigned char tno; @@ -469,6 +491,31 @@ struct zmsf_address padr2; }; +struct tocdesc { + unsigned char session; + unsigned char adrctl; + unsigned char tno; + unsigned char point; + + unsigned char mins; + unsigned char secs; + unsigned char frame; + unsigned char zero; + unsigned char pmins; + unsigned char psecs; + unsigned char pframe; +}; + +#if 0 +struct outer_old { + unsigned char len_msb; + unsigned char len_lsb; + unsigned char first_track; + unsigned char last_track; + struct tocdesc_old ent[1]; +}; +#endif + struct outer { unsigned char len_msb; unsigned char len_lsb; @@ -477,6 +524,15 @@ struct tocdesc ent[1]; }; +/* + * Do address computation and return the address of "struct tocdesc" for + * track #i. + * + * As struct tocdesc is 11 bytes long, this structure is tail padded to + * 12 bytes by MC-680x0 compilers, so we cannot give this task to the compiler. + */ +#define toc_addr(op, i) ((struct tocdesc *)(((char *)&((op)->ent[0])) + (i)*11)) + static unsigned long first_session_leadout = 0; static unsigned collect_tracks __PR((struct outer *po, unsigned entries, @@ -495,6 +551,7 @@ unsigned leadout_start_orig; unsigned leadout_start; unsigned max_leadout = 0; + struct tocdesc *ep; #ifdef DEBUG_FULLTOC for (i = 0; i < entries; i++) { @@ -525,57 +582,59 @@ leadout_start = 0; for (i = 0; i < entries; i++) { + ep = toc_addr(po, i); /* Get struct tocdesc * for Track #i */ + #ifdef WARN_FULLTOC - if (po->ent[i].tno != 0) { - fprintf(stderr, "entry %d, tno is not 0: %d!\n", - i, po->ent[i].tno); + if (ep->tno != 0) { + fprintf(stderr, _("entry %d, tno is not 0: %d!\n"), + i, ep->tno); } #endif if (bcd_flag) { - po->ent[i].session = from_bcd(po->ent[i].session); - po->ent[i].adr1.mins = from_bcd(po->ent[i].adr1.mins); - po->ent[i].adr1.secs = from_bcd(po->ent[i].adr1.secs); - po->ent[i].adr1.frame = from_bcd(po->ent[i].adr1.frame); - po->ent[i].padr2.mins = from_bcd(po->ent[i].padr2.mins); - po->ent[i].padr2.secs = from_bcd(po->ent[i].padr2.secs); - po->ent[i].padr2.frame = from_bcd(po->ent[i].padr2.frame); + ep->session = from_bcd(ep->session); + ep->mins = from_bcd(ep->mins); + ep->secs = from_bcd(ep->secs); + ep->frame = from_bcd(ep->frame); + ep->pmins = from_bcd(ep->pmins); + ep->psecs = from_bcd(ep->psecs); + ep->pframe = from_bcd(ep->pframe); } - switch (po->ent[i].point) { + switch (ep->point) { case 0xa0: /* * check if session is monotonous increasing */ - if (session+1 == po->ent[i].session) { - session = po->ent[i].session; + if (session+1 == ep->session) { + session = ep->session; } #ifdef WARN_FULLTOC else { fprintf(stderr, - "entry %d, session anomaly %d != %d!\n", - i, session+1, po->ent[i].session); + _("entry %d, session anomaly %d != %d!\n"), + i, session+1, ep->session); } /* * check the adrctl field */ - if (0x10 != (po->ent[i].adrctl & 0x10)) { + if (0x10 != (ep->adrctl & 0x10)) { fprintf(stderr, - "entry %d, incorrect adrctl field %x!\n", - i, po->ent[i].adrctl); + _("entry %d, incorrect adrctl field %x!\n"), + i, ep->adrctl); } #endif /* * first track number */ - if (bufferTOC[2] < po->ent[i].padr2.mins && - bufferTOC[3] < po->ent[i].padr2.mins) { - bufferTOC[2] = po->ent[i].padr2.mins; + if (bufferTOC[2] < ep->pmins && + bufferTOC[3] < ep->pmins) { + bufferTOC[2] = ep->pmins; } #ifdef WARN_FULLTOC else fprintf(stderr, -"entry %d, session %d: start tracknumber anomaly: %d <= %d,%d(last)!\n", - i, session, po->ent[i].padr2.mins, +_("entry %d, session %d: start tracknumber anomaly: %d <= %d,%d(last)!\n"), + i, session, ep->pmins, bufferTOC[2], bufferTOC[3]); #endif break; @@ -585,33 +644,33 @@ /* * check if session is constant */ - if (session != po->ent[i].session) { + if (session != ep->session) { fprintf(stderr, - "entry %d, session anomaly %d != %d!\n", - i, session, po->ent[i].session); + _("entry %d, session anomaly %d != %d!\n"), + i, session, ep->session); } /* * check the adrctl field */ - if (0x10 != (po->ent[i].adrctl & 0x10)) { + if (0x10 != (ep->adrctl & 0x10)) { fprintf(stderr, - "entry %d, incorrect adrctl field %x!\n", - i, po->ent[i].adrctl); + _("entry %d, incorrect adrctl field %x!\n"), + i, ep->adrctl); } #endif /* * last track number */ - if (bufferTOC[2] <= po->ent[i].padr2.mins && - bufferTOC[3] < po->ent[i].padr2.mins) { - bufferTOC[3] = po->ent[i].padr2.mins; + if (bufferTOC[2] <= ep->pmins && + bufferTOC[3] < ep->pmins) { + bufferTOC[3] = ep->pmins; } #ifdef WARN_FULLTOC else fprintf(stderr, -"entry %d, session %d: end tracknumber anomaly: %d <= %d,%d(last)!\n", - i, session, po->ent[i].padr2.mins, +_("entry %d, session %d: end tracknumber anomaly: %d <= %d,%d(last)!\n"), + i, session, ep->pmins, bufferTOC[2], bufferTOC[3]); #endif break; @@ -621,19 +680,19 @@ /* * check if session is constant */ - if (session != po->ent[i].session) { + if (session != ep->session) { fprintf(stderr, - "entry %d, session anomaly %d != %d!\n", - i, session, po->ent[i].session); + _("entry %d, session anomaly %d != %d!\n"), + i, session, ep->session); } /* * check the adrctl field */ - if (0x10 != (po->ent[i].adrctl & 0x10)) { + if (0x10 != (ep->adrctl & 0x10)) { fprintf(stderr, - "entry %d, incorrect adrctl field %x!\n", - i, po->ent[i].adrctl); + _("entry %d, incorrect adrctl field %x!\n"), + i, ep->adrctl); } #endif /* @@ -641,7 +700,7 @@ */ { unsigned leadout_start_tmp = - dvd_lba(&po->ent[i].padr2); + dvd_lba((struct zmsf_address *)&ep->zero); if (first_session_leadout == 0) { first_session_leadout = leadout_start_tmp @@ -654,7 +713,7 @@ #ifdef WARN_FULLTOC else fprintf(stderr, - "entry %d, leadout position anomaly %u!\n", + _("entry %d, leadout position anomaly %u!\n"), i, leadout_start_tmp); #endif } @@ -665,44 +724,44 @@ /* * check if session is constant */ - if (session != po->ent[i].session) { + if (session != ep->session) { fprintf(stderr, - "entry %d, session anomaly %d != %d!\n", - i, session, po->ent[i].session); + _("entry %d, session anomaly %d != %d!\n"), + i, session, ep->session); } /* * check the adrctl field */ - if (0x50 != (po->ent[i].adrctl & 0x50)) { + if (0x50 != (ep->adrctl & 0x50)) { fprintf(stderr, - "entry %d, incorrect adrctl field %x!\n", - i, po->ent[i].adrctl); + _("entry %d, incorrect adrctl field %x!\n"), + i, ep->adrctl); } /* * check the next program area */ - if (lba(&po->ent[i].adr1) < 6750 + leadout_start) { + if (lba((struct msf_address *)&ep->mins) < 6750 + leadout_start) { fprintf(stderr, -"entry %d, next program area %u < leadout_start + 6750 = %u!\n", - i, lba(&po->ent[i].adr1), +_("entry %d, next program area %u < leadout_start + 6750 = %u!\n"), + i, lba((struct msf_address *)&ep->mins), 6750 + leadout_start); } /* * check the maximum leadout_start */ - if (max_leadout != 0 && dvd_lba(&po->ent[i].padr2) != + if (max_leadout != 0 && dvd_lba((struct zmsf_address *)&ep->zero) != max_leadout) { fprintf(stderr, -"entry %d, max leadout_start %u != last max_leadout_start %u!\n", - i, dvd_lba(&po->ent[i].padr2), +_("entry %d, max leadout_start %u != last max_leadout_start %u!\n"), + i, dvd_lba((struct zmsf_address *)&ep->zero), max_leadout); } #endif if (max_leadout == 0) - max_leadout = dvd_lba(&po->ent[i].padr2); + max_leadout = dvd_lba((struct zmsf_address *)&ep->zero); break; case 0xb1: @@ -719,11 +778,11 @@ /* * check if session is constant */ - if (session != po->ent[i].session) { + if (session != ep->session) { #ifdef WARN_FULLTOC fprintf(stderr, - "entry %d, session anomaly %d != %d!\n", - i, session, po->ent[i].session); + _("entry %d, session anomaly %d != %d!\n"), + i, session, ep->session); #endif continue; } @@ -732,21 +791,21 @@ * check tno */ if (bcd_flag) - po->ent[i].point = from_bcd(po->ent[i].point); + ep->point = from_bcd(ep->point); - if (po->ent[i].point < bufferTOC[2] || - po->ent[i].point > bufferTOC[3]) { + if (ep->point < bufferTOC[2] || + ep->point > bufferTOC[3]) { #ifdef WARN_FULLTOC fprintf(stderr, - "entry %d, track number anomaly %d - %d - %d!\n", - i, bufferTOC[2], po->ent[i].point, + _("entry %d, track number anomaly %d - %d - %d!\n"), + i, bufferTOC[2], ep->point, bufferTOC[3]); #endif } else { /* * check start position */ - unsigned trackstart = dvd_lba(&po->ent[i].padr2); + unsigned trackstart = dvd_lba((struct zmsf_address *)&ep->zero); /* * correct illegal leadouts @@ -758,15 +817,14 @@ trackstart >= leadout_start) { #ifdef WARN_FULLTOC fprintf(stderr, -"entry %d, track %d start position anomaly %d - %d - %d!\n", - i, po->ent[i].point, +_("entry %d, track %d start position anomaly %d - %d - %d!\n"), + i, ep->point, last_start, trackstart, leadout_start); #endif } else { last_start = trackstart; - memcpy(&po->ent[tracks], &po->ent[i], - sizeof (struct tocdesc)); + memcpy(toc_addr(po, tracks), ep, 11); tracks++; } } @@ -776,17 +834,18 @@ /* * patch leadout track */ - po->ent[tracks].session = session; - po->ent[tracks].adrctl = 0x10; - po->ent[tracks].tno = 0; - po->ent[tracks].point = 0xAA; - po->ent[tracks].adr1.mins = 0; - po->ent[tracks].adr1.secs = 0; - po->ent[tracks].adr1.frame = 0; - po->ent[tracks].padr2.zero = leadout_start_orig / (1053696); - po->ent[tracks].padr2.mins = (leadout_start_orig / (60*75)) % 100; - po->ent[tracks].padr2.secs = (leadout_start_orig / 75) % 60; - po->ent[tracks].padr2.frame = leadout_start_orig % 75; + ep = toc_addr(po, tracks); /* Get struct tocdesc * for lead-out */ + ep->session = session; + ep->adrctl = 0x10; + ep->tno = 0; + ep->point = 0xAA; + ep->mins = 0; + ep->secs = 0; + ep->frame = 0; + ep->zero = leadout_start_orig / (1053696); + ep->pmins = (leadout_start_orig / (60*75)) % 100; + ep->psecs = (leadout_start_orig / 75) % 60; + ep->pframe = leadout_start_orig % 75; tracks++; /* @@ -926,11 +985,15 @@ * len lsb, control */ register struct scg_cmd *scmd = scgp->scmd; - unsigned tracks = 99; + int len; + + scgp->silent++; + unit_ready(scgp); + scgp->silent--; fillbytes((caddr_t)scmd, sizeof (*scmd), '\0'); scmd->addr = (caddr_t)bufferTOC; - scmd->size = 4 + (tracks + 8) * 11; + scmd->size = 0; scmd->flags = SCG_RECV_DATA|SCG_DISRE_ENA; scmd->cdb_len = SC_G1_CDBLEN; scmd->sense_len = CCS_SENSE_LEN; @@ -938,18 +1001,20 @@ scmd->cdb.g1_cdb.lun = scg_lun(scgp); scmd->cdb.g1_cdb.addr[0] = 2; /* format */ scmd->cdb.g1_cdb.res6 = 1; /* session */ - g1_cdblen(&scmd->cdb.g1_cdb, 4 + (tracks + 8) * 11); + g1_cdblen(&scmd->cdb.g1_cdb, 0); scgp->silent++; if (scgp->verbose) - fprintf(stderr, "\nRead Full TOC MMC..."); + fprintf(stderr, _("\nRead Full TOC MMC...")); scgp->cmdname = "read full toc mmc"; + scmd->size = 4; + g1_cdblen(&scmd->cdb.g1_cdb, 4); if (scg_cmd(scgp) < 0) { if (global.quiet != 1) { errmsgno(EX_BAD, - "Read Full TOC MMC failed (probably not supported).\n"); + _("Read Full TOC MMC failed (probably not supported).\n")); } /* XXX was ist das ??? */ #ifdef B_BEOS_VERSION @@ -958,6 +1023,24 @@ return (0); #endif } + len = (unsigned)((bufferTOC[0] << 8) | bufferTOC[1]) + 2; + /* + * XXX there is a bug in some ASPI versions that + * XXX cause a hang with odd transfer lengths. + * XXX We should workaround the problem where it exists + * XXX but the problem may exist elsewhere too. + */ + if (len & 1) + len++; + scmd->size = len; + g1_cdblen(&scmd->cdb.g1_cdb, len); + + if (scg_cmd(scgp) < 0) { + unit_ready(scgp); + scgp->silent--; + return (0); + } + scgp->silent--; return ((unsigned)((bufferTOC[0] << 8) | bufferTOC[1])); @@ -1034,6 +1117,10 @@ */ register struct scg_cmd *scmd = scgp->scmd; + scgp->silent++; + unit_ready(scgp); + scgp->silent--; + fillbytes((caddr_t)scmd, sizeof (*scmd), '\0'); scmd->addr = (caddr_t)bufferTOC; scmd->size = 4; @@ -1046,7 +1133,7 @@ g1_cdblen(&scmd->cdb.g1_cdb, 4); if (scgp->verbose) - fprintf(stderr, "\nRead TOC size (standard)..."); + fprintf(stderr, _("\nRead TOC size (standard)...")); /* * do the scsi cmd (read table of contents) @@ -1054,7 +1141,11 @@ scgp->cmdname = "read toc size"; if (scg_cmd(scgp) < 0) - FatalError(EX_BAD, "Read TOC size failed.\n"); + FatalError(EX_BAD, _("Read TOC size failed.\n")); + + scgp->silent++; + unit_ready(scgp); + scgp->silent--; tracks = ((bufferTOC [3]) - bufferTOC [2] + 2); if (tracks > MAXTRK) @@ -1076,7 +1167,7 @@ g1_cdblen(&scmd->cdb.g1_cdb, 4 + tracks * 8); if (scgp->verbose) - fprintf(stderr, "\nRead TOC tracks (standard MSF)..."); + fprintf(stderr, _("\nRead TOC tracks (standard MSF)...")); /* * do the scsi cmd (read table of contents) */ @@ -1088,6 +1179,10 @@ * MSF format did not succeeded */ memset(bufferTOCMSF, 0, sizeof (bufferTOCMSF)); + + scgp->silent++; + unit_ready(scgp); + scgp->silent--; } else { int i; @@ -1114,6 +1209,10 @@ /* * LBA format for cd burners like Philips CD-522 */ + scgp->silent++; + unit_ready(scgp); + scgp->silent--; + fillbytes((caddr_t)scmd, sizeof (*scmd), '\0'); scmd->addr = (caddr_t)bufferTOC; scmd->size = 4 + tracks * 8; @@ -1127,15 +1226,19 @@ g1_cdblen(&scmd->cdb.g1_cdb, 4 + tracks * 8); if (scgp->verbose) - fprintf(stderr, "\nRead TOC tracks (standard LBA)..."); + fprintf(stderr, _("\nRead TOC tracks (standard LBA)...")); /* * do the scsi cmd (read table of contents) */ scgp->cmdname = "read toc tracks "; if (scg_cmd(scgp) < 0) { - FatalError(EX_BAD, "Read TOC tracks (lba) failed.\n"); + FatalError(EX_BAD, _("Read TOC tracks (lba) failed.\n")); } + scgp->silent++; + unit_ready(scgp); + scgp->silent--; + { int i; @@ -1197,7 +1300,7 @@ g1_cdblen(&scmd->cdb.g1_cdb, SectorBurstVal); if (scgp->verbose) { - fprintf(stderr, "\nReadStandard10 %s (%u)...", + fprintf(stderr, _("\nReadStandard10 %s (%u)..."), secsize > 2048 ? "CDDA" : "CD_DATA", secsize); } scgp->cmdname = "ReadStandard10"; @@ -1263,7 +1366,7 @@ g1_cdbaddr(&scmd->cdb.g1_cdb, lSector); g1_cdblen(&scmd->cdb.g1_cdb, SectorBurstVal); if (scgp->verbose) - fprintf(stderr, "\nReadNEC10 CDDA..."); + fprintf(stderr, _("\nReadNEC10 CDDA...")); scgp->cmdname = "Read10 NEC"; @@ -1303,12 +1406,16 @@ g5_cdblen(&scmd->cdb.g5_cdb, SectorBurstVal); if (scgp->verbose) - fprintf(stderr, "\nReadSony12 CDDA..."); + fprintf(stderr, _("\nReadSony12 CDDA...")); scgp->cmdname = "Read12"; - if (scg_cmd(scgp)) + if (scg_cmd(scgp) < 0) { + scgp->silent++; + unit_ready(scgp); + scgp->silent--; return (0); + } /* * has all or something been read? @@ -1320,6 +1427,50 @@ * Read max. SectorBurst of cdda sectors to buffer * via vendor-specific ReadCdda(12) command */ +int +ReadCdda12_C2(scgp, p, lSector, SectorBurstVal) + SCSI *scgp; + UINT4 *p; + unsigned lSector; + unsigned SectorBurstVal; +{ + register struct scg_cmd *scmd = scgp->scmd; + + fillbytes((caddr_t)scmd, sizeof (*scmd), '\0'); + scmd->addr = (caddr_t)p; + scmd->size = SectorBurstVal*CD_FRAMESIZE_RAWER; + scmd->flags = SCG_RECV_DATA|SCG_DISRE_ENA; + scmd->cdb_len = SC_G5_CDBLEN; + scmd->sense_len = CCS_SENSE_LEN; + scmd->cdb.g5_cdb.cmd = 0xd8; /* read audio command */ + scmd->cdb.g5_cdb.lun = scg_lun(scgp); + scmd->cdb.g5_cdb.res |= (accepts_fua_bit == 1 ? 1 << 2 : 0); + scmd->cdb.g5_cdb.res10 = 0x04; /* With C2 errors */ + g5_cdbaddr(&scmd->cdb.g5_cdb, lSector); + g5_cdblen(&scmd->cdb.g5_cdb, SectorBurstVal); + + if (scgp->verbose) + fprintf(stderr, _("\nReadSony12 CDDA C2...")); + + scgp->cmdname = "Read12 C2"; + + if (scg_cmd(scgp) < 0) { + scgp->silent++; + unit_ready(scgp); + scgp->silent--; + return (0); + } + + /* + * has all or something been read? + */ + return (SectorBurstVal - scg_getresid(scgp)/CD_FRAMESIZE_RAWER); +} + +/* + * Read max. SectorBurst of cdda sectors to buffer + * via vendor-specific ReadCdda(12) command + */ /* * It uses a 12 Byte CDB with 0xd4 as opcode, the start sector is coded as * normal and the number of sectors is coded in Byte 8 and 9 (begining with 0). @@ -1346,7 +1497,7 @@ g5_cdblen(&scmd->cdb.g5_cdb, SectorBurstVal); if (scgp->verbose) - fprintf(stderr, "\nReadMatsushita12 CDDA..."); + fprintf(stderr, _("\nReadMatsushita12 CDDA...")); scgp->cmdname = "Read12Matsushita"; @@ -1388,12 +1539,16 @@ scmd->cdb.g5_cdb.count[3] = 1 << 4; /* User data */ if (scgp->verbose) - fprintf(stderr, "\nReadMMC12 CDDA..."); + fprintf(stderr, _("\nReadMMC12 CDDA...")); scgp->cmdname = "ReadCD MMC 12"; - if (scg_cmd(scgp)) + if (scg_cmd(scgp) < 0) { + scgp->silent++; + unit_ready(scgp); + scgp->silent--; return (0); + } /* * has all or something been read? @@ -1401,6 +1556,64 @@ return (SectorBurstVal - scg_getresid(scgp)/CD_FRAMESIZE_RAW); } +/* + * Read max. SectorBurst of cdda sectors to buffer + * via MMC standard READ CD command + */ +int +ReadCddaMMC12_C2(scgp, p, lSector, SectorBurstVal) + SCSI *scgp; + UINT4 *p; + unsigned lSector; + unsigned SectorBurstVal; +{ + register struct scg_cmd *scmd; + + scmd = scgp->scmd; + + fillbytes((caddr_t)scmd, sizeof (*scmd), '\0'); + scmd->addr = (caddr_t)p; + scmd->size = SectorBurstVal*CD_FRAMESIZE_RAWER; + scmd->flags = SCG_RECV_DATA|SCG_DISRE_ENA; + scmd->cdb_len = SC_G5_CDBLEN; + scmd->sense_len = CCS_SENSE_LEN; + scmd->cdb.g5_cdb.cmd = 0xbe; /* read cd command */ + scmd->cdb.g5_cdb.lun = scg_lun(scgp); + scmd->cdb.g5_cdb.res = 1 << 1; /* expected sector type field CDDA */ + g5_cdbaddr(&scmd->cdb.g5_cdb, lSector); + g5x_cdblen(&scmd->cdb.g5_cdb, SectorBurstVal); + scmd->cdb.g5_cdb.count[3] = 1 << 4; /* User data */ + scmd->cdb.g5_cdb.count[3] |= 1 << 1; /* C2 */ + + if (scgp->verbose) + fprintf(stderr, _("\nReadMMC12 CDDA C2...")); + + scgp->cmdname = "ReadCD MMC 12 C2"; + + scgp->silent++; + if (scg_cmd(scgp) < 0) { + /* + * if the command is not available, disable this method + * by setting the ReadCdRom_C2 pointer to NULL. + */ + if (scg_sense_key(scgp) == 0x05 && + scg_sense_code(scgp) == 0x24 && + scg_sense_qual(scgp) == 0x00) { + ReadCdRom_C2 = NULL; + } + unit_ready(scgp); + + scgp->silent--; + return (0); + } + scgp->silent--; + + /* + * has all or something been read? + */ + return (SectorBurstVal - scg_getresid(scgp)/CD_FRAMESIZE_RAWER); +} + int ReadCddaFallbackMMC(scgp, p, lSector, SectorBurstVal) SCSI *scgp; @@ -1430,9 +1643,65 @@ return (retval); } +int +ReadCddaFallbackMMC_C2(scgp, p, lSector, SectorBurstVal) + SCSI *scgp; + UINT4 *p; + unsigned lSector; + unsigned SectorBurstVal; +{ +static int ReadCdda12_C2_unknown = 0; + int retval = -999; + + scgp->silent++; + if (ReadCdda12_C2_unknown || + ((retval = ReadCdda12_C2(scgp, p, lSector, SectorBurstVal)) <= 0)) { + /* + * if the command is not available, use the regular + * MMC ReadCd + */ + if (retval <= 0 && scg_sense_key(scgp) == 0x05) { + ReadCdda12_C2_unknown = 1; + } + scgp->silent--; + ReadCdRom_C2 = ReadCddaMMC12_C2; + return (ReadCddaMMC12_C2(scgp, p, lSector, SectorBurstVal)); + } + scgp->silent--; + return (retval); +} + +int +ReadCddaNoFallback_C2(scgp, p, lSector, SectorBurstVal) + SCSI *scgp; + UINT4 *p; + unsigned lSector; + unsigned SectorBurstVal; +{ +static int ReadCdda12_C2_unknown = 0; + int retval = -999; + + scgp->silent++; + if (ReadCdda12_C2_unknown || + ((retval = ReadCdda12_C2(scgp, p, lSector, SectorBurstVal)) <= 0)) { + /* + * if the command is not available, disable this method + * by setting the ReadCdRom_C2 pointer to NULL. + */ + if (retval <= 0 && scg_sense_key(scgp) == 0x05 && + scg_sense_code(scgp) == 0x24 && + scg_sense_qual(scgp) == 0x00) { + ReadCdda12_C2_unknown = 1; + } + ReadCdRom_C2 = NULL; + } + scgp->silent--; + return (retval); +} + /* * Read the Sub-Q-Channel to SubQbuffer. This is the method for - * drives that do not support subchannel parameters. + * drives thp->sectsizeat do not support subchannel parameters. */ #ifdef PROTOTYPES static subq_chnl * @@ -1462,12 +1731,12 @@ g1_cdblen(&scmd->cdb.g1_cdb, 24); if (scgp->verbose) - fprintf(stderr, "\nRead Subchannel_dumb..."); + fprintf(stderr, _("\nRead Subchannel_dumb...")); scgp->cmdname = "Read Subchannel_dumb"; if (scg_cmd(scgp) < 0) { - errmsgno(EX_BAD, "Read SubQ failed.\n"); + errmsgno(EX_BAD, _("Read SubQ failed.\n")); } /* @@ -1523,7 +1792,7 @@ default: fprintf(stderr, - "ReadSubQSCSI: unknown format %d\n", sq_format); + _("ReadSubQSCSI: unknown format %d\n"), sq_format); return (NULL); } @@ -1542,7 +1811,7 @@ g1_cdblen(&scmd->cdb.g1_cdb, resp_size); if (scgp->verbose) - fprintf(stderr, "\nRead Subchannel..."); + fprintf(stderr, _("\nRead Subchannel...")); scgp->cmdname = "Read Subchannel"; @@ -1595,12 +1864,16 @@ g5_cdblen(&scmd->cdb.g5_cdb, SectorBurstVal); if (scgp->verbose) - fprintf(stderr, "\nReadSony12 CDDA + SubChannels..."); + fprintf(stderr, _("\nReadSony12 CDDA + SubChannels...")); scgp->cmdname = "Read12SubChannelsSony"; - if (scg_cmd(scgp)) + if (scg_cmd(scgp) < 0) { + scgp->silent++; + unit_ready(scgp); + scgp->silent--; return (-1); + } /* * has all or something been read? @@ -1634,12 +1907,16 @@ g5_cdblen(&scmd->cdb.g5_cdb, SectorBurstVal); if (scgp->verbose) - fprintf(stderr, "\nReadSony12 CDDA + 96 byte SubChannels..."); + fprintf(stderr, _("\nReadSony12 CDDA + 96 byte SubChannels...")); scgp->cmdname = "Read12SubChannelsSony"; - if (scg_cmd(scgp)) + if (scg_cmd(scgp) < 0) { + scgp->silent++; + unit_ready(scgp); + scgp->silent--; return (-1); + } /* * has all or something been read? @@ -1691,12 +1968,16 @@ scmd->cdb.g5_cdb.res10 = 0x02; /* subcode 2 -> cdda + 16 * q sub */ if (scgp->verbose) - fprintf(stderr, "\nReadMMC12 CDDA + SUB..."); + fprintf(stderr, _("\nReadMMC12 CDDA + SUB...")); scgp->cmdname = "ReadCD Sub MMC 12"; - if (scg_cmd(scgp)) + if (scg_cmd(scgp) < 0) { + scgp->silent++; + unit_ready(scgp); + scgp->silent--; return (-1); + } /* * has all or something been read? @@ -1775,7 +2056,6 @@ { static unsigned char mode [4 + 3]; unsigned char *page = mode + 4; - int retval; fillbytes((caddr_t)mode, sizeof (mode), '\0'); /* @@ -1786,15 +2066,14 @@ page[2] = speed; /* 0 for single speed, 1 for double speed (3401) */ if (scgp->verbose) - fprintf(stderr, "\nspeed select Toshiba..."); + fprintf(stderr, _("\nspeed select Toshiba...")); scgp->silent++; /* * do the scsi cmd */ - if ((retval = mode_select(scgp, mode, 7, 0, - scgp->inq->data_format >= 2)) < 0) - fprintf(stderr, "speed select Toshiba failed\n"); + if (mode_select(scgp, mode, 7, 0, scgp->inq->data_format >= 2) < 0) + fprintf(stderr, _("speed select Toshiba failed\n")); scgp->silent--; } @@ -1805,7 +2084,6 @@ { static unsigned char mode [4 + 8]; unsigned char *page = mode + 4; - int retval; register struct scg_cmd *scmd = scgp->scmd; fillbytes((caddr_t)mode, sizeof (mode), '\0'); @@ -1831,15 +2109,15 @@ g1_cdblen(&scmd->cdb.g1_cdb, 12); if (scgp->verbose) - fprintf(stderr, "\nspeed select NEC..."); + fprintf(stderr, _("\nspeed select NEC...")); /* * do the scsi cmd */ scgp->cmdname = "speed select NEC"; - if ((retval = scg_cmd(scgp)) < 0) - errmsgno(EX_BAD, "Speed select NEC failed.\n"); + if (scg_cmd(scgp) < 0) + errmsgno(EX_BAD, _("Speed select NEC failed.\n")); } void @@ -1853,7 +2131,6 @@ */ static unsigned char mode [4 + 8]; unsigned char *page = mode + 4; - int retval; fillbytes((caddr_t)mode, sizeof (mode), '\0'); /* @@ -1865,13 +2142,12 @@ page[3] = 1; if (scgp->verbose) - fprintf(stderr, "\nspeed select Philips..."); + fprintf(stderr, _("\nspeed select Philips...")); /* * do the scsi cmd */ - if ((retval = mode_select(scgp, mode, 12, 0, - scgp->inq->data_format >= 2)) < 0) - errmsgno(EX_BAD, "Speed select PhilipsCDD2600 failed.\n"); + if (mode_select(scgp, mode, 12, 0, scgp->inq->data_format >= 2) < 0) + errmsgno(EX_BAD, _("Speed select PhilipsCDD2600 failed.\n")); } void @@ -1881,7 +2157,6 @@ { static unsigned char mode [4 + 4]; unsigned char *page = mode + 4; - int retval; fillbytes((caddr_t)mode, sizeof (mode), '\0'); /* @@ -1892,14 +2167,13 @@ page[2] = speed; if (scgp->verbose) - fprintf(stderr, "\nspeed select Sony..."); + fprintf(stderr, _("\nspeed select Sony...")); /* * do the scsi cmd */ scgp->silent++; - if ((retval = mode_select(scgp, mode, 8, 0, - scgp->inq->data_format >= 2)) < 0) - errmsgno(EX_BAD, "Speed select Sony failed.\n"); + if (mode_select(scgp, mode, 8, 0, scgp->inq->data_format >= 2) < 0) + errmsgno(EX_BAD, _("Speed select Sony failed.\n")); scgp->silent--; } @@ -1910,7 +2184,6 @@ { static unsigned char mode [4 + 4]; unsigned char *page = mode + 4; - int retval; fillbytes((caddr_t)mode, sizeof (mode), '\0'); /* @@ -1921,13 +2194,12 @@ page[2] = speed; if (scgp->verbose) - fprintf(stderr, "\nspeed select Yamaha..."); + fprintf(stderr, _("\nspeed select Yamaha...")); /* * do the scsi cmd */ - if ((retval = mode_select(scgp, mode, 8, 0, - scgp->inq->data_format >= 2)) < 0) - errmsgno(EX_BAD, "Speed select Yamaha failed.\n"); + if (mode_select(scgp, mode, 8, 0, scgp->inq->data_format >= 2) < 0) + errmsgno(EX_BAD, _("Speed select Yamaha failed.\n")); } void @@ -1953,7 +2225,7 @@ i_to_2_byte(&scmd->cdb.g5_cdb.addr[2], 0xffff); if (scgp->verbose) - fprintf(stderr, "\nspeed select MMC..."); + fprintf(stderr, _("\nspeed select MMC...")); scgp->cmdname = "set cd speed"; @@ -1967,7 +2239,7 @@ */ } else { scg_printerr(scgp); - errmsgno(EX_BAD, "Speed select MMC failed.\n"); + errmsgno(EX_BAD, _("Speed select MMC failed.\n")); } } scgp->silent--; @@ -1987,7 +2259,7 @@ Inqbuffer = malloc(36); if (Inqbuffer == NULL) { errmsg( - "Cannot allocate memory for inquiry command in line %d\n", + _("Cannot allocate memory for inquiry command in line %d\n"), __LINE__); return (NULL); } @@ -2015,7 +2287,7 @@ memcpy(scgp->inq, Inqbuffer, sizeof (*scgp->inq)); if (scgp->verbose) { - scg_prbytes("Inquiry Data :", + scg_prbytes(_("Inquiry Data :"), (Uchar *)Inqbuffer, 22 - scmd->resid); } return (Inqbuffer); @@ -2053,7 +2325,7 @@ scmd->cdb.g0_cdb.lun = scg_lun(scgp); if (scgp->verbose) - fprintf(stderr, "\ntest unit ready..."); + fprintf(stderr, _("\ntest unit ready...")); scgp->silent++; scgp->cmdname = "test unit ready"; @@ -2093,7 +2365,7 @@ scmd->cdb.g0_cdb.lun = scg_lun(scgp); if (scgp->verbose) - fprintf(stderr, "\nstop audio play"); + fprintf(stderr, _("\nstop audio play")); /* * do the scsi cmd @@ -2127,7 +2399,7 @@ scmd->cdb.g1_cdb.count[1] = (from_sector + 150 + sectors) % 75; if (scgp->verbose) - fprintf(stderr, "\nplay sectors..."); + fprintf(stderr, _("\nplay sectors...")); /* * do the scsi cmd @@ -2148,12 +2420,13 @@ { if (scsibuffer != NULL) { errmsgno(EX_BAD, - "The SCSI transfer buffer has already been allocated!\n"); + _("The SCSI transfer buffer has already been allocated!\n")); exit(SETUPSCSI_ERROR); } scsibuffer = scg_getbuf(scgp, amt); if (scsibuffer == NULL) { - errmsg("Could not get SCSI transfer buffer!\n"); + errmsg(_("Could not get SCSI transfer buffer!\n")); exit(SETUPSCSI_ERROR); } + global.buf = scsibuffer; } diff -Nru cdrtools-2.01.01a33/cdda2wav/scsi_cmds.h cdrtools-3.02a09/cdda2wav/scsi_cmds.h --- cdrtools-2.01.01a33/cdda2wav/scsi_cmds.h 2006-10-29 12:41:42.000000000 +0000 +++ cdrtools-3.02a09/cdda2wav/scsi_cmds.h 2015-10-19 19:58:10.000000000 +0000 @@ -1,4 +1,4 @@ -/* @(#)scsi_cmds.h 1.16 06/10/29 Copyright 1998,1999 Heiko Eissfeldt, Copyright 2004-2006 J. Schilling */ +/* @(#)scsi_cmds.h 1.19 15/10/19 Copyright 1998,1999,2015 Heiko Eissfeldt, Copyright 2004-2013 J. Schilling */ /* * header file for scsi_cmds.c */ @@ -9,6 +9,8 @@ * with the License. * * See the file CDDL.Schily.txt in this distribution for details. + * A copy of the CDDL is also available via the Internet at + * http://www.opensource.org/licenses/cddl1.txt * * When distributing Covered Code, include this CDDL HEADER in each * file and include the License file CDDL.Schily.txt from this distribution. @@ -17,8 +19,6 @@ #ifndef _SCSI_CMDS_H #define _SCSI_CMDS_H -extern unsigned char *cmd; - extern int accepts_fua_bit; extern unsigned char density; extern unsigned char orgmode4; @@ -45,12 +45,18 @@ extern int ReadCddaMMC12 __PR((SCSI *scgp, UINT4 *p, unsigned lSector, unsigned SectorBurstVal)); +extern int ReadCddaMMC12_C2 __PR((SCSI *scgp, UINT4 *p, + unsigned lSector, + unsigned SectorBurstVal)); extern int ReadCdda12Matsushita __PR((SCSI *scgp, UINT4 *p, unsigned lSector, unsigned SectorBurstVal)); extern int ReadCdda12 __PR((SCSI *scgp, UINT4 *p, unsigned lSector, unsigned SecorBurstVal)); +extern int ReadCdda12_C2 __PR((SCSI *scgp, UINT4 *p, + unsigned lSector, + unsigned SecorBurstVal)); extern int ReadCdda10 __PR((SCSI *scgp, UINT4 *p, unsigned lSector, unsigned SecorBurstVal)); @@ -63,6 +69,12 @@ extern int ReadCddaFallbackMMC __PR((SCSI *scgp, UINT4 *p, unsigned lSector, unsigned SctorBurstVal)); +extern int ReadCddaFallbackMMC_C2 __PR((SCSI *scgp, UINT4 *p, + unsigned lSector, + unsigned SctorBurstVal)); +extern int ReadCddaNoFallback_C2 __PR((SCSI *scgp, UINT4 *p, + unsigned lSector, + unsigned SctorBurstVal)); extern int ReadCddaSubSony __PR((SCSI *scgp, UINT4 *p, unsigned lSector, unsigned SectorBurstVal)); diff -Nru cdrtools-2.01.01a33/cdda2wav/scsi_scan.c cdrtools-3.02a09/cdda2wav/scsi_scan.c --- cdrtools-2.01.01a33/cdda2wav/scsi_scan.c 2007-07-12 07:04:53.000000000 +0000 +++ cdrtools-3.02a09/cdda2wav/scsi_scan.c 1970-01-01 00:00:00.000000000 +0000 @@ -1,270 +0,0 @@ -/* @(#)scsi_scan.c 1.30 07/07/12 Copyright 1997-2007 J. Schilling */ -#ifndef lint -static char sccsid[] = - "@(#)scsi_scan.c 1.30 07/07/12 Copyright 1997-2007 J. Schilling"; -#endif -/* - * Scan SCSI Bus. - * Stolen from sformat. Need a more general form to - * re-use it in sformat too. - * - * Copyright (c) 1997-2007 J. Schilling - */ -/* - * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. - * - * See the file CDDL.Schily.txt in this distribution for details. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file CDDL.Schily.txt from this distribution. - */ - -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include - -#include "scsi_scan.h" -#include "cdrecord.h" - -LOCAL void print_product __PR((FILE *f, struct scsi_inquiry *ip)); -EXPORT int select_target __PR((SCSI *scgp, FILE *f)); -EXPORT int find_target __PR((SCSI *scgp, int type, int idx)); -LOCAL int _select_target __PR((SCSI *scgp, FILE *f, int type, int idx)); -LOCAL int select_unit __PR((SCSI *scgp, FILE *f)); - -LOCAL void -print_product(f, ip) - FILE *f; - struct scsi_inquiry *ip; -{ - fprintf(f, "'%.8s' ", ip->vendor_info); - fprintf(f, "'%.16s' ", ip->prod_ident); - fprintf(f, "'%.4s' ", ip->prod_revision); - if (ip->add_len < 31) { - fprintf(f, "NON CCS "); - } - scg_fprintdev(f, ip); -} - -EXPORT int -select_target(scgp, f) - SCSI *scgp; - FILE *f; -{ - return (_select_target(scgp, f, -1, -1)); -} - -EXPORT int -find_target(scgp, type, idx) - SCSI *scgp; - int type; - int idx; -{ - return (_select_target(scgp, (FILE *)NULL, type, idx)); -} - -LOCAL int -_select_target(scgp, f, type, idx) - SCSI *scgp; - FILE *f; - int type; - int idx; -{ - int initiator; - int cscsibus = scg_scsibus(scgp); - int ctarget = scg_target(scgp); - int clun = scg_lun(scgp); - int numbus = scg_numbus(scgp); - int n; - int low = -1; - int high = -1; - int amt = -1; - int bus; - int tgt; - int lun = 0; - int err; - BOOL have_tgt; - - if (numbus < 0) - numbus = 1024; - scgp->silent++; - - for (bus = 0; bus < numbus; bus++) { - scg_settarget(scgp, bus, 0, 0); - - if (!scg_havebus(scgp, bus)) - continue; - - initiator = scg_initiator_id(scgp); - if (f) - fprintf(f, "scsibus%d:\n", bus); - - for (tgt = 0; tgt < 16; tgt++) { - n = bus*100 + tgt; - - scg_settarget(scgp, bus, tgt, lun); - seterrno(0); - have_tgt = unit_ready(scgp) || scgp->scmd->error != SCG_FATAL; - err = geterrno(); - if (err == EPERM || err == EACCES) - return (-1); - - if (!have_tgt && tgt > 7) { - if (scgp->scmd->ux_errno == EINVAL) - break; - continue; - } - if (f) { -#ifdef FMT - if (print_disknames(bus, tgt, -1) < 8) - fprintf(f, "\t"); - else - fprintf(f, " "); -#else - fprintf(f, "\t"); -#endif - if (fprintf(f, "%d,%d,%d", bus, tgt, lun) < 8) - fprintf(f, "\t"); - else - fprintf(f, " "); - fprintf(f, "%3d) ", n); - } - if (tgt == initiator) { - if (f) - fprintf(f, "HOST ADAPTOR\n"); - continue; - } - if (!have_tgt) { - /* - * Hack: fd -> -2 means no access - */ - if (f) { - fprintf(f, "%c\n", - scgp->fd == -2 ? '?':'*'); - } - continue; - } - if (low < 0) - low = n; - high = n; - - getdev(scgp, FALSE); - if (f) - print_product(f, scgp->inq); - if (type >= 0 && scgp->inq->type == type) { - amt++; - if (amt == 0) /* amt starts at -1 */ - amt++; - if (amt == idx) { - scgp->silent--; - return (amt); - } - } else if (type < 0) { - amt++; - } - if (amt == 0) /* amt starts at -1 */ - amt++; - } - } - scgp->silent--; - - if (low < 0) { - errmsgno(EX_BAD, "No target found.\n"); - return (0); - } - n = -1; -#ifdef FMT - getint("Select target", &n, low, high); - bus = n/100; - tgt = n%100; - scg_settarget(scgp, bus, tgt, lun); - return (select_unit(scgp)); - -#endif - scg_settarget(scgp, cscsibus, ctarget, clun); - return (amt); -} - -LOCAL int -select_unit(scgp, f) - SCSI *scgp; - FILE *f; -{ - int initiator; - int clun = scg_lun(scgp); - int low = -1; - int high = -1; - int lun; - - scgp->silent++; - - fprintf(f, "scsibus%d target %d:\n", scg_scsibus(scgp), scg_target(scgp)); - - initiator = scg_initiator_id(scgp); - for (lun = 0; lun < 8; lun++) { - -#ifdef FMT - if (print_disknames(scg_scsibus(scgp), scg_target(scgp), lun) < 8) - fprintf(f, "\t"); - else - fprintf(f, " "); -#else - fprintf(f, "\t"); -#endif - if (fprintf(f, "%d,%d,%d", scg_scsibus(scgp), scg_target(scgp), lun) < 8) - fprintf(f, "\t"); - else - fprintf(f, " "); - fprintf(f, "%3d) ", lun); - if (scg_target(scgp) == initiator) { - fprintf(f, "HOST ADAPTOR\n"); - continue; - } - scg_settarget(scgp, scg_scsibus(scgp), scg_target(scgp), lun); - if (!unit_ready(scgp) && scgp->scmd->error == SCG_FATAL) { - fprintf(f, "*\n"); - continue; - } - if (unit_ready(scgp)) { - /* non extended sense illegal lun */ - if (scgp->scmd->sense.code == 0x25) { - fprintf(f, "BAD UNIT\n"); - continue; - } - } - if (low < 0) - low = lun; - high = lun; - - getdev(scgp, FALSE); - print_product(f, scgp->inq); - } - scgp->silent--; - - if (low < 0) { - errmsgno(EX_BAD, "No lun found.\n"); - return (0); - } - lun = -1; -#ifdef FMT - getint("Select lun", &lun, low, high); - scg_settarget(scgp, scg_scsibus(scgp), scg_target(scgp), lun); - format_one(scgp); - return (1); -#endif - - scg_settarget(scgp, scg_scsibus(scgp), scg_target(scgp), clun); - return (1); -} diff -Nru cdrtools-2.01.01a33/cdda2wav/scsi_scan.h cdrtools-3.02a09/cdda2wav/scsi_scan.h --- cdrtools-2.01.01a33/cdda2wav/scsi_scan.h 2006-11-26 00:39:41.000000000 +0000 +++ cdrtools-3.02a09/cdda2wav/scsi_scan.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,25 +0,0 @@ -/* @(#)scsi_scan.h 1.5 06/11/26 Copyright 1997 J. Schilling */ -/* - * Interface to scan SCSI Bus. - * - * Copyright (c) 1997 J. Schilling - */ -/* - * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. - * - * See the file CDDL.Schily.txt in this distribution for details. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file CDDL.Schily.txt from this distribution. - */ - -#ifndef _SCSI_SCAN_H -#define _SCSI_SCAN_H - -extern int select_target __PR((SCSI *scgp, FILE *f)); -extern int find_target __PR((SCSI *scgp, int type, int idx)); - -#endif /* _SCSI_SCAN_H */ diff -Nru cdrtools-2.01.01a33/cdda2wav/semshm.c cdrtools-3.02a09/cdda2wav/semshm.c --- cdrtools-2.01.01a33/cdda2wav/semshm.c 2006-09-26 12:31:38.000000000 +0000 +++ cdrtools-3.02a09/cdda2wav/semshm.c 2016-02-14 21:53:40.000000000 +0000 @@ -1,7 +1,8 @@ -/* @(#)semshm.c 1.20 06/09/26 Copyright 1998-2002 Heiko Eissfeldt, Copyright 2004-2006 J. Schilling */ +/* @(#)semshm.c 1.33 16/02/14 Copyright 1998-2002 Heiko Eissfeldt, Copyright 2004-2013 J. Schilling */ +#include "config.h" #ifndef lint -static char sccsid[] = -"@(#)semshm.c 1.20 06/09/26 Copyright 1998-2002 Heiko Eissfeldt, Copyright 2004-2006 J. Schilling"; +static UConst char sccsid[] = +"@(#)semshm.c 1.33 16/02/14 Copyright 1998-2002 Heiko Eissfeldt, Copyright 2004-2013 J. Schilling"; #endif #define IPCTST @@ -20,6 +21,8 @@ * with the License. * * See the file CDDL.Schily.txt in this distribution for details. + * A copy of the CDDL is also available via the Internet at + * http://www.opensource.org/licenses/cddl1.txt * * When distributing Covered Code, include this CDDL HEADER in each * file and include the License file CDDL.Schily.txt from this distribution. @@ -59,24 +62,24 @@ # define USE_BEOS_AREAS #endif -#include +#include #include #include #include #include #include -#include +#include #if defined(HAVE_SEMGET) && defined(USE_SEMAPHORES) -#include -#include -#include +#include +#include +#include #endif #if defined(HAVE_SHMAT) && (HAVE_SHMAT == 1) -#include -#include -#include +#include +#include +#include #endif #ifdef USE_MMAP @@ -84,12 +87,17 @@ #include #endif #endif +#include #include #ifdef USE_BEOS_AREAS +#ifdef HAVE_OS_H +#include +#else #include #endif +#endif #include "mytype.h" #include "interface.h" @@ -130,7 +138,7 @@ #endif ret_val = semget(key, amount, semflag); if (ret_val == -1) { - errmsg("Semget: (Key %lx, #%d) failed.\n", + errmsg(_("Semget: (Key %lx, #%d) failed.\n"), (long)key, amount); } return (ret_val); @@ -149,6 +157,8 @@ fprintf(stderr, "pid %d, ReQuest id:num %d:%d\n", getpid(), semid, semnum); #endif + if (!global.have_forked) + return (0); sops[0].sem_op = -1; sops[0].sem_num = (short) semnum; sops[0].sem_flg = 0; @@ -157,7 +167,7 @@ errno = 0; ret_val = semop(semid, sops, 1); if (ret_val == -1 && errno != EAGAIN && errno != EINTR) { - errmsg("Request Sema %d(%d) failed.\n", + errmsg(_("Request Sema %d(%d) failed.\n"), semid, semnum); } } while (errno == EAGAIN || errno == EINTR); @@ -177,17 +187,28 @@ #ifdef IPCTST fprintf(stderr, "%d RL %d:%d\n", getpid(), semid, semnum); #endif + if (!global.have_forked) + return (0); sops[0].sem_op = amount; sops[0].sem_num = (short) semnum; sops[0].sem_flg = 0; ret_val = semop(semid, sops, 1); if (ret_val == -1 && errno != EAGAIN) { - errmsg("Release Sema %d(%d) failed.\n", + errmsg(_("Release Sema %d(%d) failed.\n"), semid, semnum); } return (ret_val); } +void +semdestroy() +{ + /* + * How do we stop the other process from waiting? + */ + free_sem(); +} + int flush_buffers() { @@ -202,11 +223,11 @@ init_pipes() { if (pipe(pipefdp2c) < 0) { - errmsg("Cannot create pipe parent to child.\n"); + errmsg(_("Cannot create pipe parent to child.\n")); exit(PIPE_ERROR); } if (pipe(pipefdc2p) < 0) { - errmsg("Cannot create pipe child to parent.\n"); + errmsg(_("Cannot create pipe child to parent.\n")); exit(PIPE_ERROR); } } @@ -230,11 +251,13 @@ int dummy; int semnum; { + if (!global.have_forked) + return (0); if (semnum == FREE_SEM /* 0 */) { - int retval; - if ((*total_segments_read) - (*total_segments_written) >= global.buffers) { + int retval; + /* * parent/reader waits for freed buffers from the * child/writer @@ -244,9 +267,9 @@ return (retval); } } else { - int retval; - if ((*total_segments_read) == (*total_segments_written)) { + int retval; + /* * child/writer waits for defined buffers from the * parent/reader @@ -266,6 +289,8 @@ int semnum; int amount; { + if (!global.have_forked) + return (0); if (semnum == FREE_SEM /* 0 */) { if (*parent_waits == 1) { int retval; @@ -298,6 +323,19 @@ return (0); } +void +semdestroy() +{ + if (global.child_pid == 0) { /* Child */ + close(pipefdp2c[1]); + close(pipefdc2p[0]); + } else if (global.child_pid != -1) { + close(pipefdp2c[0]); + close(pipefdc2p[1]); + } +} + + int flush_buffers() { @@ -332,7 +370,7 @@ shmflag = IPC_CREAT | 0600; ret_val = shmget(key, size, shmflag); if (ret_val == -1) { - errmsg("Shmget failed.\n"); + errmsg(_("Shmget failed.\n")); return (-1); } @@ -347,16 +385,20 @@ buf.shm_perm.cuid, buf.shm_perm.cgid, buf.shm_perm.mode, buf.shm_segsz); #endif + if (ret_val == -1) { + errmsg(_("Shmctl failed.\n")); + return (-1); + } *memptr = (unsigned char *) shmat(SHMEM_ID, NULL, 0); if (*memptr == (unsigned char *) -1) { *memptr = NULL; - errmsg("Shmat failed for %d bytes.\n", size); + errmsg(_("Shmat failed for %d bytes.\n"), size); return (-1); } if (shmctl(SHMEM_ID, IPC_RMID, 0) < 0) { - errmsg("Shmctl failed to detach shared memory segment.\n"); + errmsg(_("Shmctl failed to detach shared memory segment.\n")); return (-1); } @@ -436,7 +478,7 @@ MAP_SHARED|MAP_ANONYMOUS, f, 0); #else if ((f = open("/dev/zero", O_RDWR)) < 0) - comerr("Cannot open '/dev/zero'.\n"); + comerr(_("Cannot open '/dev/zero'.\n")); addr = mmap(0, mmap_sizeparm(size), PROT_READ|PROT_WRITE, MAP_SHARED, f, 0); @@ -449,7 +491,7 @@ if (0 != shm_request_nommap(size, &address) || (addr = (char *)address) == NULL) #endif - comerr("Cannot get mmap for %d Bytes on /dev/zero.\n", + comerr(_("Cannot get mmap for %d Bytes on /dev/zero.\n"), size); } close(f); @@ -481,7 +523,7 @@ * it allowing fifos of arbitrary size */ if (DosAllocSharedMem(&addr, NULL, size, 0X100L | 0x1L | 0x2L | 0x10L)) - comerr("DosAllocSharedMem() failed\n"); + comerr(_("DosAllocSharedMem() failed\n")); if (memptr != NULL) *memptr = (unsigned char *)addr; @@ -518,7 +560,7 @@ B_READ_AREA | B_WRITE_AREA); /* read and write permissions */ if (aid < B_OK) - comerrno(aid, "create_area() failed\n"); + comerrno(aid, _("create_area() failed\n")); if (memptr != NULL) *memptr = (unsigned char *)addr; @@ -538,7 +580,7 @@ */ sem_id = seminstall(IPC_PRIVATE, 2); if (sem_id == -1) { - errmsg("Seminstall failed.\n"); + errmsg(_("Seminstall failed.\n")); exit(SEMAPHORE_ERROR); } @@ -546,7 +588,7 @@ #if defined(FIFO) if (-1 == shm_request(amount_of_sh_mem, pointer)) { - errmsg("Shm_request failed.\n"); + errmsg(_("Shm_request failed.\n")); exit(SHMMEM_ERROR); } diff -Nru cdrtools-2.01.01a33/cdda2wav/semshm.h cdrtools-3.02a09/cdda2wav/semshm.h --- cdrtools-2.01.01a33/cdda2wav/semshm.h 2006-05-13 21:02:13.000000000 +0000 +++ cdrtools-3.02a09/cdda2wav/semshm.h 2008-08-03 21:11:59.000000000 +0000 @@ -1,4 +1,4 @@ -/* @(#)semshm.h 1.5 06/05/13 Copyright 1998,1999 Heiko Eissfeldt */ +/* @(#)semshm.h 1.6 08/08/03 Copyright 1998,1999 Heiko Eissfeldt */ /* * The contents of this file are subject to the terms of the @@ -46,6 +46,7 @@ extern void free_sem __PR((void)); extern int semrequest __PR((int semid, int semnum)); extern int semrelease __PR((int semid, int semnum, int amount)); +extern void semdestroy __PR((void)); extern int flush_buffers __PR((void)); extern void * request_shm_sem __PR((unsigned amount_of_sh_mem, unsigned char **pointer)); diff -Nru cdrtools-2.01.01a33/cdda2wav/setuid.c cdrtools-3.02a09/cdda2wav/setuid.c --- cdrtools-2.01.01a33/cdda2wav/setuid.c 2006-11-11 21:40:01.000000000 +0000 +++ cdrtools-3.02a09/cdda2wav/setuid.c 2015-09-15 11:13:11.000000000 +0000 @@ -1,7 +1,8 @@ -/* @(#)setuid.c 1.16 06/11/11 Copyright 1998,1999,2004 Heiko Eissfeldt, Copyright 2004-2006 J. Schilling */ +/* @(#)setuid.c 1.23 15/09/15 Copyright 1998,1999,2004 Heiko Eissfeldt, Copyright 2004-2011 J. Schilling */ +#include "config.h" #ifndef lint -static char sccsid[] = -"@(#)setuid.c 1.16 06/11/11 Copyright 1998,1999,2004 Heiko Eissfeldt, Copyright 2004-2006 J. Schilling"; +static UConst char sccsid[] = +"@(#)setuid.c 1.23 15/09/15 Copyright 1998,1999,2004 Heiko Eissfeldt, Copyright 2004-2011 J. Schilling"; #endif /* @@ -31,6 +32,8 @@ * with the License. * * See the file CDDL.Schily.txt in this distribution for details. + * A copy of the CDDL is also available via the Internet at + * http://www.opensource.org/licenses/cddl1.txt * * When distributing Covered Code, include this CDDL HEADER in each * file and include the License file CDDL.Schily.txt from this distribution. @@ -38,9 +41,10 @@ #include "config.h" #include -#include +#include #include #include +#include #include "exitcodes.h" #include "setuid.h" @@ -64,14 +68,16 @@ { int leffective_uid; +#ifdef HAVE_ALARM alarm(0); /* can be inherited from parent process */ +#endif real_uid = getuid(); leffective_uid = geteuid(); if ((int) real_uid != leffective_uid && leffective_uid != 0) { /* sanity check */ errmsgno(EX_BAD, - "Warning: setuid but not to root (uid=%ld, euid=%d)\n", + _("Warning: setuid but not to root (uid=%ld, euid=%d)\n"), (long) real_uid, leffective_uid); - fprintf(stderr, "Dropping setuid privileges now.\n"); + fprintf(stderr, _("Dropping setuid privileges now.\n")); neverneedroot(); } else { effective_uid = leffective_uid; @@ -103,13 +109,13 @@ if (effective_uid) { if (necessary) { errmsgno(EX_BAD, - "Fatal error: require root privilege but not setuid root.\n"); + _("Fatal error: require root privilege but not setuid root.\n")); exit(PERM_ERROR); } else return; } if (real_uid == (uid_t) (-1)) { - errmsgno(EX_BAD, "Fatal error: initsecurity() not called.\n"); + errmsgno(EX_BAD, _("Fatal error: initsecurity() not called.\n")); exit(INTERNAL_ERROR); } @@ -118,19 +124,19 @@ #if defined _POSIX_SAVED_IDS && defined(HAVE_SETEUID) if (seteuid(effective_uid)) { - errmsg("Error with seteuid in needroot().\n"); + errmsg(_("Error with seteuid in needroot().\n")); exit(PERM_ERROR); } #else #if defined(HAVE_SETREUID) if (setreuid(real_uid, effective_uid)) { - errmsg("Error with setreuid in needroot().\n"); + errmsg(_("Error with setreuid in needroot().\n")); exit(PERM_ERROR); } #endif #endif if (geteuid() != 0 && necessary) { - errmsgno(EX_BAD, "Fatal error: did not get root privilege.\n"); + errmsgno(EX_BAD, _("Fatal error: did not get root privilege.\n")); exit(PERM_ERROR); } #ifdef DEBUG @@ -154,7 +160,7 @@ geteuid(), getuid(), getpid()); #endif if (real_uid == (uid_t) (-1)) { - errmsgno(EX_BAD, "Fatal error: initsecurity() not called.\n"); + errmsgno(EX_BAD, _("Fatal error: initsecurity() not called.\n")); exit(INTERNAL_ERROR); } if (effective_uid) @@ -164,20 +170,20 @@ #if defined _POSIX_SAVED_IDS && defined(HAVE_SETEUID) if (seteuid(real_uid)) { - errmsg("Error with seteuid in dontneedroot().\n"); + errmsg(_("Error with seteuid in dontneedroot().\n")); exit(PERM_ERROR); } #else #if defined(HAVE_SETREUID) if (setreuid(effective_uid, real_uid)) { - errmsg("Error with setreuid in dontneedroot().\n"); + errmsg(_("Error with setreuid in dontneedroot().\n")); exit(PERM_ERROR); } #endif #endif if (geteuid() != real_uid) { errmsgno(EX_BAD, - "Fatal error: did not drop root privilege.\n"); + _("Fatal error: did not drop root privilege.\n")); #ifdef DEBUG fprintf(stderr, "in to dontneedroot (_euid_=%d, uid=%d), current=%d/%d, pid=%d\n", @@ -201,13 +207,16 @@ geteuid(), getuid(), getpid()); #endif if (real_uid == (uid_t) (-1)) { - errmsgno(EX_BAD, "Fatal error: initsecurity() not called.\n"); + errmsgno(EX_BAD, _("Fatal error: initsecurity() not called.\n")); exit(INTERNAL_ERROR); } + if (geteuid() != effective_uid) { + needroot(1); + } if (geteuid() == effective_uid) { #if defined(HAVE_SETUID) if (setuid(real_uid)) { - errmsg("Error with setuid in neverneedroot().\n"); + errmsg(_("Error with setuid in neverneedroot().\n")); exit(PERM_ERROR); } #endif @@ -217,7 +226,7 @@ else { #if defined(HAVE_SETUID) if (setuid(real_uid)) { - errmsg("Error with setuid in neverneedroot().\n"); + errmsg(_("Error with setuid in neverneedroot().\n")); exit(PERM_ERROR); } #endif @@ -225,7 +234,7 @@ #endif if (geteuid() != real_uid || getuid() != real_uid) { errmsgno(EX_BAD, - "Fatal error: did not drop root privilege.\n"); + _("Fatal error: did not drop root privilege.\n")); #ifdef DEBUG fprintf(stderr, "in to neverneedroot (_euid_=%d, uid=%d), current=%d/%d, pid=%d\n", @@ -257,7 +266,7 @@ #endif if (real_gid == (gid_t) (-1)) { errmsgno(EX_BAD, - "Fatal error: initsecurity() not called.\n"); + _("Fatal error: initsecurity() not called.\n")); exit(INTERNAL_ERROR); } @@ -266,20 +275,20 @@ #if defined _POSIX_SAVED_IDS && defined(HAVE_SETEGID) if (setegid(effective_gid)) { - errmsg("Error with setegid in needgroup().\n"); + errmsg(_("Error with setegid in needgroup().\n")); exit(PERM_ERROR); } #else #if defined(HAVE_SETREGID) if (setregid(real_gid, effective_gid)) { - errmsg("Error with setregid in needgroup().\n"); + errmsg(_("Error with setregid in needgroup().\n")); exit(PERM_ERROR); } #endif #endif if (necessary && getegid() != effective_gid) { errmsgno(EX_BAD, - "Fatal error: did not get group privilege.\n"); + _("Fatal error: did not get group privilege.\n")); exit(PERM_ERROR); } } @@ -297,27 +306,27 @@ getegid(), getgid(), getpid()); #endif if (real_gid == (gid_t) (-1)) { - errmsgno(EX_BAD, "Fatal error: initsecurity() not called.\n"); + errmsgno(EX_BAD, _("Fatal error: initsecurity() not called.\n")); exit(INTERNAL_ERROR); } if (getegid() != effective_gid) return; /* nothing to do */ #if defined _POSIX_SAVED_IDS && defined(HAVE_SETEGID) if (setegid(real_gid)) { - errmsg("Error with setegid in dontneedgroup().\n"); + errmsg(_("Error with setegid in dontneedgroup().\n")); exit(PERM_ERROR); } #else #if defined(HAVE_SETREGID) if (setregid(effective_gid, real_gid)) { - errmsg("Error with setregid in dontneedgroup().\n"); + errmsg(_("Error with setregid in dontneedgroup().\n")); exit(PERM_ERROR); } #endif #endif if (getegid() != real_gid) { errmsgno(EX_BAD, - "Fatal error: did not drop group privilege.\n"); + _("Fatal error: did not drop group privilege.\n")); exit(PERM_ERROR); } #ifdef DEBUG @@ -341,13 +350,16 @@ getegid(), getgid(), getpid()); #endif if (real_gid == (gid_t) (-1)) { - errmsgno(EX_BAD, "Fatal error: initsecurity() not called.\n"); + errmsgno(EX_BAD, _("Fatal error: initsecurity() not called.\n")); exit(INTERNAL_ERROR); } + if (getegid() != effective_gid) { + needgroup(1); + } if (getegid() == effective_gid) { #if defined(HAVE_SETGID) if (setgid(real_gid)) { - errmsg("Error with setgid in neverneedgroup().\n"); + errmsg(_("Error with setgid in neverneedgroup().\n")); exit(PERM_ERROR); } #endif @@ -357,7 +369,7 @@ else { #if defined(HAVE_SETGID) if (setgid(real_gid)) { - errmsg("Error with setgid in neverneedgroup().\n"); + errmsg(_("Error with setgid in neverneedgroup().\n")); exit(PERM_ERROR); } #endif @@ -365,7 +377,13 @@ #endif if (getegid() != real_gid || getgid() != real_gid) { errmsgno(EX_BAD, - "Fatal error: did not drop group privilege.\n"); + _("Fatal error: did not drop group privilege.\n")); +#ifdef DEBUG + fprintf(stderr, + "in to neverneedgroup (_egid_=%d, gid=%d), current=%d/%d, pid=%d\n", + effective_gid, real_gid, + getegid(), getgid(), getpid()); +#endif exit(PERM_ERROR); } effective_gid = real_gid; diff -Nru cdrtools-2.01.01a33/cdda2wav/sha_func.c cdrtools-3.02a09/cdda2wav/sha_func.c --- cdrtools-2.01.01a33/cdda2wav/sha_func.c 2006-09-13 15:46:08.000000000 +0000 +++ cdrtools-3.02a09/cdda2wav/sha_func.c 1970-01-01 00:00:00.000000000 +0000 @@ -1,376 +0,0 @@ -/* @(#)sha_func.c 1.5 06/09/13 Copyright 1998,1999 Heiko Eissfeldt */ -#ifndef lint -static char sccsid[] = -"@(#)sha_func.c 1.5 06/09/13 Copyright 1998,1999 Heiko Eissfeldt"; - -#endif -/* NIST Secure Hash Algorithm */ - -/* heavily modified by Uwe Hollerbach */ -/* from Peter C. Gutmann's implementation as found in */ -/* Applied Cryptography by Bruce Schneier */ -/* Further modifications to include the "UNRAVEL" stuff, below */ -/* portability modifications Heiko Eissfeldt */ - -/* This code is in the public domain */ - -#include "config.h" -#include -#include "sha.h" - -/* UNRAVEL should be fastest & biggest */ -/* UNROLL_LOOPS should be just as big, but slightly slower */ -/* both undefined should be smallest and slowest */ - -#define UNRAVEL -/* #define UNROLL_LOOPS */ - -/* SHA f()-functions */ - -#define f1(x, y, z) ((x & y) | (~x & z)) -#define f2(x, y, z) (x ^ y ^ z) -#define f3(x, y, z) ((x & y) | (x & z) | (y & z)) -#define f4(x, y, z) (x ^ y ^ z) - -/* SHA constants */ - -#define CONST1 ULONG_C(0x5a827999) -#define CONST2 ULONG_C(0x6ed9eba1) -#define CONST3 ULONG_C(0x8f1bbcdc) -#define CONST4 ULONG_C(0xca62c1d6) - -/* truncate to 32 bits -- should be a null op on 32-bit machines */ - -#define T32(x) ((x) & ULONG_C(0xffffffff)) - -/* 32-bit rotate */ - -#define R32(x, n) T32(((x << n) | (x >> (32 - n)))) - -/* the generic case, for when the overall rotation is not unraveled */ - -/* CONCAT(f, n(B ,C ,D)) does not with K&R C... */ -/* BEGIN CSTYLED */ -#define FG(n) \ - T = T32(R32(A, 5) + CONCAT(f,n(B,C,D)) + E + *WP++ + CONCAT(CONST,n)); \ - E = D; D = C; C = R32(B, 30); B = A; A = T - -/* specific cases, for when the overall rotation is unraveled */ - -#define FA(n) \ - T = T32(R32(A, 5) + CONCAT(f,n(B,C,D)) + E + *WP++ + CONCAT(CONST,n)); B = R32(B, 30) - -#define FB(n) \ - E = T32(R32(T, 5) + CONCAT(f,n(A,B,C)) + D + *WP++ + CONCAT(CONST,n)); A = R32(A, 30) - -#define FC(n) \ - D = T32(R32(E, 5) + CONCAT(f,n(T,A,B)) + C + *WP++ + CONCAT(CONST,n)); T = R32(T, 30) - -#define FD(n) \ - C = T32(R32(D, 5) + CONCAT(f,n(E,T,A)) + B + *WP++ + CONCAT(CONST,n)); E = R32(E, 30) - -#define FE(n) \ - B = T32(R32(C, 5) + CONCAT(f,n(D,E,T)) + A + *WP++ + CONCAT(CONST,n)); D = R32(D, 30) - -#define FT(n) \ - A = T32(R32(B, 5) + CONCAT(f,n(C,D,E)) + T + *WP++ + CONCAT(CONST,n)); C = R32(C, 30) -/* END CSTYLED */ - -/* do SHA transformation */ - -static void sha_transform __PR((SHA_INFO *sha_info)); - -static void -sha_transform(sha_info) - SHA_INFO *sha_info; -{ - int i; - BYTE *dp; - ULONG T, A, B, C, D, E, W[80], *WP; - - dp = sha_info->data; - -/* - * the following makes sure that at least one code block below is - * traversed or an error is reported, without the necessity for nested - * preprocessor if/else/endif blocks, which are a great pain in the - * nether regions of the anatomy... - */ -#undef SWAP_DONE - -#if (SHA_BYTE_ORDER == 1234) -#define SWAP_DONE - for (i = 0; i < 16; ++i) { - T = *((ULONG *) dp); - dp += 4; - W[i] = ((T << 24) & ULONG_C(0xff000000)) | - ((T << 8) & ULONG_C(0x00ff0000)) | - ((T >> 8) & ULONG_C(0x0000ff00)) | - ((T >> 24) & ULONG_C(0x000000ff)); - } -#endif /* SHA_BYTE_ORDER == 1234 */ - -#if (SHA_BYTE_ORDER == 4321) -#define SWAP_DONE - for (i = 0; i < 16; ++i) { - T = *((ULONG *) dp); - dp += 4; - W[i] = T32(T); - } -#endif /* SHA_BYTE_ORDER == 4321 */ - -#if (SHA_BYTE_ORDER == 12345678) -#define SWAP_DONE - for (i = 0; i < 16; i += 2) { - T = *((ULONG *) dp); - dp += 8; - W[i] = ((T << 24) & ULONG_C(0xff000000)) | - ((T << 8) & ULONG_C(0x00ff0000)) | - ((T >> 8) & ULONG_C(0x0000ff00)) | - ((T >> 24) & ULONG_C(0x000000ff)); - T >>= 32; - W[i+1] = ((T << 24) & ULONG_C(0xff000000)) | - ((T << 8) & ULONG_C(0x00ff0000)) | - ((T >> 8) & ULONG_C(0x0000ff00)) | - ((T >> 24) & ULONG_C(0x000000ff)); - } -#endif /* SHA_BYTE_ORDER == 12345678 */ - -#if (SHA_BYTE_ORDER == 87654321) -#define SWAP_DONE - for (i = 0; i < 16; i += 2) { - T = *((ULONG *) dp); - dp += 8; - W[i] = T32(T >> 32); - W[i+1] = T32(T); - } -#endif /* SHA_BYTE_ORDER == 87654321 */ - -#ifndef SWAP_DONE -error Unknown byte order -- you need to add code here -#endif /* SWAP_DONE */ - - for (i = 16; i < 80; ++i) { - W[i] = W[i-3] ^ W[i-8] ^ W[i-14] ^ W[i-16]; -#if (SHA_VERSION == 1) - W[i] = R32(W[i], 1); -#endif /* SHA_VERSION */ - } - A = sha_info->digest[0]; - B = sha_info->digest[1]; - C = sha_info->digest[2]; - D = sha_info->digest[3]; - E = sha_info->digest[4]; - WP = W; -#ifdef UNRAVEL - FA(1); FB(1); FC(1); FD(1); FE(1); FT(1); FA(1); FB(1); FC(1); FD(1); - FE(1); FT(1); FA(1); FB(1); FC(1); FD(1); FE(1); FT(1); FA(1); FB(1); - FC(2); FD(2); FE(2); FT(2); FA(2); FB(2); FC(2); FD(2); FE(2); FT(2); - FA(2); FB(2); FC(2); FD(2); FE(2); FT(2); FA(2); FB(2); FC(2); FD(2); - FE(3); FT(3); FA(3); FB(3); FC(3); FD(3); FE(3); FT(3); FA(3); FB(3); - FC(3); FD(3); FE(3); FT(3); FA(3); FB(3); FC(3); FD(3); FE(3); FT(3); - FA(4); FB(4); FC(4); FD(4); FE(4); FT(4); FA(4); FB(4); FC(4); FD(4); - FE(4); FT(4); FA(4); FB(4); FC(4); FD(4); FE(4); FT(4); FA(4); FB(4); - sha_info->digest[0] = T32(sha_info->digest[0] + E); - sha_info->digest[1] = T32(sha_info->digest[1] + T); - sha_info->digest[2] = T32(sha_info->digest[2] + A); - sha_info->digest[3] = T32(sha_info->digest[3] + B); - sha_info->digest[4] = T32(sha_info->digest[4] + C); -#else /* !UNRAVEL */ -#ifdef UNROLL_LOOPS - FG(1); FG(1); FG(1); FG(1); FG(1); FG(1); FG(1); FG(1); FG(1); FG(1); - FG(1); FG(1); FG(1); FG(1); FG(1); FG(1); FG(1); FG(1); FG(1); FG(1); - FG(2); FG(2); FG(2); FG(2); FG(2); FG(2); FG(2); FG(2); FG(2); FG(2); - FG(2); FG(2); FG(2); FG(2); FG(2); FG(2); FG(2); FG(2); FG(2); FG(2); - FG(3); FG(3); FG(3); FG(3); FG(3); FG(3); FG(3); FG(3); FG(3); FG(3); - FG(3); FG(3); FG(3); FG(3); FG(3); FG(3); FG(3); FG(3); FG(3); FG(3); - FG(4); FG(4); FG(4); FG(4); FG(4); FG(4); FG(4); FG(4); FG(4); FG(4); - FG(4); FG(4); FG(4); FG(4); FG(4); FG(4); FG(4); FG(4); FG(4); FG(4); -#else /* !UNROLL_LOOPS */ - for (i = 0; i < 20; ++i) { FG(1); } - for (i = 20; i < 40; ++i) { FG(2); } - for (i = 40; i < 60; ++i) { FG(3); } - for (i = 60; i < 80; ++i) { FG(4); } -#endif /* !UNROLL_LOOPS */ - sha_info->digest[0] = T32(sha_info->digest[0] + A); - sha_info->digest[1] = T32(sha_info->digest[1] + B); - sha_info->digest[2] = T32(sha_info->digest[2] + C); - sha_info->digest[3] = T32(sha_info->digest[3] + D); - sha_info->digest[4] = T32(sha_info->digest[4] + E); -#endif /* !UNRAVEL */ -} - -/* initialize the SHA digest */ - -void sha_init __PR((SHA_INFO *sha_info)); - -void -sha_init(sha_info) - SHA_INFO *sha_info; -{ - sha_info->digest[0] = ULONG_C(0x67452301); - sha_info->digest[1] = ULONG_C(0xefcdab89); - sha_info->digest[2] = ULONG_C(0x98badcfe); - sha_info->digest[3] = ULONG_C(0x10325476); - sha_info->digest[4] = ULONG_C(0xc3d2e1f0); - sha_info->count_lo = 0L; - sha_info->count_hi = 0L; - sha_info->local = 0; -} - -/* update the SHA digest */ - -void sha_update __PR((SHA_INFO *sha_info, BYTE *buffer, int count)); - -void -sha_update(sha_info, buffer, count) - SHA_INFO *sha_info; - BYTE *buffer; - int count; -{ - int i; - ULONG clo; - - clo = T32(sha_info->count_lo + ((ULONG) count << 3)); - if (clo < sha_info->count_lo) { - ++sha_info->count_hi; - } - sha_info->count_lo = clo; - sha_info->count_hi += (ULONG) count >> 29; - if (sha_info->local) { - i = SHA_BLOCKSIZE - sha_info->local; - if (i > count) { - i = count; - } - memcpy(((BYTE *) sha_info->data) + sha_info->local, buffer, i); - count -= i; - buffer += i; - sha_info->local += i; - if (sha_info->local == SHA_BLOCKSIZE) { - sha_transform(sha_info); - } else { - return; - } - } - while (count >= SHA_BLOCKSIZE) { - memcpy(sha_info->data, buffer, SHA_BLOCKSIZE); - buffer += SHA_BLOCKSIZE; - count -= SHA_BLOCKSIZE; - sha_transform(sha_info); - } - memcpy(sha_info->data, buffer, count); - sha_info->local = count; -} - -/* finish computing the SHA digest */ - -void sha_final __PR((unsigned char digest[20], SHA_INFO *sha_info)); - -void -sha_final(digest, sha_info) - unsigned char digest[20]; - SHA_INFO *sha_info; -{ - int count; - ULONG lo_bit_count, hi_bit_count; - - lo_bit_count = sha_info->count_lo; - hi_bit_count = sha_info->count_hi; - count = (int) ((lo_bit_count >> 3) & 0x3f); - ((BYTE *) sha_info->data)[count++] = 0x80; - if (count > SHA_BLOCKSIZE - 8) { - memset(((BYTE *) sha_info->data) + count, 0, - SHA_BLOCKSIZE - count); - sha_transform(sha_info); - memset((BYTE *) sha_info->data, 0, SHA_BLOCKSIZE - 8); - } else { - memset(((BYTE *) sha_info->data) + count, 0, - SHA_BLOCKSIZE - 8 - count); - } - sha_info->data[56] = (unsigned char) ((hi_bit_count >> 24) & 0xff); - sha_info->data[57] = (unsigned char) ((hi_bit_count >> 16) & 0xff); - sha_info->data[58] = (unsigned char) ((hi_bit_count >> 8) & 0xff); - sha_info->data[59] = (unsigned char) ((hi_bit_count >> 0) & 0xff); - sha_info->data[60] = (unsigned char) ((lo_bit_count >> 24) & 0xff); - sha_info->data[61] = (unsigned char) ((lo_bit_count >> 16) & 0xff); - sha_info->data[62] = (unsigned char) ((lo_bit_count >> 8) & 0xff); - sha_info->data[63] = (unsigned char) ((lo_bit_count >> 0) & 0xff); - sha_transform(sha_info); - digest[ 0] = (unsigned char) ((sha_info->digest[0] >> 24) & 0xff); - digest[ 1] = (unsigned char) ((sha_info->digest[0] >> 16) & 0xff); - digest[ 2] = (unsigned char) ((sha_info->digest[0] >> 8) & 0xff); - digest[ 3] = (unsigned char) ((sha_info->digest[0]) & 0xff); - digest[ 4] = (unsigned char) ((sha_info->digest[1] >> 24) & 0xff); - digest[ 5] = (unsigned char) ((sha_info->digest[1] >> 16) & 0xff); - digest[ 6] = (unsigned char) ((sha_info->digest[1] >> 8) & 0xff); - digest[ 7] = (unsigned char) ((sha_info->digest[1]) & 0xff); - digest[ 8] = (unsigned char) ((sha_info->digest[2] >> 24) & 0xff); - digest[ 9] = (unsigned char) ((sha_info->digest[2] >> 16) & 0xff); - digest[10] = (unsigned char) ((sha_info->digest[2] >> 8) & 0xff); - digest[11] = (unsigned char) ((sha_info->digest[2]) & 0xff); - digest[12] = (unsigned char) ((sha_info->digest[3] >> 24) & 0xff); - digest[13] = (unsigned char) ((sha_info->digest[3] >> 16) & 0xff); - digest[14] = (unsigned char) ((sha_info->digest[3] >> 8) & 0xff); - digest[15] = (unsigned char) ((sha_info->digest[3]) & 0xff); - digest[16] = (unsigned char) ((sha_info->digest[4] >> 24) & 0xff); - digest[17] = (unsigned char) ((sha_info->digest[4] >> 16) & 0xff); - digest[18] = (unsigned char) ((sha_info->digest[4] >> 8) & 0xff); - digest[19] = (unsigned char) ((sha_info->digest[4]) & 0xff); -} - -#ifdef SHA_FOR_C - -/* compute the SHA digest of a FILE stream */ - -#define BLOCK_SIZE 8192 - -void sha_stream __PR((unsigned char digest[20], SHA_INFO *sha_info, FILE *fin)); - -void -sha_stream(digest, sha_info, fin) - unsigned char digest[20]; - SHA_INFO *sha_info; - FILE *fin; -{ - int i; - BYTE data[BLOCK_SIZE]; - - sha_init(sha_info); - while ((i = fread(data, 1, BLOCK_SIZE, fin)) > 0) { - sha_update(sha_info, data, i); - } - sha_final(digest, sha_info); -} - -/* print a SHA digest */ - -void sha_print __PR((unsigned char digest[20])); - -void -sha_print(digest) - unsigned char digest[20]; -{ - int i, j; - - for (j = 0; j < 5; ++j) { - for (i = 0; i < 4; ++i) { - printf("%02x", *digest++); - } - printf("%c", (j < 4) ? ' ' : '\n'); - } -} - -char *sha_version __PR((void)); - -char * -sha_version() -{ -#if (SHA_VERSION == 1) -static char *version = "SHA-1"; -#else -static char *version = "SHA"; -#endif - return (version); -} - -#endif /* SHA_FOR_C */ diff -Nru cdrtools-2.01.01a33/cdda2wav/sha.h cdrtools-3.02a09/cdda2wav/sha.h --- cdrtools-2.01.01a33/cdda2wav/sha.h 2006-09-13 15:42:39.000000000 +0000 +++ cdrtools-3.02a09/cdda2wav/sha.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,70 +0,0 @@ -/* @(#)sha.h 1.6 06/09/13 Copyright 1998,1999 Heiko Eissfeldt */ -#ifndef SHA_H -#define SHA_H - -/* NIST Secure Hash Algorithm */ -/* heavily modified by Uwe Hollerbach */ -/* from Peter C. Gutmann's implementation as found in */ -/* Applied Cryptography by Bruce Schneier */ - -/* This code is in the public domain */ - -/* Useful defines & typedefs */ - -typedef unsigned char BYTE; /* 8-bit quantity */ -typedef unsigned long ULONG; /* 32-or-more-bit quantity */ - -#define SHA_BLOCKSIZE 64 -#define SHA_DIGESTSIZE 20 - -typedef struct { - ULONG digest[5]; /* message digest */ - ULONG count_lo, count_hi; /* 64-bit bit count */ - BYTE data[SHA_BLOCKSIZE]; /* SHA data buffer */ - int local; /* unprocessed amount in data */ -} SHA_INFO; - -extern void sha_init __PR((SHA_INFO *)); -extern void sha_update __PR((SHA_INFO *, BYTE *, int)); -extern void sha_final __PR((unsigned char [20], SHA_INFO *)); - -#ifdef SHA_FOR_C - -#include -#include -#include - -extern void sha_stream __PR((unsigned char [20], SHA_INFO *, FILE *)); -extern void sha_print __PR((unsigned char [20])); -extern char *sha_version __PR((void)); - -#endif /* SHA_FOR_C */ - -#define SHA_VERSION 1 - -#ifndef WIN32 -#ifdef WORDS_BIGENDIAN -# if SIZEOF_UNSIGNED_LONG_INT == 4 -# define SHA_BYTE_ORDER 4321 -# else -# if SIZEOF_UNSIGNED_LONG_INT == 8 -# define SHA_BYTE_ORDER 87654321 -# endif -# endif -#else -# if SIZEOF_UNSIGNED_LONG_INT == 4 -# define SHA_BYTE_ORDER 1234 -# else -# if SIZEOF_UNSIGNED_LONG_INT == 8 -# define SHA_BYTE_ORDER 12345678 -# endif -# endif -#endif - -#else - -#define SHA_BYTE_ORDER 1234 - -#endif - -#endif /* SHA_H */ diff -Nru cdrtools-2.01.01a33/cdda2wav/sndconfig.c cdrtools-3.02a09/cdda2wav/sndconfig.c --- cdrtools-2.01.01a33/cdda2wav/sndconfig.c 2007-06-21 22:15:27.000000000 +0000 +++ cdrtools-3.02a09/cdda2wav/sndconfig.c 2015-10-14 20:18:29.000000000 +0000 @@ -1,7 +1,8 @@ -/* @(#)sndconfig.c 1.27 07/06/22 Copyright 1998-2004 Heiko Eissfeldt, Copyright 2004-2007 J. Schilling */ +/* @(#)sndconfig.c 1.44 15/10/14 Copyright 1998-2004,2015 Heiko Eissfeldt, Copyright 2004-2015 J. Schilling */ +#include "config.h" #ifndef lint -static char sccsid[] = -"@(#)sndconfig.c 1.27 07/06/22 Copyright 1998-2004 Heiko Eissfeldt, Copyright 2004-2007 J. Schilling"; +static UConst char sccsid[] = +"@(#)sndconfig.c 1.44 15/10/14 Copyright 1998-2004,2015 Heiko Eissfeldt, Copyright 2004-2015 J. Schilling"; #endif /* @@ -14,45 +15,82 @@ * with the License. * * See the file CDDL.Schily.txt in this distribution for details. + * A copy of the CDDL is also available via the Internet at + * http://www.opensource.org/licenses/cddl1.txt * * When distributing Covered Code, include this CDDL HEADER in each * file and include the License file CDDL.Schily.txt from this distribution. */ #include "config.h" -#include +#include #include #include #include #include #include +#include +#include +#include + -#if !defined __CYGWIN32__ -# include +#if defined HAVE_SOUNDCARD_H || defined HAVE_SYS_SOUNDCARD_H || \ + defined HAVE_LINUX_SOUNDCARD_H || defined HAVE_MACHINE_SOUNDCARD_H +#define HAVE_OSS 1 +#endif + +#if defined HAVE_ALSA_ASOUNDLIB_H || defined HAVE_SYS_ASOUNDLIB_H +#define HAVE_ALSA 1 +#undef HAVE_OSS +#endif + +/* + * OpenSolaris switched to OSS in 2008, so is it really wise to + * prefer the old sound system? + */ +#if defined HAVE_SYS_AUDIOIO_H || defined HAVE_SUN_AUDIOIO_H +#define HAVE_SUNSOUND 1 +#undef HAVE_ALSA +#undef HAVE_OSS #endif -#include +#if defined HAVE_WINDOWS_H && defined HAVE_MMSYSTEM_H +#undef HAVE_WINSOUND +#endif + +#if defined HAVE_OS2_H && defined HAVE_OS2ME_H +#define HAVE_OS2SOUND 1 +#undef HAVE_OSS +#endif /* soundcard setup */ -#if defined(HAVE_SOUNDCARD_H) || defined(HAVE_LINUX_SOUNDCARD_H) || \ +#if !defined HAVE_SUNSOUND +# if defined(HAVE_SOUNDCARD_H) || defined(HAVE_LINUX_SOUNDCARD_H) || \ defined(HAVE_SYS_SOUNDCARD_H) || defined(HAVE_MACHINE_SOUNDCARD_H) -# if defined(HAVE_SOUNDCARD_H) -# include -# else -# if defined(HAVE_MACHINE_SOUNDCARD_H) -# include +# if defined(HAVE_SOUNDCARD_H) +# include # else -# if defined(HAVE_SYS_SOUNDCARD_H) -# include +# if defined(HAVE_MACHINE_SOUNDCARD_H) +# include # else -# if defined(HAVE_LINUX_SOUNDCARD_H) -# include +# if defined(HAVE_SYS_SOUNDCARD_H) +# include +# else +# if defined(HAVE_LINUX_SOUNDCARD_H) +# include +# endif # endif # endif # endif # endif #endif +#if defined HAVE_SNDIO_H +# include +#undef SOUND_DEV +#define SOUND_DEV SIO_DEVANY +#endif + #include "mytype.h" #include "byteorder.h" #include "lowlevel.h" @@ -60,12 +98,12 @@ #include "sndconfig.h" #ifdef ECHO_TO_SOUNDCARD -# if defined(__CYGWIN32__) -# include +# if defined(HAVE_WINSOUND) +# include # include "mmsystem.h" # endif -# if defined(__EMX__) +# if defined(HAVE_OS2SOUND) # define INCL_DOS # define INCL_OS2MM # include @@ -97,11 +135,13 @@ return (0); } -# if defined __CYGWIN32__ +# if defined(HAVE_WINSOUND) static HWAVEOUT DeviceID; # define WAVEHDRS 3 static WAVEHDR wavehdr[WAVEHDRS]; -static unsigned lastwav = 0; +static unsigned lastwav = 0; +static unsigned wavehdrinuse = 0; +static HANDLE waveOutEvent; static int check_winsound_caps __PR((int bits, double rate, int channels)); @@ -118,7 +158,7 @@ * get caps */ if (waveOutGetDevCaps(0, &caps, sizeof (caps))) { - errmsgno(EX_BAD, "Cannot get soundcard capabilities!\n"); + errmsgno(EX_BAD, _("Cannot get soundcard capabilities!\n")); return (1); } @@ -127,14 +167,14 @@ */ if ((bits == 8 && !(caps.dwFormats & 0x333)) || (bits == 16 && !(caps.dwFormats & 0xccc))) { - errmsgno(EX_BAD, "%d bits sound are not supported.\n", bits); + errmsgno(EX_BAD, _("%d bits sound are not supported.\n"), bits); result = 2; } if ((channels == 1 && !(caps.dwFormats & 0x555)) || (channels == 2 && !(caps.dwFormats & 0xaaa))) { errmsgno(EX_BAD, - "%d sound channels are not supported.\n", channels); + _("%d sound channels are not supported.\n"), channels); result = 3; } @@ -142,13 +182,31 @@ (rate == 22050.0 && !(caps.dwFormats & 0xf0)) || (rate == 11025.0 && !(caps.dwFormats & 0xf))) { errmsgno(EX_BAD, - "%d sample rate is not supported.\n", (int)rate); + _("%d sample rate is not supported.\n"), (int)rate); result = 4; } return (result); } -# endif /* defined CYGWIN */ + +static void CALLBACK waveOutProc __PR((HWAVEOUT hwo, UINT uMsg, DWORD dwInstance, DWORD dwParam1, DWORD dwParam2)); + +static void CALLBACK waveOutProc(hwo, uMsg, dwInstance, dwParam1, dwParam2) + HWAVEOUT hwo; + UINT uMsg; + DWORD dwInstance; + DWORD dwParam1; + DWORD dwParam2; +{ + if (uMsg == WOM_DONE) { + if (wavehdrinuse) { + wavehdrinuse--; + SetEvent(waveOutEvent); + } + } +} + +# endif /* defined HAVE_WINSOUND */ #endif /* defined ECHO_TO_SOUNDCARD */ #ifdef HAVE_SUN_AUDIOIO_H @@ -158,15 +216,47 @@ # include #endif +#ifdef HAVE_ALSA #ifdef HAVE_SYS_ASOUNDLIB_H # include +#endif +#ifdef HAVE_ALSA_ASOUNDLIB_H +# include +#endif snd_pcm_t *pcm_handle; +unsigned frame_factor; +#endif + +#if defined HAVE_SNDIO_H +struct sio_hdl *hdl; #endif #if defined HAVE_OSS && defined SNDCTL_DSP_GETOSPACE audio_buf_info abinfo; #endif +#if defined HAVE_PULSE_PULSEAUDIO_H +# include + +#define PULSEAUDIO_SIMPLE_API 1 +/*#undef PULSEAUDIO_SIMPLE_API*/ + +#ifdef PULSEAUDIO_SIMPLE_API +# include +pa_simple *ptr_pa_simple = NULL; +#else +pa_mainloop *ptr_pa_mainloop = NULL; +pa_mainloop_api *ptr_pa_mainloop_api = NULL; +pa_context *ptr_pa_context = NULL; +pa_stream *ptr_pa_stream = NULL; +#endif + +struct pa_sample_spec _pa_sample_spec; + +#endif + + + int init_soundcard(rate, bits) double rate; @@ -174,9 +264,189 @@ { #ifdef ECHO_TO_SOUNDCARD if (global.echo) { -# if defined(HAVE_OSS) && HAVE_OSS == 1 +#if defined HAVE_PULSE_PULSEAUDIO_H + int ret = 1; + if (bits != 16 && bits != 8) { + error("Cannot use pulseaudio sound device with %d bits per sample\n", + bits); + return (1); + } + /* setup format */ + _pa_sample_spec.format = bits == 16 ? PA_SAMPLE_S16LE + : PA_SAMPLE_U8; + _pa_sample_spec.channels = 2; + _pa_sample_spec.rate = rate; + +#ifdef PULSEAUDIO_SIMPLE_API + ptr_pa_simple = pa_simple_new( + NULL, /* default server */ + pa_locale_to_utf8("Cdda2wav"), /* application name */ + PA_STREAM_PLAYBACK, /* sound transfer direction */ + NULL, /* default device */ + pa_locale_to_utf8("Music"), /* stream description */ + &_pa_sample_spec, /* sample format */ + NULL, /* default channel map */ + NULL, /* default buffering attributes */ + &ret); /* error code */ + + if (ptr_pa_simple == NULL) { +#ifdef SND_DEBUG + error("Cannot use pulseaudio sound daemon (no connected object): %d. Trying native sound device...\n", + ret); +#endif + goto pa_outsimple; + } +#else + /* get a mainloop */ + ptr_pa_mainloop = pa_mainloop_new(); + if (ptr_pa_mainloop == NULL) { + error("Cannot use pulseaudio sound daemon (no mainloop). Trying native sound device...\n"); + goto pa_out0; + } + + ptr_pa_mainloop_api = pa_mainloop_get_api(ptr_pa_mainloop); + + + /* get a context */ + ptr_pa_context = pa_context_new( + ptr_pa_mainloop_api, + pa_locale_to_utf8("Cdda2wav_ctx")); + + if (ptr_pa_context == NULL) { + error("Cannot use pulseaudio sound daemon (no context). Trying native sound device...\n"); + goto pa_out1; + } + + /* connect a context */ + if (pa_context_connect( + ptr_pa_context, + NULL, /* default server */ + 0, /* flags */ + NULL) < 0 { /* spawn API */ +#ifdef SND_DEBUG + error("Cannot open pulseaudio sound device (no context connect). Trying native sound device...\n"); +#endif + goto pa_out2; + } + + int state = 0; + do { + if (pa_mainloop_iterate(ptr_pa_mainloop, 1, NULL) < 0) { + error( + "Cannot open pulseaudio sound device (mainloop_iterate failed). Trying native sound device...\n"); + goto pa_out2; + } + state = pa_context_get_state(ptr_pa_context); + if (state != PA_CONTEXT_CONNECTING && + state != PA_CONTEXT_AUTHORIZING && + state != PA_CONTEXT_SETTING_NAME && + state != PA_CONTEXT_READY) { + error( + "Cannot open pulseaudio sound device (bad context state %d). Trying native sound device...\n", + state); + goto pa_out2; + } + } while (state != PA_CONTEXT_READY); + + pa_channel_map pacmap; + pa_channel_map_init_auto(&pacmap, _pa_sample_spec.channels, + PA_CHANNEL_MAP_WAVEEX); + + ptr_pa_stream = pa_stream_new( + ptr_pa_context, + pa_locale_to_utf8("Cdda2wav"), + &_pa_sample_spec, + &pacmap); + + if (ptr_pa_stream == NULL) { + error("Cannot use pulseaudio sound daemon (no stream). Trying native sound device...\n"); + goto pa_out2; + } + + if (pa_stream_connect_playback( + ptr_pa_stream, + NULL, + NULL, + 0, + NULL, + NULL) < 0) { + error("Cannot use pulseaudio sound daemon (no connect). Trying native sound device...\n"); + goto pa_out2; + } + + state = 0; + do { + if (pa_mainloop_iterate(ptr_pa_mainloop, 1, NULL) < 0) { + error( + "Cannot open pulseaudio sound device (mainloop_iterate failed). Trying native sound device...\n"); + goto pa_out2; + } + state = pa_stream_get_state(ptr_pa_stream); + if (state != PA_STREAM_CREATING && + state != PA_STREAM_READY) { + error( + "Cannot open pulseaudio sound device (bad stream state %d). Trying native sound device...\n", + state); + goto pa_out2; + } + } while (state != PA_STREAM_READY); + + return (0); + /* if unsuccessful, fallback to native sound API */ + + /* clean up */ +pa_out2: + if (ptr_pa_context) + pa_context_unref(ptr_pa_context); +pa_out1: + if (ptr_pa_mainloop) + pa_mainloop_free(ptr_pa_mainloop); +pa_out0: + ptr_pa_stream = NULL; + ptr_pa_context = NULL; + ptr_pa_mainloop = NULL; + ptr_pa_mainloop_api = NULL; +#endif +pa_outsimple: + ; +#endif +# if defined(HAVE_SNDIO_H) + struct sio_par par; + hdl = sio_open(snd_device, SIO_PLAY, 0); + if (hdl == NULL) { + errmsg("Cannot open sndio sound device '%s'.\n", snd_device); + return (1); + } + sio_initpar(&par); + par.bits = bits; + par.sig = 1; + par.le = SIO_LE_NATIVE; + par.pchan = 2; + par.rate = rate; + par.appbufsz = 44100 / 4; /* 61152 */ + if (!sio_setpar(hdl, &par) || !sio_getpar(hdl, &par)) { + errmsg("Cannot set sound parameters for '%s'.\n", snd_device); + sio_close(hdl); + hdl = NULL; + return (1); + } + if (par.bits != bits || par.sig != 1 || par.le != SIO_LE_NATIVE || + par.pchan != 2 || par.rate != (int)rate) { + errmsg("Unsupported sound parameters for '%s'.\n", snd_device); + sio_close(hdl); + hdl = NULL; + return (1); + } + if (!sio_start(hdl)) { + errmsg("Couldn't start sound device '%s'.\n", snd_device); + sio_close(hdl); + hdl = NULL; + return (1); + } +# else +# if defined(HAVE_OSS) && HAVE_OSS == 1 if (open_snd_device() != 0) { - errmsg("Cannot open sound device '%s'.\n", snd_device); + errmsg(_("Cannot open oss sound device '%s'.\n"), snd_device); global.echo = 0; } else { /* @@ -191,14 +461,14 @@ int mask; if (ioctl(global.soundcard_fd, - (int)SNDCTL_DSP_GETBLKSIZE, &dummy) == -1) { - errmsg("Cannot get blocksize for %s.\n", + SNDCTL_DSP_GETBLKSIZE, &dummy) == -1) { + errmsg(_("Cannot get blocksize for %s.\n"), snd_device); global.echo = 0; } if (ioctl(global.soundcard_fd, - (int)SNDCTL_DSP_SYNC, NULL) == -1) { - errmsg("Cannot sync for %s.\n", + SNDCTL_DSP_SYNC, NULL) == -1) { + errmsg(_("Cannot sync for %s.\n"), snd_device); global.echo = 0; } @@ -206,7 +476,7 @@ #if defined SNDCTL_DSP_GETOSPACE if (ioctl(global.soundcard_fd, SNDCTL_DSP_GETOSPACE, &abinfo) == -1) { - errmsg("Cannot get input buffersize for %s.\n", + errmsg(_("Cannot get input buffersize for %s.\n"), snd_device); abinfo.fragments = 0; } @@ -217,13 +487,13 @@ * requested format */ if (ioctl(global.soundcard_fd, - (int)SNDCTL_DSP_GETFMTS, &mask) == -1) { - errmsg("Fatal error in ioctl(SNDCTL_DSP_GETFMTS).\n"); + SNDCTL_DSP_GETFMTS, &mask) == -1) { + errmsg(_("Fatal error in ioctl(SNDCTL_DSP_GETFMTS).\n")); return (-1); } if ((mask & myformat) == 0) { errmsgno(EX_BAD, - "Sound format (%d bits signed) is not available.\n", + _("Sound format (%d bits signed) is not available.\n"), bits); if ((mask & AFMT_U8) != 0) { bits = 8; @@ -231,8 +501,8 @@ } } if (ioctl(global.soundcard_fd, - (int)SNDCTL_DSP_SETFMT, &myformat) == -1) { - errmsg("Cannot set %d bits/sample for %s.\n", + SNDCTL_DSP_SETFMT, &myformat) == -1) { + errmsg(_("Cannot set %d bits/sample for %s.\n"), bits, snd_device); global.echo = 0; } @@ -242,15 +512,15 @@ */ if (stereo && ioctl(global.soundcard_fd, - (int)SNDCTL_DSP_STEREO, &stereo) == -1) { - errmsg("Cannot set stereo mode for %s.\n", + SNDCTL_DSP_STEREO, &stereo) == -1) { + errmsg(_("Cannot set stereo mode for %s.\n"), snd_device); stereo = 0; } if (!stereo && ioctl(global.soundcard_fd, - (int)SNDCTL_DSP_STEREO, &stereo) == -1) { - errmsg("Cannot set mono mode for %s.\n", + SNDCTL_DSP_STEREO, &stereo) == -1) { + errmsg(_("Cannot set mono mode for %s.\n"), snd_device); global.echo = 0; } @@ -259,34 +529,34 @@ * set the sample rate */ if (ioctl(global.soundcard_fd, - (int)SNDCTL_DSP_SPEED, &garbled_rate) == -1) { - errmsg("Cannot set rate %d.%2d Hz for %s.\n", + SNDCTL_DSP_SPEED, &garbled_rate) == -1) { + errmsg(_("Cannot set rate %d.%2d Hz for %s.\n"), (int)rate, (int)(rate*100)%100, snd_device); global.echo = 0; } if (abs((long)rate - garbled_rate) > rate / 20) { errmsgno(EX_BAD, - "Sound device: next best sample rate is %d.\n", + _("Sound device: next best sample rate is %d.\n"), garbled_rate); } } -# else /* HAVE_OSS */ +# else /* HAVE_OSS */ -# if defined HAVE_SYS_AUDIOIO_H || defined HAVE_SUN_AUDIOIO_H +# if defined HAVE_SYS_AUDIOIO_H || defined HAVE_SUN_AUDIOIO_H /* - * This is the SunOS / Solaris and + * This is the SunOS / Solaris / NetBSD * sound initialisation */ if ((global.soundcard_fd = open(snd_device, O_WRONLY, 0)) == EOF) { - errmsg("Cannot open '%s'.\n", snd_device); + errmsg(_("Cannot open '%s'.\n"), snd_device); global.echo = 0; } else { +# if defined(AUDIO_INITINFO) && defined(AUDIO_ENCODING_LINEAR) audio_info_t info; -# if defined(AUDIO_INITINFO) && defined(AUDIO_ENCODING_LINEAR) AUDIO_INITINFO(&info); info.play.sample_rate = rate; info.play.channels = global.channels; @@ -297,19 +567,20 @@ info.monitor_gain = 0; if (ioctl(global.soundcard_fd, AUDIO_SETINFO, &info) < 0) { - errmsg("Cannot init %s (sun).\n", + errmsg(_("Cannot init %s (sun).\n"), snd_device); global.echo = 0; } -# else +# else errmsgno(EX_BAD, - "Cannot init sound device with 44.1 KHz sample rate on %s (sun compatible).\n", + _("Cannot init sound device with %u.%u kHz sample rate on %s (sun compatible).\n"), + rate / 1000, (rate % 1000) / 100, snd_device); global.echo = 0; -# endif +# endif } -# else /* SUN audio */ -# if defined(__CYGWIN32__) +# else /* SUN audio */ +# if defined(HAVE_WINSOUND) /* * Windows sound info */ @@ -317,7 +588,7 @@ WAVEFORMATEX wavform; if (waveOutGetNumDevs() < 1) { - errmsgno(EX_BAD, "No sound devices available!\n"); + errmsgno(EX_BAD, _("No sound devices available!\n")); global.echo = 0; return (1); } @@ -327,7 +598,7 @@ */ if (check_winsound_caps(bits, rate, global.channels) != 0) { errmsgno(EX_BAD, - "Soundcard capabilities are not sufficient!\n"); + _("Soundcard capabilities are not sufficient!\n")); global.echo = 0; return (1); } @@ -341,15 +612,16 @@ (wavform.wBitsPerSample / 8); wavform.nBlockAlign = global.channels * (wavform.wBitsPerSample / 8); + waveOutEvent = CreateEvent(NULL, TRUE, FALSE, NULL); DeviceID = 0; mmres = waveOutOpen(&DeviceID, WAVE_MAPPER, &wavform, - (unsigned long)WIN_CallBack, 0, CALLBACK_FUNCTION); + (uint32_t)waveOutProc, 0, CALLBACK_FUNCTION); if (mmres) { char erstr[329]; waveOutGetErrorText(mmres, erstr, sizeof (erstr)); errmsgno(EX_BAD, - "Soundcard open error: %s!\n", erstr); + _("Soundcard open error: %s!\n"), erstr); global.echo = 0; return (1); } @@ -367,8 +639,9 @@ wavehdr[i].lpData = malloc(wavehdr[i].dwBufferLength); if (wavehdr[i].lpData == NULL) { errmsg( - "No memory for sound buffers available.\n"); + _("No memory for sound buffers available.\n")); waveOutReset(0); + CloseHandle(waveOutEvent); waveOutClose(DeviceID); return (1); } @@ -380,7 +653,7 @@ waveOutGetErrorText(mmres, erstr, sizeof (erstr)); errmsgno(EX_BAD, - "soundcard prepare error: %s!\n", + _("soundcard prepare error: %s!\n"), erstr); return (1); } @@ -391,8 +664,8 @@ } } -# else -# if defined(__EMX__) +# else +# if defined(HAVE_OS2SOUND) # if defined(HAVE_MMPM) /* * OS/2 MMPM/2 MCI sound info @@ -429,7 +702,7 @@ /* * no sound */ - errmsgno(EX_BAD, "No sound devices available!\n"); + errmsgno(EX_BAD, _("No sound devices available!\n")); global.echo = 0; return (1); } @@ -458,7 +731,7 @@ MCI_GENERIC_PARMS mciGenericParms; errmsgno(EX_BAD, - "Soundcard capabilities are not sufficient!\n"); + _("Soundcard capabilities are not sufficient!\n")); global.echo = 0; /* * close @@ -470,81 +743,41 @@ } # endif /* EMX MMPM OS2 sound */ -# else -# if defined(__QNX__) +# else +# if defined(HAVE_ALSA) int card = -1; - int dev = 0; int rtn; - snd_pcm_channel_info_t pi; - snd_pcm_channel_params_t pp; - if (card == -1) { - rtn = snd_pcm_open_preferred(&pcm_handle, - &card, &dev, SND_PCM_OPEN_PLAYBACK); - if (rtn < 0) { - errmsg("Error opening sound device.\n"); - return (1); - } - } else { - rtn = snd_pcm_open(&pcm_handle, - card, dev, SND_PCM_OPEN_PLAYBACK); - if (rtn < 0) { - errmsg("Error opening sound device.\n"); - return (1); - } - } - - memset(&pi, 0, sizeof (pi)); - pi.channel = SND_PCM_CHANNEL_PLAYBACK; - rtn = snd_pcm_plugin_info(pcm_handle, &pi); +/*error("setting ALSA device: '%s'.\n", snd_device);*/ + rtn = snd_pcm_open(&pcm_handle, + snd_device, SND_PCM_STREAM_PLAYBACK, 0); if (rtn < 0) { - errmsg("Snd_pcm_plugin_info failed: '%s'.\n", - snd_strerror(rtn)); + errmsg(_("Error opening ALSA sound device (%s).\n"), snd_strerror(rtn)); return (1); } - memset(&pp, 0, sizeof (pp)); - pp.mode = SND_PCM_MODE_BLOCK; - pp.channel = SND_PCM_CHANNEL_PLAYBACK; - pp.start_mode = SND_PCM_START_FULL; - pp.stop_mode = SND_PCM_STOP_STOP; - - pp.buf.block.frag_size = pi.max_fragment_size; - pp.buf.block.frags_max = 1; - pp.buf.block.frags_min = 1; - - pp.format.interleave = 1; - pp.format.rate = rate; - pp.format.voices = global.channels; - if (bits == 8) { - pp.format.format = SND_PCM_SFMT_U8; - } else { - pp.format.format = SND_PCM_SFMT_S16_LE; - } - - rtn = snd_pcm_plugin_params(pcm_handle, &pp); - if (rtn < 0) { - errmsg("Snd_pcm_plugin_params failed: '%s'.\n", + if ((rtn = snd_pcm_set_params( + pcm_handle, + bits == 8 ? SND_PCM_FORMAT_U8 : SND_PCM_FORMAT_S16_LE, + SND_PCM_ACCESS_RW_INTERLEAVED, + global.channels, + rate, + 1, + 500000)) < 0) { + error("Error setting ALSA parameters: %s.\n", snd_strerror(rtn)); return (1); } - rtn = snd_pcm_plugin_prepare(pcm_handle, - SND_PCM_CHANNEL_PLAYBACK); - if (rtn < 0) { - errmsg("Snd_pcm_plugin_prepare failed: '%s'.\n", - snd_strerror(rtn)); - return (1); - } + frame_factor = ((bits == 8 ? 1 : 2) * global.channels); - global.soundcard_fd = snd_pcm_file_descriptor(pcm_handle, - SND_PCM_CHANNEL_PLAYBACK); # endif /* QNX sound */ -# endif /* EMX OS2 sound */ -# endif /* CYGWIN Windows sound */ -# endif /* else SUN audio */ -# endif /* else HAVE_OSS */ +# endif /* EMX OS2 sound */ +# endif /* CYGWIN Windows sound */ +# endif /* else SUN audio */ +# endif /* else HAVE_OSS */ +# endif /* else HAVE_SNDIO_H */ } #endif /* ifdef ECHO_TO_SOUNDCARD */ return (0); @@ -553,11 +786,11 @@ int open_snd_device() { +#if defined ECHO_TO_SOUNDCARD && !defined HAVE_WINSOUND && !defined HAVE_OS2SOUND #if defined(F_GETFL) && defined(F_SETFL) && defined(O_NONBLOCK) int fl; #endif -#if defined ECHO_TO_SOUNDCARD && !defined __CYGWIN32__ && !defined __EMX__ global.soundcard_fd = open(snd_device, #ifdef linux /* @@ -575,7 +808,8 @@ #endif return (global.soundcard_fd < 0); -#else + +#else /* def ECHO_TO_SOUNDCARD && !def __CYGWIN32__ && !def __CYGWIN32__ && !def __MINGW32__ && !def __EMX__ */ return (0); #endif } @@ -587,12 +821,63 @@ return (0); #else -# if defined __CYGWIN32__ +#if defined HAVE_PULSE_PULSEAUDIO_H +#ifdef PULSEAUDIO_SIMPLE_API + if (ptr_pa_simple) { + int ret = 0; + if (pa_simple_drain(ptr_pa_simple, &ret) < 0) { + errmsg(_("Soundcard pulse audio drain error: %d!\n"), ret); + } + pa_simple_free(ptr_pa_simple); + ptr_pa_simple = NULL; + return (0); + } +#else + if (ptr_pa_stream) { + pa_operation * ptr_op = + pa_stream_drain( + ptr_pa_stream, /* stream */ + NULL, /* callback */ + NULL); /* user data */ + if (ptr_op == NULL) { + errmsg(_("Soundcard pulse audio drain error!\n")); + } + while (pa_operation_get_state(ptr_op) != PA_OPERATION_DONE) { + if (pa_context_get_state(ptr_pa_context) != PA_CONTEXT_READY || + pa_stream_get_state(ptr_pa_stream) != PA_STREAM_READY || + pa_mainloop_iterate(ptr_pa_mainloop, 1, NULL) < 0) { + pa_operation_cancel(ptr_op); + break; + } + } + pa_operation_unref(ptr_op); + + pa_stream_disconnect(ptr_pa_stream); + pa_stream_unref(ptr_pa_stream); + + if (ptr_pa_context) + pa_context_unref(ptr_pa_context); + if (ptr_pa_mainloop) { + pa_signal_done(); + pa_mainloop_free(ptr_pa_mainloop); + } + ptr_pa_stream = NULL; + ptr_pa_context = NULL; + ptr_pa_mainloop = NULL; + ptr_pa_mainloop_api = NULL; + return (0); + } +#endif + /* FALLTHROUGH to native API */ +#endif /* !HAVE_PULSE_PULSEAUDIO_H */ + +# if defined(HAVE_WINSOUND) waveOutReset(0); + CloseHandle(waveOutEvent); return (waveOutClose(DeviceID)); # else /* !Cygwin32 */ -# if defined __EMX__ +# if defined HAVE_OS2SOUND # if defined HAVE_MMPM /* * close the sound device @@ -603,11 +888,19 @@ return (0); # endif /* HAVE_MMPM */ # else /* !EMX */ -# if defined __QNX__ - snd_pcm_plugin_flush(pcm_handle, SND_PCM_CHANNEL_PLAYBACK); +# if defined HAVE_ALSA + snd_pcm_drain(pcm_handle); return (snd_pcm_close(pcm_handle)); -# else /* !QNX */ +# else /* !ALSA */ +# if defined HAVE_SNDIO_H + if (hdl != NULL) { + sio_close(hdl); + hdl = NULL; + } + return (0); +# else return (close(global.soundcard_fd)); +# endif /* !HAVE_SNDIO_H */ # endif /* !QNX */ # endif /* !EMX */ # endif /* !Cygwin32 */ @@ -621,25 +914,71 @@ { int result = 0; #ifdef ECHO_TO_SOUNDCARD -#if defined __CYGWIN32__ + +#if defined HAVE_PULSE_PULSEAUDIO_H +#ifdef PULSEAUDIO_SIMPLE_API + if (ptr_pa_simple) { + int ret = pa_simple_write( + ptr_pa_simple, /* object */ + buffer, /* sample data */ + todo, /* size in bytes */ + &result); /* error code */ + if (ret < 0) { + errmsgno(EX_BAD, + _("Soundcard write error (pulseaudio): %d, %s!\n"), result, pa_strerror(result)); + } + return (0); + } +#else + if (ptr_pa_stream) { + result = pa_stream_write( + ptr_pa_stream, /* stream */ + buffer, /* sample data */ + todo, /* size in bytes */ + NULL, /* callback to free() data */ + 0LL, /* seek offset */ + PA_SEEK_RELATIVE); /* seek mode */ + if (result < 0) { + errmsgno(EX_BAD, + _("Soundcard write error (pulseaudio): %d, %s!\n"), result, pa_strerror(result)); + } + return (result); + } +#endif + /* FALLTHROUGH to native transport */ +#endif /* defined HAVE_PULSE_PULSEAUDIO_H */ + +#if defined HAVE_SNDIO_H + if (hdl == NULL || !sio_write(hdl, buffer, todo)) { + errmsgno(EX_BAD, + _("Soundcard write error (sndio)!\n")); + return (1); + } +#else +#if defined(HAVE_WINSOUND) MMRESULT mmres; wavehdr[lastwav].dwBufferLength = todo; memcpy(wavehdr[lastwav].lpData, buffer, todo); + while (wavehdrinuse >= WAVEHDRS) { + WaitForSingleObject(waveOutEvent, INFINITE); + ResetEvent(waveOutEvent); + } + wavehdrinuse++; mmres = waveOutWrite(DeviceID, &wavehdr[lastwav], sizeof (WAVEHDR)); if (mmres) { char erstr[129]; waveOutGetErrorText(mmres, erstr, sizeof (erstr)); - errmsgno(EX_BAD, "Soundcard write error: %s!\n", erstr); + errmsgno(EX_BAD, _("Soundcard write error (cygwin): %s!\n"), erstr); return (1); } if (++lastwav >= WAVEHDRS) lastwav -= WAVEHDRS; result = mmres; #else -#if defined __EMX__ +#if defined HAVE_OS2SOUND Playlist[BufferInd].ulOperand1 = buffer; Playlist[BufferInd].ulOperand2 = todo; Playlist[BufferInd].ulOperand3 = 0; @@ -651,7 +990,7 @@ */ memset(&mciPlayParms, 0, sizeof (mciPlayParms)); if (mciSendCommand(DeviceID, MCI_PLAY, MCI_FROM, &mciPlayParms, 0)) { - errmsgno(EX_BAD, "Soundcard write error: %s!\n", erstr); + errmsgno(EX_BAD, _("Soundcard write error (os/2): %s!\n"), erstr); return (1); } result = 0; @@ -665,9 +1004,10 @@ #endif towrite = todo; do { + int wrote; +#ifdef HAVE_SELECT fd_set writefds[1]; struct timeval timeout2; - int wrote; timeout2.tv_sec = 0; timeout2.tv_usec = 4*120000; @@ -679,23 +1019,35 @@ switch (retval2) { default: - case -1: errmsg("Select failed.\n"); + case -1: errmsg(_("Select failed.\n")); /* FALLTHROUGH */ case 0: /* timeout */ result = 2; goto outside_loop; case 1: break; } +#endif /* HAVE_SELECT */ if (towrite > todo) { towrite = todo; } -#if defined __QNX__ && defined HAVE_SYS_ASOUNDLIB_H - wrote = snd_pcm_plugin_write(pcm_handle, buffer, towrite); +#if defined HAVE_ALSA + { + snd_pcm_sframes_t frames = towrite / frame_factor; + wrote = snd_pcm_writei(pcm_handle, buffer, frames); + if (wrote < 0) { + wrote = snd_pcm_recover(pcm_handle, wrote, 0); + } + wrote *= frame_factor; + } #else wrote = write(global.soundcard_fd, buffer, towrite); #endif if (wrote <= 0) { - errmsg("Can't write audio.\n"); +#if defined HAVE_ALSA + errmsg(_("Can't write audio (alsa).\n")); +#else + errmsg(_("Can't write audio (oss).\n")); +#endif result = 1; goto outside_loop; } else { @@ -707,6 +1059,7 @@ ; #endif /* !defined __EMX__ */ #endif /* !defined __CYGWIN32__ */ +#endif /* !defined HAVE_SNDIO_H */ #endif /* ECHO_TO_SOUNDCARD */ return (result); } diff -Nru cdrtools-2.01.01a33/cdda2wav/sndfile.h cdrtools-3.02a09/cdda2wav/sndfile.h --- cdrtools-2.01.01a33/cdda2wav/sndfile.h 2006-09-13 15:42:39.000000000 +0000 +++ cdrtools-3.02a09/cdda2wav/sndfile.h 2010-01-12 21:41:45.000000000 +0000 @@ -1,4 +1,4 @@ -/* @(#)sndfile.h 1.7 06/09/13 Copyright 1998,1999 Heiko Eissfeldt, Copyright 2006 J. Schilling */ +/* @(#)sndfile.h 1.9 10/01/12 Copyright 1998,1999 Heiko Eissfeldt, Copyright 2006-2010 J. Schilling */ /* * generic soundfile structure @@ -32,6 +32,7 @@ Ulong (* InSizeToOutSize) __PR((Ulong BytesToDo)); int need_big_endian; + char *auf_cuename; }; #endif /* _SNDFILE_H */ diff -Nru cdrtools-2.01.01a33/cdda2wav/sun.c cdrtools-3.02a09/cdda2wav/sun.c --- cdrtools-2.01.01a33/cdda2wav/sun.c 2006-09-13 15:46:08.000000000 +0000 +++ cdrtools-3.02a09/cdda2wav/sun.c 2013-04-28 11:57:47.000000000 +0000 @@ -1,12 +1,13 @@ -/* @(#)sun.c 1.8 06/09/13 Copyright 1998,1999 Heiko Eissfeldt, Copyright 2006 J. Schilling */ +/* @(#)sun.c 1.15 13/04/28 Copyright 1998,1999 Heiko Eissfeldt, Copyright 2006-2013 J. Schilling */ +#include "config.h" #ifndef lint -static char sccsid[] = -"@(#)sun.c 1.8 06/09/13 Copyright 1998,1999 Heiko Eissfeldt, Copyright 2006 J. Schilling"; +static UConst char sccsid[] = +"@(#)sun.c 1.15 13/04/28 Copyright 1998,1999 Heiko Eissfeldt, Copyright 2006-2013 J. Schilling"; #endif /* * Copyright (C) by Heiko Eissfeldt - * Copyright (c) 2006 J. Schilling + * Copyright (c) 2006-2013 J. Schilling * * definitions for sun pcm output */ @@ -23,12 +24,13 @@ */ #include "config.h" -#include +#include #include #include #include "mytype.h" #include "byteorder.h" #include "sndfile.h" +#include "global.h" typedef struct SUNHDR { unsigned int magic; /* dns. a la .snd */ @@ -59,15 +61,17 @@ long nBitsPerSample; Ulong expected_bytes; { - Ulong format = nBitsPerSample > 8 ? 0x03 : 0x02; + Ulong hdr_format = nBitsPerSample > 8 ? 0x03 : 0x02; sunHdr.magic = cpu_to_le32(UINT4_C(0x646e732e)); sunHdr.data_location = cpu_to_be32(0x20); sunHdr.size = cpu_to_be32(expected_bytes); - sunHdr.format = cpu_to_be32(format); + sunHdr.format = cpu_to_be32(hdr_format); sunHdr.sample_rate = cpu_to_be32(rate); sunHdr.channelcount = cpu_to_be32(channels); + global.md5offset = sizeof (sunHdr); + return (write(audio, &sunHdr, sizeof (sunHdr))); } @@ -109,5 +113,6 @@ Uchar *buf, size_t BytesToDo))) write, /* get sound samples out */ InSizeToOutSize, /* compressed? output file size */ - 1 /* needs big endian samples */ + 1, /* needs big endian samples */ + "AU" }; diff -Nru cdrtools-2.01.01a33/cdda2wav/toc.c cdrtools-3.02a09/cdda2wav/toc.c --- cdrtools-2.01.01a33/cdda2wav/toc.c 2007-05-24 11:15:37.000000000 +0000 +++ cdrtools-3.02a09/cdda2wav/toc.c 2017-07-18 23:05:23.000000000 +0000 @@ -1,11 +1,12 @@ -/* @(#)toc.c 1.71 07/05/24 Copyright 1998-2003 Heiko Eissfeldt, Copyright 2004-2007 J. Schilling */ +/* @(#)toc.c 1.104 17/07/19 Copyright 1998-2003,2017 Heiko Eissfeldt, Copyright 2004-2017 J. Schilling */ +#include "config.h" #ifndef lint -static char sccsid[] = -"@(#)toc.c 1.71 07/05/24 Copyright 1998-2003 Heiko Eissfeldt, Copyright 2004-2007 J. Schilling"; +static UConst char sccsid[] = +"@(#)toc.c 1.104 17/07/19 Copyright 1998-2003,2017 Heiko Eissfeldt, Copyright 2004-2017 J. Schilling"; #endif /* * CDDA2WAV (C) Heiko Eissfeldt heiko@hexco.de - * Copyright (c) 2004-2007 J. Schilling + * Copyright (c) 2004-2017 J. Schilling, Heiko Eissfeldt * * The CDDB routines are compatible to cddbd (C) Ti Kan and Steve Scherf */ @@ -16,70 +17,62 @@ * with the License. * * See the file CDDL.Schily.txt in this distribution for details. + * A copy of the CDDL is also available via the Internet at + * http://www.opensource.org/licenses/cddl1.txt * * When distributing Covered Code, include this CDDL HEADER in each * file and include the License file CDDL.Schily.txt from this distribution. */ #include "config.h" -#include +#include #include #include #include #include #include #include /* sleep */ -#include +#include #include #include #include -#include -#include +#include +#include #include +#include -#define CD_TEXT -#define CD_EXTRA -#undef DEBUG_XTRA -#undef DEBUG_CDTEXT -#undef DEBUG_CDDBP +#include +/* tcp stuff */ +/* fix OS/2 compilation */ +#ifdef __EMX__ +#define gethostid nogethostid +#endif -#include +#include +#undef gethostid +#include +#include #include "mytype.h" #include "byteorder.h" #include "interface.h" #include "cdda2wav.h" #include "global.h" -#include "sha.h" #include "base64.h" #include "toc.h" #include "exitcodes.h" #include "ringbuff.h" #include "version.h" -int Get_Mins __PR((unsigned long p_track)); -int Get_Secs __PR((unsigned long p_track)); -int Get_Frames __PR((unsigned long p_track)); -int Get_Flags __PR((unsigned long p_track)); -int Get_SCMS __PR((unsigned long p_track)); +#include +#define CD_TEXT +#define CD_EXTRA +#undef DEBUG_XTRA +#undef DEBUG_CDTEXT +#undef DEBUG_CDDBP -#if defined USE_REMOTE -/* tcp stuff */ -/* fix OS/2 compilation */ -#ifdef __EMX__ -#define gethostid nogethostid -#endif -#include -#undef gethostid -#include -#if defined(HAVE_NETDB_H) && !defined(HOST_NOT_FOUND) && \ - !defined(_INCL_NETDB_H) -#include -#define _INCL_NETDB_H -#endif -#endif int have_CD_text; int have_multisession; @@ -88,31 +81,38 @@ struct iterator; -static void UpdateTrackData __PR((int p_num)); -static void UpdateIndexData __PR((int p_num)); -static void UpdateTimeData __PR((int p_min, int p_sec, int p_frm)); -static unsigned int is_multisession __PR((void)); -static unsigned int get_end_of_last_audio_track __PR((unsigned mult_off)); -static int cddb_sum __PR((int n)); -static void dump_extra_info __PR((unsigned from)); -static int GetIndexOfSector __PR((unsigned sec, unsigned track)); -static int patch_cd_extra __PR((unsigned track, unsigned long sector)); -static void patch_to_audio __PR((unsigned long p_track)); -static int restrict_tracks_illleadout __PR((void)); +int Get_Mins __PR((unsigned long p_track)); +int Get_Secs __PR((unsigned long p_track)); +int Get_Frames __PR((unsigned long p_track)); +int Get_Flags __PR((unsigned long p_track)); +int Get_SCMS __PR((unsigned long p_track)); + +LOCAL void UpdateTrackData __PR((int p_num)); +LOCAL void UpdateIndexData __PR((int p_num)); +LOCAL void UpdateTimeData __PR((int p_min, int p_sec, int p_frm)); +LOCAL unsigned int is_multisession __PR((void)); +LOCAL unsigned int get_end_of_last_audio_track __PR((unsigned mult_off)); +LOCAL void check_hidden __PR((void)); +LOCAL int cddb_sum __PR((int n)); +LOCAL void dump_extra_info __PR((unsigned from)); +LOCAL int GetIndexOfSector __PR((unsigned sec, unsigned track)); +LOCAL int patch_cd_extra __PR((unsigned track, unsigned long sector)); +LOCAL void patch_to_audio __PR((unsigned long p_track)); +LOCAL int restrict_tracks_illleadout __PR((void)); -static void Set_MCN __PR((unsigned char *MCN_arg)); -static void Set_ISRC __PR((int track, +LOCAL void Set_MCN __PR((unsigned char *MCN_arg)); +LOCAL void Set_ISRC __PR((unsigned track, const unsigned char *ISRC_arg)); -static unsigned char g_track = 0xff; /* current track */ -static unsigned char g_index = 0xff; /* current index */ +LOCAL unsigned char g_track = 0xff; /* current track */ +LOCAL unsigned char g_index = 0xff; /* current index */ -static void InitIterator __PR((struct iterator *iter, unsigned long p_track)); +LOCAL void InitIterator __PR((struct iterator *iter, unsigned long p_track)); /* - * Conversion function: from logical block adresses to minute,second,frame + * Conversion function: from logical block addresses to minute,second,frame */ int lba_2_msf(lba, m, s, f) @@ -144,12 +144,12 @@ /* * print the track currently read */ -static void +LOCAL void UpdateTrackData(p_num) int p_num; { if (global.quiet == 0) { - fprintf(stderr, "\ntrack: %.2d, ", p_num); fflush(stderr); + fprintf(outfp, _("\ntrack: %.2d, "), p_num); fflush(outfp); } g_track = (unsigned char) p_num; } @@ -158,12 +158,12 @@ /* * print the index currently read */ -static void +LOCAL void UpdateIndexData(p_num) int p_num; { if (global.quiet == 0) { - fprintf(stderr, "index: %.2d\n", p_num); fflush(stderr); + fprintf(outfp, _("index: %.2d\n"), p_num); fflush(outfp); } g_index = (unsigned char) p_num; } @@ -172,15 +172,15 @@ /* * print the time of track currently read */ -static void +LOCAL void UpdateTimeData(p_min, p_sec, p_frm) int p_min; int p_sec; int p_frm; { if (global.quiet == 0) { - fprintf(stderr, "time: %.2d:%.2d.%.2d\r", p_min, p_sec, p_frm); - fflush(stderr); + fprintf(outfp, _("time: %.2d:%.2d.%.2d\r"), p_min, p_sec, p_frm); + fflush(outfp); } } @@ -188,15 +188,15 @@ AnalyzeQchannel(frame) unsigned frame; { - subq_chnl *sub_ch; - if (trackindex_disp != 0) { + subq_chnl *sub_ch; + sub_ch = ReadSubQ(get_scsi_p(), GET_POSITIONDATA, 0); - /* - * analyze sub Q-channel data - */ - if (sub_ch->track != g_track || + /* + * analyze sub Q-channel data + */ + if (sub_ch->track != g_track || sub_ch->index != g_index) { UpdateTrackData(sub_ch->track); UpdateIndexData(sub_ch->index); @@ -209,7 +209,7 @@ } unsigned cdtracks = 0; -static int have_hiddenAudioTrack = 0; +LOCAL int have_hiddenAudioTrack = 0; int no_disguised_audiotracks() @@ -228,7 +228,7 @@ int i; errmsgno(EX_BAD, - "Warning: wrong track types found: patching to audio...\n"); + _("Warning: wrong track types found: patching to audio...\n")); for (i = 0; i < cdtracks; i++) patch_to_audio(i); } @@ -243,14 +243,16 @@ int retval = (*doReadToc)(get_scsi_p()); #if defined SIM_ILLLEADOUT +extern TOC g_toc[MAXTRK+1]; /* hidden track + 100 regular tracks */ + g_toc[cdtracks+1] = 20*75; #endif return (retval); } -static int can_read_illleadout __PR((void)); +LOCAL int can_read_illleadout __PR((void)); -static int +LOCAL int can_read_illleadout() { SCSI *scgp = get_scsi_p(); @@ -297,7 +299,7 @@ handle_cdtext() { #ifdef CD_TEXT - if (bufferTOC[0] == 0 && bufferTOC[1] == 0) { + if (global.buf[0] == 0 && global.buf[1] == 0) { have_CD_text = 0; return (have_CD_text); } @@ -308,11 +310,13 @@ { int i; int count_fails = 0; - int len = (bufferTOC[0] << 8) | bufferTOC[1]; + int len = ((global.buf[0] & 0xFF) << 8) | (global.buf[1] & 0xFF); - len = min(len, 2048); + len += 2; + len = min(len, global.bufsize); for (i = 0; i < len-4; i += 18) { - if (bufferTOC[4+i] < 0x80 || bufferTOC[4+i] > 0x8f) { + if ((global.buf[4+i] & 0xFF) < 0x80 || + (global.buf[4+i] & 0xFF) > 0x8f) { count_fails++; } } @@ -332,20 +336,20 @@ #if defined CDROMMULTISESSION -static int tmp_fd; +LOCAL int tmp_fd; #endif #ifdef CD_EXTRA #include "cd_extra.c" #endif -static unsigned session_start; +LOCAL unsigned session_start; /* * A Cd-Extra is detected, if it is a multisession CD with * only audio tracks in the first session and a data track * in the last session. */ -static unsigned +LOCAL unsigned is_multisession() { unsigned mult_off; @@ -369,11 +373,11 @@ result = ioctl(tmp_fd, CDROMMULTISESSION, &ms_str); if (result == -1) { if (global.verbose != 0) - errmsg("Multi session ioctl not supported.\n"); + errmsg(_("Multi session ioctl not supported.\n")); } else { #ifdef DEBUG_XTRA - fprintf(stderr, - "current ioctl multisession_offset = %u\n", + fprintf(outfp, + _("current ioctl multisession_offset = %u\n"), ms_str.addr.lba); #endif if (interface == GENERIC_SCSI) @@ -389,8 +393,8 @@ } #ifdef DEBUG_XTRA - fprintf(stderr, - "current guessed multisession_offset = %u\n", + fprintf(outfp, + _("current guessed multisession_offset = %u\n"), mult_off); #endif return (mult_off); @@ -403,7 +407,7 @@ * the start of the leadout. If this is not supported, we subtract * a constant of SESSIONSECTORS sectors (found heuristically). */ -static unsigned +LOCAL unsigned get_end_of_last_audio_track(mult_off) unsigned mult_off; { @@ -420,14 +424,14 @@ } } -static void dump_cdtext_info __PR((void)); +LOCAL void dump_cdtext_info __PR((void)); #if defined CDDB_SUPPORT -static void emit_cddb_form __PR((char *fname_baseval)); +LOCAL void emit_cddb_form __PR((char *fname_baseval)); #endif #if defined CDINDEX_SUPPORT -static void emit_cdindex_form __PR((char *fname_baseval)); +LOCAL void emit_cdindex_form __PR((char *fname_baseval)); #endif @@ -522,13 +526,13 @@ */ if (Get_StartSector(1) > Get_StartSector(LastTrack())) { errmsgno(EX_BAD, - "Warning: first track has negative start sector! Setting to zero.\n"); + _("Warning: first track has negative start sector! Setting to zero.\n")); toc_entry(1, Get_Flags(1), Get_Tracknumber(1), Get_ISRC(1), 0, 0, 2, 0); } #ifdef DEBUG_XTRA - fprintf(stderr, "current multisession_offset = %u\n", mult_off); + fprintf(outfp, "current multisession_offset = %u\n", mult_off); #endif dump_cdtext_info(); @@ -540,7 +544,7 @@ */ real_end = get_end_of_last_audio_track(mult_off); #ifdef DEBUG_XTRA - fprintf(stderr, "current end = %u\n", real_end); + fprintf(outfp, "current end = %u\n", real_end); #endif j = FirstDataTrack(); @@ -569,16 +573,15 @@ } #else errmsgno(EX_BAD, - "Cannot lookup titles: no cddbp support included!\n"); + _("Cannot lookup titles: no cddbp support included!\n")); #endif } #if defined CDINDEX_SUPPORT || defined CDDB_SUPPORT if (have_CD_text || have_CD_extra || have_CDDB) { unsigned long count_audio_tracks = 0; - static struct iterator i; + struct iterator i; - if (i.reset == NULL) - InitIterator(&i, 1); + InitIterator(&i, 1); while (i.hasNextTrack(&i)) { struct TOC *p = i.getNextTrack(&i); @@ -602,15 +605,91 @@ */ patch_cd_extra(j, real_end); #if defined CD_EXTRA && defined DEBUG_XTRA - fprintf(stderr, + fprintf(outfp, "setting end of session (track %d) to %u\n", j, real_end); #endif } + check_hidden(); return (offset); } -static int +LOCAL void +check_hidden() +{ + long sect; + + if (!global.no_hidden_track && + (sect = Get_AudioStartSector(FirstAudioTrack())) > 0) { + myringbuff *p = RB_BASE; /* Not yet initialized */ + int i; + int n; + BOOL isdata = TRUE; + + get_scsi_p()->silent++; + /* + * switch cdrom to data mode + */ + EnableCdda(get_scsi_p(), 0, 0); + i = ReadCdRomData(get_scsi_p(), (Uchar *)p->data, 0, 1); + if (i != 1) { + have_hiddenAudioTrack = 1; + isdata = FALSE; + } + if (global.quiet == 0) { + fprintf(outfp, + _("%ld sectors of %sdata before track #%ld"), + sect, !isdata ? _("audio "):"", FirstAudioTrack()); + } + /* + * switch cdrom to audio mode + */ + EnableCdda(get_scsi_p(), 1, CD_FRAMESIZE_RAW); + i = ReadCdRom(get_scsi_p(), p->data, 0, 1); + if (isdata && i != 1) { + if (global.quiet == 0) { + fprintf(outfp, + _(", ignoring.\n")); + } + } else if (i != 1) { + if (global.quiet == 0) { + fprintf(outfp, + _(", unreadable by this drive.\n")); + } + have_hiddenAudioTrack = 0; + } else { + for (n = 0; n < sect; n += global.nsectors) { + int o; + + fillbytes(p->data, CD_FRAMESIZE_RAW, '\0'); + i = ReadCdRom(get_scsi_p(), p->data, n, global.nsectors); + if (i != global.nsectors) + break; + if ((o = cmpnullbytes(p->data, global.nsectors * CD_FRAMESIZE_RAW)) < + global.nsectors * CD_FRAMESIZE_RAW) { + if (global.quiet == 0) { + fprintf(outfp, + _(", audible data at sector %d.\n"), + n + o / CD_FRAMESIZE_RAW); + } + break; + } + } + if (n >= sect) { + have_hiddenAudioTrack = 0; + if (global.quiet == 0) + fprintf(outfp, "\n"); + } else { + if (global.quiet == 0) + fprintf(outfp, + _("Hidden audio track with %ld sectors found.\n"), sect); + } + } + get_scsi_p()->silent--; + } +} + +LOCAL int cddb_sum(n) int n; { @@ -645,21 +724,21 @@ void TestGenerateId() { - SHA_INFO sha; + SHA1_CTX sha; unsigned char digest[20], *base64; unsigned long size; - sha_init(&sha); - sha_update(&sha, (unsigned char *)"0123456789", 10); - sha_final(digest, &sha); + SHA1Init(&sha); + SHA1Update(&sha, (unsigned char *)"0123456789", 10); + SHA1Final(digest, &sha); base64 = rfc822_binary((char *)digest, 20, &size); if (strncmp((char *) base64, "h6zsF82dzSCnFsws9nQXtxyKcBY-", size)) { free(base64); - fprintf(stderr, + fprintf(outfp, "The SHA-1 hash function failed to properly generate the\n"); - fprintf(stderr, "test key.\n"); + fprintf(outfp, "test key.\n"); exit(INTERNAL_ERROR); } free(base64); @@ -669,13 +748,15 @@ void calc_cdindex_id() { - SHA_INFO sha; + SHA1_CTX sha; unsigned char digest[20], *base64; unsigned long size; unsigned i; char temp[9]; #ifdef TESTCDINDEX +extern TOC g_toc[MAXTRK+1]; /* hidden track + 100 regular tracks */ + TestGenerateId(); g_toc[1].bTrack = 1; cdtracks = 15; @@ -698,25 +779,25 @@ g_toc[i++].dwStartSector = 289479U; g_toc[i++].dwStartSector = 325732U; #endif - sha_init(&sha); + SHA1Init(&sha); sprintf(temp, "%02X", Get_Tracknumber(1)); - sha_update(&sha, (unsigned char *)temp, 2); + SHA1Update(&sha, (unsigned char *)temp, 2); sprintf(temp, "%02X", Get_Tracknumber(cdtracks)); - sha_update(&sha, (unsigned char *)temp, 2); + SHA1Update(&sha, (unsigned char *)temp, 2); /* the position of the leadout comes first. */ sprintf(temp, "%08lX", 150 + Get_StartSector(CDROM_LEADOUT)); - sha_update(&sha, (unsigned char *)temp, 8); + SHA1Update(&sha, (unsigned char *)temp, 8); /* now 99 tracks follow with their positions. */ for (i = 1; i <= cdtracks; i++) { sprintf(temp, "%08lX", 150+Get_StartSector(i)); - sha_update(&sha, (unsigned char *)temp, 8); + SHA1Update(&sha, (unsigned char *)temp, 8); } for (i++; i <= 100; i++) { - sha_update(&sha, (unsigned char *)"00000000", 8); + SHA1Update(&sha, (unsigned char *)"00000000", 8); } - sha_final(digest, &sha); + SHA1Final(digest, &sha); base64 = rfc822_binary((char *)digest, 20, &size); global.cdindex_id = base64; @@ -726,11 +807,11 @@ #if defined CDDB_SUPPORT #ifdef PROTOTYPES -static void +LOCAL void escape_and_split(FILE *channel, const char *args, ...) #else /*VARARGS3*/ -static void +LOCAL void escape_and_split(channel, args, va_alist) FILE *channel; const char *args; @@ -781,11 +862,11 @@ va_end(marker); } -static void +LOCAL void emit_cddb_form(fname_baseval) char *fname_baseval; { -static struct iterator i; + struct iterator i; unsigned first_audio; FILE *cddb_form; char fname[200]; @@ -833,18 +914,18 @@ fprintf(cddb_form, "DISCID=%08lx\n", (unsigned long)global.cddb_id); - if (global.disctitle == NULL && global.creator == NULL) { + if (global.disctitle == NULL && global.performer == NULL) { fprintf(cddb_form, "DTITLE=\n"); } else { - if (global.creator == NULL) { + if (global.performer == NULL) { escape_and_split(cddb_form, "DTITLE=", global.disctitle, ""); } else if (global.disctitle == NULL) { escape_and_split(cddb_form, "DTITLE=", - global.creator, ""); + global.performer, ""); } else { - escape_and_split(cddb_form, "DTITLE=", - global.creator, " / ", + escape_and_split(cddb_form, "DTITLE=", + global.performer, " / ", global.disctitle, ""); } } @@ -854,7 +935,7 @@ fprintf(cddb_form, "DYEAR=\n"); fprintf(cddb_form, "DGENRE=%s\n", global.cddb_genre); - i.reset(&i); + InitIterator(&i, 1); while (i.hasNextTrack(&i)) { struct TOC *p = i.getNextTrack(&i); int ii; @@ -881,7 +962,7 @@ global.copyright_message, ""); } - i.reset(&i); + InitIterator(&i, 1); while (i.hasNextTrack(&i)) { struct TOC *p = i.getNextTrack(&i); int ii; @@ -898,7 +979,7 @@ } #if defined USE_REMOTE -#include +#include LOCAL int readn __PR((register int fd, register char *ptr, register int nbytes)); @@ -916,12 +997,12 @@ nread = _niread(fd, ptr, nbytes); #ifdef DEBUG_CDDBP if (nread > 0) { - fprintf(stderr, "READ :(%d)", nread); + fprintf(outfp, "READ :(%d)", nread); write(2, ptr, nread); } #endif if (nread < 0) { - errmsg("Socket read error: fd=%d, ptr=%p, nbytes=%d.\n", + errmsg(_("Socket read error: fd=%d, ptr=%p, nbytes=%d.\n"), fd, ptr, nbytes); ptr[0] = '\0'; } @@ -940,10 +1021,10 @@ nwritten = _nixwrite(fd, ptr, nbytes); #ifdef DEBUG_CDDBP if (nwritten <= 0) - fprintf(stderr, "WRITE:%s\n", ptr); + fprintf(outfp, "WRITE:%s\n", ptr); #endif if (nwritten < 0) { - errmsg("Socket write error: fd=%d, ptr=%p, nbytes=%d.\n", + errmsg(_("Socket write error: fd=%d, ptr=%p, nbytes=%d.\n"), fd, ptr, nbytes); } return (nwritten); @@ -962,7 +1043,7 @@ int finished = 0; char *p = inbuff; int ind = 0; - char **target = (char **)&global.creator; + char **target = (char **)&global.performer; do { while (readbytes > 0) { @@ -1051,7 +1132,7 @@ **target = '\0'; } else { *target = realloc(*target, - strlen(*target) + clen - 1); + strlen(*target) + clen + 1); } if (*target != NULL) { strcat((char *)*target, inbuff+ind+7); @@ -1191,22 +1272,26 @@ * list entries. */ q = p; - fprintf(stderr, "%u entries found:\n", nr); + fprintf(outfp, _("%u entries found:\n"), nr); for (q = (char *)memchr(q, '\n', size - (q-p)), o = p, i = 0; i < nr; i++) { *q = '\0'; - fprintf(stderr, "%02u: %s\n", i, o); + fprintf(outfp, "%02u: %s\n", i, o); o = q+1; q = (char *)memchr(q, '\n', size - (q-p)); } - fprintf(stderr, "%02u: ignore\n", i); + fprintf(outfp, _("%02u: ignore\n"), i); /* * get user response. + * Some OS seem to misshandle stderr and make it buffered, so we + * call fflush(outfp) here. */ do { - fprintf(stderr, "please choose one (0-%u): ", nr); - scanf("%u", &user_choice); + fprintf(outfp, _("please choose one (0-%u): "), nr); + fflush(outfp); + if (scanf("%u", &user_choice) != 1) + user_choice = nr; } while (user_choice > nr); if (user_choice == nr) @@ -1240,7 +1325,7 @@ struct hostent *he; struct servent *se; struct passwd *pw = getpwuid(getuid()); - char hostname[HOST_NAME_MAX]; + char hostname[MAXHOSTNAMELEN+1]; char inbuff[SOCKBUFF]; char outbuff[SOCKBUFF]; int i; @@ -1251,7 +1336,7 @@ sock_fd = socket(AF_INET, SOCK_STREAM, 0); if (sock_fd < 0) { - errmsg("Cddb socket failed.\n"); + errmsg(_("Cddb socket failed.\n")); retval = -1; goto errout; } @@ -1267,60 +1352,45 @@ else he = gethostbyname(CDDBHOST /*"freedb.freedb.org"*/); - if (he == NULL) { - errmsg("Cddb cannot resolve freedb host.\n"); - he = malloc(sizeof (struct hostent)); - memset(he, 0, sizeof (struct hostent)); - he->h_length = 4; - he->h_addrtype = AF_INET; - he->h_addr_list = malloc(4); - he->h_addr_list[0] = malloc(4); - ((struct in_addr *)(he->h_addr_list[0]))->s_addr = - /* kingfisher.berlios.de freedb.freedb.de */ - htonl(UINT_C(0xc3254d85)); /*0xc2610412*/ - he->h_name = "freedb.freedb.org"; -#if 0 - retval = -1; - goto errout; -#endif - } - /* * save result data IMMEDIATELY!! */ memset(&sa, 0, sizeof (struct sockaddr_in)); - sa.sin_family = he->h_addrtype; /* AF_INET; */ - sa.sin_addr.s_addr = ((struct in_addr *)((he->h_addr_list)[0]))->s_addr; + + if (he != NULL) { + sa.sin_family = he->h_addrtype; /* AF_INET; */ + sa.sin_addr.s_addr = ((struct in_addr *)((he->h_addr_list)[0]))->s_addr; + } else { + errmsg(_("Cddb cannot resolve freedb host.\n")); + sa.sin_family = AF_INET; + sa.sin_addr.s_addr = htonl(UINT_C(0x526256aa)); /* freedb.freedb.de */ + } se = NULL; - if (global.cddbp_port == NULL) + if (global.cddbp_port != NULL) { + sa.sin_port = htons(atoi(global.cddbp_port)); + } else { se = getservbyname("cddbp-alt", "tcp"); - if (se == NULL) { - if (global.cddbp_port == NULL) { - se = getservbyname("cddbp", "tcp"); - } if (se == NULL) { - se = malloc(sizeof (struct servent)); - memset(se, 0, sizeof (struct servent)); - se->s_port = htons(CDDBPORT /*8880*/); + if (global.cddbp_port == NULL) { + se = getservbyname("cddbp", "tcp"); + } + } + if (se != NULL) { + sa.sin_port = se->s_port; + } else { #if 0 errmsg("Cddb cannot resolve cddbp or cddbp-alt port.\n"); - retval = -1; - goto errout; #endif + sa.sin_port = htons(CDDBPORT /*8880*/); } } - if (global.cddbp_port != NULL) { - se->s_port = htons(atoi(global.cddbp_port)); - } - - sa.sin_port = se->s_port; /* TODO timeout */ if (0 > connect(sock_fd, (struct sockaddr *)&sa, sizeof (struct sockaddr_in))) { - errmsg("Cddb connect failed.\n"); + errmsg(_("Cddb connect failed.\n")); retval = -1; goto errout; } @@ -1335,7 +1405,7 @@ } if (strncmp(inbuff, "200 ", 4) && strncmp(inbuff, "201 ", 4)) { errmsgno(EX_BAD, - "Bad status from freedb server during sign-on banner: %s.\n", inbuff); + _("Bad status from freedb server during sign-on banner: %s.\n"), inbuff); retval = -1; goto errout; } @@ -1360,7 +1430,7 @@ if (!space_err) { space_err = TRUE; errmsgno(EX_BAD, - "Warning: Space in user name '%s'.\n", + _("Warning: Space in user name '%s'.\n"), pw->pw_name); } *q = '_'; @@ -1369,7 +1439,7 @@ if (!ascii_err) { ascii_err = TRUE; errmsgno(EX_BAD, - "Warning: Nonascii character in user name '%s'.\n", + _("Warning: Nonascii character in user name '%s'.\n"), pw->pw_name); } *q = '_'; @@ -1393,7 +1463,7 @@ if (!space_err) { space_err = TRUE; errmsgno(EX_BAD, - "Warning: Space in hostname '%s'.\n", + _("Warning: Space in hostname '%s'.\n"), hostname); } *q = '_'; @@ -1402,7 +1472,7 @@ if (!ascii_err) { ascii_err = TRUE; errmsgno(EX_BAD, - "Warning: Nonascii character in hostname '%s'.\n", + _("Warning: Nonascii character in hostname '%s'.\n"), hostname); } *q = '_'; @@ -1425,7 +1495,7 @@ if (strncmp(inbuff, "200 ", 4)) { inbuff[readbytes] = '\0'; errmsgno(EX_BAD, - "Bad status from freedb server during hello: %s.\n", inbuff); + _("Bad status from freedb server during hello: %s.\n"), inbuff); retval = -1; goto signoff; } @@ -1445,7 +1515,7 @@ if (strncmp(inbuff, "201 ", 4) > 0) { inbuff[readbytes] = '\0'; errmsgno(EX_BAD, - "Bad status from freedb server during proto command: %s.\n", + _("Bad status from freedb server during proto command: %s.\n"), inbuff); retval = -1; goto signoff; @@ -1480,7 +1550,7 @@ if (strncmp(inbuff, "201 ", 4) > 0) { inbuff[readbytes] = '\0'; errmsgno(EX_BAD, - "Bad status from freedb server during proto x: %s.\n", + _("Bad status from freedb server during proto x: %s.\n"), inbuff); retval = -1; goto signoff; @@ -1540,6 +1610,11 @@ /* strcpy(outbuff, */ /* "cddb query 9709210c 12 150 12010 33557 50765 65380 81467 93235 109115 124135 137732 152575 166742 2339\n"); */ /* strcpy(outbuff, "cddb query 03015501 1 296 344\n"); */ +/* + * The next line is a CD with Tracktitle= 'Au fond d'un rêve doré' + */ +/* sprintf(outbuff, "cddb query %s\n", "35069e05 5 150 12471 25528 35331 56166 1696");*/ + writen(sock_fd, outbuff, strlen(outbuff)); readbytes = readn(sock_fd, inbuff, sizeof (inbuff)); @@ -1593,7 +1668,7 @@ break; default: errmsgno(EX_BAD, - "Multiple entries found: %s.\n", inbuff); + _("Multiple entries found: %s.\n"), inbuff); retval = 2; goto signoff; } @@ -1601,11 +1676,11 @@ } else if (strncmp(inbuff, "200 ", 4)) { if (strncmp(inbuff, "202 ", 4) == 0) { - errmsgno(EX_BAD, "No cddb entry found: %s.\n", inbuff); + errmsgno(EX_BAD, _("No cddb entry found: %s.\n"), inbuff); retval = 1; } else { errmsgno(EX_BAD, - "Bad status from freedb server during query: %s.\n%s", + _("Bad status from freedb server during query: %s.\n%s"), inbuff, outbuff); retval = -1; } @@ -1618,6 +1693,10 @@ * read */ sprintf(inbuff, "cddb read %s %08x\n", category, disc_id); +/* + * The next line is a CD with Tracktitle= 'Au fond d'un rêve doré' + */ +/* sprintf(inbuff, "cddb read %s %08x\n", category, 0x35069e05);*/ writen(sock_fd, inbuff, strlen(inbuff)); /* @@ -1631,14 +1710,14 @@ if (strncmp(inbuff, "210 ", 4)) { inbuff[readbytes] = '\0'; errmsgno(EX_BAD, - "Bad status from freedb server during read: %s.\n", + _("Bad status from freedb server during read: %s.\n"), inbuff); retval = -1; goto signoff; } if (1 != process_cddb_titles(sock_fd, inbuff, readbytes)) { - errmsgno(EX_BAD, "Cddb read finished not correctly!\n"); + errmsgno(EX_BAD, _("Cddb read finished not correctly!\n")); } signoff: @@ -1654,7 +1733,7 @@ if (strncmp(inbuff, "230 ", 4)) { inbuff[readbytes] = '\0'; errmsgno(EX_BAD, - "Bad status from freedb server during quit: %s.\n", + _("Bad status from freedb server during quit: %s.\n"), inbuff); goto errout; } @@ -1668,15 +1747,15 @@ #if defined CDINDEX_SUPPORT -static int IsSingleArtist __PR((void)); +LOCAL int IsSingleArtist __PR((void)); /* - * check, if there are more than one track creators + * check, if there are more than one track performers */ -static int +LOCAL int IsSingleArtist() { -static struct iterator i; + struct iterator i; InitIterator(&i, 1); @@ -1688,15 +1767,15 @@ continue; ii = GETTRACK(p); - if (global.creator && global.trackcreator[ii] && - strcmp((char *) global.creator, - (char *) global.trackcreator[ii]) != 0) + if (global.performer && global.trackperformer[ii] && + strcmp((char *) global.performer, + (char *) global.trackperformer[ii]) != 0) return (0); } return (1); } -static const char *a2h[255-191] = { +LOCAL const char *a2h[255-191] = { "À", "Á", "Â", @@ -1763,9 +1842,9 @@ "ÿ", }; -static char *ascii2html __PR((unsigned char *inp)); +LOCAL char *ascii2html __PR((unsigned char *inp)); -static char * +LOCAL char * ascii2html(inp) unsigned char *inp; { @@ -1796,7 +1875,7 @@ } #undef copy_translation -static void +LOCAL void emit_cdindex_form(fname_baseval) char *fname_baseval; { @@ -1843,47 +1922,47 @@ " \n\n"); if (IsSingleArtist()) { - static struct iterator i; + struct iterator i; InitIterator(&i, 1); fprintf(cdindex_form, " \n %s\n", - global.creator ? ascii2html(global.creator) : ""); + global.performer ? ascii2html(global.performer) : ""); while (i.hasNextTrack(&i)) { struct TOC *p = i.getNextTrack(&i); - int ii = GETTRACK(p); + unsigned int ii = GETTRACK(p); if (ii == CDROM_LEADOUT) break; if (IS__AUDIO(p)) { fprintf(cdindex_form, - " \n %s\n \n", + " \n %s\n \n", ii, global.tracktitle[ii] ? ascii2html(global.tracktitle[ii]) : ""); } else { fprintf(cdindex_form, - " \n data track\n \n", + " \n data track\n \n", ii); } } - fprintf(cdindex_form, " \n"); + fprintf(cdindex_form, " \n"); } else { -static struct iterator i; + struct iterator i; - InitIterator(&i, 1); + InitIterator(&i, 1); - fprintf(cdindex_form, " \n"); + fprintf(cdindex_form, " \n"); while (i.hasNextTrack(&i)) { struct TOC *p = i.getNextTrack(&i); - int ii = GETTRACK(p); + unsigned int ii = GETTRACK(p); if (ii == CDROM_LEADOUT) break; if (IS__AUDIO(p)) { fprintf(cdindex_form, " %s\n", - global.trackcreator[ii] ? ascii2html(global.trackcreator[ii]) : ""); + global.trackperformer[ii] ? ascii2html(global.trackperformer[ii]) : ""); fprintf(cdindex_form, " %s\n \n", global.tracktitle[ii] ? @@ -1901,7 +1980,7 @@ } #endif -static void +LOCAL void dump_cdtext_info() { #ifdef CD_TEXT @@ -1915,7 +1994,9 @@ * So we have at most 36720 bytes to cope with. */ short int datalength; - unsigned char *p = bufferTOC; + int fulllength; + BOOL text_ok = TRUE; + unsigned char *p = (unsigned char *)global.buf; unsigned char lastline[255*12]; int lastitem = -1; int itemcount = 0; @@ -1923,9 +2004,11 @@ int outlinecount = 0; lastline[0] = '\0'; - datalength = ((p[0] << 8) + p[1]) - 2; - datalength = min(datalength, 2048-4); + datalength = ((p[0] << 8) + p[1]) + 2; + datalength = min(datalength, global.bufsize); + fulllength = datalength; p += 4; + datalength -= 4; for (; datalength > 0; datalength -= sizeof (cdtextpackdata), p += sizeof (cdtextpackdata)) { @@ -1941,9 +2024,11 @@ unsigned tracknr; #ifdef DEBUG_CDTEXT - fprintf(stderr, "datalength =%d\n", datalength); + fprintf(outfp, "datalength =%d\n", datalength); #endif crc_error = !cdtext_crc_ok(c); + if (crc_error) + text_ok = FALSE; if (lastitem != c->headerfield[0]) { itemcount = 0; @@ -1965,7 +2050,7 @@ block_number = ((unsigned)(c->headerfield[3] & 0x30)) >> 4; /* language */ character_position = c->headerfield[3] & 0x0f; - fprintf(stderr, "CDText: ext_fl=%d, trnr=%u, seq_nr=%d, dbcc=%d, block_nr=%d, char_pos=%d\n", + fprintf(outfp, _("CDText: ext_fl=%d, trnr=%u, seq_nr=%d, dbcc=%d, block_nr=%d, char_pos=%d\n"), extension_flag, tracknr, sequence_number, dbcc, block_number, character_position); } #endif @@ -1981,21 +2066,21 @@ outlinecount += zeroposition - (lastline+outlinecount) + 1; #if defined DEBUG_CDTEXT - fprintf(stderr, + fprintf(outfp, "\tin=%d, out=%d, items=%d, trcknum=%u\n", inlinecount, outlinecount, itemcount, tracknr); { int q; for (q = outlinecount; q < inlinecount; q++) - fprintf(stderr, "%c", + fprintf(outfp, "%c", lastline[q] ? lastline[q] : 'ß'); - fputs("\n", stderr); + fputs("\n", outfp); } #else if (DETAILED) { if (crc_error) - fputs(" ! uncorr. CRC-Error", stderr); - fputs("\n", stderr); + fputs(_(" ! uncorr. CRC-Error"), outfp); + fputs("\n", outfp); } #endif @@ -2011,23 +2096,43 @@ zeroposition = (unsigned char *)memchr(lastline+outlinecount, '\0', inlinecount-outlinecount); } } + if (!global.no_textfile && text_ok && fulllength > 4) { + char fname[200]; + char *pp; + FILE *f; + + strncpy(fname, global.fname_base, sizeof (fname) -1); + fname[sizeof (fname) -1] = 0; + pp = strrchr(fname, '.'); + if (pp == NULL) + pp = fname + strlen(fname); + strncpy(pp, ".cdtext", sizeof (fname) - 1 - (pp - fname)); + + f = fileopen(fname, "wctb"); + if (f) { + filewrite(f, global.buf, fulllength); + fclose(f); + global.did_textfile = 1; + } + } #endif } -static void +LOCAL void dump_extra_info(from) unsigned int from; { #ifdef CD_EXTRA unsigned char *p; - unsigned pos; - unsigned length; if (from == 0) return; p = Extra_buffer + 48; while (*p != '\0') { + unsigned pos; + unsigned length; + pos = GET_BE_UINT_FROM_CHARP(p+2); length = GET_BE_UINT_FROM_CHARP(p+6); if (pos == (unsigned)-1) { @@ -2038,13 +2143,13 @@ #ifdef DEBUG_XTRA if (global.gui == 0 && global.verbose != 0) { - fprintf(stderr, + fprintf(outfp, "Language: %c%c (as defined by ISO 639)", *p, *(p+1)); - fprintf(stderr, + fprintf(outfp, " at sector %u, len=%u (sessionstart=%u)", pos, length, session_start); - fputs("\n", stderr); + fputs("\n", outfp); } #endif /* @@ -2059,9 +2164,9 @@ #endif } -static char *quote __PR((unsigned char *string)); +LOCAL char *quote __PR((unsigned char *string)); -static char * +LOCAL char * quote(string) unsigned char *string; { @@ -2081,9 +2186,9 @@ -static void DisplayToc_with_gui __PR((unsigned long dw)); +LOCAL void DisplayToc_with_gui __PR((unsigned long dw)); -static void +LOCAL void DisplayToc_with_gui(dw) unsigned long dw; { @@ -2091,12 +2196,9 @@ unsigned secnds; unsigned frames; int count_audio_trks; -static struct iterator i; + struct iterator i; - if (i.reset == NULL) - InitIterator(&i, 1); - else - i.reset(&i); + InitIterator(&i, 1); mins = dw / (60*75); secnds = (dw % (60*75)) / 75; @@ -2109,45 +2211,45 @@ if ((global.verbose & SHOW_STARTPOSITIONS) != 0) { if (global.illleadout_cd != 0 && have_CD_extra == 0) { - fprintf(stderr, - "Tracks:%u > %u:%02u.%02u\n", + fprintf(outfp, + _("Tracks:%u > %u:%02u.%02u\n"), cdtracks, mins, secnds, frames); } else { - fprintf(stderr, - "Tracks:%u %u:%02u.%02u\n", + fprintf(outfp, + _("Tracks:%u %u:%02u.%02u\n"), cdtracks, mins, secnds, frames); } } if (global.quiet == 0) { - fprintf(stderr, "CDINDEX discid: %s\n", global.cdindex_id); - fprintf(stderr, "CDDB discid: 0x%08lx", + fprintf(outfp, _("CDINDEX discid: %s\n"), global.cdindex_id); + fprintf(outfp, _("CDDB discid: 0x%08lx"), (unsigned long) global.cddb_id); if (have_CDDB != 0) { - fprintf(stderr, " CDDBP titles: resolved\n"); + fprintf(outfp, _(" CDDBP titles: resolved\n")); } else { - fprintf(stderr, "\n"); + fprintf(outfp, "\n"); } if (have_CD_text != 0) { - fprintf(stderr, "CD-Text: detected\n"); + fprintf(outfp, _("CD-Text: detected\n")); dump_cdtext_info(); } else { - fprintf(stderr, "CD-Text: not detected\n"); + fprintf(outfp, _("CD-Text: not detected\n")); } if (have_CD_extra != 0) { - fprintf(stderr, "CD-Extra: detected\n"); + fprintf(outfp, _("CD-Extra: detected\n")); dump_extra_info(have_CD_extra); } else { - fprintf(stderr, "CD-Extra: not detected\n"); + fprintf(outfp, _("CD-Extra: not detected\n")); } - fprintf(stderr, - "Album title: '%s'", (void *)global.disctitle != NULL + fprintf(outfp, + _("Album title: '%s'"), (void *)global.disctitle != NULL ? quote(global.disctitle) : ""); - fprintf(stderr, " from '%s'\n", (void *)global.creator != NULL - ? quote(global.creator) : ""); + fprintf(outfp, _(" from '%s'\n"), (void *)global.performer != NULL + ? quote(global.performer) : ""); } count_audio_trks = 0; @@ -2162,7 +2264,7 @@ int from; from = GETTRACK(o); - fprintf(stderr, "T%02d:", from); + fprintf(outfp, "T%02d:", from); if (IS__DATA(o)) { /* @@ -2179,29 +2281,29 @@ frames = (dw % 75); if (global.verbose & SHOW_STARTPOSITIONS) - fprintf(stderr, + fprintf(outfp, " %7u", real_start); if (global.verbose & SHOW_TOC) - fprintf(stderr, + fprintf(outfp, " %2u:%02u.%02u", mins, secnds, frames); if (global.verbose & SHOW_SUMMARY) - fprintf(stderr, - " data %s %s N/A", + fprintf(outfp, + _(" data %s %s N/A"), /* how recorded */ IS__INCREMENTAL(o) - ? "incremental" : - "uninterrupted", + ? _("incremental") : + _("uninterrupted"), /* copy-permission */ IS__COPYRIGHTED(o) - ? "copydenied" : - "copyallowed"); - fputs("\n", stderr); + ? _("copydenied") : + _("copyallowed")); + fputs("\n", outfp); } else { dw = (unsigned long) (GETSTART(p) - GETSTART(o)); @@ -2210,60 +2312,60 @@ frames = (dw % 75); if (global.verbose & SHOW_STARTPOSITIONS) - fprintf(stderr, + fprintf(outfp, " %7u", GETSTART(o)); if (global.verbose & SHOW_TOC) - fprintf(stderr, + fprintf(outfp, " %2u:%02u.%02u", mins, secnds, frames); if (global.verbose & SHOW_SUMMARY) - fprintf(stderr, - " audio %s %s %s", + fprintf(outfp, + _(" audio %s %s %s"), /* how recorded */ IS__PREEMPHASIZED(o) - ? "pre-emphasized" : "linear", + ? _("pre-emphasized") : _("linear"), /* copy-permission */ IS__COPYRIGHTED(o) - ? "copydenied" : "copyallowed", + ? _("copydenied") : _("copyallowed"), /* channels */ IS__QUADRO(o) - ? "quadro" : "stereo"); + ? _("quadro") : _("stereo")); /* Title */ if (global.verbose & SHOW_TITLES) { - fprintf(stderr, - " title '%s' from ", + fprintf(outfp, + _(" title '%s' from "), (void *) global.tracktitle[GETTRACK(o)] != NULL ? quote(global.tracktitle[GETTRACK(o)]) : ""); - fprintf(stderr, + fprintf(outfp, "'%s'", - (void *) global.trackcreator[GETTRACK(o)] != NULL - ? quote(global.trackcreator[GETTRACK(o)]) : ""); + (void *) global.trackperformer[GETTRACK(o)] != NULL + ? quote(global.trackperformer[GETTRACK(o)]) : ""); } - fputs("\n", stderr); + fputs("\n", outfp); count_audio_trks++; } o = p; } /* while */ if (global.verbose & SHOW_STARTPOSITIONS) if (GETTRACK(o) == CDROM_LEADOUT) { - fprintf(stderr, "Leadout: %7u\n", GETSTART(o)); + fprintf(outfp, _("Leadout: %7u\n"), GETSTART(o)); } } /* if */ } -static void DisplayToc_no_gui __PR((unsigned long dw)); +LOCAL void DisplayToc_no_gui __PR((unsigned long dw)); -static void +LOCAL void DisplayToc_no_gui(dw) unsigned long dw; { @@ -2272,11 +2374,8 @@ unsigned frames; int count_audio_trks; unsigned ii = 0; - static struct iterator i; - if (i.reset == NULL) - InitIterator(&i, 1); - else - i.reset(&i); + struct iterator i; + InitIterator(&i, 1); mins = dw / (60*75); secnds = (dw % (60*75)) / 75; @@ -2302,26 +2401,26 @@ continue; if (IS__DATA(o)) { - fputs(" DATAtrack recorded copy-permitted tracktype\n", stderr); - fprintf(stderr, - " %2d-%2d %13.13s %14.14s data\n", + fputs(_(" DATAtrack recorded copy-permitted tracktype\n"), outfp); + fprintf(outfp, + _(" %2d-%2d %13.13s %14.14s data\n"), from, GETTRACK(o), /* how recorded */ IS__INCREMENTAL(o) - ? "incremental" : "uninterrupted", + ? _("incremental") : _("uninterrupted"), /* copy-perm */ - IS__COPYRIGHTED(o) ? "no" : "yes"); + IS__COPYRIGHTED(o) ? _("no") : _("yes")); } else { - fputs("AUDIOtrack pre-emphasis copy-permitted tracktype channels\n", stderr); - fprintf(stderr, - " %2d-%2d %12.12s %14.14s audio %1c\n", + fputs(_("AUDIOtrack pre-emphasis copy-permitted tracktype channels\n"), outfp); + fprintf(outfp, + _(" %2d-%2d %12.12s %14.14s audio %1c\n"), from, GETTRACK(o), IS__PREEMPHASIZED(o) - ? "yes" : "no", - IS__COPYRIGHTED(o) ? "no" : "yes", + ? _("yes") : _("no"), + IS__COPYRIGHTED(o) ? _("no") : _("yes"), IS__QUADRO(o) ? '4' : '2'); count_audio_trks++; } @@ -2331,17 +2430,17 @@ if ((global.verbose & SHOW_STARTPOSITIONS) != 0) { if (global.illleadout_cd != 0 && have_multisession == 0) { - fprintf(stderr, - "Table of Contents: total tracks:%u, (total time more than %u:%02u.%02u)\n", + fprintf(outfp, + _("Table of Contents: total tracks:%u, (total time more than %u:%02u.%02u)\n"), cdtracks, mins, secnds, frames); } else { - fprintf(stderr, - "Table of Contents: total tracks:%u, (total time %u:%02u.%02u)\n", + fprintf(outfp, + _("Table of Contents: total tracks:%u, (total time %u:%02u.%02u)\n"), cdtracks, mins, secnds, frames); } } - i.reset(&i); + InitIterator(&i, 1); if ((global.verbose & SHOW_TOC) != 0 && i.hasNextTrack(&i)) { TOC *o = i.getNextTrack(&i); @@ -2381,7 +2480,7 @@ brace1 = '('; brace2 = ')'; } - fprintf(stderr, + fprintf(outfp, " %2u.%c%2u:%02u.%02u%c", GETTRACK(o), brace1, @@ -2390,26 +2489,26 @@ ii++; if (ii % 5 == 0) - fputs(",\n", stderr); + fputs(",\n", outfp); else if (ii != cdtracks) - fputc(',', stderr); + fputc(',', outfp); } o = p; } /* for */ if ((ii % 5) != 0) - fputs("\n", stderr); + fputs("\n", outfp); } /* if */ if ((global.verbose & SHOW_STARTPOSITIONS) != 0) { - fputs("\nTable of Contents: starting sectors\n", stderr); + fputs(_("\nTable of Contents: starting sectors\n"), outfp); ii = 0; - i.reset(&i); + InitIterator(&i, 1); if (i.hasNextTrack(&i)) { TOC *o = i.getNextTrack(&i); for (; i.hasNextTrack(&i); ) { TOC *p = i.getNextTrack(&i); - fprintf(stderr, + fprintf(outfp, " %2u.(%8u)", GETTRACK(o), have_multisession && @@ -2424,63 +2523,65 @@ ii++; if ((ii) % 5 == 0) - fputs(",\n", stderr); + fputs(",\n", outfp); else - fputc(',', stderr); + fputc(',', outfp); o = p; } - fprintf(stderr, " lead-out(%8u)", GETSTART(o)); - fputs("\n", stderr); + fprintf(outfp, _(" lead-out(%8u)"), GETSTART(o)); + fputs("\n", outfp); } } if (global.quiet == 0) { - fprintf(stderr, "CDINDEX discid: %s\n", global.cdindex_id); - fprintf(stderr, "CDDB discid: 0x%08lx", + fprintf(outfp, _("CDINDEX discid: %s\n"), global.cdindex_id); + fprintf(outfp, _("CDDB discid: 0x%08lx"), (unsigned long) global.cddb_id); if (have_CDDB != 0) { - fprintf(stderr, " CDDBP titles: resolved\n"); + fprintf(outfp, _(" CDDBP titles: resolved\n")); } else { - fprintf(stderr, "\n"); + fprintf(outfp, "\n"); } if (have_CD_text != 0) { - fprintf(stderr, "CD-Text: detected\n"); + fprintf(outfp, _("CD-Text: detected\n")); } else { - fprintf(stderr, "CD-Text: not detected\n"); + fprintf(outfp, _("CD-Text: not detected\n")); } if (have_CD_extra != 0) { - fprintf(stderr, "CD-Extra: detected\n"); + fprintf(outfp, _("CD-Extra: detected\n")); } else { - fprintf(stderr, "CD-Extra: not detected\n"); + fprintf(outfp, _("CD-Extra: not detected\n")); } } if ((global.verbose & SHOW_TITLES) != 0) { - int maxlen = 0; + unsigned int maxlen = 0; if (global.disctitle != NULL) { - fprintf(stderr, "Album title: '%s'", global.disctitle); - if (global.creator != NULL) { - fprintf(stderr, "\t[from %s]", global.creator); + fprintf(outfp, _("Album title: '%s'"), global.disctitle); + if (global.performer != NULL) { + fprintf(outfp, _("\t[from %s]"), global.performer); } - fputs("\n", stderr); + fputs("\n", outfp); } - i.reset(&i); + InitIterator(&i, 1); for (; i.hasNextTrack(&i); ) { TOC *p = i.getNextTrack(&i); - int jj = GETTRACK(p); + unsigned int jj = GETTRACK(p); if (global.tracktitle[jj] != NULL) { - int len = strlen((char *)global.tracktitle[jj]); + unsigned int len; + + len = strlen((char *)global.tracktitle[jj]); maxlen = max(maxlen, len); } } maxlen = (maxlen + 12 + 8 + 7)/8; - i.reset(&i); + InitIterator(&i, 1); for (; i.hasNextTrack(&i); ) { TOC *p = i.getNextTrack(&i); - int jj; + unsigned int jj; if (IS__DATA(p)) continue; @@ -2492,19 +2593,19 @@ if (maxlen != 3) { if (global.tracktitle[jj] != NULL) { - fprintf(stderr, "Track %2u: '%s'", + fprintf(outfp, _("Track %2u: '%s'"), jj, global.tracktitle[jj]); } else { - fprintf(stderr, "Track %2u: '%s'", + fprintf(outfp, _("Track %2u: '%s'"), jj, ""); } - if (global.trackcreator[jj] != NULL && + if (global.trackperformer[jj] != NULL && #if 1 - global.trackcreator[jj][0] != '\0' && - (global.creator == NULL || - 0 != strcmp((char *)global.creator, (char *)global.trackcreator[jj]))) { + global.trackperformer[jj][0] != '\0' && + (global.performer == NULL || + 0 != strcmp((char *)global.performer, (char *)global.trackperformer[jj]))) { #else - global.trackcreator[jj][0] != '\0') { + global.trackperformer[jj][0] != '\0') { #endif int j; @@ -2515,13 +2616,13 @@ for (j = 0; j < (maxlen - ((int)strlen(o) + 12)/8); j++) { - fprintf(stderr, "\t"); + fprintf(outfp, "\t"); } - fprintf(stderr, - "[from %s]", - global.trackcreator[jj]); + fprintf(outfp, + _("[from %s]"), + global.trackperformer[jj]); } - fputs("\n", stderr); + fputs("\n", outfp); } } } @@ -2564,7 +2665,7 @@ if (global.illleadout_cd != 0) { if (global.quiet == 0) { - errmsgno(EX_BAD, "CD with illegal leadout position detected!\n"); + errmsgno(EX_BAD, _("CD with illegal leadout position detected!\n")); } if (global.reads_illleadout == 0) { @@ -2576,16 +2677,16 @@ if (global.quiet == 0) { errmsgno(EX_BAD, - "The cdrom drive firmware does not permit access beyond the leadout position!\n"); + _("The cdrom drive firmware does not permit access beyond the leadout position!\n")); } if (global.verbose & (SHOW_ISRC | SHOW_INDICES)) { global.verbose &= ~(SHOW_ISRC | SHOW_INDICES); - fprintf(stderr, "Switching index scan and ISRC scan off!\n"); + fprintf(outfp, _("Switching index scan and ISRC scan off!\n")); } if (global.quiet == 0) { - fprintf(stderr, - "Audio extraction will be limited to track %ld with maximal %ld sectors...\n", + fprintf(outfp, + _("Audio extraction will be limited to track %ld with maximal %ld sectors...\n"), LastTrack(), Get_EndSector(LastTrack())+1); } @@ -2598,21 +2699,21 @@ */ patch_real_end(150 + (99*60+59)*75 + 74); if (global.quiet == 0) { - fprintf(stderr, - "Restrictions apply, since the size of the last track is unknown!\n"); + fprintf(outfp, + _("Restrictions apply, since the size of the last track is unknown!\n")); } } } } -static void Read_MCN_toshiba __PR((subq_chnl **sub_ch)); +LOCAL void Read_MCN_toshiba __PR((subq_chnl **sub_ch)); -static void +LOCAL void Read_MCN_toshiba(sub_ch) subq_chnl **sub_ch; { if (Toshiba3401() != 0 && global.quiet == 0 && - ((*sub_ch) != 0 || + ((*sub_ch) != 0 && (((subq_catalog *)(*sub_ch)->data)->mc_valid & 0x80))) { /* * no valid MCN yet. do more searching @@ -2636,15 +2737,16 @@ } } -static void Get_Set_MCN __PR((void)); +LOCAL void Get_Set_MCN __PR((void)); -static void +LOCAL void Get_Set_MCN() { subq_chnl *sub_ch; subq_catalog *subq_cat = NULL; - fprintf(stderr, "scanning for MCN..."); + fprintf(outfp, _("scanning for MCN...")); + fflush(outfp); sub_ch = ReadSubQ(get_scsi_p(), GET_CATALOGNUMBER, 0); @@ -2713,9 +2815,9 @@ } -static void Read_ISRC_toshiba __PR((subq_chnl **sub_ch, unsigned tr)); +LOCAL void Read_ISRC_toshiba __PR((subq_chnl **sub_ch, unsigned tr)); -static void +LOCAL void Read_ISRC_toshiba(sub_ch, tr) subq_chnl **sub_ch; unsigned tr; @@ -2741,16 +2843,17 @@ } -static void Get_Set_ISRC __PR((unsigned tr)); +LOCAL void Get_Set_ISRC __PR((unsigned tr)); -static void +LOCAL void Get_Set_ISRC(tr) unsigned tr; { subq_chnl *sub_ch; subq_track_isrc *subq_tr; - fprintf(stderr, "\rscanning for ISRCs: %d ...", tr); + fprintf(outfp, _("\rscanning for ISRCs: %u ..."), tr); + fflush(outfp); subq_tr = NULL; sub_ch = ReadSubQ(get_scsi_p(), GET_TRACK_ISRC, tr); @@ -2786,7 +2889,7 @@ (cp[3] & 0xf0) | (cp[4] & 0xf0) | (cp[5] & 0xf0) | (cp[6] & 0xf0) | (cp[7] & 0xf0))) { #if DEBUG_ISRC - fprintf(stderr, "a!\t"); + fprintf(outfp, "a!\t"); #endif /* reformat A: to B: */ cp[14] = cp[7] >> 4; cp[13] = cp[6] & 0xf; @@ -2798,7 +2901,7 @@ cp[ 2] = cp[1] >> 4; cp[ 1] = cp[0] & 0xf; cp[ 0] = cp[0] >> 4; #if DEBUG_ISRC - fprintf(stderr, "a->b: %15.15s\n", cp); + fprintf(outfp, "a->b: %15.15s\n", cp); #endif } @@ -2833,7 +2936,7 @@ int bits; #if DEBUG_ISRC - fprintf(stderr, "b!\n"); + fprintf(outfp, "b!\n"); #endif ind = (cp[0] << 26) + (cp[1] << 22) + @@ -2846,20 +2949,20 @@ if ((cp[7] & 3) == 3) { if (global.verbose) { - fprintf(stderr, - "Recorder-ID encountered: "); + fprintf(outfp, + _("Recorder-ID encountered: ")); for (bits = 0; bits < 30; bits += 6) { unsigned binval = (ind & (ULONG_C(0x3f) << (24-bits))) >> (24-bits); if ((binval < sizeof (bin2ISRC)) && (binval <= 9 || binval >= 16)) { - fprintf(stderr, + fprintf(outfp, "%X", bin2ISRC[binval]); } } - fprintf(stderr, + fprintf(outfp, "%.1X%.1X%.1X%.1X%.1X%.1X%.1X", subq_tr->track_isrc [8] & 0x0f, subq_tr->track_isrc [9] & 0x0f, @@ -2868,13 +2971,13 @@ subq_tr->track_isrc [12] & 0x0f, subq_tr->track_isrc [13] & 0x0f, subq_tr->track_isrc [14] & 0x0f); - fprintf(stderr, "\n"); + fprintf(outfp, "\n"); } return; } if ((cp[7] & 3) != 0) { - fprintf(stderr, - "unknown mode 3 entry C1=0x%02x, C2=0x%02x\n", + fprintf(outfp, + _("unknown mode 3 entry C1=0x%02x, C2=0x%02x\n"), (cp[7] >> 1) & 1, cp[7] & 1); return; } @@ -2892,14 +2995,14 @@ int y; Get_ISRC(tr)[0] = '\0'; - fprintf(stderr, - "\nIllegal ISRC for track %d, skipped: ", + fprintf(outfp, + _("\nIllegal ISRC for track %u, skipped: "), tr); for (y = 0; y < 15; y++) { - fprintf(stderr, "%02x ", + fprintf(outfp, "%02x ", cp[y]); } - fputs("\n", stderr); + fputs("\n", outfp); return; } *p++ = bin2ISRC[binval]; @@ -2924,7 +3027,7 @@ subq_tr->track_isrc [13] & 0x0f, subq_tr->track_isrc [14] & 0x0f); #if DEBUG_ISRC - fprintf(stderr, "b: %15.15s!\n", p_start); + fprintf(outfp, "b: %15.15s!\n", p_start); #endif } else { /* @@ -2940,16 +3043,16 @@ int y; Get_ISRC(ii)[0] = '\0'; - fprintf(stderr, "\nIllegal ISRC for track %d, skipped: ", ii+1); + fprintf(outfp, _("\nIllegal ISRC for track %d, skipped: "), ii+1); for (y = 0; y < 15; y++) { - fprintf(stderr, "%02x ", cp[y]); + fprintf(outfp, "%02x ", cp[y]); } - fputs("\n", stderr); + fputs("\n", outfp); return; } #if DEBUG_ISRC - fprintf(stderr, "ascii: %15.15s!\n", cp); + fprintf(outfp, "ascii: %15.15s!\n", cp); #endif for (ii = 0; ii < 12; ii++) { #if 1 @@ -2976,8 +3079,14 @@ * and Track International Standard Recording Codes (for each track) */ void -Read_MCN_ISRC() +Read_MCN_ISRC(startTrack, endTrack) + unsigned startTrack; + unsigned endTrack; { + int old_hidden = have_hiddenAudioTrack; + + have_hiddenAudioTrack = 0; /* Don'tcheck track #0 here */ + if ((global.verbose & SHOW_MCN) != 0) { if (Get_MCN()[0] == '\0') { @@ -2985,19 +3094,19 @@ } if (Get_MCN()[0] != '\0') { - fprintf(stderr, - "\rMedia catalog number: %13.13s\n", + fprintf(outfp, + _("\rMedia catalog number: %13.13s\n"), Get_MCN()); } else { - fprintf(stderr, - "\rNo media catalog number present.\n"); + fprintf(outfp, + _("\rNo media catalog number present.\n")); } } if ((global.verbose & SHOW_ISRC) != 0) { - static struct iterator i; + struct iterator i; InitIterator(&i, 1); @@ -3008,6 +3117,9 @@ if (ii == CDROM_LEADOUT) break; + if (ii < startTrack || ii > endTrack) + continue; + if (!IS__AUDIO(p)) continue; @@ -3016,22 +3128,24 @@ } if (GETISRC(p)[0] != '\0') { - fprintf(stderr, - "\rT: %2d ISRC: %15.15s\n", + fprintf(outfp, + "\rT: %2u ISRC: %15.15s\n", ii, GETISRC(p)); - fflush(stderr); + fflush(outfp); } } /* for all tracks */ - fputs("\n", stderr); + fputs("\n", outfp); } /* if SHOW_ISRC */ + + have_hiddenAudioTrack = old_hidden; /* Restore old value */ } -static int playing = 0; +LOCAL int playing = 0; -static subq_chnl *ReadSubChannel __PR((unsigned sec)); +LOCAL subq_chnl *ReadSubChannel __PR((unsigned sec)); -static subq_chnl * +LOCAL subq_chnl * ReadSubChannel(sec) unsigned sec; { @@ -3051,14 +3165,14 @@ */ ReadSubChannels = NULL; #if defined DEBUG_SUB - fprintf(stderr, + fprintf(outfp, "\nCommand not implemented: switching ReadSubChannels off !\n"); #endif goto fallback; } /* - * check the adress mode field + * check the address mode field */ if ((sub_ch->control_adr & 0x0f) == 0) { /* @@ -3089,14 +3203,14 @@ } /* - * check adress mode field for position information + * check address mode field for position information */ if ((sub_ch->control_adr & 0x0f) == 0x01) { return (sub_ch); } ReadSubChannels = NULL; - fprintf(stderr, - "\nCould not get position information (%02x) for sectors %d, %d, %d: switching ReadSubChannels off !\n", + fprintf(outfp, + _("\nCould not get position information (%02x) for sectors %u, %u, %u: switching ReadSubChannels off !\n"), sub_ch->control_adr &0x0f, sec-1, sec, sec+2); } @@ -3119,8 +3233,8 @@ return (sub_ch); } -static int ReadSubControl __PR((unsigned sec)); -static int +LOCAL int ReadSubControl __PR((unsigned sec)); +LOCAL int ReadSubControl(sec) unsigned sec; { @@ -3131,16 +3245,17 @@ return (sub_ch->control_adr & 0xf0); } -static int HaveSCMS __PR((unsigned StartSector)); -static int +LOCAL int HaveSCMS __PR((unsigned StartSector)); +LOCAL int HaveSCMS(StartSector) unsigned StartSector; { int i; - int cr; int copy_bits_set = 0; for (i = 0; i < 8; i++) { + int cr; + cr = ReadSubControl(StartSector + i); if (cr == -1) continue; @@ -3158,7 +3273,7 @@ */ } -static int +LOCAL int GetIndexOfSector(sec, track) unsigned sec; unsigned track; @@ -3168,7 +3283,7 @@ if (sub_ch == NULL) { if ((long)sec == Get_EndSector(track)) { errmsgno(EX_BAD, - "Driver and/or firmware bug detected! Drive cannot play the very last sector (%u)!\n", + _("Driver and/or firmware bug detected! Drive cannot play the very last sector (%u)!\n"), sec); } return (-1); @@ -3189,8 +3304,8 @@ */ if (sub_ch->index != 0 && track != sub_ch->track) { if (global.verbose) - fprintf(stderr, - "\ntrack mismatch: %1d, in-track subchannel: %1d (index %1d, sector %1d)\n", + fprintf(outfp, + _("\ntrack mismatch: %1u, in-track subchannel: %1u (index %1u, sector %1u)\n"), track, sub_ch->track, sub_ch->index, sec); } #endif @@ -3206,10 +3321,10 @@ * broadcast difference */ if (global.verbose) { - fprintf(stderr, - "broadcast type conflict detected -> TOC:%s, subchannel:%s\n", - (sub_ch->control_adr & 0x80) == 0 ? "broadcast" : "nonbroadcast", - (sub_ch->control_adr & 0x80) != 0 ? "broadcast" : "nonbroadcast"); + fprintf(outfp, + _("broadcast type conflict detected -> TOC:%s, subchannel:%s\n"), + (sub_ch->control_adr & 0x80) == 0 ? _("broadcast") : _("nonbroadcast"), + (sub_ch->control_adr & 0x80) != 0 ? _("broadcast") : _("nonbroadcast")); } } if ((diffbits & 0x40) == 0x40) { @@ -3217,10 +3332,10 @@ * track type difference */ if (global.verbose) { - fprintf(stderr, - "track type conflict detected -> TOC:%s, subchannel:%s\n", - (sub_ch->control_adr & 0x40) == 0 ? "data" : "audio", - (sub_ch->control_adr & 0x40) != 0 ? "data" : "audio"); + fprintf(outfp, + _("track type conflict detected -> TOC:%s, subchannel:%s\n"), + (sub_ch->control_adr & 0x40) == 0 ? _("data") : _("audio"), + (sub_ch->control_adr & 0x40) != 0 ? _("data") : _("audio")); } } if ((diffbits & 0x20) == 0x20 && !Get_SCMS(track)) { @@ -3229,10 +3344,10 @@ * and is treated elsewhere. */ if (global.verbose) { - fprintf(stderr, - "difference: TOC:%s, subchannel:%s\ncorrecting TOC...\n", - (sub_ch->control_adr & 0x20) == 0 ? "unprotected" : "copyright protected", - (sub_ch->control_adr & 0x20) != 0 ? "unprotected" : "copyright protected"); + fprintf(outfp, + _("difference: TOC:%s, subchannel:%s\ncorrecting TOC...\n"), + (sub_ch->control_adr & 0x20) == 0 ? _("unprotected") : _("copyright protected"), + (sub_ch->control_adr & 0x20) != 0 ? _("unprotected") : _("copyright protected")); } toc_entry(track, @@ -3249,10 +3364,10 @@ * preemphasis difference */ if (global.verbose) - fprintf(stderr, - "difference: TOC:%s, subchannel:%s preemphasis\ncorrecting TOC...\n", - (sub_ch->control_adr & 0x10) == 0 ? "with" : "without", - (sub_ch->control_adr & 0x10) != 0 ? "with" : "without"); + fprintf(outfp, + _("difference: TOC:%s, subchannel:%s preemphasis\ncorrecting TOC...\n"), + (sub_ch->control_adr & 0x10) == 0 ? _("with") : _("without"), + (sub_ch->control_adr & 0x10) != 0 ? _("with") : _("without")); toc_entry(track, (Get_Flags(track) & 0xEF) | (sub_ch->control_adr & 0x10), @@ -3269,10 +3384,10 @@ return (sub_ch ? sub_ch->index == 244 ? 1 : sub_ch->index : -1); } -static int ScanBackwardFrom __PR((unsigned sec, unsigned limit, +LOCAL int ScanBackwardFrom __PR((unsigned sec, unsigned limit, int *where, unsigned track)); -static int +LOCAL int ScanBackwardFrom(sec, limit, where, track) unsigned sec; unsigned limit; @@ -3329,7 +3444,7 @@ */ if (!global.quiet) errmsgno(EX_BAD, - "Could not find index transition for pre-gap.\n"); + _("Could not find index transition for pre-gap.\n")); if (where != NULL) *where = -1; } @@ -3357,7 +3472,7 @@ */ if (!global.quiet) errmsgno(EX_BAD, - "Could not find index transition for pre-gap.\n"); + _("Could not find index transition for pre-gap.\n")); if (where != NULL) *where = -1; } @@ -3367,9 +3482,9 @@ } #ifdef USE_LINEAR_SEARCH -static int linear_search __PR((int searchInd, unsigned int Start, +LOCAL int linear_search __PR((int searchInd, unsigned int Start, unsigned int End, unsigned track)); -static int +LOCAL int linear_search(searchInd, Start, End, track) int searchInd; unsigned Start; @@ -3399,9 +3514,9 @@ #ifndef USE_LINEAR_SEARCH #undef DEBUG_BINSEARCH -static int binary_search __PR((int searchInd, unsigned int Start, +LOCAL int binary_search __PR((int searchInd, unsigned int Start, unsigned int End, unsigned track)); -static int +LOCAL int binary_search(searchInd, Start, End, track) int searchInd; unsigned Start; @@ -3429,7 +3544,7 @@ } } #ifdef DEBUG_BINSEARCH - fprintf(stderr, "(%d,%d,%d > ", l, x, r); + fprintf(outfp, "(%d,%d,%d > ", l, x, r); #endif if (l <= r) { /* @@ -3450,11 +3565,11 @@ l = x; } #ifdef DEBUG_BINSEARCH - fprintf(stderr, "%d -> ", x); + fprintf(outfp, "%d -> ", x); #endif } #ifdef DEBUG_BINSEARCH - fprintf(stderr, "%d,%d)\n", l, r); + fprintf(outfp, "%d,%d)\n", l, r); #endif if (searchInd == GetIndexOfSector(l, track)) return (l); @@ -3466,10 +3581,10 @@ #endif -static void register_index_position __PR((int IndexOffset, +LOCAL void register_index_position __PR((int IndexOffset, index_list **last_index_entry)); -static void +LOCAL void register_index_position(IndexOffset, last_index_entry) int IndexOffset; index_list **last_index_entry; @@ -3491,13 +3606,13 @@ indexentry->frameoffset = IndexOffset; #if defined INFOFILES } else { - fprintf(stderr, - "No memory for index lists. Index positions\nwill not be written in info file!\n"); + fprintf(outfp, + _("No memory for index lists. Index positions\nwill not be written in info file!\n")); #endif } } -static void Set_SCMS __PR((unsigned long p_track)); +LOCAL void Set_SCMS __PR((unsigned long p_track)); #undef DEBUG_INDLIST /* @@ -3532,26 +3647,25 @@ SCSI *scgp = get_scsi_p(); -static struct iterator i; + int old_hidden = have_hiddenAudioTrack; + struct iterator i; + + have_hiddenAudioTrack = 0; /* Don'tcheck track #0 here */ InitIterator(&i, 1); EnableCdda(scgp, 0, 0); EnableCdda(scgp, 1, CD_FRAMESIZE_RAW + 16); if (!global.quiet && !(global.verbose & SHOW_INDICES)) - fprintf(stderr, "seeking index start ..."); + fprintf(outfp, _("seeking index start ...")); + + starttrack = track; + endtrack = global.endtrack; - if (bulk != 1) { - starttrack = track; - endtrack = track; - } else { - starttrack = 1; - endtrack = cdtracks; - } baseindex_pool = (index_list *) malloc(sizeof (index_list) * (endtrack - starttrack + 1)); #ifdef DEBUG_INDLIST - fprintf(stderr, "index0-mem-pool %p\n", baseindex_pool); + fprintf(outfp, "index0-mem-pool %p\n", baseindex_pool); #endif @@ -3568,8 +3682,8 @@ if (global.verbose & SHOW_INDICES) { if (global.illleadout_cd && global.reads_illleadout && ii == endtrack) { - fprintf(stderr, - "Analysis of track %d skipped due to unknown length\n", ii); + fprintf(outfp, + _("Analysis of track %u skipped due to unknown length\n"), ii); } } if (global.illleadout_cd && global.reads_illleadout && @@ -3581,8 +3695,8 @@ Set_SCMS(ii); } if (global.verbose & SHOW_INDICES) { - fprintf(stderr, "\rindex scan: %d...", ii); - fflush(stderr); + fprintf(outfp, _("\rindex scan: %u..."), ii); + fflush(outfp); } LastIndex = ScanBackwardFrom(Get_EndSector(ii), StartSector, &n_0_transition, ii); @@ -3613,8 +3727,8 @@ } if ((global.verbose & SHOW_INDICES) && LastIndex > 1) { - fprintf(stderr, - "\rtrack %2d has %d indices, index table (pairs of 'index: frame offset')\n", + fprintf(outfp, + _("\rtrack %2u has %d indices, index table (pairs of 'index: frame offset')\n"), ii, LastIndex); } startindex = 0; @@ -3654,29 +3768,29 @@ if (IndexOffset == -1) { if (global.verbose & SHOW_INDICES) { if (global.gui == 0) { - fprintf(stderr, + fprintf(outfp, "%2u: N/A ", j); if (((j + 1) % 8) == 0) - fputs("\n", stderr); + fputs("\n", outfp); } else { - fprintf(stderr, - "\rT%02d I%02u N/A\n", + fprintf(outfp, + "\rT%02u I%02u N/A\n", ii, j); } } } else { if (global.verbose & SHOW_INDICES) { if (global.gui == 0) { - fprintf(stderr, + fprintf(outfp, "%2u:%6lu ", j, IndexOffset- Get_AudioStartSector(ii)); if (((j + 1) % 8) == 0) - fputs("\n", stderr); + fputs("\n", outfp); } else { - fprintf(stderr, - "\rT%02d I%02u %06lu\n", + fprintf(outfp, + "\rT%02u I%02u %06lu\n", ii, j, IndexOffset- @@ -3710,8 +3824,12 @@ /* * if this is the first one in a * sequence, store predecessor + * unless it is the last entry and + * there is no index 0 transition */ - lastgood = iq; + if (!(ip->next == NULL && + ip->frameoffset == n_0_transition)) + lastgood = iq; } } else { /* @@ -3732,23 +3850,25 @@ if (global.gui == 0 && (global.verbose & SHOW_INDICES) && ii != endtrack) - fputs("\n", stderr); + fputs("\n", outfp); } /* for tracks */ if (global.gui == 0 && (global.verbose & SHOW_INDICES)) - fputs("\n", stderr); + fputs("\n", outfp); if (playing != 0) StopPlay(get_scsi_p()); EnableCdda(scgp, 0, 0); EnableCdda(scgp, 1, CD_FRAMESIZE_RAW); + have_hiddenAudioTrack = old_hidden; /* Restore old value */ + return (retval); } -static unsigned char MCN[14]; +LOCAL unsigned char MCN[14]; -static void +LOCAL void Set_MCN(MCN_arg) unsigned char *MCN_arg; { @@ -3763,7 +3883,7 @@ } -static TOC g_toc[MAXTRK+1]; /* hidden track + 100 regular tracks */ +LOCAL TOC g_toc[MAXTRK+1]; /* hidden track + 100 regular tracks */ /*#define IS_AUDIO(i) (!(g_toc[i].bFlags & 0x40))*/ @@ -3778,9 +3898,10 @@ for (i = 1; i <= (int)tracks; i++) { unsigned char *p; - unsigned long dwStartSector; if (binvalid) { + unsigned long dwStartSector; + p = a + 8*(i-1); g_toc[i].bFlags = p[1]; @@ -3846,7 +3967,7 @@ return (0); } -static int +LOCAL int patch_cd_extra(track, sector) unsigned track; unsigned long sector; @@ -3856,7 +3977,7 @@ return (0); } -static int +LOCAL int restrict_tracks_illleadout() { struct TOC *o = &g_toc[cdtracks+1]; @@ -3873,9 +3994,9 @@ return (0); } -static void +LOCAL void Set_ISRC(track, ISRC_arg) - int track; + unsigned track; const unsigned char *ISRC_arg; { if (track <= (int)cdtracks) { @@ -3893,7 +4014,7 @@ return (NULL); } -static void +LOCAL void patch_to_audio(p_track) unsigned long p_track; { @@ -3946,7 +4067,7 @@ return (-1); } -static void +LOCAL void Set_SCMS(p_track) unsigned long p_track; { @@ -4006,14 +4127,16 @@ int useHiddenTrack() { - return (0); + if (global.no_hidden_track) + return (0); + return (have_hiddenAudioTrack); } -static void it_reset __PR((struct iterator *this)); +LOCAL void it_reset __PR((struct iterator *this)); -static void +LOCAL void it_reset(this) struct iterator *this; { @@ -4021,10 +4144,10 @@ } -static int it_hasNextTrack __PR((struct iterator *this)); -static struct TOC *it_getNextTrack __PR((struct iterator *this)); +LOCAL int it_hasNextTrack __PR((struct iterator *this)); +LOCAL struct TOC *it_getNextTrack __PR((struct iterator *this)); -static int +LOCAL int it_hasNextTrack(this) struct iterator *this; { @@ -4033,7 +4156,7 @@ -static struct TOC * +LOCAL struct TOC * it_getNextTrack(this) struct iterator *this; { @@ -4045,7 +4168,7 @@ } -static void +LOCAL void InitIterator(iter, p_track) struct iterator *iter; unsigned long p_track; @@ -4053,16 +4176,17 @@ if (iter == NULL) return; - iter->index = iter->startindex = useHiddenTrack() ? 0 : p_track; + iter->startindex = useHiddenTrack() ? 0 : p_track; iter->reset = it_reset; iter->getNextTrack = it_getNextTrack; iter->hasNextTrack = it_hasNextTrack; + iter->reset(iter); } #if 0 -static struct iterator *NewIterator __PR((void)); +LOCAL struct iterator *NewIterator __PR((void)); -static struct iterator * +LOCAL struct iterator * NewIterator() { struct iterator *retval; @@ -4087,12 +4211,9 @@ IS__AUDIO(&g_toc[p_track])) return (GETSTART(&g_toc[p_track])); #else -static struct iterator i; + struct iterator i; - if (i.reset == NULL) - InitIterator(&i, p_track); - else - i.reset(&i); + InitIterator(&i, p_track); if (p_track == cdtracks + 1) p_track = CDROM_LEADOUT; @@ -4123,12 +4244,9 @@ if (p_track <= cdtracks +1) return (GETSTART(&g_toc[p_track])); #else -static struct iterator i; + struct iterator i; - if (i.reset == NULL) - InitIterator(&i, p_track); - else - i.reset(&i); + InitIterator(&i, p_track); if (p_track == cdtracks + 1) p_track = CDROM_LEADOUT; @@ -4153,12 +4271,9 @@ if (p_track <= cdtracks) return (GETSTART(&g_toc[p_track+1])-1); #else -static struct iterator i; + struct iterator i; - if (i.reset == NULL) - InitIterator(&i, p_track); - else - i.reset(&i); + InitIterator(&i, p_track); if (p_track == cdtracks + 1) p_track = CDROM_LEADOUT; @@ -4181,12 +4296,9 @@ long FirstTrack() { -static struct iterator i; + struct iterator i; - if (i.reset == NULL) - InitIterator(&i, 1); - else - i.reset(&i); + InitIterator(&i, 1); if (i.hasNextTrack(&i)) { return (GETTRACK(i.getNextTrack(&i))); @@ -4197,12 +4309,9 @@ long FirstAudioTrack() { -static struct iterator i; + struct iterator i; - if (i.reset == NULL) - InitIterator(&i, 1); - else - i.reset(&i); + InitIterator(&i, 1); while (i.hasNextTrack(&i)) { TOC *p = i.getNextTrack(&i); @@ -4220,12 +4329,9 @@ long FirstDataTrack() { -static struct iterator i; + struct iterator i; - if (i.reset == NULL) - InitIterator(&i, 1); - else - i.reset(&i); + InitIterator(&i, 1); while (i.hasNextTrack(&i)) { TOC *p = i.getNextTrack(&i); @@ -4246,12 +4352,9 @@ LastAudioTrack() { long j = -1; - static struct iterator i; + struct iterator i; - if (i.reset == NULL) - InitIterator(&i, 1); - else - i.reset(&i); + InitIterator(&i, 1); while (i.hasNextTrack(&i)) { TOC *p = i.getNextTrack(&i); @@ -4268,15 +4371,12 @@ unsigned long p_track; { long LastSec = 0; -static struct iterator i; + struct iterator i; if (global.illleadout_cd && global.reads_illleadout) return (150+(99*60+59)*75+74); - if (i.reset == NULL) - InitIterator(&i, p_track); - else - i.reset(&i); + InitIterator(&i, p_track); if (p_track == cdtracks + 1) p_track = CDROM_LEADOUT; @@ -4299,12 +4399,9 @@ Get_Track(sector) unsigned long sector; { -static struct iterator i; + struct iterator i; - if (i.reset == NULL) - InitIterator(&i, 1); - else - i.reset(&i); + InitIterator(&i, 1); if (i.hasNextTrack(&i)) { TOC *o = i.getNextTrack(&i); @@ -4330,12 +4427,9 @@ unsigned long from; unsigned long upto; { - static struct iterator i; + struct iterator i; - if (i.reset == NULL) - InitIterator(&i, from); - else - i.reset(&i); + InitIterator(&i, from); while (i.hasNextTrack(&i)) { TOC *p = i.getNextTrack(&i); diff -Nru cdrtools-2.01.01a33/cdda2wav/toc.h cdrtools-3.02a09/cdda2wav/toc.h --- cdrtools-2.01.01a33/cdda2wav/toc.h 2006-05-13 21:02:13.000000000 +0000 +++ cdrtools-3.02a09/cdda2wav/toc.h 2017-07-08 18:22:30.000000000 +0000 @@ -1,4 +1,4 @@ -/* @(#)toc.h 1.10 06/05/13 Copyright 1998,1999 Heiko Eissfeldt, Copyright 2006 J. Schilling */ +/* @(#)toc.h 1.13 17/07/08 Copyright 1998,1999,2017 Heiko Eissfeldt, Copyright 2006-2010 J. Schilling */ /* * The contents of this file are subject to the terms of the @@ -7,6 +7,8 @@ * with the License. * * See the file CDDL.Schily.txt in this distribution for details. + * A copy of the CDDL is also available via the Internet at + * http://www.opensource.org/licenses/cddl1.txt * * When distributing Covered Code, include this CDDL HEADER in each * file and include the License file CDDL.Schily.txt from this distribution. @@ -54,6 +56,7 @@ extern int Get_Copyright __PR((unsigned long p_track)); extern int Get_Datatrack __PR((unsigned long p_track)); extern int Get_Tracknumber __PR((unsigned long p_track)); +extern int useHiddenTrack __PR((void)); extern unsigned char * Get_MCN __PR((void)); extern unsigned char * Get_ISRC __PR((unsigned long p_track)); @@ -62,7 +65,7 @@ extern unsigned FixupTOC __PR((unsigned no_tracks)); extern void calc_cddb_id __PR((void)); extern void calc_cdindex_id __PR((void)); -extern void Read_MCN_ISRC __PR((void)); +extern void Read_MCN_ISRC __PR((unsigned startTrack, unsigned endTrack)); extern unsigned ScanIndices __PR((unsigned trackval, unsigned indexval, int bulk)); extern int handle_cdtext __PR((void)); extern int lba_2_msf __PR((long lba, int *m, int *s, int *f)); diff -Nru cdrtools-2.01.01a33/cdda2wav/wav.c cdrtools-3.02a09/cdda2wav/wav.c --- cdrtools-2.01.01a33/cdda2wav/wav.c 2006-09-13 15:46:08.000000000 +0000 +++ cdrtools-3.02a09/cdda2wav/wav.c 2010-01-31 15:40:50.000000000 +0000 @@ -1,12 +1,13 @@ -/* @(#)wav.c 1.7 06/09/13 Copyright 1998,1999 Heiko Eissfeldt, Copyright 2006 J. Schilling */ +/* @(#)wav.c 1.14 10/01/31 Copyright 1998,1999 Heiko Eissfeldt, Copyright 2006-2010 J. Schilling */ +#include "config.h" #ifndef lint -static char sccsid[] = -"@(#)wav.c 1.7 06/09/13 Copyright 1998,1999 Heiko Eissfeldt, Copyright 2006 J. Schilling"; +static UConst char sccsid[] = +"@(#)wav.c 1.14 10/01/31 Copyright 1998,1999 Heiko Eissfeldt, Copyright 2006-2010 J. Schilling"; #endif /* * Copyright (C) by Heiko Eissfeldt - * Copyright (c) 2006 J. Schilling + * Copyright (c) 2006-2010 J. Schilling */ /* * The contents of this file are subject to the terms of the @@ -21,11 +22,13 @@ */ #include "config.h" -#include +#include #include #include +#include "mytype.h" #include "byteorder.h" #include "sndfile.h" +#include "global.h" /* * --------------------------------------------------------------------- @@ -135,6 +138,8 @@ waveHdr.chkRiff.dwSize = cpu_to_le32(temp); waveHdr.chkData.dwSize = cpu_to_le32(expected_bytes); + global.md5offset = sizeof (waveHdr); + return (write(audio, &waveHdr, sizeof (waveHdr))); } @@ -180,5 +185,6 @@ Uchar *buf, size_t BytesToDo))) write, /* get sound samples out */ InSizeToOutSize, /* compressed? output file size */ - 0 /* needs big endian samples */ + 0, /* needs big endian samples */ + "WAVE" }; diff -Nru cdrtools-2.01.01a33/cdrecord/audiosize.c cdrtools-3.02a09/cdrecord/audiosize.c --- cdrtools-2.01.01a33/cdrecord/audiosize.c 2006-11-11 18:59:55.000000000 +0000 +++ cdrtools-3.02a09/cdrecord/audiosize.c 2009-07-05 18:02:21.000000000 +0000 @@ -1,10 +1,11 @@ -/* @(#)audiosize.c 1.21 06/11/11 Copyright 1998-2004 J. Schilling */ +/* @(#)audiosize.c 1.23 09/07/05 Copyright 1998-2009 J. Schilling */ +#include #ifndef lint -static char sccsid[] = - "@(#)audiosize.c 1.21 06/11/11 Copyright 1998-2004 J. Schilling"; +static UConst char sccsid[] = + "@(#)audiosize.c 1.23 09/07/05 Copyright 1998-2009 J. Schilling"; #endif /* - * Copyright (c) 1998-2004 J. Schilling + * Copyright (c) 1998-2009 J. Schilling * * First .vaw implementation made by Dave Platt * Current .wav implementation with additional help from Heiko Eißfeld. diff -Nru cdrtools-2.01.01a33/cdrecord/auinfo.c cdrtools-3.02a09/cdrecord/auinfo.c --- cdrtools-2.01.01a33/cdrecord/auinfo.c 2006-09-13 15:35:12.000000000 +0000 +++ cdrtools-3.02a09/cdrecord/auinfo.c 2010-12-19 18:39:36.000000000 +0000 @@ -1,10 +1,11 @@ -/* @(#)auinfo.c 1.24 06/09/13 Copyright 1998-2004 J. Schilling */ +/* @(#)auinfo.c 1.33 10/12/19 Copyright 1998-2010 J. Schilling */ +#include #ifndef lint -static char sccsid[] = - "@(#)auinfo.c 1.24 06/09/13 Copyright 1998-2004 J. Schilling"; +static UConst char sccsid[] = + "@(#)auinfo.c 1.33 10/12/19 Copyright 1998-2010 J. Schilling"; #endif /* - * Copyright (c) 1998-2004 J. Schilling + * Copyright (c) 1998-2010 J. Schilling */ /* * The contents of this file are subject to the terms of the @@ -22,12 +23,13 @@ #include #include #include -#include +#include #include #include #include #include #include +#include #include "cdtext.h" #include "cdrecord.h" @@ -35,7 +37,9 @@ extern int debug; extern int xdebug; +LOCAL int auinfopen __PR((char *name)); EXPORT BOOL auinfosize __PR((char *name, track_t *trackp)); +EXPORT BOOL auinfhidden __PR((char *name, int track, track_t *trackp)); EXPORT void auinfo __PR((char *name, int track, track_t *trackp)); EXPORT textptr_t *gettextptr __PR((int track, track_t *trackp)); LOCAL char *savestr __PR((char *name)); @@ -57,6 +61,23 @@ } #endif +LOCAL int +auinfopen(name) + char *name; +{ + char infname[1024]; + char *p; + + strncpy(infname, name, sizeof (infname)-1); + infname[sizeof (infname)-1] = '\0'; + p = strrchr(infname, '.'); + if (p != 0 && &p[4] < &name[sizeof (infname)]) { + strcpy(&p[1], "inf"); + } + + return (defltopen(infname)); +} + EXPORT BOOL auinfosize(name, trackp) char *name; @@ -86,7 +107,7 @@ */ if (isatty(STDIN_FILENO)) { errmsgno(EX_BAD, - "WARNING: Stdin is connected to a terminal.\n"); + _("WARNING: Stdin is connected to a terminal.\n")); return (FALSE); } @@ -102,7 +123,7 @@ tlp = p = readtag("Tracklength="); if (p == NULL) { /* Tracklength= Tag not found */ errmsgno(EX_BAD, - "WARNING: %s does not contain a 'Tracklength=' tag.\n", + _("WARNING: %s does not contain a 'Tracklength=' tag.\n"), name); defltclose(); return (FALSE); @@ -111,7 +132,7 @@ p = astol(p, &secs); if (*p != '\0' && *p != ',') { errmsgno(EX_BAD, - "WARNING: %s: 'Tracklength=' contains illegal parameter '%s'.\n", + _("WARNING: %s: 'Tracklength=' contains illegal parameter '%s'.\n"), name, tlp); defltclose(); return (FALSE); @@ -121,14 +142,14 @@ p = astol(p, &nsamples); if (*p != '\0') { errmsgno(EX_BAD, - "WARNING: %s: 'Tracklength=' contains illegal parameter '%s'.\n", + _("WARNING: %s: 'Tracklength=' contains illegal parameter '%s'.\n"), name, tlp); defltclose(); return (FALSE); } tracksize = (secs * 2352) + (nsamples * 4); if (xdebug > 0) { - error("%s: Tracksize %lld bytes (%ld sectors, %ld samples)\n", + error(_("%s: Tracksize %lld bytes (%ld sectors, %ld samples)\n"), name, tracksize, secs, nsamples); } trackp->itracksize = tracksize; @@ -136,165 +157,221 @@ return (TRUE); } +EXPORT BOOL +auinfhidden(name, track, trackp) + char *name; + int track; + track_t *trackp; +{ + char *p; + long l; + long tr = -1; + long tno = -1; + BOOL isdao = !is_tao(&trackp[0]); + + if (auinfopen(name) != 0) + return (FALSE); + + p = readtag("Track="); /* Track no, first track is 1 */ + if (p && isdao) + astol(p, &tr); + if (tr != 0) + return (FALSE); + p = readtag("Tracknumber="); /* Track no, first track >= 1 */ + if (p && isdao) + astol(p, &tno); + + p = readtag("Trackstart="); + if (p && isdao) { + l = -1L; + astol(p, &l); + if (track == 1 && tno == 0 && l == 0) + return (TRUE); + } + return (FALSE); +} + EXPORT void auinfo(name, track, trackp) char *name; int track; track_t *trackp; { - char infname[1024]; char *p; track_t *tp = &trackp[track]; textptr_t *txp; long l; + long tr = -1; long tno = -1; BOOL isdao = !is_tao(&trackp[0]); - strncpy(infname, name, sizeof (infname)-1); - infname[sizeof (infname)-1] = '\0'; - p = strrchr(infname, '.'); - if (p != 0 && &p[4] < &name[sizeof (infname)]) { - strcpy(&p[1], "inf"); - } - - if (defltopen(infname) == 0) { - - p = readtstr("CDINDEX_DISCID="); - p = readtag("CDDB_DISKID="); - - p = readtag("MCN="); - if (p && *p) { - setmcn(p, &trackp[0]); - txp = gettextptr(0, trackp); /* MCN is isrc for trk 0*/ - txp->tc_isrc = savestr(p); - } - - p = readtag("ISRC="); - if (p && *p) { - setisrc(p, &trackp[track]); - txp = gettextptr(track, trackp); - txp->tc_isrc = savestr(p); - } - - p = readtstr("Albumperformer="); - if (p && *p) { - txp = gettextptr(0, trackp); /* Album perf. in trk 0*/ - txp->tc_performer = savestr(p); - } - p = readtstr("Performer="); - if (p && *p) { - txp = gettextptr(track, trackp); - txp->tc_performer = savestr(p); - } - p = readtstr("Albumtitle="); - if (p && *p) { - txp = gettextptr(0, trackp); /* Album title in trk 0*/ - txp->tc_title = savestr(p); - } - p = readtstr("Tracktitle="); - if (p && *p) { - txp = gettextptr(track, trackp); - txp->tc_title = savestr(p); - } - p = readtstr("Songwriter="); - if (p && *p) { - txp = gettextptr(track, trackp); - txp->tc_songwriter = savestr(p); - } - p = readtstr("Composer="); - if (p && *p) { - txp = gettextptr(track, trackp); - txp->tc_composer = savestr(p); - } - p = readtstr("Arranger="); - if (p && *p) { - txp = gettextptr(track, trackp); - txp->tc_arranger = savestr(p); - } - p = readtstr("Message="); - if (p && *p) { - txp = gettextptr(track, trackp); - txp->tc_message = savestr(p); - } - p = readtstr("Diskid="); - if (p && *p) { - txp = gettextptr(0, trackp); /* Disk id is in trk 0*/ - txp->tc_title = savestr(p); - } - p = readtstr("Closed_info="); - if (p && *p) { - txp = gettextptr(track, trackp); - txp->tc_closed_info = savestr(p); - } - - p = readtag("Tracknumber="); - if (p && isdao) - astol(p, &tno); - - p = readtag("Trackstart="); - if (p && isdao) { - l = -1L; - astol(p, &l); - if (track == 1 && tno == 1 && l > 0) { - trackp[1].pregapsize = 150 + l; - printf("Track1 Start: '%s' (%ld)\n", p, l); - } - } - - p = readtag("Tracklength="); + if (auinfopen(name) != 0) + return; - p = readtag("Pre-emphasis="); - if (p && *p) { - if (strncmp(p, "yes", 3) == 0) { - tp->flags |= TI_PREEMP; - if ((tp->tracktype & TOC_MASK) == TOC_DA) - tp->sectype = SECT_AUDIO_PRE; - - } else if (strncmp(p, "no", 2) == 0) { - tp->flags &= ~TI_PREEMP; - if ((tp->tracktype & TOC_MASK) == TOC_DA) - tp->sectype = SECT_AUDIO_NOPRE; - } - } + p = readtstr("CDINDEX_DISCID="); + p = readtag("CDDB_DISKID="); - p = readtag("Channels="); - p = readtag("Copy_permitted="); - if (p && *p) { - /* - * -useinfo always wins - */ + p = readtag("MCN="); + if (p && *p) { + setmcn(p, &trackp[0]); + txp = gettextptr(0, trackp); /* MCN is isrc for trk 0*/ + txp->tc_isrc = savestr(p); + } + + p = readtag("ISRC="); + if (p && *p && track > 0) { + setisrc(p, &trackp[track]); + txp = gettextptr(track, trackp); + txp->tc_isrc = savestr(p); + } + + p = readtstr("Albumperformer="); + if (p && *p) { + txp = gettextptr(0, trackp); /* Album perf. in trk 0*/ + txp->tc_performer = savestr(p); + } + p = readtstr("Performer="); + if (p && *p && track > 0) { + txp = gettextptr(track, trackp); + txp->tc_performer = savestr(p); + } + p = readtstr("Albumtitle="); + if (p && *p) { + txp = gettextptr(0, trackp); /* Album title in trk 0*/ + txp->tc_title = savestr(p); + } + p = readtstr("Tracktitle="); + if (p && *p && track > 0) { + txp = gettextptr(track, trackp); + txp->tc_title = savestr(p); + } + p = readtstr("Albumsongwriter="); + if (p && *p) { + txp = gettextptr(0, trackp); + txp->tc_songwriter = savestr(p); + } + p = readtstr("Songwriter="); + if (p && *p && track > 0) { + txp = gettextptr(track, trackp); + txp->tc_songwriter = savestr(p); + } + p = readtstr("Albumcomposer="); + if (p && *p) { + txp = gettextptr(0, trackp); + txp->tc_composer = savestr(p); + } + p = readtstr("Composer="); + if (p && *p && track > 0) { + txp = gettextptr(track, trackp); + txp->tc_composer = savestr(p); + } + p = readtstr("Albumarranger="); + if (p && *p) { + txp = gettextptr(0, trackp); + txp->tc_arranger = savestr(p); + } + p = readtstr("Arranger="); + if (p && *p && track > 0) { + txp = gettextptr(track, trackp); + txp->tc_arranger = savestr(p); + } + p = readtstr("Albummessage="); + if (p && *p) { + txp = gettextptr(0, trackp); + txp->tc_message = savestr(p); + } + p = readtstr("Message="); + if (p && *p && track > 0) { + txp = gettextptr(track, trackp); + txp->tc_message = savestr(p); + } + p = readtstr("Diskid="); + if (p && *p) { + txp = gettextptr(0, trackp); /* Disk id is in trk 0*/ + txp->tc_diskid = savestr(p); + } + p = readtstr("Albumclosed_info="); + if (p && *p) { + txp = gettextptr(0, trackp); + txp->tc_closed_info = savestr(p); + } + p = readtstr("Closed_info="); + if (p && *p && track > 0) { + txp = gettextptr(track, trackp); + txp->tc_closed_info = savestr(p); + } + + p = readtag("Track="); /* Track no, first track is 1 */ + if (p && isdao) + astol(p, &tr); + p = readtag("Tracknumber="); /* Track no, first track >= 1 */ + if (p && isdao) + astol(p, &tno); + if (tr < 0 && tno > 0) /* Support old inf files */ + tr = tno; + + p = readtag("Trackstart="); + if (p && isdao) { + l = -1L; + astol(p, &l); + if (track == 1 && tr == 1 && l > 0) { + trackp[1].pregapsize = 150 + l; + printf(_("Track1 Start: '%s' (%ld)\n"), p, l); + } + } + + p = readtag("Tracklength="); + + p = readtag("Pre-emphasis="); + if (p && *p) { + if (strncmp(p, "yes", 3) == 0) { + tp->flags |= TI_PREEMP; + if ((tp->tracktype & TOC_MASK) == TOC_DA) + tp->sectype = SECT_AUDIO_PRE; + + } else if (strncmp(p, "no", 2) == 0) { + tp->flags &= ~TI_PREEMP; + if ((tp->tracktype & TOC_MASK) == TOC_DA) + tp->sectype = SECT_AUDIO_NOPRE; + } + } + + p = readtag("Channels="); + p = readtag("Copy_permitted="); + if (p && *p) { + /* + * -useinfo always wins + */ + tp->flags &= ~(TI_COPY|TI_SCMS); + + if (strncmp(p, "yes", 3) == 0) + tp->flags |= TI_COPY; + else if (strncmp(p, "no", 2) == 0) + tp->flags |= TI_SCMS; + else if (strncmp(p, "once", 2) == 0) tp->flags &= ~(TI_COPY|TI_SCMS); - - if (strncmp(p, "yes", 3) == 0) - tp->flags |= TI_COPY; - else if (strncmp(p, "no", 2) == 0) - tp->flags |= TI_SCMS; - else if (strncmp(p, "once", 2) == 0) - tp->flags &= ~(TI_COPY|TI_SCMS); - } - p = readtag("Endianess="); - p = readtag("Index="); - if (p && *p && isdao) - setindex(p, &trackp[track]); - - p = readtag("Index0="); - if (p && isdao) { - Llong ts; - Llong ps; - - l = -2L; - astol(p, &l); - if (l == -1) { - trackp[track+1].pregapsize = 0; - } else if (l > 0) { - ts = tp->itracksize / tp->isecsize; - ps = ts - l; - if (ps > 0) - trackp[track+1].pregapsize = ps; - } + } + p = readtag("Endianess="); + p = readtag("Index="); + if (p && *p && isdao) + setindex(p, &trackp[track]); + + p = readtag("Index0="); + if (p && isdao) { + Llong ts; + Llong ps; + + l = -2L; + astol(p, &l); + if (l == -1) { + trackp[track+1].pregapsize = 0; + } else if (l > 0) { + ts = tp->itracksize / tp->isecsize; + ps = ts - l; + if (ps > 0) + trackp[track+1].pregapsize = ps; } } - } EXPORT textptr_t * @@ -308,7 +385,7 @@ if (txp == NULL) { txp = malloc(sizeof (textptr_t)); if (txp == NULL) - comerr("Cannot malloc CD-Text structure.\n"); + comerr(_("Cannot malloc CD-Text structure.\n")); fillbytes(txp, sizeof (textptr_t), '\0'); trackp[track].text = txp; } @@ -325,7 +402,7 @@ if (ret) strcpy(ret, str); else - comerr("Cannot malloc auinfo string.\n"); + comerr(_("Cannot malloc auinfo string.\n")); return (ret); } @@ -377,18 +454,18 @@ register char *p; if (strlen(mcn) != 13) - comerrno(EX_BAD, "MCN '%s' has illegal length.\n", mcn); + comerrno(EX_BAD, _("MCN '%s' has illegal length.\n"), mcn); for (p = mcn; *p; p++) { if (*p < '0' || *p > '9') - comerrno(EX_BAD, "MCN '%s' contains illegal character '%c'.\n", mcn, *p); + comerrno(EX_BAD, _("MCN '%s' contains illegal character '%c'.\n"), mcn, *p); } p = malloc(14); strcpy(p, mcn); trackp->isrc = p; if (debug) - printf("Track %d MCN: '%s'\n", (int)trackp->trackno, trackp->isrc); + printf(_("Track %d MCN: '%s'\n"), (int)trackp->trackno, trackp->isrc); } LOCAL char upper[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"; @@ -398,7 +475,7 @@ char *isrc; int c; { - errmsgno(EX_BAD, "ISRC '%s' contains illegal character '%c'.\n", isrc, c); + errmsgno(EX_BAD, _("ISRC '%s' contains illegal character '%c'.\n"), isrc, c); } /* @@ -428,7 +505,7 @@ i++; } if (((len - i) != 12) || i > 3) - comerrno(EX_BAD, "ISRC '%s' has illegal length.\n", isrc); + comerrno(EX_BAD, _("ISRC '%s' has illegal length.\n"), isrc); } /* @@ -484,7 +561,7 @@ trackp->isrc = p; if (debug) - printf("Track %d ISRC: '%s'\n", (int)trackp->trackno, trackp->isrc); + printf(_("Track %d ISRC: '%s'\n"), (int)trackp->trackno, trackp->isrc); return; illchar: isrc_illchar(isrc, *p); @@ -512,7 +589,7 @@ goto illchar; i++; if (i > 99) - comerrno(EX_BAD, "Too many indices for track %d\n", (int)trackp->trackno); + comerrno(EX_BAD, _("Too many indices for track %d\n"), (int)trackp->trackno); idxlist[i] = idx; if (*p == ',') p++; @@ -522,7 +599,7 @@ nindex = i; if (debug) - printf("Track %d %d Index: '%s'\n", (int)trackp->trackno, i, tindex); + printf(_("Track %d %d Index: '%s'\n"), (int)trackp->trackno, i, tindex); if (debug) { for (i = 0; i <= nindex; i++) @@ -533,5 +610,5 @@ trackp->tindex = idxlist; return; illchar: - comerrno(EX_BAD, "Index '%s' contains illegal character '%c'.\n", tindex, *p); + comerrno(EX_BAD, _("Index '%s' contains illegal character '%c'.\n"), tindex, *p); } diff -Nru cdrtools-2.01.01a33/cdrecord/cd_misc.c cdrtools-3.02a09/cdrecord/cd_misc.c --- cdrtools-2.01.01a33/cdrecord/cd_misc.c 2006-10-05 19:07:47.000000000 +0000 +++ cdrtools-3.02a09/cdrecord/cd_misc.c 2010-12-19 18:39:36.000000000 +0000 @@ -1,12 +1,13 @@ -/* @(#)cd_misc.c 1.14 06/10/05 Copyright 1997-2006 J. Schilling */ +/* @(#)cd_misc.c 1.18 10/12/19 Copyright 1997-2010 J. Schilling */ +#include #ifndef lint -static char sccsid[] = - "@(#)cd_misc.c 1.14 06/10/05 Copyright 1997-2006 J. Schilling"; +static UConst char sccsid[] = + "@(#)cd_misc.c 1.18 10/12/19 Copyright 1997-2010 J. Schilling"; #endif /* * Misc CD support routines * - * Copyright (c) 1997-2006 J. Schilling + * Copyright (c) 1997-2010 J. Schilling */ /* * The contents of this file are subject to the terms of the @@ -23,8 +24,9 @@ #include #include #include /* Includes for caddr_t */ -#include +#include #include +#include #include "cdrecord.h" @@ -135,12 +137,12 @@ if (li < 0) { lba_to_msf(li, &msf); - printf(" ATIP start of lead in: %ld (%02d:%02d/%02d)\n", + printf(_(" ATIP start of lead in: %ld (%02d:%02d/%02d)\n"), li, msf.msf_min, msf.msf_sec, msf.msf_frame); } if (lo > 0) { lba_to_msf(lo, &msf); - printf(" ATIP start of lead out: %ld (%02d:%02d/%02d)\n", + printf(_(" ATIP start of lead out: %ld (%02d:%02d/%02d)\n"), lo, msf.msf_min, msf.msf_sec, msf.msf_frame); } } diff -Nru cdrtools-2.01.01a33/cdrecord/cdr_drv.c cdrtools-3.02a09/cdrecord/cdr_drv.c --- cdrtools-2.01.01a33/cdrecord/cdr_drv.c 2007-08-05 22:01:38.000000000 +0000 +++ cdrtools-3.02a09/cdrecord/cdr_drv.c 2010-12-19 18:39:36.000000000 +0000 @@ -1,12 +1,13 @@ -/* @(#)cdr_drv.c 1.42 07/08/06 Copyright 1997-2007 J. Schilling */ +/* @(#)cdr_drv.c 1.49 10/12/19 Copyright 1997-2010 J. Schilling */ +#include #ifndef lint -static char sccsid[] = - "@(#)cdr_drv.c 1.42 07/08/06 Copyright 1997-2007 J. Schilling"; +static UConst char sccsid[] = + "@(#)cdr_drv.c 1.49 10/12/19 Copyright 1997-2010 J. Schilling"; #endif /* * CDR device abstraction layer * - * Copyright (c) 1997-2007 J. Schilling + * Copyright (c) 1997-2010 J. Schilling */ /* * The contents of this file are subject to the terms of the @@ -21,11 +22,12 @@ */ #include -#include +#include #include #include /* Include sys/types.h to make off_t available */ #include #include +#include #include #include @@ -44,6 +46,7 @@ extern cdr_t cdr_dvdplusr; extern cdr_t cdr_dvdplusrw; extern cdr_t cdr_bd; +extern cdr_t cdr_bdrom; extern cdr_t cdr_bdr; extern cdr_t cdr_bdre; extern cdr_t cdr_cd_dvd; @@ -69,6 +72,7 @@ EXPORT int drive_attach __PR((SCSI *scgp, cdr_t *)); EXPORT int attach_unknown __PR((void)); EXPORT int blank_dummy __PR((SCSI *scgp, cdr_t *, long addr, int blanktype)); +EXPORT int blank_simul __PR((SCSI *scgp, cdr_t *, long addr, int blanktype)); EXPORT int format_dummy __PR((SCSI *scgp, cdr_t *, int fmtflags)); EXPORT int drive_getdisktype __PR((SCSI *scgp, cdr_t *dp)); EXPORT int cmd_ill __PR((SCSI *scgp)); @@ -85,6 +89,7 @@ cdr_t *drivers[] = { &cdr_cd_dvd, &cdr_bd, + &cdr_bdrom, &cdr_bdr, &cdr_bdre, &cdr_dvdplus, @@ -135,7 +140,7 @@ EXPORT int attach_unknown() { - errmsgno(EX_BAD, "Unsupported drive type\n"); + errmsgno(EX_BAD, _("Unsupported drive type\n")); return (-1); } @@ -146,17 +151,60 @@ long addr; int blanktype; { - printf("This drive or media does not support the 'BLANK media' command\n"); + printf(_("This drive or media does not support the 'BLANK media' command\n")); return (-1); } EXPORT int +blank_simul(scgp, dp, addr, blanktype) + SCSI *scgp; + cdr_t *dp; + long addr; + int blanktype; +{ + track_t *trackp = dp->cdr_dstat->ds_trackp; + int secsize = trackp->secsize; + Llong padbytes = 0; /* Make stupid GCC happy */ + int ret = -1; + + switch (blanktype) { + + case BLANK_MINIMAL: + padbytes = 1000 * secsize; + break; + case BLANK_DISC: + if (dp->cdr_dstat->ds_maxblocks > 0) + padbytes = dp->cdr_dstat->ds_maxblocks * (Llong)secsize; + break; + default: + printf(_("Unsupported blank type for simulation mode.\n")); + printf(_("Try blank=all or blank=fast\n")); + padbytes = 0; + } + if (padbytes > 0) { + printf(_("Running pad based emulation to blank the medium.\n")); + printf(_("secsize %d padbytes %lld padblocks %lld maxblocks %d\n"), + secsize, padbytes, padbytes/secsize, dp->cdr_dstat->ds_maxblocks); + + ret = pad_track(scgp, dp, trackp, 0, padbytes, TRUE, NULL); + printf("\n"); + flush(); + } + if (0) { + printf(_("This drive or media does not support the 'BLANK media' command\n")); + return (-1); + } + return (ret); + +} + +EXPORT int format_dummy(scgp, dp, fmtflags) SCSI *scgp; cdr_t *dp; int fmtflags; { - printf("This drive or media does not support the 'FORMAT media' command\n"); + printf(_("This drive or media does not support the 'FORMAT media' command\n")); return (-1); } @@ -173,7 +221,7 @@ cmd_ill(scgp) SCSI *scgp; { - errmsgno(EX_BAD, "Unspecified command not implemented for this drive.\n"); + errmsgno(EX_BAD, _("Unspecified command not implemented for this drive.\n")); return (-1); } @@ -191,7 +239,7 @@ cdr_t *dp; track_t *trackp; { - errmsgno(EX_BAD, "SAO writing not available or not implemented for this drive.\n"); + errmsgno(EX_BAD, _("SAO writing not available or not implemented for this drive.\n")); return (-1); } @@ -200,7 +248,7 @@ SCSI *scgp; cdr_t *dp; { - errmsgno(EX_BAD, "Printing of disk status not implemented for this drive.\n"); + errmsgno(EX_BAD, _("Printing of disk status not implemented for this drive.\n")); return (-1); } @@ -232,9 +280,9 @@ return (FALSE); if (!streql("help", name)) - error("Illegal driver type '%s'.\n", name); + error(_("Illegal driver type '%s'.\n"), name); - error("Driver types:\n"); + error(_("Driver types:\n")); for (d = drivers; *d != (cdr_t *)NULL; d++) { error("%s%n", (*d)->cdr_drname, &n); @@ -274,8 +322,8 @@ &is_dvdpluswr, &is_ddcdwr); if (xdebug) { error( - "Found MMC-3 %s CD: %s/%s DVD-: %s/%s DVD+: %s/%s DDCD: %s/%s.\n", - is_wr ? "writer": "reader", + _("Found MMC-3 %s CD: %s/%s DVD-: %s/%s DVD+: %s/%s DDCD: %s/%s.\n"), + is_wr ? _("writer"): _("reader"), is_cd?"r":"-", is_cdwr?"w":"-", is_dvd?"r":"-", @@ -296,7 +344,7 @@ */ if (is_mmc(scgp, &is_cdwr, &is_dvdwr)) { if (xdebug) { - error("Found MMC drive CDWR: %d DVDWR: %d.\n", + error(_("Found MMC drive CDWR: %d DVDWR: %d.\n"), is_cdwr, is_dvdwr); } @@ -341,20 +389,20 @@ odp = dp; if (xdebug) { - error("Using driver '%s' for identify.\n", + error(_("Using driver '%s' for identify.\n"), dp != NULL ? dp->cdr_drname : - ""); + _("")); } if (dp != (cdr_t *)0) dp = dp->cdr_identify(scgp, dp, scgp->inq); if (xdebug && dp != odp) { - error("Identify set driver to '%s'.\n", + error(_("Identify set driver to '%s'.\n"), dp != NULL ? dp->cdr_drname : - ""); + _("")); } return (dp); diff -Nru cdrtools-2.01.01a33/cdrecord/cdrecord.1 cdrtools-3.02a09/cdrecord/cdrecord.1 --- cdrtools-2.01.01a33/cdrecord/cdrecord.1 2007-08-03 21:27:35.000000000 +0000 +++ cdrtools-3.02a09/cdrecord/cdrecord.1 2017-09-21 14:11:50.000000000 +0000 @@ -1,4 +1,4 @@ -.\" @(#)cdrecord.1 1.116 07/08/03 Copyright 1996-2007 J. Schilling +.\" @(#)cdrecord.1 1.154 17/09/21 Copyright 1996-2017 J. Schilling .\" .\" The contents of this file are subject to the terms of the .\" Common Development and Distribution License, Version 1.0 only @@ -6,7 +6,9 @@ .\" with the License. .\" .\" See the file CDDL.Schily.txt in this distribution for details. -." +.\" A copy of the CDDL is also available via the Internet at +.\" http://www.opensource.org/licenses/cddl1.txt +.\" .\" When distributing Covered Code, include this CDDL HEADER in each .\" file and include the License file CDDL.Schily.txt from this distribution. .\" @@ -24,9 +26,9 @@ .if n .ds s sz .if t .ds m \\(*m .if n .ds m micro -.TH CDRECORD 1 "Version 2.0" "J\*org Schilling" "Schily\'s USER COMMANDS" +.TH CDRECORD 1 "Version 3.02 2017/09/21" "J\*org Schilling" "Schily\'s USER COMMANDS" .SH NAME -cdrecord \- record audio or data Compact Disks or Digital Versatile Disks from a master +cdrecord \- record audio or data CD, DVD or BluRay .SH SYNOPSIS .B cdrecord [ @@ -41,139 +43,54 @@ .SH DESCRIPTION .B Cdrecord is used to record data or audio Compact Discs on an Orange Book -CD-Recorder or to write DVD media on a DVD-Recorder. -.PP -The -.I device -refers to -.IR scsibus / target / lun -of the CD/DVD-Recorder. Communication on -.I SunOS -is done with the SCSI general driver -.B scg. -Other operating systems are using a library simulation of this driver. -Possible syntax is: -.B dev= -.IR scsibus , target , lun -or -.B dev= -.IR target , lun . -In the latter case, the CD/DVD-Recorder has to be connected to the default -SCSI bus of the machine. -.IR Scsibus , -.I target -and -.I lun -are integer numbers. -Some operating systems or SCSI transport implementations may require to -specify a filename in addition. -In this case the correct syntax for the device is: -.B dev= -.IR devicename : scsibus , target , lun -or -.B dev= -.IR devicename : target , lun . -If the name of the device node that has been specified on such a system -refers to exactly one SCSI device, a shorthand in the form -.B dev= -.IR devicename : @ -or -.B dev= -.IR devicename : @ , lun -may be used instead of -.B dev= -.IR devicename : scsibus , target , lun . - -.PP -To access remote SCSI devices, you need to prepend the SCSI device name by -a remote device indicator. The remote device indicator is either -.BI REMOTE: user@host: -or -.BR -.BI REMOTE: host: -.br -A valid remote SCSI device name may be: -.BI REMOTE: user@host: -to allow remote SCSI bus scanning or -.BI REMOTE: user@host:1,0,0 -to access the SCSI device at -.I host -connected to SCSI bus # 1,target 0 lun 0. - -.PP -.B Cdrecord -is completely based on -.B SCSI -commands but this is no problem as all CD/DVD writers -ever made use -.B SCSI -commands for the communication. Even -.B ATAPI -drives are just -.B SCSI -drives that inherently use the -.I "ATA packet interface -as -.B SCSI -command transport layer build into the IDE (ATA) transport. -You may need to specify an alternate transport layer on the command line -if your OS does not implement a fully integrated kernel driver subsystem that -allows to access any drive using -.B SCSI -commands via a single unique user interface. - +CD-recorder, to write DVD media on a DVD-recorder or to write +BluRay media on a BluRay-recorder. .PP -To access SCSI devices via alternate transport layers, -you need to prepend the SCSI device name by a transport layer indicator. -The transport layer indicator may be something like -.B USCSI: -or -.BR ATAPI: . -To get a list of supported transport layers for your platform, use +.SS "Device naming" +Most users do not need to care about device naming at all. +If no .B dev= -.IR HELP : - - -.PP -To make +option was specified, .B cdrecord -portable to all \s-2UNIX\s0 platforms, the syntax +implements +.B auto target +support and automagically finds the drive in case that exactly +one CD-ROM type drive is available in the system. +In case that more than one CD-ROM type drive exists on the system, +a list of possible device name parameters may be retrieved with +.B "cdrecord \-scanbus +or from the target example from the output of +.BR "cdrecord dev=help" , +then the .B dev= -.IR devicename : scsibus , target , lun -is preferred as it hides OS specific knowledge about device names from the user. -A specific OS may not necessarily support a way to specify a real device file name nor a -way to specify -.IR scsibus , target , lun . - -.PP -.I Scsibus -0 is the default SCSI bus on the machine. Watch the boot messages for more -information or look into -.B /var/adm/messages -for more information about the SCSI configuration of your machine. -If you have problems to figure out what values for -.IR scsibus , target , lun -should be used, try the -.B \-scanbus -option of -.B cdrecord -described below. - +parameter may be set based on the device listing. .PP +The +.I device +parameter to the +.B dev= +option +explained below refers to the +.B SCSI\ CAM +standard notation for +.IR scsibus / target / lun +of the CD/DVD/BluRay-recorder. If a file /etc/default/cdrecord exists, the parameter to the .B dev= option may also be a drive name label in said file (see FILES section). +.ne 6 +.SS "Constraints for running cdrecord" .PP On .B SVr4 compliant systems, .B cdrecord -uses the real time class to get the highest scheduling priority that is +uses the real-time class to get the highest scheduling priority that is possible (higher than all kernel processes). On systems with -.B POSIX real time scheduling -cdrecord uses real time scheduling too, +.B POSIX real-time scheduling +cdrecord uses real-time scheduling too, but may not be able to gain a priority that is higher than all kernel processes. .PP In order to be able to use the SCSI transport subsystem of the OS, run at highest @@ -181,9 +98,19 @@ .B cdrecord either needs to be run as root, needs to be installed suid root or -must be called via -.B RBACs -pfexec mechanism. +must be called via a +fine grained privileges mechanism, such as the Solaris +.BR privileges (5) +mechanism via +.BR exec_attr (4) +or the Linux +.BR capabilities (7) +mechanism via +.BR setcap (8) +to allow cdrecord to be used as an ordinary user. + +.ne 6 +.SS "File to track mapping" .PP In .I Track At Once @@ -206,6 +133,12 @@ .SH "GENERAL OPTIONS .PP General options must be before any track file name or track option. +.SS "Informative options" +.TP +.B \-help +display version information for +.B cdrecord +on standard output. .TP .B \-version Print version information and exit. @@ -213,140 +146,68 @@ .B \-v Increment the level of general verbosity by one. This is used e.g. to display the progress of the writing process. +.SS "Media write mode options" .TP -.B \-V -Increment the verbose level in respect of SCSI command transport by one. -This helps to debug problems -during the writing process, that occur in the CD/DVD-Recorder. -If you get incomprehensible error messages you should use this flag -to get more detailed output. -.B \-VV -will show data buffer content in addition. -Using -.B \-V -or -.B \-VV -slows down the process and may be the reason for a buffer underrun. -.TP -.BI debug= "#, " -d -Set the misc debug value to # (with debug=#) or increment -the misc debug level by one (with -d). If you specify -.I -dd, -this equals to -.BI debug= 2. -This may help to find problems while opening a driver for libscg -as well as with sector sizes and sector types. -Using -.B \-debug -slows down the process and may be the reason for a buffer underrun. -.TP -.BR kdebug= "#, " kd= # -Tell the -.BR scg -driver -to modify the kernel debug value while SCSI commands are running. -.TP -.BR \-silent ", " \-s -Do not print out a status report for failed SCSI commands. -.TP -.B \-force -Force to continue on some errors. Be careful when using this option. -.B Cdrecord -implements several checks that prevent you from doing unwanted things -like damaging CD-RW media by improper drives. Many of the sanity checks are -disabled when the -.B \-force -option is used. -.sp -This option also implements some tricks that will allow -you to blank bad CD-RW disks. -.TP -.B \-immed -Tell cdrecord to set the -.B "SCSI IMMED" -flag in certain commands -(load/eject/blank/close_track/close_session). -This can be useful -on broken systems with ATAPI harddisk and CD/DVD writer on the same bus or -with SCSI systems that don't use disconnect/reconnect. -These systems will freeze while blanking or fixating a CD/DVD or while a DVD -writer is filling up a session to the minimum amount (approx. 800 MB). -Setting the -.B \-immed -flag will request the command to return immediately -while the operation proceeds in background, making -the bus usable for the other devices and avoiding the system freeze. -This is an experimental feature which may work or not, depending on the model -of the CD/DVD writer. -A correct solution would be to set up a correct cabling but there seem to be -notebooks around that have been set up the wrong way by the manufacturer. -As it is impossible to fix this problem in notebooks, the -.B \-immed -option has been added. -.sp -A second experimental feature of the -.B \-immed -flag is to tell cdrecord to try to wait short times while writing to the -media. This is expected to free the IDE bus if the CD/DVD writer and the -data source are connected to the same IDE cable. In this case, the CD/DVD -writer would otherwise usually block the IDE bus for nearly all the time -making it impossible to fetch data from the source drive. See also -.B minbuf= -and -.B \-v -option. -.sp -Use both features at your own risk. -If it turns out that it would make sense to have a separate option -for the wait feature, write to the author and convince him. -.TP -.BI minbuf= value -The # -.B minbuf= -option allows to define the minimum drive buffer fill ratio for the -experimental ATAPI wait mode that is intended to free the IDE bus -to allow hard disk and CD/DVD writer to be on the same IDE cable. -As the wait mode currently only works when the verbose option -.B \-v -has been specified, -.B cdrecord -implies the verbose option in case the -.B \-immed -or -.B minbuf= -option have been specified. -Valid values for -.B minbuf= -are between 25 and 95 for 25%.\|.\|.95% minimum drive buffer fill ratio. -.TP .B \-dummy -The CD/DVD-Recorder will go through all steps of the recording process, +The +.B \-dummy +option modifies the current write strategy. +The CD/DVD/BluRay-recorder will go through all steps of the recording process, but the laser is turned off during this procedure. It is recommended to run several tests before actually writing to a Compact Disk or Digital Versatile Disk, -if the timing and load response of the system is not known. -.TP -.B \-clone -Tells -.B cdrecord -to handle images created by -.IR "readcd \-clone" . +if the timing and load response of the current system is not yet known. +.sp The -.B \-clone -may only be used in conjunction with with the -.B \-raw96r -or with the -.B \-raw16 +.B \-dummy +option does not work with all media and write modes. +DVD+ media and BluRay media does not support +.B dummy +writes and most CD-recorders do not support +.B dummy +writes in raw mode. +.TP +.B \-multi +Allow multi-session CDs or multi-border DVDs to be made. +This flag needs to be present +on all sessions of a multi-session or multi-border disk, +except you want to create a session on a CD that will be +the last session on the CD-media. +.sp +For CD-media, +the fixation will be done in a way that allows the CD/DVD/BluRay-recorder to +append additional sessions later. This is done by generating a TOC +with a link to the next program area. The so generated media is not +100% compatible to manufactured CDs (except for CDplus). +Use only for recording of multi-session CDs. +If this option is present, the default track type is +.BR "CD-ROM XA mode 2 form 1" +and the sector size is 2048 bytes. +The XA sector subheaders will be created by the drive. +The +.I Sony +drives have no hardware support for +.BR "CD-ROM XA mode 2 form 1" . +You have to specify the +.B \-data +option in order to create multi-session disks on these drives. +If you like to record a multi-session disk in SAO mode, +you need to force +.B CD-ROM +sectors by including the +.B \-data option. -Using -.B \-clone -together with -.B \-raw96r -is preferred as it allows to write all subchannel data. -The option -.B \-raw16 -should only be used with drives that do not support to write in -.B \-raw96r -mode. +Not all drives allow multi-session CDs in SAO mode. +.sp +For DVD media, +.B \-multi +switches the write mode to +.BR "incremental packet recording" . +There is currently no way to prevent the ability to append further +sessions and there is currently only support for DVD-R/DVD-RW media. +To reuse a DVD-RW that has previously been written in +.B "incremental packet recording" +mode for different write modes, you need to blank the entire media before. .TP .B \-dao .TP @@ -360,10 +221,20 @@ mode. Note that cdrecord needs to know the size of each track in advance for this mode (see the -.B "mkisofs \-print-size" +.B "mkisofs \-print\-size" option and the .I EXAMPLES section for more information). +.sp +There are several CD writers with bad firmware +that result in broken disks when writing in TAO or SAO mode. +If you find any problems with the layout of a disk or with subchannel +content (e.g. wrong times on the display when playing the CD) and your drive +supports to write in +.B \-raw96r +or +.B \-raw16 +mode, you should give it a try. .TP .B \-tao Set @@ -371,50 +242,50 @@ This is the default write mode in previous .B cdrecord versions. -With most drives, this write mode is required for multi session recording. -.TP -.B \-raw -Set -.B "RAW writing mode. +With most drives, this write mode is required for multi-session recording. +.sp +There are several CD writers with bad firmware +that result in broken disks when writing in TAO or SAO mode. +If you find any problems with the layout of a disk or with subchannel +content (e.g. wrong times on the display when playing the CD) and your drive +supports to write in +.B \-raw96r +or +.B \-raw16 +mode, you should give it a try. +.TP +.B \-raw +Set +.B "RAW writing mode. Using this option defaults to .BR \-raw96r . Note that cdrecord needs to know the size of each track in advance for this mode (see the -.B "mkisofs \-print-size" +.B "mkisofs \-print\-size" option and the .I EXAMPLES section for more information). .TP .B \-raw96r -Select Set .B "RAW writing mode -with 2352 byte sectors plus 96 bytes of raw P-W subchannel data resulting +with 2352 byte sectors plus 96 bytes of raw P-W sub-channel data resulting in a sector size of 2448 bytes. This is the preferred raw writing mode as it gives best control over the -CD writing process. -If you find any problems with the layout of a disk or with sub channel -content (e.g. wrong times on the display when playing the CD) and your drive -supports to write in -.B \-raw96r -or -.B \-raw16 -mode, you should give it a try. There are several CD writers with bad firmware -that result in broken disks when writing in TAO or SAO mode. +CD-writing process. Writing data disks in raw mode needs significantly more CPU time than other write modes. If your CPU is too slow, this may result in buffer underruns. Note that cdrecord needs to know the size of each track in advance for this mode (see the -.B "mkisofs \-print-size" +.B "mkisofs \-print\-size" option and the .I EXAMPLES section for more information). .TP .B \-raw96p -Select Set .B "RAW writing mode -with 2352 byte sectors plus 96 bytes of packed P-W subchannel data resulting +with 2352 byte sectors plus 96 bytes of packed P-W sub-channel data resulting in a sector size of 2448 bytes. This is the less preferred raw writing mode as only a few recorders support it and some of these recorders have bugs in the firmware implementation. @@ -426,16 +297,15 @@ write modes. If your CPU is too slow, this may result in buffer underruns. Note that cdrecord needs to know the size of each track in advance for this mode (see the -.B "mkisofs \-print-size" +.B "mkisofs \-print\-size" option and the .I EXAMPLES section for more information). .TP .B \-raw16 -Select Set .B "RAW writing mode -with 2352 byte sectors plus 16 bytes of P-Q subchannel data resulting +with 2352 byte sectors plus 16 bytes of P-Q sub-channel data resulting in a sector size of 2368 bytes. If a recorder does not support .BR \-raw96r , @@ -444,8 +314,8 @@ .I CD-Text or .I CD+Graphics -but it is the only raw writing mode in cheap CD writers. -As these cheap writers in most cases do not support +but it is the only raw writing mode in cheap CD-writers, +as these cheap writers in most cases do not support .B \-dao mode. Don't use this mode if your recorder supports @@ -458,66 +328,29 @@ option and the .I EXAMPLES section for more information). +.SS "Cdrecord functional options" .TP -.B \-multi -Allow multi session CDs to be made. This flag needs to be present -on all sessions of a multi session disk, -except you want to create a session that will be -the last session on the media. -The fixation will be done in a way that allows the CD/DVD-Recorder to -append additional sessions later. This is done by generation a TOC -with a link to the next program area. The so generated media is not -100% compatible to manufactured CDs (except for CDplus). -Use only for recording of multi session CDs. -If this option is present, the default track type is -.BR "CD-ROM XA mode 2 form 1" -and the sector size is 2048 bytes. -The XA sector subheaders will be created by the drive. -The -.I Sony -drives have no hardware support for -.BR "CD-ROM XA mode 2 form 1" . -You have to specify the -.B \-data -option in order to create multi session disks on these drives. -As long as cdrecord does not have a coder for converting data sectors -to audio sectors, you need to force -.B CD-ROM -sectors by including the -.B \-data -option if you like to record a multisession disk in SAO mode. -Not all drives allow multisession CDs in SAO mode. -.TP -.B \-media\-info -.TP -.B \-minfo -Retrieve and print information about the state of the medium. -This option currently only works for MMC compliant drives. -.TP -.B \-msinfo -Retrieve multi session info in a form suitable for -.B "mkisofs-1.10" -or later. -.sp -This option makes only sense with a CD that contains at least -one closed session and is appendable (not finally closed yet). -Some drives create error messages if you try to get the multi -session info for a disk that is not suitable for this operation. -.TP -.B \-toc -Retrieve and print out the table of content or PMA of a CD. -With this option, +.B \-abort +Try to send an +.B abort +sequence to the drive. +If you use .B cdrecord -will work with CD-R drives and with CD-ROM drives. +only, this should never be needed; but other software may leave a drive +in an unusable condition. +Calling +.B "cdrecord \-reset +may be needed if a previous write has been interrupted and the software did +not tell the drive that it will not continue to write. .TP .B \-atip -Retrieve and print out the ATIP (absolute Time in Pre-groove) info of a CD/DVD -recordable or CD/DVD re-writable media. +Retrieve and print out the ATIP (Absolute Time In Pre-groove) info of a CD/DVD/BluRay +recordable or CD/DVD/BluRay re-writable media. With this option, .B cdrecord will try to retrieve the ATIP info. If the actual drive does not support to read the ATIP info, it may be that only a reduced set of information -records or even nothing is displayed. Only a limited number of MMC compliant +records or even nothing is displayed. Only a limited number of MMC-compliant drives support to read the ATIP info. .sp If @@ -527,76 +360,6 @@ DVD media does not have ATIP information but there is equivalent prerecorded information that is read out and printed. .TP -.B \-fix -The disk will only be fixated (i.e. a TOC for a CD-Reader will be written). -This may be used, if for some reason the disk has been written but not -fixated. This option currently does not work with old TEAC drives (CD-R50S and -CD-R55S). -.TP -.B \-nofix -Do not fixate the disk after writing the tracks. This may be used -to create an audio disk in steps. An un-fixated disk can usually not be used -on a non CD-writer type drive but there are audio CD players that will -be able to play such a disk. -.TP -.B \-waiti -Wait for input to become available on standard input before trying to open -the SCSI driver. This allows -.B cdrecord -to read its input from a pipe even -when writing additional sessions to a multi session disk. -When writing another session to a multi session disk, -.B mkisofs -needs to read the old session from the device before writing output. -This cannot be done if -.B cdrecord -opens the SCSI driver at the same time. -.TP -.B \-load -Load the media and exit. This only works with a tray loading mechanism -but seems to be useful when using the Kodak disk transporter. -.TP -.B \-lock -Load the media, lock the door and exit. This only works with a tray loading mechanism -but seems to be useful when using the Kodak disk transporter. -.TP -.B \-eject -Eject disk after doing the work. -Some devices (e.g. Philips) need to eject the medium before creating a new -disk. Doing a \-dummy test and immediately creating a real disk would not -work on these devices. -.TP -.BR speed= # -Set the speed factor of the writing process to #. -# is an integer, representing a multiple of the audio speed. -This is about 150\ KB/s for CD-ROM, about 172\ KB/s for CD-Audio and about 1385\ kB/s -for DVD media. -If no -.I speed -option is present, -.B cdrecord -will try to get a drive specific speed value from the file -.B /etc/default/cdrecord -and if it cannot find one, it will try to get the speed value from the -.B CDR_SPEED -environment and later from the -.B CDR_SPEED= -entry in -.BR /etc/default/cdrecord . -If no speed value could be found, cdrecord uses a drive specific default speed. -The default for all new (MMC compliant) drives is to use the maximum supported by the drive. -If you use -.I "speed=0" -with a MMC compliant drive, -.B cdrecord -will switch to the lowest possible speed for drive and medium. -If you are using an old (non MMC) drive that has problems with -.I "speed=2 -or -.IR "speed=4" , -you should try -.IR "speed=0" . -.TP .BI blank= type Blank a CD-RW and exit or blank a CD-RW before writing. The blanking type may be one of: .RS @@ -611,7 +374,7 @@ Minimally blank the disk. This results in erasing the PMA, the TOC and the pregap. .TP track -Blank a track. +Blank the last track. .TP unreserve Unreserve a reserved track. @@ -624,7 +387,7 @@ .TP session Blank the last session. -.RE +.PP Not all drives support all blanking types. It may be necessary to use .B "blank=all if a drive reports a specified command as being invalid. @@ -640,224 +403,134 @@ .B \-force flag is used but it finally depends on the drive's firmware whether the blanking operation will succeed or not. +.RE .TP -.B \-format -Format a CD-RW/DVD-RW/DVD+RW disc. -Formatting is currently only implemented for DVD+RW media. -A 'maiden' DVD+RW media needs to -be formatted before you may write to it. -However, as +.B \-checkdrive +Checks if a driver for the current drive is present and exit. +If the drive is a known drive, .B cdrecord -autodetects the need for formatting in this case and auto formats the medium -before it starts writing, the -.B \-format -option is only needed if you like to forcibly reformat a DVD+RW medium. +uses exit code 0. .TP -.BR fs= # -Set the FIFO (ring buffer) size to #. -You may use the same syntax as in -.BR dd (1), -.BR sdd (1) +.B \-clone +Tells +.B cdrecord +to handle images created by +.IR "readcd \-clone" . +The +.B \-clone +write mode may only be used in conjunction with the +.B \-raw96r or -.BR star (1). -The number representing the size is taken in bytes unless otherwise specified. -If a number is followed directly by the letter `b', `k', `m', `s' or `f', -the size is multiplied by 512, 1024, 1024*1024, 2048 or 2352. -If the size consists of numbers separated by `x' or `*', multiplication of the -two numbers is performed. -Thus -.I "fs=10x63k -will specify a FIFO size of 630\ kBytes. +.B \-raw16 +option. +Using +.B \-clone +together with +.B \-raw96r +is preferred as it allows to write all sub-channel data. +The +.B \-raw16 +option should only be used with drives that do not support to write in +.B \-raw96r +mode. .sp -The size specified by the -.I fs= -argument includes the shared memory that is needed for administration. This -is at least one page of memory. -If no -.IR fs = -option is present, +Note that copying in +.B clone +mode disables certain levels of error correction and thus always results +in a quality degradation. +Avoid copying audio CDs in +.B clone +mode for this reason. +.TP +.BI cuefile= filename +Take all recording-related information from a CDRWIN-compliant +.B "CUE sheet +file. +No track-file arguments to .B cdrecord -will try to get the FIFO size value from the -.B CDR_FIFOSIZE -environment. -The default FIFO size is currently 4 MB. +are allowed when this option is present and one of the following options: +.BR \-dao , +.BR \-sao , +.BR \-raw , +.BR \-raw16 , +.B \-raw96r +is needed in addition. +.TP +.BR defpregap= # +Set the default pre-gap size for all tracks except track number 1. +This option currently only makes sense with the following drives: .sp -The FIFO is used to increase buffering for the real time writing process. -It allows to run a pipe from -.B mkisofs -directly into +.BR "Teac CD-R50S" , +.BR "Teac CD-R55S" , +.BR "JVC XR-W2010" , +.B Pinnacle RCD-5020 +.sp +when +creating track-at-once disks without the 2-second silence before each track. +.br +This option may go away in the future. +.TP +.BI driver= name +Allows the user to manually select a driver for the device. +The reason for the existence of the +.BI driver= name +option is to allow users to use +.B cdrecord +with drives that are similar to supported drives but not known +directly by .BR cdrecord . -If the FIFO is active and a pipe from -.B mkisofs -into +All drives made after 1997 should be MMC-standard-compliant and +thus supported by one of the MMC drivers. +It is most unlikely that .B cdrecord -is used to create a CD, +is unable to find the right driver automatically. +Use this option with extreme care. If a wrong driver is used for a +device, the possibility of creating corrupted disks is high. +The minimum problem related to a wrong driver is that the +.B \-speed +or +.B \-dummy +will not work. +.br +.RS +.ne 8 +.PP +The following driver names are supported: +.TP +.B help +To get a list of possible drivers together with a short description. +.TP +.B mmc_bd +The generic SCSI-3/mmc BluRay driver is auto-selected whenever .B cdrecord -will abort prior to do any modifications on the disk if -.B mkisofs -dies before it starts writing. -The recommended FIFO size is between 4 and 128\ MBytes. -As a rule of thumb, the FIFO size should be at least equal to the size -of the internal buffer of the CD/DVD-Recorder and no more than half of -the physical amount of RAM available in the machine. -If the FIFO size is big enough, the FIFO statistics will print a FIFO -empty count of zero and the FIFO min fill is not below 20%. -It is not wise to use too much space for the FIFO. If you need more -than 8 MB to write a CD at a speed less than 20x from an image on a -local file system on an idle machine, your machine is either underpowered, -has hardware problems or is mis-configured. -If you like to write DVDs or to write CDs at higher speed, it makes sense -to use at least 16\ MB for the FIFO. -.sp -On old and small machines, you need to be more careful with the FIFO size. -If your machine has less than 256\ MB of physical RAM, you should not -set up a FIFO size that is more than 32\ MB. -The sun4c architecture (e.g. a Sparcstation-2) has only MMU page table entries -for 16\ MBytes per process. Using more than 14\ MBytes for the FIFO -may cause the operating system in this case to spend much time to constantly -reload the MMU tables. Newer machines from Sun do not have this MMU -hardware problem. I have no information on PC-hardware reflecting -this problem. -.sp -Old Linux systems for non x86 platforms have broken definitions for -the shared memory size. You need to fix them and rebuild the kernel -or manually tell +finds an MMC-compliant drive that does support to write BluRay media or a +multi system that contains a BluRay disk as the current medium. +This driver tries to close the tray, checks the medium found in the tray and then +branches to the driver that matches the current medium. +.TP +.B mmc_bdr +The generic SCSI-3/mmc BluRay driver is auto-selected whenever .B cdrecord -to use a smaller FIFO. -.sp -If you have buffer underruns or similar problems (like a constantly empty -drive buffer) and observe a zero -.IR "fifo empty count" , -you have hardware problems that prevents the data from flowing fast enough -from the kernel memory to the drive. The FIFO size in this case is sufficient, -but you should check for a working DMA setup. -.TP -.BR ts= # -Set the maximum transfer size for a single SCSI command to #. -The syntax for the -.B ts= -option is the same as for cdrecord fs=# or sdd bs=#. -.sp -If no -.B ts= -option has been specified, -.B cdrecord -defaults to a transfer size of 63\ kB. If libscg gets lower values from the -operating system, the value is reduced to the maximum value that is possible -with the current operating system. -Sometimes, it may help to further reduce the transfer size or to enhance it, -but note that it may take a long time to find a better value by experimenting -with the -.B ts= -option. -.TP -.BI dev= target -Sets the SCSI target for the CD/DVD-Recorder, see notes above. -A typical device specification is -.BI dev= 6,0 -\&. -If a filename must be provided together with the numerical target -specification, the filename is implementation specific. -The correct filename in this case can be found in the system specific -manuals of the target operating system. -On a -.I FreeBSD -system without -.I CAM -support, you need to use the control device (e.g. -.IR /dev/rcd0.ctl ). -A correct device specification in this case may be -.BI dev= /dev/rcd0.ctl:@ -\&. -.sp -On Linux, drives connected to a parallel port adapter are mapped -to a virtual SCSI bus. Different adapters are mapped to different -targets on this virtual SCSI bus. -.sp -If no -.I dev -option is present, -.B cdrecord -will try to get the device from the -.B CDR_DEVICE -environment. -.sp -If the argument to the -.B dev= -option does not contain the characters ',', '/', '@' or ':', -it is interpreted as an label name that may be found in the file -/etc/default/cdrecord (see FILES section). -.sp -If no -.B dev= -option is present, or if the -.B dev= -option only contains a transport specifyer but no address, -.B cdrecord -tries to scan the SCSI address space for CD-ROM drives. -If exactly one is found, this is used by default. -.TP -.BI gracetime= # -Set the grace time before starting to write to -.IR # " seconds. -Values below 3 seconds are not allowed in order to prevent the volume management -from interrupting the write process. -.TP -.BI timeout= # -Set the default SCSI command timeout value to -.IR # " seconds. -The default SCSI command timeout is the minimum timeout used for sending -SCSI commands. -If a SCSI command fails due to a timeout, you may try to raise the -default SCSI command timeout above the timeout value of the failed command. -If the command runs correctly with a raised command timeout, -please report the better timeout value and the corresponding command to -the author of the program. -If no -.I timeout -option is present, a default timeout of 40 seconds is used. +finds an MMC-compliant drive that does support to write BluRay BD-R media or a +multi system that contains a BluRay BD-R disk as the current medium. .TP -.BI driver= name -Allows the user to manually select a driver for the device. -The reason for the existence of the -.BI driver= name -option is to allow users to use +.B mmc_bdre +The generic SCSI-3/mmc BluRay driver is auto-selected whenever .B cdrecord -with drives that are similar to supported drives but not known -directly by -.BR cdrecord . -All drives made after 1997 should be MMC standard compliant and -thus supported by one of the MMC drivers. -It is most unlikely that -.B cdrecord -is unable to find the right driver automatically. -Use this option with extreme care. If a wrong driver is used for a -device, the possibility of creating corrupted disks is high. -The minimum problem related to a wrong driver is that the -.B \-speed -or -.B \-dummy -will not work. -.br -.RS -.ne 8 -.PP -The following driver names are supported: -.TP -.B help -To get a list of possible drivers together with a short description. +finds an MMC-compliant drive that does support to write BluRay BD-RE media or a +multi system that contains a BluRay BD-RE disk as the current medium. .TP .B mmc_cd The generic SCSI-3/mmc CD-ROM driver is auto-selected whenever .B cdrecord -finds a MMC compliant drive that does not identify itself to support writing at +finds an MMC-compliant drive that does not identify itself to support writing at all, or that only identifies to support media or write modes not implemented in .BR cdrecord . .TP .B mmc_cd_dvd -The generic SCSI-3/mmc CD/DVD driver is auto-selected whenever +The generic SCSI-3/mmc CD/DVD/BluRay driver is auto-selected whenever .B cdrecord -finds a MMC-2 or MMC-3 compliant drive that seems to support more than +finds an MMC-2 or MMC-3-compliant drive that seems to support more than one medium type and the tray is open or no medium could be found to select the right driver. This driver tries to close the tray, checks the medium found in the tray and then @@ -866,7 +539,7 @@ .B mmc_cdr The generic SCSI-3/mmc CD-R/CD-RW driver is auto-selected whenever .B cdrecord -find a MMC compliant drive that only supports to write CDs or a multi system +finds an MMC-compliant drive that only supports to write CDs or a multi system drive that contains a CD as the current medium. .TP .B mmc_cdr_sony @@ -887,7 +560,7 @@ .B mmc_dvd The generic SCSI-3/mmc-2 DVD-R/DVD-RW driver is auto-selected whenever .B cdrecord -finds a MMC-2 or MMC-3 compliant drive that supports to write DVDs and +finds an MMC-2 or MMC-3-compliant drive that supports to write DVDs and an appropriate medium is loaded. There is no Track At Once mode for DVD writers. .TP @@ -900,7 +573,7 @@ .B mmc_dvdplusr The generic SCSI-3/mmc-3 DVD+R driver is auto-selected whenever a DVD+R medium is found in an appropriate writer. -Note that for unknown reason, the DVD-Plus alliance does not +Note that for unknown reason, the DVD+RW Alliance does not like that there is a simulation mode for DVD+R media. The author of .B cdrecord @@ -909,44 +582,44 @@ DVD+R only supports one write mode that is somewhere between Track At Once and Packet writing; this mode is selected in .B cdrecord -via a the +via the .BR \-dao / \-sao option. .TP .B mmc_dvdplusrw The generic SCSI-3/mmc-3 DVD+RW driver is auto-selected whenever a DVD+RW medium is found in an appropriate writer. -As DVD+RW media needs to be formatted before its first use, cdrecord -auto-detects this media state and performs a format before it starts +As DVD+RW media need to be formatted before their first use, cdrecord +auto-detects this medium state and performs a format before it starts to write. -Note that for unknown reason, the DVD-Plus alliance does not +Note that for unknown reason, the DVD+RW Alliance does not like that there is a simulation mode nor a way to erase DVD+RW media. DVD+RW only supports one write mode that is close to Packet writing; this mode is selected in .B cdrecord -via a the +via the .BR \-dao / \-sao option. .TP .B cw_7501 The driver for Matsushita/Panasonic CW-7501 is auto-selected when .B cdrecord -finds this old pre MMC drive. +finds this old pre-MMC drive. .B Cdrecord supports all write modes for this drive type. .TP .B kodak_pcd_600 The driver for Kodak PCD-600 is auto-selected when .B cdrecord -finds this old pre MMC drive which has been the first high speed (6x) -CD writer for a long time. This drive behaves similar to the +finds this old pre-MMC drive which has been the first high speed (6x) +CD-writer for a long time. This drive behaves similarly to the Philips CDD-521 drive. .TP .B philips_cdd521 The driver for Philips CDD-521 is auto-selected when .B cdrecord -finds a Philips CDD-521 drive (which is the first CD writer ever made) -or one of the other drives that are known to behave similar to this +finds a Philips CDD-521 drive (which is the first CD-writer ever made) +or one of the other drives that are known to behave similarly to this drive. All Philips CDD-521 or similar drives (see other drivers in this list) do not support Session At Once recording. @@ -966,12 +639,12 @@ .TP .B philips_dumb The driver for Philips CDD-521 with pessimistic assumptions is never auto-selected. -It may be used by hand with drives that behave similar to the Philips CDD-521. +It may be used by hand with drives that behave similarly to the Philips CDD-521. .TP .B pioneer_dws114x The driver for Pioneer DW-S114X is auto-selected when .B cdrecord -finds one of the old non MMC CD writers from Pioneer. +finds one of the old non-MMC CD-writers from Pioneer. .TP .B plasmon_rf4100 The driver for Plasmon RF 4100 is auto-selected when @@ -991,19 +664,19 @@ .B scsi2_cd The generic SCSI-2 CD-ROM driver is auto-selected whenever .B cdrecord -finds a pre MMC drive that does not support writing or a pre MMC writer that is +finds a pre-MMC drive that does not support writing or a pre-MMC writer that is not supported by .BR cdrecord . .TP .B sony_cdu924 The driver for Sony CDU-924 / CDU-948 is auto-selected whenever .B cdrecord -finds one of the old pre MMC CD writers from Sony. +finds one of the old pre-MMC CD-writers from Sony. .TP .B teac_cdr50 The driver for Teac CD-R50S, Teac CD-R55S, JVC XR-W2010, Pinnacle RCD-5020 -is auto-selected whenever one of the drives is found that is known to the -non MMC command set used by TEAC and JVC. +is auto-selected whenever one of the drives is found that is known to use the +non-MMC command set used by TEAC and JVC. Note that many drives from JVC will not work because they do not correctly implement the documented command set and JVC has been unwilling to fix or document the bugs. @@ -1017,12 +690,16 @@ .B yamaha_cdr100 The driver for Yamaha CDR-100 / CDR-102 is auto-selected when .B cdrecord -finds one of the old pre MMC CD writers from Yamaha. +finds one of the old pre-MMC CD-writers from Yamaha. There is no support for the Session At Once write mode yet. .TP +.B bd_simul +The simulation BluRay driver allows to run timing and speed tests +with parameters that match the behavior of BluRay writers. +.TP .B cdr_simul The simulation CD-R driver allows to run timing and speed tests -with parameters that match the behavior of CD writers. +with parameters that match the behavior of CD-writers. .TP .B dvd_simul The simulation DVD-R driver allows to run timing and speed tests @@ -1049,7 +726,7 @@ .RE .TP .BI driveropts= "option list" -Set driver specific options. The options are specified a comma separated list. +Set driver specific options. The options are specified as a comma separated list. To get a list of valid options use .BI driveropts= help together with the @@ -1087,7 +764,7 @@ writing mode. The mandatory parameter .I value is the laser power offset and currently may be selected from --2, -1, 0, 1, 2. +\-2, \-1, 0, 1, 2. In addition, you need to set the write speed to 4 in order to allow .B "VariRec" to work. @@ -1117,21 +794,21 @@ feature which usually should result in high quality CDs that have less reading problems in Hi-Fi players. As this is implemented as a variant of the -Session at Once write mode, it will only work if you select +Session At Once write mode, it will only work if you select SAO write mode and there is no need to turn it off. The .B "Audio Master" mode will work with a limited speed but may also be used with data CDs. In .B "Audio Master" -mode, the pits on the CD will be written larger then usual so the capacity +mode, the pits on the CD will be written larger than usual so the capacity of the medium is reduced when turning this feature on. -A 74 minute CD will only have a capacity of 63 minutes if +A 74-minute CD will only have a capacity of 63 minutes if .B "Audio Master" -is active and the capacity of a 80 minute CD will be reduced to 68 minutes, +is active and the capacity of a 80-minute CD will be reduced to 68 minutes, the capacity in will be reduced to 85% of the original capacity. On newer Plextor drives, this feature is also present but the capacity -will be redued to 86.66% of the original capacity. For other factors +will be reduced to 86.66% of the original capacity. For other factors on Plextor drives, see the .B gigarec option above. @@ -1166,13 +843,13 @@ damaged disks and drives. Using this option tells the drive to read any media as fast as possible. Be very careful as this may cause the media to break in the drive -while reading, resulting in a damaged media and drive! +while reading, resulting in damaged media and drive! .TP .B nospeedread Turn off unlimited read speed. .TP .B singlesession -Turn the drive into a single session only drive. +Turn the drive into a single-session only drive. This allows to read defective or non-compliant (illegal) media with extremely non-standard additional (broken/illegal) TOC entries in the TOC from the second or higher session. Some of these disks become @@ -1180,7 +857,7 @@ You need to enable Single Session mode before you insert the defective disk! .TP .B nosinglesession -Turn off single session mode. The drive will again behave as usual. +Turn off single-session mode. The drive will again behave as usual. .TP .B hidecdr Hide the fact that a medium might be a recordable medium. @@ -1195,9 +872,9 @@ .B \-checkdrive to retrieve the image size information for the .B "Yamaha DiskT@2 -feature. The images always have a line length of 3744 pixel. +feature. The images always have a line length of 3744 pixels. Line number 0 (radius 0) is mapped to the center of the disk. -If you know the inner and outer radius you will be able to create a +If you know the inner and outer radii you will be able to create a pre distorted image that later may appear undistorted on the disk. .TP .BI tattoofile= name @@ -1208,10 +885,9 @@ feature to the medium. The file must be a file with raw image B&W data (one byte per pixel) in a size as retrieved by a previous call to -.BI tattoofile= name -\&. +.BR tattooinfo . If the size of the image equals the maximum possible size -(3744 x 320 pixel), +(3744 x 320 pixels), .B cdrecord will use the first part of the file. This first part then will be written to the leftover space on the CD. @@ -1222,19 +898,19 @@ .B layerbreak Switch a drive with DVD-R/DL medium into .B "layer jump recording -recording mode and use automatic layer break position set up. +recording mode and use automatic layer-break position setup. .sp By default, DVD-R/DL media is written in .B "sequential recording mode that completely fills up both layers. .TP .BI layerbreak= value -Set up a manual layer break value for DVD-R/DL and DVD+R/DL. -The specified layer break value must not be set to less than half of the recorded +Set up a manual layer-break value for DVD-R/DL and DVD+R/DL. +The specified layer-break value must not be set to less than half of the recorded data size and must not be set to more than the remaining -.I "Layer 0 size" +.I "Layer 0 size of the medium. -The manual layer break value needs to be a multiple of the ECC sector +The manual layer-break value needs to be a multiple of the ECC sector size which is 16 logical 2048 byte sectors in case of DVD media and 32 logical 2048 byte sectors in case of HD-DVD or BD media. .sp @@ -1242,153 +918,264 @@ does not allow to write DL media in case that the total amount of data is less then the .I "Layer 0 size -of the medium except when a manual layer break has been specified by using the +of the medium except when a manual layer-break has been specified by using the .BI layerbreak= value option. .RE .TP -.B \-setdropts -Set the driveropts specified by -.BI driveropts= "option list" , -the -.B speed -of the drive and the -.B dummy -flag and exit. -This allows cdrecord to set drive specific parameters that are not directly -used by -.B cdrecord -like e.g. -.BR "single session mode" ", " "hide cdr" -and similar. -It is needed in case that -.BI driveropts= "option list" -should be called without planning to run a typical -.B cdrecord -task. -.TP -.B \-checkdrive -Checks if a driver for the current drive is present and exit. -If the drive is a known drive, -.B cdrecord -uses exit code 0. -.TP -.B \-prcap -Print the drive capabilities for SCSI-3/mmc compliant drives -as obtained from mode page 0x2A. Values marked with -.I kB -use 1000 bytes as kilo-byte, values marked with -.I KB -use 1024 bytes as Kilo-byte. -.TP -.B \-inq -Do an inquiry for the drive, print the inquiry info and exit. +.B \-eject +Eject disk after doing the work. +Some devices (e.g. Philips) need to eject the medium before creating a new +disk. Doing a \-dummy test and immediately creating a real disk would not +work on these devices. .TP -.B \-scanbus -Scan all SCSI devices on all SCSI busses and print the inquiry -strings. This option may be used to find SCSI address of the -CD/DVD-Recorder on a system. -The numbers printed out as labels are computed by: -.B "bus * 100 + target +.B \-fix +The disk will only be fixated (i.e. a TOC for a CD-reader will be written). +This may be used, if for some reason the disk has been written but not +fixated. This option currently does not work with old TEAC drives (CD-R50S and +CD-R55S). .TP -.B \-reset -Try to reset the SCSI bus where the CD recorder is located. This works not -on all operating systems. +.B \-force +Force to continue on some errors. Be careful when using this option. +.B Cdrecord +implements several checks that prevent you from doing unwanted things +like damaging CD-RW media by improper drives. Many of the sanity checks are +disabled when the +.B \-force +option is used. +.sp +This option also implements some tricks that will allow +you to blank bad CD-RW disks. .TP -.B \-abort -Try to send an -.B abort -sequence to the drive. -If you use +.B \-format +Format a CD-RW/DVD-RW/DVD+RW/BD-RE disc. +Formatting is currently only implemented for DVD+RW and BD-RE media. +A 'maiden' DVD+RW or BD-RE medium needs to +be formatted before you may write to it. +However, as .B cdrecord -only, this should never be needed; but other software may leave a drive -in an unusable condition. -Calling -.B "cdrecord \-reset -may be needed if a previous write has been interrupted and the software did -not tell the drive that it will not continue to write. +autodetects the need for formatting in this case and auto formats the medium +before it starts writing, the +.B \-format +option is only needed if you like to forcibly reformat a DVD+RW or BD-RE medium. .TP -.B \-overburn -Allow -.B cdrecord -to write more than the official size of a medium. This feature is usually -called -.I overburning -and depends on the fact that most blank media may hold more space than the -official size. As the official size of the lead-out area on the disk is -90 seconds (6750 sectors) and a disk usually works if there are at least -150 sectors of lead out, all media may be overburned by at least 88 seconds -(6600 sectors). -Most CD recorders only do overburning in -.B SAO +.BR fs= # +Set the FIFO (ring buffer) size to #. +You may use the same syntax as in +.BR dd (1), +.BR sdd (1) or -.B RAW -mode. Known exceptions are TEAC CD-R50S, TEAC CD-R55S and the Panasonic -CW-7502. -Some drives do not allow to overburn as much as you might like and limit -the size of a CD to e.g. 76 minutes. This problem may be circumvented by -writing the CD in RAW mode because this way the drive has no chance to find -the size before starting to burn. -There is no guarantee that your drive supports overburning at all. -Make a test to check if your drive implements the feature. -.TP -.B \-ignsize -Ignore the known size of the medium. This option should be used with extreme -care, it exists only for debugging purposes don't use it for other reasons. -It is not needed to write disks with more than the nominal capacity. -This option implies -.BR \-overburn . -.TP -.B \-useinfo -Use -.B "*.inf -files to overwrite audio options. -If this option is used, the pregap size information is read from -the -.B "*.inf -file that is associated with the file that contains the audio -data for a track. +.BR star (1). +The number representing the size is taken in bytes unless otherwise specified. +If a number is followed directly by the letter `b', `k', `m', `s' or `f', +the size is multiplied by 512, 1024, 1024*1024, 2048 or 2352. +If the size consists of numbers separated by `x' or `*', multiplication of the +two numbers is performed. +Thus +.I "fs=10x63k +will specify a FIFO size of 630\ kBytes. .sp -If used together with the -.B \-audio -option, -.B cdrecord -may be used to write audio CDs from a pipe from -.B cdda2wav -if you call +The size specified by the +.I fs= +argument includes the shared memory that is needed for administration. This +is at least one page of memory. +If no +.IR fs = +option is present, .B cdrecord -with the -.B *.inf -files as track parameter list instead of using audio files. -The audio data is read from -.B stdin -in this case. -See -.B EXAMPLES -section below. -.B Cdrecord -first verifies that -.B stdin -is not connected to a terminal and runs some heuristic consistency checks -on the -.B *.inf -files and then sets the track lengths from the information in -the -.B *.inf -files. +will try to get the FIFO size value from the +.B CDR_FIFOSIZE +environment. +The default FIFO size is currently 4 MB. .sp -If you like to write from -.BR stdin , -make sure that cdrecord is called with a large enough FIFO size, reduce the write -speed to a value below the read speed of the source drive and switch the burn-free -option for the recording drive on. +The FIFO is used to increase buffering for the real-time writing process. +It allows to run a pipe from +.B mkisofs +directly into +.BR cdrecord . +If the FIFO is active and a pipe from +.B mkisofs +into +.B cdrecord +is used to create a CD, +.B cdrecord +will abort prior to do any modifications on the disk if +.B mkisofs +dies before writing starts. +The recommended FIFO size is between 4 and 128\ MBytes. +As a rule of thumb, the FIFO size should be at least equal to the size +of the internal buffer of the CD/DVD/BluRay-recorder and no more than half of +the physical amount of RAM available in the machine. +If the FIFO size is big enough, the FIFO statistics will print a FIFO +empty count of zero and a FIFO min fill not below 20%. +It is not wise to use too much space for the FIFO. If you need more +than 8 MB to write a CD at a speed less than 20x from an image on a +local file system on an idle machine, your machine is either underpowered, +has hardware problems or is mis-configured. +If you like to write DVDs or to write CDs at higher speed, it makes sense +to use at least 16\ MB for the FIFO. +.sp +On old and small machines, you need to be more careful with the FIFO size. +If your machine has less than 256\ MB of physical RAM, you should not +set up a FIFO size that is more than 32\ MB. +The sun4c architecture (e.g. a Sparcstation-2) has only MMU page table entries +for 16\ MBytes per process. Using more than 14\ MBytes for the FIFO +may cause the operating system in this case to spend much time to constantly +reload the MMU tables. Newer machines from Sun do not have this MMU +hardware problem. The author has no information on PC hardware reflecting +this problem. +.sp +Old Linux systems for non-x86 platforms have broken definitions for +the shared memory size. You need to fix them and rebuild the kernel +or manually tell +.B cdrecord +to use a smaller FIFO. +.sp +If you have buffer underruns or similar problems (like a constantly empty +drive-buffer) and observe a zero +.IR "fifo empty count" , +you have hardware problems that prevent the data from flowing fast enough +from the kernel memory to the drive. The FIFO size in this case is sufficient, +but you should check for a working DMA setup. .TP -.BR defpregap= # -Set the default pre-gap size for all tracks except track number 1. -This option currently only makes sense with the TEAC drive when -creating track-at-once disks without the 2 second silence before each track. -.br -This option may go away in future. +.BI gracetime= # +Set the grace time before starting to write to +.IR # " seconds. +Values below 3 seconds are not allowed in order to prevent the volume management +from interrupting the write process. +.TP +.B \-ignsize +Ignore the known size of the medium. This option should be used with extreme +care, it exists only for debugging purposes so do not use it for other reasons. +It is not needed to write disks with more than the nominal capacity. +This option implies +.BR \-overburn . +.TP +.B \-immed +Tell cdrecord to set the +.B "SCSI IMMED" +flag in certain commands +(load, eject, blank, close_track, close_session). +This can be useful +on broken systems with ATAPI hard-disk and CD/DVD/BluRay writer on the same bus or +with SCSI systems that do not use disconnect/reconnect. +These systems will freeze while blanking or fixating a CD/DVD/BluRay or while a DVD +writer is filling up a session to the minimum amount (approx. 800 MB). +Setting the +.B \-immed +flag will request the command to return immediately +while the operation proceeds in background, making +the bus usable for the other devices and avoiding the system freeze. +This is an experimental feature which may work or not, depending on the model +of the CD/DVD/BluRay writer. +A correct solution would be to set up a correct cabling but there seem to be +notebooks around that have been set up the wrong way by the manufacturer. +As it is impossible to fix this problem in notebooks, the +.B \-immed +option has been added. +.sp +A second experimental feature of the +.B \-immed +flag is to tell cdrecord to try to wait short times while writing to the +media. This is expected to free the IDE bus if the CD/DVD/BluRay writer and the +data source are connected to the same IDE cable. In this case, the CD/DVD/BluRay +writer would otherwise usually block the IDE bus for nearly all the time +making it impossible to fetch data from the source drive. See also the +.B minbuf= +and +.B \-v +options. +.sp +Use both features at your own risk. +If it turns out that it would make sense to have a separate option +for the wait feature, write to the author and convince him. +.TP +.B \-inq +Do an inquiry for the drive, print the inquiry info for the drive and exit. +.TP +.B \-load +Load the media and exit. This only works with a tray-loading mechanism +but seems to be useful when using the Kodak disk transporter. +.TP +.B \-lock +Load the media, lock the door and exit. This only works with a tray-loading mechanism +but seems to be useful when using the Kodak disk transporter. +.TP +.BI mcn= med_cat_nr +Set the +.B "Media Catalog Number +of the CD to +.IR med_cat_nr . +.TP +.BI minbuf= value +The +.B minbuf= +option allows to define the minimum drive-buffer fill ratio for the +experimental ATAPI wait mode that is intended to free the IDE bus +to allow hard disk and CD/DVD/BluRay writer to be on the same IDE cable. +As the wait mode currently only works when the verbose option +.B \-v +has been specified, +.B cdrecord +implies the verbose option in case the +.B \-immed +or +.B minbuf= +option has been specified. +Valid values for +.B minbuf= +are between 25 and 95 for 25%.\|.\|.95% minimum drive-buffer fill ratio. +.TP +.B \-media\-info +.TP +.B \-minfo +Retrieve and print information about the state of the medium. +This option currently only works for MMC-compliant drives. +.TP +.B \-msinfo +Retrieve multi-session info in a form suitable for +.B "mkisofs-1.10" +or later. +.sp +This option makes only sense with a CD that contains at least +one closed session and is appendable (not finally closed yet). +Some drives create error messages if you try to get the +multi-session info for a disk that is not suitable for this +operation. +.TP +.B \-noclose +Do not close the current track, useful only when in packet writing mode. +This is an experimental interface. +.TP +.B \-nofix +Do not fixate the disk after writing the tracks. This may be used +to create an audio disk in steps. An un-fixated disk can usually not be used +on a non CD-writer type drive but there are audio CD-players that will +be able to play such a disk. +.TP +.B \-overburn +Allow +.B cdrecord +to write more than the official size of a medium. This feature is usually +called +.I overburning +and depends on the fact that most blank media may hold more space than the +official size. As the official size of the lead-out area on the disk is +90 seconds (6750 sectors) and a disk usually works if there are at least +150 sectors of lead out, all media may be overburned by at least 88 seconds +(6600 sectors). +Most CD-recorders only do overburning in +.B SAO +or +.B RAW +mode. Known exceptions are TEAC CD-R50S, TEAC CD-R55S and the Panasonic +CW-7502. +Some drives do not allow to overburn as much as you might like and limit +the size of a CD to e.g. 76 minutes. This problem may be circumvented by +writing the CD in RAW mode because this way the drive has no chance to find +the size before starting to burn. +There is no guarantee that your drive supports overburning at all. +Make a test to check if your drive implements the feature. .TP .B \-packet Set @@ -1399,15 +1186,68 @@ Set the packet size to #, forces fixed packet mode. This is an experimental interface. .TP -.B \-noclose -Do not close the current track, useful only when in packet writing mode. -This is an experimental interface. +.B \-prcap +Print the drive capabilities for SCSI-3/mmc-compliant drives +as obtained from mode page 0x2A. Values marked with +.I kB +use 1000 bytes as kilo-byte, values marked with +.I KB +use 1024 bytes as Kilo-byte. .TP -.BI mcn= med_cat_nr -Set the -.B "Media Catalog Number -of the CD to -.IR med_cat_nr . +.B \-setdropts +Set the driveropts specified by +.BI driveropts= "option list" , +the +.B speed +of the drive and the +.B dummy +flag and exit. +This allows cdrecord to set drive specific parameters that are not directly +used by +.B cdrecord +like e.g. +.BR "single session mode" ", " "hide cdr" +and similar. +It is needed in case that +.BI driveropts= "option list" +should be called without planning to run a typical +.B cdrecord +task. +.TP +.BR speed= # +Set the speed factor of the writing process to #. +# is an integer, representing a multiple of what has been defined as single speed +for the medium. +.sp +For CD-media, single speed is the audio playback speed. +This is about 150\ KB/s for CD-ROM and about 172\ KB/s for CD-Audio. +Single speed is about 1385\ kB/s for DVD media and about 4496\ kB/s for BluRay media. +.sp +If no +.I speed +option is present, +.B cdrecord +will try to get a drive specific speed value from the file +.B /etc/default/cdrecord +and if it cannot find one, it will try to get the speed value from the +.B CDR_SPEED +environment and later from the +.B CDR_SPEED= +entry in +.BR /etc/default/cdrecord . +If no speed value could be found, cdrecord uses a drive specific default speed. +The default for all new (MMC-compliant) drives is to use the maximum supported by the drive. +If you use +.I "speed=0" +with a MMC-compliant drive, +.B cdrecord +will switch to the lowest possible speed for drive and medium. +If you are using an old (non-MMC) drive that has problems with +.I "speed=2" +or +.IR "speed=4" , +you should try +.IR "speed=0" . .TP .B \-text Write CD-Text information @@ -1415,7 +1255,7 @@ for the text strings. .B Cdrecord supports CD-Text information based on the content of the -.B *.inf +.B "*.inf files created by .B cdda2wav and CD-Text information based on the content from a @@ -1437,11 +1277,11 @@ in order to tell .B cdrecord to read a -.B CUE sheet +.B "CUE sheet file in addition. If you like to write your own CD-Text information, edit the -.B *.inf +.B "*.inf files or the .B "CUE sheet file with a text editor and change the fields @@ -1451,7 +1291,7 @@ Write CD-Text based on information found in the binary file .IR filename . This file must contain information in a data format defined in the -SCSI-3 MMC-2 standard and in the Red Book. The four byte size header that is +SCSI-3 MMC-2 standard and in the Red Book. The four-byte-sized header that is defined in the SCSI standard is optional and allows to make the recognition of correct data less ambiguous. This is the best option to be used to copy CD-Text data from existing CDs @@ -1462,43 +1302,351 @@ If both, .BI textfile= filename and CD-Text information from -.B *.inf +.B "*.inf or -.B *.cue +.B "*.cue files are present, .BI textfile= filename will overwrite the other information. .TP -.BI cuefile= filename -Take all recording related information from a CDRWIN compliant -.B "CUE sheet -file. -No track files are allowed when this option is present and one of the options -.BR \-dao , -.BR \-sao , -.BR \-raw , -.BR \-raw16 , -.B \-raw96r -is needed in addition. - -.SH "TRACK OPTIONS -.PP -Track options may be mixed with track file names. +.B \-toc +Retrieve and print out the table of contents or PMA of a CD. +With this option, +.B cdrecord +will work with CD-R drives and with CD-ROM drives. .TP -.BI isrc= ISRC_number -Set the -.B "International Standard Recording Number -for the next track to -.IR ISRC_number . +.B \-waiti +Wait for input to become available on standard input before trying to open +the SCSI driver. This allows +.B cdrecord +to read its input from a pipe even +when writing additional sessions to a multi-session disk. +When writing another session to a multi-session disk, +.B mkisofs +needs to read the old session from the device before writing output. +This cannot be done if +.B cdrecord +opens the SCSI driver at the same time. .TP -.BI index= list -Sets an index list for the next track. -In index list is a comma separated list of numbers that are counting -from index 1. The first entry in this list must contain a 0, the following -numbers must be an ascending list of numbers (counting in 1/75 seconds) that -represent the start of the indices. An index list in the form: -0,7500,15000 sets index 1 to the start of the track, index 2 100 seconds from -the start of the track and index 3 200 seconds from the start of the track. +.B \-useinfo +Use +.B "*.inf +files to overwrite audio options. +If this option is used, the pregap size information, +the index information, +the pre-emphasis information +and the CD-Text information +is read from +the +.B "*.inf +file that is associated with the file that contains the audio +data for a track. +.sp +If used together with the +.B \-audio +option, +.B cdrecord +may be used to write audio CDs from a pipe from +.B cdda2wav +if you call +.B cdrecord +with the +.B "*.inf +files as track parameter list instead of using audio files. +The audio data is read from +.B stdin +in this case. +See +.I EXAMPLES +section below. +.B Cdrecord +first verifies that +.B stdin +is not connected to a terminal and runs some heuristic consistency checks +on the +.B "*.inf +files and then sets the track lengths from the information in +the +.B "*.inf +files. +.sp +If you like to write from +.BR stdin , +make sure that cdrecord is called with a large enough FIFO size, reduce the write +speed to a value below the read speed of the source drive and switch the burn-free +option for the recording drive on. + +.SS "SCSI options" +.TP +.BI dev= target +Set the SCSI target for the CD/DVD/BluRay-recorder, see notes above. +A typical target device specification is +.BI dev= 1,6,0 +\&. +If a filename must be provided together with the numerical target +specification, the filename is implementation specific. +The correct filename in this case can be found in the system specific +manuals of the target operating system. +On a +.I FreeBSD +system without +.I CAM +support, you need to use the control device (e.g. +.IR /dev/rcd0.ctl ). +A correct device specification in this case may be +.BI dev= /dev/rcd0.ctl:@ +\&. +.sp +.B \h'-2m'General SCSI addressing +.br +The +.I target device +to the +.B dev= +option +refers to the +.B SCSI\ CAM +standard notation for +.IR scsibus / target / lun +of the CD/DVD/BluRay-recorder. Communication on +.I SunOS +is done with the SCSI general driver +.B scg. +Other operating systems are using a library simulation of this driver. +Possible syntax is: +.B dev= +.IR scsibus , target , lun +or +.B dev= +.IR target , lun . +In the latter case, the CD/DVD/BluRay-recorder has to be connected to the default +SCSI bus of the machine. +.IR Scsibus , +.I target +and +.I lun +are integer numbers. +Some operating systems or SCSI transport implementations may require to +specify a filename in addition. +In this case the correct syntax for the device is: +.B dev= +.IR devicename : scsibus , target , lun +or +.B dev= +.IR devicename : target , lun . +If the name of the device node that has been specified on such a system +refers to exactly one SCSI device, a shorthand in the form +.B dev= +.IR devicename : @ +or +.B dev= +.IR devicename : @ , lun +may be used instead of +.B dev= +.IR devicename : scsibus , target , lun . +.sp +.B \h'-2m'Remote SCSI addressing +.br +To access remote SCSI devices, you need to prepend the SCSI device name by +a remote device indicator. The remote device indicator is either +.BI REMOTE: user@host: +or +.BI REMOTE: host: +A valid remote SCSI device name may be: +.BI REMOTE: user@host: +to allow remote SCSI bus scanning or +.BI REMOTE: user@host:1,0,0 +to access the SCSI device at +.I host +connected to SCSI bus # 1,target 0, lun 0. +In order to allow remote access to a specific +.IR host , +the +.BR rscsi (1) +program needs to be present and configured on the +.IR host . +.sp +.B \h'-2m'Alternate SCSI transports +.br +.B Cdrecord +is completely based on +.B SCSI +commands but this is no problem as all CD/DVD/BluRay writers +ever made use +.B SCSI +commands for the communication. Even +.B ATAPI +drives are just +.B SCSI +drives that inherently use the +.I "ATA packet interface +as +.B SCSI +command transport layer build into the IDE (ATA) transport. +You may need to specify an alternate transport layer on the command line +if your OS does not implement a fully integrated kernel driver subsystem that +allows to access any drive using +.B SCSI +commands via a single unique user interface. +.sp +To access SCSI devices via alternate transport layers, +you need to prepend the SCSI device name by a transport layer indicator. +The transport layer indicator may be something like +.B USCSI: +or +.BR ATAPI: . +To get a list of supported transport layers for your platform, use +.B dev= +.IR HELP : +.sp +.B \h'-2m'Portability Background +.br +To make +.B cdrecord +portable to all \s-2UNIX\s0 platforms, the syntax +.B dev= +.IR devicename : scsibus , target , lun +is preferred as it hides OS specific knowledge about device names from the user. +A specific OS may not necessarily support a way to specify a real device file name nor a +way to specify +.IR scsibus , target , lun . +.sp +.I Scsibus +0 is the default SCSI bus on the machine. Watch the boot messages for more +information or look into +.B /var/adm/messages +for more information about the SCSI configuration of your machine. +If you have problems to figure out what values for +.IR scsibus , target , lun +should be used, try the +.B \-scanbus +option of +.B cdrecord +described below. +.sp +.B \h'-2m'Using logical names for devices +.br +If no +.I dev +option is present, +.B cdrecord +will try to get the device from the +.B CDR_DEVICE +environment. +.sp +If a file /etc/default/cdrecord exists, and +if the argument to the +.B dev= +option +or the +.B CDR_DEVICE +environment +does not contain the characters ',', '/', '@' or ':', +it is interpreted as a device label name that was defined in the file +/etc/default/cdrecord (see FILES section). +.sp +.B \h'-2m'Autotarget Mode +.br +If no +.B dev= +option +and no +.B CDR_DEVICE +environment +is present, or if it +only contains a transport specifier but no address notation, +.B cdrecord +tries to scan the SCSI address space for CD-ROM drives. +If exactly one is found, this is used by default. +.TP +.BI debug= "#, " \-d +Set the misc debug value to # (with debug=#) or increment +the misc debug level by one (with \-d). If you specify +.I \-dd, +this equals to +.BI debug= 2. +This may help to find problems while opening a driver for libscg +as well as with sector sizes and sector types. +Using +.B \-debug +slows down the process and may be the reason for a buffer underrun. +.TP +.BR kdebug= "#, " kd= # +Tell the +.BR scg -driver +to modify the kernel debug value while SCSI commands are running. +.TP +.B \-reset +Try to reset the SCSI bus where the CD-recorder is located. This does not work +on all operating systems. +.TP +.B \-scanbus +Scan all SCSI devices on all SCSI busses and print the inquiry +strings. This option may be used to find SCSI address of the +CD/DVD/BluRay-recorder on a system. +The numbers printed out as labels are computed by: +.B "bus * 100 + target +.TP +.BI scgopts= list +A comma separated list of SCSI options that are handled by libscg. +The implemented options may be uptated indepentendly from applications. +Currently, one option: +.B ignore\-resid +is supported to work around a Linux kernel bug. +.TP +.BR \-silent ", " \-s +Do not print out a status report for failed SCSI commands. +.TP +.BI timeout= # +Set the default SCSI command timeout value to +.IR # " seconds. +The default SCSI command timeout is the minimum timeout used for sending +SCSI commands. +If a SCSI command fails due to a timeout, you may try to raise the +default SCSI command timeout above the timeout value of the failed command. +If the command runs correctly with a raised command timeout, +please report the better timeout value and the corresponding command to +the author of the program. +If no +.B timeout= +option is present, a default timeout of 40 seconds is used. +.TP +.BR ts= # +Set the maximum transfer size for a single SCSI command to #. +The syntax for the +.B ts= +option is the same as for cdrecord fs=# or sdd bs=#. +.sp +If no +.B ts= +option has been specified, +.B cdrecord +defaults to a transfer size of 63\ kB. If libscg gets lower values from the +operating system, the value is reduced to the maximum value that is possible +with the current operating system. +Sometimes, it may help to further reduce the transfer size or to enhance it, +but note that it may take a long time to find a better value by experimenting +with the +.B ts= +option. +.TP +.B \-V +Increment the verbose level in respect of SCSI command transport by one. +This helps to debug problems +during the writing process, that occur in the CD/DVD/BluRay-recorder. +If you get incomprehensible error messages you should use this flag +to get more detailed output. +.B \-VV +will show data buffer content in addition. +Using +.B \-V +or +.B \-VV +slows down the process and may be the reason for a buffer underrun. + +.SH "TRACK OPTIONS +.PP +Track options may be mixed with track file names. .TP .B \-audio If this flag is present, all subsequent tracks are written in @@ -1525,14 +1673,14 @@ In all other cases, cdrecord will only work correctly if the audio data stream does not have any header. Because many structured audio files do not have an integral -number of blocks (1/75th second) in length, +number of blocks (1/75th second each) in length, it is often necessary to specify the .B \-pad option as well. .B cdrecord recognizes that audio data in a .WAV file is stored in Intel (little-endian) byte order, and will automatically byte-swap the data -if the CD recorder requires big-endian data. +if the CD-recorder requires big-endian data. .B Cdrecord will reject any audio file that does not match the Red Book requirements of 16-bit stereo samples in PCM coding at 44100 samples/second. @@ -1542,7 +1690,7 @@ will usually work if the structure of the data is the structure described above (raw pcm data in big-endian byte order). However, if the data format includes a header, -you will hear a click at the start of a track. +you will hear a click at the start of the track. .TP .I " " If neither @@ -1561,32 +1709,17 @@ .I \-data for all other files. .TP -.B \-swab -If this flag is present, audio data is assumed to be in byte-swapped -(little-endian) order. Some types of CD-Writers e.g. Yamaha, Sony and the -new SCSI-3/mmc drives require audio data to be presented in -little-endian order, -.\" (which is the order in which it's actually recorded on the CD) ???? -while other writers require audio data to be -presented in the big-endian (network) byte order normally used by the -SCSI protocol. -.B Cdrecord -knows if a CD-Recorder needs audio data in big- or little-endian order, -and corrects the byte order of the data stream to match the needs -of the recorder. -You only need the -.I \-swab -flag if your data stream is in Intel (little-endian) byte order. -.sp -Note that the verbose output of -.B cdrecord -will show you if swapping is necessary to make the byte order of -the input data fit the required byte order of the recorder. -.B Cdrecord -will not show you if the -.I \-swab -flag was actually present for a track. -.TP +.B \-cdi +If this flag is present, the TOC type for the disk is set to +.BR CDI . +This only makes sense with XA disks. +.TP +.B \-copy +If this flag is present, all TOC entries for subsequent audio tracks +of the resulting CD +will indicate that the audio data has permission to be copied without limit. +This option has no effect on data tracks. +.TP .B \-data If this flag is present, all subsequent tracks are written in .B "CD-ROM mode 1 @@ -1622,47 +1755,14 @@ .I \-data for all other files. .TP -.B \-mode2 -If this flag is present, all subsequent tracks are written in -.B "CD-ROM mode 2 -format. The data size is a multiple of 2336 bytes. -.TP -.B \-xa -If this flag is present, all subsequent tracks are written in -.B "CD-ROM XA mode 2 form 1 -format. The data size is a multiple of 2048 bytes. -The XA sector sub headers will be created by the drive. -With this option, the write mode is the same as with the -.B \-multi -option. -.TP -.B \-xa1 -If this flag is present, all subsequent tracks are written in -.B "CD-ROM XA mode 2 form 1 -format. The data size is a multiple of 2056 bytes. -The XA sector sub headers are part of the user data and have to be -supplied by the application that prepares the data to be written. -.TP -.B \-xa2 -If this flag is present, all subsequent tracks are written in -.B "CD-ROM XA mode 2 form 2 -format. The data is a multiple of 2324 bytes. -The XA sector sub headers will be created by the drive. -.TP -.B \-xamix -If this flag is present, all subsequent tracks are written in a way -that allows a mix of -.B "CD-ROM XA mode 2 form 1/2 -format. The data size is a multiple of 2332 bytes. -The XA sector sub headers are part of the user data and have to be -supplied by the application that prepares the data to be written. -The CRC and the P/Q parity ECC/EDC information (depending on the sector -type) have to be supplied by the application that prepares the data to be written. -.TP -.B \-cdi -If this flag is present, the TOC type for the disk is set to -.BR CDI . -This only makes sense with XA disks. +.BI index= list +Sets an index list for the next track. +In index list is a comma separated list of numbers that are counting +from index 1. The first entry in this list must contain a 0, the following +numbers must be an ascending list of numbers (counting in 1/75 seconds) that +represent the start of the indices. An index list in the form: +0,7500,15000 sets index 1 to the start of the track, index 2 100 seconds from +the start of the track and index 3 200 seconds from the start of the track. .TP .B \-isosize Use the @@ -1680,22 +1780,24 @@ .B \-isosize is needed to prevent .B cdrecord -from reading the two run out blocks that are appended by each CD-recorder -in track at once mode. These two run out blocks cannot be read and would +from reading the two run-out blocks that are appended by each CD-recorder +in track-at-once mode. These two run-out blocks cannot be read and would cause a buffer underrun that would cause a defective copy. -Do not use this option on files created by +.sp +Note that if this option is used on files created by +.BR mkisofs , +the padding data that was added by .B mkisofs -and in case +is lost and replaced by padding added by cdrecord. +This may also change the amount of padding. +.sp +In case .B cdrecord reads the track data from -.IR stdin . -In the first case, you would prevent -.B cdrecord -from writing the amount of padding that has been appended by -.B mkisofs -and in the latter case, it will not work because -.I stdin -is not seekable. +.IR stdin , +only the first track may be used with the +.B \-isosize +option. .sp If .B \-isosize @@ -1703,7 +1805,7 @@ .B cdrecord will automatically add padding for this track as if the .B \-pad -option has been used but the amount of padding may be less than the padding +option had been used but the amount of padding may be less than the padding written by .BR mkisofs . Note that if you use @@ -1713,7 +1815,39 @@ .sp Note also that this option cannot be used to determine the size of a file system -if the multi session option is present. +if the +.B \-multi +option is present. +.TP +.BI isrc= ISRC_number +Set the +.B "International Standard Recording Number +for the next track to +.IR ISRC_number . +.TP +.B \-mode2 +If this flag is present, all subsequent tracks are written in +.B "CD-ROM mode 2 +format. The data size is a multiple of 2336 bytes. +.TP +.B \-nocopy +If this flag is present, all TOC entries for subsequent audio tracks +of the resulting CD +will indicate that the audio data has permission to be copied only once for +personal use \- +this is the default. +.TP +.B \-nopad +Do not pad the following tracks \- the default. +.TP +.B \-nopreemp +If this flag is present, all TOC entries for subsequent audio tracks +will indicate that the audio data has been mastered with linear data \- +this is the default. +.TP +.B \-noshorttrack +Re-enforce the Red Book track length standard. Tracks must be +at least 4 seconds. .TP .B \-pad If the track is a data track, 15 sectors of zeroed data @@ -1750,7 +1884,7 @@ The megabytes mentioned in the verbose mode output however are counting the output sector size which is e.g. 2448 bytes when writing in RAW/RAW96 mode. -See +See the .BR fs = option for possible arguments. To pad the equivalent of 20 minutes on a CD, you may write @@ -1759,81 +1893,82 @@ a track or if you want to be able to read the CD on a .B Linux -system with the ISO-9660 filesystem read ahead bug. +system with the ISO-9660 filesystem read-ahead bug. If an empty file is used for track data, this option may be used to create a disk that is entirely made of padding. This may e.g. be used to find out how much overburning is possible with a -specific media. -.TP -.B \-nopad -Do not pad the following tracks \- the default. -.TP -.B \-shorttrack -Allow all subsequent tracks to violate the Red Book track length standard -which requires a minimum track length of 4 seconds. -This option is only useful when used in SAO or RAW mode. -Not all drives support this feature. The drive must accept the -resulting CUE sheet or support RAW writing. -.TP -.B \-noshorttrack -Re-enforce the Red Book track length standard. Tracks must be -at least 4 seconds. -.TP -.BR pregap= # -Set the pre-gap size for the next track. -This option currently only makes sense with the TEAC drive when -creating track-at-once disks without the 2 second silence before each track. -.br -This option may go away in future. +specific medium. .TP .B \-preemp If this flag is present, all TOC entries for subsequent audio tracks will indicate that the audio data has been sampled with 50/15 \*msec pre-emphasis. -The data, however is not modified during the process of transferring from file +The data however is not modified during the process of transferring from file to disk. This option has no effect on data tracks. .TP -.B \-nopreemp -If this flag is present, all TOC entries for subsequent audio tracks -will indicate that the audio data has been mastered with linear data \- -this is the default. -.TP -.B \-copy -If this flag is present, all TOC entries for subsequent audio tracks -of the resulting CD -will indicate that the audio data has permission to be copied without limit. -This option has no effect on data tracks. -.TP -.B \-nocopy -If this flag is present, all TOC entries for subsequent audio tracks -of the resulting CD -will indicate that the audio data has permission to be copied only once for -personal use \- -this is the default. +.BR pregap= # +Set the pre-gap size for the next track. +This option currently only makes sense with the TEAC drive when +creating track-at-once disks without the 2-second silence before each track. +.br +This option may go away in the future. .TP .B \-scms If this flag is present, all TOC entries for subsequent audio tracks of the resulting CD will indicate that the audio data has no permission to be copied anymore. .TP +.B \-shorttrack +Allow all subsequent tracks to violate the Red Book track length standard +which requires a minimum track length of 4 seconds. +This option is only useful when used in SAO or RAW mode. +Not all drives support this feature. The drive must accept the +resulting CUE sheet or support RAW writing. +.TP +.B \-swab +If this flag is present, audio data is assumed to be in byte-swapped +(little-endian) order. Some types of CD-writers e.g. Yamaha, Sony and the +new SCSI-3/mmc drives require audio data to be presented in +little-endian order, +.\" (which is the order in which it's actually recorded on the CD) ???? +while other writers require audio data to be +presented in the big-endian (network) byte order normally used by the +SCSI protocol. +.B Cdrecord +knows if a CD-recorder needs audio data in big- or little-endian order, +and corrects the byte order of the data stream to match the needs +of the recorder. +You only need the +.I \-swab +flag if your data stream is in Intel (little-endian) byte order. +.sp +Note that the verbose output of +.B cdrecord +will show you if swapping is necessary to make the byte order of +the input data fit the required byte order of the recorder. +.B Cdrecord +will not show you if the +.I \-swab +flag was actually present for a track. +.TP .BR tsize= # If the master image for the next track has been stored on a raw disk, use this option to specify the valid amount of data on this disk. If the image of the next track is stored in a regular file, the size of that file is taken to determine the length of this track. -If the track contains an ISO 9660 filesystem image use the +If the track contains an ISO-9660 filesystem image use the .I \-isosize option to determine the length of that filesystem image. .br -In Disk at Once mode and with some drives that use -the TEAC programming interface, even in Track at Once mode, +In Disk At Once mode and with some drives that use +the TEAC programming interface, even in Track At Once mode, .B cdrecord needs to know the size of each track before starting to write the disk. Cdrecord now checks this and aborts before starting to write. If this happens you will need to run -.B "mkisofs -print-size +.B "mkisofs \-print\-size before and use the output (with `s' appended) as an argument to the .BR tsize = option of @@ -1843,26 +1978,174 @@ See .BR fs = option for possible arguments. +.TP +.B \-xa +If this flag is present, all subsequent tracks are written in +.B "CD-ROM XA mode 2 form 1 +format. The data size is a multiple of 2048 bytes. +The XA sector sub-headers will be created by the drive. +With this option, the write mode is the same as with the +.B \-multi +option. +.TP +.B \-xa1 +If this flag is present, all subsequent tracks are written in +.B "CD-ROM XA mode 2 form 1 +format. The data size is a multiple of 2056 bytes. +The XA sector sub-headers are part of the user data and have to be +supplied by the application that prepares the data to be written. +.TP +.B \-xa2 +If this flag is present, all subsequent tracks are written in +.B "CD-ROM XA mode 2 form 2 +format. The data is a multiple of 2324 bytes. +The XA sector sub-headers will be created by the drive. +.TP +.B \-xamix +If this flag is present, all subsequent tracks are written in a way +that allows a mix of +.B "CD-ROM XA mode 2 form 1/2 +format. The data size is a multiple of 2332 bytes. +The XA sector sub-headers are part of the user data and have to be +supplied by the application that prepares the data to be written. +The CRC and the P/Q parity ECC/EDC information (depending on the sector +type) have to be supplied by the application that prepares the data to be written. .SH EXAMPLES .PP -For all examples below, it will be assumed that the CD/DVD-Recorder is -connected to the primary SCSI bus of the machine. The SCSI target id is -set to 2. +For all examples below, it will be assumed that the machine includes two drives. +The reader is assumed to be target 1 on the primary SCSI bus. +The CD/DVD/BluRay-recorder is assumed to be target 2 on the primary SCSI bus +of the machine. +.PP +If there is only one drive in the machine, the +.B dev= +option may be omitted in the examples below, but in this case the examples for +replication without intermediate files do not apply. + +.PP +.SS "Replicating an Audio CD" +To copy an audio CD in the most accurate way, first run +.PP + cdda2wav dev=1,0 paraopts=proof \-vall cddb=0 \-B \-Owav +.PP +and then run +.PP + cdrecord dev=2,0 \-v \-dao \-useinfo \-text *.wav +.PP +This will try to copy track indices and to read CD-Text information from disk. +If there is no CD-Text information, +.B cdda2wav +will try to get the information from freedb.org instead. +.PP +To copy an audio CD from a pipe (without intermediate files), first run +.PP + cdda2wav dev=1,0 \-vall cddb=0 \-info\-only +.PP +and then run +.PP + cdda2wav dev=1,0 \-no\-infofile \-B \-Oraw \- | \\ +.br + cdrecord dev=2,0 \-v \-dao \-audio \-useinfo \-text *.inf +.PP +This will get all information (including track size info) from the +.B "*.inf +files and then read the audio data from stdin. +.sp +If you like to write from +.BR stdin , +make sure that cdrecord is called with a large enough FIFO size (e.g. +.BR fs=128m ), +reduce the write speed to a value below the read speed of the source drive +(e.g. +.BR speed=12 ), +and switch the burn-free +option for the recording drive on by adding +.BR driveropts=burnfree . +For the same reason, it is not recommended to extract the audio data in +paranoia mode in this case. + +.PP +.SS "Replicating a simple CD-ROM/DVD-ROM/BD-ROM +To copy a simple disk, first read the master using: +.PP + readcd dev=1,0 f=somefile +.PP +Then write the disk using: +.PP + cdrecord dev=2,0 \-v somefile + +.PP +.SS "Replicating a CD-ROM in clone mode +To copy a CD in clone mode, first read the master CD using: +.PP + readcd dev=1,0 \-clone f=somefile +.PP +or (in case the CD contains many sectors that are unreadable by intention) +by calling: +.PP + readcd dev=1,0 \-clone \-nocorr f=somefile +.PP +This will create the files +.I somefile +and +.IR somefile.toc . +Then write the CD using: +.PP + cdrecord dev=2,0 \-raw96r \-clone \-v somefile + +.SS "Creating an Audio CD +To record a pure CD-DA (audio) at single speed, with each track contained +in files named +.IR track01.cdaudio , +.IR track02.cdaudio , +etc.: +.PP + cdrecord \-v speed=1 dev=2,0 \-dao \-audio track*.cdaudio .PP -To record a pure CD-ROM at double speed, using data from the file +To check if it will be OK to use double speed for the example above, +use the dummy write option: +.PP + cdrecord \-v \-dummy speed=2 dev=2,0 \-dao \-audio track*.cdaudio +.PP +.SS "Creating a mixed Audio-Data CD +To record a mixed-mode CD with an ISO-9660 filesystem from +.I cdimage.raw +on the first track, the other tracks being audio tracks from the files +.IR track01.cdaudio , +.IR track02.cdaudio , +etc.: +.PP + cdrecord \-v dev=2,0 \-dao cdimage.raw \-audio track*.cdaudio +.PP +.SS "Creating a CD-ROM/DVD-ROM/BD-ROM +To record a pure disk at double speed, using data from the file .IR cdimage.raw : .PP - cdrecord \-v speed=2 dev=2,0 cdimage.raw + cdrecord \-v speed=2 dev=2,0 \-dao cdimage.raw .PP -To create an image for a ISO 9660 filesystem with Rock Ridge extensions: +To create an image for an ISO-9660 filesystem with Rock Ridge extensions: .PP mkisofs \-R \-o cdimage.raw /home/joerg/master/tree .PP -To check the resulting file before writing to CD on Solaris: +To check the resulting file before writing to disk on Solaris: .PP mount \-r \-F fbk \-o type=hsfs /dev/fbk0:cdimage.raw /mnt .PP +The +.B fbk +driver first appeared in 1988. +.PP +Solaris 9 or newer comes with a variant of the original +.B fbk +idea called +.BR lofi . +The command for the lofi variant is: +.PP + mount \-r \-F hsfs ` lofiadm \-a /tmp/cdimage.raw ` /mnt +.PP +Note that lofiadm needs absolute path names. +.PP On Linux: .PP mount cdimage.raw \-r \-t iso9660 \-o loop /mnt @@ -1875,15 +2158,15 @@ .PP If the overall speed of the system is sufficient and the structure of the filesystem is not too complex, cdrecord will run without creating an -image of the ISO 9660 filesystem. Simply run the pipeline: +image of the ISO-9660 filesystem. Simply run the pipeline: .PP - mkisofs \-R /master/tree | cdrecord \-v fs=6m speed=2 dev=2,0 - + mkisofs \-R /master/tree | cdrecord \-v \-dao fs=6m speed=2 dev=2,0 \- .PP The recommended minimum FIFO size for running this pipeline is 4 MBytes. As the default FIFO size is 4 MB, the .B fs= -option needs only be present if you want to use a different FIFO size. -If your system is loaded, you should run mkisofs in the real time class too. +option needs to be present only if you want to use a different FIFO size. +If your system is loaded, you should run mkisofs in the real-time class too. To raise the priority of .B mkisofs replace the command @@ -1896,42 +2179,21 @@ .sp on Solaris and by .sp - nice --18 mkisofs \-R /master/tree + nice \-\-18 mkisofs \-R /master/tree .sp -on systems that don't have -.B "UNIX International -compliant real-time scheduling. +on systems that do not have +.BR "UNIX International" -compliant +real-time scheduling. .PP Cdrecord runs at priority 59 on Solaris, you should run mkisofs at no more than priority 58. On other systems, you should run mkisofs -at no less than nice --18. +at no less than nice \-\-18. .PP Creating a CD-ROM without file system image on disk has been tested on a Sparcstation-2 with a Yamaha CDR-400. It did work up to quad speed when the machine was not loaded. A faster machine may be able to handle quad speed also in the loaded case. -.PP -To record a pure CD-DA (audio) at single speed, with each track contained -in a file named -.IR track01.cdaudio , -.IR track02.cdaudio , -etc: -.PP - cdrecord \-v speed=1 dev=2,0 -audio track*.cdaudio -.PP -To check if it will be ok to use double speed for the example above. -Use the dummy write option: -.PP - cdrecord \-v \-dummy speed=2 dev=2,0 \-audio track*.cdaudio -.PP -To record a mixed-mode CD with an ISO 9660 filesystem from -.I cdimage.raw -on the first track, the other tracks being audio tracks from the files -.IR track01.cdaudio , -.IR track02.cdaudio , -etc: -.PP - cdrecord \-v dev=2,0 cdimage.raw \-audio track*.cdaudio + .PP To handle drives that need to know the size of a track before starting to write, first run @@ -1940,199 +2202,968 @@ .PP and then run .PP - mkisofs \-R /master/tree | cdrecord speed=2 dev=2,0 tsize=XXXs - + mkisofs \-R /master/tree | cdrecord \-v \-dao speed=2 dev=2,0 tsize=XXXs \- .PP where .I XXX is replaced by the output of the previous run of mkisofs. + .PP -To copy an audio CD in the most accurate way, first run -.PP - cdda2wav dev=2,0 \-vall cddb=0 -B \-Owav +.SS "Setting drive options +To set drive options without writing a disk (e.g. to switch a drive +to single-session mode), run .PP -and then run + cdrecord dev=2,0 \-setdropts driveropts=singlesession .PP - cdrecord dev=2,0 \-v \-dao \-useinfo \-text *.wav +If you like to do this when no disk is in the drive, call .PP -This will try to copy track indices and to read CD-Text information from disk. -If there is no CD-Text information, + cdrecord dev=2,0 \-force \-setdropts driveropts=singlesession + +.SH ENVIRONMENT +.TP +.B CDR_DEVICE +This may either hold a device identifier that is suitable to the open +call of the SCSI transport library or a label in the file /etc/default/cdrecord. +.TP +.B CDR_SPEED +Sets the default speed value for writing (see also +.B \-speed +option). +.TP +.B CDR_FIFOSIZE +Sets the default size of the FIFO (see also +.BR fs= # +option). +.TP +.B CDR_FORCERAWSPEED +If this environment variable is set, +.B cdrecord +will allow you to write at the full RAW encoding speed a single CPU supports. +This will create high potential of buffer underruns. Use with care. +.TP +.B CDR_FORCESPEED +If this environment variable is set, +.B cdrecord +will allow you to write at the full DMA speed the system supports. +There is no DMA reserve for reading the data that is to be written from disk. +This will create high potential of buffer underruns. Use with care. +.sp +If this environment variable is set to the value +.BR any , +.B cdrecord +allows to write at any speed even though it may fail later with a buffer underrun. +.TP +.B RSH +If the +.B RSH +environment is present, the remote connection will not be created via +.BR rcmd (3) +but by calling the program pointed to by +.BR RSH . +Use e.g. +.BR RSH= /usr/bin/ssh +to create a secure shell connection. +.sp +Note that this forces +.B cdrecord +to create a pipe to the +.B rsh(1) +program and disallows +.B cdrecord +to directly access the network socket to the remote server. +This makes it impossible to set up performance parameters and slows down +the connection compared to a +.BR root -initiated +.B rcmd(3) +connection. +.TP +.B RSCSI +If the +.B RSCSI +environment is present, the remote SCSI server will not be the program +.B /opt/schily/sbin/rscsi +but the program pointed to by +.BR RSCSI . +Note that the remote SCSI server program name will be ignored if you log in +using an account that has been created with a remote SCSI server program as +login shell. + +.SH EXIT STATUS +The following exit codes are used: +.TP +.B 0 +No error appeared. +.TP +.B \-1 +A specific error appeared. This may be a usage error caused by an illegal command line +or another error with a problem specific error message from +.BR cdrecord . +.TP +.B \-2 +An unspecified error appeared during the process of talking to the drive. +See SCSI error message for more informations. The section +.B DIAGNOSTICS +below contains an explanation on how to read SCSI error messages. +.TP +other +The +.B errno +value from a failed system call. +.LP +Note that older operating systems and older shells may not support the full 32 bit +range of the exit code +and mask the value with 0xFF. This results in shortened exit codes in the range +.BR 0 .. 255 +where +.B \-1 +is mapped to +.BR 255 . + +.SH FILES +.TP +.B /etc/default/cdrecord +Default values can be set for the following options in /etc/default/cdrecord. +For example: +.SM CDR_FIFOSIZE=8m +or +.SM CDR_SPEED=2 +.RS +.TP +.B CDR_DEVICE +This may either hold a device identifier that is suitable to the open +call of the SCSI transport library or a label in the file /etc/default/cdrecord +that allows to identify a specific drive on the system. +.TP +.B CDR_SPEED +Sets the default speed value for writing (see also +.B \-speed +option). +.TP +.B CDR_FIFOSIZE +Sets the default size of the FIFO (see also +.BR fs= # +option). +.TP +.B CDR_MAXFIFOSIZE +Sets the maximum size of the FIFO (see also +.BR fs= # +option). +.TP +.B Any other label +is an identifier for a specific drive on the system. +Such an identifier may not contain the characters ',', '/', '@' or ':'. +.sp +Each line that follows a label contains a TAB separated list of items. +Currently, four items are recognized: the SCSI ID of the drive, the +default speed that should be used for this drive, the default FIFO size +that should be used for this drive and drive specific options. The values for +.I speed +and +.I fifosize +may be set to \-1 to tell cdrecord to use the global defaults. +The value for driveropts may be set to "" if no driveropts are used. +A typical line may look this way: +.sp +teac1= 0,5,0 4 8m "" +.sp +yamaha= 1,6,0 \-1 \-1 burnfree +.sp +This tells +.B cdrecord +that a drive named +.I teac1 +is at scsibus 0, target 5, lun 0 and should be used with speed 4 and +a FIFO size of 8 MB. +A second drive may be found at scsibus 1, target 6, lun 0 and uses the +default speed and the default FIFO size. +.RE + +.TP +.B "*.inf +The +.B "*.inf +files are created by .B cdda2wav -will try to get the information from freedb.org instead. -.PP -To copy an audio CD from a pipe (without intermediate files), first run -.PP - cdda2wav dev=1,0 \-vall cddb=0 \-info-only -.PP -and then run +where +.B "* +is replaced by the actual audio file prefix. +They are read and used by +.B cdrecord +in case cdrecord was called with the +.B \-useinfo +option. +.sp +There are three general types of parameters: +.RS +.TP +.B numerical parameters +A numerical parameter is a number and directly follows the tag label +without any quoting. +.TP +.B unquoted string type parameters +An unquoted parameter is make from one or more words that directly follow the tag label. +How many words from the parameter list are used by cdrecord depends on the tag label. +.TP +.B quoted string type parameters +A string type parameter is enclosed in single quotes. The string starts +after the first single quote character that follows the tag label and +ends before the last single quote on the same line. +It needs no escape sequences in case that a single quote appears inside the string. +Any text to the right of the rightmost single quote character is ignored. .PP - cdda2wav dev=1,0 \-no-infofile \-B \-Oraw \- | \\ -.br - cdrecord dev=2,0 \-v \-dao \-audio \-useinfo \-text *.inf +The order of the tag labels in the file is not important. +.RE +.RS .PP -This will get all information (including track size info) from the -.B *.inf -files and then read the audio data from stdin. +The following tag labels may appear in a +.B "*.inf +file: +.TP +.B CDINDEX_DISCID= +The cdindex disk ID is used by the +.B musicbrainz +CD-database. +.sp +This tag label uses a quoted string type parameter. +.sp +This tag label is ignored by +.BR cdrecord . +.TP +.B CDDB_DISCID= +The cddb disk ID is used by the +.B cddb +and the +.B freedb +CD-database. +.sp +This tag label uses a numerical parameter. +.sp +This tag label is ignored by +.BR cdrecord . +.TP +.B MCN= +The Media Catalog Number (MCN) is a 13 digit number that follows UPC/EAN-13 rules. +.sp +The data is used by cdrecord to create sub-channel data. +.TP +.B ISRC= +The International Standard Recording Code (ISRC) is a 12 byte string that +is created from two uppercase characters for the country code, followed +by three uppercase characters for the owner, followed by two digits for the +year of recording followed by five digits for the recording serial number. +.sp +To increase the readability of the ISRC tag, there may be a minus sign +between every two fields of the ISRC string. +.sp +The data is used by cdrecord to create sub-channel data. +.TP +.B Albumtitle= +The +.B Album Title +is the name of the disk in the CD-Text information. +.sp +This tag label uses a quoted string type parameter. +.TP +.B Tracktitle= +The +.B Track Title +is the name of the current track in the CD-Text information. +.sp +This tag label uses a quoted string type parameter. +.TP +.B Albumperformer= +The +.B Album Performer +is the global name of the of the performer of the disk in the CD-Text information. +.sp +This tag label uses a quoted string type parameter. +.TP +.B Performer= +The +.B Performer +is the name of the of the performer of the current track in the CD-Text information. +.sp +This tag label uses a quoted string type parameter. +.TP +.B Albumsongwriter= +The +.B Album Songwriter +is the global name of the of the songwriter of the disk in the CD-Text information. +.sp +This tag label uses a quoted string type parameter. +.TP +.B Songwriter= +The +.B Songwriter +is the name of the of the songwriter of the current track in the CD-Text information. +.sp +This tag label uses a quoted string type parameter. +.TP +.B Albumcomposer= +The +.B Album Composer +is the global name of the of the composer of the disk in the CD-Text information. +.sp +This tag label uses a quoted string type parameter. +.TP +.B Composer= +The +.B Composer +is the name of the of the composer of the current track in the CD-Text information. +.sp +This tag label uses a quoted string type parameter. +.TP +.B Albumarranger= +The +.B Album Arranger +is the global name of the of the arranger of the disk in the CD-Text information. +.sp +This tag label uses a quoted string type parameter. +.TP +.B Arranger= +The +.B Arranger +is the name of the of the arranger of the current track in the CD-Text information. +.sp +This tag label uses a quoted string type parameter. +.TP +.B Albummessage= +The +.B Album Message +is the global message text of the disk in the CD-Text information. +.sp +This tag label uses a quoted string type parameter. +.TP +.B Message= +The +.B Message +is the message text of the current track in the CD-Text information. +.sp +This tag label uses a quoted string type parameter. +.TP +.B Albumclosed_info= +The +.B Album Closed_info +is the global closed info text of the disk in the CD-Text information. +.sp +This tag label uses a quoted string type parameter. +.TP +.B Closed_info= +The +.B Closed_info +is the closed info text of the current track in the CD-Text information. +.sp +This tag label uses a quoted string type parameter. +.TP +.B Track= +The parameter contains the relative number of the current track on the original disk. +The first track always has the track number 1, a hidden track uses track number 0. +.sp +This tag label uses a numerical parameter. +.sp +This tag label is ignored by +.B cdrecord +except when checking the the +.B Trackstart +for track #1. +.TP +.B Tracknumber= +The parameter contains the absolute number of the current track, +taken from the TOC on the original disk. +The first track on the original disk may have a number greater than 1, +a hidden track always uses track number 0. +.sp +This tag label uses a numerical parameter. +.sp +This tag label is currently ignored by +.B cdrecord +as cdrecord assigns track numbers when compiling the disk information. +.TP +.B Trackstart= +The parameter contains the track start offset in sectors on the original disk. +If the current track becomes the first track on the new disk and if the track +was the first track on the original disk. +.B cdrecord +uses this number to set up the offset for index 1 on the new disk. +.sp +This tag label uses a numerical parameter. +.TP +.B Tracklength= +The parameter is used by +.B cdrecord +to set up the size of the track on the new disk. +.sp +This tag label uses an unquoted string type parameter +in the form "sectors, samples". +.sp +This label is mandatory for +.BR cdrecord . +.TP +.B Pre-emphasis= +The pre-emphasis parameter controls whether the related pre-emphasis +bit in the sub-channel data is set by cdrecord. +Permitted values for this parameter are +.B yes +and +.BR no . .sp -If you like to write from -.BR stdin , -make sure that cdrecord is called with a large enough FIFO size (e.g. -.BR fs=128m ), -reduce the write speed to a value below the read speed of the source drive -(e.g. -.BR speed=12 ), -and switch the burn-free -option for the recording drive on by adding -.BR driveropts=burnfree . -.PP -To set drive options without writing a CD (e.g. to switch a drive -to single session mode), run -.PP - cdrecord dev=1,0 \-setdropts driveropts=singlesession -.PP -If you like to do this when no CD is in the drive, call -.PP - cdrecord dev=1,0 \-force \-setdropts driveropts=singlesession -.PP -To copy a CD in clone mode, first read the master CD using: -.PP - readcd dev=b,t,l \-clone f=somefile -.PP -or (in case the CD contains many sectors that are unreadable by intention) -by calling: -.PP - readcd dev=1,0 -clone -nocorr f=somefile -.PP -will create the files -.I somefile +This tag label uses an unquoted string type parameter. +Valid values are +.B yes and -.IR somefile.toc . -Then write the CD using: -.PP - cdrecord dev=1,0 -raw96r -clone -v somefile - - -.SH ENVIRONMENT +.BR no . .TP -.B CDR_DEVICE -This may either hold a device identifier that is suitable to the open -call of the SCSI transport library or a label in the file /etc/default/cdrecord. +.B Channels= +The parameter of this tag is the number of channels on the disk. +All CD-audio disks use stereo recording and thus a 2 is the correct parameter. +.sp +This tag label uses a numerical parameter. +.sp +This label is currently ignored by +.BR cdrecord . .TP -.B CDR_SPEED -Sets the default speed value for writing (see also -.B \-speed -option). +.B Copy_permitted= +The parameter for this tag label contains information about the copyright state +of a track on the original disk. +.sp +This tag label uses an unquoted string type parameter. +Valid values are: +.RS .TP -.B CDR_FIFOSIZE -Sets the default size of the FIFO (see also -.BR fs= # -option). +.B yes +The +.B digital copy permitted +bit is set in the TOC and in the sub-channel data. +If this bit is set, the related track is not copyright +protected and may be copied infinitely. .TP -.B CDR_FORCERAWSPEED -If this environment variable is set, +.B no +The +.B digital copy permitted +bit is not set in the TOC. +The +.B digital copy permitted +bit in the sub-channel data alters with 9.375 Hz. +This is called +.BR "Serial Copy Management System (SCMS)" . +The sense of this track state is to flag that the creator +of the CD does not have the copyright permission to create +copies of the related track. The related track is copyright +protected and the creator of the CD thus is +just given the permission to create one single copy from +fair use rights and no further copies are permitted from this source. +.TP +.B once +The +.B digital copy permitted +bit is not set in the TOC and in the sub-channel data. +The sense of this track state is to flag that the related +track is copyright protected and thus may not be coped infinitely. +One single copy from fair use rights is permitted. +.PP +Note that many CDs sold by the music industry have +.B SCMS +flagged for one or more tracks, signalling that the related +content company does not own the copyright to make copies +from this track. +.RE +.TP +.B Endianess= +The parameter for this tag is the byte order used in the +audio data file that was created for this track. +.sp +This tag label uses an unquoted string type parameter. +Valid values are +.B little +and +.BR big . +.sp +This label is ignored by .B cdrecord -will allow you to write at the full RAW encoding speed a single CPU supports. -This will create high potential of buffer underruns. Use with care. +as the endianess is retrieved from the audio file format. .TP -.B CDR_FORCESPEED -If this environment variable is set, +.B Index= +The parameter list for this tag is a list of numbers that +are sector numbers counting relatively to the logical beginning of the track +(which always is at index #1). As any track needs to have an entry +for index #1, the first entry in the list is always 0. +If more entries are present for this tag, there are more offset values +that correspond to index values greater than 1. +.sp +This tag label uses an unquoted string type parameter +that contains a list of space separated index offset numbers. +.TP +.B Index0= +The parameter for this tag is a number that represents the number +of sectors relatively to the beginning (index #1) of this track. +This number identifies where index #0 of the +next track begins. It the parameter is set to -1, the next track has +no index #0, resulting in pregap size 0 for the next track. +.sp +Note that .B cdrecord -will allow you to write at the full DMA speed the system supports. -There is no DMA reserve for reading the data that is to be written from disk. -This will create high potential of buffer underruns. Use with care. +strictly follows the CD-standard that defines that the logical beginning of +a track is at the location where index #1 starts in this track. +If index #0 for track +.B n +contains audio data, the related audio data is a logical part of track +.BR "n-1" . +.sp +This tag label uses a numerical parameter. .TP -.B RSH +.B MD5-offset= +The parameter for this tag is the byte offset where the raw audio +data begins in the related audio file. +.sp +This tag label uses a numerical parameter. +.sp +This label is ignored by +.BR cdrecord . +.TP +.B MD5-size= +The parameter for this tag is the number of bytes of raw audio data +in the related audio file. +.sp +This tag label uses a numerical parameter. +.sp +This label is ignored by +.BR cdrecord . +.TP +.B MD5-sum= +The parameter for this tag is the md5 sum for the raw audio data in +the related audio file. +.sp +This tag label uses a numerical parameter. +.sp +This label is ignored by +.BR cdrecord . +.RE + +.TP +.B *.cue +The +.B "*.cue +files are CD-structure description files introduced by +.BR CDRWIN . +They are read and used by +.B cdrecord +in case cdrecord was called with the +.BI cuefile= name.cue +option. +.sp +The following commands are supported in CUE files: +.RS +.TP +.BI ARRANGER " arranger-string +This command is used to specify the name of a arranger for a disk that +includes CD-Text enhancements. +.sp +The parameter is the name of a arranger. If the string contains any spaces, +it must be enclosed in quotation marks. +.sp If the -.B RSH -environment is present, the remote connection will not be created via -.BR rcmd (3) -but by calling the program pointed to by -.BR RSH . -Use e.g. -.BR RSH= /usr/bin/ssh -to create a secure shell connection. +.B ARRANGER +command +appears before any +.B TRACK +command, the string parameter will be encoded as the arranger of the entire disk. +If the +.B ARRANGER +command appears after a +.B TRACK +command, the string parameter will be encoded the the arranger of the current track. +.sp +This command is only accepted if the +.B cdrecord +specific CUE extensions are permitted. +.TP +.BI CATALOG " media-catalog-number +This command is used to specify the disc's +.BR "Media Catalog Number" . +The +.I media-catalog-number +is a 13 digit number that follows UPC/EAN-13 rules. .sp -Note that this forces +This command can appear only once in the CUE SHEET file. +It must appear before any +.B TRACK +command. +.TP +.BI CDTEXTFILE " filename +This command is used to specify the name of a file that contains binary +encoded CD-Text information. +.B CDRWIN +only accepts headerless binary encoded CD-Text information, but .B cdrecord -to create a pipe to the -.B rsh(1) -program and disallows +also accepts binary encoded CD-Text information with an MMC-compliant header. +The CD-Text information is ignored by .B cdrecord -to directly access the network socket to the remote server. -This makes it impossible to set up performance parameters and slows down -the connection compared to a -.B root -initiated -.B rcmd(3) -connection. +unless the +.B \-text +option is used. +.sp +If the filename contains spaces, it must be enclosed in quotation marks. .TP -.B RSCSI +.BI COMPOSER " composer-string +This command is used to specify the name of a composer for a disk that +includes CD-Text enhancements. +.sp +The parameter is the name of a composer. If the string contains any spaces, +it must be enclosed in quotation marks. +.sp If the -.B RSCSI -environment is present, the remote SCSI server will not be the program -.B /opt/schily/sbin/rscsi -but the program pointed to by -.BR RSCSI . -Note that the remote SCSI server program name will be ignored if you log in -using an account that has been created with a remote SCSI server program as -login shell. - -.SH FILES -.TP -/etc/default/cdrecord -Default values can be set for the following options in /etc/default/cdrecord. -For example: -.SM CDR_FIFOSIZE=8m -or -.SM CDR_SPEED=2 +.B COMPOSER +command +appears before any +.B TRACK +command, the string parameter will be encoded as the composer of the entire disk. +If the +.B COMPOSER +command appears after a +.B TRACK +command, the string parameter will be encoded the the composer of the current track. +.sp +This command is only accepted if the +.B cdrecord +specific CUE extensions are permitted. +.TP +.BI FILE " filename filetype" +This command is used to specify a data or audio file that contains data +to be written to the medium. +.sp +If the filename contains spaces, it must be enclosed in quotation marks. +.sp +The following values are allowed for the file type parameter: .RS +.TP 12 +.B BINARY +Intel binary file (LSB first) .TP -CDR_DEVICE -This may either hold a device identifier that is suitable to the open -call of the SCSI transport library or a label in the file /etc/default/cdrecord -that allows to identify a specific drive on the system. +.B MOTOTOLA +Motorola binary file (MSB first) .TP -CDR_SPEED -Sets the default speed value for writing (see also -.B \-speed -option). +.B AIFF +Audio AIFF file .TP -CDR_FIFOSIZE -Sets the default size of the FIFO (see also -.BR fs= # -option). +.B WAVE +Audio WAVE file .TP -CDR_MAXFIFOSIZE -Sets the maximum size of the FIFO (see also -.BR fs= # -option). +.B MP3 +Audio MP3 file .TP -Any other label -is an identifier for a specific drive on the system. -Such an identifier may not contain the characters ',', '/', '@' or ':'. +.B AU +Audio AU file +(only permitted if +.B cdrecord +CUE extensions are enabled) +.TP +.B OGG +Audio OGG file +(only permitted if +.B cdrecord +CUE extensions are enabled) +.PP +All audio files (WAVE, AIFF, MP3, AU and OGG) must be in 44100 Hz 16 bit +stereo format. +MP3 and OGG is currently unsupported. +.PP +If an audio file is not an exact multiple of a CDROM sector (2352 bytes), then +is is padded with zeroes to fill up to the needed size. +.PP +All +.B FILE +commands need to be before a related +.B TRACK +command and after the last +.B INDEX +command or +.B POSTGAP +command for the previous track. +.PP +If the +.B cdrecord +specific CUE extensions are enabled, then a +.B FILE +command may also appear between an +.B INDEX 00 +and an +.B INDEX 01 +command. +This allows to let the user create one file per track where the file +starts at +.B INDEX 01 +of the track and ends after +.B INDEX 00 +of the following track. +In this case, no +.B FILE +command is allowed before the related +.B TRACK +command. +.RE +.TP +.BI FLAGS " flags +This command is used to set special subcode flags within a track. .sp -Each line that follows a label contains a TAB separated list of items. -Currently, four items are recognized: the SCSI ID of the drive, the -default speed that should be used for this drive, the default FIFO size -that should be used for this drive and drive specific options. The values for -.I speed -and -.I fifosize -may be set to -1 to tell cdrecord to use the global defaults. -The value for driveropts may be set to "" if no driveropts are used. -A typical line may look this way: +The following flags are supported: +.RS +.TP 12 +.B DCP +Digital copy permitted +.TP +.B 4CH +Four channel audio +.TP +.B PRE +Pre-emphasis enabled (audio tracks only) +.TP +.B SCMS +Serial copy management system (not supported by all recorders) +.PP +More than one flag type argument may appear after the FLAGS command (e.g +FLAGS DCP PRE). +.PP +The +.B FLAGS +command must appear after a +.B TRACK +command but before any +.B INDEX +command. +Only one +.B FLAGS +command is allower per +.B TRACK command. +.PP +The fourth subcode flag that marks data tracks is set automatically for data tracks. +.RE +.TP +.BI INDEX " number mm:ss:ff +This command is used to specify indexes within a track. .sp -teac1= 0,5,0 4 8m "" +The first parameter is the index number in the range 0-99. .sp -yamaha= 1,6,0 -1 -1 burnfree +The second parameter is a relative time in minutes, +seconds and frames (there are 75 frames/second). .sp -This tells +All index numbers must be between 0 and 99 inclusive. +The first index for a track must be either 0 or 1 with all +indexes being sequential to the first one. +The first index for a file must start at 00:00.00. +.RS +.TP 10 +.B INDEX 00 +specifies the starting time of the +.B pregap +of the track. +.TP +.B INDEX 01 +specifies the starting time of the track. +This is the index that is stored in the table of content for the disk +as the track start. +.TP +.B INDEX > 1 +specifies a subindex within a track. +.RE +.TP +.BI ISRC " recording code +This command is used to specify the +.B "International Standard Recording Code (ISRC) +of a track. This is a code that should exist for all +commercial audio tracks. +.sp +The ISRC code must be 12 characters in length. +The first two characters +are characters that are from the two character country code. +The next three characters are alphanumeric and describe the +studio code. +The next two characters are the last two digits from the +recording year. +The last 5 characters are digits that form a serial number that +is unique for the same studio and year. +.sp +If .B cdrecord -that a drive named -.I teac1 -is at scsibus 0, target 5, lun 0 and should be used with speed 4 and -a FIFO size of 8 MB. -A second drive may be found at scsibus 1, target 6, lun 0 and uses the -default speed and the default FIFO size. +specific CUE extensions are permitted, the four fields of the ISRC +may be separated by a minus sign. +.sp +If the +.B ISRC +command is used, it must appear after a +.B TRACK +command but before any +.B INDEX +command. +.TP +.BI MESSAGE " message-string +This command is used to specify the test of a message for a disk that +includes CD-Text enhancements. +.sp +The parameter is the test of a message. If the string contains any spaces, +it must be enclosed in quotation marks. +.sp +If the +.B MESSAGE +command +appears before any +.B TRACK +command, the string parameter will be encoded as the message of the entire disk. +If the +.B MESSAGE +command appears after a +.B TRACK +command, the string parameter will be encoded the the message of the current track. +.sp +This command is only accepted if the +.B cdrecord +specific CUE extensions are permitted. +.TP +.BI PERFORMER " performer-string +This command is used to specify the name of a performer for a disk that +includes CD-Text enhancements. +.sp +The parameter is the name of the performer. If the string contains any spaces, +it must be enclosed in quotation marks. +.sp +If the +.B PERFORMER +command +appears before any +.B TRACK +command, the string parameter will be encoded as the performer of the entire disk. +If the +.B PERFORMER +command appears after a +.B TRACK +command, the string parameter will be encoded the the performer of the current track. +.TP +.BI POSTGAP " mm:ss:ff +This command is used to specify the length of a postgap at the end of a track. +The postgap data is generated internally by +.BR cdrecord . +No data is consumed from the current data file. +.sp +The parameter specifies the postgap length in minutes, seconds and frames. +.sp +The +.B POSTGAP +command must appear after all +.B INDEX +commands for the current track. +Only one +.B POSTGAP +command is allowed per track. +.TP +.BI PREGAP " mm:ss:ff +This command is used to specify the length of a pregap at the beginning +of a track. +The pregap data is generated internally by +.BR cdrecord . +No data is consumed from the current data file. +.sp +The parameter specifies the postgap length in minutes, seconds and frames. +.sp +The +.B PREGAP +command must appear after a +.B TRACK +command but before any +.B INDEX +command. +Only one +.B PREGAP +command is allowed per track. +.TP +.BI REM " comment +This command is used to put comments into a CUE file. +.sp +The text that appears in the line after a +.B REM +command is usually ignored. There is an exception: The special +comment +.B "REM CDRTOOLS +is used to enable +.B cdrecord +specific CUE extensions in the parser. +.TP +.BI SONGWRITER " songwriter-string +This command is used to specify the name of a songwriter for a disk that +includes CD-Text enhancements. +.sp +The parameter is the name of a songwriter. If the string contains any spaces, +it must be enclosed in quotation marks. +.sp +If the +.B SONGWRITER +command +appears before any +.B TRACK +command, the string parameter will be encoded as the songwriter of the entire disk. +If the +.B SONGWRITER +command appears after a +.B TRACK +command, the string parameter will be encoded the the songwriter of the current track. +.TP +.BI TITLE " title-string +This command is used to specify a title for a disk that +includes CD-Text enhancements. +.sp +The parameter is the title for a track or for the disk. If the string contains any spaces, +it must be enclosed in quotation marks. +.sp +If the +.B TITLE +command +appears before any +.B TRACK +command, the string parameter will be encoded as the title of the entire disk. +If the +.B TITLE +command appears after a +.B TRACK +command, the string parameter will be encoded the the title of the current track. +.TP +.BI TRACK " number datatype +This command is used to start a new +.BR TRACK . +.sp +The first parameter is a track number in the range 1-99. +.sp +The second parameter specifies the track data type. +.sp +The following datatypes are permitted: +.RS +.TP 12 +.B AUDIO +Audio/Music (2352) +.TP +.B CDG +Karaoke CD+G (2448) +.TP +.B MODE1/2048 +CDROM Mode1 Data (cooked) +.TP +.B MODE1/2352 +CDROM Mode1 Data (raw) +.TP +.B MODE2/2336 +CDROM-XA Mode2 Data +.TP +.B MODE2/2352 +CDROM-XA Mode2 Data +.TP +.B CDI/2336 +CDI Mode2 Data +.TP +.B CDI/2352 +CDI Mode2 Data +.PP +All track numbers must be between 1 and 99 inclusive. +The first track number can be greater than one, but all track numbers +after the first must be sequential. +There must be at least one track per file. +.RE .RE .SH SEE ALSO @@ -2158,17 +3189,17 @@ .PP Disks made in .B "Track At Once -mode are not suitable as a master for direct mass production by CD manufacturers. +mode are not suitable as a master for direct mass production by CD-manufacturers. You will need the .B "disk at once option to record such disks. Nevertheless the disks made in .B "Track At Once -will normally be read in all CD players. Some old -audio CD players however may produce a two second click between two audio tracks. +will normally be read in all CD-players. Some old +audio CD-players however may produce a two second click between two audio tracks. .PP The minimal size of a track is 4 seconds or 300 sectors. If you write -smaller tracks, the CD-Recorder will add dummy blocks. This is not an +smaller tracks, the CD-recorder will add dummy blocks. This is not an error, even though the SCSI-error message looks this way. .PP .B Cdrecord @@ -2177,10 +3208,10 @@ should work also. The newer Philips/HP/Plasmon/Grundig drives as well as Yamaha CDR-100 and CDR-102 work also. The Plasmon RF-4100 -work, but has not tested in multi session. +works, but has not been tested in multi-session. A Philips CDD-521 that has not been upgraded will not work. The Sony CDU-924 has been tested, but does not support XA-mode2 in hardware. -The Sony therefore cannot create conforming multi session disks. +The Sony therefore cannot create conforming multi-session disks. The Ricoh RO-1420C works, but some people seem to have problems to use them with speed=2, try speed=0 in this case. .PP @@ -2199,7 +3230,7 @@ with CD-images that are located on a .B NFS mounted filesystem, be sure that the FIFO size is big enough. -I used +The author used .B cdrecord with medium load on a SS20/502 and even at quad speed on a Sparcstation-2 which was heavily loaded, @@ -2208,7 +3239,7 @@ If you want to make sure that buffer underruns are not caused by your source disk, you may use the command .PP -.B " cdrecord -dummy dev=2,0 padsize=600m /dev/null +.B " cdrecord \-dummy dev=2,0 padsize=600m /dev/null .PP to create a disk that is entirely made of dummy data. .B Cdrecord @@ -2222,23 +3253,23 @@ users with no root privileges to use .B cdrecord. .B Cdrecord -in this case checks, if the real user would have been able to read +in this case checks if the real user would have been able to read the specified files. -To give all user access to use +To give all users access to use .B cdrecord, enter: .PP - chown root /usr/local/bin/cdrecord + chown root /opt/schily/bin/cdrecord .br - chmod 4711 /usr/local/bin/cdrecord + chmod 4711 /opt/schily/bin/cdrecord .PP To give a restricted group of users access to cdrecord enter: .PP - chown root /usr/local/bin/cdrecord + chown root /opt/schily/bin/cdrecord .br - chgrp cdburners /usr/local/bin/cdrecord + chgrp cdburners /opt/schily/bin/cdrecord .br - chmod 4710 /usr/local/bin/cdrecord + chmod 4710 /opt/schily/bin/cdrecord .PP and add a group .I cdburners @@ -2251,39 +3282,40 @@ .PP You should not connect old drives that do not support disconnect/reconnect to either the SCSI bus that is connected to the -CD-Recorder or the source disk. +CD-recorder or the source disk. .PP A Compact Disc can have no more than 99 tracks. .PP When creating a disc with both audio and data tracks, the data should be on track 1 otherwise you should create -a CDplus disk which is a multi session disk with the first session +a CDplus disk which is a multi-session disk with the first session containing the audio tracks and the following session containing the data track. .PP Many operating systems are not able to read more than a single data track, or need special software to do so. .PP -More information on the SCSI command set of a HP CD-Recorder can be found at: +More information on the SCSI command set of a HP CD-recorder can be found at: .PP http://www.hp.com/isgsupport/cdr/index.html .PP If you have more information or SCSI command manuals for currently -unsupported CD/DVD-Recorders please contact the author. +unsupported CD/DVD/BluRay-recorders please contact the author. .PP -The Philips CDD 521 CD-Recorder (even in the upgraded version) +The Philips CDD 521 CD-recorder (even in the upgraded version) has several firmware bugs. Some of them will force you to power cycle the device or to reboot the machine. .PP When using .B cdrecord -with the broken -.B "Linux SCSI generic driver." -You should note that +with the +.BR "Linux SCSI generic driver" , +you should note that .B cdrecord -uses a hack, that tries to emulate the functionality of the scg driver. +uses a layer, that tries to emulate the functionality of the scg driver +on top of the drives of the local operating system. Unfortunately, the sg driver on .B Linux -has several severe bugs: +has several flaws: .TP \(bu It cannot see if a SCSI command could not be sent at all. @@ -2297,7 +3329,7 @@ \(bu It cannot get real DMA count of transfer. .B Cdrecord -cannot tell you if there is an DMA residual count. +cannot tell you if there is a DMA residual count. .TP \(bu It cannot get number of bytes valid in auto sense data. @@ -2305,10 +3337,10 @@ cannot tell you if device transfers no sense data at all. .TP \(bu -It fetches to few data in auto request sense (CCS/SCSI-2/SCSI-3 needs >= 18). +It fetches too few data in auto request sense (CCS/SCSI-2/SCSI-3 needs >= 18). .PP The FIFO percent output is computed just after a block of data has been written -to the CD/DVD-Recorder. For this reason, there will never be 100% FIFO fill ratio +to the CD/DVD/BluRay-recorder. For this reason, there will never be 100% FIFO fill ratio while the FIFO is in streaming mode. .SH DIAGNOSTICS @@ -2355,7 +3387,7 @@ command. .PP The fifth line is the error text for the sense key if available, followed -by the segment number that is only valid if the command was a +by the segment number which is only valid if the command was a .I copy command. If the error message is not directly related to the current command, the text @@ -2371,7 +3403,7 @@ The seventh line prints the block number that is related to the failed command and text for several error flags. The block number may not be valid. .PP -The eight line reports the timeout set up for this command and the time +The eighth line reports the timeout set up for this command and the time that the command really needed to complete. .PP The following message is not an error: @@ -2385,12 +3417,12 @@ Sense Bytes: F0 00 05 80 00 00 27 0A 00 00 00 00 B5 00 00 00 00 00 Sense Key: 0x5 Illegal Request, Segment 0 Sense Code: 0xB5 Qual 0x00 (dummy data blocks added) Fru 0x0 -Sense flags: Blk -2147483609 (valid) +Sense flags: Blk \-2147483609 (valid) cmd finished after 0.002s timeout 40s .fi .RE .sp -It simply notifies, that a track that is smaller than the minimum size has been +It simply notifies that a track that is smaller than the minimum size has been expanded to 300 sectors. .SH BUGS .PP @@ -2452,11 +3484,7 @@ you may join the developer mailing list via this URL: .sp .B -http://lists.berlios.de/mailman/listinfo/cdrecord-developers -.PP -The mail address of the list is: -.B -cdwrite@other.debian.org +https://lists.sourceforge.net/lists/listinfo/cdrtools-developers .SH AUTHOR .nf @@ -2468,46 +3496,42 @@ .PP Additional information can be found on: .br -http://www.fokus.fhg.de/usr/schilling/cdrecord.html +http://cdrecord.org/private/cdrecord.html .PP If you have support questions, send them to: .PP .B -cdrecord-support@berlios.de -.br -or -.B -cdwrite@other.debian.org +cdrtools-support@lists.sourceforge.net .PP If you have definitely found a bug, send a mail to: .PP .B -cdrecord-developers@berlios.de +cdrtools-developers@lists.sourceforge.net .br or .B -schilling@fokus.fhg.de +joerg.schilling@fokus.fraunhofer.de .PP To subscribe, use: .PP .B -http://lists.berlios.de/mailman/listinfo/cdrecord-developers +https://lists.sourceforge.net/lists/listinfo/cdrtools-developers .br or .B -http://lists.berlios.de/mailman/listinfo/cdrecord-support -.PP -The old cdwrite mailing list may be joined by sending mail to: -.nf -.sp - cdwrite-request@other.debian.org -.sp -.fi -and including the word -.I subscribe -in the body. -The mail address of the list is: -.nf -.sp - cdwrite@other.debian.org -.fi +https://lists.sourceforge.net/lists/listinfo/cdrtools-support +.br +.ne 7 +.SH "INTERFACE STABILITY +The interfaces provided by +.B cdrecord +are designed for long term stability. +As +.B cdrecord +depends on interfaces provided by the underlying operating system, +the stability of the interfaces offered by +.B cdrecord +depends on the interface stability of the OS interfaces. +Modified interfaces in the OS may enforce modified interfaces +in +.BR cdrecord . diff -Nru cdrtools-2.01.01a33/cdrecord/cdrecord.c cdrtools-3.02a09/cdrecord/cdrecord.c --- cdrtools-2.01.01a33/cdrecord/cdrecord.c 2007-08-09 22:10:00.000000000 +0000 +++ cdrtools-3.02a09/cdrecord/cdrecord.c 2016-01-21 22:28:23.000000000 +0000 @@ -1,12 +1,13 @@ -/* @(#)cdrecord.c 1.355 07/08/10 Copyright 1995-2007 J. Schilling */ +/* @(#)cdrecord.c 1.415 16/01/21 Copyright 1995-2016 J. Schilling */ +#include #ifndef lint -static char sccsid[] = - "@(#)cdrecord.c 1.355 07/08/10 Copyright 1995-2007 J. Schilling"; +static UConst char sccsid[] = + "@(#)cdrecord.c 1.415 16/01/21 Copyright 1995-2016 J. Schilling"; #endif /* * Record data on a CD/CVD-Recorder * - * Copyright (c) 1995-2007 J. Schilling + * Copyright (c) 1995-2016 J. Schilling */ /* * The contents of this file are subject to the terms of the @@ -15,35 +16,33 @@ * with the License. * * See the file CDDL.Schily.txt in this distribution for details. + * A copy of the CDDL is also available via the Internet at + * http://www.opensource.org/licenses/cddl1.txt * * When distributing Covered Code, include this CDDL HEADER in each * file and include the License file CDDL.Schily.txt from this distribution. */ +/*#define TR_DEBUG*/ #include -#include +#include #include #include #include #include #include -#ifdef HAVE_SYS_RESOURCE_H -#include /* for rlimit */ -#endif +#include /* for rlimit */ #include #include -#ifdef HAVE_SYS_MMAN_H -#include -#endif +#include #include #include #include -#include +#include #include #include -#ifdef HAVE_PRIV_H -#include -#endif +#include +#include #include "xio.h" @@ -54,7 +53,7 @@ #include "auheader.h" #include "cdrecord.h" -#include "defaults.h" +#include "cdrdeflt.h" #include "movesect.h" @@ -66,7 +65,8 @@ char cdr_version[] = VERSION; -#if defined(_POSIX_PRIORITY_SCHEDULING) && _POSIX_PRIORITY_SCHEDULING -0 >= 0 +#if defined(_POSIX_PRIORITY_SCHEDULING) && _POSIX_PRIORITY_SCHEDULING -0 >= 0 && \ + defined(HAVE_SCHED_SETSCHEDULER) #ifdef HAVE_SYS_PRIOCNTL_H /* The preferred SYSvR4 schduler */ #else #define USE_POSIX_PRIORITY_SCHEDULING @@ -152,12 +152,12 @@ "RAW/RAW96R", }; -int debug; /* print debug messages */ -LOCAL int kdebug; /* print kernel debug messages */ -LOCAL int scsi_verbose; /* SCSI verbose flag */ -LOCAL int silent; /* SCSI silent flag */ -int lverbose; /* local verbose flag */ -int xdebug; /* extended debug flag */ + int debug; /* print debug messages debug=#,-d */ +LOCAL int kdebug; /* print kernel debug messages kdebug#,kd# */ +LOCAL int scsi_verbose; /* SCSI verbose flag -Verbose,-V */ +LOCAL int silent; /* SCSI silent flag -silent,-s */ + int lverbose; /* local verbose flag -verbose,-v */ + int xdebug; /* extended debug flag -x,xd=# */ char *buf; /* The transfer buffer */ long bufsize = -1; /* The size of the transfer buffer */ @@ -171,6 +171,11 @@ EXPORT char *driveropts; LOCAL char *cuefilename; LOCAL uid_t oeuid = (uid_t)-1; +LOCAL uid_t ouid = (uid_t)-1; +LOCAL BOOL issetuid = FALSE; +LOCAL char *isobuf; /* Buffer for doing -isosize on stdin */ +LOCAL int isobsize; /* The amount of remaining data in isobuf */ +LOCAL int isoboff; /* The current "read" offset in isobuf */ struct timeval starttime; struct timeval wstarttime; @@ -201,7 +206,7 @@ EXPORT int write_secs __PR((SCSI *scgp, cdr_t *dp, char *bp, long startsec, int bytespt, int secspt, BOOL islast)); -LOCAL int write_track_data __PR((SCSI *scgp, cdr_t *, track_t *)); +EXPORT int write_track_data __PR((SCSI *scgp, cdr_t *, track_t *)); EXPORT int pad_track __PR((SCSI *scgp, cdr_t *dp, track_t *trackp, long startsec, Llong amt, @@ -219,21 +224,26 @@ LOCAL void setpregaps __PR((int, track_t *)); LOCAL long checktsize __PR((int, track_t *)); LOCAL void opentracks __PR((track_t *)); +LOCAL int cvt_hidden __PR((track_t *)); LOCAL void checksize __PR((track_t *)); LOCAL BOOL checkdsize __PR((SCSI *scgp, cdr_t *dp, long tsize, UInt32_t flags)); LOCAL void raise_fdlim __PR((void)); LOCAL void raise_memlock __PR((void)); LOCAL int getfilecount __PR((int ac, char *const *av, const char *fmt)); -LOCAL void gargs __PR((int, char **, int *, track_t *, char **, +LOCAL void gargs __PR((int, char **, int *, track_t *, + char **, char **, int *, cdr_t **, int *, UInt32_t *, int *)); +LOCAL int default_wr_mode __PR((int tracks, track_t *trackp, + UInt32_t *flagsp, int *wmp, int flags)); LOCAL void etracks __PR((char *opt)); LOCAL void set_trsizes __PR((cdr_t *, int, track_t *)); EXPORT void load_media __PR((SCSI *scgp, cdr_t *, BOOL)); EXPORT void unload_media __PR((SCSI *scgp, cdr_t *, UInt32_t)); EXPORT void reload_media __PR((SCSI *scgp, cdr_t *)); EXPORT void set_secsize __PR((SCSI *scgp, int secsize)); +LOCAL int _read_buffer __PR((SCSI *scgp, int)); LOCAL int get_dmaspeed __PR((SCSI *scgp, cdr_t *)); LOCAL BOOL do_opc __PR((SCSI *scgp, cdr_t *, UInt32_t)); LOCAL void check_recovery __PR((SCSI *scgp, cdr_t *, UInt32_t)); @@ -253,10 +263,14 @@ LOCAL BOOL check_wrmode __PR((cdr_t *dp, UInt32_t wmode, int tflags)); LOCAL void set_wrmode __PR((cdr_t *dp, UInt32_t wmode, int tflags)); LOCAL void linuxcheck __PR((void)); +LOCAL void priv_warn __PR((const char *what, const char *msg)); +#ifdef TR_DEBUG +EXPORT void prtrack __PR((track_t *trackp)); +#endif struct exargs { - SCSI *scgp; - cdr_t *dp; + SCSI *scgp; /* The open SCSI * pointer */ + cdr_t *dp; /* The pointer to the device driver */ int old_secsize; UInt32_t flags; int exflags; @@ -268,6 +282,9 @@ char *av[]; { char *dev = NULL; +#if defined(USE_NLS) + char *dir; +#endif int timeout = 40; /* Set default timeout to 40s CW-7502 is slow*/ int speed = -1; UInt32_t flags = 0L; @@ -281,6 +298,7 @@ long startsec = 0L; int errs = 0; SCSI *scgp = NULL; + char *scgopts = NULL; char errstr[80]; BOOL gracedone = FALSE; @@ -288,8 +306,60 @@ /* This gives wildcard expansion with Non-Posix shells with EMX */ _wildcard(&ac, &av); #endif +#ifdef HAVE_SOLARIS_PPRIV + /* + * Try to gain additional privs on Solaris + */ + do_pfexec(ac, av, + PRIV_FILE_DAC_READ, /* to open /dev/ nodes for USCSICMD */ + PRIV_SYS_DEVICES, /* to issue USCSICMD ioctl */ + PRIV_PROC_LOCK_MEMORY, /* to grant realtime writes to CD-R */ + PRIV_PROC_PRIOCNTL, /* to grant realtime writes to CD-R */ + PRIV_NET_PRIVADDR, /* to access remote writer via RSCSI */ + NULL); + /* + * Starting from here, we potentially have more privileges. + */ +#endif save_args(ac, av); + /* + * At this point, we should have the needed privileges, either because: + * + * 1) We have been called by a privileged user (eg. root) + * 2) This is a suid-root process + * 3) This is a process that did call pfexec to gain privs + * 4) This is a process that has been called via pfexec + * 5) This is a process that gained privs via fcaps + * + * Case (1) is the only case where whe should not give up privileges + * because people would not expect it and because there will be no + * privilege escalation in this process. + */ oeuid = geteuid(); /* Remember saved set uid */ + ouid = getuid(); /* Remember uid */ +#ifdef HAVE_ISSETUGID + issetuid = issetugid(); +#else + issetuid = oeuid != ouid; +#endif + +#if defined(USE_NLS) + (void) setlocale(LC_ALL, ""); +#if !defined(TEXT_DOMAIN) /* Should be defined by cc -D */ +#define TEXT_DOMAIN "cdrecord" /* Use this only if it weren't */ +#endif + dir = searchfileinpath("share/locale", F_OK, + SIP_ANY_FILE|SIP_NO_PATH, NULL); + if (dir) + (void) bindtextdomain(TEXT_DOMAIN, dir); + else +#if defined(PROTOTYPES) && defined(INS_BASE) + (void) bindtextdomain(TEXT_DOMAIN, INS_BASE "/share/locale"); +#else + (void) bindtextdomain(TEXT_DOMAIN, "/usr/share/locale"); +#endif + (void) textdomain(TEXT_DOMAIN); +#endif fillbytes(track, sizeof (track), '\0'); @@ -297,10 +367,10 @@ track[i].track = track[i].trackno = i; track[0].tracktype = TOC_MASK; raise_fdlim(); - gargs(ac, av, &tracks, track, &dev, &timeout, &dp, &speed, &flags, - &blanktype); + gargs(ac, av, &tracks, track, &dev, &scgopts, &timeout, &dp, &speed, + &flags, &blanktype); if ((track[0].tracktype & TOC_MASK) == TOC_MASK) - comerrno(EX_BAD, "Internal error: Bad TOC type.\n"); + comerrno(EX_BAD, _("Internal error: Bad TOC type.\n")); /* * Attention: Additional restrictions to the CDDL are in place @@ -370,32 +440,33 @@ # define CLONE_TITLE "" #endif if ((flags & F_MSINFO) == 0 || lverbose || flags & F_VERSION) { - printf("Cdrecord%s%s%s %s (%s-%s-%s) Copyright (C) 1995-2007 Jörg Schilling\n", + printf(_("Cdrecord%s%s%s %s (%s-%s-%s) Copyright (C) 1995-2016 %s\n"), PRODVD_TITLE, PROBD_TITLE, CLONE_TITLE, cdr_version, - HOST_CPU, HOST_VENDOR, HOST_OS); + HOST_CPU, HOST_VENDOR, HOST_OS, + _("Joerg Schilling")); #if defined(SOURCE_MODIFIED) || !defined(IS_SCHILY_XCONFIG) #define INSERT_YOUR_EMAIL_ADDRESS_HERE #define NO_SUPPORT 0 - printf("NOTE: this version of cdrecord is an inofficial (modified) release of cdrecord\n"); - printf(" and thus may have bugs that are not present in the original version.\n"); + printf(_("NOTE: this version of cdrecord is an inofficial (modified) release of cdrecord\n")); + printf(_(" and thus may have bugs that are not present in the original version.\n")); #if NO_SUPPORT - printf(" The author of the modifications decided not to provide a support e-mail\n"); - printf(" address so there is absolutely no support for this version.\n"); + printf(_(" The author of the modifications decided not to provide a support e-mail\n")); + printf(_(" address so there is absolutely no support for this version.\n")); #else - printf(" Please send bug reports and support requests to <%s>.\n", INSERT_YOUR_EMAIL_ADDRESS_HERE); + printf(_(" Please send bug reports and support requests to <%s>.\n"), INSERT_YOUR_EMAIL_ADDRESS_HERE); #endif - printf(" The original author should not be bothered with problems of this version.\n"); + printf(_(" The original author should not be bothered with problems of this version.\n")); printf("\n"); #endif #if !defined(IS_SCHILY_XCONFIG) - printf("\nWarning: This version of cdrecord has not been configured via the standard\n"); - printf("autoconfiguration method of the Schily makefile system. There is a high risk\n"); - printf("that the code is not configured correctly and for this reason will not behave\n"); - printf("as expected.\n"); + printf(_("\nWarning: This version of cdrecord has not been configured via the standard\n")); + printf(_("autoconfiguration method of the Schily makefile system. There is a high risk\n")); + printf(_("that the code is not configured correctly and for this reason will not behave\n")); + printf(_("as expected.\n")); #endif } @@ -407,7 +478,7 @@ checkgui(); if (debug || lverbose) { - printf("TOC Type: %d = %s\n", + printf(_("TOC Type: %d = %s\n"), track[0].tracktype & TOC_MASK, toc2name[track[0].tracktype & TOC_MASK]); } @@ -435,8 +506,8 @@ * XXX mlockall() needs root privilleges. */ if (mlockall(MCL_CURRENT|MCL_FUTURE) < 0) { - errmsg("WARNING: Cannot do mlockall(2).\n"); - errmsgno(EX_BAD, "WARNING: This causes a high risk for buffer underruns.\n"); + errmsg(_("WARNING: Cannot do mlockall(2).\n")); + errmsgno(EX_BAD, _("WARNING: This causes a high risk for buffer underruns.\n")); } #endif @@ -454,14 +525,11 @@ * of the advanced features. We need to be at least installed * suid root or called by RBACs pfexec. */ - init_fifo(fs); /* Attach shared memory (still one process) */ + fs = init_fifo(fs); /* Attach shared memory (still one process) */ } - if ((flags & F_WAITI) != 0) { - if (lverbose) - printf("Waiting for data on stdin...\n"); + if ((flags & F_WAITI) != 0) wait_input(); - } /* @@ -477,6 +545,35 @@ exit(0); } /* + * The following scg_open() call needs more privileges, so we check for + * sufficient privileges here. + * The check has been introduced as some Linux distributions miss the + * skills to perceive the necessity for the needed privileges. So we + * warn which features are impaired by actually missing privileges. + */ + if (!priv_eff_priv(SCHILY_PRIV_FILE_DAC_READ)) + priv_warn("file read", "You will not be able to open all needed devices."); +#ifndef __SUNOS5 + /* + * Due to a design bug in the Solaris USCSI ioctl, we don't need + * PRIV_FILE_DAC_WRITE to send SCSI commands and most installations + * probably don't grant PRIV_FILE_DAC_WRITE. Once we need /dev/scg*, + * we would need to test for PRIV_FILE_DAC_WRITE also. + */ + if (!priv_eff_priv(SCHILY_PRIV_FILE_DAC_WRITE)) + priv_warn("file write", "You will not be able to open all needed devices."); +#endif + if (!priv_eff_priv(SCHILY_PRIV_SYS_DEVICES)) + priv_warn("device", + "You may not be able to send all needed SCSI commands, this my cause various unexplainable problems."); + if (!priv_eff_priv(SCHILY_PRIV_PROC_LOCK_MEMORY)) + priv_warn("memlock", "You may get buffer underruns."); + if (!priv_eff_priv(SCHILY_PRIV_PROC_PRIOCNTL)) + priv_warn("priocntl", "You may get buffer underruns."); + if (!priv_eff_priv(SCHILY_PRIV_NET_PRIVADDR)) + priv_warn("network", "You will not be able to do remote SCSI."); + + /* * XXX scg_open() needs root privilleges. */ if ((scgp = scg_open(dev, errstr, sizeof (errstr), @@ -484,27 +581,21 @@ scg_openerr(errstr); /* NOTREACHED */ } -#ifdef HAVE_PRIV_SET -#ifdef PRIVILEGES_DEBUG /* PRIV_DEBUG is defined in */ - error("file_dac_read: %d\n", priv_ineffect(PRIV_FILE_DAC_READ)); -#endif + /* - * Give up privs we do not need anymore. + * Drop privs we do not need anymore. * We no longer need: * file_dac_read,proc_lock_memory,proc_priocntl,net_privaddr * We still need: * sys_devices + * + * If this is a suid-root process or if the real uid of + * this process is not root, we may have gained privileges + * from suid-root or pfexec and need to manage privileges in + * order to prevent privilege escalations for the user. */ - priv_set(PRIV_OFF, PRIV_EFFECTIVE, - PRIV_FILE_DAC_READ, PRIV_PROC_LOCK_MEMORY, - PRIV_PROC_PRIOCNTL, PRIV_NET_PRIVADDR, NULL); - priv_set(PRIV_OFF, PRIV_PERMITTED, - PRIV_FILE_DAC_READ, PRIV_PROC_LOCK_MEMORY, - PRIV_PROC_PRIOCNTL, PRIV_NET_PRIVADDR, NULL); - priv_set(PRIV_OFF, PRIV_INHERITABLE, - PRIV_FILE_DAC_READ, PRIV_PROC_LOCK_MEMORY, - PRIV_PROC_PRIOCNTL, PRIV_NET_PRIVADDR, PRIV_SYS_DEVICES, NULL); -#endif + if (issetuid || ouid != 0) + priv_drop(); /* * This is only for OS that do not support fine grained privs. * @@ -521,7 +612,7 @@ if (setuid(getuid()) < 0) #endif #endif - comerr("Panic cannot set back effective uid.\n"); + comerr(_("Panic cannot set back effective uid.\n")); } /* * WARNING: We now are no more able to do any privilleged operation @@ -531,6 +622,12 @@ * XXX this function calls raisepri() to lower the priority slightly. */ scg_settimeout(scgp, timeout); + if (scgopts) { + i = scg_opts(scgp, scgopts); + if (i <= 0) + exit(i < 0 ? EX_BAD : 0); + } + scgp->flags |= SCGF_PERM_PRINT; scgp->verbose = scsi_verbose; scgp->silent = silent; scgp->debug = debug; @@ -543,47 +640,47 @@ char *auth; /* - * Warning: you are not allowed to modify or to remove this - * version checking code! + * Warning: If you modify this section of code, you must + * change the name of the program. */ vers = scg_version(0, SCG_VERSION); auth = scg_version(0, SCG_AUTHOR); - printf("Using libscg version '%s-%s'.\n", auth, vers); + printf(_("Using libscg version '%s-%s'.\n"), auth, vers); if (auth == 0 || strcmp("schily", auth) != 0) { errmsgno(EX_BAD, - "Warning: using inofficial version of libscg (%s-%s '%s').\n", + _("Warning: using inofficial version of libscg (%s-%s '%s').\n"), auth, vers, scg_version(0, SCG_SCCS_ID)); } vers = scg_version(scgp, SCG_VERSION); auth = scg_version(scgp, SCG_AUTHOR); if (lverbose > 1) - error("Using libscg transport code version '%s-%s'\n", auth, vers); + error(_("Using libscg transport code version '%s-%s'\n"), auth, vers); if (auth == 0 || strcmp("schily", auth) != 0) { errmsgno(EX_BAD, - "Warning: using inofficial libscg transport code version (%s-%s '%s').\n", + _("Warning: using inofficial libscg transport code version (%s-%s '%s').\n"), auth, vers, scg_version(scgp, SCG_SCCS_ID)); } vers = scg_version(scgp, SCG_RVERSION); auth = scg_version(scgp, SCG_RAUTHOR); if (lverbose > 1 && vers && auth) - error("Using remote transport code version '%s-%s'\n", auth, vers); + error(_("Using remote transport code version '%s-%s'\n"), auth, vers); if (auth != 0 && strcmp("schily", auth) != 0) { errmsgno(EX_BAD, - "Warning: using inofficial remote transport code version (%s-%s '%s').\n", + _("Warning: using inofficial remote transport code version (%s-%s '%s').\n"), auth, vers, scg_version(scgp, SCG_RSCCS_ID)); } } if (lverbose && driveropts) - printf("Driveropts: '%s'\n", driveropts); + printf(_("Driveropts: '%s'\n"), driveropts); /* bufsize = scg_bufsize(scgp, CDR_BUF_SIZE);*/ bufsize = scg_bufsize(scgp, bufsize); if (lverbose || debug) - error("SCSI buffer size: %ld\n", bufsize); + error(_("SCSI buffer size: %ld\n"), bufsize); if ((buf = scg_getbuf(scgp, bufsize)) == NULL) - comerr("Cannot get SCSI I/O buffer.\n"); + comerr(_("Cannot get SCSI I/O buffer.\n")); if ((flags & F_SCANBUS) != 0) { i = select_target(scgp, stdout); @@ -603,11 +700,11 @@ } if ((flags & F_RESET) != 0) { if (scg_reset(scgp, SCG_RESET_NOP) < 0) - comerr("Cannot reset (OS does not implement reset).\n"); + comerr(_("Cannot reset (OS does not implement reset).\n")); if (scg_reset(scgp, SCG_RESET_TGT) >= 0) exit(0); if (scg_reset(scgp, SCG_RESET_BUS) < 0) - comerr("Cannot reset target.\n"); + comerr(_("Cannot reset target.\n")); exit(0); } /* @@ -628,9 +725,9 @@ } } if (!do_inquiry(scgp, (flags & F_MSINFO) == 0 || lverbose)) { - errmsgno(EX_BAD, "Cannot do inquiry for CD/DVD/BD-Recorder.\n"); + errmsgno(EX_BAD, _("Cannot do inquiry for CD/DVD/BD-Recorder.\n")); if (unit_ready(scgp)) - errmsgno(EX_BAD, "The unit seems to be hung and needs power cycling.\n"); + errmsgno(EX_BAD, _("The unit seems to be hung and needs power cycling.\n")); exit(EX_BAD); } @@ -639,9 +736,9 @@ print_performance_mmc(scgp); print_capabilities_mmc4(scgp); if (get_curprofile(scgp) >= 0) { - printf("\nSupported profiles according to MMC-4 feature list:\n"); + printf(_("\nSupported profiles according to MMC-4 feature list:\n")); print_profiles(scgp); - printf("\nSupported features according to MMC-4 feature list:\n"); + printf(_("\nSupported features according to MMC-4 feature list:\n")); print_features(scgp); } exit(0); @@ -649,16 +746,21 @@ if ((flags & F_INQUIRY) != 0) exit(0); + /* + * Here we start to use drive specific commands and not generic SCSI + * anymore. We first get the drive specific driver via get_cdrcmds(). + */ + if (dp == (cdr_t *)NULL) { /* No driver= option specified */ dp = get_cdrcmds(scgp); /* Calls dp->cdr_identify() */ } else if (!is_unknown_dev(scgp) && dp != get_cdrcmds(scgp)) { - errmsgno(EX_BAD, "WARNING: Trying to use other driver on known device.\n"); + errmsgno(EX_BAD, _("WARNING: Trying to use other driver on known device.\n")); } if (!is_cddrive(scgp)) - comerrno(EX_BAD, "Sorry, no CD/DVD/BD-Drive found on this target.\n"); + comerrno(EX_BAD, _("Sorry, no CD/DVD/BD-Drive found on this target.\n")); if (dp == (cdr_t *)0) - comerrno(EX_BAD, "Sorry, no supported CD/DVD/BD-Recorder found on this target.\n"); + comerrno(EX_BAD, _("Sorry, no supported CD/DVD/BD-Recorder found on this target.\n")); /* * The driver is known, set up data structures... */ @@ -669,58 +771,49 @@ ndp = malloc(sizeof (cdr_t)); dsp = malloc(sizeof (dstat_t)); if (ndp == NULL || dsp == NULL) - comerr("Cannot allocate memory for driver structure.\n"); + comerr(_("Cannot allocate memory for driver structure.\n")); movebytes(dp, ndp, sizeof (cdr_t)); dp = ndp; dp->cdr_flags |= CDR_ALLOC; dp->cdr_cmdflags = flags; fillbytes(dsp, sizeof (*dsp), '\0'); + dsp->ds_trackp = track; dsp->ds_minbuf = 0xFFFF; dsp->ds_layer_break = -1; dp->cdr_dstat = dsp; } + /* + * Reduce buffer size for older non-MMC drives. + * The Philips CDD-521 is known not to work with a DMA size > 63 kB. + */ + if (!is_mmc(scgp, NULL, NULL) && bufsize > CDR_OLD_BUF_SIZE) + bufsize = CDR_OLD_BUF_SIZE; + if ((flags & (F_MSINFO|F_TOC|F_LOAD|F_DLCK|F_EJECT)) == 0 || tracks > 0 || cuefilename != NULL) { - BOOL is_cdwr = FALSE; - BOOL is_dvdwr = FALSE; if ((dp->cdr_flags & CDR_ISREADER) != 0) { errmsgno(EX_BAD, - "Sorry, no CD/DVD/BD-Recorder or unsupported CD/DVD/BD-Recorder found on this target.\n"); + _("Sorry, no CD/DVD/BD-Recorder or unsupported CD/DVD/BD-Recorder found on this target.\n")); + comexit(EX_BAD); } - if (!is_mmc(scgp, &is_cdwr, &is_dvdwr)) - is_cdwr = TRUE; /* If it is not MMC, it must be a CD writer */ - - if (is_dvdwr && !set_cdrcmds("mmc_dvd", (cdr_t **)NULL)) { - errmsgno(EX_BAD, - "This version of cdrecord does not include DVD-R/DVD-RW support code.\n"); - errmsgno(EX_BAD, - "If you need DVD-R/DVD-RW support, ask the Author for cdrecord-ProDVD.\n"); - errmsgno(EX_BAD, - "Free test versions and free keys for personal use are at ftp://ftp.berlios.de/pub/cdrecord/ProDVD/\n"); - } - /* - * Only exit if this is not the ProDVD test binary. - */ - if (!is_cdwr) - exit(EX_BAD); } /* * Set up data structures for current drive state. */ if ((*dp->cdr_attach)(scgp, dp) != 0) - comerrno(EX_BAD, "Cannot attach driver for CD/DVD/BD-Recorder.\n"); + comerrno(EX_BAD, _("Cannot attach driver for CD/DVD/BD-Recorder.\n")); if (lverbose > 1) { - printf("Drive current speed: %d\n", dp->cdr_dstat->ds_dr_cur_wspeed); - printf("Drive default speed: %d\n", dp->cdr_speeddef); - printf("Drive max speed : %d\n", dp->cdr_speedmax); + printf(_("Drive current speed: %d\n"), dp->cdr_dstat->ds_dr_cur_wspeed); + printf(_("Drive default speed: %d\n"), dp->cdr_speeddef); + printf(_("Drive max speed : %d\n"), dp->cdr_speedmax); } if (speed > (int)dp->cdr_speedmax && (flags & F_FORCE) == 0) speed = dp->cdr_speedmax; @@ -728,7 +821,7 @@ speed = dp->cdr_speeddef; if (lverbose > 1) { - printf("Selected speed : %d\n", speed); + printf(_("Selected speed : %d\n"), speed); } dp->cdr_dstat->ds_wspeed = speed; /* XXX Remove 'speed' in future */ @@ -738,7 +831,7 @@ exargs.flags = flags; if ((flags & F_MSINFO) == 0 || lverbose) { - printf("Using %s (%s).\n", dp->cdr_drtext, dp->cdr_drname); + printf(_("Using %s (%s).\n"), dp->cdr_drtext, dp->cdr_drname); print_drflags(dp); print_wrmodes(dp); } @@ -749,32 +842,35 @@ tsize = -1; (*dp->cdr_buffer_cap)(scgp, &tsize, (long *)0); + fillbytes(buf, 4, '\0'); if (read_buffer(scgp, buf, 4, 0) >= 0 && scg_getresid(scgp) == 0) { - physbufsize = a_to_u_4_byte(buf); + physbufsize = a_to_u_3_byte(&buf[1]); } if (tsize > 0) { - printf("Drive buf size : %lu = %lu KB\n", + printf(_("Drive buf size : %lu = %lu KB\n"), tsize, tsize >> 10); } if (physbufsize > 0 && physbufsize != tsize) { - printf("Drive pbuf size: %lu = %lu KB\n", + printf(_("Drive pbuf size: %lu = %lu KB\n"), physbufsize, physbufsize >> 10); } } scgp->silent--; dma_speed = get_dmaspeed(scgp, dp); + if (dma_speed <= 0) + errmsgno(EX_BAD, _("Warning: The DMA speed test has been skipped.\n")); if ((debug || lverbose) && dma_speed > 0) { /* * We do not yet know what medium type is in... */ - printf("Drive DMA Speed: %d kB/s %dx CD %dx DVD %dx BD\n", + printf(_("Drive DMA Speed: %d kB/s %dx CD %dx DVD %dx BD\n"), dma_speed, dma_speed/176, dma_speed/1385, dma_speed/4495); } if ((tracks > 0 || cuefilename != NULL) && (debug || lverbose)) - printf("FIFO size : %lu = %lu KB\n", fs, fs >> 10); + printf(_("FIFO size : %lu = %lu KB\n"), fs, fs >> 10); #ifdef HAVE_LIB_EDC_ECC if ((flags & F_RAW) != 0 && (dp->cdr_dstat->ds_flags & DSF_NOCD) == 0) @@ -791,7 +887,7 @@ if (flags & F_MULTI) { if ((dp->cdr_flags & CDR_PACKET) == 0) { comerrno(EX_BAD, - "Drive does not support packet writing (needed for -multi).\n"); + _("Drive does not support packet writing (needed for -multi).\n")); } /* flags &= F_TAO;*/ flags |= F_SAO; @@ -830,13 +926,14 @@ tracks = track[0].tracks; } else { opentracks(track); + tracks = track[0].tracks; } if (tracks > 1) sleep(2); /* Let the user watch the inquiry messages */ if (tracks > 0 && !check_wrmode(dp, flags, track[1].flags)) - comerrno(EX_BAD, "Illegal write mode for this drive.\n"); + comerrno(EX_BAD, _("Illegal write mode for this drive.\n")); if ((track[0].flags & TI_TEXT) == 0 && /* CD-Text not yet processed */ (track[MAX_TRACK+1].flags & TI_TEXT) != 0) { @@ -910,7 +1007,7 @@ if (exargs.old_secsize < 0) exargs.old_secsize = sense_secsize(scgp, 0); if (debug) - printf("Current Secsize: %d\n", exargs.old_secsize); + printf(_("Current Secsize: %d\n"), exargs.old_secsize); scgp->silent++; if (read_capacity(scgp) < 0) { if (exargs.old_secsize > 0) @@ -920,11 +1017,11 @@ if (exargs.old_secsize < 0) exargs.old_secsize = scgp->cap->c_bsize; if (exargs.old_secsize != scgp->cap->c_bsize) - errmsgno(EX_BAD, "Warning: blockdesc secsize %d differs from cap secsize %d\n", + errmsgno(EX_BAD, _("Warning: blockdesc secsize %d differs from cap secsize %d.\n"), exargs.old_secsize, scgp->cap->c_bsize); if (lverbose) - printf("Current Secsize: %d\n", exargs.old_secsize); + printf(_("Current Secsize: %d\n"), exargs.old_secsize); if (exargs.old_secsize > 0 && exargs.old_secsize != DATA_SEC_SIZE) { /* @@ -959,13 +1056,15 @@ dp->cdr_dstat->ds_cdrflags |= RF_WR_WAIT; } if ((*dp->cdr_getdisktype)(scgp, dp) < 0) { - errmsgno(EX_BAD, "Cannot get disk type.\n"); + errmsgno(EX_BAD, _("Cannot get disk type.\n")); if ((flags & F_FORCE) == 0) comexit(EX_BAD); } if (flags & F_PRATIP) { comexit(0); } + if (cuefilename != 0 && (dp->cdr_dstat->ds_flags & DSF_NOCD) != 0) + comerrno(EX_BAD, _("Wrong media, the cuefile= option only works with CDs.\n")); /* * The next actions should depend on the disk type. */ @@ -1002,7 +1101,7 @@ /* END CSTYLED */ scgp->silent++; if ((*dp->cdr_init)(scgp, dp) < 0) - comerrno(EX_BAD, "Cannot init drive.\n"); + comerrno(EX_BAD, _("Cannot init drive.\n")); scgp->silent--; if (flags & F_SETDROPTS) { @@ -1011,14 +1110,14 @@ * drive option processing for speed related drive options. */ if ((*dp->cdr_opt1)(scgp, dp) < 0) { - errmsgno(EX_BAD, "Cannot set up 1st set of driver options.\n"); + errmsgno(EX_BAD, _("Cannot set up 1st set of driver options.\n")); } if ((*dp->cdr_set_speed_dummy)(scgp, dp, &speed) < 0) { - errmsgno(EX_BAD, "Cannot set speed/dummy.\n"); + errmsgno(EX_BAD, _("Cannot set speed/dummy.\n")); } dp->cdr_dstat->ds_wspeed = speed; /* XXX Remove 'speed' in future */ if ((*dp->cdr_opt2)(scgp, dp) < 0) { - errmsgno(EX_BAD, "Cannot set up 2nd set of driver options.\n"); + errmsgno(EX_BAD, _("Cannot set up 2nd set of driver options.\n")); } comexit(0); } @@ -1043,8 +1142,8 @@ dp->cdr_dstat->ds_wrmode = WM_FORMAT; if (lverbose) { - printf("Format was %sneeded.\n", - (dp->cdr_dstat->ds_flags & DSF_NEED_FORMAT) ? "" : "not "); + printf(_("Format was %sneeded.\n"), + (dp->cdr_dstat->ds_flags & DSF_NEED_FORMAT) ? "" : _("not ")); } /* * XXX Sollte hier (*dp->cdr_set_speed_dummy)() hin? @@ -1059,22 +1158,34 @@ wait_unit_ready(scgp, 120); if (gettimeofday(&starttime, (struct timezone *)0) < 0) - errmsg("Cannot get start time\n"); + errmsg(_("Cannot get start time.\n")); if ((*dp->cdr_format)(scgp, dp, 0) < 0) { - errmsgno(EX_BAD, "Cannot format medium.\n"); + errmsgno(EX_BAD, _("Cannot format medium.\n")); comexit(EX_BAD); } if (gettimeofday(&fixtime, (struct timezone *)0) < 0) - errmsg("Cannot get format time\n"); + errmsg(_("Cannot get format time.\n")); if (lverbose) - prtimediff("Formatting time: ", &starttime, &fixtime); + prtimediff(_("Formatting time: "), &starttime, &fixtime); if (!wait_unit_ready(scgp, 240) || tracks == 0) { comexit(0); } dp->cdr_dstat->ds_wrmode = omode; + + if (tracks > 0) { + int cdrflags = dp->cdr_dstat->ds_cdrflags; + + dp->cdr_dstat->ds_cdrflags &= ~RF_PRATIP; + if ((*dp->cdr_getdisktype)(scgp, dp) < 0) { + errmsgno(EX_BAD, _("Cannot get disk type.\n")); + if ((flags & F_FORCE) == 0) + comexit(EX_BAD); + } + dp->cdr_dstat->ds_cdrflags = cdrflags; + } } #ifdef XXX @@ -1086,49 +1197,75 @@ Int32_t omb = dp->cdr_dstat->ds_maxblocks; if ((*dp->cdr_opt1)(scgp, dp) < 0) { - errmsgno(EX_BAD, "Cannot set up 1st set of driver options.\n"); + errmsgno(EX_BAD, _("Cannot set up 1st set of driver options.\n")); } if (tsize > 0 && omb != dp->cdr_dstat->ds_maxblocks) { - printf("Disk size changed by user options.\n"); - printf("Checking disk capacity according to new values.\n"); + printf(_("Disk size changed by user options.\n")); + printf(_("Checking disk capacity according to new values.\n")); } } if (tsize == 0) { if (tracks > 0) { errmsgno(EX_BAD, - "WARNING: Total disk size unknown. Data may not fit on disk.\n"); + _("WARNING: Total disk size unknown. Data may not fit on disk.\n")); } } else if (tracks > 0) { /* * XXX How do we let the user check the remaining * XXX disk size witout starting the write process? */ - if (!checkdsize(scgp, dp, tsize, flags)) + if (((flags & F_BLANK) == 0) && + !checkdsize(scgp, dp, tsize, flags)) comexit(EX_BAD); } - if (tracks > 0 && fs > 0l) { + if (tracks > 0 && fs > 0L) { #if defined(USE_POSIX_PRIORITY_SCHEDULING) && defined(HAVE_SETREUID) /* * Hack to work around the POSIX design bug in real time * priority handling: we need to be root even to lower * our priority. * Note that we need to find a more general way that works - * even on OS that do not support getreuid() which is *BSD + * even on OS that do not support setreuid() which is *BSD * and SUSv3 only. */ if (oeuid != getuid()) { if (setreuid(-1, oeuid) < 0) - errmsg("Could set back effective uid.\n"); + errmsg(_("Could set back effective uid.\n")); } #endif /* + * Hack to support DVD+R/DL and the firmware problems + * for BD-R found in the Lite-ON BD B LH-2B1S/AL09 + */ + if (get_mediatype(scgp) >= MT_DVD) { + int bls = get_blf(get_mediatype(scgp)); + long nbs; + + bls *= 2048; /* Count in bytes */ + nbs = bufsize / bls * bls; + if (nbs == 0) { + for (nbs = bls; nbs > 2048; nbs /= 2) + if (nbs <= bufsize) + break; + } + if (nbs != bufsize) { + if (lverbose) { + printf( + _("Reducing transfer size from %ld to %ld bytes.\n"), + bufsize, nbs); + } + bufsize = nbs; + set_trsizes(dp, tracks, track); + } + } + /* * fork() here to start the extra process needed for * improved buffering. */ if (!init_faio(track, bufsize)) fs = 0L; else - on_comerr(excdr, &exargs); + on_comerr(excdr, &exargs); /* Will be called first */ #if defined(USE_POSIX_PRIORITY_SCHEDULING) && defined(HAVE_SETREUID) /* @@ -1137,12 +1274,12 @@ if (geteuid() != getuid()) { /* AIX does not like to do this */ /* If we are not root */ if (setreuid(-1, getuid()) < 0) - comerr("Panic cannot set back effective uid.\n"); + comerr(_("Panic cannot set back effective uid.\n")); } #endif } if ((*dp->cdr_set_speed_dummy)(scgp, dp, &speed) < 0) { - errmsgno(EX_BAD, "Cannot set speed/dummy.\n"); + errmsgno(EX_BAD, _("Cannot set speed/dummy.\n")); if ((flags & F_FORCE) == 0) comexit(EX_BAD); } @@ -1150,8 +1287,11 @@ if ((flags & F_WRITE) != 0 && raw_speed >= 0) { int max_raw = (flags & F_FORCE) != 0 ? raw_speed:raw_speed/2; - if (getenv("CDR_FORCERAWSPEED")) + if (getenv("CDR_FORCERAWSPEED")) { + errmsgno(EX_BAD, + _("WARNING: 'CDR_FORCERAWSPEED=' is set, buffer underruns may occur.\n")); max_raw = raw_speed; + } for (i = 1; i <= MAX_TRACK; i++) { /* @@ -1167,9 +1307,9 @@ if (speed > max_raw) { errmsgno(EX_BAD, - "Processor too slow. Cannot write RAW data at speed %d.\n", + _("Processor too slow. Cannot write RAW data at speed %d.\n"), speed); - comerrno(EX_BAD, "Max RAW data speed on this processor is %d.\n", + comerrno(EX_BAD, _("Max RAW data speed on this processor is %d.\n"), max_raw); } break; @@ -1177,24 +1317,33 @@ } if (tracks > 0 && (flags & F_WRITE) != 0 && dma_speed > 0) { int max_dma = (flags & F_FORCE) != 0 ? dma_speed:(dma_speed+1)*4/5; + char *p = NULL; - if (getenv("CDR_FORCESPEED")) + if ((p = getenv("CDR_FORCESPEED")) != NULL) { + if ((dp->cdr_dstat->ds_cdrflags & RF_BURNFREE) == 0) { + errmsgno(EX_BAD, + _("WARNING: 'CDR_FORCESPEED=' is set.\n")); + errmsgno(EX_BAD, + _("WARNING: Use 'driveropts=burnfree' to avoid buffer underuns.\n")); + } max_dma = dma_speed; + } if (speed > max_dma) { errmsgno(EX_BAD, - "DMA speed too slow (OK for %dx). Cannot write at speed %dx.\n", + _("DMA speed too slow (OK for %dx). Cannot write at speed %dx.\n"), max_dma, speed); if ((dp->cdr_dstat->ds_cdrflags & RF_BURNFREE) == 0) { - errmsgno(EX_BAD, "Max DMA data speed is %d.\n", max_dma); - comerrno(EX_BAD, "Try to use 'driveropts=burnfree'.\n"); + errmsgno(EX_BAD, _("Max DMA data speed is %d.\n"), max_dma); + if (p == NULL || !streql(p, "any")) + comerrno(EX_BAD, _("Try to use 'driveropts=burnfree'.\n")); } } } if ((flags & (F_WRITE|F_BLANK)) != 0 && (dp->cdr_dstat->ds_flags & DSF_ERA) != 0) { if (xdebug) { - printf("Current speed %d, medium low speed: %d medium high speed: %d\n", + printf(_("Current speed %d, medium low speed: %d medium high speed: %d\n"), speed, dp->cdr_dstat->ds_at_min_speed, dp->cdr_dstat->ds_at_max_speed); @@ -1209,10 +1358,10 @@ */ if ((flags & F_FORCE) == 0) { errmsgno(EX_BAD, - "Write speed %d of medium not sufficient for this writer.\n", + _("Write speed %d of medium not sufficient for this writer.\n"), dp->cdr_dstat->ds_at_max_speed); comerrno(EX_BAD, - "You may have used an ultra low speed medium on a high speed writer.\n"); + _("You may have used an ultra low speed medium on a high speed writer.\n")); } } @@ -1221,20 +1370,20 @@ if ((dp->cdr_cdrw_support & CDR_CDRW_ULTRAP) == 0) { comerrno(EX_BAD, /* CSTYLED */ - "Trying to use ultra high speed+ medium on a writer which is not\ncompatible with ultra high speed+ media.\n"); + _("Trying to use ultra high speed+ medium on a writer which is not\ncompatible with ultra high speed+ media.\n")); } else if ((flags & F_FORCE) == 0) { comerrno(EX_BAD, - "Probably trying to use ultra high speed+ medium on improper writer.\n"); + _("Probably trying to use ultra high speed+ medium on improper writer.\n")); } } else if ((dp->cdr_dstat->ds_flags & DSF_ULTRASP_ERA) != 0 && - (speed < 16 || (dp->cdr_cdrw_support & CDR_CDRW_ULTRA) == 0)) { + (speed < 10 || (dp->cdr_cdrw_support & CDR_CDRW_ULTRA) == 0)) { if ((dp->cdr_cdrw_support & CDR_CDRW_ULTRA) == 0) { comerrno(EX_BAD, /* CSTYLED */ - "Trying to use ultra high speed medium on a writer which is not\ncompatible with ultra high speed media.\n"); + _("Trying to use ultra high speed medium on a writer which is not\ncompatible with ultra high speed media.\n")); } else if ((flags & F_FORCE) == 0) { comerrno(EX_BAD, - "Probably trying to use ultra high speed medium on improper writer.\n"); + _("Probably trying to use ultra high speed medium on improper writer.\n")); } } if (dp->cdr_dstat->ds_at_min_speed >= 4 && @@ -1242,25 +1391,28 @@ dp->cdr_dstat->ds_dr_max_wspeed <= 4) { if ((flags & F_FORCE) == 0) { comerrno(EX_BAD, - "Trying to use high speed medium on low speed writer.\n"); + _("Trying to use high speed medium on low speed writer.\n")); } } if ((int)dp->cdr_dstat->ds_at_min_speed > speed) { if ((flags & F_FORCE) == 0) { errmsgno(EX_BAD, - "Write speed %d of writer not sufficient for this medium.\n", + _("Write speed %d of writer not sufficient for this medium.\n"), speed); errmsgno(EX_BAD, - "You did use a %s speed medium on an improper writer or\n", + _("You did use a %s speed medium on an improper writer or\n"), dp->cdr_dstat->ds_flags & DSF_ULTRASP_ERA ? "ultra high": "high"); comerrno(EX_BAD, - "you used a speed=# option with a speed too low for this medium.\n"); + _("you used a speed=# option with a speed too low for this medium.\n")); } } } if ((flags & (F_BLANK|F_FORCE)) == (F_BLANK|F_FORCE)) { - printf("Waiting for drive to calm down.\n"); + /* + * This is a first "blind" blanking attempt. + */ + printf(_("Waiting for drive to calm down.\n")); wait_unit_ready(scgp, 120); if (gracewait(dp, &gracedone) < 0) { /* @@ -1282,7 +1434,7 @@ errs++; goto restore_it; } - if (tracks > 0 && fs > 0l) { + if (tracks > 0 && fs > 0L) { /* * Wait for the read-buffer to become full. * This should be take no extra time if the input is a file. @@ -1291,7 +1443,7 @@ * we abort before the writing process started. */ if (!await_faio()) { - comerrno(EX_BAD, "Input buffer error, aborting.\n"); + comerrno(EX_BAD, _("Input buffer error, aborting.\n")); } } wait_unit_ready(scgp, 120); @@ -1301,7 +1453,7 @@ stoptime.tv_sec = 0; fixtime.tv_sec = 0; if (gettimeofday(&starttime, (struct timezone *)0) < 0) - errmsg("Cannot get start time\n"); + errmsg(_("Cannot get start time.\n")); /* * Blank the media if we were requested to do so @@ -1320,20 +1472,20 @@ scgp->silent--; wait_unit_ready(scgp, 120); if (gettimeofday(&starttime, (struct timezone *)0) < 0) - errmsg("Cannot get start time\n"); + errmsg(_("Cannot get start time.\n")); if ((*dp->cdr_blank)(scgp, dp, 0L, blanktype) < 0) { - errmsgno(EX_BAD, "Cannot blank disk, aborting.\n"); + errmsgno(EX_BAD, _("Cannot blank disk, aborting.\n")); if (blanktype != BLANK_DISC) { - errmsgno(EX_BAD, "Some drives do not support all blank types.\n"); - errmsgno(EX_BAD, "Try again with cdrecord blank=all.\n"); + errmsgno(EX_BAD, _("Some drives do not support all blank types.\n")); + errmsgno(EX_BAD, _("Try again with cdrecord blank=all.\n")); } comexit(EX_BAD); } if (gettimeofday(&fixtime, (struct timezone *)0) < 0) - errmsg("Cannot get blank time\n"); + errmsg(_("Cannot get blank time.\n")); if (lverbose) - prtimediff("Blanking time: ", &starttime, &fixtime); + prtimediff(_("Blanking time: "), &starttime, &fixtime); /* * XXX Erst blank und dann format? @@ -1342,15 +1494,29 @@ if (!wait_unit_ready(scgp, 240) || tracks == 0) { comexit(0); } + if (tracks > 0) { + int cdrflags = dp->cdr_dstat->ds_cdrflags; + + dp->cdr_dstat->ds_cdrflags &= ~RF_PRATIP; + if ((*dp->cdr_getdisktype)(scgp, dp) < 0) { + errmsgno(EX_BAD, _("Cannot get disk type.\n")); + if ((flags & F_FORCE) == 0) + comexit(EX_BAD); + } + if (!checkdsize(scgp, dp, tsize, flags)) + comexit(EX_BAD); + + dp->cdr_dstat->ds_cdrflags = cdrflags; + } /* * Reset start time so we will not see blanking time and * writing time counted together. */ if (gettimeofday(&starttime, (struct timezone *)0) < 0) - errmsg("Cannot get start time\n"); + errmsg(_("Cannot get start time.\n")); } if (tracks == 0 && (flags & F_FIX) == 0) - comerrno(EX_BAD, "No tracks found.\n"); + comerrno(EX_BAD, _("No tracks found.\n")); /* * Get the number of last recorded track by reading the CD TOC. @@ -1367,7 +1533,7 @@ /* * XXX How many tracks are allowed on a DVD -> 1024 */ - comerrno(EX_BAD, "Too many tracks for this disk, last track number is %d.\n", + comerrno(EX_BAD, _("Too many tracks for this disk, last track number is %d.\n"), tracks + trackno); } @@ -1383,7 +1549,7 @@ } if ((*dp->cdr_opt2)(scgp, dp) < 0) { - errmsgno(EX_BAD, "Cannot set up 2nd set of driver options.\n"); + errmsgno(EX_BAD, _("Cannot set up 2nd set of driver options.\n")); } /* @@ -1391,7 +1557,7 @@ * XXX Check total size of the tracks and remaining size of disk. */ if ((*dp->cdr_open_session)(scgp, dp, track) < 0) { - comerrno(EX_BAD, "Cannot open new session.\n"); + comerrno(EX_BAD, _("Cannot open new session.\n")); } if (!do_opc(scgp, dp, flags)) comexit(EX_BAD); @@ -1410,22 +1576,28 @@ * This call may modify trackp[i].trackstart for all tracks. */ if ((*dp->cdr_write_leadin)(scgp, dp, track) < 0) - comerrno(EX_BAD, "Could not write Lead-in.\n"); + comerrno(EX_BAD, _("Could not write Lead-in.\n")); if (lverbose && (dp->cdr_dstat->ds_cdrflags & RF_LEADIN) != 0) { if (gettimeofday(&fixtime, (struct timezone *)0) < 0) - errmsg("Cannot get lead-in write time\n"); - prtimediff("Lead-in write time: ", &starttime, &fixtime); + errmsg(_("Cannot get lead-in write time.\n")); + prtimediff(_("Lead-in write time: "), &starttime, &fixtime); } if (gettimeofday(&wstarttime, (struct timezone *)0) < 0) - errmsg("Cannot get start time\n"); + errmsg(_("Cannot get start time.\n")); for (i = 1; i <= tracks; i++) { startsec = 0L; if ((*dp->cdr_open_track)(scgp, dp, &track[i]) < 0) { - errmsgno(EX_BAD, "Cannot open next track.\n"); + errmsgno(EX_BAD, _("Cannot open next track.\n")); + /* + * XXX We should try to avoid to fixate unwritten media + * XXX e.g. when opening track 1 fails, but then we + * XXX would need to keep track of whether the media + * XXX was written yet. This could be done in *dp. + */ errs++; break; } @@ -1436,9 +1608,10 @@ * Definitely get next writable address it in case of multi session. */ if ((flags & (F_SAO|F_RAW)) == 0 || - (flags & F_MULTI) != 0) { + ((dp->cdr_dstat->ds_flags & DSF_DVD) && + (flags & F_MULTI) != 0)) { if ((*dp->cdr_next_wr_address)(scgp, &track[i], &startsec) < 0) { - errmsgno(EX_BAD, "Cannot get next writable address.\n"); + errmsgno(EX_BAD, _("Cannot get next writable address.\n")); errs++; break; } @@ -1446,31 +1619,31 @@ } if (debug || lverbose) { if (track[i].trackno != track[i-1].trackno) - printf("Starting new track at sector: %ld\n", + printf(_("Starting new track at sector: %ld\n"), track[i].trackstart); else - printf("Continuing track at sector: %ld\n", + printf(_("Continuing track at sector: %ld\n"), track[i].trackstart); flush(); } if (write_track_data(scgp, dp, &track[i]) < 0) { if (cdr_underrun(scgp)) { errmsgno(EX_BAD, - "The current problem looks like a buffer underrun.\n"); + _("The current problem looks like a buffer underrun.\n")); if ((dp->cdr_dstat->ds_cdrflags & RF_BURNFREE) == 0) errmsgno(EX_BAD, - "Try to use 'driveropts=burnfree'.\n"); + _("Try to use 'driveropts=burnfree'.\n")); else { errmsgno(EX_BAD, - "It looks like 'driveropts=burnfree' does not work for this drive.\n"); - errmsgno(EX_BAD, "Please report.\n"); + _("It looks like 'driveropts=burnfree' does not work for this drive.\n")); + errmsgno(EX_BAD, _("Please report.\n")); } errmsgno(EX_BAD, - "Make sure that you are root, enable DMA and check your HW/OS set up.\n"); + _("Make sure that you are root, enable DMA and check your HW/OS set up.\n")); } else { - errmsgno(EX_BAD, "A write error occured.\n"); - errmsgno(EX_BAD, "Please properly read the error message above.\n"); + errmsgno(EX_BAD, _("A write error occured.\n")); + errmsgno(EX_BAD, _("Please properly read the error message above.\n")); } errs++; sleep(5); @@ -1484,7 +1657,7 @@ */ if (scg_sense_key(scgp) != SC_ILLEGAL_REQUEST || scg_sense_code(scgp) != 0xB5) { - errmsgno(EX_BAD, "Cannot close track.\n"); + errmsgno(EX_BAD, _("Cannot close track.\n")); errs++; break; } @@ -1492,19 +1665,19 @@ } fix_it: if (gettimeofday(&stoptime, (struct timezone *)0) < 0) - errmsg("Cannot get stop time\n"); + errmsg(_("Cannot get stop time.\n")); cdrstats(dp); if (flags & F_RAW) { if (lverbose) { - printf("Writing Leadout...\n"); + printf(_("Writing Leadout...\n")); flush(); } write_leadout(scgp, dp, track); } if ((flags & F_NOFIX) == 0) { if (lverbose) { - printf("Fixating...\n"); + printf(_("Fixating...\n")); flush(); } if ((*dp->cdr_fixate)(scgp, dp, track) < 0) { @@ -1512,14 +1685,14 @@ * Ignore fixating errors in dummy mode. */ if ((flags & F_DUMMY) == 0) { - errmsgno(EX_BAD, "Cannot fixate disk.\n"); + errmsgno(EX_BAD, _("Cannot fixate disk.\n")); errs++; } } if (gettimeofday(&fixtime, (struct timezone *)0) < 0) - errmsg("Cannot get fix time\n"); + errmsg(_("Cannot get fix time.\n")); if (lverbose) - prtimediff("Fixating time: ", &stoptime, &fixtime); + prtimediff(_("Fixating time: "), &stoptime, &fixtime); } if ((dp->cdr_dstat->ds_cdrflags & RF_DID_CDRSTAT) == 0) { dp->cdr_dstat->ds_cdrflags |= RF_DID_CDRSTAT; @@ -1552,10 +1725,10 @@ scg_openerr(errstr) char *errstr; { - errmsg("%s%sCannot open or use SCSI driver.\n", errstr, errstr[0]?". ":""); - errmsgno(EX_BAD, "For possible targets try 'cdrecord -scanbus'.%s\n", - geteuid() ? " Make sure you are root.":""); - errmsgno(EX_BAD, "For possible transport specifiers try 'cdrecord dev=help'.\n"); + errmsg(_("%s%sCannot open or use SCSI driver.\n"), errstr, errstr[0]?". ":""); + errmsgno(EX_BAD, _("For possible targets try 'cdrecord -scanbus'.%s\n"), + geteuid() ? _(" Make sure you are root."):""); + errmsgno(EX_BAD, _("For possible transport specifiers try 'cdrecord dev=help'.\n")); exit(EX_BAD); } @@ -1568,7 +1741,7 @@ int ntarget; if ((flags & F_MSINFO) == 0) - error("No target specified, trying to find one...\n"); + error(_("No target specified, trying to find one...\n")); ntarget = find_target(scgp, INQ_ROMD, -1); if (ntarget < 0) return (ntarget); @@ -1586,17 +1759,17 @@ /* * No single CD-ROM or WORM found. */ - errmsgno(EX_BAD, "No CD/DVD/BD-Recorder target found.\n"); - errmsgno(EX_BAD, "Your platform may not allow to scan for SCSI devices.\n"); - comerrno(EX_BAD, "Call 'cdrecord dev=help' or ask your sysadmin for possible targets.\n"); + errmsgno(EX_BAD, _("No CD/DVD/BD-Recorder target found.\n")); + errmsgno(EX_BAD, _("Your platform may not allow to scan for SCSI devices.\n")); + comerrno(EX_BAD, _("Call 'cdrecord dev=help' or ask your sysadmin for possible targets.\n")); } else { - errmsgno(EX_BAD, "Too many CD/DVD/BD-Recorder targets found.\n"); + errmsgno(EX_BAD, _("Too many CD/DVD/BD-Recorder targets found.\n")); select_target(scgp, stdout); - comerrno(EX_BAD, "Select a target from the list above and use 'cdrecord dev=%s%sb,t,l'.\n", + comerrno(EX_BAD, _("Select a target from the list above and use 'cdrecord dev=%s%sb,t,l'.\n"), dev?dev:"", dev?(dev[strlen(dev)-1] == ':'?"":":"):""); } if ((flags & F_MSINFO) == 0) - error("Using dev=%s%s%d,%d,%d.\n", + error(_("Using dev=%s%s%d,%d,%d.\n"), dev?dev:"", dev?(dev[strlen(dev)-1] == ':'?"":":"):"", scg_scsibus(scgp), scg_target(scgp), scg_lun(scgp)); @@ -1619,22 +1792,28 @@ if (gracetime > 999) gracetime = 999; - printf("Starting to write CD/DVD/BD at speed %d in %s%s %s mode for %s session.\n", + printf(_("Starting to write CD/DVD/BD at speed %d in %s%s %s mode for %s session.\n"), (int)dp->cdr_dstat->ds_wspeed, - (dp->cdr_cmdflags & F_DUMMY) ? "dummy" : "real", - (dp->cdr_cmdflags & F_FORCE) ? " force" : "", + (dp->cdr_cmdflags & F_DUMMY) ? _("dummy") : _("real"), + (dp->cdr_cmdflags & F_FORCE) ? _(" force") : "", wm2name[dp->cdr_dstat->ds_wrmode], - (dp->cdr_cmdflags & F_MULTI) ? "multi" : "single"); + (dp->cdr_cmdflags & F_MULTI) ? _("multi") : _("single")); if (didgrace) { - printf("No chance to quit anymore."); + printf(_("No chance to quit anymore.")); goto grace_done; } - printf("Last chance to quit, starting %s write in %d seconds.", - (dp->cdr_cmdflags & F_DUMMY)?"dummy":"real", gracetime); + printf(_("Last chance to quit, starting %s write in %d seconds."), + (dp->cdr_cmdflags & F_DUMMY)?_("dummy"):_("real"), gracetime); flush(); +#ifdef SIGINT signal(SIGINT, intr); +#endif +#ifdef SIGHUP signal(SIGHUP, intr); +#endif +#ifdef SIGTERM signal(SIGTERM, intr); +#endif /* * Note to people who like to change this: I am geting patch requests * for an option to reduce the grace_time two times a year. I am not @@ -1647,9 +1826,13 @@ sleep(1); if (didintr) { printf("\n"); +#ifdef SIGINT excdr(SIGINT, &exargs); signal(SIGINT, SIG_DFL); +#ifdef HAVE_KILL kill(getpid(), SIGINT); +#endif +#endif /* * In case kill() did not work ;-) */ @@ -1657,18 +1840,30 @@ *didgracep = FALSE; return (-1); } - printf("\b\b\b\b\b\b\b\b\b\b\b\b\b%4d seconds.", i); + printf(_("\b\b\b\b\b\b\b\b\b\b\b\b\b%4d seconds."), i); flush(); } grace_done: - printf(" Operation starts."); + printf(_(" Operation starts.")); flush(); +#ifdef SIGINT signal(SIGINT, SIG_DFL); +#endif +#ifdef SIGHUP signal(SIGHUP, SIG_DFL); +#endif +#ifdef SIGTERM signal(SIGTERM, SIG_DFL); +#endif +#ifdef SIGINT signal(SIGINT, intfifo); +#endif +#ifdef SIGHUP signal(SIGHUP, intfifo); +#endif +#ifdef SIGTERM signal(SIGTERM, intfifo); +#endif printf("\n"); if (didgracep) @@ -1711,7 +1906,7 @@ tlast = wstarttime; tcur = stoptime; - prtimediff("Writing time: ", &starttime, &stoptime); + prtimediff(_("Writing time: "), &starttime, &stoptime); nsecs = dp->cdr_dstat->ds_endsec - dp->cdr_dstat->ds_startsec; @@ -1738,15 +1933,15 @@ (tlast.tv_sec * 1.0 + tlast.tv_usec * 0.000001); if (fspeed > 999.0) fspeed = 999.0; - printf("Average write speed %5.1fx.\n", fspeed); + printf(_("Average write speed %5.1fx.\n"), fspeed); } if (dp->cdr_dstat->ds_minbuf <= 100) { - printf("Min drive buffer fill was %u%%\n", + printf(_("Min drive buffer fill was %u%%\n"), (unsigned int)dp->cdr_dstat->ds_minbuf); } if (dp->cdr_dstat->ds_buflow > 0) { - printf("Total of %ld possible drive buffer underruns predicted.\n", + printf(_("Total of %ld possible drive buffer underruns predicted.\n"), (long)dp->cdr_dstat->ds_buflow); } } @@ -1758,15 +1953,15 @@ susage(ret) int ret; { - error("Usage: %s [options] track1...trackn\n", get_progname()); - error("\nUse\t%s -help\n", get_progname()); - error("to get a list of valid options.\n"); - error("\nUse\t%s blank=help\n", get_progname()); - error("to get a list of valid blanking options.\n"); - error("\nUse\t%s dev=b,t,l driveropts=help -checkdrive\n", get_progname()); - error("to get a list of drive specific options.\n"); - error("\nUse\t%s dev=help\n", get_progname()); - error("to get a list of possible SCSI transport specifiers.\n"); + error(_("Usage: %s [options] track1...trackn\n"), get_progname()); + error(_("\nUse\t%s -help\n"), get_progname()); + error(_("to get a list of valid options.\n")); + error(_("\nUse\t%s blank=help\n"), get_progname()); + error(_("to get a list of valid blanking options.\n")); + error(_("\nUse\t%s dev=b,t,l driveropts=help -checkdrive\n"), get_progname()); + error(_("to get a list of drive specific options.\n")); + error(_("\nUse\t%s dev=help\n"), get_progname()); + error(_("to get a list of possible SCSI transport specifiers.\n")); exit(ret); /* NOTREACHED */ } @@ -1775,96 +1970,98 @@ usage(excode) int excode; { - error("Usage: %s [options] track1...trackn\n", get_progname()); - error("Options:\n"); - error("\t-version print version information and exit\n"); - error("\tdev=target SCSI target to use as CD/DVD/BD-Recorder\n"); - error("\tgracetime=# set the grace time before starting to write to #.\n"); - error("\ttimeout=# set the default SCSI command timeout to #.\n"); - error("\tdebug=#,-d Set to # or increment misc debug level\n"); - error("\tkdebug=#,kd=# do Kernel debugging\n"); - error("\t-verbose,-v increment general verbose level by one\n"); - error("\t-Verbose,-V increment SCSI command transport verbose level by one\n"); - error("\t-silent,-s do not print status of failed SCSI commands\n"); - error("\tdriver=name user supplied driver name, use with extreme care\n"); - error("\tdriveropts=opt a comma separated list of driver specific options\n"); - error("\t-setdropts set driver specific options and exit\n"); - error("\t-checkdrive check if a driver for the drive is present\n"); - error("\t-prcap print drive capabilities for MMC compliant drives\n"); - error("\t-inq do an inquiry for the drive and exit\n"); - error("\t-scanbus scan the SCSI bus and exit\n"); - error("\t-reset reset the SCSI bus with the cdrecorder (if possible)\n"); - error("\t-abort send an abort sequence to the drive (may help if hung)\n"); - error("\t-overburn allow to write more than the official size of a medium\n"); - error("\t-ignsize ignore the known size of a medium (may cause problems)\n"); - error("\t-useinfo use *.inf files to overwrite audio options.\n"); - error("\tspeed=# set speed of drive\n"); - error("\tblank=type blank a CD-RW disc (see blank=help)\n"); - error("\t-format format a CD-RW/DVD-RW/DVD+RW disc\n"); + error(_("Usage: %s [options] track1...trackn\n"), get_progname()); + error(_("Options:\n")); + error(_("\t-version print version information and exit\n")); + error(_("\tdev=target SCSI target to use as CD/DVD/BD-Recorder\n")); + error(_("\tscgopts=spec SCSI options for libscg\n")); + error(_("\tgracetime=# set the grace time before starting to write to #.\n")); + error(_("\ttimeout=# set the default SCSI command timeout to #.\n")); + error(_("\tdebug=#,-d Set to # or increment misc debug level\n")); + error(_("\tkdebug=#,kd=# do Kernel debugging\n")); + error(_("\t-verbose,-v increment general verbose level by one\n")); + error(_("\t-Verbose,-V increment SCSI command transport verbose level by one\n")); + error(_("\t-silent,-s do not print status of failed SCSI commands\n")); + error(_("\tdriver=name user supplied driver name, use with extreme care\n")); + error(_("\tdriveropts=opt a comma separated list of driver specific options\n")); + error(_("\t-setdropts set driver specific options and exit\n")); + error(_("\t-checkdrive check if a driver for the drive is present\n")); + error(_("\t-prcap print drive capabilities for MMC compliant drives\n")); + error(_("\t-inq do an inquiry for the drive and exit\n")); + error(_("\t-scanbus scan the SCSI bus and exit\n")); + error(_("\t-reset reset the SCSI bus with the cdrecorder (if possible)\n")); + error(_("\t-abort send an abort sequence to the drive (may help if hung)\n")); + error(_("\t-overburn allow to write more than the official size of a medium\n")); + error(_("\t-ignsize ignore the known size of a medium (may cause problems)\n")); + error(_("\t-useinfo use *.inf files to overwrite audio options.\n")); + error(_("\tspeed=# set speed of drive\n")); + error(_("\tblank=type blank a CD-RW disc (see blank=help)\n")); + error(_("\t-format format a CD-RW/DVD-RW/DVD+RW disc\n")); #ifdef FIFO - error("\tfs=# Set fifo size to # (0 to disable, default is %ld MB)\n", + error(_("\tfs=# Set fifo size to # (0 to disable, default is %ld MB)\n"), DEFAULT_FIFOSIZE/(1024L*1024L)); #endif - error("\tts=# set maximum transfer size for a single SCSI command\n"); - error("\t-load load the disk and exit (works only with tray loader)\n"); - error("\t-lock load and lock the disk and exit (works only with tray loader)\n"); - error("\t-eject eject the disk after doing the work\n"); - error("\t-dummy do everything with laser turned off\n"); - error("\t-minfo retrieve and print media information/status\n"); - error("\t-media-info retrieve and print media information/status\n"); - error("\t-msinfo retrieve multi-session info for mkisofs >= 1.10\n"); - error("\t-toc retrieve and print TOC/PMA data\n"); - error("\t-atip retrieve and print ATIP data\n"); - error("\t-multi generate a TOC that allows multi session\n"); - error("\t In this case default track type is CD-ROM XA mode 2 form 1 - 2048 bytes\n"); - error("\t-fix fixate a corrupt or unfixated disk (generate a TOC)\n"); - error("\t-nofix do not fixate disk after writing tracks\n"); - error("\t-waiti wait until input is available before opening SCSI\n"); - error("\t-immed Try to use the SCSI IMMED flag with certain long lasting commands\n"); - error("\t-force force to continue on some errors to allow blanking bad disks\n"); - error("\t-tao Write disk in TAO mode. This option will be replaced in the future.\n"); - error("\t-dao Write disk in SAO mode. This option will be replaced in the future.\n"); - error("\t-sao Write disk in SAO mode. This option will be replaced in the future.\n"); - error("\t-raw Write disk in RAW mode. This option will be replaced in the future.\n"); - error("\t-raw96r Write disk in RAW/RAW96R mode. This option will be replaced in the future.\n"); - error("\t-raw96p Write disk in RAW/RAW96P mode. This option will be replaced in the future.\n"); - error("\t-raw16 Write disk in RAW/RAW16 mode. This option will be replaced in the future.\n"); + error(_("\tts=# set maximum transfer size for a single SCSI command\n")); + error(_("\t-load load the disk and exit (works only with tray loader)\n")); + error(_("\t-lock load and lock the disk and exit (works only with tray loader)\n")); + error(_("\t-eject eject the disk after doing the work\n")); + error(_("\t-dummy do everything with laser turned off\n")); + error(_("\t-minfo retrieve and print media information/status\n")); + error(_("\t-media-info retrieve and print media information/status\n")); + error(_("\t-msinfo retrieve multi-session info for mkisofs >= 1.10\n")); + error(_("\t-toc retrieve and print TOC/PMA data\n")); + error(_("\t-atip retrieve and print ATIP data\n")); + error(_("\t-multi generate a TOC that allows multi session\n")); + error(_("\t In this case default track type is CD-ROM XA mode 2 form 1 - 2048 bytes\n")); + error(_("\t-fix fixate a corrupt or unfixated disk (generate a TOC)\n")); + error(_("\t-nofix do not fixate disk after writing tracks\n")); + error(_("\t-waiti wait until input is available before opening SCSI\n")); + error(_("\t-immed Try to use the SCSI IMMED flag with certain long lasting commands\n")); + error(_("\t-force force to continue on some errors to allow blanking bad disks\n")); + error(_("\t-tao Write disk in TAO mode. This option will be replaced in the future.\n")); + error(_("\t-dao Write disk in SAO mode. This option will be replaced in the future.\n")); + error(_("\t-sao Write disk in SAO mode. This option will be replaced in the future.\n")); + error(_("\t-raw Write disk in RAW mode. This option will be replaced in the future.\n")); + error(_("\t-raw96r Write disk in RAW/RAW96R mode. This option will be replaced in the future.\n")); + error(_("\t-raw96p Write disk in RAW/RAW96P mode. This option will be replaced in the future.\n")); + error(_("\t-raw16 Write disk in RAW/RAW16 mode. This option will be replaced in the future.\n")); #ifdef CLONE_WRITE - error("\t-clone Write disk in clone write mode.\n"); + error(_("\t-clone Write disk in clone write mode.\n")); #endif - error("\ttsize=# Length of valid data in next track\n"); - error("\tpadsize=# Amount of padding for next track\n"); - error("\tpregap=# Amount of pre-gap sectors before next track\n"); - error("\tdefpregap=# Amount of pre-gap sectors for all but track #1\n"); - error("\tmcn=text Set the media catalog number for this CD to 'text'\n"); - error("\tisrc=text Set the ISRC number for the next track to 'text'\n"); - error("\tindex=list Set the index list for the next track to 'list'\n"); - error("\t-text Write CD-Text from information from *.inf or *.cue files\n"); - error("\ttextfile=name Set the file with CD-Text data to 'name'\n"); - error("\tcuefile=name Set the file with CDRWIN CUE data to 'name'\n"); - - error("\t-audio Subsequent tracks are CD-DA audio tracks\n"); - error("\t-data Subsequent tracks are CD-ROM data mode 1 - 2048 bytes (default)\n"); - error("\t-mode2 Subsequent tracks are CD-ROM data mode 2 - 2336 bytes\n"); - error("\t-xa Subsequent tracks are CD-ROM XA mode 2 form 1 - 2048 bytes\n"); - error("\t-xa1 Subsequent tracks are CD-ROM XA mode 2 form 1 - 2056 bytes\n"); - error("\t-xa2 Subsequent tracks are CD-ROM XA mode 2 form 2 - 2324 bytes\n"); - error("\t-xamix Subsequent tracks are CD-ROM XA mode 2 form 1/2 - 2332 bytes\n"); - error("\t-cdi Subsequent tracks are CDI tracks\n"); - error("\t-isosize Use iso9660 file system size for next data track\n"); - error("\t-preemp Audio tracks are mastered with 50/15 µs preemphasis\n"); - error("\t-nopreemp Audio tracks are mastered with no preemphasis (default)\n"); - error("\t-copy Audio tracks have unlimited copy permission\n"); - error("\t-nocopy Audio tracks may only be copied once for personal use (default)\n"); - error("\t-scms Audio tracks will not have any copy permission at all\n"); - error("\t-pad Pad data tracks with %d zeroed sectors\n", PAD_SECS); - error("\t Pad audio tracks to a multiple of %d bytes\n", AUDIO_SEC_SIZE); - error("\t-nopad Do not pad data tracks (default)\n"); - error("\t-shorttrack Subsequent tracks may be non Red Book < 4 seconds if in SAO or RAW mode\n"); - error("\t-noshorttrack Subsequent tracks must be >= 4 seconds\n"); - error("\t-swab Audio data source is byte-swapped (little-endian/Intel)\n"); - error("The type of the first track is used for the toc type.\n"); - error("Currently only form 1 tracks are supported.\n"); + error(_("\ttsize=# Length of valid data in next track\n")); + error(_("\tpadsize=# Amount of padding for next track\n")); + error(_("\tpregap=# Amount of pre-gap sectors before next track\n")); + error(_("\tdefpregap=# Amount of pre-gap sectors for all but track #1\n")); + error(_("\tmcn=text Set the media catalog number for this CD to 'text'\n")); + error(_("\tisrc=text Set the ISRC number for the next track to 'text'\n")); + error(_("\tindex=list Set the index list for the next track to 'list'\n")); + error(_("\t-text Write CD-Text from information from *.inf or *.cue files\n")); + error(_("\ttextfile=name Set the file with CD-Text data to 'name'\n")); + error(_("\tcuefile=name Set the file with CDRWIN CUE data to 'name'\n")); + + error(_("\t-audio Subsequent tracks are CD-DA audio tracks\n")); + error(_("\t-data Subsequent tracks are CD-ROM data mode 1 - 2048 bytes (default)\n")); + error(_("\t-mode2 Subsequent tracks are CD-ROM data mode 2 - 2336 bytes\n")); + error(_("\t-xa Subsequent tracks are CD-ROM XA mode 2 form 1 - 2048 bytes\n")); + error(_("\t-xa1 Subsequent tracks are CD-ROM XA mode 2 form 1 - 2056 bytes\n")); + error(_("\t-xa2 Subsequent tracks are CD-ROM XA mode 2 form 2 - 2324 bytes\n")); + error(_("\t-xamix Subsequent tracks are CD-ROM XA mode 2 form 1/2 - 2332 bytes\n")); + error(_("\t-cdi Subsequent tracks are CDI tracks\n")); + error(_("\t-isosize Use iso9660 file system size for next data track\n")); + /* micro-s */ + error(_("\t-preemp Audio tracks are mastered with 50/15 us preemphasis\n")); + error(_("\t-nopreemp Audio tracks are mastered with no preemphasis (default)\n")); + error(_("\t-copy Audio tracks have unlimited copy permission\n")); + error(_("\t-nocopy Audio tracks may only be copied once for personal use (default)\n")); + error(_("\t-scms Audio tracks will not have any copy permission at all\n")); + error(_("\t-pad Pad data tracks with %d zeroed sectors\n"), PAD_SECS); + error(_("\t Pad audio tracks to a multiple of %d bytes\n"), AUDIO_SEC_SIZE); + error(_("\t-nopad Do not pad data tracks (default)\n")); + error(_("\t-shorttrack Subsequent tracks may be non Red Book < 4 seconds if in SAO or RAW mode\n")); + error(_("\t-noshorttrack Subsequent tracks must be >= 4 seconds\n")); + error(_("\t-swab Audio data source is byte-swapped (little-endian/Intel)\n")); + error(_("The type of the first track is used for the toc type.\n")); + error(_("Currently only form 1 tracks are supported.\n")); exit(excode); } @@ -1872,17 +2069,17 @@ blusage(ret) int ret; { - error("Blanking options:\n"); - error("\tall\t\tblank the entire disk\n"); - error("\tdisc\t\tblank the entire disk\n"); - error("\tdisk\t\tblank the entire disk\n"); - error("\tfast\t\tminimally blank the entire disk (PMA, TOC, pregap)\n"); - error("\tminimal\t\tminimally blank the entire disk (PMA, TOC, pregap)\n"); - error("\ttrack\t\tblank a track\n"); - error("\tunreserve\tunreserve a track\n"); - error("\ttrtail\t\tblank a track tail\n"); - error("\tunclose\t\tunclose last session\n"); - error("\tsession\t\tblank last session\n"); + error(_("Blanking options:\n")); + error(_("\tall\t\tblank the entire disk\n")); + error(_("\tdisc\t\tblank the entire disk\n")); + error(_("\tdisk\t\tblank the entire disk\n")); + error(_("\tfast\t\tminimally blank the entire disk (PMA, TOC, pregap)\n")); + error(_("\tminimal\t\tminimally blank the entire disk (PMA, TOC, pregap)\n")); + error(_("\ttrack\t\tblank a track\n")); + error(_("\tunreserve\tunreserve a track\n")); + error(_("\ttrtail\t\tblank a track tail\n")); + error(_("\tunclose\t\tunclose last session\n")); + error(_("\tsession\t\tblank last session\n")); exit(ret); /* NOTREACHED */ @@ -1895,8 +2092,9 @@ { sig = 0; /* Fake usage for gcc */ +#ifdef SIGINT signal(SIGINT, intr); - +#endif didintr++; } @@ -1904,7 +2102,9 @@ catchsig(sig) int sig; { +#ifdef HAVE_SIGNAL signal(sig, catchsig); +#endif } LOCAL int @@ -1920,13 +2120,13 @@ intfifo(sig) int sig; { - errmsgno(EX_BAD, "Caught interrupt.\n"); + errmsgno(EX_BAD, _("Caught interrupt.\n")); if (exargs.scgp) { SCSI *scgp = exargs.scgp; if (scgp->running) { if (scgp->cb_fun != NULL) { - comerrno(EX_BAD, "Second interrupt. Doing hard abort.\n"); + comerrno(EX_BAD, _("Second interrupt. Doing hard abort.\n")); /* NOTREACHED */ } scgp->cb_fun = scsi_cb; @@ -1937,6 +2137,9 @@ comexit(sig); } +/* + * Restore SCSI drive status. + */ /* ARGSUSED */ LOCAL void exscsi(excode, arg) @@ -1949,6 +2152,9 @@ * Try to restore the old sector size. */ if (exp != NULL && exp->exflags == 0) { + if (exp->scgp == NULL) { /* Closed before */ + return; + } if (exp->scgp->running) { return; } @@ -1966,6 +2172,10 @@ } } +/* + * excdr() is installed last with on_comerr() and thus will be called first. + * We call exscsi() from here to control the order of calls. + */ LOCAL void excdr(excode, arg) int excode; @@ -1973,14 +2183,25 @@ { struct exargs *exp = (struct exargs *)arg; - exscsi(excode, arg); + exscsi(excode, arg); /* Restore/reset drive status */ cdrstats(exp->dp); if ((exp->dp->cdr_dstat->ds_cdrflags & RF_DID_CDRSTAT) == 0) { exp->dp->cdr_dstat->ds_cdrflags |= RF_DID_CDRSTAT; - (*exp->dp->cdr_stats)(exp->scgp, exp->dp); + if (exp->scgp && exp->scgp->running == 0) + (*exp->dp->cdr_stats)(exp->scgp, exp->dp); } + /* + * We no longer need SCSI, close it. + */ +#ifdef SCG_CLOSE_DEBUG + error("scg_close(%p)\n", exp->scgp); +#endif + if (exp->scgp) + scg_close(exp->scgp); + exp->scgp = NULL; + #ifdef FIFO kill_faio(); wait_faio(); @@ -1999,6 +2220,19 @@ int amount = 0; int n; + if (isobsize > 0) { + if (size <= isobsize) { + movebytes(&isobuf[isoboff], bp, size); + isoboff += size; + isobsize -= size; + return (size); + } else { + amount = isobsize; + movebytes(&isobuf[isoboff], bp, isobsize); + isoboff += isobsize; + isobsize = 0; + } + } do { do { n = read(f, p, size-amount); @@ -2162,7 +2396,7 @@ return (amount); } -LOCAL int +EXPORT int write_track_data(scgp, dp, trackp) SCSI *scgp; cdr_t *dp; @@ -2229,16 +2463,16 @@ pad = !isaudio && is_pad(trackp); /* Pad only data tracks */ if (debug) { - printf("secsize:%d secspt:%d bytespt:%d audio:%d pad:%d\n", + printf(_("secsize:%d secspt:%d bytespt:%d audio:%d pad:%d\n"), secsize, secspt, bytespt, isaudio, pad); } if (lverbose) { if (tracksize > 0) - printf("\rTrack %02d: 0 of %4lld MB written.", + printf(_("\rTrack %02d: 0 of %4lld MB written."), track, tracksize >> 20); else - printf("\rTrack %02d: 0 MB written.", track); + printf(_("\rTrack %02d: 0 MB written."), track); flush(); neednl = TRUE; } @@ -2255,7 +2489,7 @@ count = get_buf(f, trackp, startsec, &bp, bytes_to_read); if (count < 0) - comerr("read error on input file\n"); + comerr(_("Read error on input file.\n")); if (count == 0) break; bytes_read += count; @@ -2273,7 +2507,7 @@ if (count < bytespt) { if (debug) { - printf("\nNOTICE: reducing block size for last record.\n"); + printf(_("\nNOTICE: reducing block size for last record.\n")); neednl = FALSE; } @@ -2281,7 +2515,7 @@ amount = secsize - amount; count += amount; printf( - "\nWARNING: padding up to secsize (by %ld bytes).\n", + _("\nWARNING: padding up to secsize (by %ld bytes).\n"), amount); neednl = FALSE; } @@ -2299,7 +2533,7 @@ amount = write_secs(scgp, dp, bp, startsec, bytespt, secspt, islast); if (amount < 0) { - printf("%swrite track data: error after %lld bytes\n", + printf(_("%swrite track data: error after %lld bytes\n"), neednl?"\n":"", bytes); return (-1); } @@ -2312,17 +2546,25 @@ float fspeed; gettimeofday(&tcur, (struct timezone *)0); - printf("\rTrack %02d: %4lld", track, bytes >> 20); + printf(_("\rTrack %02d: %4lld"), track, bytes >> 20); if (tracksize > 0) - printf(" of %4lld MB", tracksize >> 20); + printf(_(" of %4lld MB"), tracksize >> 20); else printf(" MB"); - printf(" written"); + printf(_(" written")); fper = fifo_percent(TRUE); if (fper >= 0) - printf(" (fifo %3d%%)", fper); + printf(_(" (fifo %3d%%)"), fper); #ifdef BCAP - if (bsize > 0) { /* buffer size known */ + /* + * Work around a bug in the firmware from drives + * developed by PIONEER in November 2009. This affects + * drives labelled "Pioneer", "Plextor" and "TEAC". + * Do no longer call cdr_buffer_cap() before the drive + * buffer was not at least filled once to avoid that + * the the drive throughs away all data. + */ + if (bsize > 0 && bytes > bsize) { /* buffer size known */ scgp->silent++; per = (*dp->cdr_buffer_cap)(scgp, (long *)0, &bfree); scgp->silent--; @@ -2334,7 +2576,7 @@ (startsec*secsize) > bsize) { dp->cdr_dstat->ds_minbuf = per; } - printf(" [buf %3d%%]", per); + printf(_(" [buf %3d%%]"), per); #ifdef BCAPDBG printf(" %3ld %3ld", bsize >> 10, bfree >> 10); #endif @@ -2381,9 +2623,9 @@ wt = 0; if (xdebug) - printf(" |%3d %4dms %5dms|", wsecs, wt, mt); + printf(_(" |%3d %4dms %5dms|"), wsecs, wt, mt); else - printf(" |%3d %4dms|", wsecs, wt); + printf(_(" |%3d %4dms|"), wsecs, wt); if (wt > 0) usleep(wt*1000); } @@ -2434,7 +2676,7 @@ if ((padbytes >> 20) > 0) { neednl = TRUE; } else if (lverbose) { - printf("Track %02d: writing %3lld KB of pad data.\n", + printf(_("Track %02d: writing %3lld KB of pad data.\n"), track, (Llong)(padbytes >> 10)); neednl = FALSE; } @@ -2443,7 +2685,7 @@ bytes += savbytes; startsec += savbytes / secsize; } - printf("%sTrack %02d: Total bytes read/written: %lld/%lld (%lld sectors).\n", + printf(_("%sTrack %02d: Total bytes read/written: %lld/%lld (%lld sectors).\n"), neednl?"\n":"", track, bytes_read, bytes, bytes/secsize); flush(); return (0); @@ -2501,7 +2743,7 @@ fillbytes(buf, bytespt, '\0'); if ((amt >> 20) > 0) { - printf("\rTrack %02d: 0 of %4lld MB pad written.", + printf(_("\rTrack %02d: 0 of %4lld MB pad written."), track, amt >> 20); flush(); } @@ -2521,7 +2763,7 @@ amount = write_secs(scgp, dp, buf, startsec, bytespt, secspt, islast); if (amount < 0) { - printf("%swrite track pad data: error after %lld bytes\n", + printf(_("%swrite track pad data: error after %lld bytes\n"), neednl?"\n":"", bytes); if (bytesp) *bytesp = bytes; @@ -2537,16 +2779,24 @@ float fspeed; gettimeofday(&tcur, (struct timezone *)0); - printf("\rTrack %02d: %4lld", track, bytes >> 20); + printf(_("\rTrack %02d: %4lld"), track, bytes >> 20); if (padsize > 0) - printf(" of %4lld MB", padsize >> 20); + printf(_(" of %4lld MB"), padsize >> 20); else printf(" MB"); - printf(" pad written"); + printf(_(" pad written")); savbytes = (bytes >> 20) << 20; #ifdef BCAP - if (bsize > 0) { /* buffer size known */ + /* + * Work around a bug in the firmware from drives + * developed by PIONEER in November 2009. This affects + * drives labelled "Pioneer", "Plextor" and "TEAC". + * Do no longer call cdr_buffer_cap() before the drive + * buffer was not at least filled once to avoid that + * the the drive throughs away all data. + */ + if (bsize > 0 && bytes > bsize) { /* buffer size known */ scgp->silent++; per = (*dp->cdr_buffer_cap)(scgp, (long *)0, &bfree); scgp->silent--; @@ -2558,7 +2808,7 @@ (startsec*secsize) > bsize) { dp->cdr_dstat->ds_minbuf = per; } - printf(" [buf %3d%%]", per); + printf(_(" [buf %3d%%]"), per); #ifdef BCAPDBG printf(" %3ld %3ld", bsize >> 10, bfree >> 10); #endif @@ -2623,7 +2873,7 @@ /* fillbytes(buf, bytespt, '\0');*/ if ((amt >> 20) > 0) { - printf("\rTrack %02d: 0 of %4ld MB pad written.", + printf(_("\rTrack %02d: 0 of %4ld MB pad written."), track, amt >> 20); flush(); } @@ -2637,7 +2887,7 @@ amount = write_secs(scgp, dp, bp, startsec, bytespt, secspt, islast); if (amount < 0) { - printf("%swrite track data: error after %ld bytes\n", + printf(_("%swrite track data: error after %ld bytes\n"), neednl?"\n":"", bytes); if (bytesp) *bytesp = bytes; @@ -2649,7 +2899,7 @@ startsec += amount / secsize; if (lverbose && (bytes >= (savbytes + 0x100000))) { - printf("\rTrack %02d: %3ld", track, bytes >> 20); + printf(_("\rTrack %02d: %3ld"), track, bytes >> 20); savbytes = (bytes >> 20) << 20; flush(); neednl = TRUE; @@ -2668,22 +2918,22 @@ track_t *trackp; { if (trackp->itracksize >= 0) { - printf("Track %02d: data %4lld MB ", + printf(_("Track %02d: data %4lld MB "), track, (Llong)(trackp->itracksize >> 20)); } else { - printf("Track %02d: data unknown length", + printf(_("Track %02d: data unknown length"), track); } if (trackp->padsecs > 0) { Llong padbytes = (Llong)trackp->padsecs * trackp->isecsize; if ((padbytes >> 20) > 0) - printf(" padsize: %4lld MB", (Llong)(padbytes >> 20)); + printf(_(" padsize: %4lld MB"), (Llong)(padbytes >> 20)); else - printf(" padsize: %4lld KB", (Llong)(padbytes >> 10)); + printf(_(" padsize: %4lld KB"), (Llong)(padbytes >> 10)); } if (trackp->pregapsize != (trackp->flags & TI_NOCD)? 0 : 150) { - printf(" pregapsize: %3ld", trackp->pregapsize); + printf(_(" pregapsize: %3ld"), trackp->pregapsize); } if (xdebug) printf(" START: %ld SECTORS: %ld INDEX0 %ld", @@ -2697,21 +2947,21 @@ track_t *trackp; { if (trackp->itracksize >= 0) { - printf("Track %02d: audio %4lld MB (%02d:%02d.%02d) %spreemp%s%s", + printf(_("Track %02d: audio %4lld MB (%02d:%02d.%02d) %spreemp%s%s"), track, (Llong)(trackp->itracksize >> 20), minutes(trackp->itracksize), seconds(trackp->itracksize), hseconds(trackp->itracksize), - is_preemp(trackp) ? "" : "no ", - is_swab(trackp) ? " swab":"", + is_preemp(trackp) ? "" : _("no "), + is_swab(trackp) ? _(" swab"):"", ((trackp->itracksize < 300L*trackp->isecsize) || (trackp->itracksize % trackp->isecsize)) && - is_pad(trackp) ? " pad" : ""); + is_pad(trackp) ? _(" pad") : ""); } else { - printf("Track %02d: audio unknown length %spreemp%s%s", - track, is_preemp(trackp) ? "" : "no ", - is_swab(trackp) ? " swab":"", - (trackp->itracksize % trackp->isecsize) && is_pad(trackp) ? " pad" : ""); + printf(_("Track %02d: audio unknown length %spreemp%s%s"), + track, is_preemp(trackp) ? "" : _("no "), + is_swab(trackp) ? _(" swab"):"", + (trackp->itracksize % trackp->isecsize) && is_pad(trackp) ? _(" pad") : ""); } if (is_scms(trackp)) printf(" scms"); @@ -2724,16 +2974,16 @@ Llong padbytes = (Llong)trackp->padsecs * trackp->isecsize; if ((padbytes >> 20) > 0) - printf(" padsize: %4lld MB", (Llong)(padbytes >> 20)); + printf(_(" padsize: %4lld MB"), (Llong)(padbytes >> 20)); else - printf(" padsize: %4lld KB", (Llong)(padbytes >> 10)); + printf(_(" padsize: %4lld KB"), (Llong)(padbytes >> 10)); printf(" (%02d:%02d.%02d)", Sminutes(trackp->padsecs), Sseconds(trackp->padsecs), Shseconds(trackp->padsecs)); } if (trackp->pregapsize != ((trackp->flags & TI_NOCD)? 0 : 150) || xdebug > 0) { - printf(" pregapsize: %3ld", trackp->pregapsize); + printf(_(" pregapsize: %3ld"), trackp->pregapsize); } if (xdebug) printf(" START: %ld SECTORS: %ld INDEX0 %ld", @@ -2752,15 +3002,15 @@ (trackp->itracksize < 300L*trackp->isecsize)) || (trackp->itracksize % trackp->isecsize)) && !is_pad(trackp)) { - errmsgno(EX_BAD, "Bad audio track size %lld for track %02d.\n", + errmsgno(EX_BAD, _("Bad audio track size %lld for track %02d.\n"), (Llong)trackp->itracksize, track); - errmsgno(EX_BAD, "Audio tracks must be at least %ld bytes and a multiple of %d.\n", + errmsgno(EX_BAD, _("Audio tracks must be at least %ld bytes and a multiple of %d.\n"), 300L*trackp->isecsize, trackp->isecsize); if (!is_shorttrk(trackp) && (trackp->itracksize < 300L*trackp->isecsize)) - comerrno(EX_BAD, "See -shorttrack option.\n"); + comerrno(EX_BAD, _("See -shorttrack option.\n")); if (!is_pad(trackp) && (trackp->itracksize % trackp->isecsize)) - comerrno(EX_BAD, "See -pad option.\n"); + comerrno(EX_BAD, _("See -pad option.\n")); } if (lverbose == 0 && xdebug == 0) @@ -2900,7 +3150,7 @@ total += tp->pregapsize; if (lverbose > 1) { - printf("track: %d start: %lld pregap: %ld\n", + printf(_("track: %d start: %lld pregap: %ld\n"), i, total, tp->pregapsize); } tp->trackstart = total; @@ -2922,9 +3172,9 @@ } total += curr; } else if (is_sao(tp) || is_raw(tp)) { - errmsgno(EX_BAD, "Track %d has unknown length.\n", i); + errmsgno(EX_BAD, _("Track %d has unknown length.\n"), i); comerrno(EX_BAD, - "Use tsize= option in %s mode to specify track size.\n", + _("Use tsize= option in %s mode to specify track size.\n"), is_sao(tp) ? "SAO" : "RAW"); } } @@ -2941,16 +3191,16 @@ /* XXX CD Sector Size ??? */ if (tracks > 0) { if (trackp->flags & TI_NOCD) { - printf("Total size: %4llu MB = %lld sectors\n", + printf(_("Total size: %4llu MB = %lld sectors\n"), btotal >> 20, total); } else { - printf("Total size: %4llu MB (%02d:%02d.%02d) = %lld sectors\n", + printf(_("Total size: %4llu MB (%02d:%02d.%02d) = %lld sectors\n"), btotal >> 20, minutes(btotal), seconds(btotal), hseconds(btotal), total); btotal += 150 * 2352; - printf("Lout start: %4llu MB (%02d:%02d/%02d) = %lld sectors\n", + printf(_("Lout start: %4llu MB (%02d:%02d/%02d) = %lld sectors\n"), btotal >> 20, minutes(btotal), seconds(btotal), @@ -2971,8 +3221,15 @@ Llong tracksize; int secsize; - for (i = 1; i <= tracks; i++) { + if (trackp[1].flags & TI_USEINFO && + auinfhidden(trackp[1].filename, 1, trackp)) { + tracks = cvt_hidden(trackp); + } + + for (i = 0; i <= tracks; i++) { tp = &trackp[i]; + if (i == 0 && tp->filename == NULL) + continue; if (auinfosize(tp->filename, tp)) { /* @@ -2982,15 +3239,24 @@ * cdda2wav | cdrecord */ tp->xfp = xopen(NULL, O_RDONLY|O_BINARY, 0, 0); + tp->flags |= TI_STDIN; } else if (strcmp("-", tp->filename) == 0) { /* * open stdin */ tp->xfp = xopen(NULL, O_RDONLY|O_BINARY, 0, 0); + tp->flags |= TI_STDIN; + if (((tp->flags & TI_ISOSIZE) != 0) && + !is_audio(tp) && (is_sao(tp) || is_raw(tp))) { + if ((exargs.flags & F_WAITI) == 0) { + exargs.flags |= F_WAITI; + wait_input(); + } + } } else { if ((tp->xfp = xopen(tp->filename, O_RDONLY|O_BINARY, 0, 0)) == NULL) { - comerr("Cannot open '%s'.\n", tp->filename); + comerr(_("Cannot open '%s'.\n"), tp->filename); } } @@ -3007,9 +3273,9 @@ 300 - tracksize / secsize; } if (xdebug) { - printf("TRACK %d SECTORS: %ld", + printf(_("TRACK %d SECTORS: %ld"), i, tp->tracksecs); - printf(" pasdize %lld (%ld sectors)\n", + printf(_(" pasdize %lld (%ld sectors)\n"), (Llong)tp->padsecs * secsize, tp->padsecs); } @@ -3029,7 +3295,8 @@ tp->tracksecs += tp->padsecs; if (debug) { - printf("File: '%s' itracksize: %lld isecsize: %d tracktype: %d = %s sectype: %X = %s dbtype: %s flags %X\n", + printf(_( + "File: '%s' itracksize: %lld isecsize: %d tracktype: %d = %s sectype: %X = %s dbtype: %s flags %X\n"), tp->filename, (Llong)tp->itracksize, tp->isecsize, tp->tracktype & TOC_MASK, toc2name[tp->tracktype & TOC_MASK], @@ -3038,6 +3305,45 @@ } } +LOCAL int +cvt_hidden(trackp) + track_t *trackp; +{ + register int i; + register int tracks; + int trackno; + track_t *tp0 = &trackp[0]; + track_t *tp1 = &trackp[1]; + + tp0->filename = tp1->filename; + tp0->trackstart = tp1->trackstart; + tp0->itracksize = tp1->itracksize; + tp0->tracksize = tp1->tracksize; + tp0->tracksecs = tp1->tracksecs; + + tracks = tp0->tracks - 1; /* Reduce number of tracks by one */ + trackno = trackp[2].trackno; /* Will become track # f. track 1 */ + trackno -= 2; + if (trackno < 0) + trackno = 0; + + for (i = 1; i < MAX_TRACK+1; i++) { + movebytes(&trackp[i+1], &trackp[i], sizeof (trackp[0])); + } + for (i = 0; i < MAX_TRACK+2; i++) { + trackp[i].track = i; + trackp[i].trackno = trackno + i; + trackp[i].tracks = tracks; + } + tp0->trackno = 0; + tp0->flags |= TI_HIDDEN; + tp1->flags |= TI_HIDDEN; + tp1->flags &= ~TI_PREGAP; + tp0->flags |= tp1->flags & + (TI_SWAB|TI_AUDIO|TI_COPY|TI_QUADRO|TI_PREEMP|TI_SCMS); + return (tracks); +} + LOCAL void checksize(trackp) track_t *trackp; @@ -3055,29 +3361,39 @@ * use fstat() or file parser to get the size of the file. */ if (trackp->itracksize < 0 && (trackp->flags & TI_ISOSIZE) != 0) { - lsize = isosize(f); + if ((trackp->flags & TI_STDIN) != 0) { + if (trackp->track != 1) + comerrno(EX_BAD, _("-isosize on stdin only works for the first track.\n")); + isobuf = malloc(32 * 2048); + if (isobuf == NULL) + comerrno(EX_BAD, _("Cannot malloc iso size buffer.\n")); + isobsize = read_buf(f, isobuf, 32 * 2048); + lsize = bisosize(isobuf, isobsize); + } else { + lsize = isosize(f); + } trackp->itracksize = lsize; if (trackp->itracksize != lsize) - comerrno(EX_BAD, "This OS cannot handle large ISO-9660 images.\n"); + comerrno(EX_BAD, _("This OS cannot handle large ISO-9660 images.\n")); } if (trackp->itracksize < 0 && (trackp->flags & TI_NOAUHDR) == 0) { lsize = ausize(f); xmarkpos(trackp->xfp); trackp->itracksize = lsize; if (trackp->itracksize != lsize) - comerrno(EX_BAD, "This OS cannot handle large audio images.\n"); + comerrno(EX_BAD, _("This OS cannot handle large audio images.\n")); } if (trackp->itracksize < 0 && (trackp->flags & TI_NOAUHDR) == 0) { lsize = wavsize(f); xmarkpos(trackp->xfp); trackp->itracksize = lsize; if (trackp->itracksize != lsize) - comerrno(EX_BAD, "This OS cannot handle large WAV images.\n"); + comerrno(EX_BAD, _("This OS cannot handle large WAV images.\n")); if (trackp->itracksize > 0) /* Force little endian input */ trackp->flags |= TI_SWAB; } if (trackp->itracksize == AU_BAD_CODING) { - comerrno(EX_BAD, "Inappropriate audio coding in '%s'.\n", + comerrno(EX_BAD, _("Inappropriate audio coding in '%s'.\n"), trackp->filename); } if (trackp->itracksize < 0 && @@ -3157,7 +3473,7 @@ * dsp->ds_maxblocks > 0 (disk capacity is known). */ if (lverbose) - printf("Blocks total: %ld Blocks current: %ld Blocks remaining: %ld\n", + printf(_("Blocks total: %ld Blocks current: %ld Blocks remaining: %ld\n"), (long)dsp->ds_maxblocks, (long)dsp->ds_maxblocks - startsec, (long)dsp->ds_maxblocks - endsec); @@ -3168,23 +3484,23 @@ * There is no overburning on DVD/BD... */ errmsgno(EX_BAD, - "Data does not fit on current disk.\n"); + _("Data does not fit on current disk.\n")); goto toolarge; } errmsgno(EX_BAD, - "WARNING: Data may not fit on current disk.\n"); + _("WARNING: Data may not fit on current disk.\n")); /* XXX Check for flags & CDR_NO_LOLIMIT */ /* goto toolarge;*/ } if (lverbose && dsp->ds_maxrblocks > 0) - printf("RBlocks total: %ld RBlocks current: %ld RBlocks remaining: %ld\n", + printf(_("RBlocks total: %ld RBlocks current: %ld RBlocks remaining: %ld\n"), (long)dsp->ds_maxrblocks, (long)dsp->ds_maxrblocks - startsec, (long)dsp->ds_maxrblocks - endsec); if (dsp->ds_maxrblocks > 0 && endsec > dsp->ds_maxrblocks) { errmsgno(EX_BAD, - "Data does not fit on current disk.\n"); + _("Data does not fit on current disk.\n")); goto toolarge; } if ((endsec > dsp->ds_maxblocks && endsec > 404700) || @@ -3195,16 +3511,16 @@ * capacity between 90 and 99 minutes. */ if (dsp->ds_maxrblocks > 404700) - printf("RedBook total: %ld RedBook current: %ld RedBook remaining: %ld\n", + printf(_("RedBook total: %ld RedBook current: %ld RedBook remaining: %ld\n"), 404700L, 404700L - startsec, 404700L - endsec); if (endsec > dsp->ds_maxblocks && endsec > 404700) { if ((flags & (F_IGNSIZE|F_FORCE)) == 0) { errmsgno(EX_BAD, - "Notice: Most recorders cannot write CD's >= 90 minutes.\n"); + _("Notice: Most recorders cannot write CD's >= 90 minutes.\n")); errmsgno(EX_BAD, - "Notice: Use -ignsize option to allow >= 90 minutes.\n"); + _("Notice: Use -ignsize option to allow >= 90 minutes.\n")); } goto toolarge; } @@ -3213,13 +3529,15 @@ /* * dsp->ds_maxblocks == 0 (disk capacity is unknown). */ + errmsgno(EX_BAD, _("Disk capacity is unknown.\n")); + if (endsec >= (405000-300)) { /*<90 min disk*/ errmsgno(EX_BAD, - "Data will not fit on any disk.\n"); + _("Data will not fit on any CD.\n")); goto toolarge; } else if (endsec >= (333000-150)) { /* 74 min disk*/ errmsgno(EX_BAD, - "WARNING: Data may not fit on standard 74min disk.\n"); + _("WARNING: Data may not fit on standard 74min CD.\n")); } } if (dsp->ds_maxblocks <= 0 || endsec <= dsp->ds_maxblocks) @@ -3230,17 +3548,17 @@ if ((flags & (F_OVERBURN|F_IGNSIZE|F_FORCE)) != 0) { if (dsp->ds_flags & DSF_NOCD) { /* Not a CD */ errmsgno(EX_BAD, - "Notice: -overburn is not expected to work with DVD/BD media.\n"); + _("Notice: -overburn is not expected to work with DVD/BD media.\n")); } errmsgno(EX_BAD, - "Notice: Overburning active. Trying to write more than the official disk capacity.\n"); + _("Notice: Overburning active. Trying to write more than the official disk capacity.\n")); return (TRUE); } else { if ((dsp->ds_flags & DSF_NOCD) == 0) { /* A CD and not a DVD/BD */ errmsgno(EX_BAD, - "Notice: Use -overburn option to write more than the official disk capacity.\n"); + _("Notice: Use -overburn option to write more than the official disk capacity.\n")); errmsgno(EX_BAD, - "Notice: Most CD-writers do overburning only on SAO or RAW mode.\n"); + _("Notice: Most CD-writers do overburning only on SAO or RAW mode.\n")); } return (FALSE); } @@ -3249,14 +3567,22 @@ if (dsp->ds_flags & DSF_NOCD) { /* A DVD/BD */ if (endsec <= dsp->ds_maxblocks) return (TRUE); - errmsgno(EX_BAD, "Cannot write more than remaining DVD/BD capacity.\n"); + if (dsp->ds_maxblocks <= 0) { + errmsgno(EX_BAD, _("DVD/BD capacity is unknown.\n")); + if ((flags & (F_IGNSIZE|F_FORCE)) != 0) { + errmsgno(EX_BAD, + _("Notice: -ignsize active.\n")); + return (TRUE); + } + } + errmsgno(EX_BAD, _("Cannot write more than remaining DVD/BD capacity.\n")); return (FALSE); } /* * Assume that this must be a CD and not a DVD. */ if (endsec > 449700) { - errmsgno(EX_BAD, "Cannot write CD's >= 100 minutes.\n"); + errmsgno(EX_BAD, _("Cannot write CD's >= 100 minutes.\n")); return (FALSE); } } @@ -3282,7 +3608,7 @@ rlim.rlim_cur = MAX_TRACK + 10; if (rlim.rlim_cur > rlim.rlim_max) errmsgno(EX_BAD, - "Warning: low file descriptor limit (%lld)\n", + _("Warning: low file descriptor limit (%lld).\n"), (Llong)rlim.rlim_max); setrlimit(RLIMIT_NOFILE, &rlim); @@ -3298,7 +3624,7 @@ rlim.rlim_cur = rlim.rlim_max = RLIM_INFINITY; if (setrlimit(RLIMIT_MEMLOCK, &rlim) < 0) - errmsg("Warning: Cannot raise RLIMIT_MEMLOCK limits."); + errmsg(_("Warning: Cannot raise RLIMIT_MEMLOCK limits.\n")); #endif /* RLIMIT_MEMLOCK */ } @@ -3321,7 +3647,7 @@ char *opts = /* CSTYLED */ -"help,version,checkdrive,prcap,inq,scanbus,reset,abort,overburn,ignsize,useinfo,dev*,timeout#,driver*,driveropts*,setdropts,tsize&,padsize&,pregap&,defpregap&,speed#,load,lock,eject,dummy,minfo,media-info,msinfo,toc,atip,multi,fix,nofix,waiti,immed,debug#,d+,kdebug#,kd#,verbose+,v+,Verbose+,V+,x+,xd#,silent,s,audio,data,mode2,xa,xa1,xa2,xamix,cdi,isosize,nopreemp,preemp,nocopy,copy,nopad,pad,swab,fs&,ts&,blank&,format,pktsize#,packet,noclose,force,tao,dao,sao,raw,raw96r,raw96p,raw16,clone,scms,isrc*,mcn*,index*,cuefile*,textfile*,text,shorttrack,noshorttrack,gracetime#,minbuf#"; +"help,version,checkdrive,prcap,inq,scanbus,reset,abort,overburn,ignsize,useinfo,dev*,scgopts*,timeout#,driver*,driveropts*,setdropts,tsize&,padsize&,pregap&,defpregap&,speed#,load,lock,eject,dummy,minfo,media-info,msinfo,toc,atip,multi,fix,nofix,waiti,immed,debug#,d+,kdebug#,kd#,verbose+,v+,Verbose+,V+,x+,xd#,silent,s,audio,data,mode2,xa,xa1,xa2,xamix,cdi,isosize,nopreemp,preemp,nocopy,copy,nopad,pad,swab,fs&,ts&,blank&,format,pktsize#,packet,noclose,force,tao,dao,sao,raw,raw96r,raw96p,raw16,clone,scms,isrc*,mcn*,index*,cuefile*,textfile*,text,shorttrack,noshorttrack,gracetime#,minbuf#"; /* * Defines used to find whether a write mode has been specified. @@ -3332,13 +3658,14 @@ #define M_PACKET 8 /* Packed mode */ LOCAL void -gargs(ac, av, tracksp, trackp, devp, timeoutp, dpp, speedp, flagsp, blankp) +gargs(ac, av, tracksp, trackp, devp, scgoptp, timeoutp, dpp, speedp, flagsp, blankp) int ac; char **av; int *tracksp; track_t *trackp; cdr_t **dpp; char **devp; + char **scgoptp; int *timeoutp; int *speedp; UInt32_t *flagsp; @@ -3452,7 +3779,8 @@ &help, &version, &checkdrive, &prcap, &inq, &scanbus, &reset, &doabort, &overburn, &ignsize, &useinfo, - devp, timeoutp, &driver, &driveropts, &setdropts, + devp, scgoptp, timeoutp, &driver, + &driveropts, &setdropts, getllnum, &tracksize, getllnum, &padsize, getnum, &pregapsize, @@ -3482,7 +3810,7 @@ &cuefile, &textfile, &usetext, &shorttrack, &noshorttrack, &gracetime, &dminbuf)) < 0) { - errmsgno(EX_BAD, "Bad Option: %s.\n", cav[0]); + errmsgno(EX_BAD, _("Bad Option: %s.\n"), cav[0]); susage(EX_BAD); } if (help) @@ -3652,42 +3980,42 @@ mcn = NULL; } if ((raw96r + raw96p + raw16) > 1) { - errmsgno(EX_BAD, "Too many raw modes.\n"); - comerrno(EX_BAD, "Only one of -raw16, -raw96p, -raw96r allowed.\n"); + errmsgno(EX_BAD, _("Too many raw modes.\n")); + comerrno(EX_BAD, _("Only one of -raw16, -raw96p, -raw96r allowed.\n")); } if ((tao + ispacket + dao + raw) > 1) { - errmsgno(EX_BAD, "Too many write modes.\n"); - comerrno(EX_BAD, "Only one of -packet, -dao, -raw allowed.\n"); + errmsgno(EX_BAD, _("Too many write modes.\n")); + comerrno(EX_BAD, _("Only one of -packet, -dao, -raw allowed.\n")); } if (dao && (raw96r + raw96p + raw16) > 0) { if (raw16) - comerrno(EX_BAD, "SAO RAW writing does not allow -raw16.\n"); + comerrno(EX_BAD, _("SAO RAW writing does not allow -raw16.\n")); if (!clone) - comerrno(EX_BAD, "SAO RAW writing only makes sense in clone mode.\n"); + comerrno(EX_BAD, _("SAO RAW writing only makes sense in clone mode.\n")); #ifndef CLONE_WRITE - comerrno(EX_BAD, "SAO RAW writing not compiled in.\n"); + comerrno(EX_BAD, _("SAO RAW writing not compiled in.\n")); #endif - comerrno(EX_BAD, "SAO RAW writing not yet implemented.\n"); + comerrno(EX_BAD, _("SAO RAW writing not yet implemented.\n")); } if (clone) { *flagsp |= F_CLONE; trackp[0].flags |= TI_CLONE; #ifndef CLONE_WRITE - comerrno(EX_BAD, "Clone writing not compiled in.\n"); + comerrno(EX_BAD, _("Clone writing not compiled in.\n")); #endif } if (textfile) { if (!checktextfile(textfile)) { if ((*flagsp & F_WRITE) != 0) { comerrno(EX_BAD, - "Cannot use '%s' as CD-Text file.\n", + _("Cannot use '%s' as CD-Text file.\n"), textfile); } } if ((*flagsp & F_WRITE) != 0) { if ((dao + raw96r + raw96p) == 0) comerrno(EX_BAD, - "CD-Text needs -dao, -raw96r or -raw96p.\n"); + _("CD-Text needs -dao, -raw96r or -raw96p.\n")); } trackp[0].flags |= TI_TEXT; } @@ -3704,7 +4032,7 @@ waiti + immed + force + dao + setdropts + raw96r + raw96p + raw16 + clone) > 0 || mcn != NULL) - comerrno(EX_BAD, "Badly placed option. Global options must be before any track.\n"); + comerrno(EX_BAD, _("Badly placed option. Global options must be before any track.\n")); if (nopreemp) preemp = 0; @@ -3716,11 +4044,11 @@ shorttrack = 0; if ((audio + data + mode2 + xa + xa1 + xa2 + xamix) > 1) { - errmsgno(EX_BAD, "Too many types for track %d.\n", tracks+1); - comerrno(EX_BAD, "Only one of -audio, -data, -mode2, -xa, -xa1, -xa2, -xamix allowed.\n"); + errmsgno(EX_BAD, _("Too many types for track %d.\n"), tracks+1); + comerrno(EX_BAD, _("Only one of -audio, -data, -mode2, -xa, -xa1, -xa2, -xamix allowed.\n")); } if (ispacket && audio) { - comerrno(EX_BAD, "Audio data cannot be written in packet mode.\n"); + comerrno(EX_BAD, _("Audio data cannot be written in packet mode.\n")); } /* * Check whether the next argument is a file type arg. @@ -3840,6 +4168,7 @@ if (tracks == 0) { trackp[0].tracktype = tracktype; trackp[0].dbtype = dbtype; + trackp[0].sectype = sectype; trackp[0].isecsize = secsize; trackp[0].secsize = secsize; if ((*flagsp & F_RAW) != 0) { @@ -3859,7 +4188,7 @@ if (isize) { flags |= TI_ISOSIZE; if ((*flagsp & F_MULTI) != 0) - comerrno(EX_BAD, "Cannot get isosize for multi session disks.\n"); + comerrno(EX_BAD, _("Cannot get isosize for multi session disks.\n")); /* * As we do not get the padding from the ISO-9660 * formatting utility, we need to force padding here. @@ -3904,28 +4233,12 @@ */ break; } - if (tracks == 0 && (wm == 0)) { - errmsgno(EX_BAD, "No write mode specified.\n"); - errmsgno(EX_BAD, "Asuming %s mode.\n", - (*flagsp & F_MULTI)?"-tao":"-sao"); - if ((*flagsp & F_MULTI) == 0) - errmsgno(EX_BAD, "If your drive does not accept -sao, try -tao.\n"); - errmsgno(EX_BAD, "Future versions of cdrecord may have different drive dependent defaults.\n"); - if (*flagsp & F_MULTI) { - wm |= M_TAO; - } else { - *flagsp |= F_SAO; - trackp[0].flags &= ~TI_TAO; - trackp[0].flags |= TI_SAO; - flags &= ~TI_TAO; - flags |= TI_SAO; - wm |= M_SAO; - } - } + if (tracks == 0 && (wm == 0)) + flags = default_wr_mode(tracks, trackp, flagsp, &wm, flags); tracks++; if (tracks > MAX_TRACK) - comerrno(EX_BAD, "Track limit (%d) exceeded\n", + comerrno(EX_BAD, _("Track limit (%d) exceeded.\n"), MAX_TRACK); /* * Make 'tracks' immediately usable in track structure. @@ -3974,9 +4287,9 @@ #ifndef HAVE_LIB_EDC_ECC if ((sectype & ST_MODE_MASK) != ST_MODE_AUDIO) { errmsgno(EX_BAD, - "EDC/ECC library not compiled in.\n"); + _("EDC/ECC library not compiled in.\n")); comerrno(EX_BAD, - "Data sectors are not supported in RAW mode.\n"); + _("Data sectors are not supported in RAW mode.\n")); } #endif } @@ -4016,27 +4329,29 @@ if (dminbuf >= 0) { if (dminbuf < 25 || dminbuf > 95) comerrno(EX_BAD, - "Bad minbuf=%d option (must be between 25 and 95)\n", + _("Bad minbuf=%d option (must be between 25 and 95).\n"), dminbuf); } if (speed < 0 && speed != -1) - comerrno(EX_BAD, "Bad speed option.\n"); + comerrno(EX_BAD, _("Bad speed option.\n")); if (fs < 0L && fs != -1L) - comerrno(EX_BAD, "Bad fifo size option.\n"); + comerrno(EX_BAD, _("Bad fifo size option.\n")); if (bufsize < 0L && bufsize != -1L) - comerrno(EX_BAD, "Bad transfer size option.\n"); + comerrno(EX_BAD, _("Bad transfer size option.\n")); + + dev = *devp; + cdr_defaults(&dev, &speed, &fs, &bufsize, &driveropts); + if (bufsize < 0L) bufsize = CDR_BUF_SIZE; if (bufsize > CDR_MAX_BUF_SIZE) bufsize = CDR_MAX_BUF_SIZE; - dev = *devp; - cdr_defaults(&dev, &speed, &fs, &driveropts); if (debug) { - printf("dev: '%s' speed: %d fs: %ld driveropts '%s'\n", + printf(_("dev: '%s' speed: %d fs: %ld driveropts '%s'\n"), dev, speed, fs, driveropts); } if (speed >= 0) @@ -4045,7 +4360,7 @@ if (fs < 0L) fs = DEFAULT_FIFOSIZE; if (fs < 2*bufsize) { - errmsgno(EX_BAD, "Fifo size %ld too small, turning fifo off.\n", fs); + errmsgno(EX_BAD, _("Fifo size %ld too small, turning fifo off.\n"), fs); fs = 0L; } @@ -4054,7 +4369,7 @@ #ifdef NO_SEARCH_FOR_DEVICE if (!*devp && (*flagsp & (F_VERSION|F_SCANBUS)) == 0) { - errmsgno(EX_BAD, "No CD/DVD/BD-Recorder device specified.\n"); + errmsgno(EX_BAD, _("No CD/DVD/BD-Recorder device specified.\n")); susage(EX_BAD); } #endif @@ -4069,7 +4384,7 @@ F_FIX|F_VERSION| F_CHECKDRIVE|F_PRCAP|F_INQUIRY|F_SCANBUS|F_RESET|F_ABORT)) { if (tracks != 0) { - errmsgno(EX_BAD, "No tracks allowed with this option\n"); + errmsgno(EX_BAD, _("No tracks allowed with this option.\n")); susage(EX_BAD); } return; @@ -4087,31 +4402,63 @@ trackp[MAX_TRACK+1].flags |= TI_TEXT; } if (cuefile) { + if (tracks == 0 && (wm == 0)) + flags = default_wr_mode(tracks, trackp, flagsp, &wm, flags); + if ((*flagsp & F_SAO) == 0 && (*flagsp & F_RAW) == 0) { - errmsgno(EX_BAD, "The cuefile= option only works with -sao/-raw.\n"); + errmsgno(EX_BAD, _("The cuefile= option only works with -sao/-raw.\n")); susage(EX_BAD); } if (pad) trackp[0].flags |= TI_PAD; if (tracks > 0) { - errmsgno(EX_BAD, "No tracks allowed with the cuefile= option\n"); + errmsgno(EX_BAD, _("No tracks allowed with the cuefile= option.\n")); susage(EX_BAD); } cuefilename = cuefile; return; } if (tracks == 0 && (*flagsp & (F_LOAD|F_DLCK|F_EJECT|F_BLANK|F_FORMAT)) == 0) { - errmsgno(EX_BAD, "No tracks specified. Need at least one.\n"); + errmsgno(EX_BAD, _("No tracks specified. Need at least one.\n")); susage(EX_BAD); } } +LOCAL int +default_wr_mode(tracks, trackp, flagsp, wmp, flags) + int tracks; + track_t *trackp; + UInt32_t *flagsp; + int *wmp; + int flags; +{ + if (tracks == 0 && (*wmp == 0)) { + errmsgno(EX_BAD, _("No write mode specified.\n")); + errmsgno(EX_BAD, _("Assuming %s mode.\n"), + (*flagsp & F_MULTI)?"-tao":"-sao"); + if ((*flagsp & F_MULTI) == 0) + errmsgno(EX_BAD, _("If your drive does not accept -sao, try -tao.\n")); + errmsgno(EX_BAD, _("Future versions of cdrecord may have different drive dependent defaults.\n")); + if (*flagsp & F_MULTI) { + *wmp |= M_TAO; + } else { + *flagsp |= F_SAO; + trackp[0].flags &= ~TI_TAO; + trackp[0].flags |= TI_SAO; + flags &= ~TI_TAO; + flags |= TI_SAO; + *wmp |= M_SAO; + } + } + return (flags); +} + LOCAL void etracks(opt) char *opt; { - errmsgno(EX_BAD, "No tracks allowed with '-%s'.\n", opt); + errmsgno(EX_BAD, _("No tracks allowed with '-%s'.\n"), opt); susage(EX_BAD); } @@ -4129,7 +4476,7 @@ trackp[tracks].flags |= TI_LAST; if (xdebug) - printf("Set Transfersizes start\n"); + printf(_("Set Transfersizes start\n")); for (i = 0; i <= tracks+1; i++) { if ((dp->cdr_flags & CDR_SWABAUDIO) != 0 && is_audio(&trackp[i])) { @@ -4159,18 +4506,18 @@ trackp[i].secspt = trackp[i].pktsize; } else { comerrno(EX_BAD, - "Track %d packet size %d exceeds buffer limit of %d sectors", + _("Track %d packet size %d exceeds buffer limit of %d sectors"), i, trackp[i].pktsize, trackp[i].secspt); } } if (xdebug) { - printf("Track %d flags %X secspt %d secsize: %d isecsize: %d\n", + printf(_("Track %d flags %X secspt %d secsize: %d isecsize: %d\n"), i, trackp[i].flags, trackp[i].secspt, trackp[i].secsize, trackp[i].isecsize); } } if (xdebug) - printf("Set Transfersizes end\n"); + printf(_("Set Transfersizes end\n")); } EXPORT void @@ -4192,7 +4539,7 @@ if ((*dp->cdr_load)(scgp, dp) < 0) { /* now try to load media and */ if (!doexit) return; - comerrno(EX_BAD, "Cannot load media.\n"); + comerrno(EX_BAD, _("Cannot load media.\n")); } scsi_start_stop_unit(scgp, 1, 0, immed); /* start unit in silent mode */ scgp->silent--; @@ -4207,8 +4554,8 @@ if (!doexit) return; if (key == SC_NOT_READY && (code == 0x3A || code == 0x30)) - comerrno(EX_BAD, "No disk / Wrong disk!\n"); - comerrno(EX_BAD, "CD/DVD/BD-Recorder not ready.\n"); + comerrno(EX_BAD, _("No disk / Wrong disk!\n")); + comerrno(EX_BAD, _("CD/DVD/BD-Recorder not ready.\n")); } scsi_prevent_removal(scgp, 1); @@ -4229,7 +4576,7 @@ scgp->silent--; err = geterrno(); if (code < 0 && (err == EPERM || err == EACCES)) { - linuxcheck(); /* For version 1.355 of cdrecord.c */ + linuxcheck(); /* For version 1.415 of cdrecord.c */ scg_openerr(""); } @@ -4248,7 +4595,7 @@ scsi_prevent_removal(scgp, 0); if ((flags & F_EJECT) != 0) { if ((*dp->cdr_unload)(scgp, dp) < 0) - errmsgno(EX_BAD, "Cannot eject media.\n"); + errmsgno(EX_BAD, _("Cannot eject media.\n")); } } @@ -4262,7 +4609,7 @@ int f = -1; #endif - errmsgno(EX_BAD, "Drive needs to reload the media to return to proper status.\n"); + errmsgno(EX_BAD, _("Drive needs to reload the media to return to proper status.\n")); unload_media(scgp, dp, F_EJECT); /* @@ -4279,7 +4626,7 @@ !wait_unit_ready(scgp, 5)) { static FILE *tty = NULL; - printf("Re-load disk and hit "); + printf(_("Re-load disk and hit ")); if (isgui) printf("\n"); flush(); @@ -4295,14 +4642,14 @@ if (f < 0 || (f & O_ACCMODE) == O_WRONLY) { #ifdef SIGUSR1 signal(SIGUSR1, catchsig); - printf("Controlling file not open for reading, send SIGUSR1 to continue.\n"); + printf(_("Controlling file not open for reading, send SIGUSR1 to continue.\n")); flush(); pause(); #endif } else #endif if (fgetline(tty, ans, 1) < 0) - comerrno(EX_BAD, "Aborted by EOF on input.\n"); + comerrno(EX_BAD, _("Aborted by EOF on input.\n")); } scgp->silent--; @@ -4324,6 +4671,35 @@ } } +/* + * Carefully read the drive buffer. + * Work around the inability to get the DMA residual count on Linux. + */ +LOCAL int +_read_buffer(scgp, size) + SCSI *scgp; + int size; +{ + buf[size-2] = (char)0x55; buf[size-1] = (char)0xFF; + if (read_buffer(scgp, buf, size, 0) < 0 || + scg_getresid(scgp) != 0) { + errmsgno(EX_BAD, + _("Warning: 'read buffer' failed, DMA residual count %d.\n"), + scg_getresid(scgp)); + return (-1); + } + /* + * Work around unfriendly OS that do not return the + * DMA residual count (e.g. Linux). + */ + if (buf[size-2] == (char)0x55 || buf[size-1] == (char)0xFF) { + errmsgno(EX_BAD, + _("Warning: DMA resid 0 for 'read buffer', actual data is too short.\n")); + return (-1); + } + return (0); +} + LOCAL int get_dmaspeed(scgp, dp) SCSI *scgp; @@ -4333,43 +4709,93 @@ long t; int bs; int tsize; + int maxdma; fillbytes((caddr_t)buf, 4, '\0'); tsize = 0; scgp->silent++; i = read_buffer(scgp, buf, 4, 0); scgp->silent--; - if (i < 0 || scg_getresid(scgp) != 0) - return (-1); - tsize = a_to_u_4_byte(buf); - if (tsize <= 0) + if (i < 0 || scg_getresid(scgp) != 0) { + errmsgno(EX_BAD, _("Warning: Cannot read drive buffer.\n")); return (-1); - - if (gettimeofday(&starttime, (struct timezone *)0) < 0) + } + tsize = a_to_u_3_byte(&buf[1]); + if (tsize <= 0) { + errmsgno(EX_BAD, _("Warning: Drive returned invalid buffer size.\n")); return (-1); + } bs = bufsize; if (tsize < bs) bs = tsize; if (bs > 0xFFFE) /* ReadBuffer may hang w. >64k & USB */ bs = 0xFFFE; /* Make it an even size < 64k */ - for (i = 0; i < 100; i++) { - buf[bs-2] = (char)0x55; buf[bs-1] = (char)0xFF; - if (read_buffer(scgp, buf, bs, 0) < 0 || - scg_getresid(scgp) != 0) { - return (-1); + + scgp->silent++; + fillbytes((caddr_t)buf, bs, '\0'); + if (read_buffer(scgp, buf, bs, 0) < 0) { + scgp->silent--; + errmsgno(EX_BAD, + _("Warning: Cannot read %d bytes from drive buffer.\n"), + bs); + return (-1); + } + for (i = bs-1; i >= 0; i--) { + if (buf[i] != '\0') { + break; } - /* - * Work around unfriendly OS that do not return the - * DMA residual count (e.g. Linux). - */ - if (buf[bs-2] == (char)0x55 || buf[bs-1] == (char)0xFF) { - return (-1); + } + i++; + maxdma = i; + fillbytes((caddr_t)buf, bs, 0xFF); + if (read_buffer(scgp, buf, bs, 0) < 0) { + scgp->silent--; + return (-1); + } + scgp->silent--; + for (i = bs-1; i >= 0; i--) { + if ((buf[i] & 0xFF) != 0xFF) { + break; } + } + i++; + if (i > maxdma) + maxdma = i; + if (maxdma < bs && (scg_getresid(scgp) != (bs - maxdma))) { + errmsgno(EX_BAD, _("Warning: OS does not return a correct DMA residual count.\n")); + errmsgno(EX_BAD, _("Warning: expected DMA residual count %d but got %d.\n"), + (bs - maxdma), scg_getresid(scgp)); + } + /* + * Some drives (e.g. 'HL-DT-ST' 'DVD-RAM GSA-H55N') are unreliable. + * They return less data than advertized as buffersize (tsize). + */ + if (maxdma < bs) { + errmsgno(EX_BAD, _("Warning: drive returns unreliable data from 'read buffer'.\n")); + return (-1); + } + if (maxdma < bs) + bs = maxdma; + scgp->silent++; + if (_read_buffer(scgp, bs) < 0) { + scgp->silent--; + return (-1); + } + scgp->silent--; + + if (gettimeofday(&starttime, (struct timezone *)0) < 0) { + errmsg(_("Cannot get DMA start time.\n")); + return (-1); + } + + for (i = 0; i < 100; i++) { + if (_read_buffer(scgp, bs) < 0) + return (-1); } if (gettimeofday(&fixtime, (struct timezone *)0) < 0) { - errmsg("Cannot get DMA stop time\n"); + errmsg(_("Cannot get DMA stop time.\n")); return (-1); } timevaldiff(&starttime, &fixtime); @@ -4394,11 +4820,11 @@ { if ((flags & F_DUMMY) == 0 && dp->cdr_opc) { if (debug || lverbose) { - printf("Performing OPC...\n"); + printf(_("Performing OPC...\n")); flush(); } if (dp->cdr_opc(scgp, NULL, 0, TRUE) < 0) { - errmsgno(EX_BAD, "OPC failed.\n"); + errmsgno(EX_BAD, _("OPC failed.\n")); if ((flags & F_FORCE) == 0) return (FALSE); } @@ -4413,7 +4839,7 @@ UInt32_t flags; { if ((*dp->cdr_check_recovery)(scgp, dp)) { - errmsgno(EX_BAD, "Recovery needed.\n"); + errmsgno(EX_BAD, _("Recovery needed.\n")); unload_media(scgp, dp, flags); comexit(EX_BAD); } @@ -4459,11 +4885,11 @@ long fa = 0; if ((*dp->cdr_session_offset)(scgp, &off) < 0) { - errmsgno(EX_BAD, "Cannot read session offset\n"); + errmsgno(EX_BAD, _("Cannot read session offset.\n")); return; } if (lverbose) - printf("session offset: %ld\n", off); + printf(_("session offset: %ld\n"), off); /* * Set the track pointer to NULL in order to signal the driver that we @@ -4471,7 +4897,7 @@ * session. */ if (dp->cdr_next_wr_address(scgp, (track_t *)0, &fa) < 0) { - errmsgno(EX_BAD, "Cannot read first writable address\n"); + errmsgno(EX_BAD, _("Cannot read first writable address.\n")); return; } printf("%ld,%ld\n", off, fa); @@ -4495,15 +4921,15 @@ scgp->silent++; if (read_capacity(scgp) < 0) { scgp->silent--; - errmsgno(EX_BAD, "Cannot read capacity\n"); + errmsgno(EX_BAD, _("Cannot read capacity.\n")); return; } scgp->silent--; if (read_tochdr(scgp, dp, &first, &last) < 0) { - errmsgno(EX_BAD, "Cannot read TOC/PMA\n"); + errmsgno(EX_BAD, _("Cannot read TOC/PMA.\n")); return; } - printf("first: %d last %d\n", first, last); + printf(_("first: %d last %d\n"), first, last); for (i = first; i <= last; i++) { read_trackinfo(scgp, i, &lba, &msf, &adr, &control, &mode); xlba = -150 + @@ -4522,7 +4948,7 @@ if (lverbose > 1) { scgp->silent++; if (read_cdtext(scgp) < 0) - errmsgno(EX_BAD, "No CD-Text or CD-Text unaware drive.\n"); + errmsgno(EX_BAD, _("No CD-Text or CD-Text unaware drive.\n")); scgp->silent++; } } @@ -4539,9 +4965,9 @@ long lba_512 = lba*4; if (track == 0xAA) - printf("track:lout "); + printf(_("track:lout ")); else - printf("track: %3d ", track); + printf(_("track: %3d "), track); printf("lba: %9ld (%9ld) %02d:%02d:%02d adr: %X control: %X mode: %d\n", lba, lba_512, @@ -4575,7 +5001,7 @@ strcpy(info.pc_clname, "RT"); classes = priocntl(P_PID, pid, PC_GETCID, (void *)&info); if (classes == -1) - comerr("Cannot get priority class id priocntl(PC_GETCID)\n"); + comerr(_("Cannot get priority class id priocntl(PC_GETCID).\n")); movebytes(info.pc_clinfo, &rtinfo, sizeof (rtinfo_t)); @@ -4587,14 +5013,14 @@ movebytes(&rtparam, param.pc_clparms, sizeof (rtparms_t)); ret = priocntl(P_PID, pid, PC_SETPARMS, (void *)¶m); if (ret == -1) { - errmsg("WARNING: Cannot set priority class parameters priocntl(PC_SETPARMS)\n"); - errmsgno(EX_BAD, "WARNING: This causes a high risk for buffer underruns.\n"); + errmsg(_("WARNING: Cannot set priority class parameters priocntl(PC_SETPARMS).\n")); + errmsgno(EX_BAD, _("WARNING: This causes a high risk for buffer underruns.\n")); } } -#else /* HAVE_SYS_PRIOCNTL_H */ +#else /* !HAVE_SYS_PRIOCNTL_H */ -#if defined(_POSIX_PRIORITY_SCHEDULING) && _POSIX_PRIORITY_SCHEDULING -0 >= 0 +#ifdef USE_POSIX_PRIORITY_SCHEDULING /* * The second best choice: POSIX real time scheduling. */ @@ -4623,22 +5049,22 @@ */ #ifdef _SC_PRIORITY_SCHEDULING if (sysconf(_SC_PRIORITY_SCHEDULING) == -1) { - errmsg("WARNING: RR-scheduler not available, disabling.\n"); + errmsg(_("WARNING: RR-scheduler not available, disabling.\n")); return (-1); } #endif fillbytes(&scp, sizeof (scp), '\0'); scp.sched_priority = sched_get_priority_max(SCHED_RR) - pri; if (sched_setscheduler(0, SCHED_RR, &scp) < 0) { - errmsg("WARNING: Cannot set RR-scheduler\n"); + errmsg(_("WARNING: Cannot set RR-scheduler.\n")); return (-1); } return (0); } -#else /* _POSIX_PRIORITY_SCHEDULING */ +#else /* !USE_POSIX_PRIORITY_SCHEDULING */ -#ifdef __CYGWIN32__ +#if defined(__CYGWIN32__) || defined(__CYGWIN__) || defined(__MINGW32__) || defined(_MSC_VER) /* * Win32 specific priority settings. */ @@ -4657,11 +5083,10 @@ * NOTE: windows.h defines interface as an alias for struct, this * is used by COM/OLE2, I guess it is class on C++ * We man need to #undef 'interface' + * + * These workarounds are now applied in schily/windows.h */ -#define BOOL WBOOL /* This is the Win BOOL */ -#define format __format /* Avoid format parameter hides global ... */ -#include -#undef format +#include #undef interface LOCAL int @@ -4672,13 +5097,13 @@ /* set priority class */ if (SetPriorityClass(GetCurrentProcess(), REALTIME_PRIORITY_CLASS) == FALSE) { - errmsgno(EX_BAD, "No realtime priority class possible.\n"); + errmsgno(EX_BAD, _("No realtime priority class possible.\n")); return (-1); } /* set thread priority */ if (pri >= 0 && pri <= 1 && SetThreadPriority(GetCurrentThread(), prios[pri]) == FALSE) { - errmsgno(EX_BAD, "Could not set realtime priority.\n"); + errmsgno(EX_BAD, _("Could not set realtime priority.\n")); return (-1); } return (0); @@ -4695,9 +5120,9 @@ return (-1); } -#endif /* __CYGWIN32__ */ +#endif /* __CYGWIN32__ || __CYGWIN__ || __MINGW32__ */ -#endif /* _POSIX_PRIORITY_SCHEDULING */ +#endif /* !USE_POSIX_PRIORITY_SCHEDULING */ EXPORT void raisepri(pri) @@ -4708,8 +5133,8 @@ #if defined(HAVE_SETPRIORITY) && defined(PRIO_PROCESS) if (setpriority(PRIO_PROCESS, getpid(), -20 + pri) < 0) { - errmsg("WARNING: Cannot set priority using setpriority().\n"); - errmsgno(EX_BAD, "WARNING: This causes a high risk for buffer underruns.\n"); + errmsg(_("WARNING: Cannot set priority using setpriority().\n")); + errmsgno(EX_BAD, _("WARNING: This causes a high risk for buffer underruns.\n")); } #else #ifdef HAVE_DOSSETPRIORITY /* RT priority on OS/2 */ @@ -4721,12 +5146,12 @@ #else #if defined(HAVE_NICE) && !defined(__DJGPP__) /* DOS has nice but no multitasking */ if (nice(-NZERO + pri) == -1) { - errmsg("WARNING: Cannot set priority using nice().\n"); - errmsgno(EX_BAD, "WARNING: This causes a high risk for buffer underruns.\n"); + errmsg(_("WARNING: Cannot set priority using nice().\n")); + errmsgno(EX_BAD, _("WARNING: This causes a high risk for buffer underruns.\n")); } #else - errmsgno(EX_BAD, "WARNING: Cannot set priority on this OS.\n"); - errmsgno(EX_BAD, "WARNING: This causes a high risk for buffer underruns.\n"); + errmsgno(EX_BAD, _("WARNING: Cannot set priority on this OS.\n")); + errmsgno(EX_BAD, _("WARNING: This causes a high risk for buffer underruns.\n")); #endif #endif #endif @@ -4738,39 +5163,45 @@ /* * sys/types.h and sys/time.h are already included. */ -#else +#else /* !HAVE_SELECT */ +#ifdef HAVE_STROPTS_H # include +#endif +#ifdef HAVE_POLL_H # include +#endif #ifndef INFTIM #define INFTIM (-1) #endif -#endif +#endif /* !HAVE_SELECT */ -#if defined(HAVE_SELECT) && defined(NEED_SYS_SELECT_H) -#include -#endif -#if defined(HAVE_SELECT) && defined(NEED_SYS_SOCKET_H) -#include -#endif +#include LOCAL void wait_input() { #ifdef HAVE_SELECT fd_set in; - +#else +#ifdef HAVE_POLL + struct pollfd pfd; +#endif +#endif + if (lverbose) + printf(_("Waiting for data on stdin...\n")); +#ifdef HAVE_SELECT FD_ZERO(&in); FD_SET(STDIN_FILENO, &in); select(1, &in, NULL, NULL, 0); #else - struct pollfd pfd; - +#ifdef HAVE_POLL pfd.fd = STDIN_FILENO; pfd.events = POLLIN; pfd.revents = 0; poll(&pfd, (unsigned long)1, INFTIM); #endif +#endif } LOCAL void @@ -4781,7 +5212,7 @@ if (fstat(STDERR_FILENO, &st) >= 0 && !S_ISCHR(st.st_mode)) { isgui = TRUE; if (lverbose > 1) - printf("Using remote (pipe) mode for interactive i/o.\n"); + printf(_("Using remote (pipe) mode for interactive i/o.\n")); } } @@ -4813,7 +5244,7 @@ } else if (streql(optstr, "help")) { blusage(0); } else { - error("Illegal blanking type '%s'.\n", optstr); + error(_("Illegal blanking type '%s'.\n"), optstr); blusage(EX_BAD); return (-1); } @@ -4824,7 +5255,7 @@ print_drflags(dp) cdr_t *dp; { - printf("Driver flags : "); + printf(_("Driver flags : ")); if ((dp->cdr_flags2 & CDR2_NOCD) != 0) printf("NO-CD "); @@ -4924,50 +5355,50 @@ int cdflags = dp->cdr_flags; if ((tflags & TI_PACKET) != 0 && (cdflags & CDR_PACKET) == 0) { - errmsgno(EX_BAD, "Drive does not support PACKET recording.\n"); + errmsgno(EX_BAD, _("Drive does not support PACKET recording.\n")); return (FALSE); } if ((tflags & TI_TAO) != 0 && (cdflags & CDR_TAO) == 0) { - errmsgno(EX_BAD, "Drive does not support TAO recording.\n"); + errmsgno(EX_BAD, _("Drive does not support TAO recording.\n")); return (FALSE); } if ((wmode & F_SAO) != 0) { if ((cdflags & CDR_SAO) == 0) { - errmsgno(EX_BAD, "Drive does not support SAO recording.\n"); + errmsgno(EX_BAD, _("Drive does not support SAO recording.\n")); if ((cdflags & CDR_RAW) != 0) - errmsgno(EX_BAD, "Try -raw option.\n"); + errmsgno(EX_BAD, _("Try -raw option.\n")); return (FALSE); } #ifdef __needed__ if ((tflags & TI_RAW16) != 0 && (cdflags & CDR_SRAW16) == 0) { - errmsgno(EX_BAD, "Drive does not support SAO/RAW16.\n"); + errmsgno(EX_BAD, _("Drive does not support SAO/RAW16.\n")); goto badsecs; } #endif if ((tflags & (TI_RAW|TI_RAW16|TI_RAW96R)) == TI_RAW && (cdflags & CDR_SRAW96P) == 0) { - errmsgno(EX_BAD, "Drive does not support SAO/RAW96P.\n"); + errmsgno(EX_BAD, _("Drive does not support SAO/RAW96P.\n")); goto badsecs; } if ((tflags & (TI_RAW|TI_RAW16|TI_RAW96R)) == (TI_RAW|TI_RAW96R) && (cdflags & CDR_SRAW96R) == 0) { - errmsgno(EX_BAD, "Drive does not support SAO/RAW96R.\n"); + errmsgno(EX_BAD, _("Drive does not support SAO/RAW96R.\n")); goto badsecs; } } if ((wmode & F_RAW) != 0) { if ((cdflags & CDR_RAW) == 0) { - errmsgno(EX_BAD, "Drive does not support RAW recording.\n"); + errmsgno(EX_BAD, _("Drive does not support RAW recording.\n")); return (FALSE); } if ((tflags & TI_RAW16) != 0 && (cdflags & CDR_RAW16) == 0) { - errmsgno(EX_BAD, "Drive does not support RAW/RAW16.\n"); + errmsgno(EX_BAD, _("Drive does not support RAW/RAW16.\n")); goto badsecs; } if ((tflags & (TI_RAW|TI_RAW16|TI_RAW96R)) == TI_RAW && (cdflags & CDR_RAW96P) == 0) { - errmsgno(EX_BAD, "Drive does not support RAW/RAW96P.\n"); + errmsgno(EX_BAD, _("Drive does not support RAW/RAW96P.\n")); goto badsecs; } if ((tflags & (TI_RAW|TI_RAW16|TI_RAW96R)) == (TI_RAW|TI_RAW96R) && (cdflags & CDR_RAW96R) == 0) { - errmsgno(EX_BAD, "Drive does not support RAW/RAW96R.\n"); + errmsgno(EX_BAD, _("Drive does not support RAW/RAW96R.\n")); goto badsecs; } } @@ -4980,11 +5411,11 @@ cdflags &= ~(CDR_SRAW96P|CDR_SRAW96R); if ((cdflags & (CDR_SRAW96R|CDR_RAW96R)) != 0) - errmsgno(EX_BAD, "Try -raw96r option.\n"); + errmsgno(EX_BAD, _("Try -raw96r option.\n")); else if ((cdflags & (CDR_SRAW96P|CDR_RAW96P)) != 0) - errmsgno(EX_BAD, "Try -raw96p option.\n"); + errmsgno(EX_BAD, _("Try -raw96p option.\n")); else if ((cdflags & CDR_RAW16) != 0) - errmsgno(EX_BAD, "Try -raw16 option.\n"); + errmsgno(EX_BAD, _("Try -raw16 option.\n")); return (FALSE); } @@ -5040,7 +5471,7 @@ } /* - * I am sorry that even for version 1.355 of cdrecord.c, I am forced to do + * I am sorry that even for version 1.415 of cdrecord.c, I am forced to do * things like this, but defective versions of cdrecord cause a lot of * work load to me. * @@ -5052,12 +5483,12 @@ */ #if defined(linux) || defined(__linux) || defined(__linux__) #ifdef HAVE_UNAME -#include +#include #endif #endif LOCAL void -linuxcheck() /* For version 1.355 of cdrecord.c */ +linuxcheck() /* For version 1.415 of cdrecord.c */ { #if defined(linux) || defined(__linux) || defined(__linux__) #ifdef HAVE_UNAME @@ -5068,14 +5499,54 @@ (un.release[2] > '6' || (un.release[2] == '6' && un.release[3] == '.' && un.release[4] >= '8'))) { errmsgno(EX_BAD, - "Warning: Linux-2.6.8 introduced incompatible interface changes.\n"); + _("Warning: Linux-2.6.8 introduced incompatible interface changes.\n")); errmsgno(EX_BAD, - "Warning: SCSI transport only works for suid root programs.\n"); + _("Warning: SCSI transport only works for suid root programs.\n")); errmsgno(EX_BAD, - "If you have unsolvable problems, please try Linux-2.4 or Solaris.\n"); + _("If you have unsolvable problems, please try Linux-2.4 or Solaris.\n")); } } #endif #endif } + +LOCAL void +priv_warn(what, msg) + const char *what; + const char *msg; +{ + errmsgno(EX_BAD, "Insufficient '%s' privileges. %s\n", what, msg); +} + +#ifdef TR_DEBUG +EXPORT void +prtrack(trackp) + track_t *trackp; +{ + error("Track: %d\n", (int)(trackp - track_base(trackp))); + error("xfp: %p\n", trackp->xfp); + error("filename: %s\n", trackp->filename); + error("itracksize: %lld\n", (Llong)trackp->itracksize); + error("tracksize: %lld\n", (Llong)trackp->tracksize); + error("trackstart: %ld\n", trackp->trackstart); + error("tracksecs: %ld\n", trackp->tracksecs); + error("padsecs: %ld\n", trackp->padsecs); + error("pregapsize: %ld\n", trackp->pregapsize); + error("index0start: %ld\n", trackp->index0start); + error("isecsize: %d\n", trackp->isecsize); + error("secsize: %d\n", trackp->secsize); + error("secspt: %d\n", trackp->secspt); + error("pktsize: %d\n", trackp->pktsize); + error("dataoff: %d\n", trackp->dataoff); + error("tracks: %d\n", trackp->tracks); + error("track: %d\n", trackp->track); + error("trackno: %d\n", trackp->trackno); + error("tracktype: %d\n", trackp->tracktype); + error("dbtype: %d\n", trackp->dbtype); + error("sectype: %2.2X\n", trackp->sectype); + error("flags: %X\n", trackp->flags); + error("nindex: %d\n", trackp->nindex); + +} +#endif diff -Nru cdrtools-2.01.01a33/cdrecord/cdrecord.dfl cdrtools-3.02a09/cdrecord/cdrecord.dfl --- cdrtools-2.01.01a33/cdrecord/cdrecord.dfl 2018-05-12 16:55:34.000000000 +0000 +++ cdrtools-3.02a09/cdrecord/cdrecord.dfl 2014-01-03 21:59:27.000000000 +0000 @@ -1,19 +1,20 @@ -#ident @(#)cdrecord.dfl 1.5 05/08/09 Copyr 1998 J. Schilling +#ident @(#)cdrecord.dfl 1.8 14/01/03 Copyr 1998-2014 J. Schilling # # This file is /etc/default/cdrecord # It contains defaults that are used if no command line option # or environment is present. # # The default device, if not specified elswhere +# Note that since Sommer 2006, cdrecord by default searches for a +# single CD-ROM device. You should set CDR_DEVICE= together with +# an entry in the device table below only if you have more than +# one CR-ROM drive in your system. # -# Do not set CDR_DEVICE by default. If unset, cdrecord will -# choose the correct drive, if only one is present! -# -# CDR_DEVICE=yamaha -# CDR_DEVICE=default +#CDR_DEVICE=yamaha +#CDR_DEVICE=default # -# The default speed, if not specified elswhere +# The default speed (speed=), if not specified elswhere # # Note that newer cdrecord versions do not default # to speed=1. For MMC compliant drives, the default @@ -22,12 +23,20 @@ # #CDR_SPEED=40 -# -# The default FIFO size if, not specified elswhere +# +# The default FIFO size (fs=), if not specified elswhere # #CDR_FIFOSIZE=16m # +# The default transfer size (ts=), if not specified elswhere +# The cdrecord default transfer size (currently) is 63k because +# Linux and Solaris have problems with bigger transfer sizes. +# If you are on FreeBSD, it is recommened to set CDR_TRANSFERSIZE=126k +# +#CDR_TRANSFERSIZE=32k + +# # The following definitions allow abstract device names. # They are used if the device name does not contain the # the characters ',', ':', '/' and '@' @@ -35,14 +44,26 @@ # Unless you have a good reason, use speed == -1 and let # cdrecord use it's intercal drive specific defaults. # -# drive name device speed fifosize driveropts +# Call cdrecord -scanbus to find the right "device name" for your +# drive. Then set up a list entry with an arbitraty logical name, +# followed by the SCSI device name of the drive. If speed or fifosize +# should stay with the defaults, insert a -1. If you do not need to +# set driveropts, use an empty string. The transfer size entry may be omitted. +# It is recommended to set "burnfree". +# +# The logical device name must be followed by an equal sign, the fields may +# be separated by one or more tab or space. +# +# drive name device speed fifosize driveropts transfersize # -default= USCSI:1,0,0 -1 -1 burnfree +my-default= 1,0,0 -1 -1 burnfree 63k +sol-default= USCSI:1,0,0 -1 -1 burnfree ricoh-u= USCSI:0,2,0 -1 -1 burnfree -teac= 1,3,0 -1 -1 "" -panasonic= 1,4,0 -1 -1 "" -plextor= 1,4,0 -1 -1 "" -sanyo= 1,4,0 -1 -1 burnfree -yamaha= 1,5,0 -1 -1 "" -cdrom= 0,6,0 2 1m "" -remote= REMOTE:rscsi@somehost:1,0,0 16 16m burnfree +teac= 1,3,0 -1 -1 "" +teac-max-ts= 1,3,0 -1 -1 "" 32k +panasonic= 1,4,0 -1 -1 "" +plextor= 1,4,0 -1 -1 "" +sanyo= 1,4,0 -1 -1 burnfree +yamaha= 1,5,0 -1 -1 "" +cdrom= 0,6,0 2 1m "" +remote= REMOTE:rscsi@somehost:1,0,0 16 16m burnfree diff -Nru cdrtools-2.01.01a33/cdrecord/cdrecord.h cdrtools-3.02a09/cdrecord/cdrecord.h --- cdrtools-2.01.01a33/cdrecord/cdrecord.h 2007-08-09 22:10:00.000000000 +0000 +++ cdrtools-3.02a09/cdrecord/cdrecord.h 2013-05-28 18:26:16.000000000 +0000 @@ -1,8 +1,8 @@ -/* @(#)cdrecord.h 1.194 07/08/10 Copyright 1995-2007 J. Schilling */ +/* @(#)cdrecord.h 1.205 13/05/28 Copyright 1995-2013 J. Schilling */ /* * Definitions for cdrecord * - * Copyright (c) 1995-2007 J. Schilling + * Copyright (c) 1995-2013 J. Schilling */ /* * The contents of this file are subject to the terms of the @@ -19,9 +19,8 @@ /* * Make sure it is there. We need it for off_t. */ -#ifndef _INCL_SYS_TYPES_H -#include -#define _INCL_SYS_TYPES_H +#ifndef _SCHILY_TYPES_H +#include #endif #ifndef _SCHILY_UTYPES_H @@ -94,11 +93,12 @@ * It only has 256kB of buffer RAM. * * WARNING: Philips CDD 521 dies if CDR_BUF_SIZE is to big. - * If you like to support the CDD 521 keep the buffer - * at 63kB. + * If you like to support the CDD 521 keep the old buffer + * size at 63kB. */ -/*#define CDR_BUF_SIZE (126*1024)*/ +/*#define CDR_BUF_SIZE (126*1024)*/ #define CDR_BUF_SIZE (63*1024) +#define CDR_OLD_BUF_SIZE (63*1024) #define CDR_MAX_BUF_SIZE (256*1024) /* @@ -213,6 +213,8 @@ #define TI_SAO 0x400000 /* This track is written in SAO mode */ #define TI_USEINFO 0x800000 /* Use information from *.inf files */ #define TI_QUADRO 0x1000000 /* Four Channel Audio Data */ +#define TI_STDIN 0x2000000 /* Track read is from stdin */ +#define TI_HIDDEN 0x4000000 /* Track is hidden / has hidden Tr. */ #define is_audio(tp) (((tp)->flags & TI_AUDIO) != 0) @@ -237,6 +239,7 @@ #define is_clone(tp) (((tp)->flags & TI_CLONE) != 0) #define is_text(tp) (((tp)->flags & TI_TEXT) != 0) #define is_quadro(tp) (((tp)->flags & TI_QUADRO) != 0) +#define is_hidden(tp) (((tp)->flags & TI_HIDDEN) != 0) /* * Defines for toc type / track type @@ -612,6 +615,7 @@ typedef struct disk_status dstat_t; struct disk_status { + track_t *ds_trackp; /* Pointer to track structure */ UInt32_t ds_diskid; /* Disk identification */ UInt16_t ds_cdrflags; /* Recording flags from cdrecord*/ UInt16_t ds_flags; /* Disk_status flags */ @@ -819,6 +823,7 @@ extern int get_buf __PR((int f, track_t *trackp, long secno, char **bpp, int size)); #ifdef _SCG_SCSITRANSP_H extern int write_secs __PR((SCSI *scgp, cdr_t *dp, char *bp, long startsec, int bytespt, int secspt, BOOL islast)); +extern int write_track_data __PR((SCSI *scgp, cdr_t *, track_t *)); extern int pad_track __PR((SCSI *scgp, cdr_t *dp, track_t *trackp, long startsec, Llong amt, BOOL dolast, Llong *bytesp)); @@ -843,7 +848,7 @@ /* * fifo.c */ -extern void init_fifo __PR((long)); +extern long init_fifo __PR((long)); extern BOOL init_faio __PR((track_t *track, int)); extern BOOL await_faio __PR((void)); extern void kill_faio __PR((void)); @@ -1046,6 +1051,7 @@ extern int get_singlespeed __PR((int mt)); extern float get_secsps __PR((int mt)); extern char *get_mclassname __PR((int mt)); +extern int get_blf __PR((int mt)); #ifdef _SCG_SCSITRANSP_H extern int print_features __PR((SCSI *scgp)); extern int check_writemodes_mmc __PR((SCSI *scgp, cdr_t *dp)); @@ -1062,6 +1068,7 @@ #ifdef _SCG_SCSITRANSP_H #ifdef _SCSIMMC_H extern int get_diskinfo __PR((SCSI *scgp, struct disk_info *dip, int cnt)); +extern char *get_ses_type __PR((int ses_type)); extern void print_diskinfo __PR((struct disk_info *dip, BOOL is_cd)); #endif extern int prdiskstatus __PR((SCSI *scgp, cdr_t *dp, BOOL is_cd)); @@ -1090,6 +1097,7 @@ extern int attach_unknown __PR((void)); #ifdef _SCG_SCSITRANSP_H extern int blank_dummy __PR((SCSI *scgp, cdr_t *, long addr, int blanktype)); +extern int blank_simul __PR((SCSI *scgp, cdr_t *, long addr, int blanktype)); EXPORT int format_dummy __PR((SCSI *scgp, cdr_t *, int fmtflags)); extern int drive_getdisktype __PR((SCSI *scgp, cdr_t *dp)); extern int cmd_ill __PR((SCSI *scgp)); @@ -1120,6 +1128,7 @@ * isosize.c */ extern Llong isosize __PR((int f)); +extern Llong bisosize __PR((char *bp, int len)); /* * audiosize.c @@ -1133,6 +1142,7 @@ * auinfo.c */ extern BOOL auinfosize __PR((char *name, track_t *trackp)); +extern BOOL auinfhidden __PR((char *name, int track, track_t *trackp)); extern void auinfo __PR((char *name, int track, track_t *trackp)); #ifdef CDTEXT_H extern textptr_t *gettextptr __PR((int track, track_t *trackp)); @@ -1204,3 +1214,24 @@ #ifdef EOF /* stdio.h has been included */ extern void fparsecue __PR((FILE *f, track_t trackp[])); #endif + +/* + * vendor.c + */ + +/* + * priv.c + */ +#ifdef CDDA2WAV +extern void priv_init __PR((void)); +extern void priv_on __PR((void)); +extern void priv_off __PR((void)); +#endif +#if defined(CDRECORD) || defined(READCD) +extern void priv_drop __PR((void)); +extern BOOL priv_from_priv __PR((void)); +#endif +extern BOOL priv_eff_priv __PR((int pname)); +#ifdef HAVE_SOLARIS_PPRIV +extern void do_pfexec __PR((int ac, char *av[], ...)); +#endif diff -Nru cdrtools-2.01.01a33/cdrecord/cdtext.c cdrtools-3.02a09/cdrecord/cdtext.c --- cdrtools-2.01.01a33/cdrecord/cdtext.c 2006-09-13 15:35:12.000000000 +0000 +++ cdrtools-3.02a09/cdrecord/cdtext.c 2011-04-03 17:36:04.000000000 +0000 @@ -1,12 +1,13 @@ -/* @(#)cdtext.c 1.11 06/09/13 Copyright 1999-2004 J. Schilling */ +/* @(#)cdtext.c 1.20 11/04/03 Copyright 1999-2011 J. Schilling */ +#include #ifndef lint -static char sccsid[] = - "@(#)cdtext.c 1.11 06/09/13 Copyright 1999-2004 J. Schilling"; +static UConst char sccsid[] = + "@(#)cdtext.c 1.20 11/04/03 Copyright 1999-2011 J. Schilling"; #endif /* * Generic CD-Text support functions * - * Copyright (c) 1999-2004 J. Schilling + * Copyright (c) 1999-2011 J. Schilling */ /* * The contents of this file are subject to the terms of the @@ -21,13 +22,14 @@ */ #include -#include +#include #include #include /* Include sys/types.h to make off_t available */ #include #include #include #include +#include #include /* For write_leadin() */ @@ -98,6 +100,7 @@ txtpack_t *tp; char *p; txtsize_t *tsize; + txtpack_t *endp; int seqno; } txtarg_t; @@ -114,7 +117,9 @@ LOCAL void fillpacks __PR((txtarg_t *ap, char *from, int len, int track_no, int pack_type)); EXPORT int write_cdtext __PR((SCSI *scgp, cdr_t *dp, long startsec)); LOCAL void eight2six __PR((Uchar *in, Uchar *out)); +#ifdef __needed__ LOCAL void six2eight __PR((Uchar *in, Uchar *out)); +#endif EXPORT BOOL @@ -132,39 +137,48 @@ off_t fs; if ((f = fileopen(fname, "rb")) == NULL) { - errmsg("Cannot open '%s'.\n", fname); + errmsg(_("Cannot open '%s'.\n"), fname); return (FALSE); } fs = filesize(f); + if (fs == (off_t)0) { + errmsgno(EX_BAD, _("Empty CD-Text file.\n")); + fclose(f); + return (FALSE); + } j = fs % sizeof (struct textpack); if (j == 4) { n = fileread(f, hbuf, 4); if (n != 4) { if (n < 0) - errmsg("Cannot read '%s'.\n", fname); + errmsg(_("Cannot read '%s'.\n"), fname); else - errmsgno(EX_BAD, "File '%s' is too small for CD-Text.\n", fname); + errmsgno(EX_BAD, _("File '%s' is too small for CD-Text.\n"), fname); + fclose(f); return (FALSE); } len = hbuf[0] * 256 + hbuf[1]; len -= 2; n = fs - 4; if (n != len) { - errmsgno(EX_BAD, "Inconsistent CD-Text file '%s' length should be %d but is %lld\n", + errmsgno(EX_BAD, _("Inconsistent CD-Text file '%s' length should be %d but is %lld\n"), fname, len+4, (Llong)fs); + fclose(f); return (FALSE); } } else if (j != 0) { - errmsgno(EX_BAD, "Inconsistent CD-Text file '%s' not a multiple of pack length\n", + errmsgno(EX_BAD, _("Inconsistent CD-Text file '%s' not a multiple of pack length\n"), fname); + fclose(f); return (FALSE); } else { len = fs; } - printf("Text len: %d\n", len); + printf(_("Text len: %d\n"), len); bp = malloc(len); if (bp == NULL) { - errmsg("Cannot malloc CD-Text read buffer.\n"); + errmsg(_("Cannot malloc CD-Text read buffer.\n")); + fclose(f); return (FALSE); } n = fileread(f, bp, len); @@ -172,8 +186,9 @@ tp = (struct textpack *)bp; for (n = 0; n < len; n += sizeof (struct textpack), tp++) { if (tp->pack_type < 0x80 || tp->pack_type > 0x8F) { - errmsgno(EX_BAD, "Illegal pack type 0x%02X pack #%ld in CD-Text file '%s'.\n", + errmsgno(EX_BAD, _("Illegal pack type 0x%02X pack #%ld in CD-Text file '%s'.\n"), tp->pack_type, (long)(n/sizeof (struct textpack)), fname); + fclose(f); return (FALSE); } crc = (tp->crc[0] & 0xFF) << 8 | (tp->crc[1] & 0xFF); @@ -181,22 +196,26 @@ if (crc != calcCRC((Uchar *)tp, sizeof (*tp)-2)) { if (cdtext_crc_ok(tp)) { errmsgno(EX_BAD, - "Corrected CRC ERROR in pack #%ld (offset %d-%ld) in CD-Text file '%s'.\n", + _("Corrected CRC ERROR in pack #%ld (offset %d-%ld) in CD-Text file '%s'.\n"), (long)(n/sizeof (struct textpack)), n+j, (long)(n+j+sizeof (struct textpack)), fname); } else { - errmsgno(EX_BAD, "CRC ERROR in pack #%ld (offset %d-%ld) in CD-Text file '%s'.\n", + errmsgno(EX_BAD, _("CRC ERROR in pack #%ld (offset %d-%ld) in CD-Text file '%s'.\n"), (long)(n/sizeof (struct textpack)), n+j, (long)(n+j+sizeof (struct textpack)), fname); + fclose(f); return (FALSE); } } } setuptextdata(bp, len); free(bp); + fclose(f); + if (textlen == 0 || textsub == NULL) + return (FALSE); return (TRUE); } @@ -211,10 +230,14 @@ Uchar *p; if (xdebug) { - printf("%ld packs %% 4 = %ld\n", + printf(_("%ld packs %% 4 = %ld\n"), (long)(len/sizeof (struct textpack)), (long)(len/sizeof (struct textpack)) % 4); } + if (len == 0) { + errmsgno(EX_BAD, _("No CD-Text data found.\n")); + return; + } i = (len/sizeof (struct textpack)) % 4; if (i == 0) { n = len; @@ -226,7 +249,8 @@ n = (n * 4) / 3; p = malloc(n); if (p == NULL) { - errmsg("Cannot malloc CD-Text write buffer.\n"); + errmsg(_("Cannot malloc CD-Text write buffer.\n")); + return; } for (i = 0, j = 0; j < n; ) { eight2six(&bp[i%len], &p[j]); @@ -301,7 +325,8 @@ struct textpack *tp; struct textsizes tsize; txtarg_t targ; - char sbuf[256*18]; + char sbuf[256*18]; /* Sufficient for a single language block */ + /* Max 8 languages in total... */ fillbytes(sbuf, sizeof (sbuf), 0); fillbytes(&tsize, sizeof (tsize), 0); @@ -323,6 +348,7 @@ targ.tp = tp; targ.p = NULL; targ.tsize = &tsize; + targ.endp = (struct textpack *)&sbuf[256 * sizeof (struct textpack)]; targ.seqno = 0; for (type = 0; type <= 0x0E; type++) { @@ -419,6 +445,11 @@ p = ap->p; charpos = 0; do { + if (tp >= ap->endp) { + comerrno(EX_BAD, + _("CD-Text size overflow in track %d.\n"), + track_no); + } if (p == 0) { p = tp->text; tp->pack_type = pack_type; @@ -465,6 +496,9 @@ int secs; int nbytes; + if (textlen <= 0) + return (-1); + /*maxdma = 4320;*/ if (maxdma >= (2*textlen)) { /* @@ -504,7 +538,7 @@ amount = write_secs(scgp, dp, (char *)&bp[idx], startsec, nbytes, secs, FALSE); if (amount < 0) { - printf("write CD-Text data: error after %ld bytes\n", + printf(_("write CD-Text data: error after %ld bytes\n"), bytes); return (-1); } @@ -540,6 +574,7 @@ out[3] = c & 0x3F; } +#ifdef __needed__ /* * 4 input bytes (6 bit based) are converted into 3 output bytes (8 bit based). */ @@ -564,3 +599,4 @@ c = in[3] & 0x3F; out[2] |= c; } +#endif diff -Nru cdrtools-2.01.01a33/cdrecord/clone.c cdrtools-3.02a09/cdrecord/clone.c --- cdrtools-2.01.01a33/cdrecord/clone.c 2006-09-13 15:35:12.000000000 +0000 +++ cdrtools-3.02a09/cdrecord/clone.c 2010-12-19 18:39:36.000000000 +0000 @@ -1,12 +1,13 @@ -/* @(#)clone.c 1.8 06/09/13 Copyright 2001-2004 J. Schilling */ +/* @(#)clone.c 1.12 10/12/19 Copyright 2001-2010 J. Schilling */ +#include #ifndef lint -static char sccsid[] = - "@(#)clone.c 1.8 06/09/13 Copyright 2001-2004 J. Schilling"; +static UConst char sccsid[] = + "@(#)clone.c 1.12 10/12/19 Copyright 2001-2010 J. Schilling"; #endif /* * Clone Subchannel processing * - * Copyright (c) 2001-2004 J. Schilling + * Copyright (c) 2001-2010 J. Schilling */ /* * The contents of this file are subject to the terms of the @@ -21,7 +22,7 @@ */ #include -#include +#include #include #include #include @@ -29,6 +30,7 @@ #include #include #include +#include #include #include @@ -88,17 +90,17 @@ f = open(filename, O_RDONLY|O_BINARY); if (f < 0) - comerr("Cannot open '%s'.\n", filename); + comerr(_("Cannot open '%s'.\n"), filename); amt = read(f, buf, sizeof (buf)); if (amt == sizeof (buf)) - comerrno(EX_BAD, "TOC too large.\n"); + comerrno(EX_BAD, _("TOC too large.\n")); close(f); tp = (struct tocheader *)buf; len = a_to_u_2_byte(tp->len) + sizeof (struct tocheader)-2; if (xdebug) { - printf("Read %d bytes TOC len: %d first session: %d last session: %d\n", + printf(_("Read %d bytes TOC len: %d first session: %d last session: %d\n"), amt, len, tp->first, tp->last); } @@ -109,7 +111,7 @@ if (xdebug) scg_prbytes("FT", (Uchar *)&buf[i], 11); if (fp->sess_number != 1) - comerrno(EX_BAD, "Can only copy session # 1.\n"); + comerrno(EX_BAD, _("Can only copy session # 1.\n")); if (fp->adr == 1) { if (fp->point < first) { @@ -173,16 +175,16 @@ printf("first %u last %u ctrl first: %X ctrl last %X\n", first, last, ctrl_first, ctrl_last); } if (trackp->tracks != 1) - comerrno(EX_BAD, "Clone writing currently supports only one file argument.\n"); + comerrno(EX_BAD, _("Clone writing currently supports only one file argument.\n")); if (loutstart > trackp[1].tracksecs) - comerrno(EX_BAD, "Clone writing TOC length %ld does not match track length %ld\n", + comerrno(EX_BAD, _("Clone writing TOC length %ld does not match track length %ld\n"), loutstart, trackp[1].tracksecs); if (amt > len) { sectype_first = buf[len]; sectype_last = buf[len+1]; if (xdebug) { - printf("sectype first: %X sectype last %X\n", + printf(_("sectype first: %X sectype last %X\n"), sectype_first, sectype_last); } } diff -Nru cdrtools-2.01.01a33/cdrecord/COPYING cdrtools-3.02a09/cdrecord/COPYING --- cdrtools-2.01.01a33/cdrecord/COPYING 2007-08-07 15:22:51.000000000 +0000 +++ cdrtools-3.02a09/cdrecord/COPYING 2009-04-10 20:48:43.000000000 +0000 @@ -1,4 +1,4 @@ -# @(#)LIMITATIONS 1.2 07/08/07 Copyright 2002-2007 J. Schilling +# @(#)LIMITATIONS 1.3 09/04/10 Copyright 2002-2007 J. Schilling This software is under CDDL but you should read the following clarifications: @@ -28,7 +28,7 @@ as you are still allowed to make any changes you like in case you: -- clearly document that you don't care about compatibilty (e.g. identical +- clearly document that you don't care about compatibility (e.g. identical behavior on all supported platforms) or quality (in case you use an unaproved build system) diff -Nru cdrtools-2.01.01a33/cdrecord/crc16.c cdrtools-3.02a09/cdrecord/crc16.c --- cdrtools-2.01.01a33/cdrecord/crc16.c 2006-09-13 15:35:12.000000000 +0000 +++ cdrtools-3.02a09/cdrecord/crc16.c 2009-07-05 18:02:21.000000000 +0000 @@ -1,7 +1,8 @@ -/* @(#)crc16.c 1.7 06/09/13 Copyright 1998-2004 J. Schilling */ +/* @(#)crc16.c 1.9 09/07/05 Copyright 1998-2009 J. Schilling */ +#include #ifndef lint -static char sccsid[] = - "@(#)crc16.c 1.7 06/09/13 Copyright 1998-2004 J. Schilling"; +static UConst char sccsid[] = + "@(#)crc16.c 1.9 09/07/05 Copyright 1998-2009 J. Schilling"; #endif /* * Q-subchannel CRC subroutines @@ -10,7 +11,7 @@ * If computed over 12 bytes, the result must be zero. * On the disk the CRC bits are inverted. * - * Copyright (c) 1998-2003 J. Schilling + * Copyright (c) 1998-2009 J. Schilling */ /* * The contents of this file are subject to the terms of the diff -Nru cdrtools-2.01.01a33/cdrecord/cue.c cdrtools-3.02a09/cdrecord/cue.c --- cdrtools-2.01.01a33/cdrecord/cue.c 2007-04-08 14:29:17.000000000 +0000 +++ cdrtools-3.02a09/cdrecord/cue.c 2013-12-21 20:59:22.000000000 +0000 @@ -1,12 +1,13 @@ -/* @(#)cue.c 1.33 07/04/08 Copyright 2001-2007 J. Schilling */ +/* @(#)cue.c 1.57 13/12/21 Copyright 2001-2013 J. Schilling */ +#include #ifndef lint -static char sccsid[] = - "@(#)cue.c 1.33 07/04/08 Copyright 2001-2007 J. Schilling"; +static UConst char sccsid[] = + "@(#)cue.c 1.57 13/12/21 Copyright 2001-2013 J. Schilling"; #endif /* * Cue sheet parser * - * Copyright (c) 2001-2007 J. Schilling + * Copyright (c) 2001-2013 J. Schilling */ /* * The contents of this file are subject to the terms of the @@ -15,13 +16,15 @@ * with the License. * * See the file CDDL.Schily.txt in this distribution for details. + * A copy of the CDDL is also available via the Internet at + * http://www.opensource.org/licenses/cddl1.txt * * When distributing Covered Code, include this CDDL HEADER in each * file and include the License file CDDL.Schily.txt from this distribution. */ #include -#include +#include #include #include #include @@ -29,9 +32,10 @@ #include #include #include +#include #include #include -#include +#include #include #include "xio.h" @@ -40,35 +44,61 @@ #include "auheader.h" #include "schily/libport.h" +/*#define PARSE_DEBUG*/ + typedef struct state { - char *filename; - void *xfp; - Llong trackoff; - Llong filesize; - int filetype; - int tracktype; - int sectype; - int dbtype; - int secsize; - int dataoff; - int state; - int track; - int index; - long index0; - long index1; /* Current index 1 value */ - long secoff; /* Old index 1 value */ - long pregapsize; - long postgapsize; - int flags; + char *filename; /* Name of file to open */ + void *xfp; /* Open file */ + Llong trackoff; /* Current offset in open file */ + Llong filesize; /* Size of current open file */ + int filetype; /* File type (e.g. K_WAVE) */ + int tracktype; /* Track type (e.g. TOC_DA) */ + int sectype; /* Sector type (e.g. SECT_AUDIO)*/ + int dbtype; /* Data block type (e.g. DB_RAW)*/ + int secsize; /* Sector size from TRACK type */ + int dataoff; /* Data offset from Track type */ + int state; /* Current state of the parser */ + int prevstate; /* Previous state of the parser */ + int track; /* Relative Track index */ + int trackno; /* Absolute Track number on disk*/ + int index; /* Last INDEX xx number parsed */ + long index0; /* Current INDEX 00 if found */ + long index1; /* Current INDEX 01 if found */ + long secoff; /* Last INDEX 01 value in file */ + long pregapsize; /* Pregap size from PREGAP */ + long postgapsize; /* Postgap size from POSTGAP */ + int flags; /* Track flags (e.g. TI_COPY) */ + int pflags; /* Parser flags */ } state_t; -#define STATE_NONE 0 -#define STATE_POSTGAP 1 -#define STATE_FILE 2 -#define STATE_TRACK 3 -#define STATE_FLAGS 4 -#define STATE_INDEX0 5 -#define STATE_INDEX1 6 +/* + * Values for "state" and "prevstate". + */ +#define STATE_NONE 0 /* Initial state of parser */ +#define STATE_POSTGAP 1 /* Past INDEX before FILE/TRACK */ +#define STATE_FILE 2 /* FILE keyword found */ +#define STATE_TRACK 3 /* TRACK keyword found */ +#define STATE_FLAGS 4 /* FLAGS past TRACK before INDEX*/ +#define STATE_INDEX0 5 /* INDEX 00 found */ +#define STATE_INDEX1 6 /* INDEX 01 found */ +#define STATE_MAX 6 /* # of entries in states[] */ + +/* + * Flag bits used in "pflags". + */ +#define PF_CDRTOOLS_EXT 0x01 /* Cdrtools extensions allowed */ +#define PF_INDEX0_PREV 0x02 /* INDEX 00 belongs to prev FILE*/ +#define PF_FILE_FOUND 0x04 /* FILE command found for TRACK */ + +LOCAL char *states[] = { + "NONE", + "POSTGAP", + "FILE", + "TRACK", + "FLAGS", + "INDEX 00", + "INDEX 01" +}; typedef struct keyw { char *k_name; @@ -101,34 +131,56 @@ * FLAGS | ISRC | PERFORMER | PREGAP | SONGWRITER | TITLE * INDEX * POSTGAP + * + * Additional keyword rules: + * CATALOG once + * CDTEXTFILE once + * FILE before "other command" + * FLAGS one per TRACK, after TRACK before INDEX + * INDEX >= 0, <= 99, first 0 or 1, sequential, + * first index of a FILE at 00:00:00 + * ISRC after TRACK before INDEX + * PERFORMER + * POSTGAP one per TRACK, after all INDEX for current TRACK + * PREGAP one per TRACK, after TRACK before INDEX + * REM + * SONGWRITER + * TITLE + * TRACK >= 1, <= 99, sequential, >= 1 TRACK per FILE */ #define K_G 0x10000 /* Global */ #define K_T 0x20000 /* Track local */ #define K_A (K_T | K_G) /* Global & Track local */ -#define K_MCN (0 | K_G) /* Media catalog number */ -#define K_TEXTFILE (1 | K_G) /* CD-Text binary file */ -#define K_FILE (2 | K_T) /* Input data file */ -#define K_FLAGS (3 | K_T) /* Flags for ctrl nibble */ -#define K_INDEX (4 | K_T) /* Index marker for track */ -#define K_ISRC (5 | K_T) /* ISRC string for track */ -#define K_PERFORMER (6 | K_A) /* CD-Text Performer */ -#define K_POSTGAP (7 | K_T) /* Post gap for track (autogen) */ -#define K_PREGAP (8 | K_T) /* Pre gap for track (autogen) */ -#define K_REM (9 | K_A) /* Remark (Comment) */ -#define K_SONGWRITER (10| K_A) /* CD-Text Songwriter */ -#define K_TITLE (11| K_A) /* CD-Text Title */ -#define K_TRACK (12| K_T) /* Track marker */ +#define K_ARRANGER (0 | K_A) /* CD-Text Arranger */ +#define K_MCN (1 | K_G) /* Media catalog number */ +#define K_TEXTFILE (2 | K_G) /* CD-Text binary file */ +#define K_COMPOSER (3 | K_A) /* CD-Text Composer */ +#define K_FILE (4 | K_T) /* Input data file */ +#define K_FLAGS (5 | K_T) /* Flags for ctrl nibble */ +#define K_INDEX (6 | K_T) /* Index marker for track */ +#define K_ISRC (7 | K_T) /* ISRC string for track */ +#define K_MESSAGE (8 | K_A) /* CD-Text Message */ +#define K_PERFORMER (9 | K_A) /* CD-Text Performer */ +#define K_POSTGAP (10 | K_T) /* Post gap for track (autogen) */ +#define K_PREGAP (11 | K_T) /* Pre gap for track (autogen) */ +#define K_REM (12 | K_A) /* Remark (Comment) */ +#define K_SONGWRITER (13| K_A) /* CD-Text Songwriter */ +#define K_TITLE (14| K_A) /* CD-Text Title */ +#define K_TRACK (15| K_T) /* Track marker */ LOCAL keyw_t keywords[] = { + { "ARRANGER", K_ARRANGER }, /* Not supported by CDR-WIN */ { "CATALOG", K_MCN }, { "CDTEXTFILE", K_TEXTFILE }, + { "COMPOSER", K_COMPOSER }, /* Not supported by CDR-WIN */ { "FILE", K_FILE }, { "FLAGS", K_FLAGS }, { "INDEX", K_INDEX }, { "ISRC", K_ISRC }, + { "MESSAGE", K_MESSAGE }, /* Not supported by CDR-WIN */ { "PERFORMER", K_PERFORMER }, { "POSTGAP", K_POSTGAP }, { "PREGAP", K_PREGAP }, @@ -146,26 +198,28 @@ * BINARY - Intel binary file (least significant byte first) * MOTOTOLA - Motorola binary file (most significant byte first) * AIFF - Audio AIFF file - * AU - Sun Audio file * WAVE - Audio WAVE file * MP3 - Audio MP3 file + * AU - Sun Audio file + * OGG - Audio OGG file */ #define K_BINARY 100 #define K_MOTOROLA 101 #define K_AIFF 102 -#define K_AU 103 -#define K_WAVE 104 -#define K_MP3 105 +#define K_WAVE 103 +#define K_MP3 104 +#define K_FT_CDRWIN_MAX 104 +#define K_AU 105 #define K_OGG 106 LOCAL keyw_t filetypes[] = { { "BINARY", K_BINARY }, { "MOTOROLA", K_MOTOROLA }, { "AIFF", K_AIFF }, - { "AU", K_AU }, { "WAVE", K_WAVE }, { "MP3", K_MP3 }, - { "OGG", K_OGG }, + { "AU", K_AU }, /* Not supported by CDR-WIN */ + { "OGG", K_OGG }, /* Not supported by CDR-WIN */ { NULL, 0 }, }; @@ -180,6 +234,7 @@ #define K_4CH 1001 #define K_PRE 1002 #define K_SCMS 1003 +#define K_FL_CDRWIN_MAX 1003 LOCAL keyw_t flags[] = { { "DCP", K_DCP }, @@ -205,6 +260,7 @@ #define K_MODE1 10002 #define K_MODE2 10003 #define K_CDI 10004 +#define K_DT_CDRWIN_MAX 10004 LOCAL keyw_t dtypes[] = { { "AUDIO", K_AUDIO }, @@ -221,15 +277,19 @@ #endif EXPORT int parsecue __PR((char *cuefname, track_t trackp[])); EXPORT void fparsecue __PR((FILE *f, track_t trackp[])); +LOCAL void parse_arranger __PR((track_t trackp[], state_t *sp)); LOCAL void parse_mcn __PR((track_t trackp[], state_t *sp)); LOCAL void parse_textfile __PR((track_t trackp[], state_t *sp)); +LOCAL void parse_composer __PR((track_t trackp[], state_t *sp)); LOCAL void parse_file __PR((track_t trackp[], state_t *sp)); LOCAL void parse_flags __PR((track_t trackp[], state_t *sp)); LOCAL void parse_index __PR((track_t trackp[], state_t *sp)); LOCAL void parse_isrc __PR((track_t trackp[], state_t *sp)); +LOCAL void parse_message __PR((track_t trackp[], state_t *sp)); LOCAL void parse_performer __PR((track_t trackp[], state_t *sp)); LOCAL void parse_postgap __PR((track_t trackp[], state_t *sp)); LOCAL void parse_pregap __PR((track_t trackp[], state_t *sp)); +LOCAL void parse_rem __PR((track_t trackp[], state_t *sp)); LOCAL void parse_songwriter __PR((track_t trackp[], state_t *sp)); LOCAL void parse_title __PR((track_t trackp[], state_t *sp)); LOCAL void parse_track __PR((track_t trackp[], state_t *sp)); @@ -237,27 +297,37 @@ LOCAL void newtrack __PR((track_t trackp[], state_t *sp)); LOCAL keyw_t *lookup __PR((char *word, keyw_t table[])); +LOCAL char *state_name __PR((int st)); #ifdef DEBUG LOCAL void wdebug __PR((void)); #endif LOCAL FILE *cueopen __PR((char *name)); LOCAL char *cuename __PR((void)); LOCAL char *nextline __PR((FILE *f)); +#ifdef __needed__ LOCAL void ungetline __PR((void)); +#endif LOCAL char *skipwhite __PR((const char *s)); LOCAL char *peekword __PR((void)); LOCAL char *lineend __PR((void)); LOCAL char *markword __PR((char *delim)); LOCAL char getworddelim __PR((void)); LOCAL char *getnextitem __PR((char *delim)); -LOCAL char *neednextitem __PR((char *delim)); +LOCAL char *neednextitem __PR((char *delim, char *type)); +#ifdef __needed__ LOCAL char *nextword __PR((void)); -LOCAL char *needword __PR((void)); +#endif +LOCAL char *needword __PR((char *type)); LOCAL char *curword __PR((void)); LOCAL char *nextitem __PR((void)); -LOCAL char *needitem __PR((void)); +LOCAL char *needitem __PR((char *type)); LOCAL void checkextra __PR((void)); +LOCAL void statewarn __PR((state_t *sp, const char *fmt, ...)); +#ifdef __needed__ +LOCAL void cuewarn __PR((const char *fmt, ...)); +#endif LOCAL void cueabort __PR((const char *fmt, ...)); +LOCAL void extabort __PR((const char *fmt, ...)); #ifdef CUE_MAIN int debug; @@ -321,7 +391,9 @@ state.secsize = 0; state.dataoff = 0; state.state = STATE_NONE; + state.prevstate = STATE_NONE; state.track = 0; + state.trackno = 0; state.index = -1; state.index0 = -1; state.index1 = -1; @@ -329,21 +401,26 @@ state.pregapsize = -1; state.postgapsize = -1; state.flags = 0; + state.pflags = 0; if (xdebug > 1) - printf("---> Entering CUE Parser...\n"); + printf(_("---> Entering CUE Parser...\n")); do { if (nextline(f) == NULL) { /* * EOF on CUE File * Do post processing here */ - if (state.state < STATE_INDEX1 && state.state != STATE_POSTGAP) - cueabort("Incomplete CUE file"); - if (state.xfp) + if (state.state < STATE_INDEX1 && state.state != STATE_POSTGAP) { + statewarn(&state, _("INDEX 01 missing")); + cueabort(_("Incomplete CUE file")); + } + if (state.xfp) { xclose(state.xfp); + state.xfp = NULL; + } if (xdebug > 1) { - printf("---> CUE Parser got EOF, found %d tracks.\n", + printf(_("---> CUE Parser got EOF, found %2.2d tracks.\n"), state.track); } return; @@ -353,18 +430,22 @@ continue; if (xdebug > 1) - printf("\nKEY: '%s' %s\n", word, peekword()); + printf(_("\nKEY: '%s' %s\n"), word, peekword()); kp = lookup(word, keywords); if (kp == NULL) - cueabort("Unknown CUE keyword '%s'", word); + cueabort(_("Unknown CUE keyword '%s'"), word); if ((kp->k_type & K_G) == 0) { if (isglobal) isglobal = FALSE; } if ((kp->k_type & K_T) == 0) { - if (!isglobal) - cueabort("Badly placed CUE keyword '%s'", word); + if (!isglobal) { + statewarn(&state, + _("%s keyword must be before first TRACK"), + word); + cueabort(_("Badly placed CUE keyword '%s'"), word); + } } #ifdef DEBUG printf("%s-", isglobal ? "G" : "T"); @@ -373,27 +454,53 @@ switch (kp->k_type) { + case K_ARRANGER: parse_arranger(trackp, &state); break; case K_MCN: parse_mcn(trackp, &state); break; case K_TEXTFILE: parse_textfile(trackp, &state); break; + case K_COMPOSER: parse_composer(trackp, &state); break; case K_FILE: parse_file(trackp, &state); break; case K_FLAGS: parse_flags(trackp, &state); break; case K_INDEX: parse_index(trackp, &state); break; case K_ISRC: parse_isrc(trackp, &state); break; + case K_MESSAGE: parse_message(trackp, &state); break; case K_PERFORMER: parse_performer(trackp, &state); break; case K_POSTGAP: parse_postgap(trackp, &state); break; case K_PREGAP: parse_pregap(trackp, &state); break; - case K_REM: break; + case K_REM: parse_rem(trackp, &state); break; case K_SONGWRITER: parse_songwriter(trackp, &state); break; case K_TITLE: parse_title(trackp, &state); break; case K_TRACK: parse_track(trackp, &state); break; default: - cueabort("Panic: unknown CUE command '%s'", word); + cueabort(_("Panic: unknown CUE command '%s'"), word); } } while (1); } LOCAL void +parse_arranger(trackp, sp) + track_t trackp[]; + state_t *sp; +{ + char *word; + textptr_t *txp; + + if ((sp->pflags & PF_CDRTOOLS_EXT) == 0) + extabort("ARRANGER"); + + if (sp->track > 0 && sp->state > STATE_INDEX0) { + statewarn(sp, _("ARRANGER keyword cannot be after INDEX keyword")); + cueabort(_("Badly placed ARRANGER keyword")); + } + + word = needitem("arranger"); + txp = gettextptr(sp->track, trackp); + txp->tc_arranger = strdup(word); + + checkextra(); +} + +LOCAL void parse_mcn(trackp, sp) track_t trackp[]; state_t *sp; @@ -402,9 +509,9 @@ textptr_t *txp; if (sp->track != 0) - cueabort("CATALOG keyword must be before first TRACK"); + cueabort(_("CATALOG keyword must be before first TRACK")); - word = needitem(); + word = needitem("MCN"); setmcn(word, &trackp[0]); txp = gettextptr(0, trackp); /* MCN is isrc for trk 0 */ txp->tc_isrc = strdup(word); @@ -420,26 +527,49 @@ char *word; if (sp->track != 0) - cueabort("CDTEXTFILE keyword must be before first TRACK"); + cueabort(_("CDTEXTFILE keyword must be before first TRACK")); - word = needitem(); + word = needitem("cdtextfile"); if (trackp[MAX_TRACK+1].flags & TI_TEXT) { if (!checktextfile(word)) { comerrno(EX_BAD, - "Cannot use '%s' as CD-Text file.\n", + _("Cannot use '%s' as CD-Text file.\n"), word); } trackp[0].flags |= TI_TEXT; } else { - errmsgno(EX_BAD, "Ignoring CDTEXTFILE '%s'.\n", word); - errmsgno(EX_BAD, "If you like to write CD-Text, call cdrecord -text.\n"); + errmsgno(EX_BAD, _("Ignoring CDTEXTFILE '%s'.\n"), word); + errmsgno(EX_BAD, _("If you like to write CD-Text, call cdrecord -text.\n")); } checkextra(); } LOCAL void +parse_composer(trackp, sp) + track_t trackp[]; + state_t *sp; +{ + char *word; + textptr_t *txp; + + if ((sp->pflags & PF_CDRTOOLS_EXT) == 0) + extabort("COMPOSER"); + + if (sp->track > 0 && sp->state > STATE_INDEX0) { + statewarn(sp, _("COMPOSER keyword cannot be after INDEX keyword")); + cueabort(_("Badly placed COMPOSER keyword")); + } + + word = needitem("composer"); + txp = gettextptr(sp->track, trackp); + txp->tc_composer = strdup(word); + + checkextra(); +} + +LOCAL void parse_file(trackp, sp) track_t trackp[]; state_t *sp; @@ -455,13 +585,31 @@ #endif if ((sp->state <= STATE_TRACK && sp->state > STATE_POSTGAP) || - (sp->state >= STATE_TRACK && sp->state < STATE_INDEX1)) - cueabort("Badly placed FILE keyword"); + (sp->state >= STATE_TRACK && sp->state < STATE_INDEX1)) { + if (sp->state >= STATE_INDEX0 && sp->state < STATE_INDEX1) { + if ((sp->pflags & PF_CDRTOOLS_EXT) == 0) + extabort(_("FILE keyword after INDEX 00 and before INDEX 01")); + sp->prevstate = sp->state; + goto file_ok; + } + if (sp->state <= STATE_TRACK && sp->state > STATE_POSTGAP) + statewarn(sp, _("FILE keyword only allowed once before TRACK keyword")); + if (sp->state >= STATE_TRACK && sp->state < STATE_INDEX1) + statewarn(sp, _("FILE keyword not allowed after TRACK and before INDEX 01")); + cueabort(_("Badly placed FILE keyword")); + } +file_ok: + if (sp->state < STATE_INDEX1 && sp->pflags & PF_FILE_FOUND) + cueabort(_("Only one FILE keyword allowed per TRACK")); + + sp->pflags |= PF_FILE_FOUND; sp->state = STATE_FILE; - word = needitem(); - if (sp->xfp) + word = needitem("filename"); + if (sp->xfp) { xclose(sp->xfp); + sp->xfp = NULL; + } sp->xfp = xopen(word, O_RDONLY|O_BINARY, 0, X_NOREWIND); if (sp->xfp == NULL && geterrno() == ENOENT) { char *p; @@ -479,18 +627,28 @@ sp->xfp = xopen(word, O_RDONLY|O_BINARY, 0, X_NOREWIND); } } - if (sp->xfp == NULL) - comerr("Cannot open FILE '%s'.\n", word); + if (sp->xfp == NULL) { +#ifdef PARSE_DEBUG + errmsg(_("Cannot open FILE '%s'.\n"), word); +#else + comerr(_("Cannot open FILE '%s'.\n"), word); +#endif + } sp->filename = strdup(word); sp->trackoff = 0; + sp->secoff = 0; sp->filesize = 0; sp->flags &= ~TI_SWAB; /* Reset what we might set for FILE */ - filetype = needitem(); + filetype = needitem("filetype"); kp = lookup(filetype, filetypes); if (kp == NULL) - cueabort("Unknown filetype '%s'", filetype); + cueabort(_("Unknown filetype '%s'"), filetype); + + if ((sp->pflags & PF_CDRTOOLS_EXT) == 0 && + kp->k_type > K_FT_CDRWIN_MAX) + extabort(_("Filetype '%s'"), kp->k_name); switch (kp->k_type) { @@ -499,36 +657,42 @@ if (fstat(xfileno(sp->xfp), &st) >= 0 && S_ISREG(st.st_mode)) { sp->filesize = st.st_size; + if (kp->k_type == K_BINARY) + sp->flags |= TI_SWAB; } else { - cueabort("Unknown file size for FILE '%s'", + cueabort(_("Unknown file size for FILE '%s'"), sp->filename); } break; case K_AIFF: - cueabort("Unsupported filetype '%s'", kp->k_name); + cueabort(_("Unsupported filetype '%s'"), kp->k_name); break; case K_AU: sp->filesize = ausize(xfileno(sp->xfp)); break; case K_WAVE: +#ifdef PARSE_DEBUG + sp->filesize = 1000000000; +#else sp->filesize = wavsize(xfileno(sp->xfp)); +#endif sp->flags |= TI_SWAB; break; case K_MP3: case K_OGG: - cueabort("Unsupported filetype '%s'", kp->k_name); + cueabort(_("Unsupported filetype '%s'"), kp->k_name); break; - default: cueabort("Panic: unknown filetype '%s'", filetype); + default: cueabort(_("Panic: unknown filetype '%s'"), filetype); } if (sp->filesize == AU_BAD_CODING) { - cueabort("Inappropriate audio coding in '%s'", + cueabort(_("Inappropriate audio coding in '%s'"), sp->filename); } if (xdebug > 0) - printf("Track %d File '%s' Filesize %lld\n", - sp->track, sp->filename, sp->filesize); + printf(_("Track[%2.2d] %2.2d File '%s' Filesize %lld\n"), + sp->track, sp->trackno, sp->filename, sp->filesize); sp->filetype = kp->k_type; @@ -538,7 +702,7 @@ #ifdef hint trackp->itracksize = lsize; if (trackp->itracksize != lsize) - comerrno(EX_BAD, "This OS cannot handle large audio images.\n"); + comerrno(EX_BAD, _("This OS cannot handle large audio images.\n")); #endif } @@ -551,15 +715,17 @@ char *word; if ((sp->state < STATE_TRACK) || - (sp->state >= STATE_INDEX0)) - cueabort("Badly placed FLAGS keyword"); + (sp->state >= STATE_INDEX0)) { + statewarn(sp, _("FLAGS keyword must be after TRACK and before INDEX keyword")); + cueabort(_("Badly placed FLAGS keyword")); + } sp->state = STATE_FLAGS; do { - word = needitem(); + word = needitem("flag"); kp = lookup(word, flags); if (kp == NULL) - cueabort("Unknown flag '%s'", word); + cueabort(_("Unknown flag '%s'"), word); switch (kp->k_type) { @@ -567,13 +733,13 @@ case K_4CH: sp->flags |= TI_QUADRO; break; case K_PRE: sp->flags |= TI_PREEMP; break; case K_SCMS: sp->flags |= TI_SCMS; break; - default: cueabort("Panic: unknown FLAG '%s'", word); + default: cueabort(_("Panic: unknown FLAG '%s'"), word); } } while (peekword() < lineend()); if (xdebug > 0) - printf("Track %d flags 0x%08X\n", sp->track, sp->flags); + printf(_("Track[%2.2d] %2.2d flags 0x%08X\n"), sp->track, sp->trackno, sp->flags); } LOCAL void @@ -585,50 +751,77 @@ long l; int track = sp->track; - if (sp->state < STATE_TRACK) - cueabort("Badly placed INDEX keyword"); + if (sp->state < STATE_TRACK) { + if (sp->state == STATE_FILE && + sp->prevstate >= STATE_TRACK && + sp->prevstate <= STATE_INDEX1) { + if ((sp->pflags & PF_CDRTOOLS_EXT) == 0) + extabort(_("INDEX keyword after FILE keyword")); + goto index_ok; + } + statewarn(sp, _("INDEX keyword must be after TRACK keyword")); + cueabort(_("Badly placed INDEX keyword")); + } +index_ok: - word = needitem(); + word = needitem("index"); if (*astolb(word, &l, 10) != '\0') - cueabort("Not a number '%s'", word); + cueabort(_("Not a number '%s'"), word); if (l < 0 || l > 99) - cueabort("Illegal index '%s'", word); + cueabort(_("Illegal index '%s'"), word); if ((sp->index < l) && (((sp->index + 1) == l) || l == 1)) sp->index = l; else - cueabort("Badly placed INDEX %ld number", l); + cueabort(_("Badly placed INDEX %2.2ld number"), l); + + if (sp->state == STATE_FILE) { + if (track == 1 || l > 1) + cueabort(_("INDEX %2.2d not allowed after FILE"), l); + if (l == 1) + sp->pflags |= PF_INDEX0_PREV; + } if (l > 0) sp->state = STATE_INDEX1; else sp->state = STATE_INDEX0; + sp->prevstate = sp->state; parse_offset(&l); if (xdebug > 1) - printf("Track %d Index %d %ld\n", sp->track, sp->index, l); + printf(_("Track[%2.2d] %2.2d Index %2.2d %ld\n"), sp->track, sp->trackno, sp->index, l); - if (sp->index == 0) + if (track == 1 || + !streql(sp->filename, trackp[track-1].filename)) { + /* + * Check for offset 0 when a new file begins. + */ + if (sp->index == 0 && l > 0) + cueabort(_("Bad INDEX 00 offset in CUE file (must be 00:00:00 for new FILE)")); + if (sp->index == 1 && sp->index0 < 0 && l > 0) + cueabort(_("Bad INDEX 01 offset in CUE file (must be 00:00:00 for new FILE)")); + } + + if (sp->index == 0) { sp->index0 = l; - if (sp->index == 1) { + } else if (sp->index == 1) { sp->index1 = l; trackp[track].nindex = 1; newtrack(trackp, sp); if (xdebug > 1) { - printf("Track %d pregapsize %ld\n", - sp->track, trackp[track].pregapsize); + printf(_("Track[%2.2d] %2.2d pregapsize %ld\n"), + sp->track, sp->trackno, trackp[track].pregapsize); } - } - if (sp->index == 2) { + } else if (sp->index == 2) { trackp[track].tindex = malloc(100*sizeof (long)); trackp[track].tindex[1] = 0; trackp[track].tindex[2] = l - sp->index1; trackp[track].nindex = 2; - } - if (sp->index > 2) { + } else if (sp->index > 2) { trackp[track].tindex[sp->index] = l - sp->index1; trackp[track].nindex = sp->index; } @@ -646,14 +839,20 @@ int track = sp->track; if (track == 0) - cueabort("ISRC keyword must be past first TRACK"); + cueabort(_("ISRC keyword must be past first TRACK")); if ((sp->state < STATE_TRACK) || - (sp->state >= STATE_INDEX0)) - cueabort("Badly placed ISRC keyword"); + (sp->state >= STATE_INDEX0)) { + statewarn(sp, _("ISRC keyword must be after TRACK and before INDEX keyword")); + cueabort(_("Badly placed ISRC keyword")); + } sp->state = STATE_FLAGS; - word = needitem(); + word = needitem("ISRC"); + if ((sp->pflags & PF_CDRTOOLS_EXT) == 0 && + strchr(word, '-')) { + extabort(_("'-' in ISRC arg")); + } setisrc(word, &trackp[track]); txp = gettextptr(track, trackp); txp->tc_isrc = strdup(word); @@ -662,6 +861,29 @@ } LOCAL void +parse_message(trackp, sp) + track_t trackp[]; + state_t *sp; +{ + char *word; + textptr_t *txp; + + if ((sp->pflags & PF_CDRTOOLS_EXT) == 0) + extabort("MESSAGE"); + + if (sp->track > 0 && sp->state > STATE_INDEX0) { + statewarn(sp, _("MESSAGE keyword cannot be after INDEX keyword")); + cueabort(_("Badly placed MESSAGE keyword")); + } + + word = needitem("message"); + txp = gettextptr(sp->track, trackp); + txp->tc_message = strdup(word); + + checkextra(); +} + +LOCAL void parse_performer(trackp, sp) track_t trackp[]; state_t *sp; @@ -669,10 +891,12 @@ char *word; textptr_t *txp; - if (sp->track > 0 && sp->state > STATE_INDEX0) - cueabort("Badly placed PERFORMER keyword"); + if (sp->track > 0 && sp->state > STATE_INDEX0) { + statewarn(sp, _("PERFORMER keyword cannot be after INDEX keyword")); + cueabort(_("Badly placed PERFORMER keyword")); + } - word = needitem(); + word = needitem("performer"); txp = gettextptr(sp->track, trackp); txp->tc_performer = strdup(word); @@ -686,8 +910,10 @@ { long l; - if (sp->state < STATE_INDEX1) - cueabort("Badly placed POSTGAP keyword"); + if (sp->state < STATE_INDEX1) { + statewarn(sp, _("POSTGAP keyword must be after INDEX 01")); + cueabort(_("Badly placed POSTGAP keyword")); + } sp->state = STATE_POSTGAP; parse_offset(&l); @@ -711,8 +937,10 @@ long l; if ((sp->state < STATE_TRACK) || - (sp->state >= STATE_INDEX0)) - cueabort("Badly placed PREGAP keyword"); + (sp->state >= STATE_INDEX0)) { + statewarn(sp, _("PREGAP keyword must be after TRACK and before INDEX keyword")); + cueabort(_("Badly placed PREGAP keyword")); + } sp->state = STATE_FLAGS; parse_offset(&l); @@ -722,6 +950,37 @@ } LOCAL void +parse_rem(trackp, sp) + track_t trackp[]; + state_t *sp; +{ + char *oword = curword(); + char *word; + + word = nextitem(); + if ((oword == word) || (*word == '\0')) + return; + if ((sp->pflags & PF_CDRTOOLS_EXT) == 0 && + streql(word, "CDRTOOLS")) { + sp->pflags |= PF_CDRTOOLS_EXT; + errmsgno(EX_BAD, + _("Warning: Enabling cdrecord specific CUE extensions.\n")); + } + if ((sp->pflags & PF_CDRTOOLS_EXT) == 0 && + streql(word, "COMMENT")) { + oword = word; + word = nextitem(); + if ((oword == word) || (*word == '\0')) + return; + if (strncmp(word, "ExactAudioCopy ", 15) == 0) { + sp->pflags |= PF_CDRTOOLS_EXT; + errmsgno(EX_BAD, + _("Warning: Found ExactAudioCopy, enabling CUE extensions.\n")); + } + } +} + +LOCAL void parse_songwriter(trackp, sp) track_t trackp[]; state_t *sp; @@ -729,10 +988,11 @@ char *word; textptr_t *txp; - if (sp->track > 0 && sp->state > STATE_INDEX0) - cueabort("Badly placed SONGWRITER keyword"); - - word = needitem(); + if (sp->track > 0 && sp->state > STATE_INDEX0) { + statewarn(sp, _("SONGWRITER keyword cannot be after INDEX keyword")); + cueabort(_("Badly placed SONGWRITER keyword")); + } + word = needitem("songwriter"); txp = gettextptr(sp->track, trackp); txp->tc_songwriter = strdup(word); @@ -747,10 +1007,11 @@ char *word; textptr_t *txp; - if (sp->track > 0 && sp->state > STATE_INDEX0) - cueabort("Badly placed TITLE keyword"); - - word = needitem(); + if (sp->track > 0 && sp->state > STATE_INDEX0) { + statewarn(sp, _("TITLE keyword cannot be after INDEX keyword")); + cueabort(_("Badly placed TITLE keyword")); + } + word = needitem("title"); txp = gettextptr(sp->track, trackp); txp->tc_title = strdup(word); @@ -768,35 +1029,42 @@ long secsize = -1; if ((sp->state >= STATE_TRACK) && - (sp->state < STATE_INDEX1)) - cueabort("Badly placed TRACK keyword"); + (sp->state < STATE_INDEX1)) { + statewarn(sp, _("TRACK keyword must be after INDEX 01")); + cueabort(_("Badly placed TRACK keyword")); + } + sp->pflags &= ~(PF_INDEX0_PREV|PF_FILE_FOUND); + if (sp->state == STATE_FILE) + sp->pflags |= PF_FILE_FOUND; sp->state = STATE_TRACK; + sp->prevstate = STATE_TRACK; + sp->track++; sp->index0 = -1; sp->index = -1; sp->pregapsize = -1; sp->postgapsize = -1; - word = needitem(); + word = needitem("track number"); if (*astolb(word, &l, 10) != '\0') - cueabort("Not a number '%s'", word); + cueabort(_("Not a number '%s'"), word); if (l <= 0 || l > 99) - cueabort("Illegal TRACK number '%s'", word); + cueabort(_("Illegal TRACK number '%s'"), word); - if ((sp->track < l) && - (((sp->track + 1) == l) || sp->track == 0)) - sp->track = l; + if ((sp->trackno < l) && + (((sp->trackno + 1) == l) || sp->trackno == 0)) + sp->trackno = l; else - cueabort("Badly placed TRACK %ld number", l); + cueabort(_("Badly placed TRACK %ld number"), l); - word = needword(); + word = needword("data type"); kp = lookup(word, dtypes); if (kp == NULL) - cueabort("Unknown filetype '%s'", word); + cueabort(_("Unknown data type '%s'"), word); if (getworddelim() == '/') { - word = needitem(); + word = needitem("sector size"); if (*astol(++word, &secsize) != '\0') - cueabort("Not a number '%s'", word); + cueabort(_("Not a number '%s'"), word); } /* @@ -822,7 +1090,7 @@ sp->secsize = secsize; sp->dataoff = 0; if (secsize != 2352) - cueabort("Unsupported sector size %ld for audio", secsize); + cueabort(_("Unsupported sector size %ld for audio"), secsize); break; case K_MODE1: @@ -839,7 +1107,7 @@ * XXX It seems that there exist bin/cue pairs with this value */ if (secsize != 2048) - cueabort("Unsupported sector size %ld for data", secsize); + cueabort(_("Unsupported sector size %ld for data"), secsize); break; case K_MODE2: @@ -856,12 +1124,12 @@ sp->dbtype = DB_RAW; sp->dataoff = 0; } else if (secsize != 2336) - cueabort("Unsupported sector size %ld for mode2", secsize); + cueabort(_("Unsupported sector size %ld for mode2"), secsize); if (kp->k_type == K_CDI) sp->tracktype = TOC_CDI; break; - default: cueabort("Panic: unknown datatype '%s'", word); + default: cueabort(_("Panic: unknown datatype '%s'"), word); } if (sp->flags & TI_PREEMP) @@ -869,8 +1137,8 @@ sp->secsize = secsize; if (xdebug > 1) { - printf("Track %d Tracktype %s/%d\n", - sp->track, kp->k_name, sp->secsize); + printf(_("Track[%2.2d] %2.2d Tracktype %s/%d\n"), + sp->track, sp->trackno, kp->k_name, sp->secsize); } checkextra(); @@ -886,27 +1154,27 @@ long s = -1; long f = -1; - word = needitem(); + word = needitem("time offset/length"); if (strchr(word, ':') == NULL) { if (*astol(word, lp) != '\0') - cueabort("Not a number '%s'", word); + cueabort(_("Not a number '%s'"), word); return; } if (*(p = astolb(word, &m, 10)) != ':') - cueabort("Not a number '%s'", word); + cueabort(_("Not a number '%s'"), word); if (m < 0 || m >= 160) - cueabort("Illegal minute value in '%s'", word); + cueabort(_("Illegal minute value in '%s'"), word); p++; if (*(p = astolb(p, &s, 10)) != ':') - cueabort("Not a number '%s'", p); + cueabort(_("Not a number '%s'"), p); if (s < 0 || s >= 60) - cueabort("Illegal second value in '%s'", word); + cueabort(_("Illegal second value in '%s'"), word); p++; if (*(p = astolb(p, &f, 10)) != '\0') - cueabort("Not a number '%s'", p); + cueabort(_("Not a number '%s'"), p); if (f < 0 || f >= 75) - cueabort("Illegal frame value in '%s'", word); + cueabort(_("Illegal frame value in '%s'"), word); m = m * 60 + s; m = m * 75 + f; @@ -924,7 +1192,7 @@ Llong tracksize; if (xdebug > 1) - printf("-->Newtrack %d\n", track); + printf(_("-->Newtrack %2.2d Trackno %2.2d\n"), track, sp->trackno); if (track > 1 && streql(sp->filename, trackp[track-1].filename)) { tracksize = (sp->index1 - sp->secoff) * trackp[track-1].isecsize; @@ -984,7 +1252,7 @@ trackp[track].tracksecs = (tracksize + sp->secsize - 1) / sp->secsize; if (xdebug > 1) - printf(" Remaining Filesize %lld (%lld secs)\n", + printf(_(" Remaining Filesize %lld (%lld secs)\n"), (sp->filesize-sp->trackoff), (sp->filesize-sp->trackoff +sp->secsize - 1) / sp->secsize); @@ -999,14 +1267,17 @@ if (track == 1) trackp[track].pregapsize = sp->index1 + 150; else if (sp->index0 < 0) - trackp[track].pregapsize = -1; + trackp[track].pregapsize = 0; + else if (sp->pflags & PF_INDEX0_PREV) /* INDEX0 in prev FILE */ + trackp[track].pregapsize = trackp[track-1].tracksecs - sp->index0; else trackp[track].pregapsize = sp->index1 - sp->index0; } trackp[track].isecsize = sp->secsize; trackp[track].secsize = sp->secsize; - trackp[track].flags = sp->flags | trackp[0].flags; + trackp[track].flags = sp->flags | + (trackp[0].flags & ~(TI_HIDDEN|TI_SWAB|TI_AUDIO|TI_COPY|TI_QUADRO|TI_PREEMP|TI_SCMS)); if (trackp[0].flags & TI_RAW) { if (is_raw16(&trackp[track])) trackp[track].secsize = RAW16_SEC_SIZE; @@ -1015,9 +1286,9 @@ #ifndef HAVE_LIB_EDC_ECC if ((sp->sectype & ST_MODE_MASK) != ST_MODE_AUDIO) { errmsgno(EX_BAD, - "EDC/ECC library not compiled in.\n"); + _("EDC/ECC library not compiled in.\n")); comerrno(EX_BAD, - "Data sectors are not supported in RAW mode.\n"); + _("Data sectors are not supported in RAW mode.\n")); } #endif } @@ -1032,7 +1303,7 @@ trackp[track].secspt = 0; /* transfer size is set up in set_trsizes() */ /* trackp[track].pktsize = pktsize; */ trackp[track].pktsize = 0; - trackp[track].trackno = sp->track; + trackp[track].trackno = sp->trackno; trackp[track].sectype = sp->sectype; trackp[track].dataoff = sp->dataoff; @@ -1040,24 +1311,54 @@ trackp[track].dbtype = sp->dbtype; if (track == 1) { - trackp[0].tracktype &= ~TOC_MASK; - trackp[0].tracktype |= sp->tracktype; + track_t *tp0 = &trackp[0]; + track_t *tp1 = &trackp[1]; + + tp0->tracktype &= ~TOC_MASK; + tp0->tracktype |= sp->tracktype; + + /* + * setleadinout() also sets: sectype dbtype dataoff + */ + tp0->sectype = tp1->sectype; + tp0->dbtype = tp1->dbtype; + tp0->dataoff = tp1->dataoff; + tp0->isecsize = tp1->isecsize; + tp0->secsize = tp1->secsize; + + if (sp->index0 == 0 && sp->index1 > 0) { + + tp0->filename = tp1->filename; + tp0->xfp = xopen(sp->filename, O_RDONLY|O_BINARY, 0, X_NOREWIND); + tp0->trackstart = tp1->trackstart; + tp0->itracksize = sp->index1 * tp1->isecsize; + tp0->tracksize = sp->index1 * tp1->secsize; + tp0->tracksecs = sp->index1; + tp1->tracksecs -= sp->index1; + sp->secoff += sp->index1; + sp->trackoff += sp->index1 * tp1->isecsize; + tp1->flags &= ~TI_PREGAP; + tp0->flags |= tp1->flags & + (TI_SWAB|TI_AUDIO|TI_COPY|TI_QUADRO|TI_PREEMP|TI_SCMS); + tp0->flags |= TI_HIDDEN; + tp1->flags |= TI_HIDDEN; + } if (xdebug > 1) { - printf("Track %d Tracktype %X\n", - 0, trackp[0].tracktype); + printf(_("Track[%2.2d] %2.2d Tracktype %X\n"), + 0, 0, trackp[0].tracktype); } } if (xdebug > 1) { - printf("Track %d Tracktype %X\n", - track, trackp[track].tracktype); + printf(_("Track[%2.2d] %2.2d Tracktype %X\n"), + track, sp->trackno, trackp[track].tracktype); } trackp[track].nindex = 1; trackp[track].tindex = 0; if (xdebug > 1) { - printf("Track %d flags 0x%08X\n", 0, trackp[0].flags); - printf("Track %d flags 0x%08X\n", track, trackp[track].flags); + printf(_("Track[%2.2d] %2.2d flags 0x%08X\n"), 0, 0, trackp[0].flags); + printf(_("Track[%2.2d] %2.2d flags 0x%08X\n"), track, sp->trackno, trackp[track].flags); } } @@ -1077,6 +1378,15 @@ return (NULL); } +LOCAL char * +state_name(st) + int st; +{ + if (st < STATE_NONE || st > STATE_MAX) + return ("UNKNOWN"); + return (states[st]); +} + /*--------------------------------------------------------------------------*/ /* * Parser low level functions start here... @@ -1112,7 +1422,7 @@ f = fileopen(name, "r"); if (f == NULL) - comerr("Cannot open '%s'.\n", name); + comerr(_("Cannot open '%s'.\n"), name); fname = name; return (f); @@ -1151,6 +1461,7 @@ return (linep); } +#ifdef __needed__ LOCAL void ungetline() { @@ -1160,6 +1471,7 @@ wordendp = linep; wordendc = *linep; } +#endif LOCAL char * skipwhite(s) @@ -1200,7 +1512,6 @@ for (s = (Uchar *)linep; (c = *s) != '\0'; s++) { if (c == '"') { quoted = !quoted; -/* strcpy((char *)s, (char *)&s[1]);*/ for (to = s, from = &s[1]; *from; ) { c = *from++; if (c == '\\' && quoted && (*from == '\\' || *from == '"')) @@ -1240,30 +1551,38 @@ } LOCAL char * -neednextitem(delim) +neednextitem(delim, type) char *delim; + char *type; { char *olinep = linep; char *nlinep; nlinep = getnextitem(delim); - if ((olinep == nlinep) || (*nlinep == '\0')) - cueabort("Missing text"); + if ((olinep == nlinep) || (*nlinep == '\0')) { + if (type == NULL) + cueabort(_("Missing text")); + else + cueabort(_("Missing '%s'"), type); + } return (nlinep); } +#ifdef __needed__ LOCAL char * nextword() { return (getnextitem(worddelim)); } +#endif LOCAL char * -needword() +needword(type) + char *type; { - return (neednextitem(worddelim)); + return (neednextitem(worddelim, type)); } LOCAL char * @@ -1279,18 +1598,68 @@ } LOCAL char * -needitem() +needitem(type) + char *type; { - return (neednextitem(nulldelim)); + return (neednextitem(nulldelim, type)); } LOCAL void checkextra() { if (peekword() < lineend()) - cueabort("Extra text '%s'", peekword()); + cueabort(_("Extra text '%s'"), peekword()); +} + +/* VARARGS2 */ +#ifdef PROTOTYPES +LOCAL void +statewarn(state_t *sp, const char *fmt, ...) +#else +LOCAL void +statewarn(sp, fmt, va_alist) + state_t *sp; + char *fmt; + va_dcl +#endif +{ + va_list args; + +#ifdef PROTOTYPES + va_start(args, fmt); +#else + va_start(args); +#endif + errmsgno(EX_BAD, _("%r. Current state is '%s'.\n"), + fmt, args, state_name(sp->state)); + va_end(args); } +#ifdef __needed__ +/* VARARGS1 */ +#ifdef PROTOTYPES +LOCAL void +cuewarn(const char *fmt, ...) +#else +LOCAL void +cuewarn(fmt, va_alist) + char *fmt; + va_dcl +#endif +{ + va_list args; + +#ifdef PROTOTYPES + va_start(args, fmt); +#else + va_start(args); +#endif + errmsgno(EX_BAD, _("%r on line %d col %d in '%s'.\n"), + fmt, args, lineno, linep - linebuf, fname); + va_end(args); +} +#endif + /* VARARGS1 */ #ifdef PROTOTYPES LOCAL void @@ -1309,7 +1678,36 @@ #else va_start(args); #endif - comerrno(EX_BAD, "%r on line %d in '%s'.\n", - fmt, args, lineno, fname); +#ifdef PARSE_DEBUG + errmsgno(EX_BAD, _("%r on line %d col %d in '%s'.\n"), +#else + comerrno(EX_BAD, _("%r on line %d col %d in '%s'.\n"), +#endif + fmt, args, lineno, linep - linebuf, fname); + va_end(args); +} + +/* VARARGS1 */ +#ifdef PROTOTYPES +LOCAL void +extabort(const char *fmt, ...) +#else +LOCAL void +extabort(fmt, va_alist) + char *fmt; + va_dcl +#endif +{ + va_list args; + +#ifdef PROTOTYPES + va_start(args, fmt); +#else + va_start(args); +#endif + errmsgno(EX_BAD, _("Unsupported by CDRWIN: %r on line %d col %d in '%s'.\n"), + fmt, args, lineno, linep - linebuf, fname); va_end(args); + errmsgno(EX_BAD, _("Add 'REM CDRTOOLS' to enable cdrtools specific CUE extensions.\n")); + comexit(EX_BAD); } diff -Nru cdrtools-2.01.01a33/cdrecord/defaults.c cdrtools-3.02a09/cdrecord/defaults.c --- cdrtools-2.01.01a33/cdrecord/defaults.c 2006-09-13 15:35:12.000000000 +0000 +++ cdrtools-3.02a09/cdrecord/defaults.c 1970-01-01 00:00:00.000000000 +0000 @@ -1,235 +0,0 @@ -/* @(#)defaults.c 1.20 06/09/13 Copyright 1998-2006 J. Schilling */ -#ifndef lint -static char sccsid[] = - "@(#)defaults.c 1.20 06/09/13 Copyright 1998-2006 J. Schilling"; -#endif -/* - * Copyright (c) 1998-2006 J. Schilling - */ -/* - * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. - * - * See the file CDDL.Schily.txt in this distribution for details. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file CDDL.Schily.txt from this distribution. - */ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include "cdrecord.h" /* only for getnum() */ -#include "defaults.h" - -LOCAL int open_cdrdefaults __PR((void)); -EXPORT void cdr_defaults __PR((char **devp, int *speedp, long *fsp, char **drvoptp)); -LOCAL void cdr_xdefaults __PR((char **devp, int *speedp, long *fsp, char **drvoptp)); -LOCAL char * strsv __PR((char *s)); - -LOCAL int -open_cdrdefaults() -{ - /* - * WARNING you are only allowed to change this filename if you also - * change the documentation and add a statement that makes clear - * where the official location of the file is why you did choose a - * nonstandard location and that the nonstandard location only refers - * to inofficial cdrecord versions. - * - * I was forced to add this because some people change cdrecord without - * rational reason and then publish the result. As those people - * don't contribute work and don't give support, they are causing extra - * work for me and this way slow down the cdrecord development. - */ - return (defltopen("/etc/default/cdrecord")); -} - -EXPORT void -cdr_defaults(devp, speedp, fsp, drvoptp) - char **devp; - int *speedp; - long *fsp; - char **drvoptp; -{ - char *dev = NULL; - int speed = 0; - long fs = 0L; - - if (devp != NULL) - dev = *devp; - if (speedp != NULL) - speed = *speedp; - if (fsp != NULL) - fs = *fsp; - - if (!dev && devp != NULL) { - *devp = getenv("CDR_DEVICE"); - - if (!*devp && open_cdrdefaults() == 0) { - dev = defltread("CDR_DEVICE="); - if (dev != NULL) - *devp = strsv(dev); - } - } - if (devp != NULL && *devp) - cdr_xdefaults(devp, &speed, &fs, drvoptp); - - if (speed < 0) { - char *p = getenv("CDR_SPEED"); - - if (!p) { - if (open_cdrdefaults() == 0) { - p = defltread("CDR_SPEED="); - } - } - if (p) { - speed = atoi(p); - if (speed < 0 && speed != -1) { - comerrno(EX_BAD, - "Bad speed environment (%s).\n", p); - } - } - } - if (speed >= 0 && speedp != NULL) - *speedp = speed; - - if (fs < 0L) { - char *p = getenv("CDR_FIFOSIZE"); - - if (!p) { - if (open_cdrdefaults() == 0) { - p = defltread("CDR_FIFOSIZE="); - } - } - if (p) { - if (getnum(p, &fs) != 1) { - comerrno(EX_BAD, - "Bad fifo size environment (%s).\n", p); - } - } - } - if (fs > 0L && fsp != NULL) { - char *p = NULL; - long maxfs; - - if (open_cdrdefaults() == 0) { - p = defltread("CDR_MAXFIFOSIZE="); - } - if (p) { - if (getnum(p, &maxfs) != 1) { - comerrno(EX_BAD, - "Bad max fifo size default (%s).\n", p); - } - if (fs > maxfs) - fs = maxfs; - } - *fsp = fs; - } - - - defltclose(); -} - -/* - * All args except "drvoptp" are granted to be non NULL pointers. - */ -LOCAL void -cdr_xdefaults(devp, speedp, fsp, drvoptp) - char **devp; - int *speedp; - long *fsp; - char **drvoptp; -{ - char dname[256]; - char *p = *devp; - char *x = ",:/@"; - - while (*x) { - if (strchr(p, *x)) - return; - x++; - } - js_snprintf(dname, sizeof (dname), "%s=", p); - if (open_cdrdefaults() != 0) - return; - - p = defltread(dname); - if (p != NULL) { - while (*p == '\t' || *p == ' ') - p++; - if ((x = strchr(p, '\t')) != NULL) - *x = '\0'; - else if ((x = strchr(p, ' ')) != NULL) - *x = '\0'; - *devp = strsv(p); - if (x) { - p = ++x; - while (*p == '\t' || *p == ' ') - p++; - if ((x = strchr(p, '\t')) != NULL) - *x = '\0'; - else if ((x = strchr(p, ' ')) != NULL) - *x = '\0'; - if (*speedp < 0) - *speedp = atoi(p); - if (*speedp < 0 && *speedp != -1) { - comerrno(EX_BAD, - "Bad speed in defaults (%s).\n", p); - } - } - if (x) { - p = ++x; - while (*p == '\t' || *p == ' ') - p++; - if ((x = strchr(p, '\t')) != NULL) - *x = '\0'; - else if ((x = strchr(p, ' ')) != NULL) - *x = '\0'; - if (*fsp < 0L) { - if (getnum(p, fsp) != 1) { - comerrno(EX_BAD, - "Bad fifo size in defaults (%s).\n", - p); - } - } - } - if (x) { - p = ++x; - while (*p == '\t' || *p == ' ') - p++; - if ((x = strchr(p, '\t')) != NULL) - *x = '\0'; - else if ((x = strchr(p, ' ')) != NULL) - *x = '\0'; - if (strcmp(p, "\"\"") != '\0') { - /* - * Driver opts found. - */ - if (drvoptp && *drvoptp == NULL) - *drvoptp = strsv(p); - } - } - } -} - -LOCAL char * -strsv(s) - char *s; -{ - char *p; - int len = strlen(s); - - p = malloc(len+1); - if (p) - strcpy(p, s); - return (p); -} diff -Nru cdrtools-2.01.01a33/cdrecord/defaults.h cdrtools-3.02a09/cdrecord/defaults.h --- cdrtools-2.01.01a33/cdrecord/defaults.h 2004-02-22 14:53:00.000000000 +0000 +++ cdrtools-3.02a09/cdrecord/defaults.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,26 +0,0 @@ -/* @(#)defaults.h 1.1 04/02/22 Copyright 1998-2004 J. Schilling */ -/* - * The cdrecord defaults (/etc/default/cdrecord) interface - * - * Copyright (c) 1998-2004 J. Schilling - */ -/* - * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. - * - * See the file CDDL.Schily.txt in this distribution for details. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file CDDL.Schily.txt from this distribution. - */ - -#ifndef _DEFAULTS_H -#define _DEFAULTS_H -/* - * defaults.c - */ -extern void cdr_defaults __PR((char **devp, int *speedp, long *fsp, char **drvoptp)); - -#endif /* _DEFAULTS_H */ diff -Nru cdrtools-2.01.01a33/cdrecord/diskid.c cdrtools-3.02a09/cdrecord/diskid.c --- cdrtools-2.01.01a33/cdrecord/diskid.c 2007-02-14 16:59:43.000000000 +0000 +++ cdrtools-3.02a09/cdrecord/diskid.c 2010-12-19 18:39:36.000000000 +0000 @@ -1,12 +1,13 @@ -/* @(#)diskid.c 1.40 07/02/14 Copyright 1998-2007 J. Schilling */ +/* @(#)diskid.c 1.44 10/12/19 Copyright 1998-2010 J. Schilling */ +#include #ifndef lint -static char sccsid[] = - "@(#)diskid.c 1.40 07/02/14 Copyright 1998-2007 J. Schilling"; +static UConst char sccsid[] = + "@(#)diskid.c 1.44 10/12/19 Copyright 1998-2010 J. Schilling"; #endif /* * Disk Idientification Method * - * Copyright (c) 1998-2007 J. Schilling + * Copyright (c) 1998-2010 J. Schilling */ /* * The contents of this file are subject to the terms of the @@ -22,10 +23,11 @@ #include -#include +#include #include #include #include +#include #include "cdrecord.h" @@ -369,19 +371,19 @@ type = mp->msf_frame % 10; if (type < 5) { - tname = "Long strategy type (Cyanine, AZO or similar)"; + tname = _("Long strategy type (Cyanine, AZO or similar)"); } else { - tname = "Short strategy type (Phthalocyanine or similar)"; + tname = _("Short strategy type (Phthalocyanine or similar)"); } if (rw) { - tname = "Phase change"; + tname = _("Phase change"); } dp = man_ptr(mp); if (dp != NULL) { if (dp->mi_num == 0 || dp->mi_num >= 80) { if (!rw) { - tname = "unknown dye (old id code)"; + tname = _("unknown dye (old id code)"); } else { xdman = *dp; dp = &xdman; @@ -390,25 +392,25 @@ } } } else { - tname = "unknown dye (reserved id code)"; + tname = _("unknown dye (reserved id code)"); dp = ¬able; } - printf("Disk type: %s\n", tname); - printf("Manuf. index: %d\n", dp->mi_num); - printf("Manufacturer: %s\n", dp->mi_name); + printf(_("Disk type: %s\n"), tname); + printf(_("Manuf. index: %d\n"), dp->mi_num); + printf(_("Manufacturer: %s\n"), dp->mi_name); if (mp->msf_min != 97) /* This may be garbage ATIP from a DVD */ return; if (dp >= &dman[I_GUESS] && dp < &dman[ndman]) { - printf("Manufacturer is guessed because of the orange forum embargo.\n"); - printf("The orange forum likes to get money for recent information.\n"); - printf("The information for this media may not be correct.\n"); + printf(_("Manufacturer is guessed because of the orange forum embargo.\n")); + printf(_("The orange forum likes to get money for recent information.\n")); + printf(_("The information for this media may not be correct.\n")); } if (dp == ¬able) { - printf("Manufacturer is unknown because of the orange forum embargo.\n"); - printf("As the orange forum likes to get money for recent information,\n"); - printf("it may be that this media does not use illegal manufacturer coding.\n"); + printf(_("Manufacturer is unknown because of the orange forum embargo.\n")); + printf(_("As the orange forum likes to get money for recent information,\n")); + printf(_("it may be that this media does not use illegal manufacturer coding.\n")); } } diff -Nru cdrtools-2.01.01a33/cdrecord/drv_7501.c cdrtools-3.02a09/cdrecord/drv_7501.c --- cdrtools-2.01.01a33/cdrecord/drv_7501.c 2007-08-06 23:13:25.000000000 +0000 +++ cdrtools-3.02a09/cdrecord/drv_7501.c 2010-12-19 18:39:36.000000000 +0000 @@ -1,12 +1,13 @@ -/* @(#)drv_7501.c 1.24 07/08/07 Copyright 2003-2006 J. Schilling */ +/* @(#)drv_7501.c 1.30 10/12/19 Copyright 2003-2010 J. Schilling */ +#include #ifndef lint -static char sccsid[] = - "@(#)drv_7501.c 1.24 07/08/07 Copyright 2003-2006 J. Schilling"; +static UConst char sccsid[] = + "@(#)drv_7501.c 1.30 10/12/19 Copyright 2003-2010 J. Schilling"; #endif /* * Device driver for the Masushita CW-7501 * - * Copyright (c) 2003-2006 J. Schilling + * Copyright (c) 2003-2010 J. Schilling * * Mode Pages: * 0x01 error recovery Seite 100 @@ -36,7 +37,7 @@ #endif #include -#include +#include #include #include #include @@ -48,6 +49,7 @@ #include #include #include +#include #include #include @@ -380,7 +382,7 @@ * it is mentioned in the MMC standard. */ if (lverbose) - printf("Trying to clear drive status.\n"); + printf(_("Trying to clear drive status.\n")); cw7501_rezero(scgp, 0, 1); wait_unit_ready(scgp, 60); ret = cw7501_read_trackinfo(scgp, buf, 12, 0, TI_NWA); @@ -419,7 +421,7 @@ } else { fillbytes((caddr_t)mode, sizeof (mode), '\0'); - if (!get_mode_params(scgp, page, "Speed information", + if (!get_mode_params(scgp, page, _("Speed information"), (Uchar *)mode, (Uchar *)0, (Uchar *)0, (Uchar *)0, &len)) { return (-1); } @@ -493,9 +495,9 @@ return (-1); } if (scgp->verbose) - scg_prbytes("track info:", buf, + scg_prbytes(_("track info:"), buf, 12-scg_getresid(scgp)); - next_addr = a_to_4_byte(&nwa->nwa_nwa); + next_addr = a_to_4_byte(nwa->nwa_nwa); /* * XXX Für TAO definitiv notwendig. * XXX ABhängig von Auto-Pregap? @@ -516,7 +518,7 @@ BOOL islast; /* last write for track */ { if (lverbose > 1 && islast) - printf("\nWriting last record for this track.\n"); + printf(_("\nWriting last record for this track.\n")); return (write_xg0(scgp, bp, 0, size, blocks)); } @@ -532,11 +534,11 @@ if (wm_base(dp->cdr_dstat->ds_wrmode) == WM_SAO) { if (debug || lverbose) { - printf("Sending CUE sheet...\n"); + printf(_("Sending CUE sheet...\n")); flush(); } if ((*dp->cdr_send_cue)(scgp, dp, trackp) < 0) { - errmsgno(EX_BAD, "Cannot send CUE sheet.\n"); + errmsgno(EX_BAD, _("Cannot send CUE sheet.\n")); return (-1); } @@ -546,10 +548,10 @@ */ startsec = -150; if (debug) - printf("SAO startsec: %ld\n", startsec); + printf(_("SAO startsec: %ld\n"), startsec); if (trackp[0].flags & TI_TEXT) { - errmsgno(EX_BAD, "CD-Text unsupported in CW-7501 - ignoring.\n"); + errmsgno(EX_BAD, _("CD-Text unsupported in CW-7501 - ignoring.\n")); } else for (i = 1; i <= trackp->tracks; i++) { trackp[i].trackstart += startsec +150; } @@ -591,17 +593,26 @@ if (!is_tao(trackp) && !is_packet(trackp)) { if (trackp->pregapsize > 0 && (trackp->flags & TI_PREGAP) == 0) { if (lverbose) { - printf("Writing pregap for track %d at %ld\n", + printf(_("Writing pregap for track %d at %ld\n"), (int)trackp->trackno, trackp->trackstart-trackp->pregapsize); } - /* - * XXX Do we need to check isecsize too? - */ - pad_track(scgp, dp, trackp, - trackp->trackstart-trackp->pregapsize, - (Llong)trackp->pregapsize*trackp->secsize, + if (trackp->track == 1 && is_hidden(trackp)) { + pad_track(scgp, dp, trackp, + trackp->trackstart-trackp->pregapsize, + (Llong)(trackp->pregapsize-trackp->trackstart)*trackp->secsize, + FALSE, 0); + if (write_track_data(scgp, dp, track_base(trackp)) < 0) + return (-1); + } else { + /* + * XXX Do we need to check isecsize too? + */ + pad_track(scgp, dp, trackp, + trackp->trackstart-trackp->pregapsize, + (Llong)trackp->pregapsize*trackp->secsize, FALSE, 0); + } } return (0); } @@ -609,7 +620,7 @@ if (select_secsize(scgp, trackp->secsize) < 0) return (-1); - if (!get_mode_params(scgp, page, "Dummy/autopg information", + if (!get_mode_params(scgp, page, _("Dummy/autopg information"), (Uchar *)mode, (Uchar *)0, (Uchar *)0, (Uchar *)0, &len)) { return (-1); } @@ -622,7 +633,7 @@ xp23 = (struct cw7501_mode_page_23 *)mp; xp23->autopg = 1; - if (!set_mode_params(scgp, "Dummy/autopg page", mode, len, 0, trackp->secsize)) + if (!set_mode_params(scgp, _("Dummy/autopg page"), mode, len, 0, trackp->secsize)) return (-1); /* @@ -673,7 +684,7 @@ int page = 0x23; struct cw7501_mode_page_23 *xp23; - if (!get_mode_params(scgp, page, "Dummy/autopg information", + if (!get_mode_params(scgp, page, _("Dummy/autopg information"), (Uchar *)mode, (Uchar *)0, (Uchar *)0, (Uchar *)0, &len)) { return (-1); } @@ -686,7 +697,7 @@ xp23 = (struct cw7501_mode_page_23 *)mp; xp23->autopg = 0; - if (!set_mode_params(scgp, "Dummy/autopg page", mode, len, 0, trackp->secsize)) + if (!set_mode_params(scgp, _("Dummy/autopg page"), mode, len, 0, trackp->secsize)) return (-1); return (0); @@ -703,7 +714,7 @@ md.pagex.page24.p_code = 0x24; md.pagex.page24.p_len = 0x0A; md.pagex.page24.disktype = toc2sess[track_base(trackp)->tracktype & TOC_MASK]; - i_to_4_byte(&md.pagex.page24.disk_id, 0x12345); + i_to_4_byte(md.pagex.page24.disk_id, 0x12345); return (mode_select(scgp, (Uchar *)&md, count, 0, scgp->inq->data_format >= 2)); } @@ -876,7 +887,7 @@ for (i = 1; i <= trackp->tracks; i++) { if (trackp[i].tracksize < (tsize_t)0) { - errmsgno(EX_BAD, "Track %d has unknown length.\n", i); + errmsgno(EX_BAD, _("Track %d has unknown length.\n"), i); return (-1); } } @@ -892,14 +903,14 @@ scgp->silent--; free(cp); if (ret < 0) { - errmsgno(EX_BAD, "CUE sheet not accepted. Retrying with minimum pregapsize = 1.\n"); + errmsgno(EX_BAD, _("CUE sheet not accepted. Retrying with minimum pregapsize = 1.\n")); ncue = (*dp->cdr_gen_cue)(trackp, &cp, TRUE); ret = cw7501_write_dao(scgp, (Uchar *)cp, ncue*8, disktype); free(cp); } if (ret >= 0 && lverbose) { gettimeofday(&stoptime, (struct timezone *)0); - prtimediff("Write Lead-in time: ", &starttime, &stoptime); + prtimediff(_("Write Lead-in time: "), &starttime, &stoptime); } return (ret); } @@ -1009,7 +1020,7 @@ scgp->cmdname = "cw7501 reserve_track"; - comerrno(EX_BAD, "Control (as in set mode) missing.\n"); + comerrno(EX_BAD, _("Control (as in set mode) missing.\n")); if (scg_cmd(scgp) < 0) return (-1); diff -Nru cdrtools-2.01.01a33/cdrecord/drv_bd.c cdrtools-3.02a09/cdrecord/drv_bd.c --- cdrtools-2.01.01a33/cdrecord/drv_bd.c 2007-08-08 23:12:22.000000000 +0000 +++ cdrtools-3.02a09/cdrecord/drv_bd.c 2013-12-09 23:03:30.000000000 +0000 @@ -1,10 +1,11 @@ -/* @(#)drv_bd.c 1.6 07/08/09 Copyright 2007 J. Schilling */ +/* @(#)drv_bd.c 1.21 13/12/10 Copyright 2007-2013 J. Schilling */ +#include #ifndef lint -static char sccsid[] = - "@(#)drv_bd.c 1.6 07/08/09 Copyright 2007 J. Schilling"; +static UConst char sccsid[] = + "@(#)drv_bd.c 1.21 13/12/10 Copyright 2007-2013 J. Schilling"; #endif /* - * Copyright (c) 2007 J. Schilling + * Copyright (c) 2007-2013 J. Schilling */ /* * The contents of this file are subject to the terms of the @@ -13,6 +14,8 @@ * with the License. * * See the file CDDL.Schily.txt in this distribution for details. + * A copy of the CDDL is also available via the Internet at + * http://www.opensource.org/licenses/cddl1.txt * * When distributing Covered Code, include this CDDL HEADER in each * file and include the License file CDDL.Schily.txt from this distribution. @@ -45,7 +48,7 @@ * 2 print disk info & write parameters * 3 print log pages & dvd structure * - * Copyright (c) 2007 J. Schilling + * Copyright (c) 2007-2008 J. Schilling */ /* * The contents of this file are subject to the terms of the @@ -54,6 +57,8 @@ * with the License. * * See the file CDDL.Schily.txt in this distribution for details. + * A copy of the CDDL is also available via the Internet at + * http://www.opensource.org/licenses/cddl1.txt * * When distributing Covered Code, include this CDDL HEADER in each * file and include the License file CDDL.Schily.txt from this distribution. @@ -65,7 +70,7 @@ #endif #include -#include +#include #include #include /* Include sys/types.h to make off_t available */ #include @@ -76,6 +81,7 @@ #include #include #include +#include #include #include @@ -174,6 +180,53 @@ }; /* + * SCSI-3/mmc-3 conformant BD-ROM writer + */ +cdr_t cdr_bdrom = { + 0, 0, 0, + 0, + CDR2_NOCD|CDR2_BD, + CDR_CDRW_ALL, + WM_SAO, + 1000, 1000, + "mmc_bdrom", + "generic SCSI-3/mmc-3 BD-ROM driver", + 0, + (dstat_t *)0, + identify_bd, + attach_bd, + init_bd, + getdisktype_bd, + prdiskstatus_bd, + scsi_load, + scsi_unload, + read_buff_cap, + cmd_dummy, /* recovery_needed */ + (int(*)__PR((SCSI *, cdr_t *, int)))cmd_dummy, /* recover */ + speed_select_bd, + select_secsize, + next_wr_addr_bdr, + (int(*)__PR((SCSI *, Ulong)))cmd_ill, /* reserve_track */ + scsi_cdr_write, + (int(*)__PR((track_t *, void *, BOOL)))cmd_dummy, /* gen_cue */ + no_sendcue, + (int(*)__PR((SCSI *, cdr_t *, track_t *)))cmd_ill, /* leadin */ + (int(*)__PR((SCSI *scgp, cdr_t *, track_t *)))cmd_ill, /* open track */ + (int(*)__PR((SCSI *scgp, cdr_t *, track_t *)))cmd_ill, /* close track */ + (int(*)__PR((SCSI *scgp, cdr_t *, track_t *)))cmd_ill, /* open session */ + cmd_dummy, /* close session */ + cmd_dummy, /* abort */ + read_session_offset, + fixate_bdr, + stats_bd, + blank_bd, + format_dummy, + (int(*)__PR((SCSI *, caddr_t, int, int)))NULL, /* no OPC */ + cmd_dummy, /* opt1 */ + cmd_dummy, /* opt2 */ +}; + +/* * SCSI-3/mmc-3 conformant BD-R writer */ cdr_t cdr_bdr = { @@ -302,14 +355,16 @@ profile = get_curprofile(scgp); if (xdebug) - printf("Current profile: 0x%04X\n", profile); + printf(_("Current profile: 0x%04X\n"), profile); if (profile == 0x0043) { dp = &cdr_bdre; } else if ((profile == 0x0041) || (profile == 0x0042)) { dp = &cdr_bdr; + } else if (profile == 0x0040) { + dp = &cdr_bdrom; } else { - errmsgno(EX_BAD, "Found unsupported 0x%X profile.\n", profile); + errmsgno(EX_BAD, _("Found unsupported 0x%X profile.\n"), profile); return ((cdr_t *)0); } @@ -366,7 +421,7 @@ mp2Aspeed = a_to_u_2_byte(mp->max_write_speed); if (lverbose > 2) { - printf("max page 2A speed %lu (%lux), max perf speed %lu (%lux)\n", + printf(_("max page 2A speed %lu (%lux), max perf speed %lu (%lux)\n"), mp2Aspeed, mp2Aspeed/4495, xspeed, xspeed/4495); } @@ -465,8 +520,8 @@ * Raise the default timeout. * The first write takes a long time as it writes the lead in. */ - scgp->deftimeout = 100; /* 1:40 */ - + if (scgp->deftimeout < 100) + scg_settimeout(scgp, 100); /* 1:40 */ return (0); } @@ -526,6 +581,7 @@ BOOL did_dummy = FALSE; BOOL did_reload = FALSE; int profile; + Int32_t maxblocks; Ulong end_lba; if ((dp->cdr_dstat->ds_cdrflags & RF_PRATIP) != 0) { @@ -548,7 +604,7 @@ * Check for non writable disk first. */ #ifdef BD_DEBUG -error("DISK STATUS %X\n", dip->disk_status); +error(_("DISK STATUS %X\n"), dip->disk_status); #endif if (dip->disk_status == DS_COMPLETE && (dsp->ds_cdrflags & (RF_WRITE|RF_BLANK)) == RF_WRITE) { @@ -570,7 +626,7 @@ * it is mentioned in the MMC standard. */ if (lverbose) - printf("Trying to clear drive status.\n"); + printf(_("Trying to clear drive status.\n")); dp->cdr_cmdflags &= ~F_DUMMY; speed_select_bd(scgp, dp, &xspeed); @@ -628,8 +684,7 @@ profile = get_curprofile(scgp); if (profile == 0x0043) { dsp->ds_flags |= DSF_BD_RE; /* This is a BD-RE */ - if (dip->disk_status == DS_EMPTY && /* Unformatted */ - dip->disk_type == SES_UNDEF) { /* Not a CD */ + if (dip->disk_status == DS_EMPTY) { /* Unformatted */ dsp->ds_flags |= DSF_NEED_FORMAT; if ((dp->cdr_dstat->ds_cdrflags & RF_PRATIP) != 0) print_format_capacities(scgp); @@ -683,9 +738,13 @@ #ifdef BD_DEBUG error("NWAv %d Next rec addr %d\n", rp->nwa_v, (int)a_to_u_4_byte(rp->next_recordable_addr)); #endif + maxblocks = dsp->ds_maxblocks; -if (dip->disk_status == DS_EMPTY) - return (drive_getdisktype(scgp, dp)); + /* + * XXX this was: if (dip->disk_status == DS_EMPTY) + */ + if (dip->disk_status == DS_COMPLETE && profile != 0x0043) + return (drive_getdisktype(scgp, dp)); /* * This information is based on the physical pre recorded information. @@ -693,8 +752,8 @@ */ fillbytes((caddr_t)mode, sizeof (mode), '\0'); if (read_dvd_structure(scgp, (caddr_t)mode, 2, 1, 0, 0, 0) < 0) { - errmsgno(EX_BAD, "Cannot read BD structure.\n"); - return (-1); + errmsgno(EX_BAD, _("Cannot read BD structure.\n")); + return (drive_getdisktype(scgp, dp)); } len = a_to_u_2_byte(mode); len += 2; /* Data len is not included */ @@ -723,10 +782,10 @@ (a_to_u_3_byte(sp->phys_end) != 0) && (dsp->ds_maxblocks != (long)(a_to_u_3_byte(sp->phys_end) - a_to_u_3_byte(sp->phys_start) + 1))) { - printf("WARNING: Phys disk size %ld differs from rzone size %ld! Prerecorded disk?\n", + printf(_("WARNING: Phys disk size %ld differs from rzone size %ld! Prerecorded disk?\n"), (long)(a_to_u_3_byte(sp->phys_end) - a_to_u_3_byte(sp->phys_start) + 1), (long)dsp->ds_maxblocks); - printf("WARNING: Phys start: %ld Phys end %ld\n", + printf(_("WARNING: Phys start: %ld Phys end %ld\n"), (long)a_to_u_3_byte(sp->phys_start), (long)a_to_u_3_byte(sp->phys_end)); } @@ -742,14 +801,25 @@ error("MAXBLO %d from phys end - phys start\n", (int)(a_to_u_3_byte(sp->phys_end) - a_to_u_3_byte(sp->phys_start) + 1)); #endif + /* + * Workaround for some drive media combinations. + * At least the drive 'HL-DT-ST' 'BD-RE BH10LS30 ' '1.00' + * does not report maxblocks correctly with any BD media. + */ end_lba = 0L; scsi_get_perf_maxspeed(scgp, (Ulong *)NULL, (Ulong *)NULL, &end_lba); #ifdef BD_DEBUG error("end_lba; %lu\n", end_lba); #endif - if (end_lba > dsp->ds_maxblocks) - dsp->ds_maxblocks = end_lba; + if ((Int32_t)end_lba > dsp->ds_maxblocks) { + if (maxblocks == 0) + printf(_("WARNING: Drive returns zero media size, correcting.\n")); + dsp->ds_maxblocks = end_lba + 1; + } +#ifdef BD_DEBUG +error("FINAL MAXBLO %d\n", dsp->ds_maxblocks); +#endif return (drive_getdisktype(scgp, dp)); } @@ -784,7 +854,7 @@ fillbytes((caddr_t)mode, sizeof (mode), '\0'); - if (!get_mode_params(scgp, 0x05, "CD write parameter", + if (!get_mode_params(scgp, 0x05, _("CD write parameter"), mode, (Uchar *)0, (Uchar *)0, (Uchar *)0, &len)) return (-1); if (len == 0) @@ -795,13 +865,13 @@ ((struct scsi_mode_header *)mode)->blockdesc_len); #ifdef DEBUG if (lverbose > 1) - scg_prbytes("CD write parameter:", (Uchar *)mode, len); + scg_prbytes(_("CD write parameter:"), (Uchar *)mode, len); #endif if (get_curprofile(scgp) == 0x0043) { /* This is a BD-RE */ if (dummy != 0) { - errmsgno(EX_BAD, "BD-RE has no -dummy mode.\n"); + errmsgno(EX_BAD, _("BD-RE has no -dummy mode.\n")); return (-1); } if (dp->cdr_cmdflags & F_FIX) @@ -821,9 +891,9 @@ #ifdef DEBUG if (lverbose > 1) - scg_prbytes("CD write parameter:", (Uchar *)mode, len); + scg_prbytes(_("CD write parameter:"), (Uchar *)mode, len); #endif - if (!set_mode_params(scgp, "CD write parameter", mode, len, 0, -1)) { + if (!set_mode_params(scgp, _("CD write parameter"), mode, len, 0, -1)) { return (-1); } @@ -840,21 +910,21 @@ } if (lverbose && (dp->cdr_flags & CDR_FORCESPEED) != 0) - printf("Forcespeed is %s.\n", forcespeed?"ON":"OFF"); + printf(_("Forcespeed is %s.\n"), forcespeed?_("ON"):_("OFF")); if (!forcespeed && (dp->cdr_dstat->ds_cdrflags & RF_FORCESPEED) != 0) { - printf("Turning forcespeed on\n"); + printf(_("Turning forcespeed on\n")); forcespeed = TRUE; } if (forcespeed && (dp->cdr_dstat->ds_cdrflags & RF_FORCESPEED) == 0) { - printf("Turning forcespeed off\n"); + printf(_("Turning forcespeed off\n")); forcespeed = FALSE; } if ((dp->cdr_flags & CDR_FORCESPEED) != 0) { if (rp) { rp->AWSCD = forcespeed?1:0; - set_mode_params(scgp, "Ricoh Vendor Page", moder, moder[0]+1, 0, -1); + set_mode_params(scgp, _("Ricoh Vendor Page"), moder, moder[0]+1, 0, -1); rp = get_justlink_ricoh(scgp, moder); } } @@ -868,7 +938,7 @@ val = 0x7FFFFFFF; if (dp->cdr_flags & CDR_MMC3) { if (speed_select_mdvd(scgp, -1, val) < 0) - errmsgno(EX_BAD, "MMC-3 speed select did not work.\n"); + errmsgno(EX_BAD, _("MMC-3 speed select did not work.\n")); } else { if (val > 0xFFFF) val = 0xFFFF; @@ -963,7 +1033,7 @@ error("NWA: %ld valid: %d\n", dvd_next_addr, rz.nwa_v); #endif if (lverbose > 1) - printf("next writable addr: %ld valid: %d\n", dvd_next_addr, rz.nwa_v); + printf(_("next writable addr: %ld valid: %d\n"), dvd_next_addr, rz.nwa_v); } if (ap) *ap = dvd_next_addr; @@ -986,7 +1056,7 @@ fillbytes((caddr_t)mode, sizeof (mode), '\0'); - if (!get_mode_params(scgp, 0x05, "CD write parameter", + if (!get_mode_params(scgp, 0x05, _("CD write parameter"), mode, (Uchar *)0, (Uchar *)0, (Uchar *)0, &len)) return (-1); if (len == 0) @@ -1014,9 +1084,9 @@ #ifdef DEBUG if (lverbose > 1) - scg_prbytes("CD write parameter:", (Uchar *)mode, len); + scg_prbytes(_("CD write parameter:"), (Uchar *)mode, len); #endif - if (!set_mode_params(scgp, "CD write parameter", mode, len, 0, trackp->secsize)) + if (!set_mode_params(scgp, _("CD write parameter"), mode, len, 0, trackp->secsize)) return (-1); /* @@ -1062,11 +1132,11 @@ if (i >= 1) vtracks = TRUE; if (vtracks && lverbose) - printf("Compiling virtual track list ...\n"); + printf(_("Compiling virtual track list ...\n")); for (i = 0; i < MAX_TRACK; i++) { if (trackp[i].tracksize < (tsize_t)0) { - errmsgno(EX_BAD, "VTrack %d has unknown length.\n", i); + errmsgno(EX_BAD, _("VTrack %d has unknown length.\n"), i); return (-1); } amount = roundup(trackp[i].tracksize, secsize); @@ -1075,7 +1145,7 @@ ttrsize += trackp[i].tracksize; tamount += amount; if (vtracks && lverbose) - printf("Vtrack: %d size: %lld bytes %lld rounded (%lld sectors)\n", + printf(_("Vtrack: %d size: %lld bytes %lld rounded (%lld sectors)\n"), (int)trackp[i].track, (Llong)trackp[i].tracksize, amount, amount / (Llong)secsize); @@ -1088,12 +1158,12 @@ * XXX I believe that not. */ if (trackp[i].tracksize % secsize) { - comerrno(EX_BAD, "Virtual track %d is not a multiple of secsize.\n", (int)trackp[i].track); + comerrno(EX_BAD, _("Virtual track %d is not a multiple of secsize.\n"), (int)trackp[i].track); } } if (vtracks && lverbose) - printf("Vtracks: %d size: %lld bytes %lld rounded (%ld sectors) total\n", + printf(_("Vtracks: %d size: %lld bytes %lld rounded (%ld sectors) total\n"), i+1, ttrsize, tamount, sectors); return (sectors); @@ -1139,7 +1209,7 @@ fillbytes((caddr_t)mode, sizeof (mode), '\0'); - if (!get_mode_params(scgp, 0x05, "CD write parameter", + if (!get_mode_params(scgp, 0x05, _("CD write parameter"), mode, (Uchar *)0, (Uchar *)0, (Uchar *)0, &len)) return (-1); if (len == 0) @@ -1175,14 +1245,14 @@ } if (lverbose && (dp->cdr_flags & CDR_BURNFREE) != 0) - printf("BURN-Free is %s.\n", burnfree?"ON":"OFF"); + printf(_("BURN-Free is %s.\n"), burnfree?_("ON"):_("OFF")); if (!burnfree && (dp->cdr_dstat->ds_cdrflags & RF_BURNFREE) != 0) { - printf("Turning BURN-Free on\n"); + printf(_("Turning BURN-Free on\n")); burnfree = TRUE; } if (burnfree && (dp->cdr_dstat->ds_cdrflags & RF_BURNFREE) == 0) { - printf("Turning BURN-Free off\n"); + printf(_("Turning BURN-Free off\n")); burnfree = FALSE; } if (dp->cdr_cdcap->BUF != 0) { @@ -1195,17 +1265,17 @@ if (rp) { i_to_2_byte(rp->link_counter, 0); if (xdebug) - scg_prbytes("Mode Select Data ", moder, moder[0]+1); + scg_prbytes(_("Mode Select Data "), moder, moder[0]+1); - set_mode_params(scgp, "Ricoh Vendor Page", moder, moder[0]+1, 0, -1); + set_mode_params(scgp, _("Ricoh Vendor Page"), moder, moder[0]+1, 0, -1); rp = get_justlink_ricoh(scgp, moder); } #ifdef DEBUG if (lverbose > 1) - scg_prbytes("CD write parameter:", (Uchar *)mode, len); + scg_prbytes(_("CD write parameter:"), (Uchar *)mode, len); #endif - if (!set_mode_params(scgp, "CD write parameter", mode, len, 0, -1)) + if (!set_mode_params(scgp, _("CD write parameter"), mode, len, 0, -1)) return (-1); return (0); @@ -1227,13 +1297,11 @@ #define MAX_TRIES 15 /* - * This is only valid for DAO recording. - * XXX Check this if the DVR-S101 supports more. - * XXX flush cache currently makes sure that - * XXX at least ~ 800 MBytes written to the track. - * XXX flush cache triggers writing the lead out. + * XXX Is this timeout needed for BD-RE too? + * XXX It was introduced for DVD-R that writes at least 800 MB */ - scgp->deftimeout = 1000; + if (scgp->deftimeout < 1000) + scg_settimeout(scgp, 1000); /*scgp->verbose++;*/ scgp->silent++; @@ -1244,9 +1312,9 @@ scg_printerr(scgp); scg_printresult(scgp); /* XXX restore key/code in future */ } - printf("Trouble flushing the cache\n"); + printf(_("Trouble flushing the cache\n")); scgp->silent--; - scgp->deftimeout = oldtimeout; + scg_settimeout(scgp, oldtimeout); return (-1); } sleep(1); @@ -1257,6 +1325,7 @@ scgp->silent--; waitformat(scgp, 300); +#ifdef __needed__ /* BD-RE does not need (permit) a close session */ scgp->silent++; for (i = 0; i <= MAX_TRIES; i++) { if (scsi_close_tr_session(scgp, CL_TYPE_SESSION, 0, TRUE) < 0) { @@ -1265,7 +1334,7 @@ scg_printerr(scgp); scg_printresult(scgp); /* XXX restore key/code in future */ } - printf("Trouble closing the session\n"); + printf(_("Trouble closing the session\n")); break; } sleep(1); @@ -1274,10 +1343,12 @@ } } scgp->silent--; - waitformat(scgp, 300); /*scgp->verbose--;*/ +#endif /* __needed__ */ - scgp->deftimeout = oldtimeout; + waitformat(scgp, 300); + + scg_settimeout(scgp, oldtimeout); return (ret); #undef MAX_TRIES } @@ -1298,13 +1369,11 @@ #define MAX_TRIES 15 /* - * This is only valid for DAO recording. - * XXX Check this if the DVR-S101 supports more. - * XXX flush cache currently makes sure that - * XXX at least ~ 800 MBytes written to the track. - * XXX flush cache triggers writing the lead out. + * XXX Is this timeout needed for BD-R too? + * XXX It was introduced for DVD-R that writes at least 800 MB */ - scgp->deftimeout = 1000; + if (scgp->deftimeout < 1000) + scg_settimeout(scgp, 1000); /*scgp->verbose++;*/ scgp->silent++; @@ -1315,9 +1384,9 @@ scg_printerr(scgp); scg_printresult(scgp); /* XXX restore key/code in future */ } - printf("Trouble flushing the cache\n"); + printf(_("Trouble flushing the cache\n")); scgp->silent--; - scgp->deftimeout = oldtimeout; + scg_settimeout(scgp, oldtimeout); return (-1); } sleep(1); @@ -1346,7 +1415,7 @@ scg_printerr(scgp); scg_printresult(scgp); /* XXX restore key/code in future */ } - printf("Trouble closing the track\n"); + printf(_("Trouble closing the track\n")); break; } sleep(1); @@ -1367,7 +1436,7 @@ scg_printerr(scgp); scg_printresult(scgp); /* XXX restore key/code in future */ } - printf("Trouble closing the last session\n"); + printf(_("Trouble closing the last session\n")); break; } sleep(1); @@ -1381,7 +1450,7 @@ waitformat(scgp, 600); /*scgp->verbose--;*/ - scgp->deftimeout = oldtimeout; + scg_settimeout(scgp, oldtimeout); return (ret); #undef MAX_TRIES } @@ -1396,8 +1465,6 @@ long addr; int blanktype; { -/*XXX*/extern char *blank_types[]; - BOOL cdrr = FALSE; /* Read CD-R */ BOOL cdwr = FALSE; /* Write CD-R */ BOOL cdrrw = FALSE; /* Read CD-RW */ @@ -1408,8 +1475,11 @@ mmc_check(scgp, &cdrr, &cdwr, &cdrrw, &cdwrw, NULL, &dvdwr); - errmsgno(EX_BAD, "Cannot blank BD.\n"); - return (-1); + ret = blank_simul(scgp, dp, addr, blanktype); + waitformat(scgp, 600); + scsi_flush_cache(scgp, TRUE); + waitformat(scgp, 600); + return (ret); } LOCAL int @@ -1429,7 +1499,7 @@ * ^^^ * 0x10 Format Data * 0x01 Format Code == 1 - * 00 82 00 08 00 23 05 40 98 00 00 01" + * 00 82 00 08 00 B4 74 00 C3 00 30 00" * ^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^ * Format Format * header descriptor @@ -1445,6 +1515,7 @@ struct scsi_format_cap_desc *lp; struct scsi_format_header *fhp; long blocks = 0; + long blen = 0; struct timeval starttime; struct timeval stoptime; #ifdef BD_DEBUG @@ -1456,8 +1527,8 @@ return (-1); #ifdef BD_DEBUG - error("Cap len: %d\n", len); - scg_prbytes("Format cap:", (Uchar *)cap_buf, len); + error(_("Cap len: %d\n"), len); + scg_prbytes(_("Format cap:"), (Uchar *)cap_buf, len); #endif cp = (struct scsi_cap_data *)cap_buf; @@ -1465,7 +1536,7 @@ len -= sizeof (struct scsi_format_cap_header); if (lp->desc_type == 2) { if ((dp->cdr_cmdflags & F_FORCE) == 0) { - errmsgno(EX_BAD, "Medium is already formatted.\n"); + errmsgno(EX_BAD, _("Medium is already formatted.\n")); return (-1); } } @@ -1482,11 +1553,14 @@ lp->desc_type, (long)a_to_u_3_byte(lp->blen)); #endif - if (lp->fmt_type == FCAP_TYPE_DVDPLUS_FULL) + if (lp->fmt_type == FCAP_TYPE_BDRE_SPARE) { blocks = a_to_u_4_byte(lp->nblock); + blen = (long)a_to_u_3_byte(lp->blen); + break; + } } if (blocks == 0) { - errmsgno(EX_BAD, "DVD+RW Full format capacity not found.\n"); + errmsgno(EX_BAD, _("BD-RE Full format with spares, capacity not found.\n")); return (-1); } @@ -1498,19 +1572,19 @@ fhp->immed = 1; i_to_2_byte(fhp->length, 8); i_to_4_byte(lp->nblock, blocks); - lp->fmt_type = FCAP_TYPE_DVDPLUS_FULL; - i_to_3_byte(lp->blen, 0); -/* i_to_3_byte(lp->blen, 1);*/ + lp->fmt_type = FCAP_TYPE_BDRE_SPARE; + lp->desc_type = 3; /* Quick certification */ + i_to_3_byte(lp->blen, blen); #ifdef BD_DEBUG - scg_prbytes("Format desc:", (Uchar *)fmt_buf, 12); + scg_prbytes(_("Format desc:"), (Uchar *)fmt_buf, 12); #endif if (lverbose) { /* * XXX evt. restart Format ansagen... */ - printf("Formatting media\n"); + printf(_("Formatting media\n")); flush(); } starttime.tv_sec = 0; @@ -1519,7 +1593,8 @@ gettimeofday(&starttime, (struct timezone *)0); if (format_unit(scgp, fhp, /*fhp->length*/ 8 + sizeof (struct scsi_format_header), - 1, 0, 0, 0, 3800) < 0) { + 1, 0, 0, 0, + blocks > 20000000 ? 11000:5300) < 0) { return (-1); } @@ -1528,38 +1603,15 @@ /* if (ret >= 0 && lverbose) {*/ if (1) { gettimeofday(&stoptime, (struct timezone *)0); - prtimediff("Format time: ", &starttime, &stoptime); + prtimediff(_("Format time: "), &starttime, &stoptime); } #endif waitformat(scgp, 300); #ifdef BD_DEBUG gettimeofday(&stoptime2, (struct timezone *)0); - prtimediff("Format WAIT time: ", &stoptime, &stoptime2); - prtimediff("Format time TOTAL: ", &starttime, &stoptime2); -#endif - - -#ifdef BD_DEBUG -error("------------> STOP DE-ICE\n"); -#endif - scsi_close_tr_session(scgp, CL_TYPE_STOP_DEICE, 0, TRUE); - waitformat(scgp, 300); - -#ifdef BD_DEBUG - gettimeofday(&stoptime2, (struct timezone *)0); - prtimediff("Format time TOTAL 2 : ", &starttime, &stoptime2); -#endif - -#ifdef BD_DEBUG -error("------------> CLOSE SESSION\n"); -#endif - scsi_close_tr_session(scgp, CL_TYPE_SESSION, 0, TRUE); - waitformat(scgp, 300); - -#ifdef BD_DEBUG - gettimeofday(&stoptime2, (struct timezone *)0); - prtimediff("Format time TOTAL 3: ", &starttime, &stoptime2); + prtimediff(_("Format WAIT time: "), &stoptime, &stoptime2); + prtimediff(_("Format time TOTAL: "), &starttime, &stoptime2); #endif return (0); } @@ -1569,9 +1621,8 @@ SCSI *scgp; int secs; { -#ifdef BD_DEBUG Uchar sensebuf[CCS_SENSE_LEN]; -#endif + int printed = 0; int i; int key; #define W_SLEEP 2 @@ -1585,7 +1636,6 @@ key = scg_sense_key(scgp); if (key != SC_UNIT_ATTENTION && key != SC_NOT_READY) break; -#ifdef BD_DEBUG request_sense_b(scgp, (caddr_t)sensebuf, sizeof (sensebuf)); #ifdef XXX scg_prbytes("Sense:", sensebuf, sizeof (sensebuf)); @@ -1605,15 +1655,17 @@ * operation 1% done */ - if (sensebuf[15] & 0x80) { - error("operation %d%% done\n", + if (lverbose && (sensebuf[15] & 0x80)) { + printed++; + error(_("operation %d%% done\r"), (100*(sensebuf[16] << 8 | sensebuf[17]))/(unsigned)65536); } -#endif /* BD_DEBUG */ sleep(W_SLEEP); } scgp->silent--; + if (printed) + error("\n"); return (-1); #undef W_SLEEP } @@ -1635,9 +1687,9 @@ count = a_to_u_2_byte(rp->link_counter); if (lverbose) { if (count == 0) - printf("BURN-Free was not used.\n"); + printf(_("BURN-Free was not used.\n")); else - printf("BURN-Free was %d times used.\n", + printf(_("BURN-Free was %d times used.\n"), (int)count); } } @@ -1677,10 +1729,10 @@ scmd->cdb.g0_cdb.count = interlv; #ifdef BD_DEBUG - scg_prbytes("Format CDB: ", (u_char *)scmd->cdb.cmd_cdb, scmd->cdb_len); + scg_prbytes(_("Format CDB: "), (u_char *)scmd->cdb.cmd_cdb, scmd->cdb_len); /* if (scgp->verbose && fmt)*/ - scg_prbytes("Format Data:", (u_char *)fmt, length); + scg_prbytes(_("Format Data:"), (u_char *)fmt, length); #endif scgp->cmdname = "format unit"; @@ -1698,7 +1750,7 @@ int i; if (lverbose > 2) - printf("Enterning BD info....\n"); + printf(_("Entering BD info....\n")); /* * The ACARD TECH AEC-7720 ATAPI<->SCSI adaptor * chokes if we try to transfer odd byte counts (rounds up to @@ -1712,10 +1764,10 @@ if (lverbose > 1) mode_sense(scgp, mode, 250, 0x3F, 0); if (lverbose > 2) - scg_prbytes("Mode: ", mode, 250 - scg_getresid(scgp)); + scg_prbytes(_("Mode: "), mode, 250 - scg_getresid(scgp)); wait_unit_ready(scgp, 120); if (lverbose > 1) { - printf("Supported BD (readable) structures:"); + printf(_("Supported BD (readable) structures:")); scgp->silent++; for (i = 0; i <= 255; i++) { fillbytes((caddr_t)mode, sizeof (mode), '\0'); @@ -1727,7 +1779,7 @@ printf("\n"); /* printf("Page: %d ret: %d len: %d\n", i, ret, sizeof (mode) - scg_getresid(scgp));*/ if (lverbose > 2) - scg_prbytes("Page FF: ", mode, sizeof (mode) - scg_getresid(scgp)); + scg_prbytes(_("Page FF: "), mode, sizeof (mode) - scg_getresid(scgp)); if (sizeof (mode) - scg_getresid(scgp) > 4) { int len = a_to_u_2_byte(mode) - 2; Uchar *p = &mode[4]; @@ -1736,12 +1788,12 @@ len /= 4; for (i = 0; i < len; i++) { m = p[1] & 0xC0; - printf("Page %02X %s (%02X) len %d\n", + printf(_("Page %02X %s (%02X) len %d\n"), *p & 0xFF, m == 0xC0 ? - "read/write" : - (m == 0x80 ? " write" : - (m == 0x40 ? "read " : "unknown ")), + _("read/write") : + (m == 0x80 ? _(" write") : + (m == 0x40 ? _("read ") : _("unknown "))), p[1] & 0xFF, a_to_u_2_byte(&p[2])); p += 4; @@ -1759,7 +1811,7 @@ scgp->silent--; if (ret >= 0) { if (lverbose > 2) { - scg_prbytes("BD structure[0]: ", + scg_prbytes(_("BD structure[0]: "), mode, sizeof (mode) - scg_getresid(scgp)); /* scg_prascii("BD structure[0]: ", mode, sizeof (mode) - scg_getresid(scgp));*/ } @@ -1773,9 +1825,9 @@ scgp->silent--; if (ret >= 0) { if (lverbose > 2) { - scg_prbytes("BD structure[0x09]: ", + scg_prbytes(_("BD structure[0x09]: "), mode, sizeof (mode) - scg_getresid(scgp)); - scg_prascii("BD structure[0x09]: ", mode, sizeof (mode) - scg_getresid(scgp)); + scg_prascii(_("BD structure[0x09]: "), mode, sizeof (mode) - scg_getresid(scgp)); } print_bd09(mode); } @@ -1785,9 +1837,9 @@ scgp->silent--; if (ret >= 0) { if (lverbose > 2) { - scg_prbytes("BD structure[0x0A]: ", + scg_prbytes(_("BD structure[0x0A]: "), mode, sizeof (mode) - scg_getresid(scgp)); - scg_prascii("BD structure[0x0A]: ", mode, sizeof (mode) - scg_getresid(scgp)); + scg_prascii(_("BD structure[0x0A]: "), mode, sizeof (mode) - scg_getresid(scgp)); } print_bd0A(mode); } @@ -1797,9 +1849,9 @@ scgp->silent--; if (ret >= 0) { if (lverbose > 2) { - scg_prbytes("BD structure[0xC0]: ", + scg_prbytes(_("BD structure[0xC0]: "), mode, sizeof (mode) - scg_getresid(scgp)); - scg_prascii("BD structure[0xC0]: ", mode, sizeof (mode) - scg_getresid(scgp)); + scg_prascii(_("BD structure[0xC0]: "), mode, sizeof (mode) - scg_getresid(scgp)); } } #endif @@ -1809,10 +1861,10 @@ print_bd00(dp) Uchar *dp; { - int len = a_to_2_byte(dp)+2; Uchar *bd = &((Uchar *)dp)[4]; - #ifdef BD_DEBUG + int len = a_to_2_byte(dp)+2; + error("len %d\n", len); scg_prbytes("BD structure[0]: ", bd, 255); scg_prascii("BD structure[0]: ", bd, 255); @@ -1824,13 +1876,13 @@ printf("Type: '%.3s'\n", &bd[12+94]); #endif - printf("Disk type: '%.3s' (BD-%s)\n", &bd[8], + printf(_("Disk type: '%.3s' (BD-%s)\n"), &bd[8], bd[10] == 'O' ? "ROM": - (bd[10] == 'R' ? "R" : + (bd[10] == 'R' ? "R" : (bd[10] == 'W' ? "RE": "???"))); - printf("Disk class: %2.2X\n", bd[11]); - printf("Manufacturer: '%.6s'\n", &bd[12+88]); - printf("Media type: '%.3s'\n", &bd[12+94]); + printf(_("Disk class: %2.2X\n"), bd[11]); + printf(_("Manufacturer: '%.6s'\n"), &bd[12+88]); + printf(_("Media type: '%.3s'\n"), &bd[12+94]); } @@ -1838,40 +1890,40 @@ print_bd09(dp) Uchar *dp; { - int len = a_to_2_byte(dp)+2; Uchar *bd = &((Uchar *)dp)[4]; - #ifdef BD_DEBUG + int len = a_to_2_byte(dp)+2; + error("len %d\n", len); scg_prbytes("BD structure[09]: ", bd, len); scg_prascii("BD structure[09]: ", bd, len); #endif - printf("Disk: is %sin cartridge\n", - (bd[4] & 0x80) == 0 ? "not ": ""); + printf(_("Disk: is %sin cartridge\n"), + (bd[4] & 0x80) == 0 ? _("not "): ""); if (bd[4] & 0x80) { - printf("Disk: was %staken out of cartridge\n", - (bd[4] & 0x40) == 0 ? "not ": ""); + printf(_("Disk: was %staken out of cartridge\n"), + (bd[4] & 0x40) == 0 ? _("not "): ""); } - printf("Media cartrige: write protect is %s\n", - (bd[4] & 0x04) ? "on": "off"); + printf(_("Media cartrige: write protect is %s\n"), + (bd[4] & 0x04) ? _("on"): _("off")); } LOCAL void print_bd0A(dp) Uchar *dp; { +#ifdef BD_DEBUG int len = a_to_2_byte(dp)+2; Uchar *bd = &((Uchar *)dp)[4]; -#ifdef BD_DEBUG error("len %d\n", len); scg_prbytes("BD structure[0A]: ", bd, len); scg_prascii("BD structure[0A]: ", bd, len); #endif - printf("Free Spare Blocks: %lu\n", (unsigned long) + printf(_("Free Spare Blocks: %lu\n"), (unsigned long) a_to_4_byte(&dp[8])); - printf("Alloc Spare Blocks: %lu\n", (unsigned long) + printf(_("Alloc Spare Blocks: %lu\n"), (unsigned long) a_to_4_byte(&dp[12])); } diff -Nru cdrtools-2.01.01a33/cdrecord/drv_dvd.c cdrtools-3.02a09/cdrecord/drv_dvd.c --- cdrtools-2.01.01a33/cdrecord/drv_dvd.c 2007-08-08 22:59:51.000000000 +0000 +++ cdrtools-3.02a09/cdrecord/drv_dvd.c 2013-12-09 23:03:30.000000000 +0000 @@ -1,7 +1,8 @@ -/* @(#)drv_dvd.c 1.148 07/08/09 Copyright 1998-2007 J. Schilling */ +/* @(#)drv_dvd.c 1.167 13/12/10 Copyright 1998-2013 J. Schilling */ +#include #ifndef lint -static char sccsid[] = - "@(#)drv_dvd.c 1.148 07/08/09 Copyright 1998-2007 J. Schilling"; +static UConst char sccsid[] = + "@(#)drv_dvd.c 1.167 13/12/10 Copyright 1998-2013 J. Schilling"; #endif /* * DVD-R device implementation for @@ -31,7 +32,7 @@ * 2 print disk info & write parameters * 3 print log pages & dvd structure * - * Copyright (c) 1998-2007 J. Schilling + * Copyright (c) 1998-2013 J. Schilling */ /* * The contents of this file are subject to the terms of the @@ -40,6 +41,8 @@ * with the License. * * See the file CDDL.Schily.txt in this distribution for details. + * A copy of the CDDL is also available via the Internet at + * http://www.opensource.org/licenses/cddl1.txt * * When distributing Covered Code, include this CDDL HEADER in each * file and include the License file CDDL.Schily.txt from this distribution. @@ -50,7 +53,7 @@ #endif #include -#include +#include #include #include /* Include sys/types.h to make off_t available */ #include @@ -60,6 +63,7 @@ #include #include #include +#include #include #include @@ -92,6 +96,7 @@ LOCAL long rzone_size __PR((track_t *trackp)); LOCAL int close_track_dvd __PR((SCSI *scgp, cdr_t *dp, track_t *trackp)); LOCAL int open_session_dvd __PR((SCSI *scgp, cdr_t *dp, track_t *trackp)); +LOCAL int waitformat __PR((SCSI *scgp, int secs)); LOCAL int fixate_dvd __PR((SCSI *scgp, cdr_t *dp, track_t *trackp)); LOCAL int blank_dvd __PR((SCSI *scgp, cdr_t *dp, long addr, int blanktype)); LOCAL int stats_dvd __PR((SCSI *scgp, cdr_t *dp)); @@ -100,7 +105,9 @@ LOCAL int reserve_rzone __PR((SCSI *scgp, long size)); #endif /*LOCAL int send_dvd_structure __PR((SCSI *scgp, caddr_t bp, int cnt));*/ +#ifdef __needed__ LOCAL int set_layerbreak __PR((SCSI *scgp, long tsize, Int32_t lbreak)); +#endif LOCAL void print_dvd00 __PR((struct dvd_structure_00 *dp)); LOCAL void print_dvd01 __PR((struct dvd_structure_01 *dp)); LOCAL void print_dvd04 __PR((struct dvd_structure_04 *dp)); @@ -111,7 +118,9 @@ LOCAL void print_dvd20 __PR((struct dvd_structure_20 *dp)); LOCAL void print_dvd22 __PR((struct dvd_structure_22 *dp)); LOCAL void print_dvd23 __PR((struct dvd_structure_23 *dp)); +#ifdef __needed__ LOCAL void send_dvd0F __PR((SCSI *scgp)); +#endif /*LOCAL void print_dvd_info __PR((SCSI *scgp));*/ EXPORT void print_dvd_info __PR((SCSI *scgp)); LOCAL void print_laserlog __PR((SCSI *scgp)); @@ -264,7 +273,7 @@ mp2Aspeed = a_to_u_2_byte(mp->max_write_speed); if (lverbose > 2) { - printf("max page 2A speed %lu (%lux), max perf speed %lu (%lux)\n", + printf(_("max page 2A speed %lu (%lux), max perf speed %lu (%lux)\n"), mp2Aspeed, mp2Aspeed/1385, xspeed, xspeed/1385); } @@ -309,9 +318,9 @@ dp->cdr_flags &= ~(CDR_TAO); if (scgp->inq != NULL) { - if (strbeg("PIONEER", scgp->inq->vendor_info)) { - if (strbeg("DVD-RW DVR-103", scgp->inq->prod_ident) || - strbeg("DVD-R DVD-R7322", scgp->inq->prod_ident)) { + if (strbeg("PIONEER", scgp->inq->inq_vendor_info)) { + if (strbeg("DVD-RW DVR-103", scgp->inq->inq_prod_ident) || + strbeg("DVD-R DVD-R7322", scgp->inq->inq_prod_ident)) { mp->BUF = 1; } } @@ -375,7 +384,7 @@ if ((*ep != '\0' && *ep != ',') || ll <= 0 || ll != lb) { errmsgno(EX_BAD, - "Bad layer break value '%s'.\n", p); + _("Bad layer break value '%s'.\n"), p); return (-1); } dp->cdr_dstat->ds_layer_break = lb; @@ -387,14 +396,14 @@ if (dp->cdr_dstat->ds_layer_break >= 0 && (dp->cdr_flags & CDR_LAYER_JUMP) == 0) { errmsgno(EX_BAD, - "Cannot set layer break on this drive/medium.\n"); + _("Cannot set layer break on this drive/medium.\n")); return (-1); } if (dp->cdr_dstat->ds_layer_break != -1 && dp->cdr_dstat->ds_layer_break != roundup(dp->cdr_dstat->ds_layer_break, 16)) { errmsgno(EX_BAD, - "Layer break at %u is not properly aligned.\n", + _("Layer break at %u is not properly aligned.\n"), dp->cdr_dstat->ds_layer_break); return (-1); } @@ -404,7 +413,8 @@ * Raise the default timeout. * The first write takes a long time as it writes the lead in. */ - scgp->deftimeout = 100; /* 1:40 */ + if (scgp->deftimeout < 100) + scg_settimeout(scgp, 100); /* 1:40 */ return (0); } @@ -461,6 +471,7 @@ struct rzone_info rz; struct rzone_info *rp; struct dvd_structure_00 *sp; + int profile; int len; BOOL did_dummy = FALSE; @@ -470,6 +481,13 @@ if (lverbose > 2) print_logpages(scgp); + + if (dsp->ds_type == DST_UNKNOWN) { + profile = get_curprofile(scgp); + if (profile >= 0) + dsp->ds_type = profile; + } + if ((dp->cdr_dstat->ds_cdrflags & RF_PRATIP) != 0) { if (((dsp->ds_cdrflags & (RF_WRITE|RF_BLANK)) == 0) || lverbose > 1) { @@ -501,7 +519,7 @@ * it is mentioned in the MMC standard. */ if (lverbose) - printf("Trying to clear drive status.\n"); + printf(_("Trying to clear drive status.\n")); dp->cdr_cmdflags &= ~F_DUMMY; speed_select_dvd(scgp, dp, &xspeed); @@ -556,7 +574,7 @@ */ fillbytes((caddr_t)mode, sizeof (mode), '\0'); if (read_dvd_structure(scgp, (caddr_t)mode, 2, 0, 0, 0, 0) < 0) { - errmsgno(EX_BAD, "Cannot read DVD structure.\n"); + errmsgno(EX_BAD, _("Cannot read DVD structure.\n")); return (-1); } len = a_to_u_2_byte(mode); @@ -597,12 +615,32 @@ (a_to_u_3_byte(sp->phys_end) != 0) && (dsp->ds_maxblocks != (long)(a_to_u_3_byte(sp->phys_end) - a_to_u_3_byte(sp->phys_start) + 1))) { - printf("WARNING: Phys disk size %ld differs from rzone size %ld! Prerecorded disk?\n", + /* + * NEC 'DVD_RW ND-3500AG' mit 'MCC 03RG20 ' DVD-R (leer): + * dsp->ds_maxblocks: 2298496 + * sp->phys_start: 196608 (0x30000) + * sp->phys_end: 2495103 + * 2298496 = 2495103 - 196608 +1 + * Bei diesen Parametern gibt es keine Warnung. + */ + + printf(_("WARNING: Phys disk size %ld differs from rzone size %ld! Prerecorded disk?\n"), (long)(a_to_u_3_byte(sp->phys_end) - a_to_u_3_byte(sp->phys_start) + 1), (long)dsp->ds_maxblocks); - printf("WARNING: Phys start: %ld Phys end %ld\n", + printf(_("WARNING: Phys start: %ld Phys end %ld\n"), (long)a_to_u_3_byte(sp->phys_start), (long)a_to_u_3_byte(sp->phys_end)); + + /* + * Workaround for some drive media combinations. + * At least the drive 'HL-DT-ST' 'DVD-RAM GH22NP20' '1.02' + * does not report maxblocks correctly with 'MCC 03RG20 ' media. + * Use the information from ADIP instead. + */ + if (dsp->ds_maxblocks == 0) { + printf(_("WARNING: Drive returns zero media size. Using media size from ADIP.\n")); + dsp->ds_maxblocks = a_to_u_3_byte(sp->phys_end) - a_to_u_3_byte(sp->phys_start) + 1; + } } return (drive_getdisktype(scgp, dp)); @@ -639,7 +677,7 @@ fillbytes((caddr_t)mode, sizeof (mode), '\0'); - if (!get_mode_params(scgp, 0x05, "CD write parameter", + if (!get_mode_params(scgp, 0x05, _("CD write parameter"), mode, (Uchar *)0, (Uchar *)0, (Uchar *)0, &len)) return (-1); if (len == 0) @@ -650,11 +688,11 @@ ((struct scsi_mode_header *)mode)->blockdesc_len); #ifdef DEBUG if (lverbose > 1) - scg_prbytes("CD write parameter:", (Uchar *)mode, len); + scg_prbytes(_("CD write parameter:"), (Uchar *)mode, len); #endif if (dp->cdr_dstat->ds_type == DST_DVD_RAM && dummy != 0) { - errmsgno(EX_BAD, "DVD-RAM has no -dummy mode.\n"); + errmsgno(EX_BAD, _("DVD-RAM has no -dummy mode.\n")); return (-1); } @@ -674,9 +712,9 @@ #ifdef DEBUG if (lverbose > 1) - scg_prbytes("CD write parameter:", (Uchar *)mode, len); + scg_prbytes(_("CD write parameter:"), (Uchar *)mode, len); #endif - if (!set_mode_params(scgp, "CD write parameter", mode, len, 0, -1)) + if (!set_mode_params(scgp, _("CD write parameter"), mode, len, 0, -1)) return (-1); /* @@ -692,21 +730,21 @@ } if (lverbose && (dp->cdr_flags & CDR_FORCESPEED) != 0) - printf("Forcespeed is %s.\n", forcespeed?"ON":"OFF"); + printf(_("Forcespeed is %s.\n"), forcespeed?_("ON"):_("OFF")); if (!forcespeed && (dp->cdr_dstat->ds_cdrflags & RF_FORCESPEED) != 0) { - printf("Turning forcespeed on\n"); + printf(_("Turning forcespeed on\n")); forcespeed = TRUE; } if (forcespeed && (dp->cdr_dstat->ds_cdrflags & RF_FORCESPEED) == 0) { - printf("Turning forcespeed off\n"); + printf(_("Turning forcespeed off\n")); forcespeed = FALSE; } if ((dp->cdr_flags & CDR_FORCESPEED) != 0) { if (rp) { rp->AWSCD = forcespeed?1:0; - set_mode_params(scgp, "Ricoh Vendor Page", moder, moder[0]+1, 0, -1); + set_mode_params(scgp, _("Ricoh Vendor Page"), moder, moder[0]+1, 0, -1); rp = get_justlink_ricoh(scgp, moder); } } @@ -720,7 +758,7 @@ val = 0x7FFFFFFF; if (dp->cdr_flags & CDR_MMC3) { if (speed_select_mdvd(scgp, -1, val) < 0) - errmsgno(EX_BAD, "MMC-3 speed select did not work.\n"); + errmsgno(EX_BAD, _("MMC-3 speed select did not work.\n")); } else { if (val > 0xFFFF) val = 0xFFFF; @@ -761,10 +799,10 @@ return (0); } -LOCAL int -session_offset_dvd(scgp, offp) - SCSI *scgp; - long *offp; +LOCAL int +session_offset_dvd(scgp, offp) + SCSI *scgp; + long *offp; { return (sessstatus(scgp, FALSE, offp, (long *)NULL)); } @@ -810,10 +848,13 @@ * XXX filesize support. */ fillbytes((caddr_t)&rz, sizeof (rz), '\0'); + if (track_base(trackp)->tracktype & TOCF_MULTI) + get_trackinfo(scgp, (caddr_t)&rz, TI_TYPE_TRACK, trackp->trackno, sizeof (rz)); + else read_rzone_info(scgp, (caddr_t)&rz, sizeof (struct rzone_info)); dvd_next_addr = a_to_4_byte(rz.next_recordable_addr); if (lverbose > 1) - printf("next writable addr: %ld valid: %d\n", dvd_next_addr, rz.nwa_v); + printf(_("next writable addr: %ld valid: %d\n"), dvd_next_addr, rz.nwa_v); } if (ap) *ap = dvd_next_addr; @@ -846,7 +887,7 @@ fillbytes((caddr_t)mode, sizeof (mode), '\0'); - if (!get_mode_params(scgp, 0x05, "CD write parameter", + if (!get_mode_params(scgp, 0x05, _("CD write parameter"), mode, (Uchar *)0, (Uchar *)0, (Uchar *)0, &len)) return (-1); if (len == 0) @@ -874,9 +915,9 @@ #ifdef DEBUG if (lverbose > 1) - scg_prbytes("CD write parameter:", (Uchar *)mode, len); + scg_prbytes(_("CD write parameter:"), (Uchar *)mode, len); #endif - if (!set_mode_params(scgp, "CD write parameter", mode, len, 0, trackp->secsize)) + if (!set_mode_params(scgp, _("CD write parameter"), mode, len, 0, trackp->secsize)) return (-1); /* @@ -912,11 +953,11 @@ if (i >= 1) vtracks = TRUE; if (vtracks && lverbose) - printf("Compiling virtual track list ...\n"); + printf(_("Compiling virtual track list ...\n")); for (i = 0; i < MAX_TRACK; i++) { if (trackp[i].tracksize < (tsize_t)0) { - errmsgno(EX_BAD, "VTrack %d has unknown length.\n", i); + errmsgno(EX_BAD, _("VTrack %d has unknown length.\n"), i); return (-1); } amount = roundup(trackp[i].tracksize, secsize); @@ -925,7 +966,7 @@ ttrsize += trackp[i].tracksize; tamount += amount; if (vtracks && lverbose) - printf("Vtrack: %d size: %lld bytes %lld rounded (%lld sectors)\n", + printf(_("Vtrack: %d size: %lld bytes %lld rounded (%lld sectors)\n"), (int)trackp[i].track, (Llong)trackp[i].tracksize, amount, amount / (Llong)secsize); @@ -938,12 +979,12 @@ * XXX I believe that not. */ if (trackp[i].tracksize % secsize) { - comerrno(EX_BAD, "Virtual track %d is not a multiple of secsize.\n", (int)trackp[i].track); + comerrno(EX_BAD, _("Virtual track %d is not a multiple of secsize.\n"), (int)trackp[i].track); } } if (vtracks && lverbose) - printf("Vtracks: %d size: %lld bytes %lld rounded (%ld sectors) total\n", + printf(_("Vtracks: %d size: %lld bytes %lld rounded (%ld sectors) total\n"), i+1, ttrsize, tamount, sectors); return (sectors); @@ -988,7 +1029,7 @@ fillbytes((caddr_t)mode, sizeof (mode), '\0'); - if (!get_mode_params(scgp, 0x05, "CD write parameter", + if (!get_mode_params(scgp, 0x05, _("CD write parameter"), mode, (Uchar *)0, (Uchar *)0, (Uchar *)0, &len)) return (-1); if (len == 0) @@ -1026,14 +1067,14 @@ } if (lverbose && (dp->cdr_flags & CDR_BURNFREE) != 0) - printf("BURN-Free is %s.\n", burnfree?"ON":"OFF"); + printf(_("BURN-Free is %s.\n"), burnfree?_("ON"):_("OFF")); if (!burnfree && (dp->cdr_dstat->ds_cdrflags & RF_BURNFREE) != 0) { - printf("Turning BURN-Free on\n"); + printf(_("Turning BURN-Free on\n")); burnfree = TRUE; } if (burnfree && (dp->cdr_dstat->ds_cdrflags & RF_BURNFREE) == 0) { - printf("Turning BURN-Free off\n"); + printf(_("Turning BURN-Free off\n")); burnfree = FALSE; } if (dp->cdr_cdcap->BUF != 0) { @@ -1046,23 +1087,99 @@ if (rp) { i_to_2_byte(rp->link_counter, 0); if (xdebug) - scg_prbytes("Mode Select Data ", moder, moder[0]+1); + scg_prbytes(_("Mode Select Data "), moder, moder[0]+1); - set_mode_params(scgp, "Ricoh Vendor Page", moder, moder[0]+1, 0, -1); + set_mode_params(scgp, _("Ricoh Vendor Page"), moder, moder[0]+1, 0, -1); rp = get_justlink_ricoh(scgp, moder); } + /* + * 05 32 40 c5 08 10 00 00 + * FUFE + PACKET + * MULTI + NO FP + TM_DATA + * DB_ROM_MODE1 + * LINKSIZE == 16 + * mp->session_format SES_DA_ROM + */ + mp->multi_session = (track_base(trackp)->tracktype & TOCF_MULTI) ? + MS_MULTI : MS_NONE; + + /* + * If we are writing in multi-border mode, we need to write in packet + * mode even if we have been told to write on SAO mode. + */ + if (track_base(trackp)->tracktype & TOCF_MULTI) { + mp->write_type = WT_PACKET; + mp->track_mode = TM_DATA; + mp->track_mode |= TM_INCREMENTAL; + mp->fp = 0; + i_to_4_byte(mp->packet_size, 0); + mp->link_size = 16; + } #ifdef DEBUG if (lverbose > 1) - scg_prbytes("CD write parameter:", (Uchar *)mode, len); + scg_prbytes(_("CD write parameter:"), (Uchar *)mode, len); #endif - if (!set_mode_params(scgp, "CD write parameter", mode, len, 0, -1)) + if (!set_mode_params(scgp, _("CD write parameter"), mode, len, 0, -1)) return (-1); return (0); } +LOCAL int +waitformat(scgp, secs) + SCSI *scgp; + int secs; +{ +#ifdef DVD_DEBUG + Uchar sensebuf[CCS_SENSE_LEN]; +#endif + int i; + int key; +#define W_SLEEP 2 + + scgp->silent++; + for (i = 0; i < secs/W_SLEEP; i++) { + if (test_unit_ready(scgp) >= 0) { + scgp->silent--; + return (0); + } + key = scg_sense_key(scgp); + if (key != SC_UNIT_ATTENTION && key != SC_NOT_READY) + break; +#ifdef DVD_DEBUG + request_sense_b(scgp, (caddr_t)sensebuf, sizeof (sensebuf)); +#ifdef XXX + scg_prbytes(_("Sense:"), sensebuf, sizeof (sensebuf)); + scgp->scmd->u_scb.cmd_scb[0] = 2; + movebytes(sensebuf, scgp->scmd->u_sense.cmd_sense, sizeof (sensebuf)); + scgp->scmd->sense_count = sizeof (sensebuf); + scg_printerr(scgp); +#endif +/* + * status: 0x2 (CHECK CONDITION) + * Sense Bytes: F0 00 00 00 24 1C 10 0C 00 00 00 00 04 04 00 80 03 F6 + * Sense Key: 0x0 No Additional Sense, Segment 0 + * Sense Code: 0x04 Qual 0x04 (logical unit not ready, format in progress) Fru 0x0 + * Sense flags: Blk 2366480 (valid) + * cmd finished after 0.000s timeout 100s + * Das Fehlt: + * operation 1% done + */ + + if (sensebuf[15] & 0x80) { + error(_("operation %d%% done\n"), + (100*(sensebuf[16] << 8 | + sensebuf[17]))/(unsigned)65536); + } +#endif /* DVD_DEBUG */ + sleep(W_SLEEP); + } + scgp->silent--; + return (-1); +#undef W_SLEEP +} LOCAL int fixate_dvd(scgp, dp, trackp) @@ -1072,6 +1189,7 @@ { int oldtimeout = scgp->deftimeout; int ret = 0; + int trackno; /* * This is only valid for DAO recording. @@ -1080,15 +1198,20 @@ * XXX at least ~ 800 MBytes written to the track. * XXX flush cache triggers writing the lead out. */ - scgp->deftimeout = 1000; + if (scgp->deftimeout < 1000) + scg_settimeout(scgp, 1000); if (scsi_flush_cache(scgp, FALSE) < 0) { - printf("Trouble flushing the cache\n"); - scgp->deftimeout = oldtimeout; + printf(_("Trouble flushing the cache\n")); + scg_settimeout(scgp, oldtimeout); return (-1); } + waitformat(scgp, 100); + trackno = trackp->trackno; + if (trackno <= 0) + trackno = 1; - scgp->deftimeout = oldtimeout; + scg_settimeout(scgp, oldtimeout); if (dp->cdr_dstat->ds_type == DST_DVD_RAM) { /* @@ -1097,6 +1220,8 @@ */ return (ret); } + if (track_base(trackp)->tracktype & TOCF_MULTI) + scsi_close_tr_session(scgp, CL_TYPE_SESSION, trackno, TRUE); return (ret); } @@ -1123,13 +1248,17 @@ */ profile = get_curprofile(scgp); if (profile > 0) - dvdwr = (profile == 0x13) || (profile == 0x14); + dvdwr = (profile == 0x13) || (profile == 0x14) || + (profile == 0x17); + + if (profile == 0x12) /* DVD-RAM */ + return (blank_simul(scgp, dp, addr, blanktype)); if (!dvdwr) return (blank_dummy(scgp, dp, addr, blanktype)); if (lverbose) { - printf("Blanking %s\n", blank_types[blanktype & 0x07]); + printf(_("Blanking %s\n"), blank_types[blanktype & 0x07]); flush(); } @@ -1153,9 +1282,9 @@ count = a_to_u_2_byte(rp->link_counter); if (lverbose) { if (count == 0) - printf("BURN-Free was not used.\n"); + printf(_("BURN-Free was not used.\n")); else - printf("BURN-Free was %d times used.\n", + printf(_("BURN-Free was %d times used.\n"), (int)count); } } @@ -1243,6 +1372,7 @@ } #endif +#ifdef __needed__ LOCAL int set_layerbreak(scgp, tsize, lbreak) SCSI *scgp; @@ -1299,7 +1429,7 @@ jump_lba = a_to_u_4_byte(lb.jump_lba); if (lbreak > 0 && lbreak > jump_lba) { - errmsgno(EX_BAD, "Manual layer break %d > %u not allowed.\n", + errmsgno(EX_BAD, _("Manual layer break %d > %u not allowed.\n"), lbreak, jump_lba); return (-1); } @@ -1310,15 +1440,15 @@ * in case of manual layer break set up. */ errmsgno(EX_BAD, - "Layer 0 size %u is bigger than expected disk size %u.\n", + _("Layer 0 size %u is bigger than expected disk size %u.\n"), (jump_lba+1), dsize); - errmsgno(EX_BAD, "Use single layer medium.\n"); + errmsgno(EX_BAD, _("Use single layer medium.\n")); return (-1); } jump_lba = dsize / 2; jump_lba = roundup(jump_lba, 16); if (lbreak > 0 && lbreak < jump_lba) { - errmsgno(EX_BAD, "Manual layer break %d < %u not allowed.\n", + errmsgno(EX_BAD, _("Manual layer break %d < %u not allowed.\n"), lbreak, jump_lba); return (-1); } @@ -1330,6 +1460,7 @@ ret = send_dvd_structure(scgp, (caddr_t)&lb, sizeof (lb), 0x23); return (ret); } +#endif LOCAL char ill_booktype[] = "reserved book type"; char *book_types[] = { @@ -1529,41 +1660,41 @@ } } - printf("book type: %s, Version %s%s%s(%d.%d)\n", + printf(_("book type: %s, Version %s%s%s(%d.%d)\n"), book_types[dp->book_type], vers, ext_vers, *vers ? " ":"", dp->book_type, dp->book_version); - printf("disc size: %s (%d)\n", disc_sizes[dp->disc_size], dp->disc_size); - printf("maximum rate: %s (%d)\n", tr_rates[dp->maximum_rate], dp->maximum_rate); - printf("number of layers:%d\n", dp->numlayers+1); - printf("track path: %s Track Path (%d)\n", - dp->track_path?"Opposite":"Parallel", + printf(_("disc size: %s (%d)\n"), disc_sizes[dp->disc_size], dp->disc_size); + printf(_("maximum rate: %s (%d)\n"), tr_rates[dp->maximum_rate], dp->maximum_rate); + printf(_("number of layers:%d\n"), dp->numlayers+1); + printf(_("track path: %s Track Path (%d)\n"), + dp->track_path?_("Opposite"):_("Parallel"), dp->track_path); - printf("layer type: %s (%d)\n", layer_types[dp->layer_type], + printf(_("layer type: %s (%d)\n"), layer_types[dp->layer_type], dp->layer_type); - printf("linear density: %s (%d)\n", ldensities[dp->linear_density], + printf(_("linear density: %s (%d)\n"), ldensities[dp->linear_density], dp->linear_density); - printf("track density: %s (%d)\n", tdensities[dp->track_density], + printf(_("track density: %s (%d)\n"), tdensities[dp->track_density], dp->track_density); - printf("phys start: %ld (0x%lX) \n", + printf(_("phys start: %ld (0x%lX) \n"), a_to_u_3_byte(dp->phys_start), a_to_u_3_byte(dp->phys_start)); - printf("phys end: %ld\n", a_to_u_3_byte(dp->phys_end)); - printf("end layer 0: %ld\n", a_to_u_3_byte(dp->end_layer0)); - printf("bca: %d\n", dp->bca); - printf("phys size:... %ld\n", a_to_u_3_byte(dp->phys_end) - a_to_u_3_byte(dp->phys_start) + 1); + printf(_("phys end: %ld\n"), a_to_u_3_byte(dp->phys_end)); + printf(_("end layer 0: %ld\n"), a_to_u_3_byte(dp->end_layer0)); + printf(_("bca: %d\n"), dp->bca); + printf(_("phys size:... %ld\n"), a_to_u_3_byte(dp->phys_end) - a_to_u_3_byte(dp->phys_start) + 1); lbr = a_to_u_3_byte(dp->end_layer0) - a_to_u_3_byte(dp->phys_start) + 1; if (lbr > 0) - printf("layer break at: %ld\n", lbr); + printf(_("layer break at: %ld\n"), lbr); } LOCAL void print_dvd01(dp) struct dvd_structure_01 *dp; { - printf("copyr prot type: %d\n", dp->copyr_prot_type); - printf("region mgt info: %d\n", dp->region_mgt_info); + printf(_("copyr prot type: %d\n"), dp->copyr_prot_type); + printf(_("region mgt info: %d\n"), dp->region_mgt_info); } LOCAL void @@ -1572,7 +1703,7 @@ { if (cmpnullbytes(dp->man_info, sizeof (dp->man_info)) < sizeof (dp->man_info)) { - printf("Manufacturing info: '%.2048s'\n", dp->man_info); + printf(_("Manufacturing info: '%.2048s'\n"), dp->man_info); } } @@ -1580,15 +1711,15 @@ print_dvd05(dp) struct dvd_structure_05 *dp; { - printf("cpm: %d\n", dp->cpm); - printf("cgms: %d\n", dp->cgms); + printf(_("cpm: %d\n"), dp->cpm); + printf(_("cgms: %d\n"), dp->cgms); } LOCAL void print_dvd0D(dp) struct dvd_structure_0D *dp; { - printf("last rma sector: %d\n", a_to_u_2_byte(dp->last_rma_sector)); + printf(_("last rma sector: %d\n"), a_to_u_2_byte(dp->last_rma_sector)); } LOCAL void @@ -1601,25 +1732,25 @@ char *p = (char *)dp; if (dp->field_id != 1) - printf("field id: %d\n", dp->field_id); - printf("application code:%d\n", dp->application_code); - printf("physical code: %d\n", dp->phys_data); - printf("last rec address:%ld\n", a_to_u_3_byte(dp->last_recordable_addr)); - printf("part v./ext code:%X/%X\n", (Uint)(dp->res_a[0] & 0xF0) >> 4, + printf(_("field id: %d\n"), dp->field_id); + printf(_("application code:%d\n"), dp->application_code); + printf(_("physical code: %d\n"), dp->phys_data); + printf(_("last rec address:%ld\n"), a_to_u_3_byte(dp->last_recordable_addr)); + printf(_("part v./ext code:%X/%X\n"), (Uint)(dp->res_a[0] & 0xF0) >> 4, dp->res_a[0] & 0xF); if (dp->field_id_2 != 2) - printf("field id2: %d\n", dp->field_id_2); - printf("ind wr. power: %d\n", dp->ind_wr_power); - printf("wavelength code: %d\n", dp->ind_wavelength); - scg_fprbytes(stdout, "write str. code:", dp->opt_wr_strategy, 4); + printf(_("field id2: %d\n"), dp->field_id_2); + printf(_("ind wr. power: %d\n"), dp->ind_wr_power); + printf(_("wavelength code: %d\n"), dp->ind_wavelength); + scg_fprbytes(stdout, _("write str. code:"), dp->opt_wr_strategy, 4); if (dp->field_id_3 != 3) - printf("field id3: %d\n", dp->field_id_3); + printf(_("field id3: %d\n"), dp->field_id_3); if (dp->field_id_4 != 4) - printf("field id4: %d\n", dp->field_id_4); + printf(_("field id4: %d\n"), dp->field_id_4); - printf("Manufacturer: '"); + printf(_("Manufacturer: '")); for (i = 0; i < 6; i++) { c = dp->man_id[i]; if (c >= ' ' && c < 0177) @@ -1642,7 +1773,7 @@ if (lverbose <= 1) return; - printf("Prerecorded info : "); + printf(_("Prerecorded info : ")); for (i = 0; i < len; i++) { c = p[i]; if (c >= ' ' && c < 0177) @@ -1657,16 +1788,17 @@ print_dvd0F(dp) struct dvd_structure_0F *dp; { - printf("random: %d\n", a_to_u_2_byte(dp->random)); - printf("year: %.4s\n", dp->year); - printf("month: %.2s\n", dp->month); - printf("day: %.2s\n", dp->day); - printf("hour: %.2s\n", dp->hour); - printf("minute: %.2s\n", dp->minute); - printf("second: %.2s\n", dp->second); + printf(_("random: %d\n"), a_to_u_2_byte(dp->random)); + printf(_("year: %.4s\n"), dp->year); + printf(_("month: %.2s\n"), dp->month); + printf(_("day: %.2s\n"), dp->day); + printf(_("hour: %.2s\n"), dp->hour); + printf(_("minute: %.2s\n"), dp->minute); + printf(_("second: %.2s\n"), dp->second); } +#ifdef __needed__ LOCAL void send_dvd0F(scgp) SCSI *scgp; @@ -1681,27 +1813,28 @@ strncpy((char *)d.second, "00", 2); /* send_dvd_structure(scgp, (caddr_t)&d, sizeof (d));*/ } +#endif LOCAL void print_dvd20(dp) struct dvd_structure_20 *dp; { - printf("L0 init status: %d\n", dp->res47[0] & 0x80 ? 1 : 0); - printf("L0 data areacap: %ld\n", a_to_u_4_byte(dp->l0_area_cap)); + printf(_("L0 init status: %d\n"), dp->res47[0] & 0x80 ? 1 : 0); + printf(_("L0 data areacap: %ld\n"), a_to_u_4_byte(dp->l0_area_cap)); } LOCAL void print_dvd22(dp) struct dvd_structure_22 *dp; { - printf("Jump intervalsz: %ld\n", a_to_u_4_byte(dp->jump_interval_size)); + printf(_("Jump intervalsz: %ld\n"), a_to_u_4_byte(dp->jump_interval_size)); } LOCAL void print_dvd23(dp) struct dvd_structure_23 *dp; { - printf("Jump LBA: %ld\n", a_to_u_4_byte(dp->jump_lba)); + printf(_("Jump LBA: %ld\n"), a_to_u_4_byte(dp->jump_lba)); } @@ -1716,7 +1849,7 @@ int i; if (lverbose > 2) - printf("Enterning DVD info....\n"); + printf(_("Entering DVD info....\n")); /* * The ACARD TECH AEC-7720 ATAPI<->SCSI adaptor * chokes if we try to transfer odd byte counts (rounds up to @@ -1734,10 +1867,10 @@ if (lverbose > 1) mode_sense(scgp, mode, 250, 0x3F, 0); if (lverbose > 2) - scg_prbytes("Mode: ", mode, 250 - scg_getresid(scgp)); + scg_prbytes(_("Mode: "), mode, 250 - scg_getresid(scgp)); wait_unit_ready(scgp, 120); if (lverbose > 1) { - printf("Supported DVD (readable) structures:"); + printf(_("Supported DVD (readable) structures:")); scgp->silent++; for (i = 0; i <= 255; i++) { fillbytes((caddr_t)mode, sizeof (mode), '\0'); @@ -1749,7 +1882,7 @@ printf("\n"); /* printf("Page: %d ret: %d len: %d\n", i, ret, sizeof (mode) - scg_getresid(scgp));*/ if (lverbose > 2) - scg_prbytes("Page FF: ", mode, sizeof (mode) - scg_getresid(scgp)); + scg_prbytes(_("Page FF: "), mode, sizeof (mode) - scg_getresid(scgp)); if (sizeof (mode) - scg_getresid(scgp) > 4) { int len = a_to_u_2_byte(mode) - 2; Uchar *p = &mode[4]; @@ -1758,12 +1891,12 @@ len /= 4; for (i = 0; i < len; i++) { m = p[1] & 0xC0; - printf("Page %02X %s (%02X) len %d\n", + printf(_("Page %02X %s (%02X) len %d\n"), *p & 0xFF, m == 0xC0 ? - "read/write" : - (m == 0x80 ? " write" : - (m == 0x40 ? "read " : "unknown ")), + _("read/write") : + (m == 0x80 ? _(" write") : + (m == 0x40 ? _("read ") : _("unknown "))), p[1] & 0xFF, a_to_u_2_byte(&p[2])); p += 4; @@ -1781,7 +1914,7 @@ scgp->silent--; if (ret >= 0) { if (lverbose > 2) { - scg_prbytes("DVD structure[0]: ", + scg_prbytes(_("DVD structure[0]: "), mode, sizeof (mode) - scg_getresid(scgp)); /* scg_prascii("DVD structure[0]: ", mode, sizeof (mode) - scg_getresid(scgp));*/ } @@ -1789,8 +1922,8 @@ ret = get_curprofile(scgp); if (ret == 0x001A || ret == 0x001B) { /*profile >= 0x0018 && profile < 0x0020*/ - printf("Manufacturer: '%.8s'\n", &mode[23]); - printf("Media type: '%.3s'\n", &mode[23+8]); + printf(_("Manufacturer: '%.8s'\n"), &mode[23]); + printf(_("Media type: '%.3s'\n"), &mode[23+8]); } } @@ -1804,9 +1937,9 @@ if (ret >= 0) { adip_t *adp; if (lverbose > 2) { - scg_prbytes("DVD structure[11]: ", + scg_prbytes(_("DVD structure[11]: "), mode, sizeof (mode) - scg_getresid(scgp)); - scg_prascii("DVD structure[11]: ", + scg_prascii(_("DVD structure[11]: "), mode, sizeof (mode) - scg_getresid(scgp)); } /* print_dvd0F((struct dvd_structure_0F *)mode);*/ @@ -1815,17 +1948,17 @@ #define offsetof(TYPE, MEMBER) ((size_t) &((TYPE *)0)->MEMBER) #endif /* printf("size %d %d\n", sizeof (adip_t), offsetof(adip_t, res_controldat));*/ - printf("Category/Version %02X\n", adp->cat_vers); - printf("Disk size %02X\n", adp->disk_size); - printf("Disk structure %02X\n", adp->disk_struct); - printf("Recoding density %02X\n", adp->density); - - printf("Manufacturer: '%.8s'\n", adp->man_id); - printf("Media type: '%.3s'\n", adp->media_id); - printf("Product revision %u\n", adp->prod_revision); - printf("ADIP numbytes %u\n", adp->adip_numbytes); - printf("Reference speed %u\n", adp->ref_speed); - printf("Max speed %u\n", adp->max_speed); + printf(_("Category/Version %02X\n"), adp->cat_vers); + printf(_("Disk size %02X\n"), adp->disk_size); + printf(_("Disk structure %02X\n"), adp->disk_struct); + printf(_("Recoding density %02X\n"), adp->density); + + printf(_("Manufacturer: '%.8s'\n"), adp->man_id); + printf(_("Media type: '%.3s'\n"), adp->media_id); + printf(_("Product revision %u\n"), adp->prod_revision); + printf(_("ADIP numbytes %u\n"), adp->adip_numbytes); + printf(_("Reference speed %u\n"), adp->ref_speed); + printf(_("Max speed %u\n"), adp->max_speed); } /* @@ -1837,9 +1970,9 @@ scgp->silent--; if (ret >= 0) { if (lverbose > 2) { - scg_prbytes("DVD structure[20]: ", + scg_prbytes(_("DVD structure[20]: "), mode, sizeof (mode) - scg_getresid(scgp)); - scg_prascii("DVD structure[20]: ", + scg_prascii(_("DVD structure[20]: "), mode, sizeof (mode) - scg_getresid(scgp)); } print_dvd20((struct dvd_structure_20 *)mode); @@ -1854,9 +1987,9 @@ scgp->silent--; if (ret >= 0) { if (lverbose > 2) { - scg_prbytes("DVD structure[22]: ", + scg_prbytes(_("DVD structure[22]: "), mode, sizeof (mode) - scg_getresid(scgp)); - scg_prascii("DVD structure[22]: ", + scg_prascii(_("DVD structure[22]: "), mode, sizeof (mode) - scg_getresid(scgp)); } print_dvd22((struct dvd_structure_22 *)mode); @@ -1871,9 +2004,9 @@ scgp->silent--; if (ret >= 0) { if (lverbose > 2) { - scg_prbytes("DVD structure[23]: ", + scg_prbytes(_("DVD structure[23]: "), mode, sizeof (mode) - scg_getresid(scgp)); - scg_prascii("DVD structure[23]: ", + scg_prascii(_("DVD structure[23]: "), mode, sizeof (mode) - scg_getresid(scgp)); } print_dvd23((struct dvd_structure_23 *)mode); @@ -1888,7 +2021,7 @@ scgp->silent--; if (ret >= 0) { if (lverbose > 2) { - scg_prbytes("DVD structure[1]: ", + scg_prbytes(_("DVD structure[1]: "), mode, sizeof (mode) - scg_getresid(scgp)); } print_dvd01((struct dvd_structure_01 *)mode); @@ -1903,7 +2036,7 @@ scgp->silent--; if (ret >= 0) { if (lverbose > 2) { - scg_prbytes("DVD structure[4]: ", + scg_prbytes(_("DVD structure[4]: "), mode, sizeof (mode) - scg_getresid(scgp)); } print_dvd04((struct dvd_structure_04 *)mode); @@ -1918,7 +2051,7 @@ scgp->silent--; if (ret >= 0) { if (lverbose > 2) { - scg_prbytes("DVD structure[5]: ", + scg_prbytes(_("DVD structure[5]: "), mode, sizeof (mode) - scg_getresid(scgp)); } print_dvd05((struct dvd_structure_05 *)mode); @@ -1933,7 +2066,7 @@ scgp->silent--; if (ret >= 0) { if (lverbose > 2) { - scg_prbytes("DVD structure[D]: ", + scg_prbytes(_("DVD structure[D]: "), mode, sizeof (mode) - scg_getresid(scgp)); } print_dvd0D((struct dvd_structure_0D *)mode); @@ -1948,7 +2081,7 @@ scgp->silent--; if (ret >= 0) { if (lverbose > 2) { - scg_prbytes("DVD structure[E]: ", + scg_prbytes(_("DVD structure[E]: "), mode, sizeof (mode) - scg_getresid(scgp)); } print_dvd0E((struct dvd_structure_0E *)mode); @@ -1967,7 +2100,7 @@ scgp->silent--; if (ret >= 0) { if (lverbose > 2) { - scg_prbytes("DVD structure[F]: ", + scg_prbytes(_("DVD structure[F]: "), mode, sizeof (mode) - scg_getresid(scgp)); } print_dvd0F((struct dvd_structure_0F *)mode); @@ -1976,7 +2109,7 @@ fillbytes((caddr_t)mode, sizeof (mode), '\0'); read_rzone_info(scgp, (caddr_t)mode, sizeof (mode)); if (lverbose > 2) - scg_prbytes("Rzone info: ", mode, sizeof (mode) - scg_getresid(scgp)); + scg_prbytes(_("Rzone info: "), mode, sizeof (mode) - scg_getresid(scgp)); przone((struct rzone_info *)mode); scgp->verbose++; @@ -1985,7 +2118,7 @@ scgp->verbose--; if (lverbose > 2) - printf("Leaving DVD info.\n"); + printf(_("Leaving DVD info.\n")); } LOCAL void @@ -2016,7 +2149,7 @@ val = a_to_u_4_byte(((struct pioneer_logpage_30_0 *)p)->total_poh); if (((struct scsi_logp_header *)log)->p_len > 0) - printf("Total power on hours: %ld\n", val); + printf(_("Total power on hours: %ld\n"), val); scgp->silent++; fillbytes((caddr_t)log, sizeof (log), '\0'); @@ -2028,7 +2161,7 @@ val = a_to_u_4_byte(((struct pioneer_logpage_30_1 *)p)->laser_poh); if (((struct scsi_logp_header *)log)->p_len > 0) - printf("Total laser on hours: %ld\n", val); + printf(_("Total laser on hours: %ld\n"), val); scgp->silent++; fillbytes((caddr_t)log, sizeof (log), '\0'); @@ -2040,5 +2173,5 @@ val = a_to_u_4_byte(((struct pioneer_logpage_30_2 *)p)->record_poh); if (((struct scsi_logp_header *)log)->p_len > 0) - printf("Total recording hours: %ld\n", val); + printf(_("Total recording hours: %ld\n"), val); } diff -Nru cdrtools-2.01.01a33/cdrecord/drv_dvdplus.c cdrtools-3.02a09/cdrecord/drv_dvdplus.c --- cdrtools-2.01.01a33/cdrecord/drv_dvdplus.c 2007-08-08 23:00:09.000000000 +0000 +++ cdrtools-3.02a09/cdrecord/drv_dvdplus.c 2012-03-15 23:34:36.000000000 +0000 @@ -1,10 +1,11 @@ -/* @(#)drv_dvdplus.c 1.46 07/08/09 Copyright 2003-2007 J. Schilling */ +/* @(#)drv_dvdplus.c 1.65 12/03/16 Copyright 2003-2012 J. Schilling */ +#include #ifndef lint -static char sccsid[] = - "@(#)drv_dvdplus.c 1.46 07/08/09 Copyright 2003-2007 J. Schilling"; +static UConst char sccsid[] = + "@(#)drv_dvdplus.c 1.65 12/03/16 Copyright 2003-2012 J. Schilling"; #endif /* - * Copyright (c) 2003-2007 J. Schilling + * Copyright (c) 2003-2012 J. Schilling */ /* * The contents of this file are subject to the terms of the @@ -45,7 +46,7 @@ * 2 print disk info & write parameters * 3 print log pages & dvd structure * - * Copyright (c) 2003-2005 J. Schilling + * Copyright (c) 2003-2009 J. Schilling */ /* * The contents of this file are subject to the terms of the @@ -65,7 +66,7 @@ #endif #include -#include +#include #include #include /* Include sys/types.h to make off_t available */ #include @@ -76,6 +77,7 @@ #include #include #include +#include #include #include @@ -127,7 +129,9 @@ #define DC_ERASE 4 LOCAL int ricoh_dvdsetting __PR((SCSI *scgp, int erase_size, int flags, int immed)); +#ifdef __needed__ LOCAL int dummy_plextor __PR((SCSI *scgp, int modecode)); +#endif /* * SCSI-3/mmc-3 conformant DVD+R or DVD+RW writer @@ -307,7 +311,7 @@ profile = get_curprofile(scgp); if (xdebug) - printf("Current profile: 0x%04X\n", profile); + printf(_("Current profile: 0x%04X\n"), profile); if (profile == 0x001A) dp = &cdr_dvdplusrw; @@ -371,7 +375,7 @@ mp2Aspeed = a_to_u_2_byte(mp->max_write_speed); if (lverbose > 2) { - printf("max page 2A speed %lu (%lux), max perf speed %lu (%lux)\n", + printf(_("max page 2A speed %lu (%lux), max perf speed %lu (%lux)\n"), mp2Aspeed, mp2Aspeed/1385, xspeed, xspeed/1385); } @@ -418,9 +422,9 @@ dp->cdr_flags &= ~(CDR_TAO); if (scgp->inq != NULL) { - if (strbeg("PIONEER", scgp->inq->vendor_info)) { - if (strbeg("DVD-RW DVR-103", scgp->inq->prod_ident) || - strbeg("DVD-R DVD-R7322", scgp->inq->prod_ident)) { + if (strbeg("PIONEER", scgp->inq->inq_vendor_info)) { + if (strbeg("DVD-RW DVR-103", scgp->inq->inq_prod_ident) || + strbeg("DVD-R DVD-R7322", scgp->inq->inq_prod_ident)) { mp->BUF = 1; } } @@ -484,7 +488,7 @@ if ((*ep != '\0' && *ep != ',') || *p == '\0' || ll <= 0 || ll != lb) { errmsgno(EX_BAD, - "Bad layer break value '%s'.\n", p); + _("Bad layer break value '%s'.\n"), p); return (-1); } dp->cdr_dstat->ds_layer_break = lb; @@ -492,14 +496,14 @@ if (dp->cdr_dstat->ds_layer_break >= 0 && get_curprofile(scgp) != 0x2B) { errmsgno(EX_BAD, - "Cannot set layer break on this drive/medium.\n"); + _("Cannot set layer break on this drive/medium.\n")); return (-1); } if (dp->cdr_dstat->ds_layer_break != -1 && dp->cdr_dstat->ds_layer_break != roundup(dp->cdr_dstat->ds_layer_break, 16)) { errmsgno(EX_BAD, - "Layer break at %d is not properly aligned.\n", + _("Layer break at %d is not properly aligned.\n"), dp->cdr_dstat->ds_layer_break); return (-1); } @@ -509,7 +513,8 @@ * Raise the default timeout. * The first write takes a long time as it writes the lead in. */ - scgp->deftimeout = 100; /* 1:40 */ + if (scgp->deftimeout < 100) + scg_settimeout(scgp, 100); /* 1:40 */ return (0); @@ -570,6 +575,7 @@ BOOL did_dummy = FALSE; BOOL did_reload = FALSE; int profile; + Int32_t maxblocks; Ulong end_lba; /* if (lverbose > 0)*/ @@ -578,6 +584,13 @@ /* if (lverbose > 2)*/ /* print_logpages(scgp);*/ + + if (dsp->ds_type == DST_UNKNOWN) { + profile = get_curprofile(scgp); + if (profile >= 0) + dsp->ds_type = profile; + } + if ((dp->cdr_dstat->ds_cdrflags & RF_PRATIP) != 0) { if (((dsp->ds_cdrflags & (RF_WRITE|RF_BLANK)) == 0) || lverbose > 1) { @@ -622,7 +635,7 @@ * it is mentioned in the MMC standard. */ if (lverbose) - printf("Trying to clear drive status.\n"); + printf(_("Trying to clear drive status.\n")); dp->cdr_cmdflags &= ~F_DUMMY; speed_select_dvdplus(scgp, dp, &xspeed); @@ -680,8 +693,11 @@ profile = get_curprofile(scgp); if (profile == 0x001A) { dsp->ds_flags |= DSF_DVD_PLUS_RW; /* This is a DVD+RW */ - if (dip->disk_status == DS_EMPTY && /* Unformatted */ - dip->disk_type == SES_UNDEF) { /* Not a CD */ + if (dip->disk_status == DS_EMPTY) { /* Unformatted */ + if (dip->disk_type != SES_UNDEF) { /* Not a CD */ + printf(_("WARNING: Drive returns illegal Disk type %s.\n"), + get_ses_type(dip->disk_type)); + } dsp->ds_flags |= DSF_NEED_FORMAT; if ((dp->cdr_dstat->ds_cdrflags & RF_PRATIP) != 0) print_format_capacities(scgp); @@ -735,19 +751,29 @@ #ifdef DVDPLUS_DEBUG error("NWAv %d Next rec addr %d\n", rp->nwa_v, (int)a_to_u_4_byte(rp->next_recordable_addr)); #endif + maxblocks = dsp->ds_maxblocks; -if (dip->disk_status == DS_EMPTY) - return (drive_getdisktype(scgp, dp)); + /* + * XXX this was: if (dip->disk_status == DS_EMPTY) + * The '_NEC ' 'DVD_RW ND-3500AG' may return written DVD+RW with + * status DS_COMPLETE although they may be overwritten. + */ + if (dip->disk_status == DS_COMPLETE && profile != 0x001A) + return (drive_getdisktype(scgp, dp)); /* * This information is based on the physical pre recorded information. * First try to find the len supported by the actual drive. */ fillbytes((caddr_t)mode, sizeof (mode), '\0'); + scgp->silent++; if (read_dvd_structure(scgp, (caddr_t)mode, 2, 0, 0, 0, 0) < 0) { - errmsgno(EX_BAD, "Cannot read DVD structure.\n"); - return (-1); + scgp->silent--; + if (lverbose > 2) + errmsgno(EX_BAD, _("Cannot read DVD structure 00.\n")); + return (drive_getdisktype(scgp, dp)); } + scgp->silent--; len = a_to_u_2_byte(mode); len += 2; /* Data len is not included */ @@ -764,7 +790,9 @@ } fillbytes((caddr_t)mode, sizeof (mode), '\0'); sp = (struct dvd_structure_00 *)mode; - read_dvd_structure(scgp, (caddr_t)sp, len, 0, 0, 0, 0); + if (read_dvd_structure(scgp, (caddr_t)sp, len, 0, 0, 0, 0) < 0) + return (drive_getdisktype(scgp, dp)); + /* if (lverbose > 1)*/ /* print_dvd00(sp);*/ /* @@ -772,21 +800,32 @@ * Bei Panasonic ist Phys End == Phys Start. */ if ((profile != 0x001A) && + (dp->cdr_cmdflags & F_MSINFO) == 0 && (a_to_u_3_byte(sp->phys_end) != 0) && (dsp->ds_maxblocks != (long)(a_to_u_3_byte(sp->phys_end) - a_to_u_3_byte(sp->phys_start) + 1))) { +#ifdef __nonono__ printf("WARNING: Phys disk size %ld differs from rzone size %ld! Prerecorded disk?\n", (long)(a_to_u_3_byte(sp->phys_end) - a_to_u_3_byte(sp->phys_start) + 1), (long)dsp->ds_maxblocks); printf("WARNING: Phys start: %ld Phys end %ld\n", (long)a_to_u_3_byte(sp->phys_start), (long)a_to_u_3_byte(sp->phys_end)); - } +#endif + /* + * Workaround for some drive media combinations. + * At least the drive 'HL-DT-ST' 'DVD-RAM GH22NP20' '1.02' + * does not report maxblocks correctly with 'CMC MAG' 'M01' + * DVD+R media. + * Use the information from ADIP instead. + */ #ifdef DVDPLUS_DEBUG -error("MAXBLOx %d\n", dsp->ds_maxblocks); +error("MAXBLOx1 %d\n", dsp->ds_maxblocks); #endif - if ((long)dsp->ds_maxblocks == 0) { - dsp->ds_maxblocks = a_to_u_3_byte(sp->phys_end) - a_to_u_3_byte(sp->phys_start) + 1; + if ((long)dsp->ds_maxblocks == 0) { + printf(_("WARNING: Drive returns zero media size. Using media size from ADIP.\n")); + dsp->ds_maxblocks = a_to_u_3_byte(sp->phys_end) - a_to_u_3_byte(sp->phys_start) + 1; + } } #ifdef DVDPLUS_DEBUG error("MAXBLOx %d\n", dsp->ds_maxblocks); @@ -797,10 +836,16 @@ end_lba = 0L; scsi_get_perf_maxspeed(scgp, (Ulong *)NULL, (Ulong *)NULL, &end_lba); #ifdef DVDPLUS_DEBUG -error("end_lba; %lu\n", end_lba); +error("end_lba: %lu\n", end_lba); #endif - if (end_lba > dsp->ds_maxblocks) - dsp->ds_maxblocks = end_lba; + /* + * XXX Note that end_lba is unsigned and dsp->ds_maxblocks is signed. + */ + if ((Int32_t)end_lba > dsp->ds_maxblocks) { + if (maxblocks == 0) + printf(_("WARNING: Drive returns zero media size, correcting.\n")); + dsp->ds_maxblocks = end_lba + 1; + } return (drive_getdisktype(scgp, dp)); } @@ -836,7 +881,7 @@ fillbytes((caddr_t)mode, sizeof (mode), '\0'); - if (!get_mode_params(scgp, 0x05, "CD write parameter", + if (!get_mode_params(scgp, 0x05, _("CD write parameter"), mode, (Uchar *)0, (Uchar *)0, (Uchar *)0, &len)) return (-1); if (len == 0) @@ -852,7 +897,7 @@ if (dummy != 0) { - errmsgno(EX_BAD, "DVD+R/DVD+RW has no -dummy mode.\n"); + errmsgno(EX_BAD, _("DVD+R/DVD+RW has no -dummy mode.\n")); return (-1); } if (get_curprofile(scgp) == 0x001A) { /* This is a DVD+RW */ @@ -875,7 +920,7 @@ if (lverbose > 1) scg_prbytes("CD write parameter:", (Uchar *)mode, len); #endif - if (!set_mode_params(scgp, "CD write parameter", mode, len, 0, -1)) { + if (!set_mode_params(scgp, _("CD write parameter"), mode, len, 0, -1)) { return (-1); } @@ -892,21 +937,21 @@ } if (lverbose && (dp->cdr_flags & CDR_FORCESPEED) != 0) - printf("Forcespeed is %s.\n", forcespeed?"ON":"OFF"); + printf(_("Forcespeed is %s.\n"), forcespeed?_("ON"):_("OFF")); if (!forcespeed && (dp->cdr_dstat->ds_cdrflags & RF_FORCESPEED) != 0) { - printf("Turning forcespeed on\n"); + printf(_("Turning forcespeed on\n")); forcespeed = TRUE; } if (forcespeed && (dp->cdr_dstat->ds_cdrflags & RF_FORCESPEED) == 0) { - printf("Turning forcespeed off\n"); + printf(_("Turning forcespeed off\n")); forcespeed = FALSE; } if ((dp->cdr_flags & CDR_FORCESPEED) != 0) { if (rp) { rp->AWSCD = forcespeed?1:0; - set_mode_params(scgp, "Ricoh Vendor Page", moder, moder[0]+1, 0, -1); + set_mode_params(scgp, _("Ricoh Vendor Page"), moder, moder[0]+1, 0, -1); rp = get_justlink_ricoh(scgp, moder); } } @@ -920,7 +965,7 @@ val = 0x7FFFFFFF; if (dp->cdr_flags & CDR_MMC3) { if (speed_select_mdvd(scgp, -1, val) < 0) - errmsgno(EX_BAD, "MMC-3 speed select did not work.\n"); + errmsgno(EX_BAD, _("MMC-3 speed select did not work.\n")); } else { if (val > 0xFFFF) val = 0xFFFF; @@ -1017,7 +1062,7 @@ error("NWA: %ld valid: %d\n", dvd_next_addr, rz.nwa_v); #endif if (lverbose > 1) - printf("next writable addr: %ld valid: %d\n", dvd_next_addr, rz.nwa_v); + printf(_("next writable addr: %ld valid: %d\n"), dvd_next_addr, rz.nwa_v); } if (ap) *ap = dvd_next_addr; @@ -1041,7 +1086,7 @@ fillbytes((caddr_t)mode, sizeof (mode), '\0'); - if (!get_mode_params(scgp, 0x05, "CD write parameter", + if (!get_mode_params(scgp, 0x05, _("CD write parameter"), mode, (Uchar *)0, (Uchar *)0, (Uchar *)0, &len)) return (-1); if (len == 0) @@ -1071,7 +1116,7 @@ if (lverbose > 1) scg_prbytes("CD write parameter:", (Uchar *)mode, len); #endif - if (!set_mode_params(scgp, "CD write parameter", mode, len, 0, trackp->secsize)) + if (!set_mode_params(scgp, _("CD write parameter"), mode, len, 0, trackp->secsize)) return (-1); /* @@ -1124,11 +1169,11 @@ if (i >= 1) vtracks = TRUE; if (vtracks && lverbose) - printf("Compiling virtual track list ...\n"); + printf(_("Compiling virtual track list ...\n")); for (i = 0; i < MAX_TRACK; i++) { if (trackp[i].tracksize < (tsize_t)0) { - errmsgno(EX_BAD, "VTrack %d has unknown length.\n", i); + errmsgno(EX_BAD, _("VTrack %d has unknown length.\n"), i); return (-1); } amount = roundup(trackp[i].tracksize, secsize); @@ -1137,7 +1182,7 @@ ttrsize += trackp[i].tracksize; tamount += amount; if (vtracks && lverbose) - printf("Vtrack: %d size: %lld bytes %lld rounded (%lld sectors)\n", + printf(_("Vtrack: %d size: %lld bytes %lld rounded (%lld sectors)\n"), (int)trackp[i].track, (Llong)trackp[i].tracksize, amount, amount / (Llong)secsize); @@ -1150,12 +1195,12 @@ * XXX I believe that not. */ if (trackp[i].tracksize % secsize) { - comerrno(EX_BAD, "Virtual track %d is not a multiple of secsize.\n", (int)trackp[i].track); + comerrno(EX_BAD, _("Virtual track %d is not a multiple of secsize.\n"), (int)trackp[i].track); } } if (vtracks && lverbose) - printf("Vtracks: %d size: %lld bytes %lld rounded (%ld sectors) total\n", + printf(_("Vtracks: %d size: %lld bytes %lld rounded (%ld sectors) total\n"), i+1, ttrsize, tamount, sectors); return (sectors); @@ -1201,7 +1246,7 @@ fillbytes((caddr_t)mode, sizeof (mode), '\0'); - if (!get_mode_params(scgp, 0x05, "CD write parameter", + if (!get_mode_params(scgp, 0x05, _("CD write parameter"), mode, (Uchar *)0, (Uchar *)0, (Uchar *)0, &len)) return (-1); if (len == 0) @@ -1237,14 +1282,14 @@ } if (lverbose && (dp->cdr_flags & CDR_BURNFREE) != 0) - printf("BURN-Free is %s.\n", burnfree?"ON":"OFF"); + printf(_("BURN-Free is %s.\n"), burnfree?_("ON"):_("OFF")); if (!burnfree && (dp->cdr_dstat->ds_cdrflags & RF_BURNFREE) != 0) { - printf("Turning BURN-Free on\n"); + printf(_("Turning BURN-Free on\n")); burnfree = TRUE; } if (burnfree && (dp->cdr_dstat->ds_cdrflags & RF_BURNFREE) == 0) { - printf("Turning BURN-Free off\n"); + printf(_("Turning BURN-Free off\n")); burnfree = FALSE; } if (dp->cdr_cdcap->BUF != 0) { @@ -1257,9 +1302,9 @@ if (rp) { i_to_2_byte(rp->link_counter, 0); if (xdebug) - scg_prbytes("Mode Select Data ", moder, moder[0]+1); + scg_prbytes(_("Mode Select Data "), moder, moder[0]+1); - set_mode_params(scgp, "Ricoh Vendor Page", moder, moder[0]+1, 0, -1); + set_mode_params(scgp, _("Ricoh Vendor Page"), moder, moder[0]+1, 0, -1); rp = get_justlink_ricoh(scgp, moder); } @@ -1267,7 +1312,7 @@ if (lverbose > 1) scg_prbytes("CD write parameter:", (Uchar *)mode, len); #endif - if (!set_mode_params(scgp, "CD write parameter", mode, len, 0, -1)) + if (!set_mode_params(scgp, _("CD write parameter"), mode, len, 0, -1)) return (-1); return (0); @@ -1289,13 +1334,11 @@ #define MAX_TRIES 15 /* - * This is only valid for DAO recording. - * XXX Check this if the DVR-S101 supports more. - * XXX flush cache currently makes sure that - * XXX at least ~ 800 MBytes written to the track. - * XXX flush cache triggers writing the lead out. + * XXX Is this timeout needed for DVD+RW too? + * XXX It was introduced for DVD-R that writes at least 800 MB */ - scgp->deftimeout = 1000; + if (scgp->deftimeout < 1000) + scg_settimeout(scgp, 1000); /*scgp->verbose++;*/ scgp->silent++; @@ -1306,9 +1349,9 @@ scg_printerr(scgp); scg_printresult(scgp); /* XXX restore key/code in future */ } - printf("Trouble flushing the cache\n"); + printf(_("Trouble flushing the cache\n")); scgp->silent--; - scgp->deftimeout = oldtimeout; + scg_settimeout(scgp, oldtimeout); return (-1); } sleep(1); @@ -1327,7 +1370,7 @@ scg_printerr(scgp); scg_printresult(scgp); /* XXX restore key/code in future */ } - printf("Trouble closing the session\n"); + printf(_("Trouble closing the session\n")); break; } sleep(1); @@ -1339,7 +1382,7 @@ waitformat(scgp, 300); /*scgp->verbose--;*/ - scgp->deftimeout = oldtimeout; + scg_settimeout(scgp, oldtimeout); return (ret); #undef MAX_TRIES } @@ -1360,13 +1403,11 @@ #define MAX_TRIES 15 /* - * This is only valid for DAO recording. - * XXX Check this if the DVR-S101 supports more. - * XXX flush cache currently makes sure that - * XXX at least ~ 800 MBytes written to the track. - * XXX flush cache triggers writing the lead out. + * XXX Is this timeout needed for DVD+R too? + * XXX It was introduced for DVD-R that writes at least 800 MB */ - scgp->deftimeout = 1000; + if (scgp->deftimeout < 1000) + scg_settimeout(scgp, 1000); /*scgp->verbose++;*/ scgp->silent++; @@ -1377,9 +1418,9 @@ scg_printerr(scgp); scg_printresult(scgp); /* XXX restore key/code in future */ } - printf("Trouble flushing the cache\n"); + printf(_("Trouble flushing the cache\n")); scgp->silent--; - scgp->deftimeout = oldtimeout; + scg_settimeout(scgp, oldtimeout); return (-1); } sleep(1); @@ -1408,7 +1449,7 @@ scg_printerr(scgp); scg_printresult(scgp); /* XXX restore key/code in future */ } - printf("Trouble closing the track\n"); + printf(_("Trouble closing the track\n")); break; } sleep(1); @@ -1429,7 +1470,7 @@ scg_printerr(scgp); scg_printresult(scgp); /* XXX restore key/code in future */ } - printf("Trouble closing the last session\n"); + printf(_("Trouble closing the last session\n")); break; } sleep(1); @@ -1443,7 +1484,7 @@ waitformat(scgp, 600); /*scgp->verbose--;*/ - scgp->deftimeout = oldtimeout; + scg_settimeout(scgp, oldtimeout); return (ret); #undef MAX_TRIES } @@ -1458,14 +1499,14 @@ if (scgp->inq == NULL) return (FALSE); - if (strncmp(scgp->inq->vendor_info, "RICOH", 5) == 0) { - if (strbeg("DVD+RW MP5120", scgp->inq->prod_ident) || - strbeg("DVD+RW MP5125", scgp->inq->prod_ident)) + if (strncmp(scgp->inq->inq_vendor_info, "RICOH", 5) == 0) { + if (strbeg("DVD+RW MP5120", scgp->inq->inq_prod_ident) || + strbeg("DVD+RW MP5125", scgp->inq->inq_prod_ident)) return (TRUE); } - if (strncmp(scgp->inq->vendor_info, "HP", 2) == 0) { - if (strbeg("DVD Writer 100j", scgp->inq->prod_ident) || - strbeg("DVD Writer 200j", scgp->inq->prod_ident)) + if (strncmp(scgp->inq->inq_vendor_info, "HP", 2) == 0) { + if (strbeg("DVD Writer 100j", scgp->inq->inq_prod_ident) || + strbeg("DVD Writer 200j", scgp->inq->inq_prod_ident)) return (TRUE); } return (FALSE); @@ -1485,12 +1526,15 @@ BOOL cdrrw = FALSE; /* Read CD-RW */ BOOL cdwrw = FALSE; /* Write CD-RW */ BOOL dvdwr = FALSE; /* DVD writer */ + int profile; int flags = DC_ERASE; int blanksize = 0x30000; int ret; mmc_check(scgp, &cdrr, &cdwr, &cdrrw, &cdwrw, NULL, &dvdwr); + + profile = get_curprofile(scgp); /* * XXX How to check for DVD drives that support DVD-RW */ @@ -1498,7 +1542,14 @@ /* return (blank_dummy(scgp, dp, addr, blanktype));*/ if (!dvdplus_ricohbased(scgp)) { - errmsgno(EX_BAD, "Cannot blank with non Ricoh based drive.\n"); + errmsgno(EX_BAD, _("Cannot blank DVD+RW media with non Ricoh based drive.\n")); + if (profile == 0x1A || profile == 0x2A) { + ret = blank_simul(scgp, dp, addr, blanktype); + waitformat(scgp, 600); + scsi_flush_cache(scgp, TRUE); + waitformat(scgp, 600); + return (ret); + } return (-1); } @@ -1510,7 +1561,7 @@ blanksize = 0x30000; } if (lverbose) { - printf("Blanking %s\n", blank_types[blanktype & 0x07]); + printf(_("Blanking %s\n"), blank_types[blanktype & 0x07]); flush(); } if (driveropts != NULL) { @@ -1604,7 +1655,7 @@ len -= sizeof (struct scsi_format_cap_header); if (lp->desc_type == 2) { if ((dp->cdr_cmdflags & F_FORCE) == 0) { - errmsgno(EX_BAD, "Medium is already formatted.\n"); + errmsgno(EX_BAD, _("Medium is already formatted.\n")); return (-1); } } @@ -1625,7 +1676,7 @@ blocks = a_to_u_4_byte(lp->nblock); } if (blocks == 0) { - errmsgno(EX_BAD, "DVD+RW Full format capacity not found.\n"); + errmsgno(EX_BAD, _("DVD+RW Full format capacity not found.\n")); return (-1); } @@ -1649,7 +1700,7 @@ /* * XXX evt. restart Format ansagen... */ - printf("Formatting media\n"); + printf(_("Formatting media\n")); flush(); } starttime.tv_sec = 0; @@ -1708,9 +1759,8 @@ SCSI *scgp; int secs; { -#ifdef DVDPLUS_DEBUG Uchar sensebuf[CCS_SENSE_LEN]; -#endif + int printed = 0; int i; int key; #define W_SLEEP 2 @@ -1724,7 +1774,6 @@ key = scg_sense_key(scgp); if (key != SC_UNIT_ATTENTION && key != SC_NOT_READY) break; -#ifdef DVDPLUS_DEBUG request_sense_b(scgp, (caddr_t)sensebuf, sizeof (sensebuf)); #ifdef XXX scg_prbytes("Sense:", sensebuf, sizeof (sensebuf)); @@ -1744,15 +1793,17 @@ * operation 1% done */ - if (sensebuf[15] & 0x80) { - error("operation %d%% done\n", + if (lverbose && (sensebuf[15] & 0x80)) { + printed++; + error(_("operation %d%% done\r"), (100*(sensebuf[16] << 8 | sensebuf[17]))/(unsigned)65536); } -#endif /* DVDPLUS_DEBUG */ sleep(W_SLEEP); } scgp->silent--; + if (printed) + error("\n"); return (-1); #undef W_SLEEP } @@ -1774,9 +1825,9 @@ count = a_to_u_2_byte(rp->link_counter); if (lverbose) { if (count == 0) - printf("BURN-Free was not used.\n"); + printf(_("BURN-Free was not used.\n")); else - printf("BURN-Free was %d times used.\n", + printf(_("BURN-Free was %d times used.\n"), (int)count); } } @@ -1846,13 +1897,13 @@ return (ret); if (lb.res47[0] & 0x80) { - errmsgno(EX_BAD, "Layer 0 zone capacity already set.\n"); + errmsgno(EX_BAD, _("Layer 0 zone capacity already set.\n")); return (-1); } l0_cap = a_to_u_4_byte(lb.l0_area_cap); if (lbreak > 0 && lbreak > l0_cap) { - errmsgno(EX_BAD, "Manual layer break %d > %u not allowed.\n", + errmsgno(EX_BAD, _("Manual layer break %d > %u not allowed.\n"), lbreak, l0_cap); return (-1); } @@ -1863,15 +1914,15 @@ * in case of manual layer break set up. */ errmsgno(EX_BAD, - "Layer 0 size %u is bigger than expected disk size %u.\n", + _("Layer 0 size %u is bigger than expected disk size %u.\n"), l0_cap, dsize); - errmsgno(EX_BAD, "Use single layer medium.\n"); + errmsgno(EX_BAD, _("Use single layer medium.\n")); return (-1); } l0_cap = dsize / 2; l0_cap = roundup(l0_cap, 16); if (lbreak > 0 && lbreak < l0_cap) { - errmsgno(EX_BAD, "Manual layer break %d < %u not allowed.\n", + errmsgno(EX_BAD, _("Manual layer break %d < %u not allowed.\n"), lbreak, l0_cap); return (-1); } @@ -1908,6 +1959,7 @@ return (scg_cmd(scgp)); } +#ifdef __needed__ /* * 0x21 Emulation write is OFF * 0x20 Emulation write is ON @@ -1936,3 +1988,4 @@ return (-1); return (0); } +#endif diff -Nru cdrtools-2.01.01a33/cdrecord/drv_jvc.c cdrtools-3.02a09/cdrecord/drv_jvc.c --- cdrtools-2.01.01a33/cdrecord/drv_jvc.c 2007-08-06 23:13:26.000000000 +0000 +++ cdrtools-3.02a09/cdrecord/drv_jvc.c 2010-12-19 18:39:36.000000000 +0000 @@ -1,13 +1,14 @@ -/** @(#)drv_jvc.c 1.90 07/08/07 Copyright 1997-2007 J. Schilling */ +/** @(#)drv_jvc.c 1.95 10/12/19 Copyright 1997-2010 J. Schilling */ +#include #ifndef lint -static char sccsid[] = - "@(#)drv_jvc.c 1.90 07/08/07 Copyright 1997-2007 J. Schilling"; +static UConst char sccsid[] = + "@(#)drv_jvc.c 1.95 10/12/19 Copyright 1997-2010 J. Schilling"; #endif /* * CDR device implementation for * JVC/TEAC * - * Copyright (c) 1997-2007 J. Schilling + * Copyright (c) 1997-2010 J. Schilling */ /* * The contents of this file are subject to the terms of the @@ -25,7 +26,7 @@ #include -#include +#include #include #include #include @@ -39,6 +40,7 @@ #include #include #include +#include #include #include @@ -224,7 +226,9 @@ LOCAL int clear_subcode __PR((SCSI *scgp)); LOCAL int set_limits __PR((SCSI *scgp, long lba, long length)); LOCAL int set_subcode __PR((SCSI *scgp, Uchar *subcode_data, int length)); +#ifdef XDI LOCAL int read_disk_info_teac __PR((SCSI *scgp, Uchar *data, int length, int type)); +#endif LOCAL int teac_freeze __PR((SCSI *scgp, int bp_flag)); LOCAL int teac_wr_pma __PR((SCSI *scgp)); LOCAL int teac_rd_pma __PR((SCSI *scgp)); @@ -232,8 +236,8 @@ LOCAL int blank_jvc __PR((SCSI *scgp, cdr_t *dp, long addr, int blanktype)); LOCAL int buf_cap_teac __PR((SCSI *scgp, long *sp, long *fp)); LOCAL long read_peak_buffer_cap_teac __PR((SCSI *scgp)); -LOCAL int buffer_inquiry_teac __PR((SCSI *scgp, int fmt)); #ifdef XXBUFFER +LOCAL int buffer_inquiry_teac __PR((SCSI *scgp, int fmt)); LOCAL void check_buffer_teac __PR((SCSI *scgp)); #endif #ifdef XXDEBUG @@ -499,7 +503,7 @@ if (trackp->pregapsize != 0) { if (lverbose > 1) { - printf("set_limits(%ld, %ld)-> %ld\n", + printf(_("set_limits(%ld, %ld)-> %ld\n"), lba_addr, trackp->pregapsize, lba_addr + trackp->pregapsize); } @@ -514,7 +518,7 @@ st2mode[trackp->sectype&ST_MASK], ADR_POS, trackp->trackno, 0); if (lverbose > 1) - scg_prbytes("Subcode:", (Uchar *)&sc, sizeof (sc)); + scg_prbytes(_("Subcode:"), (Uchar *)&sc, sizeof (sc)); status = set_subcode(scgp, (Uchar *)&sc, sizeof (sc)); if (status < 0) @@ -526,7 +530,7 @@ pregapsize -= 5; } if (lverbose > 1) { - printf("pad_track(%ld, %ld)-> %ld\n", + printf(_("pad_track(%ld, %ld)-> %ld\n"), lba_addr, pregapsize, lba_addr + pregapsize); } /* @@ -555,7 +559,7 @@ * We definitely need to know the tracksize in this driver. */ if (lverbose > 1) { - printf("set_limits(%ld, %ld)-> %ld\n", + printf(_("set_limits(%ld, %ld)-> %ld\n"), lba_addr, blocks, lba_addr + blocks); } status = set_limits(scgp, lba_addr, blocks); @@ -569,7 +573,7 @@ st2mode[trackp->sectype&ST_MASK], ADR_POS, trackp->trackno, 1); if (lverbose > 1) - scg_prbytes("Subcode:", (Uchar *)&sc, sizeof (sc)); + scg_prbytes(_("Subcode:"), (Uchar *)&sc, sizeof (sc)); status = set_subcode(scgp, (Uchar *)&sc, sizeof (sc)); if (status < 0) @@ -580,7 +584,7 @@ pregapsize = 150; if (lverbose > 1) { - printf("set_limits(%ld, %ld)-> %ld\n", + printf(_("set_limits(%ld, %ld)-> %ld\n"), blocks, pregapsize, blocks + pregapsize); } @@ -596,7 +600,7 @@ st2mode[trackp->sectype&ST_MASK], ADR_POS, trackp->trackno, 0); if (lverbose > 1) - scg_prbytes("Subcode:", (Uchar *)&sc, sizeof (sc)); + scg_prbytes(_("Subcode:"), (Uchar *)&sc, sizeof (sc)); status = set_subcode(scgp, (Uchar *)&sc, sizeof (sc)); if (status < 0) @@ -616,7 +620,7 @@ int ret = 0; if (!last_done) { - printf("WARNING: adding dummy block to close track.\n"); + printf(_("WARNING: adding dummy block to close track.\n")); /* * need read sector size * XXX do we really need this ? @@ -729,7 +733,7 @@ */ teac_rd_pma(scgp); /* errmsgno(EX_BAD, "Cannot fixate zero track disk.\n");*/ - errmsgno(EX_BAD, "Cannot fixate without track list (not yet implemented).\n"); + errmsgno(EX_BAD, _("Cannot fixate without track list (not yet implemented).\n")); return (-1); } sp = (Uchar *)buf; @@ -791,10 +795,10 @@ */ lba = lba_addr + 150; if (lverbose > 1) - printf("lba: %ld lba_addr: %ld\n", lba, lba_addr); + printf(_("lba: %ld lba_addr: %ld\n"), lba, lba_addr); if (lverbose > 1) - printf("Lead out start: (%02d:%02d/%02d)\n", + printf(_("Lead out start: (%02d:%02d/%02d)\n"), minutes(lba*2352), seconds(lba*2352), frames(lba*2352)); @@ -809,8 +813,8 @@ status = sp - ((Uchar *)buf); if (lverbose > 1) { - printf("Subcode len: %d\n", status); - scg_prbytes("Subcode:", (Uchar *)buf, status); + printf(_("Subcode len: %d\n"), status); + scg_prbytes(_("Subcode:"), (Uchar *)buf, status); } status = set_subcode(scgp, (Uchar *)buf, status); sleep(1); @@ -840,7 +844,7 @@ * XXX and correct it in clode track before writing * XXX the PMA? */ - errmsgno(EX_BAD, "Track %d has unknown length.\n", i); + errmsgno(EX_BAD, _("Track %d has unknown length.\n"), i); return (-1); } } @@ -875,7 +879,7 @@ int status; if (lverbose) { - fprintf(stdout, "Judging disk..."); + fprintf(stdout, _("Judging disk...")); flush(); } status = opt_power_judge(scgp, 1); @@ -884,13 +888,13 @@ return (status); } if (lverbose) { - fprintf(stdout, "done.\nCalibrating laser..."); + fprintf(stdout, _("done.\nCalibrating laser...")); flush(); } status = opt_power_judge(scgp, 0); if (lverbose) { - fprintf(stdout, "done.\n"); + fprintf(stdout, _("done.\n")); } /* * Check for error codes 0xCD ... 0xCF @@ -1043,6 +1047,7 @@ return (scg_cmd(scgp)); } +#ifdef XDI LOCAL int read_disk_info_teac(scgp, data, length, type) SCSI *scgp; @@ -1069,6 +1074,7 @@ return (scg_cmd(scgp)); } +#endif /* * Perform the freeze command for Teac Drives. @@ -1148,13 +1154,13 @@ return (-1); if (scgp->verbose) { - scg_prbytes("PMA Data", xx, sizeof (xx) - scg_getresid(scgp)); + scg_prbytes(_("PMA Data"), xx, sizeof (xx) - scg_getresid(scgp)); } if (lverbose) { unsigned i; Uchar *p; - scg_prbytes("PMA Header: ", xx, 4); + scg_prbytes(_("PMA Header: "), xx, 4); i = xx[2]; p = &xx[4]; for (; i <= xx[3]; i++) { @@ -1192,7 +1198,7 @@ i_to_4_byte(&scmd->cdb.g5_cdb.count[0], last_lba); if (scgp->verbose) - printf("start lba: %ld last lba: %ld\n", + printf(_("start lba: %ld last lba: %ld\n"), start_lba, last_lba); scgp->cmdname = "next writable address"; @@ -1202,8 +1208,8 @@ return (-1); if (scgp->verbose) { - scg_prbytes("WRa Data", xx, sizeof (xx) - scg_getresid(scgp)); - printf("NWA: %ld\n", a_to_4_byte(xx)); + scg_prbytes(_("WRa Data"), xx, sizeof (xx) - scg_getresid(scgp)); + printf(_("NWA: %ld\n"), a_to_4_byte(xx)); } return (0); } @@ -1218,7 +1224,7 @@ extern char *blank_types[]; if (lverbose) { - printf("Blanking %s\n", blank_types[blanktype & 0x07]); + printf(_("Blanking %s\n"), blank_types[blanktype & 0x07]); flush(); } @@ -1247,7 +1253,7 @@ *fp = freespace; if (scgp->verbose || (sp == 0 && fp == 0)) - printf("BFree: %ld K BSize: %ld K\n", freespace >> 10, bufsize >> 10); + printf(_("BFree: %ld K BSize: %ld K\n"), freespace >> 10, bufsize >> 10); if (bufsize == 0) return (0); @@ -1287,8 +1293,8 @@ return (-1); if (scgp->verbose) { - scg_prbytes("WRa Data", xx, sizeof (xx) - scg_getresid(scgp)); - printf("Buffer cap: %ld\n", a_to_u_3_byte(&xx[1])); + scg_prbytes(_("WRa Data"), xx, sizeof (xx) - scg_getresid(scgp)); + printf(_("Buffer cap: %ld\n"), a_to_u_3_byte(&xx[1])); } return (a_to_u_3_byte(&xx[1])); /* return (0);*/ @@ -1299,6 +1305,7 @@ #define BI_448_BYTE 0x40 #define BI_APP_CODE 0x10 +#ifdef XXBUFFER LOCAL int buffer_inquiry_teac(scgp, fmt) SCSI *scgp; @@ -1342,7 +1349,7 @@ /* scg_prbytes("WRa Data", xx, 1);*/ if (fmt > 0) printf("fmt: %X ", fmt); - scg_prbytes("WRa Data", xx, 9); + scg_prbytes(_("WRa Data"), xx, 9); printf("%d\n", xx[8] - xx[1]); /* printf("Buffer cap: %ld\n", a_to_u_3_byte(&xx[1]));*/ } @@ -1350,7 +1357,6 @@ #endif } -#ifdef XXBUFFER LOCAL void check_buffer_teac(scgp) SCSI *scgp; @@ -1403,7 +1409,7 @@ return (-1); /* if (scgp->verbose) {*/ - scg_prbytes("WRa Data", xx, sizeof (xx) - scg_getresid(scgp)); + scg_prbytes(_("WRa Data"), xx, sizeof (xx) - scg_getresid(scgp)); /* scg_prbytes("WRa Data", xx, 1);*/ /* scg_prbytes("WRa Data", xx, 9);*/ /*printf("%d\n", xx[8] - xx[1]);*/ @@ -1443,7 +1449,7 @@ return (-1); /* if (scgp->verbose) {*/ - scg_prbytes("WRa Data", xx, sizeof (xx) - scg_getresid(scgp)); + scg_prbytes(_("WRa Data"), xx, sizeof (xx) - scg_getresid(scgp)); /* scg_prbytes("WRa Data", xx, 1);*/ /* scg_prbytes("WRa Data", xx, 9);*/ /*printf("%d\n", xx[8] - xx[1]);*/ @@ -1467,7 +1473,7 @@ /* read_disk_info_teac(scgp, cbuf, 512, 2);*/ /* read_disk_info_teac(scgp, cbuf, 512, 2);*/ read_disk_info_teac(scgp, cbuf, 512, 3); - scg_prbytes("DI Data", cbuf, sizeof (cbuf) - scg_getresid(scgp)); + scg_prbytes(_("DI Data"), cbuf, sizeof (cbuf) - scg_getresid(scgp)); } #endif /* XDI */ diff -Nru cdrtools-2.01.01a33/cdrecord/drv_mmc.c cdrtools-3.02a09/cdrecord/drv_mmc.c --- cdrtools-2.01.01a33/cdrecord/drv_mmc.c 2007-08-06 23:13:26.000000000 +0000 +++ cdrtools-3.02a09/cdrecord/drv_mmc.c 2012-03-15 23:34:36.000000000 +0000 @@ -1,14 +1,15 @@ -/* @(#)drv_mmc.c 1.189 07/08/07 Copyright 1997-2007 J. Schilling */ +/* @(#)drv_mmc.c 1.200 12/03/16 Copyright 1997-2012 J. Schilling */ +#include #ifndef lint -static char sccsid[] = - "@(#)drv_mmc.c 1.189 07/08/07 Copyright 1997-2007 J. Schilling"; +static UConst char sccsid[] = + "@(#)drv_mmc.c 1.200 12/03/16 Copyright 1997-2012 J. Schilling"; #endif /* * CDR device implementation for * SCSI-3/mmc conforming drives * e.g. Yamaha CDR-400, Ricoh MP6200 * - * Copyright (c) 1997-2007 J. Schilling + * Copyright (c) 1997-2012 J. Schilling */ /* * The contents of this file are subject to the terms of the @@ -26,7 +27,7 @@ #define PRINT_ATIP #include -#include +#include #include #include #include @@ -39,6 +40,7 @@ #include #include #include +#include #include #include @@ -85,7 +87,7 @@ LOCAL int deflt_writemodes_mmc __PR((SCSI *scgp, BOOL reset_dummy)); LOCAL void di_to_dstat __PR((struct disk_info *dip, dstat_t *dsp)); LOCAL int get_atip __PR((SCSI *scgp, struct atipinfo *atp)); -#ifdef PRINT_ATIP +#ifdef PRINT_PMA LOCAL int get_pma __PR((SCSI *scgp)); #endif LOCAL int init_mmc __PR((SCSI *scgp, cdr_t *dp)); @@ -403,7 +405,7 @@ { BOOL haveopts = FALSE; - error("Driver options:\n"); + error(_("Driver options:\n")); if (dp->cdr_flags & CDR_BURNFREE) { error("burnfree Prepare writer to use BURN-Free technology\n"); error("noburnfree Disable using BURN-Free technology\n"); @@ -578,8 +580,8 @@ /* * First handle exceptions.... */ - if (strncmp(ip->vendor_info, "SONY", 4) == 0 && - strncmp(ip->prod_ident, "CD-R CDU928E", 14) == 0) { + if (strncmp(ip->inq_vendor_info, "SONY", 4) == 0 && + strncmp(ip->inq_prod_ident, "CD-R CDU928E", 14) == 0) { return (&cdr_mmc_sony); } @@ -1297,7 +1299,7 @@ return (ret); } -#ifdef PRINT_ATIP +#ifdef PRINT_PMA LOCAL int /*get_pma(atp)*/ @@ -1340,7 +1342,7 @@ return (ret); } -#endif /* PRINT_ATIP */ +#endif /* PRINT_PMA */ LOCAL int init_mmc(scgp, dp) @@ -1362,9 +1364,16 @@ msf_t msf; BOOL did_atip = FALSE; BOOL did_dummy = FALSE; + int profile; msf.msf_min = msf.msf_sec = msf.msf_frame = 0; + if (dsp->ds_type == DST_UNKNOWN) { + profile = get_curprofile(scgp); + if (profile >= 0) + dsp->ds_type = profile; + } + /* * It seems that there are drives that do not support to * read ATIP (e.g. HP 7100) @@ -1485,7 +1494,9 @@ * Firmware 4.02 kann nicht get_pma */ if (dip->disk_status != DS_EMPTY) { +#ifdef PRINT_PMA /* get_pma();*/ +#endif } printf("ATIP lead in: %ld (%02d:%02d/%02d)\n", msf_to_lba(mode[8], mode[9], mode[10], FALSE), @@ -1968,13 +1979,22 @@ (int)trackp->trackno, trackp->trackstart-trackp->pregapsize); } - /* - * XXX Do we need to check isecsize too? - */ - pad_track(scgp, dp, trackp, - trackp->trackstart-trackp->pregapsize, - (Llong)trackp->pregapsize*trackp->secsize, + if (trackp->track == 1 && is_hidden(trackp)) { + pad_track(scgp, dp, trackp, + trackp->trackstart-trackp->pregapsize, + (Llong)(trackp->pregapsize-trackp->trackstart)*trackp->secsize, + FALSE, 0); + if (write_track_data(scgp, dp, track_base(trackp)) < 0) + return (-1); + } else { + /* + * XXX Do we need to check isecsize too? + */ + pad_track(scgp, dp, trackp, + trackp->trackstart-trackp->pregapsize, + (Llong)trackp->pregapsize*trackp->secsize, FALSE, 0); + } } return (0); } @@ -2841,7 +2861,7 @@ SCSI *scgp; { if (scgp->inq != NULL && - strncmp(scgp->inq->vendor_info, "PLEXTOR", 7) == 0) { + strncmp(scgp->inq->inq_vendor_info, "PLEXTOR", 7) == 0) { return (TRUE); } return (FALSE); @@ -2852,7 +2872,7 @@ SCSI *scgp; { if (scgp->inq != NULL && - strncmp(scgp->inq->vendor_info, "YAMAHA", 6) == 0) { + strncmp(scgp->inq->inq_vendor_info, "YAMAHA", 6) == 0) { return (TRUE); } return (FALSE); @@ -2963,7 +2983,7 @@ if (modeval) movebytes(modeval, &scmd->cdb.g1_cdb.addr[1], 6); else - i_to_2_byte(&scmd->cdb.g1_cdb.count[2], cnt); + i_to_2_byte(&scmd->cdb.cmd_cdb[9], cnt); scgp->cmdname = "plextor drive mode"; @@ -3014,7 +3034,7 @@ if (modeval) scmd->cdb.g5_cdb.reladr = *(char *)modeval != 0 ? 1 : 0; else - i_to_2_byte(&scmd->cdb.g1_cdb.count[1], cnt); + i_to_2_byte(&scmd->cdb.cmd_cdb[8], cnt); scgp->cmdname = "plextor drive mode2"; @@ -3029,11 +3049,11 @@ SCSI *scgp; { int modecode = 2; - Uchar getmode[8]; + Uchar pgetmode[8]; - fillbytes(getmode, sizeof (getmode), '\0'); + fillbytes(pgetmode, sizeof (pgetmode), '\0'); scgp->silent++; - if (drivemode_plextor(scgp, (caddr_t)getmode, sizeof (getmode), modecode, NULL) < 0) { + if (drivemode_plextor(scgp, (caddr_t)pgetmode, sizeof (pgetmode), modecode, NULL) < 0) { scgp->silent--; return (-1); } @@ -3047,11 +3067,11 @@ SCSI *scgp; { int modecode = 4; - Uchar getmode[8]; + Uchar pgetmode[8]; - fillbytes(getmode, sizeof (getmode), '\0'); + fillbytes(pgetmode, sizeof (pgetmode), '\0'); scgp->silent++; - if (drivemode_plextor(scgp, (caddr_t)getmode, sizeof (getmode), modecode, NULL) < 0) { + if (drivemode_plextor(scgp, (caddr_t)pgetmode, sizeof (pgetmode), modecode, NULL) < 0) { scgp->silent--; return (-1); } @@ -3067,23 +3087,23 @@ int val; { int modecode = 2; - Uchar setmode[8]; - Uchar getmode[8]; + Uchar psetmode[8]; + Uchar pgetmode[8]; - fillbytes(getmode, sizeof (getmode), '\0'); + fillbytes(pgetmode, sizeof (pgetmode), '\0'); scgp->silent++; - if (drivemode_plextor(scgp, (caddr_t)getmode, sizeof (getmode), modecode, NULL) < 0) { + if (drivemode_plextor(scgp, (caddr_t)pgetmode, sizeof (pgetmode), modecode, NULL) < 0) { scgp->silent--; return (-1); } scgp->silent--; if (lverbose > 1) - scg_prbytes("Modes", getmode, sizeof (getmode)); + scg_prbytes("Modes", pgetmode, sizeof (pgetmode)); - fillbytes(setmode, sizeof (setmode), '\0'); - setmode[0] = on?1:0; + fillbytes(psetmode, sizeof (psetmode), '\0'); + psetmode[0] = on?1:0; if (on) { /* * Before -2 .. +2 @@ -3095,22 +3115,22 @@ printf("Varirec offset is %d.\n", val); if (val > 0) { - setmode[1] = val & 0x7F; + psetmode[1] = val & 0x7F; } else { - setmode[1] = (-val) & 0x7F; - setmode[1] |= 0x80; + psetmode[1] = (-val) & 0x7F; + psetmode[1] |= 0x80; } } - if (drivemode_plextor(scgp, NULL, 0, modecode, setmode) < 0) + if (drivemode_plextor(scgp, NULL, 0, modecode, psetmode) < 0) return (-1); - fillbytes(getmode, sizeof (getmode), '\0'); - if (drivemode_plextor(scgp, (caddr_t)getmode, sizeof (getmode), modecode, NULL) < 0) + fillbytes(pgetmode, sizeof (pgetmode), '\0'); + if (drivemode_plextor(scgp, (caddr_t)pgetmode, sizeof (pgetmode), modecode, NULL) < 0) return (-1); if (lverbose > 1) - scg_prbytes("Modes", getmode, sizeof (getmode)); + scg_prbytes("Modes", pgetmode, sizeof (pgetmode)); return (0); } @@ -3121,47 +3141,47 @@ int val; { int modecode = 4; - Uchar setmode[8]; - Uchar getmode[8]; + Uchar psetmode[8]; + Uchar pgetmode[8]; - fillbytes(getmode, sizeof (getmode), '\0'); + fillbytes(pgetmode, sizeof (pgetmode), '\0'); scgp->silent++; - if (drivemode_plextor(scgp, (caddr_t)getmode, sizeof (getmode), modecode, NULL) < 0) { + if (drivemode_plextor(scgp, (caddr_t)pgetmode, sizeof (pgetmode), modecode, NULL) < 0) { scgp->silent--; return (-1); } scgp->silent--; if (lverbose > 1) - scg_prbytes("Modes", getmode, sizeof (getmode)); + scg_prbytes("Modes", pgetmode, sizeof (pgetmode)); - fillbytes(setmode, sizeof (setmode), '\0'); - setmode[1] = val; + fillbytes(psetmode, sizeof (psetmode), '\0'); + psetmode[1] = val; - if (drivemode_plextor(scgp, NULL, 0, modecode, setmode) < 0) + if (drivemode_plextor(scgp, NULL, 0, modecode, psetmode) < 0) return (-1); - fillbytes(getmode, sizeof (getmode), '\0'); - if (drivemode_plextor(scgp, (caddr_t)getmode, sizeof (getmode), modecode, NULL) < 0) + fillbytes(pgetmode, sizeof (pgetmode), '\0'); + if (drivemode_plextor(scgp, (caddr_t)pgetmode, sizeof (pgetmode), modecode, NULL) < 0) return (-1); if (lverbose > 1) - scg_prbytes("Modes", getmode, sizeof (getmode)); + scg_prbytes("Modes", pgetmode, sizeof (pgetmode)); { struct gr *gp = gr; for (; gp->name != NULL; gp++) { - if (getmode[3] == gp->val) + if (pgetmode[3] == gp->val) break; } if (gp->name == NULL) - printf("Unknown GigaRec value 0x%X.\n", getmode[3]); + printf("Unknown GigaRec value 0x%X.\n", pgetmode[3]); else printf("GigaRec %sis %s.\n", gp->val?"value ":"", gp->name); } - return (getmode[3]); + return (pgetmode[3]); } LOCAL Int32_t @@ -3188,17 +3208,17 @@ SCSI *scgp; { int modecode = 1; - Uchar getmode[8]; + Uchar pgetmode[8]; - fillbytes(getmode, sizeof (getmode), '\0'); + fillbytes(pgetmode, sizeof (pgetmode), '\0'); scgp->silent++; - if (drivemode_plextor(scgp, (caddr_t)getmode, sizeof (getmode), modecode, NULL) < 0) { + if (drivemode_plextor(scgp, (caddr_t)pgetmode, sizeof (pgetmode), modecode, NULL) < 0) { scgp->silent--; return (-1); } scgp->silent--; - return (getmode[2] & 0x03); + return (pgetmode[2] & 0x03); } LOCAL int @@ -3206,17 +3226,17 @@ SCSI *scgp; { int modecode = 0xBB; - Uchar getmode[8]; + Uchar pgetmode[8]; - fillbytes(getmode, sizeof (getmode), '\0'); + fillbytes(pgetmode, sizeof (pgetmode), '\0'); scgp->silent++; - if (drivemode_plextor(scgp, (caddr_t)getmode, sizeof (getmode), modecode, NULL) < 0) { + if (drivemode_plextor(scgp, (caddr_t)pgetmode, sizeof (pgetmode), modecode, NULL) < 0) { scgp->silent--; return (-1); } scgp->silent--; - return (getmode[2] & 0x01); + return (pgetmode[2] & 0x01); } LOCAL int @@ -3224,17 +3244,17 @@ SCSI *scgp; { int modecode = 0; - Uchar getmode[8]; + Uchar pgetmode[8]; - fillbytes(getmode, sizeof (getmode), '\0'); + fillbytes(pgetmode, sizeof (pgetmode), '\0'); scgp->silent++; - if (drivemode2_plextor(scgp, (caddr_t)getmode, sizeof (getmode), modecode, NULL) < 0) { + if (drivemode2_plextor(scgp, (caddr_t)pgetmode, sizeof (pgetmode), modecode, NULL) < 0) { scgp->silent--; return (-1); } scgp->silent--; - if (getmode[2] & 1) + if (pgetmode[2] & 1) return (1); return (0); @@ -3247,44 +3267,44 @@ BOOL do_hide; { int modecode = 1; - Uchar setmode[8]; - Uchar getmode[8]; + Uchar psetmode[8]; + Uchar pgetmode[8]; BOOL is_ss; BOOL is_hide; - fillbytes(getmode, sizeof (getmode), '\0'); + fillbytes(pgetmode, sizeof (pgetmode), '\0'); scgp->silent++; - if (drivemode_plextor(scgp, (caddr_t)getmode, sizeof (getmode), modecode, NULL) < 0) { + if (drivemode_plextor(scgp, (caddr_t)pgetmode, sizeof (pgetmode), modecode, NULL) < 0) { scgp->silent--; return (-1); } scgp->silent--; if (lverbose > 1) - scg_prbytes("Modes", getmode, sizeof (getmode)); + scg_prbytes("Modes", pgetmode, sizeof (pgetmode)); - is_ss = (getmode[2] & MB1_SS) != 0; - is_hide = (getmode[2] & MB1_HIDE_CDR) != 0; + is_ss = (pgetmode[2] & MB1_SS) != 0; + is_hide = (pgetmode[2] & MB1_HIDE_CDR) != 0; if (lverbose > 0) { printf("Single session is %s.\n", is_ss ? "ON":"OFF"); printf("Hide CDR is %s.\n", is_hide ? "ON":"OFF"); } - fillbytes(setmode, sizeof (setmode), '\0'); - setmode[0] = getmode[2]; /* Copy over old values */ + fillbytes(psetmode, sizeof (psetmode), '\0'); + psetmode[0] = pgetmode[2]; /* Copy over old values */ if (do_ss >= 0) { if (do_ss) - setmode[0] |= MB1_SS; + psetmode[0] |= MB1_SS; else - setmode[0] &= ~MB1_SS; + psetmode[0] &= ~MB1_SS; } if (do_hide >= 0) { if (do_hide) - setmode[0] |= MB1_HIDE_CDR; + psetmode[0] |= MB1_HIDE_CDR; else - setmode[0] &= ~MB1_HIDE_CDR; + psetmode[0] &= ~MB1_HIDE_CDR; } if (do_ss >= 0 && do_ss != is_ss) @@ -3292,15 +3312,15 @@ if (do_hide >= 0 && do_hide != is_hide) printf("Turning hide CDR %s.\n", do_hide?"on":"off"); - if (drivemode_plextor(scgp, NULL, 0, modecode, setmode) < 0) + if (drivemode_plextor(scgp, NULL, 0, modecode, psetmode) < 0) return (-1); - fillbytes(getmode, sizeof (getmode), '\0'); - if (drivemode_plextor(scgp, (caddr_t)getmode, sizeof (getmode), modecode, NULL) < 0) + fillbytes(pgetmode, sizeof (pgetmode), '\0'); + if (drivemode_plextor(scgp, (caddr_t)pgetmode, sizeof (pgetmode), modecode, NULL) < 0) return (-1); if (lverbose > 1) - scg_prbytes("Modes", getmode, sizeof (getmode)); + scg_prbytes("Modes", pgetmode, sizeof (pgetmode)); return (0); } @@ -3311,48 +3331,48 @@ BOOL do_speedrd; { int modecode = 0xBB; - Uchar setmode[8]; - Uchar getmode[8]; + Uchar psetmode[8]; + Uchar pgetmode[8]; BOOL is_speedrd; - fillbytes(getmode, sizeof (getmode), '\0'); + fillbytes(pgetmode, sizeof (pgetmode), '\0'); scgp->silent++; - if (drivemode_plextor(scgp, (caddr_t)getmode, sizeof (getmode), modecode, NULL) < 0) { + if (drivemode_plextor(scgp, (caddr_t)pgetmode, sizeof (pgetmode), modecode, NULL) < 0) { scgp->silent--; return (-1); } scgp->silent--; if (lverbose > 1) - scg_prbytes("Modes", getmode, sizeof (getmode)); + scg_prbytes("Modes", pgetmode, sizeof (pgetmode)); - is_speedrd = (getmode[2] & MBbb_SPEAD_READ) != 0; + is_speedrd = (pgetmode[2] & MBbb_SPEAD_READ) != 0; if (lverbose > 0) printf("Speed-Read is %s.\n", is_speedrd ? "ON":"OFF"); - fillbytes(setmode, sizeof (setmode), '\0'); - setmode[0] = getmode[2]; /* Copy over old values */ + fillbytes(psetmode, sizeof (psetmode), '\0'); + psetmode[0] = pgetmode[2]; /* Copy over old values */ if (do_speedrd >= 0) { if (do_speedrd) - setmode[0] |= MBbb_SPEAD_READ; + psetmode[0] |= MBbb_SPEAD_READ; else - setmode[0] &= ~MBbb_SPEAD_READ; + psetmode[0] &= ~MBbb_SPEAD_READ; } if (do_speedrd >= 0 && do_speedrd != is_speedrd) printf("Turning Speed-Read %s.\n", do_speedrd?"on":"off"); - if (drivemode_plextor(scgp, NULL, 0, modecode, setmode) < 0) + if (drivemode_plextor(scgp, NULL, 0, modecode, psetmode) < 0) return (-1); - fillbytes(getmode, sizeof (getmode), '\0'); - if (drivemode_plextor(scgp, (caddr_t)getmode, sizeof (getmode), modecode, NULL) < 0) + fillbytes(pgetmode, sizeof (pgetmode), '\0'); + if (drivemode_plextor(scgp, (caddr_t)pgetmode, sizeof (pgetmode), modecode, NULL) < 0) return (-1); if (lverbose > 1) - scg_prbytes("Modes", getmode, sizeof (getmode)); + scg_prbytes("Modes", pgetmode, sizeof (pgetmode)); /* * Set current read speed to new max value. @@ -3369,53 +3389,53 @@ BOOL do_powerrec; { int modecode = 0; - Uchar setmode[8]; - Uchar getmode[8]; + Uchar psetmode[8]; + Uchar pgetmode[8]; BOOL is_powerrec; int speed; - fillbytes(getmode, sizeof (getmode), '\0'); + fillbytes(pgetmode, sizeof (pgetmode), '\0'); scgp->silent++; - if (drivemode2_plextor(scgp, (caddr_t)getmode, sizeof (getmode), modecode, NULL) < 0) { + if (drivemode2_plextor(scgp, (caddr_t)pgetmode, sizeof (pgetmode), modecode, NULL) < 0) { scgp->silent--; return (-1); } scgp->silent--; if (lverbose > 1) - scg_prbytes("Modes", getmode, sizeof (getmode)); + scg_prbytes("Modes", pgetmode, sizeof (pgetmode)); - is_powerrec = (getmode[2] & 1) != 0; + is_powerrec = (pgetmode[2] & 1) != 0; - speed = a_to_u_2_byte(&getmode[4]); + speed = a_to_u_2_byte(&pgetmode[4]); if (lverbose > 0) { printf("Power-Rec is %s.\n", is_powerrec ? "ON":"OFF"); printf("Power-Rec write speed: %dx (recommended)\n", speed / 176); } - fillbytes(setmode, sizeof (setmode), '\0'); - setmode[0] = getmode[2]; /* Copy over old values */ + fillbytes(psetmode, sizeof (psetmode), '\0'); + psetmode[0] = pgetmode[2]; /* Copy over old values */ if (do_powerrec >= 0) { if (do_powerrec) - setmode[0] |= 1; + psetmode[0] |= 1; else - setmode[0] &= ~1; + psetmode[0] &= ~1; } if (do_powerrec >= 0 && do_powerrec != is_powerrec) printf("Turning Power-Rec %s.\n", do_powerrec?"on":"off"); - if (drivemode2_plextor(scgp, NULL, 0, modecode, setmode) < 0) + if (drivemode2_plextor(scgp, NULL, 0, modecode, psetmode) < 0) return (-1); - fillbytes(getmode, sizeof (getmode), '\0'); - if (drivemode2_plextor(scgp, (caddr_t)getmode, sizeof (getmode), modecode, NULL) < 0) + fillbytes(pgetmode, sizeof (pgetmode), '\0'); + if (drivemode2_plextor(scgp, (caddr_t)pgetmode, sizeof (pgetmode), modecode, NULL) < 0) return (-1); if (lverbose > 1) - scg_prbytes("Modes", getmode, sizeof (getmode)); + scg_prbytes("Modes", pgetmode, sizeof (pgetmode)); return (0); } @@ -3442,7 +3462,7 @@ scmd->cdb.g5_cdb.cmd = 0xEB; scmd->cdb.g5_cdb.lun = scg_lun(scgp); - i_to_2_byte(&scmd->cdb.g1_cdb.count[1], sizeof (buf)); + i_to_2_byte(&scmd->cdb.cmd_cdb[8], sizeof (buf)); scgp->cmdname = "plextor get speedlist"; @@ -3488,7 +3508,7 @@ scmd->cdb.g5_cdb.addr[1] = 0x08; scmd->cdb.g5_cdb.addr[2] = mode; - i_to_2_byte(&scmd->cdb.g1_cdb.count[1], sizeof (buf)); + i_to_2_byte(&scmd->cdb.cmd_cdb[8], sizeof (buf)); scgp->cmdname = "plextor read bpc"; diff -Nru cdrtools-2.01.01a33/cdrecord/drv_philips.c cdrtools-3.02a09/cdrecord/drv_philips.c --- cdrtools-2.01.01a33/cdrecord/drv_philips.c 2007-08-06 23:13:26.000000000 +0000 +++ cdrtools-3.02a09/cdrecord/drv_philips.c 2010-12-19 18:39:36.000000000 +0000 @@ -1,13 +1,14 @@ -/* @(#)drv_philips.c 1.75 07/08/07 Copyright 1997-2006 J. Schilling */ +/* @(#)drv_philips.c 1.82 10/12/19 Copyright 1997-2010 J. Schilling */ +#include #ifndef lint -static char sccsid[] = - "@(#)drv_philips.c 1.75 07/08/07 Copyright 1997-2006 J. Schilling"; +static UConst char sccsid[] = + "@(#)drv_philips.c 1.82 10/12/19 Copyright 1997-2010 J. Schilling"; #endif /* * CDR device implementation for * Philips/Yamaha/Ricoh/Plasmon * - * Copyright (c) 1997-2006 J. Schilling + * Copyright (c) 1997-2010 J. Schilling */ /* * The contents of this file are subject to the terms of the @@ -23,11 +24,12 @@ #include -#include +#include #include /* Include sys/types.h to make off_t available */ #include #include #include +#include #include #include @@ -748,7 +750,7 @@ } else { fillbytes((caddr_t)mode, sizeof (mode), '\0'); - if (!get_mode_params(scgp, page, "Speed/Dummy information", + if (!get_mode_params(scgp, page, _("Speed/Dummy information"), (Uchar *)mode, (Uchar *)0, (Uchar *)0, (Uchar *)0, &len)) { return (-1); } @@ -798,7 +800,7 @@ } else { fillbytes((caddr_t)mode, sizeof (mode), '\0'); - if (!get_mode_params(scgp, page, "Speed/Dummy information", + if (!get_mode_params(scgp, page, _("Speed/Dummy information"), (Uchar *)mode, (Uchar *)0, (Uchar *)0, (Uchar *)0, &len)) { return (-1); } @@ -835,7 +837,7 @@ if (speedp != 0 && *speedp < 2) { *speedp = 2; if (lverbose) - printf("WARNING: setting to minimum speed (2).\n"); + printf(_("WARNING: setting to minimum speed (2).\n")); } return (speed_select_philips(scgp, dp, speedp)); } @@ -849,9 +851,9 @@ BOOL dummy = (dp->cdr_cmdflags & F_DUMMY) != 0; if (lverbose) - printf("WARNING: ignoring selected speed.\n"); + printf(_("WARNING: ignoring selected speed.\n")); if (dummy) { - errmsgno(EX_BAD, "Cannot set dummy writing for this device.\n"); + errmsgno(EX_BAD, _("Cannot set dummy writing for this device.\n")); return (-1); } return (0); @@ -877,7 +879,7 @@ } -#define IS(what, flag) printf(" Is %s%s\n", flag?"":"not ", what); +#define IS(what, flag) printf(_(" Is %s%s\n"), flag?"":_("not "), what); LOCAL int philips_getdisktype(scgp, dp) @@ -923,18 +925,18 @@ /* printf("lead-in len: %d lead-out len: %d\n", lilen, lolen);*/ lba_to_msf(-150 - lilen, &msf); - printf("ATIP info from disk:\n"); + printf(_("ATIP info from disk:\n")); if (audio >= 0) - IS("unrestricted", audio); + IS(_("unrestricted"), audio); if (audio == 1 || (audio == 0 && (sbuf[7] & 0x3F) != 0x3F)) - printf(" Disk application code: %d\n", sbuf[7] & 0x3F); - printf(" ATIP start of lead in: %ld (%02d:%02d/%02d)\n", + printf(_(" Disk application code: %d\n"), sbuf[7] & 0x3F); + printf(_(" ATIP start of lead in: %ld (%02d:%02d/%02d)\n"), -150 - lilen, msf.msf_min, msf.msf_sec, msf.msf_frame); if (capacity_philips(scgp, &lolen)) { lba_to_msf(lolen, &msf); printf( - " ATIP start of lead out: %ld (%02d:%02d/%02d)\n", + _(" ATIP start of lead out: %ld (%02d:%02d/%02d)\n"), lolen, msf.msf_min, msf.msf_sec, msf.msf_frame); } lba_to_msf(-150 - lilen, &msf); @@ -954,7 +956,7 @@ /*read_subchannel(scgp, bp, track, cnt, msf, subq, fmt); */ if (read_subchannel(scgp, sbuf, 0, 14, 0, 0, 0xf1) >= 0) - scg_prbytes("Disk bar code:", (Uchar *)sbuf, 14 - scg_getresid(scgp)); + scg_prbytes(_("Disk bar code:"), (Uchar *)sbuf, 14 - scg_getresid(scgp)); scgp->silent--; return (drive_getdisktype(scgp, dp)); @@ -971,16 +973,16 @@ scgp->silent++; if (read_B0(scgp, FALSE, NULL, &l) >= 0) { if (debug) - printf("lead out B0: %ld\n", l); + printf(_("lead out B0: %ld\n"), l); *lp = l; } else if (read_trackinfo(scgp, 0xAA, &l, NULL, NULL, NULL, NULL) >= 0) { if (debug) - printf("lead out AA: %ld\n", l); + printf(_("lead out AA: %ld\n"), l); *lp = l; } if (read_capacity(scgp) >= 0) { l = scgp->cap->c_baddr + 1; if (debug) - printf("lead out capacity: %ld\n", l); + printf(_("lead out capacity: %ld\n"), l); } else { succeed = FALSE; } @@ -1058,7 +1060,7 @@ scmd->sense_len = CCS_SENSE_LEN; scmd->cdb.g1_cdb.cmd = 0xE4; scmd->cdb.g1_cdb.lun = scg_lun(scgp); - i_to_4_byte(&scmd->cdb.g1_cdb.addr[3], len); + i_to_4_byte(&scmd->cdb.cmd_cdb[5], len); scgp->cmdname = "philips reserve_track"; @@ -1236,7 +1238,7 @@ "\204\000tray out", /* 0x84 */ "\205\000track at one not in PMA", /* 0x85 */ "\240\000stopped on non data block", /* 0xa0 */ - "\241\000invalid start adress", /* 0xa1 */ + "\241\000invalid start address", /* 0xa1 */ "\242\000attampt to cross track-boundary", /* 0xa2 */ "\243\000illegal medium", /* 0xa3 */ "\244\000disk write protected", /* 0xa4 */ @@ -1397,7 +1399,7 @@ cdr_t *dp; { if (dp == &cdr_ricoh_ro1060) { - errmsgno(EX_BAD, "No support for Ricoh RO-1060C\n"); + errmsgno(EX_BAD, _("No support for Ricoh RO-1060C\n")); return (-1); } scg_setnonstderrs(scgp, sd_ro1420_error_str); @@ -1430,7 +1432,7 @@ return (-1); if (scgp->verbose) - scg_prbytes("Session info data: ", (Uchar *)buf, sizeof (buf) - scg_getresid(scgp)); + scg_prbytes(_("Session info data: "), (Uchar *)buf, sizeof (buf) - scg_getresid(scgp)); li = a_to_u_2_byte(buf); lo = a_to_u_2_byte(&buf[2]); diff -Nru cdrtools-2.01.01a33/cdrecord/drv_simul.c cdrtools-3.02a09/cdrecord/drv_simul.c --- cdrtools-2.01.01a33/cdrecord/drv_simul.c 2007-08-08 23:05:48.000000000 +0000 +++ cdrtools-3.02a09/cdrecord/drv_simul.c 2010-12-19 18:39:36.000000000 +0000 @@ -1,12 +1,13 @@ -/* @(#)drv_simul.c 1.57 07/08/09 Copyright 1998-2006 J. Schilling */ +/* @(#)drv_simul.c 1.61 10/12/19 Copyright 1998-2010 J. Schilling */ +#include #ifndef lint -static char sccsid[] = - "@(#)drv_simul.c 1.57 07/08/09 Copyright 1998-2006 J. Schilling"; +static UConst char sccsid[] = + "@(#)drv_simul.c 1.61 10/12/19 Copyright 1998-2010 J. Schilling"; #endif /* * Simulation device driver * - * Copyright (c) 1998-2006 J. Schilling + * Copyright (c) 1998-2010 J. Schilling */ /* * The contents of this file are subject to the terms of the @@ -25,7 +26,7 @@ #endif #include -#include +#include #include #include #include @@ -35,6 +36,7 @@ #include #include #include +#include /*#include */ #include @@ -304,8 +306,8 @@ sleep_max = 228 * simul_bufsize / simul_speed; if (lverbose) { - printf("Simulation drive buffer size: %d KB\n", simul_bufsize); - printf("Maximum reserve time in drive buffer: %d.%3.3d ms for speed %dx\n", + printf(_("Simulation drive buffer size: %d KB\n"), simul_bufsize); + printf(_("Maximum reserve time in drive buffer: %d.%3.3d ms for speed %dx\n"), sleep_max / 1000, sleep_max % 1000, simul_speed); @@ -344,7 +346,7 @@ static struct timeval tv2; if (lverbose > 1 && islast) - printf("\nWriting last record for this track.\n"); + printf(_("\nWriting last record for this track.\n")); simul_nwa += blocks; @@ -358,7 +360,7 @@ sleep_min = (sleep_rest - sleep_diff); if (sleep_diff > sleep_rest) { - printf("Buffer underrun: actual delay was %d.%3.3d ms, max delay was %d.%3.3d ms.\n", + printf(_("Buffer underrun: actual delay was %d.%3.3d ms, max delay was %d.%3.3d ms.\n"), sleep_diff / 1000, sleep_diff % 1000, sleep_rest / 1000, @@ -433,10 +435,10 @@ track_t *trackp; { if (lverbose) { - printf("Remaining reserve time in drive buffer: %d.%3.3d ms\n", + printf(_("Remaining reserve time in drive buffer: %d.%3.3d ms\n"), sleep_rest / 1000, sleep_rest % 1000); - printf("Minimum reserve time in drive buffer: %d.%3.3d ms\n", + printf(_("Minimum reserve time in drive buffer: %d.%3.3d ms\n"), sleep_min / 1000, sleep_min % 1000); } diff -Nru cdrtools-2.01.01a33/cdrecord/drv_sony.c cdrtools-3.02a09/cdrecord/drv_sony.c --- cdrtools-2.01.01a33/cdrecord/drv_sony.c 2007-08-06 23:13:26.000000000 +0000 +++ cdrtools-3.02a09/cdrecord/drv_sony.c 2012-03-15 23:34:36.000000000 +0000 @@ -1,13 +1,14 @@ -/* @(#)drv_sony.c 1.79 07/08/07 Copyright 1997-2006 J. Schilling */ +/* @(#)drv_sony.c 1.89 12/03/16 Copyright 1997-2012 J. Schilling */ +#include #ifndef lint -static char sccsid[] = - "@(#)drv_sony.c 1.79 07/08/07 Copyright 1997-2006 J. Schilling"; +static UConst char sccsid[] = + "@(#)drv_sony.c 1.89 12/03/16 Copyright 1997-2012 J. Schilling"; #endif /* * CDR device implementation for * Sony * - * Copyright (c) 1997-2006 J. Schilling + * Copyright (c) 1997-2012 J. Schilling */ /* * The contents of this file are subject to the terms of the @@ -25,7 +26,7 @@ #include -#include +#include #include #include /* Include sys/types.h to make off_t available */ #include @@ -38,6 +39,7 @@ #include #include #include +#include #include #include @@ -202,10 +204,14 @@ LOCAL int discontinue_sony __PR((SCSI *scgp)); LOCAL int write_track_sony __PR((SCSI *scgp, long track, int sectype)); LOCAL int close_track_sony __PR((SCSI *scgp, cdr_t *dp, track_t *trackp)); +#ifdef __needed__ LOCAL int flush_sony __PR((SCSI *scgp, int track)); +#endif LOCAL int finalize_sony __PR((SCSI *scgp, cdr_t *dp, track_t *trackp)); LOCAL int recover_sony __PR((SCSI *scgp, cdr_t *dp, int track)); +#ifdef __needed__ LOCAL int set_wr_parameter_sony __PR((SCSI *scgp, caddr_t bp, int size)); +#endif LOCAL int next_wr_addr_sony __PR((SCSI *scgp, track_t *trackp, long *ap)); LOCAL int reserve_track_sony __PR((SCSI *scgp, unsigned long len)); LOCAL int init_sony __PR((SCSI *scgp, cdr_t *dp)); @@ -430,7 +436,7 @@ return (0); } if (dummy) { - printf("Fixating is not possible in dummy write mode.\n"); + printf(_("Fixating is not possible in dummy write mode.\n")); return (0); } fillbytes((caddr_t)scmd, sizeof (*scmd), '\0'); @@ -450,6 +456,7 @@ return (0); } +#ifdef __needed__ LOCAL int flush_sony(scgp, track) SCSI *scgp; @@ -475,6 +482,7 @@ return (-1); return (0); } +#endif LOCAL int recover_sony(scgp, dp, track) @@ -499,6 +507,7 @@ return (0); } +#ifdef __needed__ LOCAL int set_wr_parameter_sony(scgp, bp, size) SCSI *scgp; @@ -523,6 +532,7 @@ return (-1); return (0); } +#endif LOCAL int next_wr_addr_sony(scgp, trackp, ap) @@ -548,7 +558,7 @@ scmd->sense_len = CCS_SENSE_LEN; scmd->cdb.g1_cdb.cmd = 0xF3; scmd->cdb.g1_cdb.lun = scg_lun(scgp); - i_to_4_byte(&scmd->cdb.g1_cdb.addr[3], len); + i_to_4_byte(&scmd->cdb.cmd_cdb[5], len); scgp->cmdname = "reserve_track"; @@ -566,7 +576,7 @@ } -#define IS(what, flag) printf(" Is %s%s\n", flag?"":"not ", what); +#define IS(what, flag) printf(_(" Is %s%s\n"), flag?"":_("not "), what); LOCAL int getdisktype_sony(scgp, dp) @@ -598,11 +608,11 @@ if ((dp->cdr_dstat->ds_cdrflags & RF_PRATIP) != 0 && dummy >= 0) { - printf("ATIP info from disk:\n"); - printf(" Indicated writing power: %d\n", + printf(_("ATIP info from disk:\n")); + printf(_(" Indicated writing power: %d\n"), (unsigned)(xp->disk_appl_code[1] & 0x70) >> 4); - IS("unrestricted", xp->disk_appl_code[2] & 0x40); - printf(" Disk application code: %d\n", xp->disk_appl_code[2] & 0x3F); + IS(_("unrestricted"), xp->disk_appl_code[2] & 0x40); + printf(_(" Disk application code: %d\n"), xp->disk_appl_code[2] & 0x3F); msf.msf_min = xp->lead_in_start[1]; msf.msf_sec = xp->lead_in_start[2]; msf.msf_frame = xp->lead_in_start[3]; @@ -612,14 +622,14 @@ * The Sony CDU 920 seems to deliver 00:00/00 for * lead-in start time, dont use it. */ - printf(" ATIP start of lead in: %ld (%02d:%02d/%02d)\n", + printf(_(" ATIP start of lead in: %ld (%02d:%02d/%02d)\n"), msf_to_lba(msf.msf_min, msf.msf_sec, msf.msf_frame, FALSE), msf.msf_min, msf.msf_sec, msf.msf_frame); } msf.msf_min = xp->last_start_time[1]; msf.msf_sec = xp->last_start_time[2]; msf.msf_frame = xp->last_start_time[3]; - printf(" ATIP start of lead out: %ld (%02d:%02d/%02d)\n", + printf(_(" ATIP start of lead out: %ld (%02d:%02d/%02d)\n"), msf_to_lba(msf.msf_min, msf.msf_sec, msf.msf_frame, TRUE), msf.msf_min, msf.msf_sec, msf.msf_frame); if (lst < -150) { @@ -772,7 +782,7 @@ fillbytes((caddr_t)mode, sizeof (mode), '\0'); inc_verbose(); - if (!get_mode_params(scgp, page, "CD track information", + if (!get_mode_params(scgp, page, _("CD track information"), (Uchar *)mode, (Uchar *)0, (Uchar *)0, (Uchar *)0, &len)) { dec_verbose(); return (-1); @@ -817,7 +827,7 @@ fillbytes((caddr_t)mode, sizeof (mode), '\0'); inc_verbose(); - if (!get_mode_params(scgp, page, "CD track information", + if (!get_mode_params(scgp, page, _("CD track information"), (Uchar *)mode, (Uchar *)0, (Uchar *)0, (Uchar *)0, &len)) { dec_verbose(); return (-1); @@ -879,17 +889,26 @@ if (!is_tao(trackp) && !is_packet(trackp)) { if (trackp->pregapsize > 0 && (trackp->flags & TI_PREGAP) == 0) { if (lverbose) { - printf("Writing pregap for track %d at %ld\n", + printf(_("Writing pregap for track %d at %ld\n"), (int)trackp->trackno, trackp->trackstart-trackp->pregapsize); } - /* - * XXX Do we need to check isecsize too? - */ - pad_track(scgp, dp, trackp, - trackp->trackstart-trackp->pregapsize, - (Llong)trackp->pregapsize*trackp->secsize, + if (trackp->track == 1 && is_hidden(trackp)) { + pad_track(scgp, dp, trackp, + trackp->trackstart-trackp->pregapsize, + (Llong)(trackp->pregapsize-trackp->trackstart)*trackp->secsize, FALSE, 0); + if (write_track_data(scgp, dp, track_base(trackp)) < 0) + return (-1); + } else { + /* + * XXX Do we need to check isecsize too? + */ + pad_track(scgp, dp, trackp, + trackp->trackstart-trackp->pregapsize, + (Llong)trackp->pregapsize*trackp->secsize, + FALSE, 0); + } } return (0); } @@ -945,7 +964,7 @@ */ if ((xp->disk_status & 0xC0) != 0) { if (xp->disk_style != 0x00) - errmsgno(EX_BAD, "Cannot change disk stile for recorded disk.\n"); + errmsgno(EX_BAD, _("Cannot change disk stile for recorded disk.\n")); } xp->disk_style = 0x00; } @@ -991,7 +1010,7 @@ fillbytes((caddr_t)mode, sizeof (mode), '\0'); inc_verbose(); - if (!get_mode_params(scgp, page, "CD disk information", + if (!get_mode_params(scgp, page, _("CD disk information"), (Uchar *)mode, (Uchar *)0, (Uchar *)0, (Uchar *)0, &len)) { dec_verbose(); return (-1); @@ -1187,7 +1206,7 @@ for (i = 1; i <= trackp->tracks; i++) { if (trackp[i].tracksize < (tsize_t)0) { - errmsgno(EX_BAD, "Track %d has unknown length.\n", i); + errmsgno(EX_BAD, _("Track %d has unknown length.\n"), i); return (-1); } } @@ -1203,14 +1222,14 @@ scgp->silent--; free(cp); if (ret < 0) { - errmsgno(EX_BAD, "CUE sheet not accepted. Retrying with minimum pregapsize = 1.\n"); + errmsgno(EX_BAD, _("CUE sheet not accepted. Retrying with minimum pregapsize = 1.\n")); ncue = (*dp->cdr_gen_cue)(trackp, &cp, TRUE); ret = write_start_sony(scgp, (caddr_t)cp, ncue*8); free(cp); } if (ret >= 0 && lverbose) { gettimeofday(&stoptime, (struct timezone *)0); - prtimediff("Write Lead-in time: ", &starttime, &stoptime); + prtimediff(_("Write Lead-in time: "), &starttime, &stoptime); } return (ret); } @@ -1227,38 +1246,38 @@ /* if (flags & F_SAO) {*/ if (wm_base(dp->cdr_dstat->ds_wrmode) == WM_SAO) { if (debug || lverbose) { - printf("Sending CUE sheet...\n"); + printf(_("Sending CUE sheet...\n")); flush(); } if (trackp[0].flags & TI_TEXT) { if (dp->cdr_speeddef != 4) { errmsgno(EX_BAD, - "The CDU-924 does not support CD-Text, disabling.\n"); + _("The CDU-924 does not support CD-Text, disabling.\n")); trackp[0].flags &= ~TI_TEXT; } } if ((*dp->cdr_send_cue)(scgp, dp, trackp) < 0) { - errmsgno(EX_BAD, "Cannot send CUE sheet.\n"); + errmsgno(EX_BAD, _("Cannot send CUE sheet.\n")); return (-1); } if (trackp[0].flags & TI_TEXT) { startsec = dp->cdr_dstat->ds_first_leadin; - printf("SAO startsec: %ld\n", startsec); + printf(_("SAO startsec: %ld\n"), startsec); } else { startsec = -150; } if (debug) - printf("SAO startsec: %ld\n", startsec); + printf(_("SAO startsec: %ld\n"), startsec); if (trackp[0].flags & TI_TEXT) { if (startsec > 0) { - errmsgno(EX_BAD, "CD-Text must be in first session.\n"); + errmsgno(EX_BAD, _("CD-Text must be in first session.\n")); return (-1); } if (debug || lverbose) - printf("Writing lead-in...\n"); + printf(_("Writing lead-in...\n")); if (write_cdtext(scgp, dp, startsec) < 0) return (-1); @@ -1321,7 +1340,7 @@ cdr_t *dp; { if (scgp->inq != NULL) { - if (strbeg("CD-R CDU94", scgp->inq->prod_ident)) { + if (strbeg("CD-R CDU94", scgp->inq->inq_prod_ident)) { dp->cdr_speeddef = 4; } } @@ -1410,7 +1429,7 @@ *fp = freespace; if (scgp->verbose || (sp == 0 && fp == 0)) - printf("BFree: %ld K BSize: %ld K\n", freespace >> 10, bufsize >> 10); + printf(_("BFree: %ld K BSize: %ld K\n"), freespace >> 10, bufsize >> 10); if (bufsize == 0) return (0); diff -Nru cdrtools-2.01.01a33/cdrecord/fifo.c cdrtools-3.02a09/cdrecord/fifo.c --- cdrtools-2.01.01a33/cdrecord/fifo.c 2006-11-11 16:59:54.000000000 +0000 +++ cdrtools-3.02a09/cdrecord/fifo.c 2015-04-22 18:19:34.000000000 +0000 @@ -1,7 +1,8 @@ -/* @(#)fifo.c 1.52 06/11/11 Copyright 1989,1997-2006 J. Schilling */ +/* @(#)fifo.c 1.66 15/04/22 Copyright 1989,1997-2015 J. Schilling */ +#include #ifndef lint -static char sccsid[] = - "@(#)fifo.c 1.52 06/11/11 Copyright 1989,1997-2006 J. Schilling"; +static UConst char sccsid[] = + "@(#)fifo.c 1.66 15/04/22 Copyright 1989,1997-2015 J. Schilling"; #endif /* * A "fifo" that uses shared memory between two processes @@ -10,7 +11,7 @@ * and a proposal from Finn Arne Gangstad * who had the idea to use a ring buffer to handle average size chunks. * - * Copyright (c) 1989,1997-2006 J. Schilling + * Copyright (c) 1989,1997-2015 J. Schilling */ /* * The contents of this file are subject to the terms of the @@ -19,6 +20,8 @@ * with the License. * * See the file CDDL.Schily.txt in this distribution for details. + * A copy of the CDDL is also available via the Internet at + * http://www.opensource.org/licenses/cddl1.txt * * When distributing Covered Code, include this CDDL HEADER in each * file and include the License file CDDL.Schily.txt from this distribution. @@ -33,7 +36,7 @@ defined(HAVE_CLONE_AREA) && defined(HAVE_CREATE_AREA) && \ defined(HAVE_DELETE_AREA) #include -# define HAVE_BEOS_AREAS /* BeOS/Zeta */ +# define HAVE_BEOS_AREAS /* BeOS/Zeta/Haiku */ #endif #if !defined(HAVE_SMMAP) && !defined(HAVE_USGSHM) && \ !defined(HAVE_DOSALLOCSHAREDMEM) && !defined(HAVE_BEOS_AREAS) @@ -67,7 +70,7 @@ # define USE_BEOS_AREAS #endif -#include +#include #include #include /* includes */ #include @@ -78,9 +81,11 @@ #include #include #include -#include +#include #include #include +#include +#include #include "cdrecord.h" #include "xio.h" @@ -162,7 +167,7 @@ extern int debug; extern int lverbose; -EXPORT void init_fifo __PR((long)); +EXPORT long init_fifo __PR((long)); #ifdef USE_MMAP LOCAL char *mkshare __PR((int size)); #endif @@ -194,14 +199,14 @@ EXPORT int fifo_percent __PR((BOOL addone)); -EXPORT void +EXPORT long init_fifo(fs) long fs; { int pagesize; if (fs == 0L) - return; + return (fs); #ifdef _SC_PAGESIZE pagesize = sysconf(_SC_PAGESIZE); @@ -241,6 +246,7 @@ if (debug) ef = fopen("/tmp/ef", "w"); #endif + return (buflen-pagesize); /* We use one page for administrative data */ } #ifdef USE_MMAP @@ -257,16 +263,16 @@ PROT_READ|PROT_WRITE, MAP_SHARED|MAP_ANONYMOUS, f, 0); #else if ((f = open("/dev/zero", O_RDWR)) < 0) - comerr("Cannot open '/dev/zero'.\n"); + comerr(_("Cannot open '/dev/zero'.\n")); addr = mmap(0, mmap_sizeparm(size), PROT_READ|PROT_WRITE, MAP_SHARED, f, 0); #endif if (addr == (char *)-1) - comerr("Cannot get mmap for %d Bytes on /dev/zero.\n", size); + comerr(_("Cannot get mmap for %d Bytes on /dev/zero.\n"), size); if (f >= 0) close(f); - if (debug) errmsgno(EX_BAD, "shared memory segment attached at: %p size %d\n", + if (debug) errmsgno(EX_BAD, _("shared memory segment attached at: %p size %d\n"), (void *)addr, size); return (addr); @@ -274,8 +280,8 @@ #endif #ifdef USE_USGSHM -#include -#include +#include +#include LOCAL char * mkshm(size) int size; @@ -297,18 +303,18 @@ /* extern char *shmat();*/ if ((id = shmget(IPC_PRIVATE, size, IPC_CREAT|0600)) == -1) - comerr("shmget failed\n"); + comerr(_("shmget failed\n")); - if (debug) errmsgno(EX_BAD, "shared memory segment allocated: %d\n", id); + if (debug) errmsgno(EX_BAD, _("shared memory segment allocated: %d\n"), id); if ((addr = shmat(id, (char *)0, 0600)) == (char *)-1) - comerr("shmat failed\n"); + comerr(_("shmat failed\n")); - if (debug) errmsgno(EX_BAD, "shared memory segment attached at: %p size %d\n", + if (debug) errmsgno(EX_BAD, _("shared memory segment attached at: %p size %d\n"), (void *)addr, size); if (shmctl(id, IPC_RMID, 0) < 0) - comerr("shmctl failed to detach shared memory segment\n"); + comerr(_("shmctl failed to detach shared memory segment\n")); #ifdef SHM_LOCK /* @@ -316,7 +322,7 @@ * ommit this definition. */ if (shmctl(id, SHM_LOCK, 0) < 0) - comerr("shmctl failed to lock shared memory segment\n"); + comerr(_("shmctl failed to lock shared memory segment\n")); #endif return (addr); @@ -336,9 +342,9 @@ * no such restriction so I decided to use it allowing fifos of arbitrary size. */ if (DosAllocSharedMem(&addr, NULL, size, 0X100L | 0x1L | 0x2L | 0x10L)) - comerr("DosAllocSharedMem() failed\n"); + comerr(_("DosAllocSharedMem() failed\n")); - if (debug) errmsgno(EX_BAD, "shared memory allocated attached at: %p size %d\n", + if (debug) errmsgno(EX_BAD, _("shared memory allocated attached at: %p size %d\n"), (void *)addr, size); return (addr); @@ -363,9 +369,9 @@ B_NO_LOCK, B_READ_AREA|B_WRITE_AREA); if (faio_addr == NULL) { comerrno(faio_aid, - "Cannot get create_area for %d Bytes FIFO.\n", size); + _("Cannot get create_area for %d Bytes FIFO.\n"), size); } - if (debug) errmsgno(EX_BAD, "shared memory allocated attached at: %p size %d\n", + if (debug) errmsgno(EX_BAD, _("shared memory allocated attached at: %p size %d\n"), (void *)faio_addr, size); return (faio_addr); } @@ -379,13 +385,16 @@ delete_area(area_for(faio_addr)); /* * Clone (share) the original one. + * The original implementaion used B_ANY_ADDRESS, but newer Haiku + * versions implement address randomization that prevents us from + * using the pointer in the child. So we noe use B_EXACT_ADDRESS. */ faio_aid = clone_area(faio_name, &faio_addr, - B_ANY_ADDRESS, B_READ_AREA|B_WRITE_AREA, + B_EXACT_ADDRESS, B_READ_AREA|B_WRITE_AREA, faio_aid); if (bufbase != faio_addr) { - errmsgno(EX_BAD, "Panic FIFO addr.\n"); - return (FALSE); + comerrno(EX_BAD, _("Panic FIFO addr.\n")); + /* NOTREACHED */ } } #endif @@ -457,13 +466,13 @@ if (faio_buffers < MIN_BUFFERS) { errmsgno(EX_BAD, - "write-buffer too small, minimum is %dk. Disabling.\n", + _("write-buffer too small, minimum is %dk. Disabling.\n"), MIN_BUFFERS*bufsize/1024); return (FALSE); } if (debug) - printf("Using %d buffers of %d bytes.\n", faio_buffers, faio_buf_size); + printf(_("Using %d buffers of %d bytes.\n"), faio_buffers, faio_buf_size); f = (faio_t *)buf; base = buf + roundup(sizeof (*sp) + faio_buffers * sizeof (struct faio), @@ -482,7 +491,7 @@ faio_pid = fork(); if (faio_pid < 0) - comerr("fork(2) failed"); + comerr(_("fork(2) failed")); if (faio_pid == 0) { /* @@ -537,7 +546,7 @@ * Wait until the reader is active and has filled the buffer. */ if (lverbose || debug) { - printf("Waiting for reader process to fill input buffer ... "); + printf(_("Waiting for reader process to fill input buffer ... ")); flush(); } @@ -545,7 +554,7 @@ 500*MSECS, 0); if (lverbose || debug) - printf("input buffer ready.\n"); + printf(_("input buffer ready.\n")); sp->empty = sp->full = 0L; /* set correct stat state */ sp->cont_low = faio_buffers; /* set cont to max value */ @@ -554,7 +563,7 @@ for (n = 0; n < faio_buffers; n++, f++) { if (f->fd != lastfd && f->fd == STDIN_FILENO && f->len == 0) { - errmsgno(EX_BAD, "Premature EOF on stdin.\n"); + errmsgno(EX_BAD, _("Premature EOF on stdin.\n")); kill_faio(); return (FALSE); } @@ -587,16 +596,18 @@ Uint trackno; if (debug) - printf("\nfaio_reader starting\n"); + printf(_("\nfaio_reader starting\n")); - for (trackno = 1; trackno <= trackp->tracks; trackno++) { + for (trackno = 0; trackno <= trackp->tracks; trackno++) { + if (trackno == 0 && trackp[0].xfp == NULL) + continue; if (debug) - printf("\nfaio_reader reading track %u\n", trackno); + printf(_("\nfaio_reader reading track %u\n"), trackno); faio_read_track(&trackp[trackno]); } sp->done++; if (debug) - printf("\nfaio_reader all tracks read, exiting\n"); + printf(_("\nfaio_reader all tracks read, exiting\n")); /* Prevent hang if buffer is larger than all the tracks combined */ if (sp->gets == 0) @@ -608,7 +619,7 @@ /* XXX This should be fixed soon */ #endif if (debug) - error("\nfaio_reader _exit(0)\n"); + error(_("\nfaio_reader _exit(0)\n")); _exit(0); } @@ -640,7 +651,7 @@ if (bytespt > faio_buf_size) { comerrno(EX_BAD, - "faio_read_track fatal: secsize %d secspt %d, bytespt(%d) > %d !!\n", + _("faio_read_track fatal: secsize %d secspt %d, bytespt(%d) > %d !!\n"), trackp->secsize, trackp->secspt, bytespt, faio_buf_size); } @@ -663,7 +674,10 @@ secno += secspt; } while (tracksize < 0 || bytes_read < tracksize); - xclose(trackp->xfp); /* Don't keep files open longer than neccesary */ + if (trackp->xfp != NULL) { + xclose(trackp->xfp); /* Don't keep files open longer than neccesary */ + trackp->xfp = NULL; + } } LOCAL void @@ -701,10 +715,10 @@ } if (debug) { errmsgno(EX_BAD, - "%lu microseconds passed waiting for %d current: %d idx: %ld\n", + _("%lu microseconds passed waiting for %d current: %d idx: %ld\n"), max_wait, s, f->owner, (long)(f - faio_ref(0))/sizeof (*f)); } - comerrno(EX_BAD, "faio_wait_on_buffer for %s timed out.\n", + comerrno(EX_BAD, _("faio_wait_on_buffer for %s timed out.\n"), (s > owner_reader || s < owner_none) ? "bad_owner" : onames[s-owner_none]); } @@ -781,12 +795,12 @@ goto again; } comerrno(EX_BAD, - "faio_get_buf fatal: fd=%d, f->fd=%d, f->len=%d f->errno=%d\n", + _("faio_get_buf fatal: fd=%d, f->fd=%d, f->len=%d f->errno=%d\n"), fd, f->fd, f->len, f->saved_errno); } if (size < len) { comerrno(EX_BAD, - "unexpected short read-attempt in faio_get_buf. size = %d, len = %d\n", + _("unexpected short read-attempt in faio_get_buf. size = %d, len = %d\n"), size, len); } @@ -807,9 +821,9 @@ if (sp == NULL) /* We might not use a FIFO */ return; - errmsgno(EX_BAD, "fifo had %ld puts and %ld gets.\n", + errmsgno(EX_BAD, _("fifo had %ld puts and %ld gets.\n"), sp->puts, sp->gets); - errmsgno(EX_BAD, "fifo was %ld times empty and %ld times full, min fill was %ld%%.\n", + errmsgno(EX_BAD, _("fifo was %ld times empty and %ld times full, min fill was %ld%%.\n"), sp->empty, sp->full, (100L*sp->cont_low)/faio_buffers); } @@ -834,10 +848,11 @@ #include #include /* includes sys/types.h */ #include +#include #include "cdrecord.h" -EXPORT void init_fifo __PR((long)); +EXPORT long init_fifo __PR((long)); EXPORT BOOL init_faio __PR((track_t *track, int)); EXPORT BOOL await_faio __PR((void)); EXPORT void kill_faio __PR((void)); @@ -848,11 +863,12 @@ EXPORT int fifo_percent __PR((BOOL addone)); -EXPORT void +EXPORT long init_fifo(fs) long fs; { - errmsgno(EX_BAD, "Fifo not supported.\n"); + errmsgno(EX_BAD, _("Fifo not supported.\n")); + return (0L); } EXPORT BOOL diff -Nru cdrtools-2.01.01a33/cdrecord/isosize.c cdrtools-3.02a09/cdrecord/isosize.c --- cdrtools-2.01.01a33/cdrecord/isosize.c 2006-09-13 15:35:12.000000000 +0000 +++ cdrtools-3.02a09/cdrecord/isosize.c 2010-01-03 19:22:00.000000000 +0000 @@ -1,10 +1,11 @@ -/* @(#)isosize.c 1.10 06/09/13 Copyright 1996, 2001-2004 J. Schilling */ +/* @(#)isosize.c 1.13 10/01/03 Copyright 1996, 2001-2010 J. Schilling */ +#include #ifndef lint -static char sccsid[] = - "@(#)isosize.c 1.10 06/09/13 Copyright 1996, 2001-2004 J. Schilling"; +static UConst char sccsid[] = + "@(#)isosize.c 1.13 10/01/03 Copyright 1996, 2001-2010 J. Schilling"; #endif /* - * Copyright (c) 1996, 2001-2004 J. Schilling + * Copyright (c) 1996, 2001-2010 J. Schilling */ /* * The contents of this file are subject to the terms of the @@ -59,7 +60,8 @@ vp = (struct iso9660_pr_voldesc *) &vd; do { - read(f, &vd, sizeof (vd)); + if (read(f, &vd, sizeof (vd)) <= 2048) + return ((Llong)-1); if (GET_UBYTE(vd.vd_type) == VD_PRIMARY) break; @@ -71,6 +73,36 @@ return (-1L); isize = (Llong)GET_BINT(vp->vd_volume_space_size); + isize *= GET_BSHORT(vp->vd_lbsize); + return (isize); +} + +Llong +bisosize(bp, len) + char *bp; + int len; +{ + struct iso9660_pr_voldesc *vp; + Llong isize; + int pos = 16 * 2048; + + if (len < pos) + return ((Llong)-1); + + do { + vp = (struct iso9660_pr_voldesc *) &bp[pos]; + pos += 2048; + if (len < pos) + return ((Llong)-1); + if (GET_UBYTE(vp->vd_type) == VD_PRIMARY) + break; + + } while (GET_UBYTE(vp->vd_type) != VD_TERM); + + if (GET_UBYTE(vp->vd_type) != VD_PRIMARY) + return (-1L); + + isize = (Llong)GET_BINT(vp->vd_volume_space_size); isize *= GET_BSHORT(vp->vd_lbsize); return (isize); } diff -Nru cdrtools-2.01.01a33/cdrecord/LICENSE cdrtools-3.02a09/cdrecord/LICENSE --- cdrtools-2.01.01a33/cdrecord/LICENSE 2007-08-07 15:22:51.000000000 +0000 +++ cdrtools-3.02a09/cdrecord/LICENSE 2009-04-10 20:48:43.000000000 +0000 @@ -1,4 +1,4 @@ -# @(#)LIMITATIONS 1.2 07/08/07 Copyright 2002-2007 J. Schilling +# @(#)LIMITATIONS 1.3 09/04/10 Copyright 2002-2007 J. Schilling This software is under CDDL but you should read the following clarifications: @@ -28,7 +28,7 @@ as you are still allowed to make any changes you like in case you: -- clearly document that you don't care about compatibilty (e.g. identical +- clearly document that you don't care about compatibility (e.g. identical behavior on all supported platforms) or quality (in case you use an unaproved build system) diff -Nru cdrtools-2.01.01a33/cdrecord/LIMITATIONS cdrtools-3.02a09/cdrecord/LIMITATIONS --- cdrtools-2.01.01a33/cdrecord/LIMITATIONS 2007-08-07 15:22:51.000000000 +0000 +++ cdrtools-3.02a09/cdrecord/LIMITATIONS 2009-04-10 20:48:43.000000000 +0000 @@ -1,4 +1,4 @@ -# @(#)LIMITATIONS 1.2 07/08/07 Copyright 2002-2007 J. Schilling +# @(#)LIMITATIONS 1.3 09/04/10 Copyright 2002-2007 J. Schilling This software is under CDDL but you should read the following clarifications: @@ -28,7 +28,7 @@ as you are still allowed to make any changes you like in case you: -- clearly document that you don't care about compatibilty (e.g. identical +- clearly document that you don't care about compatibility (e.g. identical behavior on all supported platforms) or quality (in case you use an unaproved build system) diff -Nru cdrtools-2.01.01a33/cdrecord/Makefile cdrtools-3.02a09/cdrecord/Makefile --- cdrtools-2.01.01a33/cdrecord/Makefile 2007-07-03 22:45:19.000000000 +0000 +++ cdrtools-3.02a09/cdrecord/Makefile 2013-04-21 18:10:14.000000000 +0000 @@ -1,4 +1,4 @@ -#ident @(#)Makefile 1.43 07/07/04 Copyr 1995-2007 J. Schilling +#ident @(#)Makefile 1.53 13/04/21 Copyr 1995-2013 J. Schilling ########################################################################### SRCROOT= .. RULESDIR= RULES @@ -7,15 +7,24 @@ INSDIR= bin TARGET= cdrecord +INSMODE= 4711 +INSUSR= root +CPPOPTS += -I../libscg CPPOPTS += -I../libedc +CPPOPTS += -I../libcdrdeflt +CPPOPTS += -DCDRECORD # Signal that we compile cdrecord +CPPOPTS += -DDVD_MULTI CPPOPTS += -DDRV_DVD CPPOPTS += -DDRV_BD CPPOPTS += -DFIFO CPPOPTS += -DAUINFO CPPOPTS += -DHAVE_LIB_EDC_ECC CPPOPTS += -DCLONE_WRITE +CPPOPTS += -DVENDOR_CMDS CPPOPTS += -DUSE_LARGEFILES CPPOPTS += -DSCHILY_PRINT +CPPOPTS += -DINS_BASE=\"${INS_BASE}\" +CPPOPTS += -DTEXT_DOMAIN=\"SCHILY_cdrtools\" CFILES= cdrecord.c \ cd_misc.c fifo.c isosize.c audiosize.c auinfo.c \ @@ -24,25 +33,28 @@ wm_session.c wm_track.c wm_packet.c \ sector.c clone.c \ movesect.c subchan.c cdtext.c \ - defaults.c \ cdr_drv.c \ drv_philips.c drv_sony.c drv_jvc.c drv_7501.c drv_mmc.c \ drv_dvd.c drv_dvdplus.c \ drv_bd.c \ drv_simul.c \ + vendor.c \ scsi_scan.c scsi_cdr.c scsi_cdr_mmc4.c scsi_mmc.c scsi_mmc4.c \ scsilog.c \ - modes.c misc.c crc16.c xio.c + misc.c crc16.c xio.c priv.c HFILES= cdrecord.h iso9660.h auheader.h cdtext.h \ crc16.h movesect.h mmcvendor.h scsi_scan.h \ scsimmc.h \ scsilog.h adip.h \ xio.h \ - defaults.h version.h \ - ../include/scg/scgio.h ../include/scg/scsidefs.h \ + version.h +HFILES_TAG= ../include/scg/scgio.h ../include/scg/scsidefs.h \ ../include/scg/scsireg.h ../include/scg/scsitransp.h #LIBS= -lschily $(LIB_SOCKET) -LIBS= -lrscg -lscg $(LIB_VOLMGT) -ledc_ecc -ldeflt -lschily $(SCSILIB) $(LIB_SOCKET) +# +# LIB_CAP is needed for Linux capability support in librscg. +# +LIBS= -lscgcmd -lrscg -lscg $(LIB_VOLMGT) -ledc_ecc -lcdrdeflt -ldeflt -lschily $(SCSILIB) $(LIB_SOCKET) $(LIB_INTL) $(LIB_CAP) XMK_FILE= Makefile.man Makefile.dfl Makefile.doc diff -Nru cdrtools-2.01.01a33/cdrecord/Makefile.dfl cdrtools-3.02a09/cdrecord/Makefile.dfl --- cdrtools-2.01.01a33/cdrecord/Makefile.dfl 2005-08-09 13:18:27.000000000 +0000 +++ cdrtools-3.02a09/cdrecord/Makefile.dfl 2010-05-14 18:14:37.000000000 +0000 @@ -1,4 +1,4 @@ -#ident @(#)Makefile.dfl 1.1 05/08/09 +#ident @(#)Makefile.dfl 1.5 10/05/14 ########################################################################### # Sample makefile for installing non-localized auxiliary files ########################################################################### @@ -7,14 +7,14 @@ include $(SRCROOT)/$(RULESDIR)/rules.top ########################################################################### +INSMODE= 0644 INSDIR= etc/default +INSBASE= $(INS_RBASE:%/=%) +INSFLAGS= -noclobber TARGET= cdrecord +AUXSRCEXT= .dfl #XMK_FILE= Makefile.man ########################################################################### include $(SRCROOT)/$(RULESDIR)/rules.aux ########################################################################### - -PTARGET= cdrecord.dfl -cdrecord: cdrecord.dfl - : diff -Nru cdrtools-2.01.01a33/cdrecord/misc.c cdrtools-3.02a09/cdrecord/misc.c --- cdrtools-2.01.01a33/cdrecord/misc.c 2006-09-13 15:35:12.000000000 +0000 +++ cdrtools-3.02a09/cdrecord/misc.c 2014-02-17 22:57:38.000000000 +0000 @@ -1,12 +1,13 @@ -/* @(#)misc.c 1.5 06/09/13 Copyright 1998, 2001-2004 J. Schilling */ +/* @(#)misc.c 1.9 14/02/17 Copyright 1998, 2001-2014 J. Schilling */ +#include #ifndef lint -static char sccsid[] = - "@(#)misc.c 1.5 06/09/13 Copyright 1998, 2001-2004 J. Schilling"; +static UConst char sccsid[] = + "@(#)misc.c 1.9 14/02/17 Copyright 1998, 2001-2014 J. Schilling"; #endif /* * Misc support functions * - * Copyright (c) 1998, 2001-2004 J. Schilling + * Copyright (c) 1998, 2001-2014 J. Schilling */ /* * The contents of this file are subject to the terms of the @@ -15,6 +16,8 @@ * with the License. * * See the file CDDL.Schily.txt in this distribution for details. + * A copy of the CDDL is also available via the Internet at + * http://www.opensource.org/licenses/cddl1.txt * * When distributing Covered Code, include this CDDL HEADER in each * file and include the License file CDDL.Schily.txt from this distribution. @@ -22,7 +25,7 @@ #include #include -#include +#include #include #include @@ -73,6 +76,11 @@ * We need to cast timeval->* to long because * of the broken sys/time.h in Linux. */ - printf("%s%4ld.%03lds\n", fmt, (long)tv.tv_sec, (long)tv.tv_usec/1000); + printf("%s%4ld.%03lds (%2.2ld:%2.2ld:%2.2ld.%3.3ld)\n", + fmt, + (long)tv.tv_sec, (long)tv.tv_usec/1000, + (long)tv.tv_sec/3600, + (long)(tv.tv_sec/60)%60, + (long)tv.tv_sec%60, (long)tv.tv_usec/1000); flush(); } diff -Nru cdrtools-2.01.01a33/cdrecord/modes.c cdrtools-3.02a09/cdrecord/modes.c --- cdrtools-2.01.01a33/cdrecord/modes.c 2006-09-13 15:35:12.000000000 +0000 +++ cdrtools-3.02a09/cdrecord/modes.c 1970-01-01 00:00:00.000000000 +0000 @@ -1,296 +0,0 @@ -/* @(#)modes.c 1.26 06/09/13 Copyright 1988, 1997-2001, 2004 J. Schilling */ -#ifndef lint -static char sccsid[] = - "@(#)modes.c 1.26 06/09/13 Copyright 1988, 1997-2001, 2004 J. Schilling"; -#endif -/* - * SCSI mode page handling - * - * Copyright (c) 1988, 1997-2001, 2004 J. Schilling - */ -/* - * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. - * - * See the file CDDL.Schily.txt in this distribution for details. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file CDDL.Schily.txt from this distribution. - */ - -#include -#include -#include -#include -#include -#include -#include - -#include "cdrecord.h" - -EXPORT int scsi_compliant; - -LOCAL BOOL has_mode_page __PR((SCSI *scgp, int page, char *pagename, int *lenp)); -EXPORT BOOL get_mode_params __PR((SCSI *scgp, int page, char *pagename, - Uchar *modep, Uchar *cmodep, - Uchar *dmodep, Uchar *smodep, - int *lenp)); -EXPORT BOOL set_mode_params __PR((SCSI *scgp, char *pagename, Uchar *modep, - int len, int save, int secsize)); - -#define XXX - -#ifdef XXX -LOCAL BOOL -has_mode_page(scgp, page, pagename, lenp) - SCSI *scgp; - int page; - char *pagename; - int *lenp; -{ - Uchar mode[0x100]; - int hdlen; - int len = 1; /* Nach SCSI Norm */ - int try = 0; - struct scsi_mode_page_header *mp; - - /* - * ATAPI drives (used e.g. by IOMEGA) from y2k have the worst firmware - * I've seen. They create DMA buffer overruns if we request less than - * 3 bytes with 6 byte mode sense which equals 4 byte with 10 byte mode - * sense. In order to prevent repeated bus resets, we remember this - * bug. - * - * IOMEGA claims that they are using Philips clone drives but a Philips - * drive I own does not have the problem. - */ - if ((scgp->dflags & DRF_MODE_DMA_OVR) != 0) - len = sizeof (struct scsi_mode_header); -again: - fillbytes((caddr_t)mode, sizeof (mode), '\0'); - if (lenp) - *lenp = 0; - - scgp->silent++; - (void) unit_ready(scgp); -/* Maxoptix bringt Aborted cmd 0x0B mit code 0x4E (overlapping cmds)*/ - - /* - * The Matsushita CW-7502 will sometimes deliver a zeroed - * mode page 2A if "Page n default" is used instead of "current". - */ - if (mode_sense(scgp, mode, len, page, 0) < 0) { /* Page n current */ - scgp->silent--; - if (len < (int)sizeof (struct scsi_mode_header) && try == 0) { - len = sizeof (struct scsi_mode_header); - goto again; - } - return (FALSE); - } else { - if (len > 1 && try == 0) { - /* - * If we come here, we got a hard failure with the - * fist try. Remember this (IOMEGA USB) firmware bug. - */ - if ((scgp->dflags & DRF_MODE_DMA_OVR) == 0) { - /* XXX if (!nowarn) */ - errmsgno(EX_BAD, - "Warning: controller creates hard SCSI failure when retrieving %s page.\n", - pagename); - scgp->dflags |= DRF_MODE_DMA_OVR; - } - } - len = ((struct scsi_mode_header *)mode)->sense_data_len + 1; - } - /* - * ATAPI drives as used by IOMEGA may receive a SCSI bus device reset - * in between these two mode sense commands. - */ - (void) unit_ready(scgp); - if (mode_sense(scgp, mode, len, page, 0) < 0) { /* Page n current */ - scgp->silent--; - return (FALSE); - } - scgp->silent--; - - if (scgp->verbose) - scg_prbytes("Mode Sense Data", mode, len - scg_getresid(scgp)); - hdlen = sizeof (struct scsi_mode_header) + - ((struct scsi_mode_header *)mode)->blockdesc_len; - mp = (struct scsi_mode_page_header *)(mode + hdlen); - if (scgp->verbose) - scg_prbytes("Mode Page Data", (Uchar *)mp, mp->p_len+2); - - if (mp->p_len == 0) { - if (!scsi_compliant && try == 0) { - len = hdlen; - /* - * add sizeof page header (page # + len byte) - * (should normaly result in len == 14) - * this allowes to work with: - * Quantum Q210S (wants at least 13) - * MD2x (wants at least 4) - */ - len += 2; - try++; - goto again; - } - /* XXX if (!nowarn) */ - errmsgno(EX_BAD, - "Warning: controller returns zero sized %s page.\n", - pagename); - } - if (!scsi_compliant && - (len < (int)(mp->p_len + hdlen + 2))) { - len = mp->p_len + hdlen + 2; - - /* XXX if (!nowarn) */ - errmsgno(EX_BAD, - "Warning: controller returns wrong size for %s page.\n", - pagename); - } - if (mp->p_code != page) { - /* XXX if (!nowarn) */ - errmsgno(EX_BAD, - "Warning: controller returns wrong page %X for %s page (%X).\n", - mp->p_code, pagename, page); - return (FALSE); - } - - if (lenp) - *lenp = len; - return (mp->p_len > 0); -} -#endif - -EXPORT BOOL -get_mode_params(scgp, page, pagename, modep, cmodep, dmodep, smodep, lenp) - SCSI *scgp; - int page; - char *pagename; - Uchar *modep; - Uchar *cmodep; - Uchar *dmodep; - Uchar *smodep; - int *lenp; -{ - int len; - BOOL ret = TRUE; - -#ifdef XXX - if (lenp) - *lenp = 0; - if (!has_mode_page(scgp, page, pagename, &len)) { - if (!scgp->silent) errmsgno(EX_BAD, - "Warning: controller does not support %s page.\n", - pagename); - return (FALSE); - } - if (lenp) - *lenp = len; -#else - if (lenp == 0) - len = 0xFF; -#endif - - if (modep) { - fillbytes(modep, 0x100, '\0'); - scgp->silent++; - (void) unit_ready(scgp); - scgp->silent--; - if (mode_sense(scgp, modep, len, page, 0) < 0) { /* Page x current */ - errmsgno(EX_BAD, "Cannot get %s data.\n", pagename); - ret = FALSE; - } else if (scgp->verbose) { - scg_prbytes("Mode Sense Data", modep, len - scg_getresid(scgp)); - } - } - - if (cmodep) { - fillbytes(cmodep, 0x100, '\0'); - scgp->silent++; - (void) unit_ready(scgp); - scgp->silent--; - if (mode_sense(scgp, cmodep, len, page, 1) < 0) { /* Page x change */ - errmsgno(EX_BAD, "Cannot get %s mask.\n", pagename); - ret = FALSE; - } else if (scgp->verbose) { - scg_prbytes("Mode Sense Data", cmodep, len - scg_getresid(scgp)); - } - } - - if (dmodep) { - fillbytes(dmodep, 0x100, '\0'); - scgp->silent++; - (void) unit_ready(scgp); - scgp->silent--; - if (mode_sense(scgp, dmodep, len, page, 2) < 0) { /* Page x default */ - errmsgno(EX_BAD, "Cannot get default %s data.\n", - pagename); - ret = FALSE; - } else if (scgp->verbose) { - scg_prbytes("Mode Sense Data", dmodep, len - scg_getresid(scgp)); - } - } - - if (smodep) { - fillbytes(smodep, 0x100, '\0'); - scgp->silent++; - (void) unit_ready(scgp); - scgp->silent--; - if (mode_sense(scgp, smodep, len, page, 3) < 0) { /* Page x saved */ - errmsgno(EX_BAD, "Cannot get saved %s data.\n", pagename); - ret = FALSE; - } else if (scgp->verbose) { - scg_prbytes("Mode Sense Data", smodep, len - scg_getresid(scgp)); - } - } - - return (ret); -} - -EXPORT BOOL -set_mode_params(scgp, pagename, modep, len, save, secsize) - SCSI *scgp; - char *pagename; - Uchar *modep; - int len; - int save; - int secsize; -{ - int i; - - ((struct scsi_modesel_header *)modep)->sense_data_len = 0; - ((struct scsi_modesel_header *)modep)->res2 = 0; - - i = ((struct scsi_mode_header *)modep)->blockdesc_len; - if (i > 0) { - i_to_3_byte( - ((struct scsi_mode_data *)modep)->blockdesc.nlblock, - 0); - if (secsize >= 0) - i_to_3_byte(((struct scsi_mode_data *)modep)->blockdesc.lblen, - secsize); - } - - scgp->silent++; - (void) unit_ready(scgp); - scgp->silent--; - if (save == 0 || mode_select(scgp, modep, len, save, scgp->inq->data_format >= 2) < 0) { - scgp->silent++; - (void) unit_ready(scgp); - scgp->silent--; - if (mode_select(scgp, modep, len, 0, scgp->inq->data_format >= 2) < 0) { - if (scgp->silent == 0) { - errmsgno(EX_BAD, - "Warning: using default %s data.\n", - pagename); - scg_prbytes("Mode Select Data", modep, len); - } - return (FALSE); - } - } - return (TRUE); -} diff -Nru cdrtools-2.01.01a33/cdrecord/movesect.c cdrtools-3.02a09/cdrecord/movesect.c --- cdrtools-2.01.01a33/cdrecord/movesect.c 2006-09-13 15:35:12.000000000 +0000 +++ cdrtools-3.02a09/cdrecord/movesect.c 2009-07-05 18:02:22.000000000 +0000 @@ -1,10 +1,11 @@ -/* @(#)movesect.c 1.4 06/09/13 Copyright 2001, 2004 J. Schilling */ +/* @(#)movesect.c 1.6 09/07/05 Copyright 2001, 2004-2009 J. Schilling */ +#include #ifndef lint -static char sccsid[] = - "@(#)movesect.c 1.4 06/09/13 Copyright 2001, 2004 J. Schilling"; +static UConst char sccsid[] = + "@(#)movesect.c 1.6 09/07/05 Copyright 2001, 2004-2009 J. Schilling"; #endif /* - * Copyright (c) 2001, 2004 J. Schilling + * Copyright (c) 2001, 2004-2009 J. Schilling */ /* * The contents of this file are subject to the terms of the diff -Nru cdrtools-2.01.01a33/cdrecord/priv.c cdrtools-3.02a09/cdrecord/priv.c --- cdrtools-2.01.01a33/cdrecord/priv.c 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/cdrecord/priv.c 2013-10-12 13:56:16.000000000 +0000 @@ -0,0 +1,497 @@ +/* @(#)priv.c 1.4 13/10/12 Copyright 2006-2013 J. Schilling */ +#include +#ifndef lint +static UConst char sccsid[] = + "@(#)priv.c 1.4 13/10/12 Copyright 2006-2013 J. Schilling"; +#endif +/* + * Cdrecord support functions to support fine grained privileges. + * + * Copyright (c) 2006-2013 J. Schilling + */ +/* + * The contents of this file are subject to the terms of the + * Common Development and Distribution License, Version 1.0 only + * (the "License"). You may not use this file except in compliance + * with the License. + * + * See the file CDDL.Schily.txt in this distribution for details. + * A copy of the CDDL is also available via the Internet at + * http://www.opensource.org/licenses/cddl1.txt + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file CDDL.Schily.txt from this distribution. + */ + +#include +#include +#include +#include +#include +#include + +#ifdef HAVE_LINUX_CAPS +#define NCAPS (sizeof (caplist) / sizeof (caplist[0])) +#endif + +#ifdef CDDA2WAV +EXPORT void priv_init __PR((void)); +EXPORT void priv_on __PR((void)); +EXPORT void priv_off __PR((void)); +#endif +#if defined(CDRECORD) || defined(READCD) +EXPORT void priv_drop __PR((void)); +EXPORT BOOL priv_from_priv __PR((void)); +#endif +EXPORT BOOL priv_eff_priv __PR((int pname)); +#ifdef HAVE_SOLARIS_PPRIV +LOCAL BOOL priv_eff __PR((const char *pname)); +#endif +#ifdef HAVE_LINUX_CAPS +LOCAL BOOL priv_eff __PR((int pname)); +#endif + +#ifdef HAVE_SOLARIS_PPRIV +EXPORT void do_pfexec __PR((int ac, char *av[], ...)); +#endif + +/* + * Solaris uses the advanced privileges(5) mechanism for fine grained + * prilileges. + * + * The following Solaris privileges are needed by cdrecord: + * + * PRIV_FILE_DAC_READ only to open /dev/ nodes for USCSICMD + * PRIV_FILE_DAC_WRITE in addition to open /dev/scg* for SCGIO_CMD + * PRIV_SYS_DEVICES during whole runtime: for USCSICMD + * PRIV_PROC_LOCK_MEMORY only to call mlockall() + * PRIV_PROC_PRIOCNTL only to call priocntl() + * PRIV_NET_PRIVADDR only to create privileged socket (remote SCSI) + * + * + * The POSIX.1e draft has been withdrawn in 1997. + * Linux started to implement this outdated concept in 1997. + * + * The following Linux capabilities are needed by cdrecord: + * + * CAP_DAC_OVERRIDE only to open /dev/ nodes + * CAP_NET_BIND_SERVICE only to create privileged socket (remote SCSI) + * CAP_IPC_LOCK only to call mlockall() + * CAP_SYS_RAWIO during whole runtime: for SCSI commands + * CAP_SYS_ADMIN during whole runtime: for SCSI commands + * CAP_SYS_NICE only to call sched_*() and setpriority() + * CAP_SYS_RESOURCE only to support mlockall() + * + * Use: + * setcap cap_sys_resource,cap_dac_override,cap_sys_admin,cap_sys_nice,cap_net_bind_service,cap_ipc_lock,cap_sys_rawio+ep cdrecord + * to set the capabilities for the executable file. + */ + +#ifdef CDDA2WAV +/* + * Initial removal of privileges: + * - remove all inheritable additional privileges + * - Remove all effective privileges that are not needed all the time + */ +EXPORT void +priv_init() +{ +#ifdef HAVE_PRIV_SET + /* + * Give up privs we do not need anymore. + * We no longer need: + * file_dac_read,sys_devices,proc_priocntl,net_privaddr + */ + priv_set(PRIV_OFF, PRIV_EFFECTIVE, + PRIV_FILE_DAC_READ, PRIV_PROC_PRIOCNTL, + PRIV_NET_PRIVADDR, NULL); + priv_set(PRIV_OFF, PRIV_INHERITABLE, + PRIV_FILE_DAC_READ, PRIV_PROC_PRIOCNTL, + PRIV_NET_PRIVADDR, PRIV_SYS_DEVICES, NULL); +#else +#ifdef HAVE_LINUX_CAPS + /* + * Give up privs we do not need for the moment. + * We no longer need: + * cap_dac_override,cap_net_bind_service,cap_sys_nice + */ + cap_t cset; + cap_value_t caplist[] = { + CAP_DAC_OVERRIDE, + CAP_NET_BIND_SERVICE, + CAP_SYS_NICE, + CAP_SYS_RAWIO, /* Keep as CAP_EFFECTIVE */ + CAP_SYS_ADMIN /* Keep as CAP_EFFECTIVE */ + }; + + cset = cap_get_proc(); + + cap_set_flag(cset, CAP_EFFECTIVE, NCAPS-2, caplist, CAP_CLEAR); + cap_set_flag(cset, CAP_INHERITABLE, NCAPS, caplist, CAP_CLEAR); + if (cap_set_proc(cset) < 0) + errmsg("Cannot set initial process capabilities.\n"); +#endif /* HAVE_LINUX_CAPS */ +#endif /* HAVE_PRIV_SET */ +} + +/* + * Get back those effective privileges that are needed for parts of the time + */ +EXPORT void +priv_on() +{ +#ifdef HAVE_PRIV_SET + /* + * Get back privs we may need now. + * We need: + * file_dac_read,sys_devices,proc_priocntl,net_privaddr + */ + priv_set(PRIV_ON, PRIV_EFFECTIVE, + PRIV_FILE_DAC_READ, PRIV_PROC_PRIOCNTL, + PRIV_NET_PRIVADDR, NULL); +#else +#ifdef HAVE_LINUX_CAPS + /* + * Get back privs we may need now. + * We need: + * cap_dac_override,cap_net_bind_service,cap_sys_nice + */ + cap_t cset; + cap_value_t caplist[] = { + CAP_DAC_OVERRIDE, + CAP_NET_BIND_SERVICE, + CAP_SYS_NICE + }; + + cset = cap_get_proc(); + + cap_set_flag(cset, CAP_EFFECTIVE, NCAPS, caplist, CAP_SET); + if (cap_set_proc(cset) < 0) + errmsg("Cannot regain process capabilities.\n"); +#endif /* HAVE_LINUX_CAPS */ +#endif /* HAVE_PRIV_SET */ +} + +/* + * Get rid of those effective privileges that are needed for parts of the time + */ +EXPORT void +priv_off() +{ +#ifdef HAVE_PRIV_SET + /* + * Give up privs we do not need at the moment. + * We no longer need: + * file_dac_read,sys_devices,proc_priocntl,net_privaddr + */ + priv_set(PRIV_OFF, PRIV_EFFECTIVE, + PRIV_FILE_DAC_READ, PRIV_PROC_PRIOCNTL, + PRIV_NET_PRIVADDR, NULL); +#else +#ifdef HAVE_LINUX_CAPS + /* + * Give up privs we do not need anymore. + * We no longer need: + * cap_dac_override,cap_net_bind_service,cap_sys_nice + */ + cap_t cset; + cap_value_t caplist[] = { + CAP_DAC_OVERRIDE, + CAP_NET_BIND_SERVICE, + CAP_SYS_NICE + }; + + cset = cap_get_proc(); + + cap_set_flag(cset, CAP_EFFECTIVE, NCAPS, caplist, CAP_CLEAR); + if (cap_set_proc(cset) < 0) + errmsg("Cannot deactivate process capabilities.\n"); +#endif /* HAVE_LINUX_CAPS */ +#endif /* HAVE_PRIV_SET */ +} +#endif /* CDDA2WAV */ + +#if defined(CDRECORD) || defined(READCD) +/* + * Drop all privileges that are no longer needed after startup + */ +EXPORT void +priv_drop() +{ +#ifdef HAVE_PRIV_SET +#ifdef PRIVILEGES_DEBUG /* PRIV_DEBUG is defined in */ + error("file_dac_read: %d\n", priv_ineffect(PRIV_FILE_DAC_READ)); +#endif + /* + * Give up privs we do not need anymore. + * We no longer need: + * file_dac_read,proc_lock_memory,proc_priocntl,net_privaddr + * We still need: + * sys_devices + */ + priv_set(PRIV_OFF, PRIV_EFFECTIVE, + PRIV_FILE_DAC_READ, PRIV_PROC_LOCK_MEMORY, + PRIV_PROC_PRIOCNTL, PRIV_NET_PRIVADDR, NULL); + priv_set(PRIV_OFF, PRIV_PERMITTED, + PRIV_FILE_DAC_READ, PRIV_PROC_LOCK_MEMORY, + PRIV_PROC_PRIOCNTL, PRIV_NET_PRIVADDR, NULL); + priv_set(PRIV_OFF, PRIV_INHERITABLE, + PRIV_FILE_DAC_READ, PRIV_PROC_LOCK_MEMORY, + PRIV_PROC_PRIOCNTL, PRIV_NET_PRIVADDR, PRIV_SYS_DEVICES, NULL); +#else +#ifdef HAVE_LINUX_CAPS + /* + * Give up privs we do not need anymore. + * We no longer need: + * cap_dac_override,cap_net_bind_service,cap_ipc_lock,cap_sys_nice,cap_sys_resource + * We still need: + * cap_sys_rawio,cap_sys_admin + */ + cap_t cset; + cap_value_t caplist[] = { + CAP_DAC_OVERRIDE, + CAP_NET_BIND_SERVICE, + CAP_IPC_LOCK, + CAP_SYS_NICE, + CAP_SYS_RESOURCE + }; + + cset = cap_get_proc(); + + cap_set_flag(cset, CAP_EFFECTIVE, NCAPS, caplist, CAP_CLEAR); + cap_set_flag(cset, CAP_INHERITABLE, NCAPS, caplist, CAP_CLEAR); + cap_set_flag(cset, CAP_PERMITTED, NCAPS, caplist, CAP_CLEAR); + if (cap_set_proc(cset) < 0) + errmsg("Cannot drop process capabilities.\n"); +#endif /* HAVE_LINUX_CAPS */ +#endif /* HAVE_PRIV_SET */ +} + +/* + * Return TRUE if we have privileges that are not from a suid-root operation. + */ +EXPORT BOOL +priv_from_priv() +{ +#ifdef HAVE_PRIV_SET + return (priv_ineffect(PRIV_FILE_DAC_READ) && + !priv_ineffect(PRIV_PROC_SETID)); +#else +#ifdef HAVE_LINUX_CAPS + cap_t cset; + cap_flag_value_t val = CAP_CLEAR; + + cset = cap_get_proc(); + + cap_get_flag(cset, CAP_DAC_OVERRIDE, CAP_EFFECTIVE, &val); + if (val == CAP_CLEAR) + return (FALSE); + val = CAP_SET; + cap_get_flag(cset, CAP_SETUID, CAP_EFFECTIVE, &val); + if (val == CAP_SET) + return (FALSE); + return (TRUE); + +#else /* HAVE_LINUX_CAPS */ + return (FALSE); +#endif /* HAVE_LINUX_CAPS */ +#endif /* HAVE_PRIV_SET */ +} +#endif /* defined(CDRECORD) || defined(READCD) */ + +/* + * An attempt to implement an abstraction layer to detect fine grained + * privileges. This is not implemented in an efficient way (there are multiple + * syscalls to fetch the privileges from the kernel) but a few milliseconds + * should not count. + */ +EXPORT BOOL +priv_eff_priv(pname) + int pname; +{ +#if !defined(HAVE_SETEUID) || !defined(HAVE_GETEUID) + return (TRUE); +#else +#ifdef HAVE_SOLARIS_PPRIV +#define DID_PRIV + switch (pname) { + + case SCHILY_PRIV_FILE_DAC_READ: + return (priv_eff(PRIV_FILE_DAC_READ)); + case SCHILY_PRIV_FILE_DAC_WRITE: + return (priv_eff(PRIV_FILE_DAC_WRITE)); + case SCHILY_PRIV_SYS_DEVICES: + return (priv_eff(PRIV_SYS_DEVICES)); + case SCHILY_PRIV_PROC_LOCK_MEMORY: + return (priv_eff(PRIV_PROC_LOCK_MEMORY)); + case SCHILY_PRIV_PROC_PRIOCNTL: + return (priv_eff(PRIV_PROC_PRIOCNTL)); + case SCHILY_PRIV_NET_PRIVADDR: + return (priv_eff(PRIV_NET_PRIVADDR)); + } +#endif +#ifdef HAVE_LINUX_CAPS +#define DID_PRIV + switch (pname) { + + case SCHILY_PRIV_FILE_DAC_READ: + return (priv_eff(CAP_DAC_READ_SEARCH) || priv_eff(CAP_DAC_OVERRIDE)); + case SCHILY_PRIV_FILE_DAC_WRITE: + return (priv_eff(CAP_DAC_OVERRIDE)); + case SCHILY_PRIV_SYS_DEVICES: + return (priv_eff(CAP_SYS_RAWIO) && priv_eff(CAP_SYS_ADMIN)); + case SCHILY_PRIV_PROC_LOCK_MEMORY: + return (priv_eff(CAP_IPC_LOCK) && priv_eff(CAP_SYS_RESOURCE)); + case SCHILY_PRIV_PROC_PRIOCNTL: + return (priv_eff(CAP_SYS_NICE)); + case SCHILY_PRIV_NET_PRIVADDR: + return (priv_eff(CAP_NET_BIND_SERVICE)); + } +#endif + +#ifndef DID_PRIV + if (geteuid() == 0) + return (TRUE); +#endif + return (FALSE); +#endif +} + +#ifdef HAVE_SOLARIS_PPRIV +LOCAL BOOL +priv_eff(pname) + const char *pname; +{ + return (priv_ineffect(pname)); +} +#endif + +#ifdef HAVE_LINUX_CAPS +LOCAL BOOL +priv_eff(pname) + int pname; +{ + cap_t cset; + cap_flag_value_t val = CAP_CLEAR; + + cset = cap_get_proc(); + cap_get_flag(cset, pname, CAP_EFFECTIVE, &val); + if (val == CAP_CLEAR) + return (FALSE); + return (TRUE); +} +#endif + +#ifdef HAVE_SOLARIS_PPRIV +#include +/* + * Allow to compile binaries that work on Solaris 11 build 140 and later + * as well as for older Solaris versions. + * If getpflags(PRIV_PFEXEC) fails, we have no in-kernel pfexec() and we + * just do nothing. + */ +#ifndef PRIV_PFEXEC +#define PRIV_PFEXEC 0x0100 +#endif +/* + * If PRIV_PFEXEC is defined, we have an in-kernel pfexec() that allows + * suid-root less installation and let programs gain the needed additional + * privileges even without a wrapper script. + */ +/* VARARGS2 */ +#ifdef PROTOTYPES +EXPORT void +do_pfexec(int ac, char *av[], ...) +#else +EXPORT void +do_pfexec(ac, av, va_list) + int ac; + char *av[]; + va_decl +#endif +{ +#ifdef PRIV_PFEXEC + va_list args; + BOOL priv_ok = TRUE; + priv_set_t *pset; + int oflag; + char *av0; + const char *priv; + + /* + * Avoid looping over execv(). + * Return if we see our modified argv[0]. + * If the first character of the last name component is a '+', + * just leave it as it is. We cannot restore the original character + * in this case. If it is an uppercase character, we assume + * that it was a translated lowercace character from our execv(). + */ + av0 = strrchr(av[0], '/'); + if (av0 == NULL) + av0 = av[0]; + else + av0++; + if (*av0 == '+') + return; + if (*av0 >= 'A' && *av0 <= 'Z') { + *av0 = *av0 + 'a' - 'A'; + return; + } + + /* + * Check for the current privileges. + * Silently abort attempting to gain more privileges + * in case any error occurs. + */ + pset = priv_allocset(); + if (pset == NULL) + return; + if (getppriv(PRIV_EFFECTIVE, pset) < 0) + return; + + /* + * If we already have the needed privileges, we are done. + */ +#ifdef PROTOTYPES + va_start(args, av); +#else + va_start(args); +#endif + while (priv_ok && (priv = va_arg(args, const char *)) != NULL) { + if (!priv_ismember(pset, priv)) + priv_ok = FALSE; + } + va_end(args); + priv_freeset(pset); + if (priv_ok) + return; + + oflag = getpflags(PRIV_PFEXEC); + if (oflag < 0) /* Pre kernel-pfexec system? */ + return; + if (oflag == 0) { /* Kernel pfexec flag not yet set? */ + /* + * Set kernel pfexec flag. + * Return if this doesn't work for some reason. + */ + if (setpflags(PRIV_PFEXEC, 1) != 0) { + return; + } + } + /* + * Modify argv[0] to mark that we did already call execv(). + * This is done in order to avoid infinite execv() loops caused by + * a missconfigured security system in /etc/security. + * + * In the usual case (a lowercase letter in the firsh character of the + * last pathname component), convert it to an uppercase character. + * Otherwise overwrite this character by a '+' sign. + */ + if (*av0 >= 'a' && *av0 <= 'z') + *av0 = *av0 - 'a' + 'A'; + else + *av0 = '+'; + execv(getexecname(), av); +#endif /* PRIV_PFEXEC */ +} +#endif diff -Nru cdrtools-2.01.01a33/cdrecord/README cdrtools-3.02a09/cdrecord/README --- cdrtools-2.01.01a33/cdrecord/README 2002-12-25 17:03:10.000000000 +0000 +++ cdrtools-3.02a09/cdrecord/README 2016-08-10 21:07:58.000000000 +0000 @@ -1,4 +1,4 @@ -# @(#)README 1.25 02/12/25 Copyright 1996-2002 J. Schilling +# @(#)README 1.28 16/08/10 Copyright 1996-2002 J. Schilling This is Version 2.0 of cdrecord @@ -45,8 +45,9 @@ To learn how to compile and install cdrecord, read README.compile To compile on currently unknown platforms you definitely need 'smake' -from ftp.berlios.de/pub/smake or ftp.berlios.de/pub/smake -GNUmake is too dump to do this job as it does not include automake features +from https://sourceforge.net/projects/s-make/files/ or +https://sourceforge.net/projects/schilytools/files/ +GNUmake is too dumb to do this job as it does not include automake features like 'smake' does. For multi session please read README.multi @@ -388,9 +389,9 @@ The files are located on: -ftp://ftp.berlios.de/pub/cdrecord/ ... -ftp://ftp.berlios.de/pub/schily/kernel/scg/ ... -ftp://ftp.berlios.de/pub/schily/kernel/fbk/ ... +https://sourceforge.net/projects/cdrtools/files/ ... +https://sourceforge.net/projects/schilytools/files/kernel/scg/ ... +https://sourceforge.net/projects/schilytools/files/kernel/fbk/ ... Only use the mkisofs that is contained in this release. All other mkisofs versions are too buggy. @@ -430,7 +431,8 @@ (two years before Sun introduced their format utility). Sformat source including 10 years of competence in SCSI disk handling is available on: - ftp://ftp.berlios.de/pub/sformat + https://sourceforge.net/projects/schilytools/files/sformat/ + https://sourceforge.net/projects/schilytools/files/schily-* I am interested to hear if someone is interested in a kernel based filesystem for Solaris that uses packet writing on the CD-Recorder. @@ -442,11 +444,11 @@ If you want to use the CD-recorder as CD-ROM device, have a look at Solaris only: -ftp://ftp.berlios.de/pub/schily/kernel/sd +https://sourceforge.net/projects/schilytools/files/kernel/sd/ Current information on cdrecord may be found on: - http://www.fokus.fhg.de/research/cc/glone/employees/joerg.schilling/private/cdrecord.html + http://cdrecord.org/private/cdrecord.html Joerg Schilling @@ -455,6 +457,5 @@ If you have questions mail to: - HOME: joerg@schily.isdn.cs.tu-berlin.de - UNIVERSITY: js@cs.tu-berlin.de - WORK: schilling@fokus.fhg.de + HOME: joerg@schily.net + WORK: joerg.schilling@fokus.fraunhofer.de diff -Nru cdrtools-2.01.01a33/cdrecord/README.ATAPI cdrtools-3.02a09/cdrecord/README.ATAPI --- cdrtools-2.01.01a33/cdrecord/README.ATAPI 2005-04-02 11:26:01.000000000 +0000 +++ cdrtools-3.02a09/cdrecord/README.ATAPI 2008-10-12 19:08:13.000000000 +0000 @@ -1,4 +1,4 @@ -# @(#)README.ATAPI 1.5 05/04/02 Copyright 1997-2004 J. Schilling +# @(#)README.ATAPI 1.6 08/10/12 Copyright 1997-2004 J. Schilling People (with a Linux only background) often ask me why do you depend on "ATAPI-SCSI emulation", why don't you support generic IDE? @@ -291,7 +291,7 @@ this would not be needed if the Linux SCSI CD-ROM driver would be more up to date and supports standard conforming drives. -Jörg Schilling +Jörg Schilling -------------------------------------------------- Here is a hint from Alan Brown : diff -Nru cdrtools-2.01.01a33/cdrecord/README.cdplus cdrtools-3.02a09/cdrecord/README.cdplus --- cdrtools-2.01.01a33/cdrecord/README.cdplus 2002-12-09 13:02:41.000000000 +0000 +++ cdrtools-3.02a09/cdrecord/README.cdplus 2009-01-29 22:13:22.000000000 +0000 @@ -3,8 +3,8 @@ that allows you to that on even on systems that don't support a sectorsize 2048 Bytes (e.g. SGI IRIX and old versions of Solaris) or systems that don't support raw device access (e.g. OS/2 W95/W98/WNT). -This is possible because this hacked version of mkisofs -uses my scg driver to read the old session from the CD-Recorder. +This is possible because current versions of mkisofs may +use my scg driver to read the old session from the CD-Recorder. According to www.cd-info.com, a CD+ is a CD with two sessions. The first session is an audio session, the second session a data @@ -29,7 +29,7 @@ To add the second session that contains the data track, you need to create an ISO-9660 file system that starts not at sector 0. -With the current mkisofs (1.12), you must use the following method: +With the current mkisofs, you must use the following method: - First call cdrecord -msinfo for your prepared multi-session audio CD. @@ -64,6 +64,9 @@ or cdrecord -multi cd_plus.raw +Note that most drives do not support to append the data session in SAO mode. +For this reason, it is recommended to add the -tao option to the cdrecord +command line that appends cd_plus.raw to the audio session. Note: If you want to create an HFS hybrid as the data track, then you must use the '-part' option to mkisofs. Otherwise, the data track will be mounted diff -Nru cdrtools-2.01.01a33/cdrecord/README.cdtext cdrtools-3.02a09/cdrecord/README.cdtext --- cdrtools-2.01.01a33/cdrecord/README.cdtext 2002-12-09 13:10:35.000000000 +0000 +++ cdrtools-3.02a09/cdrecord/README.cdtext 2010-04-08 20:29:56.000000000 +0000 @@ -54,7 +54,7 @@ then edit the *.inf Files and add album and song titles. - Now call cdrecord as if the *.nf files contain CD-Text + Now call cdrecord as if the *.inf files contain CD-Text information. Note that it is recommended to use less that 160 characters diff -Nru cdrtools-2.01.01a33/cdrecord/README.verify cdrtools-3.02a09/cdrecord/README.verify --- cdrtools-2.01.01a33/cdrecord/README.verify 2002-12-16 20:53:56.000000000 +0000 +++ cdrtools-3.02a09/cdrecord/README.verify 2014-12-03 19:11:10.000000000 +0000 @@ -11,7 +11,11 @@ If the CD-R device is connected to target 2 on SCSI bus 0 sformat -verify 2 0 - sformat can be found on ftp://ftp.berlios.de/pub/sformat + sformat can be found on + + https://sourceforge.net/projects/schilytools/files/sformat/ + or + https://sourceforge.net/projects/schilytools/files/schily-* NOTE: Not all CD-ROm drives support verifying NOTE: All TAO tracks end in 2 unreadable run-out sectors @@ -27,7 +31,9 @@ If no errors can be found, all files are readable. - star can be found on ftp://ftp.berlios.de/pub/star + star can be found on + + http://sourceforge.net/projects/s-tar/files/ You also may want to compare the filesystem on the CD diff -Nru cdrtools-2.01.01a33/cdrecord/scsi_cdr.c cdrtools-3.02a09/cdrecord/scsi_cdr.c --- cdrtools-2.01.01a33/cdrecord/scsi_cdr.c 2007-07-08 18:37:18.000000000 +0000 +++ cdrtools-3.02a09/cdrecord/scsi_cdr.c 2012-03-15 23:34:36.000000000 +0000 @@ -1,13 +1,14 @@ -/* @(#)scsi_cdr.c 1.150 07/07/08 Copyright 1995-2007 J. Schilling */ +/* @(#)scsi_cdr.c 1.160 12/03/16 Copyright 1995-2012 J. Schilling */ +#include #ifndef lint -static char sccsid[] = - "@(#)scsi_cdr.c 1.150 07/07/08 Copyright 1995-2007 J. Schilling"; +static UConst char sccsid[] = + "@(#)scsi_cdr.c 1.160 12/03/16 Copyright 1995-2012 J. Schilling"; #endif /* * SCSI command functions for cdrecord * covering pre-MMC standard functions up to MMC-2 * - * Copyright (c) 1995-2007 J. Schilling + * Copyright (c) 1995-2012 J. Schilling */ /* * The contents of this file are subject to the terms of the @@ -31,7 +32,7 @@ */ #include -#include +#include #include #include #include @@ -44,6 +45,7 @@ #include #include #include +#include #include #include @@ -192,7 +194,7 @@ ret = test_unit_ready(scgp); /* eat up unit attention */ if (ret < 0) { err = geterrno(); - + if (err == EPERM || err == EACCES) { scgp->silent--; return (FALSE); @@ -382,7 +384,7 @@ if (scg_cmd(scgp) < 0) return (-1); if (scgp->verbose) - scg_prbytes("Inquiry Data :", (Uchar *)bp, cnt - scg_getresid(scgp)); + scg_prbytes(_("Inquiry Data :"), (Uchar *)bp, cnt - scg_getresid(scgp)); return (0); } @@ -436,9 +438,9 @@ kb = dkb; mb = dkb / 1024.0; prmb = dkb / 1000.0 * 1.024; - fprintf(f, "Capacity: %ld Blocks = %ld kBytes = %ld MBytes = %ld prMB\n", + fprintf(f, _("Capacity: %ld Blocks = %ld kBytes = %ld MBytes = %ld prMB\n"), (long)scgp->cap->c_baddr+1, kb, mb, prmb); - fprintf(f, "Sectorsize: %ld Bytes\n", (long)scgp->cap->c_bsize); + fprintf(f, _("Sectorsize: %ld Bytes\n"), (long)scgp->cap->c_bsize); } EXPORT int @@ -1064,7 +1066,7 @@ #ifdef DEBUG if (lverbose > 1) - scg_prbytes("Track info:", (Uchar *)bp, + scg_prbytes(_("Track info:"), (Uchar *)bp, len-scg_getresid(scgp)); #endif return (ret); @@ -1095,7 +1097,7 @@ scmd->cdb.g1_cdb.cmd = 0x53; scmd->cdb.g1_cdb.lun = scg_lun(scgp); - i_to_4_byte(&scmd->cdb.g1_cdb.addr[3], size); + i_to_4_byte(&scmd->cdb.cmd_cdb[5], size); scgp->cmdname = "reserve_track_rzone"; @@ -1343,7 +1345,7 @@ *fp = freespace; if (scgp->verbose || (sp == 0 && fp == 0)) - printf("BFree: %ld K BSize: %ld K\n", freespace >> 10, bufsize >> 10); + printf(_("BFree: %ld K BSize: %ld K\n"), freespace >> 10, bufsize >> 10); if (bufsize == 0) return (0); @@ -1475,7 +1477,7 @@ xmode[5] = 0; i_to_2_byte(&xmode[6], (unsigned int)dp[3]); - if (scgp->verbose) scg_prbytes("Mode Parameters (un-converted)", dp, cnt); + if (scgp->verbose) scg_prbytes(_("Mode Parameters (un-converted)"), dp, cnt); return (mode_select_g1(scgp, xmode, amt, smp, pf)); } @@ -1531,7 +1533,7 @@ len = a_to_u_2_byte(&xmode[6]); dp[3] = len; - if (scgp->verbose) scg_prbytes("Mode Sense Data (converted)", dp, amt); + if (scgp->verbose) scg_prbytes(_("Mode Sense Data (converted)"), dp, amt); return (0); } @@ -1557,8 +1559,8 @@ scmd->cdb.g0_cdb.count = cnt; if (scgp->verbose) { - error("%s ", smp?"Save":"Set "); - scg_prbytes("Mode Parameters", dp, cnt); + error("%s ", smp?_("Save"):_("Set ")); + scg_prbytes(_("Mode Parameters"), dp, cnt); } scgp->cmdname = "mode select g0"; @@ -1588,8 +1590,8 @@ g1_cdblen(&scmd->cdb.g1_cdb, cnt); if (scgp->verbose) { - printf("%s ", smp?"Save":"Set "); - scg_prbytes("Mode Parameters", dp, cnt); + printf("%s ", smp?_("Save"):_("Set ")); + scg_prbytes(_("Mode Parameters"), dp, cnt); } scgp->cmdname = "mode select g1"; @@ -1627,7 +1629,7 @@ if (scg_cmd(scgp) < 0) return (-1); - if (scgp->verbose) scg_prbytes("Mode Sense Data", dp, cnt - scg_getresid(scgp)); + if (scgp->verbose) scg_prbytes(_("Mode Sense Data"), dp, cnt - scg_getresid(scgp)); return (0); } @@ -1659,7 +1661,7 @@ if (scg_cmd(scgp) < 0) return (-1); - if (scgp->verbose) scg_prbytes("Mode Sense Data", dp, cnt - scg_getresid(scgp)); + if (scgp->verbose) scg_prbytes(_("Mode Sense Data"), dp, cnt - scg_getresid(scgp)); return (0); } @@ -1729,7 +1731,7 @@ fillbytes((caddr_t)xb, sizeof (xb), '\0'); if (read_toc(scgp, xb, 0, sizeof (struct tocheader), 0, FMT_TOC) < 0) { if (scgp->silent == 0) - errmsgno(EX_BAD, "Cannot read TOC header\n"); + errmsgno(EX_BAD, _("Cannot read TOC header\n")); return (-1); } len = a_to_u_2_byte(tp->len) + sizeof (struct tocheader)-2; @@ -1757,15 +1759,15 @@ fillbytes((caddr_t)xb, sizeof (xb), '\0'); if (read_toc(scgp, xb, 0, sizeof (struct tocheader), 0, FMT_CDTEXT) < 0) { if (scgp->silent == 0 || scgp->verbose > 0) - errmsgno(EX_BAD, "Cannot read CD-Text header\n"); + errmsgno(EX_BAD, _("Cannot read CD-Text header\n")); return (-1); } len = a_to_u_2_byte(tp->len) + sizeof (struct tocheader)-2; - printf("CD-Text len: %d\n", len); + printf(_("CD-Text len: %d\n"), len); if (read_toc(scgp, xxb, 0, len, 0, FMT_CDTEXT) < 0) { if (scgp->silent == 0) - errmsgno(EX_BAD, "Cannot read CD-Text\n"); + errmsgno(EX_BAD, _("Cannot read CD-Text\n")); return (-1); } { @@ -1788,21 +1790,23 @@ struct diskinfo *dp; char xb[256]; int len; + long off; dp = (struct diskinfo *)xb; fillbytes((caddr_t)xb, sizeof (xb), '\0'); if (read_toc(scgp, xb, track, sizeof (struct diskinfo), 0, FMT_TOC) < 0) { if (scgp->silent <= 0) - errmsgno(EX_BAD, "Cannot read TOC\n"); + errmsgno(EX_BAD, _("Cannot read TOC\n")); return (-1); } len = a_to_u_2_byte(dp->hd.len) + sizeof (struct tocheader)-2; if (len < (int)sizeof (struct diskinfo)) return (-1); + off = a_to_4_byte(dp->desc[0].addr); if (offp) - *offp = a_to_4_byte(dp->desc[0].addr); + *offp = off; if (adrp) *adrp = dp->desc[0].adr; if (controlp) @@ -1821,9 +1825,9 @@ * Some drives (e.g. the Philips CDD-522) don't support * to read the TOC in MSF mode. */ - long off = a_to_4_byte(dp->desc[0].addr); + long moff = a_to_4_byte(dp->desc[0].addr); - lba_to_msf(off, msfp); + lba_to_msf(moff, msfp); } else { msfp->msf_min = 0; msfp->msf_sec = 0; @@ -1843,7 +1847,7 @@ fillbytes((caddr_t)xb, sizeof (xb), '\0'); scgp->silent++; - if (read_header(scgp, xb, *offp, 8, 0) >= 0) { + if (read_header(scgp, xb, off, 8, 0) >= 0) { *modep = xb[0]; } else if (read_track_info_philips(scgp, xb, track, 14) >= 0) { *modep = xb[0xb] & 0xF; @@ -1881,7 +1885,7 @@ return (-1); } if (scgp->verbose) { - scg_prbytes("TOC data: ", (Uchar *)xb, + scg_prbytes(_("TOC data: "), (Uchar *)xb, len > (int)sizeof (xb) - scg_getresid(scgp) ? sizeof (xb) - scg_getresid(scgp) : len); @@ -1889,7 +1893,7 @@ pe = &xb[len]; while ((char *)tp < pe) { - scg_prbytes("ENT: ", (Uchar *)tp, 11); + scg_prbytes(_("ENT: "), (Uchar *)tp, 11); tp++; } } @@ -1916,7 +1920,7 @@ *b0p = l; if (scgp->verbose) - printf("B0 start: %ld\n", l); + printf(_("B0 start: %ld\n"), l); if (isbcd) { l = msf_to_lba(from_bcd(tp->pmin), @@ -1929,7 +1933,7 @@ } if (scgp->verbose) - printf("B0 lout: %ld\n", l); + printf(("B0 lout: %ld\n"), l); if (lop) *lop = l; return (0); @@ -1957,19 +1961,19 @@ return (-1); if (scgp->verbose) - scg_prbytes("tocheader: ", + scg_prbytes(_("tocheader: "), (Uchar *)xb, sizeof (struct tocheader) - scg_getresid(scgp)); len = a_to_u_2_byte(dp->hd.len) + sizeof (struct tocheader)-2; if (len > (int)sizeof (xb)) { - errmsgno(EX_BAD, "Session info too big.\n"); + errmsgno(EX_BAD, _("Session info too big.\n")); return (-1); } if (read_toc(scgp, (caddr_t)xb, 0, len, 0, FMT_SINFO) < 0) return (-1); if (scgp->verbose) - scg_prbytes("tocheader: ", + scg_prbytes(_("tocheader: "), (Uchar *)xb, len - scg_getresid(scgp)); dp = (struct diskinfo *)xb; @@ -1997,7 +2001,7 @@ return (-1); len = a_to_u_2_byte(sp->hd.len) + sizeof (struct siheader)-2; if (len > (int)sizeof (xb)) { - errmsgno(EX_BAD, "Session info too big.\n"); + errmsgno(EX_BAD, _("Session info too big.\n")); return (-1); } if (read_toc_philips(scgp, (caddr_t)xb, 0, len, 0, FMT_SINFO) < 0) @@ -2051,9 +2055,9 @@ } if (mode[3] == 8) { if (scgp->debug) { - printf("Density: 0x%X\n", mode[4]); - printf("Blocks: %ld\n", a_to_u_3_byte(&mode[5])); - printf("Blocklen:%ld\n", a_to_u_3_byte(&mode[9])); + printf(_("Density: 0x%X\n"), mode[4]); + printf(_("Blocks: %ld\n"), a_to_u_3_byte(&mode[5])); + printf(_("Blocklen:%ld\n"), a_to_u_3_byte(&mode[9])); } secsize = a_to_u_3_byte(&mode[9]); } @@ -2070,7 +2074,7 @@ ep = mode+mode[0]; /* Points to last byte of data */ p = &mode[4]; p += mode[3]; - printf("Pages: "); + printf(_("Pages: ")); while (p < ep) { printf("0x%X ", *p&0x3F); p += p[1]+2; @@ -2225,7 +2229,7 @@ if (!got_inquiry) { if (scgp->verbose) { printf( - "error: %d scb.chk: %d sense_count: %d sense.code: 0x%x\n", + _("error: %d scb.chk: %d sense_count: %d sense.code: 0x%x\n"), scmd->error, scmd->scb.chk, scmd->sense_count, scmd->sense.code); } @@ -2267,7 +2271,7 @@ } else { len = sizeof (*inq); } - printf("Inquiry Data : "); + printf(_("Inquiry Data : ")); for (i = 0; i < len; i++) { c = ip[i]; if (c >= ' ' && c < 0177) @@ -2278,18 +2282,18 @@ printf("\n"); } - strncpy(vendor_info, inq->vendor_info, sizeof (inq->vendor_info)); - strncpy(prod_ident, inq->prod_ident, sizeof (inq->prod_ident)); - strncpy(prod_revision, inq->prod_revision, sizeof (inq->prod_revision)); - - vendor_info[sizeof (inq->vendor_info)] = '\0'; - prod_ident[sizeof (inq->prod_ident)] = '\0'; - prod_revision[sizeof (inq->prod_revision)] = '\0'; + strncpy(vendor_info, inq->inq_vendor_info, sizeof (inq->inq_vendor_info)); + strncpy(prod_ident, inq->inq_prod_ident, sizeof (inq->inq_prod_ident)); + strncpy(prod_revision, inq->inq_prod_revision, sizeof (inq->inq_prod_revision)); + + vendor_info[sizeof (inq->inq_vendor_info)] = '\0'; + prod_ident[sizeof (inq->inq_prod_ident)] = '\0'; + prod_revision[sizeof (inq->inq_prod_revision)] = '\0'; switch (inq->type) { case INQ_DASD: - if (inq->add_len == 0 && inq->vendor_info[0] != '\0') { + if (inq->add_len == 0 && inq->inq_vendor_info[0] != '\0') { Uchar *p; /* * NT-4.0 creates fake inquiry data for IDE disks. @@ -2300,8 +2304,8 @@ if (inq_len >= 36) inq->add_len = 31; - for (p = (Uchar *)&inq->vendor_info[0]; - p < (Uchar *)&inq->prod_revision[4]; + for (p = (Uchar *)&inq->inq_vendor_info[0]; + p < (Uchar *)&inq->inq_prod_revision[4]; p++) { if (*p < 0x20 || *p > 0x7E) { inq->add_len = 0; @@ -2312,26 +2316,31 @@ if (inq->add_len == 0) { if (scgp->dev == DEV_UNKNOWN && got_inquiry) { scgp->dev = DEV_ACB5500; - strcpy(inq->vendor_info, - "ADAPTEC ACB-5500 FAKE"); + strncpy(inq->inq_info_space, + "ADAPTEC ACB-5500 FAKE", + sizeof (inq->inq_info_space)); } else switch (scgp->dev) { case DEV_ACB40X0: - strcpy(inq->vendor_info, - "ADAPTEC ACB-40X0 FAKE"); + strncpy(inq->inq_info_space, + "ADAPTEC ACB-40X0 FAKE", + sizeof (inq->inq_info_space)); break; case DEV_ACB4000: - strcpy(inq->vendor_info, - "ADAPTEC ACB-4000 FAKE"); + strncpy(inq->inq_info_space, + "ADAPTEC ACB-4000 FAKE", + sizeof (inq->inq_info_space)); break; case DEV_ACB4010: - strcpy(inq->vendor_info, - "ADAPTEC ACB-4010 FAKE"); + strncpy(inq->inq_info_space, + "ADAPTEC ACB-4010 FAKE", + sizeof (inq->inq_info_space)); break; case DEV_ACB4070: - strcpy(inq->vendor_info, - "ADAPTEC ACB-4070 FAKE"); + strncpy(inq->inq_info_space, + "ADAPTEC ACB-4070 FAKE", + sizeof (inq->inq_info_space)); break; } } else if (inq->add_len < 31) { @@ -2361,14 +2370,16 @@ case INQ_SEQD: if (scgp->dev == DEV_SC4000) { - strcpy(inq->vendor_info, - "SYSGEN SC4000 FAKE"); + strncpy(inq->inq_info_space, + "SYSGEN SC4000 FAKE", + sizeof (inq->inq_info_space)); } else if (inq->add_len == 0 && inq->removable && inq->ansi_version == 1) { scgp->dev = DEV_MT02; - strcpy(inq->vendor_info, - "EMULEX MT02 FAKE"); + strncpy(inq->inq_info_space, + "EMULEX MT02 FAKE", + sizeof (inq->inq_info_space)); } break; @@ -2601,12 +2612,12 @@ { register struct scsi_inquiry *inq = scgp->inq; - fprintf(f, "Device type : "); + fprintf(f, _("Device type : ")); scg_fprintdev(f, inq); - fprintf(f, "Version : %d\n", inq->ansi_version); - fprintf(f, "Response Format: %d\n", inq->data_format); + fprintf(f, ("Version : %d\n"), inq->ansi_version); + fprintf(f, _("Response Format: %d\n"), inq->data_format); if (inq->data_format >= 2) { - fprintf(f, "Capabilities : "); + fprintf(f, _("Capabilities : ")); if (inq->aenc) fprintf(f, "AENC "); if (inq->termiop) fprintf(f, "TERMIOP "); if (inq->reladr) fprintf(f, "RELADR "); @@ -2619,12 +2630,12 @@ fprintf(f, "\n"); } if (inq->add_len >= 31 || - inq->vendor_info[0] || - inq->prod_ident[0] || - inq->prod_revision[0]) { - fprintf(f, "Vendor_info : '%.8s'\n", inq->vendor_info); - fprintf(f, "Identifikation : '%.16s'\n", inq->prod_ident); - fprintf(f, "Revision : '%.4s'\n", inq->prod_revision); + inq->inq_vendor_info[0] || + inq->inq_prod_ident[0] || + inq->inq_prod_revision[0]) { + fprintf(f, _("Vendor_info : '%.8s'\n"), inq->inq_vendor_info); + fprintf(f, _("Identifikation : '%.16s'\n"), inq->inq_prod_ident); + fprintf(f, _("Revision : '%.4s'\n"), inq->inq_prod_revision); } } @@ -2632,11 +2643,11 @@ printdev(scgp) SCSI *scgp; { - printf("Device seems to be: "); + printf(_("Device seems to be: ")); switch (scgp->dev) { - case DEV_UNKNOWN: printf("unknown"); break; + case DEV_UNKNOWN: printf(_("unknown")); break; case DEV_ACB40X0: printf("Adaptec 4000/4010/4070"); break; case DEV_ACB4000: printf("Adaptec 4000"); break; case DEV_ACB4010: printf("Adaptec 4010"); break; @@ -2680,7 +2691,7 @@ case DEV_PIONEER_DW_S114X: printf("Pioneer DW-S114X"); break; case DEV_PIONEER_DVDR_S101:printf("Pioneer DVD-R S101"); break; - default: printf("Missing Entry for dev %d", + default: printf(_("Missing Entry for dev %d"), scgp->dev); break; } @@ -2734,8 +2745,8 @@ int key; int code; - if ((dp->cdr_flags & CDR_CADDYLOAD) == 0) { - if (scsi_start_stop_unit(scgp, 1, 1, dp && (dp->cdr_cmdflags&F_IMMED)) >= 0) + if (dp && (dp->cdr_flags & CDR_CADDYLOAD) == 0) { + if (scsi_start_stop_unit(scgp, 1, 1, dp->cdr_cmdflags&F_IMMED) >= 0) return (0); } @@ -2746,9 +2757,9 @@ code = scg_sense_code(scgp); if (key == SC_NOT_READY && (code == 0x3A || code == 0x30)) { - errmsgno(EX_BAD, "Cannot load media with %s drive!\n", - (dp->cdr_flags & CDR_CADDYLOAD) ? "caddy" : "this"); - errmsgno(EX_BAD, "Try to load media by hand.\n"); + errmsgno(EX_BAD, _("Cannot load media with %s drive!\n"), + dp && (dp->cdr_flags & CDR_CADDYLOAD) ? _("caddy") : _("this")); + errmsgno(EX_BAD, _("Try to load media by hand.\n")); } return (-1); } @@ -2788,7 +2799,7 @@ retry: fillbytes((caddr_t)mode, sizeof (mode), '\0'); - if (!get_mode_params(scgp, 0x2A, "CD capabilities", + if (!get_mode_params(scgp, 0x2A, _("CD capabilities"), mode, (Uchar *)0, (Uchar *)0, (Uchar *)0, &len)) { if (scg_sense_key(scgp) == SC_NOT_READY) { @@ -2939,10 +2950,10 @@ printf(" BD %2ux)\n", val/4495); } -#define DOES(what, flag) printf(" Does %s%s\n", flag?"":"not ", what) -#define IS(what, flag) printf(" Is %s%s\n", flag?"":"not ", what) -#define VAL(what, val) printf(" %s: %d\n", what, val[0]*256 + val[1]) -#define SVAL(what, val) printf(" %s: %s\n", what, val) +#define DOES(what, flag) printf(_(" Does %s%s\n"), flag?"":_("not "), what) +#define IS(what, flag) printf(_(" Is %s%s\n"), flag?"":_("not "), what) +#define VAL(what, val) printf(_(" %s: %d\n"), what, val[0]*256 + val[1]) +#define SVAL(what, val) printf(_(" %s: %s\n"), what, val) EXPORT void print_capabilities(scgp) @@ -2971,82 +2982,82 @@ if (mp == NULL) return; - printf("\nDrive capabilities, per"); + printf(_("\nDrive capabilities, per")); if (mp->p_len >= 28) printf(" MMC-3"); else if (mp->p_len >= 24) printf(" MMC-2"); else printf(" MMC"); - printf(" page 2A:\n\n"); + printf(_(" page 2A:\n\n")); - DOES("read CD-R media", mp->cd_r_read); - DOES("write CD-R media", mp->cd_r_write); - DOES("read CD-RW media", mp->cd_rw_read); - DOES("write CD-RW media", mp->cd_rw_write); - DOES("read DVD-ROM media", mp->dvd_rom_read); - DOES("read DVD-R media", mp->dvd_r_read); - DOES("write DVD-R media", mp->dvd_r_write); - DOES("read DVD-RAM media", mp->dvd_ram_read); - DOES("write DVD-RAM media", mp->dvd_ram_write); - DOES("support test writing", mp->test_write); + DOES(_("read CD-R media"), mp->cd_r_read); + DOES(_("write CD-R media"), mp->cd_r_write); + DOES(_("read CD-RW media"), mp->cd_rw_read); + DOES(_("write CD-RW media"), mp->cd_rw_write); + DOES(_("read DVD-ROM media"), mp->dvd_rom_read); + DOES(_("read DVD-R media"), mp->dvd_r_read); + DOES(_("write DVD-R media"), mp->dvd_r_write); + DOES(_("read DVD-RAM media"), mp->dvd_ram_read); + DOES(_("write DVD-RAM media"), mp->dvd_ram_write); + DOES(_("support test writing"), mp->test_write); printf("\n"); - DOES("read Mode 2 Form 1 blocks", mp->mode_2_form_1); - DOES("read Mode 2 Form 2 blocks", mp->mode_2_form_2); - DOES("read digital audio blocks", mp->cd_da_supported); + DOES(_("read Mode 2 Form 1 blocks"), mp->mode_2_form_1); + DOES(_("read Mode 2 Form 2 blocks"), mp->mode_2_form_2); + DOES(_("read digital audio blocks"), mp->cd_da_supported); if (mp->cd_da_supported) - DOES("restart non-streamed digital audio reads accurately", mp->cd_da_accurate); - DOES("support Buffer-Underrun-Free recording", mp->BUF); - DOES("read multi-session CDs", mp->multi_session); - DOES("read fixed-packet CD media using Method 2", mp->method2); - DOES("read CD bar code", mp->read_bar_code); - DOES("read R-W subcode information", mp->rw_supported); + DOES(_("restart non-streamed digital audio reads accurately"), mp->cd_da_accurate); + DOES(_("support Buffer-Underrun-Free recording"), mp->BUF); + DOES(_("read multi-session CDs"), mp->multi_session); + DOES(_("read fixed-packet CD media using Method 2"), mp->method2); + DOES(_("read CD bar code"), mp->read_bar_code); + DOES(_("read R-W subcode information"), mp->rw_supported); if (mp->rw_supported) - DOES("return R-W subcode de-interleaved and error-corrected", mp->rw_deint_corr); - DOES("read raw P-W subcode data from lead in", mp->pw_in_lead_in); - DOES("return CD media catalog number", mp->UPC); - DOES("return CD ISRC information", mp->ISRC); - DOES("support C2 error pointers", mp->c2_pointers); - DOES("deliver composite A/V data", mp->composite); + DOES(_("return R-W subcode de-interleaved and error-corrected"), mp->rw_deint_corr); + DOES(_("read raw P-W subcode data from lead in"), mp->pw_in_lead_in); + DOES(_("return CD media catalog number"), mp->UPC); + DOES(_("return CD ISRC information"), mp->ISRC); + DOES(_("support C2 error pointers"), mp->c2_pointers); + DOES(_("deliver composite A/V data"), mp->composite); printf("\n"); - DOES("play audio CDs", mp->audio_play); + DOES(_("play audio CDs"), mp->audio_play); if (mp->audio_play) { - VAL("Number of volume control levels", mp->num_vol_levels); - DOES("support individual volume control setting for each channel", mp->sep_chan_vol); - DOES("support independent mute setting for each channel", mp->sep_chan_mute); - DOES("support digital output on port 1", mp->digital_port_1); - DOES("support digital output on port 2", mp->digital_port_2); + VAL(_("Number of volume control levels"), mp->num_vol_levels); + DOES(_("support individual volume control setting for each channel"), mp->sep_chan_vol); + DOES(_("support independent mute setting for each channel"), mp->sep_chan_mute); + DOES(_("support digital output on port 1"), mp->digital_port_1); + DOES(_("support digital output on port 2"), mp->digital_port_2); if (mp->digital_port_1 || mp->digital_port_2) { - DOES("send digital data LSB-first", mp->LSBF); - DOES("set LRCK high for left-channel data", mp->RCK); - DOES("have valid data on falling edge of clock", mp->BCK); - SVAL("Length of data in BCLKs", bclk[mp->length]); + DOES(_("send digital data LSB-first"), mp->LSBF); + DOES(_("set LRCK high for left-channel data"), mp->RCK); + DOES(_("have valid data on falling edge of clock"), mp->BCK); + SVAL(_("Length of data in BCLKs"), bclk[mp->length]); } } printf("\n"); - SVAL("Loading mechanism type", load[mp->loading_type]); - DOES("support ejection of CD via START/STOP command", mp->eject); - DOES("lock media on power up via prevent jumper", mp->prevent_jumper); - DOES("allow media to be locked in the drive via PREVENT/ALLOW command", mp->lock); - IS("currently in a media-locked state", mp->lock_state); - DOES("support changing side of disk", mp->side_change); - DOES("have load-empty-slot-in-changer feature", mp->sw_slot_sel); - DOES("support Individual Disk Present feature", mp->disk_present_rep); + SVAL(_("Loading mechanism type"), load[mp->loading_type]); + DOES(_("support ejection of CD via START/STOP command"), mp->eject); + DOES(_("lock media on power up via prevent jumper"), mp->prevent_jumper); + DOES(_("allow media to be locked in the drive via PREVENT/ALLOW command"), mp->lock); + IS(_("currently in a media-locked state"), mp->lock_state); + DOES(_("support changing side of disk"), mp->side_change); + DOES(_("have load-empty-slot-in-changer feature"), mp->sw_slot_sel); + DOES(_("support Individual Disk Present feature"), mp->disk_present_rep); printf("\n"); - print_speed("Maximum read speed", a_to_u_2_byte(mp->max_read_speed)); - print_speed("Current read speed", a_to_u_2_byte(mp->cur_read_speed)); - print_speed("Maximum write speed", a_to_u_2_byte(mp->max_write_speed)); + print_speed(_("Maximum read speed"), a_to_u_2_byte(mp->max_read_speed)); + print_speed(_("Current read speed"), a_to_u_2_byte(mp->cur_read_speed)); + print_speed(_("Maximum write speed"), a_to_u_2_byte(mp->max_write_speed)); if (mp->p_len >= 28) - print_speed("Current write speed", a_to_u_2_byte(mp->v3_cur_write_speed)); + print_speed(_("Current write speed"), a_to_u_2_byte(mp->v3_cur_write_speed)); else - print_speed("Current write speed", a_to_u_2_byte(mp->cur_write_speed)); + print_speed(_("Current write speed"), a_to_u_2_byte(mp->cur_write_speed)); if (mp->p_len >= 28) { - SVAL("Rotational control selected", rotctl[mp->rot_ctl_sel]); + SVAL(_("Rotational control selected"), rotctl[mp->rot_ctl_sel]); } - VAL("Buffer size in KB", mp->buffer_size); + VAL(_("Buffer size in KB"), mp->buffer_size); if (mp->p_len >= 24) { - VAL("Copy management revision supported", mp->copy_man_rev); + VAL(_("Copy management revision supported"), mp->copy_man_rev); } if (mp->p_len >= 28) { @@ -3057,9 +3068,9 @@ ndesc = a_to_u_2_byte(mp->num_wr_speed_des); pp = mp->wr_speed_des; - printf(" Number of supported write speeds: %d\n", ndesc); + printf(_(" Number of supported write speeds: %d\n"), ndesc); for (i = 0; i < ndesc; i++, pp++) { - printf(" Write speed # %d:", i); + printf(_(" Write speed # %d:"), i); n = a_to_u_2_byte(pp->wr_speed_supp); printf(" %5d kB/s", n); printf(" %s", rotctl[pp->rot_ctl_sel]); diff -Nru cdrtools-2.01.01a33/cdrecord/scsi_cdr_mmc4.c cdrtools-3.02a09/cdrecord/scsi_cdr_mmc4.c --- cdrtools-2.01.01a33/cdrecord/scsi_cdr_mmc4.c 2006-09-26 12:24:55.000000000 +0000 +++ cdrtools-3.02a09/cdrecord/scsi_cdr_mmc4.c 2010-12-19 18:39:36.000000000 +0000 @@ -1,13 +1,14 @@ -/* @(#)scsi_cdr_mmc4.c 1.3 06/09/26 Copyright 1995-2005 J. Schilling */ +/* @(#)scsi_cdr_mmc4.c 1.7 10/12/19 Copyright 1995-2010 J. Schilling */ +#include #ifndef lint -static char sccsid[] = - "@(#)scsi_cdr_mmc4.c 1.3 06/09/26 Copyright 1995-2005 J. Schilling"; +static UConst char sccsid[] = + "@(#)scsi_cdr_mmc4.c 1.7 10/12/19 Copyright 1995-2010 J. Schilling"; #endif /* * SCSI command functions for cdrecord * covering MMC-4 * - * Copyright (c) 1995-2005 J. Schilling + * Copyright (c) 1995-2010 J. Schilling */ /* * The contents of this file are subject to the terms of the @@ -23,7 +24,7 @@ #include -#include +#include #include #include #include @@ -36,6 +37,7 @@ #include #include #include +#include #include #include @@ -47,7 +49,7 @@ EXPORT void print_capabilities_mmc4 __PR((SCSI *scgp)); -#define DOES(what, flag) printf(" Does %s%s\n", flag?"":"not ", what) +#define DOES(what, flag) printf(_(" Does %s%s\n"), flag?"":_("not "), what) EXPORT void @@ -61,10 +63,10 @@ cdrw_types = get_supported_cdrw_media_types(scgp); if (cdrw_types != -1) { - printf("\nSupported CD-RW media types according to MMC-4 feature 0x37:\n"); - DOES("write multi speed CD-RW media", (cdrw_types & CDR_CDRW_MULTI)); - DOES("write high speed CD-RW media", (cdrw_types & CDR_CDRW_HIGH)); - DOES("write ultra high speed CD-RW media", (cdrw_types & CDR_CDRW_ULTRA)); - DOES("write ultra high speed+ CD-RW media", (cdrw_types & CDR_CDRW_ULTRAP)); + printf(_("\nSupported CD-RW media types according to MMC-4 feature 0x37:\n")); + DOES(_("write multi speed CD-RW media"), (cdrw_types & CDR_CDRW_MULTI)); + DOES(_("write high speed CD-RW media"), (cdrw_types & CDR_CDRW_HIGH)); + DOES(_("write ultra high speed CD-RW media"), (cdrw_types & CDR_CDRW_ULTRA)); + DOES(_("write ultra high speed+ CD-RW media"), (cdrw_types & CDR_CDRW_ULTRAP)); } } diff -Nru cdrtools-2.01.01a33/cdrecord/scsilog.c cdrtools-3.02a09/cdrecord/scsilog.c --- cdrtools-2.01.01a33/cdrecord/scsilog.c 2007-04-04 12:43:59.000000000 +0000 +++ cdrtools-3.02a09/cdrecord/scsilog.c 2010-12-19 18:39:36.000000000 +0000 @@ -1,12 +1,13 @@ -/* @(#)scsilog.c 1.20 07/04/04 Copyright 1998-2007 J. Schilling */ +/* @(#)scsilog.c 1.25 10/12/19 Copyright 1998-2010 J. Schilling */ +#include #ifndef lint -static char sccsid[] = - "@(#)scsilog.c 1.20 07/04/04 Copyright 1998-2007 J. Schilling"; +static UConst char sccsid[] = + "@(#)scsilog.c 1.25 10/12/19 Copyright 1998-2010 J. Schilling"; #endif /* * SCSI log page handling * - * Copyright (c) 1998-2007 J. Schilling + * Copyright (c) 1998-2010 J. Schilling */ /* * The contents of this file are subject to the terms of the @@ -22,11 +23,12 @@ #include -#include +#include #include #include #include #include +#include #include #include @@ -66,7 +68,7 @@ scmd->cdb.g1_cdb.cmd = 0x4D; scmd->cdb.g1_cdb.lun = scg_lun(scgp); scmd->cdb.g1_cdb.addr[0] = (pc << 6) | (page & 0x3f); - i_to_2_byte(&scmd->cdb.g1_cdb.addr[3], pp); + i_to_2_byte(&scmd->cdb.cmd_cdb[5], pp); g1_cdblen(&scmd->cdb.g1_cdb, cnt); scgp->cmdname = "log sense"; @@ -74,7 +76,7 @@ if (scg_cmd(scgp) < 0) return (-1); if (scgp->verbose) - scg_prbytes("Log sense Data :", (Uchar *)bp, cnt - scg_getresid(scgp)); + scg_prbytes(_("Log sense Data :"), (Uchar *)bp, cnt - scg_getresid(scgp)); return (0); } @@ -163,7 +165,7 @@ len -= scg_getresid(scgp); - printf("Supported log pages:"); + printf(_("Supported log pages:")); for (i = 0; i < len; i++) { printf(" %X", sp->p_code[i]); diff -Nru cdrtools-2.01.01a33/cdrecord/scsi_mmc4.c cdrtools-3.02a09/cdrecord/scsi_mmc4.c --- cdrtools-2.01.01a33/cdrecord/scsi_mmc4.c 2006-09-26 12:24:55.000000000 +0000 +++ cdrtools-3.02a09/cdrecord/scsi_mmc4.c 2009-07-10 19:44:45.000000000 +0000 @@ -1,13 +1,14 @@ -/* @(#)scsi_mmc4.c 1.3 06/09/26 Copyright 2002-2005 J. Schilling */ +/* @(#)scsi_mmc4.c 1.6 09/07/10 Copyright 2002-2009 J. Schilling */ +#include #ifndef lint -static char sccsid[] = - "@(#)scsi_mmc4.c 1.3 06/09/26 Copyright 2002-2005 J. Schilling"; +static UConst char sccsid[] = + "@(#)scsi_mmc4.c 1.6 09/07/10 Copyright 2002-2000 J. Schilling"; #endif /* * SCSI command functions for cdrecord * covering MMC-4 level and above * - * Copyright (c) 2002-2005 J. Schilling + * Copyright (c) 2002-2009 J. Schilling */ /* * The contents of this file are subject to the terms of the @@ -24,7 +25,7 @@ /* #define DEBUG */ #include -#include +#include #include #include #include diff -Nru cdrtools-2.01.01a33/cdrecord/scsi_mmc.c cdrtools-3.02a09/cdrecord/scsi_mmc.c --- cdrtools-2.01.01a33/cdrecord/scsi_mmc.c 2007-08-08 23:26:01.000000000 +0000 +++ cdrtools-3.02a09/cdrecord/scsi_mmc.c 2010-12-19 18:39:36.000000000 +0000 @@ -1,13 +1,14 @@ -/* @(#)scsi_mmc.c 1.41 07/08/09 Copyright 2002-2007 J. Schilling */ +/* @(#)scsi_mmc.c 1.51 10/12/19 Copyright 2002-2010 J. Schilling */ +#include #ifndef lint -static char sccsid[] = - "@(#)scsi_mmc.c 1.41 07/08/09 Copyright 2002-2007 J. Schilling"; +static UConst char sccsid[] = + "@(#)scsi_mmc.c 1.51 10/12/19 Copyright 2002-2010 J. Schilling"; #endif /* * SCSI command functions for cdrecord * covering MMC-3 level and above * - * Copyright (c) 2002-2007 J. Schilling + * Copyright (c) 2002-2010 J. Schilling */ /* * The contents of this file are subject to the terms of the @@ -25,7 +26,7 @@ #include -#include +#include #include #include #include @@ -38,6 +39,7 @@ #include #include #include +#include #include #include @@ -197,6 +199,7 @@ EXPORT int get_singlespeed __PR((int mt)); EXPORT float get_secsps __PR((int mt)); EXPORT char *get_mclassname __PR((int mt)); +EXPORT int get_blf __PR((int mt)); LOCAL int scsi_get_performance __PR((SCSI *scgp, caddr_t bp, int cnd, int ndesc, int type, int datatype)); EXPORT int scsi_get_perf_maxspeed __PR((SCSI *scgp, Ulong *readp, Ulong *writep, Ulong *endp)); @@ -214,6 +217,7 @@ EXPORT void przone __PR((struct rzone_info *rp)); EXPORT int get_diskinfo __PR((SCSI *scgp, struct disk_info *dip, int cnt)); +EXPORT char *get_ses_type __PR((int ses_type)); EXPORT void print_diskinfo __PR((struct disk_info *dip, BOOL is_cd)); EXPORT int prdiskstatus __PR((SCSI *scgp, cdr_t *dp, BOOL is_cd)); EXPORT int sessstatus __PR((SCSI *scgp, BOOL is_cd, long *offp, long *nwap)); @@ -310,10 +314,10 @@ profile = a_to_u_2_byte(&cbuf[6]); if (xdebug > 1) - scg_prbytes("Features: ", cbuf, amt); + scg_prbytes(_("Features: "), cbuf, amt); if (xdebug > 0) - printf("feature len: %d current profile 0x%04X len %d\n", + printf(_("feature len: %d current profile 0x%04X len %d\n"), flen, profile, amt); return (profile); @@ -375,7 +379,7 @@ for (i = 0; i < n; i++) { prf = a_to_u_2_byte(p); if (xdebug > 0) - printf("Profile: 0x%04X ", prf); + printf(_("Profile: 0x%04X "), prf); if (profile == prf) return (1); p += 4; @@ -401,17 +405,17 @@ p = cbuf; if (xdebug > 1) - scg_prbytes("Features: ", cbuf, flen); + scg_prbytes(_("Features: "), cbuf, flen); curprofile = a_to_u_2_byte(&p[6]); if (xdebug > 0) - printf("feature len: %d current profile 0x%04X\n", + printf(_("feature len: %d current profile 0x%04X\n"), flen, curprofile); if (pname_known(curprofile)) - printf("Current: %s\n", curprofile == 0 ? "none" : pname(curprofile)); + printf(_("Current: %s\n"), curprofile == 0 ? _("none") : pname(curprofile)); else - printf("Current: 0x%04X unknown\n", curprofile); + printf(_("Current: 0x%04X unknown\n"), curprofile); p += 8; /* Skip feature header */ n = p[3]; /* Additional length */ @@ -421,13 +425,13 @@ for (i = 0; i < n; i++) { profile = a_to_u_2_byte(p); if (xdebug > 0) - printf("Profile: 0x%04X ", profile); + printf(_("Profile: 0x%04X "), profile); else - printf("Profile: "); + printf(_("Profile: ")); if (pname_known(profile)) - printf("%s %s\n", pname(profile), p[2] & 1 ? "(current)":""); + printf("%s %s\n", pname(profile), p[2] & 1 ? _("(current)"):""); else - printf("0x%04X %s\n", profile, p[2] & 1 ? "(current)":""); + printf("0x%04X %s\n", profile, p[2] & 1 ? _("(current)"):""); p += 4; } return (curprofile); @@ -461,11 +465,11 @@ p = cbuf; if (xdebug > 1) - scg_prbytes("Features: ", cbuf, flen); + scg_prbytes(_("Features: "), cbuf, flen); curprofile = a_to_u_2_byte(&p[6]); if (xdebug > 0) - printf("feature len: %d current profile 0x%04X\n", + printf(_("feature len: %d current profile 0x%04X\n"), flen, curprofile); p += 8; /* Skip feature header */ @@ -582,7 +586,7 @@ if (profile >= 0x50 && profile < 0x60) return (MT_HDDVD); - return (MT_NONE); + return (MT_NONE); } EXPORT int @@ -657,6 +661,29 @@ } } +/* + * Guessed blocking factor based on media type + */ +EXPORT int +get_blf(mt) + int mt; +{ + switch (mt) { + + case MT_DVD: + return (16); + + case MT_BD: + return (32); + + case MT_HDDVD: + return (32); /* XXX ??? */ + + default: + return (1); + } +} + LOCAL int scsi_get_performance(scgp, bp, cnt, ndesc, type, datatype) SCSI *scgp; @@ -724,8 +751,8 @@ return (-1); #ifdef XDEBUG - error("Bytes: %d\n", scmd->size - scg_getresid(scgp)); - error("header: %ld\n", a_to_4_byte(buffer) + 4); + error(_("Bytes: %d\n"), scmd->size - scg_getresid(scgp)); + error(_("header: %ld\n"), a_to_4_byte(buffer) + 4); #endif ph = (struct mmc_performance_header *)buffer; @@ -751,18 +778,18 @@ if (i > scmd->cdb.cmd_cdb[9]) i = scmd->cdb.cmd_cdb[9]; if (xdebug > 0) - error("MaxSpeed Nperf: %d\n", i); + error(_("MaxSpeed Nperf: %d\n"), i); if (xdebug != 0) for (; --i >= 0; wsp++) { ul = a_to_u_4_byte(wsp->end_lba); - error("End LBA: %7lu\n", ul); + error(_("End LBA: %7lu\n"), ul); ul = a_to_u_4_byte(wsp->read_speed); - error("Read Speed: %7lu == %lux %s\n", ul, ul/ssp, mname); + error(_("Read Speed: %7lu == %lux %s\n"), ul, ul/ssp, mname); ul = a_to_u_4_byte(wsp->write_speed); - error("Write Speed: %7lu == %lux %s\n", ul, ul/ssp, mname); + error(_("Write Speed: %7lu == %lux %s\n"), ul, ul/ssp, mname); error("\n"); } #ifdef XDEBUG - scg_prbytes("Performance data:", (Uchar *)buffer, scmd->size - scg_getresid(scgp)); + scg_prbytes(_("Performance data:"), (Uchar *)buffer, scmd->size - scg_getresid(scgp)); #endif return (0); @@ -816,8 +843,8 @@ return (-1); #ifdef XDEBUG - error("Bytes: %d\n", scmd->size - scg_getresid(scgp)); - error("header: %ld\n", a_to_4_byte(buffer) + 4); + error(_("Bytes: %d\n"), scmd->size - scg_getresid(scgp)); + error(_("header: %ld\n"), a_to_4_byte(buffer) + 4); #endif ph = (struct mmc_performance_header *)buffer; @@ -850,22 +877,22 @@ if (i > scmd->cdb.cmd_cdb[9]) i = scmd->cdb.cmd_cdb[9]; if (xdebug > 1) - error("CurSpeed Writeperf: %d\n", i); + error(_("CurSpeed Writeperf: %d\n"), i); else if (xdebug < 0) - error("Write Performance:\n"); + error(_("Write Performance:\n")); if (xdebug != 0) for (; --i >= 0; perfp++) { ul = a_to_u_4_byte(perfp->start_lba); - error("START LBA: %7lu\n", ul); + error(_("START LBA: %7lu\n"), ul); ul = a_to_u_4_byte(perfp->end_lba); - error("End LBA: %7lu\n", ul); + error(_("End LBA: %7lu\n"), ul); ul = a_to_u_4_byte(perfp->start_perf); - error("Start Perf: %7lu == %lux %s\n", ul, ul/ssp, mname); + error(_("Start Perf: %7lu == %lux %s\n"), ul, ul/ssp, mname); ul = a_to_u_4_byte(perfp->end_perf); - error("END Perf: %7lu == %lux %s\n", ul, ul/ssp, mname); + error(_("END Perf: %7lu == %lux %s\n"), ul, ul/ssp, mname); error("\n"); } #ifdef XDEBUG - scg_prbytes("Performance data:", (Uchar *)buffer, scmd->size - scg_getresid(scgp)); + scg_prbytes(_("Performance data:"), (Uchar *)buffer, scmd->size - scg_getresid(scgp)); #endif } doread: @@ -889,8 +916,8 @@ return (-1); #ifdef XDEBUG - error("Bytes: %d\n", scmd->size - scg_getresid(scgp)); - error("header: %ld\n", a_to_4_byte(buffer) + 4); + error(_("Bytes: %d\n"), scmd->size - scg_getresid(scgp)); + error(_("header: %ld\n"), a_to_4_byte(buffer) + 4); #endif ph = (struct mmc_performance_header *)buffer; @@ -918,22 +945,22 @@ if (i > scmd->cdb.cmd_cdb[9]) i = scmd->cdb.cmd_cdb[9]; if (xdebug > 1) - error("CurSpeed Readperf: %d\n", i); + error(_("CurSpeed Readperf: %d\n"), i); else if (xdebug < 0) - error("Read Performance:\n"); + error(_("Read Performance:\n")); if (xdebug != 0) for (; --i >= 0; perfp++) { ul = a_to_u_4_byte(perfp->start_lba); - error("START LBA: %7lu\n", ul); + error(_("START LBA: %7lu\n"), ul); ul = a_to_u_4_byte(perfp->end_lba); - error("End LBA: %7lu\n", ul); + error(_("End LBA: %7lu\n"), ul); ul = a_to_u_4_byte(perfp->start_perf); - error("Start Perf: %7lu == %lux %s\n", ul, ul/ssp, mname); + error(_("Start Perf: %7lu == %lux %s\n"), ul, ul/ssp, mname); ul = a_to_u_4_byte(perfp->end_perf); - error("END Perf: %7lu == %lux %s\n", ul, ul/ssp, mname); + error(_("END Perf: %7lu == %lux %s\n"), ul, ul/ssp, mname); error("\n"); } #ifdef XDEBUG - scg_prbytes("Performance data:", (Uchar *)buffer, scmd->size - scg_getresid(scgp)); + scg_prbytes(_("Performance data:"), (Uchar *)buffer, scmd->size - scg_getresid(scgp)); #endif } @@ -983,7 +1010,7 @@ i_to_4_byte(sp->write_time, 1000); #ifdef DEBUG - scg_prbytes("Streaming data:", (Uchar *)sp, sizeof (*sp)); + scg_prbytes(_("Streaming data:"), (Uchar *)sp, sizeof (*sp)); #endif return (scg_cmd(scgp)); @@ -1096,11 +1123,11 @@ amt = flen+4; pend = &p[amt]; if (xdebug > 1) - scg_prbytes("Features: ", fbuf, amt); + scg_prbytes(_("Features: "), fbuf, amt); feature = a_to_u_2_byte(&p[6]); if (xdebug > 0) - printf("feature len: %d current profile 0x%04X len %lld\n", + printf(_("feature len: %d current profile 0x%04X len %lld\n"), flen, feature, (Llong)(pend - p)); p = fbuf + 8; /* Skip feature header */ @@ -1110,23 +1137,23 @@ col = 0; feature = a_to_u_2_byte(p); if (xdebug > 0) - col += printf("Feature: 0x%04X ", feature); + col += printf(_("Feature: 0x%04X "), feature); else - col += printf("Feature: "); + col += printf(_("Feature: ")); if (fname_known(feature)) col += printf("'%s' ", fname(feature)); else col += printf("0x%04X ", feature); col += printf("%s %s", - p[2] & 1 ? "(current)":"", - p[2] & 2 ? "(persistent)":""); + p[2] & 1 ? _("(current)"):"", + p[2] & 2 ? _("(persistent)"):""); if (feature == 0x108) - col += printf(" Serial: '%.*s'", p[3], &p[4]); + col += printf(_(" Serial: '%.*s'"), p[3], &p[4]); if (xdebug > 1 && p[3]) { if (col < 50) printf("%*s", 50-col, ""); - scg_fprbytes(stdout, " Data: ", &p[4], p[3]); + scg_fprbytes(stdout, _(" Data: "), &p[4], p[3]); } else { printf("\n"); } @@ -1153,8 +1180,10 @@ fillbytes(b, sizeof (b), '\0'); scgp->silent++; - read_format_capacities(scgp, (char *)b, sizeof (b)); + i = read_format_capacities(scgp, (char *)b, sizeof (b)); scgp->silent--; + if (i < 0) + return; i = b[3] + 4; fillbytes(b, sizeof (b), '\0'); @@ -1163,20 +1192,21 @@ if (xdebug > 0) { i = b[3] + 4; - scg_prbytes("Format cap: ", b, i); + scg_prbytes(_("Format cap: "), b, i); } i = b[3]; if (i > 0) { int cnt; UInt32_t n1; UInt32_t n2; - printf("\n Capacity Blklen/Sparesz. Type\n"); + printf(_("\n Capacity Blklen/Sparesz. Format-type Type\n")); for (p = &b[4]; i > 0; i -= 8, p += 8) { cnt = 0; n1 = a_to_u_4_byte(p); n2 = a_to_u_3_byte(&p[5]); - printf("%12lu %16lu %s\n", + printf("%12lu %16lu 0x%2.2X %s\n", (Ulong)n1, (Ulong)n2, + (p[4] >> 2) & 0x3F, fdt[p[4] & 0x03]); } } @@ -1194,8 +1224,12 @@ fillbytes(bp, cnt, '\0'); if (cnt < len) return (-1); - if (read_format_capacities(scgp, bp, len) < 0) + scgp->silent++; + if (read_format_capacities(scgp, bp, len) < 0) { + scgp->silent--; return (-1); + } + scgp->silent--; if (scg_getresid(scgp) > 0) return (-1); @@ -1244,33 +1278,33 @@ if (rsize < 12) return; - printf("rzone size: %d\n", rsize); - printf("rzone number: %d\n", rp->rzone_num_msb * 256 + rp->rzone_num_lsb); - printf("border number: %d\n", rp->border_num_msb * 256 + rp->border_num_lsb); - printf("ljrs: %d\n", rp->ljrs); - printf("track mode: %d copy: %d\n", rp->trackmode, rp->copy); - printf("damage: %d\n", rp->damage); - printf("reserved track: %d blank: %d incremental: %d fp: %d\n", + printf(_("rzone size: %d\n"), rsize); + printf(_("rzone number: %d\n"), rp->rzone_num_msb * 256 + rp->rzone_num_lsb); + printf(_("border number: %d\n"), rp->border_num_msb * 256 + rp->border_num_lsb); + printf(_("ljrs: %d\n"), rp->ljrs); + printf(_("track mode: %d copy: %d\n"), rp->trackmode, rp->copy); + printf(_("damage: %d\n"), rp->damage); + printf(_("reserved track: %d blank: %d incremental: %d fp: %d\n"), rp->rt, rp->blank, rp->incremental, rp->fp); - printf("data mode: %d\n", rp->datamode); - printf("lra valid: %d\n", rp->lra_v); - printf("nwa valid: %d\n", rp->nwa_v); - printf("rzone start: %ld\n", a_to_4_byte(rp->rzone_start)); - printf("next wr addr: %ld\n", a_to_4_byte(rp->next_recordable_addr)); - printf("free blocks: %ld\n", a_to_4_byte(rp->free_blocks)); - printf("blocking factor: %ld\n", a_to_4_byte(rp->block_factor)); - printf("rzone size: %ld\n", a_to_4_byte(rp->rzone_size)); - printf("last recorded addr: %ld\n", a_to_4_byte(rp->last_recorded_addr)); + printf(_("data mode: %d\n"), rp->datamode); + printf(_("lra valid: %d\n"), rp->lra_v); + printf(_("nwa valid: %d\n"), rp->nwa_v); + printf(_("rzone start: %ld\n"), a_to_4_byte(rp->rzone_start)); + printf(_("next wr addr: %ld\n"), a_to_4_byte(rp->next_recordable_addr)); + printf(_("free blocks: %ld\n"), a_to_4_byte(rp->free_blocks)); + printf(_("blocking factor: %ld\n"), a_to_4_byte(rp->block_factor)); + printf(_("rzone size: %ld\n"), a_to_4_byte(rp->rzone_size)); + printf(_("last recorded addr: %ld\n"), a_to_4_byte(rp->last_recorded_addr)); if (rsize < 40) return; - printf("read compat lba: %ld\n", a_to_4_byte(rp->read_compat_lba)); + printf(_("read compat lba: %ld\n"), a_to_4_byte(rp->read_compat_lba)); if (rsize < 44) return; - printf("next layerjmp addr: %ld\n", a_to_4_byte(rp->next_layer_jump)); + printf(_("next layerjmp addr: %ld\n"), a_to_4_byte(rp->next_layer_jump)); if (rsize < 48) return; - printf("last layerjmp addr: %ld\n", a_to_4_byte(rp->last_layer_jump)); + printf(_("last layerjmp addr: %ld\n"), a_to_4_byte(rp->last_layer_jump)); } EXPORT int @@ -1298,16 +1332,35 @@ #ifdef DEBUG if (lverbose > 1) - scg_prbytes("Disk info:", (Uchar *)dip, + scg_prbytes(_("Disk info:"), (Uchar *)dip, len-scg_getresid(scgp)); #endif return (ret); } -#define IS(what, flag) printf("Disk Is %s%s\n", flag?"":"not ", what); +#define IS(what, flag) printf(_("Disk Is %s%s\n"), flag?"":_("not "), what); LOCAL char res[] = "reserved"; +EXPORT char * +get_ses_type(ses_type) + int ses_type; +{ +static char ret[16]; + + switch (ses_type) { + + case SES_DA_ROM: return ("CD-DA or CD-ROM"); + case SES_CDI: return ("CDI"); + case SES_XA: return ("CD-ROM XA"); + case SES_UNDEF: return ("undefined"); + default: + js_snprintf(ret, sizeof (ret), "%s: 0x%2.2X", + res, ses_type); + return (ret); + } +} + EXPORT void print_diskinfo(dip, is_cd) struct disk_info *dip; @@ -1318,56 +1371,51 @@ static char *ss_name[] = { "empty", "incomplete/appendable", "illegal", "complete", }; static char *fd_name[] = { "none", "incomplete", "in progress", "completed", }; - IS("erasable", dip->erasable); - printf("data type: %s\n", dt_name[dip->dtype]); - printf("disk status: %s\n", ds_name[dip->disk_status]); - printf("session status: %s\n", ss_name[dip->sess_status]); - printf("BG format status: %s\n", fd_name[dip->bg_format_stat]); - printf("first track: %d\n", + IS(_("erasable"), dip->erasable); + printf(_("data type: %s\n"), dt_name[dip->dtype]); + printf(_("disk status: %s\n"), ds_name[dip->disk_status]); + printf(_("session status: %s\n"), ss_name[dip->sess_status]); + printf(_("BG format status: %s\n"), fd_name[dip->bg_format_stat]); + printf(_("first track: %d\n"), dip->first_track); - printf("number of sessions: %d\n", + printf(_("number of sessions: %d\n"), dip->numsess + dip->numsess_msb * 256); - printf("first track in last sess: %d\n", + printf(_("first track in last sess: %d\n"), dip->first_track_ls + dip->first_track_ls_msb * 256); - printf("last track in last sess: %d\n", + printf(_("last track in last sess: %d\n"), dip->last_track_ls + dip->last_track_ls_msb * 256); - IS("unrestricted", dip->uru); - printf("Disk type: "); - if (is_cd) switch (dip->disk_type) { - - case SES_DA_ROM: printf("CD-DA or CD-ROM"); break; - case SES_CDI: printf("CDI"); break; - case SES_XA: printf("CD-ROM XA"); break; - case SES_UNDEF: printf("undefined"); break; - default: printf("reserved"); break; + IS(_("unrestricted"), dip->uru); + printf(_("Disk type: ")); + if (is_cd) { + printf("%s", get_ses_type(dip->disk_type)); } else { - printf("DVD, HD-DVD or BD"); + printf(_("DVD, HD-DVD or BD")); } printf("\n"); if (dip->did_v) - printf("Disk id: 0x%lX\n", a_to_u_4_byte(dip->disk_id)); + printf(_("Disk id: 0x%lX\n"), a_to_u_4_byte(dip->disk_id)); if (is_cd) { - printf("last start of lead in: %ld\n", + printf(_("last start of lead in: %ld\n"), msf_to_lba(dip->last_lead_in[1], dip->last_lead_in[2], dip->last_lead_in[3], FALSE)); - printf("last start of lead out: %ld\n", + printf(_("last start of lead out: %ld\n"), msf_to_lba(dip->last_lead_out[1], dip->last_lead_out[2], dip->last_lead_out[3], TRUE)); } if (dip->dbc_v) - printf("Disk bar code: 0x%lX%lX\n", + printf(_("Disk bar code: 0x%lX%lX\n"), a_to_u_4_byte(dip->disk_barcode), a_to_u_4_byte(&dip->disk_barcode[4])); if (dip->dac_v) - printf("Disk appl. code: %d\n", dip->disk_appl_code); + printf(_("Disk appl. code: %d\n"), dip->disk_appl_code); if (dip->num_opc_entries > 0) { - printf("OPC table:\n"); + printf(_("OPC table:\n")); } } @@ -1398,10 +1446,10 @@ if (profile > 0) { int mt = get_mediatype(scgp); - printf("Mounted media class: %s\n", + printf(_("Mounted media class: %s\n"), get_mclassname(mt)); if (pname_known(profile)) { - printf("Mounted media type: %s\n", + printf(_("Mounted media type: %s\n"), pname(profile)); } } @@ -1411,8 +1459,8 @@ sessions = di.numsess + di.numsess_msb * 256; tracks = di.last_track_ls + di.last_track_ls_msb * 256; - printf("\nTrack Sess Type Start Addr End Addr Size\n"); - printf("==============================================\n"); + printf(_("\nTrack Sess Type Start Addr End Addr Size\n")); + printf(_("==============================================\n")); fillbytes((caddr_t)&rz, sizeof (rz), '\0'); for (t = di.first_track; t <= tracks; t++) { fillbytes((caddr_t)&rz, sizeof (rz), '\0'); @@ -1436,8 +1484,8 @@ } printf("%5d %5d %-6s %-10ld %-10ld %ld", track, s, - rz.blank ? "Blank" : - rz.trackmode & 4 ? "Data" : "Audio", + rz.blank ? _("Blank") : + rz.trackmode & 4 ? _("Data") : _("Audio"), raddr, raddr + rsize -1, rsize); if (lverbose > 0) printf(" %10ld", border_size); @@ -1445,12 +1493,12 @@ } printf("\n"); if (lastaddr >= 0) - printf("Last session start address: %ld\n", lastaddr); + printf(_("Last session start address: %ld\n"), lastaddr); if (leadout >= 0) - printf("Last session leadout start address: %ld\n", leadout); + printf(_("Last session leadout start address: %ld\n"), leadout); if (rz.nwa_v) { - printf("Next writable address: %ld\n", nwa); - printf("Remaining writable size: %ld\n", rsize); + printf(_("Next writable address: %ld\n"), nwa); + printf(_("Remaining writable size: %ld\n"), rsize); } return (0); @@ -1534,10 +1582,10 @@ if (xdebug == 0) xdebug = -1; - printf("\nCurrent performance according to MMC get performance:\n"); + printf(_("\nCurrent performance according to MMC get performance:\n")); scsi_get_perf_curspeed(scgp, &reads, &writes, &ends); - printf("\nMaximum performance according to MMC get performance:\n"); + printf(_("\nMaximum performance according to MMC get performance:\n")); scsi_get_perf_maxspeed(scgp, &reads, &writes, &ends); xdebug = oxdebug; diff -Nru cdrtools-2.01.01a33/cdrecord/scsi_scan.c cdrtools-3.02a09/cdrecord/scsi_scan.c --- cdrtools-2.01.01a33/cdrecord/scsi_scan.c 2007-07-12 07:04:53.000000000 +0000 +++ cdrtools-3.02a09/cdrecord/scsi_scan.c 2017-08-06 18:27:15.000000000 +0000 @@ -1,14 +1,15 @@ -/* @(#)scsi_scan.c 1.30 07/07/12 Copyright 1997-2007 J. Schilling */ +/* @(#)scsi_scan.c 1.38 17/08/06 Copyright 1997-2017 J. Schilling */ +#include #ifndef lint -static char sccsid[] = - "@(#)scsi_scan.c 1.30 07/07/12 Copyright 1997-2007 J. Schilling"; +static UConst char sccsid[] = + "@(#)scsi_scan.c 1.38 17/08/06 Copyright 1997-2017 J. Schilling"; #endif /* * Scan SCSI Bus. * Stolen from sformat. Need a more general form to * re-use it in sformat too. * - * Copyright (c) 1997-2007 J. Schilling + * Copyright (c) 1997-2017 J. Schilling */ /* * The contents of this file are subject to the terms of the @@ -17,18 +18,21 @@ * with the License. * * See the file CDDL.Schily.txt in this distribution for details. + * A copy of the CDDL is also available via the Internet at + * http://www.opensource.org/licenses/cddl1.txt * * When distributing Covered Code, include this CDDL HEADER in each * file and include the License file CDDL.Schily.txt from this distribution. */ #include -#include +#include #include #include #include #include #include +#include #include #include @@ -42,16 +46,18 @@ EXPORT int select_target __PR((SCSI *scgp, FILE *f)); EXPORT int find_target __PR((SCSI *scgp, int type, int idx)); LOCAL int _select_target __PR((SCSI *scgp, FILE *f, int type, int idx)); +#ifdef __ready__ LOCAL int select_unit __PR((SCSI *scgp, FILE *f)); +#endif LOCAL void print_product(f, ip) FILE *f; struct scsi_inquiry *ip; { - fprintf(f, "'%.8s' ", ip->vendor_info); - fprintf(f, "'%.16s' ", ip->prod_ident); - fprintf(f, "'%.4s' ", ip->prod_revision); + fprintf(f, "'%.8s' ", ip->inq_vendor_info); + fprintf(f, "'%.16s' ", ip->inq_prod_ident); + fprintf(f, "'%.4s' ", ip->inq_prod_revision); if (ip->add_len < 31) { fprintf(f, "NON CCS "); } @@ -181,22 +187,23 @@ scgp->silent--; if (low < 0) { - errmsgno(EX_BAD, "No target found.\n"); + errmsgno(EX_BAD, _("No target found.\n")); return (0); } n = -1; #ifdef FMT - getint("Select target", &n, low, high); + getint(_("Select target"), &n, low, high); bus = n/100; tgt = n%100; scg_settarget(scgp, bus, tgt, lun); return (select_unit(scgp)); - -#endif +#else scg_settarget(scgp, cscsibus, ctarget, clun); return (amt); +#endif } +#ifdef __ready__ LOCAL int select_unit(scgp, f) SCSI *scgp; @@ -210,7 +217,7 @@ scgp->silent++; - fprintf(f, "scsibus%d target %d:\n", scg_scsibus(scgp), scg_target(scgp)); + fprintf(f, _("scsibus%d target %d:\n"), scg_scsibus(scgp), scg_target(scgp)); initiator = scg_initiator_id(scgp); for (lun = 0; lun < 8; lun++) { @@ -254,17 +261,18 @@ scgp->silent--; if (low < 0) { - errmsgno(EX_BAD, "No lun found.\n"); + errmsgno(EX_BAD, _("No lun found.\n")); return (0); } lun = -1; #ifdef FMT - getint("Select lun", &lun, low, high); + getint(_("Select lun"), &lun, low, high); scg_settarget(scgp, scg_scsibus(scgp), scg_target(scgp), lun); format_one(scgp); return (1); -#endif - +#else scg_settarget(scgp, scg_scsibus(scgp), scg_target(scgp), clun); return (1); +#endif } +#endif /* __ready__ */ diff -Nru cdrtools-2.01.01a33/cdrecord/sector.c cdrtools-3.02a09/cdrecord/sector.c --- cdrtools-2.01.01a33/cdrecord/sector.c 2006-09-13 15:35:12.000000000 +0000 +++ cdrtools-3.02a09/cdrecord/sector.c 2010-12-19 18:39:36.000000000 +0000 @@ -1,12 +1,13 @@ -/* @(#)sector.c 1.14 06/09/13 Copyright 2001-2004 J. Schilling */ +/* @(#)sector.c 1.18 10/12/19 Copyright 2001-2010 J. Schilling */ +#include #ifndef lint -static char sccsid[] = - "@(#)sector.c 1.14 06/09/13 Copyright 2001-2004 J. Schilling"; +static UConst char sccsid[] = + "@(#)sector.c 1.18 10/12/19 Copyright 2001-2010 J. Schilling"; #endif /* * Functions needed to use libedc_ecc from cdrecord * - * Copyright (c) 2001-2004 J. Schilling + * Copyright (c) 2001-2010 J. Schilling */ /* * The contents of this file are subject to the terms of the @@ -21,11 +22,12 @@ */ #include -#include +#include #include #include #include #include +#include #include "cdrecord.h" #include "movesect.h" @@ -121,8 +123,9 @@ break; } if (be_verbose) { - printf("Encoding speed : %dx (%d sectors/s) for libedc from Heiko Eißfeldt\n", - (i+74)/75, i); + printf(_("Encoding speed : %dx (%d sectors/s) for libedc from %s\n"), + (i+74)/75, i, + _("Heiko Eissfeldt")); } return ((i+74)/75); } @@ -191,7 +194,7 @@ int address; int nsecs; { - comerrno(EX_BAD, "Cannot write in clone RAW mode.\n"); + comerrno(EX_BAD, _("Cannot write in clone RAW mode.\n")); } #endif diff -Nru cdrtools-2.01.01a33/cdrecord/subchan.c cdrtools-3.02a09/cdrecord/subchan.c --- cdrtools-2.01.01a33/cdrecord/subchan.c 2006-12-10 19:00:03.000000000 +0000 +++ cdrtools-3.02a09/cdrecord/subchan.c 2017-07-16 22:03:09.000000000 +0000 @@ -1,12 +1,13 @@ -/* @(#)subchan.c 1.22 06/12/10 Copyright 2000-2006 J. Schilling */ +/* @(#)subchan.c 1.29 17/07/17 Copyright 2000-2017 J. Schilling */ +#include #ifndef lint -static char sccsid[] = - "@(#)subchan.c 1.22 06/12/10 Copyright 2000-2006 J. Schilling"; +static UConst char sccsid[] = + "@(#)subchan.c 1.29 17/07/17 Copyright 2000-2017 J. Schilling"; #endif /* * Subchannel processing * - * Copyright (c) 2000-2006 J. Schilling + * Copyright (c) 2000-2017 J. Schilling */ /* * The contents of this file are subject to the terms of the @@ -15,17 +16,20 @@ * with the License. * * See the file CDDL.Schily.txt in this distribution for details. + * A copy of the CDDL is also available via the Internet at + * http://www.opensource.org/licenses/cddl1.txt * * When distributing Covered Code, include this CDDL HEADER in each * file and include the License file CDDL.Schily.txt from this distribution. */ #include -#include +#include #include #include #include #include +#include #include @@ -47,7 +51,9 @@ EXPORT void addrw __PR((Uchar *sub, Uchar *subrwptr)); EXPORT void qwto16 __PR((Uchar *subq, Uchar *subptr)); EXPORT void subrecodesecs __PR((track_t *trackp, Uchar *bp, int address, int nsecs)); +#ifdef DO_SUBINTERLEAVE LOCAL void subinterleave __PR((Uchar *sub)); +#endif /*#define TEST_CRC*/ #ifdef TEST_CRC @@ -92,14 +98,14 @@ if (_nsubh) { if (xdebug) - printf("Using CLONE TOC....\n"); + printf(_("Using CLONE TOC....\n")); return (0); } if (xdebug) - printf("Leadin TOC Type: %d\n", trackp[0].tracktype & TOC_MASK); + printf(_("Leadin TOC Type: %d\n"), trackp[0].tracktype & TOC_MASK); if (lverbose > 1) { for (i = 1; i <= tracks+1; i++) - printf("Track %d start %ld\n", i, trackp[i].trackstart); + printf(_("Track %d start %ld\n"), i, trackp[i].trackstart); } #ifdef TEST_CRC @@ -203,13 +209,13 @@ if (_nsubh) { if (xdebug) - printf("Using CLONE LEADIN\n"); + printf(_("Using CLONE LEADIN\n")); } if (xdebug) { - printf("Leadinstart: %d %d:%d/%d", + printf(_("Leadinstart: %d %d:%d/%d"), leadinstart, msf.msf_min, msf.msf_sec, msf.msf_frame); - printf(" FLAGS: 0x%X sect: %X RAW16:%d secs: %d spt: %d\n", + printf(_(" FLAGS: 0x%X sect: %X RAW16:%d secs: %d spt: %d\n"), trackp[0].flags, trackp[0].sectype, is_raw16(&trackp[0]), secsize, secspt); } @@ -252,8 +258,10 @@ if (textoff >= textlen) textoff = 0; } +#ifdef DO_SUBINTERLEAVE /* if (is_raw96p(&trackp[0]))*/ /* subinterleave(subp);*/ +#endif } if ((startsec+secspt-1) == i || i == -151) { if ((i-startsec+1) < secspt) { @@ -265,7 +273,7 @@ amount = write_secs(scgp, dp, (char *)bp, startsec, bytespt, secspt, FALSE); if (amount < 0) { - printf("write leadin data: error after %ld bytes\n", + printf(_("write leadin data: error after %ld bytes\n"), bytes); return (-1); } @@ -323,11 +331,11 @@ fillbytes(bp, bytespt, '\0'); if (xdebug) { - printf("Leadoutstart: %d %d:%d/%d amt %ld", + printf(_("Leadoutstart: %d %d:%d/%d amt %ld"), leadoutstart, msf.msf_min, msf.msf_sec, msf.msf_frame, trackp[tracks+1].tracksecs); - printf(" FLAGS: 0x%X sect: %X RAW16:%d secs: %d spt: %d\n", + printf(_(" FLAGS: 0x%X sect: %X RAW16:%d secs: %d spt: %d\n"), trackp[tracks+1].flags, trackp[tracks+1].sectype, is_raw16(&trackp[tracks+1]), secsize, secspt); } @@ -357,8 +365,10 @@ qpto16(subp, sub, p); } else { qpto96(subp, sub, p); +#ifdef DO_SUBINTERLEAVE /* if (is_raw96p(&trackp[0]))*/ /* subinterleave(subp);*/ +#endif } if ((startsec+secspt-1) == i || i == (endsec-1)) { if ((i-startsec+1) < secspt) { @@ -370,7 +380,7 @@ amount = write_secs(scgp, dp, (char *)bp, startsec, bytespt, secspt, FALSE); if (amount < 0) { - printf("write leadout data: error after %ld bytes\n", + printf(_("write leadout data: error after %ld bytes\n"), bytes); return (-1); } @@ -423,13 +433,16 @@ static long nextisrc = -1000000L; static Uchar lastindex = 255; + if (trackno == 0 && is_hidden(trackp)) + trackno = trackp[1].trackno; + fillbytes(sub, 12, '\0'); mcn = track_base(trackp)->isrc; rsecno = secno - trackp->trackstart; if ((secno + nsecs) > (trackp->trackstart + trackp->tracksecs)) { comerrno(EX_BAD, - "Implementation botch: track boundary in buffer.\n"); + _("Implementation botch: track boundary in buffer.\n")); } sup = sp + 2352; if (mcn && (nextmcn < secno || nextmcn > (secno+100))) { @@ -545,8 +558,10 @@ qpto16(sup, sub, curindex == 0); } else { qpto96(sup, sub, curindex == 0); +#ifdef DO_SUBINTERLEAVE /* if (is_raw96p(trackp))*/ /* subinterleave(sup);*/ +#endif } lastindex = curindex; secno++; @@ -907,7 +922,7 @@ if ((sectype & ST_MODE_MASK) == ST_MODE_AUDIO) return; - comerrno(EX_BAD, "Can only write audio sectors in RAW mode.\n"); + comerrno(EX_BAD, _("Can only write audio sectors in RAW mode.\n")); } EXPORT void @@ -917,7 +932,7 @@ int address; int nsecs; { - comerrno(EX_BAD, "Cannot write in clone RAW mode.\n"); + comerrno(EX_BAD, _("Cannot write in clone RAW mode.\n")); } #endif @@ -991,7 +1006,7 @@ } #endif /* TEST_CRC */ -#ifdef sss +#if 0 96 / 24 = 4 index 1 < - > 18 @@ -1001,6 +1016,7 @@ delay index mod 8 #endif +#ifdef DO_SUBINTERLEAVE /* * Sub 96 Bytes Interleave */ @@ -1034,3 +1050,4 @@ p += 24; } } +#endif /* DO_SUBINTERLEAVE */ diff -Nru cdrtools-2.01.01a33/cdrecord/vendor.c cdrtools-3.02a09/cdrecord/vendor.c --- cdrtools-2.01.01a33/cdrecord/vendor.c 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/cdrecord/vendor.c 2011-09-14 11:46:45.000000000 +0000 @@ -0,0 +1,45 @@ +/* @(#)vendor.c 1.8 11/09/14 Copyright 2007-2011 J. Schilling */ +#include +#ifndef lint +static UConst char sccsid[] = + "@(#)vendor.c 1.8 11/09/14 Copyright 2007-2011 J. Schilling"; +#endif +/* + * Vendor specific SCSI command functions for cdrecord + * + * Copyright (c) 2007-2011 J. Schilling + */ +/* + * The contents of this file are subject to the terms of the + * Common Development and Distribution License, Version 1.0 only + * (the "License"). You may not use this file except in compliance + * with the License. + * + * See the file CDDL.Schily.txt in this distribution for details. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file CDDL.Schily.txt from this distribution. + */ + +#include + +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include + +#include +#include +#include +#include + +#include "scsimmc.h" +#include "cdrecord.h" + diff -Nru cdrtools-2.01.01a33/cdrecord/version.h cdrtools-3.02a09/cdrecord/version.h --- cdrtools-2.01.01a33/cdrecord/version.h 2007-08-12 20:48:21.000000000 +0000 +++ cdrtools-3.02a09/cdrecord/version.h 2017-12-08 00:10:01.000000000 +0000 @@ -1,6 +1,6 @@ -/* @(#)version.h 1.8 07/08/12 Copyright 2007 J. Schilling */ +/* @(#)version.h 1.95 17/12/08 Copyright 2007-2017 J. Schilling */ /* * The version for cdrtools programs */ -#define VERSION "2.01.01a33" +#define VERSION "3.02a09" diff -Nru cdrtools-2.01.01a33/cdrecord/wm_packet.c cdrtools-3.02a09/cdrecord/wm_packet.c --- cdrtools-2.01.01a33/cdrecord/wm_packet.c 2007-08-05 23:00:55.000000000 +0000 +++ cdrtools-3.02a09/cdrecord/wm_packet.c 2010-12-19 18:39:36.000000000 +0000 @@ -1,13 +1,14 @@ -/* @(#)wm_packet.c 1.27 07/08/06 Copyright 1995, 1997, 2001-2004 J. Schilling */ +/* @(#)wm_packet.c 1.31 10/12/19 Copyright 1995, 1997, 2001-2010 J. Schilling */ +#include #ifndef lint -static char sccsid[] = - "@(#)wm_packet.c 1.27 07/08/06 Copyright 1995, 1997, 2001-2004 J. Schilling"; +static UConst char sccsid[] = + "@(#)wm_packet.c 1.31 10/12/19 Copyright 1995, 1997, 2001-2010 J. Schilling"; #endif /* * CDR write method abtraction layer * packet writing intercace routines * - * Copyright (c) 1995, 1997, 2001-2004 J. Schilling + * Copyright (c) 1995, 1997, 2001-2010 J. Schilling */ /* * The contents of this file are subject to the terms of the @@ -22,13 +23,14 @@ */ #include -#include +#include #include #include #include #include #include #include +#include #include #include "cdrecord.h" @@ -109,16 +111,16 @@ pad = !isaudio && is_pad(trackp); /* Pad only data tracks */ if (debug) { - printf("secsize:%d secspt:%d bytespt:%d audio:%d pad:%d\n", + printf(_("secsize:%d secspt:%d bytespt:%d audio:%d pad:%d\n"), secsize, secspt, bytespt, isaudio, pad); } if (lverbose) { if (tracksize > 0) - printf("\rTrack %02d: 0 of %4lld MB written.", + printf(_("\rTrack %02d: 0 of %4lld MB written."), track, tracksize >> 20); else - printf("\rTrack %02d: 0 MB written.", track); + printf(_("\rTrack %02d: 0 MB written."), track); flush(); neednl = TRUE; } @@ -135,7 +137,7 @@ /* XXX next wr addr ??? */ count = get_buf(f, trackp, startsec, &bp, bytes_to_read); if (count < 0) - comerr("read error on input file\n"); + comerr(_("read error on input file\n")); if (count == 0) break; bytes_read += count; @@ -147,7 +149,7 @@ if (count < bytespt) { if (debug) { - printf("\nNOTICE: reducing block size for last record.\n"); + printf(_("\nNOTICE: reducing block size for last record.\n")); neednl = FALSE; } @@ -155,14 +157,14 @@ amount = secsize - amount; fillbytes(&bp[count], amount, '\0'); count += amount; - printf("\nWARNING: padding up to secsize.\n"); + printf(_("\nWARNING: padding up to secsize.\n")); neednl = FALSE; } if (is_packet(trackp) && trackp->pktsize > 0) { if (count < bytespt) { amount = bytespt - count; count += amount; - printf("\nWARNING: padding remainder of packet.\n"); + printf(_("\nWARNING: padding remainder of packet.\n")); neednl = FALSE; } } @@ -197,13 +199,13 @@ amount = write_secs(scgp, dp, bp, startsec, bytespt, secspt, islast); if (amount < 0) { if (is_packet(trackp) && trackp->pktsize == 0 && !retried) { - printf("%swrite track data: error after %lld bytes, retry with new packet\n", + printf(_("%swrite track data: error after %lld bytes, retry with new packet\n"), neednl?"\n":"", bytes); retried = 1; neednl = FALSE; goto retry; } - printf("%swrite track data: error after %lld bytes\n", + printf(_("%swrite track data: error after %lld bytes\n"), neednl?"\n":"", bytes); return (-1); } @@ -216,12 +218,12 @@ float fspeed; gettimeofday(&tcur, (struct timezone *)0); - printf("\rTrack %02d: %4lld", track, bytes >> 20); + printf(_("\rTrack %02d: %4lld"), track, bytes >> 20); if (tracksize > 0) - printf(" of %4lld MB", tracksize >> 20); + printf(_(" of %4lld MB"), tracksize >> 20); else printf(" MB"); - printf(" written"); + printf(_(" written")); fper = fifo_percent(TRUE); if (fper >= 0) printf(" (fifo %3d%%)", fper); @@ -285,7 +287,7 @@ if ((padbytes >> 20) > 0) { neednl = TRUE; } else if (lverbose) { - printf("Track %02d: writing %3lld KB of pad data.\n", + printf(_("Track %02d: writing %3lld KB of pad data.\n"), track, (Llong)(padbytes >> 10)); neednl = FALSE; } @@ -294,7 +296,7 @@ bytes += savbytes; startsec += savbytes / secsize; } - printf("%sTrack %02d: Total bytes read/written: %lld/%lld (%lld sectors).\n", + printf(_("%sTrack %02d: Total bytes read/written: %lld/%lld (%lld sectors).\n"), neednl?"\n":"", track, bytes_read, bytes, bytes/secsize); return (0); } diff -Nru cdrtools-2.01.01a33/cdrecord/wm_session.c cdrtools-3.02a09/cdrecord/wm_session.c --- cdrtools-2.01.01a33/cdrecord/wm_session.c 2006-09-13 15:35:12.000000000 +0000 +++ cdrtools-3.02a09/cdrecord/wm_session.c 2009-07-10 19:44:45.000000000 +0000 @@ -1,13 +1,14 @@ -/* @(#)wm_session.c 1.5 06/09/13 Copyright 1995, 1997 J. Schilling */ +/* @(#)wm_session.c 1.8 09/07/10 Copyright 1995, 1997, 2001-2009 J. Schilling */ +#include #ifndef lint -static char sccsid[] = - "@(#)wm_session.c 1.5 06/09/13 Copyright 1995, 1997 J. Schilling"; +static UConst char sccsid[] = + "@(#)wm_session.c 1.8 09/07/10 Copyright 1995, 1997, 2001-2009 J. Schilling"; #endif /* * CDR write method abtraction layer * session at once / disk at once writing intercace routines * - * Copyright (c) 1995, 1997 J. Schilling + * Copyright (c) 1995, 1997, 2001-2009 J. Schilling */ /* * The contents of this file are subject to the terms of the @@ -22,7 +23,7 @@ */ #include -#include +#include #include #include #include diff -Nru cdrtools-2.01.01a33/cdrecord/wm_track.c cdrtools-3.02a09/cdrecord/wm_track.c --- cdrtools-2.01.01a33/cdrecord/wm_track.c 2006-09-13 15:35:12.000000000 +0000 +++ cdrtools-3.02a09/cdrecord/wm_track.c 2009-07-10 19:44:45.000000000 +0000 @@ -1,13 +1,14 @@ -/* @(#)wm_track.c 1.5 06/09/13 Copyright 1995, 1997, 2004 J. Schilling */ +/* @(#)wm_track.c 1.8 09/07/10 Copyright 1995, 1997, 2004-2009 J. Schilling */ +#include #ifndef lint -static char sccsid[] = - "@(#)wm_track.c 1.5 06/09/13 Copyright 1995, 1997, 2004 J. Schilling"; +static UConst char sccsid[] = + "@(#)wm_track.c 1.8 09/07/10 Copyright 1995, 1997, 2004-2009 J. Schilling"; #endif /* * CDR write method abtraction layer * track at once writing intercace routines * - * Copyright (c) 1995, 1997, 2004 J. Schilling + * Copyright (c) 1995, 1997, 2004-2009 J. Schilling */ /* * The contents of this file are subject to the terms of the @@ -22,7 +23,7 @@ */ #include -#include +#include #include #include #include diff -Nru cdrtools-2.01.01a33/cdrecord/xio.c cdrtools-3.02a09/cdrecord/xio.c --- cdrtools-2.01.01a33/cdrecord/xio.c 2006-12-17 19:28:30.000000000 +0000 +++ cdrtools-3.02a09/cdrecord/xio.c 2009-07-18 16:56:32.000000000 +0000 @@ -1,12 +1,13 @@ -/* @(#)xio.c 1.16 06/12/17 Copyright 2003-2006 J. Schilling */ +/* @(#)xio.c 1.20 09/07/18 Copyright 2003-2009 J. Schilling */ +#include #ifndef lint -static char sccsid[] = - "@(#)xio.c 1.16 06/12/17 Copyright 2003-2006 J. Schilling"; +static UConst char sccsid[] = + "@(#)xio.c 1.20 09/07/18 Copyright 2003-2009 J. Schilling"; #endif /* * EXtended I/O functions for cdrecord * - * Copyright (c) 2003-2006 J. Schilling + * Copyright (c) 2003-2009 J. Schilling */ /* * The contents of this file are subject to the terms of the @@ -26,10 +27,7 @@ #include #include #include - -#ifdef NEED_O_BINARY -#include /* for setmode() prototype */ -#endif +#include /* for setmode() prototype */ #ifdef VMS #include @@ -102,11 +100,9 @@ if (name == NULL) { xp = &x_stdin; xp->x_refcnt++; -#ifdef NEED_O_BINARY if ((oflag & O_BINARY) != 0) { setmode(STDIN_FILENO, O_BINARY); } -#endif return (xp); } for (; pp; pp = pp->x_next) { @@ -144,6 +140,9 @@ xio_t *xp = vp; off_t off = (off_t)0; + if (xp == (xio_t *)NULL) + return ((off_t)-1); + xp->x_startoff = off = lseek(xp->x_file, (off_t)0, SEEK_CUR); if (xp->x_startoff == (off_t)-1) { xp->x_startoff = (off_t)0; diff -Nru cdrtools-2.01.01a33/Changelog cdrtools-3.02a09/Changelog --- cdrtools-2.01.01a33/Changelog 2004-09-09 10:05:37.000000000 +0000 +++ cdrtools-3.02a09/Changelog 2010-06-01 22:08:28.000000000 +0000 @@ -1,7752 +1,14840 @@ -***** Version 2.01 ******** - -Wed Sep 8 20:26:34 2004 Joerg Schilling - * cdrecord.c 1.297 - * readcd.c 1.74 - * cdrecord.c 1.296 - Version -> 2.01 - -Sat Sep 4 22:28:05 2004 Joerg Schilling - * scsidefs.h 1.28 - * scsisense.h 2.18 - * scsicdb.h 2.19 - * scsireg.h 1.31 - * scgcmd.h 2.22 +Wed Jun 2 00:07:33 2010 joerg + * cdrecord/version.h 1.55 + Version -> 3.00 + +Tue Jun 1 22:15:39 2010 joerg + * mkisofs/write.c 1.129 + in assign_file_addresses() dwpnt erst dann in dw_head/dw_tail deferred_write Liste einhaengen nachdem s_entry->mxpart == 0 geskippt wurde + Wenn s_entry->mxpart == 0 geskippt wird, dann Speicherleck vermeiden durch free(dwpnt) + +Tue Jun 1 19:20:53 2010 joerg + * cdrecord/cdrecord.1 1.143 + Weitere kleinere Fehlerberichtigung + +Sat May 29 19:01:22 2010 joerg + * cdrecord/cdrecord.1 1.142 + EXAMPLES Section nun mit Zwischenueberschriften + +Sat May 29 15:08:42 2010 joerg + * mkisofs/write.c 1.128 + Versteckte Eintraege in sort_directory() nicht mehr von hinten nach vorn vom Ende eintragen sondern vorwaerts um die Reihenfolge von MULTI_EXTENT Listen zu behalten + +Fri May 28 23:22:02 2010 joerg + * cdrecord/cdrecord.1 1.141 + Viele kleinere Schreibfehlerkorrekturen + +Fri May 28 23:20:10 2010 joerg + * cdrecord/readcd.1 1.44 + * scgcheck/scgcheck.1 1.17 + * btcflash/btcflash.1 1.8 + * scgskeleton/scgskeleton.1 1.2 + Aenderungen passend zu cdrecord.1 + +Mon May 24 16:02:59 2010 joerg + * libscg/scsi-openserver.c 1.35 + * libscg/scsi-linux-sg.c 1.95 + * libedc/repair.c 1.4 + * libedc/edcspeed.c 1.5 + * libedc/edc_ecc_dec.c 1.12 + * libedc/edc_ecc.c 1.29 + * cdrecord/vendor.c 1.5 + * cdda2wav/scsi_cmds.c 1.51 + * libscg/scsi-mac-iokit.c 1.17 + * libscg/rdummy.c 1.4 + * mkisofs/diag/isovfy.c 1.43 + * mkisofs/diag/isoinfo.c 1.80 + * mkisofs/diag/isodebug.c 1.27 + * libscg/scsierrs.c 2.34 + * libscgcmd/read.c 1.159 + * libschily/gettimeofday.c 1.4 + * libschily/format.c 1.49 + * libschily/fconv.c 1.42 + * libschily/cmpnullbytes.c 1.9 + * libschily/cmpbytes.c 1.22 + * btcflash/btcflash.c 1.16 + * libsiconv/sic_nls.c 1.16 + * mkisofs/joliet.c 1.64 + * mkisofs/tree.c 1.123 + * rscsi/rscsi.c 1.38 + * scgcheck/scgcheck.c 1.19 + * scgcheck/sense.c 1.10 Cstyle -Wed Aug 25 13:28:57 2004 Joerg Schilling - * cdrecord.c 1.295 - Warnung fuer Linux-2.6.8.1 neu - -Tue Aug 24 01:11:42 2004 Joerg Schilling - * scsi-remote.c 1.16 - Auch die euid auf pw->pw_uid setzen bevor exec(RSH gemacht wird - -Thu Aug 19 12:14:09 2004 Joerg Schilling - * cdrecord.c 1.294 - Version -> 2.01a38 - -Thu Aug 19 12:08:26 2004 Joerg Schilling - * cdrecord.c 1.293 - linuxcheck() im %I% verbessert ;-) - -Mon Aug 16 16:42:17 2004 Joerg Schilling - * cdrecord.c 1.292 - Version -> 2.01a37 - SuSE Kommentar erweitert. - -Sun Aug 8 23:04:39 2004 Joerg Schilling - * scsi_mmc.c 1.10 - struct features & struct profiles -> LOCAL - -Thu Aug 5 10:26:18 2004 Joerg Schilling - * cdrecord.c 1.291 - Kommentar vor linuxcheck() erweitert - -Wed Aug 4 02:30:51 2004 Joerg Schilling - * cdrecord.c 1.290 - Version -> 2.01a36 - max_dma ist nun 4/5 der DMA Speed statt 1/2 - Warnung wegen Linux-2.6 eingebaut - Warnung wegen SuSE Linux eingebaut - -Sat Jul 31 17:41:06 2004 Joerg Schilling - * cdrecord.c 1.289 - Version -> 2.01a35 - Check auf dma_speed > 0, dma_speed Test nur wenn tracks > 0 - -Mon Jul 19 11:10:00 2004 Joerg Schilling - * scsi-wnt.c 1.45 - SPTI nicht bei NT-4.0 als Default - -Sun Jul 18 01:26:08 2004 Joerg Schilling - * cdrecord.c 1.288 - Version -> 2.01a34 - Mehr Tests auf Korektheit der Werte (sinnvoller Bereich in get_dmaspeed()) - dma_speed nur dann auswerten wenn > 0 - -Sun Jul 11 02:28:23 2004 Joerg Schilling - * cdrecord.1 1.103 - CDR_FORCESPEED domumentiert - -Sun Jul 11 01:57:27 2004 Joerg Schilling - * skel.c 1.3 - * readcd.c 1.73 - * xio.c 1.11 - -> NEED_O_BINARY - -Sun Jul 11 01:32:49 2004 Joerg Schilling - * readcd.c 1.72 - * skel.c 1.2 - MINGW32 neu - -Sun Jul 11 01:30:12 2004 Joerg Schilling - * xio.c 1.10 - setmode() auch bei MINGW32 - -Fri Jul 9 00:05:39 2004 Joerg Schilling - * cdrecord.c 1.287 - Version -> 2.01a33 - get_dmaspeed() neu - kein nice() bei __DJGPP__ - -Fri Jun 18 17:46:20 2004 Joerg Schilling - * scsi-wnt.c 1.44 - if (isdigit(vers) -> if (isdigit(vers[0]) (bug korrigiert - -Fri Jun 18 01:17:54 2004 Joerg Schilling - * drv_dvdplus.c 1.15 - * drv_dvd.c 1.118 - long dvd_next_addr -> LOCAL long dvd_next_addr - -Thu Jun 17 23:20:27 2004 Joerg Schilling - * scsierrs.c 2.29 - * scsitransp.c 1.91 - Bitfeld Typen fuer printf() auf int casten wegen IRIX cc - -Thu Jun 17 11:24:48 2004 Joerg Schilling - * readcd.c 1.71 - Verbose Ausgabe fuer Fehlerkorrekturen nochmals angepasst - -Sun Jun 13 16:28:28 2004 Joerg Schilling - * readcd.c 1.70 - maxtry neu - -Sun Jun 13 16:00:20 2004 Joerg Schilling - * readcd.c 1.69 - Ausgabe der maximale Anzahl der Retries - -Sat Jun 12 15:14:49 2004 Joerg Schilling - * drv_dvdplus.c 1.14 - * drv_dvd.c 1.117 - RAW & TAO Schreibmodi nach check_writemodes() loeschen damit niemand cdrecord -raw fuer DVDs aufruft - -Sat Jun 12 13:48:12 2004 Joerg Schilling - * scsi-linux-ata.c 1.7 - Warntext geaendert - -Fri Jun 11 16:49:15 2004 Joerg Schilling - * readcd.c 1.68 - Version -> 2.01a32 - -scanbus funktioniert nun auch wenn dev= nicht angegeben und /etc/default/cdrecord vorhanden - Auflistung der defekten Sektoren in allozierter Liste +Mon May 24 15:55:28 2010 joerg + * libedc/edcspeed.c 1.6 + Generischer Copyright Kommentar + +Sat May 22 12:21:25 2010 joerg + * libscg/scsi-bsd.c 1.51 + Kommando erneut senden wenn (ccb->ccb_h.status & CAM_STATUS_MASK) == CAM_REQUEUE_REQ + +Fri May 21 20:25:07 2010 joerg + * libsiconv/sic_nls.c 1.15 + iconv_close() nur rufen wenn USE_ICONV definiert ist + +Mon May 17 23:34:14 2010 joerg + * scgskeleton/skel.c 1.21 + NEED_PRSTATS neu + +Mon May 17 23:16:59 2010 joerg + * cdrecord/drv_bd.c 1.19 + blen = 0 um GCC ruhigzustellen (Meldung ist wie haeufig falsch ;-) + +Mon May 17 23:03:05 2010 joerg + * cdrecord/version.h 1.54 + Version -> 2.01.01a79 + +Mon May 17 22:12:57 2010 joerg + * cdrecord/drv_bd.c 1.18 + BD-RE kann nun formatiert werden + +Mon May 17 22:09:43 2010 joerg + * cdrecord/drv_dvdplus.c 1.61 + cdrecord -format -v gibt nun auch ohne #define DVDPLUS_DEBUG Fortschrittinformationen aus + +Sun May 16 19:20:20 2010 joerg + * libscg/scg/scsireg.h 1.34 + Diverse Format type Definitionen (inclusive 0x30 == FCAP_TYPE_BDRE_SPARE) + +Sat May 15 18:06:27 2010 joerg + * cdrecord/README.compile 1.22 + * makefiles/RULES/rules.prg 1.20 + INSDEFUMASK -> DEFINSUMASK + +Sat May 15 16:41:54 2010 joerg + * cdrecord/README.compile 1.21 + INSDEFUMASK= neu + +Sat May 15 16:31:51 2010 joerg + * makefiles/RULES/rules.ins 1.22 + * makefiles/RULES/rules.prg 1.19 + * makefiles/RULES/i486-mingw32_nt-gcc.rul 1.8 + * makefiles/RULES/i786-mingw32_nt-gcc.rul 1.8 + * makefiles/RULES/cc-sco_os.rul 1.9 + * makefiles/RULES/i586-mingw32_nt-gcc.rul 1.8 + * makefiles/RULES/cc-apollo.rul 1.9 + * makefiles/RULES/hppa-nextstep-cc.rul 1.11 + * makefiles/RULES/i386-openserver-gcc.rul 1.8 + * makefiles/RULES/hppa-nextstep-gcc.rul 1.11 + * makefiles/RULES/i686-mingw32_nt-gcc.rul 1.8 + * makefiles/RULES/i386-mingw32_nt-gcc.rul 1.8 + INSMKDIR neu + +Fri May 14 20:17:15 2010 joerg + * rscsi/Makefile.dfl 1.4 + * cdrecord/Makefile.dfl 1.5 + Umbau auf AUXSRCEXT= .dfl + +Fri May 14 20:12:57 2010 joerg + * makefiles/RULES/rules.aux 1.9 + $(AUXSRCEXT) neu + +Fri May 14 16:59:41 2010 joerg + * cdrecord/README.compile 1.20 + DEFUMASK= neu + +Fri May 14 16:41:11 2010 joerg + * pkgdefs/CSW/CSWstar/prototype 1.2 + * pkgdefs/CSW/CSWved/prototype 1.2 + * pkgdefs/CSW/CSWschilyutils/prototype 1.4 + * pkgdefs/CSW/CSWcdrtools/prototype 1.4 + Diverse neue Manpages in CSW*/prototype + +Fri May 14 16:37:07 2010 joerg + * cdrecord/README.compile 1.19 + INS_RBASE= neu + RUNPATH= neu + DEFMANBASE= neu + STRIPFLAGS=-s neu + +Fri May 14 16:03:37 2010 joerg + * makefiles/RULES/rules.man 1.5 + * makefiles/RULES/rules1.top 1.43 + MANBASE= neu fuer man Prefix, DEFMANBASE=. setzt "keinen" Prefix + +Thu May 13 21:27:18 2010 joerg + * rscsi/Makefile.dfl 1.3 + * cdrecord/Makefile.dfl 1.4 + INSMODE= 0644 neu + +Thu May 13 20:44:38 2010 joerg + * makefiles/RULES/rules.cmd 1.13 + INSFLAGS += $(STRIPFLAGS) neu + +Thu May 13 20:38:20 2010 joerg + * makefiles/RULES/rules.ins 1.21 + $(INSOPTX) neu + +Thu May 13 19:03:09 2010 joerg + * scgskeleton/Makefile 1.16 + Makefile.man scgskeleton.1 neu + +Thu May 13 19:02:39 2010 joerg + * scgskeleton/Makefile.man 1.1 + * scgskeleton/scgskeleton.1 1.1 + date and time created 10/05/13 19:02:39 by joerg + +Tue May 11 23:32:48 2010 joerg + * makefiles/RULES/MKLINKS 1.88 + x86_64-linux-gcc32.rul sparc64-linux-gcc32.rul mips64-linux-gcc32.rul parisc64-linux-gcc32.rul neu + +Tue May 11 23:27:52 2010 joerg + * makefiles/RULES/i586-linux-gcc32.rul 1.14 + 32 Bit Support neu + +Tue May 11 22:39:43 2010 joerg + * libsiconv/sic_nls.c 1.14 + sic_close() funktioniert nun + +Tue May 11 22:18:04 2010 joerg + * cdrecord/readcd.c 1.111 + * scgskeleton/doit.c 1.28 + * scgskeleton/skel.c 1.20 + * btcflash/skel.c 1.24 + * mkisofs/diag/isovfy.c 1.42 + Unbenoetigte Funktionen auskommentiert + +Tue May 11 22:10:17 2010 joerg + * include/schily/siconv.h 1.4 + sic_close() nun mit int statt void return + sic_refcnt neu + +Tue May 11 21:26:18 2010 joerg + * cdrecord/readcd.1 1.43 + .....SS "OS Interface options" beseitigt + +Tue May 11 00:22:43 2010 joerg + * cdrecord/drv_mmc.c 1.198 + #ifdef PRINT_ATIP -> PRINT_PMA um get_pma() + +Tue May 11 00:18:25 2010 joerg + * cdrecord/drv_dvd.c 1.162 + #ifdef __needed__ um set_layerbreak() und send_dvd0F() + +Tue May 11 00:12:03 2010 joerg + * cdrecord/drv_jvc.c 1.94 + read_disk_info_teac() mit #ifdef XDI und buffer_inquiry_teac() mit #ifdef XXDEBUG + +Sun May 9 17:17:39 2010 joerg + * cdrecord/drv_dvd.c 1.161 + Kommentar zu "WARNING: Phys disk size %ld differs..." damit wir fahlerhafte Ausgaben in Zukunft besser eingrenzen koennen + +Sat May 8 17:20:36 2010 joerg + * libschily/dirname.c 1.1 + * libschily/basename.c 1.1 + date and time created 10/05/08 17:20:36 by joerg + +Sat May 8 17:19:03 2010 joerg + * libschily/fnmatch.c 8.15 + static const mbstate_t initial -> static mbstate_t initial im SunPro C Warningen zu vermeiden + +Sat May 8 14:20:41 2010 joerg + * include/schily/_regex.h 1.2 + portabel gemacht + +Sat May 8 13:48:17 2010 joerg + * libschily/eaccess.c 1.4 + char *name -> const char *name wegen Kompatibilitaet zu access() und eaccess in libgen.h in Solaris + +Sat May 8 13:47:22 2010 joerg + * libschily/Targets 1.19 + basename.c und dirname.c neu + +Fri May 7 20:46:08 2010 joerg + * include/schily/limits.h 1.4 + * include/schily/wchar.h 1.17 + Copyright -> 2010 + +Fri May 7 19:20:25 2010 joerg + * include/schily/regex.h 1.1 + date and time created 10/05/07 19:20:25 by joerg + +Fri May 7 19:19:55 2010 joerg + * include/schily/limits.h 1.3 + _POSIX2_LINE_MAX neu + +Fri May 7 19:19:30 2010 joerg + * include/schily/libport.h 1.23 + strndup() wcsndup() neu + eaccess() nun mit const char * + basename() und dirname() neu, siehe libgen.h + +Fri May 7 19:12:25 2010 joerg + * include/schily/regex.mk 1.1 + date and time created 10/05/07 19:12:25 by joerg + +Fri May 7 19:11:41 2010 joerg + * include/schily/libgen.h 1.2 + basename() und dirname() neu, siehe auch libport.h + +Fri May 7 19:10:14 2010 joerg + * include/schily/libgen.mk 1.1 + date and time created 10/05/07 19:10:14 by joerg + +Fri May 7 19:10:07 2010 joerg + * include/schily/Targets 1.14 + libgen.mk regex.mk _regex.mk neu + +Fri May 7 19:05:59 2010 joerg + * include/schily/_regex.mk 1.1 + date and time created 10/05/07 19:05:59 by joerg + +Fri May 7 19:00:25 2010 joerg + * autoconf/configure.in 1.211 + * autoconf/xconfig.h.in 1.198 + HAVE_BASENAME HAVE_DIRNAME neu + +Fri May 7 00:00:41 2010 joerg + * libschily/strncpy.c 1.5 + * libschily/wcsncpy.c 1.6 + * libschily/wcsnlen.c 1.3 + * libschily/strnlen.c 1.3 + * libschily/wcsncat.c 1.3 + * libschily/strncat.c 1.3 + * libschily/strncmp.c 1.4 + * libschily/wcsncmp.c 1.4 + Umbau auf len == 0 Test statt ~0 + +Thu May 6 22:39:43 2010 joerg + * libschily/Targets 1.18 + strndup.c und wcsndup.c neu -Thu Jun 10 10:58:19 2004 Joerg Schilling - * cdrecord.1 1.102 - Schreibfehler +Thu May 6 22:39:03 2010 joerg + * libschily/fnmatch.c 8.14 + Cstyle -Wed Jun 2 22:54:33 2004 Joerg Schilling - * cdrecord.1 1.101 - -clone dokumentiert - -Tue May 25 17:33:15 2004 Joerg Schilling - * readcd.c 1.67 - Vsersion -> 2.01a31 - -Tue May 25 17:32:29 2004 Joerg Schilling - * readcd.c 1.66 - -scanbus neu - -Tue May 25 01:36:00 2004 Joerg Schilling - * cdrecord.h 1.161 - * scsi_cdr.c 1.137 - * drv_mmc.c 1.157 - write_buffer() neu und write_buffer() in drv_mmc.c -> yamaha_write_buffer() - -Thu May 20 16:42:12 2004 Joerg Schilling - * scsi-linux-sg.c 1.83 - Kommentar gegen die Debian patches fuer /dev/hd* - -Thu May 20 16:24:11 2004 Joerg Schilling - * scsi-linux-ata.c 1.6 - Bis zu 25 /dev/hd%c Files oeffnen - -Thu May 20 16:14:33 2004 Joerg Schilling - * scsi-linux-sg.c 1.82 - Kommentare um dumme Leute von SuSE davon abzuhalten wichtige Warnungen wegzupatchen - -Thu May 20 15:50:38 2004 Joerg Schilling - * cdrecord.1 1.100 - Kommentar zu benoetigten Root Rechten neu - -Thu May 20 15:35:52 2004 Joerg Schilling - * cdrecord.c 1.286 - Bessere Kommentare gegen SuSE die cdrecord nicht als root laufen lasse wollen - -Wed May 19 00:54:29 2004 Joerg Schilling - * cdrecord.c 1.285 - Make sure you are root. nur ausgeben wenn euid != 0 - -Wed May 19 00:47:48 2004 Joerg Schilling - * cdrecord.c 1.284 - Version -> 2.01a29 - reload geht nun auch fuer Notebook Laufwerke wieder - -Wed May 19 00:45:26 2004 Joerg Schilling - * cdrecord.h 1.160 - * scsi_mmc.c 1.9 - print_format_capacities() neu - -Wed May 19 00:27:28 2004 Joerg Schilling - * cdrecord.1 1.99 - Bessere beschreibung der Hintergruende fuer eine gute Wahl der FIFO Groesse (fs=) - -Mon May 17 00:38:17 2004 Joerg Schilling - * cdrecord.1 1.98 - Bessere Dokumentation fuer DVD +Thu May 6 13:37:54 2010 joerg + * libschily/strndup.c 1.1 + date and time created 10/05/06 13:37:54 by joerg + +Tue May 4 22:51:53 2010 joerg + * makefiles/RULES/MKLINKS 1.87 + i386-darwin-cc32.rul i386-darwin-gcc32.rul neu + +Tue May 4 22:51:22 2010 joerg + * makefiles/RULES/power-macintosh-darwin-cc32.rul 1.4 + * makefiles/RULES/cc-gcc32.rul 1.12 + * makefiles/RULES/power-macintosh-darwin-gcc32.rul 1.4 + 32 Bit Support neu + +Tue May 4 22:50:32 2010 joerg + * makefiles/RULES/power-macintosh-darwin-cc64.rul 1.4 + -m64 -> $(GCC_OPT64) + +Tue May 4 00:37:55 2010 joerg + * libschily/wcsndup.c 1.1 + date and time created 10/05/04 00:37:55 by joerg + +Sun May 2 16:22:39 2010 joerg + * libschily/fnmatch.c 8.13 + Aufruestung auf fnmatch.c-1.19 FreeBSD vom 16.4.2010 erlaubt multibyte character + +Sun May 2 16:19:29 2010 joerg + * include/schily/wchar.h 1.16 + Wenn nicht HAVE_MBSINIT HAVE_MBRTOWC HAVE_WCRTOMB, Rueckfall auf statuslosw Funktionen mbtowc() wcrtomb() + +Sun May 2 12:46:55 2010 joerg + * autoconf/xconfig.h.in 1.197 + * autoconf/configure.in 1.210 + HAVE_STRNDUP HAVE_WCSNDUP neu + +Sat May 1 23:25:23 2010 joerg + * autoconf/configure.in 1.209 + * autoconf/xconfig.h.in 1.196 + HAVE_MBSINIT HAVE_MBRTOWC HAVE_WCRTOMB neu + +Sat May 1 23:06:26 2010 joerg + * include/schily/wchar.h 1.15 + mbrtowc() wcrtomb() mbsinit() neu + +Sat May 1 23:05:42 2010 joerg + * autoconf/xconfig.h.in 1.195 + * autoconf/configure.in 1.208 + AC_INCL_CHECK_TYPE fuer mbstate_t neu + +Sat May 1 21:44:25 2010 joerg + * libschily/fnmatch.c 8.12 + Aufruestung auf fnmatch.c-1.15 FreeBSD vom 1.2.2002 erlaubt nun '[' am Anfang eines Range Pattern + +Sat May 1 18:46:51 2010 joerg + * libschily/strnlen.c 1.2 + * libschily/wcsnlen.c 1.2 + vergessenes len-- hinter if (++len == 0) { eingefuegt + +Sat May 1 15:53:59 2010 joerg + * conf/setup.sh 1.17 + cd smake-1.2/psmake/ -> cd smake-*/psmake/. und aehnlich fuer zukuenftige Versionsaenderungen + +Sat May 1 15:03:45 2010 joerg + * include/schily/wchar.h 1.14 + wctype_t nich neu definieren wegen Linux + +Sat May 1 15:00:13 2010 joerg + * autoconf/configure.in 1.207 + AC_INCL_CHECK_TYPE([#include ], wctype_t, int) nun mit HAVE_WCHAR_H und HAVE_WCTYPE_H wegen Linux Bug: kein wctype_t in wchar.h + +Fri Apr 30 22:09:08 2010 joerg + * include/schily/wchar.h 1.13 + wctype_t neu + +Fri Apr 30 22:04:28 2010 joerg + * autoconf/xconfig.h.in 1.194 + * autoconf/configure.in 1.206 + * autoconf/acgeneral.m4 1.12 + AC_INCL_CHECK_TYPE neu + Test auf wctype_t in wchar.h neu + +Fri Apr 30 21:37:38 2010 joerg + * include/schily/limits.h 1.2 + COLL_WEIGHTS_MAX neu + +Wed Apr 28 19:45:24 2010 joerg + * include/schily/libgen.h 1.1 + date and time created 10/04/28 19:45:24 by joerg + +Wed Apr 28 19:08:29 2010 joerg + * autoconf/xconfig.h.in 1.193 + * autoconf/configure.in 1.205 + AC_CHECK_HEADERS(regex.h regexp.h regexpr.h) neu + +Tue Apr 27 20:42:14 2010 joerg + * libfind/find.c 1.90 + Vergessene Umwandlungen von state->std[1] -> fp nachgeruestet bei FPRINT uns aehnlich + +Mon Apr 26 21:27:47 2010 joerg + * cdda2wav/toc.h 1.12 + * cdda2wav/scsi_cmds.c 1.50 + * cdda2wav/interface.c 1.72 + * libschily/fnmatch.c 8.11 + * include/schily/fnmatch.h 8.11 + * include/schily/ccomdefs.h 1.9 + * include/schily/libport.h 1.22 + Copyright -> 2010 + +Mon Apr 26 21:18:41 2010 joerg + * cdrecord/version.h 1.53 + Version -> 2.01.01a78 + +Mon Apr 26 19:59:03 2010 joerg + * libschily/wcsnlen.c 1.1 + date and time created 10/04/26 19:59:03 by joerg + +Mon Apr 26 19:58:59 2010 joerg + * libschily/strnlen.c 1.1 + date and time created 10/04/26 19:58:59 by joerg + +Mon Apr 26 19:12:41 2010 joerg + * libschily/Targets 1.17 + * include/schily/libport.h 1.21 + strnlen() strlcat() wcsnlen() wcslcat() neu + +Mon Apr 26 19:11:29 2010 joerg + * include/schily/fnmatch.h 8.10 + * autoconf/aclocal.m4 1.89 + GNU fnmatch hat FNM_CASEFOLD aber nicht FNM_IGNORECASE + +Mon Apr 26 19:06:12 2010 joerg + * autoconf/xconfig.h.in 1.192 + * autoconf/configure.in 1.204 + HAVE_STRLCAT HAVE_STRNLEN HAVE_WCSLCAT HAVE_WCSNLEN neu + +Mon Apr 26 15:59:59 2010 joerg + * libschily/strlcat.c 1.1 + date and time created 10/04/26 15:59:59 by joerg + +Mon Apr 26 15:59:20 2010 joerg + * libschily/wcslcat.c 1.1 + date and time created 10/04/26 15:59:20 by joerg + +Mon Apr 26 00:17:05 2010 joerg + * libschily/fnmatch.c 8.10 + * include/schily/fnmatch.h 8.9 + js_fnmatch() neu bei #ifndef HAVE_FNMATCH_IGNORECASE + +Mon Apr 26 00:01:19 2010 joerg + * autoconf/xconfig.h.in 1.191 + HAVE_FNMATCH_IGNORECASE nach HAVE_FNMATCH + +Sun Apr 25 23:59:34 2010 joerg + * libschily/fnmatch.c 8.9 + Anpassung an FreeBSD Version 1.11 vom 29. April 1997 + +Sun Apr 25 23:37:35 2010 joerg + * autoconf/aclocal.m4 1.88 + * autoconf/xconfig.h.in 1.190 + * autoconf/configure.in 1.203 + AC_FNMATCH_IGNORECASE neu + +Sun Apr 25 22:49:43 2010 joerg + * include/schily/fnmatch.h 8.8 + Fehlende Definitionen evt. immer nachdefinieren + +Sun Apr 25 22:26:49 2010 joerg + * mkisofs/write.c 1.127 + Hinweis auf -data-change-warn neu + +Sun Apr 25 17:58:36 2010 joerg + * mkisofs/joliet.c 1.63 + Hilfe fuer "Joliet tree sort failed": Hinweis auf -joliet-long bzw. Weglassen von -J + +Sun Apr 25 16:29:03 2010 joerg + * mkisofs/mkisofs.h 1.140 + * mkisofs/mkisofs.c 1.258 + * mkisofs/tree.c 1.122 + Archiv Output -o file nicht mehr archivieren + +Sun Apr 25 15:40:29 2010 joerg + * mkisofs/joliet.c 1.62 + * mkisofs/write.c 1.126 + Hinweis auf -no-limit-pathtables neu + +Sun Apr 25 14:08:47 2010 joerg + * mkisofs/mkisofs.8 1.135 + * mkisofs/mkisofs.c 1.257 + Neue Option -data-change-warn + +Thu Apr 22 00:16:48 2010 joerg + * libfind/find.c 1.89 + * libfind/find_main.c 1.66 + Copyright -> 2010 + +Tue Apr 20 23:47:11 2010 joerg + * libfind/find.c 1.88 + -executable/-readable/-writable neu in usage() + +Tue Apr 20 00:26:32 2010 joerg + * libfind/find.c 1.87 + -print0 -fprint -fprintnnl -fprint0 -fls -empty -readable -writable -executable -execdir -okdir neu + Wenn nexttoken() nach "(" NULL liefert, wird nun der Parser abgebrochen + Bei ")" und -help wird nun korrekt vor dem Parser-Abbruch auch das setjmp() zurueckgesetzt + -perm +mode ist nun implementiert + doexec() funktioniert nun dank malloc()/copy auch wieder korrekt obwohl vfork() statt fork() verwendet wird weil {} im Kind sonst auch den Vater ueberschreibt + +Mon Apr 19 00:14:23 2010 joerg + * libfind/find_tok.h 1.6 + -print0 -fprint -fprintnnl -fprint0 -fls -empty -readable -writable -executable -execdir -okdir neu + +Thu Apr 8 22:30:43 2010 joerg + * cdda2wav/cdda2wav.1 1.55 + Schreibfehler os -> is + +Thu Apr 8 22:29:56 2010 joerg + * cdrecord/README.cdtext 1.2 + Schreibfehler *.nf + +Tue Apr 6 23:25:39 2010 joerg + * libfind/find.c 1.86 + * libfind/find_tok.h 1.5 + -?min und -i* neu + +Sun Apr 4 22:28:32 2010 joerg + * libfind/find.c 1.85 + tokennames[] -> find_tok.h, find_token() verbessert + +Sun Apr 4 22:26:50 2010 joerg + * libfind/find_tok.h 1.4 + tokennames -> _find_tokennames, #ifdef TOKEN_NAMES neu + +Sun Apr 4 20:36:34 2010 joerg + * libfind/Targets 1.6 + find_tok.h neu + +Tue Mar 30 21:59:15 2010 joerg + * libfind/find_tok.h 1.3 + #defines und Array trennen -Mon May 17 00:18:21 2004 Joerg Schilling - * scsilog.c 1.17 +Tue Mar 30 21:48:30 2010 joerg + * libfind/find_tok.h 1.2 Besserer Kommentar -Sun May 16 23:46:51 2004 Joerg Schilling - * drv_mmc.c 1.156 - bei OPC "Power calibration area almost full" nicht als Fehler auffassen - -Sun May 16 17:01:24 2004 Joerg Schilling - * cdrecord.1 1.97 - Bessere Dokumentation der driver= Option - -Sun May 16 01:37:11 2004 Joerg Schilling - * cdrecord.1 1.96 - Diverse kleinere Schreibfehler beseitigt - -Sun May 16 01:26:52 2004 Joerg Schilling - * cdrecord.1 1.95 - Eißfeldt -> Ei\*sfeldt - µsec -> \*msec - -Sat May 15 23:14:18 2004 Joerg Schilling - * subchan.c 1.19 - index Variable -> curindex wegen GCC Shadow Warnung - -Sun May 9 17:59:31 2004 Joerg Schilling - * skel.c 1.1 - date and time created 04/05/09 16:59:31 by joerg - -Fri Apr 23 00:51:24 2004 Joerg Schilling - * scsi-wnt.c 1.43 - Padding fuer ASPI CMD Struktur damit auch 32 Byte Sense Daten von SPTI gehen - -Wed Apr 21 01:48:32 2004 Joerg Schilling - * scsi-wnt.c 1.42 - Support fuer SPTI & Kontroller mit mehr als einem SCSI Bus - Bei SPTI ist SENSE_LEN max nun 32 - -Sun Apr 18 13:26:43 2004 Joerg Schilling - * scsi-linux-sg.c 1.81 - MAX-SCG -> 256 wegen Linux USB Implementierung - -Fri Apr 16 15:29:34 2004 Joerg Schilling - * scsi_scan.c 1.19 - Bis zu 256 Busse scannen. - -Thu Apr 15 16:35:46 2004 Joerg Schilling - * cdrecord.c 1.283 - Version -> 2.01a28 - -Mon Apr 12 16:13:47 2004 Joerg Schilling - * cdrecord.1 1.94 - Read Book -> Red Book - -Tue Apr 6 11:59:03 2004 Joerg Schilling - * cdrecord.c 1.282 - Bessere Fehlermeldung bei fehlendem -pad/-shorttrack - -Mon Mar 15 01:59:49 2004 Joerg Schilling - * cdrecord.c 1.281 - Kommentar fuer cuefile= & -raw - -Wed Mar 10 21:54:36 2004 Joerg Schilling - * readcd.c 1.65 - * cdrecord.1 1.93 - * cdrecord.c 1.280 - ts= Doku besser - -Mon Mar 8 00:43:39 2004 Joerg Schilling - * scsi-linux-sg.c 1.80 - Fehler if (sp->u_sense.cmd_sense != 0 -> if (sp->u_sense.cmd_sense[0] != 0 korrigiert - Wenn ASC/ASQ und auch alle zusaetzlichen Bits/Key in Byte 2 0 sind, dann loeschen wir CHECK CONDITION wieder - weil das ein Linux USB Problem ist wo z.B. wegen einem DMA Underrun REQUEST SENSE geschickt wurde - und das Laufwerk erwartungemaesz mit NO SENSE geantwortet hat - -Sun Mar 7 23:43:08 2004 Joerg Schilling - * cdrecord.c 1.279 - Version -> 2.01a27 - -Thu Mar 4 09:24:11 2004 Joerg Schilling - * cdrecord.c 1.278 - Bugfix: Nach Umstellung des Tests auf Schreibmodus Option ging nur noch TAO - -Wed Mar 3 01:27:14 2004 Joerg Schilling - * drv_dvd.c 1.115 - * cue.c 1.20 - * isosize.c 1.9 - * drv_simul.c 1.47 - * getnum.c 1.2 - * movesect.c 1.3 +Tue Mar 30 20:45:08 2010 joerg + * libfind/find_tok.h 1.1 + date and time created 10/03/30 20:45:08 by joerg + +Sun Feb 28 22:58:12 2010 joerg + * cdrecord/version.h 1.52 + Version -> 2.01.01a77 + +Sun Feb 28 22:43:59 2010 joerg + * cdrecord/drv_bd.c 1.17 + BD-RE unterstuetzt kein "close session" + +Sun Feb 28 22:23:57 2010 joerg + * mkisofs/apple.c 1.42 + Copyright -> 2010 + +Sun Feb 28 21:29:40 2010 joerg + * makefiles/RULES/i86pc-sunos5-pcc.rul 1.1 + date and time created 10/02/28 21:29:40 by joerg + +Sun Feb 28 15:32:32 2010 joerg + * libfind/walk.c 1.39 + Abschliessendes strcatl() Argument -> (char *)0 wegen 64 Bit + +Sun Feb 28 15:31:08 2010 joerg + * autoconf/xconfig.h.in 1.189 + * autoconf/acspecific.m4 1.13 + HAVE_INLINE neu + +Tue Feb 23 22:05:40 2010 joerg + * include/schily/ccomdefs.h 1.8 + Hack fuer PCC weil er noch nicht __attribute__ ((__used__)) kann + +Tue Feb 23 12:20:35 2010 joerg + * makefiles/RULES/cc-pcc.rul 1.1 + date and time created 10/02/23 12:20:35 by joerg + +Mon Feb 22 22:29:50 2010 joerg + * cdrecord/readcd.c 1.110 + * cdrecord/cdrecord.c 1.397 + * cdrecord/cue.c 1.54 Cstyle -Tue Mar 2 21:02:42 2004 Joerg Schilling - * misc.c 1.4 - * cue.c 1.19 - Copyright -> 2004 +Mon Feb 22 20:25:02 2010 joerg + * makefiles/RULES/MKLINKS 1.86 + x86_64-dragonfly-cc.rul und x86_64-dragonfly-gcc.rul neu + +Mon Feb 22 20:23:03 2010 joerg + * cdrecord/cue.c 1.53 + Backslash am Eine einer normalen C Zeile wird nicht durch K&R C akzeptiert + +Sun Feb 21 16:46:49 2010 joerg + * cdrecord/cue.c 1.52 + INDEX 00 von EAC wird erst mit INDEX 01 ausgewertet, daher trackp[track].tracksecs -> trackp[track-1].tracksecs + +Tue Feb 16 22:23:51 2010 joerg + * cdrecord/version.h 1.51 + Version -> 2.01.01a76 + +Tue Feb 16 22:17:46 2010 joerg + * cdrecord/drv_bd.c 1.16 + Workaround fuer 'HL-DT-ST' 'BD-RE BH10LS30 ' '1.00' (zero sized BD Media) + +Tue Feb 16 22:12:28 2010 joerg + * cdrecord/drv_dvdplus.c 1.60 + dsp->ds_maxblocks = end_lba; -> dsp->ds_maxblocks = end_lba + 1; + +Tue Feb 16 21:45:17 2010 joerg + * cdrecord/cdrecord.c 1.396 + prtrack() ist nun global nutzbar + Abort wenn cuefile= verwendet wird aber kein CDMedium einliegt + +Tue Feb 16 21:43:20 2010 joerg + * cdrecord/cdrecord.1 1.140 + * cdrecord/cue.c 1.51 + Unterstuetzung fuer FILE zwischen INDEX 00 und INDEX 01 neu fuer EAC + +Tue Feb 16 20:39:50 2010 joerg + * include/schily/_regex.h 1.1 + date and time created 10/02/16 20:39:50 by joerg + +Sun Feb 14 23:26:13 2010 joerg + * cdrecord/readcd.1 1.42 + * cdrecord/readcd.c 1.109 + Copyright -> 2010 + +Sun Feb 14 22:30:53 2010 joerg + * cdrecord/cue.c 1.50 + * cdrecord/cdrecord.1 1.139 + ARRANGER, COMPOSER und MESSAGE neu + +Sun Feb 14 18:04:48 2010 joerg + * cdrecord/cdrecord.1 1.138 + CUE file Beschreibung neu + +Sun Feb 14 14:44:55 2010 joerg + * pkgdefs/CSW/CSWcdrtools/prototype 1.3 + cdda2mp3 cdda2ogg und cdda2mp3.1 neu + +Sun Feb 14 14:38:52 2010 joerg + * cdda2wav/cdda2ogg 1.5 + * cdda2wav/cdda2mp3 1.5 + * cdda2wav/cdda2ogg.1 1.4 + Optionen werden nun an cdda2wav weitergereicht + +Sun Feb 14 13:54:41 2010 joerg + * cdrecord/readcd.c 1.108 + * cdda2wav/scsi_cmds.c 1.49 + Workaround fuer kompletten Hang bei einer alten ASPI Version mit odd Byte len bei read full toc + +Fri Feb 12 20:38:36 2010 joerg + * cdrecord/fifo.c 1.64 + Fehlerhafter init_fifo() Prototyp korrigiert (wenn kein FIFO), notwendig nach Umstellung auf long return + +Thu Feb 11 23:36:07 2010 joerg + * cdrecord/cue.c 1.49 + parse_rem() und extabort(), sowie "REM CDRTOOLS" neu zum expliziten Einschalten der Erweiterungen + +Thu Feb 11 22:04:58 2010 joerg + * cdda2wav/cdda2ogg 1.4 + * cdda2wav/cdda2mp3 1.4 + generischer Copyright Kommentar neu + +Thu Feb 11 22:02:17 2010 joerg + * cdda2wav/cdda2ogg 1.3 + * cdda2wav/cdda2mp3 1.3 + -P0 beseitigt + +Thu Feb 11 22:00:43 2010 joerg + * cdda2wav/cdda2ogg.1 1.3 + Komplett ueberarbeitet + +Thu Feb 11 00:40:15 2010 joerg + * cdda2wav/cdda2mp3.mk 1.2 + * cdda2wav/cdda2ogg.mk 1.2 + INSMODE= 755 neu + +Thu Feb 11 00:21:25 2010 joerg + * cdda2wav/Makefile 1.26 + cdda2ogg und cdda2mp3 neu + +Thu Feb 11 00:13:34 2010 joerg + * cdda2wav/cdda2ogg.mk 1.1 + date and time created 10/02/11 00:13:34 by joerg + +Thu Feb 11 00:13:29 2010 joerg + * cdda2wav/cdda2mp3.mk 1.1 + date and time created 10/02/11 00:13:29 by joerg + +Thu Feb 11 00:07:17 2010 joerg + * cdrecord/cue.c 1.48 + newtrack() setzt jetzt mehr Default Werte fuer Track 0 wenn Track 1 gefunden wird + +Thu Feb 11 00:04:52 2010 joerg + * cdda2wav/cdda2mp3.1 1.1 + date and time created 10/02/11 00:04:52 by joerg + +Thu Feb 11 00:01:18 2010 joerg + * cdda2wav/cdda2mp3.mk1 1.1 + date and time created 10/02/11 00:01:18 by joerg + +Wed Feb 10 23:50:16 2010 joerg + * cdda2wav/cdda2ogg 1.2 + * cdda2wav/cdda2mp3 1.2 + Massive Verbesserungen + +Wed Feb 10 23:48:16 2010 joerg + * cdda2wav/cdda2wav.c 1.134 + REM CDDA2WAV -> REM CDRTOOLS + +Wed Feb 10 23:41:16 2010 joerg + * cdda2wav/cdda2wav.c 1.133 + * cdda2wav/cdda2wav.1 1.54 + -vaudio-tracks neu + +Wed Feb 10 23:35:50 2010 joerg + * cdda2wav/toc.c 1.96 + "Hidden audio track with %ld sectors found.\n" nicht mehr mit -q ausgeben + +Wed Feb 10 00:00:47 2010 joerg + * cdrecord/cue.c 1.47 + sp->secoff = 0 zu Begin einer neuen Datei + +Sun Feb 7 21:50:58 2010 joerg + * cdrecord/version.h 1.50 + Version -> 2.01.01a75 + +Sun Feb 7 21:50:19 2010 joerg + * cdrecord/cue.c 1.46 + Nur noch die invarianten track[0].flag Bits nach Track n kopieren + Support fuer Hidden Tracks neu + +Sun Feb 7 20:49:01 2010 joerg + * cdrecord/cdrecord.c 1.395 + cvt_hidden() kopiert nun TI_SWAB|TI_AUDIO|TI_COPY|TI_QUADRO|TI_PREEMP|TI_SCMS von Track 1 nach Track 0 + gargs() initialisiert nun auch trackp[0].sectype + prptrack() gibt nun trackp->sectype in HEX aus + +Sun Feb 7 16:31:19 2010 joerg + * cdrecord/cue.c 1.45 + Fehlende INDEX 00 Zeile bedeutet pregapsize = 0 und nicht pregapsize = -1 (Default Pregap) + +Sat Feb 6 22:09:10 2010 joerg + * cdda2wav/cdda2wav.c 1.132 + * cdda2wav/cdda2wav.1 1.53 + PREGAP neu fuer useHiddenTrack() == 0 und CUE Files + -vmcn und -visrc neu + +Sat Feb 6 21:43:56 2010 joerg + * cdda2wav/toc.c 1.95 + InitIterator() umgestellt um besser mit useHiddenTrack() klarzukommen + Fehlerhafte Eingabe bei cddb Auswahl fuehrt nun zu "ignore" + +Sat Feb 6 18:04:36 2010 joerg + * cdrecord/cue.c 1.44 + statewarn() neu und bessere Fehlermeldungen bei falscher Reihenfolge der Anweisungen + +Fri Feb 5 00:09:19 2010 joerg + * cdrecord/cue.c 1.43 + struct state -> trackno neu + TRACK Anweisungen koennen nun mit TRACK > 1 anfangen + Debug Prints mit Track entsprechend erweitert + +Thu Feb 4 00:29:06 2010 joerg + * cdrecord/cue.c 1.42 + Besserer Kommentar zu struct state + Neuer Test auf INDEX 00 bzw INDEX 01 == 00:00:00 am Anfang eines Files + parse_index() auf if then else if Kette umgestellt + +Wed Feb 3 22:07:06 2010 joerg + * cdrecord/subchan.c 1.27 + Hidden Tracks sind Track 1 Index 0, wir haben sie aber in Track "0". Sicherstellen, dass Track 1 in den Subkanaldaten steht + +Wed Feb 3 22:01:26 2010 joerg + * mkisofs/mkisofs.c 1.256 + Copyright -> 2010 + +Wed Feb 3 21:47:11 2010 joerg + * cdrecord/drv_mmc.c 1.197 + Version -> 2010 + +Wed Feb 3 21:46:54 2010 joerg + * cdrecord/drv_sony.c 1.87 + * cdrecord/drv_7501.c 1.29 + Anpassungen fuer Hidden Tracks in open_track_*() + +Sun Jan 31 22:52:35 2010 joerg + * cdrecord/version.h 1.49 + Version -> 2.01.01a74 + +Sun Jan 31 22:38:03 2010 joerg + * cdda2wav/cdda2wav.c 1.131 + Track= und Tracknumber= gegeneinander getauscht + +Sun Jan 31 22:37:35 2010 joerg + * cdda2wav/toc.c 1.94 + vergessene Debugmeldunf fuer Hidden Tracks beseitigt + +Sun Jan 31 22:36:13 2010 joerg + * cdrecord/cdrecord.c 1.394 + Anpassungen fuer Hidden Tracks: + write_track_data() is nun global + neue Funktion cvt_hidden() + neue Funktion prtrack() + +Sun Jan 31 22:21:33 2010 joerg + * cdrecord/drv_mmc.c 1.196 + Anpassungen fuer Hidden Tracks in open_track_mmc() + +Sun Jan 31 22:16:21 2010 joerg + * cdrecord/cdrecord.h 1.201 + Anpassungen fuer Hidden Tracks: + TI_HIDDEN / is_hidden() neu + auinfhidden() neu + write_track_data() ist nun global + +Sun Jan 31 22:12:21 2010 joerg + * cdrecord/auinfo.c 1.32 + Anpassungen fuer Hidden Tracks: + auinfo() prueft bei Trackspezifischen CD-Text Parametern ob track > 0 ist um nicht die globalen Werte zu ueberschreiben + Neue Funktion auinfhidden() + +Sun Jan 31 22:09:45 2010 joerg + * cdrecord/cdrecord.1 1.137 + Track= & Tracknumber= angepasst + +Sun Jan 31 19:43:08 2010 joerg + * cdrecord/fifo.c 1.63 + faio_reader() lies nun ab Track 0 wenn trackp[0].xfp != NULL + +Sun Jan 31 16:40:50 2010 joerg + * cdda2wav/wav.c 1.14 + auf_cuename WAV -> WAVE + +Sat Jan 30 12:35:10 2010 joerg + * cdrecord/auinfo.c 1.31 + auinfopen() neu + +Sat Jan 30 12:27:34 2010 joerg + * cdda2wav/cdda2wav.c 1.130 + Der Default fuer das Extrahieren nur eines Tracks ist wieder 1, auch wenn es einen hidden Track gibt + +Fri Jan 29 23:44:07 2010 joerg + * scgcheck/scgcheck.1 1.16 + * mkisofs/diag/isodebug.8 1.3 + * mkisofs/mkisofs.8 1.134 + * btcflash/btcflash.1 1.7 + * cdrecord/cdrecord.1 1.136 + * cdrecord/readcd.1 1.41 + cdwrite@lists.debian.org beseitigt + +Sun Jan 24 17:40:58 2010 joerg + * cdrecord/version.h 1.48 + Version -> 2.01.01a73 + +Sun Jan 24 17:39:56 2010 joerg + * cdda2wav/cdda2wav.c 1.129 + Heiko war seit 1993 Autor (nicht erst seit 1998) + +Sun Jan 24 17:39:13 2010 joerg + * cdda2wav/cdda2wav.1 1.52 + Heiko war "nur" 1993-2004 der Autor + +Sun Jan 24 17:22:08 2010 joerg + * cdda2wav/cdda2wav.c 1.128 + Neue Option -no-hiden-track + Ungenutzte Variable ip aus output_indices() beseitigt + Neuer *.inf File Tag "Track=" fuer absolute Tracknummer + Funktion write_cue_track() schreibt nun fuer TRACK korrekt absolute Tracknummern + Funktion write_cue_track() kommt nun mit global.trackindexlist[track] == NULL klar + Funktion write_cue_track() prueft nun useHiddenTrack() + Die Abkuerzung "proof" erlaubt nun paraopts=proof fuer paraopts=minoverlap=sectors-per-request-1,retries=200 + paraopts= impliziert nun -paranoia + -tn+max wird nun erkannt fuer eine Liste von Track von Track 'n' bis zum letzten audio Track + +Sun Jan 24 15:08:33 2010 joerg + * cdda2wav/cdda2wav.1 1.51 + Neues "makro" "proof" als Argument fuer paraopts= + +Sun Jan 24 14:38:54 2010 joerg + * cdda2wav/global.h 1.33 + paranoia_flags neu + +Sun Jan 24 14:21:07 2010 joerg + * cdda2wav/cdda2wav.1 1.50 + -no-hidden-track neu + -t n+max neu + +Sun Jan 24 00:51:02 2010 joerg + * cdrecord/auinfo.c 1.30 + * cdrecord/cdrecord.1 1.135 + Track= neu + +Sat Jan 23 22:24:14 2010 joerg + * cdda2wav/interface.c 1.71 + priv_on() erst nach dem Umschalten auf root aufrufen + +Fri Jan 22 23:36:07 2010 joerg + * cdda2wav/toc.c 1.93 + useHiddenTrack() ist nun benutzbar + check_hidden() neu fuer Test auf Hidden Tracks + +Fri Jan 22 23:34:10 2010 joerg + * cdda2wav/toc.h 1.11 + useHiddenTrack() neu + +Tue Jan 19 22:21:41 2010 joerg + * cdda2wav/global.h 1.32 + no_hidden_track neu + +Sun Jan 17 15:56:56 2010 joerg + * mkisofs/mkisofs.8 1.133 + "Alpha" Hinweis bei UDF beseitigt + +Thu Jan 14 00:59:33 2010 joerg + * cdda2wav/cdda2wav.c 1.127 + * cdda2wav/cdda2wav.1 1.49 + -cuefile neu + +Thu Jan 14 00:55:11 2010 joerg + * cdda2wav/toc.c 1.92 + ScanIndices() entfernt nicht mehr den am Ende der Indexliste stehenden Index0 Eintrag einer Liste wenn Index0 == -1 ist + +Tue Jan 12 22:41:45 2010 joerg + * cdda2wav/aifc.c 1.15 + * cdda2wav/raw.c 1.13 + * cdda2wav/sun.c 1.14 + * cdda2wav/sndfile.h 1.9 + * cdda2wav/aiff.c 1.14 + * cdda2wav/wav.c 1.13 + Copyright -> 2010 + +Tue Jan 12 22:26:29 2010 joerg + * cdda2wav/raw.c 1.12 + * cdda2wav/aiff.c 1.13 + * cdda2wav/sndfile.h 1.8 + * cdda2wav/wav.c 1.12 + * cdda2wav/aifc.c 1.14 + * cdda2wav/sun.c 1.13 + auf_cuename in struct soundfile neu fuer -cuefile + +Tue Jan 12 21:08:04 2010 joerg + * cdda2wav/global.h 1.31 + Neue Felder did_textfile und cuefile + +Tue Jan 12 21:07:30 2010 joerg + * cdda2wav/toc.c 1.91 + global.did_textfile neu zum Markieren ob ein *.cdtext File geschrieben wurde + +Mon Jan 11 22:32:15 2010 joerg + * cdda2wav/toc.c 1.90 + .cdtext File nur schreiben wenn mehr als der CD-Text Header vom LW gelesen wurde + +Sun Jan 10 22:08:45 2010 joerg + * cdrecord/version.h 1.47 + Version -> 2.01.01a72 + +Sun Jan 10 22:08:13 2010 joerg + * cdrecord/cue.c 1.41 + * cdrecord/auinfo.c 1.29 + Copyright -> 2010 + +Sun Jan 10 22:03:40 2010 joerg + * cdrecord/cdrecord.1 1.134 + *.inf File Format beschrieben + +Sun Jan 10 19:24:52 2010 joerg + * cdda2wav/cdda2wav.c 1.126 + Besserer Text bei *.inf Copy_permitted= fuer SCMS first copy + +Sun Jan 10 16:04:16 2010 joerg + * cdda2wav/cdda2wav.1 1.48 + * cdda2wav/cdda2wav.c 1.125 + * cdda2wav/global.h 1.30 + * cdda2wav/toc.c 1.89 + audio.cdtext File schreiben neu + Neue Option -no-textfile erlaubd das audio.cdtext File zu unterdruecken + +Sun Jan 10 00:42:15 2010 joerg + * cdda2wav/global.h 1.29 + * cdda2wav/cdda2wav.c 1.124 + * cdda2wav/cdda2wav.1 1.47 + Neue Option -no-textdefaults + +Sat Jan 9 22:27:45 2010 joerg + * cdrecord/auinfo.c 1.28 + Neue CD-Text Tags fuer die *.inf Files: + Albumsongwriter= + Albumcomposer= + Albumarranger= + Albummessage= + Albumclosed_info= + +Sat Jan 9 22:24:02 2010 joerg + * cdda2wav/global.h 1.28 + * cdda2wav/cd_text.c 1.10 + * cdda2wav/cdda2wav.c 1.123 + Neue CD-Text Tags fuer die *.inf Files: + Albumsongwriter= + Songwriter= + Albumcomposer= + Composer= + Albumarranger= + Arranger= + Albummessage= + Message= + Albumclosed_info= + Closed_info= + +Sat Jan 9 17:19:31 2010 joerg + * cdda2wav/global.h 1.27 + * cdda2wav/cd_extra.c 1.18 + * cdda2wav/toc.c 1.88 + * cdda2wav/cd_text.c 1.9 + * cdda2wav/cdda2wav.c 1.122 + global.creator -> global.performer, global.trackcreator -> global.trackperformer + +Sat Jan 9 16:23:25 2010 joerg + * cdrecord/cue.c 1.40 + needitem()/needword() mit neuem "Typ" Parameter fuer bessere Syntaxfehlermeldungen + cueabort() nun mit "col %d" fuer bessere Ortung des Fehlers + "Additional keyword rules" Kommentar neu + +Sat Jan 9 00:27:34 2010 joerg + * cdda2wav/cdda2wav.1 1.46 + * cdda2wav/cdda2wav.c 1.121 + -tall neu (alltracks) + +Sat Jan 9 00:16:00 2010 joerg + * cdda2wav/global.h 1.26 + Besserer Kommentar fuer struct global + +Thu Jan 7 22:06:53 2010 joerg + * cdrecord/cdrecord.c 1.393 + wait_input() nun wieder mit Variablendeklaration vor der ersten Anweisung + +Thu Jan 7 20:46:43 2010 joerg + * cdda2wav/ringbuff.c 1.23 + drop_buffer() nun wieder mit assert(free_buffers() < total_buffers); + get_oldest_buffer() testet nun mit geterrno() == 0 ob die sync Pipe vom anderen Prozess geschlossen wurde + +Thu Jan 7 20:40:43 2010 joerg + * cdda2wav/semshm.c 1.30 + semdestry() ruft nun free_sem() zum Zerstoeren der Semaphore + +Thu Jan 7 20:38:05 2010 joerg + * cdda2wav/cdda2wav.c 1.120 + get_oldest_buffer() liefert jetzt NULL wenn der zweite Prozess gestorben ist, damit kann die Schleife abgebrochen werden + +Tue Jan 5 20:52:32 2010 joerg + * mkisofs/apple.c 1.41 + Files sauber schliessen + Falsches close() direkt nach fdopen() verschoben an richtige Stelle + +Sun Jan 3 22:32:38 2010 joerg + * cdrecord/version.h 1.46 + Version -> 2.01.01a71 + +Sun Jan 3 22:32:07 2010 joerg + * cdrecord/cdrecord.1 1.133 + -isosize geht jetzt auch von stdin + +Sun Jan 3 22:20:55 2010 joerg + * cdrecord/cdrecord.c 1.392 + -isosize fuer stdin funktioniert nur mit dem ersten Track + +Sun Jan 3 21:06:43 2010 joerg + * cdrecord/cdrecord.c 1.391 + Bessere Warnungen von get_dmaspeed() + init_fifo() returniert nun die Groesse des FIFOs + bisosize() neu + -isosize funktioniert nun auch wenn der Datentrack von stdin gelesen wird + +Sun Jan 3 20:27:07 2010 joerg + * cdrecord/cdrecord.h 1.200 + init_fifo() returniert nun die Groesse des FIFOs + bisosize() neu + +Sun Jan 3 20:22:00 2010 joerg + * cdrecord/isosize.c 1.13 + bisosize() neu + isosize() testet nun der Returncode von read() + +Sun Jan 3 20:19:09 2010 joerg + * cdrecord/fifo.c 1.62 + init_fifo() returniert nun die Groesse des FIFOs + +Thu Dec 31 18:47:03 2009 joerg + * conf/mkdep-aix.sh 1.2 + cc -M -E -> cc -M -qsyntaxonly weil cpp ueber #pragma weak a = b meckert + +Thu Dec 31 16:15:52 2009 joerg + * autoconf/aclocal.m4 1.87 + * autoconf/configure.in 1.202 + * autoconf/xconfig.h.in 1.188 + HAVE_ST_ATIME_N und HAVE_ST_FLAG neu fue AIX + +Thu Dec 31 16:14:10 2009 joerg + * include/schily/stat.h 1.14 + HAVE_ST_ATIME_N neu fuer AIX + +Mon Dec 28 17:16:56 2009 joerg + * cdda2wav/local.cnf.in 1.10 + Copyright J. Schilling neu + +Mon Dec 28 17:11:09 2009 joerg + * cdda2wav/cdda2wav.1 1.45 + Hinweis auf die Umstellung von .au auf .wav bei Solaris + +Mon Dec 28 17:10:34 2009 joerg + * cdda2wav/cdda2wav.c 1.119 + prdefaults() neu und entsprechende Ausgabe auch bei cdda2wav -version + static -> LOCAL + +Sun Dec 27 15:34:01 2009 joerg + * cdda2wav/interface.c 1.70 + * cdda2wav/toc.c 1.87 + Cstyle -Tue Mar 2 02:53:06 2004 Joerg Schilling - * modes.c 1.25 - * fifo.c 1.47 - * drv_mmc.c 1.155 - * drv_sony.c 1.70 - * drv_dvdplus.c 1.13 - * drv_7501.c 1.15 - * diskid.c 1.37 - * defaults.c 1.11 - * crc16.c 1.6 - * cdr_drv.c 1.36 - * clone.c 1.7 - * drv_philips.c 1.68 - * readcd.c 1.64 - * scsi_cdr.c 1.136 - * scsi_scan.c 1.18 - * iso9660.h 1.5 - * xio.h 1.2 - * cdtext.h 1.5 +Sun Dec 27 15:24:43 2009 joerg + * cdda2wav/toc.c 1.86 + static -> LOCAL + +Sun Dec 27 14:33:27 2009 joerg + * cdda2wav/local.cnf.in 1.9 + Umstellung -> Default is nun wav auf allen Plattformen + +Sun Dec 27 13:36:36 2009 joerg + * cdrecord/version.h 1.45 + Version -> 2.01.01a70 + +Sun Dec 27 13:33:38 2009 joerg + * cdrecord/cdrecord.1 1.132 + /usr/local/bin/cdrecord -> /opt/schily/bin/cdrecord + +Sat Dec 26 15:52:23 2009 joerg + * cdrecord/cdrecord.1 1.131 + Optionsreihenfolge sortiert + +Sat Dec 26 15:25:09 2009 joerg + * cdda2wav/cdda2wav.1 1.44 + Hinweise auf Default Werte + +Fri Dec 25 23:32:38 2009 joerg + * cdda2wav/cdda2wav.1 1.43 + Audio Optionen sortiert + +Fri Dec 25 20:31:11 2009 joerg + * cdda2wav/cdda2wav.1 1.42 + "Default settings" neu + +Fri Dec 25 16:43:53 2009 joerg + * cdda2wav/cdda2wav.1 1.41 + Neuer Header und bessere Einleitung mit paranioa Beschreibung + +Fri Dec 25 16:12:54 2009 joerg + * cdda2wav/cdda2wav.1 1.40 + Optioonsuebersicht verwirrt mehr und wurde beseitigt + Reihenfolge der SCSI Optionen korrigiert + +Tue Dec 22 23:04:17 2009 joerg + * conf/mkdir.sh 1.5 + sed -e 's,[^/]*,..,g' -> sed -e 's,[^/][^/]*,..,g' ist korrekter und wird fuer /usr/xpg4/bin/sed benoetigt + +Tue Dec 22 00:09:34 2009 joerg + * conf/src-get 1.21 + ${PWD}/${SRCROOT}/conf in den PATH aufnehmen damit src-get gefunden werden kann + $0 -> src-get damit Pfadsuche funktioniert + cd .. vor return in do_install() + +Sun Dec 20 23:12:24 2009 joerg + * cdrecord/cdrecord.c 1.390 + Neue Funktion default_wr_mode() damit auch cdrecord cuefile=xxx den Default -sao bekommen kann + +Sat Dec 19 23:34:33 2009 joerg + * cdda2wav/parse.c 1.9 + * cdrecord/cue.c 1.39 + strcpy() beseitigt weil es nach POSIX keine Ueberlappung kann + +Fri Dec 11 22:22:56 2009 joerg + * makefiles/RULES/MKLINKS 1.85 + i686-at386-gnu-cc.rul + +Sun Dec 6 23:02:40 2009 joerg + * cdrecord/readcd.1 1.40 + Optionsbeschreibungen umsortiert + +Sun Dec 6 18:03:15 2009 joerg + * libfind/shlfind.mk 1.3 + LIB_ACL_TEST neu + +Mon Nov 30 21:01:40 2009 joerg + * cdrecord/version.h 1.44 + Version -> 2.01.01a69 + +Mon Nov 30 20:58:01 2009 joerg + * cdrecord/cdrecord.c 1.389 + Workaround fuer einen Pioneer Firmware Bug der Daten wegwirft statt zu schreiben wenn man regelmaessig cdr_buffer_cap() ruft + +Sun Nov 29 23:07:37 2009 joerg + * cdda2wav/sndconfig.c 1.35 + (int) Casts vor SNDCTL_DSP_* ioctl Funktionsnummern beseitigt + +Sun Nov 29 15:35:28 2009 joerg + * autoconf/xconfig.h.in 1.187 + * autoconf/aclocal.m4 1.86 + * autoconf/configure.in 1.201 + HAVE_VAR_TIMEZONE_DEF fuer IRIX neu + +Sun Nov 29 14:57:59 2009 joerg + * makefiles/RULES/cc-gcc64.rul 1.11 + * makefiles/RULES/ip22-irix-gcc64.rul 1.13 + * makefiles/RULES/cc-gcc32.rul 1.11 + GCC auf IRIX Mips kommt mit -m64 klar, daher neue Variable GCC_OPT64 die bei Mips auf -mabi=64 gesetzt wird + +Sun Nov 29 13:03:46 2009 joerg + * makefiles/RULES/cc-sgi64.rul 1.7 + 64 Bit Support neu + +Sun Nov 29 13:03:29 2009 joerg + * makefiles/RULES/cc-sgi.rul 1.7 + C++ Support neu + +Sun Nov 29 13:02:16 2009 joerg + * makefiles/RULES/ip22-irix-cc64.rul 1.10 + * makefiles/RULES/ip22-irix-gcc64.rul 1.12 + -> cc-*64.rul + +Sun Nov 29 13:01:12 2009 joerg + * makefiles/RULES/MKLINKS 1.84 + 64 Bit IRIX Links neu + +Sun Nov 29 00:30:15 2009 joerg + * libfind/find_misc.c 1.15 + Linux / IRIX Unterschiede implementiert + +Sat Nov 28 23:41:55 2009 joerg + * autoconf/configure.in 1.200 + * autoconf/xconfig.h.in 1.186 + HAVE_ACL_GET_ENTRY neu + +Sat Nov 28 22:15:56 2009 joerg + * libschily/getargs.c 2.62 + argstr[] nicht definieren wenn nir mit DEBUG kompiliert wird + +Sat Nov 28 20:33:22 2009 joerg + * libscg/scsi-sgi.c 1.38 + GCC Warnungen beseitigt + +Wed Nov 25 20:55:25 2009 joerg + * mkisofs/ifo_read.c 1.14 + * mkisofs/hash.c 1.27 + * mkisofs/files.c 1.18 + * mkisofs/inode.c 1.14 + * mkisofs/joliet.c 1.61 + * mkisofs/eltorito.c 1.48 + * mkisofs/dvd_reader.c 1.10 + * mkisofs/dvd_file.c 1.11 + * mkisofs/tree.c 1.121 + * mkisofs/rock.c 1.62 + * mkisofs/mac_label.c 1.18 + * mkisofs/mkisofs.c 1.255 + * mkisofs/multi.c 1.95 + * mkisofs/write.c 1.125 + * mkisofs/boot.c 1.24 + * mkisofs/apple.c 1.40 + * mkisofs/stream.c 1.15 + * mkisofs/tree.c 1.120 + * mkisofs/rock.h 1.2 Cstyle -Tue Mar 2 01:13:42 2004 Joerg Schilling - * wm_track.c 1.4 - Copyright -> 2004 +Mon Nov 23 22:23:07 2009 joerg + * makefiles/RULES/r-smake.c4x 1.4 + * makefiles/RULES/r-smake.c4x-dep 1.9 + * makefiles/RULES/r-smake.dep 1.13 + Alte Simple Suffix Rules beseitigt + +Thu Nov 19 23:10:09 2009 joerg + * btcflash/btcflash.1 1.6 + * scgcheck/scgcheck.1 1.15 + * cdrecord/cdrecord.1 1.130 + * cdrecord/readcd.1 1.39 + dev= Beschreibung verbessert + +Thu Nov 19 22:42:28 2009 joerg + * cdda2wav/cdda2wav.1 1.39 + Leichte Anpassung der dev= Beschreibung + +Thu Nov 19 22:16:01 2009 joerg + * cdda2wav/cdda2wav.1 1.38 + Optionen teilsortiert + +Thu Nov 19 01:26:17 2009 joerg + * cdrecord/version.h 1.43 + Version -> 2.01.01a68 + +Thu Nov 19 01:17:23 2009 joerg + * mkisofs/diag/isoinfo.c 1.79 + iconv() Support neu + +Thu Nov 19 01:13:33 2009 joerg + * mkisofs/diag/isoinfo.mk 1.14 + -DUSE_NLS neu + +Thu Nov 19 00:23:10 2009 joerg + * cdrecord/drv_dvdplus.c 1.59 + NEC DVD_RW ND-3500AG liefert bei DVD+RW disk_status == DS_COMPLETE und nicht die volle Groesse im ADIP + +Tue Nov 17 19:10:43 2009 joerg + * autoconf/configure.in 1.199 + * autoconf/xconfig.h.in 1.185 + HAVE_GETENT / HAVE_UNSETENV neu + +Mon Nov 16 00:15:36 2009 joerg + * libfind/idcache.c 1.29 + Schreibfehler uid_t -> gid_t beim Ergebnis von ic_gid_nobody() + +Mon Nov 16 00:01:50 2009 joerg + * include/schily/device.h 1.19 + VMS Support neu + +Mon Nov 16 00:01:11 2009 joerg + * include/schily/ccomdefs.h 1.7 + * include/schily/xmconfig.h 1.42 + * include/schily/wait.h 1.17 + Cstyle + +Sun Nov 15 20:27:50 2009 joerg + * rscsi/rscsi.1 1.5 + * cdda2wav/cdda2wav.1 1.37 + * mkisofs/mkisofs.8 1.132 + * cdrecord/cdrecord.1 1.129 + * cdrecord/readcd.1 1.38 + Neue Sektion INTERFACE STABILITY + +Sun Nov 15 16:25:02 2009 joerg + * libfind/find.c 1.84 + #define VMS_VFORK_OK neu + fcomerr() -> ferrmsgno() + _exit() + +Sun Nov 15 15:14:27 2009 joerg + * libschily/fexec.c 1.42 + Erweiterungen fuer VMS + +Sun Nov 15 15:06:50 2009 joerg + * libschily/spawn.c 1.26 + #define VMS_VFORK_OK neu + +Sun Nov 15 14:03:38 2009 joerg + * include/schily/vfork.h 1.4 + vfork Umdefinition aus unistd.h wieder Rueckgaengig wenn nicht VMS_VFORK_OK + set_child_standard_fds() neu fuer VMS + +Fri Nov 13 22:57:55 2009 joerg + * mkisofs/mkisofs.c 1.254 + Neue RR Meldungen nun korrekt auf stderr ausgeben (vergessenes printf) + +Fri Nov 13 22:55:32 2009 joerg + * mkisofs/mkisofs.c 1.253 + Neue RR Meldungen nun korrekt auf stderr ausgeben + +Sun Nov 8 20:58:13 2009 joerg + * libsiconv/sic_nls.c 1.13 + #undef __CAN_TAB_SIZE__ auf VMS + +Sun Nov 8 20:49:44 2009 joerg + * libfind/find.c 1.83 + VMS hat _SC_ARG_MAX und ARG_MAX aber nicht _POSIX_ARG_MAX + +Sat Nov 7 21:44:36 2009 joerg + * libfind/find.c 1.82 + fork() -> vfork() wegen VMS + +Sat Nov 7 20:43:09 2009 joerg + * libhfs_iso/hfs.c 1.15 + hfs_umountall() continue -> hfs_umount(hfs_mounts, 0L, 0L) da HP-UX-11.11 Kompiler "Infinite loop detected. Check for spinning on non-volatile variable." meldet + +Sat Nov 7 20:22:15 2009 joerg + * libschily/align_test.c 1.26 + int Cast -> size_t wegen HP-UX-11.11 Kompiler in 64 Bit + +Sat Nov 7 18:35:43 2009 joerg + * libfind/find.c 1.81 + * libparanoia/cdda_paranoia.h 1.27 + #define inline beseitigt, das wird in schily/mconfig.h behandelt + +Sat Nov 7 16:41:51 2009 joerg + * cdrecord/fifo.c 1.61 + schily/vfork.h neu + +Sat Nov 7 15:51:38 2009 joerg + * libschily/spawn.c 1.25 + Bevorzugt vfork() verwenden + +Sat Nov 7 01:33:57 2009 joerg + * include/schily/vfork.h 1.3 + #include neu + +Sat Nov 7 01:30:16 2009 joerg + * autoconf/xconfig.h.in 1.184 + * autoconf/configure.in 1.198 + HAVE_FORKX HAVE_FORKALL HAVE_FORKALLX HAVE_VFORKX HAVE_SYS_FORK_H neu + +Fri Nov 6 22:17:52 2009 joerg + * autoconf/acspecific.m4 1.12 + Diverse Umbauten fuer VMS: stdlib.h wait.h sowie bevorzugt execl() rufen damit der Kind loslaeuft + +Fri Nov 6 22:11:44 2009 joerg + * include/schily/wait.h 1.16 + USE_UNION_WAIT, sowie _W_I(w) und _W_U(w) neu + +Fri Nov 6 20:11:51 2009 joerg + * autoconf/configure.in 1.197 + * autoconf/aclocal.m4 1.85 + * autoconf/xconfig.h.in 1.183 + AC_USE_STRUCT_UNION_WAIT neu wegen VMS + +Fri Nov 6 19:12:29 2009 joerg + * include/schily/vfork.h 1.2 + vfork() definition auf Solaris ist in unistd.h, daher #include + +Thu Nov 5 22:47:20 2009 joerg + * makefiles/RULES/cc-openvms.rul 1.3 + -lrt beseitigt + libXX.a -> XX.olb + +Thu Nov 5 22:40:54 2009 joerg + * include/schily/utypes.h 1.29 + intmax_t (fehlt auf VMS) nachruesten + +Thu Nov 5 20:05:57 2009 joerg + * include/schily/xconfig.h 1.8 + Neues Define NO_STATIC_CONF + +Thu Nov 5 19:34:27 2009 joerg + * autoconf/xconfig.h.in 1.182 + * autoconf/aclocal.m4 1.84 + * autoconf/configure.in 1.196 + AC_HEADER_STDINT neu + +Thu Nov 5 19:33:47 2009 joerg + * autoconf/acspecific.m4 1.11 + HAVE_VFORK neu zusaetzlich zu ! #define vfork + +Thu Nov 5 01:32:01 2009 joerg + * autoconf/acgeneral.m4 1.11 + AC_CHECK_LIB ersetzt nun -lc durch nichts, weil -lc nicht auf jedem OS vorhanden ist + +Thu Nov 5 01:20:24 2009 joerg + * autoconf/acspecific.m4 1.10 + opendir() Check in AC_HEADER_DIRENT testet nun zuerst in -lc weil der Test aud -ldir unter VMS fehlschlaegt + +Thu Nov 5 01:18:58 2009 joerg + * autoconf/rules.cnf.in 1.22 + * autoconf/configure.in 1.195 + LIB_DIR neu + +Tue Nov 3 22:28:52 2009 joerg + * libscg/scsi-mac-iokit.c 1.16 + #include -> #include wegen "Snow Leopard" + +Tue Nov 3 22:23:07 2009 joerg + * cdda2wav/ringbuff.c 1.22 + assert(free_buffers() < total_buffers); -> assert(free_buffers() <= total_buffers); in drop_buffer() + +Sun Nov 1 21:56:51 2009 joerg + * cdrecord/version.h 1.42 + Version -> 2.01.01a67 + +Sat Oct 31 22:45:39 2009 joerg + * makefiles/RULES/MKLINKS 1.83 + alphaserver_ds20_500_mhz-openvms-cc.rul neu + +Sat Oct 31 22:28:56 2009 joerg + * include/schily/xmconfig.h 1.41 + #ifdef NO_OPENFD_SRC -> #ifndef NO_OPENFD_SRC + +Sat Oct 31 22:00:20 2009 joerg + * makefiles/RULES/cc-openvms.rul 1.2 + cc -M geht noch nicht + +Sat Oct 31 21:44:29 2009 joerg + * makefiles/RULES/cc-openvms.rul 1.1 + * makefiles/RULES/alpha-openvms-cc.rul 1.1 + date and time created 09/10/31 21:44:29 by joerg + +Sat Oct 31 21:21:59 2009 joerg + * makefiles/DEFAULTS/Defaults.openvms 1.1 + date and time created 09/10/31 21:21:59 by joerg + +Sat Oct 31 21:21:50 2009 joerg + * makefiles/DEFAULTS_ENG/Defaults.openvms 1.1 + date and time created 09/10/31 21:21:50 by joerg + +Sat Oct 31 21:03:00 2009 joerg + * conf/oarch.sh 1.15 + -help neu + +Sat Oct 31 20:35:40 2009 joerg + * conf/oarch.sh 1.14 + Gross Klein Wandlung auf den neuesten Stand gebracht + +Sat Oct 31 20:30:47 2009 joerg + * include/schily/xmconfig.h 1.40 + HAVE_UTSNAME_ARCH fuer uname -p neu + +Sat Oct 31 20:25:41 2009 joerg + * autoconf/xconfig.h.in 1.181 + * autoconf/aclocal.m4 1.83 + * autoconf/configure.in 1.194 + AC_STRUCT_UTSNAME_ARCH / HAVE_UTSNAME_ARCH fuer VMS neu + +Sat Oct 31 16:24:56 2009 joerg + * autoconf/aclocal.m4 1.82 + grep bash -> egrep 'GNU sh|bash' wegen bash-1.x + +Sat Oct 31 15:57:16 2009 joerg + * autoconf/aclocal.m4 1.81 + sh -version -> sh --version fuer bash Test da bash-1.* nur --version versteht + +Sat Oct 31 15:52:30 2009 joerg + * autoconf/config.guess 1.15 + OpenVMS neu + +Fri Oct 30 01:01:40 2009 joerg + * autoconf/configure.in 1.193 + AC_INIT(xconfig.h.in) -> AC_INIT(config.guess) wegen VMS + +Thu Oct 29 23:50:38 2009 joerg + * makefiles/RULES/os-openvms.id 1.1 + * makefiles/RULES/os-openvms.def 1.1 + date and time created 09/10/29 23:50:38 by joerg + +Thu Oct 29 23:42:57 2009 joerg + * include/schily/xmconfig.h 1.39 + HAVE_SYS_UTSNAME_H HAVE_UNAME NO_OPENFD_SRC neu + +Mon Oct 26 23:11:16 2009 joerg + * include/schily/xmconfig.h 1.38 + HAVE_CTYPE_H HAVE_MALLOC HAVE_CALLOC HAVE_REALLOC neu + +Sun Oct 25 23:40:05 2009 joerg + * autoconf/xconfig.h.in 1.180 + * autoconf/configure.in 1.192 + malloc calloc realloc memalign posix_memalign Test neu + +Thu Oct 22 23:19:44 2009 joerg + * include/schily/xmconfig.h 1.37 + HAVE_SYS_TYPES_H HAVE_PUTENV HAVE_STRNCPY neu + +Thu Oct 22 23:19:13 2009 joerg + * include/schily/types.h 1.5 + HAVE_TYPES_H neu + +Thu Oct 22 23:18:55 2009 joerg + * include/schily/standard.h 1.37 + * include/schily/libport.h 1.20 + * include/schily/schily.h 1.86 + defined(_INCL_TYPES_) neu + +Thu Oct 22 22:36:34 2009 joerg + * include/schily/xmconfig.h 1.36 + HAVE_RENAME neu + +Thu Oct 22 22:31:03 2009 joerg + * include/schily/xmconfig.h 1.35 + HAVE_STRUCT_TIMEVAL neu + +Wed Oct 21 21:19:31 2009 joerg + * cdda2wav/cdda2wav.c 1.118 + Abfrage if (user_sound_device) war falsch weil user_sound_device mit "" initialisiert wird + +Tue Oct 20 21:08:48 2009 joerg + * libschily/align_test.c 1.25 + long double und "type max" neu + +Mon Oct 19 23:09:42 2009 joerg + * rscsi/rscsi.c 1.37 + verbessertes 'V'ersion handling + +Mon Oct 19 22:27:03 2009 joerg + * rscsi/rscsi.1 1.4 + Release -> 3.0 fuer cdrtools-3.0 + +Mon Oct 19 22:25:57 2009 joerg + * rscsi/rscsi.1 1.3 + Erstmalige Beschreibung des RSCSI Protokolls + +Mon Oct 19 21:43:32 2009 joerg + * include/schily/dbgmalloc.h 1.3 + acheckdamage()/freechecking()/nomemraising() neu + +Sat Oct 17 22:14:16 2009 joerg + * libschily/fillbytes.c 1.17 + * libschily/cmpbytes.c 1.21 + * libschily/cmpnullbytes.c 1.8 + * libschily/findbytes.c 1.6 + * libschily/movebytes.c 1.18 + * libschily/swabbytes.c 1.8 + cnt -> ssize_t + +Sat Oct 17 20:52:43 2009 joerg + * include/schily/dbgmalloc.h 1.2 + dbg_calloc() neu + +Sat Oct 17 20:52:18 2009 joerg + * include/schily/mconfig.h 1.66 + Kommentar fuer #include vbm wenn (vol->vlen / vol->lpa + 4095) / 4096 mehr ergibt weil diese Groesse in hfs.c beschrieben wird + +Fri Oct 16 01:01:17 2009 joerg + * include/schily/schily.h 1.85 + *bytes() Funktionen nun mit ssize_t Parameter + +Fri Oct 16 00:57:20 2009 joerg + * include/schily/mconfig.h 1.65 + schily/dbgmalloc.h mit DBG_MALLOC neu + +Fri Oct 16 00:56:36 2009 joerg + * include/schily/Targets 1.13 + dbgmalloc.mk neu + +Fri Oct 16 00:56:05 2009 joerg + * include/schily/dbgmalloc.mk 1.1 + * include/schily/dbgmalloc.h 1.1 + date and time created 09/10/16 00:56:05 by joerg + +Fri Oct 16 00:33:46 2009 joerg + * cdda2wav/scsi_cmds.c 1.48 + schily/types.h neu + +Tue Oct 13 18:30:32 2009 joerg + * cdda2wav/cdda2wav.1 1.36 + * cdrecord/cdrecord.1 1.128 + * cdrecord/readcd.1 1.37 + Besserer Hinweis auf das Target Example aud dev=help + +Mon Oct 12 21:49:31 2009 joerg + * makefiles/RULES/cc-hp64.rul 1.9 + +DAportable beseitigt + +Mon Oct 12 18:53:47 2009 joerg + * mkisofs/diag/isovfy.c 1.41 + * mkisofs/diag/isodump.c 1.44 + find_rr() neu fuer XA Records + +Sun Oct 11 16:27:36 2009 joerg + * cdrecord/version.h 1.41 + Version -> 2.01.01a66 + +Sun Oct 11 16:14:17 2009 joerg + * cdrecord/readcd.1 1.36 + * cdrecord/cdrecord.1 1.127 + Verbesserungen der Beschreibung der dev= Syntax + +Sun Oct 11 15:23:38 2009 joerg + * mkisofs/mkisofs.8 1.131 + Ueberarbeitet fuer 3.0 + +Sun Oct 11 15:13:37 2009 joerg + * mkisofs/diag/isoinfo.8 1.10 + Version -> 3.0 + Hinweis dass -debug Rock Ridge Erkennung abschaltet + +Sun Oct 11 15:11:37 2009 joerg + * mkisofs/diag/isoinfo.c 1.78 + Umbau auf rock.h + +Sun Oct 11 15:01:00 2009 joerg + * mkisofs/diag/isoinfo.c 1.77 + Test fuer "ER" neu + verbesserte RR Erkennung + +Sun Oct 11 14:56:52 2009 joerg + * mkisofs/multi.c 1.94 + Umbau auf rock.h + Test fuer "ER" neu + +Sun Oct 11 14:54:31 2009 joerg + * mkisofs/mkisofs.c 1.252 + verbesserte RR Erkennung + +Sun Oct 11 14:51:09 2009 joerg + * mkisofs/inode.c 1.13 + * mkisofs/tree.c 1.119 + RRVERSION Text verbessert + +Sat Oct 10 22:09:19 2009 joerg + * makefiles/RULES/9000-725-hp-ux-cc64.rul 1.14 + * makefiles/RULES/cc-hp64.rul 1.8 + 64 Bit Modus neu + +Sat Oct 10 22:06:47 2009 joerg + * makefiles/RULES/MKLINKS 1.82 + *hp-ux-cc64.rul neu + +Sat Oct 10 22:02:22 2009 joerg + * libschily/fconv.c 1.41 + isinf()/isnan() fuer IEEE FP neu falls das System nichts bereitstellt + +Fri Oct 9 23:20:16 2009 joerg + * cdrecord/drv_dvdplus.c 1.58 + HL-DT-ST Workaround nun mit (Int32_t)end_lba > dsp->ds_maxblocks weil end_lba signed ist aber 0xFFFFFFFF sein kann + +Fri Oct 9 21:43:32 2009 joerg + * libscg/scsi-hpux.c 1.34 + Debug print erweitert + Test auf SCTL_POWERFAIL neu + Wenn SCSI Statusbyte != 0 nicht mehr sp->error = SCG_RETRYABLE + +Fri Oct 9 21:39:21 2009 joerg + * libschily/fconv.c 1.40 + Nicht mehr auf defined(isnan)/defined(isinf) testen weil das bei HP-UX zum Bedarf an -lm fuehrt + +Thu Oct 8 22:51:39 2009 joerg + * mkisofs/diag/isodump.c 1.43 + Umbau auf rock.h + +Thu Oct 8 22:45:16 2009 joerg + * mkisofs/diag/isodump.c 1.42 + "ER" und "SP" neu fuer Rock Ridge Parser + +Thu Oct 8 22:40:30 2009 joerg + * mkisofs/mkisofs.c 1.251 + * mkisofs/mkisofs.h 1.139 + * mkisofs/tree.c 1.118 + * mkisofs/rock.c 1.61 + rock.h aus mkisofs.h neu + +Thu Oct 8 22:36:08 2009 joerg + * mkisofs/rock.h 1.1 + date and time created 09/10/08 22:36:08 by joerg + +Sun Sep 27 16:16:57 2009 joerg + * cdda2wav/cdda2wav.c 1.117 + -C kann nun auch "machine" byte order + +Sun Sep 27 16:15:08 2009 joerg + * cdda2wav/cdda2wav.1 1.35 + Stark ueberarbeitet, Fehler beseitigt + +Sat Sep 19 23:29:27 2009 joerg + * libsiconv/sic_nls.c 1.12 + auch in dup_iconv_sic() auf iconv:* testen + +Wed Sep 16 18:58:07 2009 joerg + * mkisofs/mkisofs.8 1.130 + Version -> 3.0 + +Wed Sep 16 18:55:42 2009 joerg + * scgcheck/scgcheck.1 1.14 + * cdrecord/readcd.1 1.35 + * cdda2wav/cdda2wav.1 1.34 + "Device naming" neu + +Wed Sep 16 18:23:01 2009 joerg + * cdrecord/cdrecord.1 1.126 + "Device naming" + +Wed Sep 16 16:19:01 2009 joerg + * btcflash/btcflash.1 1.5 + Device naming neu + +Wed Sep 16 16:12:09 2009 joerg + * btcflash/skel.c 1.23 + scgckeleton -> btcflash + +Wed Sep 16 15:56:47 2009 joerg + * btcflash/btcflash.1 1.4 + %E% -> %e% + +Wed Sep 16 15:22:13 2009 joerg + * cdrecord/readcd.c 1.107 + Plextor spezifische Kommandos mit mmc_isplextor() absichern + +Tue Sep 15 17:05:22 2009 joerg + * cdrecord/version.h 1.40 + Version -> 2.01.01a65 + +Tue Sep 15 14:59:40 2009 joerg + * autoconf/config.sub 1.9 + * autoconf/config.guess 1.14 + dragonfly neu + +Mon Sep 14 23:35:12 2009 joerg + * libscg/scsi-bsd.c 1.50 + devname -> dev_name wegen shadow Warnung des gcc + +Mon Sep 14 17:13:12 2009 joerg + * libscg/scsi-bsd.c 1.49 + NetBSD Workaround fuer OpenBSD erweitert + +Sat Sep 12 20:58:13 2009 joerg + * mkisofs/write.c 1.124 + Sincged char als Parameter von toupper() vermeiden + +Sat Sep 12 13:15:44 2009 joerg + * libscg/scsi-bsd.c 1.48 + NetBSD Scanbus Erweiterungen auf Basis von Ideen von Thorsten Frueauf + +Wed Sep 9 20:48:21 2009 joerg + * makefiles/RULES/MKLINKS 1.81 + amd64-netbsd-* Links neu + +Wed Sep 9 14:29:28 2009 joerg + * makefiles/RULES/mk-gmake.id 1.22 + Rueckumstellung auf tr(1) wegen eines Bugs im sed(1) auf *BSD + +Wed Sep 9 14:28:54 2009 joerg + * makefiles/RULES/mk-.id 1.16 + Hinweis auf sed Bug bei *BSD + +Mon Sep 7 21:09:48 2009 joerg + * libscg/scsi-linux-sg.c 1.94 + * libscg/scsi-linux-ata.c 1.15 + * libscg/scsitransp.c 1.98 + Copyright -> 2009 + +Fri Sep 4 14:21:52 2009 joerg + * cdrecord/version.h 1.39 + Version -> 2.01.01a64 + +Thu Sep 3 22:47:36 2009 joerg + * libscg/scsi-mac-iokit.c 1.15 + -scanbus laeuft nun auch mit Mac OS X, Hinweis wie man "diskarkitrationd" killt neu + +Thu Sep 3 00:22:06 2009 joerg + * cdrecord/cdrecord.1 1.125 + * cdrecord/readcd.1 1.34 + Hinweis auf Qualitaetsverfall im -clone Modus + +Sat Aug 29 14:17:45 2009 joerg + * makefiles/RULES/mk-.id 1.15 + * makefiles/RULES/mk-gmake.id 1.21 + tr -> sed 'y/from/to/' fuer hoffentlich weniger Fehleranfelligkeit + +Thu Aug 27 12:17:23 2009 joerg + * libschily/strtod.c 1.4 + Komplett Umbau auf include schily/*.h + +Thu Aug 27 11:05:42 2009 joerg + * libschily/fconv.c 1.39 + * cdda2wav/cdda2wav.c 1.116 + * cdda2wav/resample.c 1.33 + math.h -> schily/math.h + +Wed Aug 26 12:34:01 2009 joerg + * include/schily/math.h 1.1 + date and time created 09/08/26 12:34:01 by joerg + +Wed Aug 26 12:33:24 2009 joerg + * include/schily/Targets 1.12 + math.mk neu + +Wed Aug 26 12:32:47 2009 joerg + * include/schily/math.mk 1.1 + date and time created 09/08/26 12:32:47 by joerg + +Wed Aug 26 00:03:34 2009 joerg + * libschily/fconv.c 1.38 + Vorsichtigeres Umgehen mit isinf()/isnan() wegen AIX + +Tue Aug 25 13:53:01 2009 joerg + * autoconf/configure.in 1.191 + * autoconf/xconfig.h.in 1.179 + HAVE_MATH_H HAVE_FINITE HAVE_ISNAND neu + +Mon Aug 24 14:48:02 2009 joerg + * libscg/scsi-remote.c 1.33 + Umstellung auf HAVE_SOLARIS_PPRIV wegen AIX Kompilationsproblemen + +Mon Aug 24 14:32:46 2009 joerg + * include/schily/priv.h 1.2 + Solaris von AIX unterscheiden + +Mon Aug 24 14:15:24 2009 joerg + * autoconf/xconfig.h.in 1.178 + * autoconf/configure.in 1.190 + HAVE_SYS_PRIV_H HAVE_GETROLES HAVE_PRIVBIT_SET neu fuer AIX + +Sun Aug 23 20:11:55 2009 joerg + * autoconf/xconfig.h.in 1.177 + * autoconf/configure.in 1.189 + HAVE_FUTIMENS und HAVE_UTIMENSAT neu + +Mon Aug 17 23:36:07 2009 joerg + * autoconf/configure.in 1.188 + * autoconf/xconfig.h.in 1.176 + HAVE_STRINGIZE und inline Test neu + +Mon Aug 17 22:45:46 2009 joerg + * libscg/scsi-linux-ata.c 1.14 + Uninitialisierte Variablen initialisiert + +Mon Aug 17 22:42:22 2009 joerg + * makefiles/RULES/mk-gmake.id 1.20 + GMAKE_NOWARN=true neu + +Mon Aug 17 22:41:28 2009 joerg + * makefiles/RULES/gmake.wrn 1.3 + Hinweis auf GMAKE_NOWARN=true + +Sun Aug 16 14:14:29 2009 joerg + * makefiles/TEMPLATES/MKLINKS 1.1 + date and time created 09/08/16 14:14:29 by joerg + +Sat Aug 15 21:10:26 2009 joerg + * makefiles/RULES/rules.env 1.2 + Wenn LANG noch nicht gesetzt war, dann setzen wir nun NO_LANG stattdessen + +Sat Aug 15 17:15:46 2009 joerg + * btcflash/MKLINKS 1.5 + * btcflash/Makefile 1.11 + * scgskeleton/MKLINKS 1.5 + * scgskeleton/Makefile 1.14 + iodefs.h beseitigt + +Sat Aug 15 16:37:23 2009 joerg + * scgskeleton/Makefile 1.15 + HFILES beseitigt + +Fri Aug 14 07:49:35 2009 joerg + * makefiles/RULES/mk-gmake.id 1.19 + * makefiles/RULES/mk-.id 1.14 + tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | tr ', /\\()"' ',//////' zusammengefasst + +Fri Aug 14 07:40:20 2009 joerg + * makefiles/RULES/mk-gmake.id 1.18 + * makefiles/RULES/mk-.id 1.13 + tr '[A-Z]' '[a-z]' -> tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' wegen Merkwuerdigkeiten bei LC_ALL != "C" + +Fri Aug 14 07:25:17 2009 joerg + * makefiles/RULES/rules1.dir 1.15 + Bereiche [0-9] -> [0123456789] + +Wed Aug 12 23:16:24 2009 joerg + * makefiles/RULES/rules.env 1.1 + date and time created 09/08/12 23:16:24 by joerg + +Wed Aug 12 23:16:07 2009 joerg + * makefiles/RULES/rules.nul 1.1 + date and time created 09/08/12 23:16:07 by joerg + +Wed Aug 12 23:15:59 2009 joerg + * makefiles/RULES/mk-smake.id 1.7 + * makefiles/RULES/mk-gmake.id 1.17 + include rules.env neu + +Wed Aug 12 01:16:17 2009 joerg + * cdda2wav/global.h 1.25 + md5.h -> schily/md5.h + +Wed Aug 12 01:07:17 2009 joerg + * cdrecord/COPYING 1.11 + BSD 2 clause fuer libmdigest neu + +Wed Aug 12 01:06:17 2009 joerg + * cdrecord/version.h 1.38 + Version -> 2.01.01a63 + +Wed Aug 12 00:05:10 2009 joerg + * cdrecord/readcd.1 1.33 + Eissfeldt nun mit ss + +Tue Aug 11 20:07:52 2009 joerg + * libmdigest/Targets 1.6 + CPPOPTS += -DSHA2_UNROLL_TRANSFORM -Mon Mar 1 11:08:40 2004 Joerg Schilling - * cdrecord.h 1.159 - * mmcvendor.h 1.3 - * scsilog.h 1.4 - * scsimmc.h 1.10 - * drv_jvc.c 1.80 - * scsi_mmc.c 1.8 - * cdtext.c 1.10 - * scsilog.c 1.16 - * auinfo.c 1.23 - * cdrecord.c 1.277 - * audiosize.c 1.19 - * sector.c 1.12 - * subchan.c 1.17 - * wm_packet.c 1.24 - * xio.c 1.8 +Tue Aug 11 20:06:02 2009 joerg + * libmdigest/sha2.c 1.3 Cstyle -Mon Mar 1 11:02:43 2004 Joerg Schilling - * scsimmc.h 1.11 - * subchan.c 1.18 - * wm_packet.c 1.25 - * xio.c 1.9 - * sector.c 1.13 - Copyright -> 2004 +Tue Aug 11 19:54:58 2009 joerg + * libmdigest/sha2.c 1.2 + Portabel gemacht + +Sun Aug 9 16:11:47 2009 joerg + * include/schily/xconfig.h 1.7 + schily/mc68020-sunos4-*cc/xconfig.h neu + +Sun Aug 9 16:05:22 2009 joerg + * include/schily/archdefs.h 1.8 + Schreibfehler __mc6800 -> __mc68000 + +Sun Aug 9 14:29:59 2009 joerg + * include/schily/sha2.h 1.3 + Cstyle -Sun Feb 29 21:49:03 2004 Joerg Schilling - * cdrecord.c 1.276 +Sun Aug 9 14:20:21 2009 joerg + * include/schily/sha2.h 1.2 + Portabel gemacht + +Sun Aug 9 14:19:22 2009 joerg + * include/schily/sha2.mk 1.1 + date and time created 09/08/09 14:19:22 by joerg + +Sun Aug 9 14:19:06 2009 joerg + * include/schily/Targets 1.11 + sha2.mk neu + +Sun Aug 9 11:49:51 2009 joerg + * autoconf/aclocal.m4 1.80 + * autoconf/xconfig.h.in 1.175 + * autoconf/configure.in 1.187 + AC_PRAGMA_WEAK neu + +Sun Aug 9 01:25:41 2009 joerg + * libmdigest/Targets 1.5 + sha2.c neu + +Sun Aug 9 01:25:30 2009 joerg + * libmdigest/libdigest-mapvers 1.4 + SHA256 SHA384 SHA512 neu + +Sat Aug 8 23:28:57 2009 joerg + * libmdigest/rmd160.c 1.4 + * include/schily/rmd160.h 1.3 + count von UInt64_t -> UInt32_t[2] + +Sat Aug 8 23:08:30 2009 joerg + * libmdigest/rmd160.c 1.3 + Vergessenes u_int32_t -> UInt32_t + +Sat Aug 8 22:57:31 2009 joerg + * libmdigest/rmd160.c 1.2 + * include/schily/rmd160.h 1.2 + Portabel gemacht + +Sat Aug 8 22:53:57 2009 joerg + * libmdigest/Targets 1.4 + rmd160.c neu + +Sat Aug 8 22:53:06 2009 joerg + * libmdigest/libdigest-mapvers 1.3 + RMD160* neu + +Sat Aug 8 22:33:07 2009 joerg + * include/schily/Targets 1.10 + rmd160.mk neu + +Sat Aug 8 22:32:15 2009 joerg + * include/schily/rmd160.mk 1.1 + date and time created 09/08/08 22:32:15 by joerg + +Sat Aug 8 22:31:08 2009 joerg + * include/schily/md4.h 1.3 + * include/schily/md5.h 1.10 + *_H_ -> *_H + +Sat Aug 8 21:40:53 2009 joerg + * cdda2wav/configure.in 1.11 + Kommentar neu wegen HAVE_WINDOWS_H -> globales configure + +Sat Aug 8 21:24:22 2009 joerg + * cdda2wav/lconfig.h.in 1.9 + HAVE_WINDOWS_H ist nun global + +Sat Aug 8 21:21:34 2009 joerg + * autoconf/configure.in 1.186 + * autoconf/xconfig.h.in 1.174 + HAVE_WINDOWS_H neu + +Sat Aug 8 01:16:13 2009 joerg + * include/schily/Targets 1.9 + ipc.mk sem.mk shm.mk neu + +Sat Aug 8 01:15:37 2009 joerg + * include/schily/shm.h 1.1 + * include/schily/shm.mk 1.1 + date and time created 09/08/08 01:15:37 by joerg + +Sat Aug 8 01:15:16 2009 joerg + * include/schily/sem.h 1.1 + * include/schily/sem.mk 1.1 + date and time created 09/08/08 01:15:16 by joerg + +Sat Aug 8 01:14:43 2009 joerg + * include/schily/ipc.h 1.1 + * include/schily/ipc.mk 1.1 + date and time created 09/08/08 01:14:43 by joerg + +Sat Aug 8 01:04:17 2009 joerg + * cdrecord/fifo.c 1.60 + * cdda2wav/semshm.c 1.29 + * cdda2wav/ringbuff.c 1.21 + sys/ipc.h -> schily/ipc.h, sys/shm.h -> schily/shm.h + +Sat Aug 8 00:34:15 2009 joerg + * autoconf/configure.in 1.185 + * autoconf/xconfig.h.in 1.173 + HAVE_SYS_SEM_H neu + +Sat Aug 8 00:18:33 2009 joerg + * include/schily/float.mk 1.1 + * include/schily/float.h 1.1 + date and time created 09/08/08 00:18:33 by joerg + +Fri Aug 7 23:46:31 2009 joerg + * include/schily/procfs.mk 1.1 + * include/schily/procfs.h 1.1 + date and time created 09/08/07 23:46:31 by joerg + +Fri Aug 7 23:33:54 2009 joerg + * include/schily/Targets 1.8 + assert.mk float.mk priv.mk procfs.mk syslog.mk neu + +Fri Aug 7 23:09:46 2009 joerg + * cdda2wav/interface.c 1.69 + * cdda2wav/ioctl.c 1.38 + * cdda2wav/resample.c 1.32 + * cdda2wav/ringbuff.c 1.20 + assert.h -> schily/assert.h + +Fri Aug 7 19:07:10 2009 joerg + * include/schily/syslog.h 1.1 + * include/schily/syslog.mk 1.1 + date and time created 09/08/07 19:07:10 by joerg + +Fri Aug 7 19:06:21 2009 joerg + * include/schily/assert.mk 1.1 + * include/schily/assert.h 1.1 + date and time created 09/08/07 19:06:21 by joerg + +Fri Aug 7 19:04:57 2009 joerg + * include/schily/priv.h 1.1 + * include/schily/priv.mk 1.1 + date and time created 09/08/07 19:04:57 by joerg + +Fri Aug 7 19:03:50 2009 joerg + * btcflash/skel.c 1.22 + * cdda2wav/interface.c 1.68 + * scgskeleton/skel.c 1.19 + * cdrecord/readcd.c 1.106 + * cdrecord/cdrecord.c 1.388 + * libscg/scsi-remote.c 1.32 + priv.h -> schily/priv.h + +Fri Aug 7 18:44:18 2009 joerg + * autoconf/configure.in 1.184 + * autoconf/xconfig.h.in 1.172 + HAVE_ASSERT_H neu + +Tue Aug 4 22:10:41 2009 joerg + * cdda2wav/sndconfig.c 1.34 + schily/time.h -> schily/select.h + +Tue Aug 4 21:57:48 2009 joerg + * cdrecord/cdrecord.c 1.387 + sys/select.h + sys/socket.h -> schily/socket.h + +Tue Aug 4 21:56:46 2009 joerg + * include/schily/select.mk 1.1 + * include/schily/select.h 1.1 + date and time created 09/08/04 21:56:46 by joerg + +Tue Aug 4 21:56:35 2009 joerg + * include/schily/Targets 1.7 + select.mk neu + +Tue Aug 4 21:25:12 2009 joerg + * libfile/file.c 1.10 + * mkisofs/apple.c 1.39 + netinet/in.h -> schily/in.h + +Tue Aug 4 21:14:17 2009 joerg + * cdda2wav/toc.c 1.85 + sys/socket.h -> schily/socket.h, netinet/in.h -> schily/in.h, netdb.h -> schily/netdb.h + +Tue Aug 4 21:07:47 2009 joerg + * rscsi/rscsi.c 1.36 + sys/socket.h -> schily/socket.h + +Tue Aug 4 20:36:17 2009 joerg + * include/schily/inet.h 1.2 + Wenn arpa/inet.h fehlt, dann netdb.h inkludieren weil BeOS inet_ntaoa() in netdb.h het + +Tue Aug 4 20:05:25 2009 joerg + * libschily/getdomainname.c 1.22 + * libschily/usleep.c 1.22 + * libschily/gethostname.c 1.20 + * libschily/gethostid.c 1.20 + sys/systeminfo.h -> schily/systeminfo.h + +Tue Aug 4 00:26:58 2009 joerg + * cdda2wav/Makefile 1.25 + md5.c und md5.h beseitigt + +Tue Aug 4 00:03:26 2009 joerg + * cdrecord/cdrecord.c 1.386 + * cdda2wav/cdda2wav.c 1.115 + * mkisofs/mkisofs.c 1.250 + sys/resource.h -> schily/resource.h + +Mon Aug 3 23:47:49 2009 joerg + * include/schily/resource.mk 1.1 + date and time created 09/08/03 23:47:49 by joerg + +Mon Aug 3 23:47:32 2009 joerg + * include/schily/Targets 1.6 + resource.mk neu + +Mon Aug 3 23:46:00 2009 joerg + * include/schily/resource.h 1.7 + _RESOURCE_H -> _SCHILY_RESOURCE_H + +Mon Aug 3 19:50:06 2009 joerg + * cdda2wav/cd_extra.c 1.17 + CD+ Directory Parser vermeidet nun Endlosschleife bei defekten Daten + +Sun Aug 2 16:49:20 2009 joerg + * include/schily/wait.h 1.15 + #include fuer DJCPP und EMX neu + +Sun Aug 2 16:43:38 2009 joerg + * include/schily/wait.h 1.14 + Unos Support sys/exit.h + +Sun Aug 2 15:49:56 2009 joerg + * cdrecord/COPYING 1.10 + libmdigest neu + +Sun Aug 2 15:39:19 2009 joerg + * cdda2wav/Makefile 1.24 + * cdda2wav/toc.c 1.84 + Umbau auf SHA1 Implementierung aus libmdigest + +Sat Aug 1 21:04:55 2009 joerg + * libmdigest/Targets 1.3 + sha1.c neu + +Sat Aug 1 21:02:04 2009 joerg + * libmdigest/sha1.c 1.2 + * include/schily/sha1.h 1.2 + Portabel gemacht + +Sat Aug 1 21:01:34 2009 joerg + * libmdigest/libdigest-mapvers 1.2 + MD5 und SHA1 neu + +Sat Aug 1 20:24:43 2009 joerg + * include/schily/sha1.mk 1.1 + date and time created 09/08/01 20:24:43 by joerg + +Sat Aug 1 20:24:20 2009 joerg + * include/schily/Targets 1.5 + sha1.mk neu + +Sat Aug 1 12:59:14 2009 joerg + * libmdigest/Makefile 1.3 + Schreibfehler $(NO_SHL)mshldigest.mk -> $(NO_SHL)shlmdigest.mk + +Thu Jul 30 01:06:01 2009 joerg + * autoconf/acgeneral.m4 1.10 + ac_link=... $LDFLAGS conftest.$ac_ext $LIBS -> conftest.$ac_ext $LDFLAGS $LIBS wegen Microsoft cl + +Thu Jul 30 00:10:18 2009 joerg + * cdrecord/version.h 1.37 + Version -> 2.01.01a62 + +Wed Jul 29 23:41:05 2009 joerg + * libscg/scsi-linux-sg.c 1.93 + MAX_SCG 256 -> (512-MAX_ATA) + +Wed Jul 29 00:14:48 2009 joerg + * makefiles/RULES/power-macintosh-darwin-gcc.rul 1.16 + * makefiles/RULES/power-macintosh-darwin-cc32.rul 1.3 + * makefiles/RULES/power-macintosh-darwin-cc64.rul 1.3 + * makefiles/RULES/power-macintosh-darwin-gcc32.rul 1.3 + * makefiles/RULES/power-macintosh-darwin-cc.rul 1.16 + * makefiles/RULES/power-macintosh-darwin-gcc64.rul 1.3 + DYNLDC++ neu + +Tue Jul 28 23:56:10 2009 joerg + * makefiles/DEFAULTS_ENG/MKLINKS 1.3 + * makefiles/DEFAULTS/MKLINKS 1.3 + Mingw Fehler beseitigt + +Tue Jul 28 23:45:09 2009 joerg + * makefiles/RULES/MKLINKS 1.80 + Schreibfehler 6786-cygwin* -> i686-cygwin + +Tue Jul 28 23:44:32 2009 joerg + * mkisofs/mkisofs.c 1.249 + e_malloc() korrigiert, Bedenkliche Abfrage size > 0 beseitigt + +Tue Jul 28 21:16:32 2009 joerg + * libschily/format.c 1.48 + gcvt() -> (void) gcvt() + +Tue Jul 28 21:15:25 2009 joerg + * include/schily/hostname.h 1.18 + #include wegen Linux neu + +Mon Jul 27 23:13:17 2009 joerg + * makefiles/RULES/MKLINKS 1.79 + Neue Links 6786-cygwin32_wow64-cc.rul i786-cygwin32_wow64-cc.rul 6786-cygwin32_wow64-cc64.rul i786-cygwin32_wow64-cc64.rul 6786-cygwin32_wow64-gcc.rul i786-cygwin32_wow64-gcc.rul 6786-cygwin32_wow64-gcc64.rul i786-cygwin32_wow64-gcc64.rul + +Mon Jul 27 23:10:42 2009 joerg + * makefiles/RULES/i486-cygwin32_nt-cc64.rul 1.1 + * makefiles/RULES/i486-cygwin32_nt-gcc64.rul 1.1 + date and time created 09/07/27 23:10:42 by joerg + +Mon Jul 27 23:05:49 2009 joerg + * makefiles/DEFAULTS_ENG/MKLINKS 1.2 + * makefiles/DEFAULTS/MKLINKS 1.2 + Defaults.mingw32_wow64 Symlink neu + +Mon Jul 27 01:53:34 2009 joerg + * autoconf/aclocal.m4 1.79 + unistd.h -> unistd.h/stdlib.h + +Mon Jul 27 01:46:26 2009 joerg + * autoconf/aclocal.m4 1.78 + AC_HEADER_ENVIRON_DEF testet nun mit stdlib.h wenn unistd.h fehlt (wegen MSC) + +Mon Jul 27 01:35:36 2009 joerg + * include/schily/unistd.h 1.21 + #include wenn nicht HAVE_UNISTD_H, denn MSC hat environ in stdlib.h + +Sun Jul 26 20:18:09 2009 joerg + * libschily/geterrno.c 1.12 + * libschily/seterrno.c 1.11 + _TS_ERRNO und _LIBC_REENTRANT neu + +Sun Jul 26 19:48:27 2009 joerg + * libschily/astoull.c 1.2 + Umstellung auf seterrno() + +Sun Jul 26 16:46:13 2009 joerg + * autoconf/aclocal.m4 1.77 + write(2, "", 0) in AC_USER_MALLOC Test damit es nicht auf 64 Bit Vista mit Cygwin haengt + +Sun Jul 26 16:03:38 2009 joerg + * makefiles/RULES/power-macintosh-darwin-cc.rul 1.15 + * makefiles/RULES/power-macintosh-darwin-gcc64.rul 1.2 + * makefiles/RULES/power-macintosh-darwin-gcc32.rul 1.2 + * makefiles/RULES/power-macintosh-darwin-cc32.rul 1.2 + * makefiles/RULES/power-macintosh-darwin-gcc.rul 1.15 + * makefiles/RULES/power-macintosh-darwin-cc64.rul 1.2 + C++OPTDYN= -fPIC neu + +Sun Jul 26 14:27:36 2009 joerg + * makefiles/RULES/rules.inc 1.9 + Kein _EXEEXT definieren, damit nicht xxx.h.exe installiert wird + +Sun Jul 26 14:07:15 2009 joerg + * makefiles/RULES/os-cygwin_nt-6.1-wow64.id 1.1 + * makefiles/RULES/os-cygwin_nt-6.0-wow64.id 1.1 + date and time created 09/07/26 14:07:15 by joerg + +Sun Jul 26 01:29:35 2009 joerg + * makefiles/TEMPLATES/temp-gcc.rul 1.3 + * makefiles/TEMPLATES/temp-xcc.rul 1.3 + Umstellung auf cc-*.rul + +Sun Jul 26 00:24:35 2009 joerg + * makefiles/RULES/rules.top 1.20 + @echo " ==> MAKING -> @echo "==> MAKING + +Sat Jul 25 17:36:53 2009 joerg + * makefiles/DEFAULTS/Defaults.haiku 1.3 + /opt/schily -> /boot/opt/schily + +Sat Jul 25 16:01:19 2009 joerg + * cdrecord/fifo.c 1.59 + comerrno() statt errmsgno() in beosshm_child() wenn es nicht gelingt die BeOS Area shared zu machen + +Tue Jul 21 21:36:04 2009 joerg + * include/schily/termios.h 1.32 + #include wegen haiku + +Sat Jul 18 22:17:14 2009 joerg + * cdrecord/cdrecord.c 1.385 + * libschily/gethostname.c 1.19 + sys/utsname.h -> schily/utsname.h + +Sat Jul 18 18:59:50 2009 joerg + * mkisofs/diag/isoinfo.c 1.76 + * scgskeleton/skel.c 1.18 + * cdrecord/readcd.c 1.105 + * cdrecord/xio.c 1.20 + * cdda2wav/cdda2wav.c 1.114 + * btcflash/skel.c 1.21 + #include -> #include + +Sat Jul 18 18:32:47 2009 joerg + * libfind/find.c 1.80 + #include -> #include + fnmatch() is immer vorhanden da nun in libschily + +Tue Jul 14 21:37:23 2009 joerg + * cdrecord/cdrecord.c 1.384 + sys/mman.h -> schily/mman.h + +Tue Jul 14 01:15:43 2009 joerg + * include/schily/param.h 1.5 + HZ neu + +Tue Jul 14 00:57:30 2009 joerg + * include/schily/Targets 1.4 + systeminfo.mk neu + +Tue Jul 14 00:56:54 2009 joerg + * include/schily/systeminfo.mk 1.1 + date and time created 09/07/14 00:56:54 by joerg + +Tue Jul 14 00:56:08 2009 joerg + * include/schily/systeminfo.h 1.1 + date and time created 09/07/14 00:56:08 by joerg + +Mon Jul 13 21:29:21 2009 joerg + * rscsi/rscsi.c 1.35 + * libscg/scsi-atari.c 1.3 + * libscg/scsihack.c 1.55 + * libscg/scsitransp.c 1.97 + * libscg/scsi-remote.c 1.31 + * libschily/align_test.c 1.24 + #include *.h -> #include schily/*.h + +Mon Jul 13 21:27:18 2009 joerg + * libedc/repair.c 1.3 + char sccsid[] -> UConst char sccsid[] + +Mon Jul 13 21:23:50 2009 joerg + * libfile/file.h 1.12 + * libhfs_iso/block.c 1.8 + * libhfs_iso/file.c 1.8 + stdio.h -> schily/stdio.h + +Mon Jul 13 21:01:09 2009 joerg + * mkisofs/mkisofs.c 1.248 + Umbau auf schily/io.h + +Mon Jul 13 21:00:54 2009 joerg + * mkisofs/tree.c 1.117 + * mkisofs/Makefile 1.41 + exclude.h beseitigt + +Mon Jul 13 20:04:37 2009 joerg + * include/schily/vfork.h 1.1 + * include/schily/utsname.h 1.1 + date and time created 09/07/13 20:04:37 by joerg + +Mon Jul 13 20:04:36 2009 joerg + * include/schily/inet.h 1.1 + * include/schily/times.h 1.1 + * include/schily/setjmp.h 1.1 + * include/schily/socket.h 1.1 + * include/schily/netdb.h 1.1 + * include/schily/io.h 1.1 + * include/schily/shadow.h 1.1 + * include/schily/in.h 1.1 + date and time created 09/07/13 20:04:36 by joerg + +Mon Jul 13 19:26:41 2009 joerg + * include/schily/Targets 1.3 + in.mk inet.mk io.mk netdb.mk setjmp.mk shadow.mk socket.mk times.mk utsname.mk vfork.mk neu + +Mon Jul 13 19:25:18 2009 joerg + * include/schily/utsname.mk 1.1 + * include/schily/times.mk 1.1 + * include/schily/vfork.mk 1.1 + * include/schily/socket.mk 1.1 + * include/schily/netdb.mk 1.1 + * include/schily/setjmp.mk 1.1 + * include/schily/io.mk 1.1 + * include/schily/shadow.mk 1.1 + * include/schily/inet.mk 1.1 + * include/schily/in.mk 1.1 + date and time created 09/07/13 19:25:18 by joerg + +Mon Jul 13 19:20:22 2009 joerg + * include/schily/jmpdefs.h 1.9 + Umstellung auf schily/setjmp.h + +Sat Jul 11 12:23:14 2009 joerg + * libmdigest/md5.c 1.6 + * libmdigest/md4.c 1.3 + * libhfs_iso/node.c 1.6 + * libhfs_iso/volume.c 1.9 + * libhfs_iso/record.c 1.5 + * libhfs_iso/hfs.c 1.14 + * libhfs_iso/gdata.c 1.5 + * libhfs_iso/btree.c 1.7 + * libhfs_iso/file.c 1.7 + * libhfs_iso/low.c 1.9 + * libhfs_iso/data.c 1.8 + * libhfs_iso/block.c 1.7 + * libscg/scgtimes.c 1.4 + * libscg/scsierrs.c 2.33 + * libscg/scsihelp.c 1.7 + * libscg/scsiopen.c 1.101 + * libfile/apprentice.c 1.13 + * libfile/file.c 1.9 + * libfile/softmagic.c 1.12 + * libdeflt/default.c 1.8 + * btcflash/skel.c 1.20 + * libparanoia/isort.c 1.19 + * libparanoia/overlap.c 1.16 + * libparanoia/paranoia.c 1.42 + * libparanoia/gap.c 1.18 + * libparanoia/p_block.c 1.28 + * libparanoia/pmalloc.c 1.7 + * scgcheck/sense.c 1.9 + * scgcheck/dmaresid.c 1.11 + * scgcheck/scgcheck.c 1.18 + const char sccsid[] -> UConst char sccsid[] + +Sat Jul 11 00:20:20 2009 joerg + * libedc/edc_ecc_dec.c 1.11 + * libedc/edc_ecc.c 1.28 + * libedc/edcspeed.c 1.4 + * scgskeleton/skel.c 1.17 + * libfind/find_main.c 1.65 + * libfind/fetchdir.c 1.27 + * libfind/walk.c 1.38 + * libfind/cmpdir.c 1.27 + * libfind/idcache.c 1.28 + * libfind/find_misc.c 1.14 + * libfind/find.c 1.79 + * libfind/find_list.c 1.25 + * libsiconv/sic_nls.c 1.11 + * libcdrdeflt/cdrdeflt.c 1.25 + * libscgcmd/read.c 1.158 + * libscgcmd/modes.c 1.29 + * libscgcmd/inquiry.c 1.158 + * libscgcmd/buffer.c 1.158 + * libscgcmd/readcap.c 1.158 + * libscgcmd/modesense.c 1.158 + * libscgcmd/ready.c 1.158 + const char sccsid[] -> UConst char sccsid[] + +Fri Jul 10 22:36:47 2009 joerg + * cdda2wav/resample.c 1.31 + * cdda2wav/sndconfig.c 1.33 + * cdda2wav/toc.c 1.83 + * cdda2wav/parse.c 1.8 + * cdda2wav/wav.c 1.11 + * cdda2wav/sun.c 1.12 + * cdda2wav/scsi_cmds.c 1.47 + * cdda2wav/ringbuff.c 1.19 + * cdda2wav/cd_extra.c 1.16 + * cdda2wav/setuid.c 1.19 + * cdda2wav/raw.c 1.11 + * cdda2wav/sha.h 1.7 + * cdda2wav/base64.c 1.10 + * cdda2wav/cdda2wav.c 1.113 + * cdda2wav/aifc.c 1.13 + * cdda2wav/ioctl.c 1.37 + * cdda2wav/interface.c 1.67 + * cdda2wav/aiff.c 1.12 + * libschily/avoffset.c 1.30 + * libschily/align_test.c 1.23 + * libschily/getdomainname.c 1.21 + * libschily/printf.c 1.17 + * libschily/getpagesize.c 1.5 + * libschily/spawn.c 1.24 + * libschily/findline.c 1.18 + * libschily/jssnprintf.c 1.12 + * libschily/raisecond.c 1.22 + * libschily/error.c 1.15 + * libschily/snprintf.c 1.13 + * libschily/comerr.c 1.35 + * libschily/fexec.c 1.41 + * libschily/fcomerr.c 1.2 + * libschily/serrmsg.c 1.5 + * libparanoia/paranoia.c 1.41 + * cdrecord/wm_packet.c 1.30 + * cdrecord/subchan.c 1.26 + * cdrecord/scsi_cdr_mmc4.c 1.6 + * cdrecord/wm_track.c 1.8 + * cdrecord/wm_session.c 1.8 + * cdrecord/drv_bd.c 1.15 + * cdrecord/scsi_mmc4.c 1.6 + * cdrecord/vendor.c 1.4 + * cdrecord/sector.c 1.17 + * cdrecord/scsilog.c 1.24 + * cdrecord/drv_7501.c 1.28 + * cdrecord/scsi_mmc.c 1.50 + * cdrecord/cdr_drv.c 1.48 + * cdrecord/fifo.c 1.58 + * cdrecord/io.c 1.7 + * cdrecord/scsi_scan.c 1.34 + * cdrecord/drv_sony.c 1.86 + * cdrecord/drv_simul.c 1.60 + * cdrecord/cue.c 1.38 + * cdrecord/misc.c 1.8 + * cdrecord/drv_dvdplus.c 1.57 + * cdrecord/drv_dvd.c 1.160 + * cdrecord/readcd.c 1.104 + * cdrecord/drv_mmc.c 1.195 + * cdrecord/auinfo.c 1.27 + * cdrecord/scsi_cdr.c 1.158 + * cdrecord/cdtext.c 1.16 + * cdrecord/diskid.c 1.43 + * cdrecord/drv_philips.c 1.81 + * cdrecord/cd_misc.c 1.17 + * cdrecord/drv_jvc.c 1.93 + * cdrecord/clone.c 1.11 + stdio.h -> schily/stdio.h + +Fri Jul 10 22:02:42 2009 joerg + * libfind/find_main.c 1.64 + * libfind/idcache.c 1.27 + * libfind/find_misc.c 1.13 + * libfind/find_list.c 1.24 + * libfind/find_misc.h 1.7 + * libfind/fetchdir.c 1.26 + * libfind/find.c 1.78 + * libfind/walk.c 1.37 + * libfind/cmpdir.c 1.26 + * libfind/find_list.h 1.8 + #include * -> #include schily/* + +Fri Jul 10 21:55:36 2009 joerg + * libschily/getargs.c 2.61 + * mkisofs/name.c 1.37 + * mkisofs/match.h 1.15 + * mkisofs/write.c 1.123 + * mkisofs/mkisofs.h 1.138 + * mkisofs/apple.c 1.38 + * mkisofs/mkisofs.c 1.247 + * mkisofs/files.c 1.17 + * mkisofs/multi.c 1.93 + ctype.h -> schily/ctype.h + +Fri Jul 10 21:50:37 2009 joerg + * makefiles/RULES/rules.hlp 1.15 + make depend Hilfe verbessert + +Fri Jul 10 21:48:46 2009 joerg + * mkisofs/diag/isoinfo.c 1.75 + limits.h -> schily/limits.h + +Fri Jul 10 21:34:46 2009 joerg + * include/schily/pwd.mk 1.1 + * include/schily/pwd.h 1.1 + date and time created 09/07/10 21:34:46 by joerg + +Fri Jul 10 21:34:11 2009 joerg + * include/schily/grp.h 1.1 + * include/schily/grp.mk 1.1 + date and time created 09/07/10 21:34:11 by joerg + +Fri Jul 10 21:32:46 2009 joerg + * include/schily/ctype.mk 1.1 + * include/schily/ctype.h 1.1 + date and time created 09/07/10 21:32:46 by joerg + +Fri Jul 10 21:32:22 2009 joerg + * include/schily/Makefile 1.21 + * include/schily/Mrel 1.21 + Lange Fileliste -> X_MK_FILE + include Targets + +Fri Jul 10 21:30:58 2009 joerg + * include/schily/Targets 1.2 + XMK_FILE= -> X_MK_LIST= + +Fri Jul 10 21:10:53 2009 joerg + * include/schily/Targets 1.1 + date and time created 09/07/10 21:10:53 by joerg + +Fri Jul 10 21:10:41 2009 joerg + * include/schily/Mrel 1.20 + * include/schily/Makefile 1.20 + ctype.mk, grp.mk, pwd.mk neu + +Fri Jul 10 20:57:51 2009 joerg + * autoconf/configure.in 1.183 + * autoconf/xconfig.h.in 1.171 + HAVE_CTYPE_H neu + +Thu Jul 9 00:34:29 2009 joerg + * conf/src-get 1.20 + %Z% war falsch + +Thu Jul 9 00:33:28 2009 joerg + * conf/src-get 1.19 + -version neu + Die Directory muss nicht mehr komplett leer sein, es dard src-get darin sein + +Thu Jul 9 00:25:26 2009 joerg + * mkisofs/udf.c 1.34 + * mkisofs/scsi.c 1.33 + * mkisofs/volume.c 1.24 + * mkisofs/rock.c 1.60 + * mkisofs/write.c 1.122 + * mkisofs/stream.c 1.14 + * mkisofs/walk.c 1.10 + * mkisofs/tree.c 1.116 + * mkisofs/mkisofs.c 1.246 + * mkisofs/inode.c 1.12 + * mkisofs/dvd_reader.c 1.9 + * mkisofs/desktop.c 1.10 + * mkisofs/hash.c 1.26 + * mkisofs/dvd_file.c 1.10 + * mkisofs/ifo_read.c 1.13 + * mkisofs/boot.c 1.23 + * mkisofs/eltorito.c 1.47 + * mkisofs/mac_label.c 1.17 + * mkisofs/apple.c 1.37 + * mkisofs/joliet.c 1.60 + * mkisofs/isonum.c 1.8 + * mkisofs/match.c 1.29 + * mkisofs/multi.c 1.92 + * mkisofs/name.c 1.36 + * mkisofs/diag/dump.c 1.36 + * mkisofs/diag/isodebug.c 1.26 + * mkisofs/diag/isovfy.c 1.40 + * mkisofs/diag/isoinfo.c 1.74 + * mkisofs/diag/isodump.c 1.41 + * libschily/sleep.c 1.3 + * libschily/strcat.c 1.2 + * libschily/wcscat.c 1.2 + * libschily/wcscpy.c 1.2 + * libschily/usleep.c 1.21 + * libschily/wcsdup.c 1.6 + * libschily/strncpy.c 1.4 + * libschily/jmem.c 1.12 + * libschily/wcslcpy.c 1.5 + * libschily/mem.c 1.10 + * libschily/strcpy.c 1.2 + * libschily/wcsncat.c 1.2 + * libschily/strdup.c 1.5 + * libschily/rename.c 1.10 + * libschily/wcsncmp.c 1.3 + * libschily/wcsncpy.c 1.5 + * libschily/strncmp.c 1.3 + * libschily/strlcpy.c 1.4 + * libschily/getxtnum.c 1.9 + * libschily/strncat.c 1.2 + * libschily/findinpath.c 1.5 + * libschily/gettimeofday.c 1.3 + * libschily/getperm.c 1.4 + * libschily/gethostid.c 1.19 + * libschily/getargs.c 2.60 + * libschily/getpagesize.c 1.4 + * libschily/getnum.c 1.6 + * libschily/getdomainname.c 1.20 + * libschily/gettnum.c 1.9 + * libschily/fstream.c 1.26 + * libschily/checkerr.c 1.24 + * libschily/cmpbytes.c 1.20 + * libschily/fnmatch.c 8.8 + * libschily/getav0.c 1.23 + * libschily/eaccess.c 1.3 + * libschily/fjmem.c 1.13 + * libschily/cmpnullbytes.c 1.7 + * libschily/getxnum.c 1.6 + * libschily/gethostname.c 1.18 + const char sccsid[] -> UConst char sccsid[] + +Thu Jul 9 00:21:27 2009 joerg + * mkisofs/mkisofs.h 1.137 + stdio.h -> schily/stdio.h + +Sun Jul 5 23:45:13 2009 joerg + * cdrecord/version.h 1.36 + Version -> 2.01.01a61 + +Sun Jul 5 23:35:12 2009 joerg + * cdrecord/cdrecord.c 1.383 + * libscg/scsihack.c 1.54 + * libscg/scsi-remote.c 1.30 + * cdda2wav/sndconfig.c 1.32 + * mkisofs/mkisofs.c 1.245 + * mkisofs/diag/isoinfo.c 1.73 + MINGW neu + +Sun Jul 5 23:33:17 2009 joerg + * cdrecord/cdrecord.c 1.382 + singal() nur aufrufen wenn es das betreffende Signal auch gibt + +Sun Jul 5 23:18:58 2009 joerg + * rscsi/rscsi.c 1.34 + HAVE_PWD_H und HAVE_NETINET_IN_H test neu + +Sun Jul 5 22:35:05 2009 joerg + * cdda2wav/cdda2wav.c 1.112 + Diverse #ifdefs fuer MINGW + +Sun Jul 5 20:59:13 2009 joerg + * mkisofs/defaults.h 1.24 + __MINGW32__ neu + +Sun Jul 5 20:19:27 2009 joerg + * cdda2wav/sndconfig.c 1.31 + * cdda2wav/setuid.c 1.18 + * cdda2wav/sun.c 1.11 + * cdda2wav/resample.c 1.30 + * cdda2wav/toc.c 1.82 + * cdda2wav/semshm.c 1.28 + * cdda2wav/ringbuff.c 1.18 + * cdda2wav/raw.c 1.10 + * cdda2wav/scsi_cmds.c 1.46 + * cdda2wav/wav.c 1.10 + * cdda2wav/sha_func.c 1.7 + * cdda2wav/interface.c 1.66 + * cdda2wav/aifc.c 1.12 + * cdda2wav/aiff.c 1.11 + * cdda2wav/cdda2wav.c 1.111 + * cdda2wav/ioctl.c 1.36 + * cdda2wav/base64.c 1.9 + * cdda2wav/md5.c 1.5 + * cdda2wav/parse.c 1.7 + * cdrecord/scsi_scan.c 1.33 + * cdrecord/wm_packet.c 1.29 + * cdrecord/drv_dvdplus.c 1.56 + * cdrecord/movesect.c 1.6 + * cdrecord/fifo.c 1.57 + * cdrecord/subchan.c 1.25 + * cdrecord/xio.c 1.19 + * cdrecord/drv_mmc.c 1.194 + * cdrecord/drv_simul.c 1.59 + * cdrecord/misc.c 1.7 + * cdrecord/scsi_cdr_mmc4.c 1.5 + * cdrecord/drv_jvc.c 1.92 + * cdrecord/drv_sony.c 1.85 + * cdrecord/drv_philips.c 1.80 + * cdrecord/isosize.c 1.12 + * cdrecord/readcd.c 1.103 + * cdrecord/scsi_mmc.c 1.49 + * cdrecord/wm_track.c 1.7 + * cdrecord/scsilog.c 1.23 + * cdrecord/wm_session.c 1.7 + * cdrecord/scsi_cdr.c 1.157 + * cdrecord/io.c 1.6 + * cdrecord/sector.c 1.16 + * cdrecord/vendor.c 1.3 + * cdrecord/scsi_mmc4.c 1.5 + * cdrecord/crc16.c 1.9 + * cdrecord/auinfo.c 1.26 + * cdrecord/clone.c 1.10 + * cdrecord/cue.c 1.37 + * cdrecord/drv_dvd.c 1.159 + * cdrecord/cdr_drv.c 1.47 + * cdrecord/diskid.c 1.42 + * cdrecord/cd_misc.c 1.16 + * cdrecord/cdrecord.c 1.381 + * cdrecord/drv_7501.c 1.27 + * cdrecord/audiosize.c 1.23 + * cdrecord/cdtext.c 1.15 + * cdrecord/drv_bd.c 1.14 + const char sccsid[] -> UConst char sccsid[] + +Thu Jul 2 23:31:26 2009 joerg + * autoconf/configure.in 1.182 + * autoconf/xconfig.h.in 1.170 + HAVE_SETBUF und HAVE_SETVBUF neu + +Wed Jul 1 00:36:39 2009 joerg + * libparanoia/cdda_paranoia.h 1.26 + #include fuer movebytes() + +Tue Jun 30 21:46:20 2009 joerg + * libschily/stdio/ffileread.c 1.13 + * libschily/stdio/ffilewrite.c 1.8 + Umbau auf Konzept von niread()/niwrite() + +Tue Jun 30 21:41:23 2009 joerg + * libschily/stdio/filewrite.c 1.17 + write() -> _niwrite() + +Tue Jun 30 21:38:31 2009 joerg + * libschily/stdio/niwrite.c 1.7 + * libschily/stdio/filewrite.c 1.16 + * libschily/stdio/niread.c 1.14 + * libschily/stdio/nixwrite.c 1.7 + * libschily/stdio/ffilewrite.c 1.7 + * libschily/stdio/nixread.c 1.14 + * libschily/stdio/fileread.c 1.16 + * libschily/stdio/ffileread.c 1.12 + Umstellung auf size_t + +Tue Jun 30 21:37:32 2009 joerg + * libschily/stdio/schilyio.h 2.27 + * cdda2wav/semshm.c 1.27 + * libschily/jsprintf.c 1.17 + #include neu wegen size_t + +Tue Jun 30 20:39:38 2009 joerg + * cdrecord/cdrecord.h 1.199 + Umstellung auf schily/types.h + +Tue Jun 30 20:36:12 2009 joerg + * mkisofs/diag/isoinfo.c 1.72 + * mkisofs/diag/isodebug.c 1.25 + * libscg/scsi-remote.c 1.29 + * libscg/scsi-qnx.c 1.5 + * libscg/scsi-osf.c 1.28 + * libscg/scsi-beos.c 1.29 + Umstellung auf schily/*.h + +Tue Jun 30 20:26:14 2009 joerg + * include/schily/sigset.h 1.9 + Copyright -> 2009 + +Tue Jun 30 20:19:52 2009 joerg + * include/schily/schily.h 1.84 + *read*()/*write*() auf size_t umgestellt + +Tue Jun 30 20:17:57 2009 joerg + * include/schily/signal.h 1.8 + Alter Inhalt -> schily/sigset.h + +Tue Jun 30 20:17:11 2009 joerg + * include/schily/Makefile 1.19 + * include/schily/Mrel 1.19 + sigset.mk neu + +Tue Jun 30 20:16:46 2009 joerg + * include/schily/sigset.mk 1.2 + * include/schily/sigset.h 1.8 + schily/signal.h -> schily/sigset.h + +Mon Jun 29 23:48:54 2009 joerg + * autoconf/xconfig.h.in 1.169 + * autoconf/aclocal.m4 1.76 + * autoconf/configure.in 1.181 + HAVE_LONGDOUBLE und SIZEOF_LONGDOUBLE neu + +Mon Jun 29 23:48:09 2009 joerg + * include/schily/wctype.h 1.7 + Struktur fuer #define USE_WCTYPE war nach letzter Aenderung komplett falsch + +Mon Jun 29 23:10:44 2009 joerg + * include/schily/schily.h 1.83 + #ifdef _INCL_SYS_TYPES_H -> #ifdef _SCHILY_TYPES_H + +Mon Jun 29 21:47:08 2009 joerg + * autoconf/configure.in 1.180 + * autoconf/xconfig.h.in 1.168 + HAVE_WCWIDTH HAVE_WCSWIDTH HAVE_WCTYPE HAVE_ISWCTYPE neu + +Sun Jun 28 22:37:50 2009 joerg + * libschily/getargs.c 2.59 + checkeql() testet 1. Zeichen nicht mehr 2x (daher c = *str++ -> c = *++str) + +Sun Jun 28 22:32:24 2009 joerg + * libschily/getargs.c 2.58 + RETMAX / RETMIN neu + RNAME(a) basiert nun auf RETMIN + +Fri Jun 26 19:41:20 2009 joerg + * mkisofs/mkisofs.8 1.129 + Fehlendes .br zwischen beiden Synopsis Zeilen + Datum im Header auf %e% + +Tue Jun 23 22:02:22 2009 joerg + * include/schily/md5.h 1.9 + Copyright -> 2009 + +Tue Jun 23 21:57:03 2009 joerg + * libmdigest/shlmdigest.mk 1.3 + * libmdigest/mdigest.mk 1.3 + Staerkere Optimierung fuer SunPro und GCC + +Tue Jun 23 19:24:07 2009 joerg + * include/schily/prototyp.h 1.14 + #include neu wegen static UConst char sccsid[] + +Sun Jun 21 23:43:45 2009 joerg + * libmdigest/mdigest_p.mk 1.2 + * libmdigest/shlmdigest.mk 1.2 + * libmdigest/Makefile 1.2 + * libmdigest/mdigest.mk 1.2 + digest -> mdigest + +Sun Jun 21 15:08:39 2009 joerg + * libmdigest/Targets 1.2 + md4.c neu + +Sun Jun 21 15:08:24 2009 joerg + * libmdigest/md4.c 1.2 + * include/schily/md4.h 1.2 + Portabel gemacht + +Sun Jun 21 15:07:10 2009 joerg + * libmdigest/md5.c 1.5 + #include "md5.h" -> #include + +Sun Jun 21 14:46:37 2009 joerg + * include/schily/Mrel 1.18 + * include/schily/Makefile 1.18 + md4.mk neu + +Sun Jun 21 14:44:17 2009 joerg + * include/schily/md5.h 1.8 + extern "C" neu + +Sat Jun 20 22:32:08 2009 joerg + * include/schily/md4.mk 1.1 + date and time created 09/06/20 22:32:08 by joerg + +Sat Jun 20 22:28:16 2009 joerg + * include/schily/md5.h 1.7 + _MD5_H_ -> _SCHILY_MD5_H_ + +Sat Jun 20 22:27:38 2009 joerg + * include/schily/Mrel 1.17 + * include/schily/Makefile 1.17 + md5.mk neu + +Sat Jun 20 22:26:50 2009 joerg + * include/schily/md5.mk 1.1 + date and time created 09/06/20 22:26:50 by joerg + +Mon Jun 15 23:51:12 2009 joerg + * libmdigest/libdigest-mapvers 1.1 + date and time created 09/06/15 23:51:12 by joerg + +Mon Jun 15 23:43:17 2009 joerg + * libmdigest/Targets 1.1 + date and time created 09/06/15 23:43:17 by joerg + +Mon Jun 15 23:40:20 2009 joerg + * libmdigest/mdigest_p.mk 1.1 + date and time created 09/06/15 23:40:20 by joerg + +Mon Jun 15 23:40:11 2009 joerg + * libmdigest/mdigest.mk 1.1 + date and time created 09/06/15 23:40:11 by joerg + +Mon Jun 15 23:39:57 2009 joerg + * libmdigest/shlmdigest.mk 1.1 + date and time created 09/06/15 23:39:57 by joerg + +Mon Jun 15 23:39:33 2009 joerg + * libmdigest/noshlmdigest.mk 1.1 + date and time created 09/06/15 23:39:33 by joerg + +Mon Jun 15 23:38:59 2009 joerg + * libmdigest/Makefile 1.1 + date and time created 09/06/15 23:38:59 by joerg + +Mon Jun 15 22:45:55 2009 joerg + * include/schily/ccomdefs.h 1.6 + UConst neu + +Sun Jun 14 19:56:06 2009 joerg + * include/schily/wctype.h 1.6 + * include/schily/wchar.h 1.12 + HP-UX hat iswprint() aber kein wctype.h + +Sun Jun 14 17:50:23 2009 joerg + * autoconf/configure.in 1.179 + * autoconf/xconfig.h.in 1.167 + Test auf iswprint() neu weil HP-UX iswprint() in wchar.h hat und daher ein Ersatz zu HAVE_WCTYPE_H gebraucht wird + +Sun Jun 14 17:28:27 2009 joerg + * include/schily/wchar.h 1.11 + Vermeiden der GCC Warnung: left-hand operand of comma expression has no effect + +Sun Jun 14 15:03:56 2009 joerg + * include/schily/dlfcn.h 1.2 + * include/schily/schily.h 1.82 + * include/schily/siconv.h 1.3 + * include/schily/sysexits.h 1.5 Cstyle -Sun Feb 29 18:19:58 2004 Joerg Schilling - * cdrecord.c 1.275 - Version -> 2.01a26 - -tao/-sao neu - -Sun Feb 29 18:13:20 2004 Joerg Schilling - * cdrecord.1 1.92 - -tao Option neu, -sao Option als Alias fuer -dao +Sun Jun 14 14:58:18 2009 joerg + * include/schily/wchar.h 1.10 + Workaround in mbtowc() Dummy Makro fuer die Notwendigkeit fuer mbtowc(NULL, NULL, 0) auf Mac OS X + +Sat Jun 13 17:14:41 2009 joerg + * cdrecord/readcd.c 1.102 + read_ftoc() konnte einen Coredump verursachen durch parmp == NULL + +Wed Jun 10 00:49:50 2009 joerg + * libscg/scsi-mac-iokit.c 1.14 + #if defined(__LP64__) in scgsend() neu weil Apple unterschiedliche Types verwendet + +Tue Jun 9 20:48:47 2009 joerg + * makefiles/RULES/MKLINKS 1.78 + i386-darwin-cc64.rul und i386-darwin-gcc64.rul neu + +Tue Jun 9 20:40:45 2009 joerg + * makefiles/RULES/power-macintosh-darwin-gcc64.rul 1.1 + * makefiles/RULES/power-macintosh-darwin-gcc32.rul 1.1 + date and time created 09/06/09 20:40:45 by joerg + +Tue Jun 9 20:39:38 2009 joerg + * makefiles/RULES/power-macintosh-darwin-cc64.rul 1.1 + * makefiles/RULES/power-macintosh-darwin-cc32.rul 1.1 + date and time created 09/06/09 20:39:38 by joerg + +Sun Jun 7 19:19:26 2009 joerg + * include/schily/wctype.h 1.5 + * include/schily/wchar.h 1.9 + wctype.h definiert nicht mehr USE_WCHAR um und wchar.h hat dafuer Wissen ueber USE_WCTYPE + +Sun Jun 7 15:47:02 2009 joerg + * include/schily/schily.h 1.81 + * include/schily/libport.h 1.19 + wcs*() Funktionsprototypen neu + +Sun Jun 7 15:45:30 2009 joerg + * autoconf/configure.in 1.178 + * autoconf/xconfig.h.in 1.166 + HAVE_ACCESSAT neu + +Sun Jun 7 15:41:57 2009 joerg + * libschily/streql.c 1.10 + Copyright -> 2009 + +Sun Jun 7 15:39:51 2009 joerg + * libschily/streql.c 1.9 + if (s1 == s2) return (TRUE); + +Sun Jun 7 15:38:34 2009 joerg + * libschily/wcsncmp.c 1.2 + * libschily/wcscmp.c 1.6 + * libschily/strncmp.c 1.2 + * libschily/strcmp.c 1.6 + if (s1 == s2) return (0); + +Sun Jun 7 15:36:40 2009 joerg + * libschily/wcseql.c 1.10 + return TRUE wenn (s1 == s2) + Test auf s1 bzw. s2 == NULL beseitigt + +Sun Jun 7 15:30:16 2009 joerg + * libschily/wcscmp.c 1.5 + * libschily/strcmp.c 1.5 + Optimierung + +Sun Jun 7 14:07:51 2009 joerg + * libschily/strchr.c 1.3 + * libschily/wcschr.c 1.4 + The terminating NUL character is considered to be part of the string, daher do ... while Schleife + +Sun Jun 7 13:58:26 2009 joerg + * libschily/strrchr.c 1.2 + * libschily/strchr.c 1.2 + Parameter char -> int, dafuer c -> char Casten + +Sun Jun 7 13:55:40 2009 joerg + * libschily/wcslen.c 1.5 + Schreibfehlerkorrektur: strlen(s) -> wcslen(s) + +Sat Jun 6 23:48:52 2009 joerg + * makefiles/RULES/sun3-sunos4-gcc.rul 1.11 + Unser gcc auf SunOS-4.1.1_U1 kann nicht -Wno-unknown-pragmas + +Sat Jun 6 13:58:46 2009 joerg + * libschily/libschily-mapvers 1.15 + * libschily/Targets 1.16 + Gleicher Satz von wcs*() und str*() Funktionen + +Sat Jun 6 13:50:06 2009 joerg + * libschily/strcpy.c 1.1 + date and time created 09/06/06 13:50:06 by joerg + +Sat Jun 6 13:45:46 2009 joerg + * libschily/strrchr.c 1.1 + date and time created 09/06/06 13:45:46 by joerg + +Sat Jun 6 13:45:42 2009 joerg + * libschily/strncmp.c 1.1 + date and time created 09/06/06 13:45:42 by joerg + +Sat Jun 6 13:45:38 2009 joerg + * libschily/strncat.c 1.1 + date and time created 09/06/06 13:45:38 by joerg + +Sat Jun 6 13:45:27 2009 joerg + * libschily/strchr.c 1.1 + date and time created 09/06/06 13:45:27 by joerg + +Sat Jun 6 13:45:24 2009 joerg + * libschily/strcat.c 1.1 + date and time created 09/06/06 13:45:24 by joerg + +Sat Jun 6 13:42:12 2009 joerg + * libschily/wcscmp.c 1.4 + * libschily/wcschr.c 1.3 + * libschily/strcmp.c 1.4 + cstyle + +Sat Jun 6 13:39:27 2009 joerg + * libschily/strcmp.c 1.3 + #ifndef HAVE_STRCMP neu + +Sat Jun 6 13:38:50 2009 joerg + * libschily/strlen.c 1.3 + #ifndef HAVE_STRLEN neu + +Sat Jun 6 13:30:35 2009 joerg + * libschily/wcslen.c 1.4 + Parameter wird const + +Sat Jun 6 12:50:54 2009 joerg + * autoconf/configure.in 1.177 + * autoconf/xconfig.h.in 1.165 + HAVE_WCSLCPY und HAVE_WCSDUP neu + HAVE_STR* ist aequivalent zu HAVE_WCS* + +Sat Jun 6 01:07:39 2009 joerg + * include/schily/walk.h 1.26 + * include/schily/ccomdefs.h 1.5 + * include/schily/schilyp.h 1.2 + * include/schily/align.h 1.7 + * include/schily/schily.h 1.80 + * include/schily/jos_maxp.h 1.3 + * include/schily/jmpdefs.h 1.8 + * include/schily/checkerr.h 1.11 + #include neu + +Sat Jun 6 01:07:18 2009 joerg + * include/schily/archdefs.h 1.7 + Hinweis auf schily/mconfig.h neu + +Sat Jun 6 01:04:25 2009 joerg + * libschily/Targets 1.15 + * libschily/libschily-mapvers 1.14 + wcs*() Funktionen neu + +Sat Jun 6 01:02:21 2009 joerg + * libschily/wcsdup.c 1.5 + * libschily/wcsrchr.c 1.2 + * libschily/wcsncpy.c 1.4 + * libschily/wcslen.c 1.3 + * libschily/wcslcpy.c 1.4 + * libschily/wcseql.c 1.9 + * libschily/wcscmp.c 1.3 + * libschily/wcschr.c 1.2 + * libschily/wcscatl.c 1.14 + Umbau auf wchar_t + +Sat Jun 6 00:34:37 2009 joerg + * libschily/wcscat.c 1.1 + date and time created 09/06/06 00:34:37 by joerg + +Sat Jun 6 00:33:29 2009 joerg + * libschily/wcsncmp.c 1.1 + date and time created 09/06/06 00:33:29 by joerg + +Fri Jun 5 17:10:44 2009 joerg + * libschily/wcsncat.c 1.1 + date and time created 09/06/05 17:10:44 by joerg + +Fri Jun 5 15:47:30 2009 joerg + * libschily/wcscpy.c 1.1 + date and time created 09/06/05 15:47:30 by joerg + +Thu Jun 4 23:11:00 2009 joerg + * makefiles/DEFAULTS_ENG/Defaults.linux 1.7 + * makefiles/DEFAULTS_ENG/Defaults.sunos5 1.5 + * makefiles/DEFAULTS_ENG/Defaults.irix 1.5 + * makefiles/DEFAULTS_ENG/Defaults.syllable 1.2 + * makefiles/DEFAULTS_ENG/Defaults.interix 1.6 + * makefiles/DEFAULTS_ENG/Defaults.hp-ux 1.5 + * makefiles/DEFAULTS_ENG/Defaults.haiku 1.2 + * makefiles/DEFAULTS_ENG/Defaults.ms-dos 1.5 + * makefiles/DEFAULTS_ENG/Defaults.osf1 1.5 + * makefiles/DEFAULTS_ENG/Defaults.gnu 1.5 + * makefiles/DEFAULTS_ENG/Defaults.os2 1.5 + * makefiles/DEFAULTS_ENG/Defaults.newsos6 1.5 + * makefiles/DEFAULTS_ENG/Defaults.dgux 1.5 + * makefiles/DEFAULTS_ENG/Defaults.dgux3 1.5 + * makefiles/DEFAULTS_ENG/Defaults.domainos 1.5 + * makefiles/DEFAULTS_ENG/Defaults.beos 1.5 + * makefiles/DEFAULTS_ENG/Defaults.dgux4 1.5 + * makefiles/DEFAULTS_ENG/Defaults.amigaos 1.5 + * makefiles/DEFAULTS_ENG/Defaults.aix 1.5 + * makefiles/DEFAULTS/Defaults.sunos5 1.5 + * makefiles/DEFAULTS/Defaults.irix 1.5 + * makefiles/DEFAULTS/Defaults.haiku 1.2 + * makefiles/DEFAULTS/Defaults.gnu 1.5 + * makefiles/DEFAULTS/Defaults.beos 1.5 + * makefiles/DEFAULTS/Defaults.dgux3 1.5 + * makefiles/DEFAULTS/Defaults.hp-ux 1.5 + * makefiles/DEFAULTS/Defaults.osf1 1.5 + * makefiles/DEFAULTS/Defaults.ms-dos 1.5 + * makefiles/DEFAULTS/Defaults.os2 1.5 + * makefiles/DEFAULTS/Defaults.interix 1.6 + * makefiles/DEFAULTS/Defaults.amigaos 1.5 + * makefiles/DEFAULTS/Defaults.dgux 1.5 + * makefiles/DEFAULTS/Defaults.aix 1.5 + * makefiles/DEFAULTS/Defaults.newsos6 1.5 + * makefiles/DEFAULTS/Defaults.syllable 1.2 + * makefiles/DEFAULTS/Defaults.dgux4 1.5 + * makefiles/DEFAULTS/Defaults.domainos 1.5 + * makefiles/DEFAULTS/Defaults.linux 1.7 + -R$(OLIBSDIR) beseitigt + +Tue Jun 2 23:07:20 2009 joerg + * include/schily/wchar.h 1.8 + * include/schily/wctype.h 1.4 + #define SIZEOF_WCHAR_T SIZEOF_CHAR wenn kein wchar_t verwendet wird + +Sun May 31 23:54:41 2009 joerg + * autoconf/xconfig.h.in 1.164 + * autoconf/configure.in 1.176 + HAVE_WCS* neu + +Sun May 31 23:28:06 2009 joerg + * autoconf/aclocal.m4 1.75 + * autoconf/xconfig.h.in 1.163 + * autoconf/configure.in 1.175 + AC_CHECK_SIZE_WCHAR und AC_CHECK_SIZE_WCHAR_T neu + +Sat May 30 22:01:10 2009 joerg + * libschily/Targets 1.14 + matchw.c matchwl.c neu + +Sat May 30 22:00:50 2009 joerg + * libschily/match.c 1.23 + Umbau Uchar -> CHAR damit wchar_t moeglich wird + +Sat May 30 21:49:41 2009 joerg + * include/schily/patmatch.h 1.13 + patwcompile()/patwmatch()/patwlmatch() neu + +Sat May 30 21:48:30 2009 joerg + * include/schily/wctype.h 1.3 + #define USE_WCTYPE nur wenn #ifndef USE_WCTYPE + +Sat May 30 21:46:03 2009 joerg + * include/schily/wchar.h 1.7 + USE_WCHAR wird Default + +Sat May 30 19:27:01 2009 joerg + * mkisofs/diag/isoinfo.c 1.71 + Bei illegalem Monat wird nun ??? statt gar nichts ausgegeben damit der Output von -l immer parsierbar bleibt + +Thu May 28 00:40:11 2009 joerg + * libschily/matchwl.c 1.1 + date and time created 09/05/28 00:40:11 by joerg + +Thu May 28 00:40:09 2009 joerg + * libschily/matchw.c 1.1 + date and time created 09/05/28 00:40:09 by joerg + +Sun May 24 13:07:46 2009 joerg + * include/schily/dirent.h 1.28 + * include/schily/utypes.h 1.28 + Umbau auf schily/limits.h + +Sun May 24 12:58:29 2009 joerg + * include/schily/Makefile 1.16 + * include/schily/Mrel 1.16 + limits.mk neu + +Sun May 24 12:57:22 2009 joerg + * include/schily/limits.mk 1.1 + date and time created 09/05/24 12:57:22 by joerg + +Sun May 24 12:56:38 2009 joerg + * include/schily/limits.h 1.1 + date and time created 09/05/24 12:56:38 by joerg + +Sun May 24 12:23:37 2009 joerg + * include/schily/locale.h 1.2 + #define USE_LOCALE wird Default + +Sat May 23 16:29:05 2009 joerg + * include/schily/nlsdefs.h 1.3 + _NLSDEFS_H -> _SCHILY_NLSDEFS_H + #include -> #include + +Sat May 23 16:25:55 2009 joerg + * include/schily/Mrel 1.15 + * include/schily/Makefile 1.15 + locale.mk neu + +Sat May 23 16:22:31 2009 joerg + * include/schily/locale.mk 1.1 + date and time created 09/05/23 16:22:31 by joerg + +Sat May 23 16:21:33 2009 joerg + * include/schily/locale.h 1.1 + date and time created 09/05/23 16:21:33 by joerg + +Fri May 22 15:32:34 2009 joerg + * cdda2wav/scsi_cmds.c 1.45 + Weitere Aufrufe von unit_ready() - speziell nach fehlerhaftem READ TOC as Workaround gegen Solaris scsa2usb (SCSA to USB Driver) + +Fri May 22 13:08:38 2009 joerg + * cdda2wav/scsi_cmds.c 1.44 + unit_ready() Aufrufe neu in den TOC Funktionen + +Fri May 22 13:06:36 2009 joerg + * cdda2wav/cdda2wav.c 1.110 + * cdda2wav/cdda2wav.1 1.33 + -interactive neu + +Fri May 22 13:06:01 2009 joerg + * cdda2wav/parse.c 1.6 + pusage() und "help" Kommando neu + +Thu May 21 15:14:20 2009 joerg + * cdrecord/version.h 1.35 + Version -> 2.01.01a60 + +Thu May 21 13:20:53 2009 joerg + * makefiles/RULES/MKLINKS 1.77 + i686-cygwin32_wow64-cl.rul i786-cygwin32_wow64-cl.rul i686-cygwin32_nt-cl64.rul i786-cygwin32_nt-cl64.rul neu + +Thu May 21 13:06:39 2009 joerg + * makefiles/RULES/cc-msc.rul 1.18 + Umstellung von -libpath: auf -L und "vor Ort" Anpassung in dieser Datei + +Thu May 21 12:46:53 2009 joerg + * makefiles/RULES/x86-interix-cl.rul 1.5 + * makefiles/RULES/i486-cygwin32_nt-cl.rul 1.8 + OSDEFS += -D_CRT_NONSTDC_NO_DEPRECATE neu + +Thu May 21 12:04:23 2009 joerg + * mkisofs/boot.c 1.22 + * mkisofs/write.c 1.121 + * cdrecord/drv_7501.c 1.26 + & before array beseitigt + +Thu May 21 11:53:41 2009 joerg + * libhfs_iso/low.c 1.8 + * libhfs_iso/volume.c 1.8 + * libhfs_iso/hfs.c 1.13 + & vor Arrays beseitigt + +Mon May 18 22:51:35 2009 joerg + * cdrecord/scsi_mmc.c 1.48 + erstes read_format_capacities() im Silent Modus abschicken und return wenn retval < 0 + +Sun May 17 17:36:54 2009 joerg + * makefiles/RULES/i686-cygwin32_wow64-cl64.rul 1.8 + include $(SRCROOT)/$(RULESDIR)/cc-msc64.rul + +Sun May 17 17:36:19 2009 joerg + * makefiles/RULES/cc-msc64.rul 1.18 + Umstellung auf include $(SRCROOT)/$(RULESDIR)/cc-msc.rul + VC=7_64 + +Sat May 16 17:10:20 2009 joerg + * makefiles/DEFAULTS/vc7_64-cygwin-setup 1.1 + date and time created 09/05/16 17:10:20 by joerg + +Sat May 16 17:10:02 2009 joerg + * makefiles/DEFAULTS/vc7_64-setup 1.1 + date and time created 09/05/16 17:10:02 by joerg + +Sat May 16 17:01:59 2009 joerg + * makefiles/DEFAULTS/vc7-setup 1.5 + * makefiles/DEFAULTS/vc7-cygwin-setup 1.5 + * makefiles/DEFAULTS/vc6-setup 1.4 + * makefiles/DEFAULTS/vc6-cygwin-setup 1.4 + Hinweise auf Synchronitaet zwischen vc?-setup und vc?-cygwin-setup + +Thu May 14 20:58:05 2009 joerg + * makefiles/RULES/rules.csw 1.4 + $(EMAIL:%=EMAIL=%) $(HOTLINE:%=HOTLINE=%) neu fuer "opencsw" + +Tue May 12 18:48:24 2009 joerg + * autoconf/configure.in 1.174 + * autoconf/xconfig.h.in 1.162 + getprogname()/setprogname() neu + +Thu May 7 00:37:49 2009 joerg + * libschily/checkerr.c 1.23 + errhidden() liefert nun auch mit E_WARN FALSE + +Tue May 5 23:25:20 2009 joerg + * cdda2wav/byteorder.h 1.8 + #ifndef _BYTEORDER_ -> #if !defined(_BYTEORDER_H) || !defined(MYBYTE_ORDER) wegen BeOS /boot/develop/headers/be/support/ByteOrder.h + +Tue May 5 23:17:53 2009 joerg + * libschily/checkerr.c 1.22 + Copyright -> 2009 + +Tue May 5 23:17:14 2009 joerg + * libschily/checkerr.c 1.21 + * include/schily/checkerr.h 1.10 + E_CHDIR neu + char *fname -> const char *fname + +Tue May 5 23:07:43 2009 joerg + * include/schily/libport.h 1.18 + Schreibfehler EXPORT -> extern + +Tue May 5 23:06:34 2009 joerg + * include/schily/fnmatch.h 8.7 + Schreibfehler HAVE_FNMATCH -> HAVE_FNMATCH_H + +Sun May 3 13:39:23 2009 joerg + * libschily/fexec.c 1.40 + fcntl(... F_SETFD, ...) und fcntl(... F_GETFD, ...) durch fd_setfd()/fd_getfd() ersetzt zur besseren Lesbarkeit + +Sat May 2 14:03:39 2009 joerg + * include/schily/shcall.h 1.2 + sqfun_t neu + +Fri May 1 23:42:03 2009 joerg + * include/schily/Makefile 1.14 + * include/schily/Mrel 1.14 + dlfcn.mk und shcall.mk neu + +Fri May 1 23:38:06 2009 joerg + * include/schily/shcall.h 1.1 + date and time created 09/05/01 23:38:06 by joerg + +Fri May 1 23:32:15 2009 joerg + * include/schily/shcall.mk 1.1 + date and time created 09/05/01 23:32:15 by joerg + +Fri May 1 16:59:21 2009 joerg + * autoconf/configure.in 1.173 + * autoconf/rules.cnf.in 1.21 + LIB_DL neu + +Fri May 1 16:01:52 2009 joerg + * include/schily/dlfcn.h 1.1 + date and time created 09/05/01 16:01:52 by joerg + +Fri May 1 15:59:17 2009 joerg + * include/schily/dlfcn.mk 1.1 + date and time created 09/05/01 15:59:17 by joerg + +Fri May 1 15:34:20 2009 joerg + * autoconf/configure.in 1.172 + * autoconf/xconfig.h.in 1.161 + dlopen() .... neu + +Wed Apr 22 20:22:20 2009 joerg + * cdda2wav/cdda2wav.c 1.109 + Informationen von cdda2wav -help verbessert + +Tue Apr 21 23:06:50 2009 joerg + * autoconf/acgeneral.m4 1.9 + * autoconf/configure.in 1.171 + * autoconf/xconfig.h.in 1.160 + AC_RCHECK_FUNCS() neu fuer fexecve und aehnliches + +Tue Apr 21 23:00:01 2009 joerg + * include/schily/schily.h 1.79 + HAVE_FEXECVE -> HAVE_RAW_FEXECVE und aehnlich + +Sun Apr 19 14:46:04 2009 joerg + * autoconf/config.sub 1.8 + * autoconf/config.guess 1.13 + * autoconf/autoconf 1.8 + * autoconf/acspecific.m4 1.9 + * autoconf/acgeneral.m4 1.8 + * libsiconv/sic_nls.c 1.10 + * libedc/edc_ecc_dec.c 1.10 + * cdda2wav/semshm.c 1.26 + * cdda2wav/resample.c 1.29 + * cdrecord/fifo.c 1.56 + * mkisofs/joliet.c 1.59 + * libschily/findinpath.c 1.4 + * libschily/comerr.c 1.34 + * libscg/scsihack.c 1.53 + * libscg/scsi-openserver.c 1.34 + * libscg/scsi-bsd.c 1.47 + * libscg/scsi-beos.c 1.28 + * cdda2wav/interface.h 1.23 + Copyright -> 2009 + +Sun Apr 19 14:22:05 2009 joerg + * cdda2wav/lconfig.h.in 1.8 + * cdda2wav/config.h 1.14 + * cdda2wav/byteorder.h 1.7 + Copyright J. Schilling neu + +Sun Apr 19 14:17:30 2009 joerg + * cdrecord/version.h 1.34 + Version -> 2.01.01a59 + +Fri Apr 17 19:28:08 2009 joerg + * libsiconv/sic_nls.c 1.9 + dup_iconv_sic() Initialisiert nun korrekt die neue Struktur statt der alten + +Thu Apr 16 19:12:15 2009 joerg + * cdda2wav/cdda2wav.c 1.108 + Peter Widow & Thomas Niederreiter haben keinen Code in cdda2wav, daher beseitigt + +Wed Apr 15 23:11:55 2009 joerg + * cdda2wav/cdda2wav.c 1.107 + RSA Copyright beseitigt, wir nutzen die OpenBSD Version von MD5 + +Wed Apr 15 02:55:52 2009 joerg + * libmdigest/sha2.c 1.1 + date and time created 09/04/15 02:55:52 by joerg + +Wed Apr 15 00:00:39 2009 joerg + * pkgdefs/CSW/CSWschilyutils/prototype 1.3 + pfbsh pfsh bosh jsh Links neu + +Tue Apr 14 23:58:13 2009 joerg + * pkgdefs/CSW/CSWschilybase/prototype_com 1.4 + include/scg/* neu + +Tue Apr 14 23:38:12 2009 joerg + * pkgdefs/CSW/CSWschilybase/prototype_com 1.3 + libcdrdeflt.a libscgcmd.a hostname.h stdio.h sysexits.h wctype.h neu + +Mon Apr 13 22:37:38 2009 joerg + * mkisofs/joliet.c 1.58 + Neuer Test HAVE_ICONV_CONST + +Mon Apr 13 22:10:53 2009 joerg + * autoconf/configure.in 1.170 + * autoconf/aclocal.m4 1.74 + * autoconf/xconfig.h.in 1.159 + AC_ICONV_CONST / HAVE_ICONV_CONST fuer iconv(iconv_t, const char **, neu + +Mon Apr 13 13:36:18 2009 joerg + * mkisofs/mkisofs.c 1.244 + Schreibfehler (fehlendes " bei charset = "cp437") + +Sun Apr 12 21:41:21 2009 joerg + * include/schily/wctype.h 1.2 + wctype.h nur includieren wenn USE_WCHAR definiert ist + +Sun Apr 12 20:45:12 2009 joerg + * include/schily/Makefile 1.13 + * include/schily/Mrel 1.13 + wctype.mk neu + +Sun Apr 12 20:14:05 2009 joerg + * include/schily/wctype.h 1.1 + date and time created 09/04/12 20:14:05 by joerg + +Sun Apr 12 20:06:05 2009 joerg + * include/schily/wchar.h 1.6 + ctype.h beseitigt und nach wctype.h bewegt + Sonstige Includes immer durchfuehren und am Anfang + +Sun Apr 12 15:11:05 2009 joerg + * include/schily/wctype.mk 1.1 + date and time created 09/04/12 15:11:05 by joerg + +Sat Apr 11 22:21:58 2009 joerg + * cdrecord/drv_dvdplus.c 1.55 + Pys size nehmen bei 'HL-DT-ST' 'DVD-RAM GH22NP20' '1.02' wenn dsp->ds_maxblocks == 0 + +Sat Apr 11 17:56:42 2009 joerg + * cdrecord/README.compile 1.18 + INS_BASE= besser beschrieben, DESTDIR= neu beschrieben + +Sat Apr 11 16:08:11 2009 joerg + * makefiles/RULES/os-cygwin32_wow64.id 1.6 + * makefiles/RULES/os-cygwin_nt-5.2-wow64.id 1.5 + nt -> wow64 + +Sat Apr 11 15:57:39 2009 joerg + * makefiles/RULES/os-cygwin32_wow64.def 1.3 + CYGWIN32_NT -> CYGWIN32_WOW64 + +Sat Apr 11 00:47:52 2009 joerg + * scgcheck/scgcheck.1 1.13 + * cdrecord/readcd.1 1.32 + * cdrecord/cdrecord.1 1.124 + diverse - -> \- + +Sat Apr 11 00:00:00 2009 joerg + * cdda2wav/cdda2wav.1 1.32 + \& vor . am Anfang der Zeile + +Fri Apr 10 23:16:10 2009 joerg + * cdda2wav/Changelog 1.2 + * cdda2wav/cdda2wav.c 1.106 + * cdda2wav/README 1.2 + * cdda2wav/resample.c 1.28 + * cdda2wav/FAQ 1.2 + * cdda2wav/cdda2wav.1 1.31 + * libscg/scsi-openserver.c 1.33 + seperate -> separate + +Fri Apr 10 23:06:18 2009 joerg + * libedc/edc_ecc_dec.c 1.9 + st 0+0io 0pf+0w + +Fri Apr 10 22:48:43 2009 joerg + * cdrecord/LIMITATIONS 1.3 + compatibilty -> compatibility + +Fri Apr 10 20:48:25 2009 joerg + * libschily/movebytes.c 1.17 + * cdrecord/drv_philips.c 1.79 + * cdda2wav/toc.c 1.81 + adress -> address + +Fri Apr 10 20:24:34 2009 joerg + * cdrecord/COPYING 1.9 + libvms neu + +Fri Apr 10 17:55:22 2009 joerg + * include/schily/utypes.h 1.27 + Intptr_t und UIntptr_t geht nun auch auf WIN64, denn dort ist sizeof (char *) == sizeof (long long) + +Fri Apr 10 15:55:20 2009 joerg + * include/schily/mconfig.h 1.64 + HAVE_LONG_LONG neu als Alternative zu HAVE___INT64 statt des Oberbegriffes HAVE_LONGLONG + +Fri Apr 10 15:44:13 2009 joerg + * cdrecord/COPYING 1.8 + David Huang's btcflash.c (public domain) erwähnen + +Wed Apr 8 20:23:58 2009 joerg + * include/schily/stdio.h 1.2 + #define fseek fseeko #define ftell ftello für besseren Largefile Support + +Wed Apr 8 20:17:49 2009 joerg + * btcflash/skel.c 1.19 + * btcflash/btcflash.c 1.15 + * scgskeleton/skel.c 1.16 + * scgskeleton/doit.c 1.27 + stdio.h -> schily/stdio.h wegen ftello()/fseeko() + +Wed Apr 8 00:01:06 2009 joerg + * makefiles/RULES/os-cygwin_nt-6.0.id 1.5 + * makefiles/RULES/os-cygwin_nt-6.1.id 1.5 + Neu fuer Win Vista & Win 7 + +Tue Apr 7 23:59:13 2009 joerg + * mkisofs/mkisofs.c 1.243 + Bessere Fehlermeldungen fuer iconv Probleme + +Tue Apr 7 23:57:19 2009 joerg + * mkisofs/mkisofs.h 1.136 + * mkisofs/defaults.h 1.23 + * mkisofs/rock.c 1.59 + Copyright -> 2009 + +Sat Apr 4 22:06:07 2009 joerg + * pkgdefs/CSW/CSWpxupgrade/Makefile 1.2 + * pkgdefs/CSW/CSWsccs/Makefile 1.3 + * pkgdefs/CSW/CSWsmake/Makefile 1.2 + * pkgdefs/CSW/CSWved/Makefile 1.2 + * pkgdefs/CSW/CSWstar/Makefile 1.2 + * pkgdefs/CSW/CSWcdrtools/Makefile 1.2 + VERSION direkt aus xxx -version extrahieren + +Fri Mar 27 00:00:13 2009 joerg + * cdrecord/cdtext.c 1.14 + Tests fuer textfile mit Leange 0 neu um eine Endlosschleife beim Schreiben des TOC zu vermeiden + +Tue Mar 24 22:10:14 2009 joerg + * cdrecord/cdrecord.c 1.380 + Kommentar fuer diverse Debug/Verbose Variablen erklaeren nun die dazugehoerigen Optionen + +Sun Mar 22 22:46:07 2009 joerg + * cdrecord/cdrecord.c 1.379 + checkdsize() gibt nun bei CD Ueberlauf statt "disk" "CD"aus + checkdsize() erlaubt nun -ignsize/-force bei dsp->ds_maxblocks == 0 + +Sun Mar 22 21:36:14 2009 joerg + * makefiles/DEFAULTS/Defaults.linux 1.6 + * makefiles/DEFAULTS_ENG/Defaults.linux 1.6 + OSDEFS += -D_GNU_SOURCE neu + +Thu Mar 19 00:42:27 2009 joerg + * cdda2wav/cdda2wav.c 1.105 + * cdda2wav/cdda2wav.1 1.30 + -output-endianess kann jetzt auch "machine" bzw. "host" fuer native Host Byteorder als raw Output + +Thu Mar 19 00:38:15 2009 joerg + * cdda2wav/byteorder.h 1.6 + #include neu + +Mon Mar 9 11:23:06 2009 joerg + * cdrecord/version.h 1.33 + Version -> 2.01.01a58 + +Thu Feb 26 22:36:28 2009 joerg + * cdda2wav/lconfig.h.in 1.7 + * cdda2wav/configure.in 1.10 + os2.h os2me.h strtoul() -> globale autoconfiguration + +Thu Feb 26 22:32:57 2009 joerg + * autoconf/xconfig.h.in 1.158 + * autoconf/configure.in 1.169 + AC_CHECK_HEADERS(os2me.h) neu + +Thu Feb 26 22:30:15 2009 joerg + * autoconf/xconfig.h.in 1.157 + * autoconf/configure.in 1.168 + AC_CHECK_HEADERS(os2.h) neu + +Tue Feb 24 22:22:41 2009 joerg + * cdda2wav/MKLINKS 1.4 + Symlink ../cdrecord/misc.c wird nicht mehr benoetigt + +Tue Feb 24 22:22:09 2009 joerg + * mkisofs/mkisofs.8 1.128 + Bessere Beschreibung fuer -abstract -biblio -copyright + +Sun Feb 22 13:27:51 2009 joerg + * mkisofs/rock.c 1.58 + Ein Symlinkziel das auf ein oder mehreren '/' endet wird nun korrekt behandelt + +Fri Feb 20 21:34:44 2009 joerg + * mkisofs/diag/isoinfo.c 1.70 + Korrekte Behandlung von SL_ROOT Eintraegen + Mehrfache "/" im Namen nicht mehr entfernen + +Fri Feb 20 21:32:11 2009 joerg + * mkisofs/rock.c 1.57 + /etc////passwd hat nun nicht mehr 3 SL_ROOT Eintraege sondern 3 leere Pfadkomponenten + +Tue Feb 17 22:58:13 2009 joerg + * include/schily/maxpath.h 1.11 + * include/schily/dirent.h 1.27 + DIRSIZ(dp) nicht verwenden + NAME_MAX aus limits.h neu fuer max. namelength + +Tue Feb 17 22:39:57 2009 joerg + * cdrecord/cdrecord.c 1.378 + Bessere Warnungen wenn "CDR_FORCERAWSPEED=" oder "CDR_FORCESPEED=" gesetzt sind + +Tue Feb 17 00:53:30 2009 joerg + * include/schily/maxpath.h 1.10 + * autoconf/xconfig.h.in 1.156 + Copyright -> 2009 + +Tue Feb 17 00:47:15 2009 joerg + * mkisofs/defaults.h 1.22 + ATARI-MiNT Syllable AMIGA neu + +Tue Feb 17 00:36:08 2009 joerg + * cdda2wav/cdda2wav.c 1.104 + write_md5_info() nicht aufrufen wenn -no-infofile angegeben wurde + +Fri Feb 13 22:50:26 2009 joerg + * include/schily/maxpath.h 1.9 + Definitionen fuer NAME_MAX und MAXNAMLEN neu fuer bessere Portabilitaet von z.B. sh + +Fri Feb 13 22:48:03 2009 joerg + * autoconf/configure.in 1.167 + * autoconf/xconfig.h.in 1.155 + Test fuer sigaltstack() neu (fuer Bourne Shell) + +Fri Feb 13 22:04:02 2009 joerg + * mkisofs/diag/isoinfo.8 1.9 + -debug dokumentiert + +Tue Feb 10 22:48:53 2009 joerg + * libschily/fexec.c 1.39 + kleinere GCC Warnungen beseitigt + +Tue Feb 10 22:48:24 2009 joerg + * libschily/format.c 1.47 + Cut/Paste Schreibfehler beseitigt: SIZEOF_SIZE_T -> SIZEOF_PTRDIFF_T + +Tue Feb 10 22:46:15 2009 joerg + * makefiles/RULES/MKLINKS 1.76 + sh3-linux, sh4-linux, sh4a-linux neu + +Tue Feb 10 22:17:14 2009 joerg + * autoconf/aclocal.m4 1.73 + * autoconf/configure.in 1.166 + * autoconf/acspecific.m4 1.8 + * autoconf/acgeneral.m4 1.7 + AC_CHECK_TYPE nimmt nun statt STDC_HEADERS #if HAVE_STDDEF_H || STDC_HEADERS + +Sun Feb 8 00:15:42 2009 joerg + * libschily/fexec.c 1.38 + av[0] bei BeOS wieder reparieren + +Sun Feb 8 00:05:27 2009 joerg + * libschily/fexec.c 1.37 + enofile(t) vom bsh uebernommen + +Sat Feb 7 22:34:05 2009 joerg + * cdrecord/fifo.c 1.55 + Haiku Kommentar + +Sat Feb 7 22:33:08 2009 joerg + * cdda2wav/semshm.c 1.25 + * cdda2wav/config.h 1.13 + * cdda2wav/cdda2wav.c 1.103 + Neuer autocof Test fuer HAVE_BEOS_AREAS damit es auch mit Haiku funktioniert + +Sat Feb 7 19:42:17 2009 joerg + * libschily/findinpath.c 1.3 + enofile() Makro fuer fexec prueft nun auch auf EISDIR + +Sat Feb 7 13:55:21 2009 joerg + * libscg/scsi-beos.c 1.27 + UMstallung auf #include fuer Haiku + +Fri Feb 6 00:29:16 2009 joerg + * mkisofs/defaults.h 1.21 + #define SYSTEM_ID_DEFAULT "Haiku" neu + +Thu Feb 5 23:56:22 2009 joerg + * libschily/comerr.c 1.33 + #ifdef __BEOS__ -> #if defined(__BEOS__) || defined(__HAIKU__) + +Thu Feb 5 22:34:54 2009 joerg + * libscg/scsi-beos.c 1.26 + Haiku hat keine "lun" bei ATAPI + +Thu Feb 5 19:47:26 2009 joerg + * cdrecord/cdrecord.c 1.377 + Schreibfehler Asuming -> Assuming + +Thu Feb 5 01:28:08 2009 joerg + * autoconf/xconfig.h.in 1.154 + * autoconf/configure.in 1.165 + HAVE_SYS_ACCT_H neu + +Thu Feb 5 00:34:22 2009 joerg + * makefiles/RULES/bepc-haiku-gcc.rul 1.3 + * makefiles/RULES/bepc-haiku-cc.rul 1.3 + LIB_SOCKET= -lnetwork + +Wed Feb 4 23:27:13 2009 joerg + * autoconf/config.guess 1.12 + * autoconf/config.sub 1.7 + Haiku Support neu + +Wed Feb 4 23:13:43 2009 joerg + * makefiles/RULES/MKLINKS 1.75 + bemac-haiku-*cc.rul neu + +Wed Feb 4 22:37:28 2009 joerg + * makefiles/RULES/bepc-haiku-gcc.rul 1.2 + * makefiles/RULES/bepc-haiku-cc.rul 1.2 + -lsocket -lbind wird nicht mehr benoetigt + +Wed Feb 4 22:15:53 2009 joerg + * autoconf/xconfig.h.in 1.153 + * autoconf/configure.in 1.164 + HAVE_SYSEXITS_H neu + +Wed Feb 4 22:06:58 2009 joerg + * include/schily/Mrel 1.12 + * include/schily/Makefile 1.12 + sysexits.h neu + +Wed Feb 4 22:05:38 2009 joerg + * include/schily/sysexits.mk 1.1 + date and time created 09/02/04 22:05:38 by joerg + +Wed Feb 4 22:04:10 2009 joerg + * include/schily/sysexits.h 1.4 + EX_NOTFOUND neu + +Wed Feb 4 22:02:46 2009 joerg + * include/schily/sysexits.h 1.3 + Umbau auf #include und #ifdef HAVE_SYSEXITS_H + +Wed Feb 4 21:49:36 2009 joerg + * include/schily/sysexits.h 1.2 + Umbau auf BSD-2 Lizens vom. 22.Juli 1999 William Hoskins Director, Office of Technology Licensing University of California, Berkeley + Siehe: ftp://ftp.cs.berkeley.edu/pub/4bsd/README.Impt.License.Change + +Wed Feb 4 21:48:33 2009 joerg + * include/schily/sysexits.h 1.1 + date and time created 09/02/04 21:48:33 by joerg + +Wed Feb 4 00:42:38 2009 joerg + * libscg/scsihack.c 1.52 + * libscg/scsi-beos.c 1.25 + Haiku Support neu + +Wed Feb 4 00:31:38 2009 joerg + * makefiles/DEFAULTS_ENG/Defaults.haiku 1.1 + date and time created 09/02/04 00:31:38 by joerg + +Wed Feb 4 00:31:00 2009 joerg + * makefiles/DEFAULTS/Defaults.haiku 1.1 + date and time created 09/02/04 00:31:00 by joerg + +Tue Feb 3 23:09:12 2009 joerg + * makefiles/RULES/bepc-haiku-cc.rul 1.1 + * makefiles/RULES/bepc-haiku-gcc.rul 1.1 + date and time created 09/02/03 23:09:12 by joerg + +Tue Feb 3 23:04:44 2009 joerg + * makefiles/RULES/os-haiku.id 1.1 + * makefiles/RULES/os-haiku.def 1.1 + date and time created 09/02/03 23:04:44 by joerg + +Tue Feb 3 22:14:34 2009 joerg + * cdrecord/readcd.1 1.31 + -w Option besser beschrieben + +Mon Feb 2 22:17:27 2009 joerg + * autoconf/autoconf 1.7 + Auch "m4" nach gm4 testen + +Mon Feb 2 00:02:53 2009 joerg + * makefiles/RULES/i586-syllable-cc.rul 1.3 + * makefiles/RULES/i586-syllable-gcc.rul 1.3 + Kommandos sind doch in /bin + +Sun Feb 1 15:56:37 2009 joerg + * makefiles/RULES/i586-syllable-gcc.rul 1.2 + * makefiles/RULES/i586-syllable-cc.rul 1.2 + /usr/indexes/bin fuer alle Kommandos + +Sun Feb 1 15:30:18 2009 joerg + * libscg/scsi-syllable.c 1.1 + date and time created 09/02/01 15:30:18 by joerg + +Sun Feb 1 14:39:51 2009 joerg + * libscg/scsihack.c 1.51 + scsi-syllable.c neu + +Sun Feb 1 13:04:50 2009 joerg + * makefiles/RULES/i586-syllable-cc.rul 1.1 + * makefiles/RULES/i586-syllable-gcc.rul 1.1 + date and time created 09/02/01 13:04:50 by joerg + +Sun Feb 1 12:56:59 2009 joerg + * makefiles/RULES/os-syllable.id 1.1 + * makefiles/RULES/os-syllable.def 1.1 + date and time created 09/02/01 12:56:59 by joerg + +Sun Feb 1 12:51:06 2009 joerg + * makefiles/DEFAULTS/Defaults.syllable 1.1 + date and time created 09/02/01 12:51:06 by joerg + +Sun Feb 1 12:50:58 2009 joerg + * makefiles/DEFAULTS_ENG/Defaults.syllable 1.1 + date and time created 09/02/01 12:50:58 by joerg + +Fri Jan 30 00:50:34 2009 joerg + * libedc/edc_ecc_dec.c 1.8 + MAXLOOPS kann nun von aussen ueberschrieben werden + +Fri Jan 30 00:49:40 2009 joerg + * cdrecord/version.h 1.32 + Version -> 2.01.01a57 + +Thu Jan 29 23:13:22 2009 joerg + * cdrecord/README.cdplus 1.2 + Hinweis auf Probleme mit -dao und 2. -multi session + +Thu Jan 29 23:03:45 2009 joerg + * cdda2wav/cdda2wav.c 1.102 + Fehlerhafte Adressrechnung auf he_fill_buffer mit separater char * Variable korrigiert + +Thu Jan 29 23:02:09 2009 joerg + * cdrecord/Makefile.dfl 1.3 + INSFLAGS= -noclobber neu + +Thu Jan 29 21:31:35 2009 joerg + * makefiles/RULES/rules.ins 1.20 + $(INSFLAGS) neu fuer install-sh -noclobber + +Thu Jan 29 21:31:01 2009 joerg + * conf/install-sh 1.11 + -noclobber neu + +Thu Jan 29 21:17:25 2009 joerg + * conf/install-sh 1.10 + -help neu + +Tue Jan 27 22:07:25 2009 joerg + * libscg/scsi-atari.c 1.2 + Helptext ueberarbeitet + +Mon Jan 26 21:36:53 2009 joerg + * libscg/scsihack.c 1.50 + scsi-atari.c neu + +Mon Jan 26 21:36:17 2009 joerg + * libscg/scsi-atari.c 1.1 + date and time created 09/01/26 21:36:17 by joerg + +Sat Jan 24 22:09:08 2009 joerg + * cdda2wav/toc.c 1.80 + * cdda2wav/scsi_cmds.c 1.43 + CD-Text wird nun nicht mehr in den TOC Buffer sondern in den SCSI Buffer gelesen damit genug Platz ist + Korrekte Berechtnung der CD-Text Datenlaenge + +Sat Jan 24 19:17:28 2009 joerg + * cdda2wav/interface.h 1.22 + * cdda2wav/interface.c 1.65 + bufTOCsize neu als Groesse fuer bufferTOC + +Sat Jan 24 19:12:16 2009 joerg + * cdda2wav/cdda2wav.c 1.101 + Neuer Kommentar mit Warnung fuer die CD-Text Daten + +Sat Jan 24 19:11:33 2009 joerg + * cdda2wav/global.h 1.24 + buf fuer SCSI buffer neu + +Sat Jan 24 12:16:48 2009 joerg + * cdda2wav/cdda2wav.c 1.100 + Coredump beim ^C während des scg_open() verhindern + +Fri Jan 23 00:58:14 2009 joerg + * cdda2wav/scsi_cmds.h 1.17 + * cdda2wav/scsi_cmds.c 1.42 + * cdda2wav/interface.c 1.64 + Unbenutztes unsigned char *cmd beseitigt (war aus der pre-scg Zeit) + +Wed Jan 21 23:21:48 2009 joerg + * cdrecord/version.h 1.31 + Version -> 2.01.01a56 + +Wed Jan 21 00:33:45 2009 joerg + * cdrecord/cdrecord.c 1.376 + Next Writable Address nur holen wenn F_MULTI & DSF_DVD, weil sonst cdrecord -sao -multi nicht mehr geht (LW mag bei SAO das SCSI Kommando nicht) + +Wed Jan 21 00:29:26 2009 joerg + * libscg/scsi-bsd.c 1.46 + ccb_flags -> flags wegen globaler Variable "ccb_flags" auf FreeBSD + seterrno(0) vor den Oeffnen des SCSI Subsystems + +Tue Jan 20 23:53:59 2009 joerg + * cdda2wav/cdda2wav.1 1.29 + * cdda2wav/cdda2wav.c 1.99 + -v list kann nun auch ! und not wie star + +Tue Jan 20 20:41:54 2009 joerg + * cdrecord/readcd.c 1.101 + file_raise(f, FALSE); auf das Ausgangsfile + Bei Schreibfehlern im Ausgangsfile wird edifiniert ein exitcode != 0 erzeugt + +Mon Jan 19 22:38:14 2009 joerg + * mkisofs/multi.c 1.91 + Copyright -> 2009 + +Mon Jan 19 22:37:14 2009 joerg + * mkisofs/inode.c 1.11 + "Implementation botch..." Ausgabe nun mit dezimaler inode Nummer + +Mon Jan 19 22:36:40 2009 joerg + * mkisofs/multi.c 1.90 + Terminate SUSP "ST" wird nun ueberall honoriert + +Sun Jan 18 22:13:30 2009 joerg + * cdda2wav/scsi_cmds.c 1.41 + Umstellung auf read full toc mmc mit zuerst 4 Bytes und dann der richtigen Laenge weil 'HP ' 'CD-Writer+ 9600 ' '1.0a' mit der grossen Laenge nicht klarkommt + +Sat Jan 17 15:35:36 2009 joerg + * mkisofs/mkisofs.c 1.242 + %.*s mit p - fmt (ptrdiff_t) casten auf int + strlen Resultat fuer %d -> (Llong) strlen + %lld + +Sat Jan 17 15:30:45 2009 joerg + * mkisofs/diag/isoinfo.c 1.69 + * mkisofs/diag/isodump.c 1.40 + * mkisofs/diag/isovfy.c 1.39 + Support fuer "ST" (Terminate SUSP) neu + Flag Vergleich nur noch durchfuehren, wenn eine RR Signatur gefunden wurde + +Sat Jan 17 13:50:13 2009 joerg + * cdda2wav/cdda2wav.c 1.98 + Unnoetige Variable retval2 beseitigt + +Sat Jan 17 13:48:07 2009 joerg + * cdda2wav/scsi_cmds.c 1.40 + struct tocdesc ist nun eine flache Struktur wegen struct tail padding auf MC-680x0 Kompilern + +Sat Jan 17 12:47:05 2009 joerg + * cdda2wav/global.h 1.23 + * cdda2wav/cdda2wav.c 1.97 + * cdda2wav/cdda2wav.1 1.28 + * cdda2wav/interface.c 1.63 + Neue Optionen -debug -debug-scsi -kdebug -kdebug-scsi -kd + +Wed Jan 14 19:59:26 2009 joerg + * cdrecord/drv_dvdplus.c 1.54 + 'TSSTcorp' 'CDDVDW SE-S224Q ' 'TS01' liefert bei unformatierter DVD+RW fuer dip->disk_type nicht SES_UNDEF + +Wed Jan 14 19:45:50 2009 joerg + * cdrecord/scsi_mmc.c 1.47 + * cdrecord/cdrecord.h 1.198 + get_ses_type() neu + +Wed Jan 14 19:44:37 2009 joerg + * mkisofs/apple.c 1.36 + off_t Parameter fuer %llu auf Llong casten + +Wed Jan 14 19:44:03 2009 joerg + * scgcheck/scgcheck.c 1.17 + * include/schily/types.h 1.4 + Copyright -> 2009 + +Wed Jan 14 19:38:54 2009 joerg + * scgcheck/Makefile 1.12 + * scgskeleton/Makefile 1.13 + * cdda2wav/Makefile 1.23 + * cdrecord/readcd.mk 1.17 + * btcflash/Makefile 1.10 + Weitere Abhaengigkeit fuer MKLINKS weil gmake Abhaengigkeiten in falscher Reihenfolge auswertet + +Tue Jan 13 20:13:12 2009 joerg + * include/schily/schily.h 1.78 + * include/schily/wchar.h 1.5 + * include/schily/find.h 1.20 + * include/schily/walk.h 1.25 + * include/schily/dirent.h 1.26 + #include -> #include + Copyright -> 2009 + +Tue Jan 13 20:11:48 2009 joerg + * cdrecord/cdrecord.c 1.375 + * libschily/spawn.c 1.23 + * libschily/format.c 1.46 + * libschily/fexec.c 1.36 + * libscg/scsiopen.c 1.100 + * libscg/scsi-remote.c 1.28 + Copyright -> 2009 + +Mon Jan 12 23:19:15 2009 joerg + * cdrecord/cdrecord.c 1.374 + Diverse Schreibfehler: Fehlendes \n oder . am Ende von Fehlermeldungen + +Sun Jan 11 00:47:42 2009 joerg + * libschily/format.c 1.45 + %z und %t neu + +Sun Jan 11 00:30:26 2009 joerg + * include/schily/types.h 1.3 + #include fuer ptrdiff_t, wchar_t, size_t neu + +Sun Jan 11 00:18:09 2009 joerg + * autoconf/xconfig.h.in 1.152 + * autoconf/configure.in 1.163 + SIZEOF_SIZE_T SIZEOF_SSIZE_T SIZEOF_PTRDIFF_T neu + +Sun Jan 11 00:17:26 2009 joerg + * autoconf/acgeneral.m4 1.6 + AC_CHECK_SIZEOF includiert nun auch stddef.h und sys/types.h + +Sat Jan 10 20:15:46 2009 joerg + * mkisofs/apple.c 1.35 + Unbenutzte Variable size in get_xhfs_info() beseitigt + +Sat Jan 10 19:41:59 2009 joerg + * cdrecord/drv_mmc.c 1.193 + getmode[]/setmode[] -> pgetmode[]/psetmode[] wegen getmode()/setmode() unter Mas OS X + +Sat Jan 10 19:26:56 2009 joerg + * mkisofs/diag/isovfy.c 1.38 + * mkisofs/diag/isodump.c 1.39 + * mkisofs/diag/dump.c 1.35 + * mkisofs/diag/isoinfo.c 1.68 + * mkisofs/diag/isodebug.c 1.24 + Copyright -> 2008 + +Sat Jan 10 19:25:44 2009 joerg + * mkisofs/diag/isodebug.c 1.23 + * mkisofs/diag/dump.c 1.34 + * mkisofs/diag/isodump.c 1.38 + * mkisofs/diag/isovfy.c 1.37 + * mkisofs/diag/isoinfo.c 1.67 + * scgcheck/scgcheck.c 1.16 + * libscg/scsi-remote.c 1.27 + * libscg/scsiopen.c 1.99 + devname[] -> sdevname[] wegen devname() unter Mas OS X + +Wed Jan 7 19:20:15 2009 joerg + * makefiles/RULES/cc-hp64.rul 1.7 + * makefiles/RULES/cc-hp.rul 1.7 + Neue Tests AC_HP_CC_ANSI_OPT AC_HP_CC_OPT_OPT AC_HP_CC_GPROF_OPT + +Wed Jan 7 19:13:44 2009 joerg + * mkisofs/mkisofs.8 1.127 + Schreibfehler if the CD -> of the CD + +Wed Jan 7 19:11:40 2009 joerg + * autoconf/configure.in 1.162 + * autoconf/aclocal.m4 1.72 + * autoconf/rules.cnf.in 1.20 + AC_SUN_CC64_OPT Test hat auf HP-UX ein a.out File hinterlassen, darum nun cc Aufruf mit -c + Neue Tests AC_HP_CC_ANSI_OPT AC_HP_CC_OPT_OPT AC_HP_CC_GPROF_OPT + Die mlock() und mlockall() Tests haben unter HP-UX core Files erzeugt, nun wird das geloescht. + +Tue Jan 6 23:07:12 2009 joerg + * autoconf/configure.in 1.161 + * autoconf/rules.cnf.in 1.19 + * makefiles/RULES/cc-sunpro64.rul 1.11 + * autoconf/aclocal.m4 1.71 + CC64_OPT -> SUN_CC64_OPT + +Tue Jan 6 21:18:32 2009 joerg + * libschily/getav0.c 1.22 + if (fp->fr_savpc == NULL) -> if (fp->fr_savpc == 0) wegen unsinniger NULL Konstante unter Linux + +Tue Jan 6 21:11:36 2009 joerg + * include/schily/unistd.h 1.20 + extern char **environ; bei #ifndef HAVE_ENVIRON_DEF neu + +Tue Jan 6 21:10:53 2009 joerg + * include/schily/stkframe.h 1.12 + fr_savpc ist nun Intptr_t wegen 64 Bit Support + +Tue Jan 6 18:26:22 2009 joerg + * autoconf/xconfig.h.in 1.151 + * autoconf/configure.in 1.160 + * autoconf/aclocal.m4 1.70 + Test auf environ in unistd.h neu + +Mon Jan 5 20:21:57 2009 joerg + * include/schily/schily.h 1.77 + #iclude wenn RENAME_GETLINE + +Mon Jan 5 20:19:05 2009 joerg + * include/schily/Mrel 1.11 + * include/schily/Makefile 1.11 + stdio.mk neu + +Mon Jan 5 20:18:33 2009 joerg + * include/schily/stdio.mk 1.1 + * include/schily/stdio.h 1.1 + date and time created 09/01/05 20:18:33 by joerg + +Mon Jan 5 01:08:58 2009 joerg + * libschily/spawn.c 1.22 + * libschily/fexec.c 1.35 + Fehlerhafte "ac" Berechnung korrigiert + +Sun Jan 4 20:45:51 2009 joerg + * cdrecord/drv_sony.c 1.84 + * cdrecord/drv_dvdplus.c 1.53 + * cdda2wav/sndconfig.c 1.30 + * cdda2wav/cdda2wav.c 1.96 + Copyright -> 2009 + +Sun Jan 4 20:30:28 2009 joerg + * cdrecord/drv_sony.c 1.83 + flush_sony() und set_wr_parameter_sony() auskommentiert solange es nicht benutzt wird + +Sun Jan 4 20:26:49 2009 joerg + * cdrecord/drv_dvdplus.c 1.52 + dummy_plextor() auskommentiert bis es benutzt wird + +Sun Jan 4 17:38:38 2009 joerg + * cdda2wav/cdda2wav.c 1.95 + RestrictPlaybackRate() wird nur benoetigt mit ECHO_TO_SOUNDCARD + +Sun Jan 4 13:12:11 2009 joerg + * libedc/edc_ecc_dec.c 1.7 + correct_PSUB() und correct_QSUB() auskommentiert bis es benoetigt wird + +Sun Jan 4 12:59:42 2009 joerg + * libedc/edc_ecc.c 1.27 + do_decode_L1(), do_decode_L2(), decode_L1_P(), decode_L1_Q() auskommentiert solange Implementierung nicht fertig + +Sun Jan 4 12:44:14 2009 joerg + * cdda2wav/sndconfig.c 1.29 + #ifdefs in open_snd_device() korrigiert wegen GCC warning: unused variable `fl' auf HP-UX + +Tue Dec 30 14:29:50 2008 joerg + * cdrecord/cdrecord.dfl 1.7 + Verbesserter Kommentar + +Tue Dec 30 14:06:53 2008 joerg + * cdrecord/version.h 1.30 + Version -> 2.01.01a55 + +Mon Dec 29 14:12:39 2008 joerg + * cdrecord/scsi_scan.c 1.32 + select_unit() erstmal auskommentiert + +Mon Dec 29 14:07:38 2008 joerg + * cdda2wav/toc.c 1.79 + have_hiddenAudioTrack wird noch nicht benoetigt + +Mon Dec 29 14:03:22 2008 joerg + * cdda2wav/parse.c 1.5 + Zur Zeit unbenutzte Funktionen auskommentiert + +Mon Dec 29 13:56:55 2008 joerg + * cdrecord/cdtext.c 1.13 + six2eight() mit #ifdef __needed__ auskommentiert + +Mon Dec 29 13:54:36 2008 joerg + * cdrecord/subchan.c 1.24 + DO_SUBINTERLEAVE neu + +Mon Dec 29 13:50:03 2008 joerg + * cdrecord/cue.c 1.36 + #ifdef __needed__ fuer unbenoetigte Funktionen + +Sat Dec 27 20:21:15 2008 joerg + * makefiles/RULES/rules.csw 1.3 + * makefiles/RULES/power-macintosh-darwin-cc.rul 1.14 + * makefiles/RULES/power-macintosh-darwin-gcc.rul 1.14 + * makefiles/RULES/rules.tpk 1.7 + * makefiles/RULES/rules.drv 1.8 + * makefiles/RULES/rules.pkg 1.5 + * makefiles/RULES/rules.ins 1.19 + $(INS_BASE) -> $(INSBASE) + +Sat Dec 27 20:19:44 2008 joerg + * makefiles/RULES/rules1.top 1.42 + INSBASE= $(INS_BASE:%/=%) neu + +Sat Dec 27 20:15:44 2008 joerg + * rscsi/Makefile.dfl 1.2 + * cdrecord/Makefile.dfl 1.2 + INSBASE= $(INS_RBASE:%/=%) neu + +Fri Dec 26 22:46:29 2008 joerg + * makefiles/DEFAULTS_ENG/Defaults.mingw32_nt 1.4 + * makefiles/DEFAULTS_ENG/Defaults.qnx 1.4 + * makefiles/DEFAULTS_ENG/Defaults.openbsd 1.4 + * makefiles/DEFAULTS_ENG/Defaults.osf1 1.4 + * makefiles/DEFAULTS_ENG/Defaults.mac-os10 1.3 + * makefiles/DEFAULTS_ENG/Defaults.nextstep 1.4 + * makefiles/DEFAULTS_ENG/Defaults.netbsd 1.4 + * makefiles/DEFAULTS_ENG/Defaults.rhapsody 1.3 + * makefiles/DEFAULTS_ENG/Defaults.ms-dos 1.4 + * makefiles/DEFAULTS_ENG/Defaults.sunos4 1.4 + * makefiles/DEFAULTS_ENG/Defaults.linux 1.5 + * makefiles/DEFAULTS_ENG/Defaults.irix 1.4 + * makefiles/DEFAULTS_ENG/Defaults.sunos5 1.4 + * makefiles/DEFAULTS_ENG/Defaults.newsos6 1.4 + * makefiles/DEFAULTS_ENG/Defaults.unixware 1.3 + * makefiles/DEFAULTS_ENG/Defaults.hp-ux 1.4 + * makefiles/DEFAULTS_ENG/Defaults.os2 1.4 + * makefiles/DEFAULTS_ENG/Defaults.interix 1.5 + * makefiles/DEFAULTS_ENG/Defaults.openserver 1.3 + * makefiles/DEFAULTS_ENG/Defaults.gnu 1.4 + * makefiles/DEFAULTS_ENG/Defaults.freemint 1.3 + * makefiles/DEFAULTS_ENG/Defaults.darwin 1.3 + * makefiles/DEFAULTS_ENG/Defaults.domainos 1.4 + * makefiles/DEFAULTS_ENG/Defaults.amigaos 1.4 + * makefiles/DEFAULTS_ENG/Defaults.bsd-os 1.4 + * makefiles/DEFAULTS_ENG/Defaults.dragonfly 1.5 + * makefiles/DEFAULTS_ENG/Defaults.cygwin32_wow64 1.5 + * makefiles/DEFAULTS_ENG/Defaults.beos 1.4 + * makefiles/DEFAULTS_ENG/Defaults.cygwin32_nt 1.5 + * makefiles/DEFAULTS_ENG/Defaults.bsd-os3 1.4 + * makefiles/DEFAULTS_ENG/Defaults.aix 1.4 + * makefiles/DEFAULTS_ENG/Defaults.freebsd 1.5 + * makefiles/DEFAULTS_ENG/Defaults.dgux3 1.4 + * makefiles/DEFAULTS_ENG/Defaults.dgux4 1.4 + * makefiles/DEFAULTS_ENG/Defaults.dgux 1.4 + * makefiles/DEFAULTS/Defaults.rhapsody 1.3 + * makefiles/DEFAULTS/Defaults.unixware 1.3 + * makefiles/DEFAULTS/Defaults.sunos5 1.4 + * makefiles/DEFAULTS/Defaults.sunos4 1.4 + * makefiles/DEFAULTS/Defaults.qnx 1.4 + * makefiles/DEFAULTS/Defaults.osf1 1.4 + * makefiles/DEFAULTS/Defaults.os2 1.4 + * makefiles/DEFAULTS/Defaults.openserver 1.3 + * makefiles/DEFAULTS/Defaults.openbsd 1.4 + * makefiles/DEFAULTS/Defaults.nextstep 1.4 + * makefiles/DEFAULTS/Defaults.newsos6 1.4 + * makefiles/DEFAULTS/Defaults.dgux3 1.4 + * makefiles/DEFAULTS/Defaults.domainos 1.4 + * makefiles/DEFAULTS/Defaults.dgux4 1.4 + * makefiles/DEFAULTS/Defaults.dragonfly 1.5 + * makefiles/DEFAULTS/Defaults.gnu 1.4 + * makefiles/DEFAULTS/Defaults.beos 1.4 + * makefiles/DEFAULTS/Defaults.interix 1.5 + * makefiles/DEFAULTS/Defaults.ms-dos 1.4 + * makefiles/DEFAULTS/Defaults.irix 1.4 + * makefiles/DEFAULTS/Defaults.cygwin32_wow64 1.5 + * makefiles/DEFAULTS/Defaults.bsd-os 1.4 + * makefiles/DEFAULTS/Defaults.mingw32_nt 1.4 + * makefiles/DEFAULTS/Defaults.mac-os10 1.3 + * makefiles/DEFAULTS/Defaults.dgux 1.4 + * makefiles/DEFAULTS/Defaults.freebsd 1.5 + * makefiles/DEFAULTS/Defaults.cygwin32_nt 1.5 + * makefiles/DEFAULTS/Defaults.netbsd 1.4 + * makefiles/DEFAULTS/Defaults.darwin 1.3 + * makefiles/DEFAULTS/Defaults.amigaos 1.4 + * makefiles/DEFAULTS/Defaults.bsd-os3 1.4 + * makefiles/DEFAULTS/Defaults.aix 1.4 + * makefiles/DEFAULTS/Defaults.linux 1.5 + * makefiles/DEFAULTS/Defaults.freemint 1.3 + * makefiles/DEFAULTS/Defaults.hp-ux 1.4 + INS_RBASE neu + +Fri Dec 26 21:20:33 2008 joerg + * cdda2wav/Makefile 1.22 + * cdrecord/readcd.mk 1.16 + * cdrecord/Makefile 1.49 + install suid root + +Fri Dec 26 21:16:09 2008 joerg + * conf/install-sh 1.9 + -m suid/sticky check nur wenn keine Rootrechte vorhanden sind + +Fri Dec 26 20:58:24 2008 joerg + * makefiles/DEFAULTS_ENG/Defaults.bsd-os3 1.3 + * makefiles/DEFAULTS_ENG/Defaults.openbsd 1.3 + * makefiles/DEFAULTS_ENG/Defaults.gnu 1.3 + * makefiles/DEFAULTS_ENG/Defaults.dragonfly 1.4 + * makefiles/DEFAULTS_ENG/Defaults.dgux4 1.3 + * makefiles/DEFAULTS_ENG/Defaults.dgux3 1.3 + * makefiles/DEFAULTS_ENG/Defaults.amigaos 1.3 + * makefiles/DEFAULTS_ENG/Defaults.hp-ux 1.3 + * makefiles/DEFAULTS_ENG/Defaults.dgux 1.3 + * makefiles/DEFAULTS_ENG/Defaults.unixware 1.2 + * makefiles/DEFAULTS_ENG/Defaults.newsos6 1.3 + * makefiles/DEFAULTS_ENG/Defaults.interix 1.4 + * makefiles/DEFAULTS_ENG/Defaults.mingw32_nt 1.3 + * makefiles/DEFAULTS_ENG/Defaults.sunos5 1.3 + * makefiles/DEFAULTS_ENG/Defaults.osf1 1.3 + * makefiles/DEFAULTS_ENG/Defaults.irix 1.3 + * makefiles/DEFAULTS_ENG/Defaults.nextstep 1.3 + * makefiles/DEFAULTS_ENG/Defaults.sunos4 1.3 + * makefiles/DEFAULTS_ENG/Defaults.linux 1.4 + * makefiles/DEFAULTS_ENG/Defaults.ms-dos 1.3 + * makefiles/DEFAULTS_ENG/Defaults.os2 1.3 + * makefiles/DEFAULTS_ENG/Defaults.aix 1.3 + * makefiles/DEFAULTS_ENG/Defaults.bsd-os 1.3 + * makefiles/DEFAULTS_ENG/Defaults.netbsd 1.3 + * makefiles/DEFAULTS_ENG/Defaults.qnx 1.3 + * makefiles/DEFAULTS_ENG/Defaults.freebsd 1.4 + * makefiles/DEFAULTS_ENG/Defaults.domainos 1.3 + * makefiles/DEFAULTS_ENG/Defaults.freemint 1.2 + * makefiles/DEFAULTS_ENG/Defaults.openserver 1.2 + * makefiles/DEFAULTS_ENG/Defaults.beos 1.3 + * makefiles/DEFAULTS/Defaults.unixware 1.2 + * makefiles/DEFAULTS/Defaults.sunos5 1.3 + * makefiles/DEFAULTS/Defaults.sunos4 1.3 + * makefiles/DEFAULTS/Defaults.qnx 1.3 + * makefiles/DEFAULTS/Defaults.osf1 1.3 + * makefiles/DEFAULTS/Defaults.os2 1.3 + * makefiles/DEFAULTS/Defaults.openserver 1.2 + * makefiles/DEFAULTS/Defaults.openbsd 1.3 + * makefiles/DEFAULTS/Defaults.nextstep 1.3 + * makefiles/DEFAULTS/Defaults.newsos6 1.3 + * makefiles/DEFAULTS/Defaults.aix 1.3 + * makefiles/DEFAULTS/Defaults.amigaos 1.3 + * makefiles/DEFAULTS/Defaults.beos 1.3 + * makefiles/DEFAULTS/Defaults.bsd-os 1.3 + * makefiles/DEFAULTS/Defaults.netbsd 1.3 + * makefiles/DEFAULTS/Defaults.bsd-os3 1.3 + * makefiles/DEFAULTS/Defaults.ms-dos 1.3 + * makefiles/DEFAULTS/Defaults.dgux4 1.3 + * makefiles/DEFAULTS/Defaults.mingw32_nt 1.3 + * makefiles/DEFAULTS/Defaults.dgux 1.3 + * makefiles/DEFAULTS/Defaults.dgux3 1.3 + * makefiles/DEFAULTS/Defaults.linux 1.4 + * makefiles/DEFAULTS/Defaults.gnu 1.3 + * makefiles/DEFAULTS/Defaults.domainos 1.3 + * makefiles/DEFAULTS/Defaults.dragonfly 1.4 + * makefiles/DEFAULTS/Defaults.irix 1.3 + * makefiles/DEFAULTS/Defaults.freebsd 1.4 + * makefiles/DEFAULTS/Defaults.hp-ux 1.3 + * makefiles/DEFAULTS/Defaults.freemint 1.2 + * makefiles/DEFAULTS/Defaults.interix 1.4 + DEFINSUSR -> root + +Fri Dec 26 20:50:52 2008 joerg + * makefiles/RULES/rules.prg 1.18 + INSUSR_DEF -> root + +Fri Dec 26 20:39:24 2008 joerg + * conf/install-sh 1.8 + Warnung wenn -m suid/sticky setzen soll aber keine Root Rechte vorhanden sind + +Fri Dec 26 19:11:12 2008 joerg + * cdrecord/cdrecord.c 1.373 + scg_close() AUfruf von exscsi() -> excdr() damit es nach allen SCSI Aufrufen kommt + +Wed Dec 24 23:21:39 2008 joerg + * cdrecord/cdrecord.h 1.197 + CDR_BUF_SIZE -> 63 k weil es Probleme gab + +Wed Dec 24 21:29:59 2008 joerg + * cdrecord/version.h 1.29 + Version -> 2.01.01a54 + +Wed Dec 24 21:10:10 2008 joerg + * cdrecord/cdrecord.c 1.372 + get_dmaspeed() prueft nun ob scg_getresid() korrekt funktioniert und ist gegen unzuverlaessige LW gesichert + +Wed Dec 24 17:25:34 2008 joerg + * include/schily/libport.h 1.17 + * include/schily/hostname.h 1.17 + schily/standard.h -> schily/types.h, mehr wird nicht benoetigt + +Wed Dec 24 17:24:23 2008 joerg + * include/schily/sigblk.h 1.12 + schily/standard.h beseitigt, da const/void/... nun schon in schily/mconfig behandelt werden + +Wed Dec 24 13:01:35 2008 joerg + * cdrecord/drv_dvd.c 1.158 + Prototyp fuer waitformat() neu + +Tue Dec 23 23:25:55 2008 joerg + * libfind/find.c 1.77 + Version -> 1.4 + Unterstuetzung für _ARG_MAX32 und _ARG_MAX64 neu + +Mon Dec 22 17:09:03 2008 joerg + * mkisofs/diag/isoinfo.c 1.66 + * mkisofs/diag/dump.c 1.33 + * mkisofs/diag/isodump.c 1.37 + * mkisofs/diag/isodebug.c 1.22 + * mkisofs/diag/isovfy.c 1.36 + * mkisofs/dvd_file.c 1.9 + * mkisofs/ifo_read.c 1.12 + * mkisofs/dvd_reader.c 1.8 + * mkisofs/walk.c 1.9 + * mkisofs/mac_label.c 1.16 + * mkisofs/desktop.c 1.9 + * mkisofs/volume.c 1.23 + * mkisofs/stream.c 1.13 + * mkisofs/eltorito.c 1.46 + * mkisofs/name.c 1.35 + * mkisofs/isonum.c 1.7 + * mkisofs/boot.c 1.21 + * mkisofs/scsi.c 1.32 + * mkisofs/apple.c 1.34 + * mkisofs/write.c 1.119 + * mkisofs/udf.c 1.32 + * mkisofs/rock.c 1.55 + * mkisofs/tree.c 1.115 + * mkisofs/hash.c 1.24 + * mkisofs/inode.c 1.9 + * mkisofs/joliet.c 1.56 + * mkisofs/multi.c 1.89 + * mkisofs/match.c 1.28 + * mkisofs/mkisofs.c 1.241 + * scgskeleton/skel.c 1.15 + * scgskeleton/doit.c 1.26 + * rscsi/rscsi.c 1.33 + * scgcheck/sense.c 1.8 + * scgcheck/scgcheck.c 1.15 + * scgcheck/dmaresid.c 1.10 + * btcflash/btcflash.c 1.14 + * btcflash/skel.c 1.18 + * cdrecord/readcd.c 1.100 + * cdrecord/io.c 1.5 + * cdda2wav/ringbuff.c 1.17 + * cdda2wav/sndconfig.c 1.28 + * cdda2wav/aiff.c 1.10 + * cdda2wav/aifc.c 1.11 + * cdda2wav/scsi_cmds.c 1.39 + * cdda2wav/setuid.c 1.17 + * cdda2wav/sha_func.c 1.6 + * cdda2wav/parse.c 1.4 + * cdda2wav/base64.c 1.8 + * cdda2wav/ioctl.c 1.34 + * cdda2wav/md5.c 1.4 + * cdda2wav/sun.c 1.10 + * cdda2wav/toc.c 1.78 + * cdda2wav/resample.c 1.27 + * cdda2wav/raw.c 1.9 + * cdda2wav/semshm.c 1.24 + * libmdigest/md5.c 1.4 + * cdda2wav/cdda2wav.c 1.94 + * cdda2wav/wav.c 1.9 + * cdda2wav/interface.c 1.62 + * cdda2wav/cd_extra.c 1.15 + * cdrecord/scsi_cdr.c 1.156 + * cdrecord/misc.c 1.6 + * cdrecord/scsi_mmc.c 1.46 + * cdrecord/scsilog.c 1.22 + * cdrecord/xio.c 1.18 + * cdrecord/scsi_mmc4.c 1.4 + * cdrecord/crc16.c 1.8 + * cdrecord/scsi_cdr_mmc4.c 1.4 + * cdrecord/scsi_scan.c 1.31 + * cdrecord/drv_dvdplus.c 1.51 + * cdrecord/drv_mmc.c 1.192 + * cdrecord/drv_dvd.c 1.157 + * cdrecord/drv_simul.c 1.58 + * cdrecord/drv_bd.c 1.13 + * cdrecord/vendor.c 1.2 + * cdrecord/cdtext.c 1.12 + * cdrecord/drv_7501.c 1.25 + * cdrecord/drv_philips.c 1.78 + * cdrecord/cdr_drv.c 1.46 + * cdrecord/drv_jvc.c 1.91 + * cdrecord/drv_sony.c 1.82 + * cdrecord/wm_track.c 1.6 + * cdrecord/auinfo.c 1.25 + * cdrecord/sector.c 1.15 + * cdrecord/wm_packet.c 1.28 + * cdrecord/diskid.c 1.41 + * cdrecord/movesect.c 1.5 + * cdrecord/cue.c 1.35 + * cdrecord/clone.c 1.9 + * cdrecord/subchan.c 1.23 + * cdrecord/wm_session.c 1.6 + * cdrecord/fifo.c 1.54 + * cdrecord/isosize.c 1.11 + * cdrecord/audiosize.c 1.22 + * cdrecord/cd_misc.c 1.15 + * cdrecord/cdrecord.c 1.371 + * libscgcmd/ready.c 1.157 + * libfind/fetchdir.c 1.25 + * libfind/find_list.c 1.23 + * libfind/find_main.c 1.63 + * libfind/cmpdir.c 1.25 + * libfind/find.c 1.76 + * libfind/idcache.c 1.26 + * libfind/walk.c 1.36 + * libfind/find_misc.c 1.12 + * libscgcmd/readcap.c 1.157 + * libscgcmd/inquiry.c 1.157 + * libscgcmd/buffer.c 1.157 + * libscgcmd/read.c 1.157 + * libscgcmd/modes.c 1.28 + * libscgcmd/modesense.c 1.157 + * libparanoia/pmalloc.c 1.6 + * libparanoia/isort.c 1.18 + * libparanoia/overlap.c 1.15 + * libparanoia/paranoia.c 1.40 + * libparanoia/gap.c 1.17 + * libparanoia/p_block.c 1.27 + * libsiconv/sic_nls.c 1.8 + * libhfs_iso/btree.c 1.6 + * libhfs_iso/low.c 1.7 + * libhfs_iso/gdata.c 1.4 + * libhfs_iso/file.c 1.6 + * libhfs_iso/data.c 1.7 + * libhfs_iso/volume.c 1.7 + * libhfs_iso/node.c 1.5 + * libhfs_iso/block.c 1.6 + * libhfs_iso/record.c 1.4 + * libhfs_iso/hfs.c 1.12 + * libdeflt/default.c 1.7 + * libfile/file.c 1.8 + * libfile/softmagic.c 1.11 + * libfile/apprentice.c 1.12 + * libcdrdeflt/cdrdeflt.c 1.24 + * libscg/scsiopen.c 1.98 + * libscg/rdummy.c 1.3 + * libscg/scgsettarget.c 1.4 + * libscg/scgtimes.c 1.3 + * libscg/scsihelp.c 1.6 + * libscg/scsierrs.c 2.32 + * libedc/edc_ecc.c 1.26 + * libedc/edc_ecc_dec.c 1.6 + * libedc/edcspeed.c 1.3 + static char sccsid[] -> static const char sccsid[] wegen GCC Warnung + +Mon Dec 22 16:58:54 2008 joerg + * mkisofs/write.c 1.120 + * mkisofs/inode.c 1.10 + * mkisofs/rock.c 1.56 + * mkisofs/udf.c 1.33 + * mkisofs/hash.c 1.25 + * mkisofs/joliet.c 1.57 + * cdda2wav/ioctl.c 1.35 + Copyright -> 2008 + +Mon Dec 22 16:20:12 2008 joerg + * cdda2wav/config.h 1.12 + Abgesichert mit #ifndef _CONFIG_H + +Mon Dec 22 15:50:47 2008 joerg + * cdrecord/cdrecord.c 1.370 + exscsi() ruft nun scg_close(exp->scgp) + +Mon Dec 22 13:15:58 2008 joerg + * libedc/shledc.mk 1.3 + * libedc/shledc_dec.mk 1.3 + * libedc/libedc_dec.mk 1.2 + * libedc/libedc.mk 1.6 + * libedc/libedc_dec_p.mk 1.4 + * libedc/libedc_p.mk 1.4 + -xarch=generic64 -> $(SUNPROCOPT64) + +Sun Dec 21 00:33:17 2008 joerg + * libschily/cmpnullbytes.c 1.6 + * libschily/cmpbytes.c 1.19 + * libschily/eaccess.c 1.2 + * libschily/checkerr.c 1.20 + * libschily/fnmatch.c 8.7 + * libschily/fstream.c 1.25 + * libschily/getav0.c 1.21 + * libschily/getargs.c 2.57 + * libschily/getpagesize.c 1.3 + * libschily/getperm.c 1.3 + * libschily/gettimeofday.c 1.2 + * libschily/getnum.c 1.5 + * libschily/gettnum.c 1.8 + * libschily/getxnum.c 1.5 + * libschily/getxtnum.c 1.8 + * libschily/gethostid.c 1.18 + * libschily/getdomainname.c 1.19 + * libschily/mem.c 1.9 + * libschily/jmem.c 1.11 + * libschily/fjmem.c 1.12 + * libschily/rename.c 1.9 + * libschily/wcsdup.c 1.4 + * libschily/wcsncpy.c 1.3 + * libschily/strncpy.c 1.3 + * libschily/wcslcpy.c 1.3 + * libschily/strdup.c 1.4 + * libschily/usleep.c 1.20 + * libschily/strlcpy.c 1.3 + * libschily/sleep.c 1.2 + * libschily/findinpath.c 1.2 + static char sccsid[] -> static const char sccsid[] wegen GCC Warnung + +Sun Dec 21 00:21:45 2008 joerg + * libschily/getdomainname.c 1.18 + * cdda2wav/toc.c 1.77 + schily/libport.h -> schily/hostname.h + +Sun Dec 21 00:11:56 2008 joerg + * libschily/gethostname.c 1.17 + schily/libport.h -> schily/hostname.h + static char sccsid[] -> static const char sccsid[] wegen GCC Warnung + +Sat Dec 20 16:35:08 2008 joerg + * mkisofs/diag/isoinfo.c 1.65 + Ausgabe/Test der Checksumme des Eltorito Validation Headers neu + +Sat Dec 20 16:28:27 2008 joerg + * include/schily/hostname.mk 1.1 + date and time created 08/12/20 16:28:27 by joerg + +Sat Dec 20 16:28:02 2008 joerg + * include/schily/libport.h 1.16 + hostname.h ausgegliedert + +Sat Dec 20 16:27:41 2008 joerg + * include/schily/hostname.h 1.16 + Aus libport.h ausgegliedert + +Sat Dec 20 16:26:53 2008 joerg + * include/schily/prototyp.h 1.13 + const/signed/volatile definieren wenn nicht ROTOTYPES (aus standard.h) + +Sat Dec 20 16:22:53 2008 joerg + * include/schily/Mrel 1.10 + * include/schily/Makefile 1.10 + hostname.mk neu + +Sat Dec 20 16:22:24 2008 joerg + * include/schily/schily.h 1.76 + #include automatisch wenn nicht NO_LIBPORT_H definiert ist + +Sat Dec 20 16:17:14 2008 joerg + * makefiles/RULES/cc-sunpro64.rul 1.10 + 64-Bit Option nun evt. aus rules.cnf $(CC64_OPT) setzen, $(SUNPROCOPT64) neu + +Sat Dec 20 13:45:25 2008 joerg + * autoconf/aclocal.m4 1.69 + * autoconf/rules.cnf.in 1.18 + * autoconf/configure.in 1.159 + AC_CC64_OPT neu + +Mon Dec 8 23:15:20 2008 joerg + * include/schily/schily.h 1.75 + schily/libport.h erstmal wieder beseitigt wegen Problemen mit #include netdb.h (Streams struct queue) -Sun Feb 22 16:41:57 2004 Joerg Schilling - * cdrecord.1 1.91 +Mon Dec 8 22:45:13 2008 joerg + * cdrecord/cdrecord.c 1.369 + Cstyle + +Mon Dec 8 22:41:00 2008 joerg + * cdrecord/drv_dvd.c 1.156 + Workarounf fuer 'HL-DT-ST' 'DVD-RAM GH22NP20' das ds_maxblocks == 0 liefert + +Mon Dec 8 22:34:14 2008 joerg + * cdrecord/cdr_drv.c 1.45 + * cdrecord/drv_bd.c 1.12 + cdr_bdrom Treiber neu fuer Profil 0x40 + +Mon Dec 8 20:31:38 2008 joerg + * include/schily/getcwd.h 1.5 + #include neu + +Sun Dec 7 21:50:50 2008 joerg + * libschily/findinpath.c 1.1 + date and time created 08/12/07 21:50:50 by joerg + +Sun Dec 7 20:04:18 2008 joerg + * include/schily/schily.h 1.74 + * libschily/libschily-mapvers 1.13 + * libschily/Targets 1.13 + findinpath() neu + +Sun Dec 7 19:17:05 2008 joerg + * include/schily/schily.h 1.73 + #include neu + +Sun Dec 7 19:16:46 2008 joerg + * include/schily/hostname.h 1.15 + * include/schily/libport.h 1.15 + * libschily/libschily-mapvers 1.12 + * libschily/Targets 1.12 + eaccess() neu + +Sun Dec 7 19:14:17 2008 joerg + * libschily/eaccess.c 1.1 + date and time created 08/12/07 19:14:17 by joerg + +Sun Dec 7 16:27:20 2008 joerg + * mkisofs/tree.c 1.114 + Bessere Ferhlermeldung bei "Unable to sort directory" + +Sun Dec 7 14:54:46 2008 joerg + * cdda2wav/interface.c 1.61 + static SCSI *scgp -> static SCSI *_scgp + +Sun Dec 7 14:45:55 2008 joerg + * cdda2wav/cdda2wav.c 1.93 + fname[200] -> fname[PATH_MAX+1] + altes fname[200] geloescht + Doppelcast bei on_exit wegen falscher GCC Warnungen + +Wed Dec 3 22:57:02 2008 joerg + * libfind/find.c 1.75 + Besserer Kommentar bei argsize() + +Wed Nov 26 21:04:22 2008 joerg + * libscg/scsi-remote.c 1.26 + MAX_SCG -> 1024 wegen Linux ATA Mapping + +Tue Nov 25 23:25:20 2008 joerg + * include/schily/mconfig.h 1.63 + NO_ACL neu + +Sat Nov 15 13:21:13 2008 joerg + * makefiles/RULES/i586-linux-suncc.rul 1.3 + * makefiles/RULES/i586-linux-suncc64.rul 1.4 + LDOPTDYN fuer Linux adaptiert damit dynamisches Linken geht + +Sat Nov 15 12:46:13 2008 joerg + * makefiles/RULES/i586-linux-suncc.rul 1.2 + * makefiles/RULES/i586-linux-suncc64.rul 1.3 + * makefiles/RULES/i586-linux-gcc.rul 1.12 + * makefiles/RULES/i586-linux-gcc32.rul 1.12 + * makefiles/RULES/i586-linux-cc.rul 1.12 + -Wl,-R scheint doch auf Linux zu funktionieren + +Sat Nov 15 12:43:13 2008 joerg + * makefiles/RULES/i586-linux-cc.rul 1.13 + * makefiles/RULES/i586-linux-gcc.rul 1.13 + * makefiles/RULES/i586-linux-gcc32.rul 1.13 + Kommentar zu -R + +Fri Nov 14 22:49:56 2008 joerg + * makefiles/RULES/atarist-freemint-gcc.rul 1.4 + Ranlib funktioniert nicht zuverlaessig auf MiNT + +Thu Nov 13 23:31:55 2008 joerg + * mkisofs/TODO 1.8 + geloeste Probleme entfernt + +Thu Nov 13 23:21:26 2008 joerg + * mkisofs/mkisofs.8 1.126 + -sector, -XA, -xa neu + +Thu Nov 13 22:43:24 2008 joerg + * mkisofs/mkisofs.h 1.135 + PATH_MAX immer mindestens auf 1024 setzen wegen Cygwin bug + +Thu Nov 13 22:41:15 2008 joerg + * mkisofs/eltorito.c 1.45 + Copyrightt -> 2008 + +Thu Nov 13 22:40:20 2008 joerg + * mkisofs/mac_label.c 1.15 + Copyright -> 2008 + +Thu Nov 13 22:38:35 2008 joerg + * mkisofs/mac_label.c 1.14 + * mkisofs/eltorito.c 1.44 + ex_boot_enoent() neu + +Tue Nov 11 22:00:22 2008 joerg + * makefiles/RULES/atarist-freemint-gcc.rul 1.3 + Schreibfehler $(STACKSIZE) -> $(STACK_SIZE) + +Sun Nov 9 18:37:28 2008 joerg + * makefiles/RULES/atarist-freemint-gcc.rul 1.2 + STACKSIZE setzen + +Sun Nov 9 16:02:22 2008 joerg + * makefiles/RULES/atarist-freemint-gcc.rul 1.1 + date and time created 08/11/09 16:02:22 by joerg + +Sat Nov 8 22:08:16 2008 joerg + * makefiles/RULES/os-freemint.def 1.1 + * makefiles/RULES/os-freemint.id 1.1 + date and time created 08/11/08 22:08:16 by joerg + +Sat Nov 8 21:47:38 2008 joerg + * makefiles/DEFAULTS/Defaults.freemint 1.1 + date and time created 08/11/08 21:47:38 by joerg + +Sat Nov 8 21:47:18 2008 joerg + * makefiles/DEFAULTS_ENG/Defaults.freemint 1.1 + date and time created 08/11/08 21:47:18 by joerg + +Sat Nov 8 20:09:25 2008 joerg + * makefiles/RULES/MKLINKS 1.74 + atarist Support neu + +Sat Nov 8 18:23:17 2008 joerg + * autoconf/xconfig.h.in 1.150 + * autoconf/configure.in 1.158 + * autoconf/aclocal.m4 1.68 + AC_FUNC_SHMGET neu wegen nicht funktionierendem shmget() auf ATARI MiNT + +Wed Nov 5 11:06:57 2008 joerg + * autoconf/config.guess 1.11 + * autoconf/config.sub 1.6 + Atari MiNT Support neu + +Sun Nov 2 22:40:47 2008 joerg + * cdrecord/COPYING 1.7 + Mkisofs Hinweis verbessert + +Sun Nov 2 22:30:49 2008 joerg + * cdda2wav/parse.c 1.3 + E_OK -> E_ISOK wegen euid access() auf Linux + +Sun Nov 2 22:30:21 2008 joerg + * cdda2wav/resample.c 1.26 + Copyright -> 2008 + +Tue Oct 28 23:24:42 2008 joerg + * cdrecord/version.h 1.28 + Version -> 2.01.01a53 + +Tue Oct 28 23:24:04 2008 joerg + * cdda2wav/global.h 1.22 + Erweiterungen fuer MD5 + +Tue Oct 28 23:23:17 2008 joerg + * cdda2wav/cdda2wav.1 1.27 + * cdda2wav/cdda2wav.c 1.92 + * cdda2wav/resample.c 1.25 + MD5 Summenberechnung geht nun + +Tue Oct 28 23:14:59 2008 joerg + * cdda2wav/raw.c 1.8 + * cdda2wav/wav.c 1.8 + * cdda2wav/aiff.c 1.9 + * cdda2wav/aifc.c 1.10 + * cdda2wav/sun.c 1.9 + global.md5offset neu + +Sun Oct 26 23:04:26 2008 joerg + * libscgcmd/libscgcmd.mk 1.2 + * libscgcmd/libscgcmd_p.mk 1.2 + * libscgcmd/shlscgcmd.mk 1.2 + -I../libscg neu + +Sun Oct 26 22:50:43 2008 joerg + * scgskeleton/Makefile 1.12 + * scgskeleton/MKLINKS 1.4 + * cdrecord/MKLINKS 1.3 + * cdrecord/readcd.mk 1.15 + Umbau auf libschcmd + +Sun Oct 26 22:49:30 2008 joerg + * scgcheck/Makefile 1.11 + * scgcheck/MKLINKS 1.2 + Umbah auf libscgcmd + +Sun Oct 26 22:43:44 2008 joerg + * cdrecord/Makefile 1.48 + * cdda2wav/Makefile 1.21 + * cdda2wav/MKLINKS 1.3 + * mkisofs/Makefile 1.39 + * mkisofs/scsi.c 1.31 + * mkisofs/diag/Makefile 1.9 + * mkisofs/diag/MKLINKS 1.3 + * mkisofs/diag/isoinfo.mk 1.13 + * mkisofs/diag/isodebug.mk 1.8 + * mkisofs/diag/dump.mk 1.10 + * mkisofs/diag/isodump.mk 1.10 + * mkisofs/diag/isovfy.mk 1.10 + * btcflash/MKLINKS 1.4 + * btcflash/Makefile 1.9 + Umbau auf libscgcmd + +Sun Oct 26 22:38:18 2008 joerg + * mkisofs/Makefile 1.40 + -I../cdrecord beseitigt + +Sun Oct 26 22:31:32 2008 joerg + * libscgcmd/libscgcmd.h 1.1 + date and time created 08/10/26 22:31:32 by joerg + +Sun Oct 26 22:31:20 2008 joerg + * libscgcmd/modes.c 1.27 + * libscgcmd/modesense.c 1.156 + * libscgcmd/read.c 1.156 + * libscgcmd/readcap.c 1.156 + * libscgcmd/ready.c 1.156 + * libscgcmd/inquiry.c 1.156 + * libscgcmd/buffer.c 1.156 + libscgcmd neu + +Sun Oct 26 22:04:03 2008 joerg + * libscgcmd/Targets 1.1 + date and time created 08/10/26 22:04:03 by joerg + +Sun Oct 26 22:03:28 2008 joerg + * libscgcmd/libscgcmd-mapvers 1.1 + date and time created 08/10/26 22:03:28 by joerg + +Sun Oct 26 22:01:52 2008 joerg + * libscgcmd/Makefile 1.1 + date and time created 08/10/26 22:01:52 by joerg + +Sun Oct 26 21:56:49 2008 joerg + * libscgcmd/shlscgcmd.mk 1.1 + date and time created 08/10/26 21:56:49 by joerg + +Sun Oct 26 21:55:10 2008 joerg + * libscgcmd/libscgcmd_p.mk 1.1 + * libscgcmd/libscgcmd.mk 1.1 + * libscgcmd/noshlscgcmd.mk 1.1 + date and time created 08/10/26 21:55:10 by joerg + +Sun Oct 26 16:34:40 2008 joerg + * cdrecord/COPYING 1.6 + libcdrdeflt/ und libscgcmd/ neu + +Sun Oct 26 13:45:41 2008 joerg + * scgskeleton/Makefile 1.11 + * scgskeleton/MKLINKS 1.3 + * scgskeleton/skel.c 1.14 + * mkisofs/diag/isoinfo.mk 1.12 + * mkisofs/diag/dump.c 1.32 + * mkisofs/diag/isodump.mk 1.9 + * mkisofs/diag/isodebug.mk 1.7 + * mkisofs/diag/MKLINKS 1.2 + * mkisofs/diag/isovfy.mk 1.9 + * mkisofs/diag/isodebug.c 1.21 + * mkisofs/diag/isodump.c 1.36 + * mkisofs/diag/dump.mk 1.9 + * mkisofs/diag/isoinfo.c 1.64 + * mkisofs/diag/isovfy.c 1.35 + * mkisofs/scsi.c 1.30 + * mkisofs/Makefile 1.38 + * mkisofs/MKLINKS 1.2 + * cdda2wav/cdda2wav.c 1.91 + * cdda2wav/Makefile 1.20 + * cdda2wav/MKLINKS 1.2 + * btcflash/Makefile 1.8 + * btcflash/skel.c 1.17 + * btcflash/MKLINKS 1.3 + * cdrecord/MKLINKS 1.2 + * cdrecord/Makefile 1.47 + * cdrecord/readcd.mk 1.14 + * cdrecord/cdrecord.c 1.368 + * cdrecord/readcd.c 1.99 + Umbau auf libcdrdeflt + +Sat Oct 25 23:29:11 2008 joerg + * libcdrdeflt/shlcdrdeflt.mk 1.1 + * libcdrdeflt/noshlcdrdeflt.mk 1.1 + * libcdrdeflt/libcdrdeflt.mk 1.1 + * libcdrdeflt/libcdrdeflt_p.mk 1.1 + date and time created 08/10/25 23:29:11 by joerg + +Sat Oct 25 23:20:29 2008 joerg + * libcdrdeflt/Targets 1.1 + date and time created 08/10/25 23:20:29 by joerg + +Sat Oct 25 23:18:26 2008 joerg + * libcdrdeflt/Makefile 1.1 + date and time created 08/10/25 23:18:26 by joerg + +Sat Oct 25 23:18:14 2008 joerg + * libcdrdeflt/cdrdeflt.h 1.4 + * libcdrdeflt/cdrdeflt.c 1.23 + Umstellung auf libcdrdeflt + +Sat Oct 25 23:17:37 2008 joerg + * libcdrdeflt/libcdrdeflt-mapvers 1.1 + date and time created 08/10/25 23:17:37 by joerg + +Thu Oct 23 22:31:06 2008 joerg + * cdrecord/cdrecord.1 1.123 + BluRay im Text wo noetig + +Thu Oct 23 22:25:11 2008 joerg + * cdrecord/cdrecord.1 1.122 + BluRay neu mit driver= + +Thu Oct 23 22:16:37 2008 joerg + * cdrecord/cdrecord.1 1.121 + speed= an BluRay angepasst + +Tue Oct 21 23:53:15 2008 joerg + * cdrecord/version.h 1.27 + Version -> 2.01.01a52 + +Tue Oct 21 23:10:05 2008 joerg + * cdda2wav/local.cnf.in 1.8 + md5c.o -> md5.o + +Tue Oct 21 23:03:48 2008 joerg + * libmdigest/md5.h 1.6 + * cdda2wav/md5.c 1.3 + * libmdigest/md5.c 1.3 + * include/schily/md5.h 1.6 + * cdda2wav/md5.h 1.6 + Portabel gemacht + +Tue Oct 21 22:39:25 2008 joerg + * cdda2wav/md5.h 1.5 + * include/schily/md5.h 1.5 + * libmdigest/md5.h 1.5 + * libmdigest/md5.c 1.2 + * cdda2wav/md5.c 1.2 + Copyright J. Schilling neu + +Tue Oct 21 22:38:31 2008 joerg + * include/schily/md5.h 1.4 + * cdda2wav/md5.h 1.4 + * libmdigest/md5.h 1.4 + Umstellung auf md5.h von OpenBSD + +Tue Oct 21 22:36:03 2008 joerg + * cdda2wav/Makefile 1.19 + md5c.c -> md5.c + +Tue Oct 21 22:30:49 2008 joerg + * libmdigest/md5.c 1.1 + * cdda2wav/md5.c 1.1 + date and time created 08/10/21 22:30:49 by joerg + +Sun Oct 19 22:45:06 2008 joerg + * cdrecord/COPYING 1.5 + libfile (license similar to BSDL) -> (BSDL 2 clause) + +Sun Oct 19 22:39:41 2008 joerg + * libfile/LEGAL.NOTICE 1.2 + * libfile/apprentice.c 1.11 + * libfile/file.c 1.7 + * libfile/softmagic.c 1.10 + * libfile/file.h 1.11 + Lizenz mit Genehmigung der AUtoren geaendert + +Sun Oct 12 21:16:22 2008 joerg + * conf/post.html 1.4 + * conf/post.html 1.3 + old/private -> private + +Sun Oct 12 21:11:43 2008 joerg + * cdrecord/cdrecord.1 1.120 + * cdrecord/README 1.26 + * cdrecord/README.ATAPI 1.6 + * rscsi/rscsi.1 1.2 + * scgcheck/scgcheck.1 1.12 + * cdrecord/readcd.1 1.30 + * mkisofs/diag/isodebug.8 1.2 + * mkisofs/mkisofs.8 1.125 + * btcflash/btcflash.1 1.3 + schilling@fokus.fhg.de -> joerg.schilling@fokus.fraunhofer.de + +Sun Oct 12 20:27:21 2008 joerg + * cdrecord/README.compile 1.17 + README.gmake -> READMEs/README.gmake + +Sun Oct 12 20:23:28 2008 joerg + * conf/post.html 1.2 + fhg -> fraunhofer + +Sun Oct 12 20:15:19 2008 joerg + * conf/makeinc 1.5 + Mailadresse korrigiert + +Sat Oct 11 15:46:47 2008 joerg + * cdda2wav/cdda2wav.c 1.90 + printf Format fuer pid_t angepasst + +Sat Oct 11 14:58:21 2008 joerg + * cdrecord/drv_bd.c 1.11 + GCC Warnungen beseitigt + +Sat Oct 11 14:55:31 2008 joerg + * cdrecord/drv_dvdplus.c 1.50 + Verdeckende Variablendefinition "ret" beseitigt + +Sat Oct 11 14:47:11 2008 joerg + * mkisofs/mkisofs.h 1.134 + _WALK_H -> _SCHILY_WALK_H + +Sat Oct 11 14:39:09 2008 joerg + * scgcheck/scgcheck.c 1.14 + Ueberdeckende Deklarationen beseitigt + +Sat Oct 11 14:29:07 2008 joerg + * scgskeleton/skel.c 1.13 + * btcflash/skel.c 1.16 + Ueberdeckende deklaration fuer "err" beseitigt + +Sat Oct 11 13:34:34 2008 joerg + * cdrecord/scsi_mmc.c 1.45 Schreibfehler -Sun Feb 22 15:53:51 2004 Joerg Schilling - * readcd.c 1.63 - * cdrecord.h 1.158 - * defaults.c 1.10 - cdr_defaults() Prototy -> neues defaults.h - -Sun Feb 22 15:53:00 2004 Joerg Schilling - * defaults.h 1.1 - date and time created 04/02/22 15:53:00 by joerg - -Sun Feb 1 21:32:58 2004 Joerg Schilling - * adip.h 1.1 - date and time created 04/02/01 21:32:58 by joerg - -Fri Jan 23 23:10:42 2004 Joerg Schilling - * scsi-wnt.c 1.41 - dev=ATAPI:1,0 geht nun wieder - -Mon Jan 19 21:29:24 2004 Joerg Schilling - * drv_dvd.c 1.113 - * cdrecord.c 1.274 - * drv_dvdplus.c 1.12 - * wm_packet.c 1.23 - trackp[i].padsecs * secsize -> (Llong)trackp[i].padsecs * secsize, damit kein Integeroverflow mehr stattfindet - -Thu Jan 15 22:24:39 2004 Joerg Schilling - * scsi-wnt.c 1.40 - w2k_or_newer() neu um bei NT-4.0 wegen DMA Problemen mit SPTI per Default mit ASPI zu betreiben - Debug prints fuer bessere Beurteilung der Funktionsweise - -Thu Jan 15 02:22:38 2004 Joerg Schilling - * scsi-mac-iokit.c 1.9 - memset sense 0 wieder eingebaut bis endgueltig geklaert ist wie es sein sollte - -Thu Jan 15 01:55:36 2004 Joerg Schilling - * scsi-hpux.c 1.31 - * scsi-linux-pg.c 1.43 - * scsi-vms.c 1.33 - * scsi-os2.c 1.25 - * scsi-wnt.c 1.39 - * scsi-remote.c 1.15 - * scsi-unixware.c 1.36 - * scsi-qnx.c 1.3 - * scsi-osf.c 1.26 - * scsi-sgi.c 1.36 - * scsi-bsd.c 1.42 - * scsi-bsd-os.c 1.28 - * scsi-beos.c 1.22 - Umbau fuer Cstyle - -Thu Jan 15 01:05:25 2004 Joerg Schilling - * scsi-openserver.c 1.31 - Aenderungen fuer Cstyle - -Thu Jan 15 00:50:11 2004 Joerg Schilling - * scsi-next.c 1.32 - * scsi-linux-ata.c 1.5 - Umbau wegen Cstyle - -Wed Jan 14 20:05:52 2004 Joerg Schilling - * drv_dvd.c 1.112 - Unbenutzte Variablen beseitigt - -Wed Jan 14 20:04:33 2004 Joerg Schilling - * scsi-sun.c 1.82 - Aumbau fuer Cstyle - -Wed Jan 14 19:57:28 2004 Joerg Schilling - * scsi-sun.c 1.81 - Ueberfluessige Variable sb beseitigt - -Wed Jan 14 18:54:48 2004 Joerg Schilling - * scsi-apollo.c 1.5 - * scsi-amigaos.c 1.6 - * scsi-aix.c 1.36 - * scsi-linux-sg.c 1.79 - * scsiopen.c 1.95 - * scsitransp.c 1.90 - * scgsettarget.c 1.2 - * scsihelp.c 1.4 - Umbau fuer cstyle - -Wed Jan 14 15:37:47 2004 Joerg Schilling - * scsi-linux-sg.c 1.78 - LF_ATA Flag neu - -Wed Jan 14 01:14:27 2004 Joerg Schilling - * scsi-mac-iokit.c 1.8 - ux_errno wird nun korrekt gesetzt wenn ein Kommando schiefgeht - Die Sense Daten werden nicht mehr gelöscht - Author ist nun "schily", denn das Modul kommt nun teilweise dirch scgcheck - -Tue Jan 13 20:43:44 2004 Joerg Schilling - * scsi-mac-iokit.c 1.7 - Umbau fuer Cstyle - -Mon Jan 12 00:36:04 2004 Joerg Schilling - * drv_mmc.c 1.154 - Besserer Kommentar bei den Profilen in identify - -Mon Jan 12 00:33:39 2004 Joerg Schilling - * cdr_drv.c 1.35 - dp bei error() ueberpruefen um coredumps bei cdrecord -xd zu verhindern - -Sun Jan 11 18:42:14 2004 Joerg Schilling - * scsi-linux-sg.c 1.77 - Versuch das /dev/hd* Interface von Linux-2.6 besser zu unterstützen. +Sat Oct 11 13:33:56 2008 joerg + * cdrecord/cdrecord.c 1.367 + %l -> %ld + +Sat Oct 11 13:32:12 2008 joerg + * makefiles/RULES/rules.prg 1.17 + SEETING -> SETTING + +Sat Oct 11 13:31:38 2008 joerg + * libscg/scsierrs.c 2.31 + sd_adaptec_keys und sd_cmds auskommentiert + +Sat Oct 11 13:12:08 2008 joerg + * autoconf/configure.in 1.157 + AC_OPT_SCHILY_BIN_SHELL_BOSH neu + AC_REVISION($Revision$) -> AC_REVISION(%I%) + +Sat Oct 11 13:11:33 2008 joerg + * autoconf/config.sub 1.5 + Support fuer NetBSD auf amd64 + +Sat Oct 11 13:11:00 2008 joerg + * autoconf/xconfig.h.in 1.149 + * autoconf/aclocal.m4 1.67 + AC_OPT_SCHILY_BIN_SHELL_BOSH neu + +Thu Oct 9 01:04:38 2008 joerg + * libschily/spawn.c 1.21 + * libschily/fexec.c 1.34 + varargs Umbau so dass der Prototyp in schily.h mit der Realitaet uebereinstimmt + +Thu Oct 9 00:55:15 2008 joerg + * include/schily/schily.h 1.72 + Workaround fuer fexec*() und *getline() Problem in POSIX.1-2008 + +Wed Oct 8 22:56:29 2008 joerg + * autoconf/configure.in 1.156 + AC_USER_XCVT Test erstmal deaktiviert + +Wed Oct 8 22:50:14 2008 joerg + * makefiles/RULES/rules.prg 1.16 + SHELL=/bin/sh beseitigt wegen /bin/bosh + +Wed Oct 8 22:46:51 2008 joerg + * libschily/fconv.c 1.37 + * libschily/format.c 1.44 + NO_USER_XCVT neu + +Wed Oct 8 00:49:28 2008 joerg + * cdrecord/version.h 1.26 + Version -> 2.01.01a51 + +Wed Oct 8 00:48:45 2008 joerg + * cdrecord/cdrecord.c 1.366 + Default ts= 126 kB damit ts= 64 kB fuer BluRay moeglich wird + Bei non-MMC Laufwerken weiterhin ts= 63 kB + ts= automatisch auf Vielfaches fuer Phys. Sektorsize setzen wenn DVD oder BD allgemein - nicht nur DVD+R/DL + +Wed Oct 8 00:46:45 2008 joerg + * cdrecord/scsi_mmc.c 1.44 + get_blf() neu + +Wed Oct 8 00:46:28 2008 joerg + * cdrecord/cdrecord.h 1.196 + get_blf() neu + CDR_BUF_SIZE -> 126 kB + CDR_OLD_BUF_SIZE mit altem Wert 6 kB neu + +Tue Oct 7 19:59:08 2008 joerg + * include/schily/schily.h 1.71 + fspawnl() Prototype korrigiert (einmal const char *, zuviel) + +Mon Oct 6 22:03:28 2008 joerg + * autoconf/xconfig.h.in 1.148 + * autoconf/configure.in 1.155 + * autoconf/aclocal.m4 1.66 + NO_USER_XCVT If we cannot define our own ecvt()/fcvt()/gcvt() neu + +Sun Oct 5 18:56:37 2008 joerg + * libschily/spawn.c 1.20 + * libschily/strdup.c 1.3 + * libschily/fexec.c 1.33 + * libschily/wcsdup.c 1.3 + #include vor schily.h + +Sun Oct 5 18:12:28 2008 joerg + * autoconf/configure.in 1.154 + * autoconf/xconfig.h.in 1.147 + Tests auf fexec*() und *getline() neu wegen POSIX.1-2008 Problemen + +Sat Oct 4 20:12:24 2008 joerg + * libscg/scsi-bsd.c 1.45 + Uebernahme von CAM WILDCARD Patch von FreeBSD + +Thu Oct 2 22:47:32 2008 joerg + * cdrecord/COPYING 1.4 + Anmerkung fuer mkisofs wegen GPL neu + +Wed Oct 1 17:15:56 2008 joerg + * cdrecord/drv_dvdplus.c 1.49 + * cdrecord/drv_dvd.c 1.155 + * cdrecord/drv_bd.c 1.10 + Defaulttimeout niemals verringern + +Fri Sep 26 15:59:39 2008 joerg + * include/schily/schily.h 1.70 + * libschily/checkerr.c 1.19 + * libschily/mem.c 1.8 + * mkisofs/mkisofs.c 1.240 + * libfind/fetchdir.c 1.24 + * libfind/cmpdir.c 1.24 + * libfind/walk.c 1.35 + __malloc() -> ___malloc(), __realloc() -> ___realoc(), __savestr() -> ___savestr() wegen ATARI Port + +Fri Sep 26 14:30:03 2008 joerg + * cdrecord/cdrecord.1 1.119 + -multi fuer DVD-R/DVD-RW beschrieben + +Fri Sep 26 14:23:33 2008 joerg + * cdrecord/version.h 1.25 + 2.01.01a50 + +Fri Sep 26 13:19:53 2008 joerg + * cdrecord/drv_dvd.c 1.154 + Multi-Border Code eingerueckt + +Fri Sep 26 12:38:51 2008 joerg + * mkisofs/joliet.c 1.55 + Sonderzeichen sind erlaubt wenn nur UDF und kein Joliet + +Thu Sep 25 17:34:06 2008 joerg + * cdrecord/Makefile 1.46 + make rel -UDVD_MULTI -> -DDVD_MULTI + +Thu Sep 18 15:55:23 2008 joerg + * cdrecord/version.h 1.24 + Version -> 2.01.01a48 + +Thu Sep 18 15:06:48 2008 joerg + * libparanoia/paranoia.c 1.39 + paranoia_free() ruft nun auch free_list(p->cache, 1); und free_list(p->fragments, 1); uebernommen von cdparanoia-III-10.2 + +Thu Sep 18 15:04:42 2008 joerg + * libparanoia/gap.c 1.16 + i_paranoia_overlap_r() ruft nicht mehr beginA++; beginB++; uebernommen von cdparanoia-III-10.2 + +Thu Sep 18 15:03:13 2008 joerg + * libparanoia/pmalloc.c 1.5 + _pfree(ptr) prueft for free() ptr + _prealloc(ptr, size) ruft _pmalloc(size) wenn ptr == 0 + +Thu Sep 18 14:58:49 2008 joerg + * libparanoia/paranoia.c 1.38 + Kommentar uebernommen von cdparanoia-III-10.2 + FLAGS_* neu + +Thu Sep 18 14:41:54 2008 joerg + * libparanoia/p_block.c 1.26 + * libparanoia/overlap.c 1.14 + * libparanoia/isort.h 1.12 + * libparanoia/isort.c 1.17 + * libparanoia/gap.c 1.15 + Kommentar uebernommen von cdparanoia-III-10.2 + +Thu Sep 18 14:40:59 2008 joerg + * libparanoia/cdda_paranoia.h 1.25 + PARANOIA_CB_CACHEERR neu von cdparanoia-III-10.2 + +Fri Sep 12 00:57:35 2008 joerg + * mkisofs/Makefile 1.37 + * mkisofs/write.c 1.118 + APPLE_HFS_HYB neu + +Fri Sep 12 00:55:40 2008 joerg + * mkisofs/apple.c 1.33 + Umstellung auf APPLE_HFS_HYB + +Thu Sep 11 18:18:58 2008 joerg + * mkisofs/volume.c 1.22 + * mkisofs/desktop.c 1.8 + #ifdef APPLE_HYB -> #ifdef APPLE_HFS_HYB + +Thu Sep 11 16:01:02 2008 joerg + * mkisofs/mkisofs.c 1.239 + * mkisofs/mkisofs.h 1.133 + * mkisofs/tree.c 1.113 + Bei insert_file_entry() wird nicht mehr auf APPLE_HYB unterschieden + +Wed Sep 10 01:18:44 2008 joerg + * cdda2wav/Makefile 1.18 + $(ALLTARGETS) -> all clean depend config install weil vor include rules.top + +Wed Sep 10 01:04:30 2008 joerg + * scgskeleton/Makefile 1.10 + * scgcheck/Makefile 1.10 + * mkisofs/Makefile 1.36 + * mkisofs/diag/Makefile 1.8 + * inc/Makefile 1.3 + * cdda2wav/Makefile 1.17 + * cdrecord/readcd.mk 1.13 + * btcflash/Makefile 1.7 + all: -> $(ALLTARGETS): wegen "make install" + +Thu Sep 4 10:14:31 2008 joerg + * cdrecord/version.h 1.23 + Version -> 2.01.01a48 + +Thu Sep 4 10:14:16 2008 joerg + * cdrecord/cdrecord.c 1.365 + Bei DVD+R/DL Schreib-Blockgroesse auf Vielfaches von Physischer Sektorgroesse reduzieren + +Thu Sep 4 10:09:30 2008 joerg + * cdrecord/drv_mmc.c 1.191 + * cdrecord/drv_dvdplus.c 1.48 + * cdrecord/drv_dvd.c 1.153 + getdisktype_xxx() setzt nun dsp->ds_type aus get_curprofile(scgp) + +Mon Sep 1 12:14:57 2008 joerg + * libfind/walk.c 1.34 + & vor statf = stat... beseitigt + +Sat Aug 30 21:30:22 2008 joerg + * autoconf/configure.in 1.153 + * autoconf/aclocal.m4 1.65 + AC_CHECK_ILIB neu, damit gettext() nun auf Linux und Cygwin funktioniert + +Sat Aug 30 16:41:47 2008 joerg + * autoconf/configure.in 1.152 + * autoconf/xconfig.h.in 1.146 + Copyright -> 2008 + +Sat Aug 30 16:38:29 2008 joerg + * autoconf/aclocal.m4 1.64 + * autoconf/xconfig.h.in 1.145 + * autoconf/configure.in 1.151 + Neue Makros: AC_BIN_SHELL_BASH AC_SHELL_CE_BROKEN AC_BIN_SHELL_CE_BROKEN AC_BIN_SHELL_BOSH + +Thu Aug 28 23:05:34 2008 joerg + * mkisofs/multi.c 1.88 + read_merging_directory() setzt *nentp nun auf nent + nmult damit die korrekte Laenge bekannt wird + check_prev_session() inkrementiert nun j in der Schleife die die alten MULTI_EXTENT Eintraege free()d + +Wed Aug 27 19:44:20 2008 joerg + * cdrecord/version.h 1.22 + Version -> 2.01.01a47 + +Wed Aug 27 18:55:34 2008 joerg + * makefiles/RULES/rules.top 1.19 + Workaround fuer SunPro Make ./ bug + +Mon Aug 25 17:58:20 2008 joerg + * mkisofs/diag/isoinfo.c 1.63 + extract_file() liest nun statt 1 10 Sektoren auf Einmal + +Thu Aug 14 19:28:39 2008 joerg + * mkisofs/tree.c 1.112 + fstatbuf.st_mode immer setzen auch wenn generate_xa_rr_attributes() nicht gerufen wird damit UDF root dir korrekte Permissions bekommt + +Wed Aug 13 23:42:37 2008 joerg + * mkisofs/multi.c 1.87 + Endlosschleife beim Lesen alter Sessions mit Multi-Extent Files vermeiden wenn dabei idr2->length[0] == 0 ist + +Wed Aug 13 23:38:15 2008 joerg + * makefiles/RULES/MKLINKS 1.73 + ia64-hp-ux-cc.rul und ia64-hp-ux-gcc.rul neu + +Wed Aug 13 21:45:21 2008 joerg + * cdrecord/version.h 1.21 + Version -> 2.01.01a46 + +Wed Aug 13 21:12:19 2008 joerg + * mkisofs/tree.c 1.111 + Intermediate directories (auch root) vorab mit mode/uid/gid Werten belegen um Mode 000 beu UDF root Dir zu verhindern + +Wed Aug 13 21:00:54 2008 joerg + * mkisofs/udf.c 1.31 + UDF kann bei 16 Bit Zeichen (jenseits ISO-8859-1) nur 127 Buchstaben im Filenamen + +Mon Aug 11 23:55:57 2008 joerg + * cdda2wav/cdda2wav.c 1.89 + Neue Option -interactive + child_pid -> global.child_pid + +Mon Aug 11 23:50:03 2008 joerg + * cdda2wav/parse.c 1.2 + drop_all_buffers() nicht rufen weil noch nicht funktionsfähig + +Sun Aug 10 23:36:58 2008 joerg + * autoconf/configure.in 1.150 + gettext()/iconv() Test auf AC_CHECK_DFUNC umgestellt + +Sun Aug 10 22:54:15 2008 joerg + * autoconf/acspecific.m4 1.7 + Fehlerhaften C-Code von Paul Eggert in AC_FUNC_VFORK korrigiert + +Sun Aug 10 22:41:54 2008 joerg + * autoconf/aclocal.m4 1.63 + AC_CHECK_DLIB neu + +Thu Aug 7 00:17:12 2008 joerg + * mkisofs/stream.c 1.12 + s_dir.length[0] korrekt berechnen + Abbruch wenn -stream-media-size zu klein + +Wed Aug 6 23:44:20 2008 joerg + * mkisofs/mkisofs.h 1.132 + mxpart nicht mehr nur bei USE_LARGEFILES definieren + +Wed Aug 6 23:43:27 2008 joerg + * cdrecord/version.h 1.20 + Version -> 2.01.01a45 + +Wed Aug 6 23:43:04 2008 joerg + * cdrecord/cdrecord.c 1.364 + Ultraspeed schon erlauben wenn das LW 10x beherrscht + +Wed Aug 6 00:34:46 2008 joerg + * makefiles/RULES/rules.top 1.18 + * makefiles/RULES/MKLINKS 1.72 + Umbau auf ldummy.lnk mit include von ldummy.lnk wegen GNU make bug + +Sun Aug 3 23:51:59 2008 joerg + * scgskeleton/Makefile 1.9 + skel.c: iodefs.h neu + +Sun Aug 3 23:44:46 2008 joerg + * scgskeleton/Makefile 1.8 + iodefs.h als Abhaengigkeit fuer MKLINKS neu + +Sun Aug 3 23:27:10 2008 joerg + * cdrecord/version.h 1.19 + Version -> 2.01.01a44 + +Sun Aug 3 23:12:21 2008 joerg + * cdda2wav/global.h 1.21 + child_pid -> global + +Sun Aug 3 23:10:59 2008 joerg + * cdda2wav/semshm.c 1.23 + * cdda2wav/semshm.h 1.6 + semdestroy() neu + +Sun Aug 3 20:19:21 2008 joerg + * cdrecord/COPYING 1.3 + autoconf/ Directory neu + +Sun Aug 3 19:46:02 2008 joerg + * cdrecord/readcd.mk 1.12 + MKLINKS neu + +Sun Aug 3 19:45:38 2008 joerg + * cdrecord/MKLINKS 1.1 + date and time created 08/08/03 19:45:38 by joerg + +Sun Aug 3 19:36:03 2008 joerg + * libscg/shlrscg.mk 1.4 + * libscg/librscg.mk 1.5 + * libscg/librscg_p.mk 1.6 + -I. -> -I../libscg + +Sun Aug 3 15:28:10 2008 joerg + * autoconf/autoconf 1.6 + $M4 und $AWK werden nun platformunabhaengig gesucht + +Sun Aug 3 13:38:06 2008 joerg + * libscg/scg/aspi-win32.h 1.2 + * libscg/scg/spti-wnt.h 1.2 + SCCS Keyword Zeile neu + +Fri Aug 1 23:22:03 2008 joerg + * mkisofs/Makefile 1.35 + * mkisofs/diag/isoinfo.mk 1.11 + * mkisofs/diag/isodump.mk 1.8 + * mkisofs/diag/dump.mk 1.8 + * mkisofs/diag/isodebug.mk 1.6 + * mkisofs/diag/isovfy.mk 1.8 + * scgcheck/Makefile 1.9 + * rscsi/Makefile 1.7 + * scgskeleton/Makefile 1.7 + * cdrecord/readcd.mk 1.11 + * cdrecord/Makefile 1.45 + -I../libscg neu + +Fri Aug 1 20:04:08 2008 joerg + * makefiles/RULES/rules.cnf 1.13 + * makefiles/RULES/local.cnf 1.9 + autoconf Regel neu + $(SRCROOT)/conf/configure -> $(SRCROOT)/autoconf/configure + +Fri Aug 1 20:01:20 2008 joerg + * autoconf/acspecific.m4 1.6 + * autoconf/acoldnames.m4 1.3 + * autoconf/acgeneral.m4 1.5 + * autoconf/aclocal.m4 1.62 + Copyright 1998-2008 J. Schilling neu + +Fri Aug 1 02:33:42 2008 joerg + * autoconf/autoconf 1.5 + AC_MACRODIR=. + +Fri Aug 1 01:56:14 2008 joerg + * autoconf/autoconf 1.4 + * autoconf/config.guess 1.10 + * autoconf/config.sub 1.4 + Copyright 1999-2008 J. Schilling neu + +Fri Aug 1 01:03:02 2008 joerg + * btcflash/Makefile 1.6 + -I../libscg neu + +Fri Aug 1 00:51:33 2008 joerg + * libscg/librscg_p.mk 1.5 + * libscg/libscg.mk 1.3 + * libscg/libscg_p.mk 1.5 + * libscg/shlrscg.mk 1.3 + * libscg/shlscg.mk 1.3 + * libscg/librscg.mk 1.4 + -I. neu + +Fri Aug 1 00:44:23 2008 joerg + * scgskeleton/MKLINKS 1.2 + * scgskeleton/Makefile 1.6 + * btcflash/MKLINKS 1.2 + * btcflash/Makefile 1.5 + -I../cdrecord neu + +Thu Jul 31 22:39:51 2008 joerg + * mkisofs/diag/Makefile 1.7 + * mkisofs/Makefile 1.34 + * cdda2wav/Makefile 1.16 + * btcflash/Makefile 1.4 + * scgcheck/Makefile 1.8 + * scgskeleton/Makefile 1.5 + * inc/Makefile 1.2 + * makefiles/RULES/rules.top 1.17 + ./MKLINKS Aufruf neu + +Thu Jul 31 22:39:35 2008 joerg + * mkisofs/diag/MKLINKS 1.1 + date and time created 08/07/31 22:39:35 by joerg + +Thu Jul 31 22:38:39 2008 joerg + * mkisofs/MKLINKS 1.1 + date and time created 08/07/31 22:38:39 by joerg + +Thu Jul 31 22:37:06 2008 joerg + * cdda2wav/MKLINKS 1.1 + date and time created 08/07/31 22:37:06 by joerg + +Thu Jul 31 22:34:47 2008 joerg + * btcflash/MKLINKS 1.1 + date and time created 08/07/31 22:34:47 by joerg + +Thu Jul 31 22:33:30 2008 joerg + * scgcheck/MKLINKS 1.1 + date and time created 08/07/31 22:33:30 by joerg + +Thu Jul 31 22:27:54 2008 joerg + * scgskeleton/MKLINKS 1.1 + date and time created 08/07/31 22:27:54 by joerg + +Thu Jul 31 22:22:10 2008 joerg + * makefiles/RULES/MKLINKS 1.71 + exit nur wenn $# == 0 + +Thu Jul 31 21:59:45 2008 joerg + * makefiles/RULES/MKLINKS 1.70 + exit 0 wenn mk-make.id vorhanden + +Thu Jul 31 21:49:24 2008 joerg + * inc/MKLINKS 1.1 + date and time created 08/07/31 21:49:24 by joerg + +Thu Jul 31 21:47:02 2008 joerg + * makefiles/RULES/local.cnf 1.8 + LCONFIG_DEP neu um Symlink Hook fuer lokaleKonfiguration einhaengen zu koennen + +Thu Jul 31 21:45:56 2008 joerg + * makefiles/RULES/MKLINKS 1.69 + Test auf ln -s Funktionalitaet neu + +Thu Jul 31 21:44:49 2008 joerg + * makefiles/RULES/MKLINKS 1.68 + c4x Kram mit if abgesichert + +Wed Jul 9 23:50:29 2008 joerg + * cdrecord/version.h 1.18 + Version -> 2.01.01a43 + +Wed Jul 9 20:20:22 2008 joerg + * mkisofs/tree.c 1.110 + Komplett leere dirs nicht ueberspringen + -x (matches(...)) nur aufrufen wenn nicht ".". oder ".." + Immer bei readdir am Anfang "." und ".." voranstellen wegen Linux unsortierten Directrories + +Mon Jul 7 18:01:18 2008 joerg + * libscg/scg/Makefile 1.1 + date and time created 08/07/07 18:01:18 by joerg + +Mon Jul 7 18:00:38 2008 joerg + * libscg/scg/srb_os2.mk 1.1 + date and time created 08/07/07 18:00:38 by joerg + +Mon Jul 7 18:00:20 2008 joerg + * libscg/scg/spti-wnt.mk 1.1 + date and time created 08/07/07 18:00:20 by joerg + +Mon Jul 7 18:00:03 2008 joerg + * libscg/scg/scsitransp.mk 1.1 + date and time created 08/07/07 18:00:03 by joerg + +Mon Jul 7 17:59:41 2008 joerg + * libscg/scg/scsisense.mk 1.1 + date and time created 08/07/07 17:59:41 by joerg + +Mon Jul 7 17:59:24 2008 joerg + * libscg/scg/scsireg.mk 1.1 + date and time created 08/07/07 17:59:24 by joerg + +Mon Jul 7 17:59:09 2008 joerg + * libscg/scg/scsidefs.mk 1.1 + date and time created 08/07/07 17:59:09 by joerg + +Mon Jul 7 17:58:54 2008 joerg + * libscg/scg/scsicdb.mk 1.1 + date and time created 08/07/07 17:58:54 by joerg + +Mon Jul 7 17:58:34 2008 joerg + * libscg/scg/scgops.mk 1.1 + date and time created 08/07/07 17:58:34 by joerg + +Mon Jul 7 17:58:20 2008 joerg + * libscg/scg/scgio.mk 1.1 + date and time created 08/07/07 17:58:20 by joerg + +Mon Jul 7 17:58:01 2008 joerg + * libscg/scg/scgcmd.mk 1.1 + date and time created 08/07/07 17:58:01 by joerg + +Mon Jul 7 17:57:45 2008 joerg + * libscg/scg/aspi-win32.mk 1.1 + date and time created 08/07/07 17:57:45 by joerg + +Mon Jul 7 17:55:07 2008 joerg + * libscg/scg/aspi-dos.mk 1.1 + date and time created 08/07/07 17:55:07 by joerg + +Thu Jul 3 12:22:24 2008 joerg + * autoconf/config.guess 1.9 + "x86":"Darwin" neu + +Tue Jun 24 23:03:17 2008 joerg + * cdrecord/version.h 1.17 + Version -> 2.01.01a42 + +Tue Jun 24 22:19:39 2008 joerg + * cdda2wav/Makefile 1.15 + parse.c und parse.h neu + +Tue Jun 24 22:18:20 2008 joerg + * cdda2wav/interface.h 1.21 + Copyright -> 2008 + +Tue Jun 24 22:16:52 2008 joerg + * cdda2wav/global.h 1.20 + interactive neu + +Tue Jun 24 22:16:23 2008 joerg + * cdda2wav/interface.h 1.20 + * cdda2wav/interface.c 1.60 + poll_in() neu + +Tue Jun 24 22:15:43 2008 joerg + * cdda2wav/parse.c 1.1 + date and time created 08/06/24 22:15:43 by joerg + +Tue Jun 24 22:12:37 2008 joerg + * cdda2wav/parse.h 1.1 + date and time created 08/06/24 22:12:37 by joerg + +Sat Jun 21 13:06:26 2008 joerg + * cdda2wav/semshm.c 1.22 + * cdda2wav/cdda2wav.1 1.26 + * cdda2wav/ringbuff.c 1.16 + * cdda2wav/global.h 1.19 + Copyright -> 2008 + +Sat Jun 21 13:03:33 2008 joerg + * cdda2wav/cdda2wav.c 1.88 + * cdda2wav/cdda2wav.1 1.25 + * cdda2wav/global.h 1.18 + * cdda2wav/ringbuff.c 1.15 + Neue Option -no-fork + +Sat Jun 21 13:01:10 2008 joerg + * cdda2wav/semshm.c 1.21 + Semaphore Routinen werden bei global.have_forked == 0 deaktiviert + +Sat Jun 21 12:48:52 2008 joerg + * libedc/edc_ecc.c 1.25 + coveritiy Fox von Heiko fuer Arrayueberlauf in L1 Coder + +Sun Jun 15 14:25:09 2008 joerg + * cdrecord/version.h 1.16 + 2.01.01a41 + +Sat Jun 14 20:59:43 2008 joerg + * cdda2wav/toc.c 1.76 + sa.sin_addr.s_addr + sa.sin_port Zuweisung ohne malloc(): coverity + +Sat Jun 14 12:38:22 2008 joerg + * scgcheck/sense.c 1.7 + Neuen Versuch "illegal field in cdb" zu erkennen erstmal auskommentiert + +Sat Jun 14 12:36:30 2008 joerg + * cdrecord/cue.c 1.34 + * cdrecord/xio.c 1.17 + * cdrecord/fifo.c 1.53 + xmarkpos(vp)/xclose(vp) umstrukturiert um Dereferenzieren von vp (NULL) zu vermeiden: coverity + +Sat Jun 14 12:20:38 2008 joerg + * cdrecord/drv_mmc.c 1.190 + i_to_2_byte(&scmd->cdb.g1_cdb.count[1], cnt); -> i_to_2_byte(&scmd->cdb.cmd_cdb[8], cnt); ....: coverity + +Sat Jun 14 12:17:13 2008 joerg + * cdrecord/scsilog.c 1.21 + i_to_2_byte(&scmd->cdb.g1_cdb.addr[3], pp); -> i_to_2_byte(&scmd->cdb.cmd_cdb[5], pp); in log_sense(): coverity + +Sat Jun 14 12:13:05 2008 joerg + * cdda2wav/toc.c 1.75 + Schreibfehler in Read_MCN_toshiba() ((*sub_ch) != 0 || -> ((*sub_ch) != 0 && :coverity + +Sat Jun 14 12:07:47 2008 joerg + * libschily/libschily-mapvers 1.11 + checkerr.c fstream.c getperm.c neu + +Sat Jun 14 12:05:37 2008 joerg + * libschily/Targets 1.11 + checkerr.c fstream.c getperm.c gettimeofday.c sleep.c neu + +Sat Jun 14 12:00:14 2008 joerg + * libschily/gettimeofday.c 1.1 + date and time created 08/06/14 12:00:14 by joerg + +Sat Jun 14 01:45:40 2008 joerg + * cdda2wav/interface.c 1.59 + Code zur Pruefung von pdev_name != NULL in OpenCdRom() eindeutiger: coverity + +Sat Jun 14 00:32:03 2008 joerg + * libschily/getav0.c 1.20 + * libschily/getfp.c 1.18 + * libschily/format.c 1.43 + * mkisofs/diag/isoinfo.c 1.62 + * mkisofs/diag/dump.c 1.31 + * mkisofs/diag/isodebug.c 1.20 + * mkisofs/scsi.c 1.29 + * btcflash/skel.c 1.15 + * scgskeleton/skel.c 1.12 + * cdrecord/drv_sony.c 1.81 + * cdrecord/drv_philips.c 1.77 + * cdrecord/scsi_cdr.c 1.155 + * btcflash/btcflash.c 1.13 + * mkisofs/mkisofs.c 1.238 + * mkisofs/dvd_file.c 1.8 + * mkisofs/ifo_read.c 1.11 + * mkisofs/multi.c 1.86 + * mkisofs/tree.c 1.109 + * mkisofs/walk.c 1.8 + * mkisofs/match.c 1.27 + * mkisofs/stream.c 1.11 + * mkisofs/apple.c 1.32 + * mkisofs/diag/isodump.c 1.35 + * mkisofs/diag/isovfy.c 1.34 + * libschily/avoffset.c 1.29 + * libschily/getargs.c 2.56 + * libfind/find_list.c 1.22 + * libfind/walk.c 1.33 + * mkisofs/mkisofs.h 1.131 + * libscg/scsi-remote.c 1.25 + Copyright -> 2008 + +Fri Jun 13 23:07:00 2008 joerg + * libparanoia/paranoia.c 1.37 + in i_stage2_each() v nicht dereferenzieren bevor auf v != NULL getestet wurde: coverity + +Fri Jun 13 22:48:10 2008 joerg + * cdrecord/vendor.c 1.1 + date and time created 08/06/13 22:48:10 by joerg + +Fri Jun 13 22:10:54 2008 joerg + * libscg/scsi-remote.c 1.24 + Test auf scgp->local == NULL nun frueher + +Fri Jun 13 21:42:37 2008 joerg + * scgcheck/scgcheck.c 1.13 + scgp neu oeffnen nach scgp2 Test wenn es nicht mehr funktioniert + +Fri Jun 13 21:10:57 2008 joerg + * scgcheck/scgcheck.c 1.12 + -auto Option neu + scg_openerr()/find_drive() neu + chkprint()/chkgetline() neu + Umstellung auf chkprint()/chkgetline() + Statt festem dev=0,6,0 Default, nach erstem CD-ROM suchen + +Fri Jun 13 21:06:09 2008 joerg + * scgcheck/dmaresid.c 1.9 + Umstellung auf chkprint()/chkgetline() + +Fri Jun 13 21:02:44 2008 joerg + * scgcheck/scgcheck.1 1.11 + -auto neu + +Wed Jun 11 01:27:34 2008 joerg + * libsiconv/sic_nls.c 1.7 + fclose(f) im Fehlerfall nicht vergessen: coverity + +Wed Jun 11 01:23:35 2008 joerg + * mkisofs/diag/isovfy.c 1.33 + * btcflash/btcflash.c 1.12 + * mkisofs/dvd_file.c 1.7 + * mkisofs/ifo_read.c 1.10 + * mkisofs/match.c 1.26 + Speicherlecks vermeiden: coverity + +Wed Jun 11 01:20:49 2008 joerg + * mkisofs/apple.c 1.31 + get_hfs_fe_info() so umgestellt, dasz fp immer geschlossen werden kann: coverity + +Sun Jun 8 23:22:57 2008 joerg + * cdrecord/drv_philips.c 1.76 + i_to_4_byte(&scmd->cdb.g1_cdb.addr[3], len); -> i_to_4_byte(&scmd->cdb.cmd_cdb[5], len); in reserve_track_philips(): coverity + +Sun Jun 8 23:20:28 2008 joerg + * cdrecord/drv_sony.c 1.80 + i_to_4_byte(&scmd->cdb.g1_cdb.addr[3], len); -> i_to_4_byte(&scmd->cdb.cmd_cdb[5], len); in reserve_track_sony(): coverity + +Sun Jun 8 23:05:51 2008 joerg + * cdrecord/scsi_cdr.c 1.154 + scsi_load() dp != NULL Test nun vor Dereferenzierung: coverity + +Sun Jun 8 22:56:59 2008 joerg + * cdrecord/scsi_cdr.c 1.153 + i_to_4_byte(&scmd->cdb.g1_cdb.addr[3], size); -> i_to_4_byte(&scmd->cdb.cmd_cdb[5], size); in reserve_tr_rzone(): coverity + +Sun Jun 8 22:15:18 2008 joerg + * mkisofs/mkisofs.c 1.237 + Code von Patrik Ohly repariert, Hinweis von Ben Korvemaker FreeBSD + +Sun Jun 8 13:11:18 2008 joerg + * cdrecord/scsi_cdr.c 1.152 + Null Pointer Dereferenierung bei offp == NULL in read_trackinfo() verhindern: coverity + +Sun Jun 8 13:02:32 2008 joerg + * mkisofs/ifo_read.c 1.9 + Schreibfehler free(ifofile->vtsi_mat) -> free(ifofile->vmgi_mat) coverity + +Thu Jun 5 23:52:52 2008 joerg + * mkisofs/tree.c 1.108 + no_scandir nicht mehr verwenden, delete_directory() Tests auf nicht gefundenes "child" verbessern: coverity + +Thu Jun 5 23:36:28 2008 joerg + * mkisofs/stream.c 1.10 + write_str_file() free(buf) neu gegen Speicherleck: coverity + +Thu Jun 5 23:34:38 2008 joerg + * mkisofs/multi.c 1.85 + merge_remaining_entries() s_entry->name != NULL testen vor strcmp(): coverity + +Thu Jun 5 23:29:19 2008 joerg + * mkisofs/walk.c 1.7 + -debug check auf de == NULL in printf() args: coverity + +Thu Jun 5 23:15:34 2008 joerg + * mkisofs/diag/isodump.c 1.34 + goof mit 0 initialisieren: coverity + +Thu Jun 5 23:13:42 2008 joerg + * libschily/getargs.c 2.55 + fmt[1] erst auswerten nachdem fmt[0] geprüft wurde: coverity + +Thu Jun 5 23:04:11 2008 joerg + * cdrecord/readcd.c 1.98 + end in write_disk() initialisiert: coverity + +Wed Jun 4 23:29:25 2008 joerg + * libscg/scsi-remote.c 1.23 + Klarerer Code in rscsigetstatus(): rscsireadbuf() nicht mit buf == NULL + count == 0 rufen coverity + +Wed Jun 4 23:17:12 2008 joerg + * libscg/scsi-remote.c 1.22 + rscsiversion() testet nun ret auf <= 0 wegen malloc(ret) coverity + +Wed Jun 4 21:41:11 2008 joerg + * mkisofs/name.c 1.34 + tildes wird nicht gebraucht weil #ifdef Eric_code_does_not_work + +Mon May 26 23:07:24 2008 joerg + * mkisofs/mkisofs.8 1.124 + -chrp-boot neu + +Sun May 25 22:07:55 2008 joerg + * cdrecord/version.h 1.15 + Version -> 2.01.01a39 + +Fri May 23 20:18:37 2008 joerg + * mkisofs/multi.c 1.84 + multi-extent Files gehen nun auch mit multi session aus alten Sessions + +Fri May 23 20:17:27 2008 joerg + * mkisofs/tree.c 1.107 + isorec.flags[0] |= ISO_MULTIEXTENT; schon bei multi extent root header setzen + +Fri May 23 20:16:51 2008 joerg + * mkisofs/mkisofs.h 1.130 + dup_directory_entry() nun global + +Sun May 18 14:46:21 2008 joerg + * cdrecord/Makefile 1.44 + vendor.c neu + +Sun May 18 14:21:25 2008 joerg + * mkisofs/mkisofs.c 1.236 + Eltorito hat nichts mit APPLE_HYB zu tun + +Sun May 18 14:05:08 2008 joerg + * autoconf/xconfig.h.in 1.144 + * autoconf/configure.in 1.149 + SIZEOF_FLOAT / SIZEOF_DOUBLE neu + +Thu May 1 18:07:01 2008 joerg + * pkgdefs/CSW/CSWcdrtools/prototype 1.2 + share/man/man1/rscsi.1 neu + +Thu May 1 18:06:17 2008 joerg + * pkgdefs/CSW/CSWcdrtools/pkginfo 1.2 + Version -> 2.01.01a39 + +Thu May 1 18:05:43 2008 joerg + * pkgdefs/CSW/CSWcdrtools/depend 1.2 + CSWpxupgrade neu + +Thu May 1 18:02:42 2008 joerg + * pkgdefs/CSW/CSWpxupgrade/pkginfo 1.2 + Version -> 1.45 + +Thu May 1 17:41:19 2008 joerg + * pkgdefs/CSW/CSWsccs/pkginfo 1.2 + Version -> 1.00.02 und BASEDIR= beseitigt + +Thu May 1 17:38:39 2008 joerg + * pkgdefs/CSW/CSWsccs/Makefile 1.2 + PKG_RELOC=no neu + +Thu May 1 17:36:49 2008 joerg + * pkgdefs/CSW/CSWschilybase/prototype_com 1.2 + siconv neu, libgetopt/libfind/libsiconv/libshedit neu + +Thu May 1 17:34:36 2008 joerg + * pkgdefs/CSW/CSWschilyutils/prototype 1.2 + sh lndir sgrow termcap mountce neu pxupgrade -> CSQpxupgrade + +Thu May 1 16:12:53 2008 joerg + * pkgdefs/CSW/CSWsmake/pkginfo 1.2 + version -> 1.2a42 + +Thu May 1 16:09:52 2008 joerg + * pkgdefs/CSW/CSWstar/pkginfo 1.2 + Version -> 1.5 + +Thu May 1 16:04:22 2008 joerg + * pkgdefs/CSW/CSWved/copyright 1.2 + GPL -> CDDL + +Thu May 1 00:38:28 2008 joerg + * pkgdefs/CSW/CSWpxupgrade/copyright 1.1 + * pkgdefs/CSW/CSWpxupgrade/Makefile 1.1 + * pkgdefs/CSW/CSWpxupgrade/pkginfo 1.1 + * pkgdefs/CSW/CSWpxupgrade/prototype 1.1 + * pkgdefs/CSW/CSWpxupgrade/depend 1.1 + date and time created 08/05/01 00:38:28 by joerg + +Thu May 1 00:32:32 2008 joerg + * mkisofs/mkisofs.c 1.235 + Warnungen fuer zu lange Strings fuer den PVD + +Tue Apr 29 23:53:19 2008 joerg + * pkgdefs/CSW/CSWsccs/prototype_r 1.1 + date and time created 08/04/29 23:53:19 by joerg + +Tue Apr 29 21:33:14 2008 joerg + * makefiles/RULES/rules.csw 1.2 + .$(PKG_RELOC) = .no neu fuer CSWsccs Paket + +Mon Apr 28 00:36:55 2008 joerg + * cdrecord/version.h 1.14 + Version -> 2.01.01a39 + +Sun Apr 27 16:55:04 2008 joerg + * makefiles/RULES/rules.pkg 1.4 + Schreibfehler $$ -> && + +Thu Apr 24 00:14:43 2008 joerg + * mkisofs/mkisofs.c 1.234 + -no-bak wieder eingebaut (war versehentlich geloescht) + get_graft() nun mit glen/nlen Parameter damit wieder etwas vergleichbares zu sizeof (graft_point) wieder funktioniert damit geht dir=from/ wieder + escstrcpy() nun mit tolen Parameter + +Sat Apr 19 18:22:23 2008 joerg + * makefiles/RULES/rules.pkg 1.3 + * makefiles/RULES/sub.htm 1.4 + * makefiles/RULES/rules.mks 1.13 + * makefiles/RULES/rules1.dir 1.14 + * makefiles/RULES/rules.ins 1.18 + || exit 255 beseitigt weil damit make -i nicht mehr nach einem Fehler weiterlaeuft + +Thu Apr 17 00:57:50 2008 joerg + * mkisofs/mkisofs.c 1.233 + Code umgestellt, so dasz die Apple Optionen korrekt sind bevor iconv() geladen wird damit --ethershare nicht zu coredump fuehrt wenn /opt/schily/libschily/siconv fehlt + +Thu Apr 17 00:46:52 2008 joerg + * makefiles/RULES/rules.pkg 1.2 + * makefiles/RULES/rules.ins 1.17 + * makefiles/RULES/rules.mks 1.12 + * makefiles/RULES/sub.htm 1.3 + * makefiles/RULES/rules1.dir 1.13 + Workarounds fuer BASH sh -ce Problem + +Thu Apr 17 00:32:18 2008 joerg + * libfind/find.c 1.74 + numarg bei -size konnte uninitialisiert sein + +Sat Apr 12 23:43:55 2008 joerg + * libfind/find_main.c 1.62 + Copyright -> 2008 + Version -> 1.4 + +Thu Apr 10 19:04:53 2008 joerg + * libfind/find.c 1.73 + find . -size -20k funktioniert nun korrekt + +Sun Apr 6 20:33:33 2008 joerg + * libfind/Targets 1.5 + * libfind/libfind-mapvers 1.9 + cmpdir.c neu + name.c ->idcache.c + +Sun Apr 6 20:26:34 2008 joerg + * rscsi/Makefile 1.6 + Makefile.man neu + +Sun Apr 6 20:07:14 2008 joerg + * mkisofs/walk.c 1.6 + * mkisofs/Makefile 1.33 + * mkisofs/mkisofs.c 1.232 + Umbau auf #include + +Sun Apr 6 19:26:17 2008 joerg + * libfind/idcache.c 1.25 + * include/schily/idcache.h 1.2 + uid_nobody() -> ic_uid_nobody() + +Sun Apr 6 17:08:56 2008 joerg + * include/schily/Makefile 1.9 + * include/schily/Mrel 1.9 + idcache.mk neu + +Sun Apr 6 17:07:24 2008 joerg + * include/schily/idcache.mk 1.1 + date and time created 08/04/06 17:07:24 by joerg + +Sun Apr 6 17:06:40 2008 joerg + * include/schily/idcache.h 1.1 + date and time created 08/04/06 17:06:40 by joerg + +Sun Apr 6 16:57:33 2008 joerg + * libfind/find_list.c 1.21 + Umbau auf schily/idcache.h + +Sun Apr 6 16:38:53 2008 joerg + * libfind/idcache.c 1.24 + ic_ Praefix neu + +Sun Apr 6 15:37:10 2008 joerg + * libfind/find.c 1.72 + nameuid()/namegid() beseitigt + +Sun Apr 6 15:26:45 2008 joerg + * include/schily/Mrel 1.8 + * include/schily/Makefile 1.8 + fetchdir.mk find.mk walk.mk + +Sun Apr 6 15:25:33 2008 joerg + * include/schily/fetchdir.h 1.5 + * include/schily/find.h 1.19 + * include/schily/walk.h 1.24 + von libfind nach include/schily + +Sun Apr 6 15:05:46 2008 joerg + * libfind/walk.c 1.32 + * libfind/find_list.c 1.20 + * libfind/find_main.c 1.61 + * libfind/find.c 1.71 + Umbau auf schily/find.h und schily/walk.h + +Sun Apr 6 14:07:50 2008 joerg + * include/schily/find.mk 1.1 + date and time created 08/04/06 14:07:50 by joerg + +Sun Apr 6 14:07:34 2008 joerg + * include/schily/walk.mk 1.1 + date and time created 08/04/06 14:07:34 by joerg + +Sun Apr 6 13:52:19 2008 joerg + * libfind/walk.c 1.31 + * libfind/fetchdir.c 1.23 + * libfind/cmpdir.c 1.23 + Umbau auf schily/fetchdir.h + +Sun Apr 6 13:17:08 2008 joerg + * libfind/cmpdir.c 1.22 + Aus fetchdir.c ausgegliedert + +Sun Apr 6 13:03:24 2008 joerg + * include/schily/fetchdir.mk 1.1 + date and time created 08/04/06 13:03:24 by joerg + +Sun Apr 6 12:51:28 2008 joerg + * libfind/fetchdir.c 1.22 + sortdir()/cmpdir() beseitigt + +Sun Apr 6 12:50:03 2008 joerg + * libfind/fetchdir.h 1.4 + * include/schily/fetchdir.h 1.4 + sortdir()/cmpdir() neu + +Sun Mar 30 13:25:59 2008 joerg + * rscsi/rscsi.1 1.1 + date and time created 08/03/30 13:25:59 by joerg + +Thu Mar 27 19:58:16 2008 joerg + * autoconf/xconfig.h.in 1.143 + * autoconf/configure.in 1.148 + libgen.h Test neu + +Thu Mar 27 19:56:28 2008 joerg + * libscg/scsi-sun.c 1.89 + Copyright -> 2008 + +Tue Mar 18 20:52:37 2008 joerg + * makefiles/RULES/rules1.top 1.41 + $(SRCROOTSL)incs mit separater Regel ($(SRCROOTSL)incs/Dnull) anlegen damit $(_DCC) nicht immer neu erzeugt wirt wenn $(SRCROOTSL)incs/ neuer wird + +Tue Mar 18 20:52:37 2008 joerg + * libschily/avoffset.c 1.28 + getfp.c nur includieren wenn HAVE_SCANSTACK + +Thu Mar 13 00:34:42 2008 joerg + * makefiles/RULES/rules1.top 1.40 + include $(SRCROOT)/$(RULESDIR)/rules.prg neu und mkdir $(SRCROOTSL)incs bei Bedarf + +Thu Mar 13 00:27:30 2008 joerg + * libscg/scsi-sun.c 1.88 + Der DMA-size Workaround funktionierte nicht in 64 Bit weil defined(__amd64) fehlte + +Tue Feb 26 20:24:30 2008 joerg + * libschily/format.c 1.42 + %j Format repariert (war wohl nie getestet) + +Tue Feb 26 20:23:11 2008 joerg + * mkisofs/tree.c 1.106 + memmove() #define beseitigt weil es schon in mkisofs.h ist + +Tue Feb 26 20:22:49 2008 joerg + * mkisofs/mkisofs.h 1.129 + Schreibfehler bei memmove()/memcpy() Makro beseitigt + +Tue Feb 26 00:53:26 2008 joerg + * cdrecord/drv_bd.c 1.9 + blank_bd() ruft nun blank_simul() + +Tue Feb 26 00:50:57 2008 joerg + * cdrecord/cdr_drv.c 1.44 + blank_simul() padbytes initialisieren + +Sun Feb 24 17:21:07 2008 joerg + * autoconf/xconfig.h.in 1.142 + * autoconf/configure.in 1.147 + getsid()/setsid() neu + +Wed Feb 20 18:52:08 2008 joerg + * autoconf/xconfig.h.in 1.141 + * autoconf/rules.cnf.in 1.17 + * autoconf/aclocal.m4 1.61 + * autoconf/configure.in 1.146 + Diverse Erweiterungen fuer die Bourne Shell Portierung + +Sun Feb 17 14:14:03 2008 joerg + * mkisofs/tree.c 1.105 + "File %s is too large for current mode - ignoring\n" -> "File %s is too large for current mkisofs settings - ignoring\n" + +Sun Feb 17 00:58:07 2008 joerg + * cdrecord/version.h 1.13 + Version -> 2.01.01a38 + +Sun Feb 17 00:49:10 2008 joerg + * libsiconv/sic_nls.c 1.6 + * cdrecord/defaults.c 1.22 + * cdrecord/readcd.c 1.97 + * cdrecord/defaults.h 1.3 + * cdda2wav/cdda2wav.c 1.87 + * libfind/find.c 1.70 + Copyright -> 2008 + +Sat Feb 16 16:38:07 2008 joerg + * cdrecord/drv_dvd.c 1.152 + Backslash am Ende der Zeile in normalen C-Code wird von SunOS-4.x cc nicht akzeptiert + +Sat Feb 16 16:33:52 2008 joerg + * libsiconv/sic_nls.c 1.5 + TAB_SIZE sicher gegen K&R sowie gcc-2.8 machen + +Sat Feb 16 16:32:01 2008 joerg + * include/schily/schily.h 1.69 + fdown Prototyp nicht definieren wenn fdown nicht #defininiert ist (z.B. libshedit) + +Wed Feb 13 20:30:04 2008 joerg + * libfind/find.c 1.69 + -exec + lieferte einen core-dump wenn der letzte string zu genau passte weil site_t size unsigned ist und keinen Pointervergleich in plusexec() ersetzen kann. + +Fri Feb 8 00:43:03 2008 joerg + * libschily/getargs.c 2.54 + Vor dem Aufruf von dosflags() erfolgt nun ein Aufruf mit flags & ~SETARGS um alle Optionen zu pruefen bevor eine falsch gesetzt wird + +Fri Feb 8 00:33:32 2008 joerg + * libschily/getargs.c 2.53 + Unnoetiger zweiter Aufruf von dosflags() am Ende des Formatstrings durch Codeumstellung beseitigt + +Fri Jan 18 00:15:10 2008 joerg + * makefiles/RULES/rules.tpk 1.6 + /tmp/so.$$ -> /tmp/so.$$$$ make escape + +Wed Jan 16 00:13:55 2008 joerg + * mkisofs/diag/isodebug.c 1.19 + * mkisofs/diag/isovfy.c 1.32 + * mkisofs/diag/isodump.c 1.33 + * mkisofs/diag/isoinfo.c 1.61 + * mkisofs/diag/dump.c 1.30 + * mkisofs/scsi.c 1.28 + * cdda2wav/cdda2wav.c 1.86 + * scgskeleton/skel.c 1.11 + * btcflash/skel.c 1.14 + * cdrecord/cdrecord.c 1.362 + * cdrecord/readcd.c 1.96 + * cdrecord/defaults.c 1.21 + * cdrecord/defaults.h 1.2 + cdr_defaults() hat nun auch Support fuer ts= Option + +Wed Jan 16 00:11:28 2008 joerg + * cdrecord/cdrecord.c 1.363 + CDR_FORCESPEED=any funktioniert nun wirklich + +Tue Jan 15 23:00:32 2008 joerg + * cdrecord/cdrecord.dfl 1.6 + CDR_SECURITY= beseitigt + CDR_TRANSFERSIZE= neu + +Fri Jan 11 18:28:49 2008 joerg + * makefiles/RULES/rules.tpk 1.5 + tarpkg0: Target neu + $(MAKEMACS) neu fuer z.B. LINKMODE=dynamic + +Fri Jan 11 18:28:13 2008 joerg + * makefiles/RULES/rules.ins 1.16 + $(SUBINSDIR) und $(SUBINS) neu + +Fri Jan 11 18:25:57 2008 joerg + * libsiconv/libsiconv_p.mk 1.3 + * libdeflt/libdeflt_p.mk 1.3 + * libedc/libedc_p.mk 1.3 + * libedc/libedc_dec_p.mk 1.3 + * libfind/libfind_p.mk 1.4 + * libfile/libfile_p.mk 1.4 + * libhfs_iso/libhfs_p.mk 1.3 + * libparanoia/paranoia_p.mk 1.3 + * libscg/librscg_p.mk 1.4 + * libscg/libscg_p.mk 1.4 + * libschily/libschily_p.mk 1.7 + SUBINSDIR= /profiled neu + +Fri Jan 11 18:21:39 2008 joerg + * libschily/getfp.c 1.17 + * libschily/getav0.c 1.19 + Dummyfunktionen getfp() getmainfp() getavp() mit raisecond() Aufruf wenn nicht HAVE_SCANSTACK + +Sun Jan 6 23:35:59 2008 joerg + * mkisofs/mkisofs.c 1.231 + Schreibfehler unides -> inodes + +Sun Jan 6 19:50:10 2008 joerg + * scgcheck/scgcheck.h 1.2 + chkprint()/chkgetline() neu + +Sun Jan 6 19:42:15 2008 joerg + * scgcheck/sense.c 1.6 + Umbau auf chkprint() und chkgetline() + +Thu Jan 3 17:07:48 2008 joerg + * autoconf/aclocal.m4 1.60 + * autoconf/xconfig.h.in 1.140 + * autoconf/configure.in 1.145 + AC_CHECK_SIZE_TIME_T neu + +Wed Jan 2 18:14:34 2008 joerg + * cdrecord/version.h 1.12 + Version -> 2.01.01a37 + +Wed Jan 2 18:14:20 2008 joerg + * cdrecord/cdrecord.c 1.361 + * cdrecord/drv_bd.c 1.8 + Copyright -> 2008 + +Wed Jan 2 18:13:54 2008 joerg + * cdrecord/cdrecord.h 1.195 + ds_trackp neu in struct diskstatus fuer blank_simul() + +Wed Jan 2 18:13:12 2008 joerg + * cdrecord/drv_dvdplus.c 1.47 + * cdrecord/drv_dvd.c 1.151 + * cdrecord/cdr_drv.c 1.43 + blank_simul() neu + +Wed Jan 2 18:09:35 2008 joerg + * include/schily/Mrel 1.7 + * include/schily/Makefile 1.7 + fstream.mk neu + +Wed Jan 2 18:09:16 2008 joerg + * include/schily/iconv.h 1.4 + HAVE_ICONV/HAVE_ICONV_OPEN/HAVE_ICONV_CLOSE nur definieren wenn dies noch nicht der Fall ist + +Wed Jan 2 18:08:27 2008 joerg + * include/schily/fstream.h 1.14 + stream.h -> schily/fstream.h + +Wed Jan 2 18:06:57 2008 joerg + * libschily/fstream.c 1.24 + stream.c -> fstream.c + +Wed Jan 2 14:27:09 2008 joerg + * autoconf/xconfig.h.in 1.139 + * autoconf/configure.in 1.144 + * autoconf/aclocal.m4 1.59 + AC_HEADER_SYS_SIGLIST_DEF + +Wed Jan 2 12:28:57 2008 joerg + * include/schily/fstream.mk 1.1 + date and time created 08/01/02 12:28:57 by joerg + +Sun Dec 30 18:38:56 2007 joerg + * libschily/fstream.c 1.23 + * include/schily/fstream.h 1.13 + read Funktion nicht mehr als sgetc() Parameter sondern im struct stream + +Thu Dec 27 18:02:23 2007 joerg + * libfind/find.c 1.68 + getperm() -> libschily + +Thu Dec 27 17:37:57 2007 joerg + * libschily/getperm.c 1.2 + GP_IGNX -> GP_XERR + +Thu Dec 27 17:37:20 2007 joerg + * include/schily/schily.h 1.68 + getperm() neu + +Thu Dec 27 16:33:54 2007 joerg + * libschily/getperm.c 1.1 + date and time created 07/12/27 16:33:54 by joerg + +Tue Dec 25 20:18:04 2007 joerg + * include/schily/fstream.h 1.12 + Abgesichert + +Tue Dec 25 20:10:37 2007 joerg + * libschily/fstream.c 1.22 + * include/schily/fstream.h 1.11 + stream.c ist nicht mehr bsh spezifisch + +Mon Dec 24 00:56:23 2007 joerg + * cdrecord/cdrecord.c 1.360 + Zusaetzlicher Aufruf von (*dp->cdr_getdisktype)() und evt. checkdsize() nach blank/format + +Sat Dec 22 15:26:40 2007 joerg + * libfind/find_main.c 1.60 + * include/schily/walk.h 1.23 + * include/schily/find.h 1.18 + * libfind/walk.h 1.23 + * libfind/walk.c 1.30 + * libfind/find.h 1.18 + * libfind/find.c 1.67 + find_main() mit zusaetzlichem "environment" Parameter fuer bsh/fexec PATH + +Sun Dec 16 20:00:07 2007 joerg + * mkisofs/write.c 1.117 + Auch Extent in s_entry->mxroot->isorec.extent setzen damit UDF nei multi extent Files korrekt funktioniert + nach einem Hinweis duch Pav Lucistnik + +Sat Dec 1 20:16:32 2007 joerg + * include/schily/mconfig.h 1.62 + * include/schily/avoffset.h 1.7 + * include/schily/align.h 1.6 + Copyright -> 2007 + +Sat Dec 1 20:11:45 2007 joerg + * makefiles/RULES/r-gmake.tag 1.3 + * makefiles/RULES/r-make.tag 1.3 + * makefiles/RULES/r-smake.tag 1.4 + $(CFILES_TAG) und $(HFILES_TAG) neu + +Tue Nov 27 23:31:57 2007 joerg + * cdrecord/readcd.1 1.29 + -edc-corr neu + +Tue Nov 27 22:49:03 2007 joerg + * libsiconv/sic_nls.c 1.4 + __STDC__ Test neu wegen Problemen mit SCO OpenServer 5 Compiler + +Mon Nov 26 23:28:58 2007 joerg + * libfind/find.c 1.66 + slen -> siye_t passend zu strlen() + +Mon Nov 26 23:25:24 2007 joerg + * libfind/find.c 1.65 + -size versteht nun auch -size -1m + +Thu Nov 22 23:02:38 2007 joerg + * libscg/scg/scgcmd.h 2.25 + _MULTI_DATAMODEL -> defined(_KERNEL) && defined(_MULTI_DATAMODEL) + +Thu Nov 22 20:28:40 2007 joerg + * libscg/scg/scgcmd.h 2.26 + Toter Code beseitigt + +Wed Nov 21 22:11:43 2007 joerg + * libscg/scg/scgcmd.h 2.24 + _MULTI_DATAMODEL neu fuer Solaris x86_64 + #ifdef _KERNEL scsi_status und mehr in scg_status umdefinieren, nur zur Kompilation von scg.c + +Wed Nov 21 22:10:27 2007 joerg + * libscg/scg/scgio.h 2.17 + SCGIOCMD32 fuer Solaris x86_64 neu + +Sun Nov 11 23:33:14 2007 joerg + * cdrecord/cdrecord.1 1.118 + lofi erwaehnen + +Fri Nov 2 20:04:12 2007 joerg + * makefiles/RULES/version 1.4 + Version -> 1.5a05 + +Sun Oct 28 22:18:33 2007 joerg + * include/schily/mconfig.h 1.61 + #define LOCK_SH ... beseitigt + +Wed Oct 24 23:30:41 2007 joerg + * mkisofs/diag/isovfy.c 1.31 + * mkisofs/diag/isoinfo.c 1.60 + * mkisofs/diag/isodump.c 1.32 + * mkisofs/diag/dump.c 1.29 + #ifdef USE_LIBSCHILY beseitigt + +Wed Oct 24 18:28:58 2007 joerg + * conf/Makefile 1.6 + Warnung mit Sun Make verhindern + +Wed Oct 24 18:16:00 2007 joerg + * cdrecord/drv_bd.c 1.7 + Unformatierte BD ist "nur" noch dip->disk_status == DS_EMPTY statt dip->disk_status == DS_EMPTY && dip->disk_type == SES_UNDEF + +Wed Oct 24 18:15:10 2007 joerg + * mkisofs/diag/isoinfo.c 1.59 + list_vd() neu + isoinfo -dJ listet Joliet Volume descriptor + Diverse neue LOCAL Angaben + +Tue Oct 23 15:27:36 2007 joerg + * cdrecord/version.h 1.11 + Version -> 2.01.01a36 + +Sat Oct 20 21:36:28 2007 joerg + * mkisofs/joliet.c 1.54 + assign_joliet_directory_addresses() testet nun nur noch auf INHIBIT_JOLIET_ENTRY und nicht mehr auf INHIBIT_JOLIET_ENTRY|INHIBIT_UDF_ENTRY + +Sat Oct 20 19:58:22 2007 joerg + * mkisofs/write.c 1.116 + Schreibfehler in free_one_directory() beseitigt der einen Coredump verursachte (s_entry->isorec. -> s_entry_d->isorec.) + +Sat Oct 20 19:57:24 2007 joerg + * mkisofs/mkisofs.c 1.230 + Warning: cannot support large files with -hfs Meldung nur noch wenn wirklich Largefiles aktiviert waren + +Sat Oct 20 16:03:18 2007 joerg + * makefiles/RULES/MKLINKS 1.67 + x86_64-linux-suncc* korrigiert + +Sat Oct 20 15:55:05 2007 joerg + * makefiles/RULES/i586-linux-suncc64.rul 1.2 + 64 Bit neu -Sun Jan 11 16:18:48 2004 Joerg Schilling - * scsi-linux-sg.c 1.76 - Kommentar verbessert +Wed Oct 10 21:14:39 2007 joerg + * cdrecord/readcd.1 1.28 + Schreibfehler -Sun Jan 11 14:39:45 2004 Joerg Schilling - * scsi-wnt.c 1.38 - w2kstyle_create() umgestellt und so repariert, dasy kein unzulaessiger Speicherzugriff mehr erfolgt - -Sun Jan 11 14:09:19 2004 Joerg Schilling - * scsi-wnt.c 1.37 - loas_aspi() neu - -Sun Jan 11 13:28:56 2004 Joerg Schilling - * scsi-wnt.c 1.36 - Aenderungen damit cdrecord -scanbus dev=ASPI geht - -Wed Jan 7 00:38:26 2004 Joerg Schilling - * cdrecord.h 1.157 - * scsi_scan.c 1.17 - * scsi-mac-iokit.c 1.6 - * scsi-sun.c 1.80 - * scsi-wnt.c 1.34 - * scsitransp.c 1.89 - * cdrecord.c 1.273 - Copyright -> 2004 +Wed Oct 10 14:49:29 2007 joerg + * makefiles/RULES/MKLINKS 1.66 + ip35-irix-cc*.rul neu + +Sat Oct 6 14:18:10 2007 joerg + * cdrecord/cdrecord.c 1.359 + read buffer header hat nur 3 Byte fuer die Puffergroesse + vorsichtigerer Umgang mit read buffer bei get_dmaspeed() + +Sat Oct 6 13:41:43 2007 joerg + * scgskeleton/doit.c 1.25 + read buffer liefert nur 3 Byte size(int) + +Sat Oct 6 13:33:26 2007 joerg + * libfind/walk.c 1.29 + st_ino ... auf sinnvolle Werte setzen wenn ken stat(2) durchgefuehrt wurde + +Fri Oct 5 00:33:48 2007 joerg + * cdrecord/scsi_mmc.c 1.43 + Format-type bei Format Capacity Liste neu + +Tue Oct 2 14:42:25 2007 joerg + * libscg/scg/scsireg.h 1.33 + Schrteibfehler taype -> Type + +Mon Oct 1 20:16:53 2007 joerg + * cdda2wav/cdda2wav.1 1.24 + .B Makro mit mehr als 6 Paramtern nun mit " + +Sun Sep 30 17:03:46 2007 joerg + * cdrecord/cdrecord.c 1.358 + * scgcheck/scgcheck.c 1.11 + Bessere Formulierung fuer die Namensrechte am Programm + +Sat Sep 22 16:06:18 2007 joerg + * libschily/checkerr.c 1.18 + * libfind/find_main.c 1.59 + * libfind/walk.h 1.22 + * include/schily/walk.h 1.22 + Cstyle + +Fri Sep 21 14:31:42 2007 joerg + * scgcheck/scgcheck.c 1.10 + Schreibfehler scgckeck -> scgcheck + +Fri Sep 21 14:30:58 2007 joerg + * cdda2wav/cdda2wav.1 1.23 + Besserer Text fuer -paranoia + +Fri Sep 21 14:29:59 2007 joerg + * cdda2wav/toc.c 1.74 + Auskommentierter Code mit Acenten und Apostroph fuer CDDB Test neu + +Thu Sep 20 13:02:53 2007 joerg + * cdrecord/drv_dvd.c 1.150 + Loeschen geht nun auch fuer DVD-RW/DL + +Thu Sep 20 13:01:33 2007 joerg + * cdrecord/cdrecord.1 1.117 + * cdrecord/cdrecord.c 1.357 + CDR_FORCESPEED=any hebt alle Speedberenzungen auf + +Sun Sep 16 12:47:08 2007 joerg + * mkisofs/apple_driver.c 1.8 + -> "mac_label.h" + get_???() an mkisofs angepasst + +Tue Sep 11 15:20:28 2007 joerg + * mkisofs/Makefile 1.32 + $(LIB_ACL) -> $(LIB_ACL_TEST) + +Tue Sep 11 14:58:07 2007 joerg + * autoconf/configure.in 1.143 + * autoconf/rules.cnf.in 1.16 + Besserer Kommentar fuer LIB_ACL / LIB_ACL_TEXT + +Mon Sep 10 15:20:46 2007 joerg + * cdda2wav/interface.c 1.58 + Linux Hilfe von dev=ATA:1,0,0 -> dev=1,0,0 + +Mon Sep 10 15:19:57 2007 joerg + * cdda2wav/interface.c 1.57 + * cdda2wav/global.h 1.17 + * cdda2wav/toc.c 1.73 + * cdda2wav/cdda2wav.c 1.85 + * cdda2wav/cdda2wav.1 1.22 + * cdda2wav/cd_text.c 1.8 + * cdda2wav/cd_extra.c 1.14 + out-fd=# und audio-fd=# neu + +Sun Sep 9 13:47:12 2007 joerg + * autoconf/xconfig.h.in 1.138 + * autoconf/configure.in 1.142 + HAVE_SIGNAL neu + +Sun Sep 9 13:43:27 2007 joerg + * autoconf/xconfig.h.in 1.137 + * autoconf/configure.in 1.141 + HAVE_KILL neu + +Mon Sep 3 00:29:56 2007 joerg + * cdrecord/version.h 1.10 + Version -> 2.01.01a35 + +Mon Sep 3 00:25:12 2007 joerg + * libschily/checkerr.c 1.17 + errflags() versucht nicht mehr den String Paramerer zu modifizieren (GCC Core dump) + +Sun Sep 2 20:37:13 2007 joerg + * cdrecord/cdrecord.c 1.356 + Bessere Codestruktur fuer DVD Erkennung + +Sun Sep 2 20:21:15 2007 joerg + * cdda2wav/cdda2wav.1 1.21 + Neue Option -start-sector + Fehlende alte Optionen ergänzt + paraopts= erklaert + Paranoia Statistiken erklaert + +Sun Sep 2 16:32:43 2007 joerg + * cdda2wav/cdda2wav.c 1.84 + -start-sector neu + +Sun Sep 2 15:00:39 2007 joerg + * libparanoia/p_block.c 1.25 + paranoia_dynoverlapset() setzt nun auch p->dynoverlap auf sinvollen Startwert + +Sat Sep 1 14:09:47 2007 joerg + * cdrecord/scsi_mmc.c 1.42 + * cdrecord/scsi_cdr.c 1.151 + * cdrecord/readcd.c 1.95 + * cdrecord/drv_dvd.c 1.149 + Cstyle + +Sat Sep 1 14:02:49 2007 joerg + * cdda2wav/cdda2wav.c 1.83 + Trailing Space beseitigt + +Sat Sep 1 14:00:41 2007 joerg + * cdda2wav/global.h 1.16 + Trailing Blank beseitigt + +Tue Aug 21 15:21:30 2007 joerg + * autoconf/xconfig.h.in 1.136 + * autoconf/configure.in 1.140 + realpath() / resolvepath() neu + +Mon Aug 20 18:43:36 2007 joerg + * cdrecord/version.h 1.9 + Version -> 2.01.01a34 + +Mon Aug 20 18:35:48 2007 joerg + * mkisofs/write.c 1.115 + free_one_directory() free()d s_entry_d->hfs_ent nur noch wenn (s_entry->isorec.flags[0] & ISO_MULTIEXTENT) == 0, siehe dup_directory_entry() + +Mon Aug 20 18:34:53 2007 joerg + * mkisofs/tree.c 1.104 + Umbau auf dup_directory_entry() damit alle allozierten Member von struct directory_entry * neu alloziert werden und kein Double Free in free_one_directory() erfolgt + +Mon Aug 20 18:20:48 2007 joerg + * mkisofs/tree.c 1.103 + * mkisofs/apple.c 1.30 + * mkisofs/multi.c 1.83 + * mkisofs/write.c 1.114 + * mkisofs/eltorito.c 1.43 + * mkisofs/dvd_reader.c 1.7 + * mkisofs/files.c 1.16 + strdup() -> e_strdup() + +Mon Aug 20 18:18:06 2007 joerg + * mkisofs/mkisofs.c 1.229 + * mkisofs/mkisofs.h 1.128 + e_strdup() neu + +Sun Aug 19 13:24:41 2007 joerg + * cdda2wav/toc.c 1.72 + stelen() +1 als len fuer realloc() statt strlen() -1 + +Mon Aug 13 00:07:31 2007 joerg + * mkisofs/mkisofs.c 1.228 + warn_violate nur noch bei iso9660_level < 4 + +Sun Aug 12 22:48:21 2007 joerg + * cdrecord/version.h 1.8 + Version -> 2.01.01a33 + +Sun Aug 12 22:45:38 2007 joerg + * cdrecord/readcd.c 1.94 + Auskommentierter Code beseitigt + +Sun Aug 12 22:27:17 2007 joerg + * cdrecord/readcd.c 1.93 + * cdrecord/readcd.1 1.27 + -pi8scan, -pifscan, -plot neu + +Fri Aug 10 00:09:59 2007 joerg + * cdrecord/cdrecord.c 1.355 + * cdrecord/cdrecord.h 1.194 + TI_DVD -> TI_NOCD + +Thu Aug 9 01:28:40 2007 joerg + * cdrecord/cdrecord.c 1.354 + * cdrecord/cdrecord.h 1.193 + * cdrecord/drv_bd.c 1.6 + * cdrecord/drv_simul.c 1.57 + * cdrecord/drv_dvdplus.c 1.46 + * cdrecord/drv_dvd.c 1.148 + DSF_NOCD / CDR2_NOCD / CDR2_BD neu + DST_BD_* neu + +Thu Aug 9 01:26:01 2007 joerg + * cdrecord/scsi_mmc.c 1.41 + get_secsps() liefert per Default 75.0 + +Thu Aug 9 00:59:51 2007 joerg + * cdrecord/cdrecord.c 1.353 + Neuer Text fuer cdrecord/LIMITATIONS + +Thu Aug 9 00:35:56 2007 joerg + * cdrecord/scsi_mmc.c 1.40 + get_secsps() neu + +Tue Aug 7 18:45:02 2007 joerg + * cdrecord/cdrecord.copyright 1.1 + date and time created 07/08/07 18:45:02 by joerg + +Tue Aug 7 17:22:30 2007 joerg + * cdrecord/LIMITATIONS 1.2 + Kleinere Verbesserungen und Schreibfehler + +Tue Aug 7 01:13:25 2007 joerg + * cdrecord/drv_sony.c 1.79 + * cdrecord/drv_philips.c 1.75 + * cdrecord/cdrecord.h 1.192 + * cdrecord/drv_simul.c 1.56 + * cdrecord/drv_7501.c 1.24 + * cdrecord/drv_bd.c 1.5 + * cdrecord/drv_dvdplus.c 1.45 + * cdrecord/drv_jvc.c 1.90 + * cdrecord/drv_dvd.c 1.147 + * cdrecord/drv_mmc.c 1.189 + cdr_cmdflags2 neu + +Mon Aug 6 23:10:57 2007 joerg + * cdrecord/drv_sony.c 1.78 + * cdrecord/drv_simul.c 1.55 + * cdrecord/drv_mmc.c 1.188 + * cdrecord/drv_philips.c 1.74 + * cdrecord/cdrecord.h 1.191 + * cdrecord/drv_dvdplus.c 1.44 + * cdrecord/drv_jvc.c 1.89 + * cdrecord/drv_7501.c 1.23 + * cdrecord/drv_bd.c 1.4 + * cdrecord/drv_dvd.c 1.146 + cdr_flags2 neu + +Mon Aug 6 01:00:55 2007 joerg + * cdrecord/wm_packet.c 1.27 + DSF_BD neu + +Mon Aug 6 00:01:38 2007 joerg + * cdrecord/drv_simul.c 1.54 + * cdrecord/cdr_drv.c 1.42 + cdr_bd_simul neu + +Sun Aug 5 23:47:20 2007 joerg + * cdrecord/cdrecord.c 1.352 + secs/s von 2247.75 -> 2195.07 weil 4495 sich auf 1000 Bytes/s bezieht + +Sat Aug 4 12:34:23 2007 joerg + * cdrecord/drv_mmc.c 1.187 + driveropts=plexdisable neu + +Sat Aug 4 11:51:00 2007 joerg + * cdrecord/readcd.c 1.92 + * cdrecord/readcd.1 1.26 + -cxscan neu + +Sat Aug 4 00:53:37 2007 joerg + * cdrecord/cdrecord.c 1.351 + #ifdef DRV_DVD an einigen fehlenden Stellen + +Sat Aug 4 00:49:54 2007 joerg + * cdrecord/cdrecord.h 1.190 + Schreibfehler get__mclassname -> get_mclassname + +Sat Aug 4 00:49:15 2007 joerg + * cdrecord/scsi_mmc.c 1.39 + #ifdef DRV_DVD neu + +Fri Aug 3 23:27:35 2007 joerg + * cdrecord/cdrecord.1 1.116 + Gigarec nun auch mit 0.9 / 1.1 + +Fri Aug 3 23:25:52 2007 joerg + * cdrecord/drv_mmc.c 1.186 + Der Plextor Premium 2 kann auch Yamaha Audiomaster + Support fuer Dummy Authentifizierung fuer Plextor + +Thu Aug 2 00:47:04 2007 joerg + * cdrecord/drv_mmc.c 1.185 + Plextor Gigarec Werte 1.1 und 0.9 neu + +Wed Aug 1 18:18:17 2007 joerg + * mkisofs/tree.c 1.102 + Fuer Sun Kompiler #ifdef PROTOTYPES um LARGE_EXTENT und doch UL Suffix + +Mon Jul 30 23:24:24 2007 joerg + * mkisofs/tree.c 1.101 + (off_t) cast fuer LARGE_EXTENT / MAX_EXTENT + +Mon Jul 30 20:47:38 2007 joerg + * mkisofs/mkisofs.c 1.227 + * mkisofs/mkisofs.h 1.127 + * mkisofs/tree.c 1.100 + off_t maxnonlarge = (off_t)0xFFFFFFFF; neu + +Mon Jul 30 20:46:46 2007 joerg + * cdrecord/COPYING 1.2 + Verbesserter Lizenzerklaerungstext + +Mon Jul 30 09:47:52 2007 joerg + * mkisofs/tree.c 1.99 + Schleife mir s_e && s_e->mxroot statt s_e->mxroot gesichert + +Mon Jul 30 01:32:09 2007 joerg + * mkisofs/write.c 1.113 + Korrekt mit #ifdef USE_LARGEFILES klammern + +Mon Jul 30 00:34:43 2007 joerg + * cdrecord/version.h 1.7 + Verion -> 2.01.01a32 + +Mon Jul 30 00:33:21 2007 joerg + * mkisofs/diag/isoinfo.c 1.58 + Support fuer multi-extent files neu + Copyright Meldung bei -version + +Mon Jul 30 00:31:29 2007 joerg + * mkisofs/mkisofs.h 1.126 + mxoff beseitigt weil nicht mehr noetig + +Mon Jul 30 00:31:06 2007 joerg + * mkisofs/mkisofs.8 1.123 + Multi-extent mit -iso-level 3 oder mehr + +Mon Jul 30 00:27:52 2007 joerg + * mkisofs/tree.c 1.98 + * mkisofs/write.c 1.112 + Multi-extent Suport fuer ISO-9660 + +Mon Jul 30 00:27:08 2007 joerg + * mkisofs/udf.c 1.30 + Sicherstellen, dass der Directory Entry nicht mehr als 2048 Bytes hat bei large files + +Sun Jul 29 16:31:32 2007 joerg + * mkisofs/joliet.c 1.53 + Support fuer das Sortieren von Multi-Extent Files + Trennen von Joliet und UDF namen in Directories + +Sat Jul 28 21:48:14 2007 joerg + * mkisofs/mkisofs.h 1.125 + * mkisofs/mkisofs.c 1.226 + do_largefiles neu + +Sat Jul 28 21:12:38 2007 joerg + * cdda2wav/mycdrom.h 1.14 + #define scsi_capacity __scsi_capacity__ vor #include wegen falscher Struct Definition + +Sat Jul 28 20:56:32 2007 joerg + * include/schily/mconfig.h 1.60 + #undef USE_LARGEFILES wenn HAVE_LARGEFILES nicht definiert ist + +Sat Jul 28 17:16:35 2007 joerg + * libedc/edc_ecc_dec.c 1.5 + #ifndef HAVE_MEMMOVE neu + +Sat Jul 28 16:39:32 2007 joerg + * cdda2wav/resample.c 1.24 + Gnuplot code nun zusaetzlich mut /* */ geschuetzt fuer K&R CPP + +Sat Jul 28 16:26:36 2007 joerg + * btcflash/btcflash.c 1.11 + UMbau fuer K&R + +Sat Jul 28 15:21:35 2007 joerg + * libsiconv/sic_nls.c 1.3 + #if TABS_SIZE < 256 Test fuer K&R deaktivieren + +Sat Jul 28 15:01:57 2007 joerg + * libparanoia/p_block.c 1.24 + * libparanoia/cdda_paranoia.h 1.24 + Parameterfunktionen in paranoia_init nun sauber int (*name)() statt int name() + +Thu Jul 26 23:18:11 2007 joerg + * mkisofs/eltorito.c 1.42 + Joliet & UDF getrennt + +Thu Jul 26 18:36:52 2007 joerg + * mkisofs/scsi.c 1.27 + Copyright -> 2007 + +Thu Jul 26 18:35:14 2007 joerg + * mkisofs/diag/dump.c 1.28 + * mkisofs/diag/isodump.c 1.31 + * mkisofs/diag/isovfy.c 1.30 + * mkisofs/diag/isodebug.c 1.18 + * mkisofs/mkisofs.c 1.225 + * cdda2wav/cdda2wav.c 1.82 + Copyright bei -version neu + +Thu Jul 26 01:01:49 2007 joerg + * mkisofs/mkisofs.h 1.124 + Erweiterungen fer Multi-Extent + +Thu Jul 26 00:56:32 2007 joerg + * mkisofs/mac_label.c 1.13 + * mkisofs/volume.c 1.21 + * mkisofs/name.c 1.33 + * mkisofs/apple.c 1.29 + * mkisofs/iso9660.h 1.21 + * mkisofs/match.c 1.25 + * mkisofs/match.h 1.14 + Copyright -> 2007 + +Thu Jul 26 00:48:02 2007 joerg + * mkisofs/multi.c 1.82 + * mkisofs/match.c 1.24 + * mkisofs/match.h 1.13 + * mkisofs/eltorito.c 1.41 + * mkisofs/mkisofs.c 1.224 + * mkisofs/mkisofs.8 1.122 + -hide-udf & -hide-udf-list neu + +Thu Jul 26 00:38:11 2007 joerg + * mkisofs/iso9660.h 1.20 + ISO Directory flags -> unsigned char fuer Multi-Extent + +Thu Jul 26 00:28:28 2007 joerg + * mkisofs/udf.c 1.29 + INHIBIT_JOLIET_ENTRY -> INHIBIT_UDF_ENTRY + +Tue Jul 24 22:04:00 2007 joerg + * mkisofs/eltorito.c 1.40 + static -> LOCAL + +Tue Jul 24 22:03:33 2007 joerg + * mkisofs/udf.c 1.28 + Schreibfehler im Kommentar + +Mon Jul 23 21:02:12 2007 joerg + * mkisofs/joliet.c 1.52 + -no-limit-pathtables nun auch fuer Joliet + +Mon Jul 23 20:09:08 2007 joerg + * mkisofs/joliet.c 1.51 + * mkisofs/apple.c 1.28 + static -> LOCAL + +Thu Jul 19 10:35:40 2007 joerg + * cdrecord/version.h 1.6 + Version -> 2.01.01a31 + +Sun Jul 15 23:25:11 2007 joerg + * libschily/checkerr.c 1.16 + Erster vorsichtiger Umbau auf generelle Nutzbarkeit + extern BOOL cflag; / extern BOOL errflag; / extern int intr; beseitigt + +Sun Jul 15 23:01:29 2007 joerg + * mkisofs/inode.c 1.8 + Versuch s_entry->starting_block == 0 zu erkennen wenn es eigentlich gesetzt sein sollte. + +Sun Jul 15 22:53:54 2007 joerg + * mkisofs/mkisofs.c 1.223 + * mkisofs/mkisofs.8 1.121 + errctl= neu + +Sun Jul 15 22:33:20 2007 joerg + * mkisofs/write.c 1.111 + Erster Versuch errctl= zu unterstuetzen + Vergessenes s_entry->starting_block = s_hash->starting_block; bewirkte '.'/'..' teilweise ohne RR-1.12 Inode Nummer + +Sat Jul 14 14:28:56 2007 joerg + * include/schily/checkerr.h 1.9 + Umbau auf include schily/checkerr.h + +Sat Jul 14 14:28:16 2007 joerg + * include/schily/Makefile 1.6 + * include/schily/Mrel 1.6 + checkerr.mk neu + +Sat Jul 14 14:26:55 2007 joerg + * include/schily/checkerr.mk 1.1 + date and time created 07/07/14 14:26:55 by joerg + +Fri Jul 13 10:03:12 2007 joerg + * mkisofs/write.c 1.110 + Wenn die Pathable ueberlaeuft auf jeden Fall eine Warnung ausgeben + +Thu Jul 12 23:40:49 2007 joerg + * mkisofs/write.c 1.109 + * mkisofs/mkisofs.c 1.222 + * mkisofs/mkisofs.8 1.120 + * mkisofs/mkisofs.h 1.123 + -no-limit-pathtables neu + +Thu Jul 12 09:04:53 2007 joerg + * cdrecord/scsi_scan.c 1.30 + Vergessene Stelle zur Korrektur amt == -1 -> ++ -> +1 repariert + +Thu Jul 12 01:30:27 2007 joerg + * cdrecord/scsi_mmc.c 1.38 + Neue Funktionen get_mediatype()/get_singlespeed()/get__mclassname() + Neue Funktion print_performance_mmc() + scsi_get_perf_maxspeed()/scsi_get_perf_curspeed() fuer print_performance_mmc() ueberarbeitet + prdiskstatus() gibt nun Media class und Media type aus + +Wed Jul 11 15:25:18 2007 joerg + * cdrecord/cdrecord.h 1.189 + print_performance_mmc()/get_mediatype()/get_singlespeed()/get__mclassname() neu + +Wed Jul 11 15:24:33 2007 joerg + * cdrecord/cdrecord.c 1.350 + print_performance_mmc() bei -prcap neu + +Tue Jul 10 05:58:54 2007 joerg + * autoconf/configure.in 1.139 + * autoconf/xconfig.h.in 1.135 + nl_types.h setlocale() localeconv() nl_langinfo() neu + +Tue Jul 10 00:04:36 2007 joerg + * mkisofs/mkisofs.c 1.221 + * mkisofs/mkisofs.8 1.119 + * mkisofs/Makefile 1.31 + Automatische -input-charset Einstellung mit Hilfe von nl_langinfo(CODESET) + +Sun Jul 8 21:04:35 2007 joerg + * cdrecord/version.h 1.5 + Version -> 2.01.01a30 + +Sun Jul 8 20:50:29 2007 joerg + * cdrecord/drv_mmc.c 1.184 + HD-DVD Profile vorbereitet + +Sun Jul 8 20:50:04 2007 joerg + * cdrecord/scsi_mmc.c 1.37 + Diverse neue Profile aus MMC-6 + +Sun Jul 8 20:49:37 2007 joerg + * cdrecord/drv_bd.c 1.3 + Error Message & Return 0 bei unbekanntem Blu Ray Profil + +Sun Jul 8 20:37:18 2007 joerg + * cdrecord/scsi_cdr.c 1.150 + Vergessenes mt=1 aus read_dvd_structure() beseitigt + +Sun Jul 8 20:32:45 2007 joerg + * cdrecord/drv_bd.c 1.2 + Layerbreak Code von DVD+ beseitigt + print_bd_info() neu + +Sat Jul 7 21:37:42 2007 joerg + * cdrecord/cdrecord.c 1.349 + linuxcheck() ist nun hinter errno == EPERM bei rezero_unit() + +Sat Jul 7 18:04:17 2007 joerg + * mkisofs/scsi.c 1.26 + Ueberzaehliges scgp->silent-- beseitigt + +Sat Jul 7 17:52:36 2007 joerg + * cdrecord/scsi_cdr.c 1.149 + * cdrecord/readcd.c 1.91 + * btcflash/skel.c 1.13 + * scgskeleton/skel.c 1.10 + * cdda2wav/interface.c 1.56 + * cdrecord/cdrecord.c 1.348 + Bessere Behandlung von Zugriffsrechteproblemen auf SCSI besonders wenn bei Solaris 11 und hald das open(2) klappt + +Sat Jul 7 15:14:03 2007 joerg + * cdrecord/scsi_scan.c 1.29 + Return aus Schleife wenn errno == EPERM || errno == EACCES + +Sat Jul 7 14:56:40 2007 joerg + * libscg/scsi-sun.c 1.87 + scg_send() return -1 bei EPERM nach Umbau auf hald + +Sat Jul 7 14:55:33 2007 joerg + * libscg/scsitransp.c 1.96 + SCGF_PERM_EXIT neu + kein exit() mehr bei Rechteproblemen mit "Cannot send SCSI cmd via ioctl" + +Sat Jul 7 14:53:11 2007 joerg + * libscg/scg/scsitransp.h 1.56 + SCGF_PERM_EXIT neu + +Fri Jul 6 13:01:15 2007 joerg + * libfind/find.c 1.64 + avoid them in portable scripts neu + +Thu Jul 5 00:11:38 2007 joerg + * cdrecord/scsi_mmc.c 1.36 + Neue Profil Namen aus MMC-6 + +Wed Jul 4 23:07:00 2007 joerg + * cdrecord/cdrecord.c 1.347 + cdrecord -pad cue=file wirkt nun wie es die Leute erwarten + +Wed Jul 4 01:06:13 2007 joerg + * cdrecord/readcd.c 1.90 + read_dvd_structure() mit neuem mt Parameter + is_bd und Speedumrechnung fuer -factor neu fuer BD + +Wed Jul 4 00:44:30 2007 joerg + * cdrecord/scsi_scan.c 1.28 + * cdrecord/scsi_cdr.c 1.148 + * cdrecord/cdr_drv.c 1.41 + * cdrecord/readcd.c 1.89 + * cdrecord/cdrecord.h 1.188 + * cdrecord/Makefile 1.43 + Copyright -> 2007 + +Wed Jul 4 00:35:32 2007 joerg + * cdrecord/drv_bd.c 1.1 + date and time created 07/07/04 00:35:32 by joerg + +Wed Jul 4 00:35:16 2007 joerg + * cdrecord/version.h 1.4 + Version -> 2.01.01a29 + +Wed Jul 4 00:26:32 2007 joerg + * cdrecord/cdrecord.c 1.346 + Erste BD Anpassungen + +Wed Jul 4 00:25:17 2007 joerg + * cdrecord/drv_dvdplus.c 1.43 + -dummy auch bei DVD+R verbieten + +Wed Jul 4 00:19:15 2007 joerg + * cdrecord/cdrecord.h 1.187 + read_dvd_structure() mit neuem mt Parameter + Neue Definitionen DSF_BD DSF_BD_RE CDR_BD + +Wed Jul 4 00:18:32 2007 joerg + * cdrecord/drv_mmc.c 1.183 + * cdrecord/drv_dvdplus.c 1.42 + * cdrecord/drv_dvd.c 1.145 + * cdrecord/scsi_cdr.c 1.147 + read_dvd_structure() mit neuem mt Parameter + +Tue Jul 3 23:05:55 2007 joerg + * cdrecord/readcd.c 1.88 + BD Erweiterungen neu + +Tue Jul 3 23:01:39 2007 joerg + * cdrecord/Makefile 1.42 + -DDVD_MULTI -DDRV_BD drv_bd.c neu + +Tue Jul 3 23:01:14 2007 joerg + * cdrecord/drv_mmc.c 1.182 + BD Erweiterungen + +Tue Jul 3 22:49:53 2007 joerg + * cdrecord/cdr_drv.c 1.40 + DRV_BD neu + +Tue Jul 3 22:48:58 2007 joerg + * cdrecord/scsi_cdr.c 1.146 + BD Speed neu + +Tue Jul 3 00:01:04 2007 joerg + * libschily/getargs.c 2.52 + DEBUG print in _getargs() sicher gegen **pav == NULL gemacht + Neu eingebauter Fehler in dofile() beseitigt, der GAF_NO_PLUS & GAF_NEED_DASH falsch behandelt hat + +Mon Jul 2 23:07:39 2007 joerg + * cdrecord/cdrecord.c 1.345 + DVD -multi Code neu + +Mon Jul 2 00:39:16 2007 joerg + * cdrecord/cdrecord.c 1.344 + Anpassungen an getargs() Return FLAGDELIM + +Mon Jul 2 00:32:54 2007 joerg + * include/schily/getargs.h 1.18 + Neues Flag GAF_DELIM_DASHDASH stoppt auch getlallargs()/getvallargs() bei "--" + +Mon Jul 2 00:32:34 2007 joerg + * libschily/getargs.c 2.51 + return FLAGDELIM bei "--" neu + Neues Flag GAF_DELIM_DASHDASH stoppt auch getlallargs()/getvallargs() bei "--" + +Sun Jul 1 15:09:39 2007 joerg + * cdda2wav/cdda2wav.1 1.20 + Bold/Italic korrigiert + +Sun Jul 1 14:57:23 2007 joerg + * libschily/getargs.c 2.50 + * include/schily/getargs.h 1.17 + getlargs()/getlallargs()/getlfiles() neu + struct ga_props & getarginit() neu + GAF_* Flags fuer struct ga_props neu + +Sun Jul 1 14:52:19 2007 joerg + * libfind/find.c 1.63 + * libfind/find_main.c 1.58 + Kommentar erklaert warum wir den returncode von getargs() nicht auswerten + +Sun Jul 1 13:57:58 2007 joerg + * include/schily/archdefs.h 1.6 + * include/schily/xconfig.h 1.6 + * include/schily/align.h 1.5 + * include/schily/avoffset.h 1.6 + Statischer HP_UX Support neu + +Sun Jul 1 13:12:51 2007 joerg + * mkisofs/mkisofs.c 1.220 + getvargs(&cac, &cav, flags, NULL) -> getvargs(&cac, &cav, flags, GA_NO_PROPS) + +Sun Jul 1 12:04:35 2007 joerg + * libschily/fexec.c 1.32 + fdcopy(fin, STDIN_FILENO); close(fin); -> fdmove(fin, STDIN_FILENO); + +Sun Jul 1 11:44:32 2007 joerg + * libschily/fexec.c 1.31 + Copyright -> 2007 + +Sun Jul 1 11:38:54 2007 joerg + * libschily/snprintf.c 1.12 + * libschily/shlschily.mk 1.7 + * libschily/libschily_p.mk 1.6 + * libschily/libschily.mk 1.5 + Bessere Kommentierung fuer -DPORT_ONLY + +Sat Jun 30 22:46:19 2007 joerg + * libschily/getargs.c 2.49 + void * -> struct ga_props * + +Sat Jun 30 13:13:34 2007 joerg + * libfind/libfind_p.mk 1.3 + * libsiconv/libsiconv_p.mk 1.2 + * libscg/librscg_p.mk 1.3 + * libscg/libscg_p.mk 1.3 + * libfile/libfile_p.mk 1.3 + * libedc/libedc_dec_p.mk 1.2 + * libhfs_iso/libhfs_p.mk 1.2 + * libedc/libedc_p.mk 1.2 + * libparanoia/paranoia_p.mk 1.2 + * libdeflt/libdeflt_p.mk 1.2 + * libschily/libschily_p.mk 1.5 + TARGETLIB= *_p > TARGETLIB= * + +Fri Jun 29 23:28:56 2007 joerg + * mkisofs/mkisofs.c 1.219 + {{"new-dir-mode", &dir_mode_str }, -> {{"new-dir-mode*", &dir_mode_str }, Coredump vermeiden + +Fri Jun 29 22:28:25 2007 joerg + * cdrecord/cdrecord.1 1.115 + Copyright -> 2007 + +Fri Jun 29 22:21:35 2007 joerg + * mkisofs/diag/isoinfo.8 1.8 + * mkisofs/mkisofs.8 1.118 + * cdrecord/cdrecord.1 1.114 + it's -> its wo noetig + +Wed Jun 27 14:22:59 2007 joerg + * mkisofs/diag/isoinfo.c 1.57 + * mkisofs/diag/isoinfo.mk 1.10 + Korrektes libsiconv Handling + +Wed Jun 27 14:14:07 2007 joerg + * makefiles/RULES/rules.hlp 1.14 + Vergessenes '"' am Ende der "html"/"htmlx" Hilfe angefuegt + +Wed Jun 27 14:05:48 2007 joerg + * include/schily/iconv.h 1.3 + defined(libiconv) -> defined(iconv) fuer Cygwin, weil dort #define iconv libiconv steht + +Tue Jun 26 18:26:41 2007 joerg + * cdda2wav/interface.c 1.55 + * cdda2wav/ioctl.c 1.33 + Casts fuer Sun Studio 12 statt funktionspointer = NULL + +Tue Jun 26 00:24:22 2007 joerg + * mkisofs/Makefile 1.30 + -DINS_BASE=\"${INS_BASE}\" neu + +Tue Jun 26 00:24:09 2007 joerg + * mkisofs/mkisofs.c 1.218 + list_locales() neu + Ein Versuch Coredumps zu vermeiden wenn /opt/schily/libschily/siconv/ fehlt oder unvollstaendig ist + +Mon Jun 25 23:53:41 2007 joerg + * libsiconv/sic_nls.c 1.2 + sic_list() void -> int + sic_open() returniert nun NULL wenn das "charset" Argument NULL ist + +Mon Jun 25 23:52:18 2007 joerg + * include/schily/siconv.h 1.2 + sic_list() void -> int + +Mon Jun 25 00:36:19 2007 joerg + * cdrecord/version.h 1.3 + Version -> 2.01.01a28 + +Mon Jun 25 00:20:51 2007 joerg + * include/schily/align.h 1.4 + * include/schily/avoffset.h 1.5 + Support fuer statische Include Files neu + +Mon Jun 25 00:18:13 2007 joerg + * mkisofs/mkisofs.8 1.117 + Neue Optionen -UDF -no-udf-symlinks -no-hfs + +Mon Jun 25 00:17:34 2007 joerg + * mkisofs/mkisofs.c 1.217 + bei -dvd-video ohne -UDF wird -udf angenommen + +Mon Jun 25 00:13:57 2007 joerg + * mkisofs/udf.c 1.27 + Umstellung auf __PR(()) Prototypen + +Sun Jun 24 23:41:07 2007 joerg + * mkisofs/udf.c 1.26 + Ungenutztes rr_attributes Argument beseitigt + +Sun Jun 24 23:35:16 2007 joerg + * mkisofs/udf.c 1.25 + Korrekturen fuer K&R C + +Sun Jun 24 23:27:14 2007 joerg + * mkisofs/inode.c 1.7 + Symlinkbehandlung fuer UDF korrigiert + +Sun Jun 24 18:20:56 2007 joerg + * mkisofs/udf.c 1.24 + Helios Erweiterungen 2. Teil + Neue Funktion udf_get_symlinkcontents() + +Sun Jun 24 17:20:25 2007 joerg + * mkisofs/udf.c 1.23 + Helios Erweiterungen (erste Haelfte, damit die Aenderungen besser erkennbar werden) + +Sun Jun 24 17:15:27 2007 joerg + * mkisofs/udf_fs.h 1.3 + * mkisofs/tree.c 1.97 + * mkisofs/write.c 1.108 + * mkisofs/mkisofs.h 1.122 + * mkisofs/apple.c 1.27 + Helios Erweiterungen + +Sun Jun 24 16:55:41 2007 joerg + * mkisofs/rock.c 1.54 + * mkisofs/joliet.c 1.50 + Cstyle + +Sun Jun 24 16:49:13 2007 joerg + * mkisofs/inode.c 1.6 + Keine Link Count Behandlung fuer Resource Forks + Nach UDF Symlink-support -> NEU: Symlinks koennen size != 0 haben + +Sun Jun 24 16:45:46 2007 joerg + * mkisofs/mkisofs.c 1.216 + -no-cache-inodes wieder dfirekt nach -cache-inodes + +Sun Jun 24 16:11:37 2007 joerg + * mkisofs/mkisofs.c 1.215 + Helios Erweiterungen + -UDF neu + -no-udf-symlinks neu + -no-hfs neu + +Sun Jun 24 13:34:29 2007 joerg + * mkisofs/mkisofs.h 1.121 + memset()/memchr()/memcpy()/memmove() durch *bytes() ersetzen falls sie fehlen + +Sun Jun 24 13:30:55 2007 joerg + * autoconf/configure.in 1.138 + * autoconf/xconfig.h.in 1.134 + HAVE_MEMCH HAVE_MEMCPY HAVE_MEMSET neu + +Sun Jun 24 13:25:39 2007 joerg + * libschily/movebytes.c 1.16 + * libschily/cmpnullbytes.c 1.5 + * libschily/cmpbytes.c 1.18 + * libschily/findbytes.c 1.5 + * libschily/fillbytes.c 1.16 + Besserer Kommentar + Copyright -> 2007 + +Sun Jun 24 12:51:24 2007 joerg + * mkisofs/apple.c 1.26 + #include mit #ifdef HAVE_NETINET_IN_H gesichert + +Fri Jun 22 00:15:26 2007 joerg + * cdda2wav/sndconfig.c 1.27 + * cdda2wav/ioctl.c 1.32 + * cdda2wav/interface.c 1.54 + Copyright -> 2007 + +Thu Jun 21 14:11:08 2007 joerg + * pkgdefs/CSW/CSWcdrtools/pkginfo 1.1 + date and time created 07/06/21 14:11:08 by joerg + +Wed Jun 20 18:52:49 2007 joerg + * cdrecord/scsi_cdr.c 1.145 + Ungenutzte Variable beseitigt + +Sun Jun 17 16:17:05 2007 joerg + * mkisofs/mkisofs.h 1.120 + * mkisofs/rock.c 1.53 + * mkisofs/joliet.c 1.49 + * mkisofs/apple.c 1.25 + * mkisofs/name.c 1.32 + * mkisofs/mkisofs.c 1.214 + conv_charset() geht nun auch mit iconv() basierten Kodierungen + +Sun Jun 17 15:23:34 2007 joerg + * mkisofs/mkisofs.c 1.213 + Test auf unterschiedliche iconv() basierte Locale + +Sat Jun 16 16:53:18 2007 joerg + * pkgdefs/CSW/CSWstar/pkginfo 1.1 + date and time created 07/06/16 16:53:18 by joerg + +Sat Jun 16 15:34:28 2007 joerg + * makefiles/RULES/i586-linux-suncc64.rul 1.1 + * makefiles/RULES/i586-linux-suncc.rul 1.1 + date and time created 07/06/16 15:34:28 by joerg + +Sat Jun 16 15:30:48 2007 joerg + * makefiles/RULES/rules.pkg 1.1 + date and time created 07/06/16 15:30:48 by joerg + +Sat Jun 16 13:15:29 2007 joerg + * makefiles/RULES/rules.csw 1.1 + date and time created 07/06/16 13:15:29 by joerg + +Fri Jun 15 17:43:04 2007 joerg + * cdda2wav/Makefile 1.14 + Makefile.rd neu + +Fri Jun 15 17:42:43 2007 joerg + * cdda2wav/Makefile.rd 1.1 + date and time created 07/06/15 17:42:43 by joerg + +Fri Jun 15 14:39:19 2007 joerg + * autoconf/configure.in 1.137 + * autoconf/xconfig.h.in 1.133 + neue *at() Funktionen + +Fri Jun 15 14:14:21 2007 joerg + * autoconf/xconfig.h.in 1.132 + * autoconf/configure.in 1.136 + OS Madness Tests nur noch auf Linux + HAVE_USABLE_LINUX_EXT2_FS_H neu + +Thu Jun 14 00:20:07 2007 joerg + * makefiles/RULES/cc-sunpro64.rul 1.9 + * makefiles/RULES/cc-sunpro.rul 1.8 + CC_COM neu damit es bei Linux auf suncc gesetzt werden kann + +Thu Jun 14 00:15:39 2007 joerg + * makefiles/RULES/MKLINKS 1.65 + *-linux-suncc.rul neu + +Thu Jun 14 00:03:21 2007 joerg + * mkisofs/Makefile 1.29 + * rscsi/Makefile 1.5 + Makefile.doc neu + +Thu Jun 14 00:03:03 2007 joerg + * mkisofs/Makefile.doc 1.1 + date and time created 07/06/14 00:03:03 by joerg + +Thu Jun 14 00:02:45 2007 joerg + * mkisofs/Rsparcboot.mk 1.1 + * mkisofs/Rmacosx.mk 1.1 + * mkisofs/Rprep_boot.mk 1.1 + * mkisofs/Rsunx86boot.mk 1.1 + * mkisofs/Rsort.mk 1.1 + * mkisofs/readme.mk 1.1 + * mkisofs/Rmkhybrid.mk 1.1 + * mkisofs/Rhide.mk 1.1 + * mkisofs/Rjoliet.mk 1.1 + * mkisofs/Rsession.mk 1.1 + * mkisofs/Rrootinfo.mk 1.1 + * mkisofs/Rhfs_magic.mk 1.1 + date and time created 07/06/14 00:02:45 by joerg + +Thu Jun 14 00:02:44 2007 joerg + * mkisofs/Rcompresion.mk 1.1 + * mkisofs/Reltorito.mk 1.1 + * mkisofs/Rgraft_dirs.mk 1.1 + * mkisofs/Rhfs_boot.mk 1.1 + date and time created 07/06/14 00:02:44 by joerg + +Wed Jun 13 23:46:11 2007 joerg + * rscsi/Makefile.doc 1.1 + date and time created 07/06/13 23:46:11 by joerg + +Wed Jun 13 23:44:35 2007 joerg + * libparanoia/paranoia.mk 1.2 + Rinterface.mk Rparanoia.mk neu + +Wed Jun 13 23:44:15 2007 joerg + * libparanoia/Rparanoia.mk 1.1 + * libparanoia/Rinterface.mk 1.1 + date and time created 07/06/13 23:44:15 by joerg + +Wed Jun 13 23:37:41 2007 joerg + * cdrecord/Makefile 1.41 + Makefile.doc & READMEs neu + +Wed Jun 13 23:28:55 2007 joerg + * cdrecord/Makefile.doc 1.1 + date and time created 07/06/13 23:28:55 by joerg + +Wed Jun 13 23:28:41 2007 joerg + * cdrecord/readme.mk 1.1 + date and time created 07/06/13 23:28:41 by joerg + +Wed Jun 13 23:28:17 2007 joerg + * cdrecord/Rparallel.mk 1.1 + * cdrecord/Rcdtext.mk 1.1 + * cdrecord/Ratapi.mk 1.1 + * cdrecord/Rverify.mk 1.1 + * cdrecord/Rsun-lofi.mk 1.1 + * cdrecord/Ratapi-dma.mk 1.1 + * cdrecord/Rsony.mk 1.1 + * cdrecord/Rrscsi.mk 1.1 + * cdrecord/Rraw.mk 1.1 + * cdrecord/Rcopy.mk 1.1 + * cdrecord/Rworm.mk 1.1 + * cdrecord/Rata-dma.mk 1.1 + * cdrecord/Rcdplus.mk 1.1 + * cdrecord/Rclone.mk 1.1 + * cdrecord/Rvolmgt.mk 1.1 + * cdrecord/Raudio.mk 1.1 + * cdrecord/Rcdrw.mk 1.1 + * cdrecord/Rmulti.mk 1.1 + * cdrecord/Rdisktattoo.mk 1.1 + date and time created 07/06/13 23:28:17 by joerg + +Tue Jun 12 01:28:14 2007 joerg + * pkgdefs/CSW/CSWsccs/pkginfo 1.1 + date and time created 07/06/12 01:28:14 by joerg + +Tue Jun 12 01:27:18 2007 joerg + * pkgdefs/CSW/CSWschilyutils/pkginfo 1.1 + date and time created 07/06/12 01:27:18 by joerg + +Tue Jun 12 01:27:01 2007 joerg + * pkgdefs/CSW/CSWschilybase/pkginfo 1.1 + date and time created 07/06/12 01:27:01 by joerg + +Mon Jun 11 22:03:02 2007 joerg + * pkgdefs/CSW/CSWschilybase/Makefile 1.1 + date and time created 07/06/11 22:03:02 by joerg + +Sun Jun 10 23:15:46 2007 joerg + * pkgdefs/CSW/CSWved/pkginfo 1.1 + date and time created 07/06/10 23:15:46 by joerg + +Sun Jun 10 23:15:40 2007 joerg + * pkgdefs/CSW/CSWsmake/pkginfo 1.1 + date and time created 07/06/10 23:15:40 by joerg + +Sun Jun 10 22:46:08 2007 joerg + * pkgdefs/CSW/CSWsmake/Makefile 1.1 + * pkgdefs/CSW/CSWcdrtools/Makefile 1.1 + * pkgdefs/CSW/CSWsccs/Makefile 1.1 + * pkgdefs/CSW/CSWved/Makefile 1.1 + * pkgdefs/CSW/CSWschilyutils/Makefile 1.1 + * pkgdefs/CSW/CSWstar/Makefile 1.1 + date and time created 07/06/10 22:46:08 by joerg + +Sun Jun 10 18:14:49 2007 joerg + * pkgdefs/CSW/CSWsccs/prototype 1.1 + date and time created 07/06/10 18:14:49 by joerg + +Sun Jun 10 18:04:34 2007 joerg + * pkgdefs/CSW/CSWsmake/prototype 1.1 + date and time created 07/06/10 18:04:34 by joerg + +Sun Jun 10 17:55:50 2007 joerg + * pkgdefs/CSW/CSWsccs/depend 1.1 + * pkgdefs/CSW/CSWsmake/depend 1.1 + date and time created 07/06/10 17:55:50 by joerg + +Sun Jun 10 17:45:32 2007 joerg + * pkgdefs/CSW/CSWstar/prototype 1.1 + date and time created 07/06/10 17:45:32 by joerg + +Sun Jun 10 17:32:26 2007 joerg + * pkgdefs/CSW/CSWschilyutils/prototype 1.1 + date and time created 07/06/10 17:32:26 by joerg + +Sun Jun 10 17:11:05 2007 joerg + * pkgdefs/CSW/CSWved/prototype 1.1 + date and time created 07/06/10 17:11:05 by joerg + +Sun Jun 10 17:06:37 2007 joerg + * pkgdefs/CSW/CSWved/depend 1.1 + date and time created 07/06/10 17:06:37 by joerg + +Sun Jun 10 15:50:00 2007 joerg + * pkgdefs/CSW/CSWcdrtools/prototype 1.1 + date and time created 07/06/10 15:50:00 by joerg + +Sun Jun 10 14:24:03 2007 joerg + * scgskeleton/skel.c 1.9 + Version -> 1.2 + Copyright -> 2007 + #include "doit.c" neu + +Sun Jun 10 14:23:04 2007 joerg + * scgskeleton/doit.c 1.24 + main.c beseitigt und umbenannt in doit.c + +Sun Jun 10 14:22:39 2007 joerg + * scgskeleton/Makefile 1.4 + Umbau auf skel.c und doit.c + +Sun Jun 10 14:22:15 2007 joerg + * makefiles/RULES/rules.rel 1.7 + REL_MAKEFILE_MATCH neu + +Sun Jun 10 14:15:03 2007 joerg + * cdrecord/iodefs.h 1.1 + date and time created 07/06/10 14:15:03 by joerg + +Sun Jun 10 14:14:07 2007 joerg + * cdrecord/io.c 1.4 + iodefs.h neu + +Sun Jun 10 14:13:57 2007 joerg + * cdrecord/cdrecord.h 1.186 + verify() neu + +Sun Jun 10 14:13:39 2007 joerg + * cdrecord/scsi_cdr.c 1.144 + verify() neu + request_sense() nun sauberer + +Sun Jun 10 14:13:05 2007 joerg + * cdrecord/skel.mk 1.5 + HFILES= neu + +Sun Jun 10 12:23:43 2007 joerg + * pkgdefs/CSW/CSWschilybase/prototype_sparc 1.1 + date and time created 07/06/10 12:23:43 by joerg + +Sun Jun 10 12:23:01 2007 joerg + * pkgdefs/CSW/CSWschilybase/prototype_i386 1.1 + date and time created 07/06/10 12:23:01 by joerg + +Sun Jun 10 12:21:36 2007 joerg + * pkgdefs/CSW/CSWschilybase/prototype_com 1.1 + date and time created 07/06/10 12:21:36 by joerg + +Tue Jun 5 14:25:01 2007 joerg + * autoconf/config.guess 1.8 + #ifdef __ELF__ -> #if defined __ELF__ || defined __SUNPRO_C wegen SunPro-C auf Linux + +Tue Jun 5 11:18:19 2007 joerg + * makefiles/RULES/local.cnf 1.7 + * makefiles/RULES/rules.cnf 1.12 + auch CXXFLAGS= LDFLAGS= ... uebergeben + +Tue May 29 22:15:01 2007 joerg + * makefiles/RULES/cc-msc.rul 1.17 + * makefiles/RULES/os-interix.id 1.4 + * makefiles/RULES/os-interix-nt-5.2.id 1.3 + * makefiles/RULES/os-interix-nt-5.1.id 1.3 + * makefiles/RULES/os-interix-nt-5.0.id 1.3 + * makefiles/RULES/os-interix-nt-4.0.id 1.3 + * makefiles/RULES/os-cygwin32_nt.id 1.5 + * makefiles/RULES/os-cygwin_nt-5.1.id 1.4 + * makefiles/RULES/os-cygwin_nt-5.0.id 1.4 + * makefiles/RULES/os-cygwin_nt-4.0.id 1.4 + * makefiles/RULES/os-cygwin_nt-5.2.id 1.4 + OSDEFS += -D_WIN32_WINNT=0x.... nur fuer MSVC durch Umbau auf WINNTDEFS + +Tue May 29 22:13:54 2007 joerg + * include/schily/param.h 1.4 + #include neu + #define NODEV ((dev_t)-1L) fuer star neu + +Sat May 26 18:50:59 2007 joerg + * cdrecord/LIMITATIONS 1.1 + date and time created 07/05/26 18:50:59 by joerg + +Fri May 25 15:29:08 2007 joerg + * autoconf/xconfig.h.in 1.131 + * autoconf/configure.in 1.135 + AC_CHECK_HEADERS(linux/types.h linux/gfp.h asm/types.h) neu + +Fri May 25 00:56:15 2007 joerg + * libschily/fexec.c 1.30 + #ifdef F_GETFD / F_SETFD neu + +Fri May 25 00:54:29 2007 joerg + * libschily/fexec.c 1.29 + F_DUPFD durch dup2() emulieren + +Thu May 24 20:06:13 2007 joerg + * autoconf/configure.in 1.134 + * autoconf/xconfig.h.in 1.130 + netinet/in.h neu + +Thu May 24 13:35:31 2007 joerg + * scgskeleton/scgskeleton.c 1.23 + * scgskeleton/doit.c 1.23 + * libscg/scsihack.c 1.49 + * cdda2wav/ioctl.c 1.31 + * cdda2wav/toc.c 1.71 + * cdda2wav/cdda2wav.c 1.81 + * cdda2wav/interface.c 1.53 + * cdda2wav/sndconfig.c 1.26 + Umstellung auf schily/ioctl.h + +Thu May 24 13:00:00 2007 joerg + * include/schily/ioctl.h 1.1 + date and time created 07/05/24 13:00:00 by joerg + +Thu May 24 12:59:55 2007 joerg + * include/schily/termios.h 1.31 + Umbau auf schily/ioctl.h + +Thu May 24 12:58:23 2007 joerg + * include/schily/Makefile 1.5 + * include/schily/Mrel 1.5 + ioctl.mk neu + +Thu May 24 12:50:38 2007 joerg + * include/schily/ioctl.mk 1.1 + date and time created 07/05/24 12:50:38 by joerg + +Wed May 23 14:47:19 2007 joerg + * cdrecord/version.h 1.2 + Version -> 2.01.01a27 + +Wed May 23 12:26:23 2007 joerg + * libschily/handlecond.c 1.25 + Support fuer __amd64 neu + +Wed May 23 12:13:32 2007 joerg + * autoconf/configure.in 1.133 + * autoconf/aclocal.m4 1.58 + * autoconf/xconfig.h.in 1.129 + Neue Funktion AC_HAVE_TYPE(INCLUDES, TYPE) + Neuer Test AC_HAVE_TYPE([#include ], greg_t) -> HAVE_TYPE_GREG_T + +Wed May 23 11:42:36 2007 joerg + * autoconf/autoconf 1.3 + M4=/usr/sfw/bin/gm4 + +Tue May 22 23:12:00 2007 joerg + * cdrecord/drv_dvd.c 1.144 + session_offset_dvd() neu + WARNING: Phys disk size ... nicht ausgeben bei cdrecord -msinfo + Erste Version des Multi-Border Support + waitformat() von drv_dvdplus.c geliehen bis Multi-Border Support ordentlich gemacht wird. + +Tue May 22 22:42:08 2007 joerg + * cdrecord/scsi_mmc.c 1.35 + * cdrecord/cdrecord.h 1.185 + * cdrecord/drv_dvd.c 1.143 + * cdrecord/drv_mmc.c 1.181 + * cdrecord/drv_dvdplus.c 1.41 + * cdrecord/scsi_cdr.c 1.143 + get_trackinfo() neu + get_diskinfo() nun mit maxsize Parameter + Moeglichst alle Aufrufe von read_track_info()/read_disk_info()/get_performance() so gestalten, dass zuerst die Transfermenge ermittelt wird + +Mon May 21 14:52:21 2007 joerg + * autoconf/xconfig.h.in 1.128 + * autoconf/configure.in 1.132 + HAVE_GETEXECNAME neu + +Sun May 20 00:34:15 2007 joerg + * autoconf/xconfig.h.in 1.127 + * autoconf/configure.in 1.131 + AC_CHECK_FUNCS(getuid geteuid getgid getegid) neu + +Sun May 20 00:21:20 2007 joerg + * libschily/sleep.c 1.1 + date and time created 07/05/20 00:21:20 by joerg + +Sun May 20 00:14:17 2007 joerg + * autoconf/xconfig.h.in 1.126 + * autoconf/configure.in 1.130 + sleep Test Neu + +Sat May 19 23:25:18 2007 joerg + * libfile/file.h 1.10 + Umstellung auf HAVE_STRERROR / HAVE_STRTOUL + +Sat May 19 23:23:09 2007 joerg + * autoconf/xconfig.h.in 1.125 + * autoconf/configure.in 1.129 + AC_CHECK_FUNCS(strtol strtoll strtoul strtoull strtod) neu + +Sat May 19 21:21:36 2007 joerg + * cdrecord/COPYING 1.1 + date and time created 07/05/19 21:21:36 by joerg + +Sat May 19 14:52:46 2007 joerg + * autoconf/xconfig.h.in 1.124 + * autoconf/rules.cnf.in 1.15 + * autoconf/configure.in 1.128 + * mkisofs/diag/dump.c 1.27 + * mkisofs/diag/isoinfo.c 1.56 + * mkisofs/diag/isodebug.c 1.17 + * mkisofs/diag/isovfy.c 1.29 + * mkisofs/diag/isodump.c 1.30 + Copyright -> 2007 + +Sat May 19 14:48:14 2007 joerg + * include/schily/Makefile 1.4 + * include/schily/Mrel 1.4 + Umstellung auf siconv.h + +Sat May 19 14:46:30 2007 joerg + * include/schily/siconv.h 1.1 + date and time created 07/05/19 14:46:30 by joerg + +Sat May 19 14:46:15 2007 joerg + * include/schily/iconv.h 1.2 + HAVE_ICONV_H test neu + +Sat May 19 14:25:39 2007 joerg + * libsiconv/libsiconv-mapvers 1.1 + date and time created 07/05/19 14:25:39 by joerg + +Sat May 19 14:24:10 2007 joerg + * libsiconv/Makefile 1.1 + date and time created 07/05/19 14:24:10 by joerg + +Sat May 19 14:24:07 2007 joerg + * libsiconv/libsiconv_p.mk 1.1 + * libsiconv/shlsiconv.mk 1.1 + * libsiconv/noshlsiconv.mk 1.1 + * libsiconv/libsiconv.mk 1.1 + date and time created 07/05/19 14:24:07 by joerg + +Sat May 19 14:08:34 2007 joerg + * libsiconv/Targets 1.1 + date and time created 07/05/19 14:08:34 by joerg + +Sat May 19 14:08:01 2007 joerg + * libsiconv/sic_nls.c 1.1 + date and time created 07/05/19 14:08:01 by joerg + +Sat May 19 13:53:15 2007 joerg + * mkisofs/diag/isoinfo.c 1.55 + * mkisofs/diag/isoinfo.mk 1.9 + Umbau auf libsiconv + +Sat May 19 13:09:59 2007 joerg + * mkisofs/udf.c 1.22 + * mkisofs/joliet.c 1.48 + * mkisofs/mkisofs.h 1.119 + * mkisofs/Makefile 1.28 + convert_to_unicode() und joliet_strlen() nun mit iconv() Support + +Sat May 19 12:58:47 2007 joerg + * libsiconv/tables/iso8859-14.mk 1.1 + * libsiconv/tables/iso8859-13.mk 1.1 + * libsiconv/tables/iso8859-11.mk 1.1 + * libsiconv/tables/iso8859-10.mk 1.1 + * libsiconv/tables/iso8859-1.mk 1.1 + * libsiconv/tables/cp874.mk 1.1 + * libsiconv/tables/iso8859-7.mk 1.1 + * libsiconv/tables/iso8859-8.mk 1.1 + * libsiconv/tables/iso8859-6.mk 1.1 + * libsiconv/tables/iso8859-5.mk 1.1 + * libsiconv/tables/koi8-u.mk 1.1 + * libsiconv/tables/iso8859-4.mk 1.1 + * libsiconv/tables/cp866.mk 1.1 + * libsiconv/tables/cp863.mk 1.1 + * libsiconv/tables/cp864.mk 1.1 + * libsiconv/tables/cp869.mk 1.1 + * libsiconv/tables/iso8859-2.mk 1.1 + * libsiconv/tables/iso8859-16.mk 1.1 + * libsiconv/tables/iso8859-15.mk 1.1 + * libsiconv/tables/koi8-r.mk 1.1 + * libsiconv/tables/cp865.mk 1.1 + * libsiconv/tables/iso8859-9.mk 1.1 + * libsiconv/tables/iso8859-3.mk 1.1 + date and time created 07/05/19 12:58:47 by joerg + +Sat May 19 12:58:46 2007 joerg + * libsiconv/tables/cp1251.mk 1.1 + * libsiconv/tables/cp1250.mk 1.1 + * libsiconv/tables/cp10081.mk 1.1 + * libsiconv/tables/cp10079.mk 1.1 + * libsiconv/tables/cp10029.mk 1.1 + * libsiconv/tables/cp10007.mk 1.1 + * libsiconv/tables/cp10006.mk 1.1 + * libsiconv/tables/cp10000.mk 1.1 + * libsiconv/tables/Makefile 1.1 + * libsiconv/tables/cp1255.mk 1.1 + * libsiconv/tables/cp1256.mk 1.1 + * libsiconv/tables/cp1258.mk 1.1 + * libsiconv/tables/cp437.mk 1.1 + * libsiconv/tables/cp737.mk 1.1 + * libsiconv/tables/cp775.mk 1.1 + * libsiconv/tables/cp850.mk 1.1 + * libsiconv/tables/cp852.mk 1.1 + * libsiconv/tables/cp855.mk 1.1 + * libsiconv/tables/cp857.mk 1.1 + * libsiconv/tables/cp860.mk 1.1 + * libsiconv/tables/cp861.mk 1.1 + * libsiconv/tables/cp862.mk 1.1 + * libsiconv/tables/cp1257.mk 1.1 + * libsiconv/tables/cp1254.mk 1.1 + * libsiconv/tables/cp1253.mk 1.1 + * libsiconv/tables/cp1252.mk 1.1 + date and time created 07/05/19 12:58:46 by joerg + +Thu May 17 23:44:26 2007 joerg + * mkisofs/joliet.c 1.47 + * mkisofs/mkisofs.h 1.118 + * mkisofs/rock.c 1.52 + Copyright -> 2007 + +Thu May 17 23:26:35 2007 joerg + * mkisofs/joliet.c 1.46 + Korrekte Behandlung von Nullbytes durch unichar = 0 in convert_to_unicode + +Thu May 17 23:22:54 2007 joerg + * mkisofs/mkisofs.c 1.212 + * mkisofs/rock.c 1.51 + * mkisofs/joliet.c 1.45 + * mkisofs/mkisofs.h 1.117 + * mkisofs/Makefile 1.27 + Umbau von libunls nach libsiconv + +Wed May 16 15:00:38 2007 joerg + * libfind/find_list.c 1.19 + #ifdefs um S_IFLNKS_IFBLK S_IFCHR S_IFIFO + +Wed May 16 12:57:21 2007 joerg + * autoconf/xconfig.h.in 1.123 + * autoconf/configure.in 1.127 + HAVE_DUP neu + +Wed May 16 12:49:21 2007 joerg + * include/schily/dirent.h 1.25 + #undef -> #undef dirent + +Wed May 16 11:47:39 2007 joerg + * include/schily/dirent.h 1.24 + #define dirfd(dirp) ((dirp)->dd_fd) neu + +Wed May 16 11:37:56 2007 joerg + * autoconf/aclocal.m4 1.57 + * autoconf/xconfig.h.in 1.122 + * autoconf/configure.in 1.126 + HAVE_DIRFD / HAVE_DIR_DD_FD neu + neue Funktion AC_CHECK_DFUNC(INCLUDES, SYMBOL) testet ob es ein #define oder ein Symbol ist + +Mon May 14 21:47:02 2007 joerg + * include/schily/siconv.mk 1.1 + date and time created 07/05/14 21:47:02 by joerg + +Sun May 13 21:04:22 2007 joerg + * makefiles/DEFAULTS_ENG/Defaults.dragonfly 1.3 + * makefiles/DEFAULTS_ENG/Defaults.freebsd 1.3 + * makefiles/DEFAULTS/Defaults.freebsd 1.3 + * makefiles/DEFAULTS/Defaults.dragonfly 1.3 + /usr/local/include & -L/usr/local/lib neu + +Sun May 13 20:23:56 2007 joerg + * btcflash/btcflash.c 1.10 + K&R aktiviert + +Sun May 13 18:08:00 2007 joerg + * autoconf/aclocal.m4 1.56 + C)) isinf()/isnan() Test nimmt nun AC_TRY_LINK statt AC_TRY_COMPILE + +Sun May 13 16:49:29 2007 joerg + * mkisofs/utf8.h 1.2 + * mkisofs/utf8.c 1.2 + sccsid neu + +Sun May 13 15:30:52 2007 joerg + * libschily/snprintf.c 1.11 + * libschily/libschily.mk 1.4 + * libschily/shlschily.mk 1.6 + * libschily/libschily_p.mk 1.4 + * libschily/Targets 1.10 + snprintf() wird gebraucht wenn es in libc fehlt dazu -DPORT_ONLY definieren + +Fri May 11 14:06:18 2007 joerg + * mkisofs/utf8.h 1.1 + * mkisofs/utf8.c 1.1 + date and time created 07/05/11 14:06:18 by joerg + +Wed May 9 14:25:30 2007 joerg + * makefiles/RULES/powerpc-beos-gcc.rul 1.8 + * makefiles/RULES/power-macintosh-rhapsody-gcc.rul 1.11 + * makefiles/RULES/x86pc-qnx-gcc.rul 1.7 + * makefiles/RULES/power-macintosh-darwin-gcc.rul 1.13 + * makefiles/RULES/sun3-sunos4-gcc.rul 1.10 + * makefiles/RULES/rs6000-aix-gcc.rul 1.9 + * makefiles/RULES/x86-interix-gcc.rul 1.5 + * makefiles/RULES/power-macintosh-rhapsody-cc.rul 1.11 + * makefiles/RULES/i386-netbsd-gcc.rul 1.11 + * makefiles/RULES/i386-netbsd-cc.rul 1.11 + * makefiles/RULES/i386-os2-gcc.rul 1.13 + * makefiles/RULES/power-macintosh-darwin-cc.rul 1.13 + * makefiles/RULES/i486-cygwin32_nt-gcc.rul 1.10 + * makefiles/RULES/i586-linux-cc.rul 1.11 + * makefiles/RULES/i586-linux-gcc.rul 1.11 + * makefiles/RULES/ip22-irix-gcc.rul 1.11 + * makefiles/RULES/m68k-amigaos-gcc.rul 1.7 + * makefiles/RULES/i386-at386-gnu-gcc.rul 1.7 + * makefiles/RULES/i386-bsd-os3-gcc.rul 1.12 + * makefiles/RULES/i386-bsd-os3-cc.rul 1.12 + * makefiles/RULES/i386-at386-gnu-cc.rul 1.7 + * makefiles/RULES/i386-bsd-os-gcc.rul 1.14 + * makefiles/RULES/i486-cygwin32_nt-cc.rul 1.10 + * makefiles/RULES/i386-openbsd-cc.rul 1.10 + * makefiles/RULES/i386-openbsd-gcc.rul 1.10 + * makefiles/RULES/i386-bsd-os-cc.rul 1.14 + * makefiles/RULES/cc-gcc64.rul 1.10 + * makefiles/RULES/cc-gcc.rul 1.9 + * makefiles/RULES/hppa-nextstep-cc.rul 1.10 + * makefiles/RULES/hppa-nextstep-gcc.rul 1.10 + * makefiles/RULES/9000-725-hp-ux-gcc.rul 1.10 + * makefiles/RULES/bepc-beos-gcc.rul 1.12 + * makefiles/RULES/bepc-beos-cc.rul 1.10 + * makefiles/RULES/alpha-osf1-gcc.rul 1.8 + $(RUNPATH) -> $(RUNPATH:-R%=-Wl,-R%) + +Tue May 8 16:56:55 2007 joerg + * makefiles/DEFAULTS/Defaults.linux 1.3 + * makefiles/DEFAULTS_ENG/Defaults.linux 1.3 + $(LINUX_SRC_INCLUDE) -> RULES/*-linux-*cc*.rul + +Tue May 8 16:54:00 2007 joerg + * makefiles/RULES/i586-linux-gcc.rul 1.10 + * makefiles/RULES/i586-linux-cc.rul 1.10 + $(LINUX_SRC_INCLUDE) neu + +Tue May 8 16:38:20 2007 joerg + * makefiles/DEFAULTS_ENG/Defaults.dgux3 1.2 + * makefiles/DEFAULTS_ENG/Defaults.dgux 1.2 + * makefiles/DEFAULTS_ENG/Defaults.dragonfly 1.2 + * makefiles/DEFAULTS_ENG/Defaults.linux 1.2 + * makefiles/DEFAULTS_ENG/Defaults.freebsd 1.2 + * makefiles/DEFAULTS_ENG/Defaults.gnu 1.2 + * makefiles/DEFAULTS_ENG/Defaults.hp-ux 1.2 + * makefiles/DEFAULTS_ENG/Defaults.sunos5 1.2 + * makefiles/DEFAULTS_ENG/Defaults.sunos4 1.2 + * makefiles/DEFAULTS_ENG/Defaults.rhapsody 1.2 + * makefiles/DEFAULTS_ENG/Defaults.qnx 1.2 + * makefiles/DEFAULTS_ENG/Defaults.osf1 1.2 + * makefiles/DEFAULTS_ENG/Defaults.os2 1.2 + * makefiles/DEFAULTS_ENG/Defaults.openbsd 1.2 + * makefiles/DEFAULTS_ENG/Defaults.nextstep 1.2 + * makefiles/DEFAULTS_ENG/Defaults.newsos6 1.2 + * makefiles/DEFAULTS_ENG/Defaults.netbsd 1.2 + * makefiles/DEFAULTS_ENG/Defaults.irix 1.2 + * makefiles/DEFAULTS_ENG/Defaults.ms-dos 1.2 + * makefiles/DEFAULTS_ENG/Defaults.mingw32_nt 1.2 + * makefiles/DEFAULTS_ENG/Defaults.mac-os10 1.2 + * makefiles/DEFAULTS_ENG/Defaults.dgux4 1.2 + * makefiles/DEFAULTS_ENG/Defaults.domainos 1.2 + * makefiles/DEFAULTS_ENG/Defaults.darwin 1.2 + * makefiles/DEFAULTS_ENG/Defaults.beos 1.2 + * makefiles/DEFAULTS_ENG/Defaults.amigaos 1.2 + * makefiles/DEFAULTS_ENG/Defaults.aix 1.2 + * makefiles/DEFAULTS_ENG/Defaults.cygwin32_nt 1.4 + * makefiles/DEFAULTS_ENG/Defaults.bsd-os3 1.2 + * makefiles/DEFAULTS_ENG/Defaults.bsd-os 1.2 + * makefiles/DEFAULTS/Defaults.netbsd 1.2 + * makefiles/DEFAULTS/Defaults.dgux 1.2 + * makefiles/DEFAULTS/Defaults.dgux3 1.2 + * makefiles/DEFAULTS/Defaults.dgux4 1.2 + * makefiles/DEFAULTS/Defaults.domainos 1.2 + * makefiles/DEFAULTS/Defaults.dragonfly 1.2 + * makefiles/DEFAULTS/Defaults.freebsd 1.2 + * makefiles/DEFAULTS/Defaults.gnu 1.2 + * makefiles/DEFAULTS/Defaults.hp-ux 1.2 + * makefiles/DEFAULTS/Defaults.irix 1.2 + * makefiles/DEFAULTS/Defaults.linux 1.2 + * makefiles/DEFAULTS/Defaults.mac-os10 1.2 + * makefiles/DEFAULTS/Defaults.mingw32_nt 1.2 + * makefiles/DEFAULTS/Defaults.ms-dos 1.2 + * makefiles/DEFAULTS/Defaults.newsos6 1.2 + * makefiles/DEFAULTS/Defaults.nextstep 1.2 + * makefiles/DEFAULTS/Defaults.openbsd 1.2 + * makefiles/DEFAULTS/Defaults.os2 1.2 + * makefiles/DEFAULTS/Defaults.osf1 1.2 + * makefiles/DEFAULTS/Defaults.qnx 1.2 + * makefiles/DEFAULTS/Defaults.rhapsody 1.2 + * makefiles/DEFAULTS/Defaults.sunos4 1.2 + * makefiles/DEFAULTS/Defaults.sunos5 1.2 + * makefiles/DEFAULTS/Defaults.aix 1.2 + * makefiles/DEFAULTS/Defaults.darwin 1.2 + * makefiles/DEFAULTS/Defaults.beos 1.2 + * makefiles/DEFAULTS/Defaults.cygwin32_nt 1.4 + * makefiles/DEFAULTS/Defaults.bsd-os 1.2 + * makefiles/DEFAULTS/Defaults.bsd-os3 1.2 + * makefiles/DEFAULTS/Defaults.amigaos 1.2 + '-R ' -> '-R' + +Tue May 8 16:35:36 2007 joerg + * makefiles/DEFAULTS_ENG/Defaults.osf1 1.1 + * makefiles/DEFAULTS_ENG/Defaults.hp-ux 1.1 + * makefiles/DEFAULTS_ENG/Defaults.gnu 1.1 + * makefiles/DEFAULTS_ENG/Defaults.unixware 1.1 + * makefiles/DEFAULTS_ENG/Defaults.netbsd 1.1 + * makefiles/DEFAULTS_ENG/Defaults.os2 1.1 + * makefiles/DEFAULTS_ENG/Defaults.mingw32_nt 1.1 + * makefiles/DEFAULTS_ENG/Defaults.openserver 1.1 + * makefiles/DEFAULTS_ENG/Defaults.openbsd 1.1 + * makefiles/DEFAULTS_ENG/Defaults.linux 1.1 + * makefiles/DEFAULTS_ENG/Defaults.ms-dos 1.1 + * makefiles/DEFAULTS_ENG/Defaults.sunos4 1.1 + * makefiles/DEFAULTS_ENG/Defaults.nextstep 1.1 + * makefiles/DEFAULTS_ENG/Defaults.qnx 1.1 + * makefiles/DEFAULTS_ENG/Defaults.sunos5 1.1 + * makefiles/DEFAULTS_ENG/Defaults.mac-os10 1.1 + * makefiles/DEFAULTS_ENG/Defaults.irix 1.1 + * makefiles/DEFAULTS_ENG/Defaults.rhapsody 1.1 + * makefiles/DEFAULTS_ENG/Defaults.newsos6 1.1 + date and time created 07/05/08 16:35:36 by joerg + +Tue May 8 16:35:35 2007 joerg + * makefiles/DEFAULTS_ENG/Defaults.dgux 1.1 + * makefiles/DEFAULTS_ENG/Defaults.dgux4 1.1 + * makefiles/DEFAULTS_ENG/Defaults.bsd-os3 1.1 + * makefiles/DEFAULTS_ENG/Defaults.darwin 1.1 + * makefiles/DEFAULTS_ENG/Defaults.bsd-os 1.1 + * makefiles/DEFAULTS_ENG/Defaults.domainos 1.1 + * makefiles/DEFAULTS_ENG/Defaults.beos 1.1 + * makefiles/DEFAULTS_ENG/Defaults.dragonfly 1.1 + * makefiles/DEFAULTS_ENG/Defaults.amigaos 1.1 + * makefiles/DEFAULTS_ENG/Defaults.aix 1.1 + * makefiles/DEFAULTS_ENG/Defaults.freebsd 1.1 + * makefiles/DEFAULTS_ENG/Defaults.dgux3 1.1 + date and time created 07/05/08 16:35:35 by joerg + +Tue May 8 16:19:50 2007 joerg + * makefiles/DEFAULTS/Defaults.unixware 1.1 + * makefiles/DEFAULTS/Defaults.sunos4 1.1 + * makefiles/DEFAULTS/Defaults.sunos5 1.1 + date and time created 07/05/08 16:19:50 by joerg + +Tue May 8 16:19:49 2007 joerg + * makefiles/DEFAULTS/Defaults.bsd-os 1.1 + * makefiles/DEFAULTS/Defaults.mingw32_nt 1.1 + * makefiles/DEFAULTS/Defaults.beos 1.1 + * makefiles/DEFAULTS/Defaults.ms-dos 1.1 + * makefiles/DEFAULTS/Defaults.dgux 1.1 + * makefiles/DEFAULTS/Defaults.rhapsody 1.1 + * makefiles/DEFAULTS/Defaults.qnx 1.1 + * makefiles/DEFAULTS/Defaults.osf1 1.1 + * makefiles/DEFAULTS/Defaults.freebsd 1.1 + * makefiles/DEFAULTS/Defaults.darwin 1.1 + * makefiles/DEFAULTS/Defaults.nextstep 1.1 + * makefiles/DEFAULTS/Defaults.os2 1.1 + * makefiles/DEFAULTS/Defaults.openserver 1.1 + * makefiles/DEFAULTS/Defaults.openbsd 1.1 + * makefiles/DEFAULTS/Defaults.newsos6 1.1 + * makefiles/DEFAULTS/Defaults.amigaos 1.1 + * makefiles/DEFAULTS/Defaults.irix 1.1 + * makefiles/DEFAULTS/Defaults.linux 1.1 + * makefiles/DEFAULTS/Defaults.mac-os10 1.1 + * makefiles/DEFAULTS/Defaults.netbsd 1.1 + * makefiles/DEFAULTS/Defaults.bsd-os3 1.1 + * makefiles/DEFAULTS/Defaults.aix 1.1 + * makefiles/DEFAULTS/Defaults.hp-ux 1.1 + * makefiles/DEFAULTS/Defaults.dgux3 1.1 + * makefiles/DEFAULTS/Defaults.domainos 1.1 + * makefiles/DEFAULTS/Defaults.dgux4 1.1 + * makefiles/DEFAULTS/Defaults.dragonfly 1.1 + * makefiles/DEFAULTS/Defaults.gnu 1.1 + date and time created 07/05/08 16:19:49 by joerg + +Tue May 8 13:07:57 2007 joerg + * makefiles/RULES/i386-bsd-os3-cc.rul 1.11 + * makefiles/RULES/i386-mingw32_nt-gcc.rul 1.7 + * makefiles/RULES/i386-bsd-os-gcc.rul 1.13 + * makefiles/RULES/i786-mingw32_nt-gcc.rul 1.7 + * makefiles/RULES/i586-mingw32_nt-gcc.rul 1.7 + * makefiles/RULES/bemac-beos-cc.rul 1.9 + * makefiles/RULES/i686-mingw32_nt-gcc.rul 1.7 + * makefiles/RULES/powerpc-beos-mwcc.rul 1.10 + * makefiles/RULES/bemac-beos-mwcc.rul 1.9 + * makefiles/RULES/i386-bsd-os3-gcc.rul 1.11 + * makefiles/RULES/i386-bsd-os-cc.rul 1.13 + * makefiles/RULES/i486-mingw32_nt-gcc.rul 1.7 + * makefiles/RULES/cc-sunpro64.rul 1.8 + * makefiles/RULES/cc-sunpro.rul 1.7 + * makefiles/RULES/cc-sony.rul 1.6 + * makefiles/RULES/cc-sgi.rul 1.6 + * makefiles/RULES/cc-sco_uw.rul 1.7 + * makefiles/RULES/cc-sco_os.rul 1.8 + * makefiles/RULES/cc-msc.rul 1.16 + * makefiles/RULES/cc-msposix.rul 1.18 + * makefiles/RULES/cc-sun.rul 1.6 + * makefiles/RULES/cc-apollo.rul 1.8 + * makefiles/RULES/cc-ibm.rul 1.6 + * makefiles/RULES/cc-hp.rul 1.6 + * makefiles/RULES/cc-gcc64.rul 1.9 + * makefiles/RULES/cc-gcc.rul 1.8 + * makefiles/RULES/cc-dumb.rul 1.7 + * makefiles/RULES/cc-dg.rul 1.7 + * makefiles/RULES/cc-dec.rul 1.7 + * makefiles/RULES/cc-bemwcc.rul 1.9 + INCDIRSX neu + +Tue May 8 13:03:07 2007 joerg + * makefiles/RULES/powerpc-beos-gcc.rul 1.7 + * makefiles/RULES/sun4-sunos4-gcc.rul 1.8 + * makefiles/RULES/rs6000-aix-gcc.rul 1.8 + * makefiles/RULES/rs6000-aix-cc.rul 1.10 + * makefiles/RULES/sun4-sunos4-cc.rul 1.8 + * makefiles/RULES/sun4-sunos5-cc64.rul 1.6 + * makefiles/RULES/sun4-sunos5-gcc.rul 1.13 + * makefiles/RULES/sun3-sunos4-gcc.rul 1.9 + * makefiles/RULES/sun4-sunos5-gcc64.rul 1.7 + * makefiles/RULES/sun3-sunos4-cc.rul 1.8 + * makefiles/RULES/powerpc-beos-mwcc.rul 1.9 + * makefiles/RULES/sun4-sunos5-cc.rul 1.11 + * makefiles/RULES/power-macintosh-rhapsody-gcc.rul 1.10 + * makefiles/RULES/x86-interix-gcc.rul 1.4 + * makefiles/RULES/x86pc-qnx-gcc.rul 1.6 + * makefiles/RULES/os-cygwin_nt-5.2.id 1.3 + * makefiles/RULES/m68k-amigaos-gcc.rul 1.6 + * makefiles/RULES/os-cygwin_nt-5.1.id 1.3 + * makefiles/RULES/os-cygwin_98-4.10.id 1.2 + * makefiles/RULES/os-interix-nt-5.1.id 1.2 + * makefiles/RULES/os-interix-nt-5.0.id 1.2 + * makefiles/RULES/os-cygwin_nt-5.0.id 1.3 + * makefiles/RULES/os-interix-nt-4.0.id 1.2 + * makefiles/RULES/pci-qnx-cc.rul 1.7 + * makefiles/RULES/os-interix-nt-5.2.id 1.2 + * makefiles/RULES/os-cygwin32_nt.id 1.4 + * makefiles/RULES/power-macintosh-rhapsody-cc.rul 1.10 + * makefiles/RULES/os-cygwin_me-4.90.id 1.2 + * makefiles/RULES/news4000-newsos6-cc.rul 1.6 + * makefiles/RULES/power-macintosh-darwin-cc.rul 1.12 + * makefiles/RULES/os-cygwin_nt-4.0.id 1.3 + * makefiles/RULES/power-macintosh-darwin-gcc.rul 1.12 + * makefiles/RULES/os-cygwin_95-4.0.id 1.2 + * makefiles/RULES/os-interix.id 1.3 + * makefiles/RULES/i386-unixware-gcc.rul 1.6 + * makefiles/RULES/ip22-irix-cc.rul 1.9 + * makefiles/RULES/i86pc-sunos5-gcc64.rul 1.7 + * makefiles/RULES/i386-unixware-cc.rul 1.7 + * makefiles/RULES/ip22-irix-gcc.rul 1.10 + * makefiles/RULES/i686-mingw32_nt-gcc.rul 1.6 + * makefiles/RULES/i386-openbsd-cc.rul 1.9 + * makefiles/RULES/i586-mingw32_nt-gcc.rul 1.6 + * makefiles/RULES/i386-openserver-cc.rul 1.4 + * makefiles/RULES/i786-mingw32_nt-gcc.rul 1.6 + * makefiles/RULES/i586-linux-cc.rul 1.9 + * makefiles/RULES/i586-linux-gcc.rul 1.9 + * makefiles/RULES/i386-os2-gcc.rul 1.12 + * makefiles/RULES/i386-openserver-gcc.rul 1.7 + * makefiles/RULES/i86pc-sunos5-gcc.rul 1.13 + * makefiles/RULES/i86pc-sunos5-cc64.rul 1.5 + * makefiles/RULES/i486-mingw32_nt-gcc.rul 1.6 + * makefiles/RULES/i386-openbsd-gcc.rul 1.9 + * makefiles/RULES/i86pc-sunos5-cc.rul 1.11 + * makefiles/RULES/bemac-beos-cc.rul 1.8 + * makefiles/RULES/bemac-beos-mwcc.rul 1.8 + * makefiles/RULES/bepc-beos-cc.rul 1.9 + * makefiles/RULES/bepc-beos-gcc.rul 1.11 + * makefiles/RULES/dn5500-domainos-cc.rul 1.6 + * makefiles/RULES/hppa-nextstep-cc.rul 1.9 + * makefiles/RULES/hppa-nextstep-gcc.rul 1.9 + * makefiles/RULES/i386-at386-gnu-gcc.rul 1.6 + * makefiles/RULES/i386-bsd-os-cc.rul 1.12 + * makefiles/RULES/i386-bsd-os-gcc.rul 1.12 + * makefiles/RULES/i386-bsd-os3-cc.rul 1.10 + * makefiles/RULES/i386-bsd-os3-gcc.rul 1.10 + * makefiles/RULES/i386-freebsd-cc.rul 1.8 + * makefiles/RULES/i386-freebsd-gcc.rul 1.8 + * makefiles/RULES/i386-mingw32_nt-gcc.rul 1.6 + * makefiles/RULES/i386-ms-dos-gcc.rul 1.5 + * makefiles/RULES/i386-netbsd-cc.rul 1.10 + * makefiles/RULES/i386-at386-gnu-cc.rul 1.6 + * makefiles/RULES/i386-netbsd-gcc.rul 1.10 + * makefiles/RULES/9000-725-hp-ux-cc.rul 1.13 + * makefiles/RULES/alpha-osf1-cc.rul 1.7 + * makefiles/RULES/alpha-osf1-gcc.rul 1.7 + * makefiles/RULES/aviion-dgux3-cc.rul 1.8 + * makefiles/RULES/9000-725-hp-ux-gcc.rul 1.9 + * makefiles/RULES/aviion-dgux4-cc.rul 1.8 + * makefiles/RULES/aviion-dgux4-gcc.rul 1.9 + * makefiles/RULES/aviion-dgux3-gcc.rul 1.9 + OSDEFS= -> OSDEFS += + +Tue May 8 12:18:59 2007 joerg + * makefiles/RULES/x86-interix-cc.rul 1.1 + date and time created 07/05/08 12:18:59 by joerg + +Tue May 8 12:17:57 2007 joerg + * makefiles/RULES/cc-msposix.rul 1.17 + Erster Versuch cc-msc.rul wieder auf UNIS Optionen umzustellen + +Sun May 6 23:13:32 2007 joerg + * include/schily/iconv.h 1.1 + date and time created 07/05/06 23:13:32 by joerg + +Sun May 6 15:09:42 2007 joerg + * makefiles/RULES/rules.htm 1.3 + ALLTARGETS += beseitigt + +Sun May 6 14:56:12 2007 joerg + * makefiles/RULES/rules.man 1.4 + Ser Inhalt von rules.loc ist nun expandiert damit nicht sub.htm mit includiert wird und html/htmlx doppelt definiert sind + +Sun May 6 14:54:06 2007 joerg + * makefiles/RULES/rules.htm 1.2 + * makefiles/RULES/sub.htm 1.2 + html htmlx sind nun immer in ALLTARGETS + +Sun May 6 14:51:39 2007 joerg + * makefiles/RULES/rules1.top 1.39 + * makefiles/RULES/rules.hlp 1.13 + html, htmlx neu + +Sun May 6 14:50:26 2007 joerg + * makefiles/RULES/rules.sps 1.13 + * makefiles/RULES/rules.c4x-lib 1.5 + * makefiles/RULES/rules.aux 1.8 + * makefiles/RULES/rules.inc 1.8 + * makefiles/RULES/rules.shl 1.13 + * makefiles/RULES/rules.lib 1.10 + * makefiles/RULES/rules.drv 1.7 + * makefiles/RULES/rules.loc 1.7 + * makefiles/RULES/rules.mod 1.7 + * makefiles/RULES/rules.c4x 1.3 + * makefiles/RULES/rules.cmd 1.12 + include $(SRCROOT)/$(RULESDIR)/sub.htm neu + +Fri May 4 16:23:48 2007 joerg + * autoconf/configure.in 1.125 + Diverse Schreibfehler $lib_lib_* statt $lib_* behoben + +Fri May 4 15:51:34 2007 joerg + * autoconf/rules.cnf.in 1.14 + * autoconf/xconfig.h.in 1.121 + * autoconf/configure.in 1.124 + libiconv Test verbessert + +Fri May 4 14:13:19 2007 joerg + * include/schily/Mrel 1.3 + * include/schily/Makefile 1.3 + iconv.mk neu + +Fri May 4 12:18:27 2007 joerg + * include/schily/iconv.mk 1.1 + date and time created 07/05/04 12:18:27 by joerg + +Fri May 4 12:08:51 2007 joerg + * makefiles/RULES/MKLINKS 1.64 + pentium-4-unixware-cc.rul / pentium-4-unixware-gcc.rul neu + +Thu May 3 23:47:40 2007 joerg + * autoconf/xconfig.h.in 1.120 + * autoconf/configure.in 1.123 + iconv Tests neu + +Thu May 3 21:38:52 2007 joerg + * mkisofs/mkisofs.c 1.211 + -J ist nicht mehr -l + +Thu May 3 21:25:40 2007 joerg + * makefiles/RULES/os-sco_sv.id 1.3 + Support fuer OpenServer-6.x == UnixWare-7.14 neu + +Thu May 3 17:34:07 2007 joerg + * conf/oarch.sh 1.13 + Bei Interix (SF) P_ARCH=${K_ARCH} + +Thu May 3 17:28:10 2007 joerg + * makefiles/RULES/os-interix-nt-5.1.id 1.1 + * makefiles/RULES/os-interix-nt-4.0.id 1.1 + * makefiles/RULES/os-interix-nt-5.0.id 1.1 + * makefiles/RULES/os-interix-nt-5.2.id 1.1 + date and time created 07/05/03 17:28:10 by joerg + +Thu May 3 17:27:52 2007 joerg + * makefiles/RULES/x86-interix-cl.rul 1.4 + * makefiles/RULES/os-interix.id 1.2 + OSDEFS= -D_WIN32_WINNT=0x0403 -> os-interix.id + os-interix.id macht nun -include $(SRCROOT)/$(RULESDIR)/os-interix-nt-$(MAKE_HOST_OSREL).id + +Thu May 3 15:49:25 2007 joerg + * makefiles/RULES/os-cygwin32_nt.id 1.3 + Defaultwert fuer _WIN32_WINNT setzen + +Thu May 3 14:58:59 2007 joerg + * makefiles/RULES/mk-smake.id 1.6 + * makefiles/RULES/mk-.id 1.12 + * makefiles/RULES/mk-gmake.id 1.16 + OSVERSION neu + +Thu May 3 14:57:17 2007 joerg + * makefiles/DEFAULTS/Defaults.interix 1.3 + * makefiles/DEFAULTS_ENG/Defaults.interix 1.3 + P_ARCH= $(K_ARCH) neu + +Fri Apr 27 15:43:45 2007 joerg + * conf/oarch.sh 1.12 + Workaround fuer Interix ksh Parser Bug + +Fri Apr 27 15:19:19 2007 joerg + * autoconf/xconfig.h.in 1.119 + * autoconf/configure.in 1.122 + * autoconf/aclocal.m4 1.55 + HAVE_UTSNAME_PROCESSOR/HAVE_UTSNAME_SYSNAME_HOST/HAVE_UTSNAME_RELEASE_HOST/HAVE_UTSNAME_VERSION_HOST neu fuer Interix/SFU + +Fri Apr 27 11:41:26 2007 joerg + * makefiles/RULES/cc-msposix.rul 1.16 + Variante fuer POSIX /bin/cc + +Fri Apr 27 11:34:00 2007 joerg + * makefiles/RULES/cc-msc.rul 1.15 + * makefiles/RULES/r-smake.obj 1.9 + * makefiles/RULES/cc-msposix.rul 1.15 + * makefiles/RULES/r-make.obj 1.7 + $(CC_OUTPUT_FILTER) neu um das Echo des Filenamens mit cl.exe wegzufiltern + +Thu Apr 26 17:04:35 2007 joerg + * makefiles/RULES/x86-interix-cl.rul 1.3 + OSDEFS += -D_WIN32_WINNT=0x0403 neu + +Thu Apr 26 17:04:16 2007 joerg + * makefiles/RULES/cc-msc.rul 1.14 + * makefiles/RULES/cc-msposix.rul 1.14 + Kommentar fuer include $(DEFLTSROOT)/$(DEFLTSDIR)/$(VCSETUP) from Defaults.* neu + +Thu Apr 26 17:02:24 2007 joerg + * makefiles/DEFAULTS_ENG/Defaults.interix 1.2 + * makefiles/DEFAULTS/Defaults.interix 1.2 + include $(DEFLTSROOT)/$(DEFLTSDIR)/$(VCSETUP) + +Thu Apr 26 17:01:03 2007 joerg + * makefiles/DEFAULTS_ENG/Defaults.cygwin32_nt 1.3 + * makefiles/DEFAULTS/Defaults.cygwin32_nt 1.3 + $(_PLATFORM) neu + +Thu Apr 26 10:13:09 2007 joerg + * cdda2wav/cdda2wav.c 1.80 + Neue -version Ausgabe auf stdout und nach gleichem System wie bei den anderen cdrtools Programmen + +Wed Apr 25 23:24:51 2007 joerg + * libschily/fexec.c 1.28 + Umstellung auf STDIN_FILENO/STDOUT_FILENO/STDERR_FILENO + +Wed Apr 25 21:05:27 2007 joerg + * cdrecord/drv_dvdplus.c 1.40 + * cdrecord/drv_dvd.c 1.142 + printf Format strings korrigiert + +Wed Apr 25 18:54:45 2007 joerg + * include/schily/wchar.h 1.4 + #undef iswalnum .... vor Neudefinition + +Wed Apr 25 18:52:34 2007 joerg + * mkisofs/mkisofs.c 1.210 + Printf() Formatstring korrigiert + +Wed Apr 25 18:50:18 2007 joerg + * libscg/scsi-mac-iokit.c 1.13 + GCC-4.x Warnungen beseitigt + Besseres Beispiel bei dev=help + +Wed Apr 25 16:54:03 2007 joerg + * include/schily/time.h 1.18 + Workyround fuer winsock2.h: #define HAVE_STRUCT_TIMEVAL + +Wed Apr 25 16:30:13 2007 joerg + * cdrecord/cdrecord.c 1.343 + cdrecord -version bringt nun auch Copyright -> 2007 + +Wed Apr 25 13:05:27 2007 joerg + * autoconf/config.guess 1.7 + "i386":"Darwin" neu + +Wed Apr 25 00:12:21 2007 joerg + * cdrecord/cdrecord.h 1.184 + * cdrecord/scsi_mmc.c 1.34 + Neue Funktion sessstatus() + +Tue Apr 24 18:05:07 2007 joerg + * conf/mkdep-msc-interix.sh 1.4 + 3x sed -> 1x sed + s,^a:,/dev/fs/A .... neu + +Tue Apr 24 16:24:21 2007 joerg + * makefiles/DEFAULTS/vc7-interix-setup 1.7 + Gross/Kleinschreibung beachten + +Tue Apr 24 15:43:20 2007 joerg + * makefiles/RULES/rules.hlp 1.12 + shell Target neu + +Tue Apr 24 15:39:42 2007 joerg + * makefiles/DEFAULTS/vc7-interix-setup 1.6 + .../VC/BIN -> .../VC/bin + +Tue Apr 24 15:36:05 2007 joerg + * makefiles/RULES/rules.cnf 1.11 + * makefiles/RULES/local.cnf 1.6 + CFLAGS="$(CFLAGS) $(OSDEFS)" (OSDEFS neu) damit bei Interix korrekt konfiguriert wird + +Tue Apr 24 14:20:11 2007 joerg + * autoconf/xconfig.h.in 1.118 + * autoconf/configure.in 1.121 + HAVE_WAIT neu + +Tue Apr 24 00:36:59 2007 joerg + * scgcheck/scgcheck.c 1.9 + Copyright -> 2007 + +Tue Apr 24 00:32:46 2007 joerg + * scgcheck/Makefile 1.7 + * scgcheck/scgcheck.c 1.8 + Umbau auf ../cdrecord/version.h + +Tue Apr 24 00:26:47 2007 joerg + * cdrecord/cdrecord.c 1.342 + * cdrecord/readcd.c 1.87 + Umstellung auf version.h + +Tue Apr 24 00:20:08 2007 joerg + * cdda2wav/Makefile 1.13 + * cdda2wav/local.cnf.in 1.7 + * cdda2wav/toc.c 1.70 + * cdda2wav/cdda2wav.c 1.79 + * cdda2wav/configure.in 1.9 + * mkisofs/mkisofs.c 1.209 + Umstellung auf ../cdrecord/version.h + +Mon Apr 23 23:29:25 2007 joerg + * cdrecord/Makefile 1.40 + version.h neu + +Mon Apr 23 23:28:13 2007 joerg + * mkisofs/diag/isoinfo.c 1.54 + * mkisofs/diag/isovfy.c 1.28 + * mkisofs/diag/isodump.c 1.29 + * mkisofs/diag/dump.c 1.26 + * mkisofs/diag/isodebug.c 1.16 + Umstellung auf ../../cdrecord/version.h + +Mon Apr 23 23:24:00 2007 joerg + * cdrecord/version.h 1.1 + date and time created 07/04/23 23:24:00 by joerg + +Mon Apr 23 23:13:33 2007 joerg + * libscg/scsi-linux-sg.c 1.92 + SG_GET_MAX_TRANSFER_LENGTH Hack (experimentell) neu. Es kommt weg wenn SG_GET_RESERVED_SIZE korrekt funktioniert + +Mon Apr 23 22:42:08 2007 joerg + * mkisofs/volume.c 1.20 + Bessere Fehlermeldung von Helios in copy_to_mac_vol() + +Sun Apr 22 23:36:15 2007 joerg + * mkisofs/write.c 1.107 + Zeitzone korrekt berechnen auch fuer westlich von GMT + +Fri Apr 20 17:05:36 2007 joerg + * libfind/idcache.c 1.23 + Endlosrekursion in nameinit() verhundern in dem name_init = TRUE gesetzt wird + +Fri Apr 20 16:47:01 2007 joerg + * makefiles/RULES/x86-interix-cl.rul 1.2 + Umgestelle auf /conf/mkdep-msc-interix.sh + +Fri Apr 20 16:46:43 2007 joerg + * makefiles/RULES/rules1.top 1.38 + shell: Target neu + +Fri Apr 20 16:46:14 2007 joerg + * conf/mkdep-msc-interix.sh 1.3 + Anpassungen fuer Interix + +Fri Apr 20 15:01:10 2007 joerg + * makefiles/RULES/cc-msposix.rul 1.13 + * makefiles/RULES/cc-msc.rul 1.13 + * makefiles/RULES/i486-cygwin32_nt-cl.rul 1.7 + _PLATFORM fuer DEFAUTLT/vc7-cygwin-setup neu + +Fri Apr 20 15:00:29 2007 joerg + * makefiles/RULES/x86-interix-cl.rul 1.1 + date and time created 07/04/20 15:00:29 by joerg + +Fri Apr 20 14:53:13 2007 joerg + * makefiles/DEFAULTS/vc7-interix-setup 1.5 + * makefiles/DEFAULTS/vc6-interix-setup 1.4 + cygdrive/c/ -> /dev/fs/C/ + +Fri Apr 20 14:44:42 2007 joerg + * makefiles/RULES/cc-msposix.rul 1.12 + * makefiles/RULES/cc-msc.rul 1.12 + cl -> cl.exe, lib -> lib.exe + +Fri Apr 20 14:08:11 2007 joerg + * makefiles/RULES/rules.cmd 1.11 + * makefiles/RULES/rules.inc 1.7 + * autoconf/rules.cnf.in 1.13 + XEXEEXT neu + +Fri Apr 20 13:46:39 2007 joerg + * autoconf/acspecific.m4 1.5 + Statt AC_STRUCT_TIMEZONE AC_STRUCT_TM_ZONE rufen + XEXEEXT neu + +Fri Apr 20 13:04:49 2007 joerg + * autoconf/acgeneral.m4 1.4 + ac_xexeext= neu + +Thu Apr 19 15:42:13 2007 joerg + * include/schily/time.h 1.17 + HAVE_STRUCT_TIMEVAL / HAVE_STRUCT_TIMEZONE neu + +Thu Apr 19 15:36:06 2007 joerg + * autoconf/aclocal.m4 1.54 + * autoconf/xconfig.h.in 1.117 + * autoconf/configure.in 1.120 + HAVE_STRUCT_TIMEZONE neu + +Thu Apr 19 15:30:54 2007 joerg + * autoconf/acoldnames.m4 1.2 + AC_STRUCT_TIMEZONE -> AC_STRUCT_TM_ZONE + +Thu Apr 19 14:55:26 2007 joerg + * autoconf/xconfig.h.in 1.116 + * autoconf/configure.in 1.119 + * autoconf/aclocal.m4 1.53 + HAVE_STRUCT_TIMEVAL neu + +Mon Apr 9 10:50:56 2007 joerg + * cdrecord/scsi_scan.c 1.27 + scgp->silent wieder auf 0 setzen nachdem das Target (ohne dev=) im Auto-Modus gefunden wurde + +Sun Apr 8 18:05:45 2007 joerg + * cdrecord/drv_dvdplus.c 1.39 + * cdrecord/drv_dvd.c 1.141 + Versuch besser mit einem Pioneer Firmwarebug bei der max. Speed umzugehen + +Sun Apr 8 16:29:17 2007 joerg + * cdrecord/cue.c 1.33 + Cstyle + +Sat Apr 7 21:47:57 2007 joerg + * libparanoia/p_block.c 1.23 + paranoia_init() enthielt Schreibfehler d_track_audiop = d_track_audiop statt p->d_track_audiop = d_track_audiop + +Sat Apr 7 12:09:40 2007 joerg + * cdrecord/drv_jvc.c 1.88 + Copyright -> 2007 + 0xDf -> 0xDF, 0xCe -> 0xCE + +Fri Apr 6 23:50:20 2007 joerg + * libfind/fetchdir.c 1.21 + * libfind/cmpdir.c 1.21 + Copyright -> 2007 + +Fri Apr 6 15:45:51 2007 joerg + * cdrecord/readcd.mk 1.10 + XRELFILES += Mreadcd.man + +Fri Apr 6 15:45:32 2007 joerg + * cdrecord/Mreadcd.man 1.1 + date and time created 07/04/06 15:45:32 by joerg + +Fri Apr 6 15:39:57 2007 joerg + * cdrecord/readcd.mk 1.9 + Makefile.man -> Mreadcd.man + +Thu Apr 5 14:25:38 2007 joerg + * scgskeleton/Makefile 1.3 + -DUSE_LARGEFILES neu + +Wed Apr 4 15:08:48 2007 joerg + * libfind/find.c 1.62 + * libfind/find_main.c 1.57 + Version -> 1.3 + +Wed Apr 4 14:49:46 2007 joerg + * libfind/find_misc.c 1.11 + * libfind/walk.h 1.21 + * libfind/find_misc.h 1.6 + * libfind/find_list.h 1.7 + * include/schily/walk.h 1.21 + * cdda2wav/toc.c 1.69 + * cdrecord/scsilog.c 1.20 + * cdrecord/drv_dvdplus.c 1.38 + * cdrecord/drv_mmc.c 1.180 + Copyright -> 2007 + +Wed Apr 4 12:19:49 2007 joerg + * mkisofs/mkisofs.c 1.208 + * cdrecord/cdrecord.c 1.341 + Version -> 2.01.01a25 + +Wed Apr 4 11:34:17 2007 joerg + * libfind/find.c 1.61 + filewrite(), putchar(), fexec(), .... auch auf state->std[] umstellen + +Wed Apr 4 01:28:29 2007 joerg + * libfind/walk.c 1.28 + * libfind/walk.h 1.20 + * include/schily/walk.h 1.20 + sqfun_t quitfun / void *qfarg neu in struct WALK + WALK_WF_QUIT neu + +Wed Apr 4 01:27:00 2007 joerg + * libfind/find_main.c 1.56 + find_main() auf squit_t *quit umgebaut + Abbruch ist nun mittels quitfun() Return Wert moeglich + file_raise(std[i], FALSE) waehrend find_main() laeuft + clearerr(std[i]) am Ende + +Wed Apr 4 01:24:06 2007 joerg + * libfind/find.h 1.17 + * include/schily/find.h 1.17 + find_main() auf squit_t *quit umgebaut + +Tue Apr 3 18:41:14 2007 joerg + * include/schily/schily.h 1.67 + file_getraise() neu + _INCL_SETJMP_H -> _SCHILY_JMPDEFS_H + JM_EXIT / JM_RETURN neu + +Tue Apr 3 18:39:50 2007 joerg + * libschily/Targets 1.9 + * libschily/libschily-mapvers 1.10 + file_getraise.c neu + +Tue Apr 3 18:38:03 2007 joerg + * libschily/stdio/fileread.c 1.15 + * libschily/stdio/filereopen.c 1.16 + * libschily/stdio/fileseek.c 1.13 + * libschily/stdio/file_raise.c 1.9 + * libschily/stdio/fcons.c 2.18 + * libschily/stdio/flag.c 2.13 + * libschily/stdio/filewrite.c 1.15 + * libschily/stdio/schilyio.h 2.26 + Copyright -> 2007 + _IONORAISE -> _JS_IONORAISE, _IOUNBUF -> _JS_IOUNBUF + +Tue Apr 3 18:35:22 2007 joerg + * libschily/stdio/file_getraise.c 1.1 + date and time created 07/04/03 18:35:22 by joerg + +Tue Apr 3 18:30:35 2007 joerg + * libschily/jmem.c 1.10 + * libschily/fjmem.c 1.11 + JM_EXIT fuer comexit(err) statt siglongjmp() neu + +Tue Apr 3 18:28:58 2007 joerg + * cdrecord/cdrecord.1 1.113 + mkisofs Option heisst -quiet statt -q + +Tue Apr 3 01:41:05 2007 joerg + * libfind/walk.c 1.27 + Besserer Kommentar + WALK_WF_PRUNE nur noch auswerten nachdem die Directory vor dem Inhalt bearbeitet wurde + +Tue Apr 3 00:58:57 2007 joerg + * libfind/find.h 1.16 + * libfind/find.c 1.60 + * libfind/find_main.c 1.55 + * include/schily/find.h 1.16 + find_parse() hat nun kein Speicherleck mehr bei Syntayfehlern in der Kommandozeile + +Sun Apr 1 00:25:32 2007 joerg + * libfind/find.c 1.59 + * libfind/find.h 1.15 + * include/schily/find.h 1.15 + * libfind/find_list.c 1.18 + * libfind/find_main.c 1.54 + * libfind/find_list.h 1.6 + * libfind/find_misc.c 1.10 + * libfind/find_misc.h 1.5 + * include/schily/walk.h 1.19 + * libfind/walk.c 1.26 + * libfind/walk.h 1.19 + Umbauten damit I/O Umlenkung im Shell funktioniert + +Sat Mar 31 14:43:59 2007 joerg + * include/schily/archdefs.h 1.5 + Cstyle + +Sat Mar 31 13:01:57 2007 joerg + * libfind/libfind-mapvers 1.8 + Copyright -> 2007 + Version erstmal -> 0.1 + find_free neu + b_find -> find_main + +Fri Mar 30 13:08:41 2007 joerg + * include/schily/wchar.h 1.3 + Fehlendes #endif + +Fri Mar 30 13:07:26 2007 joerg + * include/schily/wchar.h 1.2 + Klammerung von stdio.h mit _INCL_STDIO_H + +Thu Mar 29 23:26:51 2007 joerg + * libfind/find.c 1.58 + Kommentar warum comerr() im geforkten Prozess aufgerufen werden darf + +Wed Mar 28 15:52:55 2007 joerg + * mkisofs/mkisofs.c 1.207 + find_node -> findn_t * + +Wed Mar 28 15:28:28 2007 joerg + * libfind/find.c 1.57 + "{}" nicht mehr durch NULL Pointer ersetzen + +Wed Mar 28 14:14:11 2007 joerg + * libfind/find_main.c 1.53 + * libfind/find.c 1.56 + * libfind/find.h 1.14 + * include/schily/find.h 1.14 + node -> findn_t + +Wed Mar 28 12:23:33 2007 joerg + * libfind/find.c 1.55 + * libfind/find_main.c 1.52 + * libfind/find.h 1.13 + * include/schily/find.h 1.13 + find_free() neu + +Sun Mar 25 22:18:56 2007 joerg + * libscg/scsi-bsd.c 1.44 + scgo_numbus() repariert - path_id ist unsigned und wurde mit (unsigned)-1 verglichen + +Sun Mar 25 16:06:47 2007 joerg + * cdrecord/drv_dvdplus.c 1.37 + Debug Meldung an aktuelle Struktur angepasst + +Wed Mar 14 22:32:33 2007 joerg + * cdda2wav/toc.c 1.68 + _nixread() -> _niread() weil _nixread() durch die Schleife haengt + +Sun Mar 11 13:13:44 2007 joerg + * libfind/find.c 1.54 + GCC parameter hides Warnung beseitigt + +Sun Mar 11 13:02:45 2007 joerg + * mkisofs/mkisofs.8 1.116 + -stream-media-size Doku neu + +Sun Mar 11 11:53:21 2007 joerg + * cdrecord/cue.c 1.32 + Copyright -> 2007 + +Sun Mar 11 11:52:45 2007 joerg + * cdrecord/cue.c 1.31 + wdebug() nun mit #ifdef DEBUG + +Thu Mar 8 14:22:25 2007 joerg + * libscg/libscg-mapvers 1.2 + scg_numbus() neu + +Thu Mar 8 13:08:02 2007 joerg + * makefiles/RULES/cc-dec.rul 1.6 + * makefiles/RULES/cc-sco_os.rul 1.7 + * makefiles/RULES/cc-sco_uw.rul 1.6 + * makefiles/RULES/cc-dumb.rul 1.6 + * makefiles/RULES/cc-sony.rul 1.5 + * makefiles/RULES/cc-sun.rul 1.5 + * makefiles/RULES/cc-ibm.rul 1.5 + * makefiles/RULES/cc-bemwcc.rul 1.8 + * makefiles/RULES/cc-gcc64.rul 1.8 + * makefiles/RULES/cc-sunpro64.rul 1.7 + * makefiles/RULES/cc-gcc.rul 1.7 + * makefiles/RULES/cc-sgi.rul 1.5 + * makefiles/RULES/cc-msc.rul 1.11 + * makefiles/RULES/rules1.top 1.37 + * makefiles/RULES/cc-dg.rul 1.6 + * makefiles/RULES/cc-msposix.rul 1.11 + * makefiles/RULES/cc-apollo.rul 1.7 + * makefiles/RULES/rules.cmd 1.10 + * makefiles/RULES/rules.inc 1.6 + * makefiles/RULES/cc-sunpro.rul 1.6 + * makefiles/RULES/rules.c4x 1.2 + * makefiles/RULES/top.c4x 1.4 + * makefiles/RULES/cc-hp.rul 1.5 + LIBS_PATH_STATIC / OLIBSDIR_STATIC neu + +Thu Mar 8 13:02:26 2007 joerg + * libfind/libfind-mapvers 1.7 + walkinitstate() neu + +Thu Mar 8 12:27:32 2007 joerg + * makefiles/RULES/bepc-beos-cc.rul 1.8 + * makefiles/RULES/bepc-beos-gcc.rul 1.10 + * makefiles/RULES/i386-bsd-os-cc.rul 1.11 + * makefiles/RULES/i386-bsd-os-gcc.rul 1.11 + LIBS_PATH= -L$(OLIBSDIR) beseitigt, ist bereits in cc-gcc.rul + +Wed Mar 7 17:45:03 2007 joerg + * makefiles/RULES/i486-cygwin32_nt-gcc.rul 1.9 + * makefiles/RULES/i486-cygwin32_nt-cc.rul 1.9 + * makefiles/RULES/cc-sco_uw.rul 1.5 + * makefiles/RULES/rules.shl 1.12 + * makefiles/RULES/i386-bsd-os3-gcc.rul 1.9 + * makefiles/RULES/i386-bsd-os3-cc.rul 1.9 + * makefiles/RULES/i386-bsd-os-gcc.rul 1.10 + * makefiles/RULES/i386-bsd-os-cc.rul 1.10 + * makefiles/RULES/cc-sunpro64.rul 1.6 + * makefiles/RULES/cc-sco_os.rul 1.6 + * makefiles/RULES/cc-gcc64.rul 1.7 + * makefiles/RULES/cc-apollo.rul 1.6 + * makefiles/RULES/cc-sunpro.rul 1.5 + * makefiles/RULES/cc-dg.rul 1.5 + * makefiles/RULES/cc-bemwcc.rul 1.7 + * makefiles/RULES/cc-dec.rul 1.5 + * makefiles/RULES/cc-dumb.rul 1.5 + * makefiles/RULES/cc-gcc.rul 1.6 + $(RM) $(RM_FORCE) $(PTARGET_BASE).so vor Anlegen eines Shared Lib Symlinks + +Tue Mar 6 16:05:43 2007 joerg + * autoconf/configure.in 1.118 + * autoconf/xconfig.h.in 1.115 + sys/sysctl.h und mach/machine.h neu + +Tue Mar 6 15:51:04 2007 joerg + * conf/oarch.sh 1.11 + Doku erweitert + -debug & -x neu + +Mon Feb 26 17:42:21 2007 joerg + * libfind/libfind-mapvers 1.6 + nameinit beseitigt + +Mon Feb 26 17:23:11 2007 joerg + * libfind/cmpdir.c 1.20 + * libfind/fetchdir.c 1.20 + dfetchdir() neu + +Mon Feb 26 17:18:59 2007 joerg + * libschily/fjmem.c 1.10 + Keine Fehlermeldung wenn FILE *f == NULL + +Mon Feb 26 16:46:48 2007 joerg + * cdrecord/readcd.c 1.86 + Version -> 2.01.01a24 + +Mon Feb 26 16:17:56 2007 joerg + * include/schily/schily.h 1.66 + * libschily/Targets 1.8 + * libschily/libschily-mapvers 1.9 + fjmem.c neu + +Mon Feb 26 16:17:20 2007 joerg + * libschily/jmem.c 1.9 + Copyright -> 2007 + +Mon Feb 26 16:13:12 2007 joerg + * libschily/fjmem.c 1.9 + Umbau auf __fj*() + +Mon Feb 26 16:00:26 2007 joerg + * mkisofs/mkisofs.c 1.206 + walkinitstate() neu + walkflags |= WALK_NOEXIT neu + +Mon Feb 26 15:58:59 2007 joerg + * libfind/find_main.c 1.51 + * libfind/find.c 1.53 + * include/schily/walk.h 1.18 + * libfind/walk.c 1.25 + * libfind/walk.h 1.18 + walkinitstate() neu + +Mon Feb 26 13:02:14 2007 joerg + * include/schily/schily.h 1.65 + * libschily/comerr.c 1.32 + * libschily/libschily-mapvers 1.8 + * libschily/Targets 1.7 + fcomerr()/fcomerrno()/ferrmsg()/ferrmsgno() neu, _comerr() nun nicht mehr LOCAL + +Mon Feb 26 13:00:26 2007 joerg + * libschily/fcomerr.c 1.1 + date and time created 07/02/26 13:00:26 by joerg + +Fri Feb 23 11:27:04 2007 joerg + * makefiles/RULES/cc-msc.rul 1.10 + * makefiles/RULES/cc-msposix.rul 1.10 + C++OPTS= -EHsc neu + +Thu Feb 22 21:21:43 2007 joerg + * mkisofs/mkisofs.c 1.205 + Umbau auf neue libfind + +Thu Feb 22 21:21:17 2007 joerg + * mkisofs/mac_label.c 1.12 + * mkisofs/apple.c 1.24 + * cdrecord/drv_dvd.c 1.140 + * cdrecord/drv_mmc.c 1.179 + * cdrecord/scsilog.c 1.19 + * cdrecord/drv_dvdplus.c 1.36 + -I. beseitigt, lokale Files nun mit #include "" includieren + +Thu Feb 22 21:12:51 2007 joerg + * include/schily/maxpath.h 1.8 + Copyright -> 2007 + Nun auch _MAX_PATH / _MAX_FNAME von stdlib.h bei MSVC nutzen + +Thu Feb 22 18:13:05 2007 joerg + * include/schily/dirent.h 1.23 + Korrigiert fuer Systeme ohne opendir() + +Thu Feb 22 14:36:44 2007 joerg + * libschily/avoffset.c 1.27 + #include -> #include "getfp.c" + +Thu Feb 22 14:33:16 2007 joerg + * makefiles/RULES/top.c4x 1.3 + * makefiles/RULES/i386-bsd-os-cc.rul 1.9 + * makefiles/RULES/i686-mingw32_nt-gcc.rul 1.5 + * makefiles/RULES/cc-sun.rul 1.4 + * makefiles/RULES/cc-sony.rul 1.4 + * makefiles/RULES/i586-mingw32_nt-gcc.rul 1.5 + * makefiles/RULES/i386-bsd-os-gcc.rul 1.9 + * makefiles/RULES/i486-mingw32_nt-gcc.rul 1.5 + * makefiles/RULES/i386-mingw32_nt-gcc.rul 1.5 + * makefiles/RULES/i786-mingw32_nt-gcc.rul 1.5 + * makefiles/RULES/powerpc-beos-mwcc.rul 1.8 + * makefiles/RULES/i386-bsd-os3-cc.rul 1.8 + * makefiles/RULES/i386-bsd-os3-gcc.rul 1.8 + * makefiles/RULES/cc-sunpro.rul 1.4 + * makefiles/RULES/cc-sunpro64.rul 1.5 + * makefiles/RULES/bemac-beos-cc.rul 1.7 + * makefiles/RULES/cc-apollo.rul 1.5 + * makefiles/RULES/bemac-beos-mwcc.rul 1.7 + * makefiles/RULES/cc-bemwcc.rul 1.6 + * makefiles/RULES/cc-dec.rul 1.4 + * makefiles/RULES/cc-sgi.rul 1.4 + * makefiles/RULES/cc-sco_uw.rul 1.4 + * makefiles/RULES/cc-sco_os.rul 1.5 + * makefiles/RULES/cc-dg.rul 1.4 + * makefiles/RULES/cc-dumb.rul 1.4 + * makefiles/RULES/cc-msposix.rul 1.9 + * makefiles/RULES/cc-gcc.rul 1.5 + * makefiles/RULES/cc-gcc64.rul 1.6 + * makefiles/RULES/cc-hp.rul 1.4 + * makefiles/RULES/cc-ibm.rul 1.4 + * makefiles/RULES/cc-msc.rul 1.9 + -I. beseitigt + +Thu Feb 22 10:14:20 2007 joerg + * libfind/walk.c 1.24 + Bei einem Fehler nicht mehr die Callbackfunktion aufrufen sondern abbrechen + +Thu Feb 22 00:43:35 2007 joerg + * libfind/find_main.c 1.50 + Copyright in -version -> 2007 + fa.walkflags |= WALK_NOEXIT; + +Wed Feb 21 23:39:11 2007 joerg + * libfind/find.c 1.52 + * libfind/find_main.c 1.49 + find_args->jmp und find_args->error neu + ENDARGS -> FIND_ENDARGS, FIND_ERRARG neu + find_usage(int ret) -> find_usage(void) + find_parse() hat nun Aussnahmebehandlung mit sigsetjmp()/siglongjmp() + +Wed Feb 21 20:37:39 2007 joerg + * libfind/libfind-mapvers 1.5 + * libfind/Targets 1.4 + find_main.c neu + +Wed Feb 21 20:36:46 2007 joerg + * libfind/find.h 1.12 + * include/schily/find.h 1.12 + Copyright -> 2007 + Besserer Kommentar + find_args->jmp und find_args->error neu + ENDARGS -> FIND_ENDARGS, FIND_ERRARG neu + find_usage(int ret) -> find_usage(void) + b_find(int ac, char **av, void *dummy) neu + +Wed Feb 21 00:11:02 2007 joerg + * libschily/libschily-mapvers 1.7 + * libschily/Targets 1.6 + jmem.c neu + +Wed Feb 21 00:00:18 2007 joerg + * libschily/fjmem.c 1.8 + * libschily/jmem.c 1.8 + __malloc() -> __jmalloc, statt comerr() nun errmsg()/siglongjmp() + +Tue Feb 20 23:58:38 2007 joerg + * libschily/getargs.c 2.48 + Copyright -> 2007 + checkeql() erlaubt nun auch '+' in longopt= + +Tue Feb 20 15:51:48 2007 joerg + * autoconf/configure.in 1.117 + * autoconf/aclocal.m4 1.52 + Umbau auf AC_FUNC_SIGSETJMP / AC_FUNC_SIGLONGJMP + +Tue Feb 20 10:48:28 2007 joerg + * include/schily/schily.h 1.64 + js_j*alloc()/js_jsavestr() neu + +Tue Feb 20 10:47:55 2007 joerg + * include/schily/jmpdefs.h 1.7 + Auch sigsetjmp()/siglongjmp() werden auf setjmp()/longjmp() abgebildet falls sig*() fehlt + +Mon Feb 19 20:50:09 2007 joerg + * libfind/find_main.c 1.48 + Copyright -> 2007 + main() -> b_find() + +Mon Feb 19 20:08:42 2007 joerg + * include/schily/jmpdefs.h 1.6 + #define sigjmps_t jmps_t wenn sigsetjmp nicht verfügbar + +Mon Feb 19 19:41:42 2007 joerg + * include/schily/jmpdefs.h 1.5 + sigjmps_t neu + +Mon Feb 19 18:32:01 2007 joerg + * autoconf/configure.in 1.116 + * autoconf/xconfig.h.in 1.114 + sigsetjmp()/siglongjmp() neu + +Sun Feb 18 19:20:38 2007 joerg + * include/schily/fetchdir.h 1.3 + * libfind/fetchdir.h 1.3 + dfetchdir() neu + +Sun Feb 18 17:21:25 2007 joerg + * autoconf/xconfig.h.in 1.113 + * autoconf/configure.in 1.115 + AC_CHECK_FUNCS(openat attropen fstatat fchownat futimesat renameat unlinkat) neu + +Sun Feb 18 14:26:55 2007 joerg + * libfind/idcache.c 1.22 + uid_nobody()/gid_nobody() sind nun nicht mehr Variablen sondern Funktionen + nameinit() -> LOCAL und automatisch + +Sat Feb 17 16:59:07 2007 joerg + * cdrecord/cdrecord.c 1.340 + Copyright -> 2007 + Version -> 2.01.01a24 + +Sat Feb 17 16:48:16 2007 joerg + * mkisofs/write.c 1.106 + * mkisofs/boot.c 1.20 + * mkisofs/mkisofs.c 1.204 + * mkisofs/stream.c 1.9 + Copyright -> 2007 + version -> 2.01.01a24 + +Thu Feb 15 14:32:15 2007 joerg + * cdrecord/skel.mk 1.4 + -DSCHILY_PRINT neu + +Wed Feb 14 18:22:40 2007 joerg + * libfind/idcache.c 1.21 + * libfind/find.c 1.51 + * libfind/find_list.c 1.17 + * libfind/walk.c 1.23 + * cdrecord/scsi_mmc.c 1.33 + * cdrecord/drv_dvd.c 1.139 + * cdrecord/diskid.c 1.40 + * cdda2wav/interface.h 1.19 + * cdda2wav/cdda2wav.c 1.78 + Copyright -> 2007 + +Tue Feb 13 16:51:30 2007 joerg + * mkisofs/write.c 1.105 + Zeitzone korrekt berechnen wenn GMT==31.12.2006 und Local 1.1.2007 + +Tue Feb 13 15:58:00 2007 joerg + * include/schily/schilyp.mk 1.1 + date and time created 07/02/13 15:58:00 by joerg + +Tue Feb 13 15:55:19 2007 joerg + * include/schily/schilyp.h 1.1 + date and time created 07/02/13 15:55:19 by joerg + +Tue Feb 13 15:51:00 2007 joerg + * include/schily/Makefile 1.2 + * include/schily/Mrel 1.2 + schilyp.mk neu + +Tue Feb 13 15:48:42 2007 joerg + * include/schily/Mrel 1.1 + * include/schily/Makefile 1.1 + date and time created 07/02/13 15:48:42 by joerg + +Tue Feb 13 15:46:50 2007 joerg + * makefiles/DEFAULTS_ENG/Defaults.cygwin32_nt 1.2 + * makefiles/DEFAULTS/Defaults.cygwin32_nt 1.2 + include $(DEFLTSROOT)/$(DEFLTSDIR)/$(VCSETUP) neu + +Tue Feb 13 15:45:43 2007 joerg + * makefiles/DEFAULTS_ENG/Defaults.cygwin32_nt 1.1 + date and time created 07/02/13 15:45:43 by joerg + +Tue Feb 13 15:41:30 2007 joerg + * makefiles/DEFAULTS/Defaults.cygwin32_nt 1.1 + date and time created 07/02/13 15:41:30 by joerg + +Tue Feb 13 15:40:22 2007 joerg + * makefiles/RULES/rules1.top 1.36 + cc-config.sh mit neuem Parameter default-cc + +Tue Feb 13 15:39:45 2007 joerg + * conf/cc-config.sh 1.8 + Neuer Parameter default-cc, viele kleinere Verbesserungen + +Tue Feb 13 15:22:04 2007 joerg + * conf/oarch.sh 1.10 + cc-config num mit zusaetzlichem default-cc Parameter sh ./conf/cc-config.sh cc default-cc incs/Dcc. + +Sat Feb 10 19:42:33 2007 joerg + * makefiles/RULES/rules.shl 1.11 + Ueberzaehlige alte ___DYNLD.o= Zeile beseitigt + +Sat Feb 10 19:39:10 2007 joerg + * makefiles/RULES/sub.htm 1.1 + * makefiles/RULES/rules.htm 1.1 + date and time created 07/02/10 19:39:10 by joerg + +Sat Feb 10 19:38:30 2007 joerg + * makefiles/RULES/rules.man 1.3 + rules.htm neu + +Fri Feb 9 12:28:35 2007 joerg + * libparanoia/cdda_paranoia.h 1.23 + * libparanoia/p_block.h 1.18 + * libparanoia/p_block.c 1.22 + * libparanoia/paranoia.c 1.36 + Callbackfundtionen zu cdda2wav sind nun in struct cdrom_paranoia + und paranoia_init() hat zusaetzliche Parameter fuer diese Funktionen. + Diese Aenderung war notwendig weil der Mac OS X Linker nicht von der Lib Zum Hauptprogramm linken kann + +Fri Feb 9 12:07:06 2007 joerg + * cdda2wav/cdda2wav.c 1.77 + * cdda2wav/interface.h 1.18 + paranoia_init() bekommt nun die cdda_*() Funktionen als Parameter + extern Deklarationen fuer cdda_*() Funktionen fuer libparanoia + +Thu Feb 8 16:03:45 2007 joerg + * autoconf/configure.in 1.114 + * autoconf/xconfig.h.in 1.112 + * autoconf/aclocal.m4 1.51 + AC_SHELL_BASH Test neu + +Thu Feb 8 13:07:10 2007 joerg + * makefiles/RULES/power-macintosh-darwin-cc.rul 1.11 + * makefiles/RULES/rules.shl 1.10 + * makefiles/RULES/power-macintosh-darwin-gcc.rul 1.11 + Shared Library Support fuer Mac OS X neu + +Thu Feb 8 13:04:26 2007 joerg + * libfind/find.c 1.50 + "common" varaible "environ" -> *_NSGetEnviron() wegen Mac OS X Linker Problemen + +Thu Feb 8 12:57:40 2007 joerg + * libfile/shlfile.mk 1.3 + -lschily neu + +Thu Feb 8 10:55:44 2007 joerg + * libhfs_iso/gdata.c 1.3 + * libfind/idcache.c 1.20 + * libfind/find_list.c 1.16 + * libfile/apprentice.c 1.10 + "common" varaible -> "data" wegen Mac OS X Linker Problemen + +Wed Feb 7 21:51:50 2007 joerg + * libedc/shledc_dec.mk 1.2 + LIBS= -ledc_ecc neu + +Wed Feb 7 17:24:11 2007 joerg + * include/schily/schily.h 1.63 + #undef *printf bevor sie auf js_* umdefiniert werden + +Wed Feb 7 14:59:01 2007 joerg + * libschily/fexec.c 1.27 + * libschily/raisecond.c 1.21 + * libschily/stdio/flag.c 2.12 + "common" varaible -> "data" wegen Mac OS X Linker Problemen + +Wed Feb 7 13:58:49 2007 joerg + * autoconf/configure.in 1.113 + * autoconf/xconfig.h.in 1.111 + HAVE_CRT_EXTERNS_H fuer Mac OS X neu + +Wed Feb 7 12:37:36 2007 joerg + * libfile/apprentice.c 1.9 + cgetstr() -> apgetstr() wegen Mac OS X + +Mon Feb 5 23:34:22 2007 joerg + * mkisofs/stream.c 1.8 + .. Eintrag nun korrrekt auf ^A + +Mon Feb 5 23:31:52 2007 joerg + * mkisofs/mkisofs.c 1.203 + -stream-file-name nun aktiviert mit iso9660_level = 4 + diverse %d -> %u Änderungen weil extent-number nun unsigned ist + +Mon Feb 5 22:48:07 2007 joerg + * libfind/walk.c 1.22 + NULL twprivate erkennen und coredump bei find -exec + vermeiden + +Mon Feb 5 22:33:33 2007 joerg + * libschily/libschily-mapvers 1.6 + printf.c snprintf.c sprintf.c beseitigt + getnum.c getxnum.c gettnum.c getxtnum.c neu + +Mon Feb 5 22:31:44 2007 joerg + * cdrecord/drv_dvd.c 1.138 + %d -> %u denn Parameter ist unsigned + +Mon Feb 5 08:59:38 2007 joerg + * include/schily/schily.h 1.62 + getnum()/getllnum()/getxnum()/getllxnum()/gettnum()/getlltnum()/getxtnum()/getllxtnum() neu + +Mon Feb 5 00:34:22 2007 joerg + * cdrecord/Makefile 1.39 + * mkisofs/diag/isodump.mk 1.7 + * mkisofs/diag/isovfy.mk 1.7 + * mkisofs/diag/isoinfo.mk 1.8 + * mkisofs/diag/dump.mk 1.7 + * mkisofs/diag/isodebug.mk 1.5 + * cdrecord/readcd.mk 1.8 + * cdrecord/skel.mk 1.3 + * mkisofs/Makefile 1.26 + * cdda2wav/Makefile 1.12 + * btcflash/Makefile 1.3 + getnum() -> libschily + +Mon Feb 5 00:13:02 2007 joerg + * cdrecord/diskid.c 1.39 + #include neu wegen js_printf() + +Sun Feb 4 23:51:14 2007 joerg + * libfind/libfind-mapvers 1.4 + * libfind/Targets 1.3 + gettnum.c -> libschily + +Sun Feb 4 23:50:38 2007 joerg + * libfind/find.c 1.49 + gettnum.h beseitigt + +Sun Feb 4 23:31:41 2007 joerg + * libschily/Targets 1.5 + printf.c snprintf.c sprintf.c beseitigt + getnum.c getxnum.c gettnum.c getxtnum.c neu + +Sun Feb 4 23:19:10 2007 joerg + * libschily/getxtnum.c 1.7 + * libschily/getnum.c 1.4 + * libschily/getxnum.c 1.4 + * libschily/gettnum.c 1.7 + Umstellung auf struct gnmult + +Sun Feb 4 02:23:46 2007 joerg + * scgskeleton/Makefile 1.2 + * scgcheck/Makefile 1.6 + * libfile/shlfile.mk 1.2 + * libfile/libfile.mk 1.2 + * libfile/libfile_p.mk 1.2 + * mkisofs/diag/isodump.mk 1.6 + * mkisofs/diag/isovfy.mk 1.6 + * mkisofs/diag/isoinfo.mk 1.7 + * mkisofs/diag/dump.mk 1.6 + * mkisofs/diag/isodebug.mk 1.4 + * mkisofs/Makefile 1.25 + * cdrecord/readcd.mk 1.7 + * cdda2wav/Makefile 1.11 + * cdrecord/Makefile 1.38 + * btcflash/Makefile 1.2 + * libfind/libfind_p.mk 1.2 + * libfind/libfind.mk 1.2 + * libfind/shlfind.mk 1.2 + * libscg/libscg.mk 1.2 + * libscg/librscg.mk 1.3 + * libscg/librscg_p.mk 1.2 + * libscg/libscg_p.mk 1.2 + * libscg/shlrscg.mk 1.2 + * libscg/shlscg.mk 1.2 + -DSCHILY_PRINT neu + +Sun Feb 4 02:01:57 2007 joerg + * libfile/apprentice.c 1.8 + getstr() -> cgetstr() + +Sun Feb 4 01:59:07 2007 joerg + * libfile/softmagic.c 1.9 + * libfile/apprentice.c 1.7 + * mkisofs/mac_label.c 1.11 + * mkisofs/volume.c 1.19 + schily/schily.h neu + +Sat Feb 3 23:37:09 2007 joerg + * include/schily/standard.h 1.36 + Kommentar stdxlib.h/unixstd.h -> schily/stdlib.h/schily/unistd.h + +Fri Jan 26 14:27:18 2007 joerg + * makefiles/DEFAULTS/vc6-setup 1.3 + * makefiles/DEFAULTS/vc7-interix-setup 1.4 + * makefiles/DEFAULTS/vc6-interix-setup 1.3 + * makefiles/DEFAULTS/vc6-cygwin-setup 1.3 + * makefiles/DEFAULTS/vc7-cygwin-setup 1.4 + * makefiles/DEFAULTS/vc7-setup 1.4 + .NO_WARN: neu + +Wed Jan 24 16:37:51 2007 joerg + * makefiles/RULES/rules.inc 1.5 + * makefiles/RULES/rules.cmd 1.9 + * makefiles/RULES/cc-msposix.rul 1.8 + * makefiles/RULES/cc-msc.rul 1.8 + LD_OUTPUT_OPTION neu + +Wed Jan 24 15:55:20 2007 joerg + * makefiles/RULES/i486-cygwin32_nt-cl.rul 1.6 + OSDEFS += -D_CRT_SECURE_NO_DEPRECATE neu + +Wed Jan 24 14:47:19 2007 joerg + * include/schily/wchar.h 1.1 + date and time created 07/01/24 14:47:19 by joerg + +Wed Jan 24 14:47:08 2007 joerg + * include/schily/wchar.mk 1.1 + date and time created 07/01/24 14:47:08 by joerg + +Wed Jan 24 14:45:39 2007 joerg + * autoconf/configure.in 1.112 + * autoconf/rules.cnf.in 1.12 + LIB_SCSI neu als Alias fuer SCSILIB + LIB_RESOLV neu + +Mon Jan 22 18:29:44 2007 joerg + * include/schily/param.h 1.3 + _SCHILY_TYPES_H -> _SCHILY_PARAM_H + +Mon Jan 22 14:37:47 2007 joerg + * autoconf/xconfig.h.in 1.110 + * autoconf/configure.in 1.111 + ctime cftime ascftime strftime tests neu + +Sun Jan 21 19:30:40 2007 joerg + * include/schily/mconfig.h 1.59 + NO_LARGEFILES neu + +Tue Jan 16 15:19:12 2007 joerg + * include/schily/stat.h 1.13 + * include/schily/termios.h 1.30 + * include/schily/param.h 1.2 + * include/schily/fcntl.h 1.16 + * include/schily/time.h 1.16 + * include/schily/xconfig.h 1.5 + * include/schily/types.h 1.2 + * include/schily/unistd.h 1.19 + * include/schily/mman.h 1.4 + * include/schily/libport.h 1.14 + * include/schily/librmt.h 1.20 + * include/schily/utime.h 1.8 + * include/schily/utypes.h 1.26 + * include/schily/wait.h 1.13 + * include/schily/dirent.h 1.22 + * include/schily/btorder.h 1.19 + * include/schily/device.h 1.18 + * include/schily/archdefs.h 1.4 + Copyright -> 2007 + +Tue Jan 16 14:00:57 2007 joerg + * include/schily/utypes.h 1.25 + int8_t .... Typen fuer _MSC_VER definieren + +Tue Jan 16 13:29:22 2007 joerg + * cdrecord/scsi_mmc.c 1.32 + prdiskstatus() initialisiert nun nwa und rz immer + +Tue Jan 16 12:23:54 2007 joerg + * include/schily/dirent.h 1.21 + sys/stat.h -> schily/stat.h + +Tue Jan 16 12:21:48 2007 joerg + * include/schily/libport.h 1.13 + * include/schily/dirent.h 1.20 + * include/schily/utypes.h 1.24 + sys/param.h -> schily/param.h + +Tue Jan 16 12:09:30 2007 joerg + * include/schily/wait.h 1.12 + * include/schily/fcntl.h 1.15 + * include/schily/mman.h 1.3 + * include/schily/btorder.h 1.18 + * include/schily/termios.h 1.29 + * include/schily/time.h 1.15 + * include/schily/device.h 1.17 + * include/schily/stat.h 1.12 + * include/schily/utime.h 1.7 + * include/schily/dirent.h 1.19 + * include/schily/librmt.h 1.19 + * include/schily/utypes.h 1.23 + sys/types.h -> schily/types.h + +Tue Jan 16 12:07:21 2007 joerg + * makefiles/RULES/cc-gcc64.rul 1.5 + * makefiles/RULES/cc-gcc.rul 1.4 + -Wtraditional beseitigt + -Wno-unknown-pragmas neu + +Tue Jan 16 11:32:03 2007 joerg + * include/schily/schily.h 1.61 + Schreibfehler beseitigt + +Tue Jan 16 11:29:04 2007 joerg + * include/schily/unistd.h 1.18 + Umbau auf schily/types.h + +Tue Jan 16 10:53:37 2007 joerg + * include/schily/unistd.h 1.17 + _exit() mit #ifndef _MSC_VER verstecken + +Mon Jan 15 18:42:43 2007 joerg + * makefiles/DEFAULTS/vc7-cygwin-setup 1.3 + * makefiles/DEFAULTS/vc7-interix-setup 1.3 + * makefiles/DEFAULTS/vc7-setup 1.3 + vsins -> VSINS (Schreibfehler) + +Mon Jan 15 00:25:12 2007 joerg + * autoconf/xconfig.h.in 1.109 + * autoconf/configure.in 1.110 + HAVE_WCHAR_H neu + +Fri Jan 12 13:08:09 2007 joerg + * autoconf/configure.in 1.109 + Vergessenen Testcode fuer MAY_LINUX_SRC_INCLUDE entfernt + +Fri Jan 12 13:07:36 2007 joerg + * autoconf/configure.in 1.108 + * autoconf/rules.cnf.in 1.11 + MAY_LINUX_SRC_INCLUDE neu + +Mon Jan 8 18:17:49 2007 joerg + * mkisofs/boot.c 1.19 + * mkisofs/write.c 1.104 + Umstellungen auf %u weil last_extent nun ein UInt32_t ist + +Mon Jan 8 18:17:00 2007 joerg + * libfile/softmagic.c 1.8 + signed/unsigned Format String Problem beseitigt + +Mon Jan 8 18:15:43 2007 joerg + * cdrecord/sccslog.c 1.11 + sccslog ist nun sicher bis 2068 auch im 32 Bit Modus + +Mon Jan 8 18:12:21 2007 joerg + * include/schily/archdefs.h 1.3 + * include/schily/xconfig.h 1.4 + Statische include Definitionen fuer Cygwin-gcc neu + +Mon Jan 8 15:51:02 2007 joerg + * makefiles/DEFAULTS/vc6-cygwin-setup 1.2 + * makefiles/DEFAULTS/vc6-setup 1.2 + * makefiles/DEFAULTS/vc6-interix-setup 1.2 + PATH auf /cygdrive/c/ umgestellt + +Mon Jan 8 15:44:39 2007 joerg + * makefiles/DEFAULTS/vc7-interix-setup 1.2 + * makefiles/DEFAULTS/vc7-cygwin-setup 1.2 + * makefiles/DEFAULTS/vc7-setup 1.2 + Englische Installation beruecksichtigen + PATH mit /cygdrive/c beginnen lassen + +Mon Jan 8 15:41:10 2007 joerg + * makefiles/DEFAULTS/vc7-cygwin-setup 1.1 + * makefiles/DEFAULTS/vc7-interix-setup 1.1 + * makefiles/DEFAULTS/vc7-setup 1.1 + date and time created 07/01/08 15:41:10 by joerg + +Mon Jan 8 14:34:40 2007 joerg + * makefiles/RULES/os-cygwin_nt-5.1.id 1.2 + * makefiles/RULES/os-cygwin_nt-4.0.id 1.2 + * makefiles/RULES/os-cygwin_nt-5.0.id 1.2 + * makefiles/RULES/os-cygwin_nt-5.2.id 1.2 + -DWINVER=xxx beseitigt wegen Problemen mit sys/cygwin.h (cdda2wav) + -DWINVER scheit auch nicht gebraucht zu werden + +Sat Jan 6 12:44:23 2007 joerg + * cdrecord/sccslog.c 1.10 + Umstellung auf include schily/* + +Fri Jan 5 14:09:09 2007 joerg + * makefiles/RULES/sun4-sunos5-gcc.rul 1.12 + * makefiles/RULES/sun4-sunos5-gcc64.rul 1.6 + * makefiles/RULES/i86pc-sunos5-gcc64.rul 1.6 + * makefiles/RULES/i86pc-sunos5-gcc.rul 1.12 + -ztext beseitigt und dafuer GCC Kommentar angebracht + +Thu Jan 4 18:06:26 2007 joerg + * makefiles/RULES/os-cygwin_nt-5.2.id 1.1 + date and time created 07/01/04 18:06:26 by joerg + +Thu Jan 4 16:44:13 2007 joerg + * makefiles/RULES/i486-cygwin32_nt-cc.rul 1.8 + * makefiles/RULES/i486-cygwin32_nt-cl.rul 1.5 + * makefiles/RULES/i486-cygwin32_nt-gcc.rul 1.8 + OSDEFS auf += umgestellt, damit os-cygwin_*.id passende Werte setzen koennen + +Thu Jan 4 16:43:19 2007 joerg + * makefiles/RULES/MKLINKS 1.63 + os-cygwin_*.id sind nun eigenstaendige Files und keine Symlinks mehr + +Thu Jan 4 16:40:38 2007 joerg + * makefiles/RULES/os-cygwin_nt-5.1.id 1.1 + * makefiles/RULES/os-cygwin_95-4.0.id 1.1 + * makefiles/RULES/os-cygwin_98-4.10.id 1.1 + * makefiles/RULES/os-cygwin_me-4.90.id 1.1 + * makefiles/RULES/os-cygwin_nt-5.0.id 1.1 + * makefiles/RULES/os-cygwin_nt-4.0.id 1.1 + date and time created 07/01/04 16:40:38 by joerg + +Wed Jan 3 14:54:07 2007 joerg + * include/schily/xconfig.h 1.3 + * include/schily/archdefs.h 1.2 + __MSWIN_X86_CL32 neu + +Wed Jan 3 14:28:49 2007 joerg + * include/schily/types.h 1.1 + * include/schily/param.h 1.1 + date and time created 07/01/03 14:28:49 by joerg + +Wed Jan 3 14:16:57 2007 joerg + * include/schily/param.mk 1.1 + date and time created 07/01/03 14:16:57 by joerg + +Wed Jan 3 14:16:11 2007 joerg + * include/schily/types.mk 1.1 + date and time created 07/01/03 14:16:11 by joerg + +Tue Jan 2 23:25:38 2007 joerg + * autoconf/xconfig.h.in 1.108 + * autoconf/configure.in 1.107 + AC_VAR_TIMEZONE neu + Tests fuer ftime tzset mktime gmtime localtime timegm timelocal neu + +Tue Jan 2 23:24:30 2007 joerg + * autoconf/aclocal.m4 1.50 + AC_VAR_TIMEZONE neu + +Mon Jan 1 16:15:08 2007 joerg + * autoconf/xconfig.h.in 1.107 + * autoconf/configure.in 1.106 + HAVE_MKTEMP / HAVE_MKSTEMP neu + +Mon Jan 1 14:27:06 2007 joerg + * makefiles/RULES/rules1.top 1.35 + INSTALLTARGETS neu, damit man "install" in rules.dir ausschliessen kann + +Fri Dec 29 17:44:21 2006 joerg + * cdrecord/scsi_mmc.c 1.31 + 0x0014, "DVD-RW sequential overwrite" -> 0x0014, "DVD-RW sequential recording" + +Thu Dec 28 01:16:23 2006 joerg + * include/schily/nlsdefs.h 1.2 + #ifdef HAVE_GETTEXT -> #ifndef HAVE_GETTEXT + #ifdef NO_NLS neu + neben gettext() nun auch dgettext()/dcgettext()/textdomain()/bindtextdomain()/bind_textdomain_codeset() bearbeiten + +Mon Dec 25 00:38:48 2006 joerg + * include/schily/errno.h 1.6 + Schreibfehler defin -> define + +Sat Dec 23 13:11:06 2006 joerg + * mkisofs/mkisofs.8 1.115 + Schreibfehler + +Mon Dec 18 01:24:19 2006 joerg + * mkisofs/mkisofs.c 1.202 + Version -> 2.01.01a23 + +Mon Dec 18 01:18:45 2006 joerg + * cdrecord/cdrecord.c 1.339 + Version -> 2.01.01a23 + Ausgeben um wieviel Bytes ein Sektor gepaddet wird + Bei CDRWIN CUE BINARY Modus (2352 Bytes / Sektor) muessen die Subkanaldaten hinzugefuegt werden + +Mon Dec 18 01:16:39 2006 joerg + * cdrecord/cue.c 1.30 + Trackrestgroesse korrekt nach isecsize berechnen + Copyright -> 2006 + +Sun Dec 17 22:52:13 2006 joerg + * include/schily/utypes.mk 1.1 + * include/schily/xconfig.mk 1.1 + * include/schily/xmconfig.mk 1.1 + * include/schily/varargs.mk 1.1 + * include/schily/utime.mk 1.1 + * include/schily/wait.mk 1.1 + date and time created 06/12/17 22:52:13 by joerg + +Sun Dec 17 22:52:12 2006 joerg + * include/schily/nlsdefs.mk 1.1 + * include/schily/maxpath.mk 1.1 + * include/schily/termcap.mk 1.1 + * include/schily/standard.mk 1.1 + * include/schily/unls.mk 1.1 + * include/schily/stat.mk 1.1 + * include/schily/mman.mk 1.1 + * include/schily/unistd.mk 1.1 + * include/schily/termios.mk 1.1 + * include/schily/mtio.mk 1.1 + * include/schily/sigblk.mk 1.1 + * include/schily/schily.mk 1.1 + * include/schily/mconfig.mk 1.1 + * include/schily/signal.mk 1.1 + * include/schily/string.mk 1.1 + * include/schily/prototyp.mk 1.1 + * include/schily/stkframe.mk 1.1 + * include/schily/stdlib.mk 1.1 + * include/schily/patmatch.mk 1.1 + * include/schily/rmtio.mk 1.1 + * include/schily/time.mk 1.1 + date and time created 06/12/17 22:52:12 by joerg + +Sun Dec 17 22:52:11 2006 joerg + * include/schily/fcntl.mk 1.1 + * include/schily/librmt.mk 1.1 + * include/schily/errno.mk 1.1 + * include/schily/dirent.mk 1.1 + * include/schily/fnmatch.mk 1.1 + * include/schily/device.mk 1.1 + * include/schily/deflts.mk 1.1 + * include/schily/libport.mk 1.1 + * include/schily/jos_maxp.mk 1.1 + * include/schily/ccomdefs.mk 1.1 + * include/schily/btorder.mk 1.1 + * include/schily/getargs.mk 1.1 + * include/schily/jos_io.mk 1.1 + * include/schily/avoffset.mk 1.1 + * include/schily/archdefs.mk 1.1 + * include/schily/getcwd.mk 1.1 + * include/schily/alloca.mk 1.1 + * include/schily/align.mk 1.1 + * include/schily/intcvt.mk 1.1 + * include/schily/jos_defs.mk 1.1 + * include/schily/jmpdefs.mk 1.1 + date and time created 06/12/17 22:52:11 by joerg + +Sun Dec 17 21:47:44 2006 joerg + * libschily/format.c 1.41 + Copyright -> 2006 + #define USE_LONGLONG abgesichert + +Sun Dec 17 20:59:22 2006 joerg + * libfind/walk.c 1.21 + ;; -> ; + +Sun Dec 17 20:55:27 2006 joerg + * libfind/idcache.c 1.19 + nameuid()/namegid() muessen #ifdef PROTOTYPES haben da uid_t/gid_t evt short sind + +Sun Dec 17 20:50:41 2006 joerg + * libfind/walk.c 1.20 + Schreibfehler "intruduced" + +Sun Dec 17 20:40:14 2006 joerg + * libfind/find.c 1.48 + * libfind/find_list.c 1.15 + -type P fuer Solaris 10 Event Ports neu + +Sun Dec 17 20:37:05 2006 joerg + * include/schily/stat.h 1.11 + S_ISPORT fuer Solaris 10 ff. neu + +Sun Dec 17 20:34:38 2006 joerg + * include/schily/xconfig.h 1.2 + xmconfig.h -> schily/xmconfig.h (VMS only) + +Sun Dec 17 20:28:29 2006 joerg + * cdrecord/xio.c 1.16 + Copyright -> 2006 + +Sun Dec 17 20:26:44 2006 joerg + * cdrecord/xio.c 1.15 + * cdrecord/cdrecord.c 1.338 + * cdda2wav/cdda2wav.c 1.76 + Aenderungen fuer VMS + +Wed Dec 13 23:42:23 2006 joerg + * cdrecord/cdrecord.1 1.112 + cuefile= geht nun auch im RAW Modus + +Wed Dec 13 00:23:30 2006 joerg + * cdrecord/cue.c 1.29 + sp->index0 = -1; am Anfang eines Tracks + sectype -> sp->sectype wenn LIB_EDC fehlt + +Sun Dec 10 20:05:26 2006 joerg + * cdrecord/cdrecord.c 1.337 + * cdrecord/cue.c 1.28 + RAW Mode wird nun auch mit cuefile= unterstuetzt. + +Sun Dec 10 20:00:03 2006 joerg + * cdrecord/subchan.c 1.22 + Eingerueckt + +Sat Dec 9 22:31:26 2006 joerg + * cdrecord/cue.c 1.27 + parse_performer()/parse_songwriter()/parse_title() nun mit besserer Ueberpruefung auf korrekte Position im CUE File + +Sat Dec 9 22:19:40 2006 joerg + * cdrecord/cue.c 1.26 + Mehrere FILE Zeilen erlauben fuer mehrere Tracks + +Sun Dec 3 20:10:14 2006 joerg + * cdrecord/cdrecord.c 1.336 + Version -> 2.01.01a22 + +Sun Dec 3 20:09:40 2006 joerg + * cdrecord/scsi_mmc.c 1.30 + Remaining writable size: Ausgabe bei -minfo neu + +Sat Dec 2 23:47:58 2006 joerg + * cdrecord/scsi_mmc.c 1.29 + przone() -> scsi_mmc.c + prdiskstatus() neu + +Sat Dec 2 23:33:52 2006 joerg + * cdrecord/cdrecord.h 1.183 + * cdrecord/drv_dvdplus.c 1.35 + * cdrecord/drv_dvd.c 1.137 + przone() -> scsi_mmc.c + +Sat Dec 2 23:27:17 2006 joerg + * cdrecord/drv_dvd.c 1.136 + Diverse Erweiterungen fuer print_dvd00() (Aktualisiert fuer DVD+R/DL & HD-DVD) + +Sat Dec 2 23:10:16 2006 joerg + * cdrecord/scsimmc.h 1.19 + dvd_structure_00 minimum_rate -> maximum_rate + +Sat Dec 2 21:00:03 2006 joerg + * include/schily/getargs.h 1.16 + Parameter Typen fuer getargfun/getpargfun korrigiert + +Sat Dec 2 20:50:01 2006 joerg + * mkisofs/mkisofs.c 1.201 + Version -> 2.01.01a22 + susage() gibt nun die wichtigsten Optionen auf 24x80 aus + +Sat Dec 2 19:01:13 2006 joerg + * mkisofs/mkisofs.8 1.114 + -posix-H/-posix-L/-posix-P neu + +Sat Dec 2 19:00:26 2006 joerg + * mkisofs/mkisofs.c 1.200 + -posix-H/-posix-L/-posix-P neu + Warnung fue -L/-f abgeschaltet + usage() macht nun korrekt ein Komma vor Optionen die einen NULL Pointer als Kurzhilfe haben + +Thu Nov 30 01:21:12 2006 joerg + * cdrecord/drv_dvdplus.c 1.34 + * cdrecord/drv_dvd.c 1.135 + next_writable_address fuer naechste Session korrekt berechnen + +Wed Nov 29 20:50:52 2006 joerg + * cdrecord/drv_mmc.c 1.178 + * cdrecord/drv_dvd.c 1.134 + * cdrecord/drv_dvdplus.c 1.33 + * cdrecord/cdrecord.h 1.182 + Neuer BOOL is_cd Parameter fuer prdiskstatus() + +Wed Nov 29 12:18:21 2006 joerg + * libscg/scsi-linux-sg.c 1.91 + #define USER_HZ wenn HZ/USER_HZ fehlen + +Wed Nov 29 00:40:51 2006 joerg + * cdrecord/readcd.c 1.85 + * cdrecord/xio.c 1.14 + Cstyle + +Wed Nov 29 00:34:59 2006 joerg + * cdrecord/cdrecord.h 1.181 + prdiskstatus() neu + +Wed Nov 29 00:34:36 2006 joerg + * cdrecord/drv_dvd.c 1.133 + * cdrecord/drv_mmc.c 1.177 + * cdrecord/drv_dvdplus.c 1.32 + prdiskstatus -> scsi_mmc.c + +Wed Nov 29 00:33:59 2006 joerg + * cdrecord/scsi_scan.c 1.26 + numbus auf 1024 setzen wenn scg_numbus() -1 liefert + +Wed Nov 29 00:04:53 2006 joerg + * libscg/scsi-linux-sg.c 1.90 + Bei Linux-2.4 nicht automatisch /dev/hd* oeffnen + EROFS Fehler ingnorieren + +Tue Nov 28 22:18:26 2006 joerg + * libscg/scsi-linux-sg.c 1.89 + USER_HZ statt HZ verwenden wenn vorhanden + +Tue Nov 28 17:49:24 2006 joerg + * cdda2wav/cdda2wav.c 1.75 + mode_t Cast fuer open + +Tue Nov 28 17:46:05 2006 joerg + * libschily/stdio/openfd.c 1.10 + * libschily/stdio/schilyio.h 2.25 + open() mit mode_t Cast + +Mon Nov 27 01:17:21 2006 joerg + * cdrecord/scsi_mmc.c 1.28 + BG format status Ausgabe neu + +Sun Nov 26 23:58:58 2006 joerg + * cdda2wav/toc.c 1.67 + Speicherverletzung durch negativen Returncode von readn() beseitigt + +Sun Nov 26 23:10:12 2006 joerg + * cdrecord/cdrecord.1 1.111 + -minfo/-media-info + +Sun Nov 26 23:09:18 2006 joerg + * cdrecord/drv_dvdplus.c 1.31 + * cdrecord/drv_mmc.c 1.176 + * cdrecord/drv_dvd.c 1.132 + Erste Version von prdiskstatus_*() + +Sun Nov 26 22:40:22 2006 joerg + * libscg/scsitransp.c 1.95 + _scg_version -> 0.9 + +Sun Nov 26 22:34:48 2006 joerg + * libscg/scsi-linux-sg.c 1.88 + ATA: auf Busnummer 1000 ... 1012 mappen + +Sun Nov 26 21:58:49 2006 joerg + * libscg/scsi-linux-ata.c 1.13 + schilly -> atapi + +Sun Nov 26 21:38:12 2006 joerg + * rscsi/rscsi.c 1.32 + scg_numbus() neu + Copyright -> 2006 + +Sun Nov 26 21:15:59 2006 joerg + * cdrecord/scsi_scan.c 1.25 + * cdrecord/drv_sony.c 1.77 + * cdrecord/drv_philips.c 1.73 + * cdrecord/drv_simul.c 1.53 + * cdrecord/drv_7501.c 1.22 + * cdrecord/drv_jvc.c 1.87 + * cdrecord/cdr_drv.c 1.39 + Copyright -> 2006 + +Sun Nov 26 20:55:08 2006 joerg + * cdrecord/cdrecord.c 1.335 + * cdrecord/drv_simul.c 1.52 + * cdrecord/drv_sony.c 1.76 + * cdrecord/drv_philips.c 1.72 + * cdrecord/drv_jvc.c 1.86 + * cdrecord/cdrecord.h 1.180 + * cdrecord/drv_7501.c 1.21 + -minfo/-media-info und dp->cdrprdiskstatus() neu + +Sun Nov 26 20:46:40 2006 joerg + * cdrecord/cdr_drv.c 1.38 + no_diskstatus() neu + -minfo/-media-info und dp->cdrprdiskstatus() neu + +Sun Nov 26 18:12:57 2006 joerg + * libscg/scsi-sgi.c 1.37 + * libscg/scsi-wnt.c 1.46 + * libscg/scsi-unixware.c 1.38 + * libscg/scsi-vms.c 1.34 + * libscg/scsi-linux-pg.c 1.45 + * libscg/scsi-mac-iokit.c 1.12 + * libscg/scsi-linux-sg.c 1.87 + * libscg/scsi-linux-ata.c 1.12 + * libscg/scsi-openserver.c 1.32 + * libscg/scsi-qnx.c 1.4 + * libscg/scsi-osf.c 1.27 + * libscg/scsi-next.c 1.33 + * libscg/scsi-os2.c 1.26 + * libscg/scsi-hpux.c 1.33 + * libscg/scsi-amigaos.c 1.8 + * libscg/scsi-aix.c 1.37 + * libscg/scsi-apollo.c 1.7 + * libscg/scsi-beos.c 1.24 + * libscg/scsi-bsd-os.c 1.29 + * libscg/scsi-bsd.c 1.43 + * libscg/scsi-dos.c 1.12 + * libscg/scg/scgops.h 1.6 + * libscg/scg/scsitransp.h 1.55 + * libscg/scsitransp.c 1.94 + * libscg/scsihack.c 1.48 + * libscg/scsi-sun.c 1.86 + * libscg/scsi-remote.c 1.21 + * cdrecord/scsi_scan.c 1.24 + scg_numbus() neu + +Sun Nov 26 15:30:29 2006 joerg + * cdrecord/drv_dvd.c 1.131 + get_diskinfo()/print_di() -> scsi_mmc.c get_diskinfo()/print_diskinfo() + przone() mit besseren Groessentests + +Sun Nov 26 15:24:11 2006 joerg + * cdrecord/scsimmc.h 1.18 + struct disk_info auf DVD erweitert + +Sun Nov 26 15:23:34 2006 joerg + * cdrecord/drv_dvdplus.c 1.30 + * cdrecord/scsi_mmc.c 1.27 + * cdrecord/drv_mmc.c 1.175 + * cdrecord/cdrecord.h 1.179 + get_diskinfo()/print_di() -> scsi_mmc.c get_diskinfo()/print_diskinfo() + +Sun Nov 26 01:47:48 2006 joerg + * cdrecord/drv_dvd.c 1.130 + Layer Break align nicht pruefen bei dp->cdr_dstat->ds_layer_break == -1 + Manual Layerbreak mit driveropts=layerbreak=# + przone() erweritert um die layer break Funktionen + +Sun Nov 26 01:39:41 2006 joerg + * cdrecord/scsi_scan.c 1.23 + * cdrecord/scsi_scan.h 1.5 + index -> idx wegen GCC Warnung + +Sun Nov 26 01:31:29 2006 joerg + * cdrecord/scsimmc.h 1.17 + struct rzone_info erweitert fuer DVD dual layer + +Sun Nov 26 01:30:14 2006 joerg + * cdda2wav/interface.c 1.52 + Meldungen vom Autotarget Code auf stderr + +Sun Nov 26 01:29:47 2006 joerg + * cdrecord/cdrecord.c 1.334 + * cdrecord/readcd.c 1.84 + Meldungen vom Autotarget Code auf stderr + Version -> 2.01.01a21 + +Sat Nov 25 16:50:40 2006 joerg + * mkisofs/mkisofs.c 1.199 + Version -> 2.01.01a21 + +Sat Nov 25 16:49:32 2006 joerg + * mkisofs/tree.c 1.96 + set_de_path() neu um find_or_create_directory() korrekter zu machen + +Sat Nov 25 16:44:46 2006 joerg + * mkisofs/mkisofs.h 1.116 + struct directory->de_path neu um find_or_cdreate_directory() besser zu machen + +Sun Nov 19 22:59:15 2006 joerg + * mkisofs/tree.c 1.95 + * mkisofs/volume.c 1.18 + * mkisofs/write.c 1.103 + * mkisofs/eltorito.c 1.39 + * mkisofs/mkisofs.c 1.198 + * mkisofs/rock.c 1.50 + * mkisofs/name.c 1.31 + immer strcmp() == 0 / strcmp() != 0 schreiben fuer bessere lesbarkeit + +Wed Nov 15 22:57:38 2006 joerg + * autoconf/configure.in 1.105 + * autoconf/xconfig.h.in 1.106 + HAVE_YIELD neu + +Mon Nov 13 16:35:44 2006 joerg + * makefiles/RULES/i486-cygwin32_nt-cl.rul 1.4 + LIB_SOCKET= Ws2_32.lib + +Sun Nov 12 15:09:58 2006 joerg + * mkisofs/mkisofs.8 1.113 + Bessere -R Doku + +Sun Nov 12 01:08:33 2006 joerg + * libfind/find_misc.c 1.9 + Wenn acl(info->f_name, GETACLCNT, 0, NULL) ENOSYS returniert, dann keine Fehlermeldung + +Sun Nov 12 01:04:31 2006 joerg + * mkisofs/mkisofs.c 1.197 + Version -> 2.01.01a20 + +Sat Nov 11 22:42:43 2006 joerg + * mkisofs/defaults.h 1.20 + * libscg/scsihack.c 1.47 + * cdda2wav/mycdrom.h 1.13 + * cdda2wav/ioctl.c 1.30 + * cdda2wav/setuid.c 1.16 + * cdda2wav/interface.c 1.51 + __FreeBSD_kernel__ fuer Debian auf FreeBSD neu + +Sat Nov 11 21:22:28 2006 joerg + * mkisofs/tree.c 1.94 + Alten auskommentierten HIDE_RR Code beseitigt + Kommentar neu formatiert + +Sat Nov 11 20:49:07 2006 joerg + * cdrecord/cdrecord.c 1.333 + Version -> 2.01.01a20 + Default Write Modus ist nun -sao (bei -multi -tao) + +Sat Nov 11 20:05:37 2006 joerg + * cdrecord/xio.c 1.13 + * cdrecord/xio.h 1.4 + xopen() mit neuem xflags Parameter und X_NOREWIND wegen mehrfachem Oeffnen mit xopen() + Neue Funktion xmarkpos() + +Sat Nov 11 20:04:49 2006 joerg + * cdrecord/cue.c 1.25 + xopen() mit neuem xflags Parameter und X_NOREWIND wegen mehrfachem Oeffnen mit xopen() + +Sat Nov 11 20:04:20 2006 joerg + * cdrecord/cdrecord.c 1.332 + xopen() mit neuem xflags Parameter wegen mehrfachem Oeffnen mit xopen() + Aufruf von xmarkpos() nach ausize() und wavsize(), damit nach xclose() der seek-Pointer nach dem AU/WAV-Header zeigt + +Sat Nov 11 19:59:55 2006 joerg + * cdrecord/audiosize.c 1.21 + ausize() und wavsize() machen nun am Anfang ein lseek(f, (off_t)0L, SEEK_SET); damit auch doppelt geoeffnete Files mit xopen() korrekt funktionieren + +Sat Nov 11 17:59:54 2006 joerg + * cdrecord/fifo.c 1.52 + await_faio() ruft nun kill_faio() statt kill() damit fio_pid <= 0 keine Probleme machen kann + +Mon Nov 6 15:12:32 2006 joerg + * autoconf/aclocal.m4 1.49 + access(".", E_OK|F_OK) fuer _MSC_VER disablen wegen bug in MS libc -> execption -> pop-up + +Mon Nov 6 02:02:02 2006 joerg + * cdrecord/readcd.1 1.25 + * cdrecord/scsi_scan.h 1.4 + * cdrecord/scsi_scan.c 1.22 + * cdrecord/cdrecord.1 1.110 + * cdrecord/cdrecord.c 1.331 + * cdrecord/readcd.c 1.83 + Wenn ohne dev= aufgerufen, dann wird nun nach einem Laufwerk gesucht und es genutzt es wenn es genau ein CD-ROM gibt. + +Mon Nov 6 01:57:41 2006 joerg + * cdda2wav/cdda2wav.1 1.19 + dev= ist nun unnoetig wenn genau ein LW gefunden wird + +Mon Nov 6 01:49:24 2006 joerg + * cdda2wav/interface.c 1.50 + Wenn ohne dev= aufgerufen, dann sucht cdda2wav nun nach einem Laufwerk und nutzt es wenn es genau ein CD-ROM gibt. + +Sun Nov 5 19:28:28 2006 joerg + * libfind/libfind-mapvers 1.3 + mem.c -> libschily + +Sun Nov 5 18:43:52 2006 joerg + * mkisofs/inode.c 1.5 + Da generate_reloc_directory() nun NEED_RE setzt, reduzieren wir den / Link Count um 1 wenn reloc_dir != NULL ist + +Sun Nov 5 18:42:51 2006 joerg + * mkisofs/tree.c 1.93 + generate_reloc_directory() setzt nun NEED_RE + +Sun Nov 5 14:51:25 2006 joerg + * libscg/scsi-sun.c 1.85 + -scanbus liefert nun nicht nur den Fehlertext des ersten Fehlers sondern auch errno dazu + +Sun Nov 5 02:49:11 2006 joerg + * libfind/cmpdir.c 1.19 + * libfind/fetchdir.c 1.19 + * mkisofs/mkisofs.c 1.196 + * libfind/find_main.c 1.47 + * libfind/walk.c 1.19 + * libfind/find.c 1.47 + * libschily/fjmem.c 1.7 + * libschily/mem.c 1.7 + * libschily/jmem.c 1.7 + #include "mem.h" beseitigt + +Sun Nov 5 02:30:12 2006 joerg + * libfind/Targets 1.2 + mem.c / mem.h beseitigt + +Sun Nov 5 02:25:57 2006 joerg + * libschily/Targets 1.4 + mem.c neu + +Sun Nov 5 02:24:54 2006 joerg + * libschily/libschily-mapvers 1.5 + js_malloc/js_realloc/js_savestr neu + +Sun Nov 5 02:21:18 2006 joerg + * include/schily/schily.h 1.60 + __malloc()/__realloc()/__savestr() neu + +Wed Nov 1 01:10:00 2006 joerg + * include/schily/schily.h 1.59 + Wenn SCHILY_PRINTn dann printf... -> js_printf + +Tue Oct 31 18:13:11 2006 joerg + * libfind/mem.h 1.2 + * libfind/gettnum.h 1.2 + * include/schily/fetchdir.h 1.2 + * libfind/find_misc.h 1.4 + * libfind/find_list.h 1.5 + * libfind/fetchdir.h 1.2 + * libschily/gettnum.c 1.6 + * libfind/find_misc.c 1.8 + * libfind/mem.c 1.6 + * libschily/getxtnum.c 1.6 + * libfind/gettnum.c 1.6 + * libschily/mem.c 1.6 + * libfind/find_list.c 1.14 + * libschily/fjmem.c 1.6 + * libschily/jmem.c 1.6 + * libfind/idcache.c 1.18 + * libschily/checkerr.c 1.15 + Copyright -> 2006 + +Tue Oct 31 16:31:01 2006 joerg + * libfind/libfind-mapvers 1.2 + init_findargs() -> find_argsinit(), init_findtime() -> find_timeinit() + +Tue Oct 31 15:03:53 2006 joerg + * conf/Makefile 1.5 + install ist nun offizielles Target + +Tue Oct 31 14:57:25 2006 joerg + * conf/Makefile 1.4 + XMK_FILE= xconfig.mk neu + +Tue Oct 31 14:57:05 2006 joerg + * conf/xconfig.mk 1.1 + date and time created 06/10/31 14:57:05 by joerg + +Tue Oct 31 14:43:27 2006 joerg + * inc/avoffset.mk 1.2 + * inc/btorder_test.mk 1.2 + * inc/align_test.mk 1.2 + INSDIR= -> include/schily/$(OARCH) + +Mon Oct 30 14:48:01 2006 joerg + * libscg/scsi-linux-ata.c 1.11 + "Warning: dev=ATA: is preferred over dev=ATAPI:.\n") neu + +Mon Oct 30 14:03:06 2006 joerg + * mkisofs/multi.c 1.81 + Multi session Hinweis "ISO-9660 image includes checksum signature..." nun -> stderr wegen mkisofs | cdrecord + +Sun Oct 29 13:50:10 2006 joerg + * mkisofs/mkisofs.c 1.195 + * cdrecord/cdrecord.c 1.330 + Version -> 2.01.01a19 + +Sun Oct 29 13:43:07 2006 joerg + * cdda2wav/cdda2wav.1 1.18 + * cdda2wav/interface.c 1.49 + * cdda2wav/cdda2wav.c 1.74 + Neue Option ts=# wie bei cdrecord + Neue globale Variable global.bufsize wegen ts= + +Sun Oct 29 13:41:42 2006 joerg + * cdda2wav/global.h 1.15 + * cdda2wav/scsi_cmds.h 1.16 + Copyright -> 2006 + +Sun Oct 29 13:18:03 2006 joerg + * cdda2wav/scsi_cmds.h 1.15 + * cdda2wav/scsi_cmds.c 1.38 + init_scsibuf() nun mit long amt Parameter + +Sun Oct 29 12:57:57 2006 joerg + * cdda2wav/cdda2wav.1 1.17 + SCCS Text wieder mit %Z%... restauriert + +Sun Oct 29 12:53:38 2006 joerg + * cdda2wav/interface.h 1.17 + DEF_BUFSIZE neu (3 MB) fuer die maximal versuchte SCSI DMA Groesse + +Sun Oct 29 12:51:32 2006 joerg + * cdda2wav/global.h 1.14 + bufsize neu + +Sun Oct 29 12:46:30 2006 joerg + * libschily/fconv.c 1.36 + Schreibfehler HAVE_99_ISINF -> HAVE_C99_ISINF + comments? isinf()/isnan() nicht auf (0) definieren wenn HAVE_C99_ISNAN / HAVE_C99_ISINF defininet sind + +Sun Oct 29 02:08:00 2006 joerg + * mkisofs/tree.c 1.92 + dup_relocated_dir() neu + dir_nesting_warn() jetzt mit zusaetzlichem contflag + generate_reloc_directory() setzt nun root_statbuf aus fstatbuf wenn root_statbuf noch nicht initialisiert wurde + Warnung ausgeben wenn readdir() scheitert + generate_xa_rr_attributes() mit DID_CHDIR in deep_flags aufrufen wenn find im CHDIR Modus lief + find_or_create_directory() prueft nun auch den gesamten Pfad damit die richtige Dir hinter rr_moved gefunden wird + find_or_create_directory() reloziet nun auch neue Directories ueber rr_moved wenn tief geschachtelte graft-points vorliegen + attach_dot_entries() setzt nun auch NEED_PL wenn dirnode->parent == reloc_dir ist. + +Sat Oct 28 21:28:54 2006 joerg + * mkisofs/mkisofs.h 1.115 + cont char * -> char * bei find_or_create_directory() + +Sat Oct 28 20:59:30 2006 joerg + * mkisofs/rock.c 1.49 + DID_CHDIR fuer readlink() auswerten + errmsg() wenn readlink() scheitert + +Sat Oct 28 20:58:17 2006 joerg + * mkisofs/mkisofs.h 1.114 + DID_CHDIR fuer deep_flag neu + +Thu Oct 26 18:04:26 2006 joerg + * mkisofs/stream.c 1.7 + * mkisofs/udf.c 1.21 + Fehlende Konsequenzen aus unsigned -> UInt32_t Wechsel nachgezogen + +Wed Oct 25 20:21:10 2006 joerg + * cdrecord/drv_dvdplus.c 1.29 + Sicherstellen, dasz -1 nicht groesser als (unsigned) 12345 angesehen wird + +Tue Oct 24 11:03:49 2006 joerg + * makefiles/RULES/MKLINKS 1.62 + sun4us (Sparc64) neu + +Sun Oct 22 13:55:44 2006 joerg + * mkisofs/tree.c 1.91 + dir_nesting_warn() neu + Abbruch bei zu tief geschachtelten Directories ist nun in insert_file_entry() + find_or_create_directory() verfolgt nun vorhandene Directories korrekt ueber die relocation Directory + +Sun Oct 22 13:47:01 2006 joerg + * mkisofs/walk.c 1.5 + state->flags |= WALK_WF_PRUNE wenn insert_file_entry() 0 zurueckliefert + +Sat Oct 21 14:57:34 2006 joerg + * mkisofs/inode.c 1.4 + mkisofs -T & mkisofs -b boot-file geht nun auch weil s_entry->inode == TABLE_INODE behandelt wird + +Sat Oct 21 10:30:03 2006 joerg + * include/schily/mconfig.h 1.58 + #include statt #include + +Sat Oct 21 10:28:39 2006 joerg + * include/schily/xconfig.h 1.1 + date and time created 06/10/21 10:28:39 by joerg + +Sat Oct 21 10:27:44 2006 joerg + * include/schily/xmconfig.h 1.34 + Dies ist nun nur noch die manuelle Konfiguration fuer VMS + +Fri Oct 20 16:55:59 2006 joerg + * libfind/find.c 1.46 + mode_t ist unsignged short und kann daher nicht ohne Cast mit -1 verglichen werden + +Fri Oct 20 15:33:49 2006 joerg + * autoconf/configure.in 1.104 + pthread_create() zuerst in -lpthread und dann in -lc suchen + +Thu Oct 19 14:58:31 2006 joerg + * cdrecord/cue.c 1.24 + getdelim() -> getworddelim() wegen Cygwin + +Thu Oct 19 12:31:36 2006 joerg + * mkisofs/diag/isoinfo.c 1.53 + * cdrecord/cdrecord.c 1.329 + Version -> 2.01.01a18 + +Thu Oct 19 12:22:53 2006 joerg + * mkisofs/mkisofs.8 1.112 + Linux kann doch rrip V1.12 lesen + +Tue Oct 17 17:19:32 2006 joerg + * makefiles/DEFAULTS/vc6-interix-setup 1.1 + * makefiles/DEFAULTS/vc6-setup 1.1 + * makefiles/DEFAULTS/vc6-cygwin-setup 1.1 + date and time created 06/10/17 17:19:32 by joerg + +Mon Oct 16 15:41:23 2006 joerg + * makefiles/RULES/cc-msposix.rul 1.7 + * makefiles/RULES/cc-msc.rul 1.7 + include $(DEFLTSROOT)/$(DEFLTSDIR)/$(VCSETUP) neu + +Tue Oct 10 16:50:58 2006 joerg + * conf/mkdep-msc-interix.sh 1.2 + * conf/mkdep-msc.sh 1.2 + .SPACE_IN_NAMES: neu + +Tue Oct 10 14:31:38 2006 joerg + * include/schily/xmconfig.h 1.33 + Halbsttische Kompilation fuer SunOS5 Sparc/x86 + +Tue Oct 10 14:30:35 2006 joerg + * include/schily/mconfig.h 1.57 + #include cuer halbstatische Kompilation + +Tue Oct 10 14:30:07 2006 joerg + * include/schily/archdefs.h 1.1 + date and time created 06/10/10 14:30:07 by joerg + +Tue Oct 10 10:31:58 2006 joerg + * include/schily/nlsdefs.h 1.1 + date and time created 06/10/10 10:31:58 by joerg + +Tue Oct 10 10:31:53 2006 joerg + * include/schily/avoffset.h 1.4 + #include + +Tue Oct 10 10:24:14 2006 joerg + * include/schily/librmt.h 1.18 + * include/schily/getargs.h 1.15 + * include/schily/libport.h 1.12 + * include/schily/string.h 1.10 + * include/schily/patmatch.h 1.12 + * include/schily/device.h 1.16 + * include/schily/fnmatch.h 8.6 + * include/schily/deflts.h 1.8 + * include/schily/unls.h 1.8 + * include/schily/standard.h 1.35 + schily/prototyp.h wird nicht benoetigt weil durch schily/mconfig inkludiert + +Tue Oct 10 09:27:57 2006 joerg + * include/schily/termcap.h 1.8 + #include fuer BOOL + +Tue Oct 10 09:27:32 2006 joerg + * include/schily/jmpdefs.h 1.4 + #include + +Mon Oct 9 00:32:06 2006 joerg + * libschily/fconv.c 1.35 + Versuch C99 isinf()/isnan() in math.h zu nutzen + +Sun Oct 8 22:45:45 2006 joerg + * autoconf/xconfig.h.in 1.105 + * autoconf/aclocal.m4 1.48 + * autoconf/configure.in 1.103 + HAVE_C99_ISINF/HAVE_C99_ISNAN neu + +Sun Oct 8 20:27:20 2006 joerg + * mkisofs/diag/isoinfo.c 1.52 + Rrip 1.12 Support neu + Bessere "ls -l" Ausgabe + +Sun Oct 8 20:14:17 2006 joerg + * mkisofs/diag/isodebug.c 1.15 + Die Checksumme im MKI Block geht nun über den PVD + +Sun Oct 8 19:55:11 2006 joerg + * mkisofs/mkisofs.h 1.113 + * mkisofs/multi.c 1.80 + * mkisofs/rock.c 1.48 + * mkisofs/mkisofs.c 1.194 + * mkisofs/mkisofs.8 1.111 + * mkisofs/inode.c 1.3 + -rrip110/-rip112 neu + +Sun Oct 8 16:31:23 2006 joerg + * mkisofs/multi.c 1.79 + isonum_xxx() beseitigt + Umstellung auf UInt32_t + +Sun Oct 8 16:29:28 2006 joerg + * mkisofs/inode.c 1.2 + * mkisofs/isonum.c 1.6 + Cstyle -Wed Jan 7 00:20:32 2004 Joerg Schilling - * scsi-wnt.c 1.35 - Anderer Version String fuer SPTI - -Wed Jan 7 00:03:55 2004 Joerg Schilling - * cdrecord.c 1.272 - Version -> 2.01a24 - -Tue Jan 6 23:58:43 2004 Joerg Schilling - * cue.c 1.18 - Wenn FILE Anweisung im CUE Sheet keinen Slash (/) enthaelt, dann wird der Filename auch im Directory des CUE Sheets gesucht - -Tue Jan 6 23:52:52 2004 Joerg Schilling - * scsitransp.c 1.88 - Version -> 0.8 +Sun Oct 8 16:28:24 2006 joerg + * mkisofs/isonum.c 1.5 + pnt -> p + +Sun Oct 8 16:26:15 2006 joerg + * mkisofs/mkisofs.h 1.112 + * mkisofs/isonum.c 1.4 + get_711()/get_721()/get_723() neu + +Sun Oct 8 15:49:56 2006 joerg + * mkisofs/udf.c 1.20 + * mkisofs/write.c 1.102 + * mkisofs/stream.c 1.6 + * mkisofs/boot.c 1.18 + * mkisofs/mkisofs.h 1.111 + * mkisofs/volume.c 1.17 + * mkisofs/mkisofs.c 1.193 + * mkisofs/joliet.c 1.44 + *extent* -> UInt32_t + +Sun Oct 8 14:44:15 2006 joerg + * mkisofs/write.c 1.101 + * mkisofs/mkisofs.c 1.192 + isonum_733() -> get_733() + +Sun Oct 8 14:37:10 2006 joerg + * mkisofs/scsi.c 1.25 + * mkisofs/multi.c 1.78 + * mkisofs/scsi.h 1.2 + readsecs() nun mit UInt32_t startsecno Parameter + +Sun Oct 8 14:27:18 2006 joerg + * mkisofs/mkisofs.h 1.110 + isonum_733() besetigt + +Sun Oct 8 14:13:22 2006 joerg + * mkisofs/mkisofs.h 1.109 + * mkisofs/isonum.c 1.3 + Umbau von {get!set}_7xx zu void * und UInt32_t + +Sun Oct 8 13:54:14 2006 joerg + * mkisofs/isonum.c 1.2 + get_7xx -> UInt32_t + +Sun Oct 8 13:53:06 2006 joerg + * mkisofs/isonum.c 1.1 + date and time created 06/10/08 13:53:06 by joerg + +Sun Oct 8 13:51:43 2006 joerg + * mkisofs/Makefile 1.24 + * mkisofs/mkisofs.h 1.108 + * mkisofs/write.c 1.100 + {get!set}_7xx Routinen -> isonum.c + +Sun Oct 8 13:24:20 2006 joerg + * mkisofs/write.c 1.99 + Kommentare fuer die die {get!set}_7xx Routinen + +Sat Oct 7 20:22:01 2006 joerg + * mkisofs/inode.c 1.1 + date and time created 06/10/07 20:22:01 by joerg + +Sat Oct 7 20:10:15 2006 joerg + * mkisofs/mkisofs.c 1.191 + getfind() Prototyp neu + GCC Warnungen vermeien + +Sat Oct 7 20:08:39 2006 joerg + * libfind/walk.h 1.17 + * libfind/find.h 1.11 + * include/schily/walk.h 1.17 + * include/schily/find.h 1.11 + #include neu + +Sat Oct 7 20:08:17 2006 joerg + * mkisofs/walk.c 1.4 + * mkisofs/mkisofs.h 1.107 + Prototyp fuer walkfunc() neu + +Sat Oct 7 20:07:26 2006 joerg + * mkisofs/tree.c 1.90 + GCC Warnungen beseitigen + +Sat Oct 7 19:51:19 2006 joerg + * libfind/find.h 1.10 + * include/schily/find.h 1.10 + #include neu + +Sat Oct 7 17:15:13 2006 joerg + * mkisofs/mkisofs.c 1.190 + * mkisofs/mkisofs.h 1.106 + #define NULL_INO_MAX fuer null_inodes neu + +Fri Oct 6 23:50:36 2006 joerg + * mkisofs/write.c 1.98 + Checksummengenerierung fuer PVD in MKI Block neu + Aufruf von do_inode(root) & do_dir_nlink(root) neu + +Fri Oct 6 23:49:18 2006 joerg + * mkisofs/multi.c 1.77 + Checksummenpruefung fuer MKI Block neu + curr_entry->starting_block von altem ISO Directory Record uebernehmen bei -multi + Bei -multi neue Inode Nummer vegeben fuer alte Dateien mit size 0 + +Thu Oct 5 21:14:58 2006 joerg + * cdrecord/drv_dvdplus.c 1.28 + Layer Break align nicht pruefen bei dp->cdr_dstat->ds_layer_break == -1 -Tue Jan 6 23:33:20 2004 Joerg Schilling - * scsi-wnt.c 1.33 +Thu Oct 5 21:07:47 2006 joerg + * cdrecord/cd_misc.c 1.14 Cstyle -Tue Jan 6 23:21:14 2004 Joerg Schilling - * scsi-wnt.c 1.32 - SPTI Unterdrueckung von nocht CD-ROM deaktiviert - -Tue Jan 6 23:10:18 2004 Joerg Schilling - * scsi-wnt.c 1.31 - Erste Version mit SPTI Support - -Tue Jan 6 17:58:47 2004 Joerg Schilling - * scsi-mac-iokit.c 1.5 - scgo_havebus() korrigiert (war immer FALSE) damit pxupgrade funktioniert - -Tue Jan 6 01:01:59 2004 Joerg Schilling - * drv_mmc.c 1.153 - cmd_dummy statt init_mmc in den Treiberstrukturen fuer CD-ROM Leser - -Sun Jan 4 15:26:25 2004 Joerg Schilling - * scsi-sun.c 1.79 - Erste Version einer UID Verwaltung die fuer Solaris 9 USCSI gebraucht wird - -Fri Jan 2 16:05:57 2004 Joerg Schilling - * scsi-sun.c 1.78 - Erste Version die mit Volume Management arbeitet - -Fri Jan 2 16:05:21 2004 Joerg Schilling - * cdrecord.c 1.271 - Version -> 2.01a23 - -Fri Jan 2 16:05:06 2004 Joerg Schilling - * scsi_scan.c 1.16 - Hack fuer fd == -1 -> Kein Zugriff auf LW -> '?' statt '*' - -Tue Dec 30 14:20:00 2003 Joerg Schilling - * cdrecord.c 1.270 - Schreibfehler will not not Korrigiert - -Mon Dec 29 15:25:05 2003 Joerg Schilling - * cdrecord.1 1.90 - Bessere Beschreibung und Beispiel fuer -setdropts driveropts= - -Wed Dec 24 11:51:56 2003 Joerg Schilling - * drv_mmc.c 1.152 - Hinweis auf RAW bei nicht funktionierendem CUE Sheet - -Tue Dec 23 13:48:33 2003 Joerg Schilling - * cdrecord.c 1.269 - Version -> 2.01a21 - Hack fuer POSIX_PRIORITY_SCHEDULING Bug (wir brauchen root Rechte um die Pri zu verringern) - -Sun Dec 21 14:29:21 2003 Joerg Schilling - * cdrecord.1 1.89 - Neuer Absatz ueber ATAPI auf erster Seite. - -Thu Dec 18 17:10:58 2003 Joerg Schilling - * scsitransp.c 1.87 - Aehnlicher Text wie in cdrecord.c wenn !defined(IS_SCHILY_XCONFIG) - -Thu Dec 18 17:10:26 2003 Joerg Schilling - * cdrecord.c 1.268 - Neuer Text fuer modifizierte Versionen ohne Support - -Thu Dec 18 17:09:41 2003 Joerg Schilling - * cdrecord.1 1.88 - .sp verschoben auf Wunsch von Eric Raymond - -Tue Dec 16 00:42:16 2003 Joerg Schilling - * cdrecord.c 1.267 - Security Test Ausgabe nun auch ohne Root Zugriff sichtbar - -Mon Dec 15 16:40:59 2003 Joerg Schilling - * cdrecord.c 1.266 - Ausgabe des Resultats des Security Checks - -Mon Dec 15 09:19:24 2003 Joerg Schilling - * drv_mmc.c 1.151 - Copyright -> 2003 - -Mon Dec 15 09:18:14 2003 Joerg Schilling - * drv_mmc.c 1.150 - Ein DVD Brenner wird nun auch erkannt wenn er nur MMC-3 und nicht MMC-2 konform ist - Hinweis auf ftp://ftp.berlios.de/pub/cdrecord/ProDVD/ - -Mon Dec 15 07:32:55 2003 Joerg Schilling - * cdrecord.c 1.265 - comexit(0); nach "erstem" -force blank unit entfernt damit auch mit dem Ricoh-5125 Medien erweckt werden koennen - -Thu Dec 11 12:59:54 2003 Joerg Schilling - * scsireg.h 1.30 - #ifdef __SCG_COMPAT_ zum enablen von info/ident/revision -> vendor_info/prod_ident/prod_revision - -Thu Dec 11 12:55:42 2003 Joerg Schilling - * scsi_scan.c 1.15 - * scsi_cdr.c 1.135 - info -> vendor_info, ident -> prod_ident, revision -> prod_revision - -Wed Dec 10 00:42:39 2003 Joerg Schilling - * scsi-dos.c 1.11 - Hinweis auf http://bootcd.narod.ru/ - -Wed Dec 10 00:40:49 2003 Joerg Schilling - * cdrecord.c 1.264 - Hinweis auf ftp://ftp.berlios.de/pub/cdrecord/ProDVD/ - -Wed Dec 10 00:19:03 2003 Joerg Schilling - * cdrecord.c 1.263 - Version -> 2.01a20 - FIFO Abschalten wenn fifosize < 2*bufsize - -Tue Dec 9 20:52:14 2003 Joerg Schilling - * cdrecord.1 1.87 - ..sp -> .sp Schreibfehler - -Sun Nov 30 13:50:31 2003 Joerg Schilling - * scsi-dos.c 1.10 - schcgeck funktioniert nun, kein DMAresid und max sense_count 18 - -Sun Nov 30 00:00:01 2003 Joerg Schilling - * xio.c 1.7 - * readcd.c 1.62 - #include auch fuer DJGPP - -Sat Nov 29 23:36:39 2003 Joerg Schilling - * scsi-dos.c 1.9 - Srb.Type.ExecSCSICmd.SenseLen = DEF_SENSE_LEN; -> Srb.Type.ExecSCSICmd.SenseLen = (SENSE_LEN+2); - -Sat Nov 29 23:11:56 2003 Joerg Schilling - * readcd.c 1.61 - Version -> 2.01a20 - -Sat Nov 29 23:10:16 2003 Joerg Schilling - * xio.c 1.6 - setmode(fileno, O_BINARY) auch fuer DJGPP - -Sat Nov 29 23:10:00 2003 Joerg Schilling - * readcd.c 1.60 - #include fuer __CYGWIN32__/__EMX__ - setmode(fileno, O_BINARY) auch fuer DJGPP - -Sat Nov 29 23:03:06 2003 Joerg Schilling - * scsi-dos.c 1.8 - Sense_len & sense_count korrekt beachten - SS_ERR -> vor die invalid Device & Cannot Select Bus cases im switch in send_cmd() - -Sat Nov 29 22:28:57 2003 Joerg Schilling - * scsi-dos.c 1.7 - Schreibfehler is statt if beseitigt - -Sat Nov 29 19:11:41 2003 Joerg Schilling - * scsi-os2.c 1.24 - Return (0) statt -1 bei FATAL Error in send_cmd() wenn kein gueltiges Target gesetzt ist - -Sat Nov 29 19:10:48 2003 Joerg Schilling - * scsi-dos.c 1.6 - Neuer AspiLoaded Counter fuer mehrfaches Oeffnen - -Sat Nov 29 19:06:55 2003 Joerg Schilling - * scsi-wnt.c 1.30 - Return (0) statt -1 bei FATAL Error in send_cmd() wenn kein gueltiges Target gesetzt ist - SS_ERR mit cp->SRB_TargStat != 0 ist nun SCG_NO_ERROR - AspiLoaded ist nun integer Counter damit mehrere open()s moeglich sind - -Sat Nov 29 19:04:36 2003 Joerg Schilling - * scsi-dos.c 1.5 - Return (0) statt -1 bei FATAL Error in send_cmd() wenn kein gueltiges Target gesetzt ist - SS_ERR mit Srb.Type.ExecSCSICmd.TargStat != 0 ist nun SCG_NO_ERROR +Thu Oct 5 17:56:50 2006 joerg + * libschily/raisecond.c 1.20 + * libschily/saveargs.c 1.13 + * libschily/getfp.c 1.16 + * libschily/handlecond.c 1.24 + * libschily/setfp.c 1.13 + * libschily/getav0.c 1.18 + #include -> #include + +Wed Oct 4 20:04:12 2006 joerg + * mkisofs/hash.c 1.23 + * mkisofs/mkisofs.c 1.189 + Cstyle -Sat Nov 29 18:58:35 2003 Joerg Schilling - * scsi-dos.c 1.4 +Wed Oct 4 00:48:19 2006 joerg + * mkisofs/tree.c 1.89 + update_nlink()/update_nlink_field() ist nun in deutliche verbesserter Form in inode.c + increment_nlink() beseitigt weil nicht mehr noetig + increment_nlink() wird nun nicht mehr beim Anlegen von rr_moved aufgerufen weil do_dir_nlink() (neu) korrekt arbeitet + +Wed Oct 4 00:44:22 2006 joerg + * mkisofs/mkisofs.c 1.188 + Version -> 2.01.01a18 + cache_inodes bei Cygwin mit 64 Bit Inodes wieder per Default aktivieren + null_inodes/correct_inodes neu + Mehr Verbose Meldungen + Korrekte Meldung ueber geschriebene Datenmenge bei Multi-Session + +Wed Oct 4 00:21:24 2006 joerg + * mkisofs/mkisofs.h 1.105 + do_dir_nlink() neu + +Wed Oct 4 00:20:54 2006 joerg + * mkisofs/apple_driver.mk 1.2 + * mkisofs/Makefile 1.23 + -DHAVE_CONFIG_H & -DUSE_LIBSCHILY beseitigt weil nicht mehr noetig + +Tue Oct 3 15:13:34 2006 joerg + * mkisofs/udf.c 1.19 + * mkisofs/stream.c 1.5 + * mkisofs/scsi.c 1.24 + * mkisofs/rock.c 1.47 + * mkisofs/name.c 1.30 + Copyright -> 2006 + +Tue Oct 3 13:48:36 2006 joerg + * mkisofs/write.c 1.97 + * mkisofs/tree.c 1.88 + * mkisofs/multi.c 1.76 + * mkisofs/mkisofs.c 1.187 + * mkisofs/joliet.c 1.43 + * mkisofs/match.c 1.23 + * mkisofs/rock.c 1.46 + * mkisofs/scsi.c 1.23 + * mkisofs/hash.c 1.22 + * mkisofs/files.c 1.15 + * mkisofs/exclude.c 1.11 + * mkisofs/udf.c 1.18 + * mkisofs/ifo_read.c 1.8 + * mkisofs/eltorito.c 1.38 + * mkisofs/dvd_reader.c 1.6 + * mkisofs/dvd_file.c 1.6 + * mkisofs/apple.c 1.23 + USE_LIBSCHILY beseitigt + +Tue Oct 3 13:30:03 2006 joerg + * mkisofs/tree.c 1.87 + Bessere Definitionen fuer PREV_SESS_DEV/TABLE_INODE/UNCACHED_INODE/UNCACHED_DEVICE + +Mon Oct 2 16:57:53 2006 joerg + * mkisofs/mkisofs.h 1.104 + Sruct file_hash nun mit "nlink" Member + Neue Variablen null_inodes & correct_inodes + Bessere Definitionen fuer PREV_SESS_DEV/TABLE_INODE/UNCACHED_INODE/UNCACHED_DEVICE + +Mon Oct 2 16:48:52 2006 joerg + * mkisofs/rock.c 1.45 + Support fuer Rock Ridge:1995 + +Mon Oct 2 16:30:22 2006 joerg + * mkisofs/multi.c 1.75 + Nur noch die wirkliche wahre Groesse vom Iso Directory Record in read_merging_directory() kopieren. Bug Report von Fukuhara Kazuhiko <00kazuhiko@bb.excite.co.jp> + +Mon Oct 2 16:25:02 2006 joerg + * mkisofs/Makefile 1.22 + inode.c neu + +Mon Oct 2 16:24:42 2006 joerg + * mkisofs/hash.c 1.21 + Hash size von 1024 -> 16*1024 + Neuer besserer Inode Hash Algorithmus + hash_table und directory_hash_table nun im BSS Segment + debug_hash() neu + "assigned zero extent" Abbruchbedingung war falsch + UNCACHED Bedingung verbessert + struct file_hash directory_hash_table nat nun zusaetzliche Summe ueber den Namen um find_file_hash() effektiver zu machen + +Sat Sep 30 01:52:25 2006 joerg + * mkisofs/diag/isodebug.c 1.14 + Test auf Checksum Signatur + +Fri Sep 29 14:02:07 2006 joerg + * cdrecord/scsi_mmc.c 1.26 + gcc Warnungen ueber ungenutze Variablen + +Fri Sep 29 13:49:21 2006 joerg + * cdrecord/scsi_mmc.c 1.25 + gconf() Code beseitigt + print_format_capacities() verbessert + +Fri Sep 29 13:48:16 2006 joerg + * cdrecord/Makefile 1.37 + * cdrecord/cdrecord.c 1.328 + gconf() Code beseitigt + +Fri Sep 29 13:46:07 2006 joerg + * cdrecord/drv_dvdplus.c 1.27 + * cdrecord/drv_mmc.c 1.174 + Aufruf von print_format_capacities(scgp); bei -atip neu + +Thu Sep 28 17:45:59 2006 joerg + * cdrecord/drv_dvdplus.c 1.26 + Manual Layerbreak mit driveropts=layerbreak=# + +Thu Sep 28 17:40:23 2006 joerg + * cdrecord/drv_mmc.c 1.173 + Bei lverbose > 1 print_features() + +Thu Sep 28 17:39:09 2006 joerg + * cdrecord/scsi_mmc.c 1.24 + Neue Features 0x33, 0x38, 0x3A, 0x40, 0x41, 0x42, 0x50, 0x51, 0x80, 0x10C, 0x10D, 0x110 + fname_known() neu + print_features() neu + +Thu Sep 28 17:33:17 2006 joerg + * cdrecord/cdrecord.c 1.327 + Version -> 2.01.01a17 + -prcap ruft nun auch print_profiles() und print_features() + +Thu Sep 28 17:32:36 2006 joerg + * cdrecord/cdrecord.h 1.178 + print_features() neu + +Thu Sep 28 15:51:25 2006 joerg + * cdrecord/scsi_mmc.c 1.23 + DVD+RW/DL Profil neu + +Thu Sep 28 15:00:01 2006 joerg + * cdrecord/drv_mmc.c 1.172 + mmc_opthelp() nun mit scgp Parameter wegen DVD+R/DL layerbreak + hasdrvoptx() neu wegen layerbreak vs. layerbreak=# + hasdrvoptx()/hasdrvopt() beruecksichtigt nun korrekt die Stringlaenge der Optionen und verbietet damit beliebige Abkuerzungen + Test auf DVD-R/DL layer jump recording prueft nun auch mit has_profile(scgp, 0x16) == 1 bevor CDR_LAYER_JUMP gesetzt wird + varirec=/gigarec= -> varirec/gigarec wegen beruecksichtigt der Stringlaenge der Optionen + +Thu Sep 28 14:54:17 2006 joerg + * cdrecord/cdrecord.h 1.177 + mmc_opthelp() nun mit scgp Parameter wegen DVD+R/DL layerbreak + +Thu Sep 28 14:52:52 2006 joerg + * cdrecord/cdrecord.1 1.109 + driveropts=layerbreak dokumentiert + +Thu Sep 28 04:43:23 2006 joerg + * cdrecord/cdrecord.c 1.326 + dsp->ds_layer_break (neu) mit -1 initialisieren + +Thu Sep 28 04:42:52 2006 joerg + * cdrecord/cdrecord.h 1.176 + dp->cdr_dstat->ds_layer_break und hasdrvoptx() neu + +Wed Sep 27 21:56:13 2006 joerg + * cdrecord/scsi_mmc.c 1.22 + * cdrecord/cdrecord.h 1.175 + has_profile() neu + +Wed Sep 27 02:01:35 2006 joerg + * libfind/walk.h 1.16 + * include/schily/walk.h 1.16 + * libfind/walk.c 1.18 + walkopen()/walkgethome() neu + +Tue Sep 26 21:01:49 2006 joerg + * mkisofs/mkisofs.c 1.186 + * libfind/find.h 1.9 + * libfind/find.c 1.45 + * include/schily/find.h 1.9 + * libfind/find_main.c 1.46 + init_findargs() -> find_argsinit(), init_findtime() -> find_timeinit() + +Tue Sep 26 16:10:46 2006 joerg + * libschily/libschily-mapvers 1.4 + getvargs getvallargs getvfiles getargerror neu + +Tue Sep 26 16:08:06 2006 joerg + * libscg/scsihack.c 1.46 + * scgskeleton/scgskeleton.c 1.22 + * scgskeleton/doit.c 1.22 + * libhfs_iso/low.c 1.6 + * libhfs_iso/record.c 1.3 + * libhfs_iso/node.c 1.4 + * libhfs_iso/volume.c 1.6 + * libhfs_iso/btree.c 1.5 + * libhfs_iso/hfs.c 1.11 + * libhfs_iso/block.c 1.5 + * libhfs_iso/file.c 1.5 + * mkisofs/volume.c 1.16 + * mkisofs/tree.c 1.86 + * mkisofs/apple.c 1.22 + * mkisofs/multi.c 1.74 + * mkisofs/mkisofs.c 1.185 + * mkisofs/write.c 1.96 + * mkisofs/files.c 1.14 + * cdda2wav/interface.c 1.48 + * cdda2wav/toc.c 1.66 + * cdda2wav/semshm.c 1.20 + * cdda2wav/cdda2wav.c 1.73 + * cdda2wav/ioctl.c 1.29 + * rscsi/rscsi.c 1.31 + * cdrecord/scsi_scan.c 1.21 + * cdrecord/scsi_mmc.c 1.21 + * cdrecord/scsi_cdr_mmc4.c 1.3 + * cdrecord/fifo.c 1.51 + * cdrecord/scsi_cdr.c 1.142 + * cdrecord/scsi_mmc4.c 1.3 + * cdrecord/drv_simul.c 1.51 + * cdrecord/drv_mmc.c 1.171 + * cdrecord/drv_sony.c 1.75 + * cdrecord/drv_jvc.c 1.85 + * cdrecord/cue.c 1.23 + * cdrecord/cdrecord.c 1.325 + * cdrecord/drv_7501.c 1.20 + * libscg/scsitransp.c 1.93 + * libscg/scsiopen.c 1.97 + * libscg/scsi-remote.c 1.20 + * libschily/geterrno.c 1.11 + * libschily/seterrno.c 1.10 + * libschily/fexec.c 1.26 + * libschily/gethostid.c 1.17 + * libschily/presume.c 1.2 + * libschily/spawn.c 1.19 + * libschily/rename.c 1.8 + * libschily/strtod.c 1.3 + * libschily/comerr.c 1.31 + * libfind/walk.c 1.17 + errno.h -> schily/errno.h + +Tue Sep 26 15:58:27 2006 joerg + * include/schily/errno.h 1.5 + EEXIST / ENDOFFILE neu + +Tue Sep 26 15:03:28 2006 joerg + * include/schily/errno.h 1.4 + JOS EBADHEADER EACCESS ENOFILE neu + +Tue Sep 26 14:58:31 2006 joerg + * include/schily/errno.h 1.3 + #define EMISSDIR ENOENT bei UNIX + +Tue Sep 26 14:18:17 2006 joerg + * include/schily/avoffset.h 1.3 + * include/schily/align.h 1.3 + * include/schily/xmconfig.h 1.32 + #ifdef SCHILY_BUILD neu + +Tue Sep 26 13:59:02 2006 joerg + * makefiles/RULES/cc-sunpro64.rul 1.4 + * makefiles/RULES/cc-sunpro.rul 1.3 + * makefiles/RULES/cc-bemwcc.rul 1.5 + * makefiles/RULES/cc-gcc64.rul 1.4 + * makefiles/RULES/cc-msc.rul 1.6 + * makefiles/RULES/cc-sun.rul 1.3 + * makefiles/RULES/cc-sony.rul 1.3 + * makefiles/RULES/cc-sgi.rul 1.3 + * makefiles/RULES/cc-dec.rul 1.3 + * makefiles/RULES/cc-dg.rul 1.3 + * makefiles/RULES/cc-sco_uw.rul 1.3 + * makefiles/RULES/cc-hp.rul 1.3 + * makefiles/RULES/cc-sco_os.rul 1.4 + * makefiles/RULES/cc-dumb.rul 1.3 + * makefiles/RULES/cc-msposix.rul 1.6 + * makefiles/RULES/cc-gcc.rul 1.3 + * makefiles/RULES/cc-ibm.rul 1.3 + * makefiles/RULES/cc-apollo.rul 1.4 + -DSCHILY_BUILD neu + +Tue Sep 26 13:45:07 2006 joerg + * include/schily/errno.h 1.2 + JOS error.h, HAVE_STRERROR, geterrno()/seterrno() Prototypen + +Tue Sep 26 13:19:50 2006 joerg + * libschily/astoull.c 1.1 + date and time created 06/09/26 13:19:50 by joerg + +Tue Sep 26 13:17:09 2006 joerg + * libschily/stdio/schilyio.h 2.24 + #include neu + +Tue Sep 26 13:16:36 2006 joerg + * libschily/stdio/ffileread.c 1.11 + * libschily/stdio/nixwrite.c 1.6 + * libschily/stdio/niread.c 1.13 + * libschily/stdio/nixread.c 1.13 + * libschily/stdio/niwrite.c 1.6 + errno.h -> schilyio.h + +Tue Sep 26 13:07:50 2006 joerg + * include/schily/errno.h 1.1 + date and time created 06/09/26 13:07:50 by joerg + +Tue Sep 26 13:06:57 2006 joerg + * include/schily/jos_defs.h 1.5 + /* BEGIN CSTYLED */ ... um VOID + +Tue Sep 26 13:05:35 2006 joerg + * include/schily/jos_defs.h 1.4 + * include/schily/standard.h 1.34 + VOID -> jos_defs.h + +Tue Sep 26 00:16:19 2006 joerg + * include/schily/align.h 1.2 + * include/schily/avoffset.h 1.2 + Gegerscher Kopyright Kommentar neu + +Mon Sep 25 23:45:37 2006 joerg + * libedc/edc_ecc.c 1.24 + * libschily/fillbytes.c 1.15 + * libschily/findbytes.c 1.4 + * libschily/cmpbytes.c 1.17 + * libschily/cmpnullbytes.c 1.4 + * libschily/movebytes.c 1.15 + align.h -> schily/align.h + +Mon Sep 25 23:38:38 2006 joerg + * libschily/align_test.c 1.22 + #include ist nach schily/align.h verlegt worden + +Mon Sep 25 23:14:26 2006 joerg + * include/schily/align.h 1.1 + * include/schily/avoffset.h 1.1 + date and time created 06/09/25 23:14:26 by joerg + +Mon Sep 25 22:51:10 2006 joerg + * include/schily/mconfig.h 1.56 + Copyright -> 2006 + +Mon Sep 25 22:48:41 2006 joerg + * include/schily/mconfig.h 1.55 + Entscheidung statische/dynamische Autokonfiguration faellt nun in schily/xmconfig.h + +Mon Sep 25 22:48:06 2006 joerg + * include/schily/xmconfig.h 1.31 + Entscheidung statische/dynamische Autokonfiguration faellt nun hier statt in mconfig.h + Nur VMS hat noch eine statische Konfiguration + +Mon Sep 25 13:59:47 2006 joerg + * cdrecord/cdrecord.c 1.324 + Version -> 2.01.01a16 + +Mon Sep 25 13:55:43 2006 joerg + * cdrecord/readcd.c 1.82 + Copyright -> 2006 + Version -> 2.01.01a16 + Umstellung auf include schily/* + -edc-corr/fread_2048() neu (eigentlich vom 15.Mai 2006) + meshpoints -factor gibt nun um secsize korrigierte Werte + +Sun Sep 24 15:59:31 2006 joerg + * mkisofs/diag/isodebug.c 1.13 + Version -> 2.01.01a16 + +Sun Sep 24 15:57:56 2006 joerg + * mkisofs/diag/isodebug.c 1.12 + Der Debug Block wird nun auch gefunden wenn UDF auf dem Medium ist + +Sun Sep 24 15:52:24 2006 joerg + * cdrecord/cue.c 1.22 + * cdrecord/scsi_mmc.c 1.20 + * cdrecord/io.c 1.3 + * cdrecord/drv_7501.c 1.19 + * cdrecord/drv_dvdplus.c 1.25 + * cdrecord/drv_dvd.c 1.129 + * mkisofs/udf.c 1.17 + * mkisofs/write.c 1.95 Cstyle -Sat Nov 29 18:30:44 2003 Joerg Schilling - * scsi-dos.c 1.3 - Umbau auf _go32_dpmi_allocate_real_mode_callback_retf() - -Fri Nov 28 10:25:15 2003 Joerg Schilling - * scsi-dos.c 1.2 - Callback Funktion neu - -Fri Nov 28 02:33:18 2003 Joerg Schilling - * scsihack.c 1.43 - scsi-dos.c neu - -Fri Nov 14 10:55:14 2003 Joerg Schilling - * scsi-dos.c 1.1 - date and time created 03/11/14 10:55:14 by joerg - -Sun Nov 2 23:50:22 2003 Joerg Schilling - * fifo.c 1.46 - fifo_percent() fragt nun (sp == NULL) ab um festzustellen of der FIFO aus ist - -Wed Oct 29 15:33:45 2003 Joerg Schilling - * scsi-remote.c 1.14 - strcatl()/concat()/*execl() casten nun NULL im letzten Arg nach (char *)NULL - -Wed Oct 1 00:39:23 2003 Joerg Schilling - * cdrecord.h 1.156 - Kommentar ueber minimale FIFO Groesse - -Sun Aug 24 13:15:10 2003 Joerg Schilling - * cdrecord.1 1.86 - driveropts in /Etc/default/cdrecord dokumentiert - -Tue Jul 22 21:43:08 2003 Joerg Schilling - * cdrecord.c 1.262 - Version -> 2.01a17 - -Mon Jul 21 00:06:31 2003 Joerg Schilling - * cdrecord.h 1.155 - * cdrecord.1 1.85 - * cdrecord.c 1.261 - Neue Option ts= - -Fri Jul 18 10:04:20 2003 Joerg Schilling - * readcd.c 1.59 - Version -> 2.01a17 - Teilweise #ifndef EXTVERS -> #ifdef CLONE_WRITE fuer genauere Beschreibung des Kodes - -Fri Jul 18 10:03:04 2003 Joerg Schilling - * scsi_cdr.c 1.134 - Kommentar Hinweis in cdr_underrun() +Sun Sep 24 15:44:20 2006 joerg + * cdrecord/cdrecord.c 1.323 + Schreibfehler bei CLONE_WRITE not yet implemented -> not compiled in + +Sun Sep 24 15:22:58 2006 joerg + * mkisofs/mkisofs.c 1.184 + Version -> 2.01.01a16 + Umstellung auf strlcpy() + "struct directory de" in get_graft() nun mit fillbytes() initialsiert + +Sun Sep 24 15:19:54 2006 joerg + * mkisofs/multi.c 1.73 + * mkisofs/tree.c 1.85 + Umstellung auf strlcpy() + +Sun Sep 24 15:13:52 2006 joerg + * mkisofs/write.c 1.94 + xfwrite macht nun abort() wenn size oder count == 0 + Umstellung auf strlcpy() + +Fri Sep 22 15:07:49 2006 joerg + * include/schily/utypes.h 1.22 + #undef SIZE_T_MAX fuer FreeBSD + +Tue Sep 19 18:30:43 2006 joerg + * mkisofs/joliet.c 1.42 + * mkisofs/boot.c 1.17 + * mkisofs/hash.c 1.20 + * mkisofs/eltorito.c 1.37 + * mkisofs/apple.c 1.21 + * mkisofs/write.c 1.93 + * mkisofs/scsi.c 1.22 + * mkisofs/multi.c 1.72 + Cstyle -Fri Jul 11 11:43:25 2003 Joerg Schilling - * cdrecord.1 1.84 +Tue Sep 19 15:56:27 2006 joerg + * mkisofs/dvd_reader.c 1.5 + * mkisofs/ifo_read.c 1.7 + * mkisofs/dvd_file.c 1.5 Schreibfehler -Sun Jul 6 00:04:14 2003 Joerg Schilling - * scsi-os2.c 1.23 - EIO statt EINVAL damit Scan fuer Targets > 7 klappt - -Sat Jun 21 21:42:56 2003 Joerg Schilling - * scsi-sun.c 1.77 - Workaround fuer Solaris 8 x86 Bug: DKIOCINFO liefert 256 kB DMAsize aber nur 68 kB geht bei ATAPI & DMA - -Sat Jun 21 19:42:26 2003 Joerg Schilling - * readcd.c 1.58 - Neue Option -factor - -Fri Jun 20 22:47:08 2003 Joerg Schilling - * readcd.c 1.57 - Neue Option ts= fuer Transfer size - -Fri Jun 20 22:32:59 2003 Joerg Schilling - * readcd.c 1.56 - Residual count auswerten beim Lesen - -Fri Jun 20 22:21:33 2003 Joerg Schilling - * readcd.c 1.55 - prstats_silent() Prototyp neu - Versuch damit klarzukommen dasz einige BS (UnixWare) nicht mit odd byte DMA bei ATAPI klarkommen (READ FULL TOC) - Ausgabe aller Lead out startzeiten bei -clone (READ FULL TOC) - Geschwindigkeitsangaben beziehen sich auf 1000 Byte == 1 kb - Hack to write empty disks geht mit end == 1 statt end == 0 +Tue Sep 19 15:02:04 2006 joerg + * cdrecord/cdrecord.c 1.322 + * cdrecord/drv_mmc.c 1.170 + * cdrecord/cdrecord.h 1.174 + Test auf Layer Jump Recording (DVD-R/DL) + +Tue Sep 19 13:36:55 2006 joerg + * cdrecord/cdrecord.h 1.173 + * cdrecord/drv_philips.c 1.71 + * cdrecord/drv_simul.c 1.50 + * cdrecord/drv_mmc.c 1.169 + * cdrecord/drv_jvc.c 1.84 + * cdrecord/drv_dvdplus.c 1.24 + * cdrecord/drv_sony.c 1.74 + * cdrecord/drv_dvd.c 1.128 + * cdrecord/drv_7501.c 1.18 + cdr_wrmodedef neu + +Tue Sep 19 13:21:58 2006 joerg + * cdrecord/drv_dvd.c 1.127 + print_dvd22()/print_dvd23() neu + set_layerbreak() neu + +Sun Sep 17 22:28:30 2006 joerg + * cdrecord/cdrecord.h 1.172 + WT_LAYER_JUMP Page 5 write_mode neu + +Sun Sep 17 22:27:57 2006 joerg + * cdrecord/scsimmc.h 1.16 + dvd_structure_22 & dvd_structure_23 neu + +Sun Sep 17 22:18:35 2006 joerg + * libfind/find_main.c 1.45 + Umbau auf -lfind + +Sun Sep 17 14:43:29 2006 joerg + * cdrecord/scsimmc.h 1.15 + struct dvd_structure_20 neu + +Sun Sep 17 14:43:10 2006 joerg + * cdrecord/drv_dvd.c 1.126 + DVD-RAM Support neu + +Sun Sep 17 14:40:19 2006 joerg + * cdrecord/drv_mmc.c 1.168 + DVD-RAM auf DVD- Treiber lenken + +Sun Sep 17 14:33:53 2006 joerg + * cdrecord/scsi_cdr.c 1.141 + DEV_MMC_DVD_WR nun auch mit DVD-RAM Text + +Sun Sep 17 14:32:23 2006 joerg + * cdrecord/cdrecord.h 1.171 + Definitionen fuer ds_type neu + +Sun Sep 17 12:41:51 2006 joerg + * cdrecord/drv_dvd.c 1.125 + * cdrecord/drv_dvdplus.c 1.23 + przone() nicht mehr LOCAL + print_dvd20() neu + alte send_dvd_structure() Funktion auskommentiert - ist nun in scsi_cdr.c + set_p_layerbreak() neu + +Sat Sep 16 22:03:53 2006 joerg + * mkisofs/Makefile 1.21 + $(LIB_INTL) fue rgettext() in libfind neu + +Sat Sep 16 22:01:40 2006 joerg + * autoconf/configure.in 1.102 + * autoconf/xconfig.h.in 1.104 + * autoconf/rules.cnf.in 1.10 + HAVE_GETTEXT und LIB_INTL neu + +Sat Sep 16 17:24:29 2006 joerg + * cdrecord/cdrecord.h 1.170 + * cdrecord/scsi_cdr.c 1.140 + send_dvd_structure() neu + +Fri Sep 15 22:57:28 2006 joerg + * libscg/libscg-mapvers 1.1 + date and time created 06/09/15 22:57:28 by joerg + +Fri Sep 15 22:53:16 2006 joerg + * libscg/Targets 1.1 + date and time created 06/09/15 22:53:16 by joerg + +Fri Sep 15 20:47:13 2006 joerg + * cdrecord/cdrecord.c 1.321 + Version -> 2.01.01a15 + +Fri Sep 15 17:04:56 2006 joerg + * mkisofs/mkisofs.c 1.183 + now/sixmonths beseitigt + +Fri Sep 15 16:17:50 2006 joerg + * libfind/find.c 1.44 + * libfind/find.h 1.8 + * libfind/find_main.c 1.44 + * include/schily/find.h 1.8 + find_printnode()/find_addprint() neu + usage() -> find_usage() + +Fri Sep 15 16:10:46 2006 joerg + * libfind/libfind-mapvers 1.1 + date and time created 06/09/15 16:10:46 by joerg + +Fri Sep 15 15:30:10 2006 joerg + * libfind/find_list.c 1.13 + * include/schily/find.h 1.7 + * libfind/find_main.c 1.43 + * libfind/find.h 1.7 + * libfind/find.c 1.43 + now -> find_now, sixmonth -> find_sixmonth, init_findtime() neu + +Fri Sep 15 15:28:32 2006 joerg + * mkisofs/mkisofs.c 1.182 + init_findtime() neu -Tue Jun 17 19:23:35 2003 Joerg Schilling - * cdrecord.1 1.83 +Fri Sep 15 15:06:21 2006 joerg + * libfind/walk.c 1.16 + Cstyle + +Fri Sep 15 15:02:14 2006 joerg + * libfind/walk.h 1.15 + * include/schily/walk.h 1.15 + * libfind/find_list.c 1.12 + acctime -> WALK_LS_ATIME, Ctime -> WALK_LS_CTIME + +Fri Sep 15 14:49:56 2006 joerg + * libfind/walk.c 1.15 + Anmerkungen zu thread safe Kernvertierung + +Fri Sep 15 14:14:46 2006 joerg + * include/schily/walk.h 1.14 + * libfind/walk.h 1.14 + * libfind/walk.c 1.14 + WALK_NOMSG neu + +Fri Sep 15 13:39:21 2006 joerg + * libfind/walk.c 1.13 + * include/schily/walk.h 1.13 + * libfind/walk.h 1.13 + Globale Variablen beseitigt + +Fri Sep 15 13:01:21 2006 joerg + * libfind/walk.h 1.12 + * libfind/find.c 1.42 + * libfind/find.h 1.6 + * libfind/find_main.c 1.42 + * libfind/walk.c 1.12 + * include/schily/find.h 1.6 + * include/schily/walk.h 1.12 + walkhome()/walkclose() nun mit struct WALK * Parameter + auxi/auxp neu in struct WALK + Umstellung auf include schily/* + +Fri Sep 15 01:53:32 2006 joerg + * libedc/Makefile 1.3 + libedc_dec neu + +Fri Sep 15 01:53:11 2006 joerg + * libedc/libedc_dec_p.mk 1.1 + * libedc/shledc_dec.mk 1.1 + * libedc/noshledc_dec.mk 1.1 + * libedc/libedc_p.mk 1.1 + date and time created 06/09/15 01:53:11 by joerg + +Fri Sep 15 01:51:31 2006 joerg + * libhfs_iso/Makefile 1.4 + Es ist jetzt ein unterverteil Makefile + +Fri Sep 15 01:50:09 2006 joerg + * libhfs_iso/libhfs_p.mk 1.1 + date and time created 06/09/15 01:50:09 by joerg + +Fri Sep 15 01:49:04 2006 joerg + * libfile/Makefile 1.2 + Nun ist es ein unterterverteil Makefile + +Fri Sep 15 01:48:35 2006 joerg + * libfile/libfile_p.mk 1.1 + date and time created 06/09/15 01:48:35 by joerg + +Fri Sep 15 01:47:18 2006 joerg + * libdeflt/Makefile 1.1 + date and time created 06/09/15 01:47:18 by joerg + +Fri Sep 15 01:47:05 2006 joerg + * libdeflt/libdeflt_p.mk 1.1 + date and time created 06/09/15 01:47:05 by joerg + +Fri Sep 15 01:46:17 2006 joerg + * libparanoia/Makefile 1.1 + date and time created 06/09/15 01:46:17 by joerg + +Fri Sep 15 01:46:07 2006 joerg + * libparanoia/paranoia_p.mk 1.1 + date and time created 06/09/15 01:46:07 by joerg + +Fri Sep 15 01:44:46 2006 joerg + * libscg/Makefile 1.1 + date and time created 06/09/15 01:44:46 by joerg + +Fri Sep 15 01:43:51 2006 joerg + * libscg/libscg_p.mk 1.1 + * libscg/rscg.mk 1.1 + * libscg/librscg_p.mk 1.1 + date and time created 06/09/15 01:43:51 by joerg + +Thu Sep 14 23:11:51 2006 joerg + * libfile/file.h 1.9 + optind/optarg beseitigt + +Thu Sep 14 23:10:32 2006 joerg + * mkisofs/mkisofs.c 1.181 + optarg Parameter diverser Funktionen zur besseren Lesbarkeit -> opt_arg + +Thu Sep 14 23:07:39 2006 joerg + * mkisofs/mkisofs.c 1.180 + get_pnames() funktioniert nun auch ohne USE_FIND + vergessenere Referenz auf optarg beseitigt + +Thu Sep 14 23:04:31 2006 joerg + * mkisofs/mkisofs.h 1.103 + getopt beseitigt + +Thu Sep 14 22:59:03 2006 joerg + * cdda2wav/scsi_cmds.c 1.37 + %hd nun doch besser -> %d mit cast + +Thu Sep 14 22:38:10 2006 joerg + * include/schily/termios.h 1.28 + Schreibfehler _INCL_SYS_IOCTl_H -> _INCL_SYS_IOCTL_H + +Thu Sep 14 14:41:05 2006 joerg + * libfind/libfind_p.mk 1.1 + date and time created 06/09/14 14:41:05 by joerg + +Thu Sep 14 14:32:27 2006 joerg + * libfind/Makefile 1.1 + date and time created 06/09/14 14:32:27 by joerg + +Thu Sep 14 14:18:40 2006 joerg + * libfind/noshlfind.mk 1.1 + date and time created 06/09/14 14:18:40 by joerg + +Wed Sep 13 23:07:15 2006 joerg + * mkisofs/Makefile 1.20 + config.h beseitigt + +Wed Sep 13 19:39:48 2006 joerg + * scgskeleton/scgskeleton.c 1.21 + * scgskeleton/doit.c 1.21 + * libschily/fstream.c 1.21 + * libfind/cmpdir.c 1.18 + * libfind/fetchdir.c 1.18 + * libfind/idcache.c 1.17 + * libschily/checkerr.c 1.14 + * mkisofs/diag/isovfy.c 1.27 + * mkisofs/diag/isodebug.c 1.11 + * mkisofs/diag/dump.c 1.25 + * mkisofs/diag/isoinfo.c 1.51 + * mkisofs/diag/isodump.c 1.28 + * mkisofs/volume.c 1.15 + * mkisofs/walk.c 1.3 + * mkisofs/vms.c 1.10 + * mkisofs/udf.c 1.16 + * mkisofs/write.c 1.92 + * mkisofs/mac_label.c 1.10 + * mkisofs/tree.c 1.84 + * mkisofs/stream.c 1.4 + * mkisofs/scsi.c 1.21 + * mkisofs/rock.c 1.44 + * mkisofs/name.c 1.29 + * mkisofs/multi.c 1.71 + * mkisofs/mkisofs.c 1.179 + * mkisofs/match.c 1.22 + * mkisofs/boot.c 1.16 + * mkisofs/hash.c 1.19 + * mkisofs/desktop.c 1.7 + * mkisofs/dvd_file.c 1.4 + * mkisofs/apple_driver.c 1.7 + * mkisofs/ifo_read.c 1.6 + * mkisofs/dvd_reader.c 1.4 + * mkisofs/apple.c 1.20 + * mkisofs/joliet.c 1.41 + * mkisofs/files.c 1.13 + * mkisofs/exclude.c 1.10 + * mkisofs/eltorito.c 1.36 + * mkisofs/dvd_reader.h 1.3 + * mkisofs/mkisofs.h 1.102 + * mkisofs/bswap.h 1.3 + * rscsi/rscsi.c 1.30 + * scgcheck/scgcheck.c 1.7 + * scgcheck/dmaresid.c 1.8 + * scgcheck/sense.c 1.5 + * scgskeleton/skel.c 1.8 + * cdrecord/skel.c 1.8 + * cdda2wav/toc.c 1.65 + * cdda2wav/wav.c 1.7 + * cdda2wav/sun.c 1.8 + * cdda2wav/ringbuff.c 1.14 + * cdda2wav/scsi_cmds.c 1.36 + * cdda2wav/raw.c 1.7 + * cdda2wav/resample.c 1.23 + * cdda2wav/interface.c 1.47 + * cdda2wav/setuid.c 1.15 + * cdda2wav/semshm.c 1.19 + * cdda2wav/sndconfig.c 1.25 + * cdda2wav/ioctl.c 1.28 + * cdda2wav/sha_func.c 1.5 + * cdda2wav/base64.c 1.7 + * cdda2wav/aifc.c 1.9 + * cdda2wav/aiff.c 1.8 + * cdda2wav/cdda2wav.c 1.72 + * cdda2wav/sndfile.h 1.7 + * cdda2wav/config.h 1.11 + * cdda2wav/sha.h 1.6 + * cdrecord/io.c 1.2 + * cdrecord/movesect.c 1.4 + * cdrecord/wm_track.c 1.5 + * cdrecord/sector.c 1.14 + * cdrecord/wm_packet.c 1.26 + * cdrecord/wm_session.c 1.5 + * cdrecord/scsilog.c 1.18 + * cdrecord/scsi_scan.c 1.20 + * cdrecord/xio.c 1.12 + * cdrecord/scsi_mmc4.c 1.2 + * cdrecord/scsi_mmc.c 1.19 + * cdrecord/subchan.c 1.21 + * cdrecord/scsi_cdr_mmc4.c 1.2 + * cdrecord/scsi_cdr.c 1.139 + * cdrecord/misc.c 1.5 + * cdrecord/drv_jvc.c 1.83 + * cdrecord/drv_sony.c 1.73 + * cdrecord/fifo.c 1.50 + * cdrecord/getnum.c 1.3 + * libschily/getnum.c 1.3 + * libschily/getxnum.c 1.3 + * cdrecord/isosize.c 1.10 + * cdrecord/drv_simul.c 1.49 + * cdrecord/drv_philips.c 1.70 + * cdrecord/modes.c 1.26 + * cdrecord/drv_mmc.c 1.167 + * cdrecord/crc16.c 1.7 + * cdrecord/drv_7501.c 1.17 + * cdrecord/drv_dvd.c 1.124 + * cdrecord/cue.c 1.21 + * cdrecord/diskid.c 1.38 + * cdrecord/cdtext.c 1.11 + * cdrecord/defaults.c 1.20 + * cdrecord/drv_dvdplus.c 1.22 + * cdrecord/clone.c 1.8 + * cdrecord/auinfo.c 1.24 + * cdrecord/cdr_drv.c 1.37 + * cdrecord/audiosize.c 1.20 + * cdrecord/cdrecord.c 1.320 + * cdrecord/cd_misc.c 1.13 + * btcflash/btcflash.c 1.9 + * btcflash/skel.c 1.12 + * libparanoia/cdda_paranoia.h 1.22 + * libschily/usleep.c 1.19 + * libschily/printf.c 1.16 + * libschily/swabbytes.c 1.7 + * libschily/strtod.c 1.2 + * libschily/strncpy.c 1.2 + * libschily/strlcpy.c 1.2 + * libschily/streql.c 1.8 + * libschily/strdup.c 1.2 + * libschily/strcatl.c 1.13 + * libschily/sprintf.c 1.15 + * libschily/spawn.c 1.18 + * libschily/snprintf.c 1.10 + * libschily/setfp.c 1.12 + * libschily/seterrno.c 1.9 + * libschily/serrmsg.c 1.4 + * libschily/saveargs.c 1.12 + * libschily/raisecond.c 1.19 + * libschily/rename.c 1.7 + * libschily/jsprintf.c 1.16 + * libschily/getav0.c 1.17 + * libschily/getdomainname.c 1.17 + * libschily/getargs.c 2.47 + * libschily/jssnprintf.c 1.11 + * libschily/handlecond.c 1.23 + * libschily/jssprintf.c 1.16 + * libschily/geterrno.c 1.10 + * libschily/match.c 1.22 + * libschily/movebytes.c 1.14 + * libschily/gethostid.c 1.16 + * libschily/gethostname.c 1.16 + * libschily/getpagesize.c 1.2 + * libschily/format.c 1.40 + * libschily/fillbytes.c 1.14 + * libschily/error.c 1.14 + * libschily/comerr.c 1.30 + * libschily/cmpbytes.c 1.16 + * libschily/fnmatch.c 8.6 + * libschily/astoi.c 1.9 + * libschily/cmpnullbytes.c 1.3 + * libschily/breakline.c 1.11 + * libschily/astoll.c 1.4 + * libschily/findline.c 1.17 + * libschily/findbytes.c 1.3 + * libschily/fexec.c 1.25 + * libschily/fconv.c 1.34 + * libschily/cvt.c 1.8 + * libschily/stdio/filestat.c 1.10 + * libschily/stdio/filesize.c 1.14 + * libschily/stdio/flag.c 2.11 + * libschily/stdio/schilyio.h 2.23 + * libscg/scsi-unixware.c 1.37 + * libscg/scsiopen.c 1.96 + * libscg/scsi-sun.c 1.84 + * libscg/scsi-mac-iokit.c 1.11 + * libscg/scsierrs.c 2.30 + * libscg/scsihack.c 1.45 + * libscg/scsihelp.c 1.5 + * libscg/scsitransp.c 1.92 + * libscg/rdummy.c 1.2 + * libscg/scgsettarget.c 1.3 + * libscg/scgtimes.c 1.2 + * libscg/scsi-linux-ata.c 1.10 + * libscg/scsi-amigaos.c 1.7 + * libscg/scsi-remote.c 1.19 + * libhfs_iso/low.c 1.5 + * libhfs_iso/node.c 1.3 + * libhfs_iso/gdata.c 1.2 + * libhfs_iso/hfs.c 1.10 + * libhfs_iso/volume.c 1.5 + * libhfs_iso/record.c 1.2 + * libhfs_iso/file.c 1.4 + * libhfs_iso/block.c 1.4 + * libhfs_iso/btree.c 1.4 + * libhfs_iso/data.c 1.6 + * libfind/mem.c 1.5 + * libfind/gettnum.c 1.5 + * libschily/fjmem.c 1.5 + * libschily/getxtnum.c 1.5 + * libschily/mem.c 1.5 + * libschily/gettnum.c 1.5 + * libschily/jmem.c 1.5 + * libfind/find_list.c 1.11 + * libfind/find_misc.c 1.7 + * libfind/find_misc.h 1.3 + * libfile/file.h 1.8 + * libfile/file.c 1.6 + * libfile/softmagic.c 1.7 + * libfile/apprentice.c 1.6 + * libedc/repair.c 1.2 + * libedc/edcspeed.c 1.2 + * libedc/edc_ecc_dec.c 1.4 + * libedc/edc_ecc.c 1.23 + * libdeflt/default.c 1.6 + * libschily/getfp.c 1.15 + * libschily/align_test.c 1.21 + * libschily/avoffset.c 1.26 + Umstellung auf include schily/* + +Wed Sep 13 19:10:56 2006 joerg + * include/schily/signal.h 1.7 + _SCHILY/SIGNAL_H -> _SCHILY_SIGNAL_H + +Wed Sep 13 17:56:41 2006 joerg + * mkisofs/udf.c 1.15 + config.h -> mconfig.h + +Wed Sep 13 16:42:18 2006 joerg + * libschily/usleep.c 1.18 + nanosleep() Check geaendert + +Wed Sep 13 16:15:05 2006 joerg + * libparanoia/pmalloc.c 1.4 + * libparanoia/paranoia.c 1.35 + * libparanoia/p_block.c 1.21 + * libparanoia/overlap.c 1.13 + * libparanoia/gap.c 1.14 + * libparanoia/isort.c 1.16 + Umstellung auf schily/* + +Wed Sep 13 16:04:15 2006 joerg + * libhfs_iso/internal.h 1.3 + * libhfs_iso/hfs.h 1.5 + UMstellung auf include schily/* + +Wed Sep 13 15:01:03 2006 joerg + * cdrecord/xio.h 1.3 + * cdrecord/scsimmc.h 1.14 + * cdrecord/cdrecord.h 1.169 + * cdrecord/mmcvendor.h 1.4 + * cdrecord/adip.h 1.2 + * cdrecord/scsilog.h 1.5 + Include -> schily/* + +Wed Sep 13 14:51:53 2006 joerg + * include/schily/schily.h 1.58 + _UTYPES_H -> _SCHILY_UTYPES_H + +Wed Sep 13 14:42:57 2006 joerg + * autoconf/xconfig.h.in 1.103 + utypes.h -> schily/utypes.h + +Wed Sep 13 14:24:12 2006 joerg + * libscg/scg/scgcmd.h 2.23 + * libscg/scg/scsireg.h 1.32 + * libscg/scg/scsicdb.h 2.20 + Umstellung auf include/schily/* + +Wed Sep 13 13:42:04 2006 joerg + * mkisofs/mkisofs.h 1.101 + Kommentar fuer struct wargs + +Wed Sep 13 03:35:18 2006 joerg + * include/schily/alloca.h 1.6 + Anpasungen an schily/* + +Wed Sep 13 03:33:32 2006 joerg + * include/schily/schily.h 1.57 + Kommentare an schily/* angepasst + +Wed Sep 13 03:26:59 2006 joerg + * include/schily/jos_defs.h 1.3 + * include/schily/getargs.h 1.14 + * include/schily/device.h 1.15 + * include/schily/mconfig.h 1.54 + * include/schily/maxpath.h 1.7 + * include/schily/intcvt.h 1.5 + * include/schily/libport.h 1.11 + * include/schily/jos_io.h 1.8 + * include/schily/jmpdefs.h 1.3 + * include/schily/jos_maxp.h 1.2 + * include/schily/getcwd.h 1.4 + * include/schily/rmtio.h 1.6 + * include/schily/patmatch.h 1.11 + * include/schily/prototyp.h 1.12 + * include/schily/librmt.h 1.17 + * include/schily/schily.h 1.56 + * include/schily/utypes.h 1.21 + * include/schily/ccomdefs.h 1.4 + * include/schily/fnmatch.h 8.5 + * include/schily/unls.h 1.7 + * include/schily/stkframe.h 1.11 + * include/schily/standard.h 1.33 + * include/schily/deflts.h 1.7 + * include/schily/termcap.h 1.7 + * include/schily/sigblk.h 1.11 + * include/schily/btorder.h 1.17 + Umbau auf schily/* + +Wed Sep 13 02:44:11 2006 joerg + * include/schily/signal.h 1.6 + * include/schily/dirent.h 1.18 + * include/schily/fcntl.h 1.14 + * include/schily/stat.h 1.10 + * include/schily/stdlib.h 1.7 + * include/schily/string.h 1.9 + * include/schily/alloca.h 1.5 + * include/schily/mtio.h 1.5 + * include/schily/mman.h 1.2 + * include/schily/time.h 1.14 + * include/schily/varargs.h 1.6 + * include/schily/unistd.h 1.16 + * include/schily/utime.h 1.6 + * include/schily/termios.h 1.27 + * include/schily/wait.h 1.11 + Umbau auf schily/* und Namensaenderung + +Tue Sep 12 11:44:33 2006 joerg + * mkisofs/mkisofs.c 1.178 + Fehlender Code fuer -sectype, -joliet-long & -jcharset + +Tue Sep 12 01:41:02 2006 joerg + * mkisofs/mkisofs.c 1.177 + Kurzusage nun mit -find + +Mon Sep 11 19:07:00 2006 joerg + * mkisofs/mkisofs.c 1.176 + ! ist kein Optionstyp mehr + +Mon Sep 11 18:29:47 2006 joerg + * mkisofs/mkisofs.8 1.110 + -find Option neu + +Mon Sep 11 18:02:31 2006 joerg + * libschily/getargs.c 2.46 + Singlecharflags werden nun auch dann erkannt, wenn sie am Anfang von Formatstrings stehen die nicht im Ersten Indes des Optionsarrays definiert wurden + +Mon Sep 11 17:21:53 2006 joerg + * mkisofs/mkisofs.c 1.175 + graft-point gehen nun auch mit -find + +Mon Sep 11 17:14:15 2006 joerg + * mkisofs/mkisofs.h 1.100 + * mkisofs/walk.c 1.2 + struct wargs neu um nun auch mit -find graft-points verarbeiten zu koennen + +Mon Sep 11 17:04:27 2006 joerg + * mkisofs/mkisofs.c 1.174 + Weitere Schreibfehler bei Optionen beseitigt + +Mon Sep 11 11:47:38 2006 joerg + * mkisofs/mkisofs.c 1.173 + Weitere Optionen gefunden die Parameter benoetigen und wie andere anfangen + +Sun Sep 10 20:50:53 2006 joerg + * mkisofs/Makefile 1.19 + $(LIB_ACL) fuer -lfind neu + +Sun Sep 10 20:40:24 2006 joerg + * libschily/getargs.c 2.45 + return (BADFMT) wenn flagp->ga_funcp == NULL + Zusaetzlicher Parameter fuer die getpargfun: "opt" ist das unveraenderte Kommandozeilenargument + +Sun Sep 10 20:37:49 2006 joerg + * include/schily/getargs.h 1.13 + Zusaetzlicher Parameter fuer die getpargfun: "opt" ist das unveraenderte Kommandozeilenargument + +Sun Sep 10 20:03:26 2006 joerg + * mkisofs/write.c 1.91 + Warnung ueber fehlendes VIDEO_TS nur in Verbindung mit -dvd-video + +Sun Sep 10 17:47:47 2006 joerg + * libschily/getargs.c 2.44 + f*_ Format zum Verbieten von -f foo neu + +Sun Sep 10 16:47:30 2006 joerg + * mkisofs/mkisofs.c 1.172 + getargs() Format % -> %0 + +Sun Sep 10 16:46:50 2006 joerg + * libschily/getargs.c 2.43 + Neues Format '%' (erweiterbar) Implementiert %0 & %1 + Neue Funktionen getvargs(), getvallargs() und getvfiles() + ' ' Format modifier umgearbeitet: ' ' musz nun direkt hinter dem Typ stehen (vor dem Size Modifier) + Debug Ausgabe verbessert/korrigiert + Neue Funktion getargerror() + +Sun Sep 10 15:32:08 2006 joerg + * mkisofs/mkisofs.c 1.171 + Version -> 2.01.01a14 + Diverse Bugfixes im ZUsammenhang mit der Umstellung auf getvargs() + +Sun Sep 10 01:05:47 2006 joerg + * mkisofs/write.c 1.90 + Bessere VIDEO_TS Erkennung + +Fri Sep 8 11:18:25 2006 joerg + * mkisofs/mkisofs.c 1.170 + -find Option neu + +Fri Sep 8 11:13:14 2006 joerg + * mkisofs/tree.c 1.83 + EXPORT attach_dot_entries() neu, insert_file_entry() mit neuem struct stat * Parameter - Beides fuer mkisofs -find + Generelle Verbesserungen fuer attach_dot_entries() + +Fri Sep 8 11:08:41 2006 joerg + * mkisofs/mkisofs.h 1.99 + attach_dot_entries() neu, insert_file_entry() mit neuem struct stat * Parameter - Beides fuer mkisofs -find + +Fri Sep 8 11:07:51 2006 joerg + * mkisofs/Makefile 1.18 + -find Support neu + +Fri Sep 8 11:07:32 2006 joerg + * mkisofs/walk.c 1.1 + date and time created 06/09/08 11:07:32 by joerg + +Thu Sep 7 14:49:38 2006 joerg + * mkisofs/match.c 1.21 + * mkisofs/Makefile 1.17 + * mkisofs/match.h 1.12 + Umbau um mkisofs das System fnmatch() nutzen zu lassen statt GNU fnmatch + +Thu Sep 7 14:30:55 2006 joerg + * include/schily/fnmatch.h 8.4 + -> schily/fnmatch.h + +Thu Sep 7 14:30:19 2006 joerg + * libschily/Targets 1.3 + fnmatch.c neu + +Thu Sep 7 14:30:10 2006 joerg + * libschily/libschily-mapvers 1.3 + Hinweis auf nicht immer vorhandene Funktionen + +Thu Sep 7 14:29:39 2006 joerg + * libschily/fnmatch.c 8.5 + #include -> #include + nur moch kompilieren wenn ! HAVE_FNMATCH + +Thu Sep 7 13:54:16 2006 joerg + * include/schily/fnmatch.h 8.3 + * libschily/fnmatch.c 8.4 + Original Berkeley Version erawehnen + +Thu Sep 7 13:52:18 2006 joerg + * libschily/fnmatch.c 8.3 + * include/schily/fnmatch.h 8.2 + Umbau auf Schily Portabilitaetsmethoden + +Tue Sep 5 00:17:00 2006 joerg + * cdrecord/cdrecord.c 1.319 + Release -> 2.01.01a12 + +Mon Sep 4 23:47:00 2006 joerg + * libschily/avoffset.c 1.25 + Signalhandler fuer SIGILL wegen FreeBSD sparc 64 Bit + +Mon Sep 4 23:44:46 2006 joerg + * include/schily/getargs.h 1.12 + getvallargs()/getvargs()/getvfiles() neu + struct ga_flags neu + +Mon Sep 4 23:42:31 2006 joerg + * mkisofs/mkisofs.c 1.169 + * mkisofs/multi.c 1.70 + * mkisofs/mkisofs.h 1.98 + * mkisofs/match.h 1.11 + * mkisofs/match.c 1.20 + * mkisofs/joliet.c 1.40 + * mkisofs/eltorito.c 1.35 + Copyright -> 2006 + +Mon Sep 4 23:41:28 2006 joerg + * mkisofs/mkisofs.c 1.168 + Umstellung von GNU getopt_long() zu getvargs() + +Mon Sep 4 14:57:22 2006 joerg + * mkisofs/boot.c 1.15 + Copyricht -> 2006 + +Mon Sep 4 14:48:21 2006 joerg + * mkisofs/Makefile 1.16 + Beseitigen von getopt.c getopt1.c getopt.h wegen Umstellung auf getargs() + +Mon Sep 4 14:47:44 2006 joerg + * mkisofs/boot.c 1.14 + * mkisofs/mkisofs.h 1.97 + * mkisofs/eltorito.c 1.34 + Rueckgabe eines Rereturncodes fuer getargs() + +Mon Sep 4 14:47:01 2006 joerg + * mkisofs/match.c 1.19 + * mkisofs/match.h 1.10 + Rueckgabe eines Rereturncodes fuer getargs() + Diverse #defines durch Funktionen ersetzt fuer getargs() + +Tue Aug 29 11:39:12 2006 joerg + * autoconf/xconfig.h.in 1.102 + * autoconf/configure.in 1.101 + nanosleep() ist nicht in libc sondern in librt + +Tue Aug 29 11:36:26 2006 joerg + * autoconf/xconfig.h.in 1.101 + * autoconf/configure.in 1.100 + gethrtime() & nanosleep Test neu + +Thu Aug 24 16:08:51 2006 joerg + * autoconf/rules.cnf.in 1.9 + * autoconf/configure.in 1.99 + * autoconf/xconfig.h.in 1.100 + Neue tests fuer -lpthread und lrt + +Wed Aug 23 23:49:23 2006 joerg + * libschily/getargs.c 2.42 + 'f# ' Format funktioniert nun auch mit Size Modifizierern + +Wed Aug 23 21:32:41 2006 joerg + * libschily/getargs.c 2.41 + -f '' geht nun um den nul Character anzugeben + Es geht nun sowohl -fc als auch -f c + Das Erzwingen einer Trennung zwischen Optionsname und Argument kann nun nicht nur fuer das '*' Format, sondern auch fuer '#', '?' und '&' verwendet werden + +Wed Aug 23 00:18:41 2006 joerg + * cdrecord/cdrecord.c 1.318 + * cdda2wav/cdda2wav.c 1.71 + nice(-20) -> nice(-NZERO) + +Wed Aug 23 00:18:00 2006 joerg + * cdda2wav/resample.c 1.22 + outlen <= 0 -> outlen == 0, denn outlen ist unsigned + +Wed Aug 23 00:17:02 2006 joerg + * cdda2wav/scsi_cmds.h 1.14 + * cdda2wav/scsi_cmds.c 1.35 + * cdda2wav/interface.c 1.46 + Inquiry(scgp) -> ScsiInquiry(scgp) wegen VMS (alle Symbole in Grossbuchstaben) + Cast 2+datalength -> (short)2+datalength wegen %h Format + +Wed Aug 23 00:11:33 2006 joerg + * mkisofs/mkisofs.h 1.96 + PREV_SESS_DEV/TABLE_INODE/UNCACHED_INODE/UNCACHED_DEVICE nach dev_t/ino_t casten + +Wed Aug 23 00:10:02 2006 joerg + * mkisofs/joliet.c 1.39 + Version des Joliet VD's auf 1 zuruecksetzen wenn vorher ein ISO-9660:1999 SVD geschrieben wurde + +Wed Aug 23 00:01:53 2006 joerg + * mkisofs/multi.c 1.69 + * mkisofs/write.c 1.89 + Kompilation ohne libschily & libscg ermoeglichen + +Tue Aug 22 00:15:52 2006 joerg + * include/schily/utypes.h 1.20 + #define NZERO neu + +Sun Aug 20 12:06:38 2006 joerg + * libschily/getargs.c 2.40 + setargs -> flags & SETARGS + +Sat Aug 19 23:38:28 2006 joerg + * include/schily/getargs.h 1.11 + getpargfun neu + +Sat Aug 19 23:37:20 2006 joerg + * libschily/getargs.c.old 2.39 + * libschily/getargs.c 2.39 + Func call fuer Boolean type arg mit '~' Format + getpargfun hat nun 4 Argumente (argp, funarg, pac, pav) + +Thu Aug 17 15:00:09 2006 joerg + * autoconf/xconfig.h.in 1.99 + * autoconf/configure.in 1.98 + Neue Tests: sys/stypes.h sys/filedesc.h strncpy() strlcpy() + +Thu Aug 17 14:58:45 2006 joerg + * include/schily/dirent.h 1.17 + Schreibfehler HAVE_SYS_TYES_H -> HAVE_SYS_STYPES_H + +Thu Aug 17 14:53:58 2006 joerg + * include/schily/libport.h 1.10 + strncpy()/strlcpy() neu + +Thu Aug 17 14:37:08 2006 joerg + * libschily/Targets 1.2 + strlcpy.c strncpy.c neu + +Thu Aug 17 14:35:58 2006 joerg + * libschily/strncpy.c 1.1 + * libschily/strlcpy.c 1.1 + date and time created 06/08/17 14:35:58 by joerg + +Wed Aug 2 00:53:20 2006 joerg + * libfind/shlfind.mk 1.1 + date and time created 06/08/02 00:53:20 by joerg + +Wed Aug 2 00:46:45 2006 joerg + * libfind/libfind.mk 1.1 + date and time created 06/08/02 00:46:45 by joerg + +Wed Aug 2 00:45:41 2006 joerg + * libfind/Targets 1.1 + date and time created 06/08/02 00:45:41 by joerg + +Mon Jul 31 14:38:52 2006 joerg + * conf/mkdep-msc-interix.sh 1.1 + * conf/mkdep-msc.sh 1.1 + date and time created 06/07/31 14:38:52 by joerg + +Mon Jul 31 14:38:36 2006 joerg + * makefiles/RULES/cc-msposix.rul 1.5 + * makefiles/RULES/cc-msc.rul 1.5 + Support fuer MKDEP neu + +Mon Jul 31 14:38:02 2006 joerg + * makefiles/RULES/r-smake.dep 1.12 + C++DEP_FILE -> C++DEP_FILES + +Sun Jul 30 16:32:48 2006 joerg + * libfind/walk.h 1.11 + * include/schily/walk.h 1.11 + * libfind/walk.c 1.11 + * libfind/find.c 1.41 + * libfind/find_main.c 1.41 + -dostat und WALK_NOSTAT neu + +Fri Jul 21 17:36:32 2006 joerg + * autoconf/rules.cnf.in 1.8 + OBJEXT neu + +Fri Jul 21 16:35:08 2006 joerg + * makefiles/RULES/version 1.3 + Version -> 1.5a04 + +Fri Jul 21 15:45:44 2006 joerg + * libparanoia/noshlparanoia.mk 1.1 + * libscg/noshlrscg.mk 1.1 + * libscg/noshlscg.mk 1.1 + * libdeflt/noshldeflt.mk 1.1 + * libedc/noshledc.mk 1.1 + * libfile/noshlfile.mk 1.1 + * libhfs_iso/noshlhfs.mk 1.1 + date and time created 06/07/21 15:45:44 by joerg + +Fri Jul 21 15:21:56 2006 joerg + * libschily/Makefile 1.5 + Support fuer $(NO_SHL)shlxx.mk neu + +Fri Jul 21 15:21:37 2006 joerg + * libschily/noshlschily.mk 1.1 + date and time created 06/07/21 15:21:37 by joerg + +Fri Jul 21 15:20:42 2006 joerg + * makefiles/RULES/rules.mks 1.11 + include rules.dyn damit $(NO_SHL)shlxxx.mk funktioniert + +Fri Jul 21 14:56:41 2006 joerg + * makefiles/DEFAULTS_ENG/Defaults.interix 1.1 + date and time created 06/07/21 14:56:41 by joerg + +Fri Jul 21 14:53:14 2006 joerg + * makefiles/DEFAULTS/Defaults.interix 1.1 + date and time created 06/07/21 14:53:14 by joerg + +Fri Jul 21 14:40:56 2006 joerg + * makefiles/RULES/rules.cpl 1.1 + date and time created 06/07/21 14:40:56 by joerg + +Fri Jul 21 14:39:43 2006 joerg + * makefiles/RULES/r-smake.obj 1.8 + * makefiles/RULES/r-make.obj 1.6 + * makefiles/RULES/r-gmake.dep 1.13 + * makefiles/RULES/r-smake.dep 1.11 + * makefiles/RULES/r-make.dep 1.8 + Erweiterungen fuer C++ + +Fri Jul 21 14:12:23 2006 joerg + * makefiles/RULES/cc-sgi.rul 1.2 + * makefiles/RULES/cc-sony.rul 1.2 + * makefiles/RULES/cc-sun.rul 1.2 + * makefiles/RULES/cc-ibm.rul 1.2 + * makefiles/RULES/cc-dumb.rul 1.2 + * makefiles/RULES/cc-hp.rul 1.2 + * makefiles/RULES/cc-dg.rul 1.2 + * makefiles/RULES/cc-dec.rul 1.2 + * makefiles/RULES/cc-bemwcc.rul 1.4 + * makefiles/RULES/cc-apollo.rul 1.3 + * makefiles/RULES/cc-sco_os.rul 1.3 + * makefiles/RULES/cc-sco_uw.rul 1.2 + Dummy Erweiterungen fuer C++ neu + +Fri Jul 21 13:10:53 2006 joerg + * makefiles/RULES/cc-msc.rul 1.4 + * makefiles/RULES/cc-msposix.rul 1.4 + * makefiles/RULES/cc-sunpro64.rul 1.3 + * makefiles/RULES/cc-sunpro.rul 1.2 + * makefiles/RULES/cc-gcc64.rul 1.3 + * makefiles/RULES/cc-gcc.rul 1.2 + C++ Erweiterungen + +Fri Jul 21 11:18:01 2006 joerg + * makefiles/RULES/rules.shl 1.9 + DYNLD.o Makro neu wegen MSVC, C++OPTS neu + +Thu Jul 20 18:28:43 2006 joerg + * makefiles/RULES/rules.cmd 1.8 + include $(SRCROOT)/$(RULESDIR)/rules.dyn, um shared/static Linking auswaehlen zu koennen + +Thu Jul 20 18:27:57 2006 joerg + * makefiles/RULES/rules1.top 1.34 + $(SUBARCHDIR)$(SUBARCH)$(SHLDIR) bei OLIBSDIR neu um shared libs in searate dir packen zu koennen (wegen Importlibs .lib zu .dll) + +Thu Jul 20 18:25:19 2006 joerg + * makefiles/RULES/dynamic.lnk 1.1 + * makefiles/RULES/rules.dyn 1.1 + * makefiles/RULES/static.lnk 1.1 + date and time created 06/07/20 18:25:19 by joerg + +Tue Jul 18 16:39:11 2006 joerg + * makefiles/RULES/sun4-sunos5-gcc64.rul 1.5 + * makefiles/RULES/i86pc-sunos5-gcc64.rul 1.5 + * makefiles/RULES/sun4-sunos5-gcc.rul 1.11 + * makefiles/RULES/i86pc-sunos5-gcc.rul 1.11 + -Mlib... -> -Wl,-Mlib... + +Sun Jul 9 22:37:39 2006 joerg + * cdrecord/cdrecord.c 1.317 + Version -> 2.01.01a11 + +Sun Jul 9 16:38:23 2006 joerg + * cdrecord/drv_dvd.c 1.123 + #define offsetof ueber #ifdef absichern wegen Include File Umstellung fuer MSVC "cl" + +Sun Jul 9 16:37:32 2006 joerg + * cdrecord/cdrecord.c 1.316 + GCC Warnung verhindern bei der DMA Geschwindigkeitsmessung + +Fri Jul 7 14:33:48 2006 joerg + * makefiles/RULES/rules.sps 1.12 + * makefiles/RULES/rules.cnf 1.10 + * makefiles/RULES/local.cnf 1.5 + * makefiles/RULES/cc-bemwcc.rul 1.3 + * makefiles/RULES/cc-apollo.rul 1.2 + * makefiles/RULES/cc-sunpro64.rul 1.2 + * makefiles/RULES/cc-gcc64.rul 1.2 + * makefiles/RULES/cc-msposix.rul 1.3 + * makefiles/RULES/cc-msc.rul 1.3 + CCCOM -> CC_COM um Verwechslungen durch die Einfuehrung von C++ Unterstuetzung zu vermeiden + +Fri Jul 7 11:43:58 2006 joerg + * makefiles/RULES/r-gmake.dep 1.12 + * makefiles/RULES/r-make.obj 1.5 + * makefiles/RULES/r-make.dep 1.7 + * makefiles/RULES/r-smake.obj 1.7 + * makefiles/RULES/r-smake.dep 1.10 + .o -> .$o um .o/.obj zu unterstuetzen + +Fri Jul 7 11:42:38 2006 joerg + * makefiles/RULES/rules.prg 1.15 + o= $(OBJEXT) neu fuer .obj bei MSVC + +Thu Jul 6 15:01:34 2006 joerg + * makefiles/RULES/r-make.obj 1.4 + * makefiles/RULES/r-smake.obj 1.6 + Erweiterungen fuer MSVC + +Thu Jul 6 14:50:14 2006 joerg + * makefiles/RULES/rules.lib 1.9 + Umstellungen wegen MSVC + +Thu Jul 6 14:28:51 2006 joerg + * makefiles/RULES/i386-unixware-cc.rul 1.6 + UMstallung auf cc-sco_uw.rul + +Thu Jul 6 14:16:54 2006 joerg + * makefiles/RULES/cc-sco_uw.rul 1.1 + date and time created 06/07/06 14:16:54 by joerg + +Thu Jul 6 14:16:01 2006 joerg + * makefiles/RULES/cc-sco_os.rul 1.2 + $(SRCROOT)/conf/mkdep-sco.sh -> sh $(SRCROOT)/conf/mkdep-sco.sh + +Thu Jul 6 14:13:50 2006 joerg + * makefiles/RULES/i386-openserver-cc.rul 1.3 + Umstellung auf cc-sco_os.rul + +Thu Jul 6 14:13:02 2006 joerg + * makefiles/RULES/cc-sco_os.rul 1.1 + date and time created 06/07/06 14:13:02 by joerg + +Thu Jul 6 14:06:27 2006 joerg + * makefiles/RULES/i486-cygwin32_nt-cl.rul 1.3 + include $(SRCROOT)/$(RULESDIR)/cl.rul -> include $(SRCROOT)/$(RULESDIR)/cc-msc.rul + +Thu Jul 6 13:27:46 2006 joerg + * makefiles/RULES/news4000-newsos6-cc.rul 1.5 + include $(SRCROOT)/$(RULESDIR)/sonycc.rul -> include $(SRCROOT)/$(RULESDIR)/cc-sony.rul + +Thu Jul 6 13:27:08 2006 joerg + * makefiles/RULES/dn5500-domainos-cc.rul 1.5 + include $(SRCROOT)/$(RULESDIR)/apollocc.rul -> include $(SRCROOT)/$(RULESDIR)/cc-apollo.rul + +Thu Jul 6 13:26:32 2006 joerg + * makefiles/RULES/pci-qnx-cc.rul 1.6 + include $(SRCROOT)/$(RULESDIR)/dumbcc.rul -> include $(SRCROOT)/$(RULESDIR)/cc-dumb.rul + +Thu Jul 6 13:25:40 2006 joerg + * makefiles/RULES/bemac-beos-mwcc.rul 1.6 + * makefiles/RULES/powerpc-beos-mwcc.rul 1.7 + * makefiles/RULES/bemac-beos-cc.rul 1.6 + include $(SRCROOT)/$(RULESDIR)/bemwcc.rul -> include $(SRCROOT)/$(RULESDIR)/cc-bemwcc.rul + +Thu Jul 6 13:22:17 2006 joerg + * makefiles/RULES/alpha-osf1-cc.rul 1.6 + include $(SRCROOT)/$(RULESDIR)/deccc.rul -> include $(SRCROOT)/$(RULESDIR)/cc-dec.rul + +Thu Jul 6 13:21:40 2006 joerg + * makefiles/RULES/rs6000-aix-cc.rul 1.9 + include $(SRCROOT)/$(RULESDIR)/ibmcc.rul -> include $(SRCROOT)/$(RULESDIR)/cc-ibm.rul + +Thu Jul 6 13:20:49 2006 joerg + * makefiles/RULES/sun3-sunos4-cc.rul 1.7 + * makefiles/RULES/sun4-sunos4-cc.rul 1.7 + include $(SRCROOT)/$(RULESDIR)/suncc.rul -> include $(SRCROOT)/$(RULESDIR)/cc-sun.rul + +Thu Jul 6 13:19:45 2006 joerg + * makefiles/RULES/ip22-irix-cc.rul 1.8 + include $(SRCROOT)/$(RULESDIR)/sgicc.rul -> include $(SRCROOT)/$(RULESDIR)/cc-sgi.rul + +Thu Jul 6 13:18:52 2006 joerg + * makefiles/RULES/9000-725-hp-ux-cc.rul 1.12 + include $(SRCROOT)/$(RULESDIR)/hpcc.rul -> include $(SRCROOT)/$(RULESDIR)/cc-hp.rul + +Thu Jul 6 13:17:49 2006 joerg + * makefiles/RULES/sun4-sunos5-cc.rul 1.10 + * makefiles/RULES/sun4-sunos5-cc64.rul 1.5 + * makefiles/RULES/i86pc-sunos5-cc.rul 1.10 + * makefiles/RULES/i86pc-sunos5-cc64.rul 1.4 + include $(SRCROOT)/$(RULESDIR)/sunprocc.rul -> include $(SRCROOT)/$(RULESDIR)/cc-sunpro.rul + include $(SRCROOT)/$(RULESDIR)/sunprocc64.rul -> include $(SRCROOT)/$(RULESDIR)/cc-sunpro64.rul + +Thu Jul 6 13:10:36 2006 joerg + * makefiles/RULES/sun4-sunos5-gcc64.rul 1.4 + * makefiles/RULES/i86pc-sunos5-gcc64.rul 1.4 + include $(SRCROOT)/$(RULESDIR)/gcc64.rul -> include $(SRCROOT)/$(RULESDIR)/cc-gcc64.rul + +Thu Jul 6 13:08:30 2006 joerg + * makefiles/RULES/x86-interix-gcc.rul 1.3 + * makefiles/RULES/x86pc-qnx-gcc.rul 1.5 + * makefiles/RULES/rs6000-aix-gcc.rul 1.7 + * makefiles/RULES/sun4-sunos5-gcc.rul 1.10 + * makefiles/RULES/i586-linux-cc.rul 1.8 + * makefiles/RULES/sun4-sunos4-gcc.rul 1.7 + * makefiles/RULES/i586-linux-gcc.rul 1.8 + * makefiles/RULES/i586-mingw32_nt-gcc.rul 1.4 + * makefiles/RULES/i686-mingw32_nt-gcc.rul 1.4 + * makefiles/RULES/i786-mingw32_nt-gcc.rul 1.4 + * makefiles/RULES/powerpc-beos-gcc.rul 1.6 + * makefiles/RULES/power-macintosh-rhapsody-gcc.rul 1.9 + * makefiles/RULES/power-macintosh-rhapsody-cc.rul 1.9 + * makefiles/RULES/power-macintosh-darwin-gcc.rul 1.10 + * makefiles/RULES/power-macintosh-darwin-cc.rul 1.10 + * makefiles/RULES/i86pc-sunos5-gcc.rul 1.10 + * makefiles/RULES/ip22-irix-gcc.rul 1.9 + * makefiles/RULES/sun3-sunos4-gcc.rul 1.8 + * makefiles/RULES/m68k-amigaos-gcc.rul 1.5 + * makefiles/RULES/i386-netbsd-cc.rul 1.9 + * makefiles/RULES/i386-ms-dos-gcc.rul 1.4 + * makefiles/RULES/i386-mingw32_nt-gcc.rul 1.4 + * makefiles/RULES/i386-freebsd-gcc.rul 1.7 + * makefiles/RULES/i386-freebsd-cc.rul 1.7 + * makefiles/RULES/i386-bsd-os3-gcc.rul 1.7 + * makefiles/RULES/i386-os2-gcc.rul 1.11 + * makefiles/RULES/i386-openserver-gcc.rul 1.6 + * makefiles/RULES/i486-cygwin32_nt-gcc.rul 1.7 + * makefiles/RULES/i486-cygwin32_nt-cc.rul 1.7 + * makefiles/RULES/i386-openbsd-gcc.rul 1.8 + * makefiles/RULES/i386-unixware-gcc.rul 1.5 + * makefiles/RULES/i386-openbsd-cc.rul 1.8 + * makefiles/RULES/i386-bsd-os3-cc.rul 1.7 + * makefiles/RULES/i386-netbsd-gcc.rul 1.9 + * makefiles/RULES/i486-mingw32_nt-gcc.rul 1.4 + * makefiles/RULES/alpha-osf1-gcc.rul 1.6 + * makefiles/RULES/bepc-beos-cc.rul 1.7 + * makefiles/RULES/bepc-beos-gcc.rul 1.9 + * makefiles/RULES/i386-at386-gnu-cc.rul 1.5 + * makefiles/RULES/hppa-nextstep-gcc.rul 1.8 + * makefiles/RULES/hppa-nextstep-cc.rul 1.8 + * makefiles/RULES/9000-725-hp-ux-gcc.rul 1.8 + * makefiles/RULES/aviion-dgux4-gcc.rul 1.8 + * makefiles/RULES/aviion-dgux3-gcc.rul 1.8 + * makefiles/RULES/i386-bsd-os-gcc.rul 1.8 + * makefiles/RULES/i386-at386-gnu-gcc.rul 1.5 + * makefiles/RULES/i386-bsd-os-cc.rul 1.8 + include $(SRCROOT)/$(RULESDIR)/gcc.rul -> include $(SRCROOT)/$(RULESDIR)/cc-gcc.rul + +Thu Jul 6 13:07:42 2006 joerg + * makefiles/RULES/aviion-dgux4-cc.rul 1.7 + * makefiles/RULES/aviion-dgux3-cc.rul 1.7 + include $(SRCROOT)/$(RULESDIR)/dgcc.rul -> include $(SRCROOT)/$(RULESDIR)/cc-dg.rul + +Tue Jul 4 18:03:29 2006 joerg + * makefiles/RULES/cc-msc.rul 1.2 + * makefiles/RULES/cc-msposix.rul 1.2 + LIBS_PATH= -libpath:$(OLIBSDIR) + LDLIBS= $(LIBS:-l%=%.lib) .... + LDOPTS= -link .... + OUTPUT_OPTION= -Fo$(O:%=%/)$@ + ARFLAGS= -lib -out: + Alles fuer korrekten integrierten Support von cl.exe + +Mon Jul 3 16:48:46 2006 joerg + * makefiles/TEMPLATES/temp-gcc.rul 1.2 + Umstellung auf gcc.rul + +Mon Jul 3 16:46:33 2006 joerg + * makefiles/TEMPLATES/temp-xcc.rul 1.2 + * makefiles/RULES/pci-qnx-cc.rul 1.5 + Umstellung auf dumbcc.rul + +Mon Jul 3 16:38:59 2006 joerg + * makefiles/RULES/cc-dumb.rul 1.1 + date and time created 06/07/03 16:38:59 by joerg + +Mon Jul 3 16:34:02 2006 joerg + * makefiles/RULES/i486-cygwin32_nt-cl.rul 1.2 + Umstellung auf cl.rul + +Mon Jul 3 16:33:24 2006 joerg + * makefiles/RULES/cc-msposix.rul 1.1 + * makefiles/RULES/cc-msc.rul 1.1 + date and time created 06/07/03 16:33:24 by joerg + +Mon Jul 3 16:12:42 2006 joerg + * makefiles/RULES/rs6000-aix-cc.rul 1.8 + Umstellung auf ibmcc.rul + +Mon Jul 3 16:12:12 2006 joerg + * makefiles/RULES/cc-ibm.rul 1.1 + date and time created 06/07/03 16:12:12 by joerg + +Mon Jul 3 16:09:07 2006 joerg + * makefiles/RULES/powerpc-beos-mwcc.rul 1.6 + * makefiles/RULES/bemac-beos-mwcc.rul 1.5 + * makefiles/RULES/bemac-beos-cc.rul 1.5 + Umstellung auf bemwcc.rul + +Mon Jul 3 16:08:31 2006 joerg + * makefiles/RULES/cc-bemwcc.rul 1.2 + Kommentarr fuer powerpc-beos-mwcc.rul neu + +Mon Jul 3 15:58:28 2006 joerg + * makefiles/RULES/ip22-irix-cc.rul 1.7 + Umstellung auf sgicc.rul + +Mon Jul 3 15:58:03 2006 joerg + * makefiles/RULES/cc-sgi.rul 1.1 + date and time created 06/07/03 15:58:03 by joerg + +Mon Jul 3 15:55:22 2006 joerg + * makefiles/RULES/news4000-newsos6-cc.rul 1.4 + Umstellung auf sonycc.rul + +Mon Jul 3 15:54:43 2006 joerg + * makefiles/RULES/cc-sony.rul 1.1 + date and time created 06/07/03 15:54:43 by joerg + +Mon Jul 3 15:51:43 2006 joerg + * makefiles/RULES/alpha-osf1-cc.rul 1.5 + Umstellung auf deccc.rul + +Mon Jul 3 15:51:16 2006 joerg + * makefiles/RULES/cc-dec.rul 1.1 + date and time created 06/07/03 15:51:16 by joerg + +Mon Jul 3 15:47:21 2006 joerg + * makefiles/RULES/aviion-dgux3-cc.rul 1.6 + * makefiles/RULES/aviion-dgux4-cc.rul 1.6 + Umstellung auf dgcc.rul + +Mon Jul 3 15:46:52 2006 joerg + * makefiles/RULES/cc-dg.rul 1.1 + date and time created 06/07/03 15:46:52 by joerg + +Mon Jul 3 15:42:02 2006 joerg + * makefiles/RULES/cc-bemwcc.rul 1.1 + date and time created 06/07/03 15:42:02 by joerg + +Mon Jul 3 15:31:34 2006 joerg + * makefiles/RULES/dn5500-domainos-cc.rul 1.4 + Umstellung auf apollocc.rul + +Mon Jul 3 15:30:49 2006 joerg + * makefiles/RULES/cc-apollo.rul 1.1 + date and time created 06/07/03 15:30:49 by joerg + +Mon Jul 3 15:25:23 2006 joerg + * makefiles/RULES/9000-725-hp-ux-cc.rul 1.11 + Umstellung auf hpcc.rul + +Mon Jul 3 15:24:26 2006 joerg + * makefiles/RULES/cc-hp.rul 1.1 + date and time created 06/07/03 15:24:26 by joerg + +Mon Jul 3 15:21:07 2006 joerg + * makefiles/RULES/sun4-sunos4-cc.rul 1.6 + * makefiles/RULES/sun3-sunos4-cc.rul 1.6 + OSDEFS= neu + +Mon Jul 3 14:42:21 2006 joerg + * makefiles/RULES/sun3-sunos4-cc.rul 1.5 + * makefiles/RULES/sun4-sunos4-cc.rul 1.5 + Umstellung auf suncc.rul + +Mon Jul 3 14:41:43 2006 joerg + * makefiles/RULES/cc-sun.rul 1.1 + date and time created 06/07/03 14:41:43 by joerg + +Mon Jul 3 14:34:20 2006 joerg + * makefiles/RULES/i86pc-sunos5-cc.rul 1.9 + * makefiles/RULES/sun4-sunos5-cc.rul 1.9 + * makefiles/RULES/sun4-sunos5-cc64.rul 1.4 + * makefiles/RULES/i86pc-sunos5-cc64.rul 1.3 + Umstellung auf sunprocc.rul/sunprocc64.rul + +Mon Jul 3 14:33:10 2006 joerg + * makefiles/RULES/cc-sunpro.rul 1.1 + * makefiles/RULES/cc-sunpro64.rul 1.1 + date and time created 06/07/03 14:33:10 by joerg + +Mon Jul 3 12:36:42 2006 joerg + * makefiles/RULES/power-macintosh-darwin-cc.rul 1.9 + * makefiles/RULES/hppa-nextstep-cc.rul 1.7 + * makefiles/RULES/power-macintosh-rhapsody-cc.rul 1.8 + * makefiles/RULES/i386-bsd-os3-cc.rul 1.6 + * makefiles/RULES/i386-freebsd-cc.rul 1.6 + * makefiles/RULES/i386-netbsd-cc.rul 1.8 + * makefiles/RULES/i386-openbsd-cc.rul 1.7 + * makefiles/RULES/i486-cygwin32_nt-cc.rul 1.6 + * makefiles/RULES/i586-linux-cc.rul 1.7 + * makefiles/RULES/i386-bsd-os-cc.rul 1.7 + * makefiles/RULES/i386-at386-gnu-cc.rul 1.4 + * makefiles/RULES/bepc-beos-cc.rul 1.6 + Umstellung auf gcc.rul/gcc64.rul + +Mon Jul 3 12:11:50 2006 joerg + * makefiles/RULES/bepc-beos-gcc.rul 1.8 + LN= /bin/ln -s neu + +Sun Jul 2 16:31:09 2006 joerg + * libfind/find_main.c 1.40 + * libfind/find.c 1.40 + DEV_BSIZE definieren falls nicht vorhanden + +Sun Jul 2 16:30:25 2006 joerg + * libfind/fetchdir.c 1.17 + * libfind/cmpdir.c 1.17 + lstat() nutzen fuer die inode Nummer falls HAVE_DIRENT_D_INO fehlt + +Sun Jul 2 16:06:42 2006 joerg + * libfind/fetchdir.c 1.16 + * libfind/cmpdir.c 1.16 + #ifndef __DJGPP__ -> #ifdef HAVE_DIRENT_D_INO, denn auch neuere Cygwin Versionen haben kein dirent->d_ino + +Fri Jun 30 17:23:31 2006 joerg + * makefiles/RULES/MKLINKS 1.61 + i386-cygwin32_nt-cl.rul i586-cygwin32_nt-cl.rul i686-cygwin32_nt-cl.rul i786-cygwin32_nt-cl.rul neu + +Fri Jun 30 17:23:02 2006 joerg + * makefiles/RULES/rules.prg 1.14 + RANLIB= und ARFLAGS= von der Compilerdefinition nach rules.prg bewegt + +Fri Jun 30 17:16:31 2006 joerg + * makefiles/RULES/i486-cygwin32_nt-cl.rul 1.1 + date and time created 06/06/30 17:16:31 by joerg + +Fri Jun 30 17:00:19 2006 joerg + * makefiles/RULES/hppa-nextstep-gcc.rul 1.7 + * makefiles/RULES/x86pc-qnx-gcc.rul 1.4 + * makefiles/RULES/i86pc-sunos5-gcc64.rul 1.3 + * makefiles/RULES/power-macintosh-rhapsody-gcc.rul 1.8 + * makefiles/RULES/sun4-sunos5-gcc64.rul 1.3 + * makefiles/RULES/powerpc-beos-gcc.rul 1.5 + * makefiles/RULES/sun4-sunos5-gcc.rul 1.9 + * makefiles/RULES/x86-interix-gcc.rul 1.2 + * makefiles/RULES/power-macintosh-darwin-gcc.rul 1.9 + * makefiles/RULES/sun4-sunos4-gcc.rul 1.6 + * makefiles/RULES/sun3-sunos4-gcc.rul 1.7 + * makefiles/RULES/rs6000-aix-gcc.rul 1.6 + * makefiles/RULES/i486-mingw32_nt-gcc.rul 1.3 + * makefiles/RULES/i486-cygwin32_nt-gcc.rul 1.6 + * makefiles/RULES/i586-linux-gcc.rul 1.7 + * makefiles/RULES/i586-mingw32_nt-gcc.rul 1.3 + * makefiles/RULES/i686-mingw32_nt-gcc.rul 1.3 + * makefiles/RULES/i786-mingw32_nt-gcc.rul 1.3 + * makefiles/RULES/i386-unixware-gcc.rul 1.4 + * makefiles/RULES/i86pc-sunos5-gcc.rul 1.9 + * makefiles/RULES/ip22-irix-gcc.rul 1.8 + * makefiles/RULES/i386-os2-gcc.rul 1.10 + * makefiles/RULES/i386-openserver-gcc.rul 1.5 + * makefiles/RULES/m68k-amigaos-gcc.rul 1.4 + * makefiles/RULES/i386-freebsd-gcc.rul 1.6 + * makefiles/RULES/i386-mingw32_nt-gcc.rul 1.3 + * makefiles/RULES/i386-ms-dos-gcc.rul 1.3 + * makefiles/RULES/i386-openbsd-gcc.rul 1.7 + * makefiles/RULES/i386-netbsd-gcc.rul 1.8 + * makefiles/RULES/aviion-dgux4-gcc.rul 1.7 + * makefiles/RULES/aviion-dgux3-gcc.rul 1.7 + * makefiles/RULES/i386-at386-gnu-gcc.rul 1.4 + * makefiles/RULES/bepc-beos-gcc.rul 1.7 + * makefiles/RULES/9000-725-hp-ux-gcc.rul 1.7 + * makefiles/RULES/alpha-osf1-gcc.rul 1.5 + * makefiles/RULES/i386-bsd-os-gcc.rul 1.7 + * makefiles/RULES/i386-bsd-os3-gcc.rul 1.6 + Umstellung auf gcc.rul/gcc64.rul + +Fri Jun 30 16:57:22 2006 joerg + * makefiles/RULES/cc-gcc.rul 1.1 + * makefiles/RULES/cc-gcc64.rul 1.1 + date and time created 06/06/30 16:57:22 by joerg + +Thu Jun 29 23:03:25 2006 joerg + * autoconf/xconfig.h.in 1.98 + * autoconf/configure.in 1.97 + * autoconf/aclocal.m4 1.47 + AC_STRUCT_DIRENT_D_INO / HAVE_DIRENT_D_INO neu + +Thu Jun 29 23:00:25 2006 joerg + * include/schily/dirent.h 1.16 + HAVE_SYS_TYES_H / HAVE_SYS_STAT_H neu + +Thu Jun 29 18:01:02 2006 joerg + * makefiles/RULES/x86-interix-gcc.rul 1.1 + * makefiles/RULES/os-interix.id 1.1 + * makefiles/RULES/os-interix.def 1.1 + date and time created 06/06/29 18:01:02 by joerg + +Thu Jun 29 15:15:03 2006 joerg + * autoconf/config.guess 1.6 + x86:Interix neu + +Thu Jun 29 15:11:48 2006 joerg + * autoconf/config.sub 1.3 + interisx uwin mks neu + +Thu Jun 29 14:56:59 2006 joerg + * makefiles/TEMPLATES/temp-xcc.rul 1.1 + date and time created 06/06/29 14:56:59 by joerg + +Thu Jun 29 14:56:51 2006 joerg + * makefiles/TEMPLATES/temp-gcc.rul 1.1 + date and time created 06/06/29 14:56:51 by joerg + +Tue Jun 27 11:17:33 2006 joerg + * include/schily/utypes.h 1.19 + #include fuer MSVC damit stze_t definiert ist + +Tue Jun 27 11:16:46 2006 joerg + * include/schily/schily.h 1.55 + * include/schily/standard.h 1.32 + #undef FOUND_SIZE_T wenn defined(_MSC_VER) && !defined(_SIZE_T_DEFINED) + +Tue Jun 27 11:15:26 2006 joerg + * include/schily/unistd.h 1.15 + write(int, void *, size_t) -> write(int, const void *, size_t) + +Mon Jun 26 16:58:05 2006 joerg + * include/schily/alloca.h 1.4 + * include/schily/device.h 1.14 + * include/schily/utypes.h 1.18 + * include/schily/mconfig.h 1.53 + Cstyle + +Mon Jun 26 15:20:07 2006 joerg + * autoconf/xconfig.h.in 1.97 + * autoconf/configure.in 1.96 + popen()/pclose()/_popen()/_pclose() Tests neu + +Mon Jun 26 14:37:17 2006 joerg + * autoconf/xconfig.h.in 1.96 + * autoconf/configure.in 1.95 + getpid()getppid() Tests neu + +Mon Jun 26 13:23:00 2006 joerg + * autoconf/xconfig.h.in 1.95 + * autoconf/configure.in 1.94 + truncate / ftruncate Test neu + +Mon Jun 26 12:53:08 2006 joerg + * autoconf/acgeneral.m4 1.3 + grep Test auf Ergebnisse erst nach tr -d '\015' wegen DOS Newline + +Sat Jun 24 13:24:08 2006 joerg + * autoconf/configure.in 1.93 + * autoconf/aclocal.m4 1.46 + * autoconf/xconfig.h.in 1.94 + Neuer Test fuer sys/times.h wegen clock_t test mit MSVC + size_t auch in stdlib.h, stddef.h, stdio.h suchen wegen MSVC + Neuer Test auf direct.h wegen MSVC + +Fri Jun 23 15:59:14 2006 joerg + * cdda2wav/sun.c 1.7 + * cdda2wav/aifc.c 1.8 + #include "mytype.h" weiter nach hinten wegen offsetof() + +Fri Jun 23 15:34:58 2006 joerg + * include/schily/unistd.h 1.14 + #include wegen MSVC size_t + +Fri Jun 23 14:35:31 2006 joerg + * include/schily/unistd.h 1.13 + #include fuer MSVC + +Fri Jun 23 14:17:22 2006 joerg + * autoconf/configure.in 1.92 + * autoconf/xconfig.h.in 1.93 + * autoconf/aclocal.m4 1.45 + __int64 Tests fuer MSVC neu + +Fri Jun 23 13:12:23 2006 joerg + * include/schily/utypes.h 1.17 + * include/schily/mconfig.h 1.52 + __int64 / long long Kommentar neu + +Fri Jun 23 13:10:03 2006 joerg + * libschily/align_test.c 1.20 + long long -> Llong + +Fri Jun 23 11:32:17 2006 joerg + * include/schily/utypes.h 1.16 + long long Datentypen kommen nun auch mit __int64 von MSVC klar + +Fri Jun 23 11:31:40 2006 joerg + * include/schily/mconfig.h 1.51 + HAVE_LONGLONG setzten wenn bei MSVC HAVE___INT64 gesetzt ist + +Mon Jun 5 21:55:22 2006 joerg + * cdrecord/scsi_mmc.c 1.18 + scsi_get_perf_curspeed() liest nun die gesamte Liste und returniert die Maximalwerte + +Mon Jun 5 20:35:55 2006 joerg + * cdrecord/cdrecord.c 1.315 + Version -> 2.01.01a10 + Bessere Meldungen bei Tracks > 0 mit -toc und Aehnlichem + +Mon Jun 5 15:28:50 2006 joerg + * cdrecord/drv_dvdplus.c 1.21 + Workaround fuer NEC Brenner mit halb beschriebener DVD+RW (phys end - phys start) ist kleiner als der beschreibbare Bereich + Daher verwenden wir nun end_lba von GET PERFORMANCE + +Mon Jun 5 00:08:29 2006 joerg + * cdrecord/scsimmc.h 1.13 + * cdrecord/cdrecord.1 1.108 + * cdrecord/cdrecord.h 1.168 + * cdrecord/drv_dvd.c 1.122 + * cdrecord/cd_misc.c 1.12 + * cdrecord/scsi_mmc.c 1.17 + Copyright -> 2006 + +Sun Jun 4 23:54:40 2006 joerg + * cdrecord/cd_misc.c 1.11 + * cdrecord/drv_dvd.c 1.121 + * cdrecord/cdrecord.h 1.167 + * cdrecord/drv_dvdplus.c 1.20 + is_cdspeed() neu + NEC DVD Firmwarebugerkennung nun mit is_cdspeed() + +Sun Jun 4 15:50:22 2006 joerg + * cdrecord/scsi_mmc.c 1.16 + HD-DVD & BD Profile Texte neu + +Sun Jun 4 15:38:13 2006 joerg + * cdrecord/scsi_mmc.c 1.15 + scsi_get_perf_maxspeed()/scsi_get_perf_curspeed() neu + scsi_get_performance() als universeller Low Level + +Sun Jun 4 15:33:15 2006 joerg + * cdrecord/drv_dvdplus.c 1.19 + * cdrecord/drv_dvd.c 1.120 + scsi_get_perf_maxspeed()/scsi_get_perf_curspeed() als Workaround fuer NEC Speed error in mode page 2A neu + +Sun Jun 4 15:20:36 2006 joerg + * cdrecord/cdrecord.h 1.166 + scsi_get_perf_maxspeed()/scsi_get_perf_curspeed() neu + +Fri Jun 2 22:39:20 2006 joerg + * cdrecord/cdrecord.c 1.314 + Besserer DMA Speed Test der hoffentlich erkennt wenn es nicht klappt + +Tue May 30 00:32:54 2006 joerg + * cdrecord/drv_mmc.c 1.166 + profile == 0x2B fuer DVD+R/DL beruecksichtigen (das wurde durch die Umstellung der profile Auswertung notwendig) + +Tue May 30 00:04:27 2006 joerg + * cdrecord/CONTRIBUTING 1.3 Schreibfehler -Tue Jun 17 19:18:00 2003 Joerg Schilling - * auinfo.c 1.22 - samples -> nsamples wegen samples() Makro und K&R C - -Sat May 31 21:58:05 2003 Joerg Schilling - * scsi-amigaos.c 1.5 - Neue Version von Thomas Langer - -Sat May 31 19:41:16 2003 Joerg Schilling - * scsi-amigaos.c 1.4 - Eingerueckt nach cstyle - -Sat May 31 18:34:37 2003 Joerg Schilling - * cdrecord.c 1.260 - GPL Hinweise besser formuliert, Schreibfehler in usage() beseitigt - -Sat May 31 18:10:38 2003 Joerg Schilling - * cdrecord.1 1.82 - Schreibfehler berichtigt & -format dokumentiert - -Sat May 31 18:09:46 2003 Joerg Schilling - * auinfo.c 1.21 - Fix fuer fehlerhafte Erkennung von *.inf Dateien die Meldung 'WARNING: Stdin is connected to a terminal.' verursacht - -Fri May 16 13:02:58 2003 Joerg Schilling - * scsi-remote.c 1.13 - js_snprintf(devname, sizeof(devname), device); -> js_snprintf(devname, sizeof(devname), "%s", device); - -Wed May 14 18:59:12 2003 Joerg Schilling - * cdrecord.c 1.259 - CD-Text -text Aktivierung durch trackp[MAX_TRACK+1].flags |= TI_TEXT - Kein CD-text mehr wenn track[0].flags & TI_TEXT schon gesetzt (durch textfile=) - -Wed May 14 18:57:53 2003 Joerg Schilling - * cue.c 1.17 - CD-Text aus CDTEXTFILE nur noch wenn trackp[MAX_TRACK+1].flags & TI_TEXT - -Wed May 14 18:56:55 2003 Joerg Schilling - * cdrecord.1 1.81 - Neue erweiterte CD-Text Behandlung beschrieben - -Wed May 14 02:24:17 2003 Joerg Schilling - * cdrecord.c 1.258 - Version -> 2.01a15, Diverse Umstellungen damit tracks == 0 Abfragen bei cuefile=xxx korrekt behandelt werden - -Wed May 14 02:21:07 2003 Joerg Schilling - * xio.c 1.5 - while(pp) -> for (; pp; pp = pp->x_next) damit continue bei x_name == NULL nicht zur Endlosschleife wird - -Tue May 13 23:26:57 2003 Joerg Schilling - * cdrecord.1 1.80 - speed= Behandlung besser erklaert und Schreibfehler - -Tue May 13 23:26:14 2003 Joerg Schilling - * cue.c 1.16 - TI_SWAB bei FILE ... WAVE setzen - -Tue May 13 13:07:03 2003 Joerg Schilling - * xio.c 1.4 - pp->x_name == NULL voer strcmp geaendert - -Tue May 13 13:05:00 2003 Joerg Schilling - * xio.c 1.3 - Neue Knoten korrekt in Liste ein und aushaengen - -Mon May 12 02:17:00 2003 Joerg Schilling - * drv_mmc.c 1.149 - Support fuer TM_QUADRO/TM_ALLOW_COPY neu - Hack fuer CUE Sheet Handling mit MODE2/CDI trackp[i].dbtype == DB_RAW - Fuer Lead-In/Lead-Out werden nun die Bits fuer Datengroesse wegmaskiert - -Mon May 12 01:39:30 2003 Joerg Schilling - * cdrecord.c 1.257 - setleadinout() setzt nun trackp[tracks+1].tracktype aus trackp[tracks].tracktype - -Mon May 12 01:38:03 2003 Joerg Schilling - * cue.c 1.15 - Erste funktionierende Version - -Mon May 12 00:26:35 2003 Joerg Schilling - * drv_dvdplus.c 1.8 - Canot -> Cannot Schreibfehler beseitigt - -Mon May 12 00:25:29 2003 Joerg Schilling - * cdrecord.h 1.154 - parsecue()/fparsecue() neu - -Mon May 12 00:22:57 2003 Joerg Schilling - * cdrecord.c 1.256 - Version -> 2.01a14, Neue Option cuefile=, Kein Aufruf von checkdsize() wenn tracks == 0 (tsize == -150) - -Mon May 12 00:20:55 2003 Joerg Schilling - * cdrecord.1 1.79 - einfache erste cuefile= Doku - -Sun May 11 21:47:29 2003 Joerg Schilling - * cdrecord.h 1.153 - TI_QUADRO & is_quadro() neu - -Sun May 11 21:46:53 2003 Joerg Schilling - * xio.c 1.2 - Schutz gegen Coredump wenn pp->x_name == NULL - -Sat May 10 16:15:14 2003 Joerg Schilling - * cue.c 1.14 - Erster Ansatz fuer parse_file() - -Sat May 10 15:05:46 2003 Joerg Schilling - * cue.c 1.13 - struct state neu - cueopen()/neednextitem()/needword()/needitem()/checkextra()/cueabort() neu - -Fri May 9 10:10:42 2003 Joerg Schilling - * cue.c 1.12 - keyw_t Arrays -> LOCAL - -Fri May 9 10:08:10 2003 Joerg Schilling - * cue.c 1.11 - Parser Funktionen -> LOCAL - -Fri May 9 10:00:21 2003 Joerg Schilling - * cue.c 1.10 - Erster Ansatz zum weiteren parsieren der Keywort Zeilen mit den Funktionen parse_*() - -Fri May 9 09:58:25 2003 Joerg Schilling - * cdtext.c 1.9 - #include cdtext.h vor cdrecord.h wegen gettextptr() und den Typ textptr_t - -Fri May 9 09:57:08 2003 Joerg Schilling - * auinfo.c 1.20 - * cdrecord.h 1.152 - gettextptr() ist nun nicht mehr LOCAL - -Fri May 9 09:56:24 2003 Joerg Schilling - * cdtext.h 1.4 - #define CDTEXT_H fuer Erkennung dasz cdtext.h includiert wurde - -Thu May 8 20:13:07 2003 Joerg Schilling - * cue.c 1.9 - Umgestellt fuer mehr "Ordnung" - -Thu May 8 19:57:21 2003 Joerg Schilling - * cue.c 1.8 - Definitionen fuer alle Schluesselworte - -Thu May 8 19:44:42 2003 Joerg Schilling - * cue.c 1.7 - getlocal() beseitigt, parsecue()/fparsecue() neu - -Thu May 8 19:38:55 2003 Joerg Schilling - * scsiopen.c 1.94 - js_snprintf(errs, slen, scgp->errstr) -> js_snprintf(errs, slen, "%s", scgp->errstr) - -Thu May 8 19:38:14 2003 Joerg Schilling - * drv_mmc.c 1.148 - get_speeds_plextor() geht nicht mit alten LW, daher Ausfuerung im silent Mode - -Thu May 8 00:45:07 2003 Joerg Schilling - * cue.c 1.6 - Reihenfolge der Keyworte Kommentar - -Wed May 7 23:46:01 2003 Joerg Schilling - * cdrecord.h 1.151 - * wm_packet.c 1.22 - * fifo.c 1.45 - * cdrecord.c 1.255 - Umbau auf 'xio' - -Wed May 7 20:31:31 2003 Joerg Schilling - * xio.h 1.1 - * xio.c 1.1 - date and time created 03/05/07 19:31:31 by joerg - -Tue May 6 23:57:09 2003 Joerg Schilling - * cdrecord.h 1.150 - * cdrecord.1 1.78 - * cdrecord.c 1.254 - -abort Option neu - -Tue May 6 19:12:27 2003 Joerg Schilling - * cue.c 1.5 - Kommentar verbessert, lookup() mit table Parameter +Tue May 30 00:00:18 2006 joerg + * libscg/scsi-linux-ata.c 1.9 + Versuch des UID Hanling wie bei scsi-linux-sg.c + +Sun May 21 21:24:01 2006 joerg + * cdrecord/Makefile 1.36 + Alte IFDEF= Zuweisung geloescht + +Sun May 21 21:22:39 2006 joerg + * cdrecord/Makefile 1.35 + Kommentar Umgestellt + +Sun May 21 15:02:30 2006 joerg + * cdrecord/Makefile 1.34 + CPPOPTS += -I../libedc neu + +Sun May 21 14:53:12 2006 joerg + * cdrecord/CONTRIBUTING 1.2 + §8 / §9 neu + +Sun May 21 14:43:27 2006 joerg + * cdrecord/drv_mmc.c 1.165 + Bessere Erkennung des DVD-Medientyps wegen eines Problems mit Pioneer DVR-110 + +Sun May 21 14:21:14 2006 joerg + * cdrecord/Makefile 1.33 + Umbau der "make rel" Regeln fuer CDDL & DVD OSS Support + +Wed May 17 08:40:52 2006 joerg + * libscg/scsi-hpux.c 1.32 + * libscg/scsi-apollo.c 1.6 + Cstyle -Tue May 6 00:35:47 2003 Joerg Schilling - * cue.c 1.4 - Kommentar verbessert +Wed May 17 08:30:26 2006 joerg + * libscg/scsi-linux-ata.c 1.8 + sg_cgc.buffer ist unsigned char *, daher (void *) Cast + +Tue May 16 22:01:31 2006 joerg + * cdda2wav/sndconfig.c 1.24 + Schreibfehler errmsg(EX_BAD -> errmsgno(EX_BAD + +Tue May 16 21:57:56 2006 joerg + * cdda2wav/interface.c 1.45 + Schreibfehler errmsgno/ -> errmsgno( + +Tue May 16 21:57:33 2006 joerg + * cdda2wav/cdda2wav.c 1.70 + Schreibfehler ermsgno() -> errmsgno() + +Tue May 16 21:56:17 2006 joerg + * cdrecord/readcd.mk 1.6 + -ledc_ecc ... neu + +Tue May 16 21:55:23 2006 joerg + * cdrecord/scsimmc.h 1.12 + * cdrecord/defaults.c 1.19 + Schreibfehler execptions -> exceptions + +Mon May 15 23:17:41 2006 joerg + * libscg/scsi-linux-pg.c 1.44 + * libscg/pg.h 1.2 + GPL Hinweis mit Einverstaendnis des Autors beseitigt + +Mon May 15 21:14:02 2006 joerg + * libedc/repair.mk 1.1 + date and time created 06/05/15 21:14:02 by joerg + +Mon May 15 21:10:29 2006 joerg + * libedc/repair.c 1.1 + date and time created 06/05/15 21:10:29 by joerg + +Mon May 15 20:56:46 2006 joerg + * libedc/libedc_dec.mk 1.1 + date and time created 06/05/15 20:56:46 by joerg + +Mon May 15 20:48:47 2006 joerg + * libedc/Makefile 1.2 + libedc_dec.mk neu + +Mon May 15 20:48:28 2006 joerg + * libedc/edc_ecc_dec.c 1.3 + Core-dumps durch gdp->global_erasures == NULL vermeiden + +Sun May 14 22:57:09 2006 joerg + * cdrecord/skel.mk 1.2 + * cdrecord/readcd.mk 1.5 + MAKE_LICENSE=MKCDDL neu + +Sun May 14 22:56:43 2006 joerg + * cdrecord/readcd.1 1.24 + * cdrecord/cdrecord.1 1.107 + GPL Kommentar beseitigt + +Sun May 14 22:45:04 2006 joerg + * libedc/edc_ecc_dec.c 1.2 + EDC_DECODER_HACK neu + mconfig.h neu + DECODE_SUB_IN_ENCODER neu + edc.h neu + +Sun May 14 22:43:58 2006 joerg + * libedc/edc.h 1.2 + EDC_DECODER_HACK neu + +Sun May 14 22:42:56 2006 joerg + * libedc/edc_code_tables 1.1 + date and time created 06/05/14 22:42:56 by joerg + +Sun May 14 21:53:14 2006 joerg + * libedc/libedc_ecc-mapvers 1.2 + * libedc/ecc.h 1.5 + * libedc/edc_ecc.c 1.22 + Die Funktionen encode_L2_Q()/encode_L2_P() werden fuer libedc_ecc_dec global benoetigt + +Sun May 14 21:32:00 2006 joerg + * cdrecord/CONTRIBUTING 1.1 + date and time created 06/05/14 21:32:00 by joerg + +Sun May 14 15:32:56 2006 joerg + * scgcheck/scgcheck.1 1.10 + GPL entfernt + +Sun May 14 14:18:55 2006 joerg + * conf/Makefile 1.3 + * makefiles/RULES/sun4-sunos4-cc.rul 1.4 + * makefiles/RULES/sun4-sunos5-cc64.rul 1.3 + * makefiles/RULES/sun4-sunos5-gcc64.rul 1.2 + * makefiles/RULES/sun4-sunos5-gcc.rul 1.8 + * makefiles/RULES/sun4-sunos4-gcc.rul 1.5 + * makefiles/RULES/sun4-sunos5-cc.rul 1.8 + * makefiles/RULES/sun3-sunos4-gcc.rul 1.6 + * makefiles/RULES/x86pc-qnx-gcc.rul 1.3 + * makefiles/RULES/rules1.dir 1.12 + * makefiles/RULES/rules1.top 1.33 + * makefiles/RULES/rules.tpk 1.4 + * makefiles/RULES/rules.mod 1.6 + * makefiles/RULES/rules.scr 1.2 + * makefiles/RULES/rules.rel 1.6 + * makefiles/RULES/rules.shl 1.8 + * makefiles/RULES/rules.tag 1.2 + * makefiles/RULES/rules.rdi 1.9 + * makefiles/RULES/rules.mks 1.10 + * makefiles/RULES/sun3-sunos4-cc.rul 1.4 + * makefiles/RULES/rules.sps 1.11 + * makefiles/RULES/rules.top 1.16 + * makefiles/RULES/rules.prg 1.13 + * makefiles/RULES/rules.obj 1.4 + * makefiles/RULES/rules.cnf 1.9 + * makefiles/RULES/rules.loc 1.6 + * makefiles/RULES/rules.dir 1.8 + * makefiles/RULES/rules.aux 1.7 + * makefiles/RULES/rules.clr 1.6 + * makefiles/RULES/rules.cmd 1.7 + * makefiles/RULES/rules.drv 1.6 + * makefiles/RULES/rules.hlp 1.11 + * makefiles/RULES/rules.inc 1.4 + * makefiles/RULES/rules.lib 1.8 + * makefiles/RULES/rules.man 1.2 + * makefiles/RULES/rules.ins 1.15 + * makefiles/RULES/rules.dep 1.2 + * makefiles/RULES/rules.lnt 1.3 + * makefiles/RULES/power-macintosh-darwin-gcc.rul 1.8 + * makefiles/RULES/powerpc-beos-mwcc.rul 1.5 + * makefiles/RULES/power-macintosh-rhapsody-cc.rul 1.7 + * makefiles/RULES/rs6000-aix-gcc.rul 1.5 + * makefiles/RULES/r-smake.dep 1.9 + * makefiles/RULES/r-smake.obj 1.5 + * makefiles/RULES/r-make.obj 1.3 + * makefiles/RULES/powerpc-beos-gcc.rul 1.4 + * makefiles/RULES/r-gmake.tag 1.2 + * makefiles/RULES/r-make.dep 1.6 + * makefiles/RULES/r-smake.tag 1.3 + * makefiles/RULES/r-make.tag 1.2 + * makefiles/RULES/rs6000-aix-cc.rul 1.7 + * makefiles/RULES/r-gmake.dep 1.11 + * makefiles/RULES/power-macintosh-rhapsody-gcc.rul 1.7 + * makefiles/RULES/os-sco_sv.id 1.2 + * makefiles/RULES/os-unixware.id 1.2 + * makefiles/RULES/os-unixware.def 1.2 + * makefiles/RULES/os-rhapsody.id 1.2 + * makefiles/RULES/os-osf1.def 1.2 + * makefiles/RULES/os-os2.def 1.2 + * makefiles/RULES/os-osf1.id 1.2 + * makefiles/RULES/os-rhapsody.def 1.2 + * makefiles/RULES/os-qnx.id 1.2 + * makefiles/RULES/os-qnx.def 1.2 + * makefiles/RULES/os-sunos5.def 1.3 + * makefiles/RULES/os-unix_sv.id 1.2 + * makefiles/RULES/os-sunos4.def 1.3 + * makefiles/RULES/os-sunos.id 1.2 + * makefiles/RULES/pci-qnx-cc.rul 1.4 + * makefiles/RULES/power-macintosh-darwin-cc.rul 1.8 + * makefiles/RULES/os-mingw32_nt-5.1.id 1.2 + * makefiles/RULES/os-mingw32_nt-5.2.id 1.2 + * makefiles/RULES/os-mingw32_nt.def 1.2 + * makefiles/RULES/os-mingw32_nt.id 1.2 + * makefiles/RULES/os-ms-dos.def 1.2 + * makefiles/RULES/os-ms-dos.id 1.2 + * makefiles/RULES/os-netbsd.def 1.2 + * makefiles/RULES/os-netbsd.id 1.2 + * makefiles/RULES/os-news-os.id 1.2 + * makefiles/RULES/os-newsos6.def 1.2 + * makefiles/RULES/os-nextstep.def 1.2 + * makefiles/RULES/os-nextstep.id 1.2 + * makefiles/RULES/os-openbsd.def 1.3 + * makefiles/RULES/os-openbsd.id 1.3 + * makefiles/RULES/os-openserver.def 1.2 + * makefiles/RULES/os-os-2.id 1.2 + * makefiles/RULES/os-hp-ux.def 1.3 + * makefiles/RULES/os-hp-ux.id 1.2 + * makefiles/RULES/os-mingw32_nt-5.0.id 1.2 + * makefiles/RULES/os-mingw32_nt-4.0.id 1.2 + * makefiles/RULES/os-mingw32_me-4.90.id 1.2 + * makefiles/RULES/os-irix.def 1.3 + * makefiles/RULES/os-irix.id 1.2 + * makefiles/RULES/os-linux.def 1.3 + * makefiles/RULES/os-linux.id 1.2 + * makefiles/RULES/os-mac-os.id 1.2 + * makefiles/RULES/os-mac-os10.def 1.2 + * makefiles/RULES/os-mingw32_95-4.0.id 1.2 + * makefiles/RULES/os-mingw32_98-4.0.id 1.2 + * makefiles/RULES/os-mingw32_98-4.10.id 1.2 + * makefiles/RULES/os-dgux.id 1.2 + * makefiles/RULES/os-gnu.id 1.2 + * makefiles/RULES/os-gnu.def 1.2 + * makefiles/RULES/os-freebsd.id 1.2 + * makefiles/RULES/os-freebsd.def 1.2 + * makefiles/RULES/os-dragonfly.id 1.2 + * makefiles/RULES/os-dragonfly.def 1.2 + * makefiles/RULES/os-domainos.id 1.2 + * makefiles/RULES/os-domainos.def 1.2 + * makefiles/RULES/os-dgux4.def 1.3 + * makefiles/RULES/os-dgux3.def 1.3 + * makefiles/RULES/os-darwin.id 1.2 + * makefiles/RULES/os-darwin.def 1.2 + * makefiles/RULES/os-cygwin32_nt.id 1.2 + * makefiles/RULES/os-cygwin32_nt.def 1.2 + * makefiles/RULES/os-bsd-os3.def 1.2 + * makefiles/RULES/man-sysv.def 1.2 + * makefiles/RULES/news4000-newsos6-cc.rul 1.3 + * makefiles/RULES/os-aix.def 1.3 + * makefiles/RULES/os-aix.id 1.2 + * makefiles/RULES/os-amigaos.def 1.2 + * makefiles/RULES/mk-smake.id 1.5 + * makefiles/RULES/os-amigaos.id 1.2 + * makefiles/RULES/mk-gmake.id 1.15 + * makefiles/RULES/man-bsd.def 1.2 + * makefiles/RULES/os-beos.def 1.2 + * makefiles/RULES/MKLINKS 1.60 + * makefiles/RULES/os-beos.id 1.2 + * makefiles/RULES/os-bsd-os.def 1.2 + * makefiles/RULES/os-bsd-os.id 1.3 + * makefiles/RULES/i86pc-sunos5-cc64.rul 1.2 + * makefiles/RULES/mk-.id 1.11 + * makefiles/RULES/i86pc-sunos5-cc.rul 1.8 + * makefiles/RULES/i586-linux-cc.rul 1.6 + * makefiles/RULES/i586-linux-gcc.rul 1.6 + * makefiles/RULES/m68k-amigaos-gcc.rul 1.3 + * makefiles/RULES/i586-mingw32_nt-gcc.rul 1.2 + * makefiles/RULES/i686-mingw32_nt-gcc.rul 1.2 + * makefiles/RULES/i786-mingw32_nt-gcc.rul 1.2 + * makefiles/RULES/local.cnf 1.4 + * makefiles/RULES/ldummy.cnf 1.2 + * makefiles/RULES/ip22-irix-gcc.rul 1.7 + * makefiles/RULES/ip22-irix-cc.rul 1.6 + * makefiles/RULES/i86pc-sunos5-gcc64.rul 1.2 + * makefiles/RULES/i86pc-sunos5-gcc.rul 1.8 + * makefiles/RULES/i386-netbsd-gcc.rul 1.7 + * makefiles/RULES/i386-openbsd-cc.rul 1.6 + * makefiles/RULES/i486-cygwin32_nt-cc.rul 1.5 + * makefiles/RULES/i386-openserver-gcc.rul 1.4 + * makefiles/RULES/i386-mingw32_nt-gcc.rul 1.2 + * makefiles/RULES/i386-freebsd-gcc.rul 1.5 + * makefiles/RULES/i386-ms-dos-gcc.rul 1.2 + * makefiles/RULES/i486-mingw32_nt-gcc.rul 1.2 + * makefiles/RULES/i386-netbsd-cc.rul 1.7 + * makefiles/RULES/i386-unixware-gcc.rul 1.3 + * makefiles/RULES/i486-cygwin32_nt-gcc.rul 1.5 + * makefiles/RULES/i386-openserver-cc.rul 1.2 + * makefiles/RULES/i386-openbsd-gcc.rul 1.6 + * makefiles/RULES/i386-os2-gcc.rul 1.9 + * makefiles/RULES/i386-unixware-cc.rul 1.5 + * makefiles/RULES/i386-freebsd-cc.rul 1.5 + * makefiles/RULES/i386-bsd-os3-gcc.rul 1.5 + * makefiles/RULES/i386-bsd-os3-cc.rul 1.5 + * makefiles/RULES/bepc-beos-gcc.rul 1.6 + * makefiles/RULES/bepc-beos-cc.rul 1.5 + * makefiles/RULES/bemac-beos-mwcc.rul 1.4 + * makefiles/RULES/i386-bsd-os-gcc.rul 1.6 + * makefiles/RULES/i386-bsd-os-cc.rul 1.6 + * makefiles/RULES/i386-at386-gnu-gcc.rul 1.3 + * makefiles/RULES/i386-at386-gnu-cc.rul 1.3 + * makefiles/RULES/hppa-nextstep-gcc.rul 1.6 + * makefiles/RULES/hppa-nextstep-cc.rul 1.6 + * makefiles/RULES/dn5500-domainos-cc.rul 1.3 + * makefiles/RULES/dummy.dep 1.2 + * makefiles/RULES/alpha-osf1-gcc.rul 1.4 + * makefiles/RULES/9000-725-hp-ux-cc.rul 1.10 + * makefiles/RULES/bemac-beos-cc.rul 1.4 + * makefiles/RULES/alpha-osf1-cc.rul 1.4 + * makefiles/RULES/aviion-dgux4-cc.rul 1.5 + * makefiles/RULES/aviion-dgux3-cc.rul 1.5 + * makefiles/RULES/aviion-dgux4-gcc.rul 1.6 + * makefiles/RULES/9000-725-hp-ux-gcc.rul 1.6 + * makefiles/RULES/aviion-dgux3-gcc.rul 1.6 + Copyright J. Schilling neu + +Sun May 14 13:48:40 2006 joerg + * makefiles/RULES/version 1.2 + Version -> 1.5a03 + +Sun May 14 13:42:26 2006 joerg + * makefiles/RULES/MKLINKS 1.59 + i386-darwin-cc.rul/i386-darwin-gcc.rul neu + +Sun May 14 13:27:06 2006 joerg + * cdrecord/cdrecord.c 1.313 + Version -> 2.01.01a09 + GPL bezogene Hinweise im Kommentar beseitigt + SuSE spezifischer Code beseitigt + +Sat May 13 23:20:54 2006 joerg + * cdda2wav/setuid.c 1.14 + * cdda2wav/setuid.h 1.4 + * cdda2wav/ringbuff.h 1.7 + * cdda2wav/byteorder.h 1.5 + * cdda2wav/scsi_cmds.h 1.13 + * cdda2wav/resample.h 1.5 + * cdda2wav/sndconfig.h 1.4 + * cdda2wav/mytype.h 1.4 + * cdda2wav/global.h 1.13 + * cdda2wav/mycdrom.h 1.12 + * cdda2wav/mmsystem.h 1.6 + * cdda2wav/lowlevel.h 1.3 + * cdda2wav/sndfile.h 1.6 + * cdda2wav/semshm.h 1.5 + * cdda2wav/toc.h 1.10 + * cdda2wav/exitcodes.h 1.2 + * cdda2wav/ringbuff.c 1.13 + * cdda2wav/raw.c 1.6 + * cdda2wav/resample.c 1.21 + * cdda2wav/scsi_cmds.c 1.34 + * cdda2wav/semshm.c 1.18 + * cdda2wav/sndconfig.c 1.23 + * cdda2wav/cd_extra.c 1.13 + * cdda2wav/cd_text.c 1.7 + Generischer Lizenskommentar + +Sat May 13 22:31:29 2006 joerg + * cdda2wav/wav.c 1.6 + * cdda2wav/interface.h 1.16 + * cdda2wav/interface.c 1.44 + * cdda2wav/config.h 1.10 + * cdda2wav/aiff.c 1.7 + * cdda2wav/toc.c 1.64 + * cdda2wav/cdda2wav.c 1.69 + * cdda2wav/cdda2wav.h 1.8 + * cdda2wav/ioctl.c 1.27 + * cdda2wav/sun.c 1.6 + * cdda2wav/aifc.c 1.7 + GPL beseitigt + +Sat May 13 21:53:54 2006 joerg + * cdda2wav/cd_extra.c 1.12 + sccsid[] -> _sccsid[] + +Sat May 13 21:40:40 2006 joerg + * cdda2wav/toc.c 1.63 + Text fuer CDDB Copyright korrigiert + +Sat May 13 19:16:28 2006 joerg + * cdrecord/defaults.c 1.18 + * cdda2wav/cd_extra.c 1.11 + * cdda2wav/toc.c 1.62 + * cdda2wav/sndconfig.c 1.22 + * cdda2wav/resample.c 1.20 + * cdda2wav/cdda2wav.h 1.7 + * cdda2wav/semshm.c 1.17 + * cdda2wav/ringbuff.c 1.12 + * cdda2wav/scsi_cmds.c 1.33 + Copyright -> 2006 + +Sat May 13 19:08:23 2006 joerg + * cdda2wav/sndconfig.c 1.21 + * cdda2wav/toc.c 1.61 + * cdda2wav/semshm.c 1.16 + * cdda2wav/scsi_cmds.c 1.32 + * cdda2wav/ringbuff.c 1.11 + * cdda2wav/resample.c 1.19 + * cdda2wav/ioctl.c 1.26 + * cdda2wav/interface.c 1.43 + * cdda2wav/cdda2wav.c 1.68 + Weitere Umstellungen auf errmsg() + +Sat May 13 19:01:46 2006 joerg + * cdda2wav/Makefile 1.10 + Infrastruktur fuer make rel neu + +Sat May 13 16:45:56 2006 joerg + * cdda2wav/cd_extra.c 1.10 + fprintf(stderr -> errmsg + +Sat May 13 16:40:53 2006 joerg + * cdda2wav/setuid.c 1.13 + * cdda2wav/semshm.c 1.15 + * cdda2wav/sndconfig.c 1.20 + * cdda2wav/ringbuff.c 1.10 + * cdda2wav/resample.c 1.18 + * cdda2wav/ioctl.c 1.25 + * cdda2wav/toc.c 1.60 + perror -> errmsg + +Sat May 13 16:31:53 2006 joerg + * cdda2wav/interface.c 1.42 + * cdda2wav/scsi_cmds.c 1.31 + * cdda2wav/cdda2wav.c 1.67 + perror -> errmsg + FatalError() nun mit zusaetzlichem err Parameter + +Sat May 13 16:18:01 2006 joerg + * cdda2wav/cdda2wav.h 1.6 + FatalError() nun mit zusaetzlichem err Parameter + +Thu May 11 23:24:25 2006 joerg + * cdrecord/readcd.c 1.81 + * btcflash/skel.c 1.11 + * scgskeleton/skel.c 1.7 + * cdrecord/skel.c 1.7 + * cdrecord/drv_dvdplus.c 1.18 + * cdrecord/cdrecord.c 1.312 + * cdda2wav/resample.c 1.17 + * cdda2wav/sndconfig.c 1.19 + * cdda2wav/ioctl.c 1.24 + * cdda2wav/cdda2wav.c 1.66 + * cdda2wav/toc.c 1.59 + Cstyle -Tue May 6 00:23:14 2003 Joerg Schilling - * cue.c 1.3 - Umbau auf Makefilesystem, ungetline()/getlocal() neu - -Sun May 4 18:41:33 2003 Joerg Schilling - * cdrecord.1 1.77 - Beschreibung der Audio Kopie aus Pipe - -Sun May 4 18:36:46 2003 Joerg Schilling - * cdrecord.c 1.253 - Version -> 2.01a13 - -Sun May 4 18:35:19 2003 Joerg Schilling - * cdrecord.h 1.149 - * cdrecord.c 1.252 - * auinfo.c 1.19 - Neue Funktion auinfosize() fuer AudioCDs aus Pipe Brennen - -Sun May 4 15:46:38 2003 Joerg Schilling - * cdrecord.c 1.251 - Neue Funktion opentracks() und Umstellung des Trackparsing - -Sun May 4 15:18:21 2003 Joerg Schilling - * fifo.c 1.44 - STDIN wird nicht mehr geschossen damit Audio "On the Fly" moeglich wird - -Sun May 4 15:16:43 2003 Joerg Schilling - * cdrecord.h 1.148 - Neues Track Flag TI_USEINFO, tracktype/dbtype nun Uchar - -Sun May 4 12:52:00 2003 Joerg Schilling - * cdrecord.c 1.250 - setuid(getuid()) nachdem alle root Dinge erledigt sind (hoffentlich) - -Sat May 3 20:09:17 2003 Joerg Schilling - * scsitransp.h 1.54 - * scsitransp.c 1.86 - scg_fprascii()/scg_prascii()/scg_sprascii() neu - -Sat May 3 19:39:32 2003 Joerg Schilling - * cdrecord.c 1.249 - gracewait setzt nun didgrace auf TRUE um doppeltes Warten zu vermeiden - -Fri May 2 22:49:20 2003 Joerg Schilling - * scsi-unixware.c 1.35 - Debug error() beseitigt - -Fri May 2 22:46:35 2003 Joerg Schilling - * scsi-unixware.c 1.34 - xpopen() neu damit suid root Binaries gehen, denn /etc/scsi/pdiconfig geht nicht wenn euid != uid - -Tue Apr 29 22:59:14 2003 Joerg Schilling - * cdrecord.c 1.248 - Version -> 2.01a11 - -Tue Apr 29 20:59:54 2003 Joerg Schilling - * cdrecord.c 1.247 - * cdrecord.1 1.76 - Neue Optionen -xa/-xamix und -multi/-mode2/-xa1/-xa2/-cdi korrigiert - -Tue Apr 29 20:41:16 2003 Joerg Schilling - * drv_mmc.c 1.147 - Support fuer TAO -mode2 - -Tue Apr 29 20:40:26 2003 Joerg Schilling - * cdrecord.h 1.147 - Definitionen fuer Daten Sektor Typen - -Tue Apr 29 00:27:20 2003 Joerg Schilling - * drv_mmc.c 1.146 - Bessere Ausgabe fuer formatierte RW Medien - -Tue Apr 29 00:26:27 2003 Joerg Schilling - * scsi_mmc.c 1.7 - Ausgave des Current Profile auf separater Zeile - -Wed Apr 23 23:25:27 2003 Joerg Schilling - * drv_dvdplus.c 1.5 - Ungebrauchte Variablen beseitigt - -Wed Apr 23 23:20:27 2003 Joerg Schilling - * scsi_cdr.c 1.133 - read_track_info() Bug gefixt (type Bits waren in cmd_cdb[2] statt cmd_cdb[1]) - -Wed Apr 23 23:19:24 2003 Joerg Schilling - * cdrecord.c 1.246 - gracewait() umstrukturiert - -Wed Apr 23 23:18:13 2003 Joerg Schilling - * scsi_mmc.c 1.6 - * drv_mmc.c 1.145 - * cdrecord.h 1.146 - print_profiles() neu - -Tue Apr 22 22:36:02 2003 Joerg Schilling - * cdrecord.c 1.245 - Return Code von (*dp->cdr_init)(scgp, dp) auswerten - -Tue Apr 22 19:08:58 2003 Joerg Schilling - * cdrecord.c 1.244 - raise_fdlim versucht nun nicht mehr z.B. ein Limit von 256 auf 109 zu "erhoehen". - -Tue Apr 22 17:47:29 2003 Joerg Schilling - * drv_mmc.c 1.144 - Fehlendes " ergaenzt - -Tue Apr 22 17:46:28 2003 Joerg Schilling - * drv_mmc.c 1.143 - Bessere Fehlermeldung fuer get next writable address auf formatierte CD-RW - -Tue Apr 22 17:42:06 2003 Joerg Schilling - * cdrecord.c 1.243 - Mehr Fehlermeldungen wenn in der Hauptschleife Fehler auftreten. - -Tue Apr 22 01:08:46 2003 Joerg Schilling - * cdrecord.c 1.242 - Version -> 2.01a11, gracewait() mit didgrace Parameter fuer Ausgabe ohne Warten - -Mon Apr 21 15:49:58 2003 Joerg Schilling - * cdrecord.c 1.241 - Format Code mit #ifdef DRV_DVD auskommentiert - -Mon Apr 21 15:40:04 2003 Joerg Schilling - * drv_mmc.c 1.142 - CL_TYPE_* #defines neu fuer scsi_close_tr_session() - -Mon Apr 21 15:39:13 2003 Joerg Schilling - * cdrecord.c 1.240 - -format & BOOL gracedone neu - -Mon Apr 21 15:23:22 2003 Joerg Schilling - * cdrecord.h 1.145 - * scsi_cdr.c 1.132 - request_sense_b()/reserve_tr_rzone() neu - -Mon Apr 21 14:22:51 2003 Joerg Schilling - * cdrecord.c 1.239 - Umbau auf gracewait() - -Sun Apr 20 16:26:57 2003 Joerg Schilling - * scsi_mmc.c 1.5 - get_format_capacities() neu - -Sun Apr 20 16:22:26 2003 Joerg Schilling - * drv_mmc.c 1.141 - read_track_info() mit erweiterten Parametern (Type) -> TI_TYPE_TRACK - -Sun Apr 20 16:21:22 2003 Joerg Schilling - * scsi_cdr.c 1.131 - read_track_info() mit erweiterten Parametern (Type), read_rzone_info() aus drv_dvd.c durch read_track_info() - -Sun Apr 20 16:20:40 2003 Joerg Schilling - * cdrecord.h 1.144 - F_FORMAT neu, WM_FORMAT neu, DSF_DVD_PLUS_R/DSF_DVD_PLUS_RW/DSF_NEED_FORMAT neu - read_track_info() mit erweiterten Parametern (Type), read_rzone_info() aus drv_dvd.c durch read_track_info() - get_format_capacities()/read_format_capacities() neu - -Sun Apr 20 15:52:45 2003 Joerg Schilling - * scsimmc.h 1.9 - struct disk_info um dbit & bg_format_stat erweitert - -Sun Apr 20 15:13:25 2003 Joerg Schilling - * scsireg.h 1.29 - struct scsi_format_header um immed/tryout/ipattern Bits erweitert - struct scsi_format_cap_header neu - struct scsi_format_cap_desc neu - struct scsi_cap_data neu - -Sun Apr 20 15:04:56 2003 Joerg Schilling - * scsicdb.h 2.18 - NACA Bit im Control Byte neu - -Fri Apr 18 16:53:04 2003 Joerg Schilling - * drv_dvd.c 1.106 - * drv_mmc.c 1.140 - * cdrecord.h 1.143 - * scsi_cdr.c 1.130 - read_dvd_structure() nun mit addr und layer Parameter - -Fri Apr 18 16:51:11 2003 Joerg Schilling - * scsi_mmc.c 1.4 - Unbenutze & Uninitialisierte Variablen beseitigt - -Thu Apr 17 23:13:07 2003 Joerg Schilling - * cdr_drv.c 1.34 - DVD+ Treiber neu - -Thu Apr 17 23:09:29 2003 Joerg Schilling - * drv_mmc.c 1.139 - Treibertexte besser eingerueckt - Umleitung auf DVD+ Treiber bei DVD+ Medium - Aufruf der dp->cdr_identify(scgp, dp, scgp->inq) Routine bei Weiterleitung auf DVD Treiber - -Thu Apr 17 09:45:56 2003 Joerg Schilling - * drv_sony.c 1.69 - * drv_philips.c 1.67 - * cdr_drv.c 1.33 - * cdrecord.h 1.142 - * drv_simul.c 1.46 - * drv_dvd.c 1.105 - * drv_jvc.c 1.79 - * drv_7501.c 1.14 - * drv_mmc.c 1.138 - cdr_format() Funktion neu - -Thu Apr 17 02:32:05 2003 Joerg Schilling - * drv_mmc.c 1.137 - load_media() fuer get_curprofile() im Silent Mode, wenn es ein CD Brenner ist dann wird nicht der CD-ROM Treiber returniert - -Thu Apr 17 01:10:51 2003 Joerg Schilling - * drv_mmc.c 1.136 - SCSI-3/MMC-3 medien Tests neu um DVD+ zu erkennen - -Thu Apr 17 00:04:06 2003 Joerg Schilling - * scsi_mmc.c 1.3 - Vermeiden von pname(profile) ohne #defne DRV_DVD - -Wed Apr 16 23:40:46 2003 Joerg Schilling - * drv_mmc.c 1.135 - mmc_getval() weiter nach hinten - nach Korrektur der Inquiry Daten fuer ATAPI - -Wed Apr 16 22:49:41 2003 Joerg Schilling - * drv_mmc.c 1.134 - Treiber ID Text (Kommentar) verbessert - -Wed Apr 16 22:42:59 2003 Joerg Schilling - * drv_sony.c 1.68 - Cue sheet Option auf 3 setzen - -Wed Apr 16 22:40:00 2003 Joerg Schilling - * cdrecord.1 1.75 - Hinweis auf mkisofs -print-size bei SAO/RAW - -Wed Apr 16 22:28:03 2003 Joerg Schilling - * cdr_drv.c 1.32 - SCSI-3/mmc-3 Support fuer DVD + DDCD Erkennung mit get_proflist() - -Wed Apr 16 22:25:56 2003 Joerg Schilling - * scsimmc.h 1.8 - struct rzone_info um lra_v erweitert - struct mmc_performance_header / struct mmc_performance / struct mmc_exceptions / struct mmc_write_speed / struct mmc_streaming neu - -Wed Apr 16 22:01:14 2003 Joerg Schilling - * cdrecord.h 1.141 - get_proflist()/get_wproflist() aus scsi_mmc.c neu - -Wed Apr 16 22:00:33 2003 Joerg Schilling - * scsi_mmc.c 1.2 - get_conflen()/get_profiles()/get_proflist()/get_wproflist() neu - -Wed Apr 16 00:49:27 2003 Joerg Schilling - * drv_mmc.c 1.133 - get_speeds_plextor() komplett in die Statistik Funktion verlagert - -Wed Apr 16 00:28:09 2003 Joerg Schilling - * scsi_mmc.c 1.1 - date and time created 03/04/15 23:28:09 by joerg - -Wed Apr 16 00:28:00 2003 Joerg Schilling - * cdrecord.h 1.140 - scsi_mmc.c Definitionen neu - -Wed Apr 16 00:12:54 2003 Joerg Schilling - * drv_mmc.c 1.132 - Trebertabellen aufgeraeumt - -Tue Apr 15 18:57:54 2003 Joerg Schilling - * cdrecord.h 1.139 - track_base(tp) Makro repariert (tp)->track statt (tp)->trackno - -Tue Apr 15 10:01:43 2003 Joerg Schilling - * drv_dvd.c 1.104 - TAO Fake beseitigt - -Sun Apr 13 21:54:15 2003 Joerg Schilling - * drv_sony.c 1.67 - #include timedefs.h fehlte - -Sun Apr 13 18:54:27 2003 Joerg Schilling - * drv_sony.c 1.66 - Erste SAO Implementierung (ohne MCN/ISRC/multi-session) - -Sun Apr 13 17:15:15 2003 Joerg Schilling - * drv_dvd.c 1.103 - * drv_simul.c 1.45 - * drv_jvc.c 1.78 - * drv_mmc.c 1.131 - * drv_7501.c 1.13 - * cdrecord.c 1.238 - * cdrecord.h 1.138 - * drv_philips.c 1.66 - cdr_abort_session() neu - -Sun Apr 13 17:10:44 2003 Joerg Schilling - * drv_mmc.c 1.130 - "Selected write speed:" -> "Last selected write speed:" - -Sun Apr 13 13:59:26 2003 Joerg Schilling - * scsi_cdr.c 1.129 - Intelligenteres scsi_load() kennt nun CDR_CADDYLOAD - -Sun Apr 13 13:54:27 2003 Joerg Schilling - * drv_philips.c 1.65 - Yamaha CDR-100 nun mit scsi_load() - -Sun Apr 13 13:36:00 2003 Joerg Schilling - * cdrecord.c 1.237 - Version -> 2.01a10, Neue Funktion print_drflags() +Thu May 11 23:00:12 2006 joerg + * cdrecord/scsi_cdr.c 1.138 + Copyright -> 2006 -Sun Apr 13 13:35:26 2003 Joerg Schilling - * cdrecord.h 1.137 - Kommentar verbessert +Sun May 7 21:42:23 2006 joerg + * cdda2wav/mycdrom.h 1.11 + Cstyle + +Sun May 7 21:20:32 2006 joerg + * cdda2wav/mycdrom.h 1.10 + BSD HAVE_IOCTL_INTERFACE Definitionen korrigiert - nun hofentlich OK + +Sat May 6 18:20:59 2006 joerg + * libparanoia/cdda_paranoia.h 1.21 + * libparanoia/gap.c 1.13 + * libparanoia/paranoia.c 1.34 + * libparanoia/p_block.h 1.17 + * libparanoia/p_block.c 1.20 + * libparanoia/overlap.h 1.8 + * libparanoia/isort.h 1.11 + * libparanoia/gap.h 1.11 + * libparanoia/overlap.c 1.12 + * libparanoia/isort.c 1.15 + GPL -> LGPL mit Erlaubnis von Monty + +Tue May 2 22:08:58 2006 joerg + * cdda2wav/toc.c 1.58 + * cdda2wav/cdda2wav.c 1.65 + * cdda2wav/scsi_cmds.c 1.30 + * cdda2wav/resample.c 1.16 + * cdda2wav/interface.c 1.41 + * cdda2wav/ioctl.c 1.23 + * cdda2wav/sndconfig.c 1.18 + * cdda2wav/cd_text.c 1.6 + * cdda2wav/md5c.c 1.4 + * cdda2wav/semshm.c 1.14 + * cdda2wav/cd_extra.c 1.9 + * cdda2wav/setuid.c 1.12 + * cdda2wav/ringbuff.c 1.9 + Cstyle + +Mon May 1 16:18:16 2006 joerg + * cdda2wav/aiff.c 1.6 + * cdda2wav/sun.c 1.5 + * cdda2wav/raw.c 1.5 + * cdda2wav/wav.c 1.5 + * cdda2wav/aifc.c 1.6 + Ctyle + WriteSound nun mit size_t Parameter damit es kompatibel zu write() wird + +Mon May 1 16:17:20 2006 joerg + * cdda2wav/sndfile.h 1.5 + WriteSound nun mit size_t Parameter damit es kompatibel zu write() wird -Sun Apr 13 12:28:01 2003 Joerg Schilling - * cdrecord.c 1.236 - * scsi_cdr.c 1.128 - scsi_load()/scsi_unload() nun mit korrektem Return Wert (int statt BOOL) und Auswertung des Return Wertes in load_media()/unload_media() - -Fri Apr 11 15:31:30 2003 Joerg Schilling - * drv_mmc.c 1.129 - * drv_7501.c 1.12 - (*dp->cdr_gen_cue)() Aufruf nun ueber Pointer - -Fri Apr 11 15:27:44 2003 Joerg Schilling - * drv_dvd.c 1.102 - * drv_simul.c 1.44 - * drv_mmc.c 1.128 - * cdr_drv.c 1.31 - * cdrecord.h 1.136 - * drv_7501.c 1.11 - (*dp->cdr_send_cue)() nun mit cdr_t * Parameter - -Fri Apr 11 15:18:57 2003 Joerg Schilling - * drv_7501.c 1.10 - * drv_simul.c 1.43 - * drv_philips.c 1.64 - * drv_dvd.c 1.101 - * drv_mmc.c 1.127 - * drv_sony.c 1.65 - * drv_jvc.c 1.77 - * cdrecord.h 1.135 - * cdrecord.c 1.235 - Neue Funktion (*cdr_gen_cue)() - -Fri Apr 11 01:25:58 2003 Joerg Schilling - * drv_mmc.c 1.126 - get_speeds_plextor() nun mit 3 int * Parametern, Ausgabe der Maximalen Brenngeschwindigkeit in stats_mmc() - -Fri Apr 11 00:53:30 2003 Joerg Schilling - * cdrecord.c 1.234 - * cdrecord.h 1.134 - is_sao() & TI_SAO neu, checktsize() ueberprueft nun ob ein Track mit unbekannter Laenge in SAO/RAW mode vorhanden ist und bricht ab - -Thu Apr 10 21:18:42 2003 Joerg Schilling - * drv_philips.c 1.63 - * drv_simul.c 1.42 - * drv_7501.c 1.9 - * cdr_drv.c 1.30 - * cdrecord.h 1.133 - * drv_jvc.c 1.76 - * drv_dvd.c 1.100 - * drv_sony.c 1.64 - * scsi_cdr.c 1.127 - * drv_mmc.c 1.125 - * cdrecord.c 1.233 - cdr_check_recovery()/cdr_recover()/cdr_close_session() nun mit cdr_t * Parameter - -Thu Apr 10 19:19:22 2003 Joerg Schilling - * cdrecord.h 1.132 - Kommentar eingerueckt - -Thu Apr 10 19:15:16 2003 Joerg Schilling - * cdrecord.c 1.232 - * cdrecord.h 1.131 - * drv_sony.c 1.63 - * drv_simul.c 1.41 - * drv_philips.c 1.62 - * drv_mmc.c 1.124 - * drv_7501.c 1.8 - * drv_jvc.c 1.75 - * drv_dvd.c 1.99 - cdr_init() neu, cdr_speed_select() nun ohne "dummy" Parameter - -Thu Apr 10 15:32:14 2003 Joerg Schilling - * drv_mmc.c 1.123 - get_speeds_plextor() neu - -Sun Apr 6 15:49:07 2003 Joerg Schilling - * cdrecord.1 1.74 - Neue driveropts= speedread/singlesession/hidecdr - -Sun Apr 6 15:48:07 2003 Joerg Schilling - * cdrecord.c 1.231 - (*dp->cdr_set_speed_dummy)() Aufruf bei -setdropts zwischen cdr_opt1() und cdr_opt2() - -Sun Apr 6 15:45:45 2003 Joerg Schilling - * drv_mmc.c 1.122 - Support fuer Plextor PowerRec, SpeedReeed, SongleSession, HideCDR - -Sun Apr 6 02:19:35 2003 Joerg Schilling - * cdrecord.c 1.230 - * cdrecord.h 1.130 - #defines und Auswertung fuer CDR_SINGLESESS/CDR_HIDE_CDR/CDR_SPEEDREAD neu - -Sat Apr 5 22:35:50 2003 Joerg Schilling - * cdrecord.h 1.129 - * cdrecord.c 1.229 - * cdrecord.1 1.73 - Neue Option -setdropts - -Sat Apr 5 20:51:06 2003 Joerg Schilling - * drv_mmc.c 1.121 - mmc_load/mmc_unload() auskommentiert - -Sat Apr 5 20:46:51 2003 Joerg Schilling - * drv_mmc.c 1.120 - opt2_mmc() neu und Kode aus open_session_mmc() dorthin bewegt - -Sat Apr 5 20:43:36 2003 Joerg Schilling - * scsi_cdr.c 1.126 - * cdrecord.c 1.228 - Bessere Buffer underrun Erkennung und Beschreibung - -Sat Apr 5 15:49:22 2003 Joerg Schilling - * drv_sony.c 1.62 - * drv_mmc.c 1.119 - * drv_simul.c 1.40 - * drv_7501.c 1.7 - * cdrecord.c 1.227 - * drv_philips.c 1.61 - * drv_jvc.c 1.74 - * cdrecord.h 1.128 - * drv_dvd.c 1.97 - (*dp->cdr_opt2)(scgp, dp) neu - -Sat Apr 5 15:37:12 2003 Joerg Schilling - * cdrecord.c 1.226 - Buffer Underrun Vorhersage verbessert (kein loeschen am Trackanfang & zusaetzlicher Test auf leres RAM) - -Sat Apr 5 01:42:33 2003 Joerg Schilling - * drv_mmc.c 1.118 - Read Burn Proof Counter fuer Plextor - -Fri Apr 4 23:48:28 2003 Joerg Schilling - * scsi-unixware.c 1.33 - Reset Support neu - -Fri Apr 4 00:44:59 2003 Joerg Schilling - * cdrecord.c 1.225 - -packet impliziert nun nicht mehr TAO - -Fri Apr 4 00:35:13 2003 Joerg Schilling - * drv_7501.c 1.6 - cw7501__do_cue() nun korrekt LOCAL - -Fri Apr 4 00:30:05 2003 Joerg Schilling - * auinfo.c 1.18 - * subchan.c 1.16 - trackp->tracktype & TOC_MASK wegen TOCF_DUMMY/TOCF_MULTI - -Fri Apr 4 00:29:09 2003 Joerg Schilling - * drv_sony.c 1.61 - * drv_simul.c 1.39 - * drv_7501.c 1.5 - * drv_philips.c 1.60 - * cdrecord.h 1.127 - * cdrecord.c 1.224 - * drv_mmc.c 1.117 - * drv_jvc.c 1.73 - * drv_dvd.c 1.96 - cdr_open_session()/cdr_fixate() ohne multi/dummy Parameter -> track[0].tracktype - -Thu Apr 3 22:49:10 2003 Joerg Schilling - * drv_jvc.c 1.72 - * drv_dvd.c 1.95 - * wm_packet.c 1.21 - * cdrecord.c 1.223 - Casting wegen Signed/Unsigned Arithmetik bei ANSI C - -Thu Apr 3 22:32:30 2003 Joerg Schilling - * drv_sony.c 1.60 - * drv_7501.c 1.4 - * drv_simul.c 1.38 - * drv_dvd.c 1.94 - * drv_philips.c 1.59 - * drv_mmc.c 1.116 - * drv_jvc.c 1.71 - * cdrecord.c 1.222 - * cdrecord.h 1.126 - cdr_open_session()/cdr_fixate() Treiberinterface nun ohne toctype Parameter -> trackp[0]->tracktype - -Thu Apr 3 20:51:34 2003 Joerg Schilling - * fifo.c 1.43 - int -> Uint wegen Ansi C Vergleich - -Thu Apr 3 20:46:46 2003 Joerg Schilling - * clone.c 1.6 - first/last int -> Uint wegen Ansi C Vergleich - -Thu Apr 3 20:42:01 2003 Joerg Schilling - * subchan.c 1.15 - j int -> Uint wegen Ansi C Vergleich - -Thu Apr 3 18:16:00 2003 Joerg Schilling - * cdrecord.c 1.221 - Neue Option -lock - prtimediff() -> misc.c - Version -> 2.01a09 - -Thu Apr 3 18:15:00 2003 Joerg Schilling - * cdrecord.1 1.72 - Neue Option -lock - -Thu Apr 3 18:14:43 2003 Joerg Schilling - * misc.c 1.3 - prtimediff() aus cdrecord.c neu - -Thu Apr 3 18:14:05 2003 Joerg Schilling - * drv_mmc.c 1.115 - int/Uint Vergleiche gecastet - test auf tracksize < 0 vor do_cue() - Versuch zu erreichen dasz is_packet(trackp) nicht mehr is_tao(trackp) impliziert - -Thu Apr 3 18:11:45 2003 Joerg Schilling - * cdrecord.h 1.125 - F_DLCK & prtimediff() neu - -Thu Apr 3 18:11:22 2003 Joerg Schilling - * drv_7501.c 1.3 - Support fuer SAO neu - -Sun Mar 30 22:16:25 2003 Joerg Schilling - * drv_7501.c 1.2 - Schreibsupport fuer TAO - -Sun Mar 30 13:50:02 2003 Joerg Schilling - * cdrecord.c 1.220 - * drv_mmc.c 1.114 - Eingerueckt nach cstyle - -Sat Mar 29 20:27:16 2003 Joerg Schilling - * scsi-unixware.c 1.32 - Auswertung von scbp->sc_comp_code und Setzten von sp->error - -Thu Mar 27 12:11:17 2003 Joerg Schilling - * readcd.c 1.54 - meshpoints=# Option neu - -Thu Mar 27 01:15:30 2003 Joerg Schilling - * cdrecord.c 1.219 - 2002 -> 2003 - -Thu Mar 27 01:03:48 2003 Joerg Schilling - * cdr_drv.c 1.29 - cw7501 neu - -Thu Mar 27 01:02:47 2003 Joerg Schilling - * drv_7501.c 1.1 - date and time created 03/03/27 01:02:47 by joerg - -Thu Mar 27 00:53:40 2003 Joerg Schilling - * cdrecord.c 1.218 - Version -> 2.01a07, Unterdrueckung von "Warning: blockdesc secsize %d differs from cap secsize %d\n" wenn scgp->cap->c_bsize == 0 - -Thu Mar 27 00:45:34 2003 Joerg Schilling - * cdrecord.h 1.124 - Eingerueckt nach cstyle - -Thu Mar 27 00:43:06 2003 Joerg Schilling - * drv_mmc.c 1.113 - mmc_load()/mmc_unload() mit 2. Parameter cdr_t * - -Tue Mar 25 18:48:41 2003 Joerg Schilling - * scsi-qnx.c 1.2 - sccsid -> __sccsid - -Mon Mar 24 23:25:04 2003 Joerg Schilling - * cdrecord.c 1.217 - Version -> 2.01a06, Handler fuer SGIHUP/SIGTERM, cdr_underrun() neu - -Mon Mar 24 23:23:38 2003 Joerg Schilling - * scsi_cdr.c 1.125 - * cdrecord.h 1.123 - cdr_underrun() neu - -Mon Mar 24 13:01:28 2003 Joerg Schilling - * scsi-unixware.c 1.31 - Beseitigung von fdesc[MAX_SCG][MAX_TGT][MAX_LUN] und Verkleinerung von sdidevs[scg][tgt][lun] - Nun kann wirklich scg_open() mehrmals aufgerufen werden. - -Sun Mar 23 21:10:45 2003 Joerg Schilling - * scsi-unixware.c 1.30 - valid/atapi/initiator -> flags mit SDI_* Bit #defines - -Sun Mar 23 17:33:07 2003 Joerg Schilling - * scsi-unixware.c 1.29 - Besseres Verhalten fuer scgcheck - -Sun Mar 23 15:14:23 2003 Joerg Schilling - * scsi-unixware.c 1.28 - Eingerueckt wegen cstyle(1) - -Sun Mar 23 14:12:01 2003 Joerg Schilling - * scsihack.c 1.42 - Support fuer QNX neu - -Sun Mar 23 14:11:14 2003 Joerg Schilling - * scsi-qnx.c 1.1 - date and time created 03/03/23 14:11:14 by joerg - -Thu Mar 6 16:39:42 2003 Joerg Schilling - * fifo.c 1.42 - faio_wait_on_buffer() mit Prototype implementierung wegen SCO cc - -Thu Mar 6 16:27:52 2003 Joerg Schilling - * cdrecord.1 1.71 - Beschreibung fuer -xa1 -xa2, ... berichtigt +Sun Apr 30 02:11:20 2006 joerg + * cdda2wav/base64.c 1.6 + Cstyle + +Sun Apr 30 02:04:32 2006 joerg + * cdda2wav/base64.c 1.5 + * cdda2wav/base64.h 1.3 + Code ist nicht GPL sondern BSDv2 + +Wed Apr 19 13:45:46 2006 joerg + * cdda2wav/config.h 1.9 + * cdda2wav/config.h 1.8 + * cdda2wav/global.h 1.12 + * cdda2wav/md5.h 1.3 + * cdda2wav/saveargs.h 1.3 + * cdda2wav/interface.h 1.15 + * cdda2wav/mmsystem.h 1.5 + * cdda2wav/cdda2wav.h 1.5 + * cdda2wav/byteorder.h 1.4 + * cdda2wav/mytype.h 1.3 + * cdda2wav/resample.h 1.4 + Cstyle -Fri Feb 7 12:34:37 2003 Joerg Schilling - * cdrecord.1 1.70 +Wed Apr 19 09:50:14 2006 joerg + * cdda2wav/ringbuff.h 1.6 + * cdda2wav/scsi_cmds.h 1.12 + Cstyle & abgesichert + +Tue Apr 18 14:59:37 2006 joerg + * cdda2wav/semshm.h 1.4 + * cdda2wav/setuid.h 1.3 + * cdda2wav/sndconfig.h 1.3 + Cstyle & abgesichert + +Tue Apr 18 14:46:03 2006 joerg + * cdda2wav/sha_func.c 1.4 + * cdda2wav/sha.h 1.5 + Cstyle + Code ist nicht GPL sondern Public Domain + +Sun Mar 19 14:29:41 2006 joerg + * cdrecord/cdrecord.c 1.311 + PRIV_DEBUG -> PRIVILEGES_DEBUG weil PRIV_DEBUG schon in definiert ist + +Fri Mar 17 14:13:31 2006 joerg + * makefiles/RULES/MKLINKS 1.58 + mips64-linux-cc.rul/mips64-linux-gcc.rul neu + +Sun Feb 26 19:01:09 2006 joerg + * cdrecord/scsi_mmc.c 1.14 + Profil 0x016 "DVD-R/DL layer jump recording" neu + +Fri Feb 24 11:54:30 2006 joerg + * cdrecord/drv_mmc.c 1.164 + driveropts=gigarec=0.8,varirec=0 gab den Fehler: cdrecord: Bad gigarec value '0.8,varirec=0'. (von Stefano Vesa ) + +Sun Feb 19 16:14:42 2006 joerg + * cdda2wav/sndfile.h 1.4 + * cdda2wav/toc.h 1.9 + Cstyle + +Sun Feb 19 16:05:02 2006 joerg + * cdda2wav/toc.c 1.57 + GCC Hidden variable 'p' vermeiden + +Sun Feb 19 15:41:17 2006 joerg + * cdda2wav/mycdrom.h 1.9 + * cdda2wav/cdda2wav.c 1.64 + * cdda2wav/ioctl.c 1.22 + * cdda2wav/interface.c 1.40 + * cdda2wav/interface.h 1.14 + * cdda2wav/setuid.c 1.11 + Copyright -> 2006 + +Sun Feb 19 15:22:21 2006 joerg + * cdda2wav/cdda2wav.c 1.63 + kill(getppid(), SIGINT) kann nun nicht mehr das System herunterfahren wenn getppid() 1 liefert weil unser Vater tot ist + +Sun Feb 19 15:10:10 2006 joerg + * cdda2wav/interface.c 1.39 + Ab FreeBSD 600021 sind alle Major Device Nummern 0. Hinweis von Marius Strobl + +Sat Feb 18 23:17:40 2006 joerg + * libfind/cmpdir.c 1.15 + * libfind/fetchdir.c 1.15 + cmpdir() korrigiert, so dasz gleichlange Directories bei denen das letzte Element unertschiedlich ist korrekt behandelt werden + +Wed Feb 15 03:16:39 2006 joerg + * cdda2wav/semshm.c 1.13 + * cdda2wav/cdda2wav.c 1.62 + comerr() -> comerrno() fuer BeOS *_area() Aufrufe + +Wed Feb 15 02:57:29 2006 joerg + * cdrecord/defaults.c 1.17 + Uninitialisierte Variable bei fehlendem /etc/default/cdrecord & CDR_MAXFIFOSIZE= korrigiert + +Wed Feb 15 02:30:37 2006 joerg + * cdda2wav/ioctl.c 1.21 + * cdda2wav/interface.c 1.36 + * cdda2wav/mycdrom.h 1.8 + __DragonFly__ Support neu + +Wed Feb 15 02:07:45 2006 joerg + * cdda2wav/configure.in 1.8 + * cdda2wav/lconfig.h.in 1.6 + Test aus sys/cdrio.h neu + +Wed Feb 15 01:59:52 2006 joerg + * cdda2wav/interface.c 1.38 + priv_init()/priv_on()/priv_off() neu fuer Solaris 10 + +Wed Feb 15 01:58:57 2006 joerg + * cdda2wav/interface.c 1.37 + Umstellungen fuer Linux RLIMIT_MEMLOCK Problem mit init_scsibuf() + +Wed Feb 15 00:57:15 2006 joerg + * cdda2wav/mycdrom.h 1.7 + FreeBSD Inteface Anpassungen umgestellt + +Wed Feb 15 00:35:31 2006 joerg + * cdda2wav/autoconf_ 1.1 + date and time created 06/02/15 00:35:31 by joerg + +Tue Feb 14 11:26:06 2006 joerg + * cdda2wav/setuid.c 1.10 + Support fuer DragonFly BSD neu + +Sun Feb 12 18:40:16 2006 joerg + * libfind/find_main.c 1.39 + * libfind/find.c 1.39 + Sonderbehandlung fuer sfind gegen star beseitigt + +Thu Feb 9 00:15:05 2006 joerg + * cdrecord/cdrecord.c 1.310 + Version -> 2.01.01a06 + +Thu Feb 9 00:10:31 2006 joerg + * cdrecord/cdrecord.1 1.106 + * cdrecord/defaults.c 1.16 + CDR_MAXFIFOSIZE= neu fuer /etc/default/cdrecord + +Wed Feb 8 23:50:41 2006 joerg + * rscsi/Makefile.man 1.1 + date and time created 06/02/08 23:50:41 by joerg + +Wed Feb 8 23:44:35 2006 joerg + * mkisofs/diag/isodebug_man.mk 1.1 + date and time created 06/02/08 23:44:35 by joerg + +Wed Feb 8 23:40:16 2006 joerg + * mkisofs/diag/isovfy.mk 1.5 + * mkisofs/diag/dump.mk 1.5 + * mkisofs/diag/isoinfo.mk 1.6 + * mkisofs/diag/isodump.mk 1.5 + * mkisofs/diag/isodebug.mk 1.3 + Neue xxx_man.mk Makefiles + +Wed Feb 8 23:39:10 2006 joerg + * mkisofs/diag/devdump_man.mk 1.1 + * mkisofs/diag/isodump_man.mk 1.1 + * mkisofs/diag/isovfy_man.mk 1.1 + * mkisofs/diag/isoinfo_man.mk 1.1 + date and time created 06/02/08 23:39:10 by joerg + +Wed Feb 8 23:38:05 2006 joerg + * mkisofs/diag/isodebug.8 1.1 + date and time created 06/02/08 23:38:05 by joerg + +Wed Feb 8 23:19:59 2006 joerg + * mkisofs/diag/isodump.8 1.1 + * mkisofs/diag/isovfy.8 1.1 + * mkisofs/diag/devdump.8 1.1 + date and time created 06/02/08 23:19:59 by joerg + +Wed Feb 8 23:14:28 2006 joerg + * btcflash/Makefile.man 1.1 + date and time created 06/02/08 23:14:28 by joerg + +Wed Feb 8 23:13:24 2006 joerg + * btcflash/btcflash.1 1.2 + p -> btcflash + +Wed Feb 8 23:12:39 2006 joerg + * btcflash/btcflash.1 1.1 + date and time created 06/02/08 23:12:39 by joerg + +Wed Feb 8 23:12:29 2006 joerg + * btcflash/skel.c 1.10 + f= Option korrigiert + +Wed Feb 8 20:50:48 2006 joerg + * cdrecord/drv_dvdplus.c 1.17 + Workaround fuer Pioneer DVD+ close session bug + +Wed Feb 8 20:48:45 2006 joerg + * cdrecord/fifo.c 1.49 + Copyright -> 2006 + +Wed Feb 8 01:03:01 2006 joerg + * cdrecord/fifo.c 1.48 + Support fuer BeOS shard memory areas neu + +Tue Feb 7 17:23:13 2006 joerg + * autoconf/xconfig.h.in 1.92 + * autoconf/configure.in 1.91 + BeOS/Zeta Test fuer clone_area()/create_area()/delete_area() neu + +Mon Feb 6 23:14:58 2006 joerg + * cdrecord/cdrecord.c 1.309 + write_secs() wartet nun nicht mehr 100 ms bei scsi_in_progress() sondern 10ms..60ms wegen Pioneer A010 und Buffer unerrun bei 1 MB Cache und 16x DVD Brennen + +Sun Feb 5 17:01:38 2006 joerg + * libfind/find_list.c 1.10 + * libfind/find_main.c 1.38 + * libfind/find.c 1.38 + HAVE_ST_BLOCKS neu + +Sun Feb 5 16:58:50 2006 joerg + * libscg/scsi-beos.c 1.23 + Fehlerbehandlung korrigiert + +Sun Feb 5 16:04:46 2006 joerg + * scgcheck/dmaresid.c 1.7 + DMA Overrun test repariert + +Sun Feb 5 15:22:47 2006 joerg + * libfind/find.h 1.5 + * libfind/walk.h 1.10 + * libfind/find_main.c 1.37 + * include/schily/walk.h 1.10 + * include/schily/find.h 1.5 + * libfind/find.c 1.37 + -maxdepth/-mindepth neu + +Sun Feb 5 15:14:05 2006 joerg + * cdrecord/readcd.c 1.80 + Hack end = 10000000; korrigiert + +Sun Feb 5 15:10:59 2006 joerg + * btcflash/skel.c 1.9 + * cdrecord/readcd.c 1.79 + * scgskeleton/skel.c 1.6 + * cdrecord/skel.c 1.6 + Weiterer -scanbus Fehler beseitigt + +Sun Feb 5 13:47:18 2006 joerg + * autoconf/configure.in 1.90 + * autoconf/xconfig.h.in 1.91 + Test auf /dev/tty neu + +Sun Feb 5 12:58:13 2006 joerg + * makefiles/RULES/bepc-beos-cc.rul 1.4 + * makefiles/RULES/bepc-beos-gcc.rul 1.5 + CONFFLAGS= beseitigen + LIB_SOCKET= ---> -lsocket -lbind neu + +Wed Feb 1 20:09:47 2006 joerg + * mkisofs/write.c 1.88 + ???) -> ??%s) + "?" gegen GCC bad trigraph Meldung + +Mon Jan 30 15:48:48 2006 joerg + * makefiles/RULES/MKLINKS 1.57 + armv5teb-linux neu + +Mon Jan 30 11:44:13 2006 joerg + * include/schily/xmconfig.h 1.30 + * libscg/scsihack.c 1.44 + * mkisofs/defaults.h 1.19 + DragonFly BSD neu + +Mon Jan 30 11:37:29 2006 joerg + * mkisofs/mkisofs.c 1.167 + Version -> 2.01.01a05 + +Sun Jan 29 21:46:50 2006 joerg + * cdda2wav/cdda2wav.c 1.61 + * cdda2wav/interface.h 1.13 + priv_on()/priv_off() fuer Solaris fine grained privs + +Sun Jan 29 20:52:03 2006 joerg + * cdrecord/cdrecord.c 1.308 + SuSE Warnung deaktiviert + +Sun Jan 29 20:38:49 2006 joerg + * cdrecord/cdrecord.c 1.307 + raise_memlock() fuer Linux neu + Unterstuetzung fuer PRIV_FILE_DAC_READ, PRIV_NET_PRIVADDR, PRIV_SYS_DEVICES PRIV_PROC_PRIOCNTL, PRIV_NET_PRIVADDR + +Sun Jan 29 20:33:47 2006 joerg + * cdrecord/readcd.c 1.78 + Suid spezialbehandlung nun auch bei pfexec + +Sun Jan 29 15:53:19 2006 joerg + * scgskeleton/skel.c 1.5 + * cdrecord/skel.c 1.5 + * cdrecord/readcd.c 1.77 + * btcflash/skel.c 1.7 + Unterstuetzung fuer PRIV_FILE_DAC_READ, PRIV_NET_PRIVADDR, PRIV_SYS_DEVICES + +Sun Jan 29 15:43:08 2006 joerg + * scgskeleton/skel.c 1.4 + * cdrecord/readcd.c 1.76 + * cdrecord/skel.c 1.4 + -scanbus funktioniert nun + +Sun Jan 29 15:40:43 2006 joerg + * btcflash/skel.c 1.8 + Abbruch mit usage() wenn kein SCSI Geraet angegeben wurde + +Sat Jan 28 16:21:00 2006 joerg + * btcflash/skel.c 1.6 + Usage korrigiert und -version + (C) 2004 David Huang + +Sat Jan 28 16:04:32 2006 joerg + * btcflash/skel.c 1.5 + Copyright -> 2006 + -scanbus funktioniert nun + +Sat Jan 28 00:19:07 2006 joerg + * autoconf/xconfig.h.in 1.90 + * autoconf/configure.in 1.89 + priv_set() Test neu + +Fri Jan 27 11:32:16 2006 joerg + * makefiles/RULES/MKLINKS 1.56 + DragonFly BSD + +Fri Jan 27 11:05:23 2006 joerg + * makefiles/RULES/os-dragonfly.id 1.1 + * makefiles/RULES/os-dragonfly.def 1.1 + date and time created 06/01/27 11:05:23 by joerg + +Mon Jan 23 11:59:09 2006 joerg + * autoconf/xconfig.h.in 1.89 + * autoconf/configure.in 1.88 + lgetxattr() lsetxattr() llistxattr() Test fuer Linux neu + +Sun Jan 22 18:26:52 2006 joerg + * cdrecord/cdrecord.c 1.306 + padsize=xxx wirkt nun wie in der Manpage beschrieben nur fuer das naechste File + +Tue Jan 17 17:20:05 2006 joerg + * makefiles/RULES/rules.tpk 1.3 + * makefiles/RULES/rules.hlp 1.10 + * makefiles/RULES/rules1.top 1.32 + tarpkg ueberarbeitet + +Tue Jan 17 16:58:30 2006 joerg + * makefiles/RULES/MKLINKS 1.55 + sun4v neu + sun4*cc64 neu + +Tue Jan 17 16:56:26 2006 joerg + * makefiles/RULES/sun4-sunos5-gcc64.rul 1.1 + * makefiles/RULES/i86pc-sunos5-gcc64.rul 1.1 + date and time created 06/01/17 16:56:26 by joerg + +Fri Jan 13 14:10:08 2006 joerg + * libfind/find_main.c 1.36 + * libfind/find.c 1.36 + Schreibfehler is st_* -> if st_* + +Fri Jan 13 01:04:23 2006 joerg + * libfind/walk.c 1.10 + call walkhome() nach walk() in treewalk() + +Thu Jan 12 02:05:14 2006 joerg + * libscg/scsi-remote.c 1.18 + ppriv_ok() statt (geteuid() == 0) bei SOlaris & HAVE_GETPPRIV + +Thu Jan 12 01:31:22 2006 joerg + * cdrecord/cdrecord.c 1.305 + * mkisofs/mkisofs.c 1.166 + Version -> 2.01.01a04 + +Thu Jan 12 00:26:07 2006 joerg + * include/schily/schily.h 1.54 + * cdrecord/drv_mmc.c 1.163 + * cdrecord/readcd.1 1.23 + * cdrecord/Makefile 1.32 + * cdrecord/cdrecord.c 1.304 + Copyright -> 2006 + +Thu Jan 12 00:03:30 2006 joerg + * cdrecord/drv_mmc.c 1.162 Schreibfehler beseitigt -Sun Feb 2 14:13:07 2003 Joerg Schilling - * scsi-remote.c 1.12 - Umgestellt, damit es auch ohne rcmd() geht - -Tue Jan 28 01:19:39 2003 Joerg Schilling - * drv_mmc.c 1.112 - Workaround fuer LG TAO Audio Formware bug: audio_pause_len = 150 - -Tue Jan 7 14:09:28 2003 Joerg Schilling - * scsi_cdr.c 1.124 - Ausgabe Save/Set Modepages auch auf stderr wie Rest der Zeile - -Tue Jan 7 14:08:43 2003 Joerg Schilling - * drv_mmc.c 1.111 - set_mode_params() ist BOOL, daher ist Abfrage auf < 0 falsch - -Tue Dec 24 16:28:38 2002 Joerg Schilling - * cdrecord.1 1.69 - Version -> 2.0 - -Tue Dec 24 14:16:34 2002 Joerg Schilling - * cdrecord.c 1.216 - Mail Adresse -> schilling@fokus.fhg.de - Vermeidung von "Cannot write CD's >= 100 minutes.\n" bei DVDs - -Mon Dec 16 22:26:39 2002 Joerg Schilling - * cdrecord.1 1.68 - Mailing Lists geupdated, Hinweis auf cddb= bei den cdda2wav Beispielen - -*************** Release 2.0 ******************* - -Sat Nov 30 17:43:51 2002 Joerg Schilling - * readcd.c 1.53 - * cdrecord.c 1.215 - Version -> 2.0 - -Sat Nov 30 16:11:27 2002 Joerg Schilling - * cdrecord.c 1.214 - DVD-Pro Check for Tracksize-known only if ntracks > 0 - -Sat Nov 30 13:01:27 2002 Joerg Schilling - * drv_mmc.c 1.110 - Allow Medium removal after load Media for DVD/CD recognition as drecord -checkdrive would otherwise lock the tray if it has been open before - -Sat Nov 30 12:55:17 2002 Joerg Schilling - * scsi-osf.c 1.25 - Debug output with SCSI Status Byte - -Fri Nov 22 17:55:41 2002 Joerg Schilling - * cdrecord.1 1.67 - RSH= und RSCSI= documented for ssh(1) RSCSI - -Fri Nov 22 17:40:35 2002 Joerg Schilling - * scsi-remote.c 1.11 - Support for non-root rcmd() and ssh(2) - -Fri Nov 22 17:35:54 2002 Joerg Schilling - * fifo.c 1.41 - AmigaOS Support with ix_vfork()/ix_vfork_resume() and separate var buf_idx_reader for vfork() - -Thu Nov 21 22:28:57 2002 Joerg Schilling - * cdrecord.c 1.213 - New Option minbuf= - -Thu Nov 21 22:23:10 2002 Joerg Schilling - * cdrecord.1 1.66 - minbuf= Option new - -Tue Nov 19 19:13:34 2002 Joerg Schilling - * scsiopen.c 1.93 - Fix for Coredump with dev=/dev/rsr1c:@,0 - -Sun Nov 10 19:18:04 2002 Joerg Schilling - * diskid.c 1.36 - Orange Forum Embargo Warning only if mp->msf_min == 97 for DVDs - -Mon Nov 4 18:12:16 2002 Joerg Schilling - * fifo.c 1.40 - close(f) /dev/zero oly if /dev/zero has been opened - -Sun Nov 3 16:32:52 2002 Joerg Schilling - * scsi_cdr.c 1.123 - * cdrecord.h 1.122 - write_xscsi()/seek_scsi()/seek_g0()/seek_g1() new - -Sat Nov 2 22:11:55 2002 Joerg Schilling - * cdrecord.c 1.212 - Version -> 1.11a40, _POSIX_MEMLOCK/_POSIX_PRIORITY_SCHEDULING Test POSIX 2001 conformant - -Sun Oct 27 15:19:29 2002 Joerg Schilling - * cdrecord.c 1.211 - New Wait Feature free the IDE Busses if Source&Destination are on the same cable (use -immed) - -Sun Oct 27 14:57:11 2002 Joerg Schilling - * cdrecord.1 1.65 - New Wait (usleep) Feature for -immed documented - -Sun Oct 27 14:42:36 2002 Joerg Schilling - * cdrecord.h 1.121 - New Flag RF_WR_WAIT to actively free the IDE Busses via usleep() - -Sun Oct 27 02:26:26 2002 Joerg Schilling - * cdrecord.c 1.210 - * wm_packet.c 1.20 - * drv_jvc.c 1.70 - Change from trackp->padsize ->trackp->padsecs - -Sun Oct 27 02:02:38 2002 Joerg Schilling - * cdrecord.h 1.120 - Change from trackp->padsize ->trackp->padsecs - New Sektor based Makros Sminutes(s)/Sseconds(s)/Shseconds(s)/Sframes(s) - -Sun Oct 27 01:20:58 2002 Joerg Schilling - * cdrecord.1 1.64 - Better docukmentation for padsize= - -Sat Oct 26 23:13:47 2002 Joerg Schilling - * scsi_cdr.c 1.122 - Text Generic mmc2 DVD -> Generic mmc2 DVD-R/DVD-RW - -Sat Oct 26 20:21:15 2002 Joerg Schilling - * wm_packet.c 1.19 - Support printing the fill ratio of the drive buffer and the actual write speed - -Fri Oct 25 15:06:33 2002 Joerg Schilling - * drv_mmc.c 1.109 - ATIP printinf for speed better -> %2d (reserved val %2d) - -Fri Oct 25 15:05:21 2002 Joerg Schilling - * cdrecord.c 1.209 - pad_track() now shows Drive buffer fill% and speed - Verbose prinrting for write_track_data() and pad_track() unified - -Fri Oct 25 00:49:04 2002 Joerg Schilling - * cdrecord.c 1.208 - Warning for cdrecord blank=fast if drive does not like -> Try cdrecord blank=all - write_track_data() now computes trackp->isecsize from trackp->isecsize to trackp->secsize - -Fri Oct 25 00:18:19 2002 Joerg Schilling - * drv_mmc.c 1.108 - BURN-Free was not used -> BURN-Free was never needed - -Fri Oct 25 00:06:12 2002 Joerg Schilling - * drv_mmc.c 1.107 - Test for 0xFF:0xFF/0xFF with dsp->ds_maxblocks == 716730 -> dsp->ds_maxblocks == 1166730 because we now use forceposivive in msf_to_lba() - -Thu Oct 24 23:47:23 2002 Joerg Schilling - * drv_mmc.c 1.106 - di_to_dstat() now always sets dsp->ds_first_leadin to allow 2. setting for Yamaha AudioMaster - -Wed Oct 23 22:46:02 2002 Joerg Schilling - * cdrecord.c 1.207 - Version -> 1.11a39, Only cdrecord dev=help calls scg_help() no automatic printing if scg_open() fails - -Wed Oct 23 22:40:41 2002 Joerg Schilling - * cdrecord.1 1.63 - Many changes tp prepare for 2.0 - -Wed Oct 23 22:21:46 2002 Joerg Schilling - * scsi-linux-ata.c 1.4 - Workaround for Linux Kernel design bug: CDROM_SEND_PACKET stes errno to EINVAL if Sense Key is "Invalid Command" - -Mon Oct 21 19:20:33 2002 Joerg Schilling - * scsi-linux-sg.c 1.75 - /dev/sg* read loop again with 1000 loops but only if 'f' is a RAW device - Typo fixed - -Sun Oct 20 15:28:58 2002 Joerg Schilling - * scsi-linux-sg.c 1.74 - sg_clearnblock() new to alow to clear O_NONBLOCK directly after open(.., ...|O_NONBLOCK) - -Sat Oct 19 22:04:23 2002 Joerg Schilling - * cdrecord.c 1.206 - Version -> 1.11a38, Support for libscg Help - -Sat Oct 19 21:28:22 2002 Joerg Schilling - * scsiopen.c 1.92 - * scsihack.c 1.41 - scg_help() Funktion new - -Sat Oct 19 21:27:21 2002 Joerg Schilling - * scsitransp.c 1.85 - Version -> 0.7 - -Sat Oct 19 21:26:25 2002 Joerg Schilling - * scsi-wnt.c 1.29 - * scsi-vms.c 1.32 - * scsi-unixware.c 1.27 - * scsi-sun.c 1.76 - * scsi-sgi.c 1.35 - * scsi-remote.c 1.10 - * scsi-osf.c 1.24 - * scsi-os2.c 1.22 - * scsi-openserver.c 1.30 - * scsi-next.c 1.31 - * scsi-mac-iokit.c 1.4 - * scsi-linux-sg.c 1.73 - * scsi-linux-pg.c 1.42 - * scsi-linux-ata.c 1.3 - * scsi-hpux.c 1.30 - * scsi-bsd.c 1.41 - * scsi-bsd-os.c 1.27 - * scsi-beos.c 1.21 - * scsi-apollo.c 1.4 - * scsi-amigaos.c 1.3 - * scsi-aix.c 1.35 - scgo_help() Funktion new - -Sat Oct 19 19:14:05 2002 Joerg Schilling - * scsitransp.h 1.53 - Parameter tcomment new in __scg_help() - -Sat Oct 19 14:02:47 2002 Joerg Schilling - * scsitransp.h 1.52 - Help functions new - -Fri Oct 18 17:25:31 2002 Joerg Schilling - * scsi-linux-sg.c 1.72 - Modified Cleanup read() loop in sg_initdev() by request from Linus Torvalds - -Fri Oct 18 17:20:00 2002 Joerg Schilling - * scsi-sun.c 1.75 - open Warnung von error() auf js_fprintf((FILE *)scgp->errfile umgestellt - -Fri Oct 18 17:16:48 2002 Joerg Schilling - * scsiopen.c 1.91 - * scsi-linux-ata.c 1.2 - * scsi-sun.c 1.74 - Allow unified dev=ATAPI, dev=ATAPI:, dev=USCSI, dev=USCSI: - -Sun Oct 13 21:40:59 2002 Joerg Schilling - * scsi-linux-sg.c 1.71 - open(name, 2) -> O_RDWR.... - sg_initdev() with better loop to read possible rests from driver (requested by Linus Torvalds) - -Sun Oct 13 21:23:54 2002 Joerg Schilling - * scsi-sun.c 1.73 - * scsi-linux-pg.c 1.41 - open(name, 2) -> O_RDWR.... - -Sat Oct 12 13:53:52 2002 Joerg Schilling - * sector.c 1.11 - Initialize Testsector in encspeed() to make resulting speed independent from junk on the stack - -Thu Oct 10 23:43:33 2002 Joerg Schilling - * cdrecord.c 1.205 - Change wording from DAO -> SAO - -Wed Oct 9 19:36:09 2002 Joerg Schilling - * scsireg.h 1.28 - New device types for Inquiry - -Wed Oct 9 19:35:44 2002 Joerg Schilling - * scsitransp.c 1.84 - scg_fprintdev() New device types for Inquiry - -Tue Oct 8 00:57:50 2002 Joerg Schilling - * scsi-unixware.c 1.26 - Handle EBUSY for multiple opens - -Mon Oct 7 22:19:15 2002 Joerg Schilling - * sector.c 1.10 - * cdrecord.h 1.119 - * cdrecord.c 1.204 - Verbose printing of the LEC encoding speed -> encspeed() - -Sat Oct 5 22:07:27 2002 Joerg Schilling - * cdrecord.c 1.203 - call cdr_buffer_cap() in Silent mode to make sure buggy drives (CW-7585) will not print constantly error messages - -Sat Oct 5 18:07:46 2002 Joerg Schilling - * scsi-linux-ata.c 1.1 - date and time created 02/10/05 17:07:46 by joerg - -Sat Oct 5 17:48:27 2002 Joerg Schilling - * scsi-linux-sg.c 1.70 - Support for CDROM_SEND_PACKET in scsi-linux-ata.c new - SCSI Timeout now may be distinguished from SCSI selection Timeout by implementing a workarounf for a Linux kernel bug - -Sat Oct 5 00:02:52 2002 Joerg Schilling - * scsi-sun.c 1.72 - Do not open all /dev/scg* devices if not in SCAN mode - ENXIO for USCSI means selection Timeout - -Fri Oct 4 23:59:05 2002 Joerg Schilling - * scsi-vms.c 1.31 - Warn for missing Scanbus, up to 26 IDE Controller from Chip.Dancy@hp.com - -Wed Oct 2 21:44:22 2002 Joerg Schilling - * cdrecord.c 1.202 - Version -> 1.11a36, #ifdef HAVE_LIB_EDC_ECC to allow compilation without libedc - -Wed Oct 2 02:22:32 2002 Joerg Schilling - * fifo.c 1.39 - Allow again compilation with #undef FIFO - -Wed Oct 2 00:54:52 2002 Joerg Schilling - * scsiopen.c 1.90 - replace comma by semikolon - -Wed Oct 2 00:48:49 2002 Joerg Schilling - * scsi-vms.c 1.30 - gk_chan is Unsigned but there was a comparison <= 0 - scsi status scsi_sts now correct for ATAPI - -Sat Sep 28 20:36:58 2002 Joerg Schilling - * drv_mmc.c 1.105 - deflt_writemodes_mmc() now with fallback to SAO if TAO is not supported - -Sat Sep 28 14:53:33 2002 Joerg Schilling - * cdrecord.c 1.201 - -force Wirkung auf RAW Speed nur noch bis maximal das was eine CPU kann - Neue environment Variable "CDR_FORCERAWSPEED" - -Sat Sep 28 14:46:54 2002 Joerg Schilling - * sector.c 1.9 - EDC_SCRAMBLE_NOSWAP #define in old libedc new - -Fri Sep 27 17:39:00 2002 Joerg Schilling - * cdrecord.c 1.200 - Limit gracetime to 999, Do not use \b with wait time because seconds may use more than one column - -Fri Sep 27 16:40:46 2002 Joerg Schilling - * drv_simul.c 1.37 - DVD max speed -> 1000 - -Fri Sep 27 14:33:00 2002 Joerg Schilling - * cdrecord.c 1.199 - Drive current speed/Drive default speed/Drive max speed printing now with lverbose > 1 - Hint to Heiko with Encoding speed printing - -Fri Sep 27 14:30:18 2002 Joerg Schilling - * drv_mmc.c 1.104 - Max Speed in struct from 370 -> 372, - mmc_opthelp()/hasdrvopt()/get_justlink_ricoh() now with EXPORT - Bug with dp->cdr_dstat->ds_dr_cur_wspeed fixed, - set dp->cdr_speeddef/dp->cdr_speedmax from drive values - -Fri Sep 27 14:28:27 2002 Joerg Schilling - * drv_dvd.c 1.89 - Change to use new driveropts= method from drv_mmc.c - -Fri Sep 27 14:25:18 2002 Joerg Schilling - * drv_simul.c 1.36 - Max Speed for CD from 370 -> 372 - -Thu Sep 26 03:06:39 2002 Joerg Schilling - * scsi_cdr.c 1.121 - scsi_load()scsi_unload() now may be called with cdr_t * 0 - -Wed Sep 25 18:05:41 2002 Joerg Schilling - * drv_mmc.c 1.103 - scsi_blank()/scsi_close_tr_session()/scsi_flush_cache() with immed Flag - -Wed Sep 25 16:12:10 2002 Joerg Schilling - * cdrecord.h 1.117 - * cdrecord.c 1.198 - * drv_simul.c 1.35 - * drv_philips.c 1.58 - * scsi_cdr.c 1.120 - * drv_dvd.c 1.88 - start/stop, load/unload, flush_cache with immed Parameter - -Wed Sep 25 14:22:26 2002 Joerg Schilling - * drv_jvc.c 1.69 - * drv_dvd.c 1.87 - * drv_mmc.c 1.102 - * cdr_drv.c 1.28 - * cdrecord.c 1.197 - * cdrecord.h 1.116 - blank() driver function now weith cdr_t * parameter for F_IMMED - -Wed Sep 25 13:52:12 2002 Joerg Schilling - * cdrecord.c 1.196 - -immed new - -Wed Sep 25 13:51:28 2002 Joerg Schilling - * cdrecord.c 1.195 - F_DVD -> TI_DVD (was wrong) - -Wed Sep 25 13:13:11 2002 Joerg Schilling - * cdrecord.h 1.115 - F_DVD -> TI_DVD (was wrong), F_IMMED new - -Wed Sep 25 00:38:52 2002 Joerg Schilling - * cdrecord.c 1.194 - * cdrecord.h 1.114 - * drv_sony.c 1.59 - * drv_simul.c 1.34 - * drv_philips.c 1.57 - * drv_mmc.c 1.101 - * drv_jvc.c 1.68 - * drv_dvd.c 1.86 - close_track()/fixate() enhanced by cdr_t * Parameter - -Tue Sep 24 21:28:33 2002 Joerg Schilling - * drv_mmc.c 1.100 - mmc_set_speed() new to allow drives that don't like speed=1 - -Tue Sep 24 18:40:42 2002 Joerg Schilling - * cdrecord.c 1.193 - Version -> 1.11a35, Do not print Zeit/speed Statistics if writing did not yet start - -Tue Sep 24 18:36:56 2002 Joerg Schilling - * scsi_cdr.c 1.119 - Modify speed printing to include CD/DVD Speed - -Mon Sep 23 15:42:22 2002 Joerg Schilling - * drv_simul.c 1.33 - Simulate Next Writable Address (for TAO) - -Mon Sep 23 15:39:22 2002 Joerg Schilling - * cdrecord.c 1.192 - Move Comment out of #ifdef DRV_DVD - -Mon Sep 23 15:17:56 2002 Joerg Schilling - * cdrecord.c 1.191 - Fix Pregap handling for DVD (no 150 Sektors per Track) - -Sun Sep 22 01:35:18 2002 Joerg Schilling - * cdrecord.h 1.113 - F_DVD new - -Sun Sep 22 00:11:57 2002 Joerg Schilling - * drv_dvd.c 1.85 - Set DVD Flag in driverstructure because it is now used - -Sat Sep 21 23:59:25 2002 Joerg Schilling - * drv_simul.c 1.32 - Set DVD Flags, calculate DVD speed correctly, - correct real time spend in usleep() - -Sat Sep 21 01:33:16 2002 Joerg Schilling - * cdrecord.c 1.190 - Version -> 1.11a34, Late check for tracks == 0 only if -fix was not used - -Fri Sep 20 01:58:54 2002 Joerg Schilling - * auinfo.c 1.17 - -auinfo should be superceede -scms / -copy - -Thu Sep 12 17:16:35 2002 Joerg Schilling - * cdrecord.c 1.189 - Statistics order new and better, - Print new statistics even on abort - -Thu Sep 12 17:03:42 2002 Joerg Schilling - * cdrecord.h 1.112 - New Flags RF_DID_STAT/RF_DID_CDRSTAT - -Thu Sep 12 16:42:57 2002 Joerg Schilling - * drv_philips.c 1.56 - Modified -> reload_media() - -Thu Sep 12 15:52:20 2002 Joerg Schilling - * drv_mmc.c 1.99 - cdr_dstat->ds_dr_max_rspeed/cdr_dstat->ds_dr_cur_rspeed neu - cdr_dstat->ds_dr_max_speed/cdr_dstat->ds_dr_cur_speed -> cdr_dstat->ds_dr_max_wspeed/cdr_dstat->ds_dr_cur_wspeed - scsi_set_speed() with MMC-3 rotctl Parameter - -Thu Sep 12 15:47:01 2002 Joerg Schilling - * cdrecord.c 1.188 - Version -> 1.11a33, ds_dr_max_speed -> ds_dr_max_wspeed - -Thu Sep 12 15:43:36 2002 Joerg Schilling - * drv_dvd.c 1.84 - * scsi_cdr.c 1.118 - * cdrecord.h 1.111 - scsi_set_speed() mit MMC-3 rotctl Parameter - -Thu Sep 12 14:37:26 2002 Joerg Schilling - * drv_mmc.c 1.98 - dsp->ds_flags with DSF_HIGHSP_ERA / DSF_ULTRASP_ERA - New Speed Tabels for HS and UHS RW media - atip_printspeed() new - Print A1 ATIP Werte also in hex - Modify ATIP printout for UHS CD-RW - -Thu Sep 12 13:34:49 2002 Joerg Schilling - * cdrecord.c 1.187 - Driveropts print MMC,MMC-2,MMC-3 - -force now allows to write faster data in -raw Data - Checks for Ultra High speed CD-RW for old writers - Do not print average write speed if data size is unknown - -Thu Sep 12 13:27:10 2002 Joerg Schilling - * scsi_cdr.c 1.117 - Enhancements for MMC-2 & MMC-3 in -prcap (mode Page 2A) - -Wed Sep 11 21:23:48 2002 Joerg Schilling - * scsireg.h 1.27 - MMC-2 & MMC-3 enhancements for Mode Page 2A - -Wed Sep 11 20:47:35 2002 Joerg Schilling - * cdrecord.h 1.110 - CDR_MMC/CDR_MMC2/CDR_MMC3 new - -Wed Sep 11 15:13:20 2002 Joerg Schilling - * subchan.c 1.14 - end = 0 for useless GCC Warning 'end' might be uninitialized - -Wed Sep 11 15:01:55 2002 Joerg Schilling - * cdrecord.h 1.109 - trackp->dataoff/tracks/track/trackno -> Uchar - DSF_HIGHSP_ERA & DSF_ULTRASP_ERA new - CDR_ALLOC without top Bit for GCC Warning - -Wed Sep 11 14:59:46 2002 Joerg Schilling - * drv_dvd.c 1.83 - * auinfo.c 1.16 - Cast for trackp->track* -> Uchar - -Wed Sep 11 14:59:07 2002 Joerg Schilling - * drv_sony.c 1.58 - Constant 0xFFFFFFFF with #ifdef for K&R/ANSI - -Sun Sep 1 23:43:15 2002 Joerg Schilling - * cdrecord.c 1.186 - Print minimal Drive Buffer fill ratio - -Sun Sep 1 23:42:39 2002 Joerg Schilling - * drv_mmc.c 1.97 - DiskT@2 Support new - -Sun Sep 1 23:33:34 2002 Joerg Schilling - * cdrecord.h 1.108 - Several new ds_* Vars for better Statistics - -Sun Sep 1 21:27:35 2002 Joerg Schilling - * cdrecord.c 1.185 - cdrstats() now guesses Buffer underruns and prints average write speed - -Sun Sep 1 17:42:59 2002 Joerg Schilling - * drv_mmc.c 1.96 - cdr_stats() Function new - speed_select_mmc() with 2nd Parameter dp for FORCESPEED - driveropts=foesecpeed new - driveropts=tattooinfo new - driveropts=tattoofile=name new - hasdrvopt() fixed: missing break nach past recognised Option - -Sun Sep 1 16:50:22 2002 Joerg Schilling - * cdrecord.c 1.184 - Buffer Cap print every 1 MB - -Fri Aug 30 13:57:26 2002 Joerg Schilling - * cdrecord.c 1.183 - Version -> 1.11a32, CDR_DISKTATTOO new, (*dp->cdr_stats)(scgp, dp); for Burn-Free Statistics - -Fri Aug 30 13:42:33 2002 Joerg Schilling - * cdrecord.h 1.107 - New driverinterfacefunction cdr_stats() - CDR_DISKTATTOO new - -Fri Aug 30 13:41:21 2002 Joerg Schilling - * drv_sony.c 1.57 - * drv_simul.c 1.31 - * drv_philips.c 1.55 - * drv_jvc.c 1.67 - * drv_dvd.c 1.82 - New driverinterfacefunction cdr_stats() - -Thu Aug 29 21:40:34 2002 Joerg Schilling - * drv_sony.c 1.56 - * drv_simul.c 1.30 - * drv_philips.c 1.54 - * drv_jvc.c 1.66 - * drv_dvd.c 1.81 - * cdrecord.h 1.106 - * cdrecord.c 1.182 - New Parameter cdr_t *dp for cdr_set_speed_dummy() for "forcespeed" - -Thu Aug 29 17:12:40 2002 Joerg Schilling - * mmcvendor.h 1.2 - link_counter is [2]. - -Mon Aug 26 17:47:17 2002 Joerg Schilling - * drv_mmc.c 1.95 - Turning... messages -> stdout - -Mon Aug 26 01:56:39 2002 Joerg Schilling - * drv_mmc.c 1.94 - JustLink Support new - -Mon Aug 26 01:22:08 2002 Joerg Schilling - * mmcvendor.h 1.1 - date and time created 02/08/26 00:22:08 by joerg - -Tue Aug 20 01:11:19 2002 Joerg Schilling - * drv_mmc.c 1.93 - mmc_opt1() new - Yamaha Audio Master Support new - Be more careful with test_write (-dummy) in deflt_writemodes_mmc() - Check driveropts= already in attach_mmc() and turn into flags - -Tue Aug 20 00:06:22 2002 Joerg Schilling - * cdrecord.c 1.181 - Call dp->cdr_opt1() _before_ set speed/dummy and before the first Size Check - -Mon Aug 19 02:30:52 2002 Joerg Schilling - * cdrecord.c 1.180 - Do not clear ds_cdrflags after attach() - -Mon Aug 19 01:12:18 2002 Joerg Schilling - * cdrecord.c 1.179 - driveropts=help new in short usage() - -Mon Aug 19 00:45:49 2002 Joerg Schilling - * cdrecord.h 1.105 - * drv_dvd.c 1.80 - * drv_simul.c 1.29 - * drv_jvc.c 1.65 - * drv_sony.c 1.55 - * drv_philips.c 1.53 - cdr_t->cdr_opt1() new - -Mon Aug 19 00:40:47 2002 Joerg Schilling - * cdrecord.c 1.178 - dataoff = 16 as Default in autoaudio to allow cdrecord -raw to work without -data - -Mon Aug 19 00:34:46 2002 Joerg Schilling - * cdrecord.c 1.177 - Call (*dp->cdr_opt1)(scgp, dp) for Yamaha Audio Master, then 2. Check for size - -Sat Aug 17 01:13:39 2002 Joerg Schilling - * drv_mmc.c 1.92 - Yamaha Audio Master recognition, Varirec in driveropts=help, Varirec recognition - -Sat Aug 17 00:52:44 2002 Joerg Schilling - * cdrecord.h 1.104 - Calling sequence comment new - -Sat Aug 17 00:04:28 2002 Joerg Schilling - * sector.c 1.8 - Max RAW speed in metering raised from 100x -> 1000x - -Fri Aug 16 02:39:01 2002 Joerg Schilling - * cdrecord.c 1.176 - * cdrecord.h 1.103 - CDR_VARIREC / CDR_AUDIOMASTER / CDR_FORCESPEED new - -Wed Aug 14 23:43:34 2002 Joerg Schilling - * cdrecord.c 1.175 - Version -> 1.11a30, Speed test for RAW data sectors - -Wed Aug 14 20:50:55 2002 Joerg Schilling - * defaults.c 1.9 - Allow Space as separator in /etc/default/cdrecord - -Wed Aug 14 01:04:46 2002 Joerg Schilling - * cdrecord.h 1.102 - * sector.c 1.7 - encspeed() new - -Tue Aug 13 23:45:22 2002 Joerg Schilling - * sector.c 1.6 - HAVE_LIB_EDC_ECC/HAVE_NEW_LIB_EDC/CLONE_WRITE new - -Tue Jul 30 00:22:27 2002 Joerg Schilling - * cdrecord.c 1.174 - Version ->1.11a28, tracksize/secsize ->itracksize/isecsize for debug printf - -Mon Jul 29 22:22:12 2002 Joerg Schilling - * cdrecord.h 1.101 - track_base() Macro new, typedef struct ofile ofile_t new - -Mon Jul 29 21:58:12 2002 Joerg Schilling - * subchan.c 1.13 - Shift ISRC & MCN by one to the end if the are on an index change - -Sun Jul 28 23:19:55 2002 Joerg Schilling - * drv_simul.c 1.28 - Flags with allen possible write modi and with CDR_TRAYLOAD to avoid - -Sun Jul 28 13:54:08 2002 Joerg Schilling - * subchan.c 1.12 - better comment - -Thu Jul 25 03:25:39 2002 Joerg Schilling - * subchan.c 1.11 - Support for ISRC/MCN in RAW Mode new (but witout index shift) - -Tue Jul 23 23:47:58 2002 Joerg Schilling - * subchan.c 1.10 - First loop in fillsubch() removed because it is identical to second loop - -Tue Jul 23 23:32:31 2002 Joerg Schilling - * subchan.c 1.9 - fillsubch() now coeerect for audio Pregap between Tracks korrekt with relative time counting downwards - -Sun Jul 21 18:21:24 2002 Joerg Schilling - * drv_mmc.c 1.91 - set dsp->{ds_disktype!ds_trfirst!ds_trlast!ds_trfirst_ls} from dip->* - Do not cast malloc() anymore - Check write_cdtext() Returncode - Prepare for just Link - -Sun Jul 21 18:13:25 2002 Joerg Schilling - * drv_dvd.c 1.79 - set CDR_BURNFREE Flag, - set dsp->{ds_disktype!ds_trfirst!ds_trlast!ds_trfirst_ls} from dip->* - -Sun Jul 21 18:07:21 2002 Joerg Schilling - * cdrecord.c 1.173 - Version -> 1.11a27, - Define Warning that needs to be printed if Source has been changed, - Better messages for wrong DVD-RW write speed, reload_media() at end Ende of RAW Write - -Sun Jul 21 17:52:54 2002 Joerg Schilling - * scsi_cdr.c 1.116 - * auinfo.c 1.15 - malloc() Cast removed - -Sun Jul 21 17:51:44 2002 Joerg Schilling - * drv_sony.c 1.54 - dsp->ds_diskid now is UInt32_t - -Sun Jul 21 17:44:11 2002 Joerg Schilling - * cdrecord.h 1.100 - struct disk_status with Typen from utypes.h - -Mon Jul 8 00:31:04 2002 Joerg Schilling - * wm_session.c 1.4 - * wm_packet.c 1.18 - * subchan.c 1.8 - * fifo.c 1.38 - * drv_mmc.c 1.90 - * drv_jvc.c 1.64 - * clone.c 1.5 - * cdrecord.h 1.99 - * cdrecord.c 1.172 - 'tracks' outside driver interface removed and replaced by trackp->tracks - -Sun Jul 7 22:30:24 2002 Joerg Schilling - * drv_jvc.c 1.63 - Better rebuild old driver interface in next_wr_address_jvc() - -Sun Jul 7 22:28:35 2002 Joerg Schilling - * wm_packet.c 1.17 - * drv_mmc.c 1.89 - * cdr_drv.c 1.27 - * cdrecord.h 1.98 - * cdrecord.c 1.171 - * drv_sony.c 1.53 - * drv_simul.c 1.27 - * drv_philips.c 1.52 - * drv_jvc.c 1.62 - * drv_dvd.c 1.77 - trackno/tracks Parameter in driverinterface removed for new Struct Member - -Sat Jul 6 21:19:22 2002 Joerg Schilling - * cdrecord.c 1.170 - * cdrecord.h 1.97 - track_t now with tracks and track for simplified driverinterface - -Sat Jul 6 18:20:27 2002 Joerg Schilling - * cdrecord.h 1.96 - * cdrecord.c 1.169 - * drv_sony.c 1.52 - * drv_simul.c 1.26 - * drv_philips.c 1.51 - * drv_mmc.c 1.88 - * drv_jvc.c 1.61 - * drv_dvd.c 1.76 - cdr_speeddef/cdr_speedmax new and do not default to speed= 1 but to cdr_speeddef - -Fri Jul 5 23:11:39 2002 Joerg Schilling - * cdrecord.c 1.168 - Version -> 1.11a26 - wm2name[] with better systematics - Bugfix for High Speed CD-RW that could not be written anymore at 10x speed - New test for too slow writing of a CD-RW - Modename for blank only now is "BLANK" - Text: write XXX mode -> real XXX mode - SAO & RAW start (leadin) Code -> drv_mmc.c - Correctly print the current DVD writespeed - -Fri Jul 5 21:36:25 2002 Joerg Schilling - * cdrecord.h 1.95 - New driverfunction write_leadin, WM_ * Macros with better system, - new Macro wm_base(), - RF_LEADIN new - -Fri Jul 5 21:31:48 2002 Joerg Schilling - * drv_mmc.c 1.87 - New driverfunction write_leadin_mmc() with Code from cdrecord main function - -Fri Jul 5 21:26:04 2002 Joerg Schilling - * drv_sony.c 1.51 - * drv_simul.c 1.25 - * drv_philips.c 1.50 - * drv_jvc.c 1.60 - * drv_dvd.c 1.75 - New driverfunction write_leadin as dummy - -Thu Jul 4 13:01:36 2002 Joerg Schilling - * cdrecord.c 1.167 - Version -> 1.11a25 - Print Writemodes (new) - set_wrmode() new - restructuring: cdr_t->cdr_dstat is now used - dp->cdr_dstat->ds_cdrflags |= RF_PRATIP new - Check for ultra low speed media in High Speed writer - Check for high speed media in Low Speed writer - Avoid that cdrecord -- speed=8 causes speed=8 to be ignored as file type arg - -Thu Jul 4 12:55:52 2002 Joerg Schilling - * cdrecord.h 1.94 - restructuring: cdr_t->cdr_dstat is now used - New Write Mode WM_* definitions - -Thu Jul 4 12:53:14 2002 Joerg Schilling - * drv_dvd.c 1.74 - * drv_mmc.c 1.86 - * drv_philips.c 1.49 - * drv_sony.c 1.50 - Check for dp->cdr_dstat->ds_cdrflags & RF_PRATIP - Fill dsp->ds_flags |= DSF_ERA and dsp->ds_at_*_speed - -Tue Jul 2 19:55:47 2002 Joerg Schilling - * drv_sony.c 1.49 - * drv_simul.c 1.24 - * drv_philips.c 1.48 - * drv_jvc.c 1.59 - * cdr_drv.c 1.26 - * drv_mmc.c 1.85 - * drv_dvd.c 1.73 - dstat_t * now is a Member of cdr_t -> better handling of special funcs - -Tue Jul 2 15:18:31 2002 Joerg Schilling - * drv_mmc.c 1.84 - get_atip() now is always usable (not only if PRINT_ATIP has been defined) - -Sun Jun 16 15:58:37 2002 Joerg Schilling - * scsi_cdr.c 1.115 - Comment -> mmc-2 - -Fri May 31 22:09:39 2002 Joerg Schilling - * scsi_cdr.c 1.114 - wait_unit_ready() fast Abort even if k == SC_MEDIUM_ERROR - -Wed May 29 01:43:13 2002 Joerg Schilling - * scsi-wnt.c 1.28 - Better printf() format strings for DWORD - -Wed May 29 01:02:28 2002 Joerg Schilling - * cdtext.h 1.3 - List of language codes enhanced - -Wed May 29 00:55:22 2002 Joerg Schilling - * fifo.c 1.37 - palign() Macro with (UIntptr_t) Cast - -Wed May 29 00:54:26 2002 Joerg Schilling - * cdrecord.c 1.166 - Version -> 1.11a24, gracetime= in usage(), printf() Format correkt for bmtime() - -Wed May 29 00:51:56 2002 Joerg Schilling - * cdrecord.1 1.62 - gracetime= new - -Wed May 29 00:50:03 2002 Joerg Schilling - * cdtext.c 1.8 - Avoid Coredump if a single .inf File is missing and trackp[i].text is NULL -> ->textcodes does not work - -Mon May 20 17:08:41 2002 Joerg Schilling - * scsi-aix.c 1.34 - palign() -> with UIntptr_t cast - -Mon May 20 16:38:23 2002 Joerg Schilling - * scsi-remote.c 1.9 - avoid Integeroverflow with %.*s and 64 bit - -Mon May 20 14:28:12 2002 Joerg Schilling - * scsi-sun.c 1.71 - Cast (int)req.uscsi_buflen/(int)req.uscsi_resid forr 64 bit - -Mon May 13 02:02:09 2002 Joerg Schilling - * cdrecord.c 1.165 - Version -> 1.11a23, - Flush Cache with exit() in Silent Mode to avoid problem with cdrecord -toc and CD-ROMs - -Mon May 13 02:00:49 2002 Joerg Schilling - * fifo.c 1.36 - * drv_mmc.c 1.83 - * drv_jvc.c 1.58 - * drv_dvd.c 1.71 - * cdrecord.h 1.93 - New Typ tsize_t instead of off_t for Track size Vars > sizeof(long) on non-largefile OS - -Sat May 4 21:55:38 2002 Joerg Schilling - * cdrecord.c 1.164 - Avoid that abort via ^C kills a running SCSI Command - -Sat May 4 21:42:56 2002 Joerg Schilling - * scsitransp.c 1.83 - * scsitransp.h 1.51 - Callback Function at Ende of SCSI Command - -Sat May 4 18:10:05 2002 Joerg Schilling - * cdrecord.c 1.163 - Version -> 1.11a22 - gracetime= Option new - Now use geterrno()/seterrno() - reload_media() reads from stdder if input is from stdin - -Sat May 4 16:00:13 2002 Joerg Schilling - * cdrecord.c 1.162 - printf() Formats enhanced to get non jumping output with DVDs - -Sat May 4 15:36:45 2002 Joerg Schilling - * drv_dvd.c 1.70 - always set CDR_TAO|CDR_SAO in cdr_flags to allow speudo-DAO Mode - -Sat May 4 15:34:41 2002 Joerg Schilling - * cdrecord.h 1.92 - MIN_GRACE_TIME new - -Sat Apr 20 22:29:26 2002 Joerg Schilling - * fifo.c 1.35 - Now use geterrno()/seterrno() - -Tue Apr 16 19:20:40 2002 Joerg Schilling - * scsierrs.c 2.28 - New Errorstrings from 29.5.2001 - -Tue Apr 9 22:48:58 2002 Joerg Schilling - * diskid.c 1.35 - Embargo Message now better - -Tue Apr 9 22:41:41 2002 Joerg Schilling - * cdrecord.h 1.91 - F_STDIN Flag new - -Sat Mar 30 12:26:12 2002 Joerg Schilling - * drv_dvd.c 1.69 - Make drecord -atip print useful things - -Wed Mar 27 23:36:26 2002 Joerg Schilling - * drv_dvd.c 1.68 - maxblocks computing corrected (now even works with Panasonic) - -Tue Mar 26 19:18:31 2002 Joerg Schilling - * subchan.c 1.7 - create SCMS Bit - set COPY Bit in TOC and sub channels - -Tue Mar 26 19:10:32 2002 Joerg Schilling - * cdrecord.c 1.161 - Version -> 1.11a19 - -Tue Mar 26 19:07:15 2002 Joerg Schilling - * auinfo.c 1.14 - Albumperformer= new - -Tue Mar 26 19:02:58 2002 Joerg Schilling - * cdtext.c 1.7 - textfile= not-existent caused a Coredump - -Sun Mar 24 23:39:28 2002 Joerg Schilling - * cdrecord.c 1.160 - SCMS and Copy permitted printing new, Version -> 1.11a18 - -Sun Mar 24 23:38:11 2002 Joerg Schilling - * auinfo.c 1.13 - SCMS as new value for Copy_permitted= - -Sun Mar 10 00:24:19 2002 Joerg Schilling - * cdrecord.c 1.159 - Print real write speed - -Sat Mar 9 23:21:05 2002 Joerg Schilling - * drv_mmc.c 1.82 - remiove typo in hasdrvopt() - -Sat Mar 9 23:03:00 2002 Joerg Schilling - * drv_mmc.c 1.81 - first VariRec Support - -Sat Mar 9 21:15:48 2002 Joerg Schilling - * drv_dvd.c 1.65 - Burn-PROOF Support new, try tp make Panasonic DVD-R working - -Sat Mar 9 20:20:16 2002 Joerg Schilling - * cdrecord.c 1.158 - IS_SCHILY_XCONFIG new, Short Usage with susage() new - -Fri Mar 8 16:48:58 2002 Joerg Schilling - * cdrecord.c 1.157 - Version print Lizens better, -cdi sets toctype - -Fri Mar 8 16:46:54 2002 Joerg Schilling - * scsitransp.c 1.82 - Version -> 0.6 - -Tue Mar 5 23:34:46 2002 Joerg Schilling - * defaults.c 1.8 - NULL Pointer for args is now OK to allow to be used with readcd - -Tue Mar 5 23:32:00 2002 Joerg Schilling - * cdrecord.h 1.90 - getnum()/getllnum() from cdrecord.c -> getnum.c - -Tue Mar 5 23:26:31 2002 Joerg Schilling - * cdrecord.c 1.156 - Version -> 1.11a17 - getnum()/getllnum() -> getnum.c - cdr_defaults() changed to allow to be used with readcd.c - -Tue Mar 5 23:20:48 2002 Joerg Schilling - * getnum.c 1.1 - date and time created 02/03/05 23:20:48 by joerg - -Mon Mar 4 23:42:43 2002 Joerg Schilling - * diskid.c 1.34 - * drv_mmc.c 1.80 - * drv_dvd.c 1.64 - * scsi_cdr.c 1.113 - * drv_simul.c 1.23 - * fifo.c 1.34 - * crc16.c 1.5 - * crc16.h 1.3 - * cdrecord.h 1.89 - Copyright -> 2002 - -Mon Mar 4 23:32:08 2002 Joerg Schilling - * cdtext.h 1.2 - Comment for Text Language code now better - -Mon Mar 4 23:21:31 2002 Joerg Schilling - * cdrecord.c 1.155 - better comment for Version printing for not working Branches - -Mon Mar 4 22:43:47 2002 Joerg Schilling - * cdrecord.c 1.154 - Comments for Sector size - -Mon Mar 4 22:42:12 2002 Joerg Schilling - * defaults.c 1.7 - Copyright -> 2002 - new Function open_cdrdefaults(), - Comment that states that "/etc/default/cdrecord" may not be changed - -Fri Mar 1 22:37:21 2002 Joerg Schilling - * diskid.c 1.33 - Better Text for unknown ID Codes - -Thu Feb 28 23:04:45 2002 Joerg Schilling - * auinfo.c 1.12 - readtstr() now looks for rightmost ' from right to left, - readtag("CDINDEX_DISCID=") -> readtstr("CDINDEX_DISCID=") - -Sun Feb 24 15:44:34 2002 Joerg Schilling - * cdrecord.c 1.153 - Copyright -> 2002 - -Sat Feb 23 22:00:51 2002 Joerg Schilling - * cdtext.c 1.6 - First Support for CD-Text Synthesis with new functions text_txt()/packtext()/anytext()/fillup_pack()/fillpack() - -Sat Feb 23 21:44:33 2002 Joerg Schilling - * cdtext.h 1.1 - date and time created 02/02/23 21:44:33 by joerg - -Sat Feb 23 21:21:10 2002 Joerg Schilling - * cdrecord.1 1.61 - -text/textfile= Options documented - -Sat Feb 23 21:17:42 2002 Joerg Schilling - * cdrecord.c 1.152 - Version -> 1.11a15, Option -text new, char * textfile not global anymore - -Sat Feb 23 21:10:53 2002 Joerg Schilling - * auinfo.c 1.11 - First CD-Text Support - -Sat Feb 23 17:24:48 2002 Joerg Schilling - * cdrecord.h 1.88 - void *text new in struct track, packtext() Prototype new - -Sat Feb 23 16:01:50 2002 Joerg Schilling - * drv_mmc.c 1.79 - CD-Text Cue sheet for Lead-in does not depend anymore from char *textfile but from trackp[0].flags & TI_TEXT - -Wed Feb 20 19:39:39 2002 Joerg Schilling - * scsi_cdr.c 1.112 - * drv_dvd.c 1.63 - * drv_simul.c 1.22 - * fifo.c 1.33 - #ifndef DEBUG around #define DEBUG - -Tue Feb 19 22:10:23 2002 Joerg Schilling - * cdtext.c 1.5 - setuptextdata() new - -Fri Feb 15 00:46:56 2002 Joerg Schilling - * crc16.h 1.2 - * crc16.c 1.4 - flip_crc_error_cor() with bsize Parameter and EXPORT instead of LOCAL - cdtext_crc_ok() removed -> cdtext.c - -Fri Feb 15 00:42:47 2002 Joerg Schilling - * cdtext.c 1.4 - Flip error correction for Text CRC correction - Automatic Text Size Header recognition - -Sun Feb 10 12:43:07 2002 Joerg Schilling - * scsi-openserver.c 1.29 - MAX-DMA -> 63kB, -scanbus contolled by env Vars - -Sat Feb 9 17:29:02 2002 Joerg Schilling - * diskid.c 1.32 - Warning for guessed IDs - -Tue Jan 29 20:46:42 2002 Joerg Schilling - * diskid.c 1.31 - Removed wrong (now superfluous) IDs - -Thu Jan 24 00:03:25 2002 Joerg Schilling - * diskid.c 1.30 - "Advanced Digital Media", "Moser Baer India Limited", "NAN-YA Plastics Corporation", "SHENZEN SG&GAST DIGITAL OPTICAL DISCS" new from Plextools binary - m_grandadvance[] was superfluous (m_grandadv[]) - "WEALTH FAIR INVESTMENT LIMITE" typo fixed (D missing). - -Fri Jan 18 12:43:58 2002 Joerg Schilling - * scsi-linux-sg.c 1.69 - do not try to use the PG driver if open(device) fails - -Fri Dec 7 22:40:31 2001 Joerg Schilling - * scsi_cdr.c 1.111 - scsi_in_progress() with additional sense qualifier 0x04 for CyberDrive - -Sun Dec 2 15:42:53 2001 Joerg Schilling - * scsi-beos.c 1.20 - Typo removed, Support for BeOS 5 - -Sun Dec 2 15:37:36 2001 Joerg Schilling - * scsi-amigaos.c 1.2 - Reworked the error handling code - -Sun Dec 2 13:44:43 2001 Joerg Schilling - * scsi-amigaos.c 1.1 - date and time created 01/12/02 13:44:43 by joerg - -Tue Nov 27 20:25:39 2001 Joerg Schilling - * scsihack.c 1.40 - Copyright + 2001 - -Tue Nov 27 20:24:18 2001 Joerg Schilling - * scsihack.c 1.39 - scsi-amigaos.c new - -Tue Nov 27 02:10:34 2001 Joerg Schilling - * cdrecord.c 1.151 - NEED_SYS_SOCKET_H for BeOS new - Version -> 1.11a13 - cdr_buffer_cap() environment for Plasmon RF41xx better - -Tue Nov 27 02:08:47 2001 Joerg Schilling - * drv_philips.c 1.47 - Comment for buffer_cap dummy function for the Plasmon RF41xx better - -Tue Nov 13 16:17:05 2001 Joerg Schilling - * cdrecord.h 1.87 - * drv_dvd.c 1.62 - * cdrecord.c 1.150 - New Flag DSF_DVD, better overcapacity output for DVD - -Sun Nov 11 18:30:47 2001 Joerg Schilling - * drv_dvd.c 1.61 - Comment for ACARD TECH AEC-7720 ATAPI<->SCSI adaptor better - -Sun Nov 11 17:53:42 2001 Joerg Schilling - * scsi-remote.c 1.8 - Test HAVE_RCMD new - -Thu Nov 1 19:15:46 2001 Joerg Schilling - * drv_simul.c 1.21 - Now using timedefs.h - -Wed Oct 31 19:29:35 2001 Joerg Schilling - * scsi_cdr.c 1.110 - For ACARD TECH AEC-7720 ATAPI<->SCSI adaptor read Mode Page list only in debug mode - -Wed Oct 31 00:24:58 2001 Joerg Schilling - * scsi_cdr.c 1.109 - sense_secsize() now calles mode_sense() first with 12 Bytes and again with 0xFE Bytes for Moge Page List - -Wed Oct 31 00:17:27 2001 Joerg Schilling - * drv_mmc.c 1.78 - check_writemodes_mmc() -> EXPORT, read_dvd_structure() now with mit 32 byte instead of 15 bytes len Parameter - -Wed Oct 31 00:06:47 2001 Joerg Schilling - * cdrecord.h 1.86 - Prototyp for check_writemodes_mmc() - -Tue Oct 30 23:12:03 2001 Joerg Schilling - * scsireg.h 1.26 - cd_mode_page_05 intel byteorder link_size was wrong - -Tue Oct 30 21:36:53 2001 Joerg Schilling - * cdrecord.c 1.147 - DVD Check code did code exit() for non MMC CD writers - version -> 1.11a10 - -Mon Oct 29 19:12:29 2001 Joerg Schilling - * scsi-mac-iokit.c 1.3 - Include Liste reworked - -Mon Oct 29 18:57:46 2001 Joerg Schilling - * cd_misc.c 1.10 - * misc.c 1.2 - * modes.c 1.24 - * diskid.c 1.29 - * drv_simul.c 1.20 - * fifo.c 1.32 - * wm_track.c 1.3 - * wm_session.c 1.3 - * wm_packet.c 1.16 - avoid sys/types.h - -Sat Oct 27 02:56:16 2001 Joerg Schilling - * scsi-remote.c 1.7 - Test for HAVE_NETDB_H for rcmd() - -Sat Oct 27 02:55:30 2001 Joerg Schilling - * scsierrs.c 2.27 - #include for size_t for snprintf() - -Sat Oct 27 02:53:49 2001 Joerg Schilling - * fifo.c 1.31 - Test for HAVE_FORK new - -Sat Oct 27 02:53:18 2001 Joerg Schilling - * cdtext.c 1.3 - casts because sizeof() on MacOS X is long - -Thu Oct 25 16:19:08 2001 Joerg Schilling - * scsi-mac-iokit.c 1.2 - Unitnitialised Var dict, plugInResult format string ... GCC error removed - -Thu Oct 25 02:03:56 2001 Joerg Schilling - * scsihack.c 1.38 - Support for MaxOS X (Darwin-1.4) - -Thu Oct 25 02:03:11 2001 Joerg Schilling - * scsi-mac-iokit.c 1.1 - date and time created 01/10/25 01:03:11 by joerg - -Wed Oct 17 19:40:22 2001 Joerg Schilling - * cdrecord.c 1.146 - initialize scgp with NUL - brackets around if (p = senv_field(6)) - -Tue Oct 16 17:03:53 2001 Joerg Schilling - * drv_dvd.c 1.57 - * cdrecord.c 1.144 - * cdrecord.h 1.85 - * drv_simul.c 1.19 - * drv_sony.c 1.48 - * drv_philips.c 1.46 - * drv_mmc.c 1.77 - * drv_jvc.c 1.57 - New Structuremember cdr_cmdflags in cdr_t - -Tue Oct 16 15:57:05 2001 Joerg Schilling - * cdrecord.c 1.143 - Better error messages for DVD Demo Mode > 1 GB - -Wed Oct 10 23:04:03 2001 Joerg Schilling - * cdrecord.c 1.139 - number() corrected - had wrong if/then/else Structure for T/P/G Multiplyer - -Tue Oct 9 02:19:36 2001 Joerg Schilling - * cdrecord.c 1.138 - sys/types.h & sys/stat.h -> statdefs.h, -> 1.11a09 - -Tue Oct 9 01:42:05 2001 Joerg Schilling - * audiosize.c 1.18 - * isosize.c 1.8 - sys/types.h & sys/stat.h -> statdefs.h - -Sun Oct 7 21:27:14 2001 Joerg Schilling - * scsi-linux-pg.c 1.40 - * scsi-linux-sg.c 1.68 - Better error messages for Scanbus if /dev/sg* or /dev/pg* cannot be opened - -Sun Oct 7 21:03:23 2001 Joerg Schilling - * drv_mmc.c 1.76 - Modifications to allow recognition of CD/DVD writer - -Sun Oct 7 20:41:51 2001 Joerg Schilling - * cdr_drv.c 1.25 - xdebug for DVD/CD writer recognition - -Sun Oct 7 19:01:25 2001 Joerg Schilling - * drv_dvd.c 1.55 - read_dvd_structure() from drv_dvd.c -> scsi_cdr.c for Pioneer A03 DVD-R/CD-R - reload_media() only if writing later - -Sun Oct 7 13:35:21 2001 Joerg Schilling - * scsi_cdr.c 1.108 - * cdrecord.h 1.84 - read_dvd_structure() from drv_dvd.c -> scsi_cdr.c for Pioneer A03 DVD-R/CD-R - -Thu Sep 27 19:01:30 2001 Joerg Schilling - * scsidefs.h 1.27 - #undef DEV_UNKNOWN for True64 - -Thu Sep 13 19:10:03 2001 Joerg Schilling - * scsi_cdr.c 1.107 - * cdr_drv.c 1.24 - * drv_dvd.c 1.54 - * cdrecord.h 1.83 - Modifications to allow recognition of CD/DVD writer - -Thu Sep 13 19:01:46 2001 Joerg Schilling - * cdrecord.c 1.137 - cdrecord -version now may print cdrecord-Clone, - Modifications to allow recognition of CD/DVD writer - -Thu Sep 13 15:36:21 2001 Joerg Schilling - * scsidefs.h 1.26 - DEV_MMC_DVD_WR new - -Thu Sep 13 14:31:05 2001 Joerg Schilling - * scsi-sun.c 1.70 - maxdma for USCSI to default if == -1 (e.g. for TAPE), Debug print the RQ Buffer. - -Tue Sep 11 14:04:03 2001 Joerg Schilling - * scsi_cdr.c 1.106 - Open CD-Text File in Binary - -Tue Sep 11 03:06:31 2001 Joerg Schilling - * scsi-linux-sg.c 1.67 - Timeout Workaround for ioctl() - -Tue Sep 4 14:04:25 2001 Joerg Schilling - * cdrecord.c 1.136 - DEMO_SPEED new - -Thu Aug 9 16:38:21 2001 Joerg Schilling - * cdrecord.h 1.82 - * cdrecord.c 1.135 - #define GRACE_TIME 9 new - -Fri Jul 20 13:17:21 2001 Joerg Schilling - * drv_mmc.c 1.75 - * cdrecord.c 1.134 - * cdrecord.h 1.81 - RF_BLANK new to avoid opening the tray before blanking - Version -> 1.11a07 - -Thu Jul 19 00:28:36 2001 Joerg Schilling - * scsi-remote.c 1.6 - Now using _niread()/_nixwrite() - -Thu Jul 12 23:40:28 2001 Joerg Schilling - * scsidefs.h 1.25 - Taiyo Yuden EW-50 new - -Thu Jul 12 23:35:08 2001 Joerg Schilling - * scsi_cdr.c 1.105 - * cdr_drv.c 1.23 - * drv_philips.c 1.45 - New driver for Taiyo Yuden EW-50 because it swabs audio bytes compared to Philips CDD-521 - -Thu Jul 12 23:33:28 2001 Joerg Schilling - * fifo.c 1.30 - Better Debug messages for FIFO adresse/size - -Thu Jul 5 00:08:38 2001 Joerg Schilling - * sector.c 1.5 - Match new libedc - -Thu Jun 28 13:19:02 2001 Joerg Schilling - * drv_mmc.c 1.74 - Use -DSAO_RAW -DSAO_RAW_TEST for SAO RAW tests only - -Wed Jun 27 10:04:03 2001 Joerg Schilling - * clone.c 1.4 - clone_cue() for Test - -Wed Jun 27 09:51:19 2001 Joerg Schilling - * cdrecord.c 1.133 - CDR_SRAW16 removed - -Wed Jun 27 09:47:10 2001 Joerg Schilling - * scsimmc.h 1.6 - * scsi_cdr.c 1.104 - struct ftrackdesc -> scsimmc.h - -Wed Jun 27 09:35:13 2001 Joerg Schilling - * scsi_cdr.c 1.103 - struct tocheader definition removed because it is in scsimmc.h - -Sun Jun 24 22:35:23 2001 Joerg Schilling - * drv_mmc.c 1.73 - check_writemodes_mmc() now resety silent correctly, deflt_writemodes_mmc() new - -Sun Jun 24 19:55:02 2001 Joerg Schilling - * cdrecord.h 1.80 - CDR_SRAW16 disabled, because SAO supports only RAW96x - -Fri Jun 22 08:42:55 2001 Joerg Schilling - * scsimmc.h 1.5 - struct tocheader now with Uchar - -Wed Jun 20 21:53:55 2001 Joerg Schilling - * subchan.c 1.6 - min Struktur member -> pmin - -Wed Jun 20 21:53:34 2001 Joerg Schilling - * cdr_drv.c 1.22 - #include for printf() - -Wed Jun 20 21:53:03 2001 Joerg Schilling - * cdrecord.c 1.132 - Changes for GCC-3.0 & Linux include file bugs for printf() (is a #define), 1.11a04 -> 1.11a05 - -Tue Jun 19 12:26:49 2001 Joerg Schilling - * cdrecord.c 1.131 - Usage() with textfile=, 1.11a03 -> 1.11a04 - -Tue Jun 19 12:22:30 2001 Joerg Schilling - * cdtext.c 1.2 - Modifications for RAW CD-Text - -Tue Jun 19 11:39:08 2001 Joerg Schilling - * cdrecord.h 1.79 - * subchan.c 1.5 - addrw() new for CD-Text Support in RAW mode - -Tue Jun 19 02:10:37 2001 Joerg Schilling - * cdrecord.h 1.78 - * cdrecord.c 1.130 - BUF_SIZE -> CDR_BUF_SIZE & from cdrecord.c -> cdrecord.h - -Tue Jun 19 01:04:54 2001 Joerg Schilling - * cdrecord.c 1.129 - Do not call exit() if interrupting during wait time via ^C - -Mon Jun 18 09:29:52 2001 Joerg Schilling - * cdtext.c 1.1 - date and time created 01/06/18 08:29:52 by joerg - -Mon Jun 18 08:55:07 2001 Joerg Schilling - * drv_mmc.c 1.72 - * cdrecord.c 1.128 - * cdrecord.h 1.77 - First CD-Text Support - -Sat Jun 16 19:20:36 2001 Joerg Schilling - * cdrecord.c 1.127 - trackp->dataoff new, call on_comerr() earlier - -Sat Jun 16 18:16:51 2001 Joerg Schilling - * cdrecord.h 1.76 - Dataoffset in struct track new, is_text() new - -Sat Jun 16 18:15:05 2001 Joerg Schilling - * drv_mmc.c 1.71 - Forgotten if (xdebug) - -Tue Jun 12 22:57:03 2001 Joerg Schilling - * cdrecord.c 1.126 - -clone new, write mode for -xa1 -xa2, RAW data bug removed - -Tue Jun 12 22:42:25 2001 Joerg Schilling - * sector.c 1.4 - recodesectors() -> subrecodesecs()/sunchan.c, scrsectors() without return for AUDIO - -Tue Jun 12 22:41:37 2001 Joerg Schilling - * subchan.c 1.4 - subrecodesecs() from sector.c & scrsectors() dummy - -Tue Jun 12 22:40:59 2001 Joerg Schilling - * cdrecord.h 1.75 - recodesectors() -> subrecodesecs() - -Tue Jun 12 01:51:49 2001 Joerg Schilling - * cdrecord.h 1.74 - Modifications for clone.c - -Tue Jun 12 01:50:53 2001 Joerg Schilling - * clone.c 1.1 - date and time created 01/06/12 00:50:53 by joerg - -Tue Jun 12 01:07:06 2001 Joerg Schilling - * subchan.c 1.3 - subq/nsubh -> _subq/_nsubh - -Tue Jun 12 01:05:54 2001 Joerg Schilling - * subchan.c 1.2 - Changes for clone writing, qwto16() new for clone 16/96 Writing - -Tue Jun 12 00:12:42 2001 Joerg Schilling - * sector.c 1.3 - removed unused Vars - -Mon Jun 11 23:31:00 2001 Joerg Schilling - * cdrecord.h 1.73 - Enhancements for clone writing - -Mon Jun 11 23:29:50 2001 Joerg Schilling - * sector.c 1.2 - scrsectors()/recodesectors() fuer clone writing neu - -Mon Jun 11 23:12:41 2001 Joerg Schilling - * drv_mmc.c 1.70 - Checking write modes Message only with xdebug - -Mon Jun 11 23:11:55 2001 Joerg Schilling - * movesect.c 1.2 - Make it more general to allow compress and expand - -Mon Jun 11 23:09:58 2001 Joerg Schilling - * auinfo.c 1.10 - Comment for ISRC - -Sat Jun 9 20:13:35 2001 Joerg Schilling - * cdrecord.c 1.125 - -copy/-nocopy new, Prevent data sectors only in RAW Mode (without libedc_ecc) - -Sat Jun 9 20:05:59 2001 Joerg Schilling - * cdrecord.1 1.60 - New Options -raw, -raw96r, -raw96p, -raw16, -copy, -nocopy - -Wed Jun 6 00:09:58 2001 Joerg Schilling - * cdrecord.c 1.124 - Any positive startsector for RAW is wriong -> Philips Firmware bug fixed - -Mon Jun 4 19:28:17 2001 Joerg Schilling - * cdrecord.c 1.123 - Modifications for RAW Mode - cdr_t *dp now allocated - BURNFREE printput with Driver Flags - OPC also for -blank - write_secs() new for all writes on ATAPI - print_wrmodes()/check_wrmode() new - reload_media() new - -Mon Jun 4 17:45:49 2001 Joerg Schilling - * cdrecord.h 1.72 - * drv_dvd.c 1.53 - * drv_mmc.c 1.69 - New Function reload_media() - -Mon Jun 4 17:08:05 2001 Joerg Schilling - * cdrecord.h 1.71 - * wm_packet.c 1.15 - Modifications for RAW Mode - -Mon Jun 4 17:06:21 2001 Joerg Schilling - * subchan.c 1.1 - date and time created 01/06/04 16:06:21 by joerg - -Mon Jun 4 16:52:34 2001 Joerg Schilling - * crc16.c 1.3 - Now correct Code with Inverted CRC Bits - -Mon Jun 4 16:49:47 2001 Joerg Schilling - * auinfo.c 1.9 - SECT_AUDIO_NPRE -> SECT_AUDIO_NOPRE - -Mon Jun 4 16:06:15 2001 Joerg Schilling - * crc16.c 1.2 - Now using Uint*_t - -Mon Jun 4 16:02:17 2001 Joerg Schilling - * crc16.h 1.1 - date and time created 01/06/04 15:02:17 by joerg - -Mon Jun 4 13:33:19 2001 Joerg Schilling - * drv_mmc.c 1.68 - Now using CDR_SRAW*, botchexit Abort removed - -Mon Jun 4 12:53:18 2001 Joerg Schilling - * sector.c 1.1 - date and time created 01/06/04 11:53:18 by joerg - -Sun Jun 3 20:51:22 2001 Joerg Schilling - * auinfo.c 1.8 - Modifications for RAW Mode - -Sun Jun 3 14:48:57 2001 Joerg Schilling - * cdrecord.c 1.122 - Use comexit()/comerr() instead of exscsi() - New Function do_opc() now also called before blank, -force avoids this - -Sat Jun 2 21:24:52 2001 Joerg Schilling - * movesect.h 1.1 - * movesect.c 1.1 - date and time created 01/06/02 20:24:52 by joerg - -Fri Jun 1 07:54:04 2001 Joerg Schilling - * cdrecord.1 1.59 - burnproof -> burnfree - -Fri Jun 1 07:46:01 2001 Joerg Schilling - * scsi_cdr.c 1.102 - BURN-Proof (Sanyo) -> Buffer-Underrun-Free recording - -Fri Jun 1 07:44:39 2001 Joerg Schilling - * fifo.c 1.29 - call fill_buf() instead of read_buf() and trackp/secno Parameter for Subcode Generator - -Fri Jun 1 02:08:55 2001 Joerg Schilling - * drv_mmc.c 1.67 - BURN-Proof -> BURN-Free - -Thu May 31 23:31:44 2001 Joerg Schilling - * scsireg.h 1.25 - BURN Free & link size new - -Thu May 31 03:21:47 2001 Joerg Schilling - * drv_mmc.c 1.66 - check_writemodes_mmc() new, is_raw() set write modes - -Mon May 28 00:51:36 2001 Joerg Schilling - * cd_misc.c 1.9 - sec_to_msf() new - -Sun May 27 14:01:28 2001 Joerg Schilling - * audiosize.c 1.17 - Better comment - -Thu May 24 19:10:28 2001 Joerg Schilling - * auinfo.c 1.7 - No exit() if -debug & nindex > 1 - -Thu May 24 19:09:39 2001 Joerg Schilling - * modes.c 1.23 - Warning using default data only if not in Silent mode - -Thu May 24 19:07:13 2001 Joerg Schilling - * drv_dvd.c 1.52 - * drv_jvc.c 1.56 - * drv_simul.c 1.18 - * drv_philips.c 1.44 - * drv_sony.c 1.47 - CDR_DAO -> CDR_SAO, SAO no more predefined - it either does not work or is tested automatically (MMC) - -Sun May 20 21:23:53 2001 Joerg Schilling - * drv_sony.c 1.46 - * drv_philips.c 1.43 - mask sectype with ST_MASK because of new mode bits - -Sun May 20 18:51:41 2001 Joerg Schilling - * drv_simul.c 1.17 - CDR_SIMUL Flag new - -Fri May 18 21:07:58 2001 Joerg Schilling - * cdrecord.h 1.70 - F_OVERBURN new, F_RAW / is_raw() new, CDR_SIMUL new - -Fri May 18 19:30:02 2001 Joerg Schilling - * cdrecord.c 1.121 - trackp[0].dbtype is set with Data type from Track 1 - -Fri May 18 19:22:50 2001 Joerg Schilling - * drv_mmc.c 1.65 - In open_session() wird nun schon der Datenblocktyp fuer den ersten track eingestellt - -Mon May 14 23:36:07 2001 Joerg Schilling - * cdrecord.c 1.120 - -overburn new - Bracket bug with > 90 min Warning removed - > 90 Min Warning only if offizial capacity is exceeded (for DVD-R) - -pad implied for next Track with -isosize - Win32 Priorities are non contiguous (fix in rt_raisepri()) - -Mon May 14 22:54:17 2001 Joerg Schilling - * cdrecord.h 1.69 - F_OVERBURN (-overburn) new - -Mon May 14 22:53:33 2001 Joerg Schilling - * cdrecord.1 1.58 - -overburn new, -isosize better documented - -Sat Apr 28 23:34:12 2001 Joerg Schilling - * scsi-remote.c 1.5 - Read char with buffer for cygwin - -Fri Apr 20 11:38:03 2001 Joerg Schilling - * scsitransp.c 1.81 - scg_svhead() is silent if non verbose - -Fri Apr 20 11:34:41 2001 Joerg Schilling - * scsi-linux-sg.c 1.66 - Hack for ide-scsi bug, although there is sense data, SCSI Status is 0 - -Thu Apr 19 21:52:41 2001 Joerg Schilling - * drv_mmc.c 1.64 - removed superfluous scgp->silent--; in fixate_mmx(). silent did become negative - -Thu Apr 19 21:51:26 2001 Joerg Schilling - * cdrecord.c 1.119 - Enhance wait time in wait_unit_ready() after blank to 240 s for Mitsumi - -Tue Apr 17 00:58:57 2001 Joerg Schilling - * cdrecord.1 1.57 - Hint for mailman interface - -*************** Release 1.10 ******************* - -Fri Apr 13 20:41:36 2001 Joerg Schilling - * cdrecord.c 1.118 - Version -> 1.10 final - -Fri Apr 13 20:40:58 2001 Joerg Schilling - * cdrecord.c 1.117 - Backwardcounter corrected - -Fri Apr 13 20:39:09 2001 Joerg Schilling - * cdrecord.1 1.56 - New Support mail Adresses - -Wed Apr 11 01:22:18 2001 Joerg Schilling - * scsi_cdr.c 1.101 - * cdrecord.h 1.68 - print_capacity() new with FILE * Parameter - -Sun Apr 8 02:03:49 2001 Joerg Schilling - * modes.c 1.22 - scgp->silent--; was oat wrong place - -Sun Apr 1 14:39:01 2001 Joerg Schilling - * cdrecord.1 1.55 - Typo - -Sat Mar 31 23:02:28 2001 Joerg Schilling - * modes.c 1.21 - unit_ready() before each mode_sense()/mode_select() - -Sat Mar 31 22:46:28 2001 Joerg Schilling - * drv_mmc.c 1.63 - Comment for IOMEGA DMA overrun modified (Philips removed) - -Sun Mar 18 19:39:48 2001 Joerg Schilling - * cdrecord.1 1.54 - REMOTE SCSI description and new unified SCSI Options - -Sun Mar 18 19:31:31 2001 Joerg Schilling - * cdrecord.c 1.116 - Unified SCSI Options - -Sun Mar 18 19:27:02 2001 Joerg Schilling - * scsitransp.c 1.80 - Fixed bug that printed SCSI timing without verbose - -Sun Mar 18 18:37:45 2001 Joerg Schilling - * scsitransp.c 1.79 - New Functions: scg_svhead()/scg_svtail()/scg__sprinterr() - Comments for Functions - Print SCSI timing for earch failed SCSI Command - -Sun Mar 18 18:28:17 2001 Joerg Schilling - * scsitransp.h 1.50 - New Funstions: scg_svhead()/scg_svtail()/scg__sprinterr() - -Sun Mar 18 15:37:09 2001 Joerg Schilling - * scsitransp.c 1.78 - Print Timing without Verbose - -Sun Mar 18 15:10:18 2001 Joerg Schilling - * scsi-wnt.c 1.27 - * scsi-vms.c 1.29 - * scsi-unixware.c 1.25 - * scsi-sgi.c 1.34 - * scsi-osf.c 1.23 - * scsi-next.c 1.30 - * scsi-linux-sg.c 1.65 - * scsi-hpux.c 1.29 - * scsi-linux-pg.c 1.39 - * scsi-bsd.c 1.40 - * scsi-bsd-os.c 1.26 - * scsi-beos.c 1.19 - * scsi-aix.c 1.33 - if (scgp->debug) -> if (scgp->debug > 0) - -Wed Mar 14 00:42:40 2001 Joerg Schilling - * scsitransp.h 1.49 - * scsitransp.c 1.77 - scg_verbose() -> scg_vsetup() - -Mon Mar 12 23:09:38 2001 Joerg Schilling - * cdrecord.c 1.115 - Version -> 1.10a17, select_target() uses FILE * - -Mon Mar 12 23:08:46 2001 Joerg Schilling - * scsi_scan.h 1.3 - * scsi_scan.c 1.14 - comerrno() removed - select_target() with FILE * - select_target() returns number of Targets - -Mon Mar 12 23:06:50 2001 Joerg Schilling - * cdrecord.h 1.67 - * scsi_cdr.c 1.100 - printinq() new - -Mon Mar 12 22:06:05 2001 Joerg Schilling - * scsi-linux-sg.c 1.64 - Better differentiation SCG_RETRYABLE/SCG_NO_ERROR - Set ux_errno if Sense Data present - -Sun Mar 11 17:10:12 2001 Joerg Schilling - * scsi-linux-pg.c 1.38 - SCG_RETRYABLE for DMA overrun - CHECK CONDITION == SCG_NO_ERROR - -Sun Mar 11 17:07:48 2001 Joerg Schilling - * scsitransp.c 1.76 - Remove unused Variables - -Sun Mar 11 16:56:24 2001 Joerg Schilling - * scsitransp.h 1.48 - scg_vhead()/scg_vtail()/scg_verbose() & scg_errfflush() new - -Sun Mar 11 16:55:55 2001 Joerg Schilling - * scsitransp.c 1.75 - scg_vhead()/scg_vtail()/scg_verbose() & scg_errfflush() new - Version -> 0.5 - -Sat Mar 10 17:53:45 2001 Joerg Schilling - * scsitransp.h 1.47 - scgp->bufptr new - SCG_KVERSION new - -Sat Mar 10 17:52:53 2001 Joerg Schilling - * scsitransp.c 1.74 - scgp->bufptr new - scgp->scmd->resid < 0 == DMA overrun - -Sat Mar 10 16:24:00 2001 Joerg Schilling - * scsi-linux-sg.c 1.63 - SCG_KVERSION new - -Mon Feb 26 22:20:32 2001 Joerg Schilling - * scsi-unixware.c 1.24 - New formatting - -Mon Feb 26 22:18:39 2001 Joerg Schilling - * scsi-unixware.c 1.23 - Environment "LIBSCG_SCAN_ALL" controls scanning of Harddisks because of system crash - -Mon Feb 26 16:05:41 2001 Joerg Schilling - * cdrecord.c 1.114 - Warning if DVD-R code is missing and we found a DVD-R drive - -Sun Feb 25 13:02:42 2001 Joerg Schilling - * fifo.c 1.27 - Now using mmapdefs.h - -Fri Feb 23 17:32:38 2001 Joerg Schilling - * scsidefs.h 1.24 - ccs() Makro -> is_ccs() - -Fri Feb 23 00:24:02 2001 Joerg Schilling - * fifo.c 1.26 - Support for mmap() on Apollo Domain/OS with mmap(0, &size, ...) - -Thu Feb 22 16:13:27 2001 Joerg Schilling - * audiosize.c 1.16 - Fixed bug in Prototyp (result from long -> off_t) - -Thu Feb 22 16:11:07 2001 Joerg Schilling - * cdrecord.h 1.66 - * wm_packet.c 1.14 - * cdrecord.c 1.113 - * drv_mmc.c 1.62 - * drv_jvc.c 1.54 - * drv_dvd.c 1.51 - Large File support - -Thu Feb 22 16:10:53 2001 Joerg Schilling - * drv_jvc.c 1.55 - padsize Parameter for pad_track() casted to Llong - -Thu Feb 22 00:57:53 2001 Joerg Schilling - * cdr_drv.c 1.21 - mconfig.h/unixstd.h for Large Files - -Thu Feb 22 00:55:35 2001 Joerg Schilling - * scsi_scan.c 1.13 - #include for Large Files - -Thu Feb 22 00:54:26 2001 Joerg Schilling - * fifo.c 1.25 - Large File support - Casts for sizeof() [long] on MaxOS X - -Wed Feb 21 23:32:51 2001 Joerg Schilling - * defaults.c 1.6 - #include unixstd.h for Large Files - -Wed Feb 21 23:27:48 2001 Joerg Schilling - * auinfo.c 1.6 - * isosize.c 1.7 - * audiosize.c 1.15 - Large File support - -Tue Feb 20 23:56:44 2001 Joerg Schilling - * drv_sony.c 1.45 - * drv_philips.c 1.42 - unixstd.h for sys/types.h for off_t in cdrecord.h - -Thu Feb 15 23:09:12 2001 Joerg Schilling - * scsihack.c 1.37 - Test for HAVE_BSD_DEV_SCSIREG_H for new MacOSX - -Fri Feb 9 00:35:50 2001 Joerg Schilling - * drv_philips.c 1.41 - Fixes for Plasmon RF 4100 - -Tue Jan 23 12:20:32 2001 Joerg Schilling - * modes.c 1.20 - Cast for singed/unsigned cmparison - -Mon Jan 15 01:09:05 2001 Joerg Schilling - * fifo.c 1.24 - %x -> %p Format - -Sun Jan 7 19:46:42 2001 Joerg Schilling - * scsihack.c 1.36 - scsi-apollo.c new - -Sun Jan 7 19:39:40 2001 Joerg Schilling - * scsitransp.c 1.73 - * scsi-vms.c 1.28 - * scsi-unixware.c 1.22 - * scsi-linux-pg.c 1.37 - * scsi-aix.c 1.32 - sense_len check -> scsitransp.c - -Tue Jan 2 00:09:45 2001 Joerg Schilling - * scsitransp.c 1.72 - sccsid[] is always used -> without #ifdef lint - -Fri Dec 29 00:06:35 2000 Joerg Schilling - * cdrecord.c 1.112 - Lint, 1.10a10, rlimit cast to Llong for SGI - -Thu Dec 28 23:19:23 2000 Joerg Schilling - * scsi_cdr.c 1.99 - Modified for Lint - -Wed Dec 20 18:26:01 2000 Joerg Schilling - * scsi-sgi.c 1.33 - Cast to caddr_t for SENSEBUF(dsp) - -Wed Dec 13 20:22:52 2000 Joerg Schilling - * scsi-linux-pg.c 1.36 - Cast s_cmd.addr = (caddr_t)sp->u_sense.cmd_sense; - -Tue Dec 12 15:20:46 2000 Joerg Schilling - * scsitransp.h 1.46 - struct scsi -> struct scg_scsi for AIX - -Sat Dec 9 22:52:01 2000 Joerg Schilling - * scsi-linux-sg.c 1.62 - Recognise ENOTTY as errno for failed ioctl() - -Sat Dec 9 18:20:25 2000 Joerg Schilling - * modes.c 1.19 - * scsilog.c 1.13 - * drv_sony.c 1.44 - * drv_philips.c 1.40 - * drv_mmc.c 1.61 - * drv_jvc.c 1.53 - * drv_dvd.c 1.50 - u_char -> Uchar - -Wed Dec 6 12:43:51 2000 Joerg Schilling - * cdrecord.c 1.111 - atoll() -> libschily - -Wed Nov 29 17:22:15 2000 Joerg Schilling - * scsi-vms.c 1.27 - Indented - -Wed Nov 29 17:18:51 2000 Joerg Schilling - * scsi-vms.c 1.26 - ATAPI Support and changed for new libscg Interface - -Fri Nov 24 11:00:58 2000 Joerg Schilling - * cdrecord.c 1.110 - Workaround for ACER drive that does not return from -dummy - Typo in online Help - -Wed Nov 8 00:06:05 2000 Joerg Schilling - * scsitransp.h 1.45 - * scsireg.h 1.24 - * scsidefs.h 1.23 - * scgio.h 2.16 - #ifdef __cplusplus extern "C" { - -Sat Nov 4 15:00:50 2000 Joerg Schilling - * fifo.c 1.23 - * cdrecord.c 1.109 - Printf-like Formats cleaned up - -Sat Nov 4 14:56:09 2000 Joerg Schilling - * scsi_cdr.c 1.98 - PIONEER CD-WO DR-R504X -> DEV_PIONEER_DW_S114X - -Sat Nov 4 14:52:43 2000 Joerg Schilling - * cdrecord.h 1.65 - DEFAULT_FIFOSIZE -> Long Constant - -Tue Oct 31 15:58:54 2000 Joerg Schilling - * cdrecord.c 1.108 - Cygwin-1.x Compatibility - -Sun Oct 22 13:37:15 2000 Joerg Schilling - * scsi-aix.c 1.31 - Type in sizeof(devname removed - -Tue Oct 17 10:35:34 2000 Joerg Schilling - * cdrecord.1 1.53 - SEE ALSO enhanced - -Fri Oct 13 11:28:51 2000 Joerg Schilling - * scsi-linux-sg.c 1.61 - use pg_version() only for PP - -Wed Sep 20 00:59:38 2000 Joerg Schilling - * modes.c 1.18 - Code reordered so DMA overrun messages only appears once - -Sun Sep 17 17:15:06 2000 Joerg Schilling - * cdrecord.h 1.64 - #define sample -> #define msample for Win32 - -Fri Sep 8 03:04:50 2000 Joerg Schilling - * modes.c 1.17 - Warning for Philips DMA overrun - -Wed Sep 6 23:41:34 2000 Joerg Schilling - * scsi_cdr.c 1.97 - unit_ready() made better - -Wed Sep 6 09:59:05 2000 Joerg Schilling - * scsitransp.c 1.71 - * scsitransp.h 1.44 - scg_cmderr() -> scg_cmd_err(), scg_cmd_status() new - -Tue Sep 5 03:32:34 2000 Joerg Schilling - * scsitransp.c 1.70 - Default printing to stderr - -Tue Sep 5 03:06:01 2000 Joerg Schilling - * scsitransp.c 1.69 - scg__open() returns -1 when SCGO_OPEN fails, to avoid calling scg_fileno() - -Tue Sep 5 02:30:41 2000 Joerg Schilling - * scsi_cdr.c 1.96 - allow_atapi() calls unit_ready() before mode_sense() to make it work past a reset - -Tue Sep 5 02:28:03 2000 Joerg Schilling - * modes.c 1.16 - Minimal transfer sizeof(struct scsi_mode_header) after DMA overrun - -Tue Sep 5 02:22:48 2000 Joerg Schilling - * drv_mmc.c 1.60 - read_toc()/read_disk_info() reads minimal 4 bytes for Philips ATAPI drives - -Mon Sep 4 20:24:52 2000 Joerg Schilling - * cdrecord.1 1.52 - Typo removed - -Sat Sep 2 21:16:00 2000 Joerg Schilling - * scsitransp.h 1.43 - Drive flags new in SCSI * - -Sat Sep 2 21:03:48 2000 Joerg Schilling - * scsi-wnt.c 1.26 - * scsi-vms.c 1.25 - * scsi-unixware.c 1.21 - * scsi-sgi.c 1.32 - * scsi-osf.c 1.22 - * scsi-os2.c 1.21 - * scsi-next.c 1.29 - * scsi-linux-sg.c 1.60 - * scsi-linux-pg.c 1.35 - * scsi-hpux.c 1.28 - * scsi-bsd.c 1.39 - * scsi-bsd-os.c 1.25 - * scsi-aix.c 1.30 - * scsi-beos.c 1.18 - All debug printing to stderr (scgp->errfile) - -Tue Aug 29 23:44:31 2000 Joerg Schilling - * scsi-next.c 1.28 - * scsi-bsd-os.c 1.24 - error codes & return harmonised - -Tue Aug 29 02:36:09 2000 Joerg Schilling - * drv_mmc.c 1.59 - set curspeed only if > 0 (SCSI-3 floating point exception in waitfix) - -Tue Aug 29 02:35:04 2000 Joerg Schilling - * scsi_scan.c 1.12 - call scg_settarget() in scanbus, to make sure SCSI address for scg_initator_id() is OK - -Sat Aug 26 10:20:43 2000 Joerg Schilling - * drv_mmc.c 1.58 - OPC Hack for strange drive that returns from OPC with "UNIT ATTENTION/operator selected write permit" - -Sat Aug 26 10:15:03 2000 Joerg Schilling - * cdrecord.c 1.107 - Enhancements for remote SCSI, scg_reset() with what Parameter - -Sat Aug 26 00:53:10 2000 Joerg Schilling - * scsihack.c 1.35 - * scsitransp.c 1.68 - scsibus/target/lun acess now only with scg_scsibus()/scsi_target()/scg_lun() and scg_settarget() - do not initialize target in struct scg_cmd because this is now done in SCG lowlevel code - scg__open() from scsihack.c -> scsitransp.c, scg_settarget() -> scgsettarget.c - dummy code it now always present - -Sat Aug 26 00:22:51 2000 Joerg Schilling - * scsitransp.h 1.42 - scg_settarget() -> scgsettarget.c - -Fri Aug 25 23:17:25 2000 Joerg Schilling - * scsi-wnt.c 1.25 - * scsi-vms.c 1.24 - * scsi-unixware.c 1.20 - * scsi-sgi.c 1.31 - * scsi-osf.c 1.21 - * scsi-os2.c 1.20 - * scsi-next.c 1.27 - * scsi-linux-sg.c 1.59 - * scsi-linux-pg.c 1.34 - * scsi-hpux.c 1.27 - * scsi-bsd.c 1.38 - * scsi-bsd-os.c 1.23 - * scsi-beos.c 1.17 - * scsi-aix.c 1.29 - scsibus/target/lun acess now only with scg_scsibus()/scsi_target()/scg_lun() and scg_settarget() - do not initialize target in struct scg_cmd because this is now done in SCG lowlevel code - -Thu Aug 24 00:52:32 2000 Joerg Schilling - * scsitransp.h 1.41 - scg Address Stucture new - scg__open() without bus/target/lun Parameter - scg_remote() new - -Wed Aug 23 22:44:26 2000 Joerg Schilling - * scsi_scan.c 1.11 - * scsilog.c 1.12 - * drv_dvd.c 1.49 - * drv_jvc.c 1.52 - * drv_philips.c 1.39 - * drv_sony.c 1.43 - * scsi_cdr.c 1.95 - scsibus/target/lun acess now only with scg_scsibus()/scsi_target()/scg_lun() and scg_settarget() - do not initialize target in struct scg_cmd because this is now done in SCG lowlevel code - -Sun Aug 20 20:57:32 2000 Joerg Schilling - * scsitransp.h 1.40 - * scsitransp.c 1.67 - * scsihack.c 1.34 - * scsi-linux-sg.c 1.58 - * scsi-linux-pg.c 1.33 - * scsi-sgi.c 1.30 - * scsi-next.c 1.26 - * scsi-hpux.c 1.26 - * scsi-bsd.c 1.37 - * scsi-aix.c 1.28 - * scsi_scan.c 1.10 - Now using scg_settarget() - -Sat Aug 19 23:24:03 2000 Joerg Schilling - * scsitransp.c 1.66 - * scsihack.c 1.33 - * scsi-wnt.c 1.24 - * scsi-vms.c 1.23 - * scsi-unixware.c 1.19 - * scsi-sgi.c 1.29 - * scsi-osf.c 1.20 - * scsi-os2.c 1.19 - * scsi-next.c 1.25 - * scsi-linux-sg.c 1.57 - * scsi-linux-pg.c 1.32 - * scsi-hpux.c 1.25 - * scsi-bsd.c 1.36 - * scsi-beos.c 1.16 - * scsi-bsd-os.c 1.22 - * scsi-aix.c 1.27 - * scsitransp.h 1.38 - scg_reset() with Function code Parameter - -Sat Aug 19 22:37:30 2000 Joerg Schilling - * cdrecord.h 1.63 - * scsitransp.h 1.39 - #ifdef's modified for new #define _SCG_*_H - -Sat Aug 19 21:57:31 2000 Joerg Schilling - * scsireg.h 1.23 - * scsidefs.h 1.22 - * scgio.h 2.15 - Correctly made multi include safe with #ifdef _SCG_* - -Sat Aug 19 21:05:25 2000 Joerg Schilling - * scsitransp.c 1.65 - sys/param.h removed - -Sat Aug 19 20:52:31 2000 Joerg Schilling - * scsitransp.h 1.37 - Now using scg_ops - Remote Version #defines, scg__version() removed - -Sat Aug 19 20:23:20 2000 Joerg Schilling - * scsi-sgi.c 1.28 - * scsi-osf.c 1.19 - * scsierrs.c 2.26 - * scsitransp.c 1.64 - * scsireg.h 1.22 - u_char -> Uchar - -Sat Aug 19 19:13:16 2000 Joerg Schilling - * scsitransp.c 1.63 - * scsihack.c 1.32 - scsitransp.c and scsihack.c separated - -Sat Aug 19 17:30:28 2000 Joerg Schilling - * scsireg.h 1.21 - Status & Sense Definitions from scsireg.h - -Fri Aug 18 10:40:48 2000 Joerg Schilling - * scsi-vms.c 1.22 - * scsi-wnt.c 1.23 - * scsi-unixware.c 1.18 - * scsi-sgi.c 1.27 - * scsi-osf.c 1.18 - * scsi-os2.c 1.18 - * scsi-next.c 1.24 - * scsi-linux-sg.c 1.56 - * scsi-linux-pg.c 1.31 - * scsi-hpux.c 1.24 - * scsi-bsd.c 1.35 - * scsi-bsd-os.c 1.21 - * scsi-beos.c 1.15 - * scsihack.c 1.31 - * scsi-aix.c 1.26 - * scsitransp.c 1.62 - Now uses scg_ops Structure and calling via pointers - -Thu Aug 17 22:50:53 2000 Joerg Schilling - * scsitransp.c 1.61 - Bracketing typo in scg_sprintresult() removed (printed junk) - -Wed Aug 16 10:11:08 2000 Joerg Schilling - * scsi-wnt.c 1.22 - * scsi-vms.c 1.21 - * scsi-unixware.c 1.17 - * scsi-sgi.c 1.26 - * scsi-os2.c 1.17 - * scsi-osf.c 1.17 - * scsi-next.c 1.23 - * scsi-linux-sg.c 1.55 - * scsi-hpux.c 1.23 - * scsi-linux-pg.c 1.30 - * scsi-bsd.c 1.34 - * scsi-beos.c 1.14 - * scsi-bsd-os.c 1.20 - * scsi-aix.c 1.25 - * scsihack.c 1.30 - * scsitransp.c 1.60 - scg_send() now only with scgp* Parameter - -Sun Aug 13 23:31:37 2000 Joerg Schilling - * scsitransp.c 1.59 - Buggy braketing corrected (printed 4-5 null Bytes to error output even in silent mode) - -Fri Aug 4 01:26:24 2000 Joerg Schilling - * scsitransp.h 1.36 - * scsitransp.c 1.58 - Komplett umgebaut damit die Fehlerausgabe in einen String erfolgt - -Tue Aug 1 00:03:45 2000 Joerg Schilling - * scsitransp.h 1.35 - * scsitransp.c 1.57 - * scsierrs.c 2.25 - * scsi-wnt.c 1.21 - * scsi-vms.c 1.20 - * scsi-unixware.c 1.16 - * scsi-sgi.c 1.25 - * scsi-osf.c 1.16 - * scsi-os2.c 1.16 - * scsi-next.c 1.22 - * scsi-linux-sg.c 1.54 - * scsi-linux-pg.c 1.29 - * scsi-hpux.c 1.22 - * scsi-bsd.c 1.33 - * scsi-bsd-os.c 1.19 - * scsi-beos.c 1.13 - * scsi-aix.c 1.24 - All printf()'s -> js_printf(), sprintf() -> snprintf() - -Sun Jul 30 15:15:34 2000 Joerg Schilling - * scsitransp.c 1.56 - * scsitransp.h 1.34 - scg_prbytes()/scg_prsense() & scg_printdev() INterface restructured - -Sun Jul 30 13:52:05 2000 Joerg Schilling - * wm_packet.c 1.13 - * scsi_scan.c 1.9 - * scsilog.c 1.11 - * cdrecord.c 1.106 - * scsi_cdr.c 1.94 - * modes.c 1.15 - * drv_sony.c 1.42 - * drv_simul.c 1.16 - * drv_philips.c 1.38 - * drv_mmc.c 1.57 - * drv_jvc.c 1.51 - * drv_dvd.c 1.48 - Restructured for new libscg with scg_*() - -Thu Jul 27 01:17:47 2000 Joerg Schilling - * scsitransp.c 1.55 - scg_prbytes()/scg_printdev() now using FILE * Parameter - scg__errmsg() restructured to be similar to snprintf() - -Thu Jul 27 01:15:54 2000 Joerg Schilling - * scsierrs.c 2.24 - Made similar to snprintf() - -Thu Jul 27 01:15:02 2000 Joerg Schilling - * scsitransp.h 1.33 - scg_prbytes()/scg_printdev() now using FILE * Parameter - scg__errmsg() restructured to be similar to snprintf() - -Sun Jul 23 18:01:12 2000 Joerg Schilling - * scsierrs.c 2.23 - * scsihack.c 1.29 - * scsitransp.c 1.54 - * scsi-wnt.c 1.20 - * scsi-vms.c 1.19 - * scsi-unixware.c 1.15 - * scsi-osf.c 1.15 - * scsi-sgi.c 1.24 - * scsi-os2.c 1.15 - * scsi-next.c 1.21 - * scsi-linux-sg.c 1.53 - * scsi-linux-pg.c 1.28 - * scsi-hpux.c 1.21 - * scsi-bsd.c 1.32 - * scsi-beos.c 1.12 - * scsi-bsd-os.c 1.18 - * scsi-aix.c 1.23 - * scsitransp.h 1.32 - restructured to use scg_ basieed Function names - -Sun Jul 23 00:28:09 2000 Joerg Schilling - * scsitransp.h 1.31 - open_scsi()/close_scsi()/... -> scg_open()/scg_close/... - -Thu Jul 20 20:12:42 2000 Joerg Schilling - * cdrecord.1 1.51 - Note for Volmgt & Solaris/USCSI - -*************** Release 1.9 ******************* - -Thu Jul 20 19:49:20 2000 joerg - * diskid.c 1.28 - New Manufacturer: "Grand Advance Technology LTD." - -Thu Jul 20 19:12:01 2000 Joerg Schilling - * cdrecord.c 1.105 - Version -> 1.9 - 99 Minute check better - -Mon Jul 3 01:19:21 2000 Joerg Schilling - * scsi-linux-sg.c 1.52 - Type fixed in !scglocal(scgp)->drvers < 0 - -Mon Jul 3 00:11:20 2000 Joerg Schilling - * scsi_cdr.c 1.93 - * drv_sony.c 1.41 - * drv_dvd.c 1.47 - * drv_mmc.c 1.56 - * cdrecord.h 1.62 - * cd_misc.c 1.8 - msf_to_lba() with force_positive Flag for 99 Minute CD's - -Sun Jul 2 23:22:00 2000 Joerg Schilling - * scsi-linux-sg.c 1.51 - scsi_raisedma() only for Kernel-2.2.10 and newer - -Sat Jul 1 13:40:49 2000 Joerg Schilling - * scsi-linux-sg.c 1.50 - New allocated copy buffer in SCSI * -> local for raisedma - -Sat Jul 1 13:22:49 2000 Joerg Schilling - * scsitransp.c 1.53 - * scsi-wnt.c 1.19 - * scsi-vms.c 1.18 - * scsi-unixware.c 1.14 - * scsi-sgi.c 1.23 - * scsi-osf.c 1.14 - * scsi-os2.c 1.14 - * scsi-next.c 1.20 - * scsi-linux-sg.c 1.49 - * scsi-linux-pg.c 1.27 - * scsi-hpux.c 1.20 - * scsi-bsd.c 1.31 - * scsi-bsd-os.c 1.17 - * scsi-beos.c 1.11 - * scsi-aix.c 1.22 - maxdma/maxbuf new in SCSI * - scsi_getbuf() now calls scsi_bufsize() to init new members - -Sat Jul 1 13:09:43 2000 Joerg Schilling - * scsitransp.h 1.30 - maxdma/maxbuf new in SCSI * - -Fri Jun 30 18:43:43 2000 Joerg Schilling - * scsi-linux-sg.c 1.48 - scsi_raisedma() now called with correct DMA Buffersize - -Fri Jun 30 18:38:48 2000 Joerg Schilling - * scsitransp.c 1.52 - * scsihack.c 1.28 - * scsi-wnt.c 1.18 - * scsi-vms.c 1.17 - * scsi-unixware.c 1.13 - * scsi-sgi.c 1.22 - * scsi-sco.c 1.14 - * scsi-osf.c 1.13 - * scsi-os2.c 1.13 - * scsi-next.c 1.19 - * scsi-linux-sg.c 1.47 - * scsi-hpux.c 1.19 - * scsi-linux-pg.c 1.26 - * scsi-bsd.c 1.30 - * scsi-beos.c 1.10 - * scsi-bsd-os.c 1.16 - * scsi-aix.c 1.21 - scsi_maxdma() now with 2nd Parameter "amt" for Linux sg driver - -Tue Jun 27 19:29:05 2000 Joerg Schilling - * drv_mmc.c 1.55 - Disk Subtype decoder for High Speed RW - -Tue Jun 27 19:19:51 2000 Joerg Schilling - * cdrecord.c 1.104 - Support for 99 Minute CD's - -Tue Jun 27 19:17:16 2000 Joerg Schilling - * diskid.c 1.27 - 99 Minute media in table - -Mon Jun 26 22:40:39 2000 Joerg Schilling - * diskid.c 1.26 - Bestdisc Technology Corporation new - -Mon Jun 26 22:29:17 2000 Joerg Schilling - * scsi-bsd.c 1.29 - * scsi-bsd-os.c 1.15 - * scsi-sgi.c 1.21 - * scsi-linux-sg.c 1.46 - * scsi-linux-pg.c 1.25 - * scsi-next.c 1.18 - better error messages into scgp->errstr - -Fri Jun 23 23:52:39 2000 Joerg Schilling - * scsi-linux-sg.c 1.45 - pvers && isold -> scglocal - -Fri Jun 23 23:23:33 2000 Joerg Schilling - * scsi-linux-sg.c 1.44 - Variable pvers only conditional for unused... warning - -Fri Jun 23 23:19:00 2000 Joerg Schilling - * scsi-linux-sg.c 1.43 - Support for SG_IO ioctl() - -Fri Jun 23 21:40:38 2000 Joerg Schilling - * scsitransp.h 1.29 - overbose new - -Thu Jun 22 15:20:18 2000 Joerg Schilling - * scsi-linux-sg.c 1.42 - SG_SCSI_RESET & SG_SET_RESERVED_SIZE new - -Wed Jun 21 10:34:52 2000 Joerg Schilling - * scsi-linux-pg.c 1.24 - Test with ATAPI SCSI status code - -Wed Jun 21 10:33:31 2000 Joerg Schilling - * scsitransp.c 1.51 - scsitransp.c split into scsitransp.c & scsi-sun.c - -Wed Jun 21 10:27:11 2000 Joerg Schilling - * scsihack.c 1.27 - scsi-sun.c new - -Tue Jun 20 07:20:40 2000 Joerg Schilling - * scsitransp.h 1.28 - secured _SCGIO_H -> _SCG_SCSISENSE_H - -Tue Jun 20 06:09:57 2000 Joerg Schilling - * scsi-bsd.c 1.28 - ATAPI Support for OpenBSD - -Sun Jun 4 00:55:02 2000 Joerg Schilling - * cdrecord.c 1.103 - #include for select() (autoconf Test for AIX), version -> 1.9a02 - -Sat Jun 3 17:31:06 2000 Joerg Schilling - * cdrecord.c 1.102 - New Option -shorttrack/-noshorttrack - -Fri Jun 2 22:37:51 2000 Joerg Schilling - * cdrecord.h 1.61 - New Flag TI_SHORT_TRACK & is_shorttrk() macro - -Fri Jun 2 22:32:59 2000 Joerg Schilling - * cdrecord.1 1.50 - New Optionen -shorttrack & -noshorttrack - -Fri Jun 2 21:44:43 2000 Joerg Schilling - * defaults.c 1.5 - Prevent a buffer overrrun with dev= option - -Fri Jun 2 21:43:16 2000 Joerg Schilling - * auinfo.c 1.5 - Check for buffer ovverun - -Fri Jun 2 00:03:13 2000 Joerg Schilling - * drv_mmc.c 1.54 - Set Pregapsize to 1 if the drive does not support 0 - free(cue) if cuep == NULL - -Tue May 30 02:46:22 2000 Joerg Schilling - * diskid.c 1.25 - Restructured - -Tue May 30 01:06:32 2000 Joerg Schilling - * diskid.c 1.24 - New manufacturers: "WEALTH FAIR INVESTMENT LIMITE", "General Magnetics Ld", "MPO" - -Tue May 30 00:59:12 2000 Joerg Schilling - * scsitransp.h 1.27 - debug Parameter -> odebug - -Mon May 29 19:07:56 2000 Joerg Schilling - * scsi-next.c 1.17 - Typo corrected max_scsibus -> scglocal(scgp)->max_scsibus - -Mon May 29 00:31:18 2000 Joerg Schilling - * scsireg.h 1.20 - Mode page 2A pw_in_lead_in & side_change new - -Mon May 29 00:13:25 2000 Joerg Schilling - * scsi_cdr.c 1.92 - More Page 2A bits for cdrecord -prcap - -Sun May 28 18:52:11 2000 Joerg Schilling - * scsi-vms.c 1.16 - scsi_close() now works - -Sun May 28 18:40:55 2000 Joerg Schilling - * cdrecord.1 1.49 - -fix hint for CDR-50 & CDR-55 specified - -Sun May 7 16:52:20 2000 Joerg Schilling - * scsi_cdr.c 1.91 - * scsilog.c 1.10 - * scsi_scan.c 1.8 - * auinfo.c 1.4 - * cd_misc.c 1.7 - * audiosize.c 1.14 - * cdr_drv.c 1.20 - * fifo.c 1.22 - * defaults.c 1.4 - * wm_packet.c 1.12 - * modes.c 1.14 - * cdrecord.c 1.101 - * drv_sony.c 1.40 - * drv_simul.c 1.15 - * drv_philips.c 1.37 - * drv_mmc.c 1.53 - * drv_jvc.c 1.50 - * drv_dvd.c 1.46 - * scsierrs.c 2.22 - * scsitransp.c 1.50 - #include - -Sun May 7 16:46:39 2000 Joerg Schilling - * scsi_cdr.c 1.90 - New DVD recognition, to allow Ricoh 9060 - -Sun May 7 16:11:09 2000 Joerg Schilling - * scsihack.c 1.26 - Support for new Mac OS X - -Mon May 1 20:06:37 2000 Joerg Schilling - * scsitransp.c 1.49 - scsi_maxmdma() cleaned up - -Thu Apr 27 15:06:42 2000 Joerg Schilling - * cdrecord.1 1.48 - Examples for cdda2wav - -Thu Apr 27 14:22:19 2000 Joerg Schilling - * drv_mmc.c 1.52 - No more error message forSony & long write in progress when Fixating - -Thu Apr 27 14:17:01 2000 Joerg Schilling - * diskid.c 1.23 - Better message for illegal ID (CD-RW) - all old CD-R's now print ILLEGAL OLD CODE - -Wed Apr 26 11:50:19 2000 Joerg Schilling - * cdrecord.c 1.100 - * cdrecord.h 1.60 - * scsi_cdr.c 1.89 - * drv_jvc.c 1.49 - * drv_dvd.c 1.45 - scsi_close_tr_session()/scsi_blank() with immed Parameter - -*************** Release 1.8.1 ******************* - -Thu Apr 27 14:22:19 2000 Joerg Schilling - * drv_mmc.c 1.52 - No error message for Sony & long write in progress while fixating - -Thu Apr 27 14:17:01 2000 Joerg Schilling - * diskid.c 1.23 - Better printout with illegal ID for CD-RW, all old CD-R's now give ILLEGAL OLD CODE - -Wed Apr 26 11:50:19 2000 Joerg Schilling - * cdrecord.c 1.100 - * cdrecord.h 1.60 - * scsi_cdr.c 1.89 - * drv_jvc.c 1.49 - * drv_dvd.c 1.45 - scsi_close_tr_session()/scsi_blank() with immed Parameter - -Mon Apr 24 12:32:14 2000 Joerg Schilling - * cdrecord.c 1.99 - Version -> 1.8.1 final, exitcode == 0 only if fixating in Dummy Mode fails - -Sat Apr 22 15:37:05 2000 Joerg Schilling - * diskid.c 1.22 - New manufacturer "VICTOR COMPANY OF JAPAN, LIMITED", "VIVASTAR AG" - -Sun Apr 16 17:07:55 2000 Joerg Schilling - * cdrecord.1 1.47 - BURN-Proof Option for Sanyo - -Sun Apr 16 17:07:11 2000 Joerg Schilling - * drv_mmc.c 1.51 - BURN-Proof Support for Sanyo - -Sun Apr 16 17:06:30 2000 Joerg Schilling - * cdrecord.c 1.98 - New Option driveropts= - better -dao usage - -Sun Apr 16 03:11:26 2000 Joerg Schilling - * scsi_cdr.c 1.88 - display BURN-Proof for cdrecord -prcap - -Sun Apr 16 03:08:58 2000 Joerg Schilling - * defaults.c 1.3 - * cdrecord.dfl 1.2 - driveropts new - -Sun Apr 16 02:16:29 2000 Joerg Schilling - * drv_sony.c 1.39 - * cdrecord.h 1.59 - * drv_simul.c 1.14 - * drv_philips.c 1.36 - * drv_jvc.c 1.48 - * drv_dvd.c 1.44 - open_session() now with cdr_t * Parameter for BURN-Proof - -Mon Apr 3 21:05:37 2000 Joerg Schilling - * scsi-linux-pg.c 1.23 - #include for strlen() - -Sat Apr 1 21:59:19 2000 Joerg Schilling - * diskid.c 1.21 - New manufaturer: "TAROKO INTERNATIONAL CO.,LTD.", "UNIDISC TECHNOLOGY CO.,LTD", "Hong Kong Digital Technology Co., Ltd.", "VIVA MAGNETICS LIMITED" - -Sat Mar 11 12:31:09 2000 Joerg Schilling - * scsi_cdr.c 1.87 - Sanyo CRD-R24S -> Philips CDD 521 - -Sat Mar 11 12:30:06 2000 Joerg Schilling - * drv_mmc.c 1.50 - send_opc_mmc() now calls send_opc() and suppresses ILLEGAL_REQUEST - -Sat Mar 11 12:26:37 2000 Joerg Schilling - * cdrecord.1 1.46 - WeB address changed - -Sun Feb 20 21:54:33 2000 Joerg Schilling - * cdrecord.h 1.58 - * cdrecord.c 1.97 - * cdrecord.1 1.45 - New Option -waiti for multi session from Pipe from mkisofs - -Sun Feb 20 20:56:09 2000 Joerg Schilling - * cdrecord.c 1.96 - scsi_in_progress() Test and usleep(100000) if Long Write in Progress - -Sun Feb 20 20:54:06 2000 Joerg Schilling - * drv_mmc.c 1.49 - scsi_in_progress() test for scsi_flush_cache() in fixate, send_cue() -> LOCAL - -Sun Feb 20 20:52:49 2000 Joerg Schilling - * cdrecord.h 1.57 - scsi_in_progress() new, send_cue() removed - -Sun Feb 20 20:52:15 2000 Joerg Schilling - * scsi_cdr.c 1.86 - scsi_in_progress() new - -Sat Feb 19 00:38:35 2000 Joerg Schilling - * cdrecord.c 1.95 - read Sectorsize from read_capacity too, for drivs without Blockdescriptor, dp->cdr_opc() new - -Sat Feb 19 00:33:54 2000 Joerg Schilling - * scsi_cdr.c 1.85 - send_opc() new - -Sat Feb 19 00:24:37 2000 Joerg Schilling - * cdrecord.h 1.56 - * drv_sony.c 1.38 - * drv_simul.c 1.13 - * drv_philips.c 1.35 - * drv_mmc.c 1.48 - * drv_jvc.c 1.47 - * drv_dvd.c 1.43 - Separate OPC code in driver interface - -Sun Feb 6 08:27:21 2000 Joerg Schilling - * scsi-sgi.c 1.20 - * scsi-openserver.c 1.17 - * scsi-linux-sg.c 1.41 - * scsi-aix.c 1.20 - * scsi-bsd-os.c 1.14 - * scsi-hpux.c 1.18 - * scsi-linux-pg.c 1.22 - * scsi-bsd.c 1.27 - added missing brackets in scsi_close() to make sure that scsi_close() really closes files - -Sun Feb 6 08:25:14 2000 Joerg Schilling - * scsi-linux-sg.c 1.40 - Maxdma now is correcteven if only a prallel port is present - -*************** Release 1.8 ******************* - -Fri Jan 28 10:01:48 2000 Joerg Schilling - * drv_mmc.c 1.47 - * drv_dvd.c 1.42 - load_media() with new doexit Parameter - Reload now does not make problems with notebook type drives - -Fri Jan 28 09:51:26 2000 Joerg Schilling - * drv_philips.c 1.34 - * cdrecord.h 1.55 - * cdrecord.c 1.94 - load_media() with new doexit Parameter - -Fri Jan 28 09:50:51 2000 Joerg Schilling - * scsi_cdr.c 1.84 - wait_unit_ready() does not print error message if scgp->silent >= 1 - -Wed Jan 26 11:48:08 2000 Joerg Schilling - * scsi_scan.c 1.7 - Initiator-ID test past havebus() - -Sun Jan 23 16:39:01 2000 Joerg Schilling - * cdrecord.c 1.93 - Better error message for open_scsi() - -Sun Jan 23 16:07:46 2000 Joerg Schilling - * scsi-unixware.c 1.9 - New code from SCO, -scanbus now works - -Sun Jan 23 00:44:28 2000 Joerg Schilling - * scsihack.c 1.25 - scsi-sco.c -> scsi-openserver.c - -Tue Jan 18 00:02:33 2000 Joerg Schilling - * cdrecord.c 1.92 - Version -> 1.8, mlockall()/setpri() problems do not cause abort - Note to -pad option for audio Files with wrong length - #include for SCO Openserver - -Thu Jan 13 01:32:35 2000 Joerg Schilling - * diskid.c 1.20 - Problems with m_digitalstor (97:27/01) in table docuented - -Thu Jan 13 01:11:45 2000 Joerg Schilling - * defaults.c 1.2 - CDR_DEVICE now superseedes /etc/default/cdrecord - -Tue Jan 11 01:46:47 2000 Joerg Schilling - * scsi-hpux.c 1.17 - sprintf(.../dev/rscsi...) now uses hex digits for tgt 0..15 - -Sat Jan 8 23:42:25 2000 Joerg Schilling - * scsi_cdr.c 1.83 - scsi_read() now looks for is_atapi to allow mkisofs & ATAPI to do multi-session - -Fri Jan 7 02:24:28 2000 Joerg Schilling - * scsihack.c 1.24 - Dummyfunctions fuor new Interface - -Fri Jan 7 02:22:36 2000 Joerg Schilling - * cdr_drv.c 1.19 - set_cdrcmds() now calls return() past exit() for lint's sake - -Wed Dec 29 14:01:03 1999 Joerg Schilling - * cdrecord.c 1.91 - exargs Strukt new - Setting to 2048 bytes/sector earlier for -msinfo - new function exscsi() - exfifo() -> excdr() - -Wed Dec 29 02:14:11 1999 Joerg Schilling - * cdrecord.h 1.54 - * fifo.c 1.21 - wait_faio() new - -Wed Dec 29 00:38:52 1999 Joerg Schilling - * diskid.c 1.19 - New manufacturer: "Hile Optical Disc Technology Corp." - "Friendly CD-Tek Co." - "Sound Sound Multi-Media Development Limited" - "kdg mediatech AG" - -Wed Dec 29 00:34:39 1999 Joerg Schilling - * cdrecord.1 1.44 - better dociumentation for SUID Installation - -Fri Dec 24 01:59:35 1999 Joerg Schilling - * fifo.c 1.20 - sp null pointer Problem in fifo_stats() fixed - input-buffer -> input buffer - -Tue Dec 7 01:07:24 1999 Joerg Schilling - * cdrecord.1 1.43 - added missing .TP - -Sun Dec 5 13:37:16 1999 Joerg Schilling - * fifo.c 1.19 - kill_fifo() now kil only if faio_pid > 0 - -Sat Dec 4 21:36:38 1999 Joerg Schilling - * diskid.c 1.18 - New manufacturer: EXIMPO & Seantram Technology Inc. - Seantram has been guessed before - -Sat Dec 4 14:15:16 1999 Joerg Schilling - * cdrecord.c 1.90 - intfifo()/exfifo() new - kill FIFO on comerr() and signals - -Sat Dec 4 14:12:41 1999 Joerg Schilling - * drv_dvd.c 1.41 - isgui as with drv_mmc.c added - -Tue Nov 30 14:48:12 1999 Joerg Schilling - * scsihack.c 1.23 - * scsi-linux-pg.c 1.21 - pg.h now locally available - -Sat Nov 27 21:38:54 1999 Joerg Schilling - * scsi-os2.c 1.12 - SRB in scsi_send() and scsi_reset() -> static to prevent core dump - -Sat Nov 20 17:49:38 1999 Joerg Schilling - * scsi-os2.c 1.11 - scgfiles array removed - set_error() new - added some ux_errno = EIO - wait_post() now calls DosResetEventSem() in any case - -Sat Nov 20 14:21:09 1999 Joerg Schilling - * scsi-os2.c 1.10 - DEBUG2/SCANDEBUG code removed - -Sat Nov 20 07:23:59 1999 Joerg Schilling - * diskid.c 1.17 - New manufacturer: Customer Pressing Oosterhout - Harmonic Hall Optical Disc Ltd. - DELPHI TECHNOLOGY INC. - -Sat Nov 20 06:45:18 1999 Joerg Schilling - * cdrecord.c 1.89 - Version -> 1.8a32 - 5 missing set_secsize(.. oldsize) added - -Sat Nov 20 06:44:02 1999 Joerg Schilling - * cdr_drv.c 1.18 - Kodak PDC-600 in driver recognition - -Sat Nov 20 06:43:12 1999 Joerg Schilling - * drv_mmc.c 1.46 - next_wr_addr() in driver struct for CD-ROM -> cmd_ill() - -Sat Nov 20 06:41:39 1999 Joerg Schilling - * fifo.c 1.18 - fixed typo for HAVE_DOSALLOCSHAREDMEM - -Fri Nov 12 10:00:19 1999 Joerg Schilling - * scsitransp.c 1.48 - scsi_yes() now global - -Fri Nov 12 09:59:49 1999 Joerg Schilling - * scsitransp.h 1.26 - scsi_yes() new - -Mon Oct 18 02:38:11 1999 Joerg Schilling - * cdrecord.c 1.88 - always set TAO mode on startup to make checkdsize() working - -Mon Oct 18 01:34:34 1999 Joerg Schilling - * scsilog.c 1.9 - * scsi_cdr.c 1.82 - i_to_short() -> i_to_2_byte() - -Mon Oct 18 01:15:21 1999 Joerg Schilling - * scsilog.c 1.8 - * scsi_cdr.c 1.81 - * drv_dvd.c 1.40 - * drv_mmc.c 1.45 - * drv_philips.c 1.33 - * iso9660.h 1.4 - a_to_u_short() -> a_to_u_2_byte() - -Mon Oct 18 01:04:17 1999 Joerg Schilling - * isosize.c 1.6 - utypes.h wegen intcvt.h - -Mon Oct 18 00:38:01 1999 Joerg Schilling - * scsi_cdr.c 1.80 - * drv_sony.c 1.37 - * drv_jvc.c 1.46 - * drv_dvd.c 1.39 - a_to_3_byte() -> a_to_u_3_byte() - -Mon Oct 18 00:10:18 1999 Joerg Schilling - * drv_dvd.c 1.38 - * drv_sony.c 1.36 - * drv_jvc.c 1.45 - * drv_philips.c 1.32 - i_to_long() -> i_to_4_byte() - -Mon Oct 18 00:04:43 1999 Joerg Schilling - * scsi_cdr.c 1.79 - * isosize.c 1.5 - * drv_dvd.c 1.37 - * drv_mmc.c 1.44 - * drv_jvc.c 1.44 - * drv_sony.c 1.35 - * drv_philips.c 1.31 - * audiosize.c 1.13 - * cdrecord.c 1.87 - modified to use intcvt.h and a_to_4_byte() - -Sun Oct 17 23:21:40 1999 Joerg Schilling - * iso9660.h 1.3 - removed i_to_* and a_to_* macros -> intcvt.h - -Sun Oct 17 22:51:51 1999 Joerg Schilling - * scsireg.h 1.19 - struct scsi_capacity modified to use Int32_t - -Sat Oct 16 13:52:29 1999 Joerg Schilling - * scsi_cdr.c 1.78 - * drv_mmc.c 1.43 - * auinfo.c 1.3 - * drv_sony.c 1.34 - malloc() casts for K&R C - -Fri Oct 15 20:28:25 1999 Joerg Schilling - * cdrecord.h 1.53 - * cdr_drv.c 1.17 - * cdrecord.c 1.86 - set_cdrmds() if 2. Parameter is NULL returns BOOL - for cdrecord to check for dvd driver or not - -Fri Oct 15 20:19:36 1999 Joerg Schilling - * scsi_cdr.c 1.77 - Optima Dis Covery 650 CD-R Inquiry recognition new - -Fri Oct 15 20:17:17 1999 Joerg Schilling - * scsi-beos.c 1.9 - * scsi-osf.c 1.12 - typos removed - -Thu Oct 7 15:33:17 1999 Joerg Schilling - * scsi-bsd-os.c 1.13 - * scsi-aix.c 1.19 - mising bracket in scsi_open() fixed - -Fri Sep 17 17:59:18 1999 Joerg Schilling - * cdrecord.c 1.85 - Version -> 1.8a29 - libscg version check - #incude for win32 realtime pri Code - -Fri Sep 17 17:56:57 1999 Joerg Schilling - * scsi_cdr.c 1.76 - endless lookp in mmc_cap() removed: no medium (wait_unit_ready()) - -Fri Sep 17 15:48:09 1999 Joerg Schilling - * scsitransp.c 1.47 - HAVE_SCG #define earlier - -Fri Sep 17 15:42:39 1999 Joerg Schilling - * scsi-linux-pg.c 1.20 - duplicates with scsi-linux-sg.c fuer scg__version() removed - -Fri Sep 17 15:36:55 1999 Joerg Schilling - * scsitransp.c 1.46 - #ifdef HAVE_SCG for _scg_trans_version[] - -Fri Sep 17 15:09:54 1999 Joerg Schilling - * scsi-wnt.c 1.17 - * scsi-vms.c 1.15 - * scsi-unixware.c 1.8 - * scsi-sgi.c 1.19 - * scsi-osf.c 1.11 - * scsi-sco.c 1.13 - * scsi-os2.c 1.9 - * scsi-next.c 1.16 - * scsi-linux-sg.c 1.39 - * scsi-linux-pg.c 1.19 - * scsi-hpux.c 1.16 - * scsi-bsd.c 1.26 - * scsi-bsd-os.c 1.12 - * scsi-beos.c 1.8 - * scsi-aix.c 1.18 - * scsitransp.c 1.45 - * scsitransp.h 1.25 - scg_version() new - -Fri Sep 17 14:55:17 1999 Joerg Schilling - * scsihack.c 1.22 - Comment changed - -Tue Sep 14 10:57:29 1999 Joerg Schilling - * scsi-linux-sg.c 1.38 - scgfile variable in max_dma corrected from scgfile -> scglocal(scgp)->scgfile - -Fri Sep 10 14:06:19 1999 Joerg Schilling - * diskid.c 1.16 - Better text for Disk Typ (e.g. Long strategy type) - -Thu Sep 9 12:30:38 1999 Joerg Schilling - * auinfo.c 1.2 - isrc_illchar() Prorotype new - -Wed Sep 8 17:57:45 1999 Joerg Schilling - * diskid.c 1.15 - New manufacturer: Guann Yinn Co. Ltd. - Opti.Me.S. S.p.A. - Nacar Media srl - -Wed Sep 8 12:45:37 1999 Joerg Schilling - * scsi-wnt.c 1.16 - missing bracket at malloc(amt) - -Tue Sep 7 17:13:09 1999 Joerg Schilling - * scsi-wnt.c 1.15 - * scsi-unixware.c 1.7 - * scsi-vms.c 1.14 - * scsi-sgi.c 1.18 - * scsi-sco.c 1.12 - * scsi-osf.c 1.10 - * scsi-next.c 1.15 - * scsi-os2.c 1.8 - * scsi-linux-sg.c 1.37 - * scsi-linux-pg.c 1.18 - * scsi-hpux.c 1.15 - * scsi-bsd.c 1.25 - * scsi-beos.c 1.7 - * scsi-bsd-os.c 1.11 - * scsi-aix.c 1.17 - * scsitransp.c 1.44 - First error messages past scgp->errstr - less calls to comerr() - -Tue Sep 7 17:07:55 1999 Joerg Schilling - * scsitransp.h 1.24 - errstr & errptr new in SCSI * - open_scsi() with errs Parameter - -Tue Sep 7 16:47:21 1999 Joerg Schilling - * cdrecord.c 1.84 - Now using new open_scsi() - added some calls to flush() - -Tue Sep 7 16:46:04 1999 Joerg Schilling - * cdrecord.1 1.42 - 1.6 -> 1.8 - -Tue Sep 7 00:21:08 1999 Joerg Schilling - * drv_mmc.c 1.42 - * drv_jvc.c 1.43 - * drv_dvd.c 1.36 - flush() for Blanking new - -Fri Sep 3 11:57:35 1999 Joerg Schilling - * scsi-linux-sg.c 1.36 - * scsi-linux-pg.c 1.17 - scsi_initiator_id() in scsi-linux-pg.c -> pg_initiator_id() - -Thu Sep 2 18:57:59 1999 Joerg Schilling - * cdrecord.c 1.83 - 1.8a24 -> 1.8a26 - Ricoh DAO Bug (fwa != -150) workaround - Realtimepri for Win32 - -Thu Sep 2 14:42:14 1999 Joerg Schilling - * scsi_scan.c 1.6 - scsi_initiator_id() new - Now prints bus,tgt,lun before selektor - -Thu Sep 2 13:32:57 1999 Joerg Schilling - * scsitransp.h 1.23 - * scsi-wnt.c 1.14 - * scsi-vms.c 1.13 - * scsi-unixware.c 1.6 - * scsi-sco.c 1.11 - * scsi-sgi.c 1.17 - * scsi-osf.c 1.9 - * scsi-os2.c 1.7 - * scsi-next.c 1.14 - * scsi-linux-sg.c 1.35 - * scsi-hpux.c 1.14 - * scsi-linux-pg.c 1.16 - * scsi-bsd.c 1.24 - * scsi-bsd-os.c 1.10 - * scsi-aix.c 1.16 - * scsi-beos.c 1.6 - * scsitransp.c 1.43 - scsi_initiator_id() new - -Mon Aug 30 13:36:17 1999 Joerg Schilling - * scsitransp.c 1.42 - * drv_simul.c 1.12 - * fifo.c 1.17 - #include libport.h new - -Sun Aug 29 01:42:10 1999 Joerg Schilling - * fifo.c 1.16 - shared memory for OS/2 - -Sun Aug 29 00:52:56 1999 Joerg Schilling - * fifo.c 1.15 - Typo fixed (\f instead of \n) - -Tue Aug 10 21:34:03 1999 Joerg Schilling - * scsitransp.c 1.41 - * scsi-wnt.c 1.13 - * scsi-vms.c 1.12 - * scsi-unixware.c 1.5 - * scsi-sco.c 1.10 - * scsi-sgi.c 1.16 - * scsi-osf.c 1.8 - * scsi-os2.c 1.6 - * scsi-next.c 1.13 - * scsi-linux-sg.c 1.34 - * scsi-linux-pg.c 1.15 - * scsi-hpux.c 1.13 - * scsi-bsd.c 1.23 - * scsi-bsd-os.c 1.9 - * scsi-beos.c 1.5 - * scsi-aix.c 1.15 - Static locale variable removed - Test for openbydev - scsi_freebuf() new - -Mon Aug 9 00:39:37 1999 Joerg Schilling - * scsitransp.h 1.22 - SCSI *->bufbase & scsi_freebuf() new - -Sat Aug 7 22:24:46 1999 Joerg Schilling - * scsitransp.h 1.21 - running/curcmdname/local new in SCSI * - -Sat Aug 7 22:22:36 1999 Joerg Schilling - * scsitransp.c 1.40 - * scsi-wnt.c 1.12 - * scsi-vms.c 1.11 - * scsi-unixware.c 1.4 - * scsi-sgi.c 1.15 - * scsi-sco.c 1.9 - * scsi-osf.c 1.7 - * scsi-os2.c 1.5 - * scsi-next.c 1.12 - * scsi-linux-sg.c 1.33 - * scsi-linux-pg.c 1.14 - * scsi-hpux.c 1.12 - * scsi-bsd.c 1.22 - * scsi-bsd-os.c 1.8 - * scsi-beos.c 1.4 - * scsi-aix.c 1.14 - scg_maxdma removed - scsi_running/scsi_command -> SCSI * struct - -Sat Aug 7 21:05:51 1999 Joerg Schilling - * scsi-vms.c 1.10 - scsi_close() new - -Sun Aug 1 22:08:46 1999 Joerg Schilling - * fifo.c 1.14 - WRITER_MAXWAIT & READER_MAXWAIT -> 240s for SAO SCSI Timeout - usleep() debug code - -Sun Aug 1 17:14:54 1999 Joerg Schilling - * cdrecord.1 1.41 - Better documentation for -multi Option (DAO mode) - -Sun Aug 1 17:05:30 1999 Joerg Schilling - * cdrecord.c 1.82 - -msinfo now works even if drive is in DAO mode - Now corrects trackstart values for second session in DAO Mode - -Sun Aug 1 16:51:35 1999 Joerg Schilling - * drv_sony.c 1.33 - * drv_simul.c 1.11 - * drv_philips.c 1.30 - * drv_mmc.c 1.41 - * drv_jvc.c 1.42 - * drv_dvd.c 1.35 - speedp == 0 allowed if speed should remain as is - -Sun Aug 1 16:10:40 1999 Joerg Schilling - * drv_sony.c 1.32 - * drv_simul.c 1.10 - * drv_mmc.c 1.40 - * drv_jvc.c 1.41 - * drv_dvd.c 1.34 - recovery_needed()/recover()/reserve_track() References to Philips driver removed - -Sun Aug 1 16:02:03 1999 Joerg Schilling - * drv_philips.c 1.29 - * scsi_cdr.c 1.75 - * cdr_drv.c 1.16 - * cdrecord.h 1.52 - Several functions scsi_cdr.c -> drv_philips.c - new function cmd_ill() - -Sun Aug 1 13:25:42 1999 Joerg Schilling - * drv_dvd.c 1.33 - phys_end in dvd_structure_00 may be 0 for empty session - -Sun Jul 25 13:52:02 1999 Joerg Schilling - * scsitransp.c 1.39 - scsi_close() new - __scgp removed - -Sun Jul 25 13:36:47 1999 Joerg Schilling - * scsi-wnt.c 1.11 - * scsi-unixware.c 1.3 - * scsi-sgi.c 1.14 - * scsi-osf.c 1.6 - * scsi-sco.c 1.8 - * scsi-os2.c 1.4 - * scsi-next.c 1.11 - * scsi-linux-sg.c 1.32 - * scsi-linux-pg.c 1.13 - * scsi-hpux.c 1.11 - * scsi-bsd.c 1.21 - * scsi-bsd-os.c 1.7 - * scsi-beos.c 1.3 - * scsi-aix.c 1.13 - scsi_close() new - -Sun Jul 25 00:50:18 1999 Joerg Schilling - * scsitransp.h 1.20 - close_scsi() and scsi_smalloc()/scsi_sfree() new - -Sat Jul 24 22:26:22 1999 Joerg Schilling - * scsitransp.h 1.19 - scsi_close() new - -Sat Jul 24 22:25:39 1999 Joerg Schilling - * scsi-vms.c 1.9 - last changes fro Mr. Heuser - Max Timeout corrected - -Sat Jul 24 22:22:44 1999 Joerg Schilling - * scsi-next.c 1.10 - Kernel Driver is in undefined state if SCSI Bus is not valid -> bugfix & debug prints - -Sat Jul 24 20:43:47 1999 Joerg Schilling - * drv_mmc.c 1.39 - from BCD converson (debug) for Ricoh test - Trying to suppress error messages for newer MITSUMI ATAPI drives - -Sat Jul 24 19:27:06 1999 Joerg Schilling - * cdrecord.1 1.40 - Better documentation for -pad/padsize= - -Sat Jul 24 19:25:34 1999 Joerg Schilling - * diskid.c 1.14 - New manufacturer: OPTROM - AUDIO DISTRIBUTORS - Acer Media Technology - -Sat Jul 24 19:23:49 1999 Joerg Schilling - * cdrecord.c 1.81 - -> 1.8a24 & write_buf() Test Code - -Sat Jul 24 19:19:22 1999 Joerg Schilling - * cdrecord.c 1.80 - Check HAVE_SETPRIORITY and HAVE_NICE - -Sat Jul 24 19:17:30 1999 Joerg Schilling - * cdrecord.c 1.79 - Version -> 1.8a23 - Signalhandler for wait time before burning - O_BINARY define for win32 - setmode(TDIN, O_BINARY) for win32 - track[] Array now MAX_TRACKS+2 - Print Drive Buffer size and FIFO size - -force Flag to blank problematic CD-RW's - set sector size to 2k before burning for Plextor - set_speed...() now with speedp Parameter to allow MMC to send back actual values - DAO for MMC - new Options -atip/-useinfo/-force/-dao/mcn=text/isrc=text/index=list - first Test for continuous Drive buffer cap printouts - set_secsize() new (for Plextor & DAO) - EMX Wildcard expansion for OS/2 - Timeout for DAO -> minimal 200s - print_toc() \ removed for K&R C - print_toc() with CD-Text - DosSetPriority() now korrectly doing delta - setpregaps() sets values for lead-in/out - checktsize() checks for DAO - -Sun Jul 18 14:39:31 1999 Joerg Schilling - * cdrecord.h 1.51 - * scsi_cdr.c 1.74 - open_scsi() -> libscg - -Sat Jul 17 15:54:11 1999 Joerg Schilling - * scsitransp.c 1.38 - MAX DMA for Solaris x86 from 32k -> 56k - scsierr() checks for sense[0] != 0 - scsi_sense_{key!code!qual} return 0 if scsierr() == FALSE - -Sat Jul 17 15:37:00 1999 Joerg Schilling - * scsitransp.h 1.18 - open_scsi() for scsiopen.c new - -Mon Jun 28 01:11:18 1999 Joerg Schilling - * scsi-linux-pg.c 1.12 - set CDB to 0 past cdb_len - -Sun Jun 6 19:41:11 1999 Joerg Schilling - * drv_philips.c 1.28 - CDR_SWABAUDIO for pioneer_dws114x - -Sun Jun 6 19:40:29 1999 Joerg Schilling - * modes.c 1.13 - get_mode_params() now return FALSE if has_mode_page() returns FALSE - -Sun Jun 6 19:39:02 1999 Joerg Schilling - * scsi_cdr.c 1.73 - Hack for NT-4.0 ASPI ISE inquiry fake (bug in add_len) - workaround for Ricoh NOT_READY key in get Mode page 2A - -Thu May 13 16:55:13 1999 Joerg Schilling - * scsi-wnt.c 1.10 - #define for format to avoid hiding messages - Now uses dlopen() - ha_inquiry() new - better paraeters in scsi_open() - SRB_HaID/SRB_HaId unified - -Thu May 13 15:07:36 1999 Joerg Schilling - * scsi_cdr.c 1.72 - check scsi_open() return code for < 0 - -Thu May 13 15:00:48 1999 Joerg Schilling - * modes.c 1.12 - Cast for ANSI C comparison - -Thu May 13 15:00:07 1999 Joerg Schilling - * drv_sony.c 1.31 - Cast for ANSI C - fixed typo in error texts - -Thu May 13 14:31:50 1999 Joerg Schilling - * drv_jvc.c 1.40 - mods for ANSI C comparison - -Thu May 13 14:31:12 1999 Joerg Schilling - * cdrecord.1 1.39 - New Options -atip and index= - -Thu May 13 12:00:58 1999 Joerg Schilling - * scsierrs.c 2.21 - field_ptr now correctly used for progress printing on NOT_READY - -Wed May 12 01:42:18 1999 Joerg Schilling - * scsi-os2.c 1.3 - -scanbus support - -Wed May 12 01:01:54 1999 Joerg Schilling - * drv_philips.c 1.27 - * scsi_cdr.c 1.71 - * cdr_drv.c 1.15 - * scsidefs.h 1.21 - DEV_RICOH_RO_1060C new (preliminary) - -Mon May 3 01:30:22 1999 Joerg Schilling - * scsi-wnt.c 1.9 - changed names and indented - WBOOL definition to distinguish BOOL from Windows.h and BOOL from standard.h - busses new - compare busno with busses - Debug File removed - EventStatus as result of WaitForSingleObject() - set_error() new for correct error codes - scsiabort() new - -Tue Apr 27 23:11:59 1999 Joerg Schilling - * scsi-wnt.c 1.8 - Debug File removed - -Tue Apr 27 21:06:48 1999 Joerg Schilling - * scsi-wnt.c 1.7 - -scanbus now works - file matrix removed - check for nuber of SCSI Busses - -Mon Apr 26 22:37:40 1999 Joerg Schilling - * scsi-wnt.c 1.6 - Try to implement -scanbus - -Mon Apr 26 22:36:00 1999 Joerg Schilling - * scsi-wnt.c 1.5 - sp->u_scb.cmd_scb[0] = s.SRB_Status -> sp->u_scb.cmd_scb[0] = s.SRB_TargStat - error code SCG_FATAL -> SCG_RETRYABLE - -Mon Apr 26 22:35:00 1999 Joerg Schilling - * scsi-wnt.c 1.4 - Indented II - -Mon Apr 26 22:34:15 1999 Joerg Schilling - * scsi-wnt.c 1.3 - Indented - -Mon Apr 26 22:33:41 1999 Joerg Schilling - * scsi-wnt.c 1.2 - Better comment - -Mon Apr 26 22:32:32 1999 Joerg Schilling - * scsi-wnt.c 1.1 - date and time created 99/04/26 21:32:32 by joerg - -Sun Apr 25 09:48:05 1999 Joerg Schilling - * cdrecord.h 1.50 - is_copy()/is_scms() new - TI_COPY/TI_SCMS new - read_subchannel() new - pr_manufacturer()/disk_rcap() with rw/audio Parameters - -Sun Apr 25 09:46:03 1999 Joerg Schilling - * drv_mmc.c 1.38 - clear -dummy status by clearin -dummy state - COPY & SCMS handling - -Sat Apr 24 14:10:19 1999 Joerg Schilling - * diskid.c 1.13 - * drv_mmc.c 1.37 - pr_manufacturer()/disk_rcap() now using rw and audio Parameter - -Sat Apr 24 14:05:48 1999 Joerg Schilling - * drv_philips.c 1.26 - pr_manufacturer()/disk_rcap() now using rw and audio Parameter - Printing of ATIP "restricted" - -Sat Apr 24 14:04:38 1999 Joerg Schilling - * drv_sony.c 1.30 - pr_manufacturer()/disk_rcap() now using rw and audio Parameter - printf() Format (%l..) - -Sat Apr 24 14:02:11 1999 Joerg Schilling - * scsi_cdr.c 1.70 - read_subchannel() new - -Sat Apr 24 13:03:56 1999 Joerg Schilling - * scsihack.c 1.21 - scsi-wnt.c new - -Sun Apr 18 21:04:15 1999 Joerg Schilling - * defaults.c 1.1 - date and time created 99/04/18 20:04:15 by joerg - -Sun Apr 18 19:56:45 1999 Joerg Schilling - * drv_sony.c 1.29 - * drv_simul.c 1.9 - * drv_philips.c 1.25 - * drv_mmc.c 1.36 - * drv_jvc.c 1.39 - * cdr_drv.c 1.14 - * drv_dvd.c 1.32 - * cdrecord.h 1.49 - New driver function cdr_send_cue - -Sun Apr 18 19:28:03 1999 Joerg Schilling - * drv_jvc.c 1.38 - g6 & g7 test functions - -Sun Apr 18 18:40:56 1999 Joerg Schilling - * cdrecord.h 1.48 - index= Option new - -Sun Apr 18 18:40:54 1999 Joerg Schilling - * drv_mmc.c 1.35 - index= Option new - -Sun Apr 18 00:42:59 1999 Joerg Schilling - * cdrecord.h 1.47 - New Flags F_SAO/F_WRITE/F_PREGAP/F_FORCE - isrc in struct track - is_tao()/is_pregap() new - ds_cdrflags in struct disk_status - cdr_buffer_cap in struct cdr_cmd - cdr_set_speed_dummy with *speedp - to allow mmc to return value - Functions for auinfo.c - -Sun Apr 18 00:18:30 1999 Joerg Schilling - * scsi-linux-sg.c 1.31 - MAX_SCG & MAX_TGT -> 16 - Debug function for printing buscookies[] and scgfiles[][][] - sg_mapbus() now with Bus Parameter and spcial handling for holes in buscookies[] - sg_setup() doing range check - better handling of Status byte in extended Code for mk2 Interface - -Sun Apr 18 00:09:52 1999 Joerg Schilling - * scsi-linux-pg.c 1.11 - Search slot for PP Bus backwards, as buscookies[] may have holes - -Sat Apr 17 22:12:22 1999 Joerg Schilling - * drv_jvc.c 1.37 - New Function in Driver table to read Buffer capacity - buf_cap_teac(), read_peak_buffer_cap_teac (), buffer_inquiry_teac(), check_buffer_teac() new - -Sat Apr 17 19:32:41 1999 Joerg Schilling - * scsi_scan.c 1.5 - Enhancements for 16 SCSI busses and 17 Targets/Bus - -Sat Apr 17 19:29:25 1999 Joerg Schilling - * cdr_drv.c 1.13 - buf_dummy() new - New Function in Driver table to read Buffer capacity - -Sat Apr 17 19:28:27 1999 Joerg Schilling - * drv_sony.c 1.28 - * drv_mmc.c 1.34 - * drv_philips.c 1.24 - * drv_simul.c 1.8 - * drv_dvd.c 1.31 - New Function in Driver table to read Buffer capacity - -Sat Apr 17 19:25:47 1999 Joerg Schilling - * drv_sony.c 1.27 - Workaround for CDU 620 (can not read lead-in Start time) - -Sat Apr 17 18:57:36 1999 Joerg Schilling - * scsitransp.c 1.37 - MAX_SCG & MAX_TGT -> 16 - Workaround for /dev/scg if Target > 7 - -Sat Apr 17 18:55:26 1999 Joerg Schilling - * scsi-bsd-os.c 1.6 - * scsi-vms.c 1.8 - * scsi-unixware.c 1.2 - * scsi-sgi.c 1.13 - * scsi-sco.c 1.7 - * scsi-osf.c 1.5 - * scsi-os2.c 1.2 - * scsi-next.c 1.9 - * scsi-hpux.c 1.10 - * scsi-bsd.c 1.20 - * scsi-aix.c 1.12 - MAX_SCG & MAX_TGT -> 16 - -Sat Apr 17 18:47:39 1999 Joerg Schilling - * scsi-next.c 1.8 - scsi_setup() & scsi_havebus() with scgp Pointer (bug) - -Sat Apr 17 17:09:00 1999 Joerg Schilling - * scsitransp.c 1.36 - limit SunOS 4.x maxdma to 64k-1 - -Sat Apr 17 13:14:24 1999 Joerg Schilling - * cdrecord.1 1.38 - -force flag and -useinfo new - -Tue Apr 13 01:29:14 1999 Joerg Schilling - * diskid.c 1.12 - m_seantram Index 28 (typo) -> 83 - -Tue Apr 13 01:06:45 1999 Joerg Schilling - * modes.c 1.11 - Test in has_mode_page() if desired page is really available for JVC 2080 FW Bug - -Fri Apr 9 20:49:08 1999 Joerg Schilling - * drv_jvc.c 1.36 - speed -> *speedp Parameter in speed_select() - -Fri Apr 9 01:03:54 1999 Joerg Schilling - * scsi_cdr.c 1.69 - * drv_dvd.c 1.30 - * audiosize.c 1.12 - Signed/unsiged comparisons with cast - -Fri Apr 9 00:46:07 1999 Joerg Schilling - * scsilog.c 1.7 - cast for comparing unsigned > int - -Fri Apr 9 00:33:17 1999 Joerg Schilling - * scsi_cdr.c 1.68 - read_buff_cap() Ulong -> int - -Fri Apr 9 00:32:35 1999 Joerg Schilling - * diskid.c 1.11 - New manufacturer: "Woongjin Media corp" - "INFODISC Technology Co., Ltd." - "UNITECH JAPAN INC." - "AMS Technology Inc." - -Tue Apr 6 22:08:31 1999 Joerg Schilling - * drv_mmc.c 1.33 - speed -> *speedp Parameter in speed_select() - Read write speed Auslesen and set *speedp - Test for dsp->ds_cdrflags & RF_WRITE - first DAO enhancements - -Tue Apr 6 22:05:25 1999 Joerg Schilling - * scsi_cdr.c 1.67 - speed -> *speedp Parameter IN speed_select() - read_buffer() WITH mode Parameter - scsi_get_speed() new - read_buff_cap() prints Data if sp && fp == NULL and avoids division by 0 - read_cdtext() new - Workaround for Philips CDD-522 cannot do read TOC MSN - -Tue Apr 6 01:15:52 1999 Joerg Schilling - * drv_philips.c 1.23 - speed -> *speedp Parameter in speed_select() - Test for dsp->ds_cdrflags & RF_WRITE - -Tue Apr 6 01:13:14 1999 Joerg Schilling - * drv_sony.c 1.26 - ATIP Support - -Fri Apr 2 16:06:31 1999 Joerg Schilling - * diskid.c 1.10 - "Seantram Technology Inc." new (guess) - -Fri Apr 2 15:50:28 1999 Joerg Schilling - * drv_sony.c 1.25 - * drv_simul.c 1.7 - * drv_dvd.c 1.29 - speed -> *speedp Parameter in speed_select() - -Sun Mar 28 15:31:56 1999 Joerg Schilling - * scsimmc.h 1.4 - struct mmc_cue new - -Sun Mar 28 15:29:43 1999 Joerg Schilling - * cdrecord.1 1.37 - -dao and -audio default for .au & .wav - -Fri Mar 12 02:05:58 1999 Joerg Schilling - * auinfo.c 1.1 - date and time created 99/03/12 02:05:58 by joerg - -Sun Mar 7 22:30:42 1999 Joerg Schilling - * fifo.c 1.13 - roundup(bufsize, pagesize) to make each Segment page aligned - -Wed Mar 3 23:45:20 1999 Joerg Schilling - * diskid.c 1.9 - New manufacturers: vanguard, grandadv, taeil, kingpro, digitalstor - -Wed Mar 3 22:58:38 1999 Joerg Schilling - * diskid.c 1.8 - New RCAP Liste - -Sat Feb 20 00:00:44 1999 Joerg Schilling - * scsi_cdr.c 1.66 - read_buffer() new - timeout for read_toc_philips() -> 240s for TEAC - read_master_cue() new - send_cue_sheet() new - read_buff_cap() new - -Sun Jan 31 22:37:38 1999 Joerg Schilling - * wm_packet.c 1.11 - * cdrecord.c 1.78 - carriage Return to beginning of Track... Strings to make error message not overwrite position - -Sun Jan 31 19:50:01 1999 Joerg Schilling - * cdrecord.c 1.77 - ignore dev= values from /etc/default/cdrecord for -scanbus - -Sun Jan 31 19:23:53 1999 Joerg Schilling - * scsi_cdr.c 1.65 - Suport for ACER CR-4020C - -Sun Jan 31 19:23:05 1999 Joerg Schilling - * drv_philips.c 1.22 - scgp->inq->ansi_version = 1; -> scgp->inq->data_format = 1; to make Plasmon RF-4100 work again - -Sun Jan 31 18:55:45 1999 Joerg Schilling - * cdrecord.1 1.36 - Hint for SVr4 and POSIX Realtime scheduler - -Sun Jan 31 18:49:06 1999 Joerg Schilling - * scsi-bsd.c 1.19 - scsi_maxdma() from MAXPHYS -> DFLTPHYS - -Sat Dec 12 12:36:09 1998 Joerg Schilling - * scsi-beos.c 1.2 - sccsid[] -> __sccsid[] - -Sun Dec 6 13:16:25 1998 Joerg Schilling - * scsi-beos.c 1.1 - date and time created 98/12/06 13:16:25 by joerg - -Sun Dec 6 12:41:50 1998 Joerg Schilling - * scsihack.c 1.20 - BeOS new - -Sun Dec 6 12:41:30 1998 Joerg Schilling - * scsi-vms.c 1.7 - New Version past phone call with vaxinf@CHCLU.CHEMIE.UNI-KONSTANZ.DE - -Sun Dec 6 12:10:54 1998 Joerg Schilling - * cdrecord.1 1.35 - FreeBSD device name bug - New address for Mailing List - Documentation of /etc/default/cdrecord - -Sat Dec 5 13:46:27 1998 Joerg Schilling - * cdrecord.c 1.76 - HAVE_SYS_RESOURCE_H new (BeOS) - 1.8a13 -> 1.8a14 - cdr_defaults() new - -Sat Dec 5 13:38:16 1998 Joerg Schilling - * cdrecord.h 1.46 - default.c/cdr_defaults() new - -Sun Nov 29 19:40:50 1998 Joerg Schilling - * scsi-sco.c 1.6 - cleaned up and permission to use /dev/xxx:target,lun - -Sun Nov 29 19:27:55 1998 Joerg Schilling - * scsidefs.h 1.20 - fused - -Sun Nov 29 19:25:54 1998 Joerg Schilling - * scgio.h 2.14 - Splitted into scgcmd.h and scgio.h - -Sun Nov 29 19:23:33 1998 Joerg Schilling - * scsi-unixware.c 1.1 - date and time created 98/11/29 19:23:33 by joerg - -Sun Nov 29 19:22:45 1998 Joerg Schilling - * scsihack.c 1.19 - UNIXWARE new - -Sun Nov 29 19:15:04 1998 Joerg Schilling - * cdrecord.c 1.75 - scgio.h -> scgcmd.h/scgio.h, scgio.h scgcmd.h scsidefs.h scsireg.h scsitransp.h -> include/scg, 1.8a11 -> 1.8a13 - -Sun Nov 29 19:14:20 1998 Joerg Schilling - * scsierrs.c 2.20 - * scsitransp.c 1.35 - * cdr_drv.c 1.12 - * modes.c 1.10 - * scsilog.c 1.6 - * wm_packet.c 1.10 - * scsi_scan.c 1.4 - * scsi_cdr.c 1.64 - * audiosize.c 1.11 - * drv_sony.c 1.24 - * drv_simul.c 1.6 - * drv_philips.c 1.21 - * drv_mmc.c 1.32 - * drv_jvc.c 1.35 - * drv_dvd.c 1.28 - scgio.h -> scgcmd.h/scgio.h, scgio.h scgcmd.h scsidefs.h scsireg.h scsitransp.h -> include/scg - -Sun Nov 29 00:39:42 1998 Joerg Schilling - * scsi-sco.c 1.5 - Correctly return Sense Data, EIO if errno == 0 - -Sat Nov 28 12:32:00 1998 Joerg Schilling - * scsierrs.c 2.19 - asc <= 80 -> asc < 80 for invalid sense code - -Sat Nov 28 00:49:19 1998 Joerg Schilling - * scsierrs.c 2.18 - Missing NULL as terminator for sd_ccs_error_str[] added - -Wed Nov 25 22:23:07 1998 Joerg Schilling - * scsi-linux-pg.c 1.10 - pg_send() Prototyp new - -Wed Nov 25 22:22:46 1998 Joerg Schilling - * scsitransp.c 1.34 - HAVE_PARAM_H -> HAVE_SYS_PARAM_H (Typo) - -Sun Nov 22 15:50:37 1998 Joerg Schilling - * cdrecord.c 1.74 - 1.8a9 -> 1.8a11, DosSetPriority() new - -Sun Nov 22 15:26:16 1998 Joerg Schilling - * isosize.c 1.4 - * audiosize.c 1.10 - Now using statdefs.h - -Sat Nov 21 23:41:31 1998 Joerg Schilling - * scsitransp.c 1.33 - #ifdef HAVE_PARAM_H for VMS - -Sat Nov 21 21:38:31 1998 Joerg Schilling - * scsi_cdr.c 1.63 - unsigned int cast for char Parameter in i_to_short() - -Sat Nov 7 22:21:28 1998 Joerg Schilling - * cdrecord.c 1.73 - 1.8a8 -> 1.8a9 - -Fri Nov 6 23:49:59 1998 Joerg Schilling - * scsi-linux-sg.c 1.30 - Typo in scsi_send() header - -Mon Nov 2 22:22:23 1998 Joerg Schilling - * scsi-bsd.c 1.18 - Typ bus -> busno for CAM removed - -Mon Nov 2 14:55:22 1998 Joerg Schilling - * scsi-os2.c 1.1 - date and time created 98/11/02 14:55:22 by joerg - -Mon Nov 2 13:24:30 1998 Joerg Schilling - * scsihack.c 1.18 - Now completely using SCSI *scgp as Function parameter - scsi-os2.c new - -Mon Nov 2 14:27:10 1998 Joerg Schilling - * scsi-vms.c 1.6 - * scsi-sgi.c 1.12 - * scsi-sco.c 1.4 - * scsi-osf.c 1.4 - * scsi-next.c 1.7 - * scsi-linux-sg.c 1.29 - * scsi-linux-pg.c 1.9 - * scsi-hpux.c 1.9 - * scsi-bsd.c 1.17 - * scsi-bsd-os.c 1.5 - * scsi-aix.c 1.11 - * scsierrs.c 2.17 - * scsitransp.c 1.32 - * scsitransp.h 1.17 - * cdrecord.c 1.72 - * cdrecord.h 1.45 - * cdr_drv.c 1.11 - * drv_mmc.c 1.31 - * drv_philips.c 1.20 - * drv_jvc.c 1.34 - * drv_dvd.c 1.27 - * drv_simul.c 1.5 - * drv_sony.c 1.23 - * scsi_cdr.c 1.62 - * modes.c 1.9 - * scsi_scan.h 1.2 - * scsi_scan.c 1.3 - * scsilog.c 1.5 - * wm_packet.c 1.9 - Now completely using SCSI *scgp as Function parameter - -Thu Oct 29 15:59:52 1998 Joerg Schilling - * scsihack.c 1.17 - * scsitransp.h 1.16 - * scsitransp.c 1.31 - * scsi-sgi.c 1.11 - * scsi-vms.c 1.5 - * scsi-sco.c 1.3 - * scsi-osf.c 1.3 - * scsi-next.c 1.6 - * scsi-linux-pg.c 1.8 - * scsi-linux-sg.c 1.28 - * scsi-hpux.c 1.8 - * scsi-bsd.c 1.16 - * scsi-bsd-os.c 1.4 - * scsi-aix.c 1.10 - Globale Variables removed and replaced by SCSI *scgp - -Thu Oct 29 15:45:38 1998 Joerg Schilling - * scsi-sco.c 1.2 - Indented and scsi_isatapi() new - -Thu Oct 29 15:30:53 1998 Joerg Schilling - * scsi-sco.c 1.1 - date and time created 98/10/29 15:30:53 by joerg - -Thu Oct 29 15:21:52 1998 Joerg Schilling - * cdrecord.c 1.70 - Lowlevel SCSI transport Routines now have scgp Parameter, 1.8a6 -> 1.8a7 - -Thu Oct 29 15:21:09 1998 Joerg Schilling - * scsi_cdr.c 1.61 - * drv_sony.c 1.22 - * modes.c 1.8 - * scsilog.c 1.4 - * drv_philips.c 1.19 - * drv_mmc.c 1.30 - * drv_jvc.c 1.33 - * drv_dvd.c 1.26 - Lowlevel SCSI transport Routines now have scgp Parameter - -Wed Oct 28 22:20:25 1998 Joerg Schilling - * scsi-aix.c 1.9 - dev=device:b,t,l Syntax new - -Mon Oct 26 03:18:37 1998 Joerg Schilling - * diskid.c 1.7 - manufacturer_id() new - mi_num new in struct disk_man - -Mon Oct 26 03:17:34 1998 Joerg Schilling - * cdrecord.h 1.44 - manufacturer_id() new - -Mon Oct 26 00:27:22 1998 Joerg Schilling - * diskid.c 1.6 - New manufacturer: Xcitec Inc. - Doremi Media Co., Ltd. - Matsushita Electric Industrial Co.,Ltd. - CDA Datenträger Albrechts GmbH. - -Sun Oct 25 13:00:22 1998 Joerg Schilling - * cdrecord.c 1.71 - #ifdef HAVE_SYS_MMAN_H new - -Sat Oct 24 01:41:22 1998 Joerg Schilling - * scsi-vms.c 1.4 - * scsi-osf.c 1.2 - * scsi-sgi.c 1.10 - * scsi-next.c 1.5 - * scsi-hpux.c 1.7 - * scsi-bsd.c 1.15 - * scsi-bsd-os.c 1.3 - * scsi-aix.c 1.8 - Blind changes for 1st stage of SCSI lib: Globale Variables removed and replaced by SCSI *scgp - -Sat Oct 24 00:22:01 1998 Joerg Schilling - * cdrecord.c 1.69 - * scsi_cdr.c 1.60 - open_scsi(dev, timeout, verboseopen) -> open_scsi(dev, debug, verboseopen) - -Fri Oct 23 23:46:23 1998 Joerg Schilling - * wm_packet.c 1.8 - * scsi_cdr.c 1.59 - scsi_settimeout() -> do not divide by 100 - -Fri Oct 23 15:53:37 1998 Joerg Schilling - * cdrecord.c 1.68 - XXX scgp->cap->c_bsize = 2048; XXX Hack init !!! - -Fri Oct 23 03:14:46 1998 Joerg Schilling - * scsihack.c 1.16 - scsi-sco.c new - -Fri Oct 23 16:01:44 1998 Joerg Schilling - * scsi-linux-sg.c 1.27 - * scsi-linux-pg.c 1.7 - * scsitransp.c 1.30 - * scsitransp.h 1.15 - * scsierrs.c 2.16 - * scsi_cdr.c 1.58 - * scsidefs.h 1.19 - * cdrecord.c 1.67 - * drv_dvd.c 1.25 - * drv_philips.c 1.18 - * drv_sony.c 1.21 - * drv_jvc.c 1.32 - * cdr_drv.c 1.10 - * drv_mmc.c 1.29 - * modes.c 1.7 - * scsi_scan.c 1.2 - * scsilog.c 1.3 - Globale Variables removed and replaced by SCSI *scgp - -Thu Oct 22 18:49:06 1998 Joerg Schilling - * scsi-next.c 1.4 - Now using scsi_open(device, busno, tgt, tlun) Interface - -Tue Oct 20 18:31:25 1998 Joerg Schilling - * scsi_cdr.c 1.57 - CDD521/02 (Kodak PCD-200) - -Sun Oct 18 14:54:35 1998 Joerg Schilling - * cdrecord.c 1.66 - 1.6.1 -> 1.7.1 - -*************** Release 1.6.1 ******************* - -Sun Oct 18 14:47:55 1998 Joerg Schilling - * cdrecord.c 1.65 - O_BINARY for Tracks - Restore old sector size on exit() - Better handling for lba (512/2048) in read_toc() - -Sun Oct 18 14:40:35 1998 Joerg Schilling - * scsi_cdr.c 1.56 - * cdrecord.h 1.43 - sense_secsize() new - -Sat Oct 17 16:39:41 1998 Joerg Schilling - * fifo.c 1.12 - #ifdef SHM_LOCK to allow compilation of SysV shm on AIX - -Fri Oct 9 14:21:38 1998 Joerg Schilling - * scsi-bsd.c 1.14 - sp->ux_errno = EIO; for old Transport Interface - -Fri Oct 9 22:19:30 1998 Joerg Schilling - * modes.c 1.24 - * cd_misc.c 1.6 - * fifo.c 1.11 - * diskid.c 1.5 - * port.c 1.8 - #include new - -Fri Oct 9 14:21:38 1998 Joerg Schilling - * cd_misc.c 1.5 - * wm_packet.c 1.7 - * wm_session.c 1.2 - * wm_track.c 1.2 - #include & #include new - -Thu Oct 8 15:43:50 1998 Joerg Schilling - * cdrecord.h 1.42 - u_char -> Uchar - -Wed Oct 7 18:08:46 1998 Joerg Schilling - * cdrecord.c 1.64 - 1.7a2 -> 1.7, -fix -eject corrected - wait_unit_ready(120); after a load - -Wed Oct 7 18:07:41 1998 Joerg Schilling - * scsi_cdr.c 1.55 - IMMED hack in close track/session added - -Wed Oct 7 18:06:02 1998 Joerg Schilling - * drv_mmc.c 1.28 - new function waitfix_mmc() - -dummy error hiding better - -Wed Oct 7 17:54:02 1998 Joerg Schilling - * scsi-linux-pg.c 1.6 - EIO on SCG_RETRYABLE - -Tue Oct 6 12:53:11 1998 Joerg Schilling - * scsi-vms.c 1.3 - next version from vaxinf@CHCLU.CHEMIE.UNI-KONSTANZ.DE and my remarks - -Tue Oct 6 12:21:50 1998 Joerg Schilling - * scsi-vms.c 1.2 - next version from vaxinf@CHCLU.CHEMIE.UNI-KONSTANZ.DE - -Tue Oct 6 02:09:14 1998 Joerg Schilling - * scsi-linux-pg.c 1.5 - * scsi-linux-sg.c 1.26 - * scsi-bsd-os.c 1.2 - New device:@ Syntax - -Tue Oct 6 02:04:46 1998 Joerg Schilling - * scsi_cdr.c 1.54 - New device:@ Syntax - sscanf() -> scsi_scandev() - -Tue Oct 6 01:50:13 1998 Joerg Schilling - * cdrecord.1 1.34 - new dev= Syntax (dev=device:@ / dev=device:@,lun) inserted - -Tue Oct 6 01:05:29 1998 Joerg Schilling - * scsi-bsd.c 1.13 - modified to use -lcam & cam_open_btl(busno, tgt, tlun, O_RDWR, NULL); - -Thu Oct 1 01:15:57 1998 Joerg Schilling - * scsi-bsd.c 1.12 - Mods for dev=devname:@,l - -Mon Sep 21 01:24:45 1998 Joerg Schilling - * scsi-linux-sg.c 1.25 - scsi_settimeout() -> sg_settimeout() - -Sat Sep 19 21:49:11 1998 Joerg Schilling - * scsi-osf.c 1.1 - date and time created 98/09/19 20:49:11 by joerg - -Tue Sep 15 02:55:28 1998 Joerg Schilling - * drv_philips.c 1.17 - capacity_philips() with Philips CDD-2600 Support new - *_attach() now uses cdr_t * Parameter - cdr_kodak_pcd600 new - Pioneer DW-S114X from open_track_yamaha -> open_track_oldphilips - -Tue Sep 15 02:39:44 1998 Joerg Schilling - * scsi-bsd.c 1.11 - #ifndef BSD_CAM -> #ifndef HAVE_CAMLIB_H - -Tue Sep 15 02:37:58 1998 Joerg Schilling - * cdrecord.c 1.63 - Now uses: fctldefs.h, strdefs.h - SECURITY new - 1.7a1 -> 1.7a2 - open_scsi() check return value and print error message - Blanking time print - #ifdef _SC_PRIORITY_SCHEDULING around sysconf() - #ifdef PRIO_PROCESS around setpriority() for WNT - -Tue Sep 15 02:31:16 1998 Joerg Schilling - * drv_jvc.c 1.31 - Now uses: fctldefs.h, strdefs.h - blank_jvc() new - -Tue Sep 15 02:30:11 1998 Joerg Schilling - * drv_sony.c 1.20 - Now uses: fctldefs.h, strdefs.h - -Tue Sep 15 02:22:12 1998 Joerg Schilling - * cdrecord.h 1.41 - struct index -> struct tindex to allow #define index strchr - -Tue Sep 15 02:21:24 1998 Joerg Schilling - * drv_mmc.c 1.27 - Now uses: fctldefs.h, strdefs.h, timdefs.h - Sony 928 Support new - For drives that don't support read ATIP use data from read_diskinfo - Try to handle "early Return" fixating syndrom from Mitsumi drives - no error messages when fixating using -dummy - -Tue Sep 15 02:13:49 1998 Joerg Schilling - * scsi_cdr.c 1.53 - Now uses: fctldefs.h, strdefs.h - -Tue Sep 8 01:32:08 1998 Joerg Schilling - * scsihack.c 1.15 - Conditional compilation for Linux pg driver to support old Linux releases - -Mon Sep 7 02:30:15 1998 Joerg Schilling - * scsi-bsd.c 1.10 - Typo in scsi_fileno() fixed - -Sun Sep 6 18:47:16 1998 Joerg Schilling - * scsi-bsd.c 1.9 - first FreeBSD CAM Support - -Sun Sep 6 18:22:13 1998 Joerg Schilling - * scsi-bsd.c 1.8 - Enhancements for NetBSD & ATAPI - -Sun Sep 6 01:39:22 1998 Joerg Schilling - * cdr_drv.c 1.9 - cdr_mmc_sony new - -Sun Sep 6 00:43:43 1998 Joerg Schilling - * drv_simul.c 1.4 - * drv_dvd.c 1.24 - Now uses: strdefs.h - -Sat Sep 5 23:23:31 1998 Joerg Schilling - * scsitransp.c 1.29 - Now uses: timedefs.h fctldefs.h - -Mon Aug 31 01:50:12 1998 Joerg Schilling - * scsi-linux-pg.c 1.4 - pgbus init from -1 -> -2 - -Mon Aug 31 01:39:52 1998 Joerg Schilling - * scsi-linux-sg.c 1.24 - /dev/sga... to /dev/sgz instead of /dev/sgy now checked - return nopen to allow recognition of bad dev= parameters - -Mon Aug 31 01:38:08 1998 Joerg Schilling - * scsi-linux-pg.c 1.3 - Debug print for pgbus - if scsibus >= 0 ist do nothing if busno is wrong - -Mon Aug 31 01:03:17 1998 Joerg Schilling - * scsi_cdr.c 1.52 - write_xg5() new - -Mon Aug 31 01:02:00 1998 Joerg Schilling - * scsi_cdr.c 1.51 - open_scsi() now checks dev=devicename:b,t,l - read_trackinfo() now don't prints Cannot read TOC Meldung in silent mode - -Mon Aug 31 00:43:31 1998 Joerg Schilling - * scsitransp.c 1.28 - scsiprintresult() new - -Mon Aug 31 00:40:32 1998 Joerg Schilling - * scsitransp.h 1.14 - scsiprintcdb()/scsiprintwdata()/scsiprintrdata()/scsiprintresult() new - -Sun Aug 30 12:55:35 1998 Joerg Schilling - * drv_dvd.c 1.23 - g5_cdbaddr()/g5_cdblen() -> scgio.h - -Sun Aug 30 12:54:37 1998 Joerg Schilling - * scsihack.c 1.14 - USE_PG -> USE_PG_ONLY - -Sun Aug 30 12:54:02 1998 Joerg Schilling - * scgio.h 2.13 - g0_cdblen()/g5_cdblen() & g5_cdbaddr() new - -Sun Aug 30 12:53:06 1998 Joerg Schilling - * cdrecord.h 1.40 - write_xg5() new - -Sat Aug 29 22:15:37 1998 Joerg Schilling - * cd_misc.c 1.4 - pr_manufacturer() reference removed from print_min_atip() - -Sat Aug 29 21:57:01 1998 Joerg Schilling - * cdrecord.1 1.33 - PP tranport documented, -scanbus doc corrected - -Sat Aug 29 21:01:59 1998 Joerg Schilling - * scsi-linux-pg.c 1.2 - #include statt "pg.h" - support for integrated parallel Port Adapter & SCSI - timeout code corrected - DMA overrun now recognized - -Sat Aug 29 20:48:28 1998 Joerg Schilling - * scsi-linux-sg.c 1.23 - Support for integrated parallel Port Adapter & SCSI - -Sat Aug 29 20:22:10 1998 Joerg Schilling - * cd_misc.c 1.3 - * cdrecord.h 1.39 - print_min_atip() new in cd_misc.c - -Tue Aug 25 20:23:20 1998 Joerg Schilling - * scsihack.c 1.13 - scsi_isatapi() defined, for default SCSI code - -Sun Aug 23 13:42:44 1998 Joerg Schilling - * scsi-linux-sg.c 1.22 - Fix for misaligned integer access in sg_header for Linux/sparc if valloc() DMA Buffer is used - -Thu Aug 20 10:05:14 1998 Joerg Schilling - * scsi-aix.c 1.7 - errno == Reference removed - -Thu Aug 20 01:24:33 1998 Joerg Schilling - * cdrecord.1 1.32 - dev=devicename:target,lun documented - -Tue Aug 18 04:41:56 1998 Joerg Schilling - * scsihack.c 1.12 - scsi-next.c & scsi-vms.c new - -Mon Aug 17 23:08:36 1998 Joerg Schilling - * scsi-vms.c 1.1 - date and time created 98/08/17 22:08:36 by joerg - -Mon Aug 17 22:35:19 1998 Joerg Schilling - * scsihack.c 1.11 - scsi-linux-pg.c new use with USE_PG - -Mon Aug 17 22:34:55 1998 Joerg Schilling - * scsi-linux-pg.c 1.1 - * scsi-bsd-os.c 1.1 - date and time created 98/08/17 21:24:24 by joerg - -Mon Aug 17 22:22:04 1998 Joerg Schilling - * scsi-linux-sg.c 1.21 - MAX_SCG -> 8 - search /dev/sg0... before /dev/sfg... - -Mon Aug 17 21:47:35 1998 Joerg Schilling - * scsi-linux-sg.c 1.20 - Support new sg driverinterface - scgfile new to use with global ioctl's - MAX_DMA_LINUX -> 4k if SG_BIG_BUFF undefined - SG_MAX_SENSE -> 16 if not declared - SG_GET_BUFSIZE ioctl new - scsi_isatapi() new - -Sun Aug 16 23:47:48 1998 Joerg Schilling - * misc.c 1.1 - date and time created 98/08/16 22:47:48 by joerg - -Sun Aug 16 23:47:06 1998 Joerg Schilling - * cdrecord.h 1.38 - misc.c: timevaldiff() new - -Sun Aug 16 23:34:35 1998 Joerg Schilling - * scsi-bsd.c 1.7 - scsi_isatapi() new - /dev/scgx may be replaced by dev=/dev/xxx:0,0 - -Sun Aug 16 23:32:42 1998 Joerg Schilling - * scsitransp.h 1.13 - * scsitransp.c 1.27 - * scsi-sgi.c 1.9 - * scsi-aix.c 1.6 - * scsi-hpux.c 1.6 - scsi_isatapi() new - -Fri Jul 17 03:44:13 1998 Joerg Schilling - * scsihack.c 1.10 - BSDI new -> scsi-bsd-os.c - -Fri Jun 19 19:59:07 1998 Joerg Schilling - * scsitransp.h 1.12 - * scsitransp.c 1.26 - * scsihack.c 1.9 - * scsi-sgi.c 1.8 - * scsi-hpux.c 1.5 - * scsi-bsd.c 1.6 - * scsi-aix.c 1.5 - * scsi-linux-sg.c 1.19 - Use scsi_open(device, busno, tgt, tlun) with parameters - -Tue Jun 9 01:44:46 1998 Joerg Schilling - * drv_dvd.c 1.22 - korrekte Indizierung bei tracksize virtual tracklist - -Sat Jun 6 00:16:40 1998 Joerg Schilling - * port.c 1.7 - #include -> #include wegen sys/time.h - -Wed Jun 3 02:20:27 1998 Joerg Schilling - * cdrecord.1 1.31 - bytes= Option removed - Introduced Mailing List - -Wed Jun 3 02:18:47 1998 Joerg Schilling - * drv_dvd.c 1.21 - Treshold for printing the Virtual Trackliste corrected - Abort if first virt Track is not a multiple of the sectorsize - -Wed Jun 3 01:35:24 1998 Joerg Schilling - * diskid.c 1.4 - disk_rcap List new - -Wed Jun 3 01:04:49 1998 Joerg Schilling - * cdrecord.c 1.62 - CD -> CD/DVD - -Wed Jun 3 01:01:53 1998 Joerg Schilling - * cdrecord.c 1.61 - #if defined(_POSIX_PRIORITY_SCHEDULING) -> #if defined(_POSIX_PRIORITY_SCHEDULING) && !defined(HAVE_SYS_PRIOCNTL_H) bei LOCAL declaration - -Tue Jun 2 00:41:37 1998 Joerg Schilling - * drv_dvd.c 1.20 - attach_???() new now implementing the side effects from identify_???() - -Tue Jun 2 00:41:36 1998 Joerg Schilling - * drv_mmc.c 1.26 - attach_???() neu mit den Nebeneffekten aus identify_???() - -Mon Jun 1 23:34:26 1998 Joerg Schilling - * scsi_cdr.c 1.50 - Cast for malloc(): not every malloc() is void * - -Mon Jun 1 23:33:21 1998 Joerg Schilling - * drv_sony.c 1.19 - * drv_jvc.c 1.30 - * cdr_drv.c 1.8 - * cdrecord.h 1.37 - * cdrecord.c 1.60 - attach Routine now uses cdr_t * Parameter - -Mon Jun 1 22:24:42 1998 Joerg Schilling - * drv_dvd.c 1.19 - * scsilog.c 1.2 - Superfluous & in a_to_u_short() removed - -Sun May 31 21:38:00 1998 Joerg Schilling - * scsihack.c 1.8 - OSF1 new - -Sun May 31 01:45:04 1998 Joerg Schilling - * scsitransp.c 1.25 - void * cast for valloc() return - -Sun May 31 00:39:54 1998 Joerg Schilling - * cdrecord.c 1.59 - Casts for tracksize & padsize - -Sat May 30 23:12:56 1998 Joerg Schilling - * drv_simul.c 1.3 - Verbose Message for islast - -Sat May 30 00:35:26 1998 Joerg Schilling - * cdrecord.c 1.58 - tracksize & padsize -> LLong - -Fri May 29 00:32:30 1998 Joerg Schilling - * cdrecord.c 1.57 - astoll() & getllnum() new - number() -> LLong - -Fri May 29 00:05:29 1998 Joerg Schilling - * cdrecord.1 1.30 - waw in .wav Typo - -Fri May 29 00:03:32 1998 Joerg Schilling - * drv_dvd.c 1.18 - Better comment and housekeeping - -Thu May 28 01:08:06 1998 Joerg Schilling - * drv_dvd.c 1.17 - next_wr_addr_dvd() now correct with read_rzone_info() - -Thu May 28 00:02:01 1998 Joerg Schilling - * drv_dvd.c 1.16 - Verbose level documented - set ds_maxblocks from rzone_info - rzone_size() new - phys size computation corrected - -Tue May 26 04:16:55 1998 Joerg Schilling - * drv_dvd.c 1.15 - Speed code removed - -Tue May 26 04:03:55 1998 Joerg Schilling - * drv_dvd.c 1.14 - Removed lines that have been commented out - -Tue May 26 04:01:03 1998 Joerg Schilling - * drv_dvd.c 1.13 - dvd check in identify_dvd() later - -Tue May 26 03:58:57 1998 Joerg Schilling - * drv_dvd.c 1.12 - fcntl.h - errno.h - sys/file.h removed - -Tue May 26 03:56:48 1998 Joerg Schilling - * drv_dvd.c 1.11 - scsiprbytes() with lverbose > 1 - multi Track Hack indented - -Tue May 26 03:49:19 1998 Joerg Schilling - * drv_dvd.c 1.10 - Superfluous Debugs in SCSI routines removed - -Tue May 26 00:02:51 1998 Joerg Schilling - * cdrecord.c 1.56 - checktsize() with Llong for total Tracksize in Bytes - checkdsize() now computed the remaining rest capacity - -Mon May 25 04:40:51 1998 Joerg Schilling - * drv_dvd.c 1.9 - Computations of the track split code -> long long - MAX tracks -> 99 - -Mon May 25 04:35:54 1998 Joerg Schilling - * drv_dvd.c 1.8 - close_Xtrack_dvd() code -> fixate_dvd() - -Mon May 25 04:30:05 1998 Joerg Schilling - * drv_dvd.c 1.7 - send_dvd_structure() & send_dvd0F() new - -Mon May 25 03:46:30 1998 Joerg Schilling - * drv_dvd.c 1.6 - print_laserlog() new - print_logpages() new - -Mon May 25 03:42:16 1998 Joerg Schilling - * drv_dvd.c 1.5 - przone() new - print_dvd00()/print_dvd01()print_dvd04()/print_dvd05()/print_dvd0D()/print_dvd0E()print_dvd0F() new - now reads 4096 Bytes DVD structure - -Mon May 25 03:17:14 1998 Joerg Schilling - * drv_dvd.c 1.4 - print_dvd_info() new - -Mon May 25 02:31:56 1998 Joerg Schilling - * scsilog.c 1.1 - date and time created 98/05/25 01:31:56 by joerg - -Mon May 25 02:05:22 1998 Joerg Schilling - * scsimmc.h 1.3 - rzone_info new - dvd_structure_XX new - -Sat May 23 22:41:54 1998 Joerg Schilling - * drv_simul.c 1.2 - #include unixstd.h new - -Sat May 23 21:32:13 1998 Joerg Schilling - * scsi_cdr.c 1.49 - New Mode Page 2A Heuristic (min length 0x14 -> 0x10): ATAPI LITEON only gives 0x12: No Write Speed. - -Wed May 20 23:49:35 1998 Joerg Schilling - * cdrecord.c 1.55 - islast bug (|| instead of &&) fixed - bytes= Option removed - -Tue May 19 04:11:02 1998 Joerg Schilling - * drv_dvd.c 1.3 - struct disk_info & struct track_info -> scsimmc.h - scsilog.h new - -Sat May 16 13:15:21 1998 Joerg Schilling - * scsimmc.h 1.2 - u_char -> Uchar - -Sun May 10 00:12:04 1998 Joerg Schilling - * scsimmc.h 1.1 - date and time created 98/05/09 23:12:04 by joerg - -Sun May 10 00:04:17 1998 Joerg Schilling - * auheader.h 1.2 - generic Copyright comment - -Sun May 10 00:02:27 1998 Joerg Schilling - * drv_mmc.c 1.25 - Strukturdefinitionen -> scsimmc.h - -Thu May 7 22:43:07 1998 Joerg Schilling - * scsi_cdr.c 1.48 - strindex() -> strbeg() - vendor_info / prod_ident / prod_revision new because of array index problems - Kodak PCD-600 new - -Thu May 7 21:38:58 1998 Joerg Schilling - * cdrecord.h 1.36 - getnum() now extern - is_mmc() with DVD recognition - disk_rcap() new - -Thu May 7 21:38:13 1998 Joerg Schilling - * cdr_drv.c 1.7 - DRV_DVD new - cdr_kodak_pcd600 / cdr_cdr_simul / cdr_dvd_simul new - DEV_PIONEER_DVDR_S101 new - DVD recognition in is_mmc() nee - -Thu May 7 21:15:19 1998 Joerg Schilling - * cdrecord.c 1.54 - 1.6 -> 1.7a1 - getnum() LOCAL -> EXPORT - test_unit_ready() before load Medium - Allow Medium removal if not ready on load_media() - -Thu May 7 10:43:00 1998 Joerg Schilling - * diskid.c 1.3 - Vendor list actualalized - -Wed May 6 02:52:16 1998 Joerg Schilling - * cdrecord.1 1.29 - simulation driver documented - -Wed May 6 02:41:33 1998 Joerg Schilling - * audiosize.c 1.9 - .wav files that are smaller than expected are handled correctly - -Mon May 4 02:09:55 1998 Joerg Schilling - * drv_dvd.c 1.2 - Function names *_mmc -> *_dvd - ds_maxblock -> ds_maxblocks - getdisktype_dvd() now includes more tests - write_type -> WT_SAO - Hack for virtual track list - -Sun May 3 19:37:17 1998 Joerg Schilling - * scsi_cdr.c 1.47 - mode_select_sg0()/mode_sense_sg0() cnt usage corrected - mode_sense_sg0() movebytes() count corrected - -Sat May 2 00:46:07 1998 Joerg Schilling - * drv_simul.c 1.1 - date and time created 98/05/01 23:46:07 by joerg - -Fri May 1 19:26:22 1998 Joerg Schilling - * scsi_cdr.c 1.46 - DEV_PCD_600 new - is_mmc() now uses dvdp Arg - -Fri May 1 19:08:34 1998 Joerg Schilling - * scsidefs.h 1.18 - PCD_600 new - -*************** Release 1.6 ******************* - -Fri Apr 17 12:53:59 1998 Joerg Schilling - * scsi_cdr.c 1.45 - & before ibuf removed because it is an array - -Fri Apr 17 12:45:38 1998 Joerg Schilling - * scsi_cdr.c 1.44 - min/sec/frame -> amin/asec/aframe because of min() Macro - -Thu Apr 16 01:43:26 1998 Joerg Schilling - * cdrecord.1 1.26 - -ignsize new - web page for cdrecord added - -Thu Apr 16 00:55:39 1998 Joerg Schilling - * diskid.c 1.2 - Print if Manufacturer is in none of the tables - -Thu Apr 16 00:52:13 1998 Joerg Schilling - * drv_mmc.c 1.24 - ds_maxblock -> ds_maxblocks - do get_atip() always, but print if lverbose is set - -Thu Apr 16 00:32:50 1998 Joerg Schilling - * cdrecord.h 1.35 - * cdrecord.c 1.53 - ds_maxblock -> ds_maxblocks - new Option -ignsize - -Thu Apr 16 00:31:32 1998 Joerg Schilling - * drv_jvc.c 1.29 - * drv_philips.c 1.16 - ds_maxblock -> ds_maxblocks - -Sun Apr 12 16:14:07 1998 Joerg Schilling - * scsi_cdr.c 1.43 - Smart & Friendly CD-R4012 (TEAC CDR-55S) new - -Sun Apr 12 02:15:15 1998 Joerg Schilling - * scsitransp.c 1.24 - scsiprintcdb()/scsiprintwdata()/scsiprintrdata() new - print scsiprintcdb() on errors - -Sun Apr 12 01:58:26 1998 Joerg Schilling - * cdrecord.h 1.34 - * cdrecord.c 1.52 - Real Blocks new - 1.6a14 -> 1.6 - -Wed Apr 1 03:28:36 1998 Joerg Schilling - * cdrecord.c 1.51 - checkgui() now has verbose print - -Wed Apr 1 01:36:59 1998 Joerg Schilling - * drv_jvc.c 1.28 - lberbose > 1 for all subcode Messages - teac_wr_pma()/teac_rd_pma() new - JVC Errorcodes new - check for cdrecord -fix without Parameter - hide Illegal Command errorcode for next_wr_addr_teac() - -Wed Apr 1 01:29:49 1998 Joerg Schilling - * scsitransp.c 1.23 - * scsi_cdr.c 1.42 - * drv_mmc.c 1.23 - GCC Warnings removed: printf format errors - -Tue Mar 31 20:58:07 1998 Joerg Schilling - * cdrecord.c 1.50 - ->1.6a14, LOAD & EJECT works for CD-ROM too - GUI test on STDERR - first Trackno -> track[0] as Hack - -Tue Mar 31 20:56:43 1998 Joerg Schilling - * cdrecord.1 1.25 - CREDITS - better Documentation for tsize= & TEAC - -Sun Mar 29 15:31:08 1998 Joerg Schilling - * cdrecord.1 1.24 - -vv/-VV mods - -fix: not for TEAC - -load new - timeout= Option - tsize= description because of tracksize and TEAC - nice/SunOS -> nice/others - -Sun Mar 29 15:26:19 1998 Joerg Schilling - * drv_philips.c 1.15 - open_session() with tracks & trackp Parameters - Philips CDD-521 old/dumb new - Pioneer DW-S114X new - -Sun Mar 29 15:22:29 1998 Joerg Schilling - * drv_mmc.c 1.22 - open_session() with tracks & trackp Parameters - Check for zeroed ATIP Info - wait_unit_ready() for ATAPI - sorry not working - -Sat Mar 28 23:43:07 1998 Joerg Schilling - * cdrecord.c 1.49 - check_recovery() now uses flags for unload_media() - call unload_media() on input buffer, wait error, and for blank media error - open_session() now usees tracks & trackp Parameters for Sizecheck - Printing of is_swab() with audio fixed - -Sat Mar 28 23:22:30 1998 Joerg Schilling - * drv_jvc.c 1.27 - teac_open_session() checks tracksize ( <= 0 is not possible) - -Sat Mar 28 23:21:08 1998 Joerg Schilling - * scsi_cdr.c 1.41 - wait_unit_ready() now handles BUSY - mode_sense_sg0() movebytes() count handling corrected (amt-4) - better (komplete) Inquiry printing with -V - JVC XR-W2001 / Plilips CDD521/00 / Traxdata CDR4120 / Pioneer CD-WO DW-S114X / Pinnacle RCD-1000 new - -Sat Mar 28 23:06:05 1998 Joerg Schilling - * scsireg.h 1.18 - SCSI Status codes - -Fri Mar 27 01:04:50 1998 Joerg Schilling - * drv_sony.c 1.18 - * cdrecord.h 1.33 - open_session() with tracks & trackp parameters - -Thu Mar 26 22:42:29 1998 Joerg Schilling - * cdr_drv.c 1.6 - Pioneer DW-S 114, old Philips, dumb Philips new - -Tue Mar 24 21:30:08 1998 Joerg Schilling - * cdrecord.h 1.32 - is_*() Macros now clearer: != 0 - -Tue Mar 24 21:29:18 1998 Joerg Schilling - * scsidefs.h 1.17 - DEV_CDD_521_OLD new - -Mon Mar 16 00:48:34 1998 Joerg Schilling - * drv_dvd.c 1.1 - date and time created 98/04/20 00:48:34 by joerg - -Sat Mar 14 17:49:09 1998 Joerg Schilling - * scsi-bsd.c 1.5 - MAX_DMA_BSD 64k -> 60k - -Thu Mar 12 23:48:19 1998 Joerg Schilling - * drv_jvc.c 1.26 - set ds_maxblock - next_wr_addr_jvc() uses read_B0() if track == 0 - use trackp[i].trackno for TOC - Lead-out Start time now uses frames - teac_calibrate() inits lba_addr from read_B0() - next_wr_addr_teac() with Parameters - -Thu Mar 12 23:42:09 1998 Joerg Schilling - * cdrecord.c 1.48 - use real Track nubmers - -v/-V now Inc type Flag - print remaining capacity - Pregapsize || bug fixed - Trackno in struct track - wait_unit_ready() new - -Thu Mar 12 23:35:26 1998 Joerg Schilling - * drv_philips.c 1.14 - Print computed ATIP only for empty Disk - ATIP printout now prints Lead-out start time too - compute Disk capacity - -Thu Mar 12 22:33:50 1998 Joerg Schilling - * drv_sony.c 1.17 - close_track_sony() -> track = 0 ! - mode_sense() -> get_mode_params() - -Thu Mar 12 22:24:10 1998 Joerg Schilling - * cdrecord.h 1.31 - Strukt track now includes trackno - CDR_DVD new - from_bcd()/to_bcd() new - wait_unit_ready() new - read_B0() new - -Thu Mar 12 22:20:40 1998 Joerg Schilling - * scsi_cdr.c 1.40 - unit_ready() now checks for UNIT_ATTENTION - wait_unit_ready() new - toc struktures char -> Uchar - read_tochdr()/read_trackinfo() may have NULL Pointer Args - read_B0() new - -Thu Mar 12 22:12:16 1998 Joerg Schilling - * scsitransp.c 1.22 - Print data if verbose > 1 - -Thu Mar 12 01:21:58 1998 Joerg Schilling - * cd_misc.c 1.2 - from_bcd()/to_bcd() new - -Tue Mar 10 00:07:50 1998 Joerg Schilling - * cdrecord.c 1.47 - * drv_mmc.c 1.21 - checkgui() & isgui new - -Mon Mar 9 23:29:02 1998 Joerg Schilling - * drv_mmc.c 1.20 - Read ATIP non-fatal - warnung in fixation with correct lverbose flag - -Sun Mar 8 15:02:13 1998 Joerg Schilling - * scsi_cdr.c 1.39 - SAF CD-R2006PRO CD-R2006, JVC R2626 new - -Sun Mar 8 14:59:31 1998 Joerg Schilling - * cdrecord.c 1.46 - Default Timeout -> 40s - flags int -> long - new Option -load - Print Lead-out start - 90 Min value corrected - -Sun Mar 8 14:56:53 1998 Joerg Schilling - * cdrecord.h 1.30 - fsamples()/frames() new - -Fri Mar 6 01:11:56 1998 Joerg Schilling - * scsitransp.c 1.21 - print SCSI command names before ABORT - -Thu Mar 5 01:15:26 1998 Joerg Schilling - * scsierrs.c 2.15 - referres -> refers - -Thu Mar 5 01:15:02 1998 Joerg Schilling - * scsitransp.h 1.11 - * scsitransp.c 1.20 - scsi_sense_qual() new - -Mon Mar 2 22:50:12 1998 Joerg Schilling - * drv_mmc.c 1.19 - msf_to_lba()/lba_to_msf() -> cd_misc.c - len += 2 to correct length for TOC & disk Info - failed read ATIP is no fatal error - better print_atip() - -Mon Mar 2 22:45:53 1998 Joerg Schilling - * cd_misc.c 1.1 - date and time created 98/03/02 22:45:53 by joerg - -Mon Mar 2 22:39:02 1998 Joerg Schilling - * cdrecord.h 1.29 - F_LOAD new - All Flags sorted - msf_to_lba()/lba_to_msf() new - -Mon Mar 2 22:36:10 1998 Joerg Schilling - * drv_philips.c 1.13 - philips_getlilo() new - print disk manufacturer new - -Mon Mar 2 21:56:53 1998 Joerg Schilling - * scsi_cdr.c 1.38 - Pinnacle RCD 4X4, SAF CD-RW226 new - -Mon Feb 23 22:32:27 1998 Joerg Schilling - * scsi_cdr.c 1.37 - read_toc_philips() same parameters as read_toc() (ses -> fmt) - -Mon Feb 23 22:30:57 1998 Joerg Schilling - * drv_mmc.c 1.18 - msf_to_lba() corrected (+-150 bug) - lba_to_msf() new - Check for Complete Disk: 0xFF:0xFF/0xFF - pr_manufacturer() new with lverbose - different Formatting - -Mon Feb 23 21:54:28 1998 Joerg Schilling - * cdrecord.c 1.45 - 80 Minute limit -> 90 Minutes - -Mon Feb 23 21:51:56 1998 Joerg Schilling - * diskid.c 1.1 - date and time created 98/02/23 21:51:56 by joerg - -Sun Feb 22 23:23:22 1998 Joerg Schilling - * fifo.c 1.10 - fifo_percent() with Parameter - FIFO Bug (duoubling of a segment at end of writing) fixed - -Sun Feb 22 22:54:46 1998 Joerg Schilling - * cdrecord.c 1.44 - fifo_percent() with Parameter - unit_ready() for UNLOAD removed - print Disk capacity - -Sun Feb 22 22:52:53 1998 Joerg Schilling - * wm_packet.c 1.6 - fifo_percent() with Parameter - -Sun Feb 22 22:47:51 1998 Joerg Schilling - * cdrecord.h 1.28 - fifo_percent() with Parameter - msf_t typedef - pr_manufacturer() new - -Sun Feb 15 21:01:03 1998 Joerg Schilling - * audiosize.c 1.8 - getWavShort() & getWavLong() Definitions removed - -Tue Feb 10 01:00:48 1998 Joerg Schilling - * cdrecord.c 1.43 - New option timeout=# - -Mon Feb 9 12:44:40 1998 Joerg Schilling - * scsi-linux-sg.c 1.18 - timeout from 1/100 sec -> 1/HZ sec - -Sun Feb 8 21:56:01 1998 Joerg Schilling - * scsi-linux-sg.c 1.17 - Missing bracket at read() inserted - -Sun Feb 8 18:45:19 1998 Joerg Schilling - * scsi_cdr.c 1.36 - Tayo Yuden CD-WO EW-50 better Inquiry - -Sun Feb 8 15:52:15 1998 Joerg Schilling - * fifo.c 1.9 - fifo_percent() returns -1 if buflen == 0 - dummy fifo_percent() always -1 - -Sun Feb 8 15:50:43 1998 Joerg Schilling - * wm_packet.c 1.5 - * cdrecord.c 1.42 - Copyright -> 1998 - fs Reference in fifo_percent() removed - fifo_percent() in wm_packet new - -Sun Feb 8 13:54:25 1998 Joerg Schilling - * cdrecord.1 1.23 - fs= - administrative part - .au & .wav description - better -swab description - -Sun Feb 8 13:30:33 1998 Joerg Schilling - * scsi-linux-sg.c 1.16 - Fix for sendcommand() befor scsi_getbuf() call - read() < 0 now handled - -Sun Feb 8 13:28:38 1998 Joerg Schilling - * audiosize.c 1.7 - Definitions for WAVE better - better WAV recognition from Dave - -Sat Feb 7 23:20:14 1998 Joerg Schilling - * drv_jvc.c 1.25 - close_track_teac() fixed only audio uses no run-out blocks - -Sat Feb 7 23:18:43 1998 Joerg Schilling - * cdrecord.c 1.41 - rezero_unit() now silent not supported by all drives - -Sat Feb 7 23:14:03 1998 Joerg Schilling - * scsi_cdr.c 1.35 - Kodak CDR-240 new - -Sun Feb 1 23:17:33 1998 Joerg Schilling - * fifo.c 1.8 - HAVE_SHM -> HAVE_USGSHM was a typo - -Sun Feb 1 21:20:48 1998 Joerg Schilling - * scsi_cdr.c 1.34 - DVD enhancements in mmv_getval() & print_capabilities() - -Sun Feb 1 20:35:06 1998 Joerg Schilling - * scsireg.h 1.17 - DVD Definitions in Mode Page 2A - -Sun Feb 1 19:56:10 1998 Joerg Schilling - * scsi-linux-sg.c 1.15 - scsi_getbuf() hat nun char *ret wegen pointer Aritmetik - sizeof() cast comparison to int - scsi_send(): superfluous ; before scsi_settimeout() removed - -Sun Feb 1 19:45:21 1998 Joerg Schilling - * cdrecord.c 1.40 - filename new in struct track - Errorcode and exit() in audio*size() - -Sun Feb 1 19:44:08 1998 Joerg Schilling - * auheader.h 1.1 - date and time created 98/02/01 19:44:08 by joerg - -Sun Feb 1 19:44:00 1998 Joerg Schilling - * audiosize.c 1.6 - auheader.h new - Errorcodes - -Sun Feb 1 19:43:26 1998 Joerg Schilling - * cdrecord.h 1.27 - filename new in struct track - cd_mode_page_2A *cdr_cdcap new in struct cdr_cmd - -Sun Feb 1 19:42:28 1998 Joerg Schilling - * drv_philips.c 1.12 - * drv_sony.c 1.16 - * drv_mmc.c 1.17 - * drv_jvc.c 1.24 - cd_mode_page_2A *cdr_cdcap new in struct cdr_cmd - -Sun Feb 1 16:03:29 1998 Joerg Schilling - * drv_mmc.c 1.16 - ATIP Enhanced - -Sun Feb 1 15:56:31 1998 Joerg Schilling - * drv_mmc.c 1.15 - mmv_check() -> mmc_cap()/mmc_getval() - Handle non-trayload drives - warning for dummy/verbose while fixating - -Sun Feb 1 15:49:17 1998 Joerg Schilling - * scsidefs.h 1.16 - DEV_MMC_DVD, DEV_PIONEER_DVDR_S101 new - -Sun Feb 1 15:46:50 1998 Joerg Schilling - * scsi_cdr.c 1.33 - mmc_getval() & mmv_check() with dvdp - DEV_MMC_DVD new - Pioneer DVD-R S101, TEAC CD-R55S new - allow_atapi() in print_capabilities() - heuristic with speed >= 176 according to mmc2 - -Sun Feb 1 15:46:17 1998 Joerg Schilling - * cdrecord.c 1.39 - better CD-Recorder warning - -Sun Feb 1 14:53:02 1998 Joerg Schilling - * cdrecord.c 1.38 - Honour file sizes - better usage() Output - .au & .wav Filesize recognition - early recognition of "incompatible medium" - sched_setscheduler() error code (< 0) is correct - -Sun Feb 1 14:39:27 1998 Joerg Schilling - * cdrecord.h 1.26 - mmc_getval() & mmv_check() with dvdp - TI_WAV & is_wav() removed - -Sun Feb 1 14:33:39 1998 Joerg Schilling - * audiosize.c 1.5 - Complete recognition of a Wavheader (with Hilfe from Heiko) - -Mon Jan 26 01:56:21 1998 Joerg Schilling - * scsi-aix.c 1.4 - valloc() re-implemented (not available in AIX libc) - scsi sense handling ready - -Mon Jan 26 01:51:58 1998 Joerg Schilling - * scsi_cdr.c 1.32 - mmc_cap(), mmc_getval() new - Strings for printcap() static for K&R - -Mon Jan 26 01:07:27 1998 Joerg Schilling - * audiosize.c 1.4 - Filesize - header for Sun .au Files, data_size is not always correct - -Sun Jan 25 23:08:00 1998 Joerg Schilling - * audiosize.c 1.3 - Sun .au Header new - -Sun Jan 25 22:58:58 1998 Joerg Schilling - * cdrecord.h 1.25 - TI_NOWAV -> TI_NOAUHDR, is_auname() & ausize() new - -Sun Jan 25 18:10:47 1998 Joerg Schilling - * cdrecord.h 1.24 - TI_NOWAV, mmc_cap() & mmg_getval(), is_wavname() new - -Sun Jan 25 16:16:23 1998 Joerg Schilling - * audiosize.c 1.2 - is_wavname() new - -Sun Jan 25 16:02:26 1998 Joerg Schilling - * audiosize.c 1.1 - date and time created 98/01/25 16:02:26 by joerg - -Sun Jan 25 13:38:40 1998 Joerg Schilling - * drv_jvc.c 1.23 - Errortexts for CD-R55S - -Sat Jan 24 17:52:52 1998 Joerg Schilling - * wm_packet.c 1.4 - * fifo.c 1.7 - Honour file sizes - -Fri Jan 23 02:08:22 1998 Joerg Schilling - * scsi-linux-sg.c 1.14 - scsi_initdev() new to allow concurrent cdrecord's - -Fri Jan 23 02:04:01 1998 Joerg Schilling - * drv_jvc.c 1.22 - * drv_mmc.c 1.14 - * drv_sony.c 1.15 - * scsireg.h 1.16 - * scgio.h 2.12 - Uint for Bitfields -> Ucbit - -Sun Jan 18 14:25:01 1998 Joerg Schilling - * scsitransp.c 1.19 - flush() calls to correctly mix stderr/stdout - -Sun Jan 18 14:23:33 1998 Joerg Schilling - * cdrecord.h 1.23 - TI_WAV, is_wav(), wavsize() nee - -Sat Jan 17 22:07:03 1998 Joerg Schilling - * cdrecord.1 1.22 - * cdrecord.c 1.37 - -reset Option new - -Sat Jan 17 21:53:58 1998 Joerg Schilling - * cdrecord.h 1.22 - F_RESET, F_PRATIP, F_PRDINFO, SES_UNDEF new - Definitios for disk status and session status - dstat_t enhanced - CDR_NOLOLIMIT & CDR_ALLOC new - fifo_percent(), allow_atapi(), mode_sense_??()/mode_select_??() new - -Sat Jan 17 21:35:54 1998 Joerg Schilling - * fifo.c 1.6 - undef FIFO if no shared mamory - SHM_LOCK for Linux - Stat buffer for fifosize - removed sp->cont because it is not secure (use diff) - fifo_percent() new - -Sat Jan 17 21:20:57 1998 Joerg Schilling - * cdrecord.c 1.36 - -reset new - fifo_percent() printing for -v - -Sat Jan 17 21:09:24 1998 Joerg Schilling - * cdrecord.1 1.21 - Better description of dev= and -scanbus - -Tue Dec 23 01:26:35 1997 Joerg Schilling - * scsi_cdr.c 1.31 - Plextor PX-R24CS - S&F CD-R2006PLUS - Wearns CDR-632P new - -Tue Dec 23 01:23:34 1997 Joerg Schilling - * scsi_cdr.c 1.30 - Uint in Bitfields -> Ucbit - -Thu Dec 11 19:30:31 1997 Joerg Schilling - * scsitransp.c 1.18 - Print command execution time for each failed (non-silent) command - -Sun Nov 9 18:33:48 1997 Joerg Schilling - * drv_mmc.c 1.13 - Remove get Page 0x2A for Matsushita CW-7502 - has_mode_page() checks "current" instead of "default" - -Sat Nov 8 16:11:51 1997 Joerg Schilling - * cdrecord.c 1.35 - Disk size check -> checkdsize() : new - -Fri Nov 7 00:02:20 1997 Joerg Schilling - * scsi-aix.c 1.3 - timeout counts in seconds - -Fri Nov 7 00:04:11 1997 Joerg Schilling - * scsireg.h 1.15 - * scgio.h 2.11 - * scsi_cdr.c 1.29 - * drv_sony.c 1.14 - * drv_mmc.c 1.12 - * drv_jvc.c 1.21 - u_char in Bitfields -> Uint - -Thu Nov 6 20:27:08 1997 Joerg Schilling - * scsihack.c 1.7 - Typo __AIX -> defined(_IBMR2) || defined(_AIX) - -Thu Nov 6 20:26:23 1997 Joerg Schilling - * scsi-aix.c 1.2 - sccsid[] -> __sccsid[], fd -> f Typo, #include - -Thu Nov 6 20:22:14 1997 Joerg Schilling - * cdrecord.1 1.20 - Typo corrected - -Thu Nov 6 20:19:26 1997 Joerg Schilling - * scsitransp.c 1.17 - * scsierrs.c 2.14 - * scsi_cdr.c 1.28 - * scsi.c 1.4 - * drv_sony.c 1.13 - * drv_philips.c 1.11 - * drv_mmc.c 1.11 - * drv_jvc.c 1.20 - #include for AIX - -Thu Nov 6 20:18:25 1997 Joerg Schilling - * cdrecord.c 1.34 - #ifdef RLIMIT_NOFILE fuer AIX - -Wed Nov 5 18:01:32 1997 Joerg Schilling - * cdrecord.1 1.19 - Better doc for fs= - -Wed Nov 5 17:57:50 1997 Joerg Schilling - * drv_mmc.c 1.10 - msf_to_lba() new, get_diskinfo() new, di_to_dstat() new, getdisktype_mmc() new, additions for Matsushita CW-7502 - -Wed Nov 5 17:43:41 1997 Joerg Schilling - * fifo.c 1.5 - switch -> if then else - -Wed Nov 5 17:15:45 1997 Joerg Schilling - * cdrecord.c 1.33 - init struct disk_status, better aritmetic for disk size - -Wed Nov 5 17:14:29 1997 Joerg Schilling - * fifo.c 1.4 - print FIFO min fill in percent - -Tue Nov 4 11:20:22 1997 Joerg Schilling - * scsi_cdr.c 1.26 - return (mode_select_g0(dp, cnt, smp, pf)) was missing in mode_select() - -Tue Nov 4 10:35:02 1997 Joerg Schilling - * scsi-linux-sg.c 1.13 - Check for NULL at return of valloc() - -Tue Nov 4 00:13:35 1997 Joerg Schilling - * drv_jvc.c 1.19 - New flag CDR_NO_LOLIMIT - -Sun Nov 2 16:17:10 1997 Joerg Schilling - * scsi_cdr.c 1.25 - SCSI mode(6/10) conversion for ATAPI, distinguish between S&F 2006PLUS / S&F 2006PLUS - -Sun Nov 2 14:57:57 1997 Joerg Schilling - * scsitransp.c 1.16 - Print finish time - -Sun Nov 2 14:54:50 1997 Joerg Schilling - * scgio.h 2.10 - i_to_4_byte new - -Thu Oct 23 19:21:19 1997 Joerg Schilling - * scsihack.c 1.6 - AIX Support - -Thu Oct 23 19:20:25 1997 Joerg Schilling - * scsi-aix.c 1.1 - date and time created 97/10/23 18:20:25 by joerg - -Thu Oct 23 19:12:02 1997 Joerg Schilling - * drv_mmc.c 1.9 - Enhancements for packet writing - -Thu Oct 23 01:35:02 1997 Joerg Schilling - * cdrecord.1 1.18 - New options -prcap, -packet, pktsize =#, -noclose - -Wed Oct 22 23:50:44 1997 Joerg Schilling - * drv_jvc.c 1.18 - * wm_packet.c 1.3 - * cdrecord.c 1.32 - fflush(stdout) -> flush(), flush() after Fixating... - -Wed Oct 22 23:49:12 1997 Joerg Schilling - * scsi_cdr.c 1.24 - scsi_close-session() -> scsi_close_tr_session() - -Wed Oct 22 23:49:11 1997 Joerg Schilling - * cdrecord.h 1.21 - scsi_close-session() -> scsi_close_tr_session() - -Sun Oct 19 15:41:35 1997 Joerg Schilling - * scsi_cdr.c 1.23 - * cdrecord.c 1.31 - Prevent medium removal problems fixed (read TOC) & Matsushita CD-750? - -Sun Oct 19 15:40:32 1997 Joerg Schilling - * scsidefs.h 1.15 - Matsushita CW-7501 & CW-7502 - -Sun Oct 19 02:08:53 1997 Joerg Schilling - * drv_sony.c 1.12 - * drv_philips.c 1.10 - * drv_jvc.c 1.17 - * wm_packet.c 1.2 - * cdrecord.h 1.20 - * cdrecord.c 1.30 - next_wr_address() has track_t * added - -Sun Oct 19 01:37:02 1997 Joerg Schilling - * drv_jvc.c 1.16 - read_disk_info() -> read_disk_info_teac(), zero pre-gap audio support, opt_power_judge() timeout -> 60 sec - -Sun Oct 19 01:33:21 1997 Joerg Schilling - * scsi_cdr.c 1.22 - read_disk_info() new, print_capabilities() new - -Sun Oct 19 00:40:36 1997 Joerg Schilling - * cdrecord.c 1.29 - * cdrecord.h 1.19 - get_buf() new, -prcap & print_capabilities() new, -packet new, pktsize=# new - -Sun Oct 19 00:36:32 1997 Joerg Schilling - * wm_track.c 1.1 - * wm_session.c 1.1 - * wm_packet.c 1.1 - date and time created 97/10/18 23:36:31 by joerg - -Sat Oct 18 19:14:05 1997 Joerg Schilling - * scsi.c 1.3 - stdlib.h -> stdxlib.h, unistd.h -> unixstd.h - -Sat Oct 18 01:34:19 1997 Joerg Schilling - * modes.c 1.3 - Ausgabe der Mode Parameter wenn mode_select() nicht klappt & return FALSE - -**** 1.6a3 *** - -Sun Oct 12 20:00:21 1997 Joerg Schilling - * cdrecord.1 1.17 - * cdrecord.c 1.28 - New options pregap= defpregap= - -Sun Oct 12 19:30:45 1997 Joerg Schilling - * cdrecord.h 1.18 - is_first() & is_last() new - -Sat Oct 11 18:01:28 1997 Joerg Schilling - * cdrecord.c 1.27 - islast debug printf deleted - -Sat Oct 11 17:57:43 1997 Joerg Schilling - * scsi_cdr.c 1.21 - * drv_sony.c 1.11 - * drv_philips.c 1.9 - * drv_mmc.c 1.8 - * drv_jvc.c 1.15 - * cdrecord.h 1.17 - * cdrecord.c 1.26 - islast for TEAC & no run-out blocks for disksize computing - -Sat Oct 11 14:54:03 1997 Joerg Schilling - * drv_jvc.c 1.14 - OLD_CLOSE_TRACK re-aktiviert, clear_subcode() in open_track(), set_limits() in open_track() for audio without run-out, dummy sector -> static to be zeroed - -Thu Oct 9 14:14:24 1997 Joerg Schilling - * drv_jvc.c 1.13 - Audio Tracks have no link&run-in - -Thu Oct 9 02:01:23 1997 Joerg Schilling - * drv_jvc.c 1.12 - SWABAUDIO Flag new - -Wed Oct 8 17:24:40 1997 Joerg Schilling - * scsi_cdr.c 1.20 - * drv_sony.c 1.10 - * drv_philips.c 1.8 - * drv_mmc.c 1.7 - * cdrecord.h 1.16 - * cdrecord.c 1.25 - Modification of data structures for JVC/TEAC - -Wed Oct 8 17:23:41 1997 Joerg Schilling - * fifo.c 1.3 - WRITER_MAXWAIT 20 -> 120 s - -Wed Oct 8 17:14:04 1997 Joerg Schilling - * drv_jvc.c 1.11 - Enhancements for audio and multi track disks - -Wed Oct 8 14:48:06 1997 Joerg Schilling - * cdrecord.1 1.16 - Better doc for padsize & fs= - -Mon Oct 6 20:37:39 1997 Joerg Schilling - * drv_jvc.c 1.10 - Modified to use pad_track() - -Mon Oct 6 20:32:11 1997 Joerg Schilling - * cdrecord.c 1.24 - In pad_track(): if (bytesp != 0) check was missing ->coredump - -Mon Oct 6 20:29:22 1997 Joerg Schilling - * scsi_cdr.c 1.19 - SMART&FRIENDLY CD-R2006 - -Sun Oct 5 16:53:45 1997 Joerg Schilling - * drv_mmc.c 1.6 - verbose printing modified - -Sun Oct 5 16:53:09 1997 Joerg Schilling - * cdrecord.c 1.23 - Check for bytesp != 0 in pad_track() - -Sat Oct 4 01:09:56 1997 Joerg Schilling - * cdrecord.c 1.22 - realtime raisepri Problem for HP-UX fixed (function present bot not working) - -Fri Oct 3 21:33:13 1997 Joerg Schilling - * scsi_cdr.c 1.18 - * drv_sony.c 1.9 - * drv_philips.c 1.7 - * drv_mmc.c 1.5 - * drv_jvc.c 1.9 - * cdrecord.h 1.15 - * cdrecord.c 1.21 - * cdrecord.1 1.15 - * cdr_drv.c 1.5 - new option blank=type for CD-RW - -Fri Oct 3 16:23:00 1997 Joerg Schilling - * cdrecord.c 1.20 - pad_track() new, await_faio() new & init_faio() befor wait loop, always pad to 300 sectors , padsize= option new, DEFAULT_FIFOSIZE new - -Thu Oct 2 02:02:10 1997 Joerg Schilling - * fifo.c 1.2 - MIN_BUFFERS -> 3, await_faio() new, kill_faio() new, stdin EOF check, Messages only for debug - -Thu Oct 2 01:38:39 1997 Joerg Schilling - * cdrecord.1 1.14 - padsize Option new, nice --18 bug, 's' & 'f' mult for getnum() - -Thu Oct 2 01:31:28 1997 Joerg Schilling - * drv_jvc.c 1.8 - sleep()'s added to cure fixating problems ??? - -Thu Oct 2 01:19:46 1997 Joerg Schilling - * cdrecord.h 1.14 - DEFAULT_FIFOSIZE, roundup(), tracksize & padsize -> long, pad_track() new, await_fifo() & kill_fifo() new, minutes() cast to int - -Wed Sep 24 00:02:39 1997 Joerg Schilling - * cdrecord.c 1.19 - Fifo & tracksize Option - -Tue Sep 23 23:46:27 1997 Joerg Schilling - * scsi-sgi.c 1.7 - Bug with resid != 0 fixed - -Sun Sep 21 23:20:15 1997 Joerg Schilling - * cdrecord.1 1.13 - fs= Option, tsize= Option, mkisofs | cdrecord with fs= EXAMPLE - -Sun Sep 21 22:58:34 1997 Joerg Schilling - * fifo.c 1.1 - date and time created 97/09/21 21:58:34 by joerg - -Sun Sep 21 22:45:08 1997 Joerg Schilling - * cdrecord.h 1.13 - faio_get_buf() & fifo_stats() - -Sun Sep 21 01:12:43 1997 Joerg Schilling - * cdrecord.h 1.12 - fifo code - -Wed Sep 17 13:55:57 1997 Joerg Schilling - * drv_jvc.c 1.7 - Typo in cdr_write_teac() EXPORT -> LOCAL - -Wed Sep 17 13:55:06 1997 Joerg Schilling - * cdrecord.c 1.18 - raisepri() has Parameter (n below Max), _POSIX_PRIORITY_SCHEDULING, _POSIX_MEMLOCK - -*************** Release 1.5 ******************* - -Mon Sep 15 16:46:16 1997 Joerg Schilling - * README 1.9 - Anpassungen fuer release 1.5 - -Wed Sep 10 18:40:49 1997 Joerg Schilling - * cdrecord.c 1.17 - Print always Copyright except for -msinfo - -Wed Sep 10 18:12:59 1997 Joerg Schilling - * scsi_cdr.c 1.17 - Inquiry debug data indented - Mode Parameters only for verbose - -Wed Sep 10 17:57:32 1997 Joerg Schilling - * cdrecord.c 1.16 - Flags defs von cdrecord.c -> cdrecord.h - load_media() new - load/unload_madia() global - Track verbose output after inquiry - Test errorcodes while burning - Dummy blocks added for close_track() is not an error - -nofix Flag activated - Exit code for burning errors: -2 - Swabaudio automatic - -Wed Sep 10 17:43:12 1997 Joerg Schilling - * cdrecord.h 1.11 - Flag defs from cdrecord.c - getdisktype() with cdr_t * - load_media() new - load/unload_madia() global - -Wed Sep 10 17:42:13 1997 Joerg Schilling - * cdr_drv.c 1.4 - * drv_jvc.c 1.6 - getdisktype() with cdr_t * - -Wed Sep 10 17:41:02 1997 Joerg Schilling - * drv_philips.c 1.6 - philips_getdisktype() new for automatic eject on "Command Sequence Error" - -Wed Sep 10 16:50:56 1997 Joerg Schilling - * cdrecord.1 1.12 - Scsibus , typo removed - -Wed Sep 10 15:10:03 1997 Joerg Schilling - * cdrecord.1 1.11 - 1.4 -> 1.5 - -Wed Sep 10 15:04:26 1997 Joerg Schilling - * drv_sony.c 1.8 - new_track_sony() return valoe corrected - -Wed Sep 10 15:03:36 1997 Joerg Schilling - * cdrecord.1 1.10 - Changes for cdrecord-1.5 - -Thu Sep 4 19:26:00 1997 Joerg Schilling - * scsi-linux-sg.c 1.12 - Use channel on multi channel controlers - -Thu Sep 4 19:09:10 1997 Joerg Schilling - * drv_jvc.c 1.5 - * drv_sony.c 1.7 - * scsi_cdr.c 1.16 - inq.ansi_version -> inq.data_format for all mode_select() calls - for Philips CDD-522 (version == 1 , format == 2) - -Wed Sep 3 02:00:33 1997 Joerg Schilling - * scsi-linux-sg.c 1.11 - scsi_mapbus() new - better timeout handling - copy Struct now automatic Variable - Sense Data error = SCG_RETRYABLE - -Mon Sep 1 01:25:16 1997 Joerg Schilling - * scsi-sgi.c 1.6 - * scsi-linux-sg.c 1.10 - * scsi-hpux.c 1.4 - * scsi-bsd.c 1.4 - Last tuning make all implementations equal - Open only one file if possible. - Better bound checking - -Sun Aug 31 23:21:06 1997 Joerg Schilling - * scsi-hpux.c 1.3 - Array again has 8 Luns - havebus tests bounds - -Sun Aug 31 23:18:35 1997 Joerg Schilling - * scsi-sgi.c 1.5 - MAX_* introduced, open max 1 lun (for now) - -Sun Aug 31 20:14:02 1997 Joerg Schilling - * scsi-hpux.c 1.2 - MAX_LUN now 1 - -Sun Aug 31 20:10:25 1997 Joerg Schilling - * scsi-hpux.c 1.1 - date and time created 97/08/31 19:10:25 by joerg - -Sun Aug 31 18:00:16 1997 Joerg Schilling - * scsihack.c 1.5 - HP-UX added - -Tue Aug 26 19:37:15 1997 Joerg Schilling - * cdrecord.c 1.15 - init dp in main now correctly - -Tue Aug 26 17:50:20 1997 Joerg Schilling - * scsi-sgi.c 1.4 - Support complete without using -lds - -Tue Aug 26 17:47:35 1997 Joerg Schilling - * scsi_cdr.c 1.15 - scsibus/target/lun now now -1 if bus is scanned - to make sure that not ony one target can be opened. - -Tue Aug 26 17:46:22 1997 Joerg Schilling - * cdrecord.c 1.14 - test_unit_ready() after select_target() (SCANBUS) - -Tue Aug 26 01:47:41 1997 Joerg Schilling - * scsi-sgi.c 1.3 - unused includes removed - -Mon Aug 25 22:02:35 1997 Joerg Schilling - * scgio.h 2.9 - * scsitransp.c 1.15 - * scsi-sgi.c 1.2 - * scsi-linux-sg.c 1.9 - * scsi-bsd.c 1.3 - errno -> ux_errno in scg_cmd for POSIX multithread - -Mon Aug 25 21:27:55 1997 Joerg Schilling - * scsi-sgi.c 1.1 - date and time created 97/08/25 20:27:55 by joerg - -Mon Aug 25 18:10:12 1997 Joerg Schilling - * cdrecord.c 1.13 - raisepri() not always done - -Sun Aug 24 22:58:37 1997 Joerg Schilling - * drv_jvc.c 1.4 - First pre-aplha makes one data track only - -Sun Aug 24 17:03:05 1997 Joerg Schilling - * cdrecord.c 1.12 - New options: driver=name -checkdrive -inq -scanbus -nofix - set_trsizes() later - get_cdr_cmds() new - first simple sizecheck - "swap" output from print_data_track() removed - -Sun Aug 24 16:54:31 1997 Joerg Schilling - * cdrecord.h 1.10 - struct disk_status new - is_unknown_dev() new - is_mmc() new - mmc_check() new - set_cdrcmds() new - -Sun Aug 24 16:53:09 1997 Joerg Schilling - * scsi_cdr.c 1.14 - is_unknown_dev() new - is_mmc() new - mmc_check() new - open_scsi() modified for scsi_scan() - Device recognition new for CD-R - scsi_load() now correct - -Sun Aug 24 16:22:22 1997 Joerg Schilling - * cdrecord.1 1.9 - -nofix new - driver=name new - -checkdrive new - -inq new - -scanbus new - Sense Output uses new form - -Sun Aug 24 16:19:42 1997 Joerg Schilling - * drv_mmc.c 1.4 - CDR_SWABAUDIO new - cd_mode* pages -> scsireg.h - identify_mmc() uses mmc_check() - -Sun Aug 24 16:18:00 1997 Joerg Schilling - * cdr_drv.c 1.3 - set_cdrcmds() new - get_cdrcmds() enhanced - -Sun Aug 24 15:47:30 1997 Joerg Schilling - * drv_sony.c 1.6 - * drv_philips.c 1.5 - CDR_SWABAUDIO Flag new - -Sun Aug 24 14:51:43 1997 Joerg Schilling - * scsidefs.h 1.14 - CDD-2000 & CDD-2600 new - MMC Definitionen new - -Sun Aug 24 14:18:47 1997 Joerg Schilling - * scsireg.h 1.14 - CD mode pages 05 & 2A - -Sun Aug 10 19:29:38 1997 Joerg Schilling - * drv_philips.c 1.4 - * drv_sony.c 1.5 - * drv_mmc.c 1.3 - * cdrecord.h 1.9 - * cdrecord.c 1.11 - cdr_driver -> cdr_drname + cdr_drtext - open_track() with track_info * instead of many arguments - -Sun Aug 10 18:10:14 1997 Joerg Schilling - * scsi_cdr.c 1.13 - LOAD (A6) command now uses correct SCSI definition - -Sun Aug 10 17:43:35 1997 Joerg Schilling - * scsi-linux-sg.c 1.8 - Buffer overflow in sg_rq corrected - timeout corrected (semicolon past if) - 12 Byte Hack now OK - -Sun Aug 10 17:42:06 1997 Joerg Schilling - * scgio.h 2.8 - SCSI g5 command struct now ansi compliant - -Sun Aug 10 17:40:30 1997 Joerg Schilling - * scsihack.c 1.4 - SGI include - -Fri Jul 18 13:41:46 1997 Joerg Schilling - * scsi_cdr.c 1.12 - read_capacity() new - scsi_load_unload() new - scsi_set_sped() new - write_xg1() new - read_toc() for SCSI-3 new - read_toc_philips() from old name - read_track_info() -> read_track_info_philips() - read_track_info() new - scsi_close_session() new - first_writable_address() with address Pointer - read_tochdr() with cdr_t * ???? - read_session_offset() with offset Pointer + Version for SCSI-3 - is_cdrecorder() removed, Taiyo Yuden new - -Fri Jul 18 12:35:02 1997 Joerg Schilling - * scsi-linux-sg.c 1.7 - with new ioctl() SCSI_IOCTL_GET_BUS_NUMBER more SCSI busses - -Fri Jul 18 02:49:46 1997 Joerg Schilling - * cdrecord.1 1.8 - -version - better -isosize Doku - -multi warning removed - -Fri Jul 18 02:44:11 1997 Joerg Schilling - * cdrecord.c 1.10 - fix_it now past open_session() - next_writable_address() and read_session_offset() now with adress Pointer - -version usage() - superfluous argument removed with lout - -Fri Jul 18 02:31:23 1997 Joerg Schilling - * cdrecord.h 1.8 - * drv_mmc.c 1.2 - SCSI-3/mmc first implementation - -Fri Jul 18 02:25:10 1997 Joerg Schilling - * drv_jvc.c 1.3 - * drv_philips.c 1.3 - * drv_sony.c 1.4 - next_writable_address now has adress pointer - read_session_offset_philips() extracted - -Thu Jul 17 18:12:43 1997 Joerg Schilling - * scsi-bsd.c 1.2 - ifdef for BSD SENSE bug - -Thu Jul 17 17:43:10 1997 Joerg Schilling - * isosize.c 1.3 - filedescriptor sense (seek) test. - -Tue Jul 15 21:27:29 1997 Joerg Schilling - * isosize.c 1.2 - & before vd.vd_type deleted - -Tue Jul 15 21:26:57 1997 Joerg Schilling - * drv_sony.c 1.3 - & before mode deleted - -Tue Jul 15 21:16:46 1997 Joerg Schilling - * cdrecord.c 1.9 - version string - write_track_data() with startsec parameter - cd_recorder/drive recognition now uses cdr_t - print_toc() with cdr_t parameter - open_session() with multi parameter - Progress printing in write_track_data() now uses correct rounding - dbtype with -multi corrected - read_session_offset() with cdr_t parameter - print_toc() prints sector numbers correctly and 'lout' for 0xAA - -Tue Jul 15 13:34:04 1997 Joerg Schilling - * cdr_drv.c 1.2 - drive_identify may modify cdr_t struct pointer - Yamaha CDR-400 correct with cdr_mmc - -Tue Jul 15 13:24:49 1997 Joerg Schilling - * drv_philips.c 1.2 - * drv_jvc.c 1.2 - * drv_sony.c 1.2 - open_track() with dbtyp arg - open_session() with multi arg - struct cdr_t driver flags filled in - driver type string - -Tue Jul 8 19:42:42 1997 Joerg Schilling - * scsi-linux-sg.c 1.6 - /dev/sg0 ... tested too - -Tue Jul 8 18:00:39 1997 Joerg Schilling - * scsi-bsd.c 1.1 - date and time created 97/07/08 17:00:39 by joerg - -Tue Jul 8 17:59:20 1997 Joerg Schilling - * scsihack.c 1.3 - New Implementation for *BSD - -Sun Jun 22 19:58:40 1997 Joerg Schilling - * scsi_cdr.c 1.11 - Smart & Friendly Support - -*************** Release 1.4 ******************* - -Sat Mai 21 19:58:42 1997 Joerg Schilling - * cdrecord.1 1.7 - Updates for release 1.4 - -Sat Mai 21 18:11:25 1997 Joerg Schilling - * scsi.c 1.2 - scsireg.h Include - -Sat Mai 21 00:52:33 1997 Joerg Schilling - * drv_sony.c 1.1 - date and time created 97/05/20 23:52:33 by joerg - -Sat Mai 21 00:27:56 1997 Joerg Schilling - * drv_philips.c 1.1 - date and time created 97/05/20 23:27:56 by joerg - -Sat Mai 21 00:27:50 1997 Joerg Schilling - * drv_mmc.c 1.1 - date and time created 97/05/20 23:27:50 by joerg - -Sat Mai 21 00:27:43 1997 Joerg Schilling - * drv_jvc.c 1.1 - date and time created 97/05/20 23:27:43 by joerg - -Sat Mai 21 00:27:14 1997 Joerg Schilling - * scsi_cdr.c 1.10 - mode_select() uses inq.ansi_version >= 2 - -Sat Mai 21 00:26:42 1997 Joerg Schilling - * cdrecord.h 1.7 - attach_unknown() new - -Sat Mai 21 00:26:05 1997 Joerg Schilling - * cdr_drv.c 1.1 - date and time created 97/05/20 23:26:05 by joerg - -Thu Mai 19 23:46:54 1997 Joerg Schilling - * cdrecord.c 1.8 - Struct track -> cdrecord.h - DB_XXX Data block types - cdr_cmd Struct as Drive Abstraction Layer - -eject Flag - checktsize() new - CDR_SPEED & CDR_DEVICE - -Thu Mai 19 16:59:44 1997 Joerg Schilling - * cdrecord.h 1.6 - struct track from cdrecord.c - DB_XXX Data block types - cdr_cmd Struct as Drive Abstraction Layer - -Thu Mai 19 15:42:53 1997 Joerg Schilling - * scsi_cdr.c 1.9 - Prototypes lokal too - scsi_load_unload() -> load_unload_philips() - start_stop_unit() now with eject - close_track_philips() new - recover with track parameter - mode_sense() new - speed_select splitted - inquiry news new drives - scsi_cdr_write() - -Mon Mai 16 15:46:48 1997 Joerg Schilling - * config.h 1.1 - date and time created 97/05/16 14:46:48 by joerg - -Mon Mai 16 15:46:48 1997 Joerg Schilling - * scsi.c 1.1 - date and time created 97/05/16 14:46:48 by joerg - -Fri May 23 22:09:21 1997 Joerg Schilling - * scsitransp.c 1.14 - bad 2. Parameter in gettimeofday -> struct timezone * - -Fri Apr 23 22:08:16 1997 Joerg Schilling - * scsierrs.c 2.13 - missing %s in Formatstring added - -Wed Apr 14 00:54:03 1997 Joerg Schilling - * scsireg.h 1.13 - new scsi device types - -Wed Apr 14 00:53:28 1997 Joerg Schilling - * scsitransp.c 1.13 - scsireset() into hack part - scsi_setnonstderrs() new, scsierrmsg() chganges - new scsi devicetype codes, Solaris x86 dmasize without gethostid() - -Wed Apr 14 00:46:27 1997 Joerg Schilling - * scsitransp.h 1.10 - Changes for scsierrs.c enhancements - -Wed Apr 14 00:45:26 1997 Joerg Schilling - * scsierrs.c 2.12 - Enhancements for SCSI-2 & SCSI-3 - -Tue Apr 6 17:15:43 1997 Joerg Schilling - * scsidefs.h 1.13 - Different order & Yamaha CDR-400, Sony CDU-924, Ricoh RO-1420, Teac CD-R50 new - -Tue Apr 6 16:36:38 1997 Joerg Schilling - * scgio.h 2.7 - Enhancements for SCSI-2 & SCSI-3 - -Tue Apr 6 14:10:35 1997 Joerg Schilling - * scsi-linux-sg.c 1.5 - CCD-> CCS Typo - -Tue Apr 6 13:59:16 1997 Joerg Schilling - * scsihack.c 1.2 - scsireset() -> transport specific part - -Tue Apr 6 13:59:16 1997 Joerg Schilling - * scsi-linux-sg.c 1.4 - scsireset() -> transport specific part - -*************** Release 1.3 ******************* - -Fri Mar 4 19:48:35 1997 Joerg Schilling - * README 1.6 - Changes for Release 1.3 - -Fri Mar 4 18:57:02 1997 Joerg Schilling - * cdrecord.1 1.6 - release 1.3 - -Fri Mar 4 18:46:37 1997 Joerg Schilling - * cdrecord.1 1.5 - Changes for Release 1.3 - -Fri Mar 4 11:55:28 1997 Joerg Schilling - * scsi-linux-sg.c 1.3 - scsihack.c & scsi-linux-sg.c splitted - -Fri Mar 4 11:53:59 1997 Joerg Schilling - * scsihack.c 1.1 - date and time created 97/03/04 10:53:59 by joerg - -Fri Mar 4 11:52:42 1997 Joerg Schilling - * iso9660.h 1.2 - Quick hack for ANSI C - -Wed Mar 2 17:16:35 1997 Joerg Schilling - * scsi_cdr.c 1.8 - open_scsi() with verbose arg - write_track() & write_track_info() isaudio/preemp -> sectype - read_toc() new, read_header() new, read_track_info() new - first_writable_addr() now working - read_tochdr() new, read_trackinfo() new, read_session_offset() new - is_cddrive() new read_scsi() now korrekt with G0_MAXADDR & cnt < 256 - HACK XXX scsi_capacity to 2048 bytes Sectorsize initialized for mkisofs-1.10 - -Wed Mar 2 16:51:24 1997 Joerg Schilling - * scsitransp.c 1.12 - BAD -> EX_BAD, BOOL scsi_havebus() new - scsi_fileno(bus, tgt, lun) new with 3 Parameters, MAX_DMA_SUN386 new - -Wed Mar 2 16:46:44 1997 Joerg Schilling - * scsi-linux-sg.c 1.2 - better Kommentar - -Wed Mar 2 16:35:04 1997 Joerg Schilling - * scsitransp.h 1.9 - BOOL scsi_havebus() new, scsi_fileno(bus, tgt, lun) new with 3 Parameters - -Wed Mar 2 16:33:18 1997 Joerg Schilling - * scgio.h 2.6 - intriduced _SCGIO_H & bei __STDC__ 0xFF000000UL - -Wed Mar 2 16:14:35 1997 Joerg Schilling - * scsidefs.h 1.12 - BAD -> EX_BAD - -Wed Mar 2 16:14:04 1997 Joerg Schilling - * port.c 1.6 - include fmt.h only if #ifdef FMT - -Wed Mar 2 16:07:53 1997 Joerg Schilling - * scsi-linux-sg.c 1.1 - date and time created 97/03/02 15:07:53 by joerg - -Wed Mar 2 15:49:56 1997 Joerg Schilling - * iso9660.h 1.1 - date and time created 97/03/02 14:49:56 by joerg - -Wed Mar 2 15:48:55 1997 Joerg Schilling - * isosize.c 1.1 - date and time created 97/03/02 14:48:55 by joerg - -Wed Mar 2 15:40:32 1997 Joerg Schilling - * cdrecord.c 1.7 - toctname[] * sectname[] new - ldebug -> debug, HAVE_MLOCKALL, -msinfo new, -toc new - -audio/-mode2/-xa1/-xa2/-cdi new, -isosize new - better Check for options, print_msinfo() new, print_toc() new - HAVE_SYS_PRIOCNTL_H new - -Wed Mar 2 15:30:26 1997 Joerg Schilling - * cdrecord.h 1.5 - BAD -> EX_BAD in standard.h, TOC_* defines, ST_* defines, struct msf - several Interface changes for Prototypes - -Wed Jan 19 00:23:11 1997 Joerg Schilling - * cdrecord.c 1.6 - Changed to use scsi_buf_size() & scsi_getbuf(), better gcc Kompat. - -Wed Jan 12 23:11:18 1997 Joerg Schilling - * scsitransp.c 1.11 - Sbufsize -> long, scsi_maxdma() new - -Wed Jan 12 22:10:33 1997 Joerg Schilling - * scsitransp.h 1.8 - Sbufsize -> long - -Fri Jan 7 21:10:26 1997 Joerg Schilling - * port.c 1.5 - ANSI C & printf %ld - -Thu Jan 6 22:45:03 1997 Joerg Schilling - * scsitransp.h 1.7 - scsi_sense_key() & scsi_sense_code() from fmt.c - -Thu Jan 6 22:45:02 1997 Joerg Schilling - * scsitransp.c 1.10 - scsi_sense_key() & scsi_sense_code() from fmt.c - -Mon Jan 3 14:47:53 1997 Joerg Schilling - * scsitransp.h 1.6 - scsi_bufsize() & scsi_getbuf() new - -Mon Jan 3 14:47:52 1997 Joerg Schilling - * scsitransp.c 1.9 - scsi_bufsize() & scsi_getbuf() new - -Fri Dec 31 17:16:13 1996 Joerg Schilling - * scsireg.h 1.12 - Defekt List: length & list_block -> char[] for Byteorder - -Tue Dec 28 20:51:42 1996 Joerg Schilling - * scgio.h 2.5 - #error beseitigt for SunOS cc - -Tue Dec 28 14:28:01 1996 Joerg Schilling - * scsitransp.c 1.8 - debug -> kdebug - -Tue Dec 28 14:19:16 1996 Joerg Schilling - * scgio.h 2.4 - debug -> kdebug - -Sun Dec 19 16:18:18 1996 Joerg Schilling - * scsi_cdr.c 1.7 - Mitsumi - -Sun Dec 19 16:14:12 1996 Joerg Schilling - * README 1.5 - Performance X86 & Mitsumi - -Sat Dec 18 12:37:38 1996 Joerg Schilling - * scsierrs.c 2.11 - param.h, sys/buf.h, sun/dklabel.h, sun/dkio.h eliminated - -Sat Dec 18 03:26:04 1996 Joerg Schilling - * README 1.4 - Changes for Release 1.2 - -Sat Dec 18 03:24:14 1996 Joerg Schilling - * cdrecord.1 1.4 - Changes for Release 1.2 - -Sat Dec 18 03:13:41 1996 Joerg Schilling - * cdrecord.c 1.5 - -swab new - LOCAL functions - timings, new timeout for fixating - countdown timer before Start - write_track_info() disabled - -pad for audio, pad to 2352 bytes. - -Sun Dec 12 21:09:24 1996 Joerg Schilling - * scsi_cdr.c 1.6 - Flush cache & Fixation with big Timeout. - -Thu Nov 26 10:54:18 1996 Joerg Schilling - * scsierrs.c 2.10 - New Codes for CDD-2000 & Support for Yamaha CDR-100 - -Mon Dec 16 16:19:54 1996 J. Schilling - - * Added -swab option to support Yamaha audio - Thanks to (Fred) vecoven@montefiore.ulg.ac.be - for the hint. - * Added counter for quit time (9 seconds) - -Wed Dec 12 21:09:24 1996 J. Schilling - - * Flush cache & Fixation with separate bigger timeout, - other timeout reduced to 20sec. - -Mo Dec 3 13:03:30 1996 J. Schilling - - * Set sector size on all drive types before writing, - * Omwith the write_track_info Mode Select before write_track - even for Philips drives (this is currently not needed because - we don't support ISRC codes at this time). - -Tue Nov 26 10:54:18 1996 J. Schilling - - * New error codes for CDD-2000 & error code support for Yamaha CDR-100 - -Sun Nov 3 22:58:21 1996 J. Schilling - - * scsireset() aded to scsitransport.[hc] - * Timings for Track and Fixation - -Fri Oct 4 11:45:13 1996 J. Schilling - - * Version 1.1 released. - -Mon Aug 19 22:25:18 1996 J. Schilling - - * Read access test to allow cdrecord to run savely suid root - -Sun Aug 18 12:11:20 1996 J. Schilling - - * bit ordering problems solved - Thanks to Gert Poletiek for testing - -Tue Jun 18 21:38:51 1996 J. Schilling - - * several changes in scgio.h - -Sun Jun 16 15:56:35 1996 J. Schilling - - * Ansi C Protytypes - * priocntl added for Solaris - Thanks to Anders Lundgren +Thu Jan 5 15:34:42 2006 joerg + * cdda2wav/cdda2wav.c 1.60 + Added a workaround for the _POSIX_PRIORITY_SCHEDULING behavior on MacosX: defined but not supported + Hint from Emanuele Giaquinta + +Tue Dec 20 12:41:02 2005 joerg + * autoconf/xconfig.h.in 1.88 + * autoconf/rules.cnf.in 1.7 + * autoconf/configure.in 1.87 + RBAC & ppriv Tests neu + +Tue Nov 22 23:09:39 2005 joerg + * libscg/scsi-linux-sg.c 1.86 + Fix fuer #undef __user bei Linux-2.6.8.11 + +Sun Nov 20 22:05:13 2005 joerg + * libscg/scsi-sun.c 1.83 + Warnung fuer "Medialess Drives" bei aktivem volmgt fuer Solaris 11 deaktiviert + +Thu Nov 17 17:12:59 2005 joerg + * makefiles/RULES/rules.rel 1.5 + unifdef & chmod duerfen scheitern + +Wed Nov 16 23:30:11 2005 joerg + * autoconf/configure.in 1.86 + * autoconf/xconfig.h.in 1.87 + tcgetpgrp() / tcsetpgrp() Test neu + +Sat Nov 12 19:46:12 2005 joerg + * makefiles/RULES/MKLINKS 1.54 + sun4-sunos5-cc64.rul neu + +Fri Nov 11 14:57:19 2005 joerg + * conf/setup.sh 1.16 + do_compile()::smake -> smake CC="$CC" CFLAGS=-O + ./configure <-> ./Configure nimmt nun elif wegen Cygwin + +Tue Nov 8 00:37:03 2005 joerg + * libfind/walk.c 1.9 + Zweiter Stat Aufruf wenn ein "autofs" File gefunden wurde. Damit kommen korrekte st_dev/st_ino Werte in den dir cache + +Tue Nov 8 00:11:35 2005 joerg + * libfind/walk.c 1.8 + * autoconf/configure.in 1.85 + * autoconf/xconfig.h.in 1.86 + HAVE_DECL_STAT/HAVE_DECL_LSTAT neu + +Mon Nov 7 23:56:36 2005 joerg + * autoconf/aclocal.m4 1.44 + AC_CHECK_DECLARE neu + +Mon Nov 7 22:49:07 2005 joerg + * libfind/walk.c 1.7 + walkhome() erzeugt keinen Fehler mehr wenn WHome nicht initialisiert ist + xchdotdot() stellt nun Curdir[tail] wieder her + +Mon Nov 7 22:45:58 2005 joerg + * include/schily/walk.h 1.9 + * libfind/walk.h 1.9 + Kommentar verbessert + +Sun Nov 6 14:55:10 2005 joerg + * include/schily/utypes.h 1.15 + LLONG_MIN LLONG_MAX ULLONG_MAX neu + +Sun Nov 6 00:45:14 2005 joerg + * libfind/find_main.c 1.35 + * libfind/find.c 1.35 + getsperm(char *p, node *t, ...) -> getsperm(char *p, mode_t *mp, ...) + +Sun Nov 6 00:36:28 2005 joerg + * libfind/find.c 1.34 + * libfind/find_main.c 1.34 + getperm()/getsperm()/isperm() nun mit zusaetzlichem isX Parameter fuer -chmod *'X' + 07777 -> S_ALLMODES + +Sat Nov 5 22:20:02 2005 joerg + * cdda2wav/toc.c 1.56 + Returnwert von realloc() wird nun nicht mehr ignoriert + +Sat Nov 5 15:18:37 2005 joerg + * cdrecord/cdrecord.c 1.303 + ultraspeed CD-RW SPeed Test korrigiert + +Tue Nov 1 21:27:32 2005 joerg + * libfind/find.h 1.4 + * libfind/find_main.c 1.33 + * libfind/find.c 1.33 + * include/schily/find.h 1.4 + find_pname() neu + FHome beseitigt und durch walkhome() ersetzt + +Tue Nov 1 21:24:01 2005 joerg + * include/schily/walk.h 1.8 + * libfind/walk.c 1.6 + * libfind/walk.h 1.8 + Copyright -> 2005 + WALK_NOEXIT neu + WALK_PRUNE/WALK_NOCHDIR -> WALK_WF_PRUNE/WALK_WF_NOCHDIR + WALK_WF_NOCWD/WALK_WF_NOHOME neu + walkhome()/walkclose() neu + +Tue Nov 1 16:01:47 2005 joerg + * libfind/find_misc.c 1.6 + * libfind/find_list.c 1.9 + * libfind/find_list.h 1.4 + Copyright -> 2005 + +Tue Nov 1 00:19:21 2005 joerg + * libfind/find_main.c 1.32 + * libfind/find.h 1.3 + * include/schily/find.h 1.3 + * libfind/find.c 1.32 + find_plusflush() nun mit void * Pointer aud struct plusargs *plusp statt finda_t *fap + +Tue Nov 1 00:01:41 2005 joerg + * include/schily/find.h 1.2 + * libfind/find.c 1.31 + * libfind/find.h 1.2 + * libfind/find_main.c 1.31 + find_primary()/find_firstprim() neu + +Mon Oct 31 23:38:49 2005 joerg + * libfind/find.c 1.30 + * libfind/find_main.c 1.30 + usage() enthaelt nun Texte fuer -chown/-chgrp/-chmod + +Mon Oct 31 23:32:50 2005 joerg + * libfind/find.c 1.29 + * libfind/find_main.c 1.29 + -chown/-chgrp/-chmod neu + +Mon Oct 31 23:19:33 2005 joerg + * libfind/find.h 1.1 + * include/schily/find.h 1.1 + date and time created 05/10/31 23:19:33 by joerg + +Mon Oct 31 23:18:33 2005 joerg + * libfind/find_main.c 1.28 + * libfind/find.c 1.28 + Support fuer state->pflags & state->lname neu + getperm()/getsperm() vorbereitet fuer -chmod + +Mon Oct 31 23:14:20 2005 joerg + * libfind/find_list.c 1.8 + lnamep Initialisierung so dasz GCC nicht wegen "might be uninialized" meckert + +Mon Oct 31 23:12:27 2005 joerg + * libfind/find_list.c 1.7 + * libfind/find_list.h 1.3 + Support fuer state->pflags & state->lname neu + +Mon Oct 31 22:29:14 2005 joerg + * libfind/find_main.c 1.27 + * libfind/find.c 1.27 + find_expr() nicht mehr "inline" wenn EXPORT + getflg()/main() Prototypen deaktivieren wenn FIND_MAIN nicht definiert ist + +Mon Oct 31 21:38:46 2005 joerg + * libfind/find_list.c 1.6 + * libfind/find.c 1.26 + * libfind/find_main.c 1.26 + * libfind/find_misc.c 1.5 + list.[hc] -> find_list.[hc] + misc.[hc] -> find_misc.[hc] + +Mon Oct 31 21:06:23 2005 joerg + * libfind/find.c 1.25 + * libfind/find_main.c 1.25 + Copyright -> 2005 + Version -> 1.2 + init_findargs()/find_parse()/find_plusflush() neu + die meisten globalen Variabel beseitigt + BOOL have_print -> LOCAL node Printnode = { 0, 0, 0, PRINT }; + "Found '%s', but ')' expected.\n" nun mit korrektem fap->Argv[-1] Argument + +Sun Oct 30 15:03:12 2005 joerg + * libfind/find.c 1.24 + * libfind/find_main.c 1.24 + find_token()/find_tname() neu + +Sun Oct 30 14:30:21 2005 joerg + * libfind/find.c 1.23 + * libfind/find_main.c 1.23 + ENDARGS -> ENDPRIM, ENDARGS -> find.h + +Sun Oct 30 14:18:36 2005 joerg + * libfind/find_list.c 1.5 + * libfind/find_list.h 1.2 + * libfind/find.c 1.22 + * libfind/find_main.c 1.22 + list() -> find_list() + +Sun Oct 30 13:41:18 2005 joerg + * libfind/find_main.c 1.21 + * libfind/find.c 1.21 + * libfind/walk.c 1.5 + * include/schily/walk.h 1.7 + * libfind/walk.h 1.7 + treewalk() umgebaut auf struct WALK * Parameter + +Sun Oct 30 12:38:04 2005 joerg + * libfind/walk.c 1.4 + Return -1/(errno=EINVAL) wenn (flags & WALK_CHDIR) == 0 + while Schleife ueber alle stat Aufrufe wenn errno == EINTR + +Tue Oct 25 00:00:00 2005 joerg + * libsiconv/tables/koi8-u 1.1 + date and time created 05/10/25 00:00:00 by joerg + +Sun Oct 23 14:51:45 2005 joerg + * libschily/libschily-mapvers 1.2 + SCHILY_1.1 mit astoull/astoullb neu + +Wed Oct 19 11:48:37 2005 joerg + * libfind/find_main.c 1.20 + * libfind/find.c 1.20 + -true/-false neu + +Fri Oct 14 10:34:15 2005 joerg + * include/schily/utypes.h 1.14 + OTT_T_MAX/OFF_T_MIN und aenhliches neu + +Thu Oct 13 11:30:11 2005 joerg + * libfind/idcache.c 1.16 + nameuid()/namegid() liefern nun immer nobody wenn der Return Wert FALSE ist + +Tue Oct 11 10:51:05 2005 joerg + * autoconf/configure.in 1.84 + * autoconf/xconfig.h.in 1.85 + major_t/minor_t neu + +Wed Oct 5 00:18:34 2005 joerg + * include/schily/schily.h 1.53 + astoull() / astoullb() neu + +Mon Sep 12 16:32:54 2005 joerg + * include/schily/utypes.h 1.13 + #include sys/param.h fuer NBBY neu + TYPE_ISUNSIGNED(t) neu + +Mon Sep 12 15:53:17 2005 joerg + * include/schily/utypes.h 1.12 + Neuer Typ ULlong (langfristig statt Ullong) + +Sat Sep 3 00:29:33 2005 joerg + * include/schily/checkerr.h 1.8 + * libschily/checkerr.c 1.13 + checkerr=WARN|... neu + errwarnonly() fuer checkerr=WARN neu + BOOL dchangeflag -> errconfig("WARN|GROW|SHRINK *"); + +Mon Aug 29 15:43:09 2005 joerg + * cdrecord/readcd.1 1.22 + Schreibfehler maimum -> maximum + +Sun Aug 28 20:47:13 2005 joerg + * libschily/checkerr.c 1.12 + ec_state = __malloc() -> ec_state = __realloc(ec_state, ...) + +Sun Aug 28 17:37:31 2005 joerg + * libschily/checkerr.c 1.11 + errctl= kann nun auch direkt errror control Spezifikationen als errctl= Parameter + Es koennen nun mehrere errctl= Optionen verwendet werden. + +Sun Aug 28 13:10:38 2005 joerg + * include/schily/checkerr.h 1.7 + * libschily/checkerr.c 1.10 + errabort() neu + Neue errctl= identifier: ABORT, ALL, DIFF + Neue Option -e (Sun star error abort exit()) + +Mon Aug 22 00:01:41 2005 joerg + * include/schily/time.h 1.13 + #undef timeradd/timersub neu wegen FreeBSD + +Thu Aug 18 12:14:22 2005 joerg + * libschily/stdio/fileopen.c 1.11 + * libschily/stdio/filemopen.c 1.4 + _fcons() Flag | FI_CLOSE damit file bei fdopen() Problemen geschlossen wird + +Sun Aug 14 17:48:08 2005 joerg + * include/schily/time.h 1.12 + timeradd() / timersub neu + +Tue Aug 9 15:21:53 2005 joerg + * makefiles/RULES/rules.tpk 1.2 + $(MAKE_FILE) neu + POST_STRIP_CMDS neu + +Tue Aug 9 15:19:58 2005 joerg + * rscsi/Makefile 1.4 + Makefile.dfl neu + +Tue Aug 9 15:19:33 2005 joerg + * rscsi/Makefile.dfl 1.1 + date and time created 05/08/09 15:19:33 by joerg + +Tue Aug 9 15:19:20 2005 joerg + * rscsi/default-rscsi.sample 1.1 + date and time created 05/08/09 15:19:20 by joerg + +Tue Aug 9 15:19:20 2005 joerg + * rscsi/rscsi.dfl 1.3 + Bessere Deafults + +Tue Aug 9 15:18:27 2005 joerg + * cdrecord/Makefile.dfl 1.1 + date and time created 05/08/09 15:18:27 by joerg + +Tue Aug 9 15:18:09 2005 joerg + * cdrecord/Makefile 1.31 + cdrecord.dfl Makefile.dfl neu + +Tue Aug 9 15:17:41 2005 joerg + * cdrecord/cdrecord.dfl 1.5 + CDR_SECURITY= neu + +Sun Aug 7 18:13:55 2005 joerg + * libfind/find_main.c 1.19 + * libfind/find.c 1.19 + -sparse neu + Bessere -exec + Debugs + -exec + flusht nun korrekt die letzten Argumente am Ende + +Sun Aug 7 16:50:48 2005 joerg + * mkisofs/write.c 1.87 + Bessere shrink/grow Erkennung + +Sun Aug 7 16:22:00 2005 joerg + * mkisofs/write.c 1.86 + "File '%s' did shrink.\n" error Message neu + +Sat Aug 6 16:06:18 2005 joerg + * makefiles/RULES/rules1.top 1.31 + cc-config.sh $(C_ARCH) -> cc-config.sh $(C_ARCH:%64=%) damit CCOM=cc64 geht + +Sat Aug 6 16:05:33 2005 joerg + * makefiles/RULES/rules.sps 1.10 + * makefiles/RULES/rules1.top 1.30 + * makefiles/RULES/rules.hlp 1.9 + Neue Targets tarpkg tarpkg1 & neues Rule File rules.tpk + +Sat Aug 6 16:03:23 2005 joerg + * makefiles/RULES/rules.tpk 1.1 + date and time created 05/08/06 16:03:23 by joerg + +Sat Aug 6 14:50:17 2005 joerg + * libedc/shledc.mk 1.2 + * libedc/libedc.mk 1.5 + -fast ist ein Makro fuer -O5 -xarch=generic, wir muessen also bei CCOM=cc64 aufpassen + +Sun Jul 31 22:37:11 2005 joerg + * libschily/Targets 1.1 + date and time created 05/07/31 22:37:11 by joerg + +Fri Jul 29 02:10:02 2005 joerg + * libfind/idcache.c 1.15 + uid_nobody / gid_nobody -> EXPORT + +Thu Jul 28 13:16:23 2005 joerg + * conf/oarch.sh 1.9 + MARCH & PARCH dirch $ARCH ueberschreiben (wie in rules1.top) + +Thu Jul 28 12:27:38 2005 joerg + * conf/oarch.sh 1.8 + * makefiles/RULES/mk-gmake.id 1.14 + tr ',/' ',-' -> tr ',/' ',\-' weil /usr/ucb/tr auf Solaris sonst eine Endlosschleife bringt + +Thu Jul 28 12:26:42 2005 joerg + * conf/cc-config.sh 1.7 + erweiterte Warnung fuer /usr/ucb/cc auf Solaris + +Wed Jul 27 01:10:54 2005 joerg + * libfind/idcache.c 1.14 + Copyright -> 2005 + +Tue Jul 26 14:49:03 2005 joerg + * libfind/find_list.c 1.4 + comments? nameuid()/namegid() nun mit uid_t/gid_t Parameter + +Tue Jul 26 14:16:07 2005 joerg + * libfind/idcache.c 1.13 + nameuid()/namegid()uidname()/gidname() verwenden nun uid_t/gid_t Parameter + info->f_uid/info->f_gid nun auch uid_t/gid_t + Globale Variable uid -> my_uid + +Sat Jul 23 23:02:23 2005 joerg + * libschily/checkerr.c 1.9 + Copyright -> 2005 + +Fri Jul 22 14:57:05 2005 joerg + * conf/setup.sh 1.15 + gpatch Symlink neu + +Thu Jul 14 16:06:24 2005 joerg + * conf/cc-config.sh 1.6 + LC_ALL=C / LANG=C damit Meldungen (die ausgewertet werden) in Englisch kommen + eval bei Compiler Tests verwenden um unerwartete command not found Ausgaben zu unterdruecken + +Thu Jul 14 13:35:21 2005 joerg + * autoconf/acspecific.m4 1.4 + Nun wird unteschieden zwischen "compiler cannot create executables." und "C compiler ${CC-cc} not found." + +Tue Jul 12 16:18:23 2005 joerg + * autoconf/aclocal.m4 1.43 + AC_CHECK_MINOR_BITS & AC_CHECK_MINOR_NONCONTIG testen nun auch bis 64 Bits + +Sun Jul 10 13:16:24 2005 joerg + * makefiles/RULES/rules.hlp 1.8 + * makefiles/RULES/rules1.top 1.29 + make .version neu + +Sun Jul 10 13:09:05 2005 joerg + * makefiles/RULES/version 1.1 + date and time created 05/07/10 13:09:05 by joerg + +Fri Jul 8 14:54:58 2005 joerg + * makefiles/RULES/rules.sps 1.9 + MAKEOPTS neu + $(POSTCONFIG) Rule neu + ../../$(SRC_DIR)/$(CONFSCRIPT) -> $(PCONFSCRIPT) + +Thu Jul 7 15:27:26 2005 joerg + * makefiles/RULES/rules.sps 1.8 + LNDIR_PRG neu + +Thu Jul 7 15:11:22 2005 joerg + * conf/setup.sh 1.14 + * conf/src-get 1.18 + lndir neu in bins/ + +Mon Jul 4 15:05:33 2005 joerg + * makefiles/RULES/rules.sps 1.7 + [ ! -f config.status ] lieferte im Erfolgsfall != 0 + +Mon Jul 4 14:13:21 2005 joerg + * makefiles/RULES/rules.sps 1.6 + CONF_SCRIPT neu + +Fri Jun 17 09:04:16 2005 joerg + * makefiles/RULES/rules.sps 1.5 + MAKEMACS neu + +Mon Jun 13 01:26:56 2005 joerg + * libscg/libscg.mk 1.1 + date and time created 05/06/13 01:26:56 by joerg + +Mon Jun 13 01:26:31 2005 joerg + * libscg/shlrscg.mk 1.1 + * libscg/shlscg.mk 1.1 + date and time created 05/06/13 01:26:31 by joerg + +Mon Jun 13 01:25:51 2005 joerg + * libparanoia/paranoia.mk 1.1 + * libparanoia/shlparanoia.mk 1.1 + date and time created 05/06/13 01:25:51 by joerg + +Mon Jun 13 01:25:12 2005 joerg + * libhfs_iso/shlhfs.mk 1.1 + date and time created 05/06/13 01:25:12 by joerg + +Mon Jun 13 01:24:39 2005 joerg + * libfile/shlfile.mk 1.1 + date and time created 05/06/13 01:24:39 by joerg + +Mon Jun 13 01:24:17 2005 joerg + * libedc/shledc.mk 1.1 + date and time created 05/06/13 01:24:17 by joerg + +Mon Jun 13 01:23:36 2005 joerg + * libdeflt/libdeflt.mk 1.1 + * libdeflt/shldeflt.mk 1.1 + date and time created 05/06/13 01:23:36 by joerg + +Mon Jun 13 01:13:05 2005 joerg + * makefiles/RULES/rules.shl 1.7 + SYMLINKS += $(TARGET_BASE).so neu + +Mon Jun 13 01:12:40 2005 joerg + * makefiles/RULES/rules.sps 1.4 + MAKE="$MAKE" -> MAKE="$(MAKE)" korrigiert + +Mon Jun 13 01:10:06 2005 joerg + * makefiles/RULES/sun4-sunos5-cc.rul 1.7 + * makefiles/RULES/sun4-sunos5-gcc.rul 1.7 + * makefiles/RULES/i86pc-sunos5-gcc.rul 1.7 + * makefiles/RULES/sun4-sunos5-cc64.rul 1.2 + * makefiles/RULES/i86pc-sunos5-cc.rul 1.7 + -Mlib$(TARGETLIB)-mapvers neu bei LDOPTDYN= + +Mon Jun 13 01:08:43 2005 joerg + * makefiles/RULES/i86pc-sunos5-cc64.rul 1.1 + date and time created 05/06/13 01:08:43 by joerg + +Mon Jun 13 01:02:42 2005 joerg + * makefiles/RULES/sun4-sunos5-cc64.rul 1.1 + date and time created 05/06/13 01:02:42 by joerg + +Mon Jun 13 00:54:50 2005 joerg + * libschily/shlschily.mk 1.5 + LIBS= -lc neu + +Sun Jun 12 21:48:16 2005 joerg + * libscg/librscg-mapvers 1.1 + date and time created 05/06/12 21:48:16 by joerg + +Sun Jun 12 20:51:58 2005 joerg + * libedc/libedc_ecc-mapvers 1.1 + date and time created 05/06/12 20:51:58 by joerg + +Sun Jun 12 20:39:59 2005 joerg + * libschily/libschily-mapvers 1.1 + date and time created 05/06/12 20:39:59 by joerg + +Sun Jun 12 20:37:57 2005 joerg + * libschily/stdio/flag.c 2.10 + _fl_inc / _io_smyfl / -> LOCAL + +Sun Jun 12 20:22:09 2005 joerg + * libschily/getargs.c 2.38 + * libschily/getargs.c.old 2.38 + retnames[] -> LOCAL + +Sat Jun 11 16:03:15 2005 joerg + * cdrecord/drv_dvdplus.c 1.16 + dummy_plextor() neu + CDR_CDRW_ALL neu + profile == 0x002B "DVD+R/DL" neu + +Sat Jun 11 16:00:50 2005 joerg + * cdrecord/subchan.c 1.20 + * cdrecord/drv_mmc.c 1.161 + * cdrecord/readcd.c 1.75 + * cdrecord/cdrecord.h 1.165 + Cstyle + +Tue May 31 11:52:33 2005 joerg + * cdrecord/defaults.c 1.15 + Management fuer "CDR_SECURITY=" in /etc/default/cdrecord neu + +Mon May 30 23:18:57 2005 joerg + * conf/src-get 1.17 + * conf/setup.sh 1.13 + wget nun mit --passive-ftp + +Mon May 30 12:36:25 2005 joerg + * conf/src-get 1.16 + * conf/wget.sh 1.3 + passive -> passive on + +Tue May 17 12:15:49 2005 joerg + * cdrecord/cdrecord.c 1.302 + Version -> 2.01.01a03 + +Mon May 16 23:48:37 2005 joerg + * libscg/scsi-linux-sg.c 1.85 + seteuid(0) um ioctl(f, SG_IO wenn noetig + +Mon May 16 23:08:13 2005 joerg + * cdrecord/Makefile 1.30 + scsi_cdr_mmc4.c & scsi_mmc4.c neu + +Mon May 16 23:07:44 2005 joerg + * cdrecord/scsi_cdr_mmc4.c 1.1 + * cdrecord/scsi_mmc4.c 1.1 + date and time created 05/05/16 23:07:44 by joerg + +Mon May 16 23:07:33 2005 joerg + * cdrecord/drv_mmc.c 1.160 + * cdrecord/drv_philips.c 1.69 + * cdrecord/scsi_mmc.c 1.13 + * cdrecord/drv_simul.c 1.48 + * cdrecord/drv_jvc.c 1.82 + * cdrecord/drv_dvd.c 1.119 + * cdrecord/drv_sony.c 1.72 + * cdrecord/drv_7501.c 1.16 + * cdrecord/cdrecord.h 1.164 + * cdrecord/cdrecord.c 1.301 + CD-RW Ultraspeed+ Support neu + +Mon May 16 23:04:55 2005 joerg + * cdrecord/defaults.c 1.14 + Copyright -> 2005 + +Mon May 16 15:19:26 2005 joerg + * cdrecord/defaults.c 1.13 + Keine Fehlermeldung mehr wenn speed in Environment oder /etc/default/cdrecord == -1 + +Mon May 16 14:59:33 2005 joerg + * rscsi/rscsi.c 1.29 + Warnung wegen Sicherheitsrisiko beim Debugging + +Mon May 16 14:53:05 2005 joerg + * rscsi/rscsi.dfl 1.2 + Warnung fuer /tmp/RSCSI Debug File + +Mon May 16 13:06:30 2005 joerg + * libscg/scsi-linux-sg.c 1.84 + Workarounds fuer defekte Linux scsi/scsi.h & scsi/sg.h + +Mon May 16 13:04:15 2005 joerg + * autoconf/aclocal.m4 1.42 + * autoconf/configure.in 1.83 + * autoconf/xconfig.h.in 1.84 + Neue Tests AC_BROKEN_SCSI_SCSI_H / AC_BROKEN_SRC_SCSI_SCSI_H / AC_BROKEN_SCSI_SG_H / AC_BROKEN_SRC_SCSI_SG_H + +Sun May 15 16:21:05 2005 joerg + * mkisofs/diag/isoinfo.c 1.50 + * mkisofs/diag/isovfy.c 1.26 + * mkisofs/diag/isodump.c 1.27 + * mkisofs/diag/dump.c 1.24 + GPL texte erneuert + +Sun May 15 16:03:22 2005 joerg + * mkisofs/apple_driver_man.mk 1.1 + * mkisofs/apple_driver.mk 1.1 + * mkisofs/hybridman.mk 1.1 + date and time created 05/05/15 16:03:22 by joerg + +Sun May 15 15:46:35 2005 joerg + * scgcheck/scgcheck.1 1.9 + * cdrecord/readcd.1 1.21 + GPL ueberarbeitet + +Sun May 15 14:41:01 2005 joerg + * cdrecord/cdrecord.1 1.105 + GPL Text ueberarbeitet + +Sun May 15 01:30:20 2005 joerg + * makefiles/RULES/i386-os2-gcc.rul 1.8 + -Zexe ist dank .EXEEXT nicht mehr notwendig + +Sun May 15 01:03:50 2005 joerg + * cdrecord/cdrecord.c 1.300 + Version -> 2.01.01a02, Shorttrack auch im RAW Modus erlauben + +Sun May 15 00:51:38 2005 joerg + * mkisofs/multi.c 1.68 + Warnung ueber 8.3 -> ISO-9660 + +Sun May 15 00:47:10 2005 joerg + * libscg/scg/aspi-dos.h 1.2 + Eingerueckt + +Sun May 15 00:42:43 2005 joerg + * libscg/scsi-mac-iokit.c 1.10 + Schreibfehler bei Hilfe beseitigt + +Sun May 8 22:03:37 2005 joerg + * autoconf/aclocal.m4 1.41 + * autoconf/xconfig.h.in 1.83 + * autoconf/configure.in 1.82 + Neue Tests: AC_BROKEN_LINUX_EXT2_FS_H + +Sun May 8 15:04:22 2005 joerg + * cdrecord/drv_sony.c 1.71 + klarerer Kode zum Zeigen dasz xp in getdisktype_sony() initializert wird + +Fri May 6 00:20:27 2005 joerg + * conf/src-get 1.15 + . $TGT geht nicht aber . ./$TGT + +Thu May 5 23:27:07 2005 joerg + * conf/src-get 1.14 + server_url braucht slash am Ende + +Thu May 5 23:10:35 2005 joerg + * conf/src-get 1.13 + Neues Kommando compile + Dependencies und Patches neu + Support fuer file:/// neu + +Wed May 4 23:53:13 2005 joerg + * conf/mkdir.sh 1.4 + Voller -T Support + +Wed May 4 23:49:23 2005 joerg + * conf/mkdir.sh 1.3 + Erster Umbauschritt zu -T (Template) + +Wed May 4 09:16:27 2005 joerg + * conf/mslotdir.sh 1.2 + SRCROOT= ./.. verhindern + +Wed May 4 01:36:37 2005 joerg + * conf/src-get 1.12 + conf/setup.sh -> src-get setup + +Wed May 4 01:35:52 2005 joerg + * conf/mslotdir.sh 1.1 + date and time created 05/05/04 01:35:52 by joerg + +Tue May 3 17:47:54 2005 joerg + * conf/setup.sh 1.12 + Alles -> ftp://ftp.berlios.de/pub/makefiles/testing/ damit ich es auch von intern testen kann + +Tue May 3 17:27:13 2005 joerg + * conf/src-get 1.11 + * conf/setup.sh 1.11 + tar xpf -> tar xp wegen HP-UX-10.x + +Tue May 3 16:27:29 2005 joerg + * conf/setup.sh 1.10 + CFLAGS=-O neu + +Tue May 3 16:08:30 2005 joerg + * conf/setup.sh 1.9 + patch URL -> ftp://ftp.berlios.de/pub/makefiles/testing/patch-2.5.4-1.tar.bz wegen BSDi Bug + +Tue May 3 15:04:43 2005 joerg + * conf/install-sh 1.7 + PATH="${PATH}:/usr/sbin" wegen chown unter BSDi + +Tue May 3 15:00:30 2005 joerg + * conf/setup.sh 1.8 + -e ./configure -> -r ./configure + +Tue May 3 14:43:34 2005 joerg + * conf/setup.sh 1.7 + $CC & $MAKE fuer ./configure neu + ./configure nur rufen wenn auch da + +Tue May 3 14:36:31 2005 joerg + * conf/oarch.sh 1.7 + Neue Optionen -c -> C_ARCH, -o -> O_ARCH, -p -> P_ARCH + +Tue May 3 14:25:25 2005 joerg + * makefiles/RULES/rules.sps 1.3 + MAKE="$MAKE" uebergeben fuer ./configure + +Tue May 3 14:24:14 2005 joerg + * makefiles/RULES/rules.sps 1.2 + CC="$(XCCCOM)" CFLAGS="$(CFLAGS)" uebergeben fuer ./configure + +Tue May 3 14:01:53 2005 joerg + * conf/src-get 1.10 + get_bins Aufruf nach need_bins() verlagert damit es auch ohne mfs klappt + +Tue May 3 13:26:47 2005 joerg + * conf/src-get 1.9 + viele neue Checks + src-get shell neu + +Tue May 3 12:20:00 2005 joerg + * conf/setup.sh 1.6 + WGET nun von aussen aenderbar + Das aktuelle Makefilesystem wird nun nach Kompilation von smake gleich mitkonfiguriert + +Tue May 3 00:30:36 2005 joerg + * conf/setup.sh 1.5 + -> wget-1.9.1-2.tar + +Mon May 2 23:38:24 2005 joerg + * conf/setup.sh 1.4 + PATH="${BINS}:${PATH}" -> PATH="${PWD}/${BINS}:${PATH}" + psmake/smake -r rufen + COPTX=-DDEFAULTS_PATH_SEARCH_FIRST damit zuerst nach defaults.smk gesucht wird + libschily/defaults.smk installieren + Files vor dem Installieren loeschen + Testen ob Ergebnis erzeugt wurde + +Mon May 2 23:34:50 2005 joerg + * conf/src-get 1.8 + Schreibfehler + +Mon May 2 09:23:18 2005 joerg + * conf/src-get 1.7 + SRCROOT Ausgabe nur wenn get_srcroot klappt + +Mon May 2 00:00:19 2005 joerg + * conf/src-get 1.6 + src-get init enthaelt nicht mehr setup + +Sun May 1 23:39:40 2005 joerg + * conf/src-get 1.5 + * conf/setup.sh 1.3 + URL Kommentar -> setup.sh + +Sun May 1 23:32:44 2005 joerg + * conf/makeinc 1.4 + * conf/src-get 1.4 + * conf/srcroot.sh 1.3 + * conf/setup.sh 1.2 + SRCROOT Suche verbessert + +Sun May 1 20:59:29 2005 joerg + * mkisofs/scsi.c 1.20 + Bessere fehlermeldung bei Short reads auf dem alten Image + +Sun May 1 20:46:15 2005 joerg + * mkisofs/mkisofs.8 1.109 + Hinweis auf AUDIO_TS neu + +Sun May 1 20:43:12 2005 joerg + * mkisofs/diag/isodebug.c 1.10 + * mkisofs/diag/isovfy.c 1.25 + * mkisofs/diag/dump.c 1.23 + * mkisofs/diag/isodump.c 1.26 + Version -> 2.01.01a03 + +Sun May 1 20:39:22 2005 joerg + * mkisofs/diag/isoinfo.c 1.49 + * mkisofs/rock.c 1.43 + * mkisofs/mkisofs.h 1.95 + * mkisofs/joliet.c 1.38 + * mkisofs/mkisofs.c 1.165 + Version -> 2.01.01a03 + Anpassungen fuer Aenderungen in + +Sat Apr 30 11:48:15 2005 joerg + * conf/src-get 1.3 + Neue SRCROOT Suchfunktion + wget als Funktion + Neue Funktionen init & setup + +Fri Apr 29 15:32:38 2005 joerg + * conf/src-get 1.2 + 2. Versuch + +Fri Apr 29 14:37:18 2005 joerg + * conf/setup.sh 1.1 + date and time created 05/04/29 14:37:18 by joerg + +Fri Apr 29 14:35:51 2005 joerg + * conf/oarch.sh 1.6 + * conf/wget.sh 1.2 + * conf/srcroot.sh 1.2 + Copyr -> Copyright + +Fri Apr 29 12:12:35 2005 joerg + * conf/srcroot.sh 1.1 + date and time created 05/04/29 12:12:35 by joerg + +Fri Apr 29 11:12:01 2005 joerg + * conf/oarch.sh 1.5 + cc-config.sh korrekt mit $confdir/../conf/cc-config.sh rufen + +Fri Apr 29 00:41:49 2005 joerg + * conf/oarch.sh 1.4 + grep nun mit 2>/dev/null + +Fri Apr 29 00:38:11 2005 joerg + * conf/wget.sh 1.1 + date and time created 05/04/29 00:38:11 by joerg + +Fri Apr 29 00:04:23 2005 joerg + * conf/cc-config.sh 1.5 + -echo Option fuer oarch.sh neu + +Fri Apr 29 00:02:34 2005 joerg + * conf/oarch.sh 1.3 + Nun wird incs/Dcc.${PARCH}-${O_ARCH} & DEFAULTS/Defaults.${O_ARCH} beruecksichtigt + +Thu Apr 21 23:55:57 2005 joerg + * makefiles/RULES/rules.sps 1.1 + date and time created 05/04/21 23:55:57 by joerg + +Thu Apr 21 14:47:06 2005 joerg + * conf/oarch.sh 1.2 + Generischier Copyright Kommentar neu + +Thu Apr 21 14:45:13 2005 joerg + * conf/oarch.sh 1.1 + date and time created 05/04/21 14:45:13 by joerg + +Thu Apr 21 12:12:27 2005 joerg + * include/schily/unls.h 1.6 + Ueberarbeitet + +Thu Apr 21 10:37:32 2005 joerg + * makefiles/RULES/rules1.top 1.28 + * makefiles/RULES/rules.ins 1.14 + $(DEST_DIR) neu + +Mon Apr 18 22:32:15 2005 joerg + * cdrecord/defaults.c 1.12 + Bessere Fehlermeldungen + +Mon Apr 18 22:23:28 2005 joerg + * mkisofs/diag/isovfy.c 1.24 + * mkisofs/diag/isoinfo.c 1.48 + * mkisofs/diag/isodump.c 1.25 + * mkisofs/diag/dump.c 1.22 + Coredump durch fclose(infile) mit infile == NULL vermeiden + +Thu Apr 14 16:21:07 2005 jes + * conf/src-get 1.1 + date and time created 05/04/14 16:21:07 by joerg + +Thu Apr 14 11:34:35 2005 joerg + * makefiles/RULES/rules1.dir 1.11 + [ -d TARGETS -a -f TARGETS/__slot ] && -> if [ -d TARGETS -a -f TARGETS/__slot ]; then wegen Bug in /bin/sh bei BSDi + +Sun Apr 10 17:50:02 2005 joerg + * makefiles/RULES/mk-gmake.id 1.13 + Warnung sleep time von 5 -> 2 Sekunden + +Sun Apr 10 17:48:42 2005 joerg + * makefiles/RULES/gmake.wrn 1.2 + Schreibfehler 1988 -> 1998 + +Tue Apr 5 09:08:57 2005 joerg + * makefiles/RULES/rules.rel 1.4 + MAKE_LICENSE=MKGNU -> MAKE_LICENSE=MKGNU2 + +Tue Apr 5 00:00:00 2005 joerg + * libsiconv/tables/cp10000 1.1 + * libsiconv/tables/cp10006 1.1 + * libsiconv/tables/cp10079 1.1 + * libsiconv/tables/cp10081 1.1 + * libsiconv/tables/cp10007 1.1 + date and time created 05/04/05 00:00:00 by joerg + +Sat Apr 2 13:26:01 2005 joerg + * cdrecord/README.ATAPI 1.5 + kleinere Verbesserungen bei der SCSI Emulations Erklaerung + +Fri Mar 25 14:22:43 2005 joerg + * libschily/checkerr.c 1.8 + errhidden() ist nun immun gegen fname == NULL + +Sun Feb 27 23:57:43 2005 joerg + * cdrecord/README.ATAPI 1.4 + Beispiel fuer SCSI Emulation/Integration bei Win NT + +Sun Feb 27 13:37:45 2005 joerg + * mkisofs/multi.c 1.67 + Endlossschleife bei mkisofs -R -M old-session vermeiden wenn CD Records vorhanden: Fix von Patrick Ohly + +Sun Feb 27 13:33:07 2005 joerg + * mkisofs/mkisofs.c 1.164 + Version -> 2.01.01a02 + Bessere Fehlermeldungen bei File-open Fehlern + +Sun Feb 27 13:31:28 2005 joerg + * mkisofs/eltorito.c 1.33 + Coredump verhindern bei -no-emul-boot und fehlendem -b bootfile + +Fri Feb 25 13:14:20 2005 joerg + * mkisofs/README.sunx86boot 1.3 + Schreibfehler isek -> iseek + +Wed Feb 16 01:08:41 2005 joerg + * cdrecord/cdrecord.h 1.163 + MIN_GRACE_TIME -> 3 Sekunden wegen Solaris vold + +Thu Feb 10 00:41:21 2005 joerg + * pkgdefs/CSW/CSWschilyutils/copyright 1.1 + * pkgdefs/CSW/CSWcdrtools/copyright 1.1 + * pkgdefs/CSW/CSWsccs/copyright 1.1 + * pkgdefs/CSW/CSWstar/copyright 1.1 + * pkgdefs/CSW/CSWschilybase/copyright 1.1 + * pkgdefs/CSW/CSWsmake/copyright 1.1 + date and time created 05/02/10 00:41:21 by joerg + +Mon Feb 7 12:45:42 2005 joerg + * autoconf/configure.in 1.81 + * autoconf/xconfig.h.in 1.82 + HAVE_FUTIMES/HAVE_LUTIMES/HAVE_CHMOD/HAVE_FCHMOD/HAVE_LCHMOD/HAVE_FCHOWN neu + +Mon Jan 24 17:28:31 2005 joerg + * include/schily/device.h 1.13 + # define makedev(a,b) mkdev((a),(b)) fuer Interic + +Tue Jan 11 10:52:42 2005 joerg + * mkisofs/README.sunx86boot 1.2 + Fehlerkorrektur (es gab falsche Kommandos zum Erzeugen der Boot Files) + +Mon Nov 29 11:57:16 2004 joerg + * autoconf/configure.in 1.80 + * autoconf/xconfig.h.in 1.81 + Test fuer procfs.h + +Wed Nov 24 16:47:16 2004 joerg + * cdrecord/README.solaris-x86-ATAPI-DMA 1.1 + date and time created 04/11/24 16:47:16 by joerg + +Thu Nov 4 10:40:50 2004 joerg + * libfind/find.c 1.18 + * libfind/find_main.c 1.18 + -newerXY neu + -linkedto neu + Bessere Texte + node.val2 ist nun auch typ union + +Mon Nov 1 11:40:26 2004 joerg + * cdrecord/drv_mmc.c 1.159 + Unsinnige Initialisierung damit GCC ruhig bleibt + +Sun Oct 31 23:21:04 2004 joerg + * cdrecord/drv_jvc.c 1.81 + Buffer Cap Debug wieder beseitigt + +Sun Oct 31 23:07:27 2004 joerg + * cdrecord/scsi_mmc.c 1.12 + Neue Tebellenwerte fuer DVD+R/DL + pname_known(curprofile) -> pname_known(profile) Bug beseitigt + +Thu Oct 21 08:06:52 2004 joerg + * autoconf/configure.in 1.79 + * autoconf/xconfig.h.in 1.80 + HAVE_FDOPENDIR neu + +Sun Oct 17 13:50:58 2004 joerg + * libscg/scsi-remote.c 1.17 + Vor dem exec() auf rsh/RSH wird nun auch die Effektive uid zurueckgesetzt + +Sun Oct 17 13:44:57 2004 joerg + * cdrecord/cdrecord.c 1.299 + Version -> 2.01.01a01 + +Sun Oct 17 13:33:34 2004 joerg + * cdrecord/cdrecord.1 1.104 + driveropts=gigarec neu + +Sun Oct 17 13:05:31 2004 joerg + * cdrecord/drv_mmc.c 1.158 + * cdrecord/cdrecord.c 1.298 + * cdrecord/cdrecord.h 1.162 + Plextor GigaRec Support neu + +Thu Oct 14 15:29:52 2004 joerg + * libfind/find_main.c 1.17 + * libfind/find.c 1.17 + ARG_MAX um LINE_MAX verringern, damit -exec cmd {} + "cmd" erlaubt env[] oder das Kommando zu modifizieren und noch exec(2) zu rufen + +Thu Oct 14 15:09:19 2004 joerg + * libfind/find_misc.c 1.4 + -acl sollte nun auch mit Linux / POSIX gehen + +Wed Oct 13 23:59:17 2004 joerg + * libfind/find_misc.h 1.2 + #endif _MISC_H -> #endif /* _MISC_H */ + +Wed Oct 13 15:13:30 2004 joerg + * autoconf/config.guess 1.5 + s390:Linux neu + +Wed Oct 13 15:13:24 2004 joerg + * autoconf/config.sub 1.2 + hppa2.0? neu + ia64 neu + x86_64 neu + parisc-unknown neu + s390 neu + -os2* | -rhapsody* | -macos* neu + Apollo neu + +Sun Oct 10 23:50:37 2004 joerg + * autoconf/configure.in 1.78 + * autoconf/xconfig.h.in 1.79 + HAVE_ACL_LIBACL_H / HAVE_ACL_EXTENDED_FILE neu + +Sun Oct 10 22:15:54 2004 joerg + * libfind/walk.c 1.3 + * libfind/find_misc.c 1.3 + * libfind/mem.c 1.4 + * libfind/find.c 1.16 + * libfind/gettnum.c 1.4 + * libschily/mem.c 1.4 + * libschily/fjmem.c 1.4 + * libfind/find_list.c 1.3 + * libschily/gettnum.c 1.4 + * libschily/jmem.c 1.4 + * libschily/getxtnum.c 1.4 + * libfind/find_main.c 1.16 + gettext() neu + +Sat Oct 9 13:42:57 2004 joerg + * libfind/fetchdir.c 1.14 + * libfind/cmpdir.c 1.14 + * libfind/idcache.c 1.12 + #ifdef STAR -> #ifdef __STAR__ wegen patmatch.h + +Fri Oct 8 17:11:49 2004 joerg + * autoconf/xconfig.h.in 1.78 + * autoconf/configure.in 1.77 + Test auf libintl.h locale.h langinfo.h neu + +Thu Oct 7 20:48:55 2004 joerg + * libfind/find_misc.c 1.2 + Support fuer POSIX ACLs + +Thu Oct 7 20:32:26 2004 joerg + * autoconf/configure.in 1.76 + * autoconf/rules.cnf.in 1.6 + LIB_ACL_TEST= neu fuer sfind(1) ACL Test + +Thu Oct 7 16:53:10 2004 joerg + * libfind/find.c 1.15 + * libfind/find_main.c 1.15 + Version -> 1.1 + +Thu Oct 7 16:46:10 2004 joerg + * libfind/find_misc.h 1.1 + * libfind/find_misc.c 1.1 + date and time created 04/10/07 16:46:10 by joerg + +Thu Oct 7 16:44:27 2004 joerg + * libfind/find_list.c 1.2 + * libfind/find.c 1.14 + * libfind/find_main.c 1.14 + -acl & -xattr new -Sun Feb 4 19:14:46 1996 J. Schilling +Thu Oct 7 15:54:25 2004 joerg + * libfind/idcache.c 1.11 + Copyright -> 2004 + #ifdef STAR neu + +Thu Oct 7 15:40:53 2004 joerg + * libfind/fetchdir.c 1.13 + * libfind/cmpdir.c 1.13 + Copyright -> 2004 + +Thu Oct 7 15:26:39 2004 joerg + * libfind/cmpdir.c 1.12 + * libfind/fetchdir.c 1.12 + #ifdef STAR neu fuer find.c + +Wed Oct 6 15:46:50 2004 joerg + * autoconf/aclocal.m4 1.40 + * autoconf/xconfig.h.in 1.77 + * autoconf/configure.in 1.75 + HAVE_ST_ACLCNT / HAVE_EXT2FS_EXT2_FS_H neu + +Mon Oct 4 02:30:10 2004 joerg + * libfind/find.c 1.13 + * libfind/find_main.c 1.13 + Lint + +Sun Oct 3 23:01:38 2004 joerg + * libfind/find.c 1.12 + * libfind/find_main.c 1.12 + Cstyle + +Sun Oct 3 12:46:27 2004 joerg + * libfind/find_main.c 1.11 + * libfind/find.c 1.11 + Version > 1.0 + +Sun Oct 3 12:42:10 2004 joerg + * libfind/walk.c 1.2 + WHome bei HAVE_FCHDIR am Ende von treewalk() wieder schliessen + +Tue Sep 28 14:59:08 2004 joerg + * mkisofs/mkisofs.c 1.163 + Cstyle + +Tue Sep 28 14:56:28 2004 joerg + * mkisofs/mkisofs.c 1.162 + lint + +Mon Sep 27 19:13:04 2004 joerg + * cdrecord/scsi_mmc.c 1.11 + pname_known() neu fuer das bessere Ausgeben von unbekannten Profilen + +Sat Sep 25 14:47:53 2004 joerg + * libschily/printf.c 1.15 + * libschily/spawn.c 1.17 + * libschily/jsprintf.c 1.15 + * libschily/match.c 1.21 + * libschily/getargs.c 2.37 + * libschily/getargs.c.old 2.37 + * libschily/breakline.c 1.10 + * libschily/findline.c 1.16 + * libschily/format.c 1.39 + * libschily/stdio/fgetstr.c 1.9 + * libschily/stdio/fgetline.c 1.8 + * libschily/stdio/ffileread.c 1.10 + * libschily/checkerr.c 1.7 + lint + +Sat Sep 25 14:34:17 2004 joerg + * makefiles/RULES/rules.lib 1.7 + include $(SRCROOT)/$(RULESDIR)/rules.lnt neu + +Sat Sep 25 14:34:00 2004 joerg + * makefiles/RULES/rules.lnt 1.2 + $(CFILES) -> $^ + +Sat Sep 25 14:32:05 2004 joerg + * libschily/getargs.c 2.36 + * libschily/getargs.c.old 2.36 + Besserer Kommentar - * Initial release 1.0 +Sat Sep 25 12:38:27 2004 joerg + * include/schily/getargs.h 1.10 + getallargs()/getargs()/getfiles() Prototypen hinzu diff -Nru cdrtools-2.01.01a33/Changelog.1 cdrtools-3.02a09/Changelog.1 --- cdrtools-2.01.01a33/Changelog.1 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/Changelog.1 2004-09-09 10:05:37.000000000 +0000 @@ -0,0 +1,7752 @@ +***** Version 2.01 ******** + +Wed Sep 8 20:26:34 2004 Joerg Schilling + * cdrecord.c 1.297 + * readcd.c 1.74 + * cdrecord.c 1.296 + Version -> 2.01 + +Sat Sep 4 22:28:05 2004 Joerg Schilling + * scsidefs.h 1.28 + * scsisense.h 2.18 + * scsicdb.h 2.19 + * scsireg.h 1.31 + * scgcmd.h 2.22 + Cstyle + +Wed Aug 25 13:28:57 2004 Joerg Schilling + * cdrecord.c 1.295 + Warnung fuer Linux-2.6.8.1 neu + +Tue Aug 24 01:11:42 2004 Joerg Schilling + * scsi-remote.c 1.16 + Auch die euid auf pw->pw_uid setzen bevor exec(RSH gemacht wird + +Thu Aug 19 12:14:09 2004 Joerg Schilling + * cdrecord.c 1.294 + Version -> 2.01a38 + +Thu Aug 19 12:08:26 2004 Joerg Schilling + * cdrecord.c 1.293 + linuxcheck() im %I% verbessert ;-) + +Mon Aug 16 16:42:17 2004 Joerg Schilling + * cdrecord.c 1.292 + Version -> 2.01a37 + SuSE Kommentar erweitert. + +Sun Aug 8 23:04:39 2004 Joerg Schilling + * scsi_mmc.c 1.10 + struct features & struct profiles -> LOCAL + +Thu Aug 5 10:26:18 2004 Joerg Schilling + * cdrecord.c 1.291 + Kommentar vor linuxcheck() erweitert + +Wed Aug 4 02:30:51 2004 Joerg Schilling + * cdrecord.c 1.290 + Version -> 2.01a36 + max_dma ist nun 4/5 der DMA Speed statt 1/2 + Warnung wegen Linux-2.6 eingebaut + Warnung wegen SuSE Linux eingebaut + +Sat Jul 31 17:41:06 2004 Joerg Schilling + * cdrecord.c 1.289 + Version -> 2.01a35 + Check auf dma_speed > 0, dma_speed Test nur wenn tracks > 0 + +Mon Jul 19 11:10:00 2004 Joerg Schilling + * scsi-wnt.c 1.45 + SPTI nicht bei NT-4.0 als Default + +Sun Jul 18 01:26:08 2004 Joerg Schilling + * cdrecord.c 1.288 + Version -> 2.01a34 + Mehr Tests auf Korektheit der Werte (sinnvoller Bereich in get_dmaspeed()) + dma_speed nur dann auswerten wenn > 0 + +Sun Jul 11 02:28:23 2004 Joerg Schilling + * cdrecord.1 1.103 + CDR_FORCESPEED domumentiert + +Sun Jul 11 01:57:27 2004 Joerg Schilling + * skel.c 1.3 + * readcd.c 1.73 + * xio.c 1.11 + -> NEED_O_BINARY + +Sun Jul 11 01:32:49 2004 Joerg Schilling + * readcd.c 1.72 + * skel.c 1.2 + MINGW32 neu + +Sun Jul 11 01:30:12 2004 Joerg Schilling + * xio.c 1.10 + setmode() auch bei MINGW32 + +Fri Jul 9 00:05:39 2004 Joerg Schilling + * cdrecord.c 1.287 + Version -> 2.01a33 + get_dmaspeed() neu + kein nice() bei __DJGPP__ + +Fri Jun 18 17:46:20 2004 Joerg Schilling + * scsi-wnt.c 1.44 + if (isdigit(vers) -> if (isdigit(vers[0]) (bug korrigiert + +Fri Jun 18 01:17:54 2004 Joerg Schilling + * drv_dvdplus.c 1.15 + * drv_dvd.c 1.118 + long dvd_next_addr -> LOCAL long dvd_next_addr + +Thu Jun 17 23:20:27 2004 Joerg Schilling + * scsierrs.c 2.29 + * scsitransp.c 1.91 + Bitfeld Typen fuer printf() auf int casten wegen IRIX cc + +Thu Jun 17 11:24:48 2004 Joerg Schilling + * readcd.c 1.71 + Verbose Ausgabe fuer Fehlerkorrekturen nochmals angepasst + +Sun Jun 13 16:28:28 2004 Joerg Schilling + * readcd.c 1.70 + maxtry neu + +Sun Jun 13 16:00:20 2004 Joerg Schilling + * readcd.c 1.69 + Ausgabe der maximale Anzahl der Retries + +Sat Jun 12 15:14:49 2004 Joerg Schilling + * drv_dvdplus.c 1.14 + * drv_dvd.c 1.117 + RAW & TAO Schreibmodi nach check_writemodes() loeschen damit niemand cdrecord -raw fuer DVDs aufruft + +Sat Jun 12 13:48:12 2004 Joerg Schilling + * scsi-linux-ata.c 1.7 + Warntext geaendert + +Fri Jun 11 16:49:15 2004 Joerg Schilling + * readcd.c 1.68 + Version -> 2.01a32 + -scanbus funktioniert nun auch wenn dev= nicht angegeben und /etc/default/cdrecord vorhanden + Auflistung der defekten Sektoren in allozierter Liste + +Thu Jun 10 10:58:19 2004 Joerg Schilling + * cdrecord.1 1.102 + Schreibfehler + +Wed Jun 2 22:54:33 2004 Joerg Schilling + * cdrecord.1 1.101 + -clone dokumentiert + +Tue May 25 17:33:15 2004 Joerg Schilling + * readcd.c 1.67 + Vsersion -> 2.01a31 + +Tue May 25 17:32:29 2004 Joerg Schilling + * readcd.c 1.66 + -scanbus neu + +Tue May 25 01:36:00 2004 Joerg Schilling + * cdrecord.h 1.161 + * scsi_cdr.c 1.137 + * drv_mmc.c 1.157 + write_buffer() neu und write_buffer() in drv_mmc.c -> yamaha_write_buffer() + +Thu May 20 16:42:12 2004 Joerg Schilling + * scsi-linux-sg.c 1.83 + Kommentar gegen die Debian patches fuer /dev/hd* + +Thu May 20 16:24:11 2004 Joerg Schilling + * scsi-linux-ata.c 1.6 + Bis zu 25 /dev/hd%c Files oeffnen + +Thu May 20 16:14:33 2004 Joerg Schilling + * scsi-linux-sg.c 1.82 + Kommentare um dumme Leute von SuSE davon abzuhalten wichtige Warnungen wegzupatchen + +Thu May 20 15:50:38 2004 Joerg Schilling + * cdrecord.1 1.100 + Kommentar zu benoetigten Root Rechten neu + +Thu May 20 15:35:52 2004 Joerg Schilling + * cdrecord.c 1.286 + Bessere Kommentare gegen SuSE die cdrecord nicht als root laufen lasse wollen + +Wed May 19 00:54:29 2004 Joerg Schilling + * cdrecord.c 1.285 + Make sure you are root. nur ausgeben wenn euid != 0 + +Wed May 19 00:47:48 2004 Joerg Schilling + * cdrecord.c 1.284 + Version -> 2.01a29 + reload geht nun auch fuer Notebook Laufwerke wieder + +Wed May 19 00:45:26 2004 Joerg Schilling + * cdrecord.h 1.160 + * scsi_mmc.c 1.9 + print_format_capacities() neu + +Wed May 19 00:27:28 2004 Joerg Schilling + * cdrecord.1 1.99 + Bessere beschreibung der Hintergruende fuer eine gute Wahl der FIFO Groesse (fs=) + +Mon May 17 00:38:17 2004 Joerg Schilling + * cdrecord.1 1.98 + Bessere Dokumentation fuer DVD + +Mon May 17 00:18:21 2004 Joerg Schilling + * scsilog.c 1.17 + Besserer Kommentar + +Sun May 16 23:46:51 2004 Joerg Schilling + * drv_mmc.c 1.156 + bei OPC "Power calibration area almost full" nicht als Fehler auffassen + +Sun May 16 17:01:24 2004 Joerg Schilling + * cdrecord.1 1.97 + Bessere Dokumentation der driver= Option + +Sun May 16 01:37:11 2004 Joerg Schilling + * cdrecord.1 1.96 + Diverse kleinere Schreibfehler beseitigt + +Sun May 16 01:26:52 2004 Joerg Schilling + * cdrecord.1 1.95 + Eißfeldt -> Ei\*sfeldt + µsec -> \*msec + +Sat May 15 23:14:18 2004 Joerg Schilling + * subchan.c 1.19 + index Variable -> curindex wegen GCC Shadow Warnung + +Sun May 9 17:59:31 2004 Joerg Schilling + * skel.c 1.1 + date and time created 04/05/09 16:59:31 by joerg + +Fri Apr 23 00:51:24 2004 Joerg Schilling + * scsi-wnt.c 1.43 + Padding fuer ASPI CMD Struktur damit auch 32 Byte Sense Daten von SPTI gehen + +Wed Apr 21 01:48:32 2004 Joerg Schilling + * scsi-wnt.c 1.42 + Support fuer SPTI & Kontroller mit mehr als einem SCSI Bus + Bei SPTI ist SENSE_LEN max nun 32 + +Sun Apr 18 13:26:43 2004 Joerg Schilling + * scsi-linux-sg.c 1.81 + MAX-SCG -> 256 wegen Linux USB Implementierung + +Fri Apr 16 15:29:34 2004 Joerg Schilling + * scsi_scan.c 1.19 + Bis zu 256 Busse scannen. + +Thu Apr 15 16:35:46 2004 Joerg Schilling + * cdrecord.c 1.283 + Version -> 2.01a28 + +Mon Apr 12 16:13:47 2004 Joerg Schilling + * cdrecord.1 1.94 + Read Book -> Red Book + +Tue Apr 6 11:59:03 2004 Joerg Schilling + * cdrecord.c 1.282 + Bessere Fehlermeldung bei fehlendem -pad/-shorttrack + +Mon Mar 15 01:59:49 2004 Joerg Schilling + * cdrecord.c 1.281 + Kommentar fuer cuefile= & -raw + +Wed Mar 10 21:54:36 2004 Joerg Schilling + * readcd.c 1.65 + * cdrecord.1 1.93 + * cdrecord.c 1.280 + ts= Doku besser + +Mon Mar 8 00:43:39 2004 Joerg Schilling + * scsi-linux-sg.c 1.80 + Fehler if (sp->u_sense.cmd_sense != 0 -> if (sp->u_sense.cmd_sense[0] != 0 korrigiert + Wenn ASC/ASQ und auch alle zusaetzlichen Bits/Key in Byte 2 0 sind, dann loeschen wir CHECK CONDITION wieder + weil das ein Linux USB Problem ist wo z.B. wegen einem DMA Underrun REQUEST SENSE geschickt wurde + und das Laufwerk erwartungemaesz mit NO SENSE geantwortet hat + +Sun Mar 7 23:43:08 2004 Joerg Schilling + * cdrecord.c 1.279 + Version -> 2.01a27 + +Thu Mar 4 09:24:11 2004 Joerg Schilling + * cdrecord.c 1.278 + Bugfix: Nach Umstellung des Tests auf Schreibmodus Option ging nur noch TAO + +Wed Mar 3 01:27:14 2004 Joerg Schilling + * drv_dvd.c 1.115 + * cue.c 1.20 + * isosize.c 1.9 + * drv_simul.c 1.47 + * getnum.c 1.2 + * movesect.c 1.3 + Cstyle + +Tue Mar 2 21:02:42 2004 Joerg Schilling + * misc.c 1.4 + * cue.c 1.19 + Copyright -> 2004 + +Tue Mar 2 02:53:06 2004 Joerg Schilling + * modes.c 1.25 + * fifo.c 1.47 + * drv_mmc.c 1.155 + * drv_sony.c 1.70 + * drv_dvdplus.c 1.13 + * drv_7501.c 1.15 + * diskid.c 1.37 + * defaults.c 1.11 + * crc16.c 1.6 + * cdr_drv.c 1.36 + * clone.c 1.7 + * drv_philips.c 1.68 + * readcd.c 1.64 + * scsi_cdr.c 1.136 + * scsi_scan.c 1.18 + * iso9660.h 1.5 + * xio.h 1.2 + * cdtext.h 1.5 + Cstyle + +Tue Mar 2 01:13:42 2004 Joerg Schilling + * wm_track.c 1.4 + Copyright -> 2004 + +Mon Mar 1 11:08:40 2004 Joerg Schilling + * cdrecord.h 1.159 + * mmcvendor.h 1.3 + * scsilog.h 1.4 + * scsimmc.h 1.10 + * drv_jvc.c 1.80 + * scsi_mmc.c 1.8 + * cdtext.c 1.10 + * scsilog.c 1.16 + * auinfo.c 1.23 + * cdrecord.c 1.277 + * audiosize.c 1.19 + * sector.c 1.12 + * subchan.c 1.17 + * wm_packet.c 1.24 + * xio.c 1.8 + Cstyle + +Mon Mar 1 11:02:43 2004 Joerg Schilling + * scsimmc.h 1.11 + * subchan.c 1.18 + * wm_packet.c 1.25 + * xio.c 1.9 + * sector.c 1.13 + Copyright -> 2004 + +Sun Feb 29 21:49:03 2004 Joerg Schilling + * cdrecord.c 1.276 + Cstyle + +Sun Feb 29 18:19:58 2004 Joerg Schilling + * cdrecord.c 1.275 + Version -> 2.01a26 + -tao/-sao neu + +Sun Feb 29 18:13:20 2004 Joerg Schilling + * cdrecord.1 1.92 + -tao Option neu, -sao Option als Alias fuer -dao + +Sun Feb 22 16:41:57 2004 Joerg Schilling + * cdrecord.1 1.91 + Schreibfehler + +Sun Feb 22 15:53:51 2004 Joerg Schilling + * readcd.c 1.63 + * cdrecord.h 1.158 + * defaults.c 1.10 + cdr_defaults() Prototy -> neues defaults.h + +Sun Feb 22 15:53:00 2004 Joerg Schilling + * defaults.h 1.1 + date and time created 04/02/22 15:53:00 by joerg + +Sun Feb 1 21:32:58 2004 Joerg Schilling + * adip.h 1.1 + date and time created 04/02/01 21:32:58 by joerg + +Fri Jan 23 23:10:42 2004 Joerg Schilling + * scsi-wnt.c 1.41 + dev=ATAPI:1,0 geht nun wieder + +Mon Jan 19 21:29:24 2004 Joerg Schilling + * drv_dvd.c 1.113 + * cdrecord.c 1.274 + * drv_dvdplus.c 1.12 + * wm_packet.c 1.23 + trackp[i].padsecs * secsize -> (Llong)trackp[i].padsecs * secsize, damit kein Integeroverflow mehr stattfindet + +Thu Jan 15 22:24:39 2004 Joerg Schilling + * scsi-wnt.c 1.40 + w2k_or_newer() neu um bei NT-4.0 wegen DMA Problemen mit SPTI per Default mit ASPI zu betreiben + Debug prints fuer bessere Beurteilung der Funktionsweise + +Thu Jan 15 02:22:38 2004 Joerg Schilling + * scsi-mac-iokit.c 1.9 + memset sense 0 wieder eingebaut bis endgueltig geklaert ist wie es sein sollte + +Thu Jan 15 01:55:36 2004 Joerg Schilling + * scsi-hpux.c 1.31 + * scsi-linux-pg.c 1.43 + * scsi-vms.c 1.33 + * scsi-os2.c 1.25 + * scsi-wnt.c 1.39 + * scsi-remote.c 1.15 + * scsi-unixware.c 1.36 + * scsi-qnx.c 1.3 + * scsi-osf.c 1.26 + * scsi-sgi.c 1.36 + * scsi-bsd.c 1.42 + * scsi-bsd-os.c 1.28 + * scsi-beos.c 1.22 + Umbau fuer Cstyle + +Thu Jan 15 01:05:25 2004 Joerg Schilling + * scsi-openserver.c 1.31 + Aenderungen fuer Cstyle + +Thu Jan 15 00:50:11 2004 Joerg Schilling + * scsi-next.c 1.32 + * scsi-linux-ata.c 1.5 + Umbau wegen Cstyle + +Wed Jan 14 20:05:52 2004 Joerg Schilling + * drv_dvd.c 1.112 + Unbenutzte Variablen beseitigt + +Wed Jan 14 20:04:33 2004 Joerg Schilling + * scsi-sun.c 1.82 + Aumbau fuer Cstyle + +Wed Jan 14 19:57:28 2004 Joerg Schilling + * scsi-sun.c 1.81 + Ueberfluessige Variable sb beseitigt + +Wed Jan 14 18:54:48 2004 Joerg Schilling + * scsi-apollo.c 1.5 + * scsi-amigaos.c 1.6 + * scsi-aix.c 1.36 + * scsi-linux-sg.c 1.79 + * scsiopen.c 1.95 + * scsitransp.c 1.90 + * scgsettarget.c 1.2 + * scsihelp.c 1.4 + Umbau fuer cstyle + +Wed Jan 14 15:37:47 2004 Joerg Schilling + * scsi-linux-sg.c 1.78 + LF_ATA Flag neu + +Wed Jan 14 01:14:27 2004 Joerg Schilling + * scsi-mac-iokit.c 1.8 + ux_errno wird nun korrekt gesetzt wenn ein Kommando schiefgeht + Die Sense Daten werden nicht mehr gelöscht + Author ist nun "schily", denn das Modul kommt nun teilweise dirch scgcheck + +Tue Jan 13 20:43:44 2004 Joerg Schilling + * scsi-mac-iokit.c 1.7 + Umbau fuer Cstyle + +Mon Jan 12 00:36:04 2004 Joerg Schilling + * drv_mmc.c 1.154 + Besserer Kommentar bei den Profilen in identify + +Mon Jan 12 00:33:39 2004 Joerg Schilling + * cdr_drv.c 1.35 + dp bei error() ueberpruefen um coredumps bei cdrecord -xd zu verhindern + +Sun Jan 11 18:42:14 2004 Joerg Schilling + * scsi-linux-sg.c 1.77 + Versuch das /dev/hd* Interface von Linux-2.6 besser zu unterstützen. + +Sun Jan 11 16:18:48 2004 Joerg Schilling + * scsi-linux-sg.c 1.76 + Kommentar verbessert + +Sun Jan 11 14:39:45 2004 Joerg Schilling + * scsi-wnt.c 1.38 + w2kstyle_create() umgestellt und so repariert, dasy kein unzulaessiger Speicherzugriff mehr erfolgt + +Sun Jan 11 14:09:19 2004 Joerg Schilling + * scsi-wnt.c 1.37 + loas_aspi() neu + +Sun Jan 11 13:28:56 2004 Joerg Schilling + * scsi-wnt.c 1.36 + Aenderungen damit cdrecord -scanbus dev=ASPI geht + +Wed Jan 7 00:38:26 2004 Joerg Schilling + * cdrecord.h 1.157 + * scsi_scan.c 1.17 + * scsi-mac-iokit.c 1.6 + * scsi-sun.c 1.80 + * scsi-wnt.c 1.34 + * scsitransp.c 1.89 + * cdrecord.c 1.273 + Copyright -> 2004 + +Wed Jan 7 00:20:32 2004 Joerg Schilling + * scsi-wnt.c 1.35 + Anderer Version String fuer SPTI + +Wed Jan 7 00:03:55 2004 Joerg Schilling + * cdrecord.c 1.272 + Version -> 2.01a24 + +Tue Jan 6 23:58:43 2004 Joerg Schilling + * cue.c 1.18 + Wenn FILE Anweisung im CUE Sheet keinen Slash (/) enthaelt, dann wird der Filename auch im Directory des CUE Sheets gesucht + +Tue Jan 6 23:52:52 2004 Joerg Schilling + * scsitransp.c 1.88 + Version -> 0.8 + +Tue Jan 6 23:33:20 2004 Joerg Schilling + * scsi-wnt.c 1.33 + Cstyle + +Tue Jan 6 23:21:14 2004 Joerg Schilling + * scsi-wnt.c 1.32 + SPTI Unterdrueckung von nocht CD-ROM deaktiviert + +Tue Jan 6 23:10:18 2004 Joerg Schilling + * scsi-wnt.c 1.31 + Erste Version mit SPTI Support + +Tue Jan 6 17:58:47 2004 Joerg Schilling + * scsi-mac-iokit.c 1.5 + scgo_havebus() korrigiert (war immer FALSE) damit pxupgrade funktioniert + +Tue Jan 6 01:01:59 2004 Joerg Schilling + * drv_mmc.c 1.153 + cmd_dummy statt init_mmc in den Treiberstrukturen fuer CD-ROM Leser + +Sun Jan 4 15:26:25 2004 Joerg Schilling + * scsi-sun.c 1.79 + Erste Version einer UID Verwaltung die fuer Solaris 9 USCSI gebraucht wird + +Fri Jan 2 16:05:57 2004 Joerg Schilling + * scsi-sun.c 1.78 + Erste Version die mit Volume Management arbeitet + +Fri Jan 2 16:05:21 2004 Joerg Schilling + * cdrecord.c 1.271 + Version -> 2.01a23 + +Fri Jan 2 16:05:06 2004 Joerg Schilling + * scsi_scan.c 1.16 + Hack fuer fd == -1 -> Kein Zugriff auf LW -> '?' statt '*' + +Tue Dec 30 14:20:00 2003 Joerg Schilling + * cdrecord.c 1.270 + Schreibfehler will not not Korrigiert + +Mon Dec 29 15:25:05 2003 Joerg Schilling + * cdrecord.1 1.90 + Bessere Beschreibung und Beispiel fuer -setdropts driveropts= + +Wed Dec 24 11:51:56 2003 Joerg Schilling + * drv_mmc.c 1.152 + Hinweis auf RAW bei nicht funktionierendem CUE Sheet + +Tue Dec 23 13:48:33 2003 Joerg Schilling + * cdrecord.c 1.269 + Version -> 2.01a21 + Hack fuer POSIX_PRIORITY_SCHEDULING Bug (wir brauchen root Rechte um die Pri zu verringern) + +Sun Dec 21 14:29:21 2003 Joerg Schilling + * cdrecord.1 1.89 + Neuer Absatz ueber ATAPI auf erster Seite. + +Thu Dec 18 17:10:58 2003 Joerg Schilling + * scsitransp.c 1.87 + Aehnlicher Text wie in cdrecord.c wenn !defined(IS_SCHILY_XCONFIG) + +Thu Dec 18 17:10:26 2003 Joerg Schilling + * cdrecord.c 1.268 + Neuer Text fuer modifizierte Versionen ohne Support + +Thu Dec 18 17:09:41 2003 Joerg Schilling + * cdrecord.1 1.88 + .sp verschoben auf Wunsch von Eric Raymond + +Tue Dec 16 00:42:16 2003 Joerg Schilling + * cdrecord.c 1.267 + Security Test Ausgabe nun auch ohne Root Zugriff sichtbar + +Mon Dec 15 16:40:59 2003 Joerg Schilling + * cdrecord.c 1.266 + Ausgabe des Resultats des Security Checks + +Mon Dec 15 09:19:24 2003 Joerg Schilling + * drv_mmc.c 1.151 + Copyright -> 2003 + +Mon Dec 15 09:18:14 2003 Joerg Schilling + * drv_mmc.c 1.150 + Ein DVD Brenner wird nun auch erkannt wenn er nur MMC-3 und nicht MMC-2 konform ist + Hinweis auf ftp://ftp.berlios.de/pub/cdrecord/ProDVD/ + +Mon Dec 15 07:32:55 2003 Joerg Schilling + * cdrecord.c 1.265 + comexit(0); nach "erstem" -force blank unit entfernt damit auch mit dem Ricoh-5125 Medien erweckt werden koennen + +Thu Dec 11 12:59:54 2003 Joerg Schilling + * scsireg.h 1.30 + #ifdef __SCG_COMPAT_ zum enablen von info/ident/revision -> vendor_info/prod_ident/prod_revision + +Thu Dec 11 12:55:42 2003 Joerg Schilling + * scsi_scan.c 1.15 + * scsi_cdr.c 1.135 + info -> vendor_info, ident -> prod_ident, revision -> prod_revision + +Wed Dec 10 00:42:39 2003 Joerg Schilling + * scsi-dos.c 1.11 + Hinweis auf http://bootcd.narod.ru/ + +Wed Dec 10 00:40:49 2003 Joerg Schilling + * cdrecord.c 1.264 + Hinweis auf ftp://ftp.berlios.de/pub/cdrecord/ProDVD/ + +Wed Dec 10 00:19:03 2003 Joerg Schilling + * cdrecord.c 1.263 + Version -> 2.01a20 + FIFO Abschalten wenn fifosize < 2*bufsize + +Tue Dec 9 20:52:14 2003 Joerg Schilling + * cdrecord.1 1.87 + ..sp -> .sp Schreibfehler + +Sun Nov 30 13:50:31 2003 Joerg Schilling + * scsi-dos.c 1.10 + schcgeck funktioniert nun, kein DMAresid und max sense_count 18 + +Sun Nov 30 00:00:01 2003 Joerg Schilling + * xio.c 1.7 + * readcd.c 1.62 + #include auch fuer DJGPP + +Sat Nov 29 23:36:39 2003 Joerg Schilling + * scsi-dos.c 1.9 + Srb.Type.ExecSCSICmd.SenseLen = DEF_SENSE_LEN; -> Srb.Type.ExecSCSICmd.SenseLen = (SENSE_LEN+2); + +Sat Nov 29 23:11:56 2003 Joerg Schilling + * readcd.c 1.61 + Version -> 2.01a20 + +Sat Nov 29 23:10:16 2003 Joerg Schilling + * xio.c 1.6 + setmode(fileno, O_BINARY) auch fuer DJGPP + +Sat Nov 29 23:10:00 2003 Joerg Schilling + * readcd.c 1.60 + #include fuer __CYGWIN32__/__EMX__ + setmode(fileno, O_BINARY) auch fuer DJGPP + +Sat Nov 29 23:03:06 2003 Joerg Schilling + * scsi-dos.c 1.8 + Sense_len & sense_count korrekt beachten + SS_ERR -> vor die invalid Device & Cannot Select Bus cases im switch in send_cmd() + +Sat Nov 29 22:28:57 2003 Joerg Schilling + * scsi-dos.c 1.7 + Schreibfehler is statt if beseitigt + +Sat Nov 29 19:11:41 2003 Joerg Schilling + * scsi-os2.c 1.24 + Return (0) statt -1 bei FATAL Error in send_cmd() wenn kein gueltiges Target gesetzt ist + +Sat Nov 29 19:10:48 2003 Joerg Schilling + * scsi-dos.c 1.6 + Neuer AspiLoaded Counter fuer mehrfaches Oeffnen + +Sat Nov 29 19:06:55 2003 Joerg Schilling + * scsi-wnt.c 1.30 + Return (0) statt -1 bei FATAL Error in send_cmd() wenn kein gueltiges Target gesetzt ist + SS_ERR mit cp->SRB_TargStat != 0 ist nun SCG_NO_ERROR + AspiLoaded ist nun integer Counter damit mehrere open()s moeglich sind + +Sat Nov 29 19:04:36 2003 Joerg Schilling + * scsi-dos.c 1.5 + Return (0) statt -1 bei FATAL Error in send_cmd() wenn kein gueltiges Target gesetzt ist + SS_ERR mit Srb.Type.ExecSCSICmd.TargStat != 0 ist nun SCG_NO_ERROR + +Sat Nov 29 18:58:35 2003 Joerg Schilling + * scsi-dos.c 1.4 + Cstyle + +Sat Nov 29 18:30:44 2003 Joerg Schilling + * scsi-dos.c 1.3 + Umbau auf _go32_dpmi_allocate_real_mode_callback_retf() + +Fri Nov 28 10:25:15 2003 Joerg Schilling + * scsi-dos.c 1.2 + Callback Funktion neu + +Fri Nov 28 02:33:18 2003 Joerg Schilling + * scsihack.c 1.43 + scsi-dos.c neu + +Fri Nov 14 10:55:14 2003 Joerg Schilling + * scsi-dos.c 1.1 + date and time created 03/11/14 10:55:14 by joerg + +Sun Nov 2 23:50:22 2003 Joerg Schilling + * fifo.c 1.46 + fifo_percent() fragt nun (sp == NULL) ab um festzustellen of der FIFO aus ist + +Wed Oct 29 15:33:45 2003 Joerg Schilling + * scsi-remote.c 1.14 + strcatl()/concat()/*execl() casten nun NULL im letzten Arg nach (char *)NULL + +Wed Oct 1 00:39:23 2003 Joerg Schilling + * cdrecord.h 1.156 + Kommentar ueber minimale FIFO Groesse + +Sun Aug 24 13:15:10 2003 Joerg Schilling + * cdrecord.1 1.86 + driveropts in /Etc/default/cdrecord dokumentiert + +Tue Jul 22 21:43:08 2003 Joerg Schilling + * cdrecord.c 1.262 + Version -> 2.01a17 + +Mon Jul 21 00:06:31 2003 Joerg Schilling + * cdrecord.h 1.155 + * cdrecord.1 1.85 + * cdrecord.c 1.261 + Neue Option ts= + +Fri Jul 18 10:04:20 2003 Joerg Schilling + * readcd.c 1.59 + Version -> 2.01a17 + Teilweise #ifndef EXTVERS -> #ifdef CLONE_WRITE fuer genauere Beschreibung des Kodes + +Fri Jul 18 10:03:04 2003 Joerg Schilling + * scsi_cdr.c 1.134 + Kommentar Hinweis in cdr_underrun() + +Fri Jul 11 11:43:25 2003 Joerg Schilling + * cdrecord.1 1.84 + Schreibfehler + +Sun Jul 6 00:04:14 2003 Joerg Schilling + * scsi-os2.c 1.23 + EIO statt EINVAL damit Scan fuer Targets > 7 klappt + +Sat Jun 21 21:42:56 2003 Joerg Schilling + * scsi-sun.c 1.77 + Workaround fuer Solaris 8 x86 Bug: DKIOCINFO liefert 256 kB DMAsize aber nur 68 kB geht bei ATAPI & DMA + +Sat Jun 21 19:42:26 2003 Joerg Schilling + * readcd.c 1.58 + Neue Option -factor + +Fri Jun 20 22:47:08 2003 Joerg Schilling + * readcd.c 1.57 + Neue Option ts= fuer Transfer size + +Fri Jun 20 22:32:59 2003 Joerg Schilling + * readcd.c 1.56 + Residual count auswerten beim Lesen + +Fri Jun 20 22:21:33 2003 Joerg Schilling + * readcd.c 1.55 + prstats_silent() Prototyp neu + Versuch damit klarzukommen dasz einige BS (UnixWare) nicht mit odd byte DMA bei ATAPI klarkommen (READ FULL TOC) + Ausgabe aller Lead out startzeiten bei -clone (READ FULL TOC) + Geschwindigkeitsangaben beziehen sich auf 1000 Byte == 1 kb + Hack to write empty disks geht mit end == 1 statt end == 0 + +Tue Jun 17 19:23:35 2003 Joerg Schilling + * cdrecord.1 1.83 + Schreibfehler + +Tue Jun 17 19:18:00 2003 Joerg Schilling + * auinfo.c 1.22 + samples -> nsamples wegen samples() Makro und K&R C + +Sat May 31 21:58:05 2003 Joerg Schilling + * scsi-amigaos.c 1.5 + Neue Version von Thomas Langer + +Sat May 31 19:41:16 2003 Joerg Schilling + * scsi-amigaos.c 1.4 + Eingerueckt nach cstyle + +Sat May 31 18:34:37 2003 Joerg Schilling + * cdrecord.c 1.260 + GPL Hinweise besser formuliert, Schreibfehler in usage() beseitigt + +Sat May 31 18:10:38 2003 Joerg Schilling + * cdrecord.1 1.82 + Schreibfehler berichtigt & -format dokumentiert + +Sat May 31 18:09:46 2003 Joerg Schilling + * auinfo.c 1.21 + Fix fuer fehlerhafte Erkennung von *.inf Dateien die Meldung 'WARNING: Stdin is connected to a terminal.' verursacht + +Fri May 16 13:02:58 2003 Joerg Schilling + * scsi-remote.c 1.13 + js_snprintf(devname, sizeof(devname), device); -> js_snprintf(devname, sizeof(devname), "%s", device); + +Wed May 14 18:59:12 2003 Joerg Schilling + * cdrecord.c 1.259 + CD-Text -text Aktivierung durch trackp[MAX_TRACK+1].flags |= TI_TEXT + Kein CD-text mehr wenn track[0].flags & TI_TEXT schon gesetzt (durch textfile=) + +Wed May 14 18:57:53 2003 Joerg Schilling + * cue.c 1.17 + CD-Text aus CDTEXTFILE nur noch wenn trackp[MAX_TRACK+1].flags & TI_TEXT + +Wed May 14 18:56:55 2003 Joerg Schilling + * cdrecord.1 1.81 + Neue erweiterte CD-Text Behandlung beschrieben + +Wed May 14 02:24:17 2003 Joerg Schilling + * cdrecord.c 1.258 + Version -> 2.01a15, Diverse Umstellungen damit tracks == 0 Abfragen bei cuefile=xxx korrekt behandelt werden + +Wed May 14 02:21:07 2003 Joerg Schilling + * xio.c 1.5 + while(pp) -> for (; pp; pp = pp->x_next) damit continue bei x_name == NULL nicht zur Endlosschleife wird + +Tue May 13 23:26:57 2003 Joerg Schilling + * cdrecord.1 1.80 + speed= Behandlung besser erklaert und Schreibfehler + +Tue May 13 23:26:14 2003 Joerg Schilling + * cue.c 1.16 + TI_SWAB bei FILE ... WAVE setzen + +Tue May 13 13:07:03 2003 Joerg Schilling + * xio.c 1.4 + pp->x_name == NULL voer strcmp geaendert + +Tue May 13 13:05:00 2003 Joerg Schilling + * xio.c 1.3 + Neue Knoten korrekt in Liste ein und aushaengen + +Mon May 12 02:17:00 2003 Joerg Schilling + * drv_mmc.c 1.149 + Support fuer TM_QUADRO/TM_ALLOW_COPY neu + Hack fuer CUE Sheet Handling mit MODE2/CDI trackp[i].dbtype == DB_RAW + Fuer Lead-In/Lead-Out werden nun die Bits fuer Datengroesse wegmaskiert + +Mon May 12 01:39:30 2003 Joerg Schilling + * cdrecord.c 1.257 + setleadinout() setzt nun trackp[tracks+1].tracktype aus trackp[tracks].tracktype + +Mon May 12 01:38:03 2003 Joerg Schilling + * cue.c 1.15 + Erste funktionierende Version + +Mon May 12 00:26:35 2003 Joerg Schilling + * drv_dvdplus.c 1.8 + Canot -> Cannot Schreibfehler beseitigt + +Mon May 12 00:25:29 2003 Joerg Schilling + * cdrecord.h 1.154 + parsecue()/fparsecue() neu + +Mon May 12 00:22:57 2003 Joerg Schilling + * cdrecord.c 1.256 + Version -> 2.01a14, Neue Option cuefile=, Kein Aufruf von checkdsize() wenn tracks == 0 (tsize == -150) + +Mon May 12 00:20:55 2003 Joerg Schilling + * cdrecord.1 1.79 + einfache erste cuefile= Doku + +Sun May 11 21:47:29 2003 Joerg Schilling + * cdrecord.h 1.153 + TI_QUADRO & is_quadro() neu + +Sun May 11 21:46:53 2003 Joerg Schilling + * xio.c 1.2 + Schutz gegen Coredump wenn pp->x_name == NULL + +Sat May 10 16:15:14 2003 Joerg Schilling + * cue.c 1.14 + Erster Ansatz fuer parse_file() + +Sat May 10 15:05:46 2003 Joerg Schilling + * cue.c 1.13 + struct state neu + cueopen()/neednextitem()/needword()/needitem()/checkextra()/cueabort() neu + +Fri May 9 10:10:42 2003 Joerg Schilling + * cue.c 1.12 + keyw_t Arrays -> LOCAL + +Fri May 9 10:08:10 2003 Joerg Schilling + * cue.c 1.11 + Parser Funktionen -> LOCAL + +Fri May 9 10:00:21 2003 Joerg Schilling + * cue.c 1.10 + Erster Ansatz zum weiteren parsieren der Keywort Zeilen mit den Funktionen parse_*() + +Fri May 9 09:58:25 2003 Joerg Schilling + * cdtext.c 1.9 + #include cdtext.h vor cdrecord.h wegen gettextptr() und den Typ textptr_t + +Fri May 9 09:57:08 2003 Joerg Schilling + * auinfo.c 1.20 + * cdrecord.h 1.152 + gettextptr() ist nun nicht mehr LOCAL + +Fri May 9 09:56:24 2003 Joerg Schilling + * cdtext.h 1.4 + #define CDTEXT_H fuer Erkennung dasz cdtext.h includiert wurde + +Thu May 8 20:13:07 2003 Joerg Schilling + * cue.c 1.9 + Umgestellt fuer mehr "Ordnung" + +Thu May 8 19:57:21 2003 Joerg Schilling + * cue.c 1.8 + Definitionen fuer alle Schluesselworte + +Thu May 8 19:44:42 2003 Joerg Schilling + * cue.c 1.7 + getlocal() beseitigt, parsecue()/fparsecue() neu + +Thu May 8 19:38:55 2003 Joerg Schilling + * scsiopen.c 1.94 + js_snprintf(errs, slen, scgp->errstr) -> js_snprintf(errs, slen, "%s", scgp->errstr) + +Thu May 8 19:38:14 2003 Joerg Schilling + * drv_mmc.c 1.148 + get_speeds_plextor() geht nicht mit alten LW, daher Ausfuerung im silent Mode + +Thu May 8 00:45:07 2003 Joerg Schilling + * cue.c 1.6 + Reihenfolge der Keyworte Kommentar + +Wed May 7 23:46:01 2003 Joerg Schilling + * cdrecord.h 1.151 + * wm_packet.c 1.22 + * fifo.c 1.45 + * cdrecord.c 1.255 + Umbau auf 'xio' + +Wed May 7 20:31:31 2003 Joerg Schilling + * xio.h 1.1 + * xio.c 1.1 + date and time created 03/05/07 19:31:31 by joerg + +Tue May 6 23:57:09 2003 Joerg Schilling + * cdrecord.h 1.150 + * cdrecord.1 1.78 + * cdrecord.c 1.254 + -abort Option neu + +Tue May 6 19:12:27 2003 Joerg Schilling + * cue.c 1.5 + Kommentar verbessert, lookup() mit table Parameter + +Tue May 6 00:35:47 2003 Joerg Schilling + * cue.c 1.4 + Kommentar verbessert + +Tue May 6 00:23:14 2003 Joerg Schilling + * cue.c 1.3 + Umbau auf Makefilesystem, ungetline()/getlocal() neu + +Sun May 4 18:41:33 2003 Joerg Schilling + * cdrecord.1 1.77 + Beschreibung der Audio Kopie aus Pipe + +Sun May 4 18:36:46 2003 Joerg Schilling + * cdrecord.c 1.253 + Version -> 2.01a13 + +Sun May 4 18:35:19 2003 Joerg Schilling + * cdrecord.h 1.149 + * cdrecord.c 1.252 + * auinfo.c 1.19 + Neue Funktion auinfosize() fuer AudioCDs aus Pipe Brennen + +Sun May 4 15:46:38 2003 Joerg Schilling + * cdrecord.c 1.251 + Neue Funktion opentracks() und Umstellung des Trackparsing + +Sun May 4 15:18:21 2003 Joerg Schilling + * fifo.c 1.44 + STDIN wird nicht mehr geschossen damit Audio "On the Fly" moeglich wird + +Sun May 4 15:16:43 2003 Joerg Schilling + * cdrecord.h 1.148 + Neues Track Flag TI_USEINFO, tracktype/dbtype nun Uchar + +Sun May 4 12:52:00 2003 Joerg Schilling + * cdrecord.c 1.250 + setuid(getuid()) nachdem alle root Dinge erledigt sind (hoffentlich) + +Sat May 3 20:09:17 2003 Joerg Schilling + * scsitransp.h 1.54 + * scsitransp.c 1.86 + scg_fprascii()/scg_prascii()/scg_sprascii() neu + +Sat May 3 19:39:32 2003 Joerg Schilling + * cdrecord.c 1.249 + gracewait setzt nun didgrace auf TRUE um doppeltes Warten zu vermeiden + +Fri May 2 22:49:20 2003 Joerg Schilling + * scsi-unixware.c 1.35 + Debug error() beseitigt + +Fri May 2 22:46:35 2003 Joerg Schilling + * scsi-unixware.c 1.34 + xpopen() neu damit suid root Binaries gehen, denn /etc/scsi/pdiconfig geht nicht wenn euid != uid + +Tue Apr 29 22:59:14 2003 Joerg Schilling + * cdrecord.c 1.248 + Version -> 2.01a11 + +Tue Apr 29 20:59:54 2003 Joerg Schilling + * cdrecord.c 1.247 + * cdrecord.1 1.76 + Neue Optionen -xa/-xamix und -multi/-mode2/-xa1/-xa2/-cdi korrigiert + +Tue Apr 29 20:41:16 2003 Joerg Schilling + * drv_mmc.c 1.147 + Support fuer TAO -mode2 + +Tue Apr 29 20:40:26 2003 Joerg Schilling + * cdrecord.h 1.147 + Definitionen fuer Daten Sektor Typen + +Tue Apr 29 00:27:20 2003 Joerg Schilling + * drv_mmc.c 1.146 + Bessere Ausgabe fuer formatierte RW Medien + +Tue Apr 29 00:26:27 2003 Joerg Schilling + * scsi_mmc.c 1.7 + Ausgave des Current Profile auf separater Zeile + +Wed Apr 23 23:25:27 2003 Joerg Schilling + * drv_dvdplus.c 1.5 + Ungebrauchte Variablen beseitigt + +Wed Apr 23 23:20:27 2003 Joerg Schilling + * scsi_cdr.c 1.133 + read_track_info() Bug gefixt (type Bits waren in cmd_cdb[2] statt cmd_cdb[1]) + +Wed Apr 23 23:19:24 2003 Joerg Schilling + * cdrecord.c 1.246 + gracewait() umstrukturiert + +Wed Apr 23 23:18:13 2003 Joerg Schilling + * scsi_mmc.c 1.6 + * drv_mmc.c 1.145 + * cdrecord.h 1.146 + print_profiles() neu + +Tue Apr 22 22:36:02 2003 Joerg Schilling + * cdrecord.c 1.245 + Return Code von (*dp->cdr_init)(scgp, dp) auswerten + +Tue Apr 22 19:08:58 2003 Joerg Schilling + * cdrecord.c 1.244 + raise_fdlim versucht nun nicht mehr z.B. ein Limit von 256 auf 109 zu "erhoehen". + +Tue Apr 22 17:47:29 2003 Joerg Schilling + * drv_mmc.c 1.144 + Fehlendes " ergaenzt + +Tue Apr 22 17:46:28 2003 Joerg Schilling + * drv_mmc.c 1.143 + Bessere Fehlermeldung fuer get next writable address auf formatierte CD-RW + +Tue Apr 22 17:42:06 2003 Joerg Schilling + * cdrecord.c 1.243 + Mehr Fehlermeldungen wenn in der Hauptschleife Fehler auftreten. + +Tue Apr 22 01:08:46 2003 Joerg Schilling + * cdrecord.c 1.242 + Version -> 2.01a11, gracewait() mit didgrace Parameter fuer Ausgabe ohne Warten + +Mon Apr 21 15:49:58 2003 Joerg Schilling + * cdrecord.c 1.241 + Format Code mit #ifdef DRV_DVD auskommentiert + +Mon Apr 21 15:40:04 2003 Joerg Schilling + * drv_mmc.c 1.142 + CL_TYPE_* #defines neu fuer scsi_close_tr_session() + +Mon Apr 21 15:39:13 2003 Joerg Schilling + * cdrecord.c 1.240 + -format & BOOL gracedone neu + +Mon Apr 21 15:23:22 2003 Joerg Schilling + * cdrecord.h 1.145 + * scsi_cdr.c 1.132 + request_sense_b()/reserve_tr_rzone() neu + +Mon Apr 21 14:22:51 2003 Joerg Schilling + * cdrecord.c 1.239 + Umbau auf gracewait() + +Sun Apr 20 16:26:57 2003 Joerg Schilling + * scsi_mmc.c 1.5 + get_format_capacities() neu + +Sun Apr 20 16:22:26 2003 Joerg Schilling + * drv_mmc.c 1.141 + read_track_info() mit erweiterten Parametern (Type) -> TI_TYPE_TRACK + +Sun Apr 20 16:21:22 2003 Joerg Schilling + * scsi_cdr.c 1.131 + read_track_info() mit erweiterten Parametern (Type), read_rzone_info() aus drv_dvd.c durch read_track_info() + +Sun Apr 20 16:20:40 2003 Joerg Schilling + * cdrecord.h 1.144 + F_FORMAT neu, WM_FORMAT neu, DSF_DVD_PLUS_R/DSF_DVD_PLUS_RW/DSF_NEED_FORMAT neu + read_track_info() mit erweiterten Parametern (Type), read_rzone_info() aus drv_dvd.c durch read_track_info() + get_format_capacities()/read_format_capacities() neu + +Sun Apr 20 15:52:45 2003 Joerg Schilling + * scsimmc.h 1.9 + struct disk_info um dbit & bg_format_stat erweitert + +Sun Apr 20 15:13:25 2003 Joerg Schilling + * scsireg.h 1.29 + struct scsi_format_header um immed/tryout/ipattern Bits erweitert + struct scsi_format_cap_header neu + struct scsi_format_cap_desc neu + struct scsi_cap_data neu + +Sun Apr 20 15:04:56 2003 Joerg Schilling + * scsicdb.h 2.18 + NACA Bit im Control Byte neu + +Fri Apr 18 16:53:04 2003 Joerg Schilling + * drv_dvd.c 1.106 + * drv_mmc.c 1.140 + * cdrecord.h 1.143 + * scsi_cdr.c 1.130 + read_dvd_structure() nun mit addr und layer Parameter + +Fri Apr 18 16:51:11 2003 Joerg Schilling + * scsi_mmc.c 1.4 + Unbenutze & Uninitialisierte Variablen beseitigt + +Thu Apr 17 23:13:07 2003 Joerg Schilling + * cdr_drv.c 1.34 + DVD+ Treiber neu + +Thu Apr 17 23:09:29 2003 Joerg Schilling + * drv_mmc.c 1.139 + Treibertexte besser eingerueckt + Umleitung auf DVD+ Treiber bei DVD+ Medium + Aufruf der dp->cdr_identify(scgp, dp, scgp->inq) Routine bei Weiterleitung auf DVD Treiber + +Thu Apr 17 09:45:56 2003 Joerg Schilling + * drv_sony.c 1.69 + * drv_philips.c 1.67 + * cdr_drv.c 1.33 + * cdrecord.h 1.142 + * drv_simul.c 1.46 + * drv_dvd.c 1.105 + * drv_jvc.c 1.79 + * drv_7501.c 1.14 + * drv_mmc.c 1.138 + cdr_format() Funktion neu + +Thu Apr 17 02:32:05 2003 Joerg Schilling + * drv_mmc.c 1.137 + load_media() fuer get_curprofile() im Silent Mode, wenn es ein CD Brenner ist dann wird nicht der CD-ROM Treiber returniert + +Thu Apr 17 01:10:51 2003 Joerg Schilling + * drv_mmc.c 1.136 + SCSI-3/MMC-3 medien Tests neu um DVD+ zu erkennen + +Thu Apr 17 00:04:06 2003 Joerg Schilling + * scsi_mmc.c 1.3 + Vermeiden von pname(profile) ohne #defne DRV_DVD + +Wed Apr 16 23:40:46 2003 Joerg Schilling + * drv_mmc.c 1.135 + mmc_getval() weiter nach hinten - nach Korrektur der Inquiry Daten fuer ATAPI + +Wed Apr 16 22:49:41 2003 Joerg Schilling + * drv_mmc.c 1.134 + Treiber ID Text (Kommentar) verbessert + +Wed Apr 16 22:42:59 2003 Joerg Schilling + * drv_sony.c 1.68 + Cue sheet Option auf 3 setzen + +Wed Apr 16 22:40:00 2003 Joerg Schilling + * cdrecord.1 1.75 + Hinweis auf mkisofs -print-size bei SAO/RAW + +Wed Apr 16 22:28:03 2003 Joerg Schilling + * cdr_drv.c 1.32 + SCSI-3/mmc-3 Support fuer DVD + DDCD Erkennung mit get_proflist() + +Wed Apr 16 22:25:56 2003 Joerg Schilling + * scsimmc.h 1.8 + struct rzone_info um lra_v erweitert + struct mmc_performance_header / struct mmc_performance / struct mmc_exceptions / struct mmc_write_speed / struct mmc_streaming neu + +Wed Apr 16 22:01:14 2003 Joerg Schilling + * cdrecord.h 1.141 + get_proflist()/get_wproflist() aus scsi_mmc.c neu + +Wed Apr 16 22:00:33 2003 Joerg Schilling + * scsi_mmc.c 1.2 + get_conflen()/get_profiles()/get_proflist()/get_wproflist() neu + +Wed Apr 16 00:49:27 2003 Joerg Schilling + * drv_mmc.c 1.133 + get_speeds_plextor() komplett in die Statistik Funktion verlagert + +Wed Apr 16 00:28:09 2003 Joerg Schilling + * scsi_mmc.c 1.1 + date and time created 03/04/15 23:28:09 by joerg + +Wed Apr 16 00:28:00 2003 Joerg Schilling + * cdrecord.h 1.140 + scsi_mmc.c Definitionen neu + +Wed Apr 16 00:12:54 2003 Joerg Schilling + * drv_mmc.c 1.132 + Trebertabellen aufgeraeumt + +Tue Apr 15 18:57:54 2003 Joerg Schilling + * cdrecord.h 1.139 + track_base(tp) Makro repariert (tp)->track statt (tp)->trackno + +Tue Apr 15 10:01:43 2003 Joerg Schilling + * drv_dvd.c 1.104 + TAO Fake beseitigt + +Sun Apr 13 21:54:15 2003 Joerg Schilling + * drv_sony.c 1.67 + #include timedefs.h fehlte + +Sun Apr 13 18:54:27 2003 Joerg Schilling + * drv_sony.c 1.66 + Erste SAO Implementierung (ohne MCN/ISRC/multi-session) + +Sun Apr 13 17:15:15 2003 Joerg Schilling + * drv_dvd.c 1.103 + * drv_simul.c 1.45 + * drv_jvc.c 1.78 + * drv_mmc.c 1.131 + * drv_7501.c 1.13 + * cdrecord.c 1.238 + * cdrecord.h 1.138 + * drv_philips.c 1.66 + cdr_abort_session() neu + +Sun Apr 13 17:10:44 2003 Joerg Schilling + * drv_mmc.c 1.130 + "Selected write speed:" -> "Last selected write speed:" + +Sun Apr 13 13:59:26 2003 Joerg Schilling + * scsi_cdr.c 1.129 + Intelligenteres scsi_load() kennt nun CDR_CADDYLOAD + +Sun Apr 13 13:54:27 2003 Joerg Schilling + * drv_philips.c 1.65 + Yamaha CDR-100 nun mit scsi_load() + +Sun Apr 13 13:36:00 2003 Joerg Schilling + * cdrecord.c 1.237 + Version -> 2.01a10, Neue Funktion print_drflags() + +Sun Apr 13 13:35:26 2003 Joerg Schilling + * cdrecord.h 1.137 + Kommentar verbessert + +Sun Apr 13 12:28:01 2003 Joerg Schilling + * cdrecord.c 1.236 + * scsi_cdr.c 1.128 + scsi_load()/scsi_unload() nun mit korrektem Return Wert (int statt BOOL) und Auswertung des Return Wertes in load_media()/unload_media() + +Fri Apr 11 15:31:30 2003 Joerg Schilling + * drv_mmc.c 1.129 + * drv_7501.c 1.12 + (*dp->cdr_gen_cue)() Aufruf nun ueber Pointer + +Fri Apr 11 15:27:44 2003 Joerg Schilling + * drv_dvd.c 1.102 + * drv_simul.c 1.44 + * drv_mmc.c 1.128 + * cdr_drv.c 1.31 + * cdrecord.h 1.136 + * drv_7501.c 1.11 + (*dp->cdr_send_cue)() nun mit cdr_t * Parameter + +Fri Apr 11 15:18:57 2003 Joerg Schilling + * drv_7501.c 1.10 + * drv_simul.c 1.43 + * drv_philips.c 1.64 + * drv_dvd.c 1.101 + * drv_mmc.c 1.127 + * drv_sony.c 1.65 + * drv_jvc.c 1.77 + * cdrecord.h 1.135 + * cdrecord.c 1.235 + Neue Funktion (*cdr_gen_cue)() + +Fri Apr 11 01:25:58 2003 Joerg Schilling + * drv_mmc.c 1.126 + get_speeds_plextor() nun mit 3 int * Parametern, Ausgabe der Maximalen Brenngeschwindigkeit in stats_mmc() + +Fri Apr 11 00:53:30 2003 Joerg Schilling + * cdrecord.c 1.234 + * cdrecord.h 1.134 + is_sao() & TI_SAO neu, checktsize() ueberprueft nun ob ein Track mit unbekannter Laenge in SAO/RAW mode vorhanden ist und bricht ab + +Thu Apr 10 21:18:42 2003 Joerg Schilling + * drv_philips.c 1.63 + * drv_simul.c 1.42 + * drv_7501.c 1.9 + * cdr_drv.c 1.30 + * cdrecord.h 1.133 + * drv_jvc.c 1.76 + * drv_dvd.c 1.100 + * drv_sony.c 1.64 + * scsi_cdr.c 1.127 + * drv_mmc.c 1.125 + * cdrecord.c 1.233 + cdr_check_recovery()/cdr_recover()/cdr_close_session() nun mit cdr_t * Parameter + +Thu Apr 10 19:19:22 2003 Joerg Schilling + * cdrecord.h 1.132 + Kommentar eingerueckt + +Thu Apr 10 19:15:16 2003 Joerg Schilling + * cdrecord.c 1.232 + * cdrecord.h 1.131 + * drv_sony.c 1.63 + * drv_simul.c 1.41 + * drv_philips.c 1.62 + * drv_mmc.c 1.124 + * drv_7501.c 1.8 + * drv_jvc.c 1.75 + * drv_dvd.c 1.99 + cdr_init() neu, cdr_speed_select() nun ohne "dummy" Parameter + +Thu Apr 10 15:32:14 2003 Joerg Schilling + * drv_mmc.c 1.123 + get_speeds_plextor() neu + +Sun Apr 6 15:49:07 2003 Joerg Schilling + * cdrecord.1 1.74 + Neue driveropts= speedread/singlesession/hidecdr + +Sun Apr 6 15:48:07 2003 Joerg Schilling + * cdrecord.c 1.231 + (*dp->cdr_set_speed_dummy)() Aufruf bei -setdropts zwischen cdr_opt1() und cdr_opt2() + +Sun Apr 6 15:45:45 2003 Joerg Schilling + * drv_mmc.c 1.122 + Support fuer Plextor PowerRec, SpeedReeed, SongleSession, HideCDR + +Sun Apr 6 02:19:35 2003 Joerg Schilling + * cdrecord.c 1.230 + * cdrecord.h 1.130 + #defines und Auswertung fuer CDR_SINGLESESS/CDR_HIDE_CDR/CDR_SPEEDREAD neu + +Sat Apr 5 22:35:50 2003 Joerg Schilling + * cdrecord.h 1.129 + * cdrecord.c 1.229 + * cdrecord.1 1.73 + Neue Option -setdropts + +Sat Apr 5 20:51:06 2003 Joerg Schilling + * drv_mmc.c 1.121 + mmc_load/mmc_unload() auskommentiert + +Sat Apr 5 20:46:51 2003 Joerg Schilling + * drv_mmc.c 1.120 + opt2_mmc() neu und Kode aus open_session_mmc() dorthin bewegt + +Sat Apr 5 20:43:36 2003 Joerg Schilling + * scsi_cdr.c 1.126 + * cdrecord.c 1.228 + Bessere Buffer underrun Erkennung und Beschreibung + +Sat Apr 5 15:49:22 2003 Joerg Schilling + * drv_sony.c 1.62 + * drv_mmc.c 1.119 + * drv_simul.c 1.40 + * drv_7501.c 1.7 + * cdrecord.c 1.227 + * drv_philips.c 1.61 + * drv_jvc.c 1.74 + * cdrecord.h 1.128 + * drv_dvd.c 1.97 + (*dp->cdr_opt2)(scgp, dp) neu + +Sat Apr 5 15:37:12 2003 Joerg Schilling + * cdrecord.c 1.226 + Buffer Underrun Vorhersage verbessert (kein loeschen am Trackanfang & zusaetzlicher Test auf leres RAM) + +Sat Apr 5 01:42:33 2003 Joerg Schilling + * drv_mmc.c 1.118 + Read Burn Proof Counter fuer Plextor + +Fri Apr 4 23:48:28 2003 Joerg Schilling + * scsi-unixware.c 1.33 + Reset Support neu + +Fri Apr 4 00:44:59 2003 Joerg Schilling + * cdrecord.c 1.225 + -packet impliziert nun nicht mehr TAO + +Fri Apr 4 00:35:13 2003 Joerg Schilling + * drv_7501.c 1.6 + cw7501__do_cue() nun korrekt LOCAL + +Fri Apr 4 00:30:05 2003 Joerg Schilling + * auinfo.c 1.18 + * subchan.c 1.16 + trackp->tracktype & TOC_MASK wegen TOCF_DUMMY/TOCF_MULTI + +Fri Apr 4 00:29:09 2003 Joerg Schilling + * drv_sony.c 1.61 + * drv_simul.c 1.39 + * drv_7501.c 1.5 + * drv_philips.c 1.60 + * cdrecord.h 1.127 + * cdrecord.c 1.224 + * drv_mmc.c 1.117 + * drv_jvc.c 1.73 + * drv_dvd.c 1.96 + cdr_open_session()/cdr_fixate() ohne multi/dummy Parameter -> track[0].tracktype + +Thu Apr 3 22:49:10 2003 Joerg Schilling + * drv_jvc.c 1.72 + * drv_dvd.c 1.95 + * wm_packet.c 1.21 + * cdrecord.c 1.223 + Casting wegen Signed/Unsigned Arithmetik bei ANSI C + +Thu Apr 3 22:32:30 2003 Joerg Schilling + * drv_sony.c 1.60 + * drv_7501.c 1.4 + * drv_simul.c 1.38 + * drv_dvd.c 1.94 + * drv_philips.c 1.59 + * drv_mmc.c 1.116 + * drv_jvc.c 1.71 + * cdrecord.c 1.222 + * cdrecord.h 1.126 + cdr_open_session()/cdr_fixate() Treiberinterface nun ohne toctype Parameter -> trackp[0]->tracktype + +Thu Apr 3 20:51:34 2003 Joerg Schilling + * fifo.c 1.43 + int -> Uint wegen Ansi C Vergleich + +Thu Apr 3 20:46:46 2003 Joerg Schilling + * clone.c 1.6 + first/last int -> Uint wegen Ansi C Vergleich + +Thu Apr 3 20:42:01 2003 Joerg Schilling + * subchan.c 1.15 + j int -> Uint wegen Ansi C Vergleich + +Thu Apr 3 18:16:00 2003 Joerg Schilling + * cdrecord.c 1.221 + Neue Option -lock + prtimediff() -> misc.c + Version -> 2.01a09 + +Thu Apr 3 18:15:00 2003 Joerg Schilling + * cdrecord.1 1.72 + Neue Option -lock + +Thu Apr 3 18:14:43 2003 Joerg Schilling + * misc.c 1.3 + prtimediff() aus cdrecord.c neu + +Thu Apr 3 18:14:05 2003 Joerg Schilling + * drv_mmc.c 1.115 + int/Uint Vergleiche gecastet + test auf tracksize < 0 vor do_cue() + Versuch zu erreichen dasz is_packet(trackp) nicht mehr is_tao(trackp) impliziert + +Thu Apr 3 18:11:45 2003 Joerg Schilling + * cdrecord.h 1.125 + F_DLCK & prtimediff() neu + +Thu Apr 3 18:11:22 2003 Joerg Schilling + * drv_7501.c 1.3 + Support fuer SAO neu + +Sun Mar 30 22:16:25 2003 Joerg Schilling + * drv_7501.c 1.2 + Schreibsupport fuer TAO + +Sun Mar 30 13:50:02 2003 Joerg Schilling + * cdrecord.c 1.220 + * drv_mmc.c 1.114 + Eingerueckt nach cstyle + +Sat Mar 29 20:27:16 2003 Joerg Schilling + * scsi-unixware.c 1.32 + Auswertung von scbp->sc_comp_code und Setzten von sp->error + +Thu Mar 27 12:11:17 2003 Joerg Schilling + * readcd.c 1.54 + meshpoints=# Option neu + +Thu Mar 27 01:15:30 2003 Joerg Schilling + * cdrecord.c 1.219 + 2002 -> 2003 + +Thu Mar 27 01:03:48 2003 Joerg Schilling + * cdr_drv.c 1.29 + cw7501 neu + +Thu Mar 27 01:02:47 2003 Joerg Schilling + * drv_7501.c 1.1 + date and time created 03/03/27 01:02:47 by joerg + +Thu Mar 27 00:53:40 2003 Joerg Schilling + * cdrecord.c 1.218 + Version -> 2.01a07, Unterdrueckung von "Warning: blockdesc secsize %d differs from cap secsize %d\n" wenn scgp->cap->c_bsize == 0 + +Thu Mar 27 00:45:34 2003 Joerg Schilling + * cdrecord.h 1.124 + Eingerueckt nach cstyle + +Thu Mar 27 00:43:06 2003 Joerg Schilling + * drv_mmc.c 1.113 + mmc_load()/mmc_unload() mit 2. Parameter cdr_t * + +Tue Mar 25 18:48:41 2003 Joerg Schilling + * scsi-qnx.c 1.2 + sccsid -> __sccsid + +Mon Mar 24 23:25:04 2003 Joerg Schilling + * cdrecord.c 1.217 + Version -> 2.01a06, Handler fuer SGIHUP/SIGTERM, cdr_underrun() neu + +Mon Mar 24 23:23:38 2003 Joerg Schilling + * scsi_cdr.c 1.125 + * cdrecord.h 1.123 + cdr_underrun() neu + +Mon Mar 24 13:01:28 2003 Joerg Schilling + * scsi-unixware.c 1.31 + Beseitigung von fdesc[MAX_SCG][MAX_TGT][MAX_LUN] und Verkleinerung von sdidevs[scg][tgt][lun] + Nun kann wirklich scg_open() mehrmals aufgerufen werden. + +Sun Mar 23 21:10:45 2003 Joerg Schilling + * scsi-unixware.c 1.30 + valid/atapi/initiator -> flags mit SDI_* Bit #defines + +Sun Mar 23 17:33:07 2003 Joerg Schilling + * scsi-unixware.c 1.29 + Besseres Verhalten fuer scgcheck + +Sun Mar 23 15:14:23 2003 Joerg Schilling + * scsi-unixware.c 1.28 + Eingerueckt wegen cstyle(1) + +Sun Mar 23 14:12:01 2003 Joerg Schilling + * scsihack.c 1.42 + Support fuer QNX neu + +Sun Mar 23 14:11:14 2003 Joerg Schilling + * scsi-qnx.c 1.1 + date and time created 03/03/23 14:11:14 by joerg + +Thu Mar 6 16:39:42 2003 Joerg Schilling + * fifo.c 1.42 + faio_wait_on_buffer() mit Prototype implementierung wegen SCO cc + +Thu Mar 6 16:27:52 2003 Joerg Schilling + * cdrecord.1 1.71 + Beschreibung fuer -xa1 -xa2, ... berichtigt + +Fri Feb 7 12:34:37 2003 Joerg Schilling + * cdrecord.1 1.70 + Schreibfehler beseitigt + +Sun Feb 2 14:13:07 2003 Joerg Schilling + * scsi-remote.c 1.12 + Umgestellt, damit es auch ohne rcmd() geht + +Tue Jan 28 01:19:39 2003 Joerg Schilling + * drv_mmc.c 1.112 + Workaround fuer LG TAO Audio Formware bug: audio_pause_len = 150 + +Tue Jan 7 14:09:28 2003 Joerg Schilling + * scsi_cdr.c 1.124 + Ausgabe Save/Set Modepages auch auf stderr wie Rest der Zeile + +Tue Jan 7 14:08:43 2003 Joerg Schilling + * drv_mmc.c 1.111 + set_mode_params() ist BOOL, daher ist Abfrage auf < 0 falsch + +Tue Dec 24 16:28:38 2002 Joerg Schilling + * cdrecord.1 1.69 + Version -> 2.0 + +Tue Dec 24 14:16:34 2002 Joerg Schilling + * cdrecord.c 1.216 + Mail Adresse -> schilling@fokus.fhg.de + Vermeidung von "Cannot write CD's >= 100 minutes.\n" bei DVDs + +Mon Dec 16 22:26:39 2002 Joerg Schilling + * cdrecord.1 1.68 + Mailing Lists geupdated, Hinweis auf cddb= bei den cdda2wav Beispielen + +*************** Release 2.0 ******************* + +Sat Nov 30 17:43:51 2002 Joerg Schilling + * readcd.c 1.53 + * cdrecord.c 1.215 + Version -> 2.0 + +Sat Nov 30 16:11:27 2002 Joerg Schilling + * cdrecord.c 1.214 + DVD-Pro Check for Tracksize-known only if ntracks > 0 + +Sat Nov 30 13:01:27 2002 Joerg Schilling + * drv_mmc.c 1.110 + Allow Medium removal after load Media for DVD/CD recognition as drecord -checkdrive would otherwise lock the tray if it has been open before + +Sat Nov 30 12:55:17 2002 Joerg Schilling + * scsi-osf.c 1.25 + Debug output with SCSI Status Byte + +Fri Nov 22 17:55:41 2002 Joerg Schilling + * cdrecord.1 1.67 + RSH= und RSCSI= documented for ssh(1) RSCSI + +Fri Nov 22 17:40:35 2002 Joerg Schilling + * scsi-remote.c 1.11 + Support for non-root rcmd() and ssh(2) + +Fri Nov 22 17:35:54 2002 Joerg Schilling + * fifo.c 1.41 + AmigaOS Support with ix_vfork()/ix_vfork_resume() and separate var buf_idx_reader for vfork() + +Thu Nov 21 22:28:57 2002 Joerg Schilling + * cdrecord.c 1.213 + New Option minbuf= + +Thu Nov 21 22:23:10 2002 Joerg Schilling + * cdrecord.1 1.66 + minbuf= Option new + +Tue Nov 19 19:13:34 2002 Joerg Schilling + * scsiopen.c 1.93 + Fix for Coredump with dev=/dev/rsr1c:@,0 + +Sun Nov 10 19:18:04 2002 Joerg Schilling + * diskid.c 1.36 + Orange Forum Embargo Warning only if mp->msf_min == 97 for DVDs + +Mon Nov 4 18:12:16 2002 Joerg Schilling + * fifo.c 1.40 + close(f) /dev/zero oly if /dev/zero has been opened + +Sun Nov 3 16:32:52 2002 Joerg Schilling + * scsi_cdr.c 1.123 + * cdrecord.h 1.122 + write_xscsi()/seek_scsi()/seek_g0()/seek_g1() new + +Sat Nov 2 22:11:55 2002 Joerg Schilling + * cdrecord.c 1.212 + Version -> 1.11a40, _POSIX_MEMLOCK/_POSIX_PRIORITY_SCHEDULING Test POSIX 2001 conformant + +Sun Oct 27 15:19:29 2002 Joerg Schilling + * cdrecord.c 1.211 + New Wait Feature free the IDE Busses if Source&Destination are on the same cable (use -immed) + +Sun Oct 27 14:57:11 2002 Joerg Schilling + * cdrecord.1 1.65 + New Wait (usleep) Feature for -immed documented + +Sun Oct 27 14:42:36 2002 Joerg Schilling + * cdrecord.h 1.121 + New Flag RF_WR_WAIT to actively free the IDE Busses via usleep() + +Sun Oct 27 02:26:26 2002 Joerg Schilling + * cdrecord.c 1.210 + * wm_packet.c 1.20 + * drv_jvc.c 1.70 + Change from trackp->padsize ->trackp->padsecs + +Sun Oct 27 02:02:38 2002 Joerg Schilling + * cdrecord.h 1.120 + Change from trackp->padsize ->trackp->padsecs + New Sektor based Makros Sminutes(s)/Sseconds(s)/Shseconds(s)/Sframes(s) + +Sun Oct 27 01:20:58 2002 Joerg Schilling + * cdrecord.1 1.64 + Better docukmentation for padsize= + +Sat Oct 26 23:13:47 2002 Joerg Schilling + * scsi_cdr.c 1.122 + Text Generic mmc2 DVD -> Generic mmc2 DVD-R/DVD-RW + +Sat Oct 26 20:21:15 2002 Joerg Schilling + * wm_packet.c 1.19 + Support printing the fill ratio of the drive buffer and the actual write speed + +Fri Oct 25 15:06:33 2002 Joerg Schilling + * drv_mmc.c 1.109 + ATIP printinf for speed better -> %2d (reserved val %2d) + +Fri Oct 25 15:05:21 2002 Joerg Schilling + * cdrecord.c 1.209 + pad_track() now shows Drive buffer fill% and speed + Verbose prinrting for write_track_data() and pad_track() unified + +Fri Oct 25 00:49:04 2002 Joerg Schilling + * cdrecord.c 1.208 + Warning for cdrecord blank=fast if drive does not like -> Try cdrecord blank=all + write_track_data() now computes trackp->isecsize from trackp->isecsize to trackp->secsize + +Fri Oct 25 00:18:19 2002 Joerg Schilling + * drv_mmc.c 1.108 + BURN-Free was not used -> BURN-Free was never needed + +Fri Oct 25 00:06:12 2002 Joerg Schilling + * drv_mmc.c 1.107 + Test for 0xFF:0xFF/0xFF with dsp->ds_maxblocks == 716730 -> dsp->ds_maxblocks == 1166730 because we now use forceposivive in msf_to_lba() + +Thu Oct 24 23:47:23 2002 Joerg Schilling + * drv_mmc.c 1.106 + di_to_dstat() now always sets dsp->ds_first_leadin to allow 2. setting for Yamaha AudioMaster + +Wed Oct 23 22:46:02 2002 Joerg Schilling + * cdrecord.c 1.207 + Version -> 1.11a39, Only cdrecord dev=help calls scg_help() no automatic printing if scg_open() fails + +Wed Oct 23 22:40:41 2002 Joerg Schilling + * cdrecord.1 1.63 + Many changes tp prepare for 2.0 + +Wed Oct 23 22:21:46 2002 Joerg Schilling + * scsi-linux-ata.c 1.4 + Workaround for Linux Kernel design bug: CDROM_SEND_PACKET stes errno to EINVAL if Sense Key is "Invalid Command" + +Mon Oct 21 19:20:33 2002 Joerg Schilling + * scsi-linux-sg.c 1.75 + /dev/sg* read loop again with 1000 loops but only if 'f' is a RAW device + Typo fixed + +Sun Oct 20 15:28:58 2002 Joerg Schilling + * scsi-linux-sg.c 1.74 + sg_clearnblock() new to alow to clear O_NONBLOCK directly after open(.., ...|O_NONBLOCK) + +Sat Oct 19 22:04:23 2002 Joerg Schilling + * cdrecord.c 1.206 + Version -> 1.11a38, Support for libscg Help + +Sat Oct 19 21:28:22 2002 Joerg Schilling + * scsiopen.c 1.92 + * scsihack.c 1.41 + scg_help() Funktion new + +Sat Oct 19 21:27:21 2002 Joerg Schilling + * scsitransp.c 1.85 + Version -> 0.7 + +Sat Oct 19 21:26:25 2002 Joerg Schilling + * scsi-wnt.c 1.29 + * scsi-vms.c 1.32 + * scsi-unixware.c 1.27 + * scsi-sun.c 1.76 + * scsi-sgi.c 1.35 + * scsi-remote.c 1.10 + * scsi-osf.c 1.24 + * scsi-os2.c 1.22 + * scsi-openserver.c 1.30 + * scsi-next.c 1.31 + * scsi-mac-iokit.c 1.4 + * scsi-linux-sg.c 1.73 + * scsi-linux-pg.c 1.42 + * scsi-linux-ata.c 1.3 + * scsi-hpux.c 1.30 + * scsi-bsd.c 1.41 + * scsi-bsd-os.c 1.27 + * scsi-beos.c 1.21 + * scsi-apollo.c 1.4 + * scsi-amigaos.c 1.3 + * scsi-aix.c 1.35 + scgo_help() Funktion new + +Sat Oct 19 19:14:05 2002 Joerg Schilling + * scsitransp.h 1.53 + Parameter tcomment new in __scg_help() + +Sat Oct 19 14:02:47 2002 Joerg Schilling + * scsitransp.h 1.52 + Help functions new + +Fri Oct 18 17:25:31 2002 Joerg Schilling + * scsi-linux-sg.c 1.72 + Modified Cleanup read() loop in sg_initdev() by request from Linus Torvalds + +Fri Oct 18 17:20:00 2002 Joerg Schilling + * scsi-sun.c 1.75 + open Warnung von error() auf js_fprintf((FILE *)scgp->errfile umgestellt + +Fri Oct 18 17:16:48 2002 Joerg Schilling + * scsiopen.c 1.91 + * scsi-linux-ata.c 1.2 + * scsi-sun.c 1.74 + Allow unified dev=ATAPI, dev=ATAPI:, dev=USCSI, dev=USCSI: + +Sun Oct 13 21:40:59 2002 Joerg Schilling + * scsi-linux-sg.c 1.71 + open(name, 2) -> O_RDWR.... + sg_initdev() with better loop to read possible rests from driver (requested by Linus Torvalds) + +Sun Oct 13 21:23:54 2002 Joerg Schilling + * scsi-sun.c 1.73 + * scsi-linux-pg.c 1.41 + open(name, 2) -> O_RDWR.... + +Sat Oct 12 13:53:52 2002 Joerg Schilling + * sector.c 1.11 + Initialize Testsector in encspeed() to make resulting speed independent from junk on the stack + +Thu Oct 10 23:43:33 2002 Joerg Schilling + * cdrecord.c 1.205 + Change wording from DAO -> SAO + +Wed Oct 9 19:36:09 2002 Joerg Schilling + * scsireg.h 1.28 + New device types for Inquiry + +Wed Oct 9 19:35:44 2002 Joerg Schilling + * scsitransp.c 1.84 + scg_fprintdev() New device types for Inquiry + +Tue Oct 8 00:57:50 2002 Joerg Schilling + * scsi-unixware.c 1.26 + Handle EBUSY for multiple opens + +Mon Oct 7 22:19:15 2002 Joerg Schilling + * sector.c 1.10 + * cdrecord.h 1.119 + * cdrecord.c 1.204 + Verbose printing of the LEC encoding speed -> encspeed() + +Sat Oct 5 22:07:27 2002 Joerg Schilling + * cdrecord.c 1.203 + call cdr_buffer_cap() in Silent mode to make sure buggy drives (CW-7585) will not print constantly error messages + +Sat Oct 5 18:07:46 2002 Joerg Schilling + * scsi-linux-ata.c 1.1 + date and time created 02/10/05 17:07:46 by joerg + +Sat Oct 5 17:48:27 2002 Joerg Schilling + * scsi-linux-sg.c 1.70 + Support for CDROM_SEND_PACKET in scsi-linux-ata.c new + SCSI Timeout now may be distinguished from SCSI selection Timeout by implementing a workarounf for a Linux kernel bug + +Sat Oct 5 00:02:52 2002 Joerg Schilling + * scsi-sun.c 1.72 + Do not open all /dev/scg* devices if not in SCAN mode + ENXIO for USCSI means selection Timeout + +Fri Oct 4 23:59:05 2002 Joerg Schilling + * scsi-vms.c 1.31 + Warn for missing Scanbus, up to 26 IDE Controller from Chip.Dancy@hp.com + +Wed Oct 2 21:44:22 2002 Joerg Schilling + * cdrecord.c 1.202 + Version -> 1.11a36, #ifdef HAVE_LIB_EDC_ECC to allow compilation without libedc + +Wed Oct 2 02:22:32 2002 Joerg Schilling + * fifo.c 1.39 + Allow again compilation with #undef FIFO + +Wed Oct 2 00:54:52 2002 Joerg Schilling + * scsiopen.c 1.90 + replace comma by semikolon + +Wed Oct 2 00:48:49 2002 Joerg Schilling + * scsi-vms.c 1.30 + gk_chan is Unsigned but there was a comparison <= 0 + scsi status scsi_sts now correct for ATAPI + +Sat Sep 28 20:36:58 2002 Joerg Schilling + * drv_mmc.c 1.105 + deflt_writemodes_mmc() now with fallback to SAO if TAO is not supported + +Sat Sep 28 14:53:33 2002 Joerg Schilling + * cdrecord.c 1.201 + -force Wirkung auf RAW Speed nur noch bis maximal das was eine CPU kann + Neue environment Variable "CDR_FORCERAWSPEED" + +Sat Sep 28 14:46:54 2002 Joerg Schilling + * sector.c 1.9 + EDC_SCRAMBLE_NOSWAP #define in old libedc new + +Fri Sep 27 17:39:00 2002 Joerg Schilling + * cdrecord.c 1.200 + Limit gracetime to 999, Do not use \b with wait time because seconds may use more than one column + +Fri Sep 27 16:40:46 2002 Joerg Schilling + * drv_simul.c 1.37 + DVD max speed -> 1000 + +Fri Sep 27 14:33:00 2002 Joerg Schilling + * cdrecord.c 1.199 + Drive current speed/Drive default speed/Drive max speed printing now with lverbose > 1 + Hint to Heiko with Encoding speed printing + +Fri Sep 27 14:30:18 2002 Joerg Schilling + * drv_mmc.c 1.104 + Max Speed in struct from 370 -> 372, + mmc_opthelp()/hasdrvopt()/get_justlink_ricoh() now with EXPORT + Bug with dp->cdr_dstat->ds_dr_cur_wspeed fixed, + set dp->cdr_speeddef/dp->cdr_speedmax from drive values + +Fri Sep 27 14:28:27 2002 Joerg Schilling + * drv_dvd.c 1.89 + Change to use new driveropts= method from drv_mmc.c + +Fri Sep 27 14:25:18 2002 Joerg Schilling + * drv_simul.c 1.36 + Max Speed for CD from 370 -> 372 + +Thu Sep 26 03:06:39 2002 Joerg Schilling + * scsi_cdr.c 1.121 + scsi_load()scsi_unload() now may be called with cdr_t * 0 + +Wed Sep 25 18:05:41 2002 Joerg Schilling + * drv_mmc.c 1.103 + scsi_blank()/scsi_close_tr_session()/scsi_flush_cache() with immed Flag + +Wed Sep 25 16:12:10 2002 Joerg Schilling + * cdrecord.h 1.117 + * cdrecord.c 1.198 + * drv_simul.c 1.35 + * drv_philips.c 1.58 + * scsi_cdr.c 1.120 + * drv_dvd.c 1.88 + start/stop, load/unload, flush_cache with immed Parameter + +Wed Sep 25 14:22:26 2002 Joerg Schilling + * drv_jvc.c 1.69 + * drv_dvd.c 1.87 + * drv_mmc.c 1.102 + * cdr_drv.c 1.28 + * cdrecord.c 1.197 + * cdrecord.h 1.116 + blank() driver function now weith cdr_t * parameter for F_IMMED + +Wed Sep 25 13:52:12 2002 Joerg Schilling + * cdrecord.c 1.196 + -immed new + +Wed Sep 25 13:51:28 2002 Joerg Schilling + * cdrecord.c 1.195 + F_DVD -> TI_DVD (was wrong) + +Wed Sep 25 13:13:11 2002 Joerg Schilling + * cdrecord.h 1.115 + F_DVD -> TI_DVD (was wrong), F_IMMED new + +Wed Sep 25 00:38:52 2002 Joerg Schilling + * cdrecord.c 1.194 + * cdrecord.h 1.114 + * drv_sony.c 1.59 + * drv_simul.c 1.34 + * drv_philips.c 1.57 + * drv_mmc.c 1.101 + * drv_jvc.c 1.68 + * drv_dvd.c 1.86 + close_track()/fixate() enhanced by cdr_t * Parameter + +Tue Sep 24 21:28:33 2002 Joerg Schilling + * drv_mmc.c 1.100 + mmc_set_speed() new to allow drives that don't like speed=1 + +Tue Sep 24 18:40:42 2002 Joerg Schilling + * cdrecord.c 1.193 + Version -> 1.11a35, Do not print Zeit/speed Statistics if writing did not yet start + +Tue Sep 24 18:36:56 2002 Joerg Schilling + * scsi_cdr.c 1.119 + Modify speed printing to include CD/DVD Speed + +Mon Sep 23 15:42:22 2002 Joerg Schilling + * drv_simul.c 1.33 + Simulate Next Writable Address (for TAO) + +Mon Sep 23 15:39:22 2002 Joerg Schilling + * cdrecord.c 1.192 + Move Comment out of #ifdef DRV_DVD + +Mon Sep 23 15:17:56 2002 Joerg Schilling + * cdrecord.c 1.191 + Fix Pregap handling for DVD (no 150 Sektors per Track) + +Sun Sep 22 01:35:18 2002 Joerg Schilling + * cdrecord.h 1.113 + F_DVD new + +Sun Sep 22 00:11:57 2002 Joerg Schilling + * drv_dvd.c 1.85 + Set DVD Flag in driverstructure because it is now used + +Sat Sep 21 23:59:25 2002 Joerg Schilling + * drv_simul.c 1.32 + Set DVD Flags, calculate DVD speed correctly, + correct real time spend in usleep() + +Sat Sep 21 01:33:16 2002 Joerg Schilling + * cdrecord.c 1.190 + Version -> 1.11a34, Late check for tracks == 0 only if -fix was not used + +Fri Sep 20 01:58:54 2002 Joerg Schilling + * auinfo.c 1.17 + -auinfo should be superceede -scms / -copy + +Thu Sep 12 17:16:35 2002 Joerg Schilling + * cdrecord.c 1.189 + Statistics order new and better, + Print new statistics even on abort + +Thu Sep 12 17:03:42 2002 Joerg Schilling + * cdrecord.h 1.112 + New Flags RF_DID_STAT/RF_DID_CDRSTAT + +Thu Sep 12 16:42:57 2002 Joerg Schilling + * drv_philips.c 1.56 + Modified -> reload_media() + +Thu Sep 12 15:52:20 2002 Joerg Schilling + * drv_mmc.c 1.99 + cdr_dstat->ds_dr_max_rspeed/cdr_dstat->ds_dr_cur_rspeed neu + cdr_dstat->ds_dr_max_speed/cdr_dstat->ds_dr_cur_speed -> cdr_dstat->ds_dr_max_wspeed/cdr_dstat->ds_dr_cur_wspeed + scsi_set_speed() with MMC-3 rotctl Parameter + +Thu Sep 12 15:47:01 2002 Joerg Schilling + * cdrecord.c 1.188 + Version -> 1.11a33, ds_dr_max_speed -> ds_dr_max_wspeed + +Thu Sep 12 15:43:36 2002 Joerg Schilling + * drv_dvd.c 1.84 + * scsi_cdr.c 1.118 + * cdrecord.h 1.111 + scsi_set_speed() mit MMC-3 rotctl Parameter + +Thu Sep 12 14:37:26 2002 Joerg Schilling + * drv_mmc.c 1.98 + dsp->ds_flags with DSF_HIGHSP_ERA / DSF_ULTRASP_ERA + New Speed Tabels for HS and UHS RW media + atip_printspeed() new + Print A1 ATIP Werte also in hex + Modify ATIP printout for UHS CD-RW + +Thu Sep 12 13:34:49 2002 Joerg Schilling + * cdrecord.c 1.187 + Driveropts print MMC,MMC-2,MMC-3 + -force now allows to write faster data in -raw Data + Checks for Ultra High speed CD-RW for old writers + Do not print average write speed if data size is unknown + +Thu Sep 12 13:27:10 2002 Joerg Schilling + * scsi_cdr.c 1.117 + Enhancements for MMC-2 & MMC-3 in -prcap (mode Page 2A) + +Wed Sep 11 21:23:48 2002 Joerg Schilling + * scsireg.h 1.27 + MMC-2 & MMC-3 enhancements for Mode Page 2A + +Wed Sep 11 20:47:35 2002 Joerg Schilling + * cdrecord.h 1.110 + CDR_MMC/CDR_MMC2/CDR_MMC3 new + +Wed Sep 11 15:13:20 2002 Joerg Schilling + * subchan.c 1.14 + end = 0 for useless GCC Warning 'end' might be uninitialized + +Wed Sep 11 15:01:55 2002 Joerg Schilling + * cdrecord.h 1.109 + trackp->dataoff/tracks/track/trackno -> Uchar + DSF_HIGHSP_ERA & DSF_ULTRASP_ERA new + CDR_ALLOC without top Bit for GCC Warning + +Wed Sep 11 14:59:46 2002 Joerg Schilling + * drv_dvd.c 1.83 + * auinfo.c 1.16 + Cast for trackp->track* -> Uchar + +Wed Sep 11 14:59:07 2002 Joerg Schilling + * drv_sony.c 1.58 + Constant 0xFFFFFFFF with #ifdef for K&R/ANSI + +Sun Sep 1 23:43:15 2002 Joerg Schilling + * cdrecord.c 1.186 + Print minimal Drive Buffer fill ratio + +Sun Sep 1 23:42:39 2002 Joerg Schilling + * drv_mmc.c 1.97 + DiskT@2 Support new + +Sun Sep 1 23:33:34 2002 Joerg Schilling + * cdrecord.h 1.108 + Several new ds_* Vars for better Statistics + +Sun Sep 1 21:27:35 2002 Joerg Schilling + * cdrecord.c 1.185 + cdrstats() now guesses Buffer underruns and prints average write speed + +Sun Sep 1 17:42:59 2002 Joerg Schilling + * drv_mmc.c 1.96 + cdr_stats() Function new + speed_select_mmc() with 2nd Parameter dp for FORCESPEED + driveropts=foesecpeed new + driveropts=tattooinfo new + driveropts=tattoofile=name new + hasdrvopt() fixed: missing break nach past recognised Option + +Sun Sep 1 16:50:22 2002 Joerg Schilling + * cdrecord.c 1.184 + Buffer Cap print every 1 MB + +Fri Aug 30 13:57:26 2002 Joerg Schilling + * cdrecord.c 1.183 + Version -> 1.11a32, CDR_DISKTATTOO new, (*dp->cdr_stats)(scgp, dp); for Burn-Free Statistics + +Fri Aug 30 13:42:33 2002 Joerg Schilling + * cdrecord.h 1.107 + New driverinterfacefunction cdr_stats() + CDR_DISKTATTOO new + +Fri Aug 30 13:41:21 2002 Joerg Schilling + * drv_sony.c 1.57 + * drv_simul.c 1.31 + * drv_philips.c 1.55 + * drv_jvc.c 1.67 + * drv_dvd.c 1.82 + New driverinterfacefunction cdr_stats() + +Thu Aug 29 21:40:34 2002 Joerg Schilling + * drv_sony.c 1.56 + * drv_simul.c 1.30 + * drv_philips.c 1.54 + * drv_jvc.c 1.66 + * drv_dvd.c 1.81 + * cdrecord.h 1.106 + * cdrecord.c 1.182 + New Parameter cdr_t *dp for cdr_set_speed_dummy() for "forcespeed" + +Thu Aug 29 17:12:40 2002 Joerg Schilling + * mmcvendor.h 1.2 + link_counter is [2]. + +Mon Aug 26 17:47:17 2002 Joerg Schilling + * drv_mmc.c 1.95 + Turning... messages -> stdout + +Mon Aug 26 01:56:39 2002 Joerg Schilling + * drv_mmc.c 1.94 + JustLink Support new + +Mon Aug 26 01:22:08 2002 Joerg Schilling + * mmcvendor.h 1.1 + date and time created 02/08/26 00:22:08 by joerg + +Tue Aug 20 01:11:19 2002 Joerg Schilling + * drv_mmc.c 1.93 + mmc_opt1() new + Yamaha Audio Master Support new + Be more careful with test_write (-dummy) in deflt_writemodes_mmc() + Check driveropts= already in attach_mmc() and turn into flags + +Tue Aug 20 00:06:22 2002 Joerg Schilling + * cdrecord.c 1.181 + Call dp->cdr_opt1() _before_ set speed/dummy and before the first Size Check + +Mon Aug 19 02:30:52 2002 Joerg Schilling + * cdrecord.c 1.180 + Do not clear ds_cdrflags after attach() + +Mon Aug 19 01:12:18 2002 Joerg Schilling + * cdrecord.c 1.179 + driveropts=help new in short usage() + +Mon Aug 19 00:45:49 2002 Joerg Schilling + * cdrecord.h 1.105 + * drv_dvd.c 1.80 + * drv_simul.c 1.29 + * drv_jvc.c 1.65 + * drv_sony.c 1.55 + * drv_philips.c 1.53 + cdr_t->cdr_opt1() new + +Mon Aug 19 00:40:47 2002 Joerg Schilling + * cdrecord.c 1.178 + dataoff = 16 as Default in autoaudio to allow cdrecord -raw to work without -data + +Mon Aug 19 00:34:46 2002 Joerg Schilling + * cdrecord.c 1.177 + Call (*dp->cdr_opt1)(scgp, dp) for Yamaha Audio Master, then 2. Check for size + +Sat Aug 17 01:13:39 2002 Joerg Schilling + * drv_mmc.c 1.92 + Yamaha Audio Master recognition, Varirec in driveropts=help, Varirec recognition + +Sat Aug 17 00:52:44 2002 Joerg Schilling + * cdrecord.h 1.104 + Calling sequence comment new + +Sat Aug 17 00:04:28 2002 Joerg Schilling + * sector.c 1.8 + Max RAW speed in metering raised from 100x -> 1000x + +Fri Aug 16 02:39:01 2002 Joerg Schilling + * cdrecord.c 1.176 + * cdrecord.h 1.103 + CDR_VARIREC / CDR_AUDIOMASTER / CDR_FORCESPEED new + +Wed Aug 14 23:43:34 2002 Joerg Schilling + * cdrecord.c 1.175 + Version -> 1.11a30, Speed test for RAW data sectors + +Wed Aug 14 20:50:55 2002 Joerg Schilling + * defaults.c 1.9 + Allow Space as separator in /etc/default/cdrecord + +Wed Aug 14 01:04:46 2002 Joerg Schilling + * cdrecord.h 1.102 + * sector.c 1.7 + encspeed() new + +Tue Aug 13 23:45:22 2002 Joerg Schilling + * sector.c 1.6 + HAVE_LIB_EDC_ECC/HAVE_NEW_LIB_EDC/CLONE_WRITE new + +Tue Jul 30 00:22:27 2002 Joerg Schilling + * cdrecord.c 1.174 + Version ->1.11a28, tracksize/secsize ->itracksize/isecsize for debug printf + +Mon Jul 29 22:22:12 2002 Joerg Schilling + * cdrecord.h 1.101 + track_base() Macro new, typedef struct ofile ofile_t new + +Mon Jul 29 21:58:12 2002 Joerg Schilling + * subchan.c 1.13 + Shift ISRC & MCN by one to the end if the are on an index change + +Sun Jul 28 23:19:55 2002 Joerg Schilling + * drv_simul.c 1.28 + Flags with allen possible write modi and with CDR_TRAYLOAD to avoid + +Sun Jul 28 13:54:08 2002 Joerg Schilling + * subchan.c 1.12 + better comment + +Thu Jul 25 03:25:39 2002 Joerg Schilling + * subchan.c 1.11 + Support for ISRC/MCN in RAW Mode new (but witout index shift) + +Tue Jul 23 23:47:58 2002 Joerg Schilling + * subchan.c 1.10 + First loop in fillsubch() removed because it is identical to second loop + +Tue Jul 23 23:32:31 2002 Joerg Schilling + * subchan.c 1.9 + fillsubch() now coeerect for audio Pregap between Tracks korrekt with relative time counting downwards + +Sun Jul 21 18:21:24 2002 Joerg Schilling + * drv_mmc.c 1.91 + set dsp->{ds_disktype!ds_trfirst!ds_trlast!ds_trfirst_ls} from dip->* + Do not cast malloc() anymore + Check write_cdtext() Returncode + Prepare for just Link + +Sun Jul 21 18:13:25 2002 Joerg Schilling + * drv_dvd.c 1.79 + set CDR_BURNFREE Flag, + set dsp->{ds_disktype!ds_trfirst!ds_trlast!ds_trfirst_ls} from dip->* + +Sun Jul 21 18:07:21 2002 Joerg Schilling + * cdrecord.c 1.173 + Version -> 1.11a27, + Define Warning that needs to be printed if Source has been changed, + Better messages for wrong DVD-RW write speed, reload_media() at end Ende of RAW Write + +Sun Jul 21 17:52:54 2002 Joerg Schilling + * scsi_cdr.c 1.116 + * auinfo.c 1.15 + malloc() Cast removed + +Sun Jul 21 17:51:44 2002 Joerg Schilling + * drv_sony.c 1.54 + dsp->ds_diskid now is UInt32_t + +Sun Jul 21 17:44:11 2002 Joerg Schilling + * cdrecord.h 1.100 + struct disk_status with Typen from utypes.h + +Mon Jul 8 00:31:04 2002 Joerg Schilling + * wm_session.c 1.4 + * wm_packet.c 1.18 + * subchan.c 1.8 + * fifo.c 1.38 + * drv_mmc.c 1.90 + * drv_jvc.c 1.64 + * clone.c 1.5 + * cdrecord.h 1.99 + * cdrecord.c 1.172 + 'tracks' outside driver interface removed and replaced by trackp->tracks + +Sun Jul 7 22:30:24 2002 Joerg Schilling + * drv_jvc.c 1.63 + Better rebuild old driver interface in next_wr_address_jvc() + +Sun Jul 7 22:28:35 2002 Joerg Schilling + * wm_packet.c 1.17 + * drv_mmc.c 1.89 + * cdr_drv.c 1.27 + * cdrecord.h 1.98 + * cdrecord.c 1.171 + * drv_sony.c 1.53 + * drv_simul.c 1.27 + * drv_philips.c 1.52 + * drv_jvc.c 1.62 + * drv_dvd.c 1.77 + trackno/tracks Parameter in driverinterface removed for new Struct Member + +Sat Jul 6 21:19:22 2002 Joerg Schilling + * cdrecord.c 1.170 + * cdrecord.h 1.97 + track_t now with tracks and track for simplified driverinterface + +Sat Jul 6 18:20:27 2002 Joerg Schilling + * cdrecord.h 1.96 + * cdrecord.c 1.169 + * drv_sony.c 1.52 + * drv_simul.c 1.26 + * drv_philips.c 1.51 + * drv_mmc.c 1.88 + * drv_jvc.c 1.61 + * drv_dvd.c 1.76 + cdr_speeddef/cdr_speedmax new and do not default to speed= 1 but to cdr_speeddef + +Fri Jul 5 23:11:39 2002 Joerg Schilling + * cdrecord.c 1.168 + Version -> 1.11a26 + wm2name[] with better systematics + Bugfix for High Speed CD-RW that could not be written anymore at 10x speed + New test for too slow writing of a CD-RW + Modename for blank only now is "BLANK" + Text: write XXX mode -> real XXX mode + SAO & RAW start (leadin) Code -> drv_mmc.c + Correctly print the current DVD writespeed + +Fri Jul 5 21:36:25 2002 Joerg Schilling + * cdrecord.h 1.95 + New driverfunction write_leadin, WM_ * Macros with better system, + new Macro wm_base(), + RF_LEADIN new + +Fri Jul 5 21:31:48 2002 Joerg Schilling + * drv_mmc.c 1.87 + New driverfunction write_leadin_mmc() with Code from cdrecord main function + +Fri Jul 5 21:26:04 2002 Joerg Schilling + * drv_sony.c 1.51 + * drv_simul.c 1.25 + * drv_philips.c 1.50 + * drv_jvc.c 1.60 + * drv_dvd.c 1.75 + New driverfunction write_leadin as dummy + +Thu Jul 4 13:01:36 2002 Joerg Schilling + * cdrecord.c 1.167 + Version -> 1.11a25 + Print Writemodes (new) + set_wrmode() new + restructuring: cdr_t->cdr_dstat is now used + dp->cdr_dstat->ds_cdrflags |= RF_PRATIP new + Check for ultra low speed media in High Speed writer + Check for high speed media in Low Speed writer + Avoid that cdrecord -- speed=8 causes speed=8 to be ignored as file type arg + +Thu Jul 4 12:55:52 2002 Joerg Schilling + * cdrecord.h 1.94 + restructuring: cdr_t->cdr_dstat is now used + New Write Mode WM_* definitions + +Thu Jul 4 12:53:14 2002 Joerg Schilling + * drv_dvd.c 1.74 + * drv_mmc.c 1.86 + * drv_philips.c 1.49 + * drv_sony.c 1.50 + Check for dp->cdr_dstat->ds_cdrflags & RF_PRATIP + Fill dsp->ds_flags |= DSF_ERA and dsp->ds_at_*_speed + +Tue Jul 2 19:55:47 2002 Joerg Schilling + * drv_sony.c 1.49 + * drv_simul.c 1.24 + * drv_philips.c 1.48 + * drv_jvc.c 1.59 + * cdr_drv.c 1.26 + * drv_mmc.c 1.85 + * drv_dvd.c 1.73 + dstat_t * now is a Member of cdr_t -> better handling of special funcs + +Tue Jul 2 15:18:31 2002 Joerg Schilling + * drv_mmc.c 1.84 + get_atip() now is always usable (not only if PRINT_ATIP has been defined) + +Sun Jun 16 15:58:37 2002 Joerg Schilling + * scsi_cdr.c 1.115 + Comment -> mmc-2 + +Fri May 31 22:09:39 2002 Joerg Schilling + * scsi_cdr.c 1.114 + wait_unit_ready() fast Abort even if k == SC_MEDIUM_ERROR + +Wed May 29 01:43:13 2002 Joerg Schilling + * scsi-wnt.c 1.28 + Better printf() format strings for DWORD + +Wed May 29 01:02:28 2002 Joerg Schilling + * cdtext.h 1.3 + List of language codes enhanced + +Wed May 29 00:55:22 2002 Joerg Schilling + * fifo.c 1.37 + palign() Macro with (UIntptr_t) Cast + +Wed May 29 00:54:26 2002 Joerg Schilling + * cdrecord.c 1.166 + Version -> 1.11a24, gracetime= in usage(), printf() Format correkt for bmtime() + +Wed May 29 00:51:56 2002 Joerg Schilling + * cdrecord.1 1.62 + gracetime= new + +Wed May 29 00:50:03 2002 Joerg Schilling + * cdtext.c 1.8 + Avoid Coredump if a single .inf File is missing and trackp[i].text is NULL -> ->textcodes does not work + +Mon May 20 17:08:41 2002 Joerg Schilling + * scsi-aix.c 1.34 + palign() -> with UIntptr_t cast + +Mon May 20 16:38:23 2002 Joerg Schilling + * scsi-remote.c 1.9 + avoid Integeroverflow with %.*s and 64 bit + +Mon May 20 14:28:12 2002 Joerg Schilling + * scsi-sun.c 1.71 + Cast (int)req.uscsi_buflen/(int)req.uscsi_resid forr 64 bit + +Mon May 13 02:02:09 2002 Joerg Schilling + * cdrecord.c 1.165 + Version -> 1.11a23, + Flush Cache with exit() in Silent Mode to avoid problem with cdrecord -toc and CD-ROMs + +Mon May 13 02:00:49 2002 Joerg Schilling + * fifo.c 1.36 + * drv_mmc.c 1.83 + * drv_jvc.c 1.58 + * drv_dvd.c 1.71 + * cdrecord.h 1.93 + New Typ tsize_t instead of off_t for Track size Vars > sizeof(long) on non-largefile OS + +Sat May 4 21:55:38 2002 Joerg Schilling + * cdrecord.c 1.164 + Avoid that abort via ^C kills a running SCSI Command + +Sat May 4 21:42:56 2002 Joerg Schilling + * scsitransp.c 1.83 + * scsitransp.h 1.51 + Callback Function at Ende of SCSI Command + +Sat May 4 18:10:05 2002 Joerg Schilling + * cdrecord.c 1.163 + Version -> 1.11a22 + gracetime= Option new + Now use geterrno()/seterrno() + reload_media() reads from stdder if input is from stdin + +Sat May 4 16:00:13 2002 Joerg Schilling + * cdrecord.c 1.162 + printf() Formats enhanced to get non jumping output with DVDs + +Sat May 4 15:36:45 2002 Joerg Schilling + * drv_dvd.c 1.70 + always set CDR_TAO|CDR_SAO in cdr_flags to allow speudo-DAO Mode + +Sat May 4 15:34:41 2002 Joerg Schilling + * cdrecord.h 1.92 + MIN_GRACE_TIME new + +Sat Apr 20 22:29:26 2002 Joerg Schilling + * fifo.c 1.35 + Now use geterrno()/seterrno() + +Tue Apr 16 19:20:40 2002 Joerg Schilling + * scsierrs.c 2.28 + New Errorstrings from 29.5.2001 + +Tue Apr 9 22:48:58 2002 Joerg Schilling + * diskid.c 1.35 + Embargo Message now better + +Tue Apr 9 22:41:41 2002 Joerg Schilling + * cdrecord.h 1.91 + F_STDIN Flag new + +Sat Mar 30 12:26:12 2002 Joerg Schilling + * drv_dvd.c 1.69 + Make drecord -atip print useful things + +Wed Mar 27 23:36:26 2002 Joerg Schilling + * drv_dvd.c 1.68 + maxblocks computing corrected (now even works with Panasonic) + +Tue Mar 26 19:18:31 2002 Joerg Schilling + * subchan.c 1.7 + create SCMS Bit + set COPY Bit in TOC and sub channels + +Tue Mar 26 19:10:32 2002 Joerg Schilling + * cdrecord.c 1.161 + Version -> 1.11a19 + +Tue Mar 26 19:07:15 2002 Joerg Schilling + * auinfo.c 1.14 + Albumperformer= new + +Tue Mar 26 19:02:58 2002 Joerg Schilling + * cdtext.c 1.7 + textfile= not-existent caused a Coredump + +Sun Mar 24 23:39:28 2002 Joerg Schilling + * cdrecord.c 1.160 + SCMS and Copy permitted printing new, Version -> 1.11a18 + +Sun Mar 24 23:38:11 2002 Joerg Schilling + * auinfo.c 1.13 + SCMS as new value for Copy_permitted= + +Sun Mar 10 00:24:19 2002 Joerg Schilling + * cdrecord.c 1.159 + Print real write speed + +Sat Mar 9 23:21:05 2002 Joerg Schilling + * drv_mmc.c 1.82 + remiove typo in hasdrvopt() + +Sat Mar 9 23:03:00 2002 Joerg Schilling + * drv_mmc.c 1.81 + first VariRec Support + +Sat Mar 9 21:15:48 2002 Joerg Schilling + * drv_dvd.c 1.65 + Burn-PROOF Support new, try tp make Panasonic DVD-R working + +Sat Mar 9 20:20:16 2002 Joerg Schilling + * cdrecord.c 1.158 + IS_SCHILY_XCONFIG new, Short Usage with susage() new + +Fri Mar 8 16:48:58 2002 Joerg Schilling + * cdrecord.c 1.157 + Version print Lizens better, -cdi sets toctype + +Fri Mar 8 16:46:54 2002 Joerg Schilling + * scsitransp.c 1.82 + Version -> 0.6 + +Tue Mar 5 23:34:46 2002 Joerg Schilling + * defaults.c 1.8 + NULL Pointer for args is now OK to allow to be used with readcd + +Tue Mar 5 23:32:00 2002 Joerg Schilling + * cdrecord.h 1.90 + getnum()/getllnum() from cdrecord.c -> getnum.c + +Tue Mar 5 23:26:31 2002 Joerg Schilling + * cdrecord.c 1.156 + Version -> 1.11a17 + getnum()/getllnum() -> getnum.c + cdr_defaults() changed to allow to be used with readcd.c + +Tue Mar 5 23:20:48 2002 Joerg Schilling + * getnum.c 1.1 + date and time created 02/03/05 23:20:48 by joerg + +Mon Mar 4 23:42:43 2002 Joerg Schilling + * diskid.c 1.34 + * drv_mmc.c 1.80 + * drv_dvd.c 1.64 + * scsi_cdr.c 1.113 + * drv_simul.c 1.23 + * fifo.c 1.34 + * crc16.c 1.5 + * crc16.h 1.3 + * cdrecord.h 1.89 + Copyright -> 2002 + +Mon Mar 4 23:32:08 2002 Joerg Schilling + * cdtext.h 1.2 + Comment for Text Language code now better + +Mon Mar 4 23:21:31 2002 Joerg Schilling + * cdrecord.c 1.155 + better comment for Version printing for not working Branches + +Mon Mar 4 22:43:47 2002 Joerg Schilling + * cdrecord.c 1.154 + Comments for Sector size + +Mon Mar 4 22:42:12 2002 Joerg Schilling + * defaults.c 1.7 + Copyright -> 2002 + new Function open_cdrdefaults(), + Comment that states that "/etc/default/cdrecord" may not be changed + +Fri Mar 1 22:37:21 2002 Joerg Schilling + * diskid.c 1.33 + Better Text for unknown ID Codes + +Thu Feb 28 23:04:45 2002 Joerg Schilling + * auinfo.c 1.12 + readtstr() now looks for rightmost ' from right to left, + readtag("CDINDEX_DISCID=") -> readtstr("CDINDEX_DISCID=") + +Sun Feb 24 15:44:34 2002 Joerg Schilling + * cdrecord.c 1.153 + Copyright -> 2002 + +Sat Feb 23 22:00:51 2002 Joerg Schilling + * cdtext.c 1.6 + First Support for CD-Text Synthesis with new functions text_txt()/packtext()/anytext()/fillup_pack()/fillpack() + +Sat Feb 23 21:44:33 2002 Joerg Schilling + * cdtext.h 1.1 + date and time created 02/02/23 21:44:33 by joerg + +Sat Feb 23 21:21:10 2002 Joerg Schilling + * cdrecord.1 1.61 + -text/textfile= Options documented + +Sat Feb 23 21:17:42 2002 Joerg Schilling + * cdrecord.c 1.152 + Version -> 1.11a15, Option -text new, char * textfile not global anymore + +Sat Feb 23 21:10:53 2002 Joerg Schilling + * auinfo.c 1.11 + First CD-Text Support + +Sat Feb 23 17:24:48 2002 Joerg Schilling + * cdrecord.h 1.88 + void *text new in struct track, packtext() Prototype new + +Sat Feb 23 16:01:50 2002 Joerg Schilling + * drv_mmc.c 1.79 + CD-Text Cue sheet for Lead-in does not depend anymore from char *textfile but from trackp[0].flags & TI_TEXT + +Wed Feb 20 19:39:39 2002 Joerg Schilling + * scsi_cdr.c 1.112 + * drv_dvd.c 1.63 + * drv_simul.c 1.22 + * fifo.c 1.33 + #ifndef DEBUG around #define DEBUG + +Tue Feb 19 22:10:23 2002 Joerg Schilling + * cdtext.c 1.5 + setuptextdata() new + +Fri Feb 15 00:46:56 2002 Joerg Schilling + * crc16.h 1.2 + * crc16.c 1.4 + flip_crc_error_cor() with bsize Parameter and EXPORT instead of LOCAL + cdtext_crc_ok() removed -> cdtext.c + +Fri Feb 15 00:42:47 2002 Joerg Schilling + * cdtext.c 1.4 + Flip error correction for Text CRC correction + Automatic Text Size Header recognition + +Sun Feb 10 12:43:07 2002 Joerg Schilling + * scsi-openserver.c 1.29 + MAX-DMA -> 63kB, -scanbus contolled by env Vars + +Sat Feb 9 17:29:02 2002 Joerg Schilling + * diskid.c 1.32 + Warning for guessed IDs + +Tue Jan 29 20:46:42 2002 Joerg Schilling + * diskid.c 1.31 + Removed wrong (now superfluous) IDs + +Thu Jan 24 00:03:25 2002 Joerg Schilling + * diskid.c 1.30 + "Advanced Digital Media", "Moser Baer India Limited", "NAN-YA Plastics Corporation", "SHENZEN SG&GAST DIGITAL OPTICAL DISCS" new from Plextools binary + m_grandadvance[] was superfluous (m_grandadv[]) + "WEALTH FAIR INVESTMENT LIMITE" typo fixed (D missing). + +Fri Jan 18 12:43:58 2002 Joerg Schilling + * scsi-linux-sg.c 1.69 + do not try to use the PG driver if open(device) fails + +Fri Dec 7 22:40:31 2001 Joerg Schilling + * scsi_cdr.c 1.111 + scsi_in_progress() with additional sense qualifier 0x04 for CyberDrive + +Sun Dec 2 15:42:53 2001 Joerg Schilling + * scsi-beos.c 1.20 + Typo removed, Support for BeOS 5 + +Sun Dec 2 15:37:36 2001 Joerg Schilling + * scsi-amigaos.c 1.2 + Reworked the error handling code + +Sun Dec 2 13:44:43 2001 Joerg Schilling + * scsi-amigaos.c 1.1 + date and time created 01/12/02 13:44:43 by joerg + +Tue Nov 27 20:25:39 2001 Joerg Schilling + * scsihack.c 1.40 + Copyright + 2001 + +Tue Nov 27 20:24:18 2001 Joerg Schilling + * scsihack.c 1.39 + scsi-amigaos.c new + +Tue Nov 27 02:10:34 2001 Joerg Schilling + * cdrecord.c 1.151 + NEED_SYS_SOCKET_H for BeOS new + Version -> 1.11a13 + cdr_buffer_cap() environment for Plasmon RF41xx better + +Tue Nov 27 02:08:47 2001 Joerg Schilling + * drv_philips.c 1.47 + Comment for buffer_cap dummy function for the Plasmon RF41xx better + +Tue Nov 13 16:17:05 2001 Joerg Schilling + * cdrecord.h 1.87 + * drv_dvd.c 1.62 + * cdrecord.c 1.150 + New Flag DSF_DVD, better overcapacity output for DVD + +Sun Nov 11 18:30:47 2001 Joerg Schilling + * drv_dvd.c 1.61 + Comment for ACARD TECH AEC-7720 ATAPI<->SCSI adaptor better + +Sun Nov 11 17:53:42 2001 Joerg Schilling + * scsi-remote.c 1.8 + Test HAVE_RCMD new + +Thu Nov 1 19:15:46 2001 Joerg Schilling + * drv_simul.c 1.21 + Now using timedefs.h + +Wed Oct 31 19:29:35 2001 Joerg Schilling + * scsi_cdr.c 1.110 + For ACARD TECH AEC-7720 ATAPI<->SCSI adaptor read Mode Page list only in debug mode + +Wed Oct 31 00:24:58 2001 Joerg Schilling + * scsi_cdr.c 1.109 + sense_secsize() now calles mode_sense() first with 12 Bytes and again with 0xFE Bytes for Moge Page List + +Wed Oct 31 00:17:27 2001 Joerg Schilling + * drv_mmc.c 1.78 + check_writemodes_mmc() -> EXPORT, read_dvd_structure() now with mit 32 byte instead of 15 bytes len Parameter + +Wed Oct 31 00:06:47 2001 Joerg Schilling + * cdrecord.h 1.86 + Prototyp for check_writemodes_mmc() + +Tue Oct 30 23:12:03 2001 Joerg Schilling + * scsireg.h 1.26 + cd_mode_page_05 intel byteorder link_size was wrong + +Tue Oct 30 21:36:53 2001 Joerg Schilling + * cdrecord.c 1.147 + DVD Check code did code exit() for non MMC CD writers + version -> 1.11a10 + +Mon Oct 29 19:12:29 2001 Joerg Schilling + * scsi-mac-iokit.c 1.3 + Include Liste reworked + +Mon Oct 29 18:57:46 2001 Joerg Schilling + * cd_misc.c 1.10 + * misc.c 1.2 + * modes.c 1.24 + * diskid.c 1.29 + * drv_simul.c 1.20 + * fifo.c 1.32 + * wm_track.c 1.3 + * wm_session.c 1.3 + * wm_packet.c 1.16 + avoid sys/types.h + +Sat Oct 27 02:56:16 2001 Joerg Schilling + * scsi-remote.c 1.7 + Test for HAVE_NETDB_H for rcmd() + +Sat Oct 27 02:55:30 2001 Joerg Schilling + * scsierrs.c 2.27 + #include for size_t for snprintf() + +Sat Oct 27 02:53:49 2001 Joerg Schilling + * fifo.c 1.31 + Test for HAVE_FORK new + +Sat Oct 27 02:53:18 2001 Joerg Schilling + * cdtext.c 1.3 + casts because sizeof() on MacOS X is long + +Thu Oct 25 16:19:08 2001 Joerg Schilling + * scsi-mac-iokit.c 1.2 + Unitnitialised Var dict, plugInResult format string ... GCC error removed + +Thu Oct 25 02:03:56 2001 Joerg Schilling + * scsihack.c 1.38 + Support for MaxOS X (Darwin-1.4) + +Thu Oct 25 02:03:11 2001 Joerg Schilling + * scsi-mac-iokit.c 1.1 + date and time created 01/10/25 01:03:11 by joerg + +Wed Oct 17 19:40:22 2001 Joerg Schilling + * cdrecord.c 1.146 + initialize scgp with NUL + brackets around if (p = senv_field(6)) + +Tue Oct 16 17:03:53 2001 Joerg Schilling + * drv_dvd.c 1.57 + * cdrecord.c 1.144 + * cdrecord.h 1.85 + * drv_simul.c 1.19 + * drv_sony.c 1.48 + * drv_philips.c 1.46 + * drv_mmc.c 1.77 + * drv_jvc.c 1.57 + New Structuremember cdr_cmdflags in cdr_t + +Tue Oct 16 15:57:05 2001 Joerg Schilling + * cdrecord.c 1.143 + Better error messages for DVD Demo Mode > 1 GB + +Wed Oct 10 23:04:03 2001 Joerg Schilling + * cdrecord.c 1.139 + number() corrected - had wrong if/then/else Structure for T/P/G Multiplyer + +Tue Oct 9 02:19:36 2001 Joerg Schilling + * cdrecord.c 1.138 + sys/types.h & sys/stat.h -> statdefs.h, -> 1.11a09 + +Tue Oct 9 01:42:05 2001 Joerg Schilling + * audiosize.c 1.18 + * isosize.c 1.8 + sys/types.h & sys/stat.h -> statdefs.h + +Sun Oct 7 21:27:14 2001 Joerg Schilling + * scsi-linux-pg.c 1.40 + * scsi-linux-sg.c 1.68 + Better error messages for Scanbus if /dev/sg* or /dev/pg* cannot be opened + +Sun Oct 7 21:03:23 2001 Joerg Schilling + * drv_mmc.c 1.76 + Modifications to allow recognition of CD/DVD writer + +Sun Oct 7 20:41:51 2001 Joerg Schilling + * cdr_drv.c 1.25 + xdebug for DVD/CD writer recognition + +Sun Oct 7 19:01:25 2001 Joerg Schilling + * drv_dvd.c 1.55 + read_dvd_structure() from drv_dvd.c -> scsi_cdr.c for Pioneer A03 DVD-R/CD-R + reload_media() only if writing later + +Sun Oct 7 13:35:21 2001 Joerg Schilling + * scsi_cdr.c 1.108 + * cdrecord.h 1.84 + read_dvd_structure() from drv_dvd.c -> scsi_cdr.c for Pioneer A03 DVD-R/CD-R + +Thu Sep 27 19:01:30 2001 Joerg Schilling + * scsidefs.h 1.27 + #undef DEV_UNKNOWN for True64 + +Thu Sep 13 19:10:03 2001 Joerg Schilling + * scsi_cdr.c 1.107 + * cdr_drv.c 1.24 + * drv_dvd.c 1.54 + * cdrecord.h 1.83 + Modifications to allow recognition of CD/DVD writer + +Thu Sep 13 19:01:46 2001 Joerg Schilling + * cdrecord.c 1.137 + cdrecord -version now may print cdrecord-Clone, + Modifications to allow recognition of CD/DVD writer + +Thu Sep 13 15:36:21 2001 Joerg Schilling + * scsidefs.h 1.26 + DEV_MMC_DVD_WR new + +Thu Sep 13 14:31:05 2001 Joerg Schilling + * scsi-sun.c 1.70 + maxdma for USCSI to default if == -1 (e.g. for TAPE), Debug print the RQ Buffer. + +Tue Sep 11 14:04:03 2001 Joerg Schilling + * scsi_cdr.c 1.106 + Open CD-Text File in Binary + +Tue Sep 11 03:06:31 2001 Joerg Schilling + * scsi-linux-sg.c 1.67 + Timeout Workaround for ioctl() + +Tue Sep 4 14:04:25 2001 Joerg Schilling + * cdrecord.c 1.136 + DEMO_SPEED new + +Thu Aug 9 16:38:21 2001 Joerg Schilling + * cdrecord.h 1.82 + * cdrecord.c 1.135 + #define GRACE_TIME 9 new + +Fri Jul 20 13:17:21 2001 Joerg Schilling + * drv_mmc.c 1.75 + * cdrecord.c 1.134 + * cdrecord.h 1.81 + RF_BLANK new to avoid opening the tray before blanking + Version -> 1.11a07 + +Thu Jul 19 00:28:36 2001 Joerg Schilling + * scsi-remote.c 1.6 + Now using _niread()/_nixwrite() + +Thu Jul 12 23:40:28 2001 Joerg Schilling + * scsidefs.h 1.25 + Taiyo Yuden EW-50 new + +Thu Jul 12 23:35:08 2001 Joerg Schilling + * scsi_cdr.c 1.105 + * cdr_drv.c 1.23 + * drv_philips.c 1.45 + New driver for Taiyo Yuden EW-50 because it swabs audio bytes compared to Philips CDD-521 + +Thu Jul 12 23:33:28 2001 Joerg Schilling + * fifo.c 1.30 + Better Debug messages for FIFO adresse/size + +Thu Jul 5 00:08:38 2001 Joerg Schilling + * sector.c 1.5 + Match new libedc + +Thu Jun 28 13:19:02 2001 Joerg Schilling + * drv_mmc.c 1.74 + Use -DSAO_RAW -DSAO_RAW_TEST for SAO RAW tests only + +Wed Jun 27 10:04:03 2001 Joerg Schilling + * clone.c 1.4 + clone_cue() for Test + +Wed Jun 27 09:51:19 2001 Joerg Schilling + * cdrecord.c 1.133 + CDR_SRAW16 removed + +Wed Jun 27 09:47:10 2001 Joerg Schilling + * scsimmc.h 1.6 + * scsi_cdr.c 1.104 + struct ftrackdesc -> scsimmc.h + +Wed Jun 27 09:35:13 2001 Joerg Schilling + * scsi_cdr.c 1.103 + struct tocheader definition removed because it is in scsimmc.h + +Sun Jun 24 22:35:23 2001 Joerg Schilling + * drv_mmc.c 1.73 + check_writemodes_mmc() now resety silent correctly, deflt_writemodes_mmc() new + +Sun Jun 24 19:55:02 2001 Joerg Schilling + * cdrecord.h 1.80 + CDR_SRAW16 disabled, because SAO supports only RAW96x + +Fri Jun 22 08:42:55 2001 Joerg Schilling + * scsimmc.h 1.5 + struct tocheader now with Uchar + +Wed Jun 20 21:53:55 2001 Joerg Schilling + * subchan.c 1.6 + min Struktur member -> pmin + +Wed Jun 20 21:53:34 2001 Joerg Schilling + * cdr_drv.c 1.22 + #include for printf() + +Wed Jun 20 21:53:03 2001 Joerg Schilling + * cdrecord.c 1.132 + Changes for GCC-3.0 & Linux include file bugs for printf() (is a #define), 1.11a04 -> 1.11a05 + +Tue Jun 19 12:26:49 2001 Joerg Schilling + * cdrecord.c 1.131 + Usage() with textfile=, 1.11a03 -> 1.11a04 + +Tue Jun 19 12:22:30 2001 Joerg Schilling + * cdtext.c 1.2 + Modifications for RAW CD-Text + +Tue Jun 19 11:39:08 2001 Joerg Schilling + * cdrecord.h 1.79 + * subchan.c 1.5 + addrw() new for CD-Text Support in RAW mode + +Tue Jun 19 02:10:37 2001 Joerg Schilling + * cdrecord.h 1.78 + * cdrecord.c 1.130 + BUF_SIZE -> CDR_BUF_SIZE & from cdrecord.c -> cdrecord.h + +Tue Jun 19 01:04:54 2001 Joerg Schilling + * cdrecord.c 1.129 + Do not call exit() if interrupting during wait time via ^C + +Mon Jun 18 09:29:52 2001 Joerg Schilling + * cdtext.c 1.1 + date and time created 01/06/18 08:29:52 by joerg + +Mon Jun 18 08:55:07 2001 Joerg Schilling + * drv_mmc.c 1.72 + * cdrecord.c 1.128 + * cdrecord.h 1.77 + First CD-Text Support + +Sat Jun 16 19:20:36 2001 Joerg Schilling + * cdrecord.c 1.127 + trackp->dataoff new, call on_comerr() earlier + +Sat Jun 16 18:16:51 2001 Joerg Schilling + * cdrecord.h 1.76 + Dataoffset in struct track new, is_text() new + +Sat Jun 16 18:15:05 2001 Joerg Schilling + * drv_mmc.c 1.71 + Forgotten if (xdebug) + +Tue Jun 12 22:57:03 2001 Joerg Schilling + * cdrecord.c 1.126 + -clone new, write mode for -xa1 -xa2, RAW data bug removed + +Tue Jun 12 22:42:25 2001 Joerg Schilling + * sector.c 1.4 + recodesectors() -> subrecodesecs()/sunchan.c, scrsectors() without return for AUDIO + +Tue Jun 12 22:41:37 2001 Joerg Schilling + * subchan.c 1.4 + subrecodesecs() from sector.c & scrsectors() dummy + +Tue Jun 12 22:40:59 2001 Joerg Schilling + * cdrecord.h 1.75 + recodesectors() -> subrecodesecs() + +Tue Jun 12 01:51:49 2001 Joerg Schilling + * cdrecord.h 1.74 + Modifications for clone.c + +Tue Jun 12 01:50:53 2001 Joerg Schilling + * clone.c 1.1 + date and time created 01/06/12 00:50:53 by joerg + +Tue Jun 12 01:07:06 2001 Joerg Schilling + * subchan.c 1.3 + subq/nsubh -> _subq/_nsubh + +Tue Jun 12 01:05:54 2001 Joerg Schilling + * subchan.c 1.2 + Changes for clone writing, qwto16() new for clone 16/96 Writing + +Tue Jun 12 00:12:42 2001 Joerg Schilling + * sector.c 1.3 + removed unused Vars + +Mon Jun 11 23:31:00 2001 Joerg Schilling + * cdrecord.h 1.73 + Enhancements for clone writing + +Mon Jun 11 23:29:50 2001 Joerg Schilling + * sector.c 1.2 + scrsectors()/recodesectors() fuer clone writing neu + +Mon Jun 11 23:12:41 2001 Joerg Schilling + * drv_mmc.c 1.70 + Checking write modes Message only with xdebug + +Mon Jun 11 23:11:55 2001 Joerg Schilling + * movesect.c 1.2 + Make it more general to allow compress and expand + +Mon Jun 11 23:09:58 2001 Joerg Schilling + * auinfo.c 1.10 + Comment for ISRC + +Sat Jun 9 20:13:35 2001 Joerg Schilling + * cdrecord.c 1.125 + -copy/-nocopy new, Prevent data sectors only in RAW Mode (without libedc_ecc) + +Sat Jun 9 20:05:59 2001 Joerg Schilling + * cdrecord.1 1.60 + New Options -raw, -raw96r, -raw96p, -raw16, -copy, -nocopy + +Wed Jun 6 00:09:58 2001 Joerg Schilling + * cdrecord.c 1.124 + Any positive startsector for RAW is wriong -> Philips Firmware bug fixed + +Mon Jun 4 19:28:17 2001 Joerg Schilling + * cdrecord.c 1.123 + Modifications for RAW Mode + cdr_t *dp now allocated + BURNFREE printput with Driver Flags + OPC also for -blank + write_secs() new for all writes on ATAPI + print_wrmodes()/check_wrmode() new + reload_media() new + +Mon Jun 4 17:45:49 2001 Joerg Schilling + * cdrecord.h 1.72 + * drv_dvd.c 1.53 + * drv_mmc.c 1.69 + New Function reload_media() + +Mon Jun 4 17:08:05 2001 Joerg Schilling + * cdrecord.h 1.71 + * wm_packet.c 1.15 + Modifications for RAW Mode + +Mon Jun 4 17:06:21 2001 Joerg Schilling + * subchan.c 1.1 + date and time created 01/06/04 16:06:21 by joerg + +Mon Jun 4 16:52:34 2001 Joerg Schilling + * crc16.c 1.3 + Now correct Code with Inverted CRC Bits + +Mon Jun 4 16:49:47 2001 Joerg Schilling + * auinfo.c 1.9 + SECT_AUDIO_NPRE -> SECT_AUDIO_NOPRE + +Mon Jun 4 16:06:15 2001 Joerg Schilling + * crc16.c 1.2 + Now using Uint*_t + +Mon Jun 4 16:02:17 2001 Joerg Schilling + * crc16.h 1.1 + date and time created 01/06/04 15:02:17 by joerg + +Mon Jun 4 13:33:19 2001 Joerg Schilling + * drv_mmc.c 1.68 + Now using CDR_SRAW*, botchexit Abort removed + +Mon Jun 4 12:53:18 2001 Joerg Schilling + * sector.c 1.1 + date and time created 01/06/04 11:53:18 by joerg + +Sun Jun 3 20:51:22 2001 Joerg Schilling + * auinfo.c 1.8 + Modifications for RAW Mode + +Sun Jun 3 14:48:57 2001 Joerg Schilling + * cdrecord.c 1.122 + Use comexit()/comerr() instead of exscsi() + New Function do_opc() now also called before blank, -force avoids this + +Sat Jun 2 21:24:52 2001 Joerg Schilling + * movesect.h 1.1 + * movesect.c 1.1 + date and time created 01/06/02 20:24:52 by joerg + +Fri Jun 1 07:54:04 2001 Joerg Schilling + * cdrecord.1 1.59 + burnproof -> burnfree + +Fri Jun 1 07:46:01 2001 Joerg Schilling + * scsi_cdr.c 1.102 + BURN-Proof (Sanyo) -> Buffer-Underrun-Free recording + +Fri Jun 1 07:44:39 2001 Joerg Schilling + * fifo.c 1.29 + call fill_buf() instead of read_buf() and trackp/secno Parameter for Subcode Generator + +Fri Jun 1 02:08:55 2001 Joerg Schilling + * drv_mmc.c 1.67 + BURN-Proof -> BURN-Free + +Thu May 31 23:31:44 2001 Joerg Schilling + * scsireg.h 1.25 + BURN Free & link size new + +Thu May 31 03:21:47 2001 Joerg Schilling + * drv_mmc.c 1.66 + check_writemodes_mmc() new, is_raw() set write modes + +Mon May 28 00:51:36 2001 Joerg Schilling + * cd_misc.c 1.9 + sec_to_msf() new + +Sun May 27 14:01:28 2001 Joerg Schilling + * audiosize.c 1.17 + Better comment + +Thu May 24 19:10:28 2001 Joerg Schilling + * auinfo.c 1.7 + No exit() if -debug & nindex > 1 + +Thu May 24 19:09:39 2001 Joerg Schilling + * modes.c 1.23 + Warning using default data only if not in Silent mode + +Thu May 24 19:07:13 2001 Joerg Schilling + * drv_dvd.c 1.52 + * drv_jvc.c 1.56 + * drv_simul.c 1.18 + * drv_philips.c 1.44 + * drv_sony.c 1.47 + CDR_DAO -> CDR_SAO, SAO no more predefined - it either does not work or is tested automatically (MMC) + +Sun May 20 21:23:53 2001 Joerg Schilling + * drv_sony.c 1.46 + * drv_philips.c 1.43 + mask sectype with ST_MASK because of new mode bits + +Sun May 20 18:51:41 2001 Joerg Schilling + * drv_simul.c 1.17 + CDR_SIMUL Flag new + +Fri May 18 21:07:58 2001 Joerg Schilling + * cdrecord.h 1.70 + F_OVERBURN new, F_RAW / is_raw() new, CDR_SIMUL new + +Fri May 18 19:30:02 2001 Joerg Schilling + * cdrecord.c 1.121 + trackp[0].dbtype is set with Data type from Track 1 + +Fri May 18 19:22:50 2001 Joerg Schilling + * drv_mmc.c 1.65 + In open_session() wird nun schon der Datenblocktyp fuer den ersten track eingestellt + +Mon May 14 23:36:07 2001 Joerg Schilling + * cdrecord.c 1.120 + -overburn new + Bracket bug with > 90 min Warning removed + > 90 Min Warning only if offizial capacity is exceeded (for DVD-R) + -pad implied for next Track with -isosize + Win32 Priorities are non contiguous (fix in rt_raisepri()) + +Mon May 14 22:54:17 2001 Joerg Schilling + * cdrecord.h 1.69 + F_OVERBURN (-overburn) new + +Mon May 14 22:53:33 2001 Joerg Schilling + * cdrecord.1 1.58 + -overburn new, -isosize better documented + +Sat Apr 28 23:34:12 2001 Joerg Schilling + * scsi-remote.c 1.5 + Read char with buffer for cygwin + +Fri Apr 20 11:38:03 2001 Joerg Schilling + * scsitransp.c 1.81 + scg_svhead() is silent if non verbose + +Fri Apr 20 11:34:41 2001 Joerg Schilling + * scsi-linux-sg.c 1.66 + Hack for ide-scsi bug, although there is sense data, SCSI Status is 0 + +Thu Apr 19 21:52:41 2001 Joerg Schilling + * drv_mmc.c 1.64 + removed superfluous scgp->silent--; in fixate_mmx(). silent did become negative + +Thu Apr 19 21:51:26 2001 Joerg Schilling + * cdrecord.c 1.119 + Enhance wait time in wait_unit_ready() after blank to 240 s for Mitsumi + +Tue Apr 17 00:58:57 2001 Joerg Schilling + * cdrecord.1 1.57 + Hint for mailman interface + +*************** Release 1.10 ******************* + +Fri Apr 13 20:41:36 2001 Joerg Schilling + * cdrecord.c 1.118 + Version -> 1.10 final + +Fri Apr 13 20:40:58 2001 Joerg Schilling + * cdrecord.c 1.117 + Backwardcounter corrected + +Fri Apr 13 20:39:09 2001 Joerg Schilling + * cdrecord.1 1.56 + New Support mail Adresses + +Wed Apr 11 01:22:18 2001 Joerg Schilling + * scsi_cdr.c 1.101 + * cdrecord.h 1.68 + print_capacity() new with FILE * Parameter + +Sun Apr 8 02:03:49 2001 Joerg Schilling + * modes.c 1.22 + scgp->silent--; was oat wrong place + +Sun Apr 1 14:39:01 2001 Joerg Schilling + * cdrecord.1 1.55 + Typo + +Sat Mar 31 23:02:28 2001 Joerg Schilling + * modes.c 1.21 + unit_ready() before each mode_sense()/mode_select() + +Sat Mar 31 22:46:28 2001 Joerg Schilling + * drv_mmc.c 1.63 + Comment for IOMEGA DMA overrun modified (Philips removed) + +Sun Mar 18 19:39:48 2001 Joerg Schilling + * cdrecord.1 1.54 + REMOTE SCSI description and new unified SCSI Options + +Sun Mar 18 19:31:31 2001 Joerg Schilling + * cdrecord.c 1.116 + Unified SCSI Options + +Sun Mar 18 19:27:02 2001 Joerg Schilling + * scsitransp.c 1.80 + Fixed bug that printed SCSI timing without verbose + +Sun Mar 18 18:37:45 2001 Joerg Schilling + * scsitransp.c 1.79 + New Functions: scg_svhead()/scg_svtail()/scg__sprinterr() + Comments for Functions + Print SCSI timing for earch failed SCSI Command + +Sun Mar 18 18:28:17 2001 Joerg Schilling + * scsitransp.h 1.50 + New Funstions: scg_svhead()/scg_svtail()/scg__sprinterr() + +Sun Mar 18 15:37:09 2001 Joerg Schilling + * scsitransp.c 1.78 + Print Timing without Verbose + +Sun Mar 18 15:10:18 2001 Joerg Schilling + * scsi-wnt.c 1.27 + * scsi-vms.c 1.29 + * scsi-unixware.c 1.25 + * scsi-sgi.c 1.34 + * scsi-osf.c 1.23 + * scsi-next.c 1.30 + * scsi-linux-sg.c 1.65 + * scsi-hpux.c 1.29 + * scsi-linux-pg.c 1.39 + * scsi-bsd.c 1.40 + * scsi-bsd-os.c 1.26 + * scsi-beos.c 1.19 + * scsi-aix.c 1.33 + if (scgp->debug) -> if (scgp->debug > 0) + +Wed Mar 14 00:42:40 2001 Joerg Schilling + * scsitransp.h 1.49 + * scsitransp.c 1.77 + scg_verbose() -> scg_vsetup() + +Mon Mar 12 23:09:38 2001 Joerg Schilling + * cdrecord.c 1.115 + Version -> 1.10a17, select_target() uses FILE * + +Mon Mar 12 23:08:46 2001 Joerg Schilling + * scsi_scan.h 1.3 + * scsi_scan.c 1.14 + comerrno() removed + select_target() with FILE * + select_target() returns number of Targets + +Mon Mar 12 23:06:50 2001 Joerg Schilling + * cdrecord.h 1.67 + * scsi_cdr.c 1.100 + printinq() new + +Mon Mar 12 22:06:05 2001 Joerg Schilling + * scsi-linux-sg.c 1.64 + Better differentiation SCG_RETRYABLE/SCG_NO_ERROR + Set ux_errno if Sense Data present + +Sun Mar 11 17:10:12 2001 Joerg Schilling + * scsi-linux-pg.c 1.38 + SCG_RETRYABLE for DMA overrun + CHECK CONDITION == SCG_NO_ERROR + +Sun Mar 11 17:07:48 2001 Joerg Schilling + * scsitransp.c 1.76 + Remove unused Variables + +Sun Mar 11 16:56:24 2001 Joerg Schilling + * scsitransp.h 1.48 + scg_vhead()/scg_vtail()/scg_verbose() & scg_errfflush() new + +Sun Mar 11 16:55:55 2001 Joerg Schilling + * scsitransp.c 1.75 + scg_vhead()/scg_vtail()/scg_verbose() & scg_errfflush() new + Version -> 0.5 + +Sat Mar 10 17:53:45 2001 Joerg Schilling + * scsitransp.h 1.47 + scgp->bufptr new + SCG_KVERSION new + +Sat Mar 10 17:52:53 2001 Joerg Schilling + * scsitransp.c 1.74 + scgp->bufptr new + scgp->scmd->resid < 0 == DMA overrun + +Sat Mar 10 16:24:00 2001 Joerg Schilling + * scsi-linux-sg.c 1.63 + SCG_KVERSION new + +Mon Feb 26 22:20:32 2001 Joerg Schilling + * scsi-unixware.c 1.24 + New formatting + +Mon Feb 26 22:18:39 2001 Joerg Schilling + * scsi-unixware.c 1.23 + Environment "LIBSCG_SCAN_ALL" controls scanning of Harddisks because of system crash + +Mon Feb 26 16:05:41 2001 Joerg Schilling + * cdrecord.c 1.114 + Warning if DVD-R code is missing and we found a DVD-R drive + +Sun Feb 25 13:02:42 2001 Joerg Schilling + * fifo.c 1.27 + Now using mmapdefs.h + +Fri Feb 23 17:32:38 2001 Joerg Schilling + * scsidefs.h 1.24 + ccs() Makro -> is_ccs() + +Fri Feb 23 00:24:02 2001 Joerg Schilling + * fifo.c 1.26 + Support for mmap() on Apollo Domain/OS with mmap(0, &size, ...) + +Thu Feb 22 16:13:27 2001 Joerg Schilling + * audiosize.c 1.16 + Fixed bug in Prototyp (result from long -> off_t) + +Thu Feb 22 16:11:07 2001 Joerg Schilling + * cdrecord.h 1.66 + * wm_packet.c 1.14 + * cdrecord.c 1.113 + * drv_mmc.c 1.62 + * drv_jvc.c 1.54 + * drv_dvd.c 1.51 + Large File support + +Thu Feb 22 16:10:53 2001 Joerg Schilling + * drv_jvc.c 1.55 + padsize Parameter for pad_track() casted to Llong + +Thu Feb 22 00:57:53 2001 Joerg Schilling + * cdr_drv.c 1.21 + mconfig.h/unixstd.h for Large Files + +Thu Feb 22 00:55:35 2001 Joerg Schilling + * scsi_scan.c 1.13 + #include for Large Files + +Thu Feb 22 00:54:26 2001 Joerg Schilling + * fifo.c 1.25 + Large File support + Casts for sizeof() [long] on MaxOS X + +Wed Feb 21 23:32:51 2001 Joerg Schilling + * defaults.c 1.6 + #include unixstd.h for Large Files + +Wed Feb 21 23:27:48 2001 Joerg Schilling + * auinfo.c 1.6 + * isosize.c 1.7 + * audiosize.c 1.15 + Large File support + +Tue Feb 20 23:56:44 2001 Joerg Schilling + * drv_sony.c 1.45 + * drv_philips.c 1.42 + unixstd.h for sys/types.h for off_t in cdrecord.h + +Thu Feb 15 23:09:12 2001 Joerg Schilling + * scsihack.c 1.37 + Test for HAVE_BSD_DEV_SCSIREG_H for new MacOSX + +Fri Feb 9 00:35:50 2001 Joerg Schilling + * drv_philips.c 1.41 + Fixes for Plasmon RF 4100 + +Tue Jan 23 12:20:32 2001 Joerg Schilling + * modes.c 1.20 + Cast for singed/unsigned cmparison + +Mon Jan 15 01:09:05 2001 Joerg Schilling + * fifo.c 1.24 + %x -> %p Format + +Sun Jan 7 19:46:42 2001 Joerg Schilling + * scsihack.c 1.36 + scsi-apollo.c new + +Sun Jan 7 19:39:40 2001 Joerg Schilling + * scsitransp.c 1.73 + * scsi-vms.c 1.28 + * scsi-unixware.c 1.22 + * scsi-linux-pg.c 1.37 + * scsi-aix.c 1.32 + sense_len check -> scsitransp.c + +Tue Jan 2 00:09:45 2001 Joerg Schilling + * scsitransp.c 1.72 + sccsid[] is always used -> without #ifdef lint + +Fri Dec 29 00:06:35 2000 Joerg Schilling + * cdrecord.c 1.112 + Lint, 1.10a10, rlimit cast to Llong for SGI + +Thu Dec 28 23:19:23 2000 Joerg Schilling + * scsi_cdr.c 1.99 + Modified for Lint + +Wed Dec 20 18:26:01 2000 Joerg Schilling + * scsi-sgi.c 1.33 + Cast to caddr_t for SENSEBUF(dsp) + +Wed Dec 13 20:22:52 2000 Joerg Schilling + * scsi-linux-pg.c 1.36 + Cast s_cmd.addr = (caddr_t)sp->u_sense.cmd_sense; + +Tue Dec 12 15:20:46 2000 Joerg Schilling + * scsitransp.h 1.46 + struct scsi -> struct scg_scsi for AIX + +Sat Dec 9 22:52:01 2000 Joerg Schilling + * scsi-linux-sg.c 1.62 + Recognise ENOTTY as errno for failed ioctl() + +Sat Dec 9 18:20:25 2000 Joerg Schilling + * modes.c 1.19 + * scsilog.c 1.13 + * drv_sony.c 1.44 + * drv_philips.c 1.40 + * drv_mmc.c 1.61 + * drv_jvc.c 1.53 + * drv_dvd.c 1.50 + u_char -> Uchar + +Wed Dec 6 12:43:51 2000 Joerg Schilling + * cdrecord.c 1.111 + atoll() -> libschily + +Wed Nov 29 17:22:15 2000 Joerg Schilling + * scsi-vms.c 1.27 + Indented + +Wed Nov 29 17:18:51 2000 Joerg Schilling + * scsi-vms.c 1.26 + ATAPI Support and changed for new libscg Interface + +Fri Nov 24 11:00:58 2000 Joerg Schilling + * cdrecord.c 1.110 + Workaround for ACER drive that does not return from -dummy + Typo in online Help + +Wed Nov 8 00:06:05 2000 Joerg Schilling + * scsitransp.h 1.45 + * scsireg.h 1.24 + * scsidefs.h 1.23 + * scgio.h 2.16 + #ifdef __cplusplus extern "C" { + +Sat Nov 4 15:00:50 2000 Joerg Schilling + * fifo.c 1.23 + * cdrecord.c 1.109 + Printf-like Formats cleaned up + +Sat Nov 4 14:56:09 2000 Joerg Schilling + * scsi_cdr.c 1.98 + PIONEER CD-WO DR-R504X -> DEV_PIONEER_DW_S114X + +Sat Nov 4 14:52:43 2000 Joerg Schilling + * cdrecord.h 1.65 + DEFAULT_FIFOSIZE -> Long Constant + +Tue Oct 31 15:58:54 2000 Joerg Schilling + * cdrecord.c 1.108 + Cygwin-1.x Compatibility + +Sun Oct 22 13:37:15 2000 Joerg Schilling + * scsi-aix.c 1.31 + Type in sizeof(devname removed + +Tue Oct 17 10:35:34 2000 Joerg Schilling + * cdrecord.1 1.53 + SEE ALSO enhanced + +Fri Oct 13 11:28:51 2000 Joerg Schilling + * scsi-linux-sg.c 1.61 + use pg_version() only for PP + +Wed Sep 20 00:59:38 2000 Joerg Schilling + * modes.c 1.18 + Code reordered so DMA overrun messages only appears once + +Sun Sep 17 17:15:06 2000 Joerg Schilling + * cdrecord.h 1.64 + #define sample -> #define msample for Win32 + +Fri Sep 8 03:04:50 2000 Joerg Schilling + * modes.c 1.17 + Warning for Philips DMA overrun + +Wed Sep 6 23:41:34 2000 Joerg Schilling + * scsi_cdr.c 1.97 + unit_ready() made better + +Wed Sep 6 09:59:05 2000 Joerg Schilling + * scsitransp.c 1.71 + * scsitransp.h 1.44 + scg_cmderr() -> scg_cmd_err(), scg_cmd_status() new + +Tue Sep 5 03:32:34 2000 Joerg Schilling + * scsitransp.c 1.70 + Default printing to stderr + +Tue Sep 5 03:06:01 2000 Joerg Schilling + * scsitransp.c 1.69 + scg__open() returns -1 when SCGO_OPEN fails, to avoid calling scg_fileno() + +Tue Sep 5 02:30:41 2000 Joerg Schilling + * scsi_cdr.c 1.96 + allow_atapi() calls unit_ready() before mode_sense() to make it work past a reset + +Tue Sep 5 02:28:03 2000 Joerg Schilling + * modes.c 1.16 + Minimal transfer sizeof(struct scsi_mode_header) after DMA overrun + +Tue Sep 5 02:22:48 2000 Joerg Schilling + * drv_mmc.c 1.60 + read_toc()/read_disk_info() reads minimal 4 bytes for Philips ATAPI drives + +Mon Sep 4 20:24:52 2000 Joerg Schilling + * cdrecord.1 1.52 + Typo removed + +Sat Sep 2 21:16:00 2000 Joerg Schilling + * scsitransp.h 1.43 + Drive flags new in SCSI * + +Sat Sep 2 21:03:48 2000 Joerg Schilling + * scsi-wnt.c 1.26 + * scsi-vms.c 1.25 + * scsi-unixware.c 1.21 + * scsi-sgi.c 1.32 + * scsi-osf.c 1.22 + * scsi-os2.c 1.21 + * scsi-next.c 1.29 + * scsi-linux-sg.c 1.60 + * scsi-linux-pg.c 1.35 + * scsi-hpux.c 1.28 + * scsi-bsd.c 1.39 + * scsi-bsd-os.c 1.25 + * scsi-aix.c 1.30 + * scsi-beos.c 1.18 + All debug printing to stderr (scgp->errfile) + +Tue Aug 29 23:44:31 2000 Joerg Schilling + * scsi-next.c 1.28 + * scsi-bsd-os.c 1.24 + error codes & return harmonised + +Tue Aug 29 02:36:09 2000 Joerg Schilling + * drv_mmc.c 1.59 + set curspeed only if > 0 (SCSI-3 floating point exception in waitfix) + +Tue Aug 29 02:35:04 2000 Joerg Schilling + * scsi_scan.c 1.12 + call scg_settarget() in scanbus, to make sure SCSI address for scg_initator_id() is OK + +Sat Aug 26 10:20:43 2000 Joerg Schilling + * drv_mmc.c 1.58 + OPC Hack for strange drive that returns from OPC with "UNIT ATTENTION/operator selected write permit" + +Sat Aug 26 10:15:03 2000 Joerg Schilling + * cdrecord.c 1.107 + Enhancements for remote SCSI, scg_reset() with what Parameter + +Sat Aug 26 00:53:10 2000 Joerg Schilling + * scsihack.c 1.35 + * scsitransp.c 1.68 + scsibus/target/lun acess now only with scg_scsibus()/scsi_target()/scg_lun() and scg_settarget() + do not initialize target in struct scg_cmd because this is now done in SCG lowlevel code + scg__open() from scsihack.c -> scsitransp.c, scg_settarget() -> scgsettarget.c + dummy code it now always present + +Sat Aug 26 00:22:51 2000 Joerg Schilling + * scsitransp.h 1.42 + scg_settarget() -> scgsettarget.c + +Fri Aug 25 23:17:25 2000 Joerg Schilling + * scsi-wnt.c 1.25 + * scsi-vms.c 1.24 + * scsi-unixware.c 1.20 + * scsi-sgi.c 1.31 + * scsi-osf.c 1.21 + * scsi-os2.c 1.20 + * scsi-next.c 1.27 + * scsi-linux-sg.c 1.59 + * scsi-linux-pg.c 1.34 + * scsi-hpux.c 1.27 + * scsi-bsd.c 1.38 + * scsi-bsd-os.c 1.23 + * scsi-beos.c 1.17 + * scsi-aix.c 1.29 + scsibus/target/lun acess now only with scg_scsibus()/scsi_target()/scg_lun() and scg_settarget() + do not initialize target in struct scg_cmd because this is now done in SCG lowlevel code + +Thu Aug 24 00:52:32 2000 Joerg Schilling + * scsitransp.h 1.41 + scg Address Stucture new + scg__open() without bus/target/lun Parameter + scg_remote() new + +Wed Aug 23 22:44:26 2000 Joerg Schilling + * scsi_scan.c 1.11 + * scsilog.c 1.12 + * drv_dvd.c 1.49 + * drv_jvc.c 1.52 + * drv_philips.c 1.39 + * drv_sony.c 1.43 + * scsi_cdr.c 1.95 + scsibus/target/lun acess now only with scg_scsibus()/scsi_target()/scg_lun() and scg_settarget() + do not initialize target in struct scg_cmd because this is now done in SCG lowlevel code + +Sun Aug 20 20:57:32 2000 Joerg Schilling + * scsitransp.h 1.40 + * scsitransp.c 1.67 + * scsihack.c 1.34 + * scsi-linux-sg.c 1.58 + * scsi-linux-pg.c 1.33 + * scsi-sgi.c 1.30 + * scsi-next.c 1.26 + * scsi-hpux.c 1.26 + * scsi-bsd.c 1.37 + * scsi-aix.c 1.28 + * scsi_scan.c 1.10 + Now using scg_settarget() + +Sat Aug 19 23:24:03 2000 Joerg Schilling + * scsitransp.c 1.66 + * scsihack.c 1.33 + * scsi-wnt.c 1.24 + * scsi-vms.c 1.23 + * scsi-unixware.c 1.19 + * scsi-sgi.c 1.29 + * scsi-osf.c 1.20 + * scsi-os2.c 1.19 + * scsi-next.c 1.25 + * scsi-linux-sg.c 1.57 + * scsi-linux-pg.c 1.32 + * scsi-hpux.c 1.25 + * scsi-bsd.c 1.36 + * scsi-beos.c 1.16 + * scsi-bsd-os.c 1.22 + * scsi-aix.c 1.27 + * scsitransp.h 1.38 + scg_reset() with Function code Parameter + +Sat Aug 19 22:37:30 2000 Joerg Schilling + * cdrecord.h 1.63 + * scsitransp.h 1.39 + #ifdef's modified for new #define _SCG_*_H + +Sat Aug 19 21:57:31 2000 Joerg Schilling + * scsireg.h 1.23 + * scsidefs.h 1.22 + * scgio.h 2.15 + Correctly made multi include safe with #ifdef _SCG_* + +Sat Aug 19 21:05:25 2000 Joerg Schilling + * scsitransp.c 1.65 + sys/param.h removed + +Sat Aug 19 20:52:31 2000 Joerg Schilling + * scsitransp.h 1.37 + Now using scg_ops + Remote Version #defines, scg__version() removed + +Sat Aug 19 20:23:20 2000 Joerg Schilling + * scsi-sgi.c 1.28 + * scsi-osf.c 1.19 + * scsierrs.c 2.26 + * scsitransp.c 1.64 + * scsireg.h 1.22 + u_char -> Uchar + +Sat Aug 19 19:13:16 2000 Joerg Schilling + * scsitransp.c 1.63 + * scsihack.c 1.32 + scsitransp.c and scsihack.c separated + +Sat Aug 19 17:30:28 2000 Joerg Schilling + * scsireg.h 1.21 + Status & Sense Definitions from scsireg.h + +Fri Aug 18 10:40:48 2000 Joerg Schilling + * scsi-vms.c 1.22 + * scsi-wnt.c 1.23 + * scsi-unixware.c 1.18 + * scsi-sgi.c 1.27 + * scsi-osf.c 1.18 + * scsi-os2.c 1.18 + * scsi-next.c 1.24 + * scsi-linux-sg.c 1.56 + * scsi-linux-pg.c 1.31 + * scsi-hpux.c 1.24 + * scsi-bsd.c 1.35 + * scsi-bsd-os.c 1.21 + * scsi-beos.c 1.15 + * scsihack.c 1.31 + * scsi-aix.c 1.26 + * scsitransp.c 1.62 + Now uses scg_ops Structure and calling via pointers + +Thu Aug 17 22:50:53 2000 Joerg Schilling + * scsitransp.c 1.61 + Bracketing typo in scg_sprintresult() removed (printed junk) + +Wed Aug 16 10:11:08 2000 Joerg Schilling + * scsi-wnt.c 1.22 + * scsi-vms.c 1.21 + * scsi-unixware.c 1.17 + * scsi-sgi.c 1.26 + * scsi-os2.c 1.17 + * scsi-osf.c 1.17 + * scsi-next.c 1.23 + * scsi-linux-sg.c 1.55 + * scsi-hpux.c 1.23 + * scsi-linux-pg.c 1.30 + * scsi-bsd.c 1.34 + * scsi-beos.c 1.14 + * scsi-bsd-os.c 1.20 + * scsi-aix.c 1.25 + * scsihack.c 1.30 + * scsitransp.c 1.60 + scg_send() now only with scgp* Parameter + +Sun Aug 13 23:31:37 2000 Joerg Schilling + * scsitransp.c 1.59 + Buggy braketing corrected (printed 4-5 null Bytes to error output even in silent mode) + +Fri Aug 4 01:26:24 2000 Joerg Schilling + * scsitransp.h 1.36 + * scsitransp.c 1.58 + Komplett umgebaut damit die Fehlerausgabe in einen String erfolgt + +Tue Aug 1 00:03:45 2000 Joerg Schilling + * scsitransp.h 1.35 + * scsitransp.c 1.57 + * scsierrs.c 2.25 + * scsi-wnt.c 1.21 + * scsi-vms.c 1.20 + * scsi-unixware.c 1.16 + * scsi-sgi.c 1.25 + * scsi-osf.c 1.16 + * scsi-os2.c 1.16 + * scsi-next.c 1.22 + * scsi-linux-sg.c 1.54 + * scsi-linux-pg.c 1.29 + * scsi-hpux.c 1.22 + * scsi-bsd.c 1.33 + * scsi-bsd-os.c 1.19 + * scsi-beos.c 1.13 + * scsi-aix.c 1.24 + All printf()'s -> js_printf(), sprintf() -> snprintf() + +Sun Jul 30 15:15:34 2000 Joerg Schilling + * scsitransp.c 1.56 + * scsitransp.h 1.34 + scg_prbytes()/scg_prsense() & scg_printdev() INterface restructured + +Sun Jul 30 13:52:05 2000 Joerg Schilling + * wm_packet.c 1.13 + * scsi_scan.c 1.9 + * scsilog.c 1.11 + * cdrecord.c 1.106 + * scsi_cdr.c 1.94 + * modes.c 1.15 + * drv_sony.c 1.42 + * drv_simul.c 1.16 + * drv_philips.c 1.38 + * drv_mmc.c 1.57 + * drv_jvc.c 1.51 + * drv_dvd.c 1.48 + Restructured for new libscg with scg_*() + +Thu Jul 27 01:17:47 2000 Joerg Schilling + * scsitransp.c 1.55 + scg_prbytes()/scg_printdev() now using FILE * Parameter + scg__errmsg() restructured to be similar to snprintf() + +Thu Jul 27 01:15:54 2000 Joerg Schilling + * scsierrs.c 2.24 + Made similar to snprintf() + +Thu Jul 27 01:15:02 2000 Joerg Schilling + * scsitransp.h 1.33 + scg_prbytes()/scg_printdev() now using FILE * Parameter + scg__errmsg() restructured to be similar to snprintf() + +Sun Jul 23 18:01:12 2000 Joerg Schilling + * scsierrs.c 2.23 + * scsihack.c 1.29 + * scsitransp.c 1.54 + * scsi-wnt.c 1.20 + * scsi-vms.c 1.19 + * scsi-unixware.c 1.15 + * scsi-osf.c 1.15 + * scsi-sgi.c 1.24 + * scsi-os2.c 1.15 + * scsi-next.c 1.21 + * scsi-linux-sg.c 1.53 + * scsi-linux-pg.c 1.28 + * scsi-hpux.c 1.21 + * scsi-bsd.c 1.32 + * scsi-beos.c 1.12 + * scsi-bsd-os.c 1.18 + * scsi-aix.c 1.23 + * scsitransp.h 1.32 + restructured to use scg_ basieed Function names + +Sun Jul 23 00:28:09 2000 Joerg Schilling + * scsitransp.h 1.31 + open_scsi()/close_scsi()/... -> scg_open()/scg_close/... + +Thu Jul 20 20:12:42 2000 Joerg Schilling + * cdrecord.1 1.51 + Note for Volmgt & Solaris/USCSI + +*************** Release 1.9 ******************* + +Thu Jul 20 19:49:20 2000 joerg + * diskid.c 1.28 + New Manufacturer: "Grand Advance Technology LTD." + +Thu Jul 20 19:12:01 2000 Joerg Schilling + * cdrecord.c 1.105 + Version -> 1.9 + 99 Minute check better + +Mon Jul 3 01:19:21 2000 Joerg Schilling + * scsi-linux-sg.c 1.52 + Type fixed in !scglocal(scgp)->drvers < 0 + +Mon Jul 3 00:11:20 2000 Joerg Schilling + * scsi_cdr.c 1.93 + * drv_sony.c 1.41 + * drv_dvd.c 1.47 + * drv_mmc.c 1.56 + * cdrecord.h 1.62 + * cd_misc.c 1.8 + msf_to_lba() with force_positive Flag for 99 Minute CD's + +Sun Jul 2 23:22:00 2000 Joerg Schilling + * scsi-linux-sg.c 1.51 + scsi_raisedma() only for Kernel-2.2.10 and newer + +Sat Jul 1 13:40:49 2000 Joerg Schilling + * scsi-linux-sg.c 1.50 + New allocated copy buffer in SCSI * -> local for raisedma + +Sat Jul 1 13:22:49 2000 Joerg Schilling + * scsitransp.c 1.53 + * scsi-wnt.c 1.19 + * scsi-vms.c 1.18 + * scsi-unixware.c 1.14 + * scsi-sgi.c 1.23 + * scsi-osf.c 1.14 + * scsi-os2.c 1.14 + * scsi-next.c 1.20 + * scsi-linux-sg.c 1.49 + * scsi-linux-pg.c 1.27 + * scsi-hpux.c 1.20 + * scsi-bsd.c 1.31 + * scsi-bsd-os.c 1.17 + * scsi-beos.c 1.11 + * scsi-aix.c 1.22 + maxdma/maxbuf new in SCSI * + scsi_getbuf() now calls scsi_bufsize() to init new members + +Sat Jul 1 13:09:43 2000 Joerg Schilling + * scsitransp.h 1.30 + maxdma/maxbuf new in SCSI * + +Fri Jun 30 18:43:43 2000 Joerg Schilling + * scsi-linux-sg.c 1.48 + scsi_raisedma() now called with correct DMA Buffersize + +Fri Jun 30 18:38:48 2000 Joerg Schilling + * scsitransp.c 1.52 + * scsihack.c 1.28 + * scsi-wnt.c 1.18 + * scsi-vms.c 1.17 + * scsi-unixware.c 1.13 + * scsi-sgi.c 1.22 + * scsi-sco.c 1.14 + * scsi-osf.c 1.13 + * scsi-os2.c 1.13 + * scsi-next.c 1.19 + * scsi-linux-sg.c 1.47 + * scsi-hpux.c 1.19 + * scsi-linux-pg.c 1.26 + * scsi-bsd.c 1.30 + * scsi-beos.c 1.10 + * scsi-bsd-os.c 1.16 + * scsi-aix.c 1.21 + scsi_maxdma() now with 2nd Parameter "amt" for Linux sg driver + +Tue Jun 27 19:29:05 2000 Joerg Schilling + * drv_mmc.c 1.55 + Disk Subtype decoder for High Speed RW + +Tue Jun 27 19:19:51 2000 Joerg Schilling + * cdrecord.c 1.104 + Support for 99 Minute CD's + +Tue Jun 27 19:17:16 2000 Joerg Schilling + * diskid.c 1.27 + 99 Minute media in table + +Mon Jun 26 22:40:39 2000 Joerg Schilling + * diskid.c 1.26 + Bestdisc Technology Corporation new + +Mon Jun 26 22:29:17 2000 Joerg Schilling + * scsi-bsd.c 1.29 + * scsi-bsd-os.c 1.15 + * scsi-sgi.c 1.21 + * scsi-linux-sg.c 1.46 + * scsi-linux-pg.c 1.25 + * scsi-next.c 1.18 + better error messages into scgp->errstr + +Fri Jun 23 23:52:39 2000 Joerg Schilling + * scsi-linux-sg.c 1.45 + pvers && isold -> scglocal + +Fri Jun 23 23:23:33 2000 Joerg Schilling + * scsi-linux-sg.c 1.44 + Variable pvers only conditional for unused... warning + +Fri Jun 23 23:19:00 2000 Joerg Schilling + * scsi-linux-sg.c 1.43 + Support for SG_IO ioctl() + +Fri Jun 23 21:40:38 2000 Joerg Schilling + * scsitransp.h 1.29 + overbose new + +Thu Jun 22 15:20:18 2000 Joerg Schilling + * scsi-linux-sg.c 1.42 + SG_SCSI_RESET & SG_SET_RESERVED_SIZE new + +Wed Jun 21 10:34:52 2000 Joerg Schilling + * scsi-linux-pg.c 1.24 + Test with ATAPI SCSI status code + +Wed Jun 21 10:33:31 2000 Joerg Schilling + * scsitransp.c 1.51 + scsitransp.c split into scsitransp.c & scsi-sun.c + +Wed Jun 21 10:27:11 2000 Joerg Schilling + * scsihack.c 1.27 + scsi-sun.c new + +Tue Jun 20 07:20:40 2000 Joerg Schilling + * scsitransp.h 1.28 + secured _SCGIO_H -> _SCG_SCSISENSE_H + +Tue Jun 20 06:09:57 2000 Joerg Schilling + * scsi-bsd.c 1.28 + ATAPI Support for OpenBSD + +Sun Jun 4 00:55:02 2000 Joerg Schilling + * cdrecord.c 1.103 + #include for select() (autoconf Test for AIX), version -> 1.9a02 + +Sat Jun 3 17:31:06 2000 Joerg Schilling + * cdrecord.c 1.102 + New Option -shorttrack/-noshorttrack + +Fri Jun 2 22:37:51 2000 Joerg Schilling + * cdrecord.h 1.61 + New Flag TI_SHORT_TRACK & is_shorttrk() macro + +Fri Jun 2 22:32:59 2000 Joerg Schilling + * cdrecord.1 1.50 + New Optionen -shorttrack & -noshorttrack + +Fri Jun 2 21:44:43 2000 Joerg Schilling + * defaults.c 1.5 + Prevent a buffer overrrun with dev= option + +Fri Jun 2 21:43:16 2000 Joerg Schilling + * auinfo.c 1.5 + Check for buffer ovverun + +Fri Jun 2 00:03:13 2000 Joerg Schilling + * drv_mmc.c 1.54 + Set Pregapsize to 1 if the drive does not support 0 + free(cue) if cuep == NULL + +Tue May 30 02:46:22 2000 Joerg Schilling + * diskid.c 1.25 + Restructured + +Tue May 30 01:06:32 2000 Joerg Schilling + * diskid.c 1.24 + New manufacturers: "WEALTH FAIR INVESTMENT LIMITE", "General Magnetics Ld", "MPO" + +Tue May 30 00:59:12 2000 Joerg Schilling + * scsitransp.h 1.27 + debug Parameter -> odebug + +Mon May 29 19:07:56 2000 Joerg Schilling + * scsi-next.c 1.17 + Typo corrected max_scsibus -> scglocal(scgp)->max_scsibus + +Mon May 29 00:31:18 2000 Joerg Schilling + * scsireg.h 1.20 + Mode page 2A pw_in_lead_in & side_change new + +Mon May 29 00:13:25 2000 Joerg Schilling + * scsi_cdr.c 1.92 + More Page 2A bits for cdrecord -prcap + +Sun May 28 18:52:11 2000 Joerg Schilling + * scsi-vms.c 1.16 + scsi_close() now works + +Sun May 28 18:40:55 2000 Joerg Schilling + * cdrecord.1 1.49 + -fix hint for CDR-50 & CDR-55 specified + +Sun May 7 16:52:20 2000 Joerg Schilling + * scsi_cdr.c 1.91 + * scsilog.c 1.10 + * scsi_scan.c 1.8 + * auinfo.c 1.4 + * cd_misc.c 1.7 + * audiosize.c 1.14 + * cdr_drv.c 1.20 + * fifo.c 1.22 + * defaults.c 1.4 + * wm_packet.c 1.12 + * modes.c 1.14 + * cdrecord.c 1.101 + * drv_sony.c 1.40 + * drv_simul.c 1.15 + * drv_philips.c 1.37 + * drv_mmc.c 1.53 + * drv_jvc.c 1.50 + * drv_dvd.c 1.46 + * scsierrs.c 2.22 + * scsitransp.c 1.50 + #include + +Sun May 7 16:46:39 2000 Joerg Schilling + * scsi_cdr.c 1.90 + New DVD recognition, to allow Ricoh 9060 + +Sun May 7 16:11:09 2000 Joerg Schilling + * scsihack.c 1.26 + Support for new Mac OS X + +Mon May 1 20:06:37 2000 Joerg Schilling + * scsitransp.c 1.49 + scsi_maxmdma() cleaned up + +Thu Apr 27 15:06:42 2000 Joerg Schilling + * cdrecord.1 1.48 + Examples for cdda2wav + +Thu Apr 27 14:22:19 2000 Joerg Schilling + * drv_mmc.c 1.52 + No more error message forSony & long write in progress when Fixating + +Thu Apr 27 14:17:01 2000 Joerg Schilling + * diskid.c 1.23 + Better message for illegal ID (CD-RW) + all old CD-R's now print ILLEGAL OLD CODE + +Wed Apr 26 11:50:19 2000 Joerg Schilling + * cdrecord.c 1.100 + * cdrecord.h 1.60 + * scsi_cdr.c 1.89 + * drv_jvc.c 1.49 + * drv_dvd.c 1.45 + scsi_close_tr_session()/scsi_blank() with immed Parameter + +*************** Release 1.8.1 ******************* + +Thu Apr 27 14:22:19 2000 Joerg Schilling + * drv_mmc.c 1.52 + No error message for Sony & long write in progress while fixating + +Thu Apr 27 14:17:01 2000 Joerg Schilling + * diskid.c 1.23 + Better printout with illegal ID for CD-RW, all old CD-R's now give ILLEGAL OLD CODE + +Wed Apr 26 11:50:19 2000 Joerg Schilling + * cdrecord.c 1.100 + * cdrecord.h 1.60 + * scsi_cdr.c 1.89 + * drv_jvc.c 1.49 + * drv_dvd.c 1.45 + scsi_close_tr_session()/scsi_blank() with immed Parameter + +Mon Apr 24 12:32:14 2000 Joerg Schilling + * cdrecord.c 1.99 + Version -> 1.8.1 final, exitcode == 0 only if fixating in Dummy Mode fails + +Sat Apr 22 15:37:05 2000 Joerg Schilling + * diskid.c 1.22 + New manufacturer "VICTOR COMPANY OF JAPAN, LIMITED", "VIVASTAR AG" + +Sun Apr 16 17:07:55 2000 Joerg Schilling + * cdrecord.1 1.47 + BURN-Proof Option for Sanyo + +Sun Apr 16 17:07:11 2000 Joerg Schilling + * drv_mmc.c 1.51 + BURN-Proof Support for Sanyo + +Sun Apr 16 17:06:30 2000 Joerg Schilling + * cdrecord.c 1.98 + New Option driveropts= + better -dao usage + +Sun Apr 16 03:11:26 2000 Joerg Schilling + * scsi_cdr.c 1.88 + display BURN-Proof for cdrecord -prcap + +Sun Apr 16 03:08:58 2000 Joerg Schilling + * defaults.c 1.3 + * cdrecord.dfl 1.2 + driveropts new + +Sun Apr 16 02:16:29 2000 Joerg Schilling + * drv_sony.c 1.39 + * cdrecord.h 1.59 + * drv_simul.c 1.14 + * drv_philips.c 1.36 + * drv_jvc.c 1.48 + * drv_dvd.c 1.44 + open_session() now with cdr_t * Parameter for BURN-Proof + +Mon Apr 3 21:05:37 2000 Joerg Schilling + * scsi-linux-pg.c 1.23 + #include for strlen() + +Sat Apr 1 21:59:19 2000 Joerg Schilling + * diskid.c 1.21 + New manufaturer: "TAROKO INTERNATIONAL CO.,LTD.", "UNIDISC TECHNOLOGY CO.,LTD", "Hong Kong Digital Technology Co., Ltd.", "VIVA MAGNETICS LIMITED" + +Sat Mar 11 12:31:09 2000 Joerg Schilling + * scsi_cdr.c 1.87 + Sanyo CRD-R24S -> Philips CDD 521 + +Sat Mar 11 12:30:06 2000 Joerg Schilling + * drv_mmc.c 1.50 + send_opc_mmc() now calls send_opc() and suppresses ILLEGAL_REQUEST + +Sat Mar 11 12:26:37 2000 Joerg Schilling + * cdrecord.1 1.46 + WeB address changed + +Sun Feb 20 21:54:33 2000 Joerg Schilling + * cdrecord.h 1.58 + * cdrecord.c 1.97 + * cdrecord.1 1.45 + New Option -waiti for multi session from Pipe from mkisofs + +Sun Feb 20 20:56:09 2000 Joerg Schilling + * cdrecord.c 1.96 + scsi_in_progress() Test and usleep(100000) if Long Write in Progress + +Sun Feb 20 20:54:06 2000 Joerg Schilling + * drv_mmc.c 1.49 + scsi_in_progress() test for scsi_flush_cache() in fixate, send_cue() -> LOCAL + +Sun Feb 20 20:52:49 2000 Joerg Schilling + * cdrecord.h 1.57 + scsi_in_progress() new, send_cue() removed + +Sun Feb 20 20:52:15 2000 Joerg Schilling + * scsi_cdr.c 1.86 + scsi_in_progress() new + +Sat Feb 19 00:38:35 2000 Joerg Schilling + * cdrecord.c 1.95 + read Sectorsize from read_capacity too, for drivs without Blockdescriptor, dp->cdr_opc() new + +Sat Feb 19 00:33:54 2000 Joerg Schilling + * scsi_cdr.c 1.85 + send_opc() new + +Sat Feb 19 00:24:37 2000 Joerg Schilling + * cdrecord.h 1.56 + * drv_sony.c 1.38 + * drv_simul.c 1.13 + * drv_philips.c 1.35 + * drv_mmc.c 1.48 + * drv_jvc.c 1.47 + * drv_dvd.c 1.43 + Separate OPC code in driver interface + +Sun Feb 6 08:27:21 2000 Joerg Schilling + * scsi-sgi.c 1.20 + * scsi-openserver.c 1.17 + * scsi-linux-sg.c 1.41 + * scsi-aix.c 1.20 + * scsi-bsd-os.c 1.14 + * scsi-hpux.c 1.18 + * scsi-linux-pg.c 1.22 + * scsi-bsd.c 1.27 + added missing brackets in scsi_close() to make sure that scsi_close() really closes files + +Sun Feb 6 08:25:14 2000 Joerg Schilling + * scsi-linux-sg.c 1.40 + Maxdma now is correcteven if only a prallel port is present + +*************** Release 1.8 ******************* + +Fri Jan 28 10:01:48 2000 Joerg Schilling + * drv_mmc.c 1.47 + * drv_dvd.c 1.42 + load_media() with new doexit Parameter + Reload now does not make problems with notebook type drives + +Fri Jan 28 09:51:26 2000 Joerg Schilling + * drv_philips.c 1.34 + * cdrecord.h 1.55 + * cdrecord.c 1.94 + load_media() with new doexit Parameter + +Fri Jan 28 09:50:51 2000 Joerg Schilling + * scsi_cdr.c 1.84 + wait_unit_ready() does not print error message if scgp->silent >= 1 + +Wed Jan 26 11:48:08 2000 Joerg Schilling + * scsi_scan.c 1.7 + Initiator-ID test past havebus() + +Sun Jan 23 16:39:01 2000 Joerg Schilling + * cdrecord.c 1.93 + Better error message for open_scsi() + +Sun Jan 23 16:07:46 2000 Joerg Schilling + * scsi-unixware.c 1.9 + New code from SCO, -scanbus now works + +Sun Jan 23 00:44:28 2000 Joerg Schilling + * scsihack.c 1.25 + scsi-sco.c -> scsi-openserver.c + +Tue Jan 18 00:02:33 2000 Joerg Schilling + * cdrecord.c 1.92 + Version -> 1.8, mlockall()/setpri() problems do not cause abort + Note to -pad option for audio Files with wrong length + #include for SCO Openserver + +Thu Jan 13 01:32:35 2000 Joerg Schilling + * diskid.c 1.20 + Problems with m_digitalstor (97:27/01) in table docuented + +Thu Jan 13 01:11:45 2000 Joerg Schilling + * defaults.c 1.2 + CDR_DEVICE now superseedes /etc/default/cdrecord + +Tue Jan 11 01:46:47 2000 Joerg Schilling + * scsi-hpux.c 1.17 + sprintf(.../dev/rscsi...) now uses hex digits for tgt 0..15 + +Sat Jan 8 23:42:25 2000 Joerg Schilling + * scsi_cdr.c 1.83 + scsi_read() now looks for is_atapi to allow mkisofs & ATAPI to do multi-session + +Fri Jan 7 02:24:28 2000 Joerg Schilling + * scsihack.c 1.24 + Dummyfunctions fuor new Interface + +Fri Jan 7 02:22:36 2000 Joerg Schilling + * cdr_drv.c 1.19 + set_cdrcmds() now calls return() past exit() for lint's sake + +Wed Dec 29 14:01:03 1999 Joerg Schilling + * cdrecord.c 1.91 + exargs Strukt new + Setting to 2048 bytes/sector earlier for -msinfo + new function exscsi() + exfifo() -> excdr() + +Wed Dec 29 02:14:11 1999 Joerg Schilling + * cdrecord.h 1.54 + * fifo.c 1.21 + wait_faio() new + +Wed Dec 29 00:38:52 1999 Joerg Schilling + * diskid.c 1.19 + New manufacturer: "Hile Optical Disc Technology Corp." + "Friendly CD-Tek Co." + "Sound Sound Multi-Media Development Limited" + "kdg mediatech AG" + +Wed Dec 29 00:34:39 1999 Joerg Schilling + * cdrecord.1 1.44 + better dociumentation for SUID Installation + +Fri Dec 24 01:59:35 1999 Joerg Schilling + * fifo.c 1.20 + sp null pointer Problem in fifo_stats() fixed + input-buffer -> input buffer + +Tue Dec 7 01:07:24 1999 Joerg Schilling + * cdrecord.1 1.43 + added missing .TP + +Sun Dec 5 13:37:16 1999 Joerg Schilling + * fifo.c 1.19 + kill_fifo() now kil only if faio_pid > 0 + +Sat Dec 4 21:36:38 1999 Joerg Schilling + * diskid.c 1.18 + New manufacturer: EXIMPO & Seantram Technology Inc. + Seantram has been guessed before + +Sat Dec 4 14:15:16 1999 Joerg Schilling + * cdrecord.c 1.90 + intfifo()/exfifo() new + kill FIFO on comerr() and signals + +Sat Dec 4 14:12:41 1999 Joerg Schilling + * drv_dvd.c 1.41 + isgui as with drv_mmc.c added + +Tue Nov 30 14:48:12 1999 Joerg Schilling + * scsihack.c 1.23 + * scsi-linux-pg.c 1.21 + pg.h now locally available + +Sat Nov 27 21:38:54 1999 Joerg Schilling + * scsi-os2.c 1.12 + SRB in scsi_send() and scsi_reset() -> static to prevent core dump + +Sat Nov 20 17:49:38 1999 Joerg Schilling + * scsi-os2.c 1.11 + scgfiles array removed + set_error() new + added some ux_errno = EIO + wait_post() now calls DosResetEventSem() in any case + +Sat Nov 20 14:21:09 1999 Joerg Schilling + * scsi-os2.c 1.10 + DEBUG2/SCANDEBUG code removed + +Sat Nov 20 07:23:59 1999 Joerg Schilling + * diskid.c 1.17 + New manufacturer: Customer Pressing Oosterhout + Harmonic Hall Optical Disc Ltd. + DELPHI TECHNOLOGY INC. + +Sat Nov 20 06:45:18 1999 Joerg Schilling + * cdrecord.c 1.89 + Version -> 1.8a32 + 5 missing set_secsize(.. oldsize) added + +Sat Nov 20 06:44:02 1999 Joerg Schilling + * cdr_drv.c 1.18 + Kodak PDC-600 in driver recognition + +Sat Nov 20 06:43:12 1999 Joerg Schilling + * drv_mmc.c 1.46 + next_wr_addr() in driver struct for CD-ROM -> cmd_ill() + +Sat Nov 20 06:41:39 1999 Joerg Schilling + * fifo.c 1.18 + fixed typo for HAVE_DOSALLOCSHAREDMEM + +Fri Nov 12 10:00:19 1999 Joerg Schilling + * scsitransp.c 1.48 + scsi_yes() now global + +Fri Nov 12 09:59:49 1999 Joerg Schilling + * scsitransp.h 1.26 + scsi_yes() new + +Mon Oct 18 02:38:11 1999 Joerg Schilling + * cdrecord.c 1.88 + always set TAO mode on startup to make checkdsize() working + +Mon Oct 18 01:34:34 1999 Joerg Schilling + * scsilog.c 1.9 + * scsi_cdr.c 1.82 + i_to_short() -> i_to_2_byte() + +Mon Oct 18 01:15:21 1999 Joerg Schilling + * scsilog.c 1.8 + * scsi_cdr.c 1.81 + * drv_dvd.c 1.40 + * drv_mmc.c 1.45 + * drv_philips.c 1.33 + * iso9660.h 1.4 + a_to_u_short() -> a_to_u_2_byte() + +Mon Oct 18 01:04:17 1999 Joerg Schilling + * isosize.c 1.6 + utypes.h wegen intcvt.h + +Mon Oct 18 00:38:01 1999 Joerg Schilling + * scsi_cdr.c 1.80 + * drv_sony.c 1.37 + * drv_jvc.c 1.46 + * drv_dvd.c 1.39 + a_to_3_byte() -> a_to_u_3_byte() + +Mon Oct 18 00:10:18 1999 Joerg Schilling + * drv_dvd.c 1.38 + * drv_sony.c 1.36 + * drv_jvc.c 1.45 + * drv_philips.c 1.32 + i_to_long() -> i_to_4_byte() + +Mon Oct 18 00:04:43 1999 Joerg Schilling + * scsi_cdr.c 1.79 + * isosize.c 1.5 + * drv_dvd.c 1.37 + * drv_mmc.c 1.44 + * drv_jvc.c 1.44 + * drv_sony.c 1.35 + * drv_philips.c 1.31 + * audiosize.c 1.13 + * cdrecord.c 1.87 + modified to use intcvt.h and a_to_4_byte() + +Sun Oct 17 23:21:40 1999 Joerg Schilling + * iso9660.h 1.3 + removed i_to_* and a_to_* macros -> intcvt.h + +Sun Oct 17 22:51:51 1999 Joerg Schilling + * scsireg.h 1.19 + struct scsi_capacity modified to use Int32_t + +Sat Oct 16 13:52:29 1999 Joerg Schilling + * scsi_cdr.c 1.78 + * drv_mmc.c 1.43 + * auinfo.c 1.3 + * drv_sony.c 1.34 + malloc() casts for K&R C + +Fri Oct 15 20:28:25 1999 Joerg Schilling + * cdrecord.h 1.53 + * cdr_drv.c 1.17 + * cdrecord.c 1.86 + set_cdrmds() if 2. Parameter is NULL returns BOOL + for cdrecord to check for dvd driver or not + +Fri Oct 15 20:19:36 1999 Joerg Schilling + * scsi_cdr.c 1.77 + Optima Dis Covery 650 CD-R Inquiry recognition new + +Fri Oct 15 20:17:17 1999 Joerg Schilling + * scsi-beos.c 1.9 + * scsi-osf.c 1.12 + typos removed + +Thu Oct 7 15:33:17 1999 Joerg Schilling + * scsi-bsd-os.c 1.13 + * scsi-aix.c 1.19 + mising bracket in scsi_open() fixed + +Fri Sep 17 17:59:18 1999 Joerg Schilling + * cdrecord.c 1.85 + Version -> 1.8a29 + libscg version check + #incude for win32 realtime pri Code + +Fri Sep 17 17:56:57 1999 Joerg Schilling + * scsi_cdr.c 1.76 + endless lookp in mmc_cap() removed: no medium (wait_unit_ready()) + +Fri Sep 17 15:48:09 1999 Joerg Schilling + * scsitransp.c 1.47 + HAVE_SCG #define earlier + +Fri Sep 17 15:42:39 1999 Joerg Schilling + * scsi-linux-pg.c 1.20 + duplicates with scsi-linux-sg.c fuer scg__version() removed + +Fri Sep 17 15:36:55 1999 Joerg Schilling + * scsitransp.c 1.46 + #ifdef HAVE_SCG for _scg_trans_version[] + +Fri Sep 17 15:09:54 1999 Joerg Schilling + * scsi-wnt.c 1.17 + * scsi-vms.c 1.15 + * scsi-unixware.c 1.8 + * scsi-sgi.c 1.19 + * scsi-osf.c 1.11 + * scsi-sco.c 1.13 + * scsi-os2.c 1.9 + * scsi-next.c 1.16 + * scsi-linux-sg.c 1.39 + * scsi-linux-pg.c 1.19 + * scsi-hpux.c 1.16 + * scsi-bsd.c 1.26 + * scsi-bsd-os.c 1.12 + * scsi-beos.c 1.8 + * scsi-aix.c 1.18 + * scsitransp.c 1.45 + * scsitransp.h 1.25 + scg_version() new + +Fri Sep 17 14:55:17 1999 Joerg Schilling + * scsihack.c 1.22 + Comment changed + +Tue Sep 14 10:57:29 1999 Joerg Schilling + * scsi-linux-sg.c 1.38 + scgfile variable in max_dma corrected from scgfile -> scglocal(scgp)->scgfile + +Fri Sep 10 14:06:19 1999 Joerg Schilling + * diskid.c 1.16 + Better text for Disk Typ (e.g. Long strategy type) + +Thu Sep 9 12:30:38 1999 Joerg Schilling + * auinfo.c 1.2 + isrc_illchar() Prorotype new + +Wed Sep 8 17:57:45 1999 Joerg Schilling + * diskid.c 1.15 + New manufacturer: Guann Yinn Co. Ltd. + Opti.Me.S. S.p.A. + Nacar Media srl + +Wed Sep 8 12:45:37 1999 Joerg Schilling + * scsi-wnt.c 1.16 + missing bracket at malloc(amt) + +Tue Sep 7 17:13:09 1999 Joerg Schilling + * scsi-wnt.c 1.15 + * scsi-unixware.c 1.7 + * scsi-vms.c 1.14 + * scsi-sgi.c 1.18 + * scsi-sco.c 1.12 + * scsi-osf.c 1.10 + * scsi-next.c 1.15 + * scsi-os2.c 1.8 + * scsi-linux-sg.c 1.37 + * scsi-linux-pg.c 1.18 + * scsi-hpux.c 1.15 + * scsi-bsd.c 1.25 + * scsi-beos.c 1.7 + * scsi-bsd-os.c 1.11 + * scsi-aix.c 1.17 + * scsitransp.c 1.44 + First error messages past scgp->errstr + less calls to comerr() + +Tue Sep 7 17:07:55 1999 Joerg Schilling + * scsitransp.h 1.24 + errstr & errptr new in SCSI * + open_scsi() with errs Parameter + +Tue Sep 7 16:47:21 1999 Joerg Schilling + * cdrecord.c 1.84 + Now using new open_scsi() + added some calls to flush() + +Tue Sep 7 16:46:04 1999 Joerg Schilling + * cdrecord.1 1.42 + 1.6 -> 1.8 + +Tue Sep 7 00:21:08 1999 Joerg Schilling + * drv_mmc.c 1.42 + * drv_jvc.c 1.43 + * drv_dvd.c 1.36 + flush() for Blanking new + +Fri Sep 3 11:57:35 1999 Joerg Schilling + * scsi-linux-sg.c 1.36 + * scsi-linux-pg.c 1.17 + scsi_initiator_id() in scsi-linux-pg.c -> pg_initiator_id() + +Thu Sep 2 18:57:59 1999 Joerg Schilling + * cdrecord.c 1.83 + 1.8a24 -> 1.8a26 + Ricoh DAO Bug (fwa != -150) workaround + Realtimepri for Win32 + +Thu Sep 2 14:42:14 1999 Joerg Schilling + * scsi_scan.c 1.6 + scsi_initiator_id() new + Now prints bus,tgt,lun before selektor + +Thu Sep 2 13:32:57 1999 Joerg Schilling + * scsitransp.h 1.23 + * scsi-wnt.c 1.14 + * scsi-vms.c 1.13 + * scsi-unixware.c 1.6 + * scsi-sco.c 1.11 + * scsi-sgi.c 1.17 + * scsi-osf.c 1.9 + * scsi-os2.c 1.7 + * scsi-next.c 1.14 + * scsi-linux-sg.c 1.35 + * scsi-hpux.c 1.14 + * scsi-linux-pg.c 1.16 + * scsi-bsd.c 1.24 + * scsi-bsd-os.c 1.10 + * scsi-aix.c 1.16 + * scsi-beos.c 1.6 + * scsitransp.c 1.43 + scsi_initiator_id() new + +Mon Aug 30 13:36:17 1999 Joerg Schilling + * scsitransp.c 1.42 + * drv_simul.c 1.12 + * fifo.c 1.17 + #include libport.h new + +Sun Aug 29 01:42:10 1999 Joerg Schilling + * fifo.c 1.16 + shared memory for OS/2 + +Sun Aug 29 00:52:56 1999 Joerg Schilling + * fifo.c 1.15 + Typo fixed (\f instead of \n) + +Tue Aug 10 21:34:03 1999 Joerg Schilling + * scsitransp.c 1.41 + * scsi-wnt.c 1.13 + * scsi-vms.c 1.12 + * scsi-unixware.c 1.5 + * scsi-sco.c 1.10 + * scsi-sgi.c 1.16 + * scsi-osf.c 1.8 + * scsi-os2.c 1.6 + * scsi-next.c 1.13 + * scsi-linux-sg.c 1.34 + * scsi-linux-pg.c 1.15 + * scsi-hpux.c 1.13 + * scsi-bsd.c 1.23 + * scsi-bsd-os.c 1.9 + * scsi-beos.c 1.5 + * scsi-aix.c 1.15 + Static locale variable removed + Test for openbydev + scsi_freebuf() new + +Mon Aug 9 00:39:37 1999 Joerg Schilling + * scsitransp.h 1.22 + SCSI *->bufbase & scsi_freebuf() new + +Sat Aug 7 22:24:46 1999 Joerg Schilling + * scsitransp.h 1.21 + running/curcmdname/local new in SCSI * + +Sat Aug 7 22:22:36 1999 Joerg Schilling + * scsitransp.c 1.40 + * scsi-wnt.c 1.12 + * scsi-vms.c 1.11 + * scsi-unixware.c 1.4 + * scsi-sgi.c 1.15 + * scsi-sco.c 1.9 + * scsi-osf.c 1.7 + * scsi-os2.c 1.5 + * scsi-next.c 1.12 + * scsi-linux-sg.c 1.33 + * scsi-linux-pg.c 1.14 + * scsi-hpux.c 1.12 + * scsi-bsd.c 1.22 + * scsi-bsd-os.c 1.8 + * scsi-beos.c 1.4 + * scsi-aix.c 1.14 + scg_maxdma removed + scsi_running/scsi_command -> SCSI * struct + +Sat Aug 7 21:05:51 1999 Joerg Schilling + * scsi-vms.c 1.10 + scsi_close() new + +Sun Aug 1 22:08:46 1999 Joerg Schilling + * fifo.c 1.14 + WRITER_MAXWAIT & READER_MAXWAIT -> 240s for SAO SCSI Timeout + usleep() debug code + +Sun Aug 1 17:14:54 1999 Joerg Schilling + * cdrecord.1 1.41 + Better documentation for -multi Option (DAO mode) + +Sun Aug 1 17:05:30 1999 Joerg Schilling + * cdrecord.c 1.82 + -msinfo now works even if drive is in DAO mode + Now corrects trackstart values for second session in DAO Mode + +Sun Aug 1 16:51:35 1999 Joerg Schilling + * drv_sony.c 1.33 + * drv_simul.c 1.11 + * drv_philips.c 1.30 + * drv_mmc.c 1.41 + * drv_jvc.c 1.42 + * drv_dvd.c 1.35 + speedp == 0 allowed if speed should remain as is + +Sun Aug 1 16:10:40 1999 Joerg Schilling + * drv_sony.c 1.32 + * drv_simul.c 1.10 + * drv_mmc.c 1.40 + * drv_jvc.c 1.41 + * drv_dvd.c 1.34 + recovery_needed()/recover()/reserve_track() References to Philips driver removed + +Sun Aug 1 16:02:03 1999 Joerg Schilling + * drv_philips.c 1.29 + * scsi_cdr.c 1.75 + * cdr_drv.c 1.16 + * cdrecord.h 1.52 + Several functions scsi_cdr.c -> drv_philips.c + new function cmd_ill() + +Sun Aug 1 13:25:42 1999 Joerg Schilling + * drv_dvd.c 1.33 + phys_end in dvd_structure_00 may be 0 for empty session + +Sun Jul 25 13:52:02 1999 Joerg Schilling + * scsitransp.c 1.39 + scsi_close() new + __scgp removed + +Sun Jul 25 13:36:47 1999 Joerg Schilling + * scsi-wnt.c 1.11 + * scsi-unixware.c 1.3 + * scsi-sgi.c 1.14 + * scsi-osf.c 1.6 + * scsi-sco.c 1.8 + * scsi-os2.c 1.4 + * scsi-next.c 1.11 + * scsi-linux-sg.c 1.32 + * scsi-linux-pg.c 1.13 + * scsi-hpux.c 1.11 + * scsi-bsd.c 1.21 + * scsi-bsd-os.c 1.7 + * scsi-beos.c 1.3 + * scsi-aix.c 1.13 + scsi_close() new + +Sun Jul 25 00:50:18 1999 Joerg Schilling + * scsitransp.h 1.20 + close_scsi() and scsi_smalloc()/scsi_sfree() new + +Sat Jul 24 22:26:22 1999 Joerg Schilling + * scsitransp.h 1.19 + scsi_close() new + +Sat Jul 24 22:25:39 1999 Joerg Schilling + * scsi-vms.c 1.9 + last changes fro Mr. Heuser + Max Timeout corrected + +Sat Jul 24 22:22:44 1999 Joerg Schilling + * scsi-next.c 1.10 + Kernel Driver is in undefined state if SCSI Bus is not valid -> bugfix & debug prints + +Sat Jul 24 20:43:47 1999 Joerg Schilling + * drv_mmc.c 1.39 + from BCD converson (debug) for Ricoh test + Trying to suppress error messages for newer MITSUMI ATAPI drives + +Sat Jul 24 19:27:06 1999 Joerg Schilling + * cdrecord.1 1.40 + Better documentation for -pad/padsize= + +Sat Jul 24 19:25:34 1999 Joerg Schilling + * diskid.c 1.14 + New manufacturer: OPTROM + AUDIO DISTRIBUTORS + Acer Media Technology + +Sat Jul 24 19:23:49 1999 Joerg Schilling + * cdrecord.c 1.81 + -> 1.8a24 & write_buf() Test Code + +Sat Jul 24 19:19:22 1999 Joerg Schilling + * cdrecord.c 1.80 + Check HAVE_SETPRIORITY and HAVE_NICE + +Sat Jul 24 19:17:30 1999 Joerg Schilling + * cdrecord.c 1.79 + Version -> 1.8a23 + Signalhandler for wait time before burning + O_BINARY define for win32 + setmode(TDIN, O_BINARY) for win32 + track[] Array now MAX_TRACKS+2 + Print Drive Buffer size and FIFO size + -force Flag to blank problematic CD-RW's + set sector size to 2k before burning for Plextor + set_speed...() now with speedp Parameter to allow MMC to send back actual values + DAO for MMC + new Options -atip/-useinfo/-force/-dao/mcn=text/isrc=text/index=list + first Test for continuous Drive buffer cap printouts + set_secsize() new (for Plextor & DAO) + EMX Wildcard expansion for OS/2 + Timeout for DAO -> minimal 200s + print_toc() \ removed for K&R C + print_toc() with CD-Text + DosSetPriority() now korrectly doing delta + setpregaps() sets values for lead-in/out + checktsize() checks for DAO + +Sun Jul 18 14:39:31 1999 Joerg Schilling + * cdrecord.h 1.51 + * scsi_cdr.c 1.74 + open_scsi() -> libscg + +Sat Jul 17 15:54:11 1999 Joerg Schilling + * scsitransp.c 1.38 + MAX DMA for Solaris x86 from 32k -> 56k + scsierr() checks for sense[0] != 0 + scsi_sense_{key!code!qual} return 0 if scsierr() == FALSE + +Sat Jul 17 15:37:00 1999 Joerg Schilling + * scsitransp.h 1.18 + open_scsi() for scsiopen.c new + +Mon Jun 28 01:11:18 1999 Joerg Schilling + * scsi-linux-pg.c 1.12 + set CDB to 0 past cdb_len + +Sun Jun 6 19:41:11 1999 Joerg Schilling + * drv_philips.c 1.28 + CDR_SWABAUDIO for pioneer_dws114x + +Sun Jun 6 19:40:29 1999 Joerg Schilling + * modes.c 1.13 + get_mode_params() now return FALSE if has_mode_page() returns FALSE + +Sun Jun 6 19:39:02 1999 Joerg Schilling + * scsi_cdr.c 1.73 + Hack for NT-4.0 ASPI ISE inquiry fake (bug in add_len) + workaround for Ricoh NOT_READY key in get Mode page 2A + +Thu May 13 16:55:13 1999 Joerg Schilling + * scsi-wnt.c 1.10 + #define for format to avoid hiding messages + Now uses dlopen() + ha_inquiry() new + better paraeters in scsi_open() + SRB_HaID/SRB_HaId unified + +Thu May 13 15:07:36 1999 Joerg Schilling + * scsi_cdr.c 1.72 + check scsi_open() return code for < 0 + +Thu May 13 15:00:48 1999 Joerg Schilling + * modes.c 1.12 + Cast for ANSI C comparison + +Thu May 13 15:00:07 1999 Joerg Schilling + * drv_sony.c 1.31 + Cast for ANSI C + fixed typo in error texts + +Thu May 13 14:31:50 1999 Joerg Schilling + * drv_jvc.c 1.40 + mods for ANSI C comparison + +Thu May 13 14:31:12 1999 Joerg Schilling + * cdrecord.1 1.39 + New Options -atip and index= + +Thu May 13 12:00:58 1999 Joerg Schilling + * scsierrs.c 2.21 + field_ptr now correctly used for progress printing on NOT_READY + +Wed May 12 01:42:18 1999 Joerg Schilling + * scsi-os2.c 1.3 + -scanbus support + +Wed May 12 01:01:54 1999 Joerg Schilling + * drv_philips.c 1.27 + * scsi_cdr.c 1.71 + * cdr_drv.c 1.15 + * scsidefs.h 1.21 + DEV_RICOH_RO_1060C new (preliminary) + +Mon May 3 01:30:22 1999 Joerg Schilling + * scsi-wnt.c 1.9 + changed names and indented + WBOOL definition to distinguish BOOL from Windows.h and BOOL from standard.h + busses new + compare busno with busses + Debug File removed + EventStatus as result of WaitForSingleObject() + set_error() new for correct error codes + scsiabort() new + +Tue Apr 27 23:11:59 1999 Joerg Schilling + * scsi-wnt.c 1.8 + Debug File removed + +Tue Apr 27 21:06:48 1999 Joerg Schilling + * scsi-wnt.c 1.7 + -scanbus now works + file matrix removed + check for nuber of SCSI Busses + +Mon Apr 26 22:37:40 1999 Joerg Schilling + * scsi-wnt.c 1.6 + Try to implement -scanbus + +Mon Apr 26 22:36:00 1999 Joerg Schilling + * scsi-wnt.c 1.5 + sp->u_scb.cmd_scb[0] = s.SRB_Status -> sp->u_scb.cmd_scb[0] = s.SRB_TargStat + error code SCG_FATAL -> SCG_RETRYABLE + +Mon Apr 26 22:35:00 1999 Joerg Schilling + * scsi-wnt.c 1.4 + Indented II + +Mon Apr 26 22:34:15 1999 Joerg Schilling + * scsi-wnt.c 1.3 + Indented + +Mon Apr 26 22:33:41 1999 Joerg Schilling + * scsi-wnt.c 1.2 + Better comment + +Mon Apr 26 22:32:32 1999 Joerg Schilling + * scsi-wnt.c 1.1 + date and time created 99/04/26 21:32:32 by joerg + +Sun Apr 25 09:48:05 1999 Joerg Schilling + * cdrecord.h 1.50 + is_copy()/is_scms() new + TI_COPY/TI_SCMS new + read_subchannel() new + pr_manufacturer()/disk_rcap() with rw/audio Parameters + +Sun Apr 25 09:46:03 1999 Joerg Schilling + * drv_mmc.c 1.38 + clear -dummy status by clearin -dummy state + COPY & SCMS handling + +Sat Apr 24 14:10:19 1999 Joerg Schilling + * diskid.c 1.13 + * drv_mmc.c 1.37 + pr_manufacturer()/disk_rcap() now using rw and audio Parameter + +Sat Apr 24 14:05:48 1999 Joerg Schilling + * drv_philips.c 1.26 + pr_manufacturer()/disk_rcap() now using rw and audio Parameter + Printing of ATIP "restricted" + +Sat Apr 24 14:04:38 1999 Joerg Schilling + * drv_sony.c 1.30 + pr_manufacturer()/disk_rcap() now using rw and audio Parameter + printf() Format (%l..) + +Sat Apr 24 14:02:11 1999 Joerg Schilling + * scsi_cdr.c 1.70 + read_subchannel() new + +Sat Apr 24 13:03:56 1999 Joerg Schilling + * scsihack.c 1.21 + scsi-wnt.c new + +Sun Apr 18 21:04:15 1999 Joerg Schilling + * defaults.c 1.1 + date and time created 99/04/18 20:04:15 by joerg + +Sun Apr 18 19:56:45 1999 Joerg Schilling + * drv_sony.c 1.29 + * drv_simul.c 1.9 + * drv_philips.c 1.25 + * drv_mmc.c 1.36 + * drv_jvc.c 1.39 + * cdr_drv.c 1.14 + * drv_dvd.c 1.32 + * cdrecord.h 1.49 + New driver function cdr_send_cue + +Sun Apr 18 19:28:03 1999 Joerg Schilling + * drv_jvc.c 1.38 + g6 & g7 test functions + +Sun Apr 18 18:40:56 1999 Joerg Schilling + * cdrecord.h 1.48 + index= Option new + +Sun Apr 18 18:40:54 1999 Joerg Schilling + * drv_mmc.c 1.35 + index= Option new + +Sun Apr 18 00:42:59 1999 Joerg Schilling + * cdrecord.h 1.47 + New Flags F_SAO/F_WRITE/F_PREGAP/F_FORCE + isrc in struct track + is_tao()/is_pregap() new + ds_cdrflags in struct disk_status + cdr_buffer_cap in struct cdr_cmd + cdr_set_speed_dummy with *speedp - to allow mmc to return value + Functions for auinfo.c + +Sun Apr 18 00:18:30 1999 Joerg Schilling + * scsi-linux-sg.c 1.31 + MAX_SCG & MAX_TGT -> 16 + Debug function for printing buscookies[] and scgfiles[][][] + sg_mapbus() now with Bus Parameter and spcial handling for holes in buscookies[] + sg_setup() doing range check + better handling of Status byte in extended Code for mk2 Interface + +Sun Apr 18 00:09:52 1999 Joerg Schilling + * scsi-linux-pg.c 1.11 + Search slot for PP Bus backwards, as buscookies[] may have holes + +Sat Apr 17 22:12:22 1999 Joerg Schilling + * drv_jvc.c 1.37 + New Function in Driver table to read Buffer capacity + buf_cap_teac(), read_peak_buffer_cap_teac (), buffer_inquiry_teac(), check_buffer_teac() new + +Sat Apr 17 19:32:41 1999 Joerg Schilling + * scsi_scan.c 1.5 + Enhancements for 16 SCSI busses and 17 Targets/Bus + +Sat Apr 17 19:29:25 1999 Joerg Schilling + * cdr_drv.c 1.13 + buf_dummy() new + New Function in Driver table to read Buffer capacity + +Sat Apr 17 19:28:27 1999 Joerg Schilling + * drv_sony.c 1.28 + * drv_mmc.c 1.34 + * drv_philips.c 1.24 + * drv_simul.c 1.8 + * drv_dvd.c 1.31 + New Function in Driver table to read Buffer capacity + +Sat Apr 17 19:25:47 1999 Joerg Schilling + * drv_sony.c 1.27 + Workaround for CDU 620 (can not read lead-in Start time) + +Sat Apr 17 18:57:36 1999 Joerg Schilling + * scsitransp.c 1.37 + MAX_SCG & MAX_TGT -> 16 + Workaround for /dev/scg if Target > 7 + +Sat Apr 17 18:55:26 1999 Joerg Schilling + * scsi-bsd-os.c 1.6 + * scsi-vms.c 1.8 + * scsi-unixware.c 1.2 + * scsi-sgi.c 1.13 + * scsi-sco.c 1.7 + * scsi-osf.c 1.5 + * scsi-os2.c 1.2 + * scsi-next.c 1.9 + * scsi-hpux.c 1.10 + * scsi-bsd.c 1.20 + * scsi-aix.c 1.12 + MAX_SCG & MAX_TGT -> 16 + +Sat Apr 17 18:47:39 1999 Joerg Schilling + * scsi-next.c 1.8 + scsi_setup() & scsi_havebus() with scgp Pointer (bug) + +Sat Apr 17 17:09:00 1999 Joerg Schilling + * scsitransp.c 1.36 + limit SunOS 4.x maxdma to 64k-1 + +Sat Apr 17 13:14:24 1999 Joerg Schilling + * cdrecord.1 1.38 + -force flag and -useinfo new + +Tue Apr 13 01:29:14 1999 Joerg Schilling + * diskid.c 1.12 + m_seantram Index 28 (typo) -> 83 + +Tue Apr 13 01:06:45 1999 Joerg Schilling + * modes.c 1.11 + Test in has_mode_page() if desired page is really available for JVC 2080 FW Bug + +Fri Apr 9 20:49:08 1999 Joerg Schilling + * drv_jvc.c 1.36 + speed -> *speedp Parameter in speed_select() + +Fri Apr 9 01:03:54 1999 Joerg Schilling + * scsi_cdr.c 1.69 + * drv_dvd.c 1.30 + * audiosize.c 1.12 + Signed/unsiged comparisons with cast + +Fri Apr 9 00:46:07 1999 Joerg Schilling + * scsilog.c 1.7 + cast for comparing unsigned > int + +Fri Apr 9 00:33:17 1999 Joerg Schilling + * scsi_cdr.c 1.68 + read_buff_cap() Ulong -> int + +Fri Apr 9 00:32:35 1999 Joerg Schilling + * diskid.c 1.11 + New manufacturer: "Woongjin Media corp" + "INFODISC Technology Co., Ltd." + "UNITECH JAPAN INC." + "AMS Technology Inc." + +Tue Apr 6 22:08:31 1999 Joerg Schilling + * drv_mmc.c 1.33 + speed -> *speedp Parameter in speed_select() + Read write speed Auslesen and set *speedp + Test for dsp->ds_cdrflags & RF_WRITE + first DAO enhancements + +Tue Apr 6 22:05:25 1999 Joerg Schilling + * scsi_cdr.c 1.67 + speed -> *speedp Parameter IN speed_select() + read_buffer() WITH mode Parameter + scsi_get_speed() new + read_buff_cap() prints Data if sp && fp == NULL and avoids division by 0 + read_cdtext() new + Workaround for Philips CDD-522 cannot do read TOC MSN + +Tue Apr 6 01:15:52 1999 Joerg Schilling + * drv_philips.c 1.23 + speed -> *speedp Parameter in speed_select() + Test for dsp->ds_cdrflags & RF_WRITE + +Tue Apr 6 01:13:14 1999 Joerg Schilling + * drv_sony.c 1.26 + ATIP Support + +Fri Apr 2 16:06:31 1999 Joerg Schilling + * diskid.c 1.10 + "Seantram Technology Inc." new (guess) + +Fri Apr 2 15:50:28 1999 Joerg Schilling + * drv_sony.c 1.25 + * drv_simul.c 1.7 + * drv_dvd.c 1.29 + speed -> *speedp Parameter in speed_select() + +Sun Mar 28 15:31:56 1999 Joerg Schilling + * scsimmc.h 1.4 + struct mmc_cue new + +Sun Mar 28 15:29:43 1999 Joerg Schilling + * cdrecord.1 1.37 + -dao and -audio default for .au & .wav + +Fri Mar 12 02:05:58 1999 Joerg Schilling + * auinfo.c 1.1 + date and time created 99/03/12 02:05:58 by joerg + +Sun Mar 7 22:30:42 1999 Joerg Schilling + * fifo.c 1.13 + roundup(bufsize, pagesize) to make each Segment page aligned + +Wed Mar 3 23:45:20 1999 Joerg Schilling + * diskid.c 1.9 + New manufacturers: vanguard, grandadv, taeil, kingpro, digitalstor + +Wed Mar 3 22:58:38 1999 Joerg Schilling + * diskid.c 1.8 + New RCAP Liste + +Sat Feb 20 00:00:44 1999 Joerg Schilling + * scsi_cdr.c 1.66 + read_buffer() new + timeout for read_toc_philips() -> 240s for TEAC + read_master_cue() new + send_cue_sheet() new + read_buff_cap() new + +Sun Jan 31 22:37:38 1999 Joerg Schilling + * wm_packet.c 1.11 + * cdrecord.c 1.78 + carriage Return to beginning of Track... Strings to make error message not overwrite position + +Sun Jan 31 19:50:01 1999 Joerg Schilling + * cdrecord.c 1.77 + ignore dev= values from /etc/default/cdrecord for -scanbus + +Sun Jan 31 19:23:53 1999 Joerg Schilling + * scsi_cdr.c 1.65 + Suport for ACER CR-4020C + +Sun Jan 31 19:23:05 1999 Joerg Schilling + * drv_philips.c 1.22 + scgp->inq->ansi_version = 1; -> scgp->inq->data_format = 1; to make Plasmon RF-4100 work again + +Sun Jan 31 18:55:45 1999 Joerg Schilling + * cdrecord.1 1.36 + Hint for SVr4 and POSIX Realtime scheduler + +Sun Jan 31 18:49:06 1999 Joerg Schilling + * scsi-bsd.c 1.19 + scsi_maxdma() from MAXPHYS -> DFLTPHYS + +Sat Dec 12 12:36:09 1998 Joerg Schilling + * scsi-beos.c 1.2 + sccsid[] -> __sccsid[] + +Sun Dec 6 13:16:25 1998 Joerg Schilling + * scsi-beos.c 1.1 + date and time created 98/12/06 13:16:25 by joerg + +Sun Dec 6 12:41:50 1998 Joerg Schilling + * scsihack.c 1.20 + BeOS new + +Sun Dec 6 12:41:30 1998 Joerg Schilling + * scsi-vms.c 1.7 + New Version past phone call with vaxinf@CHCLU.CHEMIE.UNI-KONSTANZ.DE + +Sun Dec 6 12:10:54 1998 Joerg Schilling + * cdrecord.1 1.35 + FreeBSD device name bug + New address for Mailing List + Documentation of /etc/default/cdrecord + +Sat Dec 5 13:46:27 1998 Joerg Schilling + * cdrecord.c 1.76 + HAVE_SYS_RESOURCE_H new (BeOS) + 1.8a13 -> 1.8a14 + cdr_defaults() new + +Sat Dec 5 13:38:16 1998 Joerg Schilling + * cdrecord.h 1.46 + default.c/cdr_defaults() new + +Sun Nov 29 19:40:50 1998 Joerg Schilling + * scsi-sco.c 1.6 + cleaned up and permission to use /dev/xxx:target,lun + +Sun Nov 29 19:27:55 1998 Joerg Schilling + * scsidefs.h 1.20 + fused + +Sun Nov 29 19:25:54 1998 Joerg Schilling + * scgio.h 2.14 + Splitted into scgcmd.h and scgio.h + +Sun Nov 29 19:23:33 1998 Joerg Schilling + * scsi-unixware.c 1.1 + date and time created 98/11/29 19:23:33 by joerg + +Sun Nov 29 19:22:45 1998 Joerg Schilling + * scsihack.c 1.19 + UNIXWARE new + +Sun Nov 29 19:15:04 1998 Joerg Schilling + * cdrecord.c 1.75 + scgio.h -> scgcmd.h/scgio.h, scgio.h scgcmd.h scsidefs.h scsireg.h scsitransp.h -> include/scg, 1.8a11 -> 1.8a13 + +Sun Nov 29 19:14:20 1998 Joerg Schilling + * scsierrs.c 2.20 + * scsitransp.c 1.35 + * cdr_drv.c 1.12 + * modes.c 1.10 + * scsilog.c 1.6 + * wm_packet.c 1.10 + * scsi_scan.c 1.4 + * scsi_cdr.c 1.64 + * audiosize.c 1.11 + * drv_sony.c 1.24 + * drv_simul.c 1.6 + * drv_philips.c 1.21 + * drv_mmc.c 1.32 + * drv_jvc.c 1.35 + * drv_dvd.c 1.28 + scgio.h -> scgcmd.h/scgio.h, scgio.h scgcmd.h scsidefs.h scsireg.h scsitransp.h -> include/scg + +Sun Nov 29 00:39:42 1998 Joerg Schilling + * scsi-sco.c 1.5 + Correctly return Sense Data, EIO if errno == 0 + +Sat Nov 28 12:32:00 1998 Joerg Schilling + * scsierrs.c 2.19 + asc <= 80 -> asc < 80 for invalid sense code + +Sat Nov 28 00:49:19 1998 Joerg Schilling + * scsierrs.c 2.18 + Missing NULL as terminator for sd_ccs_error_str[] added + +Wed Nov 25 22:23:07 1998 Joerg Schilling + * scsi-linux-pg.c 1.10 + pg_send() Prototyp new + +Wed Nov 25 22:22:46 1998 Joerg Schilling + * scsitransp.c 1.34 + HAVE_PARAM_H -> HAVE_SYS_PARAM_H (Typo) + +Sun Nov 22 15:50:37 1998 Joerg Schilling + * cdrecord.c 1.74 + 1.8a9 -> 1.8a11, DosSetPriority() new + +Sun Nov 22 15:26:16 1998 Joerg Schilling + * isosize.c 1.4 + * audiosize.c 1.10 + Now using statdefs.h + +Sat Nov 21 23:41:31 1998 Joerg Schilling + * scsitransp.c 1.33 + #ifdef HAVE_PARAM_H for VMS + +Sat Nov 21 21:38:31 1998 Joerg Schilling + * scsi_cdr.c 1.63 + unsigned int cast for char Parameter in i_to_short() + +Sat Nov 7 22:21:28 1998 Joerg Schilling + * cdrecord.c 1.73 + 1.8a8 -> 1.8a9 + +Fri Nov 6 23:49:59 1998 Joerg Schilling + * scsi-linux-sg.c 1.30 + Typo in scsi_send() header + +Mon Nov 2 22:22:23 1998 Joerg Schilling + * scsi-bsd.c 1.18 + Typ bus -> busno for CAM removed + +Mon Nov 2 14:55:22 1998 Joerg Schilling + * scsi-os2.c 1.1 + date and time created 98/11/02 14:55:22 by joerg + +Mon Nov 2 13:24:30 1998 Joerg Schilling + * scsihack.c 1.18 + Now completely using SCSI *scgp as Function parameter + scsi-os2.c new + +Mon Nov 2 14:27:10 1998 Joerg Schilling + * scsi-vms.c 1.6 + * scsi-sgi.c 1.12 + * scsi-sco.c 1.4 + * scsi-osf.c 1.4 + * scsi-next.c 1.7 + * scsi-linux-sg.c 1.29 + * scsi-linux-pg.c 1.9 + * scsi-hpux.c 1.9 + * scsi-bsd.c 1.17 + * scsi-bsd-os.c 1.5 + * scsi-aix.c 1.11 + * scsierrs.c 2.17 + * scsitransp.c 1.32 + * scsitransp.h 1.17 + * cdrecord.c 1.72 + * cdrecord.h 1.45 + * cdr_drv.c 1.11 + * drv_mmc.c 1.31 + * drv_philips.c 1.20 + * drv_jvc.c 1.34 + * drv_dvd.c 1.27 + * drv_simul.c 1.5 + * drv_sony.c 1.23 + * scsi_cdr.c 1.62 + * modes.c 1.9 + * scsi_scan.h 1.2 + * scsi_scan.c 1.3 + * scsilog.c 1.5 + * wm_packet.c 1.9 + Now completely using SCSI *scgp as Function parameter + +Thu Oct 29 15:59:52 1998 Joerg Schilling + * scsihack.c 1.17 + * scsitransp.h 1.16 + * scsitransp.c 1.31 + * scsi-sgi.c 1.11 + * scsi-vms.c 1.5 + * scsi-sco.c 1.3 + * scsi-osf.c 1.3 + * scsi-next.c 1.6 + * scsi-linux-pg.c 1.8 + * scsi-linux-sg.c 1.28 + * scsi-hpux.c 1.8 + * scsi-bsd.c 1.16 + * scsi-bsd-os.c 1.4 + * scsi-aix.c 1.10 + Globale Variables removed and replaced by SCSI *scgp + +Thu Oct 29 15:45:38 1998 Joerg Schilling + * scsi-sco.c 1.2 + Indented and scsi_isatapi() new + +Thu Oct 29 15:30:53 1998 Joerg Schilling + * scsi-sco.c 1.1 + date and time created 98/10/29 15:30:53 by joerg + +Thu Oct 29 15:21:52 1998 Joerg Schilling + * cdrecord.c 1.70 + Lowlevel SCSI transport Routines now have scgp Parameter, 1.8a6 -> 1.8a7 + +Thu Oct 29 15:21:09 1998 Joerg Schilling + * scsi_cdr.c 1.61 + * drv_sony.c 1.22 + * modes.c 1.8 + * scsilog.c 1.4 + * drv_philips.c 1.19 + * drv_mmc.c 1.30 + * drv_jvc.c 1.33 + * drv_dvd.c 1.26 + Lowlevel SCSI transport Routines now have scgp Parameter + +Wed Oct 28 22:20:25 1998 Joerg Schilling + * scsi-aix.c 1.9 + dev=device:b,t,l Syntax new + +Mon Oct 26 03:18:37 1998 Joerg Schilling + * diskid.c 1.7 + manufacturer_id() new + mi_num new in struct disk_man + +Mon Oct 26 03:17:34 1998 Joerg Schilling + * cdrecord.h 1.44 + manufacturer_id() new + +Mon Oct 26 00:27:22 1998 Joerg Schilling + * diskid.c 1.6 + New manufacturer: Xcitec Inc. + Doremi Media Co., Ltd. + Matsushita Electric Industrial Co.,Ltd. + CDA Datenträger Albrechts GmbH. + +Sun Oct 25 13:00:22 1998 Joerg Schilling + * cdrecord.c 1.71 + #ifdef HAVE_SYS_MMAN_H new + +Sat Oct 24 01:41:22 1998 Joerg Schilling + * scsi-vms.c 1.4 + * scsi-osf.c 1.2 + * scsi-sgi.c 1.10 + * scsi-next.c 1.5 + * scsi-hpux.c 1.7 + * scsi-bsd.c 1.15 + * scsi-bsd-os.c 1.3 + * scsi-aix.c 1.8 + Blind changes for 1st stage of SCSI lib: Globale Variables removed and replaced by SCSI *scgp + +Sat Oct 24 00:22:01 1998 Joerg Schilling + * cdrecord.c 1.69 + * scsi_cdr.c 1.60 + open_scsi(dev, timeout, verboseopen) -> open_scsi(dev, debug, verboseopen) + +Fri Oct 23 23:46:23 1998 Joerg Schilling + * wm_packet.c 1.8 + * scsi_cdr.c 1.59 + scsi_settimeout() -> do not divide by 100 + +Fri Oct 23 15:53:37 1998 Joerg Schilling + * cdrecord.c 1.68 + XXX scgp->cap->c_bsize = 2048; XXX Hack init !!! + +Fri Oct 23 03:14:46 1998 Joerg Schilling + * scsihack.c 1.16 + scsi-sco.c new + +Fri Oct 23 16:01:44 1998 Joerg Schilling + * scsi-linux-sg.c 1.27 + * scsi-linux-pg.c 1.7 + * scsitransp.c 1.30 + * scsitransp.h 1.15 + * scsierrs.c 2.16 + * scsi_cdr.c 1.58 + * scsidefs.h 1.19 + * cdrecord.c 1.67 + * drv_dvd.c 1.25 + * drv_philips.c 1.18 + * drv_sony.c 1.21 + * drv_jvc.c 1.32 + * cdr_drv.c 1.10 + * drv_mmc.c 1.29 + * modes.c 1.7 + * scsi_scan.c 1.2 + * scsilog.c 1.3 + Globale Variables removed and replaced by SCSI *scgp + +Thu Oct 22 18:49:06 1998 Joerg Schilling + * scsi-next.c 1.4 + Now using scsi_open(device, busno, tgt, tlun) Interface + +Tue Oct 20 18:31:25 1998 Joerg Schilling + * scsi_cdr.c 1.57 + CDD521/02 (Kodak PCD-200) + +Sun Oct 18 14:54:35 1998 Joerg Schilling + * cdrecord.c 1.66 + 1.6.1 -> 1.7.1 + +*************** Release 1.6.1 ******************* + +Sun Oct 18 14:47:55 1998 Joerg Schilling + * cdrecord.c 1.65 + O_BINARY for Tracks + Restore old sector size on exit() + Better handling for lba (512/2048) in read_toc() + +Sun Oct 18 14:40:35 1998 Joerg Schilling + * scsi_cdr.c 1.56 + * cdrecord.h 1.43 + sense_secsize() new + +Sat Oct 17 16:39:41 1998 Joerg Schilling + * fifo.c 1.12 + #ifdef SHM_LOCK to allow compilation of SysV shm on AIX + +Fri Oct 9 14:21:38 1998 Joerg Schilling + * scsi-bsd.c 1.14 + sp->ux_errno = EIO; for old Transport Interface + +Fri Oct 9 22:19:30 1998 Joerg Schilling + * modes.c 1.24 + * cd_misc.c 1.6 + * fifo.c 1.11 + * diskid.c 1.5 + * port.c 1.8 + #include new + +Fri Oct 9 14:21:38 1998 Joerg Schilling + * cd_misc.c 1.5 + * wm_packet.c 1.7 + * wm_session.c 1.2 + * wm_track.c 1.2 + #include & #include new + +Thu Oct 8 15:43:50 1998 Joerg Schilling + * cdrecord.h 1.42 + u_char -> Uchar + +Wed Oct 7 18:08:46 1998 Joerg Schilling + * cdrecord.c 1.64 + 1.7a2 -> 1.7, -fix -eject corrected + wait_unit_ready(120); after a load + +Wed Oct 7 18:07:41 1998 Joerg Schilling + * scsi_cdr.c 1.55 + IMMED hack in close track/session added + +Wed Oct 7 18:06:02 1998 Joerg Schilling + * drv_mmc.c 1.28 + new function waitfix_mmc() + -dummy error hiding better + +Wed Oct 7 17:54:02 1998 Joerg Schilling + * scsi-linux-pg.c 1.6 + EIO on SCG_RETRYABLE + +Tue Oct 6 12:53:11 1998 Joerg Schilling + * scsi-vms.c 1.3 + next version from vaxinf@CHCLU.CHEMIE.UNI-KONSTANZ.DE and my remarks + +Tue Oct 6 12:21:50 1998 Joerg Schilling + * scsi-vms.c 1.2 + next version from vaxinf@CHCLU.CHEMIE.UNI-KONSTANZ.DE + +Tue Oct 6 02:09:14 1998 Joerg Schilling + * scsi-linux-pg.c 1.5 + * scsi-linux-sg.c 1.26 + * scsi-bsd-os.c 1.2 + New device:@ Syntax + +Tue Oct 6 02:04:46 1998 Joerg Schilling + * scsi_cdr.c 1.54 + New device:@ Syntax + sscanf() -> scsi_scandev() + +Tue Oct 6 01:50:13 1998 Joerg Schilling + * cdrecord.1 1.34 + new dev= Syntax (dev=device:@ / dev=device:@,lun) inserted + +Tue Oct 6 01:05:29 1998 Joerg Schilling + * scsi-bsd.c 1.13 + modified to use -lcam & cam_open_btl(busno, tgt, tlun, O_RDWR, NULL); + +Thu Oct 1 01:15:57 1998 Joerg Schilling + * scsi-bsd.c 1.12 + Mods for dev=devname:@,l + +Mon Sep 21 01:24:45 1998 Joerg Schilling + * scsi-linux-sg.c 1.25 + scsi_settimeout() -> sg_settimeout() + +Sat Sep 19 21:49:11 1998 Joerg Schilling + * scsi-osf.c 1.1 + date and time created 98/09/19 20:49:11 by joerg + +Tue Sep 15 02:55:28 1998 Joerg Schilling + * drv_philips.c 1.17 + capacity_philips() with Philips CDD-2600 Support new + *_attach() now uses cdr_t * Parameter + cdr_kodak_pcd600 new + Pioneer DW-S114X from open_track_yamaha -> open_track_oldphilips + +Tue Sep 15 02:39:44 1998 Joerg Schilling + * scsi-bsd.c 1.11 + #ifndef BSD_CAM -> #ifndef HAVE_CAMLIB_H + +Tue Sep 15 02:37:58 1998 Joerg Schilling + * cdrecord.c 1.63 + Now uses: fctldefs.h, strdefs.h + SECURITY new + 1.7a1 -> 1.7a2 + open_scsi() check return value and print error message + Blanking time print + #ifdef _SC_PRIORITY_SCHEDULING around sysconf() + #ifdef PRIO_PROCESS around setpriority() for WNT + +Tue Sep 15 02:31:16 1998 Joerg Schilling + * drv_jvc.c 1.31 + Now uses: fctldefs.h, strdefs.h + blank_jvc() new + +Tue Sep 15 02:30:11 1998 Joerg Schilling + * drv_sony.c 1.20 + Now uses: fctldefs.h, strdefs.h + +Tue Sep 15 02:22:12 1998 Joerg Schilling + * cdrecord.h 1.41 + struct index -> struct tindex to allow #define index strchr + +Tue Sep 15 02:21:24 1998 Joerg Schilling + * drv_mmc.c 1.27 + Now uses: fctldefs.h, strdefs.h, timdefs.h + Sony 928 Support new + For drives that don't support read ATIP use data from read_diskinfo + Try to handle "early Return" fixating syndrom from Mitsumi drives + no error messages when fixating using -dummy + +Tue Sep 15 02:13:49 1998 Joerg Schilling + * scsi_cdr.c 1.53 + Now uses: fctldefs.h, strdefs.h + +Tue Sep 8 01:32:08 1998 Joerg Schilling + * scsihack.c 1.15 + Conditional compilation for Linux pg driver to support old Linux releases + +Mon Sep 7 02:30:15 1998 Joerg Schilling + * scsi-bsd.c 1.10 + Typo in scsi_fileno() fixed + +Sun Sep 6 18:47:16 1998 Joerg Schilling + * scsi-bsd.c 1.9 + first FreeBSD CAM Support + +Sun Sep 6 18:22:13 1998 Joerg Schilling + * scsi-bsd.c 1.8 + Enhancements for NetBSD & ATAPI + +Sun Sep 6 01:39:22 1998 Joerg Schilling + * cdr_drv.c 1.9 + cdr_mmc_sony new + +Sun Sep 6 00:43:43 1998 Joerg Schilling + * drv_simul.c 1.4 + * drv_dvd.c 1.24 + Now uses: strdefs.h + +Sat Sep 5 23:23:31 1998 Joerg Schilling + * scsitransp.c 1.29 + Now uses: timedefs.h fctldefs.h + +Mon Aug 31 01:50:12 1998 Joerg Schilling + * scsi-linux-pg.c 1.4 + pgbus init from -1 -> -2 + +Mon Aug 31 01:39:52 1998 Joerg Schilling + * scsi-linux-sg.c 1.24 + /dev/sga... to /dev/sgz instead of /dev/sgy now checked + return nopen to allow recognition of bad dev= parameters + +Mon Aug 31 01:38:08 1998 Joerg Schilling + * scsi-linux-pg.c 1.3 + Debug print for pgbus + if scsibus >= 0 ist do nothing if busno is wrong + +Mon Aug 31 01:03:17 1998 Joerg Schilling + * scsi_cdr.c 1.52 + write_xg5() new + +Mon Aug 31 01:02:00 1998 Joerg Schilling + * scsi_cdr.c 1.51 + open_scsi() now checks dev=devicename:b,t,l + read_trackinfo() now don't prints Cannot read TOC Meldung in silent mode + +Mon Aug 31 00:43:31 1998 Joerg Schilling + * scsitransp.c 1.28 + scsiprintresult() new + +Mon Aug 31 00:40:32 1998 Joerg Schilling + * scsitransp.h 1.14 + scsiprintcdb()/scsiprintwdata()/scsiprintrdata()/scsiprintresult() new + +Sun Aug 30 12:55:35 1998 Joerg Schilling + * drv_dvd.c 1.23 + g5_cdbaddr()/g5_cdblen() -> scgio.h + +Sun Aug 30 12:54:37 1998 Joerg Schilling + * scsihack.c 1.14 + USE_PG -> USE_PG_ONLY + +Sun Aug 30 12:54:02 1998 Joerg Schilling + * scgio.h 2.13 + g0_cdblen()/g5_cdblen() & g5_cdbaddr() new + +Sun Aug 30 12:53:06 1998 Joerg Schilling + * cdrecord.h 1.40 + write_xg5() new + +Sat Aug 29 22:15:37 1998 Joerg Schilling + * cd_misc.c 1.4 + pr_manufacturer() reference removed from print_min_atip() + +Sat Aug 29 21:57:01 1998 Joerg Schilling + * cdrecord.1 1.33 + PP tranport documented, -scanbus doc corrected + +Sat Aug 29 21:01:59 1998 Joerg Schilling + * scsi-linux-pg.c 1.2 + #include statt "pg.h" + support for integrated parallel Port Adapter & SCSI + timeout code corrected + DMA overrun now recognized + +Sat Aug 29 20:48:28 1998 Joerg Schilling + * scsi-linux-sg.c 1.23 + Support for integrated parallel Port Adapter & SCSI + +Sat Aug 29 20:22:10 1998 Joerg Schilling + * cd_misc.c 1.3 + * cdrecord.h 1.39 + print_min_atip() new in cd_misc.c + +Tue Aug 25 20:23:20 1998 Joerg Schilling + * scsihack.c 1.13 + scsi_isatapi() defined, for default SCSI code + +Sun Aug 23 13:42:44 1998 Joerg Schilling + * scsi-linux-sg.c 1.22 + Fix for misaligned integer access in sg_header for Linux/sparc if valloc() DMA Buffer is used + +Thu Aug 20 10:05:14 1998 Joerg Schilling + * scsi-aix.c 1.7 + errno == Reference removed + +Thu Aug 20 01:24:33 1998 Joerg Schilling + * cdrecord.1 1.32 + dev=devicename:target,lun documented + +Tue Aug 18 04:41:56 1998 Joerg Schilling + * scsihack.c 1.12 + scsi-next.c & scsi-vms.c new + +Mon Aug 17 23:08:36 1998 Joerg Schilling + * scsi-vms.c 1.1 + date and time created 98/08/17 22:08:36 by joerg + +Mon Aug 17 22:35:19 1998 Joerg Schilling + * scsihack.c 1.11 + scsi-linux-pg.c new use with USE_PG + +Mon Aug 17 22:34:55 1998 Joerg Schilling + * scsi-linux-pg.c 1.1 + * scsi-bsd-os.c 1.1 + date and time created 98/08/17 21:24:24 by joerg + +Mon Aug 17 22:22:04 1998 Joerg Schilling + * scsi-linux-sg.c 1.21 + MAX_SCG -> 8 + search /dev/sg0... before /dev/sfg... + +Mon Aug 17 21:47:35 1998 Joerg Schilling + * scsi-linux-sg.c 1.20 + Support new sg driverinterface + scgfile new to use with global ioctl's + MAX_DMA_LINUX -> 4k if SG_BIG_BUFF undefined + SG_MAX_SENSE -> 16 if not declared + SG_GET_BUFSIZE ioctl new + scsi_isatapi() new + +Sun Aug 16 23:47:48 1998 Joerg Schilling + * misc.c 1.1 + date and time created 98/08/16 22:47:48 by joerg + +Sun Aug 16 23:47:06 1998 Joerg Schilling + * cdrecord.h 1.38 + misc.c: timevaldiff() new + +Sun Aug 16 23:34:35 1998 Joerg Schilling + * scsi-bsd.c 1.7 + scsi_isatapi() new + /dev/scgx may be replaced by dev=/dev/xxx:0,0 + +Sun Aug 16 23:32:42 1998 Joerg Schilling + * scsitransp.h 1.13 + * scsitransp.c 1.27 + * scsi-sgi.c 1.9 + * scsi-aix.c 1.6 + * scsi-hpux.c 1.6 + scsi_isatapi() new + +Fri Jul 17 03:44:13 1998 Joerg Schilling + * scsihack.c 1.10 + BSDI new -> scsi-bsd-os.c + +Fri Jun 19 19:59:07 1998 Joerg Schilling + * scsitransp.h 1.12 + * scsitransp.c 1.26 + * scsihack.c 1.9 + * scsi-sgi.c 1.8 + * scsi-hpux.c 1.5 + * scsi-bsd.c 1.6 + * scsi-aix.c 1.5 + * scsi-linux-sg.c 1.19 + Use scsi_open(device, busno, tgt, tlun) with parameters + +Tue Jun 9 01:44:46 1998 Joerg Schilling + * drv_dvd.c 1.22 + korrekte Indizierung bei tracksize virtual tracklist + +Sat Jun 6 00:16:40 1998 Joerg Schilling + * port.c 1.7 + #include -> #include wegen sys/time.h + +Wed Jun 3 02:20:27 1998 Joerg Schilling + * cdrecord.1 1.31 + bytes= Option removed + Introduced Mailing List + +Wed Jun 3 02:18:47 1998 Joerg Schilling + * drv_dvd.c 1.21 + Treshold for printing the Virtual Trackliste corrected + Abort if first virt Track is not a multiple of the sectorsize + +Wed Jun 3 01:35:24 1998 Joerg Schilling + * diskid.c 1.4 + disk_rcap List new + +Wed Jun 3 01:04:49 1998 Joerg Schilling + * cdrecord.c 1.62 + CD -> CD/DVD + +Wed Jun 3 01:01:53 1998 Joerg Schilling + * cdrecord.c 1.61 + #if defined(_POSIX_PRIORITY_SCHEDULING) -> #if defined(_POSIX_PRIORITY_SCHEDULING) && !defined(HAVE_SYS_PRIOCNTL_H) bei LOCAL declaration + +Tue Jun 2 00:41:37 1998 Joerg Schilling + * drv_dvd.c 1.20 + attach_???() new now implementing the side effects from identify_???() + +Tue Jun 2 00:41:36 1998 Joerg Schilling + * drv_mmc.c 1.26 + attach_???() neu mit den Nebeneffekten aus identify_???() + +Mon Jun 1 23:34:26 1998 Joerg Schilling + * scsi_cdr.c 1.50 + Cast for malloc(): not every malloc() is void * + +Mon Jun 1 23:33:21 1998 Joerg Schilling + * drv_sony.c 1.19 + * drv_jvc.c 1.30 + * cdr_drv.c 1.8 + * cdrecord.h 1.37 + * cdrecord.c 1.60 + attach Routine now uses cdr_t * Parameter + +Mon Jun 1 22:24:42 1998 Joerg Schilling + * drv_dvd.c 1.19 + * scsilog.c 1.2 + Superfluous & in a_to_u_short() removed + +Sun May 31 21:38:00 1998 Joerg Schilling + * scsihack.c 1.8 + OSF1 new + +Sun May 31 01:45:04 1998 Joerg Schilling + * scsitransp.c 1.25 + void * cast for valloc() return + +Sun May 31 00:39:54 1998 Joerg Schilling + * cdrecord.c 1.59 + Casts for tracksize & padsize + +Sat May 30 23:12:56 1998 Joerg Schilling + * drv_simul.c 1.3 + Verbose Message for islast + +Sat May 30 00:35:26 1998 Joerg Schilling + * cdrecord.c 1.58 + tracksize & padsize -> LLong + +Fri May 29 00:32:30 1998 Joerg Schilling + * cdrecord.c 1.57 + astoll() & getllnum() new + number() -> LLong + +Fri May 29 00:05:29 1998 Joerg Schilling + * cdrecord.1 1.30 + waw in .wav Typo + +Fri May 29 00:03:32 1998 Joerg Schilling + * drv_dvd.c 1.18 + Better comment and housekeeping + +Thu May 28 01:08:06 1998 Joerg Schilling + * drv_dvd.c 1.17 + next_wr_addr_dvd() now correct with read_rzone_info() + +Thu May 28 00:02:01 1998 Joerg Schilling + * drv_dvd.c 1.16 + Verbose level documented + set ds_maxblocks from rzone_info + rzone_size() new + phys size computation corrected + +Tue May 26 04:16:55 1998 Joerg Schilling + * drv_dvd.c 1.15 + Speed code removed + +Tue May 26 04:03:55 1998 Joerg Schilling + * drv_dvd.c 1.14 + Removed lines that have been commented out + +Tue May 26 04:01:03 1998 Joerg Schilling + * drv_dvd.c 1.13 + dvd check in identify_dvd() later + +Tue May 26 03:58:57 1998 Joerg Schilling + * drv_dvd.c 1.12 + fcntl.h + errno.h + sys/file.h removed + +Tue May 26 03:56:48 1998 Joerg Schilling + * drv_dvd.c 1.11 + scsiprbytes() with lverbose > 1 + multi Track Hack indented + +Tue May 26 03:49:19 1998 Joerg Schilling + * drv_dvd.c 1.10 + Superfluous Debugs in SCSI routines removed + +Tue May 26 00:02:51 1998 Joerg Schilling + * cdrecord.c 1.56 + checktsize() with Llong for total Tracksize in Bytes + checkdsize() now computed the remaining rest capacity + +Mon May 25 04:40:51 1998 Joerg Schilling + * drv_dvd.c 1.9 + Computations of the track split code -> long long + MAX tracks -> 99 + +Mon May 25 04:35:54 1998 Joerg Schilling + * drv_dvd.c 1.8 + close_Xtrack_dvd() code -> fixate_dvd() + +Mon May 25 04:30:05 1998 Joerg Schilling + * drv_dvd.c 1.7 + send_dvd_structure() & send_dvd0F() new + +Mon May 25 03:46:30 1998 Joerg Schilling + * drv_dvd.c 1.6 + print_laserlog() new + print_logpages() new + +Mon May 25 03:42:16 1998 Joerg Schilling + * drv_dvd.c 1.5 + przone() new + print_dvd00()/print_dvd01()print_dvd04()/print_dvd05()/print_dvd0D()/print_dvd0E()print_dvd0F() new + now reads 4096 Bytes DVD structure + +Mon May 25 03:17:14 1998 Joerg Schilling + * drv_dvd.c 1.4 + print_dvd_info() new + +Mon May 25 02:31:56 1998 Joerg Schilling + * scsilog.c 1.1 + date and time created 98/05/25 01:31:56 by joerg + +Mon May 25 02:05:22 1998 Joerg Schilling + * scsimmc.h 1.3 + rzone_info new + dvd_structure_XX new + +Sat May 23 22:41:54 1998 Joerg Schilling + * drv_simul.c 1.2 + #include unixstd.h new + +Sat May 23 21:32:13 1998 Joerg Schilling + * scsi_cdr.c 1.49 + New Mode Page 2A Heuristic (min length 0x14 -> 0x10): ATAPI LITEON only gives 0x12: No Write Speed. + +Wed May 20 23:49:35 1998 Joerg Schilling + * cdrecord.c 1.55 + islast bug (|| instead of &&) fixed + bytes= Option removed + +Tue May 19 04:11:02 1998 Joerg Schilling + * drv_dvd.c 1.3 + struct disk_info & struct track_info -> scsimmc.h + scsilog.h new + +Sat May 16 13:15:21 1998 Joerg Schilling + * scsimmc.h 1.2 + u_char -> Uchar + +Sun May 10 00:12:04 1998 Joerg Schilling + * scsimmc.h 1.1 + date and time created 98/05/09 23:12:04 by joerg + +Sun May 10 00:04:17 1998 Joerg Schilling + * auheader.h 1.2 + generic Copyright comment + +Sun May 10 00:02:27 1998 Joerg Schilling + * drv_mmc.c 1.25 + Strukturdefinitionen -> scsimmc.h + +Thu May 7 22:43:07 1998 Joerg Schilling + * scsi_cdr.c 1.48 + strindex() -> strbeg() + vendor_info / prod_ident / prod_revision new because of array index problems + Kodak PCD-600 new + +Thu May 7 21:38:58 1998 Joerg Schilling + * cdrecord.h 1.36 + getnum() now extern + is_mmc() with DVD recognition + disk_rcap() new + +Thu May 7 21:38:13 1998 Joerg Schilling + * cdr_drv.c 1.7 + DRV_DVD new + cdr_kodak_pcd600 / cdr_cdr_simul / cdr_dvd_simul new + DEV_PIONEER_DVDR_S101 new + DVD recognition in is_mmc() nee + +Thu May 7 21:15:19 1998 Joerg Schilling + * cdrecord.c 1.54 + 1.6 -> 1.7a1 + getnum() LOCAL -> EXPORT + test_unit_ready() before load Medium + Allow Medium removal if not ready on load_media() + +Thu May 7 10:43:00 1998 Joerg Schilling + * diskid.c 1.3 + Vendor list actualalized + +Wed May 6 02:52:16 1998 Joerg Schilling + * cdrecord.1 1.29 + simulation driver documented + +Wed May 6 02:41:33 1998 Joerg Schilling + * audiosize.c 1.9 + .wav files that are smaller than expected are handled correctly + +Mon May 4 02:09:55 1998 Joerg Schilling + * drv_dvd.c 1.2 + Function names *_mmc -> *_dvd + ds_maxblock -> ds_maxblocks + getdisktype_dvd() now includes more tests + write_type -> WT_SAO + Hack for virtual track list + +Sun May 3 19:37:17 1998 Joerg Schilling + * scsi_cdr.c 1.47 + mode_select_sg0()/mode_sense_sg0() cnt usage corrected + mode_sense_sg0() movebytes() count corrected + +Sat May 2 00:46:07 1998 Joerg Schilling + * drv_simul.c 1.1 + date and time created 98/05/01 23:46:07 by joerg + +Fri May 1 19:26:22 1998 Joerg Schilling + * scsi_cdr.c 1.46 + DEV_PCD_600 new + is_mmc() now uses dvdp Arg + +Fri May 1 19:08:34 1998 Joerg Schilling + * scsidefs.h 1.18 + PCD_600 new + +*************** Release 1.6 ******************* + +Fri Apr 17 12:53:59 1998 Joerg Schilling + * scsi_cdr.c 1.45 + & before ibuf removed because it is an array + +Fri Apr 17 12:45:38 1998 Joerg Schilling + * scsi_cdr.c 1.44 + min/sec/frame -> amin/asec/aframe because of min() Macro + +Thu Apr 16 01:43:26 1998 Joerg Schilling + * cdrecord.1 1.26 + -ignsize new + web page for cdrecord added + +Thu Apr 16 00:55:39 1998 Joerg Schilling + * diskid.c 1.2 + Print if Manufacturer is in none of the tables + +Thu Apr 16 00:52:13 1998 Joerg Schilling + * drv_mmc.c 1.24 + ds_maxblock -> ds_maxblocks + do get_atip() always, but print if lverbose is set + +Thu Apr 16 00:32:50 1998 Joerg Schilling + * cdrecord.h 1.35 + * cdrecord.c 1.53 + ds_maxblock -> ds_maxblocks + new Option -ignsize + +Thu Apr 16 00:31:32 1998 Joerg Schilling + * drv_jvc.c 1.29 + * drv_philips.c 1.16 + ds_maxblock -> ds_maxblocks + +Sun Apr 12 16:14:07 1998 Joerg Schilling + * scsi_cdr.c 1.43 + Smart & Friendly CD-R4012 (TEAC CDR-55S) new + +Sun Apr 12 02:15:15 1998 Joerg Schilling + * scsitransp.c 1.24 + scsiprintcdb()/scsiprintwdata()/scsiprintrdata() new + print scsiprintcdb() on errors + +Sun Apr 12 01:58:26 1998 Joerg Schilling + * cdrecord.h 1.34 + * cdrecord.c 1.52 + Real Blocks new + 1.6a14 -> 1.6 + +Wed Apr 1 03:28:36 1998 Joerg Schilling + * cdrecord.c 1.51 + checkgui() now has verbose print + +Wed Apr 1 01:36:59 1998 Joerg Schilling + * drv_jvc.c 1.28 + lberbose > 1 for all subcode Messages + teac_wr_pma()/teac_rd_pma() new + JVC Errorcodes new + check for cdrecord -fix without Parameter + hide Illegal Command errorcode for next_wr_addr_teac() + +Wed Apr 1 01:29:49 1998 Joerg Schilling + * scsitransp.c 1.23 + * scsi_cdr.c 1.42 + * drv_mmc.c 1.23 + GCC Warnings removed: printf format errors + +Tue Mar 31 20:58:07 1998 Joerg Schilling + * cdrecord.c 1.50 + ->1.6a14, LOAD & EJECT works for CD-ROM too + GUI test on STDERR + first Trackno -> track[0] as Hack + +Tue Mar 31 20:56:43 1998 Joerg Schilling + * cdrecord.1 1.25 + CREDITS + better Documentation for tsize= & TEAC + +Sun Mar 29 15:31:08 1998 Joerg Schilling + * cdrecord.1 1.24 + -vv/-VV mods + -fix: not for TEAC + -load new + timeout= Option + tsize= description because of tracksize and TEAC + nice/SunOS -> nice/others + +Sun Mar 29 15:26:19 1998 Joerg Schilling + * drv_philips.c 1.15 + open_session() with tracks & trackp Parameters + Philips CDD-521 old/dumb new + Pioneer DW-S114X new + +Sun Mar 29 15:22:29 1998 Joerg Schilling + * drv_mmc.c 1.22 + open_session() with tracks & trackp Parameters + Check for zeroed ATIP Info + wait_unit_ready() for ATAPI - sorry not working + +Sat Mar 28 23:43:07 1998 Joerg Schilling + * cdrecord.c 1.49 + check_recovery() now uses flags for unload_media() + call unload_media() on input buffer, wait error, and for blank media error + open_session() now usees tracks & trackp Parameters for Sizecheck + Printing of is_swab() with audio fixed + +Sat Mar 28 23:22:30 1998 Joerg Schilling + * drv_jvc.c 1.27 + teac_open_session() checks tracksize ( <= 0 is not possible) + +Sat Mar 28 23:21:08 1998 Joerg Schilling + * scsi_cdr.c 1.41 + wait_unit_ready() now handles BUSY + mode_sense_sg0() movebytes() count handling corrected (amt-4) + better (komplete) Inquiry printing with -V + JVC XR-W2001 / Plilips CDD521/00 / Traxdata CDR4120 / Pioneer CD-WO DW-S114X / Pinnacle RCD-1000 new + +Sat Mar 28 23:06:05 1998 Joerg Schilling + * scsireg.h 1.18 + SCSI Status codes + +Fri Mar 27 01:04:50 1998 Joerg Schilling + * drv_sony.c 1.18 + * cdrecord.h 1.33 + open_session() with tracks & trackp parameters + +Thu Mar 26 22:42:29 1998 Joerg Schilling + * cdr_drv.c 1.6 + Pioneer DW-S 114, old Philips, dumb Philips new + +Tue Mar 24 21:30:08 1998 Joerg Schilling + * cdrecord.h 1.32 + is_*() Macros now clearer: != 0 + +Tue Mar 24 21:29:18 1998 Joerg Schilling + * scsidefs.h 1.17 + DEV_CDD_521_OLD new + +Mon Mar 16 00:48:34 1998 Joerg Schilling + * drv_dvd.c 1.1 + date and time created 98/04/20 00:48:34 by joerg + +Sat Mar 14 17:49:09 1998 Joerg Schilling + * scsi-bsd.c 1.5 + MAX_DMA_BSD 64k -> 60k + +Thu Mar 12 23:48:19 1998 Joerg Schilling + * drv_jvc.c 1.26 + set ds_maxblock + next_wr_addr_jvc() uses read_B0() if track == 0 + use trackp[i].trackno for TOC + Lead-out Start time now uses frames + teac_calibrate() inits lba_addr from read_B0() + next_wr_addr_teac() with Parameters + +Thu Mar 12 23:42:09 1998 Joerg Schilling + * cdrecord.c 1.48 + use real Track nubmers + -v/-V now Inc type Flag + print remaining capacity + Pregapsize || bug fixed + Trackno in struct track + wait_unit_ready() new + +Thu Mar 12 23:35:26 1998 Joerg Schilling + * drv_philips.c 1.14 + Print computed ATIP only for empty Disk + ATIP printout now prints Lead-out start time too + compute Disk capacity + +Thu Mar 12 22:33:50 1998 Joerg Schilling + * drv_sony.c 1.17 + close_track_sony() -> track = 0 ! + mode_sense() -> get_mode_params() + +Thu Mar 12 22:24:10 1998 Joerg Schilling + * cdrecord.h 1.31 + Strukt track now includes trackno + CDR_DVD new + from_bcd()/to_bcd() new + wait_unit_ready() new + read_B0() new + +Thu Mar 12 22:20:40 1998 Joerg Schilling + * scsi_cdr.c 1.40 + unit_ready() now checks for UNIT_ATTENTION + wait_unit_ready() new + toc struktures char -> Uchar + read_tochdr()/read_trackinfo() may have NULL Pointer Args + read_B0() new + +Thu Mar 12 22:12:16 1998 Joerg Schilling + * scsitransp.c 1.22 + Print data if verbose > 1 + +Thu Mar 12 01:21:58 1998 Joerg Schilling + * cd_misc.c 1.2 + from_bcd()/to_bcd() new + +Tue Mar 10 00:07:50 1998 Joerg Schilling + * cdrecord.c 1.47 + * drv_mmc.c 1.21 + checkgui() & isgui new + +Mon Mar 9 23:29:02 1998 Joerg Schilling + * drv_mmc.c 1.20 + Read ATIP non-fatal + warnung in fixation with correct lverbose flag + +Sun Mar 8 15:02:13 1998 Joerg Schilling + * scsi_cdr.c 1.39 + SAF CD-R2006PRO CD-R2006, JVC R2626 new + +Sun Mar 8 14:59:31 1998 Joerg Schilling + * cdrecord.c 1.46 + Default Timeout -> 40s + flags int -> long + new Option -load + Print Lead-out start + 90 Min value corrected + +Sun Mar 8 14:56:53 1998 Joerg Schilling + * cdrecord.h 1.30 + fsamples()/frames() new + +Fri Mar 6 01:11:56 1998 Joerg Schilling + * scsitransp.c 1.21 + print SCSI command names before ABORT + +Thu Mar 5 01:15:26 1998 Joerg Schilling + * scsierrs.c 2.15 + referres -> refers + +Thu Mar 5 01:15:02 1998 Joerg Schilling + * scsitransp.h 1.11 + * scsitransp.c 1.20 + scsi_sense_qual() new + +Mon Mar 2 22:50:12 1998 Joerg Schilling + * drv_mmc.c 1.19 + msf_to_lba()/lba_to_msf() -> cd_misc.c + len += 2 to correct length for TOC & disk Info + failed read ATIP is no fatal error + better print_atip() + +Mon Mar 2 22:45:53 1998 Joerg Schilling + * cd_misc.c 1.1 + date and time created 98/03/02 22:45:53 by joerg + +Mon Mar 2 22:39:02 1998 Joerg Schilling + * cdrecord.h 1.29 + F_LOAD new + All Flags sorted + msf_to_lba()/lba_to_msf() new + +Mon Mar 2 22:36:10 1998 Joerg Schilling + * drv_philips.c 1.13 + philips_getlilo() new + print disk manufacturer new + +Mon Mar 2 21:56:53 1998 Joerg Schilling + * scsi_cdr.c 1.38 + Pinnacle RCD 4X4, SAF CD-RW226 new + +Mon Feb 23 22:32:27 1998 Joerg Schilling + * scsi_cdr.c 1.37 + read_toc_philips() same parameters as read_toc() (ses -> fmt) + +Mon Feb 23 22:30:57 1998 Joerg Schilling + * drv_mmc.c 1.18 + msf_to_lba() corrected (+-150 bug) + lba_to_msf() new + Check for Complete Disk: 0xFF:0xFF/0xFF + pr_manufacturer() new with lverbose + different Formatting + +Mon Feb 23 21:54:28 1998 Joerg Schilling + * cdrecord.c 1.45 + 80 Minute limit -> 90 Minutes + +Mon Feb 23 21:51:56 1998 Joerg Schilling + * diskid.c 1.1 + date and time created 98/02/23 21:51:56 by joerg + +Sun Feb 22 23:23:22 1998 Joerg Schilling + * fifo.c 1.10 + fifo_percent() with Parameter + FIFO Bug (duoubling of a segment at end of writing) fixed + +Sun Feb 22 22:54:46 1998 Joerg Schilling + * cdrecord.c 1.44 + fifo_percent() with Parameter + unit_ready() for UNLOAD removed + print Disk capacity + +Sun Feb 22 22:52:53 1998 Joerg Schilling + * wm_packet.c 1.6 + fifo_percent() with Parameter + +Sun Feb 22 22:47:51 1998 Joerg Schilling + * cdrecord.h 1.28 + fifo_percent() with Parameter + msf_t typedef + pr_manufacturer() new + +Sun Feb 15 21:01:03 1998 Joerg Schilling + * audiosize.c 1.8 + getWavShort() & getWavLong() Definitions removed + +Tue Feb 10 01:00:48 1998 Joerg Schilling + * cdrecord.c 1.43 + New option timeout=# + +Mon Feb 9 12:44:40 1998 Joerg Schilling + * scsi-linux-sg.c 1.18 + timeout from 1/100 sec -> 1/HZ sec + +Sun Feb 8 21:56:01 1998 Joerg Schilling + * scsi-linux-sg.c 1.17 + Missing bracket at read() inserted + +Sun Feb 8 18:45:19 1998 Joerg Schilling + * scsi_cdr.c 1.36 + Tayo Yuden CD-WO EW-50 better Inquiry + +Sun Feb 8 15:52:15 1998 Joerg Schilling + * fifo.c 1.9 + fifo_percent() returns -1 if buflen == 0 + dummy fifo_percent() always -1 + +Sun Feb 8 15:50:43 1998 Joerg Schilling + * wm_packet.c 1.5 + * cdrecord.c 1.42 + Copyright -> 1998 + fs Reference in fifo_percent() removed + fifo_percent() in wm_packet new + +Sun Feb 8 13:54:25 1998 Joerg Schilling + * cdrecord.1 1.23 + fs= - administrative part + .au & .wav description + better -swab description + +Sun Feb 8 13:30:33 1998 Joerg Schilling + * scsi-linux-sg.c 1.16 + Fix for sendcommand() befor scsi_getbuf() call + read() < 0 now handled + +Sun Feb 8 13:28:38 1998 Joerg Schilling + * audiosize.c 1.7 + Definitions for WAVE better + better WAV recognition from Dave + +Sat Feb 7 23:20:14 1998 Joerg Schilling + * drv_jvc.c 1.25 + close_track_teac() fixed only audio uses no run-out blocks + +Sat Feb 7 23:18:43 1998 Joerg Schilling + * cdrecord.c 1.41 + rezero_unit() now silent not supported by all drives + +Sat Feb 7 23:14:03 1998 Joerg Schilling + * scsi_cdr.c 1.35 + Kodak CDR-240 new + +Sun Feb 1 23:17:33 1998 Joerg Schilling + * fifo.c 1.8 + HAVE_SHM -> HAVE_USGSHM was a typo + +Sun Feb 1 21:20:48 1998 Joerg Schilling + * scsi_cdr.c 1.34 + DVD enhancements in mmv_getval() & print_capabilities() + +Sun Feb 1 20:35:06 1998 Joerg Schilling + * scsireg.h 1.17 + DVD Definitions in Mode Page 2A + +Sun Feb 1 19:56:10 1998 Joerg Schilling + * scsi-linux-sg.c 1.15 + scsi_getbuf() hat nun char *ret wegen pointer Aritmetik + sizeof() cast comparison to int + scsi_send(): superfluous ; before scsi_settimeout() removed + +Sun Feb 1 19:45:21 1998 Joerg Schilling + * cdrecord.c 1.40 + filename new in struct track + Errorcode and exit() in audio*size() + +Sun Feb 1 19:44:08 1998 Joerg Schilling + * auheader.h 1.1 + date and time created 98/02/01 19:44:08 by joerg + +Sun Feb 1 19:44:00 1998 Joerg Schilling + * audiosize.c 1.6 + auheader.h new + Errorcodes + +Sun Feb 1 19:43:26 1998 Joerg Schilling + * cdrecord.h 1.27 + filename new in struct track + cd_mode_page_2A *cdr_cdcap new in struct cdr_cmd + +Sun Feb 1 19:42:28 1998 Joerg Schilling + * drv_philips.c 1.12 + * drv_sony.c 1.16 + * drv_mmc.c 1.17 + * drv_jvc.c 1.24 + cd_mode_page_2A *cdr_cdcap new in struct cdr_cmd + +Sun Feb 1 16:03:29 1998 Joerg Schilling + * drv_mmc.c 1.16 + ATIP Enhanced + +Sun Feb 1 15:56:31 1998 Joerg Schilling + * drv_mmc.c 1.15 + mmv_check() -> mmc_cap()/mmc_getval() + Handle non-trayload drives + warning for dummy/verbose while fixating + +Sun Feb 1 15:49:17 1998 Joerg Schilling + * scsidefs.h 1.16 + DEV_MMC_DVD, DEV_PIONEER_DVDR_S101 new + +Sun Feb 1 15:46:50 1998 Joerg Schilling + * scsi_cdr.c 1.33 + mmc_getval() & mmv_check() with dvdp + DEV_MMC_DVD new + Pioneer DVD-R S101, TEAC CD-R55S new + allow_atapi() in print_capabilities() + heuristic with speed >= 176 according to mmc2 + +Sun Feb 1 15:46:17 1998 Joerg Schilling + * cdrecord.c 1.39 + better CD-Recorder warning + +Sun Feb 1 14:53:02 1998 Joerg Schilling + * cdrecord.c 1.38 + Honour file sizes + better usage() Output + .au & .wav Filesize recognition + early recognition of "incompatible medium" + sched_setscheduler() error code (< 0) is correct + +Sun Feb 1 14:39:27 1998 Joerg Schilling + * cdrecord.h 1.26 + mmc_getval() & mmv_check() with dvdp + TI_WAV & is_wav() removed + +Sun Feb 1 14:33:39 1998 Joerg Schilling + * audiosize.c 1.5 + Complete recognition of a Wavheader (with Hilfe from Heiko) + +Mon Jan 26 01:56:21 1998 Joerg Schilling + * scsi-aix.c 1.4 + valloc() re-implemented (not available in AIX libc) + scsi sense handling ready + +Mon Jan 26 01:51:58 1998 Joerg Schilling + * scsi_cdr.c 1.32 + mmc_cap(), mmc_getval() new + Strings for printcap() static for K&R + +Mon Jan 26 01:07:27 1998 Joerg Schilling + * audiosize.c 1.4 + Filesize - header for Sun .au Files, data_size is not always correct + +Sun Jan 25 23:08:00 1998 Joerg Schilling + * audiosize.c 1.3 + Sun .au Header new + +Sun Jan 25 22:58:58 1998 Joerg Schilling + * cdrecord.h 1.25 + TI_NOWAV -> TI_NOAUHDR, is_auname() & ausize() new + +Sun Jan 25 18:10:47 1998 Joerg Schilling + * cdrecord.h 1.24 + TI_NOWAV, mmc_cap() & mmg_getval(), is_wavname() new + +Sun Jan 25 16:16:23 1998 Joerg Schilling + * audiosize.c 1.2 + is_wavname() new + +Sun Jan 25 16:02:26 1998 Joerg Schilling + * audiosize.c 1.1 + date and time created 98/01/25 16:02:26 by joerg + +Sun Jan 25 13:38:40 1998 Joerg Schilling + * drv_jvc.c 1.23 + Errortexts for CD-R55S + +Sat Jan 24 17:52:52 1998 Joerg Schilling + * wm_packet.c 1.4 + * fifo.c 1.7 + Honour file sizes + +Fri Jan 23 02:08:22 1998 Joerg Schilling + * scsi-linux-sg.c 1.14 + scsi_initdev() new to allow concurrent cdrecord's + +Fri Jan 23 02:04:01 1998 Joerg Schilling + * drv_jvc.c 1.22 + * drv_mmc.c 1.14 + * drv_sony.c 1.15 + * scsireg.h 1.16 + * scgio.h 2.12 + Uint for Bitfields -> Ucbit + +Sun Jan 18 14:25:01 1998 Joerg Schilling + * scsitransp.c 1.19 + flush() calls to correctly mix stderr/stdout + +Sun Jan 18 14:23:33 1998 Joerg Schilling + * cdrecord.h 1.23 + TI_WAV, is_wav(), wavsize() nee + +Sat Jan 17 22:07:03 1998 Joerg Schilling + * cdrecord.1 1.22 + * cdrecord.c 1.37 + -reset Option new + +Sat Jan 17 21:53:58 1998 Joerg Schilling + * cdrecord.h 1.22 + F_RESET, F_PRATIP, F_PRDINFO, SES_UNDEF new + Definitios for disk status and session status + dstat_t enhanced + CDR_NOLOLIMIT & CDR_ALLOC new + fifo_percent(), allow_atapi(), mode_sense_??()/mode_select_??() new + +Sat Jan 17 21:35:54 1998 Joerg Schilling + * fifo.c 1.6 + undef FIFO if no shared mamory + SHM_LOCK for Linux + Stat buffer for fifosize + removed sp->cont because it is not secure (use diff) + fifo_percent() new + +Sat Jan 17 21:20:57 1998 Joerg Schilling + * cdrecord.c 1.36 + -reset new + fifo_percent() printing for -v + +Sat Jan 17 21:09:24 1998 Joerg Schilling + * cdrecord.1 1.21 + Better description of dev= and -scanbus + +Tue Dec 23 01:26:35 1997 Joerg Schilling + * scsi_cdr.c 1.31 + Plextor PX-R24CS + S&F CD-R2006PLUS + Wearns CDR-632P new + +Tue Dec 23 01:23:34 1997 Joerg Schilling + * scsi_cdr.c 1.30 + Uint in Bitfields -> Ucbit + +Thu Dec 11 19:30:31 1997 Joerg Schilling + * scsitransp.c 1.18 + Print command execution time for each failed (non-silent) command + +Sun Nov 9 18:33:48 1997 Joerg Schilling + * drv_mmc.c 1.13 + Remove get Page 0x2A for Matsushita CW-7502 + has_mode_page() checks "current" instead of "default" + +Sat Nov 8 16:11:51 1997 Joerg Schilling + * cdrecord.c 1.35 + Disk size check -> checkdsize() : new + +Fri Nov 7 00:02:20 1997 Joerg Schilling + * scsi-aix.c 1.3 + timeout counts in seconds + +Fri Nov 7 00:04:11 1997 Joerg Schilling + * scsireg.h 1.15 + * scgio.h 2.11 + * scsi_cdr.c 1.29 + * drv_sony.c 1.14 + * drv_mmc.c 1.12 + * drv_jvc.c 1.21 + u_char in Bitfields -> Uint + +Thu Nov 6 20:27:08 1997 Joerg Schilling + * scsihack.c 1.7 + Typo __AIX -> defined(_IBMR2) || defined(_AIX) + +Thu Nov 6 20:26:23 1997 Joerg Schilling + * scsi-aix.c 1.2 + sccsid[] -> __sccsid[], fd -> f Typo, #include + +Thu Nov 6 20:22:14 1997 Joerg Schilling + * cdrecord.1 1.20 + Typo corrected + +Thu Nov 6 20:19:26 1997 Joerg Schilling + * scsitransp.c 1.17 + * scsierrs.c 2.14 + * scsi_cdr.c 1.28 + * scsi.c 1.4 + * drv_sony.c 1.13 + * drv_philips.c 1.11 + * drv_mmc.c 1.11 + * drv_jvc.c 1.20 + #include for AIX + +Thu Nov 6 20:18:25 1997 Joerg Schilling + * cdrecord.c 1.34 + #ifdef RLIMIT_NOFILE fuer AIX + +Wed Nov 5 18:01:32 1997 Joerg Schilling + * cdrecord.1 1.19 + Better doc for fs= + +Wed Nov 5 17:57:50 1997 Joerg Schilling + * drv_mmc.c 1.10 + msf_to_lba() new, get_diskinfo() new, di_to_dstat() new, getdisktype_mmc() new, additions for Matsushita CW-7502 + +Wed Nov 5 17:43:41 1997 Joerg Schilling + * fifo.c 1.5 + switch -> if then else + +Wed Nov 5 17:15:45 1997 Joerg Schilling + * cdrecord.c 1.33 + init struct disk_status, better aritmetic for disk size + +Wed Nov 5 17:14:29 1997 Joerg Schilling + * fifo.c 1.4 + print FIFO min fill in percent + +Tue Nov 4 11:20:22 1997 Joerg Schilling + * scsi_cdr.c 1.26 + return (mode_select_g0(dp, cnt, smp, pf)) was missing in mode_select() + +Tue Nov 4 10:35:02 1997 Joerg Schilling + * scsi-linux-sg.c 1.13 + Check for NULL at return of valloc() + +Tue Nov 4 00:13:35 1997 Joerg Schilling + * drv_jvc.c 1.19 + New flag CDR_NO_LOLIMIT + +Sun Nov 2 16:17:10 1997 Joerg Schilling + * scsi_cdr.c 1.25 + SCSI mode(6/10) conversion for ATAPI, distinguish between S&F 2006PLUS / S&F 2006PLUS + +Sun Nov 2 14:57:57 1997 Joerg Schilling + * scsitransp.c 1.16 + Print finish time + +Sun Nov 2 14:54:50 1997 Joerg Schilling + * scgio.h 2.10 + i_to_4_byte new + +Thu Oct 23 19:21:19 1997 Joerg Schilling + * scsihack.c 1.6 + AIX Support + +Thu Oct 23 19:20:25 1997 Joerg Schilling + * scsi-aix.c 1.1 + date and time created 97/10/23 18:20:25 by joerg + +Thu Oct 23 19:12:02 1997 Joerg Schilling + * drv_mmc.c 1.9 + Enhancements for packet writing + +Thu Oct 23 01:35:02 1997 Joerg Schilling + * cdrecord.1 1.18 + New options -prcap, -packet, pktsize =#, -noclose + +Wed Oct 22 23:50:44 1997 Joerg Schilling + * drv_jvc.c 1.18 + * wm_packet.c 1.3 + * cdrecord.c 1.32 + fflush(stdout) -> flush(), flush() after Fixating... + +Wed Oct 22 23:49:12 1997 Joerg Schilling + * scsi_cdr.c 1.24 + scsi_close-session() -> scsi_close_tr_session() + +Wed Oct 22 23:49:11 1997 Joerg Schilling + * cdrecord.h 1.21 + scsi_close-session() -> scsi_close_tr_session() + +Sun Oct 19 15:41:35 1997 Joerg Schilling + * scsi_cdr.c 1.23 + * cdrecord.c 1.31 + Prevent medium removal problems fixed (read TOC) & Matsushita CD-750? + +Sun Oct 19 15:40:32 1997 Joerg Schilling + * scsidefs.h 1.15 + Matsushita CW-7501 & CW-7502 + +Sun Oct 19 02:08:53 1997 Joerg Schilling + * drv_sony.c 1.12 + * drv_philips.c 1.10 + * drv_jvc.c 1.17 + * wm_packet.c 1.2 + * cdrecord.h 1.20 + * cdrecord.c 1.30 + next_wr_address() has track_t * added + +Sun Oct 19 01:37:02 1997 Joerg Schilling + * drv_jvc.c 1.16 + read_disk_info() -> read_disk_info_teac(), zero pre-gap audio support, opt_power_judge() timeout -> 60 sec + +Sun Oct 19 01:33:21 1997 Joerg Schilling + * scsi_cdr.c 1.22 + read_disk_info() new, print_capabilities() new + +Sun Oct 19 00:40:36 1997 Joerg Schilling + * cdrecord.c 1.29 + * cdrecord.h 1.19 + get_buf() new, -prcap & print_capabilities() new, -packet new, pktsize=# new + +Sun Oct 19 00:36:32 1997 Joerg Schilling + * wm_track.c 1.1 + * wm_session.c 1.1 + * wm_packet.c 1.1 + date and time created 97/10/18 23:36:31 by joerg + +Sat Oct 18 19:14:05 1997 Joerg Schilling + * scsi.c 1.3 + stdlib.h -> stdxlib.h, unistd.h -> unixstd.h + +Sat Oct 18 01:34:19 1997 Joerg Schilling + * modes.c 1.3 + Ausgabe der Mode Parameter wenn mode_select() nicht klappt & return FALSE + +**** 1.6a3 *** + +Sun Oct 12 20:00:21 1997 Joerg Schilling + * cdrecord.1 1.17 + * cdrecord.c 1.28 + New options pregap= defpregap= + +Sun Oct 12 19:30:45 1997 Joerg Schilling + * cdrecord.h 1.18 + is_first() & is_last() new + +Sat Oct 11 18:01:28 1997 Joerg Schilling + * cdrecord.c 1.27 + islast debug printf deleted + +Sat Oct 11 17:57:43 1997 Joerg Schilling + * scsi_cdr.c 1.21 + * drv_sony.c 1.11 + * drv_philips.c 1.9 + * drv_mmc.c 1.8 + * drv_jvc.c 1.15 + * cdrecord.h 1.17 + * cdrecord.c 1.26 + islast for TEAC & no run-out blocks for disksize computing + +Sat Oct 11 14:54:03 1997 Joerg Schilling + * drv_jvc.c 1.14 + OLD_CLOSE_TRACK re-aktiviert, clear_subcode() in open_track(), set_limits() in open_track() for audio without run-out, dummy sector -> static to be zeroed + +Thu Oct 9 14:14:24 1997 Joerg Schilling + * drv_jvc.c 1.13 + Audio Tracks have no link&run-in + +Thu Oct 9 02:01:23 1997 Joerg Schilling + * drv_jvc.c 1.12 + SWABAUDIO Flag new + +Wed Oct 8 17:24:40 1997 Joerg Schilling + * scsi_cdr.c 1.20 + * drv_sony.c 1.10 + * drv_philips.c 1.8 + * drv_mmc.c 1.7 + * cdrecord.h 1.16 + * cdrecord.c 1.25 + Modification of data structures for JVC/TEAC + +Wed Oct 8 17:23:41 1997 Joerg Schilling + * fifo.c 1.3 + WRITER_MAXWAIT 20 -> 120 s + +Wed Oct 8 17:14:04 1997 Joerg Schilling + * drv_jvc.c 1.11 + Enhancements for audio and multi track disks + +Wed Oct 8 14:48:06 1997 Joerg Schilling + * cdrecord.1 1.16 + Better doc for padsize & fs= + +Mon Oct 6 20:37:39 1997 Joerg Schilling + * drv_jvc.c 1.10 + Modified to use pad_track() + +Mon Oct 6 20:32:11 1997 Joerg Schilling + * cdrecord.c 1.24 + In pad_track(): if (bytesp != 0) check was missing ->coredump + +Mon Oct 6 20:29:22 1997 Joerg Schilling + * scsi_cdr.c 1.19 + SMART&FRIENDLY CD-R2006 + +Sun Oct 5 16:53:45 1997 Joerg Schilling + * drv_mmc.c 1.6 + verbose printing modified + +Sun Oct 5 16:53:09 1997 Joerg Schilling + * cdrecord.c 1.23 + Check for bytesp != 0 in pad_track() + +Sat Oct 4 01:09:56 1997 Joerg Schilling + * cdrecord.c 1.22 + realtime raisepri Problem for HP-UX fixed (function present bot not working) + +Fri Oct 3 21:33:13 1997 Joerg Schilling + * scsi_cdr.c 1.18 + * drv_sony.c 1.9 + * drv_philips.c 1.7 + * drv_mmc.c 1.5 + * drv_jvc.c 1.9 + * cdrecord.h 1.15 + * cdrecord.c 1.21 + * cdrecord.1 1.15 + * cdr_drv.c 1.5 + new option blank=type for CD-RW + +Fri Oct 3 16:23:00 1997 Joerg Schilling + * cdrecord.c 1.20 + pad_track() new, await_faio() new & init_faio() befor wait loop, always pad to 300 sectors , padsize= option new, DEFAULT_FIFOSIZE new + +Thu Oct 2 02:02:10 1997 Joerg Schilling + * fifo.c 1.2 + MIN_BUFFERS -> 3, await_faio() new, kill_faio() new, stdin EOF check, Messages only for debug + +Thu Oct 2 01:38:39 1997 Joerg Schilling + * cdrecord.1 1.14 + padsize Option new, nice --18 bug, 's' & 'f' mult for getnum() + +Thu Oct 2 01:31:28 1997 Joerg Schilling + * drv_jvc.c 1.8 + sleep()'s added to cure fixating problems ??? + +Thu Oct 2 01:19:46 1997 Joerg Schilling + * cdrecord.h 1.14 + DEFAULT_FIFOSIZE, roundup(), tracksize & padsize -> long, pad_track() new, await_fifo() & kill_fifo() new, minutes() cast to int + +Wed Sep 24 00:02:39 1997 Joerg Schilling + * cdrecord.c 1.19 + Fifo & tracksize Option + +Tue Sep 23 23:46:27 1997 Joerg Schilling + * scsi-sgi.c 1.7 + Bug with resid != 0 fixed + +Sun Sep 21 23:20:15 1997 Joerg Schilling + * cdrecord.1 1.13 + fs= Option, tsize= Option, mkisofs | cdrecord with fs= EXAMPLE + +Sun Sep 21 22:58:34 1997 Joerg Schilling + * fifo.c 1.1 + date and time created 97/09/21 21:58:34 by joerg + +Sun Sep 21 22:45:08 1997 Joerg Schilling + * cdrecord.h 1.13 + faio_get_buf() & fifo_stats() + +Sun Sep 21 01:12:43 1997 Joerg Schilling + * cdrecord.h 1.12 + fifo code + +Wed Sep 17 13:55:57 1997 Joerg Schilling + * drv_jvc.c 1.7 + Typo in cdr_write_teac() EXPORT -> LOCAL + +Wed Sep 17 13:55:06 1997 Joerg Schilling + * cdrecord.c 1.18 + raisepri() has Parameter (n below Max), _POSIX_PRIORITY_SCHEDULING, _POSIX_MEMLOCK + +*************** Release 1.5 ******************* + +Mon Sep 15 16:46:16 1997 Joerg Schilling + * README 1.9 + Anpassungen fuer release 1.5 + +Wed Sep 10 18:40:49 1997 Joerg Schilling + * cdrecord.c 1.17 + Print always Copyright except for -msinfo + +Wed Sep 10 18:12:59 1997 Joerg Schilling + * scsi_cdr.c 1.17 + Inquiry debug data indented + Mode Parameters only for verbose + +Wed Sep 10 17:57:32 1997 Joerg Schilling + * cdrecord.c 1.16 + Flags defs von cdrecord.c -> cdrecord.h + load_media() new + load/unload_madia() global + Track verbose output after inquiry + Test errorcodes while burning + Dummy blocks added for close_track() is not an error + -nofix Flag activated + Exit code for burning errors: -2 + Swabaudio automatic + +Wed Sep 10 17:43:12 1997 Joerg Schilling + * cdrecord.h 1.11 + Flag defs from cdrecord.c + getdisktype() with cdr_t * + load_media() new + load/unload_madia() global + +Wed Sep 10 17:42:13 1997 Joerg Schilling + * cdr_drv.c 1.4 + * drv_jvc.c 1.6 + getdisktype() with cdr_t * + +Wed Sep 10 17:41:02 1997 Joerg Schilling + * drv_philips.c 1.6 + philips_getdisktype() new for automatic eject on "Command Sequence Error" + +Wed Sep 10 16:50:56 1997 Joerg Schilling + * cdrecord.1 1.12 + Scsibus , typo removed + +Wed Sep 10 15:10:03 1997 Joerg Schilling + * cdrecord.1 1.11 + 1.4 -> 1.5 + +Wed Sep 10 15:04:26 1997 Joerg Schilling + * drv_sony.c 1.8 + new_track_sony() return valoe corrected + +Wed Sep 10 15:03:36 1997 Joerg Schilling + * cdrecord.1 1.10 + Changes for cdrecord-1.5 + +Thu Sep 4 19:26:00 1997 Joerg Schilling + * scsi-linux-sg.c 1.12 + Use channel on multi channel controlers + +Thu Sep 4 19:09:10 1997 Joerg Schilling + * drv_jvc.c 1.5 + * drv_sony.c 1.7 + * scsi_cdr.c 1.16 + inq.ansi_version -> inq.data_format for all mode_select() calls + for Philips CDD-522 (version == 1 , format == 2) + +Wed Sep 3 02:00:33 1997 Joerg Schilling + * scsi-linux-sg.c 1.11 + scsi_mapbus() new + better timeout handling + copy Struct now automatic Variable + Sense Data error = SCG_RETRYABLE + +Mon Sep 1 01:25:16 1997 Joerg Schilling + * scsi-sgi.c 1.6 + * scsi-linux-sg.c 1.10 + * scsi-hpux.c 1.4 + * scsi-bsd.c 1.4 + Last tuning make all implementations equal + Open only one file if possible. + Better bound checking + +Sun Aug 31 23:21:06 1997 Joerg Schilling + * scsi-hpux.c 1.3 + Array again has 8 Luns + havebus tests bounds + +Sun Aug 31 23:18:35 1997 Joerg Schilling + * scsi-sgi.c 1.5 + MAX_* introduced, open max 1 lun (for now) + +Sun Aug 31 20:14:02 1997 Joerg Schilling + * scsi-hpux.c 1.2 + MAX_LUN now 1 + +Sun Aug 31 20:10:25 1997 Joerg Schilling + * scsi-hpux.c 1.1 + date and time created 97/08/31 19:10:25 by joerg + +Sun Aug 31 18:00:16 1997 Joerg Schilling + * scsihack.c 1.5 + HP-UX added + +Tue Aug 26 19:37:15 1997 Joerg Schilling + * cdrecord.c 1.15 + init dp in main now correctly + +Tue Aug 26 17:50:20 1997 Joerg Schilling + * scsi-sgi.c 1.4 + Support complete without using -lds + +Tue Aug 26 17:47:35 1997 Joerg Schilling + * scsi_cdr.c 1.15 + scsibus/target/lun now now -1 if bus is scanned + to make sure that not ony one target can be opened. + +Tue Aug 26 17:46:22 1997 Joerg Schilling + * cdrecord.c 1.14 + test_unit_ready() after select_target() (SCANBUS) + +Tue Aug 26 01:47:41 1997 Joerg Schilling + * scsi-sgi.c 1.3 + unused includes removed + +Mon Aug 25 22:02:35 1997 Joerg Schilling + * scgio.h 2.9 + * scsitransp.c 1.15 + * scsi-sgi.c 1.2 + * scsi-linux-sg.c 1.9 + * scsi-bsd.c 1.3 + errno -> ux_errno in scg_cmd for POSIX multithread + +Mon Aug 25 21:27:55 1997 Joerg Schilling + * scsi-sgi.c 1.1 + date and time created 97/08/25 20:27:55 by joerg + +Mon Aug 25 18:10:12 1997 Joerg Schilling + * cdrecord.c 1.13 + raisepri() not always done + +Sun Aug 24 22:58:37 1997 Joerg Schilling + * drv_jvc.c 1.4 + First pre-aplha makes one data track only + +Sun Aug 24 17:03:05 1997 Joerg Schilling + * cdrecord.c 1.12 + New options: driver=name -checkdrive -inq -scanbus -nofix + set_trsizes() later + get_cdr_cmds() new + first simple sizecheck + "swap" output from print_data_track() removed + +Sun Aug 24 16:54:31 1997 Joerg Schilling + * cdrecord.h 1.10 + struct disk_status new + is_unknown_dev() new + is_mmc() new + mmc_check() new + set_cdrcmds() new + +Sun Aug 24 16:53:09 1997 Joerg Schilling + * scsi_cdr.c 1.14 + is_unknown_dev() new + is_mmc() new + mmc_check() new + open_scsi() modified for scsi_scan() + Device recognition new for CD-R + scsi_load() now correct + +Sun Aug 24 16:22:22 1997 Joerg Schilling + * cdrecord.1 1.9 + -nofix new + driver=name new + -checkdrive new + -inq new + -scanbus new + Sense Output uses new form + +Sun Aug 24 16:19:42 1997 Joerg Schilling + * drv_mmc.c 1.4 + CDR_SWABAUDIO new + cd_mode* pages -> scsireg.h + identify_mmc() uses mmc_check() + +Sun Aug 24 16:18:00 1997 Joerg Schilling + * cdr_drv.c 1.3 + set_cdrcmds() new + get_cdrcmds() enhanced + +Sun Aug 24 15:47:30 1997 Joerg Schilling + * drv_sony.c 1.6 + * drv_philips.c 1.5 + CDR_SWABAUDIO Flag new + +Sun Aug 24 14:51:43 1997 Joerg Schilling + * scsidefs.h 1.14 + CDD-2000 & CDD-2600 new + MMC Definitionen new + +Sun Aug 24 14:18:47 1997 Joerg Schilling + * scsireg.h 1.14 + CD mode pages 05 & 2A + +Sun Aug 10 19:29:38 1997 Joerg Schilling + * drv_philips.c 1.4 + * drv_sony.c 1.5 + * drv_mmc.c 1.3 + * cdrecord.h 1.9 + * cdrecord.c 1.11 + cdr_driver -> cdr_drname + cdr_drtext + open_track() with track_info * instead of many arguments + +Sun Aug 10 18:10:14 1997 Joerg Schilling + * scsi_cdr.c 1.13 + LOAD (A6) command now uses correct SCSI definition + +Sun Aug 10 17:43:35 1997 Joerg Schilling + * scsi-linux-sg.c 1.8 + Buffer overflow in sg_rq corrected + timeout corrected (semicolon past if) + 12 Byte Hack now OK + +Sun Aug 10 17:42:06 1997 Joerg Schilling + * scgio.h 2.8 + SCSI g5 command struct now ansi compliant + +Sun Aug 10 17:40:30 1997 Joerg Schilling + * scsihack.c 1.4 + SGI include + +Fri Jul 18 13:41:46 1997 Joerg Schilling + * scsi_cdr.c 1.12 + read_capacity() new + scsi_load_unload() new + scsi_set_sped() new + write_xg1() new + read_toc() for SCSI-3 new + read_toc_philips() from old name + read_track_info() -> read_track_info_philips() + read_track_info() new + scsi_close_session() new + first_writable_address() with address Pointer + read_tochdr() with cdr_t * ???? + read_session_offset() with offset Pointer + Version for SCSI-3 + is_cdrecorder() removed, Taiyo Yuden new + +Fri Jul 18 12:35:02 1997 Joerg Schilling + * scsi-linux-sg.c 1.7 + with new ioctl() SCSI_IOCTL_GET_BUS_NUMBER more SCSI busses + +Fri Jul 18 02:49:46 1997 Joerg Schilling + * cdrecord.1 1.8 + -version + better -isosize Doku + -multi warning removed + +Fri Jul 18 02:44:11 1997 Joerg Schilling + * cdrecord.c 1.10 + fix_it now past open_session() + next_writable_address() and read_session_offset() now with adress Pointer + -version usage() + superfluous argument removed with lout + +Fri Jul 18 02:31:23 1997 Joerg Schilling + * cdrecord.h 1.8 + * drv_mmc.c 1.2 + SCSI-3/mmc first implementation + +Fri Jul 18 02:25:10 1997 Joerg Schilling + * drv_jvc.c 1.3 + * drv_philips.c 1.3 + * drv_sony.c 1.4 + next_writable_address now has adress pointer + read_session_offset_philips() extracted + +Thu Jul 17 18:12:43 1997 Joerg Schilling + * scsi-bsd.c 1.2 + ifdef for BSD SENSE bug + +Thu Jul 17 17:43:10 1997 Joerg Schilling + * isosize.c 1.3 + filedescriptor sense (seek) test. + +Tue Jul 15 21:27:29 1997 Joerg Schilling + * isosize.c 1.2 + & before vd.vd_type deleted + +Tue Jul 15 21:26:57 1997 Joerg Schilling + * drv_sony.c 1.3 + & before mode deleted + +Tue Jul 15 21:16:46 1997 Joerg Schilling + * cdrecord.c 1.9 + version string + write_track_data() with startsec parameter + cd_recorder/drive recognition now uses cdr_t + print_toc() with cdr_t parameter + open_session() with multi parameter + Progress printing in write_track_data() now uses correct rounding + dbtype with -multi corrected + read_session_offset() with cdr_t parameter + print_toc() prints sector numbers correctly and 'lout' for 0xAA + +Tue Jul 15 13:34:04 1997 Joerg Schilling + * cdr_drv.c 1.2 + drive_identify may modify cdr_t struct pointer + Yamaha CDR-400 correct with cdr_mmc + +Tue Jul 15 13:24:49 1997 Joerg Schilling + * drv_philips.c 1.2 + * drv_jvc.c 1.2 + * drv_sony.c 1.2 + open_track() with dbtyp arg + open_session() with multi arg + struct cdr_t driver flags filled in + driver type string + +Tue Jul 8 19:42:42 1997 Joerg Schilling + * scsi-linux-sg.c 1.6 + /dev/sg0 ... tested too + +Tue Jul 8 18:00:39 1997 Joerg Schilling + * scsi-bsd.c 1.1 + date and time created 97/07/08 17:00:39 by joerg + +Tue Jul 8 17:59:20 1997 Joerg Schilling + * scsihack.c 1.3 + New Implementation for *BSD + +Sun Jun 22 19:58:40 1997 Joerg Schilling + * scsi_cdr.c 1.11 + Smart & Friendly Support + +*************** Release 1.4 ******************* + +Sat Mai 21 19:58:42 1997 Joerg Schilling + * cdrecord.1 1.7 + Updates for release 1.4 + +Sat Mai 21 18:11:25 1997 Joerg Schilling + * scsi.c 1.2 + scsireg.h Include + +Sat Mai 21 00:52:33 1997 Joerg Schilling + * drv_sony.c 1.1 + date and time created 97/05/20 23:52:33 by joerg + +Sat Mai 21 00:27:56 1997 Joerg Schilling + * drv_philips.c 1.1 + date and time created 97/05/20 23:27:56 by joerg + +Sat Mai 21 00:27:50 1997 Joerg Schilling + * drv_mmc.c 1.1 + date and time created 97/05/20 23:27:50 by joerg + +Sat Mai 21 00:27:43 1997 Joerg Schilling + * drv_jvc.c 1.1 + date and time created 97/05/20 23:27:43 by joerg + +Sat Mai 21 00:27:14 1997 Joerg Schilling + * scsi_cdr.c 1.10 + mode_select() uses inq.ansi_version >= 2 + +Sat Mai 21 00:26:42 1997 Joerg Schilling + * cdrecord.h 1.7 + attach_unknown() new + +Sat Mai 21 00:26:05 1997 Joerg Schilling + * cdr_drv.c 1.1 + date and time created 97/05/20 23:26:05 by joerg + +Thu Mai 19 23:46:54 1997 Joerg Schilling + * cdrecord.c 1.8 + Struct track -> cdrecord.h + DB_XXX Data block types + cdr_cmd Struct as Drive Abstraction Layer + -eject Flag + checktsize() new + CDR_SPEED & CDR_DEVICE + +Thu Mai 19 16:59:44 1997 Joerg Schilling + * cdrecord.h 1.6 + struct track from cdrecord.c + DB_XXX Data block types + cdr_cmd Struct as Drive Abstraction Layer + +Thu Mai 19 15:42:53 1997 Joerg Schilling + * scsi_cdr.c 1.9 + Prototypes lokal too + scsi_load_unload() -> load_unload_philips() + start_stop_unit() now with eject + close_track_philips() new + recover with track parameter + mode_sense() new + speed_select splitted + inquiry news new drives + scsi_cdr_write() + +Mon Mai 16 15:46:48 1997 Joerg Schilling + * config.h 1.1 + date and time created 97/05/16 14:46:48 by joerg + +Mon Mai 16 15:46:48 1997 Joerg Schilling + * scsi.c 1.1 + date and time created 97/05/16 14:46:48 by joerg + +Fri May 23 22:09:21 1997 Joerg Schilling + * scsitransp.c 1.14 + bad 2. Parameter in gettimeofday -> struct timezone * + +Fri Apr 23 22:08:16 1997 Joerg Schilling + * scsierrs.c 2.13 + missing %s in Formatstring added + +Wed Apr 14 00:54:03 1997 Joerg Schilling + * scsireg.h 1.13 + new scsi device types + +Wed Apr 14 00:53:28 1997 Joerg Schilling + * scsitransp.c 1.13 + scsireset() into hack part + scsi_setnonstderrs() new, scsierrmsg() chganges + new scsi devicetype codes, Solaris x86 dmasize without gethostid() + +Wed Apr 14 00:46:27 1997 Joerg Schilling + * scsitransp.h 1.10 + Changes for scsierrs.c enhancements + +Wed Apr 14 00:45:26 1997 Joerg Schilling + * scsierrs.c 2.12 + Enhancements for SCSI-2 & SCSI-3 + +Tue Apr 6 17:15:43 1997 Joerg Schilling + * scsidefs.h 1.13 + Different order & Yamaha CDR-400, Sony CDU-924, Ricoh RO-1420, Teac CD-R50 new + +Tue Apr 6 16:36:38 1997 Joerg Schilling + * scgio.h 2.7 + Enhancements for SCSI-2 & SCSI-3 + +Tue Apr 6 14:10:35 1997 Joerg Schilling + * scsi-linux-sg.c 1.5 + CCD-> CCS Typo + +Tue Apr 6 13:59:16 1997 Joerg Schilling + * scsihack.c 1.2 + scsireset() -> transport specific part + +Tue Apr 6 13:59:16 1997 Joerg Schilling + * scsi-linux-sg.c 1.4 + scsireset() -> transport specific part + +*************** Release 1.3 ******************* + +Fri Mar 4 19:48:35 1997 Joerg Schilling + * README 1.6 + Changes for Release 1.3 + +Fri Mar 4 18:57:02 1997 Joerg Schilling + * cdrecord.1 1.6 + release 1.3 + +Fri Mar 4 18:46:37 1997 Joerg Schilling + * cdrecord.1 1.5 + Changes for Release 1.3 + +Fri Mar 4 11:55:28 1997 Joerg Schilling + * scsi-linux-sg.c 1.3 + scsihack.c & scsi-linux-sg.c splitted + +Fri Mar 4 11:53:59 1997 Joerg Schilling + * scsihack.c 1.1 + date and time created 97/03/04 10:53:59 by joerg + +Fri Mar 4 11:52:42 1997 Joerg Schilling + * iso9660.h 1.2 + Quick hack for ANSI C + +Wed Mar 2 17:16:35 1997 Joerg Schilling + * scsi_cdr.c 1.8 + open_scsi() with verbose arg + write_track() & write_track_info() isaudio/preemp -> sectype + read_toc() new, read_header() new, read_track_info() new + first_writable_addr() now working + read_tochdr() new, read_trackinfo() new, read_session_offset() new + is_cddrive() new read_scsi() now korrekt with G0_MAXADDR & cnt < 256 + HACK XXX scsi_capacity to 2048 bytes Sectorsize initialized for mkisofs-1.10 + +Wed Mar 2 16:51:24 1997 Joerg Schilling + * scsitransp.c 1.12 + BAD -> EX_BAD, BOOL scsi_havebus() new + scsi_fileno(bus, tgt, lun) new with 3 Parameters, MAX_DMA_SUN386 new + +Wed Mar 2 16:46:44 1997 Joerg Schilling + * scsi-linux-sg.c 1.2 + better Kommentar + +Wed Mar 2 16:35:04 1997 Joerg Schilling + * scsitransp.h 1.9 + BOOL scsi_havebus() new, scsi_fileno(bus, tgt, lun) new with 3 Parameters + +Wed Mar 2 16:33:18 1997 Joerg Schilling + * scgio.h 2.6 + intriduced _SCGIO_H & bei __STDC__ 0xFF000000UL + +Wed Mar 2 16:14:35 1997 Joerg Schilling + * scsidefs.h 1.12 + BAD -> EX_BAD + +Wed Mar 2 16:14:04 1997 Joerg Schilling + * port.c 1.6 + include fmt.h only if #ifdef FMT + +Wed Mar 2 16:07:53 1997 Joerg Schilling + * scsi-linux-sg.c 1.1 + date and time created 97/03/02 15:07:53 by joerg + +Wed Mar 2 15:49:56 1997 Joerg Schilling + * iso9660.h 1.1 + date and time created 97/03/02 14:49:56 by joerg + +Wed Mar 2 15:48:55 1997 Joerg Schilling + * isosize.c 1.1 + date and time created 97/03/02 14:48:55 by joerg + +Wed Mar 2 15:40:32 1997 Joerg Schilling + * cdrecord.c 1.7 + toctname[] * sectname[] new + ldebug -> debug, HAVE_MLOCKALL, -msinfo new, -toc new + -audio/-mode2/-xa1/-xa2/-cdi new, -isosize new + better Check for options, print_msinfo() new, print_toc() new + HAVE_SYS_PRIOCNTL_H new + +Wed Mar 2 15:30:26 1997 Joerg Schilling + * cdrecord.h 1.5 + BAD -> EX_BAD in standard.h, TOC_* defines, ST_* defines, struct msf + several Interface changes for Prototypes + +Wed Jan 19 00:23:11 1997 Joerg Schilling + * cdrecord.c 1.6 + Changed to use scsi_buf_size() & scsi_getbuf(), better gcc Kompat. + +Wed Jan 12 23:11:18 1997 Joerg Schilling + * scsitransp.c 1.11 + Sbufsize -> long, scsi_maxdma() new + +Wed Jan 12 22:10:33 1997 Joerg Schilling + * scsitransp.h 1.8 + Sbufsize -> long + +Fri Jan 7 21:10:26 1997 Joerg Schilling + * port.c 1.5 + ANSI C & printf %ld + +Thu Jan 6 22:45:03 1997 Joerg Schilling + * scsitransp.h 1.7 + scsi_sense_key() & scsi_sense_code() from fmt.c + +Thu Jan 6 22:45:02 1997 Joerg Schilling + * scsitransp.c 1.10 + scsi_sense_key() & scsi_sense_code() from fmt.c + +Mon Jan 3 14:47:53 1997 Joerg Schilling + * scsitransp.h 1.6 + scsi_bufsize() & scsi_getbuf() new + +Mon Jan 3 14:47:52 1997 Joerg Schilling + * scsitransp.c 1.9 + scsi_bufsize() & scsi_getbuf() new + +Fri Dec 31 17:16:13 1996 Joerg Schilling + * scsireg.h 1.12 + Defekt List: length & list_block -> char[] for Byteorder + +Tue Dec 28 20:51:42 1996 Joerg Schilling + * scgio.h 2.5 + #error beseitigt for SunOS cc + +Tue Dec 28 14:28:01 1996 Joerg Schilling + * scsitransp.c 1.8 + debug -> kdebug + +Tue Dec 28 14:19:16 1996 Joerg Schilling + * scgio.h 2.4 + debug -> kdebug + +Sun Dec 19 16:18:18 1996 Joerg Schilling + * scsi_cdr.c 1.7 + Mitsumi + +Sun Dec 19 16:14:12 1996 Joerg Schilling + * README 1.5 + Performance X86 & Mitsumi + +Sat Dec 18 12:37:38 1996 Joerg Schilling + * scsierrs.c 2.11 + param.h, sys/buf.h, sun/dklabel.h, sun/dkio.h eliminated + +Sat Dec 18 03:26:04 1996 Joerg Schilling + * README 1.4 + Changes for Release 1.2 + +Sat Dec 18 03:24:14 1996 Joerg Schilling + * cdrecord.1 1.4 + Changes for Release 1.2 + +Sat Dec 18 03:13:41 1996 Joerg Schilling + * cdrecord.c 1.5 + -swab new + LOCAL functions + timings, new timeout for fixating + countdown timer before Start + write_track_info() disabled + -pad for audio, pad to 2352 bytes. + +Sun Dec 12 21:09:24 1996 Joerg Schilling + * scsi_cdr.c 1.6 + Flush cache & Fixation with big Timeout. + +Thu Nov 26 10:54:18 1996 Joerg Schilling + * scsierrs.c 2.10 + New Codes for CDD-2000 & Support for Yamaha CDR-100 + +Mon Dec 16 16:19:54 1996 J. Schilling + + * Added -swab option to support Yamaha audio + Thanks to (Fred) vecoven@montefiore.ulg.ac.be + for the hint. + * Added counter for quit time (9 seconds) + +Wed Dec 12 21:09:24 1996 J. Schilling + + * Flush cache & Fixation with separate bigger timeout, + other timeout reduced to 20sec. + +Mo Dec 3 13:03:30 1996 J. Schilling + + * Set sector size on all drive types before writing, + * Omwith the write_track_info Mode Select before write_track + even for Philips drives (this is currently not needed because + we don't support ISRC codes at this time). + +Tue Nov 26 10:54:18 1996 J. Schilling + + * New error codes for CDD-2000 & error code support for Yamaha CDR-100 + +Sun Nov 3 22:58:21 1996 J. Schilling + + * scsireset() aded to scsitransport.[hc] + * Timings for Track and Fixation + +Fri Oct 4 11:45:13 1996 J. Schilling + + * Version 1.1 released. + +Mon Aug 19 22:25:18 1996 J. Schilling + + * Read access test to allow cdrecord to run savely suid root + +Sun Aug 18 12:11:20 1996 J. Schilling + + * bit ordering problems solved + Thanks to Gert Poletiek for testing + +Tue Jun 18 21:38:51 1996 J. Schilling + + * several changes in scgio.h + +Sun Jun 16 15:56:35 1996 J. Schilling + + * Ansi C Protytypes + * priocntl added for Solaris + Thanks to Anders Lundgren + +Sun Feb 4 19:14:46 1996 J. Schilling + + * Initial release 1.0 diff -Nru cdrtools-2.01.01a33/.clean cdrtools-3.02a09/.clean --- cdrtools-2.01.01a33/.clean 2007-06-16 14:29:25.000000000 +0000 +++ cdrtools-3.02a09/.clean 2010-05-30 11:16:52.000000000 +0000 @@ -7,3 +7,10 @@ rm -f */tags */*/tags rm -f */TAGS */*/TAGS rm -rf proto/* packages/* + +if [ -f .links ]; then + rm -f `cat .links` +fi + +find . -name '*.[1-9].html' -perm -u=rw -exec rm {} + + diff -Nru cdrtools-2.01.01a33/COMPILE cdrtools-3.02a09/COMPILE --- cdrtools-2.01.01a33/COMPILE 2007-07-01 13:04:59.000000000 +0000 +++ cdrtools-3.02a09/COMPILE 2017-11-28 19:19:10.000000000 +0000 @@ -1,3 +1,5 @@ +# @(#)README.compile 1.35 17/11/28 Copyright 1997-2017 J. Schilling + Short overview for those who don't read manuals: Calling configure manually is outdated because this is a task of the @@ -13,16 +15,16 @@ All results in general will be placed into a directory named OBJ// in the current projects leaf directory. - You **need** either my "smake" program, the SunPRO make + You **need** either the Schily "smake" program, the SunPRO make from /usr/bin/make (SunOS 4.x) or /usr/ccs/bin/make (SunOS 5.x) - or GNU make to compile this program. Read README.gmake for + or GNU make to compile this program. Read READMEs/README.gmake for more information on gmake and a list of the most annoying bugs in gmake. All other make programs are either not smart enough or have bugs. My "smake" source is at: - ftp://ftp.berlios.de/pub/smake/alpha/ + https://sourceforge.net/projects/s-make/files/ It is easy to compile and doesn't need a working make program on your machine. If you don't have a working "make" program on the @@ -42,28 +44,32 @@ ***** Schily makefilesystem you cannot use GNU make. ***** ***** In this case, the automake features of smake are required. ***** + Note that GNU make has major bugs on various platforms and thus cannot + be used at all on VMS and OS/2. GNU make on Cygwin causes problems + because it does not deal with spaces and newlines correctly. + Please read the README's for your operating system too. WARNING Do not use 'mc' to extract the tar file! All mc versions before 4.0.14 cannot extract symbolic links correctly. - The versions of WinZip that support tar archives cannot be used too. + The versions of WinZip that support tar archives cannot be used either. The reason is that they don't support symbolic links. Star and Gnutar do support symbolic links even on win32 systems. To support symbolic links on win32, you need to link with the Cygwin32 POSIX library. - To unpack an archive use: + To unpack an archive, use: - gzip -d < some-arch.tar.gz | tar -xpf - + gzip -d < some-arch.tar.gz | tar xpf - - Replace 'star' by the actual archive name. + Replace 'some-arch.tar.gz' by the actual archive name. - If your Platform does not support hard links or symbolic links, you + If your platform does not support hard links or symbolic links, you first need to compile "star" and then call: - star -xpz -copy-links < some-arch.tar.gz + star -xp -copy-links < some-arch.tar.gz If your platform does not support hard links but supports symbolic links, you only need to call the command above once. @@ -87,10 +93,11 @@ all needed targets. Calling 'make install' will install all needed files. - This program uses a new makefilesystem. This makefilesystem uses - techniques and ideas from the 1980s and 1990s, is designed in a - modular way and allows sources to be combined in a modular way. - For mor information on the modular features read README.SSPM. + This program uses a new makefilesystem, introduced in 1993. This + makefilesystem uses techniques and ideas from the 1980s and 1990s, + is designed in a modular way and allows sources to be combined in a + modular way. For mor information on the modular features read + README.SSPM. The makefilesystem is optimized for a program called 'smake' Copyright 1985 by Jörg Schilling, but SunPro make (the make program @@ -104,10 +111,10 @@ Finding Compilation Results: - To allow this, all binaries and results of a 'compilation' in any form - are placed in sub-directories. This includes automatically generated - include files. Results in general will be placed into - a directory named OBJ// in the current projects + To allow simultaneous compilations, all binaries and results of a + 'compilation' in any form are placed in sub-directories. This includes + automatically generated include files. Results will in general be + placed into a directory named OBJ// in the current project's leaf directory, libraries will be placed into a directory called libs// that is located in the source tree root directory. @@ -121,8 +128,10 @@ To compile a system or sub-system, simply enter 'smake', 'make' or 'Gmake'. Compilation may be initialized at any point of the source - tree of a system. If compilation is started in a sub tree, all objects - in that sub tree will be made. + tree of a system. + + WARNING: If compilation is started in a sub tree, only all objects + in that sub tree will be made. This usually excludes needed libraries. How to install results: @@ -149,14 +158,17 @@ Using a different installation directory: - If your system does not yet use the standard installation path /opt + If your system does not yet use the standard installation path in + + /opt/ + or if you don't like this installation directory, you can easily change the installation directory. You may edit the DEFAULTS file for your system and modify the macro INS_BASE. You may use a different installation directory without editing the - DEFAULTS files. If you like to install everything in /usr/local, call: - + DEFAULTS files. If you like to install everything in the deprecated path + /usr/local, the next paragraph describes the procedure. If your make program supports to propagate make macros to sub make programs which is the case for recent smake releases as well as for a recent gnumake: @@ -165,19 +177,148 @@ or gmake INS_BASE=/usr/local install - If you make program doesn't propagate make macros (e.g. SunPRO make) call: + If your make program doesn't propagate make macros (e.g. SunPRO make), + call: env INS_BASE=/usr/local make -e install + Note that INS_BASE=/usr/local needs to be specified for every operation + that compiles or links programs, as the path may be stored inside the + binaries. + + The location for the root specific configuratin files is controlled + via the INS_RBASE= make macro. The default vaulue for this macro is "/". + If you like to install global default configuration files into + /usr/local/etc instead of /etc, you need to spefify INS_RBASE=/usr/local + + Note that some binaries have $(INS_BASE) and $(INS_RBASE) compiled into. + If you like to like to modify the compiled-in path values, call: + + smake clean + smake INS_BASE=/usr/local INS_RBASE=/usr/local + + +Setting up a different Link mode: + + The following link modes are available: + + static statical linking as in historical UNIX + + dynamic dynamic linking as introduced by SunOS + in 1987, Microsoft's DLLs, ... + The knowledge on how to achieve this for + a particular platform is hidden in the + makefile system. + + profiled Linking against profiled libraries. + Profiled libraries are prepared for the + use with "gprof" (introduced by BSD in the + late 1970s). + + The makefile system sets up a default linkmode in the patform + related defaults file (typically in the file DEFAULTS/Defaults.) + in the projects root directory. This is done with the entry: + + DEFLINKMODE= + + A different linkmode may be selected at compile/link time by e.g. calling: + + smake LINKMODE=dynamic + + If there are already existing binaries, call: + + smake relink LINKMODE=dynamic + + instead. + + +Compiling a different ELF RUNPATH into the binaries: + + In order to allow binaries to work correctly even if the shared + libraries are not in the default search path of the runtime linker, + a RUNPATH needs to be set. + + The ELF RUNPATH is by default derived from $(INS_BASE). If you like to + set INS_BASE=/usr and create binaries that do not include a RUNPATH at all, + call: + + smake relink RUNPATH= + + +Using a different man path prefix: + + Manual pages are by default installed under: + + $(INS_BASE)/$(MANBASE)/man + and MANBASE=share + + If you like a different prefix for man pages, call: + + smake DEFMANBASE=something install + + to install man pages into $(INS_BASE)/something/man/* + + If you like to install man pages under $(INS_BASE)/man/*, call + + smake DEFMANBASE=. install -Using a different C-compiler: +Installing stripped binaries: - If the configured default compiler is not present on the current machine, - the makefilesystem will try an automatic fallback to GCC. For this reason - in most cases you will not need to manually select a compiler. + If you like to install stripped binaries via "smake install", call: - The default C-compiler can be modified in the files in the - DEFAULT directory. If you want to have a different compiler + smake STRIPFLAGS=-s install + + This calls "strip" on every final install path for all executable + binaries. + +Installing to a prototype directory to implement package creation staging: + + If you like to create a prototype directory tree that is used as an + intermediate store for package creation, use the DESTDIR macro: + + smake INS_BASE=/usr/local DESTDIR=/tmp install + + This will compile in "/usr/local" as prefix into all related binaries + and then create a usr/local tree below /tmp (i.e. /tmp/usr/local). + + Note that you need to call "smake clean" before in case that the code + was previously compiled with different defaults with regards to INS_BASE + +Setting different default directory permissions for install directories: + + All directories that are created by the Schily makefile system in the + target directory path when + + smake install + + is called system use a special default 022 that is in DEFINSUMASK= + This causes all directories in the target install path to be created + with 0755 permissions. + + All other directories that are created by the Schily makefile system + use a single global default 002 that is in DEFUMASK= + + If you like to create install directories with e.g. 0775 permissions, + call: + + smake DEFINSUMASK=002 install + +Using a different C compiler: + + The *compiler family* is configured via the CCOM= make macro. This + selects a whole set of related macros that are needed to support a + specific compiler family. + + The *compiler family* usually defines a C compiler and a related + C++ compiler. + + If the configured default compiler family is not present on the current + machine, the makefilesystem will try an automatic fallback to GCC. For + this reason, in most cases, you will not need to manually select a + compiler. + + The default compiler family can be modified in the files in the + DEFAULT directory. If you want to have a different compiler family for one compilation, call: make CCOM=gcc @@ -197,8 +338,8 @@ It is not clear if GCC already supports other platforms in 64 bit mode. As all GCC versions before 3.1 did emit hundreds of compilation - warnings related to 64 bit bugs when compiling itself, there is little - hope that other platforms are already supported in 64 bit mode. + warnings related to 64 bit bugs when compiling itself, so there may be + other platforms are not supported in 64 bit mode. Creating executables using the Sun Studio compiler on Linux: @@ -215,14 +356,44 @@ lines like: "#if defined(__GNUC__) && !defined(__STRICT_ANSI__)" as well as the related #endif. +Creating executables using the clang compiler: + + Simply call: + + make CCOM=clang + + And in order to intentionally create 32 bit or 64 bit binaries, call: + make CCOM=clang64 + or + make CCOM=clang64 + + +Using a different compiler binary name: + + Call: -Getting help from make: + make CC=/opt/instrumented/bin/cc + + Note that all knowledge about the options of a compiler is derived + from the CCOM= variable, so if you like to use an instrumented gcc + variant, you may like to call: + + make CCOM=gcc CC=fluffy-gcc + + You may use CC="fluffy-gcc fluffy-gcc-specific options" if you like + to enforce specific options with the compiler. See hints on cross + compilation below. + + +Getting help from the make file system: For a list of targets call: make .help + .help is a special target that prints help for the makefile system. + Getting more information on the make file system: @@ -235,7 +406,7 @@ For further information read - ftp://ftp.berlios.de/pub/makefiles/PortableSoftware.ps.gz + http://sf.net/projects/schilytools/files/makefiles/PortableSoftware.ps.gz Hints for compilation: @@ -245,7 +416,7 @@ SunPro make will work as is. GNU make need some special preparation. - Read README.gmake for more information on gmake. + Read READMEs/README.gmake for more information on gmake. To use GNU make create a file called 'Gmake' in your search path that contains: @@ -255,14 +426,14 @@ export MAKEPROG exec gmake "$@" - and call 'Gmake' instead of gmake. On Linux there is no gmake, 'make' - on Linux is really a gmake. + and call 'Gmake' instead of gmake. On Linux, there is no gmake, the + program installed as 'make' on Linux is really a gmake. 'Gmake' and 'Gmake.linux' are part of this distribution. Some versions of gmake are very buggy. There are e.g. versions of gmake on some architectures that will not correctly recognize the default - target. In this case call 'make all' or ../Gmake all'. + target. In this case, call 'make all' or '../Gmake all'. Note that pseudo error messages from gmake similar to: @@ -270,7 +441,7 @@ ../RULES/rules.cnf:58: ../incs/sparc-sunos5-cc/Inull: No such file or directory ../RULES/rules.cnf:59: ../incs/sparc-sunos5-cc/rules.cnf: No such file or directory - Are a result of a bug un GNU make. The make file system itself is + are a result of a bug in GNU make. The make file system itself is correct (as you could prove by using smake). If your gmake version still has this bug, send a bug report to: @@ -281,7 +452,7 @@ If you like to use 'smake', please always compile it from source. The packages are located on: - ftp://ftp.berlios.de/pub/smake/alpha/ + https://sourceforge.net/projects/s-make/files/alpha/ Smake has a -D flag to see the actual makefile source used and a -d flag that gives easy to read debugging info. Use smake -xM @@ -292,8 +463,8 @@ The defaults found in the directory DEFAULTS are configured to give minimum warnings. This is made because many people will - be irritated by warning messages and because the GNU c-compiler - will give warnings for perfectly correct and portable c-code. + be irritated by warning messages and because the GNU C compiler + will give warnings for perfectly correct and portable C code. If you want to port code to new platforms or do engineering on the code, you should use the alternate set of defaults found @@ -303,6 +474,19 @@ make DEFAULTSDIR=DEFAULTS_ENG + Note however, that some GCC versions print a lot of wrong warnings + in this mode. Well known problems with GCC warnings are: + + - The recursive printf format "%r" that is in use since ~ 1980 + is not supported and causes a lot of incorrect warnings as + GCC does not know that "%r" takes 2 parameters. + + - The standard C construct "(void) read(fd, buf, sizeof (buf))" + is flagged by some versions of GCC even though the void cast + is a clear expression of the fact that the return code from read + is intentionally ignored. This may cause many useless warnings + for last resort error messages used in programs. + Compiling the project to allow debugging with dbx/gdb: @@ -312,15 +496,38 @@ make clean make COPTX=-g LDOPTX=-g + If your debugger does not like optimized binaries, call something + like: + + make "COPTX=-g -xO0" LDOPTX=-g + or + make "COPTX=-g -O0" LDOPTX=-g + + depending on the option system used by your C compiler. + + +Compiling the project to allow performance monitoring with gprof from BSD: + + If you like to compile for performance monitoriing with gprof, + call: + + make clean + make COPTX=-xpg LDOPTX=-xpg LINKMODE=profiled + + or + make COPTX=-pg LDOPTX=-pg LINKMODE=profiled -Creting Blastwave packages: + depending on the option system used by your C compiler. + + +Creating Blastwave packages: Call: .clean smake -f Mcsw You need the program "fakeroot" and will find the results - in packages/ + in packages/. Note that a single program source tree will allow you to create packages like CSWstar but not the packages CSWschilybase and @@ -332,7 +539,7 @@ If you want to see an example, please have a look at the "star" source. It may be found on: - ftp://ftp.berlios.de/pub/star + http://sourceforge.net/projects/s-tar/files/ Have a look at the manual page, it is included in the distribution. Install the manual page with @@ -345,6 +552,205 @@ man -F +Compiling in a cross compilation environment: + + The Schily autoconf system has been enhanced to support cross + compilation. Schily autoconf is based on GNU autoconf-2.13 and + GNU autoconf does not support cross compilation because it needs + to run scripts on the target system for some of the tests. + + The "configure" script that is delivered with the Schily makefile + system runs more than 770 tests and aprox 70 of them need to be + run on the target system. + + The Schily autoconf system now supports a method to run these ~70 + tests natively on a target system. You either need a target machine + with remote login features or you need an emulator with a method to + copy files into the emulated system and to run binaries on the + emulated system as e.g. the Android emulator. + + We currently deliver three scripts for "remote" execution of + programs on the target system: + + runrmt_ssh runs the commands remove via ssh + runrmt_rsh runs the commands remove via rsh + runrmt_android runs the commands remove via the debug bridge + + If you need to remotely run programs on a system that is not + supported by one of there three scripts, you need to modify one + of them to match your needs. + + To enable Cross Compilation use the following environment variables: + + CONFIG_RMTCALL= Set up to point to a script that does + the remote execution, e.g.: + + CONFIG_RMTCALL=`pwd`/conf/runrmt_ssh + + CONFIG_RMTHOST= Set up to point to your remote host, e.g.: + + CONFIG_RMTHOST=hostname + or + CONFIG_RMTHOST=user@hostname + + use a dummy if you like to use something + like the Android emulator. + + CONFIG_RMTDEBUG= Set to something non-null in order to + let the remote execution script mark + remote comands. This will result in + configure messages like: + + checking bits in minor device number... REMOTE 8 + + If you cannot run commands on the target + platform, you may set: + + CONFIG_RMTDEBUG=true + CONFIG_RMTCALL=: + + carefully watch for the "REMOTE" flagged test + output and later manually edit the file: + + incs//xconfig.h + + Do not forget to manually edit the files: + + incs//align.h + and + incs//avoffset.h + + Note that smake includes automake features that automatically + retrieve system ID information. For this reason, you need to overwrite + related macros from the command line if you like to do a + cross compilation. + + Related make macros: + + K_ARCH= # (sun4v) Kernel ARCH filled from uname -m / arch -k + M_ARCH= # (sun4) Machine filled from arch + P_ARCH= # (sparc) CPU ARCH filled from uname -p / mach + OSNAME= # sunos, linux, .... + OSREL= # 5.11 + OSVERSION= # snv_130 + CCOM= # generic compiler name (e.g. "gcc") + CC= # compiler to call (name for binary) + CC_COM= # compiler to call (name + basic args) + + ARCH= overwrites M_ARCH and P_ARCH + + It is usually suffucient to set ARCH and OSNAME. + + In order to use a cross compiler environment instead of a native compiler, + set the make macro CC_COM or CC to something different than "cc". + + If you are on Linux and like to compile for Android, do the following: + + 1) set up CC acording to the instructions from the cross compiler + tool chain. Important: you need to read the information for your + tool chain. A working setup may look similar to: + + NDK=/home/joerg/android-ndk-r7 + SYSROOT=\$NDK/platforms/android-14/arch-arm + CC="\$NDK/toolchains/arm-linux-androideabi-4.4.3/prebuilt/linux-x86/bin/arm-linux-androideabi-gcc --sysroot=\$SYSROOT" + export NDK + export SYSROOT + export CC + + + 2) set environment variables CONFIG_RMTCALL / CONFIG_RMTHOST, e.g.: + setenv CONFIG_RMTCALL `pwd`/conf/runrmt_android + setenv CONFIG_RMTHOST NONE + + 3) call smake: + + smake ARCH=armv5 OSNAME=linux CCOM=gcc "CC_COM=$CC" + + or + + smake ARCH=armv5 OSNAME=linux CCOM=gcc "CC=$CC" + + +Compiling with the address sanitizer: + + Be careful with a compiler enhancement called "addess sanitizer". + + First a note: the address sanitizer needs a lot of memory when in + 64-bit mode. For this reason, it is recommended to run the tests + in 32-bit mode as it may be impossible to provdie a sufficient amount + of memory for the 64-bit mode. + + 1) The address sanitizer may cause autoconf to behave incorrectly in + case that the compiler options used by the "configure" run include the + address sanitizer. It seems that in addition, the address sanitizer + adds more libraries to the link list and as a result prevents + the correct autoconf decision on whether a specific library from + a "configure" test is needed by some binaries. + + If you are not sure about the current state of the source tree, start + with calling: + + ./.clean + + in the top level source directory. This makes the source tree to behave + as if if was recently unpacked from the tar archive. + + Then run run e.g.: + + cd inc/ + smake CCOM=gcc32 + cd .. + + to prepare the auto-configuration without using the address sanitizer. + This special treatment is needed as the assumptions in the address + sanitizer would not allow us to run the autoconfiguration code + correctly. + + 2) The address sanitizer by default ignores installed SIGSEGV handlers + and thus ignores the intention of the author of the code. + + The correct behavior may be switched on via setting the environment + variable: + + ASAN_OPTIONS=allow_user_segv_handler=true + + As a redult, the command line to compile the code after the + auto-configuration has been done as mentioned above is: + + ASAN_OPTIONS=allow_user_segv_handler=true smake CCOM=gcc32 COPTX="-g -O0 -fsanitize=address" LDOPTX="-g -fsanitize=address" + + 3) If you are on Linux, do not forget to call "ulimit -c unlimited", + before calling the binary. This is needed as the default on Linux is + not to create a core file. + + 4) Set the environment ASAN_OPTIONS= for the execution of the binary + to control the behavior of the Address Sanitizer while the binary + is run. + + If you like to disable the memory leak detection because your program + is a short running program that intentionally does not free() resources + before calling exit(), use: + + ASAN_OPTIONS=allow_user_segv_handler=true:detect_leaks=0 + + If you also like to get a core dump on error to debug, you may like + to use: + + ASAN_OPTIONS=allow_user_segv_handler=true:detect_leaks=0:abort_on_error=1 + + Note that the Address Sanitizer disables the creation of a core file + for 64 bit binaries as the tables used by the Address Sanitizer may + cause the core file to have a size of 16 TB. + + +Compiling with the "Americal fuzzy lop": + + Follow the instruction from above for the address sanitizer, but + use this command line to call the compiler: + + ASAN_OPTIONS=allow_user_segv_handler=true AFL_HARDEN=1 AFL_USE_ASAN=1 smake CC=afl-gcc CCOM=gcc32 + + Author: Joerg Schilling @@ -353,6 +759,6 @@ Germany Email: joerg@schily.isdn.cs.tu-berlin.de, js@cs.tu-berlin.de - schilling@fokus.fhg.de + joerg.schilling@fokus.fraunhofer.de Please mail bugs and suggestions to me. diff -Nru cdrtools-2.01.01a33/conf/acgeneral.m4 cdrtools-3.02a09/conf/acgeneral.m4 --- cdrtools-2.01.01a33/conf/acgeneral.m4 2007-04-20 11:04:49.000000000 +0000 +++ cdrtools-3.02a09/conf/acgeneral.m4 1970-01-01 00:00:00.000000000 +0000 @@ -1,2612 +0,0 @@ -dnl Parameterized macros. -dnl Requires GNU m4. -dnl This file is part of Autoconf. -dnl Copyright (C) 1992, 93, 94, 95, 96, 1998 Free Software Foundation, Inc. -dnl -dnl This program is free software; you can redistribute it and/or modify -dnl it under the terms of the GNU General Public License as published by -dnl the Free Software Foundation; either version 2, or (at your option) -dnl any later version. -dnl -dnl This program is distributed in the hope that it will be useful, -dnl but WITHOUT ANY WARRANTY; without even the implied warranty of -dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -dnl GNU General Public License for more details. -dnl -dnl You should have received a copy of the GNU General Public License -dnl along with this program; if not, write to the Free Software -dnl Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA -dnl 02111-1307, USA. -dnl -dnl As a special exception, the Free Software Foundation gives unlimited -dnl permission to copy, distribute and modify the configure scripts that -dnl are the output of Autoconf. You need not follow the terms of the GNU -dnl General Public License when using or distributing such scripts, even -dnl though portions of the text of Autoconf appear in them. The GNU -dnl General Public License (GPL) does govern all other use of the material -dnl that constitutes the Autoconf program. -dnl -dnl Certain portions of the Autoconf source text are designed to be copied -dnl (in certain cases, depending on the input) into the output of -dnl Autoconf. We call these the "data" portions. The rest of the Autoconf -dnl source text consists of comments plus executable code that decides which -dnl of the data portions to output in any given case. We call these -dnl comments and executable code the "non-data" portions. Autoconf never -dnl copies any of the non-data portions into its output. -dnl -dnl This special exception to the GPL applies to versions of Autoconf -dnl released by the Free Software Foundation. When you make and -dnl distribute a modified version of Autoconf, you may extend this special -dnl exception to the GPL to apply to your modified version as well, *unless* -dnl your modified version has the potential to copy into its output some -dnl of the text that was the non-data portion of the version that you started -dnl with. (In other words, unless your change moves or copies text from -dnl the non-data portions to the data portions.) If your modification has -dnl such potential, you must delete any notice of this special exception -dnl to the GPL from your modified version. -dnl -dnl Written by David MacKenzie, with help from -dnl Franc,ois Pinard, Karl Berry, Richard Pixley, Ian Lance Taylor, -dnl Roland McGrath, Noah Friedman, david d zuhn, and many others. -dnl -divert(-1)dnl Throw away output until AC_INIT is called. -changequote([, ]) - -define(AC_ACVERSION, 2.13) - -dnl Some old m4's don't support m4exit. But they provide -dnl equivalent functionality by core dumping because of the -dnl long macros we define. -ifdef([__gnu__], , [errprint(Autoconf requires GNU m4. -Install it before installing Autoconf or set the -M4 environment variable to its path name. -)m4exit(2)]) - -undefine([eval]) -undefine([include]) -undefine([shift]) -undefine([format]) - - -dnl ### Defining macros - - -dnl m4 output diversions. We let m4 output them all in order at the end, -dnl except that we explicitly undivert AC_DIVERSION_SED, AC_DIVERSION_CMDS, -dnl and AC_DIVERSION_ICMDS. - -dnl AC_DIVERSION_NOTICE - 1 (= 0) AC_REQUIRE'd #! /bin/sh line -define(AC_DIVERSION_NOTICE, 1)dnl copyright notice & option help strings -define(AC_DIVERSION_INIT, 2)dnl initialization code -define(AC_DIVERSION_NORMAL_4, 3)dnl AC_REQUIRE'd code, 4 level deep -define(AC_DIVERSION_NORMAL_3, 4)dnl AC_REQUIRE'd code, 3 level deep -define(AC_DIVERSION_NORMAL_2, 5)dnl AC_REQUIRE'd code, 2 level deep -define(AC_DIVERSION_NORMAL_1, 6)dnl AC_REQUIRE'd code, 1 level deep -define(AC_DIVERSION_NORMAL, 7)dnl the tests and output code -define(AC_DIVERSION_SED, 8)dnl variable substitutions in config.status -define(AC_DIVERSION_CMDS, 9)dnl extra shell commands in config.status -define(AC_DIVERSION_ICMDS, 10)dnl extra initialization in config.status - -dnl Change the diversion stream to STREAM, while stacking old values. -dnl AC_DIVERT_PUSH(STREAM) -define(AC_DIVERT_PUSH, -[pushdef([AC_DIVERSION_CURRENT], $1)dnl -divert(AC_DIVERSION_CURRENT)dnl -]) - -dnl Change the diversion stream to its previous value, unstacking it. -dnl AC_DIVERT_POP() -define(AC_DIVERT_POP, -[popdef([AC_DIVERSION_CURRENT])dnl -divert(AC_DIVERSION_CURRENT)dnl -]) - -dnl Initialize the diversion setup. -define([AC_DIVERSION_CURRENT], AC_DIVERSION_NORMAL) -dnl This will be popped by AC_REQUIRE in AC_INIT. -pushdef([AC_DIVERSION_CURRENT], AC_DIVERSION_NOTICE) - -dnl The prologue for Autoconf macros. -dnl AC_PRO(MACRO-NAME) -define(AC_PRO, -[define([AC_PROVIDE_$1], )dnl -ifelse(AC_DIVERSION_CURRENT, AC_DIVERSION_NORMAL, -[AC_DIVERT_PUSH(builtin(eval, AC_DIVERSION_CURRENT - 1))], -[pushdef([AC_DIVERSION_CURRENT], AC_DIVERSION_CURRENT)])dnl -]) - -dnl The Epilogue for Autoconf macros. -dnl AC_EPI() -define(AC_EPI, -[AC_DIVERT_POP()dnl -ifelse(AC_DIVERSION_CURRENT, AC_DIVERSION_NORMAL, -[undivert(AC_DIVERSION_NORMAL_4)dnl -undivert(AC_DIVERSION_NORMAL_3)dnl -undivert(AC_DIVERSION_NORMAL_2)dnl -undivert(AC_DIVERSION_NORMAL_1)dnl -])dnl -]) - -dnl Define a macro which automatically provides itself. Add machinery -dnl so the macro automatically switches expansion to the diversion -dnl stack if it is not already using it. In this case, once finished, -dnl it will bring back all the code accumulated in the diversion stack. -dnl This, combined with AC_REQUIRE, achieves the topological ordering of -dnl macros. We don't use this macro to define some frequently called -dnl macros that are not involved in ordering constraints, to save m4 -dnl processing. -dnl AC_DEFUN(NAME, EXPANSION) -define([AC_DEFUN], -[define($1, [AC_PRO([$1])$2[]AC_EPI()])]) - - -dnl ### Initialization - - -dnl AC_INIT_NOTICE() -AC_DEFUN(AC_INIT_NOTICE, -[# Guess values for system-dependent variables and create Makefiles. -# Generated automatically using autoconf version] AC_ACVERSION [ -# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc. -# -# This configure script is free software; the Free Software Foundation -# gives unlimited permission to copy, distribute and modify it. - -# Defaults: -ac_help= -ac_default_prefix=/usr/local -[#] Any additions from configure.in:]) - -dnl AC_PREFIX_DEFAULT(PREFIX) -AC_DEFUN(AC_PREFIX_DEFAULT, -[AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)dnl -ac_default_prefix=$1 -AC_DIVERT_POP()]) - -dnl AC_INIT_PARSE_ARGS() -AC_DEFUN(AC_INIT_PARSE_ARGS, -[ -# Initialize some variables set by options. -# The variables have the same names as the options, with -# dashes changed to underlines. -build=NONE -cache_file=./config.cache -exec_prefix=NONE -host=NONE -no_create= -nonopt=NONE -no_recursion= -prefix=NONE -program_prefix=NONE -program_suffix=NONE -program_transform_name=s,x,x, -silent= -site= -srcdir= -target=NONE -verbose= -x_includes=NONE -x_libraries=NONE -dnl Installation directory options. -dnl These are left unexpanded so users can "make install exec_prefix=/foo" -dnl and all the variables that are supposed to be based on exec_prefix -dnl by default will actually change. -dnl Use braces instead of parens because sh, perl, etc. also accept them. -bindir='${exec_prefix}/bin' -sbindir='${exec_prefix}/sbin' -libexecdir='${exec_prefix}/libexec' -datadir='${prefix}/share' -sysconfdir='${prefix}/etc' -sharedstatedir='${prefix}/com' -localstatedir='${prefix}/var' -libdir='${exec_prefix}/lib' -includedir='${prefix}/include' -oldincludedir='/usr/include' -infodir='${prefix}/info' -mandir='${prefix}/man' - -# Initialize some other variables. -subdirs= -MFLAGS= MAKEFLAGS= -SHELL=${CONFIG_SHELL-/bin/sh} -# Maximum number of lines to put in a shell here document. -ac_max_here_lines=12 - -ac_prev= -for ac_option -do - - # If the previous option needs an argument, assign it. - if test -n "$ac_prev"; then - eval "$ac_prev=\$ac_option" - ac_prev= - continue - fi - - case "$ac_option" in -changequote(, )dnl - -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;; -changequote([, ])dnl - *) ac_optarg= ;; - esac - - # Accept the important Cygnus configure options, so we can diagnose typos. - - case "$ac_option" in - - -bindir | --bindir | --bindi | --bind | --bin | --bi) - ac_prev=bindir ;; - -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) - bindir="$ac_optarg" ;; - - -build | --build | --buil | --bui | --bu) - ac_prev=build ;; - -build=* | --build=* | --buil=* | --bui=* | --bu=*) - build="$ac_optarg" ;; - - -cache-file | --cache-file | --cache-fil | --cache-fi \ - | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) - ac_prev=cache_file ;; - -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ - | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) - cache_file="$ac_optarg" ;; - - -cc=* | --cc=* ) - CC="$ac_optarg" ; echo using $CC as compiler ;; - - -datadir | --datadir | --datadi | --datad | --data | --dat | --da) - ac_prev=datadir ;; - -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \ - | --da=*) - datadir="$ac_optarg" ;; - - -disable-* | --disable-*) - ac_feature=`echo $ac_option|sed -e 's/-*disable-//'` - # Reject names that are not valid shell variable names. -changequote(, )dnl - if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then -changequote([, ])dnl - AC_MSG_ERROR($ac_feature: invalid feature name) - fi - ac_feature=`echo $ac_feature| sed 's/-/_/g'` - eval "enable_${ac_feature}=no" ;; - - -enable-* | --enable-*) - ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'` - # Reject names that are not valid shell variable names. -changequote(, )dnl - if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then -changequote([, ])dnl - AC_MSG_ERROR($ac_feature: invalid feature name) - fi - ac_feature=`echo $ac_feature| sed 's/-/_/g'` - case "$ac_option" in - *=*) ;; - *) ac_optarg=yes ;; - esac - eval "enable_${ac_feature}='$ac_optarg'" ;; - - -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ - | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ - | --exec | --exe | --ex) - ac_prev=exec_prefix ;; - -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ - | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ - | --exec=* | --exe=* | --ex=*) - exec_prefix="$ac_optarg" ;; - - -gas | --gas | --ga | --g) - # Obsolete; use --with-gas. - with_gas=yes ;; - - -help | --help | --hel | --he) - # Omit some internal or obsolete options to make the list less imposing. - # This message is too long to be a string in the A/UX 3.1 sh. - cat << EOF -changequote(, )dnl -Usage: configure [options] [host] -Options: [defaults in brackets after descriptions] -Configuration: - --cache-file=FILE cache test results in FILE - --help print this message - --no-create do not create output files - --quiet, --silent do not print \`checking...' messages - --version print the version of autoconf that created configure -Directory and file names: - --prefix=PREFIX install architecture-independent files in PREFIX - [$ac_default_prefix] - --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX - [same as prefix] - --bindir=DIR user executables in DIR [EPREFIX/bin] - --sbindir=DIR system admin executables in DIR [EPREFIX/sbin] - --libexecdir=DIR program executables in DIR [EPREFIX/libexec] - --datadir=DIR read-only architecture-independent data in DIR - [PREFIX/share] - --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc] - --sharedstatedir=DIR modifiable architecture-independent data in DIR - [PREFIX/com] - --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var] - --libdir=DIR object code libraries in DIR [EPREFIX/lib] - --includedir=DIR C header files in DIR [PREFIX/include] - --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include] - --infodir=DIR info documentation in DIR [PREFIX/info] - --mandir=DIR man documentation in DIR [PREFIX/man] - --srcdir=DIR find the sources in DIR [configure dir or ..] - --program-prefix=PREFIX prepend PREFIX to installed program names - --program-suffix=SUFFIX append SUFFIX to installed program names - --program-transform-name=PROGRAM - run sed PROGRAM on installed program names -EOF - cat << EOF -Host type: - --build=BUILD configure for building on BUILD [BUILD=HOST] - --host=HOST configure for HOST [guessed] - --target=TARGET configure for TARGET [TARGET=HOST] -Features and packages: - --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) - --enable-FEATURE[=ARG] include FEATURE [ARG=yes] - --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] - --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) - --x-includes=DIR X include files are in DIR - --x-libraries=DIR X library files are in DIR -changequote([, ])dnl -EOF - if test -n "$ac_help"; then - echo "--enable and --with options recognized:$ac_help" - fi - exit 0 ;; - - -host | --host | --hos | --ho) - ac_prev=host ;; - -host=* | --host=* | --hos=* | --ho=*) - host="$ac_optarg" ;; - - -includedir | --includedir | --includedi | --included | --include \ - | --includ | --inclu | --incl | --inc) - ac_prev=includedir ;; - -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ - | --includ=* | --inclu=* | --incl=* | --inc=*) - includedir="$ac_optarg" ;; - - -infodir | --infodir | --infodi | --infod | --info | --inf) - ac_prev=infodir ;; - -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) - infodir="$ac_optarg" ;; - - -libdir | --libdir | --libdi | --libd) - ac_prev=libdir ;; - -libdir=* | --libdir=* | --libdi=* | --libd=*) - libdir="$ac_optarg" ;; - - -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ - | --libexe | --libex | --libe) - ac_prev=libexecdir ;; - -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ - | --libexe=* | --libex=* | --libe=*) - libexecdir="$ac_optarg" ;; - - -localstatedir | --localstatedir | --localstatedi | --localstated \ - | --localstate | --localstat | --localsta | --localst \ - | --locals | --local | --loca | --loc | --lo) - ac_prev=localstatedir ;; - -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ - | --localstate=* | --localstat=* | --localsta=* | --localst=* \ - | --locals=* | --local=* | --loca=* | --loc=* | --lo=*) - localstatedir="$ac_optarg" ;; - - -mandir | --mandir | --mandi | --mand | --man | --ma | --m) - ac_prev=mandir ;; - -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) - mandir="$ac_optarg" ;; - - -nfp | --nfp | --nf) - # Obsolete; use --without-fp. - with_fp=no ;; - - -no-create | --no-create | --no-creat | --no-crea | --no-cre \ - | --no-cr | --no-c) - no_create=yes ;; - - -no-recursion | --no-recursion | --no-recursio | --no-recursi \ - | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) - no_recursion=yes ;; - - -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ - | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ - | --oldin | --oldi | --old | --ol | --o) - ac_prev=oldincludedir ;; - -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ - | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ - | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) - oldincludedir="$ac_optarg" ;; - - -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) - ac_prev=prefix ;; - -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) - prefix="$ac_optarg" ;; - - -program-prefix | --program-prefix | --program-prefi | --program-pref \ - | --program-pre | --program-pr | --program-p) - ac_prev=program_prefix ;; - -program-prefix=* | --program-prefix=* | --program-prefi=* \ - | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) - program_prefix="$ac_optarg" ;; - - -program-suffix | --program-suffix | --program-suffi | --program-suff \ - | --program-suf | --program-su | --program-s) - ac_prev=program_suffix ;; - -program-suffix=* | --program-suffix=* | --program-suffi=* \ - | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) - program_suffix="$ac_optarg" ;; - - -program-transform-name | --program-transform-name \ - | --program-transform-nam | --program-transform-na \ - | --program-transform-n | --program-transform- \ - | --program-transform | --program-transfor \ - | --program-transfo | --program-transf \ - | --program-trans | --program-tran \ - | --progr-tra | --program-tr | --program-t) - ac_prev=program_transform_name ;; - -program-transform-name=* | --program-transform-name=* \ - | --program-transform-nam=* | --program-transform-na=* \ - | --program-transform-n=* | --program-transform-=* \ - | --program-transform=* | --program-transfor=* \ - | --program-transfo=* | --program-transf=* \ - | --program-trans=* | --program-tran=* \ - | --progr-tra=* | --program-tr=* | --program-t=*) - program_transform_name="$ac_optarg" ;; - - -q | -quiet | --quiet | --quie | --qui | --qu | --q \ - | -silent | --silent | --silen | --sile | --sil) - silent=yes ;; - - -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) - ac_prev=sbindir ;; - -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ - | --sbi=* | --sb=*) - sbindir="$ac_optarg" ;; - - -sharedstatedir | --sharedstatedir | --sharedstatedi \ - | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ - | --sharedst | --shareds | --shared | --share | --shar \ - | --sha | --sh) - ac_prev=sharedstatedir ;; - -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ - | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ - | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ - | --sha=* | --sh=*) - sharedstatedir="$ac_optarg" ;; - - -site | --site | --sit) - ac_prev=site ;; - -site=* | --site=* | --sit=*) - site="$ac_optarg" ;; - - -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) - ac_prev=srcdir ;; - -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) - srcdir="$ac_optarg" ;; - - -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ - | --syscon | --sysco | --sysc | --sys | --sy) - ac_prev=sysconfdir ;; - -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ - | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) - sysconfdir="$ac_optarg" ;; - - -target | --target | --targe | --targ | --tar | --ta | --t) - ac_prev=target ;; - -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) - target="$ac_optarg" ;; - - -v | -verbose | --verbose | --verbos | --verbo | --verb) - verbose=yes ;; - - -version | --version | --versio | --versi | --vers) - echo "configure generated by autoconf version AC_ACVERSION" - exit 0 ;; - - -with-* | --with-*) - ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'` - # Reject names that are not valid shell variable names. -changequote(, )dnl - if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then -changequote([, ])dnl - AC_MSG_ERROR($ac_package: invalid package name) - fi - ac_package=`echo $ac_package| sed 's/-/_/g'` - case "$ac_option" in - *=*) ;; - *) ac_optarg=yes ;; - esac - eval "with_${ac_package}='$ac_optarg'" ;; - - -without-* | --without-*) - ac_package=`echo $ac_option|sed -e 's/-*without-//'` - # Reject names that are not valid shell variable names. -changequote(, )dnl - if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then -changequote([, ])dnl - AC_MSG_ERROR($ac_package: invalid package name) - fi - ac_package=`echo $ac_package| sed 's/-/_/g'` - eval "with_${ac_package}=no" ;; - - --x) - # Obsolete; use --with-x. - with_x=yes ;; - - -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ - | --x-incl | --x-inc | --x-in | --x-i) - ac_prev=x_includes ;; - -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ - | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) - x_includes="$ac_optarg" ;; - - -x-libraries | --x-libraries | --x-librarie | --x-librari \ - | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) - ac_prev=x_libraries ;; - -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ - | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) - x_libraries="$ac_optarg" ;; - - -*) AC_MSG_ERROR([$ac_option: invalid option; use --help to show usage]) - ;; - - *) -changequote(, )dnl - if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then -changequote([, ])dnl - AC_MSG_WARN($ac_option: invalid host type) - fi - if test "x$nonopt" != xNONE; then - AC_MSG_ERROR(can only configure for one host and one target at a time) - fi - nonopt="$ac_option" - ;; - - esac -done - -if test -n "$ac_prev"; then - AC_MSG_ERROR(missing argument to --`echo $ac_prev | sed 's/_/-/g'`) -fi -]) - -dnl Try to have only one #! line, so the script doesn't look funny -dnl for users of AC_REVISION. -dnl AC_INIT_BINSH() -AC_DEFUN(AC_INIT_BINSH, -[#! /bin/sh -]) - -dnl AC_INIT(UNIQUE-FILE-IN-SOURCE-DIR) -AC_DEFUN(AC_INIT, -[sinclude(acsite.m4)dnl -sinclude(./aclocal.m4)dnl -AC_REQUIRE([AC_INIT_BINSH])dnl -AC_INIT_NOTICE -AC_DIVERT_POP()dnl to NORMAL -AC_DIVERT_PUSH(AC_DIVERSION_INIT)dnl -AC_INIT_PARSE_ARGS -AC_INIT_PREPARE($1)dnl -AC_DIVERT_POP()dnl to NORMAL -]) - -dnl AC_INIT_PREPARE(UNIQUE-FILE-IN-SOURCE-DIR) -AC_DEFUN(AC_INIT_PREPARE, -[trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15 - -# File descriptor usage: -# 0 standard input -# 1 file creation -# 2 errors and warnings -# 3 some systems may open it to /dev/tty -# 4 used on the Kubota Titan -define(AC_FD_MSG, 6)dnl -[#] AC_FD_MSG checking for... messages and results -define(AC_FD_CC, 5)dnl -[#] AC_FD_CC compiler messages saved in config.log -if test "$silent" = yes; then - exec AC_FD_MSG>/dev/null -else - exec AC_FD_MSG>&1 -fi -exec AC_FD_CC>./config.log - -echo "\ -This file contains any messages produced by compilers while -running configure, to aid debugging if configure makes a mistake. -" 1>&AC_FD_CC - -# Strip out --no-create and --no-recursion so they do not pile up. -# Also quote any args containing shell metacharacters. -ac_configure_args= -for ac_arg -do - case "$ac_arg" in - -no-create | --no-create | --no-creat | --no-crea | --no-cre \ - | --no-cr | --no-c) ;; - -no-recursion | --no-recursion | --no-recursio | --no-recursi \ - | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;; -changequote(<<, >>)dnl -dnl If you change this globbing pattern, test it on an old shell -- -dnl it's sensitive. Putting any kind of quote in it causes syntax errors. - *" "*|*" "*|*[\[\]\~\<<#>>\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*) - ac_configure_args="$ac_configure_args '$ac_arg'" ;; -changequote([, ])dnl - *) ac_configure_args="$ac_configure_args $ac_arg" ;; - esac -done - -# NLS nuisances. -# Only set these to C if already set. These must not be set unconditionally -# because not all systems understand e.g. LANG=C (notably SCO). -# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'! -# Non-C LC_CTYPE values break the ctype check. -if test "${LANG+set}" = set; then LANG=C; export LANG; fi -if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi -if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi -if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi - -# confdefs.h avoids OS command line length limits that DEFS can exceed. -rm -rf conftest* confdefs.h -# AIX cpp loses on an empty file, so make sure it contains at least a newline. -echo > confdefs.h - -# A filename unique to this package, relative to the directory that -# configure is in, which we can look for to find out if srcdir is correct. -ac_unique_file=$1 - -# Find the source files, if location was not specified. -if test -z "$srcdir"; then - ac_srcdir_defaulted=yes - # Try the directory containing this script, then its parent. - ac_prog=[$]0 -changequote(, )dnl - ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'` -changequote([, ])dnl - test "x$ac_confdir" = "x$ac_prog" && ac_confdir=. - srcdir=$ac_confdir - if test ! -r $srcdir/$ac_unique_file; then - srcdir=.. - fi -else - ac_srcdir_defaulted=no -fi -if test ! -r $srcdir/$ac_unique_file; then - if test "$ac_srcdir_defaulted" = yes; then - AC_MSG_ERROR(can not find sources in $ac_confdir or ..) - else - AC_MSG_ERROR(can not find sources in $srcdir) - fi -fi -dnl Double slashes in pathnames in object file debugging info -dnl mess up M-x gdb in Emacs. -changequote(, )dnl -srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'` -changequote([, ])dnl - -dnl Let the site file select an alternate cache file if it wants to. -AC_SITE_LOAD -AC_CACHE_LOAD -AC_LANG_C -dnl By default always use an empty string as the executable -dnl extension. Only change it if the script calls AC_EXEEXT. -ac_exeext= -ac_xexeext= -dnl By default assume that objects files use an extension of .o. Only -dnl change it if the script calls AC_OBJEXT. -ac_objext=o -AC_PROG_ECHO_N -dnl Substitute for predefined variables. -AC_SUBST(SHELL)dnl -AC_SUBST(CFLAGS)dnl -AC_SUBST(CPPFLAGS)dnl -AC_SUBST(CXXFLAGS)dnl -AC_SUBST(FFLAGS)dnl -AC_SUBST(DEFS)dnl -AC_SUBST(LDFLAGS)dnl -AC_SUBST(LIBS)dnl -AC_SUBST(exec_prefix)dnl -AC_SUBST(prefix)dnl -AC_SUBST(program_transform_name)dnl -dnl Installation directory options. -AC_SUBST(bindir)dnl -AC_SUBST(sbindir)dnl -AC_SUBST(libexecdir)dnl -AC_SUBST(datadir)dnl -AC_SUBST(sysconfdir)dnl -AC_SUBST(sharedstatedir)dnl -AC_SUBST(localstatedir)dnl -AC_SUBST(libdir)dnl -AC_SUBST(includedir)dnl -AC_SUBST(oldincludedir)dnl -AC_SUBST(infodir)dnl -AC_SUBST(mandir)dnl -]) - - -dnl ### Selecting optional features - - -dnl AC_ARG_ENABLE(FEATURE, HELP-STRING, ACTION-IF-TRUE [, ACTION-IF-FALSE]) -AC_DEFUN(AC_ARG_ENABLE, -[AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)dnl -ac_help="$ac_help -[$2]" -AC_DIVERT_POP()dnl -[#] Check whether --enable-[$1] or --disable-[$1] was given. -if test "[${enable_]patsubst([$1], -, _)+set}" = set; then - enableval="[$enable_]patsubst([$1], -, _)" - ifelse([$3], , :, [$3]) -ifelse([$4], , , [else - $4 -])dnl -fi -]) - -AC_DEFUN(AC_ENABLE, -[AC_OBSOLETE([$0], [; instead use AC_ARG_ENABLE])dnl -AC_ARG_ENABLE([$1], [ --enable-$1], [$2], [$3])dnl -]) - - -dnl ### Working with optional software - - -dnl AC_ARG_WITH(PACKAGE, HELP-STRING, ACTION-IF-TRUE [, ACTION-IF-FALSE]) -AC_DEFUN(AC_ARG_WITH, -[AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)dnl -ac_help="$ac_help -[$2]" -AC_DIVERT_POP()dnl -[#] Check whether --with-[$1] or --without-[$1] was given. -if test "[${with_]patsubst([$1], -, _)+set}" = set; then - withval="[$with_]patsubst([$1], -, _)" - ifelse([$3], , :, [$3]) -ifelse([$4], , , [else - $4 -])dnl -fi -]) - -AC_DEFUN(AC_WITH, -[AC_OBSOLETE([$0], [; instead use AC_ARG_WITH])dnl -AC_ARG_WITH([$1], [ --with-$1], [$2], [$3])dnl -]) - - -dnl ### Transforming program names. - - -dnl AC_ARG_PROGRAM() -AC_DEFUN(AC_ARG_PROGRAM, -[if test "$program_transform_name" = s,x,x,; then - program_transform_name= -else - # Double any \ or $. echo might interpret backslashes. - cat <<\EOF_SED > conftestsed -s,\\,\\\\,g; s,\$,$$,g -EOF_SED - program_transform_name="`echo $program_transform_name|sed -f conftestsed`" - rm -f conftestsed -fi -test "$program_prefix" != NONE && - program_transform_name="s,^,${program_prefix},; $program_transform_name" -# Use a double $ so make ignores it. -test "$program_suffix" != NONE && - program_transform_name="s,\$\$,${program_suffix},; $program_transform_name" - -# sed with no file args requires a program. -test "$program_transform_name" = "" && program_transform_name="s,x,x," -]) - - -dnl ### Version numbers - - -dnl AC_REVISION(REVISION-INFO) -AC_DEFUN(AC_REVISION, -[AC_REQUIRE([AC_INIT_BINSH])dnl -[# From configure.in] translit([$1], $")]) - -dnl Subroutines of AC_PREREQ. - -dnl Change the dots in NUMBER into commas. -dnl AC_PREREQ_SPLIT(NUMBER) -define(AC_PREREQ_SPLIT, -[translit($1, ., [, ])]) - -dnl Default the ternary version number to 0 (e.g., 1, 7 -> 1, 7, 0). -dnl AC_PREREQ_CANON(MAJOR, MINOR [,TERNARY]) -define(AC_PREREQ_CANON, -[$1, $2, ifelse([$3], , 0, [$3])]) - -dnl Complain and exit if version number 1 is less than version number 2. -dnl PRINTABLE2 is the printable version of version number 2. -dnl AC_PREREQ_COMPARE(MAJOR1, MINOR1, TERNARY1, MAJOR2, MINOR2, TERNARY2, -dnl PRINTABLE2) -define(AC_PREREQ_COMPARE, -[ifelse(builtin([eval], -[$3 + $2 * 1000 + $1 * 1000000 < $6 + $5 * 1000 + $4 * 1000000]), 1, -[errprint(dnl -FATAL ERROR: Autoconf version $7 or higher is required for this script -)m4exit(3)])]) - -dnl Complain and exit if the Autoconf version is less than VERSION. -dnl AC_PREREQ(VERSION) -define(AC_PREREQ, -[AC_PREREQ_COMPARE(AC_PREREQ_CANON(AC_PREREQ_SPLIT(AC_ACVERSION)), -AC_PREREQ_CANON(AC_PREREQ_SPLIT([$1])), [$1])]) - - -dnl ### Getting the canonical system type - - -dnl Find install-sh, config.sub, config.guess, and Cygnus configure -dnl in directory DIR. These are auxiliary files used in configuration. -dnl DIR can be either absolute or relative to $srcdir. -dnl AC_CONFIG_AUX_DIR(DIR) -AC_DEFUN(AC_CONFIG_AUX_DIR, -[AC_CONFIG_AUX_DIRS($1 $srcdir/$1)]) - -dnl The default is `$srcdir' or `$srcdir/..' or `$srcdir/../..'. -dnl There's no need to call this macro explicitly; just AC_REQUIRE it. -AC_DEFUN(AC_CONFIG_AUX_DIR_DEFAULT, -[AC_CONFIG_AUX_DIRS($srcdir $srcdir/.. $srcdir/../..)]) - -dnl Internal subroutine. -dnl Search for the configuration auxiliary files in directory list $1. -dnl We look only for install-sh, so users of AC_PROG_INSTALL -dnl do not automatically need to distribute the other auxiliary files. -dnl AC_CONFIG_AUX_DIRS(DIR ...) -AC_DEFUN(AC_CONFIG_AUX_DIRS, -[ac_aux_dir= -for ac_dir in $1; do - if test -f $ac_dir/install-sh; then - ac_aux_dir=$ac_dir - ac_install_sh="$ac_aux_dir/install-sh -c" - break - elif test -f $ac_dir/install.sh; then - ac_aux_dir=$ac_dir - ac_install_sh="$ac_aux_dir/install.sh -c" - break - fi -done -if test -z "$ac_aux_dir"; then - AC_MSG_ERROR([can not find install-sh or install.sh in $1]) -fi -ac_config_guess=$ac_aux_dir/config.guess -ac_config_sub=$ac_aux_dir/config.sub -ac_configure=$ac_aux_dir/configure # This should be Cygnus configure. -AC_PROVIDE([AC_CONFIG_AUX_DIR_DEFAULT])dnl -]) - -dnl Canonicalize the host, target, and build system types. -AC_DEFUN(AC_CANONICAL_SYSTEM, -[AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl -AC_BEFORE([$0], [AC_ARG_PROGRAM]) -# Do some error checking and defaulting for the host and target type. -# The inputs are: -# configure --host=HOST --target=TARGET --build=BUILD NONOPT -# -# The rules are: -# 1. You are not allowed to specify --host, --target, and nonopt at the -# same time. -# 2. Host defaults to nonopt. -# 3. If nonopt is not specified, then host defaults to the current host, -# as determined by config.guess. -# 4. Target and build default to nonopt. -# 5. If nonopt is not specified, then target and build default to host. - -# The aliases save the names the user supplied, while $host etc. -# will get canonicalized. -case $host---$target---$nonopt in -NONE---*---* | *---NONE---* | *---*---NONE) ;; -*) AC_MSG_ERROR(can only configure for one host and one target at a time) ;; -esac - -AC_CANONICAL_HOST -AC_CANONICAL_TARGET -AC_CANONICAL_BUILD -test "$host_alias" != "$target_alias" && - test "$program_prefix$program_suffix$program_transform_name" = \ - NONENONEs,x,x, && - program_prefix=${target_alias}- -]) - -dnl Subroutines of AC_CANONICAL_SYSTEM. - -AC_DEFUN(AC_CANONICAL_HOST, -[AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl - -# Make sure we can run config.sub. -if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then : -else AC_MSG_ERROR(can not run $ac_config_sub) -fi - -AC_MSG_CHECKING(host system type) - -dnl Set host_alias. -host_alias=$host -case "$host_alias" in -NONE) - case $nonopt in - NONE) - if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then : - else AC_MSG_ERROR(can not guess host type; you must specify one) - fi ;; - *) host_alias=$nonopt ;; - esac ;; -esac - -dnl Set the other host vars. -changequote(<<, >>)dnl -host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias` -host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` -host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` -host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` -changequote([, ])dnl -AC_MSG_RESULT($host) -AC_SUBST(host)dnl -AC_SUBST(host_alias)dnl -AC_SUBST(host_cpu)dnl -AC_SUBST(host_vendor)dnl -AC_SUBST(host_os)dnl -]) - -dnl Internal use only. -AC_DEFUN(AC_CANONICAL_TARGET, -[AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl -AC_MSG_CHECKING(target system type) - -dnl Set target_alias. -target_alias=$target -case "$target_alias" in -NONE) - case $nonopt in - NONE) target_alias=$host_alias ;; - *) target_alias=$nonopt ;; - esac ;; -esac - -dnl Set the other target vars. -changequote(<<, >>)dnl -target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias` -target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` -target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` -target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` -changequote([, ])dnl -AC_MSG_RESULT($target) -AC_SUBST(target)dnl -AC_SUBST(target_alias)dnl -AC_SUBST(target_cpu)dnl -AC_SUBST(target_vendor)dnl -AC_SUBST(target_os)dnl -]) - -dnl Internal use only. -AC_DEFUN(AC_CANONICAL_BUILD, -[AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl -AC_MSG_CHECKING(build system type) - -dnl Set build_alias. -build_alias=$build -case "$build_alias" in -NONE) - case $nonopt in - NONE) build_alias=$host_alias ;; - *) build_alias=$nonopt ;; - esac ;; -esac - -dnl Set the other build vars. -changequote(<<, >>)dnl -build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias` -build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` -build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` -build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` -changequote([, ])dnl -AC_MSG_RESULT($build) -AC_SUBST(build)dnl -AC_SUBST(build_alias)dnl -AC_SUBST(build_cpu)dnl -AC_SUBST(build_vendor)dnl -AC_SUBST(build_os)dnl -]) - - -dnl AC_VALIDATE_CACHED_SYSTEM_TUPLE[(cmd)] -dnl if the cache file is inconsistent with the current host, -dnl target and build system types, execute CMD or print a default -dnl error message. -AC_DEFUN(AC_VALIDATE_CACHED_SYSTEM_TUPLE, [ - AC_REQUIRE([AC_CANONICAL_SYSTEM]) - AC_MSG_CHECKING([cached system tuple]) - if { test x"${ac_cv_host_system_type+set}" = x"set" && - test x"$ac_cv_host_system_type" != x"$host"; } || - { test x"${ac_cv_build_system_type+set}" = x"set" && - test x"$ac_cv_build_system_type" != x"$build"; } || - { test x"${ac_cv_target_system_type+set}" = x"set" && - test x"$ac_cv_target_system_type" != x"$target"; }; then - AC_MSG_RESULT([different]) - ifelse($#, 1, [$1], - [AC_MSG_ERROR([remove config.cache and re-run configure])]) - else - AC_MSG_RESULT(ok) - fi - ac_cv_host_system_type="$host" - ac_cv_build_system_type="$build" - ac_cv_target_system_type="$target" -]) - - -dnl ### Caching test results - - -dnl Look for site or system specific initialization scripts. -dnl AC_SITE_LOAD() -define(AC_SITE_LOAD, -[# Prefer explicitly selected file to automatically selected ones. -if test -z "$CONFIG_SITE"; then - if test "x$prefix" != xNONE; then - CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site" - else - CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" - fi -fi -for ac_site_file in $CONFIG_SITE; do - if test -r "$ac_site_file"; then - echo "loading site script $ac_site_file" - . "$ac_site_file" - fi -done -]) - -dnl AC_CACHE_LOAD() -define(AC_CACHE_LOAD, -[if test -r "$cache_file"; then - echo "loading cache $cache_file" - . $cache_file -else - echo "creating cache $cache_file" - > $cache_file -fi -]) - -dnl AC_CACHE_SAVE() -define(AC_CACHE_SAVE, -[cat > confcache <<\EOF -# This file is a shell script that caches the results of configure -# tests run on this system so they can be shared between configure -# scripts and configure runs. It is not useful on other systems. -# If it contains results you don't want to keep, you may remove or edit it. -# -# By default, configure uses ./config.cache as the cache file, -# creating it if it does not exist already. You can give configure -# the --cache-file=FILE option to use a different cache file; that is -# what configure does when it calls configure scripts in -# subdirectories, so they share the cache. -# Giving --cache-file=/dev/null disables caching, for debugging configure. -# config.status only pays attention to the cache file if you give it the -# --recheck option to rerun configure. -# -EOF -dnl Allow a site initialization script to override cache values. -# The following way of writing the cache mishandles newlines in values, -# but we know of no workaround that is simple, portable, and efficient. -# So, don't put newlines in cache variables' values. -# Ultrix sh set writes to stderr and can't be redirected directly, -# and sets the high bit in the cache file unless we assign to the vars. -changequote(, )dnl -(set) 2>&1 | - case `(ac_space=' '; set | grep ac_space) 2>&1` in - *ac_space=\ *) - # `set' does not quote correctly, so add quotes (double-quote substitution - # turns \\\\ into \\, and sed turns \\ into \). - sed -n \ - -e "s/'/'\\\\''/g" \ - -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p" - ;; - *) - # `set' quotes correctly as required by POSIX, so do not add quotes. - sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p' - ;; - esac >> confcache -changequote([, ])dnl -if cmp -s $cache_file confcache; then - : -else - if test -w $cache_file; then - echo "updating cache $cache_file" - cat confcache > $cache_file - else - echo "not updating unwritable cache $cache_file" - fi -fi -rm -f confcache -]) - -dnl The name of shell var CACHE-ID must contain `_cv_' in order to get saved. -dnl AC_CACHE_VAL(CACHE-ID, COMMANDS-TO-SET-IT) -define(AC_CACHE_VAL, -[dnl We used to use the below line, but it fails if the 1st arg is a -dnl shell variable, so we need the eval. -dnl if test "${$1+set}" = set; then -dnl the '' avoids an AIX 4.1 sh bug ("invalid expansion"). -if eval "test \"`echo '$''{'$1'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&AC_FD_MSG -else - $2 -fi -]) - -dnl AC_CACHE_CHECK(MESSAGE, CACHE-ID, COMMANDS) -define(AC_CACHE_CHECK, -[AC_MSG_CHECKING([$1]) -AC_CACHE_VAL([$2], [$3]) -AC_MSG_RESULT([$]$2)]) - - -dnl ### Defining symbols - - -dnl Set VARIABLE to VALUE, verbatim, or 1. -dnl AC_DEFINE(VARIABLE [, VALUE]) -define(AC_DEFINE, -[cat >> confdefs.h <<\EOF -[#define] $1 ifelse($#, 2, [$2], $#, 3, [$2], 1) -EOF -]) - -dnl Similar, but perform shell substitutions $ ` \ once on VALUE. -define(AC_DEFINE_UNQUOTED, -[cat >> confdefs.h <&AC_FD_MSG -echo "configure:__oline__: checking $1" >&AC_FD_CC]) - -dnl AC_CHECKING(FEATURE-DESCRIPTION) -define(AC_CHECKING, -[echo "checking $1" 1>&AC_FD_MSG -echo "configure:__oline__: checking $1" >&AC_FD_CC]) - -dnl AC_MSG_RESULT(RESULT-DESCRIPTION) -define(AC_MSG_RESULT, -[echo "$ac_t""$1" 1>&AC_FD_MSG]) - -dnl AC_VERBOSE(RESULT-DESCRIPTION) -define(AC_VERBOSE, -[AC_OBSOLETE([$0], [; instead use AC_MSG_RESULT])dnl -echo " $1" 1>&AC_FD_MSG]) - -dnl AC_MSG_WARN(PROBLEM-DESCRIPTION) -define(AC_MSG_WARN, -[echo "configure: warning: $1" 1>&2]) - -dnl AC_MSG_ERROR(ERROR-DESCRIPTION) -define(AC_MSG_ERROR, -[{ echo "configure: error: $1" 1>&2; exit 1; }]) - - -dnl ### Selecting which language to use for testing - - -dnl AC_LANG_C() -AC_DEFUN(AC_LANG_C, -[define([AC_LANG], [C])dnl -ac_ext=c -# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. -ac_cpp='$CPP $CPPFLAGS' -ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&AC_FD_CC' -ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&AC_FD_CC' -cross_compiling=$ac_cv_prog_cc_cross -]) - -dnl AC_LANG_CPLUSPLUS() -AC_DEFUN(AC_LANG_CPLUSPLUS, -[define([AC_LANG], [CPLUSPLUS])dnl -ac_ext=C -# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&AC_FD_CC' -ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&AC_FD_CC' -cross_compiling=$ac_cv_prog_cxx_cross -]) - -dnl AC_LANG_FORTRAN77() -AC_DEFUN(AC_LANG_FORTRAN77, -[define([AC_LANG], [FORTRAN77])dnl -ac_ext=f -ac_compile='${F77-f77} -c $FFLAGS conftest.$ac_ext 1>&AC_FD_CC' -ac_link='${F77-f77} -o conftest${ac_exeext} $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&AC_FD_CC' -cross_compiling=$ac_cv_prog_f77_cross -]) - -dnl Push the current language on a stack. -dnl AC_LANG_SAVE() -define(AC_LANG_SAVE, -[pushdef([AC_LANG_STACK], AC_LANG)]) - -dnl Restore the current language from the stack. -dnl AC_LANG_RESTORE() -pushdef([AC_LANG_RESTORE], -[ifelse(AC_LANG_STACK, [C], [AC_LANG_C],dnl -AC_LANG_STACK, [CPLUSPLUS], [AC_LANG_CPLUSPLUS],dnl -AC_LANG_STACK, [FORTRAN77], [AC_LANG_FORTRAN77])[]popdef([AC_LANG_STACK])]) - - -dnl ### Compiler-running mechanics - - -dnl The purpose of this macro is to "configure:123: command line" -dnl written into config.log for every test run. -dnl AC_TRY_EVAL(VARIABLE) -AC_DEFUN(AC_TRY_EVAL, -[{ (eval echo configure:__oline__: \"[$]$1\") 1>&AC_FD_CC; dnl -(eval [$]$1) 2>&AC_FD_CC; }]) - -dnl AC_TRY_COMMAND(COMMAND) -AC_DEFUN(AC_TRY_COMMAND, -[{ ac_try='$1'; AC_TRY_EVAL(ac_try); }]) - - -dnl ### Dependencies between macros - - -dnl AC_BEFORE(THIS-MACRO-NAME, CALLED-MACRO-NAME) -define(AC_BEFORE, -[ifdef([AC_PROVIDE_$2], [errprint(__file__:__line__: [$2 was called before $1 -])])]) - -dnl AC_REQUIRE(MACRO-NAME) -define(AC_REQUIRE, -[ifdef([AC_PROVIDE_$1], , -[AC_DIVERT_PUSH(builtin(eval, AC_DIVERSION_CURRENT - 1))dnl -indir([$1]) -AC_DIVERT_POP()dnl -])]) - -dnl AC_PROVIDE(MACRO-NAME) -define(AC_PROVIDE, -[define([AC_PROVIDE_$1], )]) - -dnl AC_OBSOLETE(THIS-MACRO-NAME [, SUGGESTION]) -define(AC_OBSOLETE, -[errprint(__file__:__line__: warning: [$1] is obsolete[$2] -)]) - - -dnl ### Checking for programs - - -dnl AC_CHECK_PROG(VARIABLE, PROG-TO-CHECK-FOR, VALUE-IF-FOUND -dnl [, [VALUE-IF-NOT-FOUND] [, [PATH] [, [REJECT]]]]) -AC_DEFUN(AC_CHECK_PROG, -[# Extract the first word of "$2", so it can be a program name with args. -set dummy $2; ac_word=[$]2 -AC_MSG_CHECKING([for $ac_word]) -AC_CACHE_VAL(ac_cv_prog_$1, -[if test -n "[$]$1"; then - ac_cv_prog_$1="[$]$1" # Let the user override the test. -else - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" -ifelse([$6], , , [ ac_prog_rejected=no -])dnl -dnl $ac_dummy forces splitting on constant user-supplied paths. -dnl POSIX.2 word splitting is done only on the output of word expansions, -dnl not every word. This closes a longstanding sh security hole. - ac_dummy="ifelse([$5], , $PATH, [$5])" - for ac_dir in $ac_dummy; do - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$ac_word; then -ifelse([$6], , , dnl -[ if test "[$ac_dir/$ac_word]" = "$6"; then - ac_prog_rejected=yes - continue - fi -])dnl - ac_cv_prog_$1="$3" - break - fi - done - IFS="$ac_save_ifs" -ifelse([$6], , , [if test $ac_prog_rejected = yes; then - # We found a bogon in the path, so make sure we never use it. - set dummy [$]ac_cv_prog_$1 - shift - if test [$]# -gt 0; then - # We chose a different compiler from the bogus one. - # However, it has the same basename, so the bogon will be chosen - # first if we set $1 to just the basename; use the full file name. - shift - set dummy "$ac_dir/$ac_word" "[$]@" - shift - ac_cv_prog_$1="[$]@" -ifelse([$2], [$4], dnl -[ else - # Default is a loser. - AC_MSG_ERROR([$1=$6 unacceptable, but no other $4 found in dnl -ifelse([$5], , [\$]PATH, [$5])]) -])dnl - fi -fi -])dnl -dnl If no 4th arg is given, leave the cache variable unset, -dnl so AC_CHECK_PROGS will keep looking. -ifelse([$4], , , [ test -z "[$]ac_cv_prog_$1" && ac_cv_prog_$1="$4" -])dnl -fi])dnl -$1="$ac_cv_prog_$1" -if test -n "[$]$1"; then - AC_MSG_RESULT([$]$1) -else - AC_MSG_RESULT(no) -fi -AC_SUBST($1)dnl -]) - -dnl AC_PATH_PROG(VARIABLE, PROG-TO-CHECK-FOR [, VALUE-IF-NOT-FOUND [, PATH]]) -AC_DEFUN(AC_PATH_PROG, -[# Extract the first word of "$2", so it can be a program name with args. -set dummy $2; ac_word=[$]2 -AC_MSG_CHECKING([for $ac_word]) -AC_CACHE_VAL(ac_cv_path_$1, -[case "[$]$1" in - /*) - ac_cv_path_$1="[$]$1" # Let the user override the test with a path. - ;; - ?:/*) - ac_cv_path_$1="[$]$1" # Let the user override the test with a dos path. - ;; - *) - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" -dnl $ac_dummy forces splitting on constant user-supplied paths. -dnl POSIX.2 word splitting is done only on the output of word expansions, -dnl not every word. This closes a longstanding sh security hole. - ac_dummy="ifelse([$4], , $PATH, [$4])" - for ac_dir in $ac_dummy; do - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$ac_word; then - ac_cv_path_$1="$ac_dir/$ac_word" - break - fi - done - IFS="$ac_save_ifs" -dnl If no 3rd arg is given, leave the cache variable unset, -dnl so AC_PATH_PROGS will keep looking. -ifelse([$3], , , [ test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$3" -])dnl - ;; -esac])dnl -$1="$ac_cv_path_$1" -if test -n "[$]$1"; then - AC_MSG_RESULT([$]$1) -else - AC_MSG_RESULT(no) -fi -AC_SUBST($1)dnl -]) - -dnl AC_CHECK_PROGS(VARIABLE, PROGS-TO-CHECK-FOR [, VALUE-IF-NOT-FOUND -dnl [, PATH]]) -AC_DEFUN(AC_CHECK_PROGS, -[for ac_prog in $2 -do -AC_CHECK_PROG($1, [$]ac_prog, [$]ac_prog, , $4) -test -n "[$]$1" && break -done -ifelse([$3], , , [test -n "[$]$1" || $1="$3" -])]) - -dnl AC_PATH_PROGS(VARIABLE, PROGS-TO-CHECK-FOR [, VALUE-IF-NOT-FOUND -dnl [, PATH]]) -AC_DEFUN(AC_PATH_PROGS, -[for ac_prog in $2 -do -AC_PATH_PROG($1, [$]ac_prog, , $4) -test -n "[$]$1" && break -done -ifelse([$3], , , [test -n "[$]$1" || $1="$3" -])]) - -dnl Internal subroutine. -AC_DEFUN(AC_CHECK_TOOL_PREFIX, -[AC_REQUIRE([AC_CANONICAL_HOST])AC_REQUIRE([AC_CANONICAL_BUILD])dnl -if test $host != $build; then - ac_tool_prefix=${host_alias}- -else - ac_tool_prefix= -fi -]) - -dnl AC_CHECK_TOOL(VARIABLE, PROG-TO-CHECK-FOR[, VALUE-IF-NOT-FOUND [, PATH]]) -AC_DEFUN(AC_CHECK_TOOL, -[AC_REQUIRE([AC_CHECK_TOOL_PREFIX])dnl -AC_CHECK_PROG($1, ${ac_tool_prefix}$2, ${ac_tool_prefix}$2, - ifelse([$3], , [$2], ), $4) -ifelse([$3], , , [ -if test -z "$ac_cv_prog_$1"; then -if test -n "$ac_tool_prefix"; then - AC_CHECK_PROG($1, $2, $2, $3) -else - $1="$3" -fi -fi]) -]) - -dnl Guess the value for the `prefix' variable by looking for -dnl the argument program along PATH and taking its parent. -dnl Example: if the argument is `gcc' and we find /usr/local/gnu/bin/gcc, -dnl set `prefix' to /usr/local/gnu. -dnl This comes too late to find a site file based on the prefix, -dnl and it might use a cached value for the path. -dnl No big loss, I think, since most configures don't use this macro anyway. -dnl AC_PREFIX_PROGRAM(PROGRAM) -AC_DEFUN(AC_PREFIX_PROGRAM, -[if test "x$prefix" = xNONE; then -changequote(<<, >>)dnl -define(<>, translit($1, [a-z], [A-Z]))dnl -changequote([, ])dnl -dnl We reimplement AC_MSG_CHECKING (mostly) to avoid the ... in the middle. -echo $ac_n "checking for prefix by $ac_c" 1>&AC_FD_MSG -AC_PATH_PROG(AC_VAR_NAME, $1) -changequote(<<, >>)dnl - if test -n "$ac_cv_path_<<>>AC_VAR_NAME"; then - prefix=`echo $ac_cv_path_<<>>AC_VAR_NAME|sed 's%/[^/][^/]*//*[^/][^/]*$%%'` -changequote([, ])dnl - fi -fi -undefine([AC_VAR_NAME])dnl -]) - -dnl Try to compile, link and execute TEST-PROGRAM. Set WORKING-VAR to -dnl `yes' if the current compiler works, otherwise set it ti `no'. Set -dnl CROSS-VAR to `yes' if the compiler and linker produce non-native -dnl executables, otherwise set it to `no'. Before calling -dnl `AC_TRY_COMPILER()', call `AC_LANG_*' to set-up for the right -dnl language. -dnl -dnl AC_TRY_COMPILER(TEST-PROGRAM, WORKING-VAR, CROSS-VAR) -AC_DEFUN(AC_TRY_COMPILER, -[cat > conftest.$ac_ext << EOF -ifelse(AC_LANG, [FORTRAN77], , -[ -[#]line __oline__ "configure" -#include "confdefs.h" -]) -[$1] -EOF -if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then - [$2]=yes - # If we can't run a trivial program, we are probably using a cross compiler. - if (./conftest${ac_xexeext}; exit) 2>/dev/null; then - [$3]=no - else - [$3]=yes - fi -else - echo "configure: failed program was:" >&AC_FD_CC - cat conftest.$ac_ext >&AC_FD_CC - [$2]=no -fi -rm -fr conftest*]) - - -dnl ### Checking for libraries - - -dnl AC_TRY_LINK_FUNC(func, action-if-found, action-if-not-found) -dnl Try to link a program that calls FUNC, handling GCC builtins. If -dnl the link succeeds, execute ACTION-IF-FOUND; otherwise, execute -dnl ACTION-IF-NOT-FOUND. - -AC_DEFUN(AC_TRY_LINK_FUNC, -AC_TRY_LINK(dnl -ifelse([$1], [main], , dnl Avoid conflicting decl of main. -[/* Override any gcc2 internal prototype to avoid an error. */ -]ifelse(AC_LANG, CPLUSPLUS, [#ifdef __cplusplus -extern "C" -#endif -])dnl -[/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char $1(); -]), -[$1()], -[$2], -[$3])) - - -dnl AC_SEARCH_LIBS(FUNCTION, SEARCH-LIBS [, ACTION-IF-FOUND -dnl [, ACTION-IF-NOT-FOUND [, OTHER-LIBRARIES]]]) -dnl Search for a library defining FUNC, if it's not already available. - -AC_DEFUN(AC_SEARCH_LIBS, -[AC_PREREQ([2.13]) -AC_CACHE_CHECK([for library containing $1], [ac_cv_search_$1], -[ac_func_search_save_LIBS="$LIBS" -ac_cv_search_$1="no" -AC_TRY_LINK_FUNC([$1], [ac_cv_search_$1="none required"]) -test "$ac_cv_search_$1" = "no" && for i in $2; do -LIBS="-l$i $5 $ac_func_search_save_LIBS" -AC_TRY_LINK_FUNC([$1], -[ac_cv_search_$1="-l$i" -break]) -done -LIBS="$ac_func_search_save_LIBS"]) -if test "$ac_cv_search_$1" != "no"; then - test "$ac_cv_search_$1" = "none required" || LIBS="$ac_cv_search_$1 $LIBS" - $3 -else : - $4 -fi]) - - - -dnl AC_CHECK_LIB(LIBRARY, FUNCTION [, ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND -dnl [, OTHER-LIBRARIES]]]) -AC_DEFUN(AC_CHECK_LIB, -[AC_MSG_CHECKING([for $2 in -l$1]) -dnl Use a cache variable name containing both the library and function name, -dnl because the test really is for library $1 defining function $2, not -dnl just for library $1. Separate tests with the same $1 and different $2s -dnl may have different results. -ac_lib_var=`echo $1['_']$2 | sed 'y%./+-%__p_%'` -AC_CACHE_VAL(ac_cv_lib_$ac_lib_var, -[ac_save_LIBS="$LIBS" -LIBS="-l$1 $5 $LIBS" -AC_TRY_LINK(dnl -ifelse(AC_LANG, [FORTRAN77], , -ifelse([$2], [main], , dnl Avoid conflicting decl of main. -[/* Override any gcc2 internal prototype to avoid an error. */ -]ifelse(AC_LANG, CPLUSPLUS, [#ifdef __cplusplus -extern "C" -#endif -])dnl -[/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char $2(); -])), - [$2()], - eval "ac_cv_lib_$ac_lib_var=yes", - eval "ac_cv_lib_$ac_lib_var=no") -LIBS="$ac_save_LIBS" -])dnl -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then - AC_MSG_RESULT(yes) - ifelse([$3], , -[changequote(, )dnl - ac_tr_lib=HAVE_LIB`echo $1 | sed -e 's/[^a-zA-Z0-9_]/_/g' \ - -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` -changequote([, ])dnl - AC_DEFINE_UNQUOTED($ac_tr_lib) - LIBS="-l$1 $LIBS" -], [$3]) -else - AC_MSG_RESULT(no) -ifelse([$4], , , [$4 -])dnl -fi -]) - -dnl AC_HAVE_LIBRARY(LIBRARY, [, ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND -dnl [, OTHER-LIBRARIES]]]) -AC_DEFUN(AC_HAVE_LIBRARY, -[AC_OBSOLETE([$0], [; instead use AC_CHECK_LIB])dnl -changequote(<<, >>)dnl -define(<>, dnl -patsubst(patsubst($1, <>, <<\1>>), <<-l>>, <<>>))dnl -define(<>, ac_cv_lib_<<>>AC_LIB_NAME)dnl -changequote([, ])dnl -AC_MSG_CHECKING([for -l[]AC_LIB_NAME]) -AC_CACHE_VAL(AC_CV_NAME, -[ac_save_LIBS="$LIBS" -LIBS="-l[]AC_LIB_NAME[] $4 $LIBS" -AC_TRY_LINK( , [main()], AC_CV_NAME=yes, AC_CV_NAME=no) -LIBS="$ac_save_LIBS" -])dnl -AC_MSG_RESULT($AC_CV_NAME) -if test "$AC_CV_NAME" = yes; then - ifelse([$2], , -[AC_DEFINE([HAVE_LIB]translit(AC_LIB_NAME, [a-z], [A-Z])) - LIBS="-l[]AC_LIB_NAME[] $LIBS" -], [$2]) -ifelse([$3], , , [else - $3 -])dnl -fi -undefine([AC_LIB_NAME])dnl -undefine([AC_CV_NAME])dnl -]) - - -dnl ### Examining declarations - - -dnl AC_TRY_CPP(INCLUDES, [ACTION-IF-TRUE [, ACTION-IF-FALSE]]) -AC_DEFUN(AC_TRY_CPP, -[AC_REQUIRE_CPP()dnl -cat > conftest.$ac_ext <&AC_FD_CC - echo "configure: failed program was:" >&AC_FD_CC - cat conftest.$ac_ext >&AC_FD_CC -ifelse([$3], , , [ rm -rf conftest* - $3 -])dnl -fi -rm -f conftest*]) - -dnl AC_EGREP_HEADER(PATTERN, HEADER-FILE, ACTION-IF-FOUND [, -dnl ACTION-IF-NOT-FOUND]) -AC_DEFUN(AC_EGREP_HEADER, -[AC_EGREP_CPP([$1], [#include <$2>], [$3], [$4])]) - -dnl Because this macro is used by AC_PROG_GCC_TRADITIONAL, which must -dnl come early, it is not included in AC_BEFORE checks. -dnl AC_EGREP_CPP(PATTERN, PROGRAM, [ACTION-IF-FOUND [, -dnl ACTION-IF-NOT-FOUND]]) -AC_DEFUN(AC_EGREP_CPP, -[AC_REQUIRE_CPP()dnl -cat > conftest.$ac_ext <&AC_FD_CC | -dnl Prevent m4 from eating character classes: -changequote(, )dnl - egrep "$1" >/dev/null 2>&1; then -changequote([, ])dnl - ifelse([$3], , :, [rm -rf conftest* - $3]) -ifelse([$4], , , [else - rm -rf conftest* - $4 -])dnl -fi -rm -f conftest* -]) - - -dnl ### Examining syntax - - -dnl AC_TRY_COMPILE(INCLUDES, FUNCTION-BODY, -dnl [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]) -AC_DEFUN(AC_TRY_COMPILE, -[cat > conftest.$ac_ext <&AC_FD_CC - cat conftest.$ac_ext >&AC_FD_CC -ifelse([$4], , , [ rm -rf conftest* - $4 -])dnl -fi -rm -f conftest*]) - - -dnl ### Examining libraries - - -dnl AC_COMPILE_CHECK(ECHO-TEXT, INCLUDES, FUNCTION-BODY, -dnl ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]) -AC_DEFUN(AC_COMPILE_CHECK, -[AC_OBSOLETE([$0], [; instead use AC_TRY_COMPILE or AC_TRY_LINK, and AC_MSG_CHECKING and AC_MSG_RESULT])dnl -ifelse([$1], , , [AC_CHECKING([for $1]) -])dnl -AC_TRY_LINK([$2], [$3], [$4], [$5]) -]) - -dnl AC_TRY_LINK(INCLUDES, FUNCTION-BODY, -dnl [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]) -AC_DEFUN(AC_TRY_LINK, -[cat > conftest.$ac_ext <&AC_FD_CC - cat conftest.$ac_ext >&AC_FD_CC -ifelse([$4], , , [ rm -rf conftest* - $4 -])dnl -fi -rm -f conftest*]) - - -dnl ### Checking for run-time features - - -dnl AC_TRY_RUN(PROGRAM, [ACTION-IF-TRUE [, ACTION-IF-FALSE -dnl [, ACTION-IF-CROSS-COMPILING]]]) -AC_DEFUN(AC_TRY_RUN, -[if test "$cross_compiling" = yes; then - ifelse([$4], , - [errprint(__file__:__line__: warning: [AC_TRY_RUN] called without default to allow cross compiling -)dnl - AC_MSG_ERROR(can not run test program while cross compiling)], - [$4]) -else - AC_TRY_RUN_NATIVE([$1], [$2], [$3]) -fi -]) - -dnl Like AC_TRY_RUN but assumes a native-environment (non-cross) compiler. -dnl AC_TRY_RUN_NATIVE(PROGRAM, [ACTION-IF-TRUE [, ACTION-IF-FALSE]]) -AC_DEFUN(AC_TRY_RUN_NATIVE, -[cat > conftest.$ac_ext </dev/null -then -dnl Don't remove the temporary files here, so they can be examined. - ifelse([$2], , :, [$2]) -else - echo "configure: failed program was:" >&AC_FD_CC - cat conftest.$ac_ext >&AC_FD_CC -ifelse([$3], , , [ rm -fr conftest* - $3 -])dnl -fi -rm -fr conftest*]) - - -dnl ### Checking for header files - - -dnl AC_CHECK_HEADER(HEADER-FILE, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]) -AC_DEFUN(AC_CHECK_HEADER, -[dnl Do the transliteration at runtime so arg 1 can be a shell variable. -ac_safe=`echo "$1" | sed 'y%./+-%__p_%'` -AC_MSG_CHECKING([for $1]) -AC_CACHE_VAL(ac_cv_header_$ac_safe, -[AC_TRY_CPP([#include <$1>], eval "ac_cv_header_$ac_safe=yes", - eval "ac_cv_header_$ac_safe=no")])dnl -if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then - AC_MSG_RESULT(yes) - ifelse([$2], , :, [$2]) -else - AC_MSG_RESULT(no) -ifelse([$3], , , [$3 -])dnl -fi -]) - -dnl AC_CHECK_HEADERS(HEADER-FILE... [, ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]) -AC_DEFUN(AC_CHECK_HEADERS, -[for ac_hdr in $1 -do -AC_CHECK_HEADER($ac_hdr, -[changequote(, )dnl - ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` -changequote([, ])dnl - AC_DEFINE_UNQUOTED($ac_tr_hdr) $2], $3)dnl -done -]) - - -dnl ### Checking for the existence of files - -dnl AC_CHECK_FILE(FILE, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]) -AC_DEFUN(AC_CHECK_FILE, -[AC_REQUIRE([AC_PROG_CC]) -dnl Do the transliteration at runtime so arg 1 can be a shell variable. -ac_safe=`echo "$1" | sed 'y%./+-%__p_%'` -AC_MSG_CHECKING([for $1]) -AC_CACHE_VAL(ac_cv_file_$ac_safe, -[if test "$cross_compiling" = yes; then - errprint(__file__:__line__: warning: Cannot check for file existence when cross compiling -)dnl - AC_MSG_ERROR(Cannot check for file existence when cross compiling) -else - if test -r $1; then - eval "ac_cv_file_$ac_safe=yes" - else - eval "ac_cv_file_$ac_safe=no" - fi -fi])dnl -if eval "test \"`echo '$ac_cv_file_'$ac_safe`\" = yes"; then - AC_MSG_RESULT(yes) - ifelse([$2], , :, [$2]) -else - AC_MSG_RESULT(no) -ifelse([$3], , , [$3]) -fi -]) - -dnl AC_CHECK_FILES(FILE... [, ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]) -AC_DEFUN(AC_CHECK_FILES, -[for ac_file in $1 -do -AC_CHECK_FILE($ac_file, -[changequote(, )dnl - ac_tr_file=HAVE_`echo $ac_file | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` -changequote([, ])dnl - AC_DEFINE_UNQUOTED($ac_tr_file) $2], $3)dnl -done -]) - - -dnl ### Checking for library functions - - -dnl AC_CHECK_FUNC(FUNCTION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]) -AC_DEFUN(AC_CHECK_FUNC, -[AC_MSG_CHECKING([for $1]) -AC_CACHE_VAL(ac_cv_func_$1, -[AC_TRY_LINK( -dnl Don't include because on OSF/1 3.0 it includes -dnl which includes which contains a prototype for -dnl select. Similarly for bzero. -[/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $1(); below. */ -#include -/* Override any gcc2 internal prototype to avoid an error. */ -]ifelse(AC_LANG, CPLUSPLUS, [#ifdef __cplusplus -extern "C" -#endif -])dnl -[/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char $1(); -], [ -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined (__stub_$1) || defined (__stub___$1) -choke me -#else -$1(); -#endif -], eval "ac_cv_func_$1=yes", eval "ac_cv_func_$1=no")]) -if eval "test \"`echo '$ac_cv_func_'$1`\" = yes"; then - AC_MSG_RESULT(yes) - ifelse([$2], , :, [$2]) -else - AC_MSG_RESULT(no) -ifelse([$3], , , [$3 -])dnl -fi -]) - -dnl AC_CHECK_FUNCS(FUNCTION... [, ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]) -AC_DEFUN(AC_CHECK_FUNCS, -[for ac_func in $1 -do -AC_CHECK_FUNC($ac_func, -[changequote(, )dnl - ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` -changequote([, ])dnl - AC_DEFINE_UNQUOTED($ac_tr_func) $2], $3)dnl -done -]) - -dnl AC_REPLACE_FUNCS(FUNCTION...) -AC_DEFUN(AC_REPLACE_FUNCS, -[AC_CHECK_FUNCS([$1], , [LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"]) -AC_SUBST(LIBOBJS)dnl -]) - - -dnl ### Checking compiler characteristics - - -dnl AC_CHECK_SIZEOF(TYPE [, CROSS-SIZE]) -AC_DEFUN(AC_CHECK_SIZEOF, -[changequote(<<, >>)dnl -dnl The name to #define. -define(<>, translit(sizeof_$1, [a-z *], [A-Z_P]))dnl -dnl The cache variable name. -define(<>, translit(ac_cv_sizeof_$1, [ *], [_p]))dnl -changequote([, ])dnl -AC_MSG_CHECKING(size of $1) -AC_CACHE_VAL(AC_CV_NAME, -[AC_TRY_RUN([#include -main() -{ - FILE *f=fopen("conftestval", "w"); - if (!f) exit(1); - fprintf(f, "%d\n", sizeof($1)); - exit(0); -}], AC_CV_NAME=`cat conftestval`, AC_CV_NAME=0, ifelse([$2], , , AC_CV_NAME=$2))])dnl -AC_MSG_RESULT($AC_CV_NAME) -AC_DEFINE_UNQUOTED(AC_TYPE_NAME, $AC_CV_NAME) -undefine([AC_TYPE_NAME])dnl -undefine([AC_CV_NAME])dnl -]) - - -dnl ### Checking for typedefs - - -dnl AC_CHECK_TYPE(TYPE, DEFAULT) -AC_DEFUN(AC_CHECK_TYPE, -[AC_REQUIRE([AC_HEADER_STDC])dnl -AC_MSG_CHECKING(for $1) -AC_CACHE_VAL(ac_cv_type_$1, -[AC_EGREP_CPP(dnl -changequote(<<,>>)dnl -<<(^|[^a-zA-Z_0-9])$1[^a-zA-Z_0-9]>>dnl -changequote([,]), [#include -#if STDC_HEADERS -#include -#include -#endif], ac_cv_type_$1=yes, ac_cv_type_$1=no)])dnl -AC_MSG_RESULT($ac_cv_type_$1) -if test $ac_cv_type_$1 = no; then - AC_DEFINE($1, $2) -fi -]) - - -dnl ### Creating output files - - -dnl AC_CONFIG_HEADER(HEADER-TO-CREATE ...) -AC_DEFUN(AC_CONFIG_HEADER, -[define(AC_LIST_HEADER, $1)]) - -dnl Link each of the existing files SOURCE... to the corresponding -dnl link name in DEST... -dnl AC_LINK_FILES(SOURCE..., DEST...) -AC_DEFUN(AC_LINK_FILES, -[dnl -define([AC_LIST_FILES], ifdef([AC_LIST_FILES], [AC_LIST_FILES ],)[$1])dnl -define([AC_LIST_LINKS], ifdef([AC_LIST_LINKS], [AC_LIST_LINKS ],)[$2])]) - -dnl Add additional commands for AC_OUTPUT to put into config.status. -dnl Use diversions instead of macros so we can be robust in the -dnl presence of commas in $1 and/or $2. -dnl AC_OUTPUT_COMMANDS(EXTRA-CMDS, INIT-CMDS) -AC_DEFUN(AC_OUTPUT_COMMANDS, -[AC_DIVERT_PUSH(AC_DIVERSION_CMDS)dnl -[$1] -AC_DIVERT_POP()dnl -AC_DIVERT_PUSH(AC_DIVERSION_ICMDS)dnl -[$2] -AC_DIVERT_POP()]) - -dnl AC_CONFIG_SUBDIRS(DIR ...) -AC_DEFUN(AC_CONFIG_SUBDIRS, -[AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl -define([AC_LIST_SUBDIRS], ifdef([AC_LIST_SUBDIRS], [AC_LIST_SUBDIRS ],)[$1])dnl -subdirs="AC_LIST_SUBDIRS" -AC_SUBST(subdirs)dnl -]) - -dnl The big finish. -dnl Produce config.status, config.h, and links; and configure subdirs. -dnl AC_OUTPUT([FILE...] [, EXTRA-CMDS] [, INIT-CMDS]) -define(AC_OUTPUT, -[trap '' 1 2 15 -AC_CACHE_SAVE -trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15 - -test "x$prefix" = xNONE && prefix=$ac_default_prefix -# Let make expand exec_prefix. -test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' - -# Any assignment to VPATH causes Sun make to only execute -# the first set of double-colon rules, so remove it if not needed. -# If there is a colon in the path, we need to keep it. -if test "x$srcdir" = x.; then -changequote(, )dnl - ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d' -changequote([, ])dnl -fi - -trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15 - -ifdef([AC_LIST_HEADER], [DEFS=-DHAVE_CONFIG_H], [AC_OUTPUT_MAKE_DEFS()]) - -# Without the "./", some shells look in PATH for config.status. -: ${CONFIG_STATUS=./config.status} - -echo creating $CONFIG_STATUS -rm -f $CONFIG_STATUS -cat > $CONFIG_STATUS </dev/null | sed 1q`: -# -[#] [$]0 [$]ac_configure_args -# -# Compiler output produced by configure, useful for debugging -# configure, is in ./config.log if it exists. - -changequote(, )dnl -ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]" -changequote([, ])dnl -for ac_option -do - case "[\$]ac_option" in - -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) - echo "running [\$]{CONFIG_SHELL-/bin/sh} [$]0 [$]ac_configure_args --no-create --no-recursion" - exec [\$]{CONFIG_SHELL-/bin/sh} [$]0 [$]ac_configure_args --no-create --no-recursion ;; - -version | --version | --versio | --versi | --vers | --ver | --ve | --v) - echo "$CONFIG_STATUS generated by autoconf version AC_ACVERSION" - exit 0 ;; - -help | --help | --hel | --he | --h) - echo "[\$]ac_cs_usage"; exit 0 ;; - *) echo "[\$]ac_cs_usage"; exit 1 ;; - esac -done - -ac_given_srcdir=$srcdir -ifdef([AC_PROVIDE_AC_PROG_INSTALL], [ac_given_INSTALL="$INSTALL" -])dnl - -changequote(<<, >>)dnl -ifdef(<>, -<>, -<>) -changequote([, ])dnl -EOF -cat >> $CONFIG_STATUS <> $CONFIG_STATUS <> $CONFIG_STATUS <<\EOF -undivert(AC_DIVERSION_CMDS)dnl -$2 -exit 0 -EOF -chmod +x $CONFIG_STATUS -rm -fr confdefs* $ac_clean_files -test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1 -dnl config.status should not do recursion. -ifdef([AC_LIST_SUBDIRS], [AC_OUTPUT_SUBDIRS(AC_LIST_SUBDIRS)])dnl -])dnl - -dnl Set the DEFS variable to the -D options determined earlier. -dnl This is a subroutine of AC_OUTPUT. -dnl It is called inside configure, outside of config.status. -dnl AC_OUTPUT_MAKE_DEFS() -define(AC_OUTPUT_MAKE_DEFS, -[# Transform confdefs.h into DEFS. -dnl Using a here document instead of a string reduces the quoting nightmare. -# Protect against shell expansion while executing Makefile rules. -# Protect against Makefile macro expansion. -cat > conftest.defs <<\EOF -changequote(<<, >>)dnl -s%<<#define>> \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%-D\1=\2%g -s%[ `~<<#>>$^&*(){}\\|;'"<>?]%\\&%g -s%\[%\\&%g -s%\]%\\&%g -s%\$%$$%g -changequote([, ])dnl -EOF -DEFS=`sed -f conftest.defs confdefs.h | tr '\012' ' '` -rm -f conftest.defs -]) - -dnl Do the variable substitutions to create the Makefiles or whatever. -dnl This is a subroutine of AC_OUTPUT. It is called inside an unquoted -dnl here document whose contents are going into config.status, but -dnl upon returning, the here document is being quoted. -dnl AC_OUTPUT_FILES(FILE...) -define(AC_OUTPUT_FILES, -[# Protect against being on the right side of a sed subst in config.status. -changequote(, )dnl -sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g; - s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF -changequote([, ])dnl -dnl These here document variables are unquoted when configure runs -dnl but quoted when config.status runs, so variables are expanded once. -$ac_vpsub -dnl Shell code in configure.in might set extrasub. -$extrasub -dnl Insert the sed substitutions of variables. -undivert(AC_DIVERSION_SED) -CEOF -EOF - -cat >> $CONFIG_STATUS <<\EOF - -# Split the substitutions into bite-sized pieces for seds with -# small command number limits, like on Digital OSF/1 and HP-UX. -ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script. -ac_file=1 # Number of current file. -ac_beg=1 # First line for current file. -ac_end=$ac_max_sed_cmds # Line after last line for current file. -ac_more_lines=: -ac_sed_cmds="" -while $ac_more_lines; do - if test $ac_beg -gt 1; then - sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file - else - sed "${ac_end}q" conftest.subs > conftest.s$ac_file - fi - if test ! -s conftest.s$ac_file; then - ac_more_lines=false - rm -f conftest.s$ac_file - else - if test -z "$ac_sed_cmds"; then - ac_sed_cmds="sed -f conftest.s$ac_file" - else - ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file" - fi - ac_file=`expr $ac_file + 1` - ac_beg=$ac_end - ac_end=`expr $ac_end + $ac_max_sed_cmds` - fi -done -if test -z "$ac_sed_cmds"; then - ac_sed_cmds=cat -fi -EOF - -cat >> $CONFIG_STATUS <> $CONFIG_STATUS <<\EOF -for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then -changequote(, )dnl - # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". - case "$ac_file" in - *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'` - ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; - *) ac_file_in="${ac_file}.in" ;; - esac - - # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories. - - # Remove last slash and all that follows it. Not all systems have dirname. - ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'` -changequote([, ])dnl - if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then - # The file is in a subdirectory. - test ! -d "$ac_dir" && mkdir "$ac_dir" - ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`" - # A "../" for each directory in $ac_dir_suffix. -changequote(, )dnl - ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'` -changequote([, ])dnl - else - ac_dir_suffix= ac_dots= - fi - - case "$ac_given_srcdir" in - .) srcdir=. - if test -z "$ac_dots"; then top_srcdir=. - else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;; - /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;; - *) # Relative path. - srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix" - top_srcdir="$ac_dots$ac_given_srcdir" ;; - esac - -ifdef([AC_PROVIDE_AC_PROG_INSTALL], -[ case "$ac_given_INSTALL" in -changequote(, )dnl - [/$]*) INSTALL="$ac_given_INSTALL" ;; -changequote([, ])dnl - *) INSTALL="$ac_dots$ac_given_INSTALL" ;; - esac -])dnl - - echo creating "$ac_file" - rm -f "$ac_file" - configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure." - case "$ac_file" in - *Makefile*) ac_comsub="1i\\ -# $configure_input" ;; - *) ac_comsub= ;; - esac - - ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"` - sed -e "$ac_comsub -s%@configure_input@%$configure_input%g -s%@srcdir@%$srcdir%g -s%@top_srcdir@%$top_srcdir%g -ifdef([AC_PROVIDE_AC_PROG_INSTALL], [s%@INSTALL@%$INSTALL%g -])dnl -dnl The parens around the eval prevent an "illegal io" in Ultrix sh. -" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file -dnl This would break Makefile dependencies. -dnl if cmp -s $ac_file conftest.out 2>/dev/null; then -dnl echo "$ac_file is unchanged" -dnl rm -f conftest.out -dnl else -dnl rm -f $ac_file -dnl mv conftest.out $ac_file -dnl fi -fi; done -rm -f conftest.s* -]) - -dnl Create the config.h files from the config.h.in files. -dnl This is a subroutine of AC_OUTPUT. It is called inside a quoted -dnl here document whose contents are going into config.status. -dnl AC_OUTPUT_HEADER(HEADER-FILE...) -define(AC_OUTPUT_HEADER, -[changequote(<<, >>)dnl -# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where -# NAME is the cpp macro being defined and VALUE is the value it is being given. -# -# ac_d sets the value in "#define NAME VALUE" lines. -ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)' -ac_dB='\([ ][ ]*\)[^ ]*%\1#\2' -ac_dC='\3' -ac_dD='%g' -# ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE". -ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' -ac_uB='\([ ]\)%\1#\2define\3' -ac_uC=' ' -ac_uD='\4%g' -# ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE". -ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' -ac_eB='<<$>>%\1#\2define\3' -ac_eC=' ' -ac_eD='%g' -changequote([, ])dnl - -if test "${CONFIG_HEADERS+set}" != set; then -EOF -dnl Support passing AC_CONFIG_HEADER a value containing shell variables. -cat >> $CONFIG_STATUS <> $CONFIG_STATUS <<\EOF -fi -for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then -changequote(, )dnl - # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". - case "$ac_file" in - *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'` - ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; - *) ac_file_in="${ac_file}.in" ;; - esac -changequote([, ])dnl - - echo creating $ac_file - - rm -f conftest.frag conftest.in conftest.out - ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"` - cat $ac_file_inputs > conftest.in - -EOF - -# Transform confdefs.h into a sed script conftest.vals that substitutes -# the proper values into config.h.in to produce config.h. And first: -# Protect against being on the right side of a sed subst in config.status. -# Protect against being in an unquoted here document in config.status. -rm -f conftest.vals -dnl Using a here document instead of a string reduces the quoting nightmare. -dnl Putting comments in sed scripts is not portable. -cat > conftest.hdr <<\EOF -changequote(<<, >>)dnl -s/[\\&%]/\\&/g -s%[\\$`]%\\&%g -s%<<#define>> \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp -s%ac_d%ac_u%gp -s%ac_u%ac_e%gp -changequote([, ])dnl -EOF -sed -n -f conftest.hdr confdefs.h > conftest.vals -rm -f conftest.hdr - -# This sed command replaces #undef with comments. This is necessary, for -# example, in the case of _POSIX_SOURCE, which is predefined and required -# on some systems where configure will not decide to define it. -cat >> conftest.vals <<\EOF -changequote(, )dnl -s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */% -changequote([, ])dnl -EOF - -# Break up conftest.vals because some shells have a limit on -# the size of here documents, and old seds have small limits too. - -rm -f conftest.tail -while : -do - ac_lines=`grep -c . conftest.vals` - # grep -c gives empty output for an empty file on some AIX systems. - if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi - # Write a limited-size here document to conftest.frag. - echo ' cat > conftest.frag <> $CONFIG_STATUS - sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS - echo 'CEOF - sed -f conftest.frag conftest.in > conftest.out - rm -f conftest.in - mv conftest.out conftest.in -' >> $CONFIG_STATUS - sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail - rm -f conftest.vals - mv conftest.tail conftest.vals -done -rm -f conftest.vals - -dnl Now back to your regularly scheduled config.status. -cat >> $CONFIG_STATUS <<\EOF - rm -f conftest.frag conftest.h - echo "/* $ac_file. Generated automatically by configure. */" > conftest.h - cat conftest.in >> conftest.h - rm -f conftest.in - if cmp -s $ac_file conftest.h 2>/dev/null; then - echo "$ac_file is unchanged" - rm -f conftest.h - else - # Remove last slash and all that follows it. Not all systems have dirname. - changequote(, )dnl - ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'` - changequote([, ])dnl - if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then - # The file is in a subdirectory. - test ! -d "$ac_dir" && mkdir "$ac_dir" - fi - rm -f $ac_file - mv conftest.h $ac_file - fi -fi; done - -]) - -dnl This is a subroutine of AC_OUTPUT. It is called inside a quoted -dnl here document whose contents are going into config.status. -dnl AC_OUTPUT_LINKS(SOURCE..., DEST...) -define(AC_OUTPUT_LINKS, -[EOF - -cat >> $CONFIG_STATUS <> $CONFIG_STATUS <<\EOF -srcdir=$ac_given_srcdir -while test -n "$ac_sources"; do - set $ac_dests; ac_dest=[$]1; shift; ac_dests=[$]* - set $ac_sources; ac_source=[$]1; shift; ac_sources=[$]* - - echo "linking $srcdir/$ac_source to $ac_dest" - - if test ! -r $srcdir/$ac_source; then - AC_MSG_ERROR($srcdir/$ac_source: File not found) - fi - rm -f $ac_dest - - # Make relative symlinks. - # Remove last slash and all that follows it. Not all systems have dirname. -changequote(, )dnl - ac_dest_dir=`echo $ac_dest|sed 's%/[^/][^/]*$%%'` -changequote([, ])dnl - if test "$ac_dest_dir" != "$ac_dest" && test "$ac_dest_dir" != .; then - # The dest file is in a subdirectory. - test ! -d "$ac_dest_dir" && mkdir "$ac_dest_dir" - ac_dest_dir_suffix="/`echo $ac_dest_dir|sed 's%^\./%%'`" - # A "../" for each directory in $ac_dest_dir_suffix. -changequote(, )dnl - ac_dots=`echo $ac_dest_dir_suffix|sed 's%/[^/]*%../%g'` -changequote([, ])dnl - else - ac_dest_dir_suffix= ac_dots= - fi - - case "$srcdir" in -changequote(, )dnl - [/$]*) ac_rel_source="$srcdir/$ac_source" ;; -changequote([, ])dnl - *) ac_rel_source="$ac_dots$srcdir/$ac_source" ;; - esac - - # Make a symlink if possible; otherwise try a hard link. - if ln -s $ac_rel_source $ac_dest 2>/dev/null || - ln $srcdir/$ac_source $ac_dest; then : - else - AC_MSG_ERROR(can not link $ac_dest to $srcdir/$ac_source) - fi -done -]) - -dnl This is a subroutine of AC_OUTPUT. -dnl It is called after running config.status. -dnl AC_OUTPUT_SUBDIRS(DIRECTORY...) -define(AC_OUTPUT_SUBDIRS, -[ -if test "$no_recursion" != yes; then - - # Remove --cache-file and --srcdir arguments so they do not pile up. - ac_sub_configure_args= - ac_prev= - for ac_arg in $ac_configure_args; do - if test -n "$ac_prev"; then - ac_prev= - continue - fi - case "$ac_arg" in - -cache-file | --cache-file | --cache-fil | --cache-fi \ - | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) - ac_prev=cache_file ;; - -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ - | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) - ;; - -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) - ac_prev=srcdir ;; - -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) - ;; - *) ac_sub_configure_args="$ac_sub_configure_args $ac_arg" ;; - esac - done - - for ac_config_dir in $1; do - - # Do not complain, so a configure script can configure whichever - # parts of a large source tree are present. - if test ! -d $srcdir/$ac_config_dir; then - continue - fi - - echo configuring in $ac_config_dir - - case "$srcdir" in - .) ;; - *) - if test -d ./$ac_config_dir || mkdir ./$ac_config_dir; then :; - else - AC_MSG_ERROR(can not create `pwd`/$ac_config_dir) - fi - ;; - esac - - ac_popdir=`pwd` - cd $ac_config_dir - -changequote(, )dnl - # A "../" for each directory in /$ac_config_dir. - ac_dots=`echo $ac_config_dir|sed -e 's%^\./%%' -e 's%[^/]$%&/%' -e 's%[^/]*/%../%g'` -changequote([, ])dnl - - case "$srcdir" in - .) # No --srcdir option. We are building in place. - ac_sub_srcdir=$srcdir ;; - /*) # Absolute path. - ac_sub_srcdir=$srcdir/$ac_config_dir ;; - *) # Relative path. - ac_sub_srcdir=$ac_dots$srcdir/$ac_config_dir ;; - esac - - # Check for guested configure; otherwise get Cygnus style configure. - if test -f $ac_sub_srcdir/configure; then - ac_sub_configure=$ac_sub_srcdir/configure - elif test -f $ac_sub_srcdir/configure.in; then - ac_sub_configure=$ac_configure - else - AC_MSG_WARN(no configuration information is in $ac_config_dir) - ac_sub_configure= - fi - - # The recursion is here. - if test -n "$ac_sub_configure"; then - - # Make the cache file name correct relative to the subdirectory. - case "$cache_file" in - /*) ac_sub_cache_file=$cache_file ;; - *) # Relative path. - ac_sub_cache_file="$ac_dots$cache_file" ;; - esac -ifdef([AC_PROVIDE_AC_PROG_INSTALL], - [ case "$ac_given_INSTALL" in -changequote(, )dnl - [/$]*) INSTALL="$ac_given_INSTALL" ;; -changequote([, ])dnl - *) INSTALL="$ac_dots$ac_given_INSTALL" ;; - esac -])dnl - - echo "[running ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file] --srcdir=$ac_sub_srcdir" - # The eval makes quoting arguments work. - if eval ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir - then : - else - AC_MSG_ERROR($ac_sub_configure failed for $ac_config_dir) - fi - fi - - cd $ac_popdir - done -fi -]) diff -Nru cdrtools-2.01.01a33/conf/aclocal.m4 cdrtools-3.02a09/conf/aclocal.m4 --- cdrtools-2.01.01a33/conf/aclocal.m4 2007-05-23 10:13:32.000000000 +0000 +++ cdrtools-3.02a09/conf/aclocal.m4 1970-01-01 00:00:00.000000000 +0000 @@ -1,2356 +0,0 @@ -dnl @(#)aclocal.m4 1.58 07/05/23 Copyright 1998 J. Schilling - -dnl Set VARIABLE to VALUE in C-string form, verbatim, or 1. -dnl AC_DEFINE_STRING(VARIABLE [, VALUE]) -define(AC_DEFINE_STRING, -[cat >> confdefs.h <<\EOF -[#define] $1 ifelse($#, 2, "[$2]", $#, 3, "[$2]", 1) -EOF -]) - -dnl Similar, but perform shell substitutions $ ` \ once on VALUE. -define(AC_DEFINE_UNQUOTED_STRING, -[cat >> confdefs.h <>)dnl -<<(^|[^a-zA-Z_0-9])$2[^a-zA-Z_0-9]>>dnl -changequote([,]), [#include -#if STDC_HEADERS -#include -#include -#endif -$1], ac_cv_have_type_$2=yes, ac_cv_have_type_$2=no)])dnl -AC_MSG_RESULT($ac_cv_have_type_$2) -changequote(, )dnl - ac_tr_type=HAVE_TYPE_`echo $2 | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` -changequote([, ])dnl -if test $ac_cv_have_type_$2 = yes; then - AC_DEFINE_UNQUOTED($ac_tr_type) -fi -]) - -dnl Checks if /bin/sh is bash -dnl Defines SHELL_IS_BASH on success. -AC_DEFUN([AC_SHELL_BASH], -[AC_CACHE_CHECK([if /bin/sh is bash], ac_cv_shell_is_bash, - [ -ac_err=`< /dev/null sh -version 2> /dev/null | grep bash` -if test -n "$ac_err"; then - ac_cv_shell_is_bash=yes -else - ac_cv_shell_is_bash=no -fi -]) -if test $ac_cv_shell_is_bash = yes; then - AC_DEFINE(SHELL_IS_BASH) -fi]) - -dnl XXX this used to be: -dnl #ifndef $2 -dnl char *p = (char *) $2; -dnl #endif -dnl but we use this test un order to check whether we are able to get the -dnl address of a function from this name, so we did replace this by: -dnl char *p = (char *) $2; -dnl -dnl AC_CHECK_DECLARE(INCLUDES, SYMBOL) -dnl Checks if symbol is declared -dnl Defines HAVE_DECL_SYMBOL on success. -AC_DEFUN([AC_CHECK_DECLARE], -[AC_CACHE_CHECK([if $2 is declared], ac_cv_have_decl_$2, - [AC_TRY_COMPILE([$1], -[ char *p = (char *) $2; ], - [ac_cv_have_decl_$2=yes], - [ac_cv_have_decl_$2=no])]) -changequote(, )dnl - ac_tr_decl=HAVE_DECL_`echo $2 | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` -changequote([, ])dnl -if test $ac_cv_have_decl_$2 = yes; then - AC_DEFINE_UNQUOTED($ac_tr_decl) -fi]) - -dnl AC_CHECK_DFUNC(INCLUDES, SYMBOL) -dnl Checks if symbol is defined or a function -dnl Defines HAVE_SYMBOL on success. -AC_DEFUN([AC_CHECK_DFUNC], -[AC_CACHE_CHECK([if $2 is defined or function], ac_cv_have_$2, - [AC_TRY_LINK([$1], -[ -#ifndef $2 - char *p = (char *) $2; -#endif], - [ac_cv_have_$2=yes], - [ac_cv_have_$2=no])]) -changequote(, )dnl - ac_tr_dfunc=HAVE_`echo $2 | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` -changequote([, ])dnl -if test $ac_cv_have_$2 = yes; then - AC_DEFINE_UNQUOTED($ac_tr_dfunc) -fi]) - -dnl Checks if structure 'stat' have field 'st_spare1'. -dnl Defines HAVE_ST_SPARE1 on success. -AC_DEFUN([AC_STRUCT_ST_SPARE1], -[AC_CACHE_CHECK([if struct stat contains st_spare1], ac_cv_struct_st_spare1, - [AC_TRY_COMPILE([#include -#include ], - [struct stat s; s.st_spare1 = 0;], - [ac_cv_struct_st_spare1=yes], - [ac_cv_struct_st_spare1=no])]) -if test $ac_cv_struct_st_spare1 = yes; then - AC_DEFINE(HAVE_ST_SPARE1) -fi]) - -dnl Checks if structure 'stat' have field 'st_atimensec'. -dnl Defines HAVE_ST_ATIMENSEC on success. -AC_DEFUN([AC_STRUCT_ST_ATIMENSEC], -[AC_CACHE_CHECK([if struct stat contains st_atimensec], ac_cv_struct_st_atimensec, - [AC_TRY_COMPILE([#include -#include ], - [struct stat s; s.st_atimensec = 0;], - [ac_cv_struct_st_atimensec=yes], - [ac_cv_struct_st_atimensec=no])]) -if test $ac_cv_struct_st_atimensec = yes; then - AC_DEFINE(HAVE_ST_ATIMENSEC) -fi]) - -dnl Checks if structure 'stat' have field 'st_atim.tv_nsec'. -dnl Defines HAVE_ST_NSEC on success. -AC_DEFUN([AC_STRUCT_ST_NSEC], -[AC_CACHE_CHECK([if struct stat contains st_atim.tv_nsec], ac_cv_struct_st_nsec, - [AC_TRY_COMPILE([#include -#include ], - [struct stat s; s.st_atim.tv_nsec = 0;], - [ac_cv_struct_st_nsec=yes], - [ac_cv_struct_st_nsec=no])]) -if test $ac_cv_struct_st_nsec = yes; then - AC_DEFINE(HAVE_ST_NSEC) -fi]) - -dnl Checks if structure 'stat' have field 'st_atim.st__tim.tv_nsec'. -dnl Defines HAVE_ST__TIM on success. -AC_DEFUN([AC_STRUCT_ST__TIM], -[AC_CACHE_CHECK([if struct stat contains st_atim.st__tim.tv_nsec], ac_cv_struct_st__tim, - [AC_TRY_COMPILE([#include -#include ], - [struct stat s; s.st_atim.st__tim.tv_nsec = 0;], - [ac_cv_struct_st__tim=yes], - [ac_cv_struct_st__tim=no])]) -if test $ac_cv_struct_st__tim = yes; then - AC_DEFINE(HAVE_ST__TIM) -fi]) - -dnl Checks if structure 'stat' have field 'st_atimspec.tv_nsec'. -dnl Defines HAVE_ST_ATIMESPEC on success. -AC_DEFUN([AC_STRUCT_ST_ATIMESPEC], -[AC_CACHE_CHECK([if struct stat contains st_atimespec.tv_nsec], ac_cv_struct_st_atimespec, - [AC_TRY_COMPILE([#include -#include ], - [struct stat s; s.st_atimespec.tv_nsec = 0;], - [ac_cv_struct_st_atimespec=yes], - [ac_cv_struct_st_atimespec=no])]) -if test $ac_cv_struct_st_atimespec = yes; then - AC_DEFINE(HAVE_ST_ATIMESPEC) -fi]) - -dnl Checks if structure 'stat' have field 'st_flags'. -dnl Defines HAVE_ST_FLAGS on success. -AC_DEFUN([AC_STRUCT_ST_FLAGS], -[AC_CACHE_CHECK([if struct stat contains st_flags], ac_cv_struct_st_flags, - [AC_TRY_COMPILE([#include -#include ], - [struct stat s; s.st_flags = 0;], - [ac_cv_struct_st_flags=yes], - [ac_cv_struct_st_flags=no])]) -if test $ac_cv_struct_st_flags = yes; then - AC_DEFINE(HAVE_ST_FLAGS) -fi]) - -dnl Checks if structure 'stat' have field 'st_fstype'. -dnl Defines HAVE_ST_FSTYPE on success. -AC_DEFUN([AC_STRUCT_ST_FSTYPE], -[AC_CACHE_CHECK([if struct stat contains st_fstype], ac_cv_struct_st_fstype, - [AC_TRY_COMPILE([#include -#include ], - [struct stat s; s.st_fstype[0] = 0;], - [ac_cv_struct_st_fstype=yes], - [ac_cv_struct_st_fstype=no])]) -if test $ac_cv_struct_st_fstype = yes; then - AC_DEFINE(HAVE_ST_FSTYPE) -fi]) - -dnl Checks if structure 'stat' have field 'st_aclcnt'. -dnl Defines HAVE_ST_ACLCNT on success. -AC_DEFUN([AC_STRUCT_ST_ACLCNT], -[AC_CACHE_CHECK([if struct stat contains st_aclcnt], ac_cv_struct_st_aclcnt, - [AC_TRY_COMPILE([#include -#include ], - [struct stat s; s.st_aclcnt = 0;], - [ac_cv_struct_st_aclcnt=yes], - [ac_cv_struct_st_aclcnt=no])]) -if test $ac_cv_struct_st_aclcnt = yes; then - AC_DEFINE(HAVE_ST_ACLCNT) -fi]) - -dnl Checks if structure 'utsname' have field 'processor'. -dnl Defines HAVE_UTSNAME_PROCESSOR on success. -AC_DEFUN([AC_STRUCT_UTSNAME_PROCESSOR], -[AC_CACHE_CHECK([if struct utsname contains processor], ac_cv_struct_utsname_processor, - [AC_TRY_COMPILE([#include ], - [struct utsname u; u.processor[0] = 0;], - [ac_cv_struct_utsname_processor=yes], - [ac_cv_struct_utsname_processor=no])]) -if test $ac_cv_struct_utsname_processor = yes; then - AC_DEFINE(HAVE_UTSNAME_PROCESSOR) -fi]) - -dnl Checks if structure 'utsname' have field 'sysname_host'. -dnl Defines HAVE_UTSNAME_SYSNAME_HOST on success. -AC_DEFUN([AC_STRUCT_UTSNAME_SYSNAME_HOST], -[AC_CACHE_CHECK([if struct utsname contains sysname_host], ac_cv_struct_utsname_sysname_host, - [AC_TRY_COMPILE([#include ], - [struct utsname u; u.sysname_host[0] = 0;], - [ac_cv_struct_utsname_sysname_host=yes], - [ac_cv_struct_utsname_sysname_host=no])]) -if test $ac_cv_struct_utsname_sysname_host = yes; then - AC_DEFINE(HAVE_UTSNAME_SYSNAME_HOST) -fi]) - -dnl Checks if structure 'utsname' have field 'release_host'. -dnl Defines HAVE_UTSNAME_RELEASE_HOST on success. -AC_DEFUN([AC_STRUCT_UTSNAME_RELEASE_HOST], -[AC_CACHE_CHECK([if struct utsname contains release_host], ac_cv_struct_utsname_release_host, - [AC_TRY_COMPILE([#include ], - [struct utsname u; u.release_host[0] = 0;], - [ac_cv_struct_utsname_release_host=yes], - [ac_cv_struct_utsname_release_host=no])]) -if test $ac_cv_struct_utsname_release_host = yes; then - AC_DEFINE(HAVE_UTSNAME_RELEASE_HOST) -fi]) - -dnl Checks if structure 'utsname' have field 'version_host'. -dnl Defines HAVE_UTSNAME_VERSION_HOST on success. -AC_DEFUN([AC_STRUCT_UTSNAME_VERSION_HOST], -[AC_CACHE_CHECK([if struct utsname contains version_host], ac_cv_struct_utsname_version_host, - [AC_TRY_COMPILE([#include ], - [struct utsname u; u.version_host[0] = 0;], - [ac_cv_struct_utsname_version_host=yes], - [ac_cv_struct_utsname_version_host=no])]) -if test $ac_cv_struct_utsname_version_host = yes; then - AC_DEFINE(HAVE_UTSNAME_VERSION_HOST) -fi]) - -dnl Checks if structure 'mtget' have field 'mt_type'. -dnl Defines HAVE_MTGET_TYPE on success. -AC_DEFUN([AC_STRUCT_MTGET_TYPE], -[AC_CACHE_CHECK([if struct mtget contains mt_type], ac_cv_struct_mtget_type, - [AC_TRY_COMPILE([#include -#include ], - [struct mtget t; t.mt_type = 0;], - [ac_cv_struct_mtget_type=yes], - [ac_cv_struct_mtget_type=no])]) -if test $ac_cv_struct_mtget_type = yes; then - AC_DEFINE(HAVE_MTGET_TYPE) -fi]) - -dnl Checks if structure 'mtget' have field 'mt_model'. -dnl Defines HAVE_MTGET_MODEL on success. -AC_DEFUN([AC_STRUCT_MTGET_MODEL], -[AC_CACHE_CHECK([if struct mtget contains mt_model], ac_cv_struct_mtget_model, - [AC_TRY_COMPILE([#include -#include ], - [struct mtget t; t.mt_model = 0;], - [ac_cv_struct_mtget_model=yes], - [ac_cv_struct_mtget_model=no])]) -if test $ac_cv_struct_mtget_model = yes; then - AC_DEFINE(HAVE_MTGET_MODEL) -fi]) - -dnl Checks if structure 'mtget' have field 'mt_dsreg'. -dnl Defines HAVE_MTGET_DSREG on success. -AC_DEFUN([AC_STRUCT_MTGET_DSREG], -[AC_CACHE_CHECK([if struct mtget contains mt_dsreg], ac_cv_struct_mtget_dsreg, - [AC_TRY_COMPILE([#include -#include ], - [struct mtget t; t.mt_dsreg = 0;], - [ac_cv_struct_mtget_dsreg=yes], - [ac_cv_struct_mtget_dsreg=no])]) -if test $ac_cv_struct_mtget_dsreg = yes; then - AC_DEFINE(HAVE_MTGET_DSREG) -fi]) - -dnl Checks if structure 'mtget' have field 'mt_dsreg1'. -dnl Defines HAVE_MTGET_DSREG on success. -AC_DEFUN([AC_STRUCT_MTGET_DSREG1], -[AC_CACHE_CHECK([if struct mtget contains mt_dsreg1], ac_cv_struct_mtget_dsreg1, - [AC_TRY_COMPILE([#include -#include ], - [struct mtget t; t.mt_dsreg1 = 0;], - [ac_cv_struct_mtget_dsreg1=yes], - [ac_cv_struct_mtget_dsreg1=no])]) -if test $ac_cv_struct_mtget_dsreg1 = yes; then - AC_DEFINE(HAVE_MTGET_DSREG1) -fi]) - -dnl Checks if structure 'mtget' have field 'mt_dsreg2'. -dnl Defines HAVE_MTGET_DSREG2 on success. -AC_DEFUN([AC_STRUCT_MTGET_DSREG2], -[AC_CACHE_CHECK([if struct mtget contains mt_dsreg2], ac_cv_struct_mtget_dsreg2, - [AC_TRY_COMPILE([#include -#include ], - [struct mtget t; t.mt_dsreg2 = 0;], - [ac_cv_struct_mtget_dsreg2=yes], - [ac_cv_struct_mtget_dsreg2=no])]) -if test $ac_cv_struct_mtget_dsreg2 = yes; then - AC_DEFINE(HAVE_MTGET_DSREG2) -fi]) - -dnl Checks if structure 'mtget' have field 'mt_gstat'. -dnl Defines HAVE_MTGET_GSTAT on success. -AC_DEFUN([AC_STRUCT_MTGET_GSTAT], -[AC_CACHE_CHECK([if struct mtget contains mt_gstat], ac_cv_struct_mtget_gstat, - [AC_TRY_COMPILE([#include -#include ], - [struct mtget t; t.mt_gstat = 0;], - [ac_cv_struct_mtget_gstat=yes], - [ac_cv_struct_mtget_gstat=no])]) -if test $ac_cv_struct_mtget_gstat = yes; then - AC_DEFINE(HAVE_MTGET_GSTAT) -fi]) - -dnl Checks if structure 'mtget' have field 'mt_erreg'. -dnl Defines HAVE_MTGET_ERREG on success. -AC_DEFUN([AC_STRUCT_MTGET_ERREG], -[AC_CACHE_CHECK([if struct mtget contains mt_erreg], ac_cv_struct_mtget_erreg, - [AC_TRY_COMPILE([#include -#include ], - [struct mtget t; t.mt_erreg = 0;], - [ac_cv_struct_mtget_erreg=yes], - [ac_cv_struct_mtget_erreg=no])]) -if test $ac_cv_struct_mtget_erreg = yes; then - AC_DEFINE(HAVE_MTGET_ERREG) -fi]) - -dnl Checks if structure 'mtget' have field 'mt_resid'. -dnl Defines HAVE_MTGET_RESID on success. -AC_DEFUN([AC_STRUCT_MTGET_RESID], -[AC_CACHE_CHECK([if struct mtget contains mt_resid], ac_cv_struct_mtget_resid, - [AC_TRY_COMPILE([#include -#include ], - [struct mtget t; t.mt_resid = 0;], - [ac_cv_struct_mtget_resid=yes], - [ac_cv_struct_mtget_resid=no])]) -if test $ac_cv_struct_mtget_resid = yes; then - AC_DEFINE(HAVE_MTGET_RESID) -fi]) - -dnl Checks if structure 'mtget' have field 'mt_fileno'. -dnl Defines HAVE_MTGET_FILENO on success. -AC_DEFUN([AC_STRUCT_MTGET_FILENO], -[AC_CACHE_CHECK([if struct mtget contains mt_fileno], - ac_cv_struct_mtget_fileno, - [AC_TRY_COMPILE([#include -#include ], - [struct mtget t; t.mt_fileno = 0;], - [ac_cv_struct_mtget_fileno=yes], - [ac_cv_struct_mtget_fileno=no])]) -if test $ac_cv_struct_mtget_fileno = yes; then - AC_DEFINE(HAVE_MTGET_FILENO) -fi]) - -dnl Checks if structure 'mtget' have field 'mt_blkno'. -dnl Defines HAVE_MTGET_BLKNO on success. -AC_DEFUN([AC_STRUCT_MTGET_BLKNO], -[AC_CACHE_CHECK([if struct mtget contains mt_blkno], ac_cv_struct_mtget_blkno, - [AC_TRY_COMPILE([#include -#include ], - [struct mtget t; t.mt_blkno = 0;], - [ac_cv_struct_mtget_blkno=yes], - [ac_cv_struct_mtget_blkno=no])]) -if test $ac_cv_struct_mtget_blkno = yes; then - AC_DEFINE(HAVE_MTGET_BLKNO) -fi]) - -dnl Checks if structure 'mtget' have field 'mt_flags'. -dnl Defines HAVE_MTGET_FLAGS on success. -AC_DEFUN([AC_STRUCT_MTGET_FLAGS], -[AC_CACHE_CHECK([if struct mtget contains mt_flags], ac_cv_struct_mtget_flags, - [AC_TRY_COMPILE([#include -#include ], - [struct mtget t; t.mt_flags = 0;], - [ac_cv_struct_mtget_flags=yes], - [ac_cv_struct_mtget_flags=no])]) -if test $ac_cv_struct_mtget_flags = yes; then - AC_DEFINE(HAVE_MTGET_FLAGS) -fi]) - -dnl Checks if structure 'mtget' have field 'mt_bf'. -dnl Defines HAVE_MTGET_BF on success. -AC_DEFUN([AC_STRUCT_MTGET_BF], -[AC_CACHE_CHECK([if struct mtget contains mt_bf], ac_cv_struct_mtget_bf, - [AC_TRY_COMPILE([#include -#include ], - [struct mtget t; t.mt_bf = 0;], - [ac_cv_struct_mtget_bf=yes], - [ac_cv_struct_mtget_bf=no])]) -if test $ac_cv_struct_mtget_bf = yes; then - AC_DEFINE(HAVE_MTGET_BF) -fi]) - -dnl Checks for illegal declaration of 'union semun' in sys/sem.h. -dnl Defines HAVE_UNION_SEMUN on success. -AC_DEFUN([AC_STRUCT_UNION_SEMUN], -[AC_CACHE_CHECK([if an illegal declaration for union semun in sys/sem.h exists], ac_cv_struct_union_semun, - [AC_TRY_COMPILE([#include -#include -#include ], [union semun s;], - [ac_cv_struct_union_semun=yes], - [ac_cv_struct_union_semun=no])]) -if test $ac_cv_struct_union_semun = yes; then - AC_DEFINE(HAVE_UNION_SEMUN) -fi]) - -dnl Checks if 'union wait' is declared in 'wait.h' or 'sys/wait.h'. -dnl Defines HAVE_UNION_WAIT on success. -AC_DEFUN([AC_STRUCT_UNION_WAIT], -[AC_CACHE_CHECK([if union wait is declared in wait.h or sys/wait.h], ac_cv_struct_union_wait, - [AC_TRY_COMPILE([#include -#if defined(HAVE_WAIT_H) -# include -#else -#include -#endif], [union wait w;], - [ac_cv_struct_union_wait=yes], - [ac_cv_struct_union_wait=no])]) -if test $ac_cv_struct_union_wait = yes; then - AC_DEFINE(HAVE_UNION_WAIT) -fi]) - -dnl Checks if 'struct rusage' is declared in sys/resource.h. -dnl Defines HAVE_STRUCT_RUSAGE on success. -AC_DEFUN([AC_STRUCT_RUSAGE], -[AC_CACHE_CHECK([if struct rusage is declared in sys/resource.h], ac_cv_struct_rusage, - [AC_TRY_COMPILE([#include -#include ], [struct rusage r;], - [ac_cv_struct_rusage=yes], - [ac_cv_struct_rusage=no])]) -if test $ac_cv_struct_rusage = yes; then - AC_DEFINE(HAVE_STRUCT_RUSAGE) -fi]) - -dnl Checks if structure 'siginfo' have field 'si_utime'. -dnl Defines HAVE_SI_UTIME on success. -AC_DEFUN([AC_STRUCT_SI_UTIME], -[AC_CACHE_CHECK([if struct siginfo contains si_utime], ac_cv_struct_si_utime, - [AC_TRY_COMPILE([#include -#include ], - [struct siginfo si; si.si_utime = 0;], - [ac_cv_struct_si_utime=yes], - [ac_cv_struct_si_utime=no])]) -if test $ac_cv_struct_si_utime = yes; then - AC_DEFINE(HAVE_SI_UTIME) -fi]) - - -dnl Checks if structure 'dirent' have field 'd_ino'. -dnl Defines HAVE_DIRENT_D_INO on success. -AC_DEFUN([AC_STRUCT_DIRENT_D_INO], -[AC_CACHE_CHECK([if struct dirent contains d_ino], ac_cv_struct_dirent_d_ino, - [AC_TRY_COMPILE([ -/* - * This must be kept in sync with schily/dirdesf.h - */ -#ifdef HAVE_SYS_TYPES_H -# include -#endif -#ifdef HAVE_SYS_STAT_H -# include -#endif -# ifdef HAVE_DIRENT_H /* This a POSIX compliant system */ -# include -# define _FOUND_DIR_ -# else /* This is a Pre POSIX system */ - -# define dirent direct - -# if defined(HAVE_SYS_DIR_H) -# include -# define _FOUND_DIR_ -# endif - -# if defined(HAVE_NDIR_H) && !defined(_FOUND_DIR_) -# include -# define _FOUND_DIR_ -# endif - -# if defined(HAVE_SYS_NDIR_H) && !defined(_FOUND_DIR_) -# include -# define _FOUND_DIR_ -# endif -# endif /* HAVE_DIRENT_H */ - ], - [struct dirent d; d.d_ino = 0;], - [ac_cv_struct_dirent_d_ino=yes], - [ac_cv_struct_dirent_d_ino=no])]) -if test $ac_cv_struct_dirent_d_ino = yes; then - AC_DEFINE(HAVE_DIRENT_D_INO) -fi]) - -dnl Checks if structure 'DIR' have field 'dd_fd'. -dnl Defines HAVE_DIR_DD_FD on success. -AC_DEFUN([AC_STRUCT_DIR_DD_FD], -[AC_CACHE_CHECK([if DIR * contains dd_fd], ac_cv_struct_dir_dd_fd, - [AC_TRY_COMPILE([#include ], - [DIR d; d.dd_fd = 0;], - [ac_cv_struct_dir_dd_fd=yes], - [ac_cv_struct_dir_dd_fd=no])]) -if test $ac_cv_struct_dir_dd_fd = yes; then - AC_DEFINE(HAVE_DIR_DD_FD) -fi]) - -dnl Checks wether major(), minor() and makedev() are defined in -dnl 'sys/mkdev.h' or in 'sys/sysmacros.h. Defines MAJOR_IN_MKDEV or -dnl MAJOR_IN_SYSMACROS or nothing. -AC_DEFUN([AC_HEADER_MAKEDEV], -[AC_CACHE_CHECK([for header file containing major(), minor() and makedev()], - ac_cv_header_makedev, -[ac_cv_header_makedev=none -AC_TRY_COMPILE([#include -#include ], - [int i = major(0); i = minor(0); i = makedev(0,0);], - [ac_cv_header_makedev=sys/mkdev.h]) -if test $ac_cv_header_makedev = none; then - AC_TRY_COMPILE([#include -#include ], - [int i = major(0); i = minor(0); i = makedev(0,0);], - [ac_cv_header_makedev=sys/sysmacros.h]) -fi]) -if test $ac_cv_header_makedev = sys/mkdev.h; then - AC_DEFINE(MAJOR_IN_MKDEV) -fi -if test $ac_cv_header_makedev = sys/sysmacros.h; then - AC_DEFINE(MAJOR_IN_SYSMACROS) -fi]) - -dnl Checks for USG derived STDIO that uses _filbuf() -dnl Defines HAVE__FILBUF on success. -AC_DEFUN([AC_HEADER__FILBUF], -[AC_CACHE_CHECK([for _filbuf()], ac_cv_func__filbuf, - [AC_TRY_LINK([#include ], -[FILE *f; -int flag; -int count; -char *ptr; -char c = 0; -f = fopen("confdefs.h", "r"); -_filbuf(f); -_flsbuf(c, f); -flag = f->_flag & _IONBF; -flag |= f->_flag & _IOERR; -flag |= f->_flag & _IOEOF; -count = f->_cnt; -ptr = (char *)f->_ptr; -fclose(f);], - [ac_cv_func__filbuf=yes], - [ac_cv_func__filbuf=no])]) -if test $ac_cv_func__filbuf = yes; then - AC_DEFINE(HAVE__FILBUF) -fi]) - -dnl Checks for USG derived STDIO that uses __filbuf() -dnl Defines HAVE___FILBUF on success. -AC_DEFUN([AC_HEADER___FILBUF], -[AC_CACHE_CHECK([for __filbuf()], ac_cv_func___filbuf, - [AC_TRY_LINK([#include ], -[FILE *f; -int flag; -int count; -char *ptr; -char c = 0; -f = fopen("confdefs.h", "r"); -__filbuf(f); -__flsbuf(c, f); -flag = f->_flag & _IONBF; -flag |= f->_flag & _IOERR; -flag |= f->_flag & _IOEOF; -count = f->_cnt; -ptr = (char *)f->_ptr; -fclose(f);], - [ac_cv_func___filbuf=yes], - [ac_cv_func___filbuf=no])]) -if test $ac_cv_func___filbuf = yes; then - AC_DEFINE(HAVE___FILBUF) -fi]) - -dnl Checks for USG derived STDIO -dnl Defines HAVE_USG_STDIO on success. -AC_DEFUN([AC_HEADER_USG_STDIO], -[AC_REQUIRE([AC_HEADER__FILBUF])AC_REQUIRE([AC_HEADER___FILBUF])dnl -AC_CACHE_CHECK([for USG derived STDIO], ac_cv_header_usg_stdio, - [AC_TRY_LINK([#include ], -[FILE *f; -int flag; -int count; -char *ptr; -char c = 0; -f = fopen("confdefs.h", "r"); -#ifdef HAVE___FILBUF -__filbuf(f); -__flsbuf(c, f); -#else -# ifdef HAVE__FILBUF -_filbuf(f); -_flsbuf(c, f); -# else -no filbuf() -# endif -#endif -flag = f->_flag & _IONBF; -flag |= f->_flag & _IOERR; -flag |= f->_flag & _IOEOF; -count = f->_cnt; -ptr = (char *)f->_ptr; -fclose(f);], - [ac_cv_header_usg_stdio=yes], - [ac_cv_header_usg_stdio=no])]) -if test $ac_cv_header_usg_stdio = yes; then - AC_DEFINE(HAVE_USG_STDIO) -fi]) - -dnl Checks for errno definition in -dnl Defines HAVE_ERRNO_DEF on success. -AC_DEFUN([AC_HEADER_ERRNO_DEF], -[AC_CACHE_CHECK([for errno definition in errno.h], ac_cv_header_errno_def, - [AC_TRY_COMPILE([#include ], -[errno = 0;], - [ac_cv_header_errno_def=yes], - [ac_cv_header_errno_def=no])]) -if test $ac_cv_header_errno_def = yes; then - AC_DEFINE(HAVE_ERRNO_DEF) -fi]) - -dnl Checks if extern long timezone exists in libc -dnl Defines HAVE_VAR_TIMEZONE on success. -AC_DEFUN([AC_VAR_TIMEZONE], -[AC_CACHE_CHECK([for working extern long timezone ], ac_cv_var_timezone, - [AC_TRY_RUN([ -extern long timezone; - -int -main() -{ - exit(timezone != 0); -}], - [ac_cv_var_timezone=yes], - [ac_cv_var_timezone=no])]) -if test $ac_cv_var_timezone = yes; then - AC_DEFINE(HAVE_VAR_TIMEZONE) -fi]) - -dnl Checks for UNIX-98 compliant -dnl Defines HAVE_INTTYPES_H on success. -AC_DEFUN([AC_HEADER_INTTYPES], -[AC_CACHE_CHECK([for UNIX-98 compliant inttypes.h], ac_cv_header_inttypes, - [AC_TRY_COMPILE([#include ], -[int8_t c; uint8_t uc; int16_t s; uint16_t us; int32_t i; uint32_t ui; -int64_t ll; uint64_t ull; -intptr_t ip; uintptr_t uip;], - [ac_cv_header_inttypes=yes], - [ac_cv_header_inttypes=no])]) -if test $ac_cv_header_inttypes = yes; then - AC_DEFINE(HAVE_INTTYPES_H) -fi]) - -dnl Checks for struct timeval in time.h or sys/time.h -dnl Defines HAVE_STRUCT_TIMEVAL on success. -AC_DEFUN([AC_STRUCT_TIMEVAL], -[AC_REQUIRE([AC_HEADER_TIME])dnl -AC_CACHE_CHECK([for struct timeval in time.h or sys/time.h], ac_cv_struct_timeval, - [AC_TRY_COMPILE([ -#include -#ifdef TIME_WITH_SYS_TIME_H -# include -# include -#else -#ifdef HAVE_SYS_TIME_H -# include -#else -# include -#endif -#endif], [struct timeval tv;], - [ac_cv_struct_timeval=yes], - [ac_cv_struct_timeval=no])]) -if test $ac_cv_struct_timeval = yes; then - AC_DEFINE(HAVE_STRUCT_TIMEVAL) -fi]) - -dnl Checks for struct timezone in time.h or sys/time.h -dnl Defines HAVE_STRUCT_TIMEZONE on success. -AC_DEFUN([AC_STRUCT_TIMEZONE], -[AC_REQUIRE([AC_HEADER_TIME])dnl -AC_CACHE_CHECK([for struct timezone in time.h or sys/time.h], ac_cv_struct_timezone, - [AC_TRY_COMPILE([ -#include -#ifdef TIME_WITH_SYS_TIME_H -# include -# include -#else -#ifdef HAVE_SYS_TIME_H -# include -#else -# include -#endif -#endif], [struct timezone tz;], - [ac_cv_struct_timezone=yes], - [ac_cv_struct_timezone=no])]) -if test $ac_cv_struct_timezone = yes; then - AC_DEFINE(HAVE_STRUCT_TIMEZONE) -fi]) - -dnl Checks for type time_t -dnl Defines time_t to long on failure. -AC_DEFUN([AC_TYPE_TIME_T], -[AC_REQUIRE([AC_HEADER_TIME])dnl -AC_CACHE_CHECK([for time_t], ac_cv_type_time_t, - [AC_TRY_COMPILE([ -#include -#ifdef TIME_WITH_SYS_TIME_H -# include -# include -#else -#ifdef HAVE_SYS_TIME_H -# include -#else -# include -#endif -#endif], [time_t t;], - [ac_cv_type_time_t=yes], - [ac_cv_type_time_t=no])]) -if test $ac_cv_type_time_t = no; then - AC_DEFINE(time_t, long) -fi]) - -dnl Checks for type clock_t -dnl Defines clock_t to long on failure. -dnl XXX we cannot check for AC_CHECK_HEADERS(sys/times.h) -AC_DEFUN([AC_TYPE_CLOCK_T], -[AC_REQUIRE([AC_HEADER_TIME])dnl -AC_CACHE_CHECK([for clock_t], ac_cv_type_clock_t, - [AC_TRY_COMPILE([ -#include -/* - * time.h is needed because of a bug in Next Step. - * Next Step needs time.h for clock_t - */ -#ifdef TIME_WITH_SYS_TIME -# ifndef _INCL_SYS_TIME_H -# include -# define _INCL_SYS_TIME_H -# endif -# ifndef _INCL_TIME_H -# include -# define _INCL_TIME_H -# endif -#else -#ifdef HAVE_SYS_TIME_H -# ifndef _INCL_SYS_TIME_H -# include -# define _INCL_SYS_TIME_H -# endif -#else -# ifndef _INCL_TIME_H -# include -# define _INCL_TIME_H -# endif -#endif -#endif -#ifdef HAVE_SYS_TIMES_H -#include -#endif - ], [clock_t t;], - [ac_cv_type_clock_t=yes], - [ac_cv_type_clock_t=no])]) -if test $ac_cv_type_clock_t = no; then - AC_DEFINE(clock_t, long) -fi]) - -dnl Checks for type socklen_t -dnl Defines socklen_t to int on failure. -AC_DEFUN([AC_TYPE_SOCKLEN_T], -[AC_REQUIRE([AC_HEADER_STDC])dnl -AC_MSG_CHECKING(for socklen_t) -AC_CACHE_VAL(ac_cv_type_socklen_t, -[AC_EGREP_CPP(dnl -changequote(<<,>>)dnl -<<(^|[^a-zA-Z_0-9])socklen_t[^a-zA-Z_0-9]>>dnl -changequote([,]), [#include -#if STDC_HEADERS -#include -#include -#endif -#include ], ac_cv_type_socklen_t=yes, ac_cv_type_socklen_t=no)])dnl -AC_MSG_RESULT($ac_cv_type_socklen_t) -if test $ac_cv_type_socklen_t = no; then - AC_DEFINE(socklen_t, int) -fi]) - -dnl Checks for type struct sockaddr_storage -dnl Defines HAVE_SOCKADDR_STORAGE on success. -AC_DEFUN([AC_STRUCT_SOCKADDR_STORAGE], -[AC_CACHE_CHECK([if struct sockaddr_storage is declared in socket.h], ac_cv_struct_sockaddr_storage, - [AC_TRY_COMPILE([#include ], - [struct sockaddr_storage ss; ss.ss_family = 0;], - [ac_cv_struct_sockaddr_storage=yes], - [ac_cv_struct_sockaddr_storage=no])]) -if test $ac_cv_struct_sockaddr_storage = yes; then - AC_DEFINE(HAVE_SOCKADDR_STORAGE) -fi]) - -dnl Checks for type long long -dnl Defines HAVE_LONGLONG on success. -AC_DEFUN([AC_TYPE_LONGLONG], -[AC_CACHE_CHECK([for type long long], ac_cv_type_longlong, - [AC_TRY_COMPILE([], [long long i;], - [ac_cv_type_longlong=yes], - [ac_cv_type_longlong=no])]) -if test $ac_cv_type_longlong = yes; then - AC_DEFINE(HAVE_LONGLONG) -fi]) - -dnl Checks for type __int64 -dnl Defines HAVE___INT64 on success. -AC_DEFUN([AC_TYPE___INT64], -[AC_CACHE_CHECK([for type __int64], ac_cv_type___int64, - [AC_TRY_COMPILE([], [__int64 i;], - [ac_cv_type___int64=yes], - [ac_cv_type___int64=no])]) -if test $ac_cv_type___int64 = yes; then - AC_DEFINE(HAVE___INT64) -fi]) - -dnl Checks if C-compiler orders bitfields htol -dnl Defines BITFIELDS_HTOL on success. -AC_DEFUN([AC_C_BITFIELDS], -[AC_CACHE_CHECK([whether bitorder in bitfields is htol], ac_cv_c_bitfields_htol, - [AC_TRY_RUN([ -struct { - unsigned char x1:4; - unsigned char x2:4; -} a; -int -main() -{ -char *cp; - -cp = (char *)&a; -*cp = 0x12; -exit(a.x1 == 2);}], - [ac_cv_c_bitfields_htol=yes], - [ac_cv_c_bitfields_htol=no])]) -if test $ac_cv_c_bitfields_htol = yes; then - AC_DEFINE(BITFIELDS_HTOL) -fi]) - -dnl Checks if C-compiler understands prototypes -dnl Defines PROTOTYPES on success. -AC_DEFUN([AC_TYPE_PROTOTYPES], -[AC_CACHE_CHECK([for prototypes], ac_cv_type_prototypes, - [AC_TRY_RUN([ -doit(int i, ...) -{return 0;} -int -main(int ac, char *av[]) -{ doit(1, 2, 3); -exit(0);}], - [ac_cv_type_prototypes=yes], - [ac_cv_type_prototypes=no])]) -if test $ac_cv_type_prototypes = yes; then - AC_DEFINE(PROTOTYPES) -fi]) - -dnl Checks for type size_t -dnl Defines HAVE_SIZE_T_ on success. -AC_DEFUN([AC_TYPE_SIZE_T_], -[AC_CACHE_CHECK([for type size_t], ac_cv_type_size_t_, - [AC_TRY_COMPILE([ -#ifdef HAVE_SYS_TYPES_H -#include -#endif -#ifdef HAVE_STDLIB_H -#include -#endif -#ifdef HAVE_STDDEF_H -#include -#endif -#ifdef HAVE_STDIO_H -#include -#endif - ], [size_t s;], - [ac_cv_type_size_t_=yes], - [ac_cv_type_size_t_=no])]) -if test $ac_cv_type_size_t_ = yes; then - AC_DEFINE(HAVE_SIZE_T) -else - AC_DEFINE(NO_SIZE_T) -fi]) - -dnl Checks if type char is unsigned -dnl Defines CHAR_IS_UNSIGNED on success. -AC_DEFUN([AC_TYPE_CHAR], -[AC_CACHE_CHECK([if char is unsigned], ac_cv_type_char_unsigned, - [AC_TRY_RUN([ -int -main() -{ - char c; - - c = -1; - exit(c < 0);}], - [ac_cv_type_char_unsigned=yes], - [ac_cv_type_char_unsigned=no], - [ac_cv_type_char_unsigned=no])]) -if test $ac_cv_type_char_unsigned = yes; then - AC_DEFINE(CHAR_IS_UNSIGNED) -fi]) - -dnl Checks if function/macro va_copy() is available -dnl Defines HAVE_VA_COPY on success. -AC_DEFUN([AC_FUNC_VA_COPY], -[AC_CACHE_CHECK([for va_copy], ac_cv_func_va_copy, - [AC_TRY_LINK([ -#ifdef HAVE_STDARG_H -# include -#else -# include -#endif], - [ -va_list a, b; - -va_copy(a, b);], - [ac_cv_func_va_copy=yes], - [ac_cv_func_va_copy=no])]) -if test $ac_cv_func_va_copy = yes; then - AC_DEFINE(HAVE_VA_COPY) -fi]) - -dnl Checks if function/macro __va_copy() is available -dnl Defines HAVE__VA_COPY on success. -AC_DEFUN([AC_FUNC__VA_COPY], -[AC_CACHE_CHECK([for __va_copy], ac_cv_func__va_copy, - [AC_TRY_LINK([ -#ifdef HAVE_STDARG_H -# include -#else -# include -#endif], - [ -va_list a, b; - -__va_copy(a, b);], - - [ac_cv_func__va_copy=yes], - [ac_cv_func__va_copy=no])]) -if test $ac_cv_func__va_copy = yes; then - AC_DEFINE(HAVE__VA_COPY) -fi]) - -dnl Checks if va_list is an array -dnl Defines VA_LIST_IS_ARRAY on success. -AC_DEFUN([AC_TYPE_VA_LIST], -[AC_CACHE_CHECK([if va_list is an array], ac_cv_type_va_list_array, - [AC_TRY_LINK([ -#ifdef HAVE_STDARG_H -# include -#else -# include -#endif -], - [ -va_list a, b; - -a = b;], - [ac_cv_type_va_list_array=no], - [ac_cv_type_va_list_array=yes])]) -if test $ac_cv_type_va_list_array = yes; then - AC_DEFINE(VA_LIST_IS_ARRAY) -fi]) - -dnl Checks if quotactl is present as ioctl -dnl Defines HAVE_QUOTAIOCTL on success. -AC_DEFUN([AC_FUNC_QUOTAIOCTL], -[AC_CACHE_CHECK([if quotactl is an ioctl], ac_cv_func_quotaioctl, - [AC_TRY_LINK([#include -#include ], - [struct quotctl q; ioctl(0, Q_QUOTACTL, &q)], - [ac_cv_func_quotaioctl=yes], - [ac_cv_func_quotaioctl=no])]) -if test $ac_cv_func_quotaioctl = yes; then - AC_DEFINE(HAVE_QUOTAIOCTL) -fi]) - -dnl Checks if function __dtoa() is available -dnl Defines HAVE_DTOA on success. -AC_DEFUN([AC_FUNC_DTOA], -[AC_CACHE_CHECK([for __dtoa], ac_cv_func_dtoa, - [AC_TRY_LINK([extern char *__dtoa();], -[int decpt; int sign; char *ep; char *bp; -bp = __dtoa(0.0, 2, 6, &decpt, &sign, &ep);], - [ac_cv_func_dtoa=yes], - [ac_cv_func_dtoa=no])]) -if test $ac_cv_func_dtoa = yes; then - AC_DEFINE(HAVE_DTOA) -fi]) - -dnl Checks if reentrant __dtoa() exists (needs a result prt) -dnl Defines HAVE_DTOA_R on success. -AC_DEFUN([AC_FUNC_DTOA_R], -[AC_REQUIRE([AC_FUNC_DTOA])dnl -AC_CACHE_CHECK([for __dtoa that needs result ptr], ac_cv_func_dtoa_r, - [AC_TRY_RUN([ -extern char *__dtoa(); -int -main() -{ -#ifdef HAVE_DTOA - int decpt, sign; - char *bp; - char *ep; - char *result; - - result = 0; - bp = __dtoa(1.9, 2, 5, &decpt, &sign, &ep, &result); - exit(result == 0); -#else - exit(1); -#endif -}], - [ac_cv_func_dtoa_r=yes], - [ac_cv_func_dtoa_r=no])]) -if test $ac_cv_func_dtoa_r = yes; then - AC_DEFINE(HAVE_DTOA_R) -fi]) - -dnl Checks if working ecvt() exists -dnl Defines HAVE_ECVT on success. -AC_DEFUN([AC_FUNC_ECVT], -[AC_CACHE_CHECK([for working ecvt() ], ac_cv_func_ecvt, - [AC_TRY_RUN([ -extern char *ecvt(); - -sprintf(s) - char *s; -{ - strcpy(s, "DEAD"); -} - -int -main() -{ - int a, b; - -/* exit (strcmp("DEAD", ecvt(1.9, 2, &a, &b)) == 0);*/ - exit (strcmp("19", ecvt(1.9, 2, &a, &b)) != 0); -}], - [ac_cv_func_ecvt=yes], - [ac_cv_func_ecvt=no])]) -if test $ac_cv_func_ecvt = yes; then - AC_DEFINE(HAVE_ECVT) -fi]) - -dnl Checks if working fcvt() exists -dnl Defines HAVE_FCVT on success. -AC_DEFUN([AC_FUNC_FCVT], -[AC_CACHE_CHECK([for working fcvt() ], ac_cv_func_fcvt, - [AC_TRY_RUN([ -extern char *fcvt(); - -sprintf(s) - char *s; -{ - strcpy(s, "DEAD"); -} - -int -main() -{ - int a, b; - -/* exit (strcmp("DEAD", fcvt(1.9, 2, &a, &b)) == 0);*/ - exit (strcmp("190", fcvt(1.9, 2, &a, &b)) != 0); -}], - [ac_cv_func_fcvt=yes], - [ac_cv_func_fcvt=no])]) -if test $ac_cv_func_fcvt = yes; then - AC_DEFINE(HAVE_FCVT) -fi]) - -dnl Checks if working gcvt() exists -dnl Defines HAVE_GCVT on success. -AC_DEFUN([AC_FUNC_GCVT], -[AC_CACHE_CHECK([for working gcvt() ], ac_cv_func_gcvt, - [AC_TRY_RUN([ -extern char *gcvt(); - -sprintf(s) - char *s; -{ - strcpy(s, "DEAD"); -} - -int -main() -{ - char buf[32]; - -/* exit (strcmp("DEAD", gcvt(1.9, 10, buf)) == 0);*/ - exit (strcmp("1.9", gcvt(1.9, 10, buf)) != 0); -}], - [ac_cv_func_gcvt=yes], - [ac_cv_func_gcvt=no])]) -if test $ac_cv_func_gcvt = yes; then - AC_DEFINE(HAVE_GCVT) -fi]) - -dnl Checks if function uname() is available -dnl Defines HAVE_UNAME on success. -AC_DEFUN([AC_FUNC_UNAME], -[AC_CACHE_CHECK([for uname], ac_cv_func_uname, - [AC_TRY_LINK([#include ], -[struct utsname un; -uname(&un);], - [ac_cv_func_uname=yes], - [ac_cv_func_uname=no])]) -if test $ac_cv_func_uname = yes; then - AC_DEFINE(HAVE_UNAME) -fi]) - -dnl Checks if function mlockall() is available -dnl beware HP-UX 10.x it contains a bad mlockall() in libc -dnl Defines HAVE_MLOCK on success. -AC_DEFUN([AC_FUNC_MLOCK], -[AC_REQUIRE([AC_HEADER_ERRNO_DEF])dnl -AC_CACHE_CHECK([for mlock], ac_cv_func_mlock, - [AC_TRY_RUN([ -#include -#include -#ifndef HAVE_ERRNO_DEF -extern int errno; -#endif - -main() -{ - if (mlock(0, 0) < 0) { - if (errno == EINVAL || errno == ENOMEM || - errno == EPERM || errno == EACCES) - exit(0); - exit(-1); - } - exit(0); -}], - [ac_cv_func_mlock=yes], - [ac_cv_func_mlock=no])]) -if test $ac_cv_func_mlock = yes; then - AC_DEFINE(HAVE_MLOCK) -fi]) - -dnl Checks if function mlockall() is available -dnl beware HP-UX 10.x it contains a bad mlockall() in libc -dnl Defines HAVE_MLOCKALL on success. -AC_DEFUN([AC_FUNC_MLOCKALL], -[AC_REQUIRE([AC_HEADER_ERRNO_DEF])dnl -AC_CACHE_CHECK([for mlockall], ac_cv_func_mlockall, - [AC_TRY_RUN([ -#include -#include -#include -#ifndef HAVE_ERRNO_DEF -extern int errno; -#endif - -int -main() -{ - if (mlockall(MCL_CURRENT|MCL_FUTURE) < 0) { - if (errno == EINVAL || errno == ENOMEM || - errno == EPERM || errno == EACCES) - exit(0); - exit(-1); - } - exit(0); -} -], - [ac_cv_func_mlockall=yes], - [ac_cv_func_mlockall=no])]) -if test $ac_cv_func_mlockall = yes; then - AC_DEFINE(HAVE_MLOCKALL) -fi]) - -AC_DEFUN([jsAC_FUNC_MMAP], -[AC_REQUIRE([AC_MMAP_SIZEP])dnl -AC_CHECK_HEADERS(unistd.h) -AC_CHECK_FUNCS(getpagesize) -AC_CACHE_CHECK(for working mmap, ac_cv_func_mmap_fixed_mapped, -[AC_TRY_RUN([ -/* Thanks to Mike Haertel and Jim Avera for this test. - Here is a matrix of mmap possibilities: - mmap private not fixed - mmap private fixed at somewhere currently unmapped - mmap private fixed at somewhere already mapped - mmap shared not fixed - mmap shared fixed at somewhere currently unmapped - mmap shared fixed at somewhere already mapped - For private mappings, we should verify that changes cannot be read() - back from the file, nor mmap's back from the file at a different - address. (There have been systems where private was not correctly - implemented like the infamous i386 svr4.0, and systems where the - VM page cache was not coherent with the filesystem buffer cache - like early versions of FreeBSD and possibly contemporary NetBSD.) - For shared mappings, we should conversely verify that changes get - propogated back to all the places they're supposed to be. - - Grep wants private fixed already mapped. - The main things grep needs to know about mmap are: - * does it exist and is it safe to write into the mmap'd area - * how to use it (BSD variants) */ -#include -#include -#include - -/* - * Needed for Apollo Domain/OS and may be for others? - */ -#ifdef _MMAP_WITH_SIZEP -# define mmap_sizeparm(s) (&(s)) -#else -# define mmap_sizeparm(s) (s) -#endif - -/* This mess was copied from the GNU getpagesize.h. */ -#ifndef HAVE_GETPAGESIZE -# ifdef HAVE_UNISTD_H -# include -# endif - -/* Assume that all systems that can run configure have sys/param.h. */ -# ifndef HAVE_SYS_PARAM_H -# define HAVE_SYS_PARAM_H 1 -# endif - -# ifdef _SC_PAGESIZE -# define getpagesize() sysconf(_SC_PAGESIZE) -# else /* no _SC_PAGESIZE */ -# ifdef HAVE_SYS_PARAM_H -# include -# ifdef EXEC_PAGESIZE -# define getpagesize() EXEC_PAGESIZE -# else /* no EXEC_PAGESIZE */ -# ifdef NBPG -# define getpagesize() NBPG * CLSIZE -# ifndef CLSIZE -# define CLSIZE 1 -# endif /* no CLSIZE */ -# else /* no NBPG */ -# ifdef NBPC -# define getpagesize() NBPC -# else /* no NBPC */ -# ifdef PAGESIZE -# define getpagesize() PAGESIZE -# endif /* PAGESIZE */ -# endif /* no NBPC */ -# endif /* no NBPG */ -# endif /* no EXEC_PAGESIZE */ -# else /* no HAVE_SYS_PARAM_H */ -# define getpagesize() 8192 /* punt totally */ -# endif /* no HAVE_SYS_PARAM_H */ -# endif /* no _SC_PAGESIZE */ - -#endif /* no HAVE_GETPAGESIZE */ - -#ifdef __cplusplus -extern "C" { void *malloc(unsigned); } -#else -char *malloc(); -#endif - -int -main() -{ - char *data, *data2, *data3; - int i, pagesize; - int fd; - - pagesize = getpagesize(); - - /* - * First, make a file with some known garbage in it. - */ - data = malloc(pagesize); - if (!data) - exit(1); - for (i = 0; i < pagesize; ++i) - *(data + i) = rand(); - umask(0); - fd = creat("conftestmmap", 0600); - if (fd < 0) - exit(1); - if (write(fd, data, pagesize) != pagesize) - exit(1); - close(fd); - - /* - * Next, try to mmap the file at a fixed address which - * already has something else allocated at it. If we can, - * also make sure that we see the same garbage. - */ - fd = open("conftestmmap", O_RDWR); - if (fd < 0) - exit(1); - data2 = malloc(2 * pagesize); - if (!data2) - exit(1); - data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1); - if (data2 != mmap(data2, mmap_sizeparm(pagesize), PROT_READ | PROT_WRITE, - MAP_PRIVATE | MAP_FIXED, fd, 0L)) - exit(1); - for (i = 0; i < pagesize; ++i) - if (*(data + i) != *(data2 + i)) - exit(1); - - /* - * Finally, make sure that changes to the mapped area - * do not percolate back to the file as seen by read(). - * (This is a bug on some variants of i386 svr4.0.) - */ - for (i = 0; i < pagesize; ++i) - *(data2 + i) = *(data2 + i) + 1; - data3 = malloc(pagesize); - if (!data3) - exit(1); - if (read(fd, data3, pagesize) != pagesize) - exit(1); - for (i = 0; i < pagesize; ++i) - if (*(data + i) != *(data3 + i)) - exit(1); - close(fd); - unlink("conftestmmap"); - exit(0); -} -], ac_cv_func_mmap_fixed_mapped=yes, ac_cv_func_mmap_fixed_mapped=no, -ac_cv_func_mmap_fixed_mapped=no)]) -if test $ac_cv_func_mmap_fixed_mapped = yes; then - AC_DEFINE(HAVE_MMAP) -fi -]) - -AC_DEFUN([AC_MMAP_SIZEP], -[AC_CHECK_HEADERS(unistd.h) -AC_CHECK_FUNCS(getpagesize) -AC_CACHE_CHECK(for mmap that needs ptr to size, ac_cv_func_mmap_sizep, -[AC_TRY_RUN([ -#include -#include -#include -#include -#include - -#ifndef MAP_FILE -#define MAP_FILE 0 /* Needed on Apollo Domain/OS */ -#endif - -/* This mess was copied from the GNU getpagesize.h. */ -#ifndef HAVE_GETPAGESIZE -# ifdef HAVE_UNISTD_H -# include -# endif - -/* Assume that all systems that can run configure have sys/param.h. */ -# ifndef HAVE_SYS_PARAM_H -# define HAVE_SYS_PARAM_H 1 -# endif - -# ifdef _SC_PAGESIZE -# define getpagesize() sysconf(_SC_PAGESIZE) -# else /* no _SC_PAGESIZE */ -# ifdef HAVE_SYS_PARAM_H -# include -# ifdef EXEC_PAGESIZE -# define getpagesize() EXEC_PAGESIZE -# else /* no EXEC_PAGESIZE */ -# ifdef NBPG -# define getpagesize() NBPG * CLSIZE -# ifndef CLSIZE -# define CLSIZE 1 -# endif /* no CLSIZE */ -# else /* no NBPG */ -# ifdef NBPC -# define getpagesize() NBPC -# else /* no NBPC */ -# ifdef PAGESIZE -# define getpagesize() PAGESIZE -# endif /* PAGESIZE */ -# endif /* no NBPC */ -# endif /* no NBPG */ -# endif /* no EXEC_PAGESIZE */ -# else /* no HAVE_SYS_PARAM_H */ -# define getpagesize() 8192 /* punt totally */ -# endif /* no HAVE_SYS_PARAM_H */ -# endif /* no _SC_PAGESIZE */ - -#endif /* no HAVE_GETPAGESIZE */ - -#ifdef __cplusplus -extern "C" { void *malloc(unsigned); } -#else -char *malloc(); -#endif - -jmp_buf jenv; - -int -intr() -{ - signal(SIGSEGV, intr); - longjmp(jenv, 1); -} - -int -main() -{ - char *data, *data2; - int i, pagesize, ps; - int fd; - - pagesize = getpagesize(); - - /* - * First, make a file with some known garbage in it. - */ - data = malloc(pagesize); - if (!data) - exit(1); - for (i = 0; i < pagesize; ++i) - *(data + i) = rand(); - umask(0); - fd = creat("conftestmmap", 0600); - if (fd < 0) - exit(1); - if (write(fd, data, pagesize) != pagesize) - exit(1); - close(fd); - - /* - * Next, try to mmap the file at a fixed address which - * already has something else allocated at it. If we can, - * also make sure that we see the same garbage. - */ - fd = open("conftestmmap", O_RDWR); - if (fd < 0) - exit(1); - - /* - * Keep a copy, Apollo modifies the value... - */ - ps = pagesize; - - /* - * Apollo mmap() is not a syscall but a library function and fails - * if it tries to dereference 'ps'. We must use setjmp in order to - * catch the failure. - */ - signal(SIGSEGV, intr); - if (setjmp(jenv) == 0) { - data2 = mmap(0, ps, PROT_READ, MAP_FILE | MAP_PRIVATE, fd, 0L); - } else { - data2 = (char *)-1; - } - if (data2 != (char *)-1) - exit(1); - - signal(SIGSEGV, intr); - if (setjmp(jenv) == 0) { - data2 = mmap(0, &ps, PROT_READ, MAP_FILE | MAP_PRIVATE, fd, 0L); - } else { - data2 = (char *)-1; - } - if (data2 == (char *)-1) - exit(1); - - for (i = 0; i < pagesize; ++i) - if (*(data + i) != *(data2 + i)) - exit(1); - - close(fd); - unlink("conftestmmap"); - exit(0); -} -], ac_cv_func_mmap_sizep=yes, ac_cv_func_mmap_sizep=no, -ac_cv_func_mmap_sizep=no)]) -if test $ac_cv_func_mmap_sizep = yes; then - AC_DEFINE(_MMAP_WITH_SIZEP) -fi -]) - -dnl Checks if mmap() works to get shared memory -dnl Defines HAVE_SMMAP on success. -AC_DEFUN([AC_FUNC_SMMAP], -[AC_CACHE_CHECK([if mmap works to get shared memory], ac_cv_func_smmap, - [AC_TRY_RUN([ -#include -#include - -#ifndef MAP_ANONYMOUS -# ifdef MAP_ANON -# define MAP_ANONYMOUS MAP_ANON -# endif -#endif - -/* - * Needed for Apollo Domain/OS and may be for others? - */ -#ifdef _MMAP_WITH_SIZEP -# define mmap_sizeparm(s) (&(s)) -#else -# define mmap_sizeparm(s) (s) -#endif - -char * -mkshare() -{ - int size = 8192; - int f; - char *addr; - -#ifdef MAP_ANONYMOUS /* HP/UX */ - f = -1; - addr = mmap(0, mmap_sizeparm(size), PROT_READ|PROT_WRITE, MAP_SHARED|MAP_ANONYMOUS, f, 0); -#else - if ((f = open("/dev/zero", 2)) < 0) - exit(1); - addr = mmap(0, mmap_sizeparm(size), PROT_READ|PROT_WRITE, MAP_SHARED, f, 0); -#endif - if (addr == (char *)-1) - exit(1); - close(f); - - return (addr); -} - -int -main() -{ - char *addr; - - addr = mkshare(); - *addr = 'I'; - - switch (fork()) { - - case -1: - printf("help\n"); exit(1); - - case 0: /* child */ - *addr = 'N'; - _exit(0); - break; - default: /* parent */ - wait(0); - sleep(1); - break; - } - - if (*addr != 'N') - exit(1); - exit(0); -} -], - [ac_cv_func_smmap=yes], - [ac_cv_func_smmap=no], - [ac_cv_func_smmap=no])]) -if test $ac_cv_func_smmap = yes; then - AC_DEFINE(HAVE_SMMAP) -fi]) - -dnl Checks if sys_siglist[] exists -dnl Defines HAVE_SYS_SIGLIST on success. -AC_DEFUN([AC_FUNC_SYS_SIGLIST], -[AC_CACHE_CHECK([for sys_siglist], ac_cv_func_sys_siglist, - [AC_TRY_RUN([ -int -main() -{ extern char *sys_siglist[]; -if (sys_siglist[1] == 0) - exit(1); -exit(0);}], - [ac_cv_func_sys_siglist=yes], - [ac_cv_func_sys_siglist=no])]) -if test $ac_cv_func_sys_siglist = yes; then - AC_DEFINE(HAVE_SYS_SIGLIST) -fi]) - -dnl Checks for maximum number of bits in minor device number -AC_DEFUN([AC_CHECK_MINOR_BITS], -[AC_REQUIRE([AC_HEADER_MAKEDEV])dnl -changequote(<<, >>)dnl -define(<>, DEV_MINOR_BITS)dnl -dnl The cache variable name. -define(<>, ac_cv_dev_minor_bits)dnl -changequote([, ])dnl -AC_MSG_CHECKING(bits in minor device number) -AC_CACHE_VAL(AC_CV_NAME, -[AC_TRY_RUN([#include -#include -#ifdef major -# define _FOUND_MAJOR_ -#endif - -#ifdef MAJOR_IN_MKDEV -# include -# define _FOUND_MAJOR_ -#endif - -#ifndef _FOUND_MAJOR_ -# ifdef MAJOR_IN_SYSMACROS -# include -# define _FOUND_MAJOR_ -# endif -#endif - -#ifndef _FOUND_MAJOR_ -# if defined(hpux) || defined(__hpux__) || defined(__hpux) -# include -# define _FOUND_MAJOR_ -# endif -#endif - -#ifndef _FOUND_MAJOR_ -# define major(dev) (((dev) >> 8) & 0xFF) -# define minor(dev) ((dev) & 0xFF) -# define makedev(majo, mino) (((majo) << 8) | (mino)) -#endif -int -main() -{ - long l = 1; - int i; - int m; - int c = 0; - FILE *f=fopen("conftestval", "w"); - int maxloop = 32; - - if (sizeof (long) > 4) - maxloop = 64; - - if (!f) exit(1); - - for (i=1, m=0; i <= maxloop; i++, l<<=1) { - if (minor(l) == 0 && c == 0) - c = m; - if (minor(l) != 0) - m = i; - } - fprintf(f, "%d\n", m); - exit(0); -}], AC_CV_NAME=`cat conftestval`, AC_CV_NAME=0, ifelse([$2], , , AC_CV_NAME=$2))])dnl -AC_MSG_RESULT($AC_CV_NAME) -AC_DEFINE_UNQUOTED(AC_MACRO_NAME, $AC_CV_NAME) -undefine([AC_MACRO_NAME])dnl -undefine([AC_CV_NAME])dnl -]) - -dnl Checks for maximum number of bits in minor device numbers are non contiguous -dnl Defines DEV_MINOR_NONCONTIG on success. -AC_DEFUN([AC_CHECK_MINOR_NONCONTIG], -[AC_REQUIRE([AC_HEADER_MAKEDEV])dnl -AC_CACHE_CHECK([whether bits in minor device numbers are non contiguous], ac_cv_dev_minor_noncontig, - [AC_TRY_RUN([ -#include -#ifdef major -# define _FOUND_MAJOR_ -#endif - -#ifdef MAJOR_IN_MKDEV -# include -# define _FOUND_MAJOR_ -#endif - -#ifndef _FOUND_MAJOR_ -# ifdef MAJOR_IN_SYSMACROS -# include -# define _FOUND_MAJOR_ -# endif -#endif - -#ifndef _FOUND_MAJOR_ -# if defined(hpux) || defined(__hpux__) || defined(__hpux) -# include -# define _FOUND_MAJOR_ -# endif -#endif - -#ifndef _FOUND_MAJOR_ -# define major(dev) (((dev) >> 8) & 0xFF) -# define minor(dev) ((dev) & 0xFF) -# define makedev(majo, mino) (((majo) << 8) | (mino)) -#endif -int -main() -{ - long l = 1; - int i; - int m; - int c = 0; - int maxloop = 32; - - if (sizeof (long) > 4) - maxloop = 64; - - for (i=1, m=0; i <= maxloop; i++, l<<=1) { - if (minor(l) == 0 && c == 0) - c = m; - if (minor(l) != 0) - m = i; - } -exit (m == c);}], - [ac_cv_dev_minor_noncontig=yes], - [ac_cv_dev_minor_noncontig=no])]) -if test $ac_cv_dev_minor_noncontig = yes; then - AC_DEFINE(DEV_MINOR_NONCONTIG) -fi]) - -dnl Checks if we may not define our own malloc() -dnl Defines NO_USER_MALLOC if we cannot. -AC_DEFUN([AC_USER_MALLOC], -[AC_CACHE_CHECK([if we may not define our own malloc()], ac_cv_no_user_malloc, - [AC_TRY_RUN([ -static int mcalled; -char * -malloc(s) - int s; -{ - extern char *sbrk(); - - mcalled++; - _exit(0); - return (sbrk(s)); -} - -free(p) char *p;{} - -main() -{ -#ifdef HAVE_STRDUP - strdup("aaa"); -#else - exit(0); -#endif - exit(1);}], - [ac_cv_no_user_malloc=no], - [ac_cv_no_user_malloc=yes])]) -if test $ac_cv_no_user_malloc = yes; then - AC_DEFINE(NO_USER_MALLOC) -fi]) - -dnl Checks if BSD-4.2 compliant getpgrp() exists -dnl Defines HAVE_BSD_GETPGRP on success. -AC_DEFUN([AC_FUNC_BSD_GETPGRP], -[AC_CACHE_CHECK([for BSD compliant getpgrp], ac_cv_func_bsd_getpgrp, - [AC_TRY_RUN([ -int -main() -{ long p; -/* - * POSIX getpgrp() has void parameter... - */ - p = getpgrp(-1); - if (p == getpgrp(1) && p == getpgrp(getpid())) - exit(1); -exit(0);}], - [ac_cv_func_bsd_getpgrp=yes], - [ac_cv_func_bsd_getpgrp=no])]) -if test $ac_cv_func_bsd_getpgrp = yes; then - AC_DEFINE(HAVE_BSD_GETPGRP) -fi]) - -dnl Checks if BSD-4.2 compliant setpgrp() exists -dnl Defines HAVE_BSD_SETPGRP on success. -AC_DEFUN([AC_FUNC_BSD_SETPGRP], -[AC_REQUIRE([AC_HEADER_ERRNO_DEF])dnl -AC_CACHE_CHECK([for BSD compliant setpgrp], ac_cv_func_bsd_setpgrp, - [AC_TRY_RUN([ -#include -#ifndef HAVE_ERRNO_DEF -extern int errno; -#endif -int -main() -{ errno = 0; -/* - * Force illegal pid on BSD - */ -if (setpgrp(-1, 100) < 0 && errno == ESRCH) - exit(0); -exit(1);}], - [ac_cv_func_bsd_setpgrp=yes], - [ac_cv_func_bsd_setpgrp=no])]) -if test $ac_cv_func_bsd_setpgrp = yes; then - AC_DEFINE(HAVE_BSD_SETPGRP) -fi]) - -dnl Checks if C99 compliant isinf() exists -dnl Defines HAVE_C99_ISINF on success. -AC_DEFUN([AC_FUNC_C99_ISINF], -[AC_CACHE_CHECK([for C99 compliant isinf], ac_cv_func_c99_isinf, - [AC_TRY_LINK([#include ], [ double d; -#ifndef isinf -The isinf macro is not defined -#endif -return (isinf(d)); -], - [ac_cv_func_c99_isinf=yes], - [ac_cv_func_c99_isinf=no])]) -if test $ac_cv_func_c99_isinf = yes; then - AC_DEFINE(HAVE_C99_ISINF) -fi]) - -dnl Checks if C99 compliant isnan() exists -dnl Defines HAVE_C99_ISNAN on success. -AC_DEFUN([AC_FUNC_C99_ISNAN], -[AC_CACHE_CHECK([for C99 compliant isnan], ac_cv_func_c99_isnan, - [AC_TRY_LINK([#include ], [ double d; -#ifndef isnan -The isnan macro is not defined -#endif -return (isnan(d)); -], - [ac_cv_func_c99_isnan=yes], - [ac_cv_func_c99_isnan=no])]) -if test $ac_cv_func_c99_isnan = yes; then - AC_DEFINE(HAVE_C99_ISNAN) -fi]) - -dnl Checks if select() needs more than sys/time.h & sys/types.h -dnl Defines SELECT_NONSTD_HDR on success. -AC_DEFUN([AC_HEADER_SELECT_NONSTD], -[AC_CACHE_CHECK([if select needs nonstd include files], ac_cv_header_slect_nonstd_hdr, - [AC_TRY_COMPILE([#include -#include ], - [fd_set rfd; FD_ZERO(&rfd); select(1, &rfd, 0, 0, 0);], - [ac_cv_header_slect_nonstd_hdr=no], - [ac_cv_header_slect_nonstd_hdr=yes])]) -if test $ac_cv_header_slect_nonstd_hdr = yes; then - AC_DEFINE(SELECT_NONSTD_HDR) -fi]) - -dnl Checks if select() needs sys/select.h -dnl Defines NEED_SYS_SELECT_H on success. -AC_DEFUN([AC_HEADER_SYS_SELECT], -[AC_REQUIRE([AC_HEADER_SELECT_NONSTD])dnl -AC_CACHE_CHECK([if sys/select.h is needed for select], ac_cv_header_need_sys_select_h, - [AC_TRY_COMPILE([#include -#include -#include -#ifndef SELECT_NONSTD_HDR -do not compile if we do not need nonstandard headers -#endif], - [fd_set rfd; FD_ZERO(&rfd); select(1, &rfd, 0, 0, 0);], - [ac_cv_header_need_sys_select_h=yes], - [ac_cv_header_need_sys_select_h=no])]) -if test $ac_cv_header_need_sys_select_h = yes; then - AC_DEFINE(NEED_SYS_SELECT_H) -fi]) - -dnl Checks if select() needs sys/socket.h -dnl Defines NEED_SYS_SOCKET_H on success. -AC_DEFUN([AC_HEADER_SELECT2], -[AC_REQUIRE([AC_HEADER_SELECT_NONSTD])dnl -AC_CACHE_CHECK([if sys/socket.h is needed for select], ac_cv_header_need_sys_socket_h, - [AC_TRY_COMPILE([#include -#include -#include -#ifndef SELECT_NONSTD_HDR -do not compile if we do not need nonstandard headers -#endif], - [fd_set rfd; FD_ZERO(&rfd); select(1, &rfd, 0, 0, 0);], - [ac_cv_header_need_sys_socket_h=yes], - [ac_cv_header_need_sys_socket_h=no])]) -if test $ac_cv_header_need_sys_socket_h = yes; then - AC_DEFINE(NEED_SYS_SOCKET_H) -fi]) - -dnl Checks if file locking via fcntl() is available -dnl Defines HAVE_FCNTL_LOCKF on success. -AC_DEFUN([AC_FUNC_FCNTL_LOCKF], -[AC_CACHE_CHECK([for file locking via fcntl], ac_cv_func_fcntl_lock, - [AC_TRY_LINK([ -#include -#include ], - [ -struct flock fl; -fcntl(0, F_SETLK, &fl);], - [ac_cv_func_fcntl_lock=yes], - [ac_cv_func_fcntl_lock=no])]) -if test $ac_cv_func_fcntl_lock = yes; then - AC_DEFINE(HAVE_FCNTL_LOCKF) -fi]) - - -dnl Checks if sigsetjmp() is available -dnl Defines HAVE_SIGSETJMP on success. -AC_DEFUN([AC_FUNC_SIGSETJMP], -[AC_CACHE_CHECK([for sigsetjmp], ac_cv_func_sigsetjmp, - [AC_TRY_LINK([ -#include ], - [ -sigjmp_buf jb; -sigsetjmp(jb, 1);], - [ac_cv_func_sigsetjmp=yes], - [ac_cv_func_sigsetjmp=no])]) -if test $ac_cv_func_sigsetjmp = yes; then - AC_DEFINE(HAVE_SIGSETJMP) -fi]) - -dnl Checks if siglongjmp() is available -dnl Defines HAVE_SIGLONGJMP on success. -AC_DEFUN([AC_FUNC_SIGLONGJMP], -[AC_CACHE_CHECK([for siglongjmp], ac_cv_func_siglongjmp, - [AC_TRY_LINK([ -#include ], - [ -sigjmp_buf jb; -sigsetjmp(jb, 1); -siglongjmp(jb, 1);], - [ac_cv_func_siglongjmp=yes], - [ac_cv_func_siglongjmp=no])]) -if test $ac_cv_func_siglongjmp = yes; then - AC_DEFINE(HAVE_SIGLONGJMP) -fi]) - - -dnl Checks if link() allows hard links on symlinks -dnl Defines HAVE_HARD_SYMLINKS on success. -AC_DEFUN([AC_HARD_SYMLINKS], -[AC_CACHE_CHECK([if link() allows hard links on symlinks], ac_cv_hard_symlinks, - [AC_TRY_RUN([ -main() -{ - int ret = 0; - - unlink("confdefs.f1"); - unlink("confdefs.l1"); - unlink("confdefs.h1"); - - if (symlink("confdefs.f1", "confdefs.l1") < 0) - ret = 1; - if (link("confdefs.l1", "confdefs.h1") < 0) - ret = 1; - - unlink("confdefs.l1"); - unlink("confdefs.h1"); - - exit(ret); -}], - [ac_cv_hard_symlinks=yes], - [ac_cv_hard_symlinks=no])]) -if test $ac_cv_hard_symlinks = yes; then - AC_DEFINE(HAVE_HARD_SYMLINKS) -fi]) - - -dnl Checks if link() does not follow symlinks -dnl Defines HAVE_LINK_NOFOLLOW on success. -AC_DEFUN([AC_LINK_NOFOLLOW], -[AC_CACHE_CHECK([if link() does not folow symlinks], ac_cv_link_nofollow, - [AC_TRY_RUN([ -#include -#include - -main() -{ - int ret = 0; - int f; - struct stat sb; - - unlink("confdefs.f1"); - unlink("confdefs.l1"); - unlink("confdefs.h1"); - - f = creat("confdefs.f1", 0666); - close(f); - if (symlink("confdefs.f1", "confdefs.l1") < 0) - ret = 1; - if (link("confdefs.l1", "confdefs.h1") < 0) - ret = 1; - - stat("confdefs.f1", &sb); - if (sb.st_nlink == 2) - ret = 1; - - unlink("confdefs.f1"); - unlink("confdefs.l1"); - unlink("confdefs.h1"); - - exit(ret); -}], - [ac_cv_link_nofollow=yes], - [ac_cv_link_nofollow=no])]) -if test $ac_cv_link_nofollow = yes; then - AC_DEFINE(HAVE_LINK_NOFOLLOW) -fi]) - -dnl Checks if access() does implement E_OK (010) for effective UIDs -dnl Defines HAVE_ACCESS_E_OK on success. -AC_DEFUN([AC_ACCESS_E_OK], -[AC_REQUIRE([AC_HEADER_ERRNO_DEF])dnl -AC_CHECK_HEADERS(unistd.h) -AC_CACHE_CHECK([if access() does implement E_OK], ac_cv_access_e_ok, - [AC_TRY_RUN([ -# ifdef HAVE_UNISTD_H -# include -# endif -#ifndef R_OK -#define R_OK 4 /* Test for Read permission */ -#define W_OK 2 /* Test for Write permission */ -#define X_OK 1 /* Test for eXecute permission */ -#define F_OK 0 /* Test for existence of File */ -#endif - -#ifndef E_OK -#ifdef EFF_ONLY_OK -#define E_OK EFF_ONLY_OK /* Irix */ -#else -#ifdef EUID_OK -#define E_OK EUID_OK /* UNICOS (0400) */ -#else -#define E_OK 010 /* Test effective uids */ -#endif -#endif -#endif - -#include -#ifndef HAVE_ERRNO_DEF -extern int errno; -#endif - -main() -{ -#ifdef _MSC_VER -/* - * If we use "cl" to compile and call access(".", E_OK|F_OK), the program will - * cause an exception that results in a popup window. For this reason, the test - * is disabled for "cl", it would not work anyway. - */ - int ret = 1; -#else - int ret = 0; - - if (access(".", F_OK) != 0) - ret = 1; - else if (access(".", E_OK|F_OK) != 0) - ret = 1; - else if (access(".", (R_OK<<4)|F_OK) == 0) - ret = 1; -#endif - - exit(ret); -}], - [ac_cv_access_e_ok=yes], - [ac_cv_access_e_ok=no])]) -if test $ac_cv_access_e_ok = yes; then - AC_DEFINE(HAVE_ACCESS_E_OK) -fi]) - - -dnl XXXXXXXXXXXXXXXXXX Begin Stolen (but modified) from GNU tar XXXXXXXXXXXXXXXXXXXXXXXXXXX -dnl Changes: - -dnl One line has been changed to: [ac_save_CC="${CC-cc}" to default to "'cc" - -dnl AC_SYS_LARGEFILE_MACRO_VALUE test moved from AC_FUNC_FSEEKO into AC_SYS_LARGEFILE -dnl Do not call AC_FUNC_FSEEKO because it does not check whether fseeko() is -dnl available on non Large File mode. There are additionoal tests for fseeko()/ftello() -dnl inside the AC_HAVE_LARGEFILES test. - -dnl largefile_cc_opt definition added - -#serial 18 - -dnl By default, many hosts won't let programs access large files; -dnl one must use special compiler options to get large-file access to work. -dnl For more details about this brain damage please see: -dnl http://www.sas.com/standards/large.file/x_open.20Mar96.html - -dnl Written by Paul Eggert . - -dnl Internal subroutine of AC_SYS_LARGEFILE. -dnl AC_SYS_LARGEFILE_TEST_INCLUDES -AC_DEFUN([AC_SYS_LARGEFILE_TEST_INCLUDES], - [[#include - /* Check that off_t can represent 2**63 - 1 correctly. - We can't simply "#define LARGE_OFF_T 9223372036854775807", - since some C++ compilers masquerading as C compilers - incorrectly reject 9223372036854775807. */ -# define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) - int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 - && LARGE_OFF_T % 2147483647 == 1) - ? 1 : -1]; - ]]) - -dnl Internal subroutine of AC_SYS_LARGEFILE. -dnl AC_SYS_LARGEFILE_MACRO_VALUE(C-MACRO, VALUE, CACHE-VAR, COMMENT, INCLUDES, FUNCTION-BODY) -AC_DEFUN([AC_SYS_LARGEFILE_MACRO_VALUE], - [AC_CACHE_CHECK([for $1 value needed for large files], $3, - [$3=no - AC_TRY_COMPILE([$5], - [$6], - , - [AC_TRY_COMPILE([#define $1 $2] -[$5] - , - [$6], - [$3=$2])])]) - if test "[$]$3" != no; then - AC_DEFINE_UNQUOTED([$1], [$]$3, [$4]) - fi]) - -AC_DEFUN([AC_SYS_LARGEFILE], - [AC_ARG_ENABLE(largefile, - [ --disable-largefile omit support for large files]) - if test "$enable_largefile" != no; then - - AC_CACHE_CHECK([for special C compiler options needed for large files], - ac_cv_sys_largefile_CC, - [ac_cv_sys_largefile_CC=no - largefile_cc_opt="" - if test "$GCC" != yes; then - # IRIX 6.2 and later do not support large files by default, - # so use the C compiler's -n32 option if that helps. - AC_TRY_COMPILE(AC_SYS_LARGEFILE_TEST_INCLUDES, , , - [ac_save_CC="${CC-cc}" - CC="$CC -n32" - AC_TRY_COMPILE(AC_SYS_LARGEFILE_TEST_INCLUDES, , - ac_cv_sys_largefile_CC=' -n32') - CC="$ac_save_CC"]) - fi]) - if test "$ac_cv_sys_largefile_CC" != no; then - CC="$CC$ac_cv_sys_largefile_CC" - largefile_cc_opt="$ac_cv_sys_largefile_CC" - fi - - AC_SYS_LARGEFILE_MACRO_VALUE(_FILE_OFFSET_BITS, 64, - ac_cv_sys_file_offset_bits, - [Number of bits in a file offset, on hosts where this is settable.], - AC_SYS_LARGEFILE_TEST_INCLUDES) - AC_SYS_LARGEFILE_MACRO_VALUE(_LARGE_FILES, 1, - ac_cv_sys_large_files, - [Define for large files, on AIX-style hosts.], - AC_SYS_LARGEFILE_TEST_INCLUDES) - AC_SYS_LARGEFILE_MACRO_VALUE(_LARGEFILE_SOURCE, 1, - ac_cv_sys_largefile_source, - [Define to make fseeko visible on some hosts (e.g. glibc 2.2).], - [#include ], [return !fseeko;]) - fi - ]) - - -AC_DEFUN([AC_FUNC_FSEEKO], - [AC_SYS_LARGEFILE_MACRO_VALUE(_LARGEFILE_SOURCE, 1, - ac_cv_sys_largefile_source, - [Define to make fseeko visible on some hosts (e.g. glibc 2.2).], - [#include ], [return !fseeko;]) - # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug - # in glibc 2.1.3, but that breaks too many other things. - # If you want fseeko and ftello with glibc, upgrade to a fixed glibc. - - AC_CACHE_CHECK([for fseeko], ac_cv_func_fseeko, - [ac_cv_func_fseeko=no - AC_TRY_LINK([#include ], - [return fseeko && fseeko (stdin, 0, 0);], - [ac_cv_func_fseeko=yes])]) - if test $ac_cv_func_fseeko != no; then - AC_DEFINE(HAVE_FSEEKO, 1, - [Define if fseeko (and presumably ftello) exists and is declared.]) - fi]) - - -dnl XXXXXXXXXXXXXXXXXX End Stolen (but modified) from GNU tar XXXXXXXXXXXXXXXXXXXXXXXXXXXXX - -AC_DEFUN([AC_HAVE_LARGEFILES], -[AC_CACHE_CHECK([if system supports Large Files at all], ac_cv_largefiles, - [AC_TRY_COMPILE([#include -#include ], - [ -/* - * Check that off_t can represent 2**63 - 1 correctly. - * We can't simply "#define LARGE_OFF_T 9223372036854775807", - * since some C++ compilers masquerading as C compilers - * incorrectly reject 9223372036854775807. - */ -# define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) - int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 - && LARGE_OFF_T % 2147483647 == 1) - ? 1 : -1]; -return !fseeko; -return !ftello;], - [ac_cv_largefiles=yes], - [ac_cv_largefiles=no])]) - if test $ac_cv_largefiles = yes; then - AC_DEFINE(HAVE_LARGEFILES) - fi]) - -dnl Checks for whether fseeko() is available in non large file mode -dnl and whether there is a prototype for fseeko() -dnl Defines HAVE_FSEEKO on success. -AC_DEFUN([AC_SMALL_FSEEKO], -[AC_CACHE_CHECK([for fseeko()], ac_cv_func_fseeko, - [AC_TRY_LINK([#include ], -[return !fseeko;], - [ac_cv_func_fseeko=yes], - [ac_cv_func_fseeko=no])]) -if test $ac_cv_func_fseeko = yes; then - AC_DEFINE(HAVE_FSEEKO) -fi]) - -dnl Checks for whether ftello() is available in non large file mode -dnl and whether there is a prototype for ftello() -dnl Defines HAVE_FTELLO on success. -AC_DEFUN([AC_SMALL_FTELLO], -[AC_CACHE_CHECK([for ftello()], ac_cv_func_ftello, - [AC_TRY_LINK([#include ], -[return !ftello;], - [ac_cv_func_ftello=yes], - [ac_cv_func_ftello=no])]) -if test $ac_cv_func_ftello = yes; then - AC_DEFINE(HAVE_FTELLO) -fi]) - -dnl Checks if compiler allows dynamic arrays. -dnl Defines HAVE_DYN_ARRAYS on success. -AC_DEFUN([AC_DYN_ARRAYS], -[AC_CACHE_CHECK([if compiler allows dynamic arrays], ac_cv_dyn_arrays, - [AC_TRY_COMPILE([], - [extern int __aa(); int len = __aa(); char some_array[len];], - [ac_cv_dyn_arrays=yes], - [ac_cv_dyn_arrays=no])]) -if test $ac_cv_dyn_arrays = yes; then - AC_DEFINE(HAVE_DYN_ARRAYS) -fi]) - -dnl Checks if Linux include file linux/ext2_fs.h is broken -dnl Defines HAVE_BROKEN_LINUX_EXT2_FS_H on success. -AC_DEFUN([AC_BROKEN_LINUX_EXT2_FS_H], -[AC_CACHE_CHECK([if Linux include file linux/ext2_fs.h is broken], ac_cv_broken_linux_ext2_fs_h, - [AC_TRY_COMPILE([ -#if defined(__linux__) || defined(__linux) || defined(linux) -#include -#endif], - [], - [ac_cv_broken_linux_ext2_fs_h=no], - [ac_cv_broken_linux_ext2_fs_h=yes])]) -if test $ac_cv_broken_linux_ext2_fs_h = yes; then - AC_DEFINE(HAVE_BROKEN_LINUX_EXT2_FS_H) -fi]) - -dnl Checks if Linux include file /usr/src/linux/include/linux/ext2_fs.h is broken -dnl Defines HAVE_BROKEN_SRC_LINUX_EXT2_FS_H on success. -AC_DEFUN([AC_BROKEN_SRC_LINUX_EXT2_FS_H], -[AC_CACHE_CHECK([if Linux include file /usr/src/linux/include/linux/ext2_fs.h is broken], ac_cv_broken_src_linux_ext2_fs_h, - [___CPPFLAGS=$CPPFLAGS; CPPFLAGS="-I/usr/src/linux/include $CPPFLAGS" - AC_TRY_COMPILE([ -#if defined(__linux__) || defined(__linux) || defined(linux) -#include -#endif], - [], - [ac_cv_broken_src_linux_ext2_fs_h=no], - [ac_cv_broken_src_linux_ext2_fs_h=yes])]) -CPPFLAGS=$___CPPFLAGS -if test $ac_cv_broken_src_linux_ext2_fs_h = yes; then - AC_DEFINE(HAVE_BROKEN_SRC_LINUX_EXT2_FS_H) -fi]) - -dnl Checks if Linux include file scsi/scsi.h is broken -dnl Defines HAVE_BROKEN_SCSI_SCSI_H on success. -AC_DEFUN([AC_BROKEN_SCSI_SCSI_H], -[AC_CACHE_CHECK([if Linux include file scsi/scsi.h is broken], ac_cv_broken_scsi_scsi_h, - [AC_TRY_COMPILE([ -#if defined(__linux__) || defined(__linux) || defined(linux) -#include -#endif], - [], - [ac_cv_broken_scsi_scsi_h=no], - [ac_cv_broken_scsi_scsi_h=yes])]) -if test $ac_cv_broken_scsi_scsi_h = yes; then - AC_DEFINE(HAVE_BROKEN_SCSI_SCSI_H) -fi]) - -dnl Checks if Linux include file /usr/src/linux/include/scsi/scsi.h is broken -dnl Defines HAVE_BROKEN_SRC_SCSI_SCSI_H on success. -AC_DEFUN([AC_BROKEN_SRC_SCSI_SCSI_H], -[AC_CACHE_CHECK([if Linux include file /usr/src/linux/include/scsi/scsi.h is broken], ac_cv_broken_src_scsi_scsi_h, - [___CPPFLAGS=$CPPFLAGS; CPPFLAGS="-I/usr/src/linux/include $CPPFLAGS" - AC_TRY_COMPILE([ -#if defined(__linux__) || defined(__linux) || defined(linux) -#include -#endif], - [], - [ac_cv_broken_src_scsi_scsi_h=no], - [ac_cv_broken_src_scsi_scsi_h=yes])]) -CPPFLAGS=$___CPPFLAGS -if test $ac_cv_broken_src_scsi_scsi_h = yes; then - AC_DEFINE(HAVE_BROKEN_SRC_SCSI_SCSI_H) -fi]) - -dnl Checks if Linux include file scsi/sg.h is broken -dnl Defines HAVE_BROKEN_SCSI_SG_H on success. -AC_DEFUN([AC_BROKEN_SCSI_SG_H], -[AC_CACHE_CHECK([if Linux include file scsi/sg.h is broken], ac_cv_broken_scsi_sg_h, - [AC_TRY_COMPILE([ -#if defined(__linux__) || defined(__linux) || defined(linux) -#include -#include -#endif], - [], - [ac_cv_broken_scsi_sg_h=no], - [ac_cv_broken_scsi_sg_h=yes])]) -if test $ac_cv_broken_scsi_sg_h = yes; then - AC_DEFINE(HAVE_BROKEN_SCSI_SG_H) -fi]) - -dnl Checks if Linux include file /usr/src/linux/include/scsi/sg.h is broken -dnl Defines HAVE_BROKEN_SRC_SCSI_SG_H on success. -AC_DEFUN([AC_BROKEN_SRC_SCSI_SG_H], -[AC_CACHE_CHECK([if Linux include file /usr/src/linux/include/scsi/sg.h is broken], ac_cv_broken_src_scsi_sg_h, - [___CPPFLAGS=$CPPFLAGS; CPPFLAGS="-I/usr/src/linux/include $CPPFLAGS" - AC_TRY_COMPILE([ -#if defined(__linux__) || defined(__linux) || defined(linux) -#include -#include -#endif], - [], - [ac_cv_broken_src_scsi_sg_h=no], - [ac_cv_broken_src_scsi_sg_h=yes])]) -CPPFLAGS=$___CPPFLAGS -if test $ac_cv_broken_src_scsi_sg_h = yes; then - AC_DEFINE(HAVE_BROKEN_SRC_SCSI_SG_H) -fi]) - -AC_DEFUN(AC_PROG_SHELL_BROKEN_E, -[AC_CACHE_CHECK(whether handling of /bin/sh -ce 'command' is broken, ac_cv_prog_shell_broken_e, -[if AC_TRY_COMMAND(/bin/sh -ce 'if false; true; then echo yes; else echo no; fi') | egrep yes >/dev/null 2>&1; then - ac_cv_prog_shell_broken_e=no -else - ac_cv_prog_shell_broken_e=yes -fi -if test $ac_cv_prog_shell_broken_e = yes; then - AC_DEFINE(HAVE_PROG_SHELL_BROKEN_E) -fi])]) diff -Nru cdrtools-2.01.01a33/conf/acoldnames.m4 cdrtools-3.02a09/conf/acoldnames.m4 --- cdrtools-2.01.01a33/conf/acoldnames.m4 2007-04-19 13:30:54.000000000 +0000 +++ cdrtools-3.02a09/conf/acoldnames.m4 1970-01-01 00:00:00.000000000 +0000 @@ -1,80 +0,0 @@ -dnl Map old names of Autoconf macros to new regularized names. -dnl This file is part of Autoconf. -dnl Copyright (C) 1994 Free Software Foundation, Inc. -dnl -dnl This program is free software; you can redistribute it and/or modify -dnl it under the terms of the GNU General Public License as published by -dnl the Free Software Foundation; either version 2, or (at your option) -dnl any later version. -dnl -dnl This program is distributed in the hope that it will be useful, -dnl but WITHOUT ANY WARRANTY; without even the implied warranty of -dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -dnl GNU General Public License for more details. -dnl -dnl You should have received a copy of the GNU General Public License -dnl along with this program; if not, write to the Free Software -dnl Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA -dnl 02111-1307, USA. -dnl -dnl General macros. -dnl -define(AC_WARN, [indir([AC_MSG_WARN], $@)])dnl -define(AC_ERROR, [indir([AC_MSG_ERROR], $@)])dnl -AC_DEFUN(AC_PROGRAM_CHECK, [indir([AC_CHECK_PROG], $@)])dnl -AC_DEFUN(AC_PROGRAM_PATH, [indir([AC_PATH_PROG], $@)])dnl -AC_DEFUN(AC_PROGRAMS_CHECK, [indir([AC_CHECK_PROGS], $@)])dnl -AC_DEFUN(AC_PROGRAMS_PATH, [indir([AC_PATH_PROGS], $@)])dnl -AC_DEFUN(AC_PREFIX, [indir([AC_PREFIX_PROGRAM], $@)])dnl -AC_DEFUN(AC_HEADER_EGREP, [indir([AC_EGREP_HEADER], $@)])dnl -AC_DEFUN(AC_PROGRAM_EGREP, [indir([AC_EGREP_CPP], $@)])dnl -AC_DEFUN(AC_TEST_PROGRAM, [indir([AC_TRY_RUN], $@)])dnl -AC_DEFUN(AC_TEST_CPP, [indir([AC_TRY_CPP], $@)])dnl -AC_DEFUN(AC_HEADER_CHECK, [indir([AC_CHECK_HEADER], $@)])dnl -AC_DEFUN(AC_FUNC_CHECK, [indir([AC_CHECK_FUNC], $@)])dnl -AC_DEFUN(AC_HAVE_FUNCS, [indir([AC_CHECK_FUNCS], $@)])dnl -AC_DEFUN(AC_HAVE_HEADERS, [indir([AC_CHECK_HEADERS], $@)])dnl -AC_DEFUN(AC_SIZEOF_TYPE, [indir([AC_CHECK_SIZEOF], $@)])dnl -dnl -dnl Specific macros. -dnl -AC_DEFUN(AC_GCC_TRADITIONAL, [indir([AC_PROG_GCC_TRADITIONAL])])dnl -AC_DEFUN(AC_MINUS_C_MINUS_O, [indir([AC_PROG_CC_C_O])])dnl -AC_DEFUN(AC_SET_MAKE, [indir([AC_PROG_MAKE_SET])])dnl -AC_DEFUN(AC_YYTEXT_POINTER, [indir([AC_DECL_YYTEXT])])dnl -AC_DEFUN(AC_LN_S, [indir([AC_PROG_LN_S])])dnl -AC_DEFUN(AC_STDC_HEADERS, [indir([AC_HEADER_STDC])])dnl -AC_DEFUN(AC_MAJOR_HEADER, [indir([AC_HEADER_MAJOR])])dnl -AC_DEFUN(AC_STAT_MACROS_BROKEN, [indir([AC_HEADER_STAT])])dnl -AC_DEFUN(AC_SYS_SIGLIST_DECLARED, [indir([AC_DECL_SYS_SIGLIST])])dnl -AC_DEFUN(AC_GETGROUPS_T, [indir([AC_TYPE_GETGROUPS])])dnl -AC_DEFUN(AC_UID_T, [indir([AC_TYPE_UID_T])])dnl -AC_DEFUN(AC_SIZE_T, [indir([AC_TYPE_SIZE_T])])dnl -AC_DEFUN(AC_PID_T, [indir([AC_TYPE_PID_T])])dnl -AC_DEFUN(AC_OFF_T, [indir([AC_TYPE_OFF_T])])dnl -AC_DEFUN(AC_MODE_T, [indir([AC_TYPE_MODE_T])])dnl -AC_DEFUN(AC_RETSIGTYPE, [indir([AC_TYPE_SIGNAL])])dnl -AC_DEFUN(AC_MMAP, [indir([AC_FUNC_MMAP])])dnl -AC_DEFUN(AC_VPRINTF, [indir([AC_FUNC_VPRINTF])])dnl -AC_DEFUN(AC_VFORK, [indir([AC_FUNC_VFORK])])dnl -AC_DEFUN(AC_WAIT3, [indir([AC_FUNC_WAIT3])])dnl -AC_DEFUN(AC_ALLOCA, [indir([AC_FUNC_ALLOCA])])dnl -AC_DEFUN(AC_GETLOADAVG, [indir([AC_FUNC_GETLOADAVG])])dnl -AC_DEFUN(AC_UTIME_NULL, [indir([AC_FUNC_UTIME_NULL])])dnl -AC_DEFUN(AC_STRCOLL, [indir([AC_FUNC_STRCOLL])])dnl -AC_DEFUN(AC_SETVBUF_REVERSED, [indir([AC_FUNC_SETVBUF_REVERSED])])dnl -AC_DEFUN(AC_TIME_WITH_SYS_TIME, [indir([AC_HEADER_TIME])])dnl -AC_DEFUN(AC_TIMEZONE, [indir([AC_STRUCT_TM_ZONE])])dnl -AC_DEFUN(AC_ST_BLOCKS, [indir([AC_STRUCT_ST_BLOCKS])])dnl -AC_DEFUN(AC_ST_BLKSIZE, [indir([AC_STRUCT_ST_BLKSIZE])])dnl -AC_DEFUN(AC_ST_RDEV, [indir([AC_STRUCT_ST_RDEV])])dnl -AC_DEFUN(AC_CROSS_CHECK, [indir([AC_C_CROSS])])dnl -AC_DEFUN(AC_CHAR_UNSIGNED, [indir([AC_C_CHAR_UNSIGNED])])dnl -AC_DEFUN(AC_LONG_DOUBLE, [indir([AC_C_LONG_DOUBLE])])dnl -AC_DEFUN(AC_WORDS_BIGENDIAN, [indir([AC_C_BIGENDIAN])])dnl -AC_DEFUN(AC_INLINE, [indir([AC_C_INLINE])])dnl -AC_DEFUN(AC_CONST, [indir([AC_C_CONST])])dnl -AC_DEFUN(AC_LONG_FILE_NAMES, [indir([AC_SYS_LONG_FILE_NAMES])])dnl -AC_DEFUN(AC_RESTARTABLE_SYSCALLS, [indir([AC_SYS_RESTARTABLE_SYSCALLS])])dnl -AC_DEFUN(AC_FIND_X, [indir([AC_PATH_X])])dnl -AC_DEFUN(AC_FIND_XTRA, [indir([AC_PATH_XTRA])])dnl diff -Nru cdrtools-2.01.01a33/conf/acspecific.m4 cdrtools-3.02a09/conf/acspecific.m4 --- cdrtools-2.01.01a33/conf/acspecific.m4 2007-04-20 11:46:39.000000000 +0000 +++ cdrtools-3.02a09/conf/acspecific.m4 1970-01-01 00:00:00.000000000 +0000 @@ -1,2806 +0,0 @@ -dnl Macros that test for specific features. -dnl This file is part of Autoconf. -dnl Copyright (C) 1992, 93, 94, 95, 96, 1998 Free Software Foundation, Inc. -dnl -dnl This program is free software; you can redistribute it and/or modify -dnl it under the terms of the GNU General Public License as published by -dnl the Free Software Foundation; either version 2, or (at your option) -dnl any later version. -dnl -dnl This program is distributed in the hope that it will be useful, -dnl but WITHOUT ANY WARRANTY; without even the implied warranty of -dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -dnl GNU General Public License for more details. -dnl -dnl You should have received a copy of the GNU General Public License -dnl along with this program; if not, write to the Free Software -dnl Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA -dnl 02111-1307, USA. -dnl -dnl As a special exception, the Free Software Foundation gives unlimited -dnl permission to copy, distribute and modify the configure scripts that -dnl are the output of Autoconf. You need not follow the terms of the GNU -dnl General Public License when using or distributing such scripts, even -dnl though portions of the text of Autoconf appear in them. The GNU -dnl General Public License (GPL) does govern all other use of the material -dnl that constitutes the Autoconf program. -dnl -dnl Certain portions of the Autoconf source text are designed to be copied -dnl (in certain cases, depending on the input) into the output of -dnl Autoconf. We call these the "data" portions. The rest of the Autoconf -dnl source text consists of comments plus executable code that decides which -dnl of the data portions to output in any given case. We call these -dnl comments and executable code the "non-data" portions. Autoconf never -dnl copies any of the non-data portions into its output. -dnl -dnl This special exception to the GPL applies to versions of Autoconf -dnl released by the Free Software Foundation. When you make and -dnl distribute a modified version of Autoconf, you may extend this special -dnl exception to the GPL to apply to your modified version as well, *unless* -dnl your modified version has the potential to copy into its output some -dnl of the text that was the non-data portion of the version that you started -dnl with. (In other words, unless your change moves or copies text from -dnl the non-data portions to the data portions.) If your modification has -dnl such potential, you must delete any notice of this special exception -dnl to the GPL from your modified version. -dnl -dnl Written by David MacKenzie, with help from -dnl Franc,ois Pinard, Karl Berry, Richard Pixley, Ian Lance Taylor, -dnl Roland McGrath, Noah Friedman, david d zuhn, and many others. - - -dnl ### Checks for programs - - -dnl Check whether to use -n, \c, or newline-tab to separate -dnl checking messages from result messages. -dnl Idea borrowed from dist 3.0. -dnl Internal use only. -AC_DEFUN(AC_PROG_ECHO_N, -[if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then - # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu. - if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then - ac_n= ac_c=' -' ac_t=' ' - else - ac_n=-n ac_c= ac_t= - fi -else - ac_n= ac_c='\c' ac_t= -fi -]) - -AC_DEFUN(AC_PROG_CC, -[AC_BEFORE([$0], [AC_PROG_CPP])dnl -AC_CHECK_PROG(CC, gcc, gcc) -if test -z "$CC"; then - AC_CHECK_PROG(CC, cc, cc, , , /usr/ucb/cc) - if test -z "$CC"; then - case "`uname -s`" in - *win32* | *WIN32*) - AC_CHECK_PROG(CC, cl, cl) ;; - esac - fi - test -z "$CC" && AC_MSG_ERROR([no acceptable cc found in \$PATH]) -fi - -AC_PROG_CC_WORKS -AC_PROG_CC_GNU - -if test $ac_cv_prog_gcc = yes; then - GCC=yes -else - GCC= -fi - -dnl Check whether -g works, even if CFLAGS is set, in case the package -dnl plays around with CFLAGS (such as to build both debugging and -dnl normal versions of a library), tasteless as that idea is. -ac_test_CFLAGS="${CFLAGS+set}" -ac_save_CFLAGS="$CFLAGS" -CFLAGS= -AC_PROG_CC_G -if test "$ac_test_CFLAGS" = set; then - CFLAGS="$ac_save_CFLAGS" -elif test $ac_cv_prog_cc_g = yes; then - if test "$GCC" = yes; then - CFLAGS="-g -O2" - else - CFLAGS="-g" - fi -else - if test "$GCC" = yes; then - CFLAGS="-O2" - else - CFLAGS= - fi -fi -]) - -AC_DEFUN(AC_PROG_CXX, -[AC_BEFORE([$0], [AC_PROG_CXXCPP])dnl -AC_CHECK_PROGS(CXX, $CCC c++ g++ gcc CC cxx cc++ cl, gcc) - -AC_PROG_CXX_WORKS -AC_PROG_CXX_GNU - -if test $ac_cv_prog_gxx = yes; then - GXX=yes -else - GXX= -fi - -dnl Check whether -g works, even if CXXFLAGS is set, in case the package -dnl plays around with CXXFLAGS (such as to build both debugging and -dnl normal versions of a library), tasteless as that idea is. -ac_test_CXXFLAGS="${CXXFLAGS+set}" -ac_save_CXXFLAGS="$CXXFLAGS" -CXXFLAGS= -AC_PROG_CXX_G -if test "$ac_test_CXXFLAGS" = set; then - CXXFLAGS="$ac_save_CXXFLAGS" -elif test $ac_cv_prog_cxx_g = yes; then - if test "$GXX" = yes; then - CXXFLAGS="-g -O2" - else - CXXFLAGS="-g" - fi -else - if test "$GXX" = yes; then - CXXFLAGS="-O2" - else - CXXFLAGS= - fi -fi -]) - -dnl Determine a Fortran 77 compiler to use. If `F77' is not already set -dnl in the environment, check for `g77', `f77' and `f2c', in that order. -dnl Set the output variable `F77' to the name of the compiler found. -dnl -dnl If using `g77' (the GNU Fortran 77 compiler), then `AC_PROG_F77' -dnl will set the shell variable `G77' to `yes', and empty otherwise. If -dnl the output variable `FFLAGS' was not already set in the environment, -dnl then set it to `-g -02' for `g77' (or `-O2' where `g77' does not -dnl accept `-g'). Otherwise, set `FFLAGS' to `-g' for all other Fortran -dnl 77 compilers. -dnl -dnl AC_PROG_F77() -AC_DEFUN(AC_PROG_F77, -[AC_BEFORE([$0], [AC_PROG_CPP])dnl -if test -z "$F77"; then - AC_CHECK_PROGS(F77, g77 f77 f2c) - test -z "$F77" && AC_MSG_ERROR([no acceptable Fortran 77 compiler found in \$PATH]) -fi - -AC_PROG_F77_WORKS -AC_PROG_F77_GNU - -if test $ac_cv_prog_g77 = yes; then - G77=yes -dnl Check whether -g works, even if FFLAGS is set, in case the package -dnl plays around with FFLAGS (such as to build both debugging and -dnl normal versions of a library), tasteless as that idea is. - ac_test_FFLAGS="${FFLAGS+set}" - ac_save_FFLAGS="$FFLAGS" - FFLAGS= - AC_PROG_F77_G - if test "$ac_test_FFLAGS" = set; then - FFLAGS="$ac_save_FFLAGS" - elif test $ac_cv_prog_f77_g = yes; then - FFLAGS="-g -O2" - else - FFLAGS="-O2" - fi -else - G77= - test "${FFLAGS+set}" = set || FFLAGS="-g" -fi -]) - -AC_DEFUN(AC_PROG_CC_WORKS, -[AC_MSG_CHECKING([whether the C compiler ($CC $CFLAGS $LDFLAGS) works]) -AC_LANG_SAVE -AC_LANG_C -AC_TRY_COMPILER([main(){return(0);}], ac_cv_prog_cc_works, ac_cv_prog_cc_cross) -AC_LANG_RESTORE -AC_MSG_RESULT($ac_cv_prog_cc_works) -if test $ac_cv_prog_cc_works = no; then - AC_MSG_ERROR([installation or configuration problem: C compiler cannot create executables.]) -fi -AC_MSG_CHECKING([whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler]) -AC_MSG_RESULT($ac_cv_prog_cc_cross) -cross_compiling=$ac_cv_prog_cc_cross -]) - -AC_DEFUN(AC_PROG_CXX_WORKS, -[AC_MSG_CHECKING([whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works]) -AC_LANG_SAVE -AC_LANG_CPLUSPLUS -AC_TRY_COMPILER([int main(){return(0);}], ac_cv_prog_cxx_works, ac_cv_prog_cxx_cross) -AC_LANG_RESTORE -AC_MSG_RESULT($ac_cv_prog_cxx_works) -if test $ac_cv_prog_cxx_works = no; then - AC_MSG_ERROR([installation or configuration problem: C++ compiler cannot create executables.]) -fi -AC_MSG_CHECKING([whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler]) -AC_MSG_RESULT($ac_cv_prog_cxx_cross) -cross_compiling=$ac_cv_prog_cxx_cross -]) - -dnl Test whether the Fortran 77 compiler can compile and link a trivial -dnl Fortran program. Also, test whether the Fortran 77 compiler is a -dnl cross-compiler (which may realistically be the case if the Fortran -dnl compiler is `g77'). -dnl -dnl AC_PROG_F77_WORKS() -AC_DEFUN(AC_PROG_F77_WORKS, -[AC_MSG_CHECKING([whether the Fortran 77 compiler ($F77 $FFLAGS $LDFLAGS) works]) -AC_LANG_SAVE -AC_LANG_FORTRAN77 -AC_TRY_COMPILER(dnl -[ program conftest - end -], ac_cv_prog_f77_works, ac_cv_prog_f77_cross) -AC_LANG_RESTORE -AC_MSG_RESULT($ac_cv_prog_f77_works) -if test $ac_cv_prog_f77_works = no; then - AC_MSG_ERROR([installation or configuration problem: Fortran 77 compiler cannot create executables.]) -fi -AC_MSG_CHECKING([whether the Fortran 77 compiler ($F77 $FFLAGS $LDFLAGS) is a cross-compiler]) -AC_MSG_RESULT($ac_cv_prog_f77_cross) -cross_compiling=$ac_cv_prog_f77_cross -]) - -AC_DEFUN(AC_PROG_CC_GNU, -[AC_CACHE_CHECK(whether we are using GNU C, ac_cv_prog_gcc, -[dnl The semicolon is to pacify NeXT's syntax-checking cpp. -cat > conftest.c </dev/null 2>&1; then - ac_cv_prog_gcc=yes -else - ac_cv_prog_gcc=no -fi])]) - -AC_DEFUN(AC_PROG_CXX_GNU, -[AC_CACHE_CHECK(whether we are using GNU C++, ac_cv_prog_gxx, -[dnl The semicolon is to pacify NeXT's syntax-checking cpp. -cat > conftest.C </dev/null 2>&1; then - ac_cv_prog_gxx=yes -else - ac_cv_prog_gxx=no -fi])]) - -dnl Test whether for Fortran 77 compiler is `g77' (the GNU Fortran 77 -dnl Compiler). This test depends on whether the Fortran 77 compiler can -dnl do CPP pre-processing. -dnl -dnl AC_PROG_F77_GNU() -AC_DEFUN(AC_PROG_F77_GNU, -[AC_CACHE_CHECK(whether we are using GNU Fortran 77, ac_cv_prog_g77, -[cat > conftest.fpp </dev/null 2>&1; then - ac_cv_prog_g77=yes -else - ac_cv_prog_g77=no -fi])]) - -AC_DEFUN(AC_PROG_CC_G, -[AC_CACHE_CHECK(whether ${CC-cc} accepts -g, ac_cv_prog_cc_g, -[echo 'void f(){}' > conftest.c -if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then - ac_cv_prog_cc_g=yes -else - ac_cv_prog_cc_g=no -fi -rm -f conftest* -])]) - -AC_DEFUN(AC_PROG_CXX_G, -[AC_CACHE_CHECK(whether ${CXX-g++} accepts -g, ac_cv_prog_cxx_g, -[echo 'void f(){}' > conftest.cc -if test -z "`${CXX-g++} -g -c conftest.cc 2>&1`"; then - ac_cv_prog_cxx_g=yes -else - ac_cv_prog_cxx_g=no -fi -rm -f conftest* -])]) - -dnl Test whether the Fortran 77 compiler can accept the `-g' option to -dnl enable debugging. -dnl -dnl AC_PROG_F77_G() -AC_DEFUN(AC_PROG_F77_G, -[AC_CACHE_CHECK(whether $F77 accepts -g, ac_cv_prog_f77_g, -[cat > conftest.f << EOF - program conftest - end -EOF -if test -z "`$F77 -g -c conftest.f 2>&1`"; then - ac_cv_prog_f77_g=yes -else - ac_cv_prog_f77_g=no -fi -rm -f conftest* -])]) - -AC_DEFUN(AC_PROG_GCC_TRADITIONAL, -[AC_REQUIRE([AC_PROG_CC])dnl -AC_REQUIRE([AC_PROG_CPP])dnl -if test $ac_cv_prog_gcc = yes; then - AC_CACHE_CHECK(whether ${CC-cc} needs -traditional, - ac_cv_prog_gcc_traditional, -[ ac_pattern="Autoconf.*'x'" - AC_EGREP_CPP($ac_pattern, [#include -Autoconf TIOCGETP], - ac_cv_prog_gcc_traditional=yes, ac_cv_prog_gcc_traditional=no) - - if test $ac_cv_prog_gcc_traditional = no; then - AC_EGREP_CPP($ac_pattern, [#include -Autoconf TCGETA], - ac_cv_prog_gcc_traditional=yes) - fi]) - if test $ac_cv_prog_gcc_traditional = yes; then - CC="$CC -traditional" - fi -fi -]) - -AC_DEFUN(AC_PROG_CC_C_O, -[if test "x$CC" != xcc; then - AC_MSG_CHECKING(whether $CC and cc understand -c and -o together) -else - AC_MSG_CHECKING(whether cc understands -c and -o together) -fi -set dummy $CC; ac_cc="`echo [$]2 | -changequote(, )dnl - sed -e 's/[^a-zA-Z0-9_]/_/g' -e 's/^[0-9]/_/'`" -changequote([, ])dnl -AC_CACHE_VAL(ac_cv_prog_cc_${ac_cc}_c_o, -[echo 'foo(){}' > conftest.c -# Make sure it works both with $CC and with simple cc. -# We do the test twice because some compilers refuse to overwrite an -# existing .o file with -o, though they will create one. -ac_try='${CC-cc} -c conftest.c -o conftest.o 1>&AC_FD_CC' -if AC_TRY_EVAL(ac_try) && - test -f conftest.o && AC_TRY_EVAL(ac_try); -then - eval ac_cv_prog_cc_${ac_cc}_c_o=yes - if test "x$CC" != xcc; then - # Test first that cc exists at all. - if AC_TRY_COMMAND(cc -c conftest.c 1>&AC_FD_CC); then - ac_try='cc -c conftest.c -o conftest.o 1>&AC_FD_CC' - if AC_TRY_EVAL(ac_try) && - test -f conftest.o && AC_TRY_EVAL(ac_try); - then - # cc works too. - : - else - # cc exists but doesn't like -o. - eval ac_cv_prog_cc_${ac_cc}_c_o=no - fi - fi - fi -else - eval ac_cv_prog_cc_${ac_cc}_c_o=no -fi -rm -f conftest* -])dnl -if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" = yes"; then - AC_MSG_RESULT(yes) -else - AC_MSG_RESULT(no) - AC_DEFINE(NO_MINUS_C_MINUS_O) -fi -]) - -dnl Test if the Fortran 77 compiler accepts the options `-c' and `-o' -dnl simultaneously, and define `F77_NO_MINUS_C_MINUS_O' if it does not. -dnl -dnl The usefulness of this macro is questionable, as I can't really see -dnl why anyone would use it. The only reason I include it is for -dnl completeness, since a similar test exists for the C compiler. -dnl -dnl AC_PROG_F77_C_O -AC_DEFUN(AC_PROG_F77_C_O, -[AC_BEFORE([$0], [AC_PROG_F77])dnl -AC_MSG_CHECKING(whether $F77 understand -c and -o together) -set dummy $F77; ac_f77="`echo [$]2 | -changequote(, )dnl -sed -e 's/[^a-zA-Z0-9_]/_/g' -e 's/^[0-9]/_/'`" -changequote([, ])dnl -AC_CACHE_VAL(ac_cv_prog_f77_${ac_f77}_c_o, -[cat > conftest.f << EOF - program conftest - end -EOF -# We do the `AC_TRY_EVAL' test twice because some compilers refuse to -# overwrite an existing `.o' file with `-o', although they will create -# one. -ac_try='$F77 $FFLAGS -c conftest.f -o conftest.o 1>&AC_FD_CC' -if AC_TRY_EVAL(ac_try) && test -f conftest.o && AC_TRY_EVAL(ac_try); then - eval ac_cv_prog_f77_${ac_f77}_c_o=yes -else - eval ac_cv_prog_f77_${ac_f77}_c_o=no -fi -rm -f conftest* -])dnl -if eval "test \"`echo '$ac_cv_prog_f77_'${ac_f77}_c_o`\" = yes"; then - AC_MSG_RESULT(yes) -else - AC_MSG_RESULT(no) - AC_DEFINE(F77_NO_MINUS_C_MINUS_O) -fi -]) - -dnl Define SET_MAKE to set ${MAKE} if make doesn't. -AC_DEFUN(AC_PROG_MAKE_SET, -[AC_MSG_CHECKING(whether ${MAKE-make} sets \${MAKE}) -set dummy ${MAKE-make}; ac_make=`echo "[$]2" | sed 'y%./+-%__p_%'` -AC_CACHE_VAL(ac_cv_prog_make_${ac_make}_set, -[cat > conftestmake <<\EOF -all: - @echo 'ac_maketemp="${MAKE}"' -EOF -changequote(, )dnl -# GNU make sometimes prints "make[1]: Entering...", which would confuse us. -eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=` -changequote([, ])dnl -if test -n "$ac_maketemp"; then - eval ac_cv_prog_make_${ac_make}_set=yes -else - eval ac_cv_prog_make_${ac_make}_set=no -fi -rm -f conftestmake])dnl -if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then - AC_MSG_RESULT(yes) - SET_MAKE= -else - AC_MSG_RESULT(no) - SET_MAKE="MAKE=${MAKE-make}" -fi -AC_SUBST([SET_MAKE])dnl -]) - -AC_DEFUN(AC_PROG_RANLIB, -[AC_CHECK_PROG(RANLIB, ranlib, ranlib, :)]) - -dnl Check for mawk first since it's generally faster. -AC_DEFUN(AC_PROG_AWK, -[AC_CHECK_PROGS(AWK, mawk gawk nawk awk, )]) - -AC_DEFUN(AC_PROG_YACC, -[AC_CHECK_PROGS(YACC, 'bison -y' byacc, yacc)]) - -AC_DEFUN(AC_PROG_CPP, -[AC_MSG_CHECKING(how to run the C preprocessor) -# On Suns, sometimes $CPP names a directory. -if test -n "$CPP" && test -d "$CPP"; then - CPP= -fi -if test -z "$CPP"; then -AC_CACHE_VAL(ac_cv_prog_CPP, -[ # This must be in double quotes, not single quotes, because CPP may get - # substituted into the Makefile and "${CC-cc}" will confuse make. - CPP="${CC-cc} -E" - # On the NeXT, cc -E runs the code through the compiler's parser, - # not just through cpp. -dnl Use a header file that comes with gcc, so configuring glibc -dnl with a fresh cross-compiler works. - AC_TRY_CPP([#include -Syntax Error], , - CPP="${CC-cc} -E -traditional-cpp" - AC_TRY_CPP([#include -Syntax Error], , - CPP="${CC-cc} -nologo -E" - AC_TRY_CPP([#include -Syntax Error], , CPP=/lib/cpp))) - ac_cv_prog_CPP="$CPP"])dnl - CPP="$ac_cv_prog_CPP" -else - ac_cv_prog_CPP="$CPP" -fi -AC_MSG_RESULT($CPP) -AC_SUBST(CPP)dnl -]) - -AC_DEFUN(AC_PROG_CXXCPP, -[AC_MSG_CHECKING(how to run the C++ preprocessor) -if test -z "$CXXCPP"; then -AC_CACHE_VAL(ac_cv_prog_CXXCPP, -[AC_LANG_SAVE[]dnl -AC_LANG_CPLUSPLUS[]dnl - CXXCPP="${CXX-g++} -E" - AC_TRY_CPP([#include ], , CXXCPP=/lib/cpp) - ac_cv_prog_CXXCPP="$CXXCPP" -AC_LANG_RESTORE[]dnl -fi])dnl -CXXCPP="$ac_cv_prog_CXXCPP" -AC_MSG_RESULT($CXXCPP) -AC_SUBST(CXXCPP)dnl -]) - -dnl Require finding the C or C++ preprocessor, whichever is the -dnl current language. -AC_DEFUN(AC_REQUIRE_CPP, -[ifelse(AC_LANG, C, [AC_REQUIRE([AC_PROG_CPP])], [AC_REQUIRE([AC_PROG_CXXCPP])])]) - -AC_DEFUN(AC_PROG_LEX, -[AC_CHECK_PROG(LEX, flex, flex, lex) -if test -z "$LEXLIB" -then - case "$LEX" in - flex*) ac_lib=fl ;; - *) ac_lib=l ;; - esac - AC_CHECK_LIB($ac_lib, yywrap, LEXLIB="-l$ac_lib") -fi -AC_SUBST(LEXLIB)]) - -dnl Check if lex declares yytext as a char * by default, not a char[]. -undefine([AC_DECL_YYTEXT]) -AC_DEFUN(AC_DECL_YYTEXT, -[AC_REQUIRE_CPP()dnl -AC_REQUIRE([AC_PROG_LEX])dnl -AC_CACHE_CHECK(lex output file root, ac_cv_prog_lex_root, -[# The minimal lex program is just a single line: %%. But some broken lexes -# (Solaris, I think it was) want two %% lines, so accommodate them. -echo '%% -%%' | $LEX -if test -f lex.yy.c; then - ac_cv_prog_lex_root=lex.yy -elif test -f lexyy.c; then - ac_cv_prog_lex_root=lexyy -else - AC_MSG_ERROR(cannot find output from $LEX; giving up) -fi]) -LEX_OUTPUT_ROOT=$ac_cv_prog_lex_root -AC_SUBST(LEX_OUTPUT_ROOT)dnl - -AC_CACHE_CHECK(whether yytext is a pointer, ac_cv_prog_lex_yytext_pointer, -[# POSIX says lex can declare yytext either as a pointer or an array; the -# default is implementation-dependent. Figure out which it is, since -# not all implementations provide the %pointer and %array declarations. -ac_cv_prog_lex_yytext_pointer=no -echo 'extern char *yytext;' >>$LEX_OUTPUT_ROOT.c -ac_save_LIBS="$LIBS" -LIBS="$LIBS $LEXLIB" -AC_TRY_LINK(`cat $LEX_OUTPUT_ROOT.c`, , ac_cv_prog_lex_yytext_pointer=yes) -LIBS="$ac_save_LIBS" -rm -f "${LEX_OUTPUT_ROOT}.c" -]) -dnl -if test $ac_cv_prog_lex_yytext_pointer = yes; then - AC_DEFINE(YYTEXT_POINTER) -fi -]) - -AC_DEFUN(AC_PROG_INSTALL, -[AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl -# Find a good install program. We prefer a C program (faster), -# so one script is as good as another. But avoid the broken or -# incompatible versions: -# SysV /etc/install, /usr/sbin/install -# SunOS /usr/etc/install -# IRIX /sbin/install -# AIX /bin/install -# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag -# AFS /usr/afsws/bin/install, which mishandles nonexistent args -# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" -# ./install, which can be erroneously created by make from ./install.sh. -AC_MSG_CHECKING(for a BSD compatible install) -if test -z "$INSTALL"; then -AC_CACHE_VAL(ac_cv_path_install, -[ IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":" - for ac_dir in $PATH; do - # Account for people who put trailing slashes in PATH elements. - case "$ac_dir/" in - /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;; - *) - # OSF1 and SCO ODT 3.0 have their own names for install. - # Don't use installbsd from OSF since it installs stuff as root - # by default. - for ac_prog in ginstall scoinst install; do - if test -f $ac_dir/$ac_prog; then - if test $ac_prog = install && - grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then - # AIX install. It has an incompatible calling convention. - : - else - ac_cv_path_install="$ac_dir/$ac_prog -c" - break 2 - fi - fi - done - ;; - esac - done - IFS="$ac_save_IFS" -])dnl - if test "${ac_cv_path_install+set}" = set; then - INSTALL="$ac_cv_path_install" - else - # As a last resort, use the slow shell script. We don't cache a - # path for INSTALL within a source directory, because that will - # break other packages using the cache if that directory is - # removed, or if the path is relative. - INSTALL="$ac_install_sh" - fi -fi -dnl We do special magic for INSTALL instead of AC_SUBST, to get -dnl relative paths right. -AC_MSG_RESULT($INSTALL) - -# Use test -z because SunOS4 sh mishandles braces in ${var-val}. -# It thinks the first close brace ends the variable substitution. -test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' -AC_SUBST(INSTALL_PROGRAM)dnl - -test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}' -AC_SUBST(INSTALL_SCRIPT)dnl - -test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' -AC_SUBST(INSTALL_DATA)dnl -]) - -AC_DEFUN(AC_PROG_LN_S, -[AC_MSG_CHECKING(whether ln -s works) -AC_CACHE_VAL(ac_cv_prog_LN_S, -[rm -f conftestdata -if ln -s X conftestdata 2>/dev/null -then - rm -f conftestdata - ac_cv_prog_LN_S="ln -s" -else - ac_cv_prog_LN_S=ln -fi])dnl -LN_S="$ac_cv_prog_LN_S" -if test "$ac_cv_prog_LN_S" = "ln -s"; then - AC_MSG_RESULT(yes) -else - AC_MSG_RESULT(no) -fi -AC_SUBST(LN_S)dnl -]) - -define(AC_RSH, -[errprint(__file__:__line__: [$0] has been removed; replace it with equivalent code -)m4exit(4)]) - - -dnl ### Checks for header files - - -AC_DEFUN(AC_HEADER_STDC, -[AC_REQUIRE_CPP()dnl -AC_CACHE_CHECK(for ANSI C header files, ac_cv_header_stdc, -[AC_TRY_CPP([#include -#include -#include -#include ], ac_cv_header_stdc=yes, ac_cv_header_stdc=no) - -if test $ac_cv_header_stdc = yes; then - # SunOS 4.x string.h does not declare mem*, contrary to ANSI. -AC_EGREP_HEADER(memchr, string.h, , ac_cv_header_stdc=no) -fi - -if test $ac_cv_header_stdc = yes; then - # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. -AC_EGREP_HEADER(free, stdlib.h, , ac_cv_header_stdc=no) -fi - -if test $ac_cv_header_stdc = yes; then - # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. -AC_TRY_RUN([#include -#define ISLOWER(c) ('a' <= (c) && (c) <= 'z') -#define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) -#define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) -int main () { int i; for (i = 0; i < 256; i++) -if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); -exit (0); } -], , ac_cv_header_stdc=no, :) -fi]) -if test $ac_cv_header_stdc = yes; then - AC_DEFINE(STDC_HEADERS) -fi -]) - -AC_DEFUN(AC_UNISTD_H, -[AC_OBSOLETE([$0], [; instead use AC_CHECK_HEADERS(unistd.h)])dnl -AC_CHECK_HEADER(unistd.h, AC_DEFINE(HAVE_UNISTD_H))]) - -AC_DEFUN(AC_USG, -[AC_OBSOLETE([$0], - [; instead use AC_CHECK_HEADERS(string.h) and HAVE_STRING_H])dnl -AC_MSG_CHECKING([for BSD string and memory functions]) -AC_TRY_LINK([#include ], [rindex(0, 0); bzero(0, 0);], - [AC_MSG_RESULT(yes)], [AC_MSG_RESULT(no); AC_DEFINE(USG)])]) - - -dnl If memchr and the like aren't declared in , include . -dnl To avoid problems, don't check for gcc2 built-ins. -AC_DEFUN(AC_MEMORY_H, -[AC_OBSOLETE([$0], [; instead use AC_CHECK_HEADERS(memory.h) and HAVE_MEMORY_H])dnl -AC_MSG_CHECKING(whether string.h declares mem functions) -AC_EGREP_HEADER(memchr, string.h, ac_found=yes, ac_found=no) -AC_MSG_RESULT($ac_found) -if test $ac_found = no; then - AC_CHECK_HEADER(memory.h, [AC_DEFINE(NEED_MEMORY_H)]) -fi -]) - -AC_DEFUN(AC_HEADER_MAJOR, -[AC_CACHE_CHECK(whether sys/types.h defines makedev, - ac_cv_header_sys_types_h_makedev, -[AC_TRY_LINK([#include ], [return makedev(0, 0);], - ac_cv_header_sys_types_h_makedev=yes, ac_cv_header_sys_types_h_makedev=no) -]) - -if test $ac_cv_header_sys_types_h_makedev = no; then -AC_CHECK_HEADER(sys/mkdev.h, [AC_DEFINE(MAJOR_IN_MKDEV)]) - - if test $ac_cv_header_sys_mkdev_h = no; then -AC_CHECK_HEADER(sys/sysmacros.h, [AC_DEFINE(MAJOR_IN_SYSMACROS)]) - fi -fi -]) - -AC_DEFUN(AC_HEADER_DIRENT, -[ac_header_dirent=no -AC_CHECK_HEADERS_DIRENT(dirent.h sys/ndir.h sys/dir.h ndir.h, - [ac_header_dirent=$ac_hdr; break]) -# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix. -if test $ac_header_dirent = dirent.h; then -AC_CHECK_LIB(dir, opendir, LIBS="$LIBS -ldir") -else -AC_CHECK_LIB(x, opendir, LIBS="$LIBS -lx") -fi -]) - -dnl Like AC_CHECK_HEADER, except also make sure that HEADER-FILE -dnl defines the type `DIR'. dirent.h on NextStep 3.2 doesn't. -dnl AC_CHECK_HEADER_DIRENT(HEADER-FILE, ACTION-IF-FOUND) -AC_DEFUN(AC_CHECK_HEADER_DIRENT, -[ac_safe=`echo "$1" | sed 'y%./+-%__p_%'` -AC_MSG_CHECKING([for $1 that defines DIR]) -AC_CACHE_VAL(ac_cv_header_dirent_$ac_safe, -[AC_TRY_COMPILE([#include -#include <$1>], [DIR *dirp = 0;], - eval "ac_cv_header_dirent_$ac_safe=yes", - eval "ac_cv_header_dirent_$ac_safe=no")])dnl -if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then - AC_MSG_RESULT(yes) - $2 -else - AC_MSG_RESULT(no) -fi -]) - -dnl Like AC_CHECK_HEADERS, except succeed only for a HEADER-FILE that -dnl defines `DIR'. -dnl AC_CHECK_HEADERS_DIRENT(HEADER-FILE... [, ACTION]) -define(AC_CHECK_HEADERS_DIRENT, -[for ac_hdr in $1 -do -AC_CHECK_HEADER_DIRENT($ac_hdr, -[changequote(, )dnl - ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` -changequote([, ])dnl - AC_DEFINE_UNQUOTED($ac_tr_hdr) $2])dnl -done]) - -AC_DEFUN(AC_DIR_HEADER, -[AC_OBSOLETE([$0], [; instead use AC_HEADER_DIRENT])dnl -ac_header_dirent=no -for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do - AC_CHECK_HEADER_DIRENT($ac_hdr, [ac_header_dirent=$ac_hdr; break]) -done - -case "$ac_header_dirent" in -dirent.h) AC_DEFINE(DIRENT) ;; -sys/ndir.h) AC_DEFINE(SYSNDIR) ;; -sys/dir.h) AC_DEFINE(SYSDIR) ;; -ndir.h) AC_DEFINE(NDIR) ;; -esac - -AC_CACHE_CHECK(whether closedir returns void, ac_cv_func_closedir_void, -[AC_TRY_RUN([#include -#include <$ac_header_dirent> -int closedir(); main() { exit(closedir(opendir(".")) != 0); }], - ac_cv_func_closedir_void=no, ac_cv_func_closedir_void=yes, ac_cv_func_closedir_void=yes)]) -if test $ac_cv_func_closedir_void = yes; then - AC_DEFINE(VOID_CLOSEDIR) -fi -]) - -AC_DEFUN(AC_HEADER_STAT, -[AC_CACHE_CHECK(whether stat file-mode macros are broken, - ac_cv_header_stat_broken, -[AC_EGREP_CPP([You lose], [#include -#include - -#if defined(S_ISBLK) && defined(S_IFDIR) -# if S_ISBLK (S_IFDIR) -You lose. -# endif -#endif - -#if defined(S_ISBLK) && defined(S_IFCHR) -# if S_ISBLK (S_IFCHR) -You lose. -# endif -#endif - -#if defined(S_ISLNK) && defined(S_IFREG) -# if S_ISLNK (S_IFREG) -You lose. -# endif -#endif - -#if defined(S_ISSOCK) && defined(S_IFREG) -# if S_ISSOCK (S_IFREG) -You lose. -# endif -#endif -], ac_cv_header_stat_broken=yes, ac_cv_header_stat_broken=no)]) -if test $ac_cv_header_stat_broken = yes; then - AC_DEFINE(STAT_MACROS_BROKEN) -fi -]) - -AC_DEFUN(AC_DECL_SYS_SIGLIST, -[AC_CACHE_CHECK([for sys_siglist declaration in signal.h or unistd.h], - ac_cv_decl_sys_siglist, -[AC_TRY_COMPILE([#include -#include -/* NetBSD declares sys_siglist in unistd.h. */ -#ifdef HAVE_UNISTD_H -#include -#endif], [char *msg = *(sys_siglist + 1);], - ac_cv_decl_sys_siglist=yes, ac_cv_decl_sys_siglist=no)]) -if test $ac_cv_decl_sys_siglist = yes; then - AC_DEFINE(SYS_SIGLIST_DECLARED) -fi -]) - -AC_DEFUN(AC_HEADER_SYS_WAIT, -[AC_CACHE_CHECK([for sys/wait.h that is POSIX.1 compatible], - ac_cv_header_sys_wait_h, -[AC_TRY_COMPILE([#include -#include -#ifndef WEXITSTATUS -#define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8) -#endif -#ifndef WIFEXITED -#define WIFEXITED(stat_val) (((stat_val) & 255) == 0) -#endif], [int s; -wait (&s); -s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;], -ac_cv_header_sys_wait_h=yes, ac_cv_header_sys_wait_h=no)]) -if test $ac_cv_header_sys_wait_h = yes; then - AC_DEFINE(HAVE_SYS_WAIT_H) -fi -]) - - -dnl ### Checks for typedefs - - -AC_DEFUN(AC_TYPE_GETGROUPS, -[AC_REQUIRE([AC_TYPE_UID_T])dnl -AC_CACHE_CHECK(type of array argument to getgroups, ac_cv_type_getgroups, -[AC_TRY_RUN( -changequote(<<, >>)dnl -<< -/* Thanks to Mike Rendell for this test. */ -#include -#define NGID 256 -#undef MAX -#define MAX(x, y) ((x) > (y) ? (x) : (y)) -main() -{ - gid_t gidset[NGID]; - int i, n; - union { gid_t gval; long lval; } val; - - val.lval = -1; - for (i = 0; i < NGID; i++) - gidset[i] = val.gval; - n = getgroups (sizeof (gidset) / MAX (sizeof (int), sizeof (gid_t)) - 1, - gidset); - /* Exit non-zero if getgroups seems to require an array of ints. This - happens when gid_t is short but getgroups modifies an array of ints. */ - exit ((n > 0 && gidset[n] != val.gval) ? 1 : 0); -} ->>, -changequote([, ])dnl - ac_cv_type_getgroups=gid_t, ac_cv_type_getgroups=int, - ac_cv_type_getgroups=cross) -if test $ac_cv_type_getgroups = cross; then - dnl When we can't run the test program (we are cross compiling), presume - dnl that has either an accurate prototype for getgroups or none. - dnl Old systems without prototypes probably use int. - AC_EGREP_HEADER([getgroups.*int.*gid_t], unistd.h, - ac_cv_type_getgroups=gid_t, ac_cv_type_getgroups=int) -fi]) -AC_DEFINE_UNQUOTED(GETGROUPS_T, $ac_cv_type_getgroups) -]) - -AC_DEFUN(AC_TYPE_UID_T, -[AC_CACHE_CHECK(for uid_t in sys/types.h, ac_cv_type_uid_t, -[AC_EGREP_HEADER(uid_t, sys/types.h, - ac_cv_type_uid_t=yes, ac_cv_type_uid_t=no)]) -if test $ac_cv_type_uid_t = no; then - AC_DEFINE(uid_t, int) - AC_DEFINE(gid_t, int) -fi -]) - -AC_DEFUN(AC_TYPE_SIZE_T, -[AC_CHECK_TYPE(size_t, unsigned)]) - -AC_DEFUN(AC_TYPE_PID_T, -[AC_CHECK_TYPE(pid_t, int)]) - -AC_DEFUN(AC_TYPE_OFF_T, -[AC_CHECK_TYPE(off_t, long)]) - -AC_DEFUN(AC_TYPE_MODE_T, -[AC_CHECK_TYPE(mode_t, int)]) - -dnl Note that identifiers starting with SIG are reserved by ANSI C. -AC_DEFUN(AC_TYPE_SIGNAL, -[AC_CACHE_CHECK([return type of signal handlers], ac_cv_type_signal, -[AC_TRY_COMPILE([#include -#include -#ifdef signal -#undef signal -#endif -#ifdef __cplusplus -extern "C" void (*signal (int, void (*)(int)))(int); -#else -void (*signal ()) (); -#endif -], -[int i;], ac_cv_type_signal=void, ac_cv_type_signal=int)]) -AC_DEFINE_UNQUOTED(RETSIGTYPE, $ac_cv_type_signal) -]) - - -dnl ### Checks for functions - - -AC_DEFUN(AC_FUNC_CLOSEDIR_VOID, -[AC_REQUIRE([AC_HEADER_DIRENT])dnl -AC_CACHE_CHECK(whether closedir returns void, ac_cv_func_closedir_void, -[AC_TRY_RUN([#include -#include <$ac_header_dirent> -int closedir(); main() { exit(closedir(opendir(".")) != 0); }], - ac_cv_func_closedir_void=no, ac_cv_func_closedir_void=yes, ac_cv_func_closedir_void=yes)]) -if test $ac_cv_func_closedir_void = yes; then - AC_DEFINE(CLOSEDIR_VOID) -fi -]) - -AC_DEFUN(AC_FUNC_FNMATCH, -[AC_CACHE_CHECK(for working fnmatch, ac_cv_func_fnmatch_works, -# Some versions of Solaris or SCO have a broken fnmatch function. -# So we run a test program. If we are cross-compiling, take no chance. -# Thanks to John Oleynick and Franc,ois Pinard for this test. -[AC_TRY_RUN([main() { exit (fnmatch ("a*", "abc", 0) != 0); }], -ac_cv_func_fnmatch_works=yes, ac_cv_func_fnmatch_works=no, -ac_cv_func_fnmatch_works=no)]) -if test $ac_cv_func_fnmatch_works = yes; then - AC_DEFINE(HAVE_FNMATCH) -fi -]) - -AC_DEFUN(AC_FUNC_MMAP, -[AC_CHECK_HEADERS(unistd.h) -AC_CHECK_FUNCS(getpagesize) -AC_CACHE_CHECK(for working mmap, ac_cv_func_mmap_fixed_mapped, -[AC_TRY_RUN([ -/* Thanks to Mike Haertel and Jim Avera for this test. - Here is a matrix of mmap possibilities: - mmap private not fixed - mmap private fixed at somewhere currently unmapped - mmap private fixed at somewhere already mapped - mmap shared not fixed - mmap shared fixed at somewhere currently unmapped - mmap shared fixed at somewhere already mapped - For private mappings, we should verify that changes cannot be read() - back from the file, nor mmap's back from the file at a different - address. (There have been systems where private was not correctly - implemented like the infamous i386 svr4.0, and systems where the - VM page cache was not coherent with the filesystem buffer cache - like early versions of FreeBSD and possibly contemporary NetBSD.) - For shared mappings, we should conversely verify that changes get - propogated back to all the places they're supposed to be. - - Grep wants private fixed already mapped. - The main things grep needs to know about mmap are: - * does it exist and is it safe to write into the mmap'd area - * how to use it (BSD variants) */ -#include -#include -#include - -/* This mess was copied from the GNU getpagesize.h. */ -#ifndef HAVE_GETPAGESIZE -# ifdef HAVE_UNISTD_H -# include -# endif - -/* Assume that all systems that can run configure have sys/param.h. */ -# ifndef HAVE_SYS_PARAM_H -# define HAVE_SYS_PARAM_H 1 -# endif - -# ifdef _SC_PAGESIZE -# define getpagesize() sysconf(_SC_PAGESIZE) -# else /* no _SC_PAGESIZE */ -# ifdef HAVE_SYS_PARAM_H -# include -# ifdef EXEC_PAGESIZE -# define getpagesize() EXEC_PAGESIZE -# else /* no EXEC_PAGESIZE */ -# ifdef NBPG -# define getpagesize() NBPG * CLSIZE -# ifndef CLSIZE -# define CLSIZE 1 -# endif /* no CLSIZE */ -# else /* no NBPG */ -# ifdef NBPC -# define getpagesize() NBPC -# else /* no NBPC */ -# ifdef PAGESIZE -# define getpagesize() PAGESIZE -# endif /* PAGESIZE */ -# endif /* no NBPC */ -# endif /* no NBPG */ -# endif /* no EXEC_PAGESIZE */ -# else /* no HAVE_SYS_PARAM_H */ -# define getpagesize() 8192 /* punt totally */ -# endif /* no HAVE_SYS_PARAM_H */ -# endif /* no _SC_PAGESIZE */ - -#endif /* no HAVE_GETPAGESIZE */ - -#ifdef __cplusplus -extern "C" { void *malloc(unsigned); } -#else -char *malloc(); -#endif - -int -main() -{ - char *data, *data2, *data3; - int i, pagesize; - int fd; - - pagesize = getpagesize(); - - /* - * First, make a file with some known garbage in it. - */ - data = malloc(pagesize); - if (!data) - exit(1); - for (i = 0; i < pagesize; ++i) - *(data + i) = rand(); - umask(0); - fd = creat("conftestmmap", 0600); - if (fd < 0) - exit(1); - if (write(fd, data, pagesize) != pagesize) - exit(1); - close(fd); - - /* - * Next, try to mmap the file at a fixed address which - * already has something else allocated at it. If we can, - * also make sure that we see the same garbage. - */ - fd = open("conftestmmap", O_RDWR); - if (fd < 0) - exit(1); - data2 = malloc(2 * pagesize); - if (!data2) - exit(1); - data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1); - if (data2 != mmap(data2, pagesize, PROT_READ | PROT_WRITE, - MAP_PRIVATE | MAP_FIXED, fd, 0L)) - exit(1); - for (i = 0; i < pagesize; ++i) - if (*(data + i) != *(data2 + i)) - exit(1); - - /* - * Finally, make sure that changes to the mapped area - * do not percolate back to the file as seen by read(). - * (This is a bug on some variants of i386 svr4.0.) - */ - for (i = 0; i < pagesize; ++i) - *(data2 + i) = *(data2 + i) + 1; - data3 = malloc(pagesize); - if (!data3) - exit(1); - if (read(fd, data3, pagesize) != pagesize) - exit(1); - for (i = 0; i < pagesize; ++i) - if (*(data + i) != *(data3 + i)) - exit(1); - close(fd); - unlink("conftestmmap"); - exit(0); -} -], ac_cv_func_mmap_fixed_mapped=yes, ac_cv_func_mmap_fixed_mapped=no, -ac_cv_func_mmap_fixed_mapped=no)]) -if test $ac_cv_func_mmap_fixed_mapped = yes; then - AC_DEFINE(HAVE_MMAP) -fi -]) - -AC_DEFUN(AC_FUNC_GETPGRP, -[AC_CACHE_CHECK(whether getpgrp takes no argument, ac_cv_func_getpgrp_void, -[AC_TRY_RUN([ -/* - * If this system has a BSD-style getpgrp(), - * which takes a pid argument, exit unsuccessfully. - * - * Snarfed from Chet Ramey's bash pgrp.c test program - */ -#include -#include - -int pid; -int pg1, pg2, pg3, pg4; -int ng, np, s, child; - -main() -{ - pid = getpid(); - pg1 = getpgrp(0); - pg2 = getpgrp(); - pg3 = getpgrp(pid); - pg4 = getpgrp(1); - - /* - * If all of these values are the same, it's pretty sure that - * we're on a system that ignores getpgrp's first argument. - */ - if (pg2 == pg4 && pg1 == pg3 && pg2 == pg3) - exit(0); - - child = fork(); - if (child < 0) - exit(1); - else if (child == 0) { - np = getpid(); - /* - * If this is Sys V, this will not work; pgrp will be - * set to np because setpgrp just changes a pgrp to be - * the same as the pid. - */ - setpgrp(np, pg1); - ng = getpgrp(0); /* Same result for Sys V and BSD */ - if (ng == pg1) { - exit(1); - } else { - exit(0); - } - } else { - wait(&s); - exit(s>>8); - } -} -], ac_cv_func_getpgrp_void=yes, ac_cv_func_getpgrp_void=no, - AC_MSG_ERROR(cannot check getpgrp if cross compiling)) -]) -if test $ac_cv_func_getpgrp_void = yes; then - AC_DEFINE(GETPGRP_VOID) -fi -]) - -AC_DEFUN(AC_FUNC_SETPGRP, -[AC_CACHE_CHECK(whether setpgrp takes no argument, ac_cv_func_setpgrp_void, -AC_TRY_RUN([ -#ifdef HAVE_UNISTD_H -#include -#endif - -/* - * If this system has a BSD-style setpgrp, which takes arguments, exit - * successfully. - */ -main() -{ - if (setpgrp(1,1) == -1) - exit(0); - else - exit(1); -} -], ac_cv_func_setpgrp_void=no, ac_cv_func_setpgrp_void=yes, - AC_MSG_ERROR(cannot check setpgrp if cross compiling)) -) -if test $ac_cv_func_setpgrp_void = yes; then - AC_DEFINE(SETPGRP_VOID) -fi -]) - -AC_DEFUN(AC_FUNC_VPRINTF, -[AC_CHECK_FUNC(vprintf, AC_DEFINE(HAVE_VPRINTF)) -if test "$ac_cv_func_vprintf" != yes; then -AC_CHECK_FUNC(_doprnt, AC_DEFINE(HAVE_DOPRNT)) -fi -]) - -AC_DEFUN(AC_FUNC_VFORK, -[AC_REQUIRE([AC_TYPE_PID_T])dnl -AC_CHECK_HEADER(vfork.h, AC_DEFINE(HAVE_VFORK_H)) -AC_CACHE_CHECK(for working vfork, ac_cv_func_vfork_works, -[AC_TRY_RUN([/* Thanks to Paul Eggert for this test. */ -#include -#include -#include -#ifdef HAVE_UNISTD_H -#include -#endif -#ifdef HAVE_VFORK_H -#include -#endif -/* On some sparc systems, changes by the child to local and incoming - argument registers are propagated back to the parent. - The compiler is told about this with #include , - but some compilers (e.g. gcc -O) don't grok . - Test for this by using a static variable whose address - is put into a register that is clobbered by the vfork. */ -static -#ifdef __cplusplus -sparc_address_test (int arg) -#else -sparc_address_test (arg) int arg; -#endif -{ - static pid_t child; - if (!child) { - child = vfork (); - if (child < 0) { - perror ("vfork"); - _exit(2); - } - if (!child) { - arg = getpid(); - write(-1, "", 0); - _exit (arg); - } - } -} -main() { - pid_t parent = getpid (); - pid_t child; - - sparc_address_test (); - - child = vfork (); - - if (child == 0) { - /* Here is another test for sparc vfork register problems. - This test uses lots of local variables, at least - as many local variables as main has allocated so far - including compiler temporaries. 4 locals are enough for - gcc 1.40.3 on a Solaris 4.1.3 sparc, but we use 8 to be safe. - A buggy compiler should reuse the register of parent - for one of the local variables, since it will think that - parent can't possibly be used any more in this routine. - Assigning to the local variable will thus munge parent - in the parent process. */ - pid_t - p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(), - p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid(); - /* Convince the compiler that p..p7 are live; otherwise, it might - use the same hardware register for all 8 local variables. */ - if (p != p1 || p != p2 || p != p3 || p != p4 - || p != p5 || p != p6 || p != p7) - _exit(1); - - /* On some systems (e.g. IRIX 3.3), - vfork doesn't separate parent from child file descriptors. - If the child closes a descriptor before it execs or exits, - this munges the parent's descriptor as well. - Test for this by closing stdout in the child. */ - _exit(close(fileno(stdout)) != 0); - } else { - int status; - struct stat st; - - while (wait(&status) != child) - ; - exit( - /* Was there some problem with vforking? */ - child < 0 - - /* Did the child fail? (This shouldn't happen.) */ - || status - - /* Did the vfork/compiler bug occur? */ - || parent != getpid() - - /* Did the file descriptor bug occur? */ - || fstat(fileno(stdout), &st) != 0 - ); - } -}], -ac_cv_func_vfork_works=yes, ac_cv_func_vfork_works=no, AC_CHECK_FUNC(vfork) -ac_cv_func_vfork_works=$ac_cv_func_vfork)]) -if test $ac_cv_func_vfork_works = no; then - AC_DEFINE(vfork, fork) -fi -]) - -AC_DEFUN(AC_FUNC_WAIT3, -[AC_CACHE_CHECK(for wait3 that fills in rusage, ac_cv_func_wait3_rusage, -[AC_TRY_RUN([#include -#include -#include -#include -/* HP-UX has wait3 but does not fill in rusage at all. */ -main() { - struct rusage r; - int i; - /* Use a field that we can force nonzero -- - voluntary context switches. - For systems like NeXT and OSF/1 that don't set it, - also use the system CPU time. And page faults (I/O) for Linux. */ - r.ru_nvcsw = 0; - r.ru_utime.tv_sec = 0; - r.ru_utime.tv_usec = 0; - r.ru_stime.tv_sec = 0; - r.ru_stime.tv_usec = 0; - r.ru_majflt = r.ru_minflt = 0; - switch (fork()) { - case 0: /* Child. */ - sleep(1); /* Give up the CPU. */ - for (i=200000; --i > 0;) getpid(); /* Use up some CPU time */ - _exit(0); - case -1: _exit(0); /* What can we do? */ - default: /* Parent. */ - wait3(&i, 0, &r); - sleep(2); /* Avoid "text file busy" from rm on fast HP-UX machines. */ - exit(r.ru_nvcsw == 0 && r.ru_majflt == 0 && r.ru_minflt == 0 - && r.ru_utime.tv_sec == 0 && r.ru_utime.tv_usec == 0 - && r.ru_stime.tv_sec == 0 && r.ru_stime.tv_usec == 0); - } -}], ac_cv_func_wait3_rusage=yes, ac_cv_func_wait3_rusage=no, -ac_cv_func_wait3_rusage=no)]) -if test $ac_cv_func_wait3_rusage = yes; then - AC_DEFINE(HAVE_WAIT3) -fi -]) - -AC_DEFUN(AC_FUNC_ALLOCA, -[AC_REQUIRE_CPP()dnl Set CPP; we run AC_EGREP_CPP conditionally. -# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works -# for constant arguments. Useless! -AC_CACHE_CHECK([for working alloca.h], ac_cv_header_alloca_h, -[AC_TRY_LINK([#include ], [char *p = alloca(2 * sizeof(int));], - ac_cv_header_alloca_h=yes, ac_cv_header_alloca_h=no)]) -if test $ac_cv_header_alloca_h = yes; then - AC_DEFINE(HAVE_ALLOCA_H) -fi - -AC_CACHE_CHECK([for alloca], ac_cv_func_alloca_works, -[AC_TRY_LINK([ -#ifdef __GNUC__ -# define alloca __builtin_alloca -#else -# ifdef _MSC_VER -# include -# define alloca _alloca -# else -# if HAVE_ALLOCA_H -# include -# else -# ifdef _AIX - #pragma alloca -# else -# ifndef alloca /* predefined by HP cc +Olibcalls */ -char *alloca (); -# endif -# endif -# endif -# endif -#endif -], [char *p = (char *) alloca(1);], - ac_cv_func_alloca_works=yes, ac_cv_func_alloca_works=no)]) -if test $ac_cv_func_alloca_works = yes; then - AC_DEFINE(HAVE_ALLOCA) -fi - -if test $ac_cv_func_alloca_works = no; then - # The SVR3 libPW and SVR4 libucb both contain incompatible functions - # that cause trouble. Some versions do not even contain alloca or - # contain a buggy version. If you still want to use their alloca, - # use ar to extract alloca.o from them instead of compiling alloca.c. - ALLOCA=alloca.${ac_objext} - AC_DEFINE(C_ALLOCA) - -AC_CACHE_CHECK(whether alloca needs Cray hooks, ac_cv_os_cray, -[AC_EGREP_CPP(webecray, -[#if defined(CRAY) && ! defined(CRAY2) -webecray -#else -wenotbecray -#endif -], ac_cv_os_cray=yes, ac_cv_os_cray=no)]) -if test $ac_cv_os_cray = yes; then -for ac_func in _getb67 GETB67 getb67; do - AC_CHECK_FUNC($ac_func, [AC_DEFINE_UNQUOTED(CRAY_STACKSEG_END, $ac_func) - break]) -done -fi - -AC_CACHE_CHECK(stack direction for C alloca, ac_cv_c_stack_direction, -[AC_TRY_RUN([find_stack_direction () -{ - static char *addr = 0; - auto char dummy; - if (addr == 0) - { - addr = &dummy; - return find_stack_direction (); - } - else - return (&dummy > addr) ? 1 : -1; -} -main () -{ - exit (find_stack_direction() < 0); -}], ac_cv_c_stack_direction=1, ac_cv_c_stack_direction=-1, - ac_cv_c_stack_direction=0)]) -AC_DEFINE_UNQUOTED(STACK_DIRECTION, $ac_cv_c_stack_direction) -fi -AC_SUBST(ALLOCA)dnl -]) - -AC_DEFUN(AC_FUNC_GETLOADAVG, -[ac_have_func=no # yes means we've found a way to get the load average. - -# Some systems with -lutil have (and need) -lkvm as well, some do not. -# On Solaris, -lkvm requires nlist from -lelf, so check that first -# to get the right answer into the cache. -AC_CHECK_LIB(elf, elf_begin, LIBS="-lelf $LIBS") -AC_CHECK_LIB(kvm, kvm_open, LIBS="-lkvm $LIBS") -# Check for the 4.4BSD definition of getloadavg. -AC_CHECK_LIB(util, getloadavg, - [LIBS="-lutil $LIBS" ac_have_func=yes ac_cv_func_getloadavg_setgid=yes]) - -if test $ac_have_func = no; then - # There is a commonly available library for RS/6000 AIX. - # Since it is not a standard part of AIX, it might be installed locally. - ac_getloadavg_LIBS="$LIBS"; LIBS="-L/usr/local/lib $LIBS" - AC_CHECK_LIB(getloadavg, getloadavg, - LIBS="-lgetloadavg $LIBS", LIBS="$ac_getloadavg_LIBS") -fi - -# Make sure it is really in the library, if we think we found it. -AC_REPLACE_FUNCS(getloadavg) - -if test $ac_cv_func_getloadavg = yes; then - AC_DEFINE(HAVE_GETLOADAVG) - ac_have_func=yes -else - # Figure out what our getloadavg.c needs. - ac_have_func=no - AC_CHECK_HEADER(sys/dg_sys_info.h, - [ac_have_func=yes; AC_DEFINE(DGUX) - AC_CHECK_LIB(dgc, dg_sys_info)]) - - # We cannot check for , because Solaris 2 does not use dwarf (it - # uses stabs), but it is still SVR4. We cannot check for because - # Irix 4.0.5F has the header but not the library. - if test $ac_have_func = no && test $ac_cv_lib_elf_elf_begin = yes; then - ac_have_func=yes; AC_DEFINE(SVR4) - fi - - if test $ac_have_func = no; then - AC_CHECK_HEADER(inq_stats/cpustats.h, - [ac_have_func=yes; AC_DEFINE(UMAX) - AC_DEFINE(UMAX4_3)]) - fi - - if test $ac_have_func = no; then - AC_CHECK_HEADER(sys/cpustats.h, - [ac_have_func=yes; AC_DEFINE(UMAX)]) - fi - - if test $ac_have_func = no; then - AC_CHECK_HEADERS(mach/mach.h) - fi - - AC_CHECK_HEADER(nlist.h, - [AC_DEFINE(NLIST_STRUCT) - AC_CACHE_CHECK([for n_un in struct nlist], ac_cv_struct_nlist_n_un, - [AC_TRY_COMPILE([#include ], - [struct nlist n; n.n_un.n_name = 0;], - ac_cv_struct_nlist_n_un=yes, ac_cv_struct_nlist_n_un=no)]) - if test $ac_cv_struct_nlist_n_un = yes; then - AC_DEFINE(NLIST_NAME_UNION) - fi - ])dnl -fi # Do not have getloadavg in system libraries. - -# Some definitions of getloadavg require that the program be installed setgid. -dnl FIXME Don't hardwire the path of getloadavg.c in the top-level directory. -AC_CACHE_CHECK(whether getloadavg requires setgid, - ac_cv_func_getloadavg_setgid, -[AC_EGREP_CPP([Yowza Am I SETGID yet], -[#include "$srcdir/getloadavg.c" -#ifdef LDAV_PRIVILEGED -Yowza Am I SETGID yet -#endif], - ac_cv_func_getloadavg_setgid=yes, ac_cv_func_getloadavg_setgid=no)]) -if test $ac_cv_func_getloadavg_setgid = yes; then - NEED_SETGID=true; AC_DEFINE(GETLOADAVG_PRIVILEGED) -else - NEED_SETGID=false -fi -AC_SUBST(NEED_SETGID)dnl - -if test $ac_cv_func_getloadavg_setgid = yes; then - AC_CACHE_CHECK(group of /dev/kmem, ac_cv_group_kmem, -[changequote(, )dnl - # On Solaris, /dev/kmem is a symlink. Get info on the real file. - ac_ls_output=`ls -lgL /dev/kmem 2>/dev/null` - # If we got an error (system does not support symlinks), try without -L. - test -z "$ac_ls_output" && ac_ls_output=`ls -lg /dev/kmem` - ac_cv_group_kmem=`echo $ac_ls_output \ - | sed -ne 's/[ ][ ]*/ /g; - s/^.[sSrwx-]* *[0-9]* *\([^0-9]*\) *.*/\1/; - / /s/.* //;p;'` -changequote([, ])dnl -]) - KMEM_GROUP=$ac_cv_group_kmem -fi -AC_SUBST(KMEM_GROUP)dnl -]) - -AC_DEFUN(AC_FUNC_UTIME_NULL, -[AC_CACHE_CHECK(whether utime accepts a null argument, ac_cv_func_utime_null, -[rm -f conftestdata; > conftestdata -# Sequent interprets utime(file, 0) to mean use start of epoch. Wrong. -AC_TRY_RUN([#include -#include -main() { -struct stat s, t; -exit(!(stat ("conftestdata", &s) == 0 && utime("conftestdata", (long *)0) == 0 -&& stat("conftestdata", &t) == 0 && t.st_mtime >= s.st_mtime -&& t.st_mtime - s.st_mtime < 120)); -}], ac_cv_func_utime_null=yes, ac_cv_func_utime_null=no, - ac_cv_func_utime_null=no) -rm -f core core.* *.core]) -if test $ac_cv_func_utime_null = yes; then - AC_DEFINE(HAVE_UTIME_NULL) -fi -]) - -AC_DEFUN(AC_FUNC_STRCOLL, -[AC_CACHE_CHECK(for working strcoll, ac_cv_func_strcoll_works, -[AC_TRY_RUN([#include -main () -{ - exit (strcoll ("abc", "def") >= 0 || - strcoll ("ABC", "DEF") >= 0 || - strcoll ("123", "456") >= 0); -}], ac_cv_func_strcoll_works=yes, ac_cv_func_strcoll_works=no, -ac_cv_func_strcoll_works=no)]) -if test $ac_cv_func_strcoll_works = yes; then - AC_DEFINE(HAVE_STRCOLL) -fi -]) - -AC_DEFUN(AC_FUNC_SETVBUF_REVERSED, -[AC_CACHE_CHECK(whether setvbuf arguments are reversed, - ac_cv_func_setvbuf_reversed, -[AC_TRY_RUN([#include -/* If setvbuf has the reversed format, exit 0. */ -main () { - /* This call has the arguments reversed. - A reversed system may check and see that the address of main - is not _IOLBF, _IONBF, or _IOFBF, and return nonzero. */ - if (setvbuf(stdout, _IOLBF, (char *) main, BUFSIZ) != 0) - exit(1); - putc('\r', stdout); - exit(0); /* Non-reversed systems segv here. */ -}], ac_cv_func_setvbuf_reversed=yes, ac_cv_func_setvbuf_reversed=no) -rm -f core core.* *.core]) -if test $ac_cv_func_setvbuf_reversed = yes; then - AC_DEFINE(SETVBUF_REVERSED) -fi -]) - -AC_DEFUN(AC_FUNC_GETMNTENT, -[# getmntent is in -lsun on Irix 4, -lseq on Dynix/PTX, -lgen on Unixware. -AC_CHECK_LIB(sun, getmntent, LIBS="-lsun $LIBS", - [AC_CHECK_LIB(seq, getmntent, LIBS="-lseq $LIBS", - [AC_CHECK_LIB(gen, getmntent, LIBS="-lgen $LIBS")])]) -AC_CHECK_FUNC(getmntent, [AC_DEFINE(HAVE_GETMNTENT)])]) - -AC_DEFUN(AC_FUNC_STRFTIME, -[AC_CHECK_FUNC(strftime, [AC_DEFINE(HAVE_STRFTIME)], -[# strftime is in -lintl on SCO UNIX. -AC_CHECK_LIB(intl, strftime, -[AC_DEFINE(HAVE_STRFTIME) -LIBS="-lintl $LIBS"])])]) - -AC_DEFUN(AC_FUNC_MEMCMP, -[AC_CACHE_CHECK(for 8-bit clean memcmp, ac_cv_func_memcmp_clean, -[AC_TRY_RUN([ -main() -{ - char c0 = 0x40, c1 = 0x80, c2 = 0x81; - exit(memcmp(&c0, &c2, 1) < 0 && memcmp(&c1, &c2, 1) < 0 ? 0 : 1); -} -], ac_cv_func_memcmp_clean=yes, ac_cv_func_memcmp_clean=no, -ac_cv_func_memcmp_clean=no)]) -test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.${ac_objext}" -AC_SUBST(LIBOBJS)dnl -]) - -AC_DEFUN(AC_FUNC_SELECT_ARGTYPES, -[AC_MSG_CHECKING([types of arguments for select()]) - AC_CACHE_VAL(ac_cv_func_select_arg234,dnl - [AC_CACHE_VAL(ac_cv_func_select_arg1,dnl - [AC_CACHE_VAL(ac_cv_func_select_arg5,dnl - [for ac_cv_func_select_arg234 in 'fd_set *' 'int *' 'void *'; do - for ac_cv_func_select_arg1 in 'int' 'size_t' 'unsigned long' 'unsigned'; do - for ac_cv_func_select_arg5 in 'struct timeval *' 'const struct timeval *'; do - AC_TRY_COMPILE(dnl -[#ifdef HAVE_SYS_TYPES_H -#include -#endif -#ifdef HAVE_SYS_TIME_H -#include -#endif -#ifdef HAVE_SYS_SELECT_H -#include -#endif -#ifdef HAVE_SYS_SOCKET_H -#include -#endif -extern select ($ac_cv_func_select_arg1,$ac_cv_func_select_arg234,$ac_cv_func_select_arg234,$ac_cv_func_select_arg234,$ac_cv_func_select_arg5);],,dnl - [ac_not_found=no ; break 3],ac_not_found=yes) - done - done - done - ])dnl AC_CACHE_VAL - ])dnl AC_CACHE_VAL - ])dnl AC_CACHE_VAL - if test "$ac_not_found" = yes; then - ac_cv_func_select_arg1=int - ac_cv_func_select_arg234='int *' - ac_cv_func_select_arg5='struct timeval *' - fi - AC_MSG_RESULT([$ac_cv_func_select_arg1,$ac_cv_func_select_arg234,$ac_cv_func_select_arg5]) - AC_DEFINE_UNQUOTED(SELECT_TYPE_ARG1,$ac_cv_func_select_arg1) - AC_DEFINE_UNQUOTED(SELECT_TYPE_ARG234,($ac_cv_func_select_arg234)) - AC_DEFINE_UNQUOTED(SELECT_TYPE_ARG5,($ac_cv_func_select_arg5)) -]) - - -dnl ### Checks for structure members - - -AC_DEFUN(AC_HEADER_TIME, -[AC_CACHE_CHECK([whether time.h and sys/time.h may both be included], - ac_cv_header_time, -[AC_TRY_COMPILE([#include -#include -#include ], -[struct tm *tp;], ac_cv_header_time=yes, ac_cv_header_time=no)]) -if test $ac_cv_header_time = yes; then - AC_DEFINE(TIME_WITH_SYS_TIME) -fi -]) - -AC_DEFUN(AC_STRUCT_TM, -[AC_CACHE_CHECK([whether struct tm is in sys/time.h or time.h], - ac_cv_struct_tm, -[AC_TRY_COMPILE([#include -#include ], -[struct tm *tp; tp->tm_sec;], - ac_cv_struct_tm=time.h, ac_cv_struct_tm=sys/time.h)]) -if test $ac_cv_struct_tm = sys/time.h; then - AC_DEFINE(TM_IN_SYS_TIME) -fi -]) - -AC_DEFUN(AC_STRUCT_TM_ZONE, -[AC_REQUIRE([AC_STRUCT_TM])dnl -AC_CACHE_CHECK([for tm_zone in struct tm], ac_cv_struct_tm_zone, -[AC_TRY_COMPILE([#include -#include <$ac_cv_struct_tm>], [struct tm tm; tm.tm_zone;], - ac_cv_struct_tm_zone=yes, ac_cv_struct_tm_zone=no)]) -if test "$ac_cv_struct_tm_zone" = yes; then - AC_DEFINE(HAVE_TM_ZONE) -else - AC_CACHE_CHECK(for tzname, ac_cv_var_tzname, -[AC_TRY_LINK( -changequote(<<, >>)dnl -<<#include -#ifndef tzname /* For SGI. */ -extern char *tzname[]; /* RS6000 and others reject char **tzname. */ -#endif>>, -changequote([, ])dnl -[atoi(*tzname);], ac_cv_var_tzname=yes, ac_cv_var_tzname=no)]) - if test $ac_cv_var_tzname = yes; then - AC_DEFINE(HAVE_TZNAME) - fi -fi -]) - -AC_DEFUN(AC_STRUCT_ST_BLOCKS, -[AC_CACHE_CHECK([for st_blocks in struct stat], ac_cv_struct_st_blocks, -[AC_TRY_COMPILE([#include -#include ], [struct stat s; s.st_blocks;], -ac_cv_struct_st_blocks=yes, ac_cv_struct_st_blocks=no)]) -if test $ac_cv_struct_st_blocks = yes; then - AC_DEFINE(HAVE_ST_BLOCKS) -else - LIBOBJS="$LIBOBJS fileblocks.${ac_objext}" -fi -AC_SUBST(LIBOBJS)dnl -]) - -AC_DEFUN(AC_STRUCT_ST_BLKSIZE, -[AC_CACHE_CHECK([for st_blksize in struct stat], ac_cv_struct_st_blksize, -[AC_TRY_COMPILE([#include -#include ], [struct stat s; s.st_blksize;], -ac_cv_struct_st_blksize=yes, ac_cv_struct_st_blksize=no)]) -if test $ac_cv_struct_st_blksize = yes; then - AC_DEFINE(HAVE_ST_BLKSIZE) -fi -]) - -AC_DEFUN(AC_STRUCT_ST_RDEV, -[AC_CACHE_CHECK([for st_rdev in struct stat], ac_cv_struct_st_rdev, -[AC_TRY_COMPILE([#include -#include ], [struct stat s; s.st_rdev;], -ac_cv_struct_st_rdev=yes, ac_cv_struct_st_rdev=no)]) -if test $ac_cv_struct_st_rdev = yes; then - AC_DEFINE(HAVE_ST_RDEV) -fi -]) - - -dnl ### Checks for compiler characteristics - - -AC_DEFUN(AC_C_CROSS, -[AC_OBSOLETE([$0], [; it has been merged into AC_PROG_CC])]) - -AC_DEFUN(AC_C_CHAR_UNSIGNED, -[AC_CACHE_CHECK(whether char is unsigned, ac_cv_c_char_unsigned, -[if test "$GCC" = yes; then - # GCC predefines this symbol on systems where it applies. -AC_EGREP_CPP(yes, -[#ifdef __CHAR_UNSIGNED__ - yes -#endif -], ac_cv_c_char_unsigned=yes, ac_cv_c_char_unsigned=no) -else -AC_TRY_RUN( -[/* volatile prevents gcc2 from optimizing the test away on sparcs. */ -#if !defined(__STDC__) || __STDC__ != 1 -#define volatile -#endif -main() { - volatile char c = 255; exit(c < 0); -}], ac_cv_c_char_unsigned=yes, ac_cv_c_char_unsigned=no) -fi]) -if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then - AC_DEFINE(__CHAR_UNSIGNED__) -fi -]) - -AC_DEFUN(AC_C_LONG_DOUBLE, -[AC_CACHE_CHECK(for long double, ac_cv_c_long_double, -[if test "$GCC" = yes; then - ac_cv_c_long_double=yes -else -AC_TRY_RUN([int main() { -/* The Stardent Vistra knows sizeof(long double), but does not support it. */ -long double foo = 0.0; -/* On Ultrix 4.3 cc, long double is 4 and double is 8. */ -exit(sizeof(long double) < sizeof(double)); }], -ac_cv_c_long_double=yes, ac_cv_c_long_double=no) -fi]) -if test $ac_cv_c_long_double = yes; then - AC_DEFINE(HAVE_LONG_DOUBLE) -fi -]) - -AC_DEFUN(AC_INT_16_BITS, -[AC_OBSOLETE([$0], [; instead use AC_CHECK_SIZEOF(int)])dnl -AC_MSG_CHECKING(whether int is 16 bits) -AC_TRY_RUN([main() { exit(sizeof(int) != 2); }], - [AC_MSG_RESULT(yes) - AC_DEFINE(INT_16_BITS)], AC_MSG_RESULT(no)) -]) - -AC_DEFUN(AC_LONG_64_BITS, -[AC_OBSOLETE([$0], [; instead use AC_CHECK_SIZEOF(long)])dnl -AC_MSG_CHECKING(whether long int is 64 bits) -AC_TRY_RUN([main() { exit(sizeof(long int) != 8); }], - [AC_MSG_RESULT(yes) - AC_DEFINE(LONG_64_BITS)], AC_MSG_RESULT(no)) -]) - -AC_DEFUN(AC_C_BIGENDIAN, -[AC_CACHE_CHECK(whether byte ordering is bigendian, ac_cv_c_bigendian, -[ac_cv_c_bigendian=unknown -# See if sys/param.h defines the BYTE_ORDER macro. -AC_TRY_COMPILE([#include -#include ], [ -#if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN - bogus endian macros -#endif], [# It does; now see whether it defined to BIG_ENDIAN or not. -AC_TRY_COMPILE([#include -#include ], [ -#if BYTE_ORDER != BIG_ENDIAN - not big endian -#endif], ac_cv_c_bigendian=yes, ac_cv_c_bigendian=no)]) -if test $ac_cv_c_bigendian = unknown; then -AC_TRY_RUN([main () { - /* Are we little or big endian? From Harbison&Steele. */ - union - { - long l; - char c[sizeof (long)]; - } u; - u.l = 1; - exit (u.c[sizeof (long) - 1] == 1); -}], ac_cv_c_bigendian=no, ac_cv_c_bigendian=yes) -fi]) -if test $ac_cv_c_bigendian = yes; then - AC_DEFINE(WORDS_BIGENDIAN) -fi -]) - -dnl Do nothing if the compiler accepts the inline keyword. -dnl Otherwise define inline to __inline__ or __inline if one of those work, -dnl otherwise define inline to be empty. -AC_DEFUN(AC_C_INLINE, -[AC_CACHE_CHECK([for inline], ac_cv_c_inline, -[ac_cv_c_inline=no -for ac_kw in inline __inline__ __inline; do - AC_TRY_COMPILE(, [} $ac_kw foo() {], [ac_cv_c_inline=$ac_kw; break]) -done -]) -case "$ac_cv_c_inline" in - inline | yes) ;; - no) AC_DEFINE(inline, ) ;; - *) AC_DEFINE_UNQUOTED(inline, $ac_cv_c_inline) ;; -esac -]) - -AC_DEFUN(AC_C_CONST, -[dnl This message is consistent in form with the other checking messages, -dnl and with the result message. -AC_CACHE_CHECK([for working const], ac_cv_c_const, -[AC_TRY_COMPILE(, -changequote(<<, >>)dnl -<< -/* Ultrix mips cc rejects this. */ -typedef int charset[2]; const charset x; -/* SunOS 4.1.1 cc rejects this. */ -char const *const *ccp; -char **p; -/* NEC SVR4.0.2 mips cc rejects this. */ -struct point {int x, y;}; -static struct point const zero = {0,0}; -/* AIX XL C 1.02.0.0 rejects this. - It does not let you subtract one const X* pointer from another in an arm - of an if-expression whose if-part is not a constant expression */ -const char *g = "string"; -ccp = &g + (g ? g-g : 0); -/* HPUX 7.0 cc rejects these. */ -++ccp; -p = (char**) ccp; -ccp = (char const *const *) p; -{ /* SCO 3.2v4 cc rejects this. */ - char *t; - char const *s = 0 ? (char *) 0 : (char const *) 0; - - *t++ = 0; -} -{ /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */ - int x[] = {25, 17}; - const int *foo = &x[0]; - ++foo; -} -{ /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */ - typedef const int *iptr; - iptr p = 0; - ++p; -} -{ /* AIX XL C 1.02.0.0 rejects this saying - "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ - struct s { int j; const int *ap[3]; }; - struct s *b; b->j = 5; -} -{ /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ - const int foo = 10; -} ->>, -changequote([, ])dnl -ac_cv_c_const=yes, ac_cv_c_const=no)]) -if test $ac_cv_c_const = no; then - AC_DEFINE(const, ) -fi -]) - -AC_DEFUN(AC_C_STRINGIZE, [ -AC_REQUIRE([AC_PROG_CPP]) -AC_MSG_CHECKING([for preprocessor stringizing operator]) -AC_CACHE_VAL(ac_cv_c_stringize, -AC_EGREP_CPP([#teststring],[ -#define x(y) #y - -char *s = x(teststring); -], ac_cv_c_stringize=no, ac_cv_c_stringize=yes)) -if test "${ac_cv_c_stringize}" = yes -then - AC_DEFINE(HAVE_STRINGIZE) -fi -AC_MSG_RESULT([${ac_cv_c_stringize}]) -])dnl - -define(AC_ARG_ARRAY, -[errprint(__file__:__line__: [$0] has been removed; don't do unportable things with arguments -)m4exit(4)]) - -dnl Check the object extension used by the compiler: typically .o or -dnl .obj. If this is called, some other behaviour will change, -dnl determined by ac_objext. -AC_DEFUN(AC_OBJEXT, -[AC_MSG_CHECKING([for object suffix]) -AC_CACHE_VAL(ac_cv_objext, -[rm -f conftest* -echo 'int i = 1;' > conftest.$ac_ext -if AC_TRY_EVAL(ac_compile); then - for ac_file in conftest.*; do - case $ac_file in - *.c) ;; - *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;; - esac - done -else - AC_MSG_ERROR([installation or configuration problem; compiler does not work]) -fi -rm -f conftest*]) -AC_MSG_RESULT($ac_cv_objext) -OBJEXT=$ac_cv_objext -ac_objext=$ac_cv_objext -AC_SUBST(OBJEXT)]) - -dnl Determine the linker flags (e.g. `-L' and `-l') for the Fortran 77 -dnl intrinsic and run-time libraries that are required to successfully -dnl link a Fortran 77 program or shared library. The output variable -dnl FLIBS is set to these flags. -dnl -dnl This macro is intended to be used in those situations when it is -dnl necessary to mix, e.g. C++ and Fortran 77, source code into a single -dnl program or shared library. -dnl -dnl For example, if object files from a C++ and Fortran 77 compiler must -dnl be linked together, then the C++ compiler/linker must be used for -dnl linking (since special C++-ish things need to happen at link time -dnl like calling global constructors, instantiating templates, enabling -dnl exception support, etc.). -dnl -dnl However, the Fortran 77 intrinsic and run-time libraries must be -dnl linked in as well, but the C++ compiler/linker doesn't know how to -dnl add these Fortran 77 libraries. Hence, the macro -dnl `AC_F77_LIBRARY_LDFLAGS' was created to determine these Fortran 77 -dnl libraries. -dnl -dnl This macro was packaged in its current form by Matthew D. Langston -dnl . However, nearly all of this macro -dnl came from the `OCTAVE_FLIBS' macro in `octave-2.0.13/aclocal.m4', -dnl and full credit should go to John W. Eaton for writing this -dnl extremely useful macro. Thank you John. -dnl -dnl AC_F77_LIBRARY_LDFLAGS() -AC_DEFUN(AC_F77_LIBRARY_LDFLAGS, -[AC_MSG_CHECKING([for Fortran 77 libraries]) -AC_REQUIRE([AC_PROG_F77]) -AC_REQUIRE([AC_CANONICAL_HOST]) -AC_CACHE_VAL(ac_cv_flibs, -[changequote(, )dnl -dnl Write a minimal program and compile it with -v. I don't know what -dnl to do if your compiler doesn't have -v... -echo " END" > conftest.f -foutput=`${F77} -v -o conftest conftest.f 2>&1` -dnl -dnl The easiest thing to do for xlf output is to replace all the commas -dnl with spaces. Try to only do that if the output is really from xlf, -dnl since doing that causes problems on other systems. -dnl -xlf_p=`echo $foutput | grep xlfentry` -if test -n "$xlf_p"; then - foutput=`echo $foutput | sed 's/,/ /g'` -fi -dnl -ld_run_path=`echo $foutput | \ - sed -n -e 's/^.*LD_RUN_PATH *= *\([^ ]*\).*/\1/p'` -dnl -dnl We are only supposed to find this on Solaris systems... -dnl Uh, the run path should be absolute, shouldn't it? -dnl -case "$ld_run_path" in - /*) - if test "$ac_cv_prog_gcc" = yes; then - ld_run_path="-Xlinker -R -Xlinker $ld_run_path" - else - ld_run_path="-R $ld_run_path" - fi - ;; - *) - ld_run_path= - ;; -esac -dnl -flibs= -lflags= -dnl -dnl If want_arg is set, we know we want the arg to be added to the list, -dnl so we don't have to examine it. -dnl -want_arg= -dnl -for arg in $foutput; do - old_want_arg=$want_arg - want_arg= -dnl -dnl None of the options that take arguments expect the argument to -dnl start with a -, so pretend we didn't see anything special. -dnl - if test -n "$old_want_arg"; then - case "$arg" in - -*) - old_want_arg= - ;; - esac - fi - case "$old_want_arg" in - '') - case $arg in - /*.a) - exists=false - for f in $lflags; do - if test x$arg = x$f; then - exists=true - fi - done - if $exists; then - arg= - else - lflags="$lflags $arg" - fi - ;; - -bI:*) - exists=false - for f in $lflags; do - if test x$arg = x$f; then - exists=true - fi - done - if $exists; then - arg= - else - if test "$ac_cv_prog_gcc" = yes; then - lflags="$lflags -Xlinker $arg" - else - lflags="$lflags $arg" - fi - fi - ;; - -lang* | -lcrt0.o | -lc | -lgcc) - arg= - ;; - -[lLR]) - want_arg=$arg - arg= - ;; - -[lLR]*) - exists=false - for f in $lflags; do - if test x$arg = x$f; then - exists=true - fi - done - if $exists; then - arg= - else - case "$arg" in - -lkernel32) - case "$canonical_host_type" in - *-*-cygwin*) - arg= - ;; - *) - lflags="$lflags $arg" - ;; - esac - ;; - -lm) - ;; - *) - lflags="$lflags $arg" - ;; - esac - fi - ;; - -u) - want_arg=$arg - arg= - ;; - -Y) - want_arg=$arg - arg= - ;; - *) - arg= - ;; - esac - ;; - -[lLR]) - arg="$old_want_arg $arg" - ;; - -u) - arg="-u $arg" - ;; - -Y) -dnl -dnl Should probably try to ensure unique directory options here too. -dnl This probably only applies to Solaris systems, and then will only -dnl work with gcc... -dnl - arg=`echo $arg | sed -e 's%^P,%%'` - SAVE_IFS=$IFS - IFS=: - list= - for elt in $arg; do - list="$list -L$elt" - done - IFS=$SAVE_IFS - arg="$list" - ;; - esac -dnl - if test -n "$arg"; then - flibs="$flibs $arg" - fi -done -if test -n "$ld_run_path"; then - flibs_result="$ld_run_path $flibs" -else - flibs_result="$flibs" -fi -changequote([, ])dnl -ac_cv_flibs="$flibs_result"]) -FLIBS="$ac_cv_flibs" -AC_SUBST(FLIBS)dnl -AC_MSG_RESULT($FLIBS) -]) - - -dnl ### Checks for operating system services - - -AC_DEFUN(AC_SYS_INTERPRETER, -[# Pull the hash mark out of the macro call to avoid m4 problems. -ac_msg="whether #! works in shell scripts" -AC_CACHE_CHECK($ac_msg, ac_cv_sys_interpreter, -[echo '#! /bin/cat -exit 69 -' > conftest -chmod u+x conftest -(SHELL=/bin/sh; export SHELL; ./conftest >/dev/null) -if test $? -ne 69; then - ac_cv_sys_interpreter=yes -else - ac_cv_sys_interpreter=no -fi -rm -f conftest]) -interpval="$ac_cv_sys_interpreter" -]) - -define(AC_HAVE_POUNDBANG, -[errprint(__file__:__line__: [$0 has been replaced by AC_SYS_INTERPRETER, taking no arguments -])m4exit(4)]) - -AC_DEFUN(AC_SYS_LONG_FILE_NAMES, -[AC_CACHE_CHECK(for long file names, ac_cv_sys_long_file_names, -[ac_cv_sys_long_file_names=yes -# Test for long file names in all the places we know might matter: -# . the current directory, where building will happen -# $prefix/lib where we will be installing things -# $exec_prefix/lib likewise -# eval it to expand exec_prefix. -# $TMPDIR if set, where it might want to write temporary files -# if $TMPDIR is not set: -# /tmp where it might want to write temporary files -# /var/tmp likewise -# /usr/tmp likewise -if test -n "$TMPDIR" && test -d "$TMPDIR" && test -w "$TMPDIR"; then - ac_tmpdirs="$TMPDIR" -else - ac_tmpdirs='/tmp /var/tmp /usr/tmp' -fi -for ac_dir in . $ac_tmpdirs `eval echo $prefix/lib $exec_prefix/lib` ; do - test -d $ac_dir || continue - test -w $ac_dir || continue # It is less confusing to not echo anything here. - (echo 1 > $ac_dir/conftest9012345) 2>/dev/null - (echo 2 > $ac_dir/conftest9012346) 2>/dev/null - val=`cat $ac_dir/conftest9012345 2>/dev/null` - if test ! -f $ac_dir/conftest9012345 || test "$val" != 1; then - ac_cv_sys_long_file_names=no - rm -f $ac_dir/conftest9012345 $ac_dir/conftest9012346 2>/dev/null - break - fi - rm -f $ac_dir/conftest9012345 $ac_dir/conftest9012346 2>/dev/null -done]) -if test $ac_cv_sys_long_file_names = yes; then - AC_DEFINE(HAVE_LONG_FILE_NAMES) -fi -]) - -AC_DEFUN(AC_SYS_RESTARTABLE_SYSCALLS, -[AC_CACHE_CHECK(for restartable system calls, ac_cv_sys_restartable_syscalls, -[AC_TRY_RUN( -[/* Exit 0 (true) if wait returns something other than -1, - i.e. the pid of the child, which means that wait was restarted - after getting the signal. */ -#include -#include -ucatch (isig) { } -main () { - int i = fork (), status; - if (i == 0) { sleep (3); kill (getppid (), SIGINT); sleep (3); exit (0); } - signal (SIGINT, ucatch); - status = wait(&i); - if (status == -1) wait(&i); - exit (status == -1); -} -], ac_cv_sys_restartable_syscalls=yes, ac_cv_sys_restartable_syscalls=no)]) -if test $ac_cv_sys_restartable_syscalls = yes; then - AC_DEFINE(HAVE_RESTARTABLE_SYSCALLS) -fi -]) - -AC_DEFUN(AC_PATH_X, -[AC_REQUIRE_CPP()dnl Set CPP; we run AC_PATH_X_DIRECT conditionally. -# If we find X, set shell vars x_includes and x_libraries to the -# paths, otherwise set no_x=yes. -# Uses ac_ vars as temps to allow command line to override cache and checks. -# --without-x overrides everything else, but does not touch the cache. -AC_MSG_CHECKING(for X) - -AC_ARG_WITH(x, [ --with-x use the X Window System]) -# $have_x is `yes', `no', `disabled', or empty when we do not yet know. -if test "x$with_x" = xno; then - # The user explicitly disabled X. - have_x=disabled -else - if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then - # Both variables are already set. - have_x=yes - else -AC_CACHE_VAL(ac_cv_have_x, -[# One or both of the vars are not set, and there is no cached value. -ac_x_includes=NO ac_x_libraries=NO -AC_PATH_X_XMKMF -AC_PATH_X_DIRECT -if test "$ac_x_includes" = NO || test "$ac_x_libraries" = NO; then - # Didn't find X anywhere. Cache the known absence of X. - ac_cv_have_x="have_x=no" -else - # Record where we found X for the cache. - ac_cv_have_x="have_x=yes \ - ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries" -fi])dnl - fi - eval "$ac_cv_have_x" -fi # $with_x != no - -if test "$have_x" != yes; then - AC_MSG_RESULT($have_x) - no_x=yes -else - # If each of the values was on the command line, it overrides each guess. - test "x$x_includes" = xNONE && x_includes=$ac_x_includes - test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries - # Update the cache value to reflect the command line values. - ac_cv_have_x="have_x=yes \ - ac_x_includes=$x_includes ac_x_libraries=$x_libraries" - AC_MSG_RESULT([libraries $x_libraries, headers $x_includes]) -fi -]) - -dnl Internal subroutine of AC_PATH_X. -dnl Set ac_x_includes and/or ac_x_libraries. -AC_DEFUN(AC_PATH_X_XMKMF, -[rm -fr conftestdir -if mkdir conftestdir; then - cd conftestdir - # Make sure to not put "make" in the Imakefile rules, since we grep it out. - cat > Imakefile <<'EOF' -acfindx: - @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"' -EOF - if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then - # GNU make sometimes prints "make[1]: Entering...", which would confuse us. - eval `${MAKE-make} acfindx 2>/dev/null | grep -v make` - # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR. - for ac_extension in a so sl; do - if test ! -f $ac_im_usrlibdir/libX11.$ac_extension && - test -f $ac_im_libdir/libX11.$ac_extension; then - ac_im_usrlibdir=$ac_im_libdir; break - fi - done - # Screen out bogus values from the imake configuration. They are - # bogus both because they are the default anyway, and because - # using them would break gcc on systems where it needs fixed includes. - case "$ac_im_incroot" in - /usr/include) ;; - *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes="$ac_im_incroot" ;; - esac - case "$ac_im_usrlibdir" in - /usr/lib | /lib) ;; - *) test -d "$ac_im_usrlibdir" && ac_x_libraries="$ac_im_usrlibdir" ;; - esac - fi - cd .. - rm -fr conftestdir -fi -]) - -dnl Internal subroutine of AC_PATH_X. -dnl Set ac_x_includes and/or ac_x_libraries. -AC_DEFUN(AC_PATH_X_DIRECT, -[if test "$ac_x_includes" = NO; then - # Guess where to find include files, by looking for this one X11 .h file. - test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h - - # First, try using that file with no special directory specified. -AC_TRY_CPP([#include <$x_direct_test_include>], -[# We can compile using X headers with no special include directory. -ac_x_includes=], -[# Look for the header file in a standard set of common directories. -# Check X11 before X11Rn because it is often a symlink to the current release. - for ac_dir in \ - /usr/X11/include \ - /usr/X11R6/include \ - /usr/X11R5/include \ - /usr/X11R4/include \ - \ - /usr/include/X11 \ - /usr/include/X11R6 \ - /usr/include/X11R5 \ - /usr/include/X11R4 \ - \ - /usr/local/X11/include \ - /usr/local/X11R6/include \ - /usr/local/X11R5/include \ - /usr/local/X11R4/include \ - \ - /usr/local/include/X11 \ - /usr/local/include/X11R6 \ - /usr/local/include/X11R5 \ - /usr/local/include/X11R4 \ - \ - /usr/X386/include \ - /usr/x386/include \ - /usr/XFree86/include/X11 \ - \ - /usr/include \ - /usr/local/include \ - /usr/unsupported/include \ - /usr/athena/include \ - /usr/local/x11r5/include \ - /usr/lpp/Xamples/include \ - \ - /usr/openwin/include \ - /usr/openwin/share/include \ - ; \ - do - if test -r "$ac_dir/$x_direct_test_include"; then - ac_x_includes=$ac_dir - break - fi - done]) -fi # $ac_x_includes = NO - -if test "$ac_x_libraries" = NO; then - # Check for the libraries. - - test -z "$x_direct_test_library" && x_direct_test_library=Xt - test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc - - # See if we find them without any special options. - # Don't add to $LIBS permanently. - ac_save_LIBS="$LIBS" - LIBS="-l$x_direct_test_library $LIBS" -AC_TRY_LINK(, [${x_direct_test_function}()], -[LIBS="$ac_save_LIBS" -# We can link X programs with no special library path. -ac_x_libraries=], -[LIBS="$ac_save_LIBS" -# First see if replacing the include by lib works. -# Check X11 before X11Rn because it is often a symlink to the current release. -for ac_dir in `echo "$ac_x_includes" | sed s/include/lib/` \ - /usr/X11/lib \ - /usr/X11R6/lib \ - /usr/X11R5/lib \ - /usr/X11R4/lib \ - \ - /usr/lib/X11 \ - /usr/lib/X11R6 \ - /usr/lib/X11R5 \ - /usr/lib/X11R4 \ - \ - /usr/local/X11/lib \ - /usr/local/X11R6/lib \ - /usr/local/X11R5/lib \ - /usr/local/X11R4/lib \ - \ - /usr/local/lib/X11 \ - /usr/local/lib/X11R6 \ - /usr/local/lib/X11R5 \ - /usr/local/lib/X11R4 \ - \ - /usr/X386/lib \ - /usr/x386/lib \ - /usr/XFree86/lib/X11 \ - \ - /usr/lib \ - /usr/local/lib \ - /usr/unsupported/lib \ - /usr/athena/lib \ - /usr/local/x11r5/lib \ - /usr/lpp/Xamples/lib \ - /lib/usr/lib/X11 \ - \ - /usr/openwin/lib \ - /usr/openwin/share/lib \ - ; \ -do -dnl Don't even attempt the hair of trying to link an X program! - for ac_extension in a so sl; do - if test -r $ac_dir/lib${x_direct_test_library}.$ac_extension; then - ac_x_libraries=$ac_dir - break 2 - fi - done -done]) -fi # $ac_x_libraries = NO -]) - -dnl Find additional X libraries, magic flags, etc. -AC_DEFUN(AC_PATH_XTRA, -[AC_REQUIRE([AC_PATH_X])dnl -if test "$no_x" = yes; then - # Not all programs may use this symbol, but it does not hurt to define it. - AC_DEFINE(X_DISPLAY_MISSING) - X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS= -else - if test -n "$x_includes"; then - X_CFLAGS="$X_CFLAGS -I$x_includes" - fi - - # It would also be nice to do this for all -L options, not just this one. - if test -n "$x_libraries"; then - X_LIBS="$X_LIBS -L$x_libraries" -dnl FIXME banish uname from this macro! - # For Solaris; some versions of Sun CC require a space after -R and - # others require no space. Words are not sufficient . . . . - case "`(uname -sr) 2>/dev/null`" in - "SunOS 5"*) - AC_MSG_CHECKING(whether -R must be followed by a space) - ac_xsave_LIBS="$LIBS"; LIBS="$LIBS -R$x_libraries" - AC_TRY_LINK(, , ac_R_nospace=yes, ac_R_nospace=no) - if test $ac_R_nospace = yes; then - AC_MSG_RESULT(no) - X_LIBS="$X_LIBS -R$x_libraries" - else - LIBS="$ac_xsave_LIBS -R $x_libraries" - AC_TRY_LINK(, , ac_R_space=yes, ac_R_space=no) - if test $ac_R_space = yes; then - AC_MSG_RESULT(yes) - X_LIBS="$X_LIBS -R $x_libraries" - else - AC_MSG_RESULT(neither works) - fi - fi - LIBS="$ac_xsave_LIBS" - esac - fi - - # Check for system-dependent libraries X programs must link with. - # Do this before checking for the system-independent R6 libraries - # (-lICE), since we may need -lsocket or whatever for X linking. - - if test "$ISC" = yes; then - X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet" - else - # Martyn.Johnson@cl.cam.ac.uk says this is needed for Ultrix, if the X - # libraries were built with DECnet support. And karl@cs.umb.edu says - # the Alpha needs dnet_stub (dnet does not exist). - AC_CHECK_LIB(dnet, dnet_ntoa, [X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"]) - if test $ac_cv_lib_dnet_dnet_ntoa = no; then - AC_CHECK_LIB(dnet_stub, dnet_ntoa, - [X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"]) - fi - - # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT, - # to get the SysV transport functions. - # chad@anasazi.com says the Pyramis MIS-ES running DC/OSx (SVR4) - # needs -lnsl. - # The nsl library prevents programs from opening the X display - # on Irix 5.2, according to dickey@clark.net. - AC_CHECK_FUNC(gethostbyname) - if test $ac_cv_func_gethostbyname = no; then - AC_CHECK_LIB(nsl, gethostbyname, X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl") - fi - - # lieder@skyler.mavd.honeywell.com says without -lsocket, - # socket/setsockopt and other routines are undefined under SCO ODT - # 2.0. But -lsocket is broken on IRIX 5.2 (and is not necessary - # on later versions), says simon@lia.di.epfl.ch: it contains - # gethostby* variants that don't use the nameserver (or something). - # -lsocket must be given before -lnsl if both are needed. - # We assume that if connect needs -lnsl, so does gethostbyname. - AC_CHECK_FUNC(connect) - if test $ac_cv_func_connect = no; then - AC_CHECK_LIB(socket, connect, X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS", , - $X_EXTRA_LIBS) - fi - - # gomez@mi.uni-erlangen.de says -lposix is necessary on A/UX. - AC_CHECK_FUNC(remove) - if test $ac_cv_func_remove = no; then - AC_CHECK_LIB(posix, remove, X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix") - fi - - # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay. - AC_CHECK_FUNC(shmat) - if test $ac_cv_func_shmat = no; then - AC_CHECK_LIB(ipc, shmat, X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc") - fi - fi - - # Check for libraries that X11R6 Xt/Xaw programs need. - ac_save_LDFLAGS="$LDFLAGS" - test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries" - # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to - # check for ICE first), but we must link in the order -lSM -lICE or - # we get undefined symbols. So assume we have SM if we have ICE. - # These have to be linked with before -lX11, unlike the other - # libraries we check for below, so use a different variable. - # --interran@uluru.Stanford.EDU, kb@cs.umb.edu. - AC_CHECK_LIB(ICE, IceConnectionNumber, - [X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"], , $X_EXTRA_LIBS) - LDFLAGS="$ac_save_LDFLAGS" - -fi -AC_SUBST(X_CFLAGS)dnl -AC_SUBST(X_PRE_LIBS)dnl -AC_SUBST(X_LIBS)dnl -AC_SUBST(X_EXTRA_LIBS)dnl -]) - -dnl The old Cygwin32 macro is deprecated. -AC_DEFUN(AC_CYGWIN32, -[AC_OBSOLETE([$0], [; instead use AC_CYGWIN])dnl -AC_CYGWIN]) - -dnl Check for Cygwin. This is a way to set the right value for -dnl EXEEXT. -AC_DEFUN(AC_CYGWIN, -[AC_CACHE_CHECK(for Cygwin environment, ac_cv_cygwin, -[AC_TRY_COMPILE(,[ -#ifndef __CYGWIN__ -#define __CYGWIN__ __CYGWIN32__ -#endif -return __CYGWIN__;], -ac_cv_cygwin=yes, ac_cv_cygwin=no) -rm -f conftest*]) -CYGWIN= -test "$ac_cv_cygwin" = yes && CYGWIN=yes]) - -dnl Check for mingw32. This is another way to set the right value for -dnl EXEEXT. -AC_DEFUN(AC_MINGW32, -[AC_CACHE_CHECK(for mingw32 environment, ac_cv_mingw32, -[AC_TRY_COMPILE(,[return __MINGW32__;], -ac_cv_mingw32=yes, ac_cv_mingw32=no) -rm -f conftest*]) -MINGW32= -test "$ac_cv_mingw32" = yes && MINGW32=yes]) - -dnl Check for EMX/OS2. This is another way to set the right value for -dnl EXEEXT. -AC_DEFUN(AC_EMXOS2, -[AC_CACHE_CHECK(for EMX/OS2 environment, ac_cv_emxos2, -[AC_TRY_COMPILE(,[return __EMX__;], -ac_cv_emxos2=yes, ac_cv_emxos2=no) -rm -f conftest*]) -AC_CACHE_VAL(ac_cv_libpre, -if test "$ac_cv_emxos2" = yes ; then - ac_cv_libpre= -else - ac_cv_libpre=lib -fi -) -EMXOS2= -test "$ac_cv_emxos2" = yes && EMXOS2=yes]) - -dnl Check for the extension used for executables. This knows that we -dnl add .exe for Cygwin or mingw32. Otherwise, it compiles a test -dnl executable. If this is called, the executable extensions will be -dnl automatically used by link commands run by the configure script. -AC_DEFUN(AC_EXEEXT, -[AC_REQUIRE([AC_CYGWIN]) -AC_REQUIRE([AC_MINGW32]) -AC_REQUIRE([AC_EMXOS2]) -AC_MSG_CHECKING([for executable suffix]) -AC_CACHE_VAL(ac_cv_exeext, -[if test "$CYGWIN" = yes || test "$MINGW32" = yes || test "$EMXOS2" = yes; then - ac_cv_exeext=.exe - ac_cv_xexeext="" -else - rm -f conftest* - echo 'int main () { return 0; }' > conftest.$ac_ext - ac_cv_exeext= - if AC_TRY_EVAL(ac_link); then - for file in conftest.*; do - case $file in - *.c | *.o | *.obj) ;; - *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;; - esac - done - else - ccout=`eval "${CC-cc} 2>&1" 2> /dev/null` - ret=$? - nf=`echo "$ccout" | grep 'not found'` - if test $ret = 127 -a -n "$nf" ; then # Korn Shell - ccout="" - fi - if test ! -n "$ccout" ; then - AC_MSG_ERROR([installation or configuration problem: C compiler ${CC-cc} not found.]) - fi - AC_MSG_ERROR([installation or configuration problem: compiler cannot create executables.]) - fi - (./conftest ; exit) 2> /dev/null - if test $? != 0 ; then - ac_cv_xexeext="${ac_cv_exeext}" - (./conftest${ac_cv_xexeext} ; exit) 2> /dev/null - if test $? != 0 ; then - ac_cv_xexeext="" - fi - fi - rm -f conftest* - test x"${ac_cv_exeext}" = x && ac_cv_exeext=no - test x"${ac_cv_xexeext}" = x && ac_cv_xexeext=no -fi]) -EXEEXT="" -XEXEEXT="" -test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext} -test x"${ac_cv_xexeext}" != xno && XEXEEXT=${ac_cv_xexeext} -AC_MSG_RESULT(${ac_cv_exeext}) -AC_MSG_CHECKING([for executable calling suffix]) -AC_MSG_RESULT(${ac_cv_xexeext}) -dnl Setting ac_exeext will implicitly change the ac_link command. -ac_exeext=$EXEEXT -ac_xexeext=$XEXEEXT -AC_SUBST(EXEEXT) -AC_SUBST(XEXEEXT) -]) - - -dnl ### Checks for UNIX variants -dnl These are kludges which should be replaced by a single POSIX check. -dnl They aren't cached, to discourage their use. - - -AC_DEFUN(AC_AIX, -[AC_BEFORE([$0], [AC_TRY_COMPILE])dnl -AC_BEFORE([$0], [AC_TRY_RUN])dnl -AC_MSG_CHECKING(for AIX) -AC_EGREP_CPP(yes, -[#ifdef _AIX - yes -#endif -], [AC_MSG_RESULT(yes); AC_DEFINE(_ALL_SOURCE)], AC_MSG_RESULT(no)) -]) - -AC_DEFUN(AC_MINIX, -[AC_BEFORE([$0], [AC_TRY_COMPILE])dnl -AC_BEFORE([$0], [AC_TRY_RUN])dnl -AC_CHECK_HEADER(minix/config.h, MINIX=yes, MINIX=) -if test "$MINIX" = yes; then - AC_DEFINE(_POSIX_SOURCE) - AC_DEFINE(_POSIX_1_SOURCE, 2) - AC_DEFINE(_MINIX) -fi -]) - -AC_DEFUN(AC_ISC_POSIX, -[AC_REQUIRE([AC_PROG_CC])dnl -AC_BEFORE([$0], [AC_TRY_COMPILE])dnl -AC_BEFORE([$0], [AC_TRY_RUN])dnl -AC_MSG_CHECKING(for POSIXized ISC) -if test -d /etc/conf/kconfig.d && - grep _POSIX_VERSION [/usr/include/sys/unistd.h] >/dev/null 2>&1 -then - AC_MSG_RESULT(yes) - ISC=yes # If later tests want to check for ISC. - AC_DEFINE(_POSIX_SOURCE) - if test "$GCC" = yes; then - CC="$CC -posix" - else - CC="$CC -Xp" - fi -else - AC_MSG_RESULT(no) - ISC= -fi -]) - -AC_DEFUN(AC_XENIX_DIR, -[AC_OBSOLETE([$0], [; instead use AC_HEADER_DIRENT])dnl -AC_REQUIRE([AC_DIR_HEADER])dnl -AC_MSG_CHECKING(for Xenix) -AC_EGREP_CPP(yes, -[#if defined(M_XENIX) && !defined(M_UNIX) - yes -#endif -], [AC_MSG_RESULT(yes); XENIX=yes], [AC_MSG_RESULT(no); XENIX=]) -if test "$XENIX" = yes; then - # Make sure -ldir precedes -lx. - test $ac_header_dirent = dirent.h && LIBS="-ldir $LIBS" - LIBS="$LIBS -lx" -fi -]) - -AC_DEFUN(AC_DYNIX_SEQ, -[AC_OBSOLETE([$0], [; instead use AC_FUNC_GETMNTENT])dnl -AC_CHECK_LIB(seq, getmntent, LIBS="-lseq $LIBS") -]) - -AC_DEFUN(AC_IRIX_SUN, -[AC_OBSOLETE([$0], [; instead use AC_FUNC_GETMNTENT or AC_CHECK_LIB(sun, getpwnam)])dnl -AC_CHECK_LIB(sun, getmntent, LIBS="-lsun $LIBS") -]) - -AC_DEFUN(AC_SCO_INTL, -[AC_OBSOLETE([$0], [; instead use AC_FUNC_STRFTIME])dnl -AC_CHECK_LIB(intl, strftime, LIBS="-lintl $LIBS") -]) diff -Nru cdrtools-2.01.01a33/conf/autoconf cdrtools-3.02a09/conf/autoconf --- cdrtools-2.01.01a33/conf/autoconf 2007-05-23 09:42:36.000000000 +0000 +++ cdrtools-3.02a09/conf/autoconf 1970-01-01 00:00:00.000000000 +0000 @@ -1,161 +0,0 @@ -#! /bin/sh -# autoconf -- create `configure' using m4 macros -# Copyright (C) 1992, 1993, 1994, 1996 Free Software Foundation, Inc. - -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2, or (at your option) -# any later version. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. - -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA -# 02111-1307, USA. - -# If given no args, create `configure' from template file `configure.in'. -# With one arg, create a configure script on standard output from -# the given template file. - -usage="\ -Usage: autoconf [-h] [--help] [-m dir] [--macrodir=dir] - [-l dir] [--localdir=dir] [--version] [template-file]" - -# NLS nuisances. -# Only set these to C if already set. These must not be set unconditionally -# because not all systems understand e.g. LANG=C (notably SCO). -# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'! -# Non-C LC_CTYPE values break the ctype check. -if test "${LANG+set}" = set; then LANG=C; export LANG; fi -if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi -if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi -if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi - -: ${AC_MACRODIR=/usr/local/share/autoconf} -#: ${M4=/usr/local/bin/m4} -: ${M4=/opt/sfw/bin/gm4} -: ${AWK=nawk} -case "${M4}" in -/*) # Handle the case that m4 has moved since we were configured. - # It may have been found originally in a build directory. - test -f "${M4}" || M4=/usr/sfw/bin/gm4 - test -f "${M4}" || M4=m4 ;; -esac - -: ${TMPDIR=/tmp} -tmpout=${TMPDIR}/acout.$$ -localdir= -show_version=no - -while test $# -gt 0 ; do - case "${1}" in - -h | --help | --h* ) - echo "${usage}" 1>&2; exit 0 ;; - --localdir=* | --l*=* ) - localdir="`echo \"${1}\" | sed -e 's/^[^=]*=//'`" - shift ;; - -l | --localdir | --l*) - shift - test $# -eq 0 && { echo "${usage}" 1>&2; exit 1; } - localdir="${1}" - shift ;; - --macrodir=* | --m*=* ) - AC_MACRODIR="`echo \"${1}\" | sed -e 's/^[^=]*=//'`" - shift ;; - -m | --macrodir | --m* ) - shift - test $# -eq 0 && { echo "${usage}" 1>&2; exit 1; } - AC_MACRODIR="${1}" - shift ;; - --version | --v* ) - show_version=yes; shift ;; - -- ) # Stop option processing - shift; break ;; - - ) # Use stdin as input. - break ;; - -* ) - echo "${usage}" 1>&2; exit 1 ;; - * ) - break ;; - esac -done - -if test $show_version = yes; then - version=`sed -n 's/define.AC_ACVERSION.[ ]*\([0-9.]*\).*/\1/p' \ - $AC_MACRODIR/acgeneral.m4` - echo "Autoconf version $version" - exit 0 -fi - -case $# in - 0) infile=configure.in ;; - 1) infile="$1" ;; - *) echo "$usage" >&2; exit 1 ;; -esac - -trap 'rm -f $tmpin $tmpout; exit 1' 1 2 15 - -tmpin=${TMPDIR}/acin.$$ # Always set this, to avoid bogus errors from some rm's. -if test z$infile = z-; then - infile=$tmpin - cat > $infile -elif test ! -r "$infile"; then - echo "autoconf: ${infile}: No such file or directory" >&2 - exit 1 -fi - -if test -n "$localdir"; then - use_localdir="-I$localdir -DAC_LOCALDIR=$localdir" -else - use_localdir= -fi - -# Use the frozen version of Autoconf if available. -r= f= -# Some non-GNU m4's don't reject the --help option, so give them /dev/null. -case `$M4 --help < /dev/null 2>&1` in -*reload-state*) test -r $AC_MACRODIR/autoconf.m4f && { r=--reload f=f; } ;; -*traditional*) ;; -*) echo Autoconf requires GNU m4 1.1 or later >&2; rm -f $tmpin; exit 1 ;; -esac - -$M4 -I$AC_MACRODIR $use_localdir $r autoconf.m4$f $infile > $tmpout || - { rm -f $tmpin $tmpout; exit 2; } - -# You could add your own prefixes to pattern if you wanted to check for -# them too, e.g. pattern='\(AC_\|ILT_\)', except that UNIX sed doesn't do -# alternation. -pattern="AC_" - -status=0 -if grep "^[^#]*${pattern}" $tmpout > /dev/null 2>&1; then - echo "autoconf: Undefined macros:" >&2 - sed -n "s/^[^#]*\\(${pattern}[_A-Za-z0-9]*\\).*/\\1/p" $tmpout | - while read macro; do - grep -n "^[^#]*$macro" $infile /dev/null - test $? -eq 1 && echo >&2 "***BUG in Autoconf--please report*** $macro" - done | sort -u >&2 - status=1 -fi - -if test $# -eq 0; then - exec 4> configure; chmod +x configure -else - exec 4>&1 -fi - -# Put the real line numbers into configure to make config.log more helpful. -$AWK ' -/__oline__/ { printf "%d:", NR + 1 } - { print } -' $tmpout | sed ' -/__oline__/s/^\([0-9][0-9]*\):\(.*\)__oline__/\2\1/ -' >&4 - -rm -f $tmpout - -exit $status diff -Nru cdrtools-2.01.01a33/conf/autoconf.m4 cdrtools-3.02a09/conf/autoconf.m4 --- cdrtools-2.01.01a33/conf/autoconf.m4 1999-01-05 13:27:52.000000000 +0000 +++ cdrtools-3.02a09/conf/autoconf.m4 1970-01-01 00:00:00.000000000 +0000 @@ -1,28 +0,0 @@ -dnl Driver that loads the Autoconf macro files. -dnl Requires GNU m4. -dnl This file is part of Autoconf. -dnl Copyright (C) 1994 Free Software Foundation, Inc. -dnl -dnl This program is free software; you can redistribute it and/or modify -dnl it under the terms of the GNU General Public License as published by -dnl the Free Software Foundation; either version 2, or (at your option) -dnl any later version. -dnl -dnl This program is distributed in the hope that it will be useful, -dnl but WITHOUT ANY WARRANTY; without even the implied warranty of -dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -dnl GNU General Public License for more details. -dnl -dnl You should have received a copy of the GNU General Public License -dnl along with this program; if not, write to the Free Software -dnl Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA -dnl 02111-1307, USA. -dnl -dnl Written by David MacKenzie. -dnl -include(acgeneral.m4)dnl -builtin(include, acspecific.m4)dnl -builtin(include, acoldnames.m4)dnl -dnl Do not sinclude acsite.m4 here, because it may not be installed -dnl yet when Autoconf is frozen. -dnl Do not sinclude ./aclocal.m4 here, to prevent it from being frozen. diff -Nru cdrtools-2.01.01a33/conf/autoheader.m4 cdrtools-3.02a09/conf/autoheader.m4 --- cdrtools-2.01.01a33/conf/autoheader.m4 1999-01-05 13:28:37.000000000 +0000 +++ cdrtools-3.02a09/conf/autoheader.m4 1970-01-01 00:00:00.000000000 +0000 @@ -1,110 +0,0 @@ -dnl Driver and redefinitions of some Autoconf macros for autoheader. -dnl This file is part of Autoconf. -dnl Copyright (C) 1994, 1995 Free Software Foundation, Inc. -dnl -dnl This program is free software; you can redistribute it and/or modify -dnl it under the terms of the GNU General Public License as published by -dnl the Free Software Foundation; either version 2, or (at your option) -dnl any later version. -dnl -dnl This program is distributed in the hope that it will be useful, -dnl but WITHOUT ANY WARRANTY; without even the implied warranty of -dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -dnl GNU General Public License for more details. -dnl -dnl You should have received a copy of the GNU General Public License -dnl along with this program; if not, write to the Free Software -dnl Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA -dnl 02111-1307, USA. -dnl -dnl Written by Roland McGrath. -dnl -include(acgeneral.m4)dnl -builtin(include, acspecific.m4)dnl -builtin(include, acoldnames.m4)dnl - -dnl These are alternate definitions of some macros, which produce -dnl strings in the output marked with "@@@" so we can easily extract -dnl the information we want. The `#' at the end of the first line of -dnl each definition seems to be necessary to prevent m4 from eating -dnl the newline, which makes the @@@ not always be at the beginning of -dnl a line. - -define([AC_CHECK_FUNCS], [# -@@@funcs="$funcs $1"@@@ -ifelse([$2], , , [ -# If it was found, we do: -$2 -# If it was not found, we do: -$3 -]) -]) - -define([AC_CHECK_HEADERS], [# -@@@headers="$headers $1"@@@ -ifelse([$2], , , [ -# If it was found, we do: -$2 -# If it was not found, we do: -$3 -]) -]) - -define([AC_CHECK_HEADERS_DIRENT], [# -@@@headers="$headers $1"@@@ -]) - -define([AC_CHECK_LIB], [# - ifelse([$3], , [ -@@@libs="$libs $1"@@@ -], [ -# If it was found, we do: -$3 -# If it was not found, we do: -$4 -]) -]) - -define([AC_HAVE_LIBRARY], [# -changequote(<<, >>)dnl -define(<>, dnl -patsubst(patsubst($1, <>, <<\1>>), <<-l>>, <<>>))dnl -changequote([, ])dnl - ifelse([$2], , [ -@@@libs="$libs AC_LIB_NAME"@@@ -], [ -# If it was found, we do: -$2 -# If it was not found, we do: -$3 -]) -]) - -define([AC_CHECK_SIZEOF], [# -@@@types="$types,$1"@@@ -]) - -define([AC_CONFIG_HEADER], [# -define([AC_CONFIG_H], patsubst($1, [ .*$], []))dnl -@@@config_h=AC_CONFIG_H@@@ -]) - -define([AC_DEFINE], [# -ifelse([$3],,[# -@@@syms="$syms $1"@@@ -], [# -@@@verbatim="$verbatim -/* $3 */ -#undef $1 -"@@@ -])]) - -define([AC_DEFINE_UNQUOTED], [# -ifelse([$3],,[# -@@@syms="$syms $1"@@@ -], [# -@@@verbatim="$verbatim -/* $3 */ -#undef $1 -"@@@ -])]) diff -Nru cdrtools-2.01.01a33/conf/cc-config.sh cdrtools-3.02a09/conf/cc-config.sh --- cdrtools-2.01.01a33/conf/cc-config.sh 2007-02-13 14:39:45.000000000 +0000 +++ cdrtools-3.02a09/conf/cc-config.sh 2014-03-24 16:18:08.000000000 +0000 @@ -1,7 +1,7 @@ #!/bin/sh -# @(#)cc-config.sh 1.8 07/02/13 Copyright 2002 J. Schilling +# @(#)cc-config.sh 1.9 14/03/24 Copyright 2002-2014 J. Schilling ########################################################################### -# Written 2002 by J. Schilling +# Written 2002-2014 by J. Schilling ########################################################################### # Configuration script called to verify system default C-compiler. # It tries to fall back to GCC if the system default could not be found. @@ -12,6 +12,8 @@ # with the License. # # See the file CDDL.Schily.txt in this distribution for details. +# A copy of the CDDL is also available via the Internet at +# http://www.opensource.org/licenses/cddl1.txt # # When distributing Covered Code, include this CDDL HEADER in each # file and include the License file CDDL.Schily.txt from this distribution. @@ -47,6 +49,7 @@ ARG_CC=$1 DEF_CC=$2 PLATFORM_FILE=$3 +CC_FOUND=FALSE ${echo} "Trying to find $CC" # @@ -89,52 +92,66 @@ # eval "$CC > /dev/null 2>&1" 2> /dev/null if [ $? = 0 ]; then - ${echo} "Found $CC" - if [ ".$CC" = ".$DEF_CC" ]; then - ${echo} "Creating empty '$PLATFORM_FILE', using $DEF_CC as default compiler" - if [ ${echo} = echo ]; then - :> $PLATFORM_FILE - else - echo "$DEF_CC" - fi - else - ${echo} "Making $CC the default compiler in '$PLATFORM_FILE'" - if [ ${echo} = echo ]; then - :> $PLATFORM_FILE - echo DEFCCOM=$CC > $PLATFORM_FILE - else - echo "$CC" - fi + CC_FOUND=TRUE +else + # + # Now try to run the default C-compiler and check whether it creates + # any output (usually an error message). + # + # This test will fail if the shell does redirect the error message + # "cc: not found". All shells I tested (except ksh) send this message to + # the stderr stream the shell itself is attached to and only redirects + # the output from the command. As there may no output if there is no + # binary, this proves the existence of the default compiler. + # + ccout=`eval "$CC 2>&1" 2>/dev/null` + ret=$? + + nf=`echo "$ccout" | grep 'not found' ` + if [ $ret = 127 -a -n "$nf" ]; then + # + # ksh redirects even the error message from the shell, but we + # see that there is no executable because the exit code is 127 + # we detect "command not found" if exit code is 127 and + # the message contains 'not found' + # + ccout="" + fi + + if [ -n "$ccout" ]; then + CC_FOUND=TRUE fi - exit fi -# -# Now try to run the default C-compiler and check whether it creates -# any output (usually an error message). -# -# This test will fail if the shell does redirect the error message -# "cc: not found". All shells I tested (except ksh) send this message to -# the stderr stream the shell itself is attached to and only redirects the -# output from the command. As there may no output if there is no binary, -# this proves the existence of the default compiler. -# -ccout=`eval "$CC 2>&1" 2>/dev/null` -ret=$? -nf=`echo "$ccout" | grep 'not found' ` -if [ $ret = 127 -a -n "$nf" ]; then +if [ $CC_FOUND = TRUE ]; then + ${echo} "Found $CC" + # - # ksh redirects even the error message from the shell, but we - # see that there is no executable because the exit code is 127 - # we detect "command not found" if exit code is 127 and - # the message contains 'not found' + # Call $CC and try to find out whether it might be "gcc" or "clang". # - ccout="" -fi + CC_V=`eval "$CC -v > /dev/null" 2>&1` + GCC_V=`echo "$CC_V" | grep -i gcc-version ` + CLANG_V=`echo "$CC_V" | grep -i clang ` + + if [ ".$GCC_V" != . ]; then + if eval "gcc -v 2> /dev/null" 2>/dev/null; then + CC="gcc" + fi + elif [ ".$CLANG_V" != . ]; then + if eval "clang -v 2> /dev/null" 2>/dev/null; then + CC="clang" + fi + fi + # + # Check whether "cc" or "gcc" are emulated by another compiler + # + if [ ".$ARG_CC" = .cc -o ".$ARG_CC" = .gcc ]; then + if [ "$CC" != "$ARG_CC" ]; then + ${echo} "$ARG_CC is $CC" + fi + fi -if [ -n "$ccout" ]; then - ${echo} "Found $CC" if [ ".$CC" = ".$DEF_CC" ]; then ${echo} "Creating empty '$PLATFORM_FILE', using $DEF_CC as default compiler" if [ ${echo} = echo ]; then @@ -190,6 +207,31 @@ eval "gcc -v" 2> /dev/null && CC=gcc fi +# +# Call $CC and try to find out whether it might be "gcc" or "clang". +# +CC_V=`eval "$CC -v > /dev/null" 2>&1` +GCC_V=`echo "$CC_V" | grep -i gcc-version ` +CLANG_V=`echo "$CC_V" | grep -i clang ` + +if [ ".$GCC_V" != . ]; then + if eval "gcc -v 2> /dev/null" 2>/dev/null; then + CC="gcc" + fi +elif [ ".$CLANG_V" != . ]; then + if eval "clang -v 2> /dev/null" 2>/dev/null; then + CC="clang" + fi +fi +# +# Check whether "cc" or "gcc" are emulated by another compiler +# +if [ ".$ARG_CC" = .cc -o ".$ARG_CC" = .gcc ]; then + if [ "$CC" != "$ARG_CC" ]; then + ${echo} "$ARG_CC is $CC" + fi +fi + if [ ".$CC" = ".$DEF_CC" ]; then ${echo} "$XCC not found, keeping current global default" ${echo} "Creating empty '$PLATFORM_FILE', using $DEF_CC as default compiler" diff -Nru cdrtools-2.01.01a33/conf/config.guess cdrtools-3.02a09/conf/config.guess --- cdrtools-2.01.01a33/conf/config.guess 2007-06-05 12:25:01.000000000 +0000 +++ cdrtools-3.02a09/conf/config.guess 1970-01-01 00:00:00.000000000 +0000 @@ -1,984 +0,0 @@ -#! /bin/sh -# Attempt to guess a canonical system name. -# Copyright (C) 1992, 93, 94, 95, 96, 97, 1998 Free Software Foundation, Inc. -# -# This file is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -# -# As a special exception to the GNU General Public License, if you -# distribute this file as part of a program that contains a -# configuration script generated by Autoconf, you may include it under -# the same distribution terms that you use for the rest of that program. - -# Written by Per Bothner . -# The master version of this file is at the FSF in /home/gd/gnu/lib. -# -# This script attempts to guess a canonical system name similar to -# config.sub. If it succeeds, it prints the system name on stdout, and -# exits with 0. Otherwise, it exits with 1. -# -# The plan is that this can be called by configure scripts if you -# don't specify an explicit system type (host/target name). -# -# Only a few systems have been added to this list; please add others -# (but try to keep the structure clean). -# - -# This is needed to find uname on a Pyramid OSx when run in the BSD universe. -# (ghazi@noc.rutgers.edu 8/24/94.) -if (test -f /.attbin/uname) >/dev/null 2>&1 ; then - PATH=$PATH:/.attbin ; export PATH -fi - -UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown -UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown -UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown -UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown - -trap 'rm -f dummy.c dummy.o dummy; exit 1' 1 2 15 - -# Note: order is significant - the case branches are not exclusive. - -case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in - alpha:OSF1:*:*) - if test $UNAME_RELEASE = "V4.0"; then - UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` - fi - # A Vn.n version is a released version. - # A Tn.n version is a released field test version. - # A Xn.n version is an unreleased experimental baselevel. - # 1.2 uses "1.2" for uname -r. - cat <dummy.s - .globl main - .ent main -main: - .frame \$30,0,\$26,0 - .prologue 0 - .long 0x47e03d80 # implver $0 - lda \$2,259 - .long 0x47e20c21 # amask $2,$1 - srl \$1,8,\$2 - sll \$2,2,\$2 - sll \$0,3,\$0 - addl \$1,\$0,\$0 - addl \$2,\$0,\$0 - ret \$31,(\$26),1 - .end main -EOF - ${CC-cc} dummy.s -o dummy 2>/dev/null - if test "$?" = 0 ; then - ./dummy - case "$?" in - 7) - UNAME_MACHINE="alpha" - ;; - 15) - UNAME_MACHINE="alphaev5" - ;; - 14) - UNAME_MACHINE="alphaev56" - ;; - 10) - UNAME_MACHINE="alphapca56" - ;; - 16) - UNAME_MACHINE="alphaev6" - ;; - esac - fi - rm -f dummy.s dummy - echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[VTX]//' | tr [[A-Z]] [[a-z]]` - exit 0 ;; - 21064:Windows_NT:50:3) - echo alpha-dec-winnt3.5 - exit 0 ;; - Amiga*:UNIX_System_V:4.0:*) - echo m68k-cbm-sysv4 - exit 0;; - amiga:NetBSD:*:*) - echo m68k-cbm-netbsd${UNAME_RELEASE} - exit 0 ;; - amiga:OpenBSD:*:*) - echo m68k-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - *:[Aa]miga[Oo][Ss]:*:*) - echo ${UNAME_MACHINE}-unknown-amigaos - exit 0 ;; - arc64:OpenBSD:*:*) - echo mips64el-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - arc:OpenBSD:*:*) - echo mipsel-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - hkmips:OpenBSD:*:*) - echo mips-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - pmax:OpenBSD:*:*) - echo mipsel-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - sgi:OpenBSD:*:*) - echo mips-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - wgrisc:OpenBSD:*:*) - echo mipsel-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) - echo arm-acorn-riscix${UNAME_RELEASE} - exit 0;; - arm32:NetBSD:*:*) - echo arm-unknown-netbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` - exit 0 ;; - SR2?01:HI-UX/MPP:*:*) - echo hppa1.1-hitachi-hiuxmpp - exit 0;; - Pyramid*:OSx*:*:*|MIS*:OSx*:*:*|MIS*:SMP_DC-OSx*:*:*) - # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. - if test "`(/bin/universe) 2>/dev/null`" = att ; then - echo pyramid-pyramid-sysv3 - else - echo pyramid-pyramid-bsd - fi - exit 0 ;; - NILE:*:*:dcosx) - echo pyramid-pyramid-svr4 - exit 0 ;; - sun4H:SunOS:5.*:*) - echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit 0 ;; - sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) - echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit 0 ;; - i86pc:SunOS:5.*:*) - echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit 0 ;; - sun4*:SunOS:6*:*) - # According to config.sub, this is the proper way to canonicalize - # SunOS6. Hard to guess exactly what SunOS6 will be like, but - # it's likely to be more like Solaris than SunOS4. - echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit 0 ;; - sun4*:SunOS:*:*) - case "`/usr/bin/arch -k`" in - Series*|S4*) - UNAME_RELEASE=`uname -v` - ;; - esac - # Japanese Language versions have a version number like `4.1.3-JL'. - echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'` - exit 0 ;; - sun3*:SunOS:*:*) - echo m68k-sun-sunos${UNAME_RELEASE} - exit 0 ;; - sun*:*:4.2BSD:*) - UNAME_RELEASE=`(head -1 /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` - test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 - case "`/bin/arch`" in - sun3) - echo m68k-sun-sunos${UNAME_RELEASE} - ;; - sun4) - echo sparc-sun-sunos${UNAME_RELEASE} - ;; - esac - exit 0 ;; - aushp:SunOS:*:*) - echo sparc-auspex-sunos${UNAME_RELEASE} - exit 0 ;; - atari*:NetBSD:*:*) - echo m68k-atari-netbsd${UNAME_RELEASE} - exit 0 ;; - atari*:OpenBSD:*:*) - echo m68k-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - sun3*:NetBSD:*:*) - echo m68k-sun-netbsd${UNAME_RELEASE} - exit 0 ;; - sun3*:OpenBSD:*:*) - echo m68k-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - mac68k:NetBSD:*:*) - echo m68k-apple-netbsd${UNAME_RELEASE} - exit 0 ;; - mac68k:OpenBSD:*:*) - echo m68k-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - mvme68k:OpenBSD:*:*) - echo m68k-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - mvme88k:OpenBSD:*:*) - echo m88k-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - powerpc:machten:*:*) - echo powerpc-apple-machten${UNAME_RELEASE} - exit 0 ;; - macppc:NetBSD:*:*) - echo powerpc-apple-netbsd${UNAME_RELEASE} - exit 0 ;; - RISC*:Mach:*:*) - echo mips-dec-mach_bsd4.3 - exit 0 ;; - RISC*:ULTRIX:*:*) - echo mips-dec-ultrix${UNAME_RELEASE} - exit 0 ;; - VAX*:ULTRIX*:*:*) - echo vax-dec-ultrix${UNAME_RELEASE} - exit 0 ;; - 2020:CLIX:*:*) - echo clipper-intergraph-clix${UNAME_RELEASE} - exit 0 ;; - mips:*:*:UMIPS | mips:*:*:RISCos) - sed 's/^ //' << EOF >dummy.c - int main (argc, argv) int argc; char **argv; { - #if defined (host_mips) && defined (MIPSEB) - #if defined (SYSTYPE_SYSV) - printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0); - #endif - #if defined (SYSTYPE_SVR4) - printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0); - #endif - #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD) - printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0); - #endif - #endif - exit (-1); - } -EOF - ${CC-cc} dummy.c -o dummy \ - && ./dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \ - && rm dummy.c dummy && exit 0 - rm -f dummy.c dummy - echo mips-mips-riscos${UNAME_RELEASE} - exit 0 ;; - Night_Hawk:Power_UNIX:*:*) - echo powerpc-harris-powerunix - exit 0 ;; - m88k:CX/UX:7*:*) - echo m88k-harris-cxux7 - exit 0 ;; - m88k:*:4*:R4*) - echo m88k-motorola-sysv4 - exit 0 ;; - m88k:*:3*:R3*) - echo m88k-motorola-sysv3 - exit 0 ;; - AViiON:dgux:*:*) - # DG/UX returns AViiON for all architectures - UNAME_PROCESSOR=`/usr/bin/uname -p` - if [ $UNAME_PROCESSOR = mc88100 -o $UNAME_PROCESSOR = mc88110 ] ; then - if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx \ - -o ${TARGET_BINARY_INTERFACE}x = x ] ; then - echo m88k-dg-dgux${UNAME_RELEASE} - else - echo m88k-dg-dguxbcs${UNAME_RELEASE} - fi - else echo i586-dg-dgux${UNAME_RELEASE} - fi - exit 0 ;; - M88*:DolphinOS:*:*) # DolphinOS (SVR3) - echo m88k-dolphin-sysv3 - exit 0 ;; - M88*:*:R3*:*) - # Delta 88k system running SVR3 - echo m88k-motorola-sysv3 - exit 0 ;; - XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) - echo m88k-tektronix-sysv3 - exit 0 ;; - Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) - echo m68k-tektronix-bsd - exit 0 ;; - *:IRIX*:*:*) - echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'` - exit 0 ;; - ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. - echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id - exit 0 ;; # Note that: echo "'`uname -s`'" gives 'AIX ' - i?86:AIX:*:*) - echo i386-ibm-aix - exit 0 ;; - *:AIX:2:3) - if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then - sed 's/^ //' << EOF >dummy.c - #include - - main() - { - if (!__power_pc()) - exit(1); - puts("powerpc-ibm-aix3.2.5"); - exit(0); - } -EOF - ${CC-cc} dummy.c -o dummy && ./dummy && rm dummy.c dummy && exit 0 - rm -f dummy.c dummy - echo rs6000-ibm-aix3.2.5 - elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then - echo rs6000-ibm-aix3.2.4 - else - echo rs6000-ibm-aix3.2 - fi - exit 0 ;; - *:AIX:*:4) - IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | head -1 | awk '{ print $1 }'` - if /usr/sbin/lsattr -EHl ${IBM_CPU_ID} | grep POWER >/dev/null 2>&1; then - IBM_ARCH=rs6000 - else - IBM_ARCH=powerpc - fi - if [ -x /usr/bin/oslevel ] ; then - IBM_REV=`/usr/bin/oslevel` - else - IBM_REV=4.${UNAME_RELEASE} - fi - echo ${IBM_ARCH}-ibm-aix${IBM_REV} - exit 0 ;; - *:AIX:*:*) - echo rs6000-ibm-aix - exit 0 ;; - ibmrt:4.4BSD:*|romp-ibm:BSD:*) - echo romp-ibm-bsd4.4 - exit 0 ;; - ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC NetBSD and - echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to - exit 0 ;; # report: romp-ibm BSD 4.3 - *:BOSX:*:*) - echo rs6000-bull-bosx - exit 0 ;; - DPX/2?00:B.O.S.:*:*) - echo m68k-bull-sysv3 - exit 0 ;; - 9000/[34]??:4.3bsd:1.*:*) - echo m68k-hp-bsd - exit 0 ;; - hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) - echo m68k-hp-bsd4.4 - exit 0 ;; - 9000/[34678]??:HP-UX:*:*) - case "${UNAME_MACHINE}" in - 9000/31? ) HP_ARCH=m68000 ;; - 9000/[34]?? ) HP_ARCH=m68k ;; - 9000/6?? | 9000/7?? | 9000/80[24] | 9000/8?[13679] | 9000/892 | 9000/820 | 9000/800 ) - sed 's/^ //' << EOF >dummy.c - #include - #include - - int main () - { - #if defined(_SC_KERNEL_BITS) - long bits = sysconf(_SC_KERNEL_BITS); - #endif - long cpu = sysconf (_SC_CPU_VERSION); - - switch (cpu) - { - case CPU_PA_RISC1_0: puts ("hppa1.0"); break; - case CPU_PA_RISC1_1: puts ("hppa1.1"); break; - case CPU_PA_RISC2_0: - #if defined(_SC_KERNEL_BITS) - switch (bits) - { - case 64: puts ("hppa2.0w"); break; - case 32: puts ("hppa2.0n"); break; - default: puts ("hppa2.0"); break; - } break; - #else /* !defined(_SC_KERNEL_BITS) */ - puts ("hppa2.0"); break; - #endif - default: puts ("hppa1.0"); break; - } - exit (0); - } -EOF - (${CC-cc} dummy.c -o dummy 2>/dev/null ) && HP_ARCH=`./dummy` - rm -f dummy.c dummy - esac - HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` - echo ${HP_ARCH}-hp-hpux${HPUX_REV} - exit 0 ;; - 3050*:HI-UX:*:*) - sed 's/^ //' << EOF >dummy.c - #include - int - main () - { - long cpu = sysconf (_SC_CPU_VERSION); - /* The order matters, because CPU_IS_HP_MC68K erroneously returns - true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct - results, however. */ - if (CPU_IS_PA_RISC (cpu)) - { - switch (cpu) - { - case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break; - case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break; - case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break; - default: puts ("hppa-hitachi-hiuxwe2"); break; - } - } - else if (CPU_IS_HP_MC68K (cpu)) - puts ("m68k-hitachi-hiuxwe2"); - else puts ("unknown-hitachi-hiuxwe2"); - exit (0); - } -EOF - ${CC-cc} dummy.c -o dummy && ./dummy && rm dummy.c dummy && exit 0 - rm -f dummy.c dummy - echo unknown-hitachi-hiuxwe2 - exit 0 ;; - 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) - echo hppa1.1-hp-bsd - exit 0 ;; - 9000/8??:4.3bsd:*:*) - echo hppa1.0-hp-bsd - exit 0 ;; - hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) - echo hppa1.1-hp-osf - exit 0 ;; - hp8??:OSF1:*:*) - echo hppa1.0-hp-osf - exit 0 ;; - i?86:OSF1:*:*) - if [ -x /usr/sbin/sysversion ] ; then - echo ${UNAME_MACHINE}-unknown-osf1mk - else - echo ${UNAME_MACHINE}-unknown-osf1 - fi - exit 0 ;; - parisc*:Lites*:*:*) - echo hppa1.1-hp-lites - exit 0 ;; - C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) - echo c1-convex-bsd - exit 0 ;; - C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) - if getsysinfo -f scalar_acc - then echo c32-convex-bsd - else echo c2-convex-bsd - fi - exit 0 ;; - C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) - echo c34-convex-bsd - exit 0 ;; - C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) - echo c38-convex-bsd - exit 0 ;; - C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) - echo c4-convex-bsd - exit 0 ;; - CRAY*X-MP:*:*:*) - echo xmp-cray-unicos - exit 0 ;; - CRAY*Y-MP:*:*:*) - echo ymp-cray-unicos${UNAME_RELEASE} - exit 0 ;; - CRAY*[A-Z]90:*:*:*) - echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ - | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ - -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ - exit 0 ;; - CRAY*TS:*:*:*) - echo t90-cray-unicos${UNAME_RELEASE} - exit 0 ;; - CRAY-2:*:*:*) - echo cray2-cray-unicos - exit 0 ;; - F300:UNIX_System_V:*:*) - FUJITSU_SYS=`uname -p | tr [A-Z] [a-z] | sed -e 's/\///'` - FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` - echo "f300-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" - exit 0 ;; - F301:UNIX_System_V:*:*) - echo f301-fujitsu-uxpv`echo $UNAME_RELEASE | sed 's/ .*//'` - exit 0 ;; - hp3[0-9][05]:NetBSD:*:*) - echo m68k-hp-netbsd${UNAME_RELEASE} - exit 0 ;; - hp300:OpenBSD:*:*) - echo m68k-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - sparc*:BSD/OS:*:*) - echo sparc-unknown-bsdi${UNAME_RELEASE} - exit 0 ;; - i?86:BSD/386:*:* | *:BSD/OS:*:*) - echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} - exit 0 ;; - *:FreeBSD:*:*) - echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` - exit 0 ;; - *:NetBSD:*:*) - echo ${UNAME_MACHINE}-unknown-netbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` - exit 0 ;; - *:OpenBSD:*:*) - echo ${UNAME_MACHINE}-unknown-openbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` - exit 0 ;; - i*:CYGWIN*:*) - echo ${UNAME_MACHINE}-pc-cygwin - exit 0 ;; - i*:MINGW*:*) - echo ${UNAME_MACHINE}-pc-mingw32 - exit 0 ;; - p*:CYGWIN*:*) - echo powerpcle-unknown-cygwin - exit 0 ;; - x86:Interix*:3*) - echo i586-pc-interix3 - exit 0 ;; - prep*:SunOS:5.*:*) - echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit 0 ;; - *:GNU:*:*) - echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` - exit 0 ;; - s390:Linux:*:* | s390x:Linux:*:*) - echo ${UNAME_MACHINE}-ibm-linux - exit 0 ;; - *:Linux:*:*) - # uname on the ARM produces all sorts of strangeness, and we need to - # filter it out. - case "$UNAME_MACHINE" in - arm* | sa110*) UNAME_MACHINE="arm" ;; - esac - - # The BFD linker knows what the default object file format is, so - # first see if it will tell us. - ld_help_string=`ld --help 2>&1` - ld_supported_emulations=`echo $ld_help_string \ - | sed -ne '/supported emulations:/!d - s/[ ][ ]*/ /g - s/.*supported emulations: *// - s/ .*// - p'` - case "$ld_supported_emulations" in - i?86linux) echo "${UNAME_MACHINE}-pc-linux-gnuaout" ; exit 0 ;; - i?86coff) echo "${UNAME_MACHINE}-pc-linux-gnucoff" ; exit 0 ;; - sparclinux) echo "${UNAME_MACHINE}-unknown-linux-gnuaout" ; exit 0 ;; - armlinux) echo "${UNAME_MACHINE}-unknown-linux-gnuaout" ; exit 0 ;; - m68klinux) echo "${UNAME_MACHINE}-unknown-linux-gnuaout" ; exit 0 ;; - elf32ppc) echo "powerpc-unknown-linux-gnu" ; exit 0 ;; - esac - - if test "${UNAME_MACHINE}" = "alpha" ; then - sed 's/^ //' <dummy.s - .globl main - .ent main - main: - .frame \$30,0,\$26,0 - .prologue 0 - .long 0x47e03d80 # implver $0 - lda \$2,259 - .long 0x47e20c21 # amask $2,$1 - srl \$1,8,\$2 - sll \$2,2,\$2 - sll \$0,3,\$0 - addl \$1,\$0,\$0 - addl \$2,\$0,\$0 - ret \$31,(\$26),1 - .end main -EOF - LIBC="" - ${CC-cc} dummy.s -o dummy 2>/dev/null - if test "$?" = 0 ; then - ./dummy - case "$?" in - 7) - UNAME_MACHINE="alpha" - ;; - 15) - UNAME_MACHINE="alphaev5" - ;; - 14) - UNAME_MACHINE="alphaev56" - ;; - 10) - UNAME_MACHINE="alphapca56" - ;; - 16) - UNAME_MACHINE="alphaev6" - ;; - esac - - objdump --private-headers dummy | \ - grep ld.so.1 > /dev/null - if test "$?" = 0 ; then - LIBC="libc1" - fi - fi - rm -f dummy.s dummy - echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} ; exit 0 - elif test "${UNAME_MACHINE}" = "mips" ; then - cat >dummy.c </dev/null && ./dummy "${UNAME_MACHINE}" && rm dummy.c dummy && exit 0 - rm -f dummy.c dummy - else - # Either a pre-BFD a.out linker (linux-gnuoldld) - # or one that does not give us useful --help. - # GCC wants to distinguish between linux-gnuoldld and linux-gnuaout. - # If ld does not provide *any* "supported emulations:" - # that means it is gnuoldld. - echo "$ld_help_string" | grep >/dev/null 2>&1 "supported emulations:" - test $? != 0 && echo "${UNAME_MACHINE}-pc-linux-gnuoldld" && exit 0 - - case "${UNAME_MACHINE}" in - i?86) - VENDOR=pc; - ;; - *) - VENDOR=unknown; - ;; - esac - # Determine whether the default compiler is a.out or elf - cat >dummy.c < -main(argc, argv) - int argc; - char *argv[]; -{ -#if defined __ELF__ || defined __SUNPRO_C -# ifdef __GLIBC__ -# if __GLIBC__ >= 2 - printf ("%s-${VENDOR}-linux-gnu\n", argv[1]); -# else - printf ("%s-${VENDOR}-linux-gnulibc1\n", argv[1]); -# endif -# else - printf ("%s-${VENDOR}-linux-gnulibc1\n", argv[1]); -# endif -#else - printf ("%s-${VENDOR}-linux-gnuaout\n", argv[1]); -#endif - return 0; -} -EOF - ${CC-cc} dummy.c -o dummy 2>/dev/null && ./dummy "${UNAME_MACHINE}" && rm dummy.c dummy && exit 0 - rm -f dummy.c dummy - fi ;; -# ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. earlier versions -# are messed up and put the nodename in both sysname and nodename. - i?86:DYNIX/ptx:4*:*) - echo i386-sequent-sysv4 - exit 0 ;; - i?86:UNIX_SV:4.2MP:2.*) - # Unixware is an offshoot of SVR4, but it has its own version - # number series starting with 2... - # I am not positive that other SVR4 systems won't match this, - # I just have to hope. -- rms. - # Use sysv4.2uw... so that sysv4* matches it. - echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} - exit 0 ;; - i?86:*:4.*:* | i?86:SYSTEM_V:4.*:*) - if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then - echo ${UNAME_MACHINE}-univel-sysv${UNAME_RELEASE} - else - echo ${UNAME_MACHINE}-pc-sysv${UNAME_RELEASE} - fi - exit 0 ;; - i?86:MS-DOS:5:50) - # DJGPP v2 - echo ${UNAME_MACHINE}-pc-msdos - exit 0 ;; - i?86:*:5:*) - # Fixed at (any) Pentium or better - UNAME_MACHINE=i586 - if [ ${UNAME_SYSTEM} = "UnixWare" ] || - [ ${UNAME_SYSTEM} = "OpenUNIX" ]; then - echo ${UNAME_MACHINE}-sco-sysv${UNAME_RELEASE}uw${UNAME_VERSION} - else - echo ${UNAME_MACHINE}-pc-sysv${UNAME_RELEASE} - fi - exit 0 ;; - i?86:*:3.2:*) - if test -f /usr/options/cb.name; then - UNAME_REL=`sed -n 's/.*Version //p' /dev/null >/dev/null ; then - UNAME_REL=`(/bin/uname -X|egrep Release|sed -e 's/.*= //')` - (/bin/uname -X|egrep i80486 >/dev/null) && UNAME_MACHINE=i486 - (/bin/uname -X|egrep '^Machine.*Pentium' >/dev/null) \ - && UNAME_MACHINE=i586 - echo ${UNAME_MACHINE}-pc-sco$UNAME_REL - else - echo ${UNAME_MACHINE}-pc-sysv32 - fi - exit 0 ;; - pc:*:*:*) - # uname -m prints for DJGPP always 'pc', but it prints nothing about - # the processor, so we play safe by assuming i386. - echo i386-pc-msdosdjgpp - exit 0 ;; - Intel:Mach:3*:*) - echo i386-pc-mach3 - exit 0 ;; - paragon:*:*:*) - echo i860-intel-osf1 - exit 0 ;; - i860:*:4.*:*) # i860-SVR4 - if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then - echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4 - else # Add other i860-SVR4 vendors below as they are discovered. - echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4 - fi - exit 0 ;; - mini*:CTIX:SYS*5:*) - # "miniframe" - echo m68010-convergent-sysv - exit 0 ;; - M68*:*:R3V[567]*:*) - test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;; - 3[34]??:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 4850:*:4.0:3.0) - OS_REL='' - test -r /etc/.relid \ - && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` - /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ - && echo i486-ncr-sysv4.3${OS_REL} && exit 0 - /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ - && echo i586-ncr-sysv4.3${OS_REL} && exit 0 ;; - 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) - /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ - && echo i486-ncr-sysv4 && exit 0 ;; - m68*:LynxOS:2.*:*) - echo m68k-unknown-lynxos${UNAME_RELEASE} - exit 0 ;; - mc68030:UNIX_System_V:4.*:*) - echo m68k-atari-sysv4 - exit 0 ;; - i?86:LynxOS:2.*:*) - echo i386-unknown-lynxos${UNAME_RELEASE} - exit 0 ;; - TSUNAMI:LynxOS:2.*:*) - echo sparc-unknown-lynxos${UNAME_RELEASE} - exit 0 ;; - rs6000:LynxOS:2.*:* | PowerPC:LynxOS:2.*:*) - echo rs6000-unknown-lynxos${UNAME_RELEASE} - exit 0 ;; - SM[BE]S:UNIX_SV:*:*) - echo mips-dde-sysv${UNAME_RELEASE} - exit 0 ;; - RM*:SINIX-*:*:*) - echo mips-sni-sysv4 - exit 0 ;; - *:SINIX-*:*:*) - if uname -p 2>/dev/null >/dev/null ; then - UNAME_MACHINE=`(uname -p) 2>/dev/null` - echo ${UNAME_MACHINE}-sni-sysv4 - else - echo ns32k-sni-sysv - fi - exit 0 ;; - PENTIUM:CPunix:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort - # says - echo i586-unisys-sysv4 - exit 0 ;; - *:UNIX_System_V:4*:FTX*) - # From Gerald Hewes . - # How about differentiating between stratus architectures? -djm - echo hppa1.1-stratus-sysv4 - exit 0 ;; - *:*:*:FTX*) - # From seanf@swdc.stratus.com. - echo i860-stratus-sysv4 - exit 0 ;; - mc68*:A/UX:*:*) - echo m68k-apple-aux${UNAME_RELEASE} - exit 0 ;; - news*:NEWS-OS:*:6*) - echo mips-sony-newsos6 - exit 0 ;; - R3000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R4000:UNIX_SV:*:*) - if [ -d /usr/nec ]; then - echo mips-nec-sysv${UNAME_RELEASE} - else - echo mips-unknown-sysv${UNAME_RELEASE} - fi - exit 0 ;; - BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. - echo powerpc-be-beos - exit 0 ;; - BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. - echo powerpc-apple-beos - exit 0 ;; - BePC:BeOS:*:*) # BeOS running on Intel PC compatible. - echo i586-pc-beos - exit 0 ;; - "Power Macintosh":Rhapsody:*) - echo powerpc-apple-rhapsody${UNAME_RELEASE} - exit 0 ;; - "Power Macintosh":"Mac OS":*) - echo powerpc-apple-macosx${UNAME_RELEASE} - exit 0 ;; - "Power Macintosh":"Darwin":*) - echo powerpc-apple-macosx${UNAME_RELEASE} - exit 0 ;; - "i386":"Darwin":*) - echo i386-apple-macosx${UNAME_RELEASE} - exit 0 ;; - *:OS/2:*:*) - echo "i386-pc-os2_emx" - exit 0;; -esac - -#echo '(No uname command or uname output not recognized.)' 1>&2 -#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2 - -cat >dummy.c < -# include -#endif -main () -{ -#if defined (sony) -#if defined (MIPSEB) - /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed, - I don't know.... */ - printf ("mips-sony-bsd\n"); exit (0); -#else -#include - printf ("m68k-sony-newsos%s\n", -#ifdef NEWSOS4 - "4" -#else - "" -#endif - ); exit (0); -#endif -#endif - -#if defined (__arm) && defined (__acorn) && defined (__unix) - printf ("arm-acorn-riscix"); exit (0); -#endif - -#if defined (hp300) && !defined (hpux) - printf ("m68k-hp-bsd\n"); exit (0); -#endif - -#if defined (NeXT) -#if !defined (__ARCHITECTURE__) -#define __ARCHITECTURE__ "m68k" -#endif - int version; - version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`; - printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version); - exit (0); -#endif - -#if defined (MULTIMAX) || defined (n16) -#if defined (UMAXV) - printf ("ns32k-encore-sysv\n"); exit (0); -#else -#if defined (CMU) - printf ("ns32k-encore-mach\n"); exit (0); -#else - printf ("ns32k-encore-bsd\n"); exit (0); -#endif -#endif -#endif - -#if defined (__386BSD__) - printf ("i386-pc-bsd\n"); exit (0); -#endif - -#if defined (sequent) -#if defined (i386) - printf ("i386-sequent-dynix\n"); exit (0); -#endif -#if defined (ns32000) - printf ("ns32k-sequent-dynix\n"); exit (0); -#endif -#endif - -#if defined (_SEQUENT_) - struct utsname un; - - uname(&un); - - if (strncmp(un.version, "V2", 2) == 0) { - printf ("i386-sequent-ptx2\n"); exit (0); - } - if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */ - printf ("i386-sequent-ptx1\n"); exit (0); - } - printf ("i386-sequent-ptx\n"); exit (0); - -#endif - -#if defined (vax) -#if !defined (ultrix) - printf ("vax-dec-bsd\n"); exit (0); -#else - printf ("vax-dec-ultrix\n"); exit (0); -#endif -#endif - -#if defined (alliant) && defined (i860) - printf ("i860-alliant-bsd\n"); exit (0); -#endif - - exit (1); -} -EOF - -${CC-cc} dummy.c -o dummy 2>/dev/null && ./dummy && rm dummy.c dummy && exit 0 -rm -f dummy.c dummy - -# Apollos put the system type in the environment. - -test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit 0; } - -# Convex versions that predate uname can use getsysinfo(1) - -if [ -x /usr/convex/getsysinfo ] -then - case `getsysinfo -f cpu_type` in - c1*) - echo c1-convex-bsd - exit 0 ;; - c2*) - if getsysinfo -f scalar_acc - then echo c32-convex-bsd - else echo c2-convex-bsd - fi - exit 0 ;; - c34*) - echo c34-convex-bsd - exit 0 ;; - c38*) - echo c38-convex-bsd - exit 0 ;; - c4*) - echo c4-convex-bsd - exit 0 ;; - esac -fi - -if [ x$CONFIG_NOFAIL = xTRUE ]; then - echo unknownCPU-unknownMFR-unknownOS - exit 0 -fi - -#echo '(Unable to guess system type)' 1>&2 - -exit 1 diff -Nru cdrtools-2.01.01a33/conf/config.sub cdrtools-3.02a09/conf/config.sub --- cdrtools-2.01.01a33/conf/config.sub 2006-06-29 13:11:48.000000000 +0000 +++ cdrtools-3.02a09/conf/config.sub 1970-01-01 00:00:00.000000000 +0000 @@ -1,972 +0,0 @@ -#! /bin/sh -# Configuration validation subroutine script, version 1.1. -# Copyright (C) 1991, 92-97, 1998 Free Software Foundation, Inc. -# This file is (in principle) common to ALL GNU software. -# The presence of a machine in this file suggests that SOME GNU software -# can handle that machine. It does not imply ALL GNU software can. -# -# This file is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, -# Boston, MA 02111-1307, USA. - -# As a special exception to the GNU General Public License, if you -# distribute this file as part of a program that contains a -# configuration script generated by Autoconf, you may include it under -# the same distribution terms that you use for the rest of that program. - -# Configuration subroutine to validate and canonicalize a configuration type. -# Supply the specified configuration type as an argument. -# If it is invalid, we print an error message on stderr and exit with code 1. -# Otherwise, we print the canonical config type on stdout and succeed. - -# This file is supposed to be the same for all GNU packages -# and recognize all the CPU types, system types and aliases -# that are meaningful with *any* GNU software. -# Each package is responsible for reporting which valid configurations -# it does not support. The user should be able to distinguish -# a failure to support a valid configuration from a meaningless -# configuration. - -# The goal of this file is to map all the various variations of a given -# machine specification into a single specification in the form: -# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM -# or in some cases, the newer four-part form: -# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM -# It is wrong to echo any other type of specification. - -if [ x$1 = x ] -then - echo Configuration name missing. 1>&2 - echo "Usage: $0 CPU-MFR-OPSYS" 1>&2 - echo "or $0 ALIAS" 1>&2 - echo where ALIAS is a recognized configuration type. 1>&2 - exit 1 -fi - -# First pass through any local machine types. -case $1 in - *local*) - echo $1 - exit 0 - ;; - *) - ;; -esac - -# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any). -# Here we must recognize all the valid KERNEL-OS combinations. -maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` -case $maybe_os in - linux-gnu*) - os=-$maybe_os - basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` - ;; - *) - basic_machine=`echo $1 | sed 's/-[^-]*$//'` - if [ $basic_machine != $1 ] - then os=`echo $1 | sed 's/.*-/-/'` - else os=; fi - ;; -esac - -### Let's recognize common machines as not being operating systems so -### that things like config.sub decstation-3100 work. We also -### recognize some manufacturers as not being operating systems, so we -### can provide default operating systems below. -case $os in - -sun*os*) - # Prevent following clause from handling this invalid input. - ;; - -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \ - -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \ - -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \ - -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ - -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ - -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ - -apple) - os= - basic_machine=$1 - ;; - -hiux*) - os=-hiuxwe2 - ;; - -sco5) - os=sco3.2v5 - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -sco4) - os=-sco3.2v4 - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -sco3.2.[4-9]*) - os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -sco3.2v[4-9]*) - # Don't forget version if it is 3.2v4 or newer. - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -sco*) - os=-sco3.2v2 - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -isc) - os=-isc2.2 - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -clix*) - basic_machine=clipper-intergraph - ;; - -isc*) - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -lynx*) - os=-lynxos - ;; - -ptx*) - basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'` - ;; - -windowsnt*) - os=`echo $os | sed -e 's/windowsnt/winnt/'` - ;; - -psos*) - os=-psos - ;; -esac - -# Decode aliases for certain CPU-COMPANY combinations. -case $basic_machine in - # Recognize the basic CPU types without company name. - # Some are omitted here because they have special meanings below. - tahoe | i860 | m32r | m68k | m68000 | m88k | ns32k | arc | arm \ - | arme[lb] | pyramid | mn10200 | mn10300 | tron | a29k \ - | 580 | i960 | h8300 | hppa | hppa1.0 | hppa1.1 | hppa2.0 | hppa2.0? \ - | alpha | alphaev5 | alphaev56 | we32k | ns16k | clipper \ - | i370 | sh | powerpc | powerpcle | 1750a | dsp16xx | pdp11 \ - | mips64 | mipsel | mips64el | mips64orion | mips64orionel \ - | mipstx39 | mipstx39el \ - | sparc | sparclet | sparclite | sparc64 | v850) - basic_machine=$basic_machine-unknown - ;; - - # We use `pc' rather than `unknown' - # because (1) that's what they normally are, and - # (2) the word "unknown" tends to confuse beginning users. - i[34567]86) - basic_machine=$basic_machine-pc - ;; - # Object if more than one company name word. - *-*-*) - echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 - exit 1 - ;; - # Recognize the basic CPU types with company name. - vax-* | tahoe-* | i[34567]86-* | i860-* | m32r-* | m68k-* | m68000-* \ - | m88k-* | sparc-* | ns32k-* | fx80-* | arc-* | arm-* | c[123]* \ - | mips-* | pyramid-* | tron-* | a29k-* | romp-* | rs6000-* \ - | power-* | none-* | 580-* | cray2-* | h8300-* | i960-* \ - | xmp-* | ymp-* | hppa-* | hppa1.0-* | hppa1.1-* | hppa2.0-* | hppa2.0?-* \ - | ia64-* \ - | alpha-* | alphaev5-* | alphaev56-* | alphaev6-* | we32k-* | cydra-* \ - | ns16k-* | pn-* | np1-* | xps100-* | clipper-* | orion-* \ - | sparclite-* | pdp11-* | sh-* | powerpc-* | powerpcle-* \ - | sparc64-* | mips64-* | mipsel-* \ - | mips64el-* | mips64orion-* | mips64orionel-* \ - | mipstx39-* | mipstx39el-* \ - | f301-* \ - | x86-* | x86_64-*) - ;; - # Recognize the various machine names and aliases which stand - # for a CPU type and a company and sometimes even an OS. - 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) - basic_machine=m68000-att - ;; - 3b*) - basic_machine=we32k-att - ;; - alliant | fx80) - basic_machine=fx80-alliant - ;; - altos | altos3068) - basic_machine=m68k-altos - ;; - am29k) - basic_machine=a29k-none - os=-bsd - ;; - amdahl) - basic_machine=580-amdahl - os=-sysv - ;; - amiga | amiga-*) - basic_machine=m68k-cbm - ;; - amigaos | amigados) - basic_machine=m68k-cbm - os=-amigaos - ;; - amigaunix | amix) - basic_machine=m68k-cbm - os=-sysv4 - ;; - apollo68) - basic_machine=m68k-apollo - os=-sysv - ;; - aux) - basic_machine=m68k-apple - os=-aux - ;; - balance) - basic_machine=ns32k-sequent - os=-dynix - ;; - convex-c1) - basic_machine=c1-convex - os=-bsd - ;; - convex-c2) - basic_machine=c2-convex - os=-bsd - ;; - convex-c32) - basic_machine=c32-convex - os=-bsd - ;; - convex-c34) - basic_machine=c34-convex - os=-bsd - ;; - convex-c38) - basic_machine=c38-convex - os=-bsd - ;; - cray | ymp) - basic_machine=ymp-cray - os=-unicos - ;; - cray2) - basic_machine=cray2-cray - os=-unicos - ;; - [ctj]90-cray) - basic_machine=c90-cray - os=-unicos - ;; - crds | unos) - basic_machine=m68k-crds - ;; - da30 | da30-*) - basic_machine=m68k-da30 - ;; - decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn) - basic_machine=mips-dec - ;; - delta | 3300 | motorola-3300 | motorola-delta \ - | 3300-motorola | delta-motorola) - basic_machine=m68k-motorola - ;; - delta88) - basic_machine=m88k-motorola - os=-sysv3 - ;; - dpx20 | dpx20-*) - basic_machine=rs6000-bull - os=-bosx - ;; - dpx2* | dpx2*-bull) - basic_machine=m68k-bull - os=-sysv3 - ;; - ebmon29k) - basic_machine=a29k-amd - os=-ebmon - ;; - elxsi) - basic_machine=elxsi-elxsi - os=-bsd - ;; - encore | umax | mmax) - basic_machine=ns32k-encore - ;; - fx2800) - basic_machine=i860-alliant - ;; - genix) - basic_machine=ns32k-ns - ;; - gmicro) - basic_machine=tron-gmicro - os=-sysv - ;; - h3050r* | hiux*) - basic_machine=hppa1.1-hitachi - os=-hiuxwe2 - ;; - h8300hms) - basic_machine=h8300-hitachi - os=-hms - ;; - harris) - basic_machine=m88k-harris - os=-sysv3 - ;; - hp300-*) - basic_machine=m68k-hp - ;; - hp300bsd) - basic_machine=m68k-hp - os=-bsd - ;; - hp300hpux) - basic_machine=m68k-hp - os=-hpux - ;; - hp9k2[0-9][0-9] | hp9k31[0-9]) - basic_machine=m68000-hp - ;; - hp9k3[2-9][0-9]) - basic_machine=m68k-hp - ;; - hp9k7[0-9][0-9] | hp7[0-9][0-9] | hp9k8[0-9]7 | hp8[0-9]7) - basic_machine=hppa1.1-hp - ;; - hp9k8[0-9][0-9] | hp8[0-9][0-9]) - basic_machine=hppa1.0-hp - ;; - hppa-next) - os=-nextstep3 - ;; - i370-ibm* | ibm*) - basic_machine=i370-ibm - os=-mvs - ;; -# I'm not sure what "Sysv32" means. Should this be sysv3.2? - i[34567]86v32) - basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` - os=-sysv32 - ;; - i[34567]86v4*) - basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` - os=-sysv4 - ;; - i[34567]86v) - basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` - os=-sysv - ;; - i[34567]86sol2) - basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` - os=-solaris2 - ;; - iris | iris4d) - basic_machine=mips-sgi - case $os in - -irix*) - ;; - *) - os=-irix4 - ;; - esac - ;; - isi68 | isi) - basic_machine=m68k-isi - os=-sysv - ;; - m88k-omron*) - basic_machine=m88k-omron - ;; - magnum | m3230) - basic_machine=mips-mips - os=-sysv - ;; - merlin) - basic_machine=ns32k-utek - os=-sysv - ;; - miniframe) - basic_machine=m68000-convergent - ;; - mipsel*-linux*) - basic_machine=mipsel-unknown - os=-linux-gnu - ;; - mips*-linux*) - basic_machine=mips-unknown - os=-linux-gnu - ;; - mips3*-*) - basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'` - ;; - mips3*) - basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown - ;; - ncr3000) - basic_machine=i486-ncr - os=-sysv4 - ;; - news | news700 | news800 | news900) - basic_machine=m68k-sony - os=-newsos - ;; - news1000) - basic_machine=m68030-sony - os=-newsos - ;; - news-3600 | risc-news) - basic_machine=mips-sony - os=-newsos - ;; - next | m*-next ) - basic_machine=m68k-next - case $os in - -nextstep* ) - ;; - -ns2*) - os=-nextstep2 - ;; - *) - os=-nextstep3 - ;; - esac - ;; - nh3000) - basic_machine=m68k-harris - os=-cxux - ;; - nh[45]000) - basic_machine=m88k-harris - os=-cxux - ;; - nindy960) - basic_machine=i960-intel - os=-nindy - ;; - np1) - basic_machine=np1-gould - ;; - pa-hitachi) - basic_machine=hppa1.1-hitachi - os=-hiuxwe2 - ;; - paragon) - basic_machine=i860-intel - os=-osf - ;; - parisc-unknown) - basic_machine=parisc-unknown - ;; - pbd) - basic_machine=sparc-tti - ;; - pbb) - basic_machine=m68k-tti - ;; - pc532 | pc532-*) - basic_machine=ns32k-pc532 - ;; - pentium | p5 | k5 | nexen) - basic_machine=i586-pc - ;; - pentiumpro | p6 | k6 | 6x86) - basic_machine=i686-pc - ;; - pentiumii | pentium2) - basic_machine=i786-pc - ;; - pentium-* | p5-* | k5-* | nexen-*) - basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - pentiumpro-* | p6-* | k6-* | 6x86-*) - basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - pentiumii-* | pentium2-*) - basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - pn) - basic_machine=pn-gould - ;; - power) basic_machine=rs6000-ibm - ;; - ppc) basic_machine=powerpc-unknown - ;; - ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - ppcle | powerpclittle | ppc-le | powerpc-little) - basic_machine=powerpcle-unknown - ;; - ppcle-* | powerpclittle-*) - basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - ps2) - basic_machine=i386-ibm - ;; - rm[46]00) - basic_machine=mips-siemens - ;; - rtpc | rtpc-*) - basic_machine=romp-ibm - ;; - s390 | s390-*) - basic_machine=s390-ibm - ;; - s390x | s390x-*) - basic_machine=s390x-ibm - ;; - sequent) - basic_machine=i386-sequent - ;; - sh) - basic_machine=sh-hitachi - os=-hms - ;; - sps7) - basic_machine=m68k-bull - os=-sysv2 - ;; - spur) - basic_machine=spur-unknown - ;; - sun2) - basic_machine=m68000-sun - ;; - sun2os3) - basic_machine=m68000-sun - os=-sunos3 - ;; - sun2os4) - basic_machine=m68000-sun - os=-sunos4 - ;; - sun3os3) - basic_machine=m68k-sun - os=-sunos3 - ;; - sun3os4) - basic_machine=m68k-sun - os=-sunos4 - ;; - sun4os3) - basic_machine=sparc-sun - os=-sunos3 - ;; - sun4os4) - basic_machine=sparc-sun - os=-sunos4 - ;; - sun4sol2) - basic_machine=sparc-sun - os=-solaris2 - ;; - sun3 | sun3-*) - basic_machine=m68k-sun - ;; - sun4) - basic_machine=sparc-sun - ;; - sun386 | sun386i | roadrunner) - basic_machine=i386-sun - ;; - symmetry) - basic_machine=i386-sequent - os=-dynix - ;; - tx39) - basic_machine=mipstx39-unknown - ;; - tx39el) - basic_machine=mipstx39el-unknown - ;; - tower | tower-32) - basic_machine=m68k-ncr - ;; - udi29k) - basic_machine=a29k-amd - os=-udi - ;; - ultra3) - basic_machine=a29k-nyu - os=-sym1 - ;; - vaxv) - basic_machine=vax-dec - os=-sysv - ;; - vms) - basic_machine=vax-dec - os=-vms - ;; - vpp*|vx|vx-*) - basic_machine=f301-fujitsu - ;; - vxworks960) - basic_machine=i960-wrs - os=-vxworks - ;; - vxworks68) - basic_machine=m68k-wrs - os=-vxworks - ;; - vxworks29k) - basic_machine=a29k-wrs - os=-vxworks - ;; - xmp) - basic_machine=xmp-cray - os=-unicos - ;; - xps | xps100) - basic_machine=xps100-honeywell - ;; - none) - basic_machine=none-none - os=-none - ;; - -# Here we handle the default manufacturer of certain CPU types. It is in -# some cases the only manufacturer, in others, it is the most popular. - mips) - if [ x$os = x-linux-gnu ]; then - basic_machine=mips-unknown - else - basic_machine=mips-mips - fi - ;; - romp) - basic_machine=romp-ibm - ;; - rs6000) - basic_machine=rs6000-ibm - ;; - vax) - basic_machine=vax-dec - ;; - pdp11) - basic_machine=pdp11-dec - ;; - we32k) - basic_machine=we32k-att - ;; - sparc) - basic_machine=sparc-sun - ;; - cydra) - basic_machine=cydra-cydrome - ;; - orion) - basic_machine=orion-highlevel - ;; - orion105) - basic_machine=clipper-highlevel - ;; - *) - echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 - exit 1 - ;; -esac - -# Here we canonicalize certain aliases for manufacturers. -case $basic_machine in - *-digital*) - basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'` - ;; - *-commodore*) - basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'` - ;; - *) - ;; -esac - -# Decode manufacturer-specific aliases for certain operating systems. - -if [ x"$os" != x"" ] -then -case $os in - # First match some system type aliases - # that might get confused with valid system types. - # -solaris* is a basic system type, with this one exception. - -solaris1 | -solaris1.*) - os=`echo $os | sed -e 's|solaris1|sunos4|'` - ;; - -solaris) - os=-solaris2 - ;; - -svr4*) - os=-sysv4 - ;; - -unixware*) - os=-sysv4.2uw - ;; - -gnu/linux*) - os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'` - ;; - # First accept the basic system types. - # The portable systems comes first. - # Each alternative MUST END IN A *, to match a version number. - # -sysv* is not here because it comes later, after sysvr4. - -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ - | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\ - | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \ - | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ - | -aos* \ - | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ - | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ - | -hiux* | -386bsd* | -netbsd* | -openbsd* | -freebsd* | -riscix* \ - | -lynxos* | -bosx* | -nextstep* | -cxux* | -aout* | -elf* \ - | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ - | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ - | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ - | -mingw32* | -linux-gnu* | -uxpv* | -beos* | -os2* \ - | -interix* | -uwin* | -mks* | -rhapsody* | -macos* ) - # Remember, each alternative MUST END IN *, to match a version number. - ;; - -linux*) - os=`echo $os | sed -e 's|linux|linux-gnu|'` - ;; - -sunos5*) - os=`echo $os | sed -e 's|sunos5|solaris2|'` - ;; - -sunos6*) - os=`echo $os | sed -e 's|sunos6|solaris3|'` - ;; - -osfrose*) - os=-osfrose - ;; - -osf*) - os=-osf - ;; - -utek*) - os=-bsd - ;; - -dynix*) - os=-bsd - ;; - -acis*) - os=-aos - ;; - -ctix* | -uts*) - os=-sysv - ;; - -ns2 ) - os=-nextstep2 - ;; - # Preserve the version number of sinix5. - -sinix5.*) - os=`echo $os | sed -e 's|sinix|sysv|'` - ;; - -sinix*) - os=-sysv4 - ;; - -triton*) - os=-sysv3 - ;; - -oss*) - os=-sysv3 - ;; - -svr4) - os=-sysv4 - ;; - -svr3) - os=-sysv3 - ;; - # For sys5.3 apollo - -sys5.3) - os=-sysv3 - ;; - -sysvr4) - os=-sysv4 - ;; - # This must come after -sysvr4. - -sysv*) - ;; - -xenix) - os=-xenix - ;; - -none) - ;; - *) - # Get rid of the `-' at the beginning of $os. - os=`echo $os | sed 's/[^-]*-//'` - echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2 - exit 1 - ;; -esac -else - -# Here we handle the default operating systems that come with various machines. -# The value should be what the vendor currently ships out the door with their -# machine or put another way, the most popular os provided with the machine. - -# Note that if you're going to try to match "-MANUFACTURER" here (say, -# "-sun"), then you have to tell the case statement up towards the top -# that MANUFACTURER isn't an operating system. Otherwise, code above -# will signal an error saying that MANUFACTURER isn't an operating -# system, and we'll never get to this point. - -case $basic_machine in - *-acorn) - os=-riscix1.2 - ;; - arm*-semi) - os=-aout - ;; - pdp11-*) - os=-none - ;; - *-dec | vax-*) - os=-ultrix4.2 - ;; - m68*-apollo) - os=-domain - ;; - i386-sun) - os=-sunos4.0.2 - ;; - m68000-sun) - os=-sunos3 - # This also exists in the configure program, but was not the - # default. - # os=-sunos4 - ;; - *-tti) # must be before sparc entry or we get the wrong os. - os=-sysv3 - ;; - sparc-* | *-sun) - os=-sunos4.1.1 - ;; - *-be) - os=-beos - ;; - *-ibm) - os=-aix - ;; - *-hp) - os=-hpux - ;; - *-hitachi) - os=-hiux - ;; - i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent) - os=-sysv - ;; - *-cbm) - os=-amigaos - ;; - *-dg) - os=-dgux - ;; - *-dolphin) - os=-sysv3 - ;; - m68k-ccur) - os=-rtu - ;; - m88k-omron*) - os=-luna - ;; - *-next ) - os=-nextstep - ;; - *-sequent) - os=-ptx - ;; - *-crds) - os=-unos - ;; - *-ns) - os=-genix - ;; - i370-*) - os=-mvs - ;; - *-next) - os=-nextstep3 - ;; - *-gould) - os=-sysv - ;; - *-highlevel) - os=-bsd - ;; - *-encore) - os=-bsd - ;; - *-sgi) - os=-irix - ;; - *-siemens) - os=-sysv4 - ;; - *-masscomp) - os=-rtu - ;; - f301-fujitsu) - os=-uxpv - ;; - *) - os=-none - ;; -esac -fi - -# Here we handle the case where we know the os, and the CPU type, but not the -# manufacturer. We pick the logical manufacturer. -vendor=unknown -case $basic_machine in - *-unknown) - case $os in - -riscix*) - vendor=acorn - ;; - -sunos*) - vendor=sun - ;; - -aix*) - vendor=ibm - ;; - -hpux*) - vendor=hp - ;; - -hiux*) - vendor=hitachi - ;; - -unos*) - vendor=crds - ;; - -dgux*) - vendor=dg - ;; - -luna*) - vendor=omron - ;; - -genix*) - vendor=ns - ;; - -mvs*) - vendor=ibm - ;; - -ptx*) - vendor=sequent - ;; - -vxsim* | -vxworks*) - vendor=wrs - ;; - -aux*) - vendor=apple - ;; - esac - basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"` - ;; -esac - -echo $basic_machine$os diff -Nru cdrtools-2.01.01a33/conf/configure cdrtools-3.02a09/conf/configure --- cdrtools-2.01.01a33/conf/configure 2007-07-10 03:59:00.000000000 +0000 +++ cdrtools-3.02a09/conf/configure 1970-01-01 00:00:00.000000000 +0000 @@ -1,15114 +0,0 @@ -#! /bin/sh - -# From configure.in Revision - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -#serial 18 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -# Guess values for system-dependent variables and create Makefiles. -# Generated automatically using autoconf version 2.13 -# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc. -# -# This configure script is free software; the Free Software Foundation -# gives unlimited permission to copy, distribute and modify it. - -# Defaults: -ac_help= -ac_default_prefix=/usr/local -# Any additions from configure.in: -ac_help="$ac_help - --disable-largefile omit support for large files" - -# Initialize some variables set by options. -# The variables have the same names as the options, with -# dashes changed to underlines. -build=NONE -cache_file=./config.cache -exec_prefix=NONE -host=NONE -no_create= -nonopt=NONE -no_recursion= -prefix=NONE -program_prefix=NONE -program_suffix=NONE -program_transform_name=s,x,x, -silent= -site= -srcdir= -target=NONE -verbose= -x_includes=NONE -x_libraries=NONE -bindir='${exec_prefix}/bin' -sbindir='${exec_prefix}/sbin' -libexecdir='${exec_prefix}/libexec' -datadir='${prefix}/share' -sysconfdir='${prefix}/etc' -sharedstatedir='${prefix}/com' -localstatedir='${prefix}/var' -libdir='${exec_prefix}/lib' -includedir='${prefix}/include' -oldincludedir='/usr/include' -infodir='${prefix}/info' -mandir='${prefix}/man' - -# Initialize some other variables. -subdirs= -MFLAGS= MAKEFLAGS= -SHELL=${CONFIG_SHELL-/bin/sh} -# Maximum number of lines to put in a shell here document. -ac_max_here_lines=12 - -ac_prev= -for ac_option -do - - # If the previous option needs an argument, assign it. - if test -n "$ac_prev"; then - eval "$ac_prev=\$ac_option" - ac_prev= - continue - fi - - case "$ac_option" in - -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;; - *) ac_optarg= ;; - esac - - # Accept the important Cygnus configure options, so we can diagnose typos. - - case "$ac_option" in - - -bindir | --bindir | --bindi | --bind | --bin | --bi) - ac_prev=bindir ;; - -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) - bindir="$ac_optarg" ;; - - -build | --build | --buil | --bui | --bu) - ac_prev=build ;; - -build=* | --build=* | --buil=* | --bui=* | --bu=*) - build="$ac_optarg" ;; - - -cache-file | --cache-file | --cache-fil | --cache-fi \ - | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) - ac_prev=cache_file ;; - -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ - | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) - cache_file="$ac_optarg" ;; - - -cc=* | --cc=* ) - CC="$ac_optarg" ; echo using $CC as compiler ;; - - -datadir | --datadir | --datadi | --datad | --data | --dat | --da) - ac_prev=datadir ;; - -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \ - | --da=*) - datadir="$ac_optarg" ;; - - -disable-* | --disable-*) - ac_feature=`echo $ac_option|sed -e 's/-*disable-//'` - # Reject names that are not valid shell variable names. - if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then - { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; } - fi - ac_feature=`echo $ac_feature| sed 's/-/_/g'` - eval "enable_${ac_feature}=no" ;; - - -enable-* | --enable-*) - ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'` - # Reject names that are not valid shell variable names. - if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then - { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; } - fi - ac_feature=`echo $ac_feature| sed 's/-/_/g'` - case "$ac_option" in - *=*) ;; - *) ac_optarg=yes ;; - esac - eval "enable_${ac_feature}='$ac_optarg'" ;; - - -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ - | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ - | --exec | --exe | --ex) - ac_prev=exec_prefix ;; - -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ - | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ - | --exec=* | --exe=* | --ex=*) - exec_prefix="$ac_optarg" ;; - - -gas | --gas | --ga | --g) - # Obsolete; use --with-gas. - with_gas=yes ;; - - -help | --help | --hel | --he) - # Omit some internal or obsolete options to make the list less imposing. - # This message is too long to be a string in the A/UX 3.1 sh. - cat << EOF -Usage: configure [options] [host] -Options: [defaults in brackets after descriptions] -Configuration: - --cache-file=FILE cache test results in FILE - --help print this message - --no-create do not create output files - --quiet, --silent do not print \`checking...' messages - --version print the version of autoconf that created configure -Directory and file names: - --prefix=PREFIX install architecture-independent files in PREFIX - [$ac_default_prefix] - --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX - [same as prefix] - --bindir=DIR user executables in DIR [EPREFIX/bin] - --sbindir=DIR system admin executables in DIR [EPREFIX/sbin] - --libexecdir=DIR program executables in DIR [EPREFIX/libexec] - --datadir=DIR read-only architecture-independent data in DIR - [PREFIX/share] - --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc] - --sharedstatedir=DIR modifiable architecture-independent data in DIR - [PREFIX/com] - --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var] - --libdir=DIR object code libraries in DIR [EPREFIX/lib] - --includedir=DIR C header files in DIR [PREFIX/include] - --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include] - --infodir=DIR info documentation in DIR [PREFIX/info] - --mandir=DIR man documentation in DIR [PREFIX/man] - --srcdir=DIR find the sources in DIR [configure dir or ..] - --program-prefix=PREFIX prepend PREFIX to installed program names - --program-suffix=SUFFIX append SUFFIX to installed program names - --program-transform-name=PROGRAM - run sed PROGRAM on installed program names -EOF - cat << EOF -Host type: - --build=BUILD configure for building on BUILD [BUILD=HOST] - --host=HOST configure for HOST [guessed] - --target=TARGET configure for TARGET [TARGET=HOST] -Features and packages: - --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) - --enable-FEATURE[=ARG] include FEATURE [ARG=yes] - --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] - --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) - --x-includes=DIR X include files are in DIR - --x-libraries=DIR X library files are in DIR -EOF - if test -n "$ac_help"; then - echo "--enable and --with options recognized:$ac_help" - fi - exit 0 ;; - - -host | --host | --hos | --ho) - ac_prev=host ;; - -host=* | --host=* | --hos=* | --ho=*) - host="$ac_optarg" ;; - - -includedir | --includedir | --includedi | --included | --include \ - | --includ | --inclu | --incl | --inc) - ac_prev=includedir ;; - -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ - | --includ=* | --inclu=* | --incl=* | --inc=*) - includedir="$ac_optarg" ;; - - -infodir | --infodir | --infodi | --infod | --info | --inf) - ac_prev=infodir ;; - -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) - infodir="$ac_optarg" ;; - - -libdir | --libdir | --libdi | --libd) - ac_prev=libdir ;; - -libdir=* | --libdir=* | --libdi=* | --libd=*) - libdir="$ac_optarg" ;; - - -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ - | --libexe | --libex | --libe) - ac_prev=libexecdir ;; - -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ - | --libexe=* | --libex=* | --libe=*) - libexecdir="$ac_optarg" ;; - - -localstatedir | --localstatedir | --localstatedi | --localstated \ - | --localstate | --localstat | --localsta | --localst \ - | --locals | --local | --loca | --loc | --lo) - ac_prev=localstatedir ;; - -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ - | --localstate=* | --localstat=* | --localsta=* | --localst=* \ - | --locals=* | --local=* | --loca=* | --loc=* | --lo=*) - localstatedir="$ac_optarg" ;; - - -mandir | --mandir | --mandi | --mand | --man | --ma | --m) - ac_prev=mandir ;; - -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) - mandir="$ac_optarg" ;; - - -nfp | --nfp | --nf) - # Obsolete; use --without-fp. - with_fp=no ;; - - -no-create | --no-create | --no-creat | --no-crea | --no-cre \ - | --no-cr | --no-c) - no_create=yes ;; - - -no-recursion | --no-recursion | --no-recursio | --no-recursi \ - | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) - no_recursion=yes ;; - - -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ - | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ - | --oldin | --oldi | --old | --ol | --o) - ac_prev=oldincludedir ;; - -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ - | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ - | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) - oldincludedir="$ac_optarg" ;; - - -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) - ac_prev=prefix ;; - -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) - prefix="$ac_optarg" ;; - - -program-prefix | --program-prefix | --program-prefi | --program-pref \ - | --program-pre | --program-pr | --program-p) - ac_prev=program_prefix ;; - -program-prefix=* | --program-prefix=* | --program-prefi=* \ - | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) - program_prefix="$ac_optarg" ;; - - -program-suffix | --program-suffix | --program-suffi | --program-suff \ - | --program-suf | --program-su | --program-s) - ac_prev=program_suffix ;; - -program-suffix=* | --program-suffix=* | --program-suffi=* \ - | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) - program_suffix="$ac_optarg" ;; - - -program-transform-name | --program-transform-name \ - | --program-transform-nam | --program-transform-na \ - | --program-transform-n | --program-transform- \ - | --program-transform | --program-transfor \ - | --program-transfo | --program-transf \ - | --program-trans | --program-tran \ - | --progr-tra | --program-tr | --program-t) - ac_prev=program_transform_name ;; - -program-transform-name=* | --program-transform-name=* \ - | --program-transform-nam=* | --program-transform-na=* \ - | --program-transform-n=* | --program-transform-=* \ - | --program-transform=* | --program-transfor=* \ - | --program-transfo=* | --program-transf=* \ - | --program-trans=* | --program-tran=* \ - | --progr-tra=* | --program-tr=* | --program-t=*) - program_transform_name="$ac_optarg" ;; - - -q | -quiet | --quiet | --quie | --qui | --qu | --q \ - | -silent | --silent | --silen | --sile | --sil) - silent=yes ;; - - -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) - ac_prev=sbindir ;; - -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ - | --sbi=* | --sb=*) - sbindir="$ac_optarg" ;; - - -sharedstatedir | --sharedstatedir | --sharedstatedi \ - | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ - | --sharedst | --shareds | --shared | --share | --shar \ - | --sha | --sh) - ac_prev=sharedstatedir ;; - -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ - | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ - | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ - | --sha=* | --sh=*) - sharedstatedir="$ac_optarg" ;; - - -site | --site | --sit) - ac_prev=site ;; - -site=* | --site=* | --sit=*) - site="$ac_optarg" ;; - - -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) - ac_prev=srcdir ;; - -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) - srcdir="$ac_optarg" ;; - - -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ - | --syscon | --sysco | --sysc | --sys | --sy) - ac_prev=sysconfdir ;; - -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ - | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) - sysconfdir="$ac_optarg" ;; - - -target | --target | --targe | --targ | --tar | --ta | --t) - ac_prev=target ;; - -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) - target="$ac_optarg" ;; - - -v | -verbose | --verbose | --verbos | --verbo | --verb) - verbose=yes ;; - - -version | --version | --versio | --versi | --vers) - echo "configure generated by autoconf version 2.13" - exit 0 ;; - - -with-* | --with-*) - ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'` - # Reject names that are not valid shell variable names. - if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then - { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; } - fi - ac_package=`echo $ac_package| sed 's/-/_/g'` - case "$ac_option" in - *=*) ;; - *) ac_optarg=yes ;; - esac - eval "with_${ac_package}='$ac_optarg'" ;; - - -without-* | --without-*) - ac_package=`echo $ac_option|sed -e 's/-*without-//'` - # Reject names that are not valid shell variable names. - if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then - { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; } - fi - ac_package=`echo $ac_package| sed 's/-/_/g'` - eval "with_${ac_package}=no" ;; - - --x) - # Obsolete; use --with-x. - with_x=yes ;; - - -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ - | --x-incl | --x-inc | --x-in | --x-i) - ac_prev=x_includes ;; - -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ - | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) - x_includes="$ac_optarg" ;; - - -x-libraries | --x-libraries | --x-librarie | --x-librari \ - | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) - ac_prev=x_libraries ;; - -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ - | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) - x_libraries="$ac_optarg" ;; - - -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; } - ;; - - *) - if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then - echo "configure: warning: $ac_option: invalid host type" 1>&2 - fi - if test "x$nonopt" != xNONE; then - { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } - fi - nonopt="$ac_option" - ;; - - esac -done - -if test -n "$ac_prev"; then - { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; } -fi - -trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15 - -# File descriptor usage: -# 0 standard input -# 1 file creation -# 2 errors and warnings -# 3 some systems may open it to /dev/tty -# 4 used on the Kubota Titan -# 6 checking for... messages and results -# 5 compiler messages saved in config.log -if test "$silent" = yes; then - exec 6>/dev/null -else - exec 6>&1 -fi -exec 5>./config.log - -echo "\ -This file contains any messages produced by compilers while -running configure, to aid debugging if configure makes a mistake. -" 1>&5 - -# Strip out --no-create and --no-recursion so they do not pile up. -# Also quote any args containing shell metacharacters. -ac_configure_args= -for ac_arg -do - case "$ac_arg" in - -no-create | --no-create | --no-creat | --no-crea | --no-cre \ - | --no-cr | --no-c) ;; - -no-recursion | --no-recursion | --no-recursio | --no-recursi \ - | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;; - *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*) - ac_configure_args="$ac_configure_args '$ac_arg'" ;; - *) ac_configure_args="$ac_configure_args $ac_arg" ;; - esac -done - -# NLS nuisances. -# Only set these to C if already set. These must not be set unconditionally -# because not all systems understand e.g. LANG=C (notably SCO). -# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'! -# Non-C LC_CTYPE values break the ctype check. -if test "${LANG+set}" = set; then LANG=C; export LANG; fi -if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi -if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi -if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi - -# confdefs.h avoids OS command line length limits that DEFS can exceed. -rm -rf conftest* confdefs.h -# AIX cpp loses on an empty file, so make sure it contains at least a newline. -echo > confdefs.h - -# A filename unique to this package, relative to the directory that -# configure is in, which we can look for to find out if srcdir is correct. -ac_unique_file=xconfig.h.in - -# Find the source files, if location was not specified. -if test -z "$srcdir"; then - ac_srcdir_defaulted=yes - # Try the directory containing this script, then its parent. - ac_prog=$0 - ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'` - test "x$ac_confdir" = "x$ac_prog" && ac_confdir=. - srcdir=$ac_confdir - if test ! -r $srcdir/$ac_unique_file; then - srcdir=.. - fi -else - ac_srcdir_defaulted=no -fi -if test ! -r $srcdir/$ac_unique_file; then - if test "$ac_srcdir_defaulted" = yes; then - { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; } - else - { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; } - fi -fi -srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'` - -# Prefer explicitly selected file to automatically selected ones. -if test -z "$CONFIG_SITE"; then - if test "x$prefix" != xNONE; then - CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site" - else - CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" - fi -fi -for ac_site_file in $CONFIG_SITE; do - if test -r "$ac_site_file"; then - echo "loading site script $ac_site_file" - . "$ac_site_file" - fi -done - -if test -r "$cache_file"; then - echo "loading cache $cache_file" - . $cache_file -else - echo "creating cache $cache_file" - > $cache_file -fi - -ac_ext=c -# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. -ac_cpp='$CPP $CPPFLAGS' -ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' -ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' -cross_compiling=$ac_cv_prog_cc_cross - -ac_exeext= -ac_xexeext= -ac_objext=o -if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then - # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu. - if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then - ac_n= ac_c=' -' ac_t=' ' - else - ac_n=-n ac_c= ac_t= - fi -else - ac_n= ac_c='\c' ac_t= -fi - - - -ac_aux_dir= -for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do - if test -f $ac_dir/install-sh; then - ac_aux_dir=$ac_dir - ac_install_sh="$ac_aux_dir/install-sh -c" - break - elif test -f $ac_dir/install.sh; then - ac_aux_dir=$ac_dir - ac_install_sh="$ac_aux_dir/install.sh -c" - break - fi -done -if test -z "$ac_aux_dir"; then - { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; } -fi -ac_config_guess=$ac_aux_dir/config.guess -ac_config_sub=$ac_aux_dir/config.sub -ac_configure=$ac_aux_dir/configure # This should be Cygnus configure. - - -# Make sure we can run config.sub. -if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then : -else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; } -fi - -echo $ac_n "checking host system type""... $ac_c" 1>&6 -echo "configure:780: checking host system type" >&5 - -host_alias=$host -case "$host_alias" in -NONE) - case $nonopt in - NONE) - if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then : - else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; } - fi ;; - *) host_alias=$nonopt ;; - esac ;; -esac - -host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias` -host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` -host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` -host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` -echo "$ac_t""$host" 1>&6 - - -echo $ac_n "checking if /bin/sh is bash""... $ac_c" 1>&6 -echo "configure:802: checking if /bin/sh is bash" >&5 -if eval "test \"`echo '$''{'ac_cv_shell_is_bash'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - -ac_err=`< /dev/null sh -version 2> /dev/null | grep bash` -if test -n "$ac_err"; then - ac_cv_shell_is_bash=yes -else - ac_cv_shell_is_bash=no -fi - -fi - -echo "$ac_t""$ac_cv_shell_is_bash" 1>&6 -if test $ac_cv_shell_is_bash = yes; then - cat >> confdefs.h <<\EOF -#define SHELL_IS_BASH 1 -EOF - -fi -echo $ac_n "checking for object suffix""... $ac_c" 1>&6 -echo "configure:824: checking for object suffix" >&5 -if eval "test \"`echo '$''{'ac_cv_objext'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - rm -f conftest* -echo 'int i = 1;' > conftest.$ac_ext -if { (eval echo configure:830: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - for ac_file in conftest.*; do - case $ac_file in - *.c) ;; - *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;; - esac - done -else - { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; } -fi -rm -f conftest* -fi - -echo "$ac_t""$ac_cv_objext" 1>&6 -OBJEXT=$ac_cv_objext -ac_objext=$ac_cv_objext - -echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6 -echo "configure:848: checking for Cygwin environment" >&5 -if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - ac_cv_cygwin=yes -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - ac_cv_cygwin=no -fi -rm -f conftest* -rm -f conftest* -fi - -echo "$ac_t""$ac_cv_cygwin" 1>&6 -CYGWIN= -test "$ac_cv_cygwin" = yes && CYGWIN=yes -echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6 -echo "configure:881: checking for mingw32 environment" >&5 -if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - ac_cv_mingw32=yes -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - ac_cv_mingw32=no -fi -rm -f conftest* -rm -f conftest* -fi - -echo "$ac_t""$ac_cv_mingw32" 1>&6 -MINGW32= -test "$ac_cv_mingw32" = yes && MINGW32=yes -echo $ac_n "checking for EMX/OS2 environment""... $ac_c" 1>&6 -echo "configure:910: checking for EMX/OS2 environment" >&5 -if eval "test \"`echo '$''{'ac_cv_emxos2'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - ac_cv_emxos2=yes -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - ac_cv_emxos2=no -fi -rm -f conftest* -rm -f conftest* -fi - -echo "$ac_t""$ac_cv_emxos2" 1>&6 -if eval "test \"`echo '$''{'ac_cv_libpre'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - if test "$ac_cv_emxos2" = yes ; then - ac_cv_libpre= -else - ac_cv_libpre=lib -fi - -fi - -EMXOS2= -test "$ac_cv_emxos2" = yes && EMXOS2=yes - - - -echo $ac_n "checking for executable suffix""... $ac_c" 1>&6 -echo "configure:953: checking for executable suffix" >&5 -if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - if test "$CYGWIN" = yes || test "$MINGW32" = yes || test "$EMXOS2" = yes; then - ac_cv_exeext=.exe - ac_cv_xexeext="" -else - rm -f conftest* - echo 'int main () { return 0; }' > conftest.$ac_ext - ac_cv_exeext= - if { (eval echo configure:964: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then - for file in conftest.*; do - case $file in - *.c | *.o | *.obj) ;; - *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;; - esac - done - else - ccout=`eval "${CC-cc} 2>&1" 2> /dev/null` - ret=$? - nf=`echo "$ccout" | grep 'not found'` - if test $ret = 127 -a -n "$nf" ; then # Korn Shell - ccout="" - fi - if test ! -n "$ccout" ; then - { echo "configure: error: installation or configuration problem: C compiler ${CC-cc} not found." 1>&2; exit 1; } - fi - { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; } - fi - (./conftest ; exit) 2> /dev/null - if test $? != 0 ; then - ac_cv_xexeext="${ac_cv_exeext}" - (./conftest${ac_cv_xexeext} ; exit) 2> /dev/null - if test $? != 0 ; then - ac_cv_xexeext="" - fi - fi - rm -f conftest* - test x"${ac_cv_exeext}" = x && ac_cv_exeext=no - test x"${ac_cv_xexeext}" = x && ac_cv_xexeext=no -fi -fi - -EXEEXT="" -XEXEEXT="" -test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext} -test x"${ac_cv_xexeext}" != xno && XEXEEXT=${ac_cv_xexeext} -echo "$ac_t""${ac_cv_exeext}" 1>&6 -echo $ac_n "checking for executable calling suffix""... $ac_c" 1>&6 -echo "configure:1003: checking for executable calling suffix" >&5 -echo "$ac_t""${ac_cv_xexeext}" 1>&6 -ac_exeext=$EXEEXT -ac_xexeext=$XEXEEXT - - - -echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 -echo "configure:1011: checking how to run the C preprocessor" >&5 -# On Suns, sometimes $CPP names a directory. -if test -n "$CPP" && test -d "$CPP"; then - CPP= -fi -if test -z "$CPP"; then -if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - # This must be in double quotes, not single quotes, because CPP may get - # substituted into the Makefile and "${CC-cc}" will confuse make. - CPP="${CC-cc} -E" - # On the NeXT, cc -E runs the code through the compiler's parser, - # not just through cpp. - cat > conftest.$ac_ext < -Syntax Error -EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1032: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`tr -d '\015' < conftest.out | grep -v '^ *+' | grep -v "^conftest.${ac_ext}\$"` -if test -z "$ac_err"; then - : -else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - CPP="${CC-cc} -E -traditional-cpp" - cat > conftest.$ac_ext < -Syntax Error -EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1049: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`tr -d '\015' < conftest.out | grep -v '^ *+' | grep -v "^conftest.${ac_ext}\$"` -if test -z "$ac_err"; then - : -else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - CPP="${CC-cc} -nologo -E" - cat > conftest.$ac_ext < -Syntax Error -EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1066: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`tr -d '\015' < conftest.out | grep -v '^ *+' | grep -v "^conftest.${ac_ext}\$"` -if test -z "$ac_err"; then - : -else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - CPP=/lib/cpp -fi -rm -f conftest* -fi -rm -f conftest* -fi -rm -f conftest* - ac_cv_prog_CPP="$CPP" -fi - CPP="$ac_cv_prog_CPP" -else - ac_cv_prog_CPP="$CPP" -fi -echo "$ac_t""$CPP" 1>&6 - -# Extract the first word of "ranlib", so it can be a program name with args. -set dummy ranlib; ac_word=$2 -echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1093: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - if test -n "$RANLIB"; then - ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. -else - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" - ac_dummy="$PATH" - for ac_dir in $ac_dummy; do - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$ac_word; then - ac_cv_prog_RANLIB="ranlib" - break - fi - done - IFS="$ac_save_ifs" - test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":" -fi -fi -RANLIB="$ac_cv_prog_RANLIB" -if test -n "$RANLIB"; then - echo "$ac_t""$RANLIB" 1>&6 -else - echo "$ac_t""no" 1>&6 -fi - -echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6 -echo "configure:1121: checking whether ${MAKE-make} sets \${MAKE}" >&5 -set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'` -if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftestmake <<\EOF -all: - @echo 'ac_maketemp="${MAKE}"' -EOF -# GNU make sometimes prints "make[1]: Entering...", which would confuse us. -eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=` -if test -n "$ac_maketemp"; then - eval ac_cv_prog_make_${ac_make}_set=yes -else - eval ac_cv_prog_make_${ac_make}_set=no -fi -rm -f conftestmake -fi -if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then - echo "$ac_t""yes" 1>&6 - SET_MAKE= -else - echo "$ac_t""no" 1>&6 - SET_MAKE="MAKE=${MAKE-make}" -fi - - -echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 -echo "configure:1149: checking for ANSI C header files" >&5 -if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -#include -#include -#include -EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1162: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`tr -d '\015' < conftest.out | grep -v '^ *+' | grep -v "^conftest.${ac_ext}\$"` -if test -z "$ac_err"; then - rm -rf conftest* - ac_cv_header_stdc=yes -else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - ac_cv_header_stdc=no -fi -rm -f conftest* - -if test $ac_cv_header_stdc = yes; then - # SunOS 4.x string.h does not declare mem*, contrary to ANSI. -cat > conftest.$ac_ext < -EOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - egrep "memchr" >/dev/null 2>&1; then - : -else - rm -rf conftest* - ac_cv_header_stdc=no -fi -rm -f conftest* - -fi - -if test $ac_cv_header_stdc = yes; then - # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. -cat > conftest.$ac_ext < -EOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - egrep "free" >/dev/null 2>&1; then - : -else - rm -rf conftest* - ac_cv_header_stdc=no -fi -rm -f conftest* - -fi - -if test $ac_cv_header_stdc = yes; then - # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. -if test "$cross_compiling" = yes; then - : -else - cat > conftest.$ac_ext < -#define ISLOWER(c) ('a' <= (c) && (c) <= 'z') -#define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) -#define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) -int main () { int i; for (i = 0; i < 256; i++) -if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); -exit (0); } - -EOF -if { (eval echo configure:1229: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest${ac_xexeext}; exit) 2>/dev/null -then - : -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -fr conftest* - ac_cv_header_stdc=no -fi -rm -fr conftest* -fi - -fi -fi - -echo "$ac_t""$ac_cv_header_stdc" 1>&6 -if test $ac_cv_header_stdc = yes; then - cat >> confdefs.h <<\EOF -#define STDC_HEADERS 1 -EOF - -fi - -echo $ac_n "checking for UNIX-98 compliant inttypes.h""... $ac_c" 1>&6 -echo "configure:1253: checking for UNIX-98 compliant inttypes.h" >&5 -if eval "test \"`echo '$''{'ac_cv_header_inttypes'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -int main() { -int8_t c; uint8_t uc; int16_t s; uint16_t us; int32_t i; uint32_t ui; -int64_t ll; uint64_t ull; -intptr_t ip; uintptr_t uip; -; return 0; } -EOF -if { (eval echo configure:1267: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - ac_cv_header_inttypes=yes -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - ac_cv_header_inttypes=no -fi -rm -f conftest* -fi - -echo "$ac_t""$ac_cv_header_inttypes" 1>&6 -if test $ac_cv_header_inttypes = yes; then - cat >> confdefs.h <<\EOF -#define HAVE_INTTYPES_H 1 -EOF - -fi -ac_header_dirent=no -for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h -do -ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` -echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6 -echo "configure:1291: checking for $ac_hdr that defines DIR" >&5 -if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -#include <$ac_hdr> -int main() { -DIR *dirp = 0; -; return 0; } -EOF -if { (eval echo configure:1304: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - eval "ac_cv_header_dirent_$ac_safe=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_header_dirent_$ac_safe=no" -fi -rm -f conftest* -fi -if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` - cat >> confdefs.h <&6 -fi -done -# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix. -if test $ac_header_dirent = dirent.h; then -echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6 -echo "configure:1329: checking for opendir in -ldir" >&5 -ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'` -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - ac_save_LIBS="$LIBS" -LIBS="-ldir $LIBS" -cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" -fi -rm -f conftest* -LIBS="$ac_save_LIBS" - -fi -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then - echo "$ac_t""yes" 1>&6 - LIBS="$LIBS -ldir" -else - echo "$ac_t""no" 1>&6 -fi - -else -echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6 -echo "configure:1370: checking for opendir in -lx" >&5 -ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'` -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - ac_save_LIBS="$LIBS" -LIBS="-lx $LIBS" -cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" -fi -rm -f conftest* -LIBS="$ac_save_LIBS" - -fi -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then - echo "$ac_t""yes" 1>&6 - LIBS="$LIBS -lx" -else - echo "$ac_t""no" 1>&6 -fi - -fi - -echo $ac_n "checking whether stat file-mode macros are broken""... $ac_c" 1>&6 -echo "configure:1412: checking whether stat file-mode macros are broken" >&5 -if eval "test \"`echo '$''{'ac_cv_header_stat_broken'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -#include - -#if defined(S_ISBLK) && defined(S_IFDIR) -# if S_ISBLK (S_IFDIR) -You lose. -# endif -#endif - -#if defined(S_ISBLK) && defined(S_IFCHR) -# if S_ISBLK (S_IFCHR) -You lose. -# endif -#endif - -#if defined(S_ISLNK) && defined(S_IFREG) -# if S_ISLNK (S_IFREG) -You lose. -# endif -#endif - -#if defined(S_ISSOCK) && defined(S_IFREG) -# if S_ISSOCK (S_IFREG) -You lose. -# endif -#endif - -EOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - egrep "You lose" >/dev/null 2>&1; then - rm -rf conftest* - ac_cv_header_stat_broken=yes -else - rm -rf conftest* - ac_cv_header_stat_broken=no -fi -rm -f conftest* - -fi - -echo "$ac_t""$ac_cv_header_stat_broken" 1>&6 -if test $ac_cv_header_stat_broken = yes; then - cat >> confdefs.h <<\EOF -#define STAT_MACROS_BROKEN 1 -EOF - -fi - -echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6 -echo "configure:1468: checking whether time.h and sys/time.h may both be included" >&5 -if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -#include -#include -int main() { -struct tm *tp; -; return 0; } -EOF -if { (eval echo configure:1482: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - ac_cv_header_time=yes -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - ac_cv_header_time=no -fi -rm -f conftest* -fi - -echo "$ac_t""$ac_cv_header_time" 1>&6 -if test $ac_cv_header_time = yes; then - cat >> confdefs.h <<\EOF -#define TIME_WITH_SYS_TIME 1 -EOF - -fi - -echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6 -echo "configure:1503: checking for sys/wait.h that is POSIX.1 compatible" >&5 -if eval "test \"`echo '$''{'ac_cv_header_sys_wait_h'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -#include -#ifndef WEXITSTATUS -#define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8) -#endif -#ifndef WIFEXITED -#define WIFEXITED(stat_val) (((stat_val) & 255) == 0) -#endif -int main() { -int s; -wait (&s); -s = WIFEXITED (s) ? WEXITSTATUS (s) : 1; -; return 0; } -EOF -if { (eval echo configure:1524: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - ac_cv_header_sys_wait_h=yes -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - ac_cv_header_sys_wait_h=no -fi -rm -f conftest* -fi - -echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6 -if test $ac_cv_header_sys_wait_h = yes; then - cat >> confdefs.h <<\EOF -#define HAVE_SYS_WAIT_H 1 -EOF - -fi - -echo $ac_n "checking if select needs nonstd include files""... $ac_c" 1>&6 -echo "configure:1545: checking if select needs nonstd include files" >&5 -if eval "test \"`echo '$''{'ac_cv_header_slect_nonstd_hdr'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -#include -int main() { -fd_set rfd; FD_ZERO(&rfd); select(1, &rfd, 0, 0, 0); -; return 0; } -EOF -if { (eval echo configure:1558: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - ac_cv_header_slect_nonstd_hdr=no -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - ac_cv_header_slect_nonstd_hdr=yes -fi -rm -f conftest* -fi - -echo "$ac_t""$ac_cv_header_slect_nonstd_hdr" 1>&6 -if test $ac_cv_header_slect_nonstd_hdr = yes; then - cat >> confdefs.h <<\EOF -#define SELECT_NONSTD_HDR 1 -EOF - -fi -echo $ac_n "checking if sys/select.h is needed for select""... $ac_c" 1>&6 -echo "configure:1578: checking if sys/select.h is needed for select" >&5 -if eval "test \"`echo '$''{'ac_cv_header_need_sys_select_h'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -#include -#include -#ifndef SELECT_NONSTD_HDR -do not compile if we do not need nonstandard headers -#endif -int main() { -fd_set rfd; FD_ZERO(&rfd); select(1, &rfd, 0, 0, 0); -; return 0; } -EOF -if { (eval echo configure:1595: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - ac_cv_header_need_sys_select_h=yes -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - ac_cv_header_need_sys_select_h=no -fi -rm -f conftest* -fi - -echo "$ac_t""$ac_cv_header_need_sys_select_h" 1>&6 -if test $ac_cv_header_need_sys_select_h = yes; then - cat >> confdefs.h <<\EOF -#define NEED_SYS_SELECT_H 1 -EOF - -fi -echo $ac_n "checking if sys/socket.h is needed for select""... $ac_c" 1>&6 -echo "configure:1615: checking if sys/socket.h is needed for select" >&5 -if eval "test \"`echo '$''{'ac_cv_header_need_sys_socket_h'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -#include -#include -#ifndef SELECT_NONSTD_HDR -do not compile if we do not need nonstandard headers -#endif -int main() { -fd_set rfd; FD_ZERO(&rfd); select(1, &rfd, 0, 0, 0); -; return 0; } -EOF -if { (eval echo configure:1632: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - ac_cv_header_need_sys_socket_h=yes -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - ac_cv_header_need_sys_socket_h=no -fi -rm -f conftest* -fi - -echo "$ac_t""$ac_cv_header_need_sys_socket_h" 1>&6 -if test $ac_cv_header_need_sys_socket_h = yes; then - cat >> confdefs.h <<\EOF -#define NEED_SYS_SOCKET_H 1 -EOF - -fi -for ac_hdr in stdio.h varargs.h stdarg.h stdlib.h stddef.h string.h strings.h unistd.h fcntl.h sys/file.h -do -ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` -echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:1655: checking for $ac_hdr" >&5 -if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1665: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`tr -d '\015' < conftest.out | grep -v '^ *+' | grep -v "^conftest.${ac_ext}\$"` -if test -z "$ac_err"; then - rm -rf conftest* - eval "ac_cv_header_$ac_safe=yes" -else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_header_$ac_safe=no" -fi -rm -f conftest* -fi -if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` - cat >> confdefs.h <&6 -fi -done - -for ac_hdr in getopt.h -do -ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` -echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:1695: checking for $ac_hdr" >&5 -if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1705: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`tr -d '\015' < conftest.out | grep -v '^ *+' | grep -v "^conftest.${ac_ext}\$"` -if test -z "$ac_err"; then - rm -rf conftest* - eval "ac_cv_header_$ac_safe=yes" -else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_header_$ac_safe=no" -fi -rm -f conftest* -fi -if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` - cat >> confdefs.h <&6 -fi -done - -for ac_hdr in limits.h -do -ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` -echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:1735: checking for $ac_hdr" >&5 -if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1745: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`tr -d '\015' < conftest.out | grep -v '^ *+' | grep -v "^conftest.${ac_ext}\$"` -if test -z "$ac_err"; then - rm -rf conftest* - eval "ac_cv_header_$ac_safe=yes" -else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_header_$ac_safe=no" -fi -rm -f conftest* -fi -if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` - cat >> confdefs.h <&6 -fi -done - -for ac_hdr in a.out.h aouthdr.h elf.h -do -ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` -echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:1775: checking for $ac_hdr" >&5 -if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1785: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`tr -d '\015' < conftest.out | grep -v '^ *+' | grep -v "^conftest.${ac_ext}\$"` -if test -z "$ac_err"; then - rm -rf conftest* - eval "ac_cv_header_$ac_safe=yes" -else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_header_$ac_safe=no" -fi -rm -f conftest* -fi -if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` - cat >> confdefs.h <&6 -fi -done - -for ac_hdr in malloc.h termios.h termio.h -do -ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` -echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:1815: checking for $ac_hdr" >&5 -if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1825: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`tr -d '\015' < conftest.out | grep -v '^ *+' | grep -v "^conftest.${ac_ext}\$"` -if test -z "$ac_err"; then - rm -rf conftest* - eval "ac_cv_header_$ac_safe=yes" -else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_header_$ac_safe=no" -fi -rm -f conftest* -fi -if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` - cat >> confdefs.h <&6 -fi -done - -for ac_hdr in pwd.h grp.h sys/acl.h acllib.h acl/libacl.h -do -ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` -echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:1855: checking for $ac_hdr" >&5 -if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1865: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`tr -d '\015' < conftest.out | grep -v '^ *+' | grep -v "^conftest.${ac_ext}\$"` -if test -z "$ac_err"; then - rm -rf conftest* - eval "ac_cv_header_$ac_safe=yes" -else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_header_$ac_safe=no" -fi -rm -f conftest* -fi -if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` - cat >> confdefs.h <&6 -fi -done - -for ac_hdr in shadow.h syslog.h -do -ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` -echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:1895: checking for $ac_hdr" >&5 -if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1905: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`tr -d '\015' < conftest.out | grep -v '^ *+' | grep -v "^conftest.${ac_ext}\$"` -if test -z "$ac_err"; then - rm -rf conftest* - eval "ac_cv_header_$ac_safe=yes" -else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_header_$ac_safe=no" -fi -rm -f conftest* -fi -if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` - cat >> confdefs.h <&6 -fi -done - -for ac_hdr in sys/time.h sys/times.h utime.h sys/utime.h sys/ioctl.h sys/filio.h sys/param.h sys/systeminfo.h sys/sysctl.h -do -ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` -echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:1935: checking for $ac_hdr" >&5 -if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1945: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`tr -d '\015' < conftest.out | grep -v '^ *+' | grep -v "^conftest.${ac_ext}\$"` -if test -z "$ac_err"; then - rm -rf conftest* - eval "ac_cv_header_$ac_safe=yes" -else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_header_$ac_safe=no" -fi -rm -f conftest* -fi -if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` - cat >> confdefs.h <&6 -fi -done - -for ac_hdr in sys/syscall.h -do -ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` -echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:1975: checking for $ac_hdr" >&5 -if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1985: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`tr -d '\015' < conftest.out | grep -v '^ *+' | grep -v "^conftest.${ac_ext}\$"` -if test -z "$ac_err"; then - rm -rf conftest* - eval "ac_cv_header_$ac_safe=yes" -else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_header_$ac_safe=no" -fi -rm -f conftest* -fi -if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` - cat >> confdefs.h <&6 -fi -done - -for ac_hdr in mach/machine.h -do -ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` -echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:2015: checking for $ac_hdr" >&5 -if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2025: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`tr -d '\015' < conftest.out | grep -v '^ *+' | grep -v "^conftest.${ac_ext}\$"` -if test -z "$ac_err"; then - rm -rf conftest* - eval "ac_cv_header_$ac_safe=yes" -else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_header_$ac_safe=no" -fi -rm -f conftest* -fi -if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` - cat >> confdefs.h <&6 -fi -done - -for ac_hdr in mntent.h sys/mntent.h sys/mnttab.h sys/mount.h -do -ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` -echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:2055: checking for $ac_hdr" >&5 -if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2065: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`tr -d '\015' < conftest.out | grep -v '^ *+' | grep -v "^conftest.${ac_ext}\$"` -if test -z "$ac_err"; then - rm -rf conftest* - eval "ac_cv_header_$ac_safe=yes" -else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_header_$ac_safe=no" -fi -rm -f conftest* -fi -if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` - cat >> confdefs.h <&6 -fi -done - -for ac_hdr in wait.h sys/resource.h procfs.h sys/procfs.h -do -ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` -echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:2095: checking for $ac_hdr" >&5 -if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2105: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`tr -d '\015' < conftest.out | grep -v '^ *+' | grep -v "^conftest.${ac_ext}\$"` -if test -z "$ac_err"; then - rm -rf conftest* - eval "ac_cv_header_$ac_safe=yes" -else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_header_$ac_safe=no" -fi -rm -f conftest* -fi -if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` - cat >> confdefs.h <&6 -fi -done - -for ac_hdr in sys/utsname.h sys/priocntl.h sys/rtpriocntl.h -do -ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` -echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:2135: checking for $ac_hdr" >&5 -if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2145: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`tr -d '\015' < conftest.out | grep -v '^ *+' | grep -v "^conftest.${ac_ext}\$"` -if test -z "$ac_err"; then - rm -rf conftest* - eval "ac_cv_header_$ac_safe=yes" -else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_header_$ac_safe=no" -fi -rm -f conftest* -fi -if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` - cat >> confdefs.h <&6 -fi -done - -for ac_hdr in sys/mtio.h sys/tape.h sys/mman.h linux/pg.h camlib.h -do -ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` -echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:2175: checking for $ac_hdr" >&5 -if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2185: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`tr -d '\015' < conftest.out | grep -v '^ *+' | grep -v "^conftest.${ac_ext}\$"` -if test -z "$ac_err"; then - rm -rf conftest* - eval "ac_cv_header_$ac_safe=yes" -else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_header_$ac_safe=no" -fi -rm -f conftest* -fi -if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` - cat >> confdefs.h <&6 -fi -done - -for ac_hdr in sys/shm.h sys/ipc.h -do -ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` -echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:2215: checking for $ac_hdr" >&5 -if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2225: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`tr -d '\015' < conftest.out | grep -v '^ *+' | grep -v "^conftest.${ac_ext}\$"` -if test -z "$ac_err"; then - rm -rf conftest* - eval "ac_cv_header_$ac_safe=yes" -else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_header_$ac_safe=no" -fi -rm -f conftest* -fi -if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` - cat >> confdefs.h <&6 -fi -done - -for ac_hdr in sys/dkio.h sys/dklabel.h sun/dkio.h sun/dklabel.h -do -ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` -echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:2255: checking for $ac_hdr" >&5 -if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2265: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`tr -d '\015' < conftest.out | grep -v '^ *+' | grep -v "^conftest.${ac_ext}\$"` -if test -z "$ac_err"; then - rm -rf conftest* - eval "ac_cv_header_$ac_safe=yes" -else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_header_$ac_safe=no" -fi -rm -f conftest* -fi -if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` - cat >> confdefs.h <&6 -fi -done - -for ac_hdr in sys/types.h sys/stat.h types.h stat.h -do -ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` -echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:2295: checking for $ac_hdr" >&5 -if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2305: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`tr -d '\015' < conftest.out | grep -v '^ *+' | grep -v "^conftest.${ac_ext}\$"` -if test -z "$ac_err"; then - rm -rf conftest* - eval "ac_cv_header_$ac_safe=yes" -else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_header_$ac_safe=no" -fi -rm -f conftest* -fi -if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` - cat >> confdefs.h <&6 -fi -done - -for ac_hdr in sys/stypes.h sys/filedesc.h -do -ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` -echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:2335: checking for $ac_hdr" >&5 -if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2345: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`tr -d '\015' < conftest.out | grep -v '^ *+' | grep -v "^conftest.${ac_ext}\$"` -if test -z "$ac_err"; then - rm -rf conftest* - eval "ac_cv_header_$ac_safe=yes" -else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_header_$ac_safe=no" -fi -rm -f conftest* -fi -if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` - cat >> confdefs.h <&6 -fi -done - -for ac_hdr in poll.h sys/poll.h sys/select.h -do -ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` -echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:2375: checking for $ac_hdr" >&5 -if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2385: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`tr -d '\015' < conftest.out | grep -v '^ *+' | grep -v "^conftest.${ac_ext}\$"` -if test -z "$ac_err"; then - rm -rf conftest* - eval "ac_cv_header_$ac_safe=yes" -else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_header_$ac_safe=no" -fi -rm -f conftest* -fi -if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` - cat >> confdefs.h <&6 -fi -done - -for ac_hdr in netdb.h sys/socket.h netinet/in.h -do -ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` -echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:2415: checking for $ac_hdr" >&5 -if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2425: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`tr -d '\015' < conftest.out | grep -v '^ *+' | grep -v "^conftest.${ac_ext}\$"` -if test -z "$ac_err"; then - rm -rf conftest* - eval "ac_cv_header_$ac_safe=yes" -else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_header_$ac_safe=no" -fi -rm -f conftest* -fi -if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` - cat >> confdefs.h <&6 -fi -done - -for ac_hdr in ieeefp.h fp.h -do -ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` -echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:2455: checking for $ac_hdr" >&5 -if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2465: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`tr -d '\015' < conftest.out | grep -v '^ *+' | grep -v "^conftest.${ac_ext}\$"` -if test -z "$ac_err"; then - rm -rf conftest* - eval "ac_cv_header_$ac_safe=yes" -else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_header_$ac_safe=no" -fi -rm -f conftest* -fi -if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` - cat >> confdefs.h <&6 -fi -done - -for ac_hdr in values.h float.h -do -ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` -echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:2495: checking for $ac_hdr" >&5 -if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2505: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`tr -d '\015' < conftest.out | grep -v '^ *+' | grep -v "^conftest.${ac_ext}\$"` -if test -z "$ac_err"; then - rm -rf conftest* - eval "ac_cv_header_$ac_safe=yes" -else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_header_$ac_safe=no" -fi -rm -f conftest* -fi -if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` - cat >> confdefs.h <&6 -fi -done - -for ac_hdr in arpa/inet.h -do -ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` -echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:2535: checking for $ac_hdr" >&5 -if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2545: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`tr -d '\015' < conftest.out | grep -v '^ *+' | grep -v "^conftest.${ac_ext}\$"` -if test -z "$ac_err"; then - rm -rf conftest* - eval "ac_cv_header_$ac_safe=yes" -else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_header_$ac_safe=no" -fi -rm -f conftest* -fi -if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` - cat >> confdefs.h <&6 -fi -done - -for ac_hdr in bsd/dev/scsireg.h -do -ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` -echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:2575: checking for $ac_hdr" >&5 -if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2585: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`tr -d '\015' < conftest.out | grep -v '^ *+' | grep -v "^conftest.${ac_ext}\$"` -if test -z "$ac_err"; then - rm -rf conftest* - eval "ac_cv_header_$ac_safe=yes" -else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_header_$ac_safe=no" -fi -rm -f conftest* -fi -if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` - cat >> confdefs.h <&6 -fi -done - -for ac_hdr in sys/bsdtty.h -do -ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` -echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:2615: checking for $ac_hdr" >&5 -if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2625: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`tr -d '\015' < conftest.out | grep -v '^ *+' | grep -v "^conftest.${ac_ext}\$"` -if test -z "$ac_err"; then - rm -rf conftest* - eval "ac_cv_header_$ac_safe=yes" -else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_header_$ac_safe=no" -fi -rm -f conftest* -fi -if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` - cat >> confdefs.h <&6 -fi -done - -for ac_hdr in linux/types.h linux/gfp.h asm/types.h -do -ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` -echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:2655: checking for $ac_hdr" >&5 -if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2665: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`tr -d '\015' < conftest.out | grep -v '^ *+' | grep -v "^conftest.${ac_ext}\$"` -if test -z "$ac_err"; then - rm -rf conftest* - eval "ac_cv_header_$ac_safe=yes" -else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_header_$ac_safe=no" -fi -rm -f conftest* -fi -if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` - cat >> confdefs.h <&6 -fi -done - -for ac_hdr in OS.h -do -ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` -echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:2695: checking for $ac_hdr" >&5 -if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2705: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`tr -d '\015' < conftest.out | grep -v '^ *+' | grep -v "^conftest.${ac_ext}\$"` -if test -z "$ac_err"; then - rm -rf conftest* - eval "ac_cv_header_$ac_safe=yes" -else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_header_$ac_safe=no" -fi -rm -f conftest* -fi -if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` - cat >> confdefs.h <&6 -fi -done - -for ac_hdr in ext2fs/ext2_fs.h -do -ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` -echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:2735: checking for $ac_hdr" >&5 -if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2745: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`tr -d '\015' < conftest.out | grep -v '^ *+' | grep -v "^conftest.${ac_ext}\$"` -if test -z "$ac_err"; then - rm -rf conftest* - eval "ac_cv_header_$ac_safe=yes" -else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_header_$ac_safe=no" -fi -rm -f conftest* -fi -if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` - cat >> confdefs.h <&6 -fi -done - -for ac_hdr in attr/xattr.h -do -ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` -echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:2775: checking for $ac_hdr" >&5 -if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2785: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`tr -d '\015' < conftest.out | grep -v '^ *+' | grep -v "^conftest.${ac_ext}\$"` -if test -z "$ac_err"; then - rm -rf conftest* - eval "ac_cv_header_$ac_safe=yes" -else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_header_$ac_safe=no" -fi -rm -f conftest* -fi -if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` - cat >> confdefs.h <&6 -fi -done - -for ac_hdr in crt_externs.h -do -ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` -echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:2815: checking for $ac_hdr" >&5 -if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2825: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`tr -d '\015' < conftest.out | grep -v '^ *+' | grep -v "^conftest.${ac_ext}\$"` -if test -z "$ac_err"; then - rm -rf conftest* - eval "ac_cv_header_$ac_safe=yes" -else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_header_$ac_safe=no" -fi -rm -f conftest* -fi -if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` - cat >> confdefs.h <&6 -fi -done - -for ac_hdr in fnmatch.h -do -ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` -echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:2855: checking for $ac_hdr" >&5 -if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2865: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`tr -d '\015' < conftest.out | grep -v '^ *+' | grep -v "^conftest.${ac_ext}\$"` -if test -z "$ac_err"; then - rm -rf conftest* - eval "ac_cv_header_$ac_safe=yes" -else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_header_$ac_safe=no" -fi -rm -f conftest* -fi -if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` - cat >> confdefs.h <&6 -fi -done - -for ac_hdr in libintl.h locale.h langinfo.h nl_types.h -do -ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` -echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:2895: checking for $ac_hdr" >&5 -if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2905: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`tr -d '\015' < conftest.out | grep -v '^ *+' | grep -v "^conftest.${ac_ext}\$"` -if test -z "$ac_err"; then - rm -rf conftest* - eval "ac_cv_header_$ac_safe=yes" -else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_header_$ac_safe=no" -fi -rm -f conftest* -fi -if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` - cat >> confdefs.h <&6 -fi -done - -for ac_hdr in wchar.h iconv.h -do -ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` -echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:2935: checking for $ac_hdr" >&5 -if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2945: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`tr -d '\015' < conftest.out | grep -v '^ *+' | grep -v "^conftest.${ac_ext}\$"` -if test -z "$ac_err"; then - rm -rf conftest* - eval "ac_cv_header_$ac_safe=yes" -else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_header_$ac_safe=no" -fi -rm -f conftest* -fi -if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` - cat >> confdefs.h <&6 -fi -done - -for ac_hdr in priv.h -do -ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` -echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:2975: checking for $ac_hdr" >&5 -if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2985: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`tr -d '\015' < conftest.out | grep -v '^ *+' | grep -v "^conftest.${ac_ext}\$"` -if test -z "$ac_err"; then - rm -rf conftest* - eval "ac_cv_header_$ac_safe=yes" -else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_header_$ac_safe=no" -fi -rm -f conftest* -fi -if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` - cat >> confdefs.h <&6 -fi -done - -for ac_hdr in exec_attr.h secdb.h -do -ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` -echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:3015: checking for $ac_hdr" >&5 -if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:3025: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`tr -d '\015' < conftest.out | grep -v '^ *+' | grep -v "^conftest.${ac_ext}\$"` -if test -z "$ac_err"; then - rm -rf conftest* - eval "ac_cv_header_$ac_safe=yes" -else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_header_$ac_safe=no" -fi -rm -f conftest* -fi -if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` - cat >> confdefs.h <&6 -fi -done - -for ac_hdr in direct.h -do -ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` -echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:3055: checking for $ac_hdr" >&5 -if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:3065: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`tr -d '\015' < conftest.out | grep -v '^ *+' | grep -v "^conftest.${ac_ext}\$"` -if test -z "$ac_err"; then - rm -rf conftest* - eval "ac_cv_header_$ac_safe=yes" -else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_header_$ac_safe=no" -fi -rm -f conftest* -fi -if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` - cat >> confdefs.h <&6 -fi -done - -for ac_hdr in pthread.h thread.h -do -ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` -echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:3095: checking for $ac_hdr" >&5 -if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:3105: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`tr -d '\015' < conftest.out | grep -v '^ *+' | grep -v "^conftest.${ac_ext}\$"` -if test -z "$ac_err"; then - rm -rf conftest* - eval "ac_cv_header_$ac_safe=yes" -else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_header_$ac_safe=no" -fi -rm -f conftest* -fi -if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` - cat >> confdefs.h <&6 -fi -done - - -echo $ac_n "checking for header file containing major(), minor() and makedev()""... $ac_c" 1>&6 -echo "configure:3133: checking for header file containing major(), minor() and makedev()" >&5 -if eval "test \"`echo '$''{'ac_cv_header_makedev'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - ac_cv_header_makedev=none -cat > conftest.$ac_ext < -#include -int main() { -int i = major(0); i = minor(0); i = makedev(0,0); -; return 0; } -EOF -if { (eval echo configure:3147: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - ac_cv_header_makedev=sys/mkdev.h -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 -fi -rm -f conftest* -if test $ac_cv_header_makedev = none; then - cat > conftest.$ac_ext < -#include -int main() { -int i = major(0); i = minor(0); i = makedev(0,0); -; return 0; } -EOF -if { (eval echo configure:3165: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - ac_cv_header_makedev=sys/sysmacros.h -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 -fi -rm -f conftest* -fi -fi - -echo "$ac_t""$ac_cv_header_makedev" 1>&6 -if test $ac_cv_header_makedev = sys/mkdev.h; then - cat >> confdefs.h <<\EOF -#define MAJOR_IN_MKDEV 1 -EOF - -fi -if test $ac_cv_header_makedev = sys/sysmacros.h; then - cat >> confdefs.h <<\EOF -#define MAJOR_IN_SYSMACROS 1 -EOF - -fi - - -echo $ac_n "checking bits in minor device number""... $ac_c" 1>&6 -echo "configure:3192: checking bits in minor device number" >&5 -if eval "test \"`echo '$''{'ac_cv_dev_minor_bits'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - if test "$cross_compiling" = yes; then - { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } -else - cat > conftest.$ac_ext < -#include -#ifdef major -# define _FOUND_MAJOR_ -#endif - -#ifdef MAJOR_IN_MKDEV -# include -# define _FOUND_MAJOR_ -#endif - -#ifndef _FOUND_MAJOR_ -# ifdef MAJOR_IN_SYSMACROS -# include -# define _FOUND_MAJOR_ -# endif -#endif - -#ifndef _FOUND_MAJOR_ -# if defined(hpux) || defined(__hpux__) || defined(__hpux) -# include -# define _FOUND_MAJOR_ -# endif -#endif - -#ifndef _FOUND_MAJOR_ -# define major(dev) (((dev) >> 8) & 0xFF) -# define minor(dev) ((dev) & 0xFF) -# define makedev(majo, mino) (((majo) << 8) | (mino)) -#endif -int -main() -{ - long l = 1; - int i; - int m; - int c = 0; - FILE *f=fopen("conftestval", "w"); - int maxloop = 32; - - if (sizeof (long) > 4) - maxloop = 64; - - if (!f) exit(1); - - for (i=1, m=0; i <= maxloop; i++, l<<=1) { - if (minor(l) == 0 && c == 0) - c = m; - if (minor(l) != 0) - m = i; - } - fprintf(f, "%d\n", m); - exit(0); -} -EOF -if { (eval echo configure:3257: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest${ac_xexeext}; exit) 2>/dev/null -then - ac_cv_dev_minor_bits=`cat conftestval` -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -fr conftest* - ac_cv_dev_minor_bits=0 -fi -rm -fr conftest* -fi - -fi -echo "$ac_t""$ac_cv_dev_minor_bits" 1>&6 -cat >> confdefs.h <&6 -echo "configure:3277: checking whether bits in minor device numbers are non contiguous" >&5 -if eval "test \"`echo '$''{'ac_cv_dev_minor_noncontig'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - if test "$cross_compiling" = yes; then - { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } -else - cat > conftest.$ac_ext < -#ifdef major -# define _FOUND_MAJOR_ -#endif - -#ifdef MAJOR_IN_MKDEV -# include -# define _FOUND_MAJOR_ -#endif - -#ifndef _FOUND_MAJOR_ -# ifdef MAJOR_IN_SYSMACROS -# include -# define _FOUND_MAJOR_ -# endif -#endif - -#ifndef _FOUND_MAJOR_ -# if defined(hpux) || defined(__hpux__) || defined(__hpux) -# include -# define _FOUND_MAJOR_ -# endif -#endif - -#ifndef _FOUND_MAJOR_ -# define major(dev) (((dev) >> 8) & 0xFF) -# define minor(dev) ((dev) & 0xFF) -# define makedev(majo, mino) (((majo) << 8) | (mino)) -#endif -int -main() -{ - long l = 1; - int i; - int m; - int c = 0; - int maxloop = 32; - - if (sizeof (long) > 4) - maxloop = 64; - - for (i=1, m=0; i <= maxloop; i++, l<<=1) { - if (minor(l) == 0 && c == 0) - c = m; - if (minor(l) != 0) - m = i; - } -exit (m == c);} -EOF -if { (eval echo configure:3337: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest${ac_xexeext}; exit) 2>/dev/null -then - ac_cv_dev_minor_noncontig=yes -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -fr conftest* - ac_cv_dev_minor_noncontig=no -fi -rm -fr conftest* -fi - -fi - -echo "$ac_t""$ac_cv_dev_minor_noncontig" 1>&6 -if test $ac_cv_dev_minor_noncontig = yes; then - cat >> confdefs.h <<\EOF -#define DEV_MINOR_NONCONTIG 1 -EOF - -fi - -echo $ac_n "checking for _filbuf()""... $ac_c" 1>&6 -echo "configure:3360: checking for _filbuf()" >&5 -if eval "test \"`echo '$''{'ac_cv_func__filbuf'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -int main() { -FILE *f; -int flag; -int count; -char *ptr; -char c = 0; -f = fopen("confdefs.h", "r"); -_filbuf(f); -_flsbuf(c, f); -flag = f->_flag & _IONBF; -flag |= f->_flag & _IOERR; -flag |= f->_flag & _IOEOF; -count = f->_cnt; -ptr = (char *)f->_ptr; -fclose(f); -; return 0; } -EOF -if { (eval echo configure:3385: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - ac_cv_func__filbuf=yes -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - ac_cv_func__filbuf=no -fi -rm -f conftest* -fi - -echo "$ac_t""$ac_cv_func__filbuf" 1>&6 -if test $ac_cv_func__filbuf = yes; then - cat >> confdefs.h <<\EOF -#define HAVE__FILBUF 1 -EOF - -fi -echo $ac_n "checking for __filbuf()""... $ac_c" 1>&6 -echo "configure:3405: checking for __filbuf()" >&5 -if eval "test \"`echo '$''{'ac_cv_func___filbuf'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -int main() { -FILE *f; -int flag; -int count; -char *ptr; -char c = 0; -f = fopen("confdefs.h", "r"); -__filbuf(f); -__flsbuf(c, f); -flag = f->_flag & _IONBF; -flag |= f->_flag & _IOERR; -flag |= f->_flag & _IOEOF; -count = f->_cnt; -ptr = (char *)f->_ptr; -fclose(f); -; return 0; } -EOF -if { (eval echo configure:3430: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - ac_cv_func___filbuf=yes -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - ac_cv_func___filbuf=no -fi -rm -f conftest* -fi - -echo "$ac_t""$ac_cv_func___filbuf" 1>&6 -if test $ac_cv_func___filbuf = yes; then - cat >> confdefs.h <<\EOF -#define HAVE___FILBUF 1 -EOF - -fi -echo $ac_n "checking for USG derived STDIO""... $ac_c" 1>&6 -echo "configure:3450: checking for USG derived STDIO" >&5 -if eval "test \"`echo '$''{'ac_cv_header_usg_stdio'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -int main() { -FILE *f; -int flag; -int count; -char *ptr; -char c = 0; -f = fopen("confdefs.h", "r"); -#ifdef HAVE___FILBUF -__filbuf(f); -__flsbuf(c, f); -#else -# ifdef HAVE__FILBUF -_filbuf(f); -_flsbuf(c, f); -# else -no filbuf() -# endif -#endif -flag = f->_flag & _IONBF; -flag |= f->_flag & _IOERR; -flag |= f->_flag & _IOEOF; -count = f->_cnt; -ptr = (char *)f->_ptr; -fclose(f); -; return 0; } -EOF -if { (eval echo configure:3484: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - ac_cv_header_usg_stdio=yes -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - ac_cv_header_usg_stdio=no -fi -rm -f conftest* -fi - -echo "$ac_t""$ac_cv_header_usg_stdio" 1>&6 -if test $ac_cv_header_usg_stdio = yes; then - cat >> confdefs.h <<\EOF -#define HAVE_USG_STDIO 1 -EOF - -fi -echo $ac_n "checking for errno definition in errno.h""... $ac_c" 1>&6 -echo "configure:3504: checking for errno definition in errno.h" >&5 -if eval "test \"`echo '$''{'ac_cv_header_errno_def'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -int main() { -errno = 0; -; return 0; } -EOF -if { (eval echo configure:3516: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - ac_cv_header_errno_def=yes -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - ac_cv_header_errno_def=no -fi -rm -f conftest* -fi - -echo "$ac_t""$ac_cv_header_errno_def" 1>&6 -if test $ac_cv_header_errno_def = yes; then - cat >> confdefs.h <<\EOF -#define HAVE_ERRNO_DEF 1 -EOF - -fi - -echo $ac_n "checking for working const""... $ac_c" 1>&6 -echo "configure:3537: checking for working const" >&5 -if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext <j = 5; -} -{ /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ - const int foo = 10; -} - -; return 0; } -EOF -if { (eval echo configure:3591: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - ac_cv_c_const=yes -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - ac_cv_c_const=no -fi -rm -f conftest* -fi - -echo "$ac_t""$ac_cv_c_const" 1>&6 -if test $ac_cv_c_const = no; then - cat >> confdefs.h <<\EOF -#define const -EOF - -fi - -echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6 -echo "configure:3612: checking whether byte ordering is bigendian" >&5 -if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - ac_cv_c_bigendian=unknown -# See if sys/param.h defines the BYTE_ORDER macro. -cat > conftest.$ac_ext < -#include -int main() { - -#if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN - bogus endian macros -#endif -; return 0; } -EOF -if { (eval echo configure:3630: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - # It does; now see whether it defined to BIG_ENDIAN or not. -cat > conftest.$ac_ext < -#include -int main() { - -#if BYTE_ORDER != BIG_ENDIAN - not big endian -#endif -; return 0; } -EOF -if { (eval echo configure:3645: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - ac_cv_c_bigendian=yes -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - ac_cv_c_bigendian=no -fi -rm -f conftest* -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 -fi -rm -f conftest* -if test $ac_cv_c_bigendian = unknown; then -if test "$cross_compiling" = yes; then - { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } -else - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest${ac_xexeext}; exit) 2>/dev/null -then - ac_cv_c_bigendian=no -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -fr conftest* - ac_cv_c_bigendian=yes -fi -rm -fr conftest* -fi - -fi -fi - -echo "$ac_t""$ac_cv_c_bigendian" 1>&6 -if test $ac_cv_c_bigendian = yes; then - cat >> confdefs.h <<\EOF -#define WORDS_BIGENDIAN 1 -EOF - -fi - -echo $ac_n "checking whether bitorder in bitfields is htol""... $ac_c" 1>&6 -echo "configure:3702: checking whether bitorder in bitfields is htol" >&5 -if eval "test \"`echo '$''{'ac_cv_c_bitfields_htol'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - if test "$cross_compiling" = yes; then - { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } -else - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest${ac_xexeext}; exit) 2>/dev/null -then - ac_cv_c_bitfields_htol=yes -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -fr conftest* - ac_cv_c_bitfields_htol=no -fi -rm -fr conftest* -fi - -fi - -echo "$ac_t""$ac_cv_c_bitfields_htol" 1>&6 -if test $ac_cv_c_bitfields_htol = yes; then - cat >> confdefs.h <<\EOF -#define BITFIELDS_HTOL 1 -EOF - -fi -echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6 -echo "configure:3748: checking return type of signal handlers" >&5 -if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -#include -#ifdef signal -#undef signal -#endif -#ifdef __cplusplus -extern "C" void (*signal (int, void (*)(int)))(int); -#else -void (*signal ()) (); -#endif - -int main() { -int i; -; return 0; } -EOF -if { (eval echo configure:3770: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - ac_cv_type_signal=void -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - ac_cv_type_signal=int -fi -rm -f conftest* -fi - -echo "$ac_t""$ac_cv_type_signal" 1>&6 -cat >> confdefs.h <&6 -echo "configure:3789: checking for uid_t in sys/types.h" >&5 -if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -EOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - egrep "uid_t" >/dev/null 2>&1; then - rm -rf conftest* - ac_cv_type_uid_t=yes -else - rm -rf conftest* - ac_cv_type_uid_t=no -fi -rm -f conftest* - -fi - -echo "$ac_t""$ac_cv_type_uid_t" 1>&6 -if test $ac_cv_type_uid_t = no; then - cat >> confdefs.h <<\EOF -#define uid_t int -EOF - - cat >> confdefs.h <<\EOF -#define gid_t int -EOF - -fi - -echo $ac_n "checking type of array argument to getgroups""... $ac_c" 1>&6 -echo "configure:3823: checking type of array argument to getgroups" >&5 -if eval "test \"`echo '$''{'ac_cv_type_getgroups'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - if test "$cross_compiling" = yes; then - ac_cv_type_getgroups=cross -else - cat > conftest.$ac_ext < -#define NGID 256 -#undef MAX -#define MAX(x, y) ((x) > (y) ? (x) : (y)) -main() -{ - gid_t gidset[NGID]; - int i, n; - union { gid_t gval; long lval; } val; - - val.lval = -1; - for (i = 0; i < NGID; i++) - gidset[i] = val.gval; - n = getgroups (sizeof (gidset) / MAX (sizeof (int), sizeof (gid_t)) - 1, - gidset); - /* Exit non-zero if getgroups seems to require an array of ints. This - happens when gid_t is short but getgroups modifies an array of ints. */ - exit ((n > 0 && gidset[n] != val.gval) ? 1 : 0); -} - -EOF -if { (eval echo configure:3856: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest${ac_xexeext}; exit) 2>/dev/null -then - ac_cv_type_getgroups=gid_t -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -fr conftest* - ac_cv_type_getgroups=int -fi -rm -fr conftest* -fi - -if test $ac_cv_type_getgroups = cross; then - cat > conftest.$ac_ext < -EOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - egrep "getgroups.*int.*gid_t" >/dev/null 2>&1; then - rm -rf conftest* - ac_cv_type_getgroups=gid_t -else - rm -rf conftest* - ac_cv_type_getgroups=int -fi -rm -f conftest* - -fi -fi - -echo "$ac_t""$ac_cv_type_getgroups" 1>&6 -cat >> confdefs.h <&6 -echo "configure:3894: checking for type long long" >&5 -if eval "test \"`echo '$''{'ac_cv_type_longlong'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - ac_cv_type_longlong=yes -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - ac_cv_type_longlong=no -fi -rm -f conftest* -fi - -echo "$ac_t""$ac_cv_type_longlong" 1>&6 -if test $ac_cv_type_longlong = yes; then - cat >> confdefs.h <<\EOF -#define HAVE_LONGLONG 1 -EOF - -fi -echo $ac_n "checking for type __int64""... $ac_c" 1>&6 -echo "configure:3926: checking for type __int64" >&5 -if eval "test \"`echo '$''{'ac_cv_type___int64'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - ac_cv_type___int64=yes -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - ac_cv_type___int64=no -fi -rm -f conftest* -fi - -echo "$ac_t""$ac_cv_type___int64" 1>&6 -if test $ac_cv_type___int64 = yes; then - cat >> confdefs.h <<\EOF -#define HAVE___INT64 1 -EOF - -fi -echo $ac_n "checking for prototypes""... $ac_c" 1>&6 -echo "configure:3958: checking for prototypes" >&5 -if eval "test \"`echo '$''{'ac_cv_type_prototypes'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - if test "$cross_compiling" = yes; then - { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } -else - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest${ac_xexeext}; exit) 2>/dev/null -then - ac_cv_type_prototypes=yes -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -fr conftest* - ac_cv_type_prototypes=no -fi -rm -fr conftest* -fi - -fi - -echo "$ac_t""$ac_cv_type_prototypes" 1>&6 -if test $ac_cv_type_prototypes = yes; then - cat >> confdefs.h <<\EOF -#define PROTOTYPES 1 -EOF - -fi -echo $ac_n "checking if compiler allows dynamic arrays""... $ac_c" 1>&6 -echo "configure:3998: checking if compiler allows dynamic arrays" >&5 -if eval "test \"`echo '$''{'ac_cv_dyn_arrays'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - ac_cv_dyn_arrays=yes -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - ac_cv_dyn_arrays=no -fi -rm -f conftest* -fi - -echo "$ac_t""$ac_cv_dyn_arrays" 1>&6 -if test $ac_cv_dyn_arrays = yes; then - cat >> confdefs.h <<\EOF -#define HAVE_DYN_ARRAYS 1 -EOF - -fi - -echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6 -echo "configure:4031: checking for uid_t in sys/types.h" >&5 -if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -EOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - egrep "uid_t" >/dev/null 2>&1; then - rm -rf conftest* - ac_cv_type_uid_t=yes -else - rm -rf conftest* - ac_cv_type_uid_t=no -fi -rm -f conftest* - -fi - -echo "$ac_t""$ac_cv_type_uid_t" 1>&6 -if test $ac_cv_type_uid_t = no; then - cat >> confdefs.h <<\EOF -#define uid_t int -EOF - - cat >> confdefs.h <<\EOF -#define gid_t int -EOF - -fi - -echo $ac_n "checking for size_t""... $ac_c" 1>&6 -echo "configure:4065: checking for size_t" >&5 -if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -#if STDC_HEADERS -#include -#include -#endif -EOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then - rm -rf conftest* - ac_cv_type_size_t=yes -else - rm -rf conftest* - ac_cv_type_size_t=no -fi -rm -f conftest* - -fi -echo "$ac_t""$ac_cv_type_size_t" 1>&6 -if test $ac_cv_type_size_t = no; then - cat >> confdefs.h <<\EOF -#define size_t unsigned -EOF - -fi - -echo $ac_n "checking for ssize_t""... $ac_c" 1>&6 -echo "configure:4098: checking for ssize_t" >&5 -if eval "test \"`echo '$''{'ac_cv_type_ssize_t'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -#if STDC_HEADERS -#include -#include -#endif -EOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - egrep "(^|[^a-zA-Z_0-9])ssize_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then - rm -rf conftest* - ac_cv_type_ssize_t=yes -else - rm -rf conftest* - ac_cv_type_ssize_t=no -fi -rm -f conftest* - -fi -echo "$ac_t""$ac_cv_type_ssize_t" 1>&6 -if test $ac_cv_type_ssize_t = no; then - cat >> confdefs.h <<\EOF -#define ssize_t int -EOF - -fi - -echo $ac_n "checking for pid_t""... $ac_c" 1>&6 -echo "configure:4131: checking for pid_t" >&5 -if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -#if STDC_HEADERS -#include -#include -#endif -EOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then - rm -rf conftest* - ac_cv_type_pid_t=yes -else - rm -rf conftest* - ac_cv_type_pid_t=no -fi -rm -f conftest* - -fi -echo "$ac_t""$ac_cv_type_pid_t" 1>&6 -if test $ac_cv_type_pid_t = no; then - cat >> confdefs.h <<\EOF -#define pid_t int -EOF - -fi - -echo $ac_n "checking for off_t""... $ac_c" 1>&6 -echo "configure:4164: checking for off_t" >&5 -if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -#if STDC_HEADERS -#include -#include -#endif -EOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then - rm -rf conftest* - ac_cv_type_off_t=yes -else - rm -rf conftest* - ac_cv_type_off_t=no -fi -rm -f conftest* - -fi -echo "$ac_t""$ac_cv_type_off_t" 1>&6 -if test $ac_cv_type_off_t = no; then - cat >> confdefs.h <<\EOF -#define off_t long -EOF - -fi - -echo $ac_n "checking for mode_t""... $ac_c" 1>&6 -echo "configure:4197: checking for mode_t" >&5 -if eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -#if STDC_HEADERS -#include -#include -#endif -EOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then - rm -rf conftest* - ac_cv_type_mode_t=yes -else - rm -rf conftest* - ac_cv_type_mode_t=no -fi -rm -f conftest* - -fi -echo "$ac_t""$ac_cv_type_mode_t" 1>&6 -if test $ac_cv_type_mode_t = no; then - cat >> confdefs.h <<\EOF -#define mode_t int -EOF - -fi - -echo $ac_n "checking for time_t""... $ac_c" 1>&6 -echo "configure:4230: checking for time_t" >&5 -if eval "test \"`echo '$''{'ac_cv_type_time_t'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -#ifdef TIME_WITH_SYS_TIME_H -# include -# include -#else -#ifdef HAVE_SYS_TIME_H -# include -#else -# include -#endif -#endif -int main() { -time_t t; -; return 0; } -EOF -if { (eval echo configure:4253: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - ac_cv_type_time_t=yes -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - ac_cv_type_time_t=no -fi -rm -f conftest* -fi - -echo "$ac_t""$ac_cv_type_time_t" 1>&6 -if test $ac_cv_type_time_t = no; then - cat >> confdefs.h <<\EOF -#define time_t long -EOF - -fi -echo $ac_n "checking for caddr_t""... $ac_c" 1>&6 -echo "configure:4273: checking for caddr_t" >&5 -if eval "test \"`echo '$''{'ac_cv_type_caddr_t'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -#if STDC_HEADERS -#include -#include -#endif -EOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - egrep "(^|[^a-zA-Z_0-9])caddr_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then - rm -rf conftest* - ac_cv_type_caddr_t=yes -else - rm -rf conftest* - ac_cv_type_caddr_t=no -fi -rm -f conftest* - -fi -echo "$ac_t""$ac_cv_type_caddr_t" 1>&6 -if test $ac_cv_type_caddr_t = no; then - cat >> confdefs.h <<\EOF -#define caddr_t char * -EOF - -fi - -echo $ac_n "checking for daddr_t""... $ac_c" 1>&6 -echo "configure:4306: checking for daddr_t" >&5 -if eval "test \"`echo '$''{'ac_cv_type_daddr_t'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -#if STDC_HEADERS -#include -#include -#endif -EOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - egrep "(^|[^a-zA-Z_0-9])daddr_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then - rm -rf conftest* - ac_cv_type_daddr_t=yes -else - rm -rf conftest* - ac_cv_type_daddr_t=no -fi -rm -f conftest* - -fi -echo "$ac_t""$ac_cv_type_daddr_t" 1>&6 -if test $ac_cv_type_daddr_t = no; then - cat >> confdefs.h <<\EOF -#define daddr_t long -EOF - -fi - -echo $ac_n "checking for dev_t""... $ac_c" 1>&6 -echo "configure:4339: checking for dev_t" >&5 -if eval "test \"`echo '$''{'ac_cv_type_dev_t'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -#if STDC_HEADERS -#include -#include -#endif -EOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - egrep "(^|[^a-zA-Z_0-9])dev_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then - rm -rf conftest* - ac_cv_type_dev_t=yes -else - rm -rf conftest* - ac_cv_type_dev_t=no -fi -rm -f conftest* - -fi -echo "$ac_t""$ac_cv_type_dev_t" 1>&6 -if test $ac_cv_type_dev_t = no; then - cat >> confdefs.h <<\EOF -#define dev_t unsigned short -EOF - -fi - -echo $ac_n "checking for major_t""... $ac_c" 1>&6 -echo "configure:4372: checking for major_t" >&5 -if eval "test \"`echo '$''{'ac_cv_type_major_t'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -#if STDC_HEADERS -#include -#include -#endif -EOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - egrep "(^|[^a-zA-Z_0-9])major_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then - rm -rf conftest* - ac_cv_type_major_t=yes -else - rm -rf conftest* - ac_cv_type_major_t=no -fi -rm -f conftest* - -fi -echo "$ac_t""$ac_cv_type_major_t" 1>&6 -if test $ac_cv_type_major_t = no; then - cat >> confdefs.h <<\EOF -#define major_t dev_t -EOF - -fi - -echo $ac_n "checking for minor_t""... $ac_c" 1>&6 -echo "configure:4405: checking for minor_t" >&5 -if eval "test \"`echo '$''{'ac_cv_type_minor_t'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -#if STDC_HEADERS -#include -#include -#endif -EOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - egrep "(^|[^a-zA-Z_0-9])minor_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then - rm -rf conftest* - ac_cv_type_minor_t=yes -else - rm -rf conftest* - ac_cv_type_minor_t=no -fi -rm -f conftest* - -fi -echo "$ac_t""$ac_cv_type_minor_t" 1>&6 -if test $ac_cv_type_minor_t = no; then - cat >> confdefs.h <<\EOF -#define minor_t dev_t -EOF - -fi - -echo $ac_n "checking for ino_t""... $ac_c" 1>&6 -echo "configure:4438: checking for ino_t" >&5 -if eval "test \"`echo '$''{'ac_cv_type_ino_t'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -#if STDC_HEADERS -#include -#include -#endif -EOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - egrep "(^|[^a-zA-Z_0-9])ino_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then - rm -rf conftest* - ac_cv_type_ino_t=yes -else - rm -rf conftest* - ac_cv_type_ino_t=no -fi -rm -f conftest* - -fi -echo "$ac_t""$ac_cv_type_ino_t" 1>&6 -if test $ac_cv_type_ino_t = no; then - cat >> confdefs.h <<\EOF -#define ino_t unsigned long -EOF - -fi - -echo $ac_n "checking for nlink_t""... $ac_c" 1>&6 -echo "configure:4471: checking for nlink_t" >&5 -if eval "test \"`echo '$''{'ac_cv_type_nlink_t'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -#if STDC_HEADERS -#include -#include -#endif -EOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - egrep "(^|[^a-zA-Z_0-9])nlink_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then - rm -rf conftest* - ac_cv_type_nlink_t=yes -else - rm -rf conftest* - ac_cv_type_nlink_t=no -fi -rm -f conftest* - -fi -echo "$ac_t""$ac_cv_type_nlink_t" 1>&6 -if test $ac_cv_type_nlink_t = no; then - cat >> confdefs.h <<\EOF -#define nlink_t unsigned long -EOF - -fi - -echo $ac_n "checking for blksize_t""... $ac_c" 1>&6 -echo "configure:4504: checking for blksize_t" >&5 -if eval "test \"`echo '$''{'ac_cv_type_blksize_t'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -#if STDC_HEADERS -#include -#include -#endif -EOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - egrep "(^|[^a-zA-Z_0-9])blksize_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then - rm -rf conftest* - ac_cv_type_blksize_t=yes -else - rm -rf conftest* - ac_cv_type_blksize_t=no -fi -rm -f conftest* - -fi -echo "$ac_t""$ac_cv_type_blksize_t" 1>&6 -if test $ac_cv_type_blksize_t = no; then - cat >> confdefs.h <<\EOF -#define blksize_t long -EOF - -fi - -echo $ac_n "checking for blkcnt_t""... $ac_c" 1>&6 -echo "configure:4537: checking for blkcnt_t" >&5 -if eval "test \"`echo '$''{'ac_cv_type_blkcnt_t'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -#if STDC_HEADERS -#include -#include -#endif -EOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - egrep "(^|[^a-zA-Z_0-9])blkcnt_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then - rm -rf conftest* - ac_cv_type_blkcnt_t=yes -else - rm -rf conftest* - ac_cv_type_blkcnt_t=no -fi -rm -f conftest* - -fi -echo "$ac_t""$ac_cv_type_blkcnt_t" 1>&6 -if test $ac_cv_type_blkcnt_t = no; then - cat >> confdefs.h <<\EOF -#define blkcnt_t Intmax_t -EOF - -fi - -echo $ac_n "checking for clock_t""... $ac_c" 1>&6 -echo "configure:4570: checking for clock_t" >&5 -if eval "test \"`echo '$''{'ac_cv_type_clock_t'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -/* - * time.h is needed because of a bug in Next Step. - * Next Step needs time.h for clock_t - */ -#ifdef TIME_WITH_SYS_TIME -# ifndef _INCL_SYS_TIME_H -# include -# define _INCL_SYS_TIME_H -# endif -# ifndef _INCL_TIME_H -# include -# define _INCL_TIME_H -# endif -#else -#ifdef HAVE_SYS_TIME_H -# ifndef _INCL_SYS_TIME_H -# include -# define _INCL_SYS_TIME_H -# endif -#else -# ifndef _INCL_TIME_H -# include -# define _INCL_TIME_H -# endif -#endif -#endif -#ifdef HAVE_SYS_TIMES_H -#include -#endif - -int main() { -clock_t t; -; return 0; } -EOF -if { (eval echo configure:4613: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - ac_cv_type_clock_t=yes -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - ac_cv_type_clock_t=no -fi -rm -f conftest* -fi - -echo "$ac_t""$ac_cv_type_clock_t" 1>&6 -if test $ac_cv_type_clock_t = no; then - cat >> confdefs.h <<\EOF -#define clock_t long -EOF - -fi -echo $ac_n "checking for socklen_t""... $ac_c" 1>&6 -echo "configure:4633: checking for socklen_t" >&5 -if eval "test \"`echo '$''{'ac_cv_type_socklen_t'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -#if STDC_HEADERS -#include -#include -#endif -#include -EOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - egrep "(^|[^a-zA-Z_0-9])socklen_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then - rm -rf conftest* - ac_cv_type_socklen_t=yes -else - rm -rf conftest* - ac_cv_type_socklen_t=no -fi -rm -f conftest* - -fi -echo "$ac_t""$ac_cv_type_socklen_t" 1>&6 -if test $ac_cv_type_socklen_t = no; then - cat >> confdefs.h <<\EOF -#define socklen_t int -EOF - -fi -echo $ac_n "checking for greg_t""... $ac_c" 1>&6 -echo "configure:4666: checking for greg_t" >&5 -if eval "test \"`echo '$''{'ac_cv_have_type_greg_t'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -#if STDC_HEADERS -#include -#include -#endif -#include -EOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - egrep "(^|[^a-zA-Z_0-9])greg_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then - rm -rf conftest* - ac_cv_have_type_greg_t=yes -else - rm -rf conftest* - ac_cv_have_type_greg_t=no -fi -rm -f conftest* - -fi -echo "$ac_t""$ac_cv_have_type_greg_t" 1>&6 - ac_tr_type=HAVE_TYPE_`echo greg_t | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` -if test $ac_cv_have_type_greg_t = yes; then - cat >> confdefs.h <&6 -echo "configure:4702: checking for u_char" >&5 -if eval "test \"`echo '$''{'ac_cv_type_u_char'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -#if STDC_HEADERS -#include -#include -#endif -EOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - egrep "(^|[^a-zA-Z_0-9])u_char[^a-zA-Z_0-9]" >/dev/null 2>&1; then - rm -rf conftest* - ac_cv_type_u_char=yes -else - rm -rf conftest* - ac_cv_type_u_char=no -fi -rm -f conftest* - -fi -echo "$ac_t""$ac_cv_type_u_char" 1>&6 -if test $ac_cv_type_u_char = no; then - cat >> confdefs.h <<\EOF -#define u_char unsigned char -EOF - -fi - -echo $ac_n "checking for u_short""... $ac_c" 1>&6 -echo "configure:4735: checking for u_short" >&5 -if eval "test \"`echo '$''{'ac_cv_type_u_short'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -#if STDC_HEADERS -#include -#include -#endif -EOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - egrep "(^|[^a-zA-Z_0-9])u_short[^a-zA-Z_0-9]" >/dev/null 2>&1; then - rm -rf conftest* - ac_cv_type_u_short=yes -else - rm -rf conftest* - ac_cv_type_u_short=no -fi -rm -f conftest* - -fi -echo "$ac_t""$ac_cv_type_u_short" 1>&6 -if test $ac_cv_type_u_short = no; then - cat >> confdefs.h <<\EOF -#define u_short unsigned short -EOF - -fi - -echo $ac_n "checking for u_int""... $ac_c" 1>&6 -echo "configure:4768: checking for u_int" >&5 -if eval "test \"`echo '$''{'ac_cv_type_u_int'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -#if STDC_HEADERS -#include -#include -#endif -EOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - egrep "(^|[^a-zA-Z_0-9])u_int[^a-zA-Z_0-9]" >/dev/null 2>&1; then - rm -rf conftest* - ac_cv_type_u_int=yes -else - rm -rf conftest* - ac_cv_type_u_int=no -fi -rm -f conftest* - -fi -echo "$ac_t""$ac_cv_type_u_int" 1>&6 -if test $ac_cv_type_u_int = no; then - cat >> confdefs.h <<\EOF -#define u_int unsigned int -EOF - -fi - -echo $ac_n "checking for u_long""... $ac_c" 1>&6 -echo "configure:4801: checking for u_long" >&5 -if eval "test \"`echo '$''{'ac_cv_type_u_long'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -#if STDC_HEADERS -#include -#include -#endif -EOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - egrep "(^|[^a-zA-Z_0-9])u_long[^a-zA-Z_0-9]" >/dev/null 2>&1; then - rm -rf conftest* - ac_cv_type_u_long=yes -else - rm -rf conftest* - ac_cv_type_u_long=no -fi -rm -f conftest* - -fi -echo "$ac_t""$ac_cv_type_u_long" 1>&6 -if test $ac_cv_type_u_long = no; then - cat >> confdefs.h <<\EOF -#define u_long unsigned long -EOF - -fi - - -echo $ac_n "checking size of char""... $ac_c" 1>&6 -echo "configure:4835: checking size of char" >&5 -if eval "test \"`echo '$''{'ac_cv_sizeof_char'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - if test "$cross_compiling" = yes; then - { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } -else - cat > conftest.$ac_ext < -main() -{ - FILE *f=fopen("conftestval", "w"); - if (!f) exit(1); - fprintf(f, "%d\n", sizeof(char)); - exit(0); -} -EOF -if { (eval echo configure:4854: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest${ac_xexeext}; exit) 2>/dev/null -then - ac_cv_sizeof_char=`cat conftestval` -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -fr conftest* - ac_cv_sizeof_char=0 -fi -rm -fr conftest* -fi - -fi -echo "$ac_t""$ac_cv_sizeof_char" 1>&6 -cat >> confdefs.h <&6 -echo "configure:4874: checking size of short int" >&5 -if eval "test \"`echo '$''{'ac_cv_sizeof_short_int'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - if test "$cross_compiling" = yes; then - { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } -else - cat > conftest.$ac_ext < -main() -{ - FILE *f=fopen("conftestval", "w"); - if (!f) exit(1); - fprintf(f, "%d\n", sizeof(short int)); - exit(0); -} -EOF -if { (eval echo configure:4893: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest${ac_xexeext}; exit) 2>/dev/null -then - ac_cv_sizeof_short_int=`cat conftestval` -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -fr conftest* - ac_cv_sizeof_short_int=0 -fi -rm -fr conftest* -fi - -fi -echo "$ac_t""$ac_cv_sizeof_short_int" 1>&6 -cat >> confdefs.h <&6 -echo "configure:4913: checking size of int" >&5 -if eval "test \"`echo '$''{'ac_cv_sizeof_int'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - if test "$cross_compiling" = yes; then - { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } -else - cat > conftest.$ac_ext < -main() -{ - FILE *f=fopen("conftestval", "w"); - if (!f) exit(1); - fprintf(f, "%d\n", sizeof(int)); - exit(0); -} -EOF -if { (eval echo configure:4932: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest${ac_xexeext}; exit) 2>/dev/null -then - ac_cv_sizeof_int=`cat conftestval` -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -fr conftest* - ac_cv_sizeof_int=0 -fi -rm -fr conftest* -fi - -fi -echo "$ac_t""$ac_cv_sizeof_int" 1>&6 -cat >> confdefs.h <&6 -echo "configure:4952: checking size of long int" >&5 -if eval "test \"`echo '$''{'ac_cv_sizeof_long_int'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - if test "$cross_compiling" = yes; then - { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } -else - cat > conftest.$ac_ext < -main() -{ - FILE *f=fopen("conftestval", "w"); - if (!f) exit(1); - fprintf(f, "%d\n", sizeof(long int)); - exit(0); -} -EOF -if { (eval echo configure:4971: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest${ac_xexeext}; exit) 2>/dev/null -then - ac_cv_sizeof_long_int=`cat conftestval` -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -fr conftest* - ac_cv_sizeof_long_int=0 -fi -rm -fr conftest* -fi - -fi -echo "$ac_t""$ac_cv_sizeof_long_int" 1>&6 -cat >> confdefs.h <&6 -echo "configure:4991: checking size of long long" >&5 -if eval "test \"`echo '$''{'ac_cv_sizeof_long_long'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - if test "$cross_compiling" = yes; then - { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } -else - cat > conftest.$ac_ext < -main() -{ - FILE *f=fopen("conftestval", "w"); - if (!f) exit(1); - fprintf(f, "%d\n", sizeof(long long)); - exit(0); -} -EOF -if { (eval echo configure:5010: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest${ac_xexeext}; exit) 2>/dev/null -then - ac_cv_sizeof_long_long=`cat conftestval` -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -fr conftest* - ac_cv_sizeof_long_long=0 -fi -rm -fr conftest* -fi - -fi -echo "$ac_t""$ac_cv_sizeof_long_long" 1>&6 -cat >> confdefs.h <&6 -echo "configure:5030: checking size of __int64" >&5 -if eval "test \"`echo '$''{'ac_cv_sizeof___int64'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - if test "$cross_compiling" = yes; then - { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } -else - cat > conftest.$ac_ext < -main() -{ - FILE *f=fopen("conftestval", "w"); - if (!f) exit(1); - fprintf(f, "%d\n", sizeof(__int64)); - exit(0); -} -EOF -if { (eval echo configure:5049: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest${ac_xexeext}; exit) 2>/dev/null -then - ac_cv_sizeof___int64=`cat conftestval` -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -fr conftest* - ac_cv_sizeof___int64=0 -fi -rm -fr conftest* -fi - -fi -echo "$ac_t""$ac_cv_sizeof___int64" 1>&6 -cat >> confdefs.h <&6 -echo "configure:5069: checking size of char *" >&5 -if eval "test \"`echo '$''{'ac_cv_sizeof_char_p'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - if test "$cross_compiling" = yes; then - { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } -else - cat > conftest.$ac_ext < -main() -{ - FILE *f=fopen("conftestval", "w"); - if (!f) exit(1); - fprintf(f, "%d\n", sizeof(char *)); - exit(0); -} -EOF -if { (eval echo configure:5088: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest${ac_xexeext}; exit) 2>/dev/null -then - ac_cv_sizeof_char_p=`cat conftestval` -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -fr conftest* - ac_cv_sizeof_char_p=0 -fi -rm -fr conftest* -fi - -fi -echo "$ac_t""$ac_cv_sizeof_char_p" 1>&6 -cat >> confdefs.h <&6 -echo "configure:5109: checking size of unsigned char" >&5 -if eval "test \"`echo '$''{'ac_cv_sizeof_unsigned_char'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - if test "$cross_compiling" = yes; then - { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } -else - cat > conftest.$ac_ext < -main() -{ - FILE *f=fopen("conftestval", "w"); - if (!f) exit(1); - fprintf(f, "%d\n", sizeof(unsigned char)); - exit(0); -} -EOF -if { (eval echo configure:5128: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest${ac_xexeext}; exit) 2>/dev/null -then - ac_cv_sizeof_unsigned_char=`cat conftestval` -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -fr conftest* - ac_cv_sizeof_unsigned_char=0 -fi -rm -fr conftest* -fi - -fi -echo "$ac_t""$ac_cv_sizeof_unsigned_char" 1>&6 -cat >> confdefs.h <&6 -echo "configure:5148: checking size of unsigned short int" >&5 -if eval "test \"`echo '$''{'ac_cv_sizeof_unsigned_short_int'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - if test "$cross_compiling" = yes; then - { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } -else - cat > conftest.$ac_ext < -main() -{ - FILE *f=fopen("conftestval", "w"); - if (!f) exit(1); - fprintf(f, "%d\n", sizeof(unsigned short int)); - exit(0); -} -EOF -if { (eval echo configure:5167: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest${ac_xexeext}; exit) 2>/dev/null -then - ac_cv_sizeof_unsigned_short_int=`cat conftestval` -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -fr conftest* - ac_cv_sizeof_unsigned_short_int=0 -fi -rm -fr conftest* -fi - -fi -echo "$ac_t""$ac_cv_sizeof_unsigned_short_int" 1>&6 -cat >> confdefs.h <&6 -echo "configure:5187: checking size of unsigned int" >&5 -if eval "test \"`echo '$''{'ac_cv_sizeof_unsigned_int'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - if test "$cross_compiling" = yes; then - { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } -else - cat > conftest.$ac_ext < -main() -{ - FILE *f=fopen("conftestval", "w"); - if (!f) exit(1); - fprintf(f, "%d\n", sizeof(unsigned int)); - exit(0); -} -EOF -if { (eval echo configure:5206: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest${ac_xexeext}; exit) 2>/dev/null -then - ac_cv_sizeof_unsigned_int=`cat conftestval` -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -fr conftest* - ac_cv_sizeof_unsigned_int=0 -fi -rm -fr conftest* -fi - -fi -echo "$ac_t""$ac_cv_sizeof_unsigned_int" 1>&6 -cat >> confdefs.h <&6 -echo "configure:5226: checking size of unsigned long int" >&5 -if eval "test \"`echo '$''{'ac_cv_sizeof_unsigned_long_int'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - if test "$cross_compiling" = yes; then - { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } -else - cat > conftest.$ac_ext < -main() -{ - FILE *f=fopen("conftestval", "w"); - if (!f) exit(1); - fprintf(f, "%d\n", sizeof(unsigned long int)); - exit(0); -} -EOF -if { (eval echo configure:5245: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest${ac_xexeext}; exit) 2>/dev/null -then - ac_cv_sizeof_unsigned_long_int=`cat conftestval` -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -fr conftest* - ac_cv_sizeof_unsigned_long_int=0 -fi -rm -fr conftest* -fi - -fi -echo "$ac_t""$ac_cv_sizeof_unsigned_long_int" 1>&6 -cat >> confdefs.h <&6 -echo "configure:5265: checking size of unsigned long long" >&5 -if eval "test \"`echo '$''{'ac_cv_sizeof_unsigned_long_long'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - if test "$cross_compiling" = yes; then - { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } -else - cat > conftest.$ac_ext < -main() -{ - FILE *f=fopen("conftestval", "w"); - if (!f) exit(1); - fprintf(f, "%d\n", sizeof(unsigned long long)); - exit(0); -} -EOF -if { (eval echo configure:5284: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest${ac_xexeext}; exit) 2>/dev/null -then - ac_cv_sizeof_unsigned_long_long=`cat conftestval` -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -fr conftest* - ac_cv_sizeof_unsigned_long_long=0 -fi -rm -fr conftest* -fi - -fi -echo "$ac_t""$ac_cv_sizeof_unsigned_long_long" 1>&6 -cat >> confdefs.h <&6 -echo "configure:5304: checking size of unsigned __int64" >&5 -if eval "test \"`echo '$''{'ac_cv_sizeof_unsigned___int64'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - if test "$cross_compiling" = yes; then - { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } -else - cat > conftest.$ac_ext < -main() -{ - FILE *f=fopen("conftestval", "w"); - if (!f) exit(1); - fprintf(f, "%d\n", sizeof(unsigned __int64)); - exit(0); -} -EOF -if { (eval echo configure:5323: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest${ac_xexeext}; exit) 2>/dev/null -then - ac_cv_sizeof_unsigned___int64=`cat conftestval` -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -fr conftest* - ac_cv_sizeof_unsigned___int64=0 -fi -rm -fr conftest* -fi - -fi -echo "$ac_t""$ac_cv_sizeof_unsigned___int64" 1>&6 -cat >> confdefs.h <&6 -echo "configure:5343: checking size of unsigned char *" >&5 -if eval "test \"`echo '$''{'ac_cv_sizeof_unsigned_char_p'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - if test "$cross_compiling" = yes; then - { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } -else - cat > conftest.$ac_ext < -main() -{ - FILE *f=fopen("conftestval", "w"); - if (!f) exit(1); - fprintf(f, "%d\n", sizeof(unsigned char *)); - exit(0); -} -EOF -if { (eval echo configure:5362: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest${ac_xexeext}; exit) 2>/dev/null -then - ac_cv_sizeof_unsigned_char_p=`cat conftestval` -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -fr conftest* - ac_cv_sizeof_unsigned_char_p=0 -fi -rm -fr conftest* -fi - -fi -echo "$ac_t""$ac_cv_sizeof_unsigned_char_p" 1>&6 -cat >> confdefs.h <&6 -echo "configure:5383: checking if char is unsigned" >&5 -if eval "test \"`echo '$''{'ac_cv_type_char_unsigned'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - if test "$cross_compiling" = yes; then - ac_cv_type_char_unsigned=no -else - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest${ac_xexeext}; exit) 2>/dev/null -then - ac_cv_type_char_unsigned=yes -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -fr conftest* - ac_cv_type_char_unsigned=no -fi -rm -fr conftest* -fi - -fi - -echo "$ac_t""$ac_cv_type_char_unsigned" 1>&6 -if test $ac_cv_type_char_unsigned = yes; then - cat >> confdefs.h <<\EOF -#define CHAR_IS_UNSIGNED 1 -EOF - -fi -echo $ac_n "checking if va_list is an array""... $ac_c" 1>&6 -echo "configure:5424: checking if va_list is an array" >&5 -if eval "test \"`echo '$''{'ac_cv_type_va_list_array'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -#else -# include -#endif - -int main() { - -va_list a, b; - -a = b; -; return 0; } -EOF -if { (eval echo configure:5445: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - ac_cv_type_va_list_array=no -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - ac_cv_type_va_list_array=yes -fi -rm -f conftest* -fi - -echo "$ac_t""$ac_cv_type_va_list_array" 1>&6 -if test $ac_cv_type_va_list_array = yes; then - cat >> confdefs.h <<\EOF -#define VA_LIST_IS_ARRAY 1 -EOF - -fi -echo $ac_n "checking for struct timeval in time.h or sys/time.h""... $ac_c" 1>&6 -echo "configure:5465: checking for struct timeval in time.h or sys/time.h" >&5 -if eval "test \"`echo '$''{'ac_cv_struct_timeval'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -#ifdef TIME_WITH_SYS_TIME_H -# include -# include -#else -#ifdef HAVE_SYS_TIME_H -# include -#else -# include -#endif -#endif -int main() { -struct timeval tv; -; return 0; } -EOF -if { (eval echo configure:5488: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - ac_cv_struct_timeval=yes -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - ac_cv_struct_timeval=no -fi -rm -f conftest* -fi - -echo "$ac_t""$ac_cv_struct_timeval" 1>&6 -if test $ac_cv_struct_timeval = yes; then - cat >> confdefs.h <<\EOF -#define HAVE_STRUCT_TIMEVAL 1 -EOF - -fi -echo $ac_n "checking for struct timezone in time.h or sys/time.h""... $ac_c" 1>&6 -echo "configure:5508: checking for struct timezone in time.h or sys/time.h" >&5 -if eval "test \"`echo '$''{'ac_cv_struct_timezone'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -#ifdef TIME_WITH_SYS_TIME_H -# include -# include -#else -#ifdef HAVE_SYS_TIME_H -# include -#else -# include -#endif -#endif -int main() { -struct timezone tz; -; return 0; } -EOF -if { (eval echo configure:5531: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - ac_cv_struct_timezone=yes -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - ac_cv_struct_timezone=no -fi -rm -f conftest* -fi - -echo "$ac_t""$ac_cv_struct_timezone" 1>&6 -if test $ac_cv_struct_timezone = yes; then - cat >> confdefs.h <<\EOF -#define HAVE_STRUCT_TIMEZONE 1 -EOF - -fi -echo $ac_n "checking if struct mtget contains mt_type""... $ac_c" 1>&6 -echo "configure:5551: checking if struct mtget contains mt_type" >&5 -if eval "test \"`echo '$''{'ac_cv_struct_mtget_type'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -#include -int main() { -struct mtget t; t.mt_type = 0; -; return 0; } -EOF -if { (eval echo configure:5564: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - ac_cv_struct_mtget_type=yes -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - ac_cv_struct_mtget_type=no -fi -rm -f conftest* -fi - -echo "$ac_t""$ac_cv_struct_mtget_type" 1>&6 -if test $ac_cv_struct_mtget_type = yes; then - cat >> confdefs.h <<\EOF -#define HAVE_MTGET_TYPE 1 -EOF - -fi -echo $ac_n "checking if struct mtget contains mt_model""... $ac_c" 1>&6 -echo "configure:5584: checking if struct mtget contains mt_model" >&5 -if eval "test \"`echo '$''{'ac_cv_struct_mtget_model'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -#include -int main() { -struct mtget t; t.mt_model = 0; -; return 0; } -EOF -if { (eval echo configure:5597: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - ac_cv_struct_mtget_model=yes -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - ac_cv_struct_mtget_model=no -fi -rm -f conftest* -fi - -echo "$ac_t""$ac_cv_struct_mtget_model" 1>&6 -if test $ac_cv_struct_mtget_model = yes; then - cat >> confdefs.h <<\EOF -#define HAVE_MTGET_MODEL 1 -EOF - -fi -echo $ac_n "checking if struct mtget contains mt_dsreg""... $ac_c" 1>&6 -echo "configure:5617: checking if struct mtget contains mt_dsreg" >&5 -if eval "test \"`echo '$''{'ac_cv_struct_mtget_dsreg'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -#include -int main() { -struct mtget t; t.mt_dsreg = 0; -; return 0; } -EOF -if { (eval echo configure:5630: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - ac_cv_struct_mtget_dsreg=yes -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - ac_cv_struct_mtget_dsreg=no -fi -rm -f conftest* -fi - -echo "$ac_t""$ac_cv_struct_mtget_dsreg" 1>&6 -if test $ac_cv_struct_mtget_dsreg = yes; then - cat >> confdefs.h <<\EOF -#define HAVE_MTGET_DSREG 1 -EOF - -fi -echo $ac_n "checking if struct mtget contains mt_dsreg1""... $ac_c" 1>&6 -echo "configure:5650: checking if struct mtget contains mt_dsreg1" >&5 -if eval "test \"`echo '$''{'ac_cv_struct_mtget_dsreg1'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -#include -int main() { -struct mtget t; t.mt_dsreg1 = 0; -; return 0; } -EOF -if { (eval echo configure:5663: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - ac_cv_struct_mtget_dsreg1=yes -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - ac_cv_struct_mtget_dsreg1=no -fi -rm -f conftest* -fi - -echo "$ac_t""$ac_cv_struct_mtget_dsreg1" 1>&6 -if test $ac_cv_struct_mtget_dsreg1 = yes; then - cat >> confdefs.h <<\EOF -#define HAVE_MTGET_DSREG1 1 -EOF - -fi -echo $ac_n "checking if struct mtget contains mt_dsreg2""... $ac_c" 1>&6 -echo "configure:5683: checking if struct mtget contains mt_dsreg2" >&5 -if eval "test \"`echo '$''{'ac_cv_struct_mtget_dsreg2'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -#include -int main() { -struct mtget t; t.mt_dsreg2 = 0; -; return 0; } -EOF -if { (eval echo configure:5696: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - ac_cv_struct_mtget_dsreg2=yes -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - ac_cv_struct_mtget_dsreg2=no -fi -rm -f conftest* -fi - -echo "$ac_t""$ac_cv_struct_mtget_dsreg2" 1>&6 -if test $ac_cv_struct_mtget_dsreg2 = yes; then - cat >> confdefs.h <<\EOF -#define HAVE_MTGET_DSREG2 1 -EOF - -fi -echo $ac_n "checking if struct mtget contains mt_gstat""... $ac_c" 1>&6 -echo "configure:5716: checking if struct mtget contains mt_gstat" >&5 -if eval "test \"`echo '$''{'ac_cv_struct_mtget_gstat'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -#include -int main() { -struct mtget t; t.mt_gstat = 0; -; return 0; } -EOF -if { (eval echo configure:5729: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - ac_cv_struct_mtget_gstat=yes -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - ac_cv_struct_mtget_gstat=no -fi -rm -f conftest* -fi - -echo "$ac_t""$ac_cv_struct_mtget_gstat" 1>&6 -if test $ac_cv_struct_mtget_gstat = yes; then - cat >> confdefs.h <<\EOF -#define HAVE_MTGET_GSTAT 1 -EOF - -fi -echo $ac_n "checking if struct mtget contains mt_erreg""... $ac_c" 1>&6 -echo "configure:5749: checking if struct mtget contains mt_erreg" >&5 -if eval "test \"`echo '$''{'ac_cv_struct_mtget_erreg'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -#include -int main() { -struct mtget t; t.mt_erreg = 0; -; return 0; } -EOF -if { (eval echo configure:5762: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - ac_cv_struct_mtget_erreg=yes -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - ac_cv_struct_mtget_erreg=no -fi -rm -f conftest* -fi - -echo "$ac_t""$ac_cv_struct_mtget_erreg" 1>&6 -if test $ac_cv_struct_mtget_erreg = yes; then - cat >> confdefs.h <<\EOF -#define HAVE_MTGET_ERREG 1 -EOF - -fi -echo $ac_n "checking if struct mtget contains mt_resid""... $ac_c" 1>&6 -echo "configure:5782: checking if struct mtget contains mt_resid" >&5 -if eval "test \"`echo '$''{'ac_cv_struct_mtget_resid'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -#include -int main() { -struct mtget t; t.mt_resid = 0; -; return 0; } -EOF -if { (eval echo configure:5795: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - ac_cv_struct_mtget_resid=yes -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - ac_cv_struct_mtget_resid=no -fi -rm -f conftest* -fi - -echo "$ac_t""$ac_cv_struct_mtget_resid" 1>&6 -if test $ac_cv_struct_mtget_resid = yes; then - cat >> confdefs.h <<\EOF -#define HAVE_MTGET_RESID 1 -EOF - -fi -echo $ac_n "checking if struct mtget contains mt_fileno""... $ac_c" 1>&6 -echo "configure:5815: checking if struct mtget contains mt_fileno" >&5 -if eval "test \"`echo '$''{'ac_cv_struct_mtget_fileno'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -#include -int main() { -struct mtget t; t.mt_fileno = 0; -; return 0; } -EOF -if { (eval echo configure:5828: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - ac_cv_struct_mtget_fileno=yes -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - ac_cv_struct_mtget_fileno=no -fi -rm -f conftest* -fi - -echo "$ac_t""$ac_cv_struct_mtget_fileno" 1>&6 -if test $ac_cv_struct_mtget_fileno = yes; then - cat >> confdefs.h <<\EOF -#define HAVE_MTGET_FILENO 1 -EOF - -fi -echo $ac_n "checking if struct mtget contains mt_blkno""... $ac_c" 1>&6 -echo "configure:5848: checking if struct mtget contains mt_blkno" >&5 -if eval "test \"`echo '$''{'ac_cv_struct_mtget_blkno'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -#include -int main() { -struct mtget t; t.mt_blkno = 0; -; return 0; } -EOF -if { (eval echo configure:5861: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - ac_cv_struct_mtget_blkno=yes -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - ac_cv_struct_mtget_blkno=no -fi -rm -f conftest* -fi - -echo "$ac_t""$ac_cv_struct_mtget_blkno" 1>&6 -if test $ac_cv_struct_mtget_blkno = yes; then - cat >> confdefs.h <<\EOF -#define HAVE_MTGET_BLKNO 1 -EOF - -fi -echo $ac_n "checking if struct mtget contains mt_flags""... $ac_c" 1>&6 -echo "configure:5881: checking if struct mtget contains mt_flags" >&5 -if eval "test \"`echo '$''{'ac_cv_struct_mtget_flags'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -#include -int main() { -struct mtget t; t.mt_flags = 0; -; return 0; } -EOF -if { (eval echo configure:5894: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - ac_cv_struct_mtget_flags=yes -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - ac_cv_struct_mtget_flags=no -fi -rm -f conftest* -fi - -echo "$ac_t""$ac_cv_struct_mtget_flags" 1>&6 -if test $ac_cv_struct_mtget_flags = yes; then - cat >> confdefs.h <<\EOF -#define HAVE_MTGET_FLAGS 1 -EOF - -fi -echo $ac_n "checking if struct mtget contains mt_bf""... $ac_c" 1>&6 -echo "configure:5914: checking if struct mtget contains mt_bf" >&5 -if eval "test \"`echo '$''{'ac_cv_struct_mtget_bf'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -#include -int main() { -struct mtget t; t.mt_bf = 0; -; return 0; } -EOF -if { (eval echo configure:5927: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - ac_cv_struct_mtget_bf=yes -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - ac_cv_struct_mtget_bf=no -fi -rm -f conftest* -fi - -echo "$ac_t""$ac_cv_struct_mtget_bf" 1>&6 -if test $ac_cv_struct_mtget_bf = yes; then - cat >> confdefs.h <<\EOF -#define HAVE_MTGET_BF 1 -EOF - -fi -echo $ac_n "checking if struct rusage is declared in sys/resource.h""... $ac_c" 1>&6 -echo "configure:5947: checking if struct rusage is declared in sys/resource.h" >&5 -if eval "test \"`echo '$''{'ac_cv_struct_rusage'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -#include -int main() { -struct rusage r; -; return 0; } -EOF -if { (eval echo configure:5960: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - ac_cv_struct_rusage=yes -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - ac_cv_struct_rusage=no -fi -rm -f conftest* -fi - -echo "$ac_t""$ac_cv_struct_rusage" 1>&6 -if test $ac_cv_struct_rusage = yes; then - cat >> confdefs.h <<\EOF -#define HAVE_STRUCT_RUSAGE 1 -EOF - -fi -echo $ac_n "checking if struct siginfo contains si_utime""... $ac_c" 1>&6 -echo "configure:5980: checking if struct siginfo contains si_utime" >&5 -if eval "test \"`echo '$''{'ac_cv_struct_si_utime'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -#include -int main() { -struct siginfo si; si.si_utime = 0; -; return 0; } -EOF -if { (eval echo configure:5993: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - ac_cv_struct_si_utime=yes -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - ac_cv_struct_si_utime=no -fi -rm -f conftest* -fi - -echo "$ac_t""$ac_cv_struct_si_utime" 1>&6 -if test $ac_cv_struct_si_utime = yes; then - cat >> confdefs.h <<\EOF -#define HAVE_SI_UTIME 1 -EOF - -fi -echo $ac_n "checking if struct sockaddr_storage is declared in socket.h""... $ac_c" 1>&6 -echo "configure:6013: checking if struct sockaddr_storage is declared in socket.h" >&5 -if eval "test \"`echo '$''{'ac_cv_struct_sockaddr_storage'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -int main() { -struct sockaddr_storage ss; ss.ss_family = 0; -; return 0; } -EOF -if { (eval echo configure:6025: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - ac_cv_struct_sockaddr_storage=yes -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - ac_cv_struct_sockaddr_storage=no -fi -rm -f conftest* -fi - -echo "$ac_t""$ac_cv_struct_sockaddr_storage" 1>&6 -if test $ac_cv_struct_sockaddr_storage = yes; then - cat >> confdefs.h <<\EOF -#define HAVE_SOCKADDR_STORAGE 1 -EOF - -fi -echo $ac_n "checking if an illegal declaration for union semun in sys/sem.h exists""... $ac_c" 1>&6 -echo "configure:6045: checking if an illegal declaration for union semun in sys/sem.h exists" >&5 -if eval "test \"`echo '$''{'ac_cv_struct_union_semun'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -#include -#include -int main() { -union semun s; -; return 0; } -EOF -if { (eval echo configure:6059: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - ac_cv_struct_union_semun=yes -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - ac_cv_struct_union_semun=no -fi -rm -f conftest* -fi - -echo "$ac_t""$ac_cv_struct_union_semun" 1>&6 -if test $ac_cv_struct_union_semun = yes; then - cat >> confdefs.h <<\EOF -#define HAVE_UNION_SEMUN 1 -EOF - -fi -echo $ac_n "checking if union wait is declared in wait.h or sys/wait.h""... $ac_c" 1>&6 -echo "configure:6079: checking if union wait is declared in wait.h or sys/wait.h" >&5 -if eval "test \"`echo '$''{'ac_cv_struct_union_wait'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -#if defined(HAVE_WAIT_H) -# include -#else -#include -#endif -int main() { -union wait w; -; return 0; } -EOF -if { (eval echo configure:6096: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - ac_cv_struct_union_wait=yes -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - ac_cv_struct_union_wait=no -fi -rm -f conftest* -fi - -echo "$ac_t""$ac_cv_struct_union_wait" 1>&6 -if test $ac_cv_struct_union_wait = yes; then - cat >> confdefs.h <<\EOF -#define HAVE_UNION_WAIT 1 -EOF - -fi -echo $ac_n "checking if struct stat contains st_spare1""... $ac_c" 1>&6 -echo "configure:6116: checking if struct stat contains st_spare1" >&5 -if eval "test \"`echo '$''{'ac_cv_struct_st_spare1'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -#include -int main() { -struct stat s; s.st_spare1 = 0; -; return 0; } -EOF -if { (eval echo configure:6129: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - ac_cv_struct_st_spare1=yes -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - ac_cv_struct_st_spare1=no -fi -rm -f conftest* -fi - -echo "$ac_t""$ac_cv_struct_st_spare1" 1>&6 -if test $ac_cv_struct_st_spare1 = yes; then - cat >> confdefs.h <<\EOF -#define HAVE_ST_SPARE1 1 -EOF - -fi -echo $ac_n "checking if struct stat contains st_atimensec""... $ac_c" 1>&6 -echo "configure:6149: checking if struct stat contains st_atimensec" >&5 -if eval "test \"`echo '$''{'ac_cv_struct_st_atimensec'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -#include -int main() { -struct stat s; s.st_atimensec = 0; -; return 0; } -EOF -if { (eval echo configure:6162: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - ac_cv_struct_st_atimensec=yes -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - ac_cv_struct_st_atimensec=no -fi -rm -f conftest* -fi - -echo "$ac_t""$ac_cv_struct_st_atimensec" 1>&6 -if test $ac_cv_struct_st_atimensec = yes; then - cat >> confdefs.h <<\EOF -#define HAVE_ST_ATIMENSEC 1 -EOF - -fi -echo $ac_n "checking if struct stat contains st_atim.tv_nsec""... $ac_c" 1>&6 -echo "configure:6182: checking if struct stat contains st_atim.tv_nsec" >&5 -if eval "test \"`echo '$''{'ac_cv_struct_st_nsec'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -#include -int main() { -struct stat s; s.st_atim.tv_nsec = 0; -; return 0; } -EOF -if { (eval echo configure:6195: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - ac_cv_struct_st_nsec=yes -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - ac_cv_struct_st_nsec=no -fi -rm -f conftest* -fi - -echo "$ac_t""$ac_cv_struct_st_nsec" 1>&6 -if test $ac_cv_struct_st_nsec = yes; then - cat >> confdefs.h <<\EOF -#define HAVE_ST_NSEC 1 -EOF - -fi -echo $ac_n "checking if struct stat contains st_atim.st__tim.tv_nsec""... $ac_c" 1>&6 -echo "configure:6215: checking if struct stat contains st_atim.st__tim.tv_nsec" >&5 -if eval "test \"`echo '$''{'ac_cv_struct_st__tim'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -#include -int main() { -struct stat s; s.st_atim.st__tim.tv_nsec = 0; -; return 0; } -EOF -if { (eval echo configure:6228: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - ac_cv_struct_st__tim=yes -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - ac_cv_struct_st__tim=no -fi -rm -f conftest* -fi - -echo "$ac_t""$ac_cv_struct_st__tim" 1>&6 -if test $ac_cv_struct_st__tim = yes; then - cat >> confdefs.h <<\EOF -#define HAVE_ST__TIM 1 -EOF - -fi -echo $ac_n "checking if struct stat contains st_atimespec.tv_nsec""... $ac_c" 1>&6 -echo "configure:6248: checking if struct stat contains st_atimespec.tv_nsec" >&5 -if eval "test \"`echo '$''{'ac_cv_struct_st_atimespec'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -#include -int main() { -struct stat s; s.st_atimespec.tv_nsec = 0; -; return 0; } -EOF -if { (eval echo configure:6261: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - ac_cv_struct_st_atimespec=yes -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - ac_cv_struct_st_atimespec=no -fi -rm -f conftest* -fi - -echo "$ac_t""$ac_cv_struct_st_atimespec" 1>&6 -if test $ac_cv_struct_st_atimespec = yes; then - cat >> confdefs.h <<\EOF -#define HAVE_ST_ATIMESPEC 1 -EOF - -fi -echo $ac_n "checking for st_blksize in struct stat""... $ac_c" 1>&6 -echo "configure:6281: checking for st_blksize in struct stat" >&5 -if eval "test \"`echo '$''{'ac_cv_struct_st_blksize'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -#include -int main() { -struct stat s; s.st_blksize; -; return 0; } -EOF -if { (eval echo configure:6294: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - ac_cv_struct_st_blksize=yes -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - ac_cv_struct_st_blksize=no -fi -rm -f conftest* -fi - -echo "$ac_t""$ac_cv_struct_st_blksize" 1>&6 -if test $ac_cv_struct_st_blksize = yes; then - cat >> confdefs.h <<\EOF -#define HAVE_ST_BLKSIZE 1 -EOF - -fi - -echo $ac_n "checking for st_blocks in struct stat""... $ac_c" 1>&6 -echo "configure:6315: checking for st_blocks in struct stat" >&5 -if eval "test \"`echo '$''{'ac_cv_struct_st_blocks'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -#include -int main() { -struct stat s; s.st_blocks; -; return 0; } -EOF -if { (eval echo configure:6328: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - ac_cv_struct_st_blocks=yes -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - ac_cv_struct_st_blocks=no -fi -rm -f conftest* -fi - -echo "$ac_t""$ac_cv_struct_st_blocks" 1>&6 -if test $ac_cv_struct_st_blocks = yes; then - cat >> confdefs.h <<\EOF -#define HAVE_ST_BLOCKS 1 -EOF - -else - LIBOBJS="$LIBOBJS fileblocks.${ac_objext}" -fi - -echo $ac_n "checking if struct stat contains st_fstype""... $ac_c" 1>&6 -echo "configure:6351: checking if struct stat contains st_fstype" >&5 -if eval "test \"`echo '$''{'ac_cv_struct_st_fstype'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -#include -int main() { -struct stat s; s.st_fstype[0] = 0; -; return 0; } -EOF -if { (eval echo configure:6364: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - ac_cv_struct_st_fstype=yes -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - ac_cv_struct_st_fstype=no -fi -rm -f conftest* -fi - -echo "$ac_t""$ac_cv_struct_st_fstype" 1>&6 -if test $ac_cv_struct_st_fstype = yes; then - cat >> confdefs.h <<\EOF -#define HAVE_ST_FSTYPE 1 -EOF - -fi -echo $ac_n "checking if struct stat contains st_aclcnt""... $ac_c" 1>&6 -echo "configure:6384: checking if struct stat contains st_aclcnt" >&5 -if eval "test \"`echo '$''{'ac_cv_struct_st_aclcnt'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -#include -int main() { -struct stat s; s.st_aclcnt = 0; -; return 0; } -EOF -if { (eval echo configure:6397: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - ac_cv_struct_st_aclcnt=yes -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - ac_cv_struct_st_aclcnt=no -fi -rm -f conftest* -fi - -echo "$ac_t""$ac_cv_struct_st_aclcnt" 1>&6 -if test $ac_cv_struct_st_aclcnt = yes; then - cat >> confdefs.h <<\EOF -#define HAVE_ST_ACLCNT 1 -EOF - -fi -echo $ac_n "checking for st_rdev in struct stat""... $ac_c" 1>&6 -echo "configure:6417: checking for st_rdev in struct stat" >&5 -if eval "test \"`echo '$''{'ac_cv_struct_st_rdev'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -#include -int main() { -struct stat s; s.st_rdev; -; return 0; } -EOF -if { (eval echo configure:6430: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - ac_cv_struct_st_rdev=yes -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - ac_cv_struct_st_rdev=no -fi -rm -f conftest* -fi - -echo "$ac_t""$ac_cv_struct_st_rdev" 1>&6 -if test $ac_cv_struct_st_rdev = yes; then - cat >> confdefs.h <<\EOF -#define HAVE_ST_RDEV 1 -EOF - -fi - -echo $ac_n "checking if struct stat contains st_flags""... $ac_c" 1>&6 -echo "configure:6451: checking if struct stat contains st_flags" >&5 -if eval "test \"`echo '$''{'ac_cv_struct_st_flags'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -#include -int main() { -struct stat s; s.st_flags = 0; -; return 0; } -EOF -if { (eval echo configure:6464: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - ac_cv_struct_st_flags=yes -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - ac_cv_struct_st_flags=no -fi -rm -f conftest* -fi - -echo "$ac_t""$ac_cv_struct_st_flags" 1>&6 -if test $ac_cv_struct_st_flags = yes; then - cat >> confdefs.h <<\EOF -#define HAVE_ST_FLAGS 1 -EOF - -fi -echo $ac_n "checking if struct dirent contains d_ino""... $ac_c" 1>&6 -echo "configure:6484: checking if struct dirent contains d_ino" >&5 -if eval "test \"`echo '$''{'ac_cv_struct_dirent_d_ino'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -#endif -#ifdef HAVE_SYS_STAT_H -# include -#endif -# ifdef HAVE_DIRENT_H /* This a POSIX compliant system */ -# include -# define _FOUND_DIR_ -# else /* This is a Pre POSIX system */ - -# define dirent direct - -# if defined(HAVE_SYS_DIR_H) -# include -# define _FOUND_DIR_ -# endif - -# if defined(HAVE_NDIR_H) && !defined(_FOUND_DIR_) -# include -# define _FOUND_DIR_ -# endif - -# if defined(HAVE_SYS_NDIR_H) && !defined(_FOUND_DIR_) -# include -# define _FOUND_DIR_ -# endif -# endif /* HAVE_DIRENT_H */ - -int main() { -struct dirent d; d.d_ino = 0; -; return 0; } -EOF -if { (eval echo configure:6528: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - ac_cv_struct_dirent_d_ino=yes -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - ac_cv_struct_dirent_d_ino=no -fi -rm -f conftest* -fi - -echo "$ac_t""$ac_cv_struct_dirent_d_ino" 1>&6 -if test $ac_cv_struct_dirent_d_ino = yes; then - cat >> confdefs.h <<\EOF -#define HAVE_DIRENT_D_INO 1 -EOF - -fi -echo $ac_n "checking if DIR * contains dd_fd""... $ac_c" 1>&6 -echo "configure:6548: checking if DIR * contains dd_fd" >&5 -if eval "test \"`echo '$''{'ac_cv_struct_dir_dd_fd'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -int main() { -DIR d; d.dd_fd = 0; -; return 0; } -EOF -if { (eval echo configure:6560: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - ac_cv_struct_dir_dd_fd=yes -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - ac_cv_struct_dir_dd_fd=no -fi -rm -f conftest* -fi - -echo "$ac_t""$ac_cv_struct_dir_dd_fd" 1>&6 -if test $ac_cv_struct_dir_dd_fd = yes; then - cat >> confdefs.h <<\EOF -#define HAVE_DIR_DD_FD 1 -EOF - -fi -echo $ac_n "checking if struct utsname contains processor""... $ac_c" 1>&6 -echo "configure:6580: checking if struct utsname contains processor" >&5 -if eval "test \"`echo '$''{'ac_cv_struct_utsname_processor'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -int main() { -struct utsname u; u.processor[0] = 0; -; return 0; } -EOF -if { (eval echo configure:6592: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - ac_cv_struct_utsname_processor=yes -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - ac_cv_struct_utsname_processor=no -fi -rm -f conftest* -fi - -echo "$ac_t""$ac_cv_struct_utsname_processor" 1>&6 -if test $ac_cv_struct_utsname_processor = yes; then - cat >> confdefs.h <<\EOF -#define HAVE_UTSNAME_PROCESSOR 1 -EOF - -fi -echo $ac_n "checking if struct utsname contains sysname_host""... $ac_c" 1>&6 -echo "configure:6612: checking if struct utsname contains sysname_host" >&5 -if eval "test \"`echo '$''{'ac_cv_struct_utsname_sysname_host'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -int main() { -struct utsname u; u.sysname_host[0] = 0; -; return 0; } -EOF -if { (eval echo configure:6624: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - ac_cv_struct_utsname_sysname_host=yes -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - ac_cv_struct_utsname_sysname_host=no -fi -rm -f conftest* -fi - -echo "$ac_t""$ac_cv_struct_utsname_sysname_host" 1>&6 -if test $ac_cv_struct_utsname_sysname_host = yes; then - cat >> confdefs.h <<\EOF -#define HAVE_UTSNAME_SYSNAME_HOST 1 -EOF - -fi -echo $ac_n "checking if struct utsname contains release_host""... $ac_c" 1>&6 -echo "configure:6644: checking if struct utsname contains release_host" >&5 -if eval "test \"`echo '$''{'ac_cv_struct_utsname_release_host'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -int main() { -struct utsname u; u.release_host[0] = 0; -; return 0; } -EOF -if { (eval echo configure:6656: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - ac_cv_struct_utsname_release_host=yes -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - ac_cv_struct_utsname_release_host=no -fi -rm -f conftest* -fi - -echo "$ac_t""$ac_cv_struct_utsname_release_host" 1>&6 -if test $ac_cv_struct_utsname_release_host = yes; then - cat >> confdefs.h <<\EOF -#define HAVE_UTSNAME_RELEASE_HOST 1 -EOF - -fi -echo $ac_n "checking if struct utsname contains version_host""... $ac_c" 1>&6 -echo "configure:6676: checking if struct utsname contains version_host" >&5 -if eval "test \"`echo '$''{'ac_cv_struct_utsname_version_host'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -int main() { -struct utsname u; u.version_host[0] = 0; -; return 0; } -EOF -if { (eval echo configure:6688: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - ac_cv_struct_utsname_version_host=yes -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - ac_cv_struct_utsname_version_host=no -fi -rm -f conftest* -fi - -echo "$ac_t""$ac_cv_struct_utsname_version_host" 1>&6 -if test $ac_cv_struct_utsname_version_host = yes; then - cat >> confdefs.h <<\EOF -#define HAVE_UTSNAME_VERSION_HOST 1 -EOF - -fi - -echo $ac_n "checking if stat is declared""... $ac_c" 1>&6 -echo "configure:6709: checking if stat is declared" >&5 -if eval "test \"`echo '$''{'ac_cv_have_decl_stat'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -#include -int main() { - char *p = (char *) stat; -; return 0; } -EOF -if { (eval echo configure:6723: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - ac_cv_have_decl_stat=yes -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - ac_cv_have_decl_stat=no -fi -rm -f conftest* -fi - -echo "$ac_t""$ac_cv_have_decl_stat" 1>&6 - ac_tr_decl=HAVE_DECL_`echo stat | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` -if test $ac_cv_have_decl_stat = yes; then - cat >> confdefs.h <&6 -echo "configure:6744: checking if lstat is declared" >&5 -if eval "test \"`echo '$''{'ac_cv_have_decl_lstat'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -#include -int main() { - char *p = (char *) lstat; -; return 0; } -EOF -if { (eval echo configure:6758: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - ac_cv_have_decl_lstat=yes -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - ac_cv_have_decl_lstat=no -fi -rm -f conftest* -fi - -echo "$ac_t""$ac_cv_have_decl_lstat" 1>&6 - ac_tr_decl=HAVE_DECL_`echo lstat | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` -if test $ac_cv_have_decl_lstat = yes; then - cat >> confdefs.h <&6 -echo "configure:6780: checking for wait3 that fills in rusage" >&5 -if eval "test \"`echo '$''{'ac_cv_func_wait3_rusage'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - if test "$cross_compiling" = yes; then - ac_cv_func_wait3_rusage=no -else - cat > conftest.$ac_ext < -#include -#include -#include -/* HP-UX has wait3 but does not fill in rusage at all. */ -main() { - struct rusage r; - int i; - /* Use a field that we can force nonzero -- - voluntary context switches. - For systems like NeXT and OSF/1 that don't set it, - also use the system CPU time. And page faults (I/O) for Linux. */ - r.ru_nvcsw = 0; - r.ru_utime.tv_sec = 0; - r.ru_utime.tv_usec = 0; - r.ru_stime.tv_sec = 0; - r.ru_stime.tv_usec = 0; - r.ru_majflt = r.ru_minflt = 0; - switch (fork()) { - case 0: /* Child. */ - sleep(1); /* Give up the CPU. */ - for (i=200000; --i > 0;) getpid(); /* Use up some CPU time */ - _exit(0); - case -1: _exit(0); /* What can we do? */ - default: /* Parent. */ - wait3(&i, 0, &r); - sleep(2); /* Avoid "text file busy" from rm on fast HP-UX machines. */ - exit(r.ru_nvcsw == 0 && r.ru_majflt == 0 && r.ru_minflt == 0 - && r.ru_utime.tv_sec == 0 && r.ru_utime.tv_usec == 0 - && r.ru_stime.tv_sec == 0 && r.ru_stime.tv_usec == 0); - } -} -EOF -if { (eval echo configure:6823: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest${ac_xexeext}; exit) 2>/dev/null -then - ac_cv_func_wait3_rusage=yes -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -fr conftest* - ac_cv_func_wait3_rusage=no -fi -rm -fr conftest* -fi - -fi - -echo "$ac_t""$ac_cv_func_wait3_rusage" 1>&6 -if test $ac_cv_func_wait3_rusage = yes; then - cat >> confdefs.h <<\EOF -#define HAVE_WAIT3 1 -EOF - -fi - -echo $ac_n "checking for mlock""... $ac_c" 1>&6 -echo "configure:6846: checking for mlock" >&5 -if eval "test \"`echo '$''{'ac_cv_func_mlock'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - if test "$cross_compiling" = yes; then - { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } -else - cat > conftest.$ac_ext < -#include -#ifndef HAVE_ERRNO_DEF -extern int errno; -#endif - -main() -{ - if (mlock(0, 0) < 0) { - if (errno == EINVAL || errno == ENOMEM || - errno == EPERM || errno == EACCES) - exit(0); - exit(-1); - } - exit(0); -} -EOF -if { (eval echo configure:6874: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest${ac_xexeext}; exit) 2>/dev/null -then - ac_cv_func_mlock=yes -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -fr conftest* - ac_cv_func_mlock=no -fi -rm -fr conftest* -fi - -fi - -echo "$ac_t""$ac_cv_func_mlock" 1>&6 -if test $ac_cv_func_mlock = yes; then - cat >> confdefs.h <<\EOF -#define HAVE_MLOCK 1 -EOF - -fi -echo $ac_n "checking for mlockall""... $ac_c" 1>&6 -echo "configure:6896: checking for mlockall" >&5 -if eval "test \"`echo '$''{'ac_cv_func_mlockall'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - if test "$cross_compiling" = yes; then - { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } -else - cat > conftest.$ac_ext < -#include -#include -#ifndef HAVE_ERRNO_DEF -extern int errno; -#endif - -int -main() -{ - if (mlockall(MCL_CURRENT|MCL_FUTURE) < 0) { - if (errno == EINVAL || errno == ENOMEM || - errno == EPERM || errno == EACCES) - exit(0); - exit(-1); - } - exit(0); -} - -EOF -if { (eval echo configure:6927: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest${ac_xexeext}; exit) 2>/dev/null -then - ac_cv_func_mlockall=yes -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -fr conftest* - ac_cv_func_mlockall=no -fi -rm -fr conftest* -fi - -fi - -echo "$ac_t""$ac_cv_func_mlockall" 1>&6 -if test $ac_cv_func_mlockall = yes; then - cat >> confdefs.h <<\EOF -#define HAVE_MLOCKALL 1 -EOF - -fi -echo $ac_n "checking for va_copy""... $ac_c" 1>&6 -echo "configure:6949: checking for va_copy" >&5 -if eval "test \"`echo '$''{'ac_cv_func_va_copy'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -#else -# include -#endif -int main() { - -va_list a, b; - -va_copy(a, b); -; return 0; } -EOF -if { (eval echo configure:6969: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - ac_cv_func_va_copy=yes -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - ac_cv_func_va_copy=no -fi -rm -f conftest* -fi - -echo "$ac_t""$ac_cv_func_va_copy" 1>&6 -if test $ac_cv_func_va_copy = yes; then - cat >> confdefs.h <<\EOF -#define HAVE_VA_COPY 1 -EOF - -fi -echo $ac_n "checking for __va_copy""... $ac_c" 1>&6 -echo "configure:6989: checking for __va_copy" >&5 -if eval "test \"`echo '$''{'ac_cv_func__va_copy'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -#else -# include -#endif -int main() { - -va_list a, b; - -__va_copy(a, b); -; return 0; } -EOF -if { (eval echo configure:7009: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - ac_cv_func__va_copy=yes -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - ac_cv_func__va_copy=no -fi -rm -f conftest* -fi - -echo "$ac_t""$ac_cv_func__va_copy" 1>&6 -if test $ac_cv_func__va_copy = yes; then - cat >> confdefs.h <<\EOF -#define HAVE__VA_COPY 1 -EOF - -fi -echo $ac_n "checking for working ecvt() ""... $ac_c" 1>&6 -echo "configure:7029: checking for working ecvt() " >&5 -if eval "test \"`echo '$''{'ac_cv_func_ecvt'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - if test "$cross_compiling" = yes; then - { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } -else - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest${ac_xexeext}; exit) 2>/dev/null -then - ac_cv_func_ecvt=yes -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -fr conftest* - ac_cv_func_ecvt=no -fi -rm -fr conftest* -fi - -fi - -echo "$ac_t""$ac_cv_func_ecvt" 1>&6 -if test $ac_cv_func_ecvt = yes; then - cat >> confdefs.h <<\EOF -#define HAVE_ECVT 1 -EOF - -fi -echo $ac_n "checking for working fcvt() ""... $ac_c" 1>&6 -echo "configure:7079: checking for working fcvt() " >&5 -if eval "test \"`echo '$''{'ac_cv_func_fcvt'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - if test "$cross_compiling" = yes; then - { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } -else - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest${ac_xexeext}; exit) 2>/dev/null -then - ac_cv_func_fcvt=yes -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -fr conftest* - ac_cv_func_fcvt=no -fi -rm -fr conftest* -fi - -fi - -echo "$ac_t""$ac_cv_func_fcvt" 1>&6 -if test $ac_cv_func_fcvt = yes; then - cat >> confdefs.h <<\EOF -#define HAVE_FCVT 1 -EOF - -fi -echo $ac_n "checking for working gcvt() ""... $ac_c" 1>&6 -echo "configure:7129: checking for working gcvt() " >&5 -if eval "test \"`echo '$''{'ac_cv_func_gcvt'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - if test "$cross_compiling" = yes; then - { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } -else - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest${ac_xexeext}; exit) 2>/dev/null -then - ac_cv_func_gcvt=yes -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -fr conftest* - ac_cv_func_gcvt=no -fi -rm -fr conftest* -fi - -fi - -echo "$ac_t""$ac_cv_func_gcvt" 1>&6 -if test $ac_cv_func_gcvt = yes; then - cat >> confdefs.h <<\EOF -#define HAVE_GCVT 1 -EOF - -fi -echo $ac_n "checking for __dtoa""... $ac_c" 1>&6 -echo "configure:7179: checking for __dtoa" >&5 -if eval "test \"`echo '$''{'ac_cv_func_dtoa'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - ac_cv_func_dtoa=yes -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - ac_cv_func_dtoa=no -fi -rm -f conftest* -fi - -echo "$ac_t""$ac_cv_func_dtoa" 1>&6 -if test $ac_cv_func_dtoa = yes; then - cat >> confdefs.h <<\EOF -#define HAVE_DTOA 1 -EOF - -fi -echo $ac_n "checking for __dtoa that needs result ptr""... $ac_c" 1>&6 -echo "configure:7212: checking for __dtoa that needs result ptr" >&5 -if eval "test \"`echo '$''{'ac_cv_func_dtoa_r'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - if test "$cross_compiling" = yes; then - { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } -else - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest${ac_xexeext}; exit) 2>/dev/null -then - ac_cv_func_dtoa_r=yes -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -fr conftest* - ac_cv_func_dtoa_r=no -fi -rm -fr conftest* -fi - -fi - -echo "$ac_t""$ac_cv_func_dtoa_r" 1>&6 -if test $ac_cv_func_dtoa_r = yes; then - cat >> confdefs.h <<\EOF -#define HAVE_DTOA_R 1 -EOF - -fi -for ac_hdr in unistd.h -do -ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` -echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:7266: checking for $ac_hdr" >&5 -if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:7276: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`tr -d '\015' < conftest.out | grep -v '^ *+' | grep -v "^conftest.${ac_ext}\$"` -if test -z "$ac_err"; then - rm -rf conftest* - eval "ac_cv_header_$ac_safe=yes" -else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_header_$ac_safe=no" -fi -rm -f conftest* -fi -if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` - cat >> confdefs.h <&6 -fi -done - -for ac_func in getpagesize -do -echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:7305: checking for $ac_func" >&5 -if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -/* Override any gcc2 internal prototype to avoid an error. */ -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char $ac_func(); - -int main() { - -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined (__stub_$ac_func) || defined (__stub___$ac_func) -choke me -#else -$ac_func(); -#endif - -; return 0; } -EOF -if { (eval echo configure:7333: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_func_$ac_func=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_func_$ac_func=no" -fi -rm -f conftest* -fi - -if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` - cat >> confdefs.h <&6 -fi -done - -echo $ac_n "checking for mmap that needs ptr to size""... $ac_c" 1>&6 -echo "configure:7358: checking for mmap that needs ptr to size" >&5 -if eval "test \"`echo '$''{'ac_cv_func_mmap_sizep'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - if test "$cross_compiling" = yes; then - ac_cv_func_mmap_sizep=no -else - cat > conftest.$ac_ext < -#include -#include -#include -#include - -#ifndef MAP_FILE -#define MAP_FILE 0 /* Needed on Apollo Domain/OS */ -#endif - -/* This mess was copied from the GNU getpagesize.h. */ -#ifndef HAVE_GETPAGESIZE -# ifdef HAVE_UNISTD_H -# include -# endif - -/* Assume that all systems that can run configure have sys/param.h. */ -# ifndef HAVE_SYS_PARAM_H -# define HAVE_SYS_PARAM_H 1 -# endif - -# ifdef _SC_PAGESIZE -# define getpagesize() sysconf(_SC_PAGESIZE) -# else /* no _SC_PAGESIZE */ -# ifdef HAVE_SYS_PARAM_H -# include -# ifdef EXEC_PAGESIZE -# define getpagesize() EXEC_PAGESIZE -# else /* no EXEC_PAGESIZE */ -# ifdef NBPG -# define getpagesize() NBPG * CLSIZE -# ifndef CLSIZE -# define CLSIZE 1 -# endif /* no CLSIZE */ -# else /* no NBPG */ -# ifdef NBPC -# define getpagesize() NBPC -# else /* no NBPC */ -# ifdef PAGESIZE -# define getpagesize() PAGESIZE -# endif /* PAGESIZE */ -# endif /* no NBPC */ -# endif /* no NBPG */ -# endif /* no EXEC_PAGESIZE */ -# else /* no HAVE_SYS_PARAM_H */ -# define getpagesize() 8192 /* punt totally */ -# endif /* no HAVE_SYS_PARAM_H */ -# endif /* no _SC_PAGESIZE */ - -#endif /* no HAVE_GETPAGESIZE */ - -#ifdef __cplusplus -extern "C" { void *malloc(unsigned); } -#else -char *malloc(); -#endif - -jmp_buf jenv; - -int -intr() -{ - signal(SIGSEGV, intr); - longjmp(jenv, 1); -} - -int -main() -{ - char *data, *data2; - int i, pagesize, ps; - int fd; - - pagesize = getpagesize(); - - /* - * First, make a file with some known garbage in it. - */ - data = malloc(pagesize); - if (!data) - exit(1); - for (i = 0; i < pagesize; ++i) - *(data + i) = rand(); - umask(0); - fd = creat("conftestmmap", 0600); - if (fd < 0) - exit(1); - if (write(fd, data, pagesize) != pagesize) - exit(1); - close(fd); - - /* - * Next, try to mmap the file at a fixed address which - * already has something else allocated at it. If we can, - * also make sure that we see the same garbage. - */ - fd = open("conftestmmap", O_RDWR); - if (fd < 0) - exit(1); - - /* - * Keep a copy, Apollo modifies the value... - */ - ps = pagesize; - - /* - * Apollo mmap() is not a syscall but a library function and fails - * if it tries to dereference 'ps'. We must use setjmp in order to - * catch the failure. - */ - signal(SIGSEGV, intr); - if (setjmp(jenv) == 0) { - data2 = mmap(0, ps, PROT_READ, MAP_FILE | MAP_PRIVATE, fd, 0L); - } else { - data2 = (char *)-1; - } - if (data2 != (char *)-1) - exit(1); - - signal(SIGSEGV, intr); - if (setjmp(jenv) == 0) { - data2 = mmap(0, &ps, PROT_READ, MAP_FILE | MAP_PRIVATE, fd, 0L); - } else { - data2 = (char *)-1; - } - if (data2 == (char *)-1) - exit(1); - - for (i = 0; i < pagesize; ++i) - if (*(data + i) != *(data2 + i)) - exit(1); - - close(fd); - unlink("conftestmmap"); - exit(0); -} - -EOF -if { (eval echo configure:7507: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest${ac_xexeext}; exit) 2>/dev/null -then - ac_cv_func_mmap_sizep=yes -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -fr conftest* - ac_cv_func_mmap_sizep=no -fi -rm -fr conftest* -fi - -fi - -echo "$ac_t""$ac_cv_func_mmap_sizep" 1>&6 -if test $ac_cv_func_mmap_sizep = yes; then - cat >> confdefs.h <<\EOF -#define _MMAP_WITH_SIZEP 1 -EOF - -fi - -for ac_hdr in unistd.h -do -ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` -echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:7533: checking for $ac_hdr" >&5 -if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:7543: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`tr -d '\015' < conftest.out | grep -v '^ *+' | grep -v "^conftest.${ac_ext}\$"` -if test -z "$ac_err"; then - rm -rf conftest* - eval "ac_cv_header_$ac_safe=yes" -else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_header_$ac_safe=no" -fi -rm -f conftest* -fi -if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` - cat >> confdefs.h <&6 -fi -done - -for ac_func in getpagesize -do -echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:7572: checking for $ac_func" >&5 -if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -/* Override any gcc2 internal prototype to avoid an error. */ -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char $ac_func(); - -int main() { - -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined (__stub_$ac_func) || defined (__stub___$ac_func) -choke me -#else -$ac_func(); -#endif - -; return 0; } -EOF -if { (eval echo configure:7600: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_func_$ac_func=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_func_$ac_func=no" -fi -rm -f conftest* -fi - -if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` - cat >> confdefs.h <&6 -fi -done - -echo $ac_n "checking for working mmap""... $ac_c" 1>&6 -echo "configure:7625: checking for working mmap" >&5 -if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - if test "$cross_compiling" = yes; then - ac_cv_func_mmap_fixed_mapped=no -else - cat > conftest.$ac_ext < -#include -#include - -/* - * Needed for Apollo Domain/OS and may be for others? - */ -#ifdef _MMAP_WITH_SIZEP -# define mmap_sizeparm(s) (&(s)) -#else -# define mmap_sizeparm(s) (s) -#endif - -/* This mess was copied from the GNU getpagesize.h. */ -#ifndef HAVE_GETPAGESIZE -# ifdef HAVE_UNISTD_H -# include -# endif - -/* Assume that all systems that can run configure have sys/param.h. */ -# ifndef HAVE_SYS_PARAM_H -# define HAVE_SYS_PARAM_H 1 -# endif - -# ifdef _SC_PAGESIZE -# define getpagesize() sysconf(_SC_PAGESIZE) -# else /* no _SC_PAGESIZE */ -# ifdef HAVE_SYS_PARAM_H -# include -# ifdef EXEC_PAGESIZE -# define getpagesize() EXEC_PAGESIZE -# else /* no EXEC_PAGESIZE */ -# ifdef NBPG -# define getpagesize() NBPG * CLSIZE -# ifndef CLSIZE -# define CLSIZE 1 -# endif /* no CLSIZE */ -# else /* no NBPG */ -# ifdef NBPC -# define getpagesize() NBPC -# else /* no NBPC */ -# ifdef PAGESIZE -# define getpagesize() PAGESIZE -# endif /* PAGESIZE */ -# endif /* no NBPC */ -# endif /* no NBPG */ -# endif /* no EXEC_PAGESIZE */ -# else /* no HAVE_SYS_PARAM_H */ -# define getpagesize() 8192 /* punt totally */ -# endif /* no HAVE_SYS_PARAM_H */ -# endif /* no _SC_PAGESIZE */ - -#endif /* no HAVE_GETPAGESIZE */ - -#ifdef __cplusplus -extern "C" { void *malloc(unsigned); } -#else -char *malloc(); -#endif - -int -main() -{ - char *data, *data2, *data3; - int i, pagesize; - int fd; - - pagesize = getpagesize(); - - /* - * First, make a file with some known garbage in it. - */ - data = malloc(pagesize); - if (!data) - exit(1); - for (i = 0; i < pagesize; ++i) - *(data + i) = rand(); - umask(0); - fd = creat("conftestmmap", 0600); - if (fd < 0) - exit(1); - if (write(fd, data, pagesize) != pagesize) - exit(1); - close(fd); - - /* - * Next, try to mmap the file at a fixed address which - * already has something else allocated at it. If we can, - * also make sure that we see the same garbage. - */ - fd = open("conftestmmap", O_RDWR); - if (fd < 0) - exit(1); - data2 = malloc(2 * pagesize); - if (!data2) - exit(1); - data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1); - if (data2 != mmap(data2, mmap_sizeparm(pagesize), PROT_READ | PROT_WRITE, - MAP_PRIVATE | MAP_FIXED, fd, 0L)) - exit(1); - for (i = 0; i < pagesize; ++i) - if (*(data + i) != *(data2 + i)) - exit(1); - - /* - * Finally, make sure that changes to the mapped area - * do not percolate back to the file as seen by read(). - * (This is a bug on some variants of i386 svr4.0.) - */ - for (i = 0; i < pagesize; ++i) - *(data2 + i) = *(data2 + i) + 1; - data3 = malloc(pagesize); - if (!data3) - exit(1); - if (read(fd, data3, pagesize) != pagesize) - exit(1); - for (i = 0; i < pagesize; ++i) - if (*(data + i) != *(data3 + i)) - exit(1); - close(fd); - unlink("conftestmmap"); - exit(0); -} - -EOF -if { (eval echo configure:7782: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest${ac_xexeext}; exit) 2>/dev/null -then - ac_cv_func_mmap_fixed_mapped=yes -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -fr conftest* - ac_cv_func_mmap_fixed_mapped=no -fi -rm -fr conftest* -fi - -fi - -echo "$ac_t""$ac_cv_func_mmap_fixed_mapped" 1>&6 -if test $ac_cv_func_mmap_fixed_mapped = yes; then - cat >> confdefs.h <<\EOF -#define HAVE_MMAP 1 -EOF - -fi - -for ac_hdr in unistd.h -do -ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` -echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:7808: checking for $ac_hdr" >&5 -if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:7818: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`tr -d '\015' < conftest.out | grep -v '^ *+' | grep -v "^conftest.${ac_ext}\$"` -if test -z "$ac_err"; then - rm -rf conftest* - eval "ac_cv_header_$ac_safe=yes" -else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_header_$ac_safe=no" -fi -rm -f conftest* -fi -if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` - cat >> confdefs.h <&6 -fi -done - -for ac_func in getpagesize -do -echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:7847: checking for $ac_func" >&5 -if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -/* Override any gcc2 internal prototype to avoid an error. */ -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char $ac_func(); - -int main() { - -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined (__stub_$ac_func) || defined (__stub___$ac_func) -choke me -#else -$ac_func(); -#endif - -; return 0; } -EOF -if { (eval echo configure:7875: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_func_$ac_func=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_func_$ac_func=no" -fi -rm -f conftest* -fi - -if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` - cat >> confdefs.h <&6 -fi -done - -echo $ac_n "checking for mmap that needs ptr to size""... $ac_c" 1>&6 -echo "configure:7900: checking for mmap that needs ptr to size" >&5 -if eval "test \"`echo '$''{'ac_cv_func_mmap_sizep'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - if test "$cross_compiling" = yes; then - ac_cv_func_mmap_sizep=no -else - cat > conftest.$ac_ext < -#include -#include -#include -#include - -#ifndef MAP_FILE -#define MAP_FILE 0 /* Needed on Apollo Domain/OS */ -#endif - -/* This mess was copied from the GNU getpagesize.h. */ -#ifndef HAVE_GETPAGESIZE -# ifdef HAVE_UNISTD_H -# include -# endif - -/* Assume that all systems that can run configure have sys/param.h. */ -# ifndef HAVE_SYS_PARAM_H -# define HAVE_SYS_PARAM_H 1 -# endif - -# ifdef _SC_PAGESIZE -# define getpagesize() sysconf(_SC_PAGESIZE) -# else /* no _SC_PAGESIZE */ -# ifdef HAVE_SYS_PARAM_H -# include -# ifdef EXEC_PAGESIZE -# define getpagesize() EXEC_PAGESIZE -# else /* no EXEC_PAGESIZE */ -# ifdef NBPG -# define getpagesize() NBPG * CLSIZE -# ifndef CLSIZE -# define CLSIZE 1 -# endif /* no CLSIZE */ -# else /* no NBPG */ -# ifdef NBPC -# define getpagesize() NBPC -# else /* no NBPC */ -# ifdef PAGESIZE -# define getpagesize() PAGESIZE -# endif /* PAGESIZE */ -# endif /* no NBPC */ -# endif /* no NBPG */ -# endif /* no EXEC_PAGESIZE */ -# else /* no HAVE_SYS_PARAM_H */ -# define getpagesize() 8192 /* punt totally */ -# endif /* no HAVE_SYS_PARAM_H */ -# endif /* no _SC_PAGESIZE */ - -#endif /* no HAVE_GETPAGESIZE */ - -#ifdef __cplusplus -extern "C" { void *malloc(unsigned); } -#else -char *malloc(); -#endif - -jmp_buf jenv; - -int -intr() -{ - signal(SIGSEGV, intr); - longjmp(jenv, 1); -} - -int -main() -{ - char *data, *data2; - int i, pagesize, ps; - int fd; - - pagesize = getpagesize(); - - /* - * First, make a file with some known garbage in it. - */ - data = malloc(pagesize); - if (!data) - exit(1); - for (i = 0; i < pagesize; ++i) - *(data + i) = rand(); - umask(0); - fd = creat("conftestmmap", 0600); - if (fd < 0) - exit(1); - if (write(fd, data, pagesize) != pagesize) - exit(1); - close(fd); - - /* - * Next, try to mmap the file at a fixed address which - * already has something else allocated at it. If we can, - * also make sure that we see the same garbage. - */ - fd = open("conftestmmap", O_RDWR); - if (fd < 0) - exit(1); - - /* - * Keep a copy, Apollo modifies the value... - */ - ps = pagesize; - - /* - * Apollo mmap() is not a syscall but a library function and fails - * if it tries to dereference 'ps'. We must use setjmp in order to - * catch the failure. - */ - signal(SIGSEGV, intr); - if (setjmp(jenv) == 0) { - data2 = mmap(0, ps, PROT_READ, MAP_FILE | MAP_PRIVATE, fd, 0L); - } else { - data2 = (char *)-1; - } - if (data2 != (char *)-1) - exit(1); - - signal(SIGSEGV, intr); - if (setjmp(jenv) == 0) { - data2 = mmap(0, &ps, PROT_READ, MAP_FILE | MAP_PRIVATE, fd, 0L); - } else { - data2 = (char *)-1; - } - if (data2 == (char *)-1) - exit(1); - - for (i = 0; i < pagesize; ++i) - if (*(data + i) != *(data2 + i)) - exit(1); - - close(fd); - unlink("conftestmmap"); - exit(0); -} - -EOF -if { (eval echo configure:8049: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest${ac_xexeext}; exit) 2>/dev/null -then - ac_cv_func_mmap_sizep=yes -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -fr conftest* - ac_cv_func_mmap_sizep=no -fi -rm -fr conftest* -fi - -fi - -echo "$ac_t""$ac_cv_func_mmap_sizep" 1>&6 -if test $ac_cv_func_mmap_sizep = yes; then - cat >> confdefs.h <<\EOF -#define _MMAP_WITH_SIZEP 1 -EOF - -fi - -echo $ac_n "checking if mmap works to get shared memory""... $ac_c" 1>&6 -echo "configure:8072: checking if mmap works to get shared memory" >&5 -if eval "test \"`echo '$''{'ac_cv_func_smmap'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - if test "$cross_compiling" = yes; then - ac_cv_func_smmap=no -else - cat > conftest.$ac_ext < -#include - -#ifndef MAP_ANONYMOUS -# ifdef MAP_ANON -# define MAP_ANONYMOUS MAP_ANON -# endif -#endif - -/* - * Needed for Apollo Domain/OS and may be for others? - */ -#ifdef _MMAP_WITH_SIZEP -# define mmap_sizeparm(s) (&(s)) -#else -# define mmap_sizeparm(s) (s) -#endif - -char * -mkshare() -{ - int size = 8192; - int f; - char *addr; - -#ifdef MAP_ANONYMOUS /* HP/UX */ - f = -1; - addr = mmap(0, mmap_sizeparm(size), PROT_READ|PROT_WRITE, MAP_SHARED|MAP_ANONYMOUS, f, 0); -#else - if ((f = open("/dev/zero", 2)) < 0) - exit(1); - addr = mmap(0, mmap_sizeparm(size), PROT_READ|PROT_WRITE, MAP_SHARED, f, 0); -#endif - if (addr == (char *)-1) - exit(1); - close(f); - - return (addr); -} - -int -main() -{ - char *addr; - - addr = mkshare(); - *addr = 'I'; - - switch (fork()) { - - case -1: - printf("help\n"); exit(1); - - case 0: /* child */ - *addr = 'N'; - _exit(0); - break; - default: /* parent */ - wait(0); - sleep(1); - break; - } - - if (*addr != 'N') - exit(1); - exit(0); -} - -EOF -if { (eval echo configure:8152: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest${ac_xexeext}; exit) 2>/dev/null -then - ac_cv_func_smmap=yes -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -fr conftest* - ac_cv_func_smmap=no -fi -rm -fr conftest* -fi - -fi - -echo "$ac_t""$ac_cv_func_smmap" 1>&6 -if test $ac_cv_func_smmap = yes; then - cat >> confdefs.h <<\EOF -#define HAVE_SMMAP 1 -EOF - -fi -# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works -# for constant arguments. Useless! -echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6 -echo "configure:8176: checking for working alloca.h" >&5 -if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -int main() { -char *p = alloca(2 * sizeof(int)); -; return 0; } -EOF -if { (eval echo configure:8188: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - ac_cv_header_alloca_h=yes -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - ac_cv_header_alloca_h=no -fi -rm -f conftest* -fi - -echo "$ac_t""$ac_cv_header_alloca_h" 1>&6 -if test $ac_cv_header_alloca_h = yes; then - cat >> confdefs.h <<\EOF -#define HAVE_ALLOCA_H 1 -EOF - -fi - -echo $ac_n "checking for alloca""... $ac_c" 1>&6 -echo "configure:8209: checking for alloca" >&5 -if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -# define alloca _alloca -# else -# if HAVE_ALLOCA_H -# include -# else -# ifdef _AIX - #pragma alloca -# else -# ifndef alloca /* predefined by HP cc +Olibcalls */ -char *alloca (); -# endif -# endif -# endif -# endif -#endif - -int main() { -char *p = (char *) alloca(1); -; return 0; } -EOF -if { (eval echo configure:8242: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - ac_cv_func_alloca_works=yes -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - ac_cv_func_alloca_works=no -fi -rm -f conftest* -fi - -echo "$ac_t""$ac_cv_func_alloca_works" 1>&6 -if test $ac_cv_func_alloca_works = yes; then - cat >> confdefs.h <<\EOF -#define HAVE_ALLOCA 1 -EOF - -fi - -if test $ac_cv_func_alloca_works = no; then - # The SVR3 libPW and SVR4 libucb both contain incompatible functions - # that cause trouble. Some versions do not even contain alloca or - # contain a buggy version. If you still want to use their alloca, - # use ar to extract alloca.o from them instead of compiling alloca.c. - ALLOCA=alloca.${ac_objext} - cat >> confdefs.h <<\EOF -#define C_ALLOCA 1 -EOF - - -echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6 -echo "configure:8274: checking whether alloca needs Cray hooks" >&5 -if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext <&5 | - egrep "webecray" >/dev/null 2>&1; then - rm -rf conftest* - ac_cv_os_cray=yes -else - rm -rf conftest* - ac_cv_os_cray=no -fi -rm -f conftest* - -fi - -echo "$ac_t""$ac_cv_os_cray" 1>&6 -if test $ac_cv_os_cray = yes; then -for ac_func in _getb67 GETB67 getb67; do - echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:8304: checking for $ac_func" >&5 -if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -/* Override any gcc2 internal prototype to avoid an error. */ -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char $ac_func(); - -int main() { - -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined (__stub_$ac_func) || defined (__stub___$ac_func) -choke me -#else -$ac_func(); -#endif - -; return 0; } -EOF -if { (eval echo configure:8332: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_func_$ac_func=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_func_$ac_func=no" -fi -rm -f conftest* -fi - -if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then - echo "$ac_t""yes" 1>&6 - cat >> confdefs.h <&6 -fi - -done -fi - -echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6 -echo "configure:8359: checking stack direction for C alloca" >&5 -if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - if test "$cross_compiling" = yes; then - ac_cv_c_stack_direction=0 -else - cat > conftest.$ac_ext < addr) ? 1 : -1; -} -main () -{ - exit (find_stack_direction() < 0); -} -EOF -if { (eval echo configure:8386: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest${ac_xexeext}; exit) 2>/dev/null -then - ac_cv_c_stack_direction=1 -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -fr conftest* - ac_cv_c_stack_direction=-1 -fi -rm -fr conftest* -fi - -fi - -echo "$ac_t""$ac_cv_c_stack_direction" 1>&6 -cat >> confdefs.h <&6 -echo "configure:8408: checking if quotactl is an ioctl" >&5 -if eval "test \"`echo '$''{'ac_cv_func_quotaioctl'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -#include -int main() { -struct quotctl q; ioctl(0, Q_QUOTACTL, &q) -; return 0; } -EOF -if { (eval echo configure:8421: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - ac_cv_func_quotaioctl=yes -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - ac_cv_func_quotaioctl=no -fi -rm -f conftest* -fi - -echo "$ac_t""$ac_cv_func_quotaioctl" 1>&6 -if test $ac_cv_func_quotaioctl = yes; then - cat >> confdefs.h <<\EOF -#define HAVE_QUOTAIOCTL 1 -EOF - -fi -echo $ac_n "checking for file locking via fcntl""... $ac_c" 1>&6 -echo "configure:8441: checking for file locking via fcntl" >&5 -if eval "test \"`echo '$''{'ac_cv_func_fcntl_lock'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -#include -int main() { - -struct flock fl; -fcntl(0, F_SETLK, &fl); -; return 0; } -EOF -if { (eval echo configure:8457: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - ac_cv_func_fcntl_lock=yes -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - ac_cv_func_fcntl_lock=no -fi -rm -f conftest* -fi - -echo "$ac_t""$ac_cv_func_fcntl_lock" 1>&6 -if test $ac_cv_func_fcntl_lock = yes; then - cat >> confdefs.h <<\EOF -#define HAVE_FCNTL_LOCKF 1 -EOF - -fi -echo $ac_n "checking for uname""... $ac_c" 1>&6 -echo "configure:8477: checking for uname" >&5 -if eval "test \"`echo '$''{'ac_cv_func_uname'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -int main() { -struct utsname un; -uname(&un); -; return 0; } -EOF -if { (eval echo configure:8490: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - ac_cv_func_uname=yes -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - ac_cv_func_uname=no -fi -rm -f conftest* -fi - -echo "$ac_t""$ac_cv_func_uname" 1>&6 -if test $ac_cv_func_uname = yes; then - cat >> confdefs.h <<\EOF -#define HAVE_UNAME 1 -EOF - -fi -ac_safe=`echo "vfork.h" | sed 'y%./+-%__p_%'` -echo $ac_n "checking for vfork.h""... $ac_c" 1>&6 -echo "configure:8511: checking for vfork.h" >&5 -if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:8521: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`tr -d '\015' < conftest.out | grep -v '^ *+' | grep -v "^conftest.${ac_ext}\$"` -if test -z "$ac_err"; then - rm -rf conftest* - eval "ac_cv_header_$ac_safe=yes" -else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_header_$ac_safe=no" -fi -rm -f conftest* -fi -if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then - echo "$ac_t""yes" 1>&6 - cat >> confdefs.h <<\EOF -#define HAVE_VFORK_H 1 -EOF - -else - echo "$ac_t""no" 1>&6 -fi - -echo $ac_n "checking for working vfork""... $ac_c" 1>&6 -echo "configure:8546: checking for working vfork" >&5 -if eval "test \"`echo '$''{'ac_cv_func_vfork_works'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - if test "$cross_compiling" = yes; then - echo $ac_n "checking for vfork""... $ac_c" 1>&6 -echo "configure:8552: checking for vfork" >&5 -if eval "test \"`echo '$''{'ac_cv_func_vfork'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -/* Override any gcc2 internal prototype to avoid an error. */ -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char vfork(); - -int main() { - -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined (__stub_vfork) || defined (__stub___vfork) -choke me -#else -vfork(); -#endif - -; return 0; } -EOF -if { (eval echo configure:8580: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_func_vfork=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_func_vfork=no" -fi -rm -f conftest* -fi - -if eval "test \"`echo '$ac_cv_func_'vfork`\" = yes"; then - echo "$ac_t""yes" 1>&6 - : -else - echo "$ac_t""no" 1>&6 -fi - -ac_cv_func_vfork_works=$ac_cv_func_vfork -else - cat > conftest.$ac_ext < -#include -#include -#ifdef HAVE_UNISTD_H -#include -#endif -#ifdef HAVE_VFORK_H -#include -#endif -/* On some sparc systems, changes by the child to local and incoming - argument registers are propagated back to the parent. - The compiler is told about this with #include , - but some compilers (e.g. gcc -O) don't grok . - Test for this by using a static variable whose address - is put into a register that is clobbered by the vfork. */ -static -#ifdef __cplusplus -sparc_address_test (int arg) -#else -sparc_address_test (arg) int arg; -#endif -{ - static pid_t child; - if (!child) { - child = vfork (); - if (child < 0) { - perror ("vfork"); - _exit(2); - } - if (!child) { - arg = getpid(); - write(-1, "", 0); - _exit (arg); - } - } -} -main() { - pid_t parent = getpid (); - pid_t child; - - sparc_address_test (); - - child = vfork (); - - if (child == 0) { - /* Here is another test for sparc vfork register problems. - This test uses lots of local variables, at least - as many local variables as main has allocated so far - including compiler temporaries. 4 locals are enough for - gcc 1.40.3 on a Solaris 4.1.3 sparc, but we use 8 to be safe. - A buggy compiler should reuse the register of parent - for one of the local variables, since it will think that - parent can't possibly be used any more in this routine. - Assigning to the local variable will thus munge parent - in the parent process. */ - pid_t - p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(), - p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid(); - /* Convince the compiler that p..p7 are live; otherwise, it might - use the same hardware register for all 8 local variables. */ - if (p != p1 || p != p2 || p != p3 || p != p4 - || p != p5 || p != p6 || p != p7) - _exit(1); - - /* On some systems (e.g. IRIX 3.3), - vfork doesn't separate parent from child file descriptors. - If the child closes a descriptor before it execs or exits, - this munges the parent's descriptor as well. - Test for this by closing stdout in the child. */ - _exit(close(fileno(stdout)) != 0); - } else { - int status; - struct stat st; - - while (wait(&status) != child) - ; - exit( - /* Was there some problem with vforking? */ - child < 0 - - /* Did the child fail? (This shouldn't happen.) */ - || status - - /* Did the vfork/compiler bug occur? */ - || parent != getpid() - - /* Did the file descriptor bug occur? */ - || fstat(fileno(stdout), &st) != 0 - ); - } -} -EOF -if { (eval echo configure:8697: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest${ac_xexeext}; exit) 2>/dev/null -then - ac_cv_func_vfork_works=yes -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -fr conftest* - ac_cv_func_vfork_works=no -fi -rm -fr conftest* -fi - -fi - -echo "$ac_t""$ac_cv_func_vfork_works" 1>&6 -if test $ac_cv_func_vfork_works = no; then - cat >> confdefs.h <<\EOF -#define vfork fork -EOF - -fi - -echo $ac_n "checking for sys_siglist""... $ac_c" 1>&6 -echo "configure:8720: checking for sys_siglist" >&5 -if eval "test \"`echo '$''{'ac_cv_func_sys_siglist'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - if test "$cross_compiling" = yes; then - { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } -else - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest${ac_xexeext}; exit) 2>/dev/null -then - ac_cv_func_sys_siglist=yes -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -fr conftest* - ac_cv_func_sys_siglist=no -fi -rm -fr conftest* -fi - -fi - -echo "$ac_t""$ac_cv_func_sys_siglist" 1>&6 -if test $ac_cv_func_sys_siglist = yes; then - cat >> confdefs.h <<\EOF -#define HAVE_SYS_SIGLIST 1 -EOF - -fi -echo $ac_n "checking for BSD compliant getpgrp""... $ac_c" 1>&6 -echo "configure:8760: checking for BSD compliant getpgrp" >&5 -if eval "test \"`echo '$''{'ac_cv_func_bsd_getpgrp'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - if test "$cross_compiling" = yes; then - { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } -else - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest${ac_xexeext}; exit) 2>/dev/null -then - ac_cv_func_bsd_getpgrp=yes -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -fr conftest* - ac_cv_func_bsd_getpgrp=no -fi -rm -fr conftest* -fi - -fi - -echo "$ac_t""$ac_cv_func_bsd_getpgrp" 1>&6 -if test $ac_cv_func_bsd_getpgrp = yes; then - cat >> confdefs.h <<\EOF -#define HAVE_BSD_GETPGRP 1 -EOF - -fi -echo $ac_n "checking for BSD compliant setpgrp""... $ac_c" 1>&6 -echo "configure:8804: checking for BSD compliant setpgrp" >&5 -if eval "test \"`echo '$''{'ac_cv_func_bsd_setpgrp'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - if test "$cross_compiling" = yes; then - { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } -else - cat > conftest.$ac_ext < -#ifndef HAVE_ERRNO_DEF -extern int errno; -#endif -int -main() -{ errno = 0; -/* - * Force illegal pid on BSD - */ -if (setpgrp(-1, 100) < 0 && errno == ESRCH) - exit(0); -exit(1);} -EOF -if { (eval echo configure:8829: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest${ac_xexeext}; exit) 2>/dev/null -then - ac_cv_func_bsd_setpgrp=yes -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -fr conftest* - ac_cv_func_bsd_setpgrp=no -fi -rm -fr conftest* -fi - -fi - -echo "$ac_t""$ac_cv_func_bsd_setpgrp" 1>&6 -if test $ac_cv_func_bsd_setpgrp = yes; then - cat >> confdefs.h <<\EOF -#define HAVE_BSD_SETPGRP 1 -EOF - -fi -echo $ac_n "checking for C99 compliant isinf""... $ac_c" 1>&6 -echo "configure:8851: checking for C99 compliant isinf" >&5 -if eval "test \"`echo '$''{'ac_cv_func_c99_isinf'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -int main() { - double d; -#ifndef isinf -The isinf macro is not defined -#endif -return (isinf(d)); - -; return 0; } -EOF -if { (eval echo configure:8868: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - ac_cv_func_c99_isinf=yes -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - ac_cv_func_c99_isinf=no -fi -rm -f conftest* -fi - -echo "$ac_t""$ac_cv_func_c99_isinf" 1>&6 -if test $ac_cv_func_c99_isinf = yes; then - cat >> confdefs.h <<\EOF -#define HAVE_C99_ISINF 1 -EOF - -fi -echo $ac_n "checking for C99 compliant isnan""... $ac_c" 1>&6 -echo "configure:8888: checking for C99 compliant isnan" >&5 -if eval "test \"`echo '$''{'ac_cv_func_c99_isnan'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -int main() { - double d; -#ifndef isnan -The isnan macro is not defined -#endif -return (isnan(d)); - -; return 0; } -EOF -if { (eval echo configure:8905: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - ac_cv_func_c99_isnan=yes -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - ac_cv_func_c99_isnan=no -fi -rm -f conftest* -fi - -echo "$ac_t""$ac_cv_func_c99_isnan" 1>&6 -if test $ac_cv_func_c99_isnan = yes; then - cat >> confdefs.h <<\EOF -#define HAVE_C99_ISNAN 1 -EOF - -fi -echo $ac_n "checking for sigsetjmp""... $ac_c" 1>&6 -echo "configure:8925: checking for sigsetjmp" >&5 -if eval "test \"`echo '$''{'ac_cv_func_sigsetjmp'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -int main() { - -sigjmp_buf jb; -sigsetjmp(jb, 1); -; return 0; } -EOF -if { (eval echo configure:8940: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - ac_cv_func_sigsetjmp=yes -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - ac_cv_func_sigsetjmp=no -fi -rm -f conftest* -fi - -echo "$ac_t""$ac_cv_func_sigsetjmp" 1>&6 -if test $ac_cv_func_sigsetjmp = yes; then - cat >> confdefs.h <<\EOF -#define HAVE_SIGSETJMP 1 -EOF - -fi -echo $ac_n "checking for siglongjmp""... $ac_c" 1>&6 -echo "configure:8960: checking for siglongjmp" >&5 -if eval "test \"`echo '$''{'ac_cv_func_siglongjmp'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -int main() { - -sigjmp_buf jb; -sigsetjmp(jb, 1); -siglongjmp(jb, 1); -; return 0; } -EOF -if { (eval echo configure:8976: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - ac_cv_func_siglongjmp=yes -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - ac_cv_func_siglongjmp=no -fi -rm -f conftest* -fi - -echo "$ac_t""$ac_cv_func_siglongjmp" 1>&6 -if test $ac_cv_func_siglongjmp = yes; then - cat >> confdefs.h <<\EOF -#define HAVE_SIGLONGJMP 1 -EOF - -fi -for ac_func in access eaccess euidaccess -do -echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:8998: checking for $ac_func" >&5 -if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -/* Override any gcc2 internal prototype to avoid an error. */ -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char $ac_func(); - -int main() { - -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined (__stub_$ac_func) || defined (__stub___$ac_func) -choke me -#else -$ac_func(); -#endif - -; return 0; } -EOF -if { (eval echo configure:9026: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_func_$ac_func=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_func_$ac_func=no" -fi -rm -f conftest* -fi - -if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` - cat >> confdefs.h <&6 -fi -done - -for ac_func in memchr memcpy memmove memset -do -echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:9053: checking for $ac_func" >&5 -if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -/* Override any gcc2 internal prototype to avoid an error. */ -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char $ac_func(); - -int main() { - -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined (__stub_$ac_func) || defined (__stub___$ac_func) -choke me -#else -$ac_func(); -#endif - -; return 0; } -EOF -if { (eval echo configure:9081: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_func_$ac_func=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_func_$ac_func=no" -fi -rm -f conftest* -fi - -if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` - cat >> confdefs.h <&6 -fi -done - -for ac_func in brk sbrk strerror nice flock lockf fchdir statvfs quotactl -do -echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:9108: checking for $ac_func" >&5 -if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -/* Override any gcc2 internal prototype to avoid an error. */ -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char $ac_func(); - -int main() { - -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined (__stub_$ac_func) || defined (__stub___$ac_func) -choke me -#else -$ac_func(); -#endif - -; return 0; } -EOF -if { (eval echo configure:9136: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_func_$ac_func=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_func_$ac_func=no" -fi -rm -f conftest* -fi - -if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` - cat >> confdefs.h <&6 -fi -done - -for ac_func in dup dup2 -do -echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:9163: checking for $ac_func" >&5 -if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -/* Override any gcc2 internal prototype to avoid an error. */ -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char $ac_func(); - -int main() { - -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined (__stub_$ac_func) || defined (__stub___$ac_func) -choke me -#else -$ac_func(); -#endif - -; return 0; } -EOF -if { (eval echo configure:9191: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_func_$ac_func=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_func_$ac_func=no" -fi -rm -f conftest* -fi - -if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` - cat >> confdefs.h <&6 -fi -done - -for ac_func in getcwd shmat semget -do -echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:9218: checking for $ac_func" >&5 -if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -/* Override any gcc2 internal prototype to avoid an error. */ -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char $ac_func(); - -int main() { - -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined (__stub_$ac_func) || defined (__stub___$ac_func) -choke me -#else -$ac_func(); -#endif - -; return 0; } -EOF -if { (eval echo configure:9246: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_func_$ac_func=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_func_$ac_func=no" -fi -rm -f conftest* -fi - -if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` - cat >> confdefs.h <&6 -fi -done - -for ac_func in lstat readlink symlink link rename mkfifo mknod -do -echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:9273: checking for $ac_func" >&5 -if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -/* Override any gcc2 internal prototype to avoid an error. */ -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char $ac_func(); - -int main() { - -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined (__stub_$ac_func) || defined (__stub___$ac_func) -choke me -#else -$ac_func(); -#endif - -; return 0; } -EOF -if { (eval echo configure:9301: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_func_$ac_func=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_func_$ac_func=no" -fi -rm -f conftest* -fi - -if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` - cat >> confdefs.h <&6 -fi -done - -for ac_func in setreuid setresuid seteuid setuid -do -echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:9328: checking for $ac_func" >&5 -if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -/* Override any gcc2 internal prototype to avoid an error. */ -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char $ac_func(); - -int main() { - -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined (__stub_$ac_func) || defined (__stub___$ac_func) -choke me -#else -$ac_func(); -#endif - -; return 0; } -EOF -if { (eval echo configure:9356: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_func_$ac_func=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_func_$ac_func=no" -fi -rm -f conftest* -fi - -if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` - cat >> confdefs.h <&6 -fi -done - -for ac_func in setregid setresgid setegid setgid -do -echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:9383: checking for $ac_func" >&5 -if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -/* Override any gcc2 internal prototype to avoid an error. */ -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char $ac_func(); - -int main() { - -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined (__stub_$ac_func) || defined (__stub___$ac_func) -choke me -#else -$ac_func(); -#endif - -; return 0; } -EOF -if { (eval echo configure:9411: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_func_$ac_func=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_func_$ac_func=no" -fi -rm -f conftest* -fi - -if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` - cat >> confdefs.h <&6 -fi -done - -for ac_func in getuid geteuid getgid getegid -do -echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:9438: checking for $ac_func" >&5 -if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -/* Override any gcc2 internal prototype to avoid an error. */ -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char $ac_func(); - -int main() { - -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined (__stub_$ac_func) || defined (__stub___$ac_func) -choke me -#else -$ac_func(); -#endif - -; return 0; } -EOF -if { (eval echo configure:9466: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_func_$ac_func=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_func_$ac_func=no" -fi -rm -f conftest* -fi - -if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` - cat >> confdefs.h <&6 -fi -done - -for ac_func in getpid getppid -do -echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:9493: checking for $ac_func" >&5 -if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -/* Override any gcc2 internal prototype to avoid an error. */ -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char $ac_func(); - -int main() { - -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined (__stub_$ac_func) || defined (__stub___$ac_func) -choke me -#else -$ac_func(); -#endif - -; return 0; } -EOF -if { (eval echo configure:9521: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_func_$ac_func=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_func_$ac_func=no" -fi -rm -f conftest* -fi - -if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` - cat >> confdefs.h <&6 -fi -done - -for ac_func in getpgid setpgid -do -echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:9548: checking for $ac_func" >&5 -if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -/* Override any gcc2 internal prototype to avoid an error. */ -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char $ac_func(); - -int main() { - -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined (__stub_$ac_func) || defined (__stub___$ac_func) -choke me -#else -$ac_func(); -#endif - -; return 0; } -EOF -if { (eval echo configure:9576: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_func_$ac_func=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_func_$ac_func=no" -fi -rm -f conftest* -fi - -if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` - cat >> confdefs.h <&6 -fi -done - -for ac_func in getpgrp setpgrp -do -echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:9603: checking for $ac_func" >&5 -if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -/* Override any gcc2 internal prototype to avoid an error. */ -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char $ac_func(); - -int main() { - -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined (__stub_$ac_func) || defined (__stub___$ac_func) -choke me -#else -$ac_func(); -#endif - -; return 0; } -EOF -if { (eval echo configure:9631: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_func_$ac_func=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_func_$ac_func=no" -fi -rm -f conftest* -fi - -if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` - cat >> confdefs.h <&6 -fi -done - -for ac_func in getspnam getspwnam -do -echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:9658: checking for $ac_func" >&5 -if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -/* Override any gcc2 internal prototype to avoid an error. */ -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char $ac_func(); - -int main() { - -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined (__stub_$ac_func) || defined (__stub___$ac_func) -choke me -#else -$ac_func(); -#endif - -; return 0; } -EOF -if { (eval echo configure:9686: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_func_$ac_func=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_func_$ac_func=no" -fi -rm -f conftest* -fi - -if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` - cat >> confdefs.h <&6 -fi -done - -for ac_func in sync fsync fork wait wait4 waitid waitpid getrusage getrlimit setrlimit ulimit -do -echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:9713: checking for $ac_func" >&5 -if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -/* Override any gcc2 internal prototype to avoid an error. */ -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char $ac_func(); - -int main() { - -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined (__stub_$ac_func) || defined (__stub___$ac_func) -choke me -#else -$ac_func(); -#endif - -; return 0; } -EOF -if { (eval echo configure:9741: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_func_$ac_func=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_func_$ac_func=no" -fi -rm -f conftest* -fi - -if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` - cat >> confdefs.h <&6 -fi -done - -for ac_func in execl execle execlp execv execve execvp -do -echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:9768: checking for $ac_func" >&5 -if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -/* Override any gcc2 internal prototype to avoid an error. */ -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char $ac_func(); - -int main() { - -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined (__stub_$ac_func) || defined (__stub___$ac_func) -choke me -#else -$ac_func(); -#endif - -; return 0; } -EOF -if { (eval echo configure:9796: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_func_$ac_func=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_func_$ac_func=no" -fi -rm -f conftest* -fi - -if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` - cat >> confdefs.h <&6 -fi -done - -for ac_func in getexecname -do -echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:9823: checking for $ac_func" >&5 -if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -/* Override any gcc2 internal prototype to avoid an error. */ -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char $ac_func(); - -int main() { - -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined (__stub_$ac_func) || defined (__stub___$ac_func) -choke me -#else -$ac_func(); -#endif - -; return 0; } -EOF -if { (eval echo configure:9851: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_func_$ac_func=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_func_$ac_func=no" -fi -rm -f conftest* -fi - -if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` - cat >> confdefs.h <&6 -fi -done - -for ac_func in gethostid gethostname getdomainname getpagesize getdtablesize -do -echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:9878: checking for $ac_func" >&5 -if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -/* Override any gcc2 internal prototype to avoid an error. */ -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char $ac_func(); - -int main() { - -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined (__stub_$ac_func) || defined (__stub___$ac_func) -choke me -#else -$ac_func(); -#endif - -; return 0; } -EOF -if { (eval echo configure:9906: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_func_$ac_func=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_func_$ac_func=no" -fi -rm -f conftest* -fi - -if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` - cat >> confdefs.h <&6 -fi -done - -for ac_func in gettimeofday settimeofday time stime gethrtime -do -echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:9933: checking for $ac_func" >&5 -if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -/* Override any gcc2 internal prototype to avoid an error. */ -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char $ac_func(); - -int main() { - -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined (__stub_$ac_func) || defined (__stub___$ac_func) -choke me -#else -$ac_func(); -#endif - -; return 0; } -EOF -if { (eval echo configure:9961: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_func_$ac_func=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_func_$ac_func=no" -fi -rm -f conftest* -fi - -if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` - cat >> confdefs.h <&6 -fi -done - -for ac_func in ftime tzset mktime gmtime localtime timegm timelocal -do -echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:9988: checking for $ac_func" >&5 -if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -/* Override any gcc2 internal prototype to avoid an error. */ -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char $ac_func(); - -int main() { - -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined (__stub_$ac_func) || defined (__stub___$ac_func) -choke me -#else -$ac_func(); -#endif - -; return 0; } -EOF -if { (eval echo configure:10016: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_func_$ac_func=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_func_$ac_func=no" -fi -rm -f conftest* -fi - -if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` - cat >> confdefs.h <&6 -fi -done - -for ac_func in ctime cftime ascftime strftime -do -echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:10043: checking for $ac_func" >&5 -if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -/* Override any gcc2 internal prototype to avoid an error. */ -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char $ac_func(); - -int main() { - -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined (__stub_$ac_func) || defined (__stub___$ac_func) -choke me -#else -$ac_func(); -#endif - -; return 0; } -EOF -if { (eval echo configure:10071: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_func_$ac_func=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_func_$ac_func=no" -fi -rm -f conftest* -fi - -if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` - cat >> confdefs.h <&6 -fi -done - -for ac_func in poll select chown fchown lchown chmod fchmod lchmod times utime utimes futimes lutimes -do -echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:10098: checking for $ac_func" >&5 -if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -/* Override any gcc2 internal prototype to avoid an error. */ -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char $ac_func(); - -int main() { - -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined (__stub_$ac_func) || defined (__stub___$ac_func) -choke me -#else -$ac_func(); -#endif - -; return 0; } -EOF -if { (eval echo configure:10126: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_func_$ac_func=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_func_$ac_func=no" -fi -rm -f conftest* -fi - -if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` - cat >> confdefs.h <&6 -fi -done - -for ac_func in ecvt_r fcvt_r gcvt_r -do -echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:10153: checking for $ac_func" >&5 -if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -/* Override any gcc2 internal prototype to avoid an error. */ -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char $ac_func(); - -int main() { - -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined (__stub_$ac_func) || defined (__stub___$ac_func) -choke me -#else -$ac_func(); -#endif - -; return 0; } -EOF -if { (eval echo configure:10181: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_func_$ac_func=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_func_$ac_func=no" -fi -rm -f conftest* -fi - -if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` - cat >> confdefs.h <&6 -fi -done - -for ac_func in econvert fconvert gconvert -do -echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:10208: checking for $ac_func" >&5 -if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -/* Override any gcc2 internal prototype to avoid an error. */ -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char $ac_func(); - -int main() { - -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined (__stub_$ac_func) || defined (__stub___$ac_func) -choke me -#else -$ac_func(); -#endif - -; return 0; } -EOF -if { (eval echo configure:10236: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_func_$ac_func=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_func_$ac_func=no" -fi -rm -f conftest* -fi - -if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` - cat >> confdefs.h <&6 -fi -done - -for ac_func in isinf isnan -do -echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:10263: checking for $ac_func" >&5 -if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -/* Override any gcc2 internal prototype to avoid an error. */ -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char $ac_func(); - -int main() { - -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined (__stub_$ac_func) || defined (__stub___$ac_func) -choke me -#else -$ac_func(); -#endif - -; return 0; } -EOF -if { (eval echo configure:10291: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_func_$ac_func=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_func_$ac_func=no" -fi -rm -f conftest* -fi - -if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` - cat >> confdefs.h <&6 -fi -done - -for ac_func in rand drand48 -do -echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:10318: checking for $ac_func" >&5 -if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -/* Override any gcc2 internal prototype to avoid an error. */ -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char $ac_func(); - -int main() { - -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined (__stub_$ac_func) || defined (__stub___$ac_func) -choke me -#else -$ac_func(); -#endif - -; return 0; } -EOF -if { (eval echo configure:10346: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_func_$ac_func=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_func_$ac_func=no" -fi -rm -f conftest* -fi - -if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` - cat >> confdefs.h <&6 -fi -done - -for ac_func in strtol strtoll strtoul strtoull strtod -do -echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:10373: checking for $ac_func" >&5 -if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -/* Override any gcc2 internal prototype to avoid an error. */ -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char $ac_func(); - -int main() { - -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined (__stub_$ac_func) || defined (__stub___$ac_func) -choke me -#else -$ac_func(); -#endif - -; return 0; } -EOF -if { (eval echo configure:10401: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_func_$ac_func=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_func_$ac_func=no" -fi -rm -f conftest* -fi - -if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` - cat >> confdefs.h <&6 -fi -done - -for ac_func in setpriority DosSetPriority -do -echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:10428: checking for $ac_func" >&5 -if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -/* Override any gcc2 internal prototype to avoid an error. */ -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char $ac_func(); - -int main() { - -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined (__stub_$ac_func) || defined (__stub___$ac_func) -choke me -#else -$ac_func(); -#endif - -; return 0; } -EOF -if { (eval echo configure:10456: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_func_$ac_func=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_func_$ac_func=no" -fi -rm -f conftest* -fi - -if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` - cat >> confdefs.h <&6 -fi -done - -for ac_func in DosAllocSharedMem -do -echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:10483: checking for $ac_func" >&5 -if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -/* Override any gcc2 internal prototype to avoid an error. */ -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char $ac_func(); - -int main() { - -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined (__stub_$ac_func) || defined (__stub___$ac_func) -choke me -#else -$ac_func(); -#endif - -; return 0; } -EOF -if { (eval echo configure:10511: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_func_$ac_func=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_func_$ac_func=no" -fi -rm -f conftest* -fi - -if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` - cat >> confdefs.h <&6 -fi -done - -for ac_func in seekdir fdopendir -do -echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:10538: checking for $ac_func" >&5 -if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -/* Override any gcc2 internal prototype to avoid an error. */ -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char $ac_func(); - -int main() { - -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined (__stub_$ac_func) || defined (__stub___$ac_func) -choke me -#else -$ac_func(); -#endif - -; return 0; } -EOF -if { (eval echo configure:10566: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_func_$ac_func=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_func_$ac_func=no" -fi -rm -f conftest* -fi - -if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` - cat >> confdefs.h <&6 -fi -done - -for ac_func in openat fstatat fchownat futimesat renameat unlinkat -do -echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:10593: checking for $ac_func" >&5 -if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -/* Override any gcc2 internal prototype to avoid an error. */ -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char $ac_func(); - -int main() { - -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined (__stub_$ac_func) || defined (__stub___$ac_func) -choke me -#else -$ac_func(); -#endif - -; return 0; } -EOF -if { (eval echo configure:10621: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_func_$ac_func=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_func_$ac_func=no" -fi -rm -f conftest* -fi - -if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` - cat >> confdefs.h <&6 -fi -done - -for ac_func in attropen -do -echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:10648: checking for $ac_func" >&5 -if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -/* Override any gcc2 internal prototype to avoid an error. */ -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char $ac_func(); - -int main() { - -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined (__stub_$ac_func) || defined (__stub___$ac_func) -choke me -#else -$ac_func(); -#endif - -; return 0; } -EOF -if { (eval echo configure:10676: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_func_$ac_func=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_func_$ac_func=no" -fi -rm -f conftest* -fi - -if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` - cat >> confdefs.h <&6 -fi -done - -for ac_func in __accessat -do -echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:10703: checking for $ac_func" >&5 -if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -/* Override any gcc2 internal prototype to avoid an error. */ -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char $ac_func(); - -int main() { - -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined (__stub_$ac_func) || defined (__stub___$ac_func) -choke me -#else -$ac_func(); -#endif - -; return 0; } -EOF -if { (eval echo configure:10731: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_func_$ac_func=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_func_$ac_func=no" -fi -rm -f conftest* -fi - -if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` - cat >> confdefs.h <&6 -fi -done - -for ac_func in mkdirat faccessat fchmodat linkat mkfifoat mknodat readlinkat symlinkat -do -echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:10758: checking for $ac_func" >&5 -if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -/* Override any gcc2 internal prototype to avoid an error. */ -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char $ac_func(); - -int main() { - -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined (__stub_$ac_func) || defined (__stub___$ac_func) -choke me -#else -$ac_func(); -#endif - -; return 0; } -EOF -if { (eval echo configure:10786: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_func_$ac_func=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_func_$ac_func=no" -fi -rm -f conftest* -fi - -if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` - cat >> confdefs.h <&6 -fi -done - -for ac_func in popen pclose _popen _pclose -do -echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:10813: checking for $ac_func" >&5 -if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -/* Override any gcc2 internal prototype to avoid an error. */ -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char $ac_func(); - -int main() { - -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined (__stub_$ac_func) || defined (__stub___$ac_func) -choke me -#else -$ac_func(); -#endif - -; return 0; } -EOF -if { (eval echo configure:10841: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_func_$ac_func=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_func_$ac_func=no" -fi -rm -f conftest* -fi - -if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` - cat >> confdefs.h <&6 -fi -done - -for ac_func in strsignal str2sig sig2str -do -echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:10868: checking for $ac_func" >&5 -if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -/* Override any gcc2 internal prototype to avoid an error. */ -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char $ac_func(); - -int main() { - -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined (__stub_$ac_func) || defined (__stub___$ac_func) -choke me -#else -$ac_func(); -#endif - -; return 0; } -EOF -if { (eval echo configure:10896: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_func_$ac_func=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_func_$ac_func=no" -fi -rm -f conftest* -fi - -if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` - cat >> confdefs.h <&6 -fi -done - -for ac_func in killpg sigrelse sigprocmask sigsetmask sigset -do -echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:10923: checking for $ac_func" >&5 -if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -/* Override any gcc2 internal prototype to avoid an error. */ -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char $ac_func(); - -int main() { - -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined (__stub_$ac_func) || defined (__stub___$ac_func) -choke me -#else -$ac_func(); -#endif - -; return 0; } -EOF -if { (eval echo configure:10951: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_func_$ac_func=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_func_$ac_func=no" -fi -rm -f conftest* -fi - -if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` - cat >> confdefs.h <&6 -fi -done - -for ac_func in sleep usleep yield -do -echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:10978: checking for $ac_func" >&5 -if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -/* Override any gcc2 internal prototype to avoid an error. */ -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char $ac_func(); - -int main() { - -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined (__stub_$ac_func) || defined (__stub___$ac_func) -choke me -#else -$ac_func(); -#endif - -; return 0; } -EOF -if { (eval echo configure:11006: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_func_$ac_func=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_func_$ac_func=no" -fi -rm -f conftest* -fi - -if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` - cat >> confdefs.h <&6 -fi -done - -for ac_func in tcgetattr tcsetattr tcgetpgrp tcsetpgrp -do -echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:11033: checking for $ac_func" >&5 -if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -/* Override any gcc2 internal prototype to avoid an error. */ -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char $ac_func(); - -int main() { - -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined (__stub_$ac_func) || defined (__stub___$ac_func) -choke me -#else -$ac_func(); -#endif - -; return 0; } -EOF -if { (eval echo configure:11061: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_func_$ac_func=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_func_$ac_func=no" -fi -rm -f conftest* -fi - -if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` - cat >> confdefs.h <&6 -fi -done - -for ac_func in putenv setenv snprintf strcasecmp strncpy strlcpy strdup -do -echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:11088: checking for $ac_func" >&5 -if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -/* Override any gcc2 internal prototype to avoid an error. */ -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char $ac_func(); - -int main() { - -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined (__stub_$ac_func) || defined (__stub___$ac_func) -choke me -#else -$ac_func(); -#endif - -; return 0; } -EOF -if { (eval echo configure:11116: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_func_$ac_func=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_func_$ac_func=no" -fi -rm -f conftest* -fi - -if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` - cat >> confdefs.h <&6 -fi -done - -for ac_func in valloc -do -echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:11143: checking for $ac_func" >&5 -if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -/* Override any gcc2 internal prototype to avoid an error. */ -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char $ac_func(); - -int main() { - -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined (__stub_$ac_func) || defined (__stub___$ac_func) -choke me -#else -$ac_func(); -#endif - -; return 0; } -EOF -if { (eval echo configure:11171: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_func_$ac_func=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_func_$ac_func=no" -fi -rm -f conftest* -fi - -if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` - cat >> confdefs.h <&6 -fi -done - -for ac_func in madvise -do -echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:11198: checking for $ac_func" >&5 -if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -/* Override any gcc2 internal prototype to avoid an error. */ -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char $ac_func(); - -int main() { - -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined (__stub_$ac_func) || defined (__stub___$ac_func) -choke me -#else -$ac_func(); -#endif - -; return 0; } -EOF -if { (eval echo configure:11226: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_func_$ac_func=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_func_$ac_func=no" -fi -rm -f conftest* -fi - -if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` - cat >> confdefs.h <&6 -fi -done - -for ac_func in mktemp mkstemp -do -echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:11253: checking for $ac_func" >&5 -if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -/* Override any gcc2 internal prototype to avoid an error. */ -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char $ac_func(); - -int main() { - -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined (__stub_$ac_func) || defined (__stub___$ac_func) -choke me -#else -$ac_func(); -#endif - -; return 0; } -EOF -if { (eval echo configure:11281: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_func_$ac_func=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_func_$ac_func=no" -fi -rm -f conftest* -fi - -if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` - cat >> confdefs.h <&6 -fi -done - -for ac_func in chflags fchflags fflagstostr strtofflags -do -echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:11308: checking for $ac_func" >&5 -if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -/* Override any gcc2 internal prototype to avoid an error. */ -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char $ac_func(); - -int main() { - -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined (__stub_$ac_func) || defined (__stub___$ac_func) -choke me -#else -$ac_func(); -#endif - -; return 0; } -EOF -if { (eval echo configure:11336: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_func_$ac_func=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_func_$ac_func=no" -fi -rm -f conftest* -fi - -if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` - cat >> confdefs.h <&6 -fi -done - -for ac_func in fnmatch -do -echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:11363: checking for $ac_func" >&5 -if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -/* Override any gcc2 internal prototype to avoid an error. */ -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char $ac_func(); - -int main() { - -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined (__stub_$ac_func) || defined (__stub___$ac_func) -choke me -#else -$ac_func(); -#endif - -; return 0; } -EOF -if { (eval echo configure:11391: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_func_$ac_func=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_func_$ac_func=no" -fi -rm -f conftest* -fi - -if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` - cat >> confdefs.h <&6 -fi -done - -for ac_func in truncate ftruncate -do -echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:11418: checking for $ac_func" >&5 -if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -/* Override any gcc2 internal prototype to avoid an error. */ -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char $ac_func(); - -int main() { - -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined (__stub_$ac_func) || defined (__stub___$ac_func) -choke me -#else -$ac_func(); -#endif - -; return 0; } -EOF -if { (eval echo configure:11446: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_func_$ac_func=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_func_$ac_func=no" -fi -rm -f conftest* -fi - -if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` - cat >> confdefs.h <&6 -fi -done - -for ac_func in getppriv setppriv priv_set -do -echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:11473: checking for $ac_func" >&5 -if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -/* Override any gcc2 internal prototype to avoid an error. */ -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char $ac_func(); - -int main() { - -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined (__stub_$ac_func) || defined (__stub___$ac_func) -choke me -#else -$ac_func(); -#endif - -; return 0; } -EOF -if { (eval echo configure:11501: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_func_$ac_func=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_func_$ac_func=no" -fi -rm -f conftest* -fi - -if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` - cat >> confdefs.h <&6 -fi -done - -for ac_func in setlocale localeconv nl_langinfo -do -echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:11528: checking for $ac_func" >&5 -if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -/* Override any gcc2 internal prototype to avoid an error. */ -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char $ac_func(); - -int main() { - -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined (__stub_$ac_func) || defined (__stub___$ac_func) -choke me -#else -$ac_func(); -#endif - -; return 0; } -EOF -if { (eval echo configure:11556: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_func_$ac_func=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_func_$ac_func=no" -fi -rm -f conftest* -fi - -if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` - cat >> confdefs.h <&6 -fi -done - -for ac_func in clone_area create_area delete_area -do -echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:11583: checking for $ac_func" >&5 -if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -/* Override any gcc2 internal prototype to avoid an error. */ -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char $ac_func(); - -int main() { - -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined (__stub_$ac_func) || defined (__stub___$ac_func) -choke me -#else -$ac_func(); -#endif - -; return 0; } -EOF -if { (eval echo configure:11611: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_func_$ac_func=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_func_$ac_func=no" -fi -rm -f conftest* -fi - -if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` - cat >> confdefs.h <&6 -fi -done - - -echo $ac_n "checking if dirfd is defined or function""... $ac_c" 1>&6 -echo "configure:11637: checking if dirfd is defined or function" >&5 -if eval "test \"`echo '$''{'ac_cv_have_dirfd'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -int main() { - -#ifndef dirfd - char *p = (char *) dirfd; -#endif -; return 0; } -EOF -if { (eval echo configure:11652: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - ac_cv_have_dirfd=yes -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - ac_cv_have_dirfd=no -fi -rm -f conftest* -fi - -echo "$ac_t""$ac_cv_have_dirfd" 1>&6 - ac_tr_dfunc=HAVE_`echo dirfd | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` -if test $ac_cv_have_dirfd = yes; then - cat >> confdefs.h <&6 -echo "configure:11674: checking if we may not define our own malloc()" >&5 -if eval "test \"`echo '$''{'ac_cv_no_user_malloc'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - if test "$cross_compiling" = yes; then - { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } -else - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest${ac_xexeext}; exit) 2>/dev/null -then - ac_cv_no_user_malloc=no -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -fr conftest* - ac_cv_no_user_malloc=yes -fi -rm -fr conftest* -fi - -fi - -echo "$ac_t""$ac_cv_no_user_malloc" 1>&6 -if test $ac_cv_no_user_malloc = yes; then - cat >> confdefs.h <<\EOF -#define NO_USER_MALLOC 1 -EOF - -fi -echo $ac_n "checking for working extern long timezone ""... $ac_c" 1>&6 -echo "configure:11730: checking for working extern long timezone " >&5 -if eval "test \"`echo '$''{'ac_cv_var_timezone'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - if test "$cross_compiling" = yes; then - { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } -else - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest${ac_xexeext}; exit) 2>/dev/null -then - ac_cv_var_timezone=yes -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -fr conftest* - ac_cv_var_timezone=no -fi -rm -fr conftest* -fi - -fi - -echo "$ac_t""$ac_cv_var_timezone" 1>&6 -if test $ac_cv_var_timezone = yes; then - cat >> confdefs.h <<\EOF -#define HAVE_VAR_TIMEZONE 1 -EOF - -fi - -echo $ac_n "checking if link() allows hard links on symlinks""... $ac_c" 1>&6 -echo "configure:11772: checking if link() allows hard links on symlinks" >&5 -if eval "test \"`echo '$''{'ac_cv_hard_symlinks'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - if test "$cross_compiling" = yes; then - { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } -else - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest${ac_xexeext}; exit) 2>/dev/null -then - ac_cv_hard_symlinks=yes -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -fr conftest* - ac_cv_hard_symlinks=no -fi -rm -fr conftest* -fi - -fi - -echo "$ac_t""$ac_cv_hard_symlinks" 1>&6 -if test $ac_cv_hard_symlinks = yes; then - cat >> confdefs.h <<\EOF -#define HAVE_HARD_SYMLINKS 1 -EOF - -fi -echo $ac_n "checking if link() does not folow symlinks""... $ac_c" 1>&6 -echo "configure:11824: checking if link() does not folow symlinks" >&5 -if eval "test \"`echo '$''{'ac_cv_link_nofollow'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - if test "$cross_compiling" = yes; then - { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } -else - cat > conftest.$ac_ext < -#include - -main() -{ - int ret = 0; - int f; - struct stat sb; - - unlink("confdefs.f1"); - unlink("confdefs.l1"); - unlink("confdefs.h1"); - - f = creat("confdefs.f1", 0666); - close(f); - if (symlink("confdefs.f1", "confdefs.l1") < 0) - ret = 1; - if (link("confdefs.l1", "confdefs.h1") < 0) - ret = 1; - - stat("confdefs.f1", &sb); - if (sb.st_nlink == 2) - ret = 1; - - unlink("confdefs.f1"); - unlink("confdefs.l1"); - unlink("confdefs.h1"); - - exit(ret); -} -EOF -if { (eval echo configure:11866: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest${ac_xexeext}; exit) 2>/dev/null -then - ac_cv_link_nofollow=yes -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -fr conftest* - ac_cv_link_nofollow=no -fi -rm -fr conftest* -fi - -fi - -echo "$ac_t""$ac_cv_link_nofollow" 1>&6 -if test $ac_cv_link_nofollow = yes; then - cat >> confdefs.h <<\EOF -#define HAVE_LINK_NOFOLLOW 1 -EOF - -fi -for ac_hdr in unistd.h -do -ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` -echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:11891: checking for $ac_hdr" >&5 -if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:11901: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`tr -d '\015' < conftest.out | grep -v '^ *+' | grep -v "^conftest.${ac_ext}\$"` -if test -z "$ac_err"; then - rm -rf conftest* - eval "ac_cv_header_$ac_safe=yes" -else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_header_$ac_safe=no" -fi -rm -f conftest* -fi -if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` - cat >> confdefs.h <&6 -fi -done - -echo $ac_n "checking if access() does implement E_OK""... $ac_c" 1>&6 -echo "configure:11928: checking if access() does implement E_OK" >&5 -if eval "test \"`echo '$''{'ac_cv_access_e_ok'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - if test "$cross_compiling" = yes; then - { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } -else - cat > conftest.$ac_ext < -# endif -#ifndef R_OK -#define R_OK 4 /* Test for Read permission */ -#define W_OK 2 /* Test for Write permission */ -#define X_OK 1 /* Test for eXecute permission */ -#define F_OK 0 /* Test for existence of File */ -#endif - -#ifndef E_OK -#ifdef EFF_ONLY_OK -#define E_OK EFF_ONLY_OK /* Irix */ -#else -#ifdef EUID_OK -#define E_OK EUID_OK /* UNICOS (0400) */ -#else -#define E_OK 010 /* Test effective uids */ -#endif -#endif -#endif - -#include -#ifndef HAVE_ERRNO_DEF -extern int errno; -#endif - -main() -{ -#ifdef _MSC_VER -/* - * If we use "cl" to compile and call access(".", E_OK|F_OK), the program will - * cause an exception that results in a popup window. For this reason, the test - * is disabled for "cl", it would not work anyway. - */ - int ret = 1; -#else - int ret = 0; - - if (access(".", F_OK) != 0) - ret = 1; - else if (access(".", E_OK|F_OK) != 0) - ret = 1; - else if (access(".", (R_OK<<4)|F_OK) == 0) - ret = 1; -#endif - - exit(ret); -} -EOF -if { (eval echo configure:11989: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest${ac_xexeext}; exit) 2>/dev/null -then - ac_cv_access_e_ok=yes -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -fr conftest* - ac_cv_access_e_ok=no -fi -rm -fr conftest* -fi - -fi - -echo "$ac_t""$ac_cv_access_e_ok" 1>&6 -if test $ac_cv_access_e_ok = yes; then - cat >> confdefs.h <<\EOF -#define HAVE_ACCESS_E_OK 1 -EOF - -fi - -echo $ac_n "checking for fseeko()""... $ac_c" 1>&6 -echo "configure:12012: checking for fseeko()" >&5 -if eval "test \"`echo '$''{'ac_cv_func_fseeko'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -int main() { -return !fseeko; -; return 0; } -EOF -if { (eval echo configure:12024: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - ac_cv_func_fseeko=yes -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - ac_cv_func_fseeko=no -fi -rm -f conftest* -fi - -echo "$ac_t""$ac_cv_func_fseeko" 1>&6 -if test $ac_cv_func_fseeko = yes; then - cat >> confdefs.h <<\EOF -#define HAVE_FSEEKO 1 -EOF - -fi -echo $ac_n "checking for ftello()""... $ac_c" 1>&6 -echo "configure:12044: checking for ftello()" >&5 -if eval "test \"`echo '$''{'ac_cv_func_ftello'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -int main() { -return !ftello; -; return 0; } -EOF -if { (eval echo configure:12056: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - ac_cv_func_ftello=yes -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - ac_cv_func_ftello=no -fi -rm -f conftest* -fi - -echo "$ac_t""$ac_cv_func_ftello" 1>&6 -if test $ac_cv_func_ftello = yes; then - cat >> confdefs.h <<\EOF -#define HAVE_FTELLO 1 -EOF - -fi - -echo $ac_n "checking for rcmd in -lsocket""... $ac_c" 1>&6 -echo "configure:12077: checking for rcmd in -lsocket" >&5 -ac_lib_var=`echo socket'_'rcmd | sed 'y%./+-%__p_%'` -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - ac_save_LIBS="$LIBS" -LIBS="-lsocket $LIBS" -cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" -fi -rm -f conftest* -LIBS="$ac_save_LIBS" - -fi -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then - echo "$ac_t""yes" 1>&6 - lib_socket="-lsocket" -else - echo "$ac_t""no" 1>&6 -fi - -ac_save_LIBS="$LIBS" -LIBS="$LIBS $lib_socket" -echo $ac_n "checking for inet_ntoa in -lnsl""... $ac_c" 1>&6 -echo "configure:12119: checking for inet_ntoa in -lnsl" >&5 -ac_lib_var=`echo nsl'_'inet_ntoa | sed 'y%./+-%__p_%'` -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - ac_save_LIBS="$LIBS" -LIBS="-lnsl $LIBS" -cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" -fi -rm -f conftest* -LIBS="$ac_save_LIBS" - -fi -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then - echo "$ac_t""yes" 1>&6 - lib_nsl="-lnsl" -else - echo "$ac_t""no" 1>&6 -fi - -LIBS="$LIBS $lib_nsl" -for ac_func in rcmd socket socketpair -do -echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:12162: checking for $ac_func" >&5 -if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -/* Override any gcc2 internal prototype to avoid an error. */ -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char $ac_func(); - -int main() { - -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined (__stub_$ac_func) || defined (__stub___$ac_func) -choke me -#else -$ac_func(); -#endif - -; return 0; } -EOF -if { (eval echo configure:12190: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_func_$ac_func=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_func_$ac_func=no" -fi -rm -f conftest* -fi - -if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` - cat >> confdefs.h <&6 -fi -done - -for ac_func in getservbyname inet_ntoa -do -echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:12217: checking for $ac_func" >&5 -if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -/* Override any gcc2 internal prototype to avoid an error. */ -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char $ac_func(); - -int main() { - -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined (__stub_$ac_func) || defined (__stub___$ac_func) -choke me -#else -$ac_func(); -#endif - -; return 0; } -EOF -if { (eval echo configure:12245: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_func_$ac_func=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_func_$ac_func=no" -fi -rm -f conftest* -fi - -if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` - cat >> confdefs.h <&6 -fi -done - -for ac_func in getaddrinfo getnameinfo -do -echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:12272: checking for $ac_func" >&5 -if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -/* Override any gcc2 internal prototype to avoid an error. */ -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char $ac_func(); - -int main() { - -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined (__stub_$ac_func) || defined (__stub___$ac_func) -choke me -#else -$ac_func(); -#endif - -; return 0; } -EOF -if { (eval echo configure:12300: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_func_$ac_func=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_func_$ac_func=no" -fi -rm -f conftest* -fi - -if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` - cat >> confdefs.h <&6 -fi -done - -LIBS="$ac_save_LIBS" - -ac_save_LIBS="$LIBS" -echo $ac_n "checking for res_init in -lc""... $ac_c" 1>&6 -echo "configure:12328: checking for res_init in -lc" >&5 -ac_lib_var=`echo c'_'res_init | sed 'y%./+-%__p_%'` -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - ac_save_LIBS="$LIBS" -LIBS="-lc $LIBS" -cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" -fi -rm -f conftest* -LIBS="$ac_save_LIBS" - -fi -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then - echo "$ac_t""yes" 1>&6 - lib_resolv="" -else - echo "$ac_t""no" 1>&6 -echo $ac_n "checking for res_init in -lresolv""... $ac_c" 1>&6 -echo "configure:12366: checking for res_init in -lresolv" >&5 -ac_lib_var=`echo resolv'_'res_init | sed 'y%./+-%__p_%'` -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - ac_save_LIBS="$LIBS" -LIBS="-lresolv $LIBS" -cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" -fi -rm -f conftest* -LIBS="$ac_save_LIBS" - -fi -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then - echo "$ac_t""yes" 1>&6 - lib_resolv="-lresolv" -else - echo "$ac_t""no" 1>&6 -fi - -fi - -LIBS="$ac_save_LIBS" - -# Check whether --enable-largefile or --disable-largefile was given. -if test "${enable_largefile+set}" = set; then - enableval="$enable_largefile" - : -fi - - if test "$enable_largefile" != no; then - - echo $ac_n "checking for special C compiler options needed for large files""... $ac_c" 1>&6 -echo "configure:12418: checking for special C compiler options needed for large files" >&5 -if eval "test \"`echo '$''{'ac_cv_sys_largefile_CC'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - ac_cv_sys_largefile_CC=no - largefile_cc_opt="" - if test "$GCC" != yes; then - # IRIX 6.2 and later do not support large files by default, - # so use the C compiler's -n32 option if that helps. - cat > conftest.$ac_ext < - /* Check that off_t can represent 2**63 - 1 correctly. - We can't simply "#define LARGE_OFF_T 9223372036854775807", - since some C++ compilers masquerading as C compilers - incorrectly reject 9223372036854775807. */ -# define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) - int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 - && LARGE_OFF_T % 2147483647 == 1) - ? 1 : -1]; - -int main() { - -; return 0; } -EOF -if { (eval echo configure:12444: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - : -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - ac_save_CC="${CC-cc}" - CC="$CC -n32" - cat > conftest.$ac_ext < - /* Check that off_t can represent 2**63 - 1 correctly. - We can't simply "#define LARGE_OFF_T 9223372036854775807", - since some C++ compilers masquerading as C compilers - incorrectly reject 9223372036854775807. */ -# define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) - int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 - && LARGE_OFF_T % 2147483647 == 1) - ? 1 : -1]; - -int main() { - -; return 0; } -EOF -if { (eval echo configure:12469: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - ac_cv_sys_largefile_CC=' -n32' -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 -fi -rm -f conftest* - CC="$ac_save_CC" -fi -rm -f conftest* - fi -fi - -echo "$ac_t""$ac_cv_sys_largefile_CC" 1>&6 - if test "$ac_cv_sys_largefile_CC" != no; then - CC="$CC$ac_cv_sys_largefile_CC" - largefile_cc_opt="$ac_cv_sys_largefile_CC" - fi - - echo $ac_n "checking for _FILE_OFFSET_BITS value needed for large files""... $ac_c" 1>&6 -echo "configure:12490: checking for _FILE_OFFSET_BITS value needed for large files" >&5 -if eval "test \"`echo '$''{'ac_cv_sys_file_offset_bits'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - ac_cv_sys_file_offset_bits=no - cat > conftest.$ac_ext < - /* Check that off_t can represent 2**63 - 1 correctly. - We can't simply "#define LARGE_OFF_T 9223372036854775807", - since some C++ compilers masquerading as C compilers - incorrectly reject 9223372036854775807. */ -# define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) - int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 - && LARGE_OFF_T % 2147483647 == 1) - ? 1 : -1]; - -int main() { - -; return 0; } -EOF -if { (eval echo configure:12512: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - : -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - cat > conftest.$ac_ext < - /* Check that off_t can represent 2**63 - 1 correctly. - We can't simply "#define LARGE_OFF_T 9223372036854775807", - since some C++ compilers masquerading as C compilers - incorrectly reject 9223372036854775807. */ -# define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) - int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 - && LARGE_OFF_T % 2147483647 == 1) - ? 1 : -1]; - - -int main() { - -; return 0; } -EOF -if { (eval echo configure:12537: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - ac_cv_sys_file_offset_bits=64 -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 -fi -rm -f conftest* -fi -rm -f conftest* -fi - -echo "$ac_t""$ac_cv_sys_file_offset_bits" 1>&6 - if test "$ac_cv_sys_file_offset_bits" != no; then - cat >> confdefs.h <&6 -echo "configure:12557: checking for _LARGE_FILES value needed for large files" >&5 -if eval "test \"`echo '$''{'ac_cv_sys_large_files'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - ac_cv_sys_large_files=no - cat > conftest.$ac_ext < - /* Check that off_t can represent 2**63 - 1 correctly. - We can't simply "#define LARGE_OFF_T 9223372036854775807", - since some C++ compilers masquerading as C compilers - incorrectly reject 9223372036854775807. */ -# define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) - int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 - && LARGE_OFF_T % 2147483647 == 1) - ? 1 : -1]; - -int main() { - -; return 0; } -EOF -if { (eval echo configure:12579: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - : -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - cat > conftest.$ac_ext < - /* Check that off_t can represent 2**63 - 1 correctly. - We can't simply "#define LARGE_OFF_T 9223372036854775807", - since some C++ compilers masquerading as C compilers - incorrectly reject 9223372036854775807. */ -# define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) - int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 - && LARGE_OFF_T % 2147483647 == 1) - ? 1 : -1]; - - -int main() { - -; return 0; } -EOF -if { (eval echo configure:12604: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - ac_cv_sys_large_files=1 -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 -fi -rm -f conftest* -fi -rm -f conftest* -fi - -echo "$ac_t""$ac_cv_sys_large_files" 1>&6 - if test "$ac_cv_sys_large_files" != no; then - cat >> confdefs.h <&6 -echo "configure:12624: checking for _LARGEFILE_SOURCE value needed for large files" >&5 -if eval "test \"`echo '$''{'ac_cv_sys_largefile_source'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - ac_cv_sys_largefile_source=no - cat > conftest.$ac_ext < -int main() { -return !fseeko; -; return 0; } -EOF -if { (eval echo configure:12637: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - : -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - cat > conftest.$ac_ext < - -int main() { -return !fseeko; -; return 0; } -EOF -if { (eval echo configure:12653: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - ac_cv_sys_largefile_source=1 -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 -fi -rm -f conftest* -fi -rm -f conftest* -fi - -echo "$ac_t""$ac_cv_sys_largefile_source" 1>&6 - if test "$ac_cv_sys_largefile_source" != no; then - cat >> confdefs.h <&6 -echo "configure:12675: checking if system supports Large Files at all" >&5 -if eval "test \"`echo '$''{'ac_cv_largefiles'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -#include -int main() { - -/* - * Check that off_t can represent 2**63 - 1 correctly. - * We can't simply "#define LARGE_OFF_T 9223372036854775807", - * since some C++ compilers masquerading as C compilers - * incorrectly reject 9223372036854775807. - */ -# define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) - int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 - && LARGE_OFF_T % 2147483647 == 1) - ? 1 : -1]; -return !fseeko; -return !ftello; -; return 0; } -EOF -if { (eval echo configure:12700: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - ac_cv_largefiles=yes -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - ac_cv_largefiles=no -fi -rm -f conftest* -fi - -echo "$ac_t""$ac_cv_largefiles" 1>&6 - if test $ac_cv_largefiles = yes; then - cat >> confdefs.h <<\EOF -#define HAVE_LARGEFILES 1 -EOF - - fi - -cat >> confdefs.h <> confdefs.h <> confdefs.h <> confdefs.h <> confdefs.h <&6 -echo "configure:12743: checking for crypt in -lc" >&5 -ac_lib_var=`echo c'_'crypt | sed 'y%./+-%__p_%'` -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - ac_save_LIBS="$LIBS" -LIBS="-lc $LIBS" -cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" -fi -rm -f conftest* -LIBS="$ac_save_LIBS" - -fi -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then - echo "$ac_t""yes" 1>&6 - lib_crypt="" -else - echo "$ac_t""no" 1>&6 -echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6 -echo "configure:12781: checking for crypt in -lcrypt" >&5 -ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-%__p_%'` -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - ac_save_LIBS="$LIBS" -LIBS="-lcrypt $LIBS" -cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" -fi -rm -f conftest* -LIBS="$ac_save_LIBS" - -fi -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then - echo "$ac_t""yes" 1>&6 - lib_crypt="-lcrypt" -else - echo "$ac_t""no" 1>&6 -fi - -fi - - -ac_save_LIBS="$LIBS" -LIBS="$LIBS $lib_crypt" -for ac_func in crypt -do -echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:12828: checking for $ac_func" >&5 -if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -/* Override any gcc2 internal prototype to avoid an error. */ -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char $ac_func(); - -int main() { - -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined (__stub_$ac_func) || defined (__stub___$ac_func) -choke me -#else -$ac_func(); -#endif - -; return 0; } -EOF -if { (eval echo configure:12856: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_func_$ac_func=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_func_$ac_func=no" -fi -rm -f conftest* -fi - -if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` - cat >> confdefs.h <&6 -fi -done - -LIBS="$ac_save_LIBS" - -echo $ac_n "checking for gettext in -lc""... $ac_c" 1>&6 -echo "configure:12883: checking for gettext in -lc" >&5 -ac_lib_var=`echo c'_'gettext | sed 'y%./+-%__p_%'` -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - ac_save_LIBS="$LIBS" -LIBS="-lc $LIBS" -cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" -fi -rm -f conftest* -LIBS="$ac_save_LIBS" - -fi -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then - echo "$ac_t""yes" 1>&6 - lib_intl="" -else - echo "$ac_t""no" 1>&6 -echo $ac_n "checking for gettext in -lintl""... $ac_c" 1>&6 -echo "configure:12921: checking for gettext in -lintl" >&5 -ac_lib_var=`echo intl'_'gettext | sed 'y%./+-%__p_%'` -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - ac_save_LIBS="$LIBS" -LIBS="-lintl $LIBS" -cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" -fi -rm -f conftest* -LIBS="$ac_save_LIBS" - -fi -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then - echo "$ac_t""yes" 1>&6 - lib_intl="-lintl" -else - echo "$ac_t""no" 1>&6 -fi - -fi - - -ac_save_LIBS="$LIBS" -LIBS="$LIBS $lib_intl" -for ac_func in gettext -do -echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:12968: checking for $ac_func" >&5 -if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -/* Override any gcc2 internal prototype to avoid an error. */ -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char $ac_func(); - -int main() { - -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined (__stub_$ac_func) || defined (__stub___$ac_func) -choke me -#else -$ac_func(); -#endif - -; return 0; } -EOF -if { (eval echo configure:12996: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_func_$ac_func=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_func_$ac_func=no" -fi -rm -f conftest* -fi - -if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` - cat >> confdefs.h <&6 -fi -done - -LIBS="$ac_save_LIBS" - -echo $ac_n "checking for iconv_open in -lc""... $ac_c" 1>&6 -echo "configure:13023: checking for iconv_open in -lc" >&5 -ac_lib_var=`echo c'_'iconv_open | sed 'y%./+-%__p_%'` -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - ac_save_LIBS="$LIBS" -LIBS="-lc $LIBS" -cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" -fi -rm -f conftest* -LIBS="$ac_save_LIBS" - -fi -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then - echo "$ac_t""yes" 1>&6 - lib_iconv="" -else - echo "$ac_t""no" 1>&6 -echo $ac_n "checking for iconv_open in -liconv""... $ac_c" 1>&6 -echo "configure:13061: checking for iconv_open in -liconv" >&5 -ac_lib_var=`echo iconv'_'iconv_open | sed 'y%./+-%__p_%'` -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - ac_save_LIBS="$LIBS" -LIBS="-liconv $LIBS" -cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" -fi -rm -f conftest* -LIBS="$ac_save_LIBS" - -fi -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then - echo "$ac_t""yes" 1>&6 - lib_iconv="-liconv" -else - echo "$ac_t""no" 1>&6 -echo $ac_n "checking for libiconv_open in -liconv""... $ac_c" 1>&6 -echo "configure:13099: checking for libiconv_open in -liconv" >&5 -ac_lib_var=`echo iconv'_'libiconv_open | sed 'y%./+-%__p_%'` -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - ac_save_LIBS="$LIBS" -LIBS="-liconv $LIBS" -cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" -fi -rm -f conftest* -LIBS="$ac_save_LIBS" - -fi -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then - echo "$ac_t""yes" 1>&6 - lib_iconv="-liconv" -else - echo "$ac_t""no" 1>&6 -fi - -fi - -fi - - -ac_save_LIBS="$LIBS" -LIBS="$LIBS $lib_iconv" -for ac_func in iconv iconv_open iconv_close -do -echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:13148: checking for $ac_func" >&5 -if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -/* Override any gcc2 internal prototype to avoid an error. */ -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char $ac_func(); - -int main() { - -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined (__stub_$ac_func) || defined (__stub___$ac_func) -choke me -#else -$ac_func(); -#endif - -; return 0; } -EOF -if { (eval echo configure:13176: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_func_$ac_func=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_func_$ac_func=no" -fi -rm -f conftest* -fi - -if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` - cat >> confdefs.h <&6 -fi -done - -for ac_func in libiconv libiconv_open libiconv_close -do -echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:13203: checking for $ac_func" >&5 -if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -/* Override any gcc2 internal prototype to avoid an error. */ -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char $ac_func(); - -int main() { - -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined (__stub_$ac_func) || defined (__stub___$ac_func) -choke me -#else -$ac_func(); -#endif - -; return 0; } -EOF -if { (eval echo configure:13231: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_func_$ac_func=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_func_$ac_func=no" -fi -rm -f conftest* -fi - -if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` - cat >> confdefs.h <&6 -fi -done - -LIBS="$ac_save_LIBS" - -if test $ac_cv_header_camlib_h = yes; then - scsi_lib=-lcam - lib_scsi=-lcam -fi - -if test "$ac_cv_header_sys_acl_h" = yes; then - - echo "checking for Posix Access Control List support" 1>&6 -echo "configure:13265: checking for Posix Access Control List support" >&5 - echo $ac_n "checking for acl_get_file in -lacl""... $ac_c" 1>&6 -echo "configure:13267: checking for acl_get_file in -lacl" >&5 -ac_lib_var=`echo acl'_'acl_get_file | sed 'y%./+-%__p_%'` -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - ac_save_LIBS="$LIBS" -LIBS="-lacl $LIBS" -cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" -fi -rm -f conftest* -LIBS="$ac_save_LIBS" - -fi -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then - echo "$ac_t""yes" 1>&6 - lib_acl="-lacl" -else - echo "$ac_t""no" 1>&6 -fi - - echo $ac_n "checking for acl_get_file in -lpacl""... $ac_c" 1>&6 -echo "configure:13307: checking for acl_get_file in -lpacl" >&5 -ac_lib_var=`echo pacl'_'acl_get_file | sed 'y%./+-%__p_%'` -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - ac_save_LIBS="$LIBS" -LIBS="-lpacl $LIBS" -cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" -fi -rm -f conftest* -LIBS="$ac_save_LIBS" - -fi -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then - echo "$ac_t""yes" 1>&6 - lib_acl="-lpacl" -else - echo "$ac_t""no" 1>&6 -fi - - - if test ".$lib_acl" != .; then - lib_acl_test="$lib_acl" - fi - - ac_save_LIBS="$LIBS" - LIBS="$LIBS $lib_acl" - for ac_func in acl_get_file acl_set_file acl_from_text acl_to_text acl_free acl_delete_def_file -do -echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:13356: checking for $ac_func" >&5 -if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -/* Override any gcc2 internal prototype to avoid an error. */ -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char $ac_func(); - -int main() { - -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined (__stub_$ac_func) || defined (__stub___$ac_func) -choke me -#else -$ac_func(); -#endif - -; return 0; } -EOF -if { (eval echo configure:13384: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_func_$ac_func=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_func_$ac_func=no" -fi -rm -f conftest* -fi - -if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` - cat >> confdefs.h <&6 -fi -done - - for ac_func in acl_extended_file -do -echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:13411: checking for $ac_func" >&5 -if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -/* Override any gcc2 internal prototype to avoid an error. */ -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char $ac_func(); - -int main() { - -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined (__stub_$ac_func) || defined (__stub___$ac_func) -choke me -#else -$ac_func(); -#endif - -; return 0; } -EOF -if { (eval echo configure:13439: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_func_$ac_func=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_func_$ac_func=no" -fi -rm -f conftest* -fi - -if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` - cat >> confdefs.h <&6 -fi -done - - LIBS="$ac_save_LIBS" - - echo "checking for Solaris Access Control List support" 1>&6 -echo "configure:13466: checking for Solaris Access Control List support" >&5 - echo $ac_n "checking for acltotext in -lsec""... $ac_c" 1>&6 -echo "configure:13468: checking for acltotext in -lsec" >&5 -ac_lib_var=`echo sec'_'acltotext | sed 'y%./+-%__p_%'` -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - ac_save_LIBS="$LIBS" -LIBS="-lsec $LIBS" -cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" -fi -rm -f conftest* -LIBS="$ac_save_LIBS" - -fi -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then - echo "$ac_t""yes" 1>&6 - lib_acl="-lsec" -else - echo "$ac_t""no" 1>&6 -fi - - ac_save_LIBS="$LIBS" - LIBS="$LIBS $lib_acl" - for ac_func in acl facl aclfromtext acltotext -do -echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:13512: checking for $ac_func" >&5 -if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -/* Override any gcc2 internal prototype to avoid an error. */ -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char $ac_func(); - -int main() { - -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined (__stub_$ac_func) || defined (__stub___$ac_func) -choke me -#else -$ac_func(); -#endif - -; return 0; } -EOF -if { (eval echo configure:13540: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_func_$ac_func=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_func_$ac_func=no" -fi -rm -f conftest* -fi - -if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` - cat >> confdefs.h <&6 -fi -done - - LIBS="$ac_save_LIBS" - - - echo "checking for HP-UX Access Control List support" 1>&6 -echo "configure:13568: checking for HP-UX Access Control List support" >&5 - for ac_func in getacl fgetacl setacl fsetacl strtoacl acltostr cpacl fcpacl chownacl setaclentry fsetaclentry -do -echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:13572: checking for $ac_func" >&5 -if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -/* Override any gcc2 internal prototype to avoid an error. */ -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char $ac_func(); - -int main() { - -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined (__stub_$ac_func) || defined (__stub___$ac_func) -choke me -#else -$ac_func(); -#endif - -; return 0; } -EOF -if { (eval echo configure:13600: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_func_$ac_func=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_func_$ac_func=no" -fi -rm -f conftest* -fi - -if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` - cat >> confdefs.h <&6 -fi -done - - - -fi - -if test "$ac_cv_header_attr_xattr_h" = yes; then - echo "checking for Linux flavor Extended Attribute support" 1>&6 -echo "configure:13630: checking for Linux flavor Extended Attribute support" >&5 - echo $ac_n "checking for getxattr in -lattr""... $ac_c" 1>&6 -echo "configure:13632: checking for getxattr in -lattr" >&5 -ac_lib_var=`echo attr'_'getxattr | sed 'y%./+-%__p_%'` -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - ac_save_LIBS="$LIBS" -LIBS="-lattr $LIBS" -cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" -fi -rm -f conftest* -LIBS="$ac_save_LIBS" - -fi -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then - echo "$ac_t""yes" 1>&6 - lib_attr="-lattr" -else - echo "$ac_t""no" 1>&6 -fi - - ac_save_LIBS="$LIBS" - LIBS="$LIBS $lib_attr" - for ac_func in getxattr setxattr listxattr lgetxattr lsetxattr llistxattr -do -echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:13676: checking for $ac_func" >&5 -if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -/* Override any gcc2 internal prototype to avoid an error. */ -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char $ac_func(); - -int main() { - -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined (__stub_$ac_func) || defined (__stub___$ac_func) -choke me -#else -$ac_func(); -#endif - -; return 0; } -EOF -if { (eval echo configure:13704: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_func_$ac_func=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_func_$ac_func=no" -fi -rm -f conftest* -fi - -if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` - cat >> confdefs.h <&6 -fi -done - - LIBS="$ac_save_LIBS" -fi - -echo "checking for RBAC support" 1>&6 -echo "configure:13732: checking for RBAC support" >&5 -echo $ac_n "checking for getuserattr in -lsecdb""... $ac_c" 1>&6 -echo "configure:13734: checking for getuserattr in -lsecdb" >&5 -ac_lib_var=`echo secdb'_'getuserattr | sed 'y%./+-%__p_%'` -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - ac_save_LIBS="$LIBS" -LIBS="-lsecdb $LIBS" -cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" -fi -rm -f conftest* -LIBS="$ac_save_LIBS" - -fi -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then - echo "$ac_t""yes" 1>&6 - lib_secdb="-lsecdb" -else - echo "$ac_t""no" 1>&6 -fi - -ac_save_LIBS="$LIBS" -LIBS="$LIBS $lib_secdb" -for ac_func in getauthattr getuserattr getexecattr getprofattr -do -echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:13778: checking for $ac_func" >&5 -if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -/* Override any gcc2 internal prototype to avoid an error. */ -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char $ac_func(); - -int main() { - -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined (__stub_$ac_func) || defined (__stub___$ac_func) -choke me -#else -$ac_func(); -#endif - -; return 0; } -EOF -if { (eval echo configure:13806: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_func_$ac_func=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_func_$ac_func=no" -fi -rm -f conftest* -fi - -if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` - cat >> confdefs.h <&6 -fi -done - -LIBS="$ac_save_LIBS" - -for ac_func in thr_yield -do -echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:13835: checking for $ac_func" >&5 -if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -/* Override any gcc2 internal prototype to avoid an error. */ -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char $ac_func(); - -int main() { - -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined (__stub_$ac_func) || defined (__stub___$ac_func) -choke me -#else -$ac_func(); -#endif - -; return 0; } -EOF -if { (eval echo configure:13863: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_func_$ac_func=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_func_$ac_func=no" -fi -rm -f conftest* -fi - -if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` - cat >> confdefs.h <&6 -fi -done - - -echo $ac_n "checking for pthread_create in -lpthread""... $ac_c" 1>&6 -echo "configure:13889: checking for pthread_create in -lpthread" >&5 -ac_lib_var=`echo pthread'_'pthread_create | sed 'y%./+-%__p_%'` -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - ac_save_LIBS="$LIBS" -LIBS="-lpthread $LIBS" -cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" -fi -rm -f conftest* -LIBS="$ac_save_LIBS" - -fi -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then - echo "$ac_t""yes" 1>&6 - lib_pthread="-lpthread" -else - echo "$ac_t""no" 1>&6 -echo $ac_n "checking for pthread_create in -lc""... $ac_c" 1>&6 -echo "configure:13927: checking for pthread_create in -lc" >&5 -ac_lib_var=`echo c'_'pthread_create | sed 'y%./+-%__p_%'` -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - ac_save_LIBS="$LIBS" -LIBS="-lc $LIBS" -cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" -fi -rm -f conftest* -LIBS="$ac_save_LIBS" - -fi -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then - echo "$ac_t""yes" 1>&6 - lib_pthread="" -else - echo "$ac_t""no" 1>&6 -fi - -fi - - -ac_save_LIBS="$LIBS" -LIBS="$LIBS $lib_pthread" -for ac_func in pthread_create pthread_kill -do -echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:13974: checking for $ac_func" >&5 -if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -/* Override any gcc2 internal prototype to avoid an error. */ -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char $ac_func(); - -int main() { - -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined (__stub_$ac_func) || defined (__stub___$ac_func) -choke me -#else -$ac_func(); -#endif - -; return 0; } -EOF -if { (eval echo configure:14002: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_func_$ac_func=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_func_$ac_func=no" -fi -rm -f conftest* -fi - -if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` - cat >> confdefs.h <&6 -fi -done - -for ac_func in pthread_mutex_lock pthread_cond_wait pthread_spin_lock -do -echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:14029: checking for $ac_func" >&5 -if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -/* Override any gcc2 internal prototype to avoid an error. */ -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char $ac_func(); - -int main() { - -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined (__stub_$ac_func) || defined (__stub___$ac_func) -choke me -#else -$ac_func(); -#endif - -; return 0; } -EOF -if { (eval echo configure:14057: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_func_$ac_func=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_func_$ac_func=no" -fi -rm -f conftest* -fi - -if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` - cat >> confdefs.h <&6 -fi -done - -LIBS="$ac_save_LIBS" - -echo $ac_n "checking for clock_gettime in -lc""... $ac_c" 1>&6 -echo "configure:14084: checking for clock_gettime in -lc" >&5 -ac_lib_var=`echo c'_'clock_gettime | sed 'y%./+-%__p_%'` -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - ac_save_LIBS="$LIBS" -LIBS="-lc $LIBS" -cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" -fi -rm -f conftest* -LIBS="$ac_save_LIBS" - -fi -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then - echo "$ac_t""yes" 1>&6 - lib_rt="" -else - echo "$ac_t""no" 1>&6 -echo $ac_n "checking for clock_gettime in -lrt""... $ac_c" 1>&6 -echo "configure:14122: checking for clock_gettime in -lrt" >&5 -ac_lib_var=`echo rt'_'clock_gettime | sed 'y%./+-%__p_%'` -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - ac_save_LIBS="$LIBS" -LIBS="-lrt $LIBS" -cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" -fi -rm -f conftest* -LIBS="$ac_save_LIBS" - -fi -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then - echo "$ac_t""yes" 1>&6 - lib_rt="-lrt" -else - echo "$ac_t""no" 1>&6 -echo $ac_n "checking for clock_gettime in -lposix4""... $ac_c" 1>&6 -echo "configure:14160: checking for clock_gettime in -lposix4" >&5 -ac_lib_var=`echo posix4'_'clock_gettime | sed 'y%./+-%__p_%'` -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - ac_save_LIBS="$LIBS" -LIBS="-lposix4 $LIBS" -cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" -fi -rm -f conftest* -LIBS="$ac_save_LIBS" - -fi -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then - echo "$ac_t""yes" 1>&6 - lib_rt="-lposix4" -else - echo "$ac_t""no" 1>&6 -fi - -fi - -fi - - -ac_save_LIBS="$LIBS" -LIBS="$LIBS $lib_rt" -for ac_func in clock_gettime clock_settime clock_getres -do -echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:14209: checking for $ac_func" >&5 -if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -/* Override any gcc2 internal prototype to avoid an error. */ -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char $ac_func(); - -int main() { - -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined (__stub_$ac_func) || defined (__stub___$ac_func) -choke me -#else -$ac_func(); -#endif - -; return 0; } -EOF -if { (eval echo configure:14237: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_func_$ac_func=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_func_$ac_func=no" -fi -rm -f conftest* -fi - -if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` - cat >> confdefs.h <&6 -fi -done - -for ac_func in sched_getparam sched_setparam sched_getscheduler sched_setscheduler -do -echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:14264: checking for $ac_func" >&5 -if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -/* Override any gcc2 internal prototype to avoid an error. */ -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char $ac_func(); - -int main() { - -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined (__stub_$ac_func) || defined (__stub___$ac_func) -choke me -#else -$ac_func(); -#endif - -; return 0; } -EOF -if { (eval echo configure:14292: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_func_$ac_func=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_func_$ac_func=no" -fi -rm -f conftest* -fi - -if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` - cat >> confdefs.h <&6 -fi -done - -for ac_func in sched_yield -do -echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:14319: checking for $ac_func" >&5 -if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -/* Override any gcc2 internal prototype to avoid an error. */ -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char $ac_func(); - -int main() { - -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined (__stub_$ac_func) || defined (__stub___$ac_func) -choke me -#else -$ac_func(); -#endif - -; return 0; } -EOF -if { (eval echo configure:14347: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_func_$ac_func=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_func_$ac_func=no" -fi -rm -f conftest* -fi - -if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` - cat >> confdefs.h <&6 -fi -done - -for ac_func in nanosleep -do -echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:14374: checking for $ac_func" >&5 -if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -/* Override any gcc2 internal prototype to avoid an error. */ -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char $ac_func(); - -int main() { - -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined (__stub_$ac_func) || defined (__stub___$ac_func) -choke me -#else -$ac_func(); -#endif - -; return 0; } -EOF -if { (eval echo configure:14402: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_func_$ac_func=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_func_$ac_func=no" -fi -rm -f conftest* -fi - -if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` - cat >> confdefs.h <&6 -fi -done - -LIBS="$ac_save_LIBS" - -echo $ac_n "checking for /dev/tty""... $ac_c" 1>&6 -echo "configure:14429: checking for /dev/tty" >&5 -if test -r /dev/tty; then - echo yes - cat >> confdefs.h <<\EOF -#define HAVE_DEV_TTY 1 -EOF - -else - echo no -fi -echo $ac_n "checking for /dev/null""... $ac_c" 1>&6 -echo "configure:14440: checking for /dev/null" >&5 -if test -r /dev/null; then - echo yes - cat >> confdefs.h <<\EOF -#define HAVE_DEV_NULL 1 -EOF - -else - echo no -fi -echo $ac_n "checking for /dev/zero""... $ac_c" 1>&6 -echo "configure:14451: checking for /dev/zero" >&5 -if test -r /dev/zero; then - echo yes - cat >> confdefs.h <<\EOF -#define HAVE_DEV_ZERO 1 -EOF - -else - echo no -fi - -UNAME=`uname || true` - -if test ."$UNAME" = .Linux; then - - -echo $ac_n "checking if Linux include file linux/ext2_fs.h is broken""... $ac_c" 1>&6 -echo "configure:14468: checking if Linux include file linux/ext2_fs.h is broken" >&5 -if eval "test \"`echo '$''{'ac_cv_broken_linux_ext2_fs_h'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -#endif -int main() { - -; return 0; } -EOF -if { (eval echo configure:14483: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - ac_cv_broken_linux_ext2_fs_h=no -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - ac_cv_broken_linux_ext2_fs_h=yes -fi -rm -f conftest* -fi - -echo "$ac_t""$ac_cv_broken_linux_ext2_fs_h" 1>&6 -if test $ac_cv_broken_linux_ext2_fs_h = yes; then - cat >> confdefs.h <<\EOF -#define HAVE_BROKEN_LINUX_EXT2_FS_H 1 -EOF - -fi -echo $ac_n "checking if Linux include file /usr/src/linux/include/linux/ext2_fs.h is broken""... $ac_c" 1>&6 -echo "configure:14503: checking if Linux include file /usr/src/linux/include/linux/ext2_fs.h is broken" >&5 -if eval "test \"`echo '$''{'ac_cv_broken_src_linux_ext2_fs_h'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - ___CPPFLAGS=$CPPFLAGS; CPPFLAGS="-I/usr/src/linux/include $CPPFLAGS" - cat > conftest.$ac_ext < -#endif -int main() { - -; return 0; } -EOF -if { (eval echo configure:14519: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - ac_cv_broken_src_linux_ext2_fs_h=no -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - ac_cv_broken_src_linux_ext2_fs_h=yes -fi -rm -f conftest* -fi - -echo "$ac_t""$ac_cv_broken_src_linux_ext2_fs_h" 1>&6 -CPPFLAGS=$___CPPFLAGS -if test $ac_cv_broken_src_linux_ext2_fs_h = yes; then - cat >> confdefs.h <<\EOF -#define HAVE_BROKEN_SRC_LINUX_EXT2_FS_H 1 -EOF - -fi -if test .$ac_cv_broken_linux_ext2_fs_h = .no -o .$ac_cv_broken_src_linux_ext2_fs_h = .no; then - # - # If either /usr/include/linux/ex2_fs.h works or - # /usr/src/linux/include/linux/ex2_fs.h works, we will - # #define HAVE_USABLE_LINUX_EXT2_FS_H - # - # If HAVE_USABLE_LINUX_EXT2_FS_H is defined, a simple - # #include will work. - # - ac_cv_usable_linux_ext2_fs_h=yes - cat >> confdefs.h <<\EOF -#define HAVE_USABLE_LINUX_EXT2_FS_H 1 -EOF - -else - ac_cv_usable_linux_ext2_fs_h=no -fi -echo $ac_n "checking if Linux include file scsi/scsi.h is broken""... $ac_c" 1>&6 -echo "configure:14557: checking if Linux include file scsi/scsi.h is broken" >&5 -if eval "test \"`echo '$''{'ac_cv_broken_scsi_scsi_h'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -#endif -int main() { - -; return 0; } -EOF -if { (eval echo configure:14572: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - ac_cv_broken_scsi_scsi_h=no -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - ac_cv_broken_scsi_scsi_h=yes -fi -rm -f conftest* -fi - -echo "$ac_t""$ac_cv_broken_scsi_scsi_h" 1>&6 -if test $ac_cv_broken_scsi_scsi_h = yes; then - cat >> confdefs.h <<\EOF -#define HAVE_BROKEN_SCSI_SCSI_H 1 -EOF - -fi -echo $ac_n "checking if Linux include file /usr/src/linux/include/scsi/scsi.h is broken""... $ac_c" 1>&6 -echo "configure:14592: checking if Linux include file /usr/src/linux/include/scsi/scsi.h is broken" >&5 -if eval "test \"`echo '$''{'ac_cv_broken_src_scsi_scsi_h'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - ___CPPFLAGS=$CPPFLAGS; CPPFLAGS="-I/usr/src/linux/include $CPPFLAGS" - cat > conftest.$ac_ext < -#endif -int main() { - -; return 0; } -EOF -if { (eval echo configure:14608: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - ac_cv_broken_src_scsi_scsi_h=no -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - ac_cv_broken_src_scsi_scsi_h=yes -fi -rm -f conftest* -fi - -echo "$ac_t""$ac_cv_broken_src_scsi_scsi_h" 1>&6 -CPPFLAGS=$___CPPFLAGS -if test $ac_cv_broken_src_scsi_scsi_h = yes; then - cat >> confdefs.h <<\EOF -#define HAVE_BROKEN_SRC_SCSI_SCSI_H 1 -EOF - -fi -echo $ac_n "checking if Linux include file scsi/sg.h is broken""... $ac_c" 1>&6 -echo "configure:14629: checking if Linux include file scsi/sg.h is broken" >&5 -if eval "test \"`echo '$''{'ac_cv_broken_scsi_sg_h'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -#include -#endif -int main() { - -; return 0; } -EOF -if { (eval echo configure:14645: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - ac_cv_broken_scsi_sg_h=no -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - ac_cv_broken_scsi_sg_h=yes -fi -rm -f conftest* -fi - -echo "$ac_t""$ac_cv_broken_scsi_sg_h" 1>&6 -if test $ac_cv_broken_scsi_sg_h = yes; then - cat >> confdefs.h <<\EOF -#define HAVE_BROKEN_SCSI_SG_H 1 -EOF - -fi -echo $ac_n "checking if Linux include file /usr/src/linux/include/scsi/sg.h is broken""... $ac_c" 1>&6 -echo "configure:14665: checking if Linux include file /usr/src/linux/include/scsi/sg.h is broken" >&5 -if eval "test \"`echo '$''{'ac_cv_broken_src_scsi_sg_h'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - ___CPPFLAGS=$CPPFLAGS; CPPFLAGS="-I/usr/src/linux/include $CPPFLAGS" - cat > conftest.$ac_ext < -#include -#endif -int main() { - -; return 0; } -EOF -if { (eval echo configure:14682: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - ac_cv_broken_src_scsi_sg_h=no -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - ac_cv_broken_src_scsi_sg_h=yes -fi -rm -f conftest* -fi - -echo "$ac_t""$ac_cv_broken_src_scsi_sg_h" 1>&6 -CPPFLAGS=$___CPPFLAGS -if test $ac_cv_broken_src_scsi_sg_h = yes; then - cat >> confdefs.h <<\EOF -#define HAVE_BROKEN_SRC_SCSI_SG_H 1 -EOF - -fi - -if test .$ac_cv_broken_src_scsi_scsi_h = .yes; then - may_linux_src_include=no -fi -if test .$ac_cv_broken_src_linux_ext2_fs_h = .yes; then - may_linux_src_include=no -fi -if test .$may_linux_src_include = .no; then - echo - echo "Warning: *** /usr/src/linux/include contains broken include files ***" - echo "Warning: *** /usr/src/linux/include is not used this reason ***" - echo "Warning: This may result in the inability to use recent Linux kernel interfaces" - echo -fi -if test .$ac_cv_usable_linux_ext2_fs_h = .no; then - echo - echo "Warning: *** linux/ext2_fs.h is not usable at all ***" - echo "Warning: *** This makes it impossible to support Linux file flags ***" - echo "You may try to compile using 'make COPTX=-DTRY_EXT2_FS'" - echo - sleep 10 -fi -fi # Linux only tests - - - - - - - - - - - - - - - - - - -trap '' 1 2 15 -cat > confcache <<\EOF -# This file is a shell script that caches the results of configure -# tests run on this system so they can be shared between configure -# scripts and configure runs. It is not useful on other systems. -# If it contains results you don't want to keep, you may remove or edit it. -# -# By default, configure uses ./config.cache as the cache file, -# creating it if it does not exist already. You can give configure -# the --cache-file=FILE option to use a different cache file; that is -# what configure does when it calls configure scripts in -# subdirectories, so they share the cache. -# Giving --cache-file=/dev/null disables caching, for debugging configure. -# config.status only pays attention to the cache file if you give it the -# --recheck option to rerun configure. -# -EOF -# The following way of writing the cache mishandles newlines in values, -# but we know of no workaround that is simple, portable, and efficient. -# So, don't put newlines in cache variables' values. -# Ultrix sh set writes to stderr and can't be redirected directly, -# and sets the high bit in the cache file unless we assign to the vars. -(set) 2>&1 | - case `(ac_space=' '; set | grep ac_space) 2>&1` in - *ac_space=\ *) - # `set' does not quote correctly, so add quotes (double-quote substitution - # turns \\\\ into \\, and sed turns \\ into \). - sed -n \ - -e "s/'/'\\\\''/g" \ - -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p" - ;; - *) - # `set' quotes correctly as required by POSIX, so do not add quotes. - sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p' - ;; - esac >> confcache -if cmp -s $cache_file confcache; then - : -else - if test -w $cache_file; then - echo "updating cache $cache_file" - cat confcache > $cache_file - else - echo "not updating unwritable cache $cache_file" - fi -fi -rm -f confcache - -trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15 - -test "x$prefix" = xNONE && prefix=$ac_default_prefix -# Let make expand exec_prefix. -test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' - -# Any assignment to VPATH causes Sun make to only execute -# the first set of double-colon rules, so remove it if not needed. -# If there is a colon in the path, we need to keep it. -if test "x$srcdir" = x.; then - ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d' -fi - -trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15 - -DEFS=-DHAVE_CONFIG_H - -# Without the "./", some shells look in PATH for config.status. -: ${CONFIG_STATUS=./config.status} - -echo creating $CONFIG_STATUS -rm -f $CONFIG_STATUS -cat > $CONFIG_STATUS </dev/null | sed 1q`: -# -# $0 $ac_configure_args -# -# Compiler output produced by configure, useful for debugging -# configure, is in ./config.log if it exists. - -ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]" -for ac_option -do - case "\$ac_option" in - -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) - echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion" - exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;; - -version | --version | --versio | --versi | --vers | --ver | --ve | --v) - echo "$CONFIG_STATUS generated by autoconf version 2.13" - exit 0 ;; - -help | --help | --hel | --he | --h) - echo "\$ac_cs_usage"; exit 0 ;; - *) echo "\$ac_cs_usage"; exit 1 ;; - esac -done - -ac_given_srcdir=$srcdir - -trap 'rm -fr `echo "rules.cnf xconfig.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15 -EOF -cat >> $CONFIG_STATUS < conftest.subs <<\\CEOF -$ac_vpsub -$extrasub -s%@SHELL@%$SHELL%g -s%@CFLAGS@%$CFLAGS%g -s%@CPPFLAGS@%$CPPFLAGS%g -s%@CXXFLAGS@%$CXXFLAGS%g -s%@FFLAGS@%$FFLAGS%g -s%@DEFS@%$DEFS%g -s%@LDFLAGS@%$LDFLAGS%g -s%@LIBS@%$LIBS%g -s%@exec_prefix@%$exec_prefix%g -s%@prefix@%$prefix%g -s%@program_transform_name@%$program_transform_name%g -s%@bindir@%$bindir%g -s%@sbindir@%$sbindir%g -s%@libexecdir@%$libexecdir%g -s%@datadir@%$datadir%g -s%@sysconfdir@%$sysconfdir%g -s%@sharedstatedir@%$sharedstatedir%g -s%@localstatedir@%$localstatedir%g -s%@libdir@%$libdir%g -s%@includedir@%$includedir%g -s%@oldincludedir@%$oldincludedir%g -s%@infodir@%$infodir%g -s%@mandir@%$mandir%g -s%@host@%$host%g -s%@host_alias@%$host_alias%g -s%@host_cpu@%$host_cpu%g -s%@host_vendor@%$host_vendor%g -s%@host_os@%$host_os%g -s%@OBJEXT@%$OBJEXT%g -s%@EXEEXT@%$EXEEXT%g -s%@XEXEEXT@%$XEXEEXT%g -s%@CPP@%$CPP%g -s%@RANLIB@%$RANLIB%g -s%@SET_MAKE@%$SET_MAKE%g -s%@LIBOBJS@%$LIBOBJS%g -s%@ALLOCA@%$ALLOCA%g -s%@may_linux_src_include@%$may_linux_src_include%g -s%@largefile_cc_opt@%$largefile_cc_opt%g -s%@lib_crypt@%$lib_crypt%g -s%@lib_resolv@%$lib_resolv%g -s%@lib_intl@%$lib_intl%g -s%@lib_iconv@%$lib_iconv%g -s%@scsi_lib@%$scsi_lib%g -s%@lib_scsi@%$lib_scsi%g -s%@lib_acl@%$lib_acl%g -s%@lib_acl_test@%$lib_acl_test%g -s%@lib_attr@%$lib_attr%g -s%@lib_secdb@%$lib_secdb%g -s%@lib_pthread@%$lib_pthread%g -s%@lib_rt@%$lib_rt%g - -CEOF -EOF - -cat >> $CONFIG_STATUS <<\EOF - -# Split the substitutions into bite-sized pieces for seds with -# small command number limits, like on Digital OSF/1 and HP-UX. -ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script. -ac_file=1 # Number of current file. -ac_beg=1 # First line for current file. -ac_end=$ac_max_sed_cmds # Line after last line for current file. -ac_more_lines=: -ac_sed_cmds="" -while $ac_more_lines; do - if test $ac_beg -gt 1; then - sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file - else - sed "${ac_end}q" conftest.subs > conftest.s$ac_file - fi - if test ! -s conftest.s$ac_file; then - ac_more_lines=false - rm -f conftest.s$ac_file - else - if test -z "$ac_sed_cmds"; then - ac_sed_cmds="sed -f conftest.s$ac_file" - else - ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file" - fi - ac_file=`expr $ac_file + 1` - ac_beg=$ac_end - ac_end=`expr $ac_end + $ac_max_sed_cmds` - fi -done -if test -z "$ac_sed_cmds"; then - ac_sed_cmds=cat -fi -EOF - -cat >> $CONFIG_STATUS <> $CONFIG_STATUS <<\EOF -for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then - # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". - case "$ac_file" in - *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'` - ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; - *) ac_file_in="${ac_file}.in" ;; - esac - - # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories. - - # Remove last slash and all that follows it. Not all systems have dirname. - ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'` - if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then - # The file is in a subdirectory. - test ! -d "$ac_dir" && mkdir "$ac_dir" - ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`" - # A "../" for each directory in $ac_dir_suffix. - ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'` - else - ac_dir_suffix= ac_dots= - fi - - case "$ac_given_srcdir" in - .) srcdir=. - if test -z "$ac_dots"; then top_srcdir=. - else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;; - /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;; - *) # Relative path. - srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix" - top_srcdir="$ac_dots$ac_given_srcdir" ;; - esac - - - echo creating "$ac_file" - rm -f "$ac_file" - configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure." - case "$ac_file" in - *Makefile*) ac_comsub="1i\\ -# $configure_input" ;; - *) ac_comsub= ;; - esac - - ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"` - sed -e "$ac_comsub -s%@configure_input@%$configure_input%g -s%@srcdir@%$srcdir%g -s%@top_srcdir@%$top_srcdir%g -" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file -fi; done -rm -f conftest.s* - -# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where -# NAME is the cpp macro being defined and VALUE is the value it is being given. -# -# ac_d sets the value in "#define NAME VALUE" lines. -ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)' -ac_dB='\([ ][ ]*\)[^ ]*%\1#\2' -ac_dC='\3' -ac_dD='%g' -# ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE". -ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' -ac_uB='\([ ]\)%\1#\2define\3' -ac_uC=' ' -ac_uD='\4%g' -# ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE". -ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' -ac_eB='$%\1#\2define\3' -ac_eC=' ' -ac_eD='%g' - -if test "${CONFIG_HEADERS+set}" != set; then -EOF -cat >> $CONFIG_STATUS <> $CONFIG_STATUS <<\EOF -fi -for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then - # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". - case "$ac_file" in - *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'` - ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; - *) ac_file_in="${ac_file}.in" ;; - esac - - echo creating $ac_file - - rm -f conftest.frag conftest.in conftest.out - ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"` - cat $ac_file_inputs > conftest.in - -EOF - -# Transform confdefs.h into a sed script conftest.vals that substitutes -# the proper values into config.h.in to produce config.h. And first: -# Protect against being on the right side of a sed subst in config.status. -# Protect against being in an unquoted here document in config.status. -rm -f conftest.vals -cat > conftest.hdr <<\EOF -s/[\\&%]/\\&/g -s%[\\$`]%\\&%g -s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp -s%ac_d%ac_u%gp -s%ac_u%ac_e%gp -EOF -sed -n -f conftest.hdr confdefs.h > conftest.vals -rm -f conftest.hdr - -# This sed command replaces #undef with comments. This is necessary, for -# example, in the case of _POSIX_SOURCE, which is predefined and required -# on some systems where configure will not decide to define it. -cat >> conftest.vals <<\EOF -s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */% -EOF - -# Break up conftest.vals because some shells have a limit on -# the size of here documents, and old seds have small limits too. - -rm -f conftest.tail -while : -do - ac_lines=`grep -c . conftest.vals` - # grep -c gives empty output for an empty file on some AIX systems. - if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi - # Write a limited-size here document to conftest.frag. - echo ' cat > conftest.frag <> $CONFIG_STATUS - sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS - echo 'CEOF - sed -f conftest.frag conftest.in > conftest.out - rm -f conftest.in - mv conftest.out conftest.in -' >> $CONFIG_STATUS - sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail - rm -f conftest.vals - mv conftest.tail conftest.vals -done -rm -f conftest.vals - -cat >> $CONFIG_STATUS <<\EOF - rm -f conftest.frag conftest.h - echo "/* $ac_file. Generated automatically by configure. */" > conftest.h - cat conftest.in >> conftest.h - rm -f conftest.in - if cmp -s $ac_file conftest.h 2>/dev/null; then - echo "$ac_file is unchanged" - rm -f conftest.h - else - # Remove last slash and all that follows it. Not all systems have dirname. - ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'` - if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then - # The file is in a subdirectory. - test ! -d "$ac_dir" && mkdir "$ac_dir" - fi - rm -f $ac_file - mv conftest.h $ac_file - fi -fi; done - -EOF -cat >> $CONFIG_STATUS <> $CONFIG_STATUS <<\EOF - -exit 0 -EOF -chmod +x $CONFIG_STATUS -rm -fr confdefs* $ac_clean_files -test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1 - diff -Nru cdrtools-2.01.01a33/conf/configure.in cdrtools-3.02a09/conf/configure.in --- cdrtools-2.01.01a33/conf/configure.in 2007-07-10 03:58:54.000000000 +0000 +++ cdrtools-3.02a09/conf/configure.in 1970-01-01 00:00:00.000000000 +0000 @@ -1,527 +0,0 @@ -dnl @(#)configure.in 1.139 07/07/10 Copyright 1998-2007 J. Schilling -dnl Process this file with autoconf to produce a configure script. -AC_REVISION($Revision$)dnl - -AC_INIT(xconfig.h.in) -AC_CONFIG_HEADER(xconfig.h) -AC_CANONICAL_HOST - -dnl Checks for programs. -AC_SHELL_BASH -dnl CC=${CC-cc} -dnl AC_PROG_CC -AC_OBJEXT -AC_EXEEXT -AC_PROG_CPP -dnl AC_PROG_INSTALL -AC_PROG_RANLIB -AC_PROG_MAKE_SET - -dnl Checks for header files. -AC_HEADER_STDC -AC_HEADER_INTTYPES -AC_HEADER_DIRENT -AC_HEADER_STAT -AC_HEADER_TIME -AC_HEADER_SYS_WAIT -dnl check whether select() needs sys/select.h -AC_HEADER_SYS_SELECT -dnl check whether select() needs sys/socket.h (BeOS) -AC_HEADER_SELECT2 -AC_CHECK_HEADERS(stdio.h varargs.h stdarg.h stdlib.h stddef.h string.h strings.h unistd.h fcntl.h sys/file.h) -AC_CHECK_HEADERS(getopt.h) -AC_CHECK_HEADERS(limits.h) -AC_CHECK_HEADERS(a.out.h aouthdr.h elf.h) -AC_CHECK_HEADERS(malloc.h termios.h termio.h) -AC_CHECK_HEADERS(pwd.h grp.h sys/acl.h acllib.h acl/libacl.h) -AC_CHECK_HEADERS(shadow.h syslog.h) -AC_CHECK_HEADERS(sys/time.h sys/times.h utime.h sys/utime.h sys/ioctl.h sys/filio.h sys/param.h sys/systeminfo.h sys/sysctl.h) -AC_CHECK_HEADERS(sys/syscall.h) -AC_CHECK_HEADERS(mach/machine.h) -AC_CHECK_HEADERS(mntent.h sys/mntent.h sys/mnttab.h sys/mount.h) -AC_CHECK_HEADERS(wait.h sys/resource.h procfs.h sys/procfs.h) -AC_CHECK_HEADERS(sys/utsname.h sys/priocntl.h sys/rtpriocntl.h) -AC_CHECK_HEADERS(sys/mtio.h sys/tape.h sys/mman.h linux/pg.h camlib.h) -AC_CHECK_HEADERS(sys/shm.h sys/ipc.h) -AC_CHECK_HEADERS(sys/dkio.h sys/dklabel.h sun/dkio.h sun/dklabel.h) -AC_CHECK_HEADERS(sys/types.h sys/stat.h types.h stat.h) -AC_CHECK_HEADERS(sys/stypes.h sys/filedesc.h) -AC_CHECK_HEADERS(poll.h sys/poll.h sys/select.h) -AC_CHECK_HEADERS(netdb.h sys/socket.h netinet/in.h) -AC_CHECK_HEADERS(ieeefp.h fp.h) -AC_CHECK_HEADERS(values.h float.h) -AC_CHECK_HEADERS(arpa/inet.h) -AC_CHECK_HEADERS(bsd/dev/scsireg.h) -dnl Check for HP-UX sys/bsdtty.h (needed for TIOCGPGRP) -AC_CHECK_HEADERS(sys/bsdtty.h) -dnl Check for Linux kernel definitions -AC_CHECK_HEADERS(linux/types.h linux/gfp.h asm/types.h) -dnl Check for BeOS kernel definitions (e.g. B_PAGE_SIZE) -AC_CHECK_HEADERS(OS.h) -dnl Check for moving Linux targets caused by missing concepts -AC_CHECK_HEADERS(ext2fs/ext2_fs.h) -dnl Check for Linux Extended File Attributes definitions -AC_CHECK_HEADERS(attr/xattr.h) -dnl Check for Mas OS X ac, av, env delarations -AC_CHECK_HEADERS(crt_externs.h) -AC_CHECK_HEADERS(fnmatch.h) -AC_CHECK_HEADERS(libintl.h locale.h langinfo.h nl_types.h) -AC_CHECK_HEADERS(wchar.h iconv.h) -AC_CHECK_HEADERS(priv.h) -AC_CHECK_HEADERS(exec_attr.h secdb.h) -AC_CHECK_HEADERS(direct.h) -AC_CHECK_HEADERS(pthread.h thread.h) - -dnl from aclocal.m4 (uses AC_TRY_COMPILE) -AC_HEADER_MAKEDEV - -dnl don't use GNU original -dnl from GNU acspecific.m4 (uses AC_CHECK_HEADER) -dnl AC_HEADER_MAJOR - -AC_CHECK_MINOR_BITS -AC_CHECK_MINOR_NONCONTIG - -AC_HEADER_USG_STDIO -AC_HEADER_ERRNO_DEF - -dnl Checks for typedefs, structures, and compiler characteristics. -AC_C_CONST -AC_C_BIGENDIAN -AC_C_BITFIELDS -AC_TYPE_SIGNAL -AC_TYPE_GETGROUPS -AC_TYPE_LONGLONG -AC_TYPE___INT64 -AC_TYPE_PROTOTYPES -dnl AC_USER_MALLOC must be past AC_CHECK_FUNCS(strdup) -AC_DYN_ARRAYS - -AC_TYPE_UID_T -AC_TYPE_SIZE_T -AC_CHECK_TYPE(ssize_t, int) -AC_TYPE_PID_T -AC_TYPE_OFF_T -AC_TYPE_MODE_T -AC_TYPE_TIME_T -AC_CHECK_TYPE(caddr_t, char *) -AC_CHECK_TYPE(daddr_t, long) -AC_CHECK_TYPE(dev_t, unsigned short) -AC_CHECK_TYPE(major_t, dev_t) -AC_CHECK_TYPE(minor_t, dev_t) -AC_CHECK_TYPE(ino_t, unsigned long) -AC_CHECK_TYPE(nlink_t, unsigned long) -AC_CHECK_TYPE(blksize_t, long) -AC_CHECK_TYPE(blkcnt_t, Intmax_t) -AC_TYPE_CLOCK_T -AC_TYPE_SOCKLEN_T -AC_HAVE_TYPE([#include ], greg_t) - -dnl These types are present on all UNIX systems but should be avoided -dnl for portability. -dnl On Apollo/Domain OS we don't have them.... -dnl Better include and use Uchar, Uint & Ulong -AC_CHECK_TYPE(u_char, unsigned char) -AC_CHECK_TYPE(u_short, unsigned short) -AC_CHECK_TYPE(u_int, unsigned int) -AC_CHECK_TYPE(u_long, unsigned long) - -AC_CHECK_SIZEOF(char) -AC_CHECK_SIZEOF(short int) -AC_CHECK_SIZEOF(int) -AC_CHECK_SIZEOF(long int) -AC_CHECK_SIZEOF(long long) -AC_CHECK_SIZEOF(__int64) -AC_CHECK_SIZEOF(char *) - -AC_CHECK_SIZEOF(unsigned char) -AC_CHECK_SIZEOF(unsigned short int) -AC_CHECK_SIZEOF(unsigned int) -AC_CHECK_SIZEOF(unsigned long int) -AC_CHECK_SIZEOF(unsigned long long) -AC_CHECK_SIZEOF(unsigned __int64) -AC_CHECK_SIZEOF(unsigned char *) - -dnl # AC_TYPE_SIZE_T_ # Defines HAVE_SIZE_T / NO_SIZE_T -AC_TYPE_CHAR -AC_TYPE_VA_LIST -AC_STRUCT_TIMEVAL -AC_STRUCT_TIMEZONE -AC_STRUCT_MTGET_TYPE -AC_STRUCT_MTGET_MODEL -AC_STRUCT_MTGET_DSREG -AC_STRUCT_MTGET_DSREG1 -AC_STRUCT_MTGET_DSREG2 -AC_STRUCT_MTGET_GSTAT -AC_STRUCT_MTGET_ERREG -AC_STRUCT_MTGET_RESID -AC_STRUCT_MTGET_FILENO -AC_STRUCT_MTGET_BLKNO -AC_STRUCT_MTGET_FLAGS -AC_STRUCT_MTGET_BF -AC_STRUCT_RUSAGE -AC_STRUCT_SI_UTIME -AC_STRUCT_SOCKADDR_STORAGE -AC_STRUCT_UNION_SEMUN -AC_STRUCT_UNION_WAIT -AC_STRUCT_ST_SPARE1 -AC_STRUCT_ST_ATIMENSEC -AC_STRUCT_ST_NSEC -AC_STRUCT_ST__TIM -AC_STRUCT_ST_ATIMESPEC -AC_STRUCT_ST_BLKSIZE -AC_STRUCT_ST_BLOCKS -AC_STRUCT_ST_FSTYPE -AC_STRUCT_ST_ACLCNT -AC_STRUCT_ST_RDEV -AC_STRUCT_ST_FLAGS -AC_STRUCT_DIRENT_D_INO -AC_STRUCT_DIR_DD_FD -AC_STRUCT_UTSNAME_PROCESSOR -AC_STRUCT_UTSNAME_SYSNAME_HOST -AC_STRUCT_UTSNAME_RELEASE_HOST -AC_STRUCT_UTSNAME_VERSION_HOST - -dnl Check whether we are able to get the address of a function -dnl or whether the symbol is declared and usable as rhs -AC_CHECK_DECLARE([ -#include -#include ], stat) -AC_CHECK_DECLARE([ -#include -#include ], lstat) - -dnl Checks for library functions. -AC_FUNC_WAIT3 -AC_FUNC_MLOCK -AC_FUNC_MLOCKALL -AC_FUNC_VA_COPY -AC_FUNC__VA_COPY -AC_FUNC_ECVT -AC_FUNC_FCVT -AC_FUNC_GCVT -AC_FUNC_DTOA -AC_FUNC_DTOA_R -jsAC_FUNC_MMAP -AC_MMAP_SIZEP -AC_FUNC_SMMAP -AC_FUNC_ALLOCA -AC_FUNC_QUOTAIOCTL -AC_FUNC_FCNTL_LOCKF -AC_FUNC_UNAME -AC_FUNC_VFORK -AC_FUNC_SYS_SIGLIST -AC_FUNC_BSD_GETPGRP -AC_FUNC_BSD_SETPGRP -AC_FUNC_C99_ISINF -AC_FUNC_C99_ISNAN -AC_FUNC_SIGSETJMP -AC_FUNC_SIGLONGJMP -AC_CHECK_FUNCS(access eaccess euidaccess) -AC_CHECK_FUNCS(memchr memcpy memmove memset) -AC_CHECK_FUNCS(brk sbrk strerror nice flock lockf fchdir statvfs quotactl) -AC_CHECK_FUNCS(dup dup2) -AC_CHECK_FUNCS(getcwd shmat semget) -AC_CHECK_FUNCS(lstat readlink symlink link rename mkfifo mknod) -AC_CHECK_FUNCS(setreuid setresuid seteuid setuid) -AC_CHECK_FUNCS(setregid setresgid setegid setgid) -AC_CHECK_FUNCS(getuid geteuid getgid getegid) -AC_CHECK_FUNCS(getpid getppid) -AC_CHECK_FUNCS(getpgid setpgid) -AC_CHECK_FUNCS(getpgrp setpgrp) -dnl getspwnam() on HP-UX is in libsec.a -AC_CHECK_FUNCS(getspnam getspwnam) -AC_CHECK_FUNCS(sync fsync fork wait wait4 waitid waitpid getrusage getrlimit setrlimit ulimit) -AC_CHECK_FUNCS(execl execle execlp execv execve execvp) -AC_CHECK_FUNCS(getexecname) -AC_CHECK_FUNCS(gethostid gethostname getdomainname getpagesize getdtablesize) -AC_CHECK_FUNCS(gettimeofday settimeofday time stime gethrtime) -AC_CHECK_FUNCS(ftime tzset mktime gmtime localtime timegm timelocal) -AC_CHECK_FUNCS(ctime cftime ascftime strftime) -AC_CHECK_FUNCS(poll select chown fchown lchown chmod fchmod lchmod times utime utimes futimes lutimes) -dnl AC_CHECK_FUNCS(ecvt fcvt gcvt) -AC_CHECK_FUNCS(ecvt_r fcvt_r gcvt_r) -AC_CHECK_FUNCS(econvert fconvert gconvert) -AC_CHECK_FUNCS(isinf isnan) -AC_CHECK_FUNCS(rand drand48) -AC_CHECK_FUNCS(strtol strtoll strtoul strtoull strtod) -AC_CHECK_FUNCS(setpriority DosSetPriority) -AC_CHECK_FUNCS(DosAllocSharedMem) -AC_CHECK_FUNCS(seekdir fdopendir) -dnl These are POSIX.1 functions (syscalls on Solaris) -AC_CHECK_FUNCS(openat fstatat fchownat futimesat renameat unlinkat) -dnl This is a library function for the Solaris extended attr interface -AC_CHECK_FUNCS(attropen) -dnl This appeared on Solaris 11 Build 63 -AC_CHECK_FUNCS(__accessat) -dnl This are POSIX extensions not found on Solaris 10 -AC_CHECK_FUNCS(mkdirat faccessat fchmodat linkat mkfifoat mknodat readlinkat symlinkat) -AC_CHECK_FUNCS(popen pclose _popen _pclose) -AC_CHECK_FUNCS(strsignal str2sig sig2str) -AC_CHECK_FUNCS(killpg sigrelse sigprocmask sigsetmask sigset) -AC_CHECK_FUNCS(sleep usleep yield) -AC_CHECK_FUNCS(tcgetattr tcsetattr tcgetpgrp tcsetpgrp) -AC_CHECK_FUNCS(putenv setenv snprintf strcasecmp strncpy strlcpy strdup) -AC_CHECK_FUNCS(valloc) -AC_CHECK_FUNCS(madvise) -AC_CHECK_FUNCS(mktemp mkstemp) -AC_CHECK_FUNCS(chflags fchflags fflagstostr strtofflags) -AC_CHECK_FUNCS(fnmatch) -AC_CHECK_FUNCS(truncate ftruncate) -AC_CHECK_FUNCS(getppriv setppriv priv_set) -AC_CHECK_FUNCS(setlocale localeconv nl_langinfo) -AC_CHECK_FUNCS(clone_area create_area delete_area) - -dnl Check whether a symbol is either defined in an include file or -dnl otherwise usable (e.g. as function) -AC_CHECK_DFUNC([#include ], dirfd) - -dnl Checks for typedefs, structures, and compiler characteristics. -dnl that need results from the AC_CHECK_FUNCS() calls. -AC_USER_MALLOC -AC_VAR_TIMEZONE - -dnl Checks for OS characteristics. -AC_HARD_SYMLINKS -AC_LINK_NOFOLLOW -AC_ACCESS_E_OK - -dnl Need to check this in default compilation mode to find out -dnl whether this platform supports both functions by default too. -dnl We cannot use the standard tests because they would find -dnl that fseeko()/ftello() are present in small file mode on -dnl Limnux while there is no prototype for these functions. -AC_SMALL_FSEEKO -AC_SMALL_FTELLO - -dnl ??? AC_CHECK_LIB(socket, socket, lib_socket="-lsocket") -dnl -AC_CHECK_LIB(socket, rcmd, lib_socket="-lsocket") -ac_save_LIBS="$LIBS" -LIBS="$LIBS $lib_socket" -AC_CHECK_LIB(nsl, inet_ntoa, lib_nsl="-lnsl") -LIBS="$LIBS $lib_nsl" -AC_CHECK_FUNCS(rcmd socket socketpair) -AC_CHECK_FUNCS(getservbyname inet_ntoa) -AC_CHECK_FUNCS(getaddrinfo getnameinfo) -LIBS="$ac_save_LIBS" - -ac_save_LIBS="$LIBS" -AC_CHECK_LIB(c, res_init, lib_resolv="", - [AC_CHECK_LIB(resolv, res_init, lib_resolv="-lresolv")]) -LIBS="$ac_save_LIBS" - -dnl Check for largefile support -dnl Do this last to make sure that no large file definition -dnl in confdefs.h will modify our results -AC_SYS_LARGEFILE -dnl Warning do not run this test. it interferes with the test -dnl AC_CHECK_FUNCS(fseeko ftello) from above. -dnl The test AC_HAVE_LARGEFILES will check whether ftello/fseeko -dnl are available in Large File mode -dnl AC_FUNC_FSEEKO -AC_HAVE_LARGEFILES - -AC_DEFINE_UNQUOTED_STRING(HOST_ALIAS,$host_alias) -AC_DEFINE_UNQUOTED_STRING(HOST_SUB,$host) -AC_DEFINE_UNQUOTED_STRING(HOST_CPU,$host_cpu) -AC_DEFINE_UNQUOTED_STRING(HOST_VENDOR,$host_vendor) -AC_DEFINE_UNQUOTED_STRING(HOST_OS,$host_os) - -dnl AC_CHECK_LIB(crypt, crypt, lib_crypt="-lcrypt") - -AC_CHECK_LIB(c, crypt, lib_crypt="", - [AC_CHECK_LIB(crypt, crypt, lib_crypt="-lcrypt")]) - -ac_save_LIBS="$LIBS" -LIBS="$LIBS $lib_crypt" -AC_CHECK_FUNCS(crypt) -LIBS="$ac_save_LIBS" - -AC_CHECK_LIB(c, gettext, lib_intl="", - [AC_CHECK_LIB(intl, gettext, lib_intl="-lintl")]) - -ac_save_LIBS="$LIBS" -LIBS="$LIBS $lib_intl" -AC_CHECK_FUNCS(gettext) -LIBS="$ac_save_LIBS" - -AC_CHECK_LIB(c, iconv_open, lib_iconv="", - [AC_CHECK_LIB(iconv, iconv_open, lib_iconv="-liconv", - [AC_CHECK_LIB(iconv, libiconv_open, lib_iconv="-liconv")])]) - -ac_save_LIBS="$LIBS" -LIBS="$LIBS $lib_iconv" -AC_CHECK_FUNCS(iconv iconv_open iconv_close) -dnl GNU libiconv is written in order to make "configure" fail :-( -AC_CHECK_FUNCS(libiconv libiconv_open libiconv_close) -LIBS="$ac_save_LIBS" - -if test $ac_cv_header_camlib_h = yes; then - scsi_lib=-lcam - lib_scsi=-lcam -fi - -if test "$ac_cv_header_sys_acl_h" = yes; then - - AC_CHECKING(for Posix Access Control List support) - AC_CHECK_LIB(acl, acl_get_file, lib_acl="-lacl") - AC_CHECK_LIB(pacl, acl_get_file, lib_acl="-lpacl") - - if test ".$lib_acl" != .; then - lib_acl_test="$lib_acl" - fi - - ac_save_LIBS="$LIBS" - LIBS="$LIBS $lib_acl" - AC_CHECK_FUNCS(acl_get_file acl_set_file acl_from_text acl_to_text acl_free acl_delete_def_file) - AC_CHECK_FUNCS(acl_extended_file) - LIBS="$ac_save_LIBS" - - AC_CHECKING(for Solaris Access Control List support) - AC_CHECK_LIB(sec, acltotext, lib_acl="-lsec") - ac_save_LIBS="$LIBS" - LIBS="$LIBS $lib_acl" - AC_CHECK_FUNCS(acl facl aclfromtext acltotext) - LIBS="$ac_save_LIBS" - - dnl On Solaris, there is no need for lib_acl_test ad acl(2) is in -libc - - AC_CHECKING(for HP-UX Access Control List support) - AC_CHECK_FUNCS(getacl fgetacl setacl fsetacl strtoacl acltostr cpacl fcpacl chownacl setaclentry fsetaclentry) - - dnl XXX lib_acl_test: How do we test for ACLs on HP-UX? - -fi - -if test "$ac_cv_header_attr_xattr_h" = yes; then - AC_CHECKING(for Linux flavor Extended Attribute support) - AC_CHECK_LIB(attr, getxattr, lib_attr="-lattr") - ac_save_LIBS="$LIBS" - LIBS="$LIBS $lib_attr" - AC_CHECK_FUNCS(getxattr setxattr listxattr lgetxattr lsetxattr llistxattr) - LIBS="$ac_save_LIBS" -fi - -AC_CHECKING(for RBAC support) -AC_CHECK_LIB(secdb, getuserattr, lib_secdb="-lsecdb") -ac_save_LIBS="$LIBS" -LIBS="$LIBS $lib_secdb" -AC_CHECK_FUNCS(getauthattr getuserattr getexecattr getprofattr) -LIBS="$ac_save_LIBS" - -AC_CHECK_FUNCS(thr_yield) - -AC_CHECK_LIB(pthread, pthread_create, lib_pthread="-lpthread", - [AC_CHECK_LIB(c, pthread_create, lib_pthread="")]) - -ac_save_LIBS="$LIBS" -LIBS="$LIBS $lib_pthread" -AC_CHECK_FUNCS(pthread_create pthread_kill) -AC_CHECK_FUNCS(pthread_mutex_lock pthread_cond_wait pthread_spin_lock) -LIBS="$ac_save_LIBS" - -AC_CHECK_LIB(c, clock_gettime, lib_rt="", - [AC_CHECK_LIB(rt, clock_gettime, lib_rt="-lrt", - [AC_CHECK_LIB(posix4, clock_gettime, lib_rt="-lposix4")])]) - -ac_save_LIBS="$LIBS" -LIBS="$LIBS $lib_rt" -AC_CHECK_FUNCS(clock_gettime clock_settime clock_getres) -AC_CHECK_FUNCS(sched_getparam sched_setparam sched_getscheduler sched_setscheduler) -AC_CHECK_FUNCS(sched_yield) -AC_CHECK_FUNCS(nanosleep) -LIBS="$ac_save_LIBS" - -dnl Misc OS checks. -AC_MSG_CHECKING(for /dev/tty) -if test -r /dev/tty; then - echo yes - AC_DEFINE(HAVE_DEV_TTY) -else - echo no -fi -AC_MSG_CHECKING(for /dev/null) -if test -r /dev/null; then - echo yes - AC_DEFINE(HAVE_DEV_NULL) -else - echo no -fi -AC_MSG_CHECKING(for /dev/zero) -if test -r /dev/zero; then - echo yes - AC_DEFINE(HAVE_DEV_ZERO) -else - echo no -fi - -dnl Checks for OS madness. -UNAME=`uname || true` - -if test ."$UNAME" = .Linux; then - -dnl Linux madness tests: - -AC_BROKEN_LINUX_EXT2_FS_H -AC_BROKEN_SRC_LINUX_EXT2_FS_H -if test .$ac_cv_broken_linux_ext2_fs_h = .no -o .$ac_cv_broken_src_linux_ext2_fs_h = .no; then - # - # If either /usr/include/linux/ex2_fs.h works or - # /usr/src/linux/include/linux/ex2_fs.h works, we will - # #define HAVE_USABLE_LINUX_EXT2_FS_H - # - # If HAVE_USABLE_LINUX_EXT2_FS_H is defined, a simple - # #include will work. - # - ac_cv_usable_linux_ext2_fs_h=yes - AC_DEFINE(HAVE_USABLE_LINUX_EXT2_FS_H) -else - ac_cv_usable_linux_ext2_fs_h=no -fi -AC_BROKEN_SCSI_SCSI_H -AC_BROKEN_SRC_SCSI_SCSI_H -AC_BROKEN_SCSI_SG_H -AC_BROKEN_SRC_SCSI_SG_H - -if test .$ac_cv_broken_src_scsi_scsi_h = .yes; then - may_linux_src_include=no -fi -if test .$ac_cv_broken_src_linux_ext2_fs_h = .yes; then - may_linux_src_include=no -fi -if test .$may_linux_src_include = .no; then - echo - echo "Warning: *** /usr/src/linux/include contains broken include files ***" - echo "Warning: *** /usr/src/linux/include is not used this reason ***" - echo "Warning: This may result in the inability to use recent Linux kernel interfaces" - echo -fi -if test .$ac_cv_usable_linux_ext2_fs_h = .no; then - echo - echo "Warning: *** linux/ext2_fs.h is not usable at all ***" - echo "Warning: *** This makes it impossible to support Linux file flags ***" - echo "You may try to compile using 'make COPTX=-DTRY_EXT2_FS'" - echo - sleep 10 -fi -fi # Linux only tests - -AC_SUBST(may_linux_src_include) - -AC_SUBST(largefile_cc_opt) - -AC_SUBST(lib_crypt) -AC_SUBST(lib_resolv) -AC_SUBST(lib_intl) -AC_SUBST(lib_iconv) -AC_SUBST(scsi_lib) -AC_SUBST(lib_scsi) -AC_SUBST(lib_acl) -AC_SUBST(lib_acl_test) -AC_SUBST(lib_attr) -AC_SUBST(lib_secdb) -AC_SUBST(lib_pthread) -AC_SUBST(lib_rt) - -AC_OUTPUT(rules.cnf) diff -Nru cdrtools-2.01.01a33/conf/install-sh cdrtools-3.02a09/conf/install-sh --- cdrtools-2.01.01a33/conf/install-sh 2005-05-03 13:04:43.000000000 +0000 +++ cdrtools-3.02a09/conf/install-sh 2009-01-29 20:31:01.000000000 +0000 @@ -1,6 +1,6 @@ #! /bin/sh # -# @(#)install-sh 1.7 05/05/03 1999 J. Schilling +# @(#)install-sh 1.11 09/01/29 1999-2009 J. Schilling # # install - install a program, script, or datafile # This comes from X11R5 (mit/util/scripts/install.sh). @@ -8,7 +8,7 @@ # non root user by J. Schilling # # Copyright 1991 by the Massachusetts Institute of Technology -# Copyright 1999 by J. Schilling +# Copyright 1999-2009 by J. Schilling # # Permission to use, copy, modify, distribute, and sell this software and its # documentation for any purpose is hereby granted without fee, provided that @@ -61,6 +61,7 @@ src="" dst="" dir_arg="" +noclobber="" # # Check if we are 'root' to avoid chown as non root user @@ -77,7 +78,7 @@ # Win95 has no user 'root' and chown succeeds always. # Unfortunately, there is also no user 'bin' and chown complains about # user 'bin' being non-existant. -# Check if the fie is now really owned by 'root' to avoid the Win95 probems +# Check if the file is now really owned by 'root' to avoid the Win95 probems # if [ $rootflag = TRUE ]; then ls -l ${dsttmp} 2> /dev/null | grep root > /dev/null || rootflag=FALSE @@ -87,6 +88,23 @@ while [ x"$1" != x ]; do case $1 in + -help) + echo "Usage: install-sh [options] srcfile dstfile" + echo " install-sh [options] srcfile dstdir" + echo " install-sh [options] -d dstdir" + echo "Options:" + echo " -c copy srcfile rather than renaming it" + echo " -d dir create dir" + echo " -noclobber do not replace existing files" + echo " -m mode install new files with 'mode'" + echo " -o owner install new files with 'owner'" + echo " -g group install new files with 'group'" + echo " -s strip file after installing" + echo " -t=sed-cmd sed command to transform the basename" + echo " -b=suff file name suffix for -t" + exit + continue;; + -c) instcmd="$cpprog" shift continue;; @@ -95,7 +113,27 @@ shift continue;; + -noclobber) noclobber=true + shift + continue;; + -m) chmodcmd="$chmodprog $2" + Asuidflag=FALSE + Ssuidflag=FALSE + if [ $rootflag = FALSE ] ; then + echo "$2" | grep '[1-7][0-7][0-7][0-7]$' > /dev/null && Asuidflag=TRUE + echo "$2" | grep '[st]' > /dev/null && Ssuidflag=TRUE + fi + if [ $Asuidflag = TRUE ]; then + nmode=`echo "$2" | sed 's/\(.*\)\([0-7][0-7][0-7]\)/\2/'` + chmodcmd="$chmodprog $nmode" + echo "install: -m option with suid/sticky available only to root -- ignored" + fi + if [ $Ssuidflag = TRUE ]; then + nmode=`echo "$2" | sed 's/\(.*\)/\1,a-st/'` + chmodcmd="$chmodprog $nmode" + echo "install: -m option with suid/sticky available only to root -- ignored" + fi shift shift continue;; @@ -259,6 +297,14 @@ true fi +# Check whether we might clobber an existing file + + if [ "$noclobber" -a -r "$dstdir/$dstfile" ]; then + echo "File '$dstdir/$dstfile' exists" + echo "Will not overwrite '$dstdir/$dstfile'." + exit + fi + # Make a temp file name in the proper directory. dsttmp=$dstdir/#inst.$$# diff -Nru cdrtools-2.01.01a33/conf/Makefile cdrtools-3.02a09/conf/Makefile --- cdrtools-2.01.01a33/conf/Makefile 2006-10-31 14:03:53.000000000 +0000 +++ cdrtools-3.02a09/conf/Makefile 2007-10-24 16:28:58.000000000 +0000 @@ -1,4 +1,4 @@ -#ident @(#)Makefile 1.5 06/10/31 +#ident @(#)Makefile 1.6 07/10/24 ########################################################################### # Written 1998 by J. Schilling ########################################################################### @@ -25,6 +25,14 @@ PCONFFILES= $(CONFFILES:%=$(OINCSDIR)/%) +_INSMODEI= $(_UNIQ)$(INSMODE) +__INSMODEI= $(_INSMODEI:$(_UNIQ)=$(INSMODEF)) +INSMODEI= $(__INSMODEI:$(_UNIQ)%=%) + +INSDIR= include/schily/$(OARCH) +TARGET= xconfig.h +PTARGET= ../incs/$(OARCH)/xconfig.h + all: config clobber: @@ -48,4 +56,3 @@ $(OTHERTARGETS): @echo "$@: nothing to make" - diff -Nru cdrtools-2.01.01a33/conf/makeinc cdrtools-3.02a09/conf/makeinc --- cdrtools-2.01.01a33/conf/makeinc 2005-05-01 21:32:44.000000000 +0000 +++ cdrtools-3.02a09/conf/makeinc 2014-03-24 16:50:49.000000000 +0000 @@ -1,8 +1,8 @@ #!/bin/sh # -# @(#)makeinc 1.4 05/05/01 Copyright 1998 J. Schilling +# @(#)makeinc 1.8 14/03/24 Copyright 1998-2014 J. Schilling ########################################################################### -# Copyright 1998 by J. Schilling +# Copyright 1998-2014 by J. Schilling ########################################################################### # # Automake script for the Schily (SING) makefile system @@ -11,23 +11,28 @@ # # Creates the following files: # -# ./RULES/os-sunos.id -# ./RULES/os-sunos.def -# ./DEFAULTS/Defaults.sunos -# ./RULES/sun4c-sunos-gcc.rul +# ./RULES/os-sunos.id included first after mk-$(XMAKEPROG).id +# ./RULES/os-sunos.def included next after RULES/os-sunos.id +# ./DEFAULTS/Defaults.sunos included after RULES/os-sunos.def +# Now incs/Dcc.$(PARCH)$(-O_ARCH) is +# included in parparation of the next +# file. This may call conf/cc-config.sh +# ./RULES/sun4c-sunos-gcc.rul included after DEFAULTS/Defaults.sunos # ########################################################################### # The contents of this file are subject to the terms of the -# Common Development and Distribution License, Version 1.0 only. +# Common Development and Distribution License, Version 1.0 only # (the "License"). You may not use this file except in compliance # with the License. # # See the file CDDL.Schily.txt in this distribution for details. +# A copy of the CDDL is also available via the Internet at +# http://www.opensource.org/licenses/cddl1.txt # # When distributing Covered Code, include this CDDL HEADER in each # file and include the License file CDDL.Schily.txt from this distribution. ########################################################################### -MAILADDR=schilling@fokus.fhg.de +MAILADDR=joerg.schilling@fokus.fraunhofer.de ########################################################################### # Option processing @@ -87,12 +92,41 @@ sleep 1 echo +# +# Compiler for platforms we do not yet know. +# $CC is only used with *Defaults.*) +# CC=cc gcc -v 2> /dev/null && CC=gcc +ARG_CC=$CC echo "CC: $CC" +# +# Call $CC and try to find out whether it might be "gcc" or "clang". +# +CC_V=`eval "$CC -v > /dev/null" 2>&1` +GCC_V=`echo "$CC_V" | grep -i gcc-version ` +CLANG_V=`echo "$CC_V" | grep -i clang ` + +if [ ".$GCC_V" != . ]; then + if eval "gcc -v 2> /dev/null" 2>/dev/null; then + CC="gcc" + fi +elif [ ".$CLANG_V" != . ]; then + if eval "clang -v 2> /dev/null" 2>/dev/null; then + CC="clang" + fi +fi +# +# Check whether "cc" or "gcc" are emulated by another compiler +# +if [ "$CC" != "$ARG_CC" ]; then + echo "$ARG_CC is $CC" +fi + MANSTYLE=sysv -if [ -r /usr/man/*man7*/man* -o -r /usr/share/man/*man7*/man* \ +if [ -r /usr/man/*man7*/man.* -o -r /usr/share/man/*man7*/man.* \ + -o -r /usr/man/*man7*/mandoc.* -o -r /usr/share/man/*man7*/mandoc.* \ -o -r /usr/man/*man7*/ascii* -o -r /usr/share/man/*man7*/ascii* ]; then MANSTYLE=bsd fi @@ -128,7 +162,9 @@ echo "# global definitions for $OSNAME Systems" >> $1 echo "# This file is auto generated and may be wrong" >> $1 echo '###########################################################################' >> $1 - if [ $CC = gcc ]; then + if [ "$CC" = clang ]; then + cat $SRCROOT/TEMPLATES/Defaults.clang >> $1 + elif [ "$CC" = gcc ]; then cat $SRCROOT/TEMPLATES/Defaults.gcc >> $1 else cat $SRCROOT/TEMPLATES/Defaults.xcc >> $1 @@ -140,7 +176,9 @@ echo "CWARNOPTS=" >> $1 ;; - *-*-*cc.rul) + *-*-cc*.rul | \ + *-*-gcc*.rul | \ + *-*-clang*.rul) ARCH=`echo $1 | sed -e 's;\(.*\)/\(.*\)-\(.*\)-\(.*\).rul;\2;'` OSNAME=`echo $1 | sed -e 's;\(.*\)/\(.*\)-\(.*\)-\(.*\).rul;\3;'` CCOM=`echo $1 | sed -e 's;\(.*\)/\(.*\)-\(.*\)-\(.*\).rul;\4;'` @@ -167,9 +205,12 @@ echo "# This file is auto generated and may be wrong" >> $1 echo '###########################################################################' >> $1 - if [ $CCOM = gcc ]; then + if [ $CCOM = clang -o $CCOM = clang32 -o $CCOM = clang64 ]; then + echo 'Using generic CLANG machine configuration file' + cat $SRCROOT/TEMPLATES/temp-$CCOM.rul >> $1 + elif [ $CCOM = gcc -o $CCOM = gcc32 -o $CCOM = gcc64 ]; then echo 'Using generic GCC machine configuration file' - cat $SRCROOT/TEMPLATES/temp-gcc.rul >> $1 + cat $SRCROOT/TEMPLATES/temp-$CCOM.rul >> $1 else echo 'Using generic dumb cc machine configuration file' cat $SRCROOT/TEMPLATES/temp-xcc.rul >> $1 diff -Nru cdrtools-2.01.01a33/conf/mkdep-aix.sh cdrtools-3.02a09/conf/mkdep-aix.sh --- cdrtools-2.01.01a33/conf/mkdep-aix.sh 2002-10-11 16:45:30.000000000 +0000 +++ cdrtools-3.02a09/conf/mkdep-aix.sh 2009-12-31 17:47:03.000000000 +0000 @@ -1,5 +1,5 @@ #!/bin/sh -#ident "@(#)mkdep-aix.sh 1.1 02/10/11 " +#ident "@(#)mkdep-aix.sh 1.2 09/12/31 " ########################################################################### # Copyright 2002 by J. Schilling ########################################################################### @@ -16,9 +16,13 @@ # For this reason, there may be problems of other software likes to create # foo.u during compilation. Please report problems. # +# In former times, we used -E but this calls the C-preprocessor that complains +# about #pragma weak a = b entries. We thus now use -qsyntaxonly in hope +# that all IBM compiler versions support it. +# ########################################################################### # The contents of this file are subject to the terms of the -# Common Development and Distribution License, Version 1.0 only. +# Common Development and Distribution License, Version 1.0 only # (the "License"). You may not use this file except in compliance # with the License. # @@ -49,6 +53,7 @@ UFILES=`echo "$FILES" | sed -e 's;\([^.]*\)\.c;\1.u;g'` rm -f $UFILES -cc -M -E > /dev/null "$@" +#cc -M -E > /dev/null "$@" +cc -M -qsyntaxonly > /dev/null "$@" cat $UFILES rm -f $UFILES diff -Nru cdrtools-2.01.01a33/conf/mkdep-hpux.sh cdrtools-3.02a09/conf/mkdep-hpux.sh --- cdrtools-2.01.01a33/conf/mkdep-hpux.sh 2002-10-10 20:59:43.000000000 +0000 +++ cdrtools-3.02a09/conf/mkdep-hpux.sh 2011-11-12 17:41:32.000000000 +0000 @@ -1,5 +1,5 @@ #!/bin/sh -#ident "@(#)mkdep-hpux.sh 1.1 02/10/10 " +#ident "@(#)mkdep-hpux.sh 1.2 11/11/12 " ########################################################################### # Copyright 2002 by J. Schilling ########################################################################### @@ -19,7 +19,7 @@ # ########################################################################### # The contents of this file are subject to the terms of the -# Common Development and Distribution License, Version 1.0 only. +# Common Development and Distribution License, Version 1.0 only # (the "License"). You may not use this file except in compliance # with the License. # @@ -33,6 +33,11 @@ cc -Wp,-M/tmp/cpp-m.$$ -E > /dev/null "$@" -cat /tmp/cpp-m.$$ +# +# The HP compiler creates xxx/file.o: xxx/file.c in case that +# file.c is in a sub.directory. This is wrong. The following sed +# command removes "^xxx/" from the output +# +sed -e 's;^[^/ ]*/\(.*\)\.o;\1.o;' < /tmp/cpp-m.$$ rm -f /tmp/cpp-m.$$ diff -Nru cdrtools-2.01.01a33/conf/mkdep-msc.sh cdrtools-3.02a09/conf/mkdep-msc.sh --- cdrtools-2.01.01a33/conf/mkdep-msc.sh 2006-10-10 14:50:58.000000000 +0000 +++ cdrtools-3.02a09/conf/mkdep-msc.sh 2011-08-11 21:25:25.000000000 +0000 @@ -1,5 +1,5 @@ #!/bin/sh -#ident "@(#)mkdep-msc.sh 1.2 06/10/10 " +#ident "@(#)mkdep-msc.sh 1.3 11/08/11 " ########################################################################### # Copyright 1999,2006 by J. Schilling ########################################################################### @@ -46,5 +46,8 @@ OFILES=`echo "$FILES" | sed -e 's;\([^.]*\)\.[cC]$;\1.obj;g' -e 's;\([^.]*\)\.cc$;\1.obj;g' -e 's;\([^.]*\)\.c..$;\1.obj;g' ` echo ".SPACE_IN_NAMES: true" -cl -E -nologo 2> /dev/null "$@" | grep '^\#line' | cut -d\" -f2 | sort -u | sed 's/\([^\]\) /\1\\ /g' | sed -e "s;^;$OFILES: ;" +cl -E -nologo 2> /dev/null "$@" | grep '\#line' | sed -e 's,^.*\#line[ \t]*[^ ]*[ \t]*",,' \ + -e 's,"$,,' -e 's/\([^\]\) /\1\\ /g' \ + -e 's,\.\\\\*,.\\,g' \ + -e "s;^;$OFILES: ;" | sort -u echo ".SPACE_IN_NAMES:" diff -Nru cdrtools-2.01.01a33/conf/mkdir.sh cdrtools-3.02a09/conf/mkdir.sh --- cdrtools-2.01.01a33/conf/mkdir.sh 2005-05-04 21:53:13.000000000 +0000 +++ cdrtools-3.02a09/conf/mkdir.sh 2009-12-22 22:04:17.000000000 +0000 @@ -1,5 +1,5 @@ #!/bin/sh -# @(#)mkdir.sh 1.4 05/05/04 Copyright 1998 J. Schilling +# @(#)mkdir.sh 1.5 09/12/22 Copyright 1998 J. Schilling ########################################################################### # Written 1998-2005 by J. Schilling ########################################################################### @@ -13,7 +13,7 @@ # ########################################################################### # The contents of this file are subject to the terms of the -# Common Development and Distribution License, Version 1.0 only. +# Common Development and Distribution License, Version 1.0 only # (the "License"). You may not use this file except in compliance # with the License. # @@ -129,7 +129,7 @@ : > "$dirname"/TARGETS/55"$dirbase" fi if [ ! -r "$dirname"/Makefile ]; then - srcroot=`echo "$dirname" | sed -e 's,[^/]*,..,g'` + srcroot=`echo "$dirname" | sed -e 's,[^/][^/]*,..,g'` srcroot=`echo "$SRCROOT/$srcroot" | sed -e 's,^\./,,'` echo '#ident %'W'% %'E'% %'Q'%' > "$dirname"/Makefile diff -Nru cdrtools-2.01.01a33/conf/oarch.sh cdrtools-3.02a09/conf/oarch.sh --- cdrtools-2.01.01a33/conf/oarch.sh 2007-05-03 15:34:07.000000000 +0000 +++ cdrtools-3.02a09/conf/oarch.sh 2017-07-07 23:18:07.000000000 +0000 @@ -1,5 +1,5 @@ #!/bin/sh -# @(#)oarch.sh 1.13 07/05/03 Copyright 2005-2007 J. Schilling +# @(#)oarch.sh 1.17 17/07/08 Copyright 2005-2016 J. Schilling ########################################################################### # Written 2005 by J. Schilling ########################################################################### @@ -11,6 +11,8 @@ # with the License. # # See the file CDDL.Schily.txt in this distribution for details. +# A copy of the CDDL is also available via the Internet at +# http://www.opensource.org/licenses/cddl1.txt # # When distributing Covered Code, include this CDDL HEADER in each # file and include the License file CDDL.Schily.txt from this distribution. @@ -36,6 +38,16 @@ cflag=FALSE oflag=FALSE pflag=FALSE +if [ .$1 = .-help ]; then + echo "Usage: oarch.sh [options]" + echo "Options:" + echo " -debug Print debugging information" + echo " -c Print C_ARCH instead of OARCH" + echo " -o Print O_ARCH instead of OARCH" + echo " -p Print PARCH instead of OARCH" + echo " -x Print XARCH instead of OARCH" + exit +fi if [ .$1 = .-debug ]; then dbgflag=TRUE fi @@ -59,9 +71,9 @@ MACHCMD="( (mach || uname -p || true) 2> /dev/null)" ARCHCMD="( (arch || /usr/ucb/arch || true) 2> /dev/null)" -XP_ARCH=`eval ${MACHCMD} | tr '[A-Z]' '[a-z]' | tr ', /\\()"' ',//////' | tr ',/' ',\-'` -XK_ARCH=`uname -m | tr '[A-Z]' '[a-z]' | tr ', /\\()"' ',//////' | tr ',/' ',\-'` -XM_ARCH=`eval ${ARCHCMD} | tr '[A-Z]' '[a-z]' | tr ', /\\()"' ',//////' | tr ',/' ',\-'` +XP_ARCH=`eval ${MACHCMD} | tr '[A-Z]' '[a-z]' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ, /\\()"' 'abcdefghijklmnopqrstuvwxyz,//////' | tr ',/' ',\-'` +XK_ARCH=`uname -m | tr '[A-Z]' '[a-z]' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ, /\\()"' 'abcdefghijklmnopqrstuvwxyz,//////' | tr ',/' ',\-'` +XM_ARCH=`eval ${ARCHCMD} | tr '[A-Z]' '[a-z]' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ, /\\()"' 'abcdefghijklmnopqrstuvwxyz,//////' | tr ',/' ',\-'` #echo XP_ARCH $XP_ARCH #echo XK_ARCH $XK_ARCH @@ -82,14 +94,20 @@ M_ARCH="${K_ARCH}" fi -OSNAME=`uname -s | tr '[A-Z]' '[a-z]' | tr ', /\\()"' ',//////' | tr ',/' ',\-'` -OSREL=`uname -r | tr '[A-Z]' '[a-z]' | tr ', /\\()"' ',//////' | tr ',/' ',\-'` +OSNAME=`uname -s | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ, /\\()"' 'abcdefghijklmnopqrstuvwxyz,//////' | tr ',/' ',\-'` +OSHOST=`uname -n | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ, /\\()"' 'abcdefghijklmnopqrstuvwxyz,//////' | tr ',/' ',\-'` +OSREL=`uname -r | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ, /\\()"' 'abcdefghijklmnopqrstuvwxyz,//////' | tr ',/' ',\-'` +OSVERS=`uname -v | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ, /\\()"' 'abcdefghijklmnopqrstuvwxyz,//////' | tr ',/' ',\-'` O_ARCH="$OSNAME" -case "$OSREL" in +case "$OSNAME" in cygwin*) O_ARCH=cygwin32_nt;; esac + +if [ ."$OSNAME" = .aix ]; then + P_ARCH=rs6000 +fi if [ ."$OSNAME" = .bsd-os ]; then case "$OSREL" in 3.*) O_ARCH=bsd-os3;; @@ -198,11 +216,14 @@ if [ $dbgflag = TRUE ]; then #echo xx"$P_ARCH" + echo C_ARCH " $C_ARCH" echo P_ARCH " $P_ARCH" echo K_ARCH " $K_ARCH" echo M_ARCH " $M_ARCH" echo OSNAME " $OSNAME" + echo OSHOST " $OSHOST" echo OSREL " $OSREL" + echo OSVERS " $OSVERS" echo OARCH " $OARCH" echo XARCH " $XARCH" exit diff -Nru cdrtools-2.01.01a33/conf/post.html cdrtools-3.02a09/conf/post.html --- cdrtools-2.01.01a33/conf/post.html 2007-02-10 12:58:32.000000000 +0000 +++ cdrtools-3.02a09/conf/post.html 2015-01-18 14:44:44.000000000 +0000 @@ -1,11 +1,9 @@


-FhG -FhG FOKUS -BerliOS - -Schily -Schily's Home -VED powered +FhG + +Schily's Home +VED powered diff -Nru cdrtools-2.01.01a33/conf/rules.cnf.in cdrtools-3.02a09/conf/rules.cnf.in --- cdrtools-2.01.01a33/conf/rules.cnf.in 2007-05-19 12:52:46.000000000 +0000 +++ cdrtools-3.02a09/conf/rules.cnf.in 1970-01-01 00:00:00.000000000 +0000 @@ -1,22 +0,0 @@ -# @(#)rules.cnf.in 1.15 07/05/19 Copyright 1998-2007 J. Schilling - -EXEEXT= @EXEEXT@ -XEXEEXT= @XEXEEXT@ -OBJEXT= @OBJEXT@ - -LARGEFILE_CC_OPT= @largefile_cc_opt@ - -MAY_LINUX_SRC_INCLUDE= @may_linux_src_include@ - -SCSILIB= @scsi_lib@ -LIB_SCSI= @lib_scsi@ -LIB_RESOLV= @lib_resolv@ -LIB_CRYPT= @lib_crypt@ -LIB_INTL= @lib_intl@ -LIB_ICONV= @lib_iconv@ -LIB_ACL= @lib_acl@ -LIB_ACL_TEST= @lib_acl_test@ -LIB_ATTR = @lib_attr@ -LIB_SECDB = @lib_secdb@ -LIB_PTHREAD = @lib_pthread@ -LIB_RT = @lib_rt@ diff -Nru cdrtools-2.01.01a33/conf/runrmt_android cdrtools-3.02a09/conf/runrmt_android --- cdrtools-2.01.01a33/conf/runrmt_android 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/conf/runrmt_android 2012-03-11 12:13:34.000000000 +0000 @@ -0,0 +1,92 @@ +#!/bin/sh +# @(#)runrmt_android 1.4 12/03/11 Copyright 2011 J. Schilling +########################################################################### +# Written 2011 by J. Schilling +########################################################################### +# Remotely execute a test from "configure" and copy back "conftestval" as +# well as the exit code from the program on the remote platform. +# +# This is the Android emulator variant that calls commands via the +# Android Debug Bridge. +# +# Note that the shell variable '$?' needs to be handled with caution in +# order to prevent early expansion. +# We use "sh -c" to make sure that this script will work correctly in case +# the remote user has a strange login shell. +########################################################################### +# The contents of this file are subject to the terms of the +# Common Development and Distribution License, Version 1.0 only +# (the "License"). You may not use this file except in compliance +# with the License. +# +# See the file CDDL.Schily.txt in this distribution for details. +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file CDDL.Schily.txt from this distribution. +########################################################################### + +remote_test=FALSE +if test "$1" = "-r" ; then + remote_test=TRUE + shift +fi + +if test $# -lt 1 ; then + echo "Usage: runrmt_android program-to-execute" 1>&2 + echo "or" + echo " runrmt -r file-to-test" 1>&2 + exit 255 +fi + +if test $remote_test = FALSE -a ! -r $1 ; then + echo "$1: not found" 1>&2 + exit 254 +fi + +# +# We should tar and feather the Android authors for redefining the name +# of the standard UNIX debugger for their tool. Hey, next time you could use +# "ls", "ps", "df" or something similar to cause even more fun. +# +# Edit this line if your Android Emulator is on a different location: +rmt=$HOME/android-sdk-linux_x86/platform-tools/adb + +# +# Only do debugging when we are called from the schily makefilesystem +# +if test ."$CONFIG_RMTDEBUG" != . -a ."$CONFIG_NOFAIL" != . ; then + echo "REMOTE \c" 1>&6 # configure checking messages are on fd 6 +fi + +if test $remote_test = TRUE; then + # + # Android has no "test" command, do the best we can do... + # As "ls" on Android does not implement -L, we may be fooled by symlinks. + # + $rmt shell "cd /data/local/tmp;ls -l $1>/dev/null 2>/dev/null;echo "'$?'" > o.exit" 2> /dev/null + $rmt pull /data/local/tmp/o.exit . 2> /dev/null + $rmt shell "rm /data/local/tmp/o.exit" 2> /dev/null > /dev/null + $rmt shell "rm /data/local/tmp/core" 2> /dev/null > /dev/null +else + F=`echo $1 | sed -e 's,.*/,,'` + $rmt push $1 /data/local/tmp 2> /dev/null + $rmt shell "cd /data/local/tmp;./$F > o.out 2> o.err ;echo "'$?'" > o.exit" 2> /dev/null + $rmt pull /data/local/tmp/o.exit . 2> /dev/null + $rmt pull /data/local/tmp/o.out . 2> /dev/null + $rmt pull /data/local/tmp/o.err . 2> /dev/null + $rmt pull /data/local/tmp/conftestval . 2> /dev/null + $rmt shell "rm /data/local/tmp/$F /data/local/tmp/o.exit" 2> /dev/null > /dev/null + $rmt shell "rm /data/local/tmp/o.out /data/local/tmp/o.err" 2> /dev/null > /dev/null + $rmt shell "rm /data/local/tmp/core" 2> /dev/null > /dev/null + $rmt shell "rm /data/local/tmp/conftestval" 2> /dev/null > /dev/null +fi +excode=`cat ./o.exit` +if [ -f o.out ]; then + cat o.out +fi +if [ -f o.err ]; then + cat o.err 1>&2 +fi +rm -f ./o.exit ./o.out ./o.err +#echo excode: $excode +exit $excode diff -Nru cdrtools-2.01.01a33/conf/runrmt_rsh cdrtools-3.02a09/conf/runrmt_rsh --- cdrtools-2.01.01a33/conf/runrmt_rsh 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/conf/runrmt_rsh 2011-07-16 14:49:10.000000000 +0000 @@ -0,0 +1,70 @@ +#!/bin/sh +# @(#)runrmt_rsh 1.3 11/07/16 Copyright 2011 J. Schilling +########################################################################### +# Written 2011 by J. Schilling +########################################################################### +# Remotely execute a test from "configure" and copy back "conftestval" as +# well as the exit code from the program on the remote platform. +# +# This is the generic UNIX variant that calls commands via "rsh". +# +# Note that the shell variable '$?' needs to be handled with caution in +# order to prevent early expansion. +# We use "sh -c" to make sure that this script will work correctly in case +# the remote user has a strange login shell. +########################################################################### +# The contents of this file are subject to the terms of the +# Common Development and Distribution License, Version 1.0 only +# (the "License"). You may not use this file except in compliance +# with the License. +# +# See the file CDDL.Schily.txt in this distribution for details. +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file CDDL.Schily.txt from this distribution. +########################################################################### + +remote_test=FALSE +if test "$1" = "-r" ; then + remote_test=TRUE + shift +fi + +if test $# -lt 1 ; then + echo "Usage: runrmt program-to-execute" 1>&2 + echo "or" + echo " runrmt -r file-to-test" 1>&2 + exit 255 +fi + +if test $remote_test = FALSE -a ! -r $1 ; then + echo "$1: not found" 1>&2 + exit 254 +fi + +if test ."$CONFIG_RMTHOST" = . ; then + echo 'CONFIG_RMTHOST=host or CONFIG_RMTHOST=user@host required for remote execution' 1>&2 + exit 253 +fi +remote="$CONFIG_RMTHOST" + +if test ."$CONFIG_RMTDEBUG" != . ; then + echo "REMOTE \c" 1>&6 # configure checking messages are on fd 6 +fi + +if test $remote_test = TRUE; then + rsh $remote sh -c "'cd /tmp/;test -r $1; echo "'$?'" > o.exit'" 2> /dev/null + rcp -p $remote:/tmp/o.exit . 2> /dev/null + rsh $remote "rm -f /tmp/core /tmp/o.exit" 2> /dev/null >/dev/null +else + F=`echo $1 | sed -e 's,.*/,,'` + rcp $1 $remote:/tmp/ 2> /dev/null + rsh $remote sh -c "'cd /tmp/;./$F; echo "'$?'" > o.exit'" + rcp -p $remote:/tmp/o.exit . 2> /dev/null + rcp -p $remote:/tmp/conftestval . 2> /dev/null + rsh $remote "rm -f /tmp/core /tmp/$F /tmp/o.exit /tmp/conftestval" 2> /dev/null >/dev/null +fi +excode=`cat ./o.exit` +rm -f ./o.exit +#echo excode: $excode +exit $excode diff -Nru cdrtools-2.01.01a33/conf/runrmt_ssh cdrtools-3.02a09/conf/runrmt_ssh --- cdrtools-2.01.01a33/conf/runrmt_ssh 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/conf/runrmt_ssh 2011-07-16 14:49:08.000000000 +0000 @@ -0,0 +1,70 @@ +#!/bin/sh +# @(#)runrmt_ssh 1.3 11/07/16 Copyright 2011 J. Schilling +########################################################################### +# Written 2011 by J. Schilling +########################################################################### +# Remotely execute a test from "configure" and copy back "conftestval" as +# well as the exit code from the program on the remote platform. +# +# This is the generic UNIX variant that calls commands via "ssh". +# +# Note that the shell variable '$?' needs to be handled with caution in +# order to prevent early expansion. +# We use "sh -c" to make sure that this script will work correctly in case +# the remote user has a strange login shell. +########################################################################### +# The contents of this file are subject to the terms of the +# Common Development and Distribution License, Version 1.0 only +# (the "License"). You may not use this file except in compliance +# with the License. +# +# See the file CDDL.Schily.txt in this distribution for details. +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file CDDL.Schily.txt from this distribution. +########################################################################### + +remote_test=FALSE +if test "$1" = "-r" ; then + remote_test=TRUE + shift +fi + +if test $# -lt 1 ; then + echo "Usage: runrmt program-to-execute" 1>&2 + echo "or" + echo " runrmt -r file-to-test" 1>&2 + exit 255 +fi + +if test $remote_test = FALSE -a ! -r $1 ; then + echo "$1: not found" 1>&2 + exit 254 +fi + +if test ."$CONFIG_RMTHOST" = . ; then + echo 'CONFIG_RMTHOST=host or CONFIG_RMTHOST=user@host required for remote execution' 1>&2 + exit 253 +fi +remote="$CONFIG_RMTHOST" + +if test ."$CONFIG_RMTDEBUG" != . ; then + echo "REMOTE \c" 1>&6 # configure checking messages are on fd 6 +fi + +if test $remote_test = TRUE; then + ssh $remote sh -c "'cd /tmp/;test -r $1; echo "'$?'" > o.exit'" 2> /dev/null + scp -p $remote:/tmp/o.exit . 2> /dev/null + ssh $remote "rm -f /tmp/core /tmp/o.exit" 2> /dev/null >/dev/null +else + F=`echo $1 | sed -e 's,.*/,,'` + scp $1 $remote:/tmp/ 2> /dev/null + ssh $remote sh -c "'cd /tmp/;./$F; echo "'$?'" > o.exit'" + scp -p $remote:/tmp/o.exit . 2> /dev/null + scp -p $remote:/tmp/conftestval . 2> /dev/null + ssh $remote "rm -f /tmp/core /tmp/$F /tmp/o.exit /tmp/conftestval" 2> /dev/null >/dev/null +fi +excode=`cat ./o.exit` +rm -f ./o.exit +#echo excode: $excode +exit $excode diff -Nru cdrtools-2.01.01a33/conf/setup.sh cdrtools-3.02a09/conf/setup.sh --- cdrtools-2.01.01a33/conf/setup.sh 2005-11-11 13:57:19.000000000 +0000 +++ cdrtools-3.02a09/conf/setup.sh 2014-12-09 19:25:36.000000000 +0000 @@ -1,16 +1,18 @@ #!/bin/sh -# @(#)setup.sh 1.16 05/11/11 Copyright 2005 J. Schilling +# @(#)setup.sh 1.18 14/12/09 Copyright 2005 J. Schilling ########################################################################### # Written 2005 by J. Schilling ########################################################################### # Set up bins//{bzip2}!{gzip}!{patch}!{smake}!{star}!{wget} ########################################################################### # The contents of this file are subject to the terms of the -# Common Development and Distribution License, Version 1.0 only. +# Common Development and Distribution License, Version 1.0 only # (the "License"). You may not use this file except in compliance # with the License. # # See the file CDDL.Schily.txt in this distribution for details. +# A copy of the CDDL is also available via the Internet at +# http://www.opensource.org/licenses/cddl1.txt # # When distributing Covered Code, include this CDDL HEADER in each # file and include the License file CDDL.Schily.txt from this distribution. @@ -18,20 +20,20 @@ # Benoetigte Kommandos: # -# makefiles ftp://ftp.berlios.de/pub/makefiles/ -# makefiles ftp://ftp.berlios.de/pub/makefiles/testing/makefiles.tar -# smake ftp://ftp.berlios.de/pub/smake/alpha/ -# star ftp://ftp.berlios.de/pub/star/alpha/ +# makefiles http://sourceforge.net/projects/schilytools/files/makefiles/ +# makefiles http://sourceforge.net/projects/schilytools/files/makefiles/testing/makefiles.tar +# smake http://sourceforge.net/projects/s-make/files/alpha/ +# star http://sourceforge.net/projects/s-tar/files/alpha/ # gzip ftp://wuarchive.wustl.edu/mirrors/gnu/gzip/gzip-1.2.4.tar # wget ftp://ftp.gnu.org/gnu/wget/wget-1.9.1.tar.gz -# wget ftp://ftp.berlios.de/pub/makefiles/testing/wget-1.9.1-1.tar +# wget http://sourceforge.net/projects/schilytools/files/makefiles/testing/wget-1.9.1-2.tar # gzip http://www.gzip.org/gzip-1.3.3.tar.gz -# gzip ftp://ftp.berlios.de/pub/makefiles/testing/gzip-1.3.3.tar.gz +# gzip http://sourceforge.net/projects/schilytools/files/makefiles/testing/gzip-1.3.3.tar.gz # bzip2 ftp://sources.redhat.com/pub/bzip2/v102/bzip2-1.0.2.tar.gz # bzip2 http://www.bzip.org/1.0.3/bzip2-1.0.3.tar.gz -# bzip2 ftp://ftp.berlios.de/pub/makefiles/testing/bzip2-1.0.3.tar.gz +# bzip2 http://sourceforge.net/projects/schilytools/files/makefiles/testing/bzip2-1.0.3.tar.gz # patch ftp://ftp.gnu.org/pub/gnu/patch/patch-2.5.4.tar.gz -# patch ftp://ftp.berlios.de/pub/makefiles/testing/patch-2.5.4-1.tar.bz2 +# patch http://sourceforge.net/projects/schilytools/files/makefiles/testing/patch-2.5.4-1.tar.bz2 trap 'if [ -f ./$xfile ]; then rm -f ./$xfile; fi; rm -rf /tmp/i.$$/; exit 1' 1 2 15 @@ -123,7 +125,7 @@ # # tar on HP-UX-10.x does not like tar xpf # -cd smake-1.2/psmake/ +cd smake-*/psmake/. sh ./MAKE-all cd .. psmake/smake -r DESTDIR=/tmp/i.$$/ COPTX=-DDEFAULTS_PATH_SEARCH_FIRST install @@ -141,7 +143,7 @@ mkdir -p "$BINS"/lib rm -f "$BINS"/lib/defaults.smk cp -p /tmp/i.$$/opt/schily/lib/defaults.smk "$BINS"/lib -rm -rf smake-1.2* smake.tar* +rm -rf smake-* smake.tar* MAKE="${PWD}/${BINS}/smake" if [ $ZIP = cat ]; then @@ -169,13 +171,13 @@ # # tar on HP-UX-10.x does not like tar xpf # -cd star-1.5/ +cd star-*/. smake DESTDIR=/tmp/i.$$/ install cd .. strip /tmp/i.$$/opt/schily/bin/star rm -f "${BINS}"/star cp -p /tmp/i.$$/opt/schily/bin/star "$BINS" -rm -rf star-1.5* star.tar* +rm -rf star-* star.tar* do_compile() { url="$1" diff -Nru cdrtools-2.01.01a33/conf/src-get cdrtools-3.02a09/conf/src-get --- cdrtools-2.01.01a33/conf/src-get 2005-07-07 13:11:22.000000000 +0000 +++ cdrtools-3.02a09/conf/src-get 2009-12-21 23:09:34.000000000 +0000 @@ -1,13 +1,13 @@ #!/bin/sh -# @(#)src-get 1.18 05/07/07 Copyright 2005 J. Schilling +# @(#)src-get 1.21 09/12/22 Copyright 2005-2009 J. Schilling ########################################################################### -# Written 2005 by J. Schilling +# Written 2005-2009 by J. Schilling ########################################################################### # A source package controlling system which should behave similar to # the Debian apt-get command. ########################################################################### # The contents of this file are subject to the terms of the -# Common Development and Distribution License, Version 1.0 only. +# Common Development and Distribution License, Version 1.0 only # (the "License"). You may not use this file except in compliance # with the License. # @@ -59,6 +59,7 @@ echo " list list installable packages" echo " shell start a SHELL with a clean environment" echo " compile do a full compilation from SRCROOT with a clean environment" + echo " version print the 'srg-get' version" } if [ $# -lt 1 ]; then @@ -68,8 +69,15 @@ cmd=$1 shift -echo "cmd: $cmd" -echo "args: $@" +case "$cmd" in + *version*) + ;; + + *) + echo "cmd: $cmd" + echo "args: $@" + ;; +esac excode=255 trap 'rm -rf /tmp/.d.$$; if [ -f ./$do_wget_file ]; then rm -f ./$do_wget_file; fi; exit 1' 1 2 15 @@ -126,9 +134,9 @@ set_binspath() { PWD=`pwd` if [ "$SRCROOT" = . ];then - PATH="${PWD}/${BINS}:${PATH}" + PATH="${PWD}/${BINS}:${PWD}/conf:${PATH}" else - PATH="${PWD}/${SRCROOT}/${BINS}:${PATH}" + PATH="${PWD}/${SRCROOT}/${BINS}:${PWD}/${SRCROOT}/conf:${PATH}" fi export PATH unset PWD @@ -268,7 +276,7 @@ return fi echo "Fetching dependencies: $deps" - $0 install $deps + src-get install $deps } do_patch() { @@ -322,6 +330,7 @@ do_dep "$DEP" if [ ."$URL" = . ]; then + cd .. return fi do_wget ${server_url}"$PKG" @@ -336,7 +345,12 @@ NO_SRCROOT=no-SRCROOT-directory-found if get_srcroot; then - echo SRCROOT: $SRCROOT + case "$cmd" in + + *version*) ;; + + *) echo SRCROOT: $SRCROOT;; + esac else SRCROOT="$NO_SRCROOT" fi @@ -349,9 +363,11 @@ exit 1 fi if [ ! -z "`ls`" ]; then - echo "Current directory not empty." 1>&2 - echo "Will not install makefile system." 1>&2 - exit 1 + if [ "`ls`" != src-get ]; then + echo "Current directory not empty." 1>&2 + echo "Will not install makefile system." 1>&2 + exit 1 + fi fi do_wget ftp://ftp.berlios.de/pub/makefiles/testing/makefiles.tar${ZIP_SUFFIX} ${UNZIP} < makefiles.tar${ZIP_SUFFIX} | tar xf - @@ -429,9 +445,15 @@ exit 1 ;; - -help|*) echo "@(#)src-get 1.18 05/07/07 Copyright 2005 J. Schilling" + version|-version|--version) + echo "src-get 1.21 09/12/22 Copyright 2005-2009 J. Schilling" + exit 0 + ;; + + -help|*) echo "@(#)src-get 1.21 09/12/22 Copyright 2005-2009 J. Schilling" usage exit 0 ;; + esac diff -Nru cdrtools-2.01.01a33/conf/xconfig.h.in cdrtools-3.02a09/conf/xconfig.h.in --- cdrtools-2.01.01a33/conf/xconfig.h.in 2007-07-10 03:58:54.000000000 +0000 +++ cdrtools-3.02a09/conf/xconfig.h.in 1970-01-01 00:00:00.000000000 +0000 @@ -1,745 +0,0 @@ -/* @(#)xconfig.h.in 1.135 07/07/10 Copyright 1998-2007 J. Schilling */ -/* - * Dynamic autoconf C-include code. - * - * Copyright (c) 1998-2007 J. Schilling - */ - -/* - * Header Files - */ -#undef PROTOTYPES /* if Compiler supports ANSI C prototypes */ -#undef HAVE_STDIO_H /* to use stdio.h */ -#undef HAVE_STDARG_H /* to use stdarg.h, else use varargs.h NOTE: SaberC on a Sun has prototypes but no stdarg.h */ -#undef HAVE_VARARGS_H /* to use use varargs.h NOTE: The free HP-UX C-compiler has stdarg.h but no PROTOTYPES */ -#undef HAVE_STDLIB_H /* to use general utility defines (malloc(), size_t ...) and general C library prototypes */ -#undef HAVE_STDDEF_H /* to use offsetof(), ptrdiff_t, wchar>t, size_t */ -#undef HAVE_STRING_H /* to get NULL and ANSI C string function prototypes */ -#undef HAVE_STRINGS_H /* to get BSD string function prototypes */ -#undef STDC_HEADERS /* if ANSI compliant stdlib.h, stdarg.h, string.h, float.h are present */ -#undef HAVE_UNISTD_H /* to get POSIX syscall prototypes XXX sys/file.h fcntl.h (unixstd/fctl)XXX*/ -#undef HAVE_GETOPT_H /* to get getopt() prototype from getopt.h instead of unistd.h */ -#undef HAVE_LIMITS_H /* to get POSIX numeric limits constants */ -#undef HAVE_A_OUT_H /* if a.out.h is present (may be a system using a.out format) */ -#undef HAVE_AOUTHDR_H /* if aouthdr.h is present. This is a COFF system */ -#undef HAVE_ELF_H /* if elf.h is present. This is an ELF system */ -#undef HAVE_FCNTL_H /* to access, O_XXX constants for open(), otherwise use sys/file.h */ -#undef HAVE_SYS_FILE_H /* to use O_XXX constants for open() and flock() defs */ -#undef HAVE_INTTYPES_H /* to use UNIX-98 inttypes.h */ -#undef HAVE_DIRENT_H /* to use POSIX dirent.h */ -#undef HAVE_SYS_DIR_H /* to use BSD sys/dir.h */ -#undef HAVE_NDIR_H /* to use ndir.h */ -#undef HAVE_SYS_NDIR_H /* to use sys/ndir.h */ -#undef HAVE_ALLOCA_H /* if alloca.h exists */ -#undef HAVE_MALLOC_H /* if malloc.h exists */ -#undef HAVE_TERMIOS_H /* to use POSIX termios.h */ -#undef HAVE_TERMIO_H /* to use SVR4 termio.h */ -#undef HAVE_PWD_H /* if pwd.h exists */ -#undef HAVE_GRP_H /* if grp.h exists */ -#undef HAVE_SYS_ACL_H /* to use for ACL definitions */ -#undef HAVE_ACLLIB_H /* if HP-UX is present */ -#undef HAVE_ACL_LIBACL_H /* if Linux is present */ -#undef HAVE_SHADOW_H /* if shadow.h exists */ -#undef HAVE_SYSLOG_H /* if syslog.h exists */ -#undef HAVE_SYS_TIME_H /* may include sys/time.h for struct timeval */ -#undef TIME_WITH_SYS_TIME /* may include both time.h and sys/time.h */ -#undef HAVE_TIMES /* to use times() and sys/times.h */ -#undef HAVE_SYS_TIMES_H /* may include sys/times.h for struct tms */ -#undef HAVE_UTIME /* to use AT&T utime() and utimbuf */ -#undef HAVE_UTIMES /* to use BSD utimes() and sys/time.h */ -#undef HAVE_FUTIMES /* to use BSD futimes() and sys/time.h */ -#undef HAVE_LUTIMES /* to use BSD lutimes() and sys/time.h */ -#undef HAVE_UTIME_H /* to use utime.h for the utimbuf structure declaration, else declare struct utimbuf yourself */ -#undef HAVE_SYS_UTIME_H /* to use sys/utime.h if utime.h does not exist */ -#undef HAVE_SYS_IOCTL_H /* if sys/ioctl.h is present */ -#undef HAVE_SYS_FILIO_H /* if sys/ioctl.h is present */ -#undef HAVE_SYS_PARAM_H /* if sys/param.h is present */ -#undef HAVE_MACH_MACHINE_H /* if mach/machine.h is present */ -#undef HAVE_MNTENT_H /* if mntent.h is present */ -#undef HAVE_SYS_MNTENT_H /* if sys/mntent.h is present */ -#undef HAVE_SYS_MNTTAB_H /* if sys/mnttab.h is present */ -#undef HAVE_SYS_MOUNT_H /* if sys/mount.h is present */ -#undef HAVE_WAIT_H /* to use wait.h for prototypes and union wait */ -#undef HAVE_SYS_WAIT_H /* else use sys/wait.h */ -#undef HAVE_SYS_RESOURCE_H /* to use sys/resource.h for rlimit() and wait3() */ -#undef HAVE_PROCFS_H /* to use procfs.h instead of sys/procfs.h (Solaris forces profcs-2) */ -#undef HAVE_SYS_PROCFS_H /* to use sys/procfs.h for wait3() emulation */ -#undef HAVE_SYS_SYSTEMINFO_H /* to use SVr4 sysinfo() */ -#undef HAVE_SYS_SYSCTL_H /* to use BSD sysctl() */ -#undef HAVE_SYS_UTSNAME_H /* to use uname() */ -#undef HAVE_SYS_PRIOCNTL_H /* to use SVr4 priocntl() instead of nice()/setpriority() */ -#undef HAVE_SYS_RTPRIOCNTL_H /* if the system supports SVr4 real time classes */ -#undef HAVE_SYS_SYSCALL_H /* to use syscall() */ -#undef HAVE_SYS_MTIO_H /* to use mtio definitions from sys/mtio.h */ -#undef HAVE_SYS_TAPE_H /* to use mtio definitions from AIX sys/tape.h */ -#undef HAVE_SYS_MMAN_H /* to use definitions for mmap()/madvise()... from sys/mman.h */ -#undef HAVE_SYS_SHM_H /* to use definitions for shmget() ... from sys/shm.h */ -#undef HAVE_SYS_IPC_H /* to use definitions for shmget() ... from sys/ipc.h */ -#undef MAJOR_IN_MKDEV /* if we should include sys/mkdev.h to get major()/minor()/makedev() */ -#undef MAJOR_IN_SYSMACROS /* if we should include sys/sysmacros.h to get major()/minor()/makedev() */ -#undef HAVE_SYS_DKIO_H /* if we may include sys/dkio.h for disk ioctls */ -#undef HAVE_SYS_DKLABEL_H /* if we may include sys/dklabel.h for disk label */ -#undef HAVE_SUN_DKIO_H /* if we may include sun/dkio.h for disk ioctls */ -#undef HAVE_SUN_DKLABEL_H /* if we may include sun/dklabel.h for disk label */ -#undef HAVE_SYS_TYPES_H /* if we may include sys/types.h (the standard) */ -#undef HAVE_SYS_STYPES_H /* if we may include sys/stypes.h (JOS) */ -#undef HAVE_SYS_FILEDESC_H /* if we may include sys/filedesc.h (JOS) */ -#undef HAVE_SYS_STAT_H /* if we may include sys/stat.h (the standard) */ -#undef HAVE_TYPES_H /* if we may include types.h (rare cases e.g. ATARI TOS) */ -#undef HAVE_STAT_H /* if we may include stat.h (rare cases e.g. ATARI TOS) */ -#undef HAVE_POLL_H /* if we may include poll.h to use poll() */ -#undef HAVE_SYS_POLL_H /* if we may include sys/poll.h to use poll() */ -#undef HAVE_SYS_SELECT_H /* if we may have sys/select.h nonstandard use for select() on some systems*/ -#undef NEED_SYS_SELECT_H /* if we need sys/select.h to use select() (this is nonstandard) */ -#undef HAVE_NETDB_H /* if we have netdb.h for get*by*() and rcmd() */ -#undef HAVE_SYS_SOCKET_H /* if we have sys/socket.h for socket() */ -#undef NEED_SYS_SOCKET_H /* if we need sys/socket.h to use select() (this is nonstandard) */ -#undef HAVE_NETINET_IN_H /* if we have netinet/in.h */ -#undef HAVE_LINUX_PG_H /* if we may include linux/pg.h for PP ATAPI sypport */ -#undef HAVE_CAMLIB_H /* if we may include camlib.h for CAM SCSI transport definitions */ -#undef HAVE_IEEEFP_H /* if we may include ieeefp.h for finite()/isnand() */ -#undef HAVE_FP_H /* if we may include fp.h for FINITE()/IS_INF()/IS_NAN() */ -#undef HAVE_VALUES_H /* if we may include values.h for MAXFLOAT */ -#undef HAVE_FLOAT_H /* if we may include float.h for FLT_MAX */ -#undef HAVE__FILBUF /* if we have _filbuf() for USG derived STDIO */ -#undef HAVE___FILBUF /* if we have __filbuf() for USG derived STDIO */ -#undef HAVE_USG_STDIO /* if we have USG derived STDIO */ -#undef HAVE_ERRNO_DEF /* if we have errno definition in */ -#undef HAVE_VFORK_H /* if we should include vfork.h for vfork() definitions */ -#undef HAVE_ARPA_INET_H /* if we have arpa/inet.h (missing on BeOS) */ - /* BeOS has inet_ntoa() in */ -#undef HAVE_BSD_DEV_SCSIREG_H /* if we have a NeXT Step compatible sg driver */ -#undef HAVE_LINUX_TYPES_H /* if we may include linux/types.h */ -#undef HAVE_LINUX_GFP_H /* if we may include linux/gfp.h */ -#undef HAVE_ASM_TYPES_H /* if we may include asm/types.h */ -#undef HAVE_SYS_BSDTTY_H /* if we have sys/bsdtty.h on HP-UX for TIOCGPGRP */ -#undef HAVE_OS_H /* if we have the BeOS kernel definitions in OS.h */ -#undef HAVE_EXT2FS_EXT2_FS_H /* if we have the Linux moving target ext2fs/ext2_fs.h */ -#undef HAVE_ATTR_XATTR_H /* if we have the Linux Extended File Attr definitions in attr/xattr.h */ -#undef HAVE_CRT_EXTERNS_H /* if we have the Mac OS X env definitions in crt_externs.h */ -#undef HAVE_FNMATCH_H /* if we may include fnmatch.h */ -#undef HAVE_DIRECT_H /* if we may include direct.h (MSVC for getcwd()/chdir()/mkdir()/rmdir()) */ - -#undef HAVE_LIBINTL_H /* if we may include libintl.h */ -#undef HAVE_LOCALE_H /* if we may include locale.h */ -#undef HAVE_LANGINFO_H /* if we may include langinfo.h */ -#undef HAVE_NL_TYPES_H /* if we may include nl_types.h */ -#undef HAVE_WCHAR_H /* if we may include wchar.h */ -#undef HAVE_ICONV_H /* if we may include iconv.h */ - -#undef HAVE_PRIV_H /* if we may include priv.h */ -#undef HAVE_EXEC_ATTR_H /* if we may include exec_attr.h */ -#undef HAVE_SECDB_H /* if we may include secdb.h */ -#undef HAVE_PTHREAD_H /* if we may include pthread.h */ -#undef HAVE_THREAD_H /* if we may include thread.h */ - -/* - * Convert to SCHILY name - */ -#ifdef STDC_HEADERS -# ifndef HAVE_STDC_HEADERS -# define HAVE_STDC_HEADERS -# endif -#endif - -#ifdef HAVE_ELF_H -#define HAVE_ELF /* This system uses ELF */ -#else -# ifdef HAVE_AOUTHDR_H -# define HAVE_COFF /* This system uses COFF */ -# else -# ifdef HAVE_A_OUT_H -# define HAVE_AOUT /* This system uses AOUT */ -# endif -# endif -#endif - -/* - * Function declarations - */ -#undef HAVE_DECL_STAT /* Whether defines extern stat(); */ -#undef HAVE_DECL_LSTAT /* Whether defines extern lstat(); */ - -/* - * Library Functions - */ -#undef HAVE_ACCESS /* access() is present in libc */ -#undef HAVE_EACCESS /* eaccess() is present in libc */ -#undef HAVE_EUIDACCESS /* euidaccess() is present in libc */ -#undef HAVE_ACCESS_E_OK /* access() implements E_OK (010) for effective UIDs */ -#undef HAVE_CRYPT /* crypt() is present in libc or libcrypt */ -#undef HAVE_STRERROR /* strerror() is present in libc */ -#undef HAVE_MEMCHR /* memchr() is present in libc */ -#undef HAVE_MEMCPY /* memcpy() is present in libc */ -#undef HAVE_MEMMOVE /* memmove() is present in libc */ -#undef HAVE_MEMSET /* memset() is present in libc */ -#undef HAVE_MADVISE /* madvise() is present in libc */ -#undef HAVE_MLOCK /* mlock() is present in libc */ -#undef HAVE_MLOCKALL /* working mlockall() is present in libc */ -#undef HAVE_MMAP /* working mmap() is present in libc */ -#undef _MMAP_WITH_SIZEP /* mmap() needs address of size parameter */ -#undef HAVE_FLOCK /* *BSD flock() is present in libc */ -#undef HAVE_LOCKF /* lockf() is present in libc (XOPEN) */ -#undef HAVE_FCNTL_LOCKF /* file locking via fcntl() is present in libc */ -#undef HAVE_FCHDIR /* fchdir() is present in libc */ -#undef HAVE_FDOPENDIR /* fdopendir() is present in libc */ -#undef HAVE_OPENAT /* openat() is present in libc */ -#undef HAVE_ATTROPEN /* attropen() is present in libc */ -#undef HAVE_FSTATAT /* fstatat() is present in libc */ -#undef HAVE_FCHOWNAT /* fchownat() is present in libc */ -#undef HAVE_FUTIMESAT /* futimesat() is present in libc */ -#undef HAVE_RENAMEAT /* renameat() is present in libc */ -#undef HAVE_UNLINKAT /* unlinkat() is present in libc */ -#undef HAVE___ACCESSAT /* __accessat() is present in libc */ -/* - * See e.g. http://www.die.net/doc/linux/man/man2/mkdirat.2.html - */ -#undef HAVE_MKDIRAT /* mkdirat() is present in libc */ -#undef HAVE_FACCESSAT /* faccessat() is present in libc */ -#undef HAVE_FCHMODAT /* fchmodat() is present in libc */ -#undef HAVE_LINKAT /* inkat() is present in libc */ -#undef HAVE_MKFIFOAT /* mkfifoat() is present in libc */ -#undef HAVE_MKNODKAT /* mknodat() is present in libc */ -#undef HAVE_READLINKAT /* readlinkat() is present in libc */ -#undef HAVE_SYMLINKAT /* symlinkat() is present in libc */ -#undef HAVE_POPEN /* popen() is present in libc */ -#undef HAVE_PCLOSE /* pclose() is present in libc */ -#undef HAVE__POPEN /* _popen() is present in libc */ -#undef HAVE__PCLOSE /* _pclose() is present in libc */ -#undef HAVE_STATVFS /* statvfs() is present in libc */ -#undef HAVE_QUOTACTL /* quotactl() is present in libc */ -#undef HAVE_QUOTAIOCTL /* use ioctl(f, Q_QUOTACTL, &q) instead of quotactl() */ -#undef HAVE_GETPID /* getpid() is present in libc */ -#undef HAVE_GETPPID /* getppid() is present in libc */ -#undef HAVE_SETREUID /* setreuid() is present in libc */ -#undef HAVE_SETRESUID /* setresuid() is present in libc */ -#undef HAVE_SETEUID /* seteuid() is present in libc */ -#undef HAVE_SETUID /* setuid() is present in libc */ -#undef HAVE_SETREGID /* setregid() is present in libc */ -#undef HAVE_SETRESGID /* setresgid() is present in libc */ -#undef HAVE_SETEGID /* setegid() is present in libc */ -#undef HAVE_SETGID /* setgid() is present in libc */ -#undef HAVE_GETUID /* getuid() is present in libc */ -#undef HAVE_GETEUID /* geteuid() is present in libc */ -#undef HAVE_GETGID /* getgid() is present in libc */ -#undef HAVE_GETEGID /* getegid() is present in libc */ -#undef HAVE_GETPGID /* getpgid() is present in libc (POSIX) */ -#undef HAVE_SETPGID /* setpgid() is present in libc (POSIX) */ -#undef HAVE_GETPGRP /* getpgrp() is present in libc (ANY) */ -#undef HAVE_SETPGRP /* setpgrp() is present in libc (ANY) */ -#undef HAVE_BSD_GETPGRP /* getpgrp() in libc is BSD-4.2 compliant */ -#undef HAVE_BSD_SETPGRP /* setpgrp() in libc is BSD-4.2 compliant */ -#undef HAVE_GETSPNAM /* getspnam() in libc (SVR4 compliant) */ -#undef HAVE_GETSPWNAM /* getspwnam() in libsec.a (HP-UX) */ -#undef HAVE_SYNC /* sync() is present in libc */ -#undef HAVE_FSYNC /* fsync() is present in libc */ -#undef HAVE_TCGETATTR /* tcgetattr() is present in libc */ -#undef HAVE_TCSETATTR /* tcsetattr() is present in libc */ -#undef HAVE_TCGETPGRP /* tcgetpgrp() is present in libc */ -#undef HAVE_TCSETPGRP /* tcsetpgrp() is present in libc */ -#undef HAVE_WAIT /* wait() is present in libc */ -#undef HAVE_WAIT3 /* working wait3() is present in libc */ -#undef HAVE_WAIT4 /* wait4() is present in libc */ -#undef HAVE_WAITID /* waitid() is present in libc */ -#undef HAVE_WAITPID /* waitpid() is present in libc */ -#undef HAVE_GETHOSTID /* gethostid() is present in libc */ -#undef HAVE_GETHOSTNAME /* gethostname() is present in libc */ -#undef HAVE_GETDOMAINNAME /* getdomainname() is present in libc */ -#undef HAVE_GETPAGESIZE /* getpagesize() is present in libc */ -#undef HAVE_GETDTABLESIZE /* getdtablesize() is present in libc */ -#undef HAVE_GETRUSAGE /* getrusage() is present in libc */ -#undef HAVE_GETRLIMIT /* getrlimit() is present in libc */ -#undef HAVE_SETRLIMIT /* setrlimit() is present in libc */ -#undef HAVE_ULIMIT /* ulimit() is present in libc */ -#undef HAVE_GETTIMEOFDAY /* gettimeofday() is present in libc */ -#undef HAVE_SETTIMEOFDAY /* settimeofday() is present in libc */ -#undef HAVE_VAR_TIMEZONE /* extern long timezone is present in libc */ -#undef HAVE_TIME /* time() is present in libc */ -#undef HAVE_GMTIME /* gmtime() is present in libc */ -#undef HAVE_LOCALTIME /* localtime() is present in libc */ -#undef HAVE_MKTIME /* mktime() is present in libc */ -#undef HAVE_TIMEGM /* timegm() is present in libc */ -#undef HAVE_TIMELOCAL /* timelocal() is present in libc */ -#undef HAVE_FTIME /* ftime() is present in libc */ -#undef HAVE_STIME /* stime() is present in libc */ -#undef HAVE_TZSET /* tzset() is present in libc */ -#undef HAVE_CTIME /* ctime() is present in libc */ -#undef HAVE_CFTIME /* cftime() is present in libc */ -#undef HAVE_ASCFTIME /* ascftime() is present in libc */ -#undef HAVE_STRFTIME /* strftime() is present in libc */ -#undef HAVE_GETHRTIME /* gethrtime() is present in libc */ -#undef HAVE_POLL /* poll() is present in libc */ -#undef HAVE_SELECT /* select() is present in libc */ -#undef HAVE_CHMOD /* chmod() is present in libc */ -#undef HAVE_FCHMOD /* fchmod() is present in libc */ -#undef HAVE_LCHMOD /* lchmod() is present in libc */ -#undef HAVE_CHOWN /* chown() is present in libc */ -#undef HAVE_FCHOWN /* fchown() is present in libc */ -#undef HAVE_LCHOWN /* lchown() is present in libc */ -#undef HAVE_TRUNCATE /* truncate() is present in libc */ -#undef HAVE_FTRUNCATE /* ftruncate() is present in libc */ -#undef HAVE_BRK /* brk() is present in libc */ -#undef HAVE_SBRK /* sbrk() is present in libc */ -#undef HAVE_VA_COPY /* va_copy() is present in varargs.h/stdarg.h */ -#undef HAVE__VA_COPY /* __va_copy() is present in varargs.h/stdarg.h */ -#undef HAVE_DTOA /* BSD-4.4 __dtoa() is present in libc */ -#undef HAVE_DTOA_R /* BSD-4.4 __dtoa() with result ptr (reentrant) */ -#undef HAVE_DUP /* dup() is present in libc */ -#undef HAVE_DUP2 /* dup2() is present in libc */ -#undef HAVE_GETCWD /* POSIX getcwd() is present in libc */ -#undef HAVE_SMMAP /* may map anonymous memory to get shared mem */ -#undef HAVE_SHMAT /* shmat() is present in libc */ -#undef HAVE_SEMGET /* semget() is present in libc */ -#undef HAVE_LSTAT /* lstat() is present in libc */ -#undef HAVE_READLINK /* readlink() is present in libc */ -#undef HAVE_SYMLINK /* symlink() is present in libc */ -#undef HAVE_LINK /* link() is present in libc */ -#undef HAVE_HARD_SYMLINKS /* link() allows hard links on symlinks */ -#undef HAVE_LINK_NOFOLLOW /* link() does not follow symlinks when hard linking symlinks */ -#undef HAVE_RENAME /* rename() is present in libc */ -#undef HAVE_MKFIFO /* mkfifo() is present in libc */ -#undef HAVE_MKNOD /* mknod() is present in libc */ -#undef HAVE_ECVT /* ecvt() is present in libc */ -#undef HAVE_FCVT /* fcvt() is present in libc */ -#undef HAVE_GCVT /* gcvt() is present in libc */ -#undef HAVE_ECVT_R /* ecvt_r() is present in libc */ -#undef HAVE_FCVT_R /* fcvt_r() is present in libc */ -#undef HAVE_GCVT_R /* gcvt_r() is present in libc */ -#undef HAVE_ECONVERT /* econvert() is present in libc */ -#undef HAVE_FCONVERT /* fconvert() is present in libc */ -#undef HAVE_GCONVERT /* gconvert() is present in libc */ -#undef HAVE_ISINF /* isinf() is present in libc */ -#undef HAVE_ISNAN /* isnan() is present in libc */ -#undef HAVE_C99_ISINF /* isinf() is present in math.h/libc */ -#undef HAVE_C99_ISNAN /* isnan() is present in math.h/libc */ -#undef HAVE_RAND /* rand() is present in libc */ -#undef HAVE_DRAND48 /* drand48() is present in libc */ -#undef HAVE_ICONV /* iconv() is present in libiconv */ -#undef HAVE_ICONV_OPEN /* iconv_open() is present in libiconv */ -#undef HAVE_ICONV_CLOSE /* iconv_close() is present in libiconc */ -#undef HAVE_LIBICONV /* libiconv() is present in libiconv */ -#undef HAVE_LIBICONV_OPEN /* libiconv_open() is present in liiconv */ -#undef HAVE_LIBICONV_CLOSE /* libiconv_close() is present in libiconv */ -#undef HAVE_SETPRIORITY /* setpriority() is present in libc */ -#undef HAVE_NICE /* nice() is present in libc */ -#undef HAVE_DOSSETPRIORITY /* DosSetPriority() is present in libc */ -#undef HAVE_DOSALLOCSHAREDMEM /* DosAllocSharedMem() is present in libc */ -#undef HAVE_SEEKDIR /* seekdir() is present in libc */ -#undef HAVE_PUTENV /* putenv() is present in libc (preferred function) */ -#undef HAVE_SETENV /* setenv() is present in libc (use instead of putenv()) */ -#undef HAVE_UNAME /* uname() is present in libc */ -#undef HAVE_SNPRINTF /* snprintf() is present in libc */ -#undef HAVE_STRCASECMP /* strcasecmp() is present in libc */ -#undef HAVE_STRNCPY /* strncpy() is present in libc */ -#undef HAVE_STRLCPY /* strlcpy() is present in libc */ -#undef HAVE_STRTOL /* strtol() is present in libc */ -#undef HAVE_STRTOLL /* strtoll() is present in libc */ -#undef HAVE_STRTOUL /* strtoul() is present in libc */ -#undef HAVE_STRTOULL /* strtoull() is present in libc */ -#undef HAVE_STRTOD /* strtold() is present in libc */ -#undef HAVE_STRDUP /* strdup() is present in libc */ -#undef HAVE_STRSIGNAL /* strsignal() is present in libc */ -#undef HAVE_STR2SIG /* str2sig() is present in libc */ -#undef HAVE_SIG2STR /* sig2str() is present in libc */ -#undef HAVE_SIGSETJMP /* sigsetjmp() is present in libc */ -#undef HAVE_SIGLONGJMP /* siglongjmp() is present in libc */ -#undef HAVE_KILLPG /* killpg() is present in libc */ -#undef HAVE_SIGRELSE /* sigrelse() is present in libc */ -#undef HAVE_SIGPROCMASK /* sigprocmask() is present in libc (POSIX) */ -#undef HAVE_SIGSETMASK /* sigsetmask() is present in libc (BSD) */ -#undef HAVE_SIGSET /* sigset() is present in libc (POSIX) */ -#undef HAVE_SYS_SIGLIST /* char *sys_siglist[] is present in libc */ -#undef HAVE_SLEEP /* sleep() is present in libc */ -#undef HAVE_USLEEP /* usleep() is present in libc */ -#undef HAVE_FORK /* fork() is present in libc */ -#undef HAVE_EXECL /* execl() is present in libc */ -#undef HAVE_EXECLE /* execle() is present in libc */ -#undef HAVE_EXECLP /* execlp() is present in libc */ -#undef HAVE_EXECV /* execv() is present in libc */ -#undef HAVE_EXECVE /* execve() is present in libc */ -#undef HAVE_EXECVP /* execvp() is present in libc */ -#undef HAVE_GETEXECNAME /* getexecname() is present in libc */ -#undef HAVE_ALLOCA /* alloca() is present (else use malloc())*/ -#undef HAVE_VALLOC /* valloc() is present in libc (else use malloc())*/ -#undef vfork - -#undef HAVE_CHFLAGS /* chflags() is present in libc */ -#undef HAVE_FCHFLAGS /* fchflags() is present in libc */ -#undef HAVE_FFLAGSTOSTR /* fflagstostr() is present in libc */ -#undef HAVE_STRTOFFLAGS /* strtofflags() is present in libc */ - -#undef HAVE_GETTEXT /* gettext() is present in -lintl */ -#undef HAVE_SETLOCALE /* setlocale() is present in libc */ -#undef HAVE_LOCALECONV /* localeconv() is present in libc */ -#undef HAVE_NL_LANGINFO /* nl_langinfo() is present in libc */ - -#undef HAVE_FNMATCH /* fnmatch() is present in libc */ - -#undef HAVE_MKTEMP /* mktemp() is present in libc */ -#undef HAVE_MKSTEMP /* mkstemp() is present in libc */ - -#undef HAVE_GETPPRIV /* getppriv() is present in libc */ -#undef HAVE_SETPPRIV /* setppriv() is present in libc */ -#undef HAVE_PRIV_SET /* priv_set() is present in libc */ - -#undef HAVE_GETAUTHATTR /* getauthattr() is present in -lsec */ -#undef HAVE_GETUSERATTR /* getuserattr() is present in -lsec */ -#undef HAVE_GETEXECATTR /* getexecattr() is present in -lsec */ -#undef HAVE_GETPROFATTR /* getprofattr() is present in -lsec */ - -#undef HAVE_CLONE_AREA /* clone_area() is present in libc */ -#undef HAVE_CREATE_AREA /* create_area() is present in libc */ -#undef HAVE_DELETE_AREA /* delete_area() is present in libc */ - -#undef HAVE_YIELD /* yield() is present in libc */ -#undef HAVE_THR_YIELD /* thr_yield() is present in libc */ - -#undef HAVE_PTHREAD_CREATE /* pthread_create() is present in libpthread */ -#undef HAVE_PTHREAD_KILL /* pthread_kill() is present in libpthread */ -#undef HAVE_PTHREAD_MUTEX_LOCK /* pthread_mutex_lock() is present in libpthread */ -#undef HAVE_PTHREAD_COND_WAIT /* pthread_cond_wait() is present in libpthread */ -#undef HAVE_PTHREAD_SPIN_LOCK /* pthread_spin_lock() is present in libpthread */ - -#undef HAVE_CLOCK_GETTIME /* clock_gettime() is present in librt */ -#undef HAVE_CLOCK_SETTIME /* clock_settime() is present in librt */ -#undef HAVE_CLOCK_GETRES /* clock_getres() is present in librt */ -#undef HAVE_SCHED_GETPARAM /* sched_getparam() is present in librt */ -#undef HAVE_SCHED_SETPARAM /* sched_setparam() is present in librt */ -#undef HAVE_SCHED_GETSCHEDULER /* sched_getscheduler() is present in librt */ -#undef HAVE_SCHED_SETSCHEDULER /* sched_setscheduler() is present in librt */ -#undef HAVE_SCHED_YIELD /* sched_yield() is present in librt */ -#undef HAVE_NANOSLEEP /* nanosleep() is present in librt */ - -#undef HAVE_DIRFD /* dirfd() is present in libc */ - -/* - * Misc OS stuff - */ -#undef HAVE_DEV_TTY /* /dev/tty present */ -#undef HAVE_DEV_NULL /* /dev/null present */ -#undef HAVE_DEV_ZERO /* /dev/zero present */ - -/* - * Misc OS programs - */ -#undef SHELL_IS_BASH /* /bin/sh is bash */ - -/* - * OS madness - */ -#undef HAVE_BROKEN_LINUX_EXT2_FS_H /* whether is broken */ -#undef HAVE_BROKEN_SRC_LINUX_EXT2_FS_H /* whether /usr/src/linux/include/linux/ext2_fs.h is broken */ -#undef HAVE_USABLE_LINUX_EXT2_FS_H /* whether linux/ext2_fs.h is usable at all */ -#undef HAVE_BROKEN_SCSI_SCSI_H /* whether is broken */ -#undef HAVE_BROKEN_SRC_SCSI_SCSI_H /* whether /usr/src/linux/include/scsi/scsi.h is broken */ -#undef HAVE_BROKEN_SCSI_SG_H /* whether is broken */ -#undef HAVE_BROKEN_SRC_SCSI_SG_H /* whether /usr/src/linux/include/scsi/sg.h is broken */ - -/* - * Linux Extended File Attributes - */ -#undef HAVE_GETXATTR /* getxattr() */ -#undef HAVE_SETXATTR /* setxattr() */ -#undef HAVE_LISTXATTR /* listxattr() */ -#undef HAVE_LGETXATTR /* lgetxattr() */ -#undef HAVE_LSETXATTR /* lsetxattr() */ -#undef HAVE_LLISTXATTR /* llistxattr() */ - -/* - * Important: This must be a result from a check _before_ the Large File test - * has been run. It then tells us whether these functions are - * available even when not in Large File mode. - * - * Do not run the AC_FUNC_FSEEKO test from the GNU tar Large File test - * siute. It will use the same cache names and interfere with our test. - * Instead use the tests AC_SMALL_FSEEKO/AC_SMALL/STELLO and make sure - * they are placed before the large file tests. - */ -#undef HAVE_FSEEKO /* fseeko() is present in default compile mode */ -#undef HAVE_FTELLO /* ftello() is present in default compile mode */ - -#undef HAVE_RCMD /* rcmd() is present in libc/libsocket */ -#undef HAVE_SOCKET /* socket() is present in libc/libsocket */ -#undef HAVE_SOCKETPAIR /* socketpair() is present in libc/libsocket */ -#undef HAVE_GETSERVBYNAME /* getservbyname() is present in libc/libsocket */ -#undef HAVE_INET_NTOA /* inet_ntoa() is present in libc/libsocket */ -#undef HAVE_GETADDRINFO /* getaddrinfo() is present in libc/libsocket */ -#undef HAVE_GETNAMEINFO /* getnameinfo() is present in libc/libsocket */ - -#if defined(HAVE_QUOTACTL) || defined(HAVE_QUOTAIOCTL) -# define HAVE_QUOTA /* The system inludes quota */ -#endif - -/* - * We need to test for the include files too because Apollo Domain/OS has a - * libc that includes the functions but the includes files are not visible - * from the BSD compile environment. - */ -#if defined(HAVE_SHMAT) && defined(HAVE_SYS_SHM_H) && defined(HAVE_SYS_IPC_H) -# define HAVE_USGSHM /* USG shared memory is present */ -#endif -#if defined(HAVE_SEMGET) && defined(HAVE_SYS_SHM_H) && defined(HAVE_SYS_IPC_H) -# define HAVE_USGSEM /* USG semaphores are present */ -#endif - -#if defined(HAVE_GETPGRP) && !defined(HAVE_BSD_GETPGRP) -#define HAVE_POSIX_GETPGRP 1 /* getpgrp() in libc is POSIX compliant */ -#endif -#if defined(HAVE_SETPGRP) && !defined(HAVE_BSD_SETPGRP) -#define HAVE_POSIX_SETPGRP 1 /* setpgrp() in libc is POSIX compliant */ -#endif - -/* - * Structures - */ -#undef HAVE_MTGET_TYPE /* if struct mtget contains mt_type (drive type) */ -#undef HAVE_MTGET_MODEL /* if struct mtget contains mt_model (drive type) */ -#undef HAVE_MTGET_DSREG /* if struct mtget contains mt_dsreg (drive status) */ -#undef HAVE_MTGET_DSREG1 /* if struct mtget contains mt_dsreg1 (drive status msb) */ -#undef HAVE_MTGET_DSREG2 /* if struct mtget contains mt_dsreg2 (drive status lsb) */ -#undef HAVE_MTGET_GSTAT /* if struct mtget contains mt_gstat (generic status) */ -#undef HAVE_MTGET_ERREG /* if struct mtget contains mt_erreg (error register) */ -#undef HAVE_MTGET_RESID /* if struct mtget contains mt_resid (residual count) */ -#undef HAVE_MTGET_FILENO /* if struct mtget contains mt_fileno (file #) */ -#undef HAVE_MTGET_BLKNO /* if struct mtget contains mt_blkno (block #) */ -#undef HAVE_MTGET_FLAGS /* if struct mtget contains mt_flags (flags) */ -#undef HAVE_MTGET_BF /* if struct mtget contains mt_bf (optimum blocking factor) */ -#undef HAVE_STRUCT_TIMEVAL /* have struct timeval in time.h or sys/time.h */ -#undef HAVE_STRUCT_TIMEZONE /* have struct timezone in time.h or sys/time.h */ -#undef HAVE_STRUCT_RUSAGE /* have struct rusage in sys/resource.h */ -#undef HAVE_SI_UTIME /* if struct siginfo contains si_utime */ -#undef HAVE_UNION_SEMUN /* have an illegal definition for union semun in sys/sem.h */ -#undef HAVE_UNION_WAIT /* have union wait in wait.h */ -#undef HAVE_DIRENT_D_INO /* have d_ino in struct dirent */ -#undef HAVE_DIR_DD_FD /* have dd_fd in DIR * */ -/* - * SCO UnixWare has st_atim.st__tim.tv_nsec but the st_atim.tv_nsec tests also - * succeeds. If you use st_atim.tv_nsec on UnixWare, you get a warning about - * illegal structure usage. For this reason, your code needs to have - * #ifdef HAVE_ST__TIM before #ifdef HAVE_ST_NSEC. - */ -#undef HAVE_ST_SPARE1 /* if struct stat contains st_spare1 (usecs) */ -#undef HAVE_ST_ATIMENSEC /* if struct stat contains st_atimensec (nanosecs) */ -#undef HAVE_ST_NSEC /* if struct stat contains st_atim.tv_nsec (nanosecs) */ -#undef HAVE_ST__TIM /* if struct stat contains st_atim.st__tim.tv_nsec (nanosecs) */ -#undef HAVE_ST_ATIMESPEC /* if struct stat contains st_atimespec.tv_nsec (nanosecs) */ -#undef HAVE_ST_BLKSIZE /* if struct stat contains st_blksize */ -#undef HAVE_ST_BLOCKS /* if struct stat contains st_blocks */ -#undef HAVE_ST_FSTYPE /* if struct stat contains st_fstype */ -#undef HAVE_ST_ACLCNT /* if struct stat contains st_aclcnt */ -#undef HAVE_ST_RDEV /* if struct stat contains st_rdev */ -#undef HAVE_ST_FLAGS /* if struct stat contains st_flags */ -#undef STAT_MACROS_BROKEN /* if the macros S_ISDIR, S_ISREG .. don't work */ - -#undef HAVE_UTSNAME_PROCESSOR /* if struct utsname contains processor */ -#undef HAVE_UTSNAME_SYSNAME_HOST /* if struct utsname contains sysname_host */ -#undef HAVE_UTSNAME_RELEASE_HOST /* if struct utsname contains release_host */ -#undef HAVE_UTSNAME_VERSION_HOST /* if struct utsname contains version_host */ - -#undef DEV_MINOR_BITS /* # if bits needed to hold minor device number */ -#undef DEV_MINOR_NONCONTIG /* if bits in minor device number are noncontiguous */ - -#undef HAVE_SOCKADDR_STORAGE /* if socket.h defines struct sockaddr_storage */ - - -/* - * Byteorder/Bitorder - */ -#define HAVE_C_BIGENDIAN /* Flag that WORDS_BIGENDIAN test was done */ -#undef WORDS_BIGENDIAN /* If using network byte order */ -#define HAVE_C_BITFIELDS /* Flag that BITFIELDS_HTOL test was done */ -#undef BITFIELDS_HTOL /* If high bits come first in structures */ - -/* - * Types/Keywords - */ -#undef SIZEOF_CHAR -#undef SIZEOF_SHORT_INT -#undef SIZEOF_INT -#undef SIZEOF_LONG_INT -#undef SIZEOF_LONG_LONG -#undef SIZEOF___INT64 -#undef SIZEOF_CHAR_P -#undef SIZEOF_UNSIGNED_CHAR -#undef SIZEOF_UNSIGNED_SHORT_INT -#undef SIZEOF_UNSIGNED_INT -#undef SIZEOF_UNSIGNED_LONG_INT -#undef SIZEOF_UNSIGNED_LONG_LONG -#undef SIZEOF_UNSIGNED___INT64 -#undef SIZEOF_UNSIGNED_CHAR_P - -#undef HAVE_LONGLONG /* Compiler defines long long type */ -#undef HAVE___INT64 /* Compiler defines __int64 type */ -#undef CHAR_IS_UNSIGNED /* Compiler defines char to be unsigned */ - -#undef const /* Define to empty if const doesn't work */ -#undef uid_t /* To be used if uid_t is not present */ -#undef gid_t /* To be used if gid_t is not present */ -#undef size_t /* To be used if size_t is not present */ -#undef ssize_t /* To be used if ssize_t is not present */ -#undef pid_t /* To be used if pid_t is not present */ -#undef off_t /* To be used if off_t is not present */ -#undef mode_t /* To be used if mode_t is not present */ -#undef time_t /* To be used if time_t is not present */ -#undef caddr_t /* To be used if caddr_t is not present */ -#undef daddr_t /* To be used if daddr_t is not present */ -#undef dev_t /* To be used if dev_t is not present */ -#undef major_t /* To be used if major_t is not present */ -#undef minor_t /* To be used if minor_t is not present */ -#undef ino_t /* To be used if ino_t is not present */ -#undef nlink_t /* To be used if nlink_t is not present */ -#undef blksize_t /* To be used if blksize_t is not present */ -#undef blkcnt_t /* To be used if blkcnt_t is not present */ - -#undef HAVE_TYPE_GREG_T /* if defines greg_t */ - -/* - * Important: Next Step needs time.h for clock_t (because of a bug) - */ -#undef clock_t /* To be used if clock_t is not present */ -#undef socklen_t /* To be used if socklen_t is not present */ - -/* - * These types are present on all UNIX systems but should be avoided - * for portability. - * On Apollo/Domain OS we don't have them.... - * - * Better include and use Uchar, Uint & Ulong - */ -#undef u_char /* To be used if u_char is not present */ -#undef u_short /* To be used if u_short is not present */ -#undef u_int /* To be used if u_int is not present */ -#undef u_long /* To be used if u_long is not present */ - -/*#undef HAVE_SIZE_T*/ -/*#undef NO_SIZE_T*/ -#undef VA_LIST_IS_ARRAY /* va_list is an array */ -#undef GETGROUPS_T -#define GID_T GETGROUPS_T - -/* - * Define as the return type of signal handlers (int or void). - */ -#undef RETSIGTYPE - -/* - * Defines needed to get large file support. - */ -#ifdef USE_LARGEFILES - -#undef HAVE_LARGEFILES - -#ifdef HAVE_LARGEFILES /* If we have working largefiles at all */ - /* This is not defined with glibc-2.1.3 */ - -#undef _FILE_OFFSET_BITS /* # of bits in off_t if settable */ -#undef _LARGEFILE_SOURCE /* To make ftello() visible (HP-UX 10.20). */ -#undef _LARGE_FILES /* Large file defined on AIX-style hosts. */ -#undef _XOPEN_SOURCE /* To make ftello() visible (glibc 2.1.3). */ - /* XXX We don't use this because glibc2.1.3*/ - /* XXX is bad anyway. If we define */ - /* XXX _XOPEN_SOURCE we will loose caddr_t */ - -#undef HAVE_FSEEKO /* Do we need this? If HAVE_LARGEFILES is */ - /* defined, we have fseeko() */ - -#endif /* HAVE_LARGEFILES */ -#endif /* USE_LARGEFILES */ - -#ifdef USE_ACL /* Enable/disable ACL support */ -/* - * POSIX ACL support - */ -#undef HAVE_ACL_GET_FILE /* acl_get_file() function */ -#undef HAVE_ACL_SET_FILE /* acl_set_file() function */ -#undef HAVE_ACL_FROM_TEXT /* acl_from_text() function */ -#undef HAVE_ACL_TO_TEXT /* acl_to_text() function */ -#undef HAVE_ACL_FREE /* acl_free() function */ -#undef HAVE_ACL_DELETE_DEF_FILE /* acl_delete_def_file() function */ -#undef HAVE_ACL_EXTENDED_FILE /* acl_extended_file() function (Linux only)*/ - -#if defined(HAVE_ACL_GET_FILE) && defined(HAVE_ACL_SET_FILE) && \ - defined(HAVE_ACL_FROM_TEXT) && defined(HAVE_ACL_TO_TEXT) && \ - defined(HAVE_ACL_FREE) -# define HAVE_POSIX_ACL 1 /* POSIX ACL's present */ -#endif - -/* - * Sun ACL support. - * Note: unfortunately, HP-UX has an (undocumented) acl() function in libc. - */ -#undef HAVE_ACL /* acl() function */ -#undef HAVE_FACL /* facl() function */ -#undef HAVE_ACLFROMTEXT /* aclfromtext() function */ -#undef HAVE_ACLTOTEXT /* acltotext() function */ - -#if defined(HAVE_ACL) && defined(HAVE_FACL) && \ - defined(HAVE_ACLFROMTEXT) && defined(HAVE_ACLTOTEXT) -# define HAVE_SUN_ACL 1 /* Sun ACL's present */ -#endif - -/* - * HP-UX ACL support. - * Note: unfortunately, HP-UX has an (undocumented) acl() function in libc. - */ -#undef HAVE_GETACL /* getacl() function */ -#undef HAVE_FGETACL /* fgetacl() function */ -#undef HAVE_SETACL /* setacl() function */ -#undef HAVE_FSETACL /* fsetacl() function */ -#undef HAVE_STRTOACL /* strtoacl() function */ -#undef HAVE_ACLTOSTR /* acltostr() function */ -#undef HAVE_CPACL /* cpacl() function */ -#undef HAVE_FCPACL /* fcpacl() function */ -#undef HAVE_CHOWNACL /* chownacl() function */ -#undef HAVE_SETACLENTRY /* setaclentry() function */ -#undef HAVE_FSETACLENTRY /* fsetaclentry() function */ - -#if defined(HAVE_GETACL) && defined(HAVE_FGETACL) && \ - defined(HAVE_SETACL) && defined(HAVE_FSETACL) && \ - defined(HAVE_STRTOACL) && defined(HAVE_ACLTOTEXT) -# define HAVE_HP_ACL 1 /* HP-UX ACL's present */ -#endif - -/* - * Global definition whether ACL support is present. - * As HP-UX differs too much from other implementations, HAVE_HP_ACL is not - * included in HAVE_ANY_ACL. - */ -#if defined(HAVE_POSIX_ACL) || defined(HAVE_SUN_ACL) -# define HAVE_ANY_ACL 1 /* Any ACL implementation present */ -#endif - -#endif /* USE_ACL */ - -/* - * Misc CC / LD related stuff - */ -#undef NO_USER_MALLOC /* If we cannot define our own malloc() */ -#undef HAVE_DYN_ARRAYS /* If the compiler allows dynamic sized arrays */ - -/* - * Strings that help to maintain OS/platform id's in C-programs - */ -#undef HOST_ALIAS /* Output from config.guess (orig) */ -#undef HOST_SUB /* Output from config.sub (modified) */ -#undef HOST_CPU /* CPU part from HOST_SUB */ -#undef HOST_VENDOR /* VENDOR part from HOST_SUB */ -#undef HOST_OS /* CPU part from HOST_SUB */ - - -/* - * Begin restricted code for quality assurance. - * - * Warning: you are not allowed to include the #define below if you are not - * using the Schily makefile system or if you modified the autoconfiguration - * tests. - * - * If you only added other tests you are allowed to keep this #define. - * - * This restiction is introduced because this way, I hope that people - * contribute to the project instead of creating branches. - */ -#define IS_SCHILY_XCONFIG -/* - * End restricted code for quality assurance. - */ diff -Nru cdrtools-2.01.01a33/configure cdrtools-3.02a09/configure --- cdrtools-2.01.01a33/configure 2002-12-16 20:24:33.000000000 +0000 +++ cdrtools-3.02a09/configure 2014-12-03 19:09:28.000000000 +0000 @@ -2,26 +2,26 @@ echo 'configure is no longer used - just type "make", supported make programs are:' echo '' echo 'smake - The Schily smake program' -echo ' This is the preferred make program, the source can be' -echo ' found on ftp://ftp.berlios.de/pub/smake/alpha/' +echo ' This is the preferred make program, the source can be' +echo ' found on https://sourceforge.net/projects/s-make/files/alpha/' echo '' echo ' Smake is the only make program with automake features, it is' echo ' the only program that works on unknown platforms.' echo '' echo 'make - SunPRO make (on SunOS/Solaris only)' -echo ' in /usr/bin/ (SunOS 4.x) or /usr/ccs/bin/ (Solaris)' +echo ' in /usr/bin/ (SunOS 4.x) or /usr/ccs/bin/ (Solaris)' echo '' echo 'gmake - GNU make' -echo ' GNU make will not work correctly on all platforms' -echo ' and due to some conceptional bugs output several' -echo ' error messages that are not related to the makefile' -echo ' system but to GNU make (see README.gmake)' +echo ' GNU make will not work correctly on all platforms' +echo ' and due to some conceptional bugs output several' +echo ' error messages that are not related to the makefile' +echo ' system but to GNU make (see README.gmake)' echo '' echo 'Other make programs will not work, for more information read README.compile' echo '' echo 'If you have problems and if you are in doubt, try to use smake' echo ' Always compile the latest version that can be found on:' -echo ' ftp://ftp.berlios.de/pub/smake/alpha/' +echo ' https://sourceforge.net/projects/s-make/files/alpha/' echo '' # # Make automated procedures that believe all programs still use the outdated GNU diff -Nru cdrtools-2.01.01a33/CONTRIBUTING cdrtools-3.02a09/CONTRIBUTING --- cdrtools-2.01.01a33/CONTRIBUTING 2006-05-29 22:04:27.000000000 +0000 +++ cdrtools-3.02a09/CONTRIBUTING 2014-12-03 19:07:01.000000000 +0000 @@ -1,4 +1,4 @@ -# @(#)CONTRIBUTING 1.3 06/05/30 Copyright 2006 J. Schilling +# @(#)CONTRIBUTING 1.4 14/12/03 Copyright 2006 J. Schilling If you like to send patches or code to add to the project, you are welcome. @@ -21,9 +21,9 @@ §6 Your code is cleanly indented (matches the coding style from "Cstyle"). See files: - ftp://ftp.berlios.de/pub/cdrecord/Cstyle + http://sf.net/projects/schilytools/files/cstyle/Cstyle and - ftp://ftp.berlios.de/pub/cdrecord/cstyle + http://sf.net/projects/schilytools/files/cstyle/cstyle §7 You allow me to publish the code under any OSI approved license (see http://www.opensource.org/). If you like to diff -Nru cdrtools-2.01.01a33/COPYING cdrtools-3.02a09/COPYING --- cdrtools-2.01.01a33/COPYING 2007-07-30 18:46:47.000000000 +0000 +++ cdrtools-3.02a09/COPYING 2012-02-26 21:25:58.000000000 +0000 @@ -1,3 +1,6 @@ +# @(#)COPYING 1.12 12/02/26 Copyright 2007-2012 J. Schilling + + The software in this directory tree is free software and uses licenses that are aproved be the OpenSource Initative @@ -6,11 +9,13 @@ You may of course copy and redistribute sources and derived binaries from this software. -Not all sub-projects use the same license. Here is a list of -sub-directories and it's related licenses: +Not all sub-projects in this directory tree use the same license. Each named +sub-directory holds an own independent "work" with respect to the Copyright +law. Here is a list of sub-directories (works) and it's related licenses: btcflash/ - A firmwareflash program (CDDL) + A firmwareflash program (CDDL), + parts from David Huang in btcflash.c are public domain Note: uses libscg cdda2wav/ A DAE program (CDDL) @@ -18,8 +23,9 @@ cdrecord/ A CD/DVD-recording program (CDDL) Note: uses libscg -conf/ +autoconf/ The Schily Autoconf program (GPL) +conf/ Support shell scripts for the Schily Makefile system (CDDL) DEFAULTS/ Default files for the Schily Makefile system (CDDL) @@ -31,12 +37,16 @@ Support H-Files for the Schily Makefile system (CDDL) libdeflt/ A lib for accessing files under /etc/default/ (CDDL) +libcdrdeflt/ + A lib for accessing the file /etc/default/cdrecord (CDDL) libedc/ A Reed Solomon Encoder and Decoder (CDDL) libfile/ - A lib that implements the 'file' command (license similar to BSDL) + A lib that implements the 'file' command (BSDL 2 clause) libhfs_iso/ HFS support lib (GPL) +libmdigest/ + Message digest lib (partially public domain, partially BSD 2 clause) libparanoia/ CD paranoia CD-DAE support lib (LGPL) librscg/ @@ -49,13 +59,20 @@ This code may only be used together with other code that is under an approved OpenSource license, see http://www.opensource.org/. +libscgcmd/ + A SCSI-generic library that implements basic SCSI commands (CDDL) + This library sends the SCSI commands via libscg. libschily/ The schily basic support library (CDDL) libsiconv/ A simple iconv replacement/wrapper (CDDL) +libvms/ + A library with supportcode for the VMS port (License: to fit any code in cdrtools) + Copyright (C) 2004-2006 Steven M. Schweda mkisofs/ A ISO-9660/Rock-Ridge/Joliet/HFS/UDF filesystem formatter (GPL) Note: uses libscg + See special GPL compatibility notes below readcd/ A CD/DVD read utility (CDDL) Note: uses libscg @@ -89,4 +106,26 @@ To find a list of LGPL licensed files, type: find . -type f -exec grep -l 'GNU Lesser General' {} + + +GPL compatibility notes: + No non-GPL source is based on or derived from GPL code. + +The terms and conditions of the GPL only cover a GPLd work but do not +extend to other works that have been published under a different license. + +Linking a GPL'd work with another work does not create a "derived work" +but a "collective work". In case of a collective work, the GPL is very +obvious with only requiring the GPLd parts to be covered by the terms +and conditions of the GPL. The GPL however requires the other parts to +be delivered with the GPLd parts in order to permit to rebuild the binary. + + +Note: In case of statical linking, the resulting "mkisofs binary" is a +combination of several separate projects (works) under different licenses. +If you combine code from different licenses, you need to honor the legal +implications from the included GPL code and the other code. + +If you just publish the complete original cdrtools source, you honor the GPL. +If you like to create a separate mkisofs package, be careful to verify that +everything that is needed to compile mkisofs is contained in this package. diff -Nru cdrtools-2.01.01a33/debian/cdda2wav.install cdrtools-3.02a09/debian/cdda2wav.install --- cdrtools-2.01.01a33/debian/cdda2wav.install 2018-05-12 16:55:34.000000000 +0000 +++ cdrtools-3.02a09/debian/cdda2wav.install 2018-05-12 16:39:28.000000000 +0000 @@ -1,3 +1,3 @@ debian/tmp/usr/bin/cdda2wav -debian/tmp/usr/bin/cdrtools.cdda2mp3 -debian/tmp/usr/bin/cdrtools.cdda2ogg +debian/tmp/usr/bin/cdda2ogg +debian/tmp/usr/bin/cdda2mp3 diff -Nru cdrtools-2.01.01a33/debian/cdda2wav.links cdrtools-3.02a09/debian/cdda2wav.links --- cdrtools-2.01.01a33/debian/cdda2wav.links 2018-05-12 16:55:34.000000000 +0000 +++ cdrtools-3.02a09/debian/cdda2wav.links 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -usr/share/man/man1/cdrtools.cdda2ogg.1.gz usr/share/man/man1/cdrtools.cdda2mp3.1.gz diff -Nru cdrtools-2.01.01a33/debian/cdda2wav.manpages cdrtools-3.02a09/debian/cdda2wav.manpages --- cdrtools-2.01.01a33/debian/cdda2wav.manpages 2018-05-12 16:55:34.000000000 +0000 +++ cdrtools-3.02a09/debian/cdda2wav.manpages 2018-05-12 16:39:28.000000000 +0000 @@ -1,2 +1,2 @@ -debian/tmp/usr/man/man1/cdda2wav.1 -debian/tmp/usr/man/man1/cdrtools.cdda2ogg.1 +debian/tmp/usr/share/man/man1/cdda2wav.1 +debian/tmp/usr/share/man/man1/cdda2ogg.1 diff -Nru cdrtools-2.01.01a33/debian/cdda2wav.postinst cdrtools-3.02a09/debian/cdda2wav.postinst --- cdrtools-2.01.01a33/debian/cdda2wav.postinst 2018-05-12 16:55:34.000000000 +0000 +++ cdrtools-3.02a09/debian/cdda2wav.postinst 2018-05-12 16:39:28.000000000 +0000 @@ -1,4 +1,7 @@ -#! /bin/sh +#!/bin/sh +# postinst script for #PACKAGE# +# +# see: dh_installdeb(1) set -e @@ -7,38 +10,26 @@ # * `abort-upgrade' # * `abort-remove' `in-favour' # +# * `abort-remove' # * `abort-deconfigure' `in-favour' # `removing' # -# for details, see /usr/share/doc/packaging-manual/ -# -# quoting from the policy: -# Any necessary prompting should almost always be confined to the -# post-installation script, and should be protected with a conditional -# so that unnecessary prompting doesn't happen if a package's -# installation fails and the `postinst' is called with `abort-upgrade', -# `abort-remove' or `abort-deconfigure'. +# for details, see http://www.debian.org/doc/debian-policy/ or +# the debian-policy package + case "$1" in configure) - update-alternatives --quiet --install \ - /usr/bin/cdda2ogg cdda2ogg /usr/bin/cdrtools.cdda2ogg 70 \ - --slave /usr/share/man/man1/cdda2ogg.1.gz cdda2ogg.1.gz \ - /usr/share/man/man1/cdrtools.cdda2ogg.1.gz - - update-alternatives --quiet --install \ - /usr/bin/cdda2mp3 cdda2mp3 /usr/bin/cdrtools.cdda2mp3 70 \ - --slave /usr/share/man/man1/cdda2mp3.1.gz cdda2mp3.1.gz \ - /usr/share/man/man1/cdrtools.cdda2mp3.1.gz - ;; + setcap cap_dac_override,cap_sys_admin,cap_sys_nice,cap_net_bind_service,cap_sys_rawio+ep /usr/bin/cdda2wav + ;; abort-upgrade|abort-remove|abort-deconfigure) - ;; + ;; *) - echo "postinst called with unknown argument \`$1'" >&2 - exit 0 - ;; + echo "postinst called with unknown argument \`$1'" >&2 + exit 1 + ;; esac # dh_installdeb will replace this with shell code automatically @@ -47,4 +38,3 @@ #DEBHELPER# exit 0 - diff -Nru cdrtools-2.01.01a33/debian/cdda2wav.prerm cdrtools-3.02a09/debian/cdda2wav.prerm --- cdrtools-2.01.01a33/debian/cdda2wav.prerm 2018-05-12 16:55:34.000000000 +0000 +++ cdrtools-3.02a09/debian/cdda2wav.prerm 1970-01-01 00:00:00.000000000 +0000 @@ -1,31 +0,0 @@ -#! /bin/sh - -set -e - -# summary of how this script can be called: -# * `remove' -# * `upgrade' -# * `failed-upgrade' -# * `remove' `in-favour' -# * `deconfigure' `in-favour' -# `removing' -# -# for details, see /usr/share/doc/packaging-manual/ - -case "$1" in - remove|upgrade|deconfigure) - update-alternatives --quiet --remove cdda2ogg /usr/bin/cdrtools.cdda2ogg - update-alternatives --quiet --remove cdda2mp3 /usr/bin/cdrtools.cdda2ogg - ;; - failed-upgrade) - ;; - *) - echo "prerm called with unknown argument \`$1'" >&2 - exit 0 - ;; -esac - -#DEBHELPER# - -exit 0 - diff -Nru cdrtools-2.01.01a33/debian/cdrecord.install cdrtools-3.02a09/debian/cdrecord.install --- cdrtools-2.01.01a33/debian/cdrecord.install 2018-05-12 16:55:34.000000000 +0000 +++ cdrtools-3.02a09/debian/cdrecord.install 2018-05-12 16:39:28.000000000 +0000 @@ -10,3 +10,7 @@ debian/tmp/etc/default/cdrecord debian/tmp/etc/default/rscsi + +# install the scripts that convince brasero that wodim and readom are present +debian/wodim /usr/bin +debian/readom /usr/bin diff -Nru cdrtools-2.01.01a33/debian/cdrecord.manpages cdrtools-3.02a09/debian/cdrecord.manpages --- cdrtools-2.01.01a33/debian/cdrecord.manpages 2018-05-12 16:55:34.000000000 +0000 +++ cdrtools-3.02a09/debian/cdrecord.manpages 2018-05-12 16:39:28.000000000 +0000 @@ -1,7 +1,7 @@ -debian/tmp/usr/man/man1/readcd.1 -debian/tmp/usr/man/man1/cdrecord.1 -debian/tmp/usr/man/man1/scgcheck.1 +debian/tmp/usr/share/man/man1/readcd.1 +debian/tmp/usr/share/man/man1/cdrecord.1 +debian/tmp/usr/share/man/man1/scgcheck.1 # don't install btcflash for now, since it is also contained by # dvd+rw-tools -# debian/tmp/usr/man/man1/btcflash.1 +# debian/tmp/usr/share/man/man1/btcflash.1 diff -Nru cdrtools-2.01.01a33/debian/cdrecord.postinst cdrtools-3.02a09/debian/cdrecord.postinst --- cdrtools-2.01.01a33/debian/cdrecord.postinst 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/debian/cdrecord.postinst 2018-05-12 16:39:28.000000000 +0000 @@ -0,0 +1,41 @@ +#!/bin/sh +# postinst script for #PACKAGE# +# +# see: dh_installdeb(1) + +set -e + +# summary of how this script can be called: +# * `configure' +# * `abort-upgrade' +# * `abort-remove' `in-favour' +# +# * `abort-remove' +# * `abort-deconfigure' `in-favour' +# `removing' +# +# for details, see http://www.debian.org/doc/debian-policy/ or +# the debian-policy package + + +case "$1" in + configure) + setcap cap_sys_resource,cap_dac_override,cap_sys_admin,cap_sys_nice,cap_net_bind_service,cap_ipc_lock,cap_sys_rawio+ep /usr/bin/cdrecord + setcap cap_dac_override,cap_sys_admin,cap_net_bind_service,cap_sys_rawio+ep /usr/bin/readcd + ;; + + abort-upgrade|abort-remove|abort-deconfigure) + ;; + + *) + echo "postinst called with unknown argument \`$1'" >&2 + exit 1 + ;; +esac + +# dh_installdeb will replace this with shell code automatically +# generated by other debhelper scripts. + +#DEBHELPER# + +exit 0 diff -Nru cdrtools-2.01.01a33/debian/changelog cdrtools-3.02a09/debian/changelog --- cdrtools-2.01.01a33/debian/changelog 2018-05-12 16:55:34.000000000 +0000 +++ cdrtools-3.02a09/debian/changelog 2018-05-12 16:39:38.000000000 +0000 @@ -1,10 +1,105 @@ -cdrtools (10:2.01.01a33-0ubuntu2) gutsy; urgency=low +cdrtools (10:3.02a09-0ubuntu1~bionic~cdrtoolsppa1) bionic; urgency=medium - * introduce alternatives system for the scripts and manpages - "cdda2mp3" and "cdda2ogg", in order to avoid file conflicts between - the cdda2wav package from multiverse with icedax from main. + * Non-maintainer upload. + * New upstream release. - -- Reinhard Tartler Sun, 16 Sep 2007 19:07:25 +0200 + -- Brandon Snider Sat, 12 May 2018 12:39:38 -0400 + +cdrtools (10:3.02a07-0ubuntu1~artful~cdrtoolsppa1) artful; urgency=medium + + * New upstream release. + * Upload to artful. + + -- Brandon Snider Sat, 22 Jul 2017 11:44:57 -0400 + +cdrtools (10:3.02a06-0ubuntu1~yakkety~cdrtoolsppa1) yakkety; urgency=medium + + * New upstream release. + + -- Brandon Snider Thu, 17 Mar 2016 13:56:09 -0400 + +cdrtools (10:3.01a28-0ubuntu1~wily~cdrtoolsppa1) wily; urgency=medium + + * New upstream release. + + -- Brandon Snider Sun, 17 May 2015 15:05:34 -0400 + + +cdrtools (10:3.01a24-0ubuntu1~utopic~cdrtoolsppa2) utopic; urgency=medium + + * New upsream release. + * Modified debian/watch to use sourceforge URL. + + -- Brandon Snider Wed, 20 Aug 2014 10:40:17 -0400 + +cdrtools (10:3.01a22-0ubuntu1~saucy~cdrtoolsppa1) saucy; urgency=low + + * New upstream release. + * Changed scripts to Shell from Python. + + -- Brandon Snider Mon, 20 Jan 2014 15:12:17 -0500 + +cdrtools (10:3.01a21-0ubuntu1~trusty~cdrtoolsppa2) trusty; urgency=low + + * New upstream release. + * Added scripts to convince Brasero wodim, genisoimage, and readom are + present. + * Added postinst script to run setcap commands. + * Added libcap-dev to build-depends. + * Updated debian scripts to compat 9. + + -- Brandon Snider Fri, 17 Jan 2014 13:01:24 -0500 + +cdrtools (10:3.00-0ubuntu1~raring~cdrtoolsppa1) raring; urgency=low + + * Rebuild for Raring. + + -- Brandon Snider Thu, 28 Apr 2011 23:00:09 -0400 + +cdrtools (10:3.00-0ubuntu1~maverick~cdrtoolsppa1) maverick; urgency=low + + * New upstream release. + + -- Brandon Snider Thu, 10 Jun 2010 13:03:52 -0400 + +cdrtools (10:2.01.01a78-0ubuntu1~ppa1) lucid; urgency=low + + * New upstream release. + + -- Brandon Snider Sat, 01 May 2010 15:06:34 -0400 + +cdrtools (10:2.01.01a77-0ubuntu1~ppa1) lucid; urgency=low + + * New upstream release. + + -- Brandon Snider Thu, 15 Apr 2010 15:37:25 -0400 + +cdrtools (10:2.01.01a76-0ubuntu1~ppa2) karmic; urgency=low + + * new upstream version. + * Made mkisofs overwrite and replace genisoimage. + * Made cdrecord overwrite and replace wodim. + + -- Brandon Snider Sun, 28 Feb 2010 22:58:16 -0500 + +cdrtools (10:2.01.01a50-0ubuntu1~ppa1) intrepid; urgency=low + + * new upstream version. + * adjust Vcs-Bzr filed to ~ubuntu-burning team + + -- Reinhard Tartler Fri, 26 Sep 2008 22:15:15 +0200 + +cdrtools (10:2.01.01a35-0ubuntu1~ppa1) gutsy; urgency=low + + * new upstream version + + -- Reinhard Tartler Tue, 04 Sep 2007 13:34:17 +0200 + +cdrtools (10:2.01.01a33-0ubuntu1~ppa1) gutsy; urgency=low + + * upload section fix to ubuntu-burning team ppa. + + -- Reinhard Tartler Sun, 19 Aug 2007 14:12:26 +0200 cdrtools (10:2.01.01a33-0ubuntu1) gutsy; urgency=low diff -Nru cdrtools-2.01.01a33/debian/compat cdrtools-3.02a09/debian/compat --- cdrtools-2.01.01a33/debian/compat 2018-05-12 16:55:34.000000000 +0000 +++ cdrtools-3.02a09/debian/compat 2018-05-12 16:39:28.000000000 +0000 @@ -1 +1 @@ -5 +9 diff -Nru cdrtools-2.01.01a33/debian/control cdrtools-3.02a09/debian/control --- cdrtools-2.01.01a33/debian/control 2018-05-12 16:55:34.000000000 +0000 +++ cdrtools-3.02a09/debian/control 2018-05-12 16:39:28.000000000 +0000 @@ -3,14 +3,18 @@ Priority: optional Maintainer: Ubuntu MOTU Developers Uploaders: Reinhard Tartler -Build-Depends: debhelper (>= 5), libacl1-dev, smake (>> 1.2a41) -Standards-Version: 3.7.2 -XS-Vcs-Bzr: https://code.launchpad.net/~siretart/cdrtools/ubuntu +Build-Depends: debhelper (>= 9), libacl1-dev, smake (>> 1.2a41), libklibc-dev, + libcap-dev +Standards-Version: 3.9.6 +XS-Vcs-Bzr: https://code.launchpad.net/~ubuntu-burning/cdrtools/ubuntu Package: cdrecord Architecture: any -Depends: ${shlibs:Depends} +Depends: ${shlibs:Depends},${misc:Depends} Recommends: mkisofs, cdda2wav +Provides: wodim +Conflicts: wodim +Replaces: wodim Description: command line CD writing tool cdrecord allows you to create CDs on a CD recorder. It supports writing data, audio, mixed, multi-session, and CD+ @@ -19,8 +23,11 @@ Package: mkisofs Architecture: any -Depends: ${shlibs:Depends} +Depends: ${shlibs:Depends},${misc:Depends} Suggests: cdrecord +Provides: genisoimage +Conflicts: genisoimage +Replaces: genisoimage Description: Creates ISO-9660 CD-ROM filesystem images mkisofs is a pre-mastering program for creating ISO-9660 CD-ROM filesystem images, which can then be written to a CD-ROM (or DVD-ROM) using @@ -30,7 +37,8 @@ Package: cdda2wav Architecture: any -Depends: ${shlibs:Depends} +Depends: ${shlibs:Depends},${misc:Depends} +Conflicts: icedax Suggests: vorbis-tools, lame Description: Creates WAV files from audio CDs cdda2wav lets you digitally copy audio tracks from a CD-ROM, avoiding diff -Nru cdrtools-2.01.01a33/debian/copyright cdrtools-3.02a09/debian/copyright --- cdrtools-2.01.01a33/debian/copyright 2018-05-12 16:55:34.000000000 +0000 +++ cdrtools-3.02a09/debian/copyright 2018-05-12 16:39:28.000000000 +0000 @@ -37,7 +37,7 @@ configuration file /etc/default/cdrecord. See defaults.c for further information. -The file cdrecord/LIMITATIONS gives the Details of the further +The file cdrecord/LICENSE gives the Details of the further restrictions to the CDDL for the program cdrecord. The limitations have been negotiated with Debian in 2001. They are intended to grant users a uniform command line interface on all platforms when using a program @@ -45,7 +45,7 @@ you change the name of the program. This clause is similar to the TeX clause. -The contents of cdrecord/LIMITATIONS are: +The contents of cdrecord/LICENSE are: -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= This software is under CDDL but you should read the following clarifications: @@ -61,6 +61,11 @@ See defaults.c for further information. +The Author does encourage you to make changes in consent with him. +Since this if free software, you are of course free to make any +modifications you seem fit. However, if you choose to do this, +the restrictions (see below) apply. + Note that the fact that I am disallowing to change things that affect global compatibility and that I require you to warn people in case you did use an unaproved build system is not in violation with diff -Nru cdrtools-2.01.01a33/debian/genisoimage cdrtools-3.02a09/debian/genisoimage --- cdrtools-2.01.01a33/debian/genisoimage 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/debian/genisoimage 2018-05-12 16:39:28.000000000 +0000 @@ -0,0 +1,23 @@ +#!/bin/sh +# Authors: Brandon Snider. +# This script redirects genisoimage commands to mkisofs. In case of --version being passed, the script returns a specific string to +# satisfy Brasero. In case of the old options -L, -H, and -P, the script adds -legacy to the args to properly instruct mkisofs. + +legacy="no" # Create variable with default status of "no" + +for i in "$@" # Iterate over all of the command line options looking for the old ones. +do + if [ "$i" = "-L" -o "$i" = "-H" -o "$i" = "-P" ] ; then + legacy="yes" # Set the legacy variable to "yes" if one of the variables is found. + elif [ "$i" = "--version" ] ; then + legacy="version" # Set the variable to "legacy" to return the string expected by Brasero + fi +done + +if [ $legacy = "yes" ] ; then + /usr/bin/mkisofs -legacy "$@" # Pass -legacy option. +elif [ $legacy = "no" ] ; then + /usr/bin/mkisofs "$@" # In all other situations, pass all options to mkisofs. +elif [ $legacy = "version" ] ; then + echo "genisoimage 1.1.11" # Pass the version info expected by any app querying Genisoimage. +fi diff -Nru cdrtools-2.01.01a33/debian/mkisofs.install cdrtools-3.02a09/debian/mkisofs.install --- cdrtools-2.01.01a33/debian/mkisofs.install 2018-05-12 16:55:34.000000000 +0000 +++ cdrtools-3.02a09/debian/mkisofs.install 2018-05-12 16:39:28.000000000 +0000 @@ -5,7 +5,10 @@ # disabled for now, since it conflicts with # genisoimage -# debian/tmp/usr/bin/devdump -# debian/tmp/usr/bin/isodump -# debian/tmp/usr/bin/isoinfo -# debian/tmp/usr/bin/isovfy +debian/tmp/usr/bin/devdump +debian/tmp/usr/bin/isodump +debian/tmp/usr/bin/isoinfo +debian/tmp/usr/bin/isovfy + +# install the scripts that convince brasero that genisoimage is present +debian/genisoimage /usr/bin diff -Nru cdrtools-2.01.01a33/debian/mkisofs.manpages cdrtools-3.02a09/debian/mkisofs.manpages --- cdrtools-2.01.01a33/debian/mkisofs.manpages 2018-05-12 16:55:34.000000000 +0000 +++ cdrtools-3.02a09/debian/mkisofs.manpages 2018-05-12 16:39:28.000000000 +0000 @@ -1,9 +1,9 @@ -debian/tmp/usr/man/man8/mkisofs.8 -debian/tmp/usr/man/man8/isodebug.8 +debian/tmp/usr/share/man/man8/mkisofs.8 +debian/tmp/usr/share/man/man8/isodebug.8 # no real contents -# debian/tmp/usr/man/man8/isodump.8 -# debian/tmp/usr/man/man8/devdump.8 -# debian/tmp/usr/man/man8/isovfy.8 -# debian/tmp/usr/man/man8/isoinfo.8 -# debian/tmp/usr/man/man8/mkhybrid.8 +# debian/tmp/usr/share/man/man8/isodump.8 +# debian/tmp/usr/share/man/man8/devdump.8 +# debian/tmp/usr/share/man/man8/isovfy.8 +# debian/tmp/usr/share/man/man8/isoinfo.8 +# debian/tmp/usr/share/man/man8/mkhybrid.8 diff -Nru cdrtools-2.01.01a33/debian/readom cdrtools-3.02a09/debian/readom --- cdrtools-2.01.01a33/debian/readom 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/debian/readom 2018-05-12 16:39:28.000000000 +0000 @@ -0,0 +1,14 @@ +#!/bin/sh +# Authors: Brandon Snider. +# This script redirects readom commands to readcd. In case of --version being passed, the script returns a specific string to +# satisfy Brasero. +version="readcd 2.01.01a05 is not what you see here. This line is only a fake for too clever\nGUIs and other frontend applications. In fact, this program is:\nreadom 1.1.10 (Linux)" +case "--version" in + "$@") printf "%b\n" "$version" +#Copyright (C) 1987, 1995-2006 Joerg Schilling +#Copyright (C) 2006 Cdrkit maintainers +#(modified version of -- don't bother Joerg Schilling with problems)" # Pass the version info expected by any app querying Readom. + ;; + *) /usr/bin/readcd "$@" # In all other situations, pass all options to readcd. + ;; +esac diff -Nru cdrtools-2.01.01a33/debian/rules cdrtools-3.02a09/debian/rules --- cdrtools-2.01.01a33/debian/rules 2018-05-12 16:55:34.000000000 +0000 +++ cdrtools-3.02a09/debian/rules 2018-05-12 16:39:28.000000000 +0000 @@ -22,6 +22,7 @@ #Architecture +build-indep: build build: build-arch build-arch: build-arch-stamp @@ -32,20 +33,13 @@ install-arch: dh_testdir dh_testroot - dh_clean -k -s + dh_prep rm -rf debian/tmp/ dh_installdirs -s smake INS_BASE=/usr DESTDIR=$(CURDIR)/debian/tmp install # cleanup after smake - mkdir -p debian/tmp/etc/default - mv -v debian/tmp/usr/etc/default/* debian/tmp/etc/default install cdda2wav/cdda2ogg debian/tmp/usr/bin install cdda2wav/cdda2mp3 debian/tmp/usr/bin - # move for alternatives system - mv debian/tmp/usr/bin/cdda2ogg debian/tmp/usr/bin/cdrtools.cdda2ogg - mv debian/tmp/usr/bin/cdda2mp3 debian/tmp/usr/bin/cdrtools.cdda2mp3 - mv debian/tmp/usr/man/man1/cdda2ogg.1 \ - debian/tmp/usr/man/man1/cdrtools.cdda2ogg.1 dh_install -s binary-indep: @@ -64,11 +58,11 @@ binary-arch: build-arch install-arch dh_testdir dh_testroot - dh_installchangelogs AN-2.01.01a33 + dh_installchangelogs AN-3.00 dh_installdocs dh_installexamples - dh_link dh_installman + dh_link dh_strip dh_compress dh_fixperms diff -Nru cdrtools-2.01.01a33/debian/source/format cdrtools-3.02a09/debian/source/format --- cdrtools-2.01.01a33/debian/source/format 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/debian/source/format 2018-05-12 16:39:28.000000000 +0000 @@ -0,0 +1 @@ +3.0 (quilt) diff -Nru cdrtools-2.01.01a33/debian/watch cdrtools-3.02a09/debian/watch --- cdrtools-2.01.01a33/debian/watch 2018-05-12 16:55:34.000000000 +0000 +++ cdrtools-3.02a09/debian/watch 2018-05-12 16:39:28.000000000 +0000 @@ -1,4 +1,6 @@ # Compulsory line, this is a version 3 file version=3 -ftp://ftp.berlios.de/pub/cdrecord/alpha/cdrtools-(.*)\.tar\.gz debian - +# qa.debian.org runs a redirector which allows a simpler form of URL +# for SourceForge based projects. The format below will automatically +# be rewritten to use the redirector. +http://sf.net/cdrtools/cdrtools-(\d\S*)\.(?:zip|tgz|tbz|txz|(?:tar\.(?:gz|bz2|xz))) diff -Nru cdrtools-2.01.01a33/debian/wodim cdrtools-3.02a09/debian/wodim --- cdrtools-2.01.01a33/debian/wodim 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/debian/wodim 2018-05-12 16:39:28.000000000 +0000 @@ -0,0 +1,14 @@ +#!/bin/sh +# Authors: Brandon Snider. +# This script redirects wodim commands to cdrecord. In case of --version being passed, the script returns a specific string to +# satisfy Brasero. + +case "--version" in + "$@") echo "Cdrecord-yelling-line-to-tell-frontends-to-use-it-like-version 2.01.01a03-dvd +Wodim 1.1.10 +Copyright (C) 2006 Cdrkit suite contributors +Based on works from Joerg Schilling, Copyright (C) 1995-2006, J. Schilling" # Pass the version info expected by any app querying Wodim. + ;; + *) /usr/bin/cdrecord "$@" # In all other situations, pass all options to cdrecord. + ;; +esac diff -Nru cdrtools-2.01.01a33/DEFAULTS/Defaults.aix cdrtools-3.02a09/DEFAULTS/Defaults.aix --- cdrtools-2.01.01a33/DEFAULTS/Defaults.aix 2007-05-08 14:31:49.000000000 +0000 +++ cdrtools-3.02a09/DEFAULTS/Defaults.aix 2013-11-04 20:58:20.000000000 +0000 @@ -1,4 +1,4 @@ -#ident "@(#)Defaults.aix 1.2 07/05/08 " +#ident "@(#)Defaults.aix 1.6 13/11/04 " ########################################################################### # # global definitions for IBM AIX Systems @@ -29,8 +29,10 @@ CWARNOPTS= DEFINCDIRS= $(SRCROOT)/include +DEFOSINCDIRS= LDPATH= -L/opt/schily/lib -RUNPATH= -R$(INS_BASE)/lib -R/opt/schily/lib -R$(OLIBSDIR) +#RUNPATH= -R$(INS_BASE)/lib -R/opt/schily/lib -R$(OLIBSDIR) +RUNPATH= -R$(INS_BASE)/lib -R/opt/schily/lib ########################################################################### # @@ -39,10 +41,11 @@ ########################################################################### INS_BASE= /opt/schily INS_KBASE= / +INS_RBASE= / # DEFUMASK= 002 # DEFINSMODEF= 444 DEFINSMODEX= 755 -DEFINSUSR= bin +DEFINSUSR= root DEFINSGRP= bin diff -Nru cdrtools-2.01.01a33/DEFAULTS/Defaults.amigaos cdrtools-3.02a09/DEFAULTS/Defaults.amigaos --- cdrtools-2.01.01a33/DEFAULTS/Defaults.amigaos 2007-05-08 14:31:49.000000000 +0000 +++ cdrtools-3.02a09/DEFAULTS/Defaults.amigaos 2013-11-04 20:58:20.000000000 +0000 @@ -1,4 +1,4 @@ -#ident "@(#)Defaults.amigaos 1.2 07/05/08 " +#ident "@(#)Defaults.amigaos 1.6 13/11/04 " ########################################################################### # # global definitions for AmigaOS Systems using CC=gcc @@ -29,8 +29,10 @@ CWARNOPTS= DEFINCDIRS= $(SRCROOT)/include +DEFOSINCDIRS= LDPATH= -L/opt/schily/lib -RUNPATH= -R$(INS_BASE)/lib -R/opt/schily/lib -R$(OLIBSDIR) +#RUNPATH= -R$(INS_BASE)/lib -R/opt/schily/lib -R$(OLIBSDIR) +RUNPATH= -R$(INS_BASE)/lib -R/opt/schily/lib ########################################################################### # @@ -39,10 +41,11 @@ ########################################################################### INS_BASE= /opt/schily INS_KBASE= / +INS_RBASE= / # DEFUMASK= 002 # DEFINSMODEF= 444 DEFINSMODEX= 755 -DEFINSUSR= bin +DEFINSUSR= root DEFINSGRP= bin diff -Nru cdrtools-2.01.01a33/DEFAULTS/Defaults.beos cdrtools-3.02a09/DEFAULTS/Defaults.beos --- cdrtools-2.01.01a33/DEFAULTS/Defaults.beos 2007-05-08 14:31:49.000000000 +0000 +++ cdrtools-3.02a09/DEFAULTS/Defaults.beos 2013-11-04 20:58:20.000000000 +0000 @@ -1,4 +1,4 @@ -#ident "@(#)Defaults.beos 1.2 07/05/08 " +#ident "@(#)Defaults.beos 1.6 13/11/04 " ########################################################################### # # global definitions for BeOS Systems @@ -29,8 +29,10 @@ CWARNOPTS= DEFINCDIRS= $(SRCROOT)/include +DEFOSINCDIRS= LDPATH= -L/opt/schily/lib -RUNPATH= -R$(INS_BASE)/lib -R/opt/schily/lib -R$(OLIBSDIR) +#RUNPATH= -R$(INS_BASE)/lib -R/opt/schily/lib -R$(OLIBSDIR) +RUNPATH= -R$(INS_BASE)/lib -R/opt/schily/lib ########################################################################### # @@ -39,10 +41,11 @@ ########################################################################### INS_BASE= /opt/schily INS_KBASE= / +INS_RBASE= / # DEFUMASK= 002 # DEFINSMODEF= 444 DEFINSMODEX= 755 -DEFINSUSR= bin +DEFINSUSR= root DEFINSGRP= bin diff -Nru cdrtools-2.01.01a33/DEFAULTS/Defaults.bitrig cdrtools-3.02a09/DEFAULTS/Defaults.bitrig --- cdrtools-2.01.01a33/DEFAULTS/Defaults.bitrig 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/DEFAULTS/Defaults.bitrig 2015-10-08 18:26:00.000000000 +0000 @@ -0,0 +1,49 @@ +#ident "@(#)Defaults.bitrig 1.1 15/10/08 " +########################################################################### +# +# global definitions for Bitrig Systems +# +########################################################################### +# +# Compiler stuff +# +########################################################################### +DEFCCOM= clang + +########################################################################### +# +# Link mode for libraries that are part of the makefile system: +# If DEFLINKMODE is set to "static", no dynamic linking will be used +# If DEFLINKMODE is set to "dynamic", dynamic linking will be used +# +########################################################################### +DEFLINKMODE= static + +########################################################################### +# +# If the next line is commented out, compilation is done with max warn level +# If the next line is uncommented, compilation is done with minimal warnings +# +########################################################################### +CWARNOPTS= + +DEFINCDIRS= $(SRCROOT)/include +DEFOSINCDIRS= +LDPATH= -L/opt/schily/lib +#RUNPATH= -R$(INS_BASE)/lib -R/opt/schily/lib -R$(OLIBSDIR) Will probably not work + +########################################################################### +# +# Installation config stuff +# +########################################################################### +INS_BASE= /opt/schily +INS_KBASE= / +INS_RBASE= / +# +DEFUMASK= 002 +# +DEFINSMODEF= 444 +DEFINSMODEX= 755 +DEFINSUSR= root +DEFINSGRP= bin diff -Nru cdrtools-2.01.01a33/DEFAULTS/Defaults.bsd-os cdrtools-3.02a09/DEFAULTS/Defaults.bsd-os --- cdrtools-2.01.01a33/DEFAULTS/Defaults.bsd-os 2007-05-08 14:31:50.000000000 +0000 +++ cdrtools-3.02a09/DEFAULTS/Defaults.bsd-os 2013-11-04 20:58:20.000000000 +0000 @@ -1,4 +1,4 @@ -#ident "@(#)Defaults.bsd-os 1.2 07/05/08 " +#ident "@(#)Defaults.bsd-os 1.5 13/11/04 " ########################################################################### # # global definitions for BSD/OS Systems @@ -29,6 +29,7 @@ CWARNOPTS= DEFINCDIRS= $(SRCROOT)/include +DEFOSINCDIRS= #LDPATH= -L/opt/schily/lib #RUNPATH= -R$(INS_BASE)/lib -R/opt/schily/lib -R$(OLIBSDIR) Will probably not work @@ -39,10 +40,11 @@ ########################################################################### INS_BASE= /opt/schily INS_KBASE= / +INS_RBASE= / # DEFUMASK= 002 # DEFINSMODEF= 444 DEFINSMODEX= 755 -DEFINSUSR= bin +DEFINSUSR= root DEFINSGRP= bin diff -Nru cdrtools-2.01.01a33/DEFAULTS/Defaults.bsd-os3 cdrtools-3.02a09/DEFAULTS/Defaults.bsd-os3 --- cdrtools-2.01.01a33/DEFAULTS/Defaults.bsd-os3 2007-05-08 14:31:50.000000000 +0000 +++ cdrtools-3.02a09/DEFAULTS/Defaults.bsd-os3 2013-11-04 20:58:20.000000000 +0000 @@ -1,4 +1,4 @@ -#ident "@(#)Defaults.bsd-os3 1.2 07/05/08 " +#ident "@(#)Defaults.bsd-os3 1.5 13/11/04 " ########################################################################### # # global definitions for BSD/OS Systems @@ -29,6 +29,7 @@ CWARNOPTS= DEFINCDIRS= $(SRCROOT)/include +DEFOSINCDIRS= #LDPATH= -L/opt/schily/lib #RUNPATH= -R$(INS_BASE)/lib -R/opt/schily/lib -R$(OLIBSDIR) Will probably not work @@ -39,10 +40,11 @@ ########################################################################### INS_BASE= /opt/schily INS_KBASE= / +INS_RBASE= / # DEFUMASK= 002 # DEFINSMODEF= 444 DEFINSMODEX= 755 -DEFINSUSR= bin +DEFINSUSR= root DEFINSGRP= bin diff -Nru cdrtools-2.01.01a33/DEFAULTS/Defaults.cygwin32_nt cdrtools-3.02a09/DEFAULTS/Defaults.cygwin32_nt --- cdrtools-2.01.01a33/DEFAULTS/Defaults.cygwin32_nt 2007-05-08 14:31:50.000000000 +0000 +++ cdrtools-3.02a09/DEFAULTS/Defaults.cygwin32_nt 2017-07-09 08:16:53.000000000 +0000 @@ -1,4 +1,4 @@ -#ident "@(#)Defaults.cygwin32_nt 1.4 07/05/08 " +#ident "@(#)Defaults.cygwin32_nt 1.7 17/07/09 " ########################################################################### # # global definitions for Cygnus GCC for WINNT Systems @@ -29,6 +29,7 @@ CWARNOPTS= DEFINCDIRS= $(SRCROOT)/include +DEFOSINCDIRS= #LDPATH= -L/opt/schily/lib LDPATH= #RUNPATH= -R$(INS_BASE)/lib -R/opt/schily/lib -R$(OLIBSDIR) @@ -41,6 +42,7 @@ ########################################################################### INS_BASE= /opt/schily INS_KBASE= / +INS_RBASE= / # DEFUMASK= 002 # @@ -58,8 +60,13 @@ _PLATFORM= cygwin VC=7 +_VCNAME= $(_UNIQ)$(XMAKEPROG) +__VCNAME= $(_VCNAME:$(_UNIQ)=dummy) +___VCNAME= $(__VCNAME:$(_UNIQ)smake=vc$(VC)$(_PLATFORM:%=-%)) +VCNAME= $(___VCNAME:$(_UNIQ)%=dummy) + _VC_SETUP= $(_UNIQ)$(VC_SETUP) -__VC_SETUP= $(_VC_SETUP:$(_UNIQ)=vc$(VC)$(_PLATFORM:%=-%)-setup) +__VC_SETUP= $(_VC_SETUP:$(_UNIQ)=$(VCNAME)-setup) VCSETUP= $(__VC_SETUP:$(_UNIQ)%=%) ########################################################################### diff -Nru cdrtools-2.01.01a33/DEFAULTS/Defaults.cygwin32_wow cdrtools-3.02a09/DEFAULTS/Defaults.cygwin32_wow --- cdrtools-2.01.01a33/DEFAULTS/Defaults.cygwin32_wow 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/DEFAULTS/Defaults.cygwin32_wow 2017-07-09 08:16:53.000000000 +0000 @@ -0,0 +1,78 @@ +#ident "@(#)Defaults.cygwin32_wow 1.2 17/07/09 " +########################################################################### +# +# global definitions for Cygnus GCC for WINNT Systems +# +########################################################################### +# +# Compiler stuff +# +########################################################################### +#DEFCCOM= cc +DEFCCOM= gcc + +########################################################################### +# +# Link mode for libraries that are part of the makefile system: +# If DEFLINKMODE is set to "static", no dynamic linking will be used +# If DEFLINKMODE is set to "dynamic", dynamic linking will be used +# +########################################################################### +DEFLINKMODE= static + +########################################################################### +# +# If the next line is commented out, compilation is done with max warn level +# If the next line is uncommented, compilation is done with minimal warnings +# +########################################################################### +CWARNOPTS= + +DEFINCDIRS= $(SRCROOT)/include +DEFOSINCDIRS= +#LDPATH= -L/opt/schily/lib +LDPATH= +#RUNPATH= -R$(INS_BASE)/lib -R/opt/schily/lib -R$(OLIBSDIR) +RUNPATH= + +########################################################################### +# +# Installation config stuff +# +########################################################################### +INS_BASE= /opt/schily +INS_KBASE= / +INS_RBASE= / +# +DEFUMASK= 002 +# +DEFINSMODEF= 444 +DEFINSMODEX= 755 +DEFINSUSR= root +DEFINSGRP= root + +# +# This is not the correct place for doing this, +# the correct place is RULES/cc-msc.rul. +# We do it here because otherwise cc-config would not work. +# This kind of hack may not work for other platforms. +# +_PLATFORM= cygwin +VC=7 +VC=9 + +_VCNAME= $(_UNIQ)$(XMAKEPROG) +__VCNAME= $(_VCNAME:$(_UNIQ)=dummy) +___VCNAME= $(__VCNAME:$(_UNIQ)smake=vc$(VC)$(_PLATFORM:%=-%)) +VCNAME= $(___VCNAME:$(_UNIQ)%=dummy) + +_VC_SETUP= $(_UNIQ)$(VC_SETUP) +__VC_SETUP= $(_VC_SETUP:$(_UNIQ)=$(VCNAME)-setup) +VCSETUP= $(__VC_SETUP:$(_UNIQ)%=%) + +########################################################################### +# IMPORTANT Note: +# We also include $(DEFLTSROOT)/$(DEFLTSDIR)/$(VCSETUP) from RULES/cc-msc.rul +# in order to be able to test for the existence of "cl.exe" early. +########################################################################### +include $(DEFLTSROOT)/$(DEFLTSDIR)/$(VCSETUP) diff -Nru cdrtools-2.01.01a33/DEFAULTS/Defaults.cygwin32_wow64 cdrtools-3.02a09/DEFAULTS/Defaults.cygwin32_wow64 --- cdrtools-2.01.01a33/DEFAULTS/Defaults.cygwin32_wow64 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/DEFAULTS/Defaults.cygwin32_wow64 2017-07-09 08:16:53.000000000 +0000 @@ -0,0 +1,78 @@ +#ident "@(#)Defaults.cygwin32_wow64 1.8 17/07/09 " +########################################################################### +# +# global definitions for Cygnus GCC for WINNT Systems +# +########################################################################### +# +# Compiler stuff +# +########################################################################### +#DEFCCOM= cc +DEFCCOM= gcc + +########################################################################### +# +# Link mode for libraries that are part of the makefile system: +# If DEFLINKMODE is set to "static", no dynamic linking will be used +# If DEFLINKMODE is set to "dynamic", dynamic linking will be used +# +########################################################################### +DEFLINKMODE= static + +########################################################################### +# +# If the next line is commented out, compilation is done with max warn level +# If the next line is uncommented, compilation is done with minimal warnings +# +########################################################################### +CWARNOPTS= + +DEFINCDIRS= $(SRCROOT)/include +DEFOSINCDIRS= +#LDPATH= -L/opt/schily/lib +LDPATH= +#RUNPATH= -R$(INS_BASE)/lib -R/opt/schily/lib -R$(OLIBSDIR) +RUNPATH= + +########################################################################### +# +# Installation config stuff +# +########################################################################### +INS_BASE= /opt/schily +INS_KBASE= / +INS_RBASE= / +# +DEFUMASK= 002 +# +DEFINSMODEF= 444 +DEFINSMODEX= 755 +DEFINSUSR= root +DEFINSGRP= root + +# +# This is not the correct place for doing this, +# the correct place is RULES/cc-msc.rul. +# We do it here because otherwise cc-config would not work. +# This kind of hack may not work for other platforms. +# +_PLATFORM= cygwin +VC=7 +VC=9 + +_VCNAME= $(_UNIQ)$(XMAKEPROG) +__VCNAME= $(_VCNAME:$(_UNIQ)=dummy) +___VCNAME= $(__VCNAME:$(_UNIQ)smake=vc$(VC)$(_PLATFORM:%=-%)) +VCNAME= $(___VCNAME:$(_UNIQ)%=dummy) + +_VC_SETUP= $(_UNIQ)$(VC_SETUP) +__VC_SETUP= $(_VC_SETUP:$(_UNIQ)=$(VCNAME)-setup) +VCSETUP= $(__VC_SETUP:$(_UNIQ)%=%) + +########################################################################### +# IMPORTANT Note: +# We also include $(DEFLTSROOT)/$(DEFLTSDIR)/$(VCSETUP) from RULES/cc-msc.rul +# in order to be able to test for the existence of "cl.exe" early. +########################################################################### +include $(DEFLTSROOT)/$(DEFLTSDIR)/$(VCSETUP) diff -Nru cdrtools-2.01.01a33/DEFAULTS/Defaults.darwin cdrtools-3.02a09/DEFAULTS/Defaults.darwin --- cdrtools-2.01.01a33/DEFAULTS/Defaults.darwin 2007-05-08 14:31:50.000000000 +0000 +++ cdrtools-3.02a09/DEFAULTS/Defaults.darwin 2013-11-04 20:58:20.000000000 +0000 @@ -1,4 +1,4 @@ -#ident "@(#)Defaults.darwin 1.2 07/05/08 " +#ident "@(#)Defaults.darwin 1.4 13/11/04 " ########################################################################### # # global definitions for Mac OS X Darwin Systems @@ -29,7 +29,9 @@ CWARNOPTS= DEFINCDIRS= $(SRCROOT)/include +DEFOSINCDIRS= /usr/local/include LDPATH= #-L/opt/schily/lib +LDPATH= -L/usr/local/lib #RUNPATH= -R$(INS_BASE)/lib -R/opt/schily/lib -R$(OLIBSDIR) Will probably not work ########################################################################### @@ -39,6 +41,7 @@ ########################################################################### INS_BASE= /opt/schily INS_KBASE= / +INS_RBASE= / # DEFUMASK= 002 # diff -Nru cdrtools-2.01.01a33/DEFAULTS/Defaults.dgux cdrtools-3.02a09/DEFAULTS/Defaults.dgux --- cdrtools-2.01.01a33/DEFAULTS/Defaults.dgux 2007-05-08 14:31:50.000000000 +0000 +++ cdrtools-3.02a09/DEFAULTS/Defaults.dgux 2013-11-04 20:58:20.000000000 +0000 @@ -1,4 +1,4 @@ -#ident "@(#)Defaults.dgux 1.2 07/05/08 " +#ident "@(#)Defaults.dgux 1.6 13/11/04 " ########################################################################### # # global definitions for Data General DGUX Systems @@ -29,8 +29,10 @@ CWARNOPTS= DEFINCDIRS= $(SRCROOT)/include +DEFOSINCDIRS= LDPATH= -L/opt/schily/lib -RUNPATH= -R$(INS_BASE)/lib -R/opt/schily/lib -R$(OLIBSDIR) +#RUNPATH= -R$(INS_BASE)/lib -R/opt/schily/lib -R$(OLIBSDIR) +RUNPATH= -R$(INS_BASE)/lib -R/opt/schily/lib ########################################################################### # @@ -39,10 +41,11 @@ ########################################################################### INS_BASE= /opt/schily INS_KBASE= / +INS_RBASE= / # DEFUMASK= 002 # DEFINSMODEF= 444 DEFINSMODEX= 755 -DEFINSUSR= bin +DEFINSUSR= root DEFINSGRP= bin diff -Nru cdrtools-2.01.01a33/DEFAULTS/Defaults.dgux3 cdrtools-3.02a09/DEFAULTS/Defaults.dgux3 --- cdrtools-2.01.01a33/DEFAULTS/Defaults.dgux3 2007-05-08 14:31:50.000000000 +0000 +++ cdrtools-3.02a09/DEFAULTS/Defaults.dgux3 2013-11-04 20:58:20.000000000 +0000 @@ -1,4 +1,4 @@ -#ident "@(#)Defaults.dgux 1.2 07/05/08 " +#ident "@(#)Defaults.dgux3 1.6 13/11/04 " ########################################################################### # # global definitions for Data General DGUX Systems @@ -29,8 +29,10 @@ CWARNOPTS= DEFINCDIRS= $(SRCROOT)/include +DEFOSINCDIRS= LDPATH= -L/opt/schily/lib -RUNPATH= -R$(INS_BASE)/lib -R/opt/schily/lib -R$(OLIBSDIR) +#RUNPATH= -R$(INS_BASE)/lib -R/opt/schily/lib -R$(OLIBSDIR) +RUNPATH= -R$(INS_BASE)/lib -R/opt/schily/lib ########################################################################### # @@ -39,10 +41,11 @@ ########################################################################### INS_BASE= /opt/schily INS_KBASE= / +INS_RBASE= / # DEFUMASK= 002 # DEFINSMODEF= 444 DEFINSMODEX= 755 -DEFINSUSR= bin +DEFINSUSR= root DEFINSGRP= bin diff -Nru cdrtools-2.01.01a33/DEFAULTS/Defaults.dgux4 cdrtools-3.02a09/DEFAULTS/Defaults.dgux4 --- cdrtools-2.01.01a33/DEFAULTS/Defaults.dgux4 2007-05-08 14:31:50.000000000 +0000 +++ cdrtools-3.02a09/DEFAULTS/Defaults.dgux4 2013-11-04 20:58:20.000000000 +0000 @@ -1,4 +1,4 @@ -#ident "@(#)Defaults.dgux 1.2 07/05/08 " +#ident "@(#)Defaults.dgux4 1.6 13/11/04 " ########################################################################### # # global definitions for Data General DGUX Systems @@ -29,8 +29,10 @@ CWARNOPTS= DEFINCDIRS= $(SRCROOT)/include +DEFOSINCDIRS= LDPATH= -L/opt/schily/lib -RUNPATH= -R$(INS_BASE)/lib -R/opt/schily/lib -R$(OLIBSDIR) +#RUNPATH= -R$(INS_BASE)/lib -R/opt/schily/lib -R$(OLIBSDIR) +RUNPATH= -R$(INS_BASE)/lib -R/opt/schily/lib ########################################################################### # @@ -39,10 +41,11 @@ ########################################################################### INS_BASE= /opt/schily INS_KBASE= / +INS_RBASE= / # DEFUMASK= 002 # DEFINSMODEF= 444 DEFINSMODEX= 755 -DEFINSUSR= bin +DEFINSUSR= root DEFINSGRP= bin diff -Nru cdrtools-2.01.01a33/DEFAULTS/Defaults.domainos cdrtools-3.02a09/DEFAULTS/Defaults.domainos --- cdrtools-2.01.01a33/DEFAULTS/Defaults.domainos 2007-05-08 14:31:50.000000000 +0000 +++ cdrtools-3.02a09/DEFAULTS/Defaults.domainos 2013-11-04 20:58:20.000000000 +0000 @@ -1,4 +1,4 @@ -#ident "@(#)Defaults.domainos 1.2 07/05/08 " +#ident "@(#)Defaults.domainos 1.6 13/11/04 " ########################################################################### # # global definitions for Apollo Domain/OS Systems @@ -29,8 +29,10 @@ CWARNOPTS= -W0,-info,0 DEFINCDIRS= $(SRCROOT)/include +DEFOSINCDIRS= LDPATH= -L/opt/schily/lib -RUNPATH= -R$(INS_BASE)/lib -R/opt/schily/lib -R$(OLIBSDIR) +#RUNPATH= -R$(INS_BASE)/lib -R/opt/schily/lib -R$(OLIBSDIR) +RUNPATH= -R$(INS_BASE)/lib -R/opt/schily/lib ########################################################################### # @@ -39,10 +41,11 @@ ########################################################################### INS_BASE= /opt/schily INS_KBASE= / +INS_RBASE= / # DEFUMASK= 002 # DEFINSMODEF= 444 DEFINSMODEX= 755 -DEFINSUSR= bin +DEFINSUSR= root DEFINSGRP= bin diff -Nru cdrtools-2.01.01a33/DEFAULTS/Defaults.dragonfly cdrtools-3.02a09/DEFAULTS/Defaults.dragonfly --- cdrtools-2.01.01a33/DEFAULTS/Defaults.dragonfly 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/DEFAULTS/Defaults.dragonfly 2013-11-04 20:58:20.000000000 +0000 @@ -0,0 +1,50 @@ +#ident "@(#)Defaults.dragonfly 1.6 13/11/04 " +########################################################################### +# +# global definitions for FreeBSD Systems +# +########################################################################### +# +# Compiler stuff +# +########################################################################### +DEFCCOM= cc +#DEFCCOM= gcc + +########################################################################### +# +# Link mode for libraries that are part of the makefile system: +# If DEFLINKMODE is set to "static", no dynamic linking will be used +# If DEFLINKMODE is set to "dynamic", dynamic linking will be used +# +########################################################################### +DEFLINKMODE= static + +########################################################################### +# +# If the next line is commented out, compilation is done with max warn level +# If the next line is uncommented, compilation is done with minimal warnings +# +########################################################################### +CWARNOPTS= + +DEFINCDIRS= $(SRCROOT)/include +DEFOSINCDIRS= /usr/local/include +LDPATH= -L/opt/schily/lib -L/usr/local/lib +#RUNPATH= -R$(INS_BASE)/lib -R/opt/schily/lib -R$(OLIBSDIR) Will probably not work + +########################################################################### +# +# Installation config stuff +# +########################################################################### +INS_BASE= /opt/schily +INS_KBASE= / +INS_RBASE= / +# +DEFUMASK= 002 +# +DEFINSMODEF= 444 +DEFINSMODEX= 755 +DEFINSUSR= root +DEFINSGRP= bin diff -Nru cdrtools-2.01.01a33/DEFAULTS/Defaults.freebsd cdrtools-3.02a09/DEFAULTS/Defaults.freebsd --- cdrtools-2.01.01a33/DEFAULTS/Defaults.freebsd 2007-05-13 19:04:07.000000000 +0000 +++ cdrtools-3.02a09/DEFAULTS/Defaults.freebsd 2013-11-04 20:58:20.000000000 +0000 @@ -1,4 +1,4 @@ -#ident "@(#)Defaults.freebsd 1.3 07/05/13 " +#ident "@(#)Defaults.freebsd 1.6 13/11/04 " ########################################################################### # # global definitions for FreeBSD Systems @@ -28,7 +28,8 @@ ########################################################################### CWARNOPTS= -DEFINCDIRS= $(SRCROOT)/include /usr/local/include +DEFINCDIRS= $(SRCROOT)/include +DEFOSINCDIRS= /usr/local/include LDPATH= -L/opt/schily/lib -L/usr/local/lib #RUNPATH= -R$(INS_BASE)/lib -R/opt/schily/lib -R$(OLIBSDIR) Will probably not work @@ -39,10 +40,11 @@ ########################################################################### INS_BASE= /opt/schily INS_KBASE= / +INS_RBASE= / # DEFUMASK= 002 # DEFINSMODEF= 444 DEFINSMODEX= 755 -DEFINSUSR= bin +DEFINSUSR= root DEFINSGRP= bin diff -Nru cdrtools-2.01.01a33/DEFAULTS/Defaults.freemint cdrtools-3.02a09/DEFAULTS/Defaults.freemint --- cdrtools-2.01.01a33/DEFAULTS/Defaults.freemint 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/DEFAULTS/Defaults.freemint 2013-11-04 20:58:20.000000000 +0000 @@ -0,0 +1,50 @@ +#ident @(#)Defaults.freemint 1.4 13/11/04 +########################################################################### +# +# global definitions for FreeMiNT on ATARI computers +# +########################################################################### +# +# Compiler stuff +# +########################################################################### +#DEFCCOM= cc +DEFCCOM= gcc + +########################################################################### +# +# Link mode for libraries that are part of the makefile system: +# If DEFLINKMODE is set to "static", no dynamic linking will be used +# If DEFLINKMODE is set to "dynamic", dynamic linking will be used +# +########################################################################### +DEFLINKMODE= static + +########################################################################### +# +# If the next line is commented out, compilation is done with max warn level +# If the next line is uncommented, compilation is done with minimal warnings +# +########################################################################### +CWARNOPTS= + +DEFINCDIRS= $(SRCROOT)/include +DEFOSINCDIRS= +#LDPATH= -L/opt/schily/lib +#RUNPATH= -R$(INS_BASE)/lib -R/opt/schily/lib -R$(OLIBSDIR) Will probably not work + +########################################################################### +# +# Installation config stuff +# +########################################################################### +INS_BASE= /opt/schily +INS_KBASE= / +INS_RBASE= / +# +DEFUMASK= 002 +# +DEFINSMODEF= 444 +DEFINSMODEX= 755 +DEFINSUSR= root +DEFINSGRP= bin diff -Nru cdrtools-2.01.01a33/DEFAULTS/Defaults.gnu cdrtools-3.02a09/DEFAULTS/Defaults.gnu --- cdrtools-2.01.01a33/DEFAULTS/Defaults.gnu 2007-05-08 14:31:50.000000000 +0000 +++ cdrtools-3.02a09/DEFAULTS/Defaults.gnu 2013-11-04 20:58:20.000000000 +0000 @@ -1,4 +1,4 @@ -#ident "@(#)Defaults.gnu 1.2 07/05/08 " +#ident "@(#)Defaults.gnu 1.6 13/11/04 " ########################################################################### # # global definitions for GNU (hurd) Systems @@ -28,9 +28,11 @@ ########################################################################### CWARNOPTS= -DEFINCDIRS= $(SRCROOT)/include /usr/src/linux/include +DEFINCDIRS= $(SRCROOT)/include +DEFOSINCDIRS= /usr/src/linux/include LDPATH= -L/opt/schily/lib -RUNPATH= -R$(INS_BASE)/lib -R/opt/schily/lib -R$(OLIBSDIR) +#RUNPATH= -R$(INS_BASE)/lib -R/opt/schily/lib -R$(OLIBSDIR) +RUNPATH= -R$(INS_BASE)/lib -R/opt/schily/lib ########################################################################### # @@ -39,10 +41,11 @@ ########################################################################### INS_BASE= /opt/schily INS_KBASE= / +INS_RBASE= / # DEFUMASK= 002 # DEFINSMODEF= 444 DEFINSMODEX= 755 -DEFINSUSR= bin +DEFINSUSR= root DEFINSGRP= bin diff -Nru cdrtools-2.01.01a33/DEFAULTS/Defaults.gnu-kfreebsd cdrtools-3.02a09/DEFAULTS/Defaults.gnu-kfreebsd --- cdrtools-2.01.01a33/DEFAULTS/Defaults.gnu-kfreebsd 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/DEFAULTS/Defaults.gnu-kfreebsd 2013-11-04 20:58:20.000000000 +0000 @@ -0,0 +1,69 @@ +#ident "@(#)Defaults.gnu-kfreebsd 1.2 13/11/04 " +########################################################################### +# +# global definitions for Linux kfreebsd Systems +# +########################################################################### +# +# Compiler stuff +# +########################################################################### +DEFCCOM= cc +#DEFCCOM= gcc + +########################################################################### +# +# Link mode for libraries that are part of the makefile system: +# If DEFLINKMODE is set to "static", no dynamic linking will be used +# If DEFLINKMODE is set to "dynamic", dynamic linking will be used +# +########################################################################### +DEFLINKMODE= static + +########################################################################### +# +# If the next line is commented out, compilation is done with max warn level +# If the next line is uncommented, compilation is done with minimal warnings +# +########################################################################### +CWARNOPTS= + +########################################################################### +# +# LINUX_SRC_INCLUDE is used in RULES/*-linux-*cc*.rul +# +########################################################################### +LINUX_INCL_PATH= /usr/src/linux/include + +_LINUX_SRC_INCLUDE= $(_UNIQ)$(MAY_LINUX_SRC_INCLUDE) +__LINUX_SRC_INCLUDE= $(_LINUX_SRC_INCLUDE:$(_UNIQ)=$(LINUX_INCL_PATH)) +LINUX_SRC_INCLUDE= $(__LINUX_SRC_INCLUDE:$(_UNIQ)no%=%) + +DEFINCDIRS= $(SRCROOT)/include +DEFOSINCDIRS= +LDPATH= -L/opt/schily/lib +#RUNPATH= -R$(INS_BASE)/lib -R/opt/schily/lib -R$(OLIBSDIR) +RUNPATH= -R$(INS_BASE)/lib -R/opt/schily/lib + +########################################################################### +# +# Unhide POSIX extensions from /usr/include/ +# +########################################################################### +OSDEFS += -D_GNU_SOURCE + +########################################################################### +# +# Installation config stuff +# +########################################################################### +INS_BASE= /opt/schily +INS_KBASE= / +INS_RBASE= / +# +DEFUMASK= 002 +# +DEFINSMODEF= 444 +DEFINSMODEX= 755 +DEFINSUSR= root +DEFINSGRP= bin diff -Nru cdrtools-2.01.01a33/DEFAULTS/Defaults.haiku cdrtools-3.02a09/DEFAULTS/Defaults.haiku --- cdrtools-2.01.01a33/DEFAULTS/Defaults.haiku 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/DEFAULTS/Defaults.haiku 2013-11-04 20:58:20.000000000 +0000 @@ -0,0 +1,51 @@ +#ident "@(#)Defaults.haiku 1.4 13/11/04 " +########################################################################### +# +# global definitions for Haiku Systems +# +########################################################################### +# +# Compiler stuff +# +########################################################################### +#DEFCCOM= cc +DEFCCOM= gcc + +########################################################################### +# +# Link mode for libraries that are part of the makefile system: +# If DEFLINKMODE is set to "static", no dynamic linking will be used +# If DEFLINKMODE is set to "dynamic", dynamic linking will be used +# +########################################################################### +DEFLINKMODE= static + +########################################################################### +# +# If the next line is commented out, compilation is done with max warn level +# If the next line is uncommented, compilation is done with minimal warnings +# +########################################################################### +CWARNOPTS= + +DEFINCDIRS= $(SRCROOT)/include +DEFOSINCDIRS= +LDPATH= -L/opt/schily/lib +#RUNPATH= -R$(INS_BASE)/lib -R/opt/schily/lib -R$(OLIBSDIR) +RUNPATH= -R$(INS_BASE)/lib -R/opt/schily/lib + +########################################################################### +# +# Installation config stuff +# +########################################################################### +INS_BASE= /boot/opt/schily +INS_KBASE= / +INS_RBASE= / +# +DEFUMASK= 002 +# +DEFINSMODEF= 444 +DEFINSMODEX= 755 +DEFINSUSR= root +DEFINSGRP= bin diff -Nru cdrtools-2.01.01a33/DEFAULTS/Defaults.hp-ux cdrtools-3.02a09/DEFAULTS/Defaults.hp-ux --- cdrtools-2.01.01a33/DEFAULTS/Defaults.hp-ux 2007-05-08 14:31:50.000000000 +0000 +++ cdrtools-3.02a09/DEFAULTS/Defaults.hp-ux 2013-11-04 20:58:20.000000000 +0000 @@ -1,4 +1,4 @@ -#ident "@(#)Defaults.hp-ux 1.2 07/05/08 " +#ident "@(#)Defaults.hp-ux 1.6 13/11/04 " ########################################################################### # # global definitions for HP/UX Systems @@ -29,8 +29,10 @@ CWARNOPTS= DEFINCDIRS= $(SRCROOT)/include +DEFOSINCDIRS= LDPATH= -L/opt/schily/lib -RUNPATH= -R$(INS_BASE)/lib -R/opt/schily/lib -R$(OLIBSDIR) +#RUNPATH= -R$(INS_BASE)/lib -R/opt/schily/lib -R$(OLIBSDIR) +RUNPATH= -R$(INS_BASE)/lib -R/opt/schily/lib ########################################################################### # @@ -39,10 +41,11 @@ ########################################################################### INS_BASE= /opt/schily INS_KBASE= / +INS_RBASE= / # DEFUMASK= 002 # DEFINSMODEF= 444 DEFINSMODEX= 755 -DEFINSUSR= bin +DEFINSUSR= root DEFINSGRP= bin diff -Nru cdrtools-2.01.01a33/DEFAULTS/Defaults.interix cdrtools-3.02a09/DEFAULTS/Defaults.interix --- cdrtools-2.01.01a33/DEFAULTS/Defaults.interix 2007-05-03 12:57:18.000000000 +0000 +++ cdrtools-3.02a09/DEFAULTS/Defaults.interix 2013-11-04 20:58:20.000000000 +0000 @@ -1,4 +1,4 @@ -#ident "@(#)Defaults.interix 1.3 07/05/03 " +#ident "@(#)Defaults.interix 1.7 13/11/04 " ########################################################################### # # global definitions for Interix Systems (WIN-NT with SFU) using CC=gcc @@ -39,8 +39,10 @@ CWARNOPTS= DEFINCDIRS= $(SRCROOT)/include +DEFOSINCDIRS= LDPATH= -L/opt/schily/lib -RUNPATH= --rpath $(INS_BASE)/lib --rpath /opt/schily/lib --rpath $(OLIBSDIR) +#RUNPATH= --rpath $(INS_BASE)/lib --rpath /opt/schily/lib --rpath $(OLIBSDIR) +RUNPATH= --rpath $(INS_BASE)/lib --rpath /opt/schily/lib ########################################################################### # @@ -49,12 +51,13 @@ ########################################################################### INS_BASE= /opt/schily INS_KBASE= / +INS_RBASE= / # DEFUMASK= 002 # DEFINSMODEF= 444 DEFINSMODEX= 755 -DEFINSUSR= bin +DEFINSUSR= root DEFINSGRP= bin # diff -Nru cdrtools-2.01.01a33/DEFAULTS/Defaults.irix cdrtools-3.02a09/DEFAULTS/Defaults.irix --- cdrtools-2.01.01a33/DEFAULTS/Defaults.irix 2007-05-08 14:31:50.000000000 +0000 +++ cdrtools-3.02a09/DEFAULTS/Defaults.irix 2013-11-04 20:58:20.000000000 +0000 @@ -1,4 +1,4 @@ -#ident "@(#)Defaults.irix 1.2 07/05/08 " +#ident "@(#)Defaults.irix 1.6 13/11/04 " ########################################################################### # # global definitions for Silicon Graphics Systems @@ -29,8 +29,10 @@ CWARNOPTS= DEFINCDIRS= $(SRCROOT)/include +DEFOSINCDIRS= LDPATH= -L/opt/schily/lib -RUNPATH= -R$(INS_BASE)/lib -R/opt/schily/lib -R$(OLIBSDIR) +#RUNPATH= -R$(INS_BASE)/lib -R/opt/schily/lib -R$(OLIBSDIR) +RUNPATH= -R$(INS_BASE)/lib -R/opt/schily/lib ########################################################################### # @@ -39,10 +41,11 @@ ########################################################################### INS_BASE= /opt/schily INS_KBASE= / +INS_RBASE= / # DEFUMASK= 002 # DEFINSMODEF= 444 DEFINSMODEX= 755 -DEFINSUSR= bin +DEFINSUSR= root DEFINSGRP= bin diff -Nru cdrtools-2.01.01a33/DEFAULTS/Defaults.linux cdrtools-3.02a09/DEFAULTS/Defaults.linux --- cdrtools-2.01.01a33/DEFAULTS/Defaults.linux 2007-05-08 14:56:55.000000000 +0000 +++ cdrtools-3.02a09/DEFAULTS/Defaults.linux 2013-11-04 20:58:20.000000000 +0000 @@ -1,4 +1,4 @@ -#ident "@(#)Defaults.linux 1.3 07/05/08 " +#ident "@(#)Defaults.linux 1.8 13/11/04 " ########################################################################### # # global definitions for Linux Systems @@ -30,6 +30,13 @@ ########################################################################### # +# Unhide POSIX extensions from /usr/include/ +# +########################################################################### +OSDEFS += -D_GNU_SOURCE + +########################################################################### +# # LINUX_SRC_INCLUDE is used in RULES/*-linux-*cc*.rul # ########################################################################### @@ -40,8 +47,10 @@ LINUX_SRC_INCLUDE= $(__LINUX_SRC_INCLUDE:$(_UNIQ)no%=%) DEFINCDIRS= $(SRCROOT)/include +DEFOSINCDIRS= LDPATH= -L/opt/schily/lib -RUNPATH= -R$(INS_BASE)/lib -R/opt/schily/lib -R$(OLIBSDIR) +#RUNPATH= -R$(INS_BASE)/lib -R/opt/schily/lib -R$(OLIBSDIR) +RUNPATH= -R$(INS_BASE)/lib -R/opt/schily/lib ########################################################################### # @@ -50,10 +59,11 @@ ########################################################################### INS_BASE= /opt/schily INS_KBASE= / +INS_RBASE= / # DEFUMASK= 002 # DEFINSMODEF= 444 DEFINSMODEX= 755 -DEFINSUSR= bin +DEFINSUSR= root DEFINSGRP= bin diff -Nru cdrtools-2.01.01a33/DEFAULTS/Defaults.mac-os10 cdrtools-3.02a09/DEFAULTS/Defaults.mac-os10 --- cdrtools-2.01.01a33/DEFAULTS/Defaults.mac-os10 2007-05-08 14:31:50.000000000 +0000 +++ cdrtools-3.02a09/DEFAULTS/Defaults.mac-os10 2013-11-04 20:58:20.000000000 +0000 @@ -1,4 +1,4 @@ -#ident "@(#)Defaults.mac-os10 1.2 07/05/08 " +#ident "@(#)Defaults.mac-os10 1.4 13/11/04 " ########################################################################### # # global definitions for Mac OS X Systems @@ -29,7 +29,9 @@ CWARNOPTS= DEFINCDIRS= $(SRCROOT)/include +DEFOSINCDIRS= /usr/local/include LDPATH= #-L/opt/schily/lib +LDPATH= -L/usr/local/lib #RUNPATH= -R$(INS_BASE)/lib -R/opt/schily/lib -R$(OLIBSDIR) Will probably not work ########################################################################### @@ -39,6 +41,7 @@ ########################################################################### INS_BASE= /opt/schily INS_KBASE= / +INS_RBASE= / # DEFUMASK= 002 # diff -Nru cdrtools-2.01.01a33/DEFAULTS/Defaults.mingw32_nt cdrtools-3.02a09/DEFAULTS/Defaults.mingw32_nt --- cdrtools-2.01.01a33/DEFAULTS/Defaults.mingw32_nt 2007-05-08 14:31:50.000000000 +0000 +++ cdrtools-3.02a09/DEFAULTS/Defaults.mingw32_nt 2013-11-04 20:58:20.000000000 +0000 @@ -1,4 +1,4 @@ -#ident "@(#)Defaults.mingw32_nt 1.2 07/05/08 " +#ident "@(#)Defaults.mingw32_nt 1.5 13/11/04 " ########################################################################### # # global definitions for Win32/Mingw32 systems @@ -29,6 +29,7 @@ CWARNOPTS= DEFINCDIRS= $(SRCROOT)/include +DEFOSINCDIRS= #LDPATH= -L/opt/schily/lib LDPATH= #RUNPATH= -R$(INS_BASE)/lib -R/opt/schily/lib -R$(OLIBSDIR) @@ -41,10 +42,11 @@ ########################################################################### INS_BASE= /opt/schily INS_KBASE= / +INS_RBASE= / # DEFUMASK= 002 # DEFINSMODEF= 444 DEFINSMODEX= 755 -DEFINSUSR= bin +DEFINSUSR= root DEFINSGRP= bin diff -Nru cdrtools-2.01.01a33/DEFAULTS/Defaults.minix cdrtools-3.02a09/DEFAULTS/Defaults.minix --- cdrtools-2.01.01a33/DEFAULTS/Defaults.minix 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/DEFAULTS/Defaults.minix 2015-11-08 15:21:50.000000000 +0000 @@ -0,0 +1,49 @@ +#ident "@(#)Defaults.minix 1.1 15/11/08 " +########################################################################### +# +# global definitions for Minix Systems +# +########################################################################### +# +# Compiler stuff +# +########################################################################### +DEFCCOM= clang + +########################################################################### +# +# Link mode for libraries that are part of the makefile system: +# If DEFLINKMODE is set to "static", no dynamic linking will be used +# If DEFLINKMODE is set to "dynamic", dynamic linking will be used +# +########################################################################### +DEFLINKMODE= static + +########################################################################### +# +# If the next line is commented out, compilation is done with max warn level +# If the next line is uncommented, compilation is done with minimal warnings +# +########################################################################### +CWARNOPTS= + +DEFINCDIRS= $(SRCROOT)/include +DEFOSINCDIRS= +LDPATH= -L/opt/schily/lib +#RUNPATH= -R$(INS_BASE)/lib -R/opt/schily/lib -R$(OLIBSDIR) Will probably not work + +########################################################################### +# +# Installation config stuff +# +########################################################################### +INS_BASE= /opt/schily +INS_KBASE= / +INS_RBASE= / +# +DEFUMASK= 002 +# +DEFINSMODEF= 444 +DEFINSMODEX= 755 +DEFINSUSR= root +DEFINSGRP= bin diff -Nru cdrtools-2.01.01a33/DEFAULTS/Defaults.ms-dos cdrtools-3.02a09/DEFAULTS/Defaults.ms-dos --- cdrtools-2.01.01a33/DEFAULTS/Defaults.ms-dos 2007-05-08 14:31:50.000000000 +0000 +++ cdrtools-3.02a09/DEFAULTS/Defaults.ms-dos 2013-11-04 20:58:20.000000000 +0000 @@ -1,4 +1,4 @@ -#ident "@(#)Defaults.ms-dos 1.2 07/05/08 " +#ident "@(#)Defaults.ms-dos 1.6 13/11/04 " ########################################################################### # # global definitions for MSDOS/DJGPP v2 Systems using CC=gcc @@ -29,8 +29,10 @@ CWARNOPTS= DEFINCDIRS= $(SRCROOT)/include +DEFOSINCDIRS= LDPATH= -L/opt/schily/lib -RUNPATH= -R$(INS_BASE)/lib -R/opt/schily/lib -R$(OLIBSDIR) +#RUNPATH= -R$(INS_BASE)/lib -R/opt/schily/lib -R$(OLIBSDIR) +RUNPATH= -R$(INS_BASE)/lib -R/opt/schily/lib ########################################################################### # @@ -39,10 +41,11 @@ ########################################################################### INS_BASE= /opt/schily INS_KBASE= / +INS_RBASE= / # DEFUMASK= 002 # DEFINSMODEF= 444 DEFINSMODEX= 755 -DEFINSUSR= bin +DEFINSUSR= root DEFINSGRP= bin diff -Nru cdrtools-2.01.01a33/DEFAULTS/Defaults.netbsd cdrtools-3.02a09/DEFAULTS/Defaults.netbsd --- cdrtools-2.01.01a33/DEFAULTS/Defaults.netbsd 2007-05-08 14:31:50.000000000 +0000 +++ cdrtools-3.02a09/DEFAULTS/Defaults.netbsd 2013-11-04 20:58:20.000000000 +0000 @@ -1,4 +1,4 @@ -#ident "@(#)Defaults.netbsd 1.2 07/05/08 " +#ident "@(#)Defaults.netbsd 1.5 13/11/04 " ########################################################################### # # global definitions for NetBSD Systems @@ -29,6 +29,7 @@ CWARNOPTS= DEFINCDIRS= $(SRCROOT)/include +DEFOSINCDIRS= LDPATH= -L/opt/schily/lib #RUNPATH= -R$(INS_BASE)/lib -R/opt/schily/lib -R$(OLIBSDIR) Will probably not work @@ -39,10 +40,11 @@ ########################################################################### INS_BASE= /opt/schily INS_KBASE= / +INS_RBASE= / # DEFUMASK= 002 # DEFINSMODEF= 444 DEFINSMODEX= 755 -DEFINSUSR= bin +DEFINSUSR= root DEFINSGRP= bin diff -Nru cdrtools-2.01.01a33/DEFAULTS/Defaults.newsos6 cdrtools-3.02a09/DEFAULTS/Defaults.newsos6 --- cdrtools-2.01.01a33/DEFAULTS/Defaults.newsos6 2007-05-08 14:31:50.000000000 +0000 +++ cdrtools-3.02a09/DEFAULTS/Defaults.newsos6 2013-11-04 20:58:20.000000000 +0000 @@ -1,4 +1,4 @@ -#ident "@(#)Defaults.newsos6 1.2 07/05/08 " +#ident "@(#)Defaults.newsos6 1.6 13/11/04 " ########################################################################### # # global definitions for Sony NEWS-OS 6.x @@ -29,8 +29,10 @@ CWARNOPTS= DEFINCDIRS= $(SRCROOT)/include +DEFOSINCDIRS= LDPATH= -L/opt/schily/lib -RUNPATH= -R$(INS_BASE)/lib -R/opt/schily/lib -R$(OLIBSDIR) +#RUNPATH= -R$(INS_BASE)/lib -R/opt/schily/lib -R$(OLIBSDIR) +RUNPATH= -R$(INS_BASE)/lib -R/opt/schily/lib ########################################################################### # @@ -39,10 +41,11 @@ ########################################################################### INS_BASE= /opt/schily INS_KBASE= / +INS_RBASE= / # DEFUMASK= 002 # DEFINSMODEF= 444 DEFINSMODEX= 755 -DEFINSUSR= bin +DEFINSUSR= root DEFINSGRP= bin diff -Nru cdrtools-2.01.01a33/DEFAULTS/Defaults.nextstep cdrtools-3.02a09/DEFAULTS/Defaults.nextstep --- cdrtools-2.01.01a33/DEFAULTS/Defaults.nextstep 2007-05-08 14:31:50.000000000 +0000 +++ cdrtools-3.02a09/DEFAULTS/Defaults.nextstep 2013-11-04 20:58:20.000000000 +0000 @@ -1,4 +1,4 @@ -#ident "@(#)Defaults.nextstep 1.2 07/05/08 " +#ident "@(#)Defaults.nextstep 1.5 13/11/04 " ########################################################################### # # global definitions for NeXT Step Systems @@ -29,6 +29,7 @@ CWARNOPTS= DEFINCDIRS= $(SRCROOT)/include +DEFOSINCDIRS= LDPATH= -L/opt/schily/lib #RUNPATH= -R$(INS_BASE)/lib -R/opt/schily/lib -R$(OLIBSDIR) Will probably not work @@ -39,10 +40,11 @@ ########################################################################### INS_BASE= /opt/schily INS_KBASE= / +INS_RBASE= / # DEFUMASK= 002 # DEFINSMODEF= 444 DEFINSMODEX= 755 -DEFINSUSR= bin +DEFINSUSR= root DEFINSGRP= bin diff -Nru cdrtools-2.01.01a33/DEFAULTS/Defaults.openbsd cdrtools-3.02a09/DEFAULTS/Defaults.openbsd --- cdrtools-2.01.01a33/DEFAULTS/Defaults.openbsd 2007-05-08 14:31:50.000000000 +0000 +++ cdrtools-3.02a09/DEFAULTS/Defaults.openbsd 2013-11-04 20:58:20.000000000 +0000 @@ -1,4 +1,4 @@ -#ident "@(#)Defaults.openbsd 1.2 07/05/08 " +#ident "@(#)Defaults.openbsd 1.5 13/11/04 " ########################################################################### # # global definitions for OpenBSD Systems @@ -29,6 +29,7 @@ CWARNOPTS= DEFINCDIRS= $(SRCROOT)/include +DEFOSINCDIRS= LDPATH= -L/opt/schily/lib #RUNPATH= -R$(INS_BASE)/lib -R/opt/schily/lib -R$(OLIBSDIR) Will probably not work @@ -39,10 +40,11 @@ ########################################################################### INS_BASE= /opt/schily INS_KBASE= / +INS_RBASE= / # DEFUMASK= 002 # DEFINSMODEF= 444 DEFINSMODEX= 755 -DEFINSUSR= bin +DEFINSUSR= root DEFINSGRP= bin diff -Nru cdrtools-2.01.01a33/DEFAULTS/Defaults.openserver cdrtools-3.02a09/DEFAULTS/Defaults.openserver --- cdrtools-2.01.01a33/DEFAULTS/Defaults.openserver 2007-05-08 14:19:50.000000000 +0000 +++ cdrtools-3.02a09/DEFAULTS/Defaults.openserver 2013-11-04 20:58:20.000000000 +0000 @@ -1,4 +1,4 @@ -#ident "@(#)Defaults.openserver 1.1 07/05/08 " +#ident "@(#)Defaults.openserver 1.4 13/11/04 " ########################################################################### # # global definitions for SCO OpenServer 5 Systems @@ -29,6 +29,7 @@ CWARNOPTS= DEFINCDIRS= $(SRCROOT)/include +DEFOSINCDIRS= LDPATH= RUNPATH= @@ -39,10 +40,11 @@ ########################################################################### INS_BASE= /usr/local INS_KBASE= / +INS_RBASE= / # DEFUMASK= 002 # DEFINSMODEF= 444 DEFINSMODEX= 755 -DEFINSUSR= bin +DEFINSUSR= root DEFINSGRP= bin diff -Nru cdrtools-2.01.01a33/DEFAULTS/Defaults.openvms cdrtools-3.02a09/DEFAULTS/Defaults.openvms --- cdrtools-2.01.01a33/DEFAULTS/Defaults.openvms 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/DEFAULTS/Defaults.openvms 2013-11-04 20:58:20.000000000 +0000 @@ -0,0 +1,51 @@ +#ident "@(#)Defaults.openvms 1.2 13/11/04 " +########################################################################### +# +# global definitions for OpenVMS +# +########################################################################### +# +# Compiler stuff +# +########################################################################### +DEFCCOM= cc +#DEFCCOM= gcc + +########################################################################### +# +# Link mode for libraries that are part of the makefile system: +# If DEFLINKMODE is set to "static", no dynamic linking will be used +# If DEFLINKMODE is set to "dynamic", dynamic linking will be used +# +########################################################################### +DEFLINKMODE= static + +########################################################################### +# +# If the next line is commented out, compilation is done with max warn level +# If the next line is uncommented, compilation is done with minimal warnings +# +########################################################################### +CWARNOPTS= + +DEFINCDIRS= $(SRCROOT)/include +DEFOSINCDIRS= +LDPATH= -L/opt/schily/lib +#RUNPATH= -R$(INS_BASE)/lib -R/opt/schily/lib -R$(OLIBSDIR) +RUNPATH= -R$(INS_BASE)/lib -R/opt/schily/lib + +########################################################################### +# +# Installation config stuff +# +########################################################################### +INS_BASE= /opt/schily +INS_KBASE= / +INS_RBASE= / +# +DEFUMASK= 002 +# +DEFINSMODEF= 444 +DEFINSMODEX= 755 +DEFINSUSR= root +DEFINSGRP= bin diff -Nru cdrtools-2.01.01a33/DEFAULTS/Defaults.os2 cdrtools-3.02a09/DEFAULTS/Defaults.os2 --- cdrtools-2.01.01a33/DEFAULTS/Defaults.os2 2007-05-08 14:31:50.000000000 +0000 +++ cdrtools-3.02a09/DEFAULTS/Defaults.os2 2013-11-04 20:58:20.000000000 +0000 @@ -1,4 +1,4 @@ -#ident "@(#)Defaults.os2 1.2 07/05/08 " +#ident "@(#)Defaults.os2 1.6 13/11/04 " ########################################################################### # # global definitions for OS/2 Systems @@ -29,8 +29,10 @@ CWARNOPTS= DEFINCDIRS= $(SRCROOT)/include +DEFOSINCDIRS= LDPATH= -L/opt/schily/lib -RUNPATH= -R$(INS_BASE)/lib -R/opt/schily/lib -R$(OLIBSDIR) +#RUNPATH= -R$(INS_BASE)/lib -R/opt/schily/lib -R$(OLIBSDIR) +RUNPATH= -R$(INS_BASE)/lib -R/opt/schily/lib ########################################################################### # @@ -39,10 +41,11 @@ ########################################################################### INS_BASE= /opt/schily INS_KBASE= / +INS_RBASE= / # DEFUMASK= 002 # DEFINSMODEF= 444 DEFINSMODEX= 755 -DEFINSUSR= bin +DEFINSUSR= root DEFINSGRP= bin diff -Nru cdrtools-2.01.01a33/DEFAULTS/Defaults.osf1 cdrtools-3.02a09/DEFAULTS/Defaults.osf1 --- cdrtools-2.01.01a33/DEFAULTS/Defaults.osf1 2007-05-08 14:31:50.000000000 +0000 +++ cdrtools-3.02a09/DEFAULTS/Defaults.osf1 2013-11-04 20:58:21.000000000 +0000 @@ -1,4 +1,4 @@ -#ident "@(#)Defaults.osf1 1.2 07/05/08 " +#ident "@(#)Defaults.osf1 1.6 13/11/04 " ########################################################################### # # global definitions for Digital UNIX (OSF1) Systems @@ -29,8 +29,10 @@ CWARNOPTS= DEFINCDIRS= $(SRCROOT)/include +DEFOSINCDIRS= LDPATH= -L/opt/schily/lib -RUNPATH= -R$(INS_BASE)/lib -R/opt/schily/lib -R$(OLIBSDIR) +#RUNPATH= -R$(INS_BASE)/lib -R/opt/schily/lib -R$(OLIBSDIR) +RUNPATH= -R$(INS_BASE)/lib -R/opt/schily/lib ########################################################################### # @@ -39,10 +41,11 @@ ########################################################################### INS_BASE= /opt/schily INS_KBASE= / +INS_RBASE= / # DEFUMASK= 002 # DEFINSMODEF= 444 DEFINSMODEX= 755 -DEFINSUSR= bin +DEFINSUSR= root DEFINSGRP= bin diff -Nru cdrtools-2.01.01a33/DEFAULTS/Defaults.pyro cdrtools-3.02a09/DEFAULTS/Defaults.pyro --- cdrtools-2.01.01a33/DEFAULTS/Defaults.pyro 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/DEFAULTS/Defaults.pyro 2013-11-04 20:58:21.000000000 +0000 @@ -0,0 +1,51 @@ +#ident "@(#)Defaults.pyro 1.2 13/11/04 " +########################################################################### +# +# global definitions for Pyro Systems +# +########################################################################### +# +# Compiler stuff +# +########################################################################### +#DEFCCOM= cc +DEFCCOM= gcc + +########################################################################### +# +# Link mode for libraries that are part of the makefile system: +# If DEFLINKMODE is set to "static", no dynamic linking will be used +# If DEFLINKMODE is set to "dynamic", dynamic linking will be used +# +########################################################################### +DEFLINKMODE= static + +########################################################################### +# +# If the next line is commented out, compilation is done with max warn level +# If the next line is uncommented, compilation is done with minimal warnings +# +########################################################################### +CWARNOPTS= + +DEFINCDIRS= $(SRCROOT)/include +DEFOSINCDIRS= /boot/Include +LDPATH= -L/opt/schily/lib +#RUNPATH= -R$(INS_BASE)/lib -R/opt/schily/lib -R$(OLIBSDIR) +RUNPATH= -R$(INS_BASE)/lib -R/opt/schily/lib + +########################################################################### +# +# Installation config stuff +# +########################################################################### +INS_BASE= /tmp/schily +INS_KBASE= /tmp/schily/admin +INS_RBASE= /tmp/schily/admin +# +DEFUMASK= 002 +# +DEFINSMODEF= 444 +DEFINSMODEX= 755 +DEFINSUSR= admin +DEFINSGRP= bin diff -Nru cdrtools-2.01.01a33/DEFAULTS/Defaults.qnx cdrtools-3.02a09/DEFAULTS/Defaults.qnx --- cdrtools-2.01.01a33/DEFAULTS/Defaults.qnx 2007-05-08 14:31:50.000000000 +0000 +++ cdrtools-3.02a09/DEFAULTS/Defaults.qnx 2013-11-04 20:58:21.000000000 +0000 @@ -1,4 +1,4 @@ -#ident "@(#)Defaults.qnx 1.2 07/05/08 " +#ident "@(#)Defaults.qnx 1.5 13/11/04 " ########################################################################### # # global definitions for QNX Systems @@ -32,6 +32,7 @@ CWARNOPTS= DEFINCDIRS= $(SRCROOT)/include +DEFOSINCDIRS= LDPATH= -L/opt/schily/lib #RUNPATH= -R$(INS_BASE)/lib -R/opt/schily/lib -R$(OLIBSDIR) Will probably not work @@ -42,10 +43,11 @@ ########################################################################### INS_BASE= /opt/schily INS_KBASE= / +INS_RBASE= / # DEFUMASK= 002 # DEFINSMODEF= 444 DEFINSMODEX= 755 -DEFINSUSR= bin +DEFINSUSR= root DEFINSGRP= bin diff -Nru cdrtools-2.01.01a33/DEFAULTS/Defaults.rhapsody cdrtools-3.02a09/DEFAULTS/Defaults.rhapsody --- cdrtools-2.01.01a33/DEFAULTS/Defaults.rhapsody 2007-05-08 14:31:50.000000000 +0000 +++ cdrtools-3.02a09/DEFAULTS/Defaults.rhapsody 2013-11-04 20:58:21.000000000 +0000 @@ -1,4 +1,4 @@ -#ident "@(#)Defaults.rhapsody 1.2 07/05/08 " +#ident "@(#)Defaults.rhapsody 1.4 13/11/04 " ########################################################################### # # global definitions for NeXT Step (Apple Rhapsody) Systems @@ -29,7 +29,9 @@ CWARNOPTS= DEFINCDIRS= $(SRCROOT)/include +DEFOSINCDIRS= /usr/local/include LDPATH= #-L/opt/schily/lib +LDPATH= -L/usr/local/lib #RUNPATH= -R$(INS_BASE)/lib -R/opt/schily/lib -R$(OLIBSDIR) Will probably not work ########################################################################### @@ -39,6 +41,7 @@ ########################################################################### INS_BASE= /opt/schily INS_KBASE= / +INS_RBASE= / # DEFUMASK= 002 # diff -Nru cdrtools-2.01.01a33/DEFAULTS/Defaults.sunos4 cdrtools-3.02a09/DEFAULTS/Defaults.sunos4 --- cdrtools-2.01.01a33/DEFAULTS/Defaults.sunos4 2007-05-08 14:31:50.000000000 +0000 +++ cdrtools-3.02a09/DEFAULTS/Defaults.sunos4 2013-11-04 20:58:21.000000000 +0000 @@ -1,4 +1,4 @@ -#ident "@(#)Defaults.sunos4 1.2 07/05/08 " +#ident "@(#)Defaults.sunos4 1.5 13/11/04 " ########################################################################### # # global definitions for SunOS Systems @@ -29,6 +29,7 @@ CWARNOPTS= DEFINCDIRS= $(SRCROOT)/include +DEFOSINCDIRS= LDPATH= -L/opt/schily/lib #RUNPATH= -R$(INS_BASE)/lib -R/opt/schily/lib -R$(OLIBSDIR) Will not work on SunOS @@ -39,10 +40,11 @@ ########################################################################### INS_BASE= /opt/schily INS_KBASE= / +INS_RBASE= / # DEFUMASK= 002 # DEFINSMODEF= 444 DEFINSMODEX= 755 -DEFINSUSR= bin +DEFINSUSR= root DEFINSGRP= bin diff -Nru cdrtools-2.01.01a33/DEFAULTS/Defaults.sunos5 cdrtools-3.02a09/DEFAULTS/Defaults.sunos5 --- cdrtools-2.01.01a33/DEFAULTS/Defaults.sunos5 2007-05-08 14:31:50.000000000 +0000 +++ cdrtools-3.02a09/DEFAULTS/Defaults.sunos5 2013-11-04 20:58:21.000000000 +0000 @@ -1,4 +1,4 @@ -#ident "@(#)Defaults.sunos5 1.2 07/05/08 " +#ident "@(#)Defaults.sunos5 1.6 13/11/04 " ########################################################################### # # global definitions for Solaris Systems @@ -29,8 +29,10 @@ CWARNOPTS= DEFINCDIRS= $(SRCROOT)/include +DEFOSINCDIRS= LDPATH= -L/opt/schily/lib -RUNPATH= -R$(INS_BASE)/lib -R/opt/schily/lib -R$(OLIBSDIR) +#RUNPATH= -R$(INS_BASE)/lib -R/opt/schily/lib -R$(OLIBSDIR) +RUNPATH= -R$(INS_BASE)/lib -R/opt/schily/lib ########################################################################### # @@ -39,10 +41,11 @@ ########################################################################### INS_BASE= /opt/schily INS_KBASE= / +INS_RBASE= / # DEFUMASK= 002 # DEFINSMODEF= 444 DEFINSMODEX= 755 -DEFINSUSR= bin +DEFINSUSR= root DEFINSGRP= bin diff -Nru cdrtools-2.01.01a33/DEFAULTS/Defaults.syllable cdrtools-3.02a09/DEFAULTS/Defaults.syllable --- cdrtools-2.01.01a33/DEFAULTS/Defaults.syllable 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/DEFAULTS/Defaults.syllable 2013-11-04 20:58:21.000000000 +0000 @@ -0,0 +1,51 @@ +#ident "@(#)Defaults.syllable 1.3 13/11/04 " +########################################################################### +# +# global definitions for Syllable Systems +# +########################################################################### +# +# Compiler stuff +# +########################################################################### +#DEFCCOM= cc +DEFCCOM= gcc + +########################################################################### +# +# Link mode for libraries that are part of the makefile system: +# If DEFLINKMODE is set to "static", no dynamic linking will be used +# If DEFLINKMODE is set to "dynamic", dynamic linking will be used +# +########################################################################### +DEFLINKMODE= static + +########################################################################### +# +# If the next line is commented out, compilation is done with max warn level +# If the next line is uncommented, compilation is done with minimal warnings +# +########################################################################### +CWARNOPTS= + +DEFINCDIRS= $(SRCROOT)/include +DEFOSINCDIRS= /ainc +LDPATH= -L/opt/schily/lib +#RUNPATH= -R$(INS_BASE)/lib -R/opt/schily/lib -R$(OLIBSDIR) +RUNPATH= -R$(INS_BASE)/lib -R/opt/schily/lib + +########################################################################### +# +# Installation config stuff +# +########################################################################### +INS_BASE= /opt/schily +INS_KBASE= / +INS_RBASE= / +# +DEFUMASK= 002 +# +DEFINSMODEF= 444 +DEFINSMODEX= 755 +DEFINSUSR= root +DEFINSGRP= bin diff -Nru cdrtools-2.01.01a33/DEFAULTS/Defaults.unixware cdrtools-3.02a09/DEFAULTS/Defaults.unixware --- cdrtools-2.01.01a33/DEFAULTS/Defaults.unixware 2007-05-08 14:19:50.000000000 +0000 +++ cdrtools-3.02a09/DEFAULTS/Defaults.unixware 2013-11-04 20:58:21.000000000 +0000 @@ -1,4 +1,4 @@ -#ident "@(#)Defaults.unixware 1.1 07/05/08 " +#ident "@(#)Defaults.unixware 1.4 13/11/04 " ########################################################################### # # global definitions for SCO UnixWare Systems @@ -29,6 +29,7 @@ CWARNOPTS= DEFINCDIRS= $(SRCROOT)/include +DEFOSINCDIRS= LDPATH= RUNPATH= @@ -39,10 +40,11 @@ ########################################################################### INS_BASE= /usr/local INS_KBASE= / +INS_RBASE= / # DEFUMASK= 002 # DEFINSMODEF= 444 DEFINSMODEX= 755 -DEFINSUSR= bin +DEFINSUSR= root DEFINSGRP= bin diff -Nru cdrtools-2.01.01a33/DEFAULTS/vc6-cygwin-setup cdrtools-3.02a09/DEFAULTS/vc6-cygwin-setup --- cdrtools-2.01.01a33/DEFAULTS/vc6-cygwin-setup 2007-04-20 12:49:37.000000000 +0000 +++ cdrtools-3.02a09/DEFAULTS/vc6-cygwin-setup 2009-05-16 15:01:59.000000000 +0000 @@ -1,4 +1,8 @@ -# @(#)vc6-cygwin-setup 1.3 07/01/26 Copyright 2006 J. Schilling +# @(#)vc6-cygwin-setup 1.4 09/05/16 Copyright 2006 J. Schilling + +# +# Keep in sync with vc6-setup as we cannot rely on hard links +# # # Disable warnings for nonportable variable assignements. diff -Nru cdrtools-2.01.01a33/DEFAULTS/vc6-setup cdrtools-3.02a09/DEFAULTS/vc6-setup --- cdrtools-2.01.01a33/DEFAULTS/vc6-setup 2007-01-26 13:27:18.000000000 +0000 +++ cdrtools-3.02a09/DEFAULTS/vc6-setup 2009-05-16 15:01:59.000000000 +0000 @@ -1,4 +1,8 @@ -# @(#)vc6-setup 1.3 07/01/26 Copyright 2006 J. Schilling +# @(#)vc6-setup 1.4 09/05/16 Copyright 2006 J. Schilling + +# +# Keep in sync with vc6-cygwin-setup as we cannot rely on hard links +# # # Disable warnings for nonportable variable assignements. diff -Nru cdrtools-2.01.01a33/DEFAULTS/vc7_64-cygwin-setup cdrtools-3.02a09/DEFAULTS/vc7_64-cygwin-setup --- cdrtools-2.01.01a33/DEFAULTS/vc7_64-cygwin-setup 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/DEFAULTS/vc7_64-cygwin-setup 2009-05-16 15:10:39.000000000 +0000 @@ -0,0 +1,45 @@ +# @(#)vc7_64-cygwin-setup 1.1 09/05/16 Copyright 2006 J. Schilling + +# +# Keep in sync with vc7_64-setup as we cannot rely on hard links +# + +# +# Disable warnings for nonportable variable assignements. +# We only use smake MS-WIN, so this is not a problem. +# +.NO_WARN: := + +# +# A German installation +# +#VSINSTALLDIR=C:\Programme\Microsoft Visual Studio 8 +#VSINS=/cygdrive/c/Programme/Microsoft Visual Studio 8 + +# +# An English installation on an English Windows XP 64 Bit host +# +VSINSTALLDIR=C:\Program Files (x86)\Microsoft Visual Studio 8 +VSINS=/cygdrive/c/Program Files (x86)/Microsoft Visual Studio 8 + +export VSINSTALLDIR + +VCINSTALLDIR :=${VSINSTALLDIR}\VC +export VCINSTALLDIR + +PATH :=${VSINS}/VC/BIN/amd64:${VSINS}/Common7/IDE:${PATH} +export PATH + +INCLUDE :=${VCINSTALLDIR}\INCLUDE;${VCINSTALLDIR}\PlatformSDK\INCLUDE;${INCLUDE} +export INCLUDE + +LIB :=${VCINSTALLDIR}\LIB\amd64;${VCINSTALLDIR}\PlatformSDK\LIB\amd64;${LIB} +export LIB + +VC_SETUP=dummy-setup +export VC_SETUP + +# +# Re-enable all warnings. +# +.NO_WARN: diff -Nru cdrtools-2.01.01a33/DEFAULTS/vc7_64-setup cdrtools-3.02a09/DEFAULTS/vc7_64-setup --- cdrtools-2.01.01a33/DEFAULTS/vc7_64-setup 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/DEFAULTS/vc7_64-setup 2009-05-16 15:10:39.000000000 +0000 @@ -0,0 +1,46 @@ +# @(#)vc7_64-setup 1.1 09/05/16 Copyright 2006 J. Schilling + +# +# Keep in sync with vc7_64-cygwin-setup as we cannot rely on hard links +# + +# +# Disable warnings for nonportable variable assignements. +# We only use smake MS-WIN, so this is not a problem. +# +.NO_WARN: := + +# +# A German installation on a German Windows (32Bit) host, to be used +# for cross compiling stuff (no autoconf run) +# +#VSINSTALLDIR=C:\Programme\Microsoft Visual Studio 8 +#VSINS=/cygdrive/c/Programme/Microsoft Visual Studio 8 + +# +# An English installation on an English Windows XP 64 Bit host +# +VSINSTALLDIR=C:\Program Files (x86)\Microsoft Visual Studio 8 +VSINS=/cygdrive/c/Program Files (x86)/Microsoft Visual Studio 8 + +export VSINSTALLDIR + +VCINSTALLDIR :=${VSINSTALLDIR}\VC +export VCINSTALLDIR + +PATH :=${VSINS}/VC/BIN/amd64:${VSINS}/Common7/IDE:${PATH} +export PATH + +INCLUDE :=${VCINSTALLDIR}\INCLUDE;${VCINSTALLDIR}\PlatformSDK\INCLUDE;${INCLUDE} +export INCLUDE + +LIB :=${VCINSTALLDIR}\LIB\amd64;${VCINSTALLDIR}\PlatformSDK\LIB\amd64;${LIB} +export LIB + +VC_SETUP=dummy-setup +export VC_SETUP + +# +# Re-enable all warnings. +# +.NO_WARN: diff -Nru cdrtools-2.01.01a33/DEFAULTS/vc7-cygwin-setup cdrtools-3.02a09/DEFAULTS/vc7-cygwin-setup --- cdrtools-2.01.01a33/DEFAULTS/vc7-cygwin-setup 2007-04-20 12:49:39.000000000 +0000 +++ cdrtools-3.02a09/DEFAULTS/vc7-cygwin-setup 2009-05-16 15:01:59.000000000 +0000 @@ -1,4 +1,8 @@ -# @(#)vc7-cygwin-setup 1.4 07/01/26 Copyright 2006 J. Schilling +# @(#)vc7-cygwin-setup 1.5 09/05/16 Copyright 2006 J. Schilling + +# +# Keep in sync with vc7-setup as we cannot rely on hard links +# # # Disable warnings for nonportable variable assignements. diff -Nru cdrtools-2.01.01a33/DEFAULTS/vc7-setup cdrtools-3.02a09/DEFAULTS/vc7-setup --- cdrtools-2.01.01a33/DEFAULTS/vc7-setup 2007-01-26 13:27:18.000000000 +0000 +++ cdrtools-3.02a09/DEFAULTS/vc7-setup 2009-05-16 15:01:59.000000000 +0000 @@ -1,4 +1,8 @@ -# @(#)vc7-setup 1.4 07/01/26 Copyright 2006 J. Schilling +# @(#)vc7-setup 1.5 09/05/16 Copyright 2006 J. Schilling + +# +# Keep in sync with vc7-cygwin-setup as we cannot rely on hard links +# # # Disable warnings for nonportable variable assignements. diff -Nru cdrtools-2.01.01a33/DEFAULTS/vc9-cygwin-setup cdrtools-3.02a09/DEFAULTS/vc9-cygwin-setup --- cdrtools-2.01.01a33/DEFAULTS/vc9-cygwin-setup 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/DEFAULTS/vc9-cygwin-setup 2011-08-01 18:07:10.000000000 +0000 @@ -0,0 +1,48 @@ +# @(#)vc9-cygwin-setup 1.4 11/08/01 Copyright 2006-2011 J. Schilling + +# +# Keep in sync with vc9-cygwin-setup as we cannot rely on hard links +# + +# +# Disable warnings for nonportable variable assignements. +# We only use smake MS-WIN, so this is not a problem. +# +.NO_WARN: := + +# +# A German installation +# +VSINSTALLDIR=C:\Programme\Microsoft Visual Studio 9.0 +VSINS=/cygdrive/c/Programme/Microsoft Visual Studio 9.0 + +# +# An English installation +# +VSINSTALLDIR=C:\Program Files (x86)\Microsoft Visual Studio 9.0 +VSBASEDIR=C:\Program Files (x86) +VSINS=/cygdrive/c/Program Files (x86)/Microsoft Visual Studio 9.0 + +export VSINSTALLDIR + +VCINSTALLDIR :=${VSINSTALLDIR}\VC +export VCINSTALLDIR + +PATH :=${VSINS}/VC/bin:${VSINS}/Common7/IDE:${PATH} +export PATH + +#INCLUDE :=${VCINSTALLDIR}\include;${VCINSTALLDIR}\PlatformSDK\INCLUDE;${INCLUDE} +INCLUDE :=${VCINSTALLDIR}\atlmfc\include;${VCINSTALLDIR}\include;${VSBASEDIR}\Microsoft SDKs\Windows\v5.0\include;C:\Program Files\\Microsoft SDKs\Windows\v6.0A\include;${INCLUDE} +export INCLUDE + +#LIB :=${VCINSTALLDIR}\lib;${VCINSTALLDIR}\PlatformSDK\LIB;${LIB} +LIB :=${VCINSTALLDIR}\atlmfc\lib;${VCINSTALLDIR}\lib;C:\Program Files\\Microsoft SDKs\Windows\v6.0A\lib;${LIB} +export LIB + +VC_SETUP=dummy-setup +export VC_SETUP + +# +# Re-enable all warnings. +# +.NO_WARN: diff -Nru cdrtools-2.01.01a33/DEFAULTS/vc9-setup cdrtools-3.02a09/DEFAULTS/vc9-setup --- cdrtools-2.01.01a33/DEFAULTS/vc9-setup 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/DEFAULTS/vc9-setup 2011-08-01 18:07:10.000000000 +0000 @@ -0,0 +1,48 @@ +# @(#)vc9-setup 1.3 11/08/01 Copyright 2006-2011 J. Schilling + +# +# Keep in sync with vc9-cygwin-setup as we cannot rely on hard links +# + +# +# Disable warnings for nonportable variable assignements. +# We only use smake MS-WIN, so this is not a problem. +# +.NO_WARN: := + +# +# A German installation +# +VSINSTALLDIR=C:\Programme\Microsoft Visual Studio 9.0 +VSINS=/cygdrive/c/Programme/Microsoft Visual Studio 9.0 + +# +# An English installation +# +VSINSTALLDIR=C:\Program Files (x86)\Microsoft Visual Studio 9.0 +VSBASEDIR=C:\Program Files (x86) +VSINS=/cygdrive/c/Program Files (x86)/Microsoft Visual Studio 9.0 + +export VSINSTALLDIR + +VCINSTALLDIR :=${VSINSTALLDIR}\VC +export VCINSTALLDIR + +PATH :=${VSINS}/VC/bin:${VSINS}/Common7/IDE:${PATH} +export PATH + +#INCLUDE :=${VCINSTALLDIR}\include;${VCINSTALLDIR}\PlatformSDK\INCLUDE;${INCLUDE} +INCLUDE :=${VCINSTALLDIR}\atlmfc\include;${VCINSTALLDIR}\include;${VSBASEDIR}\Microsoft SDKs\Windows\v5.0\include;C:\Program Files\\Microsoft SDKs\Windows\v6.0A\include;${INCLUDE} +export INCLUDE + +#LIB :=${VCINSTALLDIR}\lib;${VCINSTALLDIR}\PlatformSDK\LIB;${LIB} +LIB :=${VCINSTALLDIR}\atlmfc\lib;${VCINSTALLDIR}\lib;C:\Program Files\\Microsoft SDKs\Windows\v6.0A\lib;${LIB} +export LIB + +VC_SETUP=dummy-setup +export VC_SETUP + +# +# Re-enable all warnings. +# +.NO_WARN: diff -Nru cdrtools-2.01.01a33/DEFAULTS_CSW/Defaults cdrtools-3.02a09/DEFAULTS_CSW/Defaults --- cdrtools-2.01.01a33/DEFAULTS_CSW/Defaults 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/DEFAULTS_CSW/Defaults 1997-04-27 00:10:41.000000000 +0000 @@ -0,0 +1,8 @@ +#ident "%W% %E% %Q%" +########################################################################### +# +# global definitions: include system specific file +# +########################################################################### + +include $(DEFLTSROOT)/$(DEFLTSDIR)/Defaults.$(O_ARCH) diff -Nru cdrtools-2.01.01a33/DEFAULTS_CSW/Defaults.sunos5 cdrtools-3.02a09/DEFAULTS_CSW/Defaults.sunos5 --- cdrtools-2.01.01a33/DEFAULTS_CSW/Defaults.sunos5 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/DEFAULTS_CSW/Defaults.sunos5 2017-04-23 14:26:58.000000000 +0000 @@ -0,0 +1,67 @@ +#ident "@(#)Defaults.sunos5 1.6 17/04/23 " +########################################################################### +# +# global definitions for Solaris Systems +# +########################################################################### +# +# Compiler stuff +# +########################################################################### +DEFCCOM= cc +#DEFCCOM= gcc + +########################################################################### +# +# Link mode for libraries that are part of the makefile system: +# If DEFLINKMODE is set to "static", no dynamic linking will be used +# If DEFLINKMODE is set to "dynamic", dynamic linking will be used +# +########################################################################### +DEFLINKMODE= static + +########################################################################### +# +# If the next line is commented out, compilation is done with max warn level +# If the next line is uncommented, compilation is done with minimal warnings +# +########################################################################### +#CWARNOPTS= + +___SPO= $(P_ARCH:sparc=$(OSREL)) +__SPO= $(___SPO:5.1%=null) +_SPO= $(__SPO:5.%=sparc-cc.defs) +SPO= $(_SPO:$(P_ARCH)=null) + +include $(DEFLTSROOT)/$(DEFLTSDIR)/$(SPO) + +SUNPROCOPTOPT= -O -xspace -xildoff $(XARCH_GEN) +SUNPROC++OPTOPT= -O -xspace -xildoff $(XARCH_GEN) + + +DEFINCDIRS= $(SRCROOT)/include +DEFOSINCDIRS= +LDPATH= -L/opt/schily/lib +#RUNPATH= -R$(INS_BASE)/lib -R/opt/schily/lib -R$(OLIBSDIR) +RUNPATH= -R'$$ORIGIN/../lib' -R/opt/schily/lib + +########################################################################### +# +# Installation config stuff +# +########################################################################### +INS_BASE= /opt/schily +INS_KBASE= / +INS_RBASE= / +#INS_BASE= /tmp/schily +#INS_KBASE= /tmp/schily/root +#INS_RBASE= /tmp/schily/root +# +DEFUMASK= 002 +# +DEFINSMODEF= 444 +DEFINSMODEX= 755 +DEFINSUSR= root +DEFINSGRP= bin + +PROJECTNAME= SchilliX-0.6 diff -Nru cdrtools-2.01.01a33/DEFAULTS_CSW/MKLINKS cdrtools-3.02a09/DEFAULTS_CSW/MKLINKS --- cdrtools-2.01.01a33/DEFAULTS_CSW/MKLINKS 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/DEFAULTS_CSW/MKLINKS 2009-07-28 21:56:46.000000000 +0000 @@ -0,0 +1,4 @@ +#!/bin/sh +# +ln -s Defaults.dgux Defaults.dgux3 +ln -s Defaults.dgux Defaults.dgux4 diff -Nru cdrtools-2.01.01a33/DEFAULTS_CSW/sparc-cc.defs cdrtools-3.02a09/DEFAULTS_CSW/sparc-cc.defs --- cdrtools-2.01.01a33/DEFAULTS_CSW/sparc-cc.defs 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/DEFAULTS_CSW/sparc-cc.defs 2014-03-27 21:30:58.000000000 +0000 @@ -0,0 +1,40 @@ +#ident "@(#)sparc-cc.defs 1.3 14/03/27 " +########################################################################### +# +# global compiler specific definitions for Solaris Sparc Systems +# +########################################################################### +# Written 2007-2014 by J. Schilling +########################################################################### +# Copyright (c) J. Schilling +########################################################################### +# The contents of this file are subject to the terms of the +# Common Development and Distribution License, Version 1.0 only +# (the "License"). You may not use this file except in compliance +# with the License. +# +# See the file CDDL.Schily.txt in this distribution for details. +# A copy of the CDDL is also available via the Internet at +# http://www.opensource.org/licenses/cddl1.txt +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file CDDL.Schily.txt from this distribution. +########################################################################### +# +# Enforce to use the generic 32 bit Sparc instruction set (Sparc-V8). +# Newer Sparc-V9 (64 Bit systems) implement Sparc-V8plus for 32 bits. +# This definition grants that the code may run on a pure 32 bit Sparc system, +# as the default for newer Sun compilers is to create Sparc-V8plus instructions +# when in 32 bit mode. +# +# XARCH_GEN__ is overwritten later in RULES/cc-sunpro.rul +# XARCH_GEN_ is used by RULES/cc-sunpro.rul as primary input for XARCH_GEN +# _*XARCH_GEN is unique to sparc-cc.defs +# +########################################################################### +XARCH_GEN__= -xarch=v8 + +_XARCH_GEN= $(_UNIQ)$(CCOM) +__XARCH_GEN= $(_XARCH_GEN:$(_UNIQ)cc64=-xarch=generic64) +XARCH_GEN_= $(__XARCH_GEN:$(_UNIQ)%=-xarch=v8) +#XARCH_GEN= $(___XARCH_GEN:$(_UNIQ)%=%) diff -Nru cdrtools-2.01.01a33/DEFAULTS_ENG/Defaults.aix cdrtools-3.02a09/DEFAULTS_ENG/Defaults.aix --- cdrtools-2.01.01a33/DEFAULTS_ENG/Defaults.aix 2007-05-08 14:38:20.000000000 +0000 +++ cdrtools-3.02a09/DEFAULTS_ENG/Defaults.aix 2013-11-04 20:58:21.000000000 +0000 @@ -1,4 +1,4 @@ -#ident "@(#)Defaults.aix 1.2 07/05/08 " +#ident "@(#)Defaults.aix 1.6 13/11/04 " ########################################################################### # # global definitions for IBM AIX Systems @@ -29,8 +29,10 @@ #CWARNOPTS= DEFINCDIRS= $(SRCROOT)/include +DEFOSINCDIRS= LDPATH= -L/opt/schily/lib -RUNPATH= -R$(INS_BASE)/lib -R/opt/schily/lib -R$(OLIBSDIR) +#RUNPATH= -R$(INS_BASE)/lib -R/opt/schily/lib -R$(OLIBSDIR) +RUNPATH= -R$(INS_BASE)/lib -R/opt/schily/lib ########################################################################### # @@ -39,12 +41,14 @@ ########################################################################### #INS_BASE= /opt/schily #INS_KBASE= / +#INS_RBASE= / INS_BASE= /tmp/schily INS_KBASE= /tmp/schily/root +INS_RBASE= /tmp/schily/root # DEFUMASK= 002 # DEFINSMODEF= 444 DEFINSMODEX= 755 -DEFINSUSR= bin +DEFINSUSR= root DEFINSGRP= bin diff -Nru cdrtools-2.01.01a33/DEFAULTS_ENG/Defaults.amigaos cdrtools-3.02a09/DEFAULTS_ENG/Defaults.amigaos --- cdrtools-2.01.01a33/DEFAULTS_ENG/Defaults.amigaos 2007-05-08 14:38:20.000000000 +0000 +++ cdrtools-3.02a09/DEFAULTS_ENG/Defaults.amigaos 2013-11-04 20:58:21.000000000 +0000 @@ -1,4 +1,4 @@ -#ident "@(#)Defaults.amigaos 1.2 07/05/08 " +#ident "@(#)Defaults.amigaos 1.6 13/11/04 " ########################################################################### # # global definitions for AmigaOS Systems using CC=gcc @@ -29,8 +29,10 @@ #CWARNOPTS= DEFINCDIRS= $(SRCROOT)/include +DEFOSINCDIRS= LDPATH= -L/opt/schily/lib -RUNPATH= -R$(INS_BASE)/lib -R/opt/schily/lib -R$(OLIBSDIR) +#RUNPATH= -R$(INS_BASE)/lib -R/opt/schily/lib -R$(OLIBSDIR) +RUNPATH= -R$(INS_BASE)/lib -R/opt/schily/lib ########################################################################### # @@ -39,12 +41,14 @@ ########################################################################### #INS_BASE= /opt/schily #INS_KBASE= / +#INS_RBASE= / INS_BASE= /tmp/schily INS_KBASE= /tmp/schily/root +INS_RBASE= /tmp/schily/root # DEFUMASK= 002 # DEFINSMODEF= 444 DEFINSMODEX= 755 -DEFINSUSR= bin +DEFINSUSR= root DEFINSGRP= bin diff -Nru cdrtools-2.01.01a33/DEFAULTS_ENG/Defaults.beos cdrtools-3.02a09/DEFAULTS_ENG/Defaults.beos --- cdrtools-2.01.01a33/DEFAULTS_ENG/Defaults.beos 2007-05-08 14:38:20.000000000 +0000 +++ cdrtools-3.02a09/DEFAULTS_ENG/Defaults.beos 2013-11-04 20:58:21.000000000 +0000 @@ -1,4 +1,4 @@ -#ident "@(#)Defaults.beos 1.2 07/05/08 " +#ident "@(#)Defaults.beos 1.6 13/11/04 " ########################################################################### # # global definitions for BeOS Systems @@ -29,8 +29,10 @@ #CWARNOPTS= DEFINCDIRS= $(SRCROOT)/include +DEFOSINCDIRS= LDPATH= -L/opt/schily/lib -RUNPATH= -R$(INS_BASE)/lib -R/opt/schily/lib -R$(OLIBSDIR) +#RUNPATH= -R$(INS_BASE)/lib -R/opt/schily/lib -R$(OLIBSDIR) +RUNPATH= -R$(INS_BASE)/lib -R/opt/schily/lib ########################################################################### # @@ -39,12 +41,14 @@ ########################################################################### #INS_BASE= /opt/schily #INS_KBASE= / +#INS_RBASE= / INS_BASE= /tmp/schily INS_KBASE= /tmp/schily/root +INS_RBASE= /tmp/schily/root # DEFUMASK= 002 # DEFINSMODEF= 444 DEFINSMODEX= 755 -DEFINSUSR= bin +DEFINSUSR= root DEFINSGRP= bin diff -Nru cdrtools-2.01.01a33/DEFAULTS_ENG/Defaults.bitrig cdrtools-3.02a09/DEFAULTS_ENG/Defaults.bitrig --- cdrtools-2.01.01a33/DEFAULTS_ENG/Defaults.bitrig 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/DEFAULTS_ENG/Defaults.bitrig 2015-10-08 18:26:10.000000000 +0000 @@ -0,0 +1,52 @@ +#ident "@(#)Defaults.bitrig 1.1 15/10/08 " +########################################################################### +# +# global definitions for Bitrig Systems +# +########################################################################### +# +# Compiler stuff +# +########################################################################### +DEFCCOM= clang + +########################################################################### +# +# Link mode for libraries that are part of the makefile system: +# If DEFLINKMODE is set to "static", no dynamic linking will be used +# If DEFLINKMODE is set to "dynamic", dynamic linking will be used +# +########################################################################### +DEFLINKMODE= static + +########################################################################### +# +# If the next line is commented out, compilation is done with max warn level +# If the next line is uncommented, compilation is done with minimal warnings +# +########################################################################### +#CWARNOPTS= + +DEFINCDIRS= $(SRCROOT)/include +DEFOSINCDIRS= +LDPATH= -L/opt/schily/lib +#RUNPATH= -R$(INS_BASE)/lib -R/opt/schily/lib -R$(OLIBSDIR) Will probably not work + +########################################################################### +# +# Installation config stuff +# +########################################################################### +#INS_BASE= /opt/schily +#INS_KBASE= / +#INS_RBASE= / +INS_BASE= /tmp/schily +INS_KBASE= /tmp/schily/root +INS_RBASE= /tmp/schily/root +# +DEFUMASK= 002 +# +DEFINSMODEF= 444 +DEFINSMODEX= 755 +DEFINSUSR= root +DEFINSGRP= bin diff -Nru cdrtools-2.01.01a33/DEFAULTS_ENG/Defaults.bsd-os cdrtools-3.02a09/DEFAULTS_ENG/Defaults.bsd-os --- cdrtools-2.01.01a33/DEFAULTS_ENG/Defaults.bsd-os 2007-05-08 14:38:20.000000000 +0000 +++ cdrtools-3.02a09/DEFAULTS_ENG/Defaults.bsd-os 2013-11-04 20:58:21.000000000 +0000 @@ -1,4 +1,4 @@ -#ident "@(#)Defaults.bsd-os 1.2 07/05/08 " +#ident "@(#)Defaults.bsd-os 1.5 13/11/04 " ########################################################################### # # global definitions for BSD/OS Systems @@ -29,6 +29,7 @@ #CWARNOPTS= DEFINCDIRS= $(SRCROOT)/include +DEFOSINCDIRS= #LDPATH= -L/opt/schily/lib #RUNPATH= -R$(INS_BASE)/lib -R/opt/schily/lib -R$(OLIBSDIR) Will probably not work @@ -39,12 +40,14 @@ ########################################################################### #INS_BASE= /opt/schily #INS_KBASE= / +#INS_RBASE= / INS_BASE= /tmp/schily INS_KBASE= /tmp/schily/root +INS_RBASE= /tmp/schily/root # DEFUMASK= 002 # DEFINSMODEF= 444 DEFINSMODEX= 755 -DEFINSUSR= bin +DEFINSUSR= root DEFINSGRP= bin diff -Nru cdrtools-2.01.01a33/DEFAULTS_ENG/Defaults.bsd-os3 cdrtools-3.02a09/DEFAULTS_ENG/Defaults.bsd-os3 --- cdrtools-2.01.01a33/DEFAULTS_ENG/Defaults.bsd-os3 2007-05-08 14:38:21.000000000 +0000 +++ cdrtools-3.02a09/DEFAULTS_ENG/Defaults.bsd-os3 2013-11-04 20:58:21.000000000 +0000 @@ -1,4 +1,4 @@ -#ident "@(#)Defaults.bsd-os3 1.2 07/05/08 " +#ident "@(#)Defaults.bsd-os3 1.5 13/11/04 " ########################################################################### # # global definitions for BSD/OS Systems @@ -29,6 +29,7 @@ #CWARNOPTS= DEFINCDIRS= $(SRCROOT)/include +DEFOSINCDIRS= #LDPATH= -L/opt/schily/lib #RUNPATH= -R$(INS_BASE)/lib -R/opt/schily/lib -R$(OLIBSDIR) Will probably not work @@ -39,12 +40,14 @@ ########################################################################### #INS_BASE= /opt/schily #INS_KBASE= / +#INS_RBASE= / INS_BASE= /tmp/schily INS_KBASE= /tmp/schily/root +INS_RBASE= /tmp/schily/root # DEFUMASK= 002 # DEFINSMODEF= 444 DEFINSMODEX= 755 -DEFINSUSR= bin +DEFINSUSR= root DEFINSGRP= bin diff -Nru cdrtools-2.01.01a33/DEFAULTS_ENG/Defaults.cygwin32_nt cdrtools-3.02a09/DEFAULTS_ENG/Defaults.cygwin32_nt --- cdrtools-2.01.01a33/DEFAULTS_ENG/Defaults.cygwin32_nt 2007-05-08 14:38:21.000000000 +0000 +++ cdrtools-3.02a09/DEFAULTS_ENG/Defaults.cygwin32_nt 2017-07-09 08:18:50.000000000 +0000 @@ -1,4 +1,4 @@ -#ident "@(#)Defaults.cygwin32_nt 1.4 07/05/08 " +#ident "@(#)Defaults.cygwin32_nt 1.7 17/07/09 " ########################################################################### # # global definitions for Cygnus GCC for WINNT Systems @@ -29,6 +29,7 @@ #CWARNOPTS= DEFINCDIRS= $(SRCROOT)/include +DEFOSINCDIRS= #LDPATH= -L/opt/schily/lib LDPATH= #RUNPATH= -R$(INS_BASE)/lib -R/opt/schily/lib -R$(OLIBSDIR) @@ -41,8 +42,10 @@ ########################################################################### #INS_BASE= /opt/schily #INS_KBASE= / +#INS_RBASE= / INS_BASE= /tmp/schily INS_KBASE= /tmp/schily/root +INS_RBASE= /tmp/schily/root # DEFUMASK= 002 # @@ -60,8 +63,13 @@ _PLATFORM= cygwin VC=7 +_VCNAME= $(_UNIQ)$(XMAKEPROG) +__VCNAME= $(_VCNAME:$(_UNIQ)=dummy) +___VCNAME= $(__VCNAME:$(_UNIQ)smake=vc$(VC)$(_PLATFORM:%=-%)) +VCNAME= $(___VCNAME:$(_UNIQ)%=dummy) + _VC_SETUP= $(_UNIQ)$(VC_SETUP) -__VC_SETUP= $(_VC_SETUP:$(_UNIQ)=vc$(VC)$(_PLATFORM:%=-%)-setup) +__VC_SETUP= $(_VC_SETUP:$(_UNIQ)=$(VCNAME)-setup) VCSETUP= $(__VC_SETUP:$(_UNIQ)%=%) ########################################################################### diff -Nru cdrtools-2.01.01a33/DEFAULTS_ENG/Defaults.cygwin32_wow cdrtools-3.02a09/DEFAULTS_ENG/Defaults.cygwin32_wow --- cdrtools-2.01.01a33/DEFAULTS_ENG/Defaults.cygwin32_wow 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/DEFAULTS_ENG/Defaults.cygwin32_wow 2017-07-09 08:18:50.000000000 +0000 @@ -0,0 +1,80 @@ +#ident "@(#)Defaults.cygwin32_wow 1.2 17/07/09 " +########################################################################### +# +# global definitions for Cygnus GCC for WINNT Systems +# +########################################################################### +# +# Compiler stuff +# +########################################################################### +#DEFCCOM= cc +DEFCCOM= gcc + +########################################################################### +# +# Link mode for libraries that are part of the makefile system: +# If DEFLINKMODE is set to "static", no dynamic linking will be used +# If DEFLINKMODE is set to "dynamic", dynamic linking will be used +# +########################################################################### +DEFLINKMODE= static + +########################################################################### +# +# If the next line is commented out, compilation is done with max warn level +# If the next line is uncommented, compilation is done with minimal warnings +# +########################################################################### +#CWARNOPTS= + +DEFINCDIRS= $(SRCROOT)/include +DEFOSINCDIRS= +#LDPATH= -L/opt/schily/lib +LDPATH= +#RUNPATH= -R$(INS_BASE)/lib -R/opt/schily/lib -R$(OLIBSDIR) +RUNPATH= + +########################################################################### +# +# Installation config stuff +# +########################################################################### +#INS_BASE= /opt/schily +#INS_KBASE= / +#INS_RBASE= / +INS_BASE= /tmp/schily +INS_KBASE= /tmp/schily/root +INS_RBASE= /tmp/schily/root +# +DEFUMASK= 002 +# +DEFINSMODEF= 444 +DEFINSMODEX= 755 +DEFINSUSR= root +DEFINSGRP= root + +# +# This is not the correct place for doing this, +# the correct place is RULES/cc-msc.rul. +# We do it here because otherwise cc-config would not work. +# This kind of hack may not work for other platforms. +# +_PLATFORM= cygwin +VC=7 + +_VCNAME= $(_UNIQ)$(XMAKEPROG) +__VCNAME= $(_VCNAME:$(_UNIQ)=dummy) +___VCNAME= $(__VCNAME:$(_UNIQ)smake=vc$(VC)$(_PLATFORM:%=-%)) +VCNAME= $(___VCNAME:$(_UNIQ)%=dummy) + +_VC_SETUP= $(_UNIQ)$(VC_SETUP) +__VC_SETUP= $(_VC_SETUP:$(_UNIQ)=$(VCNAME)-setup) +VCSETUP= $(__VC_SETUP:$(_UNIQ)%=%) + +########################################################################### +# IMPORTANT Note: +# We also include $(DEFLTSROOT)/$(DEFLTSDIR)/$(VCSETUP) from RULES/cc-msc.rul +# in order to be able to test for the existence of "cl.exe" early. +########################################################################### +include $(DEFLTSROOT)/$(DEFLTSDIR)/$(VCSETUP) diff -Nru cdrtools-2.01.01a33/DEFAULTS_ENG/Defaults.cygwin32_wow64 cdrtools-3.02a09/DEFAULTS_ENG/Defaults.cygwin32_wow64 --- cdrtools-2.01.01a33/DEFAULTS_ENG/Defaults.cygwin32_wow64 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/DEFAULTS_ENG/Defaults.cygwin32_wow64 2017-07-09 08:18:50.000000000 +0000 @@ -0,0 +1,80 @@ +#ident "@(#)Defaults.cygwin32_wow64 1.7 17/07/09 " +########################################################################### +# +# global definitions for Cygnus GCC for WINNT Systems +# +########################################################################### +# +# Compiler stuff +# +########################################################################### +#DEFCCOM= cc +DEFCCOM= gcc + +########################################################################### +# +# Link mode for libraries that are part of the makefile system: +# If DEFLINKMODE is set to "static", no dynamic linking will be used +# If DEFLINKMODE is set to "dynamic", dynamic linking will be used +# +########################################################################### +DEFLINKMODE= static + +########################################################################### +# +# If the next line is commented out, compilation is done with max warn level +# If the next line is uncommented, compilation is done with minimal warnings +# +########################################################################### +#CWARNOPTS= + +DEFINCDIRS= $(SRCROOT)/include +DEFOSINCDIRS= +#LDPATH= -L/opt/schily/lib +LDPATH= +#RUNPATH= -R$(INS_BASE)/lib -R/opt/schily/lib -R$(OLIBSDIR) +RUNPATH= + +########################################################################### +# +# Installation config stuff +# +########################################################################### +#INS_BASE= /opt/schily +#INS_KBASE= / +#INS_RBASE= / +INS_BASE= /tmp/schily +INS_KBASE= /tmp/schily/root +INS_RBASE= /tmp/schily/root +# +DEFUMASK= 002 +# +DEFINSMODEF= 444 +DEFINSMODEX= 755 +DEFINSUSR= root +DEFINSGRP= root + +# +# This is not the correct place for doing this, +# the correct place is RULES/cc-msc.rul. +# We do it here because otherwise cc-config would not work. +# This kind of hack may not work for other platforms. +# +_PLATFORM= cygwin +VC=7 + +_VCNAME= $(_UNIQ)$(XMAKEPROG) +__VCNAME= $(_VCNAME:$(_UNIQ)=dummy) +___VCNAME= $(__VCNAME:$(_UNIQ)smake=vc$(VC)$(_PLATFORM:%=-%)) +VCNAME= $(___VCNAME:$(_UNIQ)%=dummy) + +_VC_SETUP= $(_UNIQ)$(VC_SETUP) +__VC_SETUP= $(_VC_SETUP:$(_UNIQ)=$(VCNAME)-setup) +VCSETUP= $(__VC_SETUP:$(_UNIQ)%=%) + +########################################################################### +# IMPORTANT Note: +# We also include $(DEFLTSROOT)/$(DEFLTSDIR)/$(VCSETUP) from RULES/cc-msc.rul +# in order to be able to test for the existence of "cl.exe" early. +########################################################################### +include $(DEFLTSROOT)/$(DEFLTSDIR)/$(VCSETUP) diff -Nru cdrtools-2.01.01a33/DEFAULTS_ENG/Defaults.darwin cdrtools-3.02a09/DEFAULTS_ENG/Defaults.darwin --- cdrtools-2.01.01a33/DEFAULTS_ENG/Defaults.darwin 2007-05-08 14:38:21.000000000 +0000 +++ cdrtools-3.02a09/DEFAULTS_ENG/Defaults.darwin 2013-11-04 20:58:21.000000000 +0000 @@ -1,4 +1,4 @@ -#ident "@(#)Defaults.darwin 1.2 07/05/08 " +#ident "@(#)Defaults.darwin 1.4 13/11/04 " ########################################################################### # # global definitions for Mac OS X Darwin Systems @@ -29,7 +29,9 @@ #CWARNOPTS= DEFINCDIRS= $(SRCROOT)/include +DEFOSINCDIRS= /usr/local/include LDPATH= #-L/opt/schily/lib +LDPATH= -L/usr/local/lib #RUNPATH= -R$(INS_BASE)/lib -R/opt/schily/lib -R$(OLIBSDIR) Will probably not work ########################################################################### @@ -39,8 +41,10 @@ ########################################################################### #INS_BASE= /opt/schily #INS_KBASE= / +#INS_RBASE= / INS_BASE= /tmp/schily INS_KBASE= /tmp/schily/root +INS_RBASE= /tmp/schily/root # DEFUMASK= 002 # diff -Nru cdrtools-2.01.01a33/DEFAULTS_ENG/Defaults.dgux cdrtools-3.02a09/DEFAULTS_ENG/Defaults.dgux --- cdrtools-2.01.01a33/DEFAULTS_ENG/Defaults.dgux 2007-05-08 14:38:21.000000000 +0000 +++ cdrtools-3.02a09/DEFAULTS_ENG/Defaults.dgux 2013-11-04 20:58:21.000000000 +0000 @@ -1,4 +1,4 @@ -#ident "@(#)Defaults.dgux 1.2 07/05/08 " +#ident "@(#)Defaults.dgux 1.6 13/11/04 " ########################################################################### # # global definitions for Data General DGUX Systems @@ -29,8 +29,10 @@ #CWARNOPTS= DEFINCDIRS= $(SRCROOT)/include +DEFOSINCDIRS= LDPATH= -L/opt/schily/lib -RUNPATH= -R$(INS_BASE)/lib -R/opt/schily/lib -R$(OLIBSDIR) +#RUNPATH= -R$(INS_BASE)/lib -R/opt/schily/lib -R$(OLIBSDIR) +RUNPATH= -R$(INS_BASE)/lib -R/opt/schily/lib ########################################################################### # @@ -39,12 +41,14 @@ ########################################################################### #INS_BASE= /opt/schily #INS_KBASE= / +#INS_RBASE= / INS_BASE= /tmp/schily INS_KBASE= /tmp/schily/root +INS_RBASE= /tmp/schily/root # DEFUMASK= 002 # DEFINSMODEF= 444 DEFINSMODEX= 755 -DEFINSUSR= bin +DEFINSUSR= root DEFINSGRP= bin diff -Nru cdrtools-2.01.01a33/DEFAULTS_ENG/Defaults.dgux3 cdrtools-3.02a09/DEFAULTS_ENG/Defaults.dgux3 --- cdrtools-2.01.01a33/DEFAULTS_ENG/Defaults.dgux3 2007-05-08 14:38:21.000000000 +0000 +++ cdrtools-3.02a09/DEFAULTS_ENG/Defaults.dgux3 2013-11-04 20:58:21.000000000 +0000 @@ -1,4 +1,4 @@ -#ident "@(#)Defaults.dgux 1.2 07/05/08 " +#ident "@(#)Defaults.dgux3 1.6 13/11/04 " ########################################################################### # # global definitions for Data General DGUX Systems @@ -29,8 +29,10 @@ #CWARNOPTS= DEFINCDIRS= $(SRCROOT)/include +DEFOSINCDIRS= LDPATH= -L/opt/schily/lib -RUNPATH= -R$(INS_BASE)/lib -R/opt/schily/lib -R$(OLIBSDIR) +#RUNPATH= -R$(INS_BASE)/lib -R/opt/schily/lib -R$(OLIBSDIR) +RUNPATH= -R$(INS_BASE)/lib -R/opt/schily/lib ########################################################################### # @@ -39,12 +41,14 @@ ########################################################################### #INS_BASE= /opt/schily #INS_KBASE= / +#INS_RBASE= / INS_BASE= /tmp/schily INS_KBASE= /tmp/schily/root +INS_RBASE= /tmp/schily/root # DEFUMASK= 002 # DEFINSMODEF= 444 DEFINSMODEX= 755 -DEFINSUSR= bin +DEFINSUSR= root DEFINSGRP= bin diff -Nru cdrtools-2.01.01a33/DEFAULTS_ENG/Defaults.dgux4 cdrtools-3.02a09/DEFAULTS_ENG/Defaults.dgux4 --- cdrtools-2.01.01a33/DEFAULTS_ENG/Defaults.dgux4 2007-05-08 14:38:21.000000000 +0000 +++ cdrtools-3.02a09/DEFAULTS_ENG/Defaults.dgux4 2013-11-04 20:58:21.000000000 +0000 @@ -1,4 +1,4 @@ -#ident "@(#)Defaults.dgux 1.2 07/05/08 " +#ident "@(#)Defaults.dgux4 1.6 13/11/04 " ########################################################################### # # global definitions for Data General DGUX Systems @@ -29,8 +29,10 @@ #CWARNOPTS= DEFINCDIRS= $(SRCROOT)/include +DEFOSINCDIRS= LDPATH= -L/opt/schily/lib -RUNPATH= -R$(INS_BASE)/lib -R/opt/schily/lib -R$(OLIBSDIR) +#RUNPATH= -R$(INS_BASE)/lib -R/opt/schily/lib -R$(OLIBSDIR) +RUNPATH= -R$(INS_BASE)/lib -R/opt/schily/lib ########################################################################### # @@ -39,12 +41,14 @@ ########################################################################### #INS_BASE= /opt/schily #INS_KBASE= / +#INS_RBASE= / INS_BASE= /tmp/schily INS_KBASE= /tmp/schily/root +INS_RBASE= /tmp/schily/root # DEFUMASK= 002 # DEFINSMODEF= 444 DEFINSMODEX= 755 -DEFINSUSR= bin +DEFINSUSR= root DEFINSGRP= bin diff -Nru cdrtools-2.01.01a33/DEFAULTS_ENG/Defaults.domainos cdrtools-3.02a09/DEFAULTS_ENG/Defaults.domainos --- cdrtools-2.01.01a33/DEFAULTS_ENG/Defaults.domainos 2007-05-08 14:38:21.000000000 +0000 +++ cdrtools-3.02a09/DEFAULTS_ENG/Defaults.domainos 2013-11-04 20:58:21.000000000 +0000 @@ -1,4 +1,4 @@ -#ident "@(#)Defaults.domainos 1.2 07/05/08 " +#ident "@(#)Defaults.domainos 1.6 13/11/04 " ########################################################################### # # global definitions for Apollo Domain/OS Systems @@ -29,8 +29,10 @@ #CWARNOPTS= DEFINCDIRS= $(SRCROOT)/include +DEFOSINCDIRS= LDPATH= -L/opt/schily/lib -RUNPATH= -R$(INS_BASE)/lib -R/opt/schily/lib -R$(OLIBSDIR) +#RUNPATH= -R$(INS_BASE)/lib -R/opt/schily/lib -R$(OLIBSDIR) +RUNPATH= -R$(INS_BASE)/lib -R/opt/schily/lib ########################################################################### # @@ -39,12 +41,14 @@ ########################################################################### #INS_BASE= /opt/schily #INS_KBASE= / +#INS_RBASE= / INS_BASE= /tmp/schily INS_KBASE= /tmp/schily/root +INS_RBASE= /tmp/schily/root # DEFUMASK= 002 # DEFINSMODEF= 444 DEFINSMODEX= 755 -DEFINSUSR= bin +DEFINSUSR= root DEFINSGRP= bin diff -Nru cdrtools-2.01.01a33/DEFAULTS_ENG/Defaults.dragonfly cdrtools-3.02a09/DEFAULTS_ENG/Defaults.dragonfly --- cdrtools-2.01.01a33/DEFAULTS_ENG/Defaults.dragonfly 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/DEFAULTS_ENG/Defaults.dragonfly 2013-11-04 20:58:21.000000000 +0000 @@ -0,0 +1,53 @@ +#ident "@(#)Defaults.dragonfly 1.6 13/11/04 " +########################################################################### +# +# global definitions for FreeBSD Systems +# +########################################################################### +# +# Compiler stuff +# +########################################################################### +DEFCCOM= cc +#DEFCCOM= gcc + +########################################################################### +# +# Link mode for libraries that are part of the makefile system: +# If DEFLINKMODE is set to "static", no dynamic linking will be used +# If DEFLINKMODE is set to "dynamic", dynamic linking will be used +# +########################################################################### +DEFLINKMODE= static + +########################################################################### +# +# If the next line is commented out, compilation is done with max warn level +# If the next line is uncommented, compilation is done with minimal warnings +# +########################################################################### +#CWARNOPTS= + +DEFINCDIRS= $(SRCROOT)/include +DEFOSINCDIRS= /usr/local/include +LDPATH= -L/opt/schily/lib -L/usr/local/lib +#RUNPATH= -R$(INS_BASE)/lib -R/opt/schily/lib -R$(OLIBSDIR) Will probably not work + +########################################################################### +# +# Installation config stuff +# +########################################################################### +#INS_BASE= /opt/schily +#INS_KBASE= / +#INS_RBASE= / +INS_BASE= /tmp/schily +INS_KBASE= /tmp/schily/root +INS_RBASE= /tmp/schily/root +# +DEFUMASK= 002 +# +DEFINSMODEF= 444 +DEFINSMODEX= 755 +DEFINSUSR= root +DEFINSGRP= bin diff -Nru cdrtools-2.01.01a33/DEFAULTS_ENG/Defaults.freebsd cdrtools-3.02a09/DEFAULTS_ENG/Defaults.freebsd --- cdrtools-2.01.01a33/DEFAULTS_ENG/Defaults.freebsd 2007-05-13 19:04:22.000000000 +0000 +++ cdrtools-3.02a09/DEFAULTS_ENG/Defaults.freebsd 2013-11-04 20:58:21.000000000 +0000 @@ -1,4 +1,4 @@ -#ident "@(#)Defaults.freebsd 1.3 07/05/13 " +#ident "@(#)Defaults.freebsd 1.6 13/11/04 " ########################################################################### # # global definitions for FreeBSD Systems @@ -28,7 +28,8 @@ ########################################################################### #CWARNOPTS= -DEFINCDIRS= $(SRCROOT)/include /usr/local/include +DEFINCDIRS= $(SRCROOT)/include +DEFOSINCDIRS= /usr/local/include LDPATH= -L/opt/schily/lib -L/usr/local/lib #RUNPATH= -R$(INS_BASE)/lib -R/opt/schily/lib -R$(OLIBSDIR) Will probably not work @@ -39,12 +40,14 @@ ########################################################################### #INS_BASE= /opt/schily #INS_KBASE= / +#INS_RBASE= / INS_BASE= /tmp/schily INS_KBASE= /tmp/schily/root +INS_RBASE= /tmp/schily/root # DEFUMASK= 002 # DEFINSMODEF= 444 DEFINSMODEX= 755 -DEFINSUSR= bin +DEFINSUSR= root DEFINSGRP= bin diff -Nru cdrtools-2.01.01a33/DEFAULTS_ENG/Defaults.freemint cdrtools-3.02a09/DEFAULTS_ENG/Defaults.freemint --- cdrtools-2.01.01a33/DEFAULTS_ENG/Defaults.freemint 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/DEFAULTS_ENG/Defaults.freemint 2013-11-04 20:58:21.000000000 +0000 @@ -0,0 +1,53 @@ +#ident @(#)Defaults.freemint 1.4 13/11/04 +########################################################################### +# +# global definitions for FreeMiNT on ATARI computers +# +########################################################################### +# +# Compiler stuff +# +########################################################################### +#DEFCCOM= cc +DEFCCOM= gcc + +########################################################################### +# +# Link mode for libraries that are part of the makefile system: +# If DEFLINKMODE is set to "static", no dynamic linking will be used +# If DEFLINKMODE is set to "dynamic", dynamic linking will be used +# +########################################################################### +DEFLINKMODE= static + +########################################################################### +# +# If the next line is commented out, compilation is done with max warn level +# If the next line is uncommented, compilation is done with minimal warnings +# +########################################################################### +#CWARNOPTS= + +DEFINCDIRS= $(SRCROOT)/include +DEFOSINCDIRS= +#LDPATH= -L/opt/schily/lib +#RUNPATH= -R$(INS_BASE)/lib -R/opt/schily/lib -R$(OLIBSDIR) Will probably not work + +########################################################################### +# +# Installation config stuff +# +########################################################################### +#INS_BASE= /opt/schily +#INS_KBASE= / +#INS_RBASE= / +INS_BASE= /tmp/schily +INS_KBASE= /tmp/schily/root +INS_RBASE= /tmp/schily/root +# +DEFUMASK= 002 +# +DEFINSMODEF= 444 +DEFINSMODEX= 755 +DEFINSUSR= root +DEFINSGRP= bin diff -Nru cdrtools-2.01.01a33/DEFAULTS_ENG/Defaults.gnu cdrtools-3.02a09/DEFAULTS_ENG/Defaults.gnu --- cdrtools-2.01.01a33/DEFAULTS_ENG/Defaults.gnu 2007-05-08 14:38:21.000000000 +0000 +++ cdrtools-3.02a09/DEFAULTS_ENG/Defaults.gnu 2013-11-04 20:58:21.000000000 +0000 @@ -1,4 +1,4 @@ -#ident "@(#)Defaults.gnu 1.2 07/05/08 " +#ident "@(#)Defaults.gnu 1.6 13/11/04 " ########################################################################### # # global definitions for GNU (hurd) Systems @@ -28,9 +28,11 @@ ########################################################################### #CWARNOPTS= -DEFINCDIRS= $(SRCROOT)/include /usr/src/linux/include +DEFINCDIRS= $(SRCROOT)/include +DEFOSINCDIRS= /usr/src/linux/include LDPATH= -L/opt/schily/lib -RUNPATH= -R$(INS_BASE)/lib -R/opt/schily/lib -R$(OLIBSDIR) +#RUNPATH= -R$(INS_BASE)/lib -R/opt/schily/lib -R$(OLIBSDIR) +RUNPATH= -R$(INS_BASE)/lib -R/opt/schily/lib ########################################################################### # @@ -39,12 +41,14 @@ ########################################################################### #INS_BASE= /opt/schily #INS_KBASE= / +#INS_RBASE= / INS_BASE= /tmp/schily INS_KBASE= /tmp/schily/root +INS_RBASE= /tmp/schily/root # DEFUMASK= 002 # DEFINSMODEF= 444 DEFINSMODEX= 755 -DEFINSUSR= bin +DEFINSUSR= root DEFINSGRP= bin diff -Nru cdrtools-2.01.01a33/DEFAULTS_ENG/Defaults.gnu-kfreebsd cdrtools-3.02a09/DEFAULTS_ENG/Defaults.gnu-kfreebsd --- cdrtools-2.01.01a33/DEFAULTS_ENG/Defaults.gnu-kfreebsd 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/DEFAULTS_ENG/Defaults.gnu-kfreebsd 2013-11-04 20:58:21.000000000 +0000 @@ -0,0 +1,72 @@ +#ident "@(#)Defaults.gnu-kfreebsd 1.2 13/11/04 " +########################################################################### +# +# global definitions for Linux kfreebsd Systems +# +########################################################################### +# +# Compiler stuff +# +########################################################################### +DEFCCOM= cc +#DEFCCOM= gcc + +########################################################################### +# +# Link mode for libraries that are part of the makefile system: +# If DEFLINKMODE is set to "static", no dynamic linking will be used +# If DEFLINKMODE is set to "dynamic", dynamic linking will be used +# +########################################################################### +DEFLINKMODE= static + +########################################################################### +# +# If the next line is commented out, compilation is done with max warn level +# If the next line is uncommented, compilation is done with minimal warnings +# +########################################################################### +#CWARNOPTS= + +########################################################################### +# +# LINUX_SRC_INCLUDE is used in RULES/*-linux-*cc*.rul +# +########################################################################### +LINUX_INCL_PATH= /usr/src/linux/include + +_LINUX_SRC_INCLUDE= $(_UNIQ)$(MAY_LINUX_SRC_INCLUDE) +__LINUX_SRC_INCLUDE= $(_LINUX_SRC_INCLUDE:$(_UNIQ)=$(LINUX_INCL_PATH)) +LINUX_SRC_INCLUDE= $(__LINUX_SRC_INCLUDE:$(_UNIQ)no%=%) + +DEFINCDIRS= $(SRCROOT)/include +DEFOSINCDIRS= +LDPATH= -L/opt/schily/lib +#RUNPATH= -R$(INS_BASE)/lib -R/opt/schily/lib -R$(OLIBSDIR) +RUNPATH= -R$(INS_BASE)/lib -R/opt/schily/lib + +########################################################################### +# +# Unhide POSIX extensions from /usr/include/ +# +########################################################################### +OSDEFS += -D_GNU_SOURCE + +########################################################################### +# +# Installation config stuff +# +########################################################################### +#INS_BASE= /opt/schily +#INS_KBASE= / +#INS_RBASE= / +INS_BASE= /tmp/schily +INS_KBASE= /tmp/schily/root +INS_RBASE= /tmp/schily/root +# +DEFUMASK= 002 +# +DEFINSMODEF= 444 +DEFINSMODEX= 755 +DEFINSUSR= root +DEFINSGRP= bin diff -Nru cdrtools-2.01.01a33/DEFAULTS_ENG/Defaults.haiku cdrtools-3.02a09/DEFAULTS_ENG/Defaults.haiku --- cdrtools-2.01.01a33/DEFAULTS_ENG/Defaults.haiku 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/DEFAULTS_ENG/Defaults.haiku 2013-11-04 20:58:21.000000000 +0000 @@ -0,0 +1,54 @@ +#ident "@(#)Defaults.haiku 1.3 13/11/04 " +########################################################################### +# +# global definitions for Haiku Systems +# +########################################################################### +# +# Compiler stuff +# +########################################################################### +#DEFCCOM= cc +DEFCCOM= gcc + +########################################################################### +# +# Link mode for libraries that are part of the makefile system: +# If DEFLINKMODE is set to "static", no dynamic linking will be used +# If DEFLINKMODE is set to "dynamic", dynamic linking will be used +# +########################################################################### +DEFLINKMODE= static + +########################################################################### +# +# If the next line is commented out, compilation is done with max warn level +# If the next line is uncommented, compilation is done with minimal warnings +# +########################################################################### +#CWARNOPTS= + +DEFINCDIRS= $(SRCROOT)/include +DEFOSINCDIRS= +LDPATH= -L/opt/schily/lib +#RUNPATH= -R$(INS_BASE)/lib -R/opt/schily/lib -R$(OLIBSDIR) +RUNPATH= -R$(INS_BASE)/lib -R/opt/schily/lib + +########################################################################### +# +# Installation config stuff +# +########################################################################### +#INS_BASE= /opt/schily +#INS_KBASE= / +#INS_RBASE= / +INS_BASE= /tmp/schily +INS_KBASE= /tmp/schily/root +INS_RBASE= /tmp/schily/root +# +DEFUMASK= 002 +# +DEFINSMODEF= 444 +DEFINSMODEX= 755 +DEFINSUSR= root +DEFINSGRP= bin diff -Nru cdrtools-2.01.01a33/DEFAULTS_ENG/Defaults.hp-ux cdrtools-3.02a09/DEFAULTS_ENG/Defaults.hp-ux --- cdrtools-2.01.01a33/DEFAULTS_ENG/Defaults.hp-ux 2007-05-08 14:38:21.000000000 +0000 +++ cdrtools-3.02a09/DEFAULTS_ENG/Defaults.hp-ux 2013-11-04 20:58:22.000000000 +0000 @@ -1,4 +1,4 @@ -#ident "@(#)Defaults.hp-ux 1.2 07/05/08 " +#ident "@(#)Defaults.hp-ux 1.6 13/11/04 " ########################################################################### # # global definitions for HP/UX Systems @@ -29,8 +29,10 @@ #CWARNOPTS= DEFINCDIRS= $(SRCROOT)/include +DEFOSINCDIRS= LDPATH= -L/opt/schily/lib -RUNPATH= -R$(INS_BASE)/lib -R/opt/schily/lib -R$(OLIBSDIR) +#RUNPATH= -R$(INS_BASE)/lib -R/opt/schily/lib -R$(OLIBSDIR) +RUNPATH= -R$(INS_BASE)/lib -R/opt/schily/lib ########################################################################### # @@ -39,12 +41,14 @@ ########################################################################### #INS_BASE= /opt/schily #INS_KBASE= / +#INS_RBASE= / INS_BASE= /tmp/schily INS_KBASE= /tmp/schily/root +INS_RBASE= /tmp/schily/root # DEFUMASK= 002 # DEFINSMODEF= 444 DEFINSMODEX= 755 -DEFINSUSR= bin +DEFINSUSR= root DEFINSGRP= bin diff -Nru cdrtools-2.01.01a33/DEFAULTS_ENG/Defaults.interix cdrtools-3.02a09/DEFAULTS_ENG/Defaults.interix --- cdrtools-2.01.01a33/DEFAULTS_ENG/Defaults.interix 2007-05-03 12:57:05.000000000 +0000 +++ cdrtools-3.02a09/DEFAULTS_ENG/Defaults.interix 2013-11-04 20:58:22.000000000 +0000 @@ -1,4 +1,4 @@ -#ident "@(#)Defaults.interix 1.3 07/05/03 " +#ident "@(#)Defaults.interix 1.7 13/11/04 " ########################################################################### # # global definitions for Interix Systems (WIN-NT with SFU) using CC=gcc @@ -39,8 +39,10 @@ #CWARNOPTS= DEFINCDIRS= $(SRCROOT)/include +DEFOSINCDIRS= LDPATH= -L/opt/schily/lib -RUNPATH= --rpath $(INS_BASE)/lib --rpath /opt/schily/lib --rpath $(OLIBSDIR) +#RUNPATH= --rpath $(INS_BASE)/lib --rpath /opt/schily/lib --rpath $(OLIBSDIR) +RUNPATH= --rpath $(INS_BASE)/lib --rpath /opt/schily/lib ########################################################################### # @@ -49,14 +51,16 @@ ########################################################################### #INS_BASE= /opt/schily #INS_KBASE= / +#INS_RBASE= / INS_BASE= /tmp/schily INS_KBASE= /tmp/schily/root +INS_RBASE= /tmp/schily/root # DEFUMASK= 002 # DEFINSMODEF= 444 DEFINSMODEX= 755 -DEFINSUSR= bin +DEFINSUSR= root DEFINSGRP= bin # diff -Nru cdrtools-2.01.01a33/DEFAULTS_ENG/Defaults.irix cdrtools-3.02a09/DEFAULTS_ENG/Defaults.irix --- cdrtools-2.01.01a33/DEFAULTS_ENG/Defaults.irix 2007-05-08 14:38:21.000000000 +0000 +++ cdrtools-3.02a09/DEFAULTS_ENG/Defaults.irix 2013-11-04 20:58:22.000000000 +0000 @@ -1,4 +1,4 @@ -#ident "@(#)Defaults.irix 1.2 07/05/08 " +#ident "@(#)Defaults.irix 1.6 13/11/04 " ########################################################################### # # global definitions for Silicon Graphics Systems @@ -29,8 +29,10 @@ #CWARNOPTS= DEFINCDIRS= $(SRCROOT)/include +DEFOSINCDIRS= LDPATH= -L/opt/schily/lib -RUNPATH= -R$(INS_BASE)/lib -R/opt/schily/lib -R$(OLIBSDIR) +#RUNPATH= -R$(INS_BASE)/lib -R/opt/schily/lib -R$(OLIBSDIR) +RUNPATH= -R$(INS_BASE)/lib -R/opt/schily/lib ########################################################################### # @@ -39,12 +41,14 @@ ########################################################################### #INS_BASE= /opt/schily #INS_KBASE= / +#INS_RBASE= / INS_BASE= /tmp/schily INS_KBASE= /tmp/schily/root +INS_RBASE= /tmp/schily/root # DEFUMASK= 002 # DEFINSMODEF= 444 DEFINSMODEX= 755 -DEFINSUSR= bin +DEFINSUSR= root DEFINSGRP= bin diff -Nru cdrtools-2.01.01a33/DEFAULTS_ENG/Defaults.linux cdrtools-3.02a09/DEFAULTS_ENG/Defaults.linux --- cdrtools-2.01.01a33/DEFAULTS_ENG/Defaults.linux 2007-05-08 14:56:41.000000000 +0000 +++ cdrtools-3.02a09/DEFAULTS_ENG/Defaults.linux 2013-11-04 20:58:22.000000000 +0000 @@ -1,4 +1,4 @@ -#ident "@(#)Defaults.linux 1.3 07/05/08 " +#ident "@(#)Defaults.linux 1.8 13/11/04 " ########################################################################### # # global definitions for Linux Systems @@ -40,8 +40,17 @@ LINUX_SRC_INCLUDE= $(__LINUX_SRC_INCLUDE:$(_UNIQ)no%=%) DEFINCDIRS= $(SRCROOT)/include +DEFOSINCDIRS= LDPATH= -L/opt/schily/lib -RUNPATH= -R$(INS_BASE)/lib -R/opt/schily/lib -R$(OLIBSDIR) +#RUNPATH= -R$(INS_BASE)/lib -R/opt/schily/lib -R$(OLIBSDIR) +RUNPATH= -R$(INS_BASE)/lib -R/opt/schily/lib + +########################################################################### +# +# Unhide POSIX extensions from /usr/include/ +# +########################################################################### +OSDEFS += -D_GNU_SOURCE ########################################################################### # @@ -50,12 +59,14 @@ ########################################################################### #INS_BASE= /opt/schily #INS_KBASE= / +#INS_RBASE= / INS_BASE= /tmp/schily INS_KBASE= /tmp/schily/root +INS_RBASE= /tmp/schily/root # DEFUMASK= 002 # DEFINSMODEF= 444 DEFINSMODEX= 755 -DEFINSUSR= bin +DEFINSUSR= root DEFINSGRP= bin diff -Nru cdrtools-2.01.01a33/DEFAULTS_ENG/Defaults.mac-os10 cdrtools-3.02a09/DEFAULTS_ENG/Defaults.mac-os10 --- cdrtools-2.01.01a33/DEFAULTS_ENG/Defaults.mac-os10 2007-05-08 14:38:21.000000000 +0000 +++ cdrtools-3.02a09/DEFAULTS_ENG/Defaults.mac-os10 2013-11-04 20:58:22.000000000 +0000 @@ -1,4 +1,4 @@ -#ident "@(#)Defaults.mac-os10 1.2 07/05/08 " +#ident "@(#)Defaults.mac-os10 1.4 13/11/04 " ########################################################################### # # global definitions for Mac OS X Systems @@ -29,7 +29,9 @@ #CWARNOPTS= DEFINCDIRS= $(SRCROOT)/include +DEFOSINCDIRS= /usr/local/include LDPATH= #-L/opt/schily/lib +LDPATH= -L/usr/local/lib #RUNPATH= -R$(INS_BASE)/lib -R/opt/schily/lib -R$(OLIBSDIR) Will probably not work ########################################################################### @@ -39,8 +41,10 @@ ########################################################################### #INS_BASE= /opt/schily #INS_KBASE= / +#INS_RBASE= / INS_BASE= /tmp/schily INS_KBASE= /tmp/schily/root +INS_RBASE= /tmp/schily/root # DEFUMASK= 002 # diff -Nru cdrtools-2.01.01a33/DEFAULTS_ENG/Defaults.mingw32_nt cdrtools-3.02a09/DEFAULTS_ENG/Defaults.mingw32_nt --- cdrtools-2.01.01a33/DEFAULTS_ENG/Defaults.mingw32_nt 2007-05-08 14:38:21.000000000 +0000 +++ cdrtools-3.02a09/DEFAULTS_ENG/Defaults.mingw32_nt 2013-11-04 20:58:22.000000000 +0000 @@ -1,4 +1,4 @@ -#ident "@(#)Defaults.mingw32_nt 1.2 07/05/08 " +#ident "@(#)Defaults.mingw32_nt 1.5 13/11/04 " ########################################################################### # # global definitions for Win32/Mingw32 systems @@ -29,6 +29,7 @@ #CWARNOPTS= DEFINCDIRS= $(SRCROOT)/include +DEFOSINCDIRS= #LDPATH= -L/opt/schily/lib LDPATH= #RUNPATH= -R$(INS_BASE)/lib -R/opt/schily/lib -R$(OLIBSDIR) @@ -41,12 +42,14 @@ ########################################################################### #INS_BASE= /opt/schily #INS_KBASE= / +#INS_RBASE= / INS_BASE= /tmp/schily INS_KBASE= /tmp/schily/root +INS_RBASE= /tmp/schily/root # DEFUMASK= 002 # DEFINSMODEF= 444 DEFINSMODEX= 755 -DEFINSUSR= bin +DEFINSUSR= root DEFINSGRP= bin diff -Nru cdrtools-2.01.01a33/DEFAULTS_ENG/Defaults.minix cdrtools-3.02a09/DEFAULTS_ENG/Defaults.minix --- cdrtools-2.01.01a33/DEFAULTS_ENG/Defaults.minix 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/DEFAULTS_ENG/Defaults.minix 2015-11-08 15:22:01.000000000 +0000 @@ -0,0 +1,52 @@ +#ident "@(#)Defaults.minix 1.1 15/11/08 " +########################################################################### +# +# global definitions for Minix Systems +# +########################################################################### +# +# Compiler stuff +# +########################################################################### +DEFCCOM= clang + +########################################################################### +# +# Link mode for libraries that are part of the makefile system: +# If DEFLINKMODE is set to "static", no dynamic linking will be used +# If DEFLINKMODE is set to "dynamic", dynamic linking will be used +# +########################################################################### +DEFLINKMODE= static + +########################################################################### +# +# If the next line is commented out, compilation is done with max warn level +# If the next line is uncommented, compilation is done with minimal warnings +# +########################################################################### +#CWARNOPTS= + +DEFINCDIRS= $(SRCROOT)/include +DEFOSINCDIRS= +LDPATH= -L/opt/schily/lib +#RUNPATH= -R$(INS_BASE)/lib -R/opt/schily/lib -R$(OLIBSDIR) Will probably not work + +########################################################################### +# +# Installation config stuff +# +########################################################################### +#INS_BASE= /opt/schily +#INS_KBASE= / +#INS_RBASE= / +INS_BASE= /tmp/schily +INS_KBASE= /tmp/schily/root +INS_RBASE= /tmp/schily/root +# +DEFUMASK= 002 +# +DEFINSMODEF= 444 +DEFINSMODEX= 755 +DEFINSUSR= root +DEFINSGRP= bin diff -Nru cdrtools-2.01.01a33/DEFAULTS_ENG/Defaults.ms-dos cdrtools-3.02a09/DEFAULTS_ENG/Defaults.ms-dos --- cdrtools-2.01.01a33/DEFAULTS_ENG/Defaults.ms-dos 2007-05-08 14:38:21.000000000 +0000 +++ cdrtools-3.02a09/DEFAULTS_ENG/Defaults.ms-dos 2013-11-04 20:58:22.000000000 +0000 @@ -1,4 +1,4 @@ -#ident "@(#)Defaults.ms-dos 1.2 07/05/08 " +#ident "@(#)Defaults.ms-dos 1.6 13/11/04 " ########################################################################### # # global definitions for MSDOS/DJGPP v2 Systems using CC=gcc @@ -29,8 +29,10 @@ #CWARNOPTS= DEFINCDIRS= $(SRCROOT)/include +DEFOSINCDIRS= LDPATH= -L/opt/schily/lib -RUNPATH= -R$(INS_BASE)/lib -R/opt/schily/lib -R$(OLIBSDIR) +#RUNPATH= -R$(INS_BASE)/lib -R/opt/schily/lib -R$(OLIBSDIR) +RUNPATH= -R$(INS_BASE)/lib -R/opt/schily/lib ########################################################################### # @@ -39,12 +41,14 @@ ########################################################################### #INS_BASE= /opt/schily #INS_KBASE= / +#INS_RBASE= / INS_BASE= /tmp/schily INS_KBASE= /tmp/schily/root +INS_RBASE= /tmp/schily/root # DEFUMASK= 002 # DEFINSMODEF= 444 DEFINSMODEX= 755 -DEFINSUSR= bin +DEFINSUSR= root DEFINSGRP= bin diff -Nru cdrtools-2.01.01a33/DEFAULTS_ENG/Defaults.netbsd cdrtools-3.02a09/DEFAULTS_ENG/Defaults.netbsd --- cdrtools-2.01.01a33/DEFAULTS_ENG/Defaults.netbsd 2007-05-08 14:38:21.000000000 +0000 +++ cdrtools-3.02a09/DEFAULTS_ENG/Defaults.netbsd 2013-11-04 20:58:22.000000000 +0000 @@ -1,4 +1,4 @@ -#ident "@(#)Defaults.netbsd 1.2 07/05/08 " +#ident "@(#)Defaults.netbsd 1.5 13/11/04 " ########################################################################### # # global definitions for NetBSD Systems @@ -29,6 +29,7 @@ #CWARNOPTS= DEFINCDIRS= $(SRCROOT)/include +DEFOSINCDIRS= LDPATH= -L/opt/schily/lib #RUNPATH= -R$(INS_BASE)/lib -R/opt/schily/lib -R$(OLIBSDIR) Will probably not work @@ -39,12 +40,14 @@ ########################################################################### #INS_BASE= /opt/schily #INS_KBASE= / +#INS_RBASE= / INS_BASE= /tmp/schily INS_KBASE= /tmp/schily/root +INS_RBASE= /tmp/schily/root # DEFUMASK= 002 # DEFINSMODEF= 444 DEFINSMODEX= 755 -DEFINSUSR= bin +DEFINSUSR= root DEFINSGRP= bin diff -Nru cdrtools-2.01.01a33/DEFAULTS_ENG/Defaults.newsos6 cdrtools-3.02a09/DEFAULTS_ENG/Defaults.newsos6 --- cdrtools-2.01.01a33/DEFAULTS_ENG/Defaults.newsos6 2007-05-08 14:38:21.000000000 +0000 +++ cdrtools-3.02a09/DEFAULTS_ENG/Defaults.newsos6 2013-11-04 20:58:22.000000000 +0000 @@ -1,4 +1,4 @@ -#ident "@(#)Defaults.newsos6 1.2 07/05/08 " +#ident "@(#)Defaults.newsos6 1.6 13/11/04 " ########################################################################### # # global definitions for Sony NEWS-OS 6.x @@ -29,8 +29,10 @@ #CWARNOPTS= DEFINCDIRS= $(SRCROOT)/include +DEFOSINCDIRS= LDPATH= -L/opt/schily/lib -RUNPATH= -R$(INS_BASE)/lib -R/opt/schily/lib -R$(OLIBSDIR) +#RUNPATH= -R$(INS_BASE)/lib -R/opt/schily/lib -R$(OLIBSDIR) +RUNPATH= -R$(INS_BASE)/lib -R/opt/schily/lib ########################################################################### # @@ -39,12 +41,14 @@ ########################################################################### #INS_BASE= /opt/schily #INS_KBASE= / +#INS_RBASE= / INS_BASE= /tmp/schily INS_KBASE= /tmp/schily/root +INS_RBASE= /tmp/schily/root # DEFUMASK= 002 # DEFINSMODEF= 444 DEFINSMODEX= 755 -DEFINSUSR= bin +DEFINSUSR= root DEFINSGRP= bin diff -Nru cdrtools-2.01.01a33/DEFAULTS_ENG/Defaults.nextstep cdrtools-3.02a09/DEFAULTS_ENG/Defaults.nextstep --- cdrtools-2.01.01a33/DEFAULTS_ENG/Defaults.nextstep 2007-05-08 14:38:21.000000000 +0000 +++ cdrtools-3.02a09/DEFAULTS_ENG/Defaults.nextstep 2013-11-04 20:58:22.000000000 +0000 @@ -1,4 +1,4 @@ -#ident "@(#)Defaults.nextstep 1.2 07/05/08 " +#ident "@(#)Defaults.nextstep 1.5 13/11/04 " ########################################################################### # # global definitions for NeXT Step Systems @@ -29,6 +29,7 @@ #CWARNOPTS= DEFINCDIRS= $(SRCROOT)/include +DEFOSINCDIRS= LDPATH= -L/opt/schily/lib #RUNPATH= -R$(INS_BASE)/lib -R/opt/schily/lib -R$(OLIBSDIR) Will probably not work @@ -39,12 +40,14 @@ ########################################################################### #INS_BASE= /opt/schily #INS_KBASE= / +#INS_RBASE= / INS_BASE= /tmp/schily INS_KBASE= /tmp/schily/root +INS_RBASE= /tmp/schily/root # DEFUMASK= 002 # DEFINSMODEF= 444 DEFINSMODEX= 755 -DEFINSUSR= bin +DEFINSUSR= root DEFINSGRP= bin diff -Nru cdrtools-2.01.01a33/DEFAULTS_ENG/Defaults.openbsd cdrtools-3.02a09/DEFAULTS_ENG/Defaults.openbsd --- cdrtools-2.01.01a33/DEFAULTS_ENG/Defaults.openbsd 2007-05-08 14:38:21.000000000 +0000 +++ cdrtools-3.02a09/DEFAULTS_ENG/Defaults.openbsd 2013-11-04 20:58:22.000000000 +0000 @@ -1,4 +1,4 @@ -#ident "@(#)Defaults.openbsd 1.2 07/05/08 " +#ident "@(#)Defaults.openbsd 1.5 13/11/04 " ########################################################################### # # global definitions for OpenBSD Systems @@ -29,6 +29,7 @@ #CWARNOPTS= DEFINCDIRS= $(SRCROOT)/include +DEFOSINCDIRS= LDPATH= -L/opt/schily/lib #RUNPATH= -R$(INS_BASE)/lib -R/opt/schily/lib -R$(OLIBSDIR) Will probably not work @@ -39,12 +40,14 @@ ########################################################################### #INS_BASE= /opt/schily #INS_KBASE= / +#INS_RBASE= / INS_BASE= /tmp/schily INS_KBASE= /tmp/schily/root +INS_RBASE= /tmp/schily/root # DEFUMASK= 002 # DEFINSMODEF= 444 DEFINSMODEX= 755 -DEFINSUSR= bin +DEFINSUSR= root DEFINSGRP= bin diff -Nru cdrtools-2.01.01a33/DEFAULTS_ENG/Defaults.openserver cdrtools-3.02a09/DEFAULTS_ENG/Defaults.openserver --- cdrtools-2.01.01a33/DEFAULTS_ENG/Defaults.openserver 2007-05-08 14:35:36.000000000 +0000 +++ cdrtools-3.02a09/DEFAULTS_ENG/Defaults.openserver 2013-11-04 20:58:22.000000000 +0000 @@ -1,4 +1,4 @@ -#ident "@(#)Defaults.openserver 1.1 07/05/08 " +#ident "@(#)Defaults.openserver 1.4 13/11/04 " ########################################################################### # # global definitions for SCO OpenServer 5 Systems @@ -29,6 +29,7 @@ #CWARNOPTS= DEFINCDIRS= $(SRCROOT)/include +DEFOSINCDIRS= LDPATH= RUNPATH= @@ -39,12 +40,14 @@ ########################################################################### #INS_BASE= /usr/local #INS_KBASE= / +#INS_RBASE= / INS_BASE= /tmp/schily INS_KBASE= /tmp/schily/root +INS_RBASE= /tmp/schily/root # DEFUMASK= 002 # DEFINSMODEF= 444 DEFINSMODEX= 755 -DEFINSUSR= bin +DEFINSUSR= root DEFINSGRP= bin diff -Nru cdrtools-2.01.01a33/DEFAULTS_ENG/Defaults.openvms cdrtools-3.02a09/DEFAULTS_ENG/Defaults.openvms --- cdrtools-2.01.01a33/DEFAULTS_ENG/Defaults.openvms 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/DEFAULTS_ENG/Defaults.openvms 2013-11-04 20:58:22.000000000 +0000 @@ -0,0 +1,51 @@ +#ident "@(#)Defaults.openvms 1.2 13/11/04 " +########################################################################### +# +# global definitions for OpenVMS +# +########################################################################### +# +# Compiler stuff +# +########################################################################### +DEFCCOM= cc +#DEFCCOM= gcc + +########################################################################### +# +# Link mode for libraries that are part of the makefile system: +# If DEFLINKMODE is set to "static", no dynamic linking will be used +# If DEFLINKMODE is set to "dynamic", dynamic linking will be used +# +########################################################################### +DEFLINKMODE= static + +########################################################################### +# +# If the next line is commented out, compilation is done with max warn level +# If the next line is uncommented, compilation is done with minimal warnings +# +########################################################################### +#CWARNOPTS= + +DEFINCDIRS= $(SRCROOT)/include +DEFOSINCDIRS= +LDPATH= -L/opt/schily/lib +#RUNPATH= -R$(INS_BASE)/lib -R/opt/schily/lib -R$(OLIBSDIR) +RUNPATH= -R$(INS_BASE)/lib -R/opt/schily/lib + +########################################################################### +# +# Installation config stuff +# +########################################################################### +INS_BASE= /opt/schily +INS_KBASE= / +INS_RBASE= / +# +DEFUMASK= 002 +# +DEFINSMODEF= 444 +DEFINSMODEX= 755 +DEFINSUSR= root +DEFINSGRP= bin diff -Nru cdrtools-2.01.01a33/DEFAULTS_ENG/Defaults.os2 cdrtools-3.02a09/DEFAULTS_ENG/Defaults.os2 --- cdrtools-2.01.01a33/DEFAULTS_ENG/Defaults.os2 2007-05-08 14:38:21.000000000 +0000 +++ cdrtools-3.02a09/DEFAULTS_ENG/Defaults.os2 2013-11-04 20:58:22.000000000 +0000 @@ -1,4 +1,4 @@ -#ident "@(#)Defaults.os2 1.2 07/05/08 " +#ident "@(#)Defaults.os2 1.6 13/11/04 " ########################################################################### # # global definitions for OS/2 Systems @@ -29,8 +29,10 @@ #CWARNOPTS= DEFINCDIRS= $(SRCROOT)/include +DEFOSINCDIRS= LDPATH= -L/opt/schily/lib -RUNPATH= -R$(INS_BASE)/lib -R/opt/schily/lib -R$(OLIBSDIR) +#RUNPATH= -R$(INS_BASE)/lib -R/opt/schily/lib -R$(OLIBSDIR) +RUNPATH= -R$(INS_BASE)/lib -R/opt/schily/lib ########################################################################### # @@ -39,12 +41,14 @@ ########################################################################### #INS_BASE= /opt/schily #INS_KBASE= / +#INS_RBASE= / INS_BASE= /tmp/schily INS_KBASE= /tmp/schily/root +INS_RBASE= /tmp/schily/root # DEFUMASK= 002 # DEFINSMODEF= 444 DEFINSMODEX= 755 -DEFINSUSR= bin +DEFINSUSR= root DEFINSGRP= bin diff -Nru cdrtools-2.01.01a33/DEFAULTS_ENG/Defaults.osf1 cdrtools-3.02a09/DEFAULTS_ENG/Defaults.osf1 --- cdrtools-2.01.01a33/DEFAULTS_ENG/Defaults.osf1 2007-05-08 14:38:21.000000000 +0000 +++ cdrtools-3.02a09/DEFAULTS_ENG/Defaults.osf1 2013-11-04 20:58:22.000000000 +0000 @@ -1,4 +1,4 @@ -#ident "@(#)Defaults.osf1 1.2 07/05/08 " +#ident "@(#)Defaults.osf1 1.6 13/11/04 " ########################################################################### # # global definitions for Digital UNIX (OSF1) Systems @@ -29,8 +29,10 @@ #CWARNOPTS= DEFINCDIRS= $(SRCROOT)/include +DEFOSINCDIRS= LDPATH= -L/opt/schily/lib -RUNPATH= -R$(INS_BASE)/lib -R/opt/schily/lib -R$(OLIBSDIR) +#RUNPATH= -R$(INS_BASE)/lib -R/opt/schily/lib -R$(OLIBSDIR) +RUNPATH= -R$(INS_BASE)/lib -R/opt/schily/lib ########################################################################### # @@ -39,12 +41,14 @@ ########################################################################### #INS_BASE= /opt/schily #INS_KBASE= / +#INS_RBASE= / INS_BASE= /tmp/schily INS_KBASE= /tmp/schily/root +INS_RBASE= /tmp/schily/root # DEFUMASK= 002 # DEFINSMODEF= 444 DEFINSMODEX= 755 -DEFINSUSR= bin +DEFINSUSR= root DEFINSGRP= bin diff -Nru cdrtools-2.01.01a33/DEFAULTS_ENG/Defaults.pyro cdrtools-3.02a09/DEFAULTS_ENG/Defaults.pyro --- cdrtools-2.01.01a33/DEFAULTS_ENG/Defaults.pyro 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/DEFAULTS_ENG/Defaults.pyro 2013-11-04 20:58:22.000000000 +0000 @@ -0,0 +1,54 @@ +#ident "@(#)Defaults.pyro 1.2 13/11/04 " +########################################################################### +# +# global definitions for Pyro Systems +# +########################################################################### +# +# Compiler stuff +# +########################################################################### +#DEFCCOM= cc +DEFCCOM= gcc + +########################################################################### +# +# Link mode for libraries that are part of the makefile system: +# If DEFLINKMODE is set to "static", no dynamic linking will be used +# If DEFLINKMODE is set to "dynamic", dynamic linking will be used +# +########################################################################### +DEFLINKMODE= static + +########################################################################### +# +# If the next line is commented out, compilation is done with max warn level +# If the next line is uncommented, compilation is done with minimal warnings +# +########################################################################### +#CWARNOPTS= + +DEFINCDIRS= $(SRCROOT)/include +DEFOSINCDIRS= /boot/Include +LDPATH= -L/opt/schily/lib +#RUNPATH= -R$(INS_BASE)/lib -R/opt/schily/lib -R$(OLIBSDIR) +RUNPATH= -R$(INS_BASE)/lib -R/opt/schily/lib + +########################################################################### +# +# Installation config stuff +# +########################################################################### +#INS_BASE= /opt/schily +#INS_KBASE= / +#INS_RBASE= / +INS_BASE= /tmp/schily +INS_KBASE= /tmp/schily/admin +INS_RBASE= /tmp/schily/admin +# +DEFUMASK= 002 +# +DEFINSMODEF= 444 +DEFINSMODEX= 755 +DEFINSUSR= admin +DEFINSGRP= bin diff -Nru cdrtools-2.01.01a33/DEFAULTS_ENG/Defaults.qnx cdrtools-3.02a09/DEFAULTS_ENG/Defaults.qnx --- cdrtools-2.01.01a33/DEFAULTS_ENG/Defaults.qnx 2007-05-08 14:38:21.000000000 +0000 +++ cdrtools-3.02a09/DEFAULTS_ENG/Defaults.qnx 2013-11-04 20:58:22.000000000 +0000 @@ -1,4 +1,4 @@ -#ident "@(#)Defaults.qnx 1.2 07/05/08 " +#ident "@(#)Defaults.qnx 1.5 13/11/04 " ########################################################################### # # global definitions for QNX Systems @@ -32,6 +32,7 @@ #CWARNOPTS= DEFINCDIRS= $(SRCROOT)/include +DEFOSINCDIRS= LDPATH= -L/opt/schily/lib #RUNPATH= -R$(INS_BASE)/lib -R/opt/schily/lib -R$(OLIBSDIR) Will probably not work @@ -42,12 +43,14 @@ ########################################################################### #INS_BASE= /opt/schily #INS_KBASE= / +#INS_RBASE= / INS_BASE= /tmp/schily INS_KBASE= /tmp/schily/root +INS_RBASE= /tmp/schily/root # DEFUMASK= 002 # DEFINSMODEF= 444 DEFINSMODEX= 755 -DEFINSUSR= bin +DEFINSUSR= root DEFINSGRP= bin diff -Nru cdrtools-2.01.01a33/DEFAULTS_ENG/Defaults.rhapsody cdrtools-3.02a09/DEFAULTS_ENG/Defaults.rhapsody --- cdrtools-2.01.01a33/DEFAULTS_ENG/Defaults.rhapsody 2007-05-08 14:38:21.000000000 +0000 +++ cdrtools-3.02a09/DEFAULTS_ENG/Defaults.rhapsody 2013-11-04 20:58:22.000000000 +0000 @@ -1,4 +1,4 @@ -#ident "@(#)Defaults.rhapsody 1.2 07/05/08 " +#ident "@(#)Defaults.rhapsody 1.4 13/11/04 " ########################################################################### # # global definitions for NeXT Step (Apple Rhapsody) Systems @@ -29,7 +29,9 @@ #CWARNOPTS= DEFINCDIRS= $(SRCROOT)/include +DEFOSINCDIRS= /usr/local/include LDPATH= #-L/opt/schily/lib +LDPATH= -L/usr/local/lib #RUNPATH= -R$(INS_BASE)/lib -R/opt/schily/lib -R$(OLIBSDIR) Will probably not work ########################################################################### @@ -39,8 +41,10 @@ ########################################################################### #INS_BASE= /opt/schily #INS_KBASE= / +#INS_RBASE= / INS_BASE= /tmp/schily INS_KBASE= /tmp/schily/root +INS_RBASE= /tmp/schily/root # DEFUMASK= 002 # diff -Nru cdrtools-2.01.01a33/DEFAULTS_ENG/Defaults.sunos4 cdrtools-3.02a09/DEFAULTS_ENG/Defaults.sunos4 --- cdrtools-2.01.01a33/DEFAULTS_ENG/Defaults.sunos4 2007-05-08 14:38:21.000000000 +0000 +++ cdrtools-3.02a09/DEFAULTS_ENG/Defaults.sunos4 2013-11-04 20:58:22.000000000 +0000 @@ -1,4 +1,4 @@ -#ident "@(#)Defaults.sunos4 1.2 07/05/08 " +#ident "@(#)Defaults.sunos4 1.5 13/11/04 " ########################################################################### # # global definitions for SunOS Systems @@ -29,6 +29,7 @@ #CWARNOPTS= DEFINCDIRS= $(SRCROOT)/include +DEFOSINCDIRS= LDPATH= -L/opt/schily/lib #RUNPATH= -R$(INS_BASE)/lib -R/opt/schily/lib -R$(OLIBSDIR) Will not work on SunOS @@ -39,12 +40,14 @@ ########################################################################### #INS_BASE= /opt/schily #INS_KBASE= / +#INS_RBASE= / INS_BASE= /tmp/schily INS_KBASE= /tmp/schily/root +INS_RBASE= /tmp/schily/root # DEFUMASK= 002 # DEFINSMODEF= 444 DEFINSMODEX= 755 -DEFINSUSR= bin +DEFINSUSR= root DEFINSGRP= bin diff -Nru cdrtools-2.01.01a33/DEFAULTS_ENG/Defaults.sunos5 cdrtools-3.02a09/DEFAULTS_ENG/Defaults.sunos5 --- cdrtools-2.01.01a33/DEFAULTS_ENG/Defaults.sunos5 2007-05-08 14:38:21.000000000 +0000 +++ cdrtools-3.02a09/DEFAULTS_ENG/Defaults.sunos5 2013-11-04 20:58:22.000000000 +0000 @@ -1,4 +1,4 @@ -#ident "@(#)Defaults.sunos5 1.2 07/05/08 " +#ident "@(#)Defaults.sunos5 1.6 13/11/04 " ########################################################################### # # global definitions for Solaris Systems @@ -29,8 +29,10 @@ #CWARNOPTS= DEFINCDIRS= $(SRCROOT)/include +DEFOSINCDIRS= LDPATH= -L/opt/schily/lib -RUNPATH= -R$(INS_BASE)/lib -R/opt/schily/lib -R$(OLIBSDIR) +#RUNPATH= -R$(INS_BASE)/lib -R/opt/schily/lib -R$(OLIBSDIR) +RUNPATH= -R$(INS_BASE)/lib -R/opt/schily/lib ########################################################################### # @@ -39,12 +41,14 @@ ########################################################################### #INS_BASE= /opt/schily #INS_KBASE= / +#INS_RBASE= / INS_BASE= /tmp/schily INS_KBASE= /tmp/schily/root +INS_RBASE= /tmp/schily/root # DEFUMASK= 002 # DEFINSMODEF= 444 DEFINSMODEX= 755 -DEFINSUSR= bin +DEFINSUSR= root DEFINSGRP= bin diff -Nru cdrtools-2.01.01a33/DEFAULTS_ENG/Defaults.syllable cdrtools-3.02a09/DEFAULTS_ENG/Defaults.syllable --- cdrtools-2.01.01a33/DEFAULTS_ENG/Defaults.syllable 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/DEFAULTS_ENG/Defaults.syllable 2013-11-04 20:58:22.000000000 +0000 @@ -0,0 +1,54 @@ +#ident "@(#)Defaults.syllable 1.3 13/11/04 " +########################################################################### +# +# global definitions for Syllable Systems +# +########################################################################### +# +# Compiler stuff +# +########################################################################### +#DEFCCOM= cc +DEFCCOM= gcc + +########################################################################### +# +# Link mode for libraries that are part of the makefile system: +# If DEFLINKMODE is set to "static", no dynamic linking will be used +# If DEFLINKMODE is set to "dynamic", dynamic linking will be used +# +########################################################################### +DEFLINKMODE= static + +########################################################################### +# +# If the next line is commented out, compilation is done with max warn level +# If the next line is uncommented, compilation is done with minimal warnings +# +########################################################################### +#CWARNOPTS= + +DEFINCDIRS= $(SRCROOT)/include +DEFOSINCDIRS= /ainc +LDPATH= -L/opt/schily/lib +#RUNPATH= -R$(INS_BASE)/lib -R/opt/schily/lib -R$(OLIBSDIR) +RUNPATH= -R$(INS_BASE)/lib -R/opt/schily/lib + +########################################################################### +# +# Installation config stuff +# +########################################################################### +#INS_BASE= /opt/schily +#INS_KBASE= / +#INS_RBASE= / +INS_BASE= /tmp/schily +INS_KBASE= /tmp/schily/root +INS_RBASE= /tmp/schily/root +# +DEFUMASK= 002 +# +DEFINSMODEF= 444 +DEFINSMODEX= 755 +DEFINSUSR= root +DEFINSGRP= bin diff -Nru cdrtools-2.01.01a33/DEFAULTS_ENG/Defaults.unixware cdrtools-3.02a09/DEFAULTS_ENG/Defaults.unixware --- cdrtools-2.01.01a33/DEFAULTS_ENG/Defaults.unixware 2007-05-08 14:35:36.000000000 +0000 +++ cdrtools-3.02a09/DEFAULTS_ENG/Defaults.unixware 2013-11-04 20:58:22.000000000 +0000 @@ -1,4 +1,4 @@ -#ident "@(#)Defaults.unixware 1.1 07/05/08 " +#ident "@(#)Defaults.unixware 1.4 13/11/04 " ########################################################################### # # global definitions for SCO UnixWare Systems @@ -29,6 +29,7 @@ #CWARNOPTS= DEFINCDIRS= $(SRCROOT)/include +DEFOSINCDIRS= LDPATH= RUNPATH= @@ -39,12 +40,14 @@ ########################################################################### #INS_BASE= /usr/local #INS_KBASE= / +#INS_RBASE= / INS_BASE= /tmp/schily INS_KBASE= /tmp/schily/root +INS_RBASE= /tmp/schily/root # DEFUMASK= 002 # DEFINSMODEF= 444 DEFINSMODEX= 755 -DEFINSUSR= bin +DEFINSUSR= root DEFINSGRP= bin diff -Nru cdrtools-2.01.01a33/DEFAULTS_ENG/vc6-cygwin-setup cdrtools-3.02a09/DEFAULTS_ENG/vc6-cygwin-setup --- cdrtools-2.01.01a33/DEFAULTS_ENG/vc6-cygwin-setup 2007-04-20 12:49:37.000000000 +0000 +++ cdrtools-3.02a09/DEFAULTS_ENG/vc6-cygwin-setup 2009-05-16 15:01:59.000000000 +0000 @@ -1,4 +1,8 @@ -# @(#)vc6-cygwin-setup 1.3 07/01/26 Copyright 2006 J. Schilling +# @(#)vc6-cygwin-setup 1.4 09/05/16 Copyright 2006 J. Schilling + +# +# Keep in sync with vc6-setup as we cannot rely on hard links +# # # Disable warnings for nonportable variable assignements. diff -Nru cdrtools-2.01.01a33/DEFAULTS_ENG/vc6-setup cdrtools-3.02a09/DEFAULTS_ENG/vc6-setup --- cdrtools-2.01.01a33/DEFAULTS_ENG/vc6-setup 2007-01-26 13:27:18.000000000 +0000 +++ cdrtools-3.02a09/DEFAULTS_ENG/vc6-setup 2009-05-16 15:01:59.000000000 +0000 @@ -1,4 +1,8 @@ -# @(#)vc6-setup 1.3 07/01/26 Copyright 2006 J. Schilling +# @(#)vc6-setup 1.4 09/05/16 Copyright 2006 J. Schilling + +# +# Keep in sync with vc6-cygwin-setup as we cannot rely on hard links +# # # Disable warnings for nonportable variable assignements. diff -Nru cdrtools-2.01.01a33/DEFAULTS_ENG/vc7_64-cygwin-setup cdrtools-3.02a09/DEFAULTS_ENG/vc7_64-cygwin-setup --- cdrtools-2.01.01a33/DEFAULTS_ENG/vc7_64-cygwin-setup 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/DEFAULTS_ENG/vc7_64-cygwin-setup 2009-05-16 15:10:39.000000000 +0000 @@ -0,0 +1,45 @@ +# @(#)vc7_64-cygwin-setup 1.1 09/05/16 Copyright 2006 J. Schilling + +# +# Keep in sync with vc7_64-setup as we cannot rely on hard links +# + +# +# Disable warnings for nonportable variable assignements. +# We only use smake MS-WIN, so this is not a problem. +# +.NO_WARN: := + +# +# A German installation +# +#VSINSTALLDIR=C:\Programme\Microsoft Visual Studio 8 +#VSINS=/cygdrive/c/Programme/Microsoft Visual Studio 8 + +# +# An English installation on an English Windows XP 64 Bit host +# +VSINSTALLDIR=C:\Program Files (x86)\Microsoft Visual Studio 8 +VSINS=/cygdrive/c/Program Files (x86)/Microsoft Visual Studio 8 + +export VSINSTALLDIR + +VCINSTALLDIR :=${VSINSTALLDIR}\VC +export VCINSTALLDIR + +PATH :=${VSINS}/VC/BIN/amd64:${VSINS}/Common7/IDE:${PATH} +export PATH + +INCLUDE :=${VCINSTALLDIR}\INCLUDE;${VCINSTALLDIR}\PlatformSDK\INCLUDE;${INCLUDE} +export INCLUDE + +LIB :=${VCINSTALLDIR}\LIB\amd64;${VCINSTALLDIR}\PlatformSDK\LIB\amd64;${LIB} +export LIB + +VC_SETUP=dummy-setup +export VC_SETUP + +# +# Re-enable all warnings. +# +.NO_WARN: diff -Nru cdrtools-2.01.01a33/DEFAULTS_ENG/vc7_64-setup cdrtools-3.02a09/DEFAULTS_ENG/vc7_64-setup --- cdrtools-2.01.01a33/DEFAULTS_ENG/vc7_64-setup 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/DEFAULTS_ENG/vc7_64-setup 2009-05-16 15:10:39.000000000 +0000 @@ -0,0 +1,46 @@ +# @(#)vc7_64-setup 1.1 09/05/16 Copyright 2006 J. Schilling + +# +# Keep in sync with vc7_64-cygwin-setup as we cannot rely on hard links +# + +# +# Disable warnings for nonportable variable assignements. +# We only use smake MS-WIN, so this is not a problem. +# +.NO_WARN: := + +# +# A German installation on a German Windows (32Bit) host, to be used +# for cross compiling stuff (no autoconf run) +# +#VSINSTALLDIR=C:\Programme\Microsoft Visual Studio 8 +#VSINS=/cygdrive/c/Programme/Microsoft Visual Studio 8 + +# +# An English installation on an English Windows XP 64 Bit host +# +VSINSTALLDIR=C:\Program Files (x86)\Microsoft Visual Studio 8 +VSINS=/cygdrive/c/Program Files (x86)/Microsoft Visual Studio 8 + +export VSINSTALLDIR + +VCINSTALLDIR :=${VSINSTALLDIR}\VC +export VCINSTALLDIR + +PATH :=${VSINS}/VC/BIN/amd64:${VSINS}/Common7/IDE:${PATH} +export PATH + +INCLUDE :=${VCINSTALLDIR}\INCLUDE;${VCINSTALLDIR}\PlatformSDK\INCLUDE;${INCLUDE} +export INCLUDE + +LIB :=${VCINSTALLDIR}\LIB\amd64;${VCINSTALLDIR}\PlatformSDK\LIB\amd64;${LIB} +export LIB + +VC_SETUP=dummy-setup +export VC_SETUP + +# +# Re-enable all warnings. +# +.NO_WARN: diff -Nru cdrtools-2.01.01a33/DEFAULTS_ENG/vc7-cygwin-setup cdrtools-3.02a09/DEFAULTS_ENG/vc7-cygwin-setup --- cdrtools-2.01.01a33/DEFAULTS_ENG/vc7-cygwin-setup 2007-04-20 12:49:39.000000000 +0000 +++ cdrtools-3.02a09/DEFAULTS_ENG/vc7-cygwin-setup 2009-05-16 15:01:59.000000000 +0000 @@ -1,4 +1,8 @@ -# @(#)vc7-cygwin-setup 1.4 07/01/26 Copyright 2006 J. Schilling +# @(#)vc7-cygwin-setup 1.5 09/05/16 Copyright 2006 J. Schilling + +# +# Keep in sync with vc7-setup as we cannot rely on hard links +# # # Disable warnings for nonportable variable assignements. diff -Nru cdrtools-2.01.01a33/DEFAULTS_ENG/vc7-setup cdrtools-3.02a09/DEFAULTS_ENG/vc7-setup --- cdrtools-2.01.01a33/DEFAULTS_ENG/vc7-setup 2007-01-26 13:27:18.000000000 +0000 +++ cdrtools-3.02a09/DEFAULTS_ENG/vc7-setup 2009-05-16 15:01:59.000000000 +0000 @@ -1,4 +1,8 @@ -# @(#)vc7-setup 1.4 07/01/26 Copyright 2006 J. Schilling +# @(#)vc7-setup 1.5 09/05/16 Copyright 2006 J. Schilling + +# +# Keep in sync with vc7-cygwin-setup as we cannot rely on hard links +# # # Disable warnings for nonportable variable assignements. diff -Nru cdrtools-2.01.01a33/DEFAULTS_ENG/vc9-cygwin-setup cdrtools-3.02a09/DEFAULTS_ENG/vc9-cygwin-setup --- cdrtools-2.01.01a33/DEFAULTS_ENG/vc9-cygwin-setup 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/DEFAULTS_ENG/vc9-cygwin-setup 2011-08-01 18:07:10.000000000 +0000 @@ -0,0 +1,48 @@ +# @(#)vc9-cygwin-setup 1.4 11/08/01 Copyright 2006-2011 J. Schilling + +# +# Keep in sync with vc9-cygwin-setup as we cannot rely on hard links +# + +# +# Disable warnings for nonportable variable assignements. +# We only use smake MS-WIN, so this is not a problem. +# +.NO_WARN: := + +# +# A German installation +# +VSINSTALLDIR=C:\Programme\Microsoft Visual Studio 9.0 +VSINS=/cygdrive/c/Programme/Microsoft Visual Studio 9.0 + +# +# An English installation +# +VSINSTALLDIR=C:\Program Files (x86)\Microsoft Visual Studio 9.0 +VSBASEDIR=C:\Program Files (x86) +VSINS=/cygdrive/c/Program Files (x86)/Microsoft Visual Studio 9.0 + +export VSINSTALLDIR + +VCINSTALLDIR :=${VSINSTALLDIR}\VC +export VCINSTALLDIR + +PATH :=${VSINS}/VC/bin:${VSINS}/Common7/IDE:${PATH} +export PATH + +#INCLUDE :=${VCINSTALLDIR}\include;${VCINSTALLDIR}\PlatformSDK\INCLUDE;${INCLUDE} +INCLUDE :=${VCINSTALLDIR}\atlmfc\include;${VCINSTALLDIR}\include;${VSBASEDIR}\Microsoft SDKs\Windows\v5.0\include;C:\Program Files\\Microsoft SDKs\Windows\v6.0A\include;${INCLUDE} +export INCLUDE + +#LIB :=${VCINSTALLDIR}\lib;${VCINSTALLDIR}\PlatformSDK\LIB;${LIB} +LIB :=${VCINSTALLDIR}\atlmfc\lib;${VCINSTALLDIR}\lib;C:\Program Files\\Microsoft SDKs\Windows\v6.0A\lib;${LIB} +export LIB + +VC_SETUP=dummy-setup +export VC_SETUP + +# +# Re-enable all warnings. +# +.NO_WARN: diff -Nru cdrtools-2.01.01a33/DEFAULTS_ENG/vc9-setup cdrtools-3.02a09/DEFAULTS_ENG/vc9-setup --- cdrtools-2.01.01a33/DEFAULTS_ENG/vc9-setup 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/DEFAULTS_ENG/vc9-setup 2011-08-01 18:07:10.000000000 +0000 @@ -0,0 +1,48 @@ +# @(#)vc9-setup 1.3 11/08/01 Copyright 2006-2011 J. Schilling + +# +# Keep in sync with vc9-cygwin-setup as we cannot rely on hard links +# + +# +# Disable warnings for nonportable variable assignements. +# We only use smake MS-WIN, so this is not a problem. +# +.NO_WARN: := + +# +# A German installation +# +VSINSTALLDIR=C:\Programme\Microsoft Visual Studio 9.0 +VSINS=/cygdrive/c/Programme/Microsoft Visual Studio 9.0 + +# +# An English installation +# +VSINSTALLDIR=C:\Program Files (x86)\Microsoft Visual Studio 9.0 +VSBASEDIR=C:\Program Files (x86) +VSINS=/cygdrive/c/Program Files (x86)/Microsoft Visual Studio 9.0 + +export VSINSTALLDIR + +VCINSTALLDIR :=${VSINSTALLDIR}\VC +export VCINSTALLDIR + +PATH :=${VSINS}/VC/bin:${VSINS}/Common7/IDE:${PATH} +export PATH + +#INCLUDE :=${VCINSTALLDIR}\include;${VCINSTALLDIR}\PlatformSDK\INCLUDE;${INCLUDE} +INCLUDE :=${VCINSTALLDIR}\atlmfc\include;${VCINSTALLDIR}\include;${VSBASEDIR}\Microsoft SDKs\Windows\v5.0\include;C:\Program Files\\Microsoft SDKs\Windows\v6.0A\include;${INCLUDE} +export INCLUDE + +#LIB :=${VCINSTALLDIR}\lib;${VCINSTALLDIR}\PlatformSDK\LIB;${LIB} +LIB :=${VCINSTALLDIR}\atlmfc\lib;${VCINSTALLDIR}\lib;C:\Program Files\\Microsoft SDKs\Windows\v6.0A\lib;${LIB} +export LIB + +VC_SETUP=dummy-setup +export VC_SETUP + +# +# Re-enable all warnings. +# +.NO_WARN: diff -Nru cdrtools-2.01.01a33/doc/btcflash.man cdrtools-3.02a09/doc/btcflash.man --- cdrtools-2.01.01a33/doc/btcflash.man 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/doc/btcflash.man 2010-05-30 15:49:59.000000000 +0000 @@ -0,0 +1,396 @@ + + + +Schily's USER COMMANDS BTCFLASH(1L) + + + +NNAAMMEE + btcflash - Firmware flash utility for BTC DRW1008 DVD+/-RW + recorder + +SSYYNNOOPPSSIISS + bbttccffllaasshh ddeevv==_d_e_v_i_c_e [ _o_p_t_i_o_n_s ] [ ff==_f_i_r_m_w_a_r_e_f_i_l_e ] + +DDEESSCCRRIIPPTTIIOONN + BBttccffllaasshh is used to read update the Firmware for a BTC + DRW1008 DVD+/-RW recorder. + + Be very careful when writing firmware as this program does + not check for the correctness of the target device. + + DDeevviiccee nnaammiinngg + For a list of possible device name parameters call bbttccffllaasshh + -ssccaannbbuuss or bbttccffllaasshh ddeevv==hheellpp and then use the right ddeevv== + parameter based on the device listing. + + +OOPPTTIIOONNSS + -hheellpp + Prints a short summary of the pp options and exists. + + -vveerrssiioonn + Print version information and exit. + + ddeevv==_t_a_r_g_e_t + Set the SCSI target for the CD/DVD/BluRay-Recorder, see + notes above. A typical target device specification is + ddeevv==_1,_6,_0 . If a filename must be provided together + with the numerical target specification, the filename + is implementation specific. The correct filename in + this case can be found in the system specific manuals + of the target operating system. On a _F_r_e_e_B_S_D system + without _C_A_M support, you need to use the control device + (e.g. /_d_e_v/_r_c_d_0._c_t_l). A correct device specification + in this case may be ddeevv==/_d_e_v/_r_c_d_0._c_t_l:@ . + + GGeenneerraall SSCCSSII aaddddrreessssiinngg + The _t_a_r_g_e_t _d_e_v_i_c_e to the ddeevv== option refers to + _s_c_s_i_b_u_s/_t_a_r_g_e_t/_l_u_n of the CD/DVD/BluRay-Recorder. Com- + munication on _S_u_n_O_S is done with the SCSI general + driver ssccgg.. Other operating systems are using a library + simulation of this driver. Possible syntax is: ddeevv== + _s_c_s_i_b_u_s,_t_a_r_g_e_t,_l_u_n or ddeevv== _t_a_r_g_e_t,_l_u_n. In the latter + case, the CD/DVD/BluRay-Recorder has to be connected to + the default SCSI bus of the machine. _S_c_s_i_b_u_s, _t_a_r_g_e_t + and _l_u_n are integer numbers. Some operating systems or + SCSI transport implementations may require to specify a + filename in addition. In this case the correct syntax + for the device is: ddeevv== _d_e_v_i_c_e_n_a_m_e:_s_c_s_i_b_u_s,_t_a_r_g_e_t, or + + + +Joerg Schilling Last change: 2010/05/28 1 + + + + + + +Schily's USER COMMANDS BTCFLASH(1L) + + + + ddeevv== _d_e_v_i_c_e_n_a_m_e:_t_a_r_g_e_t,_l_u_n. If the name of the device + node that has been specified on such a system refers to + exactly one SCSI device, a shorthand in the form ddeevv== + _d_e_v_i_c_e_n_a_m_e:@ or ddeevv== _d_e_v_i_c_e_n_a_m_e:@,_l_u_n may be used + instead of ddeevv== _d_e_v_i_c_e_n_a_m_e:_s_c_s_i_b_u_s,_t_a_r_g_e_t, + + RReemmoottee SSCCSSII aaddddrreessssiinngg + To access remote SCSI devices, you need to prepend the + SCSI device name by a remote device indicator. The + remote device indicator is either RREEMMOOTTEE::_u_s_e_r@_h_o_s_t: or + RREEMMOOTTEE::_h_o_s_t: A valid remote SCSI device name may be: + RREEMMOOTTEE::_u_s_e_r@_h_o_s_t: to allow remote SCSI bus scanning or + RREEMMOOTTEE::_u_s_e_r@_h_o_s_t:_1,_0,_0 to access the SCSI device at + _h_o_s_t connected to SCSI bus # 1,target 0, lun 0. In + order to allow remote access to a specific _h_o_s_t, the + rrssccssii(1) program needs to be present and configured on + the _h_o_s_t. + + AAlltteerrnnaattee SSCCSSII ttrraannssppoorrttss + AATTAAPPII drives are just SSCCSSII drives that inherently use + the _A_T_A _p_a_c_k_e_t _i_n_t_e_r_f_a_c_e as SSCCSSII command transport + layer build into the IDE (ATA) transport. You may need + to specify an alternate transport layer on the command + line if your OS does not implement a fully integrated + kernel driver subsystem that allows to access any drive + using SSCCSSII commands via a single unique user interface. + + To access SCSI devices via alternate transport layers, + you need to prepend the SCSI device name by a transport + layer indicator. The transport layer indicator may be + something like UUSSCCSSII:: or AATTAAPPII::. To get a list of sup- + ported transport layers for your platform, use ddeevv== + _H_E_L_P: + + PPoorrttaabbiilliittyy BBaacckkggrroouunndd + To make bbttccffllaasshh portable to all UNIX platforms, the + syntax ddeevv== _d_e_v_i_c_e_n_a_m_e:_s_c_s_i_b_u_s,_t_a_r_g_e_t, is preferred as + it hides OS specific knowledge about device names from + the user. A specific OS may not necessarily support a + way to specify a real device file name nor a way to + specify _s_c_s_i_b_u_s,_t_a_r_g_e_t,_l_u_n. + + _S_c_s_i_b_u_s 0 is the default SCSI bus on the machine. Watch + the boot messages for more information or look into + //vvaarr//aaddmm//mmeessssaaggeess for more information about the SCSI + configuration of your machine. If you have problems to + figure out what values for _s_c_s_i_b_u_s,_t_a_r_g_e_t,_l_u_n should be + used, try the -ssccaannbbuuss option of bbttccffllaasshh described + below. + + UUssiinngg llooggiiccaall nnaammeess ffoorr ddeevviicceess + If no _d_e_v option is present, bbttccffllaasshh will try to get + + + +Joerg Schilling Last change: 2010/05/28 2 + + + + + + +Schily's USER COMMANDS BTCFLASH(1L) + + + + the device from the CCDDRR__DDEEVVIICCEE environment. + + If a file /etc/default/cdrecord exists, and if the + argument to the ddeevv== option or the CCDDRR__DDEEVVIICCEE environ- + ment does not contain the characters ',', '/', '@' or + ':', it is interpreted as a device label name that was + defined in the file /etc/default/cdrecord (see FILES + section). + + AAuuttoottaarrggeett MMooddee + If no ddeevv== option and no CCDDRR__DDEEVVIICCEE environment is + present, or if it only contains a transport specifyer + but no address notation, bbttccffllaasshh tries to scan the + SCSI address space for CD-ROM drives. If exactly one + is found, this is used by default. + + ttiimmeeoouutt==# + Set the default SCSI command timeout value to # + seconds. The default SCSI command timeout is the + minimum timeout used for sending SCSI commands. If a + SCSI command fails due to a timeout, you may try to + raise the default SCSI command timeout above the + timeout value of the failed command. If the command + runs correctly with a raised command timeout, please + report the better timeout value and the corresponding + command to the author of the program. If no _t_i_m_e_o_u_t + option is present, a default timeout of 40 seconds is + used. + + ddeebbuugg==#, --dd + Set the misc debug value to # (with debug=#) or incre- + ment the misc debug level by one (with -d). If you + specify -_d_d, this equals to ddeebbuugg==_2. This may help to + find problems while opening a driver for libscg. as + well as with sector sizes and sector types. Using + -ddeebbuugg slows down the process and may be the reason for + a buffer underrun. + + kkddeebbuugg==#, kkdd==# + Tell the ssccgg-driver to modify the kernel debug value + while SCSI commands are running. + + -ssiilleenntt, -ss + Do not print out a status report for failed SCSI com- + mands. + + -vv Increment the level of general verbosity by one. This + is used e.g. to display the progress of the process. + + -VV Increment the verbose level with respect of SCSI com- + mand transport by one. This helps to debug problems + during the process, that occur in the CD-Recorder. If + + + +Joerg Schilling Last change: 2010/05/28 3 + + + + + + +Schily's USER COMMANDS BTCFLASH(1L) + + + + you get incomprehensible error messages you should use + this flag to get more detailed output. -VVVV will show + data buffer content in addition. Using -VV or -VVVV slows + down the process. + + ff==_f_i_l_e + Specify the filename where the firmware should be read + from. + + -ssccaannbbuuss + Scan all SCSI devices on all SCSI busses and print the + inquiry strings. This option may be used to find SCSI + address of the devices on a system. The numbers + printed out as labels are computed by: bbuuss ** 110000 ++ ttaarr-- + ggeett + + ttss==# Set the maximum transfer size for a single SCSI command + to #. The syntax for the ttss== option is the same as for + cdrecord fs=# or sdd bs=#. + + If no ttss== option has been specified, bbttccffllaasshh defaults + to a transfer size of 256 kB. If libscg gets lower + values from the operating system, the value is reduced + to the maximum value that is possible with the current + operating system. Sometimes, it may help to further + reduce the transfer size or to enhance it, but note + that it may take a long time to find a better value by + experimenting with the ttss== option. + + + +EEXXAAMMPPLLEESS +EENNVVIIRROONNMMEENNTT + RRSSHH If the RRSSHH environment is present, the remote connec- + tion will not be created via rrccmmdd(3) but by calling the + program pointed to by RRSSHH. Use e.g. RRSSHH==/usr/bin/ssh + to create a secure shell connection. + + Note that this forces ccddrreeccoorrdd to create a pipe to the + rrsshh((11)) program and disallows ccddrreeccoorrdd to directly + access the network socket to the remote server. This + makes it impossible to set up performance parameters + and slows down the connection compared to a rroooott ini- + tiated rrccmmdd((33)) connection. + + RRSSCCSSII + If the RRSSCCSSII environment is present, the remote SCSI + server will not be the program //oopptt//sscchhiillyy//ssbbiinn//rrssccssii + but the program pointed to by RRSSCCSSII. Note that the + remote SCSI server program name will be ignored if you + log in using an account that has been created with a + remote SCSI server program as login shell. + + + +Joerg Schilling Last change: 2010/05/28 4 + + + + + + +Schily's USER COMMANDS BTCFLASH(1L) + + + +SSEEEE AALLSSOO + ccddrreeccoorrdd(1), ssccgg(7), rrccmmdd(3), sssshh(1). + +NNOOTTEESS +DDIIAAGGNNOOSSTTIICCSS + A typical error message for a SCSI command looks like: + + btcflash: I/O error. test unit ready: scsi sendcmd: no error + CDB: 00 20 00 00 00 00 + status: 0x2 (CHECK CONDITION) + Sense Bytes: 70 00 05 00 00 00 00 0A 00 00 00 00 25 00 00 00 00 00 + Sense Key: 0x5 Illegal Request, Segment 0 + Sense Code: 0x25 Qual 0x00 (logical unit not supported) Fru 0x0 + Sense flags: Blk 0 (not valid) + cmd finished after 0.002s timeout 40s + + The first line gives information about the transport of the + command. The text after the first colon gives the error + text for the system call from the view of the kernel. It + usually is: II//OO eerrrroorr unless other problems happen. The + next words contain a short description for the SCSI command + that fails. The rest of the line tells you if there were any + problems for the transport of the command over the SCSI bus. + ffaattaall eerrrroorr means that it was not possible to transport the + command (i.e. no device present at the requested SCSI + address). + + The second line prints the SCSI command descriptor block for + the failed command. + + The third line gives information on the SCSI status code + returned by the command, if the transport of the command + succeeds. This is error information from the SCSI device. + + The fourth line is a hex dump of the auto request sense + information for the command. + + The fifth line is the error text for the sense key if avail- + able, followed by the segment number that is only valid if + the command was a _c_o_p_y command. If the error message is not + directly related to the current command, the text _d_e_f_e_r_r_e_d + _e_r_r_o_r is appended. + + The sixth line is the error text for the sense code and the + sense qualifier if available. If the type of the device is + known, the sense data is decoded from tables in _s_c_s_i_e_r_r_s._c . + The text is followed by the error value for a field replace- + able unit. + + The seventh line prints the block number that is related to + the failed command and text for several error flags. The + block number may not be valid. + + + +Joerg Schilling Last change: 2010/05/28 5 + + + + + + +Schily's USER COMMANDS BTCFLASH(1L) + + + + The eight line reports the timeout set up for this command + and the time that the command really needed to complete. + + +BBUUGGSS +AAUUTTHHOORR + Joerg Schilling + Seestr. 110 + D-13353 Berlin + Germany + + Additional information can be found on: + http://cdrecord.berlios.de/private/cdrecord.html + + If you have support questions, send them to: + + ccddrreeccoorrdd--ssuuppppoorrtt@@bbeerrlliiooss..ddee + + If you have definitely found a bug, send a mail to: + + ccddrreeccoorrdd--ddeevveellooppeerrss@@bbeerrlliiooss..ddee + or jjooeerrgg..sscchhiilllliinngg@@ffookkuuss..ffrraauunnhhooffeerr..ddee + + To subscribe, use: + + hhttttpp::////lliissttss..bbeerrlliiooss..ddee//mmaaiillmmaann//lliissttiinnffoo//ccddrreeccoorrdd--ddeevveellooppeerrss + or hhttttpp::////lliissttss..bbeerrlliiooss..ddee//mmaaiillmmaann//lliissttiinnffoo//ccddrreeccoorrdd--ssuuppppoorrtt + + + + + + + + + + + + + + + + + + + + + + + + + + + + +Joerg Schilling Last change: 2010/05/28 6 + + + diff -Nru cdrtools-2.01.01a33/doc/btcflash.ps cdrtools-3.02a09/doc/btcflash.ps --- cdrtools-2.01.01a33/doc/btcflash.ps 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/doc/btcflash.ps 2010-05-30 15:50:57.000000000 +0000 @@ -0,0 +1,1156 @@ +%!PS +%%Version: 3.15 +%%DocumentFonts: (atend) +%%Pages: (atend) +%%EndComments +% +% Copyright 2005 Sun Microsystems, Inc. All rights reserved. +% Use is subject to license terms. +% +% CDDL HEADER START +% +% The contents of this file are subject to the terms of the +% Common Development and Distribution License, Version 1.0 only +% (the "License"). You may not use this file except in compliance +% with the License. +% +% You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE +% or http://www.opensolaris.org/os/licensing. +% See the License for the specific language governing permissions +% and limitations under the License. +% +% When distributing Covered Code, include this CDDL HEADER in each +% file and include the License file at usr/src/OPENSOLARIS.LICENSE. +% If applicable, add the following below this CDDL HEADER, with the +% fields enclosed by brackets "[]" replaced with your own identifying +% information: Portions Copyright [yyyy] [name of copyright owner] +% +% CDDL HEADER END +% +%ident "%Z%%M% %I% %E% SMI" +% +% Version 3.16 prologue for troff files. +% + +/#copies 1 store +/aspectratio 1 def +/formsperpage 1 def +/landscape false def +/linewidth .3 def +/magnification 1 def +/margin 0 def +/orientation 0 def +/resolution 720 def +/xoffset 0 def +/yoffset 0 def + +/roundpage true def +/useclippath true def +/pagebbox [0 0 612 792] def + +/R /Times-Roman def +/I /Times-Italic def +/B /Times-Bold def +/BI /Times-BoldItalic def +/H /Helvetica def +/HI /Helvetica-Oblique def +/HB /Helvetica-Bold def +/HX /Helvetica-BoldOblique def +/CW /Courier def +/CO /Courier def +/CI /Courier-Oblique def +/CB /Courier-Bold def +/CX /Courier-BoldOblique def +/PA /Palatino-Roman def +/PI /Palatino-Italic def +/PB /Palatino-Bold def +/PX /Palatino-BoldItalic def +/Hr /Helvetica-Narrow def +/Hi /Helvetica-Narrow-Oblique def +/Hb /Helvetica-Narrow-Bold def +/Hx /Helvetica-Narrow-BoldOblique def +/KR /Bookman-Light def +/KI /Bookman-LightItalic def +/KB /Bookman-Demi def +/KX /Bookman-DemiItalic def +/AR /AvantGarde-Book def +/AI /AvantGarde-BookOblique def +/AB /AvantGarde-Demi def +/AX /AvantGarde-DemiOblique def +/NR /NewCenturySchlbk-Roman def +/NI /NewCenturySchlbk-Italic def +/NB /NewCenturySchlbk-Bold def +/NX /NewCenturySchlbk-BoldItalic def +/ZD /ZapfDingbats def +/ZI /ZapfChancery-MediumItalic def +/VR /Varitimes#Roman def +/VI /Varitimes#Italic def +/VB /Varitimes#Bold def +/VX /Varitimes#BoldItalic def +/S /S def +/S1 /S1 def +/GR /Symbol def + +/inch {72 mul} bind def +/min {2 copy gt {exch} if pop} bind def + +/setup { + counttomark 2 idiv {def} repeat pop + + landscape {/orientation 90 orientation add def} if + /scaling 72 resolution div def + linewidth setlinewidth + 1 setlinecap + + pagedimensions + xcenter ycenter translate + orientation neg rotate + width 2 div neg height 2 div translate + xoffset inch yoffset inch translate + margin 2 div dup neg translate + magnification dup aspectratio mul scale + scaling scaling scale + + /Symbol /S Sdefs cf + /Times-Roman /S1 S1defs cf + 0 0 moveto +} def + +/pagedimensions { + useclippath userdict /gotpagebbox known not and { + /pagebbox [clippath pathbbox newpath] def + roundpage currentdict /roundpagebbox known and {roundpagebbox} if + } if + pagebbox aload pop + 4 -1 roll exch 4 1 roll 4 copy + landscape {4 2 roll} if + sub /width exch def + sub /height exch def + add 2 div /xcenter exch def + add 2 div /ycenter exch def + userdict /gotpagebbox true put +} def + +/pagesetup { + /page exch def + currentdict /pagedict known currentdict page known and { + page load pagedict exch get cvx exec + } if +} def + +/decodingdefs [ + {counttomark 2 idiv {y moveto show} repeat} + {neg /y exch def counttomark 2 idiv {y moveto show} repeat} + {neg moveto {2 index stringwidth pop sub exch div 0 32 4 -1 roll widthshow} repeat} + {neg moveto {spacewidth sub 0.0 32 4 -1 roll widthshow} repeat} + {counttomark 2 idiv {y moveto show} repeat} + {neg setfunnytext} +] def + +/setdecoding {/t decodingdefs 3 -1 roll get bind def} bind def + +/w {neg moveto show} bind def +/m {neg dup /y exch def moveto} bind def +/done {/lastpage where {pop lastpage} if} def + +/f { + dup /font exch def findfont exch + dup /ptsize exch def scaling div dup /size exch def scalefont setfont + linewidth ptsize mul scaling 10 mul div setlinewidth + /spacewidth ( ) stringwidth pop def +} bind def + +/changefont { + /fontheight exch def + /fontslant exch def + currentfont [ + 1 0 + fontheight ptsize div fontslant sin mul fontslant cos div + fontheight ptsize div + 0 0 + ] makefont setfont +} bind def + +/sf {f} bind def + +/cf { + dup length 2 idiv + /entries exch def + /chtab exch def + /newfont exch def + + findfont dup length 1 add dict + /newdict exch def + {1 index /FID ne {newdict 3 1 roll put} {pop pop} ifelse} forall + + newdict /Metrics entries dict put + newdict /Metrics get + begin + chtab aload pop + 1 1 entries {pop def} for + newfont newdict definefont pop + end +} bind def + +% +% A few arrays used to adjust reference points and character widths in some +% of the printer resident fonts. If square roots are too high try changing +% the lines describing /radical and /radicalex to, +% +% /radical [0 -75 550 0] +% /radicalex [-50 -75 500 0] +% + +/Sdefs [ + /bracketlefttp [220 500] + /bracketleftbt [220 500] + /bracketrighttp [-70 380] + /bracketrightbt [-70 380] + /braceleftbt [220 490] + /bracketrightex [220 -125 500 0] + /radical [0 0 550 0] + % NeWSprint's \(br is too low, compensate + statusdict /product get (NeWS Server) eq { + /radicalex [-50 100 500 0] + /parenleftex [-20 100 0 0] + + } { + /radicalex [-50 0 500 0] + /parenleftex [-20 -170 0 0] + } ifelse + /integral [100 -50 500 0] + /infinity [10 -75 730 0] +] def + +/S1defs [ + /underscore [0 80 500 0] + /endash [7 90 650 0] +] def +%%EndProlog +%%BeginSetup +mark +/resolution 720 def +setup +2 setdecoding +%%EndSetup +%%Page: 1 1 +save +mark +1 pagesetup +10 R f +(Schily)720 480 w +10 S1 f +(\302)976 480 w +10 R f +( \( 1L \))3 225( BTCFLASH)1 3216(s USER COMMANDS)2 950 3 1009 480 t +9 B f +( E)1 0( ME)1 60(N NA AM)2 215 3 720 960 t +10 R f +(btc\257ash)1080 1080 w +10 S1 f +(\261)1424 1080 w +10 R f +(Firmware \257ash utility for BTC DRW1008 DVD+/-RW recorder)7 2617 1 1522 1080 t +9 B f +( S)1 0( IS)1 50( SI)1 35( PS)1 50( OP)1 55( YN NO)2 135(S SY)1 115 7 720 1248 t +10 B f +( =)1 0( v=)1 57( ev)1 50( de)1 44( d)1 89( h)1 0( sh)1 56( as)1 39( \257a)1 50( c\257)1 56( tc)1 44(b bt)1 89 12 1080 1368 t +10 I f +(device)1654 1368 w +10 R f +([)1941 1368 w +10 I f +(options)2007 1368 w +10 R f +(] [)1 99 1 2335 1368 t +10 B f +( =)1 0(f f=)1 90 2 2467 1368 t +10 I f +(\256rmware\256le)2557 1368 w +10 R f +(])3073 1368 w +9 B f +( N)1 0( ON)1 65( IO)1 70( TI)1 35( PT)1 60( IP)1 55( CR RI)2 100( SC)1 65( ES)1 50(D DE)1 125 10 720 1536 t +10 B f +( h)1 0( sh)1 56( as)1 39( \257a)1 50( c\257)1 56( tc)1 44(B Bt)1 100 7 1080 1656 t +10 R f +(is used to read update the Firmware for a BTC DRW1008 DVD+/-RW recorder.)12 3309 1 1458 1656 t +( target)1 267(Be very careful when writing \256rmware as this program does not check for the correctness of the)16 4053 2 1080 1824 t +(device.)1080 1944 w +9 B f +( g)1 0( ng)1 45( in)1 50( mi)1 25( am)1 75( na)1 45( n)1 80( ce e)2 40( ic)1 40( vi)1 25( ev)1 45(D De)1 105 12 900 2112 t +10 R f +(For a list of possible device name parameters call)8 2046 1 1080 2232 t +10 B f +( h)1 0( sh)1 56( as)1 39( \257a)1 50( c\257)1 56( tc)1 44(b bt)1 89 7 3160 2232 t +10 S1 f +(\261 \261)1 65 1 3528 2232 t +10 B f +( s)1 0( nb bu us)3 151( an)1 56( ca)1 50(s sc)1 83 5 3593 2232 t +10 R f +(or)3968 2232 w +10 B f +( p)1 0( lp)1 56( el)1 28( he)1 44( =h)1 56( v=)1 57( ev)1 50( de)1 44( d)1 91( h)1 0( sh)1 56( as)1 39( \257a)1 50( c\257)1 56( tc)1 44(b bt)1 89 16 4086 2232 t +10 R f +(and then use)2 519 1 4881 2232 t +(the right)1 344 1 1080 2352 t +10 B f +( =)1 0( v=)1 57( ev)1 50(d de)1 100 4 1457 2352 t +10 R f +(parameter based on the device listing.)5 1548 1 1697 2352 t +9 B f +( S)1 0( NS)1 50( ON)1 65( IO)1 70( TI)1 35( PT)1 60(O OP)1 125 7 720 2640 t +10 S1 f +(\261 \261)1 65 1 1080 2760 t +10 B f +( p)1 0( lp)1 56( el)1 28(h he)1 100 4 1145 2760 t +10 R f +(Prints a short summary of the)5 1220 1 1440 2760 t +10 B f +(p p)1 56 1 2693 2760 t +10 R f +(options and exists.)2 758 1 2782 2760 t +10 S1 f +(\261 \261)1 65 1 1080 2928 t +10 B f +( n)1 0( on)1 56( io)1 50( si)1 28( er rs)2 83(v ve)1 94 6 1145 2928 t +10 R f +(Print version information and exit.)4 1412 1 1440 3048 t +10 B f +( =)1 0( v=)1 57( ev)1 50(d de)1 100 4 1080 3216 t +10 I f +(target)1287 3216 w +10 R f +( typical target dev-)3 796( A)1 145(Set the SCSI target for the CD/DVD/BluRay-Recorder, see notes above.)9 3019 3 1440 3336 t +(ice speci\256cation is)2 762 1 1440 3456 t +10 B f +( =)1 0( v=)1 57( ev)1 50(d de)1 100 4 2239 3456 t +10 I f +(1,6,0)2446 3456 w +10 R f +( a \256lename must be provided together with the numerical tar-)10 2556(. If)1 161 2 2683 3456 t +( correct \256lename in this case can)6 1374( The)1 225( implementation speci\256c.)2 1032(get speci\256cation, the \256lename is)4 1329 4 1440 3576 t +( a)1 81( On)1 192( the system speci\256c manuals of the target operating system.)9 2483(be found in)2 481 4 1440 3696 t +10 I f +(FreeBSD)4714 3696 w +10 R f +(system)5122 3696 w +(without)1440 3816 w +10 I f +(CAM)1780 3816 w +10 R f +( use the control device \(e.g.)5 1150(support, you need to)3 843 2 2025 3816 t +10 I f +(/dev/rcd0.ctl)4086 3816 w +10 R f +( correct device)2 606(\). A)1 198 2 4596 3816 t +(speci\256cation in this case may be)5 1330 1 1440 3936 t +10 B f +( =)1 0( v=)1 57( ev)1 50(d de)1 100 4 2803 3936 t +10 I f +(/dev/rcd0.ctl:)3010 3936 w +10 S1 f +(@)3545 3936 w +10 R f +(.)3670 3936 w +10 B f +( g)1 0( ng)1 50( in)1 56( ss si)2 67( re es)2 83( dd dr)2 100( ad)1 56( a)1 83( I)1 0( SI)1 39( CS)1 56( SC)1 72( S)1 89( l)1 0( al)1 28( er ra)2 94( ne)1 44( en)1 56(G Ge)1 122 19 1240 4176 t +10 R f +(The)1440 4296 w +10 I f +(target device)1 548 1 1650 4296 t +10 R f +(to the)1 255 1 2253 4296 t +10 B f +( =)1 0( v=)1 57( ev)1 50(d de)1 100 4 2563 4296 t +10 R f +(option refers to)2 670 1 2825 4296 t +10 I f +(scsibus)3550 4296 w +10 R f +(/)3847 4296 w +10 I f +(target)3875 4296 w +10 R f +(/)4122 4296 w +10 I f +(lun)4150 4296 w +10 R f +(of the CD/DVD/BluRay-)2 1067 1 4333 4296 t +(Recorder. Communication on)2 1211 1 1440 4416 t +10 I f +(SunOS)2689 4416 w +10 R f +( the SCSI general driver)4 1013(is done with)2 515 2 2999 4416 t +10 B f +( .)1 0( g.)1 25( cg)1 50(s sc)1 83 4 4564 4416 t +10 R f +(Other operating)1 641 1 4759 4416 t +( is:)1 189( syntax)1 354( Possible)1 460(systems are using a library simulation of this driver.)8 2623 4 1440 4536 t +10 B f +( =)1 0( v=)1 57( ev)1 50(d de)1 100 4 5193 4536 t +10 I f +(scsibus)1440 4656 w +10 R f +(,)1737 4656 w +10 I f +(target)1762 4656 w +10 R f +(,)2009 4656 w +10 I f +(lun)2034 4656 w +10 R f +(or)2201 4656 w +10 B f +( =)1 0( v=)1 57( ev)1 50(d de)1 100 4 2323 4656 t +10 I f +(target)2569 4656 w +10 R f +(,)2816 4656 w +10 I f +(lun)2841 4656 w +10 R f +( to)1 116( the latter case, the CD/DVD/BluRay-Recorder has)6 2127(. In)1 180 3 2977 4656 t +( SCSI bus of the machine.)5 1184(be connected to the default)4 1183 2 1440 4776 t +10 I f +(Scsibus)3893 4776 w +10 R f +(,)4201 4776 w +10 I f +(target)4279 4776 w +10 R f +(and)4571 4776 w +10 I f +(lun)4768 4776 w +10 R f +(are integer)1 451 1 4949 4776 t +( require to specify a)4 852(numbers. Some operating systems or SCSI transport implementations may)8 3108 2 1440 4896 t +( this case the correct syntax for the device is:)9 2441( In)1 213(\256lename in addition.)2 969 3 1440 5016 t +10 B f +( =)1 0( v=)1 57( ev)1 50(d de)1 100 4 5193 5016 t +10 I f +(devicename)1440 5136 w +10 R f +(:)1918 5136 w +10 I f +(scsibus)1946 5136 w +10 R f +(,)2243 5136 w +10 I f +(target)2268 5136 w +10 R f +(, or)1 143 1 2515 5136 t +10 B f +( =)1 0( v=)1 57( ev)1 50(d de)1 100 4 2693 5136 t +10 I f +(devicename)2935 5136 w +10 R f +(:)3413 5136 w +10 I f +(target)3441 5136 w +10 R f +(,)3688 5136 w +10 I f +(lun)3713 5136 w +10 R f +( the name of the device node that)7 1392(. If)1 159 2 3849 5136 t +( the form)2 390(has been speci\256ed on such a system refers to exactly one SCSI device, a shorthand in)15 3570 2 1440 5256 t +10 B f +( =)1 0( v=)1 57( ev)1 50(d de)1 100 4 1440 5376 t +10 I f +(devicename)1756 5376 w +10 R f +(:)2234 5376 w +10 S1 f +(@)2262 5376 w +10 R f +(or)2463 5376 w +10 B f +( =)1 0( v=)1 57( ev)1 50(d de)1 100 4 2655 5376 t +10 I f +(devicename)2971 5376 w +10 R f +(:)3449 5376 w +10 S1 f +(@)3477 5376 w +10 R f +(,)3577 5376 w +10 I f +(lun)3602 5376 w +10 R f +(may be used instead of)4 1247 1 3838 5376 t +10 B f +( =)1 0( v=)1 57( ev)1 50(d de)1 100 4 5193 5376 t +10 I f +(devicename)1440 5496 w +10 R f +(:)1918 5496 w +10 I f +(scsibus)1946 5496 w +10 R f +(,)2243 5496 w +10 I f +(target)2268 5496 w +10 R f +(,)2515 5496 w +10 B f +( g)1 0( ng)1 50( in)1 56( ss si)2 67( re es)2 83( dd dr)2 100( ad)1 56( a)1 83( I)1 0( SI)1 39( CS)1 56( SC)1 72( S)1 89( e)1 0( te)1 44( ot)1 33( mo)1 50( em)1 83(R Re)1 116 19 1240 5736 t +10 R f +( to prepend the SCSI device name by a remote device)10 2240(To access remote SCSI devices, you need)6 1720 2 1440 5856 t +(indicator. The remote device indicator is either)6 1961 1 1440 5976 t +10 B f +( :)1 0( TE E:)2 100( OT)1 67( MO)1 78( EM)1 94(R RE)1 139 6 3441 5976 t +10 I f +(user)3919 5976 w +10 S1 f +(@)4091 5976 w +10 I f +(host:)4183 5976 w +10 R f +(or)4456 5976 w +10 B f +( :)1 0( TE E:)2 100( OT)1 67( MO)1 78( EM)1 94(R RE)1 139 6 4578 5976 t +10 I f +(host:)5056 5976 w +10 R f +(A)5328 5976 w +(valid remote SCSI device name may be:)6 1741 1 1440 6096 t +10 B f +( :)1 0( TE E:)2 100( OT)1 67( MO)1 78( EM)1 94(R RE)1 139 6 3261 6096 t +10 I f +(user)3739 6096 w +10 S1 f +(@)3911 6096 w +10 I f +(host:)4003 6096 w +10 R f +( bus)1 187(to allow remote SCSI)3 930 2 4283 6096 t +(scanning or)1 482 1 1440 6216 t +10 B f +( :)1 0( TE E:)2 100( OT)1 67( MO)1 78( EM)1 94(R RE)1 139 6 1966 6216 t +10 I f +(user)2444 6216 w +10 S1 f +(@)2616 6216 w +10 I f +(host:1,0,0)2708 6216 w +10 R f +( SCSI device at)3 673(to access the)2 542 2 3152 6216 t +10 I f +(host)4410 6216 w +10 R f +(connected to SCSI)2 780 1 4620 6216 t +(bus)1440 6336 w +10 S1 f +(#)1614 6336 w +10 R f +( to a speci\256c)3 535( order to allow remote access)5 1216( In)1 151(1,target 0, lun 0.)3 685 4 1699 6336 t +10 I f +(host)4322 6336 w +10 R f +(, the)1 183 1 4497 6336 t +10 B f +( i)1 0( si)1 28( cs)1 39( sc)1 44(r rs)1 83 5 4716 6336 t +10 R f +(\(1\) program)1 490 1 4910 6336 t +(needs to be present and con\256gured on the)7 1711 1 1440 6456 t +10 I f +(host)3184 6456 w +10 R f +(.)3359 6456 w +10 B f +( s)1 0( ts)1 39( rt)1 33( or)1 44( po)1 50( sp)1 56( ns)1 39( an)1 56( ra)1 50( tr)1 44( t)1 66( I)1 0( SI)1 39( CS)1 56( SC)1 72( S)1 89( e)1 0( te)1 44( at)1 33( na)1 50( er rn)2 100( te)1 44( lt)1 33(A Al)1 100 24 1240 6696 t +( I)1 0( PI)1 39( AP)1 61( TA)1 72(A AT)1 139 5 1440 6816 t +10 R f +(drives are just)2 584 1 1788 6816 t +10 B f +( I)1 0( SI)1 39( CS)1 56(S SC)1 128 4 2409 6816 t +10 R f +(drives that inherently use the)4 1202 1 2669 6816 t +10 I f +(ATA packet interface)2 867 1 3908 6816 t +10 R f +(as)4813 6816 w +10 B f +( I)1 0( SI)1 39( CS)1 56(S SC)1 128 4 4934 6816 t +10 R f +(com-)5195 6816 w +( may need to specify an alternate)6 1367( You)1 239( IDE \(ATA\) transport.)3 919(mand transport layer build into the)5 1435 4 1440 6936 t +( if your OS does not implement a fully integrated kernel)10 2402( line)1 224(transport layer on the command)4 1334 3 1440 7056 t +( allows to access any drive using)6 1357(driver subsystem that)2 873 2 1440 7176 t +10 B f +( I)1 0( SI)1 39( CS)1 56(S SC)1 128 4 3703 7176 t +10 R f +(commands via a single unique user)5 1441 1 3959 7176 t +(interface.)1440 7296 w +(J)720 7776 w +(. .)1 47 1 759 7721 t +( 1)1 1838( change: 2010/05/28)2 832( Last)1 1443(org Schilling)1 528 4 759 7776 t +cleartomark +showpage +restore +%%EndPage: 1 1 +%%Page: 2 2 +save +mark +2 pagesetup +10 R f +(Schily)720 480 w +10 S1 f +(\302)976 480 w +10 R f +( \( 1L \))3 225( BTCFLASH)1 3216(s USER COMMANDS)2 950 3 1009 480 t +( devices via alternate transport layers, you need to prepend the SCSI device)12 3289(To access SCSI)2 671 2 1440 960 t +( indicator may be something like)5 1468( transport layer)2 668( The)1 245(name by a transport layer indicator.)5 1579 4 1440 1080 t +10 B f +( :)1 0( I:)1 33( SI)1 39( CS)1 56( SC)1 72(U US)1 128 6 1440 1200 t +10 R f +(or)1812 1200 w +10 B f +( :)1 0( I:)1 33( PI)1 39( AP)1 61( TA)1 72(A AT)1 139 6 1939 1200 t +10 R f +( of supported transport layers for your platform, use)8 2231( get a list)3 421(. To)1 213 3 2283 1200 t +10 B f +( =)1 0( v=)1 57( ev)1 50(d de)1 100 4 5193 1200 t +10 I f +(HELP)1440 1320 w +10 R f +(:)1698 1320 w +10 B f +( un nd d)3 112( ou)1 56( ro)1 50( gr)1 44( kg)1 50( ck)1 56( ac)1 44( Ba)1 50( B)1 100( y)1 0( ty)1 50( il li it)3 89( bi)1 28( ab)1 56( ta)1 50( rt)1 33( or)1 44(P Po)1 111 18 1240 1560 t +10 R f +(To make)1 363 1 1440 1680 t +10 B f +( h)1 0( sh)1 56( as)1 39( \257a)1 50( c\257)1 56( tc)1 44(b bt)1 89 7 1839 1680 t +10 R f +(portable to all)2 577 1 2209 1680 t +8 R f +(UNIX)2815 1680 w +10 R f +( syntax)1 298(platforms, the)1 566 2 3051 1680 t +10 B f +( =)1 0( v=)1 57( ev)1 50(d de)1 100 4 3952 1680 t +10 I f +(devicename)4196 1680 w +10 R f +(:)4674 1680 w +10 I f +(scsibus)4702 1680 w +10 R f +(,)4999 1680 w +10 I f +(target)5024 1680 w +10 R f +(, is)1 129 1 5271 1680 t +( speci\256c OS)2 511( A)1 144( names from the user.)4 918(preferred as it hides OS speci\256c knowledge about device)8 2387 4 1440 1800 t +( to specify)2 466(may not necessarily support a way to specify a real device \256le name nor a way)15 3494 2 1440 1920 t +10 I f +(scsibus)1440 2040 w +10 R f +(,)1737 2040 w +10 I f +(target)1762 2040 w +10 R f +(,)2009 2040 w +10 I f +(lun)2034 2040 w +10 R f +(.)2170 2040 w +10 I f +(Scsibus)1440 2280 w +10 R f +( the machine. Watch the boot messages for more informa-)9 2434(0 is the default SCSI bus on)6 1189 2 1777 2280 t +(tion or look into)3 675 1 1440 2400 t +10 B f +( s)1 0( es)1 39( ag ge)2 94( ss sa)2 89( es)1 39( me)1 44( /m)1 83( m/)1 28( dm)1 83( ad)1 56( /a)1 50( r/)1 28( va ar)2 94(/ /v)1 78 14 2149 2400 t +10 R f +(for more information about the SCSI con\256guration of your)8 2412 1 2988 2400 t +( you have problems to \256gure out what values for)9 2029(machine. If)1 497 2 1440 2520 t +10 I f +(scsibus)4001 2520 w +10 R f +(,)4298 2520 w +10 I f +(target)4323 2520 w +10 R f +(,)4570 2520 w +10 I f +(lun)4595 2520 w +10 R f +(should be used,)2 641 1 4759 2520 t +(try the)1 266 1 1440 2640 t +10 S1 f +(\261 \261)1 65 1 1739 2640 t +10 B f +( s)1 0( nb bu us)3 151( an)1 56( ca)1 50(s sc)1 83 5 1804 2640 t +10 R f +(option of)1 372 1 2177 2640 t +10 B f +( h)1 0( sh)1 56( as)1 39( \257a)1 50( c\257)1 56( tc)1 44(b bt)1 89 7 2582 2640 t +10 R f +(described below.)1 684 1 2949 2640 t +10 B f +( s)1 0( ce es)2 83( ic)1 44( vi)1 28( ev)1 50( de)1 44( d)1 89( r)1 0( or)1 44( fo)1 50( f)1 66( s)1 0( es)1 39( me)1 44( am)1 83( na)1 50( n)1 89( l)1 0( al)1 28( ca)1 50( ic)1 44( og gi)2 78( lo)1 50( l)1 61( g)1 0( ng)1 50( in)1 56( si)1 28(U Us)1 111 29 1240 2880 t +10 R f +(If no)1 199 1 1440 3000 t +10 I f +(dev)1672 3000 w +10 R f +(option is present,)2 702 1 1843 3000 t +10 B f +( h)1 0( sh)1 56( as)1 39( \257a)1 50( c\257)1 56( tc)1 44(b bt)1 89 7 2578 3000 t +10 R f +(will try to get the device from the)7 1396 1 2945 3000 t +10 B f +(C CD DR R)3 216 1 4374 3000 t +10 S f +(_ _)1 50 1 4590 3000 t +10 B f +( E)1 0( CE)1 67( IC)1 72( VI)1 39( EV)1 72(D DE)1 139 6 4640 3000 t +10 R f +(environ-)5062 3000 w +(ment.)1440 3120 w +( the argument to the)4 1007(If a \256le /etc/default/cdrecord exists, and if)6 1977 2 1440 3360 t +10 B f +( =)1 0( v=)1 57( ev)1 50(d de)1 100 4 4501 3360 t +10 R f +(option or the)2 615 1 4785 3360 t +10 B f +(C CD DR R)3 216 1 1440 3480 t +10 S f +(_ _)1 50 1 1656 3480 t +10 B f +( E)1 0( CE)1 67( IC)1 72( VI)1 39( EV)1 72(D DE)1 139 6 1706 3480 t +10 R f +( not contain the characters ',', '/', ')7 1474(environment does)1 726 2 2133 3480 t +10 S1 f +(@)4333 3480 w +10 R f +(' or ':', it is interpreted)5 975 1 4425 3480 t +(as a device label name that was de\256ned in the \256le /etc/default/cdrecord \(see FILES section\).)14 3779 1 1440 3600 t +10 B f +( e)1 0( de)1 44( od)1 56( Mo)1 50( M)1 127( t)1 0( et)1 33( ge)1 44( rg)1 50( ar)1 44( ta)1 50( ot)1 33( to)1 50( ut)1 33(A Au)1 128 15 1240 3840 t +10 R f +(If no)1 203 1 1440 3960 t +10 B f +( =)1 0( v=)1 57( ev)1 50(d de)1 100 4 1680 3960 t +10 R f +( no)1 138(option and)1 437 2 1924 3960 t +10 B f +(C CD DR R)3 216 1 2537 3960 t +10 S f +(_ _)1 50 1 2753 3960 t +10 B f +( E)1 0( CE)1 67( IC)1 72( VI)1 39( EV)1 72(D DE)1 139 6 2803 3960 t +10 R f +(environment is present, or if it only contains a tran-)9 2170 1 3230 3960 t +(sport specifyer but no address notation,)5 1650 1 1440 4080 t +10 B f +( h)1 0( sh)1 56( as)1 39( \257a)1 50( c\257)1 56( tc)1 44(b bt)1 89 7 3131 4080 t +10 R f +( space for CD-)3 629(tries to scan the SCSI address)5 1265 2 3506 4080 t +( exactly one is found, this is used by default.)9 1851( If)1 132(ROM drives.)1 530 3 1440 4200 t +10 B f +( =)1 0( t=)1 57( ut)1 33( ou)1 56( eo)1 50( me)1 44( im)1 83(t ti)1 61 8 1080 4368 t +10 S1 f +(#)1464 4368 w +10 R f +(Set the default SCSI command timeout value to)7 2139 1 1440 4488 t +10 S1 f +(#)3637 4488 w +10 R f +( default SCSI command)3 1060(seconds. The)1 587 2 3753 4488 t +( a SCSI command fails)4 982( If)1 139( commands.)1 498(timeout is the minimum timeout used for sending SCSI)8 2341 4 1440 4608 t +( a timeout, you may try to raise the default SCSI command timeout above the timeout)15 3696(due to)1 264 2 1440 4728 t +( runs correctly with a raised command timeout,)7 1991( the command)2 598( If)1 140(value of the failed command.)4 1231 4 1440 4848 t +( the author of the pro-)5 933(please report the better timeout value and the corresponding command to)10 3027 2 1440 4968 t +( no)1 133(gram. If)1 362 2 1440 5088 t +10 I f +(timeout)1968 5088 w +10 R f +(option is present, a default timeout of 40 seconds is used.)10 2367 1 2301 5088 t +10 B f +( =)1 0( g=)1 57( bu ug)2 106( eb)1 56(d de)1 100 5 1080 5256 t +10 S1 f +(#)1399 5256 w +10 I f +(,)1449 5256 w +10 B f +( d)1 0(- -d)1 89 2 1515 5256 t +10 R f +(Set the misc debug value to)5 1167 1 1440 5376 t +10 S1 f +(#)2645 5376 w +10 R f +(\(with debug=)1 549 1 2733 5376 t +10 S1 f +(#)3282 5376 w +10 R f +( the misc debug level by one \(with)7 1477(\) or increment)2 591 2 3332 5376 t +(-d\). If you specify)3 756 1 1440 5496 t +10 I f +(-dd,)2233 5496 w +10 R f +(this equals to)2 550 1 2427 5496 t +10 B f +( =)1 0( g=)1 57( bu ug)2 106( eb)1 56(d de)1 100 5 3013 5496 t +10 I f +(2.)3332 5496 w +10 R f +(This may help to \256nd problems while opening)7 1924 1 3476 5496 t +( Using)1 313( with sector sizes and sector types.)6 1474( well as)2 335( as)1 156(a driver for libscg.)3 782 5 1440 5616 t +10 S1 f +(\261 \261)1 65 1 4541 5616 t +10 B f +( g)1 0( bu ug)2 106( eb)1 56(d de)1 100 4 4606 5616 t +10 R f +(slows down)1 491 1 4909 5616 t +(the process and may be the reason for a buffer underrun.)10 2331 1 1440 5736 t +10 B f +( =)1 0( g=)1 57( bu ug)2 106( eb)1 56(k kd de)2 156 5 1080 5904 t +10 S1 f +(#)1455 5904 w +10 R f +(,)1505 5904 w +10 B f +( =)1 0(k kd d=)2 169 2 1563 5904 t +10 S1 f +(#)1732 5904 w +10 R f +(Tell the)1 316 1 1440 6024 t +10 B f +( g)1 0( cg)1 50(s sc)1 83 3 1789 6024 t +10 R f +(-driver to modify the kernel debug value while SCSI commands are running.)11 3156 1 1922 6024 t +10 S1 f +(\261 \261)1 65 1 1080 6192 t +10 B f +( t)1 0( nt)1 33( en)1 56( il le)2 72(s si)1 67 5 1145 6192 t +10 R f +(,)1373 6192 w +10 S1 f +(\261 \261)1 65 1 1431 6192 t +10 B f +(s s)1 39 1 1496 6192 t +10 R f +(Do not print out a status report for failed SCSI commands.)10 2420 1 1440 6312 t +10 S1 f +(\261 \261)1 65 1 1080 6480 t +10 B f +(v v)1 50 1 1145 6480 t +10 R f +( used e.g. to display the progress of the)8 1639( is)1 101( This)1 245(Increment the level of general verbosity by one.)7 1975 4 1440 6480 t +(process.)1440 6600 w +10 S1 f +(\261 \261)1 65 1 1080 6768 t +10 B f +(V V)1 72 1 1145 6768 t +10 R f +( helps to)2 383( This)1 258( verbose level with respect of SCSI command transport by one.)10 2747(Increment the)1 572 4 1440 6768 t +( during the process, that occur in the CD-Recorder. If you get incomprehensible)12 3308(debug problems)1 652 2 1440 6888 t +(error messages you should use this \257ag to get more detailed output.)11 2978 1 1440 7008 t +10 S1 f +(\261 \261)1 65 1 4502 7008 t +10 B f +(V VV V)2 144 1 4567 7008 t +10 R f +(will show data)2 637 1 4763 7008 t +( Using)1 305(buffer content in addition.)3 1067 2 1440 7128 t +10 S1 f +(\261 \261)1 65 1 2845 7128 t +10 B f +(V V)1 72 1 2910 7128 t +10 R f +(or)3015 7128 w +10 S1 f +(\261 \261)1 65 1 3131 7128 t +10 B f +(V VV V)2 144 1 3196 7128 t +10 R f +(slows down the process.)3 995 1 3373 7128 t +10 B f +( =)1 0(f f=)1 90 2 1080 7296 t +10 I f +(\256le)1170 7296 w +10 R f +(Specify the \256lename where the \256rmware should be read from.)9 2544 1 1440 7296 t +(J)720 7776 w +(. .)1 47 1 759 7721 t +( 2)1 1838( change: 2010/05/28)2 832( Last)1 1443(org Schilling)1 528 4 759 7776 t +cleartomark +showpage +restore +%%EndPage: 2 2 +%%Page: 3 3 +save +mark +3 pagesetup +10 R f +(Schily)720 480 w +10 S1 f +(\302)976 480 w +10 R f +( \( 1L \))3 225( BTCFLASH)1 3216(s USER COMMANDS)2 950 3 1009 480 t +10 S1 f +(\261 \261)1 65 1 1080 960 t +10 B f +( s)1 0( nb bu us)3 151( an)1 56( ca)1 50(s sc)1 83 5 1145 960 t +10 R f +( be used)2 345(Scan all SCSI devices on all SCSI busses and print the inquiry strings. This option may)15 3615 2 1440 1080 t +( com-)1 244( numbers printed out as labels are)6 1432( The)1 228(to \256nd SCSI address of the devices on a system.)9 2056 4 1440 1200 t +(puted by:)1 383 1 1440 1320 t +10 B f +( s)1 0(b bu us)2 151 2 1856 1320 t +10 S f +(* *)1 50 1 2040 1320 t +10 B f +( t)1 0( et)1 33( ge)1 44( rg)1 50( ar)1 44( ta)1 50( t)1 66( +)1 0( +)1 90(1 10 00 0)3 150 10 2123 1320 t +( =)1 0( s=)1 57(t ts)1 72 3 1080 1488 t +10 S1 f +(#)1209 1488 w +10 R f +(Set the maximum transfer size for a single SCSI command to)10 2558 1 1440 1488 t +10 S1 f +(#)4034 1488 w +10 R f +( the)1 159( syntax for)2 449(. The)1 249 3 4084 1488 t +10 B f +( =)1 0( s=)1 57(t ts)1 72 3 4978 1488 t +10 R f +(option)5144 1488 w +(is the same as for cdrecord fs=)6 1267 1 1440 1608 t +10 S1 f +(#)2707 1608 w +10 R f +(or sdd bs=)2 433 1 2790 1608 t +10 S1 f +(#)3223 1608 w +10 R f +(.)3273 1608 w +(If no)1 201 1 1440 1848 t +10 B f +( =)1 0( s=)1 57(t ts)1 72 3 1676 1848 t +10 R f +(option has been speci\256ed,)3 1062 1 1840 1848 t +10 B f +( h)1 0( sh)1 56( as)1 39( \257a)1 50( c\257)1 56( tc)1 44(b bt)1 89 7 2937 1848 t +10 R f +( of 256 kB. If libscg gets)6 1057(defaults to a transfer size)4 1037 2 3306 1848 t +( is reduced to the maximum value that is pos-)9 1899(lower values from the operating system, the value)7 2061 2 1440 1968 t +( help to further reduce the transfer)6 1458( it may)2 308( Sometimes,)1 543(sible with the current operating system.)5 1651 4 1440 2088 t +( a long time to \256nd a better value by experiment-)10 2043(size or to enhance it, but note that it may take)10 1917 2 1440 2208 t +(ing with the)2 494 1 1440 2328 t +10 B f +( =)1 0( s=)1 57(t ts)1 72 3 1967 2328 t +10 R f +(option.)2129 2328 w +9 B f +( S)1 0( LE ES)2 110( PL)1 60( MP)1 55( XA AM)2 150(E EX)1 125 6 720 2736 t +( T)1 0( NT)1 60( EN)1 65( ME)1 60( NM)1 85( ON)1 65( RO)1 70( IR)1 65( NV VI)2 100(E EN)1 125 10 720 2856 t +10 B f +( H)1 0( SH)1 78(R RS)1 128 3 1080 2976 t +10 R f +(If the)1 227 1 1440 2976 t +10 B f +( H)1 0( SH)1 78(R RS)1 128 3 1706 2976 t +10 R f +(environment is present, the remote connection will not be created via)10 2899 1 1951 2976 t +10 B f +( d)1 0( md)1 56(r rc cm)2 171 3 4889 2976 t +10 R f +(\(3\) but)1 284 1 5116 2976 t +( by)1 137(by calling the program pointed to)5 1400 2 1440 3096 t +10 B f +( H)1 0( SH)1 78(R RS)1 128 3 3014 3096 t +10 R f +( e.g.)1 181(. Use)1 250 2 3220 3096 t +10 B f +( =)1 0( H=)1 57( SH)1 78(R RS)1 128 4 3688 3096 t +10 R f +(/usr/bin/ssh to create a secure shell)5 1449 1 3951 3096 t +(connection.)1440 3216 w +(Note that this forces)3 831 1 1440 3456 t +10 B f +( d)1 0( rd)1 56( or)1 44( re ec co)3 138( dr)1 44(c cd)1 100 6 2304 3456 t +10 R f +(to create a pipe to the)5 901 1 2720 3456 t +10 B f +( \))1 0( 1\))1 33( \(1)1 50( h\()1 33( sh)1 56(r rs)1 83 6 3655 3456 t +10 R f +(program and disallows)2 928 1 3944 3456 t +10 B f +( d)1 0( rd)1 56( or)1 44( re ec co)3 138( dr)1 44(c cd)1 100 6 4906 3456 t +10 R f +(to)5322 3456 w +( makes it impossible to set up per-)7 1432( This)1 245( socket to the remote server.)5 1170(directly access the network)3 1113 4 1440 3576 t +( slows down the connection compared to a)7 1770(formance parameters and)2 1025 2 1440 3696 t +10 B f +( t)1 0( oo ot)2 83(r ro)1 94 3 4270 3696 t +10 R f +(initiated)4482 3696 w +10 B f +( \))1 0( 3\))1 33( \(3)1 50( d\()1 33( md)1 56(r rc cm)2 171 6 4845 3696 t +10 R f +(con-)5223 3696 w +(nection.)1440 3816 w +10 B f +( I)1 0( SI)1 39( CS)1 56( SC)1 72(R RS)1 128 5 1080 3984 t +10 R f +(If the)1 252 1 1440 3984 t +10 B f +( I)1 0( SI)1 39( CS)1 56( SC)1 72(R RS)1 128 5 1756 3984 t +10 R f +( not be the program)4 942(environment is present, the remote SCSI server will)7 2343 2 2115 3984 t +10 B f +( i)1 0( si)1 28( cs)1 39( sc)1 44( rs)1 39( /r)1 44( n/)1 28( in)1 56( bi)1 28( sb)1 56( /s)1 39( y/)1 28( il ly)2 78( hi)1 28( ch)1 56( sc)1 44( /s)1 39( t/)1 28( pt)1 33( op)1 56(/ /o)1 78 21 1440 4104 t +10 R f +(but the program pointed to by)5 1251 1 2346 4104 t +10 B f +( I)1 0( SI)1 39( CS)1 56( SC)1 72(R RS)1 128 5 3633 4104 t +10 R f +( that the remote SCSI server)5 1184(. Note)1 288 2 3928 4104 t +(program name will be ignored if you log in using an account that has been created with a)17 3960 1 1440 4224 t +(remote SCSI server program as login shell.)6 1771 1 1440 4344 t +9 B f +( O)1 0( SO)1 70( LS)1 50( AL)1 60( A)1 95( EE E)2 60(S SE)1 110 7 720 4512 t +10 B f +( d)1 0( rd)1 56( or)1 44( re ec co)3 138( dr)1 44(c cd)1 100 6 1080 4632 t +10 R f +(\(1\),)1462 4632 w +10 B f +( g)1 0( cg)1 50(s sc)1 83 3 1636 4632 t +10 R f +(\(7\),)1769 4632 w +10 B f +( d)1 0( md)1 56(r rc cm)2 171 3 1943 4632 t +10 R f +(\(3\),)2170 4632 w +10 B f +( h)1 0(s ss sh)2 134 2 2344 4632 t +10 R f +(\(1\).)2478 4632 w +9 B f +( S)1 0( TE ES)2 110( OT)1 60(N NO)1 135 4 720 4800 t +( S)1 0( CS)1 50( IC)1 65( TI)1 35( ST)1 60( OS)1 50( NO)1 70( GN)1 65( AG)1 70( IA)1 65(D DI)1 100 11 720 4920 t +10 R f +(A typical error message for a SCSI command looks like:)9 2333 1 1080 5040 t +(btc\257ash: I/O error. test unit ready: scsi sendcmd: no error)9 2357 1 1440 5280 t +( 20 00 00 00 00)5 665(CDB: 00)1 400 2 1440 5400 t +(status: 0x2 \(CHECK CONDITION\))3 1464 1 1440 5520 t +(Sense Bytes: 70 00 05 00 00 00 00 0A 00 00 00 00 25 00 00 00 00 00)19 2938 1 1440 5640 t +(Sense Key: 0x5 Illegal Request, Segment 0)6 1777 1 1440 5760 t +(Sense Code: 0x25 Qual 0x00 \(logical unit not supported\) Fru 0x0)10 2701 1 1440 5880 t +(Sense \257ags: Blk 0 \(not valid\))5 1204 1 1440 6000 t +(cmd \256nished after 0.002s timeout 40s)5 1545 1 1440 6120 t +( text after the \256rst colon gives)6 1265( The)1 225( of the command.)3 735(The \256rst line gives information about the transport)7 2095 4 1080 6360 t +( from the view of the kernel. It usually is:)9 1740(the error text for the system call)6 1335 2 1080 6480 t +10 B f +( r)1 0( or)1 44( er rr ro)3 138( e)1 78( O)1 0( /O)1 78(I I/)1 67 7 4222 6480 t +10 R f +(unless other prob-)2 739 1 4661 6480 t +( a short description for the SCSI command that fails. The rest of)12 2753(lems happen. The next words contain)5 1567 2 1080 6600 t +( if there were any problems for the transport of the command over the SCSI bus.)15 3361(the line tells you)3 697 2 1080 6720 t +10 B f +( l)1 0( al)1 28( ta)1 50( at)1 33(f fa)1 83 5 5206 6720 t +( r)1 0( or)1 44(e er rr ro)3 182 3 1080 6840 t +10 R f +( was not possible to transport the command \(i.e. no device present at the requested)14 3513(means that it)2 541 2 1346 6840 t +(SCSI address\).)1 602 1 1080 6960 t +(J)720 7680 w +(. .)1 47 1 759 7625 t +( 3)1 1838( change: 2010/05/28)2 832( Last)1 1443(org Schilling)1 528 4 759 7680 t +cleartomark +showpage +restore +%%EndPage: 3 3 +%%Page: 4 4 +save +mark +4 pagesetup +10 R f +(Schily)720 480 w +10 S1 f +(\302)976 480 w +10 R f +( \( 1L \))3 225( BTCFLASH)1 3216(s USER COMMANDS)2 950 3 1009 480 t +(The second line prints the SCSI command descriptor block for the failed command.)12 3439 1 1080 960 t +( transport of)2 522(The third line gives information on the SCSI status code returned by the command, if the)15 3798 2 1080 1128 t +(the command succeeds. This is error information from the SCSI device.)10 2948 1 1080 1248 t +(The fourth line is a hex dump of the auto request sense information for the command.)15 3537 1 1080 1416 t +( is only)2 313(The \256fth line is the error text for the sense key if available, followed by the segment number that)18 4007 2 1080 1584 t +(valid if the command was a)5 1191 1 1080 1704 t +10 I f +(copy)2314 1704 w +10 R f +( error message is not directly related to the current)9 2162(command. If the)2 693 2 2545 1704 t +(command, the text)2 757 1 1080 1824 t +10 I f +(deferred error)1 582 1 1870 1824 t +10 R f +(is appended.)1 507 1 2485 1824 t +( the type of the)4 651( If)1 137( the sense quali\256er if available.)5 1307(The sixth line is the error text for the sense code and)11 2225 4 1080 1992 t +(device is known, the sense data is decoded from tables in)10 2402 1 1080 2112 t +10 I f +(scsierrs.c)3519 2112 w +10 R f +( by the error)3 523( text is followed)3 683(. The)1 250 3 3944 2112 t +(value for a \256eld replaceable unit.)5 1353 1 1080 2232 t +( to the failed command and text for several error)9 2030(The seventh line prints the block number that is related)9 2290 2 1080 2400 t +(\257ags. The block number may not be valid.)7 1746 1 1080 2520 t +( set up for this command and the time that the command really needed)13 2940(The eight line reports the timeout)5 1380 2 1080 2688 t +(to complete.)1 502 1 1080 2808 t +9 B f +( S)1 0( GS)1 50( UG)1 70(B BU)1 125 4 720 3096 t +( R)1 0( HO OR)2 135( TH)1 70(A AU UT)2 190 4 720 3216 t +10 R f +(J)1080 3336 w +(. .)1 47 1 1119 3281 t +(org Schilling)1 528 1 1119 3336 t +(Seestr. 110)1 452 1 1080 3456 t +(D-13353 Berlin)1 638 1 1080 3576 t +(Germany)1080 3696 w +(Additional information can be found on:)5 1658 1 1080 3864 t +(http://cdrecord.berlios.de/private/cdrecord.html)1080 3984 w +(If you have support questions, send them to:)7 1827 1 1080 4152 t +10 B f +( t)1 0( rt)1 33( or)1 44( up pp po)3 162( su)1 56( -s)1 39( d-)1 33( rd)1 56( or)1 44( re ec co)3 138( dr)1 44(c cd)1 100 12 1080 4320 t +10 S1 f +(@ @)1 92 1 1829 4320 t +10 B f +( e)1 0( de)1 44( .d)1 56( s.)1 25( os)1 39( li io)2 78( er rl)2 72(b be)1 100 8 1921 4320 t +10 R f +(If you have de\256nitely found a bug, send a mail to:)10 2075 1 1080 4488 t +10 B f +( s)1 0( er rs)2 83( pe)1 44( op)1 56( lo)1 50( el)1 28( ve)1 44( ev)1 50( de)1 44( -d)1 56( d-)1 33( rd)1 56( or)1 44( re ec co)3 138( dr)1 44(c cd)1 100 16 1080 4656 t +10 S1 f +(@ @)1 92 1 1950 4656 t +10 B f +( e)1 0( de)1 44( .d)1 56( s.)1 25( os)1 39( li io)2 78( er rl)2 72(b be)1 100 8 2042 4656 t +10 R f +(or)1080 4776 w +10 B f +( g)1 0( ng)1 50( il ll li in)4 140( hi)1 28( ch)1 56( sc)1 44( .s)1 39( g.)1 25( er rg)2 94( oe)1 44(j jo)1 83 11 1196 4776 t +10 S1 f +(@ @)1 92 1 1799 4776 t +10 B f +( e)1 0( de)1 44( .d)1 56( er r.)2 69( fe)1 44( of)1 33( un nh ho)3 162( au)1 56( ra)1 50( fr)1 44( .f)1 33( s.)1 25( ku us)2 95( ok)1 56(f fo)1 83 15 1891 4776 t +10 R f +(To subscribe, use:)2 740 1 1080 4944 t +10 B f +( s)1 0( er rs)2 83( pe)1 44( op)1 56( lo)1 50( el)1 28( ve)1 44( ev)1 50( de)1 44( -d)1 56( d-)1 33( rd)1 56( or)1 44( re ec co)3 138( dr)1 44( cd)1 56( /c)1 44( o/)1 28( fo)1 50( nf)1 33( in)1 56( ti)1 28( st)1 33( /l li is)3 95( n/)1 28( an)1 56( ma)1 50( il lm)2 111( ai)1 28( ma)1 50( /m)1 83( e/)1 28( de)1 44( .d)1 56( s.)1 25( os)1 39( li io)2 78( er rl)2 72( be)1 44( .b)1 56( s.)1 25( ts)1 39( st)1 33( // /l li is)4 123( :/)1 28( p:)1 33( tt tp)2 89(h ht)1 89 48 1080 5112 t +10 R f +(or)1080 5232 w +10 B f +( t)1 0( rt)1 33( or)1 44( up pp po)3 162( su)1 56( -s)1 39( d-)1 33( rd)1 56( or)1 44( re ec co)3 138( dr)1 44( cd)1 56( /c)1 44( o/)1 28( fo)1 50( nf)1 33( in)1 56( ti)1 28( st)1 33( /l li is)3 95( n/)1 28( an)1 56( ma)1 50( il lm)2 111( ai)1 28( ma)1 50( /m)1 83( e/)1 28( de)1 44( .d)1 56( s.)1 25( os)1 39( li io)2 78( er rl)2 72( be)1 44( .b)1 56( s.)1 25( ts)1 39( st)1 33( // /l li is)4 123( :/)1 28( p:)1 33( tt tp)2 89(h ht)1 89 44 1196 5232 t +10 R f +(J)720 7680 w +(. .)1 47 1 759 7625 t +( 4)1 1838( change: 2010/05/28)2 832( Last)1 1443(org Schilling)1 528 4 759 7680 t +cleartomark +showpage +restore +%%EndPage: 4 4 +%%Trailer +done +%%DocumentFonts: Times-Roman Times-Bold Times-Italic Symbol +%%Pages: 4 diff -Nru cdrtools-2.01.01a33/doc/cdda2ogg.man cdrtools-3.02a09/doc/cdda2ogg.man --- cdrtools-2.01.01a33/doc/cdda2ogg.man 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/doc/cdda2ogg.man 2010-05-10 21:42:19.000000000 +0000 @@ -0,0 +1,132 @@ + + + +User Commands cdda2ogg(1) + + + +NNAAMMEE + cdda2ogg, cdda2mp3 - extract CD audio tracks and encode them + +SSYYNNOOPPSSIISS + ccddddaa22oogggg [ _o_p_t_i_o_n_s ][ ddeevv==_d_e_v_i_c_e ] [_f_i_l_e _p_r_e_f_i_x] [_o_g_g _o_p_t_s] + + ccddddaa22mmpp33 [ _o_p_t_i_o_n_s ][ ddeevv==_d_e_v_i_c_e ] [_f_i_l_e _p_r_e_f_i_x] [_l_a_m_e _o_p_t_s] + +DDEESSCCRRIIPPTTIIOONN + ccddddaa22oogggg is a script that uses the ccddddaa22wwaavv command to + extract all audio tracks with the ccddddaa22wwaavv command and + encode them using the ooggggeenncc(1) OOgggg VVoorrbbiiss encoder. + + ccddddaa22mmpp33 is a script that uses the ccddddaa22wwaavv command to + extract all audio tracks with the ccddddaa22wwaavv command and + encode them using the llaammee(1) MMPP33 encoder. + + There is no CDDB support yet. + + +OOPPTTIIOONNSS + -hheellpp print a short online usage message and exit. + + ddeevv==_d_e_v_i_c_e The device to read the data from. If there is + only one CD-ROM drive in the system, the ddeevv== + option may be omitted. For possible values of + the _d_e_v_i_c_e parameter, see the ccddrreeccoorrdd(1) man + page. + + -** Any other option beginning with a '-' sign is + passed to the ccddddaa22wwaavv program. + + Any other option past the ffiillee pprreeffiixx argument and beginning + with a '-' sign is passed to the encoder program. + +EENNVVIIRROONNMMEENNTT VVAARRIIAABBLLEESS + The following environment variables may be used to change + the behavior of the ccddddaa22oogggg and the ccddddaa22mmpp33 command: + + CCDDDDAA22WWAAVV + Defines the command to extract WAV data from the CD. + The default value is ccddddaa22wwaavv. + + CCDDDDAA22WWAAVV__OOPPTTSS + Defines the options passed to the CDDA program while + extracting from the CD. The default value is -HH -qq. + + MMPP__CCOODDEERR + The encoder program used to compress the audio data. + The default value is ooggggeenncc for ccddddaa22oogggg and llaammee for + ccddddaa22mmpp33. + + + + +SunOS 5.10 Last change: Version 3.0 1 + + + + + + +User Commands cdda2ogg(1) + + + + MMPP__OOPPTTIIOONNSS + Options passed to the encoder program. The default is + empty. + + FFIILLEEPPRREEFFIIXX + The base filename part of the resulting audio files. + The default file name is $$TTRRAACCKK--$$FFIILLEEPPRREEFFIIXX..oogggg for + ccddddaa22oogggg and $$TTRRAACCKK--$$FFIILLEEPPRREEFFIIXX..mmpp33 for ccddddaa22mmpp33 if no + _f_i_l_e _p_r_e_f_i_x argument was given on the command line. + +FFIILLEESS + If the following files are present, then the scripts source + them to set up local defaults: + + //oopptt//sscchhiillyy//bbiinn//ccddddaa22oogggg + To set up default values for ccddddaa22oogggg. + + //oopptt//sscchhiillyy//bbiinn//ccddddaa22mmpp33 + To set up default values for ccddddaa22mmpp33. + + The content may be set up to modify environment variables or + to set up local defaults. + + +SSEEEE AALLSSOO + ccddddaa22wwaavv(1), ccddrreeccoorrdd(1), ooggggeenncc(1), llaammee(1). + +NNOOTTEESS + If a CD contains a hidden audio track before track 1, a file + name with track number 00 is created with the content of the + hidden track. + + The program ooggggeenncc(1) is part of the vvoorrbbiiss--ttoooollss project + See hhttttpp::////wwwwww..vvoorrbbiiss..ccoomm for more information. + + The program llaammee(1) is part of the llaammee project. See + hhttttpp::////llaammee..ssoouurrcceeffoorrggee..nneett// for more information. + +AAUUTTHHOORR + The first versions of the scripts have been based on a news + article by Tom Kludy. + + + + + + + + + + + + + + +SunOS 5.10 Last change: Version 3.0 2 + + + diff -Nru cdrtools-2.01.01a33/doc/cdda2ogg.ps cdrtools-3.02a09/doc/cdda2ogg.ps --- cdrtools-2.01.01a33/doc/cdda2ogg.ps 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/doc/cdda2ogg.ps 2010-05-10 21:42:44.000000000 +0000 @@ -0,0 +1,575 @@ +%!PS +%%Version: 3.15 +%%DocumentFonts: (atend) +%%Pages: (atend) +%%EndComments +% +% Copyright 2005 Sun Microsystems, Inc. All rights reserved. +% Use is subject to license terms. +% +% CDDL HEADER START +% +% The contents of this file are subject to the terms of the +% Common Development and Distribution License, Version 1.0 only +% (the "License"). You may not use this file except in compliance +% with the License. +% +% You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE +% or http://www.opensolaris.org/os/licensing. +% See the License for the specific language governing permissions +% and limitations under the License. +% +% When distributing Covered Code, include this CDDL HEADER in each +% file and include the License file at usr/src/OPENSOLARIS.LICENSE. +% If applicable, add the following below this CDDL HEADER, with the +% fields enclosed by brackets "[]" replaced with your own identifying +% information: Portions Copyright [yyyy] [name of copyright owner] +% +% CDDL HEADER END +% +%ident "%Z%%M% %I% %E% SMI" +% +% Version 3.16 prologue for troff files. +% + +/#copies 1 store +/aspectratio 1 def +/formsperpage 1 def +/landscape false def +/linewidth .3 def +/magnification 1 def +/margin 0 def +/orientation 0 def +/resolution 720 def +/xoffset 0 def +/yoffset 0 def + +/roundpage true def +/useclippath true def +/pagebbox [0 0 612 792] def + +/R /Times-Roman def +/I /Times-Italic def +/B /Times-Bold def +/BI /Times-BoldItalic def +/H /Helvetica def +/HI /Helvetica-Oblique def +/HB /Helvetica-Bold def +/HX /Helvetica-BoldOblique def +/CW /Courier def +/CO /Courier def +/CI /Courier-Oblique def +/CB /Courier-Bold def +/CX /Courier-BoldOblique def +/PA /Palatino-Roman def +/PI /Palatino-Italic def +/PB /Palatino-Bold def +/PX /Palatino-BoldItalic def +/Hr /Helvetica-Narrow def +/Hi /Helvetica-Narrow-Oblique def +/Hb /Helvetica-Narrow-Bold def +/Hx /Helvetica-Narrow-BoldOblique def +/KR /Bookman-Light def +/KI /Bookman-LightItalic def +/KB /Bookman-Demi def +/KX /Bookman-DemiItalic def +/AR /AvantGarde-Book def +/AI /AvantGarde-BookOblique def +/AB /AvantGarde-Demi def +/AX /AvantGarde-DemiOblique def +/NR /NewCenturySchlbk-Roman def +/NI /NewCenturySchlbk-Italic def +/NB /NewCenturySchlbk-Bold def +/NX /NewCenturySchlbk-BoldItalic def +/ZD /ZapfDingbats def +/ZI /ZapfChancery-MediumItalic def +/VR /Varitimes#Roman def +/VI /Varitimes#Italic def +/VB /Varitimes#Bold def +/VX /Varitimes#BoldItalic def +/S /S def +/S1 /S1 def +/GR /Symbol def + +/inch {72 mul} bind def +/min {2 copy gt {exch} if pop} bind def + +/setup { + counttomark 2 idiv {def} repeat pop + + landscape {/orientation 90 orientation add def} if + /scaling 72 resolution div def + linewidth setlinewidth + 1 setlinecap + + pagedimensions + xcenter ycenter translate + orientation neg rotate + width 2 div neg height 2 div translate + xoffset inch yoffset inch translate + margin 2 div dup neg translate + magnification dup aspectratio mul scale + scaling scaling scale + + /Symbol /S Sdefs cf + /Times-Roman /S1 S1defs cf + 0 0 moveto +} def + +/pagedimensions { + useclippath userdict /gotpagebbox known not and { + /pagebbox [clippath pathbbox newpath] def + roundpage currentdict /roundpagebbox known and {roundpagebbox} if + } if + pagebbox aload pop + 4 -1 roll exch 4 1 roll 4 copy + landscape {4 2 roll} if + sub /width exch def + sub /height exch def + add 2 div /xcenter exch def + add 2 div /ycenter exch def + userdict /gotpagebbox true put +} def + +/pagesetup { + /page exch def + currentdict /pagedict known currentdict page known and { + page load pagedict exch get cvx exec + } if +} def + +/decodingdefs [ + {counttomark 2 idiv {y moveto show} repeat} + {neg /y exch def counttomark 2 idiv {y moveto show} repeat} + {neg moveto {2 index stringwidth pop sub exch div 0 32 4 -1 roll widthshow} repeat} + {neg moveto {spacewidth sub 0.0 32 4 -1 roll widthshow} repeat} + {counttomark 2 idiv {y moveto show} repeat} + {neg setfunnytext} +] def + +/setdecoding {/t decodingdefs 3 -1 roll get bind def} bind def + +/w {neg moveto show} bind def +/m {neg dup /y exch def moveto} bind def +/done {/lastpage where {pop lastpage} if} def + +/f { + dup /font exch def findfont exch + dup /ptsize exch def scaling div dup /size exch def scalefont setfont + linewidth ptsize mul scaling 10 mul div setlinewidth + /spacewidth ( ) stringwidth pop def +} bind def + +/changefont { + /fontheight exch def + /fontslant exch def + currentfont [ + 1 0 + fontheight ptsize div fontslant sin mul fontslant cos div + fontheight ptsize div + 0 0 + ] makefont setfont +} bind def + +/sf {f} bind def + +/cf { + dup length 2 idiv + /entries exch def + /chtab exch def + /newfont exch def + + findfont dup length 1 add dict + /newdict exch def + {1 index /FID ne {newdict 3 1 roll put} {pop pop} ifelse} forall + + newdict /Metrics entries dict put + newdict /Metrics get + begin + chtab aload pop + 1 1 entries {pop def} for + newfont newdict definefont pop + end +} bind def + +% +% A few arrays used to adjust reference points and character widths in some +% of the printer resident fonts. If square roots are too high try changing +% the lines describing /radical and /radicalex to, +% +% /radical [0 -75 550 0] +% /radicalex [-50 -75 500 0] +% + +/Sdefs [ + /bracketlefttp [220 500] + /bracketleftbt [220 500] + /bracketrighttp [-70 380] + /bracketrightbt [-70 380] + /braceleftbt [220 490] + /bracketrightex [220 -125 500 0] + /radical [0 0 550 0] + % NeWSprint's \(br is too low, compensate + statusdict /product get (NeWS Server) eq { + /radicalex [-50 100 500 0] + /parenleftex [-20 100 0 0] + + } { + /radicalex [-50 0 500 0] + /parenleftex [-20 -170 0 0] + } ifelse + /integral [100 -50 500 0] + /infinity [10 -75 730 0] +] def + +/S1defs [ + /underscore [0 80 500 0] + /endash [7 90 650 0] +] def +%%EndProlog +%%BeginSetup +mark +/resolution 720 def +setup +2 setdecoding +%%EndSetup +%%Page: 1 1 +save +mark +1 pagesetup +10 R f +( \( 1 \))3 164( cdda2ogg)1 3839(User Commands)1 677 3 720 480 t +9 B f +( E)1 0( ME)1 60(N NA AM)2 215 3 720 960 t +10 R f +(cdda2ogg, cdda2mp3)1 862 1 1080 1080 t +10 S1 f +(\261)1975 1080 w +10 R f +(extract CD audio tracks and encode them)6 1694 1 2073 1080 t +9 B f +( S)1 0( IS)1 50( SI)1 35( PS)1 50( OP)1 55( YN NO)2 135(S SY)1 115 7 720 1248 t +10 B f +( a2 2o og gg g)5 200( dd da)2 106(c cd)1 100 3 1080 1368 t +10 R f +([)1519 1368 w +10 I f +(options)1585 1368 w +10 R f +(][)1913 1368 w +10 B f +( =)1 0( v=)1 57( ev)1 50(d de)1 100 4 2012 1368 t +10 I f +(device)2219 1368 w +10 R f +(] [)1 99 1 2506 1368 t +10 I f +(\256le pre\256x)1 382 1 2605 1368 t +10 R f +(] [)1 99 1 2995 1368 t +10 I f +(ogg opts)1 350 1 3094 1368 t +10 R f +(])3452 1368 w +10 B f +( 3)1 0( p3)1 50( mp)1 56( a2 2m)2 133( dd da)2 106(c cd)1 100 6 1080 1536 t +10 R f +([)1558 1536 w +10 I f +(options)1624 1536 w +10 R f +(][)1952 1536 w +10 B f +( =)1 0( v=)1 57( ev)1 50(d de)1 100 4 2051 1536 t +10 I f +(device)2258 1536 w +10 R f +(] [)1 99 1 2545 1536 t +10 I f +(\256le pre\256x)1 382 1 2644 1536 t +10 R f +(] [)1 99 1 3034 1536 t +10 I f +(lame opts)1 394 1 3133 1536 t +10 R f +(])3535 1536 w +9 B f +( N)1 0( ON)1 65( IO)1 70( TI)1 35( PT)1 60( IP)1 55( CR RI)2 100( SC)1 65( ES)1 50(D DE)1 125 10 720 1704 t +10 B f +( a2 2o og gg g)5 200( dd da)2 106(c cd)1 100 3 1080 1824 t +10 R f +(is a script that uses the)5 987 1 1528 1824 t +10 B f +( av v)2 50( wa)1 50( a2 2w)2 122( dd da)2 106(c cd)1 100 5 2557 1824 t +10 R f +( all audio tracks with the)5 1075(command to extract)2 827 2 3027 1824 t +10 B f +( av v)2 50( wa)1 50( a2 2w)2 122( dd da)2 106(c cd)1 100 5 4972 1824 t +10 R f +(command and encode them using the)5 1524 1 1080 1944 t +10 B f +( c)1 0( nc)1 44( en)1 56(o og gg ge)3 194 4 2637 1944 t +10 R f +(\(1\))2931 1944 w +10 B f +( s)1 0( is)1 39( bi)1 28( rb)1 56( or)1 44( Vo)1 50( V)1 105( gg g)2 50(O Og)1 128 9 3080 1944 t +10 R f +(encoder.)3613 1944 w +10 B f +( 3)1 0( p3)1 50( mp)1 56( a2 2m)2 133( dd da)2 106(c cd)1 100 6 1080 2112 t +10 R f +(is a script that uses the)5 977 1 1564 2112 t +10 B f +( av v)2 50( wa)1 50( a2 2w)2 122( dd da)2 106(c cd)1 100 5 2581 2112 t +10 R f +(command to extract all audio tracks with the)7 1883 1 3049 2112 t +10 B f +( av v)2 50( wa)1 50( a2 2w)2 122( dd da)2 106(c cd)1 100 5 4972 2112 t +10 R f +(command and encode them using the)5 1524 1 1080 2232 t +10 B f +( e)1 0( me)1 44( am)1 83(l la)1 78 4 2637 2232 t +10 R f +(\(1\))2842 2232 w +10 B f +( 3)1 0( P3)1 50(M MP)1 155 3 2991 2232 t +10 R f +(encoder.)3229 2232 w +(There is no CDDB support yet.)5 1289 1 1080 2400 t +9 B f +( S)1 0( NS)1 50( ON)1 65( IO)1 70( TI)1 35( PT)1 60(O OP)1 125 7 720 2688 t +10 S1 f +(\261 \261)1 65 1 1080 2808 t +10 B f +( p)1 0( lp)1 56( el)1 28(h he)1 100 4 1145 2808 t +10 R f +(print a short online usage message and exit.)7 1798 1 1680 2808 t +10 B f +( =)1 0( v=)1 57( ev)1 50(d de)1 100 4 1080 2976 t +10 I f +(device)1287 2976 w +10 R f +( system, the)2 505(The device to read the data from. If there is only one CD-ROM drive in the)15 3215 2 1680 2976 t +10 B f +( =)1 0( v=)1 57( ev)1 50(d de)1 100 4 1680 3096 t +10 R f +(option may be omitted. For possible values of the)8 2276 1 1950 3096 t +10 I f +(device)4288 3096 w +10 R f +(parameter, see the)2 796 1 4604 3096 t +10 B f +( d)1 0( rd)1 56( or)1 44( re ec co)3 138( dr)1 44(c cd)1 100 6 1680 3216 t +10 R f +(\(1\) man page.)2 567 1 2062 3216 t +10 S1 f +(\261 \261)1 65 1 1080 3384 t +10 S f +(* *)1 50 1 1145 3384 t +10 R f +(Any other option beginning with a '-' sign is passed to the)11 2417 1 1680 3384 t +10 B f +( av v)2 50( wa)1 50( a2 2w)2 122( dd da)2 106(c cd)1 100 5 4130 3384 t +10 R f +(program.)4591 3384 w +(Any other option past the)4 1084 1 1080 3552 t +10 B f +( x)1 0( \256x)1 50( re e\256)2 100( pr)1 44( p)1 99( e)1 0( le)1 44(\256 \256l)1 84 8 2206 3552 t +10 R f +(argument and beginning with a '-' sign is passed to the encoder)11 2730 1 2670 3552 t +(program.)1080 3672 w +9 B f +( S)1 0( BL LE ES)3 170( AB)1 60( IA)1 65( VA AR RI)3 165( V)1 95( T)1 0( NT)1 60( EN)1 65( ME)1 60( NM)1 85( ON)1 65( RO)1 70( IR)1 65( NV VI)2 100(E EN)1 125 16 720 3840 t +10 R f +( the)1 173(The following environment variables may be used to change the behavior of)11 3322 2 1080 3960 t +10 B f +( a2 2o og gg g)5 200( dd da)2 106(c cd)1 100 3 4626 3960 t +10 R f +(and the)1 317 1 5083 3960 t +10 B f +( 3)1 0( p3)1 50( mp)1 56( a2 2m)2 133( dd da)2 106(c cd)1 100 6 1080 4080 t +10 R f +(command:)1558 4080 w +10 B f +( AV V)2 72( WA)1 72( 2W)1 100(C CD DD DA A2)4 338 4 1080 4248 t +10 R f +( default value is)3 659( The)1 221(De\256nes the command to extract WAV data from the CD.)9 2351 3 1440 4368 t +10 B f +( av v)2 50( wa)1 50( a2 2w)2 122( dd da)2 106(c cd)1 100 5 4704 4368 t +10 R f +(.)5132 4368 w +10 B f +( AV V)2 72( WA)1 72( 2W)1 100(C CD DD DA A2)4 338 4 1080 4536 t +10 S f +(_ _)1 50 1 1662 4536 t +10 B f +( S)1 0( TS)1 56( PT)1 67(O OP)1 139 4 1712 4536 t +10 R f +( default)1 319( The)1 230( to the CDDA program while extracting from the CD.)9 2300(De\256nes the options passed)3 1111 4 1440 4656 t +(value is)1 316 1 1440 4776 t +10 S1 f +(\261 \261)1 65 1 1789 4776 t +10 B f +(H H)1 78 1 1854 4776 t +10 S1 f +(\261 \261)1 65 1 1965 4776 t +10 B f +(q q)1 56 1 2030 4776 t +10 R f +(.)2086 4776 w +10 B f +( P)1 0(M MP)1 155 2 1080 4944 t +10 S f +(_ _)1 50 1 1235 4944 t +10 B f +( R)1 0( ER)1 72( DE)1 67( OD)1 72(C CO)1 150 5 1285 4944 t +10 R f +( default value is)3 737( The)1 247( the audio data.)3 712(The encoder program used to compress)5 1736 4 1440 5064 t +10 B f +( c)1 0( nc)1 44( en)1 56(o og gg ge)3 194 4 4931 5064 t +10 R f +(for)5284 5064 w +10 B f +( a2 2o og gg g)5 200( dd da)2 106(c cd)1 100 3 1440 5184 t +10 R f +(and)1879 5184 w +10 B f +( e)1 0( me)1 44( am)1 83(l la)1 78 4 2056 5184 t +10 R f +(for)2294 5184 w +10 B f +( 3)1 0( p3)1 50( mp)1 56( a2 2m)2 133( dd da)2 106(c cd)1 100 6 2443 5184 t +10 R f +(.)2888 5184 w +10 B f +( P)1 0(M MP)1 155 2 1080 5352 t +10 S f +(_ _)1 50 1 1235 5352 t +10 B f +( S)1 0( NS)1 56( ON)1 72( IO)1 78( TI)1 39( PT)1 67(O OP)1 139 7 1285 5352 t +10 R f +( default is empty.)3 718( The)1 221(Options passed to the encoder program.)5 1626 3 1440 5472 t +10 B f +( X)1 0( IX)1 72( FI)1 39( EF)1 61( RE)1 67( PR)1 72( LE EP)2 128( IL)1 67(F FI)1 100 9 1080 5640 t +10 R f +( default \256le name is)4 928( The)1 248(The base \256lename part of the resulting audio \256les.)8 2280 3 1440 5760 t +10 B f +( -)1 0( K-)1 33( RA AC CK)3 222( TR)1 72($ $T)1 117 5 4956 5760 t +( og gg g)3 100( .o)1 50( X.)1 25( IX)1 72( FI)1 39( EF)1 61( RE)1 67( PR)1 72( LE EP)2 128( IL)1 67( FI)1 39($ $F)1 111 12 1440 5880 t +10 R f +(for)2305 5880 w +10 B f +( a2 2o og gg g)5 200( dd da)2 106(c cd)1 100 3 2455 5880 t +10 R f +(and)2895 5880 w +10 B f +( 3)1 0( p3)1 50( mp)1 56( .m)1 83( X.)1 25( IX)1 72( FI)1 39( EF)1 61( RE)1 67( PR)1 72( LE EP)2 128( IL)1 67( FI)1 39( $F)1 61( -$)1 50( K-)1 33( RA AC CK)3 222( TR)1 72($ $T)1 117 19 3073 5880 t +10 R f +(for)4421 5880 w +10 B f +( 3)1 0( p3)1 50( mp)1 56( a2 2m)2 133( dd da)2 106(c cd)1 100 6 4571 5880 t +10 R f +(if no)1 195 1 5050 5880 t +10 I f +(\256le)5278 5880 w +10 R f +( 1)1 1829( change: Version 3.0)3 850( Last)1 1509(SunOS 5.10)1 492 4 720 7680 t +cleartomark +showpage +restore +%%EndPage: 1 1 +%%Page: 2 2 +save +mark +2 pagesetup +10 R f +( \( 1 \))3 164( cdda2ogg)1 3839(User Commands)1 677 3 720 480 t +10 I f +(pre\256x)1440 960 w +10 R f +(argument was given on the command line.)6 1743 1 1700 960 t +9 B f +( S)1 0( LE ES)2 110( IL)1 60(F FI)1 90 4 720 1128 t +10 R f +(If the following \256les are present, then the scripts source them to set up local defaults:)15 3515 1 1080 1248 t +10 B f +( a2 2o og gg g)5 200( dd da)2 106( cd)1 56( /c)1 44( n/)1 28( in)1 56( bi)1 28( /b)1 56( y/)1 28( il ly)2 78( hi)1 28( ch)1 56( sc)1 44( /s)1 39( t/)1 28( pt)1 33( op)1 56(/ /o)1 78 18 1080 1416 t +10 R f +(To set up default values for)5 1135 1 1440 1536 t +10 B f +( a2 2o og gg g)5 200( dd da)2 106(c cd)1 100 3 2608 1536 t +10 R f +(.)3014 1536 w +10 B f +( 3)1 0( p3)1 50( mp)1 56( a2 2m)2 133( dd da)2 106( cd)1 56( /c)1 44( n/)1 28( in)1 56( bi)1 28( /b)1 56( y/)1 28( il ly)2 78( hi)1 28( ch)1 56( sc)1 44( /s)1 39( t/)1 28( pt)1 33( op)1 56(/ /o)1 78 21 1080 1704 t +10 R f +(To set up default values for)5 1135 1 1440 1824 t +10 B f +( 3)1 0( p3)1 50( mp)1 56( a2 2m)2 133( dd da)2 106(c cd)1 100 6 2608 1824 t +10 R f +(.)3053 1824 w +(The content may be set up to modify environment variables or to set up local defaults.)15 3560 1 1080 1992 t +9 B f +( O)1 0( SO)1 70( LS)1 50( AL)1 60( A)1 95( EE E)2 60(S SE)1 110 7 720 2280 t +10 B f +( av v)2 50( wa)1 50( a2 2w)2 122( dd da)2 106(c cd)1 100 5 1080 2400 t +10 R f +(\(1\),)1508 2400 w +10 B f +( d)1 0( rd)1 56( or)1 44( re ec co)3 138( dr)1 44(c cd)1 100 6 1682 2400 t +10 R f +(\(1\),)2064 2400 w +10 B f +( c)1 0( nc)1 44( en)1 56(o og gg ge)3 194 4 2238 2400 t +10 R f +(\(1\),)2532 2400 w +10 B f +( e)1 0( me)1 44( am)1 83(l la)1 78 4 2706 2400 t +10 R f +(\(1\).)2911 2400 w +9 B f +( S)1 0( TE ES)2 110( OT)1 60(N NO)1 135 4 720 2568 t +10 R f +( 1, a \256le name with track number 00 is created with)11 2206(If a CD contains a hidden audio track before track)9 2114 2 1080 2688 t +(the content of the hidden track.)5 1282 1 1080 2808 t +(The program)1 534 1 1080 2976 t +10 B f +( c)1 0( nc)1 44( en)1 56(o og gg ge)3 194 4 1655 2976 t +10 R f +(\(1\) is part of the)4 711 1 1949 2976 t +10 B f +( s)1 0( ls)1 39( oo ol)2 78( -t to)2 83( s-)1 33( is)1 39( bi)1 28( rb)1 56(v vo or)2 144 9 2702 2976 t +10 R f +(project See)1 463 1 3244 2976 t +10 B f +( m)1 0( om)1 83( co)1 50( .c)1 44( s.)1 25( is)1 39( bi)1 28( rb)1 56( vo or)2 94( .v)1 50( ww ww w.)3 169( // /w)2 100( :/)1 28( p:)1 33( tt tp)2 89(h ht)1 89 16 3749 2976 t +10 R f +(for more infor-)2 632 1 4768 2976 t +(mation.)1080 3096 w +(The program)1 534 1 1080 3336 t +10 B f +( e)1 0( me)1 44( am)1 83(l la)1 78 4 1655 3336 t +10 R f +(\(1\) is part of the)4 711 1 1860 3336 t +10 B f +( e)1 0( me)1 44( am)1 83(l la)1 78 4 2613 3336 t +10 R f +(project. See)1 521 1 2860 3336 t +10 B f +( /)1 0( t/)1 28( et)1 33( ne)1 44( .n)1 56( e.)1 25( ge)1 44( rg)1 50( or)1 44( fo)1 50( rc ce ef)3 121( ur)1 44( ou)1 56( so)1 50( .s)1 39( e.)1 25( me)1 44( am)1 83( // /l la)3 106( :/)1 28( p:)1 33( tt tp)2 89(h ht)1 89 23 3423 3336 t +10 R f +(for more informa-)2 754 1 4646 3336 t +(tion.)1080 3456 w +9 B f +( R)1 0( HO OR)2 135( TH)1 70(A AU UT)2 190 4 720 3624 t +10 R f +(The \256rst versions of the scripts have been based on a news article by Tom Kludy.)15 3370 1 1080 3744 t +( 2)1 1829( change: Version 3.0)3 850( Last)1 1509(SunOS 5.10)1 492 4 720 7680 t +cleartomark +showpage +restore +%%EndPage: 2 2 +%%Trailer +done +%%DocumentFonts: Times-Roman Times-Bold Times-Italic Symbol +%%Pages: 2 diff -Nru cdrtools-2.01.01a33/doc/cdda2wav.man cdrtools-3.02a09/doc/cdda2wav.man --- cdrtools-2.01.01a33/doc/cdda2wav.man 2002-12-01 13:51:47.000000000 +0000 +++ cdrtools-3.02a09/doc/cdda2wav.man 2010-05-30 15:55:17.000000000 +0000 @@ -1,802 +1,1584 @@ -CDDA2WAV(1) CDDA2WAV(1) + + + +User Commands CDDA2WAV(1) NNAAMMEE - cdda2wav - a sampling utility that dumps CD audio data - into wav sound files + cdda2wav - dumps CD audio data into sound files with extra + data verification + +SSYYNNOOPPSSIISS + ccddddaa22wwaavv [ _o_p_t_i_o_n_s ][ ddeevv==_d_e_v_i_c_e ] [_f_i_l_e(_s) or _d_i_r_e_c_t_o_r_i_e_s] + +DDEESSCCRRIIPPTTIIOONN + ccddddaa22wwaavv can retrieve audio tracks from CDROM drives that + are capable of reading audio data digitally to the host via + SCSI (CCDDDDAA). + + As ccddddaa22wwaavv implements strategies to work around typical + defects on audio CDs it reads many disks that cannot be read + by other software. As ccddddaa22wwaavv may be told to use lliibb-- + ppaarraannooiiaa (see -ppaarraannooiiaa option below) to verify the data + that has been read from the medium, it delivers superior + quality even if the medium is dusty, scratched or if other + problems occur. + + As ccddddaa22wwaavv may be directed to write the audio data to + stdout, it writes all it's informational output to stderr by + default. See oouutt-ffdd==_d_e_s_c_r_i_p_t_o_r option below. + + DDeeffaauulltt sseettttiinnggss + CCddddaa22wwaavv defaults to reead the first audio track from the + medium and the default verbose level is set to + -vvttoocc,,ssuummmmaarryy,,sseeccttoorrss,,ttiittlleess and ccddddaa22wwaavv by default writes + **..iinnff files. To extract all audio tracks with quality + verification, it is recommended to call: + + ccddddaa22wwaavv --vvaallll ccddddbb==00 --ppaarraannooiiaa --BB + + DDeevviiccee nnaammiinngg + Most users do not need to care about device naming at all. + If no ddeevv== option was specified, ccddddaa22wwaavv implements aauuttoo + ttaarrggeett support and automagically finds the drive in case + that exactly one CD-ROM type drive is available in the sys- + tem. In case that more than one CD-ROM type drive exists on + the system, a list of possible device name parameters may be + retrieved with ccddddaa22wwaavv -ssccaannbbuuss or from the target example + from the output of ccddddaa22wwaavv ddeevv==hheellpp, then the ddeevv== parame- + ter may be set based on the device listing. + + The _d_e_v_i_c_e parameter to the ddeevv== option explained below + refers to _s_c_s_i_b_u_s/_t_a_r_g_e_t/_l_u_n of the CD/DVD/BluRay-Recorder. + If a file /etc/default/cdrecord exists, the parameter to the + ddeevv== option may also be a drive name label in said file (see + FILES section). + + + + + + +SunOS 5.10 Last change: Version 3.0 1 + + + + + + +User Commands CDDA2WAV(1) + + + +OOPPTTIIOONNSS + IInnffoorrmmaattiivvee ooppttiioonnss + -hh + + -hheellpp + display version information for cdda2wav on standard + output. + + -vveerrssiioonn + display version and Copyright information. + + AAuuddiioo ooppttiioonnss + -aa _d_i_v_i_d_e_r + + -ddiivviiddeerr _d_i_v_i_d_e_r + sets rate to 44100Hz / _d_i_v_i_d_e_r. Possible values are + listed with the -RR option. + + The default divider value is 1. + + -BB + + -bbuullkk + + -aallllttrraacckkss + copies each track into a separate file. + + The default is not to extract all tracks. + + -bb _b_i_t_s + + -bbiittss-ppeerr-ssaammppllee _b_i_t_s + sets _b_i_t_s per sample per channel: 88, 1122 or 1166. + + The default is 16 bits per sample. + + -cc _c_h_a_n_n_e_l_s + + -cchhaannnneellss _c_h_a_n_n_e_l_s + use: + + 11 for mono recording + + 22 for stereo recording + + ss for stereo recording with both channels swapped + + The default is to do stereo recording. + + -CC _e_n_d_i_a_n_e_s_s + + -ccddrroomm-eennddiiaanneessss _e_n_d_i_a_n_e_s_s + + + +SunOS 5.10 Last change: Version 3.0 2 + + + + + + +User Commands CDDA2WAV(1) + + + + sets endianess of the input samples to 'little', 'big', + 'machine' or 'guess' to override defaults. The value + 'machine' or 'host' is evaluated as the actual byte + order of the host CPU in the current OS. + + The default is to detect cdrom endianess automatically. + + -ccuueeffiillee + Create a CDRWIN compatible CUE file. A CUE file that + completely follows the CDRWIN documentation can only be + used to create 1:1 copies if there is a single file + with audio data for the whole disk. The *.inf file + format implements more audio CD features than the + CDRWIN CUE format and it allows to create 1:1 copies if + there is one audio data file per track. Use the CUE + file format for meta data only if you really need this + format. + + To allow ccddddaa22wwaavv to create CUE files, you must also + specify -tt aallll to switch ccddddaa22wwaavv into a mode that + creates a single audio data file for the whole CD. + + -TT + + -ddeeeemmpphhaassiizzee + undo the effect of pre-emphasis in the input samples. + + The default is to keep the audio data in the same state + as on the medium and to mark the pre-emphasis state in + the **..iinnff files. + + -LL _c_d_d_b _m_o_d_e + + -ccddddbb _c_d_d_b _m_o_d_e + does a cddbp album- and track title lookup based on the + cddb id. The parameter cddb mode defines how multiple + entries shall be handled. + _______________________________________________________________________ + | Parameter| Description | + |___________|____________________________________________________________| + | -1| disable cddb queries. This is the default. | + | 0| interactive mode. The user selects the entry to use. | + | 1| first fit mode. The first entry is taken unconditionally.| + |___________|____________________________________________________________| + + ccddddbbpp-sseerrvveerr==_s_e_r_v_e_r_n_a_m_e + sets the server to be contacted for title lookups. + + ccddddbbpp-ppoorrtt==_p_o_r_t_n_u_m_b_e_r + sets the port number to be used for title lookups. + + -dd _d_u_r_a_t_i_o_n + + + +SunOS 5.10 Last change: Version 3.0 3 + + + + + + +User Commands CDDA2WAV(1) + + + + -dduurraattiioonn _d_u_r_a_t_i_o_n + sets recording time in seconds or frames. Frames (sec- + tors) are indicated by a 'f' suffix (like 75f for 75 + sectors). 00 sets the time for whole track. + + The default is to extract the whole track. + + -EE _e_n_d_i_a_n_e_s_s + + -oouuttppuutt-eennddiiaanneessss _e_n_d_i_a_n_e_s_s + sets endianess of the output samples to 'little', 'big' + or 'machine' to override the default which is 'network + byte order' (big endian). The value 'machine' or + 'host' is evaluated as the actual byte order of the + host CPU in the current OS. + + -FF + + -ffiinndd-eexxttrreemmeess + finds extreme amplitudes in samples. + + -GG + + -ffiinndd-mmoonnoo + finds if input samples are in mono. + + -gg + + -gguuii formats the output to be better parsable by gui fron- + tends. + + -HH + + -nnoo-iinnffooffiillee + does not write an info file, a cddb file and no cdtext + file. + + -ii _i_n_d_e_x + + -iinnddeexx _i_n_d_e_x + selects the start index. + + -JJ + + -iinnffoo-oonnllyy + does not write to a file, it just gives information + about the disc. + + -MM + + -mmdd55 enables calculation of MD-5 checksum for all audio + bytes from the beginning of a track. The audio header + + + +SunOS 5.10 Last change: Version 3.0 4 + + + + + + +User Commands CDDA2WAV(1) + + + + is skipped when calculating the MD-5 checksum to allow + to compare MD-5 sums even for files with different + header type. + + -mm + + -mmoonnoo + sets to mono recording. + + -nnoo-hhiiddddeenn-ttrraacckk + Ignore hidden tracks on the CD. By default, ccddddaa22wwaavv + checks whether there might be a hidden track before + track 1. This check may take a few seconds and thus + can be disabled with -nnoo-hhiiddddeenn-ttrraacckk. + + -NN + + -nnoo-wwrriittee + does not write to a file, it just reads (e.g. for + debugging purposes). If this option is used together + with the -ee option, the CD is read and the audio con- + tent is played back to the sound device without creat- + ing output files with audio data. + + -nnoo-tteexxttddeeffaauullttss + By default, ccddddaa22wwaavv replaces empty CD-Text fields from + tracks by the related CD-Text fiel for the whole CD in + case this is defined. If the option -nnoo-tteexxttddeeffaauullttss is + used, ccddddaa22wwaavv leaves the track related CD-Text fields + empty in such a case. + + -nnoo-tteexxttffiillee + If ccddddaa22wwaavv encounters useful CD-Text information on + the CD, it writes a .cdtext file. The option + -nnoo-tteexxttffiillee allows to suppress the creation of the + .cdtext file. + + -oo _o_f_f_s_e_t + + -ooffffsseett _o_f_f_s_e_t + starts _o_f_f_s_e_t sectors behind start track (one sector + equivalents 1/75 seconds). + + -OO _a_u_d_i_o_t_y_p_e + + -oouuttppuutt-ffoorrmmaatt _a_u_d_i_o_t_y_p_e + can be _w_a_v (for wav files) or _a_i_f_f (for apple/sgi aiff + files) or _a_i_f_c (for apple/sgi aifc files) or _a_u or _s_u_n + (for sun .au PCM files) or _c_d_r or _r_a_w (for headerless + files to be used for cd writers). + + The default output format is now wwaavv for all platforms + + + +SunOS 5.10 Last change: Version 3.0 5 + + + + + + +User Commands CDDA2WAV(1) + + + + as this file format has become the most common format. + Note that former versions of ccddddaa22wwaavv made an exception + and by default did create aauu type files on Solaris. + + -pp _p_e_r_c_e_n_t_a_g_e + + -ppllaayybbaacckk-rreeaallttiimmee _p_e_r_c_e_n_t_a_g_e + changes pitch of audio data copied to sound device. + + -PP _s_e_c_t_o_r_s + + -sseett-oovveerrllaapp _s_e_c_t_o_r_s + sets the initial number of overlap _s_e_c_t_o_r_s for jitter + correction in non-paranoia mode. Note that overlapped + reads re handled differently in paranoia mode. + + The default overlap in non-paranoia mode is 1. + + -ppaarraannooiiaa + use the paranoia library as a filter on top of + cdda2wav's routines for reading. In ppaarraannooiiaa mode, the + latency time for the -iinntteerraaccttiivvee mode is increased to + typically 5..10 seconds. This is caused by the fact + that the ppaarraannooiiaa code reads anything at least twice + and in between needs to take care of emptying the cache + RAM of the CD-ROM drive. + + If the ppaarraannooiiaa mode is used, ccddddaa22wwaavv displays some + quality statistics for each extracted track. The fol- + lowing items appear in the list: + ___________________________________________________________________ + | Value| Description | + |_________|__________________________________________________________| + | rderr| Number of hard read errors | + | skip| Number of sectors skipped due to exhausted retries | + | atom| Number of intra sector jitters (frame jitters) detected| + | edge| Number of jitters between sectors detected | + | drop| Number of dropped bytes fixed | + | dup| Number of duplicate bytes fixed | + | drift| Number of drifts detected | + | overlap| Number of dynamic overlap size raises | + |_________|__________________________________________________________| + + + + + + + + + + + + + +SunOS 5.10 Last change: Version 3.0 6 + + + + + + +User Commands CDDA2WAV(1) + + + + -ppaarraaooppttss==_l_i_s_t + _L_i_s_t is a comma separated list of suboptions passed to + the paranoia library. +_______________________________________________________________________________ +| Option| Description | +_|_______________|_______________________________________________________________| +| help| lists all paranoia options. | +| disable| disables paranoia mode. Libparanoia is still being used | +| no-verify| switches verify off, and static overlap on | +|retries=amount| set the number of maximum retries per sector | +|overlap=amount| set the number of sectors used for statical paranoia overlap| +|minoverlap=amt| set the min. number of sectors for dynamic paranoia overlap | +|maxoverlap=amt| set the max. number of sectors for dynamic paranoia overlap | +| proof| set maxoverlap=_s_e_c_t_o_r_s-_p_e_r-_r_e_q_u_e_s_t-1,retries=200 | +_|_______________|_______________________________________________________________| + + -qq + + -qquuiieett + quiet operation, no screen output. + + -rr _r_a_t_e + + -rraattee _r_a_t_e + sets _r_a_t_e in samples per second. Possible values are + listed with the -RR option. + + -RR + + -dduummpp-rraatteess + shows a list of all sample rates and their dividers. + + -SS _s_p_e_e_d + + -ssppeeeedd _s_p_e_e_d + sets the cdrom device to one of the selectable speeds + for reading. For maximum extraction quality, it is + recommended to use speed values of 8 or below. + + The default is to extract at maximum speed. + + -ss + + -sstteerreeoo + sets to stereo recording. + + -ssttaarrtt-sseeccttoorr _s_e_c_t_o_r + set an absolute start sector. This option is mutually + exclusive to -ttrraacckk and -ooffffsseett. + + + + + + +SunOS 5.10 Last change: Version 3.0 7 + + + + + + +User Commands CDDA2WAV(1) + + + + -tt _t_r_a_c_k[+_e_n_d_t_r_a_c_k] + + -ttrraacckk _t_r_a_c_k[+_e_n_d_t_r_a_c_k] + + -ttrraacckk _t_r_a_c_k++mmaaxx + + -ttrraacckk aallll + selects the start track and optionally the end track. + If -tt aallll is used, all audio tracks are selected. If + -tt 22++mmaaxx is used, all audio tracks starting with track + 2 are selected. + + -vv _i_t_e_m_l_i_s_t + + -vveerrbboossee-lleevveell _i_t_e_m_l_i_s_t + Retrieves and prints verbose information about the CD. + LLeevveell is a list of comma separated suboptions. Each + suboption controls the type of information to be + reported. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +SunOS 5.10 Last change: Version 3.0 8 + + + + + + +User Commands CDDA2WAV(1) + + + +_______________________________________________________________________________ +| Suboption| Description | +_|_____________|_________________________________________________________________| +| !| invert the meaning of the following string | +| not| invert the meaning of the following string | +| disable| no information is given, warnings appear however | +| all| all information is given | +| toc| show table of contents | +| summary| show a summary of the recording parameters | +| indices| determine and display index offsets | +| catalog| retrieve and display the media catalog number MCN | +| mcn| retrieve and display the media catalog number MCN | +| trackid| retrieve and display all Intern. Standard Recording Codes ISRC| +| isrc| retrieve and display all Intern. Standard Recording Codes ISRC| +| sectors| show the table of contents in start sector notation | +| titles| show the table of contents with track titles (when available) | +|audio-tracks| list the audio tracks and their start sectors | +_|_____________|_________________________________________________________________| + + The default value for the verbose-level is + ttoocc,,ssuummmmaarryy,,sseeccttoorrss,,ttiittlleess . + + -ww + + -wwaaiitt + waits for signal, then start recording. + + -xx + + -mmaaxx sets maximum (CD) quality. + + SSCCSSII ooppttiioonnss + ddeevv==_d_e_v_i_c_e + + -DD _d_e_v_i_c_e + + -ddeevviiccee _d_e_v_i_c_e + uses _d_e_v_i_c_e as the source for CDDA reading. For exam- + ple /dev/cdrom for the ccooookkeedd__iiooccttll interface and + Bus,ID,Lun for the ggeenneerriicc__ssccssii interface. The _d_e_v_i_c_e + has to correspond with the interface setting if given + (see -II and -iinntteerrffaaccee option below). + + If no -II or -iinntteerrffaaccee option has been specified, the + interface setting is derived from the device name syn- + tax. A device name that is in the form Bus,ID,Lun or + contains a colon (':') defaults to the ggeenneerriicc__ssccssii + interface. + + Using the ccooookkeedd__iiooccttll is not recommended as this makes + ccddddaa22wwaavv mainly depend on the audio extraction quality + of the operating system which is usually extremely bad. + + + +SunOS 5.10 Last change: Version 3.0 9 + + + + + + +User Commands CDDA2WAV(1) + + + + For this reason, avoid using parameters like + ddeevv==/dev/cdrom for the device. + + The setting of the environment variable CCDDDDAA__DDEEVVIICCEE is + overridden by this option. + + If no ddeevv== option is present, or if the ddeevv== option + only contains a transport specifyer but no address, + ccddddaa22wwaavv tries to scan the SCSI address space for CD- + ROM drives. If exactly one is found, this is used by + default. + + For more information, see the description of the ddeevv== + option from ccddrreeccoorrdd(1). + + ddeebbuugg==# + + ddeebbuugg--ssccssii==# + Set the debug level for the lliibbssccgg SCSI OS abstraction + layer. + + kkddeebbuugg==# + + kkddeebbuugg--ssccssii==# + + kkdd==# Set the kernel debug level for the kernel driver called + by the lliibbssccgg SCSI OS abstraction layer. This option is + not supported on all platforms. + + -ssccaannbbuuss + Scan all SCSI devices on all SCSI busses and print the + inquiry strings. This option may be used to find SCSI + address of the CD/DVD-Recorder on a system. The + numbers printed out as labels are computed by: bbuuss ** + 110000 ++ ttaarrggeett + + ttss==# Set the maximum transfer size for a single SCSI command + to #. The syntax for the ttss== option is the same as for + cdrecord fs=# or sdd bs=#. + + If no ttss== option has been specified, ccddddaa22wwaavv defaults + to a transfer size of 3 MB. If libscg gets lower values + from the operating system, the value is reduced to the + maximum value that is possible with the current operat- + ing system. Sometimes, it may help to further reduce + the transfer size or to enhance it, but note that it + may take a long time to find a better value by experi- + menting with the ttss== option. + + Some operating systems return wrong values for the max- + imum transfer size. If the transfer totally hangs or + resets occur, it may be appropriate to reduce the + + + +SunOS 5.10 Last change: Version 3.0 10 + + + + + + +User Commands CDDA2WAV(1) + + + + transfer size to less than 64 kB or even less than 32 + kB. + + -VV + + -vveerrbboossee-ssccssii + enable SCSI command logging to the console. This is + mainly used for debugging. + + -QQ + + -ssiilleenntt-ssccssii + suppress SCSI command error reports to the console. + This is mainly used for guis. + + + OOSS IInntteerrffaaccee ooppttiioonnss + -AA _a_u_x_d_e_v_i_c_e + + -aauuxxddeevviiccee _a_u_x_d_e_v_i_c_e + uses _a_u_x_d_e_v_i_c_e as CDROM drive to allow to send the + CDROMMULTISESSION ioctl on Linux although the + ggeenneerriicc__ssccssii interface is in use. + + -II _i_n_t_e_r_f_a_c_e + + -iinntteerrffaaccee _i_n_t_e_r_f_a_c_e + specifies the _i_n_t_e_r_f_a_c_e to use for accessing the CDROM: + + + ggeenneerriicc__ssccssii + for sending SCSI commands directly to the drive. + + ccooookkeedd__iiooccttll + for using the programming interface supplied by + the OS kernel. + + The latter is not recommended as it gives lower quality + and only works on a limited number of platforms. + + + + + + + + + + + + + + + + +SunOS 5.10 Last change: Version 3.0 11 + + + + + + +User Commands CDDA2WAV(1) -SSYYNNOOPPSSIISS - ccddddaa22wwaavv [--cc _c_h_a_n_s] [--ss] [--mm] [--bb _b_i_t_s] [--rr _r_a_t_e] [--aa - _d_i_v_i_d_e_r] [--tt _t_r_a_c_k[_+_e_n_d_t_r_a_c_k]] [--ii _i_n_d_e_x] [--oo _o_f_f_s_e_t] [--dd - _d_u_r_a_t_i_o_n] [--xx] [--qq] [--ww] [--vv _o_p_t_l_i_s_t] [--VV] [--QQ] [--JJ] [--LL - _c_d_d_b_m_o_d_e] [--RR] [--PP _s_e_c_t_o_r_s] [--FF] [--GG] [--TT] [--ee] [--pp _p_e_r_- - _c_e_n_t_a_g_e] [--nn _s_e_c_t_o_r_s] [--ll _b_u_f_f_e_r_s] [--NN] [--JJ] [--HH] [--gg] - [--BB] [--DD _d_e_v_i_c_e] [--AA _a_u_x_d_e_v_i_c_e] [--II _i_n_t_e_r_f_a_c_e] [--OO _a_u_d_i_o_- - _t_y_p_e] [--CC _i_n_p_u_t_-_e_n_d_i_a_n_e_s_s] [--EE _o_u_t_p_u_t_-_e_n_d_i_a_n_e_s_s] [--MM - _c_o_u_n_t] [--SS _s_p_e_e_d] [--ppaarraannooiiaa] [ccddddbbpp--sseerrvveerr==sseerrvveerrnnaammee] - [ccddddbbpp--ppoorrtt==ppoorrttnnuummbbeerr] [_f_i_l_e_n_a_m_e_(_s_) or _d_i_r_e_c_t_o_r_i_e_s] -DDEESSCCRRIIPPTTIIOONN - ccddddaa22wwaavv can retrieve audio tracks from CDROM drives (see - README for a list of drives) that are capable of reading - audio data digitally to the host (CCDDDDAA). -OOPPTTIIOONNSS - --DD _d_e_v_i_c_e _-_-_d_e_v _-_-_d_e_v_i_c_e - uses ddeevviiccee as the source for CDDA reading. For - example /dev/cdrom for the ccooookkeedd__iiooccttll interface - and Bus,ID,Lun for the ggeenneerriicc__ssccssii interface. The - ddeevviiccee has to correspond with the interface setting - (see below). The setting of the environment vari- - able CCDDDDAA__DDEEVVIICCEE is overridden by this option. - - --AA _a_u_x_d_e_v_i_c_e _-_-_a_u_x_d_e_v_i_c_e - uses aauuxxddeevviiccee as CDROM drive for ioctl usage. - - --II _i_n_t_e_r_f_a_c_e _-_-_i_n_t_e_r_f_a_c_e - specifies the interface for CDROM access: - ggeenneerriicc__ssccssii or (on Linux, and FreeBSD systems) - ccooookkeedd__iiooccttll. - - --cc _c_h_a_n_n_e_l_s _-_-_c_h_a_n_n_e_l_s - uses 11 for mono, or 22 for stereo recording, or ss - for stereo recording with both channels swapped. - - --ss ----sstteerreeoo - sets to stereo recording. - - --mm ----mmoonnoo - sets to mono recording. - - --xx ----mmaaxx - sets maximum (CD) quality. - - --bb _b_i_t_s _-_-_b_i_t_s_-_p_e_r_-_s_a_m_p_l_e - sets bits per sample per channel: 88, 1122 or 1166. - - --rr _r_a_t_e _-_-_r_a_t_e - sets rate in samples per second. Possible values - are listed with the --RR option. - - --aa _d_i_v_i_d_e_r _-_-_d_i_v_i_d_e_r - sets rate to 44100Hz / divider. Possible values - are listed with the --RR option. - - --RR ----dduummpp--rraatteess - shows a list of all sample rates and their - dividers. - - --PP sseeccttoorrss ----sseett--oovveerrllaapp - sets the initial number of overlap _s_e_c_t_o_r_s for jit- - ter correction. - - --nn _s_e_c_t_o_r_s _-_-_s_e_c_t_o_r_s_-_p_e_r_-_r_e_q_u_e_s_t - reads _s_e_c_t_o_r_s per request. - - --ll _b_u_f_f_e_r_s _-_-_b_u_f_f_e_r_s_-_i_n_-_r_i_n_g - uses a ring buffer with _b_u_f_f_e_r_s total. - - --tt _t_r_a_c_k_+_e_n_d_t_r_a_c_k _-_-_t_r_a_c_k - selects the start track and optionally the end - track. - - --ii _i_n_d_e_x _-_-_i_n_d_e_x - selects the start index. - - --oo _o_f_f_s_e_t _-_-_o_f_f_s_e_t - starts _o_f_f_s_e_t sectors behind start track (one sec- - tor equivalents 1/75 seconds). - - --OO aauuddiioottyyppee ----oouuttppuutt--ffoorrmmaatt - can be _w_a_v (for wav files) or _a_i_f_f (for apple/sgi - aiff files) or _a_i_f_c (for apple/sgi aifc files) or - _a_u or _s_u_n (for sun .au PCM files) or _c_d_r or _r_a_w - (for headerless files to be used for cd writers). - - --CC _e_n_d_i_a_n_e_s_s _-_-_c_d_r_o_m_-_e_n_d_i_a_n_e_s_s - sets endianess of the input samples to 'little', - 'big' or 'guess' to override defaults. - - --EE _e_n_d_i_a_n_e_s_s _-_-_o_u_t_p_u_t_-_e_n_d_i_a_n_e_s_s - sets endianess of the output samples to 'little' or - 'big' to override defaults. - - --dd _d_u_r_a_t_i_o_n _-_-_d_u_r_a_t_i_o_n - sets recording time in seconds or frames. Frames - (sectors) are indicated by a 'f' suffix (like 75f - for 75 sectors). 00 sets the time for whole track. - - --BB ----bbuullkk ----aallllttrraacckkss - copies each track into a seperate file. - - --ww ----wwaaiitt - waits for signal, then start recording. - - --FF ----ffiinndd--eexxttrreemmeess - finds extrem amplitudes in samples. - - --GG ----ffiinndd--mmoonnoo - finds if input samples are in mono. - - --TT ----ddeeeemmpphhaassiizzee - undo the effect of pre-emphasis in the input sam- - ples. - - --ee ----eecchhoo - copies audio data to sound device e.g. //ddeevv//ddsspp. - - --pp ppeerrcceennttaaggee ----sseett--ppiittcchh - changes pitch of audio data copied to sound device. - - --vv iitteemmlliisstt ----vveerrbboossee--lleevveell - prints verbose information about the CD. LLeevveell is - a list of comma seperated suboptions. Each subop- - tion controls the type of information to be - reported. - +----------+----------------------------------------------------------------+ - |Suboption | Description | - +----------+----------------------------------------------------------------+ - | disable | no information is given, warnings appear however | - | all | all information is given | - | toc | show table of contents | - | summary | show a summary of the recording parameters | - | indices | determine and display index offsets | - | catalog | retrieve and display the media catalog number MCN | - | trackid | retrieve and display all Intern. Standard Recording Codes ISRC | - | sectors | show the table of contents in start sector notation | - | titles | show the table of contents with track titles (when available) | - +----------+----------------------------------------------------------------+ - --NN ----nnoo--wwrriittee - does not write to a file, it just reads (for debug- - ging purposes). - - --JJ ----iinnffoo--oonnllyy - does not write to a file, it just gives information - about the disc. - - --LL ccddddbb mmooddee ----ccddddbb - does a cddbp album- and track title lookup based on - the cddb id. The parameter cddb mode defines how - multiple entries shall be handled. - - ccddddbbpp--sseerrvveerr==sseerrvveerrnnaammee - sets the server to be contacted for title lookups. - - ccddddbbpp--ppoorrtt==ppoorrttnnuummbbeerr - sets the port number to be used for title lookups. - - --HH ----nnoo--iinnffooffiillee - does not write an info file and a cddb file. - - --gg ----gguuii - formats the output to be better parsable by gui - frontends. - - --MM ccoouunntt ----mmdd55 - enables calculation of MD-5 checksum for 'count' - bytes from a beginning of a track. - - --SS ssppeeeedd ----ssppeeeedd - sets the cdrom device to one of the selectable - speeds for reading. - - --qq ----qquuiieett - quiet operation, no screen output. - - --VV ----vveerrbboossee--SSCCSSII - enable SCSI command logging to the console. This is - mainly used for debugging. - - --QQ ----ssiilleenntt--SSCCSSII - suppress SCSI command error reports to the console. - This is mainly used for guis. - - --ppaarraannooiiaa - use the paranoia library instead of cdda2wav's rou- - tines for reading. - - --hh ----hheellpp - display version of cdda2wav on standard output. - - Defaults depend on the - MMaakkeeffiillee and eennvviirroonnmmeenntt vvaarriiaabbllee settings (cur- - rently CCDDDDAA__DDEEVVIICCEE ). + -iinntteerraaccttiivvee + Go into interactive mode that reads commands from ssttddiinn + and writes the textual replies to ssttddeerrrr, or the file + descriptor that has been specified by the oouutt-ffdd + option. This mode has been introduced mainly to allow + cdrecord to be called by gstreamer plugins. + + If ccddddaa22wwaavv was called with the option -iinntteerraaccttiivvee, it + reads the TOC from the medium and then waits for com- + mand input as if it has been issued a ssttoopp command. If + the next command is a ccoonntt command, then ccddddaa22wwaavv + extracts the whole audio part of the medium. If the + next command is a rreeaadd command, then ccddddaa22wwaavv starts + extracting from the position that was indicated by the + rreeaadd command parameter. +____________________________________________________________________________ +|Command| Parameters | Description | +_|________|________________________|___________________________________________| +| cont | | continue processing at current position | +| exit | | exit processing | +| help | | print command help and wait for input | +| quit | | exit processing | +| read | sectors _s_e_c_t_o_r _n_u_m_b_e_r| read sectors starting from _s_e_c_t_o_r _n_u_m_b_e_r| +| read | tracks _t_r_a_c_k _n_u_m_b_e_r | read sectors starting from _t_r_a_c_k _n_u_m_b_e_r | +| stop | | stop processing and wait for new input | +_|________|________________________|___________________________________________| + + oouutt-ffdd==_d_e_s_c_r_i_p_t_o_r + Redirect informational output to the file descriptor + named by ddeessccrriippttoorr. The parameter ddeessccrriippttoorr speci- + fies a UNIX file descriptor number. By default, + ccddddaa22wwaavv sends informational output to ssttddeerrrr. + Redirecting the informational output to a different + file descriptor helps gui's and other programs that + call ccddddaa22wwaavv via pipes. + + aauuddiioo-ffdd==_d_e_s_c_r_i_p_t_o_r + In case that the file name for the audio data file is + "-", redirect audio output to the file descriptor named + by ddeessccrriippttoorr. The parameter ddeessccrriippttoorr specifies a + UNIX file descriptor number. By default, ccddddaa22wwaavv + sends audio data to ssttddoouutt if the output is not + directed into a file. Redirecting the audio output to + a different file descriptor helps gui's and other pro- + grams that call ccddddaa22wwaavv via pipes. + + -nnoo--ffoorrkk + Do not fork for extended buffering. If -nnoo--ffoorrkk is used + and ccddddaa22wwaavv is used to play back audio CDs in ppaarraannooiiaa + mode, the playback is not always uninterrupted due to + lack of buffering. On the other side, allowing + ccddddaa22wwaavv to fork will increase the latency time for the + + + +SunOS 5.10 Last change: Version 3.0 12 + + + + + + +User Commands CDDA2WAV(1) + + + + -iinntteerraaccttiivvee mode. + + -ee + + -eecchhoo + copies audio data to sound device from the operating + system e.g. //ddeevv//ddsspp. + + ssoouunndd-ddeevviiccee==_s_o_u_n_d_d_e_v_i_c_e + set an alternate sound device to use for -ee. + + -nn _s_e_c_t_o_r_s + + -sseeccttoorrss-ppeerr-rreeqquueesstt _s_e_c_t_o_r_s + reads _s_e_c_t_o_r_s per request. + + -ll _b_u_f_f_e_r_s + + -bbuuffffeerrss-iinn-rriinngg _b_u_f_f_e_r_s + uses a ring buffer with _b_u_f_f_e_r_s total. + EENNVVIIRROONNMMEENNTT VVAARRIIAABBLLEESS - CCDDDDAA__DDEEVVIICCEE is used to set the device name. The device - naming is compatible with Jörg Schilling's cdrecord pack- - age. - - CCDDDDBBPP__SSEERRVVEERR - is used for cddbp title lookups when supplied. - - CCDDDDBBPP__PPOORRTT - is used for cddbp title lookups when supplied. - - RRSSHH If the RRSSHH environment variable is present, the - remote connection will not be created via rrccmmdd(3) - but by calling the program pointed to by RRSSHH. Use - e.g. RRSSHH==/usr/bin/ssh to create a secure shell - connection. - - Note that this forces ccddddaa22wwaavv to create a pipe to - the rrsshh((11)) program and disallows ccddddaa22wwaavv to - directly access the network socket to the remote - server. This makes it impossible to set up perfor- - mance parameters and slows down the connection com- - pared to a rroooott initiated rrccmmdd((33)) connection. - - RRSSCCSSII If the RRSSCCSSII environment variable is present, the - remote SCSI server will not be the program - //oopptt//sscchhiillyy//ssbbiinn//rrssccssii but the program pointed to - by RRSSCCSSII. Note that the remote SCSI server program - name will be ignored if you log in using an account - that has been created with a remote SCSI server - program as login shell. - -RREETTUURRNN VVAALLUUEESS - ccddddaa22wwaavv uses the following exit codes to indicate various - degress of success: -+---------+--------------------------------------------------------------------+ -|Exitcode | Description | -+---------+--------------------------------------------------------------------+ -| 0 | no errors encountered, successful operation. | -| 1 | usage or syntax error. cdda2wav got inconsistent arguments. | -| 2 | permission (un)set errors. permission changes failed. | -| 3 | read errors on the cdrom/burner device encountered. | -| 4 | write errors while writing one of the output files encountered. | -| 5 | errors with soundcard handling (initialization/write). | -| 6 | errors with stat() system call on the read device (cooked ioctl). | -| 7 | pipe communication errors encountered (in forked mode). | -| 8 | signal handler installation errors encountered. | -| 9 | allocation of shared memory failed (in forked mode). | -| 10 | dynamic heap memory allocation failed. | -| 11 | errors on the audio cd medium encountered. | -| 12 | device open error in ioctl handling detected. | -| 13 | race condition in ioctl interface handling detected. | -| 14 | error in ioctl() operation encountered. | -| 15 | internal error encountered. Please report back!!! | -| 16 | error in semaphore operation encountered (install / request). | -| 17 | could not get the scsi transfer buffer. | -| 18 | could not create pipes for process communication (in forked mode). | -+---------+--------------------------------------------------------------------+ + Some defaults for ccddddaa22wwaavv are compiled in and depend on the + MMaakkeeffiillee others on the eennvviirroonnmmeenntt vvaarriiaabbllee settings. + + CCDDDDAA__DDEEVVIICCEE + is used to set the device name. The device naming is + compatible with ccddrreeccoorrdd(1). + + CCDDDDBBPP__SSEERRVVEERR + is used for cddbp title lookups when supplied. + + CCDDDDBBPP__PPOORRTT + is used for cddbp title lookups when supplied. + + RRSSHH If the RRSSHH environment variable is present, the remote + connection will not be created via rrccmmdd(3) but by cal- + ling the program pointed to by RRSSHH. Use e.g. + RRSSHH==/usr/bin/ssh to create a secure shell connection. + + Note that this forces ccddddaa22wwaavv to create a pipe to the + rrsshh((11)) program and disallows ccddddaa22wwaavv to directly + access the network socket to the remote server. This + makes it impossible to set up performance parameters + and slows down the connection compared to a rroooott ini- + tiated rrccmmdd((33)) connection. + + RRSSCCSSII + If the RRSSCCSSII environment variable is present, the + remote SCSI server will not be the program + //oopptt//sscchhiillyy//ssbbiinn//rrssccssii but the program pointed to by + + + +SunOS 5.10 Last change: Version 3.0 13 + + + + + + +User Commands CDDA2WAV(1) + + + + RRSSCCSSII. Note that the remote SCSI server program name + will be ignored if you log in using an account that has + been created with a remote SCSI server program as login + shell. + +EEXXIITT SSTTAATTUUSS + ccddddaa22wwaavv uses the following exit codes to indicate various + degress of success: +_______________________________________________________________________________ +|Exitcode| Description | +_|_________|_____________________________________________________________________| +| 0| no errors encountered, successful operation. | +| 1| usage or syntax error. cdda2wav got inconsistent arguments. | +| 2| permission (un)set errors. permission changes failed. | +| 3| read errors on the cdrom/burner device encountered. | +| 4| write errors while writing one of the output files encountered. | +| 5| errors with soundcard handling (initialization/write). | +| 6| errors with stat() system call on the read device (cooked ioctl). | +| 7| pipe communication errors encountered (in forked mode). | +| 8| signal handler installation errors encountered. | +| 9| allocation of shared memory failed (in forked mode). | +| 10| dynamic heap memory allocation failed. | +| 11| errors on the audio cd medium encountered. | +| 12| device open error in ioctl handling detected. | +| 13| race condition in ioctl interface handling detected. | +| 14| error in ioctl() operation encountered. | +| 15| internal error encountered. Please report back!!! | +| 16| error in semaphore operation encountered (install / request). | +| 17| could not get the scsi transfer buffer. | +| 18| could not create pipes for process communication (in forked mode).| +_|_________|_____________________________________________________________________| + DDIISSCCUUSSSSIIOONN - ccddddaa22wwaavv is able to read parts of an aauuddiioo CD or mmuullttiimmee-- - ddiiaa CDROM (containing audio parts) directly digitally. - These parts can be written to a file, a pipe, or to a - sound device. - - ccddddaa22wwaavv stands for CCDDDDAA to WWAAVV (where CCDDDDAA stands for - compact disc digital audio and WWAAVV is a sound sample for- - mat introduced by MS Windows). It allows copying CCDDDDAA - audio data from the CDROM drive into a file in WWAAVV or - other formats. - - The latest versions try to get higher real-time scheduling - priorities to ensure smooth (uninterrupted) operation. - These priorities are available for super users and are - higher than those of 'normal' processes. Thus delays are - minimized. - - If your CDROM is on device DDEEVV and it is loaded with an - audio CD, you may simply invoke ccddddaa22wwaavv ddeevv==DDEEVV and it - will create the sound file aauuddiioo..wwaavv recording the whole - track beginning with track 1 in stereo at 16 bit at 44100 - Hz sample rate, if your file system has enough space free. - Otherwise recording time will be limited. For details see - files RREEAADDMMEE and RREEAADDMMEE..IINNSSTTAALLLL + ccddddaa22wwaavv is able to read parts of an aauuddiioo CD or mmuullttiimmeeddiiaa + CDROM (containing audio parts) directly digitally. These + parts can be written to a file, a pipe, or to a sound dev- + ice. + + ccddddaa22wwaavv stands for CCDDDDAA to WWAAVV (where CCDDDDAA stands for com- + pact disc digital audio and WWAAVV is a sound sample format + introduced by MS Windows). It allows copying CCDDDDAA audio + data from the CDROM drive into a file in WWAAVV or other for- + mats. + + Some versions of ccddddaa22wwaavv may try to get higher real-time + scheduling priorities to ensure smooth (uninterrupted) + operation. These priorities are available for super users + and are higher than those of 'normal' processes. Thus delays + are minimized. + + If you only have one CDROM and it is loaded with an audio + CD, you may simply invoke ccddddaa22wwaavv and it will create the + + + +SunOS 5.10 Last change: Version 3.0 14 + + + + + + +User Commands CDDA2WAV(1) + + + + sound file aauuddiioo..wwaavv recording the whole track beginning + with track 1 in stereo at 16 bit at 44100 Hz sample rate, if + your file system has enough space free. Otherwise recording + time will be limited. For details see files RREEAADDMMEE and + RREEAADDMMEE..IINNSSTTAALLLL. + + If you have more then one CD-ROM type drive in the system, + you need to specify the ddeevv== option. HHIINNTTSS OONN OOPPTTIIOONNSS - Options - Most of the options are used to control the format - of the WAV file. In the following text all of them - are described. - - Select Device - --DD _d_e_v_i_c_e selects the CDROM drive device to be - used. The specifier given should correspond to the - selected interface (see below). CCHHAANNGGEE!! For the - cooked_ioctl interface this is the cdrom device - descriptor as before. TThhee SSCCSSII ddeevviicceess uusseedd wwiitthh - tthhee ggeenneerriicc SSCCSSII iinntteerrffaaccee hhoowweevveerr aarree nnooww - aaddddrreesssseedd wwiitthh tthheeiirr SSCCSSII--BBuuss,, SSCCSSII--IIdd,, aanndd SSCCSSII-- - LLuunn iinnsstteeaadd ooff tthhee ggeenneerriicc SSCCSSII ddeevviiccee ddeessccrriipp-- - ttoorr!!!!!! One example for a SCSI CDROM drive on bus 0 - with SCSI ID 3 and lun 0 is -D0,3,0. - - Select Auxiliary device - --AA _a_u_x_d_e_v_i_c_e is necessary for CD-Extra handling. - For Non-SCSI-CDROM drives this is the same device - as given by -D (see above). For SCSI-CDROM drives - it is the CDROM drive (SCSI) device (i.e. //ddeevv//ssrr00 - ) corresponding to the SCSI device (i.e. 00,,33,,00 ). - It has to match the device used for sampling. - - Select Interface - --II _i_n_t_e_r_f_a_c_e selects the CDROM drive interface. For - SCSI drives use generic_scsi (cooked_ioctl may not - yet be available for all devices): ggeenneerriicc__ssccssii and - ccooookkeedd__iiooccttll. The first uses the generic SCSI - interface, the latter uses the ioctl of the CDROM - driver. The latter variant works only when the ker- - nel driver supports CCDDDDAA reading. This entry has to - match the selected CDROM device (see above). - - Enable echo to soundcard - --ee copies audio data to the sound card while - recording, so you hear it nearly simultaneously. - The soundcard gets the same data that is recorded. - This is time critical, so it works best with the --qq - option. To use ccddddaa22wwaavv as a pseudo CD player - without recording in a file you could use ccddddaa22wwaavv - --qq --ee --tt22 --dd00 --NN to play the whole second track. - This feature reduces the recording speed to at most - onefold speed. You cannot make better recordings - than your sound card can play (since the same data - is used). - - Change pitch of echoed audio - --pp ppeerrcceennttaaggee changes the pitch of all audio echoed - to a sound card. Only the copy to the soundcard is - affected, the recorded audio samples in a file - remain the same. Normal pitch, which is the - default, is given by 100%. Lower percentages cor- - respond to lower pitches, i.e. -p 50 transposes - the audio output one octave lower. See also the - script ppiittcchhppllaayy as an example. This option was - contributed by Raul Sobon. - - Select mono or stereo recording - --mm or --cc 11 selects mono recording (both stereo - channels are mixed), --ss or --cc 22 or --cc ss selects - stereo recording. Parameter s will swap both sound - channels. - - Select maximum quality - --xx will set stereo, 16 bits per sample at 44.1 KHz - (full CD quality). Note that other format options - given later can change this setting. - - Select sample quality - --bb 88 specifies 8 bit (1 Byte) for each sample in - each channel; --bb 1122 specifies 12 bit (2 Byte) for - each sample in each channel; --bb 1166 specifies 16 bit - (2 Byte) for each sample in each channel (Ensure - that your sample player or sound card is capable of - playing 12-bit or 16-bit samples). Selecting 12 or - 16 bits doubles file size. 12-bit samples are - aligned to 16-bit samples, so they waste some disk - space. - - Select sample rate - --rr _s_a_m_p_l_e_r_a_t_e selects a sample rate. _s_a_m_p_l_e_r_a_t_e - can be in a range between 44100 and 900. Option --RR - lists all available rates. - - Select sample rate divider - --aa _d_i_v_i_d_e_r selects a sample rate divider. _d_i_v_i_d_e_r - can be minimally 1 and maximally 50.5 and every- - thing between in steps of 0.5. Option --RR lists all - available rates. - - To make the sound smoother at lower sampling rates, - ccddddaa22wwaavv sums over _n samples (where _n is the spe- - cific dividend). So for 22050 Hertz output we have - to sum over 2 samples, for 900 Hertz we have to sum - over 49 samples. This cancels higher frequencies. - Standard sector size of an audio CD (ignoring addi- - tional information) is 2352 Bytes. In order to fin- - ish summing for an output sample at sector bound- - aries the rates above have to be choosen. Arbi- - trary sampling rates in high quality would require - some interpolation scheme, which needs much more - sophisticated programming. - - List a table of all sampling rates - --RR shows a list of all sample rates and their - dividers. Dividers can range from 1 to 50.5 in - steps of 0.5. - - Select start track and optionally end track - --tt _n_+_m selects nn as the start track and optionally - mm as the last track of a range to be recorded. - These tracks must be from the table of contents. - This sets the track where recording begins. Record- - ing can advance through the following tracks as - well (limited by the optional end track or other- - wise depending on recording time). Whether one file - or different files are then created depends on the - --BB option (see below). - - Select start index - --ii _n selects the index to start recording with. - Indices other than 1 will invoke the index scanner, - which will take some time to find the correct start - position. An offset may be given additionally (see - below). - - Set recording time - --dd nn sets recording time to _n seconds or set - recording time for whole track if _n is zero. In - order to specify the duration in frames (sectors) - also, the argument can have an appended 'f'. Then - the numerical argument is to be taken as frames - (sectors) rather than seconds. Please note that if - track ranges are being used they define the record- - ing time as well thus overriding any --dd option - specified times. - - Recording time is defined as the time the generated - sample will play (at the defined sample rate). - Since it's related to the amount of generated sam- - ples, it's not the time of the sampling process - itself (which can be less or more). It's neither - strictly coupled with the time information on the - audio CD (shown by your hifi CD player). Differ- - ences can occur by the usage of the --oo option (see - below). Notice that recording time will be short- - ened, unless enough disk space exists. Recording - can be aborted at anytime by pressing the break - character (signal SIGQUIT). - - Record all tracks of a complete audio CD in seperate files - --BB copies each track into a seperate file. A base - name can be given. File names have an appended - track number and an extension corresponding to the - audio format. To record all audio tracks of a CD, - use a sufficient high duration (i.e. -d99999). - - Set start sector offset - --oo _s_e_c_t_o_r_s increments start sector of the track by - _s_e_c_t_o_r_s. By this option you are able to skip a - certain amount at the beginning of a track so you - can pick exactly the part you want. Each sector - runs for 1/75 seconds, so you have very fine con- - trol. If your offset is so high that it would not - fit into the current track, a warning message is - issued and the offset is ignored. Recording time - is not reduced. (To skip introductory quiet pas- - sages automagically, use the --ww option see below.) - - Wait for signal option - --ww Turning on this option will suppress all silent - output at startup, reducing possibly file size. - ccddddaa22wwaavv will watch for any signal in the output - signal and switches on writing to file. - - Find extrem samples - --FF Turning on this option will display the most - negative and the most positive sample value found - during recording for both channels. This can be - useful for readjusting the volume. The values shown - are not reset at track boundaries, they cover the - complete sampling process. They are taken from the - original samples and have the same format (i.e. - they are independent of the selected output for- - mat). - - Find if input samples are in mono - --GG If this option is given, input samples for both - channels will be compared. At the end of the pro- - gram the result is printed. Differences in the - channels indicate stereo, otherwise when both chan- - nels are equal it will indicate mono. - - Undo the pre-emphasis in the input samples - --TT Some older audio CDs are recorded with a modi- - fied frequency response called pre-emphasis. This - is found mostly in classical recordings. The cor- - rection can be seen in the flags of the Table Of - Contents often. But there are recordings, that show - this setting only in the subchannels. If this - option is given, the index scanner will be started, - which reads the q-subchannel of each track. If pre- - emphasis is indicated in the q-subchannel of a - track, but not in the TOC, pre-emphasis will be - assumed to be present, and subsequently a reverse - filtering is done for this track before the samples - are written into the audio file. - - Set audio format - --OO aauuddiioottyyppee can be _w_a_v (for wav files) or _a_u or - _s_u_n (for sun PCM files) or _c_d_r or _r_a_w (for header- - less files to be used for cd writers). All file - samples are coded in linear pulse code modulation - (as done in the audio compact disc format). This - holds for all audio formats. Wav files are compat- - ible to Wind*ws sound files, they have lsb,msb byte - order as being used on the audio cd. The default - filename extension is '.wav'. Sun type files are - not like the older common logarithmically coded .au - files, but instead as mentioned above linear PCM is - used. The byte order is msb,lsb to be compatible. - The default filename extension is '.au'. The AIFF - and the newer variant AIFC from the Apple/SGI world - store their samples in bigendian format (msb,lsb). - In AIFC no compression is used. Finally the easi- - est 'format', the cdr aka raw format. It is done - per default in msb,lsb byte order to satisfy the - order wanted by most cd writers. Since there is no - header information in this format, the sample - parameters can only be identified by playing the - samples on a soundcard or similiar. The default - filename extension is '.cdr' or '.raw'. - - Select cdrom drive reading speed - --SS ssppeeeedd allows to switch the cdrom drive to a - certain level of speed in order to reduce read - errors. The argument is transfered verbatim to the - drive. Details depend very much on the cdrom - drives. An argument of 0 for example is often the - default speed of the drive, a value of 1 often - selects single speed. - - Enable MD5 checksums - --MM ccoouunntt enables calculation of MD-5 checksum for - 'count' bytes from the beginning of a track. This - was introduced for quick comparisons of tracks. - - Use Monty's libparanoia for reading of sectors - --ppaarraannooiiaa selects an alternate way of extracting - audio sectors. Monty's library is used with the - following default options: - - PARANOIA_MODE_FULL, but without PARANOIA_MODE_NEV- - ERSKIP - - for details see Monty's libparanoia documentation. - In this case the option --PP has no effect. - - Do linear or overlapping reading of sectors - (This applies unless option --ppaarraannooiiaa is used.) --PP - sseeccttoorrss sets the given number of sectors for ini- - tial overlap sampling for jitter correction. Two - cases are to be distinguished. For nonzero values, - some sectors are read twice to enable cdda2wav's - jitter correction. If an argument of zero is - given, no overlap sampling will be used. For - nonzero overlap sectors cdda2wav dynamically - adjusts the setting during sampling (like cdpara- - noia does). If no match can be found, cdda2wav - retries the read with an increased overlap. If the - amount of jitter is lower than the current over- - lapped samples, cdda2wav reduces the overlap set- - ting, resulting in a higher reading speed. The - argument given has to be lower than the total num- - ber of sectors per request (see option _-_n below). - Cdda2wav will check this setting and issues a error - message otherwise. The case of zero sectors is - nice on low load situations or errorfree (perfect) - cdrom drives and perfect (not scratched) audio cds. - - Set the transfer size - --nn sseeccttoorrss will set the transfer size to the spec- - ified sectors per request. - - Set number of ring buffer elements - --ll bbuuffffeerrss will allocate the specified number of - ring buffer elements. - - Set endianess of input samples - --CC eennddiiaanneessss will override the default settings of - the input format. Endianess can be set explicitly - to "little" or "big" or to the automatic endianess - detection based on voting with "guess". - - Set endianess of output samples - --EE eennddiiaanneessss (endianess can be "little" or "big") - will override the default settings of the output - format. - - Verbose option - --vv iitteemmlliisstt prints more information. A list allows - selection of different information items. - - ddiissaabbllee keeps quiet - - ttoocc displays the table of contents - - ssuummmmaarryy displays a summary of recording parameters - - iinnddiicceess invokes the index scanner and displays - start positions of indices - - ccaattaalloogg retrieves and displays a media catalog num- - ber - - ttrraacckkiidd retrieves and displays international stan- - dard recording codes - - sseeccttoorrss displays track start positions in absolute - sector notation - - To combine several requests just list the subop- - tions seperated with commas. - - The table of contents - The display will show the table of contents with - number of tracks and total time (displayed in - _m_m:_s_s._h_h format, _m_m=minutes, _s_s=seconds, _h_h=rounded - 1/100 seconds). The following list displays track - number and track time for each entry. The summary - gives a line per track describing the type of the - track. - - ttrraacckk pprreeeemmpphhaassiiss ccooppyyppeerrmmiitttteedd ttrraacckkttyyppee cchhaannss - - The ttrraacckk column holds the track number. pprreeeemmpphhaa-- - ssiiss shows if that track has been given a non linear - frequency response. NOTE: You can undo this effect - with the --TT option. ccooppyy--ppeerrmmiitttteedd indicates if - this track is allowed to copy. ttrraacckkttyyppee can be - data or audio. On multimedia CDs (except hidden - track CDs) both of them should be present. cchhaann-- - nneellss is defined for audio tracks only. There can be - two or four channels. - - No file output - --NN this debugging option switches off writing to a - file. - - No infofile generation - --HH this option switches off creation of an info - file and a cddb file. - - Generation of simple output for gui frontends - --gg this option switches on simple line formatting, - which is needed to support gui frontends (like xcd- - roast). - - Verbose SCSI logging - --VV this option switches on logging of SCSI com- - mands. This will produce a lot of output (when SCSI - devices are being used). This is needed for debug- - ging purposes. The format is the same as being used - with the cdrecord program from Jörg Schilling. I - will not describe it here. - - Quiet option - --qq suppresses all screen output except error - messages. That reduces cpu time resources. - - Just show information option - --JJ does not write a file, it only prints informa- - tion about the disc (depending on the --vv option). - This is just for information purposes. + Most of the options are used to control the format of the + WAV file. In the following text most of them are discussed + in a more verbose way. + + SSeelleecctt DDeevviiccee + ddeevv==_d_e_v_i_c_e selects the CDROM drive device to be used. The + specifier given should correspond to the selected interface + (see below). For the ccooookkeedd__iiooccttll interface this is the + cdrom device descriptor. TThhee SSCCSSII ddeevviicceess uusseedd wwiitthh tthhee + ggeenneerriicc SSCCSSII iinntteerrffaaccee hhoowweevveerr aarree aaddddrreesssseedd wwiitthh tthheeiirr + SSCCSSII--BBuuss,, SSCCSSII--IIdd,, aanndd SSCCSSII--LLuunn iinnsstteeaadd ooff tthhee ggeenneerriicc SSCCSSII + ddeevviiccee ddeessccrriippttoorr.. One example for a SCSI CDROM drive on bus + 0 with SCSI ID 3 and lun 0 is ddeevv==00,,33,,00. + + SSeelleecctt AAuuxxiilliiaarryy ddeevviiccee + -AA _a_u_x_d_e_v_i_c_e may be needed in some rare cases for CD-Extra + handling. CCddddaa22wwaavv usually has no problem to get the + multi-session information for CD-Extra using raw SCSI com- + mands. For Non-SCSI-CDROM drives this is the same device as + given by ddeevv== (see above). For SCSI-CDROM drives it is the + CDROM drive (SCSI) device (i.e. //ddeevv//ssrr00 ) corresponding to + the SCSI device (i.e. 00,,33,,00 ). It has to match the device + used for sampling. + + SSeelleecctt IInntteerrffaaccee + -II _i_n_t_e_r_f_a_c_e selects the CDROM drive communication method. + This interface method is typically automatically selected + from the device name. For SCSI drives ggeenneerriicc__ssccssii is used + (cooked_ioctl may not be available for all devices). Valid + names are ggeenneerriicc__ssccssii and ccooookkeedd__iiooccttll. The first uses the + generic SCSI interface, the latter uses the ioctl of the + CDROM driver. The latter variant works only when the kernel + driver supports CCDDDDAA reading. This entry has to match the + selected CDROM device (see above). + + EEnnaabbllee eecchhoo ttoo ssoouunnddccaarrdd + -ee copies audio data to the sound card while recording, so + you hear it nearly simultaneously. The soundcard gets the + same data that is recorded. This is time critical, so it + works best with the -qq option. To use ccddddaa22wwaavv as a pseudo + CD player without recording in a file you could use + + + + +SunOS 5.10 Last change: Version 3.0 15 + + + + + + +User Commands CDDA2WAV(1) + + + + ccddddaa22wwaavv -qq -ee -tt22 -dd00 -NN + + to play the whole second track or + + ccddddaa22wwaavv -qq -ee -BB -NN + + to play the whole disk. This feature reduces the recording + speed to at most onefold speed. + + CChhaannggee ppiittcchh ooff eecchhooeedd aauuddiioo + -pp ppeerrcceennttaaggee changes the pitch of all audio echoed to a + sound card. Only the copy to the soundcard is affected, the + recorded audio samples in a file remain the same. Normal + pitch, which is the default, is given by 100%. Lower per- + centages correspond to lower pitches, i.e. -p 50 transposes + the audio output one octave lower. See also the script + ppiittcchhppllaayy as an example. This option was contributed by Raul + Sobon. + + SSeelleecctt mmoonnoo oorr sstteerreeoo rreeccoorrddiinngg + -mm or -cc 11 selects mono recording (both stereo channels are + mixed), -ss or -cc 22 or -cc ss selects stereo recording. Parame- + ter s will swap both sound channels. + + SSeelleecctt mmaaxxiimmuumm qquuaalliittyy + -xx will set stereo, 16 bits per sample at 44.1 KHz (full CD + quality). Note that other format options given later can + change this setting. + + SSeelleecctt ssaammppllee qquuaalliittyy + -bb 88 specifies 8 bit (1 Byte) for each sample in each chan- + nel; -bb 1122 specifies 12 bit (2 Byte) for each sample in each + channel; -bb 1166 specifies 16 bit (2 Byte) for each sample in + each channel (Ensure that your sample player or sound card + is capable of playing 12-bit or 16-bit samples). Selecting + 12 or 16 bits doubles file size. 12-bit samples are aligned + to 16-bit samples, so they waste some disk space. + + SSeelleecctt ssaammppllee rraattee + -rr _s_a_m_p_l_e_r_a_t_e selects a sample rate. _s_a_m_p_l_e_r_a_t_e can be in a + range between 44100 and 900. Option -RR lists all available + rates. + + SSeelleecctt ssaammppllee rraattee ddiivviiddeerr + -aa _d_i_v_i_d_e_r selects a sample rate divider. _d_i_v_i_d_e_r can be + minimally 1 and maximally 50.5 and everything between in + steps of 0.5. Option -RR lists all available rates. + + To make the sound smoother at lower sampling rates, ccddddaa22wwaavv + sums over _n samples (where _n is the specific dividend). So + for 22050 Hertz output we have to sum over 2 samples, for + 900 Hertz we have to sum over 49 samples. This cancels + + + +SunOS 5.10 Last change: Version 3.0 16 + + + + + + +User Commands CDDA2WAV(1) + + + + higher frequencies. Standard sector size of an audio CD + (ignoring additional information) is 2352 Bytes. In order to + finish summing for an output sample at sector boundaries the + rates above have to be chosen. Arbitrary sampling rates in + high quality would require some interpolation scheme, which + needs much more sophisticated programming. + + LLiisstt aa ttaabbllee ooff aallll ssaammpplliinngg rraatteess + -RR shows a list of all sample rates and their dividers. + Dividers can range from 1 to 50.5 in steps of 0.5. + + SSeelleecctt ssttaarrtt ttrraacckk aanndd ooppttiioonnaallllyy eenndd ttrraacckk + -tt _n+_m selects nn as the start track and optionally mm as the + last track of a range to be recorded. These tracks must be + from the table of contents. This sets the track where + recording begins. Recording can advance through the follow- + ing tracks as well (limited by the optional end track or + otherwise depending on recording time). Whether one file or + different files are then created depends on the -BB option + (see below). + + SSeelleecctt ssttaarrtt iinnddeexx + -ii _n selects the index to start recording with. Indices + other than 1 will invoke the index scanner, which will take + some time to find the correct start position. An offset may + be given additionally (see below). + + SSeett rreeccoorrddiinngg dduurraattiioonn + -dd nn sets recording time to _n seconds or set recording time + for whole track if _n is zero. In order to specify the dura- + tion in frames (sectors) also, the argument can have an + appended 'f'. Then the numerical argument is to be taken as + frames (sectors) rather than seconds. Please note that if + track ranges are being used they define the recording time + as well thus overriding any -dd option specified times. + + Recording time is defined as the time the generated sample + will play (at the defined sample rate). Since it's related + to the amount of generated samples, it's not the time of the + sampling process itself (which can be less or more). It's + neither strictly coupled with the time information on the + audio CD (shown by your hifi CD player). Differences can + occur by the usage of the -oo option (see below). Notice that + recording time will be shortened, unless enough disk space + exists. Recording can be aborted at anytime by pressing the + break character (signal SIGQUIT). + + RReeccoorrdd aallll ttrraacckkss ooff aa ccoommpplleettee aauuddiioo CCDD iinn sseeppaarraattee ffiilleess + -BB copies each track into a separate file. A base name can + be given. File names have an appended track number and an + extension corresponding to the audio format. To record all + audio tracks of a CD, use a sufficient high duration (i.e. + + + +SunOS 5.10 Last change: Version 3.0 17 + + + + + + +User Commands CDDA2WAV(1) + + + + -d99999). + + SSeett ssttaarrtt sseeccttoorr ooffffsseett + -oo _s_e_c_t_o_r_s increments start sector of the track by _s_e_c_t_o_r_s. + By this option you are able to skip a certain amount at the + beginning of a track so you can pick exactly the part you + want. Each sector runs for 1/75 seconds, so you have very + fine control. If your offset is so high that it would not + fit into the current track, a warning message is issued and + the offset is ignored. Recording time is not reduced. (To + skip introductory quiet passages automagically, use the -ww + option see below.) + + WWaaiitt ffoorr ssiiggnnaall ooppttiioonn + -ww Turning on this option will suppress all silent output at + startup, reducing possibly file size. ccddddaa22wwaavv will watch + for any signal in the output signal and switches on writing + to file. + + FFiinndd eexxttrreemmee ssaammpplleess + -FF Turning on this option will display the most negative and + the most positive sample value found during recording for + both channels. This can be useful for readjusting the + volume. The values shown are not reset at track boundaries, + they cover the complete sampling process. They are taken + from the original samples and have the same format (i.e. + they are independent of the selected output format). + + FFiinndd iiff iinnppuutt ssaammpplleess aarree iinn mmoonnoo + -GG If this option is given, input samples for both channels + will be compared. At the end of the program the result is + printed. Differences in the channels indicate stereo, other- + wise when both channels are equal it will indicate mono. + + UUnnddoo tthhee pprree--eemmpphhaassiiss iinn tthhee iinnppuutt ssaammpplleess + -TT Some older audio CDs are recorded with a modified fre- + quency response called pre-emphasis. This is found mostly in + classical recordings. The correction can be seen in the + flags of the Table Of Contents often. But there are record- + ings, that show this setting only in the subchannels. If + this option is given, the index scanner will be started, + which reads the q-subchannel of each track. If pre-emphasis + is indicated in the q-subchannel of a track, but not in the + TOC, pre-emphasis will be assumed to be present, and subse- + quently a reverse filtering is done for this track before + the samples are written into the audio file. + + SSeett aauuddiioo ffoorrmmaatt + -OO aauuddiioottyyppee can be _w_a_v (for wav files) or _a_u or _s_u_n (for + sun PCM files) or _c_d_r or _r_a_w (for headerless files to be + used for cd writers). All file samples are coded in linear + pulse code modulation (as done in the audio compact disc + + + +SunOS 5.10 Last change: Version 3.0 18 + + + + + + +User Commands CDDA2WAV(1) + + + + format). This holds for all audio formats. Wav files are + compatible to Wind*ws sound files, they have lsb,msb byte + order which is the opposite byte order to the one used on + the audio cd. The default filename extension is '.wav'. Sun + type files are not like the older common logarithmically + coded .au files, but instead as mentioned above linear PCM + is used. The byte order is msb,lsb to be compatible. The + default filename extension is '.au'. The AIFF and the newer + variant AIFC from the Apple/SGI world store their samples in + bigendian format (msb,lsb). In AIFC no compression is used. + Finally the easiest 'format', the cdr aka raw format. It is + done per default in msb,lsb byte order to satisfy the order + wanted by most cd writers. Since there is no header informa- + tion in this format, the sample parameters can only be iden- + tified by playing the samples on a soundcard or similar. The + default filename extension is '.cdr' or '.raw'. + + SSeelleecctt ccddrroomm ddrriivvee rreeaaddiinngg ssppeeeedd + -SS ssppeeeedd allows to switch the cdrom drive to a certain + level of speed in order to reduce read errors. The argument + is transferred verbatim to the drive. Details depend very + much on the cdrom drives. An argument of 0 for example is + often the default speed of the drive, a value of 1 often + selects single speed. + + EEnnaabbllee MMDD55 cchheecckkssuummss + -MM ccoouunntt enables calculation of MD-5 checksum for 'count' + bytes from the beginning of a track. This was introduced for + quick comparisons of tracks. + + UUssee MMoonnttyy''ss lliibbppaarraannooiiaa ffoorr rreeaaddiinngg ooff sseeccttoorrss + -ppaarraannooiiaa selects an alternate way of extracting audio sec- + tors. Monty's library is used with the following default + options: + + PARANOIA_MODE_FULL, but without PARANOIA_MODE_NEVERSKIP + + for details see Monty's libparanoia documentation. In this + case the option -PP has no effect. + + DDoo lliinneeaarr oorr oovveerrllaappppiinngg rreeaaddiinngg ooff sseeccttoorrss + (This applies unless option -ppaarraannooiiaa is used.) -PP sseeccttoorrss + sets the given number of sectors for initial overlap sam- + pling for jitter correction. Two cases are to be dis- + tinguished. For nonzero values, some sectors are read twice + to enable cdda2wav's jitter correction. If an argument of + zero is given, no overlap sampling will be used. For + nonzero overlap sectors cdda2wav dynamically adjusts the + setting during sampling (like cdparanoia does). If no match + can be found, cdda2wav retries the read with an increased + overlap. If the amount of jitter is lower than the current + overlapped samples, cdda2wav reduces the overlap setting, + + + +SunOS 5.10 Last change: Version 3.0 19 + + + + + + +User Commands CDDA2WAV(1) + + + + resulting in a higher reading speed. The argument given has + to be lower than the total number of sectors per request + (see option -_n below). Cdda2wav will check this setting and + issues a error message otherwise. The case of zero sectors + is nice on low load situations or errorfree (perfect) cdrom + drives and perfect (not scratched) audio cds. + + SSeett tthhee ttrraannssffeerr ssiizzee + -nn sseeccttoorrss will set the transfer size to the specified sec- + tors per request. + + SSeett nnuummbbeerr ooff rriinngg bbuuffffeerr eelleemmeennttss + -ll bbuuffffeerrss will allocate the specified number of ring + buffer elements. + + SSeett eennddiiaanneessss ooff iinnppuutt ssaammpplleess + -CC eennddiiaanneessss will override the default settings of the + input format. Endianess can be set explicitly to "little", + "big" or "machine" or to the automatic endianess detection + based on voting with "guess". + + SSeett eennddiiaanneessss ooff oouuttppuutt ssaammpplleess + -EE eennddiiaanneessss (endianess can be "little", "big" or + "machine") will override the default settings of the output + format. + + VVeerrbboossee ooppttiioonn + -vv iitteemmlliisstt prints more information. A list allows selec- + tion of different information items. + + + hheellpp Print a summary of possible members of the dif- + fopts list. + + !! Invert the meaning of the following string. No + comma is needed after the exclamation mark. + + nnoott Invert the meaning of all members in the diffopts + list i.e. exclude all present options from an ini- + tially complete set compare list. When using + ccsshh(1) you might have problems to use !! due to its + strange parser. This is why the nnoott alias exists. + + ddiissaabbllee disables verbosity + + aallll all information is given + + ttoocc displays the table of contents + + ssuummmmaarryy displays a summary of recording parameters + + iinnddiicceess invokes the index scanner and displays start + + + +SunOS 5.10 Last change: Version 3.0 20 + + + + + + +User Commands CDDA2WAV(1) + + + + positions of indices + + ccaattaalloogg retrieves and displays a media catalog number + + ttrraacckkiidd retrieves and displays international standard + recording codes + + sseeccttoorrss displays track start positions in absolute sector + notation + + To combine several requests just list the suboptions + separated with commas. + + TThhee ttaabbllee ooff ccoonntteennttss + The display will show the table of contents with number of + tracks and total time (displayed in _m_m:_s_s._h_h format, + _m_m=minutes, _s_s=seconds, _h_h=rounded 1/100 seconds). The fol- + lowing list displays track number and track time for each + entry. The summary gives a line per track describing the + type of the track. + + ttrraacckk pprreeeemmpphhaassiiss ccooppyyppeerrmmiitttteedd ttrraacckkttyyppee cchhaannss + + The ttrraacckk column holds the track number. pprreeeemmpphhaassiiss shows + if that track has been given a non linear frequency + response. NOTE: You can undo this effect with the -TT + option. ccooppyy-ppeerrmmiitttteedd indicates if this track is allowed + to copy. ttrraacckkttyyppee can be data or audio. On multimedia CDs + (except hidden track CDs) both of them should be present. + cchhaannnneellss is defined for audio tracks only. There can be two + or four channels. + + NNoo ffiillee oouuttppuutt + -NN this debugging option switches off writing to a file. + + NNoo iinnffooffiillee ggeenneerraattiioonn + -HH this option switches off creation of an info file and a + cddb file. + + GGeenneerraattiioonn ooff ssiimmppllee oouuttppuutt ffoorr gguuii ffrroonntteennddss + -gg this option switches on simple line formatting, which is + needed to support gui frontends (like xcd-roast). + + VVeerrbboossee SSCCSSII llooggggiinngg + -VV this option switches on logging of SCSI commands. This + will produce a lot of output (when SCSI devices are being + used). This is needed for debugging purposes. The format is + the same as being used with the cdrecord program, see + ccddrreeccoorrdd(1) for more information. + + QQuuiieett ooppttiioonn + -qq suppresses all screen output except error messages. That + + + +SunOS 5.10 Last change: Version 3.0 21 + + + + + + +User Commands CDDA2WAV(1) + + + + reduces cpu time resources. + + JJuusstt sshhooww iinnffoorrmmaattiioonn ooppttiioonn + -JJ does not write a file, it only prints information about + the disc (depending on the -vv option). This is just for + information purposes. CCDDDDBBPP ssuuppppoorrtt - Lookup album and track titles option - --LL ccddddbbpp mmooddee Cdda2wav tries to retrieve per- - former, album-, and track titles from a cddbp - server. The default server right now is - 'freedb.freedb.org'. It is planned to have more - control over the server handling later. The param- - eter defines how multiple entries are handled: - - 0 interactive mode, the user chooses one of the - entries. - - 1 take the first entry without asking. - - Set server for title lookups - ccddddbbpp--sseerrvveerr sseerrvveerrnnaammee When using -L or --cddb, - the server being contacted can be set with this - option. - - Set portnumber for title lookups - ccddddbbpp--ppoorrtt ppoorrttnnuummbbeerr When using -L or --cddb, the - server port being contacted can be set with this - option. + LLooookkuupp aallbbuumm aanndd ttrraacckk ttiittlleess ooppttiioonn + -LL ccddddbbpp mmooddee Cdda2wav tries to retrieve performer, album-, + and track titles from a cddbp server. The default server + right now is 'freedb.freedb.org'. It is planned to have + more control over the server handling later. The parameter + defines how multiple entries are handled: + + 00 interactive mode, the user chooses one of the entries. + + 11 take the first entry without asking. + + SSeett sseerrvveerr ffoorr ttiittllee llooookkuuppss + ccddddbbpp-sseerrvveerr sseerrvveerrnnaammee When using -L or -cddb, the server + being contacted can be set with this option. + + SSeett ppoorrttnnuummbbeerr ffoorr ttiittllee llooookkuuppss + ccddddbbpp-ppoorrtt ppoorrttnnuummbbeerr When using -L or -cddb, the server + port being contacted can be set with this option. HHIINNTTSS OONN UUSSAAGGEE - Don't create samples you cannot read. First check your - sample player software and sound card hardware. I experi- - enced problems with very low sample rates (stereo <= 1575 - Hz, mono <= 3675 Hz) when trying to play them with stan- - dard WAV players for sound blaster (maybe they are not - legal in WWAAVV format). Most CD-Writers insist on audio sam- - ples in a bigendian format. Now cdda2wav supports the --EE - eennddiiaanneessss option to control the endianess of the written - samples. - - If your hardware is fast enough to run cdda2wav uninter- - rupted and your CD drive is one of the 'perfect' ones, you - will gain speed when switching all overlap sampling off - with the --PP 00 option. Further fine tuning can be done - with the --nn sseeccttoorrss option. You can specify how much sec- - tors should be requested in one go. - - Cdda2wav supports ppiippeess now. Use a filename of -- to let - cdda2wav output its samples to standard output. - - Conversion to other sound formats can be done using the - ssooxx program package (although the use of ssooxx --xx to change - the byte order of samples should be no more necessary; see - option --EE to change the output byteorder). - - If you want to sample more than one track into different - files in one run, this is currently possible with the --BB - option. When recording time exceeds the track limit a new - file will be opened for the next track. + Don't create samples you cannot read. First check your sam- + ple player software and sound card hardware. I experienced + problems with very low sample rates (stereo <= 1575 Hz, mono + <= 3675 Hz) when trying to play them with standard WAV + players for sound blaster (maybe they are not legal in WWAAVV + format). Most CD-Writers insist on audio samples in a bigen- + dian format. Now cdda2wav supports the -EE eennddiiaanneessss option + to control the endianess of the written samples. -FFIILLEESS - Cdda2wav can generate a lot of files for various purposes. + If your hardware is fast enough to run cdda2wav uninter- + rupted and your CD drive is one of the 'perfect' ones, you + will gain speed when switching all overlap sampling off with + the -PP 00 option. Further fine tuning can be done with the + -nn sseeccttoorrss option. You can specify how much sectors should + be requested in one go. - Audio files: + Cdda2wav supports ppiippeess. Use a filename of - to let + cdda2wav output its samples to standard output. + + Conversion to other sound formats can be done using the ssooxx + program package (although the use of ssooxx -xx to change the + byte order of samples should be no more necessary; see + option -EE to change the output byteorder). + + + + +SunOS 5.10 Last change: Version 3.0 22 + + + + + + +User Commands CDDA2WAV(1) + + + + If you want to sample more than one track into different + files in one run, this is currently possible with the -BB + option. When recording time exceeds the track limit a new + file will be opened for the next track. + +FFIILLEESS + Cdda2wav can generate a lot of files for various purposes. - There are audio files containing samples with default - extensions These files are not generated when option (-N) - is given. Multiple files may be written when the bulk copy - option (-B) is used. Individual file names can be given as - arguments. If the number of file names given is sufficient - to cover all included audio tracks, the file names will be - used verbatim. Otherwise, if there are less file names - than files needed to write the included tracks, the part - of the file name before the extension is extended with - '_dd' where dd represents the current track number. - - Cddb and Cdindex files: - - If cdda2wav detects cd-extra or cd-text (album/track) - title information, then .cddb and .cdindex files are gen- - erated unless suppressed by the option -H. They contain - suitable formatted entries for submission to audio cd - track title databases in the internet. The CDINDEX and - CDDB(tm) systems are currently supported. For more infor- - mation please visit www.musicbrainz.org and - www.freedb.com. - - Inf files: - - The inf files are describing the sample files and the part - from the audio cd, it was taken from. They are a means to - transfer information to a cd burning program like - cdrecord. For example, if the original audio cd had pre- - emphasis enabled, and cdda2wav -T did remove the pre- - emphasis, then the inf file has pre-emphasis not set - (since the audio file does not have it anymore), while the - .cddb and the .cdindex have pre-emphasis set as the origi- - nal does. + AAuuddiioo ffiilleess:: + There are audio files containing samples with default exten- + sions .wav, .au, .aifc, .aiff, and .cdr according to the + selected sound format. These files are not generated when + option (-NN) is given. Multiple files may be written when the + bulk copy option (-BB) is used. Individual file names can be + given as arguments. If the number of file names given is + sufficient to cover all included audio tracks, the file + names will be used verbatim. Otherwise, if there are less + file names than files needed to write the included tracks, + the part of the file name before the extension is extended + with '_dd' where dd represents the current track number. + + CCddddbb aanndd CCddiinnddeexx ffiilleess:: + If cdda2wav detects cd-extra or cd-text (album/track) title + information, then .cddb, .cdindex and .cdtext files are gen- + erated unless suppressed by the option -HH. They contain + suitable formatted entries for submission to audio cd track + title databases in the internet. The CDINDEX and CDDB(tm) + systems are currently supported. For more information please + visit www.musicbrainz.org and www.freedb.com. + + IInnff ffiilleess:: + The inf files are describing the sample files and the part + from the audio cd, it was taken from. They are a means to + transfer information to a cd burning program like cdrecord. + For example, if the original audio cd had pre-emphasis + enabled, and cdda2wav -TT did remove the pre-emphasis, then + the inf file has pre-emphasis not set (since the audio file + does not have it anymore), while the .cddb and the .cdindex + have pre-emphasis set as the original does. WWAARRNNIINNGG - IIMMPPOORRTTAANNTT:: it is prohibited to sell copies of copyrighted - material by noncopyright holders. This program may not be - used to circumvent copyrights. The user acknowledges this - constraint when using the software. + IIMMPPOORRTTAANNTT:: it is prohibited to sell copies of copyrighted + material by noncopyright holders. This program may not be + used to circumvent copyrights. The user acknowledges this + constraint when using the software. BBUUGGSS - Generation of md5 checksums is currently broken. + The index scanner may give timeouts. - Performance may not be optimal on slower systems. + The resampling (rate conversion code) uses polynomial inter- + polation, which is not optimal. - The index scanner may give timeouts. - The resampling (rate conversion code) uses polynomial - interpolation, which is not optimal. - Cdda2wav should use threads. - Cdda2wav currently cannot sample hidden audio tracks - (track 1 index 0). +SunOS 5.10 Last change: Version 3.0 23 + + + + + + +User Commands CDDA2WAV(1) + + + + Cdda2wav should use threads. + + Cdda2wav currently cannot sample hidden audio tracks that + reside in track #1 index 0. AACCKKNNOOWWLLEEDDGGEEMMEENNTTSS - Thanks goto Project MODE (http://www.mode.net/) and Fraun- - hofer Institut für integrierte Schaltungen (FhG-IIS) - (http://www.iis.fhg.de/) for financial support. Plextor - Europe and Ricoh Japan provided cdrom disk drives and cd - burners which helped a lot to develop this software. - Rammi has helped a lot with the debugging and showed a lot - of stamina when hearing 100 times the first 16 seconds of - the first track of the Krupps CD. Libparanoia contributed - by Monty (Christopher Montgomery) xiphmont@mit.edu. + Thanks goto Project MODE (http://www.mode.net/) and + Fraunhofer Institut fuer integrierte Schaltungen (FhG-IIS) + (http://www.iis.fhg.de/) for financial support. Plextor + Europe and Ricoh Japan provided cdrom disk drives and cd + burners which helped a lot to develop this software. Rammi + has helped a lot with the debugging and showed a lot of + stamina when hearing 100 times the first 16 seconds of the + first track of the Krupps CD. Libparanoia contributed by + Monty (Christopher Montgomery) xiphmont@mit.edu. AAUUTTHHOORR - Heiko Eissfeldt heiko@colossus.escape.de + Heiko Eissfeldt heiko@colossus.escape.de (1993-2004) + + 2004-today: + + Joerg Schilling + Seestr. 110 + D-13353 Berlin + Germany DDAATTEE - 11 Sep 2002 + 12 Jan 2010 + +IINNTTEERRFFAACCEE SSTTAABBIILLIITTYY + The interfaces provided by ccddddaa22wwaavv are designed for long + term stability. As ccddddaa22wwaavv depends on interfaces provided + by the underlying operating system, the stability of the + interfaces offered by ccddddaa22wwaavv depends on the interface sta- + bility of the OS interfaces. Modified interfaces in the OS + may enforce modified interfaces in ccddddaa22wwaavv. + + + + + + + + + + + + + + + + + + + +SunOS 5.10 Last change: Version 3.0 24 - CDDA2WAV(1) diff -Nru cdrtools-2.01.01a33/doc/cdda2wav.ps cdrtools-3.02a09/doc/cdda2wav.ps --- cdrtools-2.01.01a33/doc/cdda2wav.ps 2002-12-01 13:56:33.000000000 +0000 +++ cdrtools-3.02a09/doc/cdda2wav.ps 2010-05-30 15:55:17.000000000 +0000 @@ -1,1082 +1,3726 @@ -%!PS-Adobe-3.0 -%%Creator: groff version 1.17.2 -%%CreationDate: Sun Dec 1 14:59:42 2002 -%%DocumentNeededResources: font Times-Roman -%%+ font Times-Bold -%%+ font Times-Italic -%%DocumentSuppliedResources: procset grops 1.17 2 -%%Pages: 10 -%%PageOrder: Ascend -%%Orientation: Portrait +%!PS +%%Version: 3.15 +%%DocumentFonts: (atend) +%%Pages: (atend) %%EndComments -%%BeginProlog -%%BeginResource: procset grops 1.17 2 -/setpacking where{ -pop -currentpacking -true setpacking -}if -/grops 120 dict dup begin -/SC 32 def -/A/show load def -/B{0 SC 3 -1 roll widthshow}bind def -/C{0 exch ashow}bind def -/D{0 exch 0 SC 5 2 roll awidthshow}bind def -/E{0 rmoveto show}bind def -/F{0 rmoveto 0 SC 3 -1 roll widthshow}bind def -/G{0 rmoveto 0 exch ashow}bind def -/H{0 rmoveto 0 exch 0 SC 5 2 roll awidthshow}bind def -/I{0 exch rmoveto show}bind def -/J{0 exch rmoveto 0 SC 3 -1 roll widthshow}bind def -/K{0 exch rmoveto 0 exch ashow}bind def -/L{0 exch rmoveto 0 exch 0 SC 5 2 roll awidthshow}bind def -/M{rmoveto show}bind def -/N{rmoveto 0 SC 3 -1 roll widthshow}bind def -/O{rmoveto 0 exch ashow}bind def -/P{rmoveto 0 exch 0 SC 5 2 roll awidthshow}bind def -/Q{moveto show}bind def -/R{moveto 0 SC 3 -1 roll widthshow}bind def -/S{moveto 0 exch ashow}bind def -/T{moveto 0 exch 0 SC 5 2 roll awidthshow}bind def -/SF{ -findfont exch -[exch dup 0 exch 0 exch neg 0 0]makefont -dup setfont -[exch/setfont cvx]cvx bind def -}bind def -/MF{ -findfont -[5 2 roll -0 3 1 roll -neg 0 0]makefont -dup setfont -[exch/setfont cvx]cvx bind def -}bind def -/level0 0 def -/RES 0 def -/PL 0 def -/LS 0 def -/MANUAL{ -statusdict begin/manualfeed true store end -}bind def -/PLG{ -gsave newpath clippath pathbbox grestore -exch pop add exch pop -}bind def -/BP{ -/level0 save def -1 setlinecap -1 setlinejoin -72 RES div dup scale -LS{ -90 rotate -}{ -0 PL translate -}ifelse -1 -1 scale -}bind def -/EP{ -level0 restore -showpage -}bind def -/DA{ -newpath arcn stroke -}bind def -/SN{ -transform -.25 sub exch .25 sub exch -round .25 add exch round .25 add exch -itransform -}bind def -/DL{ -SN -moveto -SN -lineto stroke -}bind def -/DC{ -newpath 0 360 arc closepath -}bind def -/TM matrix def -/DE{ -TM currentmatrix pop -translate scale newpath 0 0 .5 0 360 arc closepath -TM setmatrix -}bind def -/RC/rcurveto load def -/RL/rlineto load def -/ST/stroke load def -/MT/moveto load def -/CL/closepath load def -/FL{ -currentgray exch setgray fill setgray -}bind def -/BL/fill load def -/LW/setlinewidth load def -/RE{ -findfont -dup maxlength 1 index/FontName known not{1 add}if dict begin -{ -1 index/FID ne{def}{pop pop}ifelse -}forall -/Encoding exch def -dup/FontName exch def -currentdict end definefont pop -}bind def -/DEFS 0 def -/EBEGIN{ -moveto -DEFS begin -}bind def -/EEND/end load def -/CNT 0 def -/level1 0 def -/PBEGIN{ -/level1 save def -translate -div 3 1 roll div exch scale -neg exch neg exch translate -0 setgray -0 setlinecap -1 setlinewidth -0 setlinejoin -10 setmiterlimit -[]0 setdash -/setstrokeadjust where{ -pop -false setstrokeadjust -}if -/setoverprint where{ -pop -false setoverprint -}if -newpath -/CNT countdictstack def -userdict begin -/showpage{}def -}bind def -/PEND{ -clear -countdictstack CNT sub{end}repeat -level1 restore -}bind def -end def -/setpacking where{ -pop -setpacking -}if -%%EndResource -%%IncludeResource: font Times-Roman -%%IncludeResource: font Times-Bold -%%IncludeResource: font Times-Italic -grops begin/DEFS 1 dict def DEFS begin/u{.001 mul}bind def end/RES 72 -def/PL 841.89 def/LS false def/ENC0[/asciicircum/asciitilde/Scaron -/Zcaron/scaron/zcaron/Ydieresis/trademark/quotesingle/.notdef/.notdef -/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef -/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef -/.notdef/.notdef/.notdef/space/exclam/quotedbl/numbersign/dollar/percent -/ampersand/quoteright/parenleft/parenright/asterisk/plus/comma/hyphen -/period/slash/zero/one/two/three/four/five/six/seven/eight/nine/colon -/semicolon/less/equal/greater/question/at/A/B/C/D/E/F/G/H/I/J/K/L/M/N/O -/P/Q/R/S/T/U/V/W/X/Y/Z/bracketleft/backslash/bracketright/circumflex -/underscore/quoteleft/a/b/c/d/e/f/g/h/i/j/k/l/m/n/o/p/q/r/s/t/u/v/w/x/y -/z/braceleft/bar/braceright/tilde/.notdef/quotesinglbase/guillemotleft -/guillemotright/bullet/florin/fraction/perthousand/dagger/daggerdbl -/endash/emdash/ff/fi/fl/ffi/ffl/dotlessi/dotlessj/grave/hungarumlaut -/dotaccent/breve/caron/ring/ogonek/quotedblleft/quotedblright/oe/lslash -/quotedblbase/OE/Lslash/.notdef/exclamdown/cent/sterling/currency/yen -/brokenbar/section/dieresis/copyright/ordfeminine/guilsinglleft -/logicalnot/minus/registered/macron/degree/plusminus/twosuperior -/threesuperior/acute/mu/paragraph/periodcentered/cedilla/onesuperior -/ordmasculine/guilsinglright/onequarter/onehalf/threequarters -/questiondown/Agrave/Aacute/Acircumflex/Atilde/Adieresis/Aring/AE -/Ccedilla/Egrave/Eacute/Ecircumflex/Edieresis/Igrave/Iacute/Icircumflex -/Idieresis/Eth/Ntilde/Ograve/Oacute/Ocircumflex/Otilde/Odieresis -/multiply/Oslash/Ugrave/Uacute/Ucircumflex/Udieresis/Yacute/Thorn -/germandbls/agrave/aacute/acircumflex/atilde/adieresis/aring/ae/ccedilla -/egrave/eacute/ecircumflex/edieresis/igrave/iacute/icircumflex/idieresis -/eth/ntilde/ograve/oacute/ocircumflex/otilde/odieresis/divide/oslash -/ugrave/uacute/ucircumflex/udieresis/yacute/thorn/ydieresis]def -/Times-Italic@0 ENC0/Times-Italic RE/Times-Bold@0 ENC0/Times-Bold RE -/Times-Roman@0 ENC0/Times-Roman RE +% +% Copyright 2005 Sun Microsystems, Inc. All rights reserved. +% Use is subject to license terms. +% +% CDDL HEADER START +% +% The contents of this file are subject to the terms of the +% Common Development and Distribution License, Version 1.0 only +% (the "License"). You may not use this file except in compliance +% with the License. +% +% You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE +% or http://www.opensolaris.org/os/licensing. +% See the License for the specific language governing permissions +% and limitations under the License. +% +% When distributing Covered Code, include this CDDL HEADER in each +% file and include the License file at usr/src/OPENSOLARIS.LICENSE. +% If applicable, add the following below this CDDL HEADER, with the +% fields enclosed by brackets "[]" replaced with your own identifying +% information: Portions Copyright [yyyy] [name of copyright owner] +% +% CDDL HEADER END +% +%ident "%Z%%M% %I% %E% SMI" +% +% Version 3.16 prologue for troff files. +% + +/#copies 1 store +/aspectratio 1 def +/formsperpage 1 def +/landscape false def +/linewidth .3 def +/magnification 1 def +/margin 0 def +/orientation 0 def +/resolution 720 def +/xoffset 0 def +/yoffset 0 def + +/roundpage true def +/useclippath true def +/pagebbox [0 0 612 792] def + +/R /Times-Roman def +/I /Times-Italic def +/B /Times-Bold def +/BI /Times-BoldItalic def +/H /Helvetica def +/HI /Helvetica-Oblique def +/HB /Helvetica-Bold def +/HX /Helvetica-BoldOblique def +/CW /Courier def +/CO /Courier def +/CI /Courier-Oblique def +/CB /Courier-Bold def +/CX /Courier-BoldOblique def +/PA /Palatino-Roman def +/PI /Palatino-Italic def +/PB /Palatino-Bold def +/PX /Palatino-BoldItalic def +/Hr /Helvetica-Narrow def +/Hi /Helvetica-Narrow-Oblique def +/Hb /Helvetica-Narrow-Bold def +/Hx /Helvetica-Narrow-BoldOblique def +/KR /Bookman-Light def +/KI /Bookman-LightItalic def +/KB /Bookman-Demi def +/KX /Bookman-DemiItalic def +/AR /AvantGarde-Book def +/AI /AvantGarde-BookOblique def +/AB /AvantGarde-Demi def +/AX /AvantGarde-DemiOblique def +/NR /NewCenturySchlbk-Roman def +/NI /NewCenturySchlbk-Italic def +/NB /NewCenturySchlbk-Bold def +/NX /NewCenturySchlbk-BoldItalic def +/ZD /ZapfDingbats def +/ZI /ZapfChancery-MediumItalic def +/VR /Varitimes#Roman def +/VI /Varitimes#Italic def +/VB /Varitimes#Bold def +/VX /Varitimes#BoldItalic def +/S /S def +/S1 /S1 def +/GR /Symbol def + +/inch {72 mul} bind def +/min {2 copy gt {exch} if pop} bind def + +/setup { + counttomark 2 idiv {def} repeat pop + + landscape {/orientation 90 orientation add def} if + /scaling 72 resolution div def + linewidth setlinewidth + 1 setlinecap + + pagedimensions + xcenter ycenter translate + orientation neg rotate + width 2 div neg height 2 div translate + xoffset inch yoffset inch translate + margin 2 div dup neg translate + magnification dup aspectratio mul scale + scaling scaling scale + + /Symbol /S Sdefs cf + /Times-Roman /S1 S1defs cf + 0 0 moveto +} def + +/pagedimensions { + useclippath userdict /gotpagebbox known not and { + /pagebbox [clippath pathbbox newpath] def + roundpage currentdict /roundpagebbox known and {roundpagebbox} if + } if + pagebbox aload pop + 4 -1 roll exch 4 1 roll 4 copy + landscape {4 2 roll} if + sub /width exch def + sub /height exch def + add 2 div /xcenter exch def + add 2 div /ycenter exch def + userdict /gotpagebbox true put +} def + +/pagesetup { + /page exch def + currentdict /pagedict known currentdict page known and { + page load pagedict exch get cvx exec + } if +} def + +/decodingdefs [ + {counttomark 2 idiv {y moveto show} repeat} + {neg /y exch def counttomark 2 idiv {y moveto show} repeat} + {neg moveto {2 index stringwidth pop sub exch div 0 32 4 -1 roll widthshow} repeat} + {neg moveto {spacewidth sub 0.0 32 4 -1 roll widthshow} repeat} + {counttomark 2 idiv {y moveto show} repeat} + {neg setfunnytext} +] def + +/setdecoding {/t decodingdefs 3 -1 roll get bind def} bind def + +/w {neg moveto show} bind def +/m {neg dup /y exch def moveto} bind def +/done {/lastpage where {pop lastpage} if} def + +/f { + dup /font exch def findfont exch + dup /ptsize exch def scaling div dup /size exch def scalefont setfont + linewidth ptsize mul scaling 10 mul div setlinewidth + /spacewidth ( ) stringwidth pop def +} bind def + +/changefont { + /fontheight exch def + /fontslant exch def + currentfont [ + 1 0 + fontheight ptsize div fontslant sin mul fontslant cos div + fontheight ptsize div + 0 0 + ] makefont setfont +} bind def + +/sf {f} bind def + +/cf { + dup length 2 idiv + /entries exch def + /chtab exch def + /newfont exch def + + findfont dup length 1 add dict + /newdict exch def + {1 index /FID ne {newdict 3 1 roll put} {pop pop} ifelse} forall + + newdict /Metrics entries dict put + newdict /Metrics get + begin + chtab aload pop + 1 1 entries {pop def} for + newfont newdict definefont pop + end +} bind def + +% +% A few arrays used to adjust reference points and character widths in some +% of the printer resident fonts. If square roots are too high try changing +% the lines describing /radical and /radicalex to, +% +% /radical [0 -75 550 0] +% /radicalex [-50 -75 500 0] +% + +/Sdefs [ + /bracketlefttp [220 500] + /bracketleftbt [220 500] + /bracketrighttp [-70 380] + /bracketrightbt [-70 380] + /braceleftbt [220 490] + /bracketrightex [220 -125 500 0] + /radical [0 0 550 0] + % NeWSprint's \(br is too low, compensate + statusdict /product get (NeWS Server) eq { + /radicalex [-50 100 500 0] + /parenleftex [-20 100 0 0] + + } { + /radicalex [-50 0 500 0] + /parenleftex [-20 -170 0 0] + } ifelse + /integral [100 -50 500 0] + /infinity [10 -75 730 0] +] def + +/S1defs [ + /underscore [0 80 500 0] + /endash [7 90 650 0] +] def %%EndProlog +%%BeginSetup +mark +/resolution 720 def +setup +2 setdecoding +%%EndSetup %%Page: 1 1 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(CDD)72 48 Q(A2W)-.4 E -1.35(AV)-1.2 G 333.66 -(\(1\) CDD)1.35 F(A2W)-.4 E -1.35(AV)-1.2 G(\(1\))1.35 E/F1 10.95 -/Times-Bold@0 SF -.219(NA)72 84 S(ME).219 E F0(cdda2w)108 96 Q .4 -.2 -(av \255 a s)-.1 H(ampling utility that dumps CD audio data into w).2 E -.4 -.2(av s)-.1 H(ound \214les).2 E F1(SYNOPSIS)72 112.8 Q/F2 10 -/Times-Bold@0 SF(cdda2wa)108 124.8 Q(v)-.25 E F0([)2.813 E F2(-c)A/F3 10 -/Times-Italic@0 SF -.15(ch)2.813 G(ans).15 E F0 2.813(][).27 G F2(-s) --2.813 E F0 2.813(][)C F2(-m)-2.813 E F0 2.813(][)C F2(-b)-2.813 E F3 -(bits)2.813 E F0 2.812(][).27 G F2(-r)-2.812 E F3 -.15(ra)2.812 G(te).15 -E F0 2.812(][).18 G F2(-a)-2.812 E F3(divider)2.812 E F0 2.812(][).73 G -F2(-t)-2.812 E F3(tr)2.812 E(ac)-.15 E(k)-.2 E F0([).67 E F3(+endtr)-.36 -E(ac)-.15 E(k)-.2 E F0 .312(]] [).67 F F2(-i)A F3(inde)2.812 E(x)-.2 E -F0 2.812(][).53 G F2(-o)-2.812 E F3(of)2.812 E(fset)-.18 E F0 2.812(][) -.68 G F2(-d)-2.812 E F3(dur)108 136.8 Q(ation)-.15 E F0 3.266(][).24 G -F2(-x)-3.266 E F0 3.266(][)C F2(-q)-3.266 E F0 3.266(][)C F2(-w)-3.266 E -F0 3.266(][)C F2(-v)-3.266 E F3(optlist)3.266 E F0 3.266(][).68 G F2(-V) --3.266 E F0 3.267(][)C F2(-Q)-3.267 E F0 3.267(][)C F2(-J)-3.267 E F0 -3.267(][)C F2(-L)-3.267 E F3(cddbmode)3.267 E F0 3.267(][).18 G F2(-R) --3.267 E F0 3.267(][)C F2(-P)-3.267 E F3(sector)3.267 E(s)-.1 E F0 3.267 -(][).27 G F2(-F)-3.267 E F0 3.267(][)C F2(-G)-3.267 E F0 3.267(][)C F2 -(-T)-3.267 E F0 3.267(][)C F2(-e)-3.267 E F0 3.267(][)C F2(-p)-3.267 E -F3(per)108 148.8 Q(centa)-.37 E -.1(ge)-.1 G F0 3.411(][).28 G F2(-n) --3.411 E F3(sector)3.411 E(s)-.1 E F0 3.411(][).27 G F2(-l)-3.411 E F3 --.2(bu)3.411 G -.18(ff).2 G(er).18 E(s)-.1 E F0 3.411(][).27 G F2(-N) --3.411 E F0 3.411(][)C F2(-J)-3.411 E F0 3.411(][)C F2(-H)-3.411 E F0 -3.411(][)C F2(-g)-3.411 E F0 3.411(][)C F2(-B)-3.411 E F0 3.411(][)C F2 -(-D)-3.411 E F3(de)3.41 E(vice)-.15 E F0 3.41(][).18 G F2(-A)-3.41 E F3 -(auxde)3.41 E(vice)-.15 E F0 3.41(][).18 G F2(-I)-3.41 E F3(interface) -3.41 E F0 3.41(][).18 G F2(-O)-3.41 E F3(audiotype)108 160.8 Q F0 5.989 -(][).18 G F2(-C)-5.989 E F3(input-endianess)5.989 E F0 5.989(][).27 G F2 -(-E)-5.989 E F3(output-endianess)5.989 E F0 5.989(][).27 G F2(-M)-5.989 -E F3(count)5.989 E F0 5.989(][).68 G F2(-S)-5.989 E F3(speed)5.989 E F0 -5.989(][).77 G F2(-paranoia)-5.989 E F0 5.989(][)C F2(cddbp-)-5.989 E -(ser)108 172.8 Q -.1(ve)-.1 G(r=ser).1 E -.1(ve)-.1 G -.15(rn).1 G(ame) -.15 E F0 2.5(][)C F2(cddbp-port=portnumber)-2.5 E F0 2.5(][)C F3 -(\214lename\(s\))-.59 E F0(or)2.5 E F3(dir)2.5 E(ectories)-.37 E F0(]) -.27 E F1(DESCRIPTION)72 189.6 Q F2(cdda2wa)108 201.6 Q(v)-.25 E F0 .347 -(can retrie)2.847 F .647 -.15(ve a)-.25 H .347(udio tracks from CDR).15 -F .347(OM dri)-.4 F -.15(ve)-.25 G 2.847(s\().15 G .346 -(see README for a list of dri)-2.847 F -.15(ve)-.25 G .346 -(s\) that are capa-).15 F -(ble of reading audio data digitally to the host \()108 213.6 Q F2(CDD)A -(A)-.35 E F0(\).)A F1(OPTIONS)72 230.4 Q F2108 242.4 Q F3(de)2.5 E -2.5(vice --de)-.15 F 2.5(v-)-.15 G(-de)-2.5 E(vice)-.15 E F0(uses)144 -254.4 Q F2(de)2.835 E(vice)-.15 E F0 .335(as the source for CDD)2.835 F -2.836(Ar)-.4 G 2.836(eading. F)-2.836 F .336(or e)-.15 F .336 -(xample /de)-.15 F .336(v/cdrom for the)-.25 F F2(cook)2.836 E(ed_ioctl) --.1 E F0(inter)2.836 E(-)-.2 E -.1(fa)144 266.4 S .813 -(ce and Bus,ID,Lun for the).1 F F2(generic_scsi)3.312 E F0(interf)3.312 -E .812(ace. The)-.1 F F2(de)3.312 E(vice)-.15 E F0 .812 -(has to correspond with the inter)3.312 F(-)-.2 E -.1(fa)144 278.4 S -.597(ce setting \(see belo).1 F 3.097(w\). The)-.25 F .598 -(setting of the en)3.097 F .598(vironment v)-.4 F(ariable)-.25 E F2(CDD) -3.098 E(A_DEVICE)-.35 E F0 .598(is o)3.098 F -.15(ve)-.15 G(rridden).15 -E(by this option.)144 290.4 Q F2108 307.2 Q F3(auxde)2.5 E 2.5 -(vice --auxde)-.15 F(vice)-.15 E F0(uses)144 319.2 Q F2(auxde)2.5 E -(vice)-.15 E F0(as CDR)2.5 E(OM dri)-.4 E .3 -.15(ve f)-.25 H -(or ioctl usage.).15 E F2108 336 Q F3 2.5(interface --interface) -2.5 F F0 1.867(speci\214es the interf)144 348 R 1.867(ace for CDR)-.1 F -1.867(OM access:)-.4 F F2(generic_scsi)4.367 E F0 1.866 -(or \(on Linux, and FreeBSD systems\))4.367 F F2(cook)144 360 Q -(ed_ioctl)-.1 E F0(.)A F2108 376.8 Q F3 -.15(ch)2.5 G 2.5 -(annels --c).15 F(hannels)-.15 E F0(uses)144 388.8 Q F2(1)2.5 E F0 -(for mono, or)2.5 E F2(2)2.5 E F0(for stereo recording, or)2.5 E F2(s) -2.5 E F0(for stereo recording with both channels sw)2.5 E(apped.)-.1 E -F2 2.5(\255s --ster)108 405.6 R(eo)-.18 E F0(sets to stereo recording.) -144 417.6 Q F2 2.5(\255m --mono)108 434.4 R F0(sets to mono recording.) -144 446.4 Q F2 2.5(\255x --max)108 463.2 R F0 -(sets maximum \(CD\) quality)144 475.2 Q(.)-.65 E F2108 492 Q F3 -2.5(bits --bits-per)2.5 F(-sample)-.2 E F0 -(sets bits per sample per channel:)144 504 Q F2(8)2.5 E F0(,)A F2(12)2.5 -E F0(or)2.5 E F2(16)2.5 E F0(.)A F2108 520.8 Q F3 -.15(ra)2.5 G -2.5(te --r).15 F(ate)-.15 E F0(sets rate in samples per second.)144 -532.8 Q(Possible v)5 E(alues are listed with the)-.25 E F22.5 E F0 -(option.)2.5 E F2108 549.6 Q F3 2.5(divider --divider)2.5 F F0 -(sets rate to 44100Hz / di)144 561.6 Q(vider)-.25 E 5(.P)-.55 G -(ossible v)-5 E(alues are listed with the)-.25 E F22.5 E F0 -(option.)2.5 E F2 2.5(\255R --dump-rates)108 578.4 R F0(sho)144 590.4 Q -(ws a list of all sample rates and their di)-.25 E(viders.)-.25 E F2 2.5 -(\255P sectors --set-o)108 607.2 R -.1(ve)-.1 G(rlap).1 E F0 -(sets the initial number of o)144 619.2 Q -.15(ve)-.15 G(rlap).15 E F3 -(sector)2.5 E(s)-.1 E F0(for jitter correction.)2.5 E F2108 636 Q -F3(sector)2.5 E 5(s-)-.1 G(-sector)-5 E(s-per)-.1 E(-r)-.2 E(equest)-.37 -E F0(reads)144 648 Q F3(sector)2.5 E(s)-.1 E F0(per request.)2.5 E F2 -108 664.8 Q F3 -.2(bu)2.5 G -.18(ff).2 G(er).18 E 5(s-)-.1 G(-b)-5 -E(uf)-.2 E(fer)-.18 E(s-in-ring)-.1 E F0(uses a ring b)144 676.8 Q(uf) --.2 E(fer with)-.25 E F3 -.2(bu)2.5 G -.18(ff).2 G(er).18 E(s)-.1 E F0 -(total.)2.5 E F2108 693.6 Q F3(tr)2.5 E(ac)-.15 E(k+endtr)-.2 E -(ac)-.15 E 5(k-)-.2 G(-tr)-5 E(ac)-.15 E(k)-.2 E F0 -(selects the start track and optionally the end track.)144 705.6 Q(1)535 -768 Q EP +save +mark +1 pagesetup +10 R f +( \( 1 \))3 164( CDDA2WAV)1 3839(User Commands)1 677 3 720 480 t +9 B f +( E)1 0( ME)1 60(N NA AM)2 215 3 720 960 t +10 R f +(cdda2wav)1080 1080 w +10 S1 f +(\261)1517 1080 w +10 R f +(dumps CD audio data into sound \256les with extra data veri\256cation)10 2684 1 1615 1080 t +9 B f +( S)1 0( IS)1 50( SI)1 35( PS)1 50( OP)1 55( YN NO)2 135(S SY)1 115 7 720 1248 t +10 B f +( av v)2 50( wa)1 50( a2 2w)2 122( dd da)2 106(c cd)1 100 5 1080 1368 t +10 R f +([)1541 1368 w +10 I f +(options)1607 1368 w +10 R f +(][)1935 1368 w +10 B f +( =)1 0( v=)1 57( ev)1 50(d de)1 100 4 2034 1368 t +10 I f +(device)2241 1368 w +10 R f +(] [)1 99 1 2528 1368 t +10 I f +(\256le\(s\))2627 1368 w +10 R f +(or)2887 1368 w +10 I f +(directories)3003 1368 w +10 R f +(])3444 1368 w +9 B f +( N)1 0( ON)1 65( IO)1 70( TI)1 35( PT)1 60( IP)1 55( CR RI)2 100( SC)1 65( ES)1 50(D DE)1 125 10 720 1536 t +10 B f +( av v)2 50( wa)1 50( a2 2w)2 122( dd da)2 106(c cd)1 100 5 1080 1656 t +10 R f +( from CDROM drives that are capable of reading audio data digitally)11 2858(can retrieve audio tracks)3 1001 2 1541 1656 t +(to the host via SCSI \()5 899 1 1080 1776 t +10 B f +(C CD DD DA A)4 288 1 1979 1776 t +10 R f +(\).)2267 1776 w +(As)1080 1944 w +10 B f +( av v)2 50( wa)1 50( a2 2w)2 122( dd da)2 106(c cd)1 100 5 1232 1944 t +10 R f +(implements strategies to work around typical defects on audio CDs it reads many disks)13 3698 1 1702 1944 t +( As)1 185(that cannot be read by other software.)6 1600 2 1080 2064 t +10 B f +( av v)2 50( wa)1 50( a2 2w)2 122( dd da)2 106(c cd)1 100 5 2906 2064 t +10 R f +(may be told to use)4 797 1 3375 2064 t +10 B f +( a)1 0( ia)1 50( oi)1 28( no)1 50( an)1 56( ra)1 50( ar)1 44( bp pa)2 106(l li ib)2 112 9 4213 2064 t +10 R f +(\(see)4750 2064 w +10 S1 f +(\261 \261)1 65 1 4951 2064 t +10 B f +( a)1 0( ia)1 50( oi)1 28( no)1 50( an)1 56( ra)1 50( ar)1 44(p pa)1 106 8 5016 2064 t +10 R f +( verify the data that has been read from the medium, it delivers superior quality even if)16 3639(option below\) to)2 681 2 1080 2184 t +(the medium is dusty, scratched or if other problems occur.)9 2399 1 1080 2304 t +(As)1080 2472 w +10 B f +( av v)2 50( wa)1 50( a2 2w)2 122( dd da)2 106(c cd)1 100 5 1226 2472 t +10 R f +(may be directed to write the audio data to stdout, it writes all it's informational output to)16 3710 1 1690 2472 t +(stderr by default. See)3 872 1 1080 2592 t +10 B f +( t)1 0( ut)1 33(o ou)1 106 3 1985 2592 t +10 S1 f +(\261 \261)1 65 1 2124 2592 t +10 B f +( =)1 0( d=)1 57(f fd)1 89 3 2189 2592 t +10 I f +(descriptor)2335 2592 w +10 R f +(option below.)1 558 1 2779 2592 t +9 B f +( s)1 0( gs)1 35( ng)1 45( in)1 50( tt ti)2 55( et)1 30( se)1 40( s)1 65( t)1 0( lt)1 30( ul)1 25( au)1 50( fa)1 45( ef)1 30(D De)1 105 15 900 2760 t +10 B f +( av v)2 50( wa)1 50( a2 2w)2 122( dd da)2 106(C Cd)1 128 5 1080 2880 t +10 R f +( the \256rst audio track from the medium and the default verbose level is set to)15 3156(defaults to reead)2 675 2 1569 2880 t +10 S1 f +(\261 \261)1 65 1 1080 3000 t +10 B f +( s)1 0( es)1 39( le)1 44( tl)1 28( it)1 33( ti)1 28( ,t)1 33( s,)1 25( rs)1 39( or)1 44( to)1 50( ec ct)2 77( se)1 44( ,s)1 39( y,)1 25( ry)1 50( ar)1 44( mm ma)2 133( um)1 83( su)1 56( ,s)1 39( c,)1 25( oc)1 44( to)1 50(v vt)1 83 25 1145 3000 t +10 R f +(and)2346 3000 w +10 B f +( av v)2 50( wa)1 50( a2 2w)2 122( dd da)2 106(c cd)1 100 5 2536 3000 t +10 R f +(by default writes)2 713 1 3010 3000 t +10 S f +(* *)1 50 1 3769 3000 t +10 B f +( f)1 0( nf)1 33( in)1 56(. .i)1 53 4 3819 3000 t +10 R f +( extract all audio tracks)4 1011(\256les. To)1 382 2 4007 3000 t +(with quality veri\256cation, it is recommended to call:)7 2105 1 1080 3120 t +10 B f +( B)1 0( -B)1 67( -)1 66( a)1 0( ia)1 50( oi)1 28( no)1 50( an)1 56( ra)1 50( ar)1 44( pa)1 50( -p)1 56( -)1 66( 0)1 0( =0)1 50( dd db b=)3 169( cd)1 56( c)1 77( ll l)2 28( va al)2 78( -v)1 50( -)1 66( av v)2 50( wa)1 50( a2 2w)2 122( dd da)2 106(c cd)1 100 27 1080 3288 t +9 B f +( g)1 0( ng)1 45( in)1 50( mi)1 25( am)1 75( na)1 45( n)1 80( ce e)2 40( ic)1 40( vi)1 25( ev)1 45(D De)1 105 12 900 3456 t +10 R f +( no)1 136( If)1 135( not need to care about device naming at all.)9 1862(Most users do)2 581 4 1080 3576 t +10 B f +( =)1 0( v=)1 57( ev)1 50(d de)1 100 4 3830 3576 t +10 R f +(option was speci\256ed,)2 863 1 4073 3576 t +10 B f +( av v)2 50( wa)1 50( a2 2w)2 122( dd da)2 106(c cd)1 100 5 4972 3576 t +10 R f +(implements)1080 3696 w +10 B f +( t)1 0( et)1 33( ge)1 44( rg)1 50( ar)1 44( ta)1 50( t)1 80( o)1 0( to)1 50( ut)1 33(a au)1 106 11 1594 3696 t +10 R f +(support and automagically \256nds the drive in case that exactly one CD-ROM)11 3269 1 2131 3696 t +( the sys-)2 355( case that more than one CD-ROM type drive exists on)10 2297( In)1 151(type drive is available in the system.)6 1517 4 1080 3816 t +(tem, a list of possible device name parameters may be retrieved with)11 2893 1 1080 3936 t +10 B f +( av v)2 50( wa)1 50( a2 2w)2 122( dd da)2 106(c cd)1 100 5 4012 3936 t +10 S1 f +(\261 \261)1 65 1 4479 3936 t +10 B f +( s)1 0( nb bu us)3 151( an)1 56( ca)1 50(s sc)1 83 5 4544 3936 t +10 R f +(or from the)2 477 1 4923 3936 t +( output of)2 421(target example from the)3 1001 2 1080 4056 t +10 B f +( p)1 0( lp)1 56( el)1 28( he)1 44( =h)1 56( v=)1 57( ev)1 50( de)1 44( d)1 97( av v)2 50( wa)1 50( a2 2w)2 122( dd da)2 106(c cd)1 100 14 2543 4056 t +10 R f +(, then the)2 401 1 3403 4056 t +10 B f +( =)1 0( v=)1 57( ev)1 50(d de)1 100 4 3845 4056 t +10 R f +(parameter may be set based on)5 1307 1 4093 4056 t +(the device listing.)2 724 1 1080 4176 t +(The)1080 4344 w +10 I f +(device)1310 4344 w +10 R f +(parameter to the)2 748 1 1639 4344 t +10 B f +( =)1 0( v=)1 57( ev)1 50(d de)1 100 4 2462 4344 t +10 R f +( below refers to)3 776(option explained)1 719 2 2744 4344 t +10 I f +(scsibus)4315 4344 w +10 R f +(/)4612 4344 w +10 I f +(target)4640 4344 w +10 R f +(/)4887 4344 w +10 I f +(lun)4915 4344 w +10 R f +(of the)1 281 1 5119 4344 t +( the)1 161( a \256le /etc/default/cdrecord exists, the parameter to)7 2128(CD/DVD/BluRay-Recorder. If)1 1279 3 1080 4464 t +10 B f +( =)1 0( v=)1 57( ev)1 50(d de)1 100 4 4687 4464 t +10 R f +(option may)1 467 1 4933 4464 t +(also be a drive name label in said \256le \(see FILES section\).)11 2412 1 1080 4584 t +9 B f +( S)1 0( NS)1 50( ON)1 65( IO)1 70( TI)1 35( PT)1 60(O OP)1 125 7 720 4872 t +( s)1 0( ns)1 35( on)1 50( io)1 45( ti)1 25( pt)1 30( op)1 50( o)1 75( e)1 0( ve)1 40( iv)1 45( ti)1 25( at)1 30( ma)1 45( rm)1 75( or)1 40( fo)1 45( nf)1 30(I In)1 85 19 900 4992 t +10 S1 f +(\261 \261)1 65 1 1080 5112 t +10 B f +(h h)1 56 1 1145 5112 t +10 S1 f +(\261 \261)1 65 1 1080 5280 t +10 B f +( p)1 0( lp)1 56( el)1 28(h he)1 100 4 1145 5280 t +10 R f +(display version information for cdda2wav on standard output.)7 2525 1 1440 5280 t +10 S1 f +(\261 \261)1 65 1 1080 5448 t +10 B f +( n)1 0( on)1 56( io)1 50( si)1 28( er rs)2 83(v ve)1 94 6 1145 5448 t +10 R f +(display version and Copyright information.)4 1762 1 1440 5568 t +9 B f +( s)1 0( ns)1 35( on)1 50( io)1 45( ti)1 25( pt)1 30( op)1 50( o)1 75( o)1 0( io)1 45( ud di)2 75(A Au)1 115 12 900 5736 t +10 S1 f +(\261 \261)1 65 1 1080 5856 t +10 B f +(a a)1 50 1 1145 5856 t +10 I f +(divider)1228 5856 w +10 S1 f +(\261 \261)1 65 1 1080 6024 t +10 B f +( er r)2 44( de)1 44( id)1 56( vi)1 28( iv)1 50(d di)1 84 6 1145 6024 t +10 I f +(divider)1484 6024 w +10 R f +(sets rate to 44100Hz /)4 903 1 1440 6144 t +10 I f +(divider)2376 6144 w +10 R f +( values are listed with the)5 1058(. Possible)1 425 2 2667 6144 t +10 S1 f +(\261 \261)1 65 1 4183 6144 t +10 B f +(R R)1 72 1 4248 6144 t +10 R f +(option.)4353 6144 w +(The default divider value is 1.)5 1238 1 1440 6384 t +10 S1 f +(\261 \261)1 65 1 1080 6552 t +10 B f +(B B)1 67 1 1145 6552 t +10 S1 f +(\261 \261)1 65 1 1080 6720 t +10 B f +( k)1 0( lk)1 56(b bu ul)2 140 3 1145 6720 t +10 S1 f +(\261 \261)1 65 1 1080 6888 t +10 B f +( s)1 0( ks)1 39( ck)1 56( ac)1 44( ra)1 50( tr)1 44( ll lt)2 61(a al)1 78 8 1145 6888 t +10 R f +(copies each track into a separate \256le.)6 1513 1 1440 7008 t +(The default is not to extract all tracks.)7 1570 1 1440 7248 t +( 1)1 1829( change: Version 3.0)3 850( Last)1 1509(SunOS 5.10)1 492 4 720 7728 t +cleartomark +showpage +restore +%%EndPage: 1 1 %%Page: 2 2 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(CDD)72 48 Q(A2W)-.4 E -1.35(AV)-1.2 G 333.66 -(\(1\) CDD)1.35 F(A2W)-.4 E -1.35(AV)-1.2 G(\(1\))1.35 E/F1 10 -/Times-Bold@0 SF108 84 Q/F2 10/Times-Italic@0 SF(inde)2.5 E 5(x-) --.2 G(-inde)-5 E(x)-.2 E F0(selects the start inde)144 96 Q(x.)-.15 E F1 -108 112.8 Q F2(of)2.5 E 2.5(fset --of)-.18 F(fset)-.18 E F0 -(starts)144 124.8 Q F2(of)2.5 E(fset)-.18 E F0 -(sectors behind start track \(one sector equi)2.5 E -.25(va)-.25 G -(lents 1/75 seconds\).).25 E F1 2.5(\255O audiotype --output-f)108 141.6 -R(ormat)-.25 E F0 .646(can be)144 153.6 R F2(wav)3.146 E F0 .646 -(\(for w)3.146 F 1.046 -.2(av \214)-.1 H .646(les\) or).2 F F2(aif)3.146 -E(f)-.18 E F0 .646(\(for apple/sgi aif)3.146 F 3.146<668c>-.25 G .646 -(les\) or)-3.146 F F2(aifc)3.146 E F0 .646 -(\(for apple/sgi aifc \214les\) or)3.146 F F2(au)3.146 E F0(or)3.146 E -F2(sun)144 165.6 Q F0(\(for sun .au PCM \214les\) or)2.5 E F2(cdr)2.5 E -F0(or)2.5 E F2 -.15(ra)2.5 G(w).15 E F0 -(\(for headerless \214les to be used for cd writers\).)2.5 E F1108 -182.4 Q F2 2.5(endianess --cdr)2.5 F(om-endianess)-.45 E F0 -(sets endianess of the input samples to ')144 194.4 Q -(little', 'big' or 'guess' to o)-.1 E -.15(ve)-.15 G(rride def).15 E -(aults.)-.1 E F1108 211.2 Q F2 2.5(endianess --output-endianess) -2.5 F F0(sets endianess of the output samples to ')144 223.2 Q -(little' or 'big' to o)-.1 E -.15(ve)-.15 G(rride def).15 E(aults.)-.1 E -F1108 240 Q F2(dur)2.5 E 2.5(ation --dur)-.15 F(ation)-.15 E F0 -.82(sets recording time in seconds or frames.)144 252 R .819 -(Frames \(sectors\) are indicated by a 'f)5.819 F 3.319('s).55 G(uf) --3.319 E .819(\214x \(lik)-.25 F 3.319(e7)-.1 G(5f)-3.319 E -(for 75 sectors\).)144 264 Q F1(0)5 E F0(sets the time for whole track.) -2.5 E F1 2.5(\255B --b)108 280.8 R(ulk --alltracks)-.2 E F0 -(copies each track into a seperate \214le.)144 292.8 Q F1 2.5 -(\255w --wait)108 309.6 R F0 -.1(wa)144 321.6 S -(its for signal, then start recording.).1 E F1 2.5(\255F --\214nd-extr) -108 338.4 R(emes)-.18 E F0(\214nds e)144 350.4 Q -(xtrem amplitudes in samples.)-.15 E F1 2.5(\255G --\214nd-mono)108 -367.2 R F0(\214nds if input samples are in mono.)144 379.2 Q F1 2.5 -(\255T --deemphasize)108 396 R F0(undo the ef)144 408 Q -(fect of pre-emphasis in the input samples.)-.25 E F1 2.5(\255e --echo) -108 424.8 R F0(copies audio data to sound de)144 436.8 Q(vice e.g.)-.25 -E F1(/de)5 E(v/dsp)-.15 E F0(.)A F1 2.5(\255p per)108 453.6 R -(centage --set-pitch)-.18 E F0 -(changes pitch of audio data copied to sound de)144 465.6 Q(vice.)-.25 E -F1 2.5(\255v itemlist --v)108 482.4 R(erbose-le)-.1 E -.1(ve)-.15 G(l).1 -E F0 1.352(prints v)144 494.4 R 1.353(erbose information about the CD.) --.15 F F1(Le)6.353 E -.1(ve)-.15 G(l).1 E F0 1.353 -(is a list of comma seperated suboptions. Each)3.853 F -(suboption controls the type of information to be reported.)144 506.4 Q -.4 LW 502.205 510.9 181.795 510.9 DL 12.5(Suboption Description)186.795 -520.4 R 502.205 524.9 181.795 524.9 DL 12.5(disable no)199.585 534.4 R -(information is gi)2.5 E -.15(ve)-.25 G(n, w).15 E(arnings appear ho)-.1 -E(we)-.25 E -.15(ve)-.25 G(r).15 E 12.5(all all)217.915 546.4 R -(information is gi)2.5 E -.15(ve)-.25 G(n).15 E 12.5(toc sho)215.695 -558.4 R 2.5(wt)-.25 G(able of contents)-2.5 E 12.5(summary sho)190.695 -570.4 R 2.5(was)-.25 G(ummary of the recording parameters)-2.5 E 12.5 -(indices determine)199.585 582.4 R(and display inde)2.5 E 2.5(xo)-.15 G --.25(ff)-2.5 G(sets).25 E 12.5(catalog retrie)199.035 594.4 R .3 -.15 -(ve a)-.25 H(nd display the media catalog number MCN).15 E 12.5 -(trackid retrie)200.145 606.4 R .3 -.15(ve a)-.25 H -(nd display all Intern. Standard Recording Codes ISRC).15 E 12.5 -(sectors sho)200.145 618.4 R 2.5(wt)-.25 G -(he table of contents in start sector notation)-2.5 E 12.5(titles sho) -208.465 630.4 R 2.5(wt)-.25 G -(he table of contents with track titles \(when a)-2.5 E -.25(va)-.2 G -(ilable\)).25 E 502.205 634.9 181.795 634.9 DL 235.415 510.9 235.415 -634.9 DL 502.205 510.9 502.205 634.9 DL 181.795 510.9 181.795 634.9 DL -F1 2.5(\255N --no-write)108 647.2 R F0 -(does not write to a \214le, it just reads \(for deb)144 659.2 Q -(ugging purposes\).)-.2 E F1 2.5(\255J --inf)108 676 R(o-only)-.25 E F0 -(does not write to a \214le, it just gi)144 688 Q -.15(ve)-.25 G 2.5(si) -.15 G(nformation about the disc.)-2.5 E F1 2.5(\255L cddb)108 704.8 R -(mode --cddb)2.5 E F0 1.781(does a cddbp alb)144 716.8 R 1.781 -(um- and track title lookup based on the cddb id.)-.2 F 1.78 -(The parameter cddb mode)6.78 F(de\214nes ho)144 728.8 Q 2.5(wm)-.25 G -(ultiple entries shall be handled.)-2.5 E(2)535 768 Q EP +save +mark +2 pagesetup +10 R f +( \( 1 \))3 164( CDDA2WAV)1 3839(User Commands)1 677 3 720 480 t +10 S1 f +(\261 \261)1 65 1 1080 960 t +10 B f +(b b)1 56 1 1145 960 t +10 I f +(bits)1234 960 w +10 S1 f +(\261 \261)1 65 1 1080 1128 t +10 B f +( s)1 0( ts)1 39( it)1 33(b bi)1 84 4 1145 1128 t +10 S1 f +(\261 \261)1 65 1 1301 1128 t +10 B f +( er r)2 44(p pe)1 100 2 1366 1128 t +10 S1 f +(\261 \261)1 65 1 1510 1128 t +10 B f +( e)1 0( le)1 44( pl)1 28( mp)1 56( am)1 83(s sa)1 89 6 1575 1128 t +10 I f +(bits)1908 1128 w +10 R f +(sets)1440 1248 w +10 I f +(bits)1623 1248 w +10 R f +(per sample per channel:)3 974 1 1801 1248 t +10 B f +(8 8)1 50 1 2841 1248 t +10 R f +(,)2891 1248 w +10 B f +(1 12 2)2 100 1 2949 1248 t +10 R f +(or)3082 1248 w +10 B f +(1 16 6)2 100 1 3198 1248 t +10 R f +(.)3298 1248 w +(The default is 16 bits per sample.)6 1377 1 1440 1488 t +10 S1 f +(\261 \261)1 65 1 1080 1656 t +10 B f +(c c)1 44 1 1145 1656 t +10 I f +(channels)1222 1656 w +10 S1 f +(\261 \261)1 65 1 1080 1824 t +10 B f +( s)1 0( ls)1 39( el)1 28( nn ne)2 100( an)1 56( ha)1 50(c ch)1 100 7 1145 1824 t +10 I f +(channels)1551 1824 w +10 R f +(use:)1440 1944 w +10 B f +(1 1)1 50 1 1440 2112 t +10 R f +(for mono recording)2 792 1 1800 2112 t +10 B f +(2 2)1 50 1 1440 2280 t +10 R f +(for stereo recording)2 802 1 1800 2280 t +10 B f +(s s)1 39 1 1440 2448 t +10 R f +(for stereo recording with both channels swapped)6 1988 1 1800 2448 t +(The default is to do stereo recording.)6 1520 1 1440 2616 t +10 S1 f +(\261 \261)1 65 1 1080 2784 t +10 B f +(C C)1 72 1 1145 2784 t +10 I f +(endianess)1250 2784 w +10 S1 f +(\261 \261)1 65 1 1080 2952 t +10 B f +( m)1 0( om)1 83( ro)1 50( dr)1 44(c cd)1 100 5 1145 2952 t +10 S1 f +(\261 \261)1 65 1 1422 2952 t +10 B f +( ss s)2 39( es)1 39( ne)1 44( an)1 56( ia)1 50( nd di)2 84(e en)1 100 7 1487 2952 t +10 I f +(endianess)1932 2952 w +10 R f +( to override defaults.)3 880(sets endianess of the input samples to 'little', 'big', 'machine' or 'guess')11 3080 2 1440 3072 t +( the host CPU in the)5 924(The value 'machine' or 'host' is evaluated as the actual byte order of)12 3036 2 1440 3192 t +(current OS.)1 468 1 1440 3312 t +(The default is to detect cdrom endianess automatically.)7 2258 1 1440 3552 t +10 S1 f +(\261 \261)1 65 1 1080 3720 t +10 B f +( e)1 0( le)1 44( \256l)1 28( e\256)1 56( ue)1 44(c cu)1 100 6 1145 3720 t +10 R f +( the CDRWIN)2 621( CUE \256le that completely follows)5 1452( A)1 151(Create a CDRWIN compatible CUE \256le.)5 1736 4 1440 3840 t +( copies if there is a single \256le with audio data for)11 2071(documentation can only be used to create 1:1)7 1889 2 1440 3960 t +( The)1 230( disk.)1 234(the whole)1 407 3 1440 4080 t +10 S f +(*)2353 4080 w +10 R f +(.inf \256le format implements more audio CD features than the CDRWIN)10 2997 1 2403 4080 t +( the)1 158( Use)1 224( allows to create 1:1 copies if there is one audio data \256le per track.)14 2801(CUE format and it)3 777 4 1440 4200 t +(CUE \256le format for meta data only if you really need this format.)12 2706 1 1440 4320 t +(To allow)1 368 1 1440 4560 t +10 B f +( av v)2 50( wa)1 50( a2 2w)2 122( dd da)2 106(c cd)1 100 5 1843 4560 t +10 R f +( \256les, you must also specify)5 1166(to create CUE)2 585 2 2306 4560 t +10 S1 f +(\261 \261)1 65 1 4093 4560 t +10 B f +( ll l)2 28( al)1 28( a)1 86(t t)1 33 4 4158 4560 t +10 R f +(to switch)1 375 1 4369 4560 t +10 B f +( av v)2 50( wa)1 50( a2 2w)2 122( dd da)2 106(c cd)1 100 5 4780 4560 t +10 R f +(into)5244 4560 w +(a mode that creates a single audio data \256le for the whole CD.)12 2533 1 1440 4680 t +10 S1 f +(\261 \261)1 65 1 1080 4848 t +10 B f +(T T)1 67 1 1145 4848 t +10 S1 f +(\261 \261)1 65 1 1080 5016 t +10 B f +( ze e)2 44( iz)1 44( si)1 28( as)1 39( ph ha)2 106( mp)1 56( ee em)2 127(d de)1 100 8 1145 5016 t +10 R f +(undo the effect of pre-emphasis in the input samples.)8 2180 1 1440 5136 t +( audio data in the same state as on the medium and to mark the pre-)15 2888(The default is to keep the)5 1072 2 1440 5376 t +(emphasis state in the)3 854 1 1440 5496 t +10 S f +(* *)1 50 1 2327 5496 t +10 B f +( f)1 0( nf)1 33( in)1 56(. .i)1 53 4 2377 5496 t +10 R f +(\256les.)2552 5496 w +10 S1 f +(\261 \261)1 65 1 1080 5664 t +10 B f +(L L)1 67 1 1145 5664 t +10 I f +(cddb mode)1 443 1 1245 5664 t +10 S1 f +(\261 \261)1 65 1 1080 5832 t +10 B f +( dd db b)3 112(c cd)1 100 2 1145 5832 t +10 I f +(cddb mode)1 443 1 1390 5832 t +10 R f +( parameter cddb mode)3 943( The)1 231( based on the cddb id.)5 961(does a cddbp album- and track title lookup)7 1825 4 1440 5952 t +(de\256nes how multiple entries shall be handled.)6 1877 1 1440 6072 t +10 S f +(_ _________________________________________________________)1 2872 1 1984 6092 t +10 R f +(Parameter Description)1 1020 1 2034 6212 t +10 S f +(_ _________________________________________________________)1 2872 1 1984 6232 t +10 R f +( cddb queries. This is the default.)6 1374(-1 disable)1 516 2 2355 6352 t +( mode. The user selects the entry to use.)8 1661(0 interactive)1 621 2 2388 6472 t +( \256t mode. The \256rst entry is taken unconditionally.)8 2047(1 \256rst)1 356 2 2388 6592 t +10 S f +( \347)1 -2872(_ _________________________________________________________)1 2872 2 1984 6612 t +(\347)1984 6592 w +(\347)1984 6492 w +(\347)1984 6392 w +(\347)1984 6292 w +(\347)1984 6192 w +(\347)2513 6612 w +(\347)2513 6592 w +(\347)2513 6492 w +(\347)2513 6392 w +(\347)2513 6292 w +(\347)2513 6192 w +(\347)4856 6612 w +(\347)4856 6592 w +(\347)4856 6492 w +(\347)4856 6392 w +(\347)4856 6292 w +(\347)4856 6192 w +10 B f +( dd db bp p)4 168(c cd)1 100 2 1080 6780 t +10 S1 f +(\261 \261)1 65 1 1348 6780 t +10 B f +( =)1 0( er r=)2 101( ve)1 44( er rv)2 94(s se)1 83 5 1413 6780 t +10 I f +(servername)1735 6780 w +10 R f +(sets the server to be contacted for title lookups.)8 1947 1 1440 6900 t +10 B f +( dd db bp p)4 168(c cd)1 100 2 1080 7068 t +10 S1 f +(\261 \261)1 65 1 1348 7068 t +10 B f +( =)1 0( t=)1 57( rt)1 33( or)1 44(p po)1 106 5 1413 7068 t +10 I f +(portnumber)1653 7068 w +10 R f +(sets the port number to be used for title lookups.)9 2004 1 1440 7188 t +( 2)1 1829( change: Version 3.0)3 850( Last)1 1509(SunOS 5.10)1 492 4 720 7680 t +cleartomark +showpage +restore +%%EndPage: 2 2 %%Page: 3 3 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(CDD)72 48 Q(A2W)-.4 E -1.35(AV)-1.2 G 333.66 -(\(1\) CDD)1.35 F(A2W)-.4 E -1.35(AV)-1.2 G(\(1\))1.35 E/F1 10 -/Times-Bold@0 SF(cddbp-ser)110.5 84 Q -.1(ve)-.1 G(r=ser).1 E -.1(ve)-.1 -G -.15(rn).1 G(ame).15 E F0(sets the serv)144 96 Q -(er to be contacted for title lookups.)-.15 E F1(cddbp-port=portnumber) -110.5 112.8 Q F0(sets the port number to be used for title lookups.)144 -124.8 Q F1 2.5(\255H --no-inf)108 141.6 R(o\214le)-.25 E F0 -(does not write an info \214le and a cddb \214le.)144 153.6 Q F1 2.5 -(\255g --gui)108 170.4 R F0 -(formats the output to be better parsable by gui frontends.)144 182.4 Q -F1 2.5(\255M count)108 199.2 R(--md5)2.5 E F0 -(enables calculation of MD-5 checksum for 'count' bytes from a be)144 -211.2 Q(ginning of a track.)-.15 E F1 2.5(\255S speed)108 228 R(--speed) -2.5 E F0(sets the cdrom de)144 240 Q -(vice to one of the selectable speeds for reading.)-.25 E F1 2.5 -(\255q --quiet)108 256.8 R F0(quiet operation, no screen output.)144 -268.8 Q F1 2.5(\255V --v)108 285.6 R(erbose-SCSI)-.1 E F0(enable SCSI c\ -ommand logging to the console. This is mainly used for deb)144 297.6 Q -(ugging.)-.2 E F1 2.5(\255Q --silent-SCSI)108 314.4 R F0(suppress SCSI \ -command error reports to the console. This is mainly used for guis.)144 -326.4 Q F1(\255paranoia)108 343.2 Q F0 -(use the paranoia library instead of cdda2w)144 355.2 Q -.2(av)-.1 G 1.1 --.55('s r).2 H(outines for reading.).55 E F1 2.5(\255h --help)108 372 R -F0(display v)144 384 Q(ersion of cdda2w)-.15 E .4 -.2(av o)-.1 H 2.5(ns) -.2 G(tandard output.)-2.5 E(Def)108 400.8 Q(aults depend on the)-.1 E F1 -(Mak)144 412.8 Q(e\214le)-.1 E F0(and)2.5 E F1(en)2.5 E(vir)-.4 E -(onment v)-.18 E(ariable)-.1 E F0(settings \(currently)2.5 E F1(CDD)2.5 -E(A_DEVICE)-.35 E F0(\).)2.5 E/F2 10.95/Times-Bold@0 SF(ENVIR)72 429.6 Q -(ONMENT V)-.329 E(ARIABLES)-1.478 E F1(CDD)108 441.6 Q(A_DEVICE)-.35 E -F0 1.056(is used to set the de)3.556 F 1.056(vice name. The de)-.25 F -1.056(vice naming is compatible with J\366r)-.25 F 3.556(gS)-.18 G -(chilling')-3.556 E(s)-.55 E(cdrecord package.)108 453.6 Q F1(CDDBP_SER) -108 470.4 Q(VER)-.55 E F0 -(is used for cddbp title lookups when supplied.)144 482.4 Q F1 -(CDDBP_POR)108 499.2 Q(T)-.4 E F0 -(is used for cddbp title lookups when supplied.)144 511.2 Q F1(RSH)108 -528 Q F0 .128(If the)15.44 F F1(RSH)2.628 E F0(en)2.628 E .128 -(vironment v)-.4 F .127 -(ariable is present, the remote connection will not be created via)-.25 -F F1 -.18(rc)2.627 G(md).18 E F0(\(3\))A -.2(bu)144 540 S 2.585(tb).2 G -2.585(yc)-2.585 G .085(alling the program pointed to by)-2.585 F F1(RSH) -2.586 E F0 5.086(.U)C .086(se e.g.)-5.086 F F1(RSH=)5.086 E F0 .086 -(/usr/bin/ssh to create a secure shell)B(connection.)144 552 Q .321 -(Note that this forces)144 576 R F1(cdda2wa)2.821 E(v)-.25 E F0 .321 -(to create a pipe to the)2.821 F F1(rsh\(1\))2.82 E F0 .32 -(program and disallo)2.82 F(ws)-.25 E F1(cdda2wa)2.82 E(v)-.25 E F0(to) -2.82 E .28(directly access the netw)144 588 R .28(ork sock)-.1 F .28 -(et to the remote serv)-.1 F(er)-.15 E 5.281(.T)-.55 G .281(his mak) --5.281 F .281(es it impossible to set up perfor)-.1 F(-)-.2 E .813 -(mance parameters and slo)144 600 R .813(ws do)-.25 F .813 -(wn the connection compared to a)-.25 F F1 -.18(ro)3.313 G(ot).18 E F0 -(initiated)3.313 E F1 -.18(rc)3.313 G(md\(3\)).18 E F0(connec-)3.313 E -(tion.)144 612 Q F1(RSCSI)108 628.8 Q F0 1.382(If the)6.55 F F1(RSCSI) -3.882 E F0(en)3.882 E 1.382(vironment v)-.4 F 1.383 -(ariable is present, the remote SCSI serv)-.25 F 1.383 -(er will not be the program)-.15 F F1(/opt/schily/sbin/rscsi)144 640.8 Q -F0 -.2(bu)3.737 G 3.737(tt).2 G 1.236(he program pointed to by)-3.737 F -F1(RSCSI)3.736 E F0 6.236(.N)C 1.236(ote that the remote SCSI serv) --6.236 F(er)-.15 E .553(program name will be ignored if you log in usin\ -g an account that has been created with a remote)144 652.8 R(SCSI serv) -144 664.8 Q(er program as login shell.)-.15 E F2(RETURN V)72 681.6 Q -(ALUES)-1.478 E F1(cdda2wa)108 693.6 Q(v)-.25 E F0(uses the follo)2.5 E -(wing e)-.25 E(xit codes to indicate v)-.15 E(arious de)-.25 E -(gress of success:)-.15 E(3)535 768 Q EP +save +mark +3 pagesetup +10 R f +( \( 1 \))3 164( CDDA2WAV)1 3839(User Commands)1 677 3 720 480 t +10 S1 f +(\261 \261)1 65 1 1080 960 t +10 B f +(d d)1 56 1 1145 960 t +10 I f +(duration)1234 960 w +10 S1 f +(\261 \261)1 65 1 1080 1128 t +10 B f +( n)1 0( on)1 56( io)1 50( ti)1 28( at)1 33( ra)1 50(d du ur)2 156 7 1145 1128 t +10 I f +(duration)1551 1128 w +10 R f +( a 'f' suf\256x \(like 75f)5 857( \(sectors\) are indicated by)4 1062( Frames)1 360(sets recording time in seconds or frames.)6 1681 4 1440 1248 t +(for 75 sectors\).)2 617 1 1440 1368 t +10 B f +(0 0)1 50 1 2123 1368 t +10 R f +(sets the time for whole track.)5 1199 1 2206 1368 t +(The default is to extract the whole track.)7 1669 1 1440 1608 t +10 S1 f +(\261 \261)1 65 1 1080 1776 t +10 B f +(E E)1 67 1 1145 1776 t +10 I f +(endianess)1245 1776 w +10 S1 f +(\261 \261)1 65 1 1080 1944 t +10 B f +( t)1 0( pu ut)2 89( tp)1 56( ut)1 33(o ou)1 106 5 1145 1944 t +10 S1 f +(\261 \261)1 65 1 1429 1944 t +10 B f +( ss s)2 39( es)1 39( ne)1 44( an)1 56( ia)1 50( nd di)2 84(e en)1 100 7 1494 1944 t +10 I f +(endianess)1939 1944 w +10 R f +( output samples to 'little', 'big' or 'machine' to override the default which)12 3109(sets endianess of the)3 851 2 1440 2064 t +( value 'machine' or 'host' is evaluated as the actual)9 2197( The)1 229( order' \(big endian\).)3 851(is 'network byte)2 683 4 1440 2184 t +(byte order of the host CPU in the current OS.)9 1881 1 1440 2304 t +10 S1 f +(\261 \261)1 65 1 1080 2472 t +10 B f +(F F)1 61 1 1145 2472 t +10 S1 f +(\261 \261)1 65 1 1080 2640 t +10 B f +(\256 \256n nd d)3 168 1 1145 2640 t +10 S1 f +(\261 \261)1 65 1 1313 2640 t +10 B f +( s)1 0( es)1 39( me)1 44( re em)2 127( tr)1 44( xt)1 33(e ex)1 94 7 1378 2640 t +10 R f +(\256nds extreme amplitudes in samples.)4 1512 1 1440 2760 t +10 S1 f +(\261 \261)1 65 1 1080 2928 t +10 B f +(G G)1 78 1 1145 2928 t +10 S1 f +(\261 \261)1 65 1 1080 3096 t +10 B f +(\256 \256n nd d)3 168 1 1145 3096 t +10 S1 f +(\261 \261)1 65 1 1313 3096 t +10 B f +( o)1 0( no)1 50( on)1 56(m mo)1 133 4 1378 3096 t +10 R f +(\256nds if input samples are in mono.)6 1434 1 1440 3216 t +10 S1 f +(\261 \261)1 65 1 1080 3384 t +10 B f +(g g)1 50 1 1145 3384 t +10 S1 f +(\261 \261)1 65 1 1080 3552 t +10 B f +( i)1 0( ui)1 28(g gu)1 106 3 1145 3552 t +10 R f +(formats the output to be better parsable by gui frontends.)9 2341 1 1440 3552 t +10 S1 f +(\261 \261)1 65 1 1080 3720 t +10 B f +(H H)1 78 1 1145 3720 t +10 S1 f +(\261 \261)1 65 1 1080 3888 t +10 B f +( o)1 0(n no)1 106 2 1145 3888 t +10 S1 f +(\261 \261)1 65 1 1251 3888 t +10 B f +( e)1 0( le)1 44( \256l)1 28( o\256)1 56( fo)1 50( nf)1 33(i in)1 84 7 1316 3888 t +10 R f +(does not write an info \256le, a cddb \256le and no cdtext \256le.)12 2327 1 1440 4008 t +10 S1 f +(\261 \261)1 65 1 1080 4176 t +10 B f +(i i)1 28 1 1145 4176 t +10 I f +(index)1206 4176 w +10 S1 f +(\261 \261)1 65 1 1080 4344 t +10 B f +( x)1 0( ex)1 50( nd de)2 100(i in)1 84 4 1145 4344 t +10 I f +(index)1412 4344 w +10 R f +(selects the start index.)3 906 1 1440 4464 t +10 S1 f +(\261 \261)1 65 1 1080 4632 t +10 B f +(J J)1 50 1 1145 4632 t +10 S1 f +(\261 \261)1 65 1 1080 4800 t +10 B f +( o)1 0( fo)1 50( nf)1 33(i in)1 84 4 1145 4800 t +10 S1 f +(\261 \261)1 65 1 1312 4800 t +10 B f +( y)1 0( ly)1 50( nl)1 28(o on)1 106 4 1377 4800 t +10 R f +(does not write to a \256le, it just gives information about the disc.)12 2601 1 1440 4920 t +10 S1 f +(\261 \261)1 65 1 1080 5088 t +10 B f +(M M)1 94 1 1145 5088 t +10 S1 f +(\261 \261)1 65 1 1080 5256 t +10 B f +( 5)1 0( d5)1 50(m md)1 139 3 1145 5256 t +10 R f +( for all audio bytes from the beginning of a track. The)11 2333(enables calculation of MD-5 checksum)4 1627 2 1440 5256 t +( is skipped when calculating the MD-5 checksum to allow to compare MD-5 sums)13 3436(audio header)1 524 2 1440 5376 t +(even for \256les with different header type.)6 1652 1 1440 5496 t +10 S1 f +(\261 \261)1 65 1 1080 5664 t +10 B f +(m m)1 83 1 1145 5664 t +10 S1 f +(\261 \261)1 65 1 1080 5832 t +10 B f +( o)1 0( no)1 50( on)1 56(m mo)1 133 4 1145 5832 t +10 R f +(sets to mono recording.)3 962 1 1440 5832 t +10 S1 f +(\261 \261)1 65 1 1080 6000 t +10 B f +( o)1 0(n no)1 106 2 1145 6000 t +10 S1 f +(\261 \261)1 65 1 1251 6000 t +10 B f +( n)1 0( en)1 56( dd de)2 100( id)1 56(h hi)1 84 5 1316 6000 t +10 S1 f +(\261 \261)1 65 1 1612 6000 t +10 B f +( k)1 0( ck)1 56( ac)1 44( ra)1 50(t tr)1 77 5 1677 6000 t +10 R f +( default,)1 342( By)1 190(Ignore hidden tracks on the CD.)5 1356 3 1440 6120 t +10 B f +( av v)2 50( wa)1 50( a2 2w)2 122( dd da)2 106(c cd)1 100 5 3368 6120 t +10 R f +(checks whether there might be a hid-)6 1564 1 3836 6120 t +( be disabled with)3 734( check may take a few seconds and thus can)9 1924( This)1 255(den track before track 1.)4 1047 4 1440 6240 t +10 S1 f +(\261 \261)1 65 1 1440 6360 t +10 B f +( o)1 0(n no)1 106 2 1505 6360 t +10 S1 f +(\261 \261)1 65 1 1611 6360 t +10 B f +( n)1 0( en)1 56( dd de)2 100( id)1 56(h hi)1 84 5 1676 6360 t +10 S1 f +(\261 \261)1 65 1 1972 6360 t +10 B f +( k)1 0( ck)1 56( ac)1 44( ra)1 50(t tr)1 77 5 2037 6360 t +10 R f +(.)2264 6360 w +10 S1 f +(\261 \261)1 65 1 1080 6528 t +10 B f +(N N)1 72 1 1145 6528 t +10 S1 f +(\261 \261)1 65 1 1080 6696 t +10 B f +( o)1 0(n no)1 106 2 1145 6696 t +10 S1 f +(\261 \261)1 65 1 1251 6696 t +10 B f +( e)1 0( te)1 44( it)1 33( ri)1 28(w wr)1 116 5 1316 6696 t +10 R f +( this option is used)4 859( If)1 151( \256le, it just reads \(e.g. for debugging purposes\).)8 2108(does not write to a)4 842 4 1440 6816 t +(together with the)2 705 1 1440 6936 t +10 S1 f +(\261 \261)1 65 1 2184 6936 t +10 B f +(e e)1 44 1 2249 6936 t +10 R f +(option, the CD is read and the audio content is played back to the sound)14 3068 1 2332 6936 t +(device without creating output \256les with audio data.)7 2132 1 1440 7056 t +10 S1 f +(\261 \261)1 65 1 1080 7224 t +10 B f +( o)1 0(n no)1 106 2 1145 7224 t +10 S1 f +(\261 \261)1 65 1 1251 7224 t +10 B f +( s)1 0( ts)1 39( lt)1 33( ul)1 28( au)1 56( fa)1 50( ef)1 33( de)1 44( td)1 56( xt)1 33( ex)1 50(t te)1 77 12 1316 7224 t +10 R f +( 3)1 1829( change: Version 3.0)3 850( Last)1 1509(SunOS 5.10)1 492 4 720 7704 t +cleartomark +showpage +restore +%%EndPage: 3 3 %%Page: 4 4 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(CDD)72 48 Q(A2W)-.4 E -1.35(AV)-1.2 G 333.66 -(\(1\) CDD)1.35 F(A2W)-.4 E -1.35(AV)-1.2 G(\(1\))1.35 E .4 LW 490.03 -76.5 157.97 76.5 DL 12.5(Exitcode Description)162.97 86 R 490.03 90.5 -157.97 90.5 DL 15(0n)193.52 100 S 2.5(oe)-15 G -(rrors encountered, successful operation.)-2.5 E 15(1u)193.52 112 S -(sage or syntax error)-15 E 2.5(.c)-.55 G(dda2w)-2.5 E .4 -.2(av g)-.1 H -(ot inconsistent ar).2 E(guments.)-.18 E 15(2p)193.52 124 S -(ermission \(un\)set errors. permission changes f)-15 E(ailed.)-.1 E 15 -(3r)193.52 136 S(ead errors on the cdrom/b)-15 E(urner de)-.2 E -(vice encountered.)-.25 E 15(4w)193.52 148 S -(rite errors while writing one of the output \214les encountered.)-15 E -15(5e)193.52 160 S -(rrors with soundcard handling \(initialization/write\).)-15 E 15(6e) -193.52 172 S(rrors with stat\(\) system call on the read de)-15 E -(vice \(cook)-.25 E(ed ioctl\).)-.1 E 15(7p)193.52 184 S -(ipe communication errors encountered \(in fork)-15 E(ed mode\).)-.1 E -15(8s)193.52 196 S(ignal handler installation errors encountered.)-15 E -15(9a)193.52 208 S(llocation of shared memory f)-15 E(ailed \(in fork) --.1 E(ed mode\).)-.1 E 12.5(10 dynamic)188.52 220 R -(heap memory allocation f)2.5 E(ailed.)-.1 E 12.5(11 errors)188.52 232 R -(on the audio cd medium encountered.)2.5 E 12.5(12 de)188.52 244 R -(vice open error in ioctl handling detected.)-.25 E 12.5(13 race)188.52 -256 R(condition in ioctl interf)2.5 E(ace handling detected.)-.1 E 12.5 -(14 error)188.52 268 R(in ioctl\(\) operation encountered.)2.5 E 12.5 -(15 internal)188.52 280 R(error encountered. Please report back!!!)2.5 E -12.5(16 error)188.52 292 R -(in semaphore operation encountered \(install / request\).)2.5 E 12.5 -(17 could)188.52 304 R(not get the scsi transfer b)2.5 E(uf)-.2 E(fer) --.25 E(.)-.55 E 12.5(18 could)188.52 316 R -(not create pipes for process communication \(in fork)2.5 E(ed mode\).) --.1 E 490.03 320.5 157.97 320.5 DL 206.02 76.5 206.02 320.5 DL 490.03 -76.5 490.03 320.5 DL 157.97 76.5 157.97 320.5 DL/F1 10.95/Times-Bold@0 -SF(DISCUSSION)72 332.8 Q/F2 10/Times-Bold@0 SF(cdda2wa)108 344.8 Q(v) --.25 E F0 .723(is able to read parts of an)3.224 F F2(audio)3.223 E F0 -.723(CD or)3.223 F F2(multimedia)3.223 E F0(CDR)3.223 E .723 -(OM \(containing audio parts\) directly)-.4 F(digitally)108 356.8 Q 2.5 -(.T)-.65 G -(hese parts can be written to a \214le, a pipe, or to a sound de)-2.5 E -(vice.)-.25 E F2(cdda2wa)108 373.6 Q(v)-.25 E F0 .832(stands for)3.332 F -F2(CDD)3.332 E(A)-.35 E F0(to)3.332 E F2 -1.2(WA)3.332 G(V)-.25 E F0 -(\(where)3.332 E F2(CDD)3.332 E(A)-.35 E F0 .832 -(stands for compact disc digital audio and)3.332 F F2 -1.2(WA)3.333 G(V) --.25 E F0 .833(is a)3.333 F .198(sound sample format introduced by MS W) -108 385.6 R(indo)-.4 E 2.697(ws\). It)-.25 F(allo)2.697 E .197(ws cop) --.25 F(ying)-.1 E F2(CDD)2.697 E(A)-.35 E F0 .197 -(audio data from the CDR)2.697 F(OM)-.4 E(dri)108 397.6 Q .3 -.15(ve i) --.25 H(nto a \214le in).15 E F2 -1.2(WA)2.5 G(V)-.25 E F0 -(or other formats.)2.5 E .396(The latest v)108 414.4 R .396(ersions try\ - to get higher real-time scheduling priorities to ensure smooth \(unint\ -errupted\) opera-)-.15 F 1.097(tion. These priorities are a)108 426.4 R --.25(va)-.2 G 1.097(ilable for super users and are higher than those of\ - 'normal' processes. Thus).25 F(delays are minimized.)108 438.4 Q .628 -(If your CDR)108 455.2 R .629(OM is on de)-.4 F(vice)-.25 E F2(DEV)3.129 -E F0 .629(and it is loaded with an audio CD, you may simply in)3.129 F --.2(vo)-.4 G -.1(ke).2 G F2(cdda2wa)3.229 E(v)-.25 E(de)108 467.2 Q -(v=DEV)-.15 E F0 .634(and it will create the sound \214le)3.135 F F2 -(audio.wa)3.134 E(v)-.25 E F0 .634(recording the whole track be)3.134 F -.634(ginning with track 1 in)-.15 F .872(stereo at 16 bit at 44100 Hz s\ -ample rate, if your \214le system has enough space free.)108 479.2 R -.873(Otherwise recording)5.873 F(time will be limited. F)108 491.2 Q -(or details see \214les)-.15 E F2(README)2.5 E F0(and)2.5 E F2 -(README.INST)2.5 E(ALL)-.9 E F1(HINTS ON OPTIONS)72 508 Q F0(Options)108 -520 Q .019(Most of the options are used to control the format of the W) -144 532 R 2.719 -1.35(AV \214)-1.2 H .019(le. In the follo)1.35 F .019 -(wing te)-.25 F .019(xt all of them)-.15 F(are described.)144 544 Q -(Select De)108 560.8 Q(vice)-.25 E F2144 572.8 Q/F3 10 -/Times-Italic@0 SF(de)3.057 E(vice)-.15 E F0 .557(selects the CDR)3.057 -F .557(OM dri)-.4 F .857 -.15(ve d)-.25 H -.25(ev).15 G .557 -(ice to be used.).25 F .558(The speci\214er gi)5.557 F -.15(ve)-.25 G -3.058(ns).15 G .558(hould correspond to)-3.058 F 1.12 -(the selected interf)144 584.8 R 1.12(ace \(see belo)-.1 F(w\).)-.25 E -F2(CHANGE!)6.12 E F0 -.15(Fo)6.12 G 3.62(rt).15 G 1.12(he cook)-3.62 F -1.12(ed_ioctl interf)-.1 F 1.12(ace this is the cdrom)-.1 F(de)144 596.8 -Q .844(vice descriptor as before.)-.25 F F2 .844(The SCSI de)5.844 F -.845(vices used with the generic SCSI interface ho)-.15 F(we)-.1 E -.1 -(ve)-.15 G(r).1 E(ar)144 608.8 Q 2.76(en)-.18 G .46 -.1(ow a)-2.76 H -(ddr).1 E .259(essed with their SCSI-Bus, SCSI-Id, and SCSI-Lun instead\ - of the generic SCSI)-.18 F(de)144 620.8 Q .485(vice descriptor!!!)-.15 -F F0 .485(One e)5.485 F .485(xample for a SCSI CDR)-.15 F .485(OM dri) --.4 F .785 -.15(ve o)-.25 H 2.985(nb).15 G .485 -(us 0 with SCSI ID 3 and lun 0)-3.185 F(is -D0,3,0.)144 632.8 Q -(Select Auxiliary de)108 649.6 Q(vice)-.25 E F2144 661.6 Q F3 -(auxde)2.826 E(vice)-.15 E F0 .326 -(is necessary for CD-Extra handling. F)2.826 F .325(or Non-SCSI-CDR)-.15 -F .325(OM dri)-.4 F -.15(ve)-.25 G 2.825(st).15 G .325(his is the same) --2.825 F(de)144 673.6 Q .058(vice as gi)-.25 F -.15(ve)-.25 G 2.558(nb) -.15 G 2.558(y-)-2.558 G 2.559(D\()-2.558 G .059(see abo)-2.559 F -.15 -(ve)-.15 G .059(\). F).15 F .059(or SCSI-CDR)-.15 F .059(OM dri)-.4 F --.15(ve)-.25 G 2.559(si).15 G 2.559(ti)-2.559 G 2.559(st)-2.559 G .059 -(he CDR)-2.559 F .059(OM dri)-.4 F .359 -.15(ve \()-.25 H .059 -(SCSI\) de).15 F(vice)-.25 E(\(i.e.)144 685.6 Q F2(/de)5.45 E(v/sr0)-.15 -E F0 2.95(\)c)2.95 G .45(orresponding to the SCSI de)-2.95 F .45 -(vice \(i.e.)-.25 F F2(0,3,0)5.45 E F0 .45(\). It has to match the de) -2.95 F .45(vice used for)-.25 F(sampling.)144 697.6 Q(4)535 768 Q EP +save +mark +4 pagesetup +10 R f +( \( 1 \))3 164( CDDA2WAV)1 3839(User Commands)1 677 3 720 480 t +(By default,)1 461 1 1440 960 t +10 B f +( av v)2 50( wa)1 50( a2 2w)2 122( dd da)2 106(c cd)1 100 5 1943 960 t +10 R f +(replaces empty CD-Text \256elds from tracks by the related CD-Text \256el)10 2986 1 2414 960 t +( CD in case this is de\256ned. If the option)9 1768(for the whole)2 574 2 1440 1080 t +10 S1 f +(\261 \261)1 65 1 3827 1080 t +10 B f +( o)1 0(n no)1 106 2 3892 1080 t +10 S1 f +(\261 \261)1 65 1 3998 1080 t +10 B f +( s)1 0( ts)1 39( lt)1 33( ul)1 28( au)1 56( fa)1 50( ef)1 33( de)1 44( td)1 56( xt)1 33( ex)1 50(t te)1 77 12 4063 1080 t +10 R f +(is used,)1 320 1 4607 1080 t +10 B f +( av v)2 50( wa)1 50( a2 2w)2 122( dd da)2 106(c cd)1 100 5 4972 1080 t +10 R f +(leaves the track related CD-Text \256elds empty in such a case.)10 2494 1 1440 1200 t +10 S1 f +(\261 \261)1 65 1 1080 1368 t +10 B f +( o)1 0(n no)1 106 2 1145 1368 t +10 S1 f +(\261 \261)1 65 1 1251 1368 t +10 B f +( e)1 0( le)1 44( \256l)1 28( t\256)1 56( xt)1 33( ex)1 50(t te)1 77 7 1316 1368 t +10 R f +(If)1440 1488 w +10 B f +( av v)2 50( wa)1 50( a2 2w)2 122( dd da)2 106(c cd)1 100 5 1550 1488 t +10 R f +( The)1 233( CD, it writes a .cdtext \256le.)6 1200(encounters useful CD-Text information on the)5 1945 3 2022 1488 t +(option)1440 1608 w +10 S1 f +(\261 \261)1 65 1 1729 1608 t +10 B f +( o)1 0(n no)1 106 2 1794 1608 t +10 S1 f +(\261 \261)1 65 1 1900 1608 t +10 B f +( e)1 0( le)1 44( \256l)1 28( t\256)1 56( xt)1 33( ex)1 50(t te)1 77 7 1965 1608 t +10 R f +(allows to suppress the creation of the .cdtext \256le.)8 2017 1 2286 1608 t +10 S1 f +(\261 \261)1 65 1 1080 1776 t +10 B f +(o o)1 50 1 1145 1776 t +10 I f +(offset)1228 1776 w +10 S1 f +(\261 \261)1 65 1 1080 1944 t +10 B f +( t)1 0( et)1 33( se)1 44( ff fs)2 72(o of)1 83 5 1145 1944 t +10 I f +(offset)1410 1944 w +10 R f +(starts)1440 2064 w +10 I f +(offset)1684 2064 w +10 R f +(sectors behind start track \(one sector equivalents 1/75 seconds\).)8 2606 1 1934 2064 t +10 S1 f +(\261 \261)1 65 1 1080 2232 t +10 B f +(O O)1 78 1 1145 2232 t +10 I f +(audiotype)1256 2232 w +10 S1 f +(\261 \261)1 65 1 1080 2400 t +10 B f +( t)1 0( pu ut)2 89( tp)1 56( ut)1 33(o ou)1 106 5 1145 2400 t +10 S1 f +(\261 \261)1 65 1 1429 2400 t +10 B f +( t)1 0( at)1 33( ma)1 50( rm)1 83( or)1 44(f fo)1 83 6 1494 2400 t +10 I f +(audiotype)1820 2400 w +10 R f +(can be)1 269 1 1440 2520 t +10 I f +(wav)1746 2520 w +10 R f +(\(for wav \256les\) or)3 709 1 1944 2520 t +10 I f +(aiff)2690 2520 w +10 R f +( \256les\) or)2 359(\(for apple/sgi aiff)2 722 2 2861 2520 t +10 I f +(aifc)3980 2520 w +10 R f +(\(for apple/sgi aifc \256les\) or)4 1094 1 4168 2520 t +10 I f +(au)5300 2520 w +10 R f +(or)1440 2640 w +10 I f +(sun)1556 2640 w +10 R f +(\(for sun .au PCM \256les\) or)5 1067 1 1728 2640 t +10 I f +(cdr)2828 2640 w +10 R f +(or)2994 2640 w +10 I f +(raw)3110 2640 w +10 R f +(\(for headerless \256les to be used for cd writers\).)8 1895 1 3299 2640 t +(The default output format is now)5 1373 1 1440 2880 t +10 B f +( av v)2 50(w wa)1 122 2 2849 2880 t +10 R f +( the most)2 391(for all platforms as this \256le format has become)8 1952 2 3057 2880 t +(common format. Note that former versions of)6 1894 1 1440 3000 t +10 B f +( av v)2 50( wa)1 50( a2 2w)2 122( dd da)2 106(c cd)1 100 5 3371 3000 t +10 R f +( exception and by default did)5 1217(made an)1 347 2 3836 3000 t +(create)1440 3120 w +10 B f +( u)1 0(a au)1 106 2 1710 3120 t +10 R f +(type \256les on Solaris.)3 841 1 1849 3120 t +10 S1 f +(\261 \261)1 65 1 1080 3288 t +10 B f +(p p)1 56 1 1145 3288 t +10 I f +(percentage)1234 3288 w +10 S1 f +(\261 \261)1 65 1 1080 3456 t +10 B f +( k)1 0( ck)1 56( ac)1 44( ba)1 50( ay yb)2 106( la)1 50(p pl)1 84 7 1145 3456 t +10 S1 f +(\261 \261)1 65 1 1535 3456 t +10 B f +( e)1 0( me)1 44( im)1 83( ti)1 28( lt)1 33( al)1 28(r re ea)2 138 7 1600 3456 t +10 I f +(percentage)1987 3456 w +10 R f +(changes pitch of audio data copied to sound device.)8 2124 1 1440 3576 t +10 S1 f +(\261 \261)1 65 1 1080 3744 t +10 B f +(P P)1 61 1 1145 3744 t +10 I f +(sectors)1239 3744 w +10 S1 f +(\261 \261)1 65 1 1080 3912 t +10 B f +( t)1 0( et)1 33(s se)1 83 3 1145 3912 t +10 S1 f +(\261 \261)1 65 1 1261 3912 t +10 B f +( p)1 0( ap)1 56( la)1 50( er rl)2 72(o ov ve)2 144 5 1326 3912 t +10 I f +(sectors)1681 3912 w +10 R f +(sets the initial number of overlap)5 1398 1 1440 4032 t +10 I f +(sectors)2879 4032 w +10 R f +( correction in non-paranoia mode. Note that)6 1851(for jitter)1 346 2 3203 4032 t +(overlapped reads re handled differently in paranoia mode.)7 2366 1 1440 4152 t +(The default overlap in non-paranoia mode is 1.)7 1930 1 1440 4392 t +10 S1 f +(\261 \261)1 65 1 1080 4560 t +10 B f +( a)1 0( ia)1 50( oi)1 28( no)1 50( an)1 56( ra)1 50( ar)1 44(p pa)1 106 8 1145 4560 t +10 R f +( In)1 165( a \256lter on top of cdda2wav's routines for reading.)9 2223(use the paranoia library as)4 1139 3 1440 4680 t +10 B f +( a)1 0( ia)1 50( oi)1 28( no)1 50( an)1 56( ra)1 50( ar)1 44(p pa)1 106 8 5016 4680 t +10 R f +(mode, the latency time for the)5 1273 1 1440 4800 t +10 S1 f +(\261 \261)1 65 1 2753 4800 t +10 B f +( e)1 0( ve)1 44( iv)1 50( ti)1 28( ct)1 33( ac)1 44( er ra)2 94( te)1 44( nt)1 33(i in)1 84 10 2818 4800 t +10 R f +( typically 5..10 seconds. This)4 1225(mode is increased to)3 863 2 3312 4800 t +(is caused by the fact that the)6 1191 1 1440 4920 t +10 B f +( a)1 0( ia)1 50( oi)1 28( no)1 50( an)1 56( ra)1 50( ar)1 44(p pa)1 106 8 2666 4920 t +10 R f +(code reads anything at least twice and in between needs)9 2315 1 3085 4920 t +(to take care of emptying the cache RAM of the CD-ROM drive.)11 2644 1 1440 5040 t +(If the)1 237 1 1440 5280 t +10 B f +( a)1 0( ia)1 50( oi)1 28( no)1 50( an)1 56( ra)1 50( ar)1 44(p pa)1 106 8 1726 5280 t +10 R f +(mode is used,)2 595 1 2159 5280 t +10 B f +( av v)2 50( wa)1 50( a2 2w)2 122( dd da)2 106(c cd)1 100 5 2803 5280 t +10 R f +( extracted)1 415(displays some quality statistics for each)5 1705 2 3280 5280 t +( following items appear in the list:)6 1420(track. The)1 445 2 1440 5400 t +10 S f +(_ _____________________________________________________)1 2697 1 2071 5420 t +10 R f +(Value Description)1 854 1 2182 5540 t +10 S f +(_ _____________________________________________________)1 2697 1 2071 5560 t +10 R f +( of hard read errors)4 795(rderr Number)1 670 2 2227 5680 t +( of sectors skipped due to exhausted retries)7 1772(skip Number)1 644 2 2253 5800 t +( of intra sector jitters \(frame jitters\) detected)7 1821(atom Number)1 677 2 2220 5920 t +( of jitters between sectors detected)5 1417(edge Number)1 665 2 2232 6040 t +( of dropped bytes \256xed)4 953(drop Number)1 660 2 2237 6160 t +( of duplicate bytes \256xed)4 992(dup Number)1 627 2 2270 6280 t +( of drifts detected)3 725(drift Number)1 649 2 2248 6400 t +( of dynamic overlap size raises)5 1273(overlap Number)1 776 2 2121 6520 t +10 S f +( \347)1 -2697(_ _____________________________________________________)1 2697 2 2071 6540 t +(\347)2071 6520 w +(\347)2071 6420 w +(\347)2071 6320 w +(\347)2071 6220 w +(\347)2071 6120 w +(\347)2071 6020 w +(\347)2071 5920 w +(\347)2071 5820 w +(\347)2071 5720 w +(\347)2071 5620 w +(\347)2071 5520 w +(\347)2495 6540 w +(\347)2495 6520 w +(\347)2495 6420 w +(\347)2495 6320 w +(\347)2495 6220 w +(\347)2495 6120 w +(\347)2495 6020 w +(\347)2495 5920 w +(\347)2495 5820 w +(\347)2495 5720 w +(\347)2495 5620 w +(\347)2495 5520 w +(\347)4768 6540 w +(\347)4768 6520 w +(\347)4768 6420 w +(\347)4768 6320 w +(\347)4768 6220 w +(\347)4768 6120 w +(\347)4768 6020 w +(\347)4768 5920 w +(\347)4768 5820 w +(\347)4768 5720 w +(\347)4768 5620 w +(\347)4768 5520 w +10 R f +( 4)1 1829( change: Version 3.0)3 850( Last)1 1509(SunOS 5.10)1 492 4 720 7680 t +cleartomark +showpage +restore +%%EndPage: 4 4 %%Page: 5 5 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(CDD)72 48 Q(A2W)-.4 E -1.35(AV)-1.2 G 333.66 -(\(1\) CDD)1.35 F(A2W)-.4 E -1.35(AV)-1.2 G(\(1\))1.35 E(Select Interf) -108 84 Q(ace)-.1 E/F1 10/Times-Bold@0 SF144 96 Q/F2 10 -/Times-Italic@0 SF(interface)3.469 E F0 .969(selects the CDR)3.469 F -.969(OM dri)-.4 F 1.269 -.15(ve i)-.25 H(nterf).15 E .969(ace. F)-.1 F -.969(or SCSI dri)-.15 F -.15(ve)-.25 G 3.469(su).15 G .97 -(se generic_scsi \(cook)-3.469 F(ed_ioctl)-.1 E 2.276(may not yet be a) -144 108 R -.25(va)-.2 G 2.276(ilable for all de).25 F(vices\):)-.25 E F1 -(generic_scsi)4.776 E F0(and)4.776 E F1(cook)4.776 E(ed_ioctl)-.1 E F0 -7.275(.T)C 2.275(he \214rst uses the)-7.275 F .005(generic SCSI interf) -144 120 R .005(ace, the latter uses the ioctl of the CDR)-.1 F .006 -(OM dri)-.4 F -.15(ve)-.25 G 1.106 -.55(r. T).15 H .006(he latter v).55 -F .006(ariant w)-.25 F .006(orks only)-.1 F 1.376(when the k)144 132 R -1.376(ernel dri)-.1 F -.15(ve)-.25 G 3.876(rs).15 G(upports)-3.876 E F1 -(CDD)3.876 E(A)-.35 E F0 1.376 -(reading. This entry has to match the selected CDR)3.876 F(OM)-.4 E(de) -144 144 Q(vice \(see abo)-.25 E -.15(ve)-.15 G(\).).15 E -(Enable echo to soundcard)108 160.8 Q F1144 172.8 Q F0 .48(copies\ - audio data to the sound card while recording, so you hear it nearly si\ -multaneously)2.98 F 2.98(.T)-.65 G(he)-2.98 E .92(soundcard gets the sa\ -me data that is recorded. This is time critical, so it w)144 184.8 R -.919(orks best with the)-.1 F F13.419 E F0 4.678(option. T)144 -196.8 R 4.678(ou)-.8 G(se)-4.678 E F1(cdda2wa)4.678 E(v)-.25 E F0 2.179 -(as a pseudo CD player without recording in a \214le you could use)4.678 -F F1(cdda2wa)144 208.8 Q 3.145<76ad>-.25 G 3.145<71ad>-3.145 G 3.145 -<65ad>-3.145 G .645(t2 \255d0 \255N)-3.145 F F0 .645 -(to play the whole second track. This feature reduces the recording) -3.145 F .368(speed to at most onefold speed. Y)144 220.8 R .368 -(ou cannot mak)-1.1 F 2.868(eb)-.1 G .368 -(etter recordings than your sound card can play)-2.868 F -(\(since the same data is used\).)144 232.8 Q -(Change pitch of echoed audio)108 249.6 Q F1 .299(\255p per)144 261.6 R -(centage)-.18 E F0 .298 -(changes the pitch of all audio echoed to a sound card. Only the cop) -2.799 F 2.798(yt)-.1 G 2.798(ot)-2.798 G .298(he sound-)-2.798 F .388 -(card is af)144 273.6 R .389 -(fected, the recorded audio samples in a \214le remain the same.)-.25 F -.389(Normal pitch, which is the)5.389 F(def)144 285.6 Q .764 -(ault, is gi)-.1 F -.15(ve)-.25 G 3.264(nb).15 G 3.264(y1)-3.264 G 3.264 -(00%. Lo)-3.264 F .764(wer percentages correspond to lo)-.25 F .763 -(wer pitches, i.e.)-.25 F .763(-p 50 transposes)5.763 F .69 -(the audio output one octa)144 297.6 R .99 -.15(ve l)-.2 H -.25(ow).15 G -(er).25 E 5.69(.S)-.55 G .691(ee also the script)-5.69 F F1(pitchplay) -3.191 E F0 .691(as an e)3.191 F .691(xample. This option w)-.15 F(as)-.1 -E(contrib)144 309.6 Q(uted by Raul Sobon.)-.2 E -(Select mono or stereo recording)108 326.4 Q F1144 338.4 Q F0(or) -3.463 E F1 .963(\255c 1)3.463 F F0 .963 -(selects mono recording \(both stereo channels are mix)3.463 F(ed\),) --.15 E F13.463 E F0(or)3.462 E F1 .962(\255c 2)3.462 F F0(or)3.462 -E F1 .962(\255c s)3.462 F F0(selects)3.462 E(stereo recording. P)144 -350.4 Q(arameter s will sw)-.15 E(ap both sound channels.)-.1 E -(Select maximum quality)108 367.2 Q F1144 379.2 Q F0 1.866 -(will set stereo, 16 bits per sample at 44.1 KHz \(full CD quality\).) -4.366 F 1.867(Note that other format)6.867 F(options gi)144 391.2 Q -.15 -(ve)-.25 G 2.5(nl).15 G(ater can change this setting.)-2.5 E -(Select sample quality)108 408 Q F1 .622(\255b 8)144 420 R F0 .622 -(speci\214es 8 bit \(1 Byte\) for each sample in each channel;)3.122 F -F1 .621(\255b 12)3.121 F F0 .621(speci\214es 12 bit \(2 Byte\) for)3.121 -F 1.444(each sample in each channel;)144 432 R F1 1.444(\255b 16)3.944 F -F0 1.444(speci\214es 16 bit \(2 Byte\) for each sample in each channel) -3.944 F 1.441(\(Ensure that your sample player or sound card is capable\ - of playing 12-bit or 16-bit samples\).)144 444 R 1.34 -(Selecting 12 or 16 bits doubles \214le size.)144 456 R 1.341 -(12-bit samples are aligned to 16-bit samples, so the)6.341 F(y)-.15 E --.1(wa)144 468 S(ste some disk space.).1 E(Select sample rate)108 484.8 -Q F1144 496.8 Q F2(sampler)2.63 E(ate)-.15 E F0 .13 -(selects a sample rate.)2.63 F F2(sampler)5.13 E(ate)-.15 E F0 .129 -(can be in a range between 44100 and 900. Option)2.629 F F1144 -508.8 Q F0(lists all a)2.5 E -.25(va)-.2 G(ilable rates.).25 E -(Select sample rate di)108 525.6 Q(vider)-.25 E F1144 537.6 Q F2 -(divider)4.206 E F0 1.706(selects a sample rate di)4.206 F(vider)-.25 E -(.)-.55 E F2(divider)6.706 E F0 1.706 -(can be minimally 1 and maximally 50.5 and)4.206 F -2.15 -.25(ev e)144 -549.6 T(rything between in steps of 0.5.).25 E(Option)5 E F12.5 E -F0(lists all a)2.5 E -.25(va)-.2 G(ilable rates.).25 E 1.963 -.8(To m) -144 566.4 T(ak).8 E 2.863(et)-.1 G .363(he sound smoother at lo)-2.863 F -.363(wer sampling rates,)-.25 F F1(cdda2wa)2.862 E(v)-.25 E F0 .362 -(sums o)2.862 F -.15(ve)-.15 G(r).15 E F2(n)2.862 E F0 .362 -(samples \(where)2.862 F F2(n)2.862 E F0(is)2.862 E .016 -(the speci\214c di)144 578.4 R .016 -(vidend\). So for 22050 Hertz output we ha)-.25 F .317 -.15(ve t)-.2 H -2.517(os).15 G .017(um o)-2.517 F -.15(ve)-.15 G 2.517(r2s).15 G .017 -(amples, for 900 Hertz we)-2.517 F(ha)144 590.4 Q 1.268 -.15(ve t)-.2 H -3.468(os).15 G .968(um o)-3.468 F -.15(ve)-.15 G 3.468(r4).15 G 3.468 -(9s)-3.468 G 3.467(amples. This)-3.468 F .967 -(cancels higher frequencies. Standard sector size of an audio)3.467 F -.141(CD \(ignoring additional information\) is 2352 Bytes. In order to \ -\214nish summing for an output sam-)144 602.4 R .108 -(ple at sector boundaries the rates abo)144 614.4 R .408 -.15(ve h)-.15 -H -2.25 -.2(av e).15 H .108(to be choosen.)2.808 F .108 -(Arbitrary sampling rates in high qual-)5.108 F .079(ity w)144 626.4 R -.079(ould require some interpolation scheme, which needs much more soph\ -isticated programming.)-.1 F(List a table of all sampling rates)108 -643.2 Q F1144 655.2 Q F0(sho)2.639 E .139 -(ws a list of all sample rates and their di)-.25 F .138(viders. Di)-.25 -F .138(viders can range from 1 to 50.5 in steps of)-.25 F(0.5.)144 667.2 -Q(Select start track and optionally end track)108 684 Q F1144 696 -Q F2(n+m)3.529 E F0(selects)3.529 E F1(n)3.529 E F0 1.029 -(as the start track and optionally)3.529 F F1(m)3.529 E F0 1.029 -(as the last track of a range to be recorded.)3.529 F 1.86 -(These tracks must be from the table of contents.)144 708 R 1.859 -(This sets the track where recording be)6.859 F(gins.)-.15 E .641 -(Recording can adv)144 720 R .641(ance through the follo)-.25 F .641 -(wing tracks as well \(limited by the optional end track or)-.25 F(5)535 -768 Q EP +save +mark +5 pagesetup +10 R f +( \( 1 \))3 164( CDDA2WAV)1 3839(User Commands)1 677 3 720 480 t +10 S1 f +(\261 \261)1 65 1 1080 960 t +10 B f +( =)1 0( s=)1 57( ts)1 39( pt)1 33( ao op)2 106( ra)1 50( ar)1 44(p pa)1 106 8 1145 960 t +10 I f +(list)1580 960 w +(List)1440 1080 w +10 R f +(is a comma separated list of suboptions passed to the paranoia library.)11 2884 1 1624 1080 t +10 S f +(_ ____________________________________________________________________)1 3421 1 1709 1100 t +10 R f +(Option Description)1 894 1 2158 1220 t +10 S f +(_ ____________________________________________________________________)1 3421 1 1709 1240 t +10 R f +( all paranoia options.)3 862(help lists)1 484 2 2264 1360 t +( paranoia mode. Libparanoia is still being used)7 1926(disable disables)1 755 2 2153 1480 t +( verify off, and static overlap on)6 1331(no-verify switches)1 865 2 2065 1600 t +( the number of maximum retries per sector)7 1761(retries=amount set)1 866 2 1831 1720 t +( the number of sectors used for statical paranoia overlap)9 2308(overlap=amount set)1 916 2 1781 1840 t +( the min. number of sectors for dynamic paranoia overlap)9 2367(minoverlap=amt set)1 922 2 1775 1960 t +( the max. number of sectors for dynamic paranoia overlap)9 2383(maxoverlap=amt set)1 938 2 1759 2080 t +( maxoverlap=)1 560(proof set)1 477 2 2220 2200 t +10 I f +(sectors)3257 2200 w +10 S1 f +(\261)3540 2200 w +10 I f +(per)3605 2200 w +10 S1 f +(\261)3738 2200 w +10 I f +(request)3803 2200 w +10 R f +(-1,retries=200)4097 2200 w +10 S f +( \347)1 -3421(_ ____________________________________________________________________)1 3421 2 1709 2220 t +(\347)1709 2200 w +(\347)1709 2100 w +(\347)1709 2000 w +(\347)1709 1900 w +(\347)1709 1800 w +(\347)1709 1700 w +(\347)1709 1600 w +(\347)1709 1500 w +(\347)1709 1400 w +(\347)1709 1300 w +(\347)1709 1200 w +(\347)2511 2220 w +(\347)2511 2200 w +(\347)2511 2100 w +(\347)2511 2000 w +(\347)2511 1900 w +(\347)2511 1800 w +(\347)2511 1700 w +(\347)2511 1600 w +(\347)2511 1500 w +(\347)2511 1400 w +(\347)2511 1300 w +(\347)2511 1200 w +(\347)5130 2220 w +(\347)5130 2200 w +(\347)5130 2100 w +(\347)5130 2000 w +(\347)5130 1900 w +(\347)5130 1800 w +(\347)5130 1700 w +(\347)5130 1600 w +(\347)5130 1500 w +(\347)5130 1400 w +(\347)5130 1300 w +(\347)5130 1200 w +10 S1 f +(\261 \261)1 65 1 1080 2388 t +10 B f +(q q)1 56 1 1145 2388 t +10 S1 f +(\261 \261)1 65 1 1080 2556 t +10 B f +( t)1 0( et)1 33( ie)1 44(q qu ui)2 140 4 1145 2556 t +10 R f +(quiet operation, no screen output.)4 1369 1 1440 2556 t +10 S1 f +(\261 \261)1 65 1 1080 2724 t +10 B f +(r r)1 44 1 1145 2724 t +10 I f +(rate)1222 2724 w +10 S1 f +(\261 \261)1 65 1 1080 2892 t +10 B f +( e)1 0( te)1 44( at)1 33(r ra)1 94 4 1145 2892 t +10 I f +(rate)1349 2892 w +10 R f +(sets)1440 3012 w +10 I f +(rate)1623 3012 w +10 R f +( values are listed with the)5 1058( Possible)1 400(in samples per second.)3 928 3 1817 3012 t +10 S1 f +(\261 \261)1 65 1 4236 3012 t +10 B f +(R R)1 72 1 4301 3012 t +10 R f +(option.)4406 3012 w +10 S1 f +(\261 \261)1 65 1 1080 3180 t +10 B f +(R R)1 72 1 1145 3180 t +10 S1 f +(\261 \261)1 65 1 1080 3348 t +10 B f +( p)1 0( mp)1 56(d du um)2 195 3 1145 3348 t +10 S1 f +(\261 \261)1 65 1 1396 3348 t +10 B f +( s)1 0( es)1 39( te)1 44( at)1 33(r ra)1 94 5 1461 3348 t +10 R f +(shows a list of all sample rates and their dividers.)9 2042 1 1440 3468 t +10 S1 f +(\261 \261)1 65 1 1080 3636 t +10 B f +(S S)1 56 1 1145 3636 t +10 I f +(speed)1234 3636 w +10 S1 f +(\261 \261)1 65 1 1080 3804 t +10 B f +( d)1 0( ee ed)2 100( pe)1 44(s sp)1 95 4 1145 3804 t +10 I f +(speed)1417 3804 w +10 R f +( maximum extraction)2 901( For)1 220( device to one of the selectable speeds for reading.)9 2218(sets the cdrom)2 621 4 1440 3924 t +(quality, it is recommended to use speed values of 8 or below.)11 2532 1 1440 4044 t +(The default is to extract at maximum speed.)7 1809 1 1440 4284 t +10 S1 f +(\261 \261)1 65 1 1080 4452 t +10 B f +(s s)1 39 1 1145 4452 t +10 S1 f +(\261 \261)1 65 1 1080 4620 t +10 B f +( o)1 0( er re eo)3 138( te)1 44(s st)1 72 4 1145 4620 t +10 R f +(sets to stereo recording.)3 972 1 1440 4620 t +10 S1 f +(\261 \261)1 65 1 1080 4788 t +10 B f +( t)1 0( rt)1 33( ar)1 44( ta)1 50(s st)1 72 5 1145 4788 t +10 S1 f +(\261 \261)1 65 1 1344 4788 t +10 B f +( r)1 0( or)1 44( to)1 50( ec ct)2 77(s se)1 83 5 1409 4788 t +10 I f +(sector)1696 4788 w +10 R f +(set an absolute start sector. This option is mutually exclusive to)10 2615 1 1440 4908 t +10 S1 f +(\261 \261)1 65 1 4088 4908 t +10 B f +( k)1 0( ck)1 56( ac)1 44( ra)1 50(t tr)1 77 5 4153 4908 t +10 R f +(and)4413 4908 w +10 S1 f +(\261 \261)1 65 1 4590 4908 t +10 B f +( t)1 0( et)1 33( se)1 44( ff fs)2 72(o of)1 83 5 4655 4908 t +10 R f +(.)4887 4908 w +10 S1 f +(\261 \261)1 65 1 1080 5076 t +10 B f +(t t)1 33 1 1145 5076 t +10 I f +(track[+endtrack])1211 5076 w +10 S1 f +(\261 \261)1 65 1 1080 5244 t +10 B f +( k)1 0( ck)1 56( ac)1 44( ra)1 50(t tr)1 77 5 1145 5244 t +10 I f +(track[+endtrack])1405 5244 w +10 S1 f +(\261 \261)1 65 1 1080 5412 t +10 B f +( k)1 0( ck)1 56( ac)1 44( ra)1 50(t tr)1 77 5 1145 5412 t +10 I f +(track)1405 5412 w +10 B f +( ax x)2 50( ma)1 50(+ +m)1 140 3 1618 5412 t +10 S1 f +(\261 \261)1 65 1 1080 5580 t +10 B f +( ll l)2 28( al)1 28( a)1 83( k)1 0( ck)1 56( ac)1 44( ra)1 50(t tr)1 77 8 1145 5580 t +10 R f +( If)1 153(selects the start track and optionally the end track.)8 2231 2 1440 5700 t +10 S1 f +(\261 \261)1 65 1 3878 5700 t +10 B f +( ll l)2 28( al)1 28( a)1 83(t t)1 33 4 3943 5700 t +10 R f +(is used, all audio tracks are)5 1231 1 4169 5700 t +(selected. If)1 478 1 1440 5820 t +10 S1 f +(\261 \261)1 65 1 1951 5820 t +10 B f +( ax x)2 50( ma)1 50( +m)1 83( 2+)1 57( 2)1 83(t t)1 33 6 2016 5820 t +10 R f +(is used, all audio tracks starting with track 2 are selected.)10 2359 1 2405 5820 t +10 S1 f +(\261 \261)1 65 1 1080 5988 t +10 B f +(v v)1 50 1 1145 5988 t +10 I f +(itemlist)1228 5988 w +10 S1 f +(\261 \261)1 65 1 1080 6156 t +10 B f +( e)1 0( se)1 44( os)1 39( bo)1 50( er rb)2 100(v ve)1 94 6 1145 6156 t +10 S1 f +(\261 \261)1 65 1 1472 6156 t +10 B f +( l)1 0( el)1 28( ve)1 44( ev)1 50(l le)1 72 5 1537 6156 t +10 I f +(itemlist)1764 6156 w +10 R f +( about the CD.)3 652(Retrieves and prints verbose information)4 1719 2 1440 6276 t +10 B f +( l)1 0( el)1 28( ve)1 44( ev)1 50(L Le)1 111 5 3892 6276 t +10 R f +(is a list of comma separated)5 1227 1 4173 6276 t +(suboptions. Each suboption controls the type of information to be reported.)10 3083 1 1440 6396 t +( 5)1 1829( change: Version 3.0)3 850( Last)1 1509(SunOS 5.10)1 492 4 720 7680 t +cleartomark +showpage +restore +%%EndPage: 5 5 %%Page: 6 6 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(CDD)72 48 Q(A2W)-.4 E -1.35(AV)-1.2 G 333.66 -(\(1\) CDD)1.35 F(A2W)-.4 E -1.35(AV)-1.2 G(\(1\))1.35 E 2.454 -(otherwise depending on recording time\). Whether one \214le or dif)144 -84 R 2.454(ferent \214les are then created)-.25 F(depends on the)144 96 -Q/F1 10/Times-Bold@0 SF2.5 E F0(option \(see belo)2.5 E(w\).)-.25 -E(Select start inde)108 112.8 Q(x)-.15 E F1144 124.8 Q/F2 10 -/Times-Italic@0 SF(n)3.224 E F0 .724(selects the inde)3.224 F 3.224(xt) --.15 G 3.224(os)-3.224 G .724(tart recording with.)-3.224 F .724 -(Indices other than 1 will in)5.724 F -.2(vo)-.4 G .924 -.1(ke t).2 H -.725(he inde).1 F 3.225(xs)-.15 G(canner)-3.225 E(,)-.4 E .893 -(which will tak)144 136.8 R 3.393(es)-.1 G .893 -(ome time to \214nd the correct start position. An of)-3.393 F .892 -(fset may be gi)-.25 F -.15(ve)-.25 G 3.392(na).15 G(dditionally)-3.392 -E(\(see belo)144 148.8 Q(w\).)-.25 E(Set recording time)108 165.6 Q F1 -2.61(\255d n)144 177.6 R F0 .11(sets recording time to)2.61 F F2(n)2.61 -E F0 .11(seconds or set recording time for whole track if)2.61 F F2(n) -2.61 E F0 .11(is zero. In order to)2.61 F 1.35 -(specify the duration in frames \(sectors\) also, the ar)144 189.6 R -1.35(gument can ha)-.18 F 1.65 -.15(ve a)-.2 H 3.85(na).15 G 1.35 -(ppended 'f)-3.85 F 1.35('. Then the).55 F .12(numerical ar)144 201.6 R -.12(gument is to be tak)-.18 F .121 -(en as frames \(sectors\) rather than seconds.)-.1 F .121 -(Please note that if track)5.121 F .547(ranges are being used the)144 -213.6 R 3.046(yd)-.15 G .546(e\214ne the recording time as well thus o) --3.046 F -.15(ve)-.15 G .546(rriding an).15 F(y)-.15 E F13.046 E -F0 .546(option speci-)3.046 F(\214ed times.)144 225.6 Q .535(Recording \ -time is de\214ned as the time the generated sample will play \(at the d\ -e\214ned sample rate\).)144 242.4 R 1.263(Since it')144 254.4 R 3.763 -(sr)-.55 G 1.263(elated to the amount of generated samples, it')-3.763 F -3.762(sn)-.55 G 1.262(ot the time of the sampling process)-3.762 F .968 -(itself \(which can be less or more\).)144 266.4 R(It')5.968 E 3.468(sn) --.55 G .968(either strictly coupled with the time information on the) --3.468 F .885(audio CD \(sho)144 278.4 R .885 -(wn by your hi\214 CD player\).)-.25 F(Dif)5.885 E .885 -(ferences can occur by the usage of the)-.25 F F13.384 E F0 -(option)3.384 E .005(\(see belo)144 290.4 R .006(w\). Notice that recor\ -ding time will be shortened, unless enough disk space e)-.25 F .006 -(xists. Record-)-.15 F(ing can be aborted at an)144 302.4 Q -(ytime by pressing the break character \(signal SIGQ)-.15 E(UIT\).)-.1 E -(Record all tracks of a complete audio CD in seperate \214les)108 319.2 -Q F1144 331.2 Q F0 .28 -(copies each track into a seperate \214le. A base name can be gi)2.78 F --.15(ve)-.25 G .28(n. File names ha).15 F .58 -.15(ve a)-.2 H 2.78(na) -.15 G(ppended)-2.78 E .63(track number and an e)144 343.2 R .631 -(xtension corresponding to the audio format. T)-.15 F 3.131(or)-.8 G -.631(ecord all audio tracks of a)-3.131 F(CD, use a suf)144 355.2 Q -(\214cient high duration \(i.e. -d99999\).)-.25 E(Set start sector of) -108 372 Q(fset)-.25 E F1144 384 Q F2(sector)2.541 E(s)-.1 E F0 -.041(increments start sector of the track by)2.541 F F2(sector)2.541 E -(s)-.1 E F0 5.041(.B).27 G 2.54(yt)-5.041 G .04 -(his option you are able to skip a cer)-2.54 F(-)-.2 E .106 -(tain amount at the be)144 396 R .107 -(ginning of a track so you can pick e)-.15 F .107(xactly the part you w) --.15 F .107(ant. Each sector runs)-.1 F .677 -(for 1/75 seconds, so you ha)144 408 R .977 -.15(ve ve)-.2 H .677 -(ry \214ne control. If your of).15 F .677(fset is so high that it w)-.25 -F .677(ould not \214t into)-.1 F 1.251(the current track, a w)144 420 R -1.251(arning message is issued and the of)-.1 F 1.251(fset is ignored.) --.25 F 1.252(Recording time is not)6.252 F 2.5(reduced. \(T)144 432 R -2.5(os)-.8 G(kip introductory quiet passages automagically)-2.5 E 2.5 -(,u)-.65 G(se the)-2.5 E F12.5 E F0(option see belo)2.5 E -.65(w.) --.25 G(\)).65 E -.8(Wa)108 448.8 S(it for signal option).8 E F1144 -460.8 Q F0 -.45(Tu)3.865 G 1.365(rning on this option will suppress all\ - silent output at startup, reducing possibly \214le size.).45 F F1 -(cdda2wa)144 472.8 Q(v)-.25 E F0(will w)2.5 E(atch for an)-.1 E 2.5(ys) --.15 G(ignal in the output signal and switches on writing to \214le.) --2.5 E(Find e)108 489.6 Q(xtrem samples)-.15 E F1144 501.6 Q F0 --.45(Tu)2.66 G .16(rning on this option will display the most ne).45 F --.05(ga)-.15 G(ti).05 E .46 -.15(ve a)-.25 H .16(nd the most positi).15 -F .46 -.15(ve s)-.25 H .16(ample v).15 F .16(alue found)-.25 F 1.617(du\ -ring recording for both channels. This can be useful for readjusting th\ -e v)144 513.6 R 1.616(olume. The v)-.2 F(alues)-.25 E(sho)144 525.6 Q -.266(wn are not reset at track boundaries, the)-.25 F 2.766(yc)-.15 G --.15(ove)-2.766 G 2.766(rt).15 G .266(he complete sampling process. The) --2.766 F 2.766(ya)-.15 G .266(re tak)-2.766 F(en)-.1 E .377 -(from the original samples and ha)144 537.6 R .677 -.15(ve t)-.2 H .377 -(he same format \(i.e. the).15 F 2.877(ya)-.15 G .377 -(re independent of the selected out-)-2.877 F(put format\).)144 549.6 Q -(Find if input samples are in mono)108 566.4 Q F1144 578.4 Q F0 -1.028(If this option is gi)3.528 F -.15(ve)-.25 G 1.028 -(n, input samples for both channels will be compared. At the end of the) -.15 F 1.534(program the result is printed. Dif)144 590.4 R 1.534 -(ferences in the channels indicate stereo, otherwise when both)-.25 F -(channels are equal it will indicate mono.)144 602.4 Q -(Undo the pre-emphasis in the input samples)108 619.2 Q F1144 -631.2 Q F0 .639 -(Some older audio CDs are recorded with a modi\214ed frequenc)3.139 F -3.14(yr)-.15 G .64(esponse called pre-emphasis.)-3.14 F .027(This is fo\ -und mostly in classical recordings. The correction can be seen in the \ -\215ags of the T)144 643.2 R .026(able Of)-.8 F 1.418 -(Contents often. But there are recordings, that sho)144 655.2 R 3.919 -(wt)-.25 G 1.419(his setting only in the subchannels. If this)-3.919 F -.849(option is gi)144 667.2 R -.15(ve)-.25 G .849(n, the inde).15 F -3.349(xs)-.15 G .849 -(canner will be started, which reads the q-subchannel of each track. If) --3.349 F .298 -(pre-emphasis is indicated in the q-subchannel of a track, b)144 679.2 R -.298(ut not in the T)-.2 F .299(OC, pre-emphasis will be)-.18 F .77 -(assumed to be present, and subsequently a re)144 691.2 R -.15(ve)-.25 G -.769(rse \214ltering is done for this track before the sam-).15 F -(ples are written into the audio \214le.)144 703.2 Q(6)535 768 Q EP +save +mark +6 pagesetup +10 R f +( \( 1 \))3 164( CDDA2WAV)1 3839(User Commands)1 677 3 720 480 t +10 S f +(_ ___________________________________________________________________)1 3351 1 1744 860 t +10 R f +(Suboption Description)1 1028 1 1875 980 t +10 S f +(_ ___________________________________________________________________)1 3351 1 1744 1000 t +10 R f +( the meaning of the following string)6 1486(! invert)1 416 2 2254 1120 t +( the meaning of the following string)6 1486(not invert)1 511 2 2159 1240 t +( information is given, warnings appear however)6 1958(disable no)1 533 2 2004 1360 t +( information is given)3 860(all all)1 350 2 2187 1480 t +( table of contents)3 709(toc show)1 483 2 2165 1600 t +( a summary of the recording parameters)6 1638(summary show)1 733 2 1915 1720 t +( and display index offsets)4 1053(indices determine)1 832 2 2004 1840 t +( and display the media catalog number MCN)7 1851(catalog retrieve)1 742 2 1999 1960 t +( and display the media catalog number MCN)7 1851(mcn retrieve)1 626 2 2115 2080 t +( and display all Intern. Standard Recording Codes ISRC)8 2304(trackid retrieve)1 731 2 2010 2200 t +( and display all Intern. Standard Recording Codes ISRC)8 2304(isrc retrieve)1 598 2 2143 2320 t +( the table of contents in start sector notation)8 1812(sectors show)1 638 2 2010 2440 t +( the table of contents with track titles \(when available\))9 2243(titles show)1 556 2 2092 2560 t +( the audio tracks and their start sectors)7 1589(audio-tracks list)1 766 2 1794 2680 t +10 S f +( \347)1 -3351(_ ___________________________________________________________________)1 3351 2 1744 2700 t +(\347)1744 2660 w +(\347)1744 2560 w +(\347)1744 2460 w +(\347)1744 2360 w +(\347)1744 2260 w +(\347)1744 2160 w +(\347)1744 2060 w +(\347)1744 1960 w +(\347)1744 1860 w +(\347)1744 1760 w +(\347)1744 1660 w +(\347)1744 1560 w +(\347)1744 1460 w +(\347)1744 1360 w +(\347)1744 1260 w +(\347)1744 1160 w +(\347)1744 1060 w +(\347)1744 960 w +(\347)2362 2700 w +(\347)2362 2660 w +(\347)2362 2560 w +(\347)2362 2460 w +(\347)2362 2360 w +(\347)2362 2260 w +(\347)2362 2160 w +(\347)2362 2060 w +(\347)2362 1960 w +(\347)2362 1860 w +(\347)2362 1760 w +(\347)2362 1660 w +(\347)2362 1560 w +(\347)2362 1460 w +(\347)2362 1360 w +(\347)2362 1260 w +(\347)2362 1160 w +(\347)2362 1060 w +(\347)2362 960 w +(\347)5095 2700 w +(\347)5095 2660 w +(\347)5095 2560 w +(\347)5095 2460 w +(\347)5095 2360 w +(\347)5095 2260 w +(\347)5095 2160 w +(\347)5095 2060 w +(\347)5095 1960 w +(\347)5095 1860 w +(\347)5095 1760 w +(\347)5095 1660 w +(\347)5095 1560 w +(\347)5095 1460 w +(\347)5095 1360 w +(\347)5095 1260 w +(\347)5095 1160 w +(\347)5095 1060 w +(\347)5095 960 w +10 R f +(The default value for the verbose-level is)6 1688 1 1440 2940 t +10 B f +( s)1 0( es)1 39( le)1 44( tl)1 28( it)1 33( ti)1 28( ,t)1 33( s,)1 25( rs)1 39( or)1 44( to)1 50( ec ct)2 77( se)1 44( ,s)1 39( y,)1 25( ry)1 50( ar)1 44( mm ma)2 133( um)1 83( su)1 56( ,s)1 39( c,)1 25( oc)1 44(t to)1 83 24 3161 2940 t +10 R f +(.)4299 2940 w +10 S1 f +(\261 \261)1 65 1 1080 3108 t +10 B f +(w w)1 72 1 1145 3108 t +10 S1 f +(\261 \261)1 65 1 1080 3276 t +10 B f +( t)1 0( it)1 33( ai)1 28(w wa)1 122 4 1145 3276 t +10 R f +(waits for signal, then start recording.)5 1507 1 1440 3276 t +10 S1 f +(\261 \261)1 65 1 1080 3444 t +10 B f +(x x)1 50 1 1145 3444 t +10 S1 f +(\261 \261)1 65 1 1080 3612 t +10 B f +( ax x)2 50(m ma)1 133 2 1145 3612 t +10 R f +(sets maximum \(CD\) quality.)3 1163 1 1440 3612 t +9 B f +( s)1 0( ns)1 35( on)1 50( io)1 45( ti)1 25( pt)1 30( op)1 50( o)1 75( I)1 0( SI)1 35( CS)1 50(S SC)1 115 12 900 3780 t +10 B f +( =)1 0( v=)1 57( ev)1 50(d de)1 100 4 1080 3900 t +10 I f +(device)1287 3900 w +10 S1 f +(\261 \261)1 65 1 1080 4068 t +10 B f +(D D)1 72 1 1145 4068 t +10 I f +(device)1250 4068 w +10 S1 f +(\261 \261)1 65 1 1080 4236 t +10 B f +( ce e)2 44( ic)1 44( vi)1 28( ev)1 50(d de)1 100 5 1145 4236 t +10 I f +(device)1444 4236 w +10 R f +(uses)1440 4356 w +10 I f +(device)1658 4356 w +10 R f +( example /dev/cdrom for the)4 1219( For)1 219(as the source for CDDA reading.)5 1423 3 1959 4356 t +10 B f +( d)1 0( ed)1 56( ke)1 44( oo ok)2 106(c co)1 94 5 4867 4356 t +10 S f +(_ _)1 50 1 5167 4356 t +10 B f +( l)1 0( tl)1 28( ct)1 33( oc)1 44(i io)1 78 5 5217 4356 t +10 R f +(interface and Bus,ID,Lun for the)4 1362 1 1440 4476 t +10 B f +( c)1 0( ic)1 44( er ri)2 72( ne)1 44( en)1 56(g ge)1 94 6 2842 4476 t +10 S f +(_ _)1 50 1 3152 4476 t +10 B f +( i)1 0( si)1 28( cs)1 39(s sc)1 83 4 3202 4476 t +10 R f +(interface. The)1 567 1 3391 4476 t +10 I f +(device)3997 4476 w +10 R f +(has to correspond with the)4 1110 1 4290 4476 t +(interface setting if given \(see)4 1190 1 1440 4596 t +10 S1 f +(\261 \261)1 65 1 2663 4596 t +10 B f +(I I)1 39 1 2728 4596 t +10 R f +(and)2800 4596 w +10 S1 f +(\261 \261)1 65 1 2977 4596 t +10 B f +( ce e)2 44( ac)1 44( fa)1 50( er rf)2 77( te)1 44( nt)1 33(i in)1 84 7 3042 4596 t +10 R f +(option below\).)1 591 1 3451 4596 t +(If no)1 199 1 1440 4836 t +10 S1 f +(\261 \261)1 65 1 1672 4836 t +10 B f +(I I)1 39 1 1737 4836 t +10 R f +(or)1809 4836 w +10 S1 f +(\261 \261)1 65 1 1925 4836 t +10 B f +( ce e)2 44( ac)1 44( fa)1 50( er rf)2 77( te)1 44( nt)1 33(i in)1 84 7 1990 4836 t +10 R f +( the device)2 450(option has been speci\256ed, the interface setting is derived from)9 2551 2 2399 4836 t +( colon \(':'\) defaults to)4 912(name syntax. A device name that is in the form Bus,ID,Lun or contains a)13 3048 2 1440 4956 t +(the)1440 5076 w +10 B f +( c)1 0( ic)1 44( er ri)2 72( ne)1 44( en)1 56(g ge)1 94 6 1595 5076 t +10 S f +(_ _)1 50 1 1905 5076 t +10 B f +( i)1 0( si)1 28( cs)1 39(s sc)1 83 4 1955 5076 t +10 R f +(interface.)2138 5076 w +(Using the)1 407 1 1440 5316 t +10 B f +( d)1 0( ed)1 56( ke)1 44( oo ok)2 106(c co)1 94 5 1893 5316 t +10 S f +(_ _)1 50 1 2193 5316 t +10 B f +( l)1 0( tl)1 28( ct)1 33( oc)1 44(i io)1 78 5 2243 5316 t +10 R f +( recommended as this makes)4 1236(is not)1 241 2 2472 5316 t +10 B f +( av v)2 50( wa)1 50( a2 2w)2 122( dd da)2 106(c cd)1 100 5 3996 5316 t +10 R f +(mainly depend on the)3 929 1 4471 5316 t +( of the operating system which is usually extremely bad. For this reason,)12 2993(audio extraction quality)2 967 2 1440 5436 t +(avoid using parameters like)3 1125 1 1440 5556 t +10 B f +( =)1 0( v=)1 57( ev)1 50(d de)1 100 4 2598 5556 t +10 R f +(/dev/cdrom for the device.)3 1077 1 2805 5556 t +(The setting of the environment variable)5 1618 1 1440 5796 t +10 B f +(C CD DD DA A)4 288 1 3091 5796 t +10 S f +(_ _)1 50 1 3379 5796 t +10 B f +( E)1 0( CE)1 67( IC)1 72( VI)1 39( EV)1 72(D DE)1 139 6 3429 5796 t +10 R f +(is overridden by this option.)4 1157 1 3851 5796 t +(If no)1 208 1 1440 6036 t +10 B f +( =)1 0( v=)1 57( ev)1 50(d de)1 100 4 1690 6036 t +10 R f +(option is present, or if the)5 1112 1 1939 6036 t +10 B f +( =)1 0( v=)1 57( ev)1 50(d de)1 100 4 3093 6036 t +10 R f +( a transport specifyer but no)5 1207(option only contains)2 851 2 3342 6036 t +(address,)1440 6156 w +10 B f +( av v)2 50( wa)1 50( a2 2w)2 122( dd da)2 106(c cd)1 100 5 1801 6156 t +10 R f +( exactly one is)3 607( If)1 135( the SCSI address space for CD-ROM drives.)7 1891(tries to scan)2 501 4 2266 6156 t +(found, this is used by default.)5 1220 1 1440 6276 t +(For more information, see the description of the)7 1970 1 1440 6516 t +10 B f +( =)1 0( v=)1 57( ev)1 50(d de)1 100 4 3443 6516 t +10 R f +(option from)1 483 1 3683 6516 t +10 B f +( d)1 0( rd)1 56( or)1 44( re ec co)3 138( dr)1 44(c cd)1 100 6 4199 6516 t +10 R f +(\(1\).)4581 6516 w +10 B f +( =)1 0( g=)1 57( bu ug)2 106( eb)1 56(d de)1 100 5 1080 6684 t +10 S1 f +(#)1399 6684 w +10 B f +( =)1 0( i=)1 57( si)1 28( cs)1 39( sc)1 44( -s)1 39( g-)1 33( bu ug)2 106( eb)1 56(d de)1 100 10 1080 6852 t +10 S1 f +(#)1582 6852 w +10 R f +(Set the debug level for the)5 1091 1 1440 6972 t +10 B f +( g)1 0( cg)1 50( sc)1 44( bs)1 39(l li ib)2 112 5 2564 6972 t +10 R f +(SCSI OS abstraction layer.)3 1101 1 2842 6972 t +10 B f +( =)1 0( g=)1 57( bu ug)2 106( eb)1 56(k kd de)2 156 5 1080 7140 t +10 S1 f +(#)1455 7140 w +10 B f +( =)1 0( i=)1 57( si)1 28( cs)1 39( sc)1 44( -s)1 39( g-)1 33( bu ug)2 106( eb)1 56(k kd de)2 156 10 1080 7308 t +10 S1 f +(#)1638 7308 w +10 R f +( 6)1 1829( change: Version 3.0)3 850( Last)1 1509(SunOS 5.10)1 492 4 720 7788 t +cleartomark +showpage +restore +%%EndPage: 6 6 %%Page: 7 7 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(CDD)72 48 Q(A2W)-.4 E -1.35(AV)-1.2 G 333.66 -(\(1\) CDD)1.35 F(A2W)-.4 E -1.35(AV)-1.2 G(\(1\))1.35 E -(Set audio format)108 84 Q/F1 10/Times-Bold@0 SF 2.564(\255O audiotype) -144 96 R F0 .064(can be)2.564 F/F2 10/Times-Italic@0 SF(wav)2.564 E F0 -.065(\(for w)2.564 F .465 -.2(av \214)-.1 H .065(les\) or).2 F F2(au) -2.565 E F0(or)2.565 E F2(sun)2.565 E F0 .065(\(for sun PCM \214les\) or) -2.565 F F2(cdr)2.565 E F0(or)2.565 E F2 -.15(ra)2.565 G(w).15 E F0 .065 -(\(for head-)2.565 F .667(erless \214les to be used for cd writers\).) -144 108 R .667 -(All \214le samples are coded in linear pulse code modulation)5.667 F -.677(\(as done in the audio compact disc format\). This holds for all a\ -udio formats.)144 120 R -1.1 -.8(Wa v)5.677 H .677(\214les are com-) -3.977 F .703(patible to W)144 132 R .703(ind*ws sound \214les, the)-.4 F -3.203(yh)-.15 G -2.25 -.2(av e)-3.203 H .702 -(lsb,msb byte order as being used on the audio cd. The)3.402 F(def)144 -144 Q .382(ault \214lename e)-.1 F .382(xtension is '.w)-.15 F -.2(av) --.1 G 2.882('. Sun).2 F .382(type \214les are not lik)2.882 F 2.882(et) --.1 G .383(he older common log)-2.882 F(arithmically)-.05 E .055 -(coded .au \214les, b)144 156 R .055(ut instead as mentioned abo)-.2 F -.355 -.15(ve l)-.15 H .054 -(inear PCM is used. The byte order is msb,lsb to be).15 F .725 -(compatible. The def)144 168 R .725(ault \214lename e)-.1 F .725 -(xtension is '.au'.)-.15 F .725(The AIFF and the ne)5.725 F .725(wer v) --.25 F .725(ariant AIFC from)-.25 F .002(the Apple/SGI w)144 180 R .001 -(orld store their samples in bigendian format \(msb,lsb\). In AIFC no c\ -ompression is)-.1 F 3.427(used. Finally)144 192 R .927 -(the easiest 'format', the cdr aka ra)3.427 F 3.427(wf)-.15 G .927 -(ormat. It is done per def)-3.427 F .927(ault in msb,lsb byte)-.1 F .722 -(order to satisfy the order w)144 204 R .722 -(anted by most cd writers. Since there is no header information in this) --.1 F 1.182(format, the sample parameters can only be identi\214ed by p\ -laying the samples on a soundcard or)144 216 R(similiar)144 228 Q 2.5 -(.T)-.55 G(he def)-2.5 E(ault \214lename e)-.1 E -(xtension is '.cdr' or '.ra)-.15 E(w'.)-.15 E(Select cdrom dri)108 244.8 -Q .3 -.15(ve r)-.25 H(eading speed).15 E F1 3.922(\255S speed)144 256.8 -R F0(allo)3.922 E 1.422(ws to switch the cdrom dri)-.25 F 1.722 -.15 -(ve t)-.25 H 3.922(oac).15 G 1.422(ertain le)-3.922 F -.15(ve)-.25 G -3.922(lo).15 G 3.921(fs)-3.922 G 1.421(peed in order to reduce read) --3.921 F .501(errors. The ar)144 268.8 R .501(gument is transfered v) --.18 F .501(erbatim to the dri)-.15 F -.15(ve)-.25 G 5.501(.D).15 G .501 -(etails depend v)-5.501 F .502(ery much on the cdrom)-.15 F(dri)144 -280.8 Q -.15(ve)-.25 G 3.454(s. An).15 F(ar)3.454 E .954 -(gument of 0 for e)-.18 F .954(xample is often the def)-.15 F .954 -(ault speed of the dri)-.1 F -.15(ve)-.25 G 3.453(,av).15 G .953 -(alue of 1 often)-3.703 F(selects single speed.)144 292.8 Q -(Enable MD5 checksums)108 309.6 Q F1 2.628(\255M count)144 321.6 R F0 -.128(enables calculation of MD-5 checksum for 'count' bytes from the be) -2.628 F .128(ginning of a track.)-.15 F(This w)144 333.6 Q -(as introduced for quick comparisons of tracks.)-.1 E(Use Monty')108 -350.4 Q 2.5(sl)-.55 G(ibparanoia for reading of sectors)-2.5 E F1 -(\255paranoia)144 362.4 Q F0 1.015(selects an alternate w)3.515 F 1.015 -(ay of e)-.1 F 1.015(xtracting audio sectors. Monty')-.15 F 3.515(sl) --.55 G 1.015(ibrary is used with the)-3.515 F(follo)144 374.4 Q -(wing def)-.25 E(ault options:)-.1 E -.92(PA)144 398.4 S -(RANOIA_MODE_FULL, b).92 E(ut without P)-.2 E(ARANOIA_MODE_NEVERSKIP) --.92 E(for details see Monty')144 422.4 Q 2.5(sl)-.55 G -(ibparanoia documentation.)-2.5 E(In this case the option)5 E F1 -2.5 E F0(has no ef)2.5 E(fect.)-.25 E(Do linear or o)108 439.2 Q -.15 -(ve)-.15 G(rlapping reading of sectors).15 E .669 -(\(This applies unless option)144 451.2 R F1(\255paranoia)3.169 E F0 -.669(is used.\))3.169 F F1 3.169(\255P sectors)5.669 F F0 .669 -(sets the gi)3.169 F -.15(ve)-.25 G 3.17(nn).15 G .67 -(umber of sectors for)-3.17 F .012(initial o)144 463.2 R -.15(ve)-.15 G -.012(rlap sampling for jitter correction. T).15 F .211 -.1(wo c)-.8 H -.011(ases are to be distinguished. F).1 F .011(or nonzero v)-.15 F -(alues,)-.25 E .037(some sectors are read twice to enable cdda2w)144 -475.2 R -.2(av)-.1 G 1.137 -.55('s j).2 H .038(itter correction.).55 F -.038(If an ar)5.038 F .038(gument of zero is gi)-.18 F -.15(ve)-.25 G -(n,).15 E .44(no o)144 487.2 R -.15(ve)-.15 G .44 -(rlap sampling will be used.).15 F -.15(Fo)5.44 G 2.94(rn).15 G .44 -(onzero o)-2.94 F -.15(ve)-.15 G .44(rlap sectors cdda2w).15 F .84 -.2 -(av d)-.1 H .44(ynamically adjusts the).2 F 1.077 -(setting during sampling \(lik)144 499.2 R 3.578(ec)-.1 G 1.078 -(dparanoia does\).)-3.578 F 1.078(If no match can be found, cdda2w)6.078 -F 1.478 -.2(av r)-.1 H 1.078(etries the).2 F .782 -(read with an increased o)144 511.2 R -.15(ve)-.15 G 3.281(rlap. If).15 -F .781(the amount of jitter is lo)3.281 F .781(wer than the current o) --.25 F -.15(ve)-.15 G .781(rlapped sam-).15 F 1.489(ples, cdda2w)144 -523.2 R 1.889 -.2(av r)-.1 H 1.489(educes the o).2 F -.15(ve)-.15 G -1.489(rlap setting, resulting in a higher reading speed.).15 F 1.49 -(The ar)6.49 F(gument)-.18 E(gi)144 535.2 Q -.15(ve)-.25 G 5.349(nh).15 -G 2.849(as to be lo)-5.349 F 2.849 -(wer than the total number of sectors per request \(see option)-.25 F F2 -(-n)5.348 E F0(belo)5.348 E(w\).)-.25 E(Cdda2w)144 547.2 Q .451 -.2 -(av w)-.1 H .052 -(ill check this setting and issues a error message otherwise.).2 F .052 -(The case of zero sectors is)5.052 F 1.079(nice on lo)144 559.2 R 3.579 -(wl)-.25 G 1.079(oad situations or errorfree \(perfect\) cdrom dri) --3.579 F -.15(ve)-.25 G 3.578(sa).15 G 1.078 -(nd perfect \(not scratched\) audio)-3.578 F(cds.)144 571.2 Q -(Set the transfer size)108 588 Q F1 2.5(\255n sectors)144 600 R F0 -(will set the transfer size to the speci\214ed sectors per request.)2.5 -E(Set number of ring b)108 616.8 Q(uf)-.2 E(fer elements)-.25 E F1 2.5 -(\255l b)144 628.8 R(uffers)-.2 E F0 -(will allocate the speci\214ed number of ring b)2.5 E(uf)-.2 E -(fer elements.)-.25 E(Set endianess of input samples)108 645.6 Q F1 -3.004(\255C endianess)144 657.6 R F0 .504(will o)3.004 F -.15(ve)-.15 G -.504(rride the def).15 F .504(ault settings of the input format.)-.1 F -.504(Endianess can be set e)5.504 F(xplic-)-.15 E(itly to "little" or "\ -big" or to the automatic endianess detection based on v)144 669.6 Q -(oting with "guess".)-.2 E(Set endianess of output samples)108 686.4 Q -F1 3.35(\255E endianess)144 698.4 R F0 .849 -(\(endianess can be "little" or "big"\) will o)3.35 F -.15(ve)-.15 G -.849(rride the def).15 F .849(ault settings of the output)-.1 F(format.) -144 710.4 Q(7)535 768 Q EP +save +mark +7 pagesetup +10 R f +( \( 1 \))3 164( CDDA2WAV)1 3839(User Commands)1 677 3 720 480 t +10 B f +( =)1 0(k kd d=)2 169 2 1080 960 t +10 S1 f +(#)1249 960 w +10 R f +( kernel debug level for the kernel driver called by the)10 2242(Set the)1 286 2 1440 960 t +10 B f +( g)1 0( cg)1 50( sc)1 44( bs)1 39(l li ib)2 112 5 4005 960 t +10 R f +(SCSI OS abstraction layer.)3 1113 1 4287 960 t +(This option is not supported on all platforms.)7 1862 1 1440 1080 t +10 S1 f +(\261 \261)1 65 1 1080 1248 t +10 B f +( s)1 0( nb bu us)3 151( an)1 56( ca)1 50(s sc)1 83 5 1145 1248 t +10 R f +( be used)2 345(Scan all SCSI devices on all SCSI busses and print the inquiry strings. This option may)15 3615 2 1440 1368 t +( as labels)2 384( numbers printed out)3 860( The)1 223(to \256nd SCSI address of the CD/DVD-Recorder on a system.)9 2493 4 1440 1488 t +(are computed by:)2 709 1 1440 1608 t +10 B f +( s)1 0(b bu us)2 151 2 2182 1608 t +10 S f +(* *)1 50 1 2366 1608 t +10 B f +( t)1 0( et)1 33( ge)1 44( rg)1 50( ar)1 44( ta)1 50( t)1 66( +)1 0( +)1 90(1 10 00 0)3 150 10 2449 1608 t +( =)1 0( s=)1 57(t ts)1 72 3 1080 1776 t +10 S1 f +(#)1209 1776 w +10 R f +(Set the maximum transfer size for a single SCSI command to)10 2558 1 1440 1776 t +10 S1 f +(#)4034 1776 w +10 R f +( the)1 159( syntax for)2 449(. The)1 249 3 4084 1776 t +10 B f +( =)1 0( s=)1 57(t ts)1 72 3 4978 1776 t +10 R f +(option)5144 1776 w +(is the same as for cdrecord fs=)6 1267 1 1440 1896 t +10 S1 f +(#)2707 1896 w +10 R f +(or sdd bs=)2 433 1 2790 1896 t +10 S1 f +(#)3223 1896 w +10 R f +(.)3273 1896 w +(If no)1 199 1 1440 2136 t +10 B f +( =)1 0( s=)1 57(t ts)1 72 3 1672 2136 t +10 R f +(option has been speci\256ed,)3 1056 1 1834 2136 t +10 B f +( av v)2 50( wa)1 50( a2 2w)2 122( dd da)2 106(c cd)1 100 5 2923 2136 t +10 R f +( If libscg gets)3 568( MB.)1 214(defaults to a transfer size of 3)6 1234 3 3384 2136 t +( is reduced to the maximum value that is pos-)9 1899(lower values from the operating system, the value)7 2061 2 1440 2256 t +( help to further reduce the transfer)6 1458( it may)2 308( Sometimes,)1 543(sible with the current operating system.)5 1651 4 1440 2376 t +( a long time to \256nd a better value by experiment-)10 2043(size or to enhance it, but note that it may take)10 1917 2 1440 2496 t +(ing with the)2 494 1 1440 2616 t +10 B f +( =)1 0( s=)1 57(t ts)1 72 3 1967 2616 t +10 R f +(option.)2129 2616 w +( the transfer)2 524( If)1 148(Some operating systems return wrong values for the maximum transfer size.)10 3288 3 1440 2856 t +( it may be appropriate to reduce the transfer size to less than 64 kB)14 2779(totally hangs or resets occur,)4 1181 2 1440 2976 t +(or even less than 32 kB.)5 1000 1 1440 3096 t +10 S1 f +(\261 \261)1 65 1 1080 3264 t +10 B f +(V V)1 72 1 1145 3264 t +10 S1 f +(\261 \261)1 65 1 1080 3432 t +10 B f +( e)1 0( se)1 44( os)1 39( bo)1 50( er rb)2 100(v ve)1 94 6 1145 3432 t +10 S1 f +(\261 \261)1 65 1 1472 3432 t +10 B f +( i)1 0( si)1 28( cs)1 39(s sc)1 83 4 1537 3432 t +10 R f +(enable SCSI command logging to the console. This is mainly used for debugging.)12 3367 1 1440 3552 t +10 S1 f +(\261 \261)1 65 1 1080 3720 t +10 B f +(Q Q)1 78 1 1145 3720 t +10 S1 f +(\261 \261)1 65 1 1080 3888 t +10 B f +( t)1 0( nt)1 33( en)1 56( il le)2 72(s si)1 67 5 1145 3888 t +10 S1 f +(\261 \261)1 65 1 1373 3888 t +10 B f +( i)1 0( si)1 28( cs)1 39(s sc)1 83 4 1438 3888 t +10 R f +(suppress SCSI command error reports to the console. This is mainly used for guis.)13 3393 1 1440 4008 t +9 B f +( s)1 0( ns)1 35( on)1 50( io)1 45( ti)1 25( pt)1 30( op)1 50( o)1 75( ce e)2 40( ac)1 40( fa)1 45( er rf)2 70( te)1 40( nt)1 30( In)1 50( I)1 65( S)1 0(O OS)1 120 18 900 4296 t +10 S1 f +(\261 \261)1 65 1 1080 4416 t +10 B f +(A A)1 72 1 1145 4416 t +10 I f +(auxdevice)1250 4416 w +10 S1 f +(\261 \261)1 65 1 1080 4584 t +10 B f +( ce e)2 44( ic)1 44( vi)1 28( ev)1 50( de)1 44( xd)1 56( ux)1 50(a au)1 106 8 1145 4584 t +10 I f +(auxdevice)1600 4584 w +10 R f +(uses)1440 4704 w +10 I f +(auxdevice)1646 4704 w +10 R f +( CDROMMULTISESSION ioctl on Linux)4 1746(as CDROM drive to allow to send the)7 1576 2 2078 4704 t +(although the)1 505 1 1440 4824 t +10 B f +( c)1 0( ic)1 44( er ri)2 72( ne)1 44( en)1 56(g ge)1 94 6 1978 4824 t +10 S f +(_ _)1 50 1 2288 4824 t +10 B f +( i)1 0( si)1 28( cs)1 39(s sc)1 83 4 2338 4824 t +10 R f +(interface is in use.)3 750 1 2521 4824 t +10 S1 f +(\261 \261)1 65 1 1080 4992 t +10 B f +(I I)1 39 1 1145 4992 t +10 I f +(interface)1217 4992 w +10 S1 f +(\261 \261)1 65 1 1080 5160 t +10 B f +( ce e)2 44( ac)1 44( fa)1 50( er rf)2 77( te)1 44( nt)1 33(i in)1 84 7 1145 5160 t +10 I f +(interface)1554 5160 w +10 R f +(speci\256es the)1 499 1 1440 5280 t +10 I f +(interface)1972 5280 w +10 R f +(to use for accessing the CDROM:)5 1391 1 2360 5280 t +10 B f +( c)1 0( ic)1 44( er ri)2 72( ne)1 44( en)1 56(g ge)1 94 6 1440 5568 t +10 S f +(_ _)1 50 1 1750 5568 t +10 B f +( i)1 0( si)1 28( cs)1 39(s sc)1 83 4 1800 5568 t +10 R f +(for sending SCSI commands directly to the drive.)7 2038 1 1800 5688 t +10 B f +( d)1 0( ed)1 56( ke)1 44( oo ok)2 106(c co)1 94 5 1440 5856 t +10 S f +(_ _)1 50 1 1740 5856 t +10 B f +( l)1 0( tl)1 28( ct)1 33( oc)1 44(i io)1 78 5 1790 5856 t +10 R f +(for using the programming interface supplied by the OS kernel.)9 2607 1 1800 5976 t +( and only works on a limited number of)8 1670(The latter is not recommended as it gives lower quality)9 2290 2 1440 6216 t +(platforms.)1440 6336 w +( 7)1 1829( change: Version 3.0)3 850( Last)1 1509(SunOS 5.10)1 492 4 720 7680 t +cleartomark +showpage +restore +%%EndPage: 7 7 %%Page: 8 8 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(CDD)72 48 Q(A2W)-.4 E -1.35(AV)-1.2 G 333.66 -(\(1\) CDD)1.35 F(A2W)-.4 E -1.35(AV)-1.2 G(\(1\))1.35 E -1.11(Ve)108 84 -S(rbose option)1.11 E/F1 10/Times-Bold@0 SF 2.5(\255v itemlist)144 96 R -F0(prints more information. A list allo)2.5 E(ws selection of dif)-.25 E -(ferent information items.)-.25 E F1(disable)144 120 Q F0 -.1(ke)2.5 G -(eps quiet).1 E F1(toc)144 144 Q F0(displays the table of contents)2.5 E -F1(summary)144 168 Q F0(displays a summary of recording parameters)2.5 E -F1(indices)144 192 Q F0(in)2.5 E -.2(vo)-.4 G -.1(ke).2 G 2.5(st).1 G -(he inde)-2.5 E 2.5(xs)-.15 G -(canner and displays start positions of indices)-2.5 E F1(catalog)144 -216 Q F0(retrie)2.5 E -.15(ve)-.25 G 2.5(sa).15 G -(nd displays a media catalog number)-2.5 E F1(trackid)144 240 Q F0 -(retrie)2.5 E -.15(ve)-.25 G 2.5(sa).15 G -(nd displays international standard recording codes)-2.5 E F1(sectors) -144 264 Q F0(displays track start positions in absolute sector notation) -2.5 E 1.6 -.8(To c)144 288 T(ombine se).8 E -.15(ve)-.25 G -(ral requests just list the suboptions seperated with commas.).15 E -(The table of contents)108 304.8 Q 1.365(The display will sho)144 316.8 -R 3.865(wt)-.25 G 1.365(he table of contents with number of tracks and \ -total time \(displayed in)-3.865 F/F2 10/Times-Italic@0 SF(mm)144 328.8 -Q F0(:).32 E F2(ss).34 E F0(.).27 E F2(hh)A F0(format,)3.311 E F2(mm) -3.311 E F0(=minutes,).32 E F2(ss)3.311 E F0(=seconds,).27 E F2(hh)3.311 -E F0 .811(=rounded 1/100 seconds\).).28 F .811(The follo)5.811 F .811 -(wing list dis-)-.25 F .62 -(plays track number and track time for each entry)144 340.8 R 5.62(.T) --.65 G .62(he summary gi)-5.62 F -.15(ve)-.25 G 3.12(sal).15 G .62 -(ine per track describing)-3.12 F(the type of the track.)144 352.8 Q F1 -(track pr)234.88 376.8 Q(eemphasis copypermitted tracktype chans)-.18 E -F0(The)144 400.8 Q F1(track)2.861 E F0 .361 -(column holds the track number)2.861 F(.)-.55 E F1(pr)5.361 E(eemphasis) --.18 E F0(sho)2.861 E .36(ws if that track has been gi)-.25 F -.15(ve) --.25 G 2.86(nan).15 G(on)-2.86 E .495(linear frequenc)144 412.8 R 2.995 -(yr)-.15 G 2.995(esponse. NO)-2.995 F .495(TE: Y)-.4 F .495 -(ou can undo this ef)-1.1 F .496(fect with the)-.25 F F12.996 E F0 -(option.)2.996 E F1(copy-permitted)5.496 E F0 1.292 -(indicates if this track is allo)144 424.8 R 1.291(wed to cop)-.25 F --.65(y.)-.1 G F1(tracktype)6.941 E F0 1.291 -(can be data or audio. On multimedia CDs)3.791 F(\(e)144 436.8 Q .913 -(xcept hidden track CDs\) both of them should be present.)-.15 F F1 -(channels)5.913 E F0 .914(is de\214ned for audio tracks)3.414 F(only)144 -448.8 Q 2.5(.T)-.65 G(here can be tw)-2.5 E 2.5(oo)-.1 G 2.5(rf)-2.5 G -(our channels.)-2.5 E(No \214le output)108 465.6 Q F1144 477.6 Q -F0(this deb)2.5 E(ugging option switches of)-.2 E 2.5(fw)-.25 G -(riting to a \214le.)-2.5 E(No info\214le generation)108 494.4 Q F1 -144 506.4 Q F0(this option switches of)2.5 E 2.5(fc)-.25 G -(reation of an info \214le and a cddb \214le.)-2.5 E -(Generation of simple output for gui frontends)108 523.2 Q F1144 -535.2 Q F0 .731(this option switches on simple line formatting, which i\ -s needed to support gui frontends \(lik)3.232 F(e)-.1 E(xcd-roast\).)144 -547.2 Q -1.11(Ve)108 564 S(rbose SCSI logging)1.11 E F1144 576 Q -F0 .835(this option switches on logging of SCSI commands. This will pro\ -duce a lot of output \(when)3.335 F .599(SCSI de)144 588 R .598 -(vices are being used\).)-.25 F .598(This is needed for deb)5.598 F .598 -(ugging purposes. The format is the same as)-.2 F -(being used with the cdrecord program from J\366r)144 600 Q 2.5(gS)-.18 -G 2.5(chilling. I)-2.5 F(will not describe it here.)2.5 E(Quiet option) -108 616.8 Q F1144 628.8 Q F0(suppresses all screen output e)2.5 E -(xcept error messages.)-.15 E(That reduces cpu time resources.)5 E -(Just sho)108 645.6 Q 2.5(wi)-.25 G(nformation option)-2.5 E F1144 -657.6 Q F0 1.072(does not write a \214le, it only prints information ab\ -out the disc \(depending on the)3.572 F F13.573 E F0(option\).) -3.573 E(This is just for information purposes.)144 669.6 Q/F3 10.95 -/Times-Bold@0 SF(CDDBP support)72 686.4 Q F0(Lookup alb)108 698.4 Q -(um and track titles option)-.2 E F1 4.186(\255L cddbp)144 710.4 R(mode) -4.186 E F0(Cdda2w)4.186 E 2.086 -.2(av t)-.1 H 1.686(ries to retrie).2 F -1.986 -.15(ve p)-.25 H(erformer).15 E 4.186(,a)-.4 G(lb)-4.186 E 1.685 -(um-, and track titles from a cddbp)-.2 F(serv)144 722.4 Q(er)-.15 E -2.836(.T)-.55 G .336(he def)-2.836 F .336(ault serv)-.1 F .336 -(er right no)-.15 F 2.837(wi)-.25 G 2.837(s')-2.837 G(freedb)-2.837 E -(.freedb)-.4 E(.or)-.4 E 2.837(g'. It)-.18 F .337(is planned to ha)2.837 -F .637 -.15(ve m)-.2 H .337(ore control o).15 F -.15(ve)-.15 G(r).15 E -(8)535 768 Q EP +save +mark +8 pagesetup +10 R f +( \( 1 \))3 164( CDDA2WAV)1 3839(User Commands)1 677 3 720 480 t +10 S1 f +(\261 \261)1 65 1 1080 960 t +10 B f +( e)1 0( ve)1 44( iv)1 50( ti)1 28( ct)1 33( ac)1 44( er ra)2 94( te)1 44( nt)1 33(i in)1 84 10 1145 960 t +10 R f +(Go into interactive mode that reads commands from)7 2265 1 1440 1080 t +10 B f +( n)1 0( in)1 56( di)1 28( td)1 56(s st)1 72 5 3756 1080 t +10 R f +(and writes the textual replies to)5 1381 1 4019 1080 t +10 B f +( er rr r)3 88( de)1 44( td)1 56(s st)1 72 4 1440 1200 t +10 R f +( speci\256ed by the)3 682(, or the \256le descriptor that has been)7 1480 2 1700 1200 t +10 B f +( t)1 0( ut)1 33(o ou)1 106 3 3897 1200 t +10 S1 f +(\261 \261)1 65 1 4036 1200 t +10 B f +( d)1 0(f fd)1 89 2 4101 1200 t +10 R f +( mode has been)3 648(option. This)1 527 2 4225 1200 t +(introduced mainly to allow cdrecord to be called by gstreamer plugins.)10 2906 1 1440 1320 t +(If)1440 1560 w +10 B f +( av v)2 50( wa)1 50( a2 2w)2 122( dd da)2 106(c cd)1 100 5 1545 1560 t +10 R f +( with the option)3 676(was called)1 432 2 2012 1560 t +10 S1 f +(\261 \261)1 65 1 3160 1560 t +10 B f +( e)1 0( ve)1 44( iv)1 50( ti)1 28( ct)1 33( ac)1 44( er ra)2 94( te)1 44( nt)1 33(i in)1 84 10 3225 1560 t +10 R f +(, it reads the TOC from the medium and)8 1721 1 3679 1560 t +(then waits for command input as if it has been issued a)11 2299 1 1440 1680 t +10 B f +( p)1 0( op)1 56( to)1 50(s st)1 72 4 3774 1680 t +10 R f +( command is)2 529(command. If the next)3 884 2 3987 1680 t +(a)1440 1800 w +10 B f +( t)1 0( nt)1 33( on)1 56(c co)1 94 4 1531 1800 t +10 R f +(command, then)1 638 1 1761 1800 t +10 B f +( av v)2 50( wa)1 50( a2 2w)2 122( dd da)2 106(c cd)1 100 5 2446 1800 t +10 R f +( the next)2 390( If)1 147( the medium.)2 571(extracts the whole audio part of)5 1371 4 2921 1800 t +(command is a)2 577 1 1440 1920 t +10 B f +( d)1 0( ad)1 56(r re ea)2 138 3 2053 1920 t +10 R f +(command, then)1 627 1 2283 1920 t +10 B f +( av v)2 50( wa)1 50( a2 2w)2 122( dd da)2 106(c cd)1 100 5 2946 1920 t +10 R f +( the position that was indi-)5 1114(starts extracting from)2 876 2 3410 1920 t +(cated by the)2 498 1 1440 2040 t +10 B f +( d)1 0( ad)1 56(r re ea)2 138 3 1971 2040 t +10 R f +(command parameter.)1 850 1 2198 2040 t +10 S f +(_ ___________________________________________________________________)1 3365 1 1737 2060 t +10 R f +( Description)1 1065(Command Parameters)1 1010 2 1787 2180 t +10 S f +(_ ___________________________________________________________________)1 3365 1 1737 2200 t +10 R f +( processing at current position)4 1236(cont continue)1 1831 2 1909 2320 t +( processing)1 460(exit exit)1 1626 2 1920 2440 t +( command help and wait for input)6 1402(help print)1 1676 2 1909 2560 t +( processing)1 460(quit exit)1 1629 2 1917 2680 t +(read sectors)1 721 1 1910 2800 t +10 I f +(sector number)1 582 1 2664 2800 t +10 R f +(read sectors starting from)3 1041 1 3396 2800 t +10 I f +(sector number)1 582 1 4470 2800 t +10 R f +(read tracks)1 682 1 1910 2920 t +10 I f +(track number)1 543 1 2625 2920 t +10 R f +(read sectors starting from)3 1041 1 3396 2920 t +10 I f +(track number)1 543 1 4470 2920 t +10 R f +( processing and wait for new input)6 1429(stop stop)1 1651 2 1912 3040 t +10 S f +( \347)1 -3365(_ ___________________________________________________________________)1 3365 2 1737 3060 t +(\347)1737 2960 w +(\347)1737 2860 w +(\347)1737 2760 w +(\347)1737 2660 w +(\347)1737 2560 w +(\347)1737 2460 w +(\347)1737 2360 w +(\347)1737 2260 w +(\347)1737 2160 w +(\347)2279 3060 w +(\347)2279 2960 w +(\347)2279 2860 w +(\347)2279 2760 w +(\347)2279 2660 w +(\347)2279 2560 w +(\347)2279 2460 w +(\347)2279 2360 w +(\347)2279 2260 w +(\347)2279 2160 w +(\347)3321 3060 w +(\347)3321 2960 w +(\347)3321 2860 w +(\347)3321 2760 w +(\347)3321 2660 w +(\347)3321 2560 w +(\347)3321 2460 w +(\347)3321 2360 w +(\347)3321 2260 w +(\347)3321 2160 w +(\347)5102 3060 w +(\347)5102 2960 w +(\347)5102 2860 w +(\347)5102 2760 w +(\347)5102 2660 w +(\347)5102 2560 w +(\347)5102 2460 w +(\347)5102 2360 w +(\347)5102 2260 w +(\347)5102 2160 w +10 B f +( t)1 0( ut)1 33(o ou)1 106 3 1080 3228 t +10 S1 f +(\261 \261)1 65 1 1219 3228 t +10 B f +( =)1 0( d=)1 57(f fd)1 89 3 1284 3228 t +10 I f +(descriptor)1430 3228 w +10 R f +( to the \256le descriptor named by)6 1465(Redirect informational output)2 1260 2 1440 3348 t +10 B f +( r)1 0( or)1 44( to)1 50( pt)1 33( ip)1 56( cr ri)2 72( sc)1 44( es)1 39(d de)1 100 9 4227 3348 t +10 R f +( parameter)1 460(. The)1 275 2 4665 3348 t +10 B f +( r)1 0( or)1 44( to)1 50( pt)1 33( ip)1 56( cr ri)2 72( sc)1 44( es)1 39(d de)1 100 9 1440 3468 t +10 R f +( default,)1 337( By)1 185(speci\256es a UNIX \256le descriptor number.)5 1669 3 1913 3468 t +10 B f +( av v)2 50( wa)1 50( a2 2w)2 122( dd da)2 106(c cd)1 100 5 4138 3468 t +10 R f +(sends informational)1 800 1 4600 3468 t +(output to)1 373 1 1440 3588 t +10 B f +( er rr r)3 88( de)1 44( td)1 56(s st)1 72 4 1852 3588 t +10 R f +( the informational output to a different \256le descriptor helps gui's)10 2725(. Redirecting)1 563 2 2112 3588 t +(and other programs that call)4 1152 1 1440 3708 t +10 B f +( av v)2 50( wa)1 50( a2 2w)2 122( dd da)2 106(c cd)1 100 5 2625 3708 t +10 R f +(via pipes.)1 391 1 3086 3708 t +10 B f +( o)1 0( io)1 50( ud di)2 84(a au)1 106 4 1080 3876 t +10 S1 f +(\261 \261)1 65 1 1320 3876 t +10 B f +( =)1 0( d=)1 57(f fd)1 89 3 1385 3876 t +10 I f +(descriptor)1531 3876 w +10 R f +( for the audio data \256le is)6 1043(In case that the \256le name)5 1050 2 1440 3996 t +10 S1 f +(")3570 3996 w +10 R f +(-)3611 3996 w +10 S1 f +(")3644 3996 w +10 R f +(, redirect audio output to the \256le descrip-)7 1715 1 3685 3996 t +(tor named by)2 561 1 1440 4116 t +10 B f +( r)1 0( or)1 44( to)1 50( pt)1 33( ip)1 56( cr ri)2 72( sc)1 44( es)1 39(d de)1 100 9 2043 4116 t +10 R f +( parameter)1 440(. The)1 255 2 2481 4116 t +10 B f +( r)1 0( or)1 44( to)1 50( pt)1 33( ip)1 56( cr ri)2 72( sc)1 44( es)1 39(d de)1 100 9 3218 4116 t +10 R f +( descriptor number.)2 811(speci\256es a UNIX \256le)3 891 2 3698 4116 t +(By default,)1 472 1 1440 4236 t +10 B f +( av v)2 50( wa)1 50( a2 2w)2 122( dd da)2 106(c cd)1 100 5 1965 4236 t +10 R f +(sends audio data to)3 847 1 2446 4236 t +10 B f +( t)1 0( ut)1 33( ou)1 56( do)1 50( td)1 56(s st)1 72 6 3346 4236 t +10 R f +( a \256le.)2 305(if the output is not directed into)6 1429 2 3666 4236 t +( that)1 193(Redirecting the audio output to a different \256le descriptor helps gui's and other programs)13 3767 2 1440 4356 t +(call)1440 4476 w +10 B f +( av v)2 50( wa)1 50( a2 2w)2 122( dd da)2 106(c cd)1 100 5 1617 4476 t +10 R f +(via pipes.)1 391 1 2078 4476 t +10 S1 f +(\261 \261)1 65 1 1080 4644 t +10 B f +( k)1 0( rk)1 56( or)1 44( -f fo)2 83( o-)1 33(n no)1 106 6 1145 4644 t +10 R f +(Do not fork for extended buffering. If)6 1618 1 1440 4764 t +10 S1 f +(\261 \261)1 65 1 3102 4764 t +10 B f +( k)1 0( rk)1 56( or)1 44( -f fo)2 83( o-)1 33(n no)1 106 6 3167 4764 t +10 R f +(is used and)2 482 1 3533 4764 t +10 B f +( av v)2 50( wa)1 50( a2 2w)2 122( dd da)2 106(c cd)1 100 5 4059 4764 t +10 R f +(is used to play back)4 868 1 4532 4764 t +(audio CDs in)2 560 1 1440 4884 t +10 B f +( a)1 0( ia)1 50( oi)1 28( no)1 50( an)1 56( ra)1 50( ar)1 44(p pa)1 106 8 2041 4884 t +10 R f +( lack of buffer-)3 645(mode, the playback is not always uninterrupted due to)8 2289 2 2466 4884 t +( the other side, allowing)4 1079(ing. On)1 361 2 1440 5004 t +10 B f +( av v)2 50( wa)1 50( a2 2w)2 122( dd da)2 106(c cd)1 100 5 2934 5004 t +10 R f +(to fork will increase the latency time for the)8 1984 1 3416 5004 t +10 S1 f +(\261 \261)1 65 1 1440 5124 t +10 B f +( e)1 0( ve)1 44( iv)1 50( ti)1 28( ct)1 33( ac)1 44( er ra)2 94( te)1 44( nt)1 33(i in)1 84 10 1505 5124 t +10 R f +(mode.)1992 5124 w +10 S1 f +(\261 \261)1 65 1 1080 5292 t +10 B f +(e e)1 44 1 1145 5292 t +10 S1 f +(\261 \261)1 65 1 1080 5460 t +10 B f +( o)1 0( ho)1 50(e ec ch)2 144 3 1145 5460 t +10 R f +(copies audio data to sound device from the operating system e.g.)10 2665 1 1440 5460 t +10 B f +( p)1 0( sp)1 56( ds)1 39( /d)1 56( v/)1 28( ev)1 50( de)1 44(/ /d)1 84 8 4171 5460 t +10 R f +(.)4528 5460 w +10 B f +( un nd d)3 112( ou)1 56(s so)1 89 3 1080 5628 t +10 S1 f +(\261 \261)1 65 1 1337 5628 t +10 B f +( =)1 0( ce e=)2 101( ic)1 44( vi)1 28( ev)1 50(d de)1 100 6 1402 5628 t +10 I f +(sounddevice)1725 5628 w +10 R f +(set an alternate sound device to use for)7 1605 1 1440 5748 t +10 S1 f +(\261 \261)1 65 1 3078 5748 t +10 B f +(e e)1 44 1 3143 5748 t +10 R f +(.)3187 5748 w +10 S1 f +(\261 \261)1 65 1 1080 5916 t +10 B f +(n n)1 56 1 1145 5916 t +10 I f +(sectors)1234 5916 w +10 S1 f +(\261 \261)1 65 1 1080 6084 t +10 B f +( s)1 0( rs)1 39( or)1 44( to)1 50( ec ct)2 77(s se)1 83 6 1145 6084 t +10 S1 f +(\261 \261)1 65 1 1438 6084 t +10 B f +( er r)2 44(p pe)1 100 2 1503 6084 t +10 S1 f +(\261 \261)1 65 1 1647 6084 t +10 B f +( t)1 0( st)1 33( es)1 39( qu ue)2 100(r re eq)2 144 5 1712 6084 t +10 I f +(sectors)2061 6084 w +10 R f +(reads)1440 6204 w +10 I f +(sectors)1683 6204 w +10 R f +(per request.)1 473 1 1999 6204 t +10 S1 f +(\261 \261)1 65 1 1080 6372 t +10 B f +(l l)1 28 1 1145 6372 t +10 I f +(buffers)1206 6372 w +10 S1 f +(\261 \261)1 65 1 1080 6540 t +10 B f +( s)1 0( er rs)2 83( ff fe)2 77(b bu uf)2 145 4 1145 6540 t +10 S1 f +(\261 \261)1 65 1 1450 6540 t +10 B f +( n)1 0(i in)1 84 2 1515 6540 t +10 S1 f +(\261 \261)1 65 1 1599 6540 t +10 B f +( g)1 0( ng)1 50( in)1 56(r ri)1 72 4 1664 6540 t +10 I f +(buffers)1875 6540 w +10 R f +(uses a ring buffer with)4 930 1 1440 6660 t +10 I f +(buffers)2403 6660 w +10 R f +(total.)2714 6660 w +9 B f +( S)1 0( BL LE ES)3 170( AB)1 60( IA)1 65( VA AR RI)3 165( V)1 95( T)1 0( NT)1 60( EN)1 65( ME)1 60( NM)1 85( ON)1 65( RO)1 70( IR)1 65( NV VI)2 100(E EN)1 125 16 720 6948 t +10 R f +(Some defaults for)2 742 1 1080 7068 t +10 B f +( av v)2 50( wa)1 50( a2 2w)2 122( dd da)2 106(c cd)1 100 5 1863 7068 t +10 R f +( in and depend on the)5 942(are compiled)1 534 2 2332 7068 t +10 B f +( e)1 0( le)1 44( \256l)1 28( e\256)1 56( ke)1 44( ak)1 56(M Ma)1 144 7 3850 7068 t +10 R f +(others on the)2 550 1 4264 7068 t +10 B f +( t)1 0( nt)1 33( en)1 56( me)1 44( nm)1 83( on)1 56( ro)1 50( ir)1 44( vi)1 28( nv)1 50(e en)1 100 11 4856 7068 t +( e)1 0( le)1 44( bl)1 28( ab)1 56( ia)1 50( ri)1 28(v va ar)2 144 7 1080 7188 t +10 R f +(settings.)1463 7188 w +( 8)1 1829( change: Version 3.0)3 850( Last)1 1509(SunOS 5.10)1 492 4 720 7680 t +cleartomark +showpage +restore +%%EndPage: 8 8 %%Page: 9 9 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(CDD)72 48 Q(A2W)-.4 E -1.35(AV)-1.2 G 333.66 -(\(1\) CDD)1.35 F(A2W)-.4 E -1.35(AV)-1.2 G(\(1\))1.35 E(the serv)144 84 -Q(er handling later)-.15 E 5(.T)-.55 G(he parameter de\214nes ho)-5 E -2.5(wm)-.25 G(ultiple entries are handled:)-2.5 E 35.55(0i)108 100.8 S -(nteracti)-35.55 E .3 -.15(ve m)-.25 H -(ode, the user chooses one of the entries.).15 E 35.55(1t)108 117.6 S -(ak)-35.55 E 2.5(et)-.1 G(he \214rst entry without asking.)-2.5 E -(Set serv)108 134.4 Q(er for title lookups)-.15 E/F1 10/Times-Bold@0 SF -(cddbp-ser)144 146.4 Q -.1(ve)-.1 G 5.638(rs).1 G(er)-5.638 E -.1(ve)-.1 -G -.15(rn).1 G(ame).15 E F0 .638(When using \255L or --cddb, the serv) -3.138 F .638(er being contacted can be set with)-.15 F(this option.)144 -158.4 Q(Set portnumber for title lookups)108 175.2 Q F1 3.652 -(cddbp-port portnumber)144 187.2 R F0 1.152 -(When using \255L or --cddb, the serv)3.652 F 1.152 -(er port being contacted can be set)-.15 F(with this option.)144 199.2 Q -/F2 10.95/Times-Bold@0 SF(HINTS ON USA)72 216 Q(GE)-.602 E F0(Don')108 -228 Q 2.83(tc)-.18 G .33 -(reate samples you cannot read. First check your sample player softw) --2.83 F .33(are and sound card hardw)-.1 F .33(are. I)-.1 F -.15(ex)108 -240 S .69(perienced problems with v).15 F .69(ery lo)-.15 F 3.19(ws)-.25 -G .69(ample rates \(stereo <= 1575 Hz, mono <= 3675 Hz\) when trying to) --3.19 F .841(play them with standard W)108 252 R 3.541 -1.35(AV p)-1.2 H -.841(layers for sound blaster \(maybe the)1.35 F 3.34(ya)-.15 G .84 -(re not le)-3.34 F -.05(ga)-.15 G 3.34(li).05 G(n)-3.34 E F1 -1.2(WA) -3.34 G(V)-.25 E F0 .84(format\). Most)3.34 F 1.384 -(CD-Writers insist on audio samples in a bigendian format.)108 264 R(No) -6.384 E 3.884(wc)-.25 G(dda2w)-3.884 E 1.785 -.2(av s)-.1 H 1.385 -(upports the).2 F F1 3.885(\255E endianess)3.885 F F0 -(option to control the endianess of the written samples.)108 276 Q .908 -(If your hardw)108 292.8 R .908(are is f)-.1 F .908 -(ast enough to run cdda2w)-.1 F 1.308 -.2(av u)-.1 H .908 -(ninterrupted and your CD dri).2 F 1.208 -.15(ve i)-.25 H 3.407(so).15 G -.907(ne of the 'perfect')-3.407 F .523(ones, you will g)108 304.8 R .524 -(ain speed when switching all o)-.05 F -.15(ve)-.15 G .524 -(rlap sampling of).15 F 3.024(fw)-.25 G .524(ith the)-3.024 F F1 3.024 -(\255P 0)3.024 F F0 .524(option. Further \214ne tun-)3.024 F .275 -(ing can be done with the)108 316.8 R F1 2.775(\255n sectors)2.775 F F0 -.275(option. Y)2.775 F .275(ou can specify ho)-1.1 F 2.775(wm)-.25 G -.274(uch sectors should be requested in one)-2.775 F(go.)108 328.8 Q -(Cdda2w)108 345.6 Q .4 -.2(av s)-.1 H(upports).2 E F1(pipes)2.5 E F0(no) -2.5 E 1.3 -.65(w. U)-.25 H(se a \214lename of).65 E F12.5 E F0 -(to let cdda2w)2.5 E .4 -.2(av o)-.1 H -(utput its samples to standard output.).2 E(Con)108 362.4 Q -.15(ve)-.4 -G .392(rsion to other sound formats can be done using the).15 F F1(sox) -2.892 E F0 .392(program package \(although the use of)2.892 F F1 .393 -(sox -x)2.893 F F0 .204(to change the byte order of samples should be n\ -o more necessary; see option)108 374.4 R F12.703 E F0 .203 -(to change the output byte-)2.703 F(order\).)108 386.4 Q .411(If you w) -108 403.2 R .411(ant to sample more than one track into dif)-.1 F .412 -(ferent \214les in one run, this is currently possible with the)-.25 F -F1108 415.2 Q F0(option. When recording time e)2.5 E -(xceeds the track limit a ne)-.15 E 2.5<778c>-.25 G -(le will be opened for the ne)-2.5 E(xt track.)-.15 E F2(FILES)72 432 Q -F0(Cdda2w)108 444 Q .4 -.2(av c)-.1 H -(an generate a lot of \214les for v).2 E(arious purposes.)-.25 E -(Audio \214les:)108 468 Q .433 -(There are audio \214les containing samples with def)108 492 R .433 -(ault e)-.1 F .432 -(xtensions These \214les are not generated when option)-.15 F .721 -(\(-N\) is gi)108 504 R -.15(ve)-.25 G .721 -(n. Multiple \214les may be written when the b).15 F .721(ulk cop)-.2 F -3.221(yo)-.1 G .721(ption \(-B\) is used. Indi)-3.221 F .722 -(vidual \214le names)-.25 F .146(can be gi)108 516 R -.15(ve)-.25 G -2.646(na).15 G 2.646(sa)-2.646 G -.18(rg)-2.646 G .146 -(uments. If the number of \214le names gi).18 F -.15(ve)-.25 G 2.646(ni) -.15 G 2.646(ss)-2.646 G(uf)-2.646 E .146(\214cient to co)-.25 F -.15(ve) --.15 G 2.645(ra).15 G .145(ll included audio tracks,)-2.645 F .643 -(the \214le names will be used v)108 528 R 3.143(erbatim. Otherwise,) --.15 F .643 -(if there are less \214le names than \214les needed to write the)3.143 F -.762(included tracks, the part of the \214le name before the e)108 540 R -.762(xtension is e)-.15 F .761(xtended with '_dd' where dd represents) --.15 F(the current track number)108 552 Q(.)-.55 E(Cddb and Cdinde)108 -576 Q 2.5<788c>-.15 G(les:)-2.5 E 1.269(If cdda2w)108 600 R 1.669 -.2 -(av d)-.1 H 1.269(etects cd-e).2 F 1.269(xtra or cd-te)-.15 F 1.269 -(xt \(alb)-.15 F 1.269 -(um/track\) title information, then .cddb and .cdinde)-.2 F 3.77<788c> --.15 G 1.27(les are)-3.77 F 1.249 -(generated unless suppressed by the option -H. The)108 612 R 3.749(yc) --.15 G 1.248(ontain suitable formatted entries for submission to)-3.749 -F 1.249(audio cd track title databases in the internet. The CDINDEX and\ - CDDB\(tm\) systems are currently sup-)108 624 R(ported. F)108 636 Q -(or more information please visit www)-.15 E(.musicbrainz.or)-.65 E 2.5 -(ga)-.18 G(nd www)-2.5 E(.freedb)-.65 E(.com.)-.4 E(Inf \214les:)108 660 -Q .738(The inf \214les are describing the sample \214les and the part f\ -rom the audio cd, it w)108 684 R .737(as tak)-.1 F .737(en from. The)-.1 -F 3.237(ya)-.15 G .737(re a)-3.237 F .5 -(means to transfer information to a cd b)108 696 R .501 -(urning program lik)-.2 F 3.001(ec)-.1 G .501(drecord. F)-3.001 F .501 -(or e)-.15 F .501(xample, if the original audio cd)-.15 F .384 -(had pre-emphasis enabled, and cdda2w)108 708 R .784 -.2(av -)-.1 H -2.884(Td).2 G .384(id remo)-2.884 F .684 -.15(ve t)-.15 H .384 -(he pre-emphasis, then the inf \214le has pre-empha-).15 F 1.652 -(sis not set \(since the audio \214le does not ha)108 720 R 1.953 -.15 -(ve i)-.2 H 4.153(ta).15 G -.15(ny)-4.153 G 1.653 -(more\), while the .cddb and the .cdinde).15 F 4.153(xh)-.15 G -2.25 -.2 -(av e)-4.153 H(pre-)4.353 E(9)535 768 Q EP +save +mark +9 pagesetup +10 R f +( \( 1 \))3 164( CDDA2WAV)1 3839(User Commands)1 677 3 720 480 t +10 B f +(C CD DD DA A)4 288 1 1080 960 t +10 S f +(_ _)1 50 1 1368 960 t +10 B f +( E)1 0( CE)1 67( IC)1 72( VI)1 39( EV)1 72(D DE)1 139 6 1418 960 t +10 R f +(is used to set the device name. The device naming is compatible with)12 2862 1 1440 1080 t +10 B f +( d)1 0( rd)1 56( or)1 44( re ec co)3 138( dr)1 44(c cd)1 100 6 4335 1080 t +10 R f +(\(1\).)4717 1080 w +10 B f +( P)1 0( BP)1 61(C CD DD DB)3 283 3 1080 1248 t +10 S f +(_ _)1 50 1 1424 1248 t +10 B f +( R)1 0( ER)1 72( RV VE)2 139( ER)1 72(S SE)1 123 5 1474 1248 t +10 R f +(is used for cddbp title lookups when supplied.)7 1894 1 1440 1368 t +10 B f +( P)1 0( BP)1 61(C CD DD DB)3 283 3 1080 1536 t +10 S f +(_ _)1 50 1 1424 1536 t +10 B f +( T)1 0( RT)1 67( OR)1 72(P PO)1 139 4 1474 1536 t +10 R f +(is used for cddbp title lookups when supplied.)7 1894 1 1440 1656 t +10 B f +( H)1 0( SH)1 78(R RS)1 128 3 1080 1824 t +10 R f +(If the)1 240 1 1440 1824 t +10 B f +( H)1 0( SH)1 78(R RS)1 128 3 1732 1824 t +10 R f +( the remote connection will not be created via)8 2048(environment variable is present,)3 1362 2 1990 1824 t +10 B f +( d)1 0( md)1 56(r rc cm)2 171 3 1440 1944 t +10 R f +( by)1 135(\(3\) but by calling the program pointed to)7 1706 2 1667 1944 t +10 B f +( H)1 0( SH)1 78(R RS)1 128 3 3543 1944 t +10 R f +( e.g.)1 179(. Use)1 248 2 3749 1944 t +10 B f +( =)1 0( H=)1 57( SH)1 78(R RS)1 128 4 4211 1944 t +10 R f +(/usr/bin/ssh to create a)3 926 1 4474 1944 t +(secure shell connection.)2 972 1 1440 2064 t +(Note that this forces)3 837 1 1440 2304 t +10 B f +( av v)2 50( wa)1 50( a2 2w)2 122( dd da)2 106(c cd)1 100 5 2312 2304 t +10 R f +(to create a pipe to the)5 906 1 2775 2304 t +10 B f +( \))1 0( 1\))1 33( \(1)1 50( h\()1 33( sh)1 56(r rs)1 83 6 3716 2304 t +10 R f +(program and disallows)2 930 1 4006 2304 t +10 B f +( av v)2 50( wa)1 50( a2 2w)2 122( dd da)2 106(c cd)1 100 5 4972 2304 t +10 R f +( makes it impossible to set up)6 1268( This)1 250( to the remote server.)4 901(to directly access the network socket)5 1541 4 1440 2424 t +( and slows down the connection compared to a)8 2005(performance parameters)1 981 2 1440 2544 t +10 B f +( t)1 0( oo ot)2 83(r ro)1 94 3 4468 2544 t +10 R f +(initiated)4687 2544 w +10 B f +( \))1 0( 3\))1 33( \(3)1 50( d\()1 33( md)1 56(r rc cm)2 171 6 5057 2544 t +10 R f +(connection.)1440 2664 w +10 B f +( I)1 0( SI)1 39( CS)1 56( SC)1 72(R RS)1 128 5 1080 2832 t +10 R f +(If the)1 226 1 1440 2832 t +10 B f +( I)1 0( SI)1 39( CS)1 56( SC)1 72(R RS)1 128 5 1704 2832 t +10 R f +( the remote SCSI server will not be the program)9 2043(environment variable is present,)3 1320 2 2037 2832 t +10 B f +( i)1 0( si)1 28( cs)1 39( sc)1 44( rs)1 39( /r)1 44( n/)1 28( in)1 56( bi)1 28( sb)1 56( /s)1 39( y/)1 28( il ly)2 78( hi)1 28( ch)1 56( sc)1 44( /s)1 39( t/)1 28( pt)1 33( op)1 56(/ /o)1 78 21 1440 2952 t +10 R f +(but the program pointed to by)5 1251 1 2346 2952 t +10 B f +( I)1 0( SI)1 39( CS)1 56( SC)1 72(R RS)1 128 5 3633 2952 t +10 R f +( that the remote SCSI server)5 1184(. Note)1 288 2 3928 2952 t +(program name will be ignored if you log in using an account that has been created with a)17 3960 1 1440 3072 t +(remote SCSI server program as login shell.)6 1771 1 1440 3192 t +9 B f +( S)1 0( US)1 50( TU)1 65( AT)1 60( TA)1 65( ST)1 60( S)1 80( T)1 0( IT)1 60( XI)1 35(E EX)1 125 11 720 3360 t +10 B f +( av v)2 50( wa)1 50( a2 2w)2 122( dd da)2 106(c cd)1 100 5 1080 3480 t +10 R f +(uses the following exit codes to indicate various degress of success:)10 2787 1 1541 3480 t +10 S f +(_ ___________________________________________________________________)1 3388 1 1546 3500 t +10 R f +(Exitcode Description)1 971 1 1596 3620 t +10 S f +(_ ___________________________________________________________________)1 3388 1 1546 3640 t +10 R f +( errors encountered, successful operation.)4 1688(0 no)1 300 2 1901 3760 t +( or syntax error. cdda2wav got inconsistent arguments.)7 2244(1 usage)1 427 2 1901 3880 t +( \(un\)set errors. permission changes failed.)5 1711(2 permission)1 639 2 1901 4000 t +( errors on the cdrom/burner device encountered.)6 1967(3 read)1 371 2 1901 4120 t +( errors while writing one of the output \256les encountered.)9 2324(4 write)1 405 2 1901 4240 t +( with soundcard handling \(initialization/write\).)4 1900(5 errors)1 432 2 1901 4360 t +( with stat\(\) system call on the read device \(cooked ioctl\).)10 2345(6 errors)1 432 2 1901 4480 t +( communication errors encountered \(in forked mode\).)6 2190(7 pipe)1 372 2 1901 4600 t +( handler installation errors encountered.)4 1620(8 signal)1 439 2 1901 4720 t +( of shared memory failed \(in forked mode\).)7 1785(9 allocation)1 594 2 1901 4840 t +( heap memory allocation failed.)4 1299(10 dynamic)1 594 2 1851 4960 t +( on the audio cd medium encountered.)6 1576(11 errors)1 482 2 1851 5080 t +( open error in ioctl handling detected.)6 1548(12 device)1 510 2 1851 5200 t +( condition in ioctl interface handling detected.)6 1887(13 race)1 415 2 1851 5320 t +( in ioctl\(\) operation encountered.)4 1343(14 error)1 443 2 1851 5440 t +( error encountered. Please report back!!!)5 1650(15 internal)1 555 2 1851 5560 t +( in semaphore operation encountered \(install / request\).)7 2257(16 error)1 443 2 1851 5680 t +( not get the scsi transfer buffer.)6 1292(17 could)1 472 2 1851 5800 t +( not create pipes for process communication \(in forked mode\).)9 2561(18 could)1 472 2 1851 5920 t +10 S f +( \347)1 -3388(_ ___________________________________________________________________)1 3388 2 1546 5940 t +(\347)1546 5900 w +(\347)1546 5800 w +(\347)1546 5700 w +(\347)1546 5600 w +(\347)1546 5500 w +(\347)1546 5400 w +(\347)1546 5300 w +(\347)1546 5200 w +(\347)1546 5100 w +(\347)1546 5000 w +(\347)1546 4900 w +(\347)1546 4800 w +(\347)1546 4700 w +(\347)1546 4600 w +(\347)1546 4500 w +(\347)1546 4400 w +(\347)1546 4300 w +(\347)1546 4200 w +(\347)1546 4100 w +(\347)1546 4000 w +(\347)1546 3900 w +(\347)1546 3800 w +(\347)1546 3700 w +(\347)1546 3600 w +(\347)2026 5940 w +(\347)2026 5900 w +(\347)2026 5800 w +(\347)2026 5700 w +(\347)2026 5600 w +(\347)2026 5500 w +(\347)2026 5400 w +(\347)2026 5300 w +(\347)2026 5200 w +(\347)2026 5100 w +(\347)2026 5000 w +(\347)2026 4900 w +(\347)2026 4800 w +(\347)2026 4700 w +(\347)2026 4600 w +(\347)2026 4500 w +(\347)2026 4400 w +(\347)2026 4300 w +(\347)2026 4200 w +(\347)2026 4100 w +(\347)2026 4000 w +(\347)2026 3900 w +(\347)2026 3800 w +(\347)2026 3700 w +(\347)2026 3600 w +(\347)4934 5940 w +(\347)4934 5900 w +(\347)4934 5800 w +(\347)4934 5700 w +(\347)4934 5600 w +(\347)4934 5500 w +(\347)4934 5400 w +(\347)4934 5300 w +(\347)4934 5200 w +(\347)4934 5100 w +(\347)4934 5000 w +(\347)4934 4900 w +(\347)4934 4800 w +(\347)4934 4700 w +(\347)4934 4600 w +(\347)4934 4500 w +(\347)4934 4400 w +(\347)4934 4300 w +(\347)4934 4200 w +(\347)4934 4100 w +(\347)4934 4000 w +(\347)4934 3900 w +(\347)4934 3800 w +(\347)4934 3700 w +(\347)4934 3600 w +9 B f +( N)1 0( ON)1 65( IO)1 70( SS SI)2 85( CU US)2 115( SC)1 65( IS)1 50(D DI)1 100 8 720 6108 t +10 B f +( av v)2 50( wa)1 50( a2 2w)2 122( dd da)2 106(c cd)1 100 5 1080 6228 t +10 R f +(is able to read parts of an)6 1177 1 1562 6228 t +10 B f +( o)1 0( io)1 50( ud di)2 84(a au)1 106 4 2793 6228 t +10 R f +(CD or)1 277 1 3088 6228 t +10 B f +( a)1 0( ia)1 50( di)1 28( ed)1 56( me)1 44( im)1 83( ti)1 28( lt)1 33( ul)1 28(m mu)1 139 10 3420 6228 t +10 R f +(CDROM \(containing audio parts\))3 1436 1 3964 6228 t +(directly digitally. These parts can be written to a \256le, a pipe, or to a sound device.)16 3384 1 1080 6348 t +10 B f +( av v)2 50( wa)1 50( a2 2w)2 122( dd da)2 106(c cd)1 100 5 1080 6516 t +10 R f +(stands for)1 400 1 1542 6516 t +10 B f +(C CD DD DA A)4 288 1 1976 6516 t +10 R f +(to)2298 6516 w +10 B f +( AV V)2 72(W WA)1 172 2 2410 6516 t +10 R f +(\(where)2688 6516 w +10 B f +(C CD DD DA A)4 288 1 2999 6516 t +10 R f +(stands for compact disc digital audio and)6 1697 1 3322 6516 t +10 B f +( AV V)2 72(W WA)1 172 2 5054 6516 t +10 R f +(is)5333 6516 w +( allows copying)2 677( It)1 141( sample format introduced by MS Windows\).)6 1944(a sound)1 331 4 1080 6636 t +10 B f +(C CD DD DA A)4 288 1 4220 6636 t +10 R f +(audio data from the)3 845 1 4555 6636 t +(CDROM drive into a \256le in)5 1143 1 1080 6756 t +10 B f +( AV V)2 72(W WA)1 172 2 2256 6756 t +10 R f +(or other formats.)2 684 1 2533 6756 t +(Some versions of)2 746 1 1080 6924 t +10 B f +( av v)2 50( wa)1 50( a2 2w)2 122( dd da)2 106(c cd)1 100 5 1877 6924 t +10 R f +( to get higher real-time scheduling priorities to ensure smooth)9 2710(may try)1 334 2 2356 6924 t +( priorities are available for super users and are higher than those of 'nor-)13 3006(\(uninterrupted\) operation. These)2 1314 2 1080 7044 t +(mal' processes. Thus delays are minimized.)5 1784 1 1080 7164 t +( 9)1 1829( change: Version 3.0)3 850( Last)1 1509(SunOS 5.10)1 492 4 720 7680 t +cleartomark +showpage +restore +%%EndPage: 9 9 %%Page: 10 10 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(CDD)72 48 Q(A2W)-.4 E -1.35(AV)-1.2 G 333.66 -(\(1\) CDD)1.35 F(A2W)-.4 E -1.35(AV)-1.2 G(\(1\))1.35 E -(emphasis set as the original does.)108 84 Q/F1 10.95/Times-Bold@0 SF --1.314(WA)72 100.8 S(RNING)1.314 E/F2 10/Times-Bold@0 SF(IMPOR)108 112.8 -Q -.9(TA)-.4 G(NT).9 E(:)-.74 E F0 1.039 -(it is prohibited to sell copies of cop)3.54 F 1.039 -(yrighted material by noncop)-.1 F 1.039(yright holders. This pro-)-.1 F -1.226(gram may not be used to circumv)108 124.8 R 1.226(ent cop)-.15 F -3.726(yrights. The)-.1 F 1.226(user ackno)3.726 F 1.226 -(wledges this constraint when using the)-.25 F(softw)108 136.8 Q(are.) --.1 E F1 -.11(BU)72 153.6 S(GS).11 E F0 -(Generation of md5 checksums is currently brok)108 165.6 Q(en.)-.1 E -(Performance may not be optimal on slo)108 189.6 Q(wer systems.)-.25 E -(The inde)108 213.6 Q 2.5(xs)-.15 G(canner may gi)-2.5 E .3 -.15(ve t) --.25 H(imeouts.).15 E(The resampling \(rate con)108 237.6 Q -.15(ve)-.4 -G(rsion code\) uses polynomial interpolation, which is not optimal.).15 -E(Cdda2w)108 261.6 Q .4 -.2(av s)-.1 H(hould use threads.).2 E(Cdda2w) -108 285.6 Q .4 -.2(av c)-.1 H -(urrently cannot sample hidden audio tracks \(track 1 inde).2 E 2.5(x0) --.15 G(\).)-2.5 E F1 -.602(AC)72 302.4 S(KNO).602 E(WLEDGEMENTS)-.548 E -F0 1.896(Thanks goto Project MODE \(http://www)108 314.4 R 1.896 -(.mode.net/\) and Fraunhofer Institut f\374r inte)-.65 F 1.896 -(grierte Schaltungen)-.15 F .879(\(FhG-IIS\) \(http://www)108 326.4 R -.879(.iis.fhg.de/\) for \214nancial support.)-.65 F(Ple)5.879 E .879 -(xtor Europe and Ricoh Japan pro)-.15 F .88(vided cdrom)-.15 F .883 -(disk dri)108 338.4 R -.15(ve)-.25 G 3.383(sa).15 G .882(nd cd b)-3.383 -F .882(urners which helped a lot to de)-.2 F -.15(ve)-.25 G .882 -(lop this softw).15 F 3.382(are. Rammi)-.1 F .882 -(has helped a lot with the)3.382 F(deb)108 350.4 Q .319(ugging and sho) --.2 F .32(wed a lot of stamina when hearing 100 times the \214rst 16 se\ -conds of the \214rst track of the)-.25 F(Krupps CD.)108 362.4 Q -(Libparanoia contrib)5 E -(uted by Monty \(Christopher Montgomery\) xiphmont@mit.edu.)-.2 E F1 --.548(AU)72 379.2 S(THOR).548 E F0(Heik)108 391.2 Q 2.5(oE)-.1 G -(issfeldt heik)-2.5 E(o@colossus.escape.de)-.1 E F1 -.383(DA)72 408 S -(TE)-.657 E F0(11 Sep 2002)108 420 Q(10)530 768 Q EP +save +mark +10 pagesetup +10 R f +( \( 1 \))3 164( CDDA2WAV)1 3839(User Commands)1 677 3 720 480 t +( simply invoke)2 629(If you only have one CDROM and it is loaded with an audio CD, you may)15 3221 2 1080 960 t +10 B f +( av v)2 50( wa)1 50( a2 2w)2 122( dd da)2 106(c cd)1 100 5 4972 960 t +10 R f +(and it will create the sound \256le)6 1298 1 1080 1080 t +10 B f +( av v)2 50( wa)1 50( .w)1 72( o.)1 25( io)1 50( ud di)2 84(a au)1 106 7 2414 1080 t +10 R f +( whole track beginning with track 1 in stereo at)9 1973(recording the)1 540 2 2887 1080 t +( recording time)2 648( Otherwise)1 487( system has enough space free.)5 1325(16 bit at 44100 Hz sample rate, if your \256le)9 1860 4 1080 1200 t +(will be limited. For details see \256les)6 1451 1 1080 1320 t +10 B f +( E)1 0( ME)1 67( AD DM)2 166( EA)1 72(R RE)1 139 5 2564 1320 t +10 R f +(and)3041 1320 w +10 B f +( LL L)2 67( AL)1 67( TA)1 72( ST)1 67( NS)1 56( IN)1 72( .I)1 39( E.)1 25( ME)1 67( AD DM)2 166( EA)1 72(R RE)1 139 12 3218 1320 t +10 R f +(.)4127 1320 w +(If you have more then one CD-ROM type drive in the system, you need to specify the)16 3559 1 1080 1488 t +10 B f +( =)1 0( v=)1 57( ev)1 50(d de)1 100 4 4672 1488 t +10 R f +(option.)4912 1488 w +9 B f +( S)1 0( NS)1 50( ON)1 65( IO)1 70( TI)1 35( PT)1 60( OP)1 55( O)1 100( N)1 0( ON)1 65( O)1 100( S)1 0( TS)1 50( NT)1 60( IN)1 65(H HI)1 105 16 720 1656 t +10 R f +( most of them)3 592(Most of the options are used to control the format of the WAV \256le. In the following text)17 3728 2 1080 1776 t +(are discussed in a more verbose way.)6 1530 1 1080 1896 t +9 B f +( ce e)2 40( ic)1 40( vi)1 25( ev)1 45( De)1 40( D)1 95( t)1 0( ec ct)2 70( le)1 40( el)1 25(S Se)1 90 11 900 2064 t +10 B f +( =)1 0( v=)1 57( ev)1 50(d de)1 100 4 1080 2184 t +10 I f +(device)1287 2184 w +10 R f +( the)1 163( speci\256er given should correspond to)5 1548( The)1 228(selects the CDROM drive device to be used.)7 1880 4 1581 2184 t +( the)1 161( For)1 211(selected interface \(see below\).)3 1248 3 1080 2304 t +10 B f +( d)1 0( ed)1 56( ke)1 44( oo ok)2 106(c co)1 94 5 2739 2304 t +10 S f +(_ _)1 50 1 3039 2304 t +10 B f +( l)1 0( tl)1 28( ct)1 33( oc)1 44(i io)1 78 5 3089 2304 t +10 R f +( the cdrom device descriptor.)4 1213(interface this is)2 638 2 3311 2304 t +10 B f +( e)1 0( he)1 44(T Th)1 123 3 5233 2304 t +( v)1 0( ev)1 50( we)1 44( ow)1 72( ho)1 50( h)1 102( ce e)2 44( ac)1 44( fa)1 50( er rf)2 77( te)1 44( nt)1 33( in)1 56( i)1 74( I)1 0( SI)1 39( CS)1 56( SC)1 72( S)1 102( c)1 0( ic)1 44( er ri)2 72( ne)1 44( en)1 56( ge)1 44( g)1 96( e)1 0( he)1 44( th)1 56( t)1 79( h)1 0( th)1 56( it)1 33( wi)1 28( w)1 118( d)1 0( ed)1 56( se)1 44( us)1 39( u)1 102( s)1 0( ce es)2 83( ic)1 44( vi)1 28( ev)1 50( de)1 44( d)1 102( I)1 0( SI)1 39( CS)1 56(S SC)1 128 51 1080 2424 t +( ,)1 0( s,)1 25( us)1 39( Bu)1 56( -B)1 67( I-)1 33( SI)1 39( CS)1 56( SC)1 72( S)1 103( r)1 0( ir)1 44( ei)1 28( he)1 44( th)1 56( t)1 80( h)1 0( th)1 56( it)1 33( wi)1 28( w)1 119( d)1 0( ed)1 56( ss se)2 83( re es)2 83( dd dr)2 100( ad)1 56( a)1 97( re e)2 44( ar)1 44( a)1 97(e er r)2 88 32 3674 2424 t +( i)1 0( vi)1 28( ev)1 50( de)1 44( d)1 105( I)1 0( SI)1 39( CS)1 56( SC)1 72( S)1 105( c)1 0( ic)1 44( er ri)2 72( ne)1 44( en)1 56( ge)1 44( g)1 99( e)1 0( he)1 44( th)1 56( t)1 82( f)1 0( of)1 33( o)1 99( d)1 0( ad)1 56( ea)1 50( te)1 44( st)1 33( ns)1 39( in)1 56( i)1 77( un n)2 56( Lu)1 56( -L)1 67( I-)1 33( SI)1 39( CS)1 56( SC)1 72( S)1 105( nd d)2 56( an)1 56( a)1 100( ,)1 0( d,)1 25( Id)1 56( -I)1 39( I-)1 33( SI)1 39( CS)1 56(S SC)1 128 51 1080 2544 t +( .)1 0( r.)1 25( or)1 44( to)1 50( pt)1 33( ip)1 56( cr ri)2 72( sc)1 44( es)1 39( de)1 44( d)1 105(c ce e)2 88 12 3679 2544 t +10 R f +(One example for a SCSI)4 1072 1 4328 2544 t +(CDROM drive on bus 0 with SCSI ID 3 and lun 0 is)12 2191 1 1080 2664 t +10 B f +( 0)1 0( ,0)1 50( 3,)1 25( ,3)1 50( 0,)1 25( =0)1 50( v=)1 57( ev)1 50(d de)1 100 9 3304 2664 t +10 R f +(.)3711 2664 w +9 B f +( ce e)2 40( ic)1 40( vi)1 25( ev)1 45( de)1 40( d)1 80( y)1 0( ry)1 45( ar)1 40( il li ia)3 95( xi)1 25( ux)1 45( Au)1 50( A)1 95( t)1 0( ec ct)2 70( le)1 40( el)1 25(S Se)1 90 19 900 2832 t +10 S1 f +(\261 \261)1 65 1 1080 2952 t +10 B f +(A A)1 72 1 1145 2952 t +10 I f +(auxdevice)1263 2952 w +10 R f +(may be needed in some rare cases for CD-Extra handling.)9 2494 1 1707 2952 t +10 B f +( av v)2 50( wa)1 50( a2 2w)2 122( dd da)2 106(C Cd)1 128 5 4281 2952 t +10 R f +(usually has no)2 616 1 4784 2952 t +( Non-SCSI-)1 488( For)1 210( multi-session information for CD-Extra using raw SCSI commands.)8 2850(problem to get the)3 772 4 1080 3072 t +(CDROM drives this is the same device as given by)9 2112 1 1080 3192 t +10 B f +( =)1 0( v=)1 57( ev)1 50(d de)1 100 4 3225 3192 t +10 R f +(\(see above\). For SCSI-CDROM drives it is the)7 1934 1 3466 3192 t +(CDROM drive \(SCSI\) device \(i.e.)4 1437 1 1080 3312 t +10 B f +( 0)1 0( r0)1 50( sr)1 44( /s)1 39( v/)1 28( ev)1 50( de)1 44(/ /d)1 84 8 2560 3312 t +10 R f +( the SCSI device \(i.e.)4 917(\) corresponding to)2 768 2 2942 3312 t +10 B f +( 0)1 0( ,0)1 50( 3,)1 25( ,3)1 50(0 0,)1 75 5 4702 3312 t +10 R f +(\). It has to)3 456 1 4944 3312 t +(match the device used for sampling.)5 1482 1 1080 3432 t +9 B f +( ce e)2 40( ac)1 40( fa)1 45( er rf)2 70( te)1 40( nt)1 30( In)1 50( I)1 65( t)1 0( ec ct)2 70( le)1 40( el)1 25(S Se)1 90 13 900 3600 t +10 S1 f +(\261 \261)1 65 1 1080 3720 t +10 B f +(I I)1 39 1 1145 3720 t +10 I f +(interface)1243 3720 w +10 R f +( method is typically)3 897(selects the CDROM drive communication method. This interface)7 2846 2 1657 3720 t +( SCSI drives)2 538( For)1 213(automatically selected from the device name.)5 1887 3 1080 3840 t +10 B f +( c)1 0( ic)1 44( er ri)2 72( ne)1 44( en)1 56(g ge)1 94 6 3759 3840 t +10 S f +(_ _)1 50 1 4069 3840 t +10 B f +( i)1 0( si)1 28( cs)1 39(s sc)1 83 4 4119 3840 t +10 R f +(is used \(cooked)2 651 1 4309 3840 t +10 S f +(_)4960 3840 w +10 R f +(ioctl may)1 390 1 5010 3840 t +( names are)2 468( Valid)1 300(not be available for all devices\).)5 1380 3 1080 3960 t +10 B f +( c)1 0( ic)1 44( er ri)2 72( ne)1 44( en)1 56(g ge)1 94 6 3274 3960 t +10 S f +(_ _)1 50 1 3584 3960 t +10 B f +( i)1 0( si)1 28( cs)1 39(s sc)1 83 4 3634 3960 t +10 R f +(and)3830 3960 w +10 B f +( d)1 0( ed)1 56( ke)1 44( oo ok)2 106(c co)1 94 5 4020 3960 t +10 S f +(_ _)1 50 1 4320 3960 t +10 B f +( l)1 0( tl)1 28( ct)1 33( oc)1 44(i io)1 78 5 4370 3960 t +10 R f +( \256rst uses the)3 588(. The)1 259 2 4553 3960 t +( variant works only)3 837(generic SCSI interface, the latter uses the ioctl of the CDROM driver. The latter)13 3483 2 1080 4080 t +(when the kernel driver supports)4 1332 1 1080 4200 t +10 B f +(C CD DD DA A)4 288 1 2454 4200 t +10 R f +( to match the selected CDROM device)6 1650(reading. This entry has)3 966 2 2784 4200 t +(\(see above\).)1 489 1 1080 4320 t +9 B f +( d)1 0( rd)1 50( ar)1 40( ca)1 45( un nd dc)3 140( ou)1 50( so)1 45( s)1 65( o)1 0( to)1 45( t)1 60( o)1 0( ho)1 45( ec ch)2 90( e)1 70( e)1 0( le)1 40( bl)1 25( ab)1 50( na)1 45(E En)1 110 21 900 4488 t +10 S1 f +(\261 \261)1 65 1 1080 4608 t +10 B f +(e e)1 44 1 1145 4608 t +10 R f +( the sound card while recording, so you hear it nearly simultaneously. The)12 3286(copies audio data to)3 874 2 1240 4608 t +( is recorded. This is time critical, so it works best with the)12 2447(soundcard gets the same data that)5 1399 2 1080 4728 t +10 S1 f +(\261 \261)1 65 1 4962 4728 t +10 B f +(q q)1 56 1 5027 4728 t +10 R f +(option.)5119 4728 w +(To use)1 277 1 1080 4848 t +10 B f +( av v)2 50( wa)1 50( a2 2w)2 122( dd da)2 106(c cd)1 100 5 1390 4848 t +10 R f +(as a pseudo CD player without recording in a \256le you could use)12 2637 1 1851 4848 t +10 B f +( av v)2 50( wa)1 50( a2 2w)2 122( dd da)2 106(c cd)1 100 5 1080 5016 t +10 S1 f +(\261 \261)1 65 1 1541 5016 t +10 B f +(q q)1 56 1 1606 5016 t +10 S1 f +(\261 \261)1 65 1 1695 5016 t +10 B f +(e e)1 44 1 1760 5016 t +10 S1 f +(\261 \261)1 65 1 1837 5016 t +10 B f +( 2)1 0(t t2)1 83 2 1902 5016 t +10 S1 f +(\261 \261)1 65 1 2018 5016 t +10 B f +( 0)1 0(d d0)1 106 2 2083 5016 t +10 S1 f +(\261 \261)1 65 1 2222 5016 t +10 B f +(N N)1 72 1 2287 5016 t +10 R f +(to play the whole second track or)6 1373 1 1080 5184 t +10 B f +( av v)2 50( wa)1 50( a2 2w)2 122( dd da)2 106(c cd)1 100 5 1080 5352 t +10 S1 f +(\261 \261)1 65 1 1541 5352 t +10 B f +(q q)1 56 1 1606 5352 t +10 S1 f +(\261 \261)1 65 1 1695 5352 t +10 B f +(e e)1 44 1 1760 5352 t +10 S1 f +(\261 \261)1 65 1 1837 5352 t +10 B f +(B B)1 67 1 1902 5352 t +10 S1 f +(\261 \261)1 65 1 2002 5352 t +10 B f +(N N)1 72 1 2067 5352 t +10 R f +( feature reduces the recording speed to at most onefold speed.)10 2543( This)1 244(to play the whole disk.)4 940 3 1080 5520 t +9 B f +( o)1 0( io)1 45( ud di)2 75( au)1 50( a)1 75( d)1 0( ed)1 50( oe)1 40( ho)1 45( ec ch)2 90( e)1 70( f)1 0( of)1 30( o)1 75( h)1 0( ch)1 50( tc)1 40( it)1 30( pi)1 25( p)1 80( e)1 0( ge)1 40( ng)1 45( an)1 50( ha)1 45(C Ch)1 115 26 900 5688 t +10 S1 f +(\261 \261)1 65 1 1080 5808 t +10 B f +( e)1 0( ag ge)2 94( ta)1 50( nt)1 33( er rc ce en)4 188( pe)1 44( p)1 90(p p)1 56 8 1145 5808 t +10 R f +( card. Only the copy to the soundcard is)8 1669(changes the pitch of all audio echoed to a sound)9 1997 2 1734 5808 t +( pitch, which is the default, is)6 1279( Normal)1 380( samples in a \256le remain the same.)7 1495(affected, the recorded audio)3 1166 4 1080 5928 t +( to lower pitches, i.e.)4 879( percentages correspond)2 983( Lower)1 328(given by 100%.)2 650 4 1080 6048 t +10 S1 f +(\261)3989 6048 w +10 R f +(p 50 transposes the audio output)5 1346 1 4054 6048 t +( the script)2 432( also)1 206( See)1 222(one octave lower.)2 746 4 1080 6168 t +10 B f +( ay y)2 50( la)1 50( hp pl)2 84( ch)1 56( tc)1 44( it)1 33(p pi)1 84 7 2730 6168 t +10 R f +(as an example. This option was contributed by Raul)8 2225 1 3175 6168 t +(Sobon.)1080 6288 w +9 B f +( g)1 0( ng)1 45( in)1 50( di)1 25( rd)1 50( or)1 40( re ec co)3 125( r)1 70( o)1 0( er re eo)3 125( te)1 40( st)1 30( s)1 65( r)1 0( or)1 40( o)1 75( o)1 0( no)1 45( on)1 50( mo)1 45( m)1 105( t)1 0( ec ct)2 70( le)1 40( el)1 25(S Se)1 90 26 900 6456 t +10 S1 f +(\261 \261)1 65 1 1080 6576 t +10 B f +(m m)1 83 1 1145 6576 t +10 R f +(or)1265 6576 w +10 S1 f +(\261 \261)1 65 1 1385 6576 t +10 B f +( 1)1 0( 1)1 87(c c)1 44 3 1450 6576 t +10 R f +(selects mono recording \(both stereo channels are mixed\),)7 2362 1 1618 6576 t +10 S1 f +(\261 \261)1 65 1 4017 6576 t +10 B f +(s s)1 39 1 4082 6576 t +10 R f +(or)4158 6576 w +10 S1 f +(\261 \261)1 65 1 4278 6576 t +10 B f +( 2)1 0( 2)1 88(c c)1 44 3 4343 6576 t +10 R f +(or)4513 6576 w +10 S1 f +(\261 \261)1 65 1 4634 6576 t +10 B f +( s)1 0( s)1 77(c c)1 44 3 4699 6576 t +10 R f +(selects stereo)1 542 1 4858 6576 t +(recording. Parameter s will swap both sound channels.)7 2233 1 1080 6696 t +9 B f +( y)1 0( ty)1 45( li it)2 55( al)1 25( qu ua)2 95( q)1 80( m)1 0( um)1 75( mu)1 50( im)1 75( ax xi)2 70( ma)1 45( m)1 105( t)1 0( ec ct)2 70( le)1 40( el)1 25(S Se)1 90 18 900 6864 t +10 S1 f +(\261 \261)1 65 1 1080 6984 t +10 B f +(x x)1 50 1 1145 6984 t +10 R f +( other format options)3 901( that)1 194( Note)1 271(will set stereo, 16 bits per sample at 44.1 KHz \(full CD quality\).)12 2795 4 1239 6984 t +(given later can change this setting.)5 1421 1 1080 7104 t +( 10)1 1829( change: Version 3.0)3 850( Last)1 1509(SunOS 5.10)1 492 4 720 7680 t +cleartomark +showpage +restore +%%EndPage: 10 10 +%%Page: 11 11 +save +mark +11 pagesetup +10 R f +( \( 1 \))3 164( CDDA2WAV)1 3839(User Commands)1 677 3 720 480 t +9 B f +( y)1 0( ty)1 45( li it)2 55( al)1 25( qu ua)2 95( q)1 80( e)1 0( le)1 40( pl)1 25( mp)1 50( am)1 75( sa)1 45( s)1 65( t)1 0( ec ct)2 70( le)1 40( el)1 25(S Se)1 90 18 900 960 t +10 S1 f +(\261 \261)1 65 1 1080 1080 t +10 B f +( 8)1 0( 8)1 87(b b)1 56 3 1145 1080 t +10 R f +( each sample in each channel;)5 1253(speci\256es 8 bit \(1 Byte\) for)5 1106 2 1325 1080 t +10 S1 f +(\261 \261)1 65 1 3722 1080 t +10 B f +( 12 2)2 50( 1)1 88(b b)1 56 3 3787 1080 t +10 R f +(speci\256es 12 bit \(2 Byte\) for each)6 1381 1 4019 1080 t +(sample in each channel;)3 1007 1 1080 1200 t +10 S1 f +(\261 \261)1 65 1 2129 1200 t +10 B f +( 16 6)2 50( 1)1 92(b b)1 56 3 2194 1200 t +10 R f +( each channel \(Ensure that)4 1116(speci\256es 16 bit \(2 Byte\) for each sample in)8 1850 2 2434 1200 t +( Selecting 12 or 16 bits)5 975(your sample player or sound card is capable of playing 12-bit or 16-bit samples\).)13 3345 2 1080 1320 t +( samples are aligned to 16-bit samples, so they waste some disk space.)12 2909( 12-bit)1 305(doubles \256le size.)2 685 3 1080 1440 t +9 B f +( e)1 0( te)1 40( at)1 30( ra)1 45( r)1 70( e)1 0( le)1 40( pl)1 25( mp)1 50( am)1 75( sa)1 45( s)1 65( t)1 0( ec ct)2 70( le)1 40( el)1 25(S Se)1 90 17 900 1608 t +10 S1 f +(\261 \261)1 65 1 1080 1728 t +10 B f +(r r)1 44 1 1145 1728 t +10 I f +(samplerate)1226 1728 w +10 R f +(selects a sample rate.)3 878 1 1707 1728 t +10 I f +(samplerate)2655 1728 w +10 R f +( 900. Option)2 529(can be in a range between 44100 and)7 1560 2 3136 1728 t +10 S1 f +(\261 \261)1 65 1 5263 1728 t +10 B f +(R R)1 72 1 5328 1728 t +10 R f +(lists all available rates.)3 934 1 1080 1848 t +9 B f +( er r)2 40( de)1 40( id)1 50( vi)1 25( iv)1 45( di)1 25( d)1 80( e)1 0( te)1 40( at)1 30( ra)1 45( r)1 70( e)1 0( le)1 40( pl)1 25( mp)1 50( am)1 75( sa)1 45( s)1 65( t)1 0( ec ct)2 70( le)1 40( el)1 25(S Se)1 90 24 900 2016 t +10 S1 f +(\261 \261)1 65 1 1080 2136 t +10 B f +(a a)1 50 1 1145 2136 t +10 I f +(divider)1229 2136 w +10 R f +(selects a sample rate divider.)4 1186 1 1546 2136 t +10 I f +(divider)2799 2136 w +10 R f +(can be minimally 1 and maximally 50.5 and everything)8 2284 1 3116 2136 t +( Option)1 344(between in steps of 0.5.)4 975 2 1080 2256 t +10 S1 f +(\261 \261)1 65 1 2432 2256 t +10 B f +(R R)1 72 1 2497 2256 t +10 R f +(lists all available rates.)3 934 1 2602 2256 t +(To make the sound smoother at lower sampling rates,)8 2259 1 1080 2496 t +10 B f +( av v)2 50( wa)1 50( a2 2w)2 122( dd da)2 106(c cd)1 100 5 3379 2496 t +10 R f +(sums over)1 423 1 3847 2496 t +10 I f +(n)4310 2496 w +10 R f +(samples \(where)1 638 1 4400 2496 t +10 I f +(n)5079 2496 w +10 R f +(is the)1 230 1 5170 2496 t +( So for 22050 Hertz output we have to sum over 2 samples, for 900 Hertz we have to)18 3571(speci\256c dividend\).)1 749 2 1080 2616 t +( cancels higher frequencies. Standard sector size of an audio CD \(ignoring)11 3152( This)1 253( samples.)1 389(sum over 49)2 526 4 1080 2736 t +( sample at sector boun-)4 982(additional information\) is 2352 Bytes. In order to \256nish summing for an output)12 3338 2 1080 2856 t +( sampling rates in high quality would require some)8 2152( Arbitrary)1 444( to be chosen.)3 594(daries the rates above have)4 1130 4 1080 2976 t +(interpolation scheme, which needs much more sophisticated programming.)7 3055 1 1080 3096 t +9 B f +( s)1 0( es)1 35( te)1 40( at)1 30( ra)1 45( r)1 70( g)1 0( ng)1 45( li in)2 75( pl)1 25( mp)1 50( am)1 75( sa)1 45( s)1 65( ll l)2 25( al)1 25( a)1 75( f)1 0( of)1 30( o)1 75( e)1 0( le)1 40( bl)1 25( ab)1 50( ta)1 45( t)1 60( a)1 0( a)1 75( t)1 0( st)1 30( is)1 35(L Li)1 85 32 900 3264 t +10 S1 f +(\261 \261)1 65 1 1080 3384 t +10 B f +(R R)1 72 1 1145 3384 t +10 R f +(shows a list of all sample rates and their dividers. Dividers can range from 1 to 50.5 in steps of 0.5.)20 4116 1 1250 3384 t +9 B f +( k)1 0( ck)1 50( ac)1 40( ra)1 45( tr)1 40( t)1 60( nd d)2 50( en)1 50( e)1 70( y)1 0( ll ly)2 70( al)1 25( na)1 45( on)1 50( io)1 45( ti)1 25( pt)1 30( op)1 50( o)1 75( nd d)2 50( an)1 50( a)1 75( k)1 0( ck)1 50( ac)1 40( ra)1 45( tr)1 40( t)1 60( t)1 0( rt)1 30( ar)1 40( ta)1 45( st)1 30( s)1 65( t)1 0( ec ct)2 70( le)1 40( el)1 25(S Se)1 90 39 900 3552 t +10 S1 f +(\261 \261)1 65 1 1080 3672 t +10 B f +(t t)1 33 1 1145 3672 t +10 I f +(n+m)1215 3672 w +10 R f +(selects)1442 3672 w +10 B f +(n n)1 56 1 1745 3672 t +10 R f +(as the start track and optionally)5 1316 1 1838 3672 t +10 B f +(m m)1 83 1 3192 3672 t +10 R f +( These)1 309(as the last track of a range to be recorded.)9 1778 2 3313 3672 t +( sets the track where recording begins. Recording can)8 2280( This)1 254(tracks must be from the table of contents.)7 1786 3 1080 3792 t +( tracks as well \(limited by the optional end track or otherwise depending)12 3058(advance through the following)3 1262 2 1080 3912 t +( one \256le or different \256les are then created depends on the)11 2456(on recording time\). Whether)3 1190 2 1080 4032 t +10 S1 f +(\261 \261)1 65 1 4768 4032 t +10 B f +(B B)1 67 1 4833 4032 t +10 R f +(option \(see)1 458 1 4942 4032 t +(below\).)1080 4152 w +9 B f +( x)1 0( ex)1 45( nd de)2 90( in)1 50( i)1 55( t)1 0( rt)1 30( ar)1 40( ta)1 45( st)1 30( s)1 65( t)1 0( ec ct)2 70( le)1 40( el)1 25(S Se)1 90 16 900 4320 t +10 S1 f +(\261 \261)1 65 1 1080 4440 t +10 B f +(i i)1 28 1 1145 4440 t +10 I f +(n)1208 4440 w +10 R f +( other than 1 will invoke the index scanner, which)9 2096( Indices)1 356(selects the index to start recording with.)6 1655 3 1293 4440 t +(will take some time to \256nd the correct start position. An offset may be given additionally \(see below\).)17 4201 1 1080 4560 t +9 B f +( n)1 0( on)1 50( io)1 45( ti)1 25( at)1 30( ra)1 45( du ur)2 90( d)1 80( g)1 0( ng)1 45( in)1 50( di)1 25( rd)1 50( or)1 40( re ec co)3 125( r)1 70( t)1 0( et)1 30(S Se)1 90 19 900 4728 t +10 S1 f +(\261 \261)1 65 1 1080 4848 t +10 B f +( n)1 0( n)1 131(d d)1 56 3 1145 4848 t +10 R f +(sets recording time to)3 914 1 1374 4848 t +10 I f +(n)2331 4848 w +10 R f +(seconds or set recording time for whole track if)8 2034 1 2424 4848 t +10 I f +(n)4501 4848 w +10 R f +(is zero. In order to)4 806 1 4594 4848 t +( \(sectors\) also, the argument can have an appended 'f'. Then the numerical)12 3088(specify the duration in frames)4 1232 2 1080 4968 t +( note that if track ranges are)6 1245( Please)1 335( as frames \(sectors\) rather than seconds.)6 1724(argument is to be taken)4 1016 4 1080 5088 t +(being used they de\256ne the recording time as well thus overriding any)11 2848 1 1080 5208 t +10 S1 f +(\261 \261)1 65 1 3961 5208 t +10 B f +(d d)1 56 1 4026 5208 t +10 R f +(option speci\256ed times.)2 919 1 4115 5208 t +(Recording time is de\256ned as the time the generated sample will play \(at the de\256ned sample rate\). Since)17 4320 1 1080 5448 t +( amount of generated samples, it's not the time of the sampling process itself \(which)14 3595(it's related to the)3 725 2 1080 5568 t +( neither strictly coupled with the time information on the audio CD \(shown by)13 3253( It's)1 201( or more\).)2 416(can be less)2 450 4 1080 5688 t +( can occur by the usage of the)7 1342( Differences)1 544(your hi\256 CD player\).)3 904 3 1080 5808 t +10 S1 f +(\261 \261)1 65 1 3917 5808 t +10 B f +(o o)1 50 1 3982 5808 t +10 R f +( that)1 196(option \(see below\). Notice)3 1125 2 4079 5808 t +( anytime)1 361(recording time will be shortened, unless enough disk space exists. Recording can be aborted at)14 3959 2 1080 5928 t +(by pressing the break character \(signal SIGQUIT\).)6 2067 1 1080 6048 t +9 B f +( l)1 0( \256l)1 25( \256)1 80( e)1 0( te)1 40( at)1 30( ra)1 45( ar)1 40( pa)1 45( ep)1 50( se)1 40( s)1 65( n)1 0( in)1 50( i)1 55( CD D)2 65( C)1 95( o)1 0( io)1 45( ud di)2 75( au)1 50( a)1 75( e)1 0( te)1 40( et)1 30( le)1 40( pl)1 25( mp)1 50( om)1 75( co)1 45( c)1 70( a)1 0( a)1 75( f)1 0( of)1 30( o)1 75( s)1 0( ks)1 35( ck)1 50( ac)1 40( ra)1 45( tr)1 40( t)1 60( ll l)2 25( al)1 25( a)1 75( d)1 0( rd)1 50( or)1 40( ec co)2 85(R Re)1 105 51 900 6216 t +( s)1 0(e es)1 75 2 3100 6216 t +10 S1 f +(\261 \261)1 65 1 1080 6336 t +10 B f +(B B)1 67 1 1145 6336 t +10 R f +( can be given. File names have an appended track)9 2068(copies each track into a separate \256le. A base name)9 2086 2 1246 6336 t +( CD, use a)3 458(number and an extension corresponding to the audio format. To record all audio tracks of a)15 3862 2 1080 6456 t +(suf\256cient high duration \(i.e.)3 1137 1 1080 6576 t +10 S1 f +(\261)2250 6576 w +10 R f +(d99999\).)2315 6576 w +9 B f +( t)1 0( et)1 30( se)1 40( ff fs)2 65( of)1 30( o)1 75( r)1 0( or)1 40( to)1 45( ec ct)2 70( se)1 40( s)1 65( t)1 0( rt)1 30( ar)1 40( ta)1 45( st)1 30( s)1 65( t)1 0( et)1 30(S Se)1 90 21 900 6744 t +10 S1 f +(\261 \261)1 65 1 1080 6864 t +10 B f +(o o)1 50 1 1145 6864 t +10 I f +(sectors)1232 6864 w +10 R f +(increments start sector of the track by)6 1574 1 1552 6864 t +10 I f +(sectors)3163 6864 w +10 R f +( skip a certain)3 596( this option you are able to)6 1138(. By)1 212 3 3454 6864 t +( want. Each sector runs for 1/75)6 1332(amount at the beginning of a track so you can pick exactly the part you)14 2988 2 1080 6984 t +( you have very \256ne control. If your offset is so high that it would not \256t into the current)19 3847(seconds, so)1 473 2 1080 7104 t +( skip)1 206( \(To)1 216( time is not reduced.)4 869( Recording)1 489(track, a warning message is issued and the offset is ignored.)10 2540 5 1080 7224 t +( 11)1 1829( change: Version 3.0)3 850( Last)1 1509(SunOS 5.10)1 492 4 720 7704 t +cleartomark +showpage +restore +%%EndPage: 11 11 +%%Page: 12 12 +save +mark +12 pagesetup +10 R f +( \( 1 \))3 164( CDDA2WAV)1 3839(User Commands)1 677 3 720 480 t +(introductory quiet passages automagically, use the)5 2054 1 1080 960 t +10 S1 f +(\261 \261)1 65 1 3167 960 t +10 B f +(w w)1 72 1 3232 960 t +10 R f +(option see below.\))2 751 1 3337 960 t +9 B f +( n)1 0( on)1 50( io)1 45( ti)1 25( pt)1 30( op)1 50( o)1 75( l)1 0( al)1 25( na)1 45( gn)1 50( ig)1 45( si)1 25( s)1 65( r)1 0( or)1 40( fo)1 45( f)1 60( t)1 0( it)1 30( ai)1 25(W Wa)1 135 22 900 1128 t +10 S1 f +(\261 \261)1 65 1 1080 1248 t +10 B f +(w w)1 72 1 1145 1248 t +10 R f +( option will suppress all silent output at startup, reducing possibly \256le size.)12 3433(Turning on this)2 689 2 1278 1248 t +10 B f +( av v)2 50( wa)1 50( a2 2w)2 122( dd da)2 106(c cd)1 100 5 1080 1368 t +10 R f +(will watch for any signal in the output signal and switches on writing to \256le.)14 3158 1 1541 1368 t +9 B f +( s)1 0( es)1 35( le)1 40( pl)1 25( mp)1 50( am)1 75( sa)1 45( s)1 65( e)1 0( me)1 40( re em)2 115( tr)1 40( xt)1 30( ex)1 45( e)1 70( nd d)2 50( in)1 50(F Fi)1 80 18 900 1536 t +10 S1 f +(\261 \261)1 65 1 1080 1656 t +10 B f +(F F)1 61 1 1145 1656 t +10 R f +(Turning on this option will display the most negative and the most positive sample value found dur-)16 4159 1 1241 1656 t +(ing recording for both channels. This can be useful for readjusting the volume. The values shown are not)17 4320 1 1080 1776 t +( they cover the complete sampling process. They are taken from the original)12 3269(reset at track boundaries,)3 1051 2 1080 1896 t +(samples and have the same format \(i.e. they are independent of the selected output format\).)14 3751 1 1080 2016 t +9 B f +( o)1 0( no)1 45( on)1 50( mo)1 45( m)1 105( n)1 0( in)1 50( i)1 55( re e)2 40( ar)1 40( a)1 75( s)1 0( es)1 35( le)1 40( pl)1 25( mp)1 50( am)1 75( sa)1 45( s)1 65( t)1 0( np pu ut)3 130( in)1 50( i)1 55( f)1 0( if)1 30( i)1 55( nd d)2 50( in)1 50(F Fi)1 80 29 900 2184 t +10 S1 f +(\261 \261)1 65 1 1080 2304 t +10 B f +(G G)1 78 1 1145 2304 t +10 R f +( the program)2 530(If this option is given, input samples for both channels will be compared. At the end of)16 3613 2 1257 2304 t +( is printed. Differences in the channels indicate stereo, otherwise when both channels are equal)14 3939(the result)1 381 2 1080 2424 t +(it will indicate mono.)3 880 1 1080 2544 t +9 B f +( s)1 0( es)1 35( le)1 40( pl)1 25( mp)1 50( am)1 75( sa)1 45( s)1 65( t)1 0( np pu ut)3 130( in)1 50( i)1 55( e)1 0( he)1 40( th)1 50( t)1 60( n)1 0( in)1 50( i)1 55( s)1 0( is)1 35( si)1 25( as)1 35( ph ha)2 95( mp)1 50( em)1 75( -e)1 40( re e-)2 70( pr)1 40( p)1 80( e)1 0( he)1 40( th)1 50( t)1 60( o)1 0( nd do)2 95(U Un)1 115 37 900 2712 t +10 S1 f +(\261 \261)1 65 1 1080 2832 t +10 B f +(T T)1 67 1 1145 2832 t +10 R f +( are recorded with a modi\256ed frequency response called pre-emphasis. This is)11 3219(Some older audio CDs)3 935 2 1246 2832 t +( correction can be seen in the \257ags of the Table Of Contents)12 2587(found mostly in classical recordings. The)5 1733 2 1080 2952 t +(often. But there are recordings, that show this setting only in the subchannels. If this option is given, the)18 4320 1 1080 3072 t +( started, which reads the q-subchannel of each track. If pre-emphasis is indicated in)13 3439(index scanner will be)3 881 2 1080 3192 t +( in the TOC, pre-emphasis will be assumed to be present, and subse-)12 2855(the q-subchannel of a track, but not)6 1465 2 1080 3312 t +(quently a reverse \256ltering is done for this track before the samples are written into the audio \256le.)17 3985 1 1080 3432 t +9 B f +( t)1 0( at)1 30( ma)1 45( rm)1 75( or)1 40( fo)1 45( f)1 60( o)1 0( io)1 45( ud di)2 75( au)1 50( a)1 75( t)1 0( et)1 30(S Se)1 90 15 900 3600 t +10 S1 f +(\261 \261)1 65 1 1080 3720 t +10 B f +( e)1 0( pe)1 44( yp)1 56( ty)1 50( ot)1 33( io)1 50( ud di)2 84( au)1 56( a)1 121(O O)1 78 10 1145 3720 t +10 R f +(can be)1 270 1 1755 3720 t +10 I f +(wav)2063 3720 w +10 R f +(\(for wav \256les\) or)3 712 1 2262 3720 t +10 I f +(au)3012 3720 w +10 R f +(or)3150 3720 w +10 I f +(sun)3271 3720 w +10 R f +( PCM \256les\) or)3 612(\(for sun)1 326 2 3448 3720 t +10 I f +(cdr)4425 3720 w +10 R f +(or)4597 3720 w +10 I f +(raw)4719 3720 w +10 R f +(\(for header-)1 486 1 4914 3720 t +( \(as done)2 378( \256le samples are coded in linear pulse code modulation)9 2284( All)1 196(less \256les to be used for cd writers\).)7 1462 4 1080 3840 t +( to)1 134( \256les are compatible)3 897( Wav)1 276(in the audio compact disc format\). This holds for all audio formats.)11 3013 4 1080 3960 t +(Wind)1080 4080 w +10 S f +(*)1302 4080 w +10 R f +( is the opposite byte order to the one used on)10 1907(ws sound \256les, they have lsb,msb byte order which)8 2141 2 1352 4080 t +( type \256les are not like the older common)8 1767( Sun)1 233( default \256lename extension is '.wav'.)5 1573(the audio cd. The)3 747 4 1080 4200 t +(logarithmically coded .au \256les, but instead as mentioned above linear PCM is used. The byte order is)16 4320 1 1080 4320 t +( AIFF and the newer variant)5 1253( The)1 238( is '.au'.)2 377(msb,lsb to be compatible. The default \256lename extension)7 2452 4 1080 4440 t +( bigendian format \(msb,lsb\). In AIFC no)6 1837(AIFC from the Apple/SGI world store their samples in)8 2483 2 1080 4560 t +( the easiest 'format', the cdr aka raw format. It is done per default in)14 3076( Finally)1 366(compression is used.)2 878 3 1080 4680 t +( most cd writers. Since there is no header information)9 2258(msb,lsb byte order to satisfy the order wanted by)8 2062 2 1080 4800 t +( the sample parameters can only be identi\256ed by playing the samples on a soundcard or)15 3726(in this format,)2 594 2 1080 4920 t +(similar. The default \256lename extension is '.cdr' or '.raw'.)8 2359 1 1080 5040 t +9 B f +( d)1 0( ee ed)2 90( pe)1 40( sp)1 50( s)1 65( g)1 0( ng)1 45( in)1 50( di)1 25( ad)1 50( re ea)2 85( r)1 70( e)1 0( ve)1 40( iv)1 45( ri)1 25( dr)1 40( d)1 80( m)1 0( om)1 75( ro)1 45( dr)1 40( cd)1 50( c)1 70( t)1 0( ec ct)2 70( le)1 40( el)1 25(S Se)1 90 29 900 5208 t +10 S1 f +(\261 \261)1 65 1 1080 5328 t +10 B f +( d)1 0( ee ed)2 100( pe)1 44( sp)1 56( s)1 113(S S)1 56 6 1145 5328 t +10 R f +( certain level of speed in order to reduce read errors.)10 2254(allows to switch the cdrom drive to a)7 1591 2 1555 5328 t +( An)1 192( very much on the cdrom drives.)6 1367( depend)1 326( Details)1 354(The argument is transferred verbatim to the drive.)7 2081 5 1080 5448 t +(argument of 0 for example is often the default speed of the drive, a value of 1 often selects single speed.)20 4312 1 1080 5568 t +9 B f +( s)1 0( ms)1 35( um)1 75( su)1 50( ks)1 35( ec ck)2 90( he)1 40( ch)1 50( c)1 70( 5)1 0( D5)1 45( MD)1 65( M)1 115( e)1 0( le)1 40( bl)1 25( ab)1 50( na)1 45(E En)1 110 19 900 5736 t +10 S1 f +(\261 \261)1 65 1 1080 5856 t +10 B f +( t)1 0( un nt)2 89( ou)1 56( co)1 50( c)1 112(M M)1 94 6 1145 5856 t +10 R f +( the beginning of a track. This)6 1267(enables calculation of MD-5 checksum for 'count' bytes from)8 2552 2 1581 5856 t +(was introduced for quick comparisons of tracks.)6 1969 1 1080 5976 t +9 B f +( s)1 0( rs)1 35( or)1 40( to)1 45( ec ct)2 70( se)1 40( s)1 65( f)1 0( of)1 30( o)1 75( g)1 0( ng)1 45( in)1 50( di)1 25( ad)1 50( re ea)2 85( r)1 70( r)1 0( or)1 40( fo)1 45( f)1 60( a)1 0( ia)1 45( oi)1 25( no)1 45( an)1 50( ra)1 45( ar)1 40( bp pa)2 95( li ib)2 75( l)1 55( s)1 0( 's)1 35( y')1 30( ty)1 45( nt)1 30( on)1 50( Mo)1 45( M)1 115( e)1 0( se)1 40(U Us)1 100 42 900 6144 t +10 S1 f +(\261 \261)1 65 1 1080 6264 t +10 B f +( a)1 0( ia)1 50( oi)1 28( no)1 50( an)1 56( ra)1 50( ar)1 44(p pa)1 106 8 1145 6264 t +10 R f +( Monty's library is used with the follow-)7 1708(selects an alternate way of extracting audio sectors.)7 2127 2 1565 6264 t +(ing default options:)2 794 1 1080 6384 t +(PARANOIA)1080 6624 w +10 S f +(_)1596 6624 w +10 R f +(MODE)1646 6624 w +10 S f +(_)1940 6624 w +10 R f +(FULL, but without PARANOIA)3 1324 1 1990 6624 t +10 S f +(_)3314 6624 w +10 R f +(MODE)3364 6624 w +10 S f +(_)3658 6624 w +10 R f +(NEVERSKIP)3708 6624 w +( this case the option)4 826( In)1 149(for details see Monty's libparanoia documentation.)5 2076 3 1080 6864 t +10 S1 f +(\261 \261)1 65 1 4164 6864 t +10 B f +(P P)1 61 1 4229 6864 t +10 R f +(has no effect.)2 550 1 4323 6864 t +9 B f +( s)1 0( rs)1 35( or)1 40( to)1 45( ec ct)2 70( se)1 40( s)1 65( f)1 0( of)1 30( o)1 75( g)1 0( ng)1 45( in)1 50( di)1 25( ad)1 50( re ea)2 85( r)1 70( g)1 0( ng)1 45( in)1 50( pp pi)2 75( ap)1 50( la)1 45( er rl)2 65( ov ve)2 85( o)1 75( r)1 0( or)1 40( o)1 75( r)1 0( ar)1 40( ea)1 45( ne)1 40( li in)2 75( l)1 55( o)1 0(D Do)1 110 37 900 7032 t +10 R f +(\(This applies unless option)3 1105 1 1080 7152 t +10 S1 f +(\261 \261)1 65 1 2220 7152 t +10 B f +( a)1 0( ia)1 50( oi)1 28( no)1 50( an)1 56( ra)1 50( ar)1 44(p pa)1 106 8 2285 7152 t +10 R f +(is used.\))1 343 1 2704 7152 t +10 S1 f +(\261 \261)1 65 1 3115 7152 t +10 B f +( s)1 0( rs)1 39( or)1 44( to)1 50( ec ct)2 77( se)1 44( s)1 108(P P)1 61 8 3180 7152 t +10 R f +(sets the given number of sectors for initial)7 1761 1 3639 7152 t +( For nonzero values, some)4 1155(overlap sampling for jitter correction. Two cases are to be distinguished.)10 3165 2 1080 7272 t +( 12)1 1829( change: Version 3.0)3 850( Last)1 1509(SunOS 5.10)1 492 4 720 7752 t +cleartomark +showpage +restore +%%EndPage: 12 12 +%%Page: 13 13 +save +mark +13 pagesetup +10 R f +( \( 1 \))3 164( CDDA2WAV)1 3839(User Commands)1 677 3 720 480 t +( zero is given, no overlap)5 1054( an argument of)3 653( If)1 132(sectors are read twice to enable cdda2wav's jitter correction.)8 2481 4 1080 960 t +( nonzero overlap sectors cdda2wav dynamically adjusts the setting during)9 3137( For)1 218( used.)1 254(sampling will be)2 711 4 1080 1080 t +( the read with an increased)5 1121( no match can be found, cdda2wav retries)7 1732( If)1 134(sampling \(like cdparanoia does\).)3 1333 4 1080 1200 t +( the current overlapped samples, cdda2wav reduces the)7 2353( the amount of jitter is lower than)7 1496(overlap. If)1 471 3 1080 1320 t +( argument given has to be lower than the total)9 1954( The)1 227( a higher reading speed.)4 1006(overlap setting, resulting in)3 1133 4 1080 1440 t +(number of sectors per request \(see option)6 1778 1 1080 1560 t +10 I f +(-n)2905 1560 w +10 R f +( will check this setting and issues a)7 1556(below\). Cdda2wav)1 809 2 3035 1560 t +( or errorfree \(perfect\))3 901( case of zero sectors is nice on low load situations)10 2161( The)1 230(error message otherwise.)2 1028 4 1080 1680 t +(cdrom drives and perfect \(not scratched\) audio cds.)7 2100 1 1080 1800 t +9 B f +( ze e)2 40( iz)1 40( si)1 25( s)1 65( er r)2 40( fe)1 40( sf)1 30( ns)1 35( an)1 50( ra)1 45( tr)1 40( t)1 60( e)1 0( he)1 40( th)1 50( t)1 60( t)1 0( et)1 30(S Se)1 90 19 900 1968 t +10 S1 f +(\261 \261)1 65 1 1080 2088 t +10 B f +( s)1 0( rs)1 39( or)1 44( to)1 50( ec ct)2 77( se)1 44( s)1 105(n n)1 56 8 1145 2088 t +10 R f +(will set the transfer size to the speci\256ed sectors per request.)10 2450 1 1593 2088 t +9 B f +( s)1 0( ts)1 35( nt)1 30( en)1 50( me)1 40( em)1 75( le)1 40( el)1 25( e)1 70( er r)2 40( ff fe)2 70( bu uf)2 80( b)1 80( g)1 0( ng)1 45( in)1 50( ri)1 25( r)1 70( f)1 0( of)1 30( o)1 75( er r)2 40( be)1 40( mb)1 50( nu um)2 125( n)1 80( t)1 0( et)1 30(S Se)1 90 29 900 2256 t +10 S1 f +(\261 \261)1 65 1 1080 2376 t +10 B f +( s)1 0( er rs)2 83( ff fe)2 77( bu uf)2 89( b)1 122(l l)1 28 6 1145 2376 t +10 R f +(will allocate the speci\256ed number of ring buffer elements.)8 2379 1 1577 2376 t +9 B f +( s)1 0( es)1 35( le)1 40( pl)1 25( mp)1 50( am)1 75( sa)1 45( s)1 65( t)1 0( np pu ut)3 130( in)1 50( i)1 55( f)1 0( of)1 30( o)1 75( ss s)2 35( es)1 35( ne)1 40( an)1 50( ia)1 45( nd di)2 75( en)1 50( e)1 70( t)1 0( et)1 30(S Se)1 90 26 900 2544 t +10 S1 f +(\261 \261)1 65 1 1080 2664 t +10 B f +( ss s)2 39( es)1 39( ne)1 44( an)1 56( ia)1 50( nd di)2 84( en)1 56( e)1 114(C C)1 72 9 1145 2664 t +10 R f +( can be set explicitly to)5 989( Endianess)1 476(will override the default settings of the input format.)8 2199 3 1736 2664 t +10 S1 f +(")1080 2784 w +10 R f +(little)1121 2784 w +10 S1 f +(")1305 2784 w +10 R f +(,)1346 2784 w +10 S1 f +(")1404 2784 w +10 R f +(big)1445 2784 w +10 S1 f +(")1573 2784 w +10 R f +(or)1647 2784 w +10 S1 f +(")1763 2784 w +10 R f +(machine)1804 2784 w +10 S1 f +(")2142 2784 w +10 R f +(or to the automatic endianess detection based on voting with)9 2489 1 2216 2784 t +10 S1 f +(")4738 2784 w +10 R f +(guess)4779 2784 w +10 S1 f +(")5001 2784 w +10 R f +(.)5042 2784 w +9 B f +( s)1 0( es)1 35( le)1 40( pl)1 25( mp)1 50( am)1 75( sa)1 45( s)1 65( t)1 0( pu ut)2 80( tp)1 50( ut)1 30( ou)1 50( o)1 75( f)1 0( of)1 30( o)1 75( ss s)2 35( es)1 35( ne)1 40( an)1 50( ia)1 45( nd di)2 75( en)1 50( e)1 70( t)1 0( et)1 30(S Se)1 90 28 900 2952 t +10 S1 f +(\261 \261)1 65 1 1080 3072 t +10 B f +( ss s)2 39( es)1 39( ne)1 44( an)1 56( ia)1 50( nd di)2 84( en)1 56( e)1 120(E E)1 67 9 1145 3072 t +10 R f +(\(endianess can be)2 739 1 1743 3072 t +10 S1 f +(")2525 3072 w +10 R f +(little)2566 3072 w +10 S1 f +(")2750 3072 w +10 R f +(,)2791 3072 w +10 S1 f +(")2860 3072 w +10 R f +(big)2901 3072 w +10 S1 f +(")3029 3072 w +10 R f +(or)3114 3072 w +10 S1 f +(")3241 3072 w +10 R f +(machine)3282 3072 w +10 S1 f +(")3620 3072 w +10 R f +(\) will override the default settings of the)7 1739 1 3661 3072 t +(output format.)1 580 1 1080 3192 t +9 B f +( n)1 0( on)1 50( io)1 45( ti)1 25( pt)1 30( op)1 50( o)1 75( e)1 0( se)1 40( os)1 35( bo)1 45( er rb)2 90(V Ve)1 105 13 900 3360 t +10 S1 f +(\261 \261)1 65 1 1080 3480 t +10 B f +( t)1 0( st)1 33( li is)2 67( ml)1 28( em)1 83( te)1 44( it)1 33( i)1 94(v v)1 50 9 1145 3480 t +10 R f +(prints more information. A list allows selection of different information items.)10 3211 1 1610 3480 t +10 B f +( p)1 0( lp)1 56( el)1 28(h he)1 100 4 1080 3768 t +10 R f +(Print a summary of possible members of the diffopts list.)9 2349 1 1580 3768 t +10 B f +(! !)1 33 1 1080 3936 t +10 R f +(Invert the meaning of the following string. No comma is needed after the exclamation mark.)14 3800 1 1580 3936 t +10 B f +( t)1 0( ot)1 33(n no)1 106 3 1080 4104 t +10 R f +( from an)2 356(Invert the meaning of all members in the diffopts list i.e. exclude all present options)14 3464 2 1580 4104 t +( using)1 261( When)1 315(initially complete set compare list.)4 1456 3 1580 4224 t +10 B f +( h)1 0( sh)1 56(c cs)1 83 3 3656 4224 t +10 R f +(\(1\) you might have problems to use)6 1529 1 3795 4224 t +10 B f +(! !)1 33 1 5367 4224 t +10 R f +( is why the)3 460( This)1 244(due to its strange parser.)4 1005 3 1580 4344 t +10 B f +( t)1 0( ot)1 33(n no)1 106 3 3322 4344 t +10 R f +(alias exists.)1 469 1 3494 4344 t +10 B f +( e)1 0( le)1 44( bl)1 28( ab)1 56( sa)1 50( is)1 39(d di)1 84 7 1080 4512 t +10 R f +(disables verbosity)1 727 1 1580 4512 t +10 B f +( ll l)2 28(a al)1 78 2 1080 4680 t +10 R f +(all information is given)3 960 1 1580 4680 t +10 B f +( c)1 0( oc)1 44(t to)1 83 3 1080 4848 t +10 R f +(displays the table of contents)4 1192 1 1580 4848 t +10 B f +( y)1 0( ry)1 50( ar)1 44( mm ma)2 133( um)1 83(s su)1 95 6 1080 5016 t +10 R f +(displays a summary of recording parameters)5 1811 1 1580 5016 t +10 B f +( s)1 0( ce es)2 83( ic)1 44( nd di)2 84(i in)1 84 5 1080 5184 t +10 R f +(invokes the index scanner and displays start positions of indices)9 2628 1 1580 5184 t +10 B f +( og g)2 50( lo)1 50( al)1 28( ta)1 50( at)1 33(c ca)1 94 6 1080 5352 t +10 R f +(retrieves and displays a media catalog number)6 1894 1 1580 5352 t +10 B f +( d)1 0( id)1 56( ki)1 28( ck)1 56( ac)1 44( ra)1 50(t tr)1 77 7 1080 5520 t +10 R f +(retrieves and displays international standard recording codes)6 2465 1 1580 5520 t +10 B f +( s)1 0( rs)1 39( or)1 44( to)1 50( ec ct)2 77(s se)1 83 6 1080 5688 t +10 R f +(displays track start positions in absolute sector notation)7 2269 1 1580 5688 t +(To combine several requests just list the suboptions separated with commas.)10 3130 1 1080 5856 t +9 B f +( s)1 0( ts)1 35( nt)1 30( en)1 50( te)1 40( nt)1 30( on)1 50( co)1 45( c)1 70( f)1 0( of)1 30( o)1 75( e)1 0( le)1 40( bl)1 25( ab)1 50( ta)1 45( t)1 60( e)1 0( he)1 40(T Th)1 110 21 900 6024 t +10 R f +( with number of tracks and total time \(displayed in)9 2113(The display will show the table of contents)7 1781 2 1080 6144 t +10 I f +(mm)5009 6144 w +10 R f +(:)5161 6144 w +10 I f +(ss)5189 6144 w +10 R f +(.)5275 6144 w +10 I f +(hh)5300 6144 w +10 R f +(format,)1080 6264 w +10 I f +(mm)1405 6264 w +10 R f +(=minutes,)1557 6264 w +10 I f +(ss)1989 6264 w +10 R f +(=seconds,)2075 6264 w +10 I f +(hh)2506 6264 w +10 R f +( displays track number)3 931( following list)2 580( The)1 222(=rounded 1/100 seconds\).)2 1053 4 2614 6264 t +( summary gives a line per track describing the type of the track.)12 2638( The)1 221(and track time for each entry.)5 1214 3 1080 6384 t +10 B f +( s)1 0( ns)1 39( an)1 56( ha)1 50( ch)1 56( c)1 77( e)1 0( pe)1 44( yp)1 56( ty)1 50( kt)1 33( ck)1 56( ac)1 44( ra)1 50( tr)1 44( t)1 66( d)1 0( ed)1 56( tt te)2 77( it)1 33( mi)1 28( er rm)2 127( pe)1 44( yp)1 56( py)1 50( op)1 56( co)1 50( c)1 77( s)1 0( is)1 39( si)1 28( as)1 39( ph ha)2 106( mp)1 56( re ee em)3 171( pr)1 44( p)1 89( k)1 0( ck)1 56( ac)1 44( ra)1 50(t tr)1 77 42 2070 6624 t +10 R f +(The)1080 6864 w +10 B f +( k)1 0( ck)1 56( ac)1 44( ra)1 50(t tr)1 77 5 1268 6864 t +10 R f +( track number.)2 597(column holds the)2 705 2 1528 6864 t +10 B f +( s)1 0( is)1 39( si)1 28( as)1 39( ph ha)2 106( mp)1 56( re ee em)3 171(p pr)1 100 8 2897 6864 t +10 R f +(shows if that track has been given a non linear)9 1930 1 3470 6864 t +( You can undo this effect with the)7 1426( NOTE:)1 363(frequency response.)1 808 3 1080 6984 t +10 S1 f +(\261 \261)1 65 1 3712 6984 t +10 B f +(T T)1 67 1 3777 6984 t +10 R f +(option.)3879 6984 w +10 B f +( y)1 0( py)1 50( op)1 56(c co)1 94 4 4228 6984 t +10 S1 f +(\261 \261)1 65 1 4428 6984 t +10 B f +( d)1 0( ed)1 56( tt te)2 77( it)1 33( mi)1 28( er rm)2 127(p pe)1 100 7 4493 6984 t +10 R f +(indicates if)1 451 1 4949 6984 t +(this track is allowed to copy.)5 1199 1 1080 7104 t +10 B f +( e)1 0( pe)1 44( yp)1 56( ty)1 50( kt)1 33( ck)1 56( ac)1 44( ra)1 50(t tr)1 77 9 2347 7104 t +10 R f +(can be data or audio. On multimedia CDs \(except hidden track)10 2608 1 2792 7104 t +(CDs\) both of them should be present.)6 1592 1 1080 7224 t +10 B f +( s)1 0( ls)1 39( el)1 28( nn ne)2 100( an)1 56( ha)1 50(c ch)1 100 7 2746 7224 t +10 R f +( tracks only. There can be two or)7 1418(is de\256ned for audio)3 822 2 3160 7224 t +( 13)1 1829( change: Version 3.0)3 850( Last)1 1509(SunOS 5.10)1 492 4 720 7704 t +cleartomark +showpage +restore +%%EndPage: 13 13 +%%Page: 14 14 +save +mark +14 pagesetup +10 R f +( \( 1 \))3 164( CDDA2WAV)1 3839(User Commands)1 677 3 720 480 t +(four channels.)1 573 1 1080 960 t +9 B f +( t)1 0( pu ut)2 80( tp)1 50( ut)1 30( ou)1 50( o)1 75( e)1 0( le)1 40( \256l)1 25( \256)1 80( o)1 0(N No)1 110 12 900 1128 t +10 S1 f +(\261 \261)1 65 1 1080 1248 t +10 B f +(N N)1 72 1 1145 1248 t +10 R f +(this debugging option switches off writing to a \256le.)8 2111 1 1250 1248 t +9 B f +( n)1 0( on)1 50( io)1 45( ti)1 25( at)1 30( er ra)2 85( ne)1 40( en)1 50( ge)1 40( g)1 75( e)1 0( le)1 40( \256l)1 25( o\256)1 50( fo)1 45( nf)1 30( in)1 50( i)1 55( o)1 0(N No)1 110 20 900 1416 t +10 S1 f +(\261 \261)1 65 1 1080 1536 t +10 B f +(H H)1 78 1 1145 1536 t +10 R f +(this option switches off creation of an info \256le and a cddb \256le.)12 2579 1 1256 1536 t +9 B f +( s)1 0( nd ds)2 85( en)1 50( te)1 40( nt)1 30( on)1 50( ro)1 45( fr)1 40( f)1 60( i)1 0( ui)1 25( gu)1 50( g)1 75( r)1 0( or)1 40( fo)1 45( f)1 60( t)1 0( pu ut)2 80( tp)1 50( ut)1 30( ou)1 50( o)1 75( e)1 0( le)1 40( pl)1 25( mp)1 50( im)1 75( si)1 25( s)1 65( f)1 0( of)1 30( o)1 75( n)1 0( on)1 50( io)1 45( ti)1 25( at)1 30( er ra)2 85( ne)1 40( en)1 50(G Ge)1 110 42 900 1704 t +10 S1 f +(\261 \261)1 65 1 1080 1824 t +10 B f +(g g)1 50 1 1145 1824 t +10 R f +( gui frontends \(like xcd-)4 1033(this option switches on simple line formatting, which is needed to support)11 3131 2 1236 1824 t +(roast\).)1080 1944 w +9 B f +( g)1 0( ng)1 45( in)1 50( og gg gi)3 115( lo)1 45( l)1 55( I)1 0( SI)1 35( CS)1 50( SC)1 65( S)1 80( e)1 0( se)1 40( os)1 35( bo)1 45( er rb)2 90(V Ve)1 105 17 900 2112 t +10 S1 f +(\261 \261)1 65 1 1080 2232 t +10 B f +(V V)1 72 1 1145 2232 t +10 R f +( SCSI commands. This will produce a lot of output \(when SCSI)11 2715(this option switches on logging of)5 1429 2 1256 2232 t +( format is the same as being used)7 1414( is needed for debugging purposes. The)6 1656( This)1 250(devices are being used\).)3 1000 4 1080 2352 t +(with the cdrecord program, see)4 1270 1 1080 2472 t +10 B f +( d)1 0( rd)1 56( or)1 44( re ec co)3 138( dr)1 44(c cd)1 100 6 2383 2472 t +10 R f +(\(1\) for more information.)3 1033 1 2765 2472 t +9 B f +( n)1 0( on)1 50( io)1 45( ti)1 25( pt)1 30( op)1 50( o)1 75( t)1 0( et)1 30( ie)1 40( ui)1 25(Q Qu)1 120 12 900 2640 t +10 S1 f +(\261 \261)1 65 1 1080 2760 t +10 B f +(q q)1 56 1 1145 2760 t +10 R f +( reduces cpu time resources.)4 1159( That)1 249(suppresses all screen output except error messages.)6 2090 3 1234 2760 t +9 B f +( n)1 0( on)1 50( io)1 45( ti)1 25( pt)1 30( op)1 50( o)1 75( n)1 0( on)1 50( io)1 45( ti)1 25( at)1 30( ma)1 45( rm)1 75( or)1 40( fo)1 45( nf)1 30( in)1 50( i)1 55( w)1 0( ow)1 65( ho)1 45( sh)1 50( s)1 65( t)1 0( st)1 30( us)1 35(J Ju)1 95 28 900 2928 t +10 S1 f +(\261 \261)1 65 1 1080 3048 t +10 B f +(J J)1 50 1 1145 3048 t +10 R f +( the)1 160(does not write a \256le, it only prints information about the disc \(depending on)13 3182 2 1232 3048 t +10 S1 f +(\261 \261)1 65 1 4612 3048 t +10 B f +(v v)1 50 1 4677 3048 t +10 R f +(option\). This is)2 635 1 4765 3048 t +(just for information purposes.)3 1212 1 1080 3168 t +9 B f +( t)1 0( rt)1 30( or)1 40( up pp po)3 145( su)1 50( s)1 65( P)1 0( BP)1 55(C CD DD DB)3 255 9 720 3336 t +( n)1 0( on)1 50( io)1 45( ti)1 25( pt)1 30( op)1 50( o)1 75( s)1 0( es)1 35( le)1 40( tl)1 25( it)1 30( ti)1 25( t)1 60( k)1 0( ck)1 50( ac)1 40( ra)1 45( tr)1 40( t)1 60( nd d)2 50( an)1 50( a)1 75( m)1 0( bu um)2 125( lb)1 50( al)1 25( a)1 75( ku up p)3 100( oo ok)2 95(L Lo)1 105 31 900 3456 t +10 S1 f +(\261 \261)1 65 1 1080 3576 t +10 B f +( e)1 0( de)1 44( od)1 56( mo)1 50( m)1 126( dd db bp p)4 168( cd)1 56( c)1 120(L L)1 67 9 1145 3576 t +10 R f +( performer, album-, and track titles from a cddbp server.)9 2415(Cdda2wav tries to retrieve)3 1110 2 1875 3576 t +( is planned to have more control over the server)9 2048( It)1 135(The default server right now is 'freedb.freedb.org'.)6 2137 3 1080 3696 t +( parameter de\256nes how multiple entries are handled:)7 2149( The)1 221(handling later.)1 585 3 1080 3816 t +10 B f +(0 0)1 50 1 1080 3984 t +10 R f +(interactive mode, the user chooses one of the entries.)8 2176 1 1440 3984 t +10 B f +(1 1)1 50 1 1080 4152 t +10 R f +(take the \256rst entry without asking.)5 1406 1 1440 4152 t +9 B f +( s)1 0( ku up ps)3 135( oo ok)2 95( lo)1 45( l)1 55( e)1 0( le)1 40( tl)1 25( it)1 30( ti)1 25( t)1 60( r)1 0( or)1 40( fo)1 45( f)1 60( er r)2 40( ve)1 40( er rv)2 85( se)1 40( s)1 65( t)1 0( et)1 30(S Se)1 90 23 900 4320 t +10 B f +( dd db bp p)4 168(c cd)1 100 2 1080 4440 t +10 S1 f +(\261 \261)1 65 1 1348 4440 t +10 B f +( e)1 0( me)1 44( am)1 83( na)1 50( er rn)2 100( ve)1 44( er rv)2 94( se)1 44( s)1 112( er r)2 44( ve)1 44( er rv)2 94(s se)1 83 13 1413 4440 t +10 R f +(When using)1 495 1 2289 4440 t +10 S1 f +(\261)2824 4440 w +10 R f +(L or)1 184 1 2889 4440 t +10 S1 f +(\261)3113 4440 w +10 R f +( server being contacted can be set with this)8 1841(cddb, the)1 381 2 3178 4440 t +(option.)1080 4560 w +9 B f +( s)1 0( ku up ps)3 135( oo ok)2 95( lo)1 45( l)1 55( e)1 0( le)1 40( tl)1 25( it)1 30( ti)1 25( t)1 60( r)1 0( or)1 40( fo)1 45( f)1 60( er r)2 40( be)1 40( mb)1 50( nu um)2 125( tn)1 50( rt)1 30( or)1 40( po)1 45( p)1 80( t)1 0( et)1 30(S Se)1 90 27 900 4728 t +10 B f +( dd db bp p)4 168(c cd)1 100 2 1080 4848 t +10 S1 f +(\261 \261)1 65 1 1348 4848 t +10 B f +( er r)2 44( be)1 44( mb)1 56( nu um)2 139( tn)1 56( rt)1 33( or)1 44( po)1 50( p)1 132( t)1 0( rt)1 33( or)1 44(p po)1 106 13 1413 4848 t +10 R f +(When using)1 498 1 2237 4848 t +10 S1 f +(\261)2778 4848 w +10 R f +(L or)1 187 1 2843 4848 t +10 S1 f +(\261)3073 4848 w +10 R f +( contacted can be set with)5 1123(cddb, the server port being)4 1139 2 3138 4848 t +(this option.)1 459 1 1080 4968 t +9 B f +( E)1 0( GE)1 60( AG)1 70( SA)1 65( US)1 50( U)1 95( N)1 0( ON)1 65( O)1 100( S)1 0( TS)1 50( NT)1 60( IN)1 65(H HI)1 105 14 720 5136 t +10 R f +( sample player software and sound card)6 1813(Don't create samples you cannot read. First check your)8 2507 2 1080 5256 t +(hardware. I experienced problems with very low sample rates \(stereo)9 2897 1 1080 5376 t +10 S1 f +(<)4018 5376 w +10 R f +(= 1575 Hz, mono)3 745 1 4074 5376 t +10 S1 f +(<)4859 5376 w +10 R f +(= 3675 Hz\))2 485 1 4915 5376 t +( standard WAV players for sound blaster \(maybe they are not legal in)12 3017(when trying to play them with)5 1303 2 1080 5496 t +10 B f +( AV V)2 72(W WA)1 172 2 1080 5616 t +10 R f +( cdda2wav sup-)2 662( Now)1 270( in a bigendian format.)4 979(format\). Most CD-Writers insist on audio samples)6 2121 4 1368 5616 t +(ports the)1 355 1 1080 5736 t +10 S1 f +(\261 \261)1 65 1 1468 5736 t +10 B f +( ss s)2 39( es)1 39( ne)1 44( an)1 56( ia)1 50( nd di)2 84( en)1 56( e)1 110(E E)1 67 9 1533 5736 t +10 R f +(option to control the endianess of the written samples.)8 2226 1 2111 5736 t +( the 'perfect')2 534(If your hardware is fast enough to run cdda2wav uninterrupted and your CD drive is one of)16 3786 2 1080 5904 t +( all overlap sampling off with the)6 1422(ones, you will gain speed when switching)6 1764 2 1080 6024 t +10 S1 f +(\261 \261)1 65 1 4306 6024 t +10 B f +( 0)1 0( 0)1 123(P P)1 61 3 4371 6024 t +10 R f +(option. Further \256ne)2 805 1 4595 6024 t +(tuning can be done with the)5 1157 1 1080 6144 t +10 S1 f +(\261 \261)1 65 1 2272 6144 t +10 B f +( s)1 0( rs)1 39( or)1 44( to)1 50( ec ct)2 77( se)1 44( s)1 107(n n)1 56 8 2337 6144 t +10 R f +( should be requested)3 851(option. You can specify how much sectors)6 1760 2 2789 6144 t +(in one go.)2 413 1 1080 6264 t +(Cdda2wav supports)1 799 1 1080 6432 t +10 B f +( s)1 0( es)1 39( pe)1 44( ip)1 56(p pi)1 84 5 1912 6432 t +10 R f +( a \256lename of)3 570(. Use)1 246 2 2135 6432 t +10 S1 f +(\261 \261)1 65 1 2984 6432 t +10 R f +(to let cdda2wav output its samples to standard output.)8 2216 1 3082 6432 t +( the)1 158(Conversion to other sound formats can be done using)8 2211 2 1080 6600 t +10 B f +( ox x)2 50(s so)1 89 2 3485 6600 t +10 R f +(program package \(although the use of)5 1565 1 3660 6600 t +10 B f +( ox x)2 50(s so)1 89 2 5261 6600 t +10 S1 f +(\261 \261)1 65 1 1080 6720 t +10 B f +(x x)1 50 1 1145 6720 t +10 R f +( option)1 292(to change the byte order of samples should be no more necessary; see)12 2921 2 1232 6720 t +10 S1 f +(\261 \261)1 65 1 4481 6720 t +10 B f +(E E)1 67 1 4546 6720 t +10 R f +(to change the out-)3 751 1 4649 6720 t +(put byteorder\).)1 601 1 1080 6840 t +( possible with)2 582(If you want to sample more than one track into different \256les in one run, this is currently)17 3738 2 1080 7008 t +(the)1080 7128 w +10 S1 f +(\261 \261)1 65 1 1235 7128 t +10 B f +(B B)1 67 1 1300 7128 t +10 R f +(option. When recording time exceeds the track limit a new \256le will be opened for the next track.)17 3976 1 1400 7128 t +( 14)1 1829( change: Version 3.0)3 850( Last)1 1509(SunOS 5.10)1 492 4 720 7680 t +cleartomark +showpage +restore +%%EndPage: 14 14 +%%Page: 15 15 +save +mark +15 pagesetup +10 R f +( \( 1 \))3 164( CDDA2WAV)1 3839(User Commands)1 677 3 720 480 t +9 B f +( S)1 0( LE ES)2 110( IL)1 60(F FI)1 90 4 720 960 t +10 R f +(Cdda2wav can generate a lot of \256les for various purposes.)9 2389 1 1080 1080 t +9 B f +( :)1 0( s:)1 30( es)1 35( le)1 40( \256l)1 25( \256)1 80( o)1 0( io)1 45( ud di)2 75(A Au)1 115 10 900 1248 t +10 R f +( samples with default extensions .wav, .au, .aifc, .aiff, and .cdr according)11 3020(There are audio \256les containing)4 1300 2 1080 1368 t +( are not generated when option \()6 1399( \256les)1 211( These)1 315(to the selected sound format.)4 1227 4 1080 1488 t +10 S1 f +(\261 \261)1 65 1 4232 1488 t +10 B f +(N N)1 72 1 4297 1488 t +10 R f +(\) is given. Multiple \256les)4 1031 1 4369 1488 t +( written when the bulk copy option \()7 1590(may be)1 309 2 1080 1608 t +10 S1 f +(\261 \261)1 65 1 2979 1608 t +10 B f +(B B)1 67 1 3044 1608 t +10 R f +(\) is used. Individual \256le names can be given as argu-)10 2289 1 3111 1608 t +( the number of \256le names given is suf\256cient to cover all included audio tracks, the \256le names)17 3950(ments. If)1 370 2 1080 1728 t +( than \256les needed to write the included)7 1685( if there are less \256le names)6 1178( Otherwise,)1 512(will be used verbatim.)3 945 4 1080 1848 t +(tracks, the part of the \256le name before the extension is extended with ')13 3084 1 1080 1968 t +10 S f +(_)4164 1968 w +10 R f +(dd' where dd represents the)4 1186 1 4214 1968 t +(current track number.)2 877 1 1080 2088 t +9 B f +( :)1 0( s:)1 30( es)1 35( le)1 40( \256l)1 25( \256)1 80( x)1 0( ex)1 45( nd de)2 90( in)1 50( di)1 25( Cd)1 50( C)1 95( nd d)2 50( an)1 50( a)1 75( dd db b)3 100(C Cd)1 115 18 900 2256 t +10 R f +( .cdtext)1 310(If cdda2wav detects cd-extra or cd-text \(album/track\) title information, then .cddb, .cdindex and)12 4010 2 1080 2376 t +( generated unless suppressed by the option)6 1763(\256les are)1 324 2 1080 2496 t +10 S1 f +(\261 \261)1 65 1 3202 2496 t +10 B f +(H H)1 78 1 3267 2496 t +10 R f +( contain suitable formatted entries for sub-)6 1757(. They)1 298 2 3345 2496 t +( The CDINDEX and CDDB\(tm\) systems are)6 1924(mission to audio cd track title databases in the internet.)9 2396 2 1080 2616 t +(currently supported. For more information please visit www.musicbrainz.org and www.freedb.com.)9 4062 1 1080 2736 t +9 B f +( :)1 0( s:)1 30( es)1 35( le)1 40( \256l)1 25( \256)1 80( f)1 0( nf)1 30(I In)1 85 9 900 2904 t +10 R f +( audio cd, it was taken from. They are)8 1609(The inf \256les are describing the sample \256les and the part from the)12 2711 2 1080 3024 t +(a means to transfer information to a cd burning program like cdrecord. For example, if the original audio)17 4320 1 1080 3144 t +(cd had pre-emphasis enabled, and cdda2wav)5 1838 1 1080 3264 t +10 S1 f +(\261 \261)1 65 1 2956 3264 t +10 B f +(T T)1 67 1 3021 3264 t +10 R f +(did remove the pre-emphasis, then the inf \256le has pre-)9 2274 1 3126 3264 t +( .cddb and the .cdindex have)5 1199(emphasis not set \(since the audio \256le does not have it anymore\), while the)13 3121 2 1080 3384 t +(pre-emphasis set as the original does.)5 1532 1 1080 3504 t +9 B f +( G)1 0( NG)1 70( IN)1 65( AR RN NI)3 165(W WA)1 155 5 720 3672 t +10 B f +( :)1 0( T:)1 33( AN NT)2 139( TA)1 72( RT)1 67( OR)1 72( PO)1 78( MP)1 61(I IM)1 133 9 1080 3792 t +10 R f +(it is prohibited to sell copies of copyrighted material by noncopyright holders. This pro-)13 3631 1 1769 3792 t +( constraint when using the)4 1093( user acknowledges this)3 987( The)1 225(gram may not be used to circumvent copyrights.)7 2015 4 1080 3912 t +(software.)1080 4032 w +9 B f +( S)1 0( GS)1 50( UG)1 70(B BU)1 125 4 720 4200 t +10 R f +(The index scanner may give timeouts.)5 1560 1 1080 4320 t +(The resampling \(rate conversion code\) uses polynomial interpolation, which is not optimal.)11 3737 1 1080 4560 t +(Cdda2wav should use threads.)3 1239 1 1080 4800 t +(Cdda2wav currently cannot sample hidden audio tracks that reside in track)10 3063 1 1080 5040 t +10 S1 f +(#)4176 5040 w +10 R f +(1 index 0.)2 413 1 4226 5040 t +9 B f +( S)1 0( TS)1 50( NT)1 60( EN)1 65( ME)1 60( EM)1 85( GE)1 60( DG)1 70( LE ED)2 125( WL)1 60( OW)1 90( NO)1 70( KN)1 65(A AC CK)2 200 14 720 5208 t +10 R f +( and Fraunhofer Institut f)4 1080(Thanks goto Project MODE \(http://www.mode.net/\))4 2165 2 1080 5328 t +(. .)1 45 1 4325 5273 t +(ur integrierte Schaltungen)2 1075 1 4325 5328 t +( Europe and Ricoh Japan provided)5 1558( Plextor)1 383(\(FhG-IIS\) \(http://www.iis.fhg.de/\) for \256nancial support.)4 2379 3 1080 5448 t +( has helped a lot)4 701( Rammi)1 366( this software.)2 589(cdrom disk drives and cd burners which helped a lot to develop)11 2664 4 1080 5568 t +( showed a lot of stamina when hearing 100 times the \256rst 16 seconds of the \256rst)16 3346(with the debugging and)3 974 2 1080 5688 t +( Montgomery\))1 662( contributed by Monty \(Christopher)4 1751( Libparanoia)1 621(track of the Krupps CD.)4 1286 4 1080 5808 t +(xiphmont)1080 5928 w +10 S1 f +(@)1464 5928 w +10 R f +(mit.edu.)1556 5928 w +9 B f +( R)1 0( HO OR)2 135( TH)1 70(A AU UT)2 190 4 720 6096 t +10 R f +(Heiko Eissfeldt heiko)2 882 1 1080 6216 t +10 S1 f +(@)1962 6216 w +10 R f +(colossus.escape.de \(1993-2004\))1 1280 1 2054 6216 t +(2004-today:)1080 6384 w +(J)1080 6624 w +(. .)1 47 1 1119 6569 t +(org Schilling)1 528 1 1119 6624 t +(Seestr. 110)1 452 1 1080 6744 t +(D-13353 Berlin)1 638 1 1080 6864 t +(Germany)1080 6984 w +( 15)1 1829( change: Version 3.0)3 850( Last)1 1509(SunOS 5.10)1 492 4 720 7680 t +cleartomark +showpage +restore +%%EndPage: 15 15 +%%Page: 16 16 +save +mark +16 pagesetup +10 R f +( \( 1 \))3 164( CDDA2WAV)1 3839(User Commands)1 677 3 720 480 t +9 B f +( TE E)2 60(D DA AT)2 190 2 720 960 t +10 R f +(12 Jan 2010)2 499 1 1080 1080 t +9 B f +( Y)1 0( TY)1 65( IT)1 60( LI)1 35( IL)1 60( BI)1 35( AB)1 60( TA)1 65( ST)1 60( S)1 80( E)1 0( AC CE)2 125( FA)1 65( RF)1 55( TE ER)2 125( NT)1 60(I IN)1 100 17 720 1248 t +10 R f +(The interfaces provided by)3 1123 1 1080 1368 t +10 B f +( av v)2 50( wa)1 50( a2 2w)2 122( dd da)2 106(c cd)1 100 5 2245 1368 t +10 R f +( As)1 187( long term stability.)3 838(are designed for)2 676 3 2715 1368 t +10 B f +( av v)2 50( wa)1 50( a2 2w)2 122( dd da)2 106(c cd)1 100 5 4459 1368 t +10 R f +(depends on)1 470 1 4930 1368 t +(interfaces provided by the underlying operating system, the stability of the interfaces offered by)13 4320 1 1080 1488 t +10 B f +( av v)2 50( wa)1 50( a2 2w)2 122( dd da)2 106(c cd)1 100 5 1080 1608 t +10 R f +( the interface stability of the OS interfaces. Modi\256ed interfaces in the OS may)13 3377(depends on)1 471 2 1552 1608 t +(enforce modi\256ed interfaces in)3 1218 1 1080 1728 t +10 B f +( av v)2 50( wa)1 50( a2 2w)2 122( dd da)2 106(c cd)1 100 5 2331 1728 t +10 R f +(.)2759 1728 w +( 16)1 1829( change: Version 3.0)3 850( Last)1 1509(SunOS 5.10)1 492 4 720 7680 t +cleartomark +showpage +restore +%%EndPage: 16 16 %%Trailer -end -%%EOF +done +%%DocumentFonts: Times-Roman Times-Bold Times-Italic Symbol +%%Pages: 16 diff -Nru cdrtools-2.01.01a33/doc/cdrecord.man cdrtools-3.02a09/doc/cdrecord.man --- cdrtools-2.01.01a33/doc/cdrecord.man 2002-12-24 15:54:52.000000000 +0000 +++ cdrtools-3.02a09/doc/cdrecord.man 2010-06-01 22:26:28.000000000 +0000 @@ -1,1458 +1,3564 @@ -CDRECORD(1) Schily's USER COMMANDS CDRECORD(1) + + + +Schily's USER COMMANDS CDRECORD(1) NNAAMMEE - cdrecord - record audio or data Compact Discs from a mas- - ter + cdrecord - record audio or data CD, DVD or BluRay + +SSYYNNOOPPSSIISS + ccddrreeccoorrdd [ _g_e_n_e_r_a_l _o_p_t_i_o_n_s ][ ddeevv==_d_e_v_i_c_e ][ _t_r_a_c_k _o_p_t_i_o_n_s ] + _t_r_a_c_k_1..._t_r_a_c_k_n + + +DDEESSCCRRIIPPTTIIOONN + CCddrreeccoorrdd is used to record data or audio Compact Discs on an + Orange Book CD-recorder, to write DVD media on a DVD- + recorder or to write BluRay media on a BluRay-recorder. + + DDeevviiccee nnaammiinngg + Most users do not need to care about device naming at all. + If no ddeevv== option was specified, ccddrreeccoorrdd implements aauuttoo + ttaarrggeett support and automagically finds the drive in case + that exactly one CD-ROM type drive is available in the sys- + tem. In case that more than one CD-ROM type drive exists on + the system, a list of possible device name parameters may be + retrieved with ccddrreeccoorrdd -ssccaannbbuuss or from the target example + from the output of ccddrreeccoorrdd ddeevv==hheellpp, then the ddeevv== parame- + ter may be set based on the device listing. + + The _d_e_v_i_c_e parameter to the ddeevv== option explained below + refers to _s_c_s_i_b_u_s/_t_a_r_g_e_t/_l_u_n of the CD/DVD/BluRay-recorder. + If a file /etc/default/cdrecord exists, the parameter to the + ddeevv== option may also be a drive name label in said file (see + FILES section). + + + CCoonnssttrraaiinnttss ffoorr rruunnnniinngg ccddrreeccoorrdd + On SSVVrr44 compliant systems, ccddrreeccoorrdd uses the real-time class + to get the highest scheduling priority that is possible + (higher than all kernel processes). On systems with PPOOSSIIXX + rreeaall--ttiimmee sscchheedduulliinngg cdrecord uses real-time scheduling too, + but may not be able to gain a priority that is higher than + all kernel processes. + + In order to be able to use the SCSI transport subsystem of + the OS, run at highest priority and lock itself into core + ccddrreeccoorrdd either needs to be run as root, needs to be + installed suid root or must be called via RRBBAACCss pfexec + mechanism. + + + FFiillee ttoo ttrraacckk mmaappppiinngg + In _T_r_a_c_k _A_t _O_n_c_e mode, each _t_r_a_c_k corresponds to a single + file that contains the prepared data for that track. If the + argument is `-', standard input is used for that track. Only + one track may be taken from _s_t_d_i_n. In the other write + modes, the direct file to track relation may not be + + + +Joerg Schilling Last change: Version 3.0 1 + + + + + + +Schily's USER COMMANDS CDRECORD(1) + + + + implemented. In -cclloonnee mode, a single file contains all + data for the whole disk. To allow DVD writing on platforms + that do not implement large file support, ccddrreeccoorrdd concaten- + ates all file arguments to a single track when writing to + DVD media. + + +GGEENNEERRAALL OOPPTTIIOONNSS + General options must be before any track file name or track + option. + + IInnffoorrmmaattiivvee ooppttiioonnss + -hheellpp + display version information for ccddrreeccoorrdd on standard + output. + + -vveerrssiioonn + Print version information and exit. + + -vv Increment the level of general verbosity by one. This + is used e.g. to display the progress of the writing + process. + + MMeeddiiaa wwrriittee mmooddee ooppttiioonnss + -dduummmmyy + The -dduummmmyy option modifies the current write strategy. + The CD/DVD/BluRay-recorder will go through all steps of + the recording process, but the laser is turned off dur- + ing this procedure. It is recommended to run several + tests before actually writing to a Compact Disk or + Digital Versatile Disk, if the timing and load response + of the current system is not yet known. + + The -dduummmmyy option does not work with all media and + write modes. DVD+ media and BluRay media does not sup- + port dduummmmyy writes and most CD-recorders do not support + dduummmmyy writes in raw mode. + + -mmuullttii + Allow multi-session CDs or multi-border DVDs to be + made. This flag needs to be present on all sessions of + a multi-session or multi-border disk, except you want + to create a session on a CD that will be the last ses- + sion on the CD-media. + + For CD-media, the fixation will be done in a way that + allows the CD/DVD/BluRay-recorder to append additional + sessions later. This is done by generating a TOC with a + link to the next program area. The so generated media + is not 100% compatible to manufactured CDs (except for + CDplus). Use only for recording of multi-session CDs. + If this option is present, the default track type is + + + +Joerg Schilling Last change: Version 3.0 2 + + + + + + +Schily's USER COMMANDS CDRECORD(1) + + + + CCDD--RROOMM XXAA mmooddee 22 ffoorrmm 11 and the sector size is 2048 + bytes. The XA sector subheaders will be created by the + drive. The _S_o_n_y drives have no hardware support for + CCDD--RROOMM XXAA mmooddee 22 ffoorrmm 11. You have to specify the -ddaattaa + option in order to create multi-session disks on these + drives. If you like to record a multi-session disk in + SAO mode, you need to force CCDD--RROOMM sectors by including + the -ddaattaa option. Not all drives allow multi-session + CDs in SAO mode. + + For DVD media, -mmuullttii switches the write mode to iinnccrree-- + mmeennttaall ppaacckkeett rreeccoorrddiinngg. There is currently no way to + prevent the ability to append further sessions and + there is currently only support for DVD-R/DVD-RW media. + To reuse a DVD-RW that has previously been written in + iinnccrreemmeennttaall ppaacckkeett rreeccoorrddiinngg mode for different write + modes, you need to blank the entire media before. + + -ddaaoo + + -ssaaoo Set SSAAOO ((SSeessssiioonn AAtt OOnnccee)) mode which is usually called + DDiisskk AAtt OOnnccee mode. This currently only works with MMC + drives that support SSeessssiioonn AAtt OOnnccee mode. Note that + cdrecord needs to know the size of each track in + advance for this mode (see the mmkkiissooffss -pprriinntt-ssiizzee + option and the _E_X_A_M_P_L_E_S section for more information). + + There are several CD writers with bad firmware that + result in broken disks when writing in TAO or SAO mode. + If you find any problems with the layout of a disk or + with subchannel content (e.g. wrong times on the + display when playing the CD) and your drive supports to + write in -rraaww9966rr or -rraaww1166 mode, you should give it a + try. + + -ttaaoo Set TTAAOO ((TTrraacckk AAtt OOnnccee)) wwrriittiinngg mmooddee.. This is the + default write mode in previous ccddrreeccoorrdd versions. With + most drives, this write mode is required for multi- + session recording. + + There are several CD writers with bad firmware that + result in broken disks when writing in TAO or SAO mode. + If you find any problems with the layout of a disk or + with subchannel content (e.g. wrong times on the + display when playing the CD) and your drive supports to + write in -rraaww9966rr or -rraaww1166 mode, you should give it a + try. + + -rraaww Set RRAAWW wwrriittiinngg mmooddee.. Using this option defaults to + -rraaww9966rr. Note that cdrecord needs to know the size of + each track in advance for this mode (see the mmkkiissooffss + -pprriinntt-ssiizzee option and the _E_X_A_M_P_L_E_S section for more + + + +Joerg Schilling Last change: Version 3.0 3 + + + + + + +Schily's USER COMMANDS CDRECORD(1) + + + + information). + + -rraaww9966rr + Set RRAAWW wwrriittiinngg mmooddee with 2352 byte sectors plus 96 + bytes of raw P-W sub-channel data resulting in a sector + size of 2448 bytes. This is the preferred raw writing + mode as it gives best control over the CD-writing pro- + cess. Writing data disks in raw mode needs signifi- + cantly more CPU time than other write modes. If your + CPU is too slow, this may result in buffer underruns. + Note that cdrecord needs to know the size of each track + in advance for this mode (see the mmkkiissooffss -pprriinntt-ssiizzee + option and the _E_X_A_M_P_L_E_S section for more information). + + -rraaww9966pp + Set RRAAWW wwrriittiinngg mmooddee with 2352 byte sectors plus 96 + bytes of packed P-W sub-channel data resulting in a + sector size of 2448 bytes. This is the less preferred + raw writing mode as only a few recorders support it and + some of these recorders have bugs in the firmware + implementation. Don't use this mode if your recorder + supports -rraaww9966rr or -rraaww1166. Writing data disks in raw + mode needs significantly more CPU time than other write + modes. If your CPU is too slow, this may result in + buffer underruns. Note that cdrecord needs to know the + size of each track in advance for this mode (see the + mmkkiissooffss -pprriinntt-ssiizzee option and the _E_X_A_M_P_L_E_S section for + more information). + + -rraaww1166 + Set RRAAWW wwrriittiinngg mmooddee with 2352 byte sectors plus 16 + bytes of P-Q sub-channel data resulting in a sector + size of 2368 bytes. If a recorder does not support + -rraaww9966rr, this is the preferred raw writing mode. It + does not allow to write _C_D-_T_e_x_t or _C_D+_G_r_a_p_h_i_c_s but it + is the only raw writing mode in cheap CD-writers, as + these cheap writers in most cases do not support -ddaaoo + mode. Don't use this mode if your recorder supports + -rraaww9966rr. Writing data disks in raw mode needs signifi- + cantly more CPU time than other write modes. If your + CPU is too slow, this may result in buffer underruns. + Note that cdrecord needs to know the size of each track + in advance for this mode (see the mmkkiissooffss -pprriinntt--ssiizzee + option and the _E_X_A_M_P_L_E_S section for more information). + + CCddrreeccoorrdd ffuunnccttiioonnaall ooppttiioonnss + -aabboorrtt + Try to send an aabboorrtt sequence to the drive. If you use + ccddrreeccoorrdd only, this should never be needed; but other + software may leave a drive in an unusable condition. + Calling ccddrreeccoorrdd -rreesseett may be needed if a previous + write has been interrupted and the software did not + + + +Joerg Schilling Last change: Version 3.0 4 + + + + + + +Schily's USER COMMANDS CDRECORD(1) + + + + tell the drive that it will not continue to write. + + -aattiipp + Retrieve and print out the ATIP (Absolute Time In Pre- + groove) info of a CD/DVD/BluRay recordable or + CD/DVD/BluRay re-writable media. With this option, + ccddrreeccoorrdd will try to retrieve the ATIP info. If the + actual drive does not support to read the ATIP info, it + may be that only a reduced set of information records + or even nothing is displayed. Only a limited number of + MMC-compliant drives support to read the ATIP info. + + If ccddrreeccoorrdd is able to retrieve the lead-in start time + for the first session, it will try to decode and print + the manufacturer info from the media. DVD media does + not have ATIP information but there is equivalent + prerecorded information that is read out and printed. + + bbllaannkk==_t_y_p_e + Blank a CD-RW and exit or blank a CD-RW before writing. + The blanking type may be one of: + + help Display a list of possible blanking types. + + all Blank the entire disk. This may take a long + time. + + fast Minimally blank the disk. This results in + erasing the PMA, the TOC and the pregap. + + track Blank the last track. + + unreserve Unreserve a reserved track. + + trtail Blank the tail of a track. + + unclose Unclose last session. + + session Blank the last session. + + Not all drives support all blanking types. It may be + necessary to use bbllaannkk==aallll if a drive reports a speci- + fied command as being invalid. If used together with + the -ffoorrccee flag, this option may be used to blank CD-RW + disks that otherwise cannot be blanked. Note that you + may need to specify bbllaannkk==_a_l_l because some drives will + not continue with certain types of bad CD-RW disks. + Note also that ccddrreeccoorrdd does its best if the -ffoorrccee + flag is used but it finally depends on the drive's + firmware whether the blanking operation will succeed or + not. + + + + +Joerg Schilling Last change: Version 3.0 5 + + + + + + +Schily's USER COMMANDS CDRECORD(1) + + + + -cchheecckkddrriivvee + Checks if a driver for the current drive is present and + exit. If the drive is a known drive, ccddrreeccoorrdd uses + exit code 0. + + -cclloonnee + Tells ccddrreeccoorrdd to handle images created by _r_e_a_d_c_d + -_c_l_o_n_e. The -cclloonnee write mode may only be used in con- + junction with the -rraaww9966rr or -rraaww1166 option. Using + -cclloonnee together with -rraaww9966rr is preferred as it allows + to write all sub-channel data. The -rraaww1166 option + should only be used with drives that do not support to + write in -rraaww9966rr mode. + + Note that copying in cclloonnee mode disables certain levels + of error correction and thus always results in a qual- + ity degradation. Avoid copying audio CDs in cclloonnee mode + for this reason. + + ccuueeffiillee==_f_i_l_e_n_a_m_e + Take all recording-related information from a CDRWIN- + compliant CCUUEE sshheeeett file. No track-file arguments to + ccddrreeccoorrdd are allowed when this option is present and + one of the following options: -ddaaoo, -ssaaoo, -rraaww, + -rraaww1166, -rraaww9966rr is needed in addition. + + ddeeffpprreeggaapp==# + Set the default pre-gap size for all tracks except + track number 1. This option currently only makes sense + with the TEAC drive when creating track-at-once disks + without the 2-second silence before each track. + This option may go away in the future. + + ddrriivveerr==_n_a_m_e + Allows the user to manually select a driver for the + device. The reason for the existence of the + ddrriivveerr==_n_a_m_e option is to allow users to use ccddrreeccoorrdd + with drives that are similar to supported drives but + not known directly by ccddrreeccoorrdd. All drives made after + 1997 should be MMC-standard-compliant and thus sup- + ported by one of the MMC drivers. It is most unlikely + that ccddrreeccoorrdd is unable to find the right driver + automatically. Use this option with extreme care. If a + wrong driver is used for a device, the possibility of + creating corrupted disks is high. The minimum problem + related to a wrong driver is that the -ssppeeeedd or -dduummmmyy + will not work. + + + + + + + + +Joerg Schilling Last change: Version 3.0 6 + + + + + + +Schily's USER COMMANDS CDRECORD(1) + + + + The following driver names are supported: + + hheellpp To get a list of possible drivers together with a + short description. + + mmmmcc__bbdd + The generic SCSI-3/mmc BluRay driver is auto- + selected whenever ccddrreeccoorrdd finds an MMC-compliant + drive that does support to write BluRay media or a + multi system that contains a BluRay disk as the + current medium. This driver tries to close the + tray, checks the medium found in the tray and then + branches to the driver that matches the current + medium. + + mmmmcc__bbddrr + The generic SCSI-3/mmc BluRay driver is auto- + selected whenever ccddrreeccoorrdd finds an MMC-compliant + drive that does support to write BluRay BD-R media + or a multi system that contains a BluRay BD-R disk + as the current medium. + + mmmmcc__bbddrree + The generic SCSI-3/mmc BluRay driver is auto- + selected whenever ccddrreeccoorrdd finds an MMC-compliant + drive that does support to write BluRay BD-RE + media or a multi system that contains a BluRay + BD-RE disk as the current medium. + + mmmmcc__ccdd + The generic SCSI-3/mmc CD-ROM driver is auto- + selected whenever ccddrreeccoorrdd finds an MMC-compliant + drive that does not identify itself to support + writing at all, or that only identifies to support + media or write modes not implemented in ccddrreeccoorrdd. + + mmmmcc__ccdd__ddvvdd + The generic SCSI-3/mmc CD/DVD/BluRay driver is + auto-selected whenever ccddrreeccoorrdd finds an MMC-2 or + MMC-3-compliant drive that seems to support more + than one medium type and the tray is open or no + medium could be found to select the right driver. + This driver tries to close the tray, checks the + medium found in the tray and then branches to the + driver that matches the current medium. + + mmmmcc__ccddrr + The generic SCSI-3/mmc CD-R/CD-RW driver is auto- + selected whenever ccddrreeccoorrdd finds an MMC-compliant + drive that only supports to write CDs or a multi + system drive that contains a CD as the current + medium. + + + +Joerg Schilling Last change: Version 3.0 7 + + + + + + +Schily's USER COMMANDS CDRECORD(1) + + + + mmmmcc__ccddrr__ssoonnyy + The generic SCSI-3/mmc CD-R/CD-RW driver is auto- + selected whenever ccddrreeccoorrdd would otherwise select + the mmmmcc__ccddrr driver but the device seems to be made + by Sony. The mmmmcc__ccddrr__ssoonnyy is definitely needed + for the Sony CDU 928 as this drive does not com- + pletely implement the MMC standard and some of the + MMC SCSI commands have to be replaced by Sony + proprietary commands. It seems that all Sony + drives (even newer ones) still implement the Sony + proprietary SCSI commands so it has not yet become + a problem to use this driver for all Sony drives. + If you find a newer Sony drive that does not work + with this driver, please report. + + mmmmcc__ddvvdd + The generic SCSI-3/mmc-2 DVD-R/DVD-RW driver is + auto-selected whenever ccddrreeccoorrdd finds an MMC-2 or + MMC-3-compliant drive that supports to write DVDs + and an appropriate medium is loaded. There is no + Track At Once mode for DVD writers. + + mmmmcc__ddvvddpplluuss + The generic SCSI-3/mmc-3 DVD+R/DVD+RW driver is + auto-selected whenever one of the DVD+ media types + that are incompatible to each other is found. It + checks media and then branches to the driver that + matches the current medium. + + mmmmcc__ddvvddpplluussrr + The generic SCSI-3/mmc-3 DVD+R driver is auto- + selected whenever a DVD+R medium is found in an + appropriate writer. Note that for unknown reason, + the DVD+RW Alliance does not like that there is a + simulation mode for DVD+R media. The author of + ccddrreeccoorrdd tries to convince manufacturers to imple- + ment a simulation mode for DVD+R and implement + support. DVD+R only supports one write mode that + is somewhere between Track At Once and Packet + writing; this mode is selected in ccddrreeccoorrdd via the + -ddaaoo/-ssaaoo option. + + mmmmcc__ddvvddpplluussrrww + The generic SCSI-3/mmc-3 DVD+RW driver is auto- + selected whenever a DVD+RW medium is found in an + appropriate writer. As DVD+RW media need to be + formatted before their first use, cdrecord auto- + detects this medium state and performs a format + before it starts to write. Note that for unknown + reason, the DVD+RW Alliance does not like that + there is a simulation mode nor a way to erase + DVD+RW media. DVD+RW only supports one write mode + + + +Joerg Schilling Last change: Version 3.0 8 + + + + + + +Schily's USER COMMANDS CDRECORD(1) + + + + that is close to Packet writing; this mode is + selected in ccddrreeccoorrdd via the -ddaaoo/-ssaaoo option. + + ccww__77550011 + The driver for Matsushita/Panasonic CW-7501 is + auto-selected when ccddrreeccoorrdd finds this old pre-MMC + drive. CCddrreeccoorrdd supports all write modes for this + drive type. + + kkooddaakk__ppccdd__660000 + The driver for Kodak PCD-600 is auto-selected when + ccddrreeccoorrdd finds this old pre-MMC drive which has + been the first high speed (6x) CD-writer for a + long time. This drive behaves similarly to the + Philips CDD-521 drive. + + pphhiilliippss__ccdddd552211 + The driver for Philips CDD-521 is auto-selected + when ccddrreeccoorrdd finds a Philips CDD-521 drive (which + is the first CD-writer ever made) or one of the + other drives that are known to behave similarly to + this drive. All Philips CDD-521 or similar drives + (see other drivers in this list) do not support + Session At Once recording. + + pphhiilliippss__ccdddd552211__oolldd + The driver for Philips old CDD-521 is auto- + selected when ccddrreeccoorrdd finds a Philips CDD-521 + with very old firmware which has some known limi- + tations. + + pphhiilliippss__ccdddd552222 + The driver for Philips CDD-522 is auto-selected + when ccddrreeccoorrdd finds a Philips CDD-522 which is the + successor of the 521 or one of its variants with + Kodak label. CCddrreeccoorrdd does not support Session At + Once recording with these drives. + + pphhiilliippss__dduummbb + The driver for Philips CDD-521 with pessimistic + assumptions is never auto-selected. It may be + used by hand with drives that behave similarly to + the Philips CDD-521. + + ppiioonneeeerr__ddwwss111144xx + The driver for Pioneer DW-S114X is auto-selected + when ccddrreeccoorrdd finds one of the old non-MMC CD- + writers from Pioneer. + + ppllaassmmoonn__rrff44110000 + The driver for Plasmon RF 4100 is auto-selected + when ccddrreeccoorrdd finds this specific variant of the + + + +Joerg Schilling Last change: Version 3.0 9 + + + + + + +Schily's USER COMMANDS CDRECORD(1) + + + + Philips CDD-521. + + rriiccoohh__rroo11006600cc + The driver for Ricoh RO-1060C is auto-selected + when ccddrreeccoorrdd finds this drive. There is no real + support for this drive yet. + + rriiccoohh__rroo11442200cc + The driver for Ricoh RO-1420C is auto-selected + when ccddrreeccoorrdd finds a drive with this specific + variant of the Philips CDD-521 command set. + + ssccssii22__ccdd + The generic SCSI-2 CD-ROM driver is auto-selected + whenever ccddrreeccoorrdd finds a pre-MMC drive that does + not support writing or a pre-MMC writer that is + not supported by ccddrreeccoorrdd. + + ssoonnyy__ccdduu992244 + The driver for Sony CDU-924 / CDU-948 is auto- + selected whenever ccddrreeccoorrdd finds one of the old + pre-MMC CD-writers from Sony. + + tteeaacc__ccddrr5500 + The driver for Teac CD-R50S, Teac CD-R55S, JVC + XR-W2010, Pinnacle RCD-5020 is auto-selected when- + ever one of the drives is found that is known to + use the non-MMC command set used by TEAC and JVC. + Note that many drives from JVC will not work + because they do not correctly implement the docu- + mented command set and JVC has been unwilling to + fix or document the bugs. There is no support for + the Session At Once write mode yet. + + ttyyuuddeenn__eeww5500 + The driver for Taiyo Yuden EW-50 is auto-selected + when ccddrreeccoorrdd finds a drive with this specific + variant of the Philips CDD-521 command set. + + yyaammaahhaa__ccddrr110000 + The driver for Yamaha CDR-100 / CDR-102 is auto- + selected when ccddrreeccoorrdd finds one of the old pre- + MMC CD-writers from Yamaha. There is no support + for the Session At Once write mode yet. + + bbdd__ssiimmuull + The simulation BluRay driver allows to run timing + and speed tests with parameters that match the + behavior of BluRay writers. + + ccddrr__ssiimmuull + The simulation CD-R driver allows to run timing + + + +Joerg Schilling Last change: Version 3.0 10 + + + + + + +Schily's USER COMMANDS CDRECORD(1) + + + + and speed tests with parameters that match the + behavior of CD-writers. + + ddvvdd__ssiimmuull + The simulation DVD-R driver allows to run timing + and speed tests with parameters that match the + behavior of DVD writers. + + There are two special driver entries in the list: + ccddrr__ssiimmuull and ddvvdd__ssiimmuull. These driver entries are + designed to make timing tests at any speed or timing + tests for drives that do not support the -dduummmmyy option. + The simulation drivers implement a drive with a buffer + size of 1 MB that can be changed via the + CCDDRR__SSIIMMUULL__BBUUFFSSIIZZEE environment variable. The simulation + driver correctly simulates even a buffer underrun con- + dition. If the -dduummmmyy option is present, the simula- + tion is not aborted in case of a buffer underrun. + + ddrriivveerrooppttss==_o_p_t_i_o_n _l_i_s_t + Set driver specific options. The options are specified + as a comma separated list. To get a list of valid + options use ddrriivveerrooppttss==_h_e_l_p together with the -_c_h_e_c_k_- + _d_r_i_v_e option. If you like to set driver options + without running a typical ccddrreeccoorrdd task, you need to + use the -sseettddrrooppttss option in addition, otherwise the + command line parser in ccddrreeccoorrdd will complain. + Currently implemented driver options are: + + bbuurrnnffrreeee + Turn the support for Buffer Underrun Free writing + on. This only works for drives that support + Buffer Underrun Free technology. This may be + called: SSaannyyoo BBUURRNN--PPrrooooff, RRiiccoohh JJuusstt--LLiinnkk, YYaammaahhaa + LLoosssslleessss--LLiinnkk or similar. + + The default is to turn BBUURRNN--FFrreeee off, regardless + of the defaults of the drive. + + nnoobbuurrnnffrreeee + Turn the support for Buffer Underrun Free writing + off. + + vvaarriirreecc==_v_a_l_u_e + Turn on the PPlleexxttoorr VVaarriiRReecc writing mode. The man- + datory parameter _v_a_l_u_e is the laser power offset + and currently may be selected from -2, -1, 0, 1, + 2. In addition, you need to set the write speed + to 4 in order to allow VVaarriiRReecc to work. + + ggiiggaarreecc==_v_a_l_u_e + Manage the PPlleexxttoorr GGiiggaaRReecc writing mode. The + + + +Joerg Schilling Last change: Version 3.0 11 + + + + + + +Schily's USER COMMANDS CDRECORD(1) + + + + mandatory parameter _v_a_l_u_e is the disk capacity + ratio compared to normal recording and currently + may be selected from 0.6, 0.7, 0.8, 0.9, 1.0, 1,1, + 1.2, 1.3, 1.4. If values < 1.0 are used, then the + effect is similar to the YYaammaahhaa AAuuddiioo MMaasstteerr QQ.. RR.. + feature. If values > 1.0 are used, then the disk + capacity is increased. + + Not all drives support all GGiiggaaRReecc values. When a + drive uses the GGiiggaaRReecc feature, the write speed is + limited to 8x. + + aauuddiioommaasstteerr + Turn on the YYaammaahhaa AAuuddiioo MMaasstteerr QQ.. RR.. feature + which usually should result in high quality CDs + that have less reading problems in Hi-Fi players. + As this is implemented as a variant of the Session + At Once write mode, it will only work if you + select SAO write mode and there is no need to turn + it off. The AAuuddiioo MMaasstteerr mode will work with a + limited speed but may also be used with data CDs. + In AAuuddiioo MMaasstteerr mode, the pits on the CD will be + written larger than usual so the capacity of the + medium is reduced when turning this feature on. A + 74-minute CD will only have a capacity of 63 + minutes if AAuuddiioo MMaasstteerr is active and the capacity + of a 80-minute CD will be reduced to 68 minutes, + the capacity in will be reduced to 85% of the ori- + ginal capacity. On newer Plextor drives, this + feature is also present but the capacity will be + reduced to 86.66% of the original capacity. For + other factors on Plextor drives, see the ggiiggaarreecc + option above. + + ffoorrcceessppeeeedd + Normally, modern drives know the highest possible + speed for different media and may reduce the speed + in order to grant best write quality. This tech- + nology may be called: PPlleexxttoorr PPoowweerrRReecc, RRiiccoohh + JJuusstt--SSppeeeedd, YYaammaahhaa OOppttiimmuumm WWrriittee SSppeeeedd CCoonnttrrooll or + similar. Some drives (e.g. Plextor, Ricoh and + Yamaha) allow to force the drive to use the + selected speed even if the medium is so bad that + the write quality would be poor. This option tells + such a drive to force to use the selected speed + regardless of the medium quality. + + Use this option with extreme care and note that + the drive should know better which medium will + work at full speed. The default is to turn ffoorr-- + cceessppeeeedd off, regardless of the defaults of the + drive. + + + +Joerg Schilling Last change: Version 3.0 12 + + + + + + +Schily's USER COMMANDS CDRECORD(1) + + + + nnooffoorrcceessppeeeedd + Turn off the ffoorrccee ssppeeeedd feature. + + ssppeeeeddrreeaadd + Some ultra high speed drives such as 48x and fas- + ter drives from Plextor limit the read speed for + unknown media to e.g. 40x in order to avoid dam- + aged disks and drives. Using this option tells + the drive to read any media as fast as possible. + Be very careful as this may cause the media to + break in the drive while reading, resulting in + damaged media and drive! + + nnoossppeeeeddrreeaadd + Turn off unlimited read speed. + + ssiinngglleesseessssiioonn + Turn the drive into a single-session only drive. + This allows to read defective or non-compliant + (illegal) media with extremely non-standard addi- + tional (broken/illegal) TOC entries in the TOC + from the second or higher session. Some of these + disks become usable if only the information from + the first session is used. You need to enable + Single Session mode before you insert the defec- + tive disk! + + nnoossiinngglleesseessssiioonn + Turn off single-session mode. The drive will again + behave as usual. + + hhiiddeeccddrr + Hide the fact that a medium might be a recordable + medium. This allows to make CD-Rs look like CD- + ROMs and applications believe that the media in + the drive is not a CD-R. + + nnoohhiiddeeccddrr + Turn off hiding CD-R media. + + ttaattttooooiinnffoo + Use this option together with -cchheecckkddrriivvee to + retrieve the image size information for the YYaammaahhaa + DDiisskkTT@@22 feature. The images always have a line + length of 3744 pixels. Line number 0 (radius 0) + is mapped to the center of the disk. If you know + the inner and outer radii you will be able to + create a pre distorted image that later may appear + undistorted on the disk. + + ttaattttooooffiillee==_n_a_m_e + Use this option together with -cchheecckkddrriivvee to write + + + +Joerg Schilling Last change: Version 3.0 13 + + + + + + +Schily's USER COMMANDS CDRECORD(1) + + + + an image prepared for the YYaammaahhaa DDiisskkTT@@22 feature + to the medium. The file must be a file with raw + image B&W data (one byte per pixel) in a size as + retrieved by a previous call to ttaattttooooiinnffoo. If + the size of the image equals the maximum possible + size (3744 x 320 pixels), ccddrreeccoorrdd will use the + first part of the file. This first part then will + be written to the leftover space on the CD. + + Note that the image must be mirrored to be read- + able from the pick up side of the CD. + + llaayyeerrbbrreeaakk + Switch a drive with DVD-R/DL medium into llaayyeerr + jjuummpp rreeccoorrddiinngg recording mode and use automatic + layer-break position setup. + + By default, DVD-R/DL media is written in sseeqquueenn-- + ttiiaall rreeccoorrddiinngg mode that completely fills up both + layers. + + llaayyeerrbbrreeaakk==_v_a_l_u_e + Set up a manual layer-break value for DVD-R/DL and + DVD+R/DL. The specified layer-break value must + not be set to less than half of the recorded data + size and must not be set to more than the remain- + ing _L_a_y_e_r _0 _s_i_z_e of the medium. The manual + layer-break value needs to be a multiple of the + ECC sector size which is 16 logical 2048 byte sec- + tors in case of DVD media and 32 logical 2048 byte + sectors in case of HD-DVD or BD media. + + CCddrreeccoorrdd does not allow to write DL media in case + that the total amount of data is less then the + _L_a_y_e_r _0 _s_i_z_e of the medium except when a manual + layer-break has been specified by using the + llaayyeerrbbrreeaakk==_v_a_l_u_e option. + + -eejjeecctt + Eject disk after doing the work. Some devices (e.g. + Philips) need to eject the medium before creating a new + disk. Doing a -dummy test and immediately creating a + real disk would not work on these devices. + + -ffiixx The disk will only be fixated (i.e. a TOC for a CD- + reader will be written). This may be used, if for some + reason the disk has been written but not fixated. This + option currently does not work with old TEAC drives + (CD-R50S and CD-R55S). + + -ffoorrccee + Force to continue on some errors. Be careful when using + + + +Joerg Schilling Last change: Version 3.0 14 + + + + + + +Schily's USER COMMANDS CDRECORD(1) + + + + this option. CCddrreeccoorrdd implements several checks that + prevent you from doing unwanted things like damaging + CD-RW media by improper drives. Many of the sanity + checks are disabled when the -ffoorrccee option is used. + + This option also implements some tricks that will allow + you to blank bad CD-RW disks. + + -ffoorrmmaatt + Format a CD-RW/DVD-RW/DVD+RW/BD-RE disc. Formatting is + currently only implemented for DVD+RW and BD-RE media. + A 'maiden' DVD+RW or BD-RE medium needs to be formatted + before you may write to it. However, as ccddrreeccoorrdd auto- + detects the need for formatting in this case and auto + formats the medium before it starts writing, the -ffoorr-- + mmaatt option is only needed if you like to forcibly + reformat a DVD+RW or BD-RE medium. + + ffss==# Set the FIFO (ring buffer) size to #. You may use the + same syntax as in dddd(1), ssdddd(1) or ssttaarr(1). The number + representing the size is taken in bytes unless other- + wise specified. If a number is followed directly by + the letter `b', `k', `m', `s' or `f', the size is mul- + tiplied by 512, 1024, 1024*1024, 2048 or 2352. If the + size consists of numbers separated by `x' or `*', mul- + tiplication of the two numbers is performed. Thus + _f_s=_1_0_x_6_3_k will specify a FIFO size of 630 kBytes. + + The size specified by the _f_s= argument includes the + shared memory that is needed for administration. This + is at least one page of memory. If no _f_s= option is + present, ccddrreeccoorrdd will try to get the FIFO size value + from the CCDDRR__FFIIFFOOSSIIZZEE environment. The default FIFO + size is currently 4 MB. + + The FIFO is used to increase buffering for the real- + time writing process. It allows to run a pipe from + mmkkiissooffss directly into ccddrreeccoorrdd. If the FIFO is active + and a pipe from mmkkiissooffss into ccddrreeccoorrdd is used to create + a CD, ccddrreeccoorrdd will abort prior to do any modifications + on the disk if mmkkiissooffss dies before writing starts. The + recommended FIFO size is between 4 and 128 MBytes. As + a rule of thumb, the FIFO size should be at least equal + to the size of the internal buffer of the + CD/DVD/BluRay-recorder and no more than half of the + physical amount of RAM available in the machine. If + the FIFO size is big enough, the FIFO statistics will + print a FIFO empty count of zero and a FIFO min fill + not below 20%. It is not wise to use too much space + for the FIFO. If you need more than 8 MB to write a CD + at a speed less than 20x from an image on a local file + system on an idle machine, your machine is either + + + +Joerg Schilling Last change: Version 3.0 15 + + + + + + +Schily's USER COMMANDS CDRECORD(1) + + + + underpowered, has hardware problems or is mis- + configured. If you like to write DVDs or to write CDs + at higher speed, it makes sense to use at least 16 MB + for the FIFO. + + On old and small machines, you need to be more careful + with the FIFO size. If your machine has less than + 256 MB of physical RAM, you should not set up a FIFO + size that is more than 32 MB. The sun4c architecture + (e.g. a Sparcstation-2) has only MMU page table entries + for 16 MBytes per process. Using more than 14 MBytes + for the FIFO may cause the operating system in this + case to spend much time to constantly reload the MMU + tables. Newer machines from Sun do not have this MMU + hardware problem. The author has no information on PC + hardware reflecting this problem. + + Old Linux systems for non-x86 platforms have broken + definitions for the shared memory size. You need to fix + them and rebuild the kernel or manually tell ccddrreeccoorrdd + to use a smaller FIFO. + + If you have buffer underruns or similar problems (like + a constantly empty drive-buffer) and observe a zero + _f_i_f_o _e_m_p_t_y _c_o_u_n_t, you have hardware problems that + prevent the data from flowing fast enough from the ker- + nel memory to the drive. The FIFO size in this case is + sufficient, but you should check for a working DMA + setup. + + ggrraacceettiimmee==# + Set the grace time before starting to write to # + seconds. Values below 3 seconds are not allowed in + order to prevent the volume management from interrupt- + ing the write process. + + -iiggnnssiizzee + Ignore the known size of the medium. This option should + be used with extreme care, it exists only for debugging + purposes so do not use it for other reasons. It is not + needed to write disks with more than the nominal capa- + city. This option implies -oovveerrbbuurrnn. + + -iimmmmeedd + Tell cdrecord to set the SSCCSSII IIMMMMEEDD flag in certain + commands (load, eject, blank, close_track, + close_session). This can be useful on broken systems + with ATAPI hard-disk and CD/DVD/BluRay writer on the + same bus or with SCSI systems that do not use + disconnect/reconnect. These systems will freeze while + blanking or fixating a CD/DVD/BluRay or while a DVD + writer is filling up a session to the minimum amount + + + +Joerg Schilling Last change: Version 3.0 16 + + + + + + +Schily's USER COMMANDS CDRECORD(1) + + + + (approx. 800 MB). Setting the -iimmmmeedd flag will request + the command to return immediately while the operation + proceeds in background, making the bus usable for the + other devices and avoiding the system freeze. This is + an experimental feature which may work or not, depend- + ing on the model of the CD/DVD/BluRay writer. A + correct solution would be to set up a correct cabling + but there seem to be notebooks around that have been + set up the wrong way by the manufacturer. As it is + impossible to fix this problem in notebooks, the -iimmmmeedd + option has been added. + + A second experimental feature of the -iimmmmeedd flag is to + tell cdrecord to try to wait short times while writing + to the media. This is expected to free the IDE bus if + the CD/DVD/BluRay writer and the data source are con- + nected to the same IDE cable. In this case, the + CD/DVD/BluRay writer would otherwise usually block the + IDE bus for nearly all the time making it impossible to + fetch data from the source drive. See also the mmiinnbbuuff== + and -vv options. + + Use both features at your own risk. If it turns out + that it would make sense to have a separate option for + the wait feature, write to the author and convince him. + + -iinnqq Do an inquiry for the drive, print the inquiry info for + the drive and exit. + + -llooaadd + Load the media and exit. This only works with a tray- + loading mechanism but seems to be useful when using the + Kodak disk transporter. + + -lloocckk + Load the media, lock the door and exit. This only works + with a tray-loading mechanism but seems to be useful + when using the Kodak disk transporter. + + mmccnn==_m_e_d__c_a_t__n_r + Set the MMeeddiiaa CCaattaalloogg NNuummbbeerr of the CD to _m_e_d__c_a_t__n_r. + + mmiinnbbuuff==_v_a_l_u_e + The mmiinnbbuuff== option allows to define the minimum drive- + buffer fill ratio for the experimental ATAPI wait mode + that is intended to free the IDE bus to allow hard disk + and CD/DVD/BluRay writer to be on the same IDE cable. + As the wait mode currently only works when the verbose + option -vv has been specified, ccddrreeccoorrdd implies the ver- + bose option in case the -iimmmmeedd or mmiinnbbuuff== option has + been specified. Valid values for mmiinnbbuuff== are between + 25 and 95 for 25%...95% minimum drive-buffer fill + + + +Joerg Schilling Last change: Version 3.0 17 + + + + + + +Schily's USER COMMANDS CDRECORD(1) + + + + ratio. + + -mmeeddiiaa-iinnffoo + + -mmiinnffoo + Retrieve and print information about the state of the + medium. This option currently only works for MMC- + compliant drives. + + -mmssiinnffoo + Retrieve multi-session info in a form suitable for + mmkkiissooffss--11..1100 or later. + + This option makes only sense with a CD that contains at + least one closed session and is appendable (not finally + closed yet). Some drives create error messages if you + try to get the multi-session info for a disk that is + not suitable for this operation. + + -nnoocclloossee + Do not close the current track, useful only when in + packet writing mode. This is an experimental inter- + face. + + -nnooffiixx + Do not fixate the disk after writing the tracks. This + may be used to create an audio disk in steps. An un- + fixated disk can usually not be used on a non CD-writer + type drive but there are audio CD-players that will be + able to play such a disk. + + -oovveerrbbuurrnn + Allow ccddrreeccoorrdd to write more than the official size of + a medium. This feature is usually called _o_v_e_r_b_u_r_n_i_n_g + and depends on the fact that most blank media may hold + more space than the official size. As the official size + of the lead-out area on the disk is 90 seconds (6750 + sectors) and a disk usually works if there are at least + 150 sectors of lead out, all media may be overburned by + at least 88 seconds (6600 sectors). Most CD-recorders + only do overburning in SSAAOO or RRAAWW mode. Known excep- + tions are TEAC CD-R50S, TEAC CD-R55S and the Panasonic + CW-7502. Some drives do not allow to overburn as much + as you might like and limit the size of a CD to e.g. 76 + minutes. This problem may be circumvented by writing + the CD in RAW mode because this way the drive has no + chance to find the size before starting to burn. There + is no guarantee that your drive supports overburning at + all. Make a test to check if your drive implements the + feature. + + -ppaacckkeett + + + +Joerg Schilling Last change: Version 3.0 18 + + + + + + +Schily's USER COMMANDS CDRECORD(1) + + + + Set PPaacckkeett wwrriittiinngg mmooddee.. This is an experimental inter- + face. + + ppkkttssiizzee==# + Set the packet size to #, forces fixed packet mode. + This is an experimental interface. + + -pprrccaapp + Print the drive capabilities for SCSI-3/mmc-compliant + drives as obtained from mode page 0x2A. Values marked + with _k_B use 1000 bytes as kilo-byte, values marked with + _K_B use 1024 bytes as Kilo-byte. + + -sseettddrrooppttss + Set the driveropts specified by ddrriivveerrooppttss==_o_p_t_i_o_n _l_i_s_t,, + the ssppeeeedd of the drive and the dduummmmyy flag and exit. + This allows cdrecord to set drive specific parameters + that are not directly used by ccddrreeccoorrdd like e.g. ssiinn-- + ggllee sseessssiioonn mmooddee, hhiiddee ccddrr and similar. It is needed + in case that ddrriivveerrooppttss==_o_p_t_i_o_n _l_i_s_t should be called + without planning to run a typical ccddrreeccoorrdd task. + + ssppeeeedd==# + Set the speed factor of the writing process to #. # is + an integer, representing a multiple of what has been + defined as single speed for the medium. + + For CD-media, single speed is the audio playback speed. + This is about 150 KB/s for CD-ROM and about 172 KB/s + for CD-Audio. Single speed is about 1385 kB/s for DVD + media and about 4496 kB/s for BluRay media. + + If no _s_p_e_e_d option is present, ccddrreeccoorrdd will try to get + a drive specific speed value from the file + //eettcc//ddeeffaauulltt//ccddrreeccoorrdd and if it cannot find one, it + will try to get the speed value from the CCDDRR__SSPPEEEEDD + environment and later from the CCDDRR__SSPPEEEEDD== entry in + //eettcc//ddeeffaauulltt//ccddrreeccoorrdd. If no speed value could be + found, cdrecord uses a drive specific default speed. + The default for all new (MMC-compliant) drives is to + use the maximum supported by the drive. If you use + _s_p_e_e_d=_0 with a MMC-compliant drive, ccddrreeccoorrdd will + switch to the lowest possible speed for drive and + medium. If you are using an old (non-MMC) drive that + has problems with _s_p_e_e_d=_2 or _s_p_e_e_d=_4, you should try + _s_p_e_e_d=_0. + + -tteexxtt + Write CD-Text information based on information taken + from a file that contains ascii information for the + text strings. CCddrreeccoorrdd supports CD-Text information + based on the content of the **..iinnff files created by + + + +Joerg Schilling Last change: Version 3.0 19 + + + + + + +Schily's USER COMMANDS CDRECORD(1) + + + + ccddddaa22wwaavv and CD-Text information based on the content + from a CCUUEE sshheeeett file. If a CCUUEE sshheeeett file contains + both (binary CDTEXTFILE and text based SONGWRITER) + entries, then the information based on the CDTEXTFILE + entry will win. + + You need to use the -uusseeiinnffoo option in addition in + order to tell ccddrreeccoorrdd to read the **..iinnff files or + ccuueeffiillee==_f_i_l_e_n_a_m_e in order to tell ccddrreeccoorrdd to read a + CCUUEE sshheeeett file in addition. If you like to write your + own CD-Text information, edit the **..iinnff files or the + CCUUEE sshheeeett file with a text editor and change the fields + that are relevant for CD-Text. + + tteexxttffiillee==_f_i_l_e_n_a_m_e + Write CD-Text based on information found in the binary + file _f_i_l_e_n_a_m_e. This file must contain information in a + data format defined in the SCSI-3 MMC-2 standard and in + the Red Book. The four-byte-sized header that is + defined in the SCSI standard is optional and allows to + make the recognition of correct data less ambiguous. + This is the best option to be used to copy CD-Text data + from existing CDs that already carry CD-Text informa- + tion. To get data in a format suitable for this option + use ccddrreeccoorrdd -vvvv -ttoocc to extract the information from + disk. If both, tteexxttffiillee==_f_i_l_e_n_a_m_e and CD-Text informa- + tion from **..iinnff or **..ccuuee files are present, + tteexxttffiillee==_f_i_l_e_n_a_m_e will overwrite the other information. + + -ttoocc Retrieve and print out the table of contents or PMA of + a CD. With this option, ccddrreeccoorrdd will work with CD-R + drives and with CD-ROM drives. + + -wwaaiittii + Wait for input to become available on standard input + before trying to open the SCSI driver. This allows + ccddrreeccoorrdd to read its input from a pipe even when writ- + ing additional sessions to a multi-session disk. When + writing another session to a multi-session disk, + mmkkiissooffss needs to read the old session from the device + before writing output. This cannot be done if ccddrreeccoorrdd + opens the SCSI driver at the same time. + + -uusseeiinnffoo + Use **..iinnff files to overwrite audio options. If this + option is used, the pregap size information, the index + information, the pre-emphasis information and the CD- + Text information is read from the **..iinnff file that is + associated with the file that contains the audio data + for a track. + + If used together with the -aauuddiioo option, ccddrreeccoorrdd may + + + +Joerg Schilling Last change: Version 3.0 20 + + + + + + +Schily's USER COMMANDS CDRECORD(1) + + + + be used to write audio CDs from a pipe from ccddddaa22wwaavv if + you call ccddrreeccoorrdd with the **..iinnff files as track parame- + ter list instead of using audio files. The audio data + is read from ssttddiinn in this case. See _E_X_A_M_P_L_E_S section + below. CCddrreeccoorrdd first verifies that ssttddiinn is not con- + nected to a terminal and runs some heuristic con- + sistency checks on the **..iinnff files and then sets the + track lengths from the information in the **..iinnff files. + + If you like to write from ssttddiinn, make sure that + cdrecord is called with a large enough FIFO size, + reduce the write speed to a value below the read speed + of the source drive and switch the burn-free option for + the recording drive on. + + + SSCCSSII ooppttiioonnss + ddeevv==_t_a_r_g_e_t + Set the SCSI target for the CD/DVD/BluRay-recorder, see + notes above. A typical target device specification is + ddeevv==_1,_6,_0 . If a filename must be provided together + with the numerical target specification, the filename + is implementation specific. The correct filename in + this case can be found in the system specific manuals + of the target operating system. On a _F_r_e_e_B_S_D system + without _C_A_M support, you need to use the control device + (e.g. /_d_e_v/_r_c_d_0._c_t_l). A correct device specification + in this case may be ddeevv==/_d_e_v/_r_c_d_0._c_t_l:@ . + + GGeenneerraall SSCCSSII aaddddrreessssiinngg + The _t_a_r_g_e_t _d_e_v_i_c_e to the ddeevv== option refers to + _s_c_s_i_b_u_s/_t_a_r_g_e_t/_l_u_n of the CD/DVD/BluRay-recorder. Com- + munication on _S_u_n_O_S is done with the SCSI general + driver ssccgg.. Other operating systems are using a library + simulation of this driver. Possible syntax is: ddeevv== + _s_c_s_i_b_u_s,_t_a_r_g_e_t,_l_u_n or ddeevv== _t_a_r_g_e_t,_l_u_n. In the latter + case, the CD/DVD/BluRay-recorder has to be connected to + the default SCSI bus of the machine. _S_c_s_i_b_u_s, _t_a_r_g_e_t + and _l_u_n are integer numbers. Some operating systems or + SCSI transport implementations may require to specify a + filename in addition. In this case the correct syntax + for the device is: ddeevv== _d_e_v_i_c_e_n_a_m_e:_s_c_s_i_b_u_s,_t_a_r_g_e_t, or + ddeevv== _d_e_v_i_c_e_n_a_m_e:_t_a_r_g_e_t,_l_u_n. If the name of the device + node that has been specified on such a system refers to + exactly one SCSI device, a shorthand in the form ddeevv== + _d_e_v_i_c_e_n_a_m_e:@ or ddeevv== _d_e_v_i_c_e_n_a_m_e:@,_l_u_n may be used + instead of ddeevv== _d_e_v_i_c_e_n_a_m_e:_s_c_s_i_b_u_s,_t_a_r_g_e_t, + + RReemmoottee SSCCSSII aaddddrreessssiinngg + To access remote SCSI devices, you need to prepend the + SCSI device name by a remote device indicator. The + remote device indicator is either RREEMMOOTTEE::_u_s_e_r@_h_o_s_t: or + + + +Joerg Schilling Last change: Version 3.0 21 + + + + + + +Schily's USER COMMANDS CDRECORD(1) + + + + RREEMMOOTTEE::_h_o_s_t: A valid remote SCSI device name may be: + RREEMMOOTTEE::_u_s_e_r@_h_o_s_t: to allow remote SCSI bus scanning or + RREEMMOOTTEE::_u_s_e_r@_h_o_s_t:_1,_0,_0 to access the SCSI device at + _h_o_s_t connected to SCSI bus # 1,target 0, lun 0. In + order to allow remote access to a specific _h_o_s_t, the + rrssccssii(1) program needs to be present and configured on + the _h_o_s_t. + + AAlltteerrnnaattee SSCCSSII ttrraannssppoorrttss + CCddrreeccoorrdd is completely based on SSCCSSII commands but this + is no problem as all CD/DVD/BluRay writers ever made + use SSCCSSII commands for the communication. Even AATTAAPPII + drives are just SSCCSSII drives that inherently use the _A_T_A + _p_a_c_k_e_t _i_n_t_e_r_f_a_c_e as SSCCSSII command transport layer build + into the IDE (ATA) transport. You may need to specify + an alternate transport layer on the command line if + your OS does not implement a fully integrated kernel + driver subsystem that allows to access any drive using + SSCCSSII commands via a single unique user interface. + + To access SCSI devices via alternate transport layers, + you need to prepend the SCSI device name by a transport + layer indicator. The transport layer indicator may be + something like UUSSCCSSII:: or AATTAAPPII::. To get a list of sup- + ported transport layers for your platform, use ddeevv== + _H_E_L_P: + + PPoorrttaabbiilliittyy BBaacckkggrroouunndd + To make ccddrreeccoorrdd portable to all UNIX platforms, the + syntax ddeevv== _d_e_v_i_c_e_n_a_m_e:_s_c_s_i_b_u_s,_t_a_r_g_e_t, is preferred as + it hides OS specific knowledge about device names from + the user. A specific OS may not necessarily support a + way to specify a real device file name nor a way to + specify _s_c_s_i_b_u_s,_t_a_r_g_e_t,_l_u_n. + + _S_c_s_i_b_u_s 0 is the default SCSI bus on the machine. Watch + the boot messages for more information or look into + //vvaarr//aaddmm//mmeessssaaggeess for more information about the SCSI + configuration of your machine. If you have problems to + figure out what values for _s_c_s_i_b_u_s,_t_a_r_g_e_t,_l_u_n should be + used, try the -ssccaannbbuuss option of ccddrreeccoorrdd described + below. + + UUssiinngg llooggiiccaall nnaammeess ffoorr ddeevviicceess + If no _d_e_v option is present, ccddrreeccoorrdd will try to get + the device from the CCDDRR__DDEEVVIICCEE environment. + + If a file /etc/default/cdrecord exists, and if the + argument to the ddeevv== option or the CCDDRR__DDEEVVIICCEE environ- + ment does not contain the characters ',', '/', '@' or + ':', it is interpreted as a device label name that was + defined in the file /etc/default/cdrecord (see FILES + + + +Joerg Schilling Last change: Version 3.0 22 + + + + + + +Schily's USER COMMANDS CDRECORD(1) + + + + section). + + AAuuttoottaarrggeett MMooddee + If no ddeevv== option and no CCDDRR__DDEEVVIICCEE environment is + present, or if it only contains a transport specifier + but no address notation, ccddrreeccoorrdd tries to scan the + SCSI address space for CD-ROM drives. If exactly one + is found, this is used by default. + + ddeebbuugg==#, -dd + Set the misc debug value to # (with debug=#) or incre- + ment the misc debug level by one (with -d). If you + specify -_d_d, this equals to ddeebbuugg==_2. This may help to + find problems while opening a driver for libscg as well + as with sector sizes and sector types. Using -ddeebbuugg + slows down the process and may be the reason for a + buffer underrun. + + kkddeebbuugg==#, kkdd==# + Tell the ssccgg-driver to modify the kernel debug value + while SCSI commands are running. + + -rreesseett + Try to reset the SCSI bus where the CD-recorder is + located. This does not work on all operating systems. + + -ssccaannbbuuss + Scan all SCSI devices on all SCSI busses and print the + inquiry strings. This option may be used to find SCSI + address of the CD/DVD/BluRay-recorder on a system. The + numbers printed out as labels are computed by: bbuuss ** + 110000 ++ ttaarrggeett + + -ssiilleenntt, -ss + Do not print out a status report for failed SCSI com- + mands. + + ttiimmeeoouutt==# + Set the default SCSI command timeout value to # + seconds. The default SCSI command timeout is the + minimum timeout used for sending SCSI commands. If a + SCSI command fails due to a timeout, you may try to + raise the default SCSI command timeout above the + timeout value of the failed command. If the command + runs correctly with a raised command timeout, please + report the better timeout value and the corresponding + command to the author of the program. If no ttiimmeeoouutt== + option is present, a default timeout of 40 seconds is + used. + + ttss==# Set the maximum transfer size for a single SCSI command + to #. The syntax for the ttss== option is the same as for + + + +Joerg Schilling Last change: Version 3.0 23 + + + + + + +Schily's USER COMMANDS CDRECORD(1) + + + + cdrecord fs=# or sdd bs=#. + + If no ttss== option has been specified, ccddrreeccoorrdd defaults + to a transfer size of 63 kB. If libscg gets lower + values from the operating system, the value is reduced + to the maximum value that is possible with the current + operating system. Sometimes, it may help to further + reduce the transfer size or to enhance it, but note + that it may take a long time to find a better value by + experimenting with the ttss== option. + + -VV Increment the verbose level in respect of SCSI command + transport by one. This helps to debug problems during + the writing process, that occur in the CD/DVD/BluRay- + recorder. If you get incomprehensible error messages + you should use this flag to get more detailed output. + -VVVV will show data buffer content in addition. Using + -VV or -VVVV slows down the process and may be the reason + for a buffer underrun. + + +TTRRAACCKK OOPPTTIIOONNSS + Track options may be mixed with track file names. + + -aauuddiioo + If this flag is present, all subsequent tracks are + written in CCDD--DDAA (similar to Red Book) audio format. + The file with data for this tracks should contain + stereo, 16-bit digital audio with 44100 samples/s. The + byte order should be the following: MSB left, LSB left, + MSB right, LSB right, MSB left and so on. The track + should be a multiple of 2352 bytes. It is not possible + to put the master image of an audio track on a raw disk + because data will be read in multiple of 2352 bytes + during the recording process. + + If a filename ends in ._a_u or ._w_a_v the file is con- + sidered to be a structured audio data file. CCddrreeccoorrdd + assumes that the file in this case is a Sun audio file + or a Microsoft .WAV file and extracts the audio data + from the files by skipping over the non-audio header + information. In all other cases, cdrecord will only + work correctly if the audio data stream does not have + any header. Because many structured audio files do not + have an integral number of blocks (1/75th second each) + in length, it is often necessary to specify the -ppaadd + option as well. ccddrreeccoorrdd recognizes that audio data in + a .WAV file is stored in Intel (little-endian) byte + order, and will automatically byte-swap the data if the + CD-recorder requires big-endian data. CCddrreeccoorrdd will + reject any audio file that does not match the Red Book + requirements of 16-bit stereo samples in PCM coding at + + + +Joerg Schilling Last change: Version 3.0 24 + + + + + + +Schily's USER COMMANDS CDRECORD(1) + + + + 44100 samples/second. + + Using other structured audio data formats as input to + ccddrreeccoorrdd will usually work if the structure of the data + is the structure described above (raw pcm data in big- + endian byte order). However, if the data format + includes a header, you will hear a click at the start + of the track. + + If neither -_d_a_t_a nor -_a_u_d_i_o have been specified, + ccddrreeccoorrdd defaults to -_a_u_d_i_o for all filenames that end + in ._a_u or ._w_a_v and to -_d_a_t_a for all other files. + + -ccddii If this flag is present, the TOC type for the disk is + set to CCDDII. This only makes sense with XA disks. + + -ccooppyy + If this flag is present, all TOC entries for subsequent + audio tracks of the resulting CD will indicate that the + audio data has permission to be copied without limit. + This option has no effect on data tracks. + + -ddaattaa + If this flag is present, all subsequent tracks are + written in CCDD--RROOMM mmooddee 11 (Yellow Book) format. The data + size is a multiple of 2048 bytes. The file with track + data should contain an IISSOO--99666600 or RRoocckk RRiiddggee filesys- + tem image (see mmkkiissooffss for more details). If the track + data is an uuffss filesystem image, fragment size should + be set to 2 KB or more to allow CD-drives with 2 KB + sector size to be used for reading. + + -_d_a_t_a is the default, if no other flag is present and + the file does not appear to be of one of the well known + audio file types. + + If neither -_d_a_t_a nor -_a_u_d_i_o have been specified, + ccddrreeccoorrdd defaults to -_a_u_d_i_o for all filenames that end + in ._a_u or ._w_a_v and to -_d_a_t_a for all other files. + + iinnddeexx==_l_i_s_t + Sets an index list for the next track. In index list + is a comma separated list of numbers that are counting + from index 1. The first entry in this list must contain + a 0, the following numbers must be an ascending list of + numbers (counting in 1/75 seconds) that represent the + start of the indices. An index list in the form: + 0,7500,15000 sets index 1 to the start of the track, + index 2 100 seconds from the start of the track and + index 3 200 seconds from the start of the track. + + -iissoossiizzee + + + +Joerg Schilling Last change: Version 3.0 25 + + + + + + +Schily's USER COMMANDS CDRECORD(1) + + + + Use the IISSOO--99666600 file system size as the size of the + next track. This option is needed if you want ccddrreeccoorrdd + to directly read the image of a track from a raw disk + partition or from a _T_A_O master CD. In the first case + the option -iissoossiizzee is needed to limit the size of the + CD to the size of the ISO filesystem. In the second + case the option -iissoossiizzee is needed to prevent ccddrreeccoorrdd + from reading the two run-out blocks that are appended + by each CD-recorder in track-at-once mode. These two + run-out blocks cannot be read and would cause a buffer + underrun that would cause a defective copy. + + Note that if this option is used on files created by + mmkkiissooffss, the padding data that was added by mmkkiissooffss is + lost and replaced by padding added by cdrecord. This + may also change the amount of padding. + + In case ccddrreeccoorrdd reads the track data from _s_t_d_i_n, only + the first track may be used with the -iissoossiizzee option. + + If -iissoossiizzee is used for a track, ccddrreeccoorrdd will automat- + ically add padding for this track as if the -ppaadd option + had been used but the amount of padding may be less + than the padding written by mmkkiissooffss. Note that if you + use -iissoossiizzee on a track that contains Sparc boot infor- + mation, the boot information will be lost. + + Note also that this option cannot be used to determine + the size of a file system if the -mmuullttii option is + present. + + iissrrcc==_I_S_R_C__n_u_m_b_e_r + Set the IInntteerrnnaattiioonnaall SSttaannddaarrdd RReeccoorrddiinngg NNuummbbeerr for the + next track to _I_S_R_C__n_u_m_b_e_r. + + -mmooddee22 + If this flag is present, all subsequent tracks are + written in CCDD--RROOMM mmooddee 22 format. The data size is a + multiple of 2336 bytes. + + -nnooccooppyy + If this flag is present, all TOC entries for subsequent + audio tracks of the resulting CD will indicate that the + audio data has permission to be copied only once for + personal use - this is the default. + + -nnooppaadd + Do not pad the following tracks - the default. + + -nnoopprreeeemmpp + If this flag is present, all TOC entries for subsequent + audio tracks will indicate that the audio data has been + + + +Joerg Schilling Last change: Version 3.0 26 + + + + + + +Schily's USER COMMANDS CDRECORD(1) + + + + mastered with linear data - this is the default. + + -nnoosshhoorrttttrraacckk + Re-enforce the Red Book track length standard. Tracks + must be at least 4 seconds. + + -ppaadd If the track is a data track, 15 sectors of zeroed data + will be added to the end of this and each subsequent + data track. In this case, the -ppaadd option is super- + seded by the ppaaddssiizzee== option. It will remain however as + a shorthand for ppaaddssiizzee==_1_5_s. If the -_p_a_d option refers + to an audio track, ccddrreeccoorrdd will pad the audio data to + be a multiple of 2352 bytes. The audio data padding is + done with binary zeroes which is equal to absolute + silence. + + -ppaadd remains valid until disabled by -nnooppaadd. + + ppaaddssiizzee==# + Set the amount of data to be appended as padding to the + next track to #. Opposed to the behavior of the -ppaadd + option, the value for _p_a_d_s_i_z_e= is reset to zero for + each new track. Cdrecord assumes a sector size of 2048 + bytes for the _p_a_d_s_i_z_e= option, independent from the + real sector size and independent from the write mode. + The megabytes mentioned in the verbose mode output how- + ever are counting the output sector size which is e.g. + 2448 bytes when writing in RAW/RAW96 mode. See the ffss= + option for possible arguments. To pad the equivalent + of 20 minutes on a CD, you may write ppaaddssiizzee==20x60x75s. + Use this option if your CD-drive is not able to read + the last sectors of a track or if you want to be able + to read the CD on a LLiinnuuxx system with the ISO-9660 + filesystem read-ahead bug. If an empty file is used + for track data, this option may be used to create a + disk that is entirely made of padding. This may e.g. + be used to find out how much overburning is possible + with a specific medium. + + -pprreeeemmpp + If this flag is present, all TOC entries for subsequent + audio tracks will indicate that the audio data has been + sampled with 50/15 microsec pre-emphasis. The data + however is not modified during the process of transfer- + ring from file to disk. This option has no effect on + data tracks. + + pprreeggaapp==# + Set the pre-gap size for the next track. This option + currently only makes sense with the TEAC drive when + creating track-at-once disks without the 2-second + silence before each track. + + + +Joerg Schilling Last change: Version 3.0 27 + + + + + + +Schily's USER COMMANDS CDRECORD(1) + + + + This option may go away in the future. + + -ssccmmss + If this flag is present, all TOC entries for subsequent + audio tracks of the resulting CD will indicate that the + audio data has no permission to be copied anymore. + + -sshhoorrttttrraacckk + Allow all subsequent tracks to violate the Red Book + track length standard which requires a minimum track + length of 4 seconds. This option is only useful when + used in SAO or RAW mode. Not all drives support this + feature. The drive must accept the resulting CUE sheet + or support RAW writing. + + -sswwaabb + If this flag is present, audio data is assumed to be in + byte-swapped (little-endian) order. Some types of CD- + writers e.g. Yamaha, Sony and the new SCSI-3/mmc drives + require audio data to be presented in little-endian + order, while other writers require audio data to be + presented in the big-endian (network) byte order nor- + mally used by the SCSI protocol. CCddrreeccoorrdd knows if a + CD-recorder needs audio data in big- or little-endian + order, and corrects the byte order of the data stream + to match the needs of the recorder. You only need the + -_s_w_a_b flag if your data stream is in Intel (little- + endian) byte order. + + Note that the verbose output of ccddrreeccoorrdd will show you + if swapping is necessary to make the byte order of the + input data fit the required byte order of the recorder. + CCddrreeccoorrdd will not show you if the -_s_w_a_b flag was actu- + ally present for a track. + + ttssiizzee==# + If the master image for the next track has been stored + on a raw disk, use this option to specify the valid + amount of data on this disk. If the image of the next + track is stored in a regular file, the size of that + file is taken to determine the length of this track. + If the track contains an ISO-9660 filesystem image use + the -_i_s_o_s_i_z_e option to determine the length of that + filesystem image. + In Disk At Once mode and with some drives that use the + TEAC programming interface, even in Track At Once mode, + ccddrreeccoorrdd needs to know the size of each track before + starting to write the disk. Cdrecord now checks this + and aborts before starting to write. If this happens + you will need to run mmkkiissooffss -pprriinntt-ssiizzee before and use + the output (with `s' appended) as an argument to the + ttssiizzee= option of ccddrreeccoorrdd (e.g. tsize=250000s). + + + +Joerg Schilling Last change: Version 3.0 28 + + + + + + +Schily's USER COMMANDS CDRECORD(1) + + + + See ffss= option for possible arguments. + + -xxaa If this flag is present, all subsequent tracks are + written in CCDD--RROOMM XXAA mmooddee 22 ffoorrmm 11 format. The data + size is a multiple of 2048 bytes. The XA sector sub- + headers will be created by the drive. With this + option, the write mode is the same as with the -mmuullttii + option. + + -xxaa11 If this flag is present, all subsequent tracks are + written in CCDD--RROOMM XXAA mmooddee 22 ffoorrmm 11 format. The data + size is a multiple of 2056 bytes. The XA sector sub- + headers are part of the user data and have to be sup- + plied by the application that prepares the data to be + written. + + -xxaa22 If this flag is present, all subsequent tracks are + written in CCDD--RROOMM XXAA mmooddee 22 ffoorrmm 22 format. The data is + a multiple of 2324 bytes. The XA sector sub-headers + will be created by the drive. + + -xxaammiixx + If this flag is present, all subsequent tracks are + written in a way that allows a mix of CCDD--RROOMM XXAA mmooddee 22 + ffoorrmm 11//22 format. The data size is a multiple of 2332 + bytes. The XA sector sub-headers are part of the user + data and have to be supplied by the application that + prepares the data to be written. The CRC and the P/Q + parity ECC/EDC information (depending on the sector + type) have to be supplied by the application that + prepares the data to be written. + + +EEXXAAMMPPLLEESS + For all examples below, it will be assumed that the machine + includes two drives. The reader is assumed to be target 1 + on the primary SCSI bus. The CD/DVD/BluRay-recorder is + assumed to be target 2 on the primary SCSI bus of the + machine. + + If there is only one drive in the machine, the ddeevv== option + may be omitted in the examples below, but in this case the + examples for replication without intermediate files do not + apply. + + + RReepplliiccaattiinngg aann AAuuddiioo CCDD + To copy an audio CD in the most accurate way, first run + + cdda2wav dev=1,0 paraopts=proof -vall cddb=0 -B -Owav + + + + + +Joerg Schilling Last change: Version 3.0 29 + + + + + + +Schily's USER COMMANDS CDRECORD(1) + + + + and then run + + cdrecord dev=2,0 -v -dao -useinfo -text *.wav + + This will try to copy track indices and to read CD-Text + information from disk. If there is no CD-Text information, + ccddddaa22wwaavv will try to get the information from freedb.org + instead. + + To copy an audio CD from a pipe (without intermediate + files), first run + + cdda2wav dev=1,0 -vall cddb=0 -info-only + + and then run + + cdda2wav dev=1,0 -no-infofile -B -Oraw - | \ + cdrecord dev=2,0 -v -dao -audio -useinfo -text *.inf + + This will get all information (including track size info) + from the **..iinnff files and then read the audio data from + stdin. + + If you like to write from ssttddiinn, make sure that cdrecord is + called with a large enough FIFO size (e.g. ffss==112288mm), reduce + the write speed to a value below the read speed of the + source drive (e.g. ssppeeeedd==1122), and switch the burn-free + option for the recording drive on by adding + ddrriivveerrooppttss==bbuurrnnffrreeee. For the same reason, it is not recom- + mended to extract the audio data in paranoia mode in this + case. + + + RReepplliiccaattiinngg aa ssiimmppllee CCDD--RROOMM//DDVVDD--RROOMM//BBDD--RROOMM + To copy a simple disk, first read the master using: + + readcd dev=1,0 f=somefile + + Then write the disk using: + + cdrecord dev=2,0 -raw96r -clone -v somefile + + + RReepplliiccaattiinngg aa CCDD--RROOMM iinn cclloonnee mmooddee + To copy a CD in clone mode, first read the master CD using: + + readcd dev=1,0 -clone f=somefile + + or (in case the CD contains many sectors that are unreadable + by intention) by calling: + + + + + +Joerg Schilling Last change: Version 3.0 30 + + + + + + +Schily's USER COMMANDS CDRECORD(1) + + + + readcd dev=1,0 -clone -nocorr f=somefile + + This will create the files _s_o_m_e_f_i_l_e and _s_o_m_e_f_i_l_e._t_o_c. Then + write the CD using: + + cdrecord dev=2,0 -raw96r -clone -v somefile + + + CCrreeaattiinngg aann AAuuddiioo CCDD + To record a pure CD-DA (audio) at single speed, with each + track contained in files named _t_r_a_c_k_0_1._c_d_a_u_d_i_o, + _t_r_a_c_k_0_2._c_d_a_u_d_i_o, etc.: + + cdrecord -v speed=1 dev=2,0 -dao -audio track*.cdaudio + + To check if it will be OK to use double speed for the exam- + ple above, use the dummy write option: + + cdrecord -v -dummy speed=2 dev=2,0 -dao -audio + track*.cdaudio + + CCrreeaattiinngg aa mmiixxeedd AAuuddiioo--DDaattaa CCDD + To record a mixed-mode CD with an ISO-9660 filesystem from + _c_d_i_m_a_g_e._r_a_w on the first track, the other tracks being audio + tracks from the files _t_r_a_c_k_0_1._c_d_a_u_d_i_o, _t_r_a_c_k_0_2._c_d_a_u_d_i_o, + etc.: + + cdrecord -v dev=2,0 -dao cdimage.raw -audio + track*.cdaudio + + CCrreeaattiinngg aa CCDD--RROOMM//DDVVDD--RROOMM//BBDD--RROOMM + To record a pure disk at double speed, using data from the + file _c_d_i_m_a_g_e._r_a_w: + + cdrecord -v speed=2 dev=2,0 -dao cdimage.raw + + To create an image for an ISO-9660 filesystem with Rock + Ridge extensions: + + mkisofs -R -o cdimage.raw /home/joerg/master/tree + + To check the resulting file before writing to disk on + Solaris: + + mount -r -F fbk -o type=hsfs /dev/fbk0:cdimage.raw /mnt + + The ffbbkk driver first appeared in 1988. + + Solaris 9 or newer comes with a variant of the original ffbbkk + idea called llooffii. The command for the lofi variant is: + + + + + +Joerg Schilling Last change: Version 3.0 31 + + + + + + +Schily's USER COMMANDS CDRECORD(1) + + + + mount -r -F hsfs ` lofiadm -a /tmp/cdimage.raw ` /mnt + + Note that lofiadm needs absolute path names. + + On Linux: + + mount cdimage.raw -r -t iso9660 -o loop /mnt + + Go on with: + ls -lR /mnt + umount /mnt + + If the overall speed of the system is sufficient and the + structure of the filesystem is not too complex, cdrecord + will run without creating an image of the ISO-9660 filesys- + tem. Simply run the pipeline: + + mkisofs -R /master/tree | cdrecord -v -dao fs=6m speed=2 + dev=2,0 - + + The recommended minimum FIFO size for running this pipeline + is 4 MBytes. As the default FIFO size is 4 MB, the ffss== + option needs to be present only if you want to use a dif- + ferent FIFO size. If your system is loaded, you should run + mkisofs in the real-time class too. To raise the priority + of mmkkiissooffss replace the command + + mkisofs -R /master/tree + by + priocntl -e -c RT -p 59 mkisofs -R /master/tree + + on Solaris and by + + nice --18 mkisofs -R /master/tree + + on systems that do not have UUNNIIXX IInntteerrnnaattiioonnaall-compliant + real-time scheduling. + + Cdrecord runs at priority 59 on Solaris, you should run + mkisofs at no more than priority 58. On other systems, you + should run mkisofs at no less than nice --18. + + Creating a CD-ROM without file system image on disk has been + tested on a Sparcstation-2 with a Yamaha CDR-400. It did + work up to quad speed when the machine was not loaded. A + faster machine may be able to handle quad speed also in the + loaded case. + + + To handle drives that need to know the size of a track + before starting to write, first run + + + + +Joerg Schilling Last change: Version 3.0 32 + + + + + + +Schily's USER COMMANDS CDRECORD(1) + + + + mkisofs -R -quiet -print-size /master/tree + + and then run + + mkisofs -R /master/tree | cdrecord -v -dao speed=2 + dev=2,0 tsize=XXXs - + + where _X_X_X is replaced by the output of the previous run of + mkisofs. + + + SSeettttiinngg ddrriivvee ooppttiioonnss + To set drive options without writing a disk (e.g. to switch + a drive to single-session mode), run + + cdrecord dev=2,0 -setdropts driveropts=singlesession + + If you like to do this when no disk is in the drive, call + + cdrecord dev=2,0 -force -setdropts + driveropts=singlesession + + +EENNVVIIRROONNMMEENNTT + CCDDRR__DDEEVVIICCEE + This may either hold a device identifier that is suit- + able to the open call of the SCSI transport library or + a label in the file /etc/default/cdrecord. + + CCDDRR__SSPPEEEEDD + Sets the default speed value for writing (see also + -ssppeeeedd option). + + CCDDRR__FFIIFFOOSSIIZZEE + Sets the default size of the FIFO (see also ffss==# + option). + + CCDDRR__FFOORRCCEERRAAWWSSPPEEEEDD + If this environment variable is set, ccddrreeccoorrdd will + allow you to write at the full RAW encoding speed a + single CPU supports. This will create high potential + of buffer underruns. Use with care. + + CCDDRR__FFOORRCCEESSPPEEEEDD + If this environment variable is set, ccddrreeccoorrdd will + allow you to write at the full DMA speed the system + supports. There is no DMA reserve for reading the data + that is to be written from disk. This will create high + potential of buffer underruns. Use with care. + + If this environment variable is set to the value aannyy, + ccddrreeccoorrdd allows to write at any speed even though it + + + +Joerg Schilling Last change: Version 3.0 33 + + + + + + +Schily's USER COMMANDS CDRECORD(1) + + + + may fail later with a buffer underrun. + + RRSSHH If the RRSSHH environment is present, the remote connec- + tion will not be created via rrccmmdd(3) but by calling the + program pointed to by RRSSHH. Use e.g. RRSSHH==/usr/bin/ssh + to create a secure shell connection. + + Note that this forces ccddrreeccoorrdd to create a pipe to the + rrsshh((11)) program and disallows ccddrreeccoorrdd to directly + access the network socket to the remote server. This + makes it impossible to set up performance parameters + and slows down the connection compared to a rroooott- + initiated rrccmmdd((33)) connection. + + RRSSCCSSII + If the RRSSCCSSII environment is present, the remote SCSI + server will not be the program //oopptt//sscchhiillyy//ssbbiinn//rrssccssii + but the program pointed to by RRSSCCSSII. Note that the + remote SCSI server program name will be ignored if you + log in using an account that has been created with a + remote SCSI server program as login shell. + + +FFIILLEESS + //eettcc//ddeeffaauulltt//ccddrreeccoorrdd + Default values can be set for the following options in + /etc/default/cdrecord. For example: CDR_FIFOSIZE=8m + or CDR_SPEED=2 + + CCDDRR__DDEEVVIICCEE + This may either hold a device identifier that is + suitable to the open call of the SCSI transport + library or a label in the file + /etc/default/cdrecord that allows to identify a + specific drive on the system. + + CCDDRR__SSPPEEEEDD + Sets the default speed value for writing (see also + -ssppeeeedd option). + + CCDDRR__FFIIFFOOSSIIZZEE + Sets the default size of the FIFO (see also ffss==# + option). + + CCDDRR__MMAAXXFFIIFFOOSSIIZZEE + Sets the maximum size of the FIFO (see also ffss==# + option). + + AAnnyy ootthheerr llaabbeell + is an identifier for a specific drive on the sys- + tem. Such an identifier may not contain the char- + acters ',', '/', '@' or ':'. + + + +Joerg Schilling Last change: Version 3.0 34 + + + + + + +Schily's USER COMMANDS CDRECORD(1) + + + + Each line that follows a label contains a TAB + separated list of items. Currently, four items + are recognized: the SCSI ID of the drive, the + default speed that should be used for this drive, + the default FIFO size that should be used for this + drive and drive specific options. The values for + _s_p_e_e_d and _f_i_f_o_s_i_z_e may be set to -1 to tell + cdrecord to use the global defaults. The value + for driveropts may be set to "" if no driveropts + are used. A typical line may look this way: + + teac1= 0,5,0 4 8m "" + + yamaha= 1,6,0 -1 -1 burnfree + + This tells ccddrreeccoorrdd that a drive named _t_e_a_c_1 is at + scsibus 0, target 5, lun 0 and should be used with + speed 4 and a FIFO size of 8 MB. A second drive + may be found at scsibus 1, target 6, lun 0 and + uses the default speed and the default FIFO size. + + + **..iinnff + The **..iinnff files are created by ccddddaa22wwaavv where ** is + replaced by the actual audio file prefix. They are + read and used by ccddrreeccoorrdd in case cdrecord was called + with the -uusseeiinnffoo option. + + There are three general types of parameters: + + nnuummeerriiccaall ppaarraammeetteerrss + A numerical parameter is a number and directly + follows the tag label without any quoting. + + uunnqquuootteedd ssttrriinngg ttyyppee ppaarraammeetteerrss + An unquoted parameter is make from one or more + words that directly follow the tag label. How + many words from the parameter list are used by + cdrecord depends on the tag label. + + qquuootteedd ssttrriinngg ttyyppee ppaarraammeetteerrss + A string type parameter is enclosed in single + quotes. The string starts after the first single + quote character that follows the tag label and + ends before the last single quote on the same + line. It needs no escape sequences in case that a + single quote appears inside the string. Any text + to the right of the rightmost single quote charac- + ter is ignored. + + The order of the tag labels in the file is not impor- + tant. + + + +Joerg Schilling Last change: Version 3.0 35 + + + + + + +Schily's USER COMMANDS CDRECORD(1) + + + + The following tag labels may appear in a **..iinnff file: + + CCDDIINNDDEEXX__DDIISSCCIIDD== + The cdindex disk ID is used by the mmuussiiccbbrraaiinnzz + CD-database. + + This tag label uses a quoted string type parame- + ter. + + This tag label is ignored by ccddrreeccoorrdd. + + CCDDDDBB__DDIISSCCIIDD== + The cddb disk ID is used by the ccddddbb and the + ffrreeeeddbb CD-database. + + This tag label uses a numerical parameter. + + This tag label is ignored by ccddrreeccoorrdd. + + MMCCNN== The Media Catalog Number (MCN) is a 13 digit + number that follows UPC/EAN-13 rules. + + The data is used by cdrecord to create sub-channel + data. + + IISSRRCC== + The International Standard Recording Code (ISRC) + is a 12 byte string that is created from two + uppercase characters for the country code, fol- + lowed by three uppercase characters for the owner, + followed by two digits for the year of recording + followed by five digits for the recording serial + number. + + To increase the readability of the ISRC tag, there + may be a minus sign between every two fields of + the ISRC string. + + The data is used by cdrecord to create sub-channel + data. + + AAllbbuummttiittllee== + The AAllbbuumm TTiittllee is the name of the disk in the + CD-Text information. + + This tag label uses a quoted string type parame- + ter. + + TTrraacckkttiittllee== + The TTrraacckk TTiittllee is the name of the current track + in the CD-Text information. + + + + +Joerg Schilling Last change: Version 3.0 36 + + + + + + +Schily's USER COMMANDS CDRECORD(1) + + + + This tag label uses a quoted string type parame- + ter. + + AAllbbuummppeerrffoorrmmeerr== + The AAllbbuumm PPeerrffoorrmmeerr is the global name of the of + the performer of the disk in the CD-Text informa- + tion. + + This tag label uses a quoted string type parame- + ter. + + PPeerrffoorrmmeerr== + The PPeerrffoorrmmeerr is the name of the of the performer + of the current track in the CD-Text information. + + This tag label uses a quoted string type parame- + ter. + + AAllbbuummssoonnggwwrriitteerr== + The AAllbbuumm SSoonnggwwrriitteerr is the global name of the of + the songwriter of the disk in the CD-Text informa- + tion. + + This tag label uses a quoted string type parame- + ter. + + SSoonnggwwrriitteerr== + The SSoonnggwwrriitteerr is the name of the of the song- + writer of the current track in the CD-Text infor- + mation. + + This tag label uses a quoted string type parame- + ter. + + AAllbbuummccoommppoosseerr== + The AAllbbuumm CCoommppoosseerr is the global name of the of + the composer of the disk in the CD-Text informa- + tion. + + This tag label uses a quoted string type parame- + ter. + + CCoommppoosseerr== + The CCoommppoosseerr is the name of the of the composer of + the current track in the CD-Text information. + + This tag label uses a quoted string type parame- + ter. + + AAllbbuummaarrrraannggeerr== + The AAllbbuumm AArrrraannggeerr is the global name of the of + the arranger of the disk in the CD-Text + + + +Joerg Schilling Last change: Version 3.0 37 + + + + + + +Schily's USER COMMANDS CDRECORD(1) + + + + information. + + This tag label uses a quoted string type parame- + ter. + + AArrrraannggeerr== + The AArrrraannggeerr is the name of the of the arranger of + the current track in the CD-Text information. + + This tag label uses a quoted string type parame- + ter. + + AAllbbuummmmeessssaaggee== + The AAllbbuumm MMeessssaaggee is the global message text of + the disk in the CD-Text information. + + This tag label uses a quoted string type parame- + ter. + + MMeessssaaggee== + The MMeessssaaggee is the message text of the current + track in the CD-Text information. + + This tag label uses a quoted string type parame- + ter. + + AAllbbuummcclloosseedd__iinnffoo== + The AAllbbuumm CClloosseedd__iinnffoo is the global closed info + text of the disk in the CD-Text information. + + This tag label uses a quoted string type parame- + ter. + + CClloosseedd__iinnffoo== + The CClloosseedd__iinnffoo is the closed info text of the + current track in the CD-Text information. + + This tag label uses a quoted string type parame- + ter. + + TTrraacckk== + The parameter contains the relative number of the + current track on the original disk. The first + track always has the track number 1, a hidden + track uses track number 0. + + This tag label uses a numerical parameter. + + This tag label is ignored by ccddrreeccoorrdd except when + checking the the TTrraacckkssttaarrtt for track #1. + + TTrraacckknnuummbbeerr== + + + +Joerg Schilling Last change: Version 3.0 38 + + + + + + +Schily's USER COMMANDS CDRECORD(1) + + + + The parameter contains the absolute number of the + current track, taken from the TOC on the original + disk. The first track on the original disk may + have a number greater than 1, a hidden track + always uses track number 0. + + This tag label uses a numerical parameter. + + This tag label is currently ignored by ccddrreeccoorrdd as + cdrecord assigns track numbers when compiling the + disk information. + + TTrraacckkssttaarrtt== + The parameter contains the track start offset in + sectors on the original disk. If the current + track becomes the first track on the new disk and + if the track was the first track on the original + disk. ccddrreeccoorrdd uses this number to set up the + offset for index 1 on the new disk. + + This tag label uses a numerical parameter. + + TTrraacckklleennggtthh== + The parameter is used by ccddrreeccoorrdd to set up the + size of the track on the new disk. + + This tag label uses an unquoted string type param- + eter in the form "sectors, samples". + + This label is mandatory for ccddrreeccoorrdd. + + PPrree--eemmpphhaassiiss== + The pre-emphasis parameter controls whether the + related pre-emphasis bit in the sub-channel data + is set by cdrecord. Permitted values for this + parameter are yyeess and nnoo. + + This tag label uses an unquoted string type param- + eter. Valid values are yyeess and nnoo. + + CChhaannnneellss== + The parameter of this tag is the number of chan- + nels on the disk. All CD-audio disks use stereo + recording and thus a 2 is the correct parameter. + + This tag label uses a numerical parameter. + + This label is currently ignored by ccddrreeccoorrdd. + + CCooppyy__ppeerrmmiitttteedd== + The parameter for this tag label contains informa- + tion about the copyright state of a track on the + + + +Joerg Schilling Last change: Version 3.0 39 + + + + + + +Schily's USER COMMANDS CDRECORD(1) + + + + original disk. + + This tag label uses an unquoted string type param- + eter. Valid values are: + + yyeess The ddiiggiittaall ccooppyy ppeerrmmiitttteedd bit is set in the + TOC and in the sub-channel data. If this bit + is set, the related track is not copyright + protected and may be copied infinitely. + + nnoo The ddiiggiittaall ccooppyy ppeerrmmiitttteedd bit is not set in + the TOC. The ddiiggiittaall ccooppyy ppeerrmmiitttteedd bit in + the sub-channel data alters with 9.375 Hz. + This is called SSeerriiaall CCooppyy MMaannaaggeemmeenntt SSyysstteemm + ((SSCCMMSS)). The sense of this track state is to + flag that the creator of the CD does not have + the copyright permission to create copies of + the related track. The related track is copy- + right protected and the creator of the CD + thus is just given the permission to create + one single copy from fair use rights and no + further copies are permitted from this + source. + + oonnccee The ddiiggiittaall ccooppyy ppeerrmmiitttteedd bit is not set in + the TOC and in the sub-channel data. The + sense of this track state is to flag that the + related track is copyright protected and thus + may not be coped infinitely. One single copy + from fair use rights is permitted. + + Note that many CDs sold by the music industry have + SSCCMMSS flagged for one or more tracks, signalling + that the related content company does not own the + copyright to make copies from this track. + + EEnnddiiaanneessss== + The parameter for this tag is the byte order used + in the audio data file that was created for this + track. + + This tag label uses an unquoted string type param- + eter. Valid values are lliittttllee and bbiigg. + + This label is ignored by ccddrreeccoorrdd as the endianess + is retrieved from the audio file format. + + IInnddeexx== + The parameter list for this tag is a list of + numbers that are sector numbers counting rela- + tively to the logical beginning of the track + (which always is at index #1). As any track needs + + + +Joerg Schilling Last change: Version 3.0 40 + + + + + + +Schily's USER COMMANDS CDRECORD(1) + + + + to have an entry for index #1, the first entry in + the list is always 0. If more entries are present + for this tag, there are more offset values that + correspond to index values greater than 1. + + This tag label uses an unquoted string type param- + eter that contains a list of space separated index + offset numbers. + + IInnddeexx00== + The parameter for this tag is a number that + represents the number of sectors relatively to the + beginning (index #1) of this track. This number + identifies where index #0 of the next track + begins. It the parameter is set to -1, the next + track has no index #0, resulting in pregap size 0 + for the next track. + + Note that ccddrreeccoorrdd strictly follows the CD- + standard that defines that the logical beginning + of a track is at the location where index #1 + starts in this track. If index #0 for track nn + contains audio data, the related audio data is a + logical part of track nn--11. + + This tag label uses a numerical parameter. + + MMDD55--ooffffsseett== + The parameter for this tag is the byte offset + where the raw audio data begins in the related + audio file. + + This tag label uses a numerical parameter. + + This label is ignored by ccddrreeccoorrdd. + + MMDD55--ssiizzee== + The parameter for this tag is the number of bytes + of raw audio data in the related audio file. + + This tag label uses a numerical parameter. + + This label is ignored by ccddrreeccoorrdd. + + MMDD55--ssuumm== + The parameter for this tag is the md5 sum for the + raw audio data in the related audio file. + + This tag label uses a numerical parameter. + + This label is ignored by ccddrreeccoorrdd. + + + + +Joerg Schilling Last change: Version 3.0 41 + + + + + + +Schily's USER COMMANDS CDRECORD(1) + + + + **..ccuuee + The **..ccuuee files are CD-structure description files + introduced by CCDDRRWWIINN. They are read and used by + ccddrreeccoorrdd in case cdrecord was called with the + ccuueeffiillee==_n_a_m_e._c_u_e option. + + The following commands are supported in CUE files: + + AARRRRAANNGGEERR _a_r_r_a_n_g_e_r-_s_t_r_i_n_g + This command is used to specify the name of a + arranger for a disk that includes CD-Text enhance- + ments. + + The parameter is the name of a arranger. If the + string contains any spaces, it must be enclosed in + quotation marks. + + If the AARRRRAANNGGEERR command appears before any TTRRAACCKK + command, the string parameter will be encoded as + the arranger of the entire disk. If the AARRRRAANNGGEERR + command appears after a TTRRAACCKK command, the string + parameter will be encoded the the arranger of the + current track. + + This command is only accepted if the ccddrreeccoorrdd + specific CUE extensions are permitted. + + CCAATTAALLOOGG _m_e_d_i_a-_c_a_t_a_l_o_g-_n_u_m_b_e_r + This command is used to specify the disc's MMeeddiiaa + CCaattaalloogg NNuummbbeerr. The _m_e_d_i_a-_c_a_t_a_l_o_g-_n_u_m_b_e_r is a 13 + digit number that follows UPC/EAN-13 rules. + + This command can appear only once in the CUE SHEET + file. It must appear before any TTRRAACCKK command. + + CCDDTTEEXXTTFFIILLEE _f_i_l_e_n_a_m_e + This command is used to specify the name of a file + that contains binary encoded CD-Text information. + CCDDRRWWIINN only accepts headerless binary encoded CD- + Text information, but ccddrreeccoorrdd also accepts binary + encoded CD-Text information with an MMC-compliant + header. The CD-Text information is ignored by + ccddrreeccoorrdd unless the -tteexxtt option is used. + + If the filename contains spaces, it must be + enclosed in quotation marks. + + CCOOMMPPOOSSEERR _c_o_m_p_o_s_e_r-_s_t_r_i_n_g + This command is used to specify the name of a com- + poser for a disk that includes CD-Text enhance- + ments. + + + + +Joerg Schilling Last change: Version 3.0 42 + + + + + + +Schily's USER COMMANDS CDRECORD(1) + + + + The parameter is the name of a composer. If the + string contains any spaces, it must be enclosed in + quotation marks. -SSYYNNOOPPSSIISS - ccddrreeccoorrdd [ _g_e_n_e_r_a_l _o_p_t_i_o_n_s ] ddeevv==_d_e_v_i_c_e [ _t_r_a_c_k _o_p_t_i_o_n_s ] - _t_r_a_c_k_1..._t_r_a_c_k_n + If the CCOOMMPPOOSSEERR command appears before any TTRRAACCKK + command, the string parameter will be encoded as + the composer of the entire disk. If the CCOOMMPPOOSSEERR + command appears after a TTRRAACCKK command, the string + parameter will be encoded the the composer of the + current track. + This command is only accepted if the ccddrreeccoorrdd + specific CUE extensions are permitted. -DDEESSCCRRIIPPTTIIOONN - CCddrreeccoorrdd is used to record data or audio Compact Discs on - an Orange Book CD-Recorder. + FFIILLEE _f_i_l_e_n_a_m_e _f_i_l_e_t_y_p_e + This command is used to specify a data or audio + file that contains data to be written to the + medium. - The _d_e_v_i_c_e refers to _s_c_s_i_b_u_s/_t_a_r_g_e_t/_l_u_n of the CD- - Recorder. Communication on _S_u_n_O_S is done with the SCSI - general driver ssccgg.. Other operating systems are using a - library simulation of this driver. Possible syntax is: - ddeevv== _s_c_s_i_b_u_s,_t_a_r_g_e_t,_l_u_n or ddeevv== _t_a_r_g_e_t,_l_u_n. In the latter - case, the CD-Recorder has to be connected to the default - SCSI bus of the machine. _S_c_s_i_b_u_s, _t_a_r_g_e_t and _l_u_n are - integer numbers. Some operating systems or SCSI transport - implementations may require to specify a filename in addi- - tion. In this case the correct syntax for the device is: - ddeevv== _d_e_v_i_c_e_n_a_m_e:_s_c_s_i_b_u_s,_t_a_r_g_e_t,_l_u_n or ddeevv== _d_e_v_i_c_e_n_a_m_e:_t_a_r_- - _g_e_t,_l_u_n. If the name of the device node that has been - specified on such a system refers to exactly one SCSI - device, a shorthand in the form ddeevv== _d_e_v_i_c_e_n_a_m_e:_@ or ddeevv== - _d_e_v_i_c_e_n_a_m_e:_@,_l_u_n may be used instead of ddeevv== _d_e_v_i_c_e_- - _n_a_m_e:_s_c_s_i_b_u_s,_t_a_r_g_e_t,_l_u_n. - - - To access remote SCSI devices, you need to prepend the - SCSI device name by a remote device indicator. The remote - device indicator is either RREEMMOOTTEE::_u_s_e_r_@_h_o_s_t_: or - RREEMMOOTTEE::_h_o_s_t_: - A valid remote SCSI device name may be: RREEMMOOTTEE::_u_s_e_r_@_h_o_s_t_: - to allow remote SCSI bus scanning or - RREEMMOOTTEE::_u_s_e_r_@_h_o_s_t_:_1_,_0_,_0 to access the SCSI device at _h_o_s_t - connected to SCSI bus # 1,target 0 lun 0. - - - To access SCSI devices via alternate transport layers, you - need to prepend the SCSI device name by a transport layer - indicator. The transport layer indicator may be something - like UUSSCCSSII:: or AATTAAPPII::. To get a list of supported trans- - port layers for your platform, use ddeevv== _H_E_L_P: - - - - To make ccddrreeccoorrdd portable to all UNIX platforms, the syn- - tax ddeevv== _d_e_v_i_c_e_n_a_m_e:_s_c_s_i_b_u_s,_t_a_r_g_e_t,_l_u_n is preferred as is - hides OS specific knowledge about device names from the - user. A specific OS must not necessarily support a way to - specify a real device file name nor a way to specify _s_c_s_i_- - _b_u_s,_t_a_r_g_e_t,_l_u_n. - - - _S_c_s_i_b_u_s 0 is the default SCSI bus on the machine. Watch - the boot messages for more information or look into - //vvaarr//aaddmm//mmeessssaaggeess for more information about the SCSI con- - figuration of your machine. If you have problems to fig- - ure out what values for _s_c_s_i_b_u_s,_t_a_r_g_e_t,_l_u_n should be used, - try the --ssccaannbbuuss option of ccddrreeccoorrdd described below. - - - If a file /etc/default/cdrecord exists, the parameter to - the ddeevv== option may also be a drive name label in said - file (see FILES section). - - - On SSVVrr44 compliant systems, ccddrreeccoorrdd uses the the real time - class to get the highest scheduling priority that is pos- - sible (higher than all kernel processes). On systems with - PPOOSSIIXX rreeaall ttiimmee sscchheedduulliinngg cdrecord uses real time - scheduling too, but may not be able to gain a priority - that is higher than all kernel processes. - - In _T_r_a_c_k _A_t _O_n_c_e mode, each _t_r_a_c_k corresponds to a single - file that contains the prepared data for that track. If - the argument is `--', standard input is used for that - track. Only one track may be taken from _s_t_d_i_n. + If the filename contains spaces, it must be + enclosed in quotation marks. + The following values are allowed for the file type + parameter: -GGEENNEERRAALL OOPPTTIIOONNSS - General options must be before any track file name or - track option. + BBIINNAARRYY Intel binary file (LSB first) - --vveerrssiioonn - Print version information and exit. + MMOOTTOOTTOOLLAA Motorola binary file (MSB first) - --vv Increment the level of general verbosity by one. - This is used e.g. to display the progress of the - writing process. - - --VV Increment the verbose level in respect of SCSI com- - mand transport by one. This helps to debug prob- - lems during the writing process, that occur in the - CD-Recorder. If you get incomprehensible error - messages you should use this flag to get more - detailed output. --VVVV will show data buffer content - in addition. Using --VV or --VVVV slows down the pro- - cess and may be the reason for a buffer underrun. - - ddeebbuugg==_#_, --dd - Set the misc debug value to # (with debug=#) or - increment the misc debug level by one (with -d). If - you specify _-_d_d_, this equals to ddeebbuugg==_2_. This may - help to find problems while opening a driver for - libscg as well as with sector sizes and sector - types. Using --ddeebbuugg slows down the process and may - be the reason for a buffer underrun. - - kkddeebbuugg==#, kkdd==# - Tell the ssccgg-driver to modify the kernel debug - value while SCSI commands are running. - - --ssiilleenntt, --ss - Do not print out a status report for failed SCSI - commands. - - --ffoorrccee Force to continue on some errors. Be careful when - using this option. CCddrreeccoorrdd implements several - checks that prevent you from doing unwanted things - like damaging CD-RW media by improper drives. Many - of the sanity checks are disabled when the --ffoorrccee - option is used. - - This option also implements some tricks that will - allow you to blank bad CD-RW disks. - - --iimmmmeedd Tell cdrecord to set the SSCCSSII IIMMMMEEDD flag in certain - commands (load/eject/blank/close_track/close_ses- - sion). This can be useful on broken systems with - ATAPI harddisk and CD/DVD writer on the same bus or - with SCSI systems that don't use disconnect/recon- - nect. These systems will freeze while blanking or - fixating a CD/DVD or while a DVD writer is filling - up a session to the minimum amount (approx. 800 - MB). Setting the --iimmmmeedd flag will request the com- - mand to return immediately while the operation pro- - ceeds in background, making the bus usable for the - other devices and avoiding the system freeze. This - is an experimental feature which may work or not, - depending on the model of the CD/DVD writer. A - correct solution would be to set up a correct - cabling but there seem to be notebooks around that - have been set up the wrong way by the manufacturer. - As it is impossible to fix this problem in note- - books, the --iimmmmeedd option has been added. - - A second experimental feature of the --iimmmmeedd flag is - to tell cdrecord to try to wait short times wile - writing to the media. This is expected to free the - IDE bus if the CD/DVD writer and the data source - are connected to the same IDE cable. In this case, - the CD/DVD writer would otherwise usually block the - IDE bus for nearly all the time making it impossi- - ble to fetch data from the source drive. See also - mmiinnbbuuff== and --vv option. - - Use both features at your own risk. It it turns - out that it would make sense to have a separate - option for the the wait feature, write to the - author and convince him. - - mmiinnbbuuff==_v_a_l_u_e - The # mmiinnbbuuff== options allows to define the minimum - drive buffer fill ratio for the experimental ATAPI - wait mode that is intended to free the IDE bus to - allow hard disk and CD/DVD writer to be on the same - IDE cable. As the wait mode currently only works - when the verbose option --vv has been specified, - ccddrreeccoorrdd implies the verbose option in case the - --iimmmmeedd or mmiinnbbuuff== option have been specified. - Valid values for mmiinnbbuuff== are between 25 and 95 for - 25%...95% minimum drive buffer fill ratio. - - --dduummmmyy The CD-Recorder will go through all steps of the - recording process, but the laser is turned off dur- - ing this procedure. It is recommended to run sev- - eral tests before actually writing to a Compact - Disk or Digital Versatile Disk, if the timing and - load response of the system is not known. - - --ddaaoo Set SSAAOO ((SSeessssiioonn AAtt OOnnccee)) mode which is usually - called DDiisskk AAtt OOnnccee mode. This currently only - works with MMC drives that support SSeessssiioonn AAtt OOnnccee - mode. - - --rraaww Set RRAAWW wwrriittiinngg mmooddee.. Using this option defaults - to --rraaww9966rr. - - --rraaww9966rr - Select Set RRAAWW wwrriittiinngg mmooddee with 2352 byte sectors - plus 96 bytes of raw P-W subchannel data resulting - in a sector size of 2448 bytes. This is the pre- - ferred raw writing mode as it gives best control - over the CD writing process. If you find any prob- - lems with the layout of a disk or with sub channel - content (e.g. wrong times on the display when play- - ing the CD) and your drive supports to write in - --rraaww9966rr or --rraaww1166 mode, you should give it a try. - There are several CD writers with bad firmware that - result in broken disks when writing in TAO or SAO - mode. Writing data disks in raw mode needs signif- - icantly more CPU time than other write modes. If - your CPU is too slow, this may result in buffer - underruns. - - --rraaww9966pp - Select Set RRAAWW wwrriittiinngg mmooddee with 2352 byte sectors - plus 96 bytes of packed P-W subchannel data result- - ing in a sector size of 2448 bytes. This is the - less preferred raw writing mode as only a few - recorders support it and some of these recorders - have bugs in the firmware implementation. Don't - use this mode if your recorder supports --rraaww9966rr or - --rraaww1166. Writing data disks in raw mode needs sig- - nificantly more CPU time than other write modes. If - your CPU is too slow, this may result in buffer - underruns. - - --rraaww1166 Select Set RRAAWW wwrriittiinngg mmooddee with 2352 byte sectors - plus 6 bytes of P-Q subchannel data resulting in a - sector size of 2368 bytes. If a recorder does not - support --rraaww9966rr, this is the preferred raw writing - mode. It does not allow to write _C_D_-_T_e_x_t or - _C_D_+_G_r_a_p_h_i_c_s but it is the only raw writing mode in - cheap CD writers. As these cheap writers in most - cases do not support --ddaaoo mode. Don't use this - mode if your recorder supports --rraaww9966rr. Writing - data disks in raw mode needs significantly more CPU - time than other write modes. If your CPU is too - slow, this may result in buffer underruns. - - --mmuullttii Allow multi session CD's to be made. This flag - needs to be present on all sessions of a multi ses- - sion disk, except you want to create a session that - will be the last session on the media. The fixa- - tion will be done in a way that allows the CD- - Recorder to append additional sessions later. This - is done by generation a TOC with a link to the next - program area. The so generated media is not 100% - compatible to manufactured CD's (except for - CDplus). Use only for recording of multi session - CD's. If this option is present, the default track - type is CCDD--RROOMM XXAA mmooddee 22. The _S_o_n_y drives have no - hardware support for CCDD--RROOMM XXAA mmooddee 22. You have to - specify the --ddaattaa option in order to create multi - session disks on these drives. As long as cdrecord - does not have a coder for converting data sectors - to audio sectors, you need to force CCDD--RROOMM sectors - by including the --ddaattaa option if you like to record - a multisession disk in SAO mode. Not all drives - allow multisession CD's in SAO mode. - - --mmssiinnffoo - Retrieve multi session info in a form suitable for - mmkkiissooffss--11..1100 or later. - - This option makes only sense with a CD that con- - tains at least one closed session and is appendable - (not finally closed yet). Some drives create error - messages if you try to get the multi session info - for a disk that is not suitable for this operation. - - --ttoocc Retrieve and print out the table of content or PMA - of a CD. With this option, ccddrreeccoorrdd will work with - CD-R drives and with CD-ROM drives. - - --aattiipp Retrieve and print out the ATIP (absolute Time in - Pregroove) info of a CD/DVD recordable or CD/DVD - rewritable media. With this option, ccddrreeccoorrdd will - try to retrieve the ATIP info. If the actual drive - does not support to read the ATIP info, it may be - that only a reduced set of information records or - even nothing is displayed. Only a limited number of - MMC compliant drives support to read the ATIP info. - - If ccddrreeccoorrdd is able to retrieve the lead-in start - time for the first session, it will try to decode - and print the manufacturer info from the media. - DVD media dos not have atip information but there - is equivalent prerecorded information that is read - out and printed. - - --ffiixx The disk will only be fixated (i.e. a TOC for a CD- - Reader will be written). This may be used, if for - some reason the disk has been written but not fix- - ated. This option currently does not work with old - TEAC drives (CD-R50S and CD-R55S). - - --nnooffiixx Do not fixate the disk after writing the tracks. - This may be used to create an audio disk in steps. - An un-fixated disk can usually not be used on a non - CD-writer type drive but there are audio CD players - that will be able to play such a disk. - - --wwaaiittii Wait for input to become available on standard - input before trying to open the SCSI driver. This - allows ccddrreeccoorrdd to read it's input from a pipe even - when writing additional sessions to a multi session - disk. When writing another session to a multi ses- - sion disk, mmkkiissooffss needs to read the old session - from the device before writing output. This cannot - be done if ccddrreeccoorrdd opens the SCSI driver at the - same time. - - --llooaadd Load the media and exit. This only works with a - tray loading mechanism but seems to be useful when - using the Kodak disk transporter. - - --eejjeecctt Eject disk after doing the work. Some Devices - (e.g. Philips) need to eject the medium before cre- - ating a new disk. Doing a -dummy test and immedi- - ately creating a real disk would not work on these - devices. - - ssppeeeedd==# - Set the speed factor of the writing process to #. - # is an integer, representing a multiple of the - audio speed. This is about 150 KB/s for CD-ROM and - about 172 KB/s for CD-Audio. If no _s_p_e_e_d option is - present, ccddrreeccoorrdd will try to get the speed value - from the CCDDRR__SSPPEEEEDD environment. If your drive has - problems with _s_p_e_e_d_=_2 or _s_p_e_e_d_=_4, you should try - _s_p_e_e_d_=_0. - - bbllaannkk==_t_y_p_e - Blank a CD-RW and exit or blank a CD-RW before - writing. The blanking type may be one of: - - help Display a list of possible blanking - types. - - all Blank the entire disk. This may take a - long time. - - fast Minimally blank the disk. This results - in erasing the PMA, the TOC and the - pregap. - - track Blank a track. - - unreserve Unreserve a reserved track. - - trtail Blank the tail of a track. - - unclose Unclose last session. - - session Blank the last session. - Not all drives support all blanking types. It may be nec- - essary to use bbllaannkk==aallll if a drive reports a specified - command as being invalid. If used together with the - --ffoorrccee flag, this option may be used to blank CD-RW disks - that otherwise cannot be blanked. Note that you may need - to specify bbllaannkk==_a_l_l because some drives will not continue - with certain types of bad CD-RW disks. Note also that - ccddeeccoorrdd does it's best if the --ffoorrccee flag is used but it - finally depends on the drive's firmware whether the blank- - ing operation will succeed or not. - - ffss==# Set the fifo (ring buffer) size to #. You may use - the same method as in dddd(1), ssdddd(1) or ssttaarr(1). - The number representing the size is taken in bytes - unless otherwise specified. If a number is fol- - lowed directly by the letter `b', `k', `m', `s' of - `f', the size is multiplied by 512, 1024, - 1024*1024, 2048 or 2352. If the size consists of - numbers separated by `x' or `*', multiplication of - the two numbers is performed. Thus _f_s_=_1_0_x_6_3_k will - specify a fifo size of 630 kBytes. - - The size specified by the _f_s_= argument includes the - shared memory that is needed for administration. - This is at least one page of memory. If no _f_s= - option is present, ccddrreeccoorrdd will try to get the - fifo size value from the CCDDRR__FFIIFFOOSSIIZZEE environment. - The default fifo size is currently 4 MB. - - The fifo is used to increase buffering for the real - time writing process. It allows to run a pipe from - mmkkiissooffss directly into ccddrreeccoorrdd. If the fifo is - active and a pipe from mmkkiissooffss into ccddrreeccoorrdd is - used to create a CD, ccddrreeccoorrdd will abort prior to - do any modifications on the disk if mmkkiissooffss dies - before it starts writing. The recommended fifo - size is between 4 and 32 MBytes. As a rule of - thumb, the fifo size should be at least equal to - the size of the internal buffer of the CD-Recorder - and no more than half of the physical amount of RAM - available in the machine. If the fifo size is big - enough, the fifo statistics will print a fifo empty - count of zero and the fifo min fill is not below - 20%. It is not wise to use too much space for the - fifo. If you need more than 8 MB to write a CD on - an idle machine, your machine is either underpow- - ered, has hardware problems or is mis-configured. - The sun4c architecture (e.g. a Sparcstation-2) has - only MMU page table entries for 16 MBytes per pro- - cess. Using more than 14 MBytes for the fifo may - cause the operating system in this case to spend - much time to constantly reload the MMU tables. - Newer machines from Sun do not have this MMU hard- - ware problem. I have no information on PC-hardware - reflecting this problem. - - If you have buffer underruns or similar problems - and observe a zero _f_i_f_o _e_m_p_t_y _c_o_u_n_t, you have hard- - ware problems. The fifo size in this case is suffi- - cient. - - ddeevv==_t_a_r_g_e_t - Sets the SCSI target for the CD-Recorder, see notes - above. A typical device specification is ddeevv==_6_,_0 . - If a filename must be provided together with the - numerical target specification, the filename is - implementation specific. The correct filename in - this case can be found in the system specific manu- - als of the target operating system. On a _F_r_e_e_B_S_D - system without _C_A_M support, you need to use the - control device (e.g. _/_d_e_v_/_r_c_d_0_._c_t_l). A correct - device specification in this case may be - ddeevv==_/_d_e_v_/_r_c_d_0_._c_t_l_:_@ . - - On Linux, drives connected to a parallel port - adapter are mapped to a virtual SCSI bus. Different - adapters are mapped to different targets on this - virtual SCSI bus. - - If no _d_e_v option is present, ccddrreeccoorrdd will try to - get the device from the CCDDRR__DDEEVVIICCEE environment. - - If the argument to the ddeevv== option does not contain - the characters ',', '/', '@' or ':', it is inter- - preted as an label name that may be found in the - file /etc/default/cdrecord (see FILES section). - - ggrraacceettiimmee==_# - Set the grace time before starting to write to _# - seconds. Values below 2 seconds are not allowed. - - ttiimmeeoouutt==_# - Set the default SCSI command timeout value to _# - seconds. The default SCSI command timeout is the - minimum timeout used for sending SCSI commands. If - a SCSI command fails due to a timeout, you may try - to raise the default SCSI command timeout above the - timeout value of the failed command. If the com- - mand runs correctly with a raised command timeout, - please report the better timeout value and the cor- - responding command to the author of the program. - If no _t_i_m_e_o_u_t option is present, a default timeout - of 40 seconds is used. - - ddrriivveerr==_n_a_m_e - Allows to use a user supplied driver name for the - device. To get a list of possible drivers use - ddrriivveerr==hheellpp. The reason for the existence of this - option is to allow users to use ccddrreeccoorrdd with - drives that are similar to supported drives but not - known directly by ccddrreeccoorrdd. Use this option with - extreme care. If a wrong driver is used for a - device, the possibility of creating corrupted disks - is high. The minimum problem related to a wrong - driver is that the --ssppeeeedd or --dduummmmyy will not work. - - There are two special driver entries in the list: - ccddrr__ssiimmuull and ddvvdd__ssiimmuull. These driver entries are - designed to make timing tests at any speed or tim- - ing tests for drives that do not support the --dduummmmyy - option. The simulation drivers implement a drive - with a buffer size of 1MB that can be changed via - the CCDDRR__SSIIMMUULL__BBUUFFSSIIZZEE environment variable. The - simulation driver correctly simulates even a buffer - underrun condition. If the --dduummmmyy option is pre- - sent, the simulation is not aborted in case of a - buffer underrun. - - ddrriivveerrooppttss==_o_p_t_i_o_n _l_i_s_t - Set driver specific options. The options are speci- - fied a comma separated list. To get a list of - valid options use ddrriivveerrooppttss==_h_e_l_p together with the - _-_c_h_e_c_k_d_r_i_v_e option. Currently implemented driver - options are: - - bbuurrnnffrreeee - Turn the support for Buffer Underrun Free - writing on. This only works for drives that - support Buffer Underrun Free technology. - This may be called: SSaannyyoo BBUURRNN--PPrrooooff, RRiiccoohh - JJuusstt--LLiinnkk, YYaammaahhaa LLoosssslleessss--LLiinnkk or similar. - - The default is to turn BBUURRNN--FFrreeee off, - regardless of the defaults of the drive. - - nnoobbuurrnnffrreeee - Turn the support for Buffer Underrun Free - writing off. - - vvaarriirreecc==_v_a_l_u_e - Turn on the PPlleexxttoorr VVaarriiRReecc writing mode. - The mandatory parameter _v_a_l_u_e is the laser - power offset and currently may be selected - from -2, -1, 0, 1, 2. In addition, you need - to set the write speed to 4 in order to - allow VVaarriiRReecc to work. - - aauuddiioommaasstteerr - Turn on the YYaahhaammaa AAuuddiioo MMaasstteerr QQ.. RR.. fea- - ture which usually should result in high - quality CDs that have less reading problems - in HiFi players. As this is implemented as - a variant of the Session at Once write mode, - it will only work if you select SAO write - mode and there is no need to turn it off. - The AAuuddiioo MMaasstteerr mode will work with a lim- - ited speed but may also be used with data - CDs. in AAuuddiioo MMaasstteerr mode, the pits on the - CD will be written larger then usual so the - capacity of the medium is reduced when turn- - ing this feature on. A 74 minute CD will - only have a capacity of 63 minutes if AAuuddiioo - MMaasstteerr is active and the capacity of a 80 - minute CD will be reduced to 68 minutes. - - ffoorrcceessppeeeedd - Normally, modern drives know the highest - possible speed for different media and may - reduce the speed in order to grant best - write quality. Some drives (e.g. Ricoh and - Yamaha) allow to force the drive to use the - selected speed even if the medium is so bad - that the write quality would be poor. This - option tells such a drive to force to use - the selected speed regardless of the medium - quality. - - Use this option with extreme care and note - that the drive should know better which - medium will work at full speed. The default - is to turn ffoorrcceessppeeeedd off, regardless of the - defaults of the drive. - - nnooffoorrcceessppeeeedd - Turn off the ffoorrccee ssppeeeedd feature. - - ttaattttooooiinnffoo - Use this option together with --cchheecckkddrriivvee to - retrieve the image size information for the - YYaammaahhaa DDiisskkTT@@22 feature. The images always - have a line length of 3744 pixel. Line num- - ber 0 (radius 0) is mapped to the center of - the disk. If you know the inner and outer - radius you will be able to create a pre dis- - torted image that later may appear undis- - torted on the disk. - - ttaattttooooffiillee==_n_a_m_e - Use this option together with --cchheecckkddrriivvee to - write an image prepared for the YYaammaahhaa - DDiisskkTT@@22 feature to the medium. The file - must be a file with raw image B&W data (one - byte per pixel) in a size as retrieved by a - previous call to ttaattttooooffiillee==_n_a_m_e . If the - size of the image equals the maximum possi- - ble size (3744 x 320 pixel), ccddrreeccoorrdd will - use the first part of the file. This first - part then will be written to the leftover - space on the CD. - - Note that the image must be mirrored to be - readable from the pick up side of the CD. - - --cchheecckkddrriivvee - Checks if a driver for the current drive is present - and exit. If the drive is a known drive, ccddrreeccoorrdd - uses exit code 0. - - --pprrccaapp Print the drive capabilities for SCSI-3/mmc compli- - ant drives as obtained from mode page 0x2A. Values - marked with _k_B use 1000 bytes as kilo-byte, values - marked with _K_B use 1024 bytes as Kilo-byte. - - --iinnqq Do an inquiry for the drive, print the inquiry info - and exit. - - --ssccaannbbuuss - Scan all SCSI devices on all SCSI busses and print - the inquiry strings. This option may be used to - find SCSI address of the CD-Recorder on a system. - The numbers printed out as labels are computed by: - bbuuss ** 110000 ++ ttaarrggeett - - --rreesseett Try to reset the SCSI bus where the CD recorder is - located. This works not on all operating systems. - - --oovveerrbbuurrnn - Allow ccddrreeccoorrdd to write more than the official size - of a medium. This feature is usually called _o_v_e_r_- - _b_u_r_n_i_n_g and depends on the fact that most blank - media may hold more space than the official size. - As the official size of the lead-out area on the - disk is 90 seconds (6750 sectors) and a disk usu- - ally works if there are at least 150 sectors of - lead out, all media may be overburned by at least - 88 seconds (6600 sectors). Most CD recorders only - do overburning in SSAAOO or RRAAWW mode. Known exceptions - are TEAC CD-R50S, TEAC CD-R55S and the Panasonic - CW-7502. Some drives do now allow to overburn as - much as you might like and limit the size of a CD - to e.g. 76 minutes. This problem may be circum- - vented by writing the CD in RAW mode because this - way the drive has no chance to find the size before - starting to burn. There is no guarantee that your - drive supports overburning at all. Make a test to - check if your drive implements the feature. - - --iiggnnssiizzee - Ignore the known size of the medium. This options - should be used with extreme care, it exists only - for debugging purposes don't use it for other rea- - sons. It is not needed to write disks with more - than the nominal capacity. This option implies - --oovveerrbbuurrnn. - - --uusseeiinnffoo - Use *.inf files to overwrite audio options. If - this option is used, the pregap size information is - read from the *.inf file that is associated with - the file that contains the audio data for a track. - - ddeeffpprreeggaapp==# - Set the default pre-gap size for all tracks except - track number 1. This option currently only makes - sense with the TEAC drive when creating track-at- - once disks without the 2 second silence before each - track. - This option may go away in future. - - --ppaacckkeett - Set PPaacckkeett wwrriittiinngg mmooddee.. This is an experimental - interface. - - ppkkttssiizzee==# - Set the packet size to #, forces fixed packet mode. - This is an experimental interface. - - --nnoocclloossee - Do not close the current track, useful only when in - packet writing mode. This is an experimental - interface. - - mmccnn==_m_e_d___c_a_t___n_r - Set the MMeeddiiaa CCaattaalloogg NNuummbbeerr of the CD to - _m_e_d___c_a_t___n_r. - - --tteexxtt Write CD-Text created by ccddrreeccoorrdd and based on - information taken from a file that contains ascii - information for the text strings. Currently only - the format in the **..iinnff files created by ccddddaa22wwaavv - is supported. You need to use the --uusseeiinnffoo option - in addition in order to tell ccddrreeccoorrdd to read these - files. If you like to write your own CD-Text infor- - mation, edit the **..iinnff files with a text editor and - change the field that are relevant for CD-Text. - - tteexxttffiillee==filename - Write CD-Text based on information found in the - binary file _f_i_l_e_n_a_m_e. This file must contain - information in a data format defined in the SCSI-3 - MMC-2 standard and in the Red Book. The four byte - size header that is defined in the SCSI standard is - optional and allows to make the recognition of cor- - rect data less ambiguous. This is the best option - to be used to copy CD-Text data from existing CDs - that already carry CD-Text information. To get data - in a format suitable for this option use ccddrreeccoorrdd - --vvvv --ttoocc to extract the information from disk. + AAIIFFFF Audio AIFF file + WWAAVVEE Audio WAVE file -TTRRAACCKK OOPPTTIIOONNSS - Track options may be mixed with track file names. + MMPP33 Audio MP3 file - iissrrcc==_I_S_R_C___n_u_m_b_e_r - Set the IInntteerrnnaattiioonnaall SSttaannddaarrdd RReeccoorrddiinngg NNuummbbeerr for - the next track to _I_S_R_C___n_u_m_b_e_r. - - iinnddeexx==_l_i_s_t - Sets an index list for the next track. In index - list is a comma separated list of numbers that are - counting from index 1. The first entry in this list - must contain a 0, the following numbers must be an - ascending list of numbers (counting in 1/75 sec- - onds) that represent the start of the indices. An - index list in the form: 0,7500,15000 sets index 1 - to the start of the track, index 2 100 seconds from - the start of the track and index 3 200 seconds from - the start of the track. - - --aauuddiioo If this flag is present, all subsequent tracks are - written in CCDD--DDAA (similar to Red Book) audio for- - mat. The file with data for this tracks should - contain stereo, 16-bit digital audio with 44100 - samples/s. The byte order should be the following: - MSB left, LSB left, MSB right, LSB right, MSB left - and so on. The track should be a multiple of 2352 - bytes. It is not possible to put the master image - of an audio track on a raw disk because data will - be read in multiple of 2352 bytes during the - recording process. - - If a filename ends in _._a_u or _._w_a_v the file is con- - sidered to be a structured audio data file. - CCddrreeccoorrdd assumes that the file in this case is a - Sun audio file or a Microsoft .WAV file and - extracts the audio data from the files by skipping - over the non-audio header information. In all - other cases, cdrecord will only work correctly if - the audio data stream does not have any header. - Because many structured audio files do not have an - integral number of blocks (1/75th second) in - length, it is often necessary to specify the --ppaadd - option as well. ccddrreeccoorrdd recognizes that audio - data in a .WAV file is stored in Intel (little- - endian) byte order, and will automatically byte- - swap the data if the CD recorder requires big- - endian data. CCddrreeccoorrdd will reject any audio file - that does not match the Red Book requirements of - 16-bit stereo samples in PCM coding at 44100 sam- - ples/second. - - Using other structured audio data formats as input - to ccddrreeccoorrdd will usually work if the structure of - the data is the structure described above (raw pcm - data in big-endian byte order). However, if the - data format includes a header, you will hear a - click at the start of a track. - - If neither _-_d_a_t_a nor _-_a_u_d_i_o have been specified, - ccddrreeccoorrdd defaults to _-_a_u_d_i_o for all filenames that - end in _._a_u or _._w_a_v and to _-_d_a_t_a for all other - files. - - --sswwaabb If this flag is present, audio data is assumed to - be in byte-swapped (little-endian) order. Some - types of CD-Writers e.g. Yamaha, Sony and the new - SCSI-3/mmc drives require audio data to be pre- - sented in little-endian order, while other writers - require audio data to be presented in the big- - endian (network) byte order normally used by the - SCSI protocol. CCddrreeccoorrdd knows if a CD-Recorder - needs audio data in big- or little-endian order, - and corrects the byte order of the data stream to - match the needs of the recorder. You only need the - _-_s_w_a_b flag if your data stream is in Intel (little- - endian) byte order. - - Note that the verbose output of ccddrreeccoorrdd will show - you if swapping is necessary to make the byte order - of the input data fit the required byte order of - the recorder. CCddrreeccoorrdd will not show you if the - _-_s_w_a_b flag was actually present for a track. - - --ddaattaa If this flag is present, all subsequent tracks are - written in CCDD--RROOMM mmooddee 11 (Yellow Book) format. The - data is a multiple of 2048 bytes. The file with - track data should contain an IISSOO--99666600 or RRoocckk RRiiddggee - filesystem image (see mmkkiissooffss for more details). If - the track data is an uuffss filesystem image, fragment - size should be set to 2 KB or more to allow CR- - drives with 2 KB sector size to to be used for - reading. - - -data is the default, if no other flag is present. - - If neither _-_d_a_t_a nor _-_a_u_d_i_o have been specified, - ccddrreeccoorrdd defaults to _-_a_u_d_i_o for all filenames that - end in _._a_u or _._w_a_v and to _-_d_a_t_a for all other - files. - - --mmooddee22 If this flag is present, all subsequent tracks are - written in CCDD--RROOMM mmooddee 22 format. The data is a mul- - tiple of 2048 bytes. - - --xxaa11 If this flag is present, all subsequent tracks are - written in CCDD--RROOMM XXAA mmooddee 11 format. The data is a - multiple of 2048 bytes. - - --xxaa22 If this flag is present, all subsequent tracks are - written in CCDD--RROOMM XXAA mmooddee 22 format. The data is a - multiple of 2048 bytes. - - --ccddii If this flag is present, all subsequent tracks are - written in CCDDII format. The data is a multiple of - 2048 bytes. - - --iissoossiizzee - Use the IISSOO--99666600 file system size as the size of - the next track. This option is needed if you want - ccddrreeccoorrdd to directly read the image of a track from - a raw disk partition or from a _T_A_O master CD. In - the first case the option --iissoossiizzee is needed to - limit the size of the CD to the size of the ISO - filesystem. In the second case the option --iissoossiizzee - is needed to prevent ccddrreeccoorrdd from reading the two - run out blocks that are appended by each CD- - recorder in track at once mode. These two run out - blocks cannot be read and would cause a buffer - under run that would cause a defective copy. Do - not use this option on files created by mmkkiissooffss and - in case ccddrreeccoorrdd reads the track data from _s_t_d_i_n. - In the first case, you would prevent ccddrreeccoorrdd from - writing the amount of padding that has been - appended by mmkkiissooffss and in the latter case, it will - not work because _s_t_d_i_n is not seekable. - - If --iissoossiizzee is used for a track, ccddrreeccoorrdd will - automatically add padding for this track as if the - --ppaadd option has been used but the amount of padding - may be less than the padding written by mmkkiissooffss. - Note that if you use --iissoossiizzee on a track that con- - tains Sparc boot information, the boot information - will be lost. - - Note also that this option cannot be used to deter- - mine the size of a file system if the multi session - option is present. - - --ppaadd If the track is a data track, 15 sectors of zeroed - data will be added to the end of this and each sub- - sequent data track. In this case, the --ppaadd option - is superseded by the ppaaddssiizzee== option. It will - remain however as a shorthand for ppaaddssiizzee==_1_5_s_. If - the _-_p_a_d option refers to an audio track, ccddrreeccoorrdd - will pad the audio data to be a multiple of 2352 - bytes. The audio data padding is done with binary - zeroes which is equal to absolute silence. - - --ppaadd remains valid until disabled by --nnooppaadd. - - ppaaddssiizzee==# - Set the amount of data to be appended as padding to - the next track to #. Opposed to the behavior of - the --ppaadd option, the value for _p_a_d_s_i_z_e_= is reset to - zero for each new track. Cdrecord assumes a sector - size of 2048 bytes for the _p_a_d_s_i_z_e_= option, inde- - pendent from the real sector size and independent - from the write mode. The megabytes mentioned in - the verbose mode output however are counting the - output sector size which is e.g. 2448 bytes when - writing in RAW/RAW96 mode. See ffss= option for pos- - sible arguments. To pad the equivalent of 20 min- - utes on a CD, you may write ppaaddssiizzee==20x60x75s. Use - this option if your CD-drive is not able to read - the last sectors of a track or if you want to be - able to read the CD on a LLiinnuuxx system with the - ISO-9660 filesystem read ahead bug. If an empty - file is used for track data, this option may be - used to create a disk that is entirely made of - padding. This may e.g. be used to find out how - much overburning is possible with a specific media. - - --nnooppaadd Do not pad the following tracks - the default. - - --sshhoorrttttrraacckk - Allow all subsequent tracks to violate the Read - Book track length standard which requires a minimum - track length of 4 seconds. This option is only - useful when used in SAO or RAW mode. Not all - drives support this feature. The drive must be - accept the resulting CUE sheet or support RAW writ- - ing. - - --nnoosshhoorrttttrraacckk - Re-enforce the Red Book track length standard. - Tracks must be at least 4 seconds. - - pprreeggaapp==# - Set the pre-gap size for the next track. This - option currently only makes sense with the TEAC - drive when creating track-at-once disks without the - 2 second silence before each track. - This option may go away in future. - - --pprreeeemmpp - If this flag is present, all TOC entries for subse- - quent audio tracks will indicate that the audio - data has been sampled with 50/15 µsec preemphasis. - The data, however is not modified during the pro- - cess of transferring from file to disk. This - option has no effect on data tracks. - - --nnoopprreeeemmpp - If this flag is present, all TOC entries for subse- - quent audio tracks will indicate that the audio - data has been mastered with linear data - this is - the default. - - --ccooppyy If this flag is present, all TOC entries for subse- - quent audio tracks of the resulting CD will indi- - cate that the audio data has permission to be - copied without limit. This option has no effect on - data tracks. - - --nnooccooppyy - If this flag is present, all TOC entries for subse- - quent audio tracks of the resulting CD will indi- - cate that the audio data has permission to be - copied only once for personal use - this is the - default. - - --ssccmmss If this flag is present, all TOC entries for subse- - quent audio tracks of the resulting CD will indi- - cate that the audio data has no permission to be - copied anymore. - - ttssiizzee==# - If the master image for the next track has been - stored on a raw disk, use this option to specify - the valid amount of data on this disk. If the image - of the next track is stored in a regular file, the - size of that file is taken to determine the length - of this track. If the track contains an ISO 9660 - filesystem image use the _-_i_s_o_s_i_z_e option to deter- - mine the length of that filesystem image. - In Disk at Once mode and with some drives that use - the TEAC programming interface, even in Track at - Once mode, ccddrreeccoorrdd needs to know the size of each - track before starting to write the disk. Cdrecord - now checks this and aborts before starting to - write. If this happens you will need to run - mmkkiissooffss --pprriinntt--ssiizzee before and use the output (with - `s' appended) as an argument to the ttssiizzee= option - of ccddrreeccoorrdd (e.g. tsize=250000s). - See ffss= option for possible arguments. + AAUU Audio AU file (only permitted if + ccddrreeccoorrdd CUE extensions are enabled) + OOGGGG Audio OGG file (only permitted if + ccddrreeccoorrdd CUE extensions are enabled) -EEXXAAMMPPLLEESS - For all examples below, it will be assumed that the CD- - Recorder is connected to the primary SCSI bus of the - machine. The SCSI target id is set to 2. + All audio files (WAVE, AIFF, MP3, AU and OGG) must + be in 44100 Hz 16 bit stereo format. MP3 and OGG + is currently unsupported. - To record a pure CD-ROM at double speed, using data from - the file _c_d_i_m_a_g_e_._r_a_w: + If an audio file is not an exact multiple of a + CDROM sector (2352 bytes), then is is padded with + zeroes to fill up to the needed size. - cdrecord -v speed=2 dev=2,0 cdimage.raw + All FFIILLEE commands need to be before a related + TTRRAACCKK command and after the last IINNDDEEXX command or + PPOOSSTTGGAAPP command for the previous track. - To create an image for a ISO 9660 filesystem with Rock - Ridge extensions: - mkisofs -R -o cdimage.raw /home/joerg/master/tree - To check the resulting file before writing to CD on - Solaris: +Joerg Schilling Last change: Version 3.0 43 - mount -r -F fbk -o type=hsfs /dev/fbk0:cdimage.raw - /mnt - On Linux: - mount cdimage.raw -r -t iso9660 -o loop /mnt - Go on with: - ls -lR /mnt - umount /mnt - If the overall speed of the system is sufficient and the - structure of the filesystem is not too complex, cdrecord - will run without creating an image of the ISO 9660 - filesystem. Simply run the pipeline: - mkisofs -R /master/tree | cdrecord -v fs=6m speed=2 - dev=2,0 - +Schily's USER COMMANDS CDRECORD(1) - The recommended minimum fifo size for running this - pipeline is 4 MBytes. As the default fifo size is 4 MB, - the ffss== option needs only be present if you want to use a - different fifo size. If your system is loaded, you should - run mkisofs in the real time class too. To raise the pri- - ority of mmkkiissooffss replace the command - mkisofs -R /master/tree - by - priocntl -e -c RT -p 59 mkisofs -R /master/tree - on Solaris and by + If the ccddrreeccoorrdd specific CUE extensions are + enabled, then a FFIILLEE command may also appear + between an IINNDDEEXX 0000 and an IINNDDEEXX 0011 command. This + allows to let the create one file per track where + the file starts at IINNDDEEXX 0011 of the track and enda + after IINNDDEEXX 0000 of the following track. In this + case, no FFIILLEE command is allowed before the + related TTRRAACCKK command. - nice --18 mkisofs -R /master/tree + FFLLAAGGSS _f_l_a_g_s + This command is used to set special subcode flags + within a track. - on systems that don't have UUNNIIXX IInntteerrnnaattiioonnaall compliant - realtime scheduling. + The following flags are supported: - Cdrecord runs at priority 59 on Solaris, you should run - mkisofs at no more than priority 58. On other systems, you - should run mkisofs at no less than nice --18. + DDCCPP Digital copy permitted - Creating a CD-ROM without file system image on disk has - been tested on a Sparcstation-2 with a Yamaha CDR-400. It - did work up to quad speed when the machine was not loaded. - A faster machine may be able to handle quad speed also in - the loaded case. + 44CCHH Four channel audio - To record a pure CD-DA (audio) at single speed, with each - track contained in a file named _t_r_a_c_k_0_1_._c_d_a_u_d_i_o, - _t_r_a_c_k_0_2_._c_d_a_u_d_i_o, etc: + PPRREE Pre-emphasis enabled (audio tracks + only) - cdrecord -v speed=1 dev=2,0 -audio track*.cdaudio + SSCCMMSS Serial copy management system (not + supported by all recorders) - To check if it will be ok to use double speed for the - example above. Use the dummy write option: + More than one flag type argument may appear after + the FLAGS command (e.g FLAGS DCP PRE). - cdrecord -v -dummy speed=2 dev=2,0 -audio track*.cdau- - dio + The FFLLAAGGSS command must appear after a TTRRAACCKK com- + mand but before any IINNDDEEXX command. Only one FFLLAAGGSS + command is allower per TTRRAACCKK ccoommmmaanndd.. - To record a mixed-mode CD with an ISO 9660 filesystem from - _c_d_i_m_a_g_e_._r_a_w on the first track, the other tracks being - audio tracks from the files _t_r_a_c_k_0_1_._c_d_a_u_d_i_o, _t_r_a_c_k_0_2_._c_d_a_u_- - _d_i_o, etc: + The fourth subcode flag that marks data tracks is + set automatically for data tracks. - cdrecord -v -dummy dev=2,0 cdimage.raw -audio - track*.cdaudio + IINNDDEEXX _n_u_m_b_e_r _m_m:_s_s:_f_f + This command is used to specify indexes within a + track. - To handle drives that need to know the size of a track - before starting to write, first run + The first parameter is the index number in the + range 0-99. - mkisofs -R -q -print-size /master/tree + The second parameter is a relative time in + minutes, seconds and frames (there are 75 + frames/second). - and then run + All index numbers must be between 0 and 99 + inclusive. The first index for a track must be + either 0 or 1 with all indexes being sequential to + the first one. The first index for a file must + start at 00:00.00. - mkisofs -R /master/tree | cdrecord speed=2 dev=2,0 - tsize=XXXs - - where _X_X_X is replaced by the output of the previous run of - mkisofs. - To copy an audio CD in the most accurate way, first run - cdda2wav -vall cddb=0 -D2,0 -B -Owav +Joerg Schilling Last change: Version 3.0 44 - and then run - cdrecord -v dev=2,0 -dao -useinfo -text *.wav - This will try copy track indices and to read CD-Text - information from disk. If there is no CD-Text informa- - tion, ccddddaa22wwaavv will try to get the information from - freedb.org instead. -EENNVVIIRROONNMMEENNTT - CCDDRR__DDEEVVIICCEE - This may either hold a device identifier that is - suitable to the open call of the SCSI transport - library or a label in the file - /etc/default/cdrecord. - - CCDDRR__SSPPEEEEDD - Sets the default speed value for writing (see also - --ssppeeeedd option). - - CCDDRR__FFIIFFOOSSIIZZEE - Sets the default size of the FIFO (see also ffss==# - option). - - CCDDRR__FFOORRCCEERRAAWWSSPPEEEEDD - If this environment variable is set, ccddrreeccoorrdd will - allow you to write at the full RAW encoding speed a - single CPU supports. This will create high poten- - tial of buffer underruns. Use with care. - - RRSSHH If the RRSSHH environment is present, the remote con- - nection will not be created via rrccmmdd(3) but by - calling the program pointed to by RRSSHH. Use e.g. - RRSSHH==/usr/bin/ssh to create a secure shell connec- - tion. - - Note that this forces ccddrreeccoorrdd to create a pipe to - the rrsshh((11)) program and disallows ccddrreeccoorrdd to - directly access the network socket to the remote - server. This makes it impossible to set up perfor- - mance parameters and slows down the connection com- - pared to a rroooott initiated rrccmmdd((33)) connection. - - RRSSCCSSII If the RRSSCCSSII environment is present, the remote - SCSI server will not be the program - //oopptt//sscchhiillyy//ssbbiinn//rrssccssii but the program pointed to - by RRSSCCSSII. Note that the remote SCSI server program - name will be ignored if you log in using an account - that has been created with a remote SCSI server - program as login shell. +Schily's USER COMMANDS CDRECORD(1) -FFIILLEESS - /etc/default/cdrecord - Default values can be set for the following options - in /etc/default/cdrecord. For example: CDR_FIFOS- - IZE=8m or CDR_SPEED=2 - - CDR_DEVICE - This may either hold a device identifier - that is suitable to the open call of the - SCSI transport library or a label in the - file /etc/default/cdrecord that allows to - identify a specific drive on the system. - - CDR_SPEED - Sets the default speed value for writing - (see also --ssppeeeedd option). - - CDR_FIFOSIZE - Sets the default size of the FIFO (see also - ffss==# option). - - Any other label - is an identifier for a specific drive on the - system. Such an identifier may not contain - the characters ',', '/', '@' or ':'. - - Each line that follows a label contains a - TAB separated list of items. Currently, - three items are recognized: the SCSI ID of - the drive, the default speed that should be - used for this drive and the default FIFO - size that should be used for this drive. The - values for _s_p_e_e_d and _f_i_f_o_s_i_z_e may be set to - -1 to tell cdrecord to use the global - defaults. A typical line may look this way: - - teac1= 0,5,0 4 8m - - yamaha= 1,6,0 -1 -1 - - This tells ccddrreeccoorrdd that a drive named _t_e_a_c_1 - is at scsibus 0, target 5, lun 0 and should - be used with speed 4 and a FIFO size of 8 - MB. A second drive may be found at scsibus - 1, target 6, lun 0 and uses the default - speed and the default FIFO size. + + + IINNDDEEXX 0000 specifies the starting time of the pprree-- + ggaapp of the track. + + IINNDDEEXX 0011 specifies the starting time of the + track. This is the index that is stored + in the table of content for the disk as + the track start. + + IINNDDEEXX >> 11 specifies a subindex within a track. + + IISSRRCC _r_e_c_o_r_d_i_n_g _c_o_d_e + This command is used to specify the IInntteerrnnaattiioonnaall + SSttaannddaarrdd RReeccoorrddiinngg CCooddee ((IISSRRCC)) of a track. This is + a code that should exist for all commercial audio + tracks. + + The ISRC code must be 12 characters in length. + The first two characters are characters that are + from the two character country code. The next + three characters are alphanumeric and describe the + studio code. The next two characters are the last + two digits from the recording year. The last 5 + characters are digits that form a serial number + that is unique for the same studio and year. + + If ccddrreeccoorrdd specific CUE extensions are permitted, + the four fields of the ISRC may be separated by a + minus sign. + + If the IISSRRCC command is used, it must appear after + a TTRRAACCKK command but before any IINNDDEEXX command. + + MMEESSSSAAGGEE _m_e_s_s_a_g_e-_s_t_r_i_n_g + This command is used to specify the test of a mes- + sage for a disk that includes CD-Text enhance- + ments. + + The parameter is the test of a message. If the + string contains any spaces, it must be enclosed in + quotation marks. + + If the MMEESSSSAAGGEE command appears before any TTRRAACCKK + command, the string parameter will be encoded as + the message of the entire disk. If the MMEESSSSAAGGEE + command appears after a TTRRAACCKK command, the string + parameter will be encoded the the message of the + current track. + + This command is only accepted if the ccddrreeccoorrdd + specific CUE extensions are permitted. + + PPEERRFFOORRMMEERR _p_e_r_f_o_r_m_e_r-_s_t_r_i_n_g + + + +Joerg Schilling Last change: Version 3.0 45 + + + + + + +Schily's USER COMMANDS CDRECORD(1) + + + + This command is used to specify the name of a per- + former for a disk that includes CD-Text enhance- + ments. + + The parameter is the name of the performer. If the + string contains any spaces, it must be enclosed in + quotation marks. + + If the PPEERRFFOORRMMEERR command appears before any TTRRAACCKK + command, the string parameter will be encoded as + the performer of the entire disk. If the PPEERR-- + FFOORRMMEERR command appears after a TTRRAACCKK command, the + string parameter will be encoded the the performer + of the current track. + + PPOOSSTTGGAAPP _m_m:_s_s:_f_f + This command is used to specify the length of a + postgap at the end of a track. The postgap data + is generated internally by ccddrreeccoorrdd. No data is + consumed from the current data file. + + The parameter specifies the postgap length in + minutes, seconds and frames. + + The PPOOSSTTGGAAPP command must appear after all IINNDDEEXX + commands for the current track. Only one PPOOSSTTGGAAPP + command is allowed per track. + + PPRREEGGAAPP _m_m:_s_s:_f_f + This command is used to specify the length of a + pregap at the beginning of a track. The pregap + data is generated internally by ccddrreeccoorrdd. No data + is consumed from the current data file. + + The parameter specifies the postgap length in + minutes, seconds and frames. + + The PPRREEGGAAPP command must appear after a TTRRAACCKK com- + mand but before any IINNDDEEXX command. Only one PPRREE-- + GGAAPP command is allowed per track. + + RREEMM _c_o_m_m_e_n_t + This command is used to put comments into a CUE + file. + + The text that appears in the line after a RREEMM com- + mand is usually ignored. There is an exception: + The special comment RREEMM CCDDRRTTOOOOLLSS is used to enable + ccddrreeccoorrdd specific CUE extensions in the parser. + + SSOONNGGWWRRIITTEERR _s_o_n_g_w_r_i_t_e_r-_s_t_r_i_n_g + This command is used to specify the name of a + + + +Joerg Schilling Last change: Version 3.0 46 + + + + + + +Schily's USER COMMANDS CDRECORD(1) + + + + songwriter for a disk that includes CD-Text + enhancements. + + The parameter is the name of a songwriter. If the + string contains any spaces, it must be enclosed in + quotation marks. + + If the SSOONNGGWWRRIITTEERR command appears before any TTRRAACCKK + command, the string parameter will be encoded as + the songwriter of the entire disk. If the SSOONNGG-- + WWRRIITTEERR command appears after a TTRRAACCKK command, the + string parameter will be encoded the the song- + writer of the current track. + + TTIITTLLEE _t_i_t_l_e-_s_t_r_i_n_g + This command is used to specify a title for a disk + that includes CD-Text enhancements. + + The parameter is the title for a track or for the + disk. If the string contains any spaces, it must + be enclosed in quotation marks. + + If the TTIITTLLEE command appears before any TTRRAACCKK com- + mand, the string parameter will be encoded as the + title of the entire disk. If the TTIITTLLEE command + appears after a TTRRAACCKK command, the string parame- + ter will be encoded the the title of the current + track. + + TTRRAACCKK _n_u_m_b_e_r _d_a_t_a_t_y_p_e + This command is used to start a new TTRRAACCKK. + + The first parameter is a track number in the range + 1-99. + + The second parameter specifies the track data + type. + + The following datatypes are permitted: + + AAUUDDIIOO Audio/Music (2352) + + CCDDGG Karaoke CD+G (2448) + + MMOODDEE11//22004488 CDROM Mode1 Data (cooked) + + MMOODDEE11//22335522 CDROM Mode1 Data (raw) + + MMOODDEE22//22333366 CDROM-XA Mode2 Data + + MMOODDEE22//22335522 CDROM-XA Mode2 Data + + + + +Joerg Schilling Last change: Version 3.0 47 + + + + + + +Schily's USER COMMANDS CDRECORD(1) + + + + CCDDII//22333366 CDI Mode2 Data + + CCDDII//22335522 CDI Mode2 Data + + All track numbers must be between 1 and 99 + inclusive. The first track number can be greater + than one, but all track numbers after the first + must be sequential. There must be at least one + track per file. SSEEEE AALLSSOO - ccddddaa22wwaavv(1), rreeaaddccdd(1), ssccgg(7), ffbbkk(7), mmkkiissooffss(8), - rrccmmdd(3), sssshh(1). + ccddddaa22wwaavv(1), rreeaaddccdd(1), ssccgg(7), ffbbkk(7), mmkkiissooffss(8), rrccmmdd(3), + sssshh(1). NNOOTTEESS - On Solaris you need to stop the volume management if you - like to use the USCSI fallback SCSI transport code. Even - things like ccddrreeccoorrdd --ssccaannbbuuss will not work if the volume - management is running. - - Disks made in TTrraacckk AAtt OOnnccee mode are not suitable as a - master for direct mass production by CD manufacturers. - You will need the ddiisskk aatt oonnccee option to record such - disks. Nevertheless the disks made in TTrraacckk AAtt OOnnccee will - normally be read in all CD players. Some old audio CD - players however may produce a two second click between two - audio tracks. - - The minimal size of a track is 4 seconds or 300 sectors. - If you write smaller tracks, the CD-Recorder will add - dummy blocks. This is not an error, even though the SCSI- - error message looks this way. - - CCddrreeccoorrdd has been tested on an upgraded Philips CDD-521 - recorder at single and double speed on a SparcStation - 20/502 with no problems, slower computer systems should - work also. The newer Philips/HP/Plasmon/Grundig drives as - well as Yamaha CDR-100 and CDR-102 work also. The Plasmon - RF-4100 work, but has not tested in multi session. A - Philips CDD-521 that has not been upgraded will not work. - The Sony CDU-924 has been tested, but does not support XA- - mode2 in hardware. The sony therefore cannot create con- - forming multi session disks. The Ricoh RO-1420C works, - but some people seem to have problems to use them with - speed=2, try speed=0 in this case. - - The Yamaha CDR-400 and all new SCSI-3/mmc conforming - drives are supported in single and multi-session. - - You should run several tests in all supported speeds of - your drive with the --dduummmmyy option turned on if you are - using ccddrreeccoorrdd on an unknown system. Writing a CD is a - realtime process. NNFFSS will not always deliver constantly - the needed data rates. If you want to use ccddrreeccoorrdd with - CD-images that are located on a NNFFSS mounted filesystem, be - sure that the fifo size is big enough. I used ccddrreeccoorrdd - with with medium load on a SS20/502 and even at quad speed - on a Sparcstation-2 which was heavily loaded, but it is - recommended to leave the system as lightly loaded as pos- - sible while writing a CD. If you want to make sure that - buffer underruns are not caused by your source disk, you - may use the command - - ccddrreeccoorrdd --dduummmmyy ddeevv==22,,00 ppaaddssiizzee==660000mm //ddeevv//nnuullll - - to create a disk that is entirely made of dummy data. - CCddrreeccoorrdd needs to run as root to get access to the - //ddeevv//ssccgg?? device nodes and to be able to lock itself into - memory. - - If you don't want to allow users to become root on your - system, ccddrreeccoorrdd may safely be installed suid root. This - allows all users or a group of users with no root privi- - leges to use ccddrreeccoorrdd.. CCddrreeccoorrdd in this case checks, if - the real user would have been able to read the specified - files. To give all user access to use ccddrreeccoorrdd,, enter: - - chown root /usr/local/bin/cdrecord - chmod 4711 /usr/local/bin/cdrecord - - To give a restricted group of users access to cdrecord - enter: - - chown root /usr/local/bin/cdrecord - chgrp cdburners /usr/local/bin/cdrecord - chmod 4710 /usr/local/bin/cdrecord - - and add a group _c_d_b_u_r_n_e_r_s on your system. - - Never give write permissions for non root users to the - _/_d_e_v_/_s_c_g_? devices unless you would allow anybody to - read/write/format all your disks. - - You should not connect old drives that do not support dis- - connect/reconnect to either the SCSI bus that is connected - to the CD-Recorder or the source disk. - - A Compact Disc can have no more than 99 tracks. - - When creating a disc with both audio and data tracks, the - data should be on track 1 otherwise you should create a - CDplus disk which is a multi session disk with the first - session containing the audio tracks and the following ses- - sion containing the data track. - - Many operating systems are not able to read more than a - single data track, or need special software to do so. - - More information on the SCSI command set of a HP CD- - Recorder can be found at: - - http://www.hp.com/isgsupport/cdr/index.html - - If you have more information or SCSI command manuals for - currently unsupported CD-Recorders please contact the - author. - - The Philips CDD 521 CD-Recorder (even in the upgraded - version) has several firmware bugs. Some of them will - force you to power cycle the device or to reboot the - machine. - - When using ccddrreeccoorrdd with the broken LLiinnuuxx SSCCSSII ggeenneerriicc - ddrriivveerr.. You should note that ccddrreeccoorrdd uses a hack, that - tries to emulate the functionality of the scg driver. - Unfortunately, the sg driver on LLiinnuuxx has several severe - bugs: - - +o It cannot see if a SCSI command could not be sent - at all. - - +o It cannot get the SCSI status byte. CCddrreeccoorrdd for - that reason cannot report failing SCSI commands in - some situations. - - +o It cannot get real DMA count of transfer. CCddrreeccoorrdd - cannot tell you if there is an DMA residual count. - - +o It cannot get number of bytes valid in auto sense - data. CCddrreeccoorrdd cannot tell you if device transfers - no sense data at all. - - +o It fetches to few data in auto request sense - (CCS/SCSI-2/SCSI-3 needs >= 18). - - The fifo percent output is computed just after a block of - data has been written to the CD-Recorder. For this reason, - there will never be 100% fifo fill, while the fifo is in - streaming mode. + Not all options described in this manual may be supported by + the OpenSource variant of cdrecord. Cdrecord issues a warn- + ing if an attempt is made to use an option that has been + disabled in the OpenSource variant. + + On Solaris before Solaris 10 Update 1, you need to stop the + volume management if you like to use the USCSI fallback SCSI + transport code. Even things like ccddrreeccoorrdd --ssccaannbbuuss will not + work if the volume management is running. + + Disks made in TTrraacckk AAtt OOnnccee mode are not suitable as a mas- + ter for direct mass production by CD-manufacturers. You + will need the ddiisskk aatt oonnccee option to record such disks. + Nevertheless the disks made in TTrraacckk AAtt OOnnccee will normally + be read in all CD-players. Some old audio CD-players however + may produce a two second click between two audio tracks. + + The minimal size of a track is 4 seconds or 300 sectors. If + you write smaller tracks, the CD-recorder will add dummy + blocks. This is not an error, even though the SCSI-error + message looks this way. + + CCddrreeccoorrdd has been tested on an upgraded Philips CDD-521 + recorder at single and double speed on a SparcStation 20/502 + with no problems, slower computer systems should work also. + The newer Philips/HP/Plasmon/Grundig drives as well as + Yamaha CDR-100 and CDR-102 work also. The Plasmon RF-4100 + works, but has not been tested in multi-session. A Philips + CDD-521 that has not been upgraded will not work. The Sony + CDU-924 has been tested, but does not support XA-mode2 in + hardware. The Sony therefore cannot create conforming + multi-session disks. The Ricoh RO-1420C works, but some + people seem to have problems to use them with speed=2, try + speed=0 in this case. + + + + +Joerg Schilling Last change: Version 3.0 48 + + + + + + +Schily's USER COMMANDS CDRECORD(1) + + + + The Yamaha CDR-400 and all new SCSI-3/mmc conforming drives + are supported in single and multi-session. + + You should run several tests in all supported speeds of your + drive with the -dduummmmyy option turned on if you are using + ccddrreeccoorrdd on an unknown system. Writing a CD is a real-time + process. NNFFSS will not always deliver constantly the needed + data rates. If you want to use ccddrreeccoorrdd with CD-images that + are located on a NNFFSS mounted filesystem, be sure that the + FIFO size is big enough. The author used ccddrreeccoorrdd with + medium load on a SS20/502 and even at quad speed on a + Sparcstation-2 which was heavily loaded, but it is recom- + mended to leave the system as lightly loaded as possible + while writing a CD. If you want to make sure that buffer + underruns are not caused by your source disk, you may use + the command + + ccddrreeccoorrdd -dduummmmyy ddeevv==22,,00 ppaaddssiizzee==660000mm //ddeevv//nnuullll + + to create a disk that is entirely made of dummy data. + CCddrreeccoorrdd needs to run as root to get access to the //ddeevv//ssccgg?? + device nodes and to be able to lock itself into memory. + + If you don't want to allow users to become root on your sys- + tem, ccddrreeccoorrdd may safely be installed suid root. This allows + all users or a group of users with no root privileges to use + ccddrreeccoorrdd.. CCddrreeccoorrdd in this case checks if the real user + would have been able to read the specified files. To give + all users access to use ccddrreeccoorrdd,, enter: + + chown root /opt/schily/bin/cdrecord + chmod 4711 /opt/schily/bin/cdrecord + + To give a restricted group of users access to cdrecord + enter: + + chown root /opt/schily/bin/cdrecord + chgrp cdburners /opt/schily/bin/cdrecord + chmod 4710 /opt/schily/bin/cdrecord + + and add a group _c_d_b_u_r_n_e_r_s on your system. + + Never give write permissions for non root users to the + /_d_e_v/_s_c_g? devices unless you would allow anybody to + read/write/format all your disks. + + You should not connect old drives that do not support + disconnect/reconnect to either the SCSI bus that is con- + nected to the CD-recorder or the source disk. + + A Compact Disc can have no more than 99 tracks. + + + + +Joerg Schilling Last change: Version 3.0 49 + + + + + + +Schily's USER COMMANDS CDRECORD(1) + + + + When creating a disc with both audio and data tracks, the + data should be on track 1 otherwise you should create a + CDplus disk which is a multi-session disk with the first + session containing the audio tracks and the following ses- + sion containing the data track. + + Many operating systems are not able to read more than a sin- + gle data track, or need special software to do so. + + More information on the SCSI command set of a HP CD-recorder + can be found at: + + http://www.hp.com/isgsupport/cdr/index.html + + If you have more information or SCSI command manuals for + currently unsupported CD/DVD/BluRay-recorders please contact + the author. + + The Philips CDD 521 CD-recorder (even in the upgraded ver- + sion) has several firmware bugs. Some of them will force you + to power cycle the device or to reboot the machine. + + When using ccddrreeccoorrdd with the LLiinnuuxx SSCCSSII ggeenneerriicc ddrriivveerr, you + should note that ccddrreeccoorrdd uses a layer, that tries to emu- + late the functionality of the scg driver on top of the + drives of the local operating system. Unfortunately, the sg + driver on LLiinnuuxx has several flaws: + + +o It cannot see if a SCSI command could not be sent at + all. + + +o It cannot get the SCSI status byte. CCddrreeccoorrdd for that + reason cannot report failing SCSI commands in some + situations. + + +o It cannot get real DMA count of transfer. CCddrreeccoorrdd can- + not tell you if there is a DMA residual count. + + +o It cannot get number of bytes valid in auto sense data. + CCddrreeccoorrdd cannot tell you if device transfers no sense + data at all. + + +o It fetches too few data in auto request sense + (CCS/SCSI-2/SCSI-3 needs >= 18). + + The FIFO percent output is computed just after a block of + data has been written to the CD/DVD/BluRay-recorder. For + this reason, there will never be 100% FIFO fill ratio while + the FIFO is in streaming mode. + + + + + + +Joerg Schilling Last change: Version 3.0 50 + + + + + + +Schily's USER COMMANDS CDRECORD(1) + DDIIAAGGNNOOSSTTIICCSS - You have 9 seconds to type ^C to abort ccddrreeccoorrdd after you - see the message: + You have 9 seconds to type ^C to abort ccddrreeccoorrdd after you + see the message: + + Starting to write CD at speed %d in %s mode for %s session. + + A typical error message for a SCSI command looks like: + + cdrecord: I/O error. test unit ready: scsi sendcmd: no error + CDB: 00 20 00 00 00 00 + status: 0x2 (CHECK CONDITION) + Sense Bytes: 70 00 05 00 00 00 00 0A 00 00 00 00 25 00 00 00 00 00 + Sense Key: 0x5 Illegal Request, Segment 0 + Sense Code: 0x25 Qual 0x00 (logical unit not supported) Fru 0x0 + Sense flags: Blk 0 (not valid) + cmd finished after 0.002s timeout 40s + + The first line gives information about the transport of the + command. The text after the first colon gives the error + text for the system call from the view of the kernel. It + usually is: II//OO eerrrroorr unless other problems happen. The + next words contain a short description for the SCSI command + that fails. The rest of the line tells you if there were any + problems for the transport of the command over the SCSI bus. + ffaattaall eerrrroorr means that it was not possible to transport the + command (i.e. no device present at the requested SCSI + address). + + The second line prints the SCSI command descriptor block for + the failed command. + + The third line gives information on the SCSI status code + returned by the command, if the transport of the command + succeeds. This is error information from the SCSI device. + + The fourth line is a hex dump of the auto request sense + information for the command. + + The fifth line is the error text for the sense key if avail- + able, followed by the segment number which is only valid if + the command was a _c_o_p_y command. If the error message is not + directly related to the current command, the text _d_e_f_e_r_r_e_d + _e_r_r_o_r is appended. + + The sixth line is the error text for the sense code and the + sense qualifier if available. If the type of the device is + known, the sense data is decoded from tables in _s_c_s_i_e_r_r_s._c . + The text is followed by the error value for a field replace- + able unit. - Starting to write CD at speed %d in %s mode for %s ses- - sion. + The seventh line prints the block number that is related to + the failed command and text for several error flags. The - A typical error message for a SCSI command looks like: - cdrecord: I/O error. test unit ready: scsi sendcmd: no error - CDB: 00 20 00 00 00 00 - status: 0x2 (CHECK CONDITION) - Sense Bytes: 70 00 05 00 00 00 00 0A 00 00 00 00 25 00 00 00 00 00 - Sense Key: 0x5 Illegal Request, Segment 0 - Sense Code: 0x25 Qual 0x00 (logical unit not supported) Fru 0x0 - Sense flags: Blk 0 (not valid) - cmd finished after 0.002s timeout 40s - - The first line gives information about the transport of - the command. The text after the first colon gives the - error text for the system call from the view of the ker- - nel. It usually is: II//OO eerrrroorr unless other problems hap- - pen. The next words contain a short description for the - SCSI command that fails. The rest of the line tells you if - there were any problems for the transport of the command - over the SCSI bus. ffaattaall eerrrroorr means that it was not pos- - sible to transport the command (i.e. no device present at - the requested SCSI address). - - The second line prints the SCSI command descriptor block - for the failed command. - - The third line gives information on the SCSI status code - returned by the command, if the transport of the command - succeeds. This is error information from the SCSI device. - - The fourth line is a hex dump of the auto request sense - information for the command. - - The fifth line is the error text for the sense key if - available, followed by the segment number that is only - valid if the command was a _c_o_p_y command. If the error mes- - sage is not directly related to the current command, the - text _d_e_f_e_r_r_e_d _e_r_r_o_r is appended. - - The sixth line is the error text for the sense code and - the sense qualifier if available. If the type of the - device is known, the sense data is decoded from tables in - _s_c_s_i_e_r_r_s_._c . The text is followed by the error value for - a field replaceable unit. - - The seventh line prints the block number that is related - to the failed command and text for several error flags. - The block number may not be valid. - - The eight line reports the timeout set up for this command - and the time that the command really needed to complete. - - The following message is not an error: - Track 01: Total bytes read/written: 2048/2048 (1 sectors). - cdrecord: I/O error. flush cache: scsi sendcmd: no error - CDB: 35 00 00 00 00 00 00 00 00 00 - status: 0x2 (CHECK CONDITION) - Sense Bytes: F0 00 05 80 00 00 27 0A 00 00 00 00 B5 00 00 00 00 00 - Sense Key: 0x5 Illegal Request, Segment 0 - Sense Code: 0xB5 Qual 0x00 (dummy data blocks added) Fru 0x0 - Sense flags: Blk -2147483609 (valid) - cmd finished after 0.002s timeout 40s - It simply notifies, that a track that is smaller than the - minimum size has been expanded to 300 sectors. +Joerg Schilling Last change: Version 3.0 51 + + + + + + +Schily's USER COMMANDS CDRECORD(1) + + + + block number may not be valid. + + The eighth line reports the timeout set up for this command + and the time that the command really needed to complete. + + The following message is not an error: + + Track 01: Total bytes read/written: 2048/2048 (1 sectors). + cdrecord: I/O error. flush cache: scsi sendcmd: no error + CDB: 35 00 00 00 00 00 00 00 00 00 + status: 0x2 (CHECK CONDITION) + Sense Bytes: F0 00 05 80 00 00 27 0A 00 00 00 00 B5 00 00 00 00 00 + Sense Key: 0x5 Illegal Request, Segment 0 + Sense Code: 0xB5 Qual 0x00 (dummy data blocks added) Fru 0x0 + Sense flags: Blk -2147483609 (valid) + cmd finished after 0.002s timeout 40s + + It simply notifies that a track that is smaller than the + minimum size has been expanded to 300 sectors. BBUUGGSS - CCddrreeccoorrdd has even more options than llss. + CCddrreeccoorrdd has even more options than llss. - There should be a recover option to make disks usable, - that have been written during a power failure. + There should be a recover option to make disks usable, that + have been written during a power failure. CCRREEDDIITTSS - Bill Swartz (Bill_Swartz@twolf.com) - For helping me with the TEAC driver support + Bill Swartz (Bill_Swartz@twolf.com) + For helping me with the TEAC driver support - Aaron Newsome (aaron.d.newsome@wdc.com) - For letting me develop Sony support on his - drive - - Eric Youngdale (eric@andante.jic.com) - For supplying mkisofs - - Gadi Oxman (gadio@netvision.net.il) - For tips on the ATAPI standard - - Finn Arne Gangstad (finnag@guardian.no) - For the first FIFO implementation. - - Dave Platt (dplatt@feghoot.ml.org) - For creating the experimental packet writ- - ing support, the first implementation of - CD-RW blanking support, the first .wav file - decoder and many nice discussions on - cdrecord. - - Chris P. Ross (cross@eng.us.uu.net) - For the first implementation os a BSDI SCSI - transport. - - Grant R. Guenther (grant@torque.net) - For creating the first parallel port trans- - port implementation for Linux. - - Kenneth D. Merry (ken@kdm.org) - for providing the CAM port for FreeBSD - together with Michael Smith - (msmith@freebsd.org) - - Heiko Eißfeldt (heiko@hexco.de) - for making libedc_ecc available (needed to - write RAW data sectors). + Aaron Newsome (aaron.d.newsome@wdc.com) + For letting me develop Sony support on his + drive + Eric Youngdale (eric@andante.jic.com) + For supplying mkisofs -MMAAIILLIINNGG LLIISSTTSS - If you want to actively take part on the development of - cdrecord, you may join the developer mailing list via this - URL: + Gadi Oxman (gadio@netvision.net.il) + For tips on the ATAPI standard + + Finn Arne Gangstad (finnag@guardian.no) + For the first FIFO implementation. + + Dave Platt (dplatt@feghoot.ml.org) + For creating the experimental packet writing + support, the first implementation of CD-RW + blanking support, the first .wav file decoder + and many nice discussions on cdrecord. + + Chris P. Ross (cross@eng.us.uu.net) + For the first implementation of a BSDI SCSI + + + +Joerg Schilling Last change: Version 3.0 52 + + + + + + +Schily's USER COMMANDS CDRECORD(1) + + + + transport. + + Grant R. Guenther (grant@torque.net) + For creating the first parallel port tran- + sport implementation for Linux. + + Kenneth D. Merry (ken@kdm.org) + for providing the CAM port for FreeBSD + together with Michael Smith + (msmith@freebsd.org) + + Heiko Eiszfeldt (heiko@hexco.de) + for making libedc_ecc available (needed to + write RAW data sectors). - hhttttpp::////lliissttss..bbeerrlliiooss..ddee//mmaaiillmmaann//lliissttiinnffoo//ccddrreeccoorrdd--ddeevveelloopp-- - eerrss - The mail address of the list is: ccddwwrriittee@@ootthheerr..ddeebbiiaann..oorrgg +MMAAIILLIINNGG LLIISSTTSS + If you want to actively take part on the development of + cdrecord, you may join the developer mailing list via this + URL: + + hhttttpp::////lliissttss..bbeerrlliiooss..ddee//mmaaiillmmaann//lliissttiinnffoo//ccddrreeccoorrdd--ddeevveellooppeerrss AAUUTTHHOORR - Joerg Schilling - Seestr. 110 - D-13353 Berlin - Germany + Joerg Schilling + Seestr. 110 + D-13353 Berlin + Germany + + Additional information can be found on: + http://cdrecord.berlios.de/private/cdrecord.html + + If you have support questions, send them to: + + ccddrreeccoorrdd--ssuuppppoorrtt@@bbeerrlliiooss..ddee + + If you have definitely found a bug, send a mail to: + + ccddrreeccoorrdd--ddeevveellooppeerrss@@bbeerrlliiooss..ddee + or jjooeerrgg..sscchhiilllliinngg@@ffookkuuss..ffrraauunnhhooffeerr..ddee + + To subscribe, use: + + hhttttpp::////lliissttss..bbeerrlliiooss..ddee//mmaaiillmmaann//lliissttiinnffoo//ccddrreeccoorrdd--ddeevveellooppeerrss + or hhttttpp::////lliissttss..bbeerrlliiooss..ddee//mmaaiillmmaann//lliissttiinnffoo//ccddrreeccoorrdd--ssuuppppoorrtt + + + + + + + + + +Joerg Schilling Last change: Version 3.0 53 + + + + + + +Schily's USER COMMANDS CDRECORD(1) + + + +IINNTTEERRFFAACCEE SSTTAABBIILLIITTYY + The interfaces provided by ccddrreeccoorrdd are designed for long + term stability. As ccddrreeccoorrdd depends on interfaces provided + by the underlying operating system, the stability of the + interfaces offered by ccddrreeccoorrdd depends on the interface sta- + bility of the OS interfaces. Modified interfaces in the OS + may enforce modified interfaces in ccddrreeccoorrdd. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - Additional information can be found on: - http://www.fokus.fhg.de/usr/schilling/cdrecord.html - If you have support questions, send them to: - ccddrreeccoorrdd--ssuuppppoorrtt@@bbeerrlliiooss..ddee - or ccddwwrriittee@@ootthheerr..ddeebbiiaann..oorrgg - Of you have definitely found a bug, send a mail to: - ccddrreeccoorrdd--ddeevveellooppeerrss@@bbeerrlliiooss..ddee - or sscchhiilllliinngg@@ffookkuuss..ffhhgg..ddee - To subscribe, use: - hhttttpp::////lliissttss..bbeerrlliiooss..ddee//mmaaiillmmaann//lliissttiinnffoo//ccddrreeccoorrdd--ddeevveelloopp-- - eerrss - or hhttttpp::////lliissttss..bbeerrlliiooss..ddee//mmaaiillmmaann//lliissttiinnffoo//ccddrreeccoorrdd--ssuupp-- - ppoorrtt - The old cdwrite mailing list may be joined by sending mail - to: - cdwrite-request@other.debian.org - and including the word _s_u_b_s_c_r_i_b_e in the body. The mail - address of the list is: - cdwrite@other.debian.org +Joerg Schilling Last change: Version 3.0 54 -Joerg Schilling Version 2.0 CDRECORD(1) diff -Nru cdrtools-2.01.01a33/doc/cdrecord.ps cdrtools-3.02a09/doc/cdrecord.ps --- cdrtools-2.01.01a33/doc/cdrecord.ps 2002-12-24 15:55:27.000000000 +0000 +++ cdrtools-3.02a09/doc/cdrecord.ps 2010-06-01 22:26:28.000000000 +0000 @@ -1,1838 +1,6957 @@ -%!PS-Adobe-3.0 -%%Creator: groff version 1.17.2 -%%CreationDate: Tue Dec 24 17:01:55 2002 -%%DocumentNeededResources: font Times-Roman -%%+ font Times-Bold -%%+ font Times-Italic -%%DocumentSuppliedResources: procset grops 1.17 2 -%%Pages: 17 -%%PageOrder: Ascend -%%Orientation: Portrait +%!PS +%%Version: 3.15 +%%DocumentFonts: (atend) +%%Pages: (atend) %%EndComments -%%BeginProlog -%%BeginResource: procset grops 1.17 2 -/setpacking where{ -pop -currentpacking -true setpacking -}if -/grops 120 dict dup begin -/SC 32 def -/A/show load def -/B{0 SC 3 -1 roll widthshow}bind def -/C{0 exch ashow}bind def -/D{0 exch 0 SC 5 2 roll awidthshow}bind def -/E{0 rmoveto show}bind def -/F{0 rmoveto 0 SC 3 -1 roll widthshow}bind def -/G{0 rmoveto 0 exch ashow}bind def -/H{0 rmoveto 0 exch 0 SC 5 2 roll awidthshow}bind def -/I{0 exch rmoveto show}bind def -/J{0 exch rmoveto 0 SC 3 -1 roll widthshow}bind def -/K{0 exch rmoveto 0 exch ashow}bind def -/L{0 exch rmoveto 0 exch 0 SC 5 2 roll awidthshow}bind def -/M{rmoveto show}bind def -/N{rmoveto 0 SC 3 -1 roll widthshow}bind def -/O{rmoveto 0 exch ashow}bind def -/P{rmoveto 0 exch 0 SC 5 2 roll awidthshow}bind def -/Q{moveto show}bind def -/R{moveto 0 SC 3 -1 roll widthshow}bind def -/S{moveto 0 exch ashow}bind def -/T{moveto 0 exch 0 SC 5 2 roll awidthshow}bind def -/SF{ -findfont exch -[exch dup 0 exch 0 exch neg 0 0]makefont -dup setfont -[exch/setfont cvx]cvx bind def -}bind def -/MF{ -findfont -[5 2 roll -0 3 1 roll -neg 0 0]makefont -dup setfont -[exch/setfont cvx]cvx bind def -}bind def -/level0 0 def -/RES 0 def -/PL 0 def -/LS 0 def -/MANUAL{ -statusdict begin/manualfeed true store end -}bind def -/PLG{ -gsave newpath clippath pathbbox grestore -exch pop add exch pop -}bind def -/BP{ -/level0 save def -1 setlinecap -1 setlinejoin -72 RES div dup scale -LS{ -90 rotate -}{ -0 PL translate -}ifelse -1 -1 scale -}bind def -/EP{ -level0 restore -showpage -}bind def -/DA{ -newpath arcn stroke -}bind def -/SN{ -transform -.25 sub exch .25 sub exch -round .25 add exch round .25 add exch -itransform -}bind def -/DL{ -SN -moveto -SN -lineto stroke -}bind def -/DC{ -newpath 0 360 arc closepath -}bind def -/TM matrix def -/DE{ -TM currentmatrix pop -translate scale newpath 0 0 .5 0 360 arc closepath -TM setmatrix -}bind def -/RC/rcurveto load def -/RL/rlineto load def -/ST/stroke load def -/MT/moveto load def -/CL/closepath load def -/FL{ -currentgray exch setgray fill setgray -}bind def -/BL/fill load def -/LW/setlinewidth load def -/RE{ -findfont -dup maxlength 1 index/FontName known not{1 add}if dict begin -{ -1 index/FID ne{def}{pop pop}ifelse -}forall -/Encoding exch def -dup/FontName exch def -currentdict end definefont pop -}bind def -/DEFS 0 def -/EBEGIN{ -moveto -DEFS begin -}bind def -/EEND/end load def -/CNT 0 def -/level1 0 def -/PBEGIN{ -/level1 save def -translate -div 3 1 roll div exch scale -neg exch neg exch translate -0 setgray -0 setlinecap -1 setlinewidth -0 setlinejoin -10 setmiterlimit -[]0 setdash -/setstrokeadjust where{ -pop -false setstrokeadjust -}if -/setoverprint where{ -pop -false setoverprint -}if -newpath -/CNT countdictstack def -userdict begin -/showpage{}def -}bind def -/PEND{ -clear -countdictstack CNT sub{end}repeat -level1 restore -}bind def -end def -/setpacking where{ -pop -setpacking -}if -%%EndResource -%%IncludeResource: font Times-Roman -%%IncludeResource: font Times-Bold -%%IncludeResource: font Times-Italic -grops begin/DEFS 1 dict def DEFS begin/u{.001 mul}bind def end/RES 72 -def/PL 841.89 def/LS false def/ENC0[/asciicircum/asciitilde/Scaron -/Zcaron/scaron/zcaron/Ydieresis/trademark/quotesingle/.notdef/.notdef -/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef -/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef -/.notdef/.notdef/.notdef/space/exclam/quotedbl/numbersign/dollar/percent -/ampersand/quoteright/parenleft/parenright/asterisk/plus/comma/hyphen -/period/slash/zero/one/two/three/four/five/six/seven/eight/nine/colon -/semicolon/less/equal/greater/question/at/A/B/C/D/E/F/G/H/I/J/K/L/M/N/O -/P/Q/R/S/T/U/V/W/X/Y/Z/bracketleft/backslash/bracketright/circumflex -/underscore/quoteleft/a/b/c/d/e/f/g/h/i/j/k/l/m/n/o/p/q/r/s/t/u/v/w/x/y -/z/braceleft/bar/braceright/tilde/.notdef/quotesinglbase/guillemotleft -/guillemotright/bullet/florin/fraction/perthousand/dagger/daggerdbl -/endash/emdash/ff/fi/fl/ffi/ffl/dotlessi/dotlessj/grave/hungarumlaut -/dotaccent/breve/caron/ring/ogonek/quotedblleft/quotedblright/oe/lslash -/quotedblbase/OE/Lslash/.notdef/exclamdown/cent/sterling/currency/yen -/brokenbar/section/dieresis/copyright/ordfeminine/guilsinglleft -/logicalnot/minus/registered/macron/degree/plusminus/twosuperior -/threesuperior/acute/mu/paragraph/periodcentered/cedilla/onesuperior -/ordmasculine/guilsinglright/onequarter/onehalf/threequarters -/questiondown/Agrave/Aacute/Acircumflex/Atilde/Adieresis/Aring/AE -/Ccedilla/Egrave/Eacute/Ecircumflex/Edieresis/Igrave/Iacute/Icircumflex -/Idieresis/Eth/Ntilde/Ograve/Oacute/Ocircumflex/Otilde/Odieresis -/multiply/Oslash/Ugrave/Uacute/Ucircumflex/Udieresis/Yacute/Thorn -/germandbls/agrave/aacute/acircumflex/atilde/adieresis/aring/ae/ccedilla -/egrave/eacute/ecircumflex/edieresis/igrave/iacute/icircumflex/idieresis -/eth/ntilde/ograve/oacute/ocircumflex/otilde/odieresis/divide/oslash -/ugrave/uacute/ucircumflex/udieresis/yacute/thorn/ydieresis]def -/Times-Italic@0 ENC0/Times-Italic RE/Times-Bold@0 ENC0/Times-Bold RE -/Times-Roman@0 ENC0/Times-Roman RE +% +% Copyright 2005 Sun Microsystems, Inc. All rights reserved. +% Use is subject to license terms. +% +% CDDL HEADER START +% +% The contents of this file are subject to the terms of the +% Common Development and Distribution License, Version 1.0 only +% (the "License"). You may not use this file except in compliance +% with the License. +% +% You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE +% or http://www.opensolaris.org/os/licensing. +% See the License for the specific language governing permissions +% and limitations under the License. +% +% When distributing Covered Code, include this CDDL HEADER in each +% file and include the License file at usr/src/OPENSOLARIS.LICENSE. +% If applicable, add the following below this CDDL HEADER, with the +% fields enclosed by brackets "[]" replaced with your own identifying +% information: Portions Copyright [yyyy] [name of copyright owner] +% +% CDDL HEADER END +% +%ident "%Z%%M% %I% %E% SMI" +% +% Version 3.16 prologue for troff files. +% + +/#copies 1 store +/aspectratio 1 def +/formsperpage 1 def +/landscape false def +/linewidth .3 def +/magnification 1 def +/margin 0 def +/orientation 0 def +/resolution 720 def +/xoffset 0 def +/yoffset 0 def + +/roundpage true def +/useclippath true def +/pagebbox [0 0 612 792] def + +/R /Times-Roman def +/I /Times-Italic def +/B /Times-Bold def +/BI /Times-BoldItalic def +/H /Helvetica def +/HI /Helvetica-Oblique def +/HB /Helvetica-Bold def +/HX /Helvetica-BoldOblique def +/CW /Courier def +/CO /Courier def +/CI /Courier-Oblique def +/CB /Courier-Bold def +/CX /Courier-BoldOblique def +/PA /Palatino-Roman def +/PI /Palatino-Italic def +/PB /Palatino-Bold def +/PX /Palatino-BoldItalic def +/Hr /Helvetica-Narrow def +/Hi /Helvetica-Narrow-Oblique def +/Hb /Helvetica-Narrow-Bold def +/Hx /Helvetica-Narrow-BoldOblique def +/KR /Bookman-Light def +/KI /Bookman-LightItalic def +/KB /Bookman-Demi def +/KX /Bookman-DemiItalic def +/AR /AvantGarde-Book def +/AI /AvantGarde-BookOblique def +/AB /AvantGarde-Demi def +/AX /AvantGarde-DemiOblique def +/NR /NewCenturySchlbk-Roman def +/NI /NewCenturySchlbk-Italic def +/NB /NewCenturySchlbk-Bold def +/NX /NewCenturySchlbk-BoldItalic def +/ZD /ZapfDingbats def +/ZI /ZapfChancery-MediumItalic def +/VR /Varitimes#Roman def +/VI /Varitimes#Italic def +/VB /Varitimes#Bold def +/VX /Varitimes#BoldItalic def +/S /S def +/S1 /S1 def +/GR /Symbol def + +/inch {72 mul} bind def +/min {2 copy gt {exch} if pop} bind def + +/setup { + counttomark 2 idiv {def} repeat pop + + landscape {/orientation 90 orientation add def} if + /scaling 72 resolution div def + linewidth setlinewidth + 1 setlinecap + + pagedimensions + xcenter ycenter translate + orientation neg rotate + width 2 div neg height 2 div translate + xoffset inch yoffset inch translate + margin 2 div dup neg translate + magnification dup aspectratio mul scale + scaling scaling scale + + /Symbol /S Sdefs cf + /Times-Roman /S1 S1defs cf + 0 0 moveto +} def + +/pagedimensions { + useclippath userdict /gotpagebbox known not and { + /pagebbox [clippath pathbbox newpath] def + roundpage currentdict /roundpagebbox known and {roundpagebbox} if + } if + pagebbox aload pop + 4 -1 roll exch 4 1 roll 4 copy + landscape {4 2 roll} if + sub /width exch def + sub /height exch def + add 2 div /xcenter exch def + add 2 div /ycenter exch def + userdict /gotpagebbox true put +} def + +/pagesetup { + /page exch def + currentdict /pagedict known currentdict page known and { + page load pagedict exch get cvx exec + } if +} def + +/decodingdefs [ + {counttomark 2 idiv {y moveto show} repeat} + {neg /y exch def counttomark 2 idiv {y moveto show} repeat} + {neg moveto {2 index stringwidth pop sub exch div 0 32 4 -1 roll widthshow} repeat} + {neg moveto {spacewidth sub 0.0 32 4 -1 roll widthshow} repeat} + {counttomark 2 idiv {y moveto show} repeat} + {neg setfunnytext} +] def + +/setdecoding {/t decodingdefs 3 -1 roll get bind def} bind def + +/w {neg moveto show} bind def +/m {neg dup /y exch def moveto} bind def +/done {/lastpage where {pop lastpage} if} def + +/f { + dup /font exch def findfont exch + dup /ptsize exch def scaling div dup /size exch def scalefont setfont + linewidth ptsize mul scaling 10 mul div setlinewidth + /spacewidth ( ) stringwidth pop def +} bind def + +/changefont { + /fontheight exch def + /fontslant exch def + currentfont [ + 1 0 + fontheight ptsize div fontslant sin mul fontslant cos div + fontheight ptsize div + 0 0 + ] makefont setfont +} bind def + +/sf {f} bind def + +/cf { + dup length 2 idiv + /entries exch def + /chtab exch def + /newfont exch def + + findfont dup length 1 add dict + /newdict exch def + {1 index /FID ne {newdict 3 1 roll put} {pop pop} ifelse} forall + + newdict /Metrics entries dict put + newdict /Metrics get + begin + chtab aload pop + 1 1 entries {pop def} for + newfont newdict definefont pop + end +} bind def + +% +% A few arrays used to adjust reference points and character widths in some +% of the printer resident fonts. If square roots are too high try changing +% the lines describing /radical and /radicalex to, +% +% /radical [0 -75 550 0] +% /radicalex [-50 -75 500 0] +% + +/Sdefs [ + /bracketlefttp [220 500] + /bracketleftbt [220 500] + /bracketrighttp [-70 380] + /bracketrightbt [-70 380] + /braceleftbt [220 490] + /bracketrightex [220 -125 500 0] + /radical [0 0 550 0] + % NeWSprint's \(br is too low, compensate + statusdict /product get (NeWS Server) eq { + /radicalex [-50 100 500 0] + /parenleftex [-20 100 0 0] + + } { + /radicalex [-50 0 500 0] + /parenleftex [-20 -170 0 0] + } ifelse + /integral [100 -50 500 0] + /infinity [10 -75 730 0] +] def + +/S1defs [ + /underscore [0 80 500 0] + /endash [7 90 650 0] +] def %%EndProlog +%%BeginSetup +mark +/resolution 720 def +setup +2 setdecoding +%%EndSetup %%Page: 1 1 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF 104.275(CDRECORD\(1\) Schily\264s)72 48 R -(USER COMMANDS)2.5 E(CDRECORD\(1\))106.775 E/F1 10.95/Times-Bold@0 SF --.219(NA)72 84 S(ME).219 E F0 -(cdrecord \255 record audio or data Compact Discs from a master)108 96 Q -F1(SYNOPSIS)72 112.8 Q/F2 10/Times-Bold@0 SF(cdr)108 124.8 Q(ecord)-.18 -E F0([)2.5 E/F3 10/Times-Italic@0 SF -.1(ge)2.5 G(ner).1 E(al options) --.15 E F0(])2.5 E F2(de)2.5 E(v=)-.15 E F3(de).35 E(vice)-.15 E F0([)2.5 -E F3(tr)2.5 E(ac)-.15 E 2.5(ko)-.2 G(ptions)-2.5 E F0(])2.5 E F3(tr)2.5 -E(ac)-.15 E(k1)-.2 E F0 1.666(...)C F3(tr)-1.536 E(ac)-.15 E(kn)-.2 E F1 -(DESCRIPTION)72 153.6 Q F2(Cdr)108 165.6 Q(ecord)-.18 E F0(is used to r\ -ecord data or audio Compact Discs on an Orange Book CD-Recorder)2.5 E(.) --.55 E(The)108 182.4 Q F3(de)3.911 E(vice)-.15 E F0 1.411(refers to) -3.911 F F3(scsib)3.911 E(us)-.2 E F0(/).27 E F3(tar).13 E -.1(ge)-.37 G -(t).1 E F0(/).68 E F3(lun).09 E F0 1.411(of the CD-Recorder)3.911 F -3.911(.C)-.55 G 1.411(ommunication on)-3.911 F F3(SunOS)3.911 E F0 1.41 -(is done with the)3.91 F 1.254(SCSI general dri)108 194.4 R -.15(ve)-.25 -G(r).15 E F2(scg)3.754 E(.)-.15 E F0 1.255 -(Other operating systems are using a library simulation of this dri) -6.254 F -.15(ve)-.25 G 4.855 -.55(r. P).15 H(ossible).55 E 1.002 -(syntax is:)108 206.4 R F2(de)3.502 E(v=)-.15 E F3(scsib)3.502 E(us)-.2 -E F0(,).27 E F3(tar).13 E -.1(ge)-.37 G(t).1 E F0(,).68 E F3(lun).09 E -F0(or)3.502 E F2(de)3.501 E(v=)-.15 E F3(tar)3.501 E -.1(ge)-.37 G(t).1 -E F0(,).68 E F3(lun).09 E F0 6.001(.I).24 G 3.501(nt)-6.001 G 1.001 -(he latter case, the CD-Recorder has to be con-)-3.501 F .465 -(nected to the def)108 218.4 R .465(ault SCSI b)-.1 F .465 -(us of the machine.)-.2 F F3(Scsib)5.465 E(us)-.2 E F0(,).27 E F3(tar) -2.965 E -.1(ge)-.37 G(t).1 E F0(and)2.965 E F3(lun)2.965 E F0 .466 -(are inte)2.966 F .466(ger numbers.)-.15 F .466(Some operat-)5.466 F -.578(ing systems or SCSI transport implementations may require to speci\ -fy a \214lename in addition.)108 230.4 R .578(In this case)5.578 F .365 -(the correct syntax for the de)108 242.4 R .365(vice is:)-.25 F F2(de) -2.865 E(v=)-.15 E F3(de)2.865 E(vicename)-.15 E F0(:).18 E F3(scsib).34 -E(us)-.2 E F0(,).27 E F3(tar).13 E -.1(ge)-.37 G(t).1 E F0(,).68 E F3 -(lun).09 E F0(or)2.865 E F2(de)2.865 E(v=)-.15 E F3(de)2.865 E(vicename) --.15 E F0(:).18 E F3(tar).13 E -.1(ge)-.37 G(t).1 E F0(,).68 E F3(lun) -.09 E F0 5.365(.I).24 G(f)-5.365 E .568(the name of the de)108 254.4 R -.568(vice node that has been speci\214ed on such a system refers to e) --.25 F .567(xactly one SCSI de)-.15 F .567(vice, a)-.25 F .189 -(shorthand in the form)108 266.4 R F2(de)2.689 E(v=)-.15 E F3(de)2.689 E -(vicename)-.15 E F0(:).18 E F3(@)-.68 E F0(or)2.689 E F2(de)2.689 E(v=) --.15 E F3(de)2.689 E(vicename)-.15 E F0(:).18 E F3(@)-.68 E F0(,)A F3 -(lun).09 E F0 .19(may be used instead of)2.689 F F2(de)2.69 E(v=)-.15 E -F3(de)2.69 E(vice-)-.15 E(name)108 278.4 Q F0(:).18 E F3(scsib)A(us)-.2 -E F0(,).27 E F3(tar).13 E -.1(ge)-.37 G(t).1 E F0(,).68 E F3(lun).09 E -F0(.).24 E 2.32 -.8(To a)108 307.2 T .72(ccess remote SCSI de).8 F .72 -(vices, you need to prepend the SCSI de)-.25 F .72 -(vice name by a remote de)-.25 F .72(vice indicator)-.25 F(.)-.55 E -(The remote de)108 319.2 Q(vice indicator is either)-.25 E F2(REMO)2.5 E -(TE:)-.4 E F3(user@host:).08 E F0(or)2.5 E F2(REMO)5 E(TE:)-.4 E F3 -(host:).31 E F0 3.273(Av)108 331.2 S .773(alid remote SCSI de)-3.523 F -.773(vice name may be:)-.25 F F2(REMO)3.273 E(TE:)-.4 E F3(user@host:) -.08 E F0 .773(to allo)3.273 F 3.274(wr)-.25 G .774(emote SCSI b)-3.274 F -.774(us scanning or)-.2 F F2(REMO)108 343.2 Q(TE:)-.4 E F3 -(user@host:1,0,0)A F0(to access the SCSI de)2.5 E(vice at)-.25 E F3 -(host)2.5 E F0(connected to SCSI b)2.5 E(us # 1,tar)-.2 E(get 0 lun 0.) --.18 E 3.074 -.8(To a)108 372 T 1.474(ccess SCSI de).8 F 1.474 -(vices via alternate transport layers, you need to prepend the SCSI de) --.25 F 1.473(vice name by a)-.25 F .057(transport layer indicator)108 -384 R 5.057(.T)-.55 G .057 -(he transport layer indicator may be something lik)-5.057 F(e)-.1 E F2 -(USCSI:)2.558 E F0(or)2.558 E F2 -1.5 -.95(AT A)2.558 H(PI:).95 E F0 -5.058(.T)C 2.558(og)-5.858 G .058(et a)-2.558 F -(list of supported transport layers for your platform, use)108 396 Q F2 -(de)2.5 E(v=)-.15 E F3(HELP)2.5 E F0(:).44 E 2.759 -.8(To m)108 436.8 T -(ak).8 E(e)-.1 E F2(cdr)3.659 E(ecord)-.18 E F0 1.159(portable to all) -3.659 F/F4 8/Times-Roman@0 SF(UNIX)3.658 E F0 1.158 -(platforms, the syntax)3.658 F F2(de)3.658 E(v=)-.15 E F3(de)3.658 E -(vicename)-.15 E F0(:).18 E F3(scsib).34 E(us)-.2 E F0(,).27 E F3(tar) -.13 E -.1(ge)-.37 G(t).1 E F0(,).68 E F3(lun).09 E F0 1.158(is pre-) -3.658 F .297(ferred as is hides OS speci\214c kno)108 448.8 R .297 -(wledge about de)-.25 F .297(vice names from the user)-.25 F 5.297(.A) --.55 G .298(speci\214c OS must not neces-)-2.5 F(sarily support a w)108 -460.8 Q(ay to specify a real de)-.1 E(vice \214le name nor a w)-.25 E -(ay to specify)-.1 E F3(scsib)2.5 E(us)-.2 E F0(,).27 E F3(tar).13 E -.1 -(ge)-.37 G(t).1 E F0(,).68 E F3(lun).09 E F0(.).24 E F3(Scsib)108 489.6 -Q(us)-.2 E F0 3.257(0i)3.257 G 3.257(st)-3.257 G .757(he def)-3.257 F -.757(ault SCSI b)-.1 F .757(us on the machine. W)-.2 F .756 -(atch the boot messages for more information or look)-.8 F(into)108 -501.6 Q F2(/v)2.995 E(ar/adm/messages)-.1 E F0 .496 -(for more information about the SCSI con\214guration of your machine.) -2.995 F .496(If you ha)5.496 F -.15(ve)-.2 G 2.158 -(problems to \214gure out what v)108 513.6 R 2.158(alues for)-.25 F F3 -(scsib)4.658 E(us)-.2 E F0(,).27 E F3(tar).13 E -.1(ge)-.37 G(t).1 E F0 -(,).68 E F3(lun).09 E F0 2.158(should be used, try the)4.658 F F2 -(\255scanb)4.658 E(us)-.2 E F0 2.158(option of)4.658 F F2(cdr)108 525.6 -Q(ecord)-.18 E F0(described belo)2.5 E -.65(w.)-.25 G .114 -(If a \214le /etc/def)108 554.4 R .114(ault/cdrecord e)-.1 F .115 -(xists, the parameter to the)-.15 F F2(de)2.615 E(v=)-.15 E F0 .115 -(option may also be a dri)2.615 F .415 -.15(ve n)-.25 H .115 -(ame label in said).15 F(\214le \(see FILES section\).)108 566.4 Q(On) -108 595.2 Q F2(SVr4)3.559 E F0 1.059(compliant systems,)3.559 F F2(cdr) -3.559 E(ecord)-.18 E F0 1.059 -(uses the the real time class to get the highest scheduling priority) -3.559 F .284(that is possible \(higher than all k)108 607.2 R .285 -(ernel processes\).)-.1 F .285(On systems with)5.285 F F2 .285(POSIX r) -2.785 F .285(eal time scheduling)-.18 F F0(cdrecord)2.785 E -(uses real time scheduling too, b)108 619.2 Q(ut may not be able to g) --.2 E(ain a priority that is higher than all k)-.05 E(ernel processes.) --.1 E(In)108 636 Q F3 -1.55 -.55(Tr a)2.604 H .504 -.2(ck A).55 H 2.604 -(tO).2 G(nce)-2.604 E F0 .103(mode, each)2.603 F F3(tr)2.603 E(ac)-.15 E -(k)-.2 E F0 .103(corresponds to a single \214le that contains the prepa\ -red data for that track.)2.603 F(If the ar)108 648 Q(gument is `)-.18 E -F2A F0(', standard input is used for that track.)A -(Only one track may be tak)5 E(en from)-.1 E F3(stdin)2.5 E F0(.).24 E -F1(GENERAL OPTIONS)72 676.8 Q F0(General options must be before an)108 -688.8 Q 2.5(yt)-.15 G(rack \214le name or track option.)-2.5 E F2 -108 705.6 Q(ersion)-.1 E F0(Print v)144 717.6 Q -(ersion information and e)-.15 E(xit.)-.15 E(J)72 768 Q -.25(..)-5.5 K -(or)-4.5 5.5 M 2.5(gS)-.18 G 153.065(chilling V)-2.5 F(ersion 2.0)-1.11 -E(1)206.225 E EP +save +mark +1 pagesetup +10 R f +(Schily)720 480 w +10 S1 f +(\302)976 480 w +10 R f +( \( 1 \))3 164( CDRECORD)1 3277(s USER COMMANDS)2 950 3 1009 480 t +9 B f +( E)1 0( ME)1 60(N NA AM)2 215 3 720 960 t +10 R f +(cdrecord)1080 1080 w +10 S1 f +(\261)1461 1080 w +10 R f +(record audio or data CD, DVD or BluRay)7 1725 1 1559 1080 t +9 B f +( S)1 0( IS)1 50( SI)1 35( PS)1 50( OP)1 55( YN NO)2 135(S SY)1 115 7 720 1248 t +10 B f +( d)1 0( rd)1 56( or)1 44( re ec co)3 138( dr)1 44(c cd)1 100 6 1080 1368 t +10 R f +([)1495 1368 w +10 I f +(general options)1 633 1 1561 1368 t +10 R f +(][)2227 1368 w +10 B f +( =)1 0( v=)1 57( ev)1 50(d de)1 100 4 2326 1368 t +10 I f +(device)2533 1368 w +10 R f +(][)2820 1368 w +10 I f +(track options)1 533 1 2919 1368 t +10 R f +(])3485 1368 w +10 I f +(track1)3551 1368 w +10 R f +(. . .)2 107 1 3814 1368 t +10 I f +(trackn)3921 1368 w +9 B f +( N)1 0( ON)1 65( IO)1 70( TI)1 35( PT)1 60( IP)1 55( CR RI)2 100( SC)1 65( ES)1 50(D DE)1 125 10 720 1656 t +10 B f +( d)1 0( rd)1 56( or)1 44( re ec co)3 138( dr)1 44(C Cd)1 128 6 1080 1776 t +10 R f +( on an Orange Book CD-recorder, to write)7 1851(is used to record data or audio Compact Discs)8 2012 2 1537 1776 t +(DVD media on a DVD-recorder or to write BluRay media on a BluRay-recorder.)12 3335 1 1080 1896 t +9 B f +( g)1 0( ng)1 45( in)1 50( mi)1 25( am)1 75( na)1 45( n)1 80( ce e)2 40( ic)1 40( vi)1 25( ev)1 45(D De)1 105 12 900 2064 t +10 R f +( no)1 139( If)1 138( all.)1 164(Most users do not need to care about device naming at)10 2304 4 1080 2184 t +10 B f +( =)1 0( v=)1 57( ev)1 50(d de)1 100 4 3864 2184 t +10 R f +(option was speci\256ed,)2 869 1 4110 2184 t +10 B f +( d)1 0( rd)1 56( or)1 44( re ec co)3 138( dr)1 44(c cd)1 100 6 5018 2184 t +10 R f +(implements)1080 2304 w +10 B f +( t)1 0( et)1 33( ge)1 44( rg)1 50( ar)1 44( ta)1 50( t)1 80( o)1 0( to)1 50( ut)1 33(a au)1 106 11 1594 2304 t +10 R f +(support and automagically \256nds the drive in case that exactly one CD-ROM)11 3269 1 2131 2304 t +( the sys-)2 355( case that more than one CD-ROM type drive exists on)10 2297( In)1 151(type drive is available in the system.)6 1517 4 1080 2424 t +(tem, a list of possible device name parameters may be retrieved with)11 2926 1 1080 2544 t +10 B f +( d)1 0( rd)1 56( or)1 44( re ec co)3 138( dr)1 44(c cd)1 100 6 4048 2544 t +10 S1 f +(\261 \261)1 65 1 4472 2544 t +10 B f +( s)1 0( nb bu us)3 151( an)1 56( ca)1 50(s sc)1 83 5 4537 2544 t +10 R f +(or from the)2 481 1 4919 2544 t +( from the output of)4 791(target example)1 598 2 1080 2664 t +10 B f +( p)1 0( lp)1 56( el)1 28( he)1 44( =h)1 56( v=)1 57( ev)1 50( de)1 44( d)1 90( d)1 0( rd)1 56( or)1 44( re ec co)3 138( dr)1 44(c cd)1 100 15 2503 2664 t +10 R f +(, then the)2 387 1 3310 2664 t +10 B f +( =)1 0( v=)1 57( ev)1 50(d de)1 100 4 3731 2664 t +10 R f +(parameter may be set based on the)6 1428 1 3972 2664 t +(device listing.)1 569 1 1080 2784 t +(The)1080 2952 w +10 I f +(device)1310 2952 w +10 R f +(parameter to the)2 748 1 1639 2952 t +10 B f +( =)1 0( v=)1 57( ev)1 50(d de)1 100 4 2462 2952 t +10 R f +( below refers to)3 776(option explained)1 719 2 2744 2952 t +10 I f +(scsibus)4315 2952 w +10 R f +(/)4612 2952 w +10 I f +(target)4640 2952 w +10 R f +(/)4887 2952 w +10 I f +(lun)4915 2952 w +10 R f +(of the)1 281 1 5119 2952 t +( parameter to the)3 724( a \256le /etc/default/cdrecord exists, the)5 1587(CD/DVD/BluRay-recorder. If)1 1248 3 1080 3072 t +10 B f +( =)1 0( v=)1 57( ev)1 50(d de)1 100 4 4681 3072 t +10 R f +(option may)1 470 1 4930 3072 t +(also be a drive name label in said \256le \(see FILES section\).)11 2412 1 1080 3192 t +9 B f +( d)1 0( rd)1 50( or)1 40( re ec co)3 125( dr)1 40( cd)1 50( c)1 70( g)1 0( ng)1 45( in)1 50( un nn ni)3 125( ru)1 50( r)1 70( r)1 0( or)1 40( fo)1 45( f)1 60( s)1 0( ts)1 35( nt)1 30( in)1 50( ai)1 25( ra)1 45( tr)1 40( st)1 30( ns)1 35( on)1 50(C Co)1 110 28 900 3480 t +10 R f +(On)1080 3600 w +10 B f +( 4)1 0( r4)1 50( Vr)1 44(S SV)1 128 4 1236 3600 t +10 R f +(compliant systems,)1 776 1 1492 3600 t +10 B f +( d)1 0( rd)1 56( or)1 44( re ec co)3 138( dr)1 44(c cd)1 100 6 2302 3600 t +10 R f +(uses the real-time class to get the highest scheduling priority that)10 2682 1 2718 3600 t +( with)1 218( systems)1 358( On)1 196(is possible \(higher than all kernel processes\).)6 1890 4 1080 3720 t +10 B f +( g)1 0( ng)1 50( li in)2 84( du ul)2 84( ed)1 56( he)1 44( ch)1 56( sc)1 44( s)1 79( e)1 0( me)1 44( im)1 83( -t ti)2 61( l-)1 33( al)1 28( re ea)2 94( r)1 84( X)1 0( IX)1 72( SI)1 39( OS)1 56(P PO)1 139 22 3782 3720 t +10 R f +(cdrecord)5052 3720 w +( gain a priority that is higher than all kernel)9 1977(uses real-time scheduling too, but may not be able to)9 2343 2 1080 3840 t +(processes.)1080 3960 w +( priority and lock itself)4 960(In order to be able to use the SCSI transport subsystem of the OS, run at highest)16 3360 2 1080 4128 t +(into core)1 367 1 1080 4248 t +10 B f +( d)1 0( rd)1 56( or)1 44( re ec co)3 138( dr)1 44(c cd)1 100 6 1487 4248 t +10 R f +( be run as root, needs to be installed suid root or must be called via)15 2879(either needs to)2 612 2 1909 4248 t +10 B f +( s)1 0( AC Cs)2 111( BA)1 72(R RB)1 139 4 1080 4368 t +10 R f +(pfexec mechanism.)1 778 1 1435 4368 t +9 B f +( g)1 0( ng)1 45( in)1 50( pp pi)2 75( ap)1 50( ma)1 45( m)1 105( k)1 0( ck)1 50( ac)1 40( ra)1 45( tr)1 40( t)1 60( o)1 0( to)1 45( t)1 60( e)1 0( il le)2 65(F Fi)1 80 19 900 4656 t +10 R f +(In)1080 4776 w +10 I f +(Track At Once)2 610 1 1202 4776 t +10 R f +(mode, each)1 468 1 1851 4776 t +10 I f +(track)2359 4776 w +10 R f +(corresponds to a single \256le that contains the prepared data for that)11 2796 1 2604 4776 t +( the argument is `)4 763(track. If)1 364 2 1080 4896 t +10 S1 f +(\261 \261)1 65 1 2207 4896 t +10 R f +( Only one track may be taken from)7 1499(', standard input is used for that track.)7 1629 2 2272 4896 t +10 I f +(stdin)1080 5016 w +10 R f +( In)1 161( relation may not be implemented.)5 1471( the other write modes, the direct \256le to track)9 1968(. In)1 185 4 1283 5016 t +10 S1 f +(\261 \261)1 65 1 5113 5016 t +10 B f +( e)1 0( ne)1 44( on)1 56( lo)1 50(c cl)1 72 5 5178 5016 t +10 R f +( allow DVD writing on platforms that do not)8 1860( To)1 179(mode, a single \256le contains all data for the whole disk.)10 2281 3 1080 5136 t +(implement large \256le support,)3 1191 1 1080 5256 t +10 B f +( d)1 0( rd)1 56( or)1 44( re ec co)3 138( dr)1 44(c cd)1 100 6 2308 5256 t +10 R f +( to a single track when writing to)7 1409(concatenates all \256le arguments)3 1264 2 2727 5256 t +(DVD media.)1 518 1 1080 5376 t +9 B f +( S)1 0( NS)1 50( ON)1 65( IO)1 70( TI)1 35( PT)1 60( OP)1 55( O)1 100( L)1 0( RA AL)2 125( ER)1 65( NE)1 60( EN)1 65(G GE)1 130 14 720 5664 t +10 R f +(General options must be before any track \256le name or track option.)11 2766 1 1080 5784 t +9 B f +( s)1 0( ns)1 35( on)1 50( io)1 45( ti)1 25( pt)1 30( op)1 50( o)1 75( e)1 0( ve)1 40( iv)1 45( ti)1 25( at)1 30( ma)1 45( rm)1 75( or)1 40( fo)1 45( nf)1 30(I In)1 85 19 900 5952 t +10 S1 f +(\261 \261)1 65 1 1080 6072 t +10 B f +( p)1 0( lp)1 56( el)1 28(h he)1 100 4 1145 6072 t +10 R f +(display version information for)3 1270 1 1440 6072 t +10 B f +( d)1 0( rd)1 56( or)1 44( re ec co)3 138( dr)1 44(c cd)1 100 6 2743 6072 t +10 R f +(on standard output.)2 785 1 3158 6072 t +10 S1 f +(\261 \261)1 65 1 1080 6240 t +10 B f +( n)1 0( on)1 56( io)1 50( si)1 28( er rs)2 83(v ve)1 94 6 1145 6240 t +10 R f +(Print version information and exit.)4 1412 1 1440 6360 t +10 S1 f +(\261 \261)1 65 1 1080 6528 t +10 B f +(v v)1 50 1 1145 6528 t +10 R f +( used e.g. to display the progress of the)8 1639( is)1 101( This)1 245(Increment the level of general verbosity by one.)7 1975 4 1440 6528 t +(writing process.)1 646 1 1440 6648 t +9 B f +( s)1 0( ns)1 35( on)1 50( io)1 45( ti)1 25( pt)1 30( op)1 50( o)1 75( e)1 0( de)1 40( od)1 50( mo)1 45( m)1 105( e)1 0( te)1 40( it)1 30( ri)1 25( wr)1 40( w)1 95( a)1 0( ia)1 45( di)1 25( ed)1 50(M Me)1 125 24 900 6816 t +10 S1 f +(\261 \261)1 65 1 1080 6936 t +10 B f +( y)1 0( mm my)2 133(d du um)2 195 3 1145 6936 t +10 R f +(The)1440 7056 w +10 S1 f +(\261 \261)1 65 1 1638 7056 t +10 B f +( y)1 0( mm my)2 133(d du um)2 195 3 1703 7056 t +10 R f +( CD/DVD/BluRay-recorder will)2 1325( The)1 232( current write strategy.)3 960(option modi\256es the)2 809 4 2074 7056 t +( laser is turned off during this procedure.)7 1728(go through all steps of the recording process, but the)9 2232 2 1440 7176 t +( recommended to run several tests before actually writing to a Compact Disk or Digital)14 3786(It is)1 174 2 1440 7296 t +(J)720 7776 w +(. .)1 47 1 759 7721 t +( 1)1 1829( change: Version 3.0)3 850( Last)1 1434(org Schilling)1 528 4 759 7776 t +cleartomark +showpage +restore +%%EndPage: 1 1 %%Page: 2 2 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF 104.275(CDRECORD\(1\) Schily\264s)72 48 R -(USER COMMANDS)2.5 E(CDRECORD\(1\))106.775 E/F1 10/Times-Bold@0 SF -108 84 Q F0 .993(Increment the le)25.3 F -.15(ve)-.25 G 3.493(lo).15 G -3.493(fg)-3.493 G .993(eneral v)-3.493 F .993(erbosity by one.)-.15 F -.994(This is used e.g. to display the progress of the)5.993 F -(writing process.)144 96 Q F1108 112.8 Q F0 .991(Increment the v) -23.08 F .991(erbose le)-.15 F -.15(ve)-.25 G 3.491(li).15 G 3.491(nr) --3.491 G .991(espect of SCSI command transport by one.)-3.491 F .99 -(This helps to deb)5.99 F(ug)-.2 E .466 -(problems during the writing process, that occur in the CD-Recorder)144 -124.8 R 5.466(.I)-.55 G 2.966(fy)-5.466 G .467(ou get incomprehensible) --2.966 F .899 -(error messages you should use this \215ag to get more detailed output.) -144 136.8 R F1(\255VV)5.899 E F0 .898(will sho)3.398 F 3.398(wd)-.25 G -.898(ata b)-3.398 F(uf)-.2 E(fer)-.25 E .25(content in addition.)144 -148.8 R(Using)5.25 E F12.75 E F0(or)2.75 E F1(\255VV)2.75 E F0 -(slo)2.75 E .25(ws do)-.25 F .251 -(wn the process and may be the reason for a b)-.25 F(uf)-.2 E(fer)-.25 E -(underrun.)144 160.8 Q F1(deb)108 177.6 Q(ug=)-.2 E/F2 10/Times-Italic@0 -SF(#,).48 E F1(-d)2.5 E F0 .386(Set the misc deb)144 189.6 R .386(ug v) --.2 F .386(alue to # \(with deb)-.25 F .385 -(ug=#\) or increment the misc deb)-.2 F .385(ug le)-.2 F -.15(ve)-.25 G -2.885(lb).15 G 2.885(yo)-2.885 G .385(ne \(with -d\).)-2.885 F .13 -(If you specify)144 201.6 R F2(-dd,)2.63 E F0 .13(this equals to)2.63 F -F1(deb)2.63 E(ug=)-.2 E F2(2.).38 E F0 .13 -(This may help to \214nd problems while opening a dri)5.13 F -.15(ve) --.25 G(r).15 E .111 -(for libscg as well as with sector sizes and sector types.)144 213.6 R -(Using)5.11 E F1(\255deb)2.61 E(ug)-.2 E F0(slo)2.61 E .11(ws do)-.25 F -.11(wn the process and)-.25 F(may be the reason for a b)144 225.6 Q(uf) --.2 E(fer underrun.)-.25 E F1(kdeb)108 242.4 Q(ug=)-.2 E F0(#,)A F1(kd=) -2.5 E F0(#)A -.7(Te)144 254.4 S(ll the).7 E F1(scg)2.5 E F0(-dri)A -.15 -(ve)-.25 G 2.5(rt).15 G 2.5(om)-2.5 G(odify the k)-2.5 E(ernel deb)-.1 E -(ug v)-.2 E(alue while SCSI commands are running.)-.25 E F1(\255silent) -108 271.2 Q F0(,)A F12.5 E F0 -(Do not print out a status report for f)144 283.2 Q -(ailed SCSI commands.)-.1 E F1108 300 Q(or)-.25 E(ce)-.18 E F0 --.15(Fo)9.08 G .573 -(rce to continue on some errors. Be careful when using this option.).15 -F F1(Cdr)5.573 E(ecord)-.18 E F0 .573(implements se)3.073 F(v-)-.25 E -2.67(eral checks that pre)144 312 R -.15(ve)-.25 G 2.669 -(nt you from doing unw).15 F 2.669(anted things lik)-.1 F 5.169(ed)-.1 G -2.669(amaging CD-R)-5.169 F 5.169(Wm)-.55 G 2.669(edia by)-5.169 F -(improper dri)144 324 Q -.15(ve)-.25 G(s. Man).15 E 2.5(yo)-.15 G 2.5 -(ft)-2.5 G(he sanity checks are disabled when the)-2.5 E F12.5 E -(or)-.25 E(ce)-.18 E F0(option is used.)2.5 E -(This option also implements some tricks that will allo)144 348 Q 2.5 -(wy)-.25 G(ou to blank bad CD-R)-2.5 E 2.5(Wd)-.55 G(isks.)-2.5 E F1 -(\255immed)108 364.8 Q F0 -.7(Te)144 376.8 S 13.729 -(ll cdrecord to set the).7 F F1 13.729(SCSI IMMED)16.229 F F0 13.729 -(\215ag in certain commands)16.229 F 3.874 -(\(load/eject/blank/close_track/close_session\). This)144 388.8 R 1.373 -(can be useful on brok)3.874 F 1.373(en systems with A)-.1 F -.93(TA) --1.11 G(PI).93 E 2.25(harddisk and CD/D)144 400.8 R 2.25 -(VD writer on the same b)-.4 F 2.25(us or with SCSI systems that don') --.2 F 4.75(tu)-.18 G 2.25(se discon-)-4.75 F 3.031 -(nect/reconnect. These)144 412.8 R .531 -(systems will freeze while blanking or \214xating a CD/D)3.031 F .53 -(VD or while a D)-.4 F(VD)-.4 E .383(writer is \214lling up a session t\ -o the minimum amount \(approx. 800 MB\).)144 424.8 R .383(Setting the) -5.383 F F1(\255immed)2.884 E F0(\215ag)2.884 E 1.917(will request the c\ -ommand to return immediately while the operation proceeds in background\ -,)144 436.8 R .164(making the b)144 448.8 R .164 -(us usable for the other de)-.2 F .164(vices and a)-.25 F -.2(vo)-.2 G -.165(iding the system freeze.).2 F .165(This is an e)5.165 F(xperimen-) --.15 E 1.366(tal feature which may w)144 460.8 R 1.366 -(ork or not, depending on the model of the CD/D)-.1 F 1.365(VD writer) --.4 F 6.365(.A)-.55 G(correct)-2.5 E .126(solution w)144 472.8 R .126 -(ould be to set up a correct cabling b)-.1 F .126 -(ut there seem to be notebooks around that ha)-.2 F .427 -.15(ve b)-.2 H -(een).15 E .823(set up the wrong w)144 484.8 R .823(ay by the manuf)-.1 -F(acturer)-.1 E 5.823(.A)-.55 G 3.323(si)-5.823 G 3.323(ti)-3.323 G -3.323(si)-3.323 G .823(mpossible to \214x this problem in notebooks,) --3.323 F(the)144 496.8 Q F1(\255immed)2.5 E F0(option has been added.) -2.5 E 2.533(As)144 520.8 S .033(econd e)-2.533 F .034 -(xperimental feature of the)-.15 F F1(\255immed)2.534 E F0 .034 -(\215ag is to tell cdrecord to try to w)2.534 F .034 -(ait short times wile)-.1 F 1.444(writing to the media. This is e)144 -532.8 R 1.443(xpected to free the IDE b)-.15 F 1.443(us if the CD/D)-.2 -F 1.443(VD writer and the data)-.4 F 1.236 -(source are connected to the same IDE cable. In this case, the CD/D)144 -544.8 R 1.236(VD writer w)-.4 F 1.236(ould otherwise)-.1 F 1.658 -(usually block the IDE b)144 556.8 R 1.658 -(us for nearly all the time making it impossible to fetch data from the) --.2 F(source dri)144 568.8 Q -.15(ve)-.25 G 2.5(.S).15 G(ee also)-2.5 E -F1(minb)2.5 E(uf=)-.2 E F0(and)2.5 E F12.5 E F0(option.)2.5 E -1.282(Use both features at your o)144 592.8 R 1.282(wn risk.)-.25 F -1.282(It it turns out that it w)6.282 F 1.282(ould mak)-.1 F 3.782(es) --.1 G 1.282(ense to ha)-3.782 F 1.583 -.15(ve a s)-.2 H(eparate).15 E -(option for the the w)144 604.8 Q -(ait feature, write to the author and con)-.1 E(vince him.)-.4 E F1 -(minb)108 621.6 Q(uf=)-.2 E F2(value).29 E F0 .878(The #)144 633.6 R F1 -(minb)3.378 E(uf=)-.2 E F0 .878(options allo)3.378 F .877 -(ws to de\214ne the minimum dri)-.25 F 1.177 -.15(ve b)-.25 H(uf)-.05 E -.877(fer \214ll ratio for the e)-.25 F(xperimental)-.15 E -1.21 -1.11 -(AT A)144 645.6 T .11(PI w)1.11 F .11 -(ait mode that is intended to free the IDE b)-.1 F .111(us to allo)-.2 F -2.611(wh)-.25 G .111(ard disk and CD/D)-2.611 F .111(VD writer to be)-.4 -F .745(on the same IDE cable.)144 657.6 R .745(As the w)5.745 F .745 -(ait mode currently only w)-.1 F .744(orks when the v)-.1 F .744 -(erbose option)-.15 F F13.244 E F0(has)3.244 E .454 -(been speci\214ed,)144 669.6 R F1(cdr)2.954 E(ecord)-.18 E F0 .454 -(implies the v)2.954 F .454(erbose option in case the)-.15 F F1 -(\255immed)2.954 E F0(or)2.955 E F1(minb)2.955 E(uf=)-.2 E F0 .455 -(option ha)2.955 F -.15(ve)-.2 G .622(been speci\214ed.)144 681.6 R --1.11(Va)5.622 G .622(lid v)1.11 F .622(alues for)-.25 F F1(minb)3.122 E -(uf=)-.2 E F0 .622(are between 25 and 95 for 25%.)3.122 F 1.666(..)1.666 -G .622(95% minimum dri)-1.666 F -.15(ve)-.25 G -.2(bu)144 693.6 S -.25 -(ff).2 G(er \214ll ratio.).25 E(J)72 768 Q -.25(..)-5.5 K(or)-4.5 5.5 M -2.5(gS)-.18 G 153.065(chilling V)-2.5 F(ersion 2.0)-1.11 E(2)206.225 E -EP +save +mark +2 pagesetup +10 R f +(Schily)720 480 w +10 S1 f +(\302)976 480 w +10 R f +( \( 1 \))3 164( CDRECORD)1 3277(s USER COMMANDS)2 950 3 1009 480 t +(Versatile Disk, if the timing and load response of the current system is not yet known.)15 3558 1 1440 960 t +(The)1440 1200 w +10 S1 f +(\261 \261)1 65 1 1635 1200 t +10 B f +( y)1 0( mm my)2 133(d du um)2 195 3 1700 1200 t +10 R f +( media and Blu-)3 689( DVD+)1 346( not work with all media and write modes.)8 1818(option does)1 479 4 2068 1200 t +(Ray media does not support)4 1212 1 1440 1320 t +10 B f +( y)1 0( mm my)2 133(d du um)2 195 3 2701 1320 t +10 R f +( support)1 348(writes and most CD-recorders do not)5 1598 2 3078 1320 t +10 B f +( y)1 0( mm my)2 133(d du um)2 195 3 5072 1320 t +10 R f +(writes in raw mode.)3 817 1 1440 1440 t +10 S1 f +(\261 \261)1 65 1 1080 1608 t +10 B f +( i)1 0( ti)1 28( lt)1 33( ul)1 28(m mu)1 139 5 1145 1608 t +10 R f +( multi-border DVDs to be made. This \257ag needs to be present on)12 2792(Allow multi-session CDs or)3 1168 2 1440 1608 t +( except you want to create a session on a)9 1783(all sessions of a multi-session or multi-border disk,)7 2177 2 1440 1728 t +(CD that will be the last session on the CD-media.)9 2049 1 1440 1848 t +( be done in a way that allows the CD/DVD/BluRay-recorder to)10 2648(For CD-media, the \256xation will)4 1312 2 1440 2088 t +( with a link to the next pro-)7 1168(append additional sessions later. This is done by generating a TOC)10 2792 2 1440 2208 t +( CDs \(except for)3 719(gram area. The so generated media is not 100% compatible to manufactured)11 3241 2 1440 2328 t +( this option is present, the default)6 1462( If)1 147(CDplus\). Use only for recording of multi-session CDs.)7 2351 3 1440 2448 t +(track type is)2 516 1 1440 2568 t +10 B f +( 1)1 0( 1)1 90( m)1 0( rm)1 83( or)1 44( fo)1 50( f)1 73( 2)1 0( 2)1 90( e)1 0( de)1 44( od)1 56( mo)1 50( m)1 122( XA A)2 72( X)1 111( M)1 0( OM)1 94( RO)1 78( -R)1 72(C CD D-)2 177 21 1995 2568 t +10 R f +(and the sector size is 2048 bytes. The XA sector)9 2059 1 3341 2568 t +(subheaders will be created by the drive. The)7 1909 1 1440 2688 t +10 I f +(Sony)3395 2688 w +10 R f +(drives have no hardware support for)5 1543 1 3635 2688 t +10 B f +( -)1 0(C CD D-)2 177 2 5223 2688 t +( 1)1 0( 1)1 95( m)1 0( rm)1 83( or)1 44( fo)1 50( f)1 78( 2)1 0( 2)1 95( e)1 0( de)1 44( od)1 56( mo)1 50( m)1 128( XA A)2 72( X)1 117( M)1 0( OM)1 94(R RO)1 150 19 1440 2808 t +10 R f +( have to specify the)4 856(. You)1 275 2 2596 2808 t +10 S1 f +(\261 \261)1 65 1 3772 2808 t +10 B f +( a)1 0( ta)1 50( at)1 33(d da)1 106 4 3837 2808 t +10 R f +(option in order to create multi-)5 1329 1 4071 2808 t +( you like to record a multi-session disk in SAO mode, you)11 2558( If)1 145(session disks on these drives.)4 1257 3 1440 2928 t +(need to force)2 564 1 1440 3048 t +10 B f +( M)1 0( OM)1 94( RO)1 78( -R)1 72(C CD D-)2 177 5 2051 3048 t +10 R f +(sectors by including the)3 1018 1 2519 3048 t +10 S1 f +(\261 \261)1 65 1 3584 3048 t +10 B f +( a)1 0( ta)1 50( at)1 33(d da)1 106 4 3649 3048 t +10 R f +( all drives allow multi-)4 1003(option. Not)1 512 2 3885 3048 t +(session CDs in SAO mode.)4 1124 1 1440 3168 t +( media,)1 308(For DVD)1 393 2 1440 3408 t +10 S1 f +(\261 \261)1 65 1 2180 3408 t +10 B f +( i)1 0( ti)1 28( lt)1 33( ul)1 28(m mu)1 139 5 2245 3408 t +10 R f +(switches the write mode to)4 1127 1 2512 3408 t +10 B f +( g)1 0( ng)1 50( in)1 56( di)1 28( rd)1 56( or)1 44( re ec co)3 138( r)1 83( t)1 0( et)1 33( ke)1 44( ck)1 56( ac)1 44( pa)1 50( p)1 95( l)1 0( al)1 28( ta)1 50( nt)1 33( en)1 56( me)1 44( cr re em)3 171( nc)1 44(i in)1 84 24 3678 3408 t +10 R f +( is)1 106(. There)1 329 2 4965 3408 t +( to append further sessions and there is currently only)9 2309(currently no way to prevent the ability)6 1651 2 1440 3528 t +( previously been written in)4 1115( reuse a DVD-RW that has)5 1122( To)1 179(support for DVD-R/DVD-RW media.)3 1544 4 1440 3648 t +10 B f +( g)1 0( ng)1 50( in)1 56( di)1 28( rd)1 56( or)1 44( re ec co)3 138( r)1 90( t)1 0( et)1 33( ke)1 44( ck)1 56( ac)1 44( pa)1 50( p)1 102( l)1 0( al)1 28( ta)1 50( nt)1 33( en)1 56( me)1 44( cr re em)3 171( nc)1 44(i in)1 84 24 1440 3768 t +10 R f +( you need to blank the entire)6 1257(mode for different write modes,)4 1356 2 2787 3768 t +(media before.)1 556 1 1440 3888 t +10 S1 f +(\261 \261)1 65 1 1080 4056 t +10 B f +( ao o)2 50(d da)1 106 2 1145 4056 t +10 S1 f +(\261 \261)1 65 1 1080 4224 t +10 B f +( ao o)2 50(s sa)1 89 2 1145 4224 t +10 R f +(Set)1440 4224 w +10 B f +( \))1 0( ce e\))2 77( nc)1 44( On)1 56( O)1 112( t)1 0( At)1 33( A)1 106( n)1 0( on)1 56( io)1 50( ss si)2 67( es)1 39( Se)1 44( \(S)1 56( \()1 67( O)1 0( AO)1 78(S SA)1 128 19 1602 4224 t +10 R f +(mode which is usually called)4 1200 1 2650 4224 t +10 B f +( ce e)2 44( nc)1 44( On)1 56( O)1 113( t)1 0( At)1 33( A)1 107( k)1 0( sk)1 56( is)1 39(D Di)1 100 11 3885 4224 t +10 R f +( currently)1 395(mode. This)1 493 2 4512 4224 t +(only works with MMC drives that support)6 1743 1 1440 4344 t +10 B f +( ce e)2 44( nc)1 44( On)1 56( O)1 112( t)1 0( At)1 33( A)1 106( n)1 0( on)1 56( io)1 50( ss si)2 67( es)1 39(S Se)1 100 13 3217 4344 t +10 R f +( that cdrecord needs to)4 935(mode. Note)1 507 2 3958 4344 t +( \(see the)2 358(know the size of each track in advance for this mode)10 2220 2 1440 4464 t +10 B f +( s)1 0( fs)1 39( of)1 33( so)1 50( is)1 39( ki)1 28(m mk)1 139 7 4056 4464 t +10 S1 f +(\261 \261)1 65 1 4422 4464 t +10 B f +( t)1 0( nt)1 33( in)1 56( ri)1 28(p pr)1 100 5 4487 4464 t +10 S1 f +(\261 \261)1 65 1 4704 4464 t +10 B f +( ze e)2 44( iz)1 44(s si)1 67 3 4769 4464 t +10 R f +(option and)1 438 1 4962 4464 t +(the)1440 4584 w +10 I f +(EXAMPLES)1595 4584 w +10 R f +(section for more information\).)3 1233 1 2122 4584 t +( in broken disks when writing in)6 1432(There are several CD writers with bad \256rmware that result)9 2528 2 1440 4824 t +( you \256nd any problems with the layout of a disk or with subchannel)13 2948( If)1 143( mode.)1 291(TAO or SAO)2 578 4 1440 4944 t +( times on the display when playing the CD\) and your drive supports to write)14 3168(content \(e.g. wrong)2 792 2 1440 5064 t +(in)1440 5184 w +10 S1 f +(\261 \261)1 65 1 1551 5184 t +10 B f +( r)1 0( 96 6r)2 94( w9)1 50( aw)1 72(r ra)1 94 5 1616 5184 t +10 R f +(or)1959 5184 w +10 S1 f +(\261 \261)1 65 1 2075 5184 t +10 B f +( 16 6)2 50( w1)1 50( aw)1 72(r ra)1 94 4 2140 5184 t +10 R f +(mode, you should give it a try.)6 1270 1 2439 5184 t +10 S1 f +(\261 \261)1 65 1 1080 5352 t +10 B f +( ao o)2 50(t ta)1 83 2 1145 5352 t +10 R f +(Set)1440 5352 w +10 B f +( .)1 0( e.)1 25( de)1 44( od)1 56( mo)1 50( m)1 117( g)1 0( ng)1 50( in)1 56( ti)1 28( it)1 33( ri)1 28( wr)1 44( w)1 106( \))1 0( ce e\))2 77( nc)1 44( On)1 56( O)1 112( t)1 0( At)1 33( A)1 106( k)1 0( ck)1 56( ac)1 44( ra)1 50( Tr)1 44( \(T)1 67( \()1 67( O)1 0( AO)1 78(T TA)1 139 32 1602 5352 t +10 R f +( the default write mode in previous)6 1458(This is)1 279 2 3246 5352 t +10 B f +( d)1 0( rd)1 56( or)1 44( re ec co)3 138( dr)1 44(c cd)1 100 6 5018 5352 t +10 R f +( most drives, this write mode is required for multi-session recording.)10 2822(versions. With)1 624 2 1440 5472 t +( in broken disks when writing in)6 1432(There are several CD writers with bad \256rmware that result)9 2528 2 1440 5712 t +( you \256nd any problems with the layout of a disk or with subchannel)13 2948( If)1 143( mode.)1 291(TAO or SAO)2 578 4 1440 5832 t +( times on the display when playing the CD\) and your drive supports to write)14 3168(content \(e.g. wrong)2 792 2 1440 5952 t +(in)1440 6072 w +10 S1 f +(\261 \261)1 65 1 1551 6072 t +10 B f +( r)1 0( 96 6r)2 94( w9)1 50( aw)1 72(r ra)1 94 5 1616 6072 t +10 R f +(or)1959 6072 w +10 S1 f +(\261 \261)1 65 1 2075 6072 t +10 B f +( 16 6)2 50( w1)1 50( aw)1 72(r ra)1 94 4 2140 6072 t +10 R f +(mode, you should give it a try.)6 1270 1 2439 6072 t +10 S1 f +(\261 \261)1 65 1 1080 6240 t +10 B f +( w)1 0( aw)1 72(r ra)1 94 3 1145 6240 t +10 R f +(Set)1440 6240 w +10 B f +( .)1 0( e.)1 25( de)1 44( od)1 56( mo)1 50( m)1 122( g)1 0( ng)1 50( in)1 56( ti)1 28( it)1 33( ri)1 28( wr)1 44( w)1 111( W)1 0(R RA AW)2 244 16 1607 6240 t +10 R f +( option defaults to)3 770(Using this)1 423 2 2537 6240 t +10 S1 f +(\261 \261)1 65 1 3770 6240 t +10 B f +( r)1 0( 96 6r)2 94( w9)1 50( aw)1 72(r ra)1 94 5 3835 6240 t +10 R f +( that cdrecord needs to)4 963(. Note)1 292 2 4145 6240 t +( advance for this mode \(see the)6 1313(know the size of each track in)6 1269 2 1440 6360 t +10 B f +( s)1 0( fs)1 39( of)1 33( so)1 50( is)1 39( ki)1 28(m mk)1 139 7 4059 6360 t +10 S1 f +(\261 \261)1 65 1 4424 6360 t +10 B f +( t)1 0( nt)1 33( in)1 56( ri)1 28(p pr)1 100 5 4489 6360 t +10 S1 f +(\261 \261)1 65 1 4706 6360 t +10 B f +( ze e)2 44( iz)1 44(s si)1 67 3 4771 6360 t +10 R f +(option and)1 437 1 4963 6360 t +(the)1440 6480 w +10 I f +(EXAMPLES)1595 6480 w +10 R f +(section for more information\).)3 1233 1 2122 6480 t +10 S1 f +(\261 \261)1 65 1 1080 6648 t +10 B f +( r)1 0( 96 6r)2 94( w9)1 50( aw)1 72(r ra)1 94 5 1145 6648 t +10 R f +(Set)1440 6768 w +10 B f +( e)1 0( de)1 44( od)1 56( mo)1 50( m)1 128( g)1 0( ng)1 50( in)1 56( ti)1 28( it)1 33( ri)1 28( wr)1 44( w)1 117( W)1 0(R RA AW)2 244 15 1613 6768 t +10 R f +( data)1 212(with 2352 byte sectors plus 96 bytes of raw P-W sub-channel)10 2652 2 2536 6768 t +( raw writing mode as it gives best)7 1416( is the preferred)3 661( This)1 247(resulting in a sector size of 2448 bytes.)7 1636 4 1440 6888 t +( disks in raw mode needs signi\256cantly more)7 1855( data)1 204( Writing)1 382(control over the CD-writing process.)4 1519 4 1440 7008 t +( modes. If your CPU is too slow, this may result in buffer underruns.)13 2865(CPU time than other write)4 1095 2 1440 7128 t +( needs to know the size of each track in advance for this mode \(see the)15 3172(Note that cdrecord)2 788 2 1440 7248 t +(J)720 7728 w +(. .)1 47 1 759 7673 t +( 2)1 1829( change: Version 3.0)3 850( Last)1 1434(org Schilling)1 528 4 759 7728 t +cleartomark +showpage +restore +%%EndPage: 2 2 %%Page: 3 3 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF 104.275(CDRECORD\(1\) Schily\264s)72 48 R -(USER COMMANDS)2.5 E(CDRECORD\(1\))106.775 E/F1 10/Times-Bold@0 SF -(\255dummy)108 84 Q F0 .134 -(The CD-Recorder will go through all steps of the recording process, b) -144 96 R .134(ut the laser is turned of)-.2 F 2.635(fd)-.25 G(ur)-2.635 -E(-)-.2 E 1.042(ing this procedure.)144 108 R 1.042 -(It is recommended to run se)6.042 F -.15(ve)-.25 G 1.042 -(ral tests before actually writing to a Compact).15 F(Disk or Digital V) -144 120 Q(ersatile Disk, if the timing and load response of the system \ -is not kno)-1.11 E(wn.)-.25 E F1(\255dao)108 136.8 Q F0(Set)14.74 E F1 -(SA)3.542 E 3.542(O\()-.45 G 1.042(Session At Once\))-3.542 F F0 1.043 -(mode which is usually called)3.542 F F1 1.043(Disk At Once)3.543 F F0 -3.543(mode. This)3.543 F(currently)3.543 E(only w)144 148.8 Q -(orks with MMC dri)-.1 E -.15(ve)-.25 G 2.5(st).15 G(hat support)-2.5 E -F1(Session At Once)2.5 E F0(mode.)2.5 E F1(\255raw)108 165.6 Q F0(Set) -13.64 E F1(RA)2.5 E 2.5(Ww)-1.3 G(riting mode.)-2.5 E F0 -(Using this option def)5 E(aults to)-.1 E F1(\255raw96r)2.5 E F0(.)A F1 -(\255raw96r)108 182.4 Q F0 .469(Select Set)144 194.4 R F1(RA)2.969 E -2.969(Ww)-1.3 G .469(riting mode)-2.969 F F0 .469 -(with 2352 byte sectors plus 96 bytes of ra)2.969 F 2.968(wP)-.15 G .468 -(-W subchannel data)-2.968 F 1.107 -(resulting in a sector size of 2448 bytes.)144 206.4 R 1.108 -(This is the preferred ra)6.108 F 3.608(ww)-.15 G 1.108 -(riting mode as it gi)-3.608 F -.15(ve)-.25 G 3.608(sb).15 G(est)-3.608 -E .885(control o)144 218.4 R -.15(ve)-.15 G 3.385(rt).15 G .885 -(he CD writing process.)-3.385 F .885(If you \214nd an)5.885 F 3.385(yp) --.15 G .885(roblems with the layout of a disk or with)-3.385 F .889(sub\ - channel content \(e.g. wrong times on the display when playing the CD\ -\) and your dri)144 230.4 R 1.19 -.15(ve s)-.25 H(up-).15 E .34 -(ports to write in)144 242.4 R F1(\255raw96r)2.84 E F0(or)2.84 E F1 -(\255raw16)2.84 E F0 .34(mode, you should gi)2.84 F .64 -.15(ve i)-.25 H -2.84(tat).15 G(ry)-2.84 E 2.84(.T)-.65 G .34(here are se)-2.84 F -.15 -(ve)-.25 G .34(ral CD writers).15 F .898(with bad \214rmw)144 254.4 R -.898(are that result in brok)-.1 F .899(en disks when writing in T)-.1 F -1.999 -.55(AO o)-.93 H 3.399(rS).55 G 1.999 -.55(AO m)-3.399 H 3.399 -(ode. Writing).55 F(data)3.399 E .429(disks in ra)144 266.4 R 2.929(wm) --.15 G .428(ode needs signi\214cantly more CPU time than other write mo\ -des. If your CPU is too)-2.929 F(slo)144 278.4 Q 1.3 -.65(w, t)-.25 H -(his may result in b).65 E(uf)-.2 E(fer underruns.)-.25 E F1(\255raw96p) -108 295.2 Q F0 .885(Select Set)144 307.2 R F1(RA)3.385 E 3.385(Ww)-1.3 G -.885(riting mode)-3.385 F F0 .885 -(with 2352 byte sectors plus 96 bytes of pack)3.385 F .886 -(ed P-W subchannel)-.1 F .313 -(data resulting in a sector size of 2448 bytes.)144 319.2 R .313 -(This is the less preferred ra)5.313 F 2.812(ww)-.15 G .312 -(riting mode as only a)-2.812 F(fe)144 331.2 Q 3.455(wr)-.25 G .955 -(ecorders support it and some of these recorders ha)-3.455 F 1.255 -.15 -(ve b)-.2 H .955(ugs in the \214rmw)-.05 F .955(are implementation.)-.1 -F(Don')144 343.2 Q 3.852(tu)-.18 G 1.352 -(se this mode if your recorder supports)-3.852 F F1(\255raw96r)3.851 E -F0(or)3.851 E F1(\255raw16)3.851 E F0 6.351(.W)C 1.351 -(riting data disks in ra)-6.351 F(w)-.15 E 1.126(mode needs signi\214ca\ -ntly more CPU time than other write modes. If your CPU is too slo)144 -355.2 R 2.427 -.65(w, t)-.25 H(his).65 E(may result in b)144 367.2 Q(uf) --.2 E(fer underruns.)-.25 E F1(\255raw16)108 384 Q F0 .251(Select Set) -144 396 R F1(RA)2.751 E 2.751(Ww)-1.3 G .251(riting mode)-2.751 F F0 .25 -(with 2352 byte sectors plus 6 bytes of P-Q subchannel data result-) -2.751 F .962(ing in a sector size of 2368 bytes.)144 408 R .963 -(If a recorder does not support)5.963 F F1(\255raw96r)3.463 E F0 3.463 -(,t)C .963(his is the preferred)-3.463 F(ra)144 420 Q 2.727(ww)-.15 G -.227(riting mode.)-2.727 F .227(It does not allo)5.227 F 2.727(wt)-.25 G -2.727(ow)-2.727 G(rite)-2.727 E/F2 10/Times-Italic@0 SF(CD-T)2.727 E -.2 -(ex)-.92 G(t).2 E F0(or)2.727 E F2(CD+Gr)2.727 E(aphics)-.15 E F0 -.2 -(bu)2.727 G 2.726(ti).2 G 2.726(ti)-2.726 G 2.726(st)-2.726 G .226 -(he only ra)-2.726 F 2.726(ww)-.15 G(rit-)-2.726 E .641 -(ing mode in cheap CD writers.)144 432 R .641 -(As these cheap writers in most cases do not support)5.641 F F1(\255dao) -3.142 E F0(mode.)3.142 E(Don')144 444 Q 3.565(tu)-.18 G 1.065 -(se this mode if your recorder supports)-3.565 F F1(\255raw96r)3.565 E -F0 6.065(.W)C 1.064(riting data disks in ra)-6.065 F 3.564(wm)-.15 G -1.064(ode needs)-3.564 F .782(signi\214cantly more CPU time than other \ -write modes. If your CPU is too slo)144 456 R 2.082 -.65(w, t)-.25 H -.782(his may result in).65 F -.2(bu)144 468 S -.25(ff).2 G -(er underruns.).25 E F1(\255multi)108 484.8 Q F0(Allo)7.52 E 2.918(wm) --.25 G .418(ulti session CD')-2.918 F 2.918(st)-.55 G 2.918(ob)-2.918 G -2.918(em)-2.918 G .417 -(ade. This \215ag needs to be present on all sessions of a multi ses-) --2.918 F .36(sion disk, e)144 496.8 R .36(xcept you w)-.15 F .361 -(ant to create a session that will be the last session on the media.)-.1 -F .361(The \214xa-)5.361 F .245(tion will be done in a w)144 508.8 R -.245(ay that allo)-.1 F .245 -(ws the CD-Recorder to append additional sessions later)-.25 F 2.744(.T) --.55 G .244(his is)-2.744 F 1.111(done by generation a T)144 520.8 R -1.112(OC with a link to the ne)-.18 F 1.112 -(xt program area. The so generated media is not)-.15 F .134 -(100% compatible to manuf)144 532.8 R .134(actured CD')-.1 F 2.634(s\() --.55 G -.15(ex)-2.634 G .134(cept for CDplus\).).15 F .133 -(Use only for recording of multi ses-)5.134 F 1.065(sion CD')144 544.8 R -3.565(s. If)-.55 F 1.065(this option is present, the def)3.565 F 1.065 -(ault track type is)-.1 F F1(CD-R)3.565 E 1.066(OM XA mode 2)-.3 F F0 -6.066(.T)C(he)-6.066 E F2(Sony)3.566 E F0(dri)144 556.8 Q -.15(ve)-.25 G -2.582(sh).15 G -2.25 -.2(av e)-2.582 H .082(no hardw)2.782 F .082 -(are support for)-.1 F F1(CD-R)2.582 E .082(OM XA mode 2)-.3 F F0 5.082 -(.Y)C .082(ou ha)-6.182 F .382 -.15(ve t)-.2 H 2.582(os).15 G .082 -(pecify the)-2.582 F F1(\255data)2.581 E F0(option)2.581 E .656 -(in order to create multi session disks on these dri)144 568.8 R -.15 -(ve)-.25 G 3.157(s. As).15 F .657(long as cdrecord does not ha)3.157 F -.957 -.15(ve a c)-.2 H(oder).15 E .536(for con)144 580.8 R -.15(ve)-.4 G -.536(rting data sectors to audio sectors, you need to force).15 F F1 -(CD-R)3.036 E(OM)-.3 E F0 .536(sectors by including the)3.036 F F1 -(\255data)144 592.8 Q F0 .045(option if you lik)2.545 F 2.545(et)-.1 G -2.545(or)-2.545 G .045(ecord a multisession disk in SA)-2.545 F 2.545 -(Om)-.55 G 2.546(ode. Not)-2.545 F .046(all dri)2.546 F -.15(ve)-.25 G -2.546(sa).15 G(llo)-2.546 E 2.546(wm)-.25 G(ultises-)-2.546 E(sion CD') -144 604.8 Q 2.5(si)-.55 G 2.5(nS)-2.5 G 1.1 -.55(AO m)-2.5 H(ode.).55 E -F1(\255msinf)108 621.6 Q(o)-.25 E F0(Retrie)144 633.6 Q .3 -.15(ve m) --.25 H(ulti session info in a form suitable for).15 E F1(mkisofs-1.10) -2.5 E F0(or later)2.5 E(.)-.55 E .77(This option mak)144 657.6 R .769(e\ -s only sense with a CD that contains at least one closed session and is\ - append-)-.1 F .395(able \(not \214nally closed yet\).)144 669.6 R .396 -(Some dri)5.396 F -.15(ve)-.25 G 2.896(sc).15 G .396 -(reate error messages if you try to get the multi session)-2.896 F -(info for a disk that is not suitable for this operation.)144 681.6 Q F1 -(\255toc)108 698.4 Q F0(Retrie)17.53 E .526 -.15(ve a)-.25 H .226 -(nd print out the table of content or PMA of a CD.).15 F -.4(Wi)5.225 G -.225(th this option,).4 F F1(cdr)2.725 E(ecord)-.18 E F0 .225(will w) -2.725 F(ork)-.1 E(with CD-R dri)144 710.4 Q -.15(ve)-.25 G 2.5(sa).15 G -(nd with CD-R)-2.5 E(OM dri)-.4 E -.15(ve)-.25 G(s.).15 E(J)72 768 Q --.25(..)-5.5 K(or)-4.5 5.5 M 2.5(gS)-.18 G 153.065(chilling V)-2.5 F -(ersion 2.0)-1.11 E(3)206.225 E EP +save +mark +3 pagesetup +10 R f +(Schily)720 480 w +10 S1 f +(\302)976 480 w +10 R f +( \( 1 \))3 164( CDRECORD)1 3277(s USER COMMANDS)2 950 3 1009 480 t +10 B f +( s)1 0( fs)1 39( of)1 33( so)1 50( is)1 39( ki)1 28(m mk)1 139 7 1440 960 t +10 S1 f +(\261 \261)1 65 1 1801 960 t +10 B f +( t)1 0( nt)1 33( in)1 56( ri)1 28(p pr)1 100 5 1866 960 t +10 S1 f +(\261 \261)1 65 1 2083 960 t +10 B f +( ze e)2 44( iz)1 44(s si)1 67 3 2148 960 t +10 R f +(option and the)2 588 1 2336 960 t +10 I f +(EXAMPLES)2957 960 w +10 R f +(section for more information\).)3 1233 1 3484 960 t +10 S1 f +(\261 \261)1 65 1 1080 1128 t +10 B f +( p)1 0( 96 6p)2 106( w9)1 50( aw)1 72(r ra)1 94 5 1145 1128 t +10 R f +(Set)1440 1248 w +10 B f +( e)1 0( de)1 44( od)1 56( mo)1 50( m)1 119( g)1 0( ng)1 50( in)1 56( ti)1 28( it)1 33( ri)1 28( wr)1 44( w)1 108( W)1 0(R RA AW)2 244 15 1604 1248 t +10 R f +( P-W sub-channel data)3 942(with 2352 byte sectors plus 96 bytes of packed)8 1958 2 2500 1248 t +( writing mode as only a)5 1006( is the less preferred raw)5 1047( This)1 250(resulting in a sector size of 2448 bytes.)7 1657 4 1440 1368 t +( have bugs in the \256rmware implementation.)6 1800(few recorders support it and some of these recorders)8 2160 2 1440 1488 t +( this mode if your recorder supports)6 1503(Don't use)1 404 2 1440 1608 t +10 S1 f +(\261 \261)1 65 1 3384 1608 t +10 B f +( r)1 0( 96 6r)2 94( w9)1 50( aw)1 72(r ra)1 94 5 3449 1608 t +10 R f +(or)3796 1608 w +10 S1 f +(\261 \261)1 65 1 3916 1608 t +10 B f +( 16 6)2 50( w1)1 50( aw)1 72(r ra)1 94 4 3981 1608 t +10 R f +( data disks in raw)4 747(. Writing)1 406 2 4247 1608 t +( time than other write modes. If your CPU is too slow, this)12 2476(mode needs signi\256cantly more CPU)4 1484 2 1440 1728 t +( track in)2 369( that cdrecord needs to know the size of each)9 1990( Note)1 274(may result in buffer underruns.)4 1327 4 1440 1848 t +(advance for this mode \(see the)5 1331 1 1440 1968 t +10 B f +( s)1 0( fs)1 39( of)1 33( so)1 50( is)1 39( ki)1 28(m mk)1 139 7 2819 1968 t +10 S1 f +(\261 \261)1 65 1 3195 1968 t +10 B f +( t)1 0( nt)1 33( in)1 56( ri)1 28(p pr)1 100 5 3260 1968 t +10 S1 f +(\261 \261)1 65 1 3477 1968 t +10 B f +( ze e)2 44( iz)1 44(s si)1 67 3 3542 1968 t +10 R f +(option and the)2 618 1 3745 1968 t +10 I f +(EXAMPLES)4411 1968 w +10 R f +(section for)1 447 1 4953 1968 t +(more information\).)1 768 1 1440 2088 t +10 S1 f +(\261 \261)1 65 1 1080 2256 t +10 B f +( 16 6)2 50( w1)1 50( aw)1 72(r ra)1 94 4 1145 2256 t +10 R f +(Set)1440 2376 w +10 B f +( e)1 0( de)1 44( od)1 56( mo)1 50( m)1 116( g)1 0( ng)1 50( in)1 56( ti)1 28( it)1 33( ri)1 28( wr)1 44( w)1 105( W)1 0(R RA AW)2 244 15 1601 2376 t +10 R f +( data resulting)2 584(with 2352 byte sectors plus 16 bytes of P-Q sub-channel)9 2328 2 2488 2376 t +( a recorder does not support)5 1151( If)1 132(in a sector size of 2368 bytes.)6 1232 3 1440 2496 t +10 S1 f +(\261 \261)1 65 1 3988 2496 t +10 B f +( r)1 0( 96 6r)2 94( w9)1 50( aw)1 72(r ra)1 94 5 4053 2496 t +10 R f +(, this is the preferred raw)5 1037 1 4363 2496 t +( does not allow to write)5 996( It)1 130(writing mode.)1 572 3 1440 2616 t +10 I f +(CD-Text)3174 2616 w +10 R f +(or)3554 2616 w +10 I f +(CD+Graphics)3673 2616 w +10 R f +( raw writ-)2 417(but it is the only)4 695 2 4288 2616 t +( cheap writers in most cases do not support)8 1792(ing mode in cheap CD-writers, as these)6 1632 2 1440 2736 t +10 S1 f +(\261 \261)1 65 1 4898 2736 t +10 B f +( ao o)2 50(d da)1 106 2 4963 2736 t +10 R f +(mode.)5153 2736 w +( your recorder supports)3 958(Don't use this mode if)4 930 2 1440 2856 t +10 S1 f +(\261 \261)1 65 1 3363 2856 t +10 B f +( r)1 0( 96 6r)2 94( w9)1 50( aw)1 72(r ra)1 94 5 3428 2856 t +10 R f +( data disks in raw mode needs)6 1258(. Writing)1 404 2 3738 2856 t +( than other write modes. If your CPU is too slow, this may result)13 2767(signi\256cantly more CPU time)3 1193 2 1440 2976 t +( that cdrecord needs to know the size of each track in advance for)13 2858( Note)1 271(in buffer underruns.)2 831 3 1440 3096 t +(this mode \(see the)3 775 1 1440 3216 t +10 B f +( s)1 0( fs)1 39( of)1 33( so)1 50( is)1 39( ki)1 28(m mk)1 139 7 2257 3216 t +10 S1 f +(\261 \261)1 65 1 2627 3216 t +10 B f +( ze e)2 44( iz)1 44( si)1 28( t- -s)2 72( nt)1 33( in)1 56( ri)1 28(p pr)1 100 8 2692 3216 t +10 R f +(option and the)2 606 1 3139 3216 t +10 I f +(EXAMPLES)3787 3216 w +10 R f +( more informa-)2 636(section for)1 441 2 4323 3216 t +(tion\).)1440 3336 w +9 B f +( s)1 0( ns)1 35( on)1 50( io)1 45( ti)1 25( pt)1 30( op)1 50( o)1 75( l)1 0( al)1 25( na)1 45( on)1 50( io)1 45( ti)1 25( ct)1 30( un nc)2 90( fu)1 50( f)1 60( d)1 0( rd)1 50( or)1 40( re ec co)3 125( dr)1 40(C Cd)1 115 24 900 3504 t +10 S1 f +(\261 \261)1 65 1 1080 3624 t +10 B f +( t)1 0( rt)1 33( or)1 44( bo)1 50(a ab)1 106 5 1145 3624 t +10 R f +(Try to send an)3 628 1 1440 3624 t +10 B f +( t)1 0( rt)1 33( or)1 44( bo)1 50(a ab)1 106 5 2111 3624 t +10 R f +( you use)2 371( If)1 142(sequence to the drive.)3 924 3 2387 3624 t +10 B f +( d)1 0( rd)1 56( or)1 44( re ec co)3 138( dr)1 44(c cd)1 100 6 3868 3624 t +10 R f +(only, this should never be)4 1106 1 4294 3624 t +( Calling)1 382( other software may leave a drive in an unusable condition.)10 2649(needed; but)1 493 3 1440 3744 t +10 B f +( d)1 0( rd)1 56( or)1 44( re ec co)3 138( dr)1 44(c cd)1 100 6 5018 3744 t +10 S1 f +(\261 \261)1 65 1 1440 3864 t +10 B f +( t)1 0( et)1 33( se)1 44(r re es)2 127 4 1505 3864 t +10 R f +( not tell the)3 489(may be needed if a previous write has been interrupted and the software did)13 3166 2 1745 3864 t +(drive that it will not continue to write.)7 1578 1 1440 3984 t +10 S1 f +(\261 \261)1 65 1 1080 4152 t +10 B f +( p)1 0( ip)1 56( ti)1 28(a at)1 83 4 1145 4152 t +10 R f +( out the ATIP \(Absolute Time In Pre-groove\) info of a CD/DVD/BluRay)11 3191(Retrieve and print)2 769 2 1440 4152 t +( this option,)2 544( With)1 292(recordable or CD/DVD/BluRay re-writable media.)4 2162 3 1440 4272 t +10 B f +( d)1 0( rd)1 56( or)1 44( re ec co)3 138( dr)1 44(c cd)1 100 6 4497 4272 t +10 R f +( to)1 136(will try)1 326 2 4938 4272 t +( ATIP info, it may be that)6 1084(retrieve the ATIP info. If the actual drive does not support to read the)13 2876 2 1440 4392 t +( is displayed. Only a limited number)6 1536(only a reduced set of information records or even nothing)9 2424 2 1440 4512 t +(of MMC-compliant drives support to read the ATIP info.)8 2348 1 1440 4632 t +(If)1440 4872 w +10 B f +( d)1 0( rd)1 56( or)1 44( re ec co)3 138( dr)1 44(c cd)1 100 6 1548 4872 t +10 R f +( decode)1 325(is able to retrieve the lead-in start time for the \256rst session, it will try to)15 3103 2 1972 4872 t +( not have ATIP information)4 1162( media does)2 505( DVD)1 288(and print the manufacturer info from the media.)7 2005 4 1440 4992 t +(but there is equivalent prerecorded information that is read out and printed.)11 3088 1 1440 5112 t +10 B f +( =)1 0( nk k=)2 113( an)1 56( la)1 50(b bl)1 84 5 1080 5280 t +10 I f +(type)1383 5280 w +10 R f +(Blank a CD-RW and exit or blank a CD-RW before writing. The blanking type may be one of:)17 3919 1 1440 5400 t +( a list of possible blanking types.)6 1362(help Display)1 911 2 1440 5568 t +( the entire disk. This may take a long time.)9 1779(all Blank)1 839 2 1440 5736 t +( erasing the PMA, the TOC and the pre-)8 1680( blank the disk. This results in)6 1257(fast Minimally)1 1023 3 1440 5904 t +(gap.)2040 6024 w +( the last track.)3 584(track Blank)1 839 2 1440 6192 t +( a reserved track.)3 704(unreserve Unreserve)1 1009 2 1440 6360 t +( the tail of a track.)5 766(trtail Blank)1 839 2 1440 6528 t +( last session.)2 519(unclose Unclose)1 927 2 1440 6696 t +( the last session.)3 674(session Blank)1 839 2 1440 6864 t +(Not all drives support all blanking types. It may be necessary to use)12 3029 1 1440 7032 t +10 B f +( ll l)2 28( al)1 28( =a)1 50( nk k=)2 113( an)1 56( la)1 50(b bl)1 84 7 4522 7032 t +10 R f +(if a drive)2 416 1 4984 7032 t +( used together with the)4 946( If)1 134(reports a speci\256ed command as being invalid.)6 1888 3 1440 7152 t +10 S1 f +(\261 \261)1 65 1 4442 7152 t +10 B f +( rc ce e)3 88( or)1 44(f fo)1 83 3 4507 7152 t +10 R f +(\257ag, this option)2 644 1 4756 7152 t +( you may need)3 621(may be used to blank CD-RW disks that otherwise cannot be blanked. Note that)13 3339 2 1440 7272 t +(J)720 7752 w +(. .)1 47 1 759 7697 t +( 3)1 1829( change: Version 3.0)3 850( Last)1 1434(org Schilling)1 528 4 759 7752 t +cleartomark +showpage +restore +%%EndPage: 3 3 %%Page: 4 4 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF 104.275(CDRECORD\(1\) Schily\264s)72 48 R -(USER COMMANDS)2.5 E(CDRECORD\(1\))106.775 E/F1 10/Times-Bold@0 SF -(\255atip)108 84 Q F0(Retrie)13.63 E 1.57 -.15(ve a)-.25 H 1.27 -(nd print out the A).15 F 1.271(TIP \(absolute T)-1.11 F 1.271 -(ime in Pre)-.35 F(groo)-.15 E -.15(ve)-.15 G 3.771(\)i).15 G 1.271 -(nfo of a CD/D)-3.771 F 1.271(VD recordable or)-.4 F(CD/D)144 96 Q 1.012 -(VD re)-.4 F 1.012(writable media.)-.25 F -.4(Wi)6.012 G 1.012 -(th this option,).4 F F1(cdr)3.512 E(ecord)-.18 E F0 1.012 -(will try to retrie)3.512 F 1.312 -.15(ve t)-.25 H 1.012(he A).15 F -1.012(TIP info. If the)-1.11 F .574(actual dri)144 108 R .874 -.15(ve d) --.25 H .574(oes not support to read the A).15 F .574 -(TIP info, it may be that only a reduced set of informa-)-1.11 F .752 -(tion records or e)144 120 R -.15(ve)-.25 G 3.252(nn).15 G .751 -(othing is displayed. Only a limited number of MMC compliant dri)-3.252 -F -.15(ve)-.25 G 3.251(ss).15 G(up-)-3.251 E(port to read the A)144 132 -Q(TIP info.)-1.11 E(If)144 156 Q F1(cdr)3.229 E(ecord)-.18 E F0 .729 -(is able to retrie)3.229 F 1.029 -.15(ve t)-.25 H .73(he lead-in start \ -time for the \214rst session, it will try to decode and).15 F .132 -(print the manuf)144 168 R .132(acturer info from the media.)-.1 F -.4 -(DV)5.132 G 2.632(Dm).4 G .132(edia dos not ha)-2.632 F .432 -.15(ve a) --.2 H .132(tip information b).15 F .131(ut there is)-.2 F(equi)144 180 Q --.25(va)-.25 G -(lent prerecorded information that is read out and printed.).25 E F1 -108 196.8 Q F0 .62(The disk will only be \214xated \(i.e. a T) -19.74 F .621(OC for a CD-Reader will be written\).)-.18 F .621 -(This may be used, if)5.621 F .079 -(for some reason the disk has been written b)144 208.8 R .079 -(ut not \214xated. This option currently does not w)-.2 F .078(ork with) --.1 F(old TEA)144 220.8 Q 2.5(Cd)-.4 G(ri)-2.5 E -.15(ve)-.25 G 2.5(s\() -.15 G(CD-R50S and CD-R55S\).)-2.5 E F1108 237.6 Q F0 .713(D\ -o not \214xate the disk after writing the tracks. This may be used to c\ -reate an audio disk in steps.)9.18 F .525(An un-\214xated disk can usua\ -lly not be used on a non CD-writer type dri)144 249.6 R .824 -.15(ve b) --.25 H .524(ut there are audio CD)-.05 F -(players that will be able to play such a disk.)144 261.6 Q F1 -(\255waiti)108 278.4 Q F0 -.8(Wa)9.19 G .81(it for input to become a).8 -F -.25(va)-.2 G .811 -(ilable on standard input before trying to open the SCSI dri).25 F -.15 -(ve)-.25 G 1.911 -.55(r. T).15 H(his).55 E(allo)144 290.4 Q(ws)-.25 E F1 -(cdr)3.624 E(ecord)-.18 E F0 1.123(to read it')3.624 F 3.623(si)-.55 G -1.123(nput from a pipe e)-3.623 F -.15(ve)-.25 G 3.623(nw).15 G 1.123 -(hen writing additional sessions to a multi)-3.623 F .428(session disk.) -144 302.4 R .428(When writing another session to a multi session disk,) -5.428 F F1(mkisofs)2.928 E F0 .428(needs to read the old)2.928 F .858 -(session from the de)144 314.4 R .858(vice before writing output.)-.25 F -.858(This cannot be done if)5.858 F F1(cdr)3.358 E(ecord)-.18 E F0 .858 -(opens the SCSI)3.358 F(dri)144 326.4 Q -.15(ve)-.25 G 2.5(ra).15 G 2.5 -(tt)-2.5 G(he same time.)-2.5 E F1(\255load)108 343.2 Q F0 .741 -(Load the media and e)11.96 F .741(xit. This only w)-.15 F .741 -(orks with a tray loading mechanism b)-.1 F .742(ut seems to be useful) --.2 F(when using the K)144 355.2 Q(odak disk transporter)-.35 E(.)-.55 E -F1(\255eject)108 372 Q F0 .298(Eject disk after doing the w)10.32 F -2.798(ork. Some)-.1 F(De)2.798 E .297 -(vices \(e.g. Philips\) need to eject the medium before cre-)-.25 F .768 -(ating a ne)144 384 R 3.268(wd)-.25 G .769 -(isk. Doing a \255dummy test and immediately creating a real disk w) --3.268 F .769(ould not w)-.1 F .769(ork on)-.1 F(these de)144 396 Q -(vices.)-.25 E F1(speed=)108 412.8 Q F0(#)A 1.345(Set the speed f)144 -424.8 R 1.345(actor of the writing process to #.)-.1 F 3.845(#i)6.345 G -3.845(sa)-3.845 G 3.845(ni)-3.845 G(nte)-3.845 E(ger)-.15 E 3.845(,r)-.4 -G 1.345(epresenting a multiple of the)-3.845 F 1.547(audio speed.)144 -436.8 R 1.547(This is about 150 KB/s for CD-R)6.547 F 1.548 -(OM and about 172 KB/s for CD-Audio.)-.4 F 1.548(If no)6.548 F/F2 10 -/Times-Italic@0 SF(speed)144 448.8 Q F0 .459(option is present,)2.959 F -F1(cdr)2.959 E(ecord)-.18 E F0 .459(will try to get the speed v)2.959 F -.458(alue from the)-.25 F F1(CDR_SPEED)2.958 E F0(en)2.958 E(viron-)-.4 -E 2.5(ment. If)144 460.8 R(your dri)2.5 E .3 -.15(ve h)-.25 H -(as problems with).15 E F2(speed=2)2.5 E F0(or)2.5 E F2(speed=4)2.5 E F0 -2.5(,y).29 G(ou should try)-2.5 E F2(speed=0)2.5 E F0(.).47 E F1(blank=) -108 477.6 Q F2(type).13 E F0(Blank a CD-R)144 489.6 Q 2.5(Wa)-.55 G -(nd e)-2.5 E(xit or blank a CD-R)-.15 E 2.5(Wb)-.55 G -(efore writing. The blanking type may be one of:)-2.5 E 40.28 -(help Display)144 506.4 R 2.5(al)2.5 G(ist of possible blanking types.) --2.5 E 47.5(all Blank)144 523.2 R(the entire disk. This may tak)2.5 E -2.5(eal)-.1 G(ong time.)-2.5 E -.1(fa)144 540 S 43.16(st Minimally).1 F -(blank the disk. This results in erasing the PMA, the T)2.5 E .001 -(OC and the pre)-.18 F -.05(ga)-.15 G(p.).05 E 37.51(track Blank)144 -556.8 R 2.5(at)2.5 G(rack.)-2.5 E(unreserv)144 573.6 Q 21.28(eU)-.15 G -(nreserv)-21.28 E 2.5(ear)-.15 G(eserv)-2.5 E(ed track.)-.15 E 38.61 -(trtail Blank)144 590.4 R(the tail of a track.)2.5 E 26.95 -(unclose Unclose)144 607.2 R(last session.)2.5 E 28.61(session Blank)144 -624 R(the last session.)2.5 E .259(Not all dri)108 636 R -.15(ve)-.25 G -2.759(ss).15 G .259 -(upport all blanking types. It may be necessary to use)-2.759 F F1 -(blank=all)2.759 E F0 .259(if a dri)2.759 F .559 -.15(ve r)-.25 H .259 -(eports a speci\214ed).15 F .273(command as being in)108 648 R -.25(va) --.4 G 2.773(lid. If).25 F .273(used together with the)2.773 F F1 -2.773 E(or)-.25 E(ce)-.18 E F0 .274 -(\215ag, this option may be used to blank CD-R)2.773 F(W)-.55 E .46 -(disks that otherwise cannot be blank)108 660 R .459 -(ed. Note that you may need to specify)-.1 F F1(blank=)2.959 E F2(all) -.33 E F0 .459(because some dri)2.959 F -.15(ve)-.25 G(s).15 E .034 -(will not continue with certain types of bad CD-R)108 672 R 2.535(Wd) --.55 G .035(isks. Note also that)-2.535 F F1(cdecord)2.535 E F0 .035 -(does it')2.535 F 2.535(sb)-.55 G .035(est if the)-2.535 F F12.535 -E(or)-.25 E(ce)-.18 E F0 .897(\215ag is used b)108 684 R .897 -(ut it \214nally depends on the dri)-.2 F -.15(ve)-.25 G 1.997 -.55 -('s \214).15 H(rmw).55 E .897 -(are whether the blanking operation will succeed or)-.1 F(not.)108 696 Q -F1(fs=)108 712.8 Q F0 18.08(#S)C .677(et the \214fo \(ring b)-18.08 F -(uf)-.2 E .678(fer\) size to #.)-.25 F -1.1(Yo)5.678 G 3.178(um)1.1 G -.678(ay use the same method as in)-3.178 F F1(dd)3.178 E F0(\(1\),)A F1 -(sdd)3.178 E F0 .678(\(1\) or)B F1(star)3.178 E F0(\(1\).)A 1.689 -(The number representing the size is tak)144 724.8 R 1.689 -(en in bytes unless otherwise speci\214ed.)-.1 F 1.688(If a number is) -6.688 F(J)72 768 Q -.25(..)-5.5 K(or)-4.5 5.5 M 2.5(gS)-.18 G 153.065 -(chilling V)-2.5 F(ersion 2.0)-1.11 E(4)206.225 E EP +save +mark +4 pagesetup +10 R f +(Schily)720 480 w +10 S1 f +(\302)976 480 w +10 R f +( \( 1 \))3 164( CDRECORD)1 3277(s USER COMMANDS)2 950 3 1009 480 t +(to specify)1 407 1 1440 960 t +10 B f +( =)1 0( nk k=)2 113( an)1 56( la)1 50(b bl)1 84 5 1888 960 t +10 I f +(all)2191 960 w +10 R f +( continue with certain types of bad CD-RW)7 1844(because some drives will not)4 1218 2 2338 960 t +(disks. Note also that)3 847 1 1440 1080 t +10 B f +( d)1 0( rd)1 56( or)1 44( re ec co)3 138( dr)1 44(c cd)1 100 6 2324 1080 t +10 R f +(does its best if the)4 770 1 2743 1080 t +10 S1 f +(\261 \261)1 65 1 3550 1080 t +10 B f +( rc ce e)3 88( or)1 44(f fo)1 83 3 3615 1080 t +10 R f +(\257ag is used but it \256nally depends on)7 1533 1 3867 1080 t +(the drive's \256rmware whether the blanking operation will succeed or not.)10 2966 1 1440 1200 t +10 S1 f +(\261 \261)1 65 1 1080 1368 t +10 B f +( e)1 0( ve)1 44( iv)1 50( ri)1 28( kd dr)2 100( ec ck)2 100( he)1 44(c ch)1 100 8 1145 1368 t +10 R f +( a known drive,)3 696( the drive is)3 541( If)1 148(Checks if a driver for the current drive is present and exit.)11 2575 4 1440 1488 t +10 B f +( d)1 0( rd)1 56( or)1 44( re ec co)3 138( dr)1 44(c cd)1 100 6 1440 1608 t +10 R f +(uses exit code 0.)3 684 1 1855 1608 t +10 S1 f +(\261 \261)1 65 1 1080 1776 t +10 B f +( e)1 0( ne)1 44( on)1 56( lo)1 50(c cl)1 72 5 1145 1776 t +10 R f +(Tells)1440 1776 w +10 B f +( d)1 0( rd)1 56( or)1 44( re ec co)3 138( dr)1 44(c cd)1 100 6 1677 1776 t +10 R f +(to handle images created by)4 1162 1 2096 1776 t +10 I f +(readcd)3295 1776 w +10 S1 f +(\261)3609 1776 w +10 I f +(clone)3674 1776 w +10 R f +(. The)1 250 1 3898 1776 t +10 S1 f +(\261 \261)1 65 1 4185 1776 t +10 B f +( e)1 0( ne)1 44( on)1 56( lo)1 50(c cl)1 72 5 4250 1776 t +10 R f +(write mode may only)3 891 1 4509 1776 t +(be used in conjunction with the)5 1397 1 1440 1896 t +10 S1 f +(\261 \261)1 65 1 2891 1896 t +10 B f +( r)1 0( 96 6r)2 94( w9)1 50( aw)1 72(r ra)1 94 5 2956 1896 t +10 R f +(or)3320 1896 w +10 S1 f +(\261 \261)1 65 1 3457 1896 t +10 B f +( 16 6)2 50( w1)1 50( aw)1 72(r ra)1 94 4 3522 1896 t +10 R f +(option. Using)1 607 1 3842 1896 t +10 S1 f +(\261 \261)1 65 1 4502 1896 t +10 B f +( e)1 0( ne)1 44( on)1 56( lo)1 50(c cl)1 72 5 4567 1896 t +10 R f +(together with)1 558 1 4842 1896 t +10 S1 f +(\261 \261)1 65 1 1440 2016 t +10 B f +( r)1 0( 96 6r)2 94( w9)1 50( aw)1 72(r ra)1 94 5 1505 2016 t +10 R f +( The)1 235( as it allows to write all sub-channel data.)8 1832(is preferred)1 477 3 1861 2016 t +10 S1 f +(\261 \261)1 65 1 4452 2016 t +10 B f +( 16 6)2 50( w1)1 50( aw)1 72(r ra)1 94 4 4517 2016 t +10 R f +(option should)1 570 1 4830 2016 t +(only be used with drives that do not support to write in)11 2279 1 1440 2136 t +10 S1 f +(\261 \261)1 65 1 3752 2136 t +10 B f +( r)1 0( 96 6r)2 94( w9)1 50( aw)1 72(r ra)1 94 5 3817 2136 t +10 R f +(mode.)4160 2136 w +(Note that copying in)3 888 1 1440 2376 t +10 B f +( e)1 0( ne)1 44( on)1 56( lo)1 50(c cl)1 72 5 2376 2376 t +10 R f +( of error correction and thus always)6 1562(mode disables certain levels)3 1192 2 2646 2376 t +(results in a quality degradation. Avoid copying audio CDs in)9 2504 1 1440 2496 t +10 B f +( e)1 0( ne)1 44( on)1 56( lo)1 50(c cl)1 72 5 3977 2496 t +10 R f +(mode for this reason.)3 867 1 4232 2496 t +10 B f +( =)1 0( e=)1 57( le)1 44( \256l)1 28( e\256)1 56( ue)1 44(c cu)1 100 7 1080 2664 t +10 I f +(\256lename)1409 2664 w +10 R f +( information from a CDRWIN-compliant)4 1716(Take all recording-related)2 1067 2 1440 2784 t +10 B f +( t)1 0( ee et)2 77( he)1 44( sh)1 56( s)1 81( E)1 0(C CU UE)2 211 7 4265 2784 t +10 R f +( track-)1 274(\256le. No)1 350 2 4776 2784 t +(\256le arguments to)2 712 1 1440 2904 t +10 B f +( d)1 0( rd)1 56( or)1 44( re ec co)3 138( dr)1 44(c cd)1 100 6 2197 2904 t +10 R f +( when this option is present and one of the following)10 2294(are allowed)1 482 2 2624 2904 t +(options:)1440 3024 w +10 S1 f +(\261 \261)1 65 1 1829 3024 t +10 B f +( ao o)2 50(d da)1 106 2 1894 3024 t +10 R f +(,)2050 3024 w +10 S1 f +(\261 \261)1 65 1 2108 3024 t +10 B f +( ao o)2 50(s sa)1 89 2 2173 3024 t +10 R f +(,)2312 3024 w +10 S1 f +(\261 \261)1 65 1 2370 3024 t +10 B f +( w)1 0( aw)1 72(r ra)1 94 3 2435 3024 t +10 R f +(,)2601 3024 w +10 S1 f +(\261 \261)1 65 1 2659 3024 t +10 B f +( 16 6)2 50( w1)1 50( aw)1 72(r ra)1 94 4 2724 3024 t +10 R f +(,)2990 3024 w +10 S1 f +(\261 \261)1 65 1 3048 3024 t +10 B f +( r)1 0( 96 6r)2 94( w9)1 50( aw)1 72(r ra)1 94 5 3113 3024 t +10 R f +(is needed in addition.)3 879 1 3456 3024 t +10 B f +( =)1 0( p=)1 57( ga ap)2 106( re eg)2 94( pr)1 44( fp)1 56( ef)1 33(d de)1 100 8 1080 3192 t +10 S1 f +(#)1570 3192 w +10 R f +( only)1 224( option currently)2 706( This)1 256(Set the default pre-gap size for all tracks except track number 1.)11 2774 4 1440 3312 t +( track-at-once disks without the 2-second)5 1794(makes sense with the TEAC drive when creating)7 2166 2 1440 3432 t +(silence before each track.)3 1036 1 1440 3552 t +(This option may go away in the future.)7 1610 1 1440 3672 t +10 B f +( =)1 0( er r=)2 101( ve)1 44( iv)1 50( ri)1 28(d dr)1 100 6 1080 3840 t +10 I f +(name)1403 3840 w +10 R f +( reason for the existence of the)6 1302( The)1 226( for the device.)3 637(Allows the user to manually select a driver)7 1795 4 1440 3960 t +10 B f +( =)1 0( er r=)2 101( ve)1 44( iv)1 50( ri)1 28(d dr)1 100 6 1440 4080 t +10 I f +(name)1763 4080 w +10 R f +( to allow users to use)5 901(option is)1 361 2 2017 4080 t +10 B f +( d)1 0( rd)1 56( or)1 44( re ec co)3 138( dr)1 44(c cd)1 100 6 3316 4080 t +10 R f +(with drives that are similar to supported)6 1665 1 3735 4080 t +(drives but not known directly by)5 1437 1 1440 4200 t +10 B f +( d)1 0( rd)1 56( or)1 44( re ec co)3 138( dr)1 44(c cd)1 100 6 2929 4200 t +10 R f +( made after 1997 should be MMC-)6 1555( drives)1 296(. All)1 238 3 3311 4200 t +( is most unlikely that)4 924( It)1 141(standard-compliant and thus supported by one of the MMC drivers.)9 2895 3 1440 4320 t +10 B f +( d)1 0( rd)1 56( or)1 44( re ec co)3 138( dr)1 44(c cd)1 100 6 1440 4440 t +10 R f +( this option with extreme care. If)6 1378( Use)1 225( driver automatically.)2 881(is unable to \256nd the right)5 1058 4 1858 4440 t +( The)1 234( is used for a device, the possibility of creating corrupted disks is high.)13 3095(a wrong driver)2 631 3 1440 4560 t +(minimum problem related to a wrong driver is that the)9 2245 1 1440 4680 t +10 S1 f +(\261 \261)1 65 1 3718 4680 t +10 B f +( d)1 0( ee ed)2 100( pe)1 44(s sp)1 95 4 3783 4680 t +10 R f +(or)4055 4680 w +10 S1 f +(\261 \261)1 65 1 4171 4680 t +10 B f +( y)1 0( mm my)2 133(d du um)2 195 3 4236 4680 t +10 R f +(will not work.)2 580 1 4597 4680 t +(The following driver names are supported:)5 1745 1 1440 4848 t +10 B f +( p)1 0( lp)1 56( el)1 28(h he)1 100 4 1440 5016 t +10 R f +(To get a list of possible drivers together with a short description.)11 2669 1 1800 5016 t +10 B f +( c)1 0(m mm mc)2 210 2 1440 5184 t +10 S f +(_ _)1 50 1 1650 5184 t +10 B f +(b bd d)2 112 1 1700 5184 t +10 R f +( whenever)1 431(The generic SCSI-3/mmc BluRay driver is auto-selected)6 2366 2 1800 5304 t +10 B f +( d)1 0( rd)1 56( or)1 44( re ec co)3 138( dr)1 44(c cd)1 100 6 4641 5304 t +10 R f +(\256nds an)1 333 1 5067 5304 t +( support to write BluRay media or a multi system that)10 2270(MMC-compliant drive that does)3 1330 2 1800 5424 t +( to close the tray,)4 789( driver tries)2 510( This)1 261(contains a BluRay disk as the current medium.)7 2040 4 1800 5544 t +( the)1 160(checks the medium found in the tray and then branches to the driver that matches)14 3440 2 1800 5664 t +(current medium.)1 668 1 1800 5784 t +10 B f +( c)1 0(m mm mc)2 210 2 1440 5952 t +10 S f +(_ _)1 50 1 1650 5952 t +10 B f +( r)1 0(b bd dr)2 156 2 1700 5952 t +10 R f +( whenever)1 431(The generic SCSI-3/mmc BluRay driver is auto-selected)6 2366 2 1800 6072 t +10 B f +( d)1 0( rd)1 56( or)1 44( re ec co)3 138( dr)1 44(c cd)1 100 6 4641 6072 t +10 R f +(\256nds an)1 333 1 5067 6072 t +( write BluRay BD-R media or a multi sys-)8 1806(MMC-compliant drive that does support to)5 1794 2 1800 6192 t +(tem that contains a BluRay BD-R disk as the current medium.)10 2559 1 1800 6312 t +10 B f +( c)1 0(m mm mc)2 210 2 1440 6480 t +10 S f +(_ _)1 50 1 1650 6480 t +10 B f +( re e)2 44(b bd dr)2 156 2 1700 6480 t +10 R f +( whenever)1 431(The generic SCSI-3/mmc BluRay driver is auto-selected)6 2366 2 1800 6600 t +10 B f +( d)1 0( rd)1 56( or)1 44( re ec co)3 138( dr)1 44(c cd)1 100 6 4641 6600 t +10 R f +(\256nds an)1 333 1 5067 6600 t +( or a multi sys-)4 636(MMC-compliant drive that does support to write BluRay BD-RE media)9 2964 2 1800 6720 t +(tem that contains a BluRay BD-RE disk as the current medium.)10 2620 1 1800 6840 t +10 B f +( c)1 0(m mm mc)2 210 2 1440 7008 t +10 S f +(_ _)1 50 1 1650 7008 t +10 B f +( d)1 0(c cd)1 100 2 1700 7008 t +10 R f +(The generic SCSI-3/mmc CD-ROM driver is auto-selected whenever)7 2827 1 1800 7128 t +10 B f +( d)1 0( rd)1 56( or)1 44( re ec co)3 138( dr)1 44(c cd)1 100 6 4661 7128 t +10 R f +(\256nds an)1 323 1 5077 7128 t +( writing at all, or that only)6 1095(MMC-compliant drive that does not identify itself to support)8 2505 2 1800 7248 t +(J)720 7728 w +(. .)1 47 1 759 7673 t +( 4)1 1829( change: Version 3.0)3 850( Last)1 1434(org Schilling)1 528 4 759 7728 t +cleartomark +showpage +restore +%%EndPage: 4 4 %%Page: 5 5 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF 104.275(CDRECORD\(1\) Schily\264s)72 48 R -(USER COMMANDS)2.5 E(CDRECORD\(1\))106.775 E(follo)144 84 Q 2.479 -(wed directly by the letter `b', `k', `m', `s' of `f)-.25 F 2.479 -(', the size is multiplied by 512, 1024,).55 F .718 -(1024*1024, 2048 or 2352.)144 96 R .718(If the size consists of numbers\ - separated by `x' or `*', multiplication)5.718 F(of the tw)144 108 Q 2.5 -(on)-.1 G(umbers is performed.)-2.5 E(Thus)5 E/F1 10/Times-Italic@0 SF -(fs=10x63k)2.5 E F0(will specify a \214fo size of 630 kBytes.)2.5 E .429 -(The size speci\214ed by the)144 132 R F1(fs=)2.929 E F0(ar)2.929 E .43 -(gument includes the shared memory that is needed for administra-)-.18 F -.437(tion. This is at least one page of memory)144 144 R 5.437(.I)-.65 G -2.937(fn)-5.437 G(o)-2.937 E F1(fs)2.936 E F0 2.936(=o).27 G .436 -(ption is present,)-2.936 F/F2 10/Times-Bold@0 SF(cdr)2.936 E(ecord)-.18 -E F0 .436(will try to get the)2.936 F(\214fo size v)144 156 Q -(alue from the)-.25 E F2(CDR_FIFOSIZE)2.5 E F0(en)2.5 E 2.5 -(vironment. The)-.4 F(def)2.5 E(ault \214fo size is currently 4 MB.)-.1 -E .108(The \214fo is used to increase b)144 180 R(uf)-.2 E .108 -(fering for the real time writing process.)-.25 F .108(It allo)5.108 F -.108(ws to run a pipe from)-.25 F F2(mkisofs)144 192 Q F0 .09 -(directly into)2.59 F F2(cdr)2.59 E(ecord)-.18 E F0 5.09(.I)C 2.59(ft) --5.09 G .09(he \214fo is acti)-2.59 F .39 -.15(ve a)-.25 H .09 -(nd a pipe from).15 F F2(mkisofs)2.59 E F0(into)2.59 E F2(cdr)2.59 E -(ecord)-.18 E F0 .09(is used)2.59 F 1.583(to create a CD,)144 204 R F2 -(cdr)4.083 E(ecord)-.18 E F0 1.583(will abort prior to do an)4.083 F -4.084(ym)-.15 G 1.584(odi\214cations on the disk if)-4.084 F F2(mkisofs) -4.084 E F0(dies)4.084 E 1.19(before it starts writing.)144 216 R 1.19 -(The recommended \214fo size is between 4 and 32 MBytes.)6.19 F 1.19 -(As a rule of)6.19 F .717(thumb, the \214fo size should be at least equ\ -al to the size of the internal b)144 228 R(uf)-.2 E .718 -(fer of the CD-Recorder)-.25 F .331(and no more than half of the ph)144 -240 R .331(ysical amount of RAM a)-.05 F -.25(va)-.2 G .33 -(ilable in the machine.).25 F .33(If the \214fo size is)5.33 F .215(big\ - enough, the \214fo statistics will print a \214fo empty count of zero \ -and the \214fo min \214ll is not belo)144 252 R(w)-.25 E 2.812(20%. It) -144 264 R .311(is not wise to use too much space for the \214fo. If you\ - need more than 8 MB to write a CD)2.812 F .023 -(on an idle machine, your machine is either underpo)144 276 R .023 -(wered, has hardw)-.25 F .023(are problems or is mis-con\214g-)-.1 F -4.364(ured. The)144 288 R 1.864(sun4c architecture \(e.g. a Sparcstatio\ -n-2\) has only MMU page table entries for 16)4.364 F .812(MBytes per pr\ -ocess. Using more than 14 MBytes for the \214fo may cause the operating\ - system in)144 300 R .446 -(this case to spend much time to constantly reload the MMU tables. Ne) -144 312 R .445(wer machines from Sun do)-.25 F .12(not ha)144 324 R .42 --.15(ve t)-.2 H .12(his MMU hardw).15 F .121(are problem. I ha)-.1 F -.421 -.15(ve n)-.2 H 2.621(oi).15 G .121(nformation on PC-hardw)-2.621 F -.121(are re\215ecting this prob-)-.1 F(lem.)144 336 Q .993(If you ha)144 -360 R 1.293 -.15(ve b)-.2 H(uf)-.05 E .993 -(fer underruns or similar problems and observ)-.25 F 3.492(eaz)-.15 G -(ero)-3.492 E F1 .992(\214fo empty count)3.492 F F0 3.492(,y).68 G .992 -(ou ha)-3.492 F -.15(ve)-.2 G(hardw)144 372 Q -(are problems. The \214fo size in this case is suf)-.1 E(\214cient.)-.25 -E F2(de)108 388.8 Q(v=)-.15 E F1(tar).13 E -.1(ge)-.37 G(t).1 E F0 2.041 -(Sets the SCSI tar)144 400.8 R 2.041(get for the CD-Recorder)-.18 F -4.541(,s)-.4 G 2.041(ee notes abo)-4.541 F -.15(ve)-.15 G 7.042(.A).15 G -2.042(typical de)-2.5 F 2.042(vice speci\214cation is)-.25 F F2(de)144 -412.8 Q(v=)-.15 E F1(6,0).2 E F0 5.246(.I)2.746 G 2.746(fa\214)-5.246 G -.246(lename must be pro)-2.746 F .246 -(vided together with the numerical tar)-.15 F .246 -(get speci\214cation, the \214le-)-.18 F .066 -(name is implementation speci\214c.)144 424.8 R .066 -(The correct \214lename in this case can be found in the system spe-) -5.066 F 1.205(ci\214c manuals of the tar)144 436.8 R 1.204 -(get operating system.)-.18 F 1.204(On a)6.204 F F1 -1.77 -.55(Fr e) -3.704 H(eBSD).55 E F0 1.204(system without)3.704 F F1(CAM)3.704 E F0 -1.204(support, you)3.704 F .347(need to use the control de)144 448.8 R -.347(vice \(e.g.)-.25 F F1(/de)5.347 E(v/r)-.15 E(cd0.ctl)-.37 E F0 -2.847(\). A).51 F .347(correct de)2.847 F .348 -(vice speci\214cation in this case may)-.25 F(be)144 460.8 Q F2(de)2.5 E -(v=)-.15 E F1(/de)1.15 E(v/r)-.15 E(cd0.ctl:@)-.37 E F0(.)2.5 E .572 -(On Linux, dri)144 484.8 R -.15(ve)-.25 G 3.072(sc).15 G .572 -(onnected to a parallel port adapter are mapped to a virtual SCSI b) --3.072 F .571(us. Dif)-.2 F(ferent)-.25 E(adapters are mapped to dif)144 -496.8 Q(ferent tar)-.25 E(gets on this virtual SCSI b)-.18 E(us.)-.2 E -.526(If no)144 520.8 R F1(de)3.026 E(v)-.15 E F0 .527 -(option is present,)3.027 F F2(cdr)3.027 E(ecord)-.18 E F0 .527 -(will try to get the de)3.027 F .527(vice from the)-.25 F F2(CDR_DEVICE) -3.027 E F0(en)3.027 E(viron-)-.4 E(ment.)144 532.8 Q 1.047(If the ar)144 -556.8 R 1.047(gument to the)-.18 F F2(de)3.547 E(v=)-.15 E F0 1.047 -(option does not contain the characters ',)3.547 F 1.047 -(', '/', '@' or ':', it is inter)-.7 F(-)-.2 E -(preted as an label name that may be found in the \214le /etc/def)144 -568.8 Q(ault/cdrecord \(see FILES section\).)-.1 E F2(gracetime=)108 -585.6 Q F1(#).48 E F0(Set the grace time before starting to write to)144 -597.6 Q F1(#)2.5 E F0 2.5(seconds. V)3.4 F(alues belo)-1.11 E 2.5(w2s) --.25 G(econds are not allo)-2.5 E(wed.)-.25 E F2(timeout=)108 614.4 Q F1 -(#).48 E F0 .13(Set the def)144 626.4 R .13(ault SCSI command timeout v) --.1 F .13(alue to)-.25 F F1(#)2.63 E F0 2.63(seconds. The)3.53 F(def) -2.63 E .13(ault SCSI command timeout is)-.1 F .452 -(the minimum timeout used for sending SCSI commands.)144 638.4 R .451 -(If a SCSI command f)5.451 F .451(ails due to a time-)-.1 F .366 -(out, you may try to raise the def)144 650.4 R .366 -(ault SCSI command timeout abo)-.1 F .667 -.15(ve t)-.15 H .367 -(he timeout v).15 F .367(alue of the f)-.25 F(ailed)-.1 E 2.716 -(command. If)144 662.4 R .216(the command runs correctly with a raised \ -command timeout, please report the better)2.716 F .401(timeout v)144 -674.4 R .401 -(alue and the corresponding command to the author of the program.)-.25 F -.402(If no)5.402 F F1(timeout)2.902 E F0(option)2.902 E -(is present, a def)144 686.4 Q(ault timeout of 40 seconds is used.)-.1 E -F2(dri)108 703.2 Q -.1(ve)-.1 G(r=).1 E F1(name).36 E F0(Allo)144 715.2 -Q 1.41(ws to use a user supplied dri)-.25 F -.15(ve)-.25 G 3.91(rn).15 G -1.41(ame for the de)-3.91 F 3.91(vice. T)-.25 F 3.91(og)-.8 G 1.41 -(et a list of possible dri)-3.91 F -.15(ve)-.25 G 1.41(rs use).15 F F2 -(dri)144 727.2 Q -.1(ve)-.1 G(r=help).1 E F0 5.973(.T)C .973 -(he reason for the e)-5.973 F .973(xistence of this option is to allo) --.15 F 3.473(wu)-.25 G .973(sers to use)-3.473 F F2(cdr)3.474 E(ecord) --.18 E F0(with)3.474 E(J)72 768 Q -.25(..)-5.5 K(or)-4.5 5.5 M 2.5(gS) --.18 G 153.065(chilling V)-2.5 F(ersion 2.0)-1.11 E(5)206.225 E EP +save +mark +5 pagesetup +10 R f +(Schily)720 480 w +10 S1 f +(\302)976 480 w +10 R f +( \( 1 \))3 164( CDRECORD)1 3277(s USER COMMANDS)2 950 3 1009 480 t +(identi\256es to support media or write modes not implemented in)9 2563 1 1800 960 t +10 B f +( d)1 0( rd)1 56( or)1 44( re ec co)3 138( dr)1 44(c cd)1 100 6 4396 960 t +10 R f +(.)4778 960 w +10 B f +( c)1 0(m mm mc)2 210 2 1440 1128 t +10 S f +(_ _)1 50 1 1650 1128 t +10 B f +( d)1 0(c cd)1 100 2 1700 1128 t +10 S f +(_ _)1 50 1 1800 1128 t +10 B f +( d)1 0( vd)1 56(d dv)1 106 3 1850 1128 t +10 R f +(The generic SCSI-3/mmc CD/DVD/BluRay driver is auto-selected whenever)7 3179 1 1800 1248 t +10 B f +( d)1 0( rd)1 56( or)1 44( re ec co)3 138( dr)1 44(c cd)1 100 6 5018 1248 t +10 R f +( that seems to support more than one)7 1664(\256nds an MMC-2 or MMC-3-compliant drive)5 1936 2 1800 1368 t +( be found to select the right)6 1225(medium type and the tray is open or no medium could)10 2375 2 1800 1488 t +( to close the tray, checks the medium found in the tray and)12 2578( driver tries)2 502(driver. This)1 520 3 1800 1608 t +(then branches to the driver that matches the current medium.)9 2495 1 1800 1728 t +10 B f +( c)1 0(m mm mc)2 210 2 1440 1896 t +10 S f +(_ _)1 50 1 1650 1896 t +10 B f +( r)1 0( dr)1 44(c cd)1 100 3 1700 1896 t +10 R f +( driver is auto-selected whenever)4 1434(The generic SCSI-3/mmc CD-R/CD-RW)3 1730 2 1800 2016 t +10 B f +( d)1 0( rd)1 56( or)1 44( re ec co)3 138( dr)1 44(c cd)1 100 6 5018 2016 t +10 R f +( drive that only supports to write CDs or a multi system drive)12 2563(\256nds an MMC-compliant)2 1037 2 1800 2136 t +(that contains a CD as the current medium.)7 1737 1 1800 2256 t +10 B f +( c)1 0(m mm mc)2 210 2 1440 2424 t +10 S f +(_ _)1 50 1 1650 2424 t +10 B f +( r)1 0( dr)1 44(c cd)1 100 3 1700 2424 t +10 S f +(_ _)1 50 1 1844 2424 t +10 B f +( y)1 0( ny)1 50( on)1 56(s so)1 89 4 1894 2424 t +10 R f +( driver is auto-selected whenever)4 1434(The generic SCSI-3/mmc CD-R/CD-RW)3 1730 2 1800 2544 t +10 B f +( d)1 0( rd)1 56( or)1 44( re ec co)3 138( dr)1 44(c cd)1 100 6 5018 2544 t +10 R f +(would otherwise select the)3 1095 1 1800 2664 t +10 B f +( c)1 0(m mm mc)2 210 2 2931 2664 t +10 S f +(_ _)1 50 1 3141 2664 t +10 B f +( r)1 0( dr)1 44(c cd)1 100 3 3191 2664 t +10 R f +( seems to be made by Sony.)6 1173(driver but the device)3 856 2 3371 2664 t +(The)1800 2784 w +10 B f +( c)1 0(m mm mc)2 210 2 1992 2784 t +10 S f +(_ _)1 50 1 2202 2784 t +10 B f +( r)1 0( dr)1 44(c cd)1 100 3 2252 2784 t +10 S f +(_ _)1 50 1 2396 2784 t +10 B f +( y)1 0( ny)1 50( on)1 56(s so)1 89 4 2446 2784 t +10 R f +( does not)2 387(is de\256nitely needed for the Sony CDU 928 as this drive)10 2335 2 2678 2784 t +( the MMC standard and some of the MMC SCSI commands)10 2675(completely implement)1 925 2 1800 2904 t +( commands. It seems that all Sony drives \(even)8 1956(have to be replaced by Sony proprietary)6 1644 2 1800 3024 t +( commands so it has not yet)6 1243(newer ones\) still implement the Sony proprietary SCSI)7 2357 2 1800 3144 t +( driver for all Sony drives. If you \256nd a newer Sony)11 2322(become a problem to use this)5 1278 2 1800 3264 t +(drive that does not work with this driver, please report.)9 2266 1 1800 3384 t +10 B f +( c)1 0(m mm mc)2 210 2 1440 3552 t +10 S f +(_ _)1 50 1 1650 3552 t +10 B f +( d)1 0( vd)1 56(d dv)1 106 3 1700 3552 t +10 R f +(The generic SCSI-3/mmc-2 DVD-R/DVD-RW driver is auto-selected whenever)7 3600 1 1800 3672 t +10 B f +( d)1 0( rd)1 56( or)1 44( re ec co)3 138( dr)1 44(c cd)1 100 6 1800 3792 t +10 R f +( to write DVDs)3 679(\256nds an MMC-2 or MMC-3-compliant drive that supports)7 2491 2 2230 3792 t +( Once mode for DVD writ-)5 1128( is no Track At)4 631( There)1 298(and an appropriate medium is loaded.)5 1543 4 1800 3912 t +(ers.)1800 4032 w +10 B f +( c)1 0(m mm mc)2 210 2 1440 4200 t +10 S f +(_ _)1 50 1 1650 4200 t +10 B f +( s)1 0( us)1 39( lu)1 56( dp pl)2 84( vd)1 56(d dv)1 106 6 1700 4200 t +10 R f +( auto-selected whenever one of)4 1276(The generic SCSI-3/mmc-3 DVD+R/DVD+RW driver is)5 2324 2 1800 4320 t +( media)1 283( checks)1 311( It)1 134(the DVD+ media types that are incompatible to each other is found.)11 2872 4 1800 4440 t +(and then branches to the driver that matches the current medium.)10 2672 1 1800 4560 t +10 B f +( c)1 0(m mm mc)2 210 2 1440 4728 t +10 S f +(_ _)1 50 1 1650 4728 t +10 B f +( r)1 0( sr)1 44( us)1 39( lu)1 56( dp pl)2 84( vd)1 56(d dv)1 106 7 1700 4728 t +10 R f +( whenever a DVD+R)3 974(The generic SCSI-3/mmc-3 DVD+R driver is auto-selected)6 2626 2 1800 4848 t +( that for unknown reason, the)5 1380( Note)1 295(medium is found in an appropriate writer.)6 1925 3 1800 4968 t +( a simulation mode for DVD+R media.)6 1665(DVD+RW Alliance does not like that there is)7 1935 2 1800 5088 t +(The author of)2 597 1 1800 5208 t +10 B f +( d)1 0( rd)1 56( or)1 44( re ec co)3 138( dr)1 44(c cd)1 100 6 2449 5208 t +10 R f +(tries to convince manufacturers to implement a simulation)7 2517 1 2883 5208 t +( only supports one write mode that)6 1448( DVD+R)1 407( support.)1 360(mode for DVD+R and implement)4 1385 4 1800 5328 t +( this mode is selected in)5 1078(is somewhere between Track At Once and Packet writing;)8 2522 2 1800 5448 t +10 B f +( d)1 0( rd)1 56( or)1 44( re ec co)3 138( dr)1 44(c cd)1 100 6 1800 5568 t +10 R f +(via the)1 277 1 2215 5568 t +10 S1 f +(\261 \261)1 65 1 2525 5568 t +10 B f +( ao o)2 50(d da)1 106 2 2590 5568 t +10 R f +(/)2746 5568 w +10 S1 f +(\261 \261)1 65 1 2774 5568 t +10 B f +( ao o)2 50(s sa)1 89 2 2839 5568 t +10 R f +(option.)3011 5568 w +10 B f +( c)1 0(m mm mc)2 210 2 1440 5736 t +10 S f +(_ _)1 50 1 1650 5736 t +10 B f +( w)1 0( rw)1 72( sr)1 44( us)1 39( lu)1 56( dp pl)2 84( vd)1 56(d dv)1 106 8 1700 5736 t +10 R f +( auto-selected whenever a DVD+RW)4 1578(The generic SCSI-3/mmc-3 DVD+RW driver is)5 2022 2 1800 5856 t +( DVD+RW media need to be formatted)6 1659( As)1 184(medium is found in an appropriate writer.)6 1757 3 1800 5976 t +( cdrecord auto-detects this medium state and performs a format)9 2714(before their \256rst use,)3 886 2 1800 6096 t +( does)1 224( that for unknown reason, the DVD+RW Alliance)7 2110( Note)1 269(before it starts to write.)4 997 4 1800 6216 t +( mode nor a way to erase DVD+RW media.)8 2061(not like that there is a simulation)6 1539 2 1800 6336 t +( one write mode that is close to Packet writing; this mode is)12 2568(DVD+RW only supports)2 1032 2 1800 6456 t +(selected in)1 432 1 1800 6576 t +10 B f +( d)1 0( rd)1 56( or)1 44( re ec co)3 138( dr)1 44(c cd)1 100 6 2265 6576 t +10 R f +(via the)1 277 1 2680 6576 t +10 S1 f +(\261 \261)1 65 1 2990 6576 t +10 B f +( ao o)2 50(d da)1 106 2 3055 6576 t +10 R f +(/)3211 6576 w +10 S1 f +(\261 \261)1 65 1 3239 6576 t +10 B f +( ao o)2 50(s sa)1 89 2 3304 6576 t +10 R f +(option.)3476 6576 w +10 B f +( w)1 0(c cw)1 116 2 1440 6744 t +10 S f +(_ _)1 50 1 1556 6744 t +10 B f +(7 75 50 01 1)4 200 1 1606 6744 t +10 R f +( Matsushita/Panasonic CW-7501 is auto-selected when)5 2320(The driver for)2 605 2 1800 6864 t +10 B f +( d)1 0( rd)1 56( or)1 44( re ec co)3 138( dr)1 44(c cd)1 100 6 4774 6864 t +10 R f +(\256nds)5205 6864 w +(this old pre-MMC drive.)3 1007 1 1800 6984 t +10 B f +( d)1 0( rd)1 56( or)1 44( re ec co)3 138( dr)1 44(C Cd)1 128 6 2873 6984 t +10 R f +(supports all write modes for this drive type.)7 1799 1 3316 6984 t +10 B f +( k)1 0( ak)1 56( da)1 50( od)1 56(k ko)1 106 5 1440 7152 t +10 S f +(_ _)1 50 1 1708 7152 t +10 B f +( d)1 0( cd)1 56(p pc)1 100 3 1758 7152 t +10 S f +(_ _)1 50 1 1914 7152 t +10 B f +(6 60 00 0)3 150 1 1964 7152 t +10 R f +(The driver for Kodak PCD-600 is auto-selected when)7 2326 1 1800 7272 t +10 B f +( d)1 0( rd)1 56( or)1 44( re ec co)3 138( dr)1 44(c cd)1 100 6 4178 7272 t +10 R f +(\256nds this old pre-)3 787 1 4613 7272 t +(J)720 7752 w +(. .)1 47 1 759 7697 t +( 5)1 1829( change: Version 3.0)3 850( Last)1 1434(org Schilling)1 528 4 759 7752 t +cleartomark +showpage +restore +%%EndPage: 5 5 %%Page: 6 6 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF 104.275(CDRECORD\(1\) Schily\264s)72 48 R -(USER COMMANDS)2.5 E(CDRECORD\(1\))106.775 E(dri)144 84 Q -.15(ve)-.25 G -3.609(st).15 G 1.109(hat are similar to supported dri)-3.609 F -.15(ve) --.25 G 3.609(sb).15 G 1.109(ut not kno)-3.809 F 1.109(wn directly by) --.25 F/F1 10/Times-Bold@0 SF(cdr)3.608 E(ecord)-.18 E F0 6.108(.U)C -1.108(se this option)-6.108 F .094(with e)144 96 R .094 -(xtreme care. If a wrong dri)-.15 F -.15(ve)-.25 G 2.595(ri).15 G 2.595 -(su)-2.595 G .095(sed for a de)-2.595 F .095 -(vice, the possibility of creating corrupted disks)-.25 F .54(is high.) -144 108 R .54(The minimum problem related to a wrong dri)5.54 F -.15(ve) --.25 G 3.04(ri).15 G 3.04(st)-3.04 G .54(hat the)-3.04 F F1(\255speed) -3.04 E F0(or)3.04 E F1(\255dummy)3.04 E F0 .54(will not)3.04 F -.1(wo) -144 120 S(rk.).1 E .149(There are tw)144 144 R 2.649(os)-.1 G .149 -(pecial dri)-2.649 F -.15(ve)-.25 G 2.649(re).15 G .149 -(ntries in the list:)-2.649 F F1(cdr_simul)2.649 E F0(and)2.649 E F1 -(dvd_simul)2.65 E F0 5.15(.T)C .15(hese dri)-5.15 F -.15(ve)-.25 G 2.65 -(re).15 G .15(ntries are)-2.65 F 1.912(designed to mak)144 156 R 4.412 -(et)-.1 G 1.912(iming tests at an)-4.412 F 4.412(ys)-.15 G 1.912 -(peed or timing tests for dri)-4.412 F -.15(ve)-.25 G 4.412(st).15 G -1.911(hat do not support the)-4.412 F F1(\255dummy)144 168 Q F0 2.842 -(option. The)2.842 F .342(simulation dri)2.842 F -.15(ve)-.25 G .342 -(rs implement a dri).15 F .642 -.15(ve w)-.25 H .343(ith a b).15 F(uf) --.2 E .343(fer size of 1MB that can be)-.25 F .523(changed via the)144 -180 R F1(CDR_SIMUL_B)3.022 E(UFSIZE)-.1 E F0(en)3.022 E .522 -(vironment v)-.4 F 3.022(ariable. The)-.25 F .522(simulation dri)3.022 F --.15(ve)-.25 G 3.022(rc).15 G(orrectly)-3.022 E .004(simulates e)144 192 -R -.15(ve)-.25 G 2.504(nab).15 G(uf)-2.704 E .004 -(fer underrun condition.)-.25 F .005(If the)5.005 F F1(\255dummy)2.505 E -F0 .005(option is present, the simulation is not)2.505 F -(aborted in case of a b)144 204 Q(uf)-.2 E(fer underrun.)-.25 E F1(dri) -108 220.8 Q -.1(ve)-.1 G -.18(ro).1 G(pts=).18 E/F2 10/Times-Italic@0 SF -(option list).23 E F0 .343(Set dri)144 232.8 R -.15(ve)-.25 G 2.843(rs) -.15 G .343 -(peci\214c options. The options are speci\214ed a comma separated list.) --2.843 F 1.943 -.8(To g)5.343 H .343(et a list of v).8 F(alid)-.25 E -.386(options use)144 244.8 R F1(dri)2.886 E -.1(ve)-.1 G -.18(ro).1 G -(pts=).18 E F2(help).31 E F0 .386(together with the)2.886 F F2 -2.886 E(hec)-.15 E(kdrive)-.2 E F0 2.886(option. Currently)2.886 F .386 -(implemented dri)2.886 F -.15(ve)-.25 G(r).15 E(options are:)144 256.8 Q -F1 -.2(bu)144 273.6 S -.15(rn).2 G(fr).15 E(ee)-.18 E F0 -.45(Tu)180 -285.6 S 1.122(rn the support for Buf).45 F 1.122 -(fer Underrun Free writing on.)-.25 F 1.121(This only w)6.121 F 1.121 -(orks for dri)-.1 F -.15(ve)-.25 G 3.621(st).15 G(hat)-3.621 E 1.954 -(support Buf)180 297.6 R 1.954(fer Underrun Free technology)-.25 F 6.954 -(.T)-.65 G 1.954(his may be called:)-6.954 F F1(Sany)4.454 E 4.454(oB) --.25 G(URN-Pr)-4.554 E(oof)-.18 E F0(,)A F1(Ricoh J)180 309.6 Q -(ust-Link)-.15 E F0(,)A F1 -.85(Ya)2.5 G(maha Lossless-Link).85 E F0 -(or similar)2.5 E(.)-.55 E(The def)180 333.6 Q(ault is to turn)-.1 E F1 --.1(BU)2.5 G(RN-Fr).1 E(ee)-.18 E F0(of)2.5 E(f, re)-.25 E -.05(ga)-.15 -G(rdless of the def).05 E(aults of the dri)-.1 E -.15(ve)-.25 G(.).15 E -F1(nob)144 350.4 Q(ur)-.2 E(nfr)-.15 E(ee)-.18 E F0 -.45(Tu)180 362.4 S -(rn the support for Buf).45 E(fer Underrun Free writing of)-.25 E(f.) --.25 E F1 -.1(va)144 379.2 S(rir).1 E(ec=)-.18 E F2(value).29 E F0 -.45 -(Tu)180 391.2 S .71(rn on the).45 F F1 .71(Plextor V)3.21 F(ariRec)-.92 -E F0 .71(writing mode. The mandatory parameter)3.21 F F2(value)3.21 E F0 -.71(is the laser)3.21 F(po)180 403.2 Q .556(wer of)-.25 F .556 -(fset and currently may be selected from -2, -1, 0, 1, 2.)-.25 F .557 -(In addition, you need to)5.557 F -(set the write speed to 4 in order to allo)180 415.2 Q(w)-.25 E F1 -.92 -(Va)2.5 G(riRec).92 E F0(to w)2.5 E(ork.)-.1 E F1(audiomaster)144 432 Q -F0 -.45(Tu)180 444 S 1.038(rn on the).45 F F1 -.85(Ya)3.538 G 1.038 -(hama A).85 F 1.038(udio Master Q)-.5 F 3.538(.R)-.2 G(.)-3.538 E F0 -1.038(feature which usually should result in high)6.038 F .265 -(quality CDs that ha)180 456 R .565 -.15(ve l)-.2 H .265 -(ess reading problems in HiFi players.).15 F .266 -(As this is implemented as a)5.265 F -.25(va)180 468 S 1.535 -(riant of the Session at Once write mode, it will only w).25 F 1.534 -(ork if you select SA)-.1 F 4.034(Ow)-.55 G(rite)-4.034 E .45 -(mode and there is no need to turn it of)180 480 R 2.951(f. The)-.25 F -F1 -.5(Au)2.951 G .451(dio Master).5 F F0 .451(mode will w)2.951 F .451 -(ork with a lim-)-.1 F .811(ited speed b)180 492 R .811 -(ut may also be used with data CDs. in)-.2 F F1 -.5(Au)3.31 G .81 -(dio Master).5 F F0 .81(mode, the pits on the)3.31 F .258 -(CD will be written lar)180 504 R .258 -(ger then usual so the capacity of the medium is reduced when turn-)-.18 -F 1.016(ing this feature on.)180 516 R 3.516(A7)6.016 G 3.515(4m)-3.516 -G 1.015(inute CD will only ha)-3.515 F 1.315 -.15(ve a c)-.2 H 1.015 -(apacity of 63 minutes if).15 F F1 -.5(Au)3.515 G(dio).5 E(Master)180 -528 Q F0(is acti)2.5 E .3 -.15(ve a)-.25 H -(nd the capacity of a 80 minute CD will be reduced to 68 minutes.).15 E -F1 -.25(fo)144 544.8 S -.18(rc).25 G(espeed).18 E F0(Normally)180 556.8 -Q 3.721(,m)-.65 G 1.221(odern dri)-3.721 F -.15(ve)-.25 G 3.721(sk).15 G -(no)-3.721 E 3.721(wt)-.25 G 1.222(he highest possible speed for dif) --3.721 F 1.222(ferent media and may)-.25 F 2.46 -(reduce the speed in order to grant best write quality)180 568.8 R 7.46 -(.S)-.65 G 2.46(ome dri)-7.46 F -.15(ve)-.25 G 4.96(s\().15 G 2.46 -(e.g. Ricoh and)-4.96 F -1(Ya)180 580.8 S .664(maha\) allo)1 F 3.164(wt) --.25 G 3.164(of)-3.164 G .664(orce the dri)-3.164 F .964 -.15(ve t)-.25 -H 3.164(ou).15 G .664(se the selected speed e)-3.164 F -.15(ve)-.25 G -3.164(ni).15 G 3.164(ft)-3.164 G .664(he medium is so bad)-3.164 F 1.339 -(that the write quality w)180 592.8 R 1.338(ould be poor)-.1 F 3.838(.T) --.55 G 1.338(his option tells such a dri)-3.838 F 1.638 -.15(ve t)-.25 H -3.838(of).15 G 1.338(orce to use the)-3.838 F(selected speed re)180 -604.8 Q -.05(ga)-.15 G(rdless of the medium quality).05 E(.)-.65 E 2.005 -(Use this option with e)180 628.8 R 2.005 -(xtreme care and note that the dri)-.15 F 2.305 -.15(ve s)-.25 H 2.005 -(hould kno).15 F 4.505(wb)-.25 G 2.005(etter which)-4.505 F .743 -(medium will w)180 640.8 R .743(ork at full speed.)-.1 F .743(The def) -5.743 F .743(ault is to turn)-.1 F F1 -.25(fo)3.242 G -.18(rc).25 G -(espeed).18 E F0(of)3.242 E .742(f, re)-.25 F -.05(ga)-.15 G .742 -(rdless of the).05 F(def)180 652.8 Q(aults of the dri)-.1 E -.15(ve)-.25 -G(.).15 E F1(nof)144 669.6 Q(or)-.25 E(cespeed)-.18 E F0 -.45(Tu)180 -681.6 S(rn of).45 E 2.5(ft)-.25 G(he)-2.5 E F1 -.25(fo)2.5 G -.18(rc).25 -G 2.5(es).18 G(peed)-2.5 E F0(feature.)2.5 E F1(tattooinf)144 698.4 Q(o) --.25 E F0 .615(Use this option together with)180 710.4 R F1 -(\255checkdri)3.115 E -.1(ve)-.1 G F0 .615(to retrie)3.215 F .915 -.15 -(ve t)-.25 H .616(he image size information for the).15 F F1 -.85(Ya)180 -722.4 S 1.203(maha DiskT@2).85 F F0 1.203(feature. The images al)3.703 F --.1(wa)-.1 G 1.202(ys ha).1 F 1.502 -.15(ve a l)-.2 H 1.202 -(ine length of 3744 pix).15 F 3.702(el. Line)-.15 F(J)72 768 Q -.25(..) --5.5 K(or)-4.5 5.5 M 2.5(gS)-.18 G 153.065(chilling V)-2.5 F(ersion 2.0) --1.11 E(6)206.225 E EP +save +mark +6 pagesetup +10 R f +(Schily)720 480 w +10 S1 f +(\302)976 480 w +10 R f +( \( 1 \))3 164( CDRECORD)1 3277(s USER COMMANDS)2 950 3 1009 480 t +( speed \(6x\) CD-writer for a long time. This)8 1842(MMC drive which has been the \256rst high)7 1758 2 1800 960 t +(drive behaves similarly to the Philips CDD-521 drive.)7 2216 1 1800 1080 t +10 B f +( s)1 0( ps)1 39( il li ip)3 112(p ph hi)2 140 4 1440 1248 t +10 S f +(_ _)1 50 1 1731 1248 t +10 B f +( 52 21 1)3 100( dd d5)2 106(c cd)1 100 3 1781 1248 t +10 R f +( CDD-521 is auto-selected when)4 1359(The driver for Philips)3 902 2 1800 1368 t +10 B f +( d)1 0( rd)1 56( or)1 44( re ec co)3 138( dr)1 44(c cd)1 100 6 4100 1368 t +10 R f +(\256nds a Philips CDD-)3 879 1 4521 1368 t +( \(which is the \256rst CD-writer ever made\) or one of the other drives that are)15 3204(521 drive)1 396 2 1800 1488 t +( \(see)1 204( Philips CDD-521 or similar drives)5 1493( All)1 204(known to behave similarly to this drive.)6 1699 4 1800 1608 t +(other drivers in this list\) do not support Session At Once recording.)11 2775 1 1800 1728 t +10 B f +( s)1 0( ps)1 39( il li ip)3 112(p ph hi)2 140 4 1440 1896 t +10 S f +(_ _)1 50 1 1731 1896 t +10 B f +( 52 21 1)3 100( dd d5)2 106(c cd)1 100 3 1781 1896 t +10 S f +(_ _)1 50 1 2087 1896 t +10 B f +( d)1 0( ld)1 56(o ol)1 78 3 2137 1896 t +10 R f +( when)1 265(The driver for Philips old CDD-521 is auto-selected)7 2239 2 1800 2016 t +10 B f +( d)1 0( rd)1 56( or)1 44( re ec co)3 138( dr)1 44(c cd)1 100 6 4353 2016 t +10 R f +(\256nds a Philips)2 616 1 4784 2016 t +(CDD-521 with very old \256rmware which has some known limitations.)9 2848 1 1800 2136 t +10 B f +( s)1 0( ps)1 39( il li ip)3 112(p ph hi)2 140 4 1440 2304 t +10 S f +(_ _)1 50 1 1731 2304 t +10 B f +( 52 22 2)3 100( dd d5)2 106(c cd)1 100 3 1781 2304 t +10 R f +( CDD-522 is auto-selected when)4 1359(The driver for Philips)3 902 2 1800 2424 t +10 B f +( d)1 0( rd)1 56( or)1 44( re ec co)3 138( dr)1 44(c cd)1 100 6 4100 2424 t +10 R f +(\256nds a Philips CDD-)3 879 1 4521 2424 t +( variants with Kodak label.)4 1215(522 which is the successor of the 521 or one of its)11 2385 2 1800 2544 t +10 B f +( d)1 0( rd)1 56( or)1 44( re ec co)3 138( dr)1 44(C Cd)1 128 6 1800 2664 t +10 R f +(does not support Session At Once recording with these drives.)9 2558 1 2243 2664 t +10 B f +( s)1 0( ps)1 39( il li ip)3 112(p ph hi)2 140 4 1440 2832 t +10 S f +(_ _)1 50 1 1731 2832 t +10 B f +( b)1 0( mb)1 56(d du um)2 195 3 1781 2832 t +10 R f +( It)1 128( is never auto-selected.)3 941(The driver for Philips CDD-521 with pessimistic assumptions)7 2531 3 1800 2952 t +(may be used by hand with drives that behave similarly to the Philips CDD-521.)13 3280 1 1800 3072 t +10 B f +( ee er r)3 88( ne)1 44( on)1 56( io)1 50(p pi)1 84 5 1440 3240 t +10 S f +(_ _)1 50 1 1762 3240 t +10 B f +( 11 14 4x x)4 150( s1)1 50( ws)1 39(d dw)1 128 4 1812 3240 t +10 R f +(The driver for Pioneer DW-S114X is auto-selected when)7 2338 1 1800 3360 t +10 B f +( d)1 0( rd)1 56( or)1 44( re ec co)3 138( dr)1 44(c cd)1 100 6 4172 3360 t +10 R f +(\256nds one of the old)4 812 1 4588 3360 t +(non-MMC CD-writers from Pioneer.)3 1500 1 1800 3480 t +10 B f +( n)1 0( on)1 56( mo)1 50( sm)1 83( as)1 39( la)1 50(p pl)1 84 7 1440 3648 t +10 S f +(_ _)1 50 1 1802 3648 t +10 B f +( 41 10 00 0)4 150( f4)1 50(r rf)1 77 3 1852 3648 t +10 R f +( for Plasmon RF 4100 is auto-selected when)7 1936(The driver)1 441 2 1800 3768 t +10 B f +( d)1 0( rd)1 56( or)1 44( re ec co)3 138( dr)1 44(c cd)1 100 6 4226 3768 t +10 R f +(\256nds this speci\256c)2 743 1 4657 3768 t +(variant of the Philips CDD-521.)4 1312 1 1800 3888 t +10 B f +( h)1 0( oh)1 56( co)1 50( ic)1 44(r ri)1 72 5 1440 4056 t +10 S f +(_ _)1 50 1 1662 4056 t +10 B f +( c)1 0( o1 10 06 60 0c)5 244(r ro)1 94 3 1712 4056 t +10 R f +(The driver for Ricoh RO-1060C is auto-selected when)7 2241 1 1800 4176 t +10 B f +( d)1 0( rd)1 56( or)1 44( re ec co)3 138( dr)1 44(c cd)1 100 6 4076 4176 t +10 R f +(\256nds this drive. There)3 907 1 4493 4176 t +(is no real support for this drive yet.)7 1460 1 1800 4296 t +10 B f +( h)1 0( oh)1 56( co)1 50( ic)1 44(r ri)1 72 5 1440 4464 t +10 S f +(_ _)1 50 1 1662 4464 t +10 B f +( c)1 0( o1 14 42 20 0c)5 244(r ro)1 94 3 1712 4464 t +10 R f +(The driver for Ricoh RO-1420C is auto-selected when)7 2241 1 1800 4584 t +10 B f +( d)1 0( rd)1 56( or)1 44( re ec co)3 138( dr)1 44(c cd)1 100 6 4076 4584 t +10 R f +(\256nds a drive with this)4 907 1 4493 4584 t +(speci\256c variant of the Philips CDD-521 command set.)7 2221 1 1800 4704 t +10 B f +( 2)1 0( i2)1 50( si)1 28( cs)1 39(s sc)1 83 5 1440 4872 t +10 S f +(_ _)1 50 1 1640 4872 t +10 B f +( d)1 0(c cd)1 100 2 1690 4872 t +10 R f +( is auto-selected whenever)3 1106(The generic SCSI-2 CD-ROM driver)4 1545 2 1800 4992 t +10 B f +( d)1 0( rd)1 56( or)1 44( re ec co)3 138( dr)1 44(c cd)1 100 6 4493 4992 t +10 R f +(\256nds a pre-)2 483 1 4917 4992 t +( not support writing or a pre-MMC writer that is not supported)11 2688(MMC drive that does)3 912 2 1800 5112 t +(by)1800 5232 w +10 B f +( d)1 0( rd)1 56( or)1 44( re ec co)3 138( dr)1 44(c cd)1 100 6 1933 5232 t +10 R f +(.)2315 5232 w +10 B f +( y)1 0( ny)1 50( on)1 56(s so)1 89 4 1440 5400 t +10 S f +(_ _)1 50 1 1635 5400 t +10 B f +( 92 24 4)3 100( du u9)2 106(c cd)1 100 3 1685 5400 t +10 R f +( CDU-948 is auto-selected whenever)4 1562(The driver for Sony CDU-924 /)5 1367 2 1800 5520 t +10 B f +( d)1 0( rd)1 56( or)1 44( re ec co)3 138( dr)1 44(c cd)1 100 6 4776 5520 t +10 R f +(\256nds)5205 5520 w +(one of the old pre-MMC CD-writers from Sony.)7 1987 1 1800 5640 t +10 B f +( c)1 0( ac)1 44( ea)1 50(t te)1 77 4 1440 5808 t +10 S f +(_ _)1 50 1 1611 5808 t +10 B f +( 50 0)2 50( r5)1 50( dr)1 44(c cd)1 100 4 1661 5808 t +10 R f +( XR-W2010, Pinnacle RCD-5020)3 1400(The driver for Teac CD-R50S, Teac CD-R55S, JVC)7 2200 2 1800 5928 t +( one of the drives is found that is known to use the non-)13 2522(is auto-selected whenever)2 1078 2 1800 6048 t +( that many drives from JVC will)6 1396( Note)1 269(MMC command set used by TEAC and JVC.)7 1935 3 1800 6168 t +( the documented command set and)5 1469(not work because they do not correctly implement)7 2131 2 1800 6288 t +( the Ses-)2 368( is no support for)4 727( There)1 301(JVC has been unwilling to \256x or document the bugs.)9 2204 4 1800 6408 t +(sion At Once write mode yet.)5 1216 1 1800 6528 t +10 B f +( n)1 0( en)1 56( ud de)2 100( yu)1 56(t ty)1 83 5 1440 6696 t +10 S f +(_ _)1 50 1 1735 6696 t +10 B f +( 50 0)2 50( w5)1 50(e ew)1 116 3 1785 6696 t +10 R f +( Yuden EW-50 is auto-selected when)5 1553(The driver for Taiyo)3 853 2 1800 6816 t +10 B f +( d)1 0( rd)1 56( or)1 44( re ec co)3 138( dr)1 44(c cd)1 100 6 4244 6816 t +10 R f +(\256nds a drive with)3 736 1 4664 6816 t +(this speci\256c variant of the Philips CDD-521 command set.)8 2399 1 1800 6936 t +10 B f +( a)1 0( ha)1 50( ah)1 56( ma)1 50(y ya am)2 183 5 1440 7104 t +10 S f +(_ _)1 50 1 1779 7104 t +10 B f +( 10 00 0)3 100( r1)1 50( dr)1 44(c cd)1 100 4 1829 7104 t +10 R f +(The driver for Yamaha CDR-100 / CDR-102 is auto-selected when)9 2771 1 1800 7224 t +10 B f +( d)1 0( rd)1 56( or)1 44( re ec co)3 138( dr)1 44(c cd)1 100 6 4607 7224 t +10 R f +(\256nds one)1 375 1 5025 7224 t +(J)720 7704 w +(. .)1 47 1 759 7649 t +( 6)1 1829( change: Version 3.0)3 850( Last)1 1434(org Schilling)1 528 4 759 7704 t +cleartomark +showpage +restore +%%EndPage: 6 6 %%Page: 7 7 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF 104.275(CDRECORD\(1\) Schily\264s)72 48 R -(USER COMMANDS)2.5 E(CDRECORD\(1\))106.775 E .388 -(number 0 \(radius 0\) is mapped to the center of the disk.)180 84 R -.388(If you kno)5.388 F 2.888(wt)-.25 G .388(he inner and outer)-2.888 F -.764(radius you will be able to create a pre distorted image that later\ - may appear undistorted)180 96 R(on the disk.)180 108 Q/F1 10 -/Times-Bold@0 SF(tattoo\214le=)144 124.8 Q/F2 10/Times-Italic@0 SF(name) -.36 E F0 .992(Use this option together with)180 136.8 R F1(\255checkdri) -3.492 E -.1(ve)-.1 G F0 .992(to write an image prepared for the)3.592 F -F1 -.85(Ya)3.493 G(maha).85 E(DiskT@2)180 148.8 Q F0 .264 -(feature to the medium.)2.764 F .264 -(The \214le must be a \214le with ra)5.264 F 2.763(wi)-.15 G .263 -(mage B&W data \(one)-2.763 F .36(byte per pix)180 160.8 R .36 -(el\) in a size as retrie)-.15 F -.15(ve)-.25 G 2.86(db).15 G 2.861(yap) --2.86 G(re)-2.861 E .361(vious call to)-.25 F F1(tattoo\214le=)2.861 E -F2(name).36 E F0 5.361(.I)2.861 G 2.861(ft)-5.361 G .361(he size of) --2.861 F .959 -(the image equals the maximum possible size \(3744 x 320 pix)180 172.8 R -(el\),)-.15 E F1(cdr)3.458 E(ecord)-.18 E F0 .958(will use the)3.458 F(\ -\214rst part of the \214le. This \214rst part then will be written to t\ -he lefto)180 184.8 Q -.15(ve)-.15 G 2.5(rs).15 G(pace on the CD.)-2.5 E -(Note that the image must be mirrored to be readable from the pick up s\ -ide of the CD.)180 208.8 Q F1(\255checkdri)108 225.6 Q -.1(ve)-.1 G F0 -.26(Checks if a dri)144 237.6 R -.15(ve)-.25 G 2.76(rf).15 G .26 -(or the current dri)-2.76 F .56 -.15(ve i)-.25 H 2.76(sp).15 G .26 -(resent and e)-2.76 F 2.76(xit. If)-.15 F .26(the dri)2.76 F .56 -.15 -(ve i)-.25 H 2.76(sak).15 G(no)-2.76 E .26(wn dri)-.25 F -.15(ve)-.25 G -(,).15 E F1(cdr)2.76 E(ecord)-.18 E F0(uses e)144 249.6 Q(xit code 0.) --.15 E F1(\255pr)108 266.4 Q(cap)-.18 E F0 .783(Print the dri)5.48 F -1.083 -.15(ve c)-.25 H .782(apabilities for SCSI-3/mmc compliant dri).15 -F -.15(ve)-.25 G 3.282(sa).15 G 3.282(so)-3.282 G .782 -(btained from mode page 0x2A.)-3.282 F -1.11(Va)144 278.4 S 1.326 -(lues mark)1.11 F 1.326(ed with)-.1 F F2(kB)3.826 E F0 1.326 -(use 1000 bytes as kilo-byte, v)3.826 F 1.326(alues mark)-.25 F 1.326 -(ed with)-.1 F F2(KB)3.826 E F0 1.327(use 1024 bytes as)3.827 F -(Kilo-byte.)144 290.4 Q F1(\255inq)108 307.2 Q F0 -(Do an inquiry for the dri)16.4 E -.15(ve)-.25 G 2.5(,p).15 G -(rint the inquiry info and e)-2.5 E(xit.)-.15 E F1(\255scanb)108 324 Q -(us)-.2 E F0 .22(Scan all SCSI de)144 336 R .22(vices on all SCSI b)-.25 -F .219(usses and print the inquiry strings. This option may be used to) --.2 F .76(\214nd SCSI address of the CD-Recorder on a system.)144 348 R -.761(The numbers printed out as labels are com-)5.761 F(puted by:)144 -360 Q F1 -.2(bu)2.5 G 2.5(s*1).2 G(00 + tar)-2.5 E(get)-.1 E108 -376.8 Q(eset)-.18 E F0 -.35(Tr)9.94 G 3.197(yt).35 G 3.197(or)-3.197 G -.697(eset the SCSI b)-3.197 F .697 -(us where the CD recorder is located. This w)-.2 F .696 -(orks not on all operating sys-)-.1 F(tems.)144 388.8 Q F1108 -405.6 Q -.1(ve)-.1 G(rb).1 E(ur)-.2 E(n)-.15 E F0(Allo)144 417.6 Q(w) --.25 E F1(cdr)3.633 E(ecord)-.18 E F0 1.133(to write more than the of) -3.633 F 1.133(\214cial size of a medium. This feature is usually called) --.25 F F2 -.1(ov)144 429.6 S(erb).1 E(urning)-.2 E F0 .385 -(and depends on the f)2.885 F .384 -(act that most blank media may hold more space than the of)-.1 F -(\214cial)-.25 E .859(size. As the of)144 441.6 R .859(\214cial size of\ - the lead-out area on the disk is 90 seconds \(6750 sectors\) and a dis\ -k)-.25 F .352(usually w)144 453.6 R .352 -(orks if there are at least 150 sectors of lead out, all media may be o) --.1 F -.15(ve)-.15 G(rb).15 E .351(urned by at least)-.2 F 2.001 -(88 seconds \(6600 sectors\).)144 465.6 R 2.001 -(Most CD recorders only do o)7.001 F -.15(ve)-.15 G(rb).15 E 2.002 -(urning in)-.2 F F1(SA)4.502 E(O)-.45 E F0(or)4.502 E F1(RA)4.502 E(W) --1.3 E F0(mode.)4.502 E(Kno)144 477.6 Q 1.64(wn e)-.25 F 1.639 -(xceptions are TEA)-.15 F 4.139(CC)-.4 G 1.639(D-R50S, TEA)-4.139 F -4.139(CC)-.4 G 1.639(D-R55S and the P)-4.139 F 1.639(anasonic CW)-.15 F -4.139(-7502. Some)-.65 F(dri)144 489.6 Q -.15(ve)-.25 G 3.215(sd).15 G -3.215(on)-3.215 G 1.215 -.25(ow a)-3.215 H(llo).25 E 3.215(wt)-.25 G -3.215(oo)-3.215 G -.15(ve)-3.365 G(rb).15 E .716 -(urn as much as you might lik)-.2 F 3.216(ea)-.1 G .716 -(nd limit the size of a CD to e.g. 76)-3.216 F .813 -(minutes. This problem may be circumv)144 501.6 R .813 -(ented by writing the CD in RA)-.15 F 3.312(Wm)-.9 G .812 -(ode because this w)-3.312 F(ay)-.1 E .988(the dri)144 513.6 R 1.288 --.15(ve h)-.25 H .988 -(as no chance to \214nd the size before starting to b).15 F 3.489 -(urn. There)-.2 F .989(is no guarantee that your)3.489 F(dri)144 525.6 Q -.3 -.15(ve s)-.25 H(upports o).15 E -.15(ve)-.15 G(rb).15 E -(urning at all.)-.2 E(Mak)5 E 2.5(eat)-.1 G(est to check if your dri) --2.5 E .3 -.15(ve i)-.25 H(mplements the feature.).15 E F1(\255ignsize) -108 542.4 Q F0 .012(Ignore the kno)144 554.4 R .012 -(wn size of the medium. This options should be used with e)-.25 F .011 -(xtreme care, it e)-.15 F .011(xists only)-.15 F .95(for deb)144 566.4 R -.95(ugging purposes don')-.2 F 3.45(tu)-.18 G .95 -(se it for other reasons.)-3.45 F .95 -(It is not needed to write disks with more)5.95 F -(than the nominal capacity)144 578.4 Q 5(.T)-.65 G(his option implies)-5 -E F12.5 E -.1(ve)-.1 G(rb).1 E(ur)-.2 E(n)-.15 E F0(.)A F1 -(\255useinf)108 595.2 Q(o)-.25 E F0 .009(Use *.inf \214les to o)144 -607.2 R -.15(ve)-.15 G .009(rwrite audio options.).15 F .009 -(If this option is used, the pre)5.009 F -.05(ga)-.15 G 2.509(ps).05 G -.008(ize information is read)-2.509 F(from the *.inf \214le that is ass\ -ociated with the \214le that contains the audio data for a track.)144 -619.2 Q F1(defpr)108 636 Q(egap=)-.18 E F0(#)A .161(Set the def)144 648 -R .162(ault pre-g)-.1 F .162(ap size for all tracks e)-.05 F .162 -(xcept track number 1.)-.15 F .162(This option currently only mak)5.162 -F(es)-.1 E .532(sense with the TEA)144 660 R 3.032(Cd)-.4 G(ri)-3.032 E -.832 -.15(ve w)-.25 H .531 -(hen creating track-at-once disks without the 2 second silence before) -.15 F(each track.)144 672 Q(This option may go a)144 684 Q -.1(wa)-.15 G -2.5(yi).1 G 2.5(nf)-2.5 G(uture.)-2.5 E F1(\255pack)108 700.8 Q(et)-.1 E -F0(Set)144 712.8 Q F1 -.1(Pa)2.5 G(ck).1 E(et writing mode.)-.1 E F0 -(This is an e)5 E(xperimental interf)-.15 E(ace.)-.1 E(J)72 768 Q -.25 -(..)-5.5 K(or)-4.5 5.5 M 2.5(gS)-.18 G 153.065(chilling V)-2.5 F -(ersion 2.0)-1.11 E(7)206.225 E EP +save +mark +7 pagesetup +10 R f +(Schily)720 480 w +10 S1 f +(\302)976 480 w +10 R f +( \( 1 \))3 164( CDRECORD)1 3277(s USER COMMANDS)2 950 3 1009 480 t +( for the Session At)4 780( is no support)3 572( There)1 300(of the old pre-MMC CD-writers from Yamaha.)6 1948 4 1800 960 t +(Once write mode yet.)3 883 1 1800 1080 t +10 B f +(b bd d)2 112 1 1440 1248 t +10 S f +(_ _)1 50 1 1552 1248 t +10 B f +( l)1 0( ul)1 28( mu)1 56( im)1 83(s si)1 67 5 1602 1248 t +10 R f +( that)1 184(The simulation BluRay driver allows to run timing and speed tests with parameters)12 3416 2 1800 1368 t +(match the behavior of BluRay writers.)5 1571 1 1800 1488 t +10 B f +( r)1 0( dr)1 44(c cd)1 100 3 1440 1656 t +10 S f +(_ _)1 50 1 1584 1656 t +10 B f +( l)1 0( ul)1 28( mu)1 56( im)1 83(s si)1 67 5 1634 1656 t +10 R f +( with parameters that)3 882(The simulation CD-R driver allows to run timing and speed tests)10 2718 2 1800 1776 t +(match the behavior of CD-writers.)4 1404 1 1800 1896 t +10 B f +( d)1 0( vd)1 56(d dv)1 106 3 1440 2064 t +10 S f +(_ _)1 50 1 1602 2064 t +10 B f +( l)1 0( ul)1 28( mu)1 56( im)1 83(s si)1 67 5 1652 2064 t +10 R f +( timing and speed tests with parameters)6 1714(The simulation DVD-R driver allows to run)6 1886 2 1800 2184 t +(that match the behavior of DVD writers.)6 1664 1 1800 2304 t +( special driver entries in the list:)6 1336(There are two)2 569 2 1440 2472 t +10 B f +( r)1 0( dr)1 44(c cd)1 100 3 3412 2472 t +10 S f +(_ _)1 50 1 3556 2472 t +10 B f +( l)1 0( ul)1 28( mu)1 56( im)1 83(s si)1 67 5 3606 2472 t +10 R f +(and)3874 2472 w +10 B f +( d)1 0( vd)1 56(d dv)1 106 3 4052 2472 t +10 S f +(_ _)1 50 1 4214 2472 t +10 B f +( l)1 0( ul)1 28( mu)1 56( im)1 83(s si)1 67 5 4264 2472 t +10 R f +( driver entries)2 572(. These)1 330 2 4498 2472 t +( drives that do not support the)6 1248(are designed to make timing tests at any speed or timing tests for)12 2712 2 1440 2592 t +10 S1 f +(\261 \261)1 65 1 1440 2712 t +10 B f +( y)1 0( mm my)2 133(d du um)2 195 3 1505 2712 t +10 R f +( that)1 195( MB)1 189( simulation drivers implement a drive with a buffer size of 1)11 2625(option. The)1 514 4 1877 2712 t +(can be changed via the)4 960 1 1440 2832 t +10 B f +(C CD DR R)3 216 1 2438 2832 t +10 S f +(_ _)1 50 1 2654 2832 t +10 B f +( L)1 0( UL)1 67( MU)1 72( IM)1 94(S SI)1 95 5 2704 2832 t +10 S f +(_ _)1 50 1 3032 2832 t +10 B f +( ZE E)2 67( IZ)1 67( SI)1 39( FS)1 56( UF)1 61(B BU)1 139 6 3082 2832 t +10 R f +( driver)1 275( simulation)1 461( The)1 226(environment variable.)1 889 4 3549 2832 t +( the)1 170( If)1 147(correctly simulates even a buffer underrun condition.)6 2252 3 1440 2952 t +10 S1 f +(\261 \261)1 65 1 4057 2952 t +10 B f +( y)1 0( mm my)2 133(d du um)2 195 3 4122 2952 t +10 R f +(option is present, the)3 902 1 4498 2952 t +(simulation is not aborted in case of a buffer underrun.)9 2218 1 1440 3072 t +10 B f +( =)1 0( s=)1 57( ts)1 39( pt)1 33( op)1 56( er ro)2 94( ve)1 44( iv)1 50( ri)1 28(d dr)1 100 10 1080 3240 t +10 I f +(option list)1 412 1 1581 3240 t +10 R f +( get a list of)4 512( To)1 178(Set driver speci\256c options. The options are speci\256ed as a comma separated list.)12 3270 3 1440 3360 t +(valid options use)2 732 1 1440 3480 t +10 B f +( =)1 0( s=)1 57( ts)1 39( pt)1 33( op)1 56( er ro)2 94( ve)1 44( iv)1 50( ri)1 28(d dr)1 100 10 2224 3480 t +10 I f +(help)2725 3480 w +10 R f +(together with the)2 729 1 2949 3480 t +10 S1 f +(\261)3729 3480 w +10 I f +(checkdrive)3794 3480 w +10 R f +( you like to set)4 693(option. If)1 431 2 4276 3480 t +(driver options without running a typical)5 1656 1 1440 3600 t +10 B f +( d)1 0( rd)1 56( or)1 44( re ec co)3 138( dr)1 44(c cd)1 100 6 3134 3600 t +10 R f +(task, you need to use the)5 1052 1 3555 3600 t +10 S1 f +(\261 \261)1 65 1 4646 3600 t +10 B f +( s)1 0( ts)1 39( pt)1 33( op)1 56( ro)1 50( dr)1 44( td)1 56( et)1 33(s se)1 83 9 4711 3600 t +10 R f +(option)5144 3600 w +( the command line parser in)5 1212(in addition, otherwise)2 911 2 1440 3720 t +10 B f +( d)1 0( rd)1 56( or)1 44( re ec co)3 138( dr)1 44(c cd)1 100 6 3608 3720 t +10 R f +( imple-)1 306( Currently)1 461(will complain.)1 598 3 4035 3720 t +(mented driver options are:)3 1075 1 1440 3840 t +10 B f +( re ee e)3 88( fr)1 44( nf)1 33( rn)1 56(b bu ur)2 156 5 1440 4008 t +10 R f +( drives that)2 466( only works for)3 643( This)1 246(Turn the support for Buffer Underrun Free writing on.)8 2245 4 1800 4128 t +( may be called:)3 649( This)1 251(support Buffer Underrun Free technology.)4 1748 3 1800 4248 t +10 B f +( f)1 0( oo of)2 83( ro)1 50( Pr)1 44( -P)1 61( UR RN N-)3 177( BU)1 72( B)1 106( yo o)2 50( ny)1 50( an)1 56(S Sa)1 106 12 4520 4248 t +10 R f +(,)5375 4248 w +10 B f +( nk k)2 56( in)1 56( Li)1 28( t- -L)2 100( st)1 33( us)1 39( Ju)1 56( J)1 83( h)1 0( oh)1 56( co)1 50( ic)1 44(R Ri)1 100 13 1800 4368 t +10 R f +(,)2501 4368 w +10 B f +( nk k)2 56( in)1 56( Li)1 28( -L)1 67( ss s-)2 72( es)1 39( le)1 44( ss sl)2 67( os)1 39( Lo)1 50( L)1 100( a)1 0( ha)1 50( ah)1 56( ma)1 50( am)1 83(Y Ya)1 122 17 2559 4368 t +10 R f +(or similar.)1 419 1 3571 4368 t +(The default is to turn)4 870 1 1800 4608 t +10 B f +( re ee e)3 88( Fr)1 44( -F)1 61( UR RN N-)3 177(B BU)1 139 5 2703 4608 t +10 R f +(off, regardless of the defaults of the drive.)7 1732 1 3245 4608 t +10 B f +( re ee e)3 88( fr)1 44( nf)1 33( rn)1 56( bu ur)2 100( ob)1 56(n no)1 106 7 1440 4776 t +10 R f +(Turn the support for Buffer Underrun Free writing off.)8 2245 1 1800 4896 t +10 B f +( =)1 0( re ec c=)3 145( ir)1 44( ri)1 28(v va ar)2 144 5 1440 5064 t +10 I f +(value)1801 5064 w +10 R f +( the)1 172(Turn on)1 343 2 1800 5184 t +10 B f +( ec c)2 44( Re)1 44( iR)1 72( ri)1 28( ar)1 44( Va)1 50( V)1 122( r)1 0( or)1 44( to)1 50( xt)1 33( ex)1 50( le)1 44(P Pl)1 89 14 2365 5184 t +10 R f +(writing mode. The mandatory parameter)4 1716 1 3129 5184 t +10 I f +(value)4895 5184 w +10 R f +(is the)1 239 1 5161 5184 t +( and currently may be selected from)6 1555(laser power offset)2 756 2 1800 5304 t +10 S1 f +(\261)4156 5304 w +10 R f +(2,)4221 5304 w +10 S1 f +(\261)4341 5304 w +10 R f +( addition,)1 398( In)1 161(1, 0, 1, 2.)3 435 3 4406 5304 t +(you need to set the write speed to 4 in order to allow)12 2193 1 1800 5424 t +10 B f +( ec c)2 44( Re)1 44( iR)1 72( ri)1 28( ar)1 44(V Va)1 122 6 4026 5424 t +10 R f +(to work.)1 341 1 4413 5424 t +10 B f +( =)1 0( re ec c=)3 145( ga ar)2 94( ig)1 50(g gi)1 78 5 1440 5592 t +10 I f +(value)1807 5592 w +10 R f +(Manage the)1 493 1 1800 5712 t +10 B f +( ec c)2 44( Re)1 44( ga aR)2 122( ig)1 50( Gi)1 28( G)1 129( r)1 0( or)1 44( to)1 50( xt)1 33( ex)1 50( le)1 44(P Pl)1 89 13 2344 5712 t +10 R f +(writing mode. The mandatory parameter)4 1720 1 3122 5712 t +10 I f +(value)4893 5712 w +10 R f +(is the)1 240 1 5160 5712 t +( recording and currently may be selected from)7 1954(disk capacity ratio compared to normal)5 1646 2 1800 5832 t +( values)1 299( If)1 143(0.6, 0.7, 0.8, 0.9, 1.0, 1,1, 1.2, 1.3, 1.4.)8 1702 3 1800 5952 t +10 S1 f +(<)3988 5952 w +10 R f +(1.0 are used, then the effect is)6 1311 1 4089 5952 t +(similar to the)2 550 1 1800 6072 t +10 B f +( .)1 0( R.)1 25( R)1 108( .)1 0( Q.)1 25( Q)1 114( er r)2 44( te)1 44( st)1 33( as)1 39( Ma)1 50( M)1 130( o)1 0( io)1 50( ud di)2 84( Au)1 56( A)1 108( a)1 0( ha)1 50( ah)1 56( ma)1 50( am)1 83(Y Ya)1 122 23 2386 6072 t +10 R f +( values)1 290(feature. If)1 403 2 3693 6072 t +10 S1 f +(>)4421 6072 w +10 R f +(1.0 are used, then the)4 888 1 4512 6072 t +(disk capacity is increased.)3 1066 1 1800 6192 t +(Not all drives support all)4 1070 1 1800 6432 t +10 B f +( ec c)2 44( Re)1 44( ga aR)2 122( ig)1 50(G Gi)1 106 5 2914 6432 t +10 R f +( a drive uses the)4 723(values. When)1 596 2 3324 6432 t +10 B f +( ec c)2 44( Re)1 44( ga aR)2 122( ig)1 50(G Gi)1 106 5 4688 6432 t +10 R f +(feature,)5099 6432 w +(the write speed is limited to 8x.)6 1306 1 1800 6552 t +10 B f +( er r)2 44( te)1 44( st)1 33( as)1 39( ma)1 50( om)1 83( io)1 50( ud di)2 84(a au)1 106 9 1440 6720 t +10 R f +( the)1 158(Turn on)1 329 2 1800 6840 t +10 B f +( .)1 0( R.)1 25( R)1 108( .)1 0( Q.)1 25( Q)1 114( er r)2 44( te)1 44( st)1 33( as)1 39( Ma)1 50( M)1 130( o)1 0( io)1 50( ud di)2 84( Au)1 56( A)1 108( a)1 0( ha)1 50( ah)1 56( ma)1 50( am)1 83(Y Ya)1 122 23 2323 6840 t +10 R f +(feature which usually should result in high)6 1770 1 3630 6840 t +( this is implemented)3 848( As)1 182( problems in Hi-Fi players.)4 1132(quality CDs that have less reading)5 1438 4 1800 6960 t +( write mode, it will only work if you select SAO)10 2095(as a variant of the Session At Once)7 1505 2 1800 7080 t +( The)1 232(write mode and there is no need to turn it off.)10 2001 2 1800 7200 t +10 B f +( er r)2 44( te)1 44( st)1 33( as)1 39( Ma)1 50( M)1 138( o)1 0( io)1 50( ud di)2 84(A Au)1 128 10 4077 7200 t +10 R f +(mode will work)2 669 1 4731 7200 t +(J)720 7680 w +(. .)1 47 1 759 7625 t +( 7)1 1829( change: Version 3.0)3 850( Last)1 1434(org Schilling)1 528 4 759 7680 t +cleartomark +showpage +restore +%%EndPage: 7 7 %%Page: 8 8 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF 104.275(CDRECORD\(1\) Schily\264s)72 48 R -(USER COMMANDS)2.5 E(CDRECORD\(1\))106.775 E/F1 10/Times-Bold@0 SF -(pktsize=)108 84 Q F0(#)A(Set the pack)144 96 Q -(et size to #, forces \214x)-.1 E(ed pack)-.15 E(et mode.)-.1 E -(This is an e)5 E(xperimental interf)-.15 E(ace.)-.1 E F1(\255noclose) -108 112.8 Q F0 .481 -(Do not close the current track, useful only when in pack)144 124.8 R -.481(et writing mode.)-.1 F .482(This is an e)5.482 F(xperimental)-.15 E -(interf)144 136.8 Q(ace.)-.1 E F1(mcn=)108 153.6 Q/F2 10/Times-Italic@0 -SF(med_cat_nr).38 E F0(Set the)144 165.6 Q F1(Media Catalog Number)2.5 E -F0(of the CD to)2.5 E F2(med_cat_nr)2.5 E F0(.).73 E F1(\255text)108 -182.4 Q F0 .314(Write CD-T)14.2 F -.15(ex)-.7 G 2.814(tc).15 G .314 -(reated by)-2.814 F F1(cdr)2.814 E(ecord)-.18 E F0 .314 -(and based on information tak)2.814 F .314 -(en from a \214le that contains ascii)-.1 F .123(information for the te) -144 194.4 R .124(xt strings. Currently only the format in the)-.15 F F1 -(*.inf)2.624 E F0 .124(\214les created by)2.624 F F1(cdda2wa)2.624 E(v) --.25 E F0(is)2.624 E .47(supported. Y)144 206.4 R .47 -(ou need to use the)-1.1 F F1(\255useinf)2.97 E(o)-.25 E F0 .469 -(option in addition in order to tell)2.97 F F1(cdr)2.969 E(ecord)-.18 E -F0 .469(to read these)2.969 F .517(\214les. If you lik)144 218.4 R 3.017 -(et)-.1 G 3.018(ow)-3.017 G .518(rite your o)-3.018 F .518(wn CD-T)-.25 -F -.15(ex)-.7 G 3.018(ti).15 G .518(nformation, edit the)-3.018 F F1 -(*.inf)3.018 E F0 .518(\214les with a te)3.018 F .518(xt editor and)-.15 -F(change the \214eld that are rele)144 230.4 Q -.25(va)-.25 G -(nt for CD-T).25 E -.15(ex)-.7 G(t.).15 E F1(text\214le=)108 247.2 Q F0 -(\214lename)A 1.67(Write CD-T)144 259.2 R -.15(ex)-.7 G 4.17(tb).15 G -1.669(ased on information found in the binary \214le)-4.17 F F2 -(\214lename)4.169 E F0 6.669(.T).18 G 1.669(his \214le must contain) --6.669 F 1.089(information in a data format de\214ned in the SCSI-3 MMC\ --2 standard and in the Red Book. The)144 271.2 R .109(four byte size he\ -ader that is de\214ned in the SCSI standard is optional and allo)144 -283.2 R .109(ws to mak)-.25 F 2.608(et)-.1 G .108(he recog-)-2.608 F -1.244(nition of correct data less ambiguous.)144 295.2 R 1.244 -(This is the best option to be used to cop)6.244 F 3.745(yC)-.1 G(D-T) --3.745 E -.15(ex)-.7 G 3.745(td).15 G(ata)-3.745 E .162(from e)144 307.2 -R .162(xisting CDs that already carry CD-T)-.15 F -.15(ex)-.7 G 2.661 -(ti).15 G .161(nformation. T)-2.661 F 2.661(og)-.8 G .161 -(et data in a format suitable for this)-2.661 F(option use)144 319.2 Q -F1(cdr)2.5 E(ecord \255vv \255toc)-.18 E F0(to e)2.5 E -(xtract the information from disk.)-.15 E/F3 10.95/Times-Bold@0 SF(TRA) -72 348 Q(CK OPTIONS)-.602 E F0 -.35(Tr)108 360 S(ack options may be mix) -.35 E(ed with track \214le names.)-.15 E F1(isr)108 376.8 Q(c=)-.18 E F2 -(ISRC_number).58 E F0(Set the)144 388.8 Q F1(Inter)2.5 E -(national Standard Recording Number)-.15 E F0(for the ne)2.5 E -(xt track to)-.15 E F2(ISRC_number)2.5 E F0(.).73 E F1(index=)108 405.6 -Q F2(list).09 E F0 1(Sets an inde)144 417.6 R 3.5(xl)-.15 G 1 -(ist for the ne)-3.5 F 1(xt track.)-.15 F 1(In inde)6 F 3.5(xl)-.15 G 1 -(ist is a comma separated list of numbers that are)-3.5 F .325 -(counting from inde)144 429.6 R 2.825(x1)-.15 G 2.825(.T)-2.825 G .325 -(he \214rst entry in this list must contain a 0, the follo)-2.825 F .325 -(wing numbers must be)-.25 F .5(an ascending list of numbers \(counting\ - in 1/75 seconds\) that represent the start of the indices. An)144 441.6 -R(inde)144 453.6 Q 2.578(xl)-.15 G .078 -(ist in the form: 0,7500,15000 sets inde)-2.578 F 2.578(x1t)-.15 G 2.578 -(ot)-2.578 G .078(he start of the track, inde)-2.578 F 2.578(x21)-.15 G -.077(00 seconds from)-2.578 F(the start of the track and inde)144 465.6 -Q 2.5(x32)-.15 G(00 seconds from the start of the track.)-2.5 E F1 -(\255audio)108 482.4 Q F0 .225 -(If this \215ag is present, all subsequent tracks are written in)6.4 F -F1(CD-D)2.725 E(A)-.35 E F0 .226(\(similar to Red Book\) audio for)2.725 -F(-)-.2 E 2.929(mat. The)144 494.4 R .429(\214le with data for this tra\ -cks should contain stereo, 16-bit digital audio with 44100 sam-)2.929 F -3.132(ples/s. The)144 506.4 R .632(byte order should be the follo)3.132 -F .633(wing: MSB left, LSB left, MSB right, LSB right, MSB)-.25 F .885(\ -left and so on. The track should be a multiple of 2352 bytes. It is not\ - possible to put the master)144 518.4 R .575 -(image of an audio track on a ra)144 530.4 R 3.076(wd)-.15 G .576 -(isk because data will be read in multiple of 2352 bytes during)-3.076 F -(the recording process.)144 542.4 Q .168(If a \214lename ends in)144 -566.4 R F2(.au)2.668 E F0(or)2.668 E F2(.wav)2.668 E F0 .168 -(the \214le is considered to be a structured audio data \214le.)2.668 F -F1(Cdr)5.167 E(ecord)-.18 E F0 .145(assumes that the \214le in this cas\ -e is a Sun audio \214le or a Microsoft .W)144 578.4 R 2.846 -1.35 -(AV \214)-1.2 H .146(le and e)1.35 F .146(xtracts the audio)-.15 F .166 -(data from the \214les by skipping o)144 590.4 R -.15(ve)-.15 G 2.666 -(rt).15 G .166(he non-audio header information.)-2.666 F .166 -(In all other cases, cdrecord)5.166 F .6(will only w)144 602.4 R .601 -(ork correctly if the audio data stream does not ha)-.1 F .901 -.15 -(ve a)-.2 H .901 -.15(ny h).15 H(eader).15 E 5.601(.B)-.55 G .601 -(ecause man)-5.601 F 3.101(ys)-.15 G(truc-)-3.101 E .009 -(tured audio \214les do not ha)144 614.4 R .309 -.15(ve a)-.2 H 2.509 -(ni).15 G(nte)-2.509 E .009 -(gral number of blocks \(1/75th second\) in length, it is often nec-) --.15 F .671(essary to specify the)144 626.4 R F1(\255pad)3.171 E F0 .672 -(option as well.)3.172 F F1(cdr)5.672 E(ecord)-.18 E F0 .672 -(recognizes that audio data in a .W)3.172 F 3.372 -1.35(AV \214)-1.2 H -.672(le is)1.35 F 2.036(stored in Intel \(little-endian\) byte order)144 -638.4 R 4.536(,a)-.4 G 2.036(nd will automatically byte-sw)-4.536 F -2.035(ap the data if the CD)-.1 F .112 -(recorder requires big-endian data.)144 650.4 R F1(Cdr)5.112 E(ecord) --.18 E F0 .113(will reject an)2.612 F 2.613(ya)-.15 G .113 -(udio \214le that does not match the Red)-2.613 F(Book requirements of \ -16-bit stereo samples in PCM coding at 44100 samples/second.)144 662.4 Q -.049(Using other structured audio data formats as input to)144 686.4 R -F1(cdr)2.549 E(ecord)-.18 E F0 .049(will usually w)2.549 F .048 -(ork if the structure of)-.1 F .353 -(the data is the structure described abo)144 698.4 R .654 -.15(ve \() --.15 H(ra).15 E 2.854(wp)-.15 G .354 -(cm data in big-endian byte order\).)-2.854 F(Ho)5.354 E(we)-.25 E -.15 -(ve)-.25 G 1.154 -.4(r, i).15 H 2.854(ft).4 G(he)-2.854 E -(data format includes a header)144 710.4 Q 2.5(,y)-.4 G -(ou will hear a click at the start of a track.)-2.5 E(J)72 768 Q -.25 -(..)-5.5 K(or)-4.5 5.5 M 2.5(gS)-.18 G 153.065(chilling V)-2.5 F -(ersion 2.0)-1.11 E(8)206.225 E EP +save +mark +8 pagesetup +10 R f +(Schily)720 480 w +10 S1 f +(\302)976 480 w +10 R f +( \( 1 \))3 164( CDRECORD)1 3277(s USER COMMANDS)2 950 3 1009 480 t +(with a limited speed but may also be used with data CDs. In)12 2521 1 1800 960 t +10 B f +( er r)2 44( te)1 44( st)1 33( as)1 39( Ma)1 50( M)1 130( o)1 0( io)1 50( ud di)2 84(A Au)1 128 10 4357 960 t +10 R f +(mode, the)1 405 1 4995 960 t +( will be written larger than usual so the capacity of the medium is)13 2941(pits on the CD)3 659 2 1800 1080 t +( capacity of 63)3 617( 74-minute CD will only have a)6 1314( A)1 138(reduced when turning this feature on.)5 1531 4 1800 1200 t +(minutes if)1 413 1 1800 1320 t +10 B f +( er r)2 44( te)1 44( st)1 33( as)1 39( Ma)1 50( M)1 128( o)1 0( io)1 50( ud di)2 84(A Au)1 128 10 2247 1320 t +10 R f +(is active and the capacity of a 80-minute CD will be reduced)11 2519 1 2881 1320 t +( On)1 202( the original capacity.)3 931(to 68 minutes, the capacity in will be reduced to 85% of)11 2467 3 1800 1440 t +( but the capacity will be reduced to)7 1540(newer Plextor drives, this feature is also present)7 2060 2 1800 1560 t +( the)1 168(86.66% of the original capacity. For other factors on Plextor drives, see)11 3076 2 1800 1680 t +10 B f +( re ec c)3 88( ga ar)2 94( ig)1 50(g gi)1 78 4 5090 1680 t +10 R f +(option above.)1 552 1 1800 1800 t +10 B f +( d)1 0( ee ed)2 100( pe)1 44( sp)1 56( rc ce es)3 127( or)1 44(f fo)1 83 7 1440 1968 t +10 R f +( different media and may)4 1051(Normally, modern drives know the highest possible speed for)8 2549 2 1800 2088 t +( called:)1 305( technology may be)3 830( This)1 251(reduce the speed in order to grant best write quality.)9 2214 4 1800 2208 t +10 B f +( ec c)2 44( Re)1 44( er rR)2 116( we)1 44( ow)1 72( Po)1 50( P)1 104( r)1 0( or)1 44( to)1 50( xt)1 33( ex)1 50( le)1 44(P Pl)1 89 14 1800 2328 t +10 R f +(,)2584 2328 w +10 B f +( d)1 0( ee ed)2 100( Sp pe)2 100( t- -S)2 89( st)1 33( us)1 39( Ju)1 56( J)1 93( h)1 0( oh)1 56( co)1 50( ic)1 44(R Ri)1 100 13 2652 2328 t +10 R f +(,)3412 2328 w +10 B f +( l)1 0( ol)1 28( ro)1 50( tr)1 44( nt)1 33( on)1 56( Co)1 50( C)1 116( d)1 0( ee ed)2 100( Sp pe)2 100( S)1 100( e)1 0( te)1 44( it)1 33( ri)1 28( Wr)1 44( W)1 144( m)1 0( um)1 83( mu)1 56( im)1 83( ti)1 28( pt)1 33( Op)1 56( O)1 122( a)1 0( ha)1 50( ah)1 56( ma)1 50( am)1 83(Y Ya)1 122 32 3481 2328 t +10 R f +(or)5317 2328 w +( allow to force the drive to use)7 1294( drives \(e.g. Plextor, Ricoh and Yamaha\))6 1705(similar. Some)1 601 3 1800 2448 t +(the selected speed even if the medium is so bad that the write quality would be poor.)16 3600 1 1800 2568 t +(This option tells such a drive to force to use the selected speed regardless of the)15 3600 1 1800 2688 t +(medium quality.)1 664 1 1800 2808 t +( extreme care and note that the drive should know better which)11 2734(Use this option with)3 866 2 1800 3048 t +( is to turn)3 432( default)1 320( The)1 231(medium will work at full speed.)5 1367 4 1800 3168 t +10 B f +( d)1 0( ee ed)2 100( pe)1 44( sp)1 56( rc ce es)3 127( or)1 44(f fo)1 83 7 4192 3168 t +10 R f +(off, regardless of)2 712 1 4688 3168 t +(the defaults of the drive.)4 1005 1 1800 3288 t +10 B f +( d)1 0( ee ed)2 100( pe)1 44( sp)1 56( rc ce es)3 127( or)1 44( fo)1 50( of)1 33(n no)1 106 9 1440 3456 t +10 R f +(Turn off the)2 498 1 1800 3576 t +10 B f +( d)1 0( ee ed)2 100( pe)1 44( sp)1 56( s)1 72( rc ce e)3 88( or)1 44(f fo)1 83 8 2331 3576 t +10 R f +(feature.)2851 3576 w +10 B f +( d)1 0( ad)1 56( re ea)2 94( dr)1 44( ee ed)2 100( pe)1 44(s sp)1 95 7 1440 3744 t +10 R f +( 48x and faster drives from Plextor limit the read)9 2058(Some ultra high speed drives such as)6 1542 2 1800 3864 t +( media to e.g. 40x in order to avoid damaged disks and drives.)12 2783(speed for unknown)2 817 2 1800 3984 t +( very careful)2 525( Be)1 180( any media as fast as possible.)6 1267(Using this option tells the drive to read)7 1628 4 1800 4104 t +( to break in the drive while reading, resulting in damaged)10 2418(as this may cause the media)5 1182 2 1800 4224 t +(media and drive!)2 692 1 1800 4344 t +10 B f +( d)1 0( ad)1 56( re ea)2 94( dr)1 44( ee ed)2 100( pe)1 44( sp)1 56( os)1 39(n no)1 106 9 1440 4512 t +10 R f +(Turn off unlimited read speed.)4 1249 1 1800 4632 t +10 B f +( n)1 0( on)1 56( io)1 50( ss si)2 67( es)1 39( se)1 44( es)1 39( le)1 44( gl)1 28( ng)1 50( in)1 56(s si)1 67 12 1440 4800 t +10 R f +( allows to read defective or non-)6 1381( This)1 251( into a single-session only drive.)5 1369(Turn the drive)2 599 4 1800 4920 t +( media with extremely non-standard additional \(broken/illegal\) TOC)7 2843(compliant \(illegal\))1 757 2 1800 5040 t +( the TOC from the second or higher session. Some of these disks become)13 3210(entries in)1 390 2 1800 5160 t +( need to enable Sin-)4 845( You)1 243( is used.)2 351(usable if only the information from the \256rst session)8 2161 4 1800 5280 t +(gle Session mode before you insert the defective disk!)8 2227 1 1800 5400 t +10 B f +( n)1 0( on)1 56( io)1 50( ss si)2 67( es)1 39( se)1 44( es)1 39( le)1 44( gl)1 28( ng)1 50( in)1 56( si)1 28( os)1 39(n no)1 106 14 1440 5568 t +10 R f +(Turn off single-session mode. The drive will again behave as usual.)10 2781 1 1800 5688 t +10 B f +( r)1 0( dr)1 44( ec cd)2 100( de)1 44( id)1 56(h hi)1 84 6 1440 5856 t +10 R f +( allows to make CD-)4 871( This)1 247(Hide the fact that a medium might be a recordable medium.)10 2482 3 1800 5856 t +( the media in the drive is not a)8 1354(Rs look like CD-ROMs and applications believe that)7 2246 2 1800 5976 t +(CD-R.)1800 6096 w +10 B f +( r)1 0( dr)1 44( ec cd)2 100( de)1 44( id)1 56( hi)1 28( oh)1 56(n no)1 106 8 1440 6264 t +10 R f +(Turn off hiding CD-R media.)4 1206 1 1800 6384 t +10 B f +( o)1 0( fo)1 50( nf)1 33( in)1 56( oo oi)2 78( tt to)2 83( at)1 33(t ta)1 83 8 1440 6552 t +10 R f +(Use this option together with)4 1233 1 1800 6672 t +10 S1 f +(\261 \261)1 65 1 3076 6672 t +10 B f +( e)1 0( ve)1 44( iv)1 50( ri)1 28( kd dr)2 100( ec ck)2 100( he)1 44(c ch)1 100 8 3141 6672 t +10 R f +( for)1 160(to retrieve the image size information)5 1590 2 3650 6672 t +(the)1800 6792 w +10 B f +( T)1 0( kT)1 67( sk)1 56( is)1 39( Di)1 28( D)1 112( a)1 0( ha)1 50( ah)1 56( ma)1 50( am)1 83(Y Ya)1 122 12 1962 6792 t +10 S1 f +(@ @)1 92 1 2625 6792 t +10 B f +(2 2)1 50 1 2717 6792 t +10 R f +( 3744 pixels.)2 542(feature. The images always have a line length of)8 2051 2 2807 6792 t +( inner)1 246( you know the)3 614( If)1 139(Line number 0 \(radius 0\) is mapped to the center of the disk.)12 2601 4 1800 6912 t +( you will be able to create a pre distorted image that later may appear)14 2984(and outer radii)2 616 2 1800 7032 t +(undistorted on the disk.)3 963 1 1800 7152 t +(J)720 7680 w +(. .)1 47 1 759 7625 t +( 8)1 1829( change: Version 3.0)3 850( Last)1 1434(org Schilling)1 528 4 759 7680 t +cleartomark +showpage +restore +%%EndPage: 8 8 %%Page: 9 9 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF 104.275(CDRECORD\(1\) Schily\264s)72 48 R -(USER COMMANDS)2.5 E(CDRECORD\(1\))106.775 E 1.195(If neither)144 84 R -/F1 10/Times-Italic@0 SF(\255data)3.695 E F0(nor)3.695 E F1(\255audio) -3.695 E F0(ha)3.694 E 1.494 -.15(ve b)-.2 H 1.194(een speci\214ed,).15 F -/F2 10/Times-Bold@0 SF(cdr)3.694 E(ecord)-.18 E F0(def)3.694 E 1.194 -(aults to)-.1 F F1(\255audio)3.694 E F0 1.194(for all \214lenames)3.694 -F(that end in)144 96 Q F1(.au)2.5 E F0(or)2.5 E F1(.wav)2.5 E F0(and to) -2.5 E F1(\255data)2.5 E F0(for all other \214les.)2.5 E F2(\255swab)108 -112.8 Q F0 1.373 -(If this \215ag is present, audio data is assumed to be in byte-sw)8.63 -F 1.373(apped \(little-endian\) order)-.1 F 6.373(.S)-.55 G(ome)-6.373 E -.562(types of CD-Writers e.g. Y)144 124.8 R .562(amaha, Son)-1 F 3.061 -(ya)-.15 G .561(nd the ne)-3.061 F 3.061(wS)-.25 G .561(CSI-3/mmc dri) --3.061 F -.15(ve)-.25 G 3.061(sr).15 G .561(equire audio data to be) --3.061 F .765(presented in little-endian order)144 136.8 R 3.265(,w)-.4 -G .765 -(hile other writers require audio data to be presented in the big-) --3.265 F 1.86(endian \(netw)144 148.8 R 1.859 -(ork\) byte order normally used by the SCSI protocol.)-.1 F F2(Cdr)6.859 -E(ecord)-.18 E F0(kno)4.359 E 1.859(ws if a CD-)-.25 F 1.257 -(Recorder needs audio data in big- or little-endian order)144 160.8 R -3.757(,a)-.4 G 1.257(nd corrects the byte order of the data)-3.757 F -.358(stream to match the needs of the recorder)144 172.8 R 5.358(.Y)-.55 -G .358(ou only need the)-6.458 F F1(\255swab)2.858 E F0 .358 -(\215ag if your data stream is in)2.858 F -(Intel \(little-endian\) byte order)144 184.8 Q(.)-.55 E .222 -(Note that the v)144 208.8 R .222(erbose output of)-.15 F F2(cdr)2.722 E -(ecord)-.18 E F0 .222(will sho)2.722 F 2.722(wy)-.25 G .222(ou if sw) --2.722 F .223(apping is necessary to mak)-.1 F 2.723(et)-.1 G .223 -(he byte)-2.723 F .577 -(order of the input data \214t the required byte order of the recorder) -144 220.8 R(.)-.55 E F2(Cdr)5.577 E(ecord)-.18 E F0 .577(will not sho) -3.077 F 3.077(wy)-.25 G .577(ou if)-3.077 F(the)144 232.8 Q F1(\255swab) -2.5 E F0(\215ag w)2.5 E(as actually present for a track.)-.1 E F2 -(\255data)108 249.6 Q F0 .853 -(If this \215ag is present, all subsequent tracks are written in)11.41 F -F2(CD-R)3.353 E .853(OM mode 1)-.3 F F0(\(Y)3.353 E(ello)-1 E 3.354(wB) --.25 G .854(ook\) for)-3.354 F(-)-.2 E .289 -(mat. The data is a multiple of 2048 bytes.)144 261.6 R .289 -(The \214le with track data should contain an)5.289 F F2(ISO-9660)2.788 -E F0(or)2.788 E F2 .36(Rock Ridge)144 273.6 R F0 .36 -(\214lesystem image \(see)2.86 F F2(mkisofs)2.86 E F0 .361 -(for more details\). If the track data is an)2.86 F F2(ufs)2.861 E F0 -(\214lesystem)2.861 E .126 -(image, fragment size should be set to 2 KB or more to allo)144 285.6 R -2.626(wC)-.25 G(R-dri)-2.626 E -.15(ve)-.25 G 2.626(sw).15 G .126 -(ith 2 KB sector size to to)-2.626 F(be used for reading.)144 297.6 Q -(\255data is the def)144 314.4 Q(ault, if no other \215ag is present.) --.1 E 1.194(If neither)144 331.2 R F1(\255data)3.694 E F0(nor)3.694 E F1 -(\255audio)3.694 E F0(ha)3.694 E 1.494 -.15(ve b)-.2 H 1.194 -(een speci\214ed,).15 F F2(cdr)3.694 E(ecord)-.18 E F0(def)3.694 E 1.194 -(aults to)-.1 F F1(\255audio)3.695 E F0 1.195(for all \214lenames)3.695 -F(that end in)144 343.2 Q F1(.au)2.5 E F0(or)2.5 E F1(.wav)2.5 E F0 -(and to)2.5 E F1(\255data)2.5 E F0(for all other \214les.)2.5 E F2 -(\255mode2)108 360 Q F0 .416 -(If this \215ag is present, all subsequent tracks are written in)144 372 -R F2(CD-R)2.915 E .415(OM mode 2)-.3 F F0 .415(format. The data is a) -2.915 F(multiple of 2048 bytes.)144 384 Q F2(\255xa1)108 400.8 Q F0 .391 -(If this \215ag is present, all subsequent tracks are written in)15.3 F -F2(CD-R)2.891 E .391(OM XA mode 1)-.3 F F0 .392(format. The data)2.892 F -(is a multiple of 2048 bytes.)144 412.8 Q F2(\255xa2)108 429.6 Q F0 .391 -(If this \215ag is present, all subsequent tracks are written in)15.3 F -F2(CD-R)2.891 E .391(OM XA mode 2)-.3 F F0 .391(format. The data)2.891 F -(is a multiple of 2048 bytes.)144 441.6 Q F2(\255cdi)108 458.4 Q F0 .984 -(If this \215ag is present, all subsequent tracks are written in)17.52 F -F2(CDI)3.485 E F0 .985(format. The data is a multiple of)3.485 F -(2048 bytes.)144 470.4 Q F2(\255isosize)108 487.2 Q F0 .346(Use the)144 -499.2 R F2(ISO-9660)2.846 E F0 .346 -(\214le system size as the size of the ne)2.846 F .346(xt track.)-.15 F -.345(This option is needed if you w)5.346 F(ant)-.1 E F2(cdr)144 511.2 Q -(ecord)-.18 E F0 .151(to directly read the image of a track from a ra) -2.651 F 2.651(wd)-.15 G .151(isk partition or from a)-2.651 F F1 -1.9 --.5(TA O)2.651 H F0 .152(master CD.)3.151 F 1.114 -(In the \214rst case the option)144 523.2 R F2(\255isosize)3.614 E F0 -1.114(is needed to limit the size of the CD to the size of the ISO)3.614 -F 2.804(\214lesystem. In)144 535.2 R .304(the second case the option) -2.804 F F2(\255isosize)2.804 E F0 .304(is needed to pre)2.804 F -.15(ve) --.25 G(nt).15 E F2(cdr)2.804 E(ecord)-.18 E F0 .304(from reading the) -2.804 F(tw)144 547.2 Q 3.165(or)-.1 G .665(un out blocks that are appen\ -ded by each CD-recorder in track at once mode. These tw)-3.165 F 3.164 -(or)-.1 G(un)-3.164 E .661(out blocks cannot be read and w)144 559.2 R -.661(ould cause a b)-.1 F(uf)-.2 E .661(fer under run that w)-.25 F .662 -(ould cause a defecti)-.1 F .962 -.15(ve c)-.25 H(op).15 E -.65(y.)-.1 G -.409(Do not use this option on \214les created by)144 571.2 R F2 -(mkisofs)2.909 E F0 .409(and in case)2.909 F F2(cdr)2.909 E(ecord)-.18 E -F0 .409(reads the track data from)2.909 F F1(stdin)144 583.2 Q F0 5.526 -(.I).24 G 3.026(nt)-5.526 G .527(he \214rst case, you w)-3.026 F .527 -(ould pre)-.1 F -.15(ve)-.25 G(nt).15 E F2(cdr)3.027 E(ecord)-.18 E F0 -.527(from writing the amount of padding that has)3.027 F -(been appended by)144 595.2 Q F2(mkisofs)2.5 E F0 -(and in the latter case, it will not w)2.5 E(ork because)-.1 E F1(stdin) -2.5 E F0(is not seekable.)2.5 E(If)144 619.2 Q F2(\255isosize)3.84 E F0 -1.34(is used for a track,)3.84 F F2(cdr)3.84 E(ecord)-.18 E F0 1.339 -(will automatically add padding for this track as if the)3.839 F F2 -(\255pad)144 631.2 Q F0 1.093(option has been used b)3.592 F 1.093 -(ut the amount of padding may be less than the padding written by)-.2 F -F2(mkisofs)144 643.2 Q F0 5.837(.N)C .837(ote that if you use)-5.837 F -F2(\255isosize)3.337 E F0 .837 -(on a track that contains Sparc boot information, the boot)3.337 F -(information will be lost.)144 655.2 Q .332(Note also that this option \ -cannot be used to determine the size of a \214le system if the multi se\ -ssion)144 679.2 R(option is present.)144 691.2 Q F2(\255pad)108 708 Q F0 -.29(If the track is a data track, 15 sectors of zeroed data will be add\ -ed to the end of this and each sub-)14.18 F 1.33(sequent data track.)144 -720 R 1.33(In this case, the)6.33 F F2(\255pad)3.831 E F0 1.331 -(option is superseded by the)3.831 F F2(padsize=)3.831 E F0 1.331 -(option. It will)3.831 F(J)72 768 Q -.25(..)-5.5 K(or)-4.5 5.5 M 2.5(gS) --.18 G 153.065(chilling V)-2.5 F(ersion 2.0)-1.11 E(9)206.225 E EP +save +mark +9 pagesetup +10 R f +(Schily)720 480 w +10 S1 f +(\302)976 480 w +10 R f +( \( 1 \))3 164( CDRECORD)1 3277(s USER COMMANDS)2 950 3 1009 480 t +10 B f +( =)1 0( e=)1 57( le)1 44( \256l)1 28( oo o\256)2 106( tt to)2 83( at)1 33(t ta)1 83 8 1440 960 t +10 I f +(name)1874 960 w +10 R f +( together with)2 573(Use this option)2 622 2 1800 1080 t +10 S1 f +(\261 \261)1 65 1 3029 1080 t +10 B f +( e)1 0( ve)1 44( iv)1 50( ri)1 28( kd dr)2 100( ec ck)2 100( he)1 44(c ch)1 100 8 3094 1080 t +10 R f +(to write an image prepared for the)6 1411 1 3594 1080 t +10 B f +( a)1 0( ha)1 50( ah)1 56( ma)1 50( am)1 83(Y Ya)1 122 6 5039 1080 t +( T)1 0( kT)1 67( sk)1 56( is)1 39(D Di)1 100 5 1800 1200 t +10 S1 f +(@ @)1 92 1 2062 1200 t +10 B f +(2 2)1 50 1 2154 1200 t +10 R f +( data)1 206( \256le must be a \256le with raw image B&W)9 1768( The)1 229(feature to the medium.)3 952 4 2245 1200 t +(\(one byte per pixel\) in a size as retrieved by a previous call to)13 2627 1 1800 1320 t +10 B f +( o)1 0( fo)1 50( nf)1 33( in)1 56( oo oi)2 78( tt to)2 83( at)1 33(t ta)1 83 8 4466 1320 t +10 R f +( the size)2 355(. If)1 163 2 4882 1320 t +( x 320 pixels\),)3 599(of the image equals the maximum possible size \(3744)8 2228 2 1800 1440 t +10 B f +( d)1 0( rd)1 56( or)1 44( re ec co)3 138( dr)1 44(c cd)1 100 6 4661 1440 t +10 R f +(will use)1 323 1 5077 1440 t +( \256le. This \256rst part then will be written to the leftover space on the)14 2818(the \256rst part of the)4 782 2 1800 1560 t +(CD.)1800 1680 w +(Note that the image must be mirrored to be readable from the pick up side of the CD.)17 3536 1 1800 1920 t +10 B f +( k)1 0( ak)1 56( re ea)2 94( br)1 44( er rb)2 100( ay ye)2 94(l la)1 78 7 1440 2088 t +10 R f +( DVD-R/DL medium into)3 1090(Switch a drive with)3 831 2 1800 2208 t +10 B f +( g)1 0( ng)1 50( in)1 56( di)1 28( rd)1 56( or)1 44( re ec co)3 138( r)1 87( p)1 0( mp)1 56( um)1 83( ju)1 56( j)1 76( er r)2 44( ay ye)2 94(l la)1 78 16 3764 2208 t +10 R f +(recording mode)1 647 1 4753 2208 t +(and use automatic layer-break position setup.)5 1848 1 1800 2328 t +(By default, DVD-R/DL media is written in)6 1766 1 1800 2568 t +10 B f +( g)1 0( ng)1 50( in)1 56( di)1 28( rd)1 56( or)1 44( re ec co)3 138( r)1 77( l)1 0( al)1 28( ia)1 50( ti)1 28( nt)1 33( en)1 56( qu ue)2 100( eq)1 56(s se)1 83 17 3599 2568 t +10 R f +(mode that completely)2 884 1 4516 2568 t +(\256lls up both layers.)3 791 1 1800 2688 t +10 B f +( =)1 0( k=)1 57( ak)1 56( re ea)2 94( br)1 44( er rb)2 100( ay ye)2 94(l la)1 78 8 1440 2856 t +10 I f +(value)1963 2856 w +10 R f +( speci\256ed)1 406( The)1 239( a manual layer-break value for DVD-R/DL and DVD+R/DL.)8 2677(Set up)1 278 4 1800 2976 t +( recorded data size and must)5 1203(layer-break value must not be set to less than half of the)11 2397 2 1800 3096 t +(not be set to more than the remaining)7 1567 1 1800 3216 t +10 I f +(Layer 0 size)2 505 1 3403 3216 t +10 R f +( manual layer-)2 600( The)1 225( medium.)1 390(of the)1 241 4 3944 3216 t +( of the ECC sector size which is 16 logical 2048)10 2116(break value needs to be a multiple)6 1484 2 1800 3336 t +( of DVD media and 32 logical 2048 byte sectors in case of HD-)13 2776(byte sectors in case)3 824 2 1800 3456 t +(DVD or BD media.)3 806 1 1800 3576 t +10 B f +( d)1 0( rd)1 56( or)1 44( re ec co)3 138( dr)1 44(C Cd)1 128 6 1800 3816 t +10 R f +( media in case that the total amount of data is)10 1989(does not allow to write DL)5 1159 2 2252 3816 t +(less then the)2 526 1 1800 3936 t +10 I f +(Layer 0 size)2 513 1 2366 3936 t +10 R f +(of the medium except when a manual layer-break has been)9 2481 1 2919 3936 t +(speci\256ed by using the)3 893 1 1800 4056 t +10 B f +( =)1 0( k=)1 57( ak)1 56( re ea)2 94( br)1 44( er rb)2 100( ay ye)2 94(l la)1 78 8 2726 4056 t +10 I f +(value)3249 4056 w +10 R f +(option.)3498 4056 w +10 S1 f +(\261 \261)1 65 1 1080 4224 t +10 B f +( t)1 0( ec ct)2 77( je)1 44(e ej)1 77 4 1145 4224 t +10 R f +( eject the medium before)4 1060( devices \(e.g. Philips\) need to)5 1259( Some)1 302(Eject disk after doing the work.)5 1339 4 1440 4224 t +(creating a new disk. Doing a)5 1262 1 1440 4344 t +10 S1 f +(\261)2751 4344 w +10 R f +( a real disk would not)5 978(dummy test and immediately creating)4 1606 2 2816 4344 t +(work on these devices.)3 933 1 1440 4464 t +10 S1 f +(\261 \261)1 65 1 1080 4632 t +10 B f +( x)1 0(\256 \256x)1 106 2 1145 4632 t +10 R f +( CD-reader will be written\). This may be used, if)9 2039(The disk will only be \256xated \(i.e. a TOC for a)10 1921 2 1440 4632 t +( \256xated. This option currently does not work)7 1873(for some reason the disk has been written but not)9 2087 2 1440 4752 t +(with old TEAC drives \(CD-R50S and CD-R55S\).)6 2034 1 1440 4872 t +10 S1 f +(\261 \261)1 65 1 1080 5040 t +10 B f +( rc ce e)3 88( or)1 44(f fo)1 83 3 1145 5040 t +10 R f +(Force to continue on some errors. Be careful when using this option.)11 2958 1 1440 5040 t +10 B f +( d)1 0( rd)1 56( or)1 44( re ec co)3 138( dr)1 44(C Cd)1 128 6 4477 5040 t +10 R f +(implements)4933 5040 w +( by)1 140(several checks that prevent you from doing unwanted things like damaging CD-RW media)12 3820 2 1440 5160 t +(improper drives. Many of the sanity checks are disabled when the)10 2705 1 1440 5280 t +10 S1 f +(\261 \261)1 65 1 4178 5280 t +10 B f +( rc ce e)3 88( or)1 44(f fo)1 83 3 4243 5280 t +10 R f +(option is used.)2 597 1 4491 5280 t +(This option also implements some tricks that will allow you to blank bad CD-RW disks.)14 3643 1 1440 5520 t +10 S1 f +(\261 \261)1 65 1 1080 5688 t +10 B f +( t)1 0( at)1 33( ma)1 50( rm)1 83( or)1 44(f fo)1 83 6 1145 5688 t +10 R f +( is currently only implemented)4 1267( Formatting)1 512(Format a CD-RW/DVD-RW/DVD+RW/BD-RE disc.)3 2181 3 1440 5808 t +( medium needs to be for-)5 1066( 'maiden' DVD+RW or BD-RE)4 1332( A)1 144(for DVD+RW and BD-RE media.)4 1418 4 1440 5928 t +( as)1 123( However,)1 463(matted before you may write to it.)6 1452 3 1440 6048 t +10 B f +( d)1 0( rd)1 56( or)1 44( re ec co)3 138( dr)1 44(c cd)1 100 6 3518 6048 t +10 R f +( need for formatting)3 849(autodetects the)1 611 2 3940 6048 t +( before it starts writing, the)5 1167(in this case and auto formats the medium)7 1766 2 1440 6168 t +10 S1 f +(\261 \261)1 65 1 4415 6168 t +10 B f +( t)1 0( at)1 33( ma)1 50( rm)1 83( or)1 44(f fo)1 83 6 4480 6168 t +10 R f +(option is only)2 585 1 4815 6168 t +(needed if you like to forcibly reformat a DVD+RW or BD-RE medium.)11 2956 1 1440 6288 t +10 B f +( =)1 0( s=)1 57(f fs)1 72 3 1080 6456 t +10 S1 f +(#)1209 6456 w +10 R f +(Set the FIFO \(ring buffer\) size to)6 1452 1 1440 6456 t +10 S1 f +(#)2939 6456 w +10 R f +( same syntax as in)4 819( may use the)3 568(. You)1 277 3 2989 6456 t +10 B f +(d dd d)2 112 1 4701 6456 t +10 R f +(\(1\),)4813 6456 w +10 B f +( dd d)2 56(s sd)1 95 2 5002 6456 t +10 R f +(\(1\) or)1 247 1 5153 6456 t +10 B f +( r)1 0( ar)1 44( ta)1 50(s st)1 72 4 1440 6576 t +10 R f +( a)1 90( If)1 146( number representing the size is taken in bytes unless otherwise speci\256ed.)11 3182(\(1\). The)1 376 4 1606 6576 t +( size is multiplied by 512,)5 1109(number is followed directly by the letter `b', `k', `m', `s' or `f', the)13 2851 2 1440 6696 t +(1024, 1024)1 461 1 1440 6816 t +10 S f +(*)1901 6816 w +10 R f +( by `x' or `)4 472( the size consists of numbers separated)6 1613( If)1 135(1024, 2048 or 2352.)3 841 4 1951 6816 t +10 S f +(*)5012 6816 w +10 R f +(', multi-)1 338 1 5062 6816 t +( Thus)1 290(plication of the two numbers is performed.)6 1898 2 1440 6936 t +10 I f +(fs=10x63k)3686 6936 w +10 R f +(will specify a FIFO size of)5 1233 1 4167 6936 t +(630 kBytes.)1 486 1 1440 7056 t +(The size speci\256ed by the)4 1143 1 1440 7296 t +10 I f +(fs=)2647 7296 w +10 R f +( needed for)2 528(argument includes the shared memory that is)6 2026 2 2846 7296 t +(J)720 7776 w +(. .)1 47 1 759 7721 t +( 9)1 1829( change: Version 3.0)3 850( Last)1 1434(org Schilling)1 528 4 759 7776 t +cleartomark +showpage +restore +%%EndPage: 9 9 %%Page: 10 10 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF 104.275(CDRECORD\(1\) Schily\264s)72 48 R -(USER COMMANDS)2.5 E(CDRECORD\(1\))106.775 E 1.729(remain ho)144 84 R -(we)-.25 E -.15(ve)-.25 G 4.229(ra).15 G 4.229(sas)-4.229 G 1.729 -(horthand for)-4.229 F/F1 10/Times-Bold@0 SF(padsize=)4.229 E/F2 10 -/Times-Italic@0 SF(15s.).01 E F0 1.729(If the)6.729 F F2(\255pad)4.229 E -F0 1.728(option refers to an audio track,)4.229 F F1(cdr)144 96 Q(ecord) --.18 E F0 .531(will pad the audio data to be a multiple of 2352 bytes.) -3.031 F .531(The audio data padding is done)5.531 F -(with binary zeroes which is equal to absolute silence.)144 108 Q F1 -(\255pad)144 132 Q F0(remains v)2.5 E(alid until disabled by)-.25 E F1 -(\255nopad)2.5 E F0(.)A F1(padsize=)108 148.8 Q F0(#)A .381 -(Set the amount of data to be appended as padding to the ne)144 160.8 R -.381(xt track to #.)-.15 F .381(Opposed to the beha)5.381 F(vior)-.2 E -.09(of the)144 172.8 R F1(\255pad)2.59 E F0 .09(option, the v)2.59 F .09 -(alue for)-.25 F F2(padsize=)2.59 E F0 .091 -(is reset to zero for each ne)2.59 F 2.591(wt)-.25 G 2.591 -(rack. Cdrecord)-2.591 F .091(assumes a)2.591 F .531 -(sector size of 2048 bytes for the)144 184.8 R F2(padsize=)3.031 E F0 -.53(option, independent from the real sector size and inde-)3.031 F .346 -(pendent from the write mode.)144 196.8 R .346(The me)5.346 F -.05(ga) --.15 G .346(bytes mentioned in the v).05 F .347(erbose mode output ho) --.15 F(we)-.25 E -.15(ve)-.25 G 2.847(ra).15 G(re)-2.847 E .133(countin\ -g the output sector size which is e.g. 2448 bytes when writing in RA)144 -208.8 R(W/RA)-.9 E .133(W96 mode.)-.9 F(See)5.133 E F1(fs)144 220.8 Q F0 -3.231(=o)C .731(ption for possible ar)-3.231 F 3.231(guments. T)-.18 F -3.231(op)-.8 G .731(ad the equi)-3.231 F -.25(va)-.25 G .731 -(lent of 20 minutes on a CD, you may write).25 F F1(padsize=)144 232.8 Q -F0 2.626(20x60x75s. Use)B .126(this option if your CD-dri)2.626 F .425 --.15(ve i)-.25 H 2.625(sn).15 G .125 -(ot able to read the last sectors of a track)-2.625 F 1.039(or if you w) -144 244.8 R 1.039(ant to be able to read the CD on a)-.1 F F1(Linux) -3.539 E F0 1.039(system with the ISO-9660 \214lesystem read)3.539 F .537 -(ahead b)144 256.8 R 3.037(ug. If)-.2 F .536(an empty \214le is used fo\ -r track data, this option may be used to create a disk that is)3.037 F -1.118(entirely made of padding.)144 268.8 R 1.118 -(This may e.g. be used to \214nd out ho)6.118 F 3.618(wm)-.25 G 1.118 -(uch o)-3.618 F -.15(ve)-.15 G(rb).15 E 1.119(urning is possible)-.2 F -(with a speci\214c media.)144 280.8 Q F1(\255nopad)108 297.6 Q F0 -(Do not pad the follo)144 309.6 Q(wing tracks \255 the def)-.25 E(ault.) --.1 E F1(\255shorttrack)108 326.4 Q F0(Allo)144 338.4 Q 2.791(wa)-.25 G -.291(ll subsequent tracks to violate the Read Book track length standar\ -d which requires a mini-)-2.791 F .168(mum track length of 4 seconds.) -144 350.4 R .168(This option is only useful when used in SA)5.168 F -2.669(Oo)-.55 G 2.669(rR)-2.669 G 1.969 -.9(AW m)-2.669 H 2.669 -(ode. Not).9 F .537(all dri)144 362.4 R -.15(ve)-.25 G 3.037(ss).15 G -.537(upport this feature. The dri)-3.037 F .837 -.15(ve m)-.25 H .537 -(ust be accept the resulting CUE sheet or support RA).15 F(W)-.9 E -(writing.)144 374.4 Q F1(\255noshorttrack)108 391.2 Q F0 -(Re-enforce the Red Book track length standard. T)144 403.2 Q -(racks must be at least 4 seconds.)-.35 E F1(pr)108 420 Q(egap=)-.18 E -F0(#)A 1.03(Set the)144 432 R(pre-g)6.03 E 1.03(ap size for the ne)-.05 -F 1.03(xt track.)-.15 F 1.03(This option currently only mak)6.03 F 1.03 -(es sense with the TEA)-.1 F(C)-.4 E(dri)144 444 Q .3 -.15(ve w)-.25 H(\ -hen creating track-at-once disks without the 2 second silence before ea\ -ch track.).15 E(This option may go a)144 456 Q -.1(wa)-.15 G 2.5(yi).1 G -2.5(nf)-2.5 G(uture.)-2.5 E F1(\255pr)108 472.8 Q(eemp)-.18 E F0 .432 -(If this \215ag is present, all T)144 484.8 R .432(OC entries for subse\ -quent audio tracks will indicate that the audio data)-.18 F .076 -(has been sampled with 50/15 \265sec preemphasis.)144 496.8 R .077 -(The data, ho)5.077 F(we)-.25 E -.15(ve)-.25 G 2.577(ri).15 G 2.577(sn) --2.577 G .077(ot modi\214ed during the pro-)-2.577 F -(cess of transferring from \214le to disk.)144 508.8 Q -(This option has no ef)5 E(fect on data tracks.)-.25 E F1(\255nopr)108 -525.6 Q(eemp)-.18 E F0 .432(If this \215ag is present, all T)144 537.6 R -.432(OC entries for subsequent audio tracks will indicate that the audi\ -o data)-.18 F(has been mastered with linear data \255 this is the def) -144 549.6 Q(ault.)-.1 E F1(\255copy)108 566.4 Q F0 .235 -(If this \215ag is present, all T)10.3 F .235(OC entries for subsequent\ - audio tracks of the resulting CD will indicate)-.18 F .941 -(that the audio data has permission to be copied without limit.)144 -578.4 R .941(This option has no ef)5.941 F .941(fect on data)-.25 F -(tracks.)144 590.4 Q F1(\255nocopy)108 607.2 Q F0 .235 -(If this \215ag is present, all T)144 619.2 R .235(OC entries for subse\ -quent audio tracks of the resulting CD will indicate)-.18 F(that the au\ -dio data has permission to be copied only once for personal use \255 th\ -is is the def)144 631.2 Q(ault.)-.1 E F1(\255scms)108 648 Q F0 .236 -(If this \215ag is present, all T)9.75 F .235(OC entries for subsequent\ - audio tracks of the resulting CD will indicate)-.18 F -(that the audio data has no permission to be copied an)144 660 Q(ymore.) --.15 E F1(tsize=)108 676.8 Q F0 6.42(#I)C 2.888(ft)-6.42 G .388 -(he master image for the ne)-2.888 F .388 -(xt track has been stored on a ra)-.15 F 2.888(wd)-.15 G .388 -(isk, use this option to specify the)-2.888 F -.25(va)144 688.8 S .46 -(lid amount of data on this disk. If the image of the ne).25 F .46 -(xt track is stored in a re)-.15 F .46(gular \214le, the size)-.15 F .25 -(of that \214le is tak)144 700.8 R .25 -(en to determine the length of this track.)-.1 F .251 -(If the track contains an ISO 9660 \214lesys-)5.251 F(tem image use the) -144 712.8 Q F2(\255isosize)2.5 E F0 -(option to determine the length of that \214lesystem image.)2.5 E 1.033 -(In Disk at Once mode and with some dri)144 724.8 R -.15(ve)-.25 G 3.533 -(st).15 G 1.033(hat use the TEA)-3.533 F 3.533(Cp)-.4 G 1.033 -(rogramming interf)-3.533 F 1.033(ace, e)-.1 F -.15(ve)-.25 G 3.533(ni) -.15 G(n)-3.533 E(J)72 768 Q -.25(..)-5.5 K(or)-4.5 5.5 M 2.5(gS)-.18 G -153.065(chilling V)-2.5 F(ersion 2.0)-1.11 E(10)201.225 E EP +save +mark +10 pagesetup +10 R f +(Schily)720 480 w +10 S1 f +(\302)976 480 w +10 R f +( \( 1 \))3 164( CDRECORD)1 3277(s USER COMMANDS)2 950 3 1009 480 t +( no)1 136( If)1 135( one page of memory.)4 917(administration. This is at least)4 1251 4 1440 960 t +10 I f +(fs)3915 960 w +10 R f +(= option is present,)3 800 1 3990 960 t +10 B f +( d)1 0( rd)1 56( or)1 44( re ec co)3 138( dr)1 44(c cd)1 100 6 4826 960 t +10 R f +(will)5244 960 w +(try to get the FIFO size value from the)8 1633 1 1440 1080 t +10 B f +(C CD DR R)3 216 1 3110 1080 t +10 S f +(_ _)1 50 1 3326 1080 t +10 B f +( ZE E)2 67( IZ)1 67( SI)1 39( OS)1 56( FO)1 78( IF)1 61(F FI)1 100 7 3376 1080 t +10 R f +( default FIFO size)3 763(environment. The)1 756 2 3881 1080 t +(is currently 4 MB.)3 757 1 1440 1200 t +( allows to run a pipe)5 858( It)1 128( real-time writing process.)3 1075(The FIFO is used to increase buffering for the)8 1899 4 1440 1440 t +(from)1440 1560 w +10 B f +( s)1 0( fs)1 39( of)1 33( so)1 50( is)1 39( ki)1 28(m mk)1 139 7 1687 1560 t +10 R f +(directly into)1 514 1 2068 1560 t +10 B f +( d)1 0( rd)1 56( or)1 44( re ec co)3 138( dr)1 44(c cd)1 100 6 2635 1560 t +10 R f +( and a pipe from)4 762( the FIFO is active)4 856(. If)1 177 3 3017 1560 t +10 B f +( s)1 0( fs)1 39( of)1 33( so)1 50( is)1 39( ki)1 28(m mk)1 139 7 4864 1560 t +10 R f +(into)5244 1560 w +10 B f +( d)1 0( rd)1 56( or)1 44( re ec co)3 138( dr)1 44(c cd)1 100 6 1440 1680 t +10 R f +(is used to create a CD,)5 953 1 1858 1680 t +10 B f +( d)1 0( rd)1 56( or)1 44( re ec co)3 138( dr)1 44(c cd)1 100 6 2847 1680 t +10 R f +(will abort prior to do any modi\256cations on the disk)9 2135 1 3265 1680 t +(if)1440 1800 w +10 B f +( s)1 0( fs)1 39( of)1 33( so)1 50( is)1 39( ki)1 28(m mk)1 139 7 1572 1800 t +10 R f +( recommended FIFO size is between 4 and)7 2020( The)1 258( writing starts.)2 665(dies before)1 486 4 1971 1800 t +( thumb, the FIFO size should be at least equal to the size of the)14 2825( a rule of)3 420( As)1 190(128 MBytes.)1 525 4 1440 1920 t +( no more than half of the physical amount)8 1782(internal buffer of the CD/DVD/BluRay-recorder and)5 2178 2 1440 2040 t +( the FIFO size is big enough, the FIFO statistics will print)11 2422( If)1 134(of RAM available in the machine.)5 1404 3 1440 2160 t +( is not wise to use too)6 987( It)1 139( \256ll not below 20%.)4 872(a FIFO empty count of zero and a FIFO min)9 1962 4 1440 2280 t +( than 8 MB to write a CD at a speed less than 20x)13 2140(much space for the FIFO. If you need more)8 1820 2 1440 2400 t +( on an idle machine, your machine is either underpowered,)9 2432(from an image on a local \256le system)7 1528 2 1440 2520 t +( you like to write DVDs or to write CDs at)10 1924( If)1 146(has hardware problems or is mis-con\256gured.)5 1890 3 1440 2640 t +(higher speed, it makes sense to use at least 16 MB for the FIFO.)13 2665 1 1440 2760 t +( your machine)2 597( If)1 137( be more careful with the FIFO size.)7 1538(On old and small machines, you need to)7 1688 4 1440 3000 t +( a FIFO size that is more than)7 1290( of physical RAM, you should not set up)8 1753( MB)1 189(has less than 256)3 728 4 1440 3120 t +( for)1 163( sun4c architecture \(e.g. a Sparcstation-2\) has only MMU page table entries)11 3249( The)1 234(32 MB.)1 314 4 1440 3240 t +( may cause the operating sys-)5 1223( for the FIFO)3 560( MBytes)1 350( per process. Using more than 14)6 1377(16 MBytes)1 450 5 1440 3360 t +( the MMU tables. Newer machines)5 1507(tem in this case to spend much time to constantly reload)10 2453 2 1440 3480 t +( on PC)2 319(from Sun do not have this MMU hardware problem. The author has no information)13 3641 2 1440 3600 t +(hardware re\257ecting this problem.)3 1349 1 1440 3720 t +( shared memory size.)3 896(Old Linux systems for non-x86 platforms have broken de\256nitions for the)10 3064 2 1440 3960 t +(You need to \256x them and rebuild the kernel or manually tell)11 2488 1 1440 4080 t +10 B f +( d)1 0( rd)1 56( or)1 44( re ec co)3 138( dr)1 44(c cd)1 100 6 3961 4080 t +10 R f +(to use a smaller FIFO.)4 923 1 4376 4080 t +( buffer underruns or similar problems \(like a constantly empty drive-buffer\) and)11 3460(If you have)2 500 2 1440 4320 t +(observe a zero)2 593 1 1440 4440 t +10 I f +(\256fo empty count)2 654 1 2066 4440 t +10 R f +(, you have hardware problems that prevent the data from \257owing)10 2672 1 2728 4440 t +( but)1 169(fast enough from the kernel memory to the drive. The FIFO size in this case is suf\256cient,)16 3791 2 1440 4560 t +(you should check for a working DMA setup.)7 1842 1 1440 4680 t +10 B f +( =)1 0( e=)1 57( me)1 44( im)1 83( ti)1 28( ce et)2 77( ac)1 44( ra)1 50(g gr)1 94 9 1080 4848 t +10 S1 f +(#)1557 4848 w +10 R f +(Set the grace time before starting to write to)8 1974 1 1440 4968 t +10 S1 f +(#)3466 4968 w +10 R f +( are not)2 355( below 3 seconds)3 766(seconds. Values)1 703 3 3576 4968 t +(allowed in order to prevent the volume management from interrupting the write process.)12 3626 1 1440 5088 t +10 S1 f +(\261 \261)1 65 1 1080 5256 t +10 B f +( ze e)2 44( iz)1 44( si)1 28( ns)1 39( gn)1 56(i ig)1 78 6 1145 5256 t +10 R f +( it exists)2 366(Ignore the known size of the medium. This option should be used with extreme care,)14 3594 2 1440 5376 t +( is not needed to write disks)6 1188( It)1 132(only for debugging purposes so do not use it for other reasons.)11 2640 3 1440 5496 t +( option implies)2 617( This)1 244(with more than the nominal capacity.)5 1527 3 1440 5616 t +10 S1 f +(\261 \261)1 65 1 3861 5616 t +10 B f +( n)1 0( rn)1 56( bu ur)2 100( er rb)2 100(o ov ve)2 144 5 3926 5616 t +10 R f +(.)4326 5616 w +10 S1 f +(\261 \261)1 65 1 1080 5784 t +10 B f +( d)1 0( ed)1 56( mm me)2 127(i im)1 111 4 1145 5784 t +10 R f +(Tell cdrecord to set the)4 1104 1 1440 5904 t +10 B f +( D)1 0( ED)1 72( MM ME)2 161( IM)1 94( I)1 110( I)1 0( SI)1 39( CS)1 56(S SC)1 128 9 2615 5904 t +10 R f +(\257ag in certain commands \(load, eject, blank,)6 2054 1 3346 5904 t +(close)1440 6024 w +10 S f +(_)1645 6024 w +10 R f +(track, close)1 472 1 1695 6024 t +10 S f +(_)2167 6024 w +10 R f +( can be useful on broken systems with ATAPI hard-disk and)10 2583(session\). This)1 600 2 2217 6024 t +( with SCSI systems that do not use)7 1834(CD/DVD/BluRay writer on the same bus or)6 2126 2 1440 6144 t +( blanking or \256xating a CD/DVD/BluRay)5 1690( systems will freeze while)4 1093(disconnect/reconnect. These)1 1177 3 1440 6264 t +( Set-)1 232( amount \(approx. 800 MB\).)4 1151(or while a DVD writer is \256lling up a session to the minimum)12 2577 3 1440 6384 t +(ting the)1 330 1 1440 6504 t +10 S1 f +(\261 \261)1 65 1 1822 6504 t +10 B f +( d)1 0( ed)1 56( mm me)2 127(i im)1 111 4 1887 6504 t +10 R f +(\257ag will request the command to return immediately while the operation)10 3167 1 2233 6504 t +( other devices and avoiding the system)6 1650(proceeds in background, making the bus usable for the)8 2310 2 1440 6624 t +( of the)2 275( is an experimental feature which may work or not, depending on the model)13 3171(freeze. This)1 514 3 1440 6744 t +( there seem)2 472( correct solution would be to set up a correct cabling but)11 2337( A)1 138(CD/DVD/BluRay writer.)1 1013 4 1440 6864 t +( it is)2 213( As)1 189( way by the manufacturer.)4 1124(to be notebooks around that have been set up the wrong)10 2434 4 1440 6984 t +(impossible to \256x this problem in notebooks, the)7 1963 1 1440 7104 t +10 S1 f +(\261 \261)1 65 1 3436 7104 t +10 B f +( d)1 0( ed)1 56( mm me)2 127(i im)1 111 4 3501 7104 t +10 R f +(option has been added.)3 939 1 3828 7104 t +(J)720 7680 w +(. .)1 47 1 759 7625 t +( 10)1 1829( change: Version 3.0)3 850( Last)1 1434(org Schilling)1 528 4 759 7680 t +cleartomark +showpage +restore +%%EndPage: 10 10 %%Page: 11 11 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF 104.275(CDRECORD\(1\) Schily\264s)72 48 R -(USER COMMANDS)2.5 E(CDRECORD\(1\))106.775 E -.35(Tr)144 84 S .96 -(ack at Once mode,).35 F/F1 10/Times-Bold@0 SF(cdr)3.46 E(ecord)-.18 E -F0 .96(needs to kno)3.46 F 3.461(wt)-.25 G .961 -(he size of each track before starting to write the)-3.461 F 2.964 -(disk. Cdrecord)144 96 R(no)2.964 E 2.964(wc)-.25 G .464 -(hecks this and aborts before starting to write.)-2.964 F .463 -(If this happens you will need)5.464 F 1.154(to run)144 108 R F1 1.154 -(mkisofs -print-size)3.654 F F0 1.154 -(before and use the output \(with `s' appended\) as an ar)3.654 F 1.155 -(gument to the)-.18 F F1(tsize)144 120 Q F0 2.5(=o)C(ption of)-2.5 E F1 -(cdr)2.5 E(ecord)-.18 E F0(\(e.g. tsize=250000s\).)2.5 E(See)144 132 Q -F1(fs)2.5 E F0 2.5(=o)C(ption for possible ar)-2.5 E(guments.)-.18 E/F2 -10.95/Times-Bold@0 SF(EXAMPLES)72 160.8 Q F0 -.15(Fo)108 172.8 S 3.139 -(ra).15 G .639(ll e)-3.139 F .639(xamples belo)-.15 F 1.939 -.65(w, i) --.25 H 3.139(tw).65 G .639 -(ill be assumed that the CD-Recorder is connected to the primary SCSI b) --3.139 F .638(us of)-.2 F(the machine. The SCSI tar)108 184.8 Q -(get id is set to 2.)-.18 E 1.6 -.8(To r)108 201.6 T(ecord a pure CD-R) -.8 E(OM at double speed, using data from the \214le)-.4 E/F3 10 -/Times-Italic@0 SF(cdima)2.5 E -.1(ge)-.1 G(.r)-.05 E(aw)-.15 E F0(:).31 -E(cdrecord \255v speed=2 de)118 218.4 Q(v=2,0 cdimage.ra)-.25 E(w)-.15 E -1.6 -.8(To c)108 235.2 T -(reate an image for a ISO 9660 \214lesystem with Rock Ridge e).8 E -(xtensions:)-.15 E(mkisofs \255R \255o cdimage.ra)118 252 Q 2.5(w/)-.15 -G(home/joer)-2.5 E(g/master/tree)-.18 E 1.6 -.8(To c)108 268.8 T -(heck the resulting \214le before writing to CD on Solaris:).8 E -(mount \255r \255F fbk \255o type=hsfs /de)118 285.6 Q -(v/fbk0:cdimage.ra)-.25 E 2.5(w/)-.15 G(mnt)-2.5 E(On Linux:)108 302.4 Q -(mount cdimage.ra)118 319.2 Q 2.5<77ad>-.15 G 2.5<72ad>-2.5 G 2.5(ti) --2.5 G(so9660 \255o loop /mnt)-2.5 E(Go on with:)108 336 Q -(ls \255lR /mnt)118 348 Q(umount /mnt)118 360 Q 1.896(If the o)108 376.8 -R -.15(ve)-.15 G 1.896(rall speed of the system is suf).15 F 1.896 -(\214cient and the structure of the \214lesystem is not too comple)-.25 -F(x,)-.15 E(cdrecord will run without creating an image of the ISO 9660\ - \214lesystem. Simply run the pipeline:)108 388.8 Q -(mkisofs \255R /master/tree | cdrecord \255v fs=6m speed=2 de)118 405.6 -Q(v=2,0 -)-.25 E .921(The recommended minimum \214fo size for running t\ -his pipeline is 4 MBytes.)108 422.4 R .92(As the def)5.92 F .92 -(ault \214fo size is 4)-.1 F .411(MB, the)108 434.4 R F1(fs=)2.911 E F0 -.412(option needs only be present if you w)2.912 F .412 -(ant to use a dif)-.1 F .412(ferent \214fo size.)-.25 F .412 -(If your system is loaded,)5.412 F -(you should run mkisofs in the real time class too.)108 446.4 Q 1.6 -.8 -(To r)5 H(aise the priority of).8 E F1(mkisofs)2.5 E F0 -(replace the command)2.5 E(mkisofs \255R /master/tree)118 463.2 Q(by)108 -475.2 Q(priocntl \255e \255c R)118 487.2 Q 2.5<54ad>-.6 G 2.5(p5)-2.5 G -2.5(9m)-2.5 G(kisofs \255R /master/tree)-2.5 E(on Solaris and by)108 -511.2 Q(nice --18 mkisofs \255R /master/tree)118 535.2 Q -(on systems that don')108 559.2 Q 2.5(th)-.18 G -2.25 -.2(av e)-2.5 H F1 -(UNIX Inter)2.7 E(national)-.15 E F0(compliant realtime scheduling.)2.5 -E .502(Cdrecord runs at priority 59 on Solaris, you should run mkisofs \ -at no more than priority 58. On other sys-)108 576 R -(tems, you should run mkisofs at no less than nice --18.)108 588 Q .382 -(Creating a CD-R)108 604.8 R .382(OM without \214le system image on dis\ -k has been tested on a Sparcstation-2 with a Y)-.4 F(amaha)-1 E .506 -(CDR-400. It did w)108 616.8 R .505 -(ork up to quad speed when the machine w)-.1 F .505(as not loaded.)-.1 F -3.005(Af)5.505 G .505(aster machine may be able)-3.105 F -(to handle quad speed also in the loaded case.)108 628.8 Q 1.64 -.8 -(To r)108 645.6 T .04(ecord a pure CD-D).8 F 2.54(A\()-.4 G .041 -(audio\) at single speed, with each track contained in a \214le named) --2.54 F F3(tr)2.541 E(ac)-.15 E(k01.cdaudio)-.2 E F0(,).18 E F3(tr)108 -657.6 Q(ac)-.15 E(k02.cdaudio)-.2 E F0 2.5(,e).18 G(tc:)-2.5 E -(cdrecord \255v speed=1 de)118 674.4 Q(v=2,0 -audio track*.cdaudio)-.25 -E 1.6 -.8(To c)108 691.2 T -(heck if it will be ok to use double speed for the e).8 E(xample abo) --.15 E -.15(ve)-.15 G 5(.U).15 G(se the dummy write option:)-5 E -(cdrecord \255v \255dummy speed=2 de)118 708 Q -(v=2,0 \255audio track*.cdaudio)-.25 E 2.607 -.8(To r)108 724.8 T 1.007 -(ecord a mix).8 F 1.007(ed-mode CD with an ISO 9660 \214lesystem from) --.15 F F3(cdima)3.506 E -.1(ge)-.1 G(.r)-.05 E(aw)-.15 E F0 1.006 -(on the \214rst track, the other)3.506 F(J)72 768 Q -.25(..)-5.5 K(or) --4.5 5.5 M 2.5(gS)-.18 G 153.065(chilling V)-2.5 F(ersion 2.0)-1.11 E -(11)201.225 E EP +save +mark +11 pagesetup +10 R f +(Schily)720 480 w +10 S1 f +(\302)976 480 w +10 R f +( \( 1 \))3 164( CDRECORD)1 3277(s USER COMMANDS)2 950 3 1009 480 t +(A second experimental feature of the)5 1531 1 1440 960 t +10 S1 f +(\261 \261)1 65 1 3007 960 t +10 B f +( d)1 0( ed)1 56( mm me)2 127(i im)1 111 4 3072 960 t +10 R f +(\257ag is to tell cdrecord to try to wait short times)10 1997 1 3403 960 t +( free the IDE bus if the CD/DVD/BluRay writer)8 2007(while writing to the media. This is expected to)8 1953 2 1440 1080 t +( data source are connected to the same IDE cable. In this case, the CD/DVD/BluRay)14 3650(and the)1 310 2 1440 1200 t +( bus for nearly all the time making it impossible)9 2045(writer would otherwise usually block the IDE)6 1915 2 1440 1320 t +(to fetch data from the source drive. See also the)9 1973 1 1440 1440 t +10 B f +( =)1 0( f=)1 57( nb bu uf)3 145( in)1 56(m mi)1 111 5 3446 1440 t +10 R f +(and)3848 1440 w +10 S1 f +(\261 \261)1 65 1 4025 1440 t +10 B f +(v v)1 50 1 4090 1440 t +10 R f +(options.)4173 1440 w +( it turns out that it would make sense to have a separate)12 2352( If)1 136(Use both features at your own risk.)6 1472 3 1440 1680 t +(option for the wait feature, write to the author and convince him.)11 2675 1 1440 1800 t +10 S1 f +(\261 \261)1 65 1 1080 1968 t +10 B f +( nq q)2 56(i in)1 84 2 1145 1968 t +10 R f +(Do an inquiry for the drive, print the inquiry info for the drive and exit.)14 2958 1 1440 1968 t +10 S1 f +(\261 \261)1 65 1 1080 2136 t +10 B f +( d)1 0( oa ad)2 106(l lo)1 78 3 1145 2136 t +10 R f +( to be use-)3 452(Load the media and exit. This only works with a tray-loading mechanism but seems)13 3508 2 1440 2136 t +(ful when using the Kodak disk transporter.)6 1754 1 1440 2256 t +10 S1 f +(\261 \261)1 65 1 1080 2424 t +10 B f +( k)1 0( ck)1 56( oc)1 44(l lo)1 78 4 1145 2424 t +10 R f +(Load the media, lock the door and exit. This only works with a tray-loading mechanism but)15 3960 1 1440 2424 t +(seems to be useful when using the Kodak disk transporter.)9 2402 1 1440 2544 t +10 B f +( =)1 0( n=)1 57( cn)1 56(m mc)1 127 4 1080 2712 t +10 I f +(med)1320 2712 w +10 S f +(_)1486 2712 w +10 I f +(cat)1536 2712 w +10 S f +(_)1658 2712 w +10 I f +(nr)1708 2712 w +10 R f +(Set the)1 283 1 1440 2832 t +10 B f +( er r)2 44( be)1 44( mb)1 56( um)1 83( Nu)1 56( N)1 105( og g)2 50( lo)1 50( al)1 28( ta)1 50( at)1 33( Ca)1 50( C)1 105( a)1 0( ia)1 50( di)1 28( ed)1 56(M Me)1 138 18 1756 2832 t +10 R f +(of the CD to)3 521 1 2815 2832 t +10 I f +(med)3369 2832 w +10 S f +(_)3535 2832 w +10 I f +(cat)3585 2832 w +10 S f +(_)3707 2832 w +10 I f +(nr)3757 2832 w +10 R f +(.)3854 2832 w +10 B f +( =)1 0( f=)1 57( nb bu uf)3 145( in)1 56(m mi)1 111 5 1080 3000 t +10 I f +(value)1449 3000 w +10 R f +(The)1440 3120 w +10 B f +( =)1 0( f=)1 57( nb bu uf)3 145( in)1 56(m mi)1 111 5 1637 3120 t +10 R f +( ratio for the experimental)4 1114(option allows to de\256ne the minimum drive-buffer \256ll)7 2238 2 2048 3120 t +( is intended to free the IDE bus to allow hard disk and CD/DVD/BluRay)13 3017(ATAPI wait mode that)3 943 2 1440 3240 t +( when the verbose)3 762( the wait mode currently only works)6 1520( As)1 181(writer to be on the same IDE cable.)7 1497 4 1440 3360 t +(option)1440 3480 w +10 S1 f +(\261 \261)1 65 1 1730 3480 t +10 B f +(v v)1 50 1 1795 3480 t +10 R f +(has been speci\256ed,)2 769 1 1879 3480 t +10 B f +( d)1 0( rd)1 56( or)1 44( re ec co)3 138( dr)1 44(c cd)1 100 6 2682 3480 t +10 R f +(implies the verbose option in case the)6 1558 1 3098 3480 t +10 S1 f +(\261 \261)1 65 1 4690 3480 t +10 B f +( d)1 0( ed)1 56( mm me)2 127(i im)1 111 4 4755 3480 t +10 R f +(or)5083 3480 w +10 B f +( -)1 0( n-)1 33( in)1 56(m mi)1 111 4 5200 3480 t +( =)1 0( f=)1 57(b bu uf)2 145 3 1440 3600 t +10 R f +( values for)2 499( Valid)1 319( speci\256ed.)1 444(option has been)2 703 4 1705 3600 t +10 B f +( =)1 0( f=)1 57( nb bu uf)3 145( in)1 56(m mi)1 111 5 3734 3600 t +10 R f +(are between 25 and 95 for)5 1233 1 4167 3600 t +( minimum drive-buffer \256ll ratio.)4 1323(25%. . .95%)2 473 2 1440 3720 t +10 S1 f +(\261 \261)1 65 1 1080 3888 t +10 B f +( a)1 0( ia)1 50( di)1 28( ed)1 56(m me)1 127 5 1145 3888 t +10 S1 f +(\261 \261)1 65 1 1406 3888 t +10 B f +( o)1 0( fo)1 50( nf)1 33(i in)1 84 4 1471 3888 t +10 S1 f +(\261 \261)1 65 1 1080 4056 t +10 B f +( o)1 0( fo)1 50( nf)1 33( in)1 56(m mi)1 111 5 1145 4056 t +10 R f +( option currently only works)4 1178( This)1 246( the medium.)2 545(Retrieve and print information about the state of)7 1991 4 1440 4056 t +(for MMC-compliant drives.)2 1129 1 1440 4176 t +10 S1 f +(\261 \261)1 65 1 1080 4344 t +10 B f +( o)1 0( fo)1 50( nf)1 33( in)1 56( si)1 28(m ms)1 122 6 1145 4344 t +10 R f +(Retrieve multi-session info in a form suitable for)7 2007 1 1440 4464 t +10 B f +( 10 0)2 50( .1)1 50( 1.)1 25( -1)1 50( s-)1 33( fs)1 39( of)1 33( so)1 50( is)1 39( ki)1 28(m mk)1 139 11 3480 4464 t +10 R f +(or later.)1 318 1 4049 4464 t +( makes only sense with a CD that contains at least one closed session and is)15 3472(This option)1 488 2 1440 4704 t +( try to get the)4 625(appendable \(not \256nally closed yet\). Some drives create error messages if you)11 3335 2 1440 4824 t +(multi-session info for a disk that is not suitable for this operation.)11 2704 1 1440 4944 t +10 S1 f +(\261 \261)1 65 1 1080 5112 t +10 B f +( e)1 0( se)1 44( os)1 39( lo)1 50( cl)1 28( oc)1 44(n no)1 106 7 1145 5112 t +10 R f +( is an experimen-)3 717( This)1 245( useful only when in packet writing mode.)7 1750(Do not close the current track,)5 1248 4 1440 5232 t +(tal interface.)1 506 1 1440 5352 t +10 S1 f +(\261 \261)1 65 1 1080 5520 t +10 B f +( x)1 0( \256x)1 50( o\256)1 56(n no)1 106 4 1145 5520 t +10 R f +( the tracks. This may be used to create an audio disk in)12 2452(Do not \256xate the disk after writing)6 1508 2 1440 5520 t +(steps. An un-\256xated disk can usually not be used on a non CD-writer type drive but there are)17 3960 1 1440 5640 t +(audio CD-players that will be able to play such a disk.)10 2247 1 1440 5760 t +10 S1 f +(\261 \261)1 65 1 1080 5928 t +10 B f +( n)1 0( rn)1 56( bu ur)2 100( er rb)2 100(o ov ve)2 144 5 1145 5928 t +10 R f +(Allow)1440 6048 w +10 B f +( d)1 0( rd)1 56( or)1 44( re ec co)3 138( dr)1 44(c cd)1 100 6 1726 6048 t +10 R f +( feature is usually called)4 1018(to write more than the of\256cial size of a medium. This)10 2238 2 2144 6048 t +10 I f +(overburning)1440 6168 w +10 R f +( media may hold more space than the)7 1657(and depends on the fact that most blank)7 1759 2 1984 6168 t +(of\256cial size. As the of\256cial size of the lead-out area on the disk is 90 seconds \(6750 sectors\))17 3960 1 1440 6288 t +( least 150 sectors of lead out, all media may be over-)11 2283(and a disk usually works if there are at)8 1677 2 1440 6408 t +( CD-recorders only do overburning in)5 1571( Most)1 276( \(6600 sectors\).)2 642(burned by at least 88 seconds)5 1228 4 1440 6528 t +10 B f +( O)1 0( AO)1 78(S SA)1 128 3 5194 6528 t +10 R f +(or)1440 6648 w +10 B f +( W)1 0(R RA AW)2 244 2 1568 6648 t +10 R f +( CD-R55S and the Panasonic)4 1242(mode. Known exceptions are TEAC CD-R50S, TEAC)6 2301 2 1857 6648 t +( limit the size)3 578( drives do not allow to overburn as much as you might like and)13 2666(CW-7502. Some)1 716 3 1440 6768 t +( CD to e.g. 76 minutes. This problem may be circumvented by writing the CD in RAW)16 3788(of a)1 172 2 1440 6888 t +( There)1 304( the drive has no chance to \256nd the size before starting to burn.)13 2694(mode because this way)3 962 3 1440 7008 t +( check if your drive)4 829( a test to)3 375( Make)1 298(is no guarantee that your drive supports overburning at all.)9 2458 4 1440 7128 t +(implements the feature.)2 956 1 1440 7248 t +(J)720 7728 w +(. .)1 47 1 759 7673 t +( 11)1 1829( change: Version 3.0)3 850( Last)1 1434(org Schilling)1 528 4 759 7728 t +cleartomark +showpage +restore +%%EndPage: 11 11 %%Page: 12 12 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF 104.275(CDRECORD\(1\) Schily\264s)72 48 R -(USER COMMANDS)2.5 E(CDRECORD\(1\))106.775 E -(tracks being audio tracks from the \214les)108 84 Q/F1 10 -/Times-Italic@0 SF(tr)2.5 E(ac)-.15 E(k01.cdaudio)-.2 E F0(,).18 E F1 -(tr)2.5 E(ac)-.15 E(k02.cdaudio)-.2 E F0 2.5(,e).18 G(tc:)-2.5 E -(cdrecord \255v \255dummy de)118 100.8 Q(v=2,0 cdimage.ra)-.25 E 2.5 -<77ad>-.15 G(audio track*.cdaudio)-2.5 E 1.6 -.8(To h)108 117.6 T -(andle dri).8 E -.15(ve)-.25 G 2.5(st).15 G(hat need to kno)-2.5 E 2.5 -(wt)-.25 G(he size of a track before starting to write, \214rst run)-2.5 -E(mkisofs -R -q -print-size /master/tree)118 134.4 Q(and then run)108 -151.2 Q(mkisofs -R /master/tree | cdrecord speed=2 de)118 168 Q -(v=2,0 tsize=XXXs -)-.25 E(where)108 184.8 Q F1(XXX)2.5 E F0 -(is replaced by the output of the pre)2.5 E(vious run of mkisofs.)-.25 E -1.6 -.8(To c)108 201.6 T(op).8 E 2.5(ya)-.1 G 2.5(na)-2.5 G -(udio CD in the most accurate w)-2.5 E(ay)-.1 E 2.5<2c8c>-.65 G(rst run) --2.5 E(cdda2w)118 218.4 Q .4 -.2(av -)-.1 H -.25(va).2 G -(ll cddb=0 -D2,0 -B -Ow).25 E -.2(av)-.1 G(and then run)108 235.2 Q -(cdrecord -v de)118 252 Q(v=2,0 -dao -useinfo -te)-.25 E 2.5(xt *.w)-.15 -F -.2(av)-.1 G .657(This will try cop)108 268.8 R 3.157(yt)-.1 G .658 -(rack indices and to read CD-T)-3.157 F -.15(ex)-.7 G 3.158(ti).15 G -.658(nformation from disk.)-3.158 F .658(If there is no CD-T)5.658 F --.15(ex)-.7 G 3.158(ti).15 G(nfor)-3.158 E(-)-.2 E(mation,)108 280.8 Q -/F2 10/Times-Bold@0 SF(cdda2wa)2.5 E(v)-.25 E F0 -(will try to get the information from freedb)2.5 E(.or)-.4 E 2.5(gi)-.18 -G(nstead.)-2.5 E/F3 10.95/Times-Bold@0 SF(ENVIR)72 309.6 Q(ONMENT)-.329 -E F2(CDR_DEVICE)108 321.6 Q F0 1.628(This may either hold a de)144 333.6 -R 1.628(vice identi\214er that is suitable to the open call of the SCSI\ - transport)-.25 F(library or a label in the \214le /etc/def)144 345.6 Q -(ault/cdrecord.)-.1 E F2(CDR_SPEED)108 362.4 Q F0(Sets the def)144 374.4 -Q(ault speed v)-.1 E(alue for writing \(see also)-.25 E F2(\255speed)2.5 -E F0(option\).)2.5 E F2(CDR_FIFOSIZE)108 391.2 Q F0(Sets the def)144 -403.2 Q(ault size of the FIFO \(see also)-.1 E F2(fs=)2.5 E F0 2.5(#o)C -(ption\).)-2.5 E F2(CDR_FORCERA)108 420 Q(WSPEED)-1.3 E F0 1.317 -(If this en)144 432 R 1.317(vironment v)-.4 F 1.317(ariable is set,)-.25 -F F2(cdr)3.817 E(ecord)-.18 E F0 1.317(will allo)3.817 F 3.818(wy)-.25 G -1.318(ou to write at the full RA)-3.818 F 3.818(We)-.9 G(ncoding)-3.818 -E(speed a single CPU supports.)144 444 Q -(This will create high potential of b)5 E(uf)-.2 E -(fer underruns. Use with care.)-.25 E F2(RSH)108 460.8 Q F0 .55(If the) -15.44 F F2(RSH)3.05 E F0(en)3.05 E .549 -(vironment is present, the remote connection will not be created via)-.4 -F F2 -.18(rc)3.049 G(md).18 E F0 .549(\(3\) b)B .549(ut by)-.2 F .578 -(calling the program pointed to by)144 472.8 R F2(RSH)3.079 E F0 5.579 -(.U)C .579(se e.g.)-5.579 F F2(RSH=)5.579 E F0 .579 -(/usr/bin/ssh to create a secure shell con-)B(nection.)144 484.8 Q .87 -(Note that this forces)144 508.8 R F2(cdr)3.37 E(ecord)-.18 E F0 .869 -(to create a pipe to the)3.37 F F2(rsh\(1\))3.369 E F0 .869 -(program and disallo)3.369 F(ws)-.25 E F2(cdr)3.369 E(ecord)-.18 E F0 -(to)3.369 E .28(directly access the netw)144 520.8 R .28(ork sock)-.1 F -.28(et to the remote serv)-.1 F(er)-.15 E 5.281(.T)-.55 G .281(his mak) --5.281 F .281(es it impossible to set up perfor)-.1 F(-)-.2 E .813 -(mance parameters and slo)144 532.8 R .813(ws do)-.25 F .813 -(wn the connection compared to a)-.25 F F2 -.18(ro)3.313 G(ot).18 E F0 -(initiated)3.313 E F2 -.18(rc)3.313 G(md\(3\)).18 E F0(connec-)3.313 E -(tion.)144 544.8 Q F2(RSCSI)108 561.6 Q F0 3.942(If the)6.55 F F2(RSCSI) -6.442 E F0(en)6.443 E 3.943(vironment is present, the remote SCSI serv) --.4 F 3.943(er will not be the program)-.15 F F2(/opt/schily/sbin/rscsi) -144 573.6 Q F0 -.2(bu)3.737 G 3.737(tt).2 G 1.236 -(he program pointed to by)-3.737 F F2(RSCSI)3.736 E F0 6.236(.N)C 1.236 -(ote that the remote SCSI serv)-6.236 F(er)-.15 E .553(program name wil\ -l be ignored if you log in using an account that has been created with \ -a remote)144 585.6 R(SCSI serv)144 597.6 Q(er program as login shell.) --.15 E F3(FILES)72 626.4 Q F0(/etc/def)108 638.4 Q(ault/cdrecord)-.1 E -(Def)144 650.4 Q 3.228(ault v)-.1 F 3.228 -(alues can be set for the follo)-.25 F 3.227(wing options in /etc/def) --.25 F 5.727(ault/cdrecord. F)-.1 F 3.227(or e)-.15 F(xample:)-.15 E/F4 -9/Times-Roman@0 SF(CDR_FIFOSIZE=8m)144 662.4 Q F0(or)2.25 E F4 -(CDR_SPEED=2)2.5 E F0(CDR_DEVICE)144 679.2 Q .261 -(This may either hold a de)180 691.2 R .262 -(vice identi\214er that is suitable to the open call of the SCSI trans-) --.25 F 1.418(port library or a label in the \214le /etc/def)180 703.2 R -1.418(ault/cdrecord that allo)-.1 F 1.418(ws to identify a speci\214c) --.25 F(dri)180 715.2 Q .3 -.15(ve o)-.25 H 2.5(nt).15 G(he system.)-2.5 -E(J)72 768 Q -.25(..)-5.5 K(or)-4.5 5.5 M 2.5(gS)-.18 G 153.065 -(chilling V)-2.5 F(ersion 2.0)-1.11 E(12)201.225 E EP +save +mark +12 pagesetup +10 R f +(Schily)720 480 w +10 S1 f +(\302)976 480 w +10 R f +( \( 1 \))3 164( CDRECORD)1 3277(s USER COMMANDS)2 950 3 1009 480 t +10 S1 f +(\261 \261)1 65 1 1080 960 t +10 B f +( t)1 0( et)1 33( ke)1 44( ck)1 56( ac)1 44(p pa)1 106 6 1145 960 t +10 R f +(Set)1440 1080 w +10 B f +( .)1 0( e.)1 25( de)1 44( od)1 56( mo)1 50( m)1 116( g)1 0( ng)1 50( in)1 56( ti)1 28( it)1 33( ri)1 28( wr)1 44( w)1 105( t)1 0( et)1 33( ke)1 44( ck)1 56( ac)1 44(P Pa)1 111 20 1601 1080 t +10 R f +(This is an experimental interface.)4 1365 1 2557 1080 t +10 B f +( =)1 0( ze e=)2 101( iz)1 44( si)1 28( ts)1 39(p pk kt)2 145 6 1080 1248 t +10 S1 f +(#)1437 1248 w +10 R f +(Set the packet size to)4 875 1 1440 1368 t +10 S1 f +(#)2348 1368 w +10 R f +( is an experimental interface.)4 1187( This)1 244(, forces \256xed packet mode.)4 1107 3 2398 1368 t +10 S1 f +(\261 \261)1 65 1 1080 1536 t +10 B f +( p)1 0( ap)1 56( rc ca)2 94(p pr)1 100 4 1145 1536 t +10 R f +( capabilities for SCSI-3/mmc-compliant drives as obtained from mode page)9 3324(Print the drive)2 636 2 1440 1536 t +(0x2A. Values marked with)3 1133 1 1440 1656 t +10 I f +(kB)2616 1656 w +10 R f +(use 1000 bytes as kilo-byte, values marked with)7 2046 1 2764 1656 t +10 I f +(KB)4853 1656 w +10 R f +(use 1024)1 376 1 5024 1656 t +(bytes as Kilo-byte.)2 768 1 1440 1776 t +10 S1 f +(\261 \261)1 65 1 1080 1944 t +10 B f +( s)1 0( ts)1 39( pt)1 33( op)1 56( ro)1 50( dr)1 44( td)1 56( et)1 33(s se)1 83 9 1145 1944 t +10 R f +( speci\256ed by)2 537(Set the driveropts)2 735 2 1440 2064 t +10 B f +( =)1 0( s=)1 57( ts)1 39( pt)1 33( op)1 56( er ro)2 94( ve)1 44( iv)1 50( ri)1 28(d dr)1 100 10 2753 2064 t +10 I f +(option list)1 420 1 3254 2064 t +10 B f +(, ,)1 25 1 3682 2064 t +10 R f +(the)3748 2064 w +10 B f +( d)1 0( ee ed)2 100( pe)1 44(s sp)1 95 4 3911 2064 t +10 R f +(of the drive and the)4 840 1 4191 2064 t +10 B f +( y)1 0( mm my)2 133(d du um)2 195 3 5072 2064 t +10 R f +( cdrecord to set drive speci\256c parameters that are not directly used by)12 2879( allows)1 296( This)1 246(\257ag and exit.)2 539 4 1440 2184 t +10 B f +( d)1 0( rd)1 56( or)1 44( re ec co)3 138( dr)1 44(c cd)1 100 6 1440 2304 t +10 R f +(like e.g.)1 349 1 1877 2304 t +10 B f +( e)1 0( de)1 44( od)1 56( mo)1 50( m)1 139( n)1 0( on)1 56( io)1 50( ss si)2 67( es)1 39( se)1 44( s)1 94( e)1 0( le)1 44( gl)1 28( ng)1 50( in)1 56(s si)1 67 18 2314 2304 t +10 R f +(,)3198 2304 w +10 B f +( r)1 0( dr)1 44( cd)1 56( c)1 100( e)1 0( de)1 44( id)1 56(h hi)1 84 8 3279 2304 t +10 R f +( is needed in case that)5 1028( It)1 150(and similar.)1 503 3 3719 2304 t +10 B f +( =)1 0( s=)1 57( ts)1 39( pt)1 33( op)1 56( er ro)2 94( ve)1 44( iv)1 50( ri)1 28(d dr)1 100 10 1440 2424 t +10 I f +(option list)1 412 1 1941 2424 t +10 R f +(should be called without planning to run a typical)8 2046 1 2386 2424 t +10 B f +( d)1 0( rd)1 56( or)1 44( re ec co)3 138( dr)1 44(c cd)1 100 6 4465 2424 t +10 R f +(task.)4880 2424 w +10 B f +( =)1 0( d=)1 57( ee ed)2 100( pe)1 44(s sp)1 95 5 1080 2592 t +10 S1 f +(#)1376 2592 w +10 R f +( speed factor of the writing process to)7 1568(Set the)1 283 2 1440 2712 t +10 S1 f +(#)3325 2712 w +10 R f +(.)3375 2712 w +10 S1 f +(#)3467 2712 w +10 R f +(is an integer, representing a multiple of what)7 1849 1 3551 2712 t +(has been de\256ned as single speed for the medium.)8 2019 1 1440 2832 t +( for CD-ROM)2 586( KB/s)1 239( is about 150)3 544( This)1 246( the audio playback speed.)4 1096(For CD-media, single speed is)4 1249 6 1440 3072 t +( for DVD media and about)5 1112( kB/s)1 217( speed is about 1385)4 852( Single)1 323( for CD-Audio.)2 631( KB/s)1 239(and about 172)2 586 7 1440 3192 t +(4496 kB/s for BluRay media.)4 1207 1 1440 3312 t +(If no)1 201 1 1440 3552 t +10 I f +(speed)1676 3552 w +10 R f +(option is present,)2 706 1 1938 3552 t +10 B f +( d)1 0( rd)1 56( or)1 44( re ec co)3 138( dr)1 44(c cd)1 100 6 2679 3552 t +10 R f +(will try to get a drive speci\256c speed value from the \256le)11 2304 1 3096 3552 t +10 B f +( d)1 0( rd)1 56( or)1 44( re ec co)3 138( dr)1 44( cd)1 56( /c)1 44( t/)1 28( lt)1 33( ul)1 28( au)1 56( fa)1 50( ef)1 33( de)1 44( /d)1 56( c/)1 28( tc)1 44( et)1 33(/ /e)1 72 19 1440 3672 t +10 R f +(and if it cannot \256nd one, it will try to get the speed value from the)15 3021 1 2379 3672 t +10 B f +(C CD DR R)3 216 1 1440 3792 t +10 S f +(_ _)1 50 1 1656 3792 t +10 B f +( D)1 0( EE ED)2 139( PE)1 67(S SP)1 117 4 1706 3792 t +10 R f +(environment and later from the)4 1314 1 2072 3792 t +10 B f +(C CD DR R)3 216 1 3429 3792 t +10 S f +(_ _)1 50 1 3645 3792 t +10 B f +( =)1 0( D=)1 57( EE ED)2 139( PE)1 67(S SP)1 117 5 3695 3792 t +10 R f +(entry in)1 326 1 4118 3792 t +10 B f +( d)1 0( rd)1 56( or)1 44( re ec co)3 138( dr)1 44( cd)1 56( /c)1 44( t/)1 28( lt)1 33( ul)1 28( au)1 56( fa)1 50( ef)1 33( de)1 44( /d)1 56( c/)1 28( tc)1 44( et)1 33(/ /e)1 72 19 4488 3792 t +10 R f +(.)5375 3792 w +( default for)2 467( The)1 225( speed value could be found, cdrecord uses a drive speci\256c default speed.)12 3064(If no)1 204 4 1440 3912 t +( you use)2 373( If)1 144( is to use the maximum supported by the drive.)9 2057(all new \(MMC-compliant\) drives)3 1386 4 1440 4032 t +10 I f +(speed=0)1440 4152 w +10 R f +(with a MMC-compliant drive,)3 1259 1 1828 4152 t +10 B f +( d)1 0( rd)1 56( or)1 44( re ec co)3 138( dr)1 44(c cd)1 100 6 3130 4152 t +10 R f +( the lowest possible speed for)5 1264(will switch to)2 581 2 3555 4152 t +( with)1 217( you are using an old \(non-MMC\) drive that has problems)10 2444( If)1 137(drive and medium.)2 778 4 1440 4272 t +10 I f +(speed=2)5055 4272 w +10 R f +(or)1440 4392 w +10 I f +(speed=4)1556 4392 w +10 R f +(, you should try)3 652 1 1909 4392 t +10 I f +(speed=0)2594 4392 w +10 R f +(.)2947 4392 w +10 S1 f +(\261 \261)1 65 1 1080 4560 t +10 B f +( t)1 0( xt)1 33( ex)1 50(t te)1 77 4 1145 4560 t +10 R f +( contains ascii informa-)3 985(Write CD-Text information based on information taken from a \256le that)10 2975 2 1440 4560 t +(tion for the text strings.)4 1008 1 1440 4680 t +10 B f +( d)1 0( rd)1 56( or)1 44( re ec co)3 138( dr)1 44(C Cd)1 128 6 2491 4680 t +10 R f +( of the)2 289(supports CD-Text information based on the content)6 2167 2 2944 4680 t +10 S f +(* *)1 50 1 1440 4800 t +10 B f +( f)1 0( nf)1 33( in)1 56(. .i)1 53 4 1490 4800 t +10 R f +(\256les created by)2 642 1 1676 4800 t +10 B f +( av v)2 50( wa)1 50( a2 2w)2 122( dd da)2 106(c cd)1 100 5 2362 4800 t +10 R f +( based on the content from a)6 1251(and CD-Text information)2 1059 2 2834 4800 t +10 B f +( E)1 0(C CU UE)2 211 2 5189 4800 t +( t)1 0( ee et)2 77( he)1 44(s sh)1 95 4 1440 4920 t +10 R f +( a)1 92(\256le. If)1 300 2 1704 4920 t +10 B f +( t)1 0( ee et)2 77( he)1 44( sh)1 56( s)1 87( E)1 0(C CU UE)2 211 7 2144 4920 t +10 R f +(\256le contains both \(binary CDTEXTFILE and text based SONG-)8 2734 1 2666 4920 t +(WRITER\) entries, then the information based on the CDTEXTFILE entry will win.)11 3426 1 1440 5040 t +( use the)2 325(You need to)2 506 2 1440 5280 t +10 S1 f +(\261 \261)1 65 1 2306 5280 t +10 B f +( o)1 0( fo)1 50( nf)1 33( in)1 56( ei)1 28( se)1 44(u us)1 95 7 2371 5280 t +10 R f +(option in addition in order to tell)6 1366 1 2712 5280 t +10 B f +( d)1 0( rd)1 56( or)1 44( re ec co)3 138( dr)1 44(c cd)1 100 6 4113 5280 t +10 R f +(to read the)2 441 1 4530 5280 t +10 S f +(* *)1 50 1 5006 5280 t +10 B f +( f)1 0( nf)1 33( in)1 56(. .i)1 53 4 5056 5280 t +10 R f +(\256les)5233 5280 w +(or)1440 5400 w +10 B f +( =)1 0( e=)1 57( le)1 44( \256l)1 28( e\256)1 56( ue)1 44(c cu)1 100 7 1562 5400 t +10 I f +(\256lename)1891 5400 w +10 R f +(in order to tell)3 611 1 2268 5400 t +10 B f +( d)1 0( rd)1 56( or)1 44( re ec co)3 138( dr)1 44(c cd)1 100 6 2918 5400 t +10 R f +(to read a)2 371 1 3339 5400 t +10 B f +( t)1 0( ee et)2 77( he)1 44( sh)1 56( s)1 77( E)1 0(C CU UE)2 211 7 3749 5400 t +10 R f +( you like)2 376( If)1 137(\256le in addition.)2 635 3 4252 5400 t +(to write your own CD-Text information, edit the)7 2049 1 1440 5520 t +10 S f +(* *)1 50 1 3531 5520 t +10 B f +( f)1 0( nf)1 33( in)1 56(. .i)1 53 4 3581 5520 t +10 R f +(\256les or the)2 456 1 3765 5520 t +10 B f +( t)1 0( ee et)2 77( he)1 44( sh)1 56( s)1 81( E)1 0(C CU UE)2 211 7 4263 5520 t +10 R f +(\256le with a text)3 626 1 4774 5520 t +(editor and change the \256elds that are relevant for CD-Text.)9 2383 1 1440 5640 t +10 B f +( =)1 0( e=)1 57( le)1 44( \256l)1 28( t\256)1 56( xt)1 33( ex)1 50(t te)1 77 8 1080 5808 t +10 I f +(\256lename)1425 5808 w +10 R f +(Write CD-Text based on information found in the binary \256le)9 2557 1 1440 5928 t +10 I f +(\256lename)4037 5928 w +10 R f +( \256le must contain)3 740(. This)1 277 2 4383 5928 t +( a data format de\256ned in the SCSI-3 MMC-2 standard and in the Red Book. The)15 3373(information in)1 587 2 1440 6048 t +( SCSI standard is optional and allows to make the)9 2135(four-byte-sized header that is de\256ned in the)6 1825 2 1440 6168 t +( the best option to be used to copy CD-Text)9 1836( is)1 103( This)1 247(recognition of correct data less ambiguous.)5 1774 4 1440 6288 t +( CDs that already carry CD-Text information. To get data in a format suitable)13 3217(data from existing)2 743 2 1440 6408 t +( use)1 200(for this option)2 653 2 1440 6528 t +10 B f +( d)1 0( rd)1 56( or)1 44( re ec co)3 138( dr)1 44(c cd)1 100 6 2360 6528 t +10 S1 f +(\261 \261)1 65 1 2809 6528 t +10 B f +(v vv v)2 100 1 2874 6528 t +10 S1 f +(\261 \261)1 65 1 3041 6528 t +10 B f +( c)1 0( oc)1 44(t to)1 83 3 3106 6528 t +10 R f +( both,)1 270( If)1 166(to extract the information from disk.)5 1664 3 3300 6528 t +10 B f +( =)1 0( e=)1 57( le)1 44( \256l)1 28( t\256)1 56( xt)1 33( ex)1 50(t te)1 77 8 1440 6648 t +10 I f +(\256lename)1785 6648 w +10 R f +( from)1 296(and CD-Text information)2 1173 2 2224 6648 t +10 S f +(* *)1 50 1 3795 6648 t +10 B f +( f)1 0( nf)1 33( in)1 56(. .i)1 53 4 3845 6648 t +10 R f +(or)4089 6648 w +10 S f +(* *)1 50 1 4274 6648 t +10 B f +( e)1 0( ue)1 44( cu)1 56(. .c)1 69 4 4324 6648 t +10 R f +(\256les are present,)2 805 1 4595 6648 t +10 B f +( =)1 0( e=)1 57( le)1 44( \256l)1 28( t\256)1 56( xt)1 33( ex)1 50(t te)1 77 8 1440 6768 t +10 I f +(\256lename)1785 6768 w +10 R f +(will overwrite the other information.)4 1494 1 2156 6768 t +10 S1 f +(\261 \261)1 65 1 1080 6936 t +10 B f +( c)1 0( oc)1 44(t to)1 83 3 1145 6936 t +10 R f +( this option,)2 502( With)1 271( of contents or PMA of a CD.)7 1273(Retrieve and print out the table)5 1300 4 1440 6936 t +10 B f +( d)1 0( rd)1 56( or)1 44( re ec co)3 138( dr)1 44(c cd)1 100 6 4824 6936 t +10 R f +(will)5244 6936 w +(work with CD-R drives and with CD-ROM drives.)7 2088 1 1440 7056 t +10 S1 f +(\261 \261)1 65 1 1080 7224 t +10 B f +( i)1 0( ti)1 28( it)1 33( ai)1 28(w wa)1 122 5 1145 7224 t +10 R f +(Wait for input to become available on standard input before trying to open the SCSI driver.)15 3960 1 1440 7224 t +(J)720 7704 w +(. .)1 47 1 759 7649 t +( 12)1 1829( change: Version 3.0)3 850( Last)1 1434(org Schilling)1 528 4 759 7704 t +cleartomark +showpage +restore +%%EndPage: 12 12 %%Page: 13 13 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF 104.275(CDRECORD\(1\) Schily\264s)72 48 R -(USER COMMANDS)2.5 E(CDRECORD\(1\))106.775 E(CDR_SPEED)144 84 Q -(Sets the def)180 96 Q(ault speed v)-.1 E(alue for writing \(see also) --.25 E/F1 10/Times-Bold@0 SF(\255speed)2.5 E F0(option\).)2.5 E -(CDR_FIFOSIZE)144 112.8 Q(Sets the def)180 124.8 Q -(ault size of the FIFO \(see also)-.1 E F1(fs=)2.5 E F0 2.5(#o)C -(ption\).)-2.5 E(An)144 141.6 Q 2.5(yo)-.15 G(ther label)-2.5 E .548 -(is an identi\214er for a speci\214c dri)180 153.6 R .848 -.15(ve o)-.25 -H 3.048(nt).15 G .548(he system.)-3.048 F .548 -(Such an identi\214er may not contain the)5.548 F(characters ',)180 -165.6 Q(', '/', '@' or ':'.)-.7 E 1.385(Each line that follo)180 189.6 R -1.384(ws a label contains a T)-.25 F 1.384(AB separated list of items.) --.93 F(Currently)6.384 E 3.884(,t)-.65 G(hree)-3.884 E .538 -(items are recognized: the SCSI ID of the dri)180 201.6 R -.15(ve)-.25 G -3.039(,t).15 G .539(he def)-3.039 F .539 -(ault speed that should be used for)-.1 F 1.447(this dri)180 213.6 R -1.747 -.15(ve a)-.25 H 1.447(nd the def).15 F 1.446 -(ault FIFO size that should be used for this dri)-.1 F -.15(ve)-.25 G -3.946(.T).15 G 1.446(he v)-3.946 F 1.446(alues for)-.25 F/F2 10 -/Times-Italic@0 SF(speed)180 225.6 Q F0(and)3.309 E F2(\214fosize)3.309 -E F0 .809(may be set to -1 to tell cdrecord to use the global def)3.309 -F 3.31(aults. A)-.1 F(typical)3.31 E(line may look this w)180 237.6 Q -(ay:)-.1 E(teac1= 0,5,0)180 261.6 Q 31(48)22.76 G(m)-31 E(yamaha= 1,6,0) -180 285.6 Q 25.17(-1 -1)12.76 F .334(This tells)180 309.6 R F1(cdr)2.834 -E(ecord)-.18 E F0 .334(that a dri)2.834 F .634 -.15(ve n)-.25 H(amed).15 -E F2(teac1)2.833 E F0 .333(is at scsib)2.833 F .333(us 0, tar)-.2 F .333 -(get 5, lun 0 and should be)-.18 F .531 -(used with speed 4 and a FIFO size of 8 MB.)180 321.6 R 3.031(As)5.531 G -.531(econd dri)-3.031 F .831 -.15(ve m)-.25 H .531(ay be found at scsib) -.15 F .532(us 1,)-.2 F(tar)180 333.6 Q(get 6, lun 0 and uses the def) --.18 E(ault speed and the def)-.1 E(ault FIFO size.)-.1 E/F3 10.95 -/Times-Bold@0 SF(SEE ALSO)72 362.4 Q F1(cdda2wa)108 374.4 Q(v)-.25 E F0 -(\(1\),)A F1 -.18(re)2.5 G(adcd).18 E F0(\(1\),)A F1(scg)2.5 E F0 -(\(7\),)A F1(fbk)2.5 E F0(\(7\),)A F1(mkisofs)2.5 E F0(\(8\),)A F1 -.18 -(rc)2.5 G(md).18 E F0(\(3\),)A F1(ssh)2.5 E F0(\(1\).)A F3(NO)72 403.2 Q -(TES)-.438 E F0 .505(On Solaris you need to stop the v)108 415.2 R .505 -(olume management if you lik)-.2 F 3.005(et)-.1 G 3.005(ou)-3.005 G .505 -(se the USCSI f)-3.005 F .505(allback SCSI transport)-.1 F(code. Ev)108 -427.2 Q(en things lik)-.15 E(e)-.1 E F1(cdr)2.5 E(ecord -scanb)-.18 E -(us)-.2 E F0(will not w)2.5 E(ork if the v)-.1 E -(olume management is running.)-.2 E .483(Disks made in)108 444 R F1 -.74 -(Tr)2.983 G .483(ack At Once).74 F F0 .484(mode are not suitable as a m\ -aster for direct mass production by CD manu-)2.983 F -.1(fa)108 456 S -3.973(cturers. Y).1 F 1.473(ou will need the)-1.1 F F1 1.473 -(disk at once)3.973 F F0 1.473(option to record such disks.)3.973 F(Ne) -6.473 E -.15(ve)-.25 G 1.473(rtheless the disks made in).15 F F1 -.74 -(Tr)108 468 S .207(ack At Once).74 F F0 .207 -(will normally be read in all CD players. Some old audio CD players ho) -2.707 F(we)-.25 E -.15(ve)-.25 G 2.708(rm).15 G .208(ay produce)-2.708 F -2.5(at)108 480 S .2 -.1(wo s)-2.5 H(econd click between tw).1 E 2.5(oa) --.1 G(udio tracks.)-2.5 E .563(The minimal size of a track is 4 seconds\ - or 300 sectors. If you write smaller tracks, the CD-Recorder will)108 -496.8 R(add dummy blocks. This is not an error)108 508.8 Q 2.5(,e)-.4 G --.15(ve)-2.75 G 2.5(nt).15 G(hough the SCSI-error message looks this w) --2.5 E(ay)-.1 E(.)-.65 E F1(Cdr)108 525.6 Q(ecord)-.18 E F0 1.773(has b\ -een tested on an upgraded Philips CDD-521 recorder at single and double\ - speed on a)4.273 F 4.317(SparcStation 20/502 with no problems, slo)108 -537.6 R 4.317(wer computer systems should w)-.25 F 4.316(ork also.)-.1 F -4.316(The ne)9.316 F(wer)-.25 E 1.149(Philips/HP/Plasmon/Grundig dri)108 -549.6 R -.15(ve)-.25 G 3.649(sa).15 G 3.649(sw)-3.649 G 1.149(ell as Y) --3.649 F 1.149(amaha CDR-100 and CDR-102 w)-1 F 1.15 -(ork also. The Plasmon)-.1 F .205(RF-4100 w)108 561.6 R .205(ork, b)-.1 -F .205(ut has not tested in multi session.)-.2 F 2.705(AP)5.205 G .205 -(hilips CDD-521 that has not been upgraded will not)-2.705 F -.1(wo)108 -573.6 S 2.933(rk. The).1 F(Son)2.933 E 2.933(yC)-.15 G .434 -(DU-924 has been tested, b)-2.933 F .434 -(ut does not support XA-mode2 in hardw)-.2 F 2.934(are. The)-.1 F(son) -2.934 E 2.934(yt)-.15 G(here-)-2.934 E .48 -(fore cannot create conforming multi session disks.)108 585.6 R .479 -(The Ricoh R)5.479 F .479(O-1420C w)-.4 F .479(orks, b)-.1 F .479 -(ut some people seem to)-.2 F(ha)108 597.6 Q .3 -.15(ve p)-.2 H -(roblems to use them with speed=2, try speed=0 in this case.).15 E .621 -(The Y)108 614.4 R .621(amaha CDR-400 and all ne)-1 F 3.121(wS)-.25 G -.621(CSI-3/mmc conforming dri)-3.121 F -.15(ve)-.25 G 3.122(sa).15 G -.622(re supported in single and multi-ses-)-3.122 F(sion.)108 626.4 Q --1.1(Yo)108 643.2 S 2.568(us)1.1 G .068(hould run se)-2.568 F -.15(ve) --.25 G .068(ral tests in all supported speeds of your dri).15 F .368 --.15(ve w)-.25 H .068(ith the).15 F F1(\255dummy)2.568 E F0 .068 -(option turned on if you)2.568 F 1.628(are using)108 655.2 R F1(cdr) -4.128 E(ecord)-.18 E F0 1.628(on an unkno)4.128 F 1.628 -(wn system. Writing a CD is a realtime process.)-.25 F F1(NFS)6.629 E F0 -1.629(will not al)4.129 F -.1(wa)-.1 G(ys).1 E(deli)108 667.2 Q -.15(ve) --.25 G 2.685(rc).15 G .185(onstantly the needed data rates.)-2.685 F -.185(If you w)5.185 F .185(ant to use)-.1 F F1(cdr)2.685 E(ecord)-.18 E -F0 .185(with CD-images that are located on a)2.685 F F1(NFS)108 679.2 Q -F0 .446 -(mounted \214lesystem, be sure that the \214fo size is big enough.)2.946 -F 2.947(Iu)5.447 G(sed)-2.947 E F1(cdr)2.947 E(ecord)-.18 E F0 .447 -(with with medium load)2.947 F 1.538(on a SS20/502 and e)108 691.2 R --.15(ve)-.25 G 4.038(na).15 G 4.038(tq)-4.038 G 1.538 -(uad speed on a Sparcstation-2 which w)-4.038 F 1.538(as hea)-.1 F 1.538 -(vily loaded, b)-.2 F 1.537(ut it is recom-)-.2 F .157(mended to lea)108 -703.2 R .457 -.15(ve t)-.2 H .157 -(he system as lightly loaded as possible while writing a CD.).15 F .158 -(If you w)5.158 F .158(ant to mak)-.1 F 2.658(es)-.1 G .158(ure that) --2.658 F -.2(bu)108 715.2 S -.25(ff).2 G(er underruns are not caused by\ - your source disk, you may use the command).25 E(J)72 768 Q -.25(..)-5.5 -K(or)-4.5 5.5 M 2.5(gS)-.18 G 153.065(chilling V)-2.5 F(ersion 2.0)-1.11 -E(13)201.225 E EP +save +mark +13 pagesetup +10 R f +(Schily)720 480 w +10 S1 f +(\302)976 480 w +10 R f +( \( 1 \))3 164( CDRECORD)1 3277(s USER COMMANDS)2 950 3 1009 480 t +(This allows)1 479 1 1440 960 t +10 B f +( d)1 0( rd)1 56( or)1 44( re ec co)3 138( dr)1 44(c cd)1 100 6 1959 960 t +10 R f +( additional sessions to a)4 1006(to read its input from a pipe even when writing)9 2013 2 2381 960 t +( disk,)1 226( writing another session to a multi-session)6 1731( When)1 304(multi-session disk.)1 759 4 1440 1080 t +10 B f +( s)1 0( fs)1 39( of)1 33( so)1 50( is)1 39( ki)1 28(m mk)1 139 7 4494 1080 t +10 R f +(needs to read)2 544 1 4856 1080 t +( be done if)3 463( cannot)1 305( This)1 250(the old session from the device before writing output.)8 2251 4 1440 1200 t +10 B f +( d)1 0( rd)1 56( or)1 44( re ec co)3 138( dr)1 44(c cd)1 100 6 4747 1200 t +10 R f +(opens)5167 1200 w +(the SCSI driver at the same time.)6 1372 1 1440 1320 t +10 S1 f +(\261 \261)1 65 1 1080 1488 t +10 B f +( o)1 0( fo)1 50( nf)1 33( in)1 56( ei)1 28( se)1 44(u us)1 95 7 1145 1488 t +10 R f +(Use)1440 1608 w +10 S f +(* *)1 50 1 1636 1608 t +10 B f +( f)1 0( nf)1 33( in)1 56(. .i)1 53 4 1686 1608 t +10 R f +( this option is used, the pregap size information,)8 2057( If)1 141(\256les to overwrite audio options.)4 1333 3 1869 1608 t +(the index information, the pre-emphasis information and the CD-Text information is read from)12 3960 1 1440 1728 t +(the)1440 1848 w +10 S f +(* *)1 50 1 1595 1848 t +10 B f +( f)1 0( nf)1 33( in)1 56(. .i)1 53 4 1645 1848 t +10 R f +(\256le that is associated with the \256le that contains the audio data for a track.)14 3022 1 1820 1848 t +(If used together with the)4 1008 1 1440 2088 t +10 S1 f +(\261 \261)1 65 1 2482 2088 t +10 B f +( o)1 0( io)1 50( ud di)2 84(a au)1 106 4 2547 2088 t +10 R f +(option,)2821 2088 w +10 B f +( d)1 0( rd)1 56( or)1 44( re ec co)3 138( dr)1 44(c cd)1 100 6 3136 2088 t +10 R f +(may be used to write audio CDs from a pipe)9 1848 1 3552 2088 t +(from)1440 2208 w +10 B f +( av v)2 50( wa)1 50( a2 2w)2 122( dd da)2 106(c cd)1 100 5 1669 2208 t +10 R f +(if you call)2 425 1 2132 2208 t +10 B f +( d)1 0( rd)1 56( or)1 44( re ec co)3 138( dr)1 44(c cd)1 100 6 2592 2208 t +10 R f +(with the)1 335 1 3009 2208 t +10 S f +(* *)1 50 1 3379 2208 t +10 B f +( f)1 0( nf)1 33( in)1 56(. .i)1 53 4 3429 2208 t +10 R f +( list instead of using)4 842(\256les as track parameter)3 952 2 3606 2208 t +( from)1 240( audio data is read)4 806( The)1 233(audio \256les.)1 459 4 1440 2328 t +10 B f +( n)1 0( in)1 56( di)1 28( td)1 56(s st)1 72 5 3224 2328 t +10 R f +( See)1 223(in this case.)2 511 2 3482 2328 t +10 I f +(EXAMPLES)4262 2328 w +10 R f +(section below.)1 598 1 4802 2328 t +10 B f +( d)1 0( rd)1 56( or)1 44( re ec co)3 138( dr)1 44(C Cd)1 128 6 1440 2448 t +10 R f +(\256rst veri\256es that)2 686 1 1893 2448 t +10 B f +( n)1 0( in)1 56( di)1 28( td)1 56(s st)1 72 5 2622 2448 t +10 R f +( connected to a terminal and runs some heuristic con-)9 2285(is not)1 238 2 2877 2448 t +(sistency checks on the)3 950 1 1440 2568 t +10 S f +(* *)1 50 1 2435 2568 t +10 B f +( f)1 0( nf)1 33( in)1 56(. .i)1 53 4 2485 2568 t +10 R f +( in the)2 292(\256les and then sets the track lengths from the information)9 2436 2 2672 2568 t +10 S f +(* *)1 50 1 1440 2688 t +10 B f +( f)1 0( nf)1 33( in)1 56(. .i)1 53 4 1490 2688 t +10 R f +(\256les.)1665 2688 w +( to write from)3 612(If you like)2 454 2 1440 2928 t +10 B f +( n)1 0( in)1 56( di)1 28( td)1 56(s st)1 72 5 2551 2928 t +10 R f +(, make sure that cdrecord is called with a large enough FIFO)11 2637 1 2763 2928 t +( drive and switch the)4 876(size, reduce the write speed to a value below the read speed of the source)14 3084 2 1440 3048 t +(burn-free option for the recording drive on.)6 1774 1 1440 3168 t +9 B f +( s)1 0( ns)1 35( on)1 50( io)1 45( ti)1 25( pt)1 30( op)1 50( o)1 75( I)1 0( SI)1 35( CS)1 50(S SC)1 115 12 900 3456 t +10 B f +( =)1 0( v=)1 57( ev)1 50(d de)1 100 4 1080 3576 t +10 I f +(target)1287 3576 w +10 R f +( typical target device)3 867( A)1 141( see notes above.)3 709(Set the SCSI target for the CD/DVD/BluRay-recorder,)6 2243 4 1440 3696 t +(speci\256cation is)1 613 1 1440 3816 t +10 B f +( =)1 0( v=)1 57( ev)1 50(d de)1 100 4 2094 3816 t +10 I f +(1,6,0)2301 3816 w +10 R f +( numerical target)2 706( a \256lename must be provided together with the)8 1987(. If)1 165 3 2542 3816 t +( correct \256lename in this case can be)7 1519( The)1 227( is implementation speci\256c.)3 1142(speci\256cation, the \256lename)2 1072 4 1440 3936 t +( a)1 90( On)1 201( target operating system.)3 1045(found in the system speci\256c manuals of the)7 1883 4 1440 4056 t +10 I f +(FreeBSD)4705 4056 w +10 R f +(system)5122 4056 w +(without)1440 4176 w +10 I f +(CAM)1780 4176 w +10 R f +( use the control device \(e.g.)5 1150(support, you need to)3 843 2 2025 4176 t +10 I f +(/dev/rcd0.ctl)4086 4176 w +10 R f +( correct device)2 606(\). A)1 198 2 4596 4176 t +(speci\256cation in this case may be)5 1330 1 1440 4296 t +10 B f +( =)1 0( v=)1 57( ev)1 50(d de)1 100 4 2803 4296 t +10 I f +(/dev/rcd0.ctl:)3010 4296 w +10 S1 f +(@)3545 4296 w +10 R f +(.)3670 4296 w +10 B f +( g)1 0( ng)1 50( in)1 56( ss si)2 67( re es)2 83( dd dr)2 100( ad)1 56( a)1 83( I)1 0( SI)1 39( CS)1 56( SC)1 72( S)1 89( l)1 0( al)1 28( er ra)2 94( ne)1 44( en)1 56(G Ge)1 122 19 1240 4536 t +10 R f +(The)1440 4656 w +10 I f +(target device)1 548 1 1650 4656 t +10 R f +(to the)1 255 1 2253 4656 t +10 B f +( =)1 0( v=)1 57( ev)1 50(d de)1 100 4 2563 4656 t +10 R f +(option refers to)2 670 1 2825 4656 t +10 I f +(scsibus)3550 4656 w +10 R f +(/)3847 4656 w +10 I f +(target)3875 4656 w +10 R f +(/)4122 4656 w +10 I f +(lun)4150 4656 w +10 R f +(of the CD/DVD/BluRay-)2 1067 1 4333 4656 t +( on)1 140(recorder. Communication)1 1042 2 1440 4776 t +10 I f +(SunOS)2662 4776 w +10 R f +(is done with the SCSI general driver)6 1544 1 2974 4776 t +10 B f +( .)1 0( g.)1 25( cg)1 50(s sc)1 83 4 4558 4776 t +10 R f +(Other operating)1 644 1 4756 4776 t +( is:)1 189( syntax)1 354( Possible)1 460(systems are using a library simulation of this driver.)8 2623 4 1440 4896 t +10 B f +( =)1 0( v=)1 57( ev)1 50(d de)1 100 4 5193 4896 t +10 I f +(scsibus)1440 5016 w +10 R f +(,)1737 5016 w +10 I f +(target)1762 5016 w +10 R f +(,)2009 5016 w +10 I f +(lun)2034 5016 w +10 R f +(or)2204 5016 w +10 B f +( =)1 0( v=)1 57( ev)1 50(d de)1 100 4 2329 5016 t +10 I f +(target)2578 5016 w +10 R f +(,)2825 5016 w +10 I f +(lun)2850 5016 w +10 R f +( the latter case, the CD/DVD/BluRay-recorder has to)7 2231(. In)1 183 2 2986 5016 t +( SCSI bus of the machine.)5 1184(be connected to the default)4 1183 2 1440 5136 t +10 I f +(Scsibus)3893 5136 w +10 R f +(,)4201 5136 w +10 I f +(target)4279 5136 w +10 R f +(and)4571 5136 w +10 I f +(lun)4768 5136 w +10 R f +(are integer)1 451 1 4949 5136 t +( require to specify a)4 852(numbers. Some operating systems or SCSI transport implementations may)8 3108 2 1440 5256 t +( this case the correct syntax for the device is:)9 2441( In)1 213(\256lename in addition.)2 969 3 1440 5376 t +10 B f +( =)1 0( v=)1 57( ev)1 50(d de)1 100 4 5193 5376 t +10 I f +(devicename)1440 5496 w +10 R f +(:)1918 5496 w +10 I f +(scsibus)1946 5496 w +10 R f +(,)2243 5496 w +10 I f +(target)2268 5496 w +10 R f +(, or)1 143 1 2515 5496 t +10 B f +( =)1 0( v=)1 57( ev)1 50(d de)1 100 4 2693 5496 t +10 I f +(devicename)2935 5496 w +10 R f +(:)3413 5496 w +10 I f +(target)3441 5496 w +10 R f +(,)3688 5496 w +10 I f +(lun)3713 5496 w +10 R f +( the name of the device node that)7 1392(. If)1 159 2 3849 5496 t +( the form)2 390(has been speci\256ed on such a system refers to exactly one SCSI device, a shorthand in)15 3570 2 1440 5616 t +10 B f +( =)1 0( v=)1 57( ev)1 50(d de)1 100 4 1440 5736 t +10 I f +(devicename)1756 5736 w +10 R f +(:)2234 5736 w +10 S1 f +(@)2262 5736 w +10 R f +(or)2463 5736 w +10 B f +( =)1 0( v=)1 57( ev)1 50(d de)1 100 4 2655 5736 t +10 I f +(devicename)2971 5736 w +10 R f +(:)3449 5736 w +10 S1 f +(@)3477 5736 w +10 R f +(,)3577 5736 w +10 I f +(lun)3602 5736 w +10 R f +(may be used instead of)4 1247 1 3838 5736 t +10 B f +( =)1 0( v=)1 57( ev)1 50(d de)1 100 4 5193 5736 t +10 I f +(devicename)1440 5856 w +10 R f +(:)1918 5856 w +10 I f +(scsibus)1946 5856 w +10 R f +(,)2243 5856 w +10 I f +(target)2268 5856 w +10 R f +(,)2515 5856 w +10 B f +( g)1 0( ng)1 50( in)1 56( ss si)2 67( re es)2 83( dd dr)2 100( ad)1 56( a)1 83( I)1 0( SI)1 39( CS)1 56( SC)1 72( S)1 89( e)1 0( te)1 44( ot)1 33( mo)1 50( em)1 83(R Re)1 116 19 1240 6096 t +10 R f +( to prepend the SCSI device name by a remote device)10 2240(To access remote SCSI devices, you need)6 1720 2 1440 6216 t +(indicator. The remote device indicator is either)6 1961 1 1440 6336 t +10 B f +( :)1 0( TE E:)2 100( OT)1 67( MO)1 78( EM)1 94(R RE)1 139 6 3441 6336 t +10 I f +(user)3919 6336 w +10 S1 f +(@)4091 6336 w +10 I f +(host:)4183 6336 w +10 R f +(or)4456 6336 w +10 B f +( :)1 0( TE E:)2 100( OT)1 67( MO)1 78( EM)1 94(R RE)1 139 6 4578 6336 t +10 I f +(host:)5056 6336 w +10 R f +(A)5328 6336 w +(valid remote SCSI device name may be:)6 1741 1 1440 6456 t +10 B f +( :)1 0( TE E:)2 100( OT)1 67( MO)1 78( EM)1 94(R RE)1 139 6 3261 6456 t +10 I f +(user)3739 6456 w +10 S1 f +(@)3911 6456 w +10 I f +(host:)4003 6456 w +10 R f +( bus)1 187(to allow remote SCSI)3 930 2 4283 6456 t +(scanning or)1 482 1 1440 6576 t +10 B f +( :)1 0( TE E:)2 100( OT)1 67( MO)1 78( EM)1 94(R RE)1 139 6 1966 6576 t +10 I f +(user)2444 6576 w +10 S1 f +(@)2616 6576 w +10 I f +(host:1,0,0)2708 6576 w +10 R f +( SCSI device at)3 673(to access the)2 542 2 3152 6576 t +10 I f +(host)4410 6576 w +10 R f +(connected to SCSI)2 780 1 4620 6576 t +(bus)1440 6696 w +10 S1 f +(#)1614 6696 w +10 R f +( to a speci\256c)3 535( order to allow remote access)5 1216( In)1 151(1,target 0, lun 0.)3 685 4 1699 6696 t +10 I f +(host)4322 6696 w +10 R f +(, the)1 183 1 4497 6696 t +10 B f +( i)1 0( si)1 28( cs)1 39( sc)1 44(r rs)1 83 5 4716 6696 t +10 R f +(\(1\) program)1 490 1 4910 6696 t +(needs to be present and con\256gured on the)7 1711 1 1440 6816 t +10 I f +(host)3184 6816 w +10 R f +(.)3359 6816 w +10 B f +( s)1 0( ts)1 39( rt)1 33( or)1 44( po)1 50( sp)1 56( ns)1 39( an)1 56( ra)1 50( tr)1 44( t)1 66( I)1 0( SI)1 39( CS)1 56( SC)1 72( S)1 89( e)1 0( te)1 44( at)1 33( na)1 50( er rn)2 100( te)1 44( lt)1 33(A Al)1 100 24 1240 7056 t +( d)1 0( rd)1 56( or)1 44( re ec co)3 138( dr)1 44(C Cd)1 128 6 1440 7176 t +10 R f +(is completely based on)3 1090 1 1934 7176 t +10 B f +( I)1 0( SI)1 39( CS)1 56(S SC)1 128 4 3108 7176 t +10 R f +(commands but this is no problem as all)7 1984 1 3416 7176 t +(CD/DVD/BluRay writers ever made use)4 1658 1 1440 7296 t +10 B f +( I)1 0( SI)1 39( CS)1 56(S SC)1 128 4 3133 7296 t +10 R f +(commands for the communication. Even)4 1663 1 3391 7296 t +10 B f +( I)1 0( PI)1 39( AP)1 61( TA)1 72(A AT)1 139 5 5089 7296 t +10 R f +(J)720 7776 w +(. .)1 47 1 759 7721 t +( 13)1 1829( change: Version 3.0)3 850( Last)1 1434(org Schilling)1 528 4 759 7776 t +cleartomark +showpage +restore +%%EndPage: 13 13 %%Page: 14 14 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF 104.275(CDRECORD\(1\) Schily\264s)72 48 R -(USER COMMANDS)2.5 E(CDRECORD\(1\))106.775 E/F1 10/Times-Bold@0 SF(cdr) -118 84 Q(ecord -dummy de)-.18 E(v=2,0 padsize=600m /de)-.15 E(v/null) --.15 E F0 .835(to create a disk that is entirely made of dummy data.)108 -100.8 R F1(Cdr)5.835 E(ecord)-.18 E F0 .834 -(needs to run as root to get access to the)3.335 F F1(/de)108 112.8 Q -(v/scg?)-.15 E F0(de)5 E -(vice nodes and to be able to lock itself into memory)-.25 E(.)-.65 E -.043(If you don')108 129.6 R 2.543(tw)-.18 G .043(ant to allo)-2.643 F -2.543(wu)-.25 G .043(sers to become root on your system,)-2.543 F F1 -(cdr)2.543 E(ecord)-.18 E F0 .044(may safely be installed suid root.) -2.543 F .937(This allo)108 141.6 R .936 -(ws all users or a group of users with no root pri)-.25 F(vile)-.25 E -.936(ges to use)-.15 F F1(cdr)3.436 E 3.436(ecord. Cdr)-.18 F(ecord)-.18 -E F0 .936(in this case)3.436 F 1.423(checks, if the real user w)108 -153.6 R 1.423(ould ha)-.1 F 1.723 -.15(ve b)-.2 H 1.423 -(een able to read the speci\214ed \214les.).15 F 3.024 -.8(To g)6.424 H --2.15 -.25(iv e).8 H 1.424(all user access to use)4.174 F F1(cdr)108 -165.6 Q(ecord,)-.18 E F0(enter:)2.5 E(cho)144 182.4 Q -(wn root /usr/local/bin/cdrecord)-.25 E -(chmod 4711 /usr/local/bin/cdrecord)144 194.4 Q 1.6 -.8(To g)108 211.2 T --2.15 -.25(iv e).8 H 2.5(ar)2.75 G -(estricted group of users access to cdrecord enter:)-2.5 E(cho)144 228 Q -(wn root /usr/local/bin/cdrecord)-.25 E(chgrp cdb)144 240 Q -(urners /usr/local/bin/cdrecord)-.2 E -(chmod 4710 /usr/local/bin/cdrecord)144 252 Q(and add a group)108 268.8 -Q/F2 10/Times-Italic@0 SF(cdb)2.5 E(urner)-.2 E(s)-.1 E F0 -(on your system.)2.5 E(Ne)108 285.6 Q -.15(ve)-.25 G 3.03(rg).15 G -2.15 --.25(iv e)-3.03 H .53(write permissions for non root users to the)3.28 F -F2(/de)3.03 E(v/scg?)-.15 E F0(de)5.53 E .53(vices unless you w)-.25 F -.53(ould allo)-.1 F 3.03(wa)-.25 G -.15(ny)-3.03 G(body).15 E -(to read/write/format all your disks.)108 297.6 Q -1.1(Yo)108 314.4 S -3.356(us)1.1 G .856(hould not connect old dri)-3.356 F -.15(ve)-.25 G -3.356(st).15 G .857 -(hat do not support disconnect/reconnect to either the SCSI b)-3.356 F -.857(us that is)-.2 F(connected to the CD-Recorder or the source disk.) -108 326.4 Q 2.5(AC)108 343.2 S(ompact Disc can ha)-2.5 E .3 -.15(ve n) --.2 H 2.5(om).15 G(ore than 99 tracks.)-2.5 E .635(When creating a disc\ - with both audio and data tracks, the data should be on track 1 otherwi\ -se you should)108 360 R .267(create a CDplus disk which is a multi sess\ -ion disk with the \214rst session containing the audio tracks and the) -108 372 R(follo)108 384 Q(wing session containing the data track.)-.25 E -(Man)108 400.8 Q 3.179(yo)-.15 G .679(perating systems are not able to \ -read more than a single data track, or need special softw)-3.179 F .679 -(are to do)-.1 F(so.)108 412.8 Q(More information on the SCSI command s\ -et of a HP CD-Recorder can be found at:)108 429.6 Q(http://www)144 446.4 -Q(.hp.com/isgsupport/cdr/inde)-.65 E(x.html)-.15 E .72(If you ha)108 -463.2 R 1.02 -.15(ve m)-.2 H .721(ore information or SCSI command manua\ -ls for currently unsupported CD-Recorders please).15 F -(contact the author)108 475.2 Q(.)-.55 E 1.333 -(The Philips CDD 521 CD-Recorder \(e)108 492 R -.15(ve)-.25 G 3.833(ni) -.15 G 3.833(nt)-3.833 G 1.333(he upgraded v)-3.833 F 1.333 -(ersion\) has se)-.15 F -.15(ve)-.25 G 1.332(ral \214rmw).15 F 1.332 -(are b)-.1 F 1.332(ugs. Some of)-.2 F(them will force you to po)108 504 -Q(wer c)-.25 E(ycle the de)-.15 E(vice or to reboot the machine.)-.25 E -.404(When using)108 520.8 R F1(cdr)2.904 E(ecord)-.18 E F0 .404 -(with the brok)2.904 F(en)-.1 E F1 .404(Linux SCSI generic dri)2.904 F --.1(ve)-.1 G -1(r.).1 G F0 -1.1(Yo)6.404 G 2.905(us)1.1 G .405 -(hould note that)-2.905 F F1(cdr)2.905 E(ecord)-.18 E F0 .405(uses a) -2.905 F .054 -(hack, that tries to emulate the functionality of the scg dri)108 532.8 -R -.15(ve)-.25 G 3.654 -.55(r. U).15 H(nfortunately).55 E 2.554(,t)-.65 -G .054(he sg dri)-2.554 F -.15(ve)-.25 G 2.554(ro).15 G(n)-2.554 E F1 -(Linux)2.554 E F0 .053(has se)2.553 F(v-)-.25 E(eral se)108 544.8 Q -.15 -(ve)-.25 G(re b).15 E(ugs:)-.2 E 32.5<8349>108 561.6 S 2.5(tc)-32.5 G -(annot see if a SCSI command could not be sent at all.)-2.5 E 32.5<8349> -108 578.4 S 2.532(tc)-32.5 G .032(annot get the SCSI status byte.)-2.532 -F F1(Cdr)5.033 E(ecord)-.18 E F0 .033(for that reason cannot report f) -2.533 F .033(ailing SCSI commands)-.1 F(in some situations.)144 590.4 Q -32.5<8349>108 607.2 S 3.212(tc)-32.5 G .711 -(annot get real DMA count of transfer)-3.212 F(.)-.55 E F1(Cdr)5.711 E -(ecord)-.18 E F0 .711(cannot tell you if there is an DMA residual)3.211 -F(count.)144 619.2 Q 32.5<8349>108 636 S 3.109(tc)-32.5 G .609 -(annot get number of bytes v)-3.109 F .609(alid in auto sense data.)-.25 -F F1(Cdr)5.61 E(ecord)-.18 E F0 .61(cannot tell you if de)3.11 F .61 -(vice trans-)-.25 F(fers no sense data at all.)144 648 Q 32.5<8349>108 -664.8 S 2.5(tf)-32.5 G(etches to fe)-2.5 E 2.5(wd)-.25 G -(ata in auto request sense \(CCS/SCSI-2/SCSI-3 needs >= 18\).)-2.5 E -.263(The \214fo percent output is computed just after a block of data h\ -as been written to the CD-Recorder)108 681.6 R 2.762(.F)-.55 G .262 -(or this)-2.912 F(reason, there will ne)108 693.6 Q -.15(ve)-.25 G 2.5 -(rb).15 G 2.5(e1)-2.5 G -(00% \214fo \214ll, while the \214fo is in streaming mode.)-2.5 E(J)72 -768 Q -.25(..)-5.5 K(or)-4.5 5.5 M 2.5(gS)-.18 G 153.065(chilling V)-2.5 -F(ersion 2.0)-1.11 E(14)201.225 E EP +save +mark +14 pagesetup +10 R f +(Schily)720 480 w +10 S1 f +(\302)976 480 w +10 R f +( \( 1 \))3 164( CDRECORD)1 3277(s USER COMMANDS)2 950 3 1009 480 t +(drives are just)2 606 1 1440 960 t +10 B f +( I)1 0( SI)1 39( CS)1 56(S SC)1 128 4 2094 960 t +10 R f +( use the)2 353(drives that inherently)2 895 2 2365 960 t +10 I f +(ATA packet interface)2 891 1 3662 960 t +10 R f +(as)4602 960 w +10 B f +( I)1 0( SI)1 39( CS)1 56(S SC)1 128 4 4734 960 t +10 R f +(command)5006 960 w +( need to specify an alternate tran-)6 1395( may)1 209( You)1 242(transport layer build into the IDE \(ATA\) transport.)7 2114 4 1440 1080 t +( fully integrated kernel driver)4 1211( if your OS does not implement a)7 1386( line)1 216(sport layer on the command)4 1147 4 1440 1200 t +(subsystem that allows to access any drive using)7 1971 1 1440 1320 t +10 B f +( I)1 0( SI)1 39( CS)1 56(S SC)1 128 4 3446 1320 t +10 R f +(commands via a single unique user inter-)6 1696 1 3704 1320 t +(face.)1440 1440 w +( devices via alternate transport layers, you need to prepend the SCSI device)12 3289(To access SCSI)2 671 2 1440 1680 t +( indicator may be something like)5 1468( transport layer)2 668( The)1 245(name by a transport layer indicator.)5 1579 4 1440 1800 t +10 B f +( :)1 0( I:)1 33( SI)1 39( CS)1 56( SC)1 72(U US)1 128 6 1440 1920 t +10 R f +(or)1812 1920 w +10 B f +( :)1 0( I:)1 33( PI)1 39( AP)1 61( TA)1 72(A AT)1 139 6 1939 1920 t +10 R f +( of supported transport layers for your platform, use)8 2231( get a list)3 421(. To)1 213 3 2283 1920 t +10 B f +( =)1 0( v=)1 57( ev)1 50(d de)1 100 4 5193 1920 t +10 I f +(HELP)1440 2040 w +10 R f +(:)1698 2040 w +10 B f +( un nd d)3 112( ou)1 56( ro)1 50( gr)1 44( kg)1 50( ck)1 56( ac)1 44( Ba)1 50( B)1 100( y)1 0( ty)1 50( il li it)3 89( bi)1 28( ab)1 56( ta)1 50( rt)1 33( or)1 44(P Po)1 111 18 1240 2280 t +10 R f +(To make)1 368 1 1440 2400 t +10 B f +( d)1 0( rd)1 56( or)1 44( re ec co)3 138( dr)1 44(c cd)1 100 6 1849 2400 t +10 R f +(portable to all)2 587 1 2272 2400 t +8 R f +(UNIX)2893 2400 w +10 R f +(platforms, the syntax)2 875 1 3134 2400 t +10 B f +( =)1 0( v=)1 57( ev)1 50(d de)1 100 4 4051 2400 t +10 I f +(devicename)4300 2400 w +10 R f +(:)4778 2400 w +10 I f +(scsibus)4806 2400 w +10 R f +(,)5103 2400 w +10 I f +(target)5128 2400 w +10 R f +(,)5375 2400 w +( speci\256c)1 348( A)1 148( names from the user.)4 934(is preferred as it hides OS speci\256c knowledge about device)9 2530 4 1440 2520 t +( nor a way to specify)5 909(OS may not necessarily support a way to specify a real device \256le name)13 3051 2 1440 2640 t +10 I f +(scsibus)1440 2760 w +10 R f +(,)1737 2760 w +10 I f +(target)1762 2760 w +10 R f +(,)2009 2760 w +10 I f +(lun)2034 2760 w +10 R f +(.)2170 2760 w +10 I f +(Scsibus)1440 3000 w +10 R f +( the machine. Watch the boot messages for more informa-)9 2434(0 is the default SCSI bus on)6 1189 2 1777 3000 t +(tion or look into)3 675 1 1440 3120 t +10 B f +( s)1 0( es)1 39( ag ge)2 94( ss sa)2 89( es)1 39( me)1 44( /m)1 83( m/)1 28( dm)1 83( ad)1 56( /a)1 50( r/)1 28( va ar)2 94(/ /v)1 78 14 2149 3120 t +10 R f +(for more information about the SCSI con\256guration of your)8 2412 1 2988 3120 t +( you have problems to \256gure out what values for)9 2029(machine. If)1 497 2 1440 3240 t +10 I f +(scsibus)4001 3240 w +10 R f +(,)4298 3240 w +10 I f +(target)4323 3240 w +10 R f +(,)4570 3240 w +10 I f +(lun)4595 3240 w +10 R f +(should be used,)2 641 1 4759 3240 t +(try the)1 266 1 1440 3360 t +10 S1 f +(\261 \261)1 65 1 1739 3360 t +10 B f +( s)1 0( nb bu us)3 151( an)1 56( ca)1 50(s sc)1 83 5 1804 3360 t +10 R f +(option of)1 372 1 2177 3360 t +10 B f +( d)1 0( rd)1 56( or)1 44( re ec co)3 138( dr)1 44(c cd)1 100 6 2582 3360 t +10 R f +(described below.)1 684 1 2997 3360 t +10 B f +( s)1 0( ce es)2 83( ic)1 44( vi)1 28( ev)1 50( de)1 44( d)1 89( r)1 0( or)1 44( fo)1 50( f)1 66( s)1 0( es)1 39( me)1 44( am)1 83( na)1 50( n)1 89( l)1 0( al)1 28( ca)1 50( ic)1 44( og gi)2 78( lo)1 50( l)1 61( g)1 0( ng)1 50( in)1 56( si)1 28(U Us)1 111 29 1240 3600 t +10 R f +(If no)1 220 1 1440 3720 t +10 I f +(dev)1714 3720 w +10 R f +(option is present,)2 744 1 1906 3720 t +10 B f +( d)1 0( rd)1 56( or)1 44( re ec co)3 138( dr)1 44(c cd)1 100 6 2704 3720 t +10 R f +(will try to get the device from the)7 1550 1 3140 3720 t +10 B f +(C CD DR R)3 216 1 4745 3720 t +10 S f +(_ _)1 50 1 4961 3720 t +10 B f +( E)1 0( CE)1 67( IC)1 72( VI)1 39( EV)1 72(D DE)1 139 6 5011 3720 t +10 R f +(environment.)1440 3840 w +( the argument to the)4 1007(If a \256le /etc/default/cdrecord exists, and if)6 1977 2 1440 4080 t +10 B f +( =)1 0( v=)1 57( ev)1 50(d de)1 100 4 4501 4080 t +10 R f +(option or the)2 615 1 4785 4080 t +10 B f +(C CD DR R)3 216 1 1440 4200 t +10 S f +(_ _)1 50 1 1656 4200 t +10 B f +( E)1 0( CE)1 67( IC)1 72( VI)1 39( EV)1 72(D DE)1 139 6 1706 4200 t +10 R f +( not contain the characters ',', '/', ')7 1474(environment does)1 726 2 2133 4200 t +10 S1 f +(@)4333 4200 w +10 R f +(' or ':', it is interpreted)5 975 1 4425 4200 t +(as a device label name that was de\256ned in the \256le /etc/default/cdrecord \(see FILES section\).)14 3779 1 1440 4320 t +10 B f +( e)1 0( de)1 44( od)1 56( Mo)1 50( M)1 127( t)1 0( et)1 33( ge)1 44( rg)1 50( ar)1 44( ta)1 50( ot)1 33( to)1 50( ut)1 33(A Au)1 128 15 1240 4560 t +10 R f +(If no)1 203 1 1440 4680 t +10 B f +( =)1 0( v=)1 57( ev)1 50(d de)1 100 4 1680 4680 t +10 R f +( no)1 138(option and)1 437 2 1924 4680 t +10 B f +(C CD DR R)3 216 1 2537 4680 t +10 S f +(_ _)1 50 1 2753 4680 t +10 B f +( E)1 0( CE)1 67( IC)1 72( VI)1 39( EV)1 72(D DE)1 139 6 2803 4680 t +10 R f +(environment is present, or if it only contains a tran-)9 2170 1 3230 4680 t +(sport speci\256er but no address notation,)5 1618 1 1440 4800 t +10 B f +( d)1 0( rd)1 56( or)1 44( re ec co)3 138( dr)1 44(c cd)1 100 6 3098 4800 t +10 R f +(tries to scan the SCSI address space for CD-)8 1881 1 3519 4800 t +( exactly one is found, this is used by default.)9 1851( If)1 132(ROM drives.)1 530 3 1440 4920 t +10 B f +( =)1 0( g=)1 57( bu ug)2 106( eb)1 56(d de)1 100 5 1080 5088 t +10 S1 f +(#)1399 5088 w +10 I f +(,)1449 5088 w +10 S1 f +(\261 \261)1 65 1 1515 5088 t +10 B f +(d d)1 56 1 1580 5088 t +10 R f +(Set the misc debug value to)5 1167 1 1440 5208 t +10 S1 f +(#)2645 5208 w +10 R f +(\(with debug=)1 549 1 2733 5208 t +10 S1 f +(#)3282 5208 w +10 R f +( the misc debug level by one \(with)7 1477(\) or increment)2 591 2 3332 5208 t +10 S1 f +(\261)1440 5328 w +10 R f +(d\). If you specify)3 729 1 1505 5328 t +10 S1 f +(\261)2272 5328 w +10 I f +(dd,)2337 5328 w +10 R f +(this equals to)2 554 1 2500 5328 t +10 B f +( =)1 0( g=)1 57( bu ug)2 106( eb)1 56(d de)1 100 5 3092 5328 t +10 I f +(2.)3411 5328 w +10 R f +(This may help to \256nd problems while open-)7 1843 1 3557 5328 t +( Using)1 306(ing a driver for libscg as well as with sector sizes and sector types.)13 2773 2 1440 5448 t +10 S1 f +(\261 \261)1 65 1 4553 5448 t +10 B f +( g)1 0( bu ug)2 106( eb)1 56(d de)1 100 4 4618 5448 t +10 R f +(slows down)1 485 1 4915 5448 t +(the process and may be the reason for a buffer underrun.)10 2331 1 1440 5568 t +10 B f +( =)1 0( g=)1 57( bu ug)2 106( eb)1 56(k kd de)2 156 5 1080 5736 t +10 S1 f +(#)1455 5736 w +10 R f +(,)1505 5736 w +10 B f +( =)1 0(k kd d=)2 169 2 1563 5736 t +10 S1 f +(#)1732 5736 w +10 R f +(Tell the)1 316 1 1440 5856 t +10 B f +( g)1 0( cg)1 50(s sc)1 83 3 1789 5856 t +10 R f +(-driver to modify the kernel debug value while SCSI commands are running.)11 3156 1 1922 5856 t +10 S1 f +(\261 \261)1 65 1 1080 6024 t +10 B f +( t)1 0( et)1 33( se)1 44(r re es)2 127 4 1145 6024 t +10 R f +( This does not work on all operat-)7 1449(Try to reset the SCSI bus where the CD-recorder is located.)10 2511 2 1440 6024 t +(ing systems.)1 503 1 1440 6144 t +10 S1 f +(\261 \261)1 65 1 1080 6312 t +10 B f +( s)1 0( nb bu us)3 151( an)1 56( ca)1 50(s sc)1 83 5 1145 6312 t +10 R f +( be used)2 345(Scan all SCSI devices on all SCSI busses and print the inquiry strings. This option may)15 3615 2 1440 6432 t +( numbers printed out)3 878( The)1 229( on a system.)3 570(to \256nd SCSI address of the CD/DVD/BluRay-recorder)6 2283 4 1440 6552 t +(as labels are computed by:)4 1091 1 1440 6672 t +10 B f +( s)1 0(b bu us)2 151 2 2564 6672 t +10 S f +(* *)1 50 1 2748 6672 t +10 B f +( t)1 0( et)1 33( ge)1 44( rg)1 50( ar)1 44( ta)1 50( t)1 66( +)1 0( +)1 90(1 10 00 0)3 150 10 2831 6672 t +10 S1 f +(\261 \261)1 65 1 1080 6840 t +10 B f +( t)1 0( nt)1 33( en)1 56( il le)2 72(s si)1 67 5 1145 6840 t +10 R f +(,)1373 6840 w +10 S1 f +(\261 \261)1 65 1 1431 6840 t +10 B f +(s s)1 39 1 1496 6840 t +10 R f +(Do not print out a status report for failed SCSI commands.)10 2420 1 1440 6960 t +10 B f +( =)1 0( t=)1 57( ut)1 33( ou)1 56( eo)1 50( me)1 44( im)1 83(t ti)1 61 8 1080 7128 t +10 S1 f +(#)1464 7128 w +10 R f +(Set the default SCSI command timeout value to)7 2139 1 1440 7248 t +10 S1 f +(#)3637 7248 w +10 R f +( default SCSI command)3 1060(seconds. The)1 587 2 3753 7248 t +(J)720 7728 w +(. .)1 47 1 759 7673 t +( 14)1 1829( change: Version 3.0)3 850( Last)1 1434(org Schilling)1 528 4 759 7728 t +cleartomark +showpage +restore +%%EndPage: 14 14 %%Page: 15 15 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF 104.275(CDRECORD\(1\) Schily\264s)72 48 R -(USER COMMANDS)2.5 E(CDRECORD\(1\))106.775 E/F1 10.95/Times-Bold@0 SF -(DIA)72 84 Q(GNOSTICS)-.602 E F0 -1.1(Yo)108 96 S 2.5(uh)1.1 G -2.25 -.2 -(av e)-2.5 H 2.5(9s)2.7 G(econds to type ^C to abort)-2.5 E/F2 10 -/Times-Bold@0 SF(cdr)2.5 E(ecord)-.18 E F0(after you see the message:) -2.5 E(Starting to write CD at speed %d in %s mode for %s session.)108 -112.8 Q 2.5(At)108 129.6 S -(ypical error message for a SCSI command looks lik)-2.5 E(e:)-.1 E -(cdrecord: I/O error)144 153.6 Q 2.5(.t)-.55 G -(est unit ready: scsi sendcmd: no error)-2.5 E 2.5(CDB: 00)144 165.6 R -(20 00 00 00 00)2.5 E(status: 0x2 \(CHECK CONDITION\))144 177.6 Q -(Sense Bytes: 70 00 05 00 00 00 00 0A 00 00 00 00 25 00 00 00 00 00)144 -189.6 Q(Sense K)144 201.6 Q -.15(ey)-.25 G 2.5(:0).15 G(x5 Ille)-2.5 E --.05(ga)-.15 G 2.5(lR).05 G(equest, Se)-2.5 E(gment 0)-.15 E -(Sense Code: 0x25 Qual 0x00 \(logical unit not supported\) Fru 0x0)144 -213.6 Q(Sense \215ags: Blk 0 \(not v)144 225.6 Q(alid\))-.25 E -(cmd \214nished after 0.002s timeout 40s)144 237.6 Q .351 -(The \214rst line gi)108 261.6 R -.15(ve)-.25 G 2.851(si).15 G .352 -(nformation about the transport of the command.)-2.851 F .352(The te) -5.352 F .352(xt after the \214rst colon gi)-.15 F -.15(ve)-.25 G 2.852 -(st).15 G(he)-2.852 E .041(error te)108 273.6 R .041 -(xt for the system call from the vie)-.15 F 2.541(wo)-.25 G 2.541(ft) --2.541 G .04(he k)-2.541 F .04(ernel. It usually is:)-.1 F F2 .04 -(I/O err)2.54 F(or)-.18 E F0 .04(unless other problems hap-)2.54 F .579 -(pen. The ne)108 285.6 R .579(xt w)-.15 F .579 -(ords contain a short description for the SCSI command that f)-.1 F .58 -(ails. The rest of the line tells)-.1 F .051(you if there were an)108 -297.6 R 2.551(yp)-.15 G .051(roblems for the transport of the command o) --2.551 F -.15(ve)-.15 G 2.551(rt).15 G .051(he SCSI b)-2.551 F(us.)-.2 E -F2 .051(fatal err)5.051 F(or)-.18 E F0 .051(means that)2.551 F(it w)108 -309.6 Q(as not possible to transport the command \(i.e. no de)-.1 E -(vice present at the requested SCSI address\).)-.25 E -(The second line prints the SCSI command descriptor block for the f)108 -326.4 Q(ailed command.)-.1 E .706(The third line gi)108 343.2 R -.15(ve) --.25 G 3.206(si).15 G .707(nformation on the SCSI status code returned \ -by the command, if the transport of the)-3.206 F(command succeeds.)108 -355.2 Q(This is error information from the SCSI de)5 E(vice.)-.25 E -(The fourth line is a he)108 372 Q 2.5(xd)-.15 G -(ump of the auto request sense information for the command.)-2.5 E .846 -(The \214fth line is the error te)108 388.8 R .846(xt for the sense k) --.15 F 1.146 -.15(ey i)-.1 H 3.346(fa).15 G -.25(va)-3.546 G .846 -(ilable, follo).25 F .846(wed by the se)-.25 F .846 -(gment number that is only)-.15 F -.25(va)108 400.8 S .421 -(lid if the command w).25 F .421(as a)-.1 F/F3 10/Times-Italic@0 SF -(copy)2.921 E F0 .421(command. If the error message is not directly rel\ -ated to the current com-)2.921 F(mand, the te)108 412.8 Q(xt)-.15 E F3 -(deferr)2.5 E(ed err)-.37 E(or)-.45 E F0(is appended.)2.5 E 1.279 -(The sixth line is the error te)108 429.6 R 1.279 -(xt for the sense code and the sense quali\214er if a)-.15 F -.25(va)-.2 -G 3.778(ilable. If).25 F 1.278(the type of the)3.778 F(de)108 441.6 Q -.012(vice is kno)-.25 F .012 -(wn, the sense data is decoded from tables in)-.25 F F3(scsierr)2.512 E -(s.c)-.1 E F0 5.012(.T)2.822 G .012(he te)-5.012 F .012(xt is follo)-.15 -F .012(wed by the error v)-.25 F(alue)-.25 E -(for a \214eld replaceable unit.)108 453.6 Q 1.069(The se)108 470.4 R --.15(ve)-.25 G 1.069 -(nth line prints the block number that is related to the f).15 F 1.069 -(ailed command and te)-.1 F 1.069(xt for se)-.15 F -.15(ve)-.25 G 1.068 -(ral error).15 F(\215ags. The block number may not be v)108 482.4 Q -(alid.)-.25 E .356(The eight line reports the timeout set up for this c\ -ommand and the time that the command really needed to)108 499.2 R -(complete.)108 511.2 Q(The follo)108 528 Q -(wing message is not an error:)-.25 E -.35(Tr)144 540 S(ack 01: T).35 E -(otal bytes read/written: 2048/2048 \(1 sectors\).)-.8 E -(cdrecord: I/O error)144 552 Q 2.5<2e8d>-.55 G -(ush cache: scsi sendcmd: no error)-2.5 E 2.5(CDB: 35)144 564 R -(00 00 00 00 00 00 00 00 00)2.5 E(status: 0x2 \(CHECK CONDITION\))144 -576 Q -(Sense Bytes: F0 00 05 80 00 00 27 0A 00 00 00 00 B5 00 00 00 00 00)144 -588 Q(Sense K)144 600 Q -.15(ey)-.25 G 2.5(:0).15 G(x5 Ille)-2.5 E -.05 -(ga)-.15 G 2.5(lR).05 G(equest, Se)-2.5 E(gment 0)-.15 E -(Sense Code: 0xB5 Qual 0x00 \(dummy data blocks added\) Fru 0x0)144 612 -Q(Sense \215ags: Blk -2147483609 \(v)144 624 Q(alid\))-.25 E -(cmd \214nished after 0.002s timeout 40s)144 636 Q(It simply noti\214es\ -, that a track that is smaller than the minimum size has been e)108 660 -Q(xpanded to 300 sectors.)-.15 E F1 -.11(BU)72 676.8 S(GS).11 E F2(Cdr) -108 688.8 Q(ecord)-.18 E F0(has e)2.5 E -.15(ve)-.25 G 2.5(nm).15 G -(ore options than)-2.5 E F2(ls)2.5 E F0(.)A(There should be a reco)108 -705.6 Q -.15(ve)-.15 G 2.5(ro).15 G(ption to mak)-2.5 E 2.5(ed)-.1 G -(isks usable, that ha)-2.5 E .3 -.15(ve b)-.2 H(een written during a po) -.15 E(wer f)-.25 E(ailure.)-.1 E(J)72 768 Q -.25(..)-5.5 K(or)-4.5 5.5 M -2.5(gS)-.18 G 153.065(chilling V)-2.5 F(ersion 2.0)-1.11 E(15)201.225 E -EP +save +mark +15 pagesetup +10 R f +(Schily)720 480 w +10 S1 f +(\302)976 480 w +10 R f +( \( 1 \))3 164( CDRECORD)1 3277(s USER COMMANDS)2 950 3 1009 480 t +( a SCSI command fails)4 982( If)1 139( commands.)1 498(timeout is the minimum timeout used for sending SCSI)8 2341 4 1440 960 t +( a timeout, you may try to raise the default SCSI command timeout above the timeout)15 3696(due to)1 264 2 1440 1080 t +( runs correctly with a raised command timeout,)7 1991( the command)2 598( If)1 140(value of the failed command.)4 1231 4 1440 1200 t +( the author of the pro-)5 933(please report the better timeout value and the corresponding command to)10 3027 2 1440 1320 t +( no)1 133(gram. If)1 362 2 1440 1440 t +10 B f +( =)1 0( t=)1 57( ut)1 33( ou)1 56( eo)1 50( me)1 44( im)1 83(t ti)1 61 8 1968 1440 t +10 R f +(option is present, a default timeout of 40 seconds is used.)10 2367 1 2385 1440 t +10 B f +( =)1 0( s=)1 57(t ts)1 72 3 1080 1608 t +10 S1 f +(#)1209 1608 w +10 R f +(Set the maximum transfer size for a single SCSI command to)10 2558 1 1440 1608 t +10 S1 f +(#)4034 1608 w +10 R f +( the)1 159( syntax for)2 449(. The)1 249 3 4084 1608 t +10 B f +( =)1 0( s=)1 57(t ts)1 72 3 4978 1608 t +10 R f +(option)5144 1608 w +(is the same as for cdrecord fs=)6 1267 1 1440 1728 t +10 S1 f +(#)2707 1728 w +10 R f +(or sdd bs=)2 433 1 2790 1728 t +10 S1 f +(#)3223 1728 w +10 R f +(.)3273 1728 w +(If no)1 201 1 1440 1968 t +10 B f +( =)1 0( s=)1 57(t ts)1 72 3 1676 1968 t +10 R f +(option has been speci\256ed,)3 1062 1 1840 1968 t +10 B f +( d)1 0( rd)1 56( or)1 44( re ec co)3 138( dr)1 44(c cd)1 100 6 2937 1968 t +10 R f +( If libscg gets)3 574( kB.)1 175(defaults to a transfer size of 63)6 1296 3 3355 1968 t +( is reduced to the maximum value that is pos-)9 1899(lower values from the operating system, the value)7 2061 2 1440 2088 t +( help to further reduce the transfer)6 1458( it may)2 308( Sometimes,)1 543(sible with the current operating system.)5 1651 4 1440 2208 t +( a long time to \256nd a better value by experiment-)10 2043(size or to enhance it, but note that it may take)10 1917 2 1440 2328 t +(ing with the)2 494 1 1440 2448 t +10 B f +( =)1 0( s=)1 57(t ts)1 72 3 1967 2448 t +10 R f +(option.)2129 2448 w +10 S1 f +(\261 \261)1 65 1 1080 2616 t +10 B f +(V V)1 72 1 1145 2616 t +10 R f +( helps to debug)3 638( This)1 245(Increment the verbose level in respect of SCSI command transport by one.)11 3077 3 1440 2616 t +( the writing process, that occur in the CD/DVD/BluRay-recorder. If you get)11 3278(problems during)1 682 2 1440 2736 t +( to get more detailed output.)5 1232(incomprehensible error messages you should use this \257ag)7 2440 2 1440 2856 t +10 S1 f +(\261 \261)1 65 1 5191 2856 t +10 B f +(V VV V)2 144 1 5256 2856 t +10 R f +( Using)1 308(will show data buffer content in addition.)6 1717 2 1440 2976 t +10 S1 f +(\261 \261)1 65 1 3501 2976 t +10 B f +(V V)1 72 1 3566 2976 t +10 R f +(or)3674 2976 w +10 S1 f +(\261 \261)1 65 1 3793 2976 t +10 B f +(V VV V)2 144 1 3858 2976 t +10 R f +(slows down the process and may)5 1362 1 4038 2976 t +(be the reason for a buffer underrun.)6 1462 1 1440 3096 t +9 B f +( S)1 0( NS)1 50( ON)1 65( IO)1 70( TI)1 35( PT)1 60( OP)1 55( O)1 100( K)1 0( RA AC CK)3 200(T TR)1 125 11 720 3384 t +10 R f +(Track options may be mixed with track \256le names.)8 2092 1 1080 3504 t +10 S1 f +(\261 \261)1 65 1 1080 3672 t +10 B f +( o)1 0( io)1 50( ud di)2 84(a au)1 106 4 1145 3672 t +10 R f +(If this \257ag is present, all subsequent tracks are written in)10 2385 1 1440 3672 t +10 B f +( DA A)2 72( -D)1 72(C CD D-)2 177 3 3863 3672 t +10 R f +(\(similar to Red Book\) audio)4 1178 1 4222 3672 t +( \256le with data for this tracks should contain stereo, 16-bit digital audio with 44100)14 3444(format. The)1 516 2 1440 3792 t +( byte order should be the following: MSB left, LSB left, MSB right, LSB right,)14 3322(samples/s. The)1 638 2 1440 3912 t +( It is not possible to put the)7 1164(MSB left and so on. The track should be a multiple of 2352 bytes.)13 2796 2 1440 4032 t +( multiple of 2352)3 752(master image of an audio track on a raw disk because data will be read in)15 3208 2 1440 4152 t +(bytes during the recording process.)4 1432 1 1440 4272 t +(If a \256lename ends in)4 923 1 1440 4512 t +10 I f +(.au)2415 4512 w +10 R f +(or)2592 4512 w +10 I f +(.wav)2727 4512 w +10 R f +(the \256le is considered to be a structured audio data \256le.)10 2435 1 2965 4512 t +10 B f +( d)1 0( rd)1 56( or)1 44( re ec co)3 138( dr)1 44(C Cd)1 128 6 1440 4632 t +10 R f +( or a Microsoft .WAV \256le and)6 1302(assumes that the \256le in this case is a Sun audio \256le)11 2206 2 1892 4632 t +( all)1 136( In)1 152( non-audio header information.)3 1275(extracts the audio data from the \256les by skipping over the)10 2397 4 1440 4752 t +( work correctly if the audio data stream does not have any)11 2622(other cases, cdrecord will only)4 1338 2 1440 4872 t +( \256les do not have an integral number of blocks \(1/75th)10 2310( many structured audio)3 957(header. Because)1 693 3 1440 4992 t +(second each\) in length, it is often necessary to specify the)10 2538 1 1440 5112 t +10 S1 f +(\261 \261)1 65 1 4027 5112 t +10 B f +( d)1 0( ad)1 56(p pa)1 106 3 4092 5112 t +10 R f +(option as well.)2 634 1 4303 5112 t +10 B f +( d)1 0( rd)1 56( or)1 44( re ec co)3 138( dr)1 44(c cd)1 100 6 5018 5112 t +10 R f +( audio data in a .WAV \256le is stored in Intel \(little-endian\) byte order, and will)15 3344(recognizes that)1 616 2 1440 5232 t +(automatically byte-swap the data if the CD-recorder requires big-endian data.)9 3299 1 1440 5352 t +10 B f +( d)1 0( rd)1 56( or)1 44( re ec co)3 138( dr)1 44(C Cd)1 128 6 4787 5352 t +10 R f +(will)5244 5352 w +( audio \256le that does not match the Red Book requirements of 16-bit stereo samples in)15 3561(reject any)1 399 2 1440 5472 t +(PCM coding at 44100 samples/second.)4 1590 1 1440 5592 t +(Using other structured audio data formats as input to)8 2231 1 1440 5832 t +10 B f +( d)1 0( rd)1 56( or)1 44( re ec co)3 138( dr)1 44(c cd)1 100 6 3712 5832 t +10 R f +(will usually work if the struc-)5 1265 1 4135 5832 t +( How-)1 294( above \(raw pcm data in big-endian byte order\).)8 1975(ture of the data is the structure described)7 1691 3 1440 5952 t +(ever, if the data format includes a header, you will hear a click at the start of the track.)18 3582 1 1440 6072 t +(If neither)1 380 1 1440 6240 t +10 S1 f +(\261)1857 6240 w +10 I f +(data)1922 6240 w +10 R f +(nor)2137 6240 w +10 S1 f +(\261)2307 6240 w +10 I f +(audio)2372 6240 w +10 R f +(have been speci\256ed,)2 830 1 2637 6240 t +10 B f +( d)1 0( rd)1 56( or)1 44( re ec co)3 138( dr)1 44(c cd)1 100 6 3504 6240 t +10 R f +(defaults to)1 432 1 3924 6240 t +10 S1 f +(\261)4394 6240 w +10 I f +(audio)4459 6240 w +10 R f +(for all \256lenames)2 675 1 4725 6240 t +(that end in)2 438 1 1440 6360 t +10 I f +(.au)1911 6360 w +10 R f +(or)2069 6360 w +10 I f +(.wav)2185 6360 w +10 R f +(and to)1 255 1 2404 6360 t +10 S1 f +(\261)2692 6360 w +10 I f +(data)2757 6360 w +10 R f +(for all other \256les.)3 712 1 2968 6360 t +10 S1 f +(\261 \261)1 65 1 1080 6528 t +10 B f +( i)1 0( di)1 28(c cd)1 100 3 1145 6528 t +10 R f +( type for the disk is set to)7 1071(If this \257ag is present, the TOC)6 1261 2 1440 6528 t +10 B f +( I)1 0(C CD DI)2 183 2 3806 6528 t +10 R f +( only makes sense with XA)5 1141(. This)1 270 2 3989 6528 t +(disks.)1440 6648 w +10 S1 f +(\261 \261)1 65 1 1080 6816 t +10 B f +( y)1 0( py)1 50( op)1 56(c co)1 94 4 1145 6816 t +10 R f +( \257ag is present, all TOC entries for subsequent audio tracks of the resulting CD will indi-)16 3715(If this)1 245 2 1440 6816 t +( option has no effect on)5 985( This)1 245( permission to be copied without limit.)6 1602(cate that the audio data has)5 1128 4 1440 6936 t +(data tracks.)1 462 1 1440 7056 t +10 S1 f +(\261 \261)1 65 1 1080 7224 t +10 B f +( a)1 0( ta)1 50( at)1 33(d da)1 106 4 1145 7224 t +10 R f +( \257ag is present, all subsequent tracks are written in)9 2199(If this)1 255 2 1440 7224 t +10 B f +( 1)1 0( 1)1 95( e)1 0( de)1 44( od)1 56( mo)1 50( m)1 128( M)1 0( OM)1 94( RO)1 78( -R)1 72(C CD D-)2 177 12 3939 7224 t +10 R f +(\(Yellow Book\))1 622 1 4778 7224 t +(J)720 7704 w +(. .)1 47 1 759 7649 t +( 15)1 1829( change: Version 3.0)3 850( Last)1 1434(org Schilling)1 528 4 759 7704 t +cleartomark +showpage +restore +%%EndPage: 15 15 %%Page: 16 16 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF 104.275(CDRECORD\(1\) Schily\264s)72 48 R -(USER COMMANDS)2.5 E(CDRECORD\(1\))106.775 E/F1 10.95/Times-Bold@0 SF -(CREDITS)72 84 Q F0(Bill Sw)108 96 Q 24.32(artz \(Bill_Sw)-.1 F(artz@tw) --.1 E(olf.com\))-.1 E -.15(Fo)183 108 S 2.5(rh).15 G -(elping me with the TEA)-2.5 E 2.5(Cd)-.4 G(ri)-2.5 E -.15(ve)-.25 G 2.5 -(rs).15 G(upport)-2.5 E(Aaron Ne)108 124.8 Q 2.27(wsome \(aaron.d.ne) --.25 F(wsome@wdc.com\))-.25 E -.15(Fo)183 136.8 S 2.5(rl).15 G -(etting me de)-2.5 E -.15(ve)-.25 G(lop Son).15 E 2.5(ys)-.15 G -(upport on his dri)-2.5 E -.15(ve)-.25 G(Eric Y)108 153.6 Q 7.56 -(oungdale \(eric@andante.jic.com\))-1.1 F -.15(Fo)183 165.6 S 2.5(rs).15 -G(upplying mkisofs)-2.5 E(Gadi Oxman)108 182.4 Q(\(g)20.62 E -(adio@netvision.net.il\))-.05 E -.15(Fo)183 194.4 S 2.5(rt).15 G -(ips on the A)-2.5 E -.93(TA)-1.11 G(PI standard).93 E -(Finn Arne Gangstad)108 211.2 Q(\(\214nnag@guardian.no\))26.9 E -.15(Fo) -183 223.2 S 2.5(rt).15 G(he \214rst FIFO implementation.)-2.5 E(Da)108 -240 Q .3 -.15(ve P)-.2 H 27.91(latt \(dplatt@fe).15 F(ghoot.ml.or)-.15 E -(g\))-.18 E -.15(Fo)183 252 S 2.52(rc).15 G .019(reating the e)-2.52 F -.019(xperimental pack)-.15 F .019 -(et writing support, the \214rst implementation of CD-R)-.1 F(W)-.55 E -(blanking support, the \214rst .w)183 264 Q .4 -.2(av \214)-.1 H -(le decoder and man).2 E 2.5(yn)-.15 G(ice discussions on cdrecord.)-2.5 -E(Chris P)108 280.8 Q 2.5(.R)-1.11 G(oss \(cross@eng.us.uu.net\))-2.5 E --.15(Fo)183 292.8 S 2.5(rt).15 G -(he \214rst implementation os a BSDI SCSI transport.)-2.5 E -(Grant R. Guenther)108 309.6 Q(\(grant@torque.net\))7.5 E -.15(Fo)183 -321.6 S 2.5(rc).15 G -(reating the \214rst parallel port transport implementation for Linux.) --2.5 E -.25(Ke)108 338.4 S(nneth D. Merry \(k).25 E(en@kdm.or)-.1 E(g\)) --.18 E 7.439(for pro)183 350.4 R 7.439 -(viding the CAM port for FreeBSD together with Michael Smith)-.15 F -(\(msmith@freebsd.or)183 362.4 Q(g\))-.18 E(Heik)108 379.2 Q 2.5(oE)-.1 -G(i\337feldt \(heik)-2.5 E(o@he)-.1 E(xco.de\))-.15 E -(for making libedc_ecc a)183 391.2 Q -.25(va)-.2 G -(ilable \(needed to write RA).25 E 2.5(Wd)-.9 G(ata sectors\).)-2.5 E F1 -(MAILING LISTS)72 420 Q F0 .764(If you w)108 432 R .764(ant to acti)-.1 -F -.15(ve)-.25 G .764(ly tak).15 F 3.264(ep)-.1 G .763(art on the de) --3.264 F -.15(ve)-.25 G .763(lopment of cdrecord, you may join the de) -.15 F -.15(ve)-.25 G .763(loper mailing list).15 F(via this URL:)108 444 -Q/F2 10/Times-Bold@0 SF(http://lists.berlios.de/mailman/listinf)108 468 -Q(o/cdr)-.25 E(ecord-de)-.18 E -.1(ve)-.15 G(lopers).1 E F0 -(The mail address of the list is:)108 484.8 Q F2(cd)2.5 E(write@other) --.15 E(.debian.or)-1 E(g)-.1 E F1 -.548(AU)72 513.6 S(THOR).548 E F0(J) -108 525.6 Q -.25(..)-5.5 K(or)-4.5 5.5 M 2.5(gS)-.18 G(chilling)-2.5 E -(Seestr)108 537.6 Q 2.5(.1)-.55 G(10)-2.5 E(D-13353 Berlin)108 549.6 Q -(German)108 561.6 Q(y)-.15 E(Additional information can be found on:)108 -578.4 Q(http://www)108 590.4 Q -(.fokus.fhg.de/usr/schilling/cdrecord.html)-.65 E(If you ha)108 607.2 Q -.3 -.15(ve s)-.2 H(upport questions, send them to:).15 E F2(cdr)108 624 -Q(ecord-support@berlios.de)-.18 E F0(or)108 636 Q F2(cd)2.5 E -(write@other)-.15 E(.debian.or)-1 E(g)-.1 E F0(Of you ha)108 652.8 Q .3 --.15(ve d)-.2 H(e\214nitely found a b).15 E(ug, send a mail to:)-.2 E F2 -(cdr)108 669.6 Q(ecord-de)-.18 E -.1(ve)-.15 G(lopers@berlios.de).1 E F0 -(or)108 681.6 Q F2(schilling@f)2.5 E(okus.fhg)-.25 E(.de)-.15 E F0 1.6 --.8(To s)108 698.4 T(ubscribe, use:).8 E F2 -(http://lists.berlios.de/mailman/listinf)108 715.2 Q(o/cdr)-.25 E -(ecord-de)-.18 E -.1(ve)-.15 G(lopers).1 E F0(or)108 727.2 Q F2 -(http://lists.berlios.de/mailman/listinf)2.5 E(o/cdr)-.25 E -(ecord-support)-.18 E F0(J)72 768 Q -.25(..)-5.5 K(or)-4.5 5.5 M 2.5(gS) --.18 G 153.065(chilling V)-2.5 F(ersion 2.0)-1.11 E(16)201.225 E EP +save +mark +16 pagesetup +10 R f +(Schily)720 480 w +10 S1 f +(\302)976 480 w +10 R f +( \( 1 \))3 164( CDRECORD)1 3277(s USER COMMANDS)2 950 3 1009 480 t +( \256le with track data should contain an)7 1620( The)1 230( data size is a multiple of 2048 bytes.)8 1621(format. The)1 489 4 1440 960 t +10 B f +( 96 66 60 0)4 150( -9)1 50( O-)1 33( SO)1 78(I IS)1 95 5 1440 1080 t +10 R f +(or)1886 1080 w +10 B f +( e)1 0( ge)1 44( dg)1 50( id)1 56( Ri)1 28( R)1 112( k)1 0( ck)1 56( oc)1 44(R Ro)1 122 10 2009 1080 t +10 R f +(\256lesystem image \(see)2 890 1 2561 1080 t +10 B f +( s)1 0( fs)1 39( of)1 33( so)1 50( is)1 39( ki)1 28(m mk)1 139 7 3491 1080 t +10 R f +( is)1 108(for more details\). If the track data)6 1433 2 3859 1080 t +(an)1440 1200 w +10 B f +( s)1 0( fs)1 39(u uf)1 89 3 1572 1200 t +10 R f +( or more to allow CD-drives with)6 1404( KB)1 172(\256lesystem image, fragment size should be set to 2)8 2086 3 1738 1200 t +(2 KB sector size to be used for reading.)8 1641 1 1440 1320 t +10 S1 f +(\261)1440 1488 w +10 I f +(data)1505 1488 w +10 R f +( of one of the)4 584(is the default, if no other \257ag is present and the \256le does not appear to be)16 3096 2 1720 1488 t +(well known audio \256le types.)4 1162 1 1440 1608 t +(If neither)1 380 1 1440 1776 t +10 S1 f +(\261)1857 1776 w +10 I f +(data)1922 1776 w +10 R f +(nor)2137 1776 w +10 S1 f +(\261)2307 1776 w +10 I f +(audio)2372 1776 w +10 R f +(have been speci\256ed,)2 830 1 2637 1776 t +10 B f +( d)1 0( rd)1 56( or)1 44( re ec co)3 138( dr)1 44(c cd)1 100 6 3504 1776 t +10 R f +(defaults to)1 432 1 3924 1776 t +10 S1 f +(\261)4394 1776 w +10 I f +(audio)4459 1776 w +10 R f +(for all \256lenames)2 675 1 4725 1776 t +(that end in)2 438 1 1440 1896 t +10 I f +(.au)1911 1896 w +10 R f +(or)2069 1896 w +10 I f +(.wav)2185 1896 w +10 R f +(and to)1 255 1 2404 1896 t +10 S1 f +(\261)2692 1896 w +10 I f +(data)2757 1896 w +10 R f +(for all other \256les.)3 712 1 2968 1896 t +10 B f +( =)1 0( x=)1 57( ex)1 50( nd de)2 100(i in)1 84 5 1080 2064 t +10 I f +(list)1371 2064 w +10 R f +( index list is a comma separated list of numbers that are)11 2332( In)1 150(Sets an index list for the next track.)7 1478 3 1440 2184 t +( \256rst entry in this list must contain a 0, the following numbers must)13 2820(counting from index 1. The)4 1140 2 1440 2304 t +( numbers \(counting in 1/75 seconds\) that represent the start of the)11 2951(be an ascending list of)4 1009 2 1440 2424 t +( sets index 1 to the start of the track, index 2)11 1913( 0,7500,15000)1 621( index list in the form:)5 957(indices. An)1 469 4 1440 2544 t +(100 seconds from the start of the track and index 3 200 seconds from the start of the track.)18 3751 1 1440 2664 t +10 S1 f +(\261 \261)1 65 1 1080 2832 t +10 B f +( ze e)2 44( iz)1 44( si)1 28( os)1 39( so)1 50(i is)1 67 6 1145 2832 t +10 R f +(Use the)1 317 1 1440 2952 t +10 B f +( 96 66 60 0)4 150( -9)1 50( O-)1 33( SO)1 78(I IS)1 95 5 1797 2952 t +10 R f +( option is needed if you)5 1021( This)1 252( next track.)2 478(\256le system size as the size of the)7 1406 4 2243 2952 t +(want)1440 3072 w +10 B f +( d)1 0( rd)1 56( or)1 44( re ec co)3 138( dr)1 44(c cd)1 100 6 1675 3072 t +10 R f +( from a)2 318(to directly read the image of a track from a raw disk partition or)13 2755 2 2098 3072 t +10 I f +(TAO)5211 3072 w +10 R f +(master CD. In the \256rst case the option)7 1578 1 1440 3192 t +10 S1 f +(\261 \261)1 65 1 3052 3192 t +10 B f +( ze e)2 44( iz)1 44( si)1 28( os)1 39( so)1 50(i is)1 67 6 3117 3192 t +10 R f +( to limit the size of the CD to the size)10 1594(is needed)1 383 2 3423 3192 t +( the second case the option)5 1168( In)1 160(of the ISO \256lesystem.)3 929 3 1440 3312 t +10 S1 f +(\261 \261)1 65 1 3740 3312 t +10 B f +( ze e)2 44( iz)1 44( si)1 28( os)1 39( so)1 50(i is)1 67 6 3805 3312 t +10 R f +(is needed to prevent)3 855 1 4120 3312 t +10 B f +( d)1 0( rd)1 56( or)1 44( re ec co)3 138( dr)1 44(c cd)1 100 6 5018 3312 t +10 R f +( track-at-once)1 572(from reading the two run-out blocks that are appended by each CD-recorder in)12 3388 2 1440 3432 t +( and would cause a buffer underrun that would)8 1966(mode. These two run-out blocks cannot be read)7 1994 2 1440 3552 t +(cause a defective copy.)3 948 1 1440 3672 t +( is used on \256les created by)6 1120(Note that if this option)4 946 2 1440 3912 t +10 B f +( s)1 0( fs)1 39( of)1 33( so)1 50( is)1 39( ki)1 28(m mk)1 139 7 3542 3912 t +10 R f +(, the padding data that was added by)7 1530 1 3870 3912 t +10 B f +( s)1 0( fs)1 39( of)1 33( so)1 50( is)1 39( ki)1 28(m mk)1 139 7 1440 4032 t +10 R f +( added by cdrecord. This may also change the amount)9 2277(is lost and replaced by padding)5 1315 2 1808 4032 t +(of padding.)1 463 1 1440 4152 t +(In case)1 301 1 1440 4392 t +10 B f +( d)1 0( rd)1 56( or)1 44( re ec co)3 138( dr)1 44(c cd)1 100 6 1788 4392 t +10 R f +(reads the track data from)4 1079 1 2217 4392 t +10 I f +(stdin)3343 4392 w +10 R f +( with the)2 396(, only the \256rst track may be used)7 1458 2 3546 4392 t +10 S1 f +(\261 \261)1 65 1 1440 4512 t +10 B f +( ze e)2 44( iz)1 44( si)1 28( os)1 39( so)1 50(i is)1 67 6 1505 4512 t +10 R f +(option.)1810 4512 w +(If)1440 4752 w +10 S1 f +(\261 \261)1 65 1 1544 4752 t +10 B f +( ze e)2 44( iz)1 44( si)1 28( os)1 39( so)1 50(i is)1 67 6 1609 4752 t +10 R f +(is used for a track,)4 786 1 1919 4752 t +10 B f +( d)1 0( rd)1 56( or)1 44( re ec co)3 138( dr)1 44(c cd)1 100 6 2743 4752 t +10 R f +( as if the)3 383(will automatically add padding for this track)6 1854 2 3163 4752 t +10 S1 f +(\261 \261)1 65 1 1440 4872 t +10 B f +( d)1 0( ad)1 56(p pa)1 106 3 1505 4872 t +10 R f +( padding written by)3 807(option had been used but the amount of padding may be less than the)13 2891 2 1702 4872 t +10 B f +( s)1 0( fs)1 39( of)1 33( so)1 50( is)1 39( ki)1 28(m mk)1 139 7 1440 4992 t +10 R f +( that if you use)4 678(. Note)1 298 2 1768 4992 t +10 S1 f +(\261 \261)1 65 1 2790 4992 t +10 B f +( ze e)2 44( iz)1 44( si)1 28( os)1 39( so)1 50(i is)1 67 6 2855 4992 t +10 R f +(on a track that contains Sparc boot information, the)8 2226 1 3174 4992 t +(boot information will be lost.)4 1202 1 1440 5112 t +( determine the size of a \256le system if the)9 1770(Note also that this option cannot be used to)8 1855 2 1440 5352 t +10 S1 f +(\261 \261)1 65 1 5107 5352 t +10 B f +( i)1 0( ti)1 28( lt)1 33( ul)1 28(m mu)1 139 5 5172 5352 t +10 R f +(option is present.)2 702 1 1440 5472 t +10 B f +( =)1 0( rc c=)2 101( sr)1 44(i is)1 67 4 1080 5640 t +10 I f +(ISRC)1292 5640 w +10 S f +(_)1503 5640 w +10 I f +(number)1553 5640 w +10 R f +(Set the)1 283 1 1440 5760 t +10 B f +( er r)2 44( be)1 44( mb)1 56( um)1 83( Nu)1 56( N)1 105( g)1 0( ng)1 50( in)1 56( di)1 28( rd)1 56( or)1 44( ec co)2 94( Re)1 44( R)1 105( d)1 0( rd)1 56( ar)1 44( nd da)2 106( an)1 56( ta)1 50( St)1 33( S)1 89( l)1 0( al)1 28( na)1 50( on)1 56( io)1 50( ti)1 28( at)1 33( na)1 50( er rn)2 100( te)1 44( nt)1 33(I In)1 95 35 1756 5760 t +10 R f +(for the next track to)4 819 1 3655 5760 t +10 I f +(ISRC)4507 5760 w +10 S f +(_)4718 5760 w +10 I f +(number)4768 5760 w +10 R f +(.)5081 5760 w +10 S1 f +(\261 \261)1 65 1 1080 5928 t +10 B f +( 2)1 0( e2)1 50( de)1 44( od)1 56(m mo)1 133 5 1145 5928 t +10 R f +( \257ag is present, all subsequent tracks are written in)9 2154(If this)1 250 2 1440 6048 t +10 B f +( 2)1 0( 2)1 90( e)1 0( de)1 44( od)1 56( mo)1 50( m)1 123( M)1 0( OM)1 94( RO)1 78( -R)1 72(C CD D-)2 177 12 3884 6048 t +10 R f +(format. The data)2 692 1 4708 6048 t +(size is a multiple of 2336 bytes.)6 1317 1 1440 6168 t +10 S1 f +(\261 \261)1 65 1 1080 6336 t +10 B f +( y)1 0( py)1 50( op)1 56( co)1 50( oc)1 44(n no)1 106 6 1145 6336 t +10 R f +( \257ag is present, all TOC entries for subsequent audio tracks of the resulting CD will indi-)16 3715(If this)1 245 2 1440 6456 t +( has permission to be copied only once for personal use)10 2393(cate that the audio data)4 996 2 1440 6576 t +10 S1 f +(\261)4872 6576 w +10 R f +(this is the)2 420 1 4980 6576 t +(default.)1440 6696 w +10 S1 f +(\261 \261)1 65 1 1080 6864 t +10 B f +( d)1 0( ad)1 56( pa)1 50( op)1 56(n no)1 106 5 1145 6864 t +10 R f +(Do not pad the following tracks)5 1308 1 1440 6984 t +10 S1 f +(\261)2781 6984 w +10 R f +(the default.)1 457 1 2879 6984 t +10 S1 f +(\261 \261)1 65 1 1080 7152 t +10 B f +( p)1 0( mp)1 56( re ee em)3 171( pr)1 44( op)1 56(n no)1 106 6 1145 7152 t +10 R f +( TOC entries for subsequent audio tracks will indicate that the audio)11 2914(If this \257ag is present, all)5 1046 2 1440 7272 t +(J)720 7752 w +(. .)1 47 1 759 7697 t +( 16)1 1829( change: Version 3.0)3 850( Last)1 1434(org Schilling)1 528 4 759 7752 t +cleartomark +showpage +restore +%%EndPage: 16 16 %%Page: 17 17 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF 104.275(CDRECORD\(1\) Schily\264s)72 48 R -(USER COMMANDS)2.5 E(CDRECORD\(1\))106.775 E -(The old cdwrite mailing list may be joined by sending mail to:)108 84 Q -(cdwrite-request@other)144 108 Q(.debian.or)-.55 E(g)-.18 E -(and including the w)108 132 Q(ord)-.1 E/F1 10/Times-Italic@0 SF -(subscribe)2.5 E F0(in the body)2.5 E 5(.T)-.65 G -(he mail address of the list is:)-5 E(cdwrite@other)144 156 Q -(.debian.or)-.55 E(g)-.18 E(J)72 768 Q -.25(..)-5.5 K(or)-4.5 5.5 M 2.5 -(gS)-.18 G 153.065(chilling V)-2.5 F(ersion 2.0)-1.11 E(17)201.225 E EP +save +mark +17 pagesetup +10 R f +(Schily)720 480 w +10 S1 f +(\302)976 480 w +10 R f +( \( 1 \))3 164( CDRECORD)1 3277(s USER COMMANDS)2 950 3 1009 480 t +(data has been mastered with linear data)6 1616 1 1440 960 t +10 S1 f +(\261)3089 960 w +10 R f +(this is the default.)3 735 1 3187 960 t +10 S1 f +(\261 \261)1 65 1 1080 1128 t +10 B f +( k)1 0( ck)1 56( ac)1 44( ra)1 50( tt tr)2 77( rt)1 33( or)1 44( ho)1 50( sh)1 56( os)1 39(n no)1 106 11 1145 1128 t +10 R f +(Re-enforce the Red Book track length standard. Tracks must be at least 4 seconds.)13 3389 1 1440 1248 t +10 S1 f +(\261 \261)1 65 1 1080 1416 t +10 B f +( d)1 0( ad)1 56(p pa)1 106 3 1145 1416 t +10 R f +( a data track, 15 sectors of zeroed data will be added to the end of this and each)18 3395(If the track is)3 565 2 1440 1416 t +( this case, the)3 586( In)1 157( track.)1 265(subsequent data)1 652 4 1440 1536 t +10 S1 f +(\261 \261)1 65 1 3141 1536 t +10 B f +( d)1 0( ad)1 56(p pa)1 106 3 3206 1536 t +10 R f +(option is superseded by the)4 1152 1 3409 1536 t +10 B f +( =)1 0( ze e=)2 101( iz)1 44( si)1 28( ds)1 39( ad)1 56(p pa)1 106 7 4602 1536 t +10 R f +(option. It)1 383 1 5017 1536 t +(will remain however as a shorthand for)6 1689 1 1440 1656 t +10 B f +( =)1 0( ze e=)2 101( iz)1 44( si)1 28( ds)1 39( ad)1 56(p pa)1 106 7 3175 1656 t +10 I f +(15s.)3549 1656 w +10 R f +(If the)1 235 1 3792 1656 t +10 S1 f +(\261)4074 1656 w +10 I f +(pad)4139 1656 w +10 R f +(option refers to an audio)4 1064 1 4336 1656 t +(track,)1440 1776 w +10 B f +( d)1 0( rd)1 56( or)1 44( re ec co)3 138( dr)1 44(c cd)1 100 6 1700 1776 t +10 R f +( data padding)2 558(will pad the audio data to be a multiple of 2352 bytes. The audio)13 2724 2 2118 1776 t +(is done with binary zeroes which is equal to absolute silence.)10 2518 1 1440 1896 t +10 S1 f +(\261 \261)1 65 1 1440 2136 t +10 B f +( d)1 0( ad)1 56(p pa)1 106 3 1505 2136 t +10 R f +(remains valid until disabled by)4 1265 1 1700 2136 t +10 S1 f +(\261 \261)1 65 1 2998 2136 t +10 B f +( d)1 0( ad)1 56( pa)1 50( op)1 56(n no)1 106 5 3063 2136 t +10 R f +(.)3331 2136 w +10 B f +( =)1 0( ze e=)2 101( iz)1 44( si)1 28( ds)1 39( ad)1 56(p pa)1 106 7 1080 2304 t +10 S1 f +(#)1454 2304 w +10 R f +( the next track to)4 771(Set the amount of data to be appended as padding to)10 2326 2 1440 2424 t +10 S1 f +(#)4587 2424 w +10 R f +( to the)2 300(. Opposed)1 463 2 4637 2424 t +(behavior of the)2 666 1 1440 2544 t +10 S1 f +(\261 \261)1 65 1 2162 2544 t +10 B f +( d)1 0( ad)1 56(p pa)1 106 3 2227 2544 t +10 R f +(option, the value for)3 900 1 2445 2544 t +10 I f +(padsize=)3400 2544 w +10 R f +(is reset to zero for each new track.)7 1577 1 3823 2544 t +(Cdrecord assumes a sector size of 2048 bytes for the)9 2278 1 1440 2664 t +10 I f +(padsize=)3763 2664 w +10 R f +(option, independent from the)3 1223 1 4177 2664 t +( megabytes mentioned in the verbose)5 1524( The)1 222(real sector size and independent from the write mode.)8 2214 3 1440 2784 t +( writing)1 325(mode output however are counting the output sector size which is e.g. 2448 bytes when)14 3635 2 1440 2904 t +( the)1 163( See)1 218(in RAW/RAW96 mode.)2 1001 3 1440 3024 t +10 B f +( s)1 0(f fs)1 72 2 2862 3024 t +10 R f +( pad the equivalent of)4 925( To)1 184(= option for possible arguments.)4 1357 3 2934 3024 t +(20 minutes on a CD, you may write)7 1525 1 1440 3144 t +10 B f +( =)1 0( ze e=)2 101( iz)1 44( si)1 28( ds)1 39( ad)1 56(p pa)1 106 7 3005 3144 t +10 R f +( this option if your CD-drive is)6 1329(20x60x75s. Use)1 692 2 3379 3144 t +( you want to be able to read the CD on a)11 1721(not able to read the last sectors of a track or if)11 1947 2 1440 3264 t +10 B f +( x)1 0( nu ux)2 106( in)1 56(L Li)1 95 4 5143 3264 t +10 R f +( an empty \256le is used for track data,)8 1572( If)1 142( the ISO-9660 \256lesystem read-ahead bug.)5 1748(system with)1 498 4 1440 3384 t +( may e.g. be)3 542( This)1 255( used to create a disk that is entirely made of padding.)11 2361(this option may be)3 802 4 1440 3504 t +(used to \256nd out how much overburning is possible with a speci\256c medium.)12 3098 1 1440 3624 t +10 S1 f +(\261 \261)1 65 1 1080 3792 t +10 B f +( p)1 0( mp)1 56( re ee em)3 171(p pr)1 100 4 1145 3792 t +10 R f +( TOC entries for subsequent audio tracks will indicate that the audio)11 2914(If this \257ag is present, all)5 1046 2 1440 3912 t +(data has been sampled with 50/15)5 1401 1 1440 4032 t +10 S f +(m)2876 4032 w +10 R f +( data however is not modi\256ed during)6 1525( The)1 222(sec pre-emphasis.)1 719 3 2934 4032 t +(the process of transferring from \256le to disk. This option has no effect on data tracks.)15 3478 1 1440 4152 t +10 B f +( =)1 0( p=)1 57( ga ap)2 106( re eg)2 94(p pr)1 100 5 1080 4320 t +10 S1 f +(#)1437 4320 w +10 R f +( with the TEAC)3 666( option currently only makes sense)5 1435( This)1 245( size for the next track.)5 959( pre-gap)1 371(Set the)1 284 6 1440 4440 t +(drive when creating track-at-once disks without the 2-second silence before each track.)11 3561 1 1440 4560 t +(This option may go away in the future.)7 1610 1 1440 4680 t +10 S1 f +(\261 \261)1 65 1 1080 4848 t +10 B f +( s)1 0( ms)1 39( cm)1 83(s sc)1 83 4 1145 4848 t +10 R f +( \257ag is present, all TOC entries for subsequent audio tracks of the resulting CD will indi-)16 3715(If this)1 245 2 1440 4848 t +(cate that the audio data has no permission to be copied anymore.)11 2667 1 1440 4968 t +10 S1 f +(\261 \261)1 65 1 1080 5136 t +10 B f +( k)1 0( ck)1 56( ac)1 44( ra)1 50( tt tr)2 77( rt)1 33( or)1 44( ho)1 50(s sh)1 95 9 1145 5136 t +10 R f +( violate the Red Book track length standard which requires a)10 2658(Allow all subsequent tracks to)4 1302 2 1440 5256 t +( when used in SAO or RAW)6 1251( option is only useful)4 921( This)1 255(minimum track length of 4 seconds.)5 1533 4 1440 5376 t +( this feature. The drive must accept the resulting CUE sheet or)11 2710( all drives support)3 776(mode. Not)1 474 3 1440 5496 t +(support RAW writing.)2 913 1 1440 5616 t +10 S1 f +(\261 \261)1 65 1 1080 5784 t +10 B f +( b)1 0( ab)1 56( wa)1 50(s sw)1 111 4 1145 5784 t +10 R f +( Some)1 300(If this \257ag is present, audio data is assumed to be in byte-swapped \(little-endian\) order.)14 3660 2 1440 5784 t +( Yamaha, Sony and the new SCSI-3/mmc drives require audio data to)11 2950(types of CD-writers e.g.)3 1010 2 1440 5904 t +( to be presented in the)5 944(be presented in little-endian order, while other writers require audio data)10 3016 2 1440 6024 t +( order normally used by the SCSI protocol.)7 1875(big-endian \(network\) byte)2 1088 2 1440 6144 t +10 B f +( d)1 0( rd)1 56( or)1 44( re ec co)3 138( dr)1 44(C Cd)1 128 6 4483 6144 t +10 R f +(knows if a)2 460 1 4940 6144 t +( byte order of the)4 759(CD-recorder needs audio data in big- or little-endian order, and corrects the)11 3201 2 1440 6264 t +( only need the)3 623( You)1 250( recorder.)1 401(data stream to match the needs of the)7 1630 4 1440 6384 t +10 S1 f +(\261)4389 6384 w +10 I f +(swab)4454 6384 w +10 R f +(\257ag if your data)3 695 1 4705 6384 t +(stream is in Intel \(little-endian\) byte order.)6 1748 1 1440 6504 t +(Note that the verbose output of)5 1310 1 1440 6744 t +10 B f +( d)1 0( rd)1 56( or)1 44( re ec co)3 138( dr)1 44(c cd)1 100 6 2789 6744 t +10 R f +( you if swapping is necessary to make the)8 1784(will show)1 406 2 3210 6744 t +( data \256t the required byte order of the recorder.)9 1953(byte order of the input)4 933 2 1440 6864 t +10 B f +( d)1 0( rd)1 56( or)1 44( re ec co)3 138( dr)1 44(C Cd)1 128 6 4393 6864 t +10 R f +(will not show)2 563 1 4837 6864 t +(you if the)2 399 1 1440 6984 t +10 S1 f +(\261)1872 6984 w +10 I f +(swab)1937 6984 w +10 R f +(\257ag was actually present for a track.)6 1491 1 2176 6984 t +10 B f +( =)1 0( ze e=)2 101( iz)1 44( si)1 28(t ts)1 72 5 1080 7152 t +10 S1 f +(#)1325 7152 w +10 R f +(If the master image for the next track has been stored on a raw disk, use this option to specify)19 3960 1 1440 7152 t +( in a regular \256le,)4 709(the valid amount of data on this disk. If the image of the next track is stored)16 3251 2 1440 7272 t +(J)720 7752 w +(. .)1 47 1 759 7697 t +( 17)1 1829( change: Version 3.0)3 850( Last)1 1434(org Schilling)1 528 4 759 7752 t +cleartomark +showpage +restore +%%EndPage: 17 17 +%%Page: 18 18 +save +mark +18 pagesetup +10 R f +(Schily)720 480 w +10 S1 f +(\302)976 480 w +10 R f +( \( 1 \))3 164( CDRECORD)1 3277(s USER COMMANDS)2 950 3 1009 480 t +( the track contains an ISO-)5 1127( If)1 136( to determine the length of this track.)7 1560(the size of that \256le is taken)6 1137 4 1440 960 t +(9660 \256lesystem image use the)4 1237 1 1440 1080 t +10 S1 f +(\261)2710 1080 w +10 I f +(isosize)2775 1080 w +10 R f +(option to determine the length of that \256lesystem image.)8 2277 1 3075 1080 t +( even in)2 334(In Disk At Once mode and with some drives that use the TEAC programming interface,)14 3626 2 1440 1200 t +( Once mode,)2 523(Track At)1 366 2 1440 1320 t +10 B f +( d)1 0( rd)1 56( or)1 44( re ec co)3 138( dr)1 44(c cd)1 100 6 2362 1320 t +10 R f +(needs to know the size of each track before starting to write the)12 2623 1 2777 1320 t +( this happens you will)4 954( If)1 142( now checks this and aborts before starting to write.)9 2225(disk. Cdrecord)1 639 4 1440 1440 t +(need to run)2 471 1 1440 1560 t +10 B f +( s)1 0( fs)1 39( of)1 33( so)1 50( is)1 39( ki)1 28(m mk)1 139 7 1947 1560 t +10 S1 f +(\261 \261)1 65 1 2311 1560 t +10 B f +( t)1 0( nt)1 33( in)1 56( ri)1 28(p pr)1 100 5 2376 1560 t +10 S1 f +(\261 \261)1 65 1 2593 1560 t +10 B f +( ze e)2 44( iz)1 44(s si)1 67 3 2658 1560 t +10 R f +( as an argument)3 659(before and use the output \(with `s' appended\))7 1892 2 2849 1560 t +(to the)1 233 1 1440 1680 t +10 B f +( ze e)2 44( iz)1 44( si)1 28(t ts)1 72 4 1706 1680 t +10 R f +(= option of)2 461 1 1894 1680 t +10 B f +( d)1 0( rd)1 56( or)1 44( re ec co)3 138( dr)1 44(c cd)1 100 6 2388 1680 t +10 R f +(\(e.g. tsize=250000s\).)1 846 1 2803 1680 t +(See)1440 1800 w +10 B f +( s)1 0(f fs)1 72 2 1617 1800 t +10 R f +(= option for possible arguments.)4 1329 1 1689 1800 t +10 S1 f +(\261 \261)1 65 1 1080 1968 t +10 B f +(x xa a)2 100 1 1145 1968 t +10 R f +(If this \257ag is present, all subsequent tracks are written in)10 2415 1 1440 1968 t +10 B f +( 1)1 0( 1)1 91( m)1 0( rm)1 83( or)1 44( fo)1 50( f)1 74( 2)1 0( 2)1 91( e)1 0( de)1 44( od)1 56( mo)1 50( m)1 124( XA A)2 72( X)1 113( M)1 0( OM)1 94( RO)1 78( -R)1 72(C CD D-)2 177 21 3896 1968 t +10 R f +(for-)5251 1968 w +( by)1 138( XA sector sub-headers will be created)6 1629( The)1 227(mat. The data size is a multiple of 2048 bytes.)9 1966 4 1440 2088 t +( this option, the write mode is the same as with the)11 2115( With)1 266(the drive.)1 385 3 1440 2208 t +10 S1 f +(\261 \261)1 65 1 4239 2208 t +10 B f +( i)1 0( ti)1 28( lt)1 33( ul)1 28(m mu)1 139 5 4304 2208 t +10 R f +(option.)4565 2208 w +10 S1 f +(\261 \261)1 65 1 1080 2376 t +10 B f +(x xa a1 1)3 150 1 1145 2376 t +10 R f +(If this \257ag is present, all subsequent tracks are written in)10 2415 1 1440 2376 t +10 B f +( 1)1 0( 1)1 91( m)1 0( rm)1 83( or)1 44( fo)1 50( f)1 74( 2)1 0( 2)1 91( e)1 0( de)1 44( od)1 56( mo)1 50( m)1 124( XA A)2 72( X)1 113( M)1 0( OM)1 94( RO)1 78( -R)1 72(C CD D-)2 177 21 3896 2376 t +10 R f +(for-)5251 2376 w +( XA sector sub-headers are part of the user)8 1793( The)1 224( a multiple of 2056 bytes.)5 1077(mat. The data size is)4 866 4 1440 2496 t +(data and have to be supplied by the application that prepares the data to be written.)15 3425 1 1440 2616 t +10 S1 f +(\261 \261)1 65 1 1080 2784 t +10 B f +(x xa a2 2)3 150 1 1145 2784 t +10 R f +(If this \257ag is present, all subsequent tracks are written in)10 2415 1 1440 2784 t +10 B f +( 2)1 0( 2)1 91( m)1 0( rm)1 83( or)1 44( fo)1 50( f)1 74( 2)1 0( 2)1 91( e)1 0( de)1 44( od)1 56( mo)1 50( m)1 124( XA A)2 72( X)1 113( M)1 0( OM)1 94( RO)1 78( -R)1 72(C CD D-)2 177 21 3896 2784 t +10 R f +(for-)5251 2784 w +( by the)2 302( XA sector sub-headers will be created)6 1641( The)1 229(mat. The data is a multiple of 2324 bytes.)8 1788 4 1440 2904 t +(drive.)1440 3024 w +10 S1 f +(\261 \261)1 65 1 1080 3192 t +10 B f +( x)1 0( ix)1 50( mi)1 28(x xa am)2 183 4 1145 3192 t +10 R f +(If this \257ag is present, all subsequent tracks are written in a way that allows a mix of)17 3504 1 1440 3192 t +10 B f +( M)1 0( OM)1 94( RO)1 78( -R)1 72(C CD D-)2 177 5 4979 3192 t +( 2)1 0( /2)1 50( 1/)1 28( 1)1 90( m)1 0( rm)1 83( or)1 44( fo)1 50( f)1 73( 2)1 0( 2)1 91( e)1 0( de)1 44( od)1 56( mo)1 50( m)1 124(X XA A)2 144 17 1440 3312 t +10 R f +( XA sector sub-)3 674( The)1 228(format. The data size is a multiple of 2332 bytes.)9 2091 3 2407 3312 t +( and have to be supplied by the application that prepares the)11 2591(headers are part of the user data)6 1369 2 1440 3432 t +( CRC and the P/Q parity ECC/EDC information \(depending on the sec-)11 2978( The)1 225(data to be written.)3 757 3 1440 3552 t +(tor type\) have to be supplied by the application that prepares the data to be written.)15 3431 1 1440 3672 t +9 B f +( S)1 0( LE ES)2 110( PL)1 60( MP)1 55( XA AM)2 150(E EX)1 125 6 720 3960 t +10 R f +( reader is assumed)3 761( The)1 222( below, it will be assumed that the machine includes two drives.)11 2655(For all examples)2 682 4 1080 4080 t +( to be target 2 on the)6 869( CD/DVD/BluRay-recorder is assumed)3 1594( The)1 222(to be target 1 on the primary SCSI bus.)8 1635 4 1080 4200 t +(primary SCSI bus of the machine.)5 1400 1 1080 4320 t +(If there is only one drive in the machine, the)9 1850 1 1080 4488 t +10 B f +( =)1 0( v=)1 57( ev)1 50(d de)1 100 4 2964 4488 t +10 R f +(option may be omitted in the examples below, but in)9 2195 1 3205 4488 t +(this case the examples for replication without intermediate \256les do not apply.)11 3168 1 1080 4608 t +9 B f +( CD D)2 65( C)1 95( o)1 0( io)1 45( ud di)2 75( Au)1 50( A)1 95( n)1 0( an)1 50( a)1 75( g)1 0( ng)1 45( in)1 50( ti)1 25( at)1 30( ca)1 45( li ic)2 65( pl)1 25( ep)1 50(R Re)1 105 20 900 4896 t +10 R f +(To copy an audio CD in the most accurate way, \256rst run)11 2329 1 1080 5016 t +(cdda2wav dev=1,0 paraopts=proof)2 1405 1 1212 5184 t +10 S1 f +(\261)2650 5184 w +10 R f +(vall cddb=0)1 483 1 2715 5184 t +10 S1 f +(\261)3231 5184 w +10 R f +(B)3296 5184 w +10 S1 f +(\261)3396 5184 w +10 R f +(Owav)3461 5184 w +(and then run)2 515 1 1080 5352 t +(cdrecord dev=2,0)1 706 1 1212 5520 t +10 S1 f +(\261)1951 5520 w +10 R f +(v)2016 5520 w +10 S1 f +(\261)2099 5520 w +10 R f +(dao)2164 5520 w +10 S1 f +(\261)2341 5520 w +10 R f +(useinfo)2406 5520 w +10 S1 f +(\261)2733 5520 w +10 R f +(text)2798 5520 w +10 S f +(*)3014 5520 w +10 R f +(.wav)3064 5520 w +( there is no CD-Text)4 877( If)1 138( to read CD-Text information from disk.)6 1696(This will try to copy track indices and)7 1609 4 1080 5688 t +(information,)1080 5808 w +10 B f +( av v)2 50( wa)1 50( a2 2w)2 122( dd da)2 106(c cd)1 100 5 1610 5808 t +10 R f +(will try to get the information from freedb.org instead.)8 2239 1 2071 5808 t +(To copy an audio CD from a pipe \(without intermediate \256les\), \256rst run)12 2918 1 1080 5976 t +(cdda2wav dev=1,0)1 762 1 1212 6144 t +10 S1 f +(\261)2007 6144 w +10 R f +(vall cddb=0)1 483 1 2072 6144 t +10 S1 f +(\261)2588 6144 w +10 R f +(info)2653 6144 w +10 S1 f +(\261)2814 6144 w +10 R f +(only)2879 6144 w +(and then run)2 515 1 1080 6312 t +(cdda2wav dev=1,0)1 762 1 1212 6480 t +10 S1 f +(\261)2007 6480 w +10 R f +(no)2072 6480 w +10 S1 f +(\261)2172 6480 w +10 R f +(info\256le)2237 6480 w +10 S1 f +(\261)2559 6480 w +10 R f +(B)2624 6480 w +10 S1 f +(\261)2724 6480 w +10 R f +(Oraw)2789 6480 w +10 S1 f +(\261)3043 6480 w +10 S f +(\372)3141 6480 w +10 S1 f +(\\)3224 6480 w +10 R f +(cdrecord dev=2,0)1 706 1 1212 6600 t +10 S1 f +(\261)1951 6600 w +10 R f +(v)2016 6600 w +10 S1 f +(\261)2099 6600 w +10 R f +(dao)2164 6600 w +10 S1 f +(\261)2341 6600 w +10 R f +(audio)2406 6600 w +10 S1 f +(\261)2661 6600 w +10 R f +(useinfo)2726 6600 w +10 S1 f +(\261)3053 6600 w +10 R f +(text)3118 6600 w +10 S f +(*)3301 6600 w +10 R f +(.inf)3351 6600 w +( track size info\) from the)5 1049(This will get all information \(including)5 1619 2 1080 6768 t +10 S f +(* *)1 50 1 3785 6768 t +10 B f +( f)1 0( nf)1 33( in)1 56(. .i)1 53 4 3835 6768 t +10 R f +(\256les and then read the audio data)6 1386 1 4014 6768 t +(from stdin.)1 447 1 1080 6888 t +(If you like to write from)5 1048 1 1080 7128 t +10 B f +( n)1 0( in)1 56( di)1 28( td)1 56(s st)1 72 5 2169 7128 t +10 R f +( sure that cdrecord is called with a large enough FIFO size \(e.g.)12 2737(, make)1 282 2 2381 7128 t +10 B f +( m)1 0( 12 28 8m)3 183( =1)1 50( s=)1 57(f fs)1 72 5 1080 7248 t +10 R f +(\), reduce the write speed to a value below the read speed of the source drive \(e.g.)16 3434 1 1442 7248 t +10 B f +( 12 2)2 50( =1)1 50( d=)1 57( ee ed)2 100( pe)1 44(s sp)1 95 6 4946 7248 t +10 R f +(\),)5342 7248 w +(J)720 7728 w +(. .)1 47 1 759 7673 t +( 18)1 1829( change: Version 3.0)3 850( Last)1 1434(org Schilling)1 528 4 759 7728 t +cleartomark +showpage +restore +%%EndPage: 18 18 +%%Page: 19 19 +save +mark +19 pagesetup +10 R f +(Schily)720 480 w +10 S1 f +(\302)976 480 w +10 R f +( \( 1 \))3 164( CDRECORD)1 3277(s USER COMMANDS)2 950 3 1009 480 t +(and switch the burn-free option for the recording drive on by adding)11 2978 1 1080 960 t +10 B f +( re ee e)3 88( fr)1 44( nf)1 33( rn)1 56( bu ur)2 100( =b)1 56( s=)1 57( ts)1 39( pt)1 33( op)1 56( er ro)2 94( ve)1 44( iv)1 50( ri)1 28(d dr)1 100 15 4106 960 t +10 R f +( the)1 171(. For)1 245 2 4984 960 t +(same reason, it is not recommended to extract the audio data in paranoia mode in this case.)16 3755 1 1080 1080 t +9 B f +( M)1 0( OM)1 85( RO)1 70( -R)1 65( D-)1 30( BD)1 65( /B)1 60( M/)1 25( OM)1 85( RO)1 70( -R)1 65( DV VD D-)3 160( /D)1 65( M/)1 25( OM)1 85( RO)1 70( -R)1 65( CD D-)2 95( C)1 95( e)1 0( le)1 40( pl)1 25( mp)1 50( im)1 75( si)1 25( s)1 65( a)1 0( a)1 75( g)1 0( ng)1 45( in)1 50( ti)1 25( at)1 30( ca)1 45( li ic)2 65( pl)1 25( ep)1 50(R Re)1 105 38 900 1368 t +10 R f +(To copy a simple disk, \256rst read the master using:)9 2065 1 1080 1488 t +(readcd dev=1,0 f=some\256le)2 1084 1 1212 1656 t +(Then write the disk using:)4 1076 1 1080 1824 t +(cdrecord dev=2,0)1 706 1 1212 1992 t +10 S1 f +(\261)1951 1992 w +10 R f +(raw96r)2016 1992 w +10 S1 f +(\261)2331 1992 w +10 R f +(clone)2396 1992 w +10 S1 f +(\261)2645 1992 w +10 R f +(v some\256le)1 422 1 2710 1992 t +9 B f +( e)1 0( de)1 40( od)1 50( mo)1 45( m)1 105( e)1 0( ne)1 40( on)1 50( lo)1 45( cl)1 25( c)1 70( n)1 0( in)1 50( i)1 55( M)1 0( OM)1 85( RO)1 70( -R)1 65( CD D-)2 95( C)1 95( a)1 0( a)1 75( g)1 0( ng)1 45( in)1 50( ti)1 25( at)1 30( ca)1 45( li ic)2 65( pl)1 25( ep)1 50(R Re)1 105 32 900 2280 t +10 R f +(To copy a CD in clone mode, \256rst read the master CD using:)12 2524 1 1080 2400 t +(readcd dev=1,0)1 623 1 1212 2568 t +10 S1 f +(\261)1868 2568 w +10 R f +(clone f=some\256le)1 677 1 1933 2568 t +(or \(in case the CD contains many sectors that are unreadable by intention\) by calling:)14 3517 1 1080 2736 t +(readcd dev=1,0)1 623 1 1212 2904 t +10 S1 f +(\261)1868 2904 w +10 R f +(clone)1933 2904 w +10 S1 f +(\261)2182 2904 w +10 R f +(nocorr f=some\256le)1 721 1 2247 2904 t +(This will create the \256les)4 992 1 1080 3072 t +10 I f +(some\256le)2105 3072 w +10 R f +(and)2465 3072 w +10 I f +(some\256le.toc)2642 3072 w +10 R f +( write the CD using:)4 843(. Then)1 296 2 3124 3072 t +(cdrecord dev=2,0)1 706 1 1212 3240 t +10 S1 f +(\261)1951 3240 w +10 R f +(raw96r)2016 3240 w +10 S1 f +(\261)2331 3240 w +10 R f +(clone)2396 3240 w +10 S1 f +(\261)2645 3240 w +10 R f +(v some\256le)1 422 1 2710 3240 t +9 B f +( CD D)2 65( C)1 95( o)1 0( io)1 45( ud di)2 75( Au)1 50( A)1 95( n)1 0( an)1 50( a)1 75( g)1 0( ng)1 45( in)1 50( ti)1 25( at)1 30( re ea)2 85(C Cr)1 105 17 900 3528 t +10 R f +( a pure CD-DA \(audio\) at single speed, with each track contained in \256les named)14 3882(To record)1 438 2 1080 3648 t +10 I f +(track01.cdaudio)1080 3768 w +10 R f +(,)1740 3768 w +10 I f +(track02.cdaudio)1798 3768 w +10 R f +(, etc.:)1 227 1 2458 3768 t +(cdrecord)1212 3936 w +10 S1 f +(\261)1593 3936 w +10 R f +(v speed=1 dev=2,0)2 774 1 1658 3936 t +10 S1 f +(\261)2465 3936 w +10 R f +(dao)2530 3936 w +10 S1 f +(\261)2707 3936 w +10 R f +(audio track)1 454 1 2772 3936 t +10 S f +(*)3226 3936 w +10 R f +(.cdaudio)3276 3936 w +(To check if it will be OK to use double speed for the example above, use the dummy write option:)19 4080 1 1080 4104 t +(cdrecord)1212 4272 w +10 S1 f +(\261)1593 4272 w +10 R f +(v)1658 4272 w +10 S1 f +(\261)1741 4272 w +10 R f +(dummy speed=2 dev=2,0)2 1030 1 1806 4272 t +10 S1 f +(\261)2869 4272 w +10 R f +(dao)2934 4272 w +10 S1 f +(\261)3111 4272 w +10 R f +(audio track)1 454 1 3176 4272 t +10 S f +(*)3630 4272 w +10 R f +(.cdaudio)3680 4272 w +9 B f +( CD D)2 65( C)1 95( a)1 0( ta)1 45( at)1 30( Da)1 45( -D)1 65( o-)1 30( io)1 45( ud di)2 75( Au)1 50( A)1 95( d)1 0( ed)1 50( xe)1 40( ix)1 45( mi)1 25( m)1 105( a)1 0( a)1 75( g)1 0( ng)1 45( in)1 50( ti)1 25( at)1 30( re ea)2 85(C Cr)1 105 27 900 4440 t +10 R f +( \256lesystem from)2 670(To record a mixed-mode CD with an ISO-9660)7 1957 2 1080 4560 t +10 I f +(cdimage.raw)3742 4560 w +10 R f +(on the \256rst track, the other)5 1104 1 4296 4560 t +(tracks being audio tracks from the \256les)6 1601 1 1080 4680 t +10 I f +(track01.cdaudio)2714 4680 w +10 R f +(,)3374 4680 w +10 I f +(track02.cdaudio)3432 4680 w +10 R f +(, etc.:)1 227 1 4092 4680 t +(cdrecord)1212 4848 w +10 S1 f +(\261)1593 4848 w +10 R f +(v dev=2,0)1 408 1 1658 4848 t +10 S1 f +(\261)2099 4848 w +10 R f +(dao cdimage.raw)1 689 1 2164 4848 t +10 S1 f +(\261)2886 4848 w +10 R f +(audio track)1 454 1 2951 4848 t +10 S f +(*)3405 4848 w +10 R f +(.cdaudio)3455 4848 w +9 B f +( M)1 0( OM)1 85( RO)1 70( -R)1 65( D-)1 30( BD)1 65( /B)1 60( M/)1 25( OM)1 85( RO)1 70( -R)1 65( DV VD D-)3 160( /D)1 65( M/)1 25( OM)1 85( RO)1 70( -R)1 65( CD D-)2 95( C)1 95( a)1 0( a)1 75( g)1 0( ng)1 45( in)1 50( ti)1 25( at)1 30( re ea)2 85(C Cr)1 105 28 900 5016 t +10 R f +(To record a pure disk at double speed, using data from the \256le)12 2572 1 1080 5136 t +10 I f +(cdimage.raw)3685 5136 w +10 R f +(:)4212 5136 w +(cdrecord)1212 5304 w +10 S1 f +(\261)1593 5304 w +10 R f +(v speed=2 dev=2,0)2 774 1 1658 5304 t +10 S1 f +(\261)2465 5304 w +10 R f +(dao cdimage.raw)1 689 1 2530 5304 t +(To create an image for an ISO-9660 \256lesystem with Rock Ridge extensions:)11 3137 1 1080 5472 t +(mkisofs)1212 5640 w +10 S1 f +(\261)1562 5640 w +10 R f +(R)1627 5640 w +10 S1 f +(\261)1727 5640 w +10 R f +(o cdimage.raw /home/joerg/master/tree)2 1582 1 1792 5640 t +(To check the resulting \256le before writing to disk on Solaris:)10 2467 1 1080 5808 t +(mount)1212 5976 w +10 S1 f +(\261)1501 5976 w +10 R f +(r)1566 5976 w +10 S1 f +(\261)1632 5976 w +10 R f +(F fbk)1 222 1 1697 5976 t +10 S1 f +(\261)1952 5976 w +10 R f +(o type=hsfs /dev/fbk0:cdimage.raw /mnt)3 1645 1 2017 5976 t +(The)1080 6144 w +10 B f +( bk k)2 56(f fb)1 89 2 1268 6144 t +10 R f +(driver \256rst appeared in 1988.)4 1188 1 1446 6144 t +( of the original)3 633(Solaris 9 or newer comes with a variant)7 1674 2 1080 6312 t +10 B f +( bk k)2 56(f fb)1 89 2 3426 6312 t +10 R f +(idea called)1 443 1 3610 6312 t +10 B f +( \256)1 0( o\256)1 56(l lo)1 78 3 4092 6312 t +10 R f +( command for the lo\256)4 922(. The)1 252 2 4226 6312 t +(variant is:)1 405 1 1080 6432 t +(mount)1440 6600 w +10 S1 f +(\261)1729 6600 w +10 R f +(r)1794 6600 w +10 S1 f +(\261)1860 6600 w +10 R f +(F hsfs ` lo\256adm)3 655 1 1925 6600 t +10 S1 f +(\261)2613 6600 w +10 R f +(a /tmp/cdimage.raw ` /mnt)3 1084 1 2678 6600 t +(Note that lo\256adm needs absolute path names.)6 1860 1 1080 6768 t +(On Linux:)1 422 1 1080 6936 t +(J)720 7680 w +(. .)1 47 1 759 7625 t +( 19)1 1829( change: Version 3.0)3 850( Last)1 1434(org Schilling)1 528 4 759 7680 t +cleartomark +showpage +restore +%%EndPage: 19 19 +%%Page: 20 20 +save +mark +20 pagesetup +10 R f +(Schily)720 480 w +10 S1 f +(\302)976 480 w +10 R f +( \( 1 \))3 164( CDRECORD)1 3277(s USER COMMANDS)2 950 3 1009 480 t +(mount cdimage.raw)1 801 1 1212 960 t +10 S1 f +(\261)2046 960 w +10 R f +(r)2111 960 w +10 S1 f +(\261)2177 960 w +10 R f +(t iso9660)1 378 1 2242 960 t +10 S1 f +(\261)2653 960 w +10 R f +(o loop /mnt)2 478 1 2718 960 t +(Go on with:)2 494 1 1080 1128 t +(ls)1212 1248 w +10 S1 f +(\261)1312 1248 w +10 R f +(lR /mnt)1 312 1 1377 1248 t +(umount /mnt)1 523 1 1212 1368 t +( the system is suf\256cient and the structure of the \256lesystem is not too complex,)14 3373(If the overall speed of)4 947 2 1080 1536 t +(cdrecord will run without creating an image of the ISO-9660 \256lesystem. Simply run the pipeline:)14 3989 1 1080 1656 t +(mkisofs)1212 1824 w +10 S1 f +(\261)1562 1824 w +10 R f +(R /master/tree)1 571 1 1627 1824 t +10 S f +(\372)2231 1824 w +10 R f +(cdrecord)2314 1824 w +10 S1 f +(\261)2695 1824 w +10 R f +(v)2760 1824 w +10 S1 f +(\261)2843 1824 w +10 R f +(dao fs=6m speed=2 dev=2,0)3 1157 1 2908 1824 t +10 S1 f +(\261)4098 1824 w +10 R f +( the default FIFO size)4 915( As)1 180( this pipeline is 4 MBytes.)5 1106(The recommended minimum FIFO size for running)6 2119 4 1080 1992 t +(is 4 MB, the)3 531 1 1080 2112 t +10 B f +( =)1 0( s=)1 57(f fs)1 72 3 1648 2112 t +10 R f +( your sys-)2 416( If)1 135( a different FIFO size.)4 928(option needs to be present only if you want to use)10 2107 4 1814 2112 t +( raise the priority of)4 901( To)1 196(tem is loaded, you should run mkisofs in the real-time class too.)11 2843 3 1080 2232 t +10 B f +( s)1 0( fs)1 39( of)1 33( so)1 50( is)1 39( ki)1 28(m mk)1 139 7 5072 2232 t +10 R f +(replace the command)2 869 1 1080 2352 t +(mkisofs)1212 2520 w +10 S1 f +(\261)1562 2520 w +10 R f +(R /master/tree)1 571 1 1627 2520 t +(by)1080 2640 w +(priocntl)1212 2760 w +10 S1 f +(\261)1556 2760 w +10 R f +(e)1621 2760 w +10 S1 f +(\261)1698 2760 w +10 R f +(c RT)1 205 1 1763 2760 t +10 S1 f +(\261)2001 2760 w +10 R f +(p 59 mkisofs)2 533 1 2066 2760 t +10 S1 f +(\261)2632 2760 w +10 R f +(R /master/tree)1 571 1 2697 2760 t +(on Solaris and by)3 721 1 1080 3000 t +(nice)1212 3240 w +10 S1 f +(\261\261)1411 3240 w +10 R f +(18 mkisofs)1 450 1 1541 3240 t +10 S1 f +(\261)2024 3240 w +10 R f +(R /master/tree)1 571 1 2089 3240 t +(on systems that do not have)5 1148 1 1080 3480 t +10 B f +( l)1 0( al)1 28( na)1 50( on)1 56( io)1 50( ti)1 28( at)1 33( na)1 50( er rn)2 100( te)1 44( nt)1 33( In)1 56( I)1 72( X)1 0( IX)1 72(U UN NI)2 183 16 2261 3480 t +10 R f +(-compliant real-time scheduling.)2 1317 1 3116 3480 t +( on Solaris, you should run mkisofs at no more than priority 58. On other)14 3145(Cdrecord runs at priority 59)4 1175 2 1080 3648 t +(systems, you should run mkisofs at no less than nice)9 2166 1 1080 3768 t +10 S1 f +(\261\261)3279 3768 w +10 R f +(18.)3409 3768 w +( system image on disk has been tested on a Sparcstation-2 with a)12 2898(Creating a CD-ROM without \256le)4 1422 2 1080 3936 t +( faster machine)2 637( A)1 144( up to quad speed when the machine was not loaded.)10 2239(Yamaha CDR-400. It did work)4 1300 4 1080 4056 t +(may be able to handle quad speed also in the loaded case.)11 2383 1 1080 4176 t +(To handle drives that need to know the size of a track before starting to write, \256rst run)17 3574 1 1080 4464 t +(mkisofs)1212 4632 w +10 S1 f +(\261)1562 4632 w +10 R f +(R)1627 4632 w +10 S1 f +(\261)1727 4632 w +10 R f +(quiet)1792 4632 w +10 S1 f +(\261)2025 4632 w +10 R f +(print)2090 4632 w +10 S1 f +(\261)2279 4632 w +10 R f +(size /master/tree)1 659 1 2344 4632 t +(and then run)2 515 1 1080 4800 t +(mkisofs)1212 4968 w +10 S1 f +(\261)1562 4968 w +10 R f +(R /master/tree)1 571 1 1627 4968 t +10 S f +(\372)2231 4968 w +10 R f +(cdrecord)2314 4968 w +10 S1 f +(\261)2695 4968 w +10 R f +(v)2760 4968 w +10 S1 f +(\261)2843 4968 w +10 R f +(dao speed=2 dev=2,0 tsize=XXXs)3 1395 1 2908 4968 t +10 S1 f +(\261)4336 4968 w +10 R f +(where)1080 5136 w +10 I f +(XXX)1356 5136 w +10 R f +(is replaced by the output of the previous run of mkisofs.)10 2319 1 1572 5136 t +9 B f +( s)1 0( ns)1 35( on)1 50( io)1 45( ti)1 25( pt)1 30( op)1 50( o)1 75( e)1 0( ve)1 40( iv)1 45( ri)1 25( dr)1 40( d)1 80( g)1 0( ng)1 45( in)1 50( tt ti)2 55( et)1 30(S Se)1 90 20 900 5424 t +10 R f +(To set drive options without writing a disk \(e.g. to switch a drive to single-session mode\), run)16 3873 1 1080 5544 t +(cdrecord dev=2,0)1 706 1 1212 5712 t +10 S1 f +(\261)1951 5712 w +10 R f +(setdropts driveropts=singlesession)1 1383 1 2016 5712 t +(If you like to do this when no disk is in the drive, call)13 2242 1 1080 5880 t +(cdrecord dev=2,0)1 706 1 1212 6048 t +10 S1 f +(\261)1951 6048 w +10 R f +(force)2016 6048 w +10 S1 f +(\261)2253 6048 w +10 R f +(setdropts driveropts=singlesession)1 1383 1 2318 6048 t +9 B f +( T)1 0( NT)1 60( EN)1 65( ME)1 60( NM)1 85( ON)1 65( RO)1 70( IR)1 65( NV VI)2 100(E EN)1 125 10 720 6336 t +10 B f +(C CD DR R)3 216 1 1080 6456 t +10 S f +(_ _)1 50 1 1296 6456 t +10 B f +( E)1 0( CE)1 67( IC)1 72( VI)1 39( EV)1 72(D DE)1 139 6 1346 6456 t +10 R f +( call of the SCSI transport)5 1126(This may either hold a device identi\256er that is suitable to the open)12 2834 2 1440 6576 t +(library or a label in the \256le /etc/default/cdrecord.)7 1996 1 1440 6696 t +10 B f +(C CD DR R)3 216 1 1080 6864 t +10 S f +(_ _)1 50 1 1296 6864 t +10 B f +( D)1 0( EE ED)2 139( PE)1 67(S SP)1 117 4 1346 6864 t +10 R f +(Sets the default speed value for writing \(see also)8 1999 1 1440 6984 t +10 S1 f +(\261 \261)1 65 1 3472 6984 t +10 B f +( d)1 0( ee ed)2 100( pe)1 44(s sp)1 95 4 3537 6984 t +10 R f +(option\).)3809 6984 w +10 B f +(C CD DR R)3 216 1 1080 7152 t +10 S f +(_ _)1 50 1 1296 7152 t +10 B f +( ZE E)2 67( IZ)1 67( SI)1 39( OS)1 56( FO)1 78( IF)1 61(F FI)1 100 7 1346 7152 t +10 R f +(Sets the default size of the FIFO \(see also)8 1728 1 1440 7272 t +10 B f +( =)1 0( s=)1 57(f fs)1 72 3 3201 7272 t +10 S1 f +(#)3330 7272 w +10 R f +(option\).)3413 7272 w +(J)720 7752 w +(. .)1 47 1 759 7697 t +( 20)1 1829( change: Version 3.0)3 850( Last)1 1434(org Schilling)1 528 4 759 7752 t +cleartomark +showpage +restore +%%EndPage: 20 20 +%%Page: 21 21 +save +mark +21 pagesetup +10 R f +(Schily)720 480 w +10 S1 f +(\302)976 480 w +10 R f +( \( 1 \))3 164( CDRECORD)1 3277(s USER COMMANDS)2 950 3 1009 480 t +10 B f +(C CD DR R)3 216 1 1080 960 t +10 S f +(_ _)1 50 1 1296 960 t +10 B f +( D)1 0( EE ED)2 139( PE)1 67( SP)1 61( WS)1 56( RA AW)2 172( ER)1 72( RC CE)2 139( OR)1 72(F FO)1 139 10 1346 960 t +10 R f +(If this environment variable is set,)5 1425 1 1440 1080 t +10 B f +( d)1 0( rd)1 56( or)1 44( re ec co)3 138( dr)1 44(c cd)1 100 6 2902 1080 t +10 R f +( full RAW encoding)3 852(will allow you to write at the)6 1227 2 3321 1080 t +( will create high potential of buffer underruns. Use with)9 2436( This)1 259(speed a single CPU supports.)4 1265 3 1440 1200 t +(care.)1440 1320 w +10 B f +(C CD DR R)3 216 1 1080 1488 t +10 S f +(_ _)1 50 1 1296 1488 t +10 B f +( D)1 0( EE ED)2 139( PE)1 67( SP)1 61( ES)1 56( RC CE)2 139( OR)1 72(F FO)1 139 8 1346 1488 t +10 R f +(If this environment variable is set,)5 1420 1 1440 1608 t +10 B f +( d)1 0( rd)1 56( or)1 44( re ec co)3 138( dr)1 44(c cd)1 100 6 2896 1608 t +10 R f +(will allow you to write at the full DMA speed the)10 2086 1 3314 1608 t +( that is to be written from disk.)7 1303( is no DMA reserve for reading the data)8 1678( There)1 301(system supports.)1 678 4 1440 1728 t +(This will create high potential of buffer underruns. Use with care.)10 2702 1 1440 1848 t +( set to the value)4 667(If this environment variable is)4 1240 2 1440 2088 t +10 B f +( y)1 0( ny)1 50(a an)1 106 3 3382 2088 t +10 R f +(,)3538 2088 w +10 B f +( d)1 0( rd)1 56( or)1 44( re ec co)3 138( dr)1 44(c cd)1 100 6 3598 2088 t +10 R f +(allows to write at any speed even)6 1385 1 4015 2088 t +(though it may fail later with a buffer underrun.)8 1930 1 1440 2208 t +10 B f +( H)1 0( SH)1 78(R RS)1 128 3 1080 2376 t +10 R f +(If the)1 227 1 1440 2376 t +10 B f +( H)1 0( SH)1 78(R RS)1 128 3 1706 2376 t +10 R f +(environment is present, the remote connection will not be created via)10 2899 1 1951 2376 t +10 B f +( d)1 0( md)1 56(r rc cm)2 171 3 4889 2376 t +10 R f +(\(3\) but)1 284 1 5116 2376 t +( by)1 137(by calling the program pointed to)5 1400 2 1440 2496 t +10 B f +( H)1 0( SH)1 78(R RS)1 128 3 3014 2496 t +10 R f +( e.g.)1 181(. Use)1 250 2 3220 2496 t +10 B f +( =)1 0( H=)1 57( SH)1 78(R RS)1 128 4 3688 2496 t +10 R f +(/usr/bin/ssh to create a secure shell)5 1449 1 3951 2496 t +(connection.)1440 2616 w +(Note that this forces)3 831 1 1440 2856 t +10 B f +( d)1 0( rd)1 56( or)1 44( re ec co)3 138( dr)1 44(c cd)1 100 6 2304 2856 t +10 R f +(to create a pipe to the)5 901 1 2720 2856 t +10 B f +( \))1 0( 1\))1 33( \(1)1 50( h\()1 33( sh)1 56(r rs)1 83 6 3655 2856 t +10 R f +(program and disallows)2 928 1 3944 2856 t +10 B f +( d)1 0( rd)1 56( or)1 44( re ec co)3 138( dr)1 44(c cd)1 100 6 4906 2856 t +10 R f +(to)5322 2856 w +( makes it impossible to set up per-)7 1432( This)1 245( socket to the remote server.)5 1170(directly access the network)3 1113 4 1440 2976 t +(formance parameters and slows down the connection compared to a)9 2797 1 1440 3096 t +10 B f +( t)1 0( oo ot)2 83(r ro)1 94 3 4272 3096 t +10 R f +(-initiated)4449 3096 w +10 B f +( \))1 0( 3\))1 33( \(3)1 50( d\()1 33( md)1 56(r rc cm)2 171 6 4845 3096 t +10 R f +(con-)5223 3096 w +(nection.)1440 3216 w +10 B f +( I)1 0( SI)1 39( CS)1 56( SC)1 72(R RS)1 128 5 1080 3384 t +10 R f +(If the)1 252 1 1440 3384 t +10 B f +( I)1 0( SI)1 39( CS)1 56( SC)1 72(R RS)1 128 5 1756 3384 t +10 R f +( not be the program)4 942(environment is present, the remote SCSI server will)7 2343 2 2115 3384 t +10 B f +( i)1 0( si)1 28( cs)1 39( sc)1 44( rs)1 39( /r)1 44( n/)1 28( in)1 56( bi)1 28( sb)1 56( /s)1 39( y/)1 28( il ly)2 78( hi)1 28( ch)1 56( sc)1 44( /s)1 39( t/)1 28( pt)1 33( op)1 56(/ /o)1 78 21 1440 3504 t +10 R f +(but the program pointed to by)5 1251 1 2346 3504 t +10 B f +( I)1 0( SI)1 39( CS)1 56( SC)1 72(R RS)1 128 5 3633 3504 t +10 R f +( that the remote SCSI server)5 1184(. Note)1 288 2 3928 3504 t +(program name will be ignored if you log in using an account that has been created with a)17 3960 1 1440 3624 t +(remote SCSI server program as login shell.)6 1771 1 1440 3744 t +9 B f +( S)1 0( LE ES)2 110( IL)1 60(F FI)1 90 4 720 4032 t +10 B f +( d)1 0( rd)1 56( or)1 44( re ec co)3 138( dr)1 44( cd)1 56( /c)1 44( t/)1 28( lt)1 33( ul)1 28( au)1 56( fa)1 50( ef)1 33( de)1 44( /d)1 56( c/)1 28( tc)1 44( et)1 33(/ /e)1 72 19 1080 4152 t +10 R f +( example:)1 423( For)1 229( /etc/default/cdrecord.)1 907(Default values can be set for the following options in)9 2401 4 1440 4272 t +9 R f +(CDR)1440 4392 w +9 S f +(_)1625 4392 w +9 R f +(FIFOSIZE=8m)1670 4392 w +10 R f +(or)2253 4392 w +9 R f +(CDR)2366 4392 w +9 S f +(_)2551 4392 w +9 R f +(SPEED=2)2596 4392 w +10 B f +(C CD DR R)3 216 1 1440 4560 t +10 S f +(_ _)1 50 1 1656 4560 t +10 B f +( E)1 0( CE)1 67( IC)1 72( VI)1 39( EV)1 72(D DE)1 139 6 1706 4560 t +10 R f +( is suitable to the open call of the SCSI)9 1729(This may either hold a device identi\256er that)7 1871 2 1800 4680 t +( identify a)2 455(transport library or a label in the \256le /etc/default/cdrecord that allows to)11 3145 2 1800 4800 t +(speci\256c drive on the system.)4 1167 1 1800 4920 t +10 B f +(C CD DR R)3 216 1 1440 5088 t +10 S f +(_ _)1 50 1 1656 5088 t +10 B f +( D)1 0( EE ED)2 139( PE)1 67(S SP)1 117 4 1706 5088 t +10 R f +(Sets the default speed value for writing \(see also)8 1999 1 1800 5208 t +10 S1 f +(\261 \261)1 65 1 3832 5208 t +10 B f +( d)1 0( ee ed)2 100( pe)1 44(s sp)1 95 4 3897 5208 t +10 R f +(option\).)4169 5208 w +10 B f +(C CD DR R)3 216 1 1440 5376 t +10 S f +(_ _)1 50 1 1656 5376 t +10 B f +( ZE E)2 67( IZ)1 67( SI)1 39( OS)1 56( FO)1 78( IF)1 61(F FI)1 100 7 1706 5376 t +10 R f +(Sets the default size of the FIFO \(see also)8 1728 1 1800 5496 t +10 B f +( =)1 0( s=)1 57(f fs)1 72 3 3561 5496 t +10 S1 f +(#)3690 5496 w +10 R f +(option\).)3773 5496 w +10 B f +(C CD DR R)3 216 1 1440 5664 t +10 S f +(_ _)1 50 1 1656 5664 t +10 B f +( ZE E)2 67( IZ)1 67( SI)1 39( OS)1 56( FO)1 78( IF)1 61( FI)1 39( AX XF)2 133(M MA)1 166 9 1706 5664 t +10 R f +(Sets the maximum size of the FIFO \(see also)8 1857 1 1800 5784 t +10 B f +( =)1 0( s=)1 57(f fs)1 72 3 3690 5784 t +10 S1 f +(#)3819 5784 w +10 R f +(option\).)3902 5784 w +10 B f +( l)1 0( el)1 28( be)1 44( ab)1 56( la)1 50( l)1 61( er r)2 44( he)1 44( th)1 56( ot)1 33( o)1 83( y)1 0( ny)1 50(A An)1 128 14 1440 5952 t +10 R f +( contain)1 335( an identi\256er may not)4 915( Such)1 273(is an identi\256er for a speci\256c drive on the system.)9 2077 4 1800 6072 t +(the characters ',', '/', ')4 925 1 1800 6192 t +10 S1 f +(@)2725 6192 w +10 R f +(' or ':'.)2 301 1 2817 6192 t +( four)1 206( Currently,)1 481( contains a TAB separated list of items.)7 1681(Each line that follows a label)5 1232 4 1800 6432 t +( SCSI ID of the drive, the default speed that should be used)12 2552(items are recognized: the)3 1048 2 1800 6552 t +( this drive and drive)4 923(for this drive, the default FIFO size that should be used for)11 2677 2 1800 6672 t +(speci\256c options. The values for)4 1303 1 1800 6792 t +10 I f +(speed)3141 6792 w +10 R f +(and)3406 6792 w +10 I f +(\256fosize)3587 6792 w +10 R f +(may be set to)3 566 1 3902 6792 t +10 S1 f +(\261)4505 6792 w +10 R f +(1 to tell cdrecord to)4 830 1 4570 6792 t +( value for driveropts may be set to)7 1458( The)1 226(use the global defaults.)3 957 3 1800 6912 t +10 S1 f +("")4479 6912 w +10 R f +(if no driveropts are)3 801 1 4599 6912 t +( typical line may look this way:)6 1309(used. A)1 346 2 1800 7032 t +( 8m)1 438( 4)1 271(teac1= 0,5,0)1 499 3 1800 7272 t +10 S1 f +("")3240 7272 w +10 R f +(J)720 7752 w +(. .)1 47 1 759 7697 t +( 21)1 1829( change: Version 3.0)3 850( Last)1 1434(org Schilling)1 528 4 759 7752 t +cleartomark +showpage +restore +%%EndPage: 21 21 +%%Page: 22 22 +save +mark +22 pagesetup +10 R f +(Schily)720 480 w +10 S1 f +(\302)976 480 w +10 R f +( \( 1 \))3 164( CDRECORD)1 3277(s USER COMMANDS)2 950 3 1009 480 t +(yamaha= 1,6,0)1 599 1 1800 960 t +10 S1 f +(\261)2520 960 w +10 R f +(1)2585 960 w +10 S1 f +(\261)2880 960 w +10 R f +(1 burnfree)1 632 1 2945 960 t +(This tells)1 380 1 1800 1200 t +10 B f +( d)1 0( rd)1 56( or)1 44( re ec co)3 138( dr)1 44(c cd)1 100 6 2215 1200 t +10 R f +(that a drive named)3 770 1 2632 1200 t +10 I f +(teac1)3437 1200 w +10 R f +( 0 and should)3 569(is at scsibus 0, target 5, lun)6 1143 2 3688 1200 t +( second drive may be found at)6 1329( A)1 151( of 8 MB.)3 452(be used with speed 4 and a FIFO size)8 1668 4 1800 1320 t +(scsibus 1, target 6, lun 0 and uses the default speed and the default FIFO size.)15 3221 1 1800 1440 t +10 S f +(* *)1 50 1 1080 1728 t +10 B f +( f)1 0( nf)1 33( in)1 56(. .i)1 53 4 1130 1728 t +10 R f +(The)1440 1728 w +10 S f +(* *)1 50 1 1641 1728 t +10 B f +( f)1 0( nf)1 33( in)1 56(. .i)1 53 4 1691 1728 t +10 R f +(\256les are created by)3 813 1 1879 1728 t +10 B f +( av v)2 50( wa)1 50( a2 2w)2 122( dd da)2 106(c cd)1 100 5 2738 1728 t +10 R f +(where)3212 1728 w +10 S f +(* *)1 50 1 3502 1728 t +10 R f +(is replaced by the actual audio \256le pre\256x.)7 1801 1 3599 1728 t +(They are read and used by)5 1089 1 1440 1848 t +10 B f +( d)1 0( rd)1 56( or)1 44( re ec co)3 138( dr)1 44(c cd)1 100 6 2562 1848 t +10 R f +(in case cdrecord was called with the)6 1488 1 2977 1848 t +10 S1 f +(\261 \261)1 65 1 4498 1848 t +10 B f +( o)1 0( fo)1 50( nf)1 33( in)1 56( ei)1 28( se)1 44(u us)1 95 7 4563 1848 t +10 R f +(option.)4902 1848 w +(There are three general types of parameters:)6 1802 1 1440 2088 t +10 B f +( s)1 0( er rs)2 83( te)1 44( et)1 33( me)1 44( am)1 83( ra)1 50( ar)1 44( pa)1 50( p)1 89( l)1 0( al)1 28( ca)1 50( ic)1 44( er ri)2 72( me)1 44(n nu um)2 195 17 1440 2256 t +10 R f +( tag label without any quot-)5 1147(A numerical parameter is a number and directly follows the)9 2453 2 1800 2376 t +(ing.)1800 2496 w +10 B f +( s)1 0( er rs)2 83( te)1 44( et)1 33( me)1 44( am)1 83( ra)1 50( ar)1 44( pa)1 50( p)1 89( e)1 0( pe)1 44( yp)1 56( ty)1 50( t)1 66( g)1 0( ng)1 50( in)1 56( ri)1 28( tr)1 44( st)1 33( s)1 72( d)1 0( ed)1 56( te)1 44( ot)1 33(u un nq qu uo)4 274 27 1440 2664 t +10 R f +( more words that directly follow the tag)7 1710(An unquoted parameter is make from one or)7 1890 2 1800 2784 t +( the parameter list are used by cdrecord depends on the)10 2334( many words from)3 780(label. How)1 486 3 1800 2904 t +(tag label.)1 374 1 1800 3024 t +10 B f +( s)1 0( er rs)2 83( te)1 44( et)1 33( me)1 44( am)1 83( ra)1 50( ar)1 44( pa)1 50( p)1 89( e)1 0( pe)1 44( yp)1 56( ty)1 50( t)1 66( g)1 0( ng)1 50( in)1 56( ri)1 28( tr)1 44( st)1 33( s)1 72( d)1 0( ed)1 56( te)1 44( ot)1 33(q qu uo)2 162 27 1440 3192 t +10 R f +( is enclosed in single quotes. The string starts after the \256rst sin-)12 2631(A string type parameter)3 969 2 1800 3312 t +( character that follows the tag label and ends before the last single quote on)14 3215(gle quote)1 385 2 1800 3432 t +( that a single quote appears inside)6 1426( needs no escape sequences in case)6 1467( It)1 131(the same line.)2 576 4 1800 3552 t +( text to the right of the rightmost single quote character is ignored.)12 2746( Any)1 238(the string.)1 408 3 1800 3672 t +(The order of the tag labels in the \256le is not important.)11 2225 1 1440 3840 t +(The following tag labels may appear in a)7 1689 1 1440 4008 t +10 S f +(* *)1 50 1 3162 4008 t +10 B f +( f)1 0( nf)1 33( in)1 56(. .i)1 53 4 3212 4008 t +10 R f +(\256le:)3387 4008 w +10 B f +( X)1 0( EX)1 72( ND DE)2 139( IN)1 72(C CD DI)2 183 5 1440 4176 t +10 S f +(_ _)1 50 1 1906 4176 t +10 B f +( =)1 0( D=)1 57( ID)1 72( CI)1 39( SC)1 72( IS)1 56(D DI)1 111 7 1956 4176 t +10 R f +(The cdindex disk ID is used by the)7 1446 1 1800 4296 t +10 B f +( z)1 0( nz)1 44( in)1 56( ai)1 28( ra)1 50( br)1 44( cb)1 56( ic)1 44( si)1 28( us)1 39(m mu)1 139 11 3279 4296 t +10 R f +(CD-database.)3840 4296 w +(This tag label uses a quoted string type parameter.)8 2069 1 1800 4536 t +(This tag label is ignored by)5 1131 1 1800 4776 t +10 B f +( d)1 0( rd)1 56( or)1 44( re ec co)3 138( dr)1 44(c cd)1 100 6 2964 4776 t +10 R f +(.)3346 4776 w +10 B f +( B)1 0(C CD DD DB)3 283 2 1440 4944 t +10 S f +(_ _)1 50 1 1723 4944 t +10 B f +( =)1 0( D=)1 57( ID)1 72( CI)1 39( SC)1 72( IS)1 56(D DI)1 111 7 1773 4944 t +10 R f +(The cddb disk ID is used by the)7 1324 1 1800 5064 t +10 B f +( dd db b)3 112(c cd)1 100 2 3157 5064 t +10 R f +(and the)1 299 1 3402 5064 t +10 B f +( db b)2 56( re ee ed)3 144(f fr)1 77 3 3734 5064 t +10 R f +(CD-database.)4044 5064 w +(This tag label uses a numerical parameter.)6 1730 1 1800 5304 t +(This tag label is ignored by)5 1131 1 1800 5544 t +10 B f +( d)1 0( rd)1 56( or)1 44( re ec co)3 138( dr)1 44(c cd)1 100 6 2964 5544 t +10 R f +(.)3346 5544 w +10 B f +( =)1 0( CN N=)2 129(M MC)1 166 3 1440 5712 t +10 R f +( a 13 digit number that follows UPC/EAN-13)7 1966(The Media Catalog Number \(MCN\) is)5 1634 2 1800 5712 t +(rules.)1800 5832 w +(The data is used by cdrecord to create sub-channel data.)9 2304 1 1800 6072 t +10 B f +( =)1 0( RC C=)2 129( SR)1 72(I IS)1 95 4 1440 6240 t +10 R f +( that is created)3 633(The International Standard Recording Code \(ISRC\) is a 12 byte string)10 2967 2 1800 6240 t +( char-)1 240(from two uppercase characters for the country code, followed by three uppercase)11 3360 2 1800 6360 t +( digits for the year of recording followed by \256ve)9 2035(acters for the owner, followed by two)6 1565 2 1800 6480 t +(digits for the recording serial number.)5 1554 1 1800 6600 t +( ISRC tag, there may be a minus sign between every)10 2224(To increase the readability of the)5 1376 2 1800 6840 t +(two \256elds of the ISRC string.)5 1213 1 1800 6960 t +(The data is used by cdrecord to create sub-channel data.)9 2304 1 1800 7200 t +(J)720 7680 w +(. .)1 47 1 759 7625 t +( 22)1 1829( change: Version 3.0)3 850( Last)1 1434(org Schilling)1 528 4 759 7680 t +cleartomark +showpage +restore +%%EndPage: 22 22 +%%Page: 23 23 +save +mark +23 pagesetup +10 R f +(Schily)720 480 w +10 S1 f +(\302)976 480 w +10 R f +( \( 1 \))3 164( CDRECORD)1 3277(s USER COMMANDS)2 950 3 1009 480 t +10 B f +( =)1 0( e=)1 57( le)1 44( tl)1 28( it)1 33( ti)1 28( mt)1 33( bu um)2 139( lb)1 56(A Al)1 100 10 1440 960 t +10 R f +(The)1800 1080 w +10 B f +( e)1 0( le)1 44( tl)1 28( it)1 33( Ti)1 28( T)1 100( m)1 0( bu um)2 139( lb)1 56(A Al)1 100 10 1988 1080 t +10 R f +(is the name of the disk in the CD-Text information.)9 2126 1 2549 1080 t +(This tag label uses a quoted string type parameter.)8 2069 1 1800 1320 t +10 B f +( =)1 0( e=)1 57( le)1 44( tl)1 28( it)1 33( ti)1 28( kt)1 33( ck)1 56( ac)1 44( ra)1 50(T Tr)1 111 11 1440 1488 t +10 R f +(The)1800 1608 w +10 B f +( e)1 0( le)1 44( tl)1 28( it)1 33( Ti)1 28( T)1 100( k)1 0( ck)1 56( ac)1 44( ra)1 50(T Tr)1 111 11 1988 1608 t +10 R f +(is the name of the current track in the CD-Text information.)10 2473 1 2515 1608 t +(This tag label uses a quoted string type parameter.)8 2069 1 1800 1848 t +10 B f +( =)1 0( er r=)2 101( me)1 44( rm)1 83( or)1 44( fo)1 50( er rf)2 77( pe)1 44( mp)1 56( bu um)2 139( lb)1 56(A Al)1 100 12 1440 2016 t +10 R f +(The)1800 2136 w +10 B f +( er r)2 44( me)1 44( rm)1 83( or)1 44( fo)1 50( er rf)2 77( Pe)1 44( P)1 102( m)1 0( bu um)2 139( lb)1 56(A Al)1 100 12 1996 2136 t +10 R f +( global name of the of the performer of the disk in the)12 2350(is the)1 230 2 2820 2136 t +(CD-Text information.)1 885 1 1800 2256 t +(This tag label uses a quoted string type parameter.)8 2069 1 1800 2496 t +10 B f +( =)1 0( er r=)2 101( me)1 44( rm)1 83( or)1 44( fo)1 50( er rf)2 77(P Pe)1 105 8 1440 2664 t +10 R f +(The)1800 2784 w +10 B f +( er r)2 44( me)1 44( rm)1 83( or)1 44( fo)1 50( er rf)2 77(P Pe)1 105 7 1989 2784 t +10 R f +(is the name of the of the performer of the current track in the CD-Text)14 2930 1 2470 2784 t +(information.)1800 2904 w +(This tag label uses a quoted string type parameter.)8 2069 1 1800 3144 t +10 B f +( =)1 0( er r=)2 101( te)1 44( it)1 33( ri)1 28( wr)1 44( gw)1 72( ng)1 50( on)1 56( so)1 50( ms)1 39( bu um)2 139( lb)1 56(A Al)1 100 14 1440 3312 t +10 R f +(The)1800 3432 w +10 B f +( er r)2 44( te)1 44( it)1 33( ri)1 28( wr)1 44( gw)1 72( ng)1 50( on)1 56( So)1 50( S)1 94( m)1 0( bu um)2 139( lb)1 56(A Al)1 100 14 1993 3432 t +10 R f +( the)1 161(is the global name of the of the songwriter of the disk in)12 2398 2 2841 3432 t +(CD-Text information.)1 885 1 1800 3552 t +(This tag label uses a quoted string type parameter.)8 2069 1 1800 3792 t +10 B f +( =)1 0( er r=)2 101( te)1 44( it)1 33( ri)1 28( wr)1 44( gw)1 72( ng)1 50( on)1 56(S So)1 106 10 1440 3960 t +10 R f +(The)1800 4080 w +10 B f +( er r)2 44( te)1 44( it)1 33( ri)1 28( wr)1 44( gw)1 72( ng)1 50( on)1 56(S So)1 106 9 1996 4080 t +10 R f +( of the of the songwriter of the current track in the CD-)12 2399(is the name)2 487 2 2514 4080 t +(Text information.)1 713 1 1800 4200 t +(This tag label uses a quoted string type parameter.)8 2069 1 1800 4440 t +10 B f +( =)1 0( er r=)2 101( se)1 44( os)1 39( po)1 50( mp)1 56( om)1 83( co)1 50( mc)1 44( bu um)2 139( lb)1 56(A Al)1 100 12 1440 4608 t +10 R f +(The)1800 4728 w +10 B f +( er r)2 44( se)1 44( os)1 39( po)1 50( mp)1 56( om)1 83( Co)1 50( C)1 115( m)1 0( bu um)2 139( lb)1 56(A Al)1 100 12 1997 4728 t +10 R f +(is the global name of the of the composer of the disk in the)13 2584 1 2816 4728 t +(CD-Text information.)1 885 1 1800 4848 t +(This tag label uses a quoted string type parameter.)8 2069 1 1800 5088 t +10 B f +( =)1 0( er r=)2 101( se)1 44( os)1 39( po)1 50( mp)1 56( om)1 83(C Co)1 122 8 1440 5256 t +10 R f +(The)1800 5376 w +10 B f +( er r)2 44( se)1 44( os)1 39( po)1 50( mp)1 56( om)1 83(C Co)1 122 7 1990 5376 t +10 R f +( in the CD-Text)3 663(is the name of the of the composer of the current track)11 2274 2 2463 5376 t +(information.)1800 5496 w +(This tag label uses a quoted string type parameter.)8 2069 1 1800 5736 t +10 B f +( =)1 0( er r=)2 101( ge)1 44( ng)1 50( an)1 56( rr ra)2 94( ar)1 44( ma)1 50( bu um)2 139( lb)1 56(A Al)1 100 11 1440 5904 t +10 R f +(The)1800 6024 w +10 B f +( er r)2 44( ge)1 44( ng)1 50( an)1 56( rr ra)2 94( Ar)1 44( A)1 107( m)1 0( bu um)2 139( lb)1 56(A Al)1 100 11 1990 6024 t +10 R f +( of the of the arranger of the disk in the CD-)11 1881(is the global name)3 760 2 2759 6024 t +(Text information.)1 713 1 1800 6144 t +(This tag label uses a quoted string type parameter.)8 2069 1 1800 6384 t +10 B f +( =)1 0( er r=)2 101( ge)1 44( ng)1 50( an)1 56( rr ra)2 94(A Ar)1 116 7 1440 6552 t +10 R f +(The)1800 6672 w +10 B f +( er r)2 44( ge)1 44( ng)1 50( an)1 56( rr ra)2 94(A Ar)1 116 6 1995 6672 t +10 R f +(is the name of the of the arranger of the current track in the CD-Text)14 2961 1 2439 6672 t +(information.)1800 6792 w +(This tag label uses a quoted string type parameter.)8 2069 1 1800 7032 t +10 B f +( =)1 0( e=)1 57( ag ge)2 94( ss sa)2 89( es)1 39( mm me)2 127( bu um)2 139( lb)1 56(A Al)1 100 9 1440 7200 t +10 R f +(J)720 7680 w +(. .)1 47 1 759 7625 t +( 23)1 1829( change: Version 3.0)3 850( Last)1 1434(org Schilling)1 528 4 759 7680 t +cleartomark +showpage +restore +%%EndPage: 23 23 +%%Page: 24 24 +save +mark +24 pagesetup +10 R f +(Schily)720 480 w +10 S1 f +(\302)976 480 w +10 R f +( \( 1 \))3 164( CDRECORD)1 3277(s USER COMMANDS)2 950 3 1009 480 t +(The)1800 960 w +10 B f +( e)1 0( ag ge)2 94( ss sa)2 89( es)1 39( Me)1 44( M)1 136( m)1 0( bu um)2 139( lb)1 56(A Al)1 100 10 1996 960 t +10 R f +(is the global message text of the disk in the CD-Text informa-)11 2665 1 2735 960 t +(tion.)1800 1080 w +(This tag label uses a quoted string type parameter.)8 2069 1 1800 1320 t +10 B f +( =)1 0( e=)1 57( ag ge)2 94( ss sa)2 89( es)1 39(M Me)1 138 6 1440 1488 t +10 R f +(The)1800 1608 w +10 B f +( e)1 0( ag ge)2 94( ss sa)2 89( es)1 39(M Me)1 138 5 1988 1608 t +10 R f +(is the message text of the current track in the CD-Text information.)11 2778 1 2381 1608 t +(This tag label uses a quoted string type parameter.)8 2069 1 1800 1848 t +10 B f +( d)1 0( ed)1 56( se)1 44( os)1 39( lo)1 50( cl)1 28( mc)1 44( bu um)2 139( lb)1 56(A Al)1 100 10 1440 2016 t +10 S f +(_ _)1 50 1 1996 2016 t +10 B f +( =)1 0( o=)1 57( fo)1 50( nf)1 33(i in)1 84 5 2046 2016 t +10 R f +(The)1800 2136 w +10 B f +( d)1 0( ed)1 56( se)1 44( os)1 39( lo)1 50( Cl)1 28( C)1 122( m)1 0( bu um)2 139( lb)1 56(A Al)1 100 11 2005 2136 t +10 S f +(_ _)1 50 1 2639 2136 t +10 B f +( o)1 0( fo)1 50( nf)1 33(i in)1 84 4 2689 2136 t +10 R f +(is the global closed info text of the disk in the CD-Text)11 2493 1 2907 2136 t +(information.)1800 2256 w +(This tag label uses a quoted string type parameter.)8 2069 1 1800 2496 t +10 B f +( d)1 0( ed)1 56( se)1 44( os)1 39( lo)1 50(C Cl)1 100 6 1440 2664 t +10 S f +(_ _)1 50 1 1729 2664 t +10 B f +( =)1 0( o=)1 57( fo)1 50( nf)1 33(i in)1 84 5 1779 2664 t +10 R f +(The)1800 2784 w +10 B f +( d)1 0( ed)1 56( se)1 44( os)1 39( lo)1 50(C Cl)1 100 6 1997 2784 t +10 S f +(_ _)1 50 1 2286 2784 t +10 B f +( o)1 0( fo)1 50( nf)1 33(i in)1 84 4 2336 2784 t +10 R f +( current track in the CD-Text informa-)6 1643(is the closed info text of the)6 1212 2 2545 2784 t +(tion.)1800 2904 w +(This tag label uses a quoted string type parameter.)8 2069 1 1800 3144 t +10 B f +( =)1 0( k=)1 57( ck)1 56( ac)1 44( ra)1 50(T Tr)1 111 6 1440 3312 t +10 R f +( track on the original disk.)5 1149(The parameter contains the relative number of the current)8 2451 2 1800 3312 t +(The \256rst track always has the track number 1, a hidden track uses track number 0.)15 3382 1 1800 3432 t +(This tag label uses a numerical parameter.)6 1730 1 1800 3672 t +( is ignored by)3 610(This tag label)2 584 2 1800 3912 t +10 B f +( d)1 0( rd)1 56( or)1 44( re ec co)3 138( dr)1 44(c cd)1 100 6 3040 3912 t +10 R f +(except when checking the the)4 1264 1 3468 3912 t +10 B f +( t)1 0( rt)1 33( ar)1 44( ta)1 50( st)1 33( ks)1 39( ck)1 56( ac)1 44( ra)1 50(T Tr)1 111 10 4778 3912 t +10 R f +(for)5284 3912 w +(track)1800 4032 w +10 S1 f +(#)2032 4032 w +10 R f +(1.)2082 4032 w +10 B f +( =)1 0( er r=)2 101( be)1 44( mb)1 56( kn nu um)3 195( ck)1 56( ac)1 44( ra)1 50(T Tr)1 111 9 1440 4200 t +10 R f +( taken from the TOC)4 892(The parameter contains the absolute number of the current track,)9 2708 2 1800 4320 t +( \256rst track on the original disk may have a number greater)11 2513( The)1 231( disk.)1 235(on the original)2 621 4 1800 4440 t +(than 1, a hidden track always uses track number 0.)9 2087 1 1800 4560 t +(This tag label uses a numerical parameter.)6 1730 1 1800 4800 t +(This tag label is currently ignored by)6 1638 1 1800 5040 t +10 B f +( d)1 0( rd)1 56( or)1 44( re ec co)3 138( dr)1 44(c cd)1 100 6 3490 5040 t +10 R f +(as cdrecord assigns track numbers)4 1475 1 3925 5040 t +(when compiling the disk information.)4 1540 1 1800 5160 t +10 B f +( =)1 0( t=)1 57( rt)1 33( ar)1 44( ta)1 50( st)1 33( ks)1 39( ck)1 56( ac)1 44( ra)1 50(T Tr)1 111 11 1440 5328 t +10 R f +( the)1 172( If)1 149( sectors on the original disk.)5 1252(The parameter contains the track start offset in)7 2027 4 1800 5448 t +( the \256rst track on the new disk and if the track was the \256rst track)15 2700(current track becomes)2 900 2 1800 5568 t +(on the original disk.)3 827 1 1800 5688 t +10 B f +( d)1 0( rd)1 56( or)1 44( re ec co)3 138( dr)1 44(c cd)1 100 6 2694 5688 t +10 R f +(uses this number to set up the offset for index 1 on the)12 2290 1 3110 5688 t +(new disk.)1 391 1 1800 5808 t +(This tag label uses a numerical parameter.)6 1730 1 1800 6048 t +10 B f +( =)1 0( h=)1 57( th)1 56( gt)1 33( ng)1 50( en)1 56( le)1 44( kl)1 28( ck)1 56( ac)1 44( ra)1 50(T Tr)1 111 12 1440 6216 t +10 R f +(The parameter is used by)4 1035 1 1800 6336 t +10 B f +( d)1 0( rd)1 56( or)1 44( re ec co)3 138( dr)1 44(c cd)1 100 6 2868 6336 t +10 R f +(to set up the size of the track on the new disk.)11 1913 1 3283 6336 t +(This tag label uses an unquoted string type parameter in the form)11 2687 1 1800 6576 t +10 S1 f +(")4520 6576 w +10 R f +(sectors, samples)1 657 1 4561 6576 t +10 S1 f +(")5218 6576 w +10 R f +(.)5259 6576 w +(This label is mandatory for)4 1114 1 1800 6816 t +10 B f +( d)1 0( rd)1 56( or)1 44( re ec co)3 138( dr)1 44(c cd)1 100 6 2947 6816 t +10 R f +(.)3329 6816 w +10 B f +( =)1 0( s=)1 57( is)1 39( si)1 28( as)1 39( ph ha)2 106( mp)1 56( em)1 83( -e)1 44( re e-)2 77(P Pr)1 105 11 1440 6984 t +10 R f +( the related pre-emphasis bit in the sub-)7 1704(The pre-emphasis parameter controls whether)4 1896 2 1800 7104 t +( values for this parameter are)5 1200( Permitted)1 455(channel data is set by cdrecord.)5 1292 3 1800 7224 t +10 B f +( s)1 0( es)1 39(y ye)1 94 3 4780 7224 t +10 R f +(and)4946 7224 w +10 B f +( o)1 0(n no)1 106 2 5123 7224 t +10 R f +(.)5229 7224 w +(J)720 7704 w +(. .)1 47 1 759 7649 t +( 24)1 1829( change: Version 3.0)3 850( Last)1 1434(org Schilling)1 528 4 759 7704 t +cleartomark +showpage +restore +%%EndPage: 24 24 +%%Page: 25 25 +save +mark +25 pagesetup +10 R f +(Schily)720 480 w +10 S1 f +(\302)976 480 w +10 R f +( \( 1 \))3 164( CDRECORD)1 3277(s USER COMMANDS)2 950 3 1009 480 t +( values are)2 442( Valid)1 288(This tag label uses an unquoted string type parameter.)8 2219 3 1800 960 t +10 B f +( s)1 0( es)1 39(y ye)1 94 3 4782 960 t +10 R f +(and)4948 960 w +10 B f +( o)1 0(n no)1 106 2 5125 960 t +10 R f +(.)5231 960 w +10 B f +( =)1 0( s=)1 57( ls)1 39( el)1 28( nn ne)2 100( an)1 56( ha)1 50(C Ch)1 128 8 1440 1128 t +10 R f +( CD-audio disks)2 680( All)1 201( is the number of channels on the disk.)8 1660(The parameter of this tag)4 1059 4 1800 1248 t +(use stereo recording and thus a 2 is the correct parameter.)10 2376 1 1800 1368 t +(This tag label uses a numerical parameter.)6 1730 1 1800 1608 t +(This label is currently ignored by)5 1369 1 1800 1848 t +10 B f +( d)1 0( rd)1 56( or)1 44( re ec co)3 138( dr)1 44(c cd)1 100 6 3202 1848 t +10 R f +(.)3584 1848 w +10 B f +( y)1 0( py)1 50( op)1 56(C Co)1 122 4 1440 2016 t +10 S f +(_ _)1 50 1 1668 2016 t +10 B f +( =)1 0( d=)1 57( ed)1 56( tt te)2 77( it)1 33( mi)1 28( er rm)2 127(p pe)1 100 8 1718 2016 t +10 R f +( copyright state of a)4 889(The parameter for this tag label contains information about the)9 2711 2 1800 2136 t +(track on the original disk.)4 1056 1 1800 2256 t +( values are:)2 470( Valid)1 288(This tag label uses an unquoted string type parameter.)8 2219 3 1800 2496 t +10 B f +( s)1 0( es)1 39(y ye)1 94 3 1800 2664 t +10 R f +(The)2160 2664 w +10 B f +( d)1 0( ed)1 56( tt te)2 77( it)1 33( mi)1 28( er rm)2 127( pe)1 44( p)1 91( y)1 0( py)1 50( op)1 56( co)1 50( c)1 79( l)1 0( al)1 28( ta)1 50( it)1 33( gi)1 28( ig)1 50(d di)1 84 20 2350 2664 t +10 R f +(bit is set in the TOC and in the sub-channel data.)10 2051 1 3349 2664 t +( not copyright protected and may be copied)7 1789(If this bit is set, the related track is)8 1451 2 2160 2784 t +(in\256nitely.)2160 2904 w +10 B f +( o)1 0(n no)1 106 2 1800 3072 t +10 R f +(The)2160 3072 w +10 B f +( d)1 0( ed)1 56( tt te)2 77( it)1 33( mi)1 28( er rm)2 127( pe)1 44( p)1 93( y)1 0( py)1 50( op)1 56( co)1 50( c)1 80( l)1 0( al)1 28( ta)1 50( it)1 33( gi)1 28( ig)1 50(d di)1 84 20 2351 3072 t +10 R f +( The)1 225(bit is not set in the TOC.)6 1059 2 3355 3072 t +10 B f +( -)1 0( er r-)2 77( pe)1 44( p)1 93( y)1 0( py)1 50( op)1 56( co)1 50( c)1 81( l)1 0( al)1 28( ta)1 50( it)1 33( gi)1 28( ig)1 50(d di)1 84 16 4676 3072 t +( d)1 0( ed)1 56( tt te)2 77( it)1 33(m mi)1 111 5 2160 3192 t +10 R f +( is called)2 379( This)1 248( the sub-channel data alters with 9.375 Hz.)7 1789(bit in)1 222 4 2475 3192 t +10 B f +( l)1 0( al)1 28( ia)1 50( er ri)2 72(S Se)1 100 5 5150 3192 t +( \))1 0( S\))1 33( MS)1 56( CM)1 94( SC)1 72( \(S)1 56( \()1 72( m)1 0( em)1 83( te)1 44( st)1 33( ys)1 39( Sy)1 50( S)1 95( t)1 0( nt)1 33( en)1 56( me)1 44( em)1 83( ag ge)2 94( na)1 50( an)1 56( Ma)1 50( M)1 133( y)1 0( py)1 50( op)1 56(C Co)1 122 28 2160 3312 t +10 R f +( \257ag)1 190( sense of this track state is to)7 1244(. The)1 252 3 3714 3312 t +( does not have the copyright permission to create)8 2118(that the creator of the CD)5 1122 2 2160 3432 t +( track. The related track is copyright protected and the)9 2368(copies of the related)3 872 2 2160 3552 t +( given the permission to create one single copy)8 1995(creator of the CD thus is just)6 1245 2 2160 3672 t +(from fair use rights and no further copies are permitted from this source.)12 2987 1 2160 3792 t +10 B f +( ce e)2 44( nc)1 44(o on)1 106 3 1800 3960 t +10 R f +(The)2160 3960 w +10 B f +( d)1 0( ed)1 56( tt te)2 77( it)1 33( mi)1 28( er rm)2 127( pe)1 44( p)1 95( y)1 0( py)1 50( op)1 56( co)1 50( c)1 83( l)1 0( al)1 28( ta)1 50( it)1 33( gi)1 28( ig)1 50(d di)1 84 20 2354 3960 t +10 R f +( in the TOC and in the sub-channel)7 1506(bit is not set)3 529 2 3365 3960 t +( \257ag that the related track is copyright)7 1594( sense of this track state is to)7 1230(data. The)1 416 3 2160 4080 t +( single copy from fair use)5 1068( One)1 233(protected and thus may not be coped in\256nitely.)7 1939 3 2160 4200 t +(rights is permitted.)2 769 1 2160 4320 t +( have)1 228(Note that many CDs sold by the music industry)8 2012 2 1800 4488 t +10 B f +( S)1 0( MS)1 56( CM)1 94(S SC)1 128 4 4080 4488 t +10 R f +(\257agged for one or more)4 1002 1 4398 4488 t +( the related content company does not own the copyright to make)11 2720(tracks, signalling that)2 880 2 1800 4608 t +(copies from this track.)3 917 1 1800 4728 t +10 B f +( =)1 0( ss s=)2 96( es)1 39( ne)1 44( an)1 56( ia)1 50( nd di)2 84(E En)1 123 8 1440 4896 t +10 R f +( the audio data \256le that was created)7 1482(The parameter for this tag is the byte order used in)10 2118 2 1800 5016 t +(for this track.)2 551 1 1800 5136 t +( values are)2 442( Valid)1 288(This tag label uses an unquoted string type parameter.)8 2219 3 1800 5376 t +10 B f +( e)1 0( le)1 44( tt tl)2 61(l li it)2 89 4 4782 5376 t +10 R f +(and)5009 5376 w +10 B f +( g)1 0( ig)1 50(b bi)1 84 3 5186 5376 t +10 R f +(.)5320 5376 w +(This label is ignored by)4 988 1 1800 5616 t +10 B f +( d)1 0( rd)1 56( or)1 44( re ec co)3 138( dr)1 44(c cd)1 100 6 2824 5616 t +10 R f +( from the audio \256le for-)5 1000(as the endianess is retrieved)4 1158 2 3242 5616 t +(mat.)1800 5736 w +10 B f +( =)1 0( x=)1 57( ex)1 50( nd de)2 100(I In)1 95 5 1440 5904 t +10 R f +( numbers counting)2 786(The parameter list for this tag is a list of numbers that are sector)13 2814 2 1800 5904 t +( of the track \(which always is at index)8 1647(relatively to the logical beginning)4 1417 2 1800 6024 t +10 S1 f +(#)4905 6024 w +10 R f +(1\). As any)2 445 1 4955 6024 t +( index)1 268(track needs to have an entry for)6 1377 2 1800 6144 t +10 S1 f +(#)3491 6144 w +10 R f +( If)1 145(1, the \256rst entry in the list is always 0.)9 1714 2 3541 6144 t +( this tag, there are more offset values that correspond to)10 2420(more entries are present for)4 1180 2 1800 6264 t +(index values greater than 1.)4 1132 1 1800 6384 t +( of space)2 408(This tag label uses an unquoted string type parameter that contains a list)12 3192 2 1800 6624 t +(separated index offset numbers.)3 1293 1 1800 6744 t +10 B f +( =)1 0( x0 0=)2 107( ex)1 50( nd de)2 100(I In)1 95 5 1440 6912 t +10 R f +( this tag is a number that represents the number of sectors relatively)12 2857(The parameter for)2 743 2 1800 7032 t +(to the beginning \(index)3 957 1 1800 7152 t +10 S1 f +(#)2791 7152 w +10 R f +( number identi\256es where index)4 1273( This)1 245(1\) of this track.)3 637 3 2841 7152 t +10 S1 f +(#)5029 7152 w +10 R f +(0 of the)2 321 1 5079 7152 t +( the parameter is set to -1, the next track has no index)12 2240(next track begins. It)3 817 2 1800 7272 t +10 S1 f +(#)4891 7272 w +10 R f +(0, resulting)1 459 1 4941 7272 t +(J)720 7752 w +(. .)1 47 1 759 7697 t +( 25)1 1829( change: Version 3.0)3 850( Last)1 1434(org Schilling)1 528 4 759 7752 t +cleartomark +showpage +restore +%%EndPage: 25 25 +%%Page: 26 26 +save +mark +26 pagesetup +10 R f +(Schily)720 480 w +10 S1 f +(\302)976 480 w +10 R f +( \( 1 \))3 164( CDRECORD)1 3277(s USER COMMANDS)2 950 3 1009 480 t +(in pregap size 0 for the next track.)7 1419 1 1800 960 t +(Note that)1 380 1 1800 1200 t +10 B f +( d)1 0( rd)1 56( or)1 44( re ec co)3 138( dr)1 44(c cd)1 100 6 2216 1200 t +10 R f +(strictly follows the CD-standard that de\256nes that the logical begin-)9 2766 1 2634 1200 t +(ning of a track is at the location where index)9 1930 1 1800 1320 t +10 S1 f +(#)3772 1320 w +10 R f +( index)1 263( If)1 141(1 starts in this track.)4 876 3 3822 1320 t +10 S1 f +(#)5143 1320 w +10 R f +(0 for)1 207 1 5193 1320 t +(track)1800 1440 w +10 B f +(n n)1 56 1 2032 1440 t +10 R f +(contains audio data, the related audio data is a logical part of track)12 2743 1 2121 1440 t +10 B f +( 1)1 0( -1)1 50(n n-)1 89 3 4897 1440 t +10 R f +(.)5036 1440 w +(This tag label uses a numerical parameter.)6 1730 1 1800 1680 t +10 B f +( =)1 0( t=)1 57( et)1 33( se)1 44( ff fs)2 72( of)1 33( -o)1 50( 5-)1 33( D5)1 50(M MD)1 166 10 1440 1848 t +10 R f +( offset where the raw audio data begins in the)9 1995(The parameter for this tag is the byte)7 1605 2 1800 1968 t +(related audio \256le.)2 712 1 1800 2088 t +(This tag label uses a numerical parameter.)6 1730 1 1800 2328 t +(This label is ignored by)4 976 1 1800 2568 t +10 B f +( d)1 0( rd)1 56( or)1 44( re ec co)3 138( dr)1 44(c cd)1 100 6 2809 2568 t +10 R f +(.)3191 2568 w +10 B f +( =)1 0( ze e=)2 101( iz)1 44( si)1 28( -s)1 39( 5-)1 33( D5)1 50(M MD)1 166 8 1440 2736 t +10 R f +( related audio)2 561(The parameter for this tag is the number of bytes of raw audio data in the)15 3039 2 1800 2856 t +(\256le.)1800 2976 w +(This tag label uses a numerical parameter.)6 1730 1 1800 3216 t +(This label is ignored by)4 976 1 1800 3456 t +10 B f +( d)1 0( rd)1 56( or)1 44( re ec co)3 138( dr)1 44(c cd)1 100 6 2809 3456 t +10 R f +(.)3191 3456 w +10 B f +( =)1 0( m=)1 57( um)1 83( su)1 56( -s)1 39( 5-)1 33( D5)1 50(M MD)1 166 8 1440 3624 t +10 R f +( for this tag is the md5 sum for the raw audio data in the related audio)16 3009(The parameter)1 591 2 1800 3744 t +(\256le.)1800 3864 w +(This tag label uses a numerical parameter.)6 1730 1 1800 4104 t +(This label is ignored by)4 976 1 1800 4344 t +10 B f +( d)1 0( rd)1 56( or)1 44( re ec co)3 138( dr)1 44(c cd)1 100 6 2809 4344 t +10 R f +(.)3191 4344 w +10 S f +(* *)1 50 1 1080 4632 t +10 B f +( e)1 0( ue)1 44( cu)1 56(. .c)1 69 4 1130 4632 t +10 R f +(The)1440 4632 w +10 S f +(* *)1 50 1 1634 4632 t +10 B f +( e)1 0( ue)1 44( cu)1 56(. .c)1 69 4 1684 4632 t +10 R f +( by)1 140(\256les are CD-structure description \256les introduced)5 2042 2 1892 4632 t +10 B f +( N)1 0( IN)1 72( WI)1 39(C CD DR RW)3 316 4 4114 4632 t +10 R f +( are read and)3 556(. They)1 303 2 4541 4632 t +(used by)1 316 1 1440 4752 t +10 B f +( d)1 0( rd)1 56( or)1 44( re ec co)3 138( dr)1 44(c cd)1 100 6 1789 4752 t +10 R f +(in case cdrecord was called with the)6 1488 1 2204 4752 t +10 B f +( =)1 0( e=)1 57( le)1 44( \256l)1 28( e\256)1 56( ue)1 44(c cu)1 100 7 3725 4752 t +10 I f +(name.cue)4054 4752 w +10 R f +(option.)4466 4752 w +(The following commands are supported in CUE \256les:)7 2196 1 1440 4992 t +10 B f +( R)1 0( ER)1 72( GE)1 67(A AR RR RA AN NG)5 438 4 1440 5160 t +10 I f +(arranger-string)2050 5160 w +10 R f +( name of a arranger for a disk that includes CD-)10 2056(This command is used to specify the)6 1544 2 1800 5280 t +(Text enhancements.)1 806 1 1800 5400 t +( of a arranger. If the string contains any spaces, it must be)12 2486(The parameter is the name)4 1114 2 1800 5640 t +(enclosed in quotation marks.)3 1173 1 1800 5760 t +(If the)1 248 1 1800 6000 t +10 B f +( R)1 0( ER)1 72( GE)1 67(A AR RR RA AN NG)5 438 4 2109 6000 t +10 R f +(command appears before any)3 1279 1 2747 6000 t +10 B f +( K)1 0( RA AC CK)3 222(T TR)1 139 3 4087 6000 t +10 R f +(command, the string)2 891 1 4509 6000 t +( the)1 173( If)1 150(parameter will be encoded as the arranger of the entire disk.)10 2650 3 1800 6120 t +10 B f +( R)1 0( ER)1 72( GE)1 67(A AR RR RA AN NG)5 438 4 4823 6120 t +10 R f +(command appears after a)3 1035 1 1800 6240 t +10 B f +( K)1 0( RA AC CK)3 222(T TR)1 139 3 2872 6240 t +10 R f +(command, the string parameter will be encoded the)7 2130 1 3270 6240 t +(the arranger of the current track.)5 1329 1 1800 6360 t +(This command is only accepted if the)6 1546 1 1800 6600 t +10 B f +( d)1 0( rd)1 56( or)1 44( re ec co)3 138( dr)1 44(c cd)1 100 6 3379 6600 t +10 R f +(speci\256c CUE extensions are permitted.)4 1588 1 3794 6600 t +10 B f +( OG G)2 78( LO)1 78( AL)1 67( TA)1 72(C CA AT)2 211 5 1440 6768 t +10 I f +(media-catalog-number)1979 6768 w +10 R f +( the disc's)2 457(This command is used to specify)5 1438 2 1800 6888 t +10 B f +( er r)2 44( be)1 44( mb)1 56( um)1 83( Nu)1 56( N)1 123( og g)2 50( lo)1 50( al)1 28( ta)1 50( at)1 33( Ca)1 50( C)1 123( a)1 0( ia)1 50( di)1 28( ed)1 56(M Me)1 138 18 3746 6888 t +10 R f +(. The)1 264 1 4808 6888 t +10 I f +(media-)5123 6888 w +(catalog-number)1800 7008 w +10 R f +(is a 13 digit number that follows UPC/EAN-13 rules.)8 2194 1 2471 7008 t +( must appear before)3 840( It)1 136( can appear only once in the CUE SHEET \256le.)9 2011(This command)1 613 4 1800 7248 t +(J)720 7728 w +(. .)1 47 1 759 7673 t +( 26)1 1829( change: Version 3.0)3 850( Last)1 1434(org Schilling)1 528 4 759 7728 t +cleartomark +showpage +restore +%%EndPage: 26 26 +%%Page: 27 27 +save +mark +27 pagesetup +10 R f +(Schily)720 480 w +10 S1 f +(\302)976 480 w +10 R f +( \( 1 \))3 164( CDRECORD)1 3277(s USER COMMANDS)2 950 3 1009 480 t +(any)1800 960 w +10 B f +( K)1 0( RA AC CK)3 222(T TR)1 139 3 1977 960 t +10 R f +(command.)2371 960 w +10 B f +( LE E)2 67( IL)1 67( FI)1 39( TF)1 61( XT)1 67( TE EX)2 139(C CD DT)2 211 7 1440 1128 t +10 I f +(\256lename)2124 1128 w +10 R f +( a \256le that contains binary encoded CD-)7 1687(This command is used to specify the name of)8 1913 2 1800 1248 t +(Text information.)1 725 1 1800 1368 t +10 B f +( N)1 0( IN)1 72( WI)1 39(C CD DR RW)3 316 4 2603 1368 t +10 R f +(only accepts headerless binary encoded CD-Text infor-)6 2325 1 3075 1368 t +(mation, but)1 495 1 1800 1488 t +10 B f +( d)1 0( rd)1 56( or)1 44( re ec co)3 138( dr)1 44(c cd)1 100 6 2359 1488 t +10 R f +(also accepts binary encoded CD-Text information with an)7 2595 1 2805 1488 t +( CD-Text information is ignored by)5 1494( The)1 227(MMC-compliant header.)1 1008 3 1800 1608 t +10 B f +( d)1 0( rd)1 56( or)1 44( re ec co)3 138( dr)1 44(c cd)1 100 6 4568 1608 t +10 R f +(unless the)1 411 1 4989 1608 t +10 S1 f +(\261 \261)1 65 1 1800 1728 t +10 B f +( t)1 0( xt)1 33( ex)1 50(t te)1 77 4 1865 1728 t +10 R f +(option is used.)2 597 1 2058 1728 t +(If the \256lename contains spaces, it must be enclosed in quotation marks.)11 2932 1 1800 1968 t +10 B f +( R)1 0( ER)1 72( SE)1 67( OS)1 56( PO)1 78( MP)1 61( OM)1 94(C CO)1 150 8 1440 2136 t +10 I f +(composer-string)2051 2136 w +10 R f +( CD-)1 209(This command is used to specify the name of a composer for a disk that includes)15 3391 2 1800 2256 t +(Text enhancements.)1 806 1 1800 2376 t +( it must be)3 456(The parameter is the name of a composer. If the string contains any spaces,)13 3144 2 1800 2616 t +(enclosed in quotation marks.)3 1173 1 1800 2736 t +(If the)1 248 1 1800 2976 t +10 B f +( R)1 0( ER)1 72( SE)1 67( OS)1 56( PO)1 78( MP)1 61( OM)1 94(C CO)1 150 8 2108 2976 t +10 R f +(command appears before any)3 1279 1 2747 2976 t +10 B f +( K)1 0( RA AC CK)3 222(T TR)1 139 3 4087 2976 t +10 R f +(command, the string)2 891 1 4509 2976 t +( the)1 168( If)1 145( of the entire disk.)4 808(parameter will be encoded as the composer)6 1855 4 1800 3096 t +10 B f +( R)1 0( ER)1 72( SE)1 67( OS)1 56( PO)1 78( MP)1 61( OM)1 94(C CO)1 150 8 4822 3096 t +10 R f +(command appears after a)3 1035 1 1800 3216 t +10 B f +( K)1 0( RA AC CK)3 222(T TR)1 139 3 2872 3216 t +10 R f +(command, the string parameter will be encoded the)7 2130 1 3270 3216 t +(the composer of the current track.)5 1386 1 1800 3336 t +(This command is only accepted if the)6 1546 1 1800 3576 t +10 B f +( d)1 0( rd)1 56( or)1 44( re ec co)3 138( dr)1 44(c cd)1 100 6 3379 3576 t +10 R f +(speci\256c CUE extensions are permitted.)4 1588 1 3794 3576 t +10 B f +( LE E)2 67( IL)1 67(F FI)1 100 3 1440 3744 t +10 I f +(\256lename \256letype)1 659 1 1707 3744 t +10 R f +( audio \256le that contains data to be written to)9 1847(This command is used to specify a data or)8 1753 2 1800 3864 t +(the medium.)1 508 1 1800 3984 t +(If the \256lename contains spaces, it must be enclosed in quotation marks.)11 2932 1 1800 4224 t +(The following values are allowed for the \256le type parameter:)9 2497 1 1800 4464 t +10 B f +( NA AR RY Y)4 216( IN)1 72(B BI)1 106 3 1800 4632 t +10 R f +(Intel binary \256le \(LSB \256rst\))4 1104 1 2400 4632 t +10 B f +( A)1 0( LA)1 72( OL)1 67( TO)1 78( OT)1 67( TO)1 78( OT)1 67(M MO)1 172 8 1800 4800 t +10 R f +(Motorola binary \256le \(MSB \256rst\))4 1321 1 2400 4920 t +10 B f +( FF F)2 61( IF)1 61(A AI)1 111 3 1800 5088 t +10 R f +(Audio AIFF \256le)2 661 1 2400 5088 t +10 B f +( E)1 0( AV VE)2 139(W WA)1 172 3 1800 5256 t +10 R f +(Audio WAVE \256le)2 743 1 2400 5256 t +10 B f +( 3)1 0( P3)1 50(M MP)1 155 3 1800 5424 t +10 R f +(Audio MP3 \256le)2 639 1 2400 5424 t +10 B f +(A AU U)2 144 1 1800 5592 t +10 R f +(Audio AU \256le \(only permitted if)5 1342 1 2400 5592 t +10 B f +( d)1 0( rd)1 56( or)1 44( re ec co)3 138( dr)1 44(c cd)1 100 6 3775 5592 t +10 R f +(CUE extensions are enabled\))3 1185 1 4190 5592 t +10 B f +(O OG GG G)3 234 1 1800 5760 t +10 R f +( if)1 131(Audio OGG \256le \(only permitted)4 1464 2 2400 5760 t +10 B f +( d)1 0( rd)1 56( or)1 44( re ec co)3 138( dr)1 44(c cd)1 100 6 4065 5760 t +10 R f +(CUE extensions are)2 883 1 4517 5760 t +(enabled\))2400 5880 w +( in 44100 Hz 16 bit stereo)6 1098(All audio \256les \(WAVE, AIFF, MP3, AU and OGG\) must be)10 2502 2 1800 6048 t +( and OGG is currently unsupported.)5 1471(format. MP3)1 552 2 1800 6168 t +( then is is)3 435(If an audio \256le is not an exact multiple of a CDROM sector \(2352 bytes\),)14 3165 2 1800 6336 t +(padded with zeroes to \256ll up to the needed size.)9 1969 1 1800 6456 t +(All)1800 6624 w +10 B f +( LE E)2 67( IL)1 67(F FI)1 100 3 1966 6624 t +10 R f +(commands need to be before a related)6 1590 1 2238 6624 t +10 B f +( K)1 0( RA AC CK)3 222(T TR)1 139 3 3866 6624 t +10 R f +( the last)2 339(command and after)2 796 2 4265 6624 t +10 B f +( X)1 0( EX)1 72( ND DE)2 139(I IN)1 111 4 1800 6744 t +10 R f +(command or)1 510 1 2155 6744 t +10 B f +( P)1 0( AP)1 61( GA)1 72( TG)1 78( ST)1 67( OS)1 56(P PO)1 139 7 2698 6744 t +10 R f +(command for the previous track.)4 1332 1 3204 6744 t +(If the)1 224 1 1800 6912 t +10 B f +( d)1 0( rd)1 56( or)1 44( re ec co)3 138( dr)1 44(c cd)1 100 6 2060 6912 t +10 R f +(speci\256c CUE extensions are enabled, then a)6 1815 1 2478 6912 t +10 B f +( LE E)2 67( IL)1 67(F FI)1 100 3 4329 6912 t +10 R f +(command may also)2 801 1 4599 6912 t +(appear between an)2 783 1 1800 7032 t +10 B f +( 00 0)2 50( 0)1 96( X)1 0( EX)1 72( ND DE)2 139(I IN)1 111 6 2629 7032 t +10 R f +(and an)1 284 1 3143 7032 t +10 B f +( 01 1)2 50( 0)1 95( X)1 0( EX)1 72( ND DE)2 139(I IN)1 111 6 3472 7032 t +10 R f +( allows to let the)4 741(command. This)1 675 2 3984 7032 t +(create one \256le per track where the \256le starts at)9 1953 1 1800 7152 t +10 B f +( 01 1)2 50( 0)1 88( X)1 0( EX)1 72( ND DE)2 139(I IN)1 111 6 3791 7152 t +10 R f +( and enda after)3 631(of the track)2 480 2 4289 7152 t +10 B f +( 00 0)2 50( 0)1 89( X)1 0( EX)1 72( ND DE)2 139(I IN)1 111 6 1800 7272 t +10 R f +( this case, no)3 555( In)1 155(of the following track.)3 935 3 2300 7272 t +10 B f +( LE E)2 67( IL)1 67(F FI)1 100 3 3983 7272 t +10 R f +(command is allowed before)3 1145 1 4255 7272 t +(J)720 7752 w +(. .)1 47 1 759 7697 t +( 27)1 1829( change: Version 3.0)3 850( Last)1 1434(org Schilling)1 528 4 759 7752 t +cleartomark +showpage +restore +%%EndPage: 27 27 +%%Page: 28 28 +save +mark +28 pagesetup +10 R f +(Schily)720 480 w +10 S1 f +(\302)976 480 w +10 R f +( \( 1 \))3 164( CDRECORD)1 3277(s USER COMMANDS)2 950 3 1009 480 t +(the related)1 426 1 1800 960 t +10 B f +( K)1 0( RA AC CK)3 222(T TR)1 139 3 2259 960 t +10 R f +(command.)2653 960 w +10 B f +( S)1 0( GS)1 56( AG)1 78( LA)1 72(F FL)1 128 5 1440 1128 t +10 I f +(\257ags)1807 1128 w +10 R f +(This command is used to set special subcode \257ags within a track.)11 2691 1 1800 1248 t +(The following \257ags are supported:)4 1408 1 1800 1488 t +10 B f +( P)1 0(D DC CP)2 205 2 1800 1656 t +10 R f +(Digital copy permitted)2 921 1 2400 1656 t +10 B f +( H)1 0( CH)1 78(4 4C)1 122 3 1800 1824 t +10 R f +(Four channel audio)2 787 1 2400 1824 t +10 B f +( E)1 0( RE)1 67(P PR)1 133 3 1800 1992 t +10 R f +(Pre-emphasis enabled \(audio tracks only\))4 1684 1 2400 1992 t +10 B f +( S)1 0( MS)1 56( CM)1 94(S SC)1 128 4 1800 2160 t +10 R f +(Serial copy management system \(not supported by all recorders\))8 2637 1 2400 2160 t +( after the FLAGS command \(e.g FLAGS)6 1694(More than one \257ag type argument may appear)7 1906 2 1800 2328 t +(DCP PRE\).)1 470 1 1800 2448 t +(The)1800 2616 w +10 B f +( S)1 0( GS)1 56( AG)1 78( LA)1 72(F FL)1 128 5 1990 2616 t +10 R f +( after a)2 298(command must appear)2 924 2 2359 2616 t +10 B f +( K)1 0( RA AC CK)3 222(T TR)1 139 3 3617 2616 t +10 R f +(command but before any)3 1028 1 4014 2616 t +10 B f +( X)1 0( EX)1 72( ND DE)2 139(I IN)1 111 4 5078 2616 t +10 R f +( one)1 177(command. Only)1 685 2 1800 2736 t +10 B f +( S)1 0( GS)1 56( AG)1 78( LA)1 72(F FL)1 128 5 2695 2736 t +10 R f +(command is allower per)3 986 1 3062 2736 t +10 B f +( .)1 0( nd d.)2 81( an)1 56( mm ma)2 133( om)1 83( co)1 50( c)1 77( K)1 0( RA AC CK)3 222(T TR)1 139 10 4081 2736 t +10 R f +(The fourth subcode \257ag that marks data tracks is set automatically for data tracks.)13 3370 1 1800 2904 t +10 B f +( X)1 0( EX)1 72( ND DE)2 139(I IN)1 111 4 1440 3072 t +10 I f +(number mm:ss:ff)1 682 1 1795 3072 t +10 R f +(This command is used to specify indexes within a track.)9 2314 1 1800 3192 t +(The \256rst parameter is the index number in the range 0-99.)10 2384 1 1800 3432 t +( frames \(there are 75)4 892(The second parameter is a relative time in minutes, seconds and)10 2708 2 1800 3672 t +(frames/second\).)1800 3792 w +( \256rst index for a track)5 967( The)1 233(All index numbers must be between 0 and 99 inclusive.)9 2400 3 1800 4032 t +( \256rst index)2 448( The)1 223( with all indexes being sequential to the \256rst one.)9 2050(must be either 0 or 1)5 879 4 1800 4152 t +(for a \256le must start at 00:00.00.)6 1303 1 1800 4272 t +10 B f +( 00 0)2 50( 0)1 83( X)1 0( EX)1 72( ND DE)2 139(I IN)1 111 6 1800 4440 t +10 R f +(speci\256es the starting time of the)5 1314 1 2300 4440 t +10 B f +( p)1 0( ga ap)2 106( re eg)2 94(p pr)1 100 4 3647 4440 t +10 R f +(of the track.)2 495 1 3980 4440 t +10 B f +( 01 1)2 50( 0)1 83( X)1 0( EX)1 72( ND DE)2 139(I IN)1 111 6 1800 4608 t +10 R f +( the index that is stored in)6 1129( is)1 107( This)1 251(speci\256es the starting time of the track.)6 1613 4 2300 4608 t +(the table of content for the disk as the track start.)10 2029 1 2300 4728 t +10 B f +( X)1 0( EX)1 72( ND DE)2 139(I IN)1 111 4 1800 4896 t +10 S1 f +(> >)1 56 1 2155 4896 t +10 B f +(1 1)1 50 1 2244 4896 t +10 R f +(speci\256es a subindex within a track.)5 1438 1 2300 5016 t +10 B f +( RC C)2 72( SR)1 72(I IS)1 95 3 1440 5184 t +10 I f +(recording code)1 615 1 1712 5184 t +10 R f +( specify the)2 542(This command is used to)4 1160 2 1800 5304 t +10 B f +( e)1 0( de)1 44( od)1 56( Co)1 50( C)1 138( g)1 0( ng)1 50( in)1 56( di)1 28( rd)1 56( or)1 44( ec co)2 94( Re)1 44( R)1 138( d)1 0( rd)1 56( ar)1 44( nd da)2 106( an)1 56( ta)1 50( St)1 33( S)1 122( l)1 0( al)1 28( na)1 50( on)1 56( io)1 50( ti)1 28( at)1 33( na)1 50( er rn)2 100( te)1 44( nt)1 33(I In)1 95 34 3568 5304 t +( \))1 0( RC C\))2 105( SR)1 72( IS)1 56(\( \(I)1 72 5 1800 5424 t +10 R f +(of a track. This is a code that should exist for all commercial audio tracks.)14 3068 1 2138 5424 t +( \256rst two characters are characters)5 1403( The)1 222(The ISRC code must be 12 characters in length.)8 1975 3 1800 5664 t +( characters are)2 672( next three)2 521( The)1 263(that are from the two character country code.)7 2144 4 1800 5784 t +( next two characters are the last two)7 1558( The)1 231( studio code.)2 544(alphanumeric and describe the)3 1267 4 1800 5904 t +( serial)1 269( last 5 characters are digits that form a)8 1756( The)1 242(digits from the recording year.)4 1333 4 1800 6024 t +(number that is unique for the same studio and year.)9 2119 1 1800 6144 t +(If)1800 6384 w +10 B f +( d)1 0( rd)1 56( or)1 44( re ec co)3 138( dr)1 44(c cd)1 100 6 1901 6384 t +10 R f +( four \256elds of the ISRC may be)7 1329(speci\256c CUE extensions are permitted, the)5 1753 2 2318 6384 t +(separated by a minus sign.)4 1089 1 1800 6504 t +(If the)1 232 1 1800 6744 t +10 B f +( RC C)2 72( SR)1 72(I IS)1 95 3 2076 6744 t +10 R f +( it must appear after a)5 967(command is used,)2 757 2 2359 6744 t +10 B f +( K)1 0( RA AC CK)3 222(T TR)1 139 3 4128 6744 t +10 R f +(command but before)2 866 1 4534 6744 t +(any)1800 6864 w +10 B f +( X)1 0( EX)1 72( ND DE)2 139(I IN)1 111 4 1977 6864 t +10 R f +(command.)2332 6864 w +10 B f +( E)1 0( GE)1 67( AG)1 78( SS SA)2 128( ES)1 56(M ME)1 161 6 1440 7032 t +10 I f +(message-string)1963 7032 w +10 R f +(This command is used to specify the test of a message for a disk that includes CD-)16 3600 1 1800 7152 t +(Text enhancements.)1 806 1 1800 7272 t +(J)720 7752 w +(. .)1 47 1 759 7697 t +( 28)1 1829( change: Version 3.0)3 850( Last)1 1434(org Schilling)1 528 4 759 7752 t +cleartomark +showpage +restore +%%EndPage: 28 28 +%%Page: 29 29 +save +mark +29 pagesetup +10 R f +(Schily)720 480 w +10 S1 f +(\302)976 480 w +10 R f +( \( 1 \))3 164( CDRECORD)1 3277(s USER COMMANDS)2 950 3 1009 480 t +( must be)2 379(The parameter is the test of a message. If the string contains any spaces, it)14 3221 2 1800 960 t +(enclosed in quotation marks.)3 1173 1 1800 1080 t +(If the)1 221 1 1800 1320 t +10 B f +( E)1 0( GE)1 67( AG)1 78( SS SA)2 128( ES)1 56(M ME)1 161 6 2054 1320 t +10 R f +( before any)2 466(command appears)1 731 2 2577 1320 t +10 B f +( K)1 0( RA AC CK)3 222(T TR)1 139 3 3808 1320 t +10 R f +(command, the string parame-)3 1197 1 4203 1320 t +( the)1 167( If)1 145(ter will be encoded as the message of the entire disk.)10 2314 3 1800 1440 t +10 B f +( E)1 0( GE)1 67( AG)1 78( SS SA)2 128( ES)1 56(M ME)1 161 6 4471 1440 t +10 R f +(command)5006 1440 w +(appears after a)2 610 1 1800 1560 t +10 B f +( K)1 0( RA AC CK)3 222(T TR)1 139 3 2450 1560 t +10 R f +( the mes-)2 398(command, the string parameter will be encoded the)7 2151 2 2851 1560 t +(sage of the current track.)4 1020 1 1800 1680 t +(This command is only accepted if the)6 1546 1 1800 1920 t +10 B f +( d)1 0( rd)1 56( or)1 44( re ec co)3 138( dr)1 44(c cd)1 100 6 3379 1920 t +10 R f +(speci\256c CUE extensions are permitted.)4 1588 1 3794 1920 t +10 B f +( R)1 0( ER)1 72( ME)1 67( RM)1 94( OR)1 72( FO)1 78( RF)1 61( ER)1 72(P PE)1 128 9 1440 2088 t +10 I f +(performer-string)2117 2088 w +10 R f +( performer for a disk that includes CD-)7 1632(This command is used to specify the name of a)9 1968 2 1800 2208 t +(Text enhancements.)1 806 1 1800 2328 t +(The parameter is the name of the performer. If the string contains any spaces, it must)15 3600 1 1800 2568 t +(be enclosed in quotation marks.)4 1300 1 1800 2688 t +(If the)1 242 1 1800 2928 t +10 B f +( R)1 0( ER)1 72( ME)1 67( RM)1 94( OR)1 72( FO)1 78( RF)1 61( ER)1 72(P PE)1 128 9 2096 2928 t +10 R f +(command appears before any)3 1258 1 2794 2928 t +10 B f +( K)1 0( RA AC CK)3 222(T TR)1 139 3 4106 2928 t +10 R f +(command, the string)2 879 1 4521 2928 t +( the)1 162( If)1 139( entire disk.)2 499(parameter will be encoded as the performer of the)8 2116 4 1800 3048 t +10 B f +( R)1 0( ER)1 72( ME)1 67( RM)1 94( OR)1 72( FO)1 78( RF)1 61( ER)1 72(P PE)1 128 9 4756 3048 t +10 R f +(command appears after a)3 1035 1 1800 3168 t +10 B f +( K)1 0( RA AC CK)3 222(T TR)1 139 3 2872 3168 t +10 R f +(command, the string parameter will be encoded the)7 2130 1 3270 3168 t +(the performer of the current track.)5 1396 1 1800 3288 t +10 B f +( P)1 0( AP)1 61( GA)1 72( TG)1 78( ST)1 67( OS)1 56(P PO)1 139 7 1440 3456 t +10 I f +(mm:ss:ff)1946 3456 w +10 R f +( The)1 231( length of a postgap at the end of a track.)10 1807(This command is used to specify the)6 1562 3 1800 3576 t +(postgap data is generated internally by)5 1694 1 1800 3696 t +10 B f +( d)1 0( rd)1 56( or)1 44( re ec co)3 138( dr)1 44(c cd)1 100 6 3550 3696 t +10 R f +( from the)2 426( data is consumed)3 806(. No)1 236 3 3932 3696 t +(current data \256le.)2 667 1 1800 3816 t +(The parameter speci\256es the postgap length in minutes, seconds and frames.)10 3086 1 1800 4056 t +(The)1800 4296 w +10 B f +( P)1 0( AP)1 61( GA)1 72( TG)1 78( ST)1 67( OS)1 56(P PO)1 139 7 2006 4296 t +10 R f +(command must appear after all)4 1340 1 2530 4296 t +10 B f +( X)1 0( EX)1 72( ND DE)2 139(I IN)1 111 4 3921 4296 t +10 R f +(commands for the current)3 1106 1 4294 4296 t +( one)1 177(track. Only)1 490 2 1800 4416 t +10 B f +( P)1 0( AP)1 61( GA)1 72( TG)1 78( ST)1 67( OS)1 56(P PO)1 139 7 2500 4416 t +10 R f +(command is allowed per track.)4 1260 1 3006 4416 t +10 B f +( P)1 0( AP)1 61( GA)1 72( EG)1 78( RE)1 67(P PR)1 133 6 1440 4584 t +10 I f +(mm:ss:ff)1884 4584 w +10 R f +( of a pregap at the beginning of a track.)9 1739(This command is used to specify the length)7 1861 2 1800 4704 t +(The pregap data is generated internally by)6 1787 1 1800 4824 t +10 B f +( d)1 0( rd)1 56( or)1 44( re ec co)3 138( dr)1 44(c cd)1 100 6 3630 4824 t +10 R f +( is consumed from the)4 956( data)1 209(. No)1 223 3 4012 4824 t +(current data \256le.)2 667 1 1800 4944 t +(The parameter speci\256es the postgap length in minutes, seconds and frames.)10 3086 1 1800 5184 t +(The)1800 5424 w +10 B f +( P)1 0( AP)1 61( GA)1 72( EG)1 78( RE)1 67(P PR)1 133 6 2016 5424 t +10 R f +(command must appear after a)4 1324 1 2488 5424 t +10 B f +( K)1 0( RA AC CK)3 222(T TR)1 139 3 3873 5424 t +10 R f +( before any)2 522(command but)1 583 2 4295 5424 t +10 B f +( X)1 0( EX)1 72( ND DE)2 139(I IN)1 111 4 1800 5544 t +10 R f +( one)1 177(command. Only)1 685 2 2155 5544 t +10 B f +( P)1 0( AP)1 61( GA)1 72( EG)1 78( RE)1 67(P PR)1 133 6 3050 5544 t +10 R f +(command is allowed per track.)4 1260 1 3494 5544 t +10 B f +( M)1 0( EM)1 94(R RE)1 139 3 1440 5712 t +10 I f +(comment)1706 5712 w +10 R f +(This command is used to put comments into a CUE \256le.)10 2322 1 1800 5832 t +( that appears in the line after a)7 1275(The text)1 339 2 1800 6072 t +10 B f +( M)1 0( EM)1 94(R RE)1 139 3 3449 6072 t +10 R f +(command is usually ignored. There is an)6 1683 1 3717 6072 t +(exception: The special comment)3 1406 1 1800 6192 t +10 B f +( S)1 0( LS)1 56( OO OL)2 145( TO)1 78( CD DR RT)3 211( C)1 134( M)1 0( EM)1 94(R RE)1 139 9 3268 6192 t +10 R f +(is used to enable)3 771 1 4186 6192 t +10 B f +( d)1 0( rd)1 56( or)1 44( re ec co)3 138( dr)1 44(c cd)1 100 6 5018 6192 t +10 R f +(speci\256c CUE extensions in the parser.)5 1560 1 1800 6312 t +10 B f +( R)1 0( TE ER)2 139( IT)1 67( RI)1 39( WR)1 72( GW)1 100( NG)1 78( ON)1 72(S SO)1 134 9 1440 6480 t +10 I f +(songwriter-string)2174 6480 w +10 R f +( for a disk that includes)5 1050(This command is used to specify the name of a songwriter)10 2550 2 1800 6600 t +(CD-Text enhancements.)1 978 1 1800 6720 t +( of a songwriter. If the string contains any spaces, it must be)12 2510(The parameter is the name)4 1090 2 1800 6960 t +(enclosed in quotation marks.)3 1173 1 1800 7080 t +(J)720 7680 w +(. .)1 47 1 759 7625 t +( 29)1 1829( change: Version 3.0)3 850( Last)1 1434(org Schilling)1 528 4 759 7680 t +cleartomark +showpage +restore +%%EndPage: 29 29 +%%Page: 30 30 +save +mark +30 pagesetup +10 R f +(Schily)720 480 w +10 S1 f +(\302)976 480 w +10 R f +( \( 1 \))3 164( CDRECORD)1 3277(s USER COMMANDS)2 950 3 1009 480 t +(If the)1 236 1 1800 960 t +10 B f +( R)1 0( TE ER)2 139( IT)1 67( RI)1 39( WR)1 72( GW)1 100( NG)1 78( ON)1 72(S SO)1 134 9 2084 960 t +10 R f +( any)1 193(command appears before)2 1048 2 2833 960 t +10 B f +( K)1 0( RA AC CK)3 222(T TR)1 139 3 4123 960 t +10 R f +(command, the string)2 867 1 4533 960 t +( the)1 156( If)1 133(parameter will be encoded as the songwriter of the entire disk.)10 2576 3 1800 1080 t +10 B f +( R)1 0( TE ER)2 139( IT)1 67( RI)1 39( WR)1 72( GW)1 100( NG)1 78( ON)1 72(S SO)1 134 9 4699 1080 t +10 R f +(command appears after a)3 1035 1 1800 1200 t +10 B f +( K)1 0( RA AC CK)3 222(T TR)1 139 3 2872 1200 t +10 R f +(command, the string parameter will be encoded the)7 2130 1 3270 1200 t +(the songwriter of the current track.)5 1425 1 1800 1320 t +10 B f +( TL LE E)3 134( IT)1 67(T TI)1 106 3 1440 1488 t +10 I f +(title-string)1780 1488 w +10 R f +( CD-Text enhance-)2 814(This command is used to specify a title for a disk that includes)12 2786 2 1800 1608 t +(ments.)1800 1728 w +( spaces, it)2 409(The parameter is the title for a track or for the disk. If the string contains any)16 3191 2 1800 1968 t +(must be enclosed in quotation marks.)5 1528 1 1800 2088 t +(If the)1 231 1 1800 2328 t +10 B f +( TL LE E)3 134( IT)1 67(T TI)1 106 3 2074 2328 t +10 R f +(command appears before any)3 1228 1 2424 2328 t +10 B f +( K)1 0( RA AC CK)3 222(T TR)1 139 3 3696 2328 t +10 R f +(command, the string parameter)3 1299 1 4101 2328 t +( the)1 158( If)1 135( of the entire disk.)4 768(will be encoded as the title)5 1128 4 1800 2448 t +10 B f +( TL LE E)3 134( IT)1 67(T TI)1 106 3 4025 2448 t +10 R f +(command appears after a)3 1032 1 4368 2448 t +10 B f +( K)1 0( RA AC CK)3 222(T TR)1 139 3 1800 2568 t +10 R f +( the title of the current)5 1000(command, the string parameter will be encoded the)7 2193 2 2207 2568 t +(track.)1800 2688 w +10 B f +( K)1 0( RA AC CK)3 222(T TR)1 139 3 1440 2856 t +10 I f +(number datatype)1 682 1 1834 2856 t +10 R f +(This command is used to start a new)7 1513 1 1800 2976 t +10 B f +( K)1 0( RA AC CK)3 222(T TR)1 139 3 3346 2976 t +10 R f +(.)3707 2976 w +(The \256rst parameter is a track number in the range 1-99.)10 2283 1 1800 3216 t +(The second parameter speci\256es the track data type.)7 2089 1 1800 3456 t +(The following datatypes are permitted:)4 1585 1 1800 3696 t +10 B f +( O)1 0( IO)1 78(A AU UD DI)3 255 3 1800 3864 t +10 R f +(Audio/Music \(2352\))1 827 1 2400 3864 t +10 B f +( G)1 0(C CD DG)2 222 2 1800 4032 t +10 R f +(Karaoke CD+G \(2448\))2 936 1 2400 4032 t +10 B f +( 20 04 48 8)4 150( /2)1 50( 1/)1 28( E1)1 50( DE)1 67( OD)1 72(M MO)1 172 7 1800 4200 t +10 R f +(CDROM Mode1 Data \(cooked\))3 1291 1 2400 4320 t +10 B f +( 23 35 52 2)4 150( /2)1 50( 1/)1 28( E1)1 50( DE)1 67( OD)1 72(M MO)1 172 7 1800 4488 t +10 R f +(CDROM Mode1 Data \(raw\))3 1152 1 2400 4608 t +10 B f +( 23 33 36 6)4 150( /2)1 50( 2/)1 28( E2)1 50( DE)1 67( OD)1 72(M MO)1 172 7 1800 4776 t +10 R f +(CDROM-XA Mode2 Data)2 1081 1 2400 4896 t +10 B f +( 23 35 52 2)4 150( /2)1 50( 2/)1 28( E2)1 50( DE)1 67( OD)1 72(M MO)1 172 7 1800 5064 t +10 R f +(CDROM-XA Mode2 Data)2 1081 1 2400 5184 t +10 B f +( 23 33 36 6)4 150( /2)1 50( I/)1 28(C CD DI)2 183 4 1800 5352 t +10 R f +(CDI Mode2 Data)2 709 1 2400 5352 t +10 B f +( 23 35 52 2)4 150( /2)1 50( I/)1 28(C CD DI)2 183 4 1800 5520 t +10 R f +(CDI Mode2 Data)2 709 1 2400 5520 t +( \256rst track number can be)5 1077( The)1 225( 99 inclusive.)2 560(All track numbers must be between 1 and)7 1738 4 1800 5688 t +( must)1 235( There)1 306(greater than one, but all track numbers after the \256rst must be sequential.)12 3059 3 1800 5808 t +(be at least one track per \256le.)6 1170 1 1800 5928 t +9 B f +( O)1 0( SO)1 70( LS)1 50( AL)1 60( A)1 110( EE E)2 60(S SE)1 110 7 720 6216 t +10 B f +( av v)2 50( wa)1 50( a2 2w)2 122( dd da)2 106(c cd)1 100 5 1080 6336 t +10 R f +(\(1\),)1508 6336 w +10 B f +( d)1 0( cd)1 56( dc)1 44( ad)1 56(r re ea)2 138 5 1682 6336 t +10 R f +(\(1\),)1976 6336 w +10 B f +( g)1 0( cg)1 50(s sc)1 83 3 2150 6336 t +10 R f +(\(7\),)2283 6336 w +10 B f +( bk k)2 56(f fb)1 89 2 2457 6336 t +10 R f +(\(7\),)2602 6336 w +10 B f +( s)1 0( fs)1 39( of)1 33( so)1 50( is)1 39( ki)1 28(m mk)1 139 7 2776 6336 t +10 R f +(\(8\),)3104 6336 w +10 B f +( d)1 0( md)1 56(r rc cm)2 171 3 3278 6336 t +10 R f +(\(3\),)3505 6336 w +10 B f +( h)1 0(s ss sh)2 134 2 3679 6336 t +10 R f +(\(1\).)3813 6336 w +9 B f +( S)1 0( TE ES)2 110( OT)1 60(N NO)1 135 4 720 6624 t +10 R f +( variant of cdrecord.)3 889(Not all options described in this manual may be supported by the OpenSource)12 3431 2 1080 6744 t +( to use an option that has been disabled in the Open-)11 2265(Cdrecord issues a warning if an attempt is made)8 2055 2 1080 6864 t +(Source variant.)1 612 1 1080 6984 t +(J)720 7680 w +(. .)1 47 1 759 7625 t +( 30)1 1829( change: Version 3.0)3 850( Last)1 1434(org Schilling)1 528 4 759 7680 t +cleartomark +showpage +restore +%%EndPage: 30 30 +%%Page: 31 31 +save +mark +31 pagesetup +10 R f +(Schily)720 480 w +10 S1 f +(\302)976 480 w +10 R f +( \( 1 \))3 164( CDRECORD)1 3277(s USER COMMANDS)2 950 3 1009 480 t +( you need to stop the volume management if you like to use the)13 2703(On Solaris before Solaris 10 Update 1,)6 1617 2 1080 960 t +(USCSI fallback SCSI transport code. Even things like)7 2272 1 1080 1080 t +10 B f +( s)1 0( nb bu us)3 151( an)1 56( ca)1 50( sc)1 44( -s)1 39( -)1 73( d)1 0( rd)1 56( or)1 44( re ec co)3 138( dr)1 44(c cd)1 100 13 3393 1080 t +10 R f +(will not work if the volume)5 1172 1 4228 1080 t +(management is running.)2 979 1 1080 1200 t +(Disks made in)2 608 1 1080 1368 t +10 B f +( ce e)2 44( nc)1 44( On)1 56( O)1 121( t)1 0( At)1 33( A)1 115( k)1 0( ck)1 56( ac)1 44( ra)1 50(T Tr)1 111 12 1731 1368 t +10 R f +(mode are not suitable as a master for direct mass production by CD-)12 2951 1 2449 1368 t +( will need the)3 610(manufacturers. You)1 848 2 1080 1488 t +10 B f +( ce e)2 44( nc)1 44( on)1 56( o)1 98( t)1 0( at)1 33( a)1 98( k)1 0( sk)1 56( is)1 39(d di)1 84 11 2586 1488 t +10 R f +( the disks)2 424( Nevertheless)1 596(option to record such disks.)4 1194 3 3186 1488 t +(made in)1 332 1 1080 1608 t +10 B f +( ce e)2 44( nc)1 44( On)1 56( O)1 116( t)1 0( At)1 33( A)1 110( k)1 0( ck)1 56( ac)1 44( ra)1 50(T Tr)1 111 12 1450 1608 t +10 R f +( old audio CD-players however)4 1309(will normally be read in all CD-players. Some)7 1939 2 2152 1608 t +(may produce a two second click between two audio tracks.)9 2422 1 1080 1728 t +( write smaller tracks, the CD-recorder)5 1607(The minimal size of a track is 4 seconds or 300 sectors. If you)13 2713 2 1080 1896 t +(will add dummy blocks. This is not an error, even though the SCSI-error message looks this way.)16 4022 1 1080 2016 t +10 B f +( d)1 0( rd)1 56( or)1 44( re ec co)3 138( dr)1 44(C Cd)1 128 6 1080 2184 t +10 R f +( a)1 88(has been tested on an upgraded Philips CDD-521 recorder at single and double speed on)14 3779 2 1533 2184 t +(SparcStation 20/502 with no problems, slower computer systems should work also. The newer)12 4320 1 1080 2304 t +( work also. The Plasmon)4 1035(Philips/HP/Plasmon/Grundig drives as well as Yamaha CDR-100 and CDR-102)8 3285 2 1080 2424 t +( Philips CDD-521 that has not been)6 1620( A)1 163( but has not been tested in multi-session.)7 1853(RF-4100 works,)1 684 4 1080 2544 t +( tested, but does not support XA-mode2 in)7 1902( Sony CDU-924 has been)4 1133( The)1 241(upgraded will not work.)3 1044 4 1080 2664 t +( Ricoh RO-1420C)2 782( The)1 240( Sony therefore cannot create conforming multi-session disks.)7 2663(hardware. The)1 635 4 1080 2784 t +(works, but some people seem to have problems to use them with speed=2, try speed=0 in this case.)17 4088 1 1080 2904 t +( are supported in single and multi-)6 1473(The Yamaha CDR-400 and all new SCSI-3/mmc conforming drives)8 2847 2 1080 3072 t +(session.)1080 3192 w +(You should run several tests in all supported speeds of your drive with the)13 3083 1 1080 3360 t +10 S1 f +(\261 \261)1 65 1 4197 3360 t +10 B f +( y)1 0( mm my)2 133(d du um)2 195 3 4262 3360 t +10 R f +( on if)2 231(option turned)1 545 2 4624 3360 t +(you are using)2 586 1 1080 3480 t +10 B f +( d)1 0( rd)1 56( or)1 44( re ec co)3 138( dr)1 44(c cd)1 100 6 1715 3480 t +10 R f +(on an unknown system. Writing a CD is a real-time process.)10 2638 1 2145 3480 t +10 B f +( S)1 0( FS)1 56(N NF)1 133 3 4831 3480 t +10 R f +(will not)1 332 1 5068 3480 t +( want to use)3 525( you)1 189( If)1 138(always deliver constantly the needed data rates.)6 1982 4 1080 3600 t +10 B f +( d)1 0( rd)1 56( or)1 44( re ec co)3 138( dr)1 44(c cd)1 100 6 3954 3600 t +10 R f +(with CD-images that are)3 1024 1 4376 3600 t +(located on a)2 536 1 1080 3720 t +10 B f +( S)1 0( FS)1 56(N NF)1 133 3 1668 3720 t +10 R f +( author used)2 540( The)1 239( that the FIFO size is big enough.)7 1515(mounted \256lesystem, be sure)3 1197 4 1909 3720 t +10 B f +( d)1 0( rd)1 56( or)1 44( re ec co)3 138( dr)1 44(c cd)1 100 6 1080 3840 t +10 R f +( on a SS20/502 and even at quad speed on a Sparcstation-2 which was)13 3116(with medium load)2 774 2 1510 3840 t +( system as lightly loaded as possible while writing a)9 2197(heavily loaded, but it is recommended to leave the)8 2123 2 1080 3960 t +( are not caused by your source disk, you may use)10 2110( you want to make sure that buffer underruns)8 1908(CD. If)1 302 3 1080 4080 t +(the command)1 549 1 1080 4200 t +10 B f +( d)1 0( rd)1 56( or)1 44( re ec co)3 138( dr)1 44(c cd)1 100 6 1212 4368 t +10 S1 f +(\261 \261)1 65 1 1627 4368 t +10 B f +( ll l)2 28( nu ul)2 84( /n)1 56( v/)1 28( ev)1 50( de)1 44( /d)1 56( /)1 61( m)1 0( 60 00 0m)3 183( =6)1 50( ze e=)2 101( iz)1 44( si)1 28( ds)1 39( ad)1 56( pa)1 50( p)1 89( 0)1 0( ,0)1 50( 2,)1 25( =2)1 50( v=)1 57( ev)1 50( de)1 44( d)1 89( y)1 0( mm my)2 133(d du um)2 195 29 1692 4368 t +10 R f +(to create a disk that is entirely made of dummy data.)10 2174 1 1080 4536 t +10 B f +( d)1 0( rd)1 56( or)1 44( re ec co)3 138( dr)1 44(C Cd)1 128 6 3320 4536 t +10 R f +( get access to the)4 712(needs to run as root to)5 925 2 3763 4536 t +10 B f +( g? ?)2 50( cg)1 50( sc)1 44( /s)1 39( v/)1 28( ev)1 50( de)1 44(/ /d)1 84 8 1080 4656 t +10 R f +(device nodes and to be able to lock itself into memory.)10 2269 1 1502 4656 t +(If you don't want to allow users to become root on your system,)12 2705 1 1080 4824 t +10 B f +( d)1 0( rd)1 56( or)1 44( re ec co)3 138( dr)1 44(c cd)1 100 6 3822 4824 t +10 R f +( suid)1 205(may safely be installed)3 954 2 4241 4824 t +( privileges to use)3 707(root. This allows all users or a group of users with no root)12 2437 2 1080 4944 t +10 B f +( d)1 0( rd)1 56( or)1 44( re ec co)3 138( dr)1 44( Cd)1 56( C)1 106( .)1 0( d.)1 25( rd)1 56( or)1 44( re ec co)3 138( dr)1 44(c cd)1 100 14 4258 4944 t +10 R f +(in this)1 257 1 5143 4944 t +( give all users access to)5 989( To)1 180( real user would have been able to read the speci\256ed \256les.)11 2421(case checks if the)3 730 4 1080 5064 t +(use)1080 5184 w +10 B f +( ,)1 0( d,)1 25( rd)1 56( or)1 44( re ec co)3 138( dr)1 44(c cd)1 100 7 1246 5184 t +10 R f +(enter:)1686 5184 w +(chown root /opt/schily/bin/cdrecord)2 1448 1 1440 5352 t +(chmod 4711 /opt/schily/bin/cdrecord)2 1493 1 1440 5472 t +(To give a restricted group of users access to cdrecord enter:)10 2456 1 1080 5640 t +(chown root /opt/schily/bin/cdrecord)2 1448 1 1440 5808 t +(chgrp cdburners /opt/schily/bin/cdrecord)2 1641 1 1440 5928 t +(chmod 4710 /opt/schily/bin/cdrecord)2 1493 1 1440 6048 t +(and add a group)3 664 1 1080 6216 t +10 I f +(cdburners)1777 6216 w +10 R f +(on your system.)2 652 1 2215 6216 t +( to the)2 284(Never give write permissions for non root users)7 2017 2 1080 6384 t +10 I f +(/dev/scg?)3423 6384 w +10 R f +(devices unless you would allow any-)5 1558 1 3842 6384 t +(body to read/write/format all your disks.)5 1655 1 1080 6504 t +( not connect old drives that do not support disconnect/reconnect to either the SCSI bus that)15 3843(You should)1 477 2 1080 6672 t +(is connected to the CD-recorder or the source disk.)8 2095 1 1080 6792 t +(A Compact Disc can have no more than 99 tracks.)9 2079 1 1080 6960 t +(J)720 7680 w +(. .)1 47 1 759 7625 t +( 31)1 1829( change: Version 3.0)3 850( Last)1 1434(org Schilling)1 528 4 759 7680 t +cleartomark +showpage +restore +%%EndPage: 31 31 +%%Page: 32 32 +save +mark +32 pagesetup +10 R f +(Schily)720 480 w +10 S1 f +(\302)976 480 w +10 R f +( \( 1 \))3 164( CDRECORD)1 3277(s USER COMMANDS)2 950 3 1009 480 t +( on track 1 otherwise you)5 1132(When creating a disc with both audio and data tracks, the data should be)13 3188 2 1080 960 t +( session containing the audio)4 1235(should create a CDplus disk which is a multi-session disk with the \256rst)12 3085 2 1080 1080 t +(tracks and the following session containing the data track.)8 2380 1 1080 1200 t +( single data track, or need special software to)8 1918(Many operating systems are not able to read more than a)10 2402 2 1080 1368 t +(do so.)1 247 1 1080 1488 t +(More information on the SCSI command set of a HP CD-recorder can be found at:)14 3412 1 1080 1656 t +(http://www.hp.com/isgsupport/cdr/index.html)1440 1824 w +( manuals for currently unsupported CD/DVD/BluRay-)5 2263(If you have more information or SCSI command)7 2057 2 1080 1992 t +(recorders please contact the author.)4 1441 1 1080 2112 t +( bugs. Some of)3 648(The Philips CDD 521 CD-recorder \(even in the upgraded version\) has several \256rmware)12 3672 2 1080 2280 t +(them will force you to power cycle the device or to reboot the machine.)13 2959 1 1080 2400 t +(When using)1 488 1 1080 2568 t +10 B f +( d)1 0( rd)1 56( or)1 44( re ec co)3 138( dr)1 44(c cd)1 100 6 1601 2568 t +10 R f +(with the)1 334 1 2016 2568 t +10 B f +( er r)2 44( ve)1 44( iv)1 50( ri)1 28( dr)1 44( d)1 90( c)1 0( ic)1 44( er ri)2 72( ne)1 44( en)1 56( ge)1 44( g)1 84( I)1 0( SI)1 39( CS)1 56( SC)1 72( S)1 90( x)1 0( nu ux)2 106( in)1 56(L Li)1 95 22 2384 2568 t +10 R f +(, you should note that)4 900 1 3542 2568 t +10 B f +( d)1 0( rd)1 56( or)1 44( re ec co)3 138( dr)1 44(c cd)1 100 6 4476 2568 t +10 R f +(uses a layer,)2 508 1 4892 2568 t +( the drives of the local operating system.)7 1676(that tries to emulate the functionality of the scg driver on top of)12 2644 2 1080 2688 t +(Unfortunately, the sg driver on)4 1266 1 1080 2808 t +10 B f +( x)1 0( nu ux)2 106( in)1 56(L Li)1 95 4 2379 2808 t +10 R f +(has several \257aws:)2 720 1 2669 2808 t +( cannot see if a SCSI command could not be sent at all.)12 2302(\267 It)1 421 2 1080 2976 t +( cannot get the SCSI status byte.)6 1399(\267 It)1 421 2 1080 3144 t +10 B f +( d)1 0( rd)1 56( or)1 44( re ec co)3 138( dr)1 44(C Cd)1 128 6 2942 3144 t +10 R f +( report failing SCSI com-)4 1088(for that reason cannot)3 918 2 3394 3144 t +(mands in some situations.)3 1058 1 1440 3264 t +( cannot get real DMA count of transfer.)7 1656(\267 It)1 421 2 1080 3432 t +10 B f +( d)1 0( rd)1 56( or)1 44( re ec co)3 138( dr)1 44(C Cd)1 128 6 3193 3432 t +10 R f +(cannot tell you if there is a DMA residual)8 1760 1 3640 3432 t +(count.)1440 3552 w +( valid in auto sense data.)5 1092( cannot get number of bytes)5 1217(\267 It)1 421 3 1080 3720 t +10 B f +( d)1 0( rd)1 56( or)1 44( re ec co)3 138( dr)1 44(C Cd)1 128 6 3890 3720 t +10 R f +(cannot tell you if device)4 1053 1 4347 3720 t +(transfers no sense data at all.)5 1187 1 1440 3840 t +( fetches too few data in auto request sense \(CCS/SCSI-2/SCSI-3 needs)10 2905(\267 It)1 421 2 1080 4008 t +10 S1 f +(>)4439 4008 w +10 R f +(= 18\).)1 247 1 4495 4008 t +( computed just after a block of data has been written to the)12 3012(The FIFO percent output is)4 1308 2 1080 4176 t +( reason, there will never be 100% FIFO \256ll ratio while the FIFO is)13 2848(CD/DVD/BluRay-recorder. For this)2 1472 2 1080 4296 t +(in streaming mode.)2 785 1 1080 4416 t +9 B f +( S)1 0( CS)1 50( IC)1 65( TI)1 35( ST)1 60( OS)1 50( NO)1 70( GN)1 65( AG)1 70( IA)1 65(D DI)1 100 11 720 4704 t +10 R f +(You have 9 seconds to type)5 1141 1 1080 4824 t +10 S1 f +(\303)2254 4824 w +10 R f +(C to abort)2 416 1 2287 4824 t +10 B f +( d)1 0( rd)1 56( or)1 44( re ec co)3 138( dr)1 44(c cd)1 100 6 2736 4824 t +10 R f +(after you see the message:)4 1079 1 3151 4824 t +(Starting to write CD at speed %d in %s mode for %s session.)12 2541 1 1080 4992 t +(A typical error message for a SCSI command looks like:)9 2333 1 1080 5160 t +(cdrecord: I/O error. test unit ready: scsi sendcmd: no error)9 2394 1 1440 5400 t +( 20 00 00 00 00)5 665(CDB: 00)1 400 2 1440 5520 t +(status: 0x2 \(CHECK CONDITION\))3 1464 1 1440 5640 t +(Sense Bytes: 70 00 05 00 00 00 00 0A 00 00 00 00 25 00 00 00 00 00)19 2938 1 1440 5760 t +(Sense Key: 0x5 Illegal Request, Segment 0)6 1777 1 1440 5880 t +(Sense Code: 0x25 Qual 0x00 \(logical unit not supported\) Fru 0x0)10 2701 1 1440 6000 t +(Sense \257ags: Blk 0 \(not valid\))5 1204 1 1440 6120 t +(cmd \256nished after 0.002s timeout 40s)5 1545 1 1440 6240 t +( text after the \256rst colon gives)6 1265( The)1 225( of the command.)3 735(The \256rst line gives information about the transport)7 2095 4 1080 6480 t +( from the view of the kernel. It usually is:)9 1740(the error text for the system call)6 1335 2 1080 6600 t +10 B f +( r)1 0( or)1 44( er rr ro)3 138( e)1 78( O)1 0( /O)1 78(I I/)1 67 7 4222 6600 t +10 R f +(unless other prob-)2 739 1 4661 6600 t +( a short description for the SCSI command that fails. The rest of)12 2753(lems happen. The next words contain)5 1567 2 1080 6720 t +( if there were any problems for the transport of the command over the SCSI bus.)15 3361(the line tells you)3 697 2 1080 6840 t +10 B f +( l)1 0( al)1 28( ta)1 50( at)1 33(f fa)1 83 5 5206 6840 t +( r)1 0( or)1 44(e er rr ro)3 182 3 1080 6960 t +10 R f +( was not possible to transport the command \(i.e. no device present at the requested)14 3513(means that it)2 541 2 1346 6960 t +(SCSI address\).)1 602 1 1080 7080 t +(J)720 7680 w +(. .)1 47 1 759 7625 t +( 32)1 1829( change: Version 3.0)3 850( Last)1 1434(org Schilling)1 528 4 759 7680 t +cleartomark +showpage +restore +%%EndPage: 32 32 +%%Page: 33 33 +save +mark +33 pagesetup +10 R f +(Schily)720 480 w +10 S1 f +(\302)976 480 w +10 R f +( \( 1 \))3 164( CDRECORD)1 3277(s USER COMMANDS)2 950 3 1009 480 t +(The second line prints the SCSI command descriptor block for the failed command.)12 3439 1 1080 960 t +( transport of)2 522(The third line gives information on the SCSI status code returned by the command, if the)15 3798 2 1080 1128 t +(the command succeeds. This is error information from the SCSI device.)10 2948 1 1080 1248 t +(The fourth line is a hex dump of the auto request sense information for the command.)15 3537 1 1080 1416 t +( the segment number which is)5 1271(The \256fth line is the error text for the sense key if available, followed by)14 3049 2 1080 1584 t +( a)1 92(only valid if the command was)5 1355 2 1080 1704 t +10 I f +(copy)2575 1704 w +10 R f +(command. If the error message is not directly related to the)10 2589 1 2811 1704 t +(current command, the text)3 1072 1 1080 1824 t +10 I f +(deferred error)1 582 1 2185 1824 t +10 R f +(is appended.)1 507 1 2800 1824 t +( the type of the)4 651( If)1 137( the sense quali\256er if available.)5 1307(The sixth line is the error text for the sense code and)11 2225 4 1080 1992 t +(device is known, the sense data is decoded from tables in)10 2402 1 1080 2112 t +10 I f +(scsierrs.c)3519 2112 w +10 R f +( by the error)3 523( text is followed)3 683(. The)1 250 3 3944 2112 t +(value for a \256eld replaceable unit.)5 1353 1 1080 2232 t +( to the failed command and text for several error)9 2030(The seventh line prints the block number that is related)9 2290 2 1080 2400 t +(\257ags. The block number may not be valid.)7 1746 1 1080 2520 t +( and the time that the command really)7 1694(The eighth line reports the timeout set up for this command)10 2626 2 1080 2688 t +(needed to complete.)2 817 1 1080 2808 t +(The following message is not an error:)6 1590 1 1080 2976 t +(Track 01: Total bytes read/written: 2048/2048 \(1 sectors\).)7 2369 1 1440 3216 t +(cdrecord: I/O error. \257ush cache: scsi sendcmd: no error)8 2266 1 1440 3336 t +( 00 00 00 00 00 00 00 00 00)9 1197(CDB: 35)1 400 2 1440 3456 t +(status: 0x2 \(CHECK CONDITION\))3 1464 1 1440 3576 t +(Sense Bytes: F0 00 05 80 00 00 27 0A 00 00 00 00 B5 00 00 00 00 00)19 2961 1 1440 3696 t +(Sense Key: 0x5 Illegal Request, Segment 0)6 1777 1 1440 3816 t +(Sense Code: 0xB5 Qual 0x00 \(dummy data blocks added\) Fru 0x0)10 2739 1 1440 3936 t +(Sense \257ags: Blk)2 661 1 1440 4056 t +10 S1 f +(\261)2134 4056 w +10 R f +(2147483609 \(valid\))1 799 1 2199 4056 t +(cmd \256nished after 0.002s timeout 40s)5 1545 1 1440 4176 t +(It simply noti\256es that a track that is smaller than the minimum size has been expanded to 300 sectors.)18 4199 1 1080 4416 t +9 B f +( S)1 0( GS)1 50( UG)1 70(B BU)1 125 4 720 4584 t +10 B f +( d)1 0( rd)1 56( or)1 44( re ec co)3 138( dr)1 44(C Cd)1 128 6 1080 4704 t +10 R f +(has even more options than)4 1125 1 1523 4704 t +10 B f +( s)1 0(l ls)1 67 2 2681 4704 t +10 R f +(.)2748 4704 w +(There should be a recover option to make disks usable, that have been written during a power failure.)17 4180 1 1080 4872 t +9 B f +( S)1 0( TS)1 50( IT)1 60( DI)1 35( ED)1 65(C CR RE)2 190 6 720 5160 t +10 R f +( \(Bill)1 443(Bill Swartz)1 461 2 1080 5280 t +10 S f +(_)1984 5280 w +10 R f +(Swartz)2034 5280 w +10 S1 f +(@)2311 5280 w +10 R f +(twolf.com\))2403 5280 w +(For helping me with the TEAC driver support)7 1891 1 1830 5400 t +( \(aaron.d.newsome)1 770(Aaron Newsome)1 681 2 1080 5568 t +10 S1 f +(@)2531 5568 w +10 R f +(wdc.com\))2623 5568 w +(For letting me develop Sony support on his drive)8 2025 1 1830 5688 t +( \(eric)1 265(Eric Youngdale)1 637 2 1080 5856 t +10 S1 f +(@)1982 5856 w +10 R f +(andante.jic.com\))2074 5856 w +(For supplying mkisofs)2 917 1 1830 5976 t +( \(gadio)1 454(Gadi Oxman)1 521 2 1080 6144 t +10 S1 f +(@)2055 6144 w +10 R f +(netvision.net.il\))2147 6144 w +(For tips on the ATAPI standard)5 1303 1 1830 6264 t +( \(\256nnag)1 537(Finn Arne Gangstad)2 826 2 1080 6432 t +10 S1 f +(@)2443 6432 w +10 R f +(guardian.no\))2535 6432 w +(For the \256rst FIFO implementation.)4 1419 1 1830 6552 t +( \(dplatt)1 554(Dave Platt)1 427 2 1080 6720 t +10 S1 f +(@)2061 6720 w +10 R f +(feghoot.ml.org\))2153 6720 w +( implementation of CD-)3 1003(For creating the experimental packet writing support, the \256rst)8 2567 2 1830 6840 t +( the \256rst .wav \256le decoder and many nice discussions on)10 2610(RW blanking support,)2 960 2 1830 6960 t +(cdrecord.)1830 7080 w +(Chris P. Ross \(cross)3 830 1 1080 7248 t +10 S1 f +(@)1910 7248 w +10 R f +(eng.us.uu.net\))2002 7248 w +(J)720 7728 w +(. .)1 47 1 759 7673 t +( 33)1 1829( change: Version 3.0)3 850( Last)1 1434(org Schilling)1 528 4 759 7728 t +cleartomark +showpage +restore +%%EndPage: 33 33 +%%Page: 34 34 +save +mark +34 pagesetup +10 R f +(Schily)720 480 w +10 S1 f +(\302)976 480 w +10 R f +( \( 1 \))3 164( CDRECORD)1 3277(s USER COMMANDS)2 950 3 1009 480 t +(For the \256rst implementation of a BSDI SCSI transport.)8 2256 1 1830 960 t +( \(grant)1 337(Grant R. Guenther)2 756 2 1080 1128 t +10 S1 f +(@)2173 1128 w +10 R f +(torque.net\))2265 1128 w +(For creating the \256rst parallel port transport implementation for Linux.)9 2858 1 1830 1248 t +(Kenneth D. Merry \(ken)3 960 1 1080 1416 t +10 S1 f +(@)2040 1416 w +10 R f +(kdm.org\))2132 1416 w +( together with Michael Smith)4 1472(for providing the CAM port for FreeBSD)6 2098 2 1830 1536 t +(\(msmith)1830 1656 w +10 S1 f +(@)2164 1656 w +10 R f +(freebsd.org\))2256 1656 w +(Heiko Ei)1 366 1 1080 1824 t +10 S f +(b)1446 1824 w +10 R f +(feldt \(heiko)1 471 1 1501 1824 t +10 S1 f +(@)1972 1824 w +10 R f +(hexco.de\))2064 1824 w +(for making libedc)2 726 1 1830 1944 t +10 S f +(_)2556 1944 w +10 R f +(ecc available \(needed to write RAW data sectors\).)7 2055 1 2606 1944 t +9 B f +( S)1 0( TS)1 50( ST)1 60( IS)1 50( LI)1 35( L)1 90( G)1 0( NG)1 70( IN)1 65( LI)1 35( IL)1 60( AI)1 35(M MA)1 150 13 720 2232 t +10 R f +( may join the developer mailing)5 1359(If you want to actively take part on the development of cdrecord, you)12 2961 2 1080 2352 t +(list via this URL:)3 717 1 1080 2472 t +10 B f +( s)1 0( er rs)2 83( pe)1 44( op)1 56( lo)1 50( el)1 28( ve)1 44( ev)1 50( de)1 44( -d)1 56( d-)1 33( rd)1 56( or)1 44( re ec co)3 138( dr)1 44( cd)1 56( /c)1 44( o/)1 28( fo)1 50( nf)1 33( in)1 56( ti)1 28( st)1 33( /l li is)3 95( n/)1 28( an)1 56( ma)1 50( il lm)2 111( ai)1 28( ma)1 50( /m)1 83( e/)1 28( de)1 44( .d)1 56( s.)1 25( os)1 39( li io)2 78( er rl)2 72( be)1 44( .b)1 56( s.)1 25( ts)1 39( st)1 33( // /l li is)4 123( :/)1 28( p:)1 33( tt tp)2 89(h ht)1 89 48 1080 2712 t +9 B f +( R)1 0( HO OR)2 135( TH)1 70(A AU UT)2 190 4 720 3000 t +10 R f +(J)1080 3120 w +(. .)1 47 1 1119 3065 t +(org Schilling)1 528 1 1119 3120 t +(Seestr. 110)1 452 1 1080 3240 t +(D-13353 Berlin)1 638 1 1080 3360 t +(Germany)1080 3480 w +(Additional information can be found on:)5 1658 1 1080 3648 t +(http://cdrecord.berlios.de/private/cdrecord.html)1080 3768 w +(If you have support questions, send them to:)7 1827 1 1080 3936 t +10 B f +( t)1 0( rt)1 33( or)1 44( up pp po)3 162( su)1 56( -s)1 39( d-)1 33( rd)1 56( or)1 44( re ec co)3 138( dr)1 44(c cd)1 100 12 1080 4104 t +10 S1 f +(@ @)1 92 1 1829 4104 t +10 B f +( e)1 0( de)1 44( .d)1 56( s.)1 25( os)1 39( li io)2 78( er rl)2 72(b be)1 100 8 1921 4104 t +10 R f +(If you have de\256nitely found a bug, send a mail to:)10 2075 1 1080 4272 t +10 B f +( s)1 0( er rs)2 83( pe)1 44( op)1 56( lo)1 50( el)1 28( ve)1 44( ev)1 50( de)1 44( -d)1 56( d-)1 33( rd)1 56( or)1 44( re ec co)3 138( dr)1 44(c cd)1 100 16 1080 4440 t +10 S1 f +(@ @)1 92 1 1950 4440 t +10 B f +( e)1 0( de)1 44( .d)1 56( s.)1 25( os)1 39( li io)2 78( er rl)2 72(b be)1 100 8 2042 4440 t +10 R f +(or)1080 4560 w +10 B f +( g)1 0( ng)1 50( il ll li in)4 140( hi)1 28( ch)1 56( sc)1 44( .s)1 39( g.)1 25( er rg)2 94( oe)1 44(j jo)1 83 11 1196 4560 t +10 S1 f +(@ @)1 92 1 1799 4560 t +10 B f +( e)1 0( de)1 44( .d)1 56( er r.)2 69( fe)1 44( of)1 33( un nh ho)3 162( au)1 56( ra)1 50( fr)1 44( .f)1 33( s.)1 25( ku us)2 95( ok)1 56(f fo)1 83 15 1891 4560 t +10 R f +(To subscribe, use:)2 740 1 1080 4728 t +10 B f +( s)1 0( er rs)2 83( pe)1 44( op)1 56( lo)1 50( el)1 28( ve)1 44( ev)1 50( de)1 44( -d)1 56( d-)1 33( rd)1 56( or)1 44( re ec co)3 138( dr)1 44( cd)1 56( /c)1 44( o/)1 28( fo)1 50( nf)1 33( in)1 56( ti)1 28( st)1 33( /l li is)3 95( n/)1 28( an)1 56( ma)1 50( il lm)2 111( ai)1 28( ma)1 50( /m)1 83( e/)1 28( de)1 44( .d)1 56( s.)1 25( os)1 39( li io)2 78( er rl)2 72( be)1 44( .b)1 56( s.)1 25( ts)1 39( st)1 33( // /l li is)4 123( :/)1 28( p:)1 33( tt tp)2 89(h ht)1 89 48 1080 4896 t +10 R f +(or)1080 5016 w +10 B f +( t)1 0( rt)1 33( or)1 44( up pp po)3 162( su)1 56( -s)1 39( d-)1 33( rd)1 56( or)1 44( re ec co)3 138( dr)1 44( cd)1 56( /c)1 44( o/)1 28( fo)1 50( nf)1 33( in)1 56( ti)1 28( st)1 33( /l li is)3 95( n/)1 28( an)1 56( ma)1 50( il lm)2 111( ai)1 28( ma)1 50( /m)1 83( e/)1 28( de)1 44( .d)1 56( s.)1 25( os)1 39( li io)2 78( er rl)2 72( be)1 44( .b)1 56( s.)1 25( ts)1 39( st)1 33( // /l li is)4 123( :/)1 28( p:)1 33( tt tp)2 89(h ht)1 89 44 1196 5016 t +9 B f +( Y)1 0( TY)1 65( IT)1 60( LI)1 35( IL)1 60( BI)1 35( AB)1 60( TA)1 65( ST)1 60( S)1 80( E)1 0( AC CE)2 125( FA)1 65( RF)1 55( TE ER)2 125( NT)1 60(I IN)1 100 17 720 5184 t +10 R f +(The interfaces provided by)3 1144 1 1080 5304 t +10 B f +( d)1 0( rd)1 56( or)1 44( re ec co)3 138( dr)1 44(c cd)1 100 6 2273 5304 t +10 R f +( As)1 193(are designed for long term stability.)5 1546 2 2704 5304 t +10 B f +( d)1 0( rd)1 56( or)1 44( re ec co)3 138( dr)1 44(c cd)1 100 6 4492 5304 t +10 R f +(depends on)1 477 1 4923 5304 t +(interfaces provided by the underlying operating system, the stability of the interfaces offered by)13 4320 1 1080 5424 t +10 B f +( d)1 0( rd)1 56( or)1 44( re ec co)3 138( dr)1 44(c cd)1 100 6 1080 5544 t +10 R f +(depends on the interface stability of the OS interfaces. Modi\256ed interfaces in the OS may)14 3891 1 1509 5544 t +(enforce modi\256ed interfaces in)3 1218 1 1080 5664 t +10 B f +( d)1 0( rd)1 56( or)1 44( re ec co)3 138( dr)1 44(c cd)1 100 6 2331 5664 t +10 R f +(.)2713 5664 w +(J)720 7680 w +(. .)1 47 1 759 7625 t +( 34)1 1829( change: Version 3.0)3 850( Last)1 1434(org Schilling)1 528 4 759 7680 t +cleartomark +showpage +restore +%%EndPage: 34 34 %%Trailer -end -%%EOF +done +%%DocumentFonts: Times-Roman Times-Bold Times-Italic Symbol +%%Pages: 34 diff -Nru cdrtools-2.01.01a33/doc/isoinfo.man cdrtools-3.02a09/doc/isoinfo.man --- cdrtools-2.01.01a33/doc/isoinfo.man 2002-12-24 15:58:39.000000000 +0000 +++ cdrtools-3.02a09/doc/isoinfo.man 2010-01-29 22:57:50.000000000 +0000 @@ -1,135 +1,330 @@ -ISOINFO(8) ISOINFO(8) + + + +Maintenance Procedures ISOINFO(8) NNAAMMEE - devdump, isoinfo, isovfy, isodump - Utility programs for - dumping and verifying iso9660 images. + devdump, isoinfo, isovfy, isodump - Utility programs for + dumping and verifying iso9660 images. SSYYNNOOPPSSIISS - ddeevvdduummpp _i_s_o_i_m_a_g_e + ddeevvdduummpp _i_s_o_i_m_a_g_e - iissoodduummpp _i_s_o_i_m_a_g_e + iissoodduummpp _i_s_o_i_m_a_g_e - iissooiinnffoo [ --dd ] [ --hh ] [ --RR ] [ --JJ ] [ --jj _c_h_a_r_s_e_t ] [ --ff ] - [ --ll ] [ --pp ] [ --TT _s_e_c_t_o_r ] [ --NN _s_e_c_t_o_r ] [ --ii _i_s_o_i_m_a_g_e ] - [ --xx _p_a_t_h ] + iissooiinnffoo [ -dd ] [ -hh ] [ -RR ] [ -JJ ] [ -jj _c_h_a_r_s_e_t ] [ -ff ] [ + -ll ] [ -pp ] [ -TT _s_e_c_t_o_r ] [ -NN _s_e_c_t_o_r ] [ -ii _i_s_o_i_m_a_g_e ] [ -xx + _p_a_t_h ] - iissoovvffyy _i_s_o_i_m_a_g_e + iissoovvffyy _i_s_o_i_m_a_g_e DDEESSCCRRIIPPTTIIOONN - ddeevvdduummpp is a crude utility to interactively display the - contents of device or filesystem images. The initial - screen is a display of the first 256 bytes of the first - 2048 byte sector. The commands are the same as with iissoo-- - dduummpp. - - iissoodduummpp is a crude utility to interactively display the - contents of iso9660 images in order to verify directory - integrity. The initial screen is a display of the first - part of the root directory, and the prompt shows you the - extent number and offset in the extent. - - You can use the 'a' and 'b' commands to move back- - wards and forwards within the image. The 'g' com- - mand allows you to goto an arbitrary extent, and - the 'f' command specifies a search string to be - used. The '+' command searches forward for the next - instance of the search string, and the 'q' command - exits ddeevvdduummpp or iissoodduummpp. - - iissooiinnffoo is a utility to perform directory like listings of - iso9660 images. - - iissoovvffyy is a utility to verify the integrity of an iso9660 - image. Most of the tests in iissoovvffyy were added after bugs - were discovered in early versions of mmkkiissooffss.. It isn't - all that clear how useful this is anymore, but it doesn't - hurt to have this around. + ddeevvdduummpp is a crude utility to interactively display the con- + tents of device or filesystem images. The initial screen is + a display of the first 256 bytes of the first 2048 byte sec- + tor. The commands are the same as with iissoodduummpp. + + iissoodduummpp is a crude utility to interactively display the con- + tents of iso9660 images in order to verify directory + integrity. The initial screen is a display of the first + part of the root directory, and the prompt shows you the + extent number and offset in the extent. + + You can use the 'a' and 'b' commands to move backwards + and forwards within the image. The 'g' command allows + you to goto an arbitrary extent, and the 'f' command + specifies a search string to be used. The '+' command + searches forward for the next instance of the search + string, and the 'q' command exits ddeevvdduummpp or iissoodduummpp. + + iissooiinnffoo is a utility to perform directory like listings of + iso9660 images. + + iissoovvffyy is a utility to verify the integrity of an iso9660 + image. Most of the tests in iissoovvffyy were added after bugs + were discovered in early versions of mmkkiissooffss.. It isn't all + that clear how useful this is anymore, but it doesn't hurt + to have this around. OOPPTTIIOONNSS - Only the iissooiinnffoo program has any command line options. - These are: + The options common to all programs are -hheellpp,-hh,-vveerrssiioonn, + ii=_n_a_m_e,ddeevv=_n_a_m_e. The iissooiinnffoo program has additional command + line options. The options are: + + -hheellpp + + -hh print a summary of all options. + + + +Version 3.0 Last change: 09/10/11 1 + + + + + + +Maintenance Procedures ISOINFO(8) + + + + -dd Print information from the primary volume descriptor + (PVD) of the iso9660 image. This includes information + about Rock Ridge, Joliet extensions and Eltorito boot + information if present. + + -ff generate output as if a 'find . -print' command had + been run on the iso9660 image. You should not use the + --ll image with the --ff option. + + -ii iissoo__iimmaaggee + Specifies the path of the iso9660 image that we wish to + examine. The options -ii and ddeevv==_t_a_r_g_e_t are mutual + exclusive. + + ddeevv==_t_a_r_g_e_t + Sets the SCSI target for the drive, see notes above. A + typical device specification is ddeevv==_6,_0 . If a + filename must be provided together with the numerical + target specification, the filename is implementation + specific. The correct filename in this case can be + found in the system specific manuals of the target + operating system. On a _F_r_e_e_B_S_D system without _C_A_M sup- + port, you need to use the control device (e.g. + /_d_e_v/_r_c_d_0._c_t_l). A correct device specification in this + case may be ddeevv==/_d_e_v/_r_c_d_0._c_t_l:@ . + + On Linux, drives connected to a parallel port adapter + are mapped to a virtual SCSI bus. Different adapters + are mapped to different targets on this virtual SCSI + bus. + + If no _d_e_v option is present, the program will try to + get the device from the CCDDRR__DDEEVVIICCEE environment. + + If the argument to the ddeevv== option does not contain the + characters ',', '/', '@' or ':', it is interpreted as + an label name that may be found in the file + /etc/default/cdrecord (see FILES section). + + The options -ii and ddeevv==_t_a_r_g_e_t are mutual exclusive. + + -ddeebbuugg + Print additional debug information. This enables e.g. + printing of all directory entries if a file has more + than one directory entry and printing of more informa- + tion from the primary volume descriptor. + + In debug mode, Rock Ridge information is parsed with -RR + even if it is not standard compliant. + + -ll generate output as if a 'ls -lR' command had been run + on the iso9660 image. You should not use the --ff image + - --hh print a summary of all options. - --dd Print information from the primary volume descrip- - tor (PVD) of the iso9660 image. This includes - information about Rock Ridge and Joliet extensions - if present. - - --ff generate output as if a 'find . -print' command had - been run on the iso9660 image. You should not use - the --ll image with the --ff option. - - --ii iissoo__iimmaaggee - Specifies the path of the iso9660 image that we - wish to examine. - - --ll generate output as if a 'ls -lR' command had been - run on the iso9660 image. You should not use the - --ff image with the --ll option. - - --NN sseeccttoorr - Quick hack to help examine single session disc - files that are to be written to a multi-session - disc. The sector number specified is the sector - number at which the iso9660 image should be written - when send to the cd-writer. Not used for the first - session on the disc. - - --pp Print path table information. - - --RR Extract information from Rock Ridge extensions (if - present) for permissions, file names and owner- - ships. - - --JJ Extract information from Joliet extensions (if pre- - sent) for file names. - - --jj cchhaarrsseett - Convert Joliet file names (if present) to the sup- - plied charset. See mmkkiissooffss(8) for details. - - --TT sseeccttoorr - Quick hack to help examine multi-session images - that have already been burned to a multi-session - disc. The sector number specified is the sector - number for the start of the session we wish to dis- - play. +Version 3.0 Last change: 09/10/11 2 - --xx ppaatthhnnaammee - Extract specified file to stdout. + + + + + +Maintenance Procedures ISOINFO(8) + + + + with the --ll option. + + -NN sseeccttoorr + Quick hack to help examine single session disc files + that are to be written to a multi-session disc. The + sector number specified is the sector number at which + the iso9660 image should be written when send to the + cd-writer. Not used for the first session on the disc. + + -pp Print path table information. + + -RR Extract information from Rock Ridge extensions (if + present) for permissions, file names and ownerships. + + -JJ Extract information from Joliet extensions (if present) + for file names. + + -jj cchhaarrsseett + Convert Joliet file names (if present) to the supplied + charset. See mmkkiissooffss(8) for details. + + -TT sseeccttoorr + Quick hack to help examine multi-session images that + have already been burned to a multi-session disc. The + sector number specified is the sector number for the + start of the session we wish to display. + + -xx ppaatthhnnaammee + Extract specified file to stdout. AAUUTTHHOORR - Eric Youngdale or - is to blame for these shoddy hacks. - Patches to improve general usability would be gladly - accepted. + The author of the original sources (1993 ... 1998) is Eric + Youngdale or + is to blame for these shoddy hacks. Joerg Schilling wrote + the SCSI transport library and its adaptation layer to the + programs and newer parts (starting from 1999) of the utili- + ties, this makes them Copyright (C) 1999-2004 Joerg Schil- + ling. Patches to improve general usability would be gladly + accepted. BBUUGGSS - The user interface really sucks. + The user interface really sucks. FFUUTTUURREE IIMMPPRROOVVEEMMEENNTTSS - These utilities are really quick hacks, which are very - useful for debugging problems in mkisofs or in an iso9660 - filesystem. In the long run, it would be nice to have a - daemon that would NFS export a iso9660 image. + These utilities are really quick hacks, which are very use- + ful for debugging problems in mkisofs or in an iso9660 + filesystem. In the long run, it would be nice to have a dae- + mon that would NFS export a iso9660 image. + + The isoinfo program is probably the program that is of the + most use to the general user. + + + + +Version 3.0 Last change: 09/10/11 3 + + + + + + +Maintenance Procedures ISOINFO(8) + - The isoinfo program is probably the program that is of the - most use to the general user. AAVVAAIILLAABBIILLIITTYY - These utilities come with the mkisofs package, and the - primary ftp site is tsx-11.mit.edu in - /pub/linux/BETA/cdrom/mkisofs and many other mirror sites. - Despite the name, the software is not beta. + These utilities come with the ccddrrttoooollss package, and the pri- + mary ftp site is ftp.berlios.de in /pub/cdrecord and many + other mirror sites. Despite the name, the software is not + beta. + + +EENNVVIIRROONNMMEENNTT + CCDDRR__DDEEVVIICCEE + This may either hold a device identifier that is suit- + able to the open call of the SCSI transport library or + a label in the file /etc/default/cdrecord. + + RRSSHH If the RRSSHH environment is present, the remote connec- + tion will not be created via rrccmmdd(3) but by calling the + program pointed to by RRSSHH. Use e.g. RRSSHH==/usr/bin/ssh + to create a secure shell connection. + + Note that this forces the program to create a pipe to + the rrsshh((11)) program and disallows the program to + directly access the network socket to the remote + server. This makes it impossible to set up performance + parameters and slows down the connection compared to a + rroooott initiated rrccmmdd((33)) connection. + + RRSSCCSSII + If the RRSSCCSSII environment is present, the remote SCSI + server will not be the program //oopptt//sscchhiillyy//ssbbiinn//rrssccssii + but the program pointed to by RRSSCCSSII. Note that the + remote SCSI server program name will be ignored if you + log in using an account that has been created with a + remote SCSI server program as login shell. + + +FFIILLEESS + /etc/default/cdrecord + Default values can be set for the following options in + /etc/default/cdrecord. + + CDR_DEVICE + This may either hold a device identifier that is + suitable to the open call of the SCSI transport + library or a label in the file + /etc/default/cdrecord that allows to identify a + specific drive on the system. + + Any other label + is an identifier for a specific drive on the sys- + tem. Such an identifier may not contain the char- + acters ',', '/', '@' or ':'. + + Each line that follows a label contains a TAB + + + +Version 3.0 Last change: 09/10/11 4 + + + + + + +Maintenance Procedures ISOINFO(8) + + + + separated list of items. Currently, four items + are recognized: the SCSI ID of the drive, the + default speed that should be used for this drive, + the default FIFO size that should be used for this + drive and drive specific options. The values for + _s_p_e_e_d and _f_i_f_o_s_i_z_e may be set to -1 to tell the + program to use the global defaults. The value for + driveropts may be set to "" if no driveropts are + used. A typical line may look this way: + + teac1= 0,5,0 4 8m "" + + yamaha= 1,6,0 -1 -1 burnfree + + This tells the program that a drive named _t_e_a_c_1 is + at scsibus 0, target 5, lun 0 and should be used + with speed 4 and a FIFO size of 8 MB. A second + drive may be found at scsibus 1, target 6, lun 0 + and uses the default speed and the default FIFO + size. SSEEEE AALLSSOO - mkisofs(8) + mmkkiissooffss(8), ccddrreeccoorrdd(1), rreeaaddccdd(1), ssccgg(7), rrccmmdd(3), sssshh(1). + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +Version 3.0 Last change: 09/10/11 5 -Version 2.0 02/12/24 ISOINFO(8) diff -Nru cdrtools-2.01.01a33/doc/isoinfo.ps cdrtools-3.02a09/doc/isoinfo.ps --- cdrtools-2.01.01a33/doc/isoinfo.ps 2002-12-24 15:58:59.000000000 +0000 +++ cdrtools-3.02a09/doc/isoinfo.ps 2010-01-29 22:58:16.000000000 +0000 @@ -1,321 +1,872 @@ -%!PS-Adobe-3.0 -%%Creator: groff version 1.17.2 -%%CreationDate: Tue Dec 24 17:05:27 2002 -%%DocumentNeededResources: font Times-Roman -%%+ font Times-Bold -%%+ font Times-Italic -%%DocumentSuppliedResources: procset grops 1.17 2 -%%Pages: 2 -%%PageOrder: Ascend -%%Orientation: Portrait +%!PS +%%Version: 3.15 +%%DocumentFonts: (atend) +%%Pages: (atend) %%EndComments -%%BeginProlog -%%BeginResource: procset grops 1.17 2 -/setpacking where{ -pop -currentpacking -true setpacking -}if -/grops 120 dict dup begin -/SC 32 def -/A/show load def -/B{0 SC 3 -1 roll widthshow}bind def -/C{0 exch ashow}bind def -/D{0 exch 0 SC 5 2 roll awidthshow}bind def -/E{0 rmoveto show}bind def -/F{0 rmoveto 0 SC 3 -1 roll widthshow}bind def -/G{0 rmoveto 0 exch ashow}bind def -/H{0 rmoveto 0 exch 0 SC 5 2 roll awidthshow}bind def -/I{0 exch rmoveto show}bind def -/J{0 exch rmoveto 0 SC 3 -1 roll widthshow}bind def -/K{0 exch rmoveto 0 exch ashow}bind def -/L{0 exch rmoveto 0 exch 0 SC 5 2 roll awidthshow}bind def -/M{rmoveto show}bind def -/N{rmoveto 0 SC 3 -1 roll widthshow}bind def -/O{rmoveto 0 exch ashow}bind def -/P{rmoveto 0 exch 0 SC 5 2 roll awidthshow}bind def -/Q{moveto show}bind def -/R{moveto 0 SC 3 -1 roll widthshow}bind def -/S{moveto 0 exch ashow}bind def -/T{moveto 0 exch 0 SC 5 2 roll awidthshow}bind def -/SF{ -findfont exch -[exch dup 0 exch 0 exch neg 0 0]makefont -dup setfont -[exch/setfont cvx]cvx bind def -}bind def -/MF{ -findfont -[5 2 roll -0 3 1 roll -neg 0 0]makefont -dup setfont -[exch/setfont cvx]cvx bind def -}bind def -/level0 0 def -/RES 0 def -/PL 0 def -/LS 0 def -/MANUAL{ -statusdict begin/manualfeed true store end -}bind def -/PLG{ -gsave newpath clippath pathbbox grestore -exch pop add exch pop -}bind def -/BP{ -/level0 save def -1 setlinecap -1 setlinejoin -72 RES div dup scale -LS{ -90 rotate -}{ -0 PL translate -}ifelse -1 -1 scale -}bind def -/EP{ -level0 restore -showpage -}bind def -/DA{ -newpath arcn stroke -}bind def -/SN{ -transform -.25 sub exch .25 sub exch -round .25 add exch round .25 add exch -itransform -}bind def -/DL{ -SN -moveto -SN -lineto stroke -}bind def -/DC{ -newpath 0 360 arc closepath -}bind def -/TM matrix def -/DE{ -TM currentmatrix pop -translate scale newpath 0 0 .5 0 360 arc closepath -TM setmatrix -}bind def -/RC/rcurveto load def -/RL/rlineto load def -/ST/stroke load def -/MT/moveto load def -/CL/closepath load def -/FL{ -currentgray exch setgray fill setgray -}bind def -/BL/fill load def -/LW/setlinewidth load def -/RE{ -findfont -dup maxlength 1 index/FontName known not{1 add}if dict begin -{ -1 index/FID ne{def}{pop pop}ifelse -}forall -/Encoding exch def -dup/FontName exch def -currentdict end definefont pop -}bind def -/DEFS 0 def -/EBEGIN{ -moveto -DEFS begin -}bind def -/EEND/end load def -/CNT 0 def -/level1 0 def -/PBEGIN{ -/level1 save def -translate -div 3 1 roll div exch scale -neg exch neg exch translate -0 setgray -0 setlinecap -1 setlinewidth -0 setlinejoin -10 setmiterlimit -[]0 setdash -/setstrokeadjust where{ -pop -false setstrokeadjust -}if -/setoverprint where{ -pop -false setoverprint -}if -newpath -/CNT countdictstack def -userdict begin -/showpage{}def -}bind def -/PEND{ -clear -countdictstack CNT sub{end}repeat -level1 restore -}bind def -end def -/setpacking where{ -pop -setpacking -}if -%%EndResource -%%IncludeResource: font Times-Roman -%%IncludeResource: font Times-Bold -%%IncludeResource: font Times-Italic -grops begin/DEFS 1 dict def DEFS begin/u{.001 mul}bind def end/RES 72 -def/PL 841.89 def/LS false def/ENC0[/asciicircum/asciitilde/Scaron -/Zcaron/scaron/zcaron/Ydieresis/trademark/quotesingle/.notdef/.notdef -/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef -/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef -/.notdef/.notdef/.notdef/space/exclam/quotedbl/numbersign/dollar/percent -/ampersand/quoteright/parenleft/parenright/asterisk/plus/comma/hyphen -/period/slash/zero/one/two/three/four/five/six/seven/eight/nine/colon -/semicolon/less/equal/greater/question/at/A/B/C/D/E/F/G/H/I/J/K/L/M/N/O -/P/Q/R/S/T/U/V/W/X/Y/Z/bracketleft/backslash/bracketright/circumflex -/underscore/quoteleft/a/b/c/d/e/f/g/h/i/j/k/l/m/n/o/p/q/r/s/t/u/v/w/x/y -/z/braceleft/bar/braceright/tilde/.notdef/quotesinglbase/guillemotleft -/guillemotright/bullet/florin/fraction/perthousand/dagger/daggerdbl -/endash/emdash/ff/fi/fl/ffi/ffl/dotlessi/dotlessj/grave/hungarumlaut -/dotaccent/breve/caron/ring/ogonek/quotedblleft/quotedblright/oe/lslash -/quotedblbase/OE/Lslash/.notdef/exclamdown/cent/sterling/currency/yen -/brokenbar/section/dieresis/copyright/ordfeminine/guilsinglleft -/logicalnot/minus/registered/macron/degree/plusminus/twosuperior -/threesuperior/acute/mu/paragraph/periodcentered/cedilla/onesuperior -/ordmasculine/guilsinglright/onequarter/onehalf/threequarters -/questiondown/Agrave/Aacute/Acircumflex/Atilde/Adieresis/Aring/AE -/Ccedilla/Egrave/Eacute/Ecircumflex/Edieresis/Igrave/Iacute/Icircumflex -/Idieresis/Eth/Ntilde/Ograve/Oacute/Ocircumflex/Otilde/Odieresis -/multiply/Oslash/Ugrave/Uacute/Ucircumflex/Udieresis/Yacute/Thorn -/germandbls/agrave/aacute/acircumflex/atilde/adieresis/aring/ae/ccedilla -/egrave/eacute/ecircumflex/edieresis/igrave/iacute/icircumflex/idieresis -/eth/ntilde/ograve/oacute/ocircumflex/otilde/odieresis/divide/oslash -/ugrave/uacute/ucircumflex/udieresis/yacute/thorn/ydieresis]def -/Times-Italic@0 ENC0/Times-Italic RE/Times-Bold@0 ENC0/Times-Bold RE -/Times-Roman@0 ENC0/Times-Roman RE +% +% Copyright 2005 Sun Microsystems, Inc. All rights reserved. +% Use is subject to license terms. +% +% CDDL HEADER START +% +% The contents of this file are subject to the terms of the +% Common Development and Distribution License, Version 1.0 only +% (the "License"). You may not use this file except in compliance +% with the License. +% +% You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE +% or http://www.opensolaris.org/os/licensing. +% See the License for the specific language governing permissions +% and limitations under the License. +% +% When distributing Covered Code, include this CDDL HEADER in each +% file and include the License file at usr/src/OPENSOLARIS.LICENSE. +% If applicable, add the following below this CDDL HEADER, with the +% fields enclosed by brackets "[]" replaced with your own identifying +% information: Portions Copyright [yyyy] [name of copyright owner] +% +% CDDL HEADER END +% +%ident "%Z%%M% %I% %E% SMI" +% +% Version 3.16 prologue for troff files. +% + +/#copies 1 store +/aspectratio 1 def +/formsperpage 1 def +/landscape false def +/linewidth .3 def +/magnification 1 def +/margin 0 def +/orientation 0 def +/resolution 720 def +/xoffset 0 def +/yoffset 0 def + +/roundpage true def +/useclippath true def +/pagebbox [0 0 612 792] def + +/R /Times-Roman def +/I /Times-Italic def +/B /Times-Bold def +/BI /Times-BoldItalic def +/H /Helvetica def +/HI /Helvetica-Oblique def +/HB /Helvetica-Bold def +/HX /Helvetica-BoldOblique def +/CW /Courier def +/CO /Courier def +/CI /Courier-Oblique def +/CB /Courier-Bold def +/CX /Courier-BoldOblique def +/PA /Palatino-Roman def +/PI /Palatino-Italic def +/PB /Palatino-Bold def +/PX /Palatino-BoldItalic def +/Hr /Helvetica-Narrow def +/Hi /Helvetica-Narrow-Oblique def +/Hb /Helvetica-Narrow-Bold def +/Hx /Helvetica-Narrow-BoldOblique def +/KR /Bookman-Light def +/KI /Bookman-LightItalic def +/KB /Bookman-Demi def +/KX /Bookman-DemiItalic def +/AR /AvantGarde-Book def +/AI /AvantGarde-BookOblique def +/AB /AvantGarde-Demi def +/AX /AvantGarde-DemiOblique def +/NR /NewCenturySchlbk-Roman def +/NI /NewCenturySchlbk-Italic def +/NB /NewCenturySchlbk-Bold def +/NX /NewCenturySchlbk-BoldItalic def +/ZD /ZapfDingbats def +/ZI /ZapfChancery-MediumItalic def +/VR /Varitimes#Roman def +/VI /Varitimes#Italic def +/VB /Varitimes#Bold def +/VX /Varitimes#BoldItalic def +/S /S def +/S1 /S1 def +/GR /Symbol def + +/inch {72 mul} bind def +/min {2 copy gt {exch} if pop} bind def + +/setup { + counttomark 2 idiv {def} repeat pop + + landscape {/orientation 90 orientation add def} if + /scaling 72 resolution div def + linewidth setlinewidth + 1 setlinecap + + pagedimensions + xcenter ycenter translate + orientation neg rotate + width 2 div neg height 2 div translate + xoffset inch yoffset inch translate + margin 2 div dup neg translate + magnification dup aspectratio mul scale + scaling scaling scale + + /Symbol /S Sdefs cf + /Times-Roman /S1 S1defs cf + 0 0 moveto +} def + +/pagedimensions { + useclippath userdict /gotpagebbox known not and { + /pagebbox [clippath pathbbox newpath] def + roundpage currentdict /roundpagebbox known and {roundpagebbox} if + } if + pagebbox aload pop + 4 -1 roll exch 4 1 roll 4 copy + landscape {4 2 roll} if + sub /width exch def + sub /height exch def + add 2 div /xcenter exch def + add 2 div /ycenter exch def + userdict /gotpagebbox true put +} def + +/pagesetup { + /page exch def + currentdict /pagedict known currentdict page known and { + page load pagedict exch get cvx exec + } if +} def + +/decodingdefs [ + {counttomark 2 idiv {y moveto show} repeat} + {neg /y exch def counttomark 2 idiv {y moveto show} repeat} + {neg moveto {2 index stringwidth pop sub exch div 0 32 4 -1 roll widthshow} repeat} + {neg moveto {spacewidth sub 0.0 32 4 -1 roll widthshow} repeat} + {counttomark 2 idiv {y moveto show} repeat} + {neg setfunnytext} +] def + +/setdecoding {/t decodingdefs 3 -1 roll get bind def} bind def + +/w {neg moveto show} bind def +/m {neg dup /y exch def moveto} bind def +/done {/lastpage where {pop lastpage} if} def + +/f { + dup /font exch def findfont exch + dup /ptsize exch def scaling div dup /size exch def scalefont setfont + linewidth ptsize mul scaling 10 mul div setlinewidth + /spacewidth ( ) stringwidth pop def +} bind def + +/changefont { + /fontheight exch def + /fontslant exch def + currentfont [ + 1 0 + fontheight ptsize div fontslant sin mul fontslant cos div + fontheight ptsize div + 0 0 + ] makefont setfont +} bind def + +/sf {f} bind def + +/cf { + dup length 2 idiv + /entries exch def + /chtab exch def + /newfont exch def + + findfont dup length 1 add dict + /newdict exch def + {1 index /FID ne {newdict 3 1 roll put} {pop pop} ifelse} forall + + newdict /Metrics entries dict put + newdict /Metrics get + begin + chtab aload pop + 1 1 entries {pop def} for + newfont newdict definefont pop + end +} bind def + +% +% A few arrays used to adjust reference points and character widths in some +% of the printer resident fonts. If square roots are too high try changing +% the lines describing /radical and /radicalex to, +% +% /radical [0 -75 550 0] +% /radicalex [-50 -75 500 0] +% + +/Sdefs [ + /bracketlefttp [220 500] + /bracketleftbt [220 500] + /bracketrighttp [-70 380] + /bracketrightbt [-70 380] + /braceleftbt [220 490] + /bracketrightex [220 -125 500 0] + /radical [0 0 550 0] + % NeWSprint's \(br is too low, compensate + statusdict /product get (NeWS Server) eq { + /radicalex [-50 100 500 0] + /parenleftex [-20 100 0 0] + + } { + /radicalex [-50 0 500 0] + /parenleftex [-20 -170 0 0] + } ifelse + /integral [100 -50 500 0] + /infinity [10 -75 730 0] +] def + +/S1defs [ + /underscore [0 80 500 0] + /endash [7 90 650 0] +] def %%EndProlog +%%BeginSetup +mark +/resolution 720 def +setup +2 setdecoding +%%EndSetup %%Page: 1 1 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF 363.3(ISOINFO\(8\) ISOINFO\(8\))72 48 R/F1 10.95 -/Times-Bold@0 SF -.219(NA)72 84 S(ME).219 E F0(de)108 96 Q -(vdump, isoinfo, iso)-.25 E(vfy)-.15 E 2.5(,i)-.65 G -(sodump \255 Utility programs for dumping and v)-2.5 E -(erifying iso9660 images.)-.15 E F1(SYNOPSIS)72 112.8 Q/F2 10 -/Times-Bold@0 SF(de)108 124.8 Q(vdump)-.15 E/F3 10/Times-Italic@0 SF -(isoima)2.5 E -.1(ge)-.1 G F2(isodump)108 141.6 Q F3(isoima)2.5 E -.1 -(ge)-.1 G F2(isoinf)108 158.4 Q(o)-.25 E F0([)2.517 E F22.517 E F0 -2.517(][)2.517 G F2A F0 2.517(][)2.517 G F2A F0 2.517(][) -2.517 G F2A F0 2.517(][)2.517 G F2A F3 -.15(ch)2.517 G(ar) -.15 E(set)-.1 E F0 2.517(][)2.517 G F2A F0 2.517(][)2.517 G F2 -A F0 2.516(][)2.517 G F2A F0 2.516(][)2.516 G F2A F3 -(sector)2.516 E F0 2.516(][)2.516 G F2A F3(sector)2.516 E F0 2.516 -(][)2.516 G F2A F3(isoima)2.516 E -.1(ge)-.1 G F0 2.516(][)2.616 G -F2108 170.4 Q F3(path)2.5 E F0(])2.5 E F2(iso)108 187.2 Q(vfy)-.1 -E F3(isoima)2.5 E -.1(ge)-.1 G F1(DESCRIPTION)72 204 Q F2(de)108 216 Q -(vdump)-.15 E F0 .488(is a crude utility to interacti)2.988 F -.15(ve) --.25 G .489(ly display the contents of de).15 F .489 -(vice or \214lesystem images.)-.25 F .489(The initial)5.489 F .482(scre\ -en is a display of the \214rst 256 bytes of the \214rst 2048 byte secto\ -r)108 228 R 5.481(.T)-.55 G .481(he commands are the same as with)-5.481 -F F2(isodump)108 240 Q F0(.)A F2(isodump)108 256.8 Q F0 .691 -(is a crude utility to interacti)3.191 F -.15(ve)-.25 G .691 -(ly display the contents of iso9660 images in order to v).15 F .692 -(erify direc-)-.15 F .09(tory inte)108 268.8 R(grity)-.15 E 5.09(.T)-.65 -G .09(he initial screen is a display of the \214rst part of the root di\ -rectory)-5.09 F 2.59(,a)-.65 G .09(nd the prompt sho)-2.59 F .09(ws you) --.25 F(the e)108 280.8 Q(xtent number and of)-.15 E(fset in the e)-.25 E -(xtent.)-.15 E -1.1(Yo)144 297.6 S 2.691(uc)1.1 G .191 -(an use the 'a' and 'b' commands to mo)-2.691 F .491 -.15(ve b)-.15 H -(ackw).15 E .191(ards and forw)-.1 F .192 -(ards within the image. The 'g')-.1 F .492(command allo)144 309.6 R .492 -(ws you to goto an arbitrary e)-.25 F .491(xtent, and the 'f)-.15 F -2.991('c).55 G .491(ommand speci\214es a search string to)-2.991 F .418 -(be used. The '+' command searches forw)144 321.6 R .418(ard for the ne) --.1 F .418(xt instance of the search string, and the 'q')-.15 F -(command e)144 333.6 Q(xits)-.15 E F2(de)2.5 E(vdump)-.15 E F0(or)2.5 E -F2(isodump)2.5 E F0(.)A F2(isoinf)108 350.4 Q(o)-.25 E F0 -(is a utility to perform directory lik)2.5 E 2.5(el)-.1 G -(istings of iso9660 images.)-2.5 E F2(iso)108 367.2 Q(vfy)-.1 E F0 .752 -(is a utility to v)3.252 F .752(erify the inte)-.15 F .752 -(grity of an iso9660 image. Most of the tests in)-.15 F F2(iso)3.252 E -(vfy)-.1 E F0 .752(were added after)3.252 F -.2(bu)108 379.2 S .534 -(gs were disco).2 F -.15(ve)-.15 G .534(red in early v).15 F .534 -(ersions of)-.15 F F2(mkisofs.)3.034 E F0 .534(It isn')5.534 F 3.034(ta) --.18 G .534(ll that clear ho)-3.034 F 3.034(wu)-.25 G .535 -(seful this is an)-3.034 F .535(ymore, b)-.15 F .535(ut it)-.2 F(doesn') -108 391.2 Q 2.5(th)-.18 G(urt to ha)-2.5 E .3 -.15(ve t)-.2 H -(his around.).15 E F1(OPTIONS)72 420 Q F0(Only the)108 432 Q F2(isoinf) -2.5 E(o)-.25 E F0(program has an)2.5 E 2.5(yc)-.15 G -(ommand line options. These are:)-2.5 E F2108 448.8 Q F0 -(print a summary of all options.)24.74 E F2108 465.6 Q F0 .523 -(Print information from the primary v)24.74 F .522 -(olume descriptor \(PVD\) of the iso9660 image. This includes)-.2 F -(information about Rock Ridge and Joliet e)144 477.6 Q -(xtensions if present.)-.15 E F2108 494.4 Q F0 .181(generate outp\ -ut as if a '\214nd . -print' command had been run on the iso9660 image.\ - Y)26.97 F .182(ou should not)-1.1 F(use the)144 506.4 Q F2(-l)2.5 E F0 -(image with the)2.5 E F2(-f)2.5 E F0(option.)2.5 E F2(\255i iso_image) -108 523.2 Q F0 -(Speci\214es the path of the iso9660 image that we wish to e)144 535.2 Q -(xamine.)-.15 E F2108 552 Q F0 .465(generate output as if a ') -27.52 F .464(ls -lR' command had been run on the iso9660 image.)-.1 F --1.1(Yo)5.464 G 2.964(us)1.1 G .464(hould not use)-2.964 F(the)144 564 Q -F2(-f)2.5 E F0(image with the)2.5 E F2(-l)2.5 E F0(option.)2.5 E F2 -(\255N sector)108 580.8 Q F0 .527(Quick hack to help e)144 592.8 R .527 -(xamine single session disc \214les that are to be written to a multi-s\ -ession disc.)-.15 F 1.015(The sector number speci\214ed is the sector n\ -umber at which the iso9660 image should be written)144 604.8 R -(when send to the cd-writer)144 616.8 Q 2.5(.N)-.55 G -(ot used for the \214rst session on the disc.)-2.5 E F2108 633.6 Q -F0(Print path table information.)24.74 E F2108 650.4 Q F0 .325 -(Extract information from Rock Ridge e)23.08 F .326 -(xtensions \(if present\) for permissions, \214le names and o)-.15 F -(wn-)-.25 E(erships.)144 662.4 Q F2108 679.2 Q F0 -(Extract information from Joliet e)25.3 E -(xtensions \(if present\) for \214le names.)-.15 E F2(\255j charset)108 -696 Q F0(Con)144 708 Q -.15(ve)-.4 G -(rt Joliet \214le names \(if present\) to the supplied charset. See).15 -E F2(mkisofs)2.5 E F0(\(8\) for details.)A -1.11(Ve)72 768 S(rsion 2.0) -1.11 E 208.72(02/12/24 1)170.67 F EP +save +mark +1 pagesetup +10 R f +( \( 8 \))3 164( ISOINFO)1 3525(Maintenance Procedures)1 991 3 720 480 t +9 B f +(NAME)720 960 w +10 R f +(devdump, isoinfo, isovfy, isodump)3 1419 1 1080 1080 t +10 S1 f +(\261)2532 1080 w +10 R f +(Utility programs for dumping and verifying iso9660 images.)7 2477 1 2630 1080 t +9 B f +(SYNOPSIS)720 1248 w +10 B f +(devdump)1080 1368 w +10 I f +(isoimage)1514 1368 w +10 B f +(isodump)1080 1536 w +10 I f +(isoimage)1481 1536 w +10 B f +(isoinfo)1080 1704 w +10 R f +([)1401 1704 w +10 S1 f +(\261)1471 1704 w +10 B f +(d)1536 1704 w +10 R f +(] [)1 103 1 1629 1704 t +10 S1 f +(\261)1769 1704 w +10 B f +(h)1834 1704 w +10 R f +(] [)1 103 1 1927 1704 t +10 S1 f +(\261)2067 1704 w +10 B f +(R)2132 1704 w +10 R f +(] [)1 103 1 2241 1704 t +10 S1 f +(\261)2381 1704 w +10 B f +(J)2446 1704 w +10 R f +(] [)1 103 1 2533 1704 t +10 S1 f +(\261)2673 1704 w +10 B f +(j)2738 1704 w +10 I f +(charset)2808 1704 w +10 R f +(] [)1 103 1 3139 1704 t +10 S1 f +(\261)3279 1704 w +10 B f +(f)3344 1704 w +10 R f +(] [)1 103 1 3414 1704 t +10 S1 f +(\261)3554 1704 w +10 B f +(l)3619 1704 w +10 R f +(] [)1 103 1 3684 1704 t +10 S1 f +(\261)3824 1704 w +10 B f +(p)3889 1704 w +10 R f +(] [)1 103 1 3982 1704 t +10 S1 f +(\261)4122 1704 w +10 B f +(T)4187 1704 w +10 I f +(sector)4291 1704 w +10 R f +(] [)1 103 1 4572 1704 t +10 S1 f +(\261)4712 1704 w +10 B f +(N)4777 1704 w +10 I f +(sector)4886 1704 w +10 R f +(] [)1 103 1 5167 1704 t +10 S1 f +(\261)5307 1704 w +10 B f +(i)5372 1704 w +10 I f +(isoimage)1080 1824 w +10 R f +(] [)1 99 1 1474 1824 t +10 S1 f +(\261)1606 1824 w +10 B f +(x)1671 1824 w +10 I f +(path)1754 1824 w +10 R f +(])1965 1824 w +10 B f +(isovfy)1080 1992 w +10 I f +(isoimage)1363 1992 w +9 B f +(DESCRIPTION)720 2160 w +10 B f +(devdump)1080 2280 w +10 R f +( ini-)1 174( The)1 223(is a crude utility to interactively display the contents of device or \256lesystem images.)13 3488 3 1515 2280 t +( commands are the same)4 1029( The)1 225( \256rst 2048 byte sector.)4 939(tial screen is a display of the \256rst 256 bytes of the)11 2127 4 1080 2400 t +(as with)1 294 1 1080 2520 t +10 B f +(isodump)1407 2520 w +10 R f +(.)1775 2520 w +10 B f +(isodump)1080 2688 w +10 R f +( in order to verify)4 800(is a crude utility to interactively display the contents of iso9660 images)11 3104 2 1496 2688 t +( directory, and the prompt)4 1092( initial screen is a display of the \256rst part of the root)12 2238( The)1 227(directory integrity.)1 763 4 1080 2808 t +(shows you the extent number and offset in the extent.)9 2208 1 1080 2928 t +( and forwards within the image. The)6 1516(You can use the 'a' and 'b' commands to move backwards)10 2444 2 1440 3096 t +( allows you to goto an arbitrary extent, and the 'f' command speci\256es a search)14 3404('g' command)1 556 2 1440 3216 t +( of the search string,)4 860(string to be used. The '+' command searches forward for the next instance)12 3100 2 1440 3336 t +(and the 'q' command exits)4 1097 1 1440 3456 t +10 B f +(devdump)2570 3456 w +10 R f +(or)3004 3456 w +10 B f +(isodump)3120 3456 w +10 R f +(.)3488 3456 w +10 B f +(isoinfo)1080 3624 w +10 R f +(is a utility to perform directory like listings of iso9660 images.)10 2588 1 1397 3624 t +10 B f +(isovfy)1080 3792 w +10 R f +( the integrity of an iso9660 image. Most of the tests in)11 2375(is a utility to verify)4 839 2 1373 3792 t +10 B f +(isovfy)4631 3792 w +10 R f +(were added)1 475 1 4925 3792 t +(after bugs were discovered in early versions of)7 1920 1 1080 3912 t +10 B f +(mkisofs.)3033 3912 w +10 R f +(It isn't all that clear how useful this is anymore,)9 1981 1 3419 3912 t +(but it doesn't hurt to have this around.)7 1583 1 1080 4032 t +9 B f +(OPTIONS)720 4320 w +10 R f +(The options common to all programs are)6 1698 1 1080 4440 t +10 S1 f +(\261)2815 4440 w +10 B f +(help)2880 4440 w +10 R f +(,)3064 4440 w +10 S1 f +(\261)3089 4440 w +10 B f +(h)3154 4440 w +10 R f +(,)3210 4440 w +10 S1 f +(\261)3235 4440 w +10 B f +(version)3300 4440 w +10 R f +(,)3611 4440 w +10 B f +(i)3673 4440 w +10 I f +(=name,)3701 4440 w +10 B f +(dev)4018 4440 w +10 I f +(=name.)4168 4440 w +10 R f +(The)4547 4440 w +10 B f +(isoinfo)4740 4440 w +10 R f +(program)5062 4440 w +(has additional command line options. The options are:)7 2227 1 1080 4560 t +10 S1 f +(\261)1080 4728 w +10 B f +(help)1145 4728 w +10 S1 f +(\261)1080 4896 w +10 B f +(h)1145 4896 w +10 R f +(print a summary of all options.)5 1273 1 1440 4896 t +10 S1 f +(\261)1080 5064 w +10 B f +(d)1145 5064 w +10 R f +( descriptor \(PVD\) of the iso9660 image. This)7 2061(Print information from the primary volume)5 1899 2 1440 5064 t +( information if)2 651(includes information about Rock Ridge, Joliet extensions and Eltorito boot)9 3309 2 1440 5184 t +(present.)1440 5304 w +10 S1 f +(\261)1080 5472 w +10 B f +(f)1145 5472 w +10 R f +( had been run on the iso9660 image. You should)9 2036(generate output as if a '\256nd . -print' command)8 1924 2 1440 5472 t +(not use the)2 449 1 1440 5592 t +10 B f +(-l)1922 5592 w +10 R f +(image with the)2 610 1 2016 5592 t +10 B f +(-f)2659 5592 w +10 R f +(option.)2758 5592 w +10 S1 f +(\261)1080 5760 w +10 B f +(i iso)1 178 1 1145 5760 t +10 S f +(_)1323 5760 w +10 B f +(image)1373 5760 w +10 R f +( options)1 357( The)1 250( we wish to examine.)4 994(Speci\256es the path of the iso9660 image that)7 1998 4 1440 5880 t +10 S1 f +(\261)5101 5880 w +10 B f +(i)5166 5880 w +10 R f +(and)5256 5880 w +10 B f +(dev=)1440 6000 w +10 I f +(target)1647 6000 w +10 R f +(are mutual exclusive.)2 867 1 1919 6000 t +10 B f +(dev=)1080 6168 w +10 I f +(target)1287 6168 w +10 R f +( device speci\256cation is)3 946( typical)1 309( A)1 142(Sets the SCSI target for the drive, see notes above.)9 2130 4 1440 6288 t +10 B f +(dev=)5005 6288 w +10 I f +(6,0)5212 6288 w +10 R f +(.)5375 6288 w +(If a \256lename must be provided together with the numerical target speci\256cation, the \256lename is)14 3960 1 1440 6408 t +( be found in the system speci\256c)6 1350( correct \256lename in this case can)6 1386( The)1 227(implementation speci\256c.)1 997 4 1440 6528 t +( a)1 79( On)1 190(manuals of the target operating system.)5 1620 3 1440 6648 t +10 I f +(FreeBSD)3364 6648 w +10 R f +(system without)1 619 1 3770 6648 t +10 I f +(CAM)4424 6648 w +10 R f +(support, you need)2 731 1 4669 6648 t +(to use the control device \(e.g.)5 1218 1 1440 6768 t +10 I f +(/dev/rcd0.ctl)2724 6768 w +10 R f +( in this case may be)5 830( correct device speci\256cation)3 1140(\). A)1 196 3 3234 6768 t +10 B f +(dev=)1440 6888 w +10 I f +(/dev/rcd0.ctl:)1647 6888 w +10 S1 f +(@)2182 6888 w +10 R f +(.)2307 6888 w +( Dif-)1 210(On Linux, drives connected to a parallel port adapter are mapped to a virtual SCSI bus.)15 3750 2 1440 7128 t +(ferent adapters are mapped to different targets on this virtual SCSI bus.)11 2933 1 1440 7248 t +( 1)1 1888( change: 09/10/11)2 732( Last)1 1586(Version 3.0)1 474 4 720 7728 t +cleartomark +showpage +restore +%%EndPage: 1 1 %%Page: 2 2 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF 363.3(ISOINFO\(8\) ISOINFO\(8\))72 48 R/F1 10 -/Times-Bold@0 SF(\255T sector)108 84 Q F0 .165(Quick hack to help e)144 -96 R .165(xamine multi-session images that ha)-.15 F .465 -.15(ve a)-.2 -H .165(lready been b).15 F .165(urned to a multi-session)-.2 F .537(dis\ -c. The sector number speci\214ed is the sector number for the start of \ -the session we wish to dis-)144 108 R(play)144 120 Q(.)-.65 E F1 -(\255x pathname)108 136.8 Q F0(Extract speci\214ed \214le to stdout.)144 -148.8 Q/F2 10.95/Times-Bold@0 SF -.548(AU)72 165.6 S(THOR).548 E F0 1.35 -(Eric Y)108 177.6 R 1.349(oungdale \ - or is to blame for these shoddy hacks.)-.15 F --.15(Pa)108 189.6 S(tches to impro).15 E .3 -.15(ve g)-.15 H -(eneral usability w).15 E(ould be gladly accepted.)-.1 E F2 -.11(BU)72 -206.4 S(GS).11 E F0(The user interf)108 218.4 Q(ace really sucks.)-.1 E -F2(FUTURE IMPR)72 235.2 Q -.548(OV)-.329 G(EMENTS).548 E F0 1.09 -(These utilities are really quick hacks, which are v)108 247.2 R 1.09 -(ery useful for deb)-.15 F 1.09(ugging problems in mkisofs or in an)-.2 -F .889(iso9660 \214lesystem. In the long run, it w)108 259.2 R .889 -(ould be nice to ha)-.1 F 1.189 -.15(ve a d)-.2 H .889(aemon that w).15 -F .889(ould NFS e)-.1 F .889(xport a iso9660)-.15 F(image.)108 271.2 Q(\ -The isoinfo program is probably the program that is of the most use to \ -the general user)108 288 Q(.)-.55 E F2 -1.04 -1.588(AV A)72 304.8 T -(ILABILITY)1.588 E F0 4.926(These utilities come with the mkisofs packa\ -ge, and the primary ftp site is tsx-11.mit.edu in)108 316.8 R -(/pub/linux/BET)108 328.8 Q(A/cdrom/mkisofs and man)-.93 E 2.5(yo)-.15 G -(ther mirror sites. Despite the name, the softw)-2.5 E(are is not beta.) --.1 E F2(SEE ALSO)72 345.6 Q F0(mkisofs\(8\))108 357.6 Q -1.11(Ve)72 768 -S(rsion 2.0)1.11 E 208.72(02/12/24 2)170.67 F EP +save +mark +2 pagesetup +10 R f +( \( 8 \))3 164( ISOINFO)1 3525(Maintenance Procedures)1 991 3 720 480 t +(If no)1 212 1 1440 960 t +10 I f +(dev)1698 960 w +10 R f +( device from the)3 717(option is present, the program will try to get the)9 2099 2 1882 960 t +10 B f +(CDR)4745 960 w +10 S f +(_)4961 960 w +10 B f +(DEVICE)5011 960 w +10 R f +(environment.)1440 1080 w +(If the argument to the)4 905 1 1440 1320 t +10 B f +(dev=)2380 1320 w +10 R f +(option does not contain the characters ',', '/', ')8 1934 1 2622 1320 t +10 S1 f +(@)4556 1320 w +10 R f +( it is inter-)3 447(' or ':',)2 305 2 4648 1320 t +(preted as an label name that may be found in the \256le /etc/default/cdrecord \(see FILES section\).)15 3901 1 1440 1440 t +(The options)1 483 1 1440 1680 t +10 S1 f +(\261)1956 1680 w +10 B f +(i)2021 1680 w +10 R f +(and)2082 1680 w +10 B f +(dev=)2259 1680 w +10 I f +(target)2466 1680 w +10 R f +(are mutual exclusive.)2 867 1 2738 1680 t +10 S1 f +(\261)1080 1848 w +10 B f +(debug)1145 1848 w +10 R f +( has)1 168(Print additional debug information. This enables e.g. printing of all directory entries if a \256le)14 3792 2 1440 1848 t +( of more information from the primary volume)7 2077(more than one directory entry and printing)6 1883 2 1440 1968 t +(descriptor.)1440 2088 w +(In debug mode, Rock Ridge information is parsed with)8 2265 1 1440 2328 t +10 S1 f +(\261)3738 2328 w +10 B f +(R)3803 2328 w +10 R f +(even if it is not standard compliant.)6 1461 1 3908 2328 t +10 S1 f +(\261)1080 2496 w +10 B f +(l)1145 2496 w +10 R f +( should not)2 473( You)1 244( iso9660 image.)2 664(generate output as if a 'ls -lR' command had been run on the)12 2579 4 1440 2496 t +(use the)1 288 1 1440 2616 t +10 B f +(-f)1761 2616 w +10 R f +(image with the)2 610 1 1860 2616 t +10 B f +(-l)2503 2616 w +10 R f +(option.)2597 2616 w +10 S1 f +(\261)1080 2784 w +10 B f +(N sector)1 359 1 1145 2784 t +10 R f +( help examine single session disc \256les that are to be written to a multi-session)14 3364(Quick hack to)2 596 2 1440 2904 t +( be)1 135(disc. The sector number speci\256ed is the sector number at which the iso9660 image should)14 3825 2 1440 3024 t +(written when send to the cd-writer. Not used for the \256rst session on the disc.)14 3158 1 1440 3144 t +10 S1 f +(\261)1080 3312 w +10 B f +(p)1145 3312 w +10 R f +(Print path table information.)3 1157 1 1440 3312 t +10 S1 f +(\261)1080 3480 w +10 B f +(R)1145 3480 w +10 R f +( Ridge extensions \(if present\) for permissions, \256le names and)9 2654(Extract information from Rock)3 1306 2 1440 3480 t +(ownerships.)1440 3600 w +10 S1 f +(\261)1080 3768 w +10 B f +(J)1145 3768 w +10 R f +(Extract information from Joliet extensions \(if present\) for \256le names.)9 2829 1 1440 3768 t +10 S1 f +(\261)1080 3936 w +10 B f +(j charset)1 376 1 1145 3936 t +10 R f +(Convert Joliet \256le names \(if present\) to the supplied charset. See)10 2657 1 1440 4056 t +10 B f +(mkisofs)4130 4056 w +10 R f +(\(8\) for details.)2 584 1 4458 4056 t +10 S1 f +(\261)1080 4224 w +10 B f +(T sector)1 354 1 1145 4224 t +10 R f +( a multi-)2 385(Quick hack to help examine multi-session images that have already been burned to)12 3575 2 1440 4344 t +( number for the start of the session we)8 1661(session disc. The sector number speci\256ed is the sector)8 2299 2 1440 4464 t +(wish to display.)2 647 1 1440 4584 t +10 S1 f +(\261)1080 4752 w +10 B f +(x pathname)1 511 1 1145 4752 t +10 R f +(Extract speci\256ed \256le to stdout.)4 1251 1 1440 4872 t +9 B f +(AUTHOR)720 5040 w +10 R f +( 1998\) is Eric Youngdale)4 1148( . .)2 82( original sources \(1993 .)4 1112(The author of the)3 795 4 1080 5160 t +10 S1 f +(<)4278 5160 w +10 R f +(ericy)4334 5160 w +10 S1 f +(@)4533 5160 w +10 R f +(gnu.ai.mit.edu)4625 5160 w +10 S1 f +(>)5200 5160 w +10 R f +(or)5317 5160 w +10 S1 f +(<)1080 5280 w +10 R f +(eric)1136 5280 w +10 S1 f +(@)1285 5280 w +10 R f +(andante.jic.com)1377 5280 w +10 S1 f +(>)2009 5280 w +10 R f +( J)1 118( for these shoddy hacks.)4 1046(is to blame)2 483 3 2112 5280 t +(. .)1 47 1 3759 5225 t +(org Schilling wrote the SCSI transport)5 1641 1 3759 5280 t +( programs and newer parts \(starting from 1999\) of the utilities, this)11 2790(library and its adaptation layer to the)6 1530 2 1080 5400 t +(makes them Copyright \(C\) 1999-2004 J)5 1701 1 1080 5520 t +(. .)1 47 1 2781 5465 t +( to improve general usability would be)6 1669( Patches)1 384(org Schilling.)1 566 3 2781 5520 t +(gladly accepted.)1 656 1 1080 5640 t +9 B f +(BUGS)720 5808 w +10 R f +(The user interface really sucks.)4 1275 1 1080 5928 t +9 B f +(FUTURE IMPROVEMENTS)1 1170 1 720 6096 t +10 R f +( an)1 131(These utilities are really quick hacks, which are very useful for debugging problems in mkisofs or in)16 4189 2 1080 6216 t +( daemon that would NFS export a iso9660)7 1747(iso9660 \256lesystem. In the long run, it would be nice to have a)12 2573 2 1080 6336 t +(image.)1080 6456 w +(The isoinfo program is probably the program that is of the most use to the general user.)16 3615 1 1080 6624 t +9 B f +(AVAILABILITY)720 6792 w +10 R f +(These utilities come with the)4 1191 1 1080 6912 t +10 B f +(cdrtools)2305 6912 w +10 R f +( in /pub/cdrecord)2 702(package, and the primary ftp site is ftp.berlios.de)7 2015 2 2683 6912 t +(and many other mirror sites. Despite the name, the software is not beta.)12 2944 1 1080 7032 t +( 2)1 1888( change: 09/10/11)2 732( Last)1 1586(Version 3.0)1 474 4 720 7680 t +cleartomark +showpage +restore +%%EndPage: 2 2 +%%Page: 3 3 +save +mark +3 pagesetup +10 R f +( \( 8 \))3 164( ISOINFO)1 3525(Maintenance Procedures)1 991 3 720 480 t +9 B f +(ENVIRONMENT)720 960 w +10 B f +(CDR)1080 1080 w +10 S f +(_)1296 1080 w +10 B f +(DEVICE)1346 1080 w +10 R f +( call of the SCSI transport)5 1126(This may either hold a device identi\256er that is suitable to the open)12 2834 2 1440 1200 t +(library or a label in the \256le /etc/default/cdrecord.)7 1996 1 1440 1320 t +10 B f +(RSH)1080 1488 w +10 R f +(If the)1 227 1 1440 1488 t +10 B f +(RSH)1706 1488 w +10 R f +(environment is present, the remote connection will not be created via)10 2899 1 1951 1488 t +10 B f +(rcmd)4889 1488 w +10 R f +(\(3\) but)1 284 1 5116 1488 t +( by)1 137(by calling the program pointed to)5 1400 2 1440 1608 t +10 B f +(RSH)3014 1608 w +10 R f +( e.g.)1 181(. Use)1 250 2 3220 1608 t +10 B f +(RSH=)3688 1608 w +10 R f +(/usr/bin/ssh to create a secure shell)5 1449 1 3951 1608 t +(connection.)1440 1728 w +(Note that this forces the program to create a pipe to the)11 2330 1 1440 1968 t +10 B f +(rsh\(1\))3807 1968 w +10 R f +(program and disallows the pro-)4 1300 1 4100 1968 t +( makes it impossible to)4 991( This)1 253( socket to the remote server.)5 1210(gram to directly access the network)5 1506 4 1440 2088 t +( parameters and slows down the connection compared to a)9 2547(set up performance)2 810 2 1440 2208 t +10 B f +(root)4846 2208 w +10 R f +(initiated)5072 2208 w +10 B f +(rcmd\(3\))1440 2328 w +10 R f +(connection.)1816 2328 w +10 B f +(RSCSI)1080 2496 w +10 R f +(If the)1 252 1 1440 2496 t +10 B f +(RSCSI)1756 2496 w +10 R f +( not be the program)4 942(environment is present, the remote SCSI server will)7 2343 2 2115 2496 t +10 B f +(/opt/schily/sbin/rscsi)1440 2616 w +10 R f +(but the program pointed to by)5 1251 1 2346 2616 t +10 B f +(RSCSI)3633 2616 w +10 R f +( that the remote SCSI server)5 1184(. Note)1 288 2 3928 2616 t +(program name will be ignored if you log in using an account that has been created with a)17 3960 1 1440 2736 t +(remote SCSI server program as login shell.)6 1771 1 1440 2856 t +9 B f +(FILES)720 3144 w +10 R f +(/etc/default/cdrecord)1080 3264 w +(Default values can be set for the following options in /etc/default/cdrecord.)10 3077 1 1440 3384 t +(CDR)1440 3552 w +10 S f +(_)1646 3552 w +10 R f +(DEVICE)1696 3552 w +( is suitable to the open call of the SCSI)9 1729(This may either hold a device identi\256er that)7 1871 2 1800 3672 t +( identify a)2 455(transport library or a label in the \256le /etc/default/cdrecord that allows to)11 3145 2 1800 3792 t +(speci\256c drive on the system.)4 1167 1 1800 3912 t +(Any other label)2 637 1 1440 4080 t +( contain)1 335( an identi\256er may not)4 915( Such)1 273(is an identi\256er for a speci\256c drive on the system.)9 2077 4 1800 4200 t +(the characters ',', '/', ')4 925 1 1800 4320 t +10 S1 f +(@)2725 4320 w +10 R f +(' or ':'.)2 301 1 2817 4320 t +( four)1 206( Currently,)1 481( contains a TAB separated list of items.)7 1681(Each line that follows a label)5 1232 4 1800 4560 t +( SCSI ID of the drive, the default speed that should be used)12 2552(items are recognized: the)3 1048 2 1800 4680 t +( this drive and drive)4 923(for this drive, the default FIFO size that should be used for)11 2677 2 1800 4800 t +(speci\256c options. The values for)4 1303 1 1800 4920 t +10 I f +(speed)3140 4920 w +10 R f +(and)3404 4920 w +10 I f +(\256fosize)3585 4920 w +10 R f +(may be set to -1 to tell the program)8 1500 1 3900 4920 t +( may be set to)4 619( value for driveropts)3 857( The)1 228(to use the global defaults.)4 1084 4 1800 5040 t +10 S1 f +("")4629 5040 w +10 R f +(if no driveropts)2 648 1 4752 5040 t +( typical line may look this way:)6 1309( A)1 138(are used.)1 362 3 1800 5160 t +( 8m)1 438( 4)1 271(teac1= 0,5,0)1 499 3 1800 5400 t +10 S1 f +("")3240 5400 w +10 R f +( -1 burnfree)2 974( -1)1 204(yamaha= 1,6,0)1 599 3 1800 5640 t +(This tells the program that a drive named)7 1792 1 1800 5880 t +10 I f +(teac1)3638 5880 w +10 R f +( target 5, lun 0 and)5 859(is at scsibus 0,)3 641 2 3900 5880 t +( second drive may be found)5 1156( A)1 140( MB.)1 216(should be used with speed 4 and a FIFO size of 8)11 2088 4 1800 6000 t +(at scsibus 1, target 6, lun 0 and uses the default speed and the default FIFO size.)16 3326 1 1800 6120 t +9 B f +(SEE ALSO)1 460 1 720 6288 t +10 B f +(mkisofs)1080 6408 w +10 R f +(\(8\),)1408 6408 w +10 B f +(cdrecord)1582 6408 w +10 R f +(\(1\),)1964 6408 w +10 B f +(readcd)2138 6408 w +10 R f +(\(1\),)2432 6408 w +10 B f +(scg)2606 6408 w +10 R f +(\(7\),)2739 6408 w +10 B f +(rcmd)2913 6408 w +10 R f +(\(3\),)3140 6408 w +10 B f +(ssh)3314 6408 w +10 R f +(\(1\).)3448 6408 w +( 3)1 1888( change: 09/10/11)2 732( Last)1 1586(Version 3.0)1 474 4 720 7680 t +cleartomark +showpage +restore +%%EndPage: 3 3 %%Trailer -end -%%EOF +done +%%DocumentFonts: Times-Roman Times-Bold Times-Italic Symbol +%%Pages: 3 diff -Nru cdrtools-2.01.01a33/doc/mkisofs.man cdrtools-3.02a09/doc/mkisofs.man --- cdrtools-2.01.01a33/doc/mkisofs.man 2002-12-24 15:57:41.000000000 +0000 +++ cdrtools-3.02a09/doc/mkisofs.man 2010-05-30 15:51:35.000000000 +0000 @@ -1,2179 +1,3498 @@ -MKISOFS(8) MKISOFS(8) + + + +Maintenance Procedures MKISOFS(8) NNAAMMEE - mkisofs - create an hybrid ISO9660/JOLIET/HFS filesystem - with optional Rock Ridge attributes. + mkisofs - create an hybrid ISO-9660/JOLIET/HFS/UDF + filesystem-image with optional Rock Ridge attributes. + +SSYYNNOOPPSSIISS + mmkkiissooffss [ _o_p_t_i_o_n_s ] [ -oo _f_i_l_e_n_a_m_e ] _p_a_t_h_s_p_e_c [_p_a_t_h_s_p_e_c ...] + mmkkiissooffss [ _o_p_t_i_o_n_s ] [ -oo _f_i_l_e_n_a_m_e ] -ffiinndd [_f_i_n_d _e_x_p_r_e_s_s_i_o_n] + +DDEESSCCRRIIPPTTIIOONN + mmkkiissooffss is effectively a pre-mastering program to generate + an ISO-9660/JOLIET/HFS/UDF hybrid filesystem. + + ISO-9660/JOLIET/UDF filesystems are limited to a maximum + size of 8 TB. The maximum size of a single file is 8 TB + (single files in UDF are currently limited to aprox. + 200 GB). If yo like to have files larger than 2 GB, you + need to specify -iissoo-lleevveell 33 or above. If a HFS hybrid is + created, the maximum file size for files in the HFS hybrid + is 2 GB in any case. + + HHyybbrriidd ffiilleessyysstteemm ssuuppppoorrtt + mmkkiissooffss is capable of generating the SSyysstteemm UUssee SShhaarriinngg PPrroo-- + ttooccooll rreeccoorrddss ((SSUUSSPP)) specified by the RRoocckk RRiiddggee IInntteerrcchhaannggee + PPrroottooccooll.. This is used to further describe the files in the + ISO-9660 filesystem to a unix host, and provides information + such as longer filenames, uid/gid, posix permissions, sym- + bolic links, hard links, block and character devices. + + If Joliet, HFS or UDF hybrid command line options are speci- + fied, mmkkiissooffss will create additional separate filesystem + meta data for Joliet, HFS or UDF. The file content in this + case refers to the same data blocks on the media. It will + generate a pure ISO-9660 filesystem unless the Joliet, HFS + or UDF hybrid command line options are given. + + mmkkiissooffss can generate a _t_r_u_e (or _s_h_a_r_e_d) HFS hybrid filesys- + tem. The same files are seen as HFS files when accessed from + a Macintosh and as ISO-9660 files when accessed from other + machines. HFS stands for _H_i_e_r_a_r_c_h_i_c_a_l _F_i_l_e _S_y_s_t_e_m and is the + native file system used on Macintosh computers up to + Mac OS 9. + + As an alternative, mmkkiissooffss can generate the _A_p_p_l_e _E_x_t_e_n_s_i_o_n_s + _t_o _I_S_O-_9_6_6_0 or _U_D_F for each file. These extensions provide + each file with CREATOR, TYPE and certain Finder Flags when + accessed from a Macintosh. See the HHFFSS MMAACCIINNTTOOSSHH FFIILLEE FFOORR-- + MMAATTSS section below. + + FFuunnccttiioonnaall ddeessccrriippttiioonn + mmkkiissooffss takes a snapshot of a given directory tree, and gen- + erates a binary image which will correspond to an ISO-9660 + or Joliet/HFS/UDF filesystem when written to a block device. + + + +Version 3.0 Last change: 2010/04/25 1 + + + + + + +Maintenance Procedures MKISOFS(8) + + + + Each file written to the ISO-9660 filesystem must have a + filename in the 8.3 format (8 characters, period, 3 charac- + ters, all upper case), even if Rock Ridge attributes are in + use. This filename is used on systems that are not able to + make use of the Rock Ridge extensions (such as MS-DOS), and + each filename in each directory must be different from the + other filenames in the same directory. mmkkiissooffss generally + tries to form correct names by forcing the unix filename to + upper case and truncating as required, but often times this + yields unsatisfactory results when there are cases where the + truncated names are not all unique. mmkkiissooffss assigns weight- + ings to each filename, and if two names that are otherwise + the same are found the name with the lower priority is + renamed to have a 3 digit number as an extension (where the + number is guaranteed to be unique). An example of this + would be the files foo.bar and foo.bar.~1~ - the file + foo.bar.~1~ would be written as FOO000.BAR;1 and the file + foo.bar would be written as FOO.BAR;1 + + When used with various HFS or UDF options, mmkkiissooffss will + attempt to recognise files stored in a number of Apple/Unix + file formats and will copy the data and resource forks as + well as any relevant finder information. See the HHFFSS MMAACCIINN-- + TTOOSSHH FFIILLEE FFOORRMMAATTSS section below for more about formats + mmkkiissooffss supports. + + Note that mmkkiissooffss is not designed to communicate with writ- + ers for optical media directly. Most writers have + proprietary command sets which vary from one manufacturer to + another, and you need a specialized tool like ccddrreeccoorrdd to + actually burn the disk. + + The ccddrreeccoorrdd utility is a utility capable of burning an + actual disc. The latest version of ccddrreeccoorrdd is available + from ffttpp::////ffttpp..bbeerrlliiooss..ddee//ppuubb//ccddrreeccoorrdd or + ffttpp::////ffttpp..bbeerrlliiooss..ddee//ppuubb//ccddrreeccoorrdd//aallpphhaa + + Also you should know that most cd writers are very particu- + lar about timing. Once you start to burn a disc, you cannot + let their buffer empty before you are done, or you will end + up with a corrupt disc. Thus it is critical that you be + able to maintain an uninterrupted data stream to the writer + for the entire time that the disc is being written. + + DDeeaalliinngg wwiitthh ppaatthh nnaammeess + ppaatthhssppeecc is the path of the directory tree to be copied into + the ISO-9660 filesystem. Multiple paths can be specified, + and mmkkiissooffss will merge the files found in all of the speci- + fied path components to form the cdrom image. + + If the option -ggrraafftt-ppooiinnttss has been specified, it is possi- + ble to graft the paths at points other than the root + + + +Version 3.0 Last change: 2010/04/25 2 + + + + + + +Maintenance Procedures MKISOFS(8) + + + + directory, and it is possible to graft files or directories + onto the cdrom image with names different than what they + have in the source filesystem. This is easiest to illus- + trate with a couple of examples. Let's start by assuming + that a local file ../old.lis exists, and you wish to include + it in the cdrom image. + + + foo/bar/=../old.lis + + will include the file old.lis in the cdrom image at + /foo/bar/old.lis, while + + foo/bar/xxx=../old.lis + + will include the file old.lis in the cdrom image at + /foo/bar/xxx. The same sort of syntax can be used with + directories as well. mmkkiissooffss will create any directories + required such that the graft points exist on the cdrom image + - the directories do not need to appear in one of the paths. + By default, any directories that are created on the fly like + this will have permissions 0555 and appear to be owned by + the person running mkisofs. If you wish other permissions + or owners of the intermediate directories, see -uuiidd, -ggiidd, + -ddiirr-mmooddee, -ffiillee-mmooddee and -nneeww-ddiirr-mmooddee. + + mmkkiissooffss will also run on Win9_x/NT_x machines when compiled + with Cygnus' cygwin (available from + http://sourceware.cygnus.com/cygwin/). Therefore most refer- + ences in this man page to _U_n_i_x also apply to _W_i_n_3_2 or _W_i_n_6_4. + + +OOPPTTIIOONNSS + -aabbssttrraacctt _F_I_L_E + Specifies the abstract file name in the primary volume + descriptor. There is space on the disc for 37 charac- + ters of information. The related Joliet entry is lim- + ited to 18 characters. This parameter can also be set + in the file ..mmkkiissooffssrrcc with ABST=filename. If speci- + fied in both places, the command line version is used. + + It is up to the user of mmkkiissooffss to include a file with + the apropriate name in the created filesystem tree. + + -AA _a_p_p_l_i_c_a_t_i_o_n__i_d + Specifies a text string that will be written into the + volume header. This should describe the application + that will be on the disc. There is space on the disc + for 128 characters of information. The related Joliet + entry is limited to 64 characters. This parameter can + also be set in the file ..mmkkiissooffssrrcc with APPI=id. If + specified in both places, the command line version is + + + +Version 3.0 Last change: 2010/04/25 3 + + + + + + +Maintenance Procedures MKISOFS(8) + + + + used. + + -aallllooww-lleeaaddiinngg-ddoottss + + -llddoottss + Allow ISO-9660 filenames to begin with a period. Usu- + ally, a leading dot is replaced with an underscore in + order to maintain MS-DOS compatibility. + This violates the ISO-9660 standard, but it happens to + work on many systems. Use with caution. + + -aallllooww-lloowweerrccaassee + This options allows lower case characters to appear in + ISO-9660 filenames. + This violates the ISO-9660 standard, but it happens to + work on some systems. Use with caution. + + -aallllooww-mmuullttiiddoott + This options allows more than one dot to appear in + ISO-9660 filenames. A leading dot is not affected by + this option, it may be allowed separately using the + -aallllooww-lleeaaddiinngg-ddoottss option. + This violates the ISO-9660 standard, but it happens to + work on many systems. Use with caution. + + -bbiibblliioo _F_I_L_E + Specifies the bibliographic file name in the primary + volume descriptor. There is space on the disc for 37 + characters of information. The related Joliet entry is + limited to 18 characters. This parameter can also be + set in the file ..mmkkiissooffssrrcc with BIBLO=filename. If + specified in both places, the command line version is + used. + + It is up to the user of mmkkiissooffss to include a file with + the apropriate name in the created filesystem tree. + + -ccaacchhee-iinnooddeess + Cache inode and device numbers to find hard links to + files. If mmkkiissooffss finds a hard link (a file with mul- + tiple names), then the file will only appear once on + the CD. This helps to save space on the CD. The option + -ccaacchhee-iinnooddeess is default on UNIX like operating sys- + tems. Be careful when using this option on a filesys- + tem without unique inode numbers as it may result in + files containing the wrong content on CD. + + If inodes are not cached, mmkkiissooffss will revert to the + old Rrip Version-1.10 (see -rrrriipp111100) and mmkkiissooffss will + not be able to create ccoorrrreecctt iinnooddee nnuummbbeerrss for zero + sized files. + + + + +Version 3.0 Last change: 2010/04/25 4 + + + + + + +Maintenance Procedures MKISOFS(8) + + + + -nnoo-ccaacchhee-iinnooddeess + Do not cache inode and device numbers. This option is + needed whenever a filesystem does not have unique inode + numbers. It is the default on old CCyyggwwiinn versions. As + the Microsoft operating system that runs below CCyyggwwiinn + uses 64 bit inode numbers for NTFS, it does not have + unique inode numbers in the 32 bit range. Old Cygwin + versions create fake 32-bit inode numbers from a hash + algorithm and thus create non-unique numbers. If + mmkkiissooffss would cache inodes on old Cygwin versions, it + would believe that some files are identical although + they are not. The result in this case are files that + contain the wrong content if a significant amount of + different files (> ~5000) is in inside the tree that is + to be archived. This does not happen when the + -nnoo-ccaacchhee-iinnooddeess is used, but the disadvantage is that + mmkkiissooffss cannot detect hardlinks anymore and the result- + ing CD image may be larger than expected. + + If inodes are not cached, mmkkiissooffss will revert to the + old Rrip Version-1.10 (see -rrrriipp111100) and mmkkiissooffss will + not be able to create ccoorrrreecctt iinnooddee nnuummbbeerrss for zero + sized files. + + -bb _e_l_t_o_r_i_t_o__b_o_o_t__i_m_a_g_e + Specifies the path and filename of the boot image to be + used when making an "El Torito" bootable CD. The path- + name must be relative to the source path specified to + mmkkiissooffss.. This option is required to make an "El Torito" + bootable CD. The boot image must be exactly the size + of either a 1200, 1440, or a 2880 kB floppy, and + mmkkiissooffss will use this size when creating the output + ISO-9660 filesystem. It is assumed that the first 512 + byte sector should be read from the boot image (it is + essentially emulating a normal floppy drive). This + will work, for example, if the boot image is a LILO + based boot floppy. + + If the boot image is not an image of a floppy, you need + to add one of the options: -hhaarrdd-ddiisskk-bboooott or + -nnoo-eemmuull-bboooott. If the system should not boot off the + emulated disk, use -nnoo-bboooott. + + If the -ssoorrtt option has not been specified, the boot + images are sorted with low priority (+2) to the begin- + ning of the medium. If you don't like this, you need + to specify a sort weight of 0 for the boot images. + + -eellttoorriittoo-aalltt-bboooott + Start with a new set of "El Torito" boot parameters. + This allows to have more than one El Torito boot on a + CD. A maximum of 63 El Torito boot entries may be put + + + +Version 3.0 Last change: 2010/04/25 5 + + + + + + +Maintenance Procedures MKISOFS(8) + + + + on a single CD. + + + eerrrrccttll== _n_a_m_e + + eerrrrccttll== _e_r_r_o_r _c_o_n_t_r_o_l _s_p_e_c + Add the content from file _n_a_m_e to the error control + definitions or add _e_r_r_o_r _c_o_n_t_r_o_l _s_p_e_c to the error con- + trol definitions. More than one error control file and + more than one _e_r_r_o_r _c_o_n_t_r_o_l _s_p_e_c as well as a mixture + of both forms is possible. + + The reason for using error control is to make mmkkiissooffss + quiet about error conditions that are known to be + irrelevant on the quality of the created filesystem or + to tell mmkkiissooffss to abort on certain error conditions + instead of trying to continue with the filesystem. + + A typical reason to use error control is to suppress + warnings about growing log files while doing a backup + on a live file system. Another typical reason to use + error control is to tell mmkkiissooffss to abort if e.g. a + file could not be archived instead of continuing to + archive other files from a list. + + The error control file contains a set of lines, each + starting with a list of error conditions to be ignored + followed by white space followed by a file name pattern + (see mmaattcchh(1) or ppaattmmaattcchh(3) for more information). + The _e_r_r_o_r _c_o_n_t_r_o_l _s_p_e_c uses the same syntax as a single + line from the error control file. If the file name + pattern needs to start with white space, use a + backslash to escape the start of the file name. It is + not possible to have new line characters in the file + name pattern. Whenever an error situation is encoun- + tered, mmkkiissooffss checks the lines in the error control + file starting from the top. If the current error con- + dition is listed on a line in the error control file, + then mmkkiissooffss checks whether the pattern on the rest of + the line matches the current file name. If this is the + case, mmkkiissooffss uses the current error control specifica- + tion to control the current error condition. + + The list of error conditions to be handled may use one + or more (in this case separated by a '|' character) + identifiers from the list below: + + AABBOORRTT If this meta condition is included in an + error condition, mmkkiissooffss aborts (exits) as + soon as possible after this error condition + has been seen instead of making mmkkiissooffss + quiet about the condition. This error + + + +Version 3.0 Last change: 2010/04/25 6 + + + + + + +Maintenance Procedures MKISOFS(8) + + + + condition flag may only be used together + with at another error condition or a list + of error conditions (separated by a '|' + character). + + WWAARRNN If this meta condition is included in an + error condition, mmkkiissooffss prints the warning + about the error condition but the error + condition does not affect the exit code of + mmkkiissooffss and the error statistics (which is + printed to the end) does not include the + related errors. This error condition flag + may only be used together with at another + error condition or a list of error condi- + tions (separated by a '|' character). The + WWAARRNN meta condition has a lower precedence + than AABBOORRTT. + + AALLLL This is a shortcut for all error conditions + below. + + SSTTAATT Suppress warnings that mmkkiissooffss could not + ssttaatt(2) a file. + + GGEETTAACCLL Suppress warnings about files on which + mmkkiissooffss had problems to retrieve the ACL + information. + + OOPPEENN Suppress warnings about files that could + not be opened. + + RREEAADD Suppress warnings read errors on files. + + WWRRIITTEE Suppress warnings write errors on files. + + RREEAADDLLIINNKK Suppress warnings rreeaaddlliinnkk(2) errors on + symbolic links. + + GGRROOWW Suppress warnings about files that did grow + while they have been archived. + + SSHHRRIINNKK Suppress warnings about files that did + shrink while they have been archived. + + MMIISSSSLLIINNKK Suppress warnings about files for which + mmkkiissooffss was unable to archive all hard + links. + + NNAAMMEETTOOOOLLOONNGG Suppress warnings about files that could + not be archived because the name of the + file is too long for the archive format. + + + + +Version 3.0 Last change: 2010/04/25 7 + + + + + + +Maintenance Procedures MKISOFS(8) + + + + FFIILLEETTOOOOBBIIGG Suppress warnings about files that could + not be archived because the size of the + file is too big for the archive format. + + SSPPEECCIIAALLFFIILLEE Suppress warnings about files that could + not be archived because the file type is + not supported by the archive format. + + GGEETTXXAATTTTRR Suppress warnings about files on that + mmkkiissooffss could not retrieve the extended + file attribute information. + + SSEETTTTIIMMEE Suppress warnings about files on that + mmkkiissooffss could not set the time information + during extraction. + + SSEETTMMOODDEE Suppress warnings about files on that + mmkkiissooffss could not set the access modes dur- + ing extraction. + + SSEECCUURRIITTYY Suppress warnings about files that have + been skipped on extraction because they + have been considered to be a security risk. + This currently applies to all files that + have a '/../' sequence inside when -.... has + not been specified. + + LLSSEECCUURRIITTYY Suppress warnings about links that have + been skipped on extraction because they + have been considered to be a security risk. + This currently applies to all link names + that start with '/' or have a '/../' + sequence inside when -sseeccuurree-lliinnkkss has been + specified. In this case, mmkkiissooffss tries to + match the link name against the pattern in + the error control file. + + SSAAMMEEFFIILLEE Suppress warnings about links that have + been skipped on extraction because source + and target of the link are pointing to the + same file. If mmkkiissooffss would not skip these + files, it would end up with removing the + file completely. In this case, mmkkiissooffss + tries to match the link name against the + pattern in the error control file. + + BBAADDAACCLL Suppress warnings access control list + conversion problems. + + SSEETTAACCLL Suppress warnings about files on that + mmkkiissooffss could not set the ACL information + during extraction. + + + +Version 3.0 Last change: 2010/04/25 8 + + + + + + +Maintenance Procedures MKISOFS(8) + + + + SSEETTXXAATTTTRR Suppress warnings about files on that + mmkkiissooffss could not set the extended file + attribute information during extraction. + + If a specific error condition is ignored, then the error + condition is not only handled in a silent way but also + excluded from the error statistics that are printed at the + end of the mmkkiissooffss run. + + Be very careful when using error control as you may ignore + any error condition. If you ignore the wrong error condi- + tions, you may not be able to see real problems anymore. + + Note that currently only the tags OOPPEENN, RREEAADD, GGRROOWW, SSHHRRIINNKK, + are checked from mmkkiissooffss. + + + -BB _i_m_g__s_u_n_4,_i_m_g__s_u_n_4_c,_i_m_g__s_u_n_4_m,_i_m_g__s_u_n_4_d,_i_m_g__s_u_n_4_e + + -ssppaarrcc-bboooott _i_m_g__s_u_n_4,_i_m_g__s_u_n_4_c,_i_m_g__s_u_n_4_m,_i_m_g__s_u_n_4_d,_i_m_g__s_u_n_4_e + Specifies a comma separated list of boot images that + are needed to make a bootable CD for sparc systems. + Partition 0 is used for the ISO-9660 image, the first + image file is mapped to partition 1. There may be + empty fields in the comma separated list. The maximum + number of possible partitions is 8 so it is impossible + to specify more than 7 partition images. This option + is required to make a bootable CD for Sun sparc sys- + tems. If the -BB or -ssppaarrcc-bboooott option has been speci- + fied, the first sector of the resulting image will con- + tain a Sun disk label. This disk label specifies slice + 0 for the ISO-9660 image and slice 1 ... slice 7 for + the boot images that have been specified with this + option. Byte offset 512 ... 8191 within each of the + additional boot images must contain a primary boot that + works for the appropriate sparc architecture. The rest + of each of the images usually contains an ufs filesys- + tem that is used primary kernel boot stage. + + The implemented boot method is the boot method found + with SunOS 4.x and SunOS 5.x. However, it does not + depend on SunOS internals but only on properties of the + Open Boot prom. For this reason, it should be usable + for any OS that boots off a sparc system. + + For more information also see the NNOOTTEESS section below. + + If the special filename ...... is used, the actual and all + following boot partitions are mapped to the previous + partition. If mmkkiissooffss is called with -GG _i_m_a_g_e -BB ... + all boot partitions are mapped to the partition that + contains the ISO-9660 filesystem image and the generic + + + +Version 3.0 Last change: 2010/04/25 9 + + + + + + +Maintenance Procedures MKISOFS(8) + + + + boot image that is located in the first 16 sectors of + the disk is used for all architectures. + + -GG _g_e_n_e_r_i_c__b_o_o_t__i_m_a_g_e + Specifies the path and filename of the generic boot + image to be used when making a generic bootable CD. + The ggeenneerriicc__bboooott__iimmaaggee will be placed on the first 16 + sectors of the CD. The first 16 sectors are the sectors + that are located before the ISO-9660 primary volume + descriptor. If this option is used together with the + -ssppaarrcc-bboooott option, the Sun disk label will overlay the + first 512 bytes of the generic boot image. + + -hhaarrdd-ddiisskk-bboooott + Specifies that the boot image used to create "El Tor- + ito" bootable CDs is a hard disk image. The hard disk + image must begin with a master boot record that con- + tains a single partition. + + -nnoo-eemmuull-bboooott + Specifies that the boot image used to create "El Tor- + ito" bootable CDs is a 'no emulation' image. The system + will load and execute this image without performing any + disk emulation. + + -nnoo-bboooott + Specifies that the created "El Torito" CD should be + marked as not bootable. The system will provide an emu- + lated drive for the image, but will boot off a standard + boot device. + + -bboooott-llooaadd-sseegg _s_e_g_m_e_n_t__a_d_d_r_e_s_s + Specifies the load segment address of the boot image + for no-emulation "El Torito" CDs. + + -bboooott-llooaadd-ssiizzee _l_o_a_d__s_e_c_t_o_r_s + Specifies the number of "virtual" (512-byte) sectors to + load in no-emulation mode. The default is to load the + entire boot file. Some BIOSes may have problems if + this is not a multiple of 4. + + -bboooott-iinnffoo-ttaabbllee + Specifies that a 56-byte table with information of the + CD-ROM layout will be patched in at offset 8 in the + boot file. If this option is given, the boot file is + modified in the source filesystem, so make sure to make + a copy if this file cannot be easily regenerated! See + the EELL TTOORRIITTOO BBOOOOTT IINNFFOO TTAABBLLEE section for a description + of this table. + + -CC _l_a_s_t__s_e_s_s__s_t_a_r_t,_n_e_x_t__s_e_s_s__s_t_a_r_t + This option is needed when mmkkiissooffss is used to create a + + + +Version 3.0 Last change: 2010/04/25 10 + + + + + + +Maintenance Procedures MKISOFS(8) + + + + CDextra or the image of a second session or a higher + level session for a multi session disk. The option -CC + takes a pair of two numbers separated by a comma. The + first number is the sector number of the first sector + in the last session of the disk that should be appended + to. The second number is the starting sector number of + the new session. The expected pair of numbers may be + retrieved by calling ccddrreeccoorrdd -mmssiinnffoo ...... If the -CC + option is used in conjunction with the -MM option, + mmkkiissooffss will create a filesystem image that is intended + to be a continuation of the previous session. If the + -CC option is used without the -MM option, mmkkiissooffss will + create a filesystem image that is intended to be used + for a second session on a CDextra. This is a multi ses- + sion CD that holds audio data in the first session and + a ISO-9660 filesystem in the second session. + + -cc _b_o_o_t__c_a_t_a_l_o_g + Specifies the path and filename of the boot catalog to + be used when making an "El Torito" bootable CD. The + pathname must be relative to the source path specified + to mmkkiissooffss.. This option is required to make a bootable + CD. This file will be inserted into the output tree + and not created in the source filesystem, so be sure + the specified filename does not conflict with an exist- + ing file, as it will be excluded. Usually a name like + "boot.catalog" is chosen. + + If the -ssoorrtt option has not been specified, the boot + catalog sorted with low priority (+1) to the beginning + of the medium. If you don't like this, you need to + specify a sort weight of 0 for the boot catalog. + + -cchheecckk-oollddnnaammeess + Check all filenames imported from old session for com- + pliance with actual mmkkiissooffss ISO-9660 file naming rules. + It his option is not present, only names with a length + > 31 are checked as these files are a hard violation of + the ISO-9660 standard. + + -cchheecckk-sseessssiioonn _F_I_L_E + Check all old sessions for compliance with actual + mmkkiissooffss ISO-9660 file naming rules. This is a high + level option that is a combination of the options: -MM + _F_I_L_E -CC 00,,00 -cchheecckk-oollddnnaammeess For the parameter _F_I_L_E see + description of -MM option. + + -ccooppyyrriigghhtt _F_I_L_E + Specifies the Copyright file name in the primary volume + descriptor. There is space on the disc for 37 charac- + ters of information. The related Joliet entry is lim- + ited to 18 characters. This parameter can also be set + + + +Version 3.0 Last change: 2010/04/25 11 + + + + + + +Maintenance Procedures MKISOFS(8) + + + + in the file ..mmkkiissooffssrrcc with COPY=filename. If speci- + fied in both places, the command line version is used. + + It is up to the user of mmkkiissooffss to include a file with + the apropriate name in the created filesystem tree. + + -dd Omit trailing period from files that do not have a + period. + This violates the ISO-9660 standard, but it happens to + work on many systems. Use with caution. + + -DD Do not use deep directory relocation, and instead just + pack them in the way we see them. + If ISO-9660:1999 has not been selected, this violates + the ISO-9660 standard, but it happens to work on many + systems. Use with caution. + + -ddaattaa-cchhaannggee-wwaarrnn + If the size of a file changes while the file is being + archived, treat this condition as a warning only that + does not cause mmkkiissooffss to abort. A warning message is + still written if the condition is not otherwise ignored + by another rule from an eerrrrccttll== option. The + -ddaattaa-cchhaannggee-wwaarrnn option works as if the last error + control option was + + eerrrrccttll=="_W_A_R_N|_G_R_O_W|_S_H_R_I_N_K *" + + + -ddiirr-mmooddee _m_o_d_e + Overrides the mode of directories used to create the + image to _m_o_d_e. Specifying this option automatically + enables Rock Ridge extensions. + + -ddvvdd-vviiddeeoo + Generate DVD-Video compliant UDF file system. This is + done by sorting the order of the content of the + appropriate files and by adding padding between the + files if needed. Note that the sorting only works if + the DVD-Video filenames include upper case characters + only. + Note that in order to get a DVD-Video compliant + filesystem image, you need to prepare a DVD-Video com- + pliant directory tree. This means you need to have a + directory VIDEO_TS (all caps) in the root directory of + the resulting DVD and you should have a directory + AUDIO_TS. The directory VIDEO_TS needs to include all + needed files (file names must be all caps) for a com- + pliant DVD-Video filesystem. + + -ff Follow all symbolic links when generating the filesys- + tem. When this option is not in use, symbolic links + + + +Version 3.0 Last change: 2010/04/25 12 + + + + + + +Maintenance Procedures MKISOFS(8) + + + + will be entered using Rock Ridge if enabled, otherwise + the file will be ignored. + + See also -ppoossiixx-LL option. + + -ffiillee-mmooddee _m_o_d_e + Overrides the mode of regular files used to create the + image to _m_o_d_e. Specifying this option automatically + enables Rock Ridge extensions. + + -ffiinndd + This option acts a separator. If it is used, all + mmkkiissooffss options must be to the left of the -ffiinndd + option. To the right of the -ffiinndd option, mmkkiissooffss + accepts the ffiinndd command line syntax only. + + The ffiinndd expression acts as a filter between the source + of file names and the consumer, which is archiving + engine. If the ffiinndd expression evaluated as TRUE, then + the related file is selected for processing, otherwise + it is omited. + + In order to make the evaluation of the ffiinndd expression + more convenient, mmkkiissooffss implements additional ffiinndd + pprriimmaarriieess that have side effects on the file meta data. + MMkkiissooffss implements the following additional ffiinndd pri- + maries: + + -hheellpp + Lists the available ffiinndd(1) syntax. + + -cchhggrrpp _g_n_a_m_e + The primary always evaluates as true; it sets the + group of the file to _g_n_a_m_e. + + -cchhmmoodd _m_o_d_e + The primary always evaluates as true; it sets the + permissions of the file to _m_o_d_e. Octal and sym- + bolic permissions are accepted for _m_o_d_e as with + cchhmmoodd(1). + + -cchhoowwnn _u_n_a_m_e + The primary always evaluates as true; it sets the + owner of the file to _u_n_a_m_e. + + -ffaallssee + The primary always evaluates as false; it allows + to make the result of the full expression dif- + ferent from the result of a part of the expres- + sion. + + -ttrruuee + + + +Version 3.0 Last change: 2010/04/25 13 + + + + + + +Maintenance Procedures MKISOFS(8) + + + + The primary always evaluates as true; it allows to + make the result of the full expression different + from the result of a part of the expression. + + The command line: + + mmkkiissooffss --oo oo..iissoo --ffiinndd .. (( --ttyyppee dd --llss --oo ffaallssee )) --oo !! + --ttyyppee dd + + lists all directories and puts all non-directories to + the image oo..iissoo. + + The command line: + + mmkkiissooffss --oo oo..iissoo --ffiinndd .. (( --ttyyppee dd --cchhoowwnn rroooott --oo ttrruuee + )) + + archives all directories so they appear to be owned by + root in the archive, all non-directories are archived + as they are in the file system. + + Note that the -llss, -eexxeecc and the -ookk primary cannot be + used if ssttddiinn or stdout has not been redirected. + + -ggiidd _g_i_d + Overrides the gid read from the source files to the + value of _g_i_d. Specifying this option automatically + enables Rock Ridge extensions. + + -gguuii Switch the behaviour for a GUI. This currently makes + the output more verbose but may have other effects in + future. + + -ggrraafftt-ppooiinnttss + Allow to use graft points for filenames. If this option + is used, all filenames are checked for graft points. + The filename is divided at the first unescaped equal + sign. All occurrences of '\\' and '=' characters must + be escaped with '\\' if -_g_r_a_f_t-_p_o_i_n_t_s has been speci- + fied. + + -hhiiddee _g_l_o_b + Hide _g_l_o_b from being seen on the ISO-9660 or Rock Ridge + directory. _g_l_o_b is a shell wild-card-style pattern + that must match any part of the filename or path. Mul- + tiple globs may be hidden. If _g_l_o_b matches a direc- + tory, then the contents of that directory will be hid- + den. In order to match a directory name, make sure the + pathname does not include a trailing '/' character. + All the hidden files will still be written to the out- + put CD image file. Should be used with the + -hhiiddee-jjoolliieett option. See README.hide for more details. + + + +Version 3.0 Last change: 2010/04/25 14 + + + + + + +Maintenance Procedures MKISOFS(8) + + + + -hhiiddee-lliisstt _f_i_l_e + A file containing a list of _g_l_o_b_s to be hidden as + above. + + -hhiiddddeenn _g_l_o_b + Add the hidden (existence) ISO-9660 directory attribute + for _g_l_o_b. This attribute will prevent _g_l_o_b from being + listed on DOS based systems if the /A flag is not used + for the listing. _g_l_o_b is a shell wild-card-style pat- + tern that must match any part of the filename or path. + In order to match a directory name, make sure the path- + name does not include a trailing '/' character. Multi- + ple globs may be hidden. + + -hhiiddddeenn-lliisstt _f_i_l_e + A file containing a list of _g_l_o_b_s to get the hidden + attribute as above. + + -hhiiddee-jjoolliieett _g_l_o_b + Hide _g_l_o_b from being seen on the Joliet directory. + _g_l_o_b is a shell wild-card-style pattern that must match + any part of the filename or path. Multiple globs may + be hidden. If _g_l_o_b matches a directory, then the con- + tents of that directory will be hidden. In order to + match a directory name, make sure the pathname does not + include a trailing '/' character. All the hidden files + will still be written to the output CD image file. + Should be used with the -hhiiddee option. See README.hide + for more details. + + -hhiiddee-jjoolliieett-lliisstt _f_i_l_e + A file containing a list of _g_l_o_b_s to be hidden as + above. + + -hhiiddee-jjoolliieett-ttrraannss-ttbbll + Hide the TTRRAANNSS..TTBBLL files from the Joliet tree. These + files usually don't make sense in the Joliet World as + they list the real name and the ISO-9660 name which may + both be different from the Joliet name. + + -hhiiddee-rrrr-mmoovveedd + Rename the directory RRRR__MMOOVVEEDD to ..rrrr__mmoovveedd in the Rock + Ridge tree. It seems to be impossible to completely + hide the RRRR__MMOOVVEEDD directory from the Rock Ridge tree. + This option only makes the visible tree better to + understand for people who don't know what this direc- + tory is for. If you need to have no RRRR__MMOOVVEEDD directory + at all, you should use the -DD option. Note that in case + that the -DD option has been specified, the resulting + filesystem is not ISO-9660 level-1 compliant and will + not be readable on MS-DOS. See also NNOOTTEESS section for + more information on the RRRR__MMOOVVEEDD directory. + + + +Version 3.0 Last change: 2010/04/25 15 + + + + + + +Maintenance Procedures MKISOFS(8) + + + + -hhiiddee-uuddff _g_l_o_b + Hide _g_l_o_b from being seen on the UDF directory. _g_l_o_b + is a shell wild-card-style pattern that must match any + part of the filename or path. Multiple globs may be + hidden. If _g_l_o_b matches a directory, then the contents + of that directory will be hidden. In order to match a + directory name, make sure the pathname does not include + a trailing '/' character. All the hidden files will + still be written to the output CD image file. Should + be used with the -hhiiddee option. See README.hide for more + details. + + -hhiiddee-uuddff-lliisstt _f_i_l_e + A file containing a list of _g_l_o_b_s to be hidden as + above. + + + -iinnppuutt-cchhaarrsseett _c_h_a_r_s_e_t + Set up the input charset that defines the characters + used in local file names. To get a list of valid char- + set names, call mmkkiissooffss -iinnppuutt-cchhaarrsseett hheellpp.. To get a + 1:1 mapping, you may use ddeeffaauulltt as charset name. If + the input charset has not been set up from the locale + in the environment, the default initial values are + _c_p_4_3_7 on DOS based systems and _i_s_o_8_8_5_9-_1 on all other + systems. See CCHHAARRAACCTTEERR SSEETTSS section below for more + details. + + If -iinnppuutt-cchhaarrsseett has not been specified, it will be + set up from the locale in the environment. If you like + to disable this automatic setup, use the empty string + as locale name. + + -oouuttppuutt-cchhaarrsseett _c_h_a_r_s_e_t + Set up the output charset that defines the characters + that will be used in Rock Ridge file names. Defaults to + the input charset. See CCHHAARRAACCTTEERR SSEETTSS section below for + more details. + + -iissoo-lleevveell _l_e_v_e_l + Set the ISO-9660 conformance level. Valid numbers are + 1..3 and 4. + + With level 1, files may only consist of one section and + filenames are restricted to 8.3 characters. + + With level 2, files may only consist of one section. + + With level 3, no restrictions (other than ISO- + 9660:1988) do apply. Starting with this level, mkisofs + also allows files to be larger than 4 GB by implement- + ing ISO-9660 multi-extent files. + + + +Version 3.0 Last change: 2010/04/25 16 + + + + + + +Maintenance Procedures MKISOFS(8) + + + + With all ISO-9660 levels from 1..3, all filenames are + restricted to upper case letters, numbers and the + underscore (_). The maximum filename length is res- + tricted to 31 characters, the directory nesting level + is restricted to 8 and the maximum path length is lim- + ited to 255 characters. + + Level 4 officially does not exists but mmkkiissooffss maps it + to ISO-9660:1999 which is ISO-9660 version 2. + + With level 4, an enhanced volume descriptor with ver- + sion number and file structure version number set to 2 + is emitted. There may be more than 8 levels of direc- + tory nesting, there is no need for a file to contain a + dot and the dot has no more special meaning, file names + do not have version numbers, the maximum length for + files and directory is raised to 207. If Rock Ridge is + used, the maximum ISO-9660 name length is reduced to + 197. + + When creating Version 2 images, mmkkiissooffss emits an + enhanced volume descriptor which looks similar to a + primary volume descriptor but is slightly different. Be + careful not to use broken software to make ISO-9660 + images bootable by assuming a second PVD copy and + patching this putative PVD copy into an El Torito VD. + + -JJ Generate Joliet directory records in addition to regu- + lar ISO-9660 file names. This is primarily useful when + the discs are to be used on Windows-NT or Windows-95 + machines. The Joliet filenames are specified in + Unicode and each path component can be up to 64 Unicode + characters long. Note that Joliet is no standard - + CD's that use only Joliet extensions but no standard + Rock Ridge extensions may usually only be used on + Microsoft Win32 systems. Furthermore, the fact that the + filenames are limited to 64 characters and the fact + that Joliet uses the UTF-16 coding for Unicode charac- + ters causes interoperability problems. + + -jjoolliieett-lloonngg + Allow Joliet filenames to be up to 103 Unicode charac- + ters. This breaks the Joliet specification - but + appears to work. Use with caution. The number 103 is + derived from: the maximum Directory Record Length + (254), minus the length of Directory Record (33), minus + CD-ROM XA System Use Extension Information (14), + divided by the UTF-16 character size (2). + + -jjcchhaarrsseett _c_h_a_r_s_e_t + Same as using -iinnppuutt-cchhaarrsseett _c_h_a_r_s_e_t and -JJ options. + See CCHHAARRAACCTTEERR SSEETTSS section below for more details. + + + +Version 3.0 Last change: 2010/04/25 17 + + + + + + +Maintenance Procedures MKISOFS(8) + + + + -ll Allow full 31 character filenames. Normally the ISO- + 9660 filename will be in an 8.3 format which is compa- + tible with MS-DOS, even though the ISO-9660 standard + allows filenames of up to 31 characters. If you use + this option, the disc may be difficult to use on a MS- + DOS system, but this comes in handy on some other sys- + tems (such as the Amiga). Use with caution. + + -LL Outdated option reserved by POSIX.1-2001, use + -aallllooww-lleeaaddiinngg-ddoottss instead. This option will get + POSIX.1-2001 semantics with mkisofs-2.02. + + -lloogg-ffiillee _l_o_g__f_i_l_e + Redirect all error, warning and informational messages + to _l_o_g__f_i_l_e instead of the standard error. + + -mm _g_l_o_b + Exclude _g_l_o_b from being written to CDROM. _g_l_o_b is a + shell wild-card-style pattern that must match part of + the filename (not the path as with option -xx). Techni- + cally _g_l_o_b is matched against the _d->_d__n_a_m_e part of the + directory entry. Multiple globs may be excluded. + Example: + + mkisofs -o rom -m '*.o' -m core -m foobar + + would exclude all files ending in ".o", called "core" + or "foobar" to be copied to CDROM. Note that if you had + a directory called "foobar" it too (and of course all + its descendants) would be excluded. + + NOTE: The -mm and -xx option description should both be + updated, they are wrong. Both now work identical and + use filename globbing. A file is excluded if either the + last component matches or the whole path matches. + + -eexxcclluuddee-lliisstt _f_i_l_e + A file containing a list of _g_l_o_b_s to be exclude as + above. + + -mmaaxx-IISSOO--99666600-ffiilleennaammeess + Allow 37 chars in ISO-9660 filenames. This option + forces the -NN option as the extra name space is taken + from the space reserved for ISO-9660 version numbers. + This violates the ISO-9660 standard, but it happens to + work on many systems. Although a conforming applica- + tion needs to provide a buffer space of at least 37 + characters, disks created with this option may cause a + buffer overflow in the reading operating system. Use + with extreme care. + + -MM _p_a_t_h + + + +Version 3.0 Last change: 2010/04/25 18 + + + + + + +Maintenance Procedures MKISOFS(8) + + + + or + + -MM _d_e_v_i_c_e + or + + -ddeevv _d_e_v_i_c_e + Specifies path to existing ISO-9660 image to be merged. + The alternate form takes a SCSI device specifier that + uses the same syntax as the ddeevv== parameter of ccddrreeccoorrdd.. + The output of mmkkiissooffss will be a new session which + should get written to the end of the image specified in + -M. Typically this requires multi-session capability + for the recorder and cdrom drive that you are attempt- + ing to write this image to. This option may only be + used in conjunction with the -CC option. + + -NN Omit version numbers from ISO-9660 file names. + This violates the ISO-9660 standard, but no one really + uses the version numbers anyway. Use with caution. + + -nneeww-ddiirr-mmooddee _m_o_d_e + Mode to use when creating new directories in the iso fs + image. The default mode is 0555. + + -nnoobbaakk + + -nnoo-bbaakk + Do not include backup files files on the ISO-9660 + filesystem. If the -nnoo-bbaakk option is specified, files + that contain the characters '~' or '#' or end in '.bak' + will not be included (these are typically backup files + for editors under unix). + + -nnoo-lliimmiitt-ppaatthhttaabblleess + A ISO-9660 filesystem contains path tables that contain + a list of directories. This list may contain many + directories but only 65535 of them may be parent direc- + tories. When -nnoo-lliimmiitt-ppaatthhttaabblleess is in use, further + parent directories will be folded to the root directory + and the resulting filesystem will no longer be usable + on DDOOSS. + + -ffoorrccee-rrrr + Do not use the automatic Rock Ridge attributes recogni- + tion for previous sessions. This helps to show rotten + ISO-9660 extension records as e.g. created by NERO + burning ROM. + + -nnoo-rrrr + Do not use the Rock Ridge attributes from previous ses- + sions. This may help to avoid getting into trouble + when mmkkiissooffss finds illegal Rock Ridge signatures on an + + + +Version 3.0 Last change: 2010/04/25 19 + + + + + + +Maintenance Procedures MKISOFS(8) + + + + old session. + + -nnoo-sspplliitt-ssyymmlliinnkk-ccoommppoonneennttss + Don't split the SL components, but begin a new Con- + tinuation Area (CE) instead. This may waste some space, + but the SunOS 4.1.4 cdrom driver has a bug in reading + split SL components (link_size = component_size instead + of link_size += component_size). + + Note that this option has been introduced by Eric + Youngdale in 1997. It is questionable whether it makes + sense at all. When it has been introduced, mmkkiissooffss did + have a serious bug that did create defective CE signa- + tures if a symlink contained `/../'. This CE signature + bug in mmkkiissooffss has been fixed in May 2003. + + -nnoo-sspplliitt-ssyymmlliinnkk-ffiieellddss + Don't split the SL fields, but begin a new Continuation + Area (CE) instead. This may waste some space, but the + SunOS 4.1.4 and Solaris 2.5.1 cdrom driver have a bug + in reading split SL fields (a `/' can be dropped). + + Note that this option has been introduced by Eric + Youngdale in 1997. It is questionable whether it makes + sense at all. When it has been introduced, mmkkiissooffss did + have a serious bug that did create defective CE signa- + tures if a symlink contained `/../'. This CE signature + bug in mmkkiissooffss has been fixed in May 2003. + + -oo _f_i_l_e_n_a_m_e + is the name of the file to which the ISO-9660 filesys- + tem image should be written. This can be a disk file, + a tape drive, or it can correspond directly to the dev- + ice name of the optical disc writer. If not specified, + stdout is used. Note that the output can also be a + block special device for a regular disk drive, in which + case the disk partition can be mounted and examined to + ensure that the premastering was done correctly. + + -ppaadd Pad the end of the whole image by 150 sectors (300 kB). + If the option -BB is used, then there is a padding at + the end of the ISO-9660 partition and before the begin- + ning of the boot partitions. The size of this padding + is chosen to make the first boot partition start on a + sector number that is a multiple of 16. + + The padding is needed as many operating systems (e.g. + Linux) implement read ahead bugs in their filesystem + I/O. These bugs result in read errors on one or more + files that are located at the end of a track. They are + usually present when the CD is written in Track at Once + mode or when the disk is written as mixed mode CD where + + + +Version 3.0 Last change: 2010/04/25 20 + + + + + + +Maintenance Procedures MKISOFS(8) + + + + an audio track follows the data track. + + To avoid problems with I/O error on the last file on + the filesystem, the -ppaadd option has been made the + default. + + -nnoo-ppaadd + Do not Pad the end by 150 sectors (300 kB) and do not + make the the boot partitions start on a multiple of 16 + sectors. + + -ppaatthh-lliisstt _f_i_l_e + A file containing a list of _p_a_t_h_s_p_e_c directories and + filenames to be added to the ISO-9660 filesystem. This + list of pathspecs are processed after any that appear + on the command line. If the argument is -, then the + list is read from the standard input. + + -PP Outdated option reserved by POSIX.1-2001, use -ppuubb-- + lliisshheerr instead. This option will get POSIX.1-2001 + semantics with mkisofs-2.02. + + -ppuubblliisshheerr _p_u_b_l_i_s_h_e_r__i_d + Specifies a text string that will be written into the + volume header. This should describe the publisher of + the CDROM, usually with a mailing address and phone + number. There is space on the disc for 128 characters + of information. The related Joliet entry is limited to + 64 characters. This parameter can also be set in the + file ..mmkkiissooffssrrcc with PUBL=. If specified in both + places, the command line version is used. + + -pp _p_r_e_p_a_r_e_r__i_d + Specifies a text string that will be written into the + volume header. This should describe the preparer of + the CDROM, usually with a mailing address and phone + number. There is space on the disc for 128 characters + of information. The related Joliet entry is limited to + 64 characters. This parameter can also be set in the + file ..mmkkiissooffssrrcc with PREP=. If specified in both + places, the command line version is used. + + -ppoossiixx-HH + Follow all symbolic links encountered on command line + when generating the filesystem. + + -ppoossiixx-LL + Follow all symbolic links when generating the filesys- + tem. When this option is not in use, symbolic links + will be entered using Rock Ridge if enabled, otherwise + the file will be ignored. + + + + +Version 3.0 Last change: 2010/04/25 21 + + + + + + +Maintenance Procedures MKISOFS(8) + + + + -ppoossiixx-PP + Do not follow symbolic links when generating the + filesystem (this is the default). If -ppoossiixx-PP is + specified after -ppoossiixx-HH or -ppoossiixx-LL, the effect of + these options will be reset. + + -pprriinntt-ssiizzee + Print estimated filesystem size in multiples of the + sector size (2048 bytes) and exit. This option is + needed for Disk At Once mode and with some CD-R drives + when piping directly into ccddrreeccoorrdd.. In this case it is + needed to know the size of the filesystem before the + actual CD-creation is done. The option -print-size + allows to get this size from a "dry-run" before the CD + is actually written. Old versions of mmkkiissooffss did write + this information (among other information) to _s_t_d_e_r_r. + As this turns out to be hard to parse, the number + without any other information is now printed on ssttddoouutt + too. If you like to write a simple shell script, + redirect ssttddeerrrr and catch the number from ssttddoouutt. This + may be done with: + + ccddbblloocckkss==`` mmkkiissooffss -pprriinntt-ssiizzee -qquuiieett ...... `` + + mmkkiissooffss ...... || ccddrreeccoorrdd ...... ttssiizzee==$${{ccddbblloocckkss}}ss -- + + -qquuiieett + This makes mmkkiissooffss even less verbose. No progress out- + put will be provided. + + -RR Generate SUSP and RR records using the Rock Ridge pro- + tocol to further describe the files on the ISO-9660 + filesystem. The Rock Ridge protocol is needed in order + to add POSIX like file meta data like permissions, + extended time stamps, user/group is'd, link counts, + inode numbers and symbolic links. The Rock Ridge proto- + col allows to archive hierarchy trees with unlimited + depth. + + -rr This is like the -R option, but file ownership and + modes are set to more useful values. The uid and gid + are set to zero, because they are usually only useful + on the author's system, and not useful to the client. + All the file read bits are set true, so that files and + directories are globally readable on the client. If + any execute bit is set for a file, set all of the exe- + cute bits, so that executables are globally executable + on the client. If any search bit is set for a direc- + tory, set all of the search bits, so that directories + are globally searchable on the client. All write bits + are cleared, because the CD-Rom will be mounted read- + only in any case. If any of the special mode bits are + + + +Version 3.0 Last change: 2010/04/25 22 + + + + + + +Maintenance Procedures MKISOFS(8) + + + + set, clear them, because file locks are not useful on a + read-only file system, and set-id bits are not desir- + able for uid 0 or gid 0. When used on Win32, the exe- + cute bit is set on _a_l_l files. This is a result of the + lack of file permissions on Win32 and the Cygwin POSIX + emulation layer. See also -uid -gid, -dir-mode, + -file-mode and -new-dir-mode. + + -rreellaaxxeedd-ffiilleennaammeess + The option -rreellaaxxeedd-ffiilleennaammeess allows ISO-9660 filenames + to include digits, upper case characters and all other + 7 bit ASCII characters (resp. anything except lowercase + characters). + This violates the ISO-9660 standard, but it happens to + work on many systems. Use with caution. + + -rroooott _d_i_r + Moves all files and directories into _d_i_r in the image. + This is essentially the same as using --ggrraafftt--ppooiinnttss and + adding _d_i_r in front of every pathspec, but is easier to + use. + + _d_i_r may actually be several levels deep. It is created + with the same permissions as other graft points. + + -rrrriipp111100 + Create ISO-9660 file system images that follow the old + Rrip Version-1.10 standard from 1993. This option may + be needed if you know of systems that do not implement + the Rrip protocol correctly and like the file system to + be read by such a system. Currently no such system is + known. + + If a file system has been created with -rrrriipp111100, the + Rock Ridge attributes do not include inode number + information. + + -rrrriipp111122 + Create ISO-9660 file system images that follow the new + Rrip Version-1.12 standard from 1994, this is the + default. + + -oolldd--rroooott _d_i_r + This option is necessary when writing a multisession + image and the previous (or even older) session was + written with --rroooott _d_i_r. Using a directory name not + found in the previous session causes mmkkiissooffss to abort + with an error. + + Without this option, mmkkiissooffss would not be able to find + unmodified files and would be forced to write their + data into the image once more. + + + +Version 3.0 Last change: 2010/04/25 23 + + + + + + +Maintenance Procedures MKISOFS(8) + + + + -rroooott and -oolldd--rroooott are meant to be used together to do + incremental backups. The initial session would e.g. + use: mmkkiissooffss -rroooott bbaacckkuupp__11 _d_i_r_s. The next incremen- + tal backup with mmkkiissooffss -rroooott bbaacckkuupp__22 -oolldd--rroooott + bbaacckkuupp__11 _d_i_r_s. would take another snapshot of these + directories. The first snapshot would be found in + bbaacckkuupp__11, the second one in bbaacckkuupp__22, but only modified + or new files need to be written into the second ses- + sion. + + Without these options, new files would be added and old + ones would be preserved. But old ones would be + overwritten if the file was modified. Recovering the + files by copying the whole directory back from CD would + also restore files that were deleted intentionally. + Accessing several older versions of a file requires + support by the operating system to choose which ses- + sions are to be mounted. + + -ss _s_e_c_t_o_r _t_y_p_e + + -sseeccttyyppee _s_e_c_t_o_r _t_y_p_e + Set the _s_e_c_t_o_r _t_y_p_e to be used for the output file with + the ISO-9660 filesystem. The _s_e_c_t_o_r _t_y_p_e may be one + of: + + ddaattaa This is the default. It results in standard CD-ROM + data sectors with 2048 bytes per sector. + + xxaa11 This sets the sector type to CD-ROM XA mode 1 with + 2056 bytes per sector. This sector type is the + official sector type for multi-session CDs, it + should be used together with the -XXAA option of + mkisofs. It is required to write Kodak Photo CDs + and Kodak Picture CDs. Use the -xxaa11 option from + ccddrreeccoorrdd to tell ccddrreeccoorrdd to write CD-ROM XA mode + 1 sectors. Do not use for DVD or BluRay media. + + rraaww This sets the sector type to raw audio sectors + with 2352 bytes per sector. This is reserved for + future enhancements. Do not use for DVD or BluRay + media. + + -ssoorrtt _s_o_r_t _f_i_l_e + Sort file locations on the media. Sorting is controlled + by a file that contains pairs of filenames and sorting + offset weighting. If the weighting is higher, the file + will be located closer to the beginning of the media, + if the weighting is lower, the file will be located + closer to the end of the media. There must be only one + space or tabs character between the filename and the + weight and the weight must be the last characters on a + + + +Version 3.0 Last change: 2010/04/25 24 + + + + + + +Maintenance Procedures MKISOFS(8) + + + + line. The filename is taken to include all the charac- + ters up to, but not including the last space or tab + character on a line. This is to allow for space charac- + ters to be in, or at the end of a filename. This + option does nnoott sort the order of the file names that + appear in the ISO-9660 directory. It sorts the order in + which the file data is written to the CD image - which + may be useful in order to optimize the data layout on a + CD. See README.sort for more details. + + -ssppaarrcc-bboooott _i_m_g__s_u_n_4,_i_m_g__s_u_n_4_c,_i_m_g__s_u_n_4_m,_i_m_g__s_u_n_4_d,_i_m_g__s_u_n_4_e + See -BB option above. + + -ssppaarrcc-llaabbeell _l_a_b_e_l + Set the Sun disk label name for the Sun disk label that + is created with the -ssppaarrcc--bboooott option. + + -sspplliitt-oouuttppuutt + Split the output image into several files of approxi- + mately 1 GB. This helps to create DVD sized ISO-9660 + images on operating systems without large file support. + Cdrecord will concatenate more than one file into a + single track if writing to a DVD. To make + -sspplliitt-oouuttppuutt work, the -oo _f_i_l_e_n_a_m_e option must be + specified. The resulting output images will be named: + _f_i_l_e_n_a_m_e__0_0,_f_i_l_e_n_a_m_e__0_1,filename_02... + + -ssttrreeaamm-mmeeddiiaa-ssiizzee # + Select streaming operation and set the media size to # + sectors. This allows you to pipe the output of the tar + program into mkisofs and to create a ISO-9660 filesys- + tem without the need of an intermediate tar archive + file. If this option has been specified, mmkkiissooffss reads + from ssttddiinn and creates a file with the name SSTTRREEAAMM..IIMMGG. + The maximum size of the file (with padding) is 200 sec- + tors less than the specified media size. If -nnoo-ppaadd has + been specified, the file size is 50 sectors less than + the specified media size. If the file is smaller, then + mkisofs will write padding. This may take a while. + + The option -ssttrreeaamm-mmeeddiiaa-ssiizzee creates simple ISO-9660 + filesystems only and may not used together with multi- + session or hybrid filesystem options. + + -ssttrreeaamm-ffiillee-nnaammee _n_a_m_e + Set the file name used with -ssttrreeaamm-mmeeddiiaa-ssiizzee # to a + value different from SSTTRREEAAMM..IIMMGG. If this option is + used, the filesystem is created as if -iissoo-lleevveell 4 has + been specified. + + -ssuunnxx8866-bboooott _U_F_S-_i_m_g,,,_A_U_X_1-_i_m_g + Specifies a comma separated list of filesystem images + + + +Version 3.0 Last change: 2010/04/25 25 + + + + + + +Maintenance Procedures MKISOFS(8) + + + + that are needed to make a bootable CD for Solaris x86 + systems. + + Note that partition 1 is used for the ISO-9660 image + and that partition 2 is the whole disk, so partition 1 + and 2 may not be used by external partition data. The + first image file is mapped to partition 0. There may + be empty fields in the comma separated list, and list + entries for partition 1 and 2 must be empty. The max- + imum number of supported partitions is 8 (although the + Solaris x86 partition table could support up to 16 par- + titions), so it is impossible to specify more than 6 + partition images. This option is required to make a + bootable CD for Solaris x86 systems. + + If the -ssuunnxx8866-bboooott option has been specified, the + first sector of the resulting image will contain a PC + fdisk label with a Solaris type 0x82 fdisk partition + that starts at offset 512 and spans the whole CD. In + addition, for the Solaris type 0x82 fdisk partition, + there is a SVr4 disk label at offset 1024 in the first + sector of the CD. This disk label specifies slice 0 + for the first (usually UFS type) filesystem image that + is used to boot the PC and slice 1 for the ISO-9660 + image. Slice 2 spans the whole CD slice 3 ... slice 7 + may be used for additional filesystem images that have + been specified with this option. + + A Solaris x86 boot CD uses a 1024 byte sized primary + boot that uses the EEll--TToorriittoo nnoo--eemmuullaattiioonn boot mode and + a secondary generic boot that is in CD sectors 1..15. + For this reason, both --bb _b_o_o_t_i_m_a_g_e --nnoo-eemmuull-bboooott and -GG + _g_e_n_b_o_o_t must be specified. + + -ssuunnxx8866-llaabbeell _l_a_b_e_l + Set the SVr4 disk label name for the SVr4 disk label + that is created with the -ssuunnxx8866--bboooott option. + + -ssyyssiidd _I_D + Specifies the system ID. There is space on the disc + for 32 characters of information. This parameter can + also be set in the file ..mmkkiissooffssrrcc with SYSI=system_id. + If specified in both places, the command line version + is used. + + -TT Generate a file TRANS.TBL in each directory on the + CDROM, which can be used on non-Rock Ridge capable sys- + tems to help establish the correct file names. There + is also information present in the file that indicates + the major and minor numbers for block and character + devices, and each symlink has the name of the link file + given. + + + +Version 3.0 Last change: 2010/04/25 26 + + + + + + +Maintenance Procedures MKISOFS(8) + + + + -ttaabbllee-nnaammee _T_A_B_L_E__N_A_M_E + Alternative translation table file name (see above). + Implies the -TT option. If you are creating a multi- + session image you must use the same name as in the pre- + vious session. + + -uuccss-lleevveell _l_e_v_e_l + Set Unicode conformance level in the Joliet SVD. The + default level is 3. It may be set to 1..3 using this + option. + + -UUDDFF Include a UUDDFF hybrid in the generated filesystem image. + As mmkkiissooffss always creates a ISO-9660 filesystem, it is + not possible to create UDF only images. Note that UUDDFF + wastes the space from sector ~20 to sector 256 at the + beginning of the disk in addition to the spcae needed + for real UUDDFF data structures. + + -uuddff Rationalized UDF with user and group set to 0 and with + simplified permissions. See -rr option for more infor- + mation. + + -uuddff-ssyymmlliinnkkss + Support symlinks in UUDDFF filesystems. This is the + default. + + -nnoo-uuddff-ssyymmlliinnkkss + Do not support symlinks in UUDDFF filesystems. + + -uuiidd _u_i_d + Overrides the uid read from the source files to the + value of _u_i_d. Specifying this option automatically + enables Rock Ridge extensions. + + -uussee-ffiilleevveerrssiioonn + The option -uussee-ffiilleevveerrssiioonn allows mkisofs to use file + version numbers from the filesystem. If the option is + not specified, mmkkiissooffss creates a version number of 1 + for all files. File versions are strings in the range + ;_1 to ;_3_2_7_6_7 This option is the default on VMS. + + -UU Allows "Untranslated" filenames, completely violating + the ISO-9660 standards described above. Forces on the + -d, -l, -N, -allow-leading-dots, -relaxed-filenames, + -allow-lowercase, -allow-multidot and -no-iso-translate + flags. It allows more than one '.' character in the + filename, as well as mixed case filenames. This is + useful on HP-UX system, where the built-in CDFS + filesystem does not recognize ANY extensions. Use with + extreme caution. + + -nnoo-iissoo-ttrraannssllaattee + + + +Version 3.0 Last change: 2010/04/25 27 + + + + + + +Maintenance Procedures MKISOFS(8) + + + + Do not translate the characters '#' and '~' which are + invalid for ISO-9660 filenames. These characters are + though invalid often used by Microsoft systems. + This violates the ISO-9660 standard, but it happens to + work on many systems. Use with caution. + + -VV _v_o_l_i_d + Specifies the volume ID (volume name or label) to be + written into the master block. There is space on the + disc for 32 characters of information. This parameter + can also be set in the file ..mmkkiissooffssrrcc with VOLI=id. + If specified in both places, the command line version + is used. Note that if you assign a volume ID, this is + the name that will be used as the mount point used by + the Solaris volume management system and the name that + is assigned to the disc on a Microsoft Win32 or Apple + Mac platform. + + -vvoollsseett _I_D + Specifies the volset ID. There is space on the disc + for 128 characters of information. The related Joliet + entry is limited to 64 characters. This parameter can + also be set in the file ..mmkkiissooffssrrcc with VOLS=volset_id. + If specified in both places, the command line version + is used. + + -vvoollsseett-ssiizzee # + Sets the volume set size to #. The volume set size is + the number of CD's that are in a CD volume set. A + volume set is a collection of one or more volumes, on + which a set of files is recorded. + + Volume Sets are not intended to be used to create a set + numbered CD's that are part of e.g. a Operation System + installation set of CD's. Volume Sets are rather used + to record a big directory tree that would not fit on a + single volume. Each volume of a Volume Set contains a + description of all the directories and files that are + recorded on the volumes where the sequence numbers are + less than, or equal to, the assigned Volume Set Size of + the current volume. + + MMkkiissooffss currently does not support a -vvoollsseett-ssiizzee that + is larger than 1. + + The option -vvoollsseett-ssiizzee must be specified before + -vvoollsseett-sseeqqnnoo on each command line. + + -vvoollsseett-sseeqqnnoo # + Sets the volume set sequence number to #. The volume + set sequence number is the index number of the current + CD in a CD set. The option -vvoollsseett-ssiizzee must be + + + +Version 3.0 Last change: 2010/04/25 28 + + + + + + +Maintenance Procedures MKISOFS(8) + + + + specified before -vvoollsseett-sseeqqnnoo on each command line. + + -vv Verbose execution. If given twice on the command line, + extra debug information will be printed. + + -xx _p_a_t_h + Exclude _p_a_t_h from being written to CDROM. _p_a_t_h must be + the complete pathname that results from concatenating + the pathname given as command line argument and the + path relative to this directory. Multiple paths may be + excluded. Example: + + mkisofs -o cd -x /local/dir1 -x /local/dir2 /local + + NOTE: The -mm and -xx option description should both be + updated, they are wrong. Both now work identical and + use filename globbing. A file is excluded if either the + last component matches or the whole path matches. + + -XXAA Generate XA iso-directory attributes with original + owner and mode information. This option is required to + create conforming multi session CDs as used by the + Kodak Photo CD and the Kodak Picture CD. A conforming + XA CD uses CD-ROM XA mode 1 sectors, see the -sseeccttoorr + _x_a_2 option for more information. + + -xxaa Generate XA iso-directory attributes with rationalized + owner and mode information. User ID and group ID are + set to 0. See -XXAA for more information. + + -zz Generate special RRIP records for transparently + compressed files. This is only of use and interest for + hosts that support transparent decompression, such as + Linux 2.4.14 or later. You must specify the -RR or -rr + options to enable RockRidge, and generate compressed + files using the mmkkzzffttrreeee utility before running + mmkkiissooffss. Note that transparent compression is a non- + standard Rock Ridge extension. The resulting disks are + only transparently readable if used on Linux. On other + operating systems you will need to call mmkkzzffttrreeee by + hand to decompress the files. + + +HHFFSS OOPPTTIIOONNSS + -hhffss Create an ISO-9660/HFS hybrid CD. This option should be + used in conjunction with the -mmaapp, -mmaaggiicc and/or the + various _d_o_u_b_l_e _d_a_s_h options given below. + + -nnoo-hhffss + Do not create an ISO-9660/HFS hybrid CD even though + other options may imply to do so. + + + + +Version 3.0 Last change: 2010/04/25 29 + + + + + + +Maintenance Procedures MKISOFS(8) + + + + -aappppllee + Create an ISO-9660 CD with Apple's extensions. Similar + to the -hhffss option, except that the Apple Extensions to + ISO-9660 are added instead of creating an HFS hybrid + volume. Former mmkkiissooffss versions did include Rock Ridge + attributes by default if -aappppllee was specified. This + versions of mmkkiissooffss does not do this anymore. If you + like to have Rock Ridge attributes, you need to specify + this separately. + + -mmaapp _m_a_p_p_i_n_g__f_i_l_e + Use the _m_a_p_p_i_n_g__f_i_l_e to set the CREATOR and TYPE infor- + mation for a file based on the filename's extension. A + filename is mapped only if it is not one of the know + Apple/Unix file formats. See the HHFFSS CCRREEAATTOORR//TTYYPPEE sec- + tion below. + + -mmaaggiicc _m_a_g_i_c__f_i_l_e + The CREATOR and TYPE information is set by using a + file's _m_a_g_i_c _n_u_m_b_e_r (usually the first few bytes of a + file). The _m_a_g_i_c__f_i_l_e is only used if a file is not one + of the known Apple/Unix file formats, or the filename + extension has not been mapped using the -mmaapp option. + See the HHFFSS CCRREEAATTOORR//TTYYPPEE section below for more + details. + + -hhffss-ccrreeaattoorr _C_R_E_A_T_O_R + Set the default CREATOR for all files. Must be exactly + 4 characters. See the HHFFSS CCRREEAATTOORR//TTYYPPEE section below + for more details. + + -hhffss-ttyyppee _T_Y_P_E + Set the default TYPE for all files. Must be exactly 4 + characters. See the HHFFSS CCRREEAATTOORR//TTYYPPEE section below for + more details. + + -pprroobbee + Search the contents of files for all the known + Apple/Unix file formats. See the HHFFSS MMAACCIINNTTOOSSHH FFIILLEE + FFOORRMMAATTSS section below for more about these formats. + However, the only way to check for _M_a_c_B_i_n_a_r_y and + _A_p_p_l_e_S_i_n_g_l_e files is to open and read them. Therefore + this option _m_a_y increase processing time. It is better + to use one or more _d_o_u_b_l_e _d_a_s_h options given below if + the Apple/Unix formats in use are known. + + -nnoo-ddeesskkttoopp + Do not create (empty) Desktop files. New HFS Desktop + files will be created when the CD is used on a Macin- + tosh (and stored in the System Folder). By default, + empty Desktop files are added to the HFS volume. + + + + +Version 3.0 Last change: 2010/04/25 30 + + + + + + +Maintenance Procedures MKISOFS(8) + + + + -mmaacc-nnaammee + Use the HFS filename as the starting point for the + ISO-9660, Joliet and Rock Ridge file names. See the HHFFSS + MMAACCIINNTTOOSSHH FFIILLEE NNAAMMEESS section below for more informa- + tion. + + -bboooott-hhffss-ffiillee _d_r_i_v_e_r__f_i_l_e + Installs the _d_r_i_v_e_r__f_i_l_e that _m_a_y make the CD bootable + on a Macintosh. See the HHFFSS BBOOOOTT DDRRIIVVEERR section below. + (Alpha). + + -ppaarrtt + Generate an HFS partition table. By default, no parti- + tion table is generated, but some older Macintosh CDROM + drivers need an HFS partition table on the CDROM to be + able to recognize a hybrid CDROM. + + -aauuttoo _A_u_t_o_S_t_a_r_t__f_i_l_e + Make the HFS CD use the QuickTime 2.0 Autostart feature + to launch an application or document. The given + filename must be the name of a document or application + located at the top level of the CD. The filename must + be less than 12 characters. (Alpha). + + -cclluusstteerr-ssiizzee _s_i_z_e + Set the size in bytes of the cluster or allocation + units of PC Exchange files. Implies the --eexxcchhaannggee + option. See the HHFFSS MMAACCIINNTTOOSSHH FFIILLEE FFOORRMMAATTSS section + below. + + -hhiiddee-hhffss _g_l_o_b + Hide _g_l_o_b from the HFS volume. The file or directory + will still exist in the ISO-9660 and/or Joliet direc- + tory. _g_l_o_b is a shell wild-card-style pattern that + must match any part of the filename Multiple globs may + be excluded. Example: + + mkisofs -o rom -hfs -hide-hfs '*.o' -hide-hfs foobar + + would exclude all files ending in ".o" or called + "foobar" from the HFS volume. Note that if you had a + directory called "foobar" it too (and of course all its + descendants) would be excluded. The _g_l_o_b can also be a + path name relative to the source directories given on + the command line. Example: + + mkisofs -o rom -hfs -hide-hfs src/html src + + would exclude just the file or directory called "html" + from the "src" directory. Any other file or directory + called "html" in the tree will not be excluded. Should + be used with the -hhiiddee and/or -hhiiddee-jjoolliieett options. In + + + +Version 3.0 Last change: 2010/04/25 31 + + + + + + +Maintenance Procedures MKISOFS(8) + + + + order to match a directory name, make sure the pathname + does not include a trailing '/' character. See + README.hide for more details. + + -hhiiddee-hhffss-lliisstt _f_i_l_e + A file containing a list of _g_l_o_b_s to be hidden as + above. + + -hhffss-vvoolliidd _h_f_s__v_o_l_i_d + Volume name for the HFS partition. This is the name + that is assigned to the disc on a Macintosh and + replaces the _v_o_l_i_d used with the -VV option + + -iiccoonn-ppoossiittiioonn + Use the icon position information, if it exists, from + the Apple/Unix file. The icons will appear in the same + position as they would on a Macintosh desktop. Folder + location and size on screen, its scroll positions, + folder View (view as Icons, Small Icons, etc.) are also + preserved. This option may become set by default in + the future. (Alpha). + + -rroooott-iinnffoo _f_i_l_e + Set the location, size on screen, scroll positions, + folder View etc. for the root folder of an HFS volume. + See README.rootinfo for more information. (Alpha) + + -pprreepp-bboooott _F_I_L_E + PReP boot image file. Up to 4 are allowed. See + README.prep_boot (Alpha) + + -cchhrrpp--tt + Create a CHRP boot in boot partition 1. See -pprreepp-bboooott + for further information. + + -iinnppuutt-hhffss-cchhaarrsseett _c_h_a_r_s_e_t + Input charset that defines the characters used in HFS + file names when used with the -_m_a_c-_n_a_m_e option. The + default charset is cp10000 (Mac Roman) _c_p_1_0_0_0_0 (Mac + Roman) See CCHHAARRAACCTTEERR SSEETTSS and HHFFSS MMAACCIINNTTOOSSHH FFIILLEE NNAAMMEESS + sections below for more details. + + -oouuttppuutt-hhffss-cchhaarrsseett _c_h_a_r_s_e_t + Output charset that defines the characters that will be + used in the HFS file names. Defaults to the input char- + set. See CCHHAARRAACCTTEERR SSEETTSS section below for more details. + + -hhffss-uunnlloocckk + By default, mmkkiissooffss will create an HFS volume that is + _l_o_c_k_e_d. This option leaves the volume unlocked so that + other applications (e.g. hfsutils) can modify the + volume. See the HHFFSS PPRROOBBLLEEMMSS//LLIIMMIITTAATTIIOONNSS section below + + + +Version 3.0 Last change: 2010/04/25 32 + + + + + + +Maintenance Procedures MKISOFS(8) + + + + for warnings about using this option. + + -hhffss-bblleessss _f_o_l_d_e_r__n_a_m_e + "Bless" the given directory (folder). This is usually + the SSyysstteemm FFoollddeerr and is used in creating HFS bootable + CDs. The name of the directory must be the whole path + name as mmkkiissooffss sees it. e.g. if the given pathspec is + ./cddata and the required folder is called System + Folder, then the whole path name is "./cddata/System + Folder" (remember to use quotes if the name contains + spaces). + + -hhffss-ppaarrmmss _P_A_R_A_M_E_T_E_R_S + Override certain parameters used to create the HFS file + system. Unlikely to be used in normal circumstances. + See the libhfs_iso/hybrid.h source file for details. + + --ccaapp + Look for AUFS CAP Macintosh files. Search for CAP + Apple/Unix file formats only. Searching for the other + possible Apple/Unix file formats is disabled, unless + other _d_o_u_b_l_e _d_a_s_h options are given. + + --nneettaattaallkk + Look for NETATALK Macintosh files + + --ddoouubbllee + Look for AppleDouble Macintosh files + + --eetthheerrsshhaarree + Look for Helios EtherShare Macintosh files + + --uusshhaarree + Look for IPT UShare Macintosh files + + --eexxcchhaannggee + Look for PC Exchange Macintosh files + + --ssggii + Look for SGI Macintosh files + + --xxiinneett + Look for XINET Macintosh files + + --mmaaccbbiinn + Look for MacBinary Macintosh files + + --ssiinnggllee + Look for AppleSingle Macintosh files + + --ddaavvee + Look for Thursby Software Systems DAVE Macintosh files + + + +Version 3.0 Last change: 2010/04/25 33 + + + + + + +Maintenance Procedures MKISOFS(8) + + + + --ssffmm + Look for Microsoft's Services for Macintosh files (NT + only) (Alpha) + + --oossxx-ddoouubbllee + Look for MacOS X AppleDouble Macintosh files + + --oossxx-hhffss + Look for MacOS X HFS Macintosh files + + +CCHHAARRAACCTTEERR SSEETTSS + mmkkiissooffss processes file names in a POSIX compliant way as + strings of 8-bit characters. To represent all codings for + all languages, 8-bit characters are not sufficient. Unicode + or IISSOO--1100664466 define character codings that need at least 21 + bits to represent all known languages. They may be + represented with UUTTFF--3322, UUTTFF--1166 or UUTTFF--88 coding. UUTTFF--3322 + uses a plain 32-bit coding but seems to be uncommon. UUCCSS--22 + is used by Microsoft with Win32. This coding is similar to + UUTTFF--1166 with the disadvantage that it only supports a 16 bit + subset of all codes and that 16-bit characters are not com- + pliant with the POSIX filesystem interface. + + Modern UNIX operating systems may use UUTTFF--88 coding for + filenames. This coding allows to use the complete Unicode + code set. Each 32-bit character is represented by one or + more 8-bit characters. If a character is coded in IISSOO-- + 88885599--11 (used in Central Europe and North America) is maps + 1:1 to a UUTTFF--3322 or UUTTFF--1166 coded Unicode character. If a + character is coded in 77--BBiitt AASSCCIIII (used in USA and other + countries with limited character set) is maps 1:1 to a UUTTFF-- + 3322, UUTTFF--1166 or UUTTFF--88 coded Unicode character. Character + codes that cannot be represented as a single byte in UTF-8 + (typically if the value is > 0x7F) use escape sequences that + map to more than one 8-bit character. + + If all operating systems would use UUTTFF--88 coding, mmkkiissooffss + would not need to recode characters in file names. Unfor- + tunately, Apple uses completely nonstandard codings and + Microsoft uses a Unicode coding that is not compatible with + the POSIX filename interface. + + For all non UUTTFF--88 coded operating systems, the actual char- + acter that each byte represents depends on the _c_h_a_r_a_c_t_e_r _s_e_t + or _c_o_d_e_p_a_g_e (which is the name used by Microsoft) used by + the local operating system in use - the characters in a + character set will reflect the region or natural language + used by the user. + + Usually character codes 0x00-0x1f are control characters, + codes 0x20-0x7f are the 7 bit ASCII characters and (on PC's + + + +Version 3.0 Last change: 2010/04/25 34 + + + + + + +Maintenance Procedures MKISOFS(8) + + + + and Mac's) 0x80-0xff are used for other characters. Unfor- + tunately even this does not follow ISO standards that + reserve the range 0x80-0x9f for control characters and only + allow 0xa0-0xff for other characters. + + As there is a lot more than 256 characters/symbols in use, + only a small subset are represented in a character set. + Therefore the same character code may represent a different + character in different character sets. So a file name gen- + erated, say in central Europe, may not display the same + character when viewed on a machine in, say eastern Europe. + + To make matters more complicated, different operating sys- + tems use different character sets for the region or + language. For example the character code for "small e with + acute accent" may be character code 0x82 on a PC, code 0x8e + on a Macintosh and code 0xe9 on a UNIX system. Note while + the codings used on a PC or Mac are nonstandard, Unicode + codes this character as 0x00000000e9 which is basically the + same value as the value used by most UNIX systems. + + As long as not all operating systems and applications will + use the Unicode character set as the basis for file names in + a unique way, it may be necessary to specify which character + set your file names use in and which character set the file + names should appear on the CD. + + There are four options to specify the character sets you + want to use: + + -input-charset + Defines the local character set you are using on your + host machine. Any character set conversions that take + place will use this character set as the staring point. + The default input character sets are _c_p_4_3_7 on DOS based + systems and _i_s_o_8_8_5_9-_1 on all other systems. + + If the -_J option is given, then the Unicode equivalents + of the input character set will be used in the Joliet + directory. Using the -_j_c_h_a_r_s_e_t option is the same as + using the -_i_n_p_u_t-_c_h_a_r_s_e_t and -_J options. + + -output-charset + Defines the character set that will be used with for + the Rock Ridge names on the CD. Defaults to the input + character set. Only likely to be useful if used on a + non-Unix platform. e.g. using mmkkiissooffss on a Microsoft + Win32 machine to create Rock Ridge CDs. If you are + using mmkkiissooffss on a Unix machine, it is likely that the + output character set will be the same as the input + character set. + + + + +Version 3.0 Last change: 2010/04/25 35 + + + + + + +Maintenance Procedures MKISOFS(8) + + + + -input-hfs-charset + Defines the HFS character set used for HFS file names + decoded from any of the various Apple/Unix file for- + mats. Only useful when used with -_m_a_c-_n_a_m_e option. See + the HHFFSS MMAACCIINNTTOOSSHH FFIILLEE NNAAMMEESS for more information. + Defaults to _c_p_1_0_0_0_0 (Mac Roman). + + -output-hfs-charset + Defines the HFS character set used to create HFS file + names from the input character set in use. In most + cases this will be from the character set given with + the -_i_n_p_u_t-_c_h_a_r_s_e_t option. Defaults to the input HFS + character set. + + There are a number of character sets built in to _m_k_i_s_o_f_s. + To get a listing, use mmkkiissooffss -iinnppuutt-cchhaarrsseett hheellpp.. + + Additional character sets from iiccoonnvv(1) may be used on sys- + tems, that support iiccoonnvv(1). In this case, call iiccoonnvv -ll to + get a list of valid character sets from this coding method. + To force an iiccoonnvv(1) based coding, use iiccoonnvv::_n_a_m_e instead of + _n_a_m_e for the character set. + + If using non iiccoonnvv(1) based character sets, additional char- + acter sets can be read from file for any of the character + set options by giving a filename as the argument to the + options. The given file will only be read if its name does + not match one of the built in character sets. + + The format of the character set files is the same as the + mapping files available from + http://www.unicode.org/Public/MAPPINGS The format of these + files is: + + Column #1 is the input byte code (in hex as 0xXX) + Column #2 is the Unicode (in hex as 0xXXXX) + Rest of the line is ignored. + + Any blank line, line without two (or more) columns in the + above format or comments lines (starting with the # charac- + ter) are ignored without any warnings. Any missing input + code is mapped to Unicode character 0x0000. + + Note that there is no support for 16 bit UNICODE (UTF-16) or + 32 bit UNICODE (UTF-32) coding because this coding is not + POSIX compliant. There should be support for UTF-8 UNICODE + coding which is compatible to POSIX filenames and supported + by moder UNIX implementations such as Solaris. + + A 1:1 character set mapping can be defined by using the key- + word _d_e_f_a_u_l_t as the argument to any of the character set + options. This is the behaviour of older (v1.12) versions of + + + +Version 3.0 Last change: 2010/04/25 36 + + + + + + +Maintenance Procedures MKISOFS(8) + + + + mmkkiissooffss. + + The ISO-9660 file names generated from the input filenames + are not converted from the input character set. The ISO-9660 + character set is a very limited subset of the ASCII charac- + ters, so any conversion would be pointless. + + Any character that mmkkiissooffss can not convert will be replaced + with a '_' character. + +HHFFSS CCRREEAATTOORR//TTYYPPEE + A Macintosh file has two properties associated with it which + define which application created the file, the _C_R_E_A_T_O_R and + what data the file contains, the _T_Y_P_E. Both are (exactly) 4 + letter strings. Usually this allows a Macintosh user to + double-click on a file and launch the correct application + etc. The CREATOR and TYPE of a particular file can be found + by using something like ResEdit (or similar) on a Macintosh. + + The CREATOR and TYPE information is stored in all the vari- + ous Apple/Unix encoded files. For other files it is possi- + ble to base the CREATOR and TYPE on the filename's extension + using a _m_a_p_p_i_n_g file (the -mmaapp option) and/or using the + _m_a_g_i_c _n_u_m_b_e_r (usually a _s_i_g_n_a_t_u_r_e in the first few bytes) of + a file (the -mmaaggiicc option). If both these options are given, + then their order on the command line is important. If the + -mmaapp option is given first, then a filename extension match + is attempted before a magic number match. However, if the + -mmaaggiicc option is given first, then a magic number match is + attempted before a filename extension match. + + If a mapping or magic file is not used, or no match is found + then the default CREATOR and TYPE for all regular files can + be set by using entries in the ..mmkkiissooffssrrcc file or using the + -hhffss-ccrreeaattoorr and/or -hhffss-ttyyppee options, otherwise the default + CREATOR and TYPE are 'unix' and 'TEXT'. + + The format of the _m_a_p_p_i_n_g file is the same _a_f_p_f_i_l_e format as + used by _a_u_f_s. This file has five columns for the _e_x_t_e_n_s_i_o_n, + _f_i_l_e _t_r_a_n_s_l_a_t_i_o_n, _C_R_E_A_T_O_R, _T_Y_P_E and _C_o_m_m_e_n_t. Lines starting + with the '#' character are comment lines and are ignored. An + example file would be like: + + # Example filename mapping file + # + # EXTN XLate CREATOR TYPE Comment + .tif Raw '8BIM' 'TIFF' "Photoshop TIFF image" + .hqx Ascii 'BnHq' 'TEXT' "BinHex file" + .doc Raw 'MSWD' 'WDBN' "Word file" + .mov Raw 'TVOD' 'MooV' "QuickTime Movie" + * Ascii 'ttxt' 'TEXT' "Text file" + + + + +Version 3.0 Last change: 2010/04/25 37 + + + + + + +Maintenance Procedures MKISOFS(8) + + + + Where: + + The first column _E_X_T_N defines the Unix filename exten- + sion to be mapped. The default mapping for any filename + extension that doesn't match is defined with the "*" + character. + + The _X_l_a_t_e column defines the type of text translation + between the Unix and Macintosh file it is ignored by + mmkkiissooffss, but is kept to be compatible with aauuffss(1). + Although mmkkiissooffss does not alter the contents of a file, + if a binary file has its TYPE set as 'TEXT', it _m_a_y be + read incorrectly on a Macintosh. Therefore a better + choice for the default TYPE may be '????' + + The _C_R_E_A_T_O_R and _T_Y_P_E keywords must be 4 characters long + and enclosed in single quotes. + + The comment field is enclosed in double quotes - it is + ignored by mmkkiissooffss, but is kept to be compatible with + aauuffss. + + The format of the _m_a_g_i_c file is almost identical to the + mmaaggiicc(4) file used by the Linux ffiillee(1) command - the rou- + tines for reading and decoding the _m_a_g_i_c file are based on + the Linux ffiillee(1) command. + + This file has four tab separated columns for the _b_y_t_e + _o_f_f_s_e_t, _t_y_p_e, _t_e_s_t and _m_e_s_s_a_g_e. Lines starting with the '#' + character are comment lines and are ignored. An example file + would be like: + + # Example magic file + # + # off type test message + 0 string GIF8 8BIM GIFf GIF image + 0 beshort 0xffd8 8BIM JPEG image data + 0 string SIT! SIT! SIT! StuffIt Archive + 0 string 37235 LZIV ZIVU standard unix compress + 0 string 37213 GNUz ZIVU gzip compressed data + 0 string %! ASPS TEXT Postscript + 0 string 04%! ASPS TEXT PC Postscript with a ^D to start + 4 string moov txtt MooV QuickTime movie file (moov) + 4 string mdat txtt MooV QuickTime movie file (mdat) + + The format of the file is described in the mmaaggiicc(4) man + page. The only difference here is that for each entry in the + magic file, the _m_e_s_s_a_g_e for the initial offset mmuusstt be 4 + characters for the CREATOR followed by 4 characters for the + TYPE - white space is optional between them. Any other char- + acters on this line are ignored. Continuation lines (start- + ing with a '>') are also ignored i.e. only the initial + + + +Version 3.0 Last change: 2010/04/25 38 + + + + + + +Maintenance Procedures MKISOFS(8) + + + + offset lines are used. + + Using the -mmaaggiicc option may significantly increase process- + ing time as each file has to opened and read to find its + magic number. + + In summary, for all files, the default CREATOR is 'unix' and + the default TYPE is 'TEXT'. These can be changed by using + entries in the ._m_k_i_s_o_f_s_r_c file or by using the -hhffss-ccrreeaattoorr + and/or -hhffss-ttyyppee options. + + If the a file is in one of the known Apple/Unix formats (and + the format has been selected), then the CREATOR and TYPE are + taken from the values stored in the Apple/Unix file. + + Other files can have their CREATOR and TYPE set from their + file name extension (the -mmaapp option), or their magic number + (the -mmaaggiicc option). If the default match is used in the + _m_a_p_p_i_n_g file, then these values override the default CREATOR + and TYPE. + + A full CREATOR/TYPE database can be found at + http://www.angelfire.com/il/szekely/index.html + + +HHFFSS MMAACCIINNTTOOSSHH FFIILLEE FFOORRMMAATTSS + Macintosh files have two parts called the _D_a_t_a and _R_e_s_o_u_r_c_e + fork. Either may be empty. Unix (and many other OSs) can + only cope with files having one part (or fork). To add to + this, Macintosh files have a number of attributes associated + with them - probably the most important are the TYPE and + CREATOR. Again Unix has no concept of these types of attri- + butes. + + e.g. a Macintosh file may be a JPEG image where the image is + stored in the Data fork and a desktop thumbnail stored in + the Resource fork. It is usually the information in the data + fork that is useful across platforms. + + Therefore to store a Macintosh file on a Unix filesystem, a + way has to be found to cope with the two forks and the extra + attributes (which are referred to as the _f_i_n_d_e_r _i_n_f_o). + Unfortunately, it seems that every software package that + stores Macintosh files on Unix has chosen a completely dif- + ferent storage method. + + The Apple/Unix formats that _m_k_i_s_o_f_s (partially) supports + are: + + CAP AUFS format + Data fork stored in a file. Resource fork in subdirec- + tory .resource with same filename as data fork. Finder + + + +Version 3.0 Last change: 2010/04/25 39 + -SSYYNNOOPPSSIISS - mmkkiissooffss [ _o_p_t_i_o_n_s ] [ --oo _f_i_l_e_n_a_m_e ] _p_a_t_h_s_p_e_c _[_p_a_t_h_s_p_e_c - _._._._] -DDEESSCCRRIIPPTTIIOONN - mmkkiissooffss is effectively a pre-mastering program to generate - an ISO9660/JOLIET/HFS hybrid filesystem. - mmkkiissooffss is capable of generating the SSyysstteemm UUssee SShhaarriinngg - PPrroottooccooll rreeccoorrddss ((SSUUSSPP)) specified by the RRoocckk RRiiddggee IInntteerr-- - cchhaannggee PPrroottooccooll.. This is used to further describe the - files in the iso9660 filesystem to a unix host, and pro- - vides information such as longer filenames, uid/gid, posix - permissions, symbolic links, block and character devices. - - If Joliet or HFS hybrid command line options are speci- - fied, mmkkiissooffss will create additional filesystem meta data - for Joliet or HFS. The file content in this case refers - to the same data blocks on the media. It will generate a - pure ISO9660 filesystem unless the Joliet or HFS hybrid - command line options are given. - - mmkkiissooffss can generate a _t_r_u_e (or _s_h_a_r_e_d) HFS hybrid - filesystem. The same files are seen as HFS files when - accessed from a Macintosh and as ISO9660 files when - accessed from other machines. HFS stands for _H_i_e_r_a_r_c_h_i_c_a_l - _F_i_l_e _S_y_s_t_e_m and is the native file system used on Macin- - tosh computers. - - As an alternative, mmkkiissooffss can generate the _A_p_p_l_e _E_x_t_e_n_- - _s_i_o_n_s _t_o _I_S_O_9_6_6_0 for each file. These extensions provide - each file with CREATOR, TYPE and certain Finder Flags when - accessed from a Macintosh. See the HHFFSS MMAACCIINNTTOOSSHH FFIILLEE FFOORR-- - MMAATTSS section below. - - mmkkiissooffss takes a snapshot of a given directory tree, and - generates a binary image which will correspond to an - ISO9660 or HFS filesystem when written to a block device. - - Each file written to the iso9660 filesystem must have a - filename in the 8.3 format (8 characters, period, 3 char- - acters, all upper case), even if Rock Ridge is in use. - This filename is used on systems that are not able to make - use of the Rock Ridge extensions (such as MS-DOS), and - each filename in each directory must be different from the - other filenames in the same directory. mmkkiissooffss generally - tries to form correct names by forcing the unix filename - to upper case and truncating as required, but often times - this yields unsatisfactory results when there are cases - where the truncated names are not all unique. mmkkiissooffss - assigns weightings to each filename, and if two names that - are otherwise the same are found the name with the lower - priority is renamed to have a 3 digit number as an exten- - sion (where the number is guaranteed to be unique). An - example of this would be the files foo.bar and foo.bar.~1~ - - the file foo.bar.~1~ would be written as FOO000.BAR;1 - and the file foo.bar would be written as FOO.BAR;1 - - When used with various HFS options, mmkkiissooffss will attempt - to recognise files stored in a number of Apple/Unix file - formats and will copy the data and resource forks as well - as any relevant finder information. See the HHFFSS MMAACCIINNTTOOSSHH - FFIILLEE FFOORRMMAATTSS section below for more about formats mmkkiissooffss - supports. - - Note that mmkkiissooffss is not designed to communicate with the - writer directly. Most writers have proprietary command - sets which vary from one manufacturer to another, and you - need a specialized tool to actually burn the disk. - - The ccddrreeccoorrdd utility is a utility capable of burning an - actual disc. The latest version of ccddrreeccoorrdd is available - from ftp://ftp.berlios.de/pub/cdrecord - - Also you should know that most cd writers are very partic- - ular about timing. Once you start to burn a disc, you - cannot let their buffer empty before you are done, or you - will end up with a corrupt disc. Thus it is critical that - you be able to maintain an uninterrupted data stream to - the writer for the entire time that the disc is being - written. - - ppaatthhssppeecc is the path of the directory tree to be copied - into the iso9660 filesystem. Multiple paths can be speci- - fied, and mmkkiissooffss will merge the files found in all of the - specified path components to form the cdrom image. - - If the option _-_g_r_a_f_t_-_p_o_i_n_t_s has been specified, it is pos- - sible to graft the paths at points other than the root - directory, and it is possible to graft files or directo- - ries onto the cdrom image with names different than what - they have in the source filesystem. This is easiest to - illustrate with a couple of examples. Let's start by - assuming that a local file ../old.lis exists, and you wish - to include it in the cdrom image. - - - foo/bar/=../old.lis - - will include the file old.lis in the cdrom image at - /foo/bar/old.lis, while - - foo/bar/xxx=../old.lis - - will include the file old.lis in the cdrom image at - /foo/bar/xxx. The same sort of syntax can be used with - directories as well. mmkkiissooffss will create any directories - required such that the graft points exist on the cdrom - image - the directories do not need to appear in one of - the paths. By default, any directories that are created - on the fly like this will have permissions 0555 and appear - to be owned by the person running mkisofs. If you wish - other permissions or owners of the intermediate directo- - ries, see -uid, -gid, -dir-mode, -file-mode and -new-dir- - mode. - - mmkkiissooffss will also run on Win9X/NT4 machines when compiled - with Cygnus' cygwin (available from http://source- - ware.cygnus.com/cygwin/). Therefore most references in - this man page to _U_n_i_x can be replaced with _W_i_n_3_2. -OOPPTTIIOONNSS - --aabbssttrraacctt _F_I_L_E - Specifies the abstract file name. This parameter - can also be set in the file ..mmkkiissooffssrrcc with - ABST=filename. If specified in both places, the - command line version is used. - - --AA _a_p_p_l_i_c_a_t_i_o_n___i_d - Specifies a text string that will be written into - the volume header. This should describe the appli- - cation that will be on the disc. There is space on - the disc for 128 characters of information. This - parameter can also be set in the file ..mmkkiissooffssrrcc - with APPI=id. If specified in both places, the - command line version is used. - - --aallllooww--lloowweerrccaassee - This options allows lower case characters to appear - in iso9660 filenames. - This violates the ISO9660 standard, but it happens - to work on some systems. Use with caution. - - --aallllooww--mmuullttiiddoott - This options allows more than one dot to appear in - iso9660 filenames. A leading dot is not affected - by this option, it may be allowed separately using - the --LL option. - This violates the ISO9660 standard, but it happens - to work on many systems. Use with caution. - - --bbiibblliioo _F_I_L_E - Specifies the bibliographic file name. This param- - eter can also be set in the file ..mmkkiissooffssrrcc with - BIBLO=filename. If specified in both places, the - command line version is used. - - --ccaacchhee--iinnooddeess - Cache inode and device numbers to find hard links - to files. If mmkkiissooffss finds a hard link (a file - with multiple names), then the file will only - appear once on the CD. This helps to save space on - the CD. The option --ccaacchhee--iinnooddeess is default on - UNIX like operating systems. Be careful when using - this option on a filesystem without unique inode - numbers as it may result in files containing the - wrong content on CD. - - --nnoo--ccaacchhee--iinnooddeess - Do not cache inode and device numbers. This option - is needed whenever a filesystem does not have - unique inode numbers. It is the default on CCyyggwwiinn. - As the Microsoft operating system that runs below - CCyyggwwiinn is not POSIX compliant, it does not have - unique inode numbers. Cygwin creates fake inode - numbers from a hash algorithm that is not 100% cor- - rect. If mmkkiissooffss would cache inodes on Cygwin, it - would believe that some files are identical - although they are not. The result in this case are - files that contain the wrong content if a signifi- - cant amount of different files (> ~5000) is in - inside the tree that is to be archived. This does - not happen when the --nnoo--ccaacchhee--iinnooddeess iiss uusseedd,, bbuutt - tthhee ddiissaaddvvaannttaaggee iiss tthhaatt mmkkiissooffss cannot detect - hardlinks anymore and the resulting CD image may be - larger than expected. - - --bb _e_l_t_o_r_i_t_o___b_o_o_t___i_m_a_g_e - Specifies the path and filename of the boot image - to be used when making an "El Torito" bootable CD. - The pathname must be relative to the source path - specified to mmkkiissooffss.. This option is required to - make an "El Torito" bootable CD. The boot image - must be exactly the size of either a 1200, 1440, or - a 2880 kB floppy, and mmkkiissooffss will use this size - when creating the output iso9660 filesystem. It is - assumed that the first 512 byte sector should be - read from the boot image (it is essentially emulat- - ing a normal floppy drive). This will work, for - example, if the boot image is a LILO based boot - floppy. - - If the boot image is not an image of a floppy, you - need to add one of the options: --hhaarrdd--ddiisskk--bboooott or - --nnoo--eemmuull--bboooott. If the system should not boot off - the emulated disk, use --nnoo--bboooott. - - --eellttoorriittoo--aalltt--bboooott - Start with a new set of "El Torito" boot parame- - ters. This allows to have more than one El Torito - boot on a CD. A maximum of 63 El Torito boot - entries may be put on a single CD. - - --BB _i_m_g___s_u_n_4_,_i_m_g___s_u_n_4_c_,_i_m_g___s_u_n_4_m_,_i_m_g___s_u_n_4_d_,_i_m_g___s_u_n_4_e - Specifies a comma separated list of boot images - that are needed to make a bootable CD for sparc - systems. There may be empty fields in the comma - separated list. This option is required to make a - bootable CD for Sun sparc systems. If the --BB or - --ssppaarrcc--bboooott option has been specified, the first - sector of the resulting image will contain a Sun - disk label. This disk label specifies slice 0 for - the iso9660 image and slice 1 ... slice 7 for the - boot images that have been specified with this - option. Byte offset 512 ... 8191 within each of the - additional boot images must contain a primary boot - that works for the appropriate sparc architecture. - The rest of each of the images usually contains an - ufs filesystem that is used primary kernel boot - stage. - - The implemented boot method is the boot method - found with SunOS 4.x and SunOS 5.x. However, it - does not depend on SunOS internals but only on - properties of the Open Boot prom. For this reason, - it should be usable for any OS that boots off a - sparc system. - - If the special filename ...... is used, the actual - and all following boot partitions are mapped to the - previous partition. If mmkkiissooffss is called with --GG - _i_m_a_g_e --BB _._._. all boot partitions are mapped to the - partition that contains the iso9660 filesystem - image and the generic boot image that is located in - the first 16 sectors of the disk is used for all - architectures. - - --GG _g_e_n_e_r_i_c___b_o_o_t___i_m_a_g_e - Specifies the path and filename of the generic boot - image to be used when making a generic bootable CD. - The ggeenneerriicc__bboooott__iimmaaggee will be placed on the first - 16 sectors of the CD. The first 16 sectors are the - sectors that are located before the iso9660 primary - volume descriptor. If this option is used together - with the --ssppaarrcc--bboooott option, the Sun disk label - will overlay the first 512 bytes of the generic - boot image. - - --hhaarrdd--ddiisskk--bboooott - Specifies that the boot image used to create "El - Torito" bootable CDs is a hard disk image. The hard - disk image must begin with a master boot record - that contains a single partition. - - --nnoo--eemmuull--bboooott - Specifies that the boot image used to create "El - Torito" bootable CDs is a 'no emulation' image. The - system will load and execute this image without - performing any disk emulation. - - --nnoo--bboooott - Specifies that the created "El Torito" CD should be - marked as not bootable. The system will provide an - emulated drive for the image, but will boot off a - standard boot device. - - --bboooott--llooaadd--sseegg _s_e_g_m_e_n_t___a_d_d_r_e_s_s - Specifies the load segment address of the boot - image for no-emulation "El Torito" CDs. - - --bboooott--llooaadd--ssiizzee _l_o_a_d___s_e_c_t_o_r_s - Specifies the number of "virtual" (512-byte) sec- - tors to load in no-emulation mode. The default is - to load the entire boot file. Some BIOSes may have - problems if this is not a multiple of 4. - - --bboooott--iinnffoo--ttaabbllee - Specifies that a 56-byte table with information of - the CD-ROM layout will be patched in at offset 8 in - the boot file. If this option is given, the boot - file is modified in the source filesystem, so make - sure to make a copy if this file cannot be easily - regenerated! See the EELL TTOORRIITTOO BBOOOOTT IINNFFOO TTAABBLLEE - section for a description of this table. - - --CC _l_a_s_t___s_e_s_s___s_t_a_r_t_,_n_e_x_t___s_e_s_s___s_t_a_r_t - This option is needed when mmkkiissooffss is used to cre- - ate a CDextra or the image of a second session or a - higher level session for a multi session disk. The - option --CC takes a pair of two numbers separated by - a comma. The first number is the sector number of - the first sector in the last session of the disk - that should be appended to. The second number is - the starting sector number of the new session. The - expected pair of numbers may be retrieved by call- - ing ccddrreeccoorrdd --mmssiinnffoo ...... If the --CC option is used - in conjunction with the --MM option, mmkkiissooffss will - create a filesystem image that is intended to be a - continuation of the previous session. If the --CC - option is used without the --MM option, mmkkiissooffss will - create a filesystem image that is intended to be - used for a second session on a CDextra. This is a - multi session CD that holds audio data in the first - session and a ISO9660 filesystem in the second ses- - sion. - - --cc _b_o_o_t___c_a_t_a_l_o_g - Specifies the path and filename of the boot catalog - to be used when making an "El Torito" bootable CD. - The pathname must be relative to the source path - specified to mmkkiissooffss.. This option is required to - make a bootable CD. This file will be inserted - into the output tree and not created in the source - filesystem, so be sure the specified filename does - not conflict with an existing file, as it will be - excluded. Usually a name like "boot.catalog" is - chosen. - - --cchheecckk--oollddnnaammeess - Check all filenames imported from old session for - compliance with actual mmkkiissooffss iso9660 file naming - rules. It his option is not present, only names - with a length > 31 are checked as these files are a - hard violation of the iso9660 standard. - - --cchheecckk--sseessssiioonn _F_I_L_E - Check all old sessions for compliance with actual - mmkkiissooffss iso9660 file naming rules. This is a high - level option that is a combination of the options: - --MM _F_I_L_E --CC 00,,00 --cchheecckk--oollddnnaammeess For the parameter - _F_I_L_E see description of --MM option. - - --ccooppyyrriigghhtt _F_I_L_E - Specifies the Copyright file name. This parameter - can also be set in the file ..mmkkiissooffssrrcc with - COPY=filename. If specified in both places, the - command line version is used. - - --dd Omit trailing period from files that do not have a - period. - This violates the ISO9660 standard, but it happens - to work on many systems. Use with caution. - - --DD Do not use deep directory relocation, and instead - just pack them in the way we see them. - This violates the ISO9660 standard, but it happens - to work on many systems. Use with caution. - - --ddiirr--mmooddee _m_o_d_e - Overrides the mode of directories used to create - the image to _m_o_d_e. Specifying this option automat- - ically enables Rock Ridge extensions. - - --ddvvdd--vviiddeeoo - Generate DVD-Video compliant UDF file system. This - is done by sorting the order of the content of the - appropriate files and by adding padding between the - files if needed. - - --ff Follow symbolic links when generating the filesys- - tem. When this option is not in use, symbolic - links will be entered using Rock Ridge if enabled, - otherwise the file will be ignored. - - --ffiillee--mmooddee _m_o_d_e - Overrides the mode of regular files used to create - the image to _m_o_d_e. Specifying this option automat- - ically enables Rock Ridge extensions. - - --ggiidd _g_i_d - Overrides the gid read from the source files to the - value of _g_i_d. Specifying this option automatically - enables Rock Ridge extensions. - - --gguuii Switch the behaviour for a GUI. This currently - makes the output more verbose but may have other - effects in future. - - --ggrraafftt--ppooiinnttss - Allow to use graft points for filenames. If this - option is used, all filenames are checked for graft - points. The filename is divided at the first - unescaped equal sign. All occurrences of '\\' and - '=' characters must be escaped with '\\' if _-_g_r_a_f_t_- - _p_o_i_n_t_s has been specified. - - --hhiiddee _g_l_o_b - Hide _g_l_o_b from being seen on the ISO9660 or Rock - Ridge directory. _g_l_o_b is a shell wild-card-style - pattern that must match any part of the filename or - path. Multiple globs may be hidden. If _g_l_o_b - matches a directory, then the contents of that - directory will be hidden. In order to match a - directory name, make sure the pathname does not - include a trailing '/' character. All the hidden - files will still be written to the output CD image - file. Should be used with the --hhiiddee--jjoolliieett option. - See README.hide for more details. - - --hhiiddee--lliisstt _f_i_l_e - A file containing a list of _g_l_o_b_s to be hidden as - above. - - --hhiiddddeenn _g_l_o_b - Add the hidden (existence) ISO9660 directory - attribute for _g_l_o_b. This attribute will prevent - _g_l_o_b from being listed on DOS based systems if the - /A flag is not used for the listing. _g_l_o_b is a - shell wild-card-style pattern that must match any - part of the filename or path. In order to match a - directory name, make sure the pathname does not - include a trailing '/' character. Multiple globs - may be hidden. - - --hhiiddddeenn--lliisstt _f_i_l_e - A file containing a list of _g_l_o_b_s to get the hidden - attribute as above. - - --hhiiddee--jjoolliieett _g_l_o_b - Hide _g_l_o_b from being seen on the Joliet directory. - _g_l_o_b is a shell wild-card-style pattern that must - match any part of the filename or path. Multiple - globs may be hidden. If _g_l_o_b matches a directory, - then the contents of that directory will be hidden. - In order to match a directory name, make sure the - pathname does not include a trailing '/' character. - All the hidden files will still be written to the - output CD image file. Should be used with the - --hhiiddee option. See README.hide for more details. - - --hhiiddee--jjoolliieett--lliisstt _f_i_l_e - A file containing a list of _g_l_o_b_s to be hidden as - above. - - --hhiiddee--jjoolliieett--ttrraannss--ttbbll - Hide the TTRRAANNSS..TTBBLL files from the Joliet tree. - These files usually don't make sense in the Joliet - World as they list the real name and the ISO9660 - name which may both be different from the Joliet - name. - - --hhiiddee--rrrr--mmoovveedd - Rename the directory RRRR__MMOOVVEEDD to ..rrrr__mmoovveedd in the - Rock Ridge tree. It seems to be impossible to com- - pletely hide the RRRR__MMOOVVEEDD directory from the Rock - Ridge tree. This option only makes the visible - tree better to understand for people who don't know - what this directory is for. If you need to have no - RRRR__MMOOVVEEDD directory at all, you should use the --DD - option. Note that in case that the --DD option has - been specified, the resulting filesystem is not - ISO9660 level-1 compliant and will not be readable - on MS-DOS. See also NNOOTTEESS section for more infor- - mation on the RRRR__MMOOVVEEDD directory. - - --ll Allow full 31 character filenames. Normally the - ISO9660 filename will be in an 8.3 format which is - compatible with MS-DOS, even though the ISO9660 - standard allows filenames of up to 31 characters. - If you use this option, the disc may be difficult - to use on a MS-DOS system, but this comes in handy - on some other systems (such as the Amiga). Use - with caution. - - --iinnppuutt--cchhaarrsseett _c_h_a_r_s_e_t - Input charset that defines the characters used in - local file names. To get a list of valid charset - names, call mmkkiissooffss --iinnppuutt--cchhaarrsseett hheellpp.. To get a - 1:1 mapping, you may use ddeeffaauulltt as charset name. - The default initial values are _c_p_4_3_7 on DOS based - systems and _i_s_o_8_8_5_9_-_1 on all other systems. See - CCHHAARRAACCTTEERR SSEETTSS section below for more details. - - --oouuttppuutt--cchhaarrsseett _c_h_a_r_s_e_t - Output charset that defines the characters that - will be used in Rock Ridge file names. Defaults to - the input charset. See CCHHAARRAACCTTEERR SSEETTSS section below - for more details. - - --iissoo--lleevveell _l_e_v_e_l - Set the iso9660 conformance level. Valid numbers - are 1..3. - - With level 1, files may only consist of one section - and filenames are restricted to 8.3 characters. - - With level 2, files may only consist of one sec- - tion. - - With level 3, no restrictions apply. - - With all iso9660 levels all filenames are - restricted to upper case letters, numbers and the - underscore (_). The maximum filename length is - restricted to 31 characters, the directory nesting - level is restricted to 8 and the maximum path - length is limited to 255 characters. - - --JJ Generate Joliet directory records in addition to - regular iso9660 file names. This is primarily use- - ful when the discs are to be used on Windows-NT or - Windows-95 machines. The Joliet filenames are - specified in Unicode and each path component can be - up to 64 Unicode characters long. Note that Joliet - is no standard - CD's that use only Joliet exten- - sions but no standard Rock Ridge extensions may - usually only be used on Microsoft Win32 systems. - Furthermore, the fact that the filenames are lim- - ited to 64 characters and the fact that Joliet uses - the UTF-16 coding for Unicode characters causes - interoperability problems. - - --jjoolliieett--lloonngg - Allow Joliet filenames to be up to 103 Unicode - characters. This breaks the Joliet specification - - but appears to work. Use with caution. The number - 103 is derived from: the maximum Directory Record - Length (254), minus the length of Directory Record - (33), minus CD-ROM XA System Use Extension Informa- - tion (14), divided by the UTF-16 character size - (2). - - --jjcchhaarrsseett _c_h_a_r_s_e_t - Same as using --iinnppuutt--cchhaarrsseett _c_h_a_r_s_e_t and --JJ - options. See CCHHAARRAACCTTEERR SSEETTSS section below for more - details. - - --LL Allow ISO9660 filenames to begin with a period. - Usually, a leading dot is replaced with an under- - score in order to maintain MS-DOS compatibility. - This violates the ISO9660 standard, but it happens - to work on many systems. Use with caution. - - --lloogg--ffiillee _l_o_g___f_i_l_e - Redirect all error, warning and informational mes- - sages to _l_o_g___f_i_l_e instead of the standard error. - - --mm _g_l_o_b - Exclude _g_l_o_b from being written to CDROM. _g_l_o_b is - a shell wild-card-style pattern that must match - part of the filename (not the path as with option - --xx). Technically _g_l_o_b is matched against the - _d_-_>_d___n_a_m_e part of the directory entry. Multiple - globs may be excluded. Example: - - mkisofs -o rom -m '*.o' -m core -m foobar - - would exclude all files ending in ".o", called - "core" or "foobar" to be copied to CDROM. Note that - if you had a directory called "foobar" it too (and - of course all its descendants) would be excluded. - - NOTE: The --mm and --xx option description should both - be updated, they are wrong. Both now work identi- - cal and use filename globbing. A file is excluded - if either the last component matches or the whole - path matches. - - --eexxcclluuddee--lliisstt _f_i_l_e - A file containing a list of _g_l_o_b_s to be exclude as - above. - - --mmaaxx--iissoo99666600--ffiilleennaammeess - Allow 37 chars in iso9660 filenames. This option - forces the --NN option as the extra name space is - taken from the space reserved for ISO-9660 version - numbers. - This violates the ISO9660 standard, but it happens - to work on many systems. Although a conforming - application needs to provide a buffer space of at - least 37 characters, disks created with this option - may cause a buffer overflow in the reading operat- - ing system. Use with extreme care. - - --MM _p_a_t_h - or - - --MM _d_e_v_i_c_e - Specifies path to existing iso9660 image to be - merged. The alternate form takes a SCSI device - specifier that uses the same syntax as the ddeevv== - parameter of ccddrreeccoorrdd.. The output of mmkkiissooffss will - be a new session which should get written to the - end of the image specified in -M. Typically this - requires multi-session capability for the recorder - and cdrom drive that you are attempting to write - this image to. This option may only be used in - conjunction with the --CC option. - - --NN Omit version numbers from ISO9660 file names. - This violates the ISO9660 standard, but no one - really uses the version numbers anyway. Use with - caution. - - --nneeww--ddiirr--mmooddee _m_o_d_e - Mode to use when creating new directories in the - iso fs image. The default mode is 0555. - - --nnoobbaakk - - --nnoo--bbaakk - Do not include backup files files on the iso9660 - filesystem. If the --nnoo--bbaakk option is specified, - files that contain the characters '~' or '#' or end - in '.bak' will not be included (these are typically - backup files for editors under unix). - - --ffoorrccee--rrrr - Do not use the automatic Rock Ridge attributes - recognition for previous sessions. This helps to - show rotten iso9660 extension records as e.g. cre- - ated by NERO burning ROM. - - --nnoo--rrrr Do not use the Rock Ridge attributes from previous - sessions. This may help to avoid getting into - trouble when mmkkiissooffss finds illegal Rock Ridge sig- - natures on an old session. - - --nnoo--sspplliitt--ssyymmlliinnkk--ccoommppoonneennttss - Don't split the SL components, but begin a new Con- - tinuation Area (CE) instead. This may waste some - space, but the SunOS 4.1.4 cdrom driver has a bug - in reading split SL components (link_size = compo- - nent_size instead of link_size += component_size). - - --nnoo--sspplliitt--ssyymmlliinnkk--ffiieellddss - Don't split the SL fields, but begin a new Continu- - ation Area (CE) instead. This may waste some space, - but the SunOS 4.1.4 and Solaris 2.5.1 cdrom driver - have a bug in reading split SL fields (a `/' can be - dropped). - - --oo _f_i_l_e_n_a_m_e - is the name of the file to which the iso9660 - filesystem image should be written. This can be a - disk file, a tape drive, or it can correspond - directly to the device name of the optical disc - writer. If not specified, stdout is used. Note - that the output can also be a block special device - for a regular disk drive, in which case the disk - partition can be mounted and examined to ensure - that the premastering was done correctly. - - --ppaadd Pad the end of the ISO9660 by 16 sectors (32kB). If - the total size then is not a multiple of 16 sec- - tors, the needed number of sectors is added. If - the option --BB is used, then there is a second - padding at the end of the boot partitions. - - The padding is needed as many operating systems - (e.g. Linux) implement read ahead bugs in their - filesystem I/O. These bugs result in read errors on - one or more files that are located at the end of a - track. They are usually present when the CD is - written in Track at Once mode or when the disk is - written as mixed mode CD where an audio track fol- - lows the data track. - - To avoid problems with I/O error on the last file - on the filesystem, the --ppaadd option has been made - the default. - - --nnoo--ppaadd - Do not Pad the end of the ISO9660 by 16 sectors - (32kB). - - --ppaatthh--lliisstt _f_i_l_e - A file containing a list of _p_a_t_h_s_p_e_c directories - and filenames to be added to the ISO9660 filesys- - tem. This list of pathspecs are processed after any - that appear on the command line. If the argument is - _-, then the list is read from the standard input. - - --PP _p_u_b_l_i_s_h_e_r___i_d - Specifies a text string that will be written into - the volume header. This should describe the pub- - lisher of the CDROM, usually with a mailing address - and phone number. There is space on the disc for - 128 characters of information. This parameter can - also be set in the file ..mmkkiissooffssrrcc with PUBL=. If - specified in both places, the command line version - is used. - - --pp _p_r_e_p_a_r_e_r___i_d - Specifies a text string that will be written into - the volume header. This should describe the pre- - parer of the CDROM, usually with a mailing address - and phone number. There is space on the disc for - 128 characters of information. This parameter can - also be set in the file ..mmkkiissooffssrrcc with PREP=. If - specified in both places, the command line version - is used. - - --pprriinntt--ssiizzee - Print estimated filesystem size in multiples of the - sector size (2048 bytes) and exit. This option is - needed for Disk At Once mode and with some CD-R - drives when piping directly into ccddrreeccoorrdd.. In this - case it is needed to know the size of the filesys- - tem before the actual CD-creation is done. The - option -print-size allows to get this size from a - "dry-run" before the CD is actually written. Old - versions of mmkkiissooffss did write this information - (among other information) to _s_t_d_e_r_r. As this turns - out to be hard to parse, the number without any - other information is now printed on ssttddoouutt too. If - you like to write a simple shell script, redirect - ssttddeerrrr and catch the number from ssttddoouutt. This may - be done with: - - ccddbblloocckkss==`` mmkkiissooffss --pprriinntt--ssiizzee --qquuiieett ...... `` - - mmkkiissooffss ...... || ccddrreeccoorrdd ...... ttssiizzee==$${{ccddbblloocckkss}}ss -- - - --qquuiieett This makes mmkkiissooffss even less verbose. No progress - output will be provided. - - --RR Generate SUSP and RR records using the Rock Ridge - protocol to further describe the files on the - iso9660 filesystem. - - --rr This is like the -R option, but file ownership and - modes are set to more useful values. The uid and - gid are set to zero, because they are usually only - useful on the author's system, and not useful to - the client. All the file read bits are set true, - so that files and directories are globally readable - on the client. If any execute bit is set for a - file, set all of the execute bits, so that executa- - bles are globally executable on the client. If any - search bit is set for a directory, set all of the - search bits, so that directories are globally - searchable on the client. All write bits are - cleared, because the CD-Rom will be mounted read- - only in any case. If any of the special mode bits - are set, clear them, because file locks are not - useful on a read-only file system, and set-id bits - are not desirable for uid 0 or gid 0. When used on - Win32, the execute bit is set on _a_l_l files. This is - a result of the lack of file permissions on Win32 - and the Cygwin POSIX emulation layer. See also - -uid -gid, -dir-mode, -file-mode and -new-dir-mode. - - --rreellaaxxeedd--ffiilleennaammeess - The option --rreellaaxxeedd--ffiilleennaammeess allows ISO9660 file- - names to include digits, uppercase characters and - all other 7 bit ASCII characters (resp. anything - except lowercase characters). - This violates the ISO9660 standard, but it happens - to work on many systems. Use with caution. - - --ssoorrtt _s_o_r_t _f_i_l_e - Sort file locations on the media. Sorting is con- - trolled by a file that contains pairs of filenames - and sorting offset weighting. If the weighting is - higher, the file will be located closer to the - beginning of the media, if the weighting is lower, - the file will be located closer to the end of the - media. There must be only one space or tabs charac- - ter between the filename and the weight and the - weight must be the last characters on a line. The - filename is taken to include all the characters up - to, but not including the last space or tab charac- - ter on a line. This is to allow for space charac- - ters to be in, or at the end of a filename. This - option does nnoott sort the order of the file names - that appear in the ISO9660 directory. It sorts the - order in which the file data is written to the CD - image - which may be useful in order to optimize - the data layout on a CD. See README.sort for more - details. - - --sspplliitt--oouuttppuutt - Split the output image into several files of - approximately 1 GB. This helps to create DVD sized - iso9660 images on operating systems without large - file support. Cdrecord will concatenate more than - one file into a single track if writing to a DVD. - To make --sspplliitt--oouuttppuutt work, the --oo _f_i_l_e_n_a_m_e option - must be specified. The resulting outout images will - be named: _f_i_l_e_n_a_m_e___0_0,_f_i_l_e_n_a_m_e___0_1_,filename_02_._._. - - --ssyyssiidd _I_D - Specifies the system ID. This parameter can also - be set in the file ..mmkkiissooffssrrcc with SYSI=system_id. - If specified in both places, the command line ver- - sion is used. - - --TT Generate a file TRANS.TBL in each directory on the - CDROM, which can be used on non-Rock Ridge capable - systems to help establish the correct file names. - There is also information present in the file that - indicates the major and minor numbers for block and - character devices, and each symlink has the name of - the link file given. - - --ttaabbllee--nnaammee _T_A_B_L_E___N_A_M_E - Alternative translation table file name (see - above). Implies the --TT option. If you are creating - a multi-session image you must use the same name as - in the previous session. - - --uuccss--lleevveell _l_e_v_e_l - Set Unicode conformance level in the Joliet SVD. - The default level is 3. It may be set to 1..3 - using this option. - - --uuddff Include UUDDFF support in the generated filesystem - image. UUDDFF support is currently in alpha status - and for this reason, it is not possible to create - UDF only images. UUDDFF data structures are currently - coupled to the Joliet structures, so there are many - pitfalls with the current implementation. There is - no UID/GID support, there is no POSIX permission - support, there is no support for symlinks. Note - that UUDDFF wastes the space from sector ~20 to sector - 256 at the beginning of the disk in addition to the - spcae needed for real UUDDFF data structures. - - --uuiidd _u_i_d - Overrides the uid read from the source files to the - value of _u_i_d. Specifying this option automatically - enables Rock Ridge extensions. - - --uussee--ffiilleevveerrssiioonn - The option --uussee--ffiilleevveerrssiioonn allows mkisofs to use - file version numbers from the filesystem. If the - option is not specified, mmkkiissooffss creates a version - if 1 for all files. File versions are strings in - the range _;_1 to _;_3_2_7_6_7 This option is the default - on VMS. - - --UU Allows "Untranslated" filenames, completely violat- - ing the iso9660 standards described above. Forces - on the -d, -l, -L, -N, -relaxed-filenames, -allow- - lowercase, -allow-multidot and -no-iso-translate - flags. It allows more than one '.' character in the - filename, as well as mixed case filenames. This is - useful on HP-UX system, where the built-in CDFS - filesystem does not recognize ANY extensions. Use - with extreme caution. - - --nnoo--iissoo--ttrraannssllaattee - Do not translate the characters '#' and '~' which - are invalid for iso9660 filenames. These charac- - ters are though invalid often used by Microsoft - systems. - This violates the ISO9660 standard, but it happens - to work on many systems. Use with caution. - - --VV _v_o_l_i_d - Specifies the volume ID (volume name or label) to - be written into the master block. This parameter - can also be set in the file ..mmkkiissooffssrrcc with - VOLI=id. If specified in both places, the command - line version is used. Note that if you assign a - volume ID, this is the name that will be used as - the mount point used by the Solaris volume manage- - ment system and the name that is assigned to the - disc on a Microsoft Win32 or Apple Mac platform. - - --vvoollsseett _I_D - Specifies the volset ID. This parameter can also - be set in the file ..mmkkiissooffssrrcc with VOLS=volset_id. - If specified in both places, the command line ver- - sion is used. - - --vvoollsseett--ssiizzee _# - Sets the volume set size to #. The volume set size - is the number of CD's that are in a CD set. The - --vvoollsseett--ssiizzee option may be used to create CD's that - are part of e.g. a Operation System installation - set of CD's. The option --vvoollsseett--ssiizzee must be spec- - ified before --vvoollsseett--sseeqqnnoo on each command line. - - --vvoollsseett--sseeqqnnoo _# - Sets the volume set sequence number to #. The vol- - ume set sequence number is the index number of the - current CD in a CD set. The option --vvoollsseett--ssiizzee - must be specified before --vvoollsseett--sseeqqnnoo on each com- - mand line. - - --vv Verbose execution. If given twice on the command - line, extra debug information will be printed. - - --xx _p_a_t_h - Exclude _p_a_t_h from being written to CDROM. _p_a_t_h - must be the complete pathname that results from - concatenating the pathname given as command line - argument and the path relative to this directory. - Multiple paths may be excluded. Example: - - mkisofs -o cd -x /local/dir1 -x /local/dir2 /local - - NOTE: The --mm and --xx option description should both - be updated, they are wrong. Both now work identi- - cal and use filename globbing. A file is excluded - if either the last component matches or the whole - path matches. - - --zz Generate special RRIP records for transparently - compressed files. This is only of use and interest - for hosts that support transparent decompression, - such as Linux 2.4.14 or later. You must specify - the --RR or --rr options to enable RockRidge, and - generate compressed files using the mmkkzzffttrreeee util- - ity before running mmkkiissooffss. Note that transparent - compression is a nonstandard Rock Ridge extension. - The resulting disks are only transparently readable - if used on Linux. On other operating systems you - will need to call mmkkzzffttrreeee by hand to decompress - the files. +Maintenance Procedures MKISOFS(8) -HHFFSS OOPPTTIIOONNSS - --hhffss Create an ISO9660/HFS hybrid CD. This option should - be used in conjunction with the --mmaapp, --mmaaggiicc and/or - the various _d_o_u_b_l_e _d_a_s_h options given below. - - --aappppllee Create an ISO9660 CD with Apple's extensions. Simi- - lar to the --hhffss option, except that the Apple - Extensions to ISO9660 are added instead of creating - an HFS hybrid volume. - - --mmaapp _m_a_p_p_i_n_g___f_i_l_e - Use the _m_a_p_p_i_n_g___f_i_l_e to set the CREATOR and TYPE - information for a file based on the filename's - extension. A filename is mapped only if it is not - one of the know Apple/Unix file formats. See the - HHFFSS CCRREEAATTOORR//TTYYPPEE section below. - - --mmaaggiicc _m_a_g_i_c___f_i_l_e - The CREATOR and TYPE information is set by using a - file's _m_a_g_i_c _n_u_m_b_e_r (usually the first few bytes of - a file). The _m_a_g_i_c___f_i_l_e is only used if a file is - not one of the known Apple/Unix file formats, or - the filename extension has not been mapped using - the --mmaapp option. See the HHFFSS CCRREEAATTOORR//TTYYPPEE section - below for more details. - - --hhffss--ccrreeaattoorr _C_R_E_A_T_O_R - Set the default CREATOR for all files. Must be - exactly 4 characters. See the HHFFSS CCRREEAATTOORR//TTYYPPEE sec- - tion below for more details. - - --hhffss--ttyyppee _T_Y_P_E - Set the default TYPE for all files. Must be exactly - 4 characters. See the HHFFSS CCRREEAATTOORR//TTYYPPEE section - below for more details. - - --pprroobbee Search the contents of files for all the known - Apple/Unix file formats. See the HHFFSS MMAACCIINNTTOOSSHH - FFIILLEE FFOORRMMAATTSS section below for more about these - formats. However, the only way to check for _M_a_c_B_i_- - _n_a_r_y and _A_p_p_l_e_S_i_n_g_l_e files is to open and read - them. Therefore this option _m_a_y increase processing - time. It is better to use one or more _d_o_u_b_l_e _d_a_s_h - options given below if the Apple/Unix formats in - use are known. - - --nnoo--ddeesskkttoopp - Do not create (empty) Desktop files. New HFS Desk- - top files will be created when the CD is used on a - Macintosh (and stored in the System Folder). By - default, empty Desktop files are added to the HFS - volume. - - --mmaacc--nnaammee - Use the HFS filename as the starting point for the - ISO9660, Joliet and Rock Ridge file names. See the - HHFFSS MMAACCIINNTTOOSSHH FFIILLEE NNAAMMEESS section below for more - information. - - --bboooott--hhffss--ffiillee _d_r_i_v_e_r___f_i_l_e - Installs the _d_r_i_v_e_r___f_i_l_e that _m_a_y make the CD - bootable on a Macintosh. See the HHFFSS BBOOOOTT DDRRIIVVEERR - section below. (Alpha). - - --ppaarrtt Generate an HFS partition table. By default, no - partition table is generated, but some older Macin- - tosh CDROM drivers need an HFS partition table on - the CDROM to be able to recognize a hybrid CDROM. - - --aauuttoo _A_u_t_o_S_t_a_r_t___f_i_l_e - Make the HFS CD use the QuickTime 2.0 Autostart - feature to launch an application or document. The - given filename must be the name of a document or - application located at the top level of the CD. The - filename must be less than 12 characters. (Alpha). - - --cclluusstteerr--ssiizzee _s_i_z_e - Set the size in bytes of the cluster or allocation - units of PC Exchange files. Implies the ----eexxcchhaannggee - option. See the HHFFSS MMAACCIINNTTOOSSHH FFIILLEE FFOORRMMAATTSS section - below. - - --hhiiddee--hhffss _g_l_o_b - Hide _g_l_o_b from the HFS volume. The file or direc- - tory will still exist in the ISO9660 and/or Joliet - directory. _g_l_o_b is a shell wild-card-style pattern - that must match any part of the filename Multiple - globs may be excluded. Example: - - mkisofs -o rom -hfs -hide-hfs '*.o' -hide-hfs foo- - bar - - would exclude all files ending in ".o" or called - "foobar" from the HFS volume. Note that if you had - a directory called "foobar" it too (and of course - all its descendants) would be excluded. The _g_l_o_b - can also be a path name relative to the source - directories given on the command line. Example: - - mkisofs -o rom -hfs -hide-hfs src/html src - - would exclude just the file or directory called - "html" from the "src" directory. Any other file or - directory called "html" in the tree will not be - excluded. Should be used with the --hhiiddee and/or - --hhiiddee--jjoolliieett options. In order to match a direc- - tory name, make sure the pathname does not include - a trailing '/' character. See README.hide for more - details. - - --hhiiddee--hhffss--lliisstt _f_i_l_e - A file containing a list of _g_l_o_b_s to be hidden as - above. - - --hhffss--vvoolliidd _h_f_s___v_o_l_i_d - Volume name for the HFS partition. This is the name - that is assigned to the disc on a Macintosh and - replaces the _v_o_l_i_d used with the --VV option - - --iiccoonn--ppoossiittiioonn - Use the icon position information, if it exists, - from the Apple/Unix file. The icons will appear in - the same position as they would on a Macintosh - desktop. Folder location and size on screen, its - scroll positions, folder View (view as Icons, Small - Icons, etc.) are also preserved. This option may - become set by default in the future. (Alpha). - - --rroooott--iinnffoo _f_i_l_e - Set the location, size on screen, scroll positions, - folder View etc. for the root folder of an HFS vol- - ume. See README.rootinfo for more information. - (Alpha) - - --pprreepp--bboooott _F_I_L_E - PReP boot image file. Up to 4 are allowed. See - README.prep_boot (Alpha) - - --iinnppuutt--hhffss--cchhaarrsseett _c_h_a_r_s_e_t - Input charset that defines the characters used in - HFS file names when used with the _-_m_a_c_-_n_a_m_e option. - The default charset is cp10000 (Mac Roman) _c_p_1_0_0_0_0 - (Mac Roman) See CCHHAARRAACCTTEERR SSEETTSS and HHFFSS MMAACCIINNTTOOSSHH - FFIILLEE NNAAMMEESS sections below for more details. - - --oouuttppuutt--hhffss--cchhaarrsseett _c_h_a_r_s_e_t - Output charset that defines the characters that - will be used in the HFS file names. Defaults to the - input charset. See CCHHAARRAACCTTEERR SSEETTSS section below for - more details. - - --hhffss--uunnlloocckk - By default, mmkkiissooffss will create an HFS volume that - is _l_o_c_k_e_d. This option leaves the volume unlocked - so that other applications (e.g. hfsutils) can - modify the volume. See the HHFFSS PPRROOBBLLEEMMSS//LLIIMMIITTAATTIIOONNSS - section below for warnings about using this option. - - --hhffss--bblleessss _f_o_l_d_e_r___n_a_m_e - "Bless" the given directory (folder). This is usu- - ally the SSyysstteemm FFoollddeerr and is used in creating HFS - bootable CDs. The name of the directory must be the - whole path name as mmkkiissooffss sees it. e.g. if the - given pathspec is ./cddata and the required folder - is called System Folder, then the whole path name - is "./cddata/System Folder" (remember to use quotes - if the name contains spaces). - - --hhffss--ppaarrmmss _P_A_R_A_M_E_T_E_R_S - Override certain parameters used to create the HFS - file system. Unlikely to be used in normal circum- - stances. See the libhfs_iso/hybrid.h source file - for details. - - ----ccaapp Look for AUFS CAP Macintosh files. Search for CAP - Apple/Unix file formats only. Searching for the - other possible Apple/Unix file formats is disabled, - unless other _d_o_u_b_l_e _d_a_s_h options are given. - - ----nneettaattaallkk - Look for NETATALK Macintosh files - - ----ddoouubbllee - Look for AppleDouble Macintosh files - - ----eetthheerrsshhaarree - Look for Helios EtherShare Macintosh files - - ----uusshhaarree - Look for IPT UShare Macintosh files - - ----eexxcchhaannggee - Look for PC Exchange Macintosh files - - ----ssggii Look for SGI Macintosh files - - ----xxiinneett - Look for XINET Macintosh files - - ----mmaaccbbiinn - Look for MacBinary Macintosh files - - ----ssiinnggllee - Look for AppleSingle Macintosh files - - ----ddaavvee Look for Thursby Software Systems DAVE Macintosh - files - ----ssffmm Look for Microsoft's Services for Macintosh files - (NT only) (Alpha) + info in .finderinfo subdirectory with same filename. - ----oossxx--ddoouubbllee - Look for MacOS X AppleDouble Macintosh files + AppleDouble/Netatalk + Data fork stored in a file. Resource fork stored in a + file with same name prefixed with "%". Finder info also + stored in same "%" file. Netatalk uses the same format, + but the resource fork/finderinfo stored in subdirectory + .AppleDouble with same name as data fork. - ----oossxx--hhffss - Look for MacOS X HFS Macintosh files + AppleSingle + Data structures similar to above, except both forks and + finder info are stored in one file. + Helios EtherShare + Data fork stored in a file. Resource fork and finder + info together in subdirectory .rsrc with same filename + as data fork. -CCHHAARRAACCTTEERR SSEETTSS - mmkkiissooffss processes file names in a POSIX compliant way as - strings of 8-bit characters. To represent all codings for - all languages, 8-bit characters are not sufficient. Uni- - code or IISSOO--1100664466 define character codings that need at - least 21 bits to represent all known languages. They may - be represented with UUTTFF--3322, UUTTFF--1166 or UUTTFF--88 coding. - UUTTFF--3322 uses a plain 32-bit coding but seems to be uncom- - mon. UUTTFF--1166 is used by Microsoft with Win32 with the dis- - advantage that it only supports a subset of all codes and - that 16-bit characters are not compliant with the POSIX - filesystem interface. - - Modern UNIX operating systems may use UUTTFF--88 coding for - filenames. This coding allows to use the complete Unicode - code set. Each 32-bit character is represented by one or - more 8-bit characters. If a character is coded in - IISSOO--88885599--11 (used in Central Europe and North America) is - maps 1:1 to a UUTTFF--3322 or UUTTFF--1166 coded Unicode character. - If a character is coded in 77--BBiitt AASSCCIIII (used in USA and - other countries with limted character set) is maps 1:1 to - a UUTTFF--3322, UUTTFF--1166 or UUTTFF--88 coded Unicode character. Char- - acter codes that cannot be represented as a single byte in - UTF-8 (typically if the value is > 0x7F) use escape - sequences that map to more than one 8-bit character. - - If all operating systems would use UUTTFF--88 coding, mmkkiissooffss - would not need to recode characters in file names. Unfor- - tunately, Apple uses completely nonstandard codings and - Microsoft uses a Unicode coding that is not compatible - with the POSIX filename interface. - - For all non UUTTFF--88 coded operating systems, the actual - character that each byte represents depends on the _c_h_a_r_a_c_- - _t_e_r _s_e_t or _c_o_d_e_p_a_g_e (which is the name used by Microsoft) - used by the local operating system in use - the characters - in a character set will reflect the region or natural - language used by the user. - - Usually character codes 0x00-0x1f are control characters, - codes 0x20-0x7f are the 7 bit ASCII characters and (on - PC's and Mac's) 0x80-0xff are used for other characters. - Unfortunately even this does not follow ISO standards that - reserve the range 0x80-0x9f for control characters and - only allow 0xa0-0xff for other characters. - - As there is a lot more than 256 characters/symbols in use, - only a small subset are represented in a character set. - Therefore the same character code may represent a differ- - ent character in different character sets. So a file name - generated, say in central Europe, may not display the same - character when viewed on a machine in, say eastern Europe. - - To make matters more complicated, different operating sys- - tems use different character sets for the region or lan- - guage. For example the character code for "small e with - acute accent" may be character code 0x82 on a PC, code - 0x8e on a Macintosh and code 0xe9 on a UNIX system. Note - while the codings used on a PC or Mac are nonstandard, - Unicode codes this character as 0x00000000e9 which is - basically the same value as the value used by most UNIX - systems. - - As long as not all operating systems and applications will - use the Unicode character set as the basis for file names - in a unique way, it may be necessary to specify which - character set your file names use in and which character - set the file names should appear on the CD. - - There are four options to specify the character sets you - want to use: - - -input-charset - Defines the local character set you are using on - your host machine. Any character set conversions - that take place will use this character set as the - staring point. The default input character sets are - _c_p_4_3_7 on DOS based systems and _i_s_o_8_8_5_9_-_1 on all - other systems. - - If the _-_J option is given, then the Unicode equiva- - lents of the input character set will be used in - the Joliet directory. Using the _-_j_c_h_a_r_s_e_t option is - the same as using the _-_i_n_p_u_t_-_c_h_a_r_s_e_t and _-_J - options. - - -output-charset - Defines the character set that will be used with - for the Rock Ridge names on the CD. Defaults to the - input character set. Only likely to be useful if - used on a non-Unix platform. e.g. using mmkkiissooffss on - a Microsoft Win32 machine to create Rock Ridge CDs. - If you are using mmkkiissooffss on a Unix machine, it is - likely that the output character set will be the - same as the input character set. - - -input-hfs-charset - Defines the HFS character set used for HFS file - names decoded from any of the various Apple/Unix - file formats. Only useful when used with _-_m_a_c_-_n_a_m_e - option. See the HHFFSS MMAACCIINNTTOOSSHH FFIILLEE NNAAMMEESS for more - information. Defaults to _c_p_1_0_0_0_0 (Mac Roman). - - -output-hfs-charset - Defines the HFS character set used to create HFS - file names from the input character set in use. In - most cases this will be from the character set - given with the _-_i_n_p_u_t_-_c_h_a_r_s_e_t option. Defaults to - the input HFS character set. - - There are a number of character sets built in to _m_k_i_s_o_f_s. - To get a listing, use mmkkiissooffss --iinnppuutt--cchhaarrsseett hheellpp.. - - Additional character sets can be read from file for any of - the character set options by giving a filename as the - argument to the options. The given file will only be read - if its name does not match one of the built in character - sets. - - The format of the character set files is the same as the - mapping files available from http://www.unicode.org/Pub- - lic/MAPPINGS The format of these files is: - - Column #1 is the input byte code (in hex as 0xXX) - Column #2 is the Unicode (in hex as 0xXXXX) - Rest of the line is ignored. - - Any blank line, line without two (or more) columns in the - above format or comments lines (starting with the # char- - acter) are ignored without any warnings. Any missing input - code is mapped to Unicode character 0x0000. - - Note that there is no support for 16 bit UNICODE (UTF-16) - or 32 bit UNICODE (UTF-32) coding because this coding is - not POSIX compliant. There should be support for UTF-8 - UNICODE coding which is compatible to POSIX filenames and - supported by moder UNIX implementations such as Solaris. - - A 1:1 character set mapping can be defined by using the - keyword _d_e_f_a_u_l_t as the argument to any of the character - set options. This is the behaviour of older (v1.12) ver- - sions of mmkkiissooffss. - - The ISO9660 file names generated from the input filenames - are not converted from the input character set. The - ISO9660 character set is a very limited subset of the - ASCII characters, so any conversion would be pointless. + IPT UShare + Very similar to the EtherShare format, but the finder + info is stored slightly differently. - Any character that mmkkiissooffss can not convert will be - replaced with a '_' character. + MacBinary + Both forks and finder info stored in one file. + Apple PC Exchange + Used by Macintoshes to store Apple files on DOS (FAT) + disks. Data fork stored in a file. Resource fork in + subdirectory resource.frk (or RESOURCE.FRK). Finder + info as one record in file finder.dat (or FINDER.DAT). + Separate finder.dat for each data fork directory. -HHFFSS CCRREEAATTOORR//TTYYPPEE - A Macintosh file has two properties associated with it - which define which application created the file, the _C_R_E_- - _A_T_O_R and what data the file contains, the _T_Y_P_E. Both are - (exactly) 4 letter strings. Usually this allows a Macin- - tosh user to double-click on a file and launch the correct - application etc. The CREATOR and TYPE of a particular file - can be found by using something like ResEdit (or similar) - on a Macintosh. - - The CREATOR and TYPE information is stored in all the var- - ious Apple/Unix encoded files. For other files it is pos- - sible to base the CREATOR and TYPE on the filename's - extension using a _m_a_p_p_i_n_g file (the --mmaapp option) and/or - using the _m_a_g_i_c _n_u_m_b_e_r (usually a _s_i_g_n_a_t_u_r_e in the first - few bytes) of a file (the --mmaaggiicc option). If both these - options are given, then their order on the command line is - important. If the --mmaapp option is given first, then a file- - name extension match is attempted before a magic number - match. However, if the --mmaaggiicc option is given first, then - a magic number match is attempted before a filename exten- - sion match. - - If a mapping or magic file is not used, or no match is - found then the default CREATOR and TYPE for all regular - files can be set by using entries in the ..mmkkiissooffssrrcc file - or using the --hhffss--ccrreeaattoorr and/or --hhffss--ttyyppee options, other- - wise the default CREATOR and TYPE are 'unix' and 'TEXT'. - - The format of the _m_a_p_p_i_n_g file is the same _a_f_p_f_i_l_e format - as used by _a_u_f_s. This file has five columns for the - _e_x_t_e_n_s_i_o_n, _f_i_l_e _t_r_a_n_s_l_a_t_i_o_n, _C_R_E_A_T_O_R, _T_Y_P_E and _C_o_m_m_e_n_t. - Lines starting with the '#' character are comment lines - and are ignored. An example file would be like: - - # Example filename mapping file - # - # EXTN XLate CREATOR TYPE Comment - .tif Raw '8BIM' 'TIFF' "Photoshop TIFF image" - .hqx Ascii 'BnHq' 'TEXT' "BinHex file" - .doc Raw 'MSWD' 'WDBN' "Word file" - .mov Raw 'TVOD' 'MooV' "QuickTime Movie" - * Ascii 'ttxt' 'TEXT' "Text file" - - Where: - - The first column _E_X_T_N defines the Unix filename - extension to be mapped. The default mapping for any - filename extension that doesn't match is defined - with the "*" character. - - The _X_l_a_t_e column defines the type of text transla- - tion between the Unix and Macintosh file it is - ignored by mmkkiissooffss, but is kept to be compatible - with aauuffss(1). Although mmkkiissooffss does not alter the - contents of a file, if a binary file has it's TYPE - set as 'TEXT', it _m_a_y be read incorrectly on a Mac- - intosh. Therefore a better choice for the default - TYPE may be '????' - - The _C_R_E_A_T_O_R and _T_Y_P_E keywords must be 4 characters - long and enclosed in single quotes. - - The comment field is enclosed in double quotes - it - is ignored by mmkkiissooffss, but is kept to be compatible - with aauuffss. - - The format of the _m_a_g_i_c file is almost identical to the - mmaaggiicc(4) file used by the Linux ffiillee(1) command - the rou- - tines for reading and decoding the _m_a_g_i_c file are based on - the Linux ffiillee(1) command. - - This file has four tab separated columns for the _b_y_t_e _o_f_f_- - _s_e_t, _t_y_p_e, _t_e_s_t and _m_e_s_s_a_g_e. Lines starting with the '#' - character are comment lines and are ignored. An example - file would be like: - - # Example magic file - # - # off type test message - 0 string GIF8 8BIM GIFf GIF image - 0 beshort 0xffd8 8BIM JPEG image data - - 0 string SIT! SIT! SIT! StuffIt Archive - 0 string \037\235 LZIV ZIVU standard unix compress - 0 string \037\213 GNUz ZIVU gzip compressed data - 0 string %! ASPS TEXT Postscript - 0 string \004%! ASPS TEXT PC Postscript with a ^D to start - 4 string moov txtt MooV QuickTime movie file (moov) - 4 string mdat txtt MooV QuickTime movie file (mdat) - - The format of the file is described in the mmaaggiicc(4) man - page. The only difference here is that for each entry in - the magic file, the _m_e_s_s_a_g_e for the initial offset mmuusstt be - 4 characters for the CREATOR followed by 4 characters for - the TYPE - white space is optional between them. Any other - characters on this line are ignored. Continuation lines - (starting with a '>') are also ignored i.e. only the ini- - tial offset lines are used. - - Using the --mmaaggiicc option may significantly increase pro- - cessing time as each file has to opened and read to find - it's magic number. - - In summary, for all files, the default CREATOR is 'unix' - and the default TYPE is 'TEXT'. These can be changed by - using entries in the _._m_k_i_s_o_f_s_r_c file or by using the --hhffss-- - ccrreeaattoorr and/or --hhffss--ttyyppee options. - - If the a file is in one of the known Apple/Unix formats - (and the format has been selected), then the CREATOR and - TYPE are taken from the values stored in the Apple/Unix - file. - - Other files can have their CREATOR and TYPE set from their - file name extension (the --mmaapp option), or their magic num- - ber (the --mmaaggiicc option). If the default match is used in - the _m_a_p_p_i_n_g file, then these values override the default - CREATOR and TYPE. + Note: _m_k_i_s_o_f_s needs to know the native FAT cluster size + of the disk that the PC Exchange files are on (or have + been copied from). This size is given by the + -cclluusstteerr-ssiizzee option. The cluster or allocation size + can be found by using the DOS utility CCHHKKDDSSKK. - A full CREATOR/TYPE database can be found at - http://www.angelfire.com/il/szekely/index.html + May not work with PC Exchange v2.2 or higher files + (available with MacOS 8.1). DOS media containing PC + Exchange files should be mounted as type mmssddooss (not + vvffaatt) when using Linux. + SGI/XINET + Used by SGI machines when they mount HFS disks. Data + fork stored in a file. Resource fork in subdirectory + .HSResource with same name. Finder info as one record + in file .HSancillary. Separate .HSancillary for each + data fork directory. -HHFFSS MMAACCIINNTTOOSSHH FFIILLEE FFOORRMMAATTSS - Macintosh files have two parts called the _D_a_t_a and - _R_e_s_o_u_r_c_e fork. Either may be empty. Unix (and many other - OSs) can only cope with files having one part (or fork). - To add to this, Macintosh files have a number of - attributes associated with them - probably the most impor- - tant are the TYPE and CREATOR. Again Unix has no concept - of these types of attributes. - - e.g. a Macintosh file may be a JPEG image where the image - is stored in the Data fork and a desktop thumbnail stored - in the Resource fork. It is usually the information in the - data fork that is useful across platforms. - - Therefore to store a Macintosh file on a Unix filesystem, - a way has to be found to cope with the two forks and the - extra attributes (which are referred to as the _f_i_n_d_e_r - _i_n_f_o). Unfortunately, it seems that every software pack- - age that stores Macintosh files on Unix has chosen a com- - pletely different storage method. - - The Apple/Unix formats that _m_k_i_s_o_f_s (partially) supports - are: - - CAP AUFS format - Data fork stored in a file. Resource fork in subdi- - rectory .resource with same filename as data fork. - Finder info in .finderinfo subdirectory with same - filename. - - AppleDouble/Netatalk - Data fork stored in a file. Resource fork stored in - a file with same name prefixed with "%". Finder - info also stored in same "%" file. Netatalk uses - the same format, but the resource fork/finderinfo - stored in subdirectory .AppleDouble with same name - as data fork. - - AppleSingle - Data structures similar to above, except both forks - and finder info are stored in one file. - - Helios EtherShare - Data fork stored in a file. Resource fork and - finder info together in subdirectory .rsrc with - same filename as data fork. - - IPT UShare - Very similar to the EtherShare format, but the - finder info is stored slightly differently. - - MacBinary - Both forks and finder info stored in one file. - - Apple PC Exchange - Used by Macintoshes to store Apple files on DOS - (FAT) disks. Data fork stored in a file. Resource - fork in subdirectory resource.frk (or - RESOURCE.FRK). Finder info as one record in file - finder.dat (or FINDER.DAT). Separate finder.dat for - each data fork directory. - - Note: _m_k_i_s_o_f_s needs to know the native FAT cluster - size of the disk that the PC Exchange files are on - (or have been copied from). This size is given by - the --cclluusstteerr--ssiizzee option. The cluster or alloca- - tion size can be found by using the DOS utility - CCHHKKDDSSKK. - - May not work with PC Exchange v2.2 or higher files - (available with MacOS 8.1). DOS media containing - PC Exchange files should be mounted as type mmssddooss - (not vvffaatt) when using Linux. - - SGI/XINET - Used by SGI machines when they mount HFS disks. - Data fork stored in a file. Resource fork in subdi- - rectory .HSResource with same name. Finder info as - one record in file .HSancillary. Separate .HSancil- - lary for each data fork directory. - - Thursby Software Systems DAVE - Allows Macintoshes to store Apple files on SMB - servers. Data fork stored in a file. Resource fork - in subdirectory resource.frk. Uses the AppleDouble - format to store resource fork. - - Services for Macintosh - Format of files stored by NT Servers on NTFS - filesystems. Data fork is stored as "filename". - Resource fork stored as a NTFS _s_t_r_e_a_m called - "filename:AFP_Resource". The finder info is stored - as a NTFS _s_t_r_e_a_m called "filename:Afp_AfpInfo". - These streams are normally invisible to the user. - - Warning: mkisofs only partially supports the SFM - format. If an HFS file or folder stored on the NT - server contains an _i_l_l_e_g_a_l NT character in its - name, then NT converts these characters to _P_r_i_v_a_t_e - _U_s_e _U_n_i_c_o_d_e characters. The characters are: " * / < - > ? | also a space or period if it is the last - character of the file name, character codes 0x01 to - 0x1f (control characters) and Apple' apple logo. - - Unfortunately, these private Unicode characters are - not readable by the mkisofs NT executable. There- - fore any file or directory name containing these - characters will be ignored - including the contents - of any such directory. - - MacOS X AppleDouble - When HFS/HFS+ files are copied or saved by MacOS X - on to a non-HFS file system (e.g. UFS, NFS etc.), - the files are stored in AppleDouble format. Data - fork stored in a file. Resource fork stored in a - file with same name prefixed with "._". Finder info - also stored in same "._" file. - - MacOS X HFS (Alpha) - Not really an Apple/Unix encoding, but actual - HFS/HFS+ files on a MacOS X system. Data fork - stored in a file. Resource fork stored in a pseudo - file with the same name with the suffix '/rsrc'. - The finderinfo is only available via a MacOS X - library call. - - Notes: (also see README.macosx) - - Only works when used on MacOS X. - - If a file is found with a zero length resource fork - and empty finderinfo, it is assumed not to have any - Apple/Unix encoding - therefore a TYPE and CREATOR - can be set using other methods. - - _m_k_i_s_o_f_s will attempt to set the CREATOR, TYPE, date and - possibly other flags from the finder info. Additionally, - if it exists, the Macintosh filename is set from the - finder info, otherwise the Macintosh name is based on the - Unix filename - see the HHFFSS MMAACCIINNTTOOSSHH FFIILLEE NNAAMMEESS section - below. - - When using the --aappppllee option, the TYPE and CREATOR are - stored in the optional System Use or SUSP field in the - ISO9660 Directory Record - in much the same way as the - Rock Ridge attributes are. In fact to make life easy, the - Apple extensions are added at the beginning of the exist- - ing Rock Ridge attributes (i.e. to get the Apple exten- - sions you get the Rock Ridge extensions as well). - - The Apple extensions require the resource fork to be - stored as an ISO9660 _a_s_s_o_c_i_a_t_e_d file. This is just like - any normal file stored in the ISO9660 filesystem except - that the associated file flag is set in the Directory - Record (bit 2). This file has the same name as the data - fork (the file seen by non-Apple machines). Associated - files are normally ignored by other OSs - - When using the --hhffss option, the TYPE and CREATOR plus - other finder info, are stored in a separate HFS directory, - not visible on the ISO9660 volume. The HFS directory ref- - erences the same data and resource fork files described - above. - - In most cases, it is better to use the --hhffss option instead - of the --aappppllee option, as the latter imposes the limited - ISO9660 characters allowed in filenames. However, the - Apple extensions do give the advantage that the files are - packed on the disk more efficiently and it may be possible - to fit more files on a CD - important when the total size - of the source files is approaching 650MB. + Thursby Software Systems DAVE + Allows Macintoshes to store Apple files on SMB servers. + + + +Version 3.0 Last change: 2010/04/25 40 + + + + + + +Maintenance Procedures MKISOFS(8) + + + + Data fork stored in a file. Resource fork in subdirec- + tory resource.frk. Uses the AppleDouble format to store + resource fork. + + Services for Macintosh + Format of files stored by NT Servers on NTFS filesys- + tems. Data fork is stored as "filename". Resource fork + stored as a NTFS _s_t_r_e_a_m called "filename:AFP_Resource". + The finder info is stored as a NTFS _s_t_r_e_a_m called + "filename:Afp_AfpInfo". These streams are normally + invisible to the user. + + Warning: mkisofs only partially supports the SFM for- + mat. If an HFS file or folder stored on the NT server + contains an _i_l_l_e_g_a_l NT character in its name, then NT + converts these characters to _P_r_i_v_a_t_e _U_s_e _U_n_i_c_o_d_e char- + acters. The characters are: " * / < > ? | also a space + or period if it is the last character of the file name, + character codes 0x01 to 0x1f (control characters) and + Apple' apple logo. + + Unfortunately, these private Unicode characters are not + readable by the mkisofs NT executable. Therefore any + file or directory name containing these characters will + be ignored - including the contents of any such direc- + tory. + + MacOS X AppleDouble + When HFS/HFS+ files are copied or saved by MacOS X on + to a non-HFS file system (e.g. UFS, NFS etc.), the + files are stored in AppleDouble format. Data fork + stored in a file. Resource fork stored in a file with + same name prefixed with "._". Finder info also stored + in same "._" file. + + MacOS X HFS (Alpha) + Not really an Apple/Unix encoding, but actual HFS/HFS+ + files on a MacOS X system. Data fork stored in a file. + Resource fork stored in a pseudo file with the same + name with the suffix '/rsrc'. The finderinfo is only + available via a MacOS X library call. + + Notes: (also see README.macosx) + + Only works when used on MacOS X. + + If a file is found with a zero length resource fork and + empty finderinfo, it is assumed not to have any + Apple/Unix encoding - therefore a TYPE and CREATOR can + be set using other methods. + + + + + +Version 3.0 Last change: 2010/04/25 41 + + + + + + +Maintenance Procedures MKISOFS(8) + + + + _m_k_i_s_o_f_s will attempt to set the CREATOR, TYPE, date and pos- + sibly other flags from the finder info. Additionally, if it + exists, the Macintosh filename is set from the finder info, + otherwise the Macintosh name is based on the Unix filename - + see the HHFFSS MMAACCIINNTTOOSSHH FFIILLEE NNAAMMEESS section below. + + When using the -aappppllee option, the TYPE and CREATOR are + stored in the optional System Use or SUSP field in the ISO- + 9660 Directory Record - in much the same way as the Rock + Ridge attributes are. In fact to make life easy, the Apple + extensions are added at the beginning of the existing Rock + Ridge attributes (i.e. to get the Apple extensions you get + the Rock Ridge extensions as well). + + The Apple extensions require the resource fork to be stored + as an ISO-9660 _a_s_s_o_c_i_a_t_e_d file. This is just like any normal + file stored in the ISO-9660 filesystem except that the asso- + ciated file flag is set in the Directory Record (bit 2). + This file has the same name as the data fork (the file seen + by non-Apple machines). Associated files are normally + ignored by other OSs + + When using the -hhffss option, the TYPE and CREATOR plus other + finder info, are stored in a separate HFS directory, not + visible on the ISO-9660 volume. The HFS directory references + the same data and resource fork files described above. + + In most cases, it is better to use the -hhffss option instead + of the -aappppllee option, as the latter imposes the limited + ISO-9660 characters allowed in filenames. However, the Apple + extensions do give the advantage that the files are packed + on the disk more efficiently and it may be possible to fit + more files on a CD - important when the total size of the + source files is approaching 650MB. HHFFSS MMAACCIINNTTOOSSHH FFIILLEE NNAAMMEESS - Where possible, the HFS filename that is stored with an - Apple/Unix file is used for the HFS part of the CD. How- - ever, not all the Apple/Unix encodings store the HFS file- - name with the finderinfo. In these cases, the Unix file- - name is used - with escaped special characters. Special - characters include '/' and characters with codes over 127. - - Aufs escapes these characters by using ":" followed by the - character code as two hex digits. Netatalk and EtherShare - have a similar scheme, but uses "%" instead of a ":". - - If mkisofs can't find an HFS filename, then it uses the - Unix name, with any %xx or :xx characters (xx == two hex - digits) converted to a single character code. If "xx" are - not hex digits ([0-9a-fA-F]), then they are left alone - - although any remaining ":" is converted to "%" as colon is - the HFS directory separator. Care must be taken, as an - ordinary Unix file with %xx or :xx will also be converted. - e.g. - - This:2fFile converted to This/File - - This:File converted to This%File - - This:t7File converted to This%t7File - - Although HFS filenames appear to support upper and lower - case letters, the filesystem is case insensitive. i.e. the - filenames "aBc" and "AbC" are the same. If a file is found - in a directory with the same HFS name, then _m_k_i_s_o_f_s will - attempt, where possible, to make a unique name by adding - '_' characters to one of the filenames. - - If an HFS filename exists for a file, then mkisofs can use - this name as the starting point for the ISO9660, Joliet - and Rock Ridge filenames using the --mmaacc--nnaammee option. Nor- - mal Unix files without an HFS name will still use their - Unix name. e.g. - - If a _M_a_c_B_i_n_a_r_y (or _P_C _E_x_c_h_a_n_g_e) file is stored as _s_o_m_e_i_m_- - _a_g_e_._g_i_f_._b_i_n on the Unix filesystem, but contains a HFS - file called _s_o_m_e_i_m_a_g_e_._g_i_f, then this is the name that - would appear on the HFS part of the CD. However, as - mkisofs uses the Unix name as the starting point for the - other names, then the ISO9660 name generated will probably - be _S_O_M_E_I_M_A_G_._B_I_N and the Joliet/Rock Ridge would be _s_o_m_e_i_m_- - _a_g_e_._g_i_f_._b_i_n. Although the actual data (in this case) is a - GIF image. This option will use the HFS filename as the - starting point and the ISO9660 name will probably be - _S_O_M_E_I_M_A_G_._G_I_F and the Joliet/Rock Ridge would be _s_o_m_e_i_m_- - _a_g_e_._g_i_f. - - Using the --mmaacc--nnaammee option will not currently work with - the --TT option - the Unix name will be used in the - TRANS.TBL file, not the Macintosh name. - - The character set used to convert any HFS file name to a - Joliet/Rock Ridge file name defaults to _c_p_1_0_0_0_0 (Mac - Roman). The character set used can be specified using the - _-_i_n_p_u_t_-_h_f_s_-_c_h_a_r_s_e_t option. Other built in HFS character - sets are: cp10006 (MacGreek), cp10007 (MacCyrillic), - cp10029 (MacLatin2), cp10079 (MacIcelandandic) and cp10081 - (MacTurkish). - - Note: the character codes used by HFS file names taken - from the various Apple/Unix formats will not be converted - as they are assumed to be in the correct Apple character - set. Only the Joliet/Rock Ridge names derived from the HFS - file names will be converted. - - The existing mkisofs code will filter out any illegal - characters for the ISO9660 and Joliet filenames, but as - mkisofs expects to be dealing directly with Unix names, it - leaves the Rock Ridge names as is. But as '/' is a legal - HFS filename character, the --mmaacc--nnaammee option converts '/' - to a '_' in Rock Ridge filenames. - - If the Apple extensions are used, then only the ISO9660 - filenames will appear on the Macintosh. However, as the - Macintosh ISO9660 drivers can use _L_e_v_e_l _2 filenames, then - you can use options like --aallllooww--mmuullttiiddoott without problems - on a Macintosh - still take care over the names, for exam- - ple _t_h_i_s_._f_i_l_e_._n_a_m_e will be converted to _T_H_I_S_._F_I_L_E i.e. - only have one '.', also filename _a_b_c_d_e_f_g_h will be seen as - _A_B_C_D_E_F_G_H but _a_b_c_d_e_f_g_h_i will be seen as _A_B_C_D_E_F_G_H_I_. i.e. - with a '.' at the end - don't know if this is a Macintosh - problem or mkisofs/mkhybrid problem. All filenames will be - in uppercase when viewed on a Macintosh. Of course, - DOS/Win3.X machines will not be able to see Level 2 file- - names... + Where possible, the HFS filename that is stored with an + Apple/Unix file is used for the HFS part of the CD. However, + not all the Apple/Unix encodings store the HFS filename with + the finderinfo. In these cases, the Unix filename is used - + with escaped special characters. Special characters include + '/' and characters with codes over 127. + + Aufs escapes these characters by using ":" followed by the + character code as two hex digits. Netatalk and EtherShare + have a similar scheme, but uses "%" instead of a ":". + + If mkisofs can't find an HFS filename, then it uses the Unix + name, with any %xx or :xx characters (xx == two hex digits) + converted to a single character code. If "xx" are not hex + digits ([0-9a-fA-F]), then they are left alone - although + + + +Version 3.0 Last change: 2010/04/25 42 + + + + + + +Maintenance Procedures MKISOFS(8) + + + + any remaining ":" is converted to "%" as colon is the HFS + directory separator. Care must be taken, as an ordinary Unix + file with %xx or :xx will also be converted. e.g. + + This:2fFile converted to This/File + + This:File converted to This%File + + This:t7File converted to This%t7File + + Although HFS filenames appear to support upper and lower + case letters, the filesystem is case insensitive. i.e. the + filenames "aBc" and "AbC" are the same. If a file is found + in a directory with the same HFS name, then _m_k_i_s_o_f_s will + attempt, where possible, to make a unique name by adding '_' + characters to one of the filenames. + + If an HFS filename exists for a file, then mkisofs can use + this name as the starting point for the ISO-9660, Joliet and + Rock Ridge filenames using the -mmaacc-nnaammee option. Normal Unix + files without an HFS name will still use their Unix name. + e.g. + + If a _M_a_c_B_i_n_a_r_y (or _P_C _E_x_c_h_a_n_g_e) file is stored as + _s_o_m_e_i_m_a_g_e._g_i_f._b_i_n on the Unix filesystem, but contains a HFS + file called _s_o_m_e_i_m_a_g_e._g_i_f, then this is the name that would + appear on the HFS part of the CD. However, as mkisofs uses + the Unix name as the starting point for the other names, + then the ISO-9660 name generated will probably be + _S_O_M_E_I_M_A_G._B_I_N and the Joliet/Rock Ridge would be + _s_o_m_e_i_m_a_g_e._g_i_f._b_i_n. Although the actual data (in this case) + is a GIF image. This option will use the HFS filename as the + starting point and the ISO-9660 name will probably be + _S_O_M_E_I_M_A_G._G_I_F and the Joliet/Rock Ridge would be + _s_o_m_e_i_m_a_g_e._g_i_f. + + Using the -mmaacc-nnaammee option will not currently work with the + -TT option - the Unix name will be used in the TRANS.TBL + file, not the Macintosh name. + + The character set used to convert any HFS file name to a + Joliet/Rock Ridge file name defaults to _c_p_1_0_0_0_0 (Mac Roman). + The character set used can be specified using the + -_i_n_p_u_t-_h_f_s-_c_h_a_r_s_e_t option. Other built in HFS character sets + are: cp10006 (MacGreek), cp10007 (MacCyrillic), cp10029 + (MacLatin2), cp10079 (MacIcelandandic) and cp10081 (MacTurk- + ish). + + Note: the character codes used by HFS file names taken from + the various Apple/Unix formats will not be converted as they + are assumed to be in the correct Apple character set. Only + the Joliet/Rock Ridge names derived from the HFS file names + + + +Version 3.0 Last change: 2010/04/25 43 + + + + + + +Maintenance Procedures MKISOFS(8) + + + + will be converted. + + The existing mkisofs code will filter out any illegal char- + acters for the ISO-9660 and Joliet filenames, but as mkisofs + expects to be dealing directly with Unix names, it leaves + the Rock Ridge names as is. But as '/' is a legal HFS + filename character, the -mmaacc-nnaammee option converts '/' to a + '_' in Rock Ridge filenames. + + If the Apple extensions are used, then only the ISO-9660 + filenames will appear on the Macintosh. However, as the + Macintosh ISO-9660 drivers can use _L_e_v_e_l _2 filenames, then + you can use options like -aallllooww-mmuullttiiddoott without problems on + a Macintosh - still take care over the names, for example + _t_h_i_s._f_i_l_e._n_a_m_e will be converted to _T_H_I_S._F_I_L_E i.e. only have + one '.', also filename _a_b_c_d_e_f_g_h will be seen as _A_B_C_D_E_F_G_H but + _a_b_c_d_e_f_g_h_i will be seen as _A_B_C_D_E_F_G_H_I. i.e. with a '.' at the + end - don't know if this is a Macintosh problem or + mkisofs/mkhybrid problem. All filenames will be in upper + case when viewed on a Macintosh. Of course, DOS/Win3.X + machines will not be able to see Level 2 filenames... HHFFSS CCUUSSTTOOMM VVOOLLUUMMEE//FFOOLLDDEERR IICCOONNSS - To give a HFS CD a custom icon, make sure the root (top - level) folder includes a standard Macintosh volume icon - file. To give a volume a custom icon on a Macintosh, an - icon has to be pasted over the volume's icon in the "Get - Info" box of the volume. This creates an invisible file - called 'Icon\r' ('\r' is the 'carriage return' character) - in the root folder. - - A custom folder icon is very similar - an invisible file - called 'Icon\r' exits in the folder itself. - - Probably the easiest way to create a custom icon that - mkisofs can use, is to format a blank HFS floppy disk on a - Mac, paste an icon to its "Get Info" box. If using Linux - with the HFS module installed, mount the floppy using - something like: - - mount -t hfs /dev/fd0 /mnt/floppy - - The floppy will be mounted as a CAP file system by - default. Then run mkisofs using something like: - - mkisofs --cap -o output source_dir /mnt/floppy - - If you are not using Linux, then you can use the hfsutils - to copy the icon file from the floppy. However, care has - to be taken, as the icon file contains a control charac- - ter. e.g. - - hmount /dev/fd0 - hdir -a - hcopy -m Icon^V^M icon_dir/icon - - Where '^V^M' is control-V followed by control-M. Then run - mmkkiissooffss by using something like: - - mkisofs --macbin -o output source_dir icon_dir - - The procedure for creating/using custom folder icons is - very similar - paste an icon to folder's "Get Info" box - and transfer the resulting 'Icon\r' file to the relevant - directory in the mkisofs source tree. - - You may want to hide the icon files from the ISO9660 and - Joliet trees. - - To give a custom icon to a Joliet CD, follow the instruc- - tions found at: http://www.fadden.com/cdr- - faq/faq03.html#[3-21] + To give a HFS CD a custom icon, make sure the root (top + level) folder includes a standard Macintosh volume icon + file. To give a volume a custom icon on a Macintosh, an icon + has to be pasted over the volume's icon in the "Get Info" + box of the volume. This creates an invisible file called + 'Icon\r' ('\r' is the 'carriage return' character) in the + root folder. + + A custom folder icon is very similar - an invisible file + called 'Icon\r' exits in the folder itself. + + Probably the easiest way to create a custom icon that + mkisofs can use, is to format a blank HFS floppy disk on a + Mac, paste an icon to its "Get Info" box. If using Linux + with the HFS module installed, mount the floppy using some- + thing like: + + mount -t hfs /dev/fd0 /mnt/floppy + + The floppy will be mounted as a CAP file system by default. + Then run mkisofs using something like: + + mkisofs --cap -o output source_dir /mnt/floppy + + If you are not using Linux, then you can use the hfsutils to + copy the icon file from the floppy. However, care has to be + taken, as the icon file contains a control character. e.g. + + + + +Version 3.0 Last change: 2010/04/25 44 + + + + + + +Maintenance Procedures MKISOFS(8) + + + + hmount /dev/fd0 + hdir -a + hcopy -m Icon^V^M icon_dir/icon + + Where '^V^M' is control-V followed by control-M. Then run + mmkkiissooffss by using something like: + + mkisofs --macbin -o output source_dir icon_dir + + The procedure for creating/using custom folder icons is very + similar - paste an icon to folder's "Get Info" box and + transfer the resulting 'Icon\r' file to the relevant direc- + tory in the mkisofs source tree. + + You may want to hide the icon files from the ISO-9660 and + Joliet trees. + + To give a custom icon to a Joliet CD, follow the instruc- + tions found at: + http://www.fadden.com/cdrfaq/faq03.html#[3-21] HHFFSS BBOOOOTT DDRRIIVVEERR - It _m_a_y be possible to make the hybrid CD bootable on a - Macintosh. + It _m_a_y be possible to make the hybrid CD bootable on a + Macintosh. + + A bootable HFS CD requires an Apple CD-ROM (or compatible) + driver, a bootable HFS partition and the necessary System, + Finder, etc. files. + + A driver can be obtained from any other Macintosh bootable + CD-ROM using the _a_p_p_l_e__d_r_i_v_e_r utility. This file can then be + used with the -bboooott-hhffss-ffiillee option. + + The HFS partition (i.e. the hybrid disk in our case) must + contain a suitable System Folder, again from another CD-ROM + or disk. + + For a partition to be bootable, it must have its _b_o_o_t _b_l_o_c_k + set. The boot block is in the first two blocks of a parti- + tion. For a non-bootable partition the boot block is full of + zeros. Normally, when a System file is copied to partition + on a Macintosh disk, the boot block is filled with a number + of required settings - unfortunately I don't know the full + spec for the boot block, so I'm guessing that the following + will work OK. + + Therefore, the utility _a_p_p_l_e__d_r_i_v_e_r also extracts the boot + block from the first HFS partition it finds on the given + CD-ROM and this is used for the HFS partition created by + mmkkiissooffss. + - A bootable HFS CD requires an Apple CD-ROM (or compatible) - driver, a bootable HFS partition and the necessary System, - Finder, etc. files. - - A driver can be obtained from any other Macintosh bootable - CD-ROM using the _a_p_p_l_e___d_r_i_v_e_r utility. This file can then - be used with the --bboooott--hhffss--ffiillee option. - - The HFS partition (i.e. the hybrid disk in our case) must - contain a suitable System Folder, again from another CD- - ROM or disk. - - For a partition to be bootable, it must have it's _b_o_o_t - _b_l_o_c_k set. The boot block is in the first two blocks of a - partition. For a non-bootable partition the boot block is - full of zeros. Normally, when a System file is copied to - partition on a Macintosh disk, the boot block is filled - with a number of required settings - unfortunately I don't - know the full spec for the boot block, so I'm guessing - that the following will work OK. - - Therefore, the utility _a_p_p_l_e___d_r_i_v_e_r also extracts the boot - block from the first HFS partition it finds on the given - CD-ROM and this is used for the HFS partition created by - mmkkiissooffss. - - PLEASE NOTE - By using a driver from an Apple CD and copying - Apple software to your CD, you become liable to - obey Apple Computer, Inc. Software License Agree- - ments. + + +Version 3.0 Last change: 2010/04/25 45 + + + + + + +Maintenance Procedures MKISOFS(8) + + + + PLEASE NOTE + By using a driver from an Apple CD and copying Apple + software to your CD, you become liable to obey Apple + Computer, Inc. Software License Agreements. EELL TTOORRIITTOO BBOOOOTT IINNFFOORRMMAATTIIOONN TTAABBLLEE - When the --bboooott--iinnffoo--ttaabbllee option is given, mmkkiissooffss will - modify the boot file specified by the --bb option by insert- - ing a 56-byte "boot information table" at offset 8 in the - file. This modification is done in the source filesystem, - so make sure you use a copy if this file is not easily - recreated! This file contains pointers which may not be - easily or reliably obtained at boot time. - - The format of this table is as follows; all integers are - in section 7.3.1 ("little endian") format. - - Offset Name Size Meaning - 8 bi_pvd 4 bytes LBA of primary volume descriptor - 12 bi_file 4 bytes LBA of boot file - 16 bi_length 4 bytes Boot file length in bytes - 20 bi_csum 4 bytes 32-bit checksum - 24 bi_reserved 40 bytes Reserved - - The 32-bit checksum is the sum of all the 32-bit words in - the boot file starting at byte offset 64. All linear - block addresses (LBAs) are given in CD sectors (normally - 2048 bytes). + When the -bboooott-iinnffoo-ttaabbllee option is given, mmkkiissooffss will + modify the boot file specified by the -bb option by inserting + a 56-byte "boot information table" at offset 8 in the file. + This modification is done in the source filesystem, so make + sure you use a copy if this file is not easily recreated! + This file contains pointers which may not be easily or reli- + ably obtained at boot time. + + The format of this table is as follows; all integers are in + section 7.3.1 ("little endian") format. + + Offset Name Size Meaning + 8 bi_pvd 4 bytes LBA of primary volume descriptor + 12 bi_file 4 bytes LBA of boot file + 16 bi_length 4 bytes Boot file length in bytes + 20 bi_csum 4 bytes 32-bit checksum + 24 bi_reserved 40 bytes Reserved + + The 32-bit checksum is the sum of all the 32-bit words in + the boot file starting at byte offset 64. All linear block + addresses (LBAs) are given in CD sectors (normally 2048 + bytes). CCOONNFFIIGGUURRAATTIIOONN - mmkkiissooffss looks for the ..mmkkiissooffssrrcc file, first in the cur- - rent working directory, then in the user's home directory, - and then in the directory in which the mmkkiissooffss binary is - stored. This file is assumed to contain a series of lines - of the form TTAAGG==_v_a_l_u_e_, and in this way you can specify - certain options. The case of the tag is not significant. - Some fields in the volume header are not settable on the - command line, but can be altered through this facility. - Comments may be placed in this file, using lines which - start with a hash (#) character. - - AAPPPPII The application identifier should describe the - application that will be on the disc. There is - space on the disc for 128 characters of informa- - tion. May be overridden using the --AA command line - option. - - CCOOPPYY The copyright information, often the name of a file - on the disc containing the copyright notice. There - is space in the disc for 37 characters of informa- - tion. May be overridden using the --ccooppyyrriigghhtt com- - mand line option. - - AABBSSTT The abstract information, often the name of a file - on the disc containing an abstract. There is space - in the disc for 37 characters of information. May - be overridden using the --aabbssttrraacctt command line - option. - - BBIIBBLL The bibliographic information, often the name of a - file on the disc containing a bibliography. There - is space in the disc for 37 characters of informa- - tion. May be overridden using the --bbiilliioo command - line option. - - PPRREEPP This should describe the preparer of the CDROM, - usually with a mailing address and phone number. - There is space on the disc for 128 characters of - information. May be overridden using the --pp com- - mand line option. - - PPUUBBLL This should describe the publisher of the CDROM, - usually with a mailing address and phone number. - There is space on the disc for 128 characters of - information. May be overridden using the --PP com- - mand line option. - - SSYYSSII The System Identifier. There is space on the disc - for 32 characters of information. May be overrid- - den using the --ssyyssiidd command line option. - - VVOOLLII The Volume Identifier. There is space on the disc - for 32 characters of information. May be overrid- - den using the --VV command line option. - - VVOOLLSS The Volume Set Name. There is space on the disc - for 128 characters of information. May be overrid- - den using the --vvoollsseett command line option. - - HHFFSS__TTYYPPEE - The default TYPE for Macintosh files. Must be - exactly 4 characters. May be overridden using the - --hhffss--ttyyppee command line option. - - HHFFSS__CCRREEAATTOORR - The default CREATOR for Macintosh files. Must be - exactly 4 characters. May be overridden using the - --hhffss--ccrreeaattoorr command line option. - - mmkkiissooffss can also be configured at compile time with - defaults for many of these fields. See the file - defaults.h. + mmkkiissooffss looks for the ..mmkkiissooffssrrcc file, first in the current + working directory, then in the user's home directory, and + then in the directory in which the mmkkiissooffss binary is stored. + This file is assumed to contain a series of lines of the + form TTAAGG==_v_a_l_u_e , and in this way you can specify certain + options. The case of the tag is not significant. Some + fields in the volume header are not settable on the command + line, but can be altered through this facility. Comments + may be placed in this file, using lines which start with a + hash (#) character. + + AAPPPPII The application identifier should describe the applica- + tion that will be on the disc. There is space on the + disc for 128 characters of information. The related + Joliet entry is limited to 64 characters. May be over- + ridden using the -AA command line option. + + CCOOPPYY The copyright information, often the name of a file on + the disc containing the copyright notice. There is + space in the disc for 37 characters of information. + The related Joliet entry is limited to 18 characters. + May be overridden using the -ccooppyyrriigghhtt command line + + + +Version 3.0 Last change: 2010/04/25 46 + + + + + + +Maintenance Procedures MKISOFS(8) + + + + option. + + AABBSSTT The abstract information, often the name of a file on + the disc containing an abstract. There is space in the + disc for 37 characters of information. The related + Joliet entry is limited to 18 characters. May be over- + ridden using the -aabbssttrraacctt command line option. + + BBIIBBLL The bibliographic information, often the name of a file + on the disc containing a bibliography. There is space + in the disc for 37 characters of information. The + related Joliet entry is limited to 18 characters. May + be overridden using the -bbiilliioo command line option. + + PPRREEPP This should describe the preparer of the CDROM, usually + with a mailing address and phone number. There is + space on the disc for 128 characters of information. + The related Joliet entry is limited to 64 characters. + May be overridden using the -pp command line option. + + PPUUBBLL This should describe the publisher of the CDROM, usu- + ally with a mailing address and phone number. There is + space on the disc for 128 characters of information. + The related Joliet entry is limited to 64 characters. + May be overridden using the -ppuubblliisshheerr command line + option. + + SSYYSSII The System Identifier. There is space on the disc for + 32 characters of information. May be overridden using + the -ssyyssiidd command line option. + + VVOOLLII The Volume Identifier. There is space on the disc for + 32 characters of information. May be overridden using + the -VV command line option. + + VVOOLLSS The Volume Set Name. There is space on the disc for + 128 characters of information. The related Joliet + entry is limited to 64 characters. May be overridden + using the -vvoollsseett command line option. + + HHFFSS__TTYYPPEE + The default TYPE for Macintosh files. Must be exactly 4 + characters. May be overridden using the -hhffss-ttyyppee com- + mand line option. + + HHFFSS__CCRREEAATTOORR + The default CREATOR for Macintosh files. Must be + exactly 4 characters. May be overridden using the + -hhffss-ccrreeaattoorr command line option. + + mmkkiissooffss can also be configured at compile time with defaults + for many of these fields. See the file defaults.h. + + + +Version 3.0 Last change: 2010/04/25 47 + + + + + + +Maintenance Procedures MKISOFS(8) + EEXXAAMMPPLLEESS - To create a vanilla ISO-9660 filesystem image in the file - _c_d_._i_s_o, where the directory _c_d___d_i_r will become the root - directory if the CD, call: + To create a vanilla ISO-9660 filesystem image in the file + _c_d._i_s_o, where the directory _c_d__d_i_r will become the root + directory of the CD ISO image, call: + + % mkisofs -o cd.iso cd_dir + + To create a CD with Rock Ridge extensions of the source + directory _c_d__d_i_r: + + % mkisofs -o cd.iso -R cd_dir - % mkisofs -o cd.iso cd_dir + To create a CD with Rock Ridge extensions of the source + directory _c_d__d_i_r where all files have at least read permis- + sion and all files are owned by _r_o_o_t, call: - To create a CD with Rock Ridge extensions of the source - directory _c_d___d_i_r: + % mkisofs -o cd.iso -r cd_dir - % mkisofs -o cd.iso -R cd_dir + To write a tar archive directly to a CD that will later con- + tain a simple ISO-9660 filesystem with the tar archive call: - To create a CD with Rock Ridge extensions of the source - directory _c_d___d_i_r where all files have at least read per- - mission and all files are owned by _r_o_o_t, call: + % star -c . | mkisofs -stream-media-size 333000 | \ + cdrecord dev=b,t,l -dao tsize=333000s - - % mkisofs -o cd.iso -r cd_dir + To create a HFS hybrid CD with the Joliet and Rock Ridge + extensions of the source directory _c_d__d_i_r: - To create a HFS hybrid CD with the Joliet and Rock Ridge - extensions of the source directory _c_d___d_i_r: + % mkisofs -o cd.iso -R -J -hfs cd_dir - % mkisofs -o cd.iso -R -J -hfs cd_dir + To create a HFS hybrid CD from the source directory _c_d__d_i_r + that contains Netatalk Apple/Unix files: - To create a HFS hybrid CD from the source directory _c_d___d_i_r - that contains Netatalk Apple/Unix files: + % mkisofs -o cd.iso --netatalk cd_dir - % mkisofs -o cd.iso --netatalk cd_dir + To create a HFS hybrid CD from the source directory _c_d__d_i_r, + giving all files CREATOR and TYPES based on just their + filename extensions listed in the file "mapping".: - To create a HFS hybrid CD from the source directory - _c_d___d_i_r, giving all files CREATOR and TYPES based on just - their filename extensions listed in the file "mapping".: + % mkisofs -o cd.iso -map mapping cd_dir - % mkisofs -o cd.iso -map mapping cd_dir + To create a CD with the 'Apple Extensions to ISO-9660', from + the source directories _c_d__d_i_r and _a_n_o_t_h_e_r__d_i_r. Files in all + the known Apple/Unix format are decoded and any other files + are given CREATOR and TYPE based on their magic number given + in the file "magic": - To create a CD with the 'Apple Extensions to ISO9660', - from the source directories _c_d___d_i_r and _a_n_o_t_h_e_r___d_i_r_. Files - in all the known Apple/Unix format are decoded and any - other files are given CREATOR and TYPE based on their - magic number given in the file "magic": + % mkisofs -o cd.iso -apple -magic magic -probe \ + cd_dir another_dir - % mkisofs -o cd.iso -apple -magic magic -probe \ - cd_dir another_dir + The following example puts different files on the CD that + all have the name README, but have different contents when + seen as a ISO-9660/RockRidge, Joliet or HFS CD. - The following example puts different files on the CD that - all have the name README, but have different contents when - seen as a ISO9660/RockRidge, Joliet or HFS CD. - Current directory contains: - % ls -F - README.hfs README.joliet README.unix cd_dir/ +Version 3.0 Last change: 2010/04/25 48 - The following command puts the contents of the directory - _c_d___d_i_r on the CD along with the three README files - but - only one will be seen from each of the three filesystems: - % mkisofs -o cd.iso -hfs -J -r -graft-points \ - -hide README.hfs -hide README.joliet \ - -hide-joliet README.hfs -hide-joliet README.unix \ - -hide-hfs README.joliet -hide-hfs README.unix \ - README=README.hfs README=README.joliet \ - README=README.unix cd_dir - i.e. the file README.hfs will be seen as README on the HFS - CD and the other two README files will be hidden. Simi- - larly for the Joliet and ISO9660/RockRidge CD. - There are probably all sorts of strange results possible - with combinations of the hide options ... + + +Maintenance Procedures MKISOFS(8) + + + + Current directory contains: + + % ls -F + README.hfs README.joliet README.unix cd_dir/ + + The following command puts the contents of the directory + _c_d__d_i_r on the CD along with the three README files - but + only one will be seen from each of the three filesystems: + + % mkisofs -o cd.iso -hfs -J -r -graft-points \ + -hide README.hfs -hide README.joliet \ + -hide-joliet README.hfs -hide-joliet README.unix \ + -hide-hfs README.joliet -hide-hfs README.unix \ + README=README.hfs README=README.joliet \ + README=README.unix cd_dir + + i.e. the file README.hfs will be seen as README on the HFS + CD and the other two README files will be hidden. Similarly + for the Joliet and ISO-9660/RockRidge CD. + + There are probably all sorts of strange results possible + with combinations of the hide options ... AAUUTTHHOORR - mmkkiissooffss is not based on the standard mk*fs tools for unix, - because we must generate a complete copy of an existing - filesystem on a disk in the iso9660 filesystem. The name - mkisofs is probably a bit of a misnomer, since it not only - creates the filesystem, but it also populates it as well. - However, the appropriate tool name for a UNIX tool that - creates populated filesystems - mkproto - is not well - known. - - Eric Youngdale or - wrote the first versions (1993 ... - 1998) of the mkisofs utility. The copyright for old ver- - sions of the mkisofs utility is held by Yggdrasil Comput- - ing, Incorporated. Joerg Schilling wrote the SCSI trans- - port library and it's adaptation layer to mmkkiissooffss and - newer parts (starting from 1999) of the utility, this - makes mmkkiissooffss Copyright (C) 1999, 2000, 2001 Joerg - Schilling. - - HFS hybrid code Copyright (C) James Pearson 1997, 1998, - 1999, 2000, 2001 - libhfs code Copyright (C) 1996, 1997 Robert Leslie - libfile code Copyright (C) Ian F. Darwin 1986, 1987, 1989, - 1990, 1991, 1992, 1994, 1995. + Eric Youngdale or + wrote the first versions (1993 ... 1998) of the mkisofs + utility. The copyright for old versions of the mkisofs + utility is held by Yggdrasil Computing, Incorporated. Joerg + Schilling wrote the SCSI transport library and its adapta- + tion layer to mmkkiissooffss and newer parts (starting from 1997) + of the utility. Joerg Schilling is the primary maintainer + since 1999, this makes mmkkiissooffss Copyright (C) 1997-2010 Joerg + Schilling. + + HFS hybrid code Copyright (C) James Pearson 1997 ... 2001. + + libhfs code Copyright (C) 1996, 1997 Robert Leslie. + + libfile code Copyright (C) Ian F. Darwin 1986, 1987, 1989, + 1990, 1991, 1992, 1994, 1995. NNOOTTEESS - MMkkiissooffss may safely be installed suid root. This may be - needed to allow mmkkiissooffss to read the previous session when - creating a multi session image. - - If mmkkiissooffss is creating a filesystem image with Rock Ridge - attributes and the directory nesting level of the source - directory tree is too much for ISO-9660, mmkkiissooffss will do - deep directory relocation. This results in a directory - called RRRR__MMOOVVEEDD in the root directory of the CD. You can- - not avoid this directory. + MMkkiissooffss may safely be installed suid root. This may be + needed to allow mmkkiissooffss to read the previous session when + creating a multi session image. + + mmkkiissooffss is not based on the standard mk*fs tools for unix, + because we must generate a complete copy of an existing + filesystem on a disk in the ISO-9660 filesystem. The name + mkisofs is probably a bit of a misnomer, since it not only + creates the filesystem, but it also populates it as well. + -BBUUGGSS - +o Any files that have hard links to files not in the - tree being copied to the iso9660 filesystem will - have an incorrect file reference count. - +o Does not check for SUSP record(s) in "." entry of - the root directory to verify the existence of Rock - Ridge enhancements. +Version 3.0 Last change: 2010/04/25 49 - This problem is present when reading old sessions - while adding data in multi-session mode. - +o Does not properly read relocated directories in - multi-session mode when adding data. - Any relocated deep directory is lost if the new - session does not include the deep directory. - Repeat by: create first session with deep directory - relocation then add new session with a single dir - that differs from the old deep path. - +o Does not re-use RR_MOVED when doing multi-session - from TRANS.TBL - +o Does not create whole_name entry for RR_MOVED in - multi-session mode. +Maintenance Procedures MKISOFS(8) - There may be some other ones. Please, report them to the - author. + + + However, the appropriate tool name for a UNIX tool that + creates populated filesystems - mmkkpprroottoo - is not well known. + + If mmkkiissooffss is creating a filesystem image with Rock Ridge + attributes and the directory nesting level of the source + directory tree is too much for ISO-9660, mmkkiissooffss will do + deep directory relocation. This results in a directory + called RRRR__MMOOVVEEDD in the root directory of the CD. You cannot + avoid this directory in the directory tree that is visible + with ISO-9660 but it it automatically hidden in the RRoocckk + RRiiddggee tree. + + The sparc boot support that is implemented with the + -ssppaarrcc-bboooott options completely follows the official Sparc CD + boot requirements from the Boot prom in Sun Sparc systems. + Some Linux distributions for Sparc systems use a boot loader + called SSIILLOO that unfortunately is not Sparc CD boot compli- + ant. It is annoyingly to see that the Authors of SILO don't + fix SILO but instead provide a completely unneeded "patch" + to mkisofs that incorporates far more source than the fix + for SILO would need. + +BBUUGGSS + +o Does not properly read relocated directories in multi- + session mode when adding data. + + Any relocated deep directory is lost if the new session + does not include the deep directory. + + Repeat by: create first session with deep directory + relocation then add new session with a single dir that + differs from the old deep path. + + +o Does not re-use RR_MOVED when doing multi-session from + TRANS.TBL + + There may be some other ones. Please, report them to the + author. HHFFSS PPRROOBBLLEEMMSS//LLIIMMIITTAATTIIOONNSS - I have had to make several assumptions on how I expect the - modified libhfs routines to work, however there may be - situations that either I haven't thought of, or come - across when these assumptions fail. Therefore I can't - guarantee that mkisofs will work as expected (although I - haven't had a major problem yet). Most of the HFS features - work fine, however, some are not fully tested. These are - marked as _A_l_p_h_a above. - - Although HFS filenames appear to support upper and lower - case letters, the filesystem is case insensitive. i.e. the - filenames "aBc" and "AbC" are the same. If a file is found - in a directory with the same HFS name, then _m_k_i_s_o_f_s will - attempt, where possible, to make a unique name by adding - '_' characters to one of the filenames. - - HFS file/directory names that share the first 31 charac- - ters have _N' (N == decimal number) substituted for the - last few characters to generate unique names. - - Care must be taken when "grafting" Apple/Unix files or - directories (see above for the method and syntax - involved). It is not possible to use a new name for an - Apple/Unix encoded file/directory. e.g. If a Apple/Unix - encoded file called "oldname" is to added to the CD, then - you can not use the command line: - - mkisofs -o output.raw -hfs -graft-points new- - name=oldname cd_dir - - mkisofs will be unable to decode "oldname". However, you - can graft Apple/Unix encoded files or directories as long - as you do not attempt to give them new names as above. - - When creating an HFS volume with the multisession options, - --MM and --CC, only files in the last session will be in the - HFS volume. i.e. mkisofs can not _a_d_d existing files from - previous sessions to the HFS volume. - - However, if each session is created with the --ppaarrtt option, - then each session will appear as separate volumes when - mounted on a Mac. In this case, it is worth using the --VV - or --hhffss--vvoolliidd option to give each session a unique volume - name, otherwise each "volume" will appear on the Desktop - with the same name. - - Symbolic links (as with all other non-regular files) are - not added to the HFS directory. - - Hybrid volumes may be larger than pure ISO9660 volumes - containing the same data. In some cases (e.g. DVD sized - volumes) the hybrid volume may be significantly larger. As - an HFS volume gets bigger, so does the allocation block - size (the smallest amount of space a file can occupy). - For a 650Mb CD, the allocation block is 10Kb, for a 4.7Gb - DVD it will be about 70Kb. - - The maximum number of files in an HFS volume is about - 65500 - although the real limit will be somewhat less than - this. - - The resulting hybrid volume can be accessed on a Unix - machine by using the hfsutils routines. However, no - changes can be made to the volume as it is set as lloocckkeedd.. - The option --hhffss--uunnlloocckk will create an output image that is - unlocked - however no changes should be made to the con- - tents of the volume (unless you really know what you are - doing) as it's not a "real" HFS volume. - - Using the --mmaacc--nnaammee option will not currently work with - the --TT option - the Unix name will be used in the - TRANS.TBL file, not the Macintosh name. - - Although mmkkiissooffss does not alter the contents of a file, if - a binary file has it's TYPE set as 'TEXT', it _m_a_y be read - incorrectly on a Macintosh. Therefore a better choice for - the default TYPE may be '????' - - The --mmaacc--bboooott--ffiillee option may not work at all... - - May not work with PC Exchange v2.2 or higher files (avail- - able with MacOS 8.1). DOS media containing PC Exchange - files should be mounted as type mmssddooss (not vvffaatt) when - using Linux. - - The SFM format is only partially supported - see HHFFSS MMAACC-- - IINNTTOOSSHH FFIILLEE FFOORRMMAATTSS section above. - - It is not possible to use the the --ssppaarrcc--bboooott or --ggeenneerriicc-- - bboooott options with the --bboooott--hhffss--ffiillee or --pprreepp--bboooott - options. + I have had to make several assumptions on how I expect the + modified libhfs routines to work, however there may be + situations that either I haven't thought of, or come across + when these assumptions fail. Therefore I can't guarantee + that mkisofs will work as expected (although I haven't had a + major problem yet). Most of the HFS features work fine, how- + ever, some are not fully tested. These are marked as _A_l_p_h_a + above. + + Although HFS filenames appear to support upper and lower + case letters, the filesystem is case insensitive. i.e. the + + + +Version 3.0 Last change: 2010/04/25 50 + + - mmkkiissooffss should be able to create HFS hybrid images over - 4Gb, although this has not been fully tested. + + + +Maintenance Procedures MKISOFS(8) + + + + filenames "aBc" and "AbC" are the same. If a file is found + in a directory with the same HFS name, then _m_k_i_s_o_f_s will + attempt, where possible, to make a unique name by adding '_' + characters to one of the filenames. + + HFS file/directory names that share the first 31 characters + have _N' (N == decimal number) substituted for the last few + characters to generate unique names. + + Care must be taken when "grafting" Apple/Unix files or + directories (see above for the method and syntax involved). + It is not possible to use a new name for an Apple/Unix + encoded file/directory. e.g. If a Apple/Unix encoded file + called "oldname" is to added to the CD, then you can not use + the command line: + + mkisofs -o output.raw -hfs -graft-points + newname=oldname cd_dir + + mkisofs will be unable to decode "oldname". However, you can + graft Apple/Unix encoded files or directories as long as you + do not attempt to give them new names as above. + + When creating an HFS volume with the multisession options, + -MM and -CC, only files in the last session will be in the HFS + volume. i.e. mkisofs can not _a_d_d existing files from previ- + ous sessions to the HFS volume. + + However, if each session is created with the -ppaarrtt option, + then each session will appear as separate volumes when + mounted on a Mac. In this case, it is worth using the -VV or + -hhffss-vvoolliidd option to give each session a unique volume name, + otherwise each "volume" will appear on the Desktop with the + same name. + + Symbolic links (as with all other non-regular files) are not + added to the HFS directory. + + Hybrid volumes may be larger than pure ISO-9660 volumes con- + taining the same data. In some cases (e.g. DVD sized + volumes) the hybrid volume may be significantly larger. As + an HFS volume gets bigger, so does the allocation block size + (the smallest amount of space a file can occupy). For a + 650Mb CD, the allocation block is 10Kb, for a 4.7Gb DVD it + will be about 70Kb. + + The maximum number of files in an HFS volume is about 65500 + - although the real limit will be somewhat less than this. + + The resulting hybrid volume can be accessed on a Unix + machine by using the hfsutils routines. However, no changes + can be made to the volume as it is set as lloocckkeedd.. The option + + + +Version 3.0 Last change: 2010/04/25 51 + + + + + + +Maintenance Procedures MKISOFS(8) + + + + -hhffss-uunnlloocckk will create an output image that is unlocked - + however no changes should be made to the contents of the + volume (unless you really know what you are doing) as it's + not a "real" HFS volume. + + Using the -mmaacc-nnaammee option will not currently work with the + -TT option - the Unix name will be used in the TRANS.TBL + file, not the Macintosh name. + + Although mmkkiissooffss does not alter the contents of a file, if a + binary file has its TYPE set as 'TEXT', it _m_a_y be read + incorrectly on a Macintosh. Therefore a better choice for + the default TYPE may be '????' + + The -mmaacc-bboooott-ffiillee option may not work at all... + + May not work with PC Exchange v2.2 or higher files (avail- + able with MacOS 8.1). DOS media containing PC Exchange + files should be mounted as type mmssddooss (not vvffaatt) when using + Linux. + + The SFM format is only partially supported - see HHFFSS MMAACCIINN-- + TTOOSSHH FFIILLEE FFOORRMMAATTSS section above. + + It is not possible to use the the -ssppaarrcc-bboooott or + -ggeenneerriicc-bboooott options with the -bboooott-hhffss-ffiillee the -pprreepp-bboooott + or -cchhrrpp-bboooott options. + + mmkkiissooffss should be able to create HFS hybrid images over 4Gb, + although this has not been fully tested. SSEEEE AALLSSOO - ccddrreeccoorrdd(1), mmkkzzffttrreeee(1), mmaaggiicc(5), aappppllee__ddrriivveerr(8). + ccddrreeccoorrdd(1), mmkkzzffttrreeee(1), mmaaggiicc(5), aappppllee__ddrriivveerr(8). FFUUTTUURREE IIMMPPRROOVVEEMMEENNTTSS - Some sort of gui interface. + Some sort of gui interface. AAVVAAIILLAABBIILLIITTYY - mmkkiissooffss is available as part of the cdrecord package from - ftp://ftp.berlios.de/pub/cdrecord/ + mmkkiissooffss is available as part of the cdrecord package from + ftp://ftp.berlios.de/pub/cdrecord/ - hhffssuuttiillss from ftp://ftp.mars.org/pub/hfs + hhffssuuttiillss from ftp://ftp.mars.org/pub/hfs - mmkkzzffttrreeee is available as part of the zisofs-tools package - from ftp://ftp.kernel.org/pub/linux/utils/fs/zisofs/ + mmkkzzffttrreeee is available as part of the zisofs-tools package + from ftp://ftp.kernel.org/pub/linux/utils/fs/zisofs/ MMAAIILLIINNGG LLIISSTTSS - If you want to actively take part on the development of - mkisofs, and/or mkhybrid, you may join the cdwriting mail- - ing list by sending mail to: + If you want to actively take part on the development of + mkisofs, you may join the developer mailing list via this + URL: + + + +Version 3.0 Last change: 2010/04/25 52 + + - other-cdwrite-request@lists.debian.org - and include the word _s_u_b_s_c_r_i_b_e in the body. The mail - address of the list is: - cdwrite@lists.debian.org + +Maintenance Procedures MKISOFS(8) + + + + hhttttpp::////lliissttss..bbeerrlliiooss..ddee//mmaaiillmmaann//lliissttiinnffoo//ccddrreeccoorrdd--ddeevveellooppeerrss MMAAIINNTTAAIINNEERR - Joerg Schilling - Seestr. 110 - D-13353 Berlin - Germany + Joerg Schilling + Seestr. 110 + D-13353 Berlin + Germany HHFFSS MMKKHHYYBBRRIIDD MMAAIINNTTAAIINNEERR - James Pearson + James Pearson + + j.pearson@ge.ucl.ac.uk + + + If you have support questions, send them to: + + ccddrreeccoorrdd--ssuuppppoorrtt@@bbeerrlliiooss..ddee + + If you definitly found a bug, send a mail to: + + ccddrreeccoorrdd--ddeevveellooppeerrss@@bbeerrlliiooss..ddee + or jjooeerrgg..sscchhiilllliinngg@@ffookkuuss..ffrraauunnhhooffeerr..ddee + + To subscribe, use: + + hhttttpp::////lliissttss..bbeerrlliiooss..ddee//mmaaiillmmaann//lliissttiinnffoo//ccddrreeccoorrdd--ddeevveellooppeerrss + or hhttttpp::////lliissttss..bbeerrlliiooss..ddee//mmaaiillmmaann//lliissttiinnffoo//ccddrreeccoorrdd--ssuuppppoorrtt + +IINNTTEERRFFAACCEE SSTTAABBIILLIITTYY + The interfaces provided by mmkkiissooffss are designed for long + term stability. As mmkkiissooffss depends on interfaces provided + by the underlying operating system, the stability of the + interfaces offered by mmkkiissooffss depends on the interface sta- + bility of the OS interfaces. Modified interfaces in the OS + may enforce modified interfaces in mmkkiissooffss. + + + + + + + + + + + - j.pearson@ge.ucl.ac.uk - If you have support questions, send them to: - ccddrreeccoorrdd--ssuuppppoorrtt@@bbeerrlliiooss..ddee - or ootthheerr--ccddwwrriittee@@lliissttss..ddeebbiiaann..oorrgg - Of you definitly found a bug, send a mail to: - ccddrreeccoorrdd--ddeevveellooppeerrss@@bbeerrlliiooss..ddee - or sscchhiilllliinngg@@ffookkuuss..ffhhgg..ddee - To subscribe, use: - hhttttpp::////lliissttss..bbeerrlliiooss..ddee//mmaaiillmmaann//lliissttiinnffoo//ccddrreeccoorrdd--ddeevveelloopp-- - eerrss - or hhttttpp::////lliissttss..bbeerrlliiooss..ddee//mmaaiillmmaann//lliissttiinnffoo//ccddrreeccoorrdd--ssuupp-- - ppoorrtt +Version 3.0 Last change: 2010/04/25 53 -Version 2.0 24 Dec 2002 MKISOFS(8) diff -Nru cdrtools-2.01.01a33/doc/mkisofs.ps cdrtools-3.02a09/doc/mkisofs.ps --- cdrtools-2.01.01a33/doc/mkisofs.ps 2002-12-24 15:58:04.000000000 +0000 +++ cdrtools-3.02a09/doc/mkisofs.ps 2010-05-30 15:53:12.000000000 +0000 @@ -1,2550 +1,8275 @@ -%!PS-Adobe-3.0 -%%Creator: groff version 1.17.2 -%%CreationDate: Tue Dec 24 17:04:32 2002 -%%DocumentNeededResources: font Times-Roman -%%+ font Times-Bold -%%+ font Times-Italic -%%DocumentSuppliedResources: procset grops 1.17 2 -%%Pages: 24 -%%PageOrder: Ascend -%%Orientation: Portrait +%!PS +%%Version: 3.15 +%%DocumentFonts: (atend) +%%Pages: (atend) %%EndComments -%%BeginProlog -%%BeginResource: procset grops 1.17 2 -/setpacking where{ -pop -currentpacking -true setpacking -}if -/grops 120 dict dup begin -/SC 32 def -/A/show load def -/B{0 SC 3 -1 roll widthshow}bind def -/C{0 exch ashow}bind def -/D{0 exch 0 SC 5 2 roll awidthshow}bind def -/E{0 rmoveto show}bind def -/F{0 rmoveto 0 SC 3 -1 roll widthshow}bind def -/G{0 rmoveto 0 exch ashow}bind def -/H{0 rmoveto 0 exch 0 SC 5 2 roll awidthshow}bind def -/I{0 exch rmoveto show}bind def -/J{0 exch rmoveto 0 SC 3 -1 roll widthshow}bind def -/K{0 exch rmoveto 0 exch ashow}bind def -/L{0 exch rmoveto 0 exch 0 SC 5 2 roll awidthshow}bind def -/M{rmoveto show}bind def -/N{rmoveto 0 SC 3 -1 roll widthshow}bind def -/O{rmoveto 0 exch ashow}bind def -/P{rmoveto 0 exch 0 SC 5 2 roll awidthshow}bind def -/Q{moveto show}bind def -/R{moveto 0 SC 3 -1 roll widthshow}bind def -/S{moveto 0 exch ashow}bind def -/T{moveto 0 exch 0 SC 5 2 roll awidthshow}bind def -/SF{ -findfont exch -[exch dup 0 exch 0 exch neg 0 0]makefont -dup setfont -[exch/setfont cvx]cvx bind def -}bind def -/MF{ -findfont -[5 2 roll -0 3 1 roll -neg 0 0]makefont -dup setfont -[exch/setfont cvx]cvx bind def -}bind def -/level0 0 def -/RES 0 def -/PL 0 def -/LS 0 def -/MANUAL{ -statusdict begin/manualfeed true store end -}bind def -/PLG{ -gsave newpath clippath pathbbox grestore -exch pop add exch pop -}bind def -/BP{ -/level0 save def -1 setlinecap -1 setlinejoin -72 RES div dup scale -LS{ -90 rotate -}{ -0 PL translate -}ifelse -1 -1 scale -}bind def -/EP{ -level0 restore -showpage -}bind def -/DA{ -newpath arcn stroke -}bind def -/SN{ -transform -.25 sub exch .25 sub exch -round .25 add exch round .25 add exch -itransform -}bind def -/DL{ -SN -moveto -SN -lineto stroke -}bind def -/DC{ -newpath 0 360 arc closepath -}bind def -/TM matrix def -/DE{ -TM currentmatrix pop -translate scale newpath 0 0 .5 0 360 arc closepath -TM setmatrix -}bind def -/RC/rcurveto load def -/RL/rlineto load def -/ST/stroke load def -/MT/moveto load def -/CL/closepath load def -/FL{ -currentgray exch setgray fill setgray -}bind def -/BL/fill load def -/LW/setlinewidth load def -/RE{ -findfont -dup maxlength 1 index/FontName known not{1 add}if dict begin -{ -1 index/FID ne{def}{pop pop}ifelse -}forall -/Encoding exch def -dup/FontName exch def -currentdict end definefont pop -}bind def -/DEFS 0 def -/EBEGIN{ -moveto -DEFS begin -}bind def -/EEND/end load def -/CNT 0 def -/level1 0 def -/PBEGIN{ -/level1 save def -translate -div 3 1 roll div exch scale -neg exch neg exch translate -0 setgray -0 setlinecap -1 setlinewidth -0 setlinejoin -10 setmiterlimit -[]0 setdash -/setstrokeadjust where{ -pop -false setstrokeadjust -}if -/setoverprint where{ -pop -false setoverprint -}if -newpath -/CNT countdictstack def -userdict begin -/showpage{}def -}bind def -/PEND{ -clear -countdictstack CNT sub{end}repeat -level1 restore -}bind def -end def -/setpacking where{ -pop -setpacking -}if -%%EndResource -%%IncludeResource: font Times-Roman -%%IncludeResource: font Times-Bold -%%IncludeResource: font Times-Italic -grops begin/DEFS 1 dict def DEFS begin/u{.001 mul}bind def end/RES 72 -def/PL 841.89 def/LS false def/ENC0[/asciicircum/asciitilde/Scaron -/Zcaron/scaron/zcaron/Ydieresis/trademark/quotesingle/.notdef/.notdef -/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef -/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef -/.notdef/.notdef/.notdef/space/exclam/quotedbl/numbersign/dollar/percent -/ampersand/quoteright/parenleft/parenright/asterisk/plus/comma/hyphen -/period/slash/zero/one/two/three/four/five/six/seven/eight/nine/colon -/semicolon/less/equal/greater/question/at/A/B/C/D/E/F/G/H/I/J/K/L/M/N/O -/P/Q/R/S/T/U/V/W/X/Y/Z/bracketleft/backslash/bracketright/circumflex -/underscore/quoteleft/a/b/c/d/e/f/g/h/i/j/k/l/m/n/o/p/q/r/s/t/u/v/w/x/y -/z/braceleft/bar/braceright/tilde/.notdef/quotesinglbase/guillemotleft -/guillemotright/bullet/florin/fraction/perthousand/dagger/daggerdbl -/endash/emdash/ff/fi/fl/ffi/ffl/dotlessi/dotlessj/grave/hungarumlaut -/dotaccent/breve/caron/ring/ogonek/quotedblleft/quotedblright/oe/lslash -/quotedblbase/OE/Lslash/.notdef/exclamdown/cent/sterling/currency/yen -/brokenbar/section/dieresis/copyright/ordfeminine/guilsinglleft -/logicalnot/minus/registered/macron/degree/plusminus/twosuperior -/threesuperior/acute/mu/paragraph/periodcentered/cedilla/onesuperior -/ordmasculine/guilsinglright/onequarter/onehalf/threequarters -/questiondown/Agrave/Aacute/Acircumflex/Atilde/Adieresis/Aring/AE -/Ccedilla/Egrave/Eacute/Ecircumflex/Edieresis/Igrave/Iacute/Icircumflex -/Idieresis/Eth/Ntilde/Ograve/Oacute/Ocircumflex/Otilde/Odieresis -/multiply/Oslash/Ugrave/Uacute/Ucircumflex/Udieresis/Yacute/Thorn -/germandbls/agrave/aacute/acircumflex/atilde/adieresis/aring/ae/ccedilla -/egrave/eacute/ecircumflex/edieresis/igrave/iacute/icircumflex/idieresis -/eth/ntilde/ograve/oacute/ocircumflex/otilde/odieresis/divide/oslash -/ugrave/uacute/ucircumflex/udieresis/yacute/thorn/ydieresis]def -/Times-Italic@0 ENC0/Times-Italic RE/Times-Bold@0 ENC0/Times-Bold RE -/Times-Roman@0 ENC0/Times-Roman RE +% +% Copyright 2005 Sun Microsystems, Inc. All rights reserved. +% Use is subject to license terms. +% +% CDDL HEADER START +% +% The contents of this file are subject to the terms of the +% Common Development and Distribution License, Version 1.0 only +% (the "License"). You may not use this file except in compliance +% with the License. +% +% You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE +% or http://www.opensolaris.org/os/licensing. +% See the License for the specific language governing permissions +% and limitations under the License. +% +% When distributing Covered Code, include this CDDL HEADER in each +% file and include the License file at usr/src/OPENSOLARIS.LICENSE. +% If applicable, add the following below this CDDL HEADER, with the +% fields enclosed by brackets "[]" replaced with your own identifying +% information: Portions Copyright [yyyy] [name of copyright owner] +% +% CDDL HEADER END +% +%ident "%Z%%M% %I% %E% SMI" +% +% Version 3.16 prologue for troff files. +% + +/#copies 1 store +/aspectratio 1 def +/formsperpage 1 def +/landscape false def +/linewidth .3 def +/magnification 1 def +/margin 0 def +/orientation 0 def +/resolution 720 def +/xoffset 0 def +/yoffset 0 def + +/roundpage true def +/useclippath true def +/pagebbox [0 0 612 792] def + +/R /Times-Roman def +/I /Times-Italic def +/B /Times-Bold def +/BI /Times-BoldItalic def +/H /Helvetica def +/HI /Helvetica-Oblique def +/HB /Helvetica-Bold def +/HX /Helvetica-BoldOblique def +/CW /Courier def +/CO /Courier def +/CI /Courier-Oblique def +/CB /Courier-Bold def +/CX /Courier-BoldOblique def +/PA /Palatino-Roman def +/PI /Palatino-Italic def +/PB /Palatino-Bold def +/PX /Palatino-BoldItalic def +/Hr /Helvetica-Narrow def +/Hi /Helvetica-Narrow-Oblique def +/Hb /Helvetica-Narrow-Bold def +/Hx /Helvetica-Narrow-BoldOblique def +/KR /Bookman-Light def +/KI /Bookman-LightItalic def +/KB /Bookman-Demi def +/KX /Bookman-DemiItalic def +/AR /AvantGarde-Book def +/AI /AvantGarde-BookOblique def +/AB /AvantGarde-Demi def +/AX /AvantGarde-DemiOblique def +/NR /NewCenturySchlbk-Roman def +/NI /NewCenturySchlbk-Italic def +/NB /NewCenturySchlbk-Bold def +/NX /NewCenturySchlbk-BoldItalic def +/ZD /ZapfDingbats def +/ZI /ZapfChancery-MediumItalic def +/VR /Varitimes#Roman def +/VI /Varitimes#Italic def +/VB /Varitimes#Bold def +/VX /Varitimes#BoldItalic def +/S /S def +/S1 /S1 def +/GR /Symbol def + +/inch {72 mul} bind def +/min {2 copy gt {exch} if pop} bind def + +/setup { + counttomark 2 idiv {def} repeat pop + + landscape {/orientation 90 orientation add def} if + /scaling 72 resolution div def + linewidth setlinewidth + 1 setlinecap + + pagedimensions + xcenter ycenter translate + orientation neg rotate + width 2 div neg height 2 div translate + xoffset inch yoffset inch translate + margin 2 div dup neg translate + magnification dup aspectratio mul scale + scaling scaling scale + + /Symbol /S Sdefs cf + /Times-Roman /S1 S1defs cf + 0 0 moveto +} def + +/pagedimensions { + useclippath userdict /gotpagebbox known not and { + /pagebbox [clippath pathbbox newpath] def + roundpage currentdict /roundpagebbox known and {roundpagebbox} if + } if + pagebbox aload pop + 4 -1 roll exch 4 1 roll 4 copy + landscape {4 2 roll} if + sub /width exch def + sub /height exch def + add 2 div /xcenter exch def + add 2 div /ycenter exch def + userdict /gotpagebbox true put +} def + +/pagesetup { + /page exch def + currentdict /pagedict known currentdict page known and { + page load pagedict exch get cvx exec + } if +} def + +/decodingdefs [ + {counttomark 2 idiv {y moveto show} repeat} + {neg /y exch def counttomark 2 idiv {y moveto show} repeat} + {neg moveto {2 index stringwidth pop sub exch div 0 32 4 -1 roll widthshow} repeat} + {neg moveto {spacewidth sub 0.0 32 4 -1 roll widthshow} repeat} + {counttomark 2 idiv {y moveto show} repeat} + {neg setfunnytext} +] def + +/setdecoding {/t decodingdefs 3 -1 roll get bind def} bind def + +/w {neg moveto show} bind def +/m {neg dup /y exch def moveto} bind def +/done {/lastpage where {pop lastpage} if} def + +/f { + dup /font exch def findfont exch + dup /ptsize exch def scaling div dup /size exch def scalefont setfont + linewidth ptsize mul scaling 10 mul div setlinewidth + /spacewidth ( ) stringwidth pop def +} bind def + +/changefont { + /fontheight exch def + /fontslant exch def + currentfont [ + 1 0 + fontheight ptsize div fontslant sin mul fontslant cos div + fontheight ptsize div + 0 0 + ] makefont setfont +} bind def + +/sf {f} bind def + +/cf { + dup length 2 idiv + /entries exch def + /chtab exch def + /newfont exch def + + findfont dup length 1 add dict + /newdict exch def + {1 index /FID ne {newdict 3 1 roll put} {pop pop} ifelse} forall + + newdict /Metrics entries dict put + newdict /Metrics get + begin + chtab aload pop + 1 1 entries {pop def} for + newfont newdict definefont pop + end +} bind def + +% +% A few arrays used to adjust reference points and character widths in some +% of the printer resident fonts. If square roots are too high try changing +% the lines describing /radical and /radicalex to, +% +% /radical [0 -75 550 0] +% /radicalex [-50 -75 500 0] +% + +/Sdefs [ + /bracketlefttp [220 500] + /bracketleftbt [220 500] + /bracketrighttp [-70 380] + /bracketrightbt [-70 380] + /braceleftbt [220 490] + /bracketrightex [220 -125 500 0] + /radical [0 0 550 0] + % NeWSprint's \(br is too low, compensate + statusdict /product get (NeWS Server) eq { + /radicalex [-50 100 500 0] + /parenleftex [-20 100 0 0] + + } { + /radicalex [-50 0 500 0] + /parenleftex [-20 -170 0 0] + } ifelse + /integral [100 -50 500 0] + /infinity [10 -75 730 0] +] def + +/S1defs [ + /underscore [0 80 500 0] + /endash [7 90 650 0] +] def %%EndProlog +%%BeginSetup +mark +/resolution 720 def +setup +2 setdecoding +%%EndSetup %%Page: 1 1 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF 355.5(MKISOFS\(8\) MKISOFS\(8\))72 48 R/F1 10.95 -/Times-Bold@0 SF -.219(NA)72 84 S(ME).219 E F0(mkisofs \255 create an h) -108 96 Q -(ybrid ISO9660/JOLIET/HFS \214lesystem with optional Rock Ridge attrib) --.05 E(utes.)-.2 E F1(SYNOPSIS)72 112.8 Q/F2 10/Times-Bold@0 SF(mkisofs) -108 124.8 Q F0([)2.5 E/F3 10/Times-Italic@0 SF(options)2.5 E F0 2.5(][) -2.5 G F2A F3(\214lename)2.5 E F0(])2.5 E F3 -(pathspec [pathspec ...])2.5 E F1(DESCRIPTION)72 141.6 Q F2(mkisofs)108 -153.6 Q F0(is ef)2.5 E(fecti)-.25 E -.15(ve)-.25 G -(ly a pre-mastering program to generate an ISO9660/JOLIET/HFS h).15 E -(ybrid \214lesystem.)-.05 E F2(mkisofs)108 170.4 Q F0 .18 -(is capable of generating the)2.68 F F2 .18(System Use Sharing Pr)2.68 F -.18(otocol r)-.18 F .18(ecords \(SUSP\))-.18 F F0 .18 -(speci\214ed by the)2.68 F F2(Rock)2.68 E .581(Ridge Inter)108 182.4 R -.581(change Pr)-.18 F(otocol.)-.18 E F0 .582(This is used to further de\ -scribe the \214les in the iso9660 \214lesystem to a unix)5.581 F .594 -(host, and pro)108 194.4 R .593(vides information such as longer \214le\ -names, uid/gid, posix permissions, symbolic links, block)-.15 F -(and character de)108 206.4 Q(vices.)-.25 E .472(If Joliet or HFS h)108 -223.2 R .472(ybrid command line options are speci\214ed,)-.05 F F2 -(mkisofs)2.972 E F0 .472(will create additional \214lesystem meta)2.972 -F .044(data for Joliet or HFS.)108 235.2 R .043(The \214le content in t\ -his case refers to the same data blocks on the media.)5.043 F .043 -(It will gen-)5.043 F -(erate a pure ISO9660 \214lesystem unless the Joliet or HFS h)108 247.2 -Q(ybrid command line options are gi)-.05 E -.15(ve)-.25 G(n.).15 E F2 -(mkisofs)108 264 Q F0 .45(can generate a)2.95 F F3(true)2.95 E F0(\(or) -2.95 E F3(shar)2.95 E(ed)-.37 E F0 2.95(\)H).77 G .45(FS h)-2.95 F .45 -(ybrid \214lesystem. The same \214les are seen as HFS \214les when)-.05 -F .126(accessed from a Macintosh and as ISO9660 \214les when accessed f\ -rom other machines. HFS stands for)108 276 R F3(Hier)2.625 E(-)-.2 E(ar) -108 288 Q -.15(ch)-.37 G(ical F).15 E(ile System)-.45 E F0 -(and is the nati)2.5 E .3 -.15(ve \214)-.25 H -(le system used on Macintosh computers.).15 E 1.046(As an alternati)108 -304.8 R -.15(ve)-.25 G(,).15 E F2(mkisofs)3.546 E F0 1.046 -(can generate the)3.546 F F3 1.046(Apple Extensions to ISO9660)3.546 F -F0 1.046(for each \214le. These e)3.546 F(xtensions)-.15 E(pro)108 316.8 -Q .882(vide each \214le with CREA)-.15 F -.18(TO)-1.11 G .882 -(R, TYPE and certain Finder Flags when accessed from a Macintosh. See) -.18 F(the)108 328.8 Q F2(HFS MA)2.5 E(CINT)-.55 E(OSH FILE FORMA)-.18 E -(TS)-.95 E F0(section belo)2.5 E -.65(w.)-.25 G F2(mkisofs)108 345.6 Q -F0(tak)3.077 E .577(es a snapshot of a gi)-.1 F -.15(ve)-.25 G 3.077(nd) -.15 G .577 -(irectory tree, and generates a binary image which will correspond to) --3.077 F(an ISO9660 or HFS \214lesystem when written to a block de)108 -357.6 Q(vice.)-.25 E .736 -(Each \214le written to the iso9660 \214lesystem must ha)108 374.4 R -1.036 -.15(ve a \214)-.2 H .735 -(lename in the 8.3 format \(8 characters, period, 3).15 F .262 -(characters, all upper case\), e)108 386.4 R -.15(ve)-.25 G 2.762(ni).15 -G 2.762(fR)-2.762 G .262(ock Ridge is in use.)-2.762 F .263 -(This \214lename is used on systems that are not able)5.263 F .268 -(to mak)108 398.4 R 2.768(eu)-.1 G .268(se of the Rock Ridge e)-2.768 F -.268(xtensions \(such as MS-DOS\), and each \214lename in each director\ -y must be)-.15 F(dif)108 410.4 Q .533 -(ferent from the other \214lenames in the same directory)-.25 F(.)-.65 E -F2(mkisofs)5.534 E F0 .534(generally tries to form correct names by) -3.034 F .165(forcing the unix \214lename to upper case and truncating a\ -s required, b)108 422.4 R .165(ut often times this yields unsatisf)-.2 F -(actory)-.1 E .685(results when there are cases where the truncated nam\ -es are not all unique.)108 434.4 R F2(mkisofs)5.686 E F0 .686 -(assigns weightings to)3.186 F .567(each \214lename, and if tw)108 446.4 -R 3.067(on)-.1 G .567 -(ames that are otherwise the same are found the name with the lo)-3.067 -F .566(wer priority is)-.25 F 1.44(renamed to ha)108 458.4 R 1.74 -.15 -(ve a 3 d)-.2 H 1.44(igit number as an e).15 F 1.44 -(xtension \(where the number is guaranteed to be unique\).)-.15 F(An) -6.44 E -.15(ex)108 470.4 S 2.528(ample of this w).15 F 2.528 -(ould be the \214les foo.bar and foo.bar)-.1 F 2.528 -(.~1~ - the \214le foo.bar)-.55 F 2.527(.~1~ w)-.55 F 2.527 -(ould be written as)-.1 F(FOO000.B)108 482.4 Q -(AR;1 and the \214le foo.bar w)-.35 E(ould be written as FOO.B)-.1 E -(AR;1)-.35 E 2.242(When used with v)108 499.2 R 2.242 -(arious HFS options,)-.25 F F2(mkisofs)4.742 E F0 2.243 -(will attempt to recognise \214les stored in a number of)4.742 F .804 -(Apple/Unix \214le formats and will cop)108 511.2 R 3.304(yt)-.1 G .804 -(he data and resource forks as well as an)-3.304 F 3.304(yr)-.15 G(ele) --3.304 E -.25(va)-.25 G .804(nt \214nder informa-).25 F .777 -(tion. See the)108 523.2 R F2 .778(HFS MA)3.278 F(CINT)-.55 E .778 -(OSH FILE FORMA)-.18 F(TS)-.95 E F0 .778(section belo)3.278 F 3.278(wf) --.25 G .778(or more about formats)-3.278 F F2(mkisofs)3.278 E F0(sup-) -3.278 E(ports.)108 535.2 Q .704(Note that)108 552 R F2(mkisofs)3.204 E -F0 .703(is not designed to communicate with the writer directly)3.204 F -5.703(.M)-.65 G .703(ost writers ha)-5.703 F 1.003 -.15(ve p)-.2 H -(roprietary).15 E 1.028(command sets which v)108 564 R 1.028 -(ary from one manuf)-.25 F 1.028(acturer to another)-.1 F 3.528(,a)-.4 G -1.028(nd you need a specialized tool to actually)-3.528 F -.2(bu)108 576 -S(rn the disk.).2 E(The)108 592.8 Q F2(cdr)2.988 E(ecord)-.18 E F0 .488 -(utility is a utility capable of b)2.988 F .488(urning an actual disc.) --.2 F .488(The latest v)5.488 F .487(ersion of)-.15 F F2(cdr)2.987 E -(ecord)-.18 E F0 .487(is a)2.987 F -.25(va)-.2 G(il-).25 E -(able from ftp://ftp.berlios.de/pub/cdrecord)108 604.8 Q .344 -(Also you should kno)108 621.6 R 2.844(wt)-.25 G .344 -(hat most cd writers are v)-2.844 F .344(ery particular about timing.) --.15 F .344(Once you start to b)5.344 F .345(urn a disc,)-.2 F .861 -(you cannot let their b)108 633.6 R(uf)-.2 E .86 -(fer empty before you are done, or you will end up with a corrupt disc.) --.25 F .86(Thus it is)5.86 F .825(critical that you be able to maintain\ - an uninterrupted data stream to the writer for the entire time that th\ -e)108 645.6 R(disc is being written.)108 657.6 Q F2(pathspec)108 674.4 Q -F0 .761(is the path of the directory tree to be copied into the iso9660\ - \214lesystem.)3.262 F .761(Multiple paths can be)5.761 F .262 -(speci\214ed, and)108 686.4 R F2(mkisofs)2.762 E F0 .262(will mer)2.762 -F .262(ge the \214les found in all of the speci\214ed path components t\ -o form the cdrom)-.18 F(image.)108 698.4 Q .695(If the option)108 715.2 -R F3(\255gr)3.195 E(aft-points)-.15 E F0 .695(has been speci\214ed, it \ -is possible to graft the paths at points other than the root)3.195 F -(directory)108 727.2 Q 2.587(,a)-.65 G .087(nd it is possible to graft \ -\214les or directories onto the cdrom image with names dif)-2.587 F .088 -(ferent than what)-.25 F -1.11(Ve)72 768 S(rsion 2.0)1.11 E(24 Dec 2002) -162.9 E(1)203.45 E EP +save +mark +1 pagesetup +10 R f +( \( 8 \))3 164( MKISOFS)1 3525(Maintenance Procedures)1 991 3 720 480 t +9 B f +( E)1 0( ME)1 60(N NA AM)2 215 3 720 960 t +10 R f +(mkisofs)1080 1080 w +10 S1 f +(\261)1448 1080 w +10 R f +(create an hybrid ISO-9660/JOLIET/HFS/UDF \256lesystem-image with optional Rock Ridge)8 3836 1 1564 1080 t +(attributes.)1080 1200 w +9 B f +( S)1 0( IS)1 50( SI)1 35( PS)1 50( OP)1 55( YN NO)2 135(S SY)1 115 7 720 1368 t +10 B f +( s)1 0( fs)1 39( of)1 33( so)1 50( is)1 39( ki)1 28(m mk)1 139 7 1080 1488 t +10 R f +([)1441 1488 w +10 I f +(options)1507 1488 w +10 R f +(] [)1 99 1 1835 1488 t +10 S1 f +(\261 \261)1 65 1 1967 1488 t +10 B f +(o o)1 50 1 2032 1488 t +10 I f +(\256lename)2115 1488 w +10 R f +(])2486 1488 w +10 I f +(pathspec [pathspec ...])2 929 1 2552 1488 t +10 B f +( s)1 0( fs)1 39( of)1 33( so)1 50( is)1 39( ki)1 28(m mk)1 139 7 1080 1608 t +10 R f +([)1441 1608 w +10 I f +(options)1507 1608 w +10 R f +(] [)1 99 1 1835 1608 t +10 S1 f +(\261 \261)1 65 1 1967 1608 t +10 B f +(o o)1 50 1 2032 1608 t +10 I f +(\256lename)2115 1608 w +10 R f +(])2486 1608 w +10 S1 f +(\261 \261)1 65 1 2552 1608 t +10 B f +(\256 \256n nd d)3 168 1 2617 1608 t +10 I f +([\256nd expression])1 688 1 2818 1608 t +9 B f +( N)1 0( ON)1 65( IO)1 70( TI)1 35( PT)1 60( IP)1 55( CR RI)2 100( SC)1 65( ES)1 50(D DE)1 125 10 720 1776 t +10 B f +( s)1 0( fs)1 39( of)1 33( so)1 50( is)1 39( ki)1 28(m mk)1 139 7 1080 1896 t +10 R f +( generate an ISO-9660/JOLIET/HFS/UDF hybrid)4 2125(is effectively a pre-mastering program to)5 1807 2 1468 1896 t +(\256lesystem.)1080 2016 w +( maximum size of a)4 864( The)1 232( TB.)1 186( are limited to a maximum size of 8)8 1573(ISO-9660/JOLIET/UDF \256lesystems)1 1465 5 1080 2184 t +( have \256les)2 427( yo like to)3 439( If)1 136( GB\).)1 230( \(single \256les in UDF are currently limited to aprox. 200)10 2332( TB)1 161(single \256le is 8)3 595 7 1080 2304 t +(larger than 2 GB, you need to specify)7 1567 1 1080 2424 t +10 S1 f +(\261 \261)1 65 1 2682 2424 t +10 B f +( o)1 0( so)1 50(i is)1 67 3 2747 2424 t +10 S1 f +(\261 \261)1 65 1 2864 2424 t +10 B f +( 3)1 0( 3)1 85( l)1 0( el)1 28( ve)1 44( ev)1 50(l le)1 72 7 2929 2424 t +10 R f +( maximum)1 442( a HFS hybrid is created, the)6 1200( If)1 134(or above.)1 381 4 3243 2424 t +(\256le size for \256les in the HFS hybrid is 2 GB in any case.)13 2314 1 1080 2544 t +9 B f +( t)1 0( rt)1 30( or)1 40( up pp po)3 145( su)1 50( s)1 65( m)1 0( em)1 75( te)1 40( st)1 30( ys)1 35( sy)1 45( es)1 35( le)1 40( \256l)1 25( \256)1 80( d)1 0( id)1 50( ri)1 25( br)1 40( yb)1 50(H Hy)1 115 22 900 2712 t +10 B f +( s)1 0( fs)1 39( of)1 33( so)1 50( is)1 39( ki)1 28(m mk)1 139 7 1080 2832 t +10 R f +( the)1 167(is capable of generating)3 1007 2 1452 2832 t +10 B f +( \))1 0( P\))1 33( SP)1 61( US)1 56( SU)1 72( \(S)1 56( \()1 78( s)1 0( ds)1 39( rd)1 56( or)1 44( re ec co)3 138( r)1 89( l)1 0( ol)1 28( co)1 50( oc)1 44( to)1 50( ot)1 33( ro)1 50( Pr)1 44( P)1 106( g)1 0( ng)1 50( in)1 56( ri)1 28( ar)1 44( Sh ha)2 106( S)1 101( e)1 0( se)1 44( Us)1 39( U)1 117( m)1 0( em)1 83( te)1 44( st)1 33( ys)1 39(S Sy)1 106 39 2671 2832 t +10 R f +(speci\256ed by the)2 667 1 4733 2832 t +10 B f +( .)1 0( l.)1 25( ol)1 28( co)1 50( oc)1 44( to)1 50( ot)1 33( ro)1 50( Pr)1 44( P)1 98( e)1 0( ge)1 44( ng)1 50( an)1 56( ha)1 50( er rc ch)3 144( te)1 44( nt)1 33( In)1 56( I)1 76( e)1 0( ge)1 44( dg)1 50( id)1 56( Ri)1 28( R)1 109( k)1 0( ck)1 56( oc)1 44(R Ro)1 122 30 1080 2952 t +10 R f +( the \256les in the ISO-9660 \256lesystem)6 1505(This is used to further describe)5 1294 2 2601 2952 t +( and provides information such as longer \256lenames, uid/gid, posix permissions, symbolic)11 3714(to a unix host,)3 606 2 1080 3072 t +(links, hard links, block and character devices.)6 1869 1 1080 3192 t +(If Joliet, HFS or UDF hybrid command line options are speci\256ed,)10 2706 1 1080 3360 t +10 B f +( s)1 0( fs)1 39( of)1 33( so)1 50( is)1 39( ki)1 28(m mk)1 139 7 3819 3360 t +10 R f +( additional separate)2 794(will create)1 426 2 4180 3360 t +( the same data blocks)4 886( \256le content in this case refers to)7 1358( The)1 222(\256lesystem meta data for Joliet, HFS or UDF.)7 1854 4 1080 3480 t +( pure ISO-9660 \256lesystem unless the Joliet, HFS or UDF hybrid com-)11 2964( will generate a)3 654( It)1 133(on the media.)2 569 4 1080 3600 t +(mand line options are given.)4 1167 1 1080 3720 t +10 B f +( s)1 0( fs)1 39( of)1 33( so)1 50( is)1 39( ki)1 28(m mk)1 139 7 1080 3888 t +10 R f +(can generate a)2 607 1 1452 3888 t +10 I f +(true)2103 3888 w +10 R f +(\(or)2308 3888 w +10 I f +(shared)2468 3888 w +10 R f +(\) HFS hybrid \256lesystem. The same \256les are seen as HFS \256les)11 2652 1 2748 3888 t +( stands)1 283(when accessed from a Macintosh and as ISO-9660 \256les when accessed from other machines. HFS)14 4037 2 1080 4008 t +(for)1080 4128 w +10 I f +(Hierarchical File System)2 1082 1 1260 4128 t +10 R f +( \256le system used on Macintosh computers up to)8 2225(and is the native)3 769 2 2406 4128 t +(Mac OS 9.)2 446 1 1080 4248 t +(As an alternative,)2 729 1 1080 4416 t +10 B f +( s)1 0( fs)1 39( of)1 33( so)1 50( is)1 39( ki)1 28(m mk)1 139 7 1848 4416 t +10 R f +( the)1 162(can generate)1 514 2 2215 4416 t +10 I f +(Apple Extensions to ISO-9660)3 1252 1 2931 4416 t +10 R f +(or)4223 4416 w +10 I f +(UDF)4346 4416 w +10 R f +(for each \256le. These)3 809 1 4591 4416 t +( when accessed from a)4 990(extensions provide each \256le with CREATOR, TYPE and certain Finder Flags)10 3330 2 1080 4536 t +(Macintosh. See the)2 779 1 1080 4656 t +10 B f +( S)1 0( TS)1 56( AT)1 67( MA)1 72( RM)1 94( OR)1 72( FO)1 78( F)1 94( LE E)2 67( IL)1 67( FI)1 39( F)1 94( H)1 0( SH)1 78( OS)1 56( TO)1 78( NT)1 67( IN)1 72( AC CI)2 111( MA)1 72( M)1 127( S)1 0( FS)1 56(H HF)1 139 24 1892 4656 t +10 R f +(section below.)1 585 1 3581 4656 t +9 B f +( n)1 0( on)1 50( io)1 45( ti)1 25( pt)1 30( ip)1 50( cr ri)2 65( sc)1 40( es)1 35( de)1 40( d)1 80( l)1 0( al)1 25( na)1 45( on)1 50( io)1 45( ti)1 25( ct)1 30( un nc)2 90(F Fu)1 105 20 900 4824 t +10 B f +( s)1 0( fs)1 39( of)1 33( so)1 50( is)1 39( ki)1 28(m mk)1 139 7 1080 4944 t +10 R f +( a given directory tree, and generates a binary image which will correspond)12 3162(takes a snapshot of)3 793 2 1445 4944 t +(to an ISO-9660 or Joliet/HFS/UDF \256lesystem when written to a block device.)11 3203 1 1080 5064 t +( the 8.3 format \(8 characters,)5 1289(Each \256le written to the ISO-9660 \256lesystem must have a \256lename in)11 3031 2 1080 5232 t +( \256lename is used on)4 842( This)1 248( Rock Ridge attributes are in use.)6 1401(period, 3 characters, all upper case\), even if)7 1829 4 1080 5352 t +( extensions \(such as MS-DOS\), and each)6 1795(systems that are not able to make use of the Rock Ridge)11 2525 2 1080 5472 t +( \256lenames in the same directory.)5 1393(\256lename in each directory must be different from the other)9 2522 2 1080 5592 t +10 B f +( s)1 0( fs)1 39( of)1 33( so)1 50( is)1 39( ki)1 28(m mk)1 139 7 5072 5592 t +10 R f +( truncating as)2 594(generally tries to form correct names by forcing the unix \256lename to upper case and)14 3726 2 1080 5712 t +( the truncated)2 595(required, but often times this yields unsatisfactory results when there are cases where)12 3725 2 1080 5832 t +(names are not all unique.)4 1037 1 1080 5952 t +10 B f +( s)1 0( fs)1 39( of)1 33( so)1 50( is)1 39( ki)1 28(m mk)1 139 7 2184 5952 t +10 R f +( names that are other-)4 904(assigns weightings to each \256lename, and if two)7 1950 2 2546 5952 t +( 3 digit number as an)5 926(wise the same are found the name with the lower priority is renamed to have a)15 3394 2 1080 6072 t +( example of this would be the \256les foo.bar)8 1764( An)1 190( be unique\).)2 494(extension \(where the number is guaranteed to)6 1872 4 1080 6192 t +(and foo.bar.)1 495 1 1080 6312 t +10 S1 f +(\304)1575 6312 w +10 R f +(1)1608 6312 w +10 S1 f +(\304)1658 6312 w +10 R f +(- the \256le foo.bar.)3 716 1 1732 6312 t +10 S1 f +(\304)2448 6312 w +10 R f +(1)2481 6312 w +10 S1 f +(\304)2531 6312 w +10 R f +( FOO000.BAR;1 and the \256le foo.bar would be)7 1962(would be written as)3 833 2 2605 6312 t +(written as FOO.BAR;1)2 941 1 1080 6432 t +( with various HFS or UDF options,)6 1583(When used)1 474 2 1080 6600 t +10 B f +( s)1 0( fs)1 39( of)1 33( so)1 50( is)1 39( ki)1 28(m mk)1 139 7 3191 6600 t +10 R f +(will attempt to recognise \256les stored in a)7 1827 1 3573 6600 t +( data and resource forks as well as any relevant)9 2051(number of Apple/Unix \256le formats and will copy the)8 2269 2 1080 6720 t +(\256nder information. See the)3 1122 1 1080 6840 t +10 B f +( S)1 0( TS)1 56( AT)1 67( MA)1 72( RM)1 94( OR)1 72( FO)1 78( F)1 103( LE E)2 67( IL)1 67( FI)1 39( F)1 103( H)1 0( SH)1 78( OS)1 56( TO)1 78( NT)1 67( IN)1 72( AC CI)2 111( MA)1 72( M)1 136( S)1 0( FS)1 56(H HF)1 139 24 2244 6840 t +10 R f +( about for-)2 457(section below for more)3 974 2 3969 6840 t +(mats)1080 6960 w +10 B f +( s)1 0( fs)1 39( of)1 33( so)1 50( is)1 39( ki)1 28(m mk)1 139 7 1302 6960 t +10 R f +(supports.)1663 6960 w +( 1)1 1838( change: 2010/04/25)2 832( Last)1 1536(Version 3.0)1 474 4 720 7680 t +cleartomark +showpage +restore +%%EndPage: 1 1 %%Page: 2 2 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF 355.5(MKISOFS\(8\) MKISOFS\(8\))72 48 R(the)108 -84 Q 3.406(yh)-.15 G -2.25 -.2(av e)-3.406 H .906 -(in the source \214lesystem.)3.606 F .905 -(This is easiest to illustrate with a couple of e)5.906 F 5.905 -(xamples. Let')-.15 F 3.405(ss)-.55 G .905(tart by)-3.405 F -(assuming that a local \214le ../old.lis e)108 96 Q -(xists, and you wish to include it in the cdrom image.)-.15 E -(foo/bar/=../old.lis)144 132 Q(will include the \214le old.lis in the c\ -drom image at /foo/bar/old.lis, while)108 156 Q(foo/bar/xxx=../old.lis) -144 180 Q .692 -(will include the \214le old.lis in the cdrom image at /foo/bar/xxx.)108 -204 R .692(The same sort of syntax can be used with)5.692 F 1.711 -(directories as well.)108 216 R/F1 10/Times-Bold@0 SF(mkisofs)6.711 E F0 -1.711(will create an)4.211 F 4.211(yd)-.15 G 1.71 -(irectories required such that the graft points e)-4.211 F 1.71 -(xist on the)-.15 F .186(cdrom image - the directories do not need to a\ -ppear in one of the paths.)108 228 R .187(By def)5.187 F .187(ault, an) --.1 F 2.687(yd)-.15 G .187(irectories that are)-2.687 F 1.635 -(created on the \215y lik)108 240 R 4.135(et)-.1 G 1.635(his will ha) --4.135 F 1.935 -.15(ve p)-.2 H 1.634(ermissions 0555 and appear to be o) -.15 F 1.634(wned by the person running)-.25 F 3.983(mkisofs. If)108 252 -R 1.483(you wish other permissions or o)3.983 F 1.484 -(wners of the intermediate directories, see \255uid, \255gid, \255dir) --.25 F(-)-.2 E(mode, \255\214le-mode and \255ne)108 264 Q(w-dir)-.25 E -(-mode.)-.2 E F1(mkisofs)108 280.8 Q F0 1.965(will also run on W)4.465 F -1.965(in9X/NT4 machines when compiled with Cygnus' c)-.4 F 1.964 -(ygwin \(a)-.15 F -.25(va)-.2 G 1.964(ilable from).25 F(http://source) -108 292.8 Q -.1(wa)-.25 G(re.c).1 E(ygnus.com/c)-.15 E 3.229 -(ygwin/\). Therefore most references in this man page to)-.15 F/F2 10 -/Times-Italic@0 SF(Unix)5.729 E F0 3.23(can be)5.729 F(replaced with)108 -304.8 Q F2 -.55(Wi)2.5 G(n32).55 E F0(.).02 E/F3 10.95/Times-Bold@0 SF -(OPTIONS)72 333.6 Q F1(\255abstract)108 345.6 Q F2(FILE)2.5 E F0 2.453 -(Speci\214es the abstract \214le name.)144 357.6 R 2.453 -(This parameter can also be set in the \214le)7.453 F F1(.mkisofsr)4.952 -E(c)-.18 E F0(with)4.952 E 2.5(ABST=\214lename. If)144 369.6 R -(speci\214ed in both places, the command line v)2.5 E(ersion is used.) --.15 E F1108 386.4 Q F2(application_id)2.5 E F0 .468 -(Speci\214es a te)144 398.4 R .468 -(xt string that will be written into the v)-.15 F .468(olume header)-.2 -F 5.468(.T)-.55 G .468(his should describe the appli-)-5.468 F .399 -(cation that will be on the disc.)144 410.4 R .399 -(There is space on the disc for 128 characters of information.)5.399 F -(This)5.398 E .019(parameter can also be set in the \214le)144 422.4 R -F1(.mkisofsr)2.519 E(c)-.18 E F0 .019(with APPI=id.)2.519 F .019 -(If speci\214ed in both places, the com-)5.019 F(mand line v)144 434.4 Q -(ersion is used.)-.15 E F1(\255allo)108 451.2 Q(w-lo)-.1 E(wer)-.1 E -(case)-.18 E F0(This options allo)144 463.2 Q(ws lo)-.25 E -(wer case characters to appear in iso9660 \214lenames.)-.25 E -(This violates the ISO9660 standard, b)144 475.2 Q(ut it happens to w) --.2 E(ork on some systems.)-.1 E(Use with caution.)5 E F1(\255allo)108 -492 Q(w-multidot)-.1 E F0 1.989(This options allo)144 504 R 1.989 -(ws more than one dot to appear in iso9660 \214lenames.)-.25 F 4.488(Al) -6.989 G 1.988(eading dot is not)-4.488 F(af)144 516 Q -(fected by this option, it may be allo)-.25 E(wed separately using the) --.25 E F12.5 E F0(option.)2.5 E -(This violates the ISO9660 standard, b)144 528 Q(ut it happens to w)-.2 -E(ork on man)-.1 E 2.5(ys)-.15 G 2.5(ystems. Use)-2.5 F(with caution.) -2.5 E F1(\255biblio)108 544.8 Q F2(FILE)2.5 E F0 .97 -(Speci\214es the bibliographic \214le name.)144 556.8 R .971 -(This parameter can also be set in the \214le)5.97 F F1(.mkisofsr)3.471 -E(c)-.18 E F0(with)3.471 E 2.5(BIBLO=\214lename. If)144 568.8 R -(speci\214ed in both places, the command line v)2.5 E(ersion is used.) --.15 E F1(\255cache-inodes)108 585.6 Q F0 .083(Cache inode and de)144 -597.6 R .082(vice numbers to \214nd hard links to \214les.)-.25 F(If) -5.082 E F1(mkisofs)2.582 E F0 .082(\214nds a hard link \(a \214le with) -2.582 F 1.003(multiple names\), then the \214le will only appear once o\ -n the CD. This helps to sa)144 609.6 R 1.304 -.15(ve s)-.2 H 1.004 -(pace on the).15 F 4.359(CD. The)144 621.6 R(option)4.359 E F1 -(\255cache-inodes)4.359 E F0 1.859(is def)4.359 F 1.858 -(ault on UNIX lik)-.1 F 4.358(eo)-.1 G 1.858(perating systems.)-4.358 F -1.858(Be careful when)6.858 F .305(using this option on a \214lesystem \ -without unique inode numbers as it may result in \214les containing)144 -633.6 R(the wrong content on CD.)144 645.6 Q F1(\255no-cache-inodes)108 -662.4 Q F0 1.059(Do not cache inode and de)144 674.4 R 1.059 -(vice numbers.)-.25 F 1.059(This option is needed whene)6.059 F -.15(ve) --.25 G 3.558(ra\214).15 G 1.058(lesystem does not)-3.558 F(ha)144 686.4 -Q .954 -.15(ve u)-.2 H .654(nique inode numbers. It is the def).15 F -.655(ault on)-.1 F F1(Cygwin)3.155 E F0 5.655(.A)C 3.155(st)-5.655 G -.655(he Microsoft operating system that)-3.155 F .146(runs belo)144 -698.4 R(w)-.25 E F1(Cygwin)2.646 E F0 .145 -(is not POSIX compliant, it does not ha)2.646 F .445 -.15(ve u)-.2 H -.145(nique inode numbers.).15 F .145(Cygwin cre-)5.145 F .502(ates f)144 -710.4 R(ak)-.1 E 3.002(ei)-.1 G .502 -(node numbers from a hash algorithm that is not 100% correct.)-3.002 F -(If)5.503 E F1(mkisofs)3.003 E F0 -.1(wo)3.003 G .503(uld cache).1 F -.627(inodes on Cygwin, it w)144 722.4 R .626(ould belie)-.1 F .926 -.15 -(ve t)-.25 H .626(hat some \214les are identical although the).15 F -3.126(ya)-.15 G .626(re not. The result)-3.126 F -1.11(Ve)72 768 S -(rsion 2.0)1.11 E(24 Dec 2002)162.9 E(2)203.45 E EP +save +mark +2 pagesetup +10 R f +( \( 8 \))3 164( MKISOFS)1 3525(Maintenance Procedures)1 991 3 720 480 t +(Note that)1 380 1 1080 960 t +10 B f +( s)1 0( fs)1 39( of)1 33( so)1 50( is)1 39( ki)1 28(m mk)1 139 7 1496 960 t +10 R f +( writers)1 314( Most)1 276( communicate with writers for optical media directly.)7 2214(is not designed to)3 736 4 1860 960 t +( sets which vary from one manufacturer to another, and you need a special-)13 3211(have proprietary command)2 1109 2 1080 1080 t +(ized tool like)2 538 1 1080 1200 t +10 B f +( d)1 0( rd)1 56( or)1 44( re ec co)3 138( dr)1 44(c cd)1 100 6 1651 1200 t +10 R f +(to actually burn the disk.)4 1023 1 2066 1200 t +(The)1080 1368 w +10 B f +( d)1 0( rd)1 56( or)1 44( re ec co)3 138( dr)1 44(c cd)1 100 6 1279 1368 t +10 R f +( of)1 128( latest version)2 593( The)1 232(utility is a utility capable of burning an actual disc.)9 2203 4 1705 1368 t +10 B f +( d)1 0( rd)1 56( or)1 44( re ec co)3 138( dr)1 44(c cd)1 100 6 4906 1368 t +10 R f +(is)5333 1368 w +(available from)1 587 1 1080 1488 t +10 B f +( d)1 0( rd)1 56( or)1 44( re ec co)3 138( dr)1 44( cd)1 56( /c)1 44( pu ub b/)3 140( /p)1 56( e/)1 28( de)1 44( .d)1 56( s.)1 25( os)1 39( li io)2 78( er rl)2 72( be)1 44( .b)1 56( p.)1 25( ft tp)2 89( // /f)2 61( :/)1 28( p:)1 33(f ft tp)2 122 24 1700 1488 t +10 R f +(or)3111 1488 w +10 B f +( a)1 0( ph ha)2 106( lp)1 56( al)1 28( /a)1 50( d/)1 28( rd)1 56( or)1 44( re ec co)3 138( dr)1 44( cd)1 56( /c)1 44( pu ub b/)3 140( /p)1 56( e/)1 28( de)1 44( .d)1 56( s.)1 25( os)1 39( li io)2 78( er rl)2 72( be)1 44( .b)1 56( p.)1 25( ft tp)2 89( // /f)2 61( :/)1 28( p:)1 33(f ft tp)2 122 29 3227 1488 t +10 R f +( you start to burn a)5 827( Once)1 283( that most cd writers are very particular about timing.)9 2265(Also you should know)3 945 4 1080 1656 t +( up with a corrupt disc.)5 1021(disc, you cannot let their buffer empty before you are done, or you will end)14 3299 2 1080 1776 t +( the writer for the entire)5 1030(Thus it is critical that you be able to maintain an uninterrupted data stream to)14 3290 2 1080 1896 t +(time that the disc is being written.)6 1406 1 1080 2016 t +9 B f +( s)1 0( es)1 35( me)1 40( am)1 75( na)1 45( n)1 80( h)1 0( th)1 50( at)1 30( pa)1 45( p)1 80( h)1 0( th)1 50( it)1 30( wi)1 25( w)1 95( g)1 0( ng)1 45( li in)2 75( al)1 25( ea)1 45(D De)1 105 22 900 2184 t +10 B f +( ec c)2 44( pe)1 44( sp)1 56( hs)1 39( th)1 56( at)1 33(p pa)1 106 7 1080 2304 t +10 R f +( paths can)2 421( Multiple)1 414( \256lesystem.)1 467(is the path of the directory tree to be copied into the ISO-9660)12 2605 4 1493 2304 t +(be speci\256ed, and)2 692 1 1080 2424 t +10 B f +( s)1 0( fs)1 39( of)1 33( so)1 50( is)1 39( ki)1 28(m mk)1 139 7 1809 2424 t +10 R f +( speci\256ed path components to form the)6 1620(will merge the \256les found in all of the)8 1606 2 2174 2424 t +(cdrom image.)1 557 1 1080 2544 t +(If the option)2 522 1 1080 2712 t +10 S1 f +(\261 \261)1 65 1 1641 2712 t +10 B f +( ft t)2 33( af)1 33( ra)1 50(g gr)1 94 4 1706 2712 t +10 S1 f +(\261 \261)1 65 1 1916 2712 t +10 B f +( s)1 0( ts)1 39( nt)1 33( in)1 56( oi)1 28(p po)1 106 6 1981 2712 t +10 R f +( at points other than the)5 1016(has been speci\256ed, it is possible to graft the paths)9 2102 2 2282 2712 t +( possible to graft \256les or directories onto the cdrom image with names different)13 3347(root directory, and it is)4 973 2 1080 2832 t +( is easiest to illustrate with a couple of examples.)9 2139( This)1 256(than what they have in the source \256lesystem.)7 1925 3 1080 2952 t +(Let's start by assuming that a local \256le ../old.lis exists, and you wish to include it in the cdrom image.)19 4212 1 1080 3072 t +(foo/bar/=../old.lis)1440 3432 w +(will include the \256le old.lis in the cdrom image at /foo/bar/old.lis, while)11 2921 1 1080 3672 t +(foo/bar/xxx=../old.lis)1440 3912 w +( sort of syntax can be used)6 1173( same)1 248( The)1 231(will include the \256le old.lis in the cdrom image at /foo/bar/xxx.)10 2668 4 1080 4152 t +(with directories as well.)3 996 1 1080 4272 t +10 B f +( s)1 0( fs)1 39( of)1 33( so)1 50( is)1 39( ki)1 28(m mk)1 139 7 2148 4272 t +10 R f +(will create any directories required such that the graft points exist on)11 2885 1 2515 4272 t +( default, any directories)3 975( By)1 186(the cdrom image - the directories do not need to appear in one of the paths.)15 3159 3 1080 4392 t +( the \257y like this will have permissions 0555 and appear to be owned by the person)16 3536(that are created on)3 784 2 1080 4512 t +( other permissions or owners of the intermediate directories, see)9 2763( you wish)2 433( If)1 146(running mkisofs.)1 700 4 1080 4632 t +10 S1 f +(\261 \261)1 65 1 5170 4632 t +10 B f +( d)1 0( id)1 56(u ui)1 84 3 5235 4632 t +10 R f +(,)5375 4632 w +10 S1 f +(\261 \261)1 65 1 1080 4752 t +10 B f +( d)1 0( id)1 56(g gi)1 78 3 1145 4752 t +10 R f +(,)1279 4752 w +10 S1 f +(\261 \261)1 65 1 1337 4752 t +10 B f +( r)1 0( ir)1 44(d di)1 84 3 1402 4752 t +10 S1 f +(\261 \261)1 65 1 1530 4752 t +10 B f +( e)1 0( de)1 44( od)1 56(m mo)1 133 4 1595 4752 t +10 R f +(,)1828 4752 w +10 S1 f +(\261 \261)1 65 1 1886 4752 t +10 B f +( e)1 0( le)1 44(\256 \256l)1 84 3 1951 4752 t +10 S1 f +(\261 \261)1 65 1 2079 4752 t +10 B f +( e)1 0( de)1 44( od)1 56(m mo)1 133 4 2144 4752 t +10 R f +(and)2410 4752 w +10 S1 f +(\261 \261)1 65 1 2587 4752 t +10 B f +( w)1 0( ew)1 72(n ne)1 100 3 2652 4752 t +10 S1 f +(\261 \261)1 65 1 2824 4752 t +10 B f +( r)1 0( ir)1 44(d di)1 84 3 2889 4752 t +10 S1 f +(\261 \261)1 65 1 3017 4752 t +10 B f +( e)1 0( de)1 44( od)1 56(m mo)1 133 4 3082 4752 t +10 R f +(.)3315 4752 w +10 B f +( s)1 0( fs)1 39( of)1 33( so)1 50( is)1 39( ki)1 28(m mk)1 139 7 1080 4920 t +10 R f +( on Win9)2 416(will also run)2 542 2 1454 4920 t +10 I f +(x)2412 4920 w +10 R f +(/NT)2456 4920 w +10 I f +(x)2617 4920 w +10 R f +(machines when compiled with Cygnus' cygwin \(available from)7 2692 1 2708 4920 t +( to)1 111(http://sourceware.cygnus.com/cygwin/\). Therefore most references in this man page)7 3422 2 1080 5040 t +10 I f +(Unix)4646 5040 w +10 R f +(also apply to)2 527 1 4873 5040 t +10 I f +(Win32)1080 5160 w +10 R f +(or)1374 5160 w +10 I f +(Win64)1490 5160 w +10 R f +(.)1759 5160 w +9 B f +( S)1 0( NS)1 50( ON)1 65( IO)1 70( TI)1 35( PT)1 60(O OP)1 125 7 720 5448 t +10 S1 f +(\261 \261)1 65 1 1080 5568 t +10 B f +( t)1 0( ct)1 33( ac)1 44( ra)1 50( tr)1 44( st)1 33( bs)1 39(a ab)1 106 8 1145 5568 t +10 I f +(FILE)1527 5568 w +10 R f +( the disc for)3 501( is space on)3 487( There)1 298(Speci\256es the abstract \256le name in the primary volume descriptor.)9 2674 4 1440 5688 t +( parame-)1 361( This)1 246( related Joliet entry is limited to 18 characters.)8 1938( The)1 224(37 characters of information.)3 1191 5 1440 5808 t +(ter can also be set in the \256le)7 1203 1 1440 5928 t +10 B f +( rc c)2 44( sr)1 44( fs)1 39( of)1 33( so)1 50( is)1 39( ki)1 28( mk)1 56(. .m)1 108 9 2682 5928 t +10 R f +( speci\256ed in both places, the)5 1202( If)1 138(with ABST=\256lename.)1 898 3 3162 5928 t +(command line version is used.)4 1245 1 1440 6048 t +(It is up to the user of)6 899 1 1440 6288 t +10 B f +( s)1 0( fs)1 39( of)1 33( so)1 50( is)1 39( ki)1 28(m mk)1 139 7 2376 6288 t +10 R f +(to include a \256le with the apropriate name in the created \256lesys-)11 2658 1 2742 6288 t +(tem tree.)1 357 1 1440 6408 t +10 S1 f +(\261 \261)1 65 1 1080 6576 t +10 B f +(A A)1 72 1 1145 6576 t +10 I f +(application)1250 6576 w +10 S f +(_)1706 6576 w +10 I f +(id)1756 6576 w +10 R f +( should describe the)3 862( This)1 258(Speci\256es a text string that will be written into the volume header.)11 2840 3 1440 6696 t +( space on the disc for 128 characters of informa-)9 2056( is)1 107( There)1 305(application that will be on the disc.)6 1492 4 1440 6816 t +( parameter can also be set in the)7 1361( This)1 248( related Joliet entry is limited to 64 characters.)8 1946(tion. The)1 405 4 1440 6936 t +(\256le)1440 7056 w +10 B f +( rc c)2 44( sr)1 44( fs)1 39( of)1 33( so)1 50( is)1 39( ki)1 28( mk)1 56(. .m)1 108 9 1601 7056 t +10 R f +( speci\256ed in both places, the command line version is used.)10 2450( If)1 132(with APPI=id.)1 587 3 2075 7056 t +10 S1 f +(\261 \261)1 65 1 1080 7224 t +10 B f +( w)1 0( ow)1 72( ll lo)2 78(a al)1 78 4 1145 7224 t +10 S1 f +(\261 \261)1 65 1 1373 7224 t +10 B f +( g)1 0( ng)1 50( in)1 56( di)1 28( ad)1 56( ea)1 50(l le)1 72 7 1438 7224 t +10 S1 f +(\261 \261)1 65 1 1750 7224 t +10 B f +( s)1 0( ts)1 39( ot)1 33(d do)1 106 4 1815 7224 t +10 R f +( 2)1 1838( change: 2010/04/25)2 832( Last)1 1536(Version 3.0)1 474 4 720 7704 t +cleartomark +showpage +restore +%%EndPage: 2 2 %%Page: 3 3 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF 355.5(MKISOFS\(8\) MKISOFS\(8\))72 48 R 1.362(i\ -n this case are \214les that contain the wrong content if a signi\214ca\ -nt amount of dif)144 84 R 1.363(ferent \214les \(>)-.25 F 1.466 -(~5000\) is in inside the tree that is to be archi)144 96 R -.15(ve)-.25 -G 3.966(d. This).15 F 1.466(does not happen when the)3.966 F/F1 10 -/Times-Bold@0 SF(\255no-cache-)3.965 E 1.115(inodes is used, b)144 108 R -1.115(ut the disadv)-.2 F 1.116(antage is that mkisofs)-.1 F F0 1.116 -(cannot detect hardlinks an)3.616 F 1.116(ymore and the)-.15 F -(resulting CD image may be lar)144 120 Q(ger than e)-.18 E(xpected.)-.15 -E F1108 136.8 Q/F2 10/Times-Italic@0 SF(eltorito_boot_ima)2.5 E --.1(ge)-.1 G F0 .233(Speci\214es the path and \214lename of the boot im\ -age to be used when making an "El T)144 148.8 R .232(orito" bootable)-.8 -F 2.317(CD. The pathname must be relati)144 160.8 R 2.617 -.15(ve t)-.25 -H 4.817(ot).15 G 2.317(he source path speci\214ed to)-4.817 F F1 -(mkisofs.)4.818 E F0 2.318(This option is)7.318 F .313(required to mak) -144 172.8 R 2.813(ea)-.1 G 2.813(n")-2.813 G .312(El T)-2.813 F .312 -(orito" bootable CD.)-.8 F .312(The boot image must be e)5.312 F .312 -(xactly the size of either a)-.15 F .43 -(1200, 1440, or a 2880 kB \215opp)144 184.8 R 1.73 -.65(y, a)-.1 H(nd) -.65 E F1(mkisofs)2.931 E F0 .431 -(will use this size when creating the output iso9660)2.931 F 1.06(\214l\ -esystem. It is assumed that the \214rst 512 byte sector should be read \ -from the boot image \(it is)144 196.8 R .701 -(essentially emulating a normal \215opp)144 208.8 R 3.202(yd)-.1 G(ri) --3.202 E -.15(ve)-.25 G 3.202(\). This).15 F .702(will w)3.202 F .702 -(ork, for e)-.1 F .702(xample, if the boot image is a)-.15 F -(LILO based boot \215opp)144 220.8 Q -.65(y.)-.1 G .181 -(If the boot image is not an image of a \215opp)144 244.8 R 1.481 -.65 -(y, y)-.1 H .181(ou need to add one of the options:).65 F F1 -(-hard-disk-boot)2.681 E F0(or)144 256.8 Q F1(-no-emul-boot)2.5 E F0 5 -(.I)C 2.5(ft)-5 G(he system should not boot of)-2.5 E 2.5(ft)-.25 G -(he emulated disk, use)-2.5 E F1(-no-boot)2.5 E F0(.)A F1 -(\255eltorito-alt-boot)108 273.6 Q F0 .605(Start with a ne)144 285.6 R -3.105(ws)-.25 G .605(et of "El T)-3.105 F .605(orito" boot parameters.) --.8 F .605(This allo)5.605 F .605(ws to ha)-.25 F .905 -.15(ve m)-.2 H -.605(ore than one El T).15 F(orito)-.8 E(boot on a CD.)144 297.6 Q 2.5 -(Am)5 G(aximum of 63 El T)-2.5 E -(orito boot entries may be put on a single CD.)-.8 E F1108 314.4 Q -F2(img_sun4,img_sun4c,img_sun4m,img_sun4d,img_sun4e)2.5 E F0 .511(Speci\ -\214es a comma separated list of boot images that are needed to mak)144 -326.4 R 3.01(eab)-.1 G .51(ootable CD for sparc)-3.01 F 2.848 -(systems. There)144 338.4 R .349 -(may be empty \214elds in the comma separated list.)2.848 F .349 -(This option is required to mak)5.349 F(e)-.1 E 2.588(ab)144 350.4 S -.088(ootable CD for Sun sparc systems.)-2.588 F .088(If the)5.088 F F1 -2.588 E F0(or)2.588 E F1(\255spar)2.588 E(c-boot)-.18 E F0 .087 -(option has been speci\214ed, the \214rst)2.587 F .443(sector of the re\ -sulting image will contain a Sun disk label. This disk label speci\214e\ -s slice 0 for the)144 362.4 R .262(iso9660 image and slice 1 .)144 374.4 -R -3.07 1.666(.. s)1.666 H .262(lice 7 for the boot images that ha) --1.666 F .562 -.15(ve b)-.2 H .262(een speci\214ed with this option.).15 -F .965(Byte of)144 386.4 R .965(fset 512 .)-.25 F -2.367 1.666(.. 8) -1.666 H .966(191 within each of the additional boot images must contain\ - a primary boot)-1.666 F .747(that w)144 398.4 R .747(orks for the appr\ -opriate sparc architecture. The rest of each of the images usually cont\ -ains)-.1 F(an ufs \214lesystem that is used primary k)144 410.4 Q -(ernel boot stage.)-.1 E .769(The implemented boot method is the boot m\ -ethod found with SunOS 4.x and SunOS 5.x.)144 434.4 R(Ho)5.769 E(w-)-.25 -E -2.15 -.25(ev e)144 446.4 T 1.795 -.4(r, i).25 H 3.495(td).4 G .994 -(oes not depend on SunOS internals b)-3.495 F .994 -(ut only on properties of the Open Boot prom. F)-.2 F(or)-.15 E -(this reason, it should be usable for an)144 458.4 Q 2.5(yO)-.15 G 2.5 -(St)-2.5 G(hat boots of)-2.5 E 2.5(fas)-.25 G(parc system.)-2.5 E .958 -(If the special \214lename)144 482.4 R F1(...)3.459 E F0 .959 -(is used, the actual and all follo)5.959 F .959 -(wing boot partitions are mapped to the)-.25 F(pre)144 494.4 Q .307 -(vious partition. If)-.25 F F1(mkisofs)2.807 E F0 .307(is called with) -2.807 F F12.807 E F2(ima)2.817 E -.1(ge)-.1 G F13.086 E F2 -(...)3.036 E F0 .306(all boot partitions are mapped to the)5.306 F .717 -(partition that contains the iso9660 \214lesystem image and the generic\ - boot image that is located in)144 506.4 R -(the \214rst 16 sectors of the disk is used for all architectures.)144 -518.4 Q F1108 535.2 Q F2 -.1(ge)2.5 G(neric_boot_ima).1 E -.1(ge) --.1 G F0 1.768(Speci\214es the path and \214lename of the generic boot \ -image to be used when making a generic)144 547.2 R .43(bootable CD.)144 -559.2 R(The)5.43 E F1(generic_boot_image)2.93 E F0 .43 -(will be placed on the \214rst 16 sectors of the CD. The \214rst)2.93 F -1.067(16 sectors are the sectors that are located before the iso9660 pr\ -imary v)144 571.2 R 1.066(olume descriptor)-.2 F 6.066(.I)-.55 G 3.566 -(ft)-6.066 G(his)-3.566 E .726(option is used together with the)144 -583.2 R F1(\255spar)3.226 E(c-boot)-.18 E F0 .726 -(option, the Sun disk label will o)3.226 F -.15(ve)-.15 G .727 -(rlay the \214rst 512).15 F(bytes of the generic boot image.)144 595.2 Q -F1(\255hard-disk-boot)108 612 Q F0 .968 -(Speci\214es that the boot image used to create "El T)144 624 R .968 -(orito" bootable CDs is a hard disk image. The)-.8 F -(hard disk image must be)144 636 Q -(gin with a master boot record that contains a single partition.)-.15 E -F1(\255no-emul-boot)108 652.8 Q F0 .768 -(Speci\214es that the boot image used to create "El T)144 664.8 R .768 -(orito" bootable CDs is a 'no emulation' image.)-.8 F -(The system will load and e)144 676.8 Q -.15(xe)-.15 G -(cute this image without performing an).15 E 2.5(yd)-.15 G -(isk emulation.)-2.5 E F1(\255no-boot)108 693.6 Q F0 .567 -(Speci\214es that the created "El T)144 705.6 R .566 -(orito" CD should be mark)-.8 F .566 -(ed as not bootable. The system will pro-)-.1 F(vide an emulated dri)144 -717.6 Q .3 -.15(ve f)-.25 H(or the image, b).15 E(ut will boot of)-.2 E -2.5(fas)-.25 G(tandard boot de)-2.5 E(vice.)-.25 E -1.11(Ve)72 768 S -(rsion 2.0)1.11 E(24 Dec 2002)162.9 E(3)203.45 E EP +save +mark +3 pagesetup +10 R f +( \( 8 \))3 164( MKISOFS)1 3525(Maintenance Procedures)1 991 3 720 480 t +10 S1 f +(\261 \261)1 65 1 1080 960 t +10 B f +( s)1 0( ts)1 39( ot)1 33( do)1 50(l ld)1 84 5 1145 960 t +10 R f +( dot is replaced with an)5 1014( a leading)2 420( Usually,)1 410(Allow ISO-9660 \256lenames to begin with a period.)7 2116 4 1440 960 t +(underscore in order to maintain MS-DOS compatibility.)6 2288 1 1440 1080 t +( with cau-)2 429( Use)1 228( standard, but it happens to work on many systems.)9 2181(This violates the ISO-9660)3 1122 4 1440 1200 t +(tion.)1440 1320 w +10 S1 f +(\261 \261)1 65 1 1080 1488 t +10 B f +( w)1 0( ow)1 72( ll lo)2 78(a al)1 78 4 1145 1488 t +10 S1 f +(\261 \261)1 65 1 1373 1488 t +10 B f +( e)1 0( se)1 44( as)1 39( er rc ca)3 138( we)1 44( ow)1 72(l lo)1 78 7 1438 1488 t +10 R f +(This options allows lower case characters to appear in ISO-9660 \256lenames.)10 3088 1 1440 1608 t +( with cau-)2 431( Use)1 229( to work on some systems.)5 1141(This violates the ISO-9660 standard, but it happens)7 2159 4 1440 1728 t +(tion.)1440 1848 w +10 S1 f +(\261 \261)1 65 1 1080 2016 t +10 B f +( w)1 0( ow)1 72( ll lo)2 78(a al)1 78 4 1145 2016 t +10 S1 f +(\261 \261)1 65 1 1373 2016 t +10 B f +( t)1 0( ot)1 33( do)1 50( id)1 56( ti)1 28( lt)1 33( ul)1 28(m mu)1 139 8 1438 2016 t +10 R f +( leading dot is not)4 777( A)1 145( in ISO-9660 \256lenames.)3 1000(This options allows more than one dot to appear)8 2038 4 1440 2136 t +(affected by this option, it may be allowed separately using the)10 2557 1 1440 2256 t +10 S1 f +(\261 \261)1 65 1 4030 2256 t +10 B f +( w)1 0( ow)1 72( ll lo)2 78(a al)1 78 4 4095 2256 t +10 S1 f +(\261 \261)1 65 1 4323 2256 t +10 B f +( g)1 0( ng)1 50( in)1 56( di)1 28( ad)1 56( ea)1 50(l le)1 72 7 4388 2256 t +10 S1 f +(\261 \261)1 65 1 4700 2256 t +10 B f +( s)1 0( ts)1 39( ot)1 33(d do)1 106 4 4765 2256 t +10 R f +(option.)4976 2256 w +( with cau-)2 429( Use)1 228( standard, but it happens to work on many systems.)9 2181(This violates the ISO-9660)3 1122 4 1440 2376 t +(tion.)1440 2496 w +10 S1 f +(\261 \261)1 65 1 1080 2664 t +10 B f +( o)1 0( li io)2 78( bl)1 28( ib)1 56(b bi)1 84 5 1145 2664 t +10 I f +(FILE)1424 2664 w +10 R f +( is space on the)4 678( There)1 307( name in the primary volume descriptor.)6 1708(Speci\256es the bibliographic \256le)3 1267 4 1440 2784 t +( This)1 247( to 18 characters.)3 714( related Joliet entry is limited)5 1229( The)1 225(disc for 37 characters of information.)5 1545 5 1440 2904 t +(parameter can also be set in the \256le)7 1566 1 1440 3024 t +10 B f +( rc c)2 44( sr)1 44( fs)1 39( of)1 33( so)1 50( is)1 39( ki)1 28( mk)1 56(. .m)1 108 9 3054 3024 t +10 R f +( speci\256ed in both)3 758( If)1 148(with BIBLO=\256lename.)1 951 3 3543 3024 t +(places, the command line version is used.)6 1707 1 1440 3144 t +(It is up to the user of)6 899 1 1440 3384 t +10 B f +( s)1 0( fs)1 39( of)1 33( so)1 50( is)1 39( ki)1 28(m mk)1 139 7 2376 3384 t +10 R f +(to include a \256le with the apropriate name in the created \256lesys-)11 2658 1 2742 3384 t +(tem tree.)1 357 1 1440 3504 t +10 S1 f +(\261 \261)1 65 1 1080 3672 t +10 B f +( e)1 0( he)1 44( ch)1 56( ac)1 44(c ca)1 94 5 1145 3672 t +10 S1 f +(\261 \261)1 65 1 1383 3672 t +10 B f +( s)1 0( es)1 39( de)1 44( od)1 56( no)1 50(i in)1 84 6 1448 3672 t +10 R f +( If)1 136( \256nd hard links to \256les.)5 983(Cache inode and device numbers to)5 1477 3 1440 3792 t +10 B f +( s)1 0( fs)1 39( of)1 33( so)1 50( is)1 39( ki)1 28(m mk)1 139 7 4073 3792 t +10 R f +(\256nds a hard link \(a \256le)5 962 1 4438 3792 t +( This helps to save space)5 1060(with multiple names\), then the \256le will only appear once on the CD.)12 2900 2 1440 3912 t +( option)1 292( The)1 224(on the CD.)2 458 3 1440 4032 t +10 S1 f +(\261 \261)1 65 1 2450 4032 t +10 B f +( e)1 0( he)1 44( ch)1 56( ac)1 44(c ca)1 94 5 2515 4032 t +10 S1 f +(\261 \261)1 65 1 2753 4032 t +10 B f +( s)1 0( es)1 39( de)1 44( od)1 56( no)1 50(i in)1 84 6 2818 4032 t +10 R f +( careful)1 313( Be)1 181( systems.)1 379(is default on UNIX like operating)5 1400 4 3127 4032 t +( in \256les)2 325(when using this option on a \256lesystem without unique inode numbers as it may result)14 3635 2 1440 4152 t +(containing the wrong content on CD.)5 1522 1 1440 4272 t +( not cached,)2 511(If inodes are)2 528 2 1440 4512 t +10 B f +( s)1 0( fs)1 39( of)1 33( so)1 50( is)1 39( ki)1 28(m mk)1 139 7 2520 4512 t +10 R f +(will revert to the old Rrip Version-1.10 \(see)7 1865 1 2889 4512 t +10 S1 f +(\261 \261)1 65 1 4795 4512 t +10 B f +( 11 10 0)3 100( p1)1 50( ip)1 56(r rr ri)2 116 4 4860 4512 t +10 R f +(\) and)1 218 1 5182 4512 t +10 B f +( s)1 0( fs)1 39( of)1 33( so)1 50( is)1 39( ki)1 28(m mk)1 139 7 1440 4632 t +10 R f +(will not be able to create)5 1024 1 1801 4632 t +10 B f +( s)1 0( er rs)2 83( be)1 44( mb)1 56( nu um)2 139( n)1 89( e)1 0( de)1 44( od)1 56( no)1 50( in)1 56( i)1 61( t)1 0( rr re ec ct)4 165( or)1 44(c co)1 94 16 2858 4632 t +10 R f +(for zero sized \256les.)3 783 1 3872 4632 t +10 S1 f +(\261 \261)1 65 1 1080 4800 t +10 B f +( o)1 0(n no)1 106 2 1145 4800 t +10 S1 f +(\261 \261)1 65 1 1251 4800 t +10 B f +( e)1 0( he)1 44( ch)1 56( ac)1 44(c ca)1 94 5 1316 4800 t +10 S1 f +(\261 \261)1 65 1 1554 4800 t +10 B f +( s)1 0( es)1 39( de)1 44( od)1 56( no)1 50(i in)1 84 6 1619 4800 t +10 R f +( option is needed whenever a \256lesystem does not)8 2033( This)1 246(Do not cache inode and device numbers.)6 1681 3 1440 4920 t +( inode numbers. It is the default on old)8 1626(have unique)1 496 2 1440 5040 t +10 B f +( n)1 0( in)1 56( wi)1 28( yg gw)2 122(C Cy)1 122 5 3597 5040 t +10 R f +( the Microsoft operat-)3 903(versions. As)1 537 2 3960 5040 t +(ing system that runs below)4 1164 1 1440 5160 t +10 B f +( n)1 0( in)1 56( wi)1 28( yg gw)2 122(C Cy)1 122 5 2652 5160 t +10 R f +( numbers for NTFS, it does not have)7 1628(uses 64 bit inode)3 744 2 3028 5160 t +( 32-bit inode)2 569( Cygwin versions create fake)4 1278( Old)1 238(unique inode numbers in the 32 bit range.)7 1875 4 1440 5280 t +( If)1 140( hash algorithm and thus create non-unique numbers.)7 2231(numbers from a)2 662 3 1440 5400 t +10 B f +( s)1 0( fs)1 39( of)1 33( so)1 50( is)1 39( ki)1 28(m mk)1 139 7 4514 5400 t +10 R f +(would cache)1 517 1 4883 5400 t +( identical although they are)4 1135(inodes on old Cygwin versions, it would believe that some \256les are)11 2825 2 1440 5520 t +( this case are \256les that contain the wrong content if a signi\256cant amount of)14 3226(not. The result in)3 734 2 1440 5640 t +(different \256les \()2 617 1 1440 5760 t +10 S1 f +(> \304)1 126 1 2057 5760 t +10 R f +( does not happen when)4 959( This)1 247( is to be archived.)4 751(5000\) is in inside the tree that)6 1260 4 2183 5760 t +(the)1440 5880 w +10 S1 f +(\261 \261)1 65 1 1608 5880 t +10 B f +( o)1 0(n no)1 106 2 1673 5880 t +10 S1 f +(\261 \261)1 65 1 1779 5880 t +10 B f +( e)1 0( he)1 44( ch)1 56( ac)1 44(c ca)1 94 5 1844 5880 t +10 S1 f +(\261 \261)1 65 1 2082 5880 t +10 B f +( s)1 0( es)1 39( de)1 44( od)1 56( no)1 50(i in)1 84 6 2147 5880 t +10 R f +( disadvantage is that)3 879(is used, but the)3 663 2 2466 5880 t +10 B f +( s)1 0( fs)1 39( of)1 33( so)1 50( is)1 39( ki)1 28(m mk)1 139 7 4055 5880 t +10 R f +(cannot detect hardlinks)2 970 1 4430 5880 t +(anymore and the resulting CD image may be larger than expected.)10 2727 1 1440 6000 t +( not cached,)2 511(If inodes are)2 528 2 1440 6240 t +10 B f +( s)1 0( fs)1 39( of)1 33( so)1 50( is)1 39( ki)1 28(m mk)1 139 7 2520 6240 t +10 R f +(will revert to the old Rrip Version-1.10 \(see)7 1865 1 2889 6240 t +10 S1 f +(\261 \261)1 65 1 4795 6240 t +10 B f +( 11 10 0)3 100( p1)1 50( ip)1 56(r rr ri)2 116 4 4860 6240 t +10 R f +(\) and)1 218 1 5182 6240 t +10 B f +( s)1 0( fs)1 39( of)1 33( so)1 50( is)1 39( ki)1 28(m mk)1 139 7 1440 6360 t +10 R f +(will not be able to create)5 1024 1 1801 6360 t +10 B f +( s)1 0( er rs)2 83( be)1 44( mb)1 56( nu um)2 139( n)1 89( e)1 0( de)1 44( od)1 56( no)1 50( in)1 56( i)1 61( t)1 0( rr re ec ct)4 165( or)1 44(c co)1 94 16 2858 6360 t +10 R f +(for zero sized \256les.)3 783 1 3872 6360 t +10 S1 f +(\261 \261)1 65 1 1080 6528 t +10 B f +(b b)1 56 1 1145 6528 t +10 I f +(eltorito)1234 6528 w +10 S f +(_)1529 6528 w +10 I f +(boot)1579 6528 w +10 S f +(_)1757 6528 w +10 I f +(image)1807 6528 w +10 R f +( and \256lename of the boot image to be used when making an)12 2500(Speci\256es the path)2 723 2 1440 6648 t +10 S1 f +(")4698 6648 w +10 R f +(El Torito)1 374 1 4739 6648 t +10 S1 f +(")5113 6648 w +10 R f +(boot-)5189 6648 w +( be relative to the source path speci\256ed to)8 1746(able CD. The pathname must)4 1216 2 1440 6768 t +10 B f +( .)1 0( s.)1 25( fs)1 39( of)1 33( so)1 50( is)1 39( ki)1 28(m mk)1 139 8 4438 6768 t +10 R f +(This option is)2 573 1 4827 6768 t +(required to make an)3 861 1 1440 6888 t +10 S1 f +(")2348 6888 w +10 R f +(El Torito)1 387 1 2389 6888 t +10 S1 f +(")2776 6888 w +10 R f +( boot image must be exactly the size of)8 1743( The)1 236(bootable CD.)1 556 3 2865 6888 t +( or a 2880 kB \257oppy, and)6 1079(either a 1200, 1440,)3 829 2 1440 7008 t +10 B f +( s)1 0( fs)1 39( of)1 33( so)1 50( is)1 39( ki)1 28(m mk)1 139 7 3383 7008 t +10 R f +(will use this size when creating the out-)7 1654 1 3746 7008 t +( that the \256rst 512 byte sector should be read from the)11 2320(put ISO-9660 \256lesystem. It is assumed)5 1640 2 1440 7128 t +( will work, for example, if)5 1116( This)1 249( \257oppy drive\).)2 595(boot image \(it is essentially emulating a normal)7 2000 4 1440 7248 t +( 3)1 1838( change: 2010/04/25)2 832( Last)1 1536(Version 3.0)1 474 4 720 7728 t +cleartomark +showpage +restore +%%EndPage: 3 3 %%Page: 4 4 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF 355.5(MKISOFS\(8\) MKISOFS\(8\))72 48 R/F1 10 -/Times-Bold@0 SF(\255boot-load-seg)108 84 Q/F2 10/Times-Italic@0 SF(se) -2.5 E(gment_addr)-.4 E(ess)-.37 E F0(Speci\214es the load se)144 96 Q -(gment address of the boot image for no-emulation "El T)-.15 E -(orito" CDs.)-.8 E F1(\255boot-load-size)108 112.8 Q F2(load_sector)2.5 -E(s)-.1 E F0 .451(Speci\214es the number of "virtual" \(512-byte\) sect\ -ors to load in no-emulation mode.)144 124.8 R .452(The def)5.452 F .452 -(ault is)-.1 F(to load the entire boot \214le.)144 136.8 Q -(Some BIOSes may ha)5 E .3 -.15(ve p)-.2 H -(roblems if this is not a multiple of 4.).15 E F1(\255boot-inf)108 153.6 -Q(o-table)-.25 E F0 .418 -(Speci\214es that a 56-byte table with information of the CD-R)144 165.6 -R .418(OM layout will be patched in at of)-.4 F(fset)-.25 E 2.658(8i)144 -177.6 S 2.658(nt)-2.658 G .158(he boot \214le.)-2.658 F .158 -(If this option is gi)5.158 F -.15(ve)-.25 G .158 -(n, the boot \214le is modi\214ed in the source \214lesystem, so mak).15 -F(e)-.1 E .323(sure to mak)144 189.6 R 2.823(eac)-.1 G(op)-2.823 E 2.823 -(yi)-.1 G 2.823(ft)-2.823 G .322(his \214le cannot be easily re)-2.823 F -2.822(generated! See)-.15 F(the)2.822 E F1 .322(EL T)2.822 F(ORIT)-.18 E -2.822(OB)-.18 G(OO)-2.822 E 2.822(TI)-.4 G(NFO)-2.822 E -.9(TA)144 201.6 -S(BLE).9 E F0(section for a description of this table.)2.5 E F1108 -218.4 Q F2(last_sess_start,ne)2.5 E(xt_sess_start)-.2 E F0 .499 -(This option is needed when)144 230.4 R F1(mkisofs)2.999 E F0 .499 -(is used to create a CDe)2.999 F .5 -(xtra or the image of a second session)-.15 F .065(or a higher le)144 -242.4 R -.15(ve)-.25 G 2.565(ls).15 G .065 -(ession for a multi session disk.)-2.565 F .065(The option)5.065 F F1 -2.565 E F0(tak)2.565 E .064(es a pair of tw)-.1 F 2.564(on)-.1 G -.064(umbers sepa-)-2.564 F .066(rated by a comma. The \214rst number is\ - the sector number of the \214rst sector in the last session of the)144 -254.4 R .29(disk that should be appended to.)144 266.4 R .289 -(The second number is the starting sector number of the ne)5.29 F 2.789 -(ws)-.25 G(es-)-2.789 E 3.235(sion. The)144 278.4 R -.15(ex)3.235 G .735 -(pected pair of numbers may be retrie).15 F -.15(ve)-.25 G 3.236(db).15 -G 3.236(yc)-3.236 G(alling)-3.236 E F1(cdr)3.236 E .736(ecord \255msinf) --.18 F 3.236(o.)-.25 G(..)-3.236 E F0 .736(If the)5.736 F F13.236 -E F0 .87(option is used in conjunction with the)144 290.4 R F13.37 -E F0(option,)3.37 E F1(mkisofs)3.37 E F0 .87 -(will create a \214lesystem image that is)3.37 F 1.087 -(intended to be a continuation of the pre)144 302.4 R 1.088 -(vious session.)-.25 F 1.088(If the)6.088 F F13.588 E F0 1.088 -(option is used without the)3.588 F F13.588 E F0(option,)144 314.4 -Q F1(mkisofs)2.635 E F0 .135(will create a \214lesystem image that is i\ -ntended to be used for a second session on a)2.635 F(CDe)144 326.4 Q -1.735(xtra. This is a multi session CD that holds audio data in the \ -\214rst session and a ISO9660)-.15 F -(\214lesystem in the second session.)144 338.4 Q F1108 355.2 Q F2 -(boot_catalo)2.5 E(g)-.1 E F0 2.279(Speci\214es the path and \214lename\ - of the boot catalog to be used when making an "El T)144 367.2 R(orito") --.8 E .466(bootable CD. The pathname must be relati)144 379.2 R .766 --.15(ve t)-.25 H 2.966(ot).15 G .466(he source path speci\214ed to) --2.966 F F1(mkisofs.)2.966 E F0 .466(This option)5.466 F .105 -(is required to mak)144 391.2 R 2.605(ea)-.1 G .104(bootable CD.)-.001 F -.104 -(This \214le will be inserted into the output tree and not created in) -5.104 F .347(the source \214lesystem, so be sure the speci\214ed \214le\ -name does not con\215ict with an e)144 403.2 R .347 -(xisting \214le, as it)-.15 F(will be e)144 415.2 Q -(xcluded. Usually a name lik)-.15 E 2.5(e")-.1 G -(boot.catalog" is chosen.)-2.5 E F1(\255check-oldnames)108 432 Q F0 -1.212(Check all \214lenames imported from old session for compliance wi\ -th actual)144 444 R F1(mkisofs)3.711 E F0 1.211(iso9660 \214le)3.711 F -.172(naming rules.)144 456 R .173 -(It his option is not present, only names with a length > 31 are check) -5.172 F .173(ed as these \214les)-.1 F -(are a hard violation of the iso9660 standard.)144 468 Q F1 -(\255check-session)108 484.8 Q F2(FILE)2.5 E F0 1.161 -(Check all old sessions for compliance with actual)144 496.8 R F1 -(mkisofs)3.661 E F0 1.16(iso9660 \214le naming rules.)3.661 F 1.16 -(This is a)6.16 F .191(high le)144 508.8 R -.15(ve)-.25 G 2.691(lo).15 G -.192(ption that is a combination of the options:)-2.691 F F12.692 -E F2(FILE)2.692 E F1 .192(\255C 0,0 \255check-oldnames)2.692 F F0 -.15 -(Fo)2.692 G 2.692(rt).15 G(he)-2.692 E(parameter)144 520.8 Q F2(FILE)2.5 -E F0(see description of)2.5 E F12.5 E F0(option.)2.5 E F1 -(\255copyright)108 537.6 Q F2(FILE)2.5 E F0 1.829(Speci\214es the Cop) -144 549.6 R 1.829(yright \214le name.)-.1 F 1.829 -(This parameter can also be set in the \214le)6.829 F F1(.mkisofsr)4.328 -E(c)-.18 E F0(with)4.328 E 2.5(COPY=\214lename. If)144 561.6 R -(speci\214ed in both places, the command line v)2.5 E(ersion is used.) --.15 E F1108 578.4 Q F0 -(Omit trailing period from \214les that do not ha)24.74 E .3 -.15 -(ve a p)-.2 H(eriod.).15 E(This violates the ISO9660 standard, b)144 -590.4 Q(ut it happens to w)-.2 E(ork on man)-.1 E 2.5(ys)-.15 G 2.5 -(ystems. Use)-2.5 F(with caution.)2.5 E F1108 607.2 Q F0(Do not u\ -se deep directory relocation, and instead just pack them in the w)23.08 -E(ay we see them.)-.1 E(This violates the ISO9660 standard, b)144 619.2 -Q(ut it happens to w)-.2 E(ork on man)-.1 E 2.5(ys)-.15 G 2.5 -(ystems. Use)-2.5 F(with caution.)2.5 E F1(\255dir)108 636 Q(-mode)-.37 -E F2(mode)2.5 E F0(Ov)144 648 Q .606 -(errides the mode of directories used to create the image to)-.15 F F2 -(mode)3.106 E F0 5.606(.S).18 G .606(pecifying this option auto-)-5.606 -F(matically enables Rock Ridge e)144 660 Q(xtensions.)-.15 E F1 -(\255dvd-video)108 676.8 Q F0 .396(Generate D)144 688.8 R(VD-V)-.4 E -.396(ideo compliant UDF \214le system. This is done by sorting the orde\ -r of the content)-.6 F(of the appropriate \214les and by adding padding\ - between the \214les if needed.)144 700.8 Q F1108 717.6 Q F0 -.15 -(Fo)26.97 G(llo).15 E 3.333(ws)-.25 G .833 -(ymbolic links when generating the \214lesystem.)-3.333 F .834 -(When this option is not in use, symbolic)5.834 F(links will be entered\ - using Rock Ridge if enabled, otherwise the \214le will be ignored.)144 -729.6 Q -1.11(Ve)72 768 S(rsion 2.0)1.11 E(24 Dec 2002)162.9 E(4)203.45 -E EP +save +mark +4 pagesetup +10 R f +( \( 8 \))3 164( MKISOFS)1 3525(Maintenance Procedures)1 991 3 720 480 t +(the boot image is a LILO based boot \257oppy.)8 1832 1 1440 960 t +( need to add one of the options:)7 1544(If the boot image is not an image of a \257oppy, you)11 2416 2 1440 1200 t +10 S1 f +(\261 \261)1 65 1 1440 1320 t +10 B f +( d)1 0( rd)1 56( ar)1 44(h ha)1 106 4 1505 1320 t +10 S1 f +(\261 \261)1 65 1 1711 1320 t +10 B f +( k)1 0( sk)1 56( is)1 39(d di)1 84 4 1776 1320 t +10 S1 f +(\261 \261)1 65 1 1955 1320 t +10 B f +( t)1 0( oo ot)2 83(b bo)1 106 3 2020 1320 t +10 R f +(or)2252 1320 w +10 S1 f +(\261 \261)1 65 1 2378 1320 t +10 B f +( o)1 0(n no)1 106 2 2443 1320 t +10 S1 f +(\261 \261)1 65 1 2549 1320 t +10 B f +( l)1 0( ul)1 28( mu)1 56(e em)1 127 4 2614 1320 t +10 S1 f +(\261 \261)1 65 1 2825 1320 t +10 B f +( t)1 0( oo ot)2 83(b bo)1 106 3 2890 1320 t +10 R f +( emulated disk,)2 642( the system should not boot off the)7 1512(. If)1 167 3 3079 1320 t +(use)1440 1440 w +10 S1 f +(\261 \261)1 65 1 1606 1440 t +10 B f +( o)1 0(n no)1 106 2 1671 1440 t +10 S1 f +(\261 \261)1 65 1 1777 1440 t +10 B f +( t)1 0( oo ot)2 83(b bo)1 106 3 1842 1440 t +10 R f +(.)2031 1440 w +(If the)1 225 1 1440 1680 t +10 S1 f +(\261 \261)1 65 1 1702 1680 t +10 B f +( t)1 0( rt)1 33( or)1 44(s so)1 89 4 1767 1680 t +10 R f +( to)1 116(option has not been speci\256ed, the boot images are sorted with low priority \(+2\))13 3314 2 1970 1680 t +( of 0 for)3 354( you don't like this, you need to specify a sort weight)11 2247( If)1 135(the beginning of the medium.)4 1224 4 1440 1800 t +(the boot images.)2 674 1 1440 1920 t +10 S1 f +(\261 \261)1 65 1 1080 2088 t +10 B f +( o)1 0( to)1 50( it)1 33( ri)1 28( or)1 44( to)1 50( lt)1 33(e el)1 72 8 1145 2088 t +10 S1 f +(\261 \261)1 65 1 1455 2088 t +10 B f +( t)1 0( lt)1 33(a al)1 78 3 1520 2088 t +10 S1 f +(\261 \261)1 65 1 1631 2088 t +10 B f +( t)1 0( oo ot)2 83(b bo)1 106 3 1696 2088 t +10 R f +(Start with a new set of)5 936 1 1440 2208 t +10 S1 f +(")2409 2208 w +10 R f +(El Torito)1 372 1 2450 2208 t +10 S1 f +(")2822 2208 w +10 R f +( allows to have more than one El Tor-)8 1586( This)1 245(boot parameters.)1 673 3 2896 2208 t +( maximum of 63 El Torito boot entries may be put on a single CD.)14 2775( A)1 138(ito boot on a CD.)4 724 3 1440 2328 t +10 B f +( =)1 0( l=)1 57( tl)1 28(e er rr rc ct)4 209 4 1080 2616 t +10 I f +(name)1407 2616 w +10 B f +( =)1 0( l=)1 57( tl)1 28(e er rr rc ct)4 209 4 1080 2784 t +10 I f +(error control spec)2 743 1 1407 2784 t +10 R f +(Add the content from \256le)4 1058 1 1440 2904 t +10 I f +(name)2535 2904 w +10 R f +(to the error control de\256nitions or add)6 1548 1 2788 2904 t +10 I f +(error control spec)2 751 1 4373 2904 t +10 R f +(to the)1 238 1 5162 2904 t +( than one error control \256le and more than one)9 1900( More)1 284(error control de\256nitions.)2 994 3 1440 3024 t +10 I f +(error control spec)2 747 1 4653 3024 t +10 R f +(as well as a mixture of both forms is possible.)9 1904 1 1440 3144 t +( to make)2 394(The reason for using error control is)6 1585 2 1440 3384 t +10 B f +( s)1 0( fs)1 39( of)1 33( so)1 50( is)1 39( ki)1 28(m mk)1 139 7 3469 3384 t +10 R f +(quiet about error conditions that are)5 1553 1 3847 3384 t +( quality of the created \256lesystem or to tell)8 1809(known to be irrelevant on the)5 1268 2 1440 3504 t +10 B f +( s)1 0( fs)1 39( of)1 33( so)1 50( is)1 39( ki)1 28(m mk)1 139 7 4560 3504 t +10 R f +(to abort on)2 469 1 4931 3504 t +(certain error conditions instead of trying to continue with the \256lesystem.)10 2969 1 1440 3624 t +( suppress warnings about growing log \256les while)7 2132(A typical reason to use error control is to)8 1828 2 1440 3864 t +( typical reason to use error control is to tell)9 1924( Another)1 408(doing a backup on a live \256le system.)7 1628 3 1440 3984 t +10 B f +( s)1 0( fs)1 39( of)1 33( so)1 50( is)1 39( ki)1 28(m mk)1 139 7 1440 4104 t +10 R f +( other \256les)2 450(to abort if e.g. a \256le could not be archived instead of continuing to archive)14 3144 2 1806 4104 t +(from a list.)2 452 1 1440 4224 t +( error conditions to be)4 946(The error control \256le contains a set of lines, each starting with a list of)14 3014 2 1440 4464 t +( by white space followed by a \256le name pattern \(see)10 2173(ignored followed)1 696 2 1440 4584 t +10 B f +( h)1 0( ch)1 56( tc)1 44( at)1 33(m ma)1 133 5 4344 4584 t +10 R f +(\(1\) or)1 234 1 4610 4584 t +10 B f +( h)1 0( ch)1 56( tc)1 44( at)1 33( ma)1 50( tm)1 83( at)1 33(p pa)1 106 8 4879 4584 t +10 R f +(\(3\))5284 4584 w +( The)1 228(for more information\).)2 931 2 1440 4704 t +10 I f +(error control spec)2 759 1 2639 4704 t +10 R f +(uses the same syntax as a single line from the)9 1961 1 3439 4704 t +( start with white space, use a backslash to)8 1797( the \256le name pattern needs to)6 1306( If)1 142(error control \256le.)2 715 4 1440 4824 t +( not possible to have new line characters in the \256le name)11 2403(escape the start of the \256le name. It is)8 1557 2 1440 4944 t +( an error situation is encountered,)5 1401(pattern. Whenever)1 782 2 1440 5064 t +10 B f +( s)1 0( fs)1 39( of)1 33( so)1 50( is)1 39( ki)1 28(m mk)1 139 7 3661 5064 t +10 R f +(checks the lines in the error con-)6 1374 1 4026 5064 t +( the current error condition is listed on a line in the error con-)13 2604( If)1 136( starting from the top.)4 917(trol \256le)1 303 4 1440 5184 t +(trol \256le, then)2 536 1 1440 5304 t +10 B f +( s)1 0( fs)1 39( of)1 33( so)1 50( is)1 39( ki)1 28(m mk)1 139 7 2011 5304 t +10 R f +(checks whether the pattern on the rest of the line matches the current \256le)13 3026 1 2374 5304 t +( this is the case,)4 722(name. If)1 388 2 1440 5424 t +10 B f +( s)1 0( fs)1 39( of)1 33( so)1 50( is)1 39( ki)1 28(m mk)1 139 7 2598 5424 t +10 R f +( control the)2 503(uses the current error control speci\256cation to)6 1923 2 2974 5424 t +(current error condition.)2 944 1 1440 5544 t +( error conditions to be handled may use one or more \(in this case separated by a ')17 3444(The list of)2 433 2 1440 5784 t +10 S f +(\372)5317 5784 w +10 R f +(')5367 5784 w +(character\) identi\256ers from the list below:)5 1673 1 1440 5904 t +10 B f +( T)1 0( RT)1 67( OR)1 72( BO)1 78(A AB)1 139 5 1440 6072 t +10 R f +( an error condition,)3 804(If this meta condition is included in)6 1494 2 2040 6072 t +10 B f +( s)1 0( fs)1 39( of)1 33( so)1 50( is)1 39( ki)1 28(m mk)1 139 7 4376 6072 t +10 R f +(aborts \(exits\) as)2 658 1 4742 6072 t +( after this error condition has been seen instead of making)10 2642(soon as possible)2 718 2 2040 6192 t +10 B f +( s)1 0( fs)1 39( of)1 33( so)1 50( is)1 39( ki)1 28(m mk)1 139 7 2040 6312 t +10 R f +( error condition \257ag may only be used)7 1656( This)1 255( the condition.)2 613(quiet about)1 465 4 2411 6312 t +( a list of error conditions \(separated by)7 1614(together with at another error condition or)6 1746 2 2040 6432 t +(a ')1 110 1 2040 6552 t +10 S f +(\372)2150 6552 w +10 R f +(' character\).)1 488 1 2200 6552 t +10 B f +( AR RN N)3 144(W WA)1 172 2 1440 6720 t +10 R f +( an error condition,)3 804(If this meta condition is included in)6 1494 2 2040 6720 t +10 B f +( s)1 0( fs)1 39( of)1 33( so)1 50( is)1 39( ki)1 28(m mk)1 139 7 4376 6720 t +10 R f +(prints the warn-)2 658 1 4742 6720 t +( not affect the exit code)5 989(ing about the error condition but the error condition does)9 2371 2 2040 6840 t +(of)2040 6960 w +10 B f +( s)1 0( fs)1 39( of)1 33( so)1 50( is)1 39( ki)1 28(m mk)1 139 7 2161 6960 t +10 R f +( end\) does not include)4 938(and the error statistics \(which is printed to the)8 1935 2 2527 6960 t +( error condition \257ag may only be used together with at)10 2365( This)1 255(the related errors.)2 740 3 2040 7080 t +(another error condition or a list of error conditions \(separated by a ')12 2819 1 2040 7200 t +10 S f +(\372)4859 7200 w +10 R f +(' character\).)1 491 1 4909 7200 t +( 4)1 1838( change: 2010/04/25)2 832( Last)1 1536(Version 3.0)1 474 4 720 7680 t +cleartomark +showpage +restore +%%EndPage: 4 4 %%Page: 5 5 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF 355.5(MKISOFS\(8\) MKISOFS\(8\))72 48 R/F1 10 -/Times-Bold@0 SF(\255\214le-mode)108 84 Q/F2 10/Times-Italic@0 SF(mode) -2.5 E F0(Ov)144 96 Q .248(errides the mode of re)-.15 F .248 -(gular \214les used to create the image to)-.15 F F2(mode)2.747 E F0 -5.247(.S).18 G .247(pecifying this option auto-)-5.247 F -(matically enables Rock Ridge e)144 108 Q(xtensions.)-.15 E F1(\255gid) -108 124.8 Q F2(gid)2.5 E F0(Ov)144 136.8 Q .632 -(errides the gid read from the source \214les to the v)-.15 F .633 -(alue of)-.25 F F2(gid)3.133 E F0 5.633(.S).77 G .633 -(pecifying this option automati-)-5.633 F(cally enables Rock Ridge e)144 -148.8 Q(xtensions.)-.15 E F1(\255gui)108 165.6 Q F0 .147 -(Switch the beha)16.96 F .147(viour for a GUI. This currently mak)-.2 F -.147(es the output more v)-.1 F .147(erbose b)-.15 F .147(ut may ha)-.2 -F .446 -.15(ve o)-.2 H(ther).15 E(ef)144 177.6 Q(fects in future.)-.25 E -F1(\255graft-points)108 194.4 Q F0(Allo)144 206.4 Q 3.318(wt)-.25 G -3.318(ou)-3.318 G .818(se graft points for \214lenames. If this option \ -is used, all \214lenames are check)-3.318 F .819(ed for graft)-.1 F -1.084(points. The \214lename is di)144 218.4 R 1.084(vided at the \214r\ -st unescaped equal sign. All occurrences of '\\\\' and '=')-.25 F -(characters must be escaped with '\\\\' if)144 230.4 Q F2(\255gr)2.5 E -(aft-points)-.15 E F0(has been speci\214ed.)2.5 E F1(\255hide)108 247.2 -Q F2(glob)2.5 E F0(Hide)144 259.2 Q F2(glob)3.613 E F0 1.113 -(from being seen on the ISO9660 or Rock Ridge directory)3.613 F(.)-.65 E -F2(glob)6.113 E F0 1.114(is a shell wild-card-)3.613 F .642 -(style pattern that must match an)144 271.2 R 3.142(yp)-.15 G .642 -(art of the \214lename or path.)-3.142 F .641 -(Multiple globs may be hidden.)5.642 F(If)5.641 E F2(glob)144 283.2 Q F0 -.885(matches a directory)3.385 F 3.385(,t)-.65 G .885 -(hen the contents of that directory will be hidden.)-3.385 F .886 -(In order to match a)5.886 F .82(directory name, mak)144 295.2 R 3.32 -(es)-.1 G .819 -(ure the pathname does not include a trailing '/' character)-3.32 F -5.819(.A)-.55 G .819(ll the hidden)-5.819 F .213 -(\214les will still be written to the output CD image \214le.)144 307.2 -R .213(Should be used with the)5.213 F F1(\255hide-joliet)2.713 E F0 -(option.)2.713 E(See README.hide for more details.)144 319.2 Q F1 -(\255hide-list)108 336 Q F2(\214le)2.5 E F0 2.5<418c>144 348 S -(le containing a list of)-2.5 E F2(globs)2.5 E F0(to be hidden as abo) -2.5 E -.15(ve)-.15 G(.).15 E F1(\255hidden)108 364.8 Q F2(glob)2.5 E F0 -.713(Add the hidden \(e)144 376.8 R .713 -(xistence\) ISO9660 directory attrib)-.15 F .713(ute for)-.2 F F2(glob) -3.213 E F0 5.713(.T).23 G .713(his attrib)-5.713 F .713(ute will pre)-.2 -F -.15(ve)-.25 G(nt).15 E F2(glob)3.213 E F0 .772(from being listed on \ -DOS based systems if the /A \215ag is not used for the listing.)144 -388.8 R F2(glob)5.773 E F0 .773(is a shell)3.273 F .089 -(wild-card-style pattern that must match an)144 400.8 R 2.589(yp)-.15 G -.089(art of the \214lename or path.)-2.589 F .088 -(In order to match a direc-)5.089 F .744(tory name, mak)144 412.8 R -3.244(es)-.1 G .744 -(ure the pathname does not include a trailing '/' character)-3.244 F -5.744(.M)-.55 G .744(ultiple globs may)-5.744 F(be hidden.)144 424.8 Q -F1(\255hidden-list)108 441.6 Q F2(\214le)2.5 E F0 2.5<418c>144 453.6 S -(le containing a list of)-2.5 E F2(globs)2.5 E F0 -(to get the hidden attrib)2.5 E(ute as abo)-.2 E -.15(ve)-.15 G(.).15 E -F1(\255hide-joliet)108 470.4 Q F2(glob)2.5 E F0(Hide)144 482.4 Q F2 -(glob)2.78 E F0 .28(from being seen on the Joliet directory)2.78 F(.) --.65 E F2(glob)5.279 E F0 .279 -(is a shell wild-card-style pattern that must)2.779 F .806(match an)144 -494.4 R 3.306(yp)-.15 G .806(art of the \214lename or path.)-3.306 F -.807(Multiple globs may be hidden.)5.806 F(If)5.807 E F2(glob)3.307 E F0 -.807(matches a direc-)3.307 F(tory)144 506.4 Q 2.983(,t)-.65 G .483 -(hen the contents of that directory will be hidden.)-2.983 F .483 -(In order to match a directory name, mak)5.483 F(e)-.1 E .241 -(sure the pathname does not include a trailing '/' character)144 518.4 R -5.241(.A)-.55 G .241(ll the hidden \214les will still be written)-5.241 -F .471(to the output CD image \214le.)144 530.4 R .471 -(Should be used with the)5.471 F F1(\255hide)2.97 E F0 .47 -(option. See README.hide for more)2.97 F(details.)144 542.4 Q F1 -(\255hide-joliet-list)108 559.2 Q F2(\214le)2.5 E F0 2.5<418c>144 571.2 -S(le containing a list of)-2.5 E F2(globs)2.5 E F0(to be hidden as abo) -2.5 E -.15(ve)-.15 G(.).15 E F1(\255hide-joliet-trans-tbl)108 588 Q F0 -.168(Hide the)144 600 R F1(TRANS.TBL)2.668 E F0 .168 -(\214les from the Joliet tree.)2.668 F .168(These \214les usually don') -5.168 F 2.668(tm)-.18 G(ak)-2.668 E 2.668(es)-.1 G .169 -(ense in the Joliet)-2.668 F -.8(Wo)144 612 S 1.359(rld as the).8 F -3.859(yl)-.15 G 1.359 -(ist the real name and the ISO9660 name which may both be dif)-3.859 F -1.358(ferent from the)-.25 F(Joliet name.)144 624 Q F1(\255hide-rr)108 -640.8 Q(-mo)-.37 E -.1(ve)-.1 G(d).1 E F0 .042(Rename the directory)144 -652.8 R F1(RR_MO)2.542 E(VED)-.5 E F0(to)2.542 E F1(.rr_mo)2.542 E -.1 -(ve)-.1 G(d).1 E F0 .043(in the Rock Ridge tree.)2.543 F .043 -(It seems to be impossi-)5.043 F 1.142(ble to completely hide the)144 -664.8 R F1(RR_MO)3.642 E(VED)-.5 E F0 1.141 -(directory from the Rock Ridge tree.)3.642 F 1.141(This option only) -6.141 F(mak)144 676.8 Q .11 -(es the visible tree better to understand for people who don')-.1 F 2.61 -(tk)-.18 G(no)-2.61 E 2.61(ww)-.25 G .11(hat this directory is for)-2.61 -F 5.11(.I)-.55 G(f)-5.11 E .005(you need to ha)144 688.8 R .305 -.15 -(ve n)-.2 H(o).15 E F1(RR_MO)2.505 E(VED)-.5 E F0 .005 -(directory at all, you should use the)2.505 F F12.505 E F0 .005 -(option. Note that in case)2.505 F 1.023(that the)144 700.8 R F1 -3.523 E F0 1.024(option has been speci\214ed, the resulting \214lesyste\ -m is not ISO9660 le)3.523 F -.15(ve)-.25 G 1.024(l-1 compliant).15 F -1.707(and will not be readable on MS-DOS.)144 712.8 R 1.707(See also) -6.707 F F1(NO)4.207 E(TES)-.4 E F0 1.706 -(section for more information on the)4.207 F F1(RR_MO)144 724.8 Q(VED) --.5 E F0(directory)2.5 E(.)-.65 E -1.11(Ve)72 768 S(rsion 2.0)1.11 E -(24 Dec 2002)162.9 E(5)203.45 E EP +save +mark +5 pagesetup +10 R f +( \( 8 \))3 164( MKISOFS)1 3525(Maintenance Procedures)1 991 3 720 480 t +(The)2040 960 w +10 B f +( AR RN N)3 144(W WA)1 172 2 2228 960 t +10 R f +(meta condition has a lower precedence than)6 1793 1 2577 960 t +10 B f +( T)1 0( RT)1 67( OR)1 72( BO)1 78(A AB)1 139 5 4403 960 t +10 R f +(.)4759 960 w +10 B f +( LL L)2 67(A AL)1 139 2 1440 1128 t +10 R f +(This is a shortcut for all error conditions below.)8 1970 1 2040 1128 t +10 B f +( T)1 0( AT)1 67( TA)1 72(S ST)1 123 4 1440 1296 t +10 R f +(Suppress warnings that)2 943 1 2040 1296 t +10 B f +( s)1 0( fs)1 39( of)1 33( so)1 50( is)1 39( ki)1 28(m mk)1 139 7 3016 1296 t +10 R f +(could not)1 383 1 3377 1296 t +10 B f +( t)1 0( at)1 33( ta)1 50(s st)1 72 4 3793 1296 t +10 R f +(\(2\) a \256le.)2 379 1 3948 1296 t +10 B f +( L)1 0( AC CL)2 139( ET TA)2 139(G GE)1 145 4 1440 1464 t +10 R f +(Suppress warnings about \256les on which)5 1710 1 2040 1464 t +10 B f +( s)1 0( fs)1 39( of)1 33( so)1 50( is)1 39( ki)1 28(m mk)1 139 7 3800 1464 t +10 R f +( retrieve the)2 528(had problems to)2 694 2 4178 1464 t +(ACL information.)1 730 1 2040 1584 t +10 B f +( N)1 0( EN)1 72( PE)1 67(O OP)1 139 4 1440 1752 t +10 R f +(Suppress warnings about \256les that could not be opened.)8 2287 1 2040 1752 t +10 B f +( AD D)2 72( EA)1 72(R RE)1 139 3 1440 1920 t +10 R f +(Suppress warnings read errors on \256les.)5 1587 1 2040 1920 t +10 B f +( TE E)2 67( IT)1 67( RI)1 39(W WR)1 172 4 1440 2088 t +10 R f +(Suppress warnings write errors on \256les.)5 1621 1 2040 2088 t +10 B f +( K)1 0( NK)1 78( IN)1 72( LI)1 39( AD DL)2 139( EA)1 72(R RE)1 139 7 1440 2256 t +10 R f +(Suppress warnings)1 760 1 2040 2256 t +10 B f +( nk k)2 56( li in)2 84( dl)1 28( ad)1 56(r re ea)2 138 5 2833 2256 t +10 R f +(\(2\) errors on symbolic links.)4 1167 1 3195 2256 t +10 B f +( W)1 0( OW)1 100( RO)1 78(G GR)1 150 4 1440 2424 t +10 R f +(Suppress warnings about \256les that did grow while they have been archived.)11 3100 1 2040 2424 t +10 B f +( K)1 0( NK)1 78( IN)1 72( RI)1 39( HR)1 72(S SH)1 134 6 1440 2592 t +10 R f +(Suppress warnings about \256les that did shrink while they have been archived.)11 3145 1 2040 2592 t +10 B f +( K)1 0( NK)1 78( IN)1 72( LI)1 39( SS SL)2 123( IS)1 56(M MI)1 133 7 1440 2760 t +10 R f +(Suppress warnings about \256les for which)5 1676 1 2040 2760 t +10 B f +( s)1 0( fs)1 39( of)1 33( so)1 50( is)1 39( ki)1 28(m mk)1 139 7 3757 2760 t +10 R f +(was unable to archive all hard)5 1274 1 4126 2760 t +(links.)2040 2880 w +10 B f +( G)1 0( NG)1 78( ON)1 72( LO)1 78( OO OL)2 145( ET TO)2 145( ME)1 67(N NA AM)2 238 8 1440 3048 t +10 R f +( be archived because the name of the)7 1540(Suppress warnings about \256les that could not)6 1820 2 2040 3168 t +(\256le is too long for the archive format.)7 1554 1 2040 3288 t +10 B f +( G)1 0( IG)1 78( BI)1 39( OO OB)2 145( LE ET TO)3 212( IL)1 67(F FI)1 100 7 1440 3456 t +10 R f +( size of the)3 480(Suppress warnings about \256les that could not be archived because the)10 2880 2 2040 3576 t +(\256le is too big for the archive format.)7 1504 1 2040 3696 t +10 B f +( LE E)2 67( IL)1 67( FI)1 39( LF)1 61( AL)1 67( IA)1 72( CI)1 39( EC)1 72( PE)1 67(S SP)1 117 10 1440 3864 t +10 R f +( could not be archived because the \256le type is)9 1942(Suppress warnings about \256les that)4 1418 2 2040 3984 t +(not supported by the archive format.)5 1493 1 2040 4104 t +10 B f +( R)1 0( TT TR)2 139( XA AT)2 139( ET TX)2 139(G GE)1 145 5 1440 4272 t +10 R f +(Suppress warnings about \256les on that)5 1531 1 2040 4272 t +10 B f +( s)1 0( fs)1 39( of)1 33( so)1 50( is)1 39( ki)1 28(m mk)1 139 7 3604 4272 t +10 R f +(could not retrieve the extended \256le)5 1434 1 3966 4272 t +(attribute information.)1 863 1 2040 4392 t +10 B f +( E)1 0( ME)1 67( IM)1 94( ET TT TI)3 173(S SE)1 123 5 1440 4560 t +10 R f +(Suppress warnings about \256les on that)5 1546 1 2040 4560 t +10 B f +( s)1 0( fs)1 39( of)1 33( so)1 50( is)1 39( ki)1 28(m mk)1 139 7 3622 4560 t +10 R f +( information)1 509(could not set the time)4 905 2 3986 4560 t +(during extraction.)1 718 1 2040 4680 t +10 B f +( E)1 0( DE)1 67( OD)1 72( MO)1 78( ET TM)2 161(S SE)1 123 6 1440 4848 t +10 R f +(Suppress warnings about \256les on that)5 1601 1 2040 4848 t +10 B f +( s)1 0( fs)1 39( of)1 33( so)1 50( is)1 39( ki)1 28(m mk)1 139 7 3688 4848 t +10 R f +( set the access modes)4 940(could not)1 397 2 4063 4848 t +(during extraction.)1 718 1 2040 4968 t +10 B f +( Y)1 0( TY)1 72( IT)1 67( CU UR RI)3 183( EC)1 72(S SE)1 123 6 1440 5136 t +10 R f +( extraction because they)3 1003(Suppress warnings about \256les that have been skipped on)8 2357 2 2040 5136 t +( currently applies to all \256les that)6 1348( This)1 246( risk.)1 210(have been considered to be a security)6 1556 4 2040 5256 t +(have a '/../' sequence inside when)5 1389 1 2040 5376 t +10 S1 f +(\261 \261)1 65 1 3462 5376 t +10 B f +(. .. .)2 50 1 3527 5376 t +10 R f +(has not been speci\256ed.)3 928 1 3610 5376 t +10 B f +( Y)1 0( TY)1 72( IT)1 67( CU UR RI)3 183( EC)1 72( SE)1 67(L LS)1 123 7 1440 5544 t +10 R f +( that have been skipped on extraction because they)8 2111(Suppress warnings about links)3 1249 2 2040 5664 t +( currently applies to all link)5 1227( This)1 261(have been considered to be a security risk.)7 1872 3 2040 5784 t +( have a '/../' sequence inside when)6 1440(names that start with '/' or)5 1107 2 2040 5904 t +10 S1 f +(\261 \261)1 65 1 4623 5904 t +10 B f +( re e)2 44( ur)1 44( ec cu)2 100(s se)1 83 4 4688 5904 t +10 S1 f +(\261 \261)1 65 1 4959 5904 t +10 B f +( s)1 0( nk ks)2 95(l li in)2 112 3 5024 5904 t +10 R f +(has)5267 5904 w +( case,)1 243( this)1 193( In)1 164(been speci\256ed.)1 616 4 2040 6024 t +10 B f +( s)1 0( fs)1 39( of)1 33( so)1 50( is)1 39( ki)1 28(m mk)1 139 7 3303 6024 t +10 R f +(tries to match the link name against the)7 1722 1 3678 6024 t +(pattern in the error control \256le.)5 1271 1 2040 6144 t +10 B f +( LE E)2 67( IL)1 67( FI)1 39( EF)1 61( ME)1 67( AM)1 94(S SA)1 128 7 1440 6312 t +10 R f +( been skipped on extraction because)5 1598(Suppress warnings about links that have)5 1762 2 2040 6312 t +( If)1 135( \256le.)1 189(source and target of the link are pointing to the same)10 2222 3 2040 6432 t +10 B f +( s)1 0( fs)1 39( of)1 33( so)1 50( is)1 39( ki)1 28(m mk)1 139 7 4622 6432 t +10 R f +(would not)1 414 1 4986 6432 t +( this case,)2 415( In)1 153( \256le completely.)2 671(skip these \256les, it would end up with removing the)9 2121 4 2040 6552 t +10 B f +( s)1 0( fs)1 39( of)1 33( so)1 50( is)1 39( ki)1 28(m mk)1 139 7 2040 6672 t +10 R f +(tries to match the link name against the pattern in the error control \256le.)13 2928 1 2401 6672 t +10 B f +( L)1 0( AD DA AC CL)4 283(B BA)1 139 3 1440 6840 t +10 R f +(Suppress warnings access control list conversion problems.)6 2420 1 2040 6840 t +10 B f +( L)1 0( AC CL)2 139( ET TA)2 139(S SE)1 123 4 1440 7008 t +10 R f +(Suppress warnings about \256les on that)5 1536 1 2040 7008 t +10 B f +( s)1 0( fs)1 39( of)1 33( so)1 50( is)1 39( ki)1 28(m mk)1 139 7 3610 7008 t +10 R f +( the ACL information)3 899(could not set)2 529 2 3972 7008 t +(during extraction.)1 718 1 2040 7128 t +10 B f +( R)1 0( TT TR)2 139( XA AT)2 139( ET TX)2 139(S SE)1 123 5 1440 7296 t +10 R f +(Suppress warnings about \256les on that)5 1611 1 2040 7296 t +10 B f +( s)1 0( fs)1 39( of)1 33( so)1 50( is)1 39( ki)1 28(m mk)1 139 7 3701 7296 t +10 R f +(could not set the extended \256le)5 1321 1 4079 7296 t +( 5)1 1838( change: 2010/04/25)2 832( Last)1 1536(Version 3.0)1 474 4 720 7776 t +cleartomark +showpage +restore +%%EndPage: 5 5 %%Page: 6 6 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF 355.5(MKISOFS\(8\) MKISOFS\(8\))72 48 R/F1 10 -/Times-Bold@0 SF108 84 Q F0(Allo)27.52 E 2.698(wf)-.25 G .198 -(ull 31 character \214lenames.)-2.698 F .198 -(Normally the ISO9660 \214lename will be in an 8.3 format which)5.198 F -.015(is compatible with MS-DOS, e)144 96 R -.15(ve)-.25 G 2.515(nt).15 G -.015(hough the ISO9660 standard allo)-2.515 F .014 -(ws \214lenames of up to 31 char)-.25 F(-)-.2 E 2.504(acters. If)144 108 -R .004(you use this option, the disc may be dif)2.504 F .004 -(\214cult to use on a MS-DOS system, b)-.25 F .005(ut this comes)-.2 F -(in handy on some other systems \(such as the Amig)144 120 Q 2.5 -(a\). Use)-.05 F(with caution.)2.5 E F1(\255input-charset)108 136.8 Q/F2 -10/Times-Italic@0 SF -.15(ch)2.5 G(ar).15 E(set)-.1 E F0 1.383(Input ch\ -arset that de\214nes the characters used in local \214le names.)144 -148.8 R 2.983 -.8(To g)6.383 H 1.383(et a list of v).8 F 1.382 -(alid charset)-.25 F .501(names, call)144 160.8 R F1 .501 -(mkisofs \255input-charset help.)3.001 F F0 2.101 -.8(To g)5.501 H .501 -(et a 1:1 mapping, you may use).8 F F1(default)3.002 E F0 .502 -(as charset)3.002 F .487(name. The def)144 172.8 R .487(ault initial v) --.1 F .487(alues are)-.25 F F2(cp437)2.987 E F0 .487 -(on DOS based systems and)2.987 F F2(iso8859-1)2.987 E F0 .486 -(on all other sys-)2.987 F 2.5(tems. See)144 184.8 R F1(CHARA)2.5 E -(CTER SETS)-.55 E F0(section belo)2.5 E 2.5(wf)-.25 G(or more details.) --2.5 E F1(\255output-charset)108 201.6 Q F2 -.15(ch)2.5 G(ar).15 E(set) --.1 E F0 .645(Output charset that de\214nes the characters that will be\ - used in Rock Ridge \214le names. Def)144 213.6 R .645(aults to)-.1 F -(the input charset. See)144 225.6 Q F1(CHARA)2.5 E(CTER SETS)-.55 E F0 -(section belo)2.5 E 2.5(wf)-.25 G(or more details.)-2.5 E F1(\255iso-le) -108 242.4 Q -.1(ve)-.15 G(l).1 E F2(le)2.5 E(vel)-.15 E F0 -(Set the iso9660 conformance le)144 254.4 Q -.15(ve)-.25 G(l. V).15 E -(alid numbers are 1..3.)-1.11 E -.4(Wi)144 278.4 S(th le).4 E -.15(ve) --.25 G 2.5(l1).15 G 2.5<2c8c>-2.5 G(les may only consist of one section\ - and \214lenames are restricted to 8.3 characters.)-2.5 E -.4(Wi)144 -302.4 S(th le).4 E -.15(ve)-.25 G 2.5(l2).15 G 2.5<2c8c>-2.5 G -(les may only consist of one section.)-2.5 E -.4(Wi)144 326.4 S(th le).4 -E -.15(ve)-.25 G 2.5(l3).15 G 2.5(,n)-2.5 G 2.5(or)-2.5 G -(estrictions apply)-2.5 E(.)-.65 E -.4(Wi)144 350.4 S .99 -(th all iso9660 le).4 F -.15(ve)-.25 G .99(ls all \214lenames are restr\ -icted to upper case letters, numbers and the under).15 F(-)-.2 E .005(s\ -core \(_\). The maximum \214lename length is restricted to 31 character\ -s, the directory nesting le)144 362.4 R -.15(ve)-.25 G 2.506(li).15 G(s) --2.506 E(restricted to 8 and the maximum path length is limited to 255 \ -characters.)144 374.4 Q F1108 391.2 Q F0 .007 -(Generate Joliet directory records in addition to re)25.3 F .006 -(gular iso9660 \214le names.)-.15 F .006(This is primarily useful)5.006 -F .176(when the discs are to be used on W)144 403.2 R(indo)-.4 E .177 -(ws-NT or W)-.25 F(indo)-.4 E .177(ws-95 machines.)-.25 F .177 -(The Joliet \214lenames are)5.177 F .103(speci\214ed in Unicode and eac\ -h path component can be up to 64 Unicode characters long.)144 415.2 R -.102(Note that)5.102 F .407(Joliet is no standard - CD')144 427.2 R -2.907(st)-.55 G .407(hat use only Joliet e)-2.907 F .407(xtensions b) --.15 F .407(ut no standard Rock Ridge e)-.2 F(xtensions)-.15 E .983 -(may usually only be used on Microsoft W)144 439.2 R .983 -(in32 systems. Furthermore, the f)-.4 F .982(act that the \214lenames) --.1 F .248(are limited to 64 characters and the f)144 451.2 R .248 -(act that Joliet uses the UTF-16 coding for Unicode characters)-.1 F -(causes interoperability problems.)144 463.2 Q F1(\255joliet-long)108 -480 Q F0(Allo)144 492 Q 2.507(wJ)-.25 G .007(oliet \214lenames to be up\ - to 103 Unicode characters. This breaks the Joliet speci\214cation - b) --2.507 F(ut)-.2 E 1.698(appears to w)144 504 R 1.698 -(ork. Use with caution. The number 103 is deri)-.1 F -.15(ve)-.25 G -4.199(df).15 G 1.699(rom: the maximum Directory)-4.199 F 1.372(Record L\ -ength \(254\), minus the length of Directory Record \(33\), minus CD-R) -144 516 R 1.371(OM XA System)-.4 F(Use Extension Information \(14\), di) -144 528 Q(vided by the UTF-16 character size \(2\).)-.25 E F1 -(\255jcharset)108 544.8 Q F2 -.15(ch)2.5 G(ar).15 E(set)-.1 E F0 .772 -(Same as using)144 556.8 R F1(\255input-charset)3.272 E F2 -.15(ch)3.272 -G(ar).15 E(set)-.1 E F0(and)3.272 E F13.272 E F0 .773 -(options. See)3.273 F F1(CHARA)3.273 E .773(CTER SETS)-.55 F F0 .773 -(section belo)3.273 F(w)-.25 E(for more details.)144 568.8 Q F1108 -585.6 Q F0(Allo)23.63 E 2.557(wI)-.25 G .057(SO9660 \214lenames to be) --2.557 F .057(gin with a period.)-.15 F(Usually)5.057 E 2.557(,al)-.65 G -.057(eading dot is replaced with an under)-2.557 F(-)-.2 E -(score in order to maintain MS-DOS compatibility)144 597.6 Q(.)-.65 E -(This violates the ISO9660 standard, b)144 609.6 Q(ut it happens to w) --.2 E(ork on man)-.1 E 2.5(ys)-.15 G 2.5(ystems. Use)-2.5 F -(with caution.)2.5 E F1(\255log-\214le)108 626.4 Q F2(lo)2.5 E(g_\214le) --.1 E F0(Redirect all error)144 638.4 Q 2.5(,w)-.4 G -(arning and informational messages to)-2.6 E F2(lo)2.5 E(g_\214le)-.1 E -F0(instead of the standard error)2.5 E(.)-.55 E F1108 655.2 Q F2 -(glob)2.5 E F0(Exclude)144 667.2 Q F2(glob)3.99 E F0 1.49 -(from being written to CDR)3.99 F(OM.)-.4 E F2(glob)6.491 E F0 1.491 -(is a shell wild-card-style pattern that must)3.991 F .728 -(match part of the \214lename \(not the path as with option)144 679.2 R -F13.228 E F0 3.228(\). T)B(echnically)-.7 E F2(glob)3.228 E F0 -.728(is matched ag)3.228 F(ainst)-.05 E(the)144 691.2 Q F2(d->d_name)2.5 -E F0(part of the directory entry)2.5 E 5(.M)-.65 G -(ultiple globs may be e)-5 E 2.5(xcluded. Example:)-.15 F -(mkisofs \255o rom \255m '*.o' \255m core \255m foobar)144 715.2 Q -1.11 -(Ve)72 768 S(rsion 2.0)1.11 E(24 Dec 2002)162.9 E(6)203.45 E EP +save +mark +6 pagesetup +10 R f +( \( 8 \))3 164( MKISOFS)1 3525(Maintenance Procedures)1 991 3 720 480 t +(attribute information during extraction.)3 1589 1 2040 960 t +( is not only handled in a silent way but)9 1682(If a speci\256c error condition is ignored, then the error condition)10 2638 2 1080 1200 t +(also excluded from the error statistics that are printed at the end of the)13 2901 1 1080 1320 t +10 B f +( s)1 0( fs)1 39( of)1 33( so)1 50( is)1 39( ki)1 28(m mk)1 139 7 4014 1320 t +10 R f +(run.)4375 1320 w +( you ignore the)3 674( If)1 148( condition.)1 452(Be very careful when using error control as you may ignore any error)12 3046 4 1080 1560 t +(wrong error conditions, you may not be able to see real problems anymore.)12 3096 1 1080 1680 t +(Note that currently only the tags)5 1330 1 1080 1920 t +10 B f +( N)1 0( EN)1 72( PE)1 67(O OP)1 139 4 2443 1920 t +10 R f +(,)2721 1920 w +10 B f +( AD D)2 72( EA)1 72(R RE)1 139 3 2779 1920 t +10 R f +(,)3062 1920 w +10 B f +( W)1 0( OW)1 100( RO)1 78(G GR)1 150 4 3120 1920 t +10 R f +(,)3448 1920 w +10 B f +( K)1 0( NK)1 78( IN)1 72( RI)1 39( HR)1 72(S SH)1 134 6 3506 1920 t +10 R f +(, are checked from)3 765 1 3901 1920 t +10 B f +( s)1 0( fs)1 39( of)1 33( so)1 50( is)1 39( ki)1 28(m mk)1 139 7 4699 1920 t +10 R f +(.)5027 1920 w +10 S1 f +(\261 \261)1 65 1 1080 2208 t +10 B f +(B B)1 67 1 1145 2208 t +10 I f +(img)1245 2208 w +10 S f +(_)1395 2208 w +10 I f +(sun4,img)1445 2208 w +10 S f +(_)1809 2208 w +10 I f +(sun4c,img)1859 2208 w +10 S f +(_)2267 2208 w +10 I f +(sun4m,img)2317 2208 w +10 S f +(_)2753 2208 w +10 I f +(sun4d,img)2803 2208 w +10 S f +(_)3217 2208 w +10 I f +(sun4e)3267 2208 w +10 S1 f +(\261 \261)1 65 1 1080 2376 t +10 B f +( rc c)2 44( ar)1 44( pa)1 50(s sp)1 95 4 1145 2376 t +10 S1 f +(\261 \261)1 65 1 1378 2376 t +10 B f +( t)1 0( oo ot)2 83(b bo)1 106 3 1443 2376 t +10 I f +(img)1665 2376 w +10 S f +(_)1815 2376 w +10 I f +(sun4,img)1865 2376 w +10 S f +(_)2229 2376 w +10 I f +(sun4c,img)2279 2376 w +10 S f +(_)2687 2376 w +10 I f +(sun4m,img)2737 2376 w +10 S f +(_)3173 2376 w +10 I f +(sun4d,img)3223 2376 w +10 S f +(_)3637 2376 w +10 I f +(sun4e)3687 2376 w +10 R f +( are needed to make a bootable CD for)8 1708(Speci\256es a comma separated list of boot images that)8 2252 2 1440 2496 t +( mapped to)2 482( 0 is used for the ISO-9660 image, the \256rst image \256le is)12 2458( Partition)1 423(sparc systems.)1 597 4 1440 2616 t +( maximum number of)3 905( The)1 225( the comma separated list.)4 1088( may be empty \256elds in)5 991( There)1 301(partition 1.)1 450 6 1440 2736 t +( option)1 292( This)1 247( specify more than 7 partition images.)6 1578(possible partitions is 8 so it is impossible to)8 1843 4 1440 2856 t +( the)1 164( If)1 141(is required to make a bootable CD for Sun sparc systems.)10 2464 3 1440 2976 t +10 S1 f +(\261 \261)1 65 1 4251 2976 t +10 B f +(B B)1 67 1 4316 2976 t +10 R f +(or)4425 2976 w +10 S1 f +(\261 \261)1 65 1 4550 2976 t +10 B f +( rc c)2 44( ar)1 44( pa)1 50(s sp)1 95 4 4615 2976 t +10 S1 f +(\261 \261)1 65 1 4848 2976 t +10 B f +( t)1 0( oo ot)2 83(b bo)1 106 3 4913 2976 t +10 R f +(option)5144 2976 w +( the \256rst sector of the resulting image will contain a Sun disk label. This disk)15 3191(has been speci\256ed,)2 769 2 1440 3096 t +( slice 7 for the boot images that)7 1376( . .)2 82( 1 .)2 159(label speci\256es slice 0 for the ISO-9660 image and slice)9 2343 4 1440 3216 t +( 8191 within each of the additional boot)7 1652( . .)2 82( this option. Byte offset 512 .)6 1215(have been speci\256ed with)3 1011 4 1440 3336 t +(images must contain a primary boot that works for the appropriate sparc architecture. The rest)14 3960 1 1440 3456 t +(of each of the images usually contains an ufs \256lesystem that is used primary kernel boot stage.)16 3898 1 1440 3576 t +( method is the boot method found with SunOS 4.x and SunOS 5.x.)12 3001(The implemented boot)2 959 2 1440 3816 t +( not depend on SunOS internals but only on properties of the Open Boot prom.)14 3263(However, it does)2 697 2 1440 3936 t +(For this reason, it should be usable for any OS that boots off a sparc system.)15 3164 1 1440 4056 t +(For more information also see the)5 1391 1 1440 4296 t +10 B f +( S)1 0( TE ES)2 123( OT)1 67(N NO)1 150 4 2864 4296 t +10 R f +(section below.)1 585 1 3237 4296 t +(If the special \256lename)3 917 1 1440 4536 t +10 B f +(. .. .. .)3 75 1 2393 4536 t +10 R f +( mapped to the)3 627(is used, the actual and all following boot partitions are)9 2269 2 2504 4536 t +(previous partition. If)2 846 1 1440 4656 t +10 B f +( s)1 0( fs)1 39( of)1 33( so)1 50( is)1 39( ki)1 28(m mk)1 139 7 2322 4656 t +10 R f +(is called with)2 555 1 2686 4656 t +10 S1 f +(\261 \261)1 65 1 3277 4656 t +10 B f +(G G)1 78 1 3342 4656 t +10 I f +(image)3456 4656 w +10 S1 f +(\261 \261)1 65 1 3744 4656 t +10 B f +(B B)1 67 1 3809 4656 t +10 I f +(...)3911 4656 w +10 R f +(all boot partitions are mapped to)5 1346 1 4054 4656 t +( image and the generic boot image that is)8 1818(the partition that contains the ISO-9660 \256lesystem)6 2142 2 1440 4776 t +(located in the \256rst 16 sectors of the disk is used for all architectures.)13 2822 1 1440 4896 t +10 S1 f +(\261 \261)1 65 1 1080 5064 t +10 B f +(G G)1 78 1 1145 5064 t +10 I f +(generic)1256 5064 w +10 S f +(_)1555 5064 w +10 I f +(boot)1605 5064 w +10 S f +(_)1783 5064 w +10 I f +(image)1833 5064 w +10 R f +( generic)1 337(Speci\256es the path and \256lename of the generic boot image to be used when making a)15 3623 2 1440 5184 t +( The)1 230(bootable CD.)1 550 2 1440 5304 t +10 B f +( c)1 0( ic)1 44( er ri)2 72( ne)1 44( en)1 56(g ge)1 94 6 2262 5304 t +10 S f +(_ _)1 50 1 2572 5304 t +10 B f +( t)1 0( oo ot)2 83(b bo)1 106 3 2622 5304 t +10 S f +(_ _)1 50 1 2811 5304 t +10 B f +( e)1 0( ag ge)2 94( ma)1 50(i im)1 111 4 2861 5304 t +10 R f +( on the \256rst 16 sectors of the CD. The)9 1648(will be placed)2 594 2 3158 5304 t +( before the ISO-9660 primary volume descriptor.)6 2044(\256rst 16 sectors are the sectors that are located)8 1916 2 1440 5424 t +(If this option is used together with the)7 1596 1 1440 5544 t +10 S1 f +(\261 \261)1 65 1 3071 5544 t +10 B f +( rc c)2 44( ar)1 44( pa)1 50(s sp)1 95 4 3136 5544 t +10 S1 f +(\261 \261)1 65 1 3369 5544 t +10 B f +( t)1 0( oo ot)2 83(b bo)1 106 3 3434 5544 t +10 R f +(option, the Sun disk label will overlay the)7 1742 1 3658 5544 t +(\256rst 512 bytes of the generic boot image.)7 1693 1 1440 5664 t +10 S1 f +(\261 \261)1 65 1 1080 5832 t +10 B f +( d)1 0( rd)1 56( ar)1 44(h ha)1 106 4 1145 5832 t +10 S1 f +(\261 \261)1 65 1 1351 5832 t +10 B f +( k)1 0( sk)1 56( is)1 39(d di)1 84 4 1416 5832 t +10 S1 f +(\261 \261)1 65 1 1595 5832 t +10 B f +( t)1 0( oo ot)2 83(b bo)1 106 3 1660 5832 t +10 R f +(Speci\256es that the boot image used to create)7 1791 1 1440 5952 t +10 S1 f +(")3265 5952 w +10 R f +(El Torito)1 373 1 3306 5952 t +10 S1 f +(")3679 5952 w +10 R f +(bootable CDs is a hard disk image. The)7 1646 1 3754 5952 t +(hard disk image must begin with a master boot record that contains a single partition.)14 3517 1 1440 6072 t +10 S1 f +(\261 \261)1 65 1 1080 6240 t +10 B f +( o)1 0(n no)1 106 2 1145 6240 t +10 S1 f +(\261 \261)1 65 1 1251 6240 t +10 B f +( l)1 0( ul)1 28( mu)1 56(e em)1 127 4 1316 6240 t +10 S1 f +(\261 \261)1 65 1 1527 6240 t +10 B f +( t)1 0( oo ot)2 83(b bo)1 106 3 1592 6240 t +10 R f +(Speci\256es that the boot image used to create)7 1917 1 1440 6360 t +10 S1 f +(")3409 6360 w +10 R f +(El Torito)1 392 1 3450 6360 t +10 S1 f +(")3842 6360 w +10 R f +(bootable CDs is a 'no emulation')5 1464 1 3936 6360 t +(image. The system will load and execute this image without performing any disk emulation.)13 3787 1 1440 6480 t +10 S1 f +(\261 \261)1 65 1 1080 6648 t +10 B f +( o)1 0(n no)1 106 2 1145 6648 t +10 S1 f +(\261 \261)1 65 1 1251 6648 t +10 B f +( t)1 0( oo ot)2 83(b bo)1 106 3 1316 6648 t +10 R f +(Speci\256es that the created)3 1049 1 1440 6768 t +10 S1 f +(")2532 6768 w +10 R f +(El Torito)1 382 1 2573 6768 t +10 S1 f +(")2955 6768 w +10 R f +( as not bootable. The system will)6 1433(CD should be marked)3 928 2 3039 6768 t +(provide an emulated drive for the image, but will boot off a standard boot device.)14 3362 1 1440 6888 t +10 S1 f +(\261 \261)1 65 1 1080 7056 t +10 B f +( t)1 0( oo ot)2 83(b bo)1 106 3 1145 7056 t +10 S1 f +(\261 \261)1 65 1 1334 7056 t +10 B f +( d)1 0( oa ad)2 106(l lo)1 78 3 1399 7056 t +10 S1 f +(\261 \261)1 65 1 1583 7056 t +10 B f +( g)1 0( eg)1 50(s se)1 83 3 1648 7056 t +10 I f +(segment)1814 7056 w +10 S f +(_)2141 7056 w +10 I f +(address)2191 7056 w +10 R f +(Speci\256es the load segment address of the boot image for no-emulation)10 2893 1 1440 7176 t +10 S1 f +(")4366 7176 w +10 R f +(El Torito)1 372 1 4407 7176 t +10 S1 f +(")4779 7176 w +10 R f +(CDs.)4853 7176 w +( 6)1 1838( change: 2010/04/25)2 832( Last)1 1536(Version 3.0)1 474 4 720 7680 t +cleartomark +showpage +restore +%%EndPage: 6 6 %%Page: 7 7 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF 355.5(MKISOFS\(8\) MKISOFS\(8\))72 48 R -.1(wo) -144 84 S .065(uld e).1 F .065(xclude all \214les ending in ".o", called\ - "core" or "foobar" to be copied to CDR)-.15 F .066(OM. Note that)-.4 F -.285(if you had a directory called "foobar" it too \(and of course all \ -its descendants\) w)144 96 R .284(ould be e)-.1 F(xcluded.)-.15 E(NO)144 -120 Q 1.362(TE: The)-.4 F/F1 10/Times-Bold@0 SF3.862 E F0(and) -3.862 E F13.862 E F0 1.363 -(option description should both be updated, the)3.862 F 3.863(ya)-.15 G -1.363(re wrong.)-3.863 F 1.363(Both no)6.363 F(w)-.25 E -.1(wo)144 132 S -.568(rk identical and use \214lename globbing. A \214le is e).1 F .568 -(xcluded if either the last component matches)-.15 F -(or the whole path matches.)144 144 Q F1(\255exclude-list)108 160.8 Q/F2 -10/Times-Italic@0 SF(\214le)2.5 E F0 2.5<418c>144 172.8 S -(le containing a list of)-2.5 E F2(globs)2.5 E F0(to be e)2.5 E -(xclude as abo)-.15 E -.15(ve)-.15 G(.).15 E F1 -(\255max-iso9660-\214lenames)108 189.6 Q F0(Allo)144 201.6 Q 2.821(w3) --.25 G 2.821(7c)-2.821 G .321(hars in iso9660 \214lenames.)-2.821 F .322 -(This option forces the)5.322 F F12.822 E F0 .322(option as the e) -2.822 F .322(xtra name space is)-.15 F(tak)144 213.6 Q -(en from the space reserv)-.1 E(ed for ISO-9660 v)-.15 E -(ersion numbers.)-.15 E 1.136(This violates the ISO9660 standard, b)144 -225.6 R 1.135(ut it happens to w)-.2 F 1.135(ork on man)-.1 F 3.635(ys) --.15 G 3.635(ystems. Although)-3.635 F 3.635(ac)3.635 G(on-)-3.635 E -1.076(forming application needs to pro)144 237.6 R 1.076(vide a b)-.15 F -(uf)-.2 E 1.076(fer space of at least 37 characters, disks created with) --.25 F(this option may cause a b)144 249.6 Q(uf)-.2 E(fer o)-.25 E -.15 -(ve)-.15 G(r\215o).15 E 2.5(wi)-.25 G 2.5(nt)-2.5 G -(he reading operating system. Use with e)-2.5 E(xtreme care.)-.15 E F1 -108 266.4 Q F2(path)2.5 E F0(or)144 278.4 Q F1108 295.2 Q F2 -(de)2.5 E(vice)-.15 E F0 1.264(Speci\214es path to e)144 307.2 R 1.263 -(xisting iso9660 image to be mer)-.15 F 1.263 -(ged. The alternate form tak)-.18 F 1.263(es a SCSI de)-.1 F(vice)-.25 E -.043(speci\214er that uses the same syntax as the)144 319.2 R F1(de) -2.543 E(v=)-.15 E F0 .043(parameter of)2.543 F F1(cdr)2.543 E(ecord.) --.18 E F0 .043(The output of)5.043 F F1(mkisofs)2.544 E F0(will)2.544 E -.328(be a ne)144 331.2 R 2.828(ws)-.25 G .327(ession which should get w\ -ritten to the end of the image speci\214ed in \255M.)-2.828 F -.8(Ty) -5.327 G .327(pically this).8 F .383 -(requires multi-session capability for the recorder and cdrom dri)144 -343.2 R .683 -.15(ve t)-.25 H .383(hat you are attempting to write).15 F -(this image to.)144 355.2 Q -(This option may only be used in conjunction with the)5 E F12.5 E -F0(option.)2.5 E F1108 372 Q F0(Omit v)23.08 E -(ersion numbers from ISO9660 \214le names.)-.15 E .228 -(This violates the ISO9660 standard, b)144 384 R .227 -(ut no one really uses the v)-.2 F .227(ersion numbers an)-.15 F(yw)-.15 -E(ay)-.1 E 5.227(.U)-.65 G .227(se with)-5.227 F(caution.)144 396 Q F1 -(\255new-dir)108 412.8 Q(-mode)-.37 E F2(mode)2.5 E F0 -(Mode to use when creating ne)144 424.8 Q 2.5(wd)-.25 G -(irectories in the iso fs image.)-2.5 E(The def)5 E(ault mode is 0555.) --.1 E F1(\255nobak)108 441.6 Q(\255no-bak)108 458.4 Q F0 1.168 -(Do not include backup \214les \214les on the iso9660 \214lesystem.)144 -470.4 R 1.168(If the)6.168 F F1(\255no-bak)3.668 E F0 1.168 -(option is speci\214ed,)3.668 F .539(\214les that contain the character\ -s '~' or '#' or end in '.bak' will not be included \(these are typicall\ -y)144 482.4 R(backup \214les for editors under unix\).)144 494.4 Q F1 -108 511.2 Q(or)-.25 E(ce-rr)-.18 E F0 .938 -(Do not use the automatic Rock Ridge attrib)144 523.2 R .939 -(utes recognition for pre)-.2 F .939(vious sessions.)-.25 F .939 -(This helps to)5.939 F(sho)144 535.2 Q 2.5(wr)-.25 G(otten iso9660 e) --2.5 E(xtension records as e.g. created by NER)-.15 E 2.5(Ob)-.4 G -(urning R)-2.7 E(OM.)-.4 E F1(\255no-rr)108 552 Q F0 .429 -(Do not use the Rock Ridge attrib)7.53 F .429(utes from pre)-.2 F .429 -(vious sessions.)-.25 F .429(This may help to a)5.429 F -.2(vo)-.2 G -.428(id getting into).2 F(trouble when)144 564 Q F1(mkisofs)2.5 E F0 -(\214nds ille)2.5 E -.05(ga)-.15 G 2.5(lR).05 G -(ock Ridge signatures on an old session.)-2.5 E F1 -(\255no-split-symlink-components)108 580.8 Q F0(Don')144 592.8 Q 3.053 -(ts)-.18 G .553(plit the SL components, b)-3.053 F .553(ut be)-.2 F .553 -(gin a ne)-.15 F 3.053(wC)-.25 G .554 -(ontinuation Area \(CE\) instead. This may w)-3.053 F(aste)-.1 E .063 -(some space, b)144 604.8 R .063(ut the SunOS 4.1.4 cdrom dri)-.2 F -.15 -(ve)-.25 G 2.563(rh).15 G .062(as a b)-2.563 F .062 -(ug in reading split SL components \(link_size)-.2 F 2.5(=c)144 616.8 S -(omponent_size instead of link_size += component_size\).)-2.5 E F1 -(\255no-split-symlink-\214elds)108 633.6 Q F0(Don')144 645.6 Q 3.209(ts) --.18 G .709(plit the SL \214elds, b)-3.209 F .709(ut be)-.2 F .709 -(gin a ne)-.15 F 3.209(wC)-.25 G .71 -(ontinuation Area \(CE\) instead. This may w)-3.209 F .71(aste some)-.1 -F .446(space, b)144 657.6 R .446 -(ut the SunOS 4.1.4 and Solaris 2.5.1 cdrom dri)-.2 F -.15(ve)-.25 G -2.946(rh).15 G -2.25 -.2(av e)-2.946 H 2.945(ab)3.145 G .445 -(ug in reading split SL \214elds \(a)-3.145 F(`/' can be dropped\).)144 -669.6 Q F1108 686.4 Q F2(\214lename)2.5 E F0 .098(is the name of \ -the \214le to which the iso9660 \214lesystem image should be written.) -144 698.4 R .098(This can be a disk)5.098 F .398(\214le, a tape dri)144 -710.4 R -.15(ve)-.25 G 2.898(,o).15 G 2.898(ri)-2.898 G 2.898(tc)-2.898 -G .398(an correspond directly to the de)-2.898 F .398 -(vice name of the optical disc writer)-.25 F 5.397(.I)-.55 G 2.897(fn) --5.397 G(ot)-2.897 E .312(speci\214ed, stdout is used.)144 722.4 R .313 -(Note that the output can also be a block special de)5.312 F .313 -(vice for a re)-.25 F .313(gular disk)-.15 F -1.11(Ve)72 768 S -(rsion 2.0)1.11 E(24 Dec 2002)162.9 E(7)203.45 E EP +save +mark +7 pagesetup +10 R f +( \( 8 \))3 164( MKISOFS)1 3525(Maintenance Procedures)1 991 3 720 480 t +10 S1 f +(\261 \261)1 65 1 1080 960 t +10 B f +( t)1 0( oo ot)2 83(b bo)1 106 3 1145 960 t +10 S1 f +(\261 \261)1 65 1 1334 960 t +10 B f +( d)1 0( oa ad)2 106(l lo)1 78 3 1399 960 t +10 S1 f +(\261 \261)1 65 1 1583 960 t +10 B f +( ze e)2 44( iz)1 44(s si)1 67 3 1648 960 t +10 I f +(load)1836 960 w +10 S f +(_)2014 960 w +10 I f +(sectors)2064 960 w +10 R f +(Speci\256es the number of)3 979 1 1440 1080 t +10 S1 f +(")2455 1080 w +10 R f +(virtual)2496 1080 w +10 S1 f +(")2757 1080 w +10 R f +( default)1 314( The)1 225( to load in no-emulation mode.)5 1293(\(512-byte\) sectors)1 734 4 2834 1080 t +( BIOSes may have problems if this is not a multiple of 4.)12 2376( Some)1 294(is to load the entire boot \256le.)6 1195 3 1440 1200 t +10 S1 f +(\261 \261)1 65 1 1080 1368 t +10 B f +( t)1 0( oo ot)2 83(b bo)1 106 3 1145 1368 t +10 S1 f +(\261 \261)1 65 1 1334 1368 t +10 B f +( o)1 0( fo)1 50( nf)1 33(i in)1 84 4 1399 1368 t +10 S1 f +(\261 \261)1 65 1 1566 1368 t +10 B f +( e)1 0( le)1 44( bl)1 28( ab)1 56(t ta)1 83 5 1631 1368 t +10 R f +( at)1 119(Speci\256es that a 56-byte table with information of the CD-ROM layout will be patched in)14 3841 2 1440 1488 t +( the source \256lesys-)3 785( this option is given, the boot \256le is modi\256ed in)10 2034( If)1 138(offset 8 in the boot \256le.)5 1003 4 1440 1608 t +( the)1 160( See)1 215( \256le cannot be easily regenerated!)5 1408(tem, so make sure to make a copy if this)9 1717 4 1440 1728 t +10 B f +( -)1 0( R-)1 33( OR)1 72( TO)1 78( T)1 105(E EL L)2 134 6 4978 1728 t +( BL LE E)3 134( AB)1 67( TA)1 72( T)1 100( O)1 0( FO)1 78( NF)1 61( IN)1 72( I)1 72( T)1 0( OO OT)2 145( BO)1 78( B)1 100( O)1 0( TO)1 78(I IT)1 106 16 1440 1848 t +10 R f +(section for a description of this table.)6 1532 1 2636 1848 t +10 S1 f +(\261 \261)1 65 1 1080 2016 t +10 B f +(C C)1 72 1 1145 2016 t +10 I f +(last)1250 2016 w +10 S f +(_)1395 2016 w +10 I f +(sess)1445 2016 w +10 S f +(_)1606 2016 w +10 I f +(start,next)1656 2016 w +10 S f +(_)2031 2016 w +10 I f +(sess)2081 2016 w +10 S f +(_)2242 2016 w +10 I f +(start)2292 2016 w +10 R f +(This option is needed when)4 1147 1 1440 2136 t +10 B f +( s)1 0( fs)1 39( of)1 33( so)1 50( is)1 39( ki)1 28(m mk)1 139 7 2624 2136 t +10 R f +(is used to create a CDextra or the image of a second ses-)12 2411 1 2989 2136 t +( option)1 303( The)1 236(sion or a higher level session for a multi session disk.)10 2365 3 1440 2256 t +10 S1 f +(\261 \261)1 65 1 4391 2256 t +10 B f +(C C)1 72 1 4456 2256 t +10 R f +(takes a pair of two)4 825 1 4575 2256 t +( the)1 160(numbers separated by a comma. The \256rst number is the sector number of the \256rst sector in)16 3800 2 1440 2376 t +( number is the starting sector)5 1237( second)1 319( The)1 230(last session of the disk that should be appended to.)9 2174 4 1440 2496 t +( expected pair of numbers may be retrieved by calling)9 2477( The)1 249(number of the new session.)4 1234 3 1440 2616 t +10 B f +( d)1 0( rd)1 56( or)1 44( re ec co)3 138( dr)1 44(c cd)1 100 6 1440 2736 t +10 S1 f +(\261 \261)1 65 1 1856 2736 t +10 B f +( .. .. .)3 50( .)1 59( o)1 0( fo)1 50( nf)1 33( in)1 56( si)1 28(m ms)1 122 8 1921 2736 t +10 R f +(If the)1 222 1 2353 2736 t +10 S1 f +(\261 \261)1 65 1 2609 2736 t +10 B f +(C C)1 72 1 2674 2736 t +10 R f +(option is used in conjunction with the)6 1560 1 2780 2736 t +10 S1 f +(\261 \261)1 65 1 4374 2736 t +10 B f +(M M)1 94 1 4439 2736 t +10 R f +(option,)4567 2736 w +10 B f +( s)1 0( fs)1 39( of)1 33( so)1 50( is)1 39( ki)1 28(m mk)1 139 7 4882 2736 t +10 R f +(will)5244 2736 w +( the)1 164( If)1 141( is intended to be a continuation of the previous session.)10 2410(create a \256lesystem image that)4 1245 4 1440 2856 t +10 S1 f +(\261 \261)1 65 1 1440 2976 t +10 B f +(C C)1 72 1 1505 2976 t +10 R f +(option is used without the)4 1154 1 1632 2976 t +10 S1 f +(\261 \261)1 65 1 2841 2976 t +10 B f +(M M)1 94 1 2906 2976 t +10 R f +(option,)3055 2976 w +10 B f +( s)1 0( fs)1 39( of)1 33( so)1 50( is)1 39( ki)1 28(m mk)1 139 7 3390 2976 t +10 R f +(will create a \256lesystem image that is)6 1628 1 3772 2976 t +( session on a CDextra. This is a multi session CD that holds)12 2584(intended to be used for a second)6 1376 2 1440 3096 t +(audio data in the \256rst session and a ISO-9660 \256lesystem in the second session.)13 3241 1 1440 3216 t +10 S1 f +(\261 \261)1 65 1 1080 3384 t +10 B f +(c c)1 44 1 1145 3384 t +10 I f +(boot)1222 3384 w +10 S f +(_)1400 3384 w +10 I f +(catalog)1450 3384 w +10 R f +( to be used when making an)6 1253(Speci\256es the path and \256lename of the boot catalog)8 2190 2 1440 3504 t +10 S1 f +(")4931 3504 w +10 R f +(El Torito)1 387 1 4972 3504 t +10 S1 f +(")5359 3504 w +10 R f +( to)1 129(bootable CD. The pathname must be relative to the source path speci\256ed)11 3198 2 1440 3624 t +10 B f +( .)1 0( s.)1 25( fs)1 39( of)1 33( so)1 50( is)1 39( ki)1 28(m mk)1 139 8 4818 3624 t +10 R f +(This)5222 3624 w +( the output tree and not)5 969( \256le will be inserted into)5 1015( This)1 244(option is required to make a bootable CD.)7 1732 4 1440 3744 t +( \256lename does not con\257ict with an)6 1515(created in the source \256lesystem, so be sure the speci\256ed)9 2445 2 1440 3864 t +(existing \256le, as it will be excluded. Usually a name like)10 2295 1 1440 3984 t +10 S1 f +(")3768 3984 w +10 R f +(boot.catalog)3809 3984 w +10 S1 f +(")4300 3984 w +10 R f +(is chosen.)1 402 1 4374 3984 t +(If the)1 224 1 1440 4224 t +10 S1 f +(\261 \261)1 65 1 1700 4224 t +10 B f +( t)1 0( rt)1 33( or)1 44(s so)1 89 4 1765 4224 t +10 R f +( been speci\256ed, the boot catalog sorted with low priority \(+1\) to the)12 2844(option has not)2 589 2 1967 4224 t +( 0 for the)3 393( you don't like this, you need to specify a sort weight of)12 2366( If)1 135(beginning of the medium.)3 1066 4 1440 4344 t +(boot catalog.)1 524 1 1440 4464 t +10 S1 f +(\261 \261)1 65 1 1080 4632 t +10 B f +( k)1 0( ec ck)2 100( he)1 44(c ch)1 100 4 1145 4632 t +10 S1 f +(\261 \261)1 65 1 1389 4632 t +10 B f +( s)1 0( es)1 39( me)1 44( am)1 83( dn na)2 106( ld)1 56(o ol)1 78 7 1454 4632 t +10 R f +( old session for compliance with actual)6 1679(Check all \256lenames imported from)4 1469 2 1440 4752 t +10 B f +( s)1 0( fs)1 39( of)1 33( so)1 50( is)1 39( ki)1 28(m mk)1 139 7 4633 4752 t +10 R f +(ISO-9660)5006 4752 w +( names with a length)4 891( his option is not present, only)6 1311( It)1 136(\256le naming rules.)2 731 4 1440 4872 t +10 S1 f +(>)4550 4872 w +10 R f +(31 are checked as)3 753 1 4647 4872 t +(these \256les are a hard violation of the ISO-9660 standard.)9 2329 1 1440 4992 t +10 S1 f +(\261 \261)1 65 1 1080 5160 t +10 B f +( k)1 0( ec ck)2 100( he)1 44(c ch)1 100 4 1145 5160 t +10 S1 f +(\261 \261)1 65 1 1389 5160 t +10 B f +( n)1 0( on)1 56( io)1 50( ss si)2 67( es)1 39(s se)1 83 6 1454 5160 t +10 I f +(FILE)1782 5160 w +10 R f +(Check all old sessions for compliance with actual)7 2055 1 1440 5280 t +10 B f +( s)1 0( fs)1 39( of)1 33( so)1 50( is)1 39( ki)1 28(m mk)1 139 7 3531 5280 t +10 R f +( is)1 104( This)1 248(ISO-9660 \256le naming rules.)3 1152 3 3896 5280 t +( combination of the options:)4 1172(a high level option that is a)6 1155 2 1440 5400 t +10 S1 f +(\261 \261)1 65 1 3836 5400 t +10 B f +(M M)1 94 1 3901 5400 t +10 I f +(FILE)4031 5400 w +10 S1 f +(\261 \261)1 65 1 4286 5400 t +10 B f +( 0)1 0( ,0)1 50( 0,)1 25( 0)1 86(C C)1 72 5 4351 5400 t +10 S1 f +(\261 \261)1 65 1 4620 5400 t +10 B f +( k)1 0( ec ck)2 100( he)1 44(c ch)1 100 4 4685 5400 t +10 S1 f +(\261 \261)1 65 1 4929 5400 t +10 B f +( s)1 0( es)1 39( me)1 44( am)1 83( dn na)2 106( ld)1 56(o ol)1 78 7 4994 5400 t +10 R f +(For the parameter)2 725 1 1440 5520 t +10 I f +(FILE)2198 5520 w +10 R f +(see description of)2 720 1 2442 5520 t +10 S1 f +(\261 \261)1 65 1 3195 5520 t +10 B f +(M M)1 94 1 3260 5520 t +10 R f +(option.)3387 5520 w +10 S1 f +(\261 \261)1 65 1 1080 5688 t +10 B f +( t)1 0( ht)1 33( gh)1 56( ig)1 50( ri)1 28( yr)1 44( py)1 50( op)1 56(c co)1 94 9 1145 5688 t +10 I f +(FILE)1589 5688 w +10 R f +( is space on the disc)5 856( There)1 302( in the primary volume descriptor.)5 1425(Speci\256es the Copyright \256le name)4 1377 4 1440 5808 t +( This)1 261( characters.)1 478( related Joliet entry is limited to 18)7 1579( The)1 239(for 37 characters of information.)4 1403 5 1440 5928 t +( the \256le)2 352(parameter can also be set in)5 1230 2 1440 6048 t +10 B f +( rc c)2 44( sr)1 44( fs)1 39( of)1 33( so)1 50( is)1 39( ki)1 28( mk)1 56(. .m)1 108 9 3073 6048 t +10 R f +( speci\256ed in both)3 764( If)1 150(with COPY=\256lename.)1 921 3 3565 6048 t +(places, the command line version is used.)6 1707 1 1440 6168 t +(It is up to the user of)6 899 1 1440 6408 t +10 B f +( s)1 0( fs)1 39( of)1 33( so)1 50( is)1 39( ki)1 28(m mk)1 139 7 2376 6408 t +10 R f +(to include a \256le with the apropriate name in the created \256lesys-)11 2658 1 2742 6408 t +(tem tree.)1 357 1 1440 6528 t +10 S1 f +(\261 \261)1 65 1 1080 6696 t +10 B f +(d d)1 56 1 1145 6696 t +10 R f +(Omit trailing period from \256les that do not have a period.)10 2331 1 1440 6696 t +( with cau-)2 429( Use)1 228( standard, but it happens to work on many systems.)9 2181(This violates the ISO-9660)3 1122 4 1440 6816 t +(tion.)1440 6936 w +10 S1 f +(\261 \261)1 65 1 1080 7104 t +10 B f +(D D)1 72 1 1145 7104 t +10 R f +(Do not use deep directory relocation, and instead just pack them in the way we see them.)16 3677 1 1440 7104 t +( the ISO-9660 standard, but it happens to)7 1748(If ISO-9660:1999 has not been selected, this violates)7 2212 2 1440 7224 t +( 7)1 1838( change: 2010/04/25)2 832( Last)1 1536(Version 3.0)1 474 4 720 7704 t +cleartomark +showpage +restore +%%EndPage: 7 7 %%Page: 8 8 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF 355.5(MKISOFS\(8\) MKISOFS\(8\))72 48 R(dri)144 -84 Q -.15(ve)-.25 G 2.875(,i).15 G 2.875(nw)-2.875 G .374 -(hich case the disk partition can be mounted and e)-2.875 F .374 -(xamined to ensure that the premaster)-.15 F(-)-.2 E(ing w)144 96 Q -(as done correctly)-.1 E(.)-.65 E/F1 10/Times-Bold@0 SF(\255pad)108 -112.8 Q F0 -.15(Pa)14.18 G 2.768(dt).15 G .269(he end of the ISO9660 by\ - 16 sectors \(32kB\). If the total size then is not a multiple of 16 se\ -c-)-2.768 F 1.687(tors, the needed number of sectors is added.)144 124.8 -R 1.687(If the option)6.687 F F14.187 E F0 1.686 -(is used, then there is a second)4.187 F -(padding at the end of the boot partitions.)144 136.8 Q .186 -(The padding is needed as man)144 160.8 R 2.687(yo)-.15 G .187 -(perating systems \(e.g. Linux\) implement read ahead b)-2.687 F .187 -(ugs in their)-.2 F .189(\214lesystem I/O. These b)144 172.8 R .189(ugs\ - result in read errors on one or more \214les that are located at the e\ -nd of a)-.2 F .316(track. The)144 184.8 R 2.816(ya)-.15 G .317 -(re usually present when the CD is written in T)-2.816 F .317 -(rack at Once mode or when the disk is)-.35 F(written as mix)144 196.8 Q -(ed mode CD where an audio track follo)-.15 E(ws the data track.)-.25 E -1.793 -.8(To a)144 220.8 T -.2(vo).6 G .193 -(id problems with I/O error on the last \214le on the \214lesystem, the) -.2 F F1(\255pad)2.693 E F0 .192(option has been made)2.692 F(the def)144 -232.8 Q(ault.)-.1 E F1(\255no\255pad)108 249.6 Q F0(Do not P)144 261.6 Q -(ad the end of the ISO9660 by 16 sectors \(32kB\).)-.15 E F1 -(\255path-list)108 278.4 Q/F2 10/Times-Italic@0 SF(\214le)2.5 E F0 3.259 -<418c>144 290.4 S .759(le containing a list of)-3.259 F F2(pathspec) -3.259 E F0 .76 -(directories and \214lenames to be added to the ISO9660 \214lesys-)3.259 -F .819(tem. This list of pathspecs are processed after an)144 302.4 R -3.319(yt)-.15 G .819(hat appear on the command line. If the ar)-3.319 F -(gu-)-.18 E(ment is)144 314.4 Q F22.5 E F0 2.5(,t)C -(hen the list is read from the standard input.)-2.5 E F1108 331.2 -Q F2(publisher_id)2.5 E F0 .78(Speci\214es a te)144 343.2 R .78 -(xt string that will be written into the v)-.15 F .781(olume header)-.2 -F 5.781(.T)-.55 G .781(his should describe the pub-)-5.781 F .907 -(lisher of the CDR)144 355.2 R .906 -(OM, usually with a mailing address and phone number)-.4 F 5.906(.T)-.55 -G .906(here is space on the)-5.906 F .582 -(disc for 128 characters of information.)144 367.2 R .582 -(This parameter can also be set in the \214le)5.582 F F1(.mkisofsr)3.082 -E(c)-.18 E F0(with)3.082 E 2.5(PUBL=. If)144 379.2 R -(speci\214ed in both places, the command line v)2.5 E(ersion is used.) --.15 E F1108 396 Q F2(pr)2.5 E(epar)-.37 E(er_id)-.37 E F0 .92 -(Speci\214es a te)144 408 R .92 -(xt string that will be written into the v)-.15 F .92(olume header)-.2 F -5.92(.T)-.55 G .92(his should describe the pre-)-5.92 F 1.011 -(parer of the CDR)144 420 R 1.011 -(OM, usually with a mailing address and phone number)-.4 F 6.011(.T)-.55 -G 1.012(here is space on the)-6.011 F .582 -(disc for 128 characters of information.)144 432 R .582 -(This parameter can also be set in the \214le)5.582 F F1(.mkisofsr)3.081 -E(c)-.18 E F0(with)3.081 E 2.5(PREP=. If)144 444 R -(speci\214ed in both places, the command line v)2.5 E(ersion is used.) --.15 E F1(\255print-size)108 460.8 Q F0 .472(Print estimated \214lesyst\ -em size in multiples of the sector size \(2048 bytes\) and e)144 472.8 R -.472(xit. This option is)-.15 F .739 -(needed for Disk At Once mode and with some CD-R dri)144 484.8 R -.15 -(ve)-.25 G 3.238(sw).15 G .738(hen piping directly into)-3.238 F F1(cdr) -3.238 E(ecord.)-.18 E F0 .675(In this case it is needed to kno)144 496.8 -R 3.175(wt)-.25 G .675 -(he size of the \214lesystem before the actual CD-creation is done.) --3.175 F .799(The option \255print-size allo)144 508.8 R .799(ws to get\ - this size from a "dry-run" before the CD is actually written.)-.25 F -.864(Old v)144 520.8 R .864(ersions of)-.15 F F1(mkisofs)3.364 E F0 .864 -(did write this information \(among other information\) to)3.364 F F2 -(stderr)3.365 E F0 5.865(.A).73 G 3.365(st)-5.865 G(his)-3.365 E .607 -(turns out to be hard to parse, the number without an)144 532.8 R 3.107 -(yo)-.15 G .607(ther information is no)-3.107 F 3.107(wp)-.25 G .607 -(rinted on)-3.107 F F1(stdout)3.107 E F0 3.238(too. If)144 544.8 R .738 -(you lik)3.238 F 3.238(et)-.1 G 3.238(ow)-3.238 G .738 -(rite a simple shell script, redirect)-3.238 F F1(stderr)3.238 E F0 .739 -(and catch the number from)3.238 F F1(stdout)3.239 E F0(.)A -(This may be done with:)144 556.8 Q F1 -(cdblocks=` mkisofs -print-size -quiet .)144 580.8 Q -3.332 1.666(.. `) -1.666 H(mkisofs .)144 604.8 Q -3.332 1.666(.. | c)1.666 H(dr)-1.666 E -(ecord .)-.18 E -3.332 1.666(.. t)1.666 H(size=${cdblocks}s -)-1.666 E -(\255quiet)108 621.6 Q F0(This mak)8.63 E(es)-.1 E F1(mkisofs)2.5 E F0 --2.15 -.25(ev e)2.5 H 2.5(nl).25 G(ess v)-2.5 E 2.5(erbose. No)-.15 F -(progress output will be pro)2.5 E(vided.)-.15 E F1108 638.4 Q F0 -.448(Generate SUSP and RR records using the Rock Ridge protocol to furt\ -her describe the \214les on the)23.08 F(iso9660 \214lesystem.)144 650.4 -Q F1108 667.2 Q F0 .004(This is lik)25.86 F 2.504(et)-.1 G .004 -(he \255R option, b)-2.504 F .004(ut \214le o)-.2 F .004 -(wnership and modes are set to more useful v)-.25 F 2.505(alues. The) --.25 F .005(uid and)2.505 F .623(gid are set to zero, because the)144 -679.2 R 3.123(ya)-.15 G .623(re usually only useful on the author') --3.123 F 3.123(ss)-.55 G .622(ystem, and not useful to)-3.123 F .815 -(the client.)144 691.2 R .816(All the \214le read bits are set true, so\ - that \214les and directories are globally readable on)5.815 F .036 -(the client.)144 703.2 R .036(If an)5.036 F 2.536(ye)-.15 G -.15(xe) --2.686 G .035(cute bit is set for a \214le, set all of the e).15 F -.15 -(xe)-.15 G .035(cute bits, so that e).15 F -.15(xe)-.15 G .035 -(cutables are glob-).15 F .859(ally e)144 715.2 R -.15(xe)-.15 G .859 -(cutable on the client.).15 F .859(If an)5.859 F 3.359(ys)-.15 G .859 -(earch bit is set for a directory)-3.359 F 3.359(,s)-.65 G .859 -(et all of the search bits, so)-3.359 F .814 -(that directories are globally searchable on the client.)144 727.2 R -.814(All write bits are cleared, because the CD-)5.814 F -1.11(Ve)72 768 -S(rsion 2.0)1.11 E(24 Dec 2002)162.9 E(8)203.45 E EP +save +mark +8 pagesetup +10 R f +( \( 8 \))3 164( MKISOFS)1 3525(Maintenance Procedures)1 991 3 720 480 t +( with caution.)2 563( Use)1 221(work on many systems.)3 968 3 1440 960 t +10 S1 f +(\261 \261)1 65 1 1080 1128 t +10 B f +( a)1 0( ta)1 50( at)1 33(d da)1 106 4 1145 1128 t +10 S1 f +(\261 \261)1 65 1 1334 1128 t +10 B f +( e)1 0( ge)1 44( ng)1 50( an)1 56( ha)1 50(c ch)1 100 6 1399 1128 t +10 S1 f +(\261 \261)1 65 1 1699 1128 t +10 B f +( n)1 0( rn)1 56( ar)1 44(w wa)1 122 4 1764 1128 t +10 R f +( a warning)2 457(If the size of a \256le changes while the \256le is being archived, treat this condition as)16 3503 2 1440 1248 t +(only that does not cause)4 996 1 1440 1368 t +10 B f +( s)1 0( fs)1 39( of)1 33( so)1 50( is)1 39( ki)1 28(m mk)1 139 7 2469 1368 t +10 R f +( warning message is still written if the condition is)9 2091( A)1 138(to abort.)1 341 3 2830 1368 t +(not otherwise ignored by another rule from an)7 2062 1 1440 1488 t +10 B f +( =)1 0( l=)1 57( tl)1 28(e er rr rc ct)4 209 4 3559 1488 t +10 R f +(option. The)1 526 1 3910 1488 t +10 S1 f +(\261 \261)1 65 1 4494 1488 t +10 B f +( a)1 0( ta)1 50( at)1 33(d da)1 106 4 4559 1488 t +10 S1 f +(\261 \261)1 65 1 4748 1488 t +10 B f +( e)1 0( ge)1 44( ng)1 50( an)1 56( ha)1 50(c ch)1 100 6 4813 1488 t +10 S1 f +(\261 \261)1 65 1 5113 1488 t +10 B f +( n)1 0( rn)1 56( ar)1 44(w wa)1 122 4 5178 1488 t +10 R f +(option works as if the last error control option was)9 2089 1 1440 1608 t +10 B f +( =)1 0( l=)1 57( tl)1 28(e er rr rc ct)4 209 4 1800 1848 t +10 S1 f +(")2094 1848 w +10 I f +(WARN)2135 1848 w +10 S f +(\372)2407 1848 w +10 I f +(GROW)2457 1848 w +10 S f +(\372)2745 1848 w +10 I f +(SHRINK)2795 1848 w +10 S f +(*)3240 1848 w +10 S1 f +(")3290 1848 w +(\261 \261)1 65 1 1080 2136 t +10 B f +( r)1 0( ir)1 44(d di)1 84 3 1145 2136 t +10 S1 f +(\261 \261)1 65 1 1273 2136 t +10 B f +( e)1 0( de)1 44( od)1 56(m mo)1 133 4 1338 2136 t +10 I f +(mode)1604 2136 w +10 R f +(Overrides the mode of directories used to create the image to)10 2653 1 1440 2256 t +10 I f +(mode)4140 2256 w +10 R f +( this option)2 497(. Specifying)1 539 2 4364 2256 t +(automatically enables Rock Ridge extensions.)4 1872 1 1440 2376 t +10 S1 f +(\261 \261)1 65 1 1080 2544 t +10 B f +( d)1 0( vd)1 56(d dv)1 106 3 1145 2544 t +10 S1 f +(\261 \261)1 65 1 1307 2544 t +10 B f +( o)1 0( eo)1 50( de)1 44( id)1 56(v vi)1 78 5 1372 2544 t +10 R f +( sorting the order of the con-)6 1214(Generate DVD-Video compliant UDF \256le system. This is done by)9 2746 2 1440 2664 t +( that the)2 354( Note)1 268( appropriate \256les and by adding padding between the \256les if needed.)11 2899(tent of the)2 439 4 1440 2784 t +(sorting only works if the DVD-Video \256lenames include upper case characters only.)11 3420 1 1440 2904 t +( compliant \256lesystem image, you need to prepare a)8 2241(Note that in order to get a DVD-Video)7 1719 2 1440 3024 t +( directory tree. This means you need to have a directory VIDEO)11 2692(DVD-Video compliant)1 931 2 1440 3144 t +10 S f +(_)5063 3144 w +10 R f +(TS \(all)1 287 1 5113 3144 t +( and you should have a directory AUDIO)7 1754(caps\) in the root directory of the resulting DVD)8 2014 2 1440 3264 t +10 S f +(_)5208 3264 w +10 R f +(TS.)5258 3264 w +(The directory VIDEO)2 907 1 1440 3384 t +10 S f +(_)2347 3384 w +10 R f +( all needed \256les \(\256le names must be all caps\) for a)11 2164(TS needs to include)3 839 2 2397 3384 t +(compliant DVD-Video \256lesystem.)2 1390 1 1440 3504 t +10 S1 f +(\261 \261)1 65 1 1080 3672 t +10 B f +(f f)1 33 1 1145 3672 t +10 R f +( this option is not in use, sym-)7 1277( When)1 306( generating the \256lesystem.)3 1079(Follow all symbolic links when)4 1298 4 1440 3672 t +(bolic links will be entered using Rock Ridge if enabled, otherwise the \256le will be ignored.)15 3714 1 1440 3792 t +(See also)1 338 1 1440 4032 t +10 S1 f +(\261 \261)1 65 1 1811 4032 t +10 B f +( x)1 0( ix)1 50( si)1 28( os)1 39(p po)1 106 5 1876 4032 t +10 S1 f +(\261 \261)1 65 1 2099 4032 t +10 B f +(L L)1 67 1 2164 4032 t +10 R f +(option.)2264 4032 w +10 S1 f +(\261 \261)1 65 1 1080 4200 t +10 B f +( e)1 0( le)1 44(\256 \256l)1 84 3 1145 4200 t +10 S1 f +(\261 \261)1 65 1 1273 4200 t +10 B f +( e)1 0( de)1 44( od)1 56(m mo)1 133 4 1338 4200 t +10 I f +(mode)1604 4200 w +10 R f +(Overrides the mode of regular \256les used to create the image to)11 2673 1 1440 4320 t +10 I f +(mode)4155 4320 w +10 R f +( this option)2 487(. Specifying)1 534 2 4379 4320 t +(automatically enables Rock Ridge extensions.)4 1872 1 1440 4440 t +10 S1 f +(\261 \261)1 65 1 1080 4608 t +10 B f +(\256 \256n nd d)3 168 1 1145 4608 t +10 R f +( it is used, all)4 583( If)1 137(This option acts a separator.)4 1175 3 1440 4608 t +10 B f +( s)1 0( fs)1 39( of)1 33( so)1 50( is)1 39( ki)1 28(m mk)1 139 7 3373 4608 t +10 R f +( the)1 161(options must be to the left of)6 1228 2 3739 4608 t +10 S1 f +(\261 \261)1 65 1 5167 4608 t +10 B f +(\256 \256n nd d)3 168 1 5232 4608 t +10 R f +(option. To the right of the)5 1073 1 1440 4728 t +10 S1 f +(\261 \261)1 65 1 2546 4728 t +10 B f +(\256 \256n nd d)3 168 1 2611 4728 t +10 R f +(option,)2812 4728 w +10 B f +( s)1 0( fs)1 39( of)1 33( so)1 50( is)1 39( ki)1 28(m mk)1 139 7 3126 4728 t +10 R f +(accepts the)1 448 1 3487 4728 t +10 B f +(\256 \256n nd d)3 168 1 3968 4728 t +10 R f +(command line syntax only.)3 1107 1 4169 4728 t +(The)1440 4968 w +10 B f +(\256 \256n nd d)3 168 1 1628 4968 t +10 R f +( of \256le names and the consumer, which is)8 1728(expression acts as a \256lter between the source)7 1843 2 1829 4968 t +( the)1 158( If)1 135(archiving engine.)1 704 3 1440 5088 t +10 B f +(\256 \256n nd d)3 168 1 2472 5088 t +10 R f +(expression evaluated as TRUE, then the related \256le is selected for)10 2725 1 2675 5088 t +(processing, otherwise it is omited.)4 1398 1 1440 5208 t +(In order to make the evaluation of the)7 1638 1 1440 5448 t +10 B f +(\256 \256n nd d)3 168 1 3122 5448 t +10 R f +(expression more convenient,)2 1183 1 3334 5448 t +10 B f +( s)1 0( fs)1 39( of)1 33( so)1 50( is)1 39( ki)1 28(m mk)1 139 7 4561 5448 t +10 R f +(implements)4933 5448 w +(additional)1440 5568 w +10 B f +( s)1 0( es)1 39( ie)1 44( ri)1 28( ar)1 44( ma)1 50( im)1 83( ri)1 28( pr)1 44( p)1 93(\256 \256n nd d)3 168 11 1877 5568 t +10 R f +(that have side effects on the \256le meta data.)8 1795 1 2535 5568 t +10 B f +( s)1 0( fs)1 39( of)1 33( so)1 50( is)1 39( ki)1 28(M Mk)1 150 7 4400 5568 t +10 R f +(implements the)1 625 1 4775 5568 t +(following additional)1 822 1 1440 5688 t +10 B f +(\256 \256n nd d)3 168 1 2295 5688 t +10 R f +(primaries:)2496 5688 w +10 S1 f +(\261 \261)1 65 1 1440 5856 t +10 B f +( p)1 0( lp)1 56( el)1 28(h he)1 100 4 1505 5856 t +10 R f +(Lists the available)2 743 1 1800 5856 t +10 B f +(\256 \256n nd d)3 168 1 2576 5856 t +10 R f +(\(1\) syntax.)1 435 1 2744 5856 t +10 S1 f +(\261 \261)1 65 1 1440 6024 t +10 B f +( p)1 0( rp)1 56( gr)1 44( hg)1 50(c ch)1 100 5 1505 6024 t +10 I f +(gname)1788 6024 w +10 R f +(The primary always evaluates as true; it sets the group of the \256le to)13 2786 1 1800 6144 t +10 I f +(gname)4619 6144 w +10 R f +(.)4893 6144 w +10 S1 f +(\261 \261)1 65 1 1440 6312 t +10 B f +( d)1 0( od)1 56( mo)1 50( hm)1 83(c ch)1 100 5 1505 6312 t +10 I f +(mode)1827 6312 w +10 R f +( the \256le to)3 430(The primary always evaluates as true; it sets the permissions of)10 2604 2 1800 6432 t +10 I f +(mode)4868 6432 w +10 R f +(. Octal)1 308 1 5092 6432 t +(and symbolic permissions are accepted for)5 1739 1 1800 6552 t +10 I f +(mode)3572 6552 w +10 R f +(as with)1 294 1 3821 6552 t +10 B f +( d)1 0( od)1 56( mo)1 50( hm)1 83(c ch)1 100 5 4148 6552 t +10 R f +(\(1\).)4437 6552 w +10 S1 f +(\261 \261)1 65 1 1440 6720 t +10 B f +( n)1 0( wn)1 56( ow)1 72( ho)1 50(c ch)1 100 5 1505 6720 t +10 I f +(uname)1816 6720 w +10 R f +(The primary always evaluates as true; it sets the owner of the \256le to)13 2802 1 1800 6840 t +10 I f +(uname)4635 6840 w +10 R f +(.)4909 6840 w +10 S1 f +(\261 \261)1 65 1 1440 7008 t +10 B f +( e)1 0( se)1 44( ls)1 39( al)1 28(f fa)1 83 5 1505 7008 t +10 R f +( result of the full expres-)5 1059(The primary always evaluates as false; it allows to make the)10 2541 2 1800 7008 t +(sion different from the result of a part of the expression.)10 2317 1 1800 7128 t +10 S1 f +(\261 \261)1 65 1 1440 7296 t +10 B f +( e)1 0( ue)1 44( ru)1 56(t tr)1 77 4 1505 7296 t +10 R f +( make the result of the full)6 1300(The primary always evaluates as true; it allows to)8 2300 2 1800 7296 t +( 8)1 1838( change: 2010/04/25)2 832( Last)1 1536(Version 3.0)1 474 4 720 7776 t +cleartomark +showpage +restore +%%EndPage: 8 8 %%Page: 9 9 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF 355.5(MKISOFS\(8\) MKISOFS\(8\))72 48 R .847 -(Rom will be mounted read-only in an)144 84 R 3.348(yc)-.15 G 3.348 -(ase. If)-3.348 F(an)3.348 E 3.348(yo)-.15 G 3.348(ft)-3.348 G .848 -(he special mode bits are set, clear them,)-3.348 F .198(because \214le\ - locks are not useful on a read-only \214le system, and set-id bits are\ - not desirable for uid)144 96 R 3.094(0o)144 108 S 3.094(rg)-3.094 G -.594(id 0.)-3.094 F .595(When used on W)5.594 F .595(in32, the e)-.4 F --.15(xe)-.15 G .595(cute bit is set on).15 F/F1 10/Times-Italic@0 SF -(all)3.095 E F0 .595(\214les. This is a result of the lack of)3.095 F -1.585(\214le permissions on W)144 120 R 1.585 -(in32 and the Cygwin POSIX emulation layer)-.4 F 6.585(.S)-.55 G 1.585 -(ee also \255uid \255gid, \255dir)-6.585 F(-)-.2 E -(mode, \255\214le-mode and \255ne)144 132 Q(w-dir)-.25 E(-mode.)-.2 E/F2 -10/Times-Bold@0 SF108 148.8 Q(elaxed-\214lenames)-.18 E F0 .662 -(The option)144 160.8 R F23.162 E(elaxed-\214lenames)-.18 E F0 -(allo)3.162 E .662 -(ws ISO9660 \214lenames to include digits, uppercase characters)-.25 F -(and all other 7 bit ASCII characters \(resp. an)144 172.8 Q(ything e) --.15 E(xcept lo)-.15 E(wercase characters\).)-.25 E -(This violates the ISO9660 standard, b)144 184.8 Q(ut it happens to w) --.2 E(ork on man)-.1 E 2.5(ys)-.15 G 2.5(ystems. Use)-2.5 F -(with caution.)2.5 E F2(\255sort)108 201.6 Q F1(sort \214le)2.5 E F0 -.354(Sort \214le locations on the media. Sorting is controlled by a \ -\214le that contains pairs of \214lenames and)144 213.6 R .305 -(sorting of)144 225.6 R .305(fset weighting.)-.25 F .305 -(If the weighting is higher)5.305 F 2.806(,t)-.4 G .306 -(he \214le will be located closer to the be)-2.806 F(ginning)-.15 E .044 -(of the media, if the weighting is lo)144 237.6 R(wer)-.25 E 2.544(,t) --.4 G .044 -(he \214le will be located closer to the end of the media. There)-2.544 -F .112(must be only one space or tabs character between the \214lename \ -and the weight and the weight must)144 249.6 R .877 -(be the last characters on a line. The \214lename is tak)144 261.6 R -.876(en to include all the characters up to, b)-.1 F .876(ut not)-.2 F -.317 -(including the last space or tab character on a line. This is to allo) -144 273.6 R 2.817(wf)-.25 G .317(or space characters to be in, or)-2.817 -F .775(at the end of a \214lename.)144 285.6 R .775(This option does) -5.775 F F2(not)3.275 E F0 .775 -(sort the order of the \214le names that appear in the)3.275 F .206 -(ISO9660 directory)144 297.6 R 2.706(.I)-.65 G 2.706(ts)-2.706 G .206(o\ -rts the order in which the \214le data is written to the CD image - whi\ -ch may)-2.706 F(be useful in order to optimize the data layout on a CD.\ - See README.sort for more details.)144 309.6 Q F2(\255split-output)108 -326.4 Q F0 .775(Split the output image into se)144 338.4 R -.15(ve)-.25 -G .774(ral \214les of approximately 1 GB.).15 F .774 -(This helps to create D)5.774 F .774(VD sized)-.4 F .657 -(iso9660 images on operating systems without lar)144 350.4 R .658 -(ge \214le support.)-.18 F .658(Cdrecord will concatenate more)5.658 F -.104(than one \214le into a single track if writing to a D)144 362.4 R -2.604(VD. T)-.4 F 2.604(om)-.8 G(ak)-2.604 E(e)-.1 E F2 -(\255split-output)2.604 E F0 -.1(wo)2.604 G .104(rk, the).1 F F2 -2.603 E F1(\214lename)2.603 E F0 4.346 -(option must be speci\214ed. The resulting outout images will be named:) -144 374.4 R F1(\214lename_00)6.847 E F0(,).47 E F1(\214le-)1.91 E -(name_01,)144 386.4 Q F0(\214lename_02)A F1(...)A F2(\255sysid)108 403.2 -Q F1(ID)2.5 E F0 1.372(Speci\214es the system ID.)144 415.2 R 1.372 -(This parameter can also be set in the \214le)6.372 F F2(.mkisofsr)3.872 -E(c)-.18 E F0 1.372(with SYSI=sys-)3.872 F 2.5(tem_id. If)144 427.2 R -(speci\214ed in both places, the command line v)2.5 E(ersion is used.) --.15 E F2108 444 Q F0 .82 -(Generate a \214le TRANS.TBL in each directory on the CDR)23.63 F .82 -(OM, which can be used on non-Rock)-.4 F .671 -(Ridge capable systems to help establish the correct \214le names.)144 -456 R .67(There is also information present)5.671 F .899(in the \214le \ -that indicates the major and minor numbers for block and character de) -144 468 R .9(vices, and each)-.25 F -(symlink has the name of the link \214le gi)144 480 Q -.15(ve)-.25 G(n.) -.15 E F2(\255table-name)108 496.8 Q F1 -.5(TA)2.5 G(BLE_N).5 E(AME)-.27 -E F0(Alternati)144 508.8 Q 1.409 -.15(ve t)-.25 H 1.109 -(ranslation table \214le name \(see abo).15 F -.15(ve)-.15 G 1.109 -(\). Implies the).15 F F23.609 E F0 3.608(option. If)3.609 F 1.108 -(you are creating a)3.608 F -(multi-session image you must use the same name as in the pre)144 520.8 -Q(vious session.)-.25 E F2(\255ucs-le)108 537.6 Q -.1(ve)-.15 G(l).1 E -F1(le)2.5 E(vel)-.15 E F0 1.296(Set Unicode conformance le)144 549.6 R --.15(ve)-.25 G 3.796(li).15 G 3.796(nt)-3.796 G 1.297 -(he Joliet SVD. The def)-3.796 F 1.297(ault le)-.1 F -.15(ve)-.25 G -3.797(li).15 G 3.797(s3)-3.797 G 6.297(.I)-3.797 G 3.797(tm)-6.297 G -1.297(ay be set to 1..3)-3.797 F(using this option.)144 561.6 Q F2 -(\255udf)108 578.4 Q F0(Include)15.85 E F2(UDF)2.933 E F0 .432 -(support in the generated \214lesystem image.)2.933 F F2(UDF)5.432 E F0 -.432(support is currently in alpha status)2.932 F 1.153 -(and for this reason, it is not possible to create UDF only images.)144 -590.4 R F2(UDF)6.153 E F0 1.153(data structures are cur)3.653 F(-)-.2 E -.609(rently coupled to the Joliet structures, so there are man)144 602.4 -R 3.108(yp)-.15 G(itf)-3.108 E .608 -(alls with the current implementation.)-.1 F .308(There is no UID/GID s\ -upport, there is no POSIX permission support, there is no support for s\ -ym-)144 614.4 R 2.525(links. Note)144 626.4 R(that)2.525 E F2(UDF)2.525 -E F0 -.1(wa)2.525 G .025 -(stes the space from sector ~20 to sector 256 at the be).1 F .024 -(ginning of the disk in)-.15 F(addition to the spcae needed for real)144 -638.4 Q F2(UDF)2.5 E F0(data structures.)2.5 E F2(\255uid)108 655.2 Q F1 -(uid)2.5 E F0(Ov)144 667.2 Q .632 -(errides the uid read from the source \214les to the v)-.15 F .633 -(alue of)-.25 F F1(uid)3.133 E F0 5.633(.S).77 G .633 -(pecifying this option automati-)-5.633 F(cally enables Rock Ridge e)144 -679.2 Q(xtensions.)-.15 E F2(\255use-\214le)108 696 Q -.1(ve)-.15 G -(rsion).1 E F0 .149(The option)144 708 R F2(\255use-\214le)2.649 E -.1 -(ve)-.15 G(rsion).1 E F0(allo)2.649 E .149(ws mkisofs to use \214le v) --.25 F .148(ersion numbers from the \214lesystem.)-.15 F .148(If the) -5.148 F .645(option is not speci\214ed,)144 720 R F2(mkisofs)3.145 E F0 -.645(creates a v)3.145 F .645(ersion if 1 for all \214les.)-.15 F .645 -(File v)5.645 F .645(ersions are strings in the)-.15 F -1.11(Ve)72 768 S -(rsion 2.0)1.11 E(24 Dec 2002)162.9 E(9)203.45 E EP +save +mark +9 pagesetup +10 R f +( \( 8 \))3 164( MKISOFS)1 3525(Maintenance Procedures)1 991 3 720 480 t +(expression different from the result of a part of the expression.)10 2577 1 1800 960 t +(The command line:)2 793 1 1440 1128 t +10 B f +( -)1 66( !)1 0( !)1 66( o)1 0( -o)1 50( -)1 66( \))1 0( \))1 66( e)1 0( se)1 44( ls)1 39( al)1 28( fa)1 50( f)1 66( o)1 0( -o)1 50( -)1 66( s)1 0( ls)1 39( -l)1 28( -)1 66( d)1 0( d)1 89( e)1 0( pe)1 44( yp)1 56( -t ty)2 83( -)1 66( \()1 0( \()1 66( .)1 0( .)1 58( \256n nd d)3 112( -\256)1 56( -)1 66( o)1 0( so)1 50( is)1 39( .i)1 28( o.)1 25( o)1 83( o)1 0( -o)1 50( -)1 66( s)1 0( fs)1 39( of)1 33( so)1 50( is)1 39( ki)1 28(m mk)1 139 51 1440 1296 t +( d)1 0( d)1 89( e)1 0( pe)1 44( yp)1 56(-t ty)1 116 6 3562 1296 t +10 R f +(lists all directories and puts all non-directories to the image)9 2439 1 1440 1464 t +10 B f +( o)1 0( so)1 50( is)1 39( .i)1 28(o o.)1 75 5 3912 1464 t +10 R f +(.)4104 1464 w +(The command line:)2 793 1 1440 1632 t +10 B f +( \))1 0( \))1 66( e)1 0( ue)1 44( ru)1 56( tr)1 44( t)1 66( o)1 0( -o)1 50( -)1 66( t)1 0( oo ot)2 83( ro)1 50( r)1 77( n)1 0( wn)1 56( ow)1 72( ho)1 50( ch)1 56( -c)1 44( -)1 66( d)1 0( d)1 89( e)1 0( pe)1 44( yp)1 56( -t ty)2 83( -)1 66( \()1 0( \()1 66( .)1 0( .)1 58( \256n nd d)3 112( -\256)1 56( -)1 66( o)1 0( so)1 50( is)1 39( .i)1 28( o.)1 25( o)1 83( o)1 0( -o)1 50( -)1 66( s)1 0( fs)1 39( of)1 33( so)1 50( is)1 39( ki)1 28(m mk)1 139 51 1440 1800 t +10 R f +( to be owned by root in the archive, all non-directories are)11 2416(archives all directories so they appear)5 1544 2 1440 1968 t +(archived as they are in the \256le system.)7 1581 1 1440 2088 t +(Note that the)2 548 1 1440 2256 t +10 S1 f +(\261 \261)1 65 1 2029 2256 t +10 B f +( s)1 0(l ls)1 67 2 2094 2256 t +10 R f +(,)2161 2256 w +10 S1 f +(\261 \261)1 65 1 2227 2256 t +10 B f +( ec c)2 44( xe)1 44(e ex)1 94 3 2292 2256 t +10 R f +(and the)1 307 1 2515 2256 t +10 S1 f +(\261 \261)1 65 1 2863 2256 t +10 B f +( k)1 0(o ok)1 106 2 2928 2256 t +10 R f +(primary cannot be used if)4 1084 1 3075 2256 t +10 B f +( n)1 0( in)1 56( di)1 28( td)1 56(s st)1 72 5 4201 2256 t +10 R f +(or stdout has not been)4 945 1 4455 2256 t +(redirected.)1440 2376 w +10 S1 f +(\261 \261)1 65 1 1080 2544 t +10 B f +( d)1 0( id)1 56(g gi)1 78 3 1145 2544 t +10 I f +(gid)1312 2544 w +10 R f +( value of)2 417(Overrides the gid read from the source \256les to the)9 2279 2 1440 2664 t +10 I f +(gid)4195 2664 w +10 R f +( this option)2 519(. Specifying)1 550 2 4331 2664 t +(automatically enables Rock Ridge extensions.)4 1872 1 1440 2784 t +10 S1 f +(\261 \261)1 65 1 1080 2952 t +10 B f +( i)1 0( ui)1 28(g gu)1 106 3 1145 2952 t +10 R f +( This currently makes the output more verbose but may have)10 2594(Switch the behaviour for a GUI.)5 1366 2 1440 2952 t +(other effects in future.)3 910 1 1440 3072 t +10 S1 f +(\261 \261)1 65 1 1080 3240 t +10 B f +( ft t)2 33( af)1 33( ra)1 50(g gr)1 94 4 1145 3240 t +10 S1 f +(\261 \261)1 65 1 1355 3240 t +10 B f +( s)1 0( ts)1 39( nt)1 33( in)1 56( oi)1 28(p po)1 106 6 1420 3240 t +10 R f +( \256lenames are checked for graft)5 1304(Allow to use graft points for \256lenames. If this option is used, all)12 2656 2 1440 3360 t +( \256lename is divided at the \256rst unescaped equal sign. All occurrences of ')13 3071(points. The)1 462 2 1440 3480 t +10 S1 f +(\\\\)4973 3480 w +10 R f +(' and '=')2 371 1 5029 3480 t +(characters must be escaped with ')5 1383 1 1440 3600 t +10 S1 f +(\\\\)2823 3600 w +10 R f +(' if)1 127 1 2879 3600 t +10 S1 f +(\261)3039 3600 w +10 I f +(graft)3104 3600 w +10 S1 f +(\261)3299 3600 w +10 I f +(points)3364 3600 w +10 R f +(has been speci\256ed.)2 767 1 3642 3600 t +10 S1 f +(\261 \261)1 65 1 1080 3768 t +10 B f +( e)1 0( de)1 44( id)1 56(h hi)1 84 4 1145 3768 t +10 I f +(glob)1362 3768 w +10 R f +(Hide)1440 3888 w +10 I f +(glob)1680 3888 w +10 R f +(from being seen on the ISO-9660 or Rock Ridge directory.)9 2541 1 1904 3888 t +10 I f +(glob)4524 3888 w +10 R f +(is a shell wild-)3 652 1 4748 3888 t +( globs may be hid-)4 780( Multiple)1 412( the \256lename or path.)4 882(card-style pattern that must match any part of)7 1886 4 1440 4008 t +(den. If)1 302 1 1440 4128 t +10 I f +(glob)1776 4128 w +10 R f +( order to)2 358( In)1 151( of that directory will be hidden.)6 1350(matches a directory, then the contents)5 1553 4 1988 4128 t +( All)1 200( '/' character.)2 561(match a directory name, make sure the pathname does not include a trailing)12 3199 3 1440 4248 t +( be used with the)4 773( Should)1 366( be written to the output CD image \256le.)8 1761(the hidden \256les will still)4 1060 4 1440 4368 t +10 S1 f +(\261 \261)1 65 1 1440 4488 t +10 B f +( e)1 0( de)1 44( id)1 56(h hi)1 84 4 1505 4488 t +10 S1 f +(\261 \261)1 65 1 1689 4488 t +10 B f +( t)1 0( et)1 33( li ie)2 72( ol)1 28(j jo)1 83 5 1754 4488 t +10 R f +(option. See README.hide for more details.)5 1816 1 2003 4488 t +10 S1 f +(\261 \261)1 65 1 1080 4656 t +10 B f +( e)1 0( de)1 44( id)1 56(h hi)1 84 4 1145 4656 t +10 S1 f +(\261 \261)1 65 1 1329 4656 t +10 B f +( t)1 0( st)1 33(l li is)2 95 3 1394 4656 t +10 I f +(\256le)1555 4656 w +10 R f +(A \256le containing a list of)5 1037 1 1440 4776 t +10 I f +(globs)2510 4776 w +10 R f +(to be hidden as above.)4 922 1 2760 4776 t +10 S1 f +(\261 \261)1 65 1 1080 4944 t +10 B f +( n)1 0( en)1 56( dd de)2 100( id)1 56(h hi)1 84 5 1145 4944 t +10 I f +(glob)1474 4944 w +10 R f +(Add the hidden \(existence\) ISO-9660 directory attribute for)7 2521 1 1440 5064 t +10 I f +(glob)4006 5064 w +10 R f +( attribute will prevent)3 926(. This)1 282 2 4192 5064 t +10 I f +(glob)1440 5184 w +10 R f +(from being listed on DOS based systems if the /A \257ag is not used for the listing.)16 3394 1 1655 5184 t +10 I f +(glob)5119 5184 w +10 R f +(is)5333 5184 w +( order to)2 380( In)1 162( or path.)2 372(a shell wild-card-style pattern that must match any part of the \256lename)11 3046 4 1440 5304 t +( Mul-)1 268(match a directory name, make sure the pathname does not include a trailing '/' character.)14 3692 2 1440 5424 t +(tiple globs may be hidden.)4 1090 1 1440 5544 t +10 S1 f +(\261 \261)1 65 1 1080 5712 t +10 B f +( n)1 0( en)1 56( dd de)2 100( id)1 56(h hi)1 84 5 1145 5712 t +10 S1 f +(\261 \261)1 65 1 1441 5712 t +10 B f +( t)1 0( st)1 33(l li is)2 95 3 1506 5712 t +10 I f +(\256le)1667 5712 w +10 R f +(A \256le containing a list of)5 1037 1 1440 5832 t +10 I f +(globs)2510 5832 w +10 R f +(to get the hidden attribute as above.)6 1471 1 2760 5832 t +10 S1 f +(\261 \261)1 65 1 1080 6000 t +10 B f +( e)1 0( de)1 44( id)1 56(h hi)1 84 4 1145 6000 t +10 S1 f +(\261 \261)1 65 1 1329 6000 t +10 B f +( t)1 0( et)1 33( li ie)2 72( ol)1 28(j jo)1 83 5 1394 6000 t +10 I f +(glob)1643 6000 w +10 R f +(Hide)1440 6120 w +10 I f +(glob)1675 6120 w +10 R f +(from being seen on the Joliet directory.)6 1669 1 1895 6120 t +10 I f +(glob)3639 6120 w +10 R f +(is a shell wild-card-style pattern that)5 1541 1 3859 6120 t +( If)1 133( globs may be hidden.)4 916( Multiple)1 413(must match any part of the \256lename or path.)8 1847 4 1440 6240 t +10 I f +(glob)4783 6240 w +10 R f +(matches a)1 405 1 4995 6240 t +( order to match a directory)5 1191( In)1 167(directory, then the contents of that directory will be hidden.)9 2602 3 1440 6360 t +( the hidden \256les will)4 849( All)1 194(name, make sure the pathname does not include a trailing '/' character.)11 2917 3 1440 6480 t +( be used with the)4 797( Should)1 372(still be written to the output CD image \256le.)8 1952 3 1440 6600 t +10 S1 f +(\261 \261)1 65 1 4616 6600 t +10 B f +( e)1 0( de)1 44( id)1 56(h hi)1 84 4 4681 6600 t +10 R f +(option. See)1 480 1 4920 6600 t +(README.hide for more details.)3 1325 1 1440 6720 t +10 S1 f +(\261 \261)1 65 1 1080 6888 t +10 B f +( e)1 0( de)1 44( id)1 56(h hi)1 84 4 1145 6888 t +10 S1 f +(\261 \261)1 65 1 1329 6888 t +10 B f +( t)1 0( et)1 33( li ie)2 72( ol)1 28(j jo)1 83 5 1394 6888 t +10 S1 f +(\261 \261)1 65 1 1610 6888 t +10 B f +( t)1 0( st)1 33(l li is)2 95 3 1675 6888 t +10 I f +(\256le)1836 6888 w +10 R f +(A \256le containing a list of)5 1037 1 1440 7008 t +10 I f +(globs)2510 7008 w +10 R f +(to be hidden as above.)4 922 1 2760 7008 t +10 S1 f +(\261 \261)1 65 1 1080 7176 t +10 B f +( e)1 0( de)1 44( id)1 56(h hi)1 84 4 1145 7176 t +10 S1 f +(\261 \261)1 65 1 1329 7176 t +10 B f +( t)1 0( et)1 33( li ie)2 72( ol)1 28(j jo)1 83 5 1394 7176 t +10 S1 f +(\261 \261)1 65 1 1610 7176 t +10 B f +( s)1 0( ns)1 39( an)1 56( ra)1 50(t tr)1 77 5 1675 7176 t +10 S1 f +(\261 \261)1 65 1 1897 7176 t +10 B f +( l)1 0( bl)1 28(t tb)1 89 3 1962 7176 t +10 R f +(Hide the)1 358 1 1440 7296 t +10 B f +( TB BL L)3 134( .T)1 67( S.)1 25( RA AN NS)3 200(T TR)1 139 5 1840 7296 t +10 R f +( don't make sense in the)5 1058( \256les usually)2 540( These)1 313(\256les from the Joliet tree.)4 1042 4 2447 7296 t +( 9)1 1838( change: 2010/04/25)2 832( Last)1 1536(Version 3.0)1 474 4 720 7776 t +cleartomark +showpage +restore +%%EndPage: 9 9 %%Page: 10 10 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF 355.5(MKISOFS\(8\) MKISOFS\(8\))72 48 R(range) -144 84 Q/F1 10/Times-Italic@0 SF(;1)2.5 E F0(to)2.5 E F1(;32767)2.5 E F0 -(This option is the def)2.5 E(ault on VMS.)-.1 E/F2 10/Times-Bold@0 SF -108 100.8 Q F0(Allo)23.08 E 2.079(ws "Untranslated" \214lenames, \ -completely violating the iso9660 standards described abo)-.25 F -.15(ve) --.15 G(.).15 E -.15(Fo)144 112.8 S .054 -(rces on the \255d, \255l, \255L, \255N, \255relax).15 F .055 -(ed-\214lenames, \255allo)-.15 F(w-lo)-.25 E .055(wercase, \255allo)-.25 -F .055(w-multidot and \255no-iso-)-.25 F 1.175 -(translate \215ags. It allo)144 124.8 R 1.174(ws more than one '.)-.25 F -3.674('c)-.7 G 1.174(haracter in the \214lename, as well as mix)-3.674 F -1.174(ed case \214le-)-.15 F 3.162(names. This)144 136.8 R .663 -(is useful on HP-UX system, where the b)3.162 F .663 -(uilt-in CDFS \214lesystem does not recognize)-.2 F(ANY e)144 148.8 Q -(xtensions. Use with e)-.15 E(xtreme caution.)-.15 E F2 -(\255no-iso-translate)108 165.6 Q F0 .47 -(Do not translate the characters '#' and '~' which are in)144 177.6 R --.25(va)-.4 G .469(lid for iso9660 \214lenames.).25 F .469 -(These charac-)5.469 F(ters are though in)144 189.6 Q -.25(va)-.4 G -(lid often used by Microsoft systems.).25 E -(This violates the ISO9660 standard, b)144 201.6 Q(ut it happens to w) --.2 E(ork on man)-.1 E 2.5(ys)-.15 G 2.5(ystems. Use)-2.5 F -(with caution.)2.5 E F2108 218.4 Q F1(volid)2.5 E F0 .23 -(Speci\214es the v)144 230.4 R .23(olume ID \(v)-.2 F .23 -(olume name or label\) to be written into the master block.)-.2 F .23 -(This parame-)5.23 F .533(ter can also be set in the \214le)144 242.4 R -F2(.mkisofsr)3.032 E(c)-.18 E F0 .532(with V)3.032 F 3.032(OLI=id. If) --.4 F .532(speci\214ed in both places, the command)3.032 F .356(line v) -144 254.4 R .356(ersion is used.)-.15 F .356 -(Note that if you assign a v)5.356 F .357 -(olume ID, this is the name that will be used as the)-.2 F .528 -(mount point used by the Solaris v)144 266.4 R .527 -(olume management system and the name that is assigned to the)-.2 F -(disc on a Microsoft W)144 278.4 Q(in32 or Apple Mac platform.)-.4 E F2 -108 295.2 Q(olset)-.1 E F1(ID)2.5 E F0 5.042(Speci\214es the v)144 -307.2 R 5.042(olset ID.)-.2 F 5.042 -(This parameter can also be set in the \214le)10.042 F F2(.mkisofsr) -7.543 E(c)-.18 E F0(with)7.543 E -.4(VO)144 319.2 S(LS=v).4 E 2.5 -(olset_id. If)-.2 F(speci\214ed in both places, the command line v)2.5 E -(ersion is used.)-.15 E F2108 336 Q(olset-size)-.1 E F1(#)2.5 E F0 -.116(Sets the v)144 348 R .116(olume set size to #.)-.2 F .116(The v) -5.116 F .116(olume set size is the number of CD')-.2 F 2.616(st)-.55 G -.116(hat are in a CD set.)-2.616 F(The)5.115 E F2144 360 Q -(olset-size)-.1 E F0 .028(option may be used to create CD')2.528 F 2.529 -(st)-.55 G .029(hat are part of e.g. a Operation System installation) --2.529 F .994(set of CD')144 372 R 3.493(s. The)-.55 F(option)3.493 E F2 -3.493 E(olset-size)-.1 E F0 .993(must be speci\214ed before)3.493 -F F23.493 E(olset-seqno)-.1 E F0 .993(on each command)3.493 F -(line.)144 384 Q F2108 400.8 Q(olset-seqno)-.1 E F1(#)2.5 E F0 -.378(Sets the v)144 412.8 R .378(olume set sequence number to #.)-.2 F -.378(The v)5.378 F .378(olume set sequence number is the inde)-.2 F -2.879(xn)-.15 G(umber)-2.879 E .2(of the current CD in a CD set.)144 -424.8 R .199(The option)5.199 F F22.699 E(olset-size)-.1 E F0 .199 -(must be speci\214ed before)2.699 F F22.699 E(olset-seqno)-.1 E F0 -(on)2.699 E(each command line.)144 436.8 Q F2108 453.6 Q F0 -1.11 -(Ve)25.3 G(rbose e)1.11 E -.15(xe)-.15 G(cution. If gi).15 E -.15(ve) --.25 G 2.5(nt).15 G(wice on the command line, e)-2.5 E(xtra deb)-.15 E -(ug information will be printed.)-.2 E F2108 470.4 Q F1(path)2.5 E -F0(Exclude)5.02 E F1(path)3.633 E F0 1.133(from being written to CDR) -3.633 F(OM.)-.4 E F1(path)6.134 E F0 1.134 -(must be the complete pathname that results)3.634 F 1.218 -(from concatenating the pathname gi)144 482.4 R -.15(ve)-.25 G 3.717(na) -.15 G 3.717(sc)-3.717 G 1.217(ommand line ar)-3.717 F 1.217 -(gument and the path relati)-.18 F 1.517 -.15(ve t)-.25 H 3.717(ot).15 G -(his)-3.717 E(directory)144 494.4 Q 5(.M)-.65 G(ultiple paths may be e) --5 E 2.5(xcluded. Example:)-.15 F -(mkisofs \255o cd \255x /local/dir1 \255x /local/dir2 /local)144 518.4 Q -(NO)144 542.4 Q 1.362(TE: The)-.4 F F23.862 E F0(and)3.862 E F2 -3.862 E F0 1.363(option description should both be updated, the) -3.862 F 3.863(ya)-.15 G 1.363(re wrong.)-3.863 F 1.363(Both no)6.363 F -(w)-.25 E -.1(wo)144 554.4 S .568 -(rk identical and use \214lename globbing. A \214le is e).1 F .568 -(xcluded if either the last component matches)-.15 F -(or the whole path matches.)144 566.4 Q F2108 583.2 Q F0 .354 -(Generate special RRIP records for transparently compressed \214les.) -25.86 F .355(This is only of use and interest)5.354 F .451(for hosts th\ -at support transparent decompression, such as Linux 2.4.14 or later)144 -595.2 R 5.45(.Y)-.55 G .45(ou must specify)-6.55 F(the)144 607.2 Q F2 -2.712 E F0(or)2.712 E F22.712 E F0 .212 -(options to enable RockRidge, and generate compressed \214les using the) -2.712 F F2(mkzftr)2.712 E(ee)-.18 E F0(util-)2.712 E 2.217 -(ity before running)144 619.2 R F2(mkisofs)4.717 E F0 7.217(.N)C 2.217 -(ote that transparent compression is a nonstandard Rock Ridge)-7.217 F --.15(ex)144 631.2 S 2.944(tension. The).15 F .444 -(resulting disks are only transparently readable if used on Linux.)2.944 -F .445(On other operat-)5.445 F(ing systems you will need to call)144 -643.2 Q F2(mkzftr)2.5 E(ee)-.18 E F0(by hand to decompress the \214les.) -2.5 E/F3 10.95/Times-Bold@0 SF(HFS OPTIONS)72 672 Q F2(\255hfs)108 684 Q -F0 1.137(Create an ISO9660/HFS h)17.52 F 1.136 -(ybrid CD. This option should be used in conjunction with the)-.05 F F2 -(\255map)3.636 E F0(,)A F2(\255magic)144 696 Q F0(and/or the v)2.5 E -(arious)-.25 E F1(double dash)2.5 E F0(options gi)2.5 E -.15(ve)-.25 G -2.5(nb).15 G(elo)-2.5 E -.65(w.)-.25 G F2(\255apple)108 712.8 Q F0 .393 -(Create an ISO9660 CD with Apple')6.96 F 2.893(se)-.55 G .393 -(xtensions. Similar to the)-3.043 F F2(\255hfs)2.893 E F0 .394 -(option, e)2.894 F .394(xcept that the Apple)-.15 F -(Extensions to ISO9660 are added instead of creating an HFS h)144 724.8 -Q(ybrid v)-.05 E(olume.)-.2 E -1.11(Ve)72 768 S(rsion 2.0)1.11 E -(24 Dec 2002)162.9 E(10)198.45 E EP +save +mark +10 pagesetup +10 R f +( \( 8 \))3 164( MKISOFS)1 3525(Maintenance Procedures)1 991 3 720 480 t +( may both be different)4 963(Joliet World as they list the real name and the ISO-9660 name which)12 2997 2 1440 960 t +(from the Joliet name.)3 873 1 1440 1080 t +10 S1 f +(\261 \261)1 65 1 1080 1248 t +10 B f +( e)1 0( de)1 44( id)1 56(h hi)1 84 4 1145 1248 t +10 S1 f +(\261 \261)1 65 1 1329 1248 t +10 B f +(r rr r)2 88 1 1394 1248 t +10 S1 f +(\261 \261)1 65 1 1482 1248 t +10 B f +( d)1 0( ed)1 56( ov ve)2 94(m mo)1 133 4 1547 1248 t +10 R f +(Rename the directory)2 911 1 1440 1368 t +10 B f +(R RR R)2 144 1 2402 1368 t +10 S f +(_ _)1 50 1 2546 1368 t +10 B f +( D)1 0( ED)1 72( VE)1 67( OV)1 72(M MO)1 172 5 2596 1368 t +10 R f +(to)3030 1368 w +10 B f +( rr r)2 44(. .r)1 69 2 3159 1368 t +10 S f +(_ _)1 50 1 3272 1368 t +10 B f +( d)1 0( ed)1 56( ov ve)2 94(m mo)1 133 4 3322 1368 t +10 R f +( to be)2 276( seems)1 295( It)1 145(in the Rock Ridge tree.)4 1028 4 3656 1368 t +(impossible to completely hide the)4 1458 1 1440 1488 t +10 B f +(R RR R)2 144 1 2950 1488 t +10 S f +(_ _)1 50 1 3094 1488 t +10 B f +( D)1 0( ED)1 72( VE)1 67( OV)1 72(M MO)1 172 5 3144 1488 t +10 R f +( This)1 262( tree.)1 225(directory from the Rock Ridge)4 1334 3 3579 1488 t +( don't know what this)4 952(option only makes the visible tree better to understand for people who)11 3008 2 1440 1608 t +( you need to have no)5 894( If)1 137(directory is for.)2 644 3 1440 1728 t +10 B f +(R RR R)2 144 1 3153 1728 t +10 S f +(_ _)1 50 1 3297 1728 t +10 B f +( D)1 0( ED)1 72( VE)1 67( OV)1 72(M MO)1 172 5 3347 1728 t +10 R f +(directory at all, you should use the)6 1457 1 3768 1728 t +10 S1 f +(\261 \261)1 65 1 5263 1728 t +10 B f +(D D)1 72 1 5328 1728 t +10 R f +(option. Note that in case that the)6 1386 1 1440 1848 t +10 S1 f +(\261 \261)1 65 1 2866 1848 t +10 B f +(D D)1 72 1 2931 1848 t +10 R f +( been speci\256ed, the resulting \256lesystem is not)7 1928(option has)1 429 2 3043 1848 t +( also)1 204( See)1 220( on MS-DOS.)2 589(ISO-9660 level-1 compliant and will not be readable)7 2238 4 1440 1968 t +10 B f +( S)1 0( TE ES)2 123( OT)1 67(N NO)1 150 4 4734 1968 t +10 R f +(section)5117 1968 w +(for more information on the)4 1147 1 1440 2088 t +10 B f +(R RR R)2 144 1 2620 2088 t +10 S f +(_ _)1 50 1 2764 2088 t +10 B f +( D)1 0( ED)1 72( VE)1 67( OV)1 72(M MO)1 172 5 2814 2088 t +10 R f +(directory.)3230 2088 w +10 S1 f +(\261 \261)1 65 1 1080 2376 t +10 B f +( e)1 0( de)1 44( id)1 56(h hi)1 84 4 1145 2376 t +10 S1 f +(\261 \261)1 65 1 1329 2376 t +10 B f +( f)1 0(u ud df)2 145 2 1394 2376 t +10 I f +(glob)1572 2376 w +10 R f +(Hide)1440 2496 w +10 I f +(glob)1677 2496 w +10 R f +(from being seen on the UDF directory.)6 1658 1 1898 2496 t +10 I f +(glob)3632 2496 w +10 R f +( that)1 194(is a shell wild-card-style pattern)4 1353 2 3853 2496 t +( If)1 133( globs may be hidden.)4 916( Multiple)1 413(must match any part of the \256lename or path.)8 1847 4 1440 2616 t +10 I f +(glob)4783 2616 w +10 R f +(matches a)1 405 1 4995 2616 t +( order to match a directory)5 1191( In)1 167(directory, then the contents of that directory will be hidden.)9 2602 3 1440 2736 t +( the hidden \256les will)4 849( All)1 194(name, make sure the pathname does not include a trailing '/' character.)11 2917 3 1440 2856 t +( be used with the)4 797( Should)1 372(still be written to the output CD image \256le.)8 1952 3 1440 2976 t +10 S1 f +(\261 \261)1 65 1 4616 2976 t +10 B f +( e)1 0( de)1 44( id)1 56(h hi)1 84 4 4681 2976 t +10 R f +(option. See)1 480 1 4920 2976 t +(README.hide for more details.)3 1325 1 1440 3096 t +10 S1 f +(\261 \261)1 65 1 1080 3264 t +10 B f +( e)1 0( de)1 44( id)1 56(h hi)1 84 4 1145 3264 t +10 S1 f +(\261 \261)1 65 1 1329 3264 t +10 B f +( f)1 0(u ud df)2 145 2 1394 3264 t +10 S1 f +(\261 \261)1 65 1 1539 3264 t +10 B f +( t)1 0( st)1 33(l li is)2 95 3 1604 3264 t +10 I f +(\256le)1765 3264 w +10 R f +(A \256le containing a list of)5 1037 1 1440 3384 t +10 I f +(globs)2510 3384 w +10 R f +(to be hidden as above.)4 922 1 2760 3384 t +10 S1 f +(\261 \261)1 65 1 1080 3672 t +10 B f +( t)1 0( np pu ut)3 145(i in)1 84 3 1145 3672 t +10 S1 f +(\261 \261)1 65 1 1374 3672 t +10 B f +( t)1 0( et)1 33( se)1 44( rs)1 39( ar)1 44( ha)1 50(c ch)1 100 7 1439 3672 t +10 I f +(charset)1782 3672 w +10 R f +( get a list of)4 548( To)1 188( characters used in local \256le names.)6 1530(Set up the input charset that de\256nes the)7 1694 4 1440 3792 t +(valid charset names, call)3 1038 1 1440 3912 t +10 B f +( s)1 0( fs)1 39( of)1 33( so)1 50( is)1 39( ki)1 28(m mk)1 139 7 2522 3912 t +10 S1 f +(\261 \261)1 65 1 2894 3912 t +10 B f +( t)1 0( np pu ut)3 145(i in)1 84 3 2959 3912 t +10 S1 f +(\261 \261)1 65 1 3188 3912 t +10 B f +( .)1 0( p.)1 25( lp)1 56( el)1 28( he)1 44( h)1 100( t)1 0( et)1 33( se)1 44( rs)1 39( ar)1 44( ha)1 50(c ch)1 100 13 3253 3912 t +10 R f +( you may use)3 584(To get a 1:1 mapping,)4 956 2 3860 3912 t +10 B f +( t)1 0( lt)1 33( ul)1 28( au)1 56( fa)1 50( ef)1 33(d de)1 100 7 1440 4032 t +10 R f +( the input charset has not been set up from the locale in the environ-)14 2852(as charset name. If)3 774 2 1774 4032 t +(ment, the default initial values are)5 1399 1 1440 4152 t +10 I f +(cp437)2872 4152 w +10 R f +(on DOS based systems and)4 1120 1 3149 4152 t +10 I f +(iso8859-1)4302 4152 w +10 R f +(on all other sys-)3 665 1 4735 4152 t +(tems. See)1 424 1 1440 4272 t +10 B f +( S)1 0( ET TS)2 123( SE)1 67( S)1 89( R)1 0( TE ER)2 139( AR RA AC CT)4 283( HA)1 72(C CH)1 150 9 1897 4272 t +10 R f +(section below for more details.)4 1266 1 2853 4272 t +(If)1440 4512 w +10 S1 f +(\261 \261)1 65 1 1543 4512 t +10 B f +( t)1 0( np pu ut)3 145(i in)1 84 3 1608 4512 t +10 S1 f +(\261 \261)1 65 1 1837 4512 t +10 B f +( t)1 0( et)1 33( se)1 44( rs)1 39( ar)1 44( ha)1 50(c ch)1 100 7 1902 4512 t +10 R f +( in the environment.)3 844(has not been speci\256ed, it will be set up from the locale)11 2307 2 2249 4512 t +(If you like to disable this automatic setup, use the empty string as locale name.)14 3259 1 1440 4632 t +10 S1 f +(\261 \261)1 65 1 1080 4800 t +10 B f +( t)1 0( pu ut)2 89( tp)1 56( ut)1 33(o ou)1 106 5 1145 4800 t +10 S1 f +(\261 \261)1 65 1 1429 4800 t +10 B f +( t)1 0( et)1 33( se)1 44( rs)1 39( ar)1 44( ha)1 50(c ch)1 100 7 1494 4800 t +10 I f +(charset)1837 4800 w +10 R f +(Set up the output charset that de\256nes the characters that will be used in Rock Ridge \256le names.)17 3960 1 1440 4920 t +(Defaults to the input charset. See)5 1360 1 1440 5040 t +10 B f +( S)1 0( ET TS)2 123( SE)1 67( S)1 89( R)1 0( TE ER)2 139( AR RA AC CT)4 283( HA)1 72(C CH)1 150 9 2833 5040 t +10 R f +(section below for more details.)4 1266 1 3789 5040 t +10 S1 f +(\261 \261)1 65 1 1080 5208 t +10 B f +( o)1 0( so)1 50(i is)1 67 3 1145 5208 t +10 S1 f +(\261 \261)1 65 1 1262 5208 t +10 B f +( l)1 0( el)1 28( ve)1 44( ev)1 50(l le)1 72 5 1327 5208 t +10 I f +(level)1554 5208 w +10 R f +(Set the ISO-9660 conformance level. Valid numbers are 1..3 and 4.)10 2769 1 1440 5328 t +(With level 1, \256les may only consist of one section and \256lenames are restricted to 8.3 characters.)16 3952 1 1440 5568 t +(With level 2, \256les may only consist of one section.)9 2096 1 1440 5808 t +( with this level,)3 692( Starting)1 400( do apply.)2 447(With level 3, no restrictions \(other than ISO-9660:1988\))7 2421 4 1440 6048 t +(mkisofs also allows \256les to be larger than 4 GB by implementing ISO-9660 multi-extent \256les.)14 3864 1 1440 6168 t +( levels from 1..3, all \256lenames are restricted to upper case letters, numbers)12 3182(With all ISO-9660)2 778 2 1440 6408 t +(and the underscore \()3 859 1 1440 6528 t +10 S f +(_)2299 6528 w +10 R f +(\). The maximum \256lename length is restricted to 31 characters, the direc-)11 3051 1 2349 6528 t +(tory nesting level is restricted to 8 and the maximum path length is limited to 255 characters.)16 3839 1 1440 6648 t +(Level 4 of\256cially does not exists but)6 1503 1 1440 6888 t +10 B f +( s)1 0( fs)1 39( of)1 33( so)1 50( is)1 39( ki)1 28(m mk)1 139 7 2976 6888 t +10 R f +(maps it to ISO-9660:1999 which is ISO-9660 ver-)7 2063 1 3337 6888 t +(sion 2.)1 275 1 1440 7008 t +( version number and \256le structure version)6 1808(With level 4, an enhanced volume descriptor with)7 2152 2 1440 7248 t +( 10)1 1838( change: 2010/04/25)2 832( Last)1 1536(Version 3.0)1 474 4 720 7728 t +cleartomark +showpage +restore +%%EndPage: 10 10 %%Page: 11 11 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF 355.5(MKISOFS\(8\) MKISOFS\(8\))72 48 R/F1 10 -/Times-Bold@0 SF(\255map)108 84 Q/F2 10/Times-Italic@0 SF -(mapping_\214le)2.5 E F0 1.43(Use the)144 96 R F2(mapping_\214le)3.93 E -F0 1.43(to set the CREA)3.93 F -.18(TO)-1.11 G 3.93(Ra).18 G 1.43 -(nd TYPE information for a \214le based on the \214le-)-3.93 F(name')144 -108 Q 2.828(se)-.55 G .329 -(xtension. A \214lename is mapped only if it is not one of the kno) --2.978 F 2.829(wA)-.25 G .329(pple/Unix \214le formats.)-2.829 F -(See the)144 120 Q F1(HFS CREA)2.5 E -.18(TO)-.95 G(R/TYPE).18 E F0 -(section belo)2.5 E -.65(w.)-.25 G F1(\255magic)108 136.8 Q F2(ma)2.5 E -(gic_\214le)-.1 E F0 .34(The CREA)144 148.8 R -.18(TO)-1.11 G 2.84(Ra) -.18 G .34(nd TYPE information is set by using a \214le')-2.84 F(s)-.55 E -F2(ma)2.84 E .34(gic number)-.1 F F0 .34(\(usually the \214rst fe)2.84 F -(w)-.25 E .704(bytes of a \214le\). The)144 160.8 R F2(ma)3.204 E -(gic_\214le)-.1 E F0 .705 -(is only used if a \214le is not one of the kno)3.204 F .705 -(wn Apple/Unix \214le for)-.25 F(-)-.2 E .482(mats, or the \214lename e) -144 172.8 R .481(xtension has not been mapped using the)-.15 F F1 -(\255map)2.981 E F0 .481(option. See the)2.981 F F1 .481(HFS CRE-)2.981 -F -.78 -.95(AT O)144 184.8 T(R/TYPE).95 E F0(section belo)2.5 E 2.5(wf) --.25 G(or more details.)-2.5 E F1(\255hfs-cr)108 201.6 Q(eator)-.18 E F2 -(CREA)2.5 E -.18(TO)-.37 G(R).18 E F0 2.82(Set the def)144 213.6 R 2.82 -(ault CREA)-.1 F -.18(TO)-1.11 G 5.32(Rf).18 G 2.821 -(or all \214les. Must be e)-5.32 F 2.821(xactly 4 characters. See the) --.15 F F1 2.821(HFS CRE-)5.321 F -.78 -.95(AT O)144 225.6 T(R/TYPE).95 E -F0(section belo)2.5 E 2.5(wf)-.25 G(or more details.)-2.5 E F1 -(\255hfs-type)108 242.4 Q F2(TYPE)2.5 E F0 .588(Set the def)144 254.4 R -.587(ault TYPE for all \214les. Must be e)-.1 F .587 -(xactly 4 characters. See the)-.15 F F1 .587(HFS CREA)3.087 F -.18(TO) --.95 G(R/TYPE).18 E F0(section belo)144 266.4 Q 2.5(wf)-.25 G -(or more details.)-2.5 E F1(\255pr)108 283.2 Q(obe)-.18 E F0 1.364 -(Search the contents of \214les for all the kno)5.48 F 1.364 -(wn Apple/Unix \214le formats.)-.25 F 1.364(See the)6.364 F F1 1.364 -(HFS MA)3.864 F(CIN-)-.55 E -.18(TO)144 295.2 S .394(SH FILE FORMA).18 F -(TS)-.95 E F0 .394(section belo)2.894 F 2.894(wf)-.25 G .394 -(or more about these formats.)-2.894 F(Ho)5.393 E(we)-.25 E -.15(ve)-.25 -G 1.193 -.4(r, t).15 H .393(he only w).4 F .393(ay to)-.1 F .997 -(check for)144 307.2 R F2(MacBinary)3.497 E F0(and)3.497 E F2 -(AppleSingle)3.497 E F0 .997 -(\214les is to open and read them. Therefore this option)3.497 F F2(may) -3.498 E F0 1.048 -(increase processing time. It is better to use one or more)144 319.2 R -F2 1.047(double dash)3.548 F F0 1.047(options gi)3.547 F -.15(ve)-.25 G -3.547(nb).15 G(elo)-3.547 E 3.547(wi)-.25 G 3.547(ft)-3.547 G(he)-3.547 -E(Apple/Unix formats in use are kno)144 331.2 Q(wn.)-.25 E F1 -(\255no-desktop)108 348 Q F0 .403 -(Do not create \(empty\) Desktop \214les. Ne)144 360 R 2.903(wH)-.25 G -.404(FS Desktop \214les will be created when the CD is used)-2.903 F -.793(on a Macintosh \(and stored in the System F)144 372 R 3.292 -(older\). By)-.15 F(def)3.292 E .792 -(ault, empty Desktop \214les are added to)-.1 F(the HFS v)144 384 Q -(olume.)-.2 E F1(\255mac-name)108 400.8 Q F0 .175(Use the HFS \214lenam\ -e as the starting point for the ISO9660, Joliet and Rock Ridge \214le n\ -ames. See)144 412.8 R(the)144 424.8 Q F1(HFS MA)2.5 E(CINT)-.55 E -(OSH FILE N)-.18 E(AMES)-.2 E F0(section belo)2.5 E 2.5(wf)-.25 G -(or more information.)-2.5 E F1(\255boot-hfs-\214le)108 441.6 Q F2 -(driver_\214le)2.5 E F0 1.88(Installs the)144 453.6 R F2(driver_\214le) -4.38 E F0(that)4.38 E F2(may)4.38 E F0(mak)4.38 E 4.379(et)-.1 G 1.879 -(he CD bootable on a Macintosh. See the)-4.379 F F1 1.879(HFS BOO)4.379 -F(T)-.4 E(DRIVER)144 465.6 Q F0(section belo)2.5 E 1.3 -.65(w. \()-.25 H -(Alpha\).).65 E F1(\255part)108 482.4 Q F0 .164 -(Generate an HFS partition table. By def)11.97 F .165 -(ault, no partition table is generated, b)-.1 F .165 -(ut some older Macin-)-.2 F .217(tosh CDR)144 494.4 R .217(OM dri)-.4 F --.15(ve)-.25 G .217(rs need an HFS partition table on the CDR).15 F .216 -(OM to be able to recognize a h)-.4 F(ybrid)-.05 E(CDR)144 506.4 Q(OM.) --.4 E F1(\255auto)108 523.2 Q F2 -.2(Au)2.5 G(toStart_\214le).2 E F0 -(Mak)144 535.2 Q 2.804(et)-.1 G .304(he HFS CD use the QuickT)-2.804 F -.304(ime 2.0 Autostart feature to launch an application or document.) --.35 F .598(The gi)144 547.2 R -.15(ve)-.25 G 3.098<6e8c>.15 G .597(len\ -ame must be the name of a document or application located at the top le) --3.098 F -.15(ve)-.25 G 3.097(lo).15 G 3.097(ft)-3.097 G(he)-3.097 E -(CD. The \214lename must be less than 12 characters. \(Alpha\).)144 -559.2 Q F1(\255cluster)108 576 Q(-size)-.37 E F2(size)2.5 E F0 3.172(Se\ -t the size in bytes of the cluster or allocation units of PC Exchange \ -\214les. Implies the)144 588 R F1(\255\255exchange)144 600 Q F0 -(option. See the)2.5 E F1(HFS MA)2.5 E(CINT)-.55 E(OSH FILE FORMA)-.18 E -(TS)-.95 E F0(section belo)2.5 E -.65(w.)-.25 G F1(\255hide-hfs)108 -616.8 Q F2(glob)2.5 E F0(Hide)144 628.8 Q F2(glob)3.005 E F0 .505 -(from the HFS v)3.005 F .505 -(olume. The \214le or directory will still e)-.2 F .504 -(xist in the ISO9660 and/or Joliet)-.15 F(directory)144 640.8 Q(.)-.65 E -F2(glob)5.252 E F0 .253 -(is a shell wild-card-style pattern that must match an)2.752 F 2.753(yp) --.15 G .253(art of the \214lename Multiple)-2.753 F(globs may be e)144 -652.8 Q 2.5(xcluded. Example:)-.15 F -(mkisofs \255o rom \255hfs \255hide-hfs '*.o' \255hide-hfs foobar)144 -676.8 Q -.1(wo)144 700.8 S .942(uld e).1 F .941 -(xclude all \214les ending in ".o" or called "foobar" from the HFS v) --.15 F .941(olume. Note that if you)-.2 F .65(had a directory called "f\ -oobar" it too \(and of course all its descendants\) w)144 712.8 R .65 -(ould be e)-.1 F 3.15(xcluded. The)-.15 F F2(glob)144 724.8 Q F0 2.287 -(can also be a path name relati)4.787 F 2.587 -.15(ve t)-.25 H 4.787(ot) -.15 G 2.287(he source directories gi)-4.787 F -.15(ve)-.25 G 4.787(no) -.15 G 4.787(nt)-4.787 G 2.286(he command line.)-4.787 F -1.11(Ve)72 768 -S(rsion 2.0)1.11 E(24 Dec 2002)162.9 E(11)198.45 E EP +save +mark +11 pagesetup +10 R f +( \( 8 \))3 164( MKISOFS)1 3525(Maintenance Procedures)1 991 3 720 480 t +( more than 8 levels of directory nesting, there is no)10 2173( may be)2 346( There)1 305(number set to 2 is emitted.)5 1136 4 1440 960 t +( do not have)3 518(need for a \256le to contain a dot and the dot has no more special meaning, \256le names)17 3442 2 1440 1080 t +( Ridge is)2 374( Rock)1 246( If)1 134(version numbers, the maximum length for \256les and directory is raised to 207.)12 3206 4 1440 1200 t +(used, the maximum ISO-9660 name length is reduced to 197.)9 2528 1 1440 1320 t +(When creating Version 2 images,)4 1417 1 1440 1560 t +10 B f +( s)1 0( fs)1 39( of)1 33( so)1 50( is)1 39( ki)1 28(m mk)1 139 7 2903 1560 t +10 R f +(emits an enhanced volume descriptor which looks)6 2123 1 3277 1560 t +( volume descriptor but is slightly different. Be careful not to use broken)12 3106(similar to a primary)3 854 2 1440 1680 t +(software to make ISO-9660 images bootable by assuming a second PVD copy and patching this)14 3960 1 1440 1800 t +(putative PVD copy into an El Torito VD.)7 1705 1 1440 1920 t +10 S1 f +(\261 \261)1 65 1 1080 2088 t +10 B f +(J J)1 50 1 1145 2088 t +10 R f +( is primarily)2 519( This)1 251( ISO-9660 \256le names.)3 922(Generate Joliet directory records in addition to regular)7 2268 4 1440 2088 t +( Joliet)1 263( The)1 234( are to be used on Windows-NT or Windows-95 machines.)9 2540(useful when the discs)3 923 4 1440 2208 t +( 64 Unicode charac-)3 853(\256lenames are speci\256ed in Unicode and each path component can be up to)12 3107 2 1440 2328 t +( that use only Joliet extensions but no standard)8 1946( that Joliet is no standard - CD's)7 1368( Note)1 263(ters long.)1 383 4 1440 2448 t +(Rock Ridge extensions may usually only be used on Microsoft Win32 systems. Furthermore,)12 3960 1 1440 2568 t +( are limited to 64 characters and the fact that Joliet uses the UTF-16)13 2878(the fact that the \256lenames)4 1082 2 1440 2688 t +(coding for Unicode characters causes interoperability problems.)6 2600 1 1440 2808 t +10 S1 f +(\261 \261)1 65 1 1080 2976 t +10 B f +( t)1 0( et)1 33( li ie)2 72( ol)1 28(j jo)1 83 5 1145 2976 t +10 S1 f +(\261 \261)1 65 1 1361 2976 t +10 B f +( g)1 0( ng)1 50( on)1 56(l lo)1 78 4 1426 2976 t +10 R f +( the Joliet speci\256cation -)4 1021(Allow Joliet \256lenames to be up to 103 Unicode characters. This breaks)11 2939 2 1440 3096 t +( Use with caution. The number 103 is derived from: the maximum Direc-)12 3100(but appears to work.)3 860 2 1440 3216 t +(tory Record Length \(254\), minus the length of Directory Record \(33\), minus CD-ROM XA)13 3960 1 1440 3336 t +(System Use Extension Information \(14\), divided by the UTF-16 character size \(2\).)11 3385 1 1440 3456 t +10 S1 f +(\261 \261)1 65 1 1080 3624 t +10 B f +( t)1 0( et)1 33( se)1 44( rs)1 39( ar)1 44( ha)1 50( ch)1 56(j jc)1 77 8 1145 3624 t +10 I f +(charset)1521 3624 w +10 R f +(Same as using)2 626 1 1440 3744 t +10 S1 f +(\261 \261)1 65 1 2118 3744 t +10 B f +( t)1 0( np pu ut)3 145(i in)1 84 3 2183 3744 t +10 S1 f +(\261 \261)1 65 1 2412 3744 t +10 B f +( t)1 0( et)1 33( se)1 44( rs)1 39( ar)1 44( ha)1 50(c ch)1 100 7 2477 3744 t +10 I f +(charset)2839 3744 w +10 R f +(and)3186 3744 w +10 S1 f +(\261 \261)1 65 1 3383 3744 t +10 B f +(J J)1 50 1 3448 3744 t +10 R f +(options. See)1 517 1 3551 3744 t +10 B f +( S)1 0( ET TS)2 123( SE)1 67( S)1 109( R)1 0( TE ER)2 139( AR RA AC CT)4 283( HA)1 72(C CH)1 150 9 4121 3744 t +10 R f +(section)5117 3744 w +(below for more details.)3 950 1 1440 3864 t +10 S1 f +(\261 \261)1 65 1 1080 4032 t +10 B f +(l l)1 28 1 1145 4032 t +10 R f +( ISO-9660 \256lename will be in an 8.3 format)8 1903( the)1 165( Normally)1 459(Allow full 31 character \256lenames.)4 1433 4 1440 4032 t +( allows \256lenames of up)4 971(which is compatible with MS-DOS, even though the ISO-9660 standard)9 2989 2 1440 4152 t +( use this option, the disc may be dif\256cult to use on a MS-DOS system,)14 2965( you)1 185( If)1 134(to 31 characters.)2 676 4 1440 4272 t +( with caution.)2 563( Use)1 221(but this comes in handy on some other systems \(such as the Amiga\).)12 2830 3 1440 4392 t +10 S1 f +(\261 \261)1 65 1 1080 4560 t +10 B f +(L L)1 67 1 1145 4560 t +10 R f +( reserved by POSIX.1-2001, use)4 1396(Outdated option)1 672 2 1440 4560 t +10 S1 f +(\261 \261)1 65 1 3559 4560 t +10 B f +( w)1 0( ow)1 72( ll lo)2 78(a al)1 78 4 3624 4560 t +10 S1 f +(\261 \261)1 65 1 3852 4560 t +10 B f +( g)1 0( ng)1 50( in)1 56( di)1 28( ad)1 56( ea)1 50(l le)1 72 7 3917 4560 t +10 S1 f +(\261 \261)1 65 1 4229 4560 t +10 B f +( s)1 0( ts)1 39( ot)1 33(d do)1 106 4 4294 4560 t +10 R f +( option)1 307(instead. This)1 570 2 4523 4560 t +(will get POSIX.1-2001 semantics with mkisofs-2.02.)5 2162 1 1440 4680 t +10 S1 f +(\261 \261)1 65 1 1080 4848 t +10 B f +( og g)2 50(l lo)1 78 2 1145 4848 t +10 S1 f +(\261 \261)1 65 1 1273 4848 t +10 B f +( e)1 0( le)1 44(\256 \256l)1 84 3 1338 4848 t +10 I f +(log)1499 4848 w +10 S f +(_)1627 4848 w +10 I f +(\256le)1677 4848 w +10 R f +(Redirect all error, warning and informational messages to)7 2357 1 1440 4968 t +10 I f +(log)3830 4968 w +10 S f +(_)3958 4968 w +10 I f +(\256le)4008 4968 w +10 R f +(instead of the standard error.)4 1176 1 4163 4968 t +10 S1 f +(\261 \261)1 65 1 1080 5136 t +10 B f +(m m)1 83 1 1145 5136 t +10 I f +(glob)1261 5136 w +10 R f +(Exclude)1440 5256 w +10 I f +(glob)1806 5256 w +10 R f +(from being written to CDROM.)4 1325 1 2023 5256 t +10 I f +(glob)3420 5256 w +10 R f +( pattern that must)3 742(is a shell wild-card-style)3 1021 2 3637 5256 t +(match part of the \256lename \(not the path as with option)10 2440 1 1440 5376 t +10 S1 f +(\261 \261)1 65 1 3932 5376 t +10 B f +(x x)1 50 1 3997 5376 t +10 R f +(\). Technically)1 614 1 4047 5376 t +10 I f +(glob)4713 5376 w +10 R f +(is matched)1 457 1 4943 5376 t +(against the)1 438 1 1440 5496 t +10 I f +(d-)1911 5496 w +10 S1 f +(>)1994 5496 w +10 I f +(d)2050 5496 w +10 S f +(_)2100 5496 w +10 I f +(name)2150 5496 w +10 R f +( Example:)1 449( globs may be excluded.)4 1000( Multiple)1 411(part of the directory entry.)4 1082 4 2399 5496 t +(mkisofs)1440 5736 w +10 S1 f +(\261)1790 5736 w +10 R f +(o rom)1 244 1 1855 5736 t +10 S1 f +(\261)2132 5736 w +10 R f +(m ')1 144 1 2197 5736 t +10 S f +(*)2341 5736 w +10 R f +(.o')2391 5736 w +10 S1 f +(\261)2532 5736 w +10 R f +(m core)1 282 1 2597 5736 t +10 S1 f +(\261)2912 5736 w +10 R f +(m foobar)1 371 1 2977 5736 t +(would exclude all \256les ending in)5 1357 1 1440 5976 t +10 S1 f +(")2833 5976 w +10 R f +(.o)2874 5976 w +10 S1 f +(")2949 5976 w +10 R f +(, called)1 299 1 2990 5976 t +10 S1 f +(")3325 5976 w +10 R f +(core)3366 5976 w +10 S1 f +(")3537 5976 w +10 R f +(or)3614 5976 w +10 S1 f +(")3734 5976 w +10 R f +(foobar)3775 5976 w +10 S1 f +(")4035 5976 w +10 R f +(to be copied to CDROM. Note)5 1287 1 4113 5976 t +(that if you had a directory called)6 1399 1 1440 6096 t +10 S1 f +(")2881 6096 w +10 R f +(foobar)2922 6096 w +10 S1 f +(")3182 6096 w +10 R f +( be)1 135(it too \(and of course all its descendants\) would)8 2000 2 3265 6096 t +(excluded.)1440 6216 w +(NOTE: The)1 485 1 1440 6456 t +10 S1 f +(\261 \261)1 65 1 1961 6456 t +10 B f +(m m)1 83 1 2026 6456 t +10 R f +(and)2145 6456 w +10 S1 f +(\261 \261)1 65 1 2325 6456 t +10 B f +(x x)1 50 1 2390 6456 t +10 R f +( now)1 209( Both)1 265(option description should both be updated, they are wrong.)8 2449 3 2477 6456 t +( A \256le is excluded if either the last component)9 2124(work identical and use \256lename globbing.)5 1836 2 1440 6576 t +(matches or the whole path matches.)5 1465 1 1440 6696 t +10 S1 f +(\261 \261)1 65 1 1080 6864 t +10 B f +( e)1 0( ud de)2 100( lu)1 56( cl)1 28( xc)1 44(e ex)1 94 6 1145 6864 t +10 S1 f +(\261 \261)1 65 1 1467 6864 t +10 B f +( t)1 0( st)1 33(l li is)2 95 3 1532 6864 t +10 I f +(\256le)1693 6864 w +10 R f +(A \256le containing a list of)5 1037 1 1440 6984 t +10 I f +(globs)2510 6984 w +10 R f +(to be exclude as above.)4 960 1 2760 6984 t +10 S1 f +(\261 \261)1 65 1 1080 7152 t +10 B f +( ax x)2 50(m ma)1 133 2 1145 7152 t +10 S1 f +(\261 \261)1 65 1 1328 7152 t +10 B f +( 96 66 60 0)4 150( -9)1 50( O-)1 33( SO)1 78(I IS)1 95 5 1393 7152 t +10 S1 f +(\261 \261)1 65 1 1799 7152 t +10 B f +( s)1 0( es)1 39( me)1 44( am)1 83( na)1 50( en)1 56( le)1 44(\256 \256l)1 84 8 1864 7152 t +10 R f +( option forces the)3 756( This)1 256(Allow 37 chars in ISO-9660 \256lenames.)5 1665 3 1440 7272 t +10 S1 f +(\261 \261)1 65 1 4162 7272 t +10 B f +(N N)1 72 1 4227 7272 t +10 R f +(option as the extra name)4 1056 1 4344 7272 t +( 11)1 1838( change: 2010/04/25)2 832( Last)1 1536(Version 3.0)1 474 4 720 7752 t +cleartomark +showpage +restore +%%EndPage: 11 11 %%Page: 12 12 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF 355.5(MKISOFS\(8\) MKISOFS\(8\))72 48 R -(Example:)144 84 Q(mkisofs \255o rom \255hfs \255hide-hfs src/html src) -144 108 Q -.1(wo)144 132 S 1.108(uld e).1 F 1.108(xclude just the \214l\ -e or directory called "html" from the "src" directory)-.15 F 3.608(.A) --.65 G 1.408 -.15(ny o)-3.608 H 1.109(ther \214le or).15 F 1.256 -(directory called "html" in the tree will not be e)144 144 R 3.756 -(xcluded. Should)-.15 F 1.256(be used with the)3.756 F/F1 10 -/Times-Bold@0 SF(\255hide)3.756 E F0(and/or)3.756 E F1(\255hide-joliet) -144 156 Q F0 4.695(options. In)4.695 F 2.196 -(order to match a directory name, mak)4.695 F 4.696(es)-.1 G 2.196 -(ure the pathname does not)-4.696 F(include a trailing '/' character)144 -168 Q 2.5(.S)-.55 G(ee README.hide for more details.)-2.5 E F1 -(\255hide-hfs-list)108 184.8 Q/F2 10/Times-Italic@0 SF(\214le)2.5 E F0 -2.5<418c>144 196.8 S(le containing a list of)-2.5 E F2(globs)2.5 E F0 -(to be hidden as abo)2.5 E -.15(ve)-.15 G(.).15 E F1(\255hfs-v)108 213.6 -Q(olid)-.1 E F2(hfs_volid)2.5 E F0 -1.29(Vo)144 225.6 S .699(lume name \ -for the HFS partition. This is the name that is assigned to the disc on\ - a Macintosh)1.29 F(and replaces the)144 237.6 Q F2(volid)2.5 E F0 -(used with the)2.5 E F12.5 E F0(option)2.5 E F1(\255icon-position) -108 254.4 Q F0 .559(Use the icon position information, if it e)144 266.4 -R .559(xists, from the Apple/Unix \214le.)-.15 F .56 -(The icons will appear in)5.56 F .924(the same position as the)144 278.4 -R 3.423(yw)-.15 G .923(ould on a Macintosh desktop. F)-3.523 F .923 -(older location and size on screen, its)-.15 F .024 -(scroll positions, folder V)144 290.4 R(ie)-.6 E 2.524(w\()-.25 G(vie) --2.524 E 2.524(wa)-.25 G 2.525(sI)-2.524 G .025 -(cons, Small Icons, etc.\) are also preserv)-2.525 F 2.525(ed. This)-.15 -F .025(option may)2.525 F(become set by def)144 302.4 Q -(ault in the future.)-.1 E(\(Alpha\).)5 E F1108 319.2 Q(oot-inf) --.18 E(o)-.25 E F2(\214le)2.5 E F0 .117 -(Set the location, size on screen, scroll positions, folder V)144 331.2 -R(ie)-.6 E 2.617(we)-.25 G .117(tc. for the root folder of an HFS v) --2.617 F(ol-)-.2 E(ume. See README.rootinfo for more information.)144 -343.2 Q(\(Alpha\))5 E F1(\255pr)108 360 Q(ep-boot)-.18 E F2(FILE)2.5 E -F0(PReP boot image \214le. Up to 4 are allo)144 372 Q -(wed. See README.prep_boot \(Alpha\))-.25 E F1(\255input-hfs-charset)108 -388.8 Q F2 -.15(ch)2.5 G(ar).15 E(set)-.1 E F0 .788(Input charset that \ -de\214nes the characters used in HFS \214le names when used with the)144 -400.8 R F2(\255mac-name)3.288 E F0 2.782(option. The)144 412.8 R(def) -2.782 E .282(ault charset is cp10000 \(Mac Roman\))-.1 F F2(cp10000) -2.782 E F0 .281(\(Mac Roman\) See)2.781 F F1(CHARA)2.781 E(CTER)-.55 E -(SETS)144 424.8 Q F0(and)2.5 E F1(HFS MA)2.5 E(CINT)-.55 E(OSH FILE N) --.18 E(AMES)-.2 E F0(sections belo)2.5 E 2.5(wf)-.25 G(or more details.) --2.5 E F1(\255output-hfs-charset)108 441.6 Q F2 -.15(ch)2.5 G(ar).15 E -(set)-.1 E F0 .591(Output charset that de\214nes the characters that wi\ -ll be used in the HFS \214le names. Def)144 453.6 R .591(aults to the) --.1 F(input charset. See)144 465.6 Q F1(CHARA)2.5 E(CTER SETS)-.55 E F0 -(section belo)2.5 E 2.5(wf)-.25 G(or more details.)-2.5 E F1 -(\255hfs-unlock)108 482.4 Q F0 1.576(By def)144 494.4 R(ault,)-.1 E F1 -(mkisofs)4.076 E F0 1.576(will create an HFS v)4.076 F 1.575 -(olume that is)-.2 F F2(loc)4.075 E -.1(ke)-.2 G(d).1 E F0 6.575(.T).77 -G 1.575(his option lea)-6.575 F -.15(ve)-.2 G 4.075(st).15 G 1.575(he v) --4.075 F(olume)-.2 E(unlock)144 506.4 Q 1.029 -(ed so that other applications \(e.g.)-.1 F 1.029 -(hfsutils\) can modify the v)6.029 F 1.03(olume. See the)-.2 F F1 1.03 -(HFS PR)3.53 F(OB-)-.3 E(LEMS/LIMIT)144 518.4 Q -.95(AT)-.9 G(IONS).95 E -F0(section belo)2.5 E 2.5(wf)-.25 G(or w)-2.5 E -(arnings about using this option.)-.1 E F1(\255hfs-bless)108 535.2 Q F2 -(folder_name)2.5 E F0 .065("Bless" the gi)144 547.2 R -.15(ve)-.25 G -2.565(nd).15 G .065(irectory \(folder\). This is usually the)-2.565 F F1 -.064(System F)2.564 F(older)-.25 E F0 .064(and is used in creating HFS) -2.564 F .645 -(bootable CDs. The name of the directory must be the whole path name as) -144 559.2 R F1(mkisofs)3.145 E F0 .645(sees it. e.g. if)3.145 F .369 -(the gi)144 571.2 R -.15(ve)-.25 G 2.869(np).15 G .369 -(athspec is ./cddata and the required folder is called System F)-2.869 F -(older)-.15 E 2.868(,t)-.4 G .368(hen the whole path)-2.868 F -(name is "./cddata/System F)144 583.2 Q -(older" \(remember to use quotes if the name contains spaces\).)-.15 E -F1(\255hfs-parms)108 600 Q F2 -.9(PA)2.5 G(RAMETERS).9 E F0(Ov)144 612 Q -.355 -(erride certain parameters used to create the HFS \214le system. Unlik) --.15 F .356(ely to be used in normal cir)-.1 F(-)-.2 E -(cumstances. See the libhfs_iso/h)144 624 Q -(ybrid.h source \214le for details.)-.05 E F1108 640.8 Q F0 -.16(Look for A)9.6 F .159(UFS CAP Macintosh \214les. Search for CAP App\ -le/Unix \214le formats only)-.55 F 2.659(.S)-.65 G .159(earching for) --2.659 F .34 -(the other possible Apple/Unix \214le formats is disabled, unless other) -144 652.8 R F2 .34(double dash)2.84 F F0 .34(options are gi)2.84 F -.15 -(ve)-.25 G(n.).15 E F1(\255\255netatalk)108 669.6 Q F0(Look for NET)144 -681.6 Q -1.21 -1.11(AT A)-.93 H(LK Macintosh \214les)1.11 E F1 -(\255\255double)108 698.4 Q F0(Look for AppleDouble Macintosh \214les) -144 710.4 Q -1.11(Ve)72 768 S(rsion 2.0)1.11 E(24 Dec 2002)162.9 E(12) -198.45 E EP +save +mark +12 pagesetup +10 R f +( \( 8 \))3 164( MKISOFS)1 3525(Maintenance Procedures)1 991 3 720 480 t +(space is taken from the space reserved for ISO-9660 version numbers.)10 2881 1 1440 960 t +( a con-)2 289( Although)1 445( work on many systems.)4 1005(This violates the ISO-9660 standard, but it happens to)8 2221 4 1440 1080 t +( with)1 213(forming application needs to provide a buffer space of at least 37 characters, disks created)14 3747 2 1440 1200 t +(this option may cause a buffer over\257ow in the reading operating system. Use with extreme care.)15 3954 1 1440 1320 t +10 S1 f +(\261 \261)1 65 1 1080 1488 t +10 B f +(M M)1 94 1 1145 1488 t +10 I f +(path)1272 1488 w +10 R f +(or)1440 1608 w +10 S1 f +(\261 \261)1 65 1 1080 1776 t +10 B f +(M M)1 94 1 1145 1776 t +10 I f +(device)1272 1776 w +10 R f +(or)1440 1896 w +10 S1 f +(\261 \261)1 65 1 1080 2064 t +10 B f +( v)1 0( ev)1 50(d de)1 100 3 1145 2064 t +10 I f +(device)1328 2064 w +10 R f +( existing ISO-9660 image to be merged. The alternate form takes a SCSI dev-)13 3275(Speci\256es path to)2 685 2 1440 2184 t +( the)1 175(ice speci\256er that uses the same syntax as)7 1825 2 1440 2304 t +10 B f +( =)1 0( v=)1 57( ev)1 50(d de)1 100 4 3493 2304 t +10 R f +(parameter of)1 534 1 3753 2304 t +10 B f +( .)1 0( d.)1 25( rd)1 56( or)1 44( re ec co)3 138( dr)1 44(c cd)1 100 7 4340 2304 t +10 R f +(The output of)2 600 1 4800 2304 t +10 B f +( s)1 0( fs)1 39( of)1 33( so)1 50( is)1 39( ki)1 28(m mk)1 139 7 1440 2424 t +10 R f +( get written to the end of the image speci\256ed in)10 2071(will be a new session which should)6 1518 2 1811 2424 t +10 S1 f +(\261)1440 2544 w +10 R f +( capability for the recorder and cdrom drive that you)9 2209( this requires multi-session)3 1117(M. Typically)1 569 3 1505 2544 t +( in conjunction with the)4 1026( option may only be used)5 1098( This)1 254(are attempting to write this image to.)6 1582 4 1440 2664 t +10 S1 f +(\261 \261)1 65 1 1440 2784 t +10 B f +(C C)1 72 1 1505 2784 t +10 R f +(option.)1610 2784 w +10 S1 f +(\261 \261)1 65 1 1080 2952 t +10 B f +(N N)1 72 1 1145 2952 t +10 R f +(Omit version numbers from ISO-9660 \256le names.)6 2038 1 1440 2952 t +( Use)1 227( uses the version numbers anyway.)5 1462(This violates the ISO-9660 standard, but no one really)8 2271 3 1440 3072 t +(with caution.)1 530 1 1440 3192 t +10 S1 f +(\261 \261)1 65 1 1080 3360 t +10 B f +( w)1 0( ew)1 72(n ne)1 100 3 1145 3360 t +10 S1 f +(\261 \261)1 65 1 1317 3360 t +10 B f +( r)1 0( ir)1 44(d di)1 84 3 1382 3360 t +10 S1 f +(\261 \261)1 65 1 1510 3360 t +10 B f +( e)1 0( de)1 44( od)1 56(m mo)1 133 4 1575 3360 t +10 I f +(mode)1841 3360 w +10 R f +( default mode is 0555.)4 923( The)1 221(Mode to use when creating new directories in the iso fs image.)11 2589 3 1440 3480 t +10 S1 f +(\261 \261)1 65 1 1080 3648 t +10 B f +( k)1 0( ak)1 56( ba)1 50( ob)1 56(n no)1 106 5 1145 3648 t +10 S1 f +(\261 \261)1 65 1 1080 3816 t +10 B f +( o)1 0(n no)1 106 2 1145 3816 t +10 S1 f +(\261 \261)1 65 1 1251 3816 t +10 B f +( k)1 0( ak)1 56(b ba)1 106 3 1316 3816 t +10 R f +( the)1 180( If)1 157( ISO-9660 \256lesystem.)2 941(Do not include backup \256les \256les on the)7 1787 4 1440 3936 t +10 S1 f +(\261 \261)1 65 1 4563 3936 t +10 B f +( o)1 0(n no)1 106 2 4628 3936 t +10 S1 f +(\261 \261)1 65 1 4734 3936 t +10 B f +( k)1 0( ak)1 56(b ba)1 106 3 4799 3936 t +10 R f +(option is)1 381 1 5019 3936 t +(speci\256ed, \256les that contain the characters ')6 1777 1 1440 4056 t +10 S1 f +(\304)3217 4056 w +10 R f +(' or ')2 225 1 3250 4056 t +10 S1 f +(#)3475 4056 w +10 R f +(' or end in '.bak' will not be included \(these)9 1875 1 3525 4056 t +(are typically backup \256les for editors under unix\).)7 2008 1 1440 4176 t +10 S1 f +(\261 \261)1 65 1 1080 4344 t +10 B f +( o)1 0(n no)1 106 2 1145 4344 t +10 S1 f +(\261 \261)1 65 1 1251 4344 t +10 B f +( t)1 0( it)1 33( mi)1 28(l li im)2 139 4 1316 4344 t +10 S1 f +(\261 \261)1 65 1 1516 4344 t +10 B f +( s)1 0( es)1 39( le)1 44( bl)1 28( ab)1 56( ta)1 50( ht)1 33( th)1 56( at)1 33(p pa)1 106 10 1581 4344 t +10 R f +( may con-)2 421( list)1 158( This)1 246(A ISO-9660 \256lesystem contains path tables that contain a list of directories.)11 3135 4 1440 4464 t +( When)1 362( 65535 of them may be parent directories.)7 2131(tain many directories but only)4 1467 3 1440 4584 t +10 S1 f +(\261 \261)1 65 1 1440 4704 t +10 B f +( o)1 0(n no)1 106 2 1505 4704 t +10 S1 f +(\261 \261)1 65 1 1611 4704 t +10 B f +( t)1 0( it)1 33( mi)1 28(l li im)2 139 4 1676 4704 t +10 S1 f +(\261 \261)1 65 1 1876 4704 t +10 B f +( s)1 0( es)1 39( le)1 44( bl)1 28( ab)1 56( ta)1 50( ht)1 33( th)1 56( at)1 33(p pa)1 106 10 1941 4704 t +10 R f +( use, further parent directories will be folded to the root directory)11 2787(is in)1 186 2 2427 4704 t +(and the resulting \256lesystem will no longer be usable on)9 2279 1 1440 4824 t +10 B f +( S)1 0( OS)1 56(D DO)1 150 3 3752 4824 t +10 R f +(.)3958 4824 w +10 S1 f +(\261 \261)1 65 1 1080 4992 t +10 B f +( rc ce e)3 88( or)1 44(f fo)1 83 3 1145 4992 t +10 S1 f +(\261 \261)1 65 1 1360 4992 t +10 B f +(r rr r)2 88 1 1425 4992 t +10 R f +( helps to)2 357( This)1 245( Ridge attributes recognition for previous sessions.)6 2083(Do not use the automatic Rock)5 1275 4 1440 5112 t +(show rotten ISO-9660 extension records as e.g. created by NERO burning ROM.)11 3327 1 1440 5232 t +10 S1 f +(\261 \261)1 65 1 1080 5400 t +10 B f +( o)1 0(n no)1 106 2 1145 5400 t +10 S1 f +(\261 \261)1 65 1 1251 5400 t +10 B f +(r rr r)2 88 1 1316 5400 t +10 R f +( may help to avoid getting)5 1127( This)1 252( from previous sessions.)3 1014(Do not use the Rock Ridge attributes)6 1567 4 1440 5400 t +(into trouble when)2 721 1 1440 5520 t +10 B f +( s)1 0( fs)1 39( of)1 33( so)1 50( is)1 39( ki)1 28(m mk)1 139 7 2194 5520 t +10 R f +(\256nds illegal Rock Ridge signatures on an old session.)8 2200 1 2555 5520 t +10 S1 f +(\261 \261)1 65 1 1080 5688 t +10 B f +( o)1 0(n no)1 106 2 1145 5688 t +10 S1 f +(\261 \261)1 65 1 1251 5688 t +10 B f +( t)1 0( li it)2 61( pl)1 28(s sp)1 95 4 1316 5688 t +10 S1 f +(\261 \261)1 65 1 1500 5688 t +10 B f +( nk k)2 56( li in)2 84( ml)1 28( ym)1 83(s sy)1 89 5 1565 5688 t +10 S1 f +(\261 \261)1 65 1 1905 5688 t +10 B f +( s)1 0( ts)1 39( nt)1 33( en)1 56( ne)1 44( on)1 56( po)1 50( mp)1 56( om)1 83(c co)1 94 10 1970 5688 t +10 R f +( new Continuation Area \(CE\) instead. This may)7 2077(Don't split the SL components, but begin a)7 1883 2 1440 5808 t +( reading split SL components)4 1212(waste some space, but the SunOS 4.1.4 cdrom driver has a bug in)12 2748 2 1440 5928 t +(\(link)1440 6048 w +10 S f +(_)1629 6048 w +10 R f +(size = component)2 721 1 1679 6048 t +10 S f +(_)2400 6048 w +10 R f +(size instead of link)3 776 1 2450 6048 t +10 S f +(_)3226 6048 w +10 R f +(size += component)2 777 1 3276 6048 t +10 S f +(_)4053 6048 w +10 R f +(size\).)4103 6048 w +( is questionable)2 686( It)1 151( been introduced by Eric Youngdale in 1997.)7 2021(Note that this option has)4 1102 4 1440 6288 t +( it has been introduced,)4 1001( When)1 315(whether it makes sense at all.)5 1265 3 1440 6408 t +10 B f +( s)1 0( fs)1 39( of)1 33( so)1 50( is)1 39( ki)1 28(m mk)1 139 7 4064 6408 t +10 R f +(did have a serious bug)4 965 1 4435 6408 t +( in)1 119( CE signature bug)3 764( This)1 251(that did create defective CE signatures if a symlink contained `/../'.)10 2826 4 1440 6528 t +10 B f +( s)1 0( fs)1 39( of)1 33( so)1 50( is)1 39( ki)1 28(m mk)1 139 7 1440 6648 t +10 R f +(has been \256xed in May 2003.)5 1172 1 1801 6648 t +10 S1 f +(\261 \261)1 65 1 1080 6816 t +10 B f +( o)1 0(n no)1 106 2 1145 6816 t +10 S1 f +(\261 \261)1 65 1 1251 6816 t +10 B f +( t)1 0( li it)2 61( pl)1 28(s sp)1 95 4 1316 6816 t +10 S1 f +(\261 \261)1 65 1 1500 6816 t +10 B f +( nk k)2 56( li in)2 84( ml)1 28( ym)1 83(s sy)1 89 5 1565 6816 t +10 S1 f +(\261 \261)1 65 1 1905 6816 t +10 B f +( s)1 0( ds)1 39( ld)1 56( el)1 28(\256 \256e)1 100 5 1970 6816 t +10 R f +( SL \256elds, but begin a new Continuation Area \(CE\) instead. This may waste)13 3338(Don't split the)2 622 2 1440 6936 t +( have a bug in reading split SL)7 1294(some space, but the SunOS 4.1.4 and Solaris 2.5.1 cdrom driver)10 2666 2 1440 7056 t +(\256elds \(a `/' can be dropped\).)5 1170 1 1440 7176 t +( 12)1 1838( change: 2010/04/25)2 832( Last)1 1536(Version 3.0)1 474 4 720 7680 t +cleartomark +showpage +restore +%%EndPage: 12 12 %%Page: 13 13 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF 355.5(MKISOFS\(8\) MKISOFS\(8\))72 48 R/F1 10 -/Times-Bold@0 SF(\255\255ethershar)108 84 Q(e)-.18 E F0 -(Look for Helios EtherShare Macintosh \214les)144 96 Q F1(\255\255ushar) -108 112.8 Q(e)-.18 E F0(Look for IPT UShare Macintosh \214les)144 124.8 -Q F1(\255\255exchange)108 141.6 Q F0 -(Look for PC Exchange Macintosh \214les)144 153.6 Q F1108 -170.4 Q F0(Look for SGI Macintosh \214les)12.93 E F1(\255\255xinet)108 -187.2 Q F0(Look for XINET Macintosh \214les)144 199.2 Q F1 -(\255\255macbin)108 216 Q F0(Look for MacBinary Macintosh \214les)144 -228 Q F1(\255\255single)108 244.8 Q F0 -(Look for AppleSingle Macintosh \214les)144 256.8 Q F1108 -273.6 Q -.1(ve)-.25 G F0(Look for Thursby Softw)144 285.6 Q -(are Systems D)-.1 E -1.35(AV)-.4 G 2.5(EM)1.35 G(acintosh \214les)-2.5 -E F1108 302.4 Q F0(Look for Microsoft')9.05 E 2.5(sS)-.55 G -(ervices for Macintosh \214les \(NT only\) \(Alpha\))-2.5 E F1 -(\255\255osx\255double)108 319.2 Q F0 -(Look for MacOS X AppleDouble Macintosh \214les)144 331.2 Q F1 -(\255\255osx\255hfs)108 348 Q F0(Look for MacOS X HFS Macintosh \214les) -144 360 Q/F2 10.95/Times-Bold@0 SF(CHARA)72 388.8 Q(CTER SETS)-.602 E F1 -(mkisofs)108 400.8 Q F0 1.262 -(processes \214le names in a POSIX compliant w)3.762 F 1.262 -(ay as strings of 8-bit characters.)-.1 F 2.861 -.8(To r)6.262 H 1.261 -(epresent all).8 F .803 -(codings for all languages, 8-bit characters are not suf)108 412.8 R -.803(\214cient. Unicode or)-.25 F F1(ISO-10646)3.303 E F0 .803 -(de\214ne character cod-)3.303 F 1.077 -(ings that need at least 21 bits to represent all kno)108 424.8 R 1.076 -(wn languages. The)-.25 F 3.576(ym)-.15 G 1.076(ay be represented with) --3.576 F F1(UTF-32)3.576 E F0(,)A F1(UTF-16)108 436.8 Q F0(or)3.715 E F1 -(UTF-8)3.715 E F0(coding.)3.715 E F1(UTF-32)6.215 E F0 1.216 -(uses a plain 32-bit coding b)3.715 F 1.216(ut seems to be uncommon.)-.2 -F F1(UTF-16)6.216 E F0(is)3.716 E 1.137(used by Microsoft with W)108 -448.8 R 1.137(in32 with the disadv)-.4 F 1.136 -(antage that it only supports a subset of all codes and that)-.25 F -(16-bit characters are not compliant with the POSIX \214lesystem interf) -108 460.8 Q(ace.)-.1 E .161(Modern UNIX operating systems may use)108 -477.6 R F1(UTF-8)2.661 E F0 .161 -(coding for \214lenames. This coding allo)2.661 F .162 -(ws to use the com-)-.25 F .143(plete Unicode code set.)108 489.6 R .143 -(Each 32-bit character is represented by one or more 8-bit characters.) -5.143 F .143(If a character)5.143 F .484(is coded in)108 501.6 R F1 -(ISO-8859-1)2.984 E F0 .484 -(\(used in Central Europe and North America\) is maps 1:1 to a)2.984 F -F1(UTF-32)2.985 E F0(or)2.985 E F1(UTF-16)2.985 E F0 .99 -(coded Unicode character)108 513.6 R 5.99(.I)-.55 G 3.49(fac)-5.99 G .99 -(haracter is coded in)-3.49 F F1 .989(7-Bit ASCII)3.489 F F0 .989 -(\(used in USA and other countries with)3.489 F 1.436 -(limted character set\) is maps 1:1 to a)108 525.6 R F1(UTF-32)3.936 E -F0(,)A F1(UTF-16)3.936 E F0(or)3.936 E F1(UTF-8)3.936 E F0 1.436 -(coded Unicode character)3.936 F 6.436(.C)-.55 G(haracter)-6.436 E 1.127 -(codes that cannot be represented as a single byte in UTF-8 \(typically\ - if the v)108 537.6 R 1.126(alue is > 0x7F\) use escape)-.25 F -(sequences that map to more than one 8-bit character)108 549.6 Q(.)-.55 -E 1.547(If all operating systems w)108 566.4 R 1.547(ould use)-.1 F F1 -(UTF-8)4.047 E F0(coding,)4.047 E F1(mkisofs)4.047 E F0 -.1(wo)4.048 G -1.548(uld not need to recode characters in \214le).1 F 3.398 -(names. Unfortunately)108 578.4 R 3.398(,A)-.65 G .897(pple uses comple\ -tely nonstandard codings and Microsoft uses a Unicode coding)-3.398 F -(that is not compatible with the POSIX \214lename interf)108 590.4 Q -(ace.)-.1 E -.15(Fo)108 607.2 S 3.143(ra).15 G .643(ll non)-3.143 F F1 -(UTF-8)3.143 E F0 .644(coded operating systems, the actual character th\ -at each byte represents depends on the)3.143 F/F3 10/Times-Italic@0 SF --.15(ch)108 619.2 S(ar).15 E .267(acter set)-.15 F F0(or)2.767 E F3 -(codepa)2.766 E -.1(ge)-.1 G F0 .266(\(which is the name used by Micros\ -oft\) used by the local operating system in use)2.866 F 2.5(-t)108 631.2 -S(he characters in a character set will re\215ect the re)-2.5 E -(gion or natural language used by the user)-.15 E(.)-.55 E .728(Usually\ - character codes 0x00-0x1f are control characters, codes 0x20-0x7f are \ -the 7 bit ASCII characters)108 648 R .569(and \(on PC')108 660 R 3.069 -(sa)-.55 G .569(nd Mac')-3.069 F .569(s\) 0x80-0xf)-.55 F 3.069(fa)-.25 -G .569(re used for other characters.)-3.069 F .569(Unfortunately e)5.569 -F -.15(ve)-.25 G 3.068(nt).15 G .568(his does not follo)-3.068 F(w)-.25 -E .98(ISO standards that reserv)108 672 R 3.48(et)-.15 G .981 -(he range 0x80-0x9f for control characters and only allo)-3.48 F 3.481 -(w0)-.25 G(xa0-0xf)-3.481 E 3.481(ff)-.25 G .981(or other)-3.481 F -(characters.)108 684 Q .139(As there is a lot more than 256 characters/\ -symbols in use, only a small subset are represented in a character)108 -700.8 R .653(set. Therefore the same character code may represent a dif) -108 712.8 R .653(ferent character in dif)-.25 F .653 -(ferent character sets. So a)-.25 F .417(\214le name generated, say in \ -central Europe, may not display the same character when vie)108 724.8 R -.416(wed on a machine)-.25 F -1.11(Ve)72 768 S(rsion 2.0)1.11 E -(24 Dec 2002)162.9 E(13)198.45 E EP +save +mark +13 pagesetup +10 R f +( \( 8 \))3 164( MKISOFS)1 3525(Maintenance Procedures)1 991 3 720 480 t +( is questionable)2 686( It)1 151( been introduced by Eric Youngdale in 1997.)7 2021(Note that this option has)4 1102 4 1440 960 t +( it has been introduced,)4 1001( When)1 315(whether it makes sense at all.)5 1265 3 1440 1080 t +10 B f +( s)1 0( fs)1 39( of)1 33( so)1 50( is)1 39( ki)1 28(m mk)1 139 7 4064 1080 t +10 R f +(did have a serious bug)4 965 1 4435 1080 t +( in)1 119( CE signature bug)3 764( This)1 251(that did create defective CE signatures if a symlink contained `/../'.)10 2826 4 1440 1200 t +10 B f +( s)1 0( fs)1 39( of)1 33( so)1 50( is)1 39( ki)1 28(m mk)1 139 7 1440 1320 t +10 R f +(has been \256xed in May 2003.)5 1172 1 1801 1320 t +10 S1 f +(\261 \261)1 65 1 1080 1488 t +10 B f +(o o)1 50 1 1145 1488 t +10 I f +(\256lename)1228 1488 w +10 R f +( can be)2 306( This)1 248( the ISO-9660 \256lesystem image should be written.)7 2094(is the name of the \256le to which)7 1312 4 1440 1608 t +( can correspond directly to the device name of the optical disc)11 2695(a disk \256le, a tape drive, or it)7 1265 2 1440 1728 t +( can also be a block special device)7 1455( that the output)3 636( Note)1 263( not speci\256ed, stdout is used.)5 1208(writer. If)1 398 5 1440 1848 t +( disk partition can be mounted and examined to)8 2098(for a regular disk drive, in which case the)8 1862 2 1440 1968 t +(ensure that the premastering was done correctly.)6 1979 1 1440 2088 t +10 S1 f +(\261 \261)1 65 1 1080 2256 t +10 B f +( d)1 0( ad)1 56(p pa)1 106 3 1145 2256 t +10 R f +( the option)2 454( If)1 137(Pad the end of the whole image by 150 sectors \(300 kB\).)11 2401 3 1440 2256 t +10 S1 f +(\261 \261)1 65 1 4470 2256 t +10 B f +(B B)1 67 1 4535 2256 t +10 R f +(is used, then there)3 760 1 4640 2256 t +( padding at the end of the ISO-9660 partition and before the beginning of the boot parti-)16 3805(is a)1 155 2 1440 2376 t +( to make the \256rst boot partition start on a sector)10 2153( size of this padding is chosen)6 1349(tions. The)1 458 3 1440 2496 t +(number that is a multiple of 16.)6 1306 1 1440 2616 t +(The padding is needed as many operating systems \(e.g. Linux\) implement read ahead bugs in)14 3960 1 1440 2856 t +( I/O. These bugs result in read errors on one or more \256les that are located at the)17 3335(their \256lesystem)1 625 2 1440 2976 t +( the CD is written in Track at Once mode or)10 1978(end of a track. They are usually present when)8 1982 2 1440 3096 t +(when the disk is written as mixed mode CD where an audio track follows the data track.)16 3647 1 1440 3216 t +(To avoid problems with I/O error on the last \256le on the \256lesystem, the)13 2993 1 1440 3456 t +10 S1 f +(\261 \261)1 65 1 4473 3456 t +10 B f +( d)1 0( ad)1 56(p pa)1 106 3 4538 3456 t +10 R f +(option has been)2 659 1 4741 3456 t +(made the default.)2 706 1 1440 3576 t +10 S1 f +(\261 \261)1 65 1 1080 3744 t +10 B f +( o)1 0(n no)1 106 2 1145 3744 t +10 S1 f +(\261 \261)1 65 1 1251 3744 t +10 B f +( d)1 0( ad)1 56(p pa)1 106 3 1316 3744 t +10 R f +( do not make the the boot partitions start on a)10 1930(Do not Pad the end by 150 sectors \(300 kB\) and)10 2030 2 1440 3864 t +(multiple of 16 sectors.)3 918 1 1440 3984 t +10 S1 f +(\261 \261)1 65 1 1080 4152 t +10 B f +( h)1 0( th)1 56( at)1 33(p pa)1 106 4 1145 4152 t +10 S1 f +(\261 \261)1 65 1 1340 4152 t +10 B f +( t)1 0( st)1 33(l li is)2 95 3 1405 4152 t +10 I f +(\256le)1566 4152 w +10 R f +(A \256le containing a list of)5 1132 1 1440 4272 t +10 I f +(pathspec)2624 4272 w +10 R f +( ISO-9660)1 447(directories and \256lenames to be added to the)7 1922 2 3031 4272 t +(\256lesystem. This list of pathspecs are processed after any that appear on the command line. If)15 3960 1 1440 4392 t +(the argument is)2 632 1 1440 4512 t +10 S1 f +(\261)2105 4512 w +10 R f +(, then the list is read from the standard input.)9 1862 1 2178 4512 t +10 S1 f +(\261 \261)1 65 1 1080 4680 t +10 B f +(P P)1 61 1 1145 4680 t +10 R f +(Outdated option reserved by POSIX.1-2001, use)5 2094 1 1440 4680 t +10 S1 f +(\261 \261)1 65 1 3590 4680 t +10 B f +( er r)2 44( he)1 44( sh)1 56( li is)2 67(p pu ub bl)3 196 5 3655 4680 t +10 R f +( option will get)3 705(instead. This)1 576 2 4119 4680 t +(POSIX.1-2001 semantics with mkisofs-2.02.)3 1818 1 1440 4800 t +10 S1 f +(\261 \261)1 65 1 1080 4968 t +10 B f +( er r)2 44( he)1 44( sh)1 56( li is)2 67(p pu ub bl)3 196 5 1145 4968 t +10 I f +(publisher)1585 4968 w +10 S f +(_)1963 4968 w +10 I f +(id)2013 4968 w +10 R f +( should describe the)3 862( This)1 258(Speci\256es a text string that will be written into the volume header.)11 2840 3 1440 5088 t +( is space on)3 487( There)1 298( phone number.)2 640(publisher of the CDROM, usually with a mailing address and)9 2535 4 1440 5208 t +( is limited to 64 characters.)5 1157( related Joliet entry)3 810( The)1 227(the disc for 128 characters of information.)6 1766 4 1440 5328 t +( set in the \256le)4 591(This parameter can also be)4 1125 2 1440 5448 t +10 B f +( rc c)2 44( sr)1 44( fs)1 39( of)1 33( so)1 50( is)1 39( ki)1 28( mk)1 56(. .m)1 108 9 3194 5448 t +10 R f +( speci\256ed in both places,)4 1037( If)1 137(with PUBL=.)1 553 3 3673 5448 t +(the command line version is used.)5 1400 1 1440 5568 t +10 S1 f +(\261 \261)1 65 1 1080 5736 t +10 B f +(p p)1 56 1 1145 5736 t +10 I f +(preparer)1234 5736 w +10 S f +(_)1589 5736 w +10 I f +(id)1639 5736 w +10 R f +( should describe the)3 862( This)1 258(Speci\256es a text string that will be written into the volume header.)11 2840 3 1440 5856 t +( is space on)3 496( There)1 301( a mailing address and phone number.)6 1583(preparer of the CDROM, usually with)5 1580 4 1440 5976 t +( is limited to 64 characters.)5 1157( related Joliet entry)3 810( The)1 227(the disc for 128 characters of information.)6 1766 4 1440 6096 t +( set in the \256le)4 595(This parameter can also be)4 1129 2 1440 6216 t +10 B f +( rc c)2 44( sr)1 44( fs)1 39( of)1 33( so)1 50( is)1 39( ki)1 28( mk)1 56(. .m)1 108 9 3203 6216 t +10 R f +( speci\256ed in both places,)4 1041( If)1 138(with PREP=.)1 538 3 3683 6216 t +(the command line version is used.)5 1400 1 1440 6336 t +10 S1 f +(\261 \261)1 65 1 1080 6504 t +10 B f +( x)1 0( ix)1 50( si)1 28( os)1 39(p po)1 106 5 1145 6504 t +10 S1 f +(\261 \261)1 65 1 1368 6504 t +10 B f +(H H)1 78 1 1433 6504 t +10 R f +(Follow all symbolic links encountered on command line when generating the \256lesystem.)11 3630 1 1440 6624 t +10 S1 f +(\261 \261)1 65 1 1080 6792 t +10 B f +( x)1 0( ix)1 50( si)1 28( os)1 39(p po)1 106 5 1145 6792 t +10 S1 f +(\261 \261)1 65 1 1368 6792 t +10 B f +(L L)1 67 1 1433 6792 t +10 R f +( this option is not in use, sym-)7 1277( When)1 306( generating the \256lesystem.)3 1079(Follow all symbolic links when)4 1298 4 1440 6912 t +(bolic links will be entered using Rock Ridge if enabled, otherwise the \256le will be ignored.)15 3714 1 1440 7032 t +10 S1 f +(\261 \261)1 65 1 1080 7200 t +10 B f +( x)1 0( ix)1 50( si)1 28( os)1 39(p po)1 106 5 1145 7200 t +10 S1 f +(\261 \261)1 65 1 1368 7200 t +10 B f +(P P)1 61 1 1433 7200 t +10 R f +( 13)1 1838( change: 2010/04/25)2 832( Last)1 1536(Version 3.0)1 474 4 720 7680 t +cleartomark +showpage +restore +%%EndPage: 13 13 %%Page: 14 14 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF 355.5(MKISOFS\(8\) MKISOFS\(8\))72 48 R -(in, say eastern Europe.)108 84 Q 1.658 -.8(To m)108 100.8 T(ak).8 E -2.558(em)-.1 G .058(atters more complicated, dif)-2.558 F .059 -(ferent operating systems use dif)-.25 F .059 -(ferent character sets for the re)-.25 F .059(gion or)-.15 F .346 -(language. F)108 112.8 R .346(or e)-.15 F .346(xample the character cod\ -e for "small e with acute accent" may be character code 0x82 on a)-.15 F -.316(PC, code 0x8e on a Macintosh and code 0x)108 124.8 R .317 -(e9 on a UNIX system.)-.15 F .317 -(Note while the codings used on a PC or)5.317 F .564(Mac are nonstandar\ -d, Unicode codes this character as 0x00000000e9 which is basically the \ -same v)108 136.8 R .564(alue as)-.25 F(the v)108 148.8 Q -(alue used by most UNIX systems.)-.25 E .24(As long as not all operatin\ -g systems and applications will use the Unicode character set as the ba\ -sis for \214le)108 165.6 R .101(names in a unique w)108 177.6 R(ay)-.1 E -2.601(,i)-.65 G 2.601(tm)-2.601 G .1(ay be necessary to specify which c\ -haracter set your \214le names use in and which)-2.601 F -(character set the \214le names should appear on the CD.)108 189.6 Q -(There are four options to specify the character sets you w)108 206.4 Q -(ant to use:)-.1 E(\255input-charset)108 223.2 Q .249 -(De\214nes the local character set you are using on your host machine.) -144 235.2 R(An)5.25 E 2.75(yc)-.15 G .25(haracter set con)-2.75 F -.15 -(ve)-.4 G(rsions).15 E .665(that tak)144 247.2 R 3.165(ep)-.1 G .664 -(lace will use this character set as the staring point. The def)-3.165 F -.664(ault input character sets are)-.1 F/F1 10/Times-Italic@0 SF(cp437) -144 259.2 Q F0(on DOS based systems and)2.5 E F1(iso8859-1)2.5 E F0 -(on all other systems.)2.5 E .069(If the)144 283.2 R F12.569 E F0 -.069(option is gi)2.569 F -.15(ve)-.25 G .069(n, then the Unicode equi) -.15 F -.25(va)-.25 G .07 -(lents of the input character set will be used in the).25 F 2.42 -(Joliet directory)144 295.2 R 4.92(.U)-.65 G 2.42(sing the)-4.92 F F1 -(\255jc)4.92 E(har)-.15 E(set)-.1 E F0 2.419 -(option is the same as using the)4.919 F F1(\255input-c)4.919 E(har)-.15 -E(set)-.1 E F0(and)4.919 E F14.919 E F0(options.)144 307.2 Q -(\255output-charset)108 324 Q .543(De\214nes the character set that wil\ -l be used with for the Rock Ridge names on the CD. Def)144 336 R .543 -(aults to)-.1 F .182(the input character set. Only lik)144 348 R .182 -(ely to be useful if used on a non-Unix platform. e.g. using)-.1 F/F2 10 -/Times-Bold@0 SF(mkisofs)2.681 E F0 1.131(on a Microsoft W)144 360 R -1.131(in32 machine to create Rock Ridge CDs. If you are using)-.4 F F2 -(mkisofs)3.631 E F0 1.132(on a Unix)3.632 F(machine, it is lik)144 372 Q -(ely that the output character set will be the same as the input charac\ -ter set.)-.1 E(\255input-hfs-charset)108 388.8 Q 3.079(De\214nes the HF\ -S character set used for HFS \214le names decoded from an)144 400.8 R -5.579(yo)-.15 G 5.579(ft)-5.579 G 3.079(he v)-5.579 F(arious)-.25 E .607 -(Apple/Unix \214le formats. Only useful when used with)144 412.8 R F1 -(\255mac-name)3.108 E F0 .608(option. See the)3.108 F F2 .608(HFS MA) -3.108 F(CIN-)-.55 E -.18(TO)144 424.8 S(SH FILE N).18 E(AMES)-.2 E F0 -(for more information. Def)2.5 E(aults to)-.1 E F1(cp10000)2.5 E F0 -(\(Mac Roman\).)2.5 E(\255output-hfs-charset)108 441.6 Q .199(De\214nes\ - the HFS character set used to create HFS \214le names from the input c\ -haracter set in use. In)144 453.6 R .194 -(most cases this will be from the character set gi)144 465.6 R -.15(ve) --.25 G 2.694(nw).15 G .194(ith the)-2.694 F F1(\255input-c)2.694 E(har) --.15 E(set)-.1 E F0 .194(option. Def)2.694 F .194(aults to the)-.1 F -(input HFS character set.)144 477.6 Q .178 -(There are a number of character sets b)108 494.4 R .177(uilt in to)-.2 -F F1(mkisofs)2.677 E F0 5.177(.T).27 G 2.677(og)-5.977 G .177 -(et a listing, use)-2.677 F F2 .177(mkisofs \255input-charset help.) -2.677 F F0 .584 -(Additional character sets can be read from \214le for an)108 511.2 R -3.085(yo)-.15 G 3.085(ft)-3.085 G .585(he character set options by gi) --3.085 F .585(ving a \214lename as)-.25 F .52(the ar)108 523.2 R .519 -(gument to the options. The gi)-.18 F -.15(ve)-.25 G 3.019<6e8c>.15 G -.519(le will only be read if its name does not match one of the b)-3.019 -F .519(uilt in)-.2 F(character sets.)108 535.2 Q 2.159(The format of th\ -e character set \214les is the same as the mapping \214les a)108 552 R --.25(va)-.2 G 2.16(ilable from http://www).25 F(.uni-)-.65 E(code.or)108 -564 Q(g/Public/MAPPINGS The format of these \214les is:)-.18 E -(Column #1 is the input byte code \(in he)144 588 Q 2.5(xa)-.15 G 2.5 -(s0)-2.5 G(xXX\))-2.5 E(Column #2 is the Unicode \(in he)144 600 Q 2.5 -(xa)-.15 G 2.5(s0)-2.5 G(xXXXX\))-2.5 E(Rest of the line is ignored.)144 -612 Q(An)108 636 Q 3.273(yb)-.15 G .773(lank line, line without tw) --3.273 F 3.273(o\()-.1 G .773(or more\) columns in the abo)-3.273 F -1.073 -.15(ve f)-.15 H .773(ormat or comments lines \(starting with).15 -F .242(the # character\) are ignored without an)108 648 R 2.742(yw)-.15 -G .242(arnings. An)-2.842 F 2.743(ym)-.15 G .243 -(issing input code is mapped to Unicode character)-2.743 F(0x0000.)108 -660 Q .04(Note that there is no support for 16 bit UNICODE \(UTF-16\) o\ -r 32 bit UNICODE \(UTF-32\) coding because)108 676.8 R .457(this coding\ - is not POSIX compliant. There should be support for UTF-8 UNICODE codi\ -ng which is com-)108 688.8 R(patible to POSIX \214lenames and supported\ - by moder UNIX implementations such as Solaris.)108 700.8 Q 3.654(A1)108 -717.6 S 1.154(:1 character set mapping can be de\214ned by using the k) --3.654 F -.15(ey)-.1 G -.1(wo).15 G(rd).1 E F1(default)3.654 E F0 1.153 -(as the ar)3.654 F 1.153(gument to an)-.18 F 3.653(yo)-.15 G 3.653(ft) --3.653 G(he)-3.653 E(character set options. This is the beha)108 729.6 Q -(viour of older \(v1.12\) v)-.2 E(ersions of)-.15 E F2(mkisofs)2.5 E F0 -(.)A -1.11(Ve)72 768 S(rsion 2.0)1.11 E(24 Dec 2002)162.9 E(14)198.45 E -EP +save +mark +14 pagesetup +10 R f +( \( 8 \))3 164( MKISOFS)1 3525(Maintenance Procedures)1 991 3 720 480 t +( If)1 136( default\).)1 372(Do not follow symbolic links when generating the \256lesystem \(this is the)11 3001 3 1440 960 t +10 S1 f +(\261 \261)1 65 1 4986 960 t +10 B f +( x)1 0( ix)1 50( si)1 28( os)1 39(p po)1 106 5 5051 960 t +10 S1 f +(\261 \261)1 65 1 5274 960 t +10 B f +(P P)1 61 1 5339 960 t +10 R f +(is speci\256ed after)2 670 1 1440 1080 t +10 S1 f +(\261 \261)1 65 1 2143 1080 t +10 B f +( x)1 0( ix)1 50( si)1 28( os)1 39(p po)1 106 5 2208 1080 t +10 S1 f +(\261 \261)1 65 1 2431 1080 t +10 B f +(H H)1 78 1 2496 1080 t +10 R f +(or)2607 1080 w +10 S1 f +(\261 \261)1 65 1 2723 1080 t +10 B f +( x)1 0( ix)1 50( si)1 28( os)1 39(p po)1 106 5 2788 1080 t +10 S1 f +(\261 \261)1 65 1 3011 1080 t +10 B f +(L L)1 67 1 3076 1080 t +10 R f +(, the effect of these options will be reset.)8 1683 1 3143 1080 t +10 S1 f +(\261 \261)1 65 1 1080 1248 t +10 B f +( t)1 0( nt)1 33( in)1 56( ri)1 28(p pr)1 100 5 1145 1248 t +10 S1 f +(\261 \261)1 65 1 1362 1248 t +10 B f +( ze e)2 44( iz)1 44(s si)1 67 3 1427 1248 t +10 R f +( This option)2 508(Print estimated \256lesystem size in multiples of the sector size \(2048 bytes\) and exit.)13 3452 2 1440 1368 t +(is needed for Disk At Once mode and with some CD-R drives when piping directly into)15 3960 1 1440 1488 t +10 B f +( .)1 0( d.)1 25( rd)1 56( or)1 44( re ec co)3 138( dr)1 44(c cd)1 100 7 1440 1608 t +10 R f +( know the size of the \256lesystem before the actual CD-)10 2356(In this case it is needed to)6 1152 2 1892 1608 t +( option)1 290( The)1 222(creation is done.)2 675 3 1440 1728 t +10 S1 f +(\261)2661 1728 w +10 R f +(print)2726 1728 w +10 S1 f +(\261)2915 1728 w +10 R f +(size allows to get this size from a)7 1392 1 2980 1728 t +10 S1 f +(")4405 1728 w +10 R f +(dry-run)4446 1728 w +10 S1 f +(")4745 1728 w +10 R f +(before the CD)2 581 1 4819 1728 t +( versions of)2 498( Old)1 224(is actually written.)2 773 3 1440 1848 t +10 B f +( s)1 0( fs)1 39( of)1 33( so)1 50( is)1 39( ki)1 28(m mk)1 139 7 2976 1848 t +10 R f +(did write this information \(among other informa-)6 2055 1 3345 1848 t +(tion\) to)1 302 1 1440 1968 t +10 I f +(stderr)1777 1968 w +10 R f +( parse, the number without any other information)7 2027( this turns out to be hard to)7 1145(. As)1 204 3 2024 1968 t +( printed on)2 475(is now)1 284 2 1440 2088 t +10 B f +( t)1 0( ut)1 33( ou)1 56( do)1 50( td)1 56(s st)1 72 6 2245 2088 t +10 R f +( you like to write a simple shell script, redirect)9 2048(too. If)1 298 2 2558 2088 t +10 B f +( er rr r)3 88( de)1 44( td)1 56(s st)1 72 4 4950 2088 t +10 R f +(and)5256 2088 w +(catch the number from)3 930 1 1440 2208 t +10 B f +( t)1 0( ut)1 33( ou)1 56( do)1 50( td)1 56(s st)1 72 6 2403 2208 t +10 R f +( may be done with:)4 798(. This)1 269 2 2670 2208 t +10 B f +( s)1 0( fs)1 39( of)1 33( so)1 50( is)1 39( ki)1 28( mk)1 56( m)1 116( `)1 0( =`)1 33( s=)1 57( ks)1 39( ck)1 56( oc)1 44( lo)1 50( db bl)2 84(c cd)1 100 17 1440 2448 t +10 S1 f +(\261 \261)1 65 1 2297 2448 t +10 B f +( t)1 0( nt)1 33( in)1 56( ri)1 28(p pr)1 100 5 2362 2448 t +10 S1 f +(\261 \261)1 65 1 2579 2448 t +10 B f +( ze e)2 44( iz)1 44(s si)1 67 3 2644 2448 t +10 S1 f +(\261 \261)1 65 1 2832 2448 t +10 B f +( `)1 0( `)1 66( .)1 0( .)1 41( .)1 0( .)1 41( .)1 0( .)1 58( t)1 0( et)1 33( ie)1 44(q qu ui)2 140 12 2897 2448 t +( .)1 0( .)1 41( .)1 0( .)1 41( .)1 0( .)1 58( s)1 0( fs)1 39( of)1 33( so)1 50( is)1 39( ki)1 28(m mk)1 139 13 1440 2688 t +10 S f +(\372 \372)1 50 1 1941 2688 t +10 B f +( $)1 0( =$)1 50( ze e=)2 101( iz)1 44( si)1 28( ts)1 39( t)1 66( .)1 0( .)1 41( .)1 0( .)1 41( .)1 0( .)1 58( d)1 0( rd)1 56( or)1 44( re ec co)3 138( dr)1 44(c cd)1 100 19 2024 2688 t +10 S f +({ {)1 48 1 2874 2688 t +10 B f +( s)1 0( ks)1 39( ck)1 56( oc)1 44( lo)1 50( db bl)2 84(c cd)1 100 7 2922 2688 t +10 S f +(} })1 48 1 3295 2688 t +10 B f +( -)1 0( -)1 66(s s)1 39 3 3343 2688 t +10 S1 f +(\261 \261)1 65 1 1080 2856 t +10 B f +( t)1 0( et)1 33( ie)1 44(q qu ui)2 140 4 1145 2856 t +10 R f +(This makes)1 466 1 1440 2856 t +10 B f +( s)1 0( fs)1 39( of)1 33( so)1 50( is)1 39( ki)1 28(m mk)1 139 7 1939 2856 t +10 R f +( progress output will be provided.)5 1389( No)1 188(even less verbose.)2 739 3 2300 2856 t +10 S1 f +(\261 \261)1 65 1 1080 3024 t +10 B f +(R R)1 72 1 1145 3024 t +10 R f +( RR records using the Rock Ridge protocol to further describe the \256les on)13 3139(Generate SUSP and)2 821 2 1440 3024 t +( Rock Ridge protocol is needed in order to add POSIX like \256le)12 2701( The)1 229( \256lesystem.)1 472(the ISO-9660)1 558 4 1440 3144 t +( link counts, inode numbers)4 1176(meta data like permissions, extended time stamps, user/group is'd,)8 2784 2 1440 3264 t +(and symbolic links. The Rock Ridge protocol allows to archive hierarchy trees with unlimited)13 3960 1 1440 3384 t +(depth.)1440 3504 w +10 S1 f +(\261 \261)1 65 1 1080 3672 t +10 B f +(r r)1 44 1 1145 3672 t +10 R f +(This is like the)3 616 1 1440 3672 t +10 S1 f +(\261)2089 3672 w +10 R f +( uid)1 162( The)1 222( useful values.)2 592(R option, but \256le ownership and modes are set to more)10 2270 4 2154 3672 t +( usually only useful on the author's system, and not)9 2222(and gid are set to zero, because they are)8 1738 2 1440 3792 t +( true, so that \256les and directories are globally)8 1920( the \256le read bits are set)6 1032( All)1 200(useful to the client.)3 808 4 1440 3912 t +( bits, so that exe-)4 712( any execute bit is set for a \256le, set all of the execute)13 2207( If)1 133(readable on the client.)3 908 4 1440 4032 t +( set all of)3 408( any search bit is set for a directory,)8 1523( If)1 136(cutables are globally executable on the client.)6 1893 4 1440 4152 t +( write bits are)3 627( All)1 213( directories are globally searchable on the client.)7 2123(the search bits, so that)4 997 4 1440 4272 t +( any of the special)4 818( If)1 147( the CD-Rom will be mounted read-only in any case.)9 2321(cleared, because)1 674 4 1440 4392 t +( locks are not useful on a read-only \256le system, and)10 2195(mode bits are set, clear them, because \256le)7 1765 2 1440 4512 t +( is set on)3 392( used on Win32, the execute bit)6 1334( When)1 308(set-id bits are not desirable for uid 0 or gid 0.)10 1926 4 1440 4632 t +10 I f +(all)1440 4752 w +10 R f +( Win32 and the Cygwin POSIX emu-)6 1559(\256les. This is a result of the lack of \256le permissions on)11 2259 2 1582 4752 t +( also)1 194( See)1 210(lation layer.)1 485 3 1440 4872 t +10 S1 f +(\261)2362 4872 w +10 R f +(uid)2427 4872 w +10 S1 f +(\261)2588 4872 w +10 R f +(gid,)2653 4872 w +10 S1 f +(\261)2839 4872 w +10 R f +(dir)2904 4872 w +10 S1 f +(\261)3015 4872 w +10 R f +(mode,)3080 4872 w +10 S1 f +(\261)3360 4872 w +10 R f +(\256le)3425 4872 w +10 S1 f +(\261)3553 4872 w +10 R f +(mode and)1 399 1 3618 4872 t +10 S1 f +(\261)4050 4872 w +10 R f +(new)4115 4872 w +10 S1 f +(\261)4281 4872 w +10 R f +(dir)4346 4872 w +10 S1 f +(\261)4457 4872 w +10 R f +(mode.)4522 4872 w +10 S1 f +(\261 \261)1 65 1 1080 5040 t +10 B f +( d)1 0( ed)1 56( ax xe)2 94( la)1 50(r re el)2 116 5 1145 5040 t +10 S1 f +(\261 \261)1 65 1 1461 5040 t +10 B f +( s)1 0( es)1 39( me)1 44( am)1 83( na)1 50( en)1 56( le)1 44(\256 \256l)1 84 8 1526 5040 t +10 R f +(The option)1 451 1 1440 5160 t +10 S1 f +(\261 \261)1 65 1 1931 5160 t +10 B f +( d)1 0( ed)1 56( ax xe)2 94( la)1 50(r re el)2 116 5 1996 5160 t +10 S1 f +(\261 \261)1 65 1 2312 5160 t +10 B f +( s)1 0( es)1 39( me)1 44( am)1 83( na)1 50( en)1 56( le)1 44(\256 \256l)1 84 8 2377 5160 t +10 R f +( upper case char-)3 725(allows ISO-9660 \256lenames to include digits,)5 1858 2 2817 5160 t +(acters and all other 7 bit ASCII characters \(resp. anything except lowercase characters\).)12 3590 1 1440 5280 t +( with cau-)2 429( Use)1 228( standard, but it happens to work on many systems.)9 2181(This violates the ISO-9660)3 1122 4 1440 5400 t +(tion.)1440 5520 w +10 S1 f +(\261 \261)1 65 1 1080 5688 t +10 B f +( t)1 0( oo ot)2 83(r ro)1 94 3 1145 5688 t +10 I f +(dir)1355 5688 w +10 R f +(Moves all \256les and directories into)5 1490 1 1440 5808 t +10 I f +(dir)2976 5808 w +10 R f +( the same as using)4 815(in the image. This is essentially)5 1366 2 3139 5808 t +10 B f +(- -)1 33 1 5367 5808 t +( s)1 0( ts)1 39( nt)1 33( in)1 56( oi)1 28( po)1 50( ft t- -p)3 122( af)1 33( ra)1 50(g gr)1 94 10 1440 5928 t +10 R f +(and adding)1 449 1 1978 5928 t +10 I f +(dir)2460 5928 w +10 R f +(in front of every pathspec, but is easier to use.)9 1910 1 2610 5928 t +10 I f +(dir)1440 6168 w +10 R f +( as other graft)3 602(may actually be several levels deep. It is created with the same permissions)12 3200 2 1598 6168 t +(points.)1440 6288 w +10 S1 f +(\261 \261)1 65 1 1080 6456 t +10 B f +( 11 10 0)3 100( p1)1 50( ip)1 56(r rr ri)2 116 4 1145 6456 t +10 R f +( standard from 1993.)3 874(Create ISO-9660 \256le system images that follow the old Rrip Version-1.10)10 3086 2 1440 6576 t +( be needed if you know of systems that do not implement the Rrip protocol)14 3264(This option may)2 696 2 1440 6696 t +( system is)2 437( no such)2 373( Currently)1 461(correctly and like the \256le system to be read by such a system.)12 2689 4 1440 6816 t +(known.)1440 6936 w +( system has been created with)5 1239(If a \256le)2 306 2 1440 7176 t +10 S1 f +(\261 \261)1 65 1 3020 7176 t +10 B f +( 11 10 0)3 100( p1)1 50( ip)1 56(r rr ri)2 116 4 3085 7176 t +10 R f +(, the Rock Ridge attributes do not include inode)8 1993 1 3407 7176 t +(number information.)1 835 1 1440 7296 t +( 14)1 1838( change: 2010/04/25)2 832( Last)1 1536(Version 3.0)1 474 4 720 7776 t +cleartomark +showpage +restore +%%EndPage: 14 14 %%Page: 15 15 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF 355.5(MKISOFS\(8\) MKISOFS\(8\))72 48 R .39(The\ - ISO9660 \214le names generated from the input \214lenames are not con) -108 84 R -.15(ve)-.4 G .391(rted from the input character set.).15 F -1.029(The ISO9660 character set is a v)108 96 R 1.028 -(ery limited subset of the ASCII characters, so an)-.15 F 3.528(yc)-.15 -G(on)-3.528 E -.15(ve)-.4 G 1.028(rsion w).15 F 1.028(ould be)-.1 F -(pointless.)108 108 Q(An)108 124.8 Q 2.5(yc)-.15 G(haracter that)-2.5 E -/F1 10/Times-Bold@0 SF(mkisofs)2.5 E F0(can not con)2.5 E -.15(ve)-.4 G -(rt will be replaced with a '_' character).15 E(.)-.55 E/F2 10.95 -/Times-Bold@0 SF(HFS CREA)72 146.4 Q -.197(TO)-1.04 G(R/TYPE).197 E F0 -3.173(AM)108 158.4 S .673(acintosh \214le has tw)-3.173 F 3.173(op)-.1 G -.673(roperties associated with it which de\214ne which application crea\ -ted the \214le, the)-3.173 F/F3 10/Times-Italic@0 SF(CREA)108 170.4 Q --.18(TO)-.37 G(R).18 E F0 .019(and what data the \214le contains, the) -2.519 F F3(TYPE)2.518 E F0 5.018(.B).73 G .018(oth are \(e)-5.018 F .018 -(xactly\) 4 letter strings. Usually this allo)-.15 F(ws)-.25 E 2.567(aM) -108 182.4 S .067(acintosh user to double-click on a \214le and launch t\ -he correct application etc. The CREA)-2.567 F -.18(TO)-1.11 G 2.567(Ra) -.18 G .068(nd TYPE)-2.567 F -(of a particular \214le can be found by using something lik)108 194.4 Q -2.5(eR)-.1 G(esEdit \(or similar\) on a Macintosh.)-2.5 E .059(The CREA) -108 211.2 R -.18(TO)-1.11 G 2.559(Ra).18 G .059 -(nd TYPE information is stored in all the v)-2.559 F .059 -(arious Apple/Unix encoded \214les.)-.25 F -.15(Fo)5.058 G 2.558(ro).15 -G .058(ther \214les)-2.558 F .214(it is possible to base the CREA)108 -223.2 R -.18(TO)-1.11 G 2.714(Ra).18 G .214(nd TYPE on the \214lename') --2.714 F 2.715(se)-.55 G .215(xtension using a)-2.865 F F3(mapping)2.715 -E F0 .215(\214le \(the)2.715 F F1(\255map)2.715 E F0 1.257 -(option\) and/or using the)108 235.2 R F3(ma)3.757 E 1.257(gic number) --.1 F F0 1.257(\(usually a)3.757 F F3(signatur)3.757 E(e)-.37 E F0 1.257 -(in the \214rst fe)3.757 F 3.756(wb)-.25 G 1.256 -(ytes\) of a \214le \(the)-3.756 F F1(\255magic)3.756 E F0 1.1 -(option\). If both these options are gi)108 247.2 R -.15(ve)-.25 G 1.1 -(n, then their order on the command line is important. If the).15 F F1 -(\255map)3.6 E F0 .316(option is gi)108 259.2 R -.15(ve)-.25 G 2.816 -<6e8c>.15 G .316(rst, then a \214lename e)-2.816 F .315 -(xtension match is attempted before a magic number match. Ho)-.15 F(we) --.25 E -.15(ve)-.25 G -.4(r,).15 G 1.059(if the)108 271.2 R F1 -(\255magic)3.559 E F0 1.059(option is gi)3.559 F -.15(ve)-.25 G 3.559 -<6e8c>.15 G 1.06 -(rst, then a magic number match is attempted before a \214lename e) --3.559 F(xtension)-.15 E(match.)108 283.2 Q .534(If a mapping or magic \ -\214le is not used, or no match is found then the def)108 300 R .534 -(ault CREA)-.1 F -.18(TO)-1.11 G 3.033(Ra).18 G .533(nd TYPE for all) --3.033 F(re)108 312 Q .853 -(gular \214les can be set by using entries in the)-.15 F F1(.mkisofsr) -3.354 E(c)-.18 E F0 .854(\214le or using the)3.354 F F1(\255hfs-cr)3.354 -E(eator)-.18 E F0(and/or)3.354 E F1(\255hfs-type)3.354 E F0 -(options, otherwise the def)108 324 Q(ault CREA)-.1 E -.18(TO)-1.11 G -2.5(Ra).18 G(nd TYPE are 'unix' and 'TEXT'.)-2.5 E .131 -(The format of the)108 340.8 R F3(mapping)2.631 E F0 .131 -(\214le is the same)2.631 F F3(afp\214le)2.631 E F0 .131 -(format as used by)2.631 F F3(aufs)2.631 E F0 5.131(.T).27 G .131 -(his \214le has \214v)-5.131 F 2.631(ec)-.15 G .131(olumns for the) --2.631 F F3 -.2(ex)108 352.8 S(tension).2 E F0(,).24 E F3 .485 -(\214le tr)2.985 F(anslation)-.15 E F0(,).24 E F3(CREA)2.985 E -.18(TO) --.37 G(R).18 E F0(,).27 E F3(TYPE)2.985 E F0(and)2.986 E F3(Comment) -2.986 E F0 5.486(.L).68 G .486 -(ines starting with the '#' character are com-)-5.486 F -(ment lines and are ignored. An e)108 364.8 Q(xample \214le w)-.15 E -(ould be lik)-.1 E(e:)-.1 E 2.5(#E)108 381.6 S -(xample \214lename mapping \214le)-2.5 E(#)108 393.6 Q 2.5(#E)108 405.6 -S 12.5(XTN XLate CREA)-2.5 F -.18(TO)-1.11 G 15(RT).18 G 24.71 -(YPE Comment)-15 F 35.27(.tif Ra)108 417.6 R 21.81(w')-.15 G 27.33 -(8BIM' 'TIFF')-21.81 F("Photoshop TIFF image")24.99 E 29.16(.hqx Ascii) -108 429.6 R 27.33('BnHq' 'TEXT')18.88 F("BinHe)20 E 2.5<788c>-.15 G(le") --2.5 E 29.72(.doc Ra)108 441.6 R 21.81(w')-.15 G 20.11(MSWD' 'WDBN') --21.81 F("W)15 E(ord \214le")-.8 E(.mo)108 453.6 Q 29.03(vR)-.15 G 19.61 --.15(aw ')-29.03 H(TV).15 E 23.85(OD' 'MooV')-.4 F("QuickT)19.44 E -(ime Mo)-.35 E(vie")-.15 E 44.16(*A)108 465.6 S 16.38(scii ')-44.16 F -38.06(ttxt' 'TEXT')-.18 F("T)20 E -.15(ex)-.7 G 2.5<748c>.15 G(le")-2.5 -E(Where:)108 482.4 Q .905(The \214rst column)144 499.2 R F3(EXTN)3.405 E -F0 .905(de\214nes the Unix \214lename e)3.405 F .905 -(xtension to be mapped. The def)-.15 F .905(ault mapping)-.1 F(for an) -144 511.2 Q 2.5<798c>-.15 G(lename e)-2.5 E(xtension that doesn')-.15 E -2.5(tm)-.18 G(atch is de\214ned with the "*" character)-2.5 E(.)-.55 E -(The)144 528 Q F3(Xlate)3.685 E F0 1.185 -(column de\214nes the type of te)3.685 F 1.185 -(xt translation between the Unix and Macintosh \214le it is)-.15 F .866 -(ignored by)144 540 R F1(mkisofs)3.366 E F0 3.366(,b)C .866(ut is k) --3.566 F .865(ept to be compatible with)-.1 F F1(aufs)3.365 E F0 3.365 -(\(1\). Although)B F1(mkisofs)3.365 E F0 .865(does not alter)3.365 F -.461(the contents of a \214le, if a binary \214le has it')144 552 R -2.961(sT)-.55 G .461(YPE set as 'TEXT', it)-2.961 F F3(may)2.961 E F0 -.461(be read incorrectly on a)2.961 F -(Macintosh. Therefore a better choice for the def)144 564 Q -(ault TYPE may be '????')-.1 E(The)144 580.8 Q F3(CREA)2.5 E -.18(TO) --.37 G(R).18 E F0(and)2.5 E F3(TYPE)2.5 E F0 -.1(ke)2.5 G(yw)-.05 E -(ords must be 4 characters long and enclosed in single quotes.)-.1 E -.508 -(The comment \214eld is enclosed in double quotes - it is ignored by)144 -597.6 R F1(mkisofs)3.008 E F0 3.008(,b)C .508(ut is k)-3.208 F .507 -(ept to be com-)-.1 F(patible with)144 609.6 Q F1(aufs)2.5 E F0(.)A .024 -(The format of the)108 626.4 R F3(ma)2.524 E(gic)-.1 E F0 .024 -(\214le is almost identical to the)2.524 F F1(magic)2.524 E F0 .024 -(\(4\) \214le used by the Linux)B F1(\214le)2.524 E F0 .024 -(\(1\) command - the)B(routines for reading and decoding the)108 638.4 Q -F3(ma)2.5 E(gic)-.1 E F0(\214le are based on the Linux)2.5 E F1(\214le) -2.5 E F0(\(1\) command.)A .479 -(This \214le has four tab separated columns for the)108 655.2 R F3 .479 -(byte of)2.979 F(fset)-.18 E F0(,).68 E F3(type)2.979 E F0(,).18 E F3 -(test)2.979 E F0(and)2.979 E F3(messa)2.979 E -.1(ge)-.1 G F0 5.479(.L) -.28 G .478(ines starting with the)-5.479 F -('#' character are comment lines and are ignored. An e)108 667.2 Q -(xample \214le w)-.15 E(ould be lik)-.1 E(e:)-.1 E 2.5(#E)108 684 S -(xample magic \214le)-2.5 E(#)108 696 Q 2.5(#o)108 708 S 13 -.25(ff t) --2.5 H 24.72(ype test).25 F(message)36.67 E -1.11(Ve)72 768 S(rsion 2.0) -1.11 E(24 Dec 2002)162.9 E(15)198.45 E EP +save +mark +15 pagesetup +10 R f +( \( 8 \))3 164( MKISOFS)1 3525(Maintenance Procedures)1 991 3 720 480 t +10 S1 f +(\261 \261)1 65 1 1080 960 t +10 B f +( 11 12 2)3 100( p1)1 50( ip)1 56(r rr ri)2 116 4 1145 960 t +10 R f +( Version-1.12 standard from 1994,)4 1425(Create ISO-9660 \256le system images that follow the new Rrip)9 2535 2 1440 1080 t +(this is the default.)3 735 1 1440 1200 t +10 S1 f +(\261 \261)1 65 1 1080 1368 t +10 B f +( t)1 0( oo ot)2 83( ro)1 50( -r)1 44( d-)1 33( ld)1 56(o ol)1 78 7 1145 1368 t +10 I f +(dir)1522 1368 w +10 R f +( writing a multisession image and the previous \(or even older\))10 2680(This option is necessary when)4 1280 2 1440 1488 t +( with)1 219(session was written)2 811 2 1440 1608 t +10 B f +( t)1 0( oo ot)2 83( ro)1 50(- -r)1 77 4 2511 1608 t +10 I f +(dir.)2762 1608 w +10 R f +(Using a directory name not found in the previous session)9 2422 1 2978 1608 t +(causes)1440 1728 w +10 B f +( s)1 0( fs)1 39( of)1 33( so)1 50( is)1 39( ki)1 28(m mk)1 139 7 1733 1728 t +10 R f +(to abort with an error.)4 905 1 2094 1728 t +(Without this option,)2 824 1 1440 1968 t +10 B f +( s)1 0( fs)1 39( of)1 33( so)1 50( is)1 39( ki)1 28(m mk)1 139 7 2299 1968 t +10 R f +( be forced to)3 534(would not be able to \256nd unmodi\256ed \256les and would)9 2204 2 2662 1968 t +(write their data into the image once more.)7 1725 1 1440 2088 t +10 S1 f +(\261 \261)1 65 1 1440 2328 t +10 B f +( t)1 0( oo ot)2 83(r ro)1 94 3 1505 2328 t +10 R f +(and)1718 2328 w +10 S1 f +(\261 \261)1 65 1 1898 2328 t +10 B f +( t)1 0( oo ot)2 83( ro)1 50( -r)1 44( d-)1 33( ld)1 56(o ol)1 78 7 1963 2328 t +10 R f +( initial ses-)2 461( The)1 224(are meant to be used together to do incremental backups.)9 2372 3 2343 2328 t +(sion would e.g. use:)3 908 1 1440 2448 t +10 B f +( s)1 0( fs)1 39( of)1 33( so)1 50( is)1 39( ki)1 28(m mk)1 139 7 2443 2448 t +10 S1 f +(\261 \261)1 65 1 2833 2448 t +10 B f +( ku up p)3 112( ck)1 56( ac)1 44( ba)1 50( b)1 118( t)1 0( oo ot)2 83(r ro)1 94 8 2898 2448 t +10 S f +(_ _)1 50 1 3455 2448 t +10 B f +(1 1)1 50 1 3505 2448 t +10 I f +(dirs.)3617 2448 w +10 R f +(The next incremental backup with)4 1508 1 3892 2448 t +10 B f +( s)1 0( fs)1 39( of)1 33( so)1 50( is)1 39( ki)1 28(m mk)1 139 7 1440 2568 t +10 S1 f +(\261 \261)1 65 1 1820 2568 t +10 B f +( ku up p)3 112( ck)1 56( ac)1 44( ba)1 50( b)1 108( t)1 0( oo ot)2 83(r ro)1 94 8 1885 2568 t +10 S f +(_ _)1 50 1 2432 2568 t +10 B f +(2 2)1 50 1 2482 2568 t +10 S1 f +(\261 \261)1 65 1 2584 2568 t +10 B f +( ku up p)3 112( ck)1 56( ac)1 44( ba)1 50( b)1 108( t)1 0( oo ot)2 83( ro)1 50( -r)1 44( d-)1 33( ld)1 56(o ol)1 78 12 2649 2568 t +10 S f +(_ _)1 50 1 3363 2568 t +10 B f +(1 1)1 50 1 3413 2568 t +10 I f +(dirs.)3515 2568 w +10 R f +(would take another snapshot of these)5 1618 1 3782 2568 t +( would be found in)4 815(directories. The \256rst snapshot)3 1230 2 1440 2688 t +10 B f +( ku up p)3 112( ck)1 56( ac)1 44(b ba)1 106 4 3525 2688 t +10 S f +(_ _)1 50 1 3843 2688 t +10 B f +(1 1)1 50 1 3893 2688 t +10 R f +(, the second one in)4 806 1 3943 2688 t +10 B f +( ku up p)3 112( ck)1 56( ac)1 44(b ba)1 106 4 4789 2688 t +10 S f +(_ _)1 50 1 5107 2688 t +10 B f +(2 2)1 50 1 5157 2688 t +10 R f +(, but)1 193 1 5207 2688 t +(only modi\256ed or new \256les need to be written into the second session.)12 2858 1 1440 2808 t +( preserved. But old)3 829(Without these options, new \256les would be added and old ones would be)12 3131 2 1440 3048 t +( the \256le was modi\256ed. Recovering the \256les by copying the whole)11 2752(ones would be overwritten if)4 1208 2 1440 3168 t +( CD would also restore \256les that were deleted intentionally. Accessing)10 3110(directory back from)2 850 2 1440 3288 t +( a \256le requires support by the operating system to choose which ses-)12 2928(several older versions of)3 1032 2 1440 3408 t +(sions are to be mounted.)4 1006 1 1440 3528 t +10 S1 f +(\261 \261)1 65 1 1080 3696 t +10 B f +(s s)1 39 1 1145 3696 t +10 I f +(sector type)1 443 1 1217 3696 t +10 S1 f +(\261 \261)1 65 1 1080 3864 t +10 B f +( e)1 0( pe)1 44( yp)1 56( ty)1 50( ec ct)2 77(s se)1 83 6 1145 3864 t +10 I f +(sector type)1 443 1 1488 3864 t +10 R f +(Set the)1 285 1 1440 3984 t +10 I f +(sector type)1 445 1 1760 3984 t +10 R f +( The)1 224( ISO-9660 \256lesystem.)2 897(to be used for the output \256le with the)8 1557 3 2240 3984 t +10 I f +(sector type)1 446 1 4954 3984 t +10 R f +(may be one of:)3 620 1 1440 4104 t +10 B f +( a)1 0( ta)1 50( at)1 33(d da)1 106 4 1440 4272 t +10 R f +( with 2048 bytes per)4 900(This is the default. It results in standard CD-ROM data sectors)10 2700 2 1800 4272 t +(sector.)1800 4392 w +10 B f +(x xa a1 1)3 150 1 1440 4560 t +10 R f +( This)1 255( to CD-ROM XA mode 1 with 2056 bytes per sector.)10 2313(This sets the sector type)4 1032 3 1800 4560 t +( should be used together)4 1019(sector type is the of\256cial sector type for multi-session CDs, it)10 2581 2 1800 4680 t +(with the)1 336 1 1800 4800 t +10 S1 f +(\261 \261)1 65 1 2172 4800 t +10 B f +(X XA A)2 144 1 2237 4800 t +10 R f +( write Kodak Photo CDs and Kodak)6 1515( is required to)3 585( It)1 130(option of mkisofs.)2 753 4 2417 4800 t +( the)1 160( Use)1 226(Picture CDs.)1 524 3 1800 4920 t +10 S1 f +(\261 \261)1 65 1 2748 4920 t +10 B f +(x xa a1 1)3 150 1 2813 4920 t +10 R f +(option from)1 487 1 3001 4920 t +10 B f +( d)1 0( rd)1 56( or)1 44( re ec co)3 138( dr)1 44(c cd)1 100 6 3525 4920 t +10 R f +(to tell)1 243 1 3944 4920 t +10 B f +( d)1 0( rd)1 56( or)1 44( re ec co)3 138( dr)1 44(c cd)1 100 6 4224 4920 t +10 R f +(to write CD-ROM)2 757 1 4643 4920 t +( not use for DVD or BluRay media.)7 1482( Do)1 188(XA mode 1 sectors.)3 817 3 1800 5040 t +10 B f +( w)1 0( aw)1 72(r ra)1 94 3 1440 5208 t +10 R f +( is)1 118( This)1 262( with 2352 bytes per sector.)5 1234(This sets the sector type to raw audio sectors)8 1986 4 1800 5208 t +( not use for DVD or BluRay media.)7 1482( Do)1 188(reserved for future enhancements.)3 1380 3 1800 5328 t +10 S1 f +(\261 \261)1 65 1 1080 5496 t +10 B f +( t)1 0( rt)1 33( or)1 44(s so)1 89 4 1145 5496 t +10 I f +(sort \256le)1 311 1 1344 5496 t +10 R f +( a \256le that contains pairs of \256lenames)7 1595(Sort \256le locations on the media. Sorting is controlled by)9 2365 2 1440 5616 t +( the weighting is higher, the \256le will be located closer to the)12 2611( If)1 143(and sorting offset weighting.)3 1206 3 1440 5736 t +( lower, the \256le will be located closer to the end of)11 2156(beginning of the media, if the weighting is)7 1804 2 1440 5856 t +( There must be only one space or tabs character between the \256lename and the weight)15 3533(the media.)1 427 2 1440 5976 t +(and the weight must be the last characters on a line. The \256lename is taken to include all the)18 3960 1 1440 6096 t +( the last space or tab character on a line. This is to allow for)14 2535(characters up to, but not including)5 1425 2 1440 6216 t +( option does)2 507( This)1 244(space characters to be in, or at the end of a \256lename.)11 2179 3 1440 6336 t +10 B f +( t)1 0( ot)1 33(n no)1 106 3 4404 6336 t +10 R f +(sort the order of the)4 823 1 4577 6336 t +( sorts the order in which the \256le data is writ-)10 1850(\256le names that appear in the ISO-9660 directory. It)8 2110 2 1440 6456 t +( CD. See)2 386(ten to the CD image - which may be useful in order to optimize the data layout on a)18 3574 2 1440 6576 t +(README.sort for more details.)3 1303 1 1440 6696 t +10 S1 f +(\261 \261)1 65 1 1080 6864 t +10 B f +( rc c)2 44( ar)1 44( pa)1 50(s sp)1 95 4 1145 6864 t +10 S1 f +(\261 \261)1 65 1 1378 6864 t +10 B f +( t)1 0( oo ot)2 83(b bo)1 106 3 1443 6864 t +10 I f +(img)1665 6864 w +10 S f +(_)1815 6864 w +10 I f +(sun4,img)1865 6864 w +10 S f +(_)2229 6864 w +10 I f +(sun4c,img)2279 6864 w +10 S f +(_)2687 6864 w +10 I f +(sun4m,img)2737 6864 w +10 S f +(_)3173 6864 w +10 I f +(sun4d,img)3223 6864 w +10 S f +(_)3637 6864 w +10 I f +(sun4e)3687 6864 w +10 R f +(See)1440 6984 w +10 S1 f +(\261 \261)1 65 1 1617 6984 t +10 B f +(B B)1 67 1 1682 6984 t +10 R f +(option above.)1 552 1 1782 6984 t +10 S1 f +(\261 \261)1 65 1 1080 7152 t +10 B f +( rc c)2 44( ar)1 44( pa)1 50(s sp)1 95 4 1145 7152 t +10 S1 f +(\261 \261)1 65 1 1378 7152 t +10 B f +( l)1 0( el)1 28( be)1 44( ab)1 56(l la)1 78 5 1443 7152 t +10 I f +(label)1682 7152 w +10 R f +(Set the Sun disk label name for the Sun disk label that is created with the)15 3037 1 1440 7272 t +10 S1 f +(\261 \261)1 65 1 4510 7272 t +10 B f +( t)1 0( oo ot)2 83( bo)1 50( -b)1 56( rc c-)2 77( ar)1 44( pa)1 50(s sp)1 95 8 4575 7272 t +10 R f +(option.)5063 7272 w +( 15)1 1838( change: 2010/04/25)2 832( Last)1 1536(Version 3.0)1 474 4 720 7752 t +cleartomark +showpage +restore +%%EndPage: 15 15 %%Page: 16 16 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF 355.5(MKISOFS\(8\) MKISOFS\(8\))72 48 R 28.91 -(0s)108 84 S 19.16(tring GIF8)-28.91 F(8BIM GIFf)29.45 E(GIF image)5 E -28.91(0b)108 96 S 12.5(eshort 0xf)-28.91 F 21.65(fd8 8BIM)-.25 F 2.5 -(JPEG image)2.5 F(data)2.5 E 28.91(0s)108 108 S 19.16(tring SIT!)-28.91 -F(SIT! SIT!)32.23 E(Stuf)5 E(fIt Archi)-.25 E -.15(ve)-.25 G 28.91(0s) -108 120 S 19.16(tring \\037\\235)-28.91 F(LZIV ZIVU)15 E -(standard unix compress)5 E 28.91(0s)108 132 S 19.16(tring \\037\\213) --28.91 F(GNUz ZIVU)15 E(gzip compressed data)5 E 28.91(0s)108 144 S -19.16(tring %!)-28.91 F(ASPS TEXT)38.9 E(Postscript)5 E 28.91(0s)108 156 -S 19.16(tring \\004%!)-28.91 F(ASPS TEXT)21.12 E -(PC Postscript with a ^D to start)5 E 28.91(4s)108 168 S 19.16 -(tring moo)-28.91 F 27.93(vt)-.15 G(xtt MooV)-27.93 E(QuickT)5 E(ime mo) --.35 E(vie \214le \(moo)-.15 E(v\))-.15 E 28.91(4s)108 180 S 19.16 -(tring mdat)-28.91 F(txtt MooV)30.56 E(QuickT)5 E(ime mo)-.35 E -(vie \214le \(mdat\))-.15 E .132 -(The format of the \214le is described in the)108 196.8 R/F1 10 -/Times-Bold@0 SF(magic)2.632 E F0 .132(\(4\) man page. The only dif)B -.132(ference here is that for each entry)-.25 F .711 -(in the magic \214le, the)108 208.8 R/F2 10/Times-Italic@0 SF(messa) -3.211 E -.1(ge)-.1 G F0 .711(for the initial of)3.311 F(fset)-.25 E F1 -(must)3.211 E F0 .71(be 4 characters for the CREA)3.21 F -.18(TO)-1.11 G -3.21(Rf).18 G(ollo)-3.21 E .71(wed by 4)-.25 F 1.603 -(characters for the TYPE - white space is optional between them. An)108 -220.8 R 4.103(yo)-.15 G 1.603(ther characters on this line are)-4.103 F -2.5(ignored. Continuation)108 232.8 R(lines \(starting with a '>'\) are\ - also ignored i.e. only the initial of)2.5 E(fset lines are used.)-.25 E -.456(Using the)108 249.6 R F1(\255magic)2.956 E F0 .456(option may sign\ -i\214cantly increase processing time as each \214le has to opened and r\ -ead to)2.956 F(\214nd it')108 261.6 Q 2.5(sm)-.55 G(agic number)-2.5 E -(.)-.55 E .665(In summary)108 278.4 R 3.165(,f)-.65 G .665 -(or all \214les, the def)-3.165 F .665(ault CREA)-.1 F -.18(TO)-1.11 G -3.165(Ri).18 G 3.166(s')-3.165 G .666(unix' and the def)-3.166 F .666 -(ault TYPE is 'TEXT'.)-.1 F .666(These can be)5.666 F -(changed by using entries in the)108 290.4 Q F2(.mkisofsr)2.5 E(c)-.37 E -F0(\214le or by using the)2.5 E F1(\255hfs-cr)2.5 E(eator)-.18 E F0 -(and/or)2.5 E F1(\255hfs-type)2.5 E F0(options.)2.5 E .63 -(If the a \214le is in one of the kno)108 307.2 R .63(wn Apple/Unix for\ -mats \(and the format has been selected\), then the CRE-)-.25 F -.46 --1.11(AT O)108 319.2 T 2.5(Ra)1.11 G(nd TYPE are tak)-2.5 E -(en from the v)-.1 E(alues stored in the Apple/Unix \214le.)-.25 E .773 -(Other \214les can ha)108 336 R 1.073 -.15(ve t)-.2 H .773(heir CREA).15 -F -.18(TO)-1.11 G 3.273(Ra).18 G .773 -(nd TYPE set from their \214le name e)-3.273 F .773(xtension \(the)-.15 -F F1(\255map)3.273 E F0 .773(option\), or)3.273 F .342 -(their magic number \(the)108 348 R F1(\255magic)2.842 E F0 .342 -(option\). If the def)2.842 F .342(ault match is used in the)-.1 F F2 -(mapping)2.841 E F0 .341(\214le, then these v)2.841 F(alues)-.25 E -.15 -(ove)108 360 S(rride the def).15 E(ault CREA)-.1 E -.18(TO)-1.11 G 2.5 -(Ra).18 G(nd TYPE.)-2.5 E 2.5(Af)108 376.8 S(ull CREA)-2.5 E -.18(TO) --1.11 G(R/TYPE database can be found at http://www).18 E -(.angel\214re.com/il/szek)-.65 E(ely/inde)-.1 E(x.html)-.15 E/F3 10.95 -/Times-Bold@0 SF(HFS MA)72 405.6 Q(CINT)-.602 E(OSH FILE FORMA)-.197 E -(TS)-1.04 E F0 .788(Macintosh \214les ha)108 417.6 R 1.088 -.15(ve t)-.2 -H .989 -.1(wo p).15 H .789(arts called the).1 F F2(Data)3.289 E F0(and) -3.289 E F2(Resour)3.289 E(ce)-.37 E F0 .789(fork. Either may be empty) -3.289 F 3.289(.U)-.65 G .789(nix \(and man)-3.289 F(y)-.15 E .171 -(other OSs\) can only cope with \214les ha)108 429.6 R .171 -(ving one part \(or fork\). T)-.2 F 2.67(oa)-.8 G .17 -(dd to this, Macintosh \214les ha)-2.67 F .47 -.15(ve a n)-.2 H(umber) -.15 E .136(of attrib)108 441.6 R .137(utes associated with them - proba\ -bly the most important are the TYPE and CREA)-.2 F -.18(TO)-1.11 G .137 -(R. Ag).18 F .137(ain Unix)-.05 F -(has no concept of these types of attrib)108 453.6 Q(utes.)-.2 E .032(e\ -.g. a Macintosh \214le may be a JPEG image where the image is stored in\ - the Data fork and a desktop thumb-)108 470.4 R .123(nail stored in the\ - Resource fork. It is usually the information in the data fork that is \ -useful across platforms.)108 482.4 R .425 -(Therefore to store a Macintosh \214le on a Unix \214lesystem, a w)108 -499.2 R .425(ay has to be found to cope with the tw)-.1 F 2.925(of)-.1 G -(orks)-2.925 E .914(and the e)108 511.2 R .914(xtra attrib)-.15 F .914 -(utes \(which are referred to as the)-.2 F F2 .914(\214nder info)3.414 F -F0 3.414(\). Unfortunately).18 F 3.414(,i)-.65 G 3.414(ts)-3.414 G .914 -(eems that e)-3.414 F -.15(ve)-.25 G .915(ry soft-).15 F -.1(wa)108 -523.2 S(re package that stores Macintosh \214les on Unix has chosen a c\ -ompletely dif).1 E(ferent storage method.)-.25 E -(The Apple/Unix formats that)108 540 Q F2(mkisofs)2.5 E F0 -(\(partially\) supports are:)2.5 E(CAP A)108 556.8 Q(UFS format)-.55 E -.224(Data fork stored in a \214le. Resource fork in subdirectory .resou\ -rce with same \214lename as data fork.)144 568.8 R -(Finder info in .\214nderinfo subdirectory with same \214lename.)144 -580.8 Q(AppleDouble/Netatalk)108 597.6 Q .262(Data fork stored in a \ -\214le. Resource fork stored in a \214le with same name pre\214x)144 -609.6 R .263(ed with "%". Finder)-.15 F .744 -(info also stored in same "%" \214le. Netatalk uses the same format, b) -144 621.6 R .744(ut the resource fork/\214nderinfo)-.2 F -(stored in subdirectory .AppleDouble with same name as data fork.)144 -633.6 Q(AppleSingle)108 650.4 Q(Data structures similar to abo)144 662.4 -Q -.15(ve)-.15 G 2.5(,e).15 G -(xcept both forks and \214nder info are stored in one \214le.)-2.65 E -(Helios EtherShare)108 679.2 Q .901(Data fork stored in a \214le. Resou\ -rce fork and \214nder info together in subdirectory .rsrc with same)144 -691.2 R(\214lename as data fork.)144 703.2 Q -1.11(Ve)72 768 S -(rsion 2.0)1.11 E(24 Dec 2002)162.9 E(16)198.45 E EP +save +mark +16 pagesetup +10 R f +( \( 8 \))3 164( MKISOFS)1 3525(Maintenance Procedures)1 991 3 720 480 t +10 S1 f +(\261 \261)1 65 1 1080 960 t +10 B f +( t)1 0( li it)2 61( pl)1 28(s sp)1 95 4 1145 960 t +10 S1 f +(\261 \261)1 65 1 1329 960 t +10 B f +( t)1 0( pu ut)2 89( tp)1 56( ut)1 33(o ou)1 106 5 1394 960 t +10 R f +( helps to create DVD)4 934( This)1 259( several \256les of approximately 1 GB.)6 1611(Split the output image into)4 1156 4 1440 1080 t +( will con-)2 431( Cdrecord)1 453( images on operating systems without large \256le support.)8 2427(sized ISO-9660)1 649 4 1440 1200 t +( make)1 259( To)1 187( DVD.)1 284(catenate more than one \256le into a single track if writing to a)12 2589 4 1440 1320 t +10 S1 f +(\261 \261)1 65 1 4802 1320 t +10 B f +( t)1 0( li it)2 61( pl)1 28(s sp)1 95 4 4867 1320 t +10 S1 f +(\261 \261)1 65 1 5051 1320 t +10 B f +( t)1 0( pu ut)2 89( tp)1 56( ut)1 33(o ou)1 106 5 5116 1320 t +10 R f +(work, the)1 398 1 1440 1440 t +10 S1 f +(\261 \261)1 65 1 1884 1440 t +10 B f +(o o)1 50 1 1949 1440 t +10 I f +(\256lename)2045 1440 w +10 R f +( be named:)2 478(option must be speci\256ed. The resulting output images will)8 2493 2 2429 1440 t +10 I f +(\256lename)1440 1560 w +10 S f +(_)1778 1560 w +10 I f +(00)1828 1560 w +10 R f +(,)1936 1560 w +10 I f +(\256lename)1961 1560 w +10 S f +(_)2299 1560 w +10 I f +(01,)2349 1560 w +10 R f +(\256lename)2482 1560 w +10 S f +(_)2826 1560 w +10 R f +(02)2876 1560 w +10 I f +(...)2976 1560 w +10 S1 f +(\261 \261)1 65 1 1080 1728 t +10 B f +( m)1 0( am)1 83( re ea)2 94( tr)1 44(s st)1 72 5 1145 1728 t +10 S1 f +(\261 \261)1 65 1 1438 1728 t +10 B f +( a)1 0( ia)1 50( di)1 28( ed)1 56(m me)1 127 5 1503 1728 t +10 S1 f +(\261 \261)1 65 1 1764 1728 t +10 B f +( ze e)2 44( iz)1 44(s si)1 67 3 1829 1728 t +10 S1 f +(#)2017 1728 w +10 R f +(Select streaming operation and set the media size to)8 2141 1 1440 1848 t +10 S1 f +(#)3615 1848 w +10 R f +( allows you to pipe the out-)6 1154(sectors. This)1 547 2 3699 1848 t +( program into mkisofs and to create a ISO-9660 \256lesystem without the need of an)14 3411(put of the tar)3 549 2 1440 1968 t +( this option has been speci\256ed,)5 1337(intermediate tar archive \256le. If)4 1300 2 1440 2088 t +10 B f +( s)1 0( fs)1 39( of)1 33( so)1 50( is)1 39( ki)1 28(m mk)1 139 7 4124 2088 t +10 R f +(reads from)1 451 1 4499 2088 t +10 B f +( n)1 0( in)1 56( di)1 28( td)1 56(s st)1 72 5 4997 2088 t +10 R f +(and)5256 2088 w +(creates a \256le with the name)5 1164 1 1440 2208 t +10 B f +( G)1 0( MG)1 78( IM)1 94( .I)1 39( M.)1 25( AM)1 94( EA)1 72( RE)1 67( TR)1 72(S ST)1 123 10 2644 2208 t +10 R f +( maximum size of the \256le \(with padding\) is)8 1839(. The)1 253 2 3308 2208 t +( media size. If)3 592(200 sectors less than the speci\256ed)5 1391 2 1440 2328 t +10 S1 f +(\261 \261)1 65 1 3457 2328 t +10 B f +( o)1 0(n no)1 106 2 3522 2328 t +10 S1 f +(\261 \261)1 65 1 3628 2328 t +10 B f +( d)1 0( ad)1 56(p pa)1 106 3 3693 2328 t +10 R f +(has been speci\256ed, the \256le size is 50)7 1511 1 3889 2328 t +( the \256le is smaller, then mkisofs will write padding.)9 2130( If)1 132(sectors less than the speci\256ed media size.)6 1698 3 1440 2448 t +(This may take a while.)4 939 1 1440 2568 t +(The option)1 452 1 1440 2808 t +10 S1 f +(\261 \261)1 65 1 1933 2808 t +10 B f +( m)1 0( am)1 83( re ea)2 94( tr)1 44(s st)1 72 5 1998 2808 t +10 S1 f +(\261 \261)1 65 1 2291 2808 t +10 B f +( a)1 0( ia)1 50( di)1 28( ed)1 56(m me)1 127 5 2356 2808 t +10 S1 f +(\261 \261)1 65 1 2617 2808 t +10 B f +( ze e)2 44( iz)1 44(s si)1 67 3 2682 2808 t +10 R f +( ISO-9660 \256lesystems only and may not used)7 1938(creates simple)1 584 2 2878 2808 t +(together with multi-session or hybrid \256lesystem options.)6 2307 1 1440 2928 t +10 S1 f +(\261 \261)1 65 1 1080 3096 t +10 B f +( m)1 0( am)1 83( re ea)2 94( tr)1 44(s st)1 72 5 1145 3096 t +10 S1 f +(\261 \261)1 65 1 1438 3096 t +10 B f +( e)1 0( le)1 44(\256 \256l)1 84 3 1503 3096 t +10 S1 f +(\261 \261)1 65 1 1631 3096 t +10 B f +( e)1 0( me)1 44( am)1 83(n na)1 106 4 1696 3096 t +10 I f +(name)1962 3096 w +10 R f +(Set the \256le name used with)5 1140 1 1440 3216 t +10 S1 f +(\261 \261)1 65 1 2617 3216 t +10 B f +( m)1 0( am)1 83( re ea)2 94( tr)1 44(s st)1 72 5 2682 3216 t +10 S1 f +(\261 \261)1 65 1 2975 3216 t +10 B f +( a)1 0( ia)1 50( di)1 28( ed)1 56(m me)1 127 5 3040 3216 t +10 S1 f +(\261 \261)1 65 1 3301 3216 t +10 B f +( ze e)2 44( iz)1 44(s si)1 67 3 3366 3216 t +10 S1 f +(#)3558 3216 w +10 R f +(to a value different from)4 1027 1 3646 3216 t +10 B f +( G)1 0( MG)1 78( IM)1 94( .I)1 39( M.)1 25( AM)1 94( EA)1 72( RE)1 67( TR)1 72(S ST)1 123 10 4711 3216 t +10 R f +(.)5375 3216 w +(If this option is used, the \256lesystem is created as if)10 2098 1 1440 3336 t +10 S1 f +(\261 \261)1 65 1 3571 3336 t +10 B f +( o)1 0( so)1 50(i is)1 67 3 3636 3336 t +10 S1 f +(\261 \261)1 65 1 3753 3336 t +10 B f +( l)1 0( el)1 28( ve)1 44( ev)1 50(l le)1 72 5 3818 3336 t +10 R f +(4 has been speci\256ed.)3 850 1 4045 3336 t +10 S1 f +(\261 \261)1 65 1 1080 3504 t +10 B f +( x8 86 6)3 100( un nx)2 106(s su)1 95 3 1145 3504 t +10 S1 f +(\261 \261)1 65 1 1446 3504 t +10 B f +( t)1 0( oo ot)2 83(b bo)1 106 3 1511 3504 t +10 I f +(UFS-img,,,AUX1-img)1733 3504 w +10 R f +( CD)1 181(Speci\256es a comma separated list of \256lesystem images that are needed to make a bootable)14 3779 2 1440 3624 t +(for Solaris x86 systems.)3 985 1 1440 3744 t +( disk, so)2 361(Note that partition 1 is used for the ISO-9660 image and that partition 2 is the whole)16 3599 2 1440 3984 t +( \256rst image \256le is mapped to)6 1211( The)1 225( used by external partition data.)5 1319(partition 1 and 2 may not be)6 1205 4 1440 4104 t +( may be empty \256elds in the comma separated list, and list entries for partition)14 3215( There)1 298(partition 0.)1 447 3 1440 4224 t +( is 8 \(although the)4 826( maximum number of supported partitions)5 1826( The)1 240(1 and 2 must be empty.)5 1068 4 1440 4344 t +( specify more)2 563(Solaris x86 partition table could support up to 16 partitions\), so it is impossible to)14 3397 2 1440 4464 t +( CD for Solaris x86 sys-)5 1059( option is required to make a bootable)7 1645( This)1 255(than 6 partition images.)3 1001 4 1440 4584 t +(tems.)1440 4704 w +(If the)1 224 1 1440 4944 t +10 S1 f +(\261 \261)1 65 1 1700 4944 t +10 B f +( x8 86 6)3 100( un nx)2 106(s su)1 95 3 1765 4944 t +10 S1 f +(\261 \261)1 65 1 2066 4944 t +10 B f +( t)1 0( oo ot)2 83(b bo)1 106 3 2131 4944 t +10 R f +( sector of the resulting image will con-)7 1629(option has been speci\256ed, the \256rst)5 1415 2 2356 4944 t +( offset 512 and spans)4 887(tain a PC fdisk label with a Solaris type 0x82 fdisk partition that starts at)14 3073 2 1440 5064 t +( addition, for the Solaris type 0x82 fdisk partition, there is a SVr4 disk label)14 3205( In)1 153(the whole CD.)2 602 3 1440 5184 t +( disk label speci\256es slice 0 for the \256rst \(usually)9 1951( This)1 244( of the CD.)3 468(at offset 1024 in the \256rst sector)6 1297 4 1440 5304 t +( to boot the PC and slice 1 for the ISO-9660 image.)11 2263(UFS type\) \256lesystem image that is used)6 1697 2 1440 5424 t +( used for additional \256lesystem images that)6 1736( slice 7 may be)4 635( . .)2 82(Slice 2 spans the whole CD slice 3 .)8 1507 4 1440 5544 t +(have been speci\256ed with this option.)5 1500 1 1440 5664 t +( byte sized primary boot that uses the)7 1700(A Solaris x86 boot CD uses a 1024)7 1611 2 1440 5904 t +10 B f +( -)1 0( o-)1 33( no)1 50( n)1 111( o)1 0( to)1 50( it)1 33( ri)1 28( or)1 44( To)1 50( -T)1 67( l-)1 33(E El)1 95 13 4806 5904 t +( n)1 0( on)1 56( io)1 50( ti)1 28( at)1 33( la)1 50( ul)1 28( mu)1 56(e em)1 127 9 1440 6024 t +10 R f +( this rea-)2 377( For)1 211( . .15.)2 207( boot that is in CD sectors 1)7 1212(boot mode and a secondary generic)5 1485 5 1908 6024 t +(son, both)1 375 1 1440 6144 t +10 B f +( b)1 0(- -b)1 89 2 1848 6144 t +10 I f +(bootimage)1970 6144 w +10 B f +( o)1 0( no)1 50(- -n)1 89 3 2433 6144 t +10 S1 f +(\261 \261)1 65 1 2572 6144 t +10 B f +( l)1 0( ul)1 28( mu)1 56(e em)1 127 4 2637 6144 t +10 S1 f +(\261 \261)1 65 1 2848 6144 t +10 B f +( t)1 0( oo ot)2 83(b bo)1 106 3 2913 6144 t +10 R f +(and)3135 6144 w +10 S1 f +(\261 \261)1 65 1 3312 6144 t +10 B f +(G G)1 78 1 3377 6144 t +10 I f +(genboot)3488 6144 w +10 R f +(must be speci\256ed.)2 735 1 3843 6144 t +10 S1 f +(\261 \261)1 65 1 1080 6312 t +10 B f +( x8 86 6)3 100( un nx)2 106(s su)1 95 3 1145 6312 t +10 S1 f +(\261 \261)1 65 1 1446 6312 t +10 B f +( l)1 0( el)1 28( be)1 44( ab)1 56(l la)1 78 5 1511 6312 t +10 I f +(label)1750 6312 w +10 R f +(Set the SVr4 disk label name for the SVr4 disk label that is created with the)15 3327 1 1440 6432 t +10 S1 f +(\261 \261)1 65 1 4812 6432 t +10 B f +( t)1 0( oo ot)2 83( bo)1 50( -b)1 56( x8 86 6-)3 133( un nx)2 106(s su)1 95 7 4877 6432 t +10 R f +(option.)1440 6552 w +10 S1 f +(\261 \261)1 65 1 1080 6720 t +10 B f +( d)1 0( id)1 56( si)1 28( ys)1 39(s sy)1 89 5 1145 6720 t +10 I f +(ID)1390 6720 w +10 R f +( This)1 260( of information.)2 678( is space on the disc for 32 characters)8 1674( There)1 313(Speci\256es the system ID.)3 1035 5 1440 6840 t +(parameter can also be set in the \256le)7 1580 1 1440 6960 t +10 B f +( rc c)2 44( sr)1 44( fs)1 39( of)1 33( so)1 50( is)1 39( ki)1 28( mk)1 56(. .m)1 108 9 3070 6960 t +10 R f +(with SYSI=system)1 779 1 3561 6960 t +10 S f +(_)4340 6960 w +10 R f +( speci\256ed in both)3 758(id. If)1 252 2 4390 6960 t +(places, the command line version is used.)6 1707 1 1440 7080 t +10 S1 f +(\261 \261)1 65 1 1080 7248 t +10 B f +(T T)1 67 1 1145 7248 t +10 R f +( can be used on non-Rock)5 1079(Generate a \256le TRANS.TBL in each directory on the CDROM, which)10 2881 2 1440 7248 t +( 16)1 1838( change: 2010/04/25)2 832( Last)1 1536(Version 3.0)1 474 4 720 7728 t +cleartomark +showpage +restore +%%EndPage: 16 16 %%Page: 17 17 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF 355.5(MKISOFS\(8\) MKISOFS\(8\))72 48 R -(IPT UShare)108 84 Q -1.11(Ve)144 96 S -(ry similar to the EtherShare format, b)1.11 E -(ut the \214nder info is stored slightly dif)-.2 E(ferently)-.25 E(.) --.65 E(MacBinary)108 112.8 Q -(Both forks and \214nder info stored in one \214le.)144 124.8 Q -(Apple PC Exchange)108 141.6 Q .007 -(Used by Macintoshes to store Apple \214les on DOS \(F)144 153.6 R -1.11 -(AT)-.74 G 2.507(\)d)1.11 G 2.507(isks. Data)-2.507 F .007 -(fork stored in a \214le. Resource)2.507 F .06(fork in subdirectory res\ -ource.frk \(or RESOURCE.FRK\). Finder info as one record in \214le \214\ -nder)144 165.6 R(.dat)-.55 E(\(or FINDER.D)144 177.6 Q -1.11(AT)-.4 G -(\). Separate \214nder)1.11 E(.dat for each data fork directory)-.55 E -(.)-.65 E(Note:)144 194.4 Q/F1 10/Times-Italic@0 SF(mkisofs)2.821 E F0 -.321(needs to kno)2.821 F 2.821(wt)-.25 G .321(he nati)-2.821 F .621 --.15(ve F)-.25 H 2.541 -1.11(AT c)-.59 H .32 -(luster size of the disk that the PC Exchange \214les are)1.11 F .349 -(on \(or ha)144 206.4 R .649 -.15(ve b)-.2 H .349 -(een copied from\). This size is gi).15 F -.15(ve)-.25 G 2.849(nb).15 G -2.85(yt)-2.849 G(he)-2.85 E/F2 10/Times-Bold@0 SF(\255cluster)2.85 E -(-size)-.37 E F0 2.85(option. The)2.85 F .35(cluster or allo-)2.85 F -(cation size can be found by using the DOS utility)144 218.4 Q F2 -(CHKDSK)2.5 E F0(.)A 1.125(May not w)144 235.2 R 1.125 -(ork with PC Exchange v2.2 or higher \214les \(a)-.1 F -.25(va)-.2 G -1.124(ilable with MacOS 8.1\).).25 F 1.124(DOS media)6.124 F -(containing PC Exchange \214les should be mounted as type)144 247.2 Q F2 -(msdos)2.5 E F0(\(not)2.5 E F2(vfat)2.5 E F0 2.5(\)w)C(hen using Linux.) --2.5 E(SGI/XINET)108 264 Q .838(Used by SGI machines when the)144 276 R -3.338(ym)-.15 G .838 -(ount HFS disks. Data fork stored in a \214le. Resource fork in)-3.338 F -.069(subdirectory .HSResource with same name. Finder info as one record\ - in \214le .HSancillary)144 288 R 2.568(.S)-.65 G(eparate)-2.568 E -(.HSancillary for each data fork directory)144 300 Q(.)-.65 E -(Thursby Softw)108 316.8 Q(are Systems D)-.1 E -1.35(AV)-.4 G(E)1.35 E -(Allo)144 328.8 Q .177 -(ws Macintoshes to store Apple \214les on SMB serv)-.25 F 2.678 -(ers. Data)-.15 F .178(fork stored in a \214le. Resource fork)2.678 F(i\ -n subdirectory resource.frk. Uses the AppleDouble format to store resou\ -rce fork.)144 340.8 Q(Services for Macintosh)108 357.6 Q -.15(Fo)144 -369.6 S 1.712(rmat of \214les stored by NT Serv).15 F 1.711 -(ers on NTFS \214lesystems. Data fork is stored as "\214lename".)-.15 F -.208(Resource fork stored as a NTFS)144 381.6 R F1(str)2.708 E(eam)-.37 -E F0 .209(called "\214lename:AFP_Resource". The \214nder info is stored) -2.708 F 1.718(as a NTFS)144 393.6 R F1(str)4.218 E(eam)-.37 E F0 1.717 -(called "\214lename:Afp_AfpInfo". These streams are normally in)4.218 F -1.717(visible to the)-.4 F(user)144 405.6 Q(.)-.55 E -.8(Wa)144 422.4 S -.93(rning: mkisofs only partially supports the SFM format. If an HFS \ -\214le or folder stored on the).8 F .641(NT serv)144 434.4 R .641 -(er contains an)-.15 F F1(ille)3.141 E(gal)-.4 E F0 .641 -(NT character in its name, then NT con)3.141 F -.15(ve)-.4 G .64 -(rts these characters to).15 F F1(Pri-)3.14 E .223(vate Use Unicode)144 -446.4 R F0 .223(characters. The characters are: " * / < > ?)2.723 F -2.724(|a)5.224 G .224(lso a space or period if it is the last)-2.724 F -1.569(character of the \214le name, character codes 0x01 to 0x1f \(cont\ -rol characters\) and Apple' apple)144 458.4 R(logo.)144 470.4 Q -(Unfortunately)144 487.2 Q 3.731(,t)-.65 G 1.231(hese pri)-3.731 F -.25 -(va)-.25 G 1.232 -(te Unicode characters are not readable by the mkisofs NT e).25 F -.15 -(xe)-.15 G(cutable.).15 E 1.16(Therefore an)144 499.2 R 3.66<798c>-.15 G -1.16(le or directory name containing these characters will be ignored -\ - including the)-3.66 F(contents of an)144 511.2 Q 2.5(ys)-.15 G -(uch directory)-2.5 E(.)-.65 E(MacOS X AppleDouble)108 528 Q .729 -(When HFS/HFS+ \214les are copied or sa)144 540 R -.15(ve)-.2 G 3.229 -(db).15 G 3.229(yM)-3.229 G .73 -(acOS X on to a non-HFS \214le system \(e.g. UFS,)-3.229 F 1.092 -(NFS etc.\), the \214les are stored in AppleDouble format.)144 552 R -1.091(Data fork stored in a \214le. Resource fork)6.091 F -(stored in a \214le with same name pre\214x)144 564 Q -(ed with "._". Finder info also stored in same "._" \214le.)-.15 E -(MacOS X HFS \(Alpha\))108 580.8 Q .576 -(Not really an Apple/Unix encoding, b)144 592.8 R .577 -(ut actual HFS/HFS+ \214les on a MacOS X system. Data fork)-.2 F .875(s\ -tored in a \214le. Resource fork stored in a pseudo \214le with the sam\ -e name with the suf)144 604.8 R .875(\214x '/rsrc'.)-.25 F -(The \214nderinfo is only a)144 616.8 Q -.25(va)-.2 G -(ilable via a MacOS X library call.).25 E -(Notes: \(also see README.macosx\))144 633.6 Q(Only w)144 650.4 Q -(orks when used on MacOS X.)-.1 E .659(If a \214le is found with a zero\ - length resource fork and empty \214nderinfo, it is assumed not to ha) -144 667.2 R -.15(ve)-.2 G(an)144 679.2 Q 2.5(yA)-.15 G -(pple/Unix encoding - therefore a TYPE and CREA)-2.5 E -.18(TO)-1.11 G -2.5(Rc).18 G(an be set using other methods.)-2.5 E F1(mkisofs)108 696 Q -F0 .391(will attempt to set the CREA)2.891 F -.18(TO)-1.11 G .39 -(R, TYPE, date and possibly other \215ags from the \214nder info. Addi-) -.18 F(tionally)108 708 Q 3.581(,i)-.65 G 3.581(fi)-3.581 G 3.581(te) --3.581 G 1.081(xists, the Macintosh \214lename is set from the \214nder\ - info, otherwise the Macintosh name is)-3.731 F -(based on the Unix \214lename - see the)108 720 Q F2(HFS MA)2.5 E(CINT) --.55 E(OSH FILE N)-.18 E(AMES)-.2 E F0(section belo)2.5 E -.65(w.)-.25 G --1.11(Ve)72 768 S(rsion 2.0)1.11 E(24 Dec 2002)162.9 E(17)198.45 E EP +save +mark +17 pagesetup +10 R f +( \( 8 \))3 164( MKISOFS)1 3525(Maintenance Procedures)1 991 3 720 480 t +( is also information)3 868( There)1 321( systems to help establish the correct \256le names.)8 2171(Ridge capable)1 600 4 1440 960 t +( character devices,)2 768(present in the \256le that indicates the major and minor numbers for block and)13 3192 2 1440 1080 t +(and each symlink has the name of the link \256le given.)10 2186 1 1440 1200 t +10 S1 f +(\261 \261)1 65 1 1080 1368 t +10 B f +( e)1 0( le)1 44( bl)1 28( ab)1 56(t ta)1 83 5 1145 1368 t +10 S1 f +(\261 \261)1 65 1 1356 1368 t +10 B f +( e)1 0( me)1 44( am)1 83(n na)1 106 4 1421 1368 t +10 I f +(TABLE)1687 1368 w +10 S f +(_)1982 1368 w +10 I f +(NAME)2032 1368 w +10 R f +(Alternative translation table \256le name \(see above\). Implies the)8 2567 1 1440 1488 t +10 S1 f +(\261 \261)1 65 1 4042 1488 t +10 B f +(T T)1 67 1 4107 1488 t +10 R f +( you are creating a)4 776(option. If)1 415 2 4209 1488 t +(multi-session image you must use the same name as in the previous session.)12 3136 1 1440 1608 t +10 S1 f +(\261 \261)1 65 1 1080 1776 t +10 B f +( s)1 0( cs)1 39(u uc)1 100 3 1145 1776 t +10 S1 f +(\261 \261)1 65 1 1284 1776 t +10 B f +( l)1 0( el)1 28( ve)1 44( ev)1 50(l le)1 72 5 1349 1776 t +10 I f +(level)1576 1776 w +10 R f +( may be set to 1..3)5 795( It)1 131(Set Unicode conformance level in the Joliet SVD. The default level is 3.)12 3034 3 1440 1896 t +(using this option.)2 709 1 1440 2016 t +10 S1 f +(\261 \261)1 65 1 1080 2184 t +10 B f +( F)1 0(U UD DF)2 205 2 1145 2184 t +10 R f +(Include a)1 387 1 1440 2184 t +10 B f +( F)1 0(U UD DF)2 205 2 1871 2184 t +10 R f +( As)1 189( the generated \256lesystem image.)4 1364(hybrid in)1 383 3 2120 2184 t +10 B f +( s)1 0( fs)1 39( of)1 33( so)1 50( is)1 39( ki)1 28(m mk)1 139 7 4101 2184 t +10 R f +(always creates a ISO-)3 926 1 4474 2184 t +(9660 \256lesystem, it is not possible to create UDF only images. Note that)12 2999 1 1440 2304 t +10 B f +( F)1 0(U UD DF)2 205 2 4476 2304 t +10 R f +( space)1 257(wastes the)1 425 2 4718 2304 t +(from sector)1 473 1 1440 2424 t +10 S1 f +(\304)1954 2424 w +10 R f +(20 to sector 256 at the beginning of the disk in addition to the spcae needed for)16 3413 1 1987 2424 t +(real)1440 2544 w +10 B f +( F)1 0(U UD DF)2 205 2 1622 2544 t +10 R f +(data structures.)1 612 1 1860 2544 t +10 S1 f +(\261 \261)1 65 1 1080 2712 t +10 B f +( f)1 0(u ud df)2 145 2 1145 2712 t +10 R f +( See)1 212(Rationalized UDF with user and group set to 0 and with simpli\256ed permissions.)12 3311 2 1440 2712 t +10 S1 f +(\261 \261)1 65 1 4999 2712 t +10 B f +(r r)1 44 1 5064 2712 t +10 R f +(option)5144 2712 w +(for more information.)2 884 1 1440 2832 t +10 S1 f +(\261 \261)1 65 1 1080 3000 t +10 B f +( f)1 0(u ud df)2 145 2 1145 3000 t +10 S1 f +(\261 \261)1 65 1 1290 3000 t +10 B f +( s)1 0( nk ks)2 95( li in)2 84( ml)1 28( ym)1 83(s sy)1 89 6 1355 3000 t +10 R f +(Support symlinks in)2 823 1 1440 3120 t +10 B f +( F)1 0(U UD DF)2 205 2 2296 3120 t +10 R f +(\256lesystems. This is the default.)4 1271 1 2534 3120 t +10 S1 f +(\261 \261)1 65 1 1080 3288 t +10 B f +( o)1 0(n no)1 106 2 1145 3288 t +10 S1 f +(\261 \261)1 65 1 1251 3288 t +10 B f +( f)1 0(u ud df)2 145 2 1316 3288 t +10 S1 f +(\261 \261)1 65 1 1461 3288 t +10 B f +( s)1 0( nk ks)2 95( li in)2 84( ml)1 28( ym)1 83(s sy)1 89 6 1526 3288 t +10 R f +(Do not support symlinks in)4 1122 1 1440 3408 t +10 B f +( F)1 0(U UD DF)2 205 2 2595 3408 t +10 R f +(\256lesystems.)2833 3408 w +10 S1 f +(\261 \261)1 65 1 1080 3576 t +10 B f +( d)1 0( id)1 56(u ui)1 84 3 1145 3576 t +10 I f +(uid)1318 3576 w +10 R f +( value of)2 417(Overrides the uid read from the source \256les to the)9 2279 2 1440 3696 t +10 I f +(uid)4195 3696 w +10 R f +( this option)2 519(. Specifying)1 550 2 4331 3696 t +(automatically enables Rock Ridge extensions.)4 1872 1 1440 3816 t +10 S1 f +(\261 \261)1 65 1 1080 3984 t +10 B f +( e)1 0( se)1 44(u us)1 95 3 1145 3984 t +10 S1 f +(\261 \261)1 65 1 1284 3984 t +10 B f +( n)1 0( on)1 56( io)1 50( si)1 28( er rs)2 83( ve)1 44( ev)1 50( le)1 44(\256 \256l)1 84 9 1349 3984 t +10 R f +(The option)1 444 1 1440 4104 t +10 S1 f +(\261 \261)1 65 1 1917 4104 t +10 B f +( e)1 0( se)1 44(u us)1 95 3 1982 4104 t +10 S1 f +(\261 \261)1 65 1 2121 4104 t +10 B f +( n)1 0( on)1 56( io)1 50( si)1 28( er rs)2 83( ve)1 44( ev)1 50( le)1 44(\256 \256l)1 84 9 2186 4104 t +10 R f +( If)1 133(allows mkisofs to use \256le version numbers from the \256lesystem.)9 2608 2 2659 4104 t +(the option is not speci\256ed,)4 1089 1 1440 4224 t +10 B f +( s)1 0( fs)1 39( of)1 33( so)1 50( is)1 39( ki)1 28(m mk)1 139 7 2563 4224 t +10 R f +( versions are)2 520( File)1 223(creates a version number of 1 for all \256les.)8 1732 3 2925 4224 t +(strings in the range)3 787 1 1440 4344 t +10 I f +(;1)2260 4344 w +10 R f +(to)2376 4344 w +10 I f +(;32767)2487 4344 w +10 R f +(This option is the default on VMS.)6 1440 1 2803 4344 t +10 S1 f +(\261 \261)1 65 1 1080 4512 t +10 B f +(U U)1 72 1 1145 4512 t +10 R f +(Allows)1440 4512 w +10 S1 f +(")1766 4512 w +10 R f +(Untranslated)1807 4512 w +10 S1 f +(")2317 4512 w +10 R f +(\256lenames, completely violating the ISO-9660 standards described above.)7 3005 1 2395 4512 t +(Forces on the)2 624 1 1440 4632 t +10 S1 f +(\261)2132 4632 w +10 R f +(d,)2197 4632 w +10 S1 f +(\261)2340 4632 w +10 R f +(l,)2405 4632 w +10 S1 f +(\261)2526 4632 w +10 R f +(N,)2591 4632 w +10 S1 f +(\261)2756 4632 w +10 R f +(allow)2821 4632 w +10 S1 f +(\261)3043 4632 w +10 R f +(leading)3108 4632 w +10 S1 f +(\261)3402 4632 w +10 R f +(dots,)3467 4632 w +10 S1 f +(\261)3727 4632 w +10 R f +(relaxed)3792 4632 w +10 S1 f +(\261)4085 4632 w +10 R f +(\256lenames,)4150 4632 w +10 S1 f +(\261)4625 4632 w +10 R f +(allow)4690 4632 w +10 S1 f +(\261)4912 4632 w +10 R f +(lowercase,)4977 4632 w +10 S1 f +(\261)1440 4752 w +10 R f +(allow)1505 4752 w +10 S1 f +(\261)1727 4752 w +10 R f +(multidot and)1 539 1 1792 4752 t +10 S1 f +(\261)2386 4752 w +10 R f +(no)2451 4752 w +10 S1 f +(\261)2551 4752 w +10 R f +(iso)2616 4752 w +10 S1 f +(\261)2733 4752 w +10 R f +( in the)2 312(translate \257ags. It allows more than one '.' character)8 2290 2 2798 4752 t +( on HP-UX system, where the built-in)6 1578( is useful)2 383( This)1 247(\256lename, as well as mixed case \256lenames.)6 1752 4 1440 4872 t +(CDFS \256lesystem does not recognize ANY extensions. Use with extreme caution.)10 3321 1 1440 4992 t +10 S1 f +(\261 \261)1 65 1 1080 5160 t +10 B f +( o)1 0(n no)1 106 2 1145 5160 t +10 S1 f +(\261 \261)1 65 1 1251 5160 t +10 B f +( o)1 0( so)1 50(i is)1 67 3 1316 5160 t +10 S1 f +(\261 \261)1 65 1 1433 5160 t +10 B f +( e)1 0( te)1 44( at)1 33( la)1 50( sl)1 28( ns)1 39( an)1 56( ra)1 50(t tr)1 77 9 1498 5160 t +10 R f +( the characters ')3 699(Do not translate)2 680 2 1440 5280 t +10 S1 f +(#)2819 5280 w +10 R f +(' and ')2 304 1 2869 5280 t +10 S1 f +(\304)3173 5280 w +10 R f +( These)1 318(' which are invalid for ISO-9660 \256lenames.)6 1876 2 3206 5280 t +(characters are though invalid often used by Microsoft systems.)8 2568 1 1440 5400 t +( with cau-)2 429( Use)1 228( standard, but it happens to work on many systems.)9 2181(This violates the ISO-9660)3 1122 4 1440 5520 t +(tion.)1440 5640 w +10 S1 f +(\261 \261)1 65 1 1080 5808 t +10 B f +(V V)1 72 1 1145 5808 t +10 I f +(volid)1250 5808 w +10 R f +( name or label\) to be written into the master block. There is)12 2575(Speci\256es the volume ID \(volume)4 1385 2 1440 5928 t +( parameter can also be set in the \256le)8 1566( This)1 253( disc for 32 characters of information.)6 1612(space on the)2 529 4 1440 6048 t +10 B f +( rc c)2 44( sr)1 44( fs)1 39( of)1 33( so)1 50( is)1 39( ki)1 28( mk)1 56(. .m)1 108 9 1440 6168 t +10 R f +( Note)1 263( places, the command line version is used.)7 1761( speci\256ed in both)3 716( If)1 134(with VOLI=id.)1 610 5 1916 6168 t +( be used as the mount point used by)8 1539(that if you assign a volume ID, this is the name that will)12 2421 2 1440 6288 t +( a Microsoft)2 506(the Solaris volume management system and the name that is assigned to the disc on)14 3454 2 1440 6408 t +(Win32 or Apple Mac platform.)4 1277 1 1440 6528 t +10 S1 f +(\261 \261)1 65 1 1080 6696 t +10 B f +( t)1 0( et)1 33( se)1 44( ls)1 39(v vo ol)2 128 5 1145 6696 t +10 I f +(ID)1422 6696 w +10 R f +( The)1 237( is space on the disc for 128 characters of information.)10 2410( There)1 314(Speci\256es the volset ID.)3 999 4 1440 6816 t +( parameter can also be set in the \256le)8 1662( This)1 265( 64 characters.)2 636(related Joliet entry is limited to)5 1397 4 1440 6936 t +10 B f +( rc c)2 44( sr)1 44( fs)1 39( of)1 33( so)1 50( is)1 39( ki)1 28( mk)1 56(. .m)1 108 9 1440 7056 t +10 R f +(with VOLS=volset)1 785 1 1932 7056 t +10 S f +(_)2717 7056 w +10 R f +( speci\256ed in both places, the command line version is)9 2380(id. If)1 253 2 2767 7056 t +(used.)1440 7176 w +( 17)1 1838( change: 2010/04/25)2 832( Last)1 1536(Version 3.0)1 474 4 720 7680 t +cleartomark +showpage +restore +%%EndPage: 17 17 %%Page: 18 18 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF 355.5(MKISOFS\(8\) MKISOFS\(8\))72 48 R .643 -(When using the)108 84 R/F1 10/Times-Bold@0 SF(\255apple)3.143 E F0 .643 -(option, the TYPE and CREA)3.143 F -.18(TO)-1.11 G 3.143(Ra).18 G .643 -(re stored in the optional System Use or SUSP)-3.143 F .498 -(\214eld in the ISO9660 Directory Record - in much the same w)108 96 R -.499(ay as the Rock Ridge attrib)-.1 F .499(utes are. In f)-.2 F .499 -(act to)-.1 F(mak)108 108 Q 2.554(el)-.1 G .054(ife easy)-2.554 F 2.554 -(,t)-.65 G .054(he Apple e)-2.554 F .053(xtensions are added at the be) --.15 F .053(ginning of the e)-.15 F .053(xisting Rock Ridge attrib)-.15 -F .053(utes \(i.e. to)-.2 F(get the Apple e)108 120 Q -(xtensions you get the Rock Ridge e)-.15 E(xtensions as well\).)-.15 E -.39(The Apple e)108 136.8 R .39 -(xtensions require the resource fork to be stored as an ISO9660)-.15 F -/F2 10/Times-Italic@0 SF(associated)2.891 E F0 .391 -(\214le. This is just lik)2.891 F(e)-.1 E(an)108 148.8 Q 3.186(yn)-.15 G -.686(ormal \214le stored in the ISO9660 \214lesystem e)-3.186 F .685 -(xcept that the associated \214le \215ag is set in the Directory)-.15 F -.299(Record \(bit 2\). This \214le has the same name as the data fork \ -\(the \214le seen by non-Apple machines\). Associ-)108 160.8 R -(ated \214les are normally ignored by other OSs)108 172.8 Q .363 -(When using the)108 189.6 R F1(\255hfs)2.863 E F0 .362 -(option, the TYPE and CREA)2.863 F -.18(TO)-1.11 G 2.862(Rp).18 G .362 -(lus other \214nder info, are stored in a separate HFS)-2.862 F -(directory)108 201.6 Q 3.677(,n)-.65 G 1.177 -(ot visible on the ISO9660 v)-3.677 F 1.178 -(olume. The HFS directory references the same data and resource)-.2 F -(fork \214les described abo)108 213.6 Q -.15(ve)-.15 G(.).15 E .334 -(In most cases, it is better to use the)108 230.4 R F1(\255hfs)2.833 E -F0 .333(option instead of the)2.833 F F1(\255apple)2.833 E F0 .333 -(option, as the latter imposes the lim-)2.833 F 1.012 -(ited ISO9660 characters allo)108 242.4 R 1.013(wed in \214lenames. Ho) --.25 F(we)-.25 E -.15(ve)-.25 G 1.813 -.4(r, t).15 H 1.013(he Apple e).4 -F 1.013(xtensions do gi)-.15 F 1.313 -.15(ve t)-.25 H 1.013(he adv).15 F -1.013(antage that)-.25 F .21(the \214les are pack)108 254.4 R .21 -(ed on the disk more ef)-.1 F .209(\214ciently and it may be possible t\ -o \214t more \214les on a CD - important)-.25 F -(when the total size of the source \214les is approaching 650MB.)108 -266.4 Q/F3 10.95/Times-Bold@0 SF(HFS MA)72 295.2 Q(CINT)-.602 E -(OSH FILE N)-.197 E(AMES)-.219 E F0 .101(Where possible, the HFS \214le\ -name that is stored with an Apple/Unix \214le is used for the HFS part \ -of the CD.)108 307.2 R(Ho)108 319.2 Q(we)-.25 E -.15(ve)-.25 G 1.429 -.4 -(r, n).15 H .628(ot all the Apple/Unix encodings store the HFS \214lena\ -me with the \214nderinfo. In these cases, the).4 F .66(Unix \214lename \ -is used - with escaped special characters. Special characters include '\ -/' and characters with)108 331.2 R(codes o)108 343.2 Q -.15(ve)-.15 G -2.5(r1).15 G(27.)-2.5 E .719 -(Aufs escapes these characters by using ":" follo)108 360 R .719 -(wed by the character code as tw)-.25 F 3.219(oh)-.1 G 1.018 -.15(ex d) --3.219 H .718(igits. Netatalk and).15 F(EtherShare ha)108 372 Q .3 -.15 -(ve a s)-.2 H(imilar scheme, b).15 E(ut uses "%" instead of a ":".)-.2 E -.527(If mkisofs can')108 388.8 R 3.027<748c>-.18 G .527 -(nd an HFS \214lename, then it uses the Unix name, with an)-3.027 F -3.028(y%)-.15 G .528(xx or :xx characters \(xx ==)-3.028 F(tw)108 400.8 -Q 3.059(oh)-.1 G .859 -.15(ex d)-3.059 H .559(igits\) con).15 F -.15(ve) --.4 G .558(rted to a single character code. If "xx" are not he).15 F -3.058(xd)-.15 G .558(igits \([0-9a-fA-F]\), then the)-3.058 F 3.058(ya) --.15 G(re)-3.058 E .928(left alone - although an)108 412.8 R 3.429(yr) --.15 G .929(emaining ":" is con)-3.429 F -.15(ve)-.4 G .929 -(rted to "%" as colon is the HFS directory separator).15 F 3.429(.C)-.55 -G(are)-3.429 E(must be tak)108 424.8 Q -(en, as an ordinary Unix \214le with %xx or :xx will also be con)-.1 E --.15(ve)-.4 G(rted. e.g.).15 E 12.5(This:2fFile con)108 441.6 R -.15(ve) --.4 G(rted to This/File).15 E 20.83(This:File con)108 465.6 R -.15(ve) --.4 G(rted to This%File).15 E 13.05(This:t7File con)108 489.6 R -.15(ve) --.4 G(rted to This%t7File).15 E .68 -(Although HFS \214lenames appear to support upper and lo)108 506.4 R .68 -(wer case letters, the \214lesystem is case insensiti)-.25 F -.15(ve) --.25 G(.).15 E .419(i.e. the \214lenames "aBc" and "AbC" are the same. \ -If a \214le is found in a directory with the same HFS name,)108 518.4 R -(then)108 530.4 Q F2(mkisofs)3.454 E F0 .954 -(will attempt, where possible, to mak)3.454 F 3.454(eau)-.1 G .954 -(nique name by adding '_' characters to one of the)-3.454 F -(\214lenames.)108 542.4 Q .665(If an HFS \214lename e)108 559.2 R .665(\ -xists for a \214le, then mkisofs can use this name as the starting poin\ -t for the ISO9660,)-.15 F 1.051 -(Joliet and Rock Ridge \214lenames using the)108 571.2 R F1 -(\255mac-name)3.551 E F0 1.05 -(option. Normal Unix \214les without an HFS name)3.551 F -(will still use their Unix name.)108 583.2 Q(e.g.)5 E .329(If a)108 600 -R F2(MacBinary)2.829 E F0(\(or)2.829 E F2 .329(PC Exc)2.829 F(hang)-.15 -E(e)-.1 E F0 2.829<298c>.18 G .329(le is stored as)-2.829 F F2(someima) -2.829 E -.1(ge)-.1 G(.gif)-.05 E(.bin)-.15 E F0 .33 -(on the Unix \214lesystem, b)2.83 F .33(ut contains a)-.2 F .685 -(HFS \214le called)108 612 R F2(someima)3.185 E -.1(ge)-.1 G(.gif)-.05 E -F0 3.185(,t)1.96 G .684(hen this is the name that w)-3.185 F .684 -(ould appear on the HFS part of the CD. Ho)-.1 F(w-)-.25 E -2.15 -.25 -(ev e)108 624 T 1.111 -.4(r, a).25 H 2.811(sm).4 G .312(kisofs uses the\ - Unix name as the starting point for the other names, then the ISO9660 \ -name gen-)-2.811 F .068(erated will probably be)108 636 R F2(SOMEIMA) -2.568 E(G.BIN)-.35 E F0 .067(and the Joliet/Rock Ridge w)2.568 F .067 -(ould be)-.1 F F2(someima)2.567 E -.1(ge)-.1 G(.gif)-.05 E(.bin)-.15 E -F0 5.067(.A).24 G(lthough)-5.067 E .176(the actual data \(in this case\ -\) is a GIF image. This option will use the HFS \214lename as the start\ -ing point and)108 648 R(the ISO9660 name will probably be)108 660 Q F2 -(SOMEIMA)2.5 E(G.GIF)-.35 E F0(and the Joliet/Rock Ridge w)2.5 E -(ould be)-.1 E F2(someima)2.5 E -.1(ge)-.1 G(.gif)-.05 E F0(.)1.96 E -.609(Using the)108 676.8 R F1(\255mac-name)3.109 E F0 .609 -(option will not currently w)3.109 F .609(ork with the)-.1 F F1 -3.108 E F0 .608(option - the Unix name will be used in)3.108 F -(the TRANS.TBL \214le, not the Macintosh name.)108 688.8 Q .621 -(The character set used to con)108 705.6 R -.15(ve)-.4 G .621(rt an).15 -F 3.122(yH)-.15 G .622 -(FS \214le name to a Joliet/Rock Ridge \214le name def)-3.122 F .622 -(aults to)-.1 F F2(cp10000)3.122 E F0 .909(\(Mac Roman\).)108 717.6 R -.909(The character set used can be speci\214ed using the)5.909 F F2 -(-input-hfs-c)3.408 E(har)-.15 E(set)-.1 E F0 .908(option. Other b)3.408 -F .908(uilt in)-.2 F 2.238(HFS character sets are: cp10006 \(MacGreek\)\ -, cp10007 \(MacCyrillic\), cp10029 \(MacLatin2\), cp10079)108 729.6 R --1.11(Ve)72 768 S(rsion 2.0)1.11 E(24 Dec 2002)162.9 E(18)198.45 E EP +save +mark +18 pagesetup +10 R f +( \( 8 \))3 164( MKISOFS)1 3525(Maintenance Procedures)1 991 3 720 480 t +10 S1 f +(\261 \261)1 65 1 1080 960 t +10 B f +( t)1 0( et)1 33( se)1 44( ls)1 39(v vo ol)2 128 5 1145 960 t +10 S1 f +(\261 \261)1 65 1 1389 960 t +10 B f +( ze e)2 44( iz)1 44(s si)1 67 3 1454 960 t +10 S1 f +(#)1642 960 w +10 R f +( set size to)3 476(Sets the volume)2 675 2 1440 1080 t +10 S1 f +(#)2635 1080 w +10 R f +( volume set size is the number of CD's that are in a CD)13 2458(. The)1 257 2 2685 1080 t +( more volumes, on which a set of \256les is)9 1763( volume set is a collection of one or)8 1570( A)1 148(volume set.)1 479 4 1440 1200 t +(recorded.)1440 1320 w +( are part of e.g. a)5 747(Volume Sets are not intended to be used to create a set numbered CD's that)14 3213 2 1440 1560 t +( a big direc-)3 521( Sets are rather used to record)6 1275( Volume)1 395(Operation System installation set of CD's.)5 1769 4 1440 1680 t +( volume of a Volume Set contains a)7 1604( Each)1 282( a single volume.)3 758(tory tree that would not \256t on)6 1316 4 1440 1800 t +( sequence)1 402(description of all the directories and \256les that are recorded on the volumes where the)14 3558 2 1440 1920 t +(numbers are less than, or equal to, the assigned Volume Set Size of the current volume.)15 3609 1 1440 2040 t +10 B f +( s)1 0( fs)1 39( of)1 33( so)1 50( is)1 39( ki)1 28(M Mk)1 150 7 1440 2280 t +10 R f +(currently does not support a)4 1147 1 1812 2280 t +10 S1 f +(\261 \261)1 65 1 2992 2280 t +10 B f +( t)1 0( et)1 33( se)1 44( ls)1 39(v vo ol)2 128 5 3057 2280 t +10 S1 f +(\261 \261)1 65 1 3301 2280 t +10 B f +( ze e)2 44( iz)1 44(s si)1 67 3 3366 2280 t +10 R f +(that is larger than 1.)4 828 1 3554 2280 t +(The option)1 444 1 1440 2520 t +10 S1 f +(\261 \261)1 65 1 1917 2520 t +10 B f +( t)1 0( et)1 33( se)1 44( ls)1 39(v vo ol)2 128 5 1982 2520 t +10 S1 f +(\261 \261)1 65 1 2226 2520 t +10 B f +( ze e)2 44( iz)1 44(s si)1 67 3 2291 2520 t +10 R f +(must be speci\256ed before)3 997 1 2479 2520 t +10 S1 f +(\261 \261)1 65 1 3509 2520 t +10 B f +( t)1 0( et)1 33( se)1 44( ls)1 39(v vo ol)2 128 5 3574 2520 t +10 S1 f +(\261 \261)1 65 1 3818 2520 t +10 B f +( o)1 0( qn no)2 106( eq)1 56(s se)1 83 4 3883 2520 t +10 R f +(on each command line.)3 950 1 4161 2520 t +10 S1 f +(\261 \261)1 65 1 1080 2688 t +10 B f +( t)1 0( et)1 33( se)1 44( ls)1 39(v vo ol)2 128 5 1145 2688 t +10 S1 f +(\261 \261)1 65 1 1389 2688 t +10 B f +( o)1 0( qn no)2 106( eq)1 56(s se)1 83 4 1454 2688 t +10 S1 f +(#)1732 2688 w +10 R f +(Sets the volume set sequence number to)6 1748 1 1440 2808 t +10 S1 f +(#)3238 2808 w +10 R f +( volume set sequence number is the index)7 1849(. The)1 263 2 3288 2808 t +( option)1 307( The)1 239(number of the current CD in a CD set.)8 1736 3 1440 2928 t +10 S1 f +(\261 \261)1 65 1 3773 2928 t +10 B f +( t)1 0( et)1 33( se)1 44( ls)1 39(v vo ol)2 128 5 3838 2928 t +10 S1 f +(\261 \261)1 65 1 4082 2928 t +10 B f +( ze e)2 44( iz)1 44(s si)1 67 3 4147 2928 t +10 R f +(must be speci\256ed before)3 1048 1 4352 2928 t +10 S1 f +(\261 \261)1 65 1 1440 3048 t +10 B f +( t)1 0( et)1 33( se)1 44( ls)1 39(v vo ol)2 128 5 1505 3048 t +10 S1 f +(\261 \261)1 65 1 1749 3048 t +10 B f +( o)1 0( qn no)2 106( eq)1 56(s se)1 83 4 1814 3048 t +10 R f +(on each command line.)3 950 1 2092 3048 t +10 S1 f +(\261 \261)1 65 1 1080 3216 t +10 B f +(v v)1 50 1 1145 3216 t +10 R f +( be)1 153(Verbose execution. If given twice on the command line, extra debug information will)12 3807 2 1440 3216 t +(printed.)1440 3336 w +10 S1 f +(\261 \261)1 65 1 1080 3504 t +10 B f +(x x)1 50 1 1145 3504 t +10 I f +(path)1228 3504 w +10 R f +(Exclude)1440 3504 w +10 I f +(path)1802 3504 w +10 R f +( CDROM.)1 428(from being written to)3 882 2 2015 3504 t +10 I f +(path)3394 3504 w +10 R f +(must be the complete pathname that results)6 1792 1 3608 3504 t +( to this)2 295(from concatenating the pathname given as command line argument and the path relative)12 3665 2 1440 3624 t +( Example:)1 449( paths may be excluded.)4 994(directory. Multiple)1 796 3 1440 3744 t +(mkisofs)1440 3984 w +10 S1 f +(\261)1790 3984 w +10 R f +(o cd)1 177 1 1855 3984 t +10 S1 f +(\261)2065 3984 w +10 R f +(x /local/dir1)1 494 1 2130 3984 t +10 S1 f +(\261)2657 3984 w +10 R f +(x /local/dir2 /local)2 749 1 2722 3984 t +(NOTE: The)1 485 1 1440 4224 t +10 S1 f +(\261 \261)1 65 1 1961 4224 t +10 B f +(m m)1 83 1 2026 4224 t +10 R f +(and)2145 4224 w +10 S1 f +(\261 \261)1 65 1 2325 4224 t +10 B f +(x x)1 50 1 2390 4224 t +10 R f +( now)1 209( Both)1 265(option description should both be updated, they are wrong.)8 2449 3 2477 4224 t +( A \256le is excluded if either the last component)9 2124(work identical and use \256lename globbing.)5 1836 2 1440 4344 t +(matches or the whole path matches.)5 1465 1 1440 4464 t +10 S1 f +(\261 \261)1 65 1 1080 4632 t +10 B f +(X XA A)2 144 1 1145 4632 t +10 R f +( option is)2 397( This)1 248( original owner and mode information.)5 1608(Generate XA iso-directory attributes with)4 1707 4 1440 4632 t +( Kodak Photo CD and the)5 1160(required to create conforming multi session CDs as used by the)10 2800 2 1440 4752 t +( CD uses CD-ROM XA mode 1 sectors, see the)9 2002( conforming XA)2 680( A)1 140(Kodak Picture CD.)2 783 4 1440 4872 t +10 S1 f +(\261 \261)1 65 1 5081 4872 t +10 B f +( r)1 0( or)1 44( to)1 50( ec ct)2 77(s se)1 83 5 5146 4872 t +10 I f +(xa2)1440 4992 w +10 R f +(option for more information.)3 1173 1 1617 4992 t +10 S1 f +(\261 \261)1 65 1 1080 5160 t +10 B f +(x xa a)2 100 1 1145 5160 t +10 R f +( ID)1 150( User)1 266( mode information.)2 809(Generate XA iso-directory attributes with rationalized owner and)7 2735 4 1440 5160 t +( See)1 210(and group ID are set to 0.)6 1065 2 1440 5280 t +10 S1 f +(\261 \261)1 65 1 2748 5280 t +10 B f +(X XA A)2 144 1 2813 5280 t +10 R f +(for more information.)2 884 1 2990 5280 t +10 S1 f +(\261 \261)1 65 1 1080 5448 t +10 B f +(z z)1 44 1 1145 5448 t +10 R f +( of use and)3 522( is only)2 351( This)1 264(Generate special RRIP records for transparently compressed \256les.)7 2823 4 1440 5448 t +( You)1 249( or later.)2 373(interest for hosts that support transparent decompression, such as Linux 2.4.14)10 3338 3 1440 5568 t +(must specify the)2 687 1 1440 5688 t +10 S1 f +(\261 \261)1 65 1 2168 5688 t +10 B f +(R R)1 72 1 2233 5688 t +10 R f +(or)2346 5688 w +10 S1 f +(\261 \261)1 65 1 2470 5688 t +10 B f +(r r)1 44 1 2535 5688 t +10 R f +(options to enable RockRidge, and generate compressed \256les using)8 2780 1 2620 5688 t +(the)1440 5808 w +10 B f +( re ee e)3 88( ft tr)2 77( zf)1 33( kz)1 44(m mk)1 139 5 1606 5808 t +10 R f +( running)1 354(utility before)1 538 2 2031 5808 t +10 B f +( s)1 0( fs)1 39( of)1 33( so)1 50( is)1 39( ki)1 28(m mk)1 139 7 2966 5808 t +10 R f +( that transparent compression is a nonstan-)6 1811(. Note)1 295 2 3294 5808 t +( readable if used on)4 893( resulting disks are only transparently)5 1636( The)1 240(dard Rock Ridge extension.)3 1191 4 1440 5928 t +( other operating systems you will need to call)8 1927(Linux. On)1 458 2 1440 6048 t +10 B f +( re ee e)3 88( ft tr)2 77( zf)1 33( kz)1 44(m mk)1 139 5 3864 6048 t +10 R f +(by hand to decompress the)4 1117 1 4283 6048 t +(\256les.)1440 6168 w +9 B f +( S)1 0( NS)1 50( ON)1 65( IO)1 70( TI)1 35( PT)1 60( OP)1 55( O)1 100( S)1 0( FS)1 50(H HF)1 125 11 720 6456 t +10 S1 f +(\261 \261)1 65 1 1080 6576 t +10 B f +( s)1 0( fs)1 39(h hf)1 89 3 1145 6576 t +10 R f +( used in conjunction with the)5 1203(Create an ISO-9660/HFS hybrid CD. This option should be)8 2444 2 1440 6576 t +10 S1 f +(\261 \261)1 65 1 5121 6576 t +10 B f +( p)1 0( ap)1 56(m ma)1 133 3 5186 6576 t +10 R f +(,)5375 6576 w +10 S1 f +(\261 \261)1 65 1 1440 6696 t +10 B f +( c)1 0( ic)1 44( ag gi)2 78(m ma)1 133 4 1505 6696 t +10 R f +(and/or the various)2 737 1 1793 6696 t +10 I f +(double dash)1 494 1 2563 6696 t +10 R f +(options given below.)2 852 1 3090 6696 t +10 S1 f +(\261 \261)1 65 1 1080 6864 t +10 B f +( o)1 0(n no)1 106 2 1145 6864 t +10 S1 f +(\261 \261)1 65 1 1251 6864 t +10 B f +( s)1 0( fs)1 39(h hf)1 89 3 1316 6864 t +10 R f +(Do not create an ISO-9660/HFS hybrid CD even though other options may imply to do so.)15 3746 1 1440 6984 t +10 S1 f +(\261 \261)1 65 1 1080 7152 t +10 B f +( e)1 0( le)1 44( pp pl)2 84(a ap)1 106 4 1145 7152 t +10 R f +(Create an ISO-9660 CD with Apple's extensions. Similar to the)9 2728 1 1440 7152 t +10 S1 f +(\261 \261)1 65 1 4213 7152 t +10 B f +( s)1 0( fs)1 39(h hf)1 89 3 4278 7152 t +10 R f +( the)1 168(option, except that)2 781 2 4451 7152 t +( Former)1 370( HFS hybrid volume.)3 899(Apple Extensions to ISO-9660 are added instead of creating an)9 2691 3 1440 7272 t +( 18)1 1838( change: 2010/04/25)2 832( Last)1 1536(Version 3.0)1 474 4 720 7752 t +cleartomark +showpage +restore +%%EndPage: 18 18 %%Page: 19 19 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF 355.5(MKISOFS\(8\) MKISOFS\(8\))72 48 R -(\(MacIcelandandic\) and cp10081 \(MacT)108 84 Q(urkish\).)-.45 E .747 -(Note: the character codes used by HFS \214le names tak)108 100.8 R .746 -(en from the v)-.1 F .746(arious Apple/Unix formats will not be)-.25 F -(con)108 112.8 Q -.15(ve)-.4 G .687(rted as the).15 F 3.187(ya)-.15 G -.687(re assumed to be in the correct Apple character set. Only the Joli\ -et/Rock Ridge names)-3.187 F(deri)108 124.8 Q -.15(ve)-.25 G 2.5(df).15 -G(rom the HFS \214le names will be con)-2.5 E -.15(ve)-.4 G(rted.).15 E -.423(The e)108 141.6 R .423(xisting mkisofs code will \214lter out an) --.15 F 2.923(yi)-.15 G(lle)-2.923 E -.05(ga)-.15 G 2.923(lc).05 G .423 -(haracters for the ISO9660 and Joliet \214lenames, b)-2.923 F .422 -(ut as)-.2 F .279(mkisofs e)108 153.6 R .279 -(xpects to be dealing directly with Unix names, it lea)-.15 F -.15(ve) --.2 G 2.78(st).15 G .28(he Rock Ridge names as is.)-2.78 F .28 -(But as '/' is)5.28 F 2.5(al)108 165.6 S -2.25 -.15(eg a)-2.5 H 2.5(lH) -.15 G(FS \214lename character)-2.5 E 2.5(,t)-.4 G(he)-2.5 E/F1 10 -/Times-Bold@0 SF(\255mac-name)2.5 E F0(option con)2.5 E -.15(ve)-.4 G -(rts '/' to a '_' in Rock Ridge \214lenames.).15 E .292(If the Apple e) -108 182.4 R .291(xtensions are used, then only the ISO9660 \214lenames \ -will appear on the Macintosh. Ho)-.15 F(we)-.25 E -.15(ve)-.25 G -.4(r,) -.15 G .6(as the Macintosh ISO9660 dri)108 194.4 R -.15(ve)-.25 G .6 -(rs can use).15 F/F2 10/Times-Italic@0 SF(Le)3.1 E .6(vel 2)-.15 F F0 .6 -(\214lenames, then you can use options lik)3.1 F(e)-.1 E F1(\255allo)3.1 -E(w-multi-)-.1 E(dot)108 206.4 Q F0 1.077 -(without problems on a Macintosh - still tak)3.578 F 3.577(ec)-.1 G -1.077(are o)-3.577 F -.15(ve)-.15 G 3.577(rt).15 G 1.077 -(he names, for e)-3.577 F(xample)-.15 E F2(this.\214le)3.577 E(.name) --.15 E F0 1.077(will be)3.577 F(con)108 218.4 Q -.15(ve)-.4 G 1.439 -(rted to).15 F F2(THIS.FILE)3.939 E F0 1.439(i.e. only ha)3.939 F 1.739 --.15(ve o)-.2 H 1.439(ne '.).15 F 1.439(', also \214lename)-.7 F F2 -(abcdefgh)3.939 E F0 1.44(will be seen as)3.94 F F2(ABCDEFGH)3.94 E F0 --.2(bu)3.94 G(t).2 E F2(abcdefghi)108 230.4 Q F0 .443(will be seen as) -2.943 F F2(ABCDEFGHI.)2.943 E F0 .443(i.e. with a '.)5.443 F 2.943('a) --.7 G 2.943(tt)-2.943 G .443(he end - don')-2.943 F 2.943(tk)-.18 G(no) --2.943 E 2.943(wi)-.25 G 2.943(ft)-2.943 G .442 -(his is a Macintosh prob-)-2.943 F 1.212(lem or mkisofs/mkh)108 242.4 R -1.212(ybrid problem. All \214lenames will be in uppercase when vie)-.05 -F 1.212(wed on a Macintosh. Of)-.25 F(course, DOS/W)108 254.4 Q -(in3.X machines will not be able to see Le)-.4 E -.15(ve)-.25 G 2.5 -(l2\214).15 G(lenames...)-2.5 E/F3 10.95/Times-Bold@0 SF(HFS CUST)72 -283.2 Q(OM V)-.197 E(OLUME/FOLDER ICONS)-.493 E F0 2.072 -.8(To g)108 -295.2 T -2.15 -.25(iv e).8 H 2.972(aH)3.222 G .472 -(FS CD a custom icon, mak)-2.972 F 2.972(es)-.1 G .472 -(ure the root \(top le)-2.972 F -.15(ve)-.25 G .471 -(l\) folder includes a standard Macintosh v).15 F(ol-)-.2 E .465 -(ume icon \214le. T)108 307.2 R 2.965(og)-.8 G -2.15 -.25(iv e)-2.965 H -2.965(av)3.215 G .466 -(olume a custom icon on a Macintosh, an icon has to be pasted o)-3.165 F --.15(ve)-.15 G 2.966(rt).15 G .466(he v)-2.966 F(olume')-.2 E(s)-.55 E -.707(icon in the "Get Info" box of the v)108 319.2 R .706 -(olume. This creates an in)-.2 F .706 -(visible \214le called 'Icon\\r' \('\\r' is the 'carriage)-.4 F -(return' character\) in the root folder)108 331.2 Q(.)-.55 E 2.5(Ac)108 -348 S(ustom folder icon is v)-2.5 E(ery similar - an in)-.15 E -(visible \214le called 'Icon\\r' e)-.4 E(xits in the folder itself.)-.15 -E .181(Probably the easiest w)108 364.8 R .182(ay to create a custom ic\ -on that mkisofs can use, is to format a blank HFS \215opp)-.1 F 2.682 -(yd)-.1 G(isk)-2.682 E 1.068(on a Mac, paste an icon to its "Get Info" \ -box. If using Linux with the HFS module installed, mount the)108 376.8 R -(\215opp)108 388.8 Q 2.5(yu)-.1 G(sing something lik)-2.5 E(e:)-.1 E -(mount \255t hfs /de)152.45 412.8 Q(v/fd0 /mnt/\215opp)-.25 E(y)-.1 E -(The \215opp)108 436.8 Q 2.5(yw)-.1 G -(ill be mounted as a CAP \214le system by def)-2.5 E -(ault. Then run mkisofs using something lik)-.1 E(e:)-.1 E -(mkisofs \255\255cap \255o output source_dir /mnt/\215opp)152.45 460.8 Q -(y)-.1 E .03 -(If you are not using Linux, then you can use the hfsutils to cop)108 -484.8 R 2.53(yt)-.1 G .03(he icon \214le from the \215opp)-2.53 F 1.33 --.65(y. H)-.1 H -.25(ow).65 G -2.15 -.25(ev e).25 H .83 -.4(r, c).25 H -(are).4 E(has to be tak)108 496.8 Q -(en, as the icon \214le contains a control character)-.1 E 2.5(.e)-.55 G -(.g.)-2.5 E(hmount /de)152.45 520.8 Q(v/fd0)-.25 E(hdir \255a)152.45 -532.8 Q(hcop)152.45 544.8 Q 2.5<79ad>-.1 G 2.5(mI)-2.5 G -(con^V^M icon_dir/icon)-2.5 E(Where '^V^M' is control-V follo)108 568.8 -Q(wed by control-M. Then run)-.25 E F1(mkisofs)2.5 E F0 -(by using something lik)2.5 E(e:)-.1 E -(mkisofs \255\255macbin \255o output source_dir icon_dir)152.45 592.8 Q -.681(The procedure for creating/using custom folder icons is v)108 609.6 -R .68(ery similar - paste an icon to folder')-.15 F 3.18(s")-.55 G .68 -(Get Info")-3.18 F -(box and transfer the resulting 'Icon\\r' \214le to the rele)108 621.6 Q --.25(va)-.25 G(nt directory in the mkisofs source tree.).25 E -1.1(Yo) -108 638.4 S 2.5(um)1.1 G(ay w)-2.5 E -(ant to hide the icon \214les from the ISO9660 and Joliet trees.)-.1 E -4.317 -.8(To g)108 655.2 T -2.15 -.25(iv e).8 H 5.217(ac)5.467 G 2.717 -(ustom icon to a Joliet CD, follo)-5.217 F 5.217(wt)-.25 G 2.717 -(he instructions found at: http://www)-5.217 F(.f)-.65 E(adden.com/cdr) --.1 E(-)-.2 E -.1(fa)108 667.2 S(q/f).1 E(aq03.html#[3-21])-.1 E F3 -(HFS BOO)72 696 Q 2.738(TD)-.438 G(RIVER)-2.738 E F0(It)108 708 Q F2 -(may)2.5 E F0(be possible to mak)2.5 E 2.5(et)-.1 G(he h)-2.5 E -(ybrid CD bootable on a Macintosh.)-.05 E 3.103(Ab)108 724.8 S .603 -(ootable HFS CD requires an Apple CD-R)-3.103 F .602 -(OM \(or compatible\) dri)-.4 F -.15(ve)-.25 G 1.402 -.4(r, a b).15 H -.602(ootable HFS partition and the).4 F -1.11(Ve)72 768 S(rsion 2.0)1.11 -E(24 Dec 2002)162.9 E(19)198.45 E EP +save +mark +19 pagesetup +10 R f +( \( 8 \))3 164( MKISOFS)1 3525(Maintenance Procedures)1 991 3 720 480 t +10 B f +( s)1 0( fs)1 39( of)1 33( so)1 50( is)1 39( ki)1 28(m mk)1 139 7 1440 960 t +10 R f +( by default if)3 579(versions did include Rock Ridge attributes)5 1807 2 1814 960 t +10 S1 f +(\261 \261)1 65 1 4247 960 t +10 B f +( e)1 0( le)1 44( pp pl)2 84(a ap)1 106 4 4312 960 t +10 R f +(was speci\256ed. This)2 807 1 4593 960 t +(versions of)1 458 1 1440 1080 t +10 B f +( s)1 0( fs)1 39( of)1 33( so)1 50( is)1 39( ki)1 28(m mk)1 139 7 1939 1080 t +10 R f +(does not do this anymore. If you like to have Rock Ridge attributes, you)13 3092 1 2308 1080 t +(need to specify this separately.)4 1260 1 1440 1200 t +10 S1 f +(\261 \261)1 65 1 1080 1368 t +10 B f +( p)1 0( ap)1 56(m ma)1 133 3 1145 1368 t +10 I f +(mapping)1367 1368 w +10 S f +(_)1717 1368 w +10 I f +(\256le)1767 1368 w +10 R f +(Use the)1 329 1 1440 1488 t +10 I f +(mapping)1821 1488 w +10 S f +(_)2171 1488 w +10 I f +(\256le)2221 1488 w +10 R f +(to set the CREATOR and TYPE information for a \256le based on the)12 3005 1 2395 1488 t +( mapped only if it is not one of the know Apple/Unix \256le)12 2481(\256lename's extension. A \256lename is)4 1479 2 1440 1608 t +(formats. See the)2 662 1 1440 1728 t +10 B f +( E)1 0( PE)1 67( YP)1 61( TY)1 72( /T)1 67( R/)1 28( OR)1 72( TO)1 78( AT)1 67( EA)1 72( CR RE)2 139( C)1 105( S)1 0( FS)1 56(H HF)1 139 15 2135 1728 t +10 R f +(section below.)1 585 1 3191 1728 t +10 S1 f +(\261 \261)1 65 1 1080 1896 t +10 B f +( c)1 0( ic)1 44( ag gi)2 78(m ma)1 133 4 1145 1896 t +10 I f +(magic)1433 1896 w +10 S f +(_)1677 1896 w +10 I f +(\256le)1727 1896 w +10 R f +( and TYPE information is set by using a \256le's)9 1956(The CREATOR)1 660 2 1440 2016 t +10 I f +(magic number)1 588 1 4095 2016 t +10 R f +(\(usually the \256rst)2 678 1 4722 2016 t +(few bytes of a \256le\). The)5 1033 1 1440 2136 t +10 I f +(magic)2514 2136 w +10 S f +(_)2758 2136 w +10 I f +(\256le)2808 2136 w +10 R f +(is only used if a \256le is not one of the known Apple/Unix)12 2429 1 2971 2136 t +( the)1 167(\256le formats, or the \256lename extension has not been mapped using)10 2812 2 1440 2256 t +10 S1 f +(\261 \261)1 65 1 4464 2256 t +10 B f +( p)1 0( ap)1 56(m ma)1 133 3 4529 2256 t +10 R f +(option. See the)2 637 1 4763 2256 t +10 B f +( E)1 0( PE)1 67( YP)1 61( TY)1 72( /T)1 67( R/)1 28( OR)1 72( TO)1 78( AT)1 67( EA)1 72( CR RE)2 139( C)1 105( S)1 0( FS)1 56(H HF)1 139 15 1440 2376 t +10 R f +(section below for more details.)4 1266 1 2496 2376 t +10 S1 f +(\261 \261)1 65 1 1080 2544 t +10 B f +( s)1 0( fs)1 39(h hf)1 89 3 1145 2544 t +10 S1 f +(\261 \261)1 65 1 1273 2544 t +10 B f +( r)1 0( or)1 44( to)1 50( at)1 33(c cr re ea)3 182 5 1338 2544 t +10 I f +(CREATOR)1680 2544 w +10 R f +( \256les. Must be exactly 4 characters. See the)8 2116(Set the default CREATOR for all)5 1575 2 1440 2664 t +10 B f +( S)1 0( FS)1 56(H HF)1 139 3 5205 2664 t +( E)1 0( PE)1 67( YP)1 61( TY)1 72( /T)1 67( R/)1 28( OR)1 72( TO)1 78( AT)1 67( EA)1 72(C CR RE)2 211 11 1440 2784 t +10 R f +(section below for more details.)4 1266 1 2268 2784 t +10 S1 f +(\261 \261)1 65 1 1080 2952 t +10 B f +( s)1 0( fs)1 39(h hf)1 89 3 1145 2952 t +10 S1 f +(\261 \261)1 65 1 1273 2952 t +10 B f +( e)1 0( pe)1 44( yp)1 56(t ty)1 83 4 1338 2952 t +10 I f +(TYPE)1554 2952 w +10 R f +( the)1 212(Set the default TYPE for all \256les. Must be exactly 4 characters. See)12 3463 2 1440 3072 t +10 B f +( S)1 0( FS)1 56(H HF)1 139 3 5205 3072 t +( E)1 0( PE)1 67( YP)1 61( TY)1 72( /T)1 67( R/)1 28( OR)1 72( TO)1 78( AT)1 67( EA)1 72(C CR RE)2 211 11 1440 3192 t +10 R f +(section below for more details.)4 1266 1 2268 3192 t +10 S1 f +(\261 \261)1 65 1 1080 3360 t +10 B f +( e)1 0( be)1 44( ob)1 56( ro)1 50(p pr)1 100 5 1145 3360 t +10 R f +( the)1 160( See)1 215( of \256les for all the known Apple/Unix \256le formats.)9 2132(Search the contents)2 800 4 1440 3360 t +10 B f +( -)1 0( N-)1 33( IN)1 72( AC CI)2 111( MA)1 72( M)1 132( S)1 0( FS)1 56(H HF)1 139 9 4785 3360 t +( S)1 0( TS)1 56( AT)1 67( MA)1 72( RM)1 94( OR)1 72( FO)1 78( F)1 96( LE E)2 67( IL)1 67( FI)1 39( F)1 96( H)1 0( SH)1 78( OS)1 56(T TO)1 145 16 1440 3480 t +10 R f +( only way)2 412( the)1 157( However,)1 458(section below for more about these formats.)6 1815 4 2558 3480 t +(to check for)2 508 1 1440 3600 t +10 I f +(MacBinary)1989 3600 w +10 R f +(and)2479 3600 w +10 I f +(AppleSingle)2664 3600 w +10 R f +( them. Therefore this option)4 1186(\256les is to open and read)5 1026 2 3188 3600 t +10 I f +(may)1440 3720 w +10 R f +( more)1 243(increase processing time. It is better to use one or)9 2100 2 1645 3720 t +10 I f +(double dash)1 499 1 4026 3720 t +10 R f +(options given below)2 837 1 4563 3720 t +(if the Apple/Unix formats in use are known.)7 1820 1 1440 3840 t +10 S1 f +(\261 \261)1 65 1 1080 4008 t +10 B f +( o)1 0(n no)1 106 2 1145 4008 t +10 S1 f +(\261 \261)1 65 1 1251 4008 t +10 B f +( p)1 0( op)1 56( to)1 50( kt)1 33( sk)1 56( es)1 39(d de)1 100 7 1316 4008 t +10 R f +( will be created when the CD is)7 1382(Do not create \(empty\) Desktop \256les. New HFS Desktop \256les)9 2578 2 1440 4128 t +( default, empty Desktop \256les are)5 1388( By)1 193( Folder\).)1 362(used on a Macintosh \(and stored in the System)8 2017 4 1440 4248 t +(added to the HFS volume.)4 1079 1 1440 4368 t +10 S1 f +(\261 \261)1 65 1 1080 4536 t +10 B f +( c)1 0( ac)1 44(m ma)1 133 3 1145 4536 t +10 S1 f +(\261 \261)1 65 1 1322 4536 t +10 B f +( e)1 0( me)1 44( am)1 83(n na)1 106 4 1387 4536 t +10 R f +( the ISO-9660, Joliet and Rock Ridge \256le names.)8 2048(Use the HFS \256lename as the starting point for)8 1912 2 1440 4656 t +(See the)1 299 1 1440 4776 t +10 B f +( S)1 0( ES)1 56( ME)1 67( NA AM)2 166( N)1 105( LE E)2 67( IL)1 67( FI)1 39( F)1 94( H)1 0( SH)1 78( OS)1 56( TO)1 78( NT)1 67( IN)1 72( AC CI)2 111( MA)1 72( M)1 127( S)1 0( FS)1 56(H HF)1 139 21 1772 4776 t +10 R f +(section below for more information.)4 1477 1 3322 4776 t +10 S1 f +(\261 \261)1 65 1 1080 4944 t +10 B f +( t)1 0( oo ot)2 83(b bo)1 106 3 1145 4944 t +10 S1 f +(\261 \261)1 65 1 1334 4944 t +10 B f +( s)1 0( fs)1 39(h hf)1 89 3 1399 4944 t +10 S1 f +(\261 \261)1 65 1 1527 4944 t +10 B f +( e)1 0( le)1 44(\256 \256l)1 84 3 1592 4944 t +10 I f +(driver)1753 4944 w +10 S f +(_)1997 4944 w +10 I f +(\256le)2047 4944 w +10 R f +(Installs the)1 454 1 1440 5064 t +10 I f +(driver)1937 5064 w +10 S f +(_)2181 5064 w +10 I f +(\256le)2231 5064 w +10 R f +(that)2396 5064 w +10 I f +(may)2589 5064 w +10 R f +( CD bootable on a Macintosh. See the)7 1648(make the)1 381 2 2798 5064 t +10 B f +( T)1 0( OO OT)2 145( BO)1 78( B)1 111( S)1 0( FS)1 56(H HF)1 139 7 4871 5064 t +( R)1 0( ER)1 72( VE)1 67( IV)1 72(D DR RI)2 183 5 1440 5184 t +10 R f +(section below. \(Alpha\).)2 953 1 1867 5184 t +10 S1 f +(\261 \261)1 65 1 1080 5352 t +10 B f +( t)1 0( rt)1 33( ar)1 44(p pa)1 106 4 1145 5352 t +10 R f +( generated, but some older)4 1156(Generate an HFS partition table. By default, no partition table is)10 2804 2 1440 5352 t +( the CDROM to be able to recognize)7 1523(Macintosh CDROM drivers need an HFS partition table on)8 2437 2 1440 5472 t +(a hybrid CDROM.)2 763 1 1440 5592 t +10 S1 f +(\261 \261)1 65 1 1080 5760 t +10 B f +( o)1 0( to)1 50( ut)1 33(a au)1 106 4 1145 5760 t +10 I f +(AutoStart)1367 5760 w +10 S f +(_)1751 5760 w +10 I f +(\256le)1801 5760 w +10 R f +( CD use the QuickTime 2.0 Autostart feature to launch an application or docu-)13 3347(Make the HFS)2 613 2 1440 5880 t +( document or application located at the top)7 1846(ment. The given \256lename must be the name of a)9 2114 2 1440 6000 t +(level of the CD. The \256lename must be less than 12 characters. \(Alpha\).)12 2932 1 1440 6120 t +10 S1 f +(\261 \261)1 65 1 1080 6288 t +10 B f +( er r)2 44( te)1 44( st)1 33( us)1 39( lu)1 56(c cl)1 72 6 1145 6288 t +10 S1 f +(\261 \261)1 65 1 1433 6288 t +10 B f +( ze e)2 44( iz)1 44(s si)1 67 3 1498 6288 t +10 I f +(size)1686 6288 w +10 R f +( in bytes of the cluster or allocation units of PC Exchange \256les. Implies the)14 3443(Set the size)2 517 2 1440 6408 t +10 S1 f +(\261 \261\261 \261)2 130 1 1440 6528 t +10 B f +( e)1 0( ge)1 44( ng)1 50( an)1 56( ha)1 50( ch)1 56( xc)1 44(e ex)1 94 8 1570 6528 t +10 R f +(option. See the)2 613 1 1997 6528 t +10 B f +( S)1 0( TS)1 56( AT)1 67( MA)1 72( RM)1 94( OR)1 72( FO)1 78( F)1 94( LE E)2 67( IL)1 67( FI)1 39( F)1 94( H)1 0( SH)1 78( OS)1 56( TO)1 78( NT)1 67( IN)1 72( AC CI)2 111( MA)1 72( M)1 127( S)1 0( FS)1 56(H HF)1 139 24 2643 6528 t +10 R f +(section below.)1 585 1 4332 6528 t +10 S1 f +(\261 \261)1 65 1 1080 6696 t +10 B f +( e)1 0( de)1 44( id)1 56(h hi)1 84 4 1145 6696 t +10 S1 f +(\261 \261)1 65 1 1329 6696 t +10 B f +( s)1 0( fs)1 39(h hf)1 89 3 1394 6696 t +10 I f +(glob)1555 6696 w +10 R f +(Hide)1440 6816 w +10 I f +(glob)1677 6816 w +10 R f +( in the ISO-9660 and/or)4 1025(from the HFS volume. The \256le or directory will still exist)10 2477 2 1898 6816 t +(Joliet directory.)1 638 1 1440 6936 t +10 I f +(glob)2147 6936 w +10 R f +( shell wild-card-style pattern that must match any part of the \256lename)11 2892(is a)1 147 2 2361 6936 t +( Example:)1 449(Multiple globs may be excluded.)4 1345 2 1440 7056 t +(mkisofs)1440 7296 w +10 S1 f +(\261)1790 7296 w +10 R f +(o rom)1 244 1 1855 7296 t +10 S1 f +(\261)2132 7296 w +10 R f +(hfs)2197 7296 w +10 S1 f +(\261)2352 7296 w +10 R f +(hide)2417 7296 w +10 S1 f +(\261)2589 7296 w +10 R f +(hfs ')1 188 1 2654 7296 t +10 S f +(*)2842 7296 w +10 R f +(.o')2892 7296 w +10 S1 f +(\261)3033 7296 w +10 R f +(hide)3098 7296 w +10 S1 f +(\261)3270 7296 w +10 R f +(hfs foobar)1 415 1 3335 7296 t +( 19)1 1838( change: 2010/04/25)2 832( Last)1 1536(Version 3.0)1 474 4 720 7776 t +cleartomark +showpage +restore +%%EndPage: 19 19 %%Page: 20 20 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF 355.5(MKISOFS\(8\) MKISOFS\(8\))72 48 R -(necessary System, Finder)108 84 Q 2.5(,e)-.4 G(tc. \214les.)-2.5 E -2.928(Ad)108 100.8 S(ri)-2.928 E -.15(ve)-.25 G 2.928(rc).15 G .428 -(an be obtained from an)-2.928 F 2.928(yo)-.15 G .428 -(ther Macintosh bootable CD-R)-2.928 F .428(OM using the)-.4 F/F1 10 -/Times-Italic@0 SF(apple_driver)2.928 E F0(utility)2.928 E 2.928(.T)-.65 -G(his)-2.928 E(\214le can then be used with the)108 112.8 Q/F2 10 -/Times-Bold@0 SF(\255boot-hfs-\214le)2.5 E F0(option.)2.5 E 1.563 -(The HFS partition \(i.e. the h)108 129.6 R 1.563 -(ybrid disk in our case\) must contain a suitable System F)-.05 F(older) --.15 E 4.063(,a)-.4 G -.05(ga)-4.063 G 1.562(in from).05 F(another CD-R) -108 141.6 Q(OM or disk.)-.4 E -.15(Fo)108 158.4 S 2.851(rap).15 G .351 -(artition to be bootable, it must ha)-2.851 F .652 -.15(ve i)-.2 H(t') -.15 E(s)-.55 E F1 .352(boot bloc)2.852 F(k)-.2 E F0 .352 -(set. The boot block is in the \214rst tw)2.852 F 2.852(ob)-.1 G .352 -(locks of a)-2.852 F 1.67(partition. F)108 170.4 R 1.67 -(or a non-bootable partition the boot block is full of zeros. Normally) --.15 F 4.169(,w)-.65 G 1.669(hen a System \214le is)-4.169 F .41(copied\ - to partition on a Macintosh disk, the boot block is \214lled with a nu\ -mber of required settings - unfor)108 182.4 R(-)-.2 E(tunately I don') -108 194.4 Q 2.5(tk)-.18 G(no)-2.5 E 2.5(wt)-.25 G -(he full spec for the boot block, so I'm guessing that the follo)-2.5 E -(wing will w)-.25 E(ork OK.)-.1 E .815(Therefore, the utility)108 211.2 -R F1(apple_driver)3.314 E F0 .814(also e)3.314 F .814(xtracts the boot \ -block from the \214rst HFS partition it \214nds on the)-.15 F(gi)108 -223.2 Q -.15(ve)-.25 G 2.5(nC).15 G(D-R)-2.5 E -(OM and this is used for the HFS partition created by)-.4 E F2(mkisofs) -2.5 E F0(.)A(PLEASE NO)108 240 Q(TE)-.4 E .522(By using a dri)144 252 R --.15(ve)-.25 G 3.022(rf).15 G .522(rom an Apple CD and cop)-3.022 F .522 -(ying Apple softw)-.1 F .523(are to your CD, you become liable)-.1 F -(to obe)144 264 Q 2.5(yA)-.15 G(pple Computer)-2.5 E 2.5(,I)-.4 G -(nc. Softw)-2.5 E(are License Agreements.)-.1 E/F3 10.95/Times-Bold@0 SF -(EL T)72 280.8 Q(ORIT)-.197 E 2.738(OB)-.197 G(OO)-2.738 E 2.738(TI) --.438 G(NFORMA)-2.738 E(TION T)-1.04 E(ABLE)-.986 E F0 .205(When the)108 -292.8 R F2(\255boot-inf)2.705 E(o-table)-.25 E F0 .204(option is gi) -2.704 F -.15(ve)-.25 G(n,).15 E F2(mkisofs)2.704 E F0 .204 -(will modify the boot \214le speci\214ed by the)2.704 F F22.704 E -F0 .204(option by)2.704 F .63 -(inserting a 56-byte "boot information table" at of)108 304.8 R .63 -(fset 8 in the \214le.)-.25 F .63 -(This modi\214cation is done in the source)5.63 F .163 -(\214lesystem, so mak)108 316.8 R 2.662(es)-.1 G .162(ure you use a cop) --2.662 F 2.662(yi)-.1 G 2.662(ft)-2.662 G .162 -(his \214le is not easily recreated!)-2.662 F .162 -(This \214le contains pointers which)5.162 F -(may not be easily or reliably obtained at boot time.)108 328.8 Q -(The format of this table is as follo)108 345.6 Q(ws; all inte)-.25 E -(gers are in section 7.3.1 \("little endian"\) format.)-.15 E(Of)122.4 -369.6 Q 44.76(fset Name)-.25 F 52.28(Size Meaning)84.12 F 64.5(8b)124.9 -381.6 S 77.72(i_pvd 4)-64.5 F 40.89(bytes LB)2.5 F 2.5(Ao)-.35 G 2.5(fp) --2.5 G(rimary v)-2.5 E(olume descriptor)-.2 E 59.5(12 bi_\214le)122.4 -393.6 R 2.5(4b)82.44 G 40.89(ytes LB)-2.5 F 2.5(Ao)-.35 G 2.5(fb)-2.5 G -(oot \214le)-2.5 E 59.5(16 bi_length)122.4 405.6 R 2.5(4b)70.22 G 40.89 -(ytes Boot)-2.5 F(\214le length in bytes)2.5 E 59.5(20 bi_csum)122.4 -417.6 R 2.5(4b)74.11 G 40.89(ytes 32-bit)-2.5 F(checksum)2.5 E 59.5 -(24 bi_reserv)122.4 429.6 R 59(ed 40)-.15 F 35.89(bytes Reserv)2.5 F(ed) --.15 E .364(The 32-bit checksum is the sum of all the 32-bit w)108 453.6 -R .365(ords in the boot \214le starting at byte of)-.1 F .365(fset 64.) --.25 F .365(All linear)5.365 F(block addresses \(LB)108 465.6 Q -(As\) are gi)-.35 E -.15(ve)-.25 G 2.5(ni).15 G 2.5(nC)-2.5 G 2.5(Ds) --2.5 G(ectors \(normally 2048 bytes\).)-2.5 E F3(CONFIGURA)72 482.4 Q -(TION)-1.04 E F2(mkisofs)108 494.4 Q F0 .633(looks for the)3.133 F F2 -(.mkisofsr)3.133 E(c)-.18 E F0 .633(\214le, \214rst in the current w) -3.133 F .633(orking directory)-.1 F 3.133(,t)-.65 G .633 -(hen in the user')-3.133 F 3.133(sh)-.55 G .632(ome direc-)-3.133 F -(tory)108 506.4 Q 2.565(,a)-.65 G .065 -(nd then in the directory in which the)-2.565 F F2(mkisofs)2.565 E F0 -.065(binary is stored.)2.565 F .065 -(This \214le is assumed to contain a series)5.065 F .209 -(of lines of the form)108 518.4 R F2 -1.25 -.9(TA G)2.709 H(=).9 E F1 -(value).29 E(,)-.1 E F0 .209(and in this w)2.709 F .209 -(ay you can specify certain options.)-.1 F .209 -(The case of the tag is not)5.209 F 3.918(signi\214cant. Some)108 530.4 -R 1.419(\214elds in the v)3.918 F 1.419 -(olume header are not settable on the command line, b)-.2 F 1.419 -(ut can be altered)-.2 F .124(through this f)108 542.4 R(acility)-.1 E -5.124(.C)-.65 G .124(omments may be placed in this \214le, using lines \ -which start with a hash \(#\) character)-5.124 F(.)-.55 E F2(APPI)108 -559.2 Q F0 .681(The application identi\214er should describe the applic\ -ation that will be on the disc.)12.67 F .682(There is space)5.682 F 1.36 -(on the disc for 128 characters of information.)144 571.2 R 1.359 -(May be o)6.359 F -.15(ve)-.15 G 1.359(rridden using the).15 F F2 -3.859 E F0 1.359(command line)3.859 F(option.)144 583.2 Q F2(COPY)108 -600 Q F0 1.138(The cop)7.67 F 1.139(yright information, often the name \ -of a \214le on the disc containing the cop)-.1 F 1.139(yright notice.) --.1 F .703(There is space in the disc for 37 characters of information.) -144 612 R .702(May be o)5.702 F -.15(ve)-.15 G .702(rridden using the) -.15 F F2(\255copy-)3.202 E(right)144 624 Q F0(command line option.)2.5 E -F2(ABST)108 640.8 Q F0 1.473(The abstract information, often the name o\ -f a \214le on the disc containing an abstract.)9.88 F 1.474(There is) -6.474 F .768(space in the disc for 37 characters of information.)144 -652.8 R .768(May be o)5.768 F -.15(ve)-.15 G .768(rridden using the).15 -F F2(\255abstract)3.268 E F0(com-)3.268 E(mand line option.)144 664.8 Q -F2(BIBL)108 681.6 Q F0 1.751(The bibliographic information, often the n\ -ame of a \214le on the disc containing a bibliograph)12.1 F -.65(y.)-.05 -G .98(There is space in the disc for 37 characters of information.)144 -693.6 R .979(May be o)5.979 F -.15(ve)-.15 G .979(rridden using the).15 -F F2(\255bilio)3.479 E F0(command line option.)144 705.6 Q -1.11(Ve)72 -768 S(rsion 2.0)1.11 E(24 Dec 2002)162.9 E(20)198.45 E EP +save +mark +20 pagesetup +10 R f +( \( 8 \))3 164( MKISOFS)1 3525(Maintenance Procedures)1 991 3 720 480 t +(would exclude all \256les ending in)5 1347 1 1440 960 t +10 S1 f +(")2821 960 w +10 R f +(.o)2862 960 w +10 S1 f +(")2937 960 w +10 R f +(or called)1 355 1 3012 960 t +10 S1 f +(")3401 960 w +10 R f +(foobar)3442 960 w +10 S1 f +(")3702 960 w +10 R f +( volume. Note that if you)5 1055(from the HFS)2 568 2 3777 960 t +(had a directory called)3 924 1 1440 1080 t +10 S1 f +(")2410 1080 w +10 R f +(foobar)2451 1080 w +10 S1 f +(")2711 1080 w +10 R f +( excluded.)1 430(it too \(and of course all its descendants\) would be)9 2172 2 2798 1080 t +(The)1440 1200 w +10 I f +(glob)1630 1200 w +10 R f +( be a path name relative to the source directories given on the command line.)14 3223(can also)1 334 2 1843 1200 t +(Example:)1440 1320 w +(mkisofs)1440 1560 w +10 S1 f +(\261)1790 1560 w +10 R f +(o rom)1 244 1 1855 1560 t +10 S1 f +(\261)2132 1560 w +10 R f +(hfs)2197 1560 w +10 S1 f +(\261)2352 1560 w +10 R f +(hide)2417 1560 w +10 S1 f +(\261)2589 1560 w +10 R f +(hfs src/html src)2 632 1 2654 1560 t +( directory called)2 670(would exclude just the \256le or)5 1213 2 1440 1800 t +10 S1 f +(")3359 1800 w +10 R f +(html)3400 1800 w +10 S1 f +(")3584 1800 w +10 R f +(from the)1 352 1 3661 1800 t +10 S1 f +(")4049 1800 w +10 R f +(src)4090 1800 w +10 S1 f +(")4206 1800 w +10 R f +(directory. Any other \256le or)4 1117 1 4283 1800 t +(directory called)1 635 1 1440 1920 t +10 S1 f +(")2112 1920 w +10 R f +(html)2153 1920 w +10 S1 f +(")2337 1920 w +10 R f +( be used with the)4 721( Should)1 354(in the tree will not be excluded.)6 1334 3 2415 1920 t +10 S1 f +(\261 \261)1 65 1 4860 1920 t +10 B f +( e)1 0( de)1 44( id)1 56(h hi)1 84 4 4925 1920 t +10 R f +(and/or)5145 1920 w +10 S1 f +(\261 \261)1 65 1 1440 2040 t +10 B f +( e)1 0( de)1 44( id)1 56(h hi)1 84 4 1505 2040 t +10 S1 f +(\261 \261)1 65 1 1689 2040 t +10 B f +( t)1 0( et)1 33( li ie)2 72( ol)1 28(j jo)1 83 5 1754 2040 t +10 R f +( order to match a directory name, make sure the pathname does not)12 2908(options. In)1 479 2 2013 2040 t +(include a trailing '/' character. See README.hide for more details.)9 2777 1 1440 2160 t +10 S1 f +(\261 \261)1 65 1 1080 2328 t +10 B f +( e)1 0( de)1 44( id)1 56(h hi)1 84 4 1145 2328 t +10 S1 f +(\261 \261)1 65 1 1329 2328 t +10 B f +( s)1 0( fs)1 39(h hf)1 89 3 1394 2328 t +10 S1 f +(\261 \261)1 65 1 1522 2328 t +10 B f +( t)1 0( st)1 33(l li is)2 95 3 1587 2328 t +10 I f +(\256le)1748 2328 w +10 R f +(A \256le containing a list of)5 1037 1 1440 2448 t +10 I f +(globs)2510 2448 w +10 R f +(to be hidden as above.)4 922 1 2760 2448 t +10 S1 f +(\261 \261)1 65 1 1080 2616 t +10 B f +( s)1 0( fs)1 39(h hf)1 89 3 1145 2616 t +10 S1 f +(\261 \261)1 65 1 1273 2616 t +10 B f +( d)1 0( li id)2 84(v vo ol)2 128 3 1338 2616 t +10 I f +(hfs)1583 2616 w +10 S f +(_)1700 2616 w +10 I f +(volid)1750 2616 w +10 R f +( HFS partition. This is the name that is assigned to the disc on a Macin-)15 3070(Volume name for the)3 890 2 1440 2736 t +(tosh and replaces the)3 858 1 1440 2856 t +10 I f +(volid)2331 2856 w +10 R f +(used with the)2 549 1 2564 2856 t +10 S1 f +(\261 \261)1 65 1 3146 2856 t +10 B f +(V V)1 72 1 3211 2856 t +10 R f +(option)3316 2856 w +10 S1 f +(\261 \261)1 65 1 1080 3024 t +10 B f +( n)1 0( on)1 56( co)1 50(i ic)1 72 4 1145 3024 t +10 S1 f +(\261 \261)1 65 1 1323 3024 t +10 B f +( n)1 0( on)1 56( io)1 50( ti)1 28( it)1 33( si)1 28( os)1 39(p po)1 106 8 1388 3024 t +10 R f +( icons will appear)3 746( The)1 226( \256le.)1 191(Use the icon position information, if it exists, from the Apple/Unix)10 2797 4 1440 3144 t +( they would on a Macintosh desktop. Folder location and size on screen,)12 3005(in the same position as)4 955 2 1440 3264 t +( This)1 261( View \(view as Icons, Small Icons, etc.\) are also preserved.)10 2610(its scroll positions, folder)3 1089 3 1440 3384 t +( \(Alpha\).)1 401(option may become set by default in the future.)8 1953 2 1440 3504 t +10 S1 f +(\261 \261)1 65 1 1080 3672 t +10 B f +( t)1 0( oo ot)2 83(r ro)1 94 3 1145 3672 t +10 S1 f +(\261 \261)1 65 1 1322 3672 t +10 B f +( o)1 0( fo)1 50( nf)1 33(i in)1 84 4 1387 3672 t +10 I f +(\256le)1587 3672 w +10 R f +( size on screen, scroll positions, folder View etc. for the root folder of an HFS)15 3291(Set the location,)2 669 2 1440 3792 t +( \(Alpha\))1 376(volume. See README.rootinfo for more information.)5 2221 2 1440 3912 t +10 S1 f +(\261 \261)1 65 1 1080 4080 t +10 B f +( p)1 0( re ep)2 100(p pr)1 100 3 1145 4080 t +10 S1 f +(\261 \261)1 65 1 1345 4080 t +10 B f +( t)1 0( oo ot)2 83(b bo)1 106 3 1410 4080 t +10 I f +(FILE)1632 4080 w +10 R f +(PReP boot image \256le. Up to 4 are allowed. See README.prep)10 2608 1 1440 4200 t +10 S f +(_)4048 4200 w +10 R f +(boot \(Alpha\))1 521 1 4098 4200 t +10 S1 f +(\261 \261)1 65 1 1080 4368 t +10 B f +( -t t)2 33( p-)1 33( rp)1 56( hr)1 44(c ch)1 100 5 1145 4368 t +10 R f +( See)1 210(Create a CHRP boot in boot partition 1.)7 1645 2 1440 4488 t +10 S1 f +(\261 \261)1 65 1 3328 4488 t +10 B f +( p)1 0( re ep)2 100(p pr)1 100 3 3393 4488 t +10 S1 f +(\261 \261)1 65 1 3593 4488 t +10 B f +( t)1 0( oo ot)2 83(b bo)1 106 3 3658 4488 t +10 R f +(for further information.)2 950 1 3880 4488 t +10 S1 f +(\261 \261)1 65 1 1080 4656 t +10 B f +( t)1 0( np pu ut)3 145(i in)1 84 3 1145 4656 t +10 S1 f +(\261 \261)1 65 1 1374 4656 t +10 B f +( s)1 0( fs)1 39(h hf)1 89 3 1439 4656 t +10 S1 f +(\261 \261)1 65 1 1567 4656 t +10 B f +( t)1 0( et)1 33( se)1 44( rs)1 39( ar)1 44( ha)1 50(c ch)1 100 7 1632 4656 t +10 I f +(charset)1975 4656 w +10 R f +( with the)2 442(Input charset that de\256nes the characters used in HFS \256le names when used)12 3518 2 1440 4776 t +10 S1 f +(\261)1440 4896 w +10 I f +(mac)1505 4896 w +10 S1 f +(\261)1671 4896 w +10 I f +(name)1736 4896 w +10 R f +( default charset is cp10000 \(Mac Roman\))6 1730(option. The)1 507 2 1991 4896 t +10 I f +(cp10000)4266 4896 w +10 R f +(\(Mac Roman\) See)2 752 1 4648 4896 t +10 B f +( S)1 0( ET TS)2 123( SE)1 67( S)1 118( R)1 0( TE ER)2 139( AR RA AC CT)4 283( HA)1 72(C CH)1 150 9 1440 5016 t +10 R f +(and)2454 5016 w +10 B f +( S)1 0( ES)1 56( ME)1 67( NA AM)2 166( N)1 134( LE E)2 67( IL)1 67( FI)1 39( F)1 123( H)1 0( SH)1 78( OS)1 56( TO)1 78( NT)1 67( IN)1 72( AC CI)2 111( MA)1 72( M)1 156( S)1 0( FS)1 56(H HF)1 139 21 2660 5016 t +10 R f +( more)1 268(sections below for)2 806 2 4326 5016 t +(details.)1440 5136 w +10 S1 f +(\261 \261)1 65 1 1080 5304 t +10 B f +( t)1 0( pu ut)2 89( tp)1 56( ut)1 33(o ou)1 106 5 1145 5304 t +10 S1 f +(\261 \261)1 65 1 1429 5304 t +10 B f +( s)1 0( fs)1 39(h hf)1 89 3 1494 5304 t +10 S1 f +(\261 \261)1 65 1 1622 5304 t +10 B f +( t)1 0( et)1 33( se)1 44( rs)1 39( ar)1 44( ha)1 50(c ch)1 100 7 1687 5304 t +10 I f +(charset)2030 5304 w +10 R f +( that will be used in the HFS \256le names. Defaults to)11 2242(Output charset that de\256nes the characters)5 1718 2 1440 5424 t +(the input charset. See)3 878 1 1440 5544 t +10 B f +( S)1 0( ET TS)2 123( SE)1 67( S)1 89( R)1 0( TE ER)2 139( AR RA AC CT)4 283( HA)1 72(C CH)1 150 9 2351 5544 t +10 R f +(section below for more details.)4 1266 1 3307 5544 t +10 S1 f +(\261 \261)1 65 1 1080 5712 t +10 B f +( s)1 0( fs)1 39(h hf)1 89 3 1145 5712 t +10 S1 f +(\261 \261)1 65 1 1273 5712 t +10 B f +( k)1 0( ck)1 56( oc)1 44( lo)1 50(u un nl)2 140 5 1338 5712 t +10 R f +(By default,)1 458 1 1440 5832 t +10 B f +( s)1 0( fs)1 39( of)1 33( so)1 50( is)1 39( ki)1 28(m mk)1 139 7 1937 5832 t +10 R f +( volume that is)3 637(will create an HFS)3 788 2 2304 5832 t +10 I f +(locked)3769 5832 w +10 R f +( option leaves the volume)4 1087(. This)1 276 2 4037 5832 t +( can modify the volume. See the)6 1506( hfsutils\))1 422( that other applications \(e.g.)4 1259(unlocked so)1 517 4 1440 5952 t +10 B f +( S)1 0( FS)1 56(H HF)1 139 3 5205 5952 t +( S)1 0( NS)1 56( ON)1 72( IO)1 78( TI)1 39( AT)1 67( TA)1 72( IT)1 67( MI)1 39( IM)1 94( LI)1 39( /L)1 67( S/)1 28( MS)1 56( BL LE EM)3 228( OB)1 67( RO)1 78(P PR)1 133 18 1440 6072 t +10 R f +(section below for warnings about using this option.)7 2105 1 2753 6072 t +10 S1 f +(\261 \261)1 65 1 1080 6240 t +10 B f +( s)1 0( fs)1 39(h hf)1 89 3 1145 6240 t +10 S1 f +(\261 \261)1 65 1 1273 6240 t +10 B f +( ss s)2 39( es)1 39( le)1 44(b bl)1 84 4 1338 6240 t +10 I f +(folder)1577 6240 w +10 S f +(_)1816 6240 w +10 I f +(name)1866 6240 w +10 S1 f +(")1440 6360 w +10 R f +(Bless)1481 6360 w +10 S1 f +(")1698 6360 w +10 R f +(the given directory \(folder\). This is usually the)7 1962 1 1778 6360 t +10 B f +( er r)2 44( de)1 44( ld)1 56( ol)1 28( Fo)1 50( F)1 101( m)1 0( em)1 83( te)1 44( st)1 33( ys)1 39(S Sy)1 106 12 3779 6360 t +10 R f +(and is used in creating)4 953 1 4447 6360 t +(HFS bootable CDs. The name of the directory must be the whole path name as)14 3283 1 1440 6480 t +10 B f +( s)1 0( fs)1 39( of)1 33( so)1 50( is)1 39( ki)1 28(m mk)1 139 7 4757 6480 t +10 R f +(sees it.)1 281 1 5119 6480 t +( and the required folder is called System Folder, then the)10 2436(e.g. if the given pathspec is ./cddata)6 1524 2 1440 6600 t +(whole path name is)3 849 1 1440 6720 t +10 S1 f +(")2339 6720 w +10 R f +(./cddata/System Folder)1 946 1 2380 6720 t +10 S1 f +(")3326 6720 w +10 R f +(\(remember to use quotes if the name contains)7 1984 1 3416 6720 t +(spaces\).)1440 6840 w +10 S1 f +(\261 \261)1 65 1 1080 7008 t +10 B f +( s)1 0( fs)1 39(h hf)1 89 3 1145 7008 t +10 S1 f +(\261 \261)1 65 1 1273 7008 t +10 B f +( s)1 0( ms)1 39( rm)1 83( ar)1 44(p pa)1 106 5 1338 7008 t +10 I f +(PARAMETERS)1643 7008 w +10 R f +( to create the HFS \256le system. Unlikely to be used in normal)12 2598(Override certain parameters used)3 1362 2 1440 7128 t +(circumstances. See the libhfs)3 1183 1 1440 7248 t +10 S f +(_)2623 7248 w +10 R f +(iso/hybrid.h source \256le for details.)4 1403 1 2673 7248 t +( 20)1 1838( change: 2010/04/25)2 832( Last)1 1536(Version 3.0)1 474 4 720 7728 t +cleartomark +showpage +restore +%%EndPage: 20 20 %%Page: 21 21 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF 355.5(MKISOFS\(8\) MKISOFS\(8\))72 48 R/F1 10 -/Times-Bold@0 SF(PREP)108 84 Q F0 .282 -(This should describe the preparer of the CDR)9.89 F .282 -(OM, usually with a mailing address and phone num-)-.4 F(ber)144 96 Q -5.122(.T)-.55 G .122 -(here is space on the disc for 128 characters of information.)-5.122 F -.122(May be o)5.122 F -.15(ve)-.15 G .121(rridden using the).15 F F1 -2.621 E F0(command line option.)144 108 Q F1(PUBL)108 124.8 Q F0 -.021(This should describe the publisher of the CDR)9.33 F .022 -(OM, usually with a mailing address and phone num-)-.4 F(ber)144 136.8 Q -5.09(.T)-.55 G .09 -(here is space on the disc for 128 characters of information.)-5.09 F -.089(May be o)5.089 F -.15(ve)-.15 G .089(rridden using the).15 F F1 -2.589 E F0(command line option.)144 148.8 Q F1(SYSI)108 165.6 Q F0 -.515(The System Identi\214er)13.77 F 5.515(.T)-.55 G .516 -(here is space on the disc for 32 characters of information.)-5.515 F -.516(May be o)5.516 F -.15(ve)-.15 G -.2(r-).15 G(ridden using the)144 -177.6 Q F1(\255sysid)2.5 E F0(command line option.)2.5 E F1 -.45(VO)108 -194.4 S(LI).45 E F0 .424(The V)10.89 F .424(olume Identi\214er)-1.29 F -5.423(.T)-.55 G .423 -(here is space on the disc for 32 characters of information.)-5.423 F -.423(May be o)5.423 F -.15(ve)-.15 G -.2(r-).15 G(ridden using the)144 -206.4 Q F12.5 E F0(command line option.)2.5 E F1 -.45(VO)108 223.2 -S(LS).45 E F0 1.363(The V)9.22 F 1.363(olume Set Name.)-1.29 F 1.364 -(There is space on the disc for 128 characters of information.)6.363 F -1.364(May be)6.364 F -.15(ove)144 235.2 S(rridden using the).15 E F1 -2.5 E(olset)-.1 E F0(command line option.)2.5 E F1(HFS_TYPE)108 -252 Q F0 .22(The def)144 264 R .22 -(ault TYPE for Macintosh \214les. Must be e)-.1 F .219 -(xactly 4 characters.)-.15 F .219(May be o)5.219 F -.15(ve)-.15 G .219 -(rridden using the).15 F F1(\255hfs-type)144 276 Q F0 -(command line option.)2.5 E F1(HFS_CREA)108 292.8 Q -.18(TO)-.95 G(R).18 -E F0 1.676(The def)144 304.8 R 1.677(ault CREA)-.1 F -.18(TO)-1.11 G -4.177(Rf).18 G 1.677(or Macintosh \214les. Must be e)-4.177 F 1.677 -(xactly 4 characters.)-.15 F 1.677(May be o)6.677 F -.15(ve)-.15 G -(rridden).15 E(using the)144 316.8 Q F1(\255hfs-cr)2.5 E(eator)-.18 E F0 -(command line option.)2.5 E F1(mkisofs)108 333.6 Q F0 2.308 -(can also be con\214gured at compile time with def)4.809 F 2.308 -(aults for man)-.1 F 4.808(yo)-.15 G 4.808(ft)-4.808 G 2.308 -(hese \214elds.)-4.808 F 2.308(See the \214le)7.308 F(def)108 345.6 Q -(aults.h.)-.1 E/F2 10.95/Times-Bold@0 SF(EXAMPLES)72 374.4 Q F0 1.756 --.8(To c)108 386.4 T .156(reate a v).8 F .156 -(anilla ISO-9660 \214lesystem image in the \214le)-.25 F/F3 10 -/Times-Italic@0 SF(cd.iso)2.657 E F0 2.657(,w).18 G .157 -(here the directory)-2.657 F F3(cd_dir)2.657 E F0 .157(will become the) -2.657 F(root directory if the CD, call:)108 398.4 Q 2.5(%m)108 415.2 S -(kisofs \255o cd.iso cd_dir)-2.5 E 1.6 -.8(To c)108 432 T -(reate a CD with Rock Ridge e).8 E(xtensions of the source directory) --.15 E F3(cd_dir)2.5 E F0(:).73 E 2.5(%m)108 448.8 S -(kisofs \255o cd.iso \255R cd_dir)-2.5 E 1.91 -.8(To c)108 465.6 T .31 -(reate a CD with Rock Ridge e).8 F .31 -(xtensions of the source directory)-.15 F F3(cd_dir)2.81 E F0 .31 -(where all \214les ha)2.81 F .61 -.15(ve a)-.2 H 2.81(tl).15 G .31 -(east read)-2.81 F(permission and all \214les are o)108 477.6 Q(wned by) --.25 E F3 -.45(ro)2.5 G(ot).45 E F0 2.5(,c).68 G(all:)-2.5 E 2.5(%m)108 -494.4 S(kisofs \255o cd.iso \255r cd_dir)-2.5 E 1.6 -.8(To c)108 511.2 T -(reate a HFS h).8 E(ybrid CD with the Joliet and Rock Ridge e)-.05 E -(xtensions of the source directory)-.15 E F3(cd_dir)2.5 E F0(:).73 E 2.5 -(%m)108 528 S(kisofs \255o cd.iso \255R \255J \255hfs cd_dir)-2.5 E 1.6 --.8(To c)108 544.8 T(reate a HFS h).8 E -(ybrid CD from the source directory)-.05 E F3(cd_dir)2.5 E F0 -(that contains Netatalk Apple/Unix \214les:)2.5 E 2.5(%m)108 561.6 S -(kisofs \255o cd.iso \255\255netatalk cd_dir)-2.5 E 1.85 -.8(To c)108 -578.4 T .25(reate a HFS h).8 F .25(ybrid CD from the source directory) --.05 F F3(cd_dir)2.751 E F0 2.751(,g).73 G -.25(iv)-2.751 G .251 -(ing all \214les CREA).25 F -.18(TO)-1.11 G 2.751(Ra).18 G .251 -(nd TYPES based)-2.751 F(on just their \214lename e)108 590.4 Q -(xtensions listed in the \214le "mapping".:)-.15 E 2.5(%m)108 607.2 S -(kisofs \255o cd.iso \255map mapping cd_dir)-2.5 E 4.94 -.8(To c)108 624 -T 3.339(reate a CD with the 'Apple Extensions to ISO9660', from the sou\ -rce directories).8 F F3(cd_dir)5.839 E F0(and)5.839 E F3(another_dir)108 -636 Q(.)-1.11 E F0 1.358(Files in all the kno)6.358 F 1.359 -(wn Apple/Unix format are decoded and an)-.25 F 3.859(yo)-.15 G 1.359 -(ther \214les are gi)-3.859 F -.15(ve)-.25 G 3.859(nC).15 G(RE-)-3.859 E --.46 -1.11(AT O)108 648 T 2.5(Ra)1.11 G -(nd TYPE based on their magic number gi)-2.5 E -.15(ve)-.25 G 2.5(ni).15 -G 2.5(nt)-2.5 G(he \214le "magic":)-2.5 E 2.5(%m)108 664.8 S -(kisofs \255o cd.iso \255apple \255magic magic \255probe \\)-2.5 E -(cd_dir another_dir)128 676.8 Q .62(The follo)108 693.6 R .62(wing e) --.25 F .62(xample puts dif)-.15 F .619 -(ferent \214les on the CD that all ha)-.25 F .919 -.15(ve t)-.2 H .619 -(he name README, b).15 F .619(ut ha)-.2 F .919 -.15(ve d)-.2 H(if).15 E -(ferent)-.25 E -(contents when seen as a ISO9660/RockRidge, Joliet or HFS CD.)108 705.6 -Q(Current directory contains:)108 722.4 Q -1.11(Ve)72 768 S(rsion 2.0) -1.11 E(24 Dec 2002)162.9 E(21)198.45 E EP +save +mark +21 pagesetup +10 R f +( \( 8 \))3 164( MKISOFS)1 3525(Maintenance Procedures)1 991 3 720 480 t +10 S1 f +(\261 \261\261 \261)2 130 1 1080 960 t +10 B f +( p)1 0( ap)1 56(c ca)1 94 3 1210 960 t +10 R f +( CAP Macintosh \256les. Search for CAP Apple/Unix \256le formats only. Searching)11 3305(Look for AUFS)2 655 2 1440 960 t +( other)1 242(for the other possible Apple/Unix \256le formats is disabled, unless)9 2693 2 1440 1080 t +10 I f +(double dash)1 498 1 4412 1080 t +10 R f +(options are)1 453 1 4947 1080 t +(given.)1440 1200 w +10 S1 f +(\261 \261\261 \261)2 130 1 1080 1368 t +10 B f +( k)1 0( lk)1 56( al)1 28( ta)1 50( at)1 33( ta)1 50( et)1 33(n ne)1 100 8 1210 1368 t +10 R f +(Look for NETATALK Macintosh \256les)4 1580 1 1440 1488 t +10 S1 f +(\261 \261\261 \261)2 130 1 1080 1656 t +10 B f +( e)1 0( le)1 44( ub bl)2 84( ou)1 56(d do)1 106 5 1210 1656 t +10 R f +(Look for AppleDouble Macintosh \256les)4 1586 1 1440 1776 t +10 S1 f +(\261 \261\261 \261)2 130 1 1080 1944 t +10 B f +( re e)2 44( ar)1 44( ha)1 50( sh)1 56( er rs)2 83( he)1 44( th)1 56(e et)1 77 8 1210 1944 t +10 R f +(Look for Helios EtherShare Macintosh \256les)5 1785 1 1440 2064 t +10 S1 f +(\261 \261\261 \261)2 130 1 1080 2232 t +10 B f +( re e)2 44( ar)1 44( ha)1 50( sh)1 56(u us)1 95 5 1210 2232 t +10 R f +(Look for IPT UShare Macintosh \256les)5 1530 1 1440 2352 t +10 S1 f +(\261 \261\261 \261)2 130 1 1080 2520 t +10 B f +( e)1 0( ge)1 44( ng)1 50( an)1 56( ha)1 50( ch)1 56( xc)1 44(e ex)1 94 8 1210 2520 t +10 R f +(Look for PC Exchange Macintosh \256les)5 1597 1 1440 2640 t +10 S1 f +(\261 \261\261 \261)2 130 1 1080 2808 t +10 B f +( i)1 0( gi)1 28(s sg)1 89 3 1210 2808 t +10 R f +(Look for SGI Macintosh \256les)4 1209 1 1440 2808 t +10 S1 f +(\261 \261\261 \261)2 130 1 1080 2976 t +10 B f +( t)1 0( et)1 33( ne)1 44( in)1 56(x xi)1 78 5 1210 2976 t +10 R f +(Look for XINET Macintosh \256les)4 1347 1 1440 3096 t +10 S1 f +(\261 \261\261 \261)2 130 1 1080 3264 t +10 B f +( n)1 0( in)1 56( bi)1 28( cb)1 56( ac)1 44(m ma)1 133 6 1210 3264 t +10 R f +(Look for MacBinary Macintosh \256les)4 1497 1 1440 3384 t +10 S1 f +(\261 \261\261 \261)2 130 1 1080 3552 t +10 B f +( e)1 0( le)1 44( gl)1 28( ng)1 50( in)1 56(s si)1 67 6 1210 3552 t +10 R f +(Look for AppleSingle Macintosh \256les)4 1548 1 1440 3672 t +10 S1 f +(\261 \261\261 \261)2 130 1 1080 3840 t +10 B f +( e)1 0( av ve)2 94(d da)1 106 3 1210 3840 t +10 R f +(Look for Thursby Software Systems DAVE Macintosh \256les)7 2451 1 1440 3960 t +10 S1 f +(\261 \261\261 \261)2 130 1 1080 4128 t +10 B f +( m)1 0( fm)1 83(s sf)1 72 3 1210 4128 t +10 R f +(Look for Microsoft's Services for Macintosh \256les \(NT only\) \(Alpha\))9 2820 1 1440 4128 t +10 S1 f +(\261 \261\261 \261)2 130 1 1080 4296 t +10 B f +( x)1 0( sx)1 50(o os)1 89 3 1210 4296 t +10 S1 f +(\261 \261)1 65 1 1349 4296 t +10 B f +( e)1 0( le)1 44( ub bl)2 84( ou)1 56(d do)1 106 5 1414 4296 t +10 R f +(Look for MacOS X AppleDouble Macintosh \256les)6 2029 1 1440 4416 t +10 S1 f +(\261 \261\261 \261)2 130 1 1080 4584 t +10 B f +( x)1 0( sx)1 50(o os)1 89 3 1210 4584 t +10 S1 f +(\261 \261)1 65 1 1349 4584 t +10 B f +( s)1 0( fs)1 39(h hf)1 89 3 1414 4584 t +10 R f +(Look for MacOS X HFS Macintosh \256les)6 1675 1 1440 4704 t +9 B f +( S)1 0( ET TS)2 110( SE)1 60( S)1 80( R)1 0( TE ER)2 125( AR RA AC CT)4 255( HA)1 65(C CH)1 135 9 720 4992 t +10 B f +( s)1 0( fs)1 39( of)1 33( so)1 50( is)1 39( ki)1 28(m mk)1 139 7 1080 5112 t +10 R f +( represent all)2 539( To)1 181(processes \256le names in a POSIX compliant way as strings of 8-bit characters.)12 3236 3 1444 5112 t +( suf\256cient. Unicode or)3 917(codings for all languages, 8-bit characters are not)7 2030 2 1080 5232 t +10 B f +( 10 06 64 46 6)5 200( -1)1 50( O-)1 33( SO)1 78(I IS)1 95 5 4060 5232 t +10 R f +(de\256ne character cod-)2 851 1 4549 5232 t +( at least 21 bits to represent all known languages. They may be represented with)14 3351(ings that need)2 575 2 1080 5352 t +10 B f +( 32 2)2 50( -3)1 50( F-)1 33( TF)1 61(U UT)1 139 5 5042 5352 t +10 R f +(,)5375 5352 w +10 B f +( 16 6)2 50( -1)1 50( F-)1 33( TF)1 61(U UT)1 139 5 1080 5472 t +10 R f +(or)1455 5472 w +10 B f +( 8)1 0( -8)1 50( F-)1 33( TF)1 61(U UT)1 139 5 1580 5472 t +10 R f +(coding.)1905 5472 w +10 B f +( 32 2)2 50( -3)1 50( F-)1 33( TF)1 61(U UT)1 139 5 2277 5472 t +10 R f +( plain 32-bit coding but seems to be uncommon.)8 2058(uses a)1 258 2 2652 5472 t +10 B f +( 2)1 0( -2)1 50( S-)1 33(U UC CS)2 200 4 5009 5472 t +10 R f +(is)5333 5472 w +( coding is similar to)4 875( This)1 256(used by Microsoft with Win32.)4 1332 3 1080 5592 t +10 B f +( 16 6)2 50( -1)1 50( F-)1 33( TF)1 61(U UT)1 139 5 3588 5592 t +10 R f +( disadvantage that it only)4 1089(with the)1 345 2 3966 5592 t +( with the POSIX \256lesys-)4 1010(supports a 16 bit subset of all codes and that 16-bit characters are not compliant)14 3310 2 1080 5712 t +(tem interface.)1 556 1 1080 5832 t +(Modern UNIX operating systems may use)5 1774 1 1080 6000 t +10 B f +( 8)1 0( -8)1 50( F-)1 33( TF)1 61(U UT)1 139 5 2896 6000 t +10 R f +( to use the)3 462(coding for \256lenames. This coding allows)5 1717 2 3221 6000 t +( a)1 83( If)1 139( 32-bit character is represented by one or more 8-bit characters.)10 2678( Each)1 272(complete Unicode code set.)3 1148 5 1080 6120 t +( coded in)2 386(character is)1 465 2 1080 6240 t +10 B f +( 1)1 0( -1)1 50( 88 85 59 9-)4 183( -8)1 50( O-)1 33( SO)1 78(I IS)1 95 7 1966 6240 t +10 R f +(\(used in Central Europe and North America\) is maps 1:1 to a)11 2542 1 2490 6240 t +10 B f +( 32 2)2 50( -3)1 50( F-)1 33( TF)1 61(U UT)1 139 5 5067 6240 t +10 R f +(or)1080 6360 w +10 B f +( 16 6)2 50( -1)1 50( F-)1 33( TF)1 61(U UT)1 139 5 1206 6360 t +10 R f +( a character is coded in)5 1001( If)1 141( character.)1 431(coded Unicode)1 619 4 1582 6360 t +10 B f +( II I)2 39( CI)1 39( SC)1 72( AS)1 56( A)1 114( t)1 0( it)1 33( Bi)1 28( -B)1 67(7 7-)1 83 10 3816 6360 t +10 R f +(\(used in USA and other)4 1011 1 4389 6360 t +(countries with limited character set\) is maps 1:1 to a)9 2161 1 1080 6480 t +10 B f +( 32 2)2 50( -3)1 50( F-)1 33( TF)1 61(U UT)1 139 5 3274 6480 t +10 R f +(,)3607 6480 w +10 B f +( 16 6)2 50( -1)1 50( F-)1 33( TF)1 61(U UT)1 139 5 3665 6480 t +10 R f +(or)4031 6480 w +10 B f +( 8)1 0( -8)1 50( F-)1 33( TF)1 61(U UT)1 139 5 4147 6480 t +10 R f +(coded Unicode charac-)2 936 1 4464 6480 t +( a single byte in UTF-8 \(typically if the value is)10 2084( codes that cannot be represented as)6 1543(ter. Character)1 594 3 1080 6600 t +10 S1 f +(>)5344 6600 w +10 R f +(0x7F\) use escape sequences that map to more than one 8-bit character.)11 2903 1 1080 6720 t +(If all operating systems would use)5 1443 1 1080 6888 t +10 B f +( 8)1 0( -8)1 50( F-)1 33( TF)1 61(U UT)1 139 5 2564 6888 t +10 R f +(coding,)2888 6888 w +10 B f +( s)1 0( fs)1 39( of)1 33( so)1 50( is)1 39( ki)1 28(m mk)1 139 7 3226 6888 t +10 R f +(would not need to recode characters in \256le)7 1805 1 3595 6888 t +( completely nonstandard codings and Microsoft uses a Unicode coding)9 2904( Apple uses)2 484(names. Unfortunately,)1 932 3 1080 7008 t +(that is not compatible with the POSIX \256lename interface.)8 2359 1 1080 7128 t +( 21)1 1838( change: 2010/04/25)2 832( Last)1 1536(Version 3.0)1 474 4 720 7680 t +cleartomark +showpage +restore +%%EndPage: 21 21 %%Page: 22 22 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF 355.5(MKISOFS\(8\) MKISOFS\(8\))72 48 R 2.5(%l) -108 84 S 2.5<73ad>-2.5 G(F)-2.5 E 10(README.hfs README.joliet)108 96 R -7.5(README.unix cd_dir/)5 F .02(The follo)108 112.8 R .02 -(wing command puts the contents of the directory)-.25 F/F1 10 -/Times-Italic@0 SF(cd_dir)2.521 E F0 .021 -(on the CD along with the three README)2.521 F(\214les - b)108 124.8 Q -(ut only one will be seen from each of the three \214lesystems:)-.2 E -2.5(%m)108 141.6 S -(kisofs \255o cd.iso \255hfs \255J \255r \255graft-points \\)-2.5 E -(\255hide README.hfs \255hide README.joliet \\)128 153.6 Q -(\255hide-joliet README.hfs \255hide-joliet README.unix \\)128 165.6 Q -(\255hide-hfs README.joliet \255hide-hfs README.unix \\)128 177.6 Q -(README=README.hfs README=README.joliet \\)128 189.6 Q -(README=README.unix cd_dir)128 201.6 Q .316(i.e. the \214le README.hfs \ -will be seen as README on the HFS CD and the other tw)108 218.4 R 2.816 -(oR)-.1 G .316(EADME \214les will)-2.816 F -(be hidden. Similarly for the Joliet and ISO9660/RockRidge CD.)108 230.4 -Q(There are probably all sorts of strange results possible with combina\ -tions of the hide options ...)108 247.2 Q/F2 10.95/Times-Bold@0 SF -.548 -(AU)72 276 S(THOR).548 E/F3 10/Times-Bold@0 SF(mkisofs)108 288 Q F0 .645 -(is not based on the standard mk*fs tools for unix, because we must gen\ -erate a complete)3.145 F(cop)5.645 E 3.145(yo)-.1 G(f)-3.145 E .816 -(an e)108 300 R .816(xisting \214lesystem on a disk in the)-.15 F .815 -(iso9660 \214lesystem.)5.815 F .815 -(The name mkisofs is probably a bit of a mis-)5.815 F(nomer)108 312 Q -3.534(,s)-.4 G 1.034(ince it not only creates the \214lesystem, b)-3.534 -F 1.035(ut it also populates it as well.)-.2 F(Ho)6.035 E(we)-.25 E -.15 -(ve)-.25 G 1.835 -.4(r, t).15 H 1.035(he appropriate).4 F(tool name for\ - a UNIX tool that creates populated \214lesystems - mkproto - is not we\ -ll kno)108 324 Q(wn.)-.25 E .385(Eric Y)108 340.8 R .385(oungdale or wrote the \214rst v)-.18 F .385(ersions \(1993 .)-.15 F -2.948 1.666 -(.. 1)1.666 H .384(998\) of)-1.666 F .718(the mkisofs utility)108 352.8 -R 5.718(.T)-.65 G .718(he cop)-5.718 F .719(yright for old v)-.1 F .719 -(ersions of the mkisofs utility is held by Yggdrasil Computing,)-.15 F -4.365(Incorporated. J)108 364.8 R -.25(..)-5.5 K(or)-4.5 5.5 M 4.365(gS) --.18 G 1.865(chilling wrote the SCSI transport library and it')-4.365 F -4.365(sa)-.55 G 1.865(daptation layer to)-4.365 F F3(mkisofs)4.365 E F0 -(and)4.365 E(ne)108 376.8 Q 1.092 -(wer parts \(starting from 1999\) of the utility)-.25 F 3.592(,t)-.65 G -1.092(his mak)-3.592 F(es)-.1 E F3(mkisofs)3.592 E F0(Cop)3.592 E 1.092 -(yright \(C\) 1999, 2000, 2001 J)-.1 F -.25(..)-5.5 K(or)-4.5 5.5 M(g) --.18 E(Schilling.)108 388.8 Q(HFS h)108 405.6 Q(ybrid code Cop)-.05 E -(yright \(C\) James Pearson 1997, 1998, 1999, 2000, 2001)-.1 E -(libhfs code Cop)108 417.6 Q(yright \(C\) 1996, 1997 Robert Leslie)-.1 E -(lib\214le code Cop)108 429.6 Q(yright \(C\) Ian F)-.1 E 2.5(.D)-.8 G -(arwin 1986, 1987, 1989, 1990, 1991, 1992, 1994, 1995.)-2.5 E F2(NO)72 -446.4 Q(TES)-.438 E F3(Mkisofs)108 458.4 Q F0 .62 -(may safely be installed suid root. This may be needed to allo)3.12 F(w) --.25 E F3(mkisofs)3.12 E F0 .62(to read the pre)3.12 F .62(vious ses-) --.25 F(sion when creating a multi session image.)108 470.4 Q(If)108 -487.2 Q F3(mkisofs)3.129 E F0 .629 -(is creating a \214lesystem image with Rock Ridge attrib)3.129 F .63 -(utes and the directory nesting le)-.2 F -.15(ve)-.25 G 3.13(lo).15 G -3.13(ft)-3.13 G(he)-3.13 E .154 -(source directory tree is too much for ISO-9660,)108 499.2 R F3(mkisofs) -2.654 E F0 .154(will do deep directory relocation.)2.654 F .154 -(This results in a)5.154 F(directory called)108 511.2 Q F3(RR_MO)2.5 E -(VED)-.5 E F0(in the root directory of the CD. Y)2.5 E(ou cannot a)-1.1 -E -.2(vo)-.2 G(id this directory).2 E(.)-.65 E F2 -.11(BU)72 528 S(GS) -.11 E F0 32.5<8341>108 540 S 1.278 -.15(ny \214)-32.5 H .978 -(les that ha).15 F 1.279 -.15(ve h)-.2 H .979(ard links to \214les not \ -in the tree being copied to the iso9660 \214lesystem will).15 F(ha)144 -552 Q .3 -.15(ve a)-.2 H 2.5(ni).15 G(ncorrect \214le reference count.) --2.5 E 32.5<8344>108 568.8 S .04(oes not check for SUSP record\(s\) in \ -"." entry of the root directory to v)-32.5 F .04(erify the e)-.15 F .04 -(xistence of Rock)-.15 F(Ridge enhancements.)144 580.8 Q(This problem i\ -s present when reading old sessions while adding data in multi-session \ -mode.)144 604.8 Q 32.5<8344>108 621.6 S(oes not properly read relocated\ - directories in multi-session mode when adding data.)-32.5 E(An)144 -645.6 Q 2.5(yr)-.15 G(elocated deep directory is lost if the ne)-2.5 E -2.5(ws)-.25 G(ession does not include the deep directory)-2.5 E(.)-.65 E -.012(Repeat by: create \214rst session with deep directory relocation t\ -hen add ne)144 669.6 R 2.513(ws)-.25 G .013(ession with a single dir) --2.513 F(that dif)144 681.6 Q(fers from the old deep path.)-.25 E 32.5 -<8344>108 698.4 S(oes not re-use RR_MO)-32.5 E -(VED when doing multi-session from TRANS.TBL)-.5 E 32.5<8344>108 715.2 S -(oes not create whole_name entry for RR_MO)-32.5 E -(VED in multi-session mode.)-.5 E -1.11(Ve)72 768 S(rsion 2.0)1.11 E -(24 Dec 2002)162.9 E(22)198.45 E EP +save +mark +22 pagesetup +10 R f +( \( 8 \))3 164( MKISOFS)1 3525(Maintenance Procedures)1 991 3 720 480 t +(For all non)2 473 1 1080 960 t +10 B f +( 8)1 0( -8)1 50( F-)1 33( TF)1 61(U UT)1 139 5 1595 960 t +10 R f +( depends on)2 513(coded operating systems, the actual character that each byte represents)9 2967 2 1920 960 t +(the)1080 1080 w +10 I f +(character set)1 534 1 1237 1080 t +10 R f +(or)1806 1080 w +10 I f +(codepage)1924 1080 w +10 R f +( Microsoft\) used by the local operating system)7 1919(\(which is the name used by)5 1140 2 2341 1080 t +(in use - the characters in a character set will re\257ect the region or natural language used by the user.)19 4091 1 1080 1200 t +( ASCII characters)2 732(Usually character codes 0x00-0x1f are control characters, codes 0x20-0x7f are the 7 bit)12 3588 2 1080 1368 t +( does not fol-)3 563( even this)2 407( Unfortunately)1 630(and \(on PC's and Mac's\) 0x80-0xff are used for other characters.)10 2720 4 1080 1488 t +( the range 0x80-0x9f for control characters and only allow 0xa0-0xff for)11 3043(low ISO standards that reserve)4 1277 2 1080 1608 t +(other characters.)1 666 1 1080 1728 t +( are represented in a char-)5 1086(As there is a lot more than 256 characters/symbols in use, only a small subset)14 3234 2 1080 1896 t +( same character code may represent a different character in different character)11 3336(acter set. Therefore the)3 984 2 1080 2016 t +( name generated, say in central Europe, may not display the same character when viewed)14 3753(sets. So a \256le)3 567 2 1080 2136 t +(on a machine in, say eastern Europe.)6 1511 1 1080 2256 t +( the)1 178(To make matters more complicated, different operating systems use different character sets for)12 4142 2 1080 2424 t +(region or language. For example the character code for)8 2350 1 1080 2544 t +10 S1 f +(")3475 2544 w +10 R f +( acute accent)2 552(small e with)2 529 2 3516 2544 t +10 S1 f +(")4597 2544 w +10 R f +(may be character)2 718 1 4682 2544 t +( the cod-)2 373( while)1 258( Note)1 263(code 0x82 on a PC, code 0x8e on a Macintosh and code 0xe9 on a UNIX system.)16 3426 4 1080 2664 t +( character as 0x00000000e9 which is)5 1582(ings used on a PC or Mac are nonstandard, Unicode codes this)11 2738 2 1080 2784 t +(basically the same value as the value used by most UNIX systems.)11 2751 1 1080 2904 t +( character set as the basis for)6 1218(As long as not all operating systems and applications will use the Unicode)12 3102 2 1080 3072 t +( a unique way, it may be necessary to specify which character set your \256le names use in)17 3775(\256le names in)2 545 2 1080 3192 t +(and which character set the \256le names should appear on the CD.)11 2649 1 1080 3312 t +(There are four options to specify the character sets you want to use:)12 2795 1 1080 3480 t +10 S1 f +(\261)1080 3648 w +10 R f +(input)1145 3648 w +10 S1 f +(\261)1351 3648 w +10 R f +(charset)1416 3648 w +( character set conver-)3 896( Any)1 244( using on your host machine.)5 1225(De\256nes the local character set you are)6 1595 4 1440 3768 t +( take place will use this character set as the staring point. The default input character)15 3565(sions that)1 395 2 1440 3888 t +(sets are)1 304 1 1440 4008 t +10 I f +(cp437)1777 4008 w +10 R f +(on DOS based systems and)4 1120 1 2054 4008 t +10 I f +(iso8859-1)3207 4008 w +10 R f +(on all other systems.)3 846 1 3640 4008 t +(If the)1 221 1 1440 4248 t +10 S1 f +(\261)1694 4248 w +10 I f +(J)1759 4248 w +10 R f +(option is given, then the Unicode equivalents of the input character set will be used in)15 3564 1 1836 4248 t +(the Joliet directory. Using the)4 1229 1 1440 4368 t +10 S1 f +(\261)2705 4368 w +10 I f +(jcharset)2770 4368 w +10 R f +( same as using the)4 767(option is the)2 517 2 3128 4368 t +10 S1 f +(\261)4447 4368 w +10 I f +(input)4512 4368 w +10 S1 f +(\261)4718 4368 w +10 I f +(charset)4783 4368 w +10 R f +(and)5112 4368 w +10 S1 f +(\261)5291 4368 w +10 I f +(J)5356 4368 w +10 R f +(options.)1440 4488 w +10 S1 f +(\261)1080 4656 w +10 R f +(output)1145 4656 w +10 S1 f +(\261)1401 4656 w +10 R f +(charset)1466 4656 w +( Defaults)1 376(De\256nes the character set that will be used with for the Rock Ridge names on the CD.)16 3584 2 1440 4776 t +( a non-Unix platform. e.g. using)5 1362(to the input character set. Only likely to be useful if used on)12 2598 2 1440 4896 t +10 B f +( s)1 0( fs)1 39( of)1 33( so)1 50( is)1 39( ki)1 28(m mk)1 139 7 1440 5016 t +10 R f +( If you are using)4 690(on a Microsoft Win32 machine to create Rock Ridge CDs.)9 2413 2 1801 5016 t +10 B f +( s)1 0( fs)1 39( of)1 33( so)1 50( is)1 39( ki)1 28(m mk)1 139 7 4938 5016 t +10 R f +(on)5300 5016 w +( character)1 399(a Unix machine, it is likely that the output character set will be the same as the input)17 3561 2 1440 5136 t +(set.)1440 5256 w +10 S1 f +(\261)1080 5424 w +10 R f +(input)1145 5424 w +10 S1 f +(\261)1351 5424 w +10 R f +(hfs)1416 5424 w +10 S1 f +(\261)1538 5424 w +10 R f +(charset)1603 5424 w +( HFS character set used for HFS \256le names decoded from any of the various)14 3478(De\256nes the)1 482 2 1440 5544 t +(Apple/Unix \256le formats. Only useful when used with)7 2392 1 1440 5664 t +10 S1 f +(\261)3895 5664 w +10 I f +(mac)3960 5664 w +10 S1 f +(\261)4126 5664 w +10 I f +(name)4191 5664 w +10 R f +(option. See the)2 673 1 4470 5664 t +10 B f +( S)1 0( FS)1 56(H HF)1 139 3 5205 5664 t +( S)1 0( ES)1 56( ME)1 67( NA AM)2 166( N)1 105( LE E)2 67( IL)1 67( FI)1 39( F)1 94( H)1 0( SH)1 78( OS)1 56( TO)1 78( NT)1 67( IN)1 72( AC CI)2 111(M MA)1 166 17 1440 5784 t +10 R f +(for more information. Defaults to)4 1366 1 2762 5784 t +10 I f +(cp10000)4161 5784 w +10 R f +(\(Mac Roman\).)1 590 1 4538 5784 t +10 S1 f +(\261)1080 5952 w +10 R f +(output)1145 5952 w +10 S1 f +(\261)1401 5952 w +10 R f +(hfs)1466 5952 w +10 S1 f +(\261)1588 5952 w +10 R f +(charset)1653 5952 w +( character set used to create HFS \256le names from the input character set in use.)15 3283(De\256nes the HFS)2 677 2 1440 6072 t +( from the character set given with the)7 1551(In most cases this will be)5 1058 2 1440 6192 t +10 S1 f +(\261)4083 6192 w +10 I f +(input)4148 6192 w +10 S1 f +(\261)4354 6192 w +10 I f +(charset)4419 6192 w +10 R f +(option. Defaults)1 653 1 4747 6192 t +(to the input HFS character set.)5 1255 1 1440 6312 t +(There are a number of character sets built in to)9 1972 1 1080 6480 t +10 I f +(mkisofs)3089 6480 w +10 R f +( use)1 171( get a listing,)3 553(. To)1 206 3 3397 6480 t +10 B f +( s)1 0( fs)1 39( of)1 33( so)1 50( is)1 39( ki)1 28(m mk)1 139 7 4365 6480 t +10 S1 f +(\261 \261)1 65 1 4731 6480 t +10 B f +( t)1 0( np pu ut)3 145(i in)1 84 3 4796 6480 t +10 S1 f +(\261 \261)1 65 1 5025 6480 t +10 B f +( t)1 0( et)1 33( se)1 44( rs)1 39( ar)1 44( ha)1 50(c ch)1 100 7 5090 6480 t +( .)1 0( p.)1 25( lp)1 56( el)1 28(h he)1 100 5 1080 6600 t +10 R f +(Additional character sets from)3 1235 1 1080 6768 t +10 B f +( v)1 0( nv)1 50( on)1 56( co)1 50(i ic)1 72 5 2348 6768 t +10 R f +(\(1\) may be used on systems, that support)7 1688 1 2576 6768 t +10 B f +( v)1 0( nv)1 50( on)1 56( co)1 50(i ic)1 72 5 4297 6768 t +10 R f +( call)1 178( this case,)2 407(\(1\). In)1 290 3 4525 6768 t +10 B f +( v)1 0( nv)1 50( on)1 56( co)1 50(i ic)1 72 5 1080 6888 t +10 S1 f +(\261 \261)1 65 1 1346 6888 t +10 B f +(l l)1 28 1 1411 6888 t +10 R f +( force an)2 372( To)1 181( valid character sets from this coding method.)7 1909(to get a list of)4 602 4 1477 6888 t +10 B f +( v)1 0( nv)1 50( on)1 56( co)1 50(i ic)1 72 5 4578 6888 t +10 R f +(\(1\) based cod-)2 594 1 4806 6888 t +(ing, use)1 319 1 1080 7008 t +10 B f +( :)1 0( v:)1 33( nv)1 50( on)1 56( co)1 50(i ic)1 72 6 1432 7008 t +10 I f +(name)1693 7008 w +10 R f +(instead of)1 399 1 1942 7008 t +10 I f +(name)2374 7008 w +10 R f +(for the character set.)3 837 1 2623 7008 t +( 22)1 1838( change: 2010/04/25)2 832( Last)1 1536(Version 3.0)1 474 4 720 7680 t +cleartomark +showpage +restore +%%EndPage: 22 22 %%Page: 23 23 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF 355.5(MKISOFS\(8\) MKISOFS\(8\))72 48 R -(There may be some other ones.)108 84 Q -(Please, report them to the author)5 E(.)-.55 E/F1 10.95/Times-Bold@0 SF -(HFS PR)72 112.8 Q(OBLEMS/LIMIT)-.329 E -1.04(AT)-.986 G(IONS)1.04 E F0 -2.526(Ih)108 124.8 S -2.25 -.2(av e)-2.526 H .026(had to mak)2.726 F -2.526(es)-.1 G -2.15 -.25(ev e)-2.526 H .026(ral assumptions on ho).25 F -2.526(wIe)-.25 G .025(xpect the modi\214ed libhfs routines to w)-2.676 F -.025(ork, ho)-.1 F(we)-.25 E -.15(ve)-.25 G 2.525(rt).15 G(here)-2.525 E -.29(may be situations that either I ha)108 136.8 R -.15(ve)-.2 G(n').15 -E 2.79(tt)-.18 G .29(hought of, or come across when these assumptions f) --2.79 F 2.79(ail. Therefore)-.1 F(I)2.79 E(can')108 148.8 Q 3.137(tg) --.18 G .637(uarantee that mkisofs will w)-3.137 F .637(ork as e)-.1 F -.636(xpected \(although I ha)-.15 F -.15(ve)-.2 G(n').15 E 3.136(th)-.18 -G .636(ad a major problem yet\). Most of)-3.136 F(the HFS features w)108 -160.8 Q(ork \214ne, ho)-.1 E(we)-.25 E -.15(ve)-.25 G .8 -.4(r, s).15 H -(ome are not fully tested. These are mark).4 E(ed as)-.1 E/F2 10 -/Times-Italic@0 SF(Alpha)2.5 E F0(abo)2.5 E -.15(ve)-.15 G(.).15 E .68 -(Although HFS \214lenames appear to support upper and lo)108 177.6 R .68 -(wer case letters, the \214lesystem is case insensiti)-.25 F -.15(ve) --.25 G(.).15 E .419(i.e. the \214lenames "aBc" and "AbC" are the same. \ -If a \214le is found in a directory with the same HFS name,)108 189.6 R -(then)108 201.6 Q F2(mkisofs)3.453 E F0 .954 -(will attempt, where possible, to mak)3.453 F 3.454(eau)-.1 G .954 -(nique name by adding '_' characters to one of the)-3.454 F -(\214lenames.)108 213.6 Q .35 -(HFS \214le/directory names that share the \214rst 31 characters ha)108 -230.4 R .649 -.15(ve _)-.2 H .349 -(N' \(N == decimal number\) substituted for).15 F(the last fe)108 242.4 -Q 2.5(wc)-.25 G(haracters to generate unique names.)-2.5 E .79 -(Care must be tak)108 259.2 R .791 -(en when "grafting" Apple/Unix \214les or directories \(see abo)-.1 F -1.091 -.15(ve f)-.15 H .791(or the method and syntax).15 F(in)108 271.2 -Q -.2(vo)-.4 G(lv).2 E 2.751(ed\). It is not possible to use a ne)-.15 F -5.251(wn)-.25 G 2.751(ame for an Apple/Unix encoded \214le/directory) --5.251 F 5.251(.e)-.65 G 2.751(.g. If a)-5.251 F(Apple/Unix encoded \ -\214le called "oldname" is to added to the CD, then you can not use the\ - command line:)108 283.2 Q(mkisofs \255o output.ra)144 300 Q 2.5<77ad> --.15 G(hfs \255graft-points ne)-2.5 E(wname=oldname cd_dir)-.25 E .498 -(mkisofs will be unable to decode "oldname". Ho)108 316.8 R(we)-.25 E --.15(ve)-.25 G 1.298 -.4(r, y).15 H .498 -(ou can graft Apple/Unix encoded \214les or directo-).4 F -(ries as long as you do not attempt to gi)108 328.8 Q .3 -.15(ve t)-.25 -H(hem ne).15 E 2.5(wn)-.25 G(ames as abo)-2.5 E -.15(ve)-.15 G(.).15 E -.199(When creating an HFS v)108 345.6 R .199 -(olume with the multisession options,)-.2 F/F3 10/Times-Bold@0 SF -2.699 E F0(and)2.699 E F32.699 E F0 2.699(,o)C .199 -(nly \214les in the last session will)-2.699 F(be in the HFS v)108 357.6 -Q(olume. i.e. mkisofs can not)-.2 E F2(add)2.5 E F0 -.15(ex)2.5 G -(isting \214les from pre).15 E(vious sessions to the HFS v)-.25 E -(olume.)-.2 E(Ho)108 374.4 Q(we)-.25 E -.15(ve)-.25 G 1.788 -.4(r, i).15 -H 3.488(fe).4 G .989(ach session is created with the)-3.488 F F3 -(\255part)3.489 E F0 .989 -(option, then each session will appear as separate v)3.489 F(ol-)-.2 E -.337(umes when mounted on a Mac. In this case, it is w)108 386.4 R .337 -(orth using the)-.1 F F32.837 E F0(or)2.836 E F3(\255hfs-v)2.836 E -(olid)-.1 E F0 .336(option to gi)2.836 F .636 -.15(ve e)-.25 H .336 -(ach ses-).15 F(sion a unique v)108 398.4 Q -(olume name, otherwise each "v)-.2 E -(olume" will appear on the Desktop with the same name.)-.2 E -(Symbolic links \(as with all other non-re)108 415.2 Q -(gular \214les\) are not added to the HFS directory)-.15 E(.)-.65 E .808 -(Hybrid v)108 432 R .808(olumes may be lar)-.2 F .808 -(ger than pure ISO9660 v)-.18 F .808 -(olumes containing the same data. In some cases \(e.g.)-.2 F -.4(DV)108 -444 S 2.602(Ds).4 G .102(ized v)-2.602 F .102(olumes\) the h)-.2 F .101 -(ybrid v)-.05 F .101(olume may be signi\214cantly lar)-.2 F(ger)-.18 E -2.601(.A)-.55 G 2.601(sa)-2.601 G 2.601(nH)-2.601 G .101(FS v)-2.601 F -.101(olume gets bigger)-.2 F 2.601(,s)-.4 G 2.601(od)-2.601 G(oes)-2.601 -E .298(the allocation block size \(the smallest amount of space a \214l\ -e can occup)108 456 R 2.799(y\). F)-.1 F .299 -(or a 650Mb CD, the allocation)-.15 F(block is 10Kb, for a 4.7Gb D)108 -468 Q(VD it will be about 70Kb)-.4 E(.)-.4 E .203 -(The maximum number of \214les in an HFS v)108 484.8 R .202 -(olume is about 65500 - although the real limit will be some)-.2 F(what) --.25 E(less than this.)108 496.8 Q .018(The resulting h)108 513.6 R .018 -(ybrid v)-.05 F .018(olume can be accessed on a Unix machine by using t\ -he hfsutils routines. Ho)-.2 F(we)-.25 E -.15(ve)-.25 G .819 -.4(r, n) -.15 H(o).4 E .978(changes can be made to the v)108 525.6 R .978 -(olume as it is set as)-.2 F F3(lock)3.478 E(ed.)-.1 E F0 .978 -(The option)5.978 F F3(\255hfs-unlock)3.478 E F0 .977 -(will create an output)3.478 F 1.123(image that is unlock)108 537.6 R -1.124(ed - ho)-.1 F(we)-.25 E -.15(ve)-.25 G 3.624(rn).15 G 3.624(oc) --3.624 G 1.124(hanges should be made to the contents of the v)-3.624 F -1.124(olume \(unless you)-.2 F(really kno)108 549.6 Q 2.5(ww)-.25 G -(hat you are doing\) as it')-2.5 E 2.5(sn)-.55 G(ot a "real" HFS v)-2.5 -E(olume.)-.2 E .609(Using the)108 566.4 R F3(\255mac-name)3.109 E F0 -.609(option will not currently w)3.109 F .609(ork with the)-.1 F F3 -3.108 E F0 .608(option - the Unix name will be used in)3.108 F -(the TRANS.TBL \214le, not the Macintosh name.)108 578.4 Q(Although)108 -595.2 Q F3(mkisofs)3.007 E F0 .507 -(does not alter the contents of a \214le, if a binary \214le has it') -3.007 F 3.007(sT)-.55 G .507(YPE set as 'TEXT', it)-3.007 F F2(may)3.008 -E F0(be read incorrectly on a Macintosh. Therefore a better choice for \ -the def)108 607.2 Q(ault TYPE may be '????')-.1 E(The)108 624 Q F3 -(\255mac-boot-\214le)2.5 E F0(option may not w)2.5 E(ork at all...)-.1 E -.51(May not w)108 640.8 R .51 -(ork with PC Exchange v2.2 or higher \214les \(a)-.1 F -.25(va)-.2 G -.509(ilable with MacOS 8.1\).).25 F .509(DOS media containing)5.509 F -(PC Exchange \214les should be mounted as type)108 652.8 Q F3(msdos)2.5 -E F0(\(not)2.5 E F3(vfat)2.5 E F0 2.5(\)w)C(hen using Linux.)-2.5 E -(The SFM format is only partially supported - see)108 669.6 Q F3(HFS MA) -2.5 E(CINT)-.55 E(OSH FILE FORMA)-.18 E(TS)-.95 E F0(section abo)2.5 E --.15(ve)-.15 G(.).15 E 1.015(It is not possible to use the the)108 686.4 -R F3(\255spar)3.516 E(c-boot)-.18 E F0(or)3.516 E F3(\255generic-boot) -3.516 E F0 1.016(options with the)3.516 F F3(\255boot-hfs-\214le)3.516 E -F0(or)3.516 E F3(\255pr)3.516 E(ep-)-.18 E(boot)108 698.4 Q F0(options.) -2.5 E F3(mkisofs)108 715.2 Q F0(should be able to create HFS h)2.5 E -(ybrid images o)-.05 E -.15(ve)-.15 G 2.5(r4).15 G -(Gb, although this has not been fully tested.)-2.5 E -1.11(Ve)72 768 S -(rsion 2.0)1.11 E(24 Dec 2002)162.9 E(23)198.45 E EP +save +mark +23 pagesetup +10 R f +( \( 8 \))3 164( MKISOFS)1 3525(Maintenance Procedures)1 991 3 720 480 t +(If using non)2 507 1 1080 960 t +10 B f +( v)1 0( nv)1 50( on)1 56( co)1 50(i ic)1 72 5 1624 960 t +10 R f +( read from \256le for any of the)7 1224(\(1\) based character sets, additional character sets can be)8 2324 2 1852 960 t +( will only be)3 554(character set options by giving a \256lename as the argument to the options. The given \256le)15 3766 2 1080 1080 t +(read if its name does not match one of the built in character sets.)13 2677 1 1080 1200 t +( available from)2 740(The format of the character set \256les is the same as the mapping \256les)13 3580 2 1080 1368 t +(http://www.unicode.org/Public/MAPPINGS The format of these \256les is:)6 2942 1 1080 1488 t +(Column)1440 1728 w +10 S1 f +(#)1796 1728 w +10 R f +(1 is the input byte code \(in hex as 0xXX\))9 1717 1 1846 1728 t +(Column)1440 1848 w +10 S1 f +(#)1796 1848 w +10 R f +(2 is the Unicode \(in hex as 0xXXXX\))7 1567 1 1846 1848 t +(Rest of the line is ignored.)5 1095 1 1440 1968 t +( two \(or more\) columns in the above format or comments lines \(starting)12 3115(Any blank line, line without)4 1205 2 1080 2208 t +(with the)1 340 1 1080 2328 t +10 S1 f +(#)1460 2328 w +10 R f +( without any warnings. Any missing input code is mapped to Unicode)11 2947(character\) are ignored)2 903 2 1550 2328 t +(character 0x0000.)1 722 1 1080 2448 t +( coding)1 320(Note that there is no support for 16 bit UNICODE \(UTF-16\) or 32 bit UNICODE \(UTF-32\))15 4000 2 1080 2616 t +( compliant. There should be support for UTF-8 UNICODE coding)9 2859(because this coding is not POSIX)5 1461 2 1080 2736 t +( compatible to POSIX \256lenames and supported by moder UNIX implementations such as)12 3953(which is)1 367 2 1080 2856 t +(Solaris.)1080 2976 w +( the keyword)2 545(A 1:1 character set mapping can be de\256ned by using)9 2192 2 1080 3144 t +10 I f +(default)3854 3144 w +10 R f +(as the argument to any of the)6 1231 1 4169 3144 t +(character set options. This is the behaviour of older \(v1.12\) versions of)11 2919 1 1080 3264 t +10 B f +( s)1 0( fs)1 39( of)1 33( so)1 50( is)1 39( ki)1 28(m mk)1 139 7 4032 3264 t +10 R f +(.)4360 3264 w +( names generated from the input \256lenames are not converted from the input character)13 3569(The ISO-9660 \256le)2 751 2 1080 3432 t +( a very limited subset of the ASCII characters, so any conversion)11 2848(set. The ISO-9660 character set is)5 1472 2 1080 3552 t +(would be pointless.)2 791 1 1080 3672 t +(Any character that)2 752 1 1080 3840 t +10 B f +( s)1 0( fs)1 39( of)1 33( so)1 50( is)1 39( ki)1 28(m mk)1 139 7 1865 3840 t +10 R f +(can not convert will be replaced with a ')8 1671 1 2226 3840 t +10 S f +(_)3897 3840 w +10 R f +(' character.)1 455 1 3947 3840 t +9 B f +( E)1 0( PE)1 60( YP)1 55( TY)1 65( /T)1 60( R/)1 25( OR)1 65( TO)1 70( AT)1 60( EA)1 65( CR RE)2 125( C)1 95( S)1 0( FS)1 50(H HF)1 125 15 720 4008 t +10 R f +( application created the \256le,)4 1178(A Macintosh \256le has two properties associated with it which de\256ne which)11 3142 2 1080 4128 t +(the)1080 4248 w +10 I f +(CREATOR)1246 4248 w +10 R f +(and what data the \256le contains, the)6 1498 1 1729 4248 t +10 I f +(TYPE)3271 4248 w +10 R f +( are \(exactly\) 4 letter strings. Usually)6 1591(. Both)1 296 2 3513 4248 t +( launch the correct application etc. The CREA-)7 1949(this allows a Macintosh user to double-click on a \256le and)10 2371 2 1080 4368 t +( can be found by using something like ResEdit \(or similar\) on a)12 2801(TOR and TYPE of a particular \256le)6 1519 2 1080 4488 t +(Macintosh.)1080 4608 w +( other)1 242( For)1 209( and TYPE information is stored in all the various Apple/Unix encoded \256les.)12 3211(The CREATOR)1 658 4 1080 4776 t +( and TYPE on the \256lename's extension using a)8 2004(\256les it is possible to base the CREATOR)7 1756 2 1080 4896 t +10 I f +(mapping)4881 4896 w +10 R f +(\256le)5272 4896 w +(\(the)1080 5016 w +10 S1 f +(\261 \261)1 65 1 1275 5016 t +10 B f +( p)1 0( ap)1 56(m ma)1 133 3 1340 5016 t +10 R f +(option\) and/or using the)3 1003 1 1569 5016 t +10 I f +(magic number)1 589 1 2612 5016 t +10 R f +(\(usually a)1 407 1 3242 5016 t +10 I f +(signature)3690 5016 w +10 R f +(in the \256rst few bytes\) of a \256le)7 1291 1 4109 5016 t +(\(the)1080 5136 w +10 S1 f +(\261 \261)1 65 1 1271 5136 t +10 B f +( c)1 0( ic)1 44( ag gi)2 78(m ma)1 133 4 1336 5136 t +10 R f +( the command line is important.)5 1322(option\). If both these options are given, then their order on)10 2451 2 1627 5136 t +(If the)1 226 1 1080 5256 t +10 S1 f +(\261 \261)1 65 1 1344 5256 t +10 B f +( p)1 0( ap)1 56(m ma)1 133 3 1409 5256 t +10 R f +( then a \256lename extension match is attempted before a magic number)11 2924(option is given \256rst,)3 840 2 1636 5256 t +( if the)2 261(match. However,)1 699 2 1080 5376 t +10 S1 f +(\261 \261)1 65 1 2079 5376 t +10 B f +( c)1 0( ic)1 44( ag gi)2 78(m ma)1 133 4 2144 5376 t +10 R f +(option is given \256rst, then a magic number match is attempted before a)12 2962 1 2438 5376 t +(\256lename extension match.)2 1062 1 1080 5496 t +( then the default CREATOR and TYPE for)7 1807(If a mapping or magic \256le is not used, or no match is found)13 2513 2 1080 5664 t +(all regular \256les can be set by using entries in the)10 2165 1 1080 5784 t +10 B f +( rc c)2 44( sr)1 44( fs)1 39( of)1 33( so)1 50( is)1 39( ki)1 28( mk)1 56(. .m)1 108 9 3294 5784 t +10 R f +(\256le or using the)3 697 1 3784 5784 t +10 S1 f +(\261 \261)1 65 1 4530 5784 t +10 B f +( s)1 0( fs)1 39(h hf)1 89 3 4595 5784 t +10 S1 f +(\261 \261)1 65 1 4723 5784 t +10 B f +( r)1 0( or)1 44( to)1 50( at)1 33(c cr re ea)3 182 5 4788 5784 t +10 R f +(and/or)5145 5784 w +10 S1 f +(\261 \261)1 65 1 1080 5904 t +10 B f +( s)1 0( fs)1 39(h hf)1 89 3 1145 5904 t +10 S1 f +(\261 \261)1 65 1 1273 5904 t +10 B f +( e)1 0( pe)1 44( yp)1 56(t ty)1 83 4 1338 5904 t +10 R f +(options, otherwise the default CREATOR and TYPE are 'unix' and 'TEXT'.)10 3153 1 1554 5904 t +(The format of the)3 725 1 1080 6072 t +10 I f +(mapping)1838 6072 w +10 R f +(\256le is the same)3 621 1 2221 6072 t +10 I f +(afp\256le)2875 6072 w +10 R f +(format as used by)3 731 1 3158 6072 t +10 I f +(aufs)3922 6072 w +10 R f +( \256ve columns for)3 707( \256le has)2 327(. This)1 269 3 4097 6072 t +(the)1080 6192 w +10 I f +(extension)1236 6192 w +10 R f +(,)1621 6192 w +10 I f +(\256le translation)1 596 1 1680 6192 t +10 R f +(,)2284 6192 w +10 I f +(CREATOR)2343 6192 w +10 R f +(,)2790 6192 w +10 I f +(TYPE)2849 6192 w +10 R f +(and)3117 6192 w +10 I f +(Comment)3295 6192 w +10 R f +( with the ')3 432( starting)1 334(. Lines)1 314 3 3686 6192 t +10 S1 f +(#)4766 6192 w +10 R f +(' character are)2 584 1 4816 6192 t +(comment lines and are ignored. An example \256le would be like:)10 2596 1 1080 6312 t +10 S1 f +(#)1080 6480 w +10 R f +(Example \256lename mapping \256le)3 1276 1 1163 6480 t +10 S1 f +(#)1080 6600 w +(#)1080 6720 w +10 R f +( Comment)1 666(EXTN XLate CREATOR TYPE)3 1682 2 1163 6720 t +( 'TIFF')1 584( '8BIM')1 521(.tif Raw)1 682 3 1080 6840 t +10 S1 f +(")3116 6840 w +10 R f +(Photoshop TIFF image)2 939 1 3157 6840 t +10 S1 f +(")4096 6840 w +10 R f +( 'TEXT')1 633( 'BnHq')1 493(.hqx Ascii)1 710 3 1080 6960 t +10 S1 f +(")3116 6960 w +10 R f +(BinHex \256le)1 472 1 3157 6960 t +10 S1 f +(")3629 6960 w +10 R f +( 'WDBN')1 611( 'MSWD')1 593(.doc Raw)1 682 3 1080 7080 t +10 S1 f +(")3116 7080 w +10 R f +(Word \256le)1 388 1 3157 7080 t +10 S1 f +(")3545 7080 w +10 R f +( 'MooV')1 601( 'TVOD')1 559(.mov Raw)1 682 3 1080 7200 t +10 S1 f +(")3116 7200 w +10 R f +(QuickTime Movie)1 749 1 3157 7200 t +10 S1 f +(")3906 7200 w +10 R f +( 23)1 1838( change: 2010/04/25)2 832( Last)1 1536(Version 3.0)1 474 4 720 7680 t +cleartomark +showpage +restore +%%EndPage: 23 23 %%Page: 24 24 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF 355.5(MKISOFS\(8\) MKISOFS\(8\))72 48 R/F1 10.95 -/Times-Bold@0 SF(SEE ALSO)72 84 Q/F2 10/Times-Bold@0 SF(cdr)108 96 Q -(ecord)-.18 E F0(\(1\),)A F2(mkzftr)2.5 E(ee)-.18 E F0(\(1\),)A F2 -(magic)2.5 E F0(\(5\),)A F2(apple_dri)2.5 E -.1(ve)-.1 G(r).1 E F0 -(\(8\).)A F1(FUTURE IMPR)72 124.8 Q -.548(OV)-.329 G(EMENTS).548 E F0 -(Some sort of gui interf)108 136.8 Q(ace.)-.1 E F1 -1.04 -1.588(AV A)72 -153.6 T(ILABILITY)1.588 E F2(mkisofs)108 165.6 Q F0(is a)2.5 E -.25(va) --.2 G(ilable as part of the cdrecord package from ftp://ftp.berlios.de/\ -pub/cdrecord/).25 E F2(hfsutils)108 189.6 Q F0(from ftp://ftp.mars.or) -2.5 E(g/pub/hfs)-.18 E F2(mkzftr)108 213.6 Q(ee)-.18 E F0(is a)2.5 E --.25(va)-.2 G -(ilable as part of the zisofs-tools package from ftp://ftp.k).25 E -(ernel.or)-.1 E(g/pub/linux/utils/fs/zisofs/)-.18 E F1(MAILING LISTS)72 -230.4 Q F0 .173(If you w)108 242.4 R .173(ant to acti)-.1 F -.15(ve)-.25 -G .172(ly tak).15 F 2.672(ep)-.1 G .172(art on the de)-2.672 F -.15(ve) --.25 G .172(lopment of mkisofs, and/or mkh).15 F .172 -(ybrid, you may join the cdwrit-)-.05 F -(ing mailing list by sending mail to:)108 254.4 Q(other)180 278.4 Q -(-cdwrite-request@lists.debian.or)-.2 E(g)-.18 E(and include the w)108 -302.4 Q(ord)-.1 E/F3 10/Times-Italic@0 SF(subscribe)2.5 E F0 -(in the body)2.5 E 5(.T)-.65 G(he mail address of the list is:)-5 E -(cdwrite@lists.debian.or)180 326.4 Q(g)-.18 E F1(MAINT)72 355.2 Q(AINER) --.986 E F0(J)108 367.2 Q -.25(..)-5.5 K(or)-4.5 5.5 M 2.5(gS)-.18 G -(chilling)-2.5 E(Seestr)108 379.2 Q 2.5(.1)-.55 G(10)-2.5 E -(D-13353 Berlin)108 391.2 Q(German)108 403.2 Q(y)-.15 E F1 -(HFS MKHYBRID MAINT)72 420 Q(AINER)-.986 E F0(James Pearson)108 432 Q -(j.pearson@ge.ucl.ac.uk)108 448.8 Q(If you ha)108 477.6 Q .3 -.15(ve s) --.2 H(upport questions, send them to:).15 E F2(cdr)108 494.4 Q -(ecord-support@berlios.de)-.18 E F0(or)108 506.4 Q F2(other)2.5 E(-cd) --.37 E(write@lists.debian.or)-.15 E(g)-.1 E F0 -(Of you de\214nitly found a b)108 523.2 Q(ug, send a mail to:)-.2 E F2 -(cdr)108 540 Q(ecord-de)-.18 E -.1(ve)-.15 G(lopers@berlios.de).1 E F0 -(or)108 552 Q F2(schilling@f)2.5 E(okus.fhg)-.25 E(.de)-.15 E F0 1.6 -.8 -(To s)108 568.8 T(ubscribe, use:).8 E F2 -(http://lists.berlios.de/mailman/listinf)108 585.6 Q(o/cdr)-.25 E -(ecord-de)-.18 E -.1(ve)-.15 G(lopers).1 E F0(or)108 597.6 Q F2 -(http://lists.berlios.de/mailman/listinf)2.5 E(o/cdr)-.25 E -(ecord-support)-.18 E F0 -1.11(Ve)72 768 S(rsion 2.0)1.11 E(24 Dec 2002) -162.9 E(24)198.45 E EP +save +mark +24 pagesetup +10 R f +( \( 8 \))3 164( MKISOFS)1 3525(Maintenance Procedures)1 991 3 720 480 t +10 S f +(*)1080 960 w +10 R f +( 'TEXT')1 738(Ascii 'ttxt')1 599 2 1579 960 t +10 S1 f +(")3116 960 w +10 R f +(Text \256le)1 344 1 3157 960 t +10 S1 f +(")3501 960 w +10 R f +(Where:)1080 1128 w +(The \256rst column)2 679 1 1440 1296 t +10 I f +(EXTN)2153 1296 w +10 R f +( mapping)1 385(de\256nes the Unix \256lename extension to be mapped. The default)9 2583 2 2432 1296 t +(for any \256lename extension that doesn't match is de\256ned with the)10 2666 1 1440 1416 t +10 S1 f +(")4139 1416 w +10 S f +(*)4180 1416 w +10 S1 f +(")4230 1416 w +10 R f +(character.)4304 1416 w +(The)1440 1584 w +10 I f +(Xlate)1631 1584 w +10 R f +(column de\256nes the type of text translation between the Unix and Macintosh \256le it is)14 3521 1 1879 1584 t +(ignored by)1 438 1 1440 1704 t +10 B f +( s)1 0( fs)1 39( of)1 33( so)1 50( is)1 39( ki)1 28(m mk)1 139 7 1911 1704 t +10 R f +(, but is kept to be compatible with)7 1417 1 2239 1704 t +10 B f +( s)1 0( fs)1 39( uf)1 33(a au)1 106 4 3689 1704 t +10 R f +(\(1\). Although)1 585 1 3867 1704 t +10 B f +( s)1 0( fs)1 39( of)1 33( so)1 50( is)1 39( ki)1 28(m mk)1 139 7 4485 1704 t +10 R f +(does not alter)2 554 1 4846 1704 t +(the contents of a \256le, if a binary \256le has its TYPE set as 'TEXT', it)15 2822 1 1440 1824 t +10 I f +(may)4297 1824 w +10 R f +(be read incorrectly on)3 902 1 4498 1824 t +(a Macintosh. Therefore a better choice for the default TYPE may be '????')12 3083 1 1440 1944 t +(The)1440 2112 w +10 I f +(CREATOR)1628 2112 w +10 R f +(and)2100 2112 w +10 I f +(TYPE)2277 2112 w +10 R f +(keywords must be 4 characters long and enclosed in single quotes.)10 2734 1 2544 2112 t +(The comment \256eld is enclosed in double quotes - it is ignored by)12 2809 1 1440 2280 t +10 B f +( s)1 0( fs)1 39( of)1 33( so)1 50( is)1 39( ki)1 28(m mk)1 139 7 4292 2280 t +10 R f +( be)1 138(, but is kept to)4 642 2 4620 2280 t +(compatible with)1 655 1 1440 2400 t +10 B f +( s)1 0( fs)1 39( uf)1 33(a au)1 106 4 2128 2400 t +10 R f +(.)2306 2400 w +(The format of the)3 725 1 1080 2568 t +10 I f +(magic)1838 2568 w +10 R f +(\256le is almost identical to the)5 1171 1 2115 2568 t +10 B f +( c)1 0( ic)1 44( ag gi)2 78(m ma)1 133 4 3319 2568 t +10 R f +(\(4\) \256le used by the Linux)5 1053 1 3574 2568 t +10 B f +( e)1 0( le)1 44(\256 \256l)1 84 3 4661 2568 t +10 R f +(\(1\) command -)2 611 1 4789 2568 t +(the routines for reading and decoding the)6 1689 1 1080 2688 t +10 I f +(magic)2802 2688 w +10 R f +(\256le are based on the Linux)5 1102 1 3079 2688 t +10 B f +( e)1 0( le)1 44(\256 \256l)1 84 3 4214 2688 t +10 R f +(\(1\) command.)1 568 1 4342 2688 t +(This \256le has four tab separated columns for the)8 1976 1 1080 2856 t +10 I f +(byte offset)1 421 1 3094 2856 t +10 R f +(,)3523 2856 w +10 I f +(type)3586 2856 w +10 R f +(,)3760 2856 w +10 I f +(test)3823 2856 w +10 R f +(and)4000 2856 w +10 I f +(message)4182 2856 w +10 R f +( starting with)2 554(. Lines)1 318 2 4528 2856 t +(the ')1 188 1 1080 2976 t +10 S1 f +(#)1268 2976 w +10 R f +(' character are comment lines and are ignored. An example \256le would be like:)13 3213 1 1318 2976 t +10 S1 f +(#)1080 3144 w +10 R f +(Example magic \256le)2 793 1 1163 3144 t +10 S1 f +(#)1080 3264 w +(#)1080 3384 w +10 R f +( message)1 705( test)1 411(off type)1 438 3 1163 3384 t +( image)1 277( GIF)1 227( GIFf)1 227( 8BIM)1 534( GIF8)1 427(0 string)1 577 6 1080 3504 t +( data)1 199( image)1 310( JPEG)1 261( 8BIM)1 479( 0xffd8)1 416(0 beshort)1 643 6 1080 3624 t +( Archive)1 354( StuffIt)1 327( SIT!)1 216( SIT!)1 506( SIT!)1 399(0 string)1 577 6 1080 3744 t +( unix compress)2 621( standard)1 404( ZIVU)1 271( LZIV)1 433( 37235)1 516(0 string)1 577 6 1080 3864 t +( compressed data)2 703( gzip)1 238( ZIVU)1 271( GNUz)1 466( 37213)1 516(0 string)1 577 6 1080 3984 t +( Postscript)1 461( TEXT)1 288( ASPS)1 630( %!)1 332(0 string)1 577 5 1080 4104 t +( Postscript with a)3 716( PC)1 189( TEXT)1 288( ASPS)1 480( 04%!)1 482(0 string)1 577 6 1080 4224 t +10 S1 f +(\303)3845 4224 w +10 R f +(D to start)2 388 1 3878 4224 t +( movie \256le \(moov\))3 771( QuickTime)1 521( MooV)1 294( txtt)1 412( moov)1 444(4 string)1 577 6 1080 4344 t +( movie \256le \(mdat\))3 743( QuickTime)1 521( MooV)1 294( txtt)1 440( mdat)1 416(4 string)1 577 6 1080 4464 t +( the \256le is described in the)6 1133(The format of)2 580 2 1080 4632 t +10 B f +( c)1 0( ic)1 44( ag gi)2 78(m ma)1 133 4 2832 4632 t +10 R f +(\(4\) man page. The only difference here is that for each)10 2313 1 3087 4632 t +(entry in the magic \256le, the)5 1134 1 1080 4752 t +10 I f +(message)2256 4752 w +10 R f +(for the initial offset)3 825 1 2636 4752 t +10 B f +( t)1 0( st)1 33( us)1 39(m mu)1 139 4 3503 4752 t +10 R f +( for the CREATOR fol-)4 1013(be 4 characters)2 631 2 3756 4752 t +( the TYPE - white space is optional between them. Any other characters on)13 3239(lowed by 4 characters for)4 1081 2 1080 4872 t +( lines \(starting with a ')5 967( Continuation)1 594(this line are ignored.)3 863 3 1080 4992 t +10 S1 f +(>)3504 4992 w +10 R f +('\) are also ignored i.e. only the initial offset)8 1840 1 3560 4992 t +(lines are used.)2 584 1 1080 5112 t +(Using the)1 397 1 1080 5280 t +10 S1 f +(\261 \261)1 65 1 1513 5280 t +10 B f +( c)1 0( ic)1 44( ag gi)2 78(m ma)1 133 4 1578 5280 t +10 R f +( and read)2 389(option may signi\256cantly increase processing time as each \256le has to opened)11 3142 2 1869 5280 t +(to \256nd its magic number.)4 1035 1 1080 5400 t +( can)1 176( These)1 309( CREATOR is 'unix' and the default TYPE is 'TEXT'.)9 2326(In summary, for all \256les, the default)6 1509 4 1080 5568 t +(be changed by using entries in the)6 1527 1 1080 5688 t +10 I f +(.mkisofsrc)2660 5688 w +10 R f +( using the)2 443(\256le or by)2 417 2 3121 5688 t +10 S1 f +(\261 \261)1 65 1 4033 5688 t +10 B f +( s)1 0( fs)1 39(h hf)1 89 3 4098 5688 t +10 S1 f +(\261 \261)1 65 1 4226 5688 t +10 B f +( r)1 0( or)1 44( to)1 50( at)1 33(c cr re ea)3 182 5 4291 5688 t +10 R f +(and/or)4652 5688 w +10 S1 f +(\261 \261)1 65 1 4959 5688 t +10 B f +( s)1 0( fs)1 39(h hf)1 89 3 5024 5688 t +10 S1 f +(\261 \261)1 65 1 5152 5688 t +10 B f +( e)1 0( pe)1 44( yp)1 56(t ty)1 83 4 5217 5688 t +10 R f +(options.)1080 5808 w +( selected\), then the)3 811(If the a \256le is in one of the known Apple/Unix formats \(and the format has been)16 3509 2 1080 5976 t +(CREATOR and TYPE are taken from the values stored in the Apple/Unix \256le.)12 3234 1 1080 6096 t +( TYPE set from their \256le name extension \(the)8 1932(Other \256les can have their CREATOR and)6 1742 2 1080 6264 t +10 S1 f +(\261 \261)1 65 1 4793 6264 t +10 B f +( p)1 0( ap)1 56(m ma)1 133 3 4858 6264 t +10 R f +(option\),)5086 6264 w +(or their magic number \(the)4 1122 1 1080 6384 t +10 S1 f +(\261 \261)1 65 1 2240 6384 t +10 B f +( c)1 0( ic)1 44( ag gi)2 78(m ma)1 133 4 2305 6384 t +10 R f +( used in the)3 494(option\). If the default match is)5 1280 2 2598 6384 t +10 I f +(mapping)4409 6384 w +10 R f +(\256le, then these)2 604 1 4796 6384 t +(values override the default CREATOR and TYPE.)6 2070 1 1080 6504 t +(A full CREATOR/TYPE database can be found at http://www.angel\256re.com/il/szekely/index.html)8 3997 1 1080 6672 t +9 B f +( S)1 0( TS)1 50( AT)1 60( MA)1 65( RM)1 85( OR)1 65( FO)1 70( F)1 85( LE E)2 60( IL)1 60( FI)1 35( F)1 85( H)1 0( SH)1 70( OS)1 50( TO)1 70( NT)1 60( IN)1 65( AC CI)2 100( MA)1 65( M)1 115( S)1 0( FS)1 50(H HF)1 125 24 720 6960 t +10 R f +(Macintosh \256les have two parts called the)6 1769 1 1080 7080 t +10 I f +(Data)2897 7080 w +10 R f +(and)3145 7080 w +10 I f +(Resource)3337 7080 w +10 R f +( empty. Unix \(and)3 799(fork. Either may be)3 845 2 3756 7080 t +( having one part \(or fork\). To add to this, Macintosh \256les have)12 2599(many other OSs\) can only cope with \256les)7 1721 2 1080 7200 t +( 24)1 1838( change: 2010/04/25)2 832( Last)1 1536(Version 3.0)1 474 4 720 7680 t +cleartomark +showpage +restore +%%EndPage: 24 24 +%%Page: 25 25 +save +mark +25 pagesetup +10 R f +( \( 8 \))3 164( MKISOFS)1 3525(Maintenance Procedures)1 991 3 720 480 t +( probably the most important are the TYPE and CREA-)9 2394(a number of attributes associated with them -)7 1926 2 1080 960 t +(TOR. Again Unix has no concept of these types of attributes.)10 2521 1 1080 1080 t +( in the Data fork and a desktop)7 1347(e.g. a Macintosh \256le may be a JPEG image where the image is stored)13 2973 2 1080 1248 t +( usually the information in the data fork that is useful across)11 2521(thumbnail stored in the Resource fork. It is)7 1799 2 1080 1368 t +(platforms.)1080 1488 w +( with the two)3 576(Therefore to store a Macintosh \256le on a Unix \256lesystem, a way has to be found to cope)17 3744 2 1080 1656 t +( as the)2 299(forks and the extra attributes \(which are referred to)8 2216 2 1080 1776 t +10 I f +(\256nder info)1 436 1 3642 1776 t +10 R f +( it seems that)3 591(\). Unfortunately,)1 723 2 4086 1776 t +( package that stores Macintosh \256les on Unix has chosen a completely different storage)13 3712(every software)1 608 2 1080 1896 t +(method.)1080 2016 w +(The Apple/Unix formats that)3 1181 1 1080 2184 t +10 I f +(mkisofs)2294 2184 w +10 R f +(\(partially\) supports are:)2 953 1 2627 2184 t +(CAP AUFS format)2 783 1 1080 2352 t +( with same \256lename as data)5 1191(Data fork stored in a \256le. Resource fork in subdirectory .resource)10 2769 2 1440 2472 t +(fork. Finder info in .\256nderinfo subdirectory with same \256lename.)8 2625 1 1440 2592 t +(AppleDouble/Netatalk)1080 2760 w +( a \256le. Resource fork stored in a \256le with same name pre\256xed with)13 2917(Data fork stored in)3 808 2 1440 2880 t +10 S1 f +(")5210 2880 w +10 R f +(%)5251 2880 w +10 S1 f +(")5334 2880 w +10 R f +(.)5375 2880 w +(Finder info also stored in same)5 1385 1 1440 3000 t +10 S1 f +(")2880 3000 w +10 R f +(%)2921 3000 w +10 S1 f +(")3004 3000 w +10 R f +(\256le. Netatalk uses the same format, but the resource)8 2300 1 3100 3000 t +(fork/\256nderinfo stored in subdirectory .AppleDouble with same name as data fork.)10 3341 1 1440 3120 t +(AppleSingle)1080 3288 w +(Data structures similar to above, except both forks and \256nder info are stored in one \256le.)15 3611 1 1440 3408 t +(Helios EtherShare)1 737 1 1080 3576 t +( info together in subdirectory .rsrc with same)7 1867(Data fork stored in a \256le. Resource fork and \256nder)9 2093 2 1440 3696 t +(\256lename as data fork.)3 883 1 1440 3816 t +(IPT UShare)1 482 1 1080 3984 t +(Very similar to the EtherShare format, but the \256nder info is stored slightly differently.)13 3542 1 1440 4104 t +(MacBinary)1080 4272 w +(Both forks and \256nder info stored in one \256le.)8 1821 1 1440 4392 t +(Apple PC Exchange)2 826 1 1080 4560 t +( fork stored in a \256le.)5 930( Data)1 270( disks.)1 280(Used by Macintoshes to store Apple \256les on DOS \(FAT\))9 2480 4 1440 4680 t +( subdirectory resource.frk \(or RESOURCE.FRK\). Finder info as one record in)10 3265(Resource fork in)2 695 2 1440 4800 t +(\256le \256nder.dat \(or FINDER.DAT\). Separate \256nder.dat for each data fork directory.)10 3341 1 1440 4920 t +(Note:)1440 5088 w +10 I f +(mkisofs)1697 5088 w +10 R f +( the native FAT cluster size of the disk that the PC Exchange \256les)13 2771(needs to know)2 597 2 2032 5088 t +( \(or have been copied from\). This size is given by the)11 2250(are on)1 258 2 1440 5208 t +10 S1 f +(\261 \261)1 65 1 3984 5208 t +10 B f +( er r)2 44( te)1 44( st)1 33( us)1 39( lu)1 56(c cl)1 72 6 4049 5208 t +10 S1 f +(\261 \261)1 65 1 4337 5208 t +10 B f +( ze e)2 44( iz)1 44(s si)1 67 3 4402 5208 t +10 R f +( cluster)1 302(option. The)1 505 2 4593 5208 t +(or allocation size can be found by using the DOS utility)10 2306 1 1440 5328 t +10 B f +( K)1 0( SK)1 78( DS)1 56( HK KD)2 150(C CH)1 150 5 3779 5328 t +10 R f +(.)4213 5328 w +( media)1 280( DOS)1 269( or higher \256les \(available with MacOS 8.1\).)7 1816(May not work with PC Exchange v2.2)6 1595 4 1440 5496 t +(containing PC Exchange \256les should be mounted as type)8 2335 1 1440 5616 t +10 B f +( s)1 0( os)1 39( do)1 50( sd)1 56(m ms)1 122 5 3808 5616 t +10 R f +(\(not)4108 5616 w +10 B f +( t)1 0( at)1 33( fa)1 50(v vf)1 83 4 4302 5616 t +10 R f +(\) when using Linux.)3 829 1 4468 5616 t +(SGI/XINET)1080 5784 w +( Data fork stored in a \256le. Resource fork in)9 1794(Used by SGI machines when they mount HFS disks.)8 2166 2 1440 5904 t +( info as one record in \256le .HSancillary.)7 1767(subdirectory .HSResource with same name. Finder)5 2193 2 1440 6024 t +(Separate .HSancillary for each data fork directory.)6 2058 1 1440 6144 t +(Thursby Software Systems DAVE)3 1403 1 1080 6312 t +( \256le. Resource)2 604( fork stored in a)4 688( Data)1 260(Allows Macintoshes to store Apple \256les on SMB servers.)8 2408 4 1440 6432 t +(fork in subdirectory resource.frk. Uses the AppleDouble format to store resource fork.)11 3529 1 1440 6552 t +(Services for Macintosh)2 942 1 1080 6720 t +(Format of \256les stored by NT Servers on NTFS \256lesystems. Data fork is stored as)14 3466 1 1440 6840 t +10 S1 f +(")4949 6840 w +10 R f +(\256lename)4990 6840 w +10 S1 f +(")5334 6840 w +10 R f +(.)5375 6840 w +(Resource fork stored as a NTFS)5 1403 1 1440 6960 t +10 I f +(stream)2893 6960 w +10 R f +(called)3215 6960 w +10 S1 f +(")3503 6960 w +10 R f +(\256lename:AFP)3544 6960 w +10 S f +(_)4100 6960 w +10 R f +(Resource)4150 6960 w +10 S1 f +(")4521 6960 w +10 R f +( \256nder info is)3 608(. The)1 230 2 4562 6960 t +(stored as a NTFS)3 739 1 1440 7080 t +10 I f +(stream)2221 7080 w +10 R f +(called)2535 7080 w +10 S1 f +(")2815 7080 w +10 R f +(\256lename:Afp)2856 7080 w +10 S f +(_)3383 7080 w +10 R f +(AfpInfo)3433 7080 w +10 S1 f +(")3754 7080 w +10 R f +(. These streams are normally invisible)5 1605 1 3795 7080 t +(to the user.)2 457 1 1440 7200 t +( 25)1 1838( change: 2010/04/25)2 832( Last)1 1536(Version 3.0)1 474 4 720 7680 t +cleartomark +showpage +restore +%%EndPage: 25 25 +%%Page: 26 26 +save +mark +26 pagesetup +10 R f +( \( 8 \))3 164( MKISOFS)1 3525(Maintenance Procedures)1 991 3 720 480 t +( only partially supports the SFM format. If an HFS \256le or folder stored on the)15 3233(Warning: mkisofs)1 727 2 1440 960 t +( contains an)2 515(NT server)1 421 2 1440 1080 t +10 I f +(illegal)2420 1080 w +10 R f +(NT character in its name, then NT converts these characters to)10 2680 1 2720 1080 t +10 I f +(Private Use Unicode)2 855 1 1440 1200 t +10 R f +(characters. The characters are:)3 1240 1 2329 1200 t +10 S1 f +(")3604 1200 w +10 S f +(*)3680 1200 w +10 R f +(/)3765 1200 w +10 S1 f +(< >)1 147 1 3828 1200 t +10 R f +(?)4010 1200 w +10 S f +(\372)4122 1200 w +10 R f +(also a space or period if it is)7 1193 1 4207 1200 t +( \(control characters\) and Apple')4 1313(the last character of the \256le name, character codes 0x01 to 0x1f)11 2647 2 1440 1320 t +(apple logo.)1 452 1 1440 1440 t +( private Unicode characters are not readable by the mkisofs NT executable.)11 3134(Unfortunately, these)1 826 2 1440 1608 t +( \256le or directory name containing these characters will be ignored - including the)13 3386(Therefore any)1 574 2 1440 1728 t +(contents of any such directory.)4 1260 1 1440 1848 t +(MacOS X AppleDouble)2 981 1 1080 2016 t +( a non-HFS \256le system \(e.g.)5 1234(When HFS/HFS+ \256les are copied or saved by MacOS X on to)11 2726 2 1440 2136 t +( fork stored in a \256le. Resource)6 1254( Data)1 254( the \256les are stored in AppleDouble format.)7 1792(UFS, NFS etc.\),)2 660 4 1440 2256 t +(fork stored in a \256le with same name pre\256xed with)9 2061 1 1440 2376 t +10 S1 f +(")3534 2376 w +10 R f +(.)3575 2376 w +10 S f +(_)3600 2376 w +10 S1 f +(")3650 2376 w +10 R f +(. Finder info also stored in same)6 1333 1 3691 2376 t +10 S1 f +(")5057 2376 w +10 R f +(.)5098 2376 w +10 S f +(_)5123 2376 w +10 S1 f +(")5173 2376 w +10 R f +(\256le.)5247 2376 w +(MacOS X HFS \(Alpha\))3 970 1 1080 2544 t +( an Apple/Unix encoding, but actual HFS/HFS+ \256les on a MacOS X system. Data)13 3539(Not really)1 421 2 1440 2664 t +( \256le with the same name with the suf\256x)8 1689(fork stored in a \256le. Resource fork stored in a pseudo)10 2271 2 1440 2784 t +('/rsrc'. The \256nderinfo is only available via a MacOS X library call.)11 2763 1 1440 2904 t +(Notes: \(also see README.macosx\))3 1466 1 1440 3072 t +(Only works when used on MacOS X.)6 1543 1 1440 3240 t +( is found with a zero length resource fork and empty \256nderinfo, it is assumed not to)16 3636(If a \256le)2 324 2 1440 3408 t +(have any Apple/Unix encoding - therefore a TYPE and CREATOR can be set using other)14 3960 1 1440 3528 t +(methods.)1440 3648 w +10 I f +(mkisofs)1080 3816 w +10 R f +( date and possibly other \257ags from the \256nder info.)9 2178(will attempt to set the CREATOR, TYPE,)6 1798 2 1424 3816 t +( info, otherwise the Macintosh)4 1298(Additionally, if it exists, the Macintosh \256lename is set from the \256nder)11 3022 2 1080 3936 t +(name is based on the Unix \256lename - see the)9 1855 1 1080 4056 t +10 B f +( S)1 0( ES)1 56( ME)1 67( NA AM)2 166( N)1 105( LE E)2 67( IL)1 67( FI)1 39( F)1 94( H)1 0( SH)1 78( OS)1 56( TO)1 78( NT)1 67( IN)1 72( AC CI)2 111( MA)1 72( M)1 127( S)1 0( FS)1 56(H HF)1 139 21 2968 4056 t +10 R f +(section below.)1 585 1 4518 4056 t +(When using the)2 671 1 1080 4224 t +10 S1 f +(\261 \261)1 65 1 1798 4224 t +10 B f +( e)1 0( le)1 44( pp pl)2 84(a ap)1 106 4 1863 4224 t +10 R f +( Use or)2 334(option, the TYPE and CREATOR are stored in the optional System)10 2922 2 2144 4224 t +( the same way as the Rock Ridge attributes are.)9 1981(SUSP \256eld in the ISO-9660 Directory Record - in much)9 2339 2 1080 4344 t +( at the beginning of the existing Rock Ridge)8 1902(In fact to make life easy, the Apple extensions are added)10 2418 2 1080 4464 t +(attributes \(i.e. to get the Apple extensions you get the Rock Ridge extensions as well\).)14 3556 1 1080 4584 t +( to be stored as an ISO-9660)6 1215(The Apple extensions require the resource fork)6 1950 2 1080 4752 t +10 I f +(associated)4283 4752 w +10 R f +(\256le. This is just)3 657 1 4743 4752 t +( the)1 164(like any normal \256le stored in the ISO-9660 \256lesystem except that the associated \256le \257ag is set in)17 4156 2 1080 4872 t +( This \256le has the same name as the data fork \(the \256le seen by non-Apple)15 3256(Directory Record \(bit 2\).)3 1064 2 1080 4992 t +(machines\). Associated \256les are normally ignored by other OSs)8 2563 1 1080 5112 t +(When using the)2 657 1 1080 5280 t +10 S1 f +(\261 \261)1 65 1 1777 5280 t +10 B f +( s)1 0( fs)1 39(h hf)1 89 3 1842 5280 t +10 R f +( a separate)2 452(option, the TYPE and CREATOR plus other \256nder info, are stored in)11 2938 2 2010 5280 t +( the same data and)4 813(HFS directory, not visible on the ISO-9660 volume. The HFS directory references)11 3507 2 1080 5400 t +(resource fork \256les described above.)4 1447 1 1080 5520 t +(In most cases, it is better to use the)8 1492 1 1080 5688 t +10 S1 f +(\261 \261)1 65 1 2609 5688 t +10 B f +( s)1 0( fs)1 39(h hf)1 89 3 2674 5688 t +10 R f +(option instead of the)3 855 1 2839 5688 t +10 S1 f +(\261 \261)1 65 1 3732 5688 t +10 B f +( e)1 0( le)1 44( pp pl)2 84(a ap)1 106 4 3797 5688 t +10 R f +(option, as the latter imposes the)5 1331 1 4069 5688 t +( the Apple extensions do give the advantage)7 1831(limited ISO-9660 characters allowed in \256lenames. However,)6 2489 2 1080 5808 t +( \256les are packed on the disk more ef\256ciently and it may be possible to \256t more \256les on a CD -)21 4011(that the)1 309 2 1080 5928 t +(important when the total size of the source \256les is approaching 650MB.)11 2946 1 1080 6048 t +9 B f +( S)1 0( ES)1 50( ME)1 60( NA AM)2 150( N)1 95( LE E)2 60( IL)1 60( FI)1 35( F)1 85( H)1 0( SH)1 70( OS)1 50( TO)1 70( NT)1 60( IN)1 65( AC CI)2 100( MA)1 65( M)1 115( S)1 0( FS)1 50(H HF)1 125 21 720 6336 t +10 R f +( part of the)3 471(Where possible, the HFS \256lename that is stored with an Apple/Unix \256le is used for the HFS)16 3849 2 1080 6456 t +( In these)2 378(CD. However, not all the Apple/Unix encodings store the HFS \256lename with the \256nderinfo.)13 3942 2 1080 6576 t +( characters include '/' and)4 1127(cases, the Unix \256lename is used - with escaped special characters. Special)11 3193 2 1080 6696 t +(characters with codes over 127.)4 1292 1 1080 6816 t +(Aufs escapes these characters by using)5 1638 1 1080 6984 t +10 S1 f +(")2761 6984 w +10 R f +(:)2802 6984 w +10 S1 f +(")2830 6984 w +10 R f +( character code as two hex digits. Netatalk)7 1823(followed by the)2 663 2 2914 6984 t +(and EtherShare have a similar scheme, but uses)7 1952 1 1080 7104 t +10 S1 f +(")3065 7104 w +10 R f +(%)3106 7104 w +10 S1 f +(")3189 7104 w +10 R f +(instead of a)2 476 1 3263 7104 t +10 S1 f +(")3772 7104 w +10 R f +(:)3813 7104 w +10 S1 f +(")3841 7104 w +10 R f +(.)3882 7104 w +( 26)1 1838( change: 2010/04/25)2 832( Last)1 1536(Version 3.0)1 474 4 720 7680 t +cleartomark +showpage +restore +%%EndPage: 26 26 +%%Page: 27 27 +save +mark +27 pagesetup +10 R f +( \( 8 \))3 164( MKISOFS)1 3525(Maintenance Procedures)1 991 3 720 480 t +( \256nd an HFS \256lename, then it uses the Unix name, with any %xx or :xx characters \(xx)17 3664(If mkisofs can't)2 656 2 1080 960 t +(== two hex digits\) converted to a single character code. If)10 2489 1 1080 1080 t +10 S1 f +(")3612 1080 w +10 R f +(xx)3653 1080 w +10 S1 f +(")3753 1080 w +10 R f +( then)1 214(are not hex digits \([0-9a-fA-F]\),)4 1349 2 3837 1080 t +( any remaining)2 649(they are left alone - although)5 1270 2 1080 1200 t +10 S1 f +(")3049 1200 w +10 R f +(:)3090 1200 w +10 S1 f +(")3118 1200 w +10 R f +(is converted to)2 638 1 3209 1200 t +10 S1 f +(")3897 1200 w +10 R f +(%)3938 1200 w +10 S1 f +(")4021 1200 w +10 R f +(as colon is the HFS directory)5 1288 1 4112 1200 t +(separator. Care must be taken, as an ordinary Unix \256le with %xx or :xx will also be converted. e.g.)18 4090 1 1080 1320 t +( to This/File)2 506(This:2fFile converted)1 988 2 1080 1488 t +( to This%File)2 561(This:File converted)1 988 2 1080 1728 t +( to This%t7File)2 639(This:t7File converted)1 988 2 1080 1968 t +( case insensi-)2 566(Although HFS \256lenames appear to support upper and lower case letters, the \256lesystem is)13 3754 2 1080 2136 t +(tive. i.e. the \256lenames)3 934 1 1080 2256 t +10 S1 f +(")2058 2256 w +10 R f +(aBc)2099 2256 w +10 S1 f +(")2254 2256 w +10 R f +(and)2339 2256 w +10 S1 f +(")2527 2256 w +10 R f +(AbC)2568 2256 w +10 S1 f +(")2757 2256 w +10 R f +( same. If a \256le is found in a directory with the same)12 2271(are the)1 287 2 2842 2256 t +(HFS name, then)2 675 1 1080 2376 t +10 I f +(mkisofs)1794 2376 w +10 R f +( name by adding ')4 781(will attempt, where possible, to make a unique)7 1960 2 2133 2376 t +10 S f +(_)4874 2376 w +10 R f +(' characters)1 476 1 4924 2376 t +(to one of the \256lenames.)4 967 1 1080 2496 t +( as the starting point for the ISO-)7 1437(If an HFS \256lename exists for a \256le, then mkisofs can use this name)13 2883 2 1080 2664 t +(9660, Joliet and Rock Ridge \256lenames using the)7 2094 1 1080 2784 t +10 S1 f +(\261 \261)1 65 1 3222 2784 t +10 B f +( c)1 0( ac)1 44(m ma)1 133 3 3287 2784 t +10 S1 f +(\261 \261)1 65 1 3464 2784 t +10 B f +( e)1 0( me)1 44( am)1 83(n na)1 106 4 3529 2784 t +10 R f +( \256les without an)3 708(option. Normal Unix)2 882 2 3810 2784 t +( e.g.)1 210(HFS name will still use their Unix name.)7 1695 2 1080 2904 t +(If a)1 151 1 1080 3072 t +10 I f +(MacBinary)1272 3072 w +10 R f +(\(or)1763 3072 w +10 I f +(PC Exchange)1 563 1 1921 3072 t +10 R f +(\) \256le is stored as)4 723 1 2492 3072 t +10 I f +(someimage.gif.bin)3257 3072 w +10 R f +(on the Unix \256lesystem, but con-)5 1368 1 4032 3072 t +(tains a HFS \256le called)4 947 1 1080 3192 t +10 I f +(someimage.gif)2068 3192 w +10 R f +( would appear on the HFS part of the)8 1601(, then this is the name that)6 1143 2 2656 3192 t +( the Unix name as the starting point for the other names, then the ISO-)14 3034(CD. However, as mkisofs uses)4 1286 2 1080 3312 t +(9660 name generated will probably be)5 1788 1 1080 3432 t +10 I f +(SOMEIMAG.BIN)2944 3432 w +10 R f +(and the Joliet/Rock Ridge would be)5 1680 1 3720 3432 t +10 I f +(someimage.gif.bin)1080 3552 w +10 R f +( a GIF image. This option will use the HFS)9 1818( the actual data \(in this case\) is)7 1291(. Although)1 470 3 1821 3552 t +(\256lename as the starting point and the ISO-9660 name will probably be)11 3174 1 1080 3672 t +10 I f +(SOMEIMAG.GIF)4312 3672 w +10 R f +(and the)1 324 1 5076 3672 t +(Joliet/Rock Ridge would be)3 1138 1 1080 3792 t +10 I f +(someimage.gif)2251 3792 w +10 R f +(.)2839 3792 w +(Using the)1 395 1 1080 3960 t +10 S1 f +(\261 \261)1 65 1 1509 3960 t +10 B f +( c)1 0( ac)1 44(m ma)1 133 3 1574 3960 t +10 S1 f +(\261 \261)1 65 1 1751 3960 t +10 B f +( e)1 0( me)1 44( am)1 83(n na)1 106 4 1816 3960 t +10 R f +( the)1 157(option will not currently work with)5 1453 2 2083 3960 t +10 S1 f +(\261 \261)1 65 1 3728 3960 t +10 B f +(T T)1 67 1 3793 3960 t +10 R f +(option - the Unix name will be used)7 1505 1 3895 3960 t +(in the TRANS.TBL \256le, not the Macintosh name.)7 2039 1 1080 4080 t +( defaults to)2 502(The character set used to convert any HFS \256le name to a Joliet/Rock Ridge \256le name)15 3818 2 1080 4248 t +10 I f +(cp10000)1080 4368 w +10 R f +( speci\256ed using the)3 820( character set used can be)5 1105( The)1 231(\(Mac Roman\).)1 600 4 1467 4368 t +10 S1 f +(\261)4265 4368 w +10 I f +(input)4330 4368 w +10 S1 f +(\261)4536 4368 w +10 I f +(hfs)4601 4368 w +10 S1 f +(\261)4718 4368 w +10 I f +(charset)4783 4368 w +10 R f +(option.)5119 4368 w +( \(MacCyrillic\), cp10029 \(MacLa-)3 1398(Other built in HFS character sets are: cp10006 \(MacGreek\), cp10007)9 2922 2 1080 4488 t +(tin2\), cp10079 \(MacIcelandandic\) and cp10081 \(MacTurkish\).)5 2542 1 1080 4608 t +( taken from the various Apple/Unix formats will not)8 2215(Note: the character codes used by HFS \256le names)8 2105 2 1080 4776 t +( in the correct Apple character set. Only the Joliet/Rock Ridge)10 2647(be converted as they are assumed to be)7 1673 2 1080 4896 t +(names derived from the HFS \256le names will be converted.)9 2402 1 1080 5016 t +(The existing mkisofs code will \256lter out any illegal characters for the ISO-9660 and Joliet \256lenames, but)16 4320 1 1080 5184 t +( But)1 217( directly with Unix names, it leaves the Rock Ridge names as is.)12 2738(as mkisofs expects to be dealing)5 1365 3 1080 5304 t +( \256lename character, the)3 990(as '/' is a legal HFS)5 886 2 1080 5424 t +10 S1 f +(\261 \261)1 65 1 3001 5424 t +10 B f +( c)1 0( ac)1 44(m ma)1 133 3 3066 5424 t +10 S1 f +(\261 \261)1 65 1 3243 5424 t +10 B f +( e)1 0( me)1 44( am)1 83(n na)1 106 4 3308 5424 t +10 R f +(option converts '/' to a ')5 1068 1 3586 5424 t +10 S f +(_)4654 5424 w +10 R f +(' in Rock Ridge)3 696 1 4704 5424 t +(\256lenames.)1080 5544 w +( then only the ISO-9660 \256lenames will appear on the Macintosh. How-)11 2962(If the Apple extensions are used,)5 1358 2 1080 5712 t +(ever, as the Macintosh ISO-9660 drivers can use)7 2136 1 1080 5832 t +10 I f +(Level 2)1 319 1 3269 5832 t +10 R f +( you can use options like)5 1126(\256lenames, then)1 633 2 3641 5832 t +10 S1 f +(\261 \261)1 65 1 1080 5952 t +10 B f +( w)1 0( ow)1 72( ll lo)2 78(a al)1 78 4 1145 5952 t +10 S1 f +(\261 \261)1 65 1 1373 5952 t +10 B f +( t)1 0( ot)1 33( do)1 50( id)1 56( ti)1 28( lt)1 33( ul)1 28(m mu)1 139 8 1438 5952 t +10 R f +( over the names, for example)5 1323(without problems on a Macintosh - still take care)8 2215 2 1862 5952 t +10 I f +(this.\256le.name)1080 6072 w +10 R f +(will be converted to)3 829 1 1649 6072 t +10 I f +(THIS.FILE)2514 6072 w +10 R f +(i.e. only have one '.', also \256lename)6 1469 1 2997 6072 t +10 I f +(abcdefgh)4502 6072 w +10 R f +(will be seen)2 497 1 4903 6072 t +(as)1080 6192 w +10 I f +(ABCDEFGH)1204 6192 w +10 R f +(but)1772 6192 w +10 I f +(abcdefghi)1941 6192 w +10 R f +( seen as)2 344(will be)1 291 2 2376 6192 t +10 I f +(ABCDEFGHI.)3053 6192 w +10 R f +(i.e. with a '.' at the end - don't know if)10 1720 1 3680 6192 t +( problem. All \256lenames will be in upper case when)9 2216(this is a Macintosh problem or mkisofs/mkhybrid)6 2104 2 1080 6312 t +(viewed on a Macintosh. Of course, DOS/Win3.X machines will not be able to see Level 2 \256lenames...)16 4205 1 1080 6432 t +9 B f +( S)1 0( NS)1 50( ON)1 65( CO)1 70( IC)1 65( I)1 65( R)1 0( ER)1 65( DE)1 60( LD)1 65( OL)1 60( FO)1 70( /F)1 55( E/)1 25( ME)1 60( UM)1 85( LU)1 65( OL)1 60( VO)1 70( V)1 95( M)1 0( OM)1 85( TO)1 70( ST)1 60( CU US)2 115( C)1 95( S)1 0( FS)1 50(H HF)1 125 29 720 6720 t +10 R f +( sure the root \(top level\) folder includes a standard Macintosh)10 2612(To give a HFS CD a custom icon, make)8 1708 2 1080 6840 t +( custom icon on a Macintosh, an icon has to be pasted over the)13 2723(volume icon \256le. To give a volume a)7 1597 2 1080 6960 t +(volume's icon in the)3 861 1 1080 7080 t +10 S1 f +(")1980 7080 w +10 R f +(Get Info)1 349 1 2021 7080 t +10 S1 f +(")2370 7080 w +10 R f +(box of the volume. This creates an invisible \256le called 'Icon)10 2549 1 2450 7080 t +10 S1 f +(\\)4999 7080 w +10 R f +(r' \(')1 172 1 5027 7080 t +10 S1 f +(\\)5199 7080 w +10 R f +(r' is)1 173 1 5227 7080 t +(the 'carriage return' character\) in the root folder.)7 1998 1 1080 7200 t +( 27)1 1838( change: 2010/04/25)2 832( Last)1 1536(Version 3.0)1 474 4 720 7680 t +cleartomark +showpage +restore +%%EndPage: 27 27 +%%Page: 28 28 +save +mark +28 pagesetup +10 R f +( \( 8 \))3 164( MKISOFS)1 3525(Maintenance Procedures)1 991 3 720 480 t +(A custom folder icon is very similar - an invisible \256le called 'Icon)12 2737 1 1080 960 t +10 S1 f +(\\)3817 960 w +10 R f +(r' exits in the folder itself.)5 1083 1 3845 960 t +( HFS \257oppy)2 516(Probably the easiest way to create a custom icon that mkisofs can use, is to format a blank)17 3804 2 1080 1128 t +(disk on a Mac, paste an icon to its)8 1429 1 1080 1248 t +10 S1 f +(")2543 1248 w +10 R f +(Get Info)1 344 1 2584 1248 t +10 S1 f +(")2928 1248 w +10 R f +(box. If using Linux with the HFS module installed, mount)9 2398 1 3002 1248 t +(the \257oppy using something like:)4 1322 1 1080 1368 t +(mount)1525 1608 w +10 S1 f +(\261)1814 1608 w +10 R f +(t hfs /dev/fd0 /mnt/\257oppy)3 1050 1 1879 1608 t +(The \257oppy will be mounted as a CAP \256le system by default. Then run mkisofs using something like:)17 4169 1 1080 1848 t +(mkisofs)1525 2088 w +10 S1 f +(\261\261)1875 2088 w +10 R f +(cap)2005 2088 w +10 S1 f +(\261)2176 2088 w +10 R f +(o output source)2 632 1 2241 2088 t +10 S f +(_)2873 2088 w +10 R f +(dir /mnt/\257oppy)1 612 1 2923 2088 t +( the \257oppy. However,)3 898(If you are not using Linux, then you can use the hfsutils to copy the icon \256le from)17 3422 2 1080 2328 t +(care has to be taken, as the icon \256le contains a control character. e.g.)13 2838 1 1080 2448 t +(hmount /dev/fd0)1 672 1 1525 2688 t +(hdir)1525 2808 w +10 S1 f +(\261)1719 2808 w +10 R f +(a)1784 2808 w +(hcopy)1525 2928 w +10 S1 f +(\261)1802 2928 w +10 R f +(m Icon)1 288 1 1867 2928 t +10 S1 f +(\303)2155 2928 w +10 R f +(V)2188 2928 w +10 S1 f +(\303)2260 2928 w +10 R f +(M icon)1 294 1 2293 2928 t +10 S f +(_)2587 2928 w +10 R f +(dir/icon)2637 2928 w +(Where ')1 331 1 1080 3168 t +10 S1 f +(\303)1411 3168 w +10 R f +(V)1444 3168 w +10 S1 f +(\303)1516 3168 w +10 R f +(M' is control)2 538 1 1549 3168 t +10 S1 f +(\261)2087 3168 w +10 R f +(V followed by control)3 909 1 2152 3168 t +10 S1 f +(\261)3061 3168 w +10 R f +(M. Then run)2 518 1 3126 3168 t +10 B f +( s)1 0( fs)1 39( of)1 33( so)1 50( is)1 39( ki)1 28(m mk)1 139 7 3677 3168 t +10 R f +(by using something like:)3 1011 1 4038 3168 t +(mkisofs)1525 3408 w +10 S1 f +(\261\261)1875 3408 w +10 R f +(macbin)2005 3408 w +10 S1 f +(\261)2332 3408 w +10 R f +(o output source)2 632 1 2397 3408 t +10 S f +(_)3029 3408 w +10 R f +(dir icon)1 316 1 3079 3408 t +10 S f +(_)3395 3408 w +10 R f +(dir)3445 3408 w +( folder icons is very similar - paste an icon to folder's)11 2380(The procedure for creating/using custom)4 1708 2 1080 3576 t +10 S1 f +(")5215 3576 w +10 R f +(Get)5256 3576 w +(Info)1080 3696 w +10 S1 f +(")1246 3696 w +10 R f +(box and transfer the resulting 'Icon)5 1445 1 1320 3696 t +10 S1 f +(\\)2765 3696 w +10 R f +(r' \256le to the relevant directory in the mkisofs source tree.)10 2356 1 2793 3696 t +(You may want to hide the icon \256les from the ISO-9660 and Joliet trees.)13 2962 1 1080 3864 t +(To give a custom icon to a Joliet CD, follow the instructions found at:)13 4320 1 1080 4032 t +(http://www.fadden.com/cdrfaq/faq03.html)1080 4152 w +10 S1 f +(#)2775 4152 w +10 R f +([3-21])2825 4152 w +9 B f +( R)1 0( ER)1 65( VE)1 60( IV)1 65( DR RI)2 100( D)1 95( T)1 0( OO OT)2 130( BO)1 70( B)1 90( S)1 0( FS)1 50(H HF)1 125 13 720 4440 t +10 R f +(It)1080 4560 w +10 I f +(may)1174 4560 w +10 R f +(be possible to make the hybrid CD bootable on a Macintosh.)10 2503 1 1373 4560 t +( an Apple CD-ROM \(or compatible\) driver, a bootable HFS partition and)11 3100(A bootable HFS CD requires)4 1220 2 1080 4728 t +(the necessary System, Finder, etc. \256les.)5 1613 1 1080 4848 t +( the)1 166(A driver can be obtained from any other Macintosh bootable CD-ROM using)11 3285 2 1080 5016 t +10 I f +(apple)4575 5016 w +10 S f +(_)4797 5016 w +10 I f +(driver)4847 5016 w +10 R f +(utility.)5135 5016 w +(This \256le can then be used with the)7 1424 1 1080 5136 t +10 S1 f +(\261 \261)1 65 1 2537 5136 t +10 B f +( t)1 0( oo ot)2 83(b bo)1 106 3 2602 5136 t +10 S1 f +(\261 \261)1 65 1 2791 5136 t +10 B f +( s)1 0( fs)1 39(h hf)1 89 3 2856 5136 t +10 S1 f +(\261 \261)1 65 1 2984 5136 t +10 B f +( e)1 0( le)1 44(\256 \256l)1 84 3 3049 5136 t +10 R f +(option.)3210 5136 w +( contain a suitable System Folder, again from)7 1927(The HFS partition \(i.e. the hybrid disk in our case\) must)10 2393 2 1080 5304 t +(another CD-ROM or disk.)3 1073 1 1080 5424 t +(For a partition to be bootable, it must have its)9 1939 1 1080 5592 t +10 I f +(boot block)1 432 1 3057 5592 t +10 R f +( is in the \256rst two blocks)6 1068(set. The boot block)3 805 2 3527 5592 t +( Normally, when a System \256le)5 1266(of a partition. For a non-bootable partition the boot block is full of zeros.)13 3054 2 1080 5712 t +( Macintosh disk, the boot block is \256lled with a number of required settings -)14 3236(is copied to partition on a)5 1084 2 1080 5832 t +( will work)2 427(unfortunately I don't know the full spec for the boot block, so I'm guessing that the following)16 3893 2 1080 5952 t +(OK.)1080 6072 w +(Therefore, the utility)2 845 1 1080 6240 t +10 I f +(apple)1958 6240 w +10 S f +(_)2180 6240 w +10 I f +(driver)2230 6240 w +10 R f +( \256nds on the)3 519(also extracts the boot block from the \256rst HFS partition it)10 2374 2 2507 6240 t +(given CD-ROM and this is used for the HFS partition created by)11 2672 1 1080 6360 t +10 B f +( s)1 0( fs)1 39( of)1 33( so)1 50( is)1 39( ki)1 28(m mk)1 139 7 3785 6360 t +10 R f +(.)4113 6360 w +(PLEASE NOTE)1 666 1 1080 6528 t +( a driver from an Apple CD and copying Apple software to your CD, you become)15 3581(By using)1 379 2 1440 6648 t +(liable to obey Apple Computer, Inc. Software License Agreements.)8 2756 1 1440 6768 t +9 B f +( BL LE E)3 120( AB)1 60( TA)1 65( T)1 90( N)1 0( ON)1 65( IO)1 70( TI)1 35( AT)1 60( MA)1 65( RM)1 85( OR)1 65( FO)1 70( NF)1 55( IN)1 65( I)1 65( T)1 0( OO OT)2 130( BO)1 70( B)1 90( O)1 0( TO)1 70( IT)1 60( RI)1 35( OR)1 65( TO)1 70( T)1 90(E EL L)2 120 28 720 6936 t +10 R f +(When the)1 408 1 1080 7056 t +10 S1 f +(\261 \261)1 65 1 1536 7056 t +10 B f +( t)1 0( oo ot)2 83(b bo)1 106 3 1601 7056 t +10 S1 f +(\261 \261)1 65 1 1790 7056 t +10 B f +( o)1 0( fo)1 50( nf)1 33(i in)1 84 4 1855 7056 t +10 S1 f +(\261 \261)1 65 1 2022 7056 t +10 B f +( e)1 0( le)1 44( bl)1 28( ab)1 56(t ta)1 83 5 2087 7056 t +10 R f +(option is given,)2 666 1 2346 7056 t +10 B f +( s)1 0( fs)1 39( of)1 33( so)1 50( is)1 39( ki)1 28(m mk)1 139 7 3060 7056 t +10 R f +(will modify the boot \256le speci\256ed by the)7 1793 1 3437 7056 t +10 S1 f +(\261 \261)1 65 1 5279 7056 t +10 B f +(b b)1 56 1 5344 7056 t +10 R f +(option by inserting a 56-byte)4 1211 1 1080 7176 t +10 S1 f +(")2330 7176 w +10 R f +(boot information table)2 922 1 2371 7176 t +10 S1 f +(")3293 7176 w +10 R f +( modi\256cation is done)3 881( This)1 249(at offset 8 in the \256le.)5 897 3 3373 7176 t +( \256le)1 178( This)1 261( this \256le is not easily recreated!)6 1398(in the source \256lesystem, so make sure you use a copy if)11 2483 4 1080 7296 t +( 28)1 1838( change: 2010/04/25)2 832( Last)1 1536(Version 3.0)1 474 4 720 7776 t +cleartomark +showpage +restore +%%EndPage: 28 28 +%%Page: 29 29 +save +mark +29 pagesetup +10 R f +( \( 8 \))3 164( MKISOFS)1 3525(Maintenance Procedures)1 991 3 720 480 t +(contains pointers which may not be easily or reliably obtained at boot time.)12 3107 1 1080 960 t +(The format of this table is as follows; all integers are in section 7.3.1 \()14 2914 1 1080 1128 t +10 S1 f +(")3994 1128 w +10 R f +(little endian)1 483 1 4035 1128 t +10 S1 f +(")4518 1128 w +10 R f +(\) format.)1 357 1 4559 1128 t +( Meaning)1 903( Size)1 1014(Offset Name)1 958 3 1224 1368 t +(8 bi)1 765 1 1257 1488 t +10 S f +(_)2022 1488 w +10 R f +( of primary volume descriptor)4 1230( LBA)1 626( bytes)1 244(pvd 4)1 1002 4 2072 1488 t +(12 bi)1 798 1 1224 1608 t +10 S f +(_)2022 1608 w +10 R f +( of boot \256le)3 488( LBA)1 626( bytes)1 244(\256le 4)1 1002 4 2072 1608 t +(16 bi)1 798 1 1224 1728 t +10 S f +(_)2022 1728 w +10 R f +( \256le length in bytes)4 799( Boot)1 621( bytes)1 244(length 4)1 1002 4 2072 1728 t +(20 bi)1 798 1 1224 1848 t +10 S f +(_)2022 1848 w +10 R f +( checksum)1 432( 32-bit)1 665( bytes)1 244(csum 4)1 1002 4 2072 1848 t +(24 bi)1 798 1 1224 1968 t +10 S f +(_)2022 1968 w +10 R f +( Reserved)1 747( bytes)1 244(reserved 40)1 1052 3 2072 1968 t +( All)1 202(The 32-bit checksum is the sum of all the 32-bit words in the boot \256le starting at byte offset 64.)19 4118 2 1080 2208 t +(linear block addresses \(LBAs\) are given in CD sectors \(normally 2048 bytes\).)11 3199 1 1080 2328 t +9 B f +( N)1 0( ON)1 65( IO)1 70( TI)1 35( UR RA AT)3 190( GU)1 65( IG)1 70( FI)1 35( NF)1 55( ON)1 65(C CO)1 135 11 720 2496 t +10 B f +( s)1 0( fs)1 39( of)1 33( so)1 50( is)1 39( ki)1 28(m mk)1 139 7 1080 2616 t +10 R f +(looks for the)2 549 1 1455 2616 t +10 B f +( rc c)2 44( sr)1 44( fs)1 39( of)1 33( so)1 50( is)1 39( ki)1 28( mk)1 56(. .m)1 108 9 2051 2616 t +10 R f +( the user's home)3 726(\256le, \256rst in the current working directory, then in)8 2135 2 2539 2616 t +( the)1 160(directory, and then in the directory in which)7 1856 2 1080 2736 t +10 B f +( s)1 0( fs)1 39( of)1 33( so)1 50( is)1 39( ki)1 28(m mk)1 139 7 3134 2736 t +10 R f +( \256le is assumed to con-)5 984( This)1 249(binary is stored.)2 667 3 3500 2736 t +(tain a series of lines of the form)7 1393 1 1080 2856 t +10 B f +( =)1 0( G=)1 57( AG)1 78(T TA)1 139 4 2516 2856 t +10 I f +(value)2790 2856 w +10 R f +( The)1 232( this way you can specify certain options.)7 1786(, and in)2 333 3 3049 2856 t +( the command)2 600( \256elds in the volume header are not settable on)9 2023( Some)1 304(case of the tag is not signi\256cant.)6 1393 4 1080 2976 t +( may be placed in this \256le, using lines which)9 1939( Comments)1 510(line, but can be altered through this facility.)7 1871 3 1080 3096 t +(start with a hash \()4 742 1 1080 3216 t +10 S1 f +(#)1822 3216 w +10 R f +(\) character.)1 455 1 1872 3216 t +10 B f +( I)1 0( PP PI)2 100(A AP)1 133 3 1080 3384 t +10 R f +( is)1 117( There)1 315( application that will be on the disc.)7 1602(The application identi\256er should describe the)5 1926 4 1440 3384 t +( related Joliet entry is limited to 64)7 1523( The)1 232(space on the disc for 128 characters of information.)8 2205 3 1440 3504 t +( be overridden using the)4 997(characters. May)1 677 2 1440 3624 t +10 S1 f +(\261 \261)1 65 1 3147 3624 t +10 B f +(A A)1 72 1 3212 3624 t +10 R f +(command line option.)2 891 1 3317 3624 t +10 B f +( Y)1 0( PY)1 72( OP)1 61(C CO)1 150 4 1080 3792 t +10 R f +( \256le on the disc containing the copyright notice.)8 2003(The copyright information, often the name of a)7 1957 2 1440 3792 t +( related Joliet entry is limited to)6 1320( The)1 221( information.)1 530(There is space in the disc for 37 characters of)9 1889 4 1440 3912 t +( be overridden using the)4 997( May)1 249(18 characters.)1 561 3 1440 4032 t +10 S1 f +(\261 \261)1 65 1 3280 4032 t +10 B f +( t)1 0( ht)1 33( gh)1 56( ig)1 50( ri)1 28( yr)1 44( py)1 50( op)1 56(c co)1 94 9 3345 4032 t +10 R f +(command line option.)2 891 1 3789 4032 t +10 B f +( T)1 0( ST)1 67( BS)1 56(A AB)1 139 4 1080 4200 t +10 R f +( is)1 107( There)1 305( a \256le on the disc containing an abstract.)8 1726(The abstract information, often the name of)6 1822 4 1440 4200 t +( related Joliet entry is limited to 18 char-)8 1690( The)1 221( 37 characters of information.)4 1215(space in the disc for)4 834 4 1440 4320 t +( be overridden using the)4 997(acters. May)1 506 2 1440 4440 t +10 S1 f +(\261 \261)1 65 1 2976 4440 t +10 B f +( t)1 0( ct)1 33( ac)1 44( ra)1 50( tr)1 44( st)1 33( bs)1 39(a ab)1 106 8 3041 4440 t +10 R f +(command line option.)2 891 1 3423 4440 t +10 B f +( BL L)2 67( IB)1 67(B BI)1 106 3 1080 4608 t +10 R f +( disc containing a bibliography.)4 1335(The bibliographic information, often the name of a \256le on the)10 2625 2 1440 4608 t +( related Joliet entry is limited to)6 1320( The)1 221( information.)1 530(There is space in the disc for 37 characters of)9 1889 4 1440 4728 t +( be overridden using the)4 997( May)1 249(18 characters.)1 561 3 1440 4848 t +10 S1 f +(\261 \261)1 65 1 3280 4848 t +10 B f +( o)1 0( il li io)3 106(b bi)1 84 3 3345 4848 t +10 R f +(command line option.)2 891 1 3568 4848 t +10 B f +( P)1 0( EP)1 61( RE)1 67(P PR)1 133 4 1080 5016 t +10 R f +( describe the preparer of the CDROM, usually with a mailing address and phone)13 3471(This should)1 489 2 1440 5016 t +( related Joliet entry)3 804( The)1 225( of information.)2 654( is space on the disc for 128 characters)8 1644(number. There)1 633 5 1440 5136 t +( be overridden using the)4 997( May)1 249(is limited to 64 characters.)4 1089 3 1440 5256 t +10 S1 f +(\261 \261)1 65 1 3808 5256 t +10 B f +(p p)1 56 1 3873 5256 t +10 R f +(command line option.)2 891 1 3962 5256 t +10 B f +( BL L)2 67( UB)1 67(P PU)1 133 3 1080 5424 t +10 R f +(This should describe the publisher of the CDROM, usually with a mailing address and phone)14 3960 1 1440 5424 t +( related Joliet entry)3 804( The)1 225( of information.)2 654( is space on the disc for 128 characters)8 1644(number. There)1 633 5 1440 5544 t +( be overridden using the)4 997( May)1 249(is limited to 64 characters.)4 1089 3 1440 5664 t +10 S1 f +(\261 \261)1 65 1 3808 5664 t +10 B f +( er r)2 44( he)1 44( sh)1 56( li is)2 67(p pu ub bl)3 196 5 3873 5664 t +10 R f +(command line option.)2 891 1 4313 5664 t +10 B f +( I)1 0( SI)1 39( YS)1 56(S SY)1 128 4 1080 5832 t +10 R f +( be)1 139( May)1 261( is space on the disc for 32 characters of information.)10 2320( There)1 310( Identi\256er.)1 436(The System)1 494 6 1440 5832 t +(overridden using the)2 837 1 1440 5952 t +10 S1 f +(\261 \261)1 65 1 2310 5952 t +10 B f +( d)1 0( id)1 56( si)1 28( ys)1 39(s sy)1 89 5 2375 5952 t +10 R f +(command line option.)2 891 1 2620 5952 t +10 B f +( I)1 0( LI)1 39( OL)1 67(V VO)1 150 4 1080 6120 t +10 R f +( be)1 138( May)1 260( is space on the disc for 32 characters of information.)10 2300( There)1 308(The Volume Identi\256er.)2 954 5 1440 6120 t +(overridden using the)2 837 1 1440 6240 t +10 S1 f +(\261 \261)1 65 1 2310 6240 t +10 B f +(V V)1 72 1 2375 6240 t +10 R f +(command line option.)2 891 1 2480 6240 t +10 B f +( S)1 0( LS)1 56( OL)1 67(V VO)1 150 4 1080 6408 t +10 R f +( The)1 236( is space on the disc for 128 characters of information.)10 2400( There)1 313( Set Name.)2 487(The Volume)1 524 5 1440 6408 t +( be overridden using the)4 1013( May)1 254(related Joliet entry is limited to 64 characters.)7 1916 3 1440 6528 t +10 S1 f +(\261 \261)1 65 1 4660 6528 t +10 B f +( t)1 0( et)1 33( se)1 44( ls)1 39(v vo ol)2 128 5 4725 6528 t +10 R f +(command)5006 6528 w +(line option.)1 464 1 1440 6648 t +10 B f +( S)1 0( FS)1 56(H HF)1 139 3 1080 6816 t +10 S f +(_ _)1 50 1 1275 6816 t +10 B f +( E)1 0( PE)1 67( YP)1 61(T TY)1 139 4 1325 6816 t +10 R f +( be overridden using)3 857( May)1 254( characters.)1 466(The default TYPE for Macintosh \256les. Must be exactly 4)9 2383 4 1440 6936 t +(the)1440 7056 w +10 S1 f +(\261 \261)1 65 1 1595 7056 t +10 B f +( s)1 0( fs)1 39(h hf)1 89 3 1660 7056 t +10 S1 f +(\261 \261)1 65 1 1788 7056 t +10 B f +( e)1 0( pe)1 44( yp)1 56(t ty)1 83 4 1853 7056 t +10 R f +(command line option.)2 891 1 2069 7056 t +10 B f +( S)1 0( FS)1 56(H HF)1 139 3 1080 7224 t +10 S f +(_ _)1 50 1 1275 7224 t +10 B f +( R)1 0( OR)1 72( TO)1 78( AT)1 67( EA)1 72(C CR RE)2 211 6 1325 7224 t +10 R f +( 29)1 1838( change: 2010/04/25)2 832( Last)1 1536(Version 3.0)1 474 4 720 7704 t +cleartomark +showpage +restore +%%EndPage: 29 29 +%%Page: 30 30 +save +mark +30 pagesetup +10 R f +( \( 8 \))3 164( MKISOFS)1 3525(Maintenance Procedures)1 991 3 720 480 t +( be overridden)2 608( May)1 257(The default CREATOR for Macintosh \256les. Must be exactly 4 characters.)10 3095 3 1440 960 t +(using the)1 372 1 1440 1080 t +10 S1 f +(\261 \261)1 65 1 1845 1080 t +10 B f +( s)1 0( fs)1 39(h hf)1 89 3 1910 1080 t +10 S1 f +(\261 \261)1 65 1 2038 1080 t +10 B f +( r)1 0( or)1 44( to)1 50( at)1 33(c cr re ea)3 182 5 2103 1080 t +10 R f +(command line option.)2 891 1 2445 1080 t +10 B f +( s)1 0( fs)1 39( of)1 33( so)1 50( is)1 39( ki)1 28(m mk)1 139 7 1080 1248 t +10 R f +( the \256le)2 346( See)1 225( compile time with defaults for many of these \256elds.)9 2294(can also be con\256gured at)4 1080 4 1455 1248 t +(defaults.h.)1080 1368 w +9 B f +( S)1 0( LE ES)2 110( PL)1 60( MP)1 55( XA AM)2 150(E EX)1 125 6 720 1656 t +10 R f +(To create a vanilla ISO-9660 \256lesystem image in the \256le)9 2351 1 1080 1776 t +10 I f +(cd.iso)3466 1776 w +10 R f +(, where the directory)3 855 1 3710 1776 t +10 I f +(cd)4601 1776 w +10 S f +(_)4695 1776 w +10 I f +(dir)4745 1776 w +10 R f +(will become)1 502 1 4898 1776 t +(the root directory of the CD ISO image, call:)8 1853 1 1080 1896 t +(% mkisofs)1 433 1 1080 2064 t +10 S1 f +(\261)1546 2064 w +10 R f +(o cd.iso cd)2 446 1 1611 2064 t +10 S f +(_)2057 2064 w +10 R f +(dir)2107 2064 w +(To create a CD with Rock Ridge extensions of the source directory)11 2769 1 1080 2232 t +10 I f +(cd)3882 2232 w +10 S f +(_)3976 2232 w +10 I f +(dir)4026 2232 w +10 R f +(:)4151 2232 w +(% mkisofs)1 433 1 1080 2400 t +10 S1 f +(\261)1546 2400 w +10 R f +(o cd.iso)1 319 1 1611 2400 t +10 S1 f +(\261)1963 2400 w +10 R f +(R cd)1 194 1 2028 2400 t +10 S f +(_)2222 2400 w +10 R f +(dir)2272 2400 w +( CD with Rock Ridge extensions of the source directory)9 2365(To create a)2 468 2 1080 2568 t +10 I f +(cd)3952 2568 w +10 S f +(_)4046 2568 w +10 I f +(dir)4096 2568 w +10 R f +(where all \256les have at least)5 1148 1 4252 2568 t +(read permission and all \256les are owned by)7 1739 1 1080 2688 t +10 I f +(root)2852 2688 w +10 R f +(, call:)1 230 1 3027 2688 t +(% mkisofs)1 433 1 1080 2856 t +10 S1 f +(\261)1546 2856 w +10 R f +(o cd.iso)1 319 1 1611 2856 t +10 S1 f +(\261)1963 2856 w +10 R f +(r cd)1 160 1 2028 2856 t +10 S f +(_)2188 2856 w +10 R f +(dir)2238 2856 w +(To write a tar archive directly to a CD that will later contain a simple ISO-9660 \256lesystem with the tar)19 4320 1 1080 3024 t +(archive call:)1 498 1 1080 3144 t +(% star)1 260 1 1080 3312 t +10 S1 f +(\261)1373 3312 w +10 R f +(c .)1 102 1 1438 3312 t +10 S f +(\372)1573 3312 w +10 R f +(mkisofs)1656 3312 w +10 S1 f +(\261)2006 3312 w +10 R f +(stream)2071 3312 w +10 S1 f +(\261)2337 3312 w +10 R f +(media)2402 3312 w +10 S1 f +(\261)2646 3312 w +10 R f +(size 333000)1 488 1 2711 3312 t +10 S f +(\372)3232 3312 w +10 S1 f +(\\)3315 3312 w +10 R f +(cdrecord dev=b,t,l)1 737 1 1080 3432 t +10 S1 f +(\261)1850 3432 w +10 R f +(dao tsize=333000s)1 755 1 1915 3432 t +10 S1 f +(\261)2703 3432 w +10 R f +(To create a HFS hybrid CD with the Joliet and Rock Ridge extensions of the source directory)16 3862 1 1080 3600 t +10 I f +(cd)4975 3600 w +10 S f +(_)5069 3600 w +10 I f +(dir)5119 3600 w +10 R f +(:)5244 3600 w +(% mkisofs)1 433 1 1080 3768 t +10 S1 f +(\261)1546 3768 w +10 R f +(o cd.iso)1 319 1 1611 3768 t +10 S1 f +(\261)1963 3768 w +10 R f +(R)2028 3768 w +10 S1 f +(\261)2128 3768 w +10 R f +(J)2193 3768 w +10 S1 f +(\261)2265 3768 w +10 R f +(hfs cd)1 249 1 2330 3768 t +10 S f +(_)2579 3768 w +10 R f +(dir)2629 3768 w +(To create a HFS hybrid CD from the source directory)9 2209 1 1080 3936 t +10 I f +(cd)3322 3936 w +10 S f +(_)3416 3936 w +10 I f +(dir)3466 3936 w +10 R f +(that contains Netatalk Apple/Unix \256les:)4 1620 1 3616 3936 t +(% mkisofs)1 433 1 1080 4104 t +10 S1 f +(\261)1546 4104 w +10 R f +(o cd.iso)1 319 1 1611 4104 t +10 S1 f +(\261\261)1963 4104 w +10 R f +(netatalk cd)1 443 1 2093 4104 t +10 S f +(_)2536 4104 w +10 R f +(dir)2586 4104 w +(To create a HFS hybrid CD from the source directory)9 2290 1 1080 4272 t +10 I f +(cd)3412 4272 w +10 S f +(_)3506 4272 w +10 I f +(dir)3556 4272 w +10 R f +( and TYPES)2 536(, giving all \256les CREATOR)4 1183 2 3681 4272 t +(based on just their \256lename extensions listed in the \256le)9 2263 1 1080 4392 t +10 S1 f +(")3376 4392 w +10 R f +(mapping)3417 4392 w +10 S1 f +(")3767 4392 w +10 R f +(.:)3808 4392 w +(% mkisofs)1 433 1 1080 4560 t +10 S1 f +(\261)1546 4560 w +10 R f +(o cd.iso)1 319 1 1611 4560 t +10 S1 f +(\261)1963 4560 w +10 R f +(map mapping cd)2 682 1 2028 4560 t +10 S f +(_)2710 4560 w +10 R f +(dir)2760 4560 w +(To create a CD with the 'Apple Extensions to ISO-9660', from the source directories)13 3802 1 1080 4728 t +10 I f +(cd)4938 4728 w +10 S f +(_)5032 4728 w +10 I f +(dir)5082 4728 w +10 R f +(and)5256 4728 w +10 I f +(another)1080 4848 w +10 S f +(_)1391 4848 w +10 I f +(dir.)1441 4848 w +10 R f +( are given)2 451(Files in all the known Apple/Unix format are decoded and any other \256les)12 3278 2 1671 4848 t +(CREATOR and TYPE based on their magic number given in the \256le)11 2833 1 1080 4968 t +10 S1 f +(")3946 4968 w +10 R f +(magic)3987 4968 w +10 S1 f +(")4231 4968 w +10 R f +(:)4272 4968 w +(% mkisofs)1 433 1 1080 5136 t +10 S1 f +(\261)1546 5136 w +10 R f +(o cd.iso)1 319 1 1611 5136 t +10 S1 f +(\261)1963 5136 w +10 R f +(apple)2028 5136 w +10 S1 f +(\261)2277 5136 w +10 R f +(magic magic)1 521 1 2342 5136 t +10 S1 f +(\261)2896 5136 w +10 R f +(probe)2961 5136 w +10 S1 f +(\\)3221 5136 w +10 R f +(cd)1344 5256 w +10 S f +(_)1438 5256 w +10 R f +(dir another)1 443 1 1488 5256 t +10 S f +(_)1931 5256 w +10 R f +(dir)1981 5256 w +( but have dif-)3 589(The following example puts different \256les on the CD that all have the name README,)14 3731 2 1080 5424 t +(ferent contents when seen as a ISO-9660/RockRidge, Joliet or HFS CD.)10 2960 1 1080 5544 t +(Current directory contains:)2 1092 1 1080 5712 t +(% ls)1 183 1 1080 5880 t +10 S1 f +(\261)1296 5880 w +10 R f +(F)1361 5880 w +( cd)1 226( README.unix)1 691(README.hfs README.joliet)1 1387 3 1080 6000 t +10 S f +(_)3384 6000 w +10 R f +(dir/)3434 6000 w +(The following command puts the contents of the directory)8 2549 1 1080 6168 t +10 I f +(cd)3682 6168 w +10 S f +(_)3776 6168 w +10 I f +(dir)3826 6168 w +10 R f +( along with the three)4 937(on the CD)2 467 2 3996 6168 t +(README \256les - but only one will be seen from each of the three \256lesystems:)14 3214 1 1080 6288 t +(% mkisofs)1 433 1 1080 6456 t +10 S1 f +(\261)1546 6456 w +10 R f +(o cd.iso)1 319 1 1611 6456 t +10 S1 f +(\261)1963 6456 w +10 R f +(hfs)2028 6456 w +10 S1 f +(\261)2183 6456 w +10 R f +(J)2248 6456 w +10 S1 f +(\261)2320 6456 w +10 R f +(r)2385 6456 w +10 S1 f +(\261)2451 6456 w +10 R f +(graft)2516 6456 w +10 S1 f +(\261)2704 6456 w +10 R f +(points)2769 6456 w +10 S1 f +(\\)3047 6456 w +(\261)1344 6576 w +10 R f +(hide README.hfs)1 774 1 1409 6576 t +10 S1 f +(\261)2216 6576 w +10 R f +(hide README.joliet)1 858 1 2281 6576 t +10 S1 f +(\\)3172 6576 w +(\261)1344 6696 w +10 R f +(hide)1409 6696 w +10 S1 f +(\261)1581 6696 w +10 R f +(joliet README.hfs)1 808 1 1646 6696 t +10 S1 f +(\261)2487 6696 w +10 R f +(hide)2552 6696 w +10 S1 f +(\261)2724 6696 w +10 R f +(joliet README.unix)1 864 1 2789 6696 t +10 S1 f +(\\)3686 6696 w +(\261)1344 6816 w +10 R f +(hide)1409 6816 w +10 S1 f +(\261)1581 6816 w +10 R f +(hfs README.joliet)1 808 1 1646 6816 t +10 S1 f +(\261)2487 6816 w +10 R f +(hide)2552 6816 w +10 S1 f +(\261)2724 6816 w +10 R f +(hfs README.unix)1 780 1 2789 6816 t +10 S1 f +(\\)3602 6816 w +10 R f +(README=README.hfs README=README.joliet)1 2211 1 1344 6936 t +10 S1 f +(\\)3588 6936 w +10 R f +(README=README.unix cd)1 1230 1 1344 7056 t +10 S f +(_)2574 7056 w +10 R f +(dir)2624 7056 w +( 30)1 1838( change: 2010/04/25)2 832( Last)1 1536(Version 3.0)1 474 4 720 7680 t +cleartomark +showpage +restore +%%EndPage: 30 30 +%%Page: 31 31 +save +mark +31 pagesetup +10 R f +( \( 8 \))3 164( MKISOFS)1 3525(Maintenance Procedures)1 991 3 720 480 t +( HFS CD and the other two README \256les)8 1845(i.e. the \256le README.hfs will be seen as README on the)10 2475 2 1080 960 t +(will be hidden. Similarly for the Joliet and ISO-9660/RockRidge CD.)9 2852 1 1080 1080 t +(There are probably all sorts of strange results possible with combinations of the hide options ...)15 3916 1 1080 1248 t +9 B f +( R)1 0( HO OR)2 135( TH)1 70(A AU UT)2 190 4 720 1536 t +10 R f +(Eric Youngdale)1 642 1 1080 1656 t +10 S1 f +(<)1760 1656 w +10 R f +(ericy)1816 1656 w +10 S1 f +(@)2015 1656 w +10 R f +(gnu.ai.mit.edu)2107 1656 w +10 S1 f +(>)2682 1656 w +10 R f +(or)2776 1656 w +10 S1 f +(<)2897 1656 w +10 R f +(eric)2953 1656 w +10 S1 f +(@)3102 1656 w +10 R f +(andante.org)3194 1656 w +10 S1 f +(>)3662 1656 w +10 R f +( 1998\))1 272( . .)2 82( \256rst versions \(1993 .)4 903(wrote the)1 387 4 3756 1656 t +( Com-)1 266( copyright for old versions of the mkisofs utility is held by Yggdrasil)12 2923( The)1 227(of the mkisofs utility.)3 904 4 1080 1776 t +( J)1 107(puting, Incorporated.)1 850 2 1080 1896 t +(. .)1 47 1 2037 1841 t +( and its adaptation layer to)5 1112(org Schilling wrote the SCSI transport library)6 1887 2 2037 1896 t +10 B f +( s)1 0( fs)1 39( of)1 33( so)1 50( is)1 39( ki)1 28(m mk)1 139 7 5072 1896 t +10 R f +( J)1 108( 1997\) of the utility.)4 847(and newer parts \(starting from)4 1256 3 1080 2016 t +(. .)1 47 1 3291 1961 t +(org Schilling is the primary maintainer since 1999,)7 2109 1 3291 2016 t +(this makes)1 433 1 1080 2136 t +10 B f +( s)1 0( fs)1 39( of)1 33( so)1 50( is)1 39( ki)1 28(m mk)1 139 7 1546 2136 t +10 R f +(Copyright \(C\) 1997-2010 J)3 1110 1 1907 2136 t +(. .)1 47 1 3017 2081 t +(org Schilling.)1 553 1 3017 2136 t +( 2001.)1 258( . .)2 82(HFS hybrid code Copyright \(C\) James Pearson 1997 .)8 2221 3 1080 2304 t +(libhfs code Copyright \(C\) 1996, 1997 Robert Leslie.)7 2152 1 1080 2544 t +(lib\256le code Copyright \(C\) Ian F. Darwin 1986, 1987, 1989, 1990, 1991, 1992, 1994, 1995.)14 3730 1 1080 2784 t +9 B f +( S)1 0( TE ES)2 110( OT)1 60(N NO)1 135 4 720 2952 t +10 B f +( s)1 0( fs)1 39( of)1 33( so)1 50( is)1 39( ki)1 28(M Mk)1 150 7 1080 3072 t +10 R f +(may safely be installed suid root. This may be needed to allow)11 2684 1 1461 3072 t +10 B f +( s)1 0( fs)1 39( of)1 33( so)1 50( is)1 39( ki)1 28(m mk)1 139 7 4187 3072 t +10 R f +( the previous)2 552(to read)1 291 2 4557 3072 t +(session when creating a multi session image.)6 1838 1 1080 3192 t +10 B f +( s)1 0( fs)1 39( of)1 33( so)1 50( is)1 39( ki)1 28(m mk)1 139 7 1080 3360 t +10 R f +(is not based on the standard mk)6 1308 1 1441 3360 t +10 S f +(*)2749 3360 w +10 R f +( copy of)2 345(fs tools for unix, because we must generate a complete)9 2256 2 2799 3360 t +( is probably a bit of a)6 933( name mkisofs)2 613( The)1 228( \256lesystem.)1 471( ISO-9660)1 467(an existing \256lesystem on a disk in the)7 1608 6 1080 3480 t +( the)1 178( However,)1 479( \256lesystem, but it also populates it as well.)8 1943(misnomer, since it not only creates the)6 1720 4 1080 3600 t +(appropriate tool name for a UNIX tool that creates populated \256lesystems -)11 3052 1 1080 3720 t +10 B f +( o)1 0( to)1 50( ot)1 33( ro)1 50( kp pr)2 100(m mk)1 139 6 4165 3720 t +10 R f +(- is not well known.)4 829 1 4570 3720 t +(If)1080 3888 w +10 B f +( s)1 0( fs)1 39( of)1 33( so)1 50( is)1 39( ki)1 28(m mk)1 139 7 1186 3888 t +10 R f +( \256lesystem image with Rock Ridge attributes and the directory nesting level of)12 3334(is creating a)2 512 2 1554 3888 t +( much for ISO-9660,)3 898(the source directory tree is too)5 1326 2 1080 4008 t +10 B f +( s)1 0( fs)1 39( of)1 33( so)1 50( is)1 39( ki)1 28(m mk)1 139 7 3351 4008 t +10 R f +( This)1 258(will do deep directory relocation.)4 1416 2 3726 4008 t +(results in a directory called)4 1129 1 1080 4128 t +10 B f +(R RR R)2 144 1 2246 4128 t +10 S f +(_ _)1 50 1 2390 4128 t +10 B f +( D)1 0( ED)1 72( VE)1 67( OV)1 72(M MO)1 172 5 2440 4128 t +10 R f +( CD. You cannot avoid this direc-)6 1429(in the root directory of the)5 1111 2 2860 4128 t +(tory in the directory tree that is visible with ISO-9660 but it it automatically hidden in the)16 3774 1 1080 4248 t +10 B f +( e)1 0( ge)1 44( dg)1 50( id)1 56( Ri)1 28( R)1 109( k)1 0( ck)1 56( oc)1 44(R Ro)1 122 10 4891 4248 t +10 R f +(tree.)1080 4368 w +( that is implemented with the)5 1319(The sparc boot support)3 1008 2 1080 4536 t +10 S1 f +(\261 \261)1 65 1 3463 4536 t +10 B f +( rc c)2 44( ar)1 44( pa)1 50(s sp)1 95 4 3528 4536 t +10 S1 f +(\261 \261)1 65 1 3761 4536 t +10 B f +( t)1 0( oo ot)2 83(b bo)1 106 3 3826 4536 t +10 R f +(options completely follows the)3 1329 1 4071 4536 t +( systems. Some Linux distribu-)4 1316(of\256cial Sparc CD boot requirements from the Boot prom in Sun Sparc)11 3004 2 1080 4656 t +( Sparc systems use a boot loader called)7 1652(tions for)1 348 2 1080 4776 t +10 B f +( O)1 0( LO)1 78( IL)1 67(S SI)1 95 4 3118 4776 t +10 R f +(that unfortunately is not Sparc CD boot compli-)7 2004 1 3396 4776 t +( but instead provide a completely)5 1399( is annoyingly to see that the Authors of SILO don't \256x SILO)12 2640(ant. It)1 281 3 1080 4896 t +(unneeded)1080 5016 w +10 S1 f +(")1495 5016 w +10 R f +(patch)1536 5016 w +10 S1 f +(")1752 5016 w +10 R f +(to mkisofs that incorporates far more source than the \256x for SILO would need.)13 3243 1 1826 5016 t +9 B f +( S)1 0( GS)1 50( UG)1 70(B BU)1 125 4 720 5184 t +10 R f +( not properly read relocated directories in multi-session mode when adding data.)11 3299(\267 Does)1 565 2 1080 5304 t +(Any relocated deep directory is lost if the new session does not include the deep directory.)15 3730 1 1440 5544 t +( add new session with a single)6 1270(Repeat by: create \256rst session with deep directory relocation then)9 2690 2 1440 5784 t +(dir that differs from the old deep path.)7 1581 1 1440 5904 t +( not re-use RR)3 604(\267 Does)1 565 2 1080 6072 t +10 S f +(_)2249 6072 w +10 R f +(MOVED when doing multi-session from TRANS.TBL)5 2245 1 2299 6072 t +( report them to the author.)5 1083( Please,)1 346(There may be some other ones.)5 1287 3 1080 6240 t +9 B f +( S)1 0( NS)1 50( ON)1 65( IO)1 70( TI)1 35( AT)1 60( TA)1 65( IT)1 60( MI)1 35( IM)1 85( LI)1 35( /L)1 60( S/)1 25( MS)1 50( BL LE EM)3 205( OB)1 60( RO)1 70( PR)1 65( P)1 85( S)1 0( FS)1 50(H HF)1 125 22 720 6528 t +10 R f +( on how I expect the modi\256ed libhfs routines to work, however)11 2662(I have had to make several assumptions)6 1658 2 1080 6648 t +( haven't thought of, or come across when these assumptions fail.)10 2785(there may be situations that either I)6 1535 2 1080 6768 t +( can't guarantee that mkisofs will work as expected \(although I haven't had a major problem)15 3860(Therefore I)1 460 2 1080 6888 t +( of the HFS features work \256ne, however, some are not fully tested. These are marked as)16 3628(yet\). Most)1 420 2 1080 7008 t +10 I f +(Alpha)5161 7008 w +10 R f +(above.)1080 7128 w +( 31)1 1838( change: 2010/04/25)2 832( Last)1 1536(Version 3.0)1 474 4 720 7680 t +cleartomark +showpage +restore +%%EndPage: 31 31 +%%Page: 32 32 +save +mark +32 pagesetup +10 R f +( \( 8 \))3 164( MKISOFS)1 3525(Maintenance Procedures)1 991 3 720 480 t +( case insensi-)2 566(Although HFS \256lenames appear to support upper and lower case letters, the \256lesystem is)13 3754 2 1080 960 t +(tive. i.e. the \256lenames)3 934 1 1080 1080 t +10 S1 f +(")2058 1080 w +10 R f +(aBc)2099 1080 w +10 S1 f +(")2254 1080 w +10 R f +(and)2339 1080 w +10 S1 f +(")2527 1080 w +10 R f +(AbC)2568 1080 w +10 S1 f +(")2757 1080 w +10 R f +( same. If a \256le is found in a directory with the same)12 2271(are the)1 287 2 2842 1080 t +(HFS name, then)2 675 1 1080 1200 t +10 I f +(mkisofs)1794 1200 w +10 R f +( name by adding ')4 781(will attempt, where possible, to make a unique)7 1960 2 2133 1200 t +10 S f +(_)4874 1200 w +10 R f +(' characters)1 476 1 4924 1200 t +(to one of the \256lenames.)4 967 1 1080 1320 t +(HFS \256le/directory names that share the \256rst 31 characters have)9 2626 1 1080 1488 t +10 S f +(_)3745 1488 w +10 R f +(N' \(N == decimal number\) substituted)5 1605 1 3795 1488 t +(for the last few characters to generate unique names.)8 2160 1 1080 1608 t +(Care must be taken when)4 1041 1 1080 1776 t +10 S1 f +(")2154 1776 w +10 R f +(grafting)2195 1776 w +10 S1 f +(")2511 1776 w +10 R f +( syntax)1 295(Apple/Unix \256les or directories \(see above for the method and)9 2520 2 2585 1776 t +( If a)2 212(involved\). It is not possible to use a new name for an Apple/Unix encoded \256le/directory. e.g.)15 4108 2 1080 1896 t +(Apple/Unix encoded \256le called)3 1299 1 1080 2016 t +10 S1 f +(")2422 2016 w +10 R f +(oldname)2463 2016 w +10 S1 f +(")2807 2016 w +10 R f +( the CD, then you can not use the command)9 1919(is to added to)3 590 2 2891 2016 t +(line:)1080 2136 w +(mkisofs)1440 2304 w +10 S1 f +(\261)1790 2304 w +10 R f +(o output.raw)1 513 1 1855 2304 t +10 S1 f +(\261)2401 2304 w +10 R f +(hfs)2466 2304 w +10 S1 f +(\261)2621 2304 w +10 R f +(graft)2686 2304 w +10 S1 f +(\261)2874 2304 w +10 R f +(points newname=oldname cd)2 1187 1 2939 2304 t +10 S f +(_)4126 2304 w +10 R f +(dir)4176 2304 w +( be unable to decode)4 860(mkisofs will)1 507 2 1080 2472 t +10 S1 f +(")2482 2472 w +10 R f +(oldname)2523 2472 w +10 S1 f +(")2867 2472 w +10 R f +(. However, you can graft Apple/Unix encoded \256les or direc-)9 2492 1 2908 2472 t +(tories as long as you do not attempt to give them new names as above.)14 2923 1 1080 2592 t +( the multisession options,)3 1054(When creating an HFS volume with)5 1495 2 1080 2760 t +10 S1 f +(\261 \261)1 65 1 3666 2760 t +10 B f +(M M)1 94 1 3731 2760 t +10 R f +(and)3862 2760 w +10 S1 f +(\261 \261)1 65 1 4043 2760 t +10 B f +(C C)1 72 1 4108 2760 t +10 R f +(, only \256les in the last session)6 1220 1 4180 2760 t +(will be in the HFS volume. i.e. mkisofs can not)9 2051 1 1080 2880 t +10 I f +(add)3174 2880 w +10 R f +( the HFS)2 390(existing \256les from previous sessions to)5 1643 2 3367 2880 t +(volume.)1080 3000 w +(However, if each session is created with the)7 1898 1 1080 3168 t +10 S1 f +(\261 \261)1 65 1 3024 3168 t +10 B f +( t)1 0( rt)1 33( ar)1 44(p pa)1 106 4 3089 3168 t +10 R f +( each session will appear as separate)6 1583(option, then)1 499 2 3318 3168 t +(volumes when mounted on a Mac. In this case, it is worth using the)13 2890 1 1080 3288 t +10 S1 f +(\261 \261)1 65 1 4009 3288 t +10 B f +(V V)1 72 1 4074 3288 t +10 R f +(or)4185 3288 w +10 S1 f +(\261 \261)1 65 1 4307 3288 t +10 B f +( s)1 0( fs)1 39(h hf)1 89 3 4372 3288 t +10 S1 f +(\261 \261)1 65 1 4500 3288 t +10 B f +( d)1 0( li id)2 84(v vo ol)2 128 3 4565 3288 t +10 R f +(option to give)2 584 1 4816 3288 t +( a unique volume name, otherwise each)6 1637(each session)1 505 2 1080 3408 t +10 S1 f +(")3257 3408 w +10 R f +(volume)3298 3408 w +10 S1 f +(")3598 3408 w +10 R f +(will appear on the Desktop with the same)7 1726 1 3674 3408 t +(name.)1080 3528 w +(Symbolic links \(as with all other non-regular \256les\) are not added to the HFS directory.)14 3561 1 1080 3696 t +( may be larger than pure ISO-9660 volumes containing the same data. In some cases)14 3654(Hybrid volumes)1 666 2 1080 3864 t +( hybrid volume may be signi\256cantly larger. As an HFS volume gets)11 3012(\(e.g. DVD sized volumes\) the)4 1308 2 1080 3984 t +( a 650Mb)2 403( For)1 207( allocation block size \(the smallest amount of space a \256le can occupy\).)12 2934(bigger, so does the)3 776 4 1080 4104 t +(CD, the allocation block is 10Kb, for a 4.7Gb DVD it will be about 70Kb.)14 3076 1 1080 4224 t +( the real limit will be some-)6 1171(The maximum number of \256les in an HFS volume is about 65500 - although)13 3149 2 1080 4392 t +(what less than this.)3 785 1 1080 4512 t +( be accessed on a Unix machine by using the hfsutils routines. How-)12 2948(The resulting hybrid volume can)4 1372 2 1080 4680 t +(ever, no changes can be made to the volume as it is set as)13 2446 1 1080 4800 t +10 B f +( .)1 0( d.)1 25( ed)1 56( ke)1 44( ck)1 56( oc)1 44(l lo)1 78 7 3563 4800 t +10 R f +(The option)1 448 1 3903 4800 t +10 S1 f +(\261 \261)1 65 1 4387 4800 t +10 B f +( s)1 0( fs)1 39(h hf)1 89 3 4452 4800 t +10 S1 f +(\261 \261)1 65 1 4580 4800 t +10 B f +( k)1 0( ck)1 56( oc)1 44( lo)1 50(u un nl)2 140 5 4645 4800 t +10 R f +(will create)1 429 1 4971 4800 t +( no changes should be made to the contents of the volume)11 2487(an output image that is unlocked - however)7 1833 2 1080 4920 t +(\(unless you really know what you are doing\) as it's not a)11 2354 1 1080 5040 t +10 S1 f +(")3467 5040 w +10 R f +(real)3508 5040 w +10 S1 f +(")3657 5040 w +10 R f +(HFS volume.)1 542 1 3731 5040 t +(Using the)1 395 1 1080 5208 t +10 S1 f +(\261 \261)1 65 1 1509 5208 t +10 B f +( c)1 0( ac)1 44(m ma)1 133 3 1574 5208 t +10 S1 f +(\261 \261)1 65 1 1751 5208 t +10 B f +( e)1 0( me)1 44( am)1 83(n na)1 106 4 1816 5208 t +10 R f +( the)1 157(option will not currently work with)5 1453 2 2083 5208 t +10 S1 f +(\261 \261)1 65 1 3728 5208 t +10 B f +(T T)1 67 1 3793 5208 t +10 R f +(option - the Unix name will be used)7 1505 1 3895 5208 t +(in the TRANS.TBL \256le, not the Macintosh name.)7 2039 1 1080 5328 t +(Although)1080 5496 w +10 B f +( s)1 0( fs)1 39( of)1 33( so)1 50( is)1 39( ki)1 28(m mk)1 139 7 1499 5496 t +10 R f +( binary \256le has its TYPE set as 'TEXT', it)9 1835(does not alter the contents of a \256le, if a)9 1697 2 1868 5496 t +10 I f +(may)1080 5616 w +10 R f +(be read incorrectly on a Macintosh. Therefore a better choice for the default TYPE may be '????')16 4012 1 1279 5616 t +(The)1080 5784 w +10 S1 f +(\261 \261)1 65 1 1268 5784 t +10 B f +( c)1 0( ac)1 44(m ma)1 133 3 1333 5784 t +10 S1 f +(\261 \261)1 65 1 1510 5784 t +10 B f +( t)1 0( oo ot)2 83(b bo)1 106 3 1575 5784 t +10 S1 f +(\261 \261)1 65 1 1764 5784 t +10 B f +( e)1 0( le)1 44(\256 \256l)1 84 3 1829 5784 t +10 R f +(option may not work at all...)5 1173 1 1990 5784 t +( media contain-)2 643( DOS)1 269( \(available with MacOS 8.1\).)4 1203(May not work with PC Exchange v2.2 or higher \256les)9 2205 4 1080 5952 t +(ing PC Exchange \256les should be mounted as type)8 2041 1 1080 6072 t +10 B f +( s)1 0( os)1 39( do)1 50( sd)1 56(m ms)1 122 5 3154 6072 t +10 R f +(\(not)3454 6072 w +10 B f +( t)1 0( at)1 33( fa)1 50(v vf)1 83 4 3648 6072 t +10 R f +(\) when using Linux.)3 829 1 3814 6072 t +(The SFM format is only partially supported - see)8 2018 1 1080 6240 t +10 B f +( S)1 0( TS)1 56( AT)1 67( MA)1 72( RM)1 94( OR)1 72( FO)1 78( F)1 94( LE E)2 67( IL)1 67( FI)1 39( F)1 94( H)1 0( SH)1 78( OS)1 56( TO)1 78( NT)1 67( IN)1 72( AC CI)2 111( MA)1 72( M)1 127( S)1 0( FS)1 56(H HF)1 139 24 3131 6240 t +10 R f +(section above.)1 579 1 4820 6240 t +(It is not possible to use the the)7 1347 1 1080 6408 t +10 S1 f +(\261 \261)1 65 1 2471 6408 t +10 B f +( rc c)2 44( ar)1 44( pa)1 50(s sp)1 95 4 2536 6408 t +10 S1 f +(\261 \261)1 65 1 2769 6408 t +10 B f +( t)1 0( oo ot)2 83(b bo)1 106 3 2834 6408 t +10 R f +(or)3067 6408 w +10 S1 f +(\261 \261)1 65 1 3194 6408 t +10 B f +( c)1 0( ic)1 44( er ri)2 72( ne)1 44( en)1 56(g ge)1 94 6 3259 6408 t +10 S1 f +(\261 \261)1 65 1 3569 6408 t +10 B f +( t)1 0( oo ot)2 83(b bo)1 106 3 3634 6408 t +10 R f +(options with the)2 683 1 3867 6408 t +10 S1 f +(\261 \261)1 65 1 4594 6408 t +10 B f +( t)1 0( oo ot)2 83(b bo)1 106 3 4659 6408 t +10 S1 f +(\261 \261)1 65 1 4848 6408 t +10 B f +( s)1 0( fs)1 39(h hf)1 89 3 4913 6408 t +10 S1 f +(\261 \261)1 65 1 5041 6408 t +10 B f +( e)1 0( le)1 44(\256 \256l)1 84 3 5106 6408 t +10 R f +(the)5278 6408 w +10 S1 f +(\261 \261)1 65 1 1080 6528 t +10 B f +( p)1 0( re ep)2 100(p pr)1 100 3 1145 6528 t +10 S1 f +(\261 \261)1 65 1 1345 6528 t +10 B f +( t)1 0( oo ot)2 83(b bo)1 106 3 1410 6528 t +10 R f +(or)1632 6528 w +10 S1 f +(\261 \261)1 65 1 1748 6528 t +10 B f +( p)1 0( rp)1 56( hr)1 44(c ch)1 100 4 1813 6528 t +10 S1 f +(\261 \261)1 65 1 2013 6528 t +10 B f +( t)1 0( oo ot)2 83(b bo)1 106 3 2078 6528 t +10 R f +(options.)2300 6528 w +10 B f +( s)1 0( fs)1 39( of)1 33( so)1 50( is)1 39( ki)1 28(m mk)1 139 7 1080 6696 t +10 R f +(should be able to create HFS hybrid images over 4Gb, although this has not been fully tested.)16 3863 1 1441 6696 t +9 B f +( O)1 0( SO)1 70( LS)1 50( AL)1 60( A)1 95( EE E)2 60(S SE)1 110 7 720 6984 t +10 B f +( d)1 0( rd)1 56( or)1 44( re ec co)3 138( dr)1 44(c cd)1 100 6 1080 7104 t +10 R f +(\(1\),)1462 7104 w +10 B f +( re ee e)3 88( ft tr)2 77( zf)1 33( kz)1 44(m mk)1 139 5 1636 7104 t +10 R f +(\(1\),)2017 7104 w +10 B f +( c)1 0( ic)1 44( ag gi)2 78(m ma)1 133 4 2191 7104 t +10 R f +(\(5\),)2446 7104 w +10 B f +( e)1 0( le)1 44( pp pl)2 84(a ap)1 106 4 2620 7104 t +10 S f +(_ _)1 50 1 2854 7104 t +10 B f +( er r)2 44( ve)1 44( iv)1 50( ri)1 28(d dr)1 100 5 2904 7104 t +10 R f +(\(8\).)3170 7104 w +( 32)1 1838( change: 2010/04/25)2 832( Last)1 1536(Version 3.0)1 474 4 720 7680 t +cleartomark +showpage +restore +%%EndPage: 32 32 +%%Page: 33 33 +save +mark +33 pagesetup +10 R f +( \( 8 \))3 164( MKISOFS)1 3525(Maintenance Procedures)1 991 3 720 480 t +9 B f +( S)1 0( TS)1 50( NT)1 60( EN)1 65( ME)1 60( EM)1 85( VE)1 60( OV)1 65( RO)1 70( PR)1 65( MP)1 55( IM)1 85( I)1 65( E)1 0( UR RE)2 125( TU)1 65( UT)1 60(F FU)1 120 18 720 960 t +10 R f +(Some sort of gui interface.)4 1094 1 1080 1080 t +9 B f +( Y)1 0( TY)1 65( IT)1 60( LI)1 35( IL)1 60( BI)1 35( AB)1 60( LA)1 65( IL)1 60(A AV VA AI)3 230 10 720 1248 t +10 B f +( s)1 0( fs)1 39( of)1 33( so)1 50( is)1 39( ki)1 28(m mk)1 139 7 1080 1368 t +10 R f +(is available as part of the cdrecord package from ftp://ftp.berlios.de/pub/cdrecord/)9 3339 1 1441 1368 t +10 B f +( s)1 0( il ls)2 67( ti)1 28( ut)1 33( su)1 56( fs)1 39(h hf)1 89 7 1080 1608 t +10 R f +(from ftp://ftp.mars.org/pub/hfs)1 1238 1 1425 1608 t +10 B f +( re ee e)3 88( ft tr)2 77( zf)1 33( kz)1 44(m mk)1 139 5 1080 1848 t +10 R f +(is available as part of the zisofs-tools package from ftp://ftp.kernel.org/pub/linux/utils/fs/zisofs/)9 3888 1 1494 1848 t +9 B f +( S)1 0( TS)1 50( ST)1 60( IS)1 50( LI)1 35( L)1 90( G)1 0( NG)1 70( IN)1 65( LI)1 35( IL)1 60( AI)1 35(M MA)1 150 13 720 2016 t +10 R f +( to actively take part on the development of mkisofs, you may join the developer mailing list)16 3844(If you want)2 476 2 1080 2136 t +(via this URL:)2 561 1 1080 2256 t +10 B f +( s)1 0( er rs)2 83( pe)1 44( op)1 56( lo)1 50( el)1 28( ve)1 44( ev)1 50( de)1 44( -d)1 56( d-)1 33( rd)1 56( or)1 44( re ec co)3 138( dr)1 44( cd)1 56( /c)1 44( o/)1 28( fo)1 50( nf)1 33( in)1 56( ti)1 28( st)1 33( /l li is)3 95( n/)1 28( an)1 56( ma)1 50( il lm)2 111( ai)1 28( ma)1 50( /m)1 83( e/)1 28( de)1 44( .d)1 56( s.)1 25( os)1 39( li io)2 78( er rl)2 72( be)1 44( .b)1 56( s.)1 25( ts)1 39( st)1 33( // /l li is)4 123( :/)1 28( p:)1 33( tt tp)2 89(h ht)1 89 48 1080 2496 t +9 B f +( R)1 0( ER)1 65( NE)1 60( IN)1 65( AI)1 35( TA)1 65( NT)1 60( IN)1 65( AI)1 35(M MA)1 150 10 720 2784 t +10 R f +(J)1080 2904 w +(. .)1 47 1 1119 2849 t +(org Schilling)1 528 1 1119 2904 t +(Seestr. 110)1 452 1 1080 3024 t +(D-13353 Berlin)1 638 1 1080 3144 t +(Germany)1080 3264 w +9 B f +( R)1 0( ER)1 65( NE)1 60( IN)1 65( AI)1 35( TA)1 65( NT)1 60( IN)1 65( AI)1 35( MA)1 65( M)1 115( D)1 0( ID)1 65( RI)1 35( BR)1 65( YB)1 60( KH HY)2 135( MK)1 70( M)1 115( S)1 0( FS)1 50(H HF)1 125 22 720 3432 t +10 R f +(James Pearson)1 593 1 1080 3552 t +(j.pearson)1080 3720 w +10 S1 f +(@)1443 3720 w +10 R f +(ge.ucl.ac.uk)1535 3720 w +(If you have support questions, send them to:)7 1827 1 1080 4008 t +10 B f +( t)1 0( rt)1 33( or)1 44( up pp po)3 162( su)1 56( -s)1 39( d-)1 33( rd)1 56( or)1 44( re ec co)3 138( dr)1 44(c cd)1 100 12 1080 4176 t +10 S1 f +(@ @)1 92 1 1829 4176 t +10 B f +( e)1 0( de)1 44( .d)1 56( s.)1 25( os)1 39( li io)2 78( er rl)2 72(b be)1 100 8 1921 4176 t +10 R f +(If you de\256nitly found a bug, send a mail to:)9 1810 1 1080 4344 t +10 B f +( s)1 0( er rs)2 83( pe)1 44( op)1 56( lo)1 50( el)1 28( ve)1 44( ev)1 50( de)1 44( -d)1 56( d-)1 33( rd)1 56( or)1 44( re ec co)3 138( dr)1 44(c cd)1 100 16 1080 4512 t +10 S1 f +(@ @)1 92 1 1950 4512 t +10 B f +( e)1 0( de)1 44( .d)1 56( s.)1 25( os)1 39( li io)2 78( er rl)2 72(b be)1 100 8 2042 4512 t +10 R f +(or)1080 4632 w +10 B f +( g)1 0( ng)1 50( il ll li in)4 140( hi)1 28( ch)1 56( sc)1 44( .s)1 39( g.)1 25( er rg)2 94( oe)1 44(j jo)1 83 11 1196 4632 t +10 S1 f +(@ @)1 92 1 1799 4632 t +10 B f +( e)1 0( de)1 44( .d)1 56( er r.)2 69( fe)1 44( of)1 33( un nh ho)3 162( au)1 56( ra)1 50( fr)1 44( .f)1 33( s.)1 25( ku us)2 95( ok)1 56(f fo)1 83 15 1891 4632 t +10 R f +(To subscribe, use:)2 740 1 1080 4800 t +10 B f +( s)1 0( er rs)2 83( pe)1 44( op)1 56( lo)1 50( el)1 28( ve)1 44( ev)1 50( de)1 44( -d)1 56( d-)1 33( rd)1 56( or)1 44( re ec co)3 138( dr)1 44( cd)1 56( /c)1 44( o/)1 28( fo)1 50( nf)1 33( in)1 56( ti)1 28( st)1 33( /l li is)3 95( n/)1 28( an)1 56( ma)1 50( il lm)2 111( ai)1 28( ma)1 50( /m)1 83( e/)1 28( de)1 44( .d)1 56( s.)1 25( os)1 39( li io)2 78( er rl)2 72( be)1 44( .b)1 56( s.)1 25( ts)1 39( st)1 33( // /l li is)4 123( :/)1 28( p:)1 33( tt tp)2 89(h ht)1 89 48 1080 4968 t +10 R f +(or)1080 5088 w +10 B f +( t)1 0( rt)1 33( or)1 44( up pp po)3 162( su)1 56( -s)1 39( d-)1 33( rd)1 56( or)1 44( re ec co)3 138( dr)1 44( cd)1 56( /c)1 44( o/)1 28( fo)1 50( nf)1 33( in)1 56( ti)1 28( st)1 33( /l li is)3 95( n/)1 28( an)1 56( ma)1 50( il lm)2 111( ai)1 28( ma)1 50( /m)1 83( e/)1 28( de)1 44( .d)1 56( s.)1 25( os)1 39( li io)2 78( er rl)2 72( be)1 44( .b)1 56( s.)1 25( ts)1 39( st)1 33( // /l li is)4 123( :/)1 28( p:)1 33( tt tp)2 89(h ht)1 89 44 1196 5088 t +9 B f +( Y)1 0( TY)1 65( IT)1 60( LI)1 35( IL)1 60( BI)1 35( AB)1 60( TA)1 65( ST)1 60( S)1 80( E)1 0( AC CE)2 125( FA)1 65( RF)1 55( TE ER)2 125( NT)1 60(I IN)1 100 17 720 5256 t +10 R f +(The interfaces provided by)3 1111 1 1080 5376 t +10 B f +( s)1 0( fs)1 39( of)1 33( so)1 50( is)1 39( ki)1 28(m mk)1 139 7 2229 5376 t +10 R f +( As)1 183( for long term stability.)4 981(are designed)1 514 3 2595 5376 t +10 B f +( s)1 0( fs)1 39( of)1 33( so)1 50( is)1 39( ki)1 28(m mk)1 139 7 4312 5376 t +10 R f +(depends on inter-)2 721 1 4679 5376 t +( the underlying operating system, the stability of the interfaces offered by)11 3187(faces provided by)2 757 2 1080 5496 t +10 B f +( s)1 0( fs)1 39( of)1 33( so)1 50( is)1 39( ki)1 28(m mk)1 139 7 5072 5496 t +10 R f +( interfaces. Modi\256ed interfaces in the OS may enforce)8 2396(depends on the interface stability of the OS)7 1924 2 1080 5616 t +(modi\256ed interfaces in)2 887 1 1080 5736 t +10 B f +( s)1 0( fs)1 39( of)1 33( so)1 50( is)1 39( ki)1 28(m mk)1 139 7 2000 5736 t +10 R f +(.)2328 5736 w +( 33)1 1838( change: 2010/04/25)2 832( Last)1 1536(Version 3.0)1 474 4 720 7680 t +cleartomark +showpage +restore +%%EndPage: 33 33 %%Trailer -end -%%EOF +done +%%DocumentFonts: Times-Roman Times-Bold Times-Italic Symbol +%%Pages: 33 diff -Nru cdrtools-2.01.01a33/doc/readcd.man cdrtools-3.02a09/doc/readcd.man --- cdrtools-2.01.01a33/doc/readcd.man 2002-12-24 15:56:07.000000000 +0000 +++ cdrtools-3.02a09/doc/readcd.man 2010-05-30 15:56:18.000000000 +0000 @@ -1,422 +1,726 @@ -READCD(1) Schily's USER COMMANDS READCD(1) + + + +Schily's USER COMMANDS READCD(1) NNAAMMEE - readcd - read or write data Compact Discs + readcd - read or write data Compact Discs or related madia SSYYNNOOPPSSIISS - rreeaaddccdd ddeevv==_d_e_v_i_c_e [ _o_p_t_i_o_n_s ] + rreeaaddccdd [ ddeevv==_d_e_v_i_c_e ][ _o_p_t_i_o_n_s ] DDEESSCCRRIIPPTTIIOONN - RReeaaddccdd is used to read or write Compact Discs. + RReeaaddccdd is used to read or write Compact Discs. - The _d_e_v_i_c_e refers to _s_c_s_i_b_u_s/_t_a_r_g_e_t/_l_u_n of the drive. Com- - munication on _S_u_n_O_S is done with the SCSI general driver - ssccgg.. Other operating systems are using a library simula- - tion of this driver. Possible syntax is: ddeevv== _s_c_s_i_- - _b_u_s,_t_a_r_g_e_t,_l_u_n or ddeevv== _t_a_r_g_e_t,_l_u_n. In the latter case, - the drive has to be connected to the default SCSI bus of - the machine. _S_c_s_i_b_u_s, _t_a_r_g_e_t and _l_u_n are integer numbers. - Some operating systems or SCSI transport implementations - may require to specify a filename in addition. In this - case the correct syntax for the device is: ddeevv== _d_e_v_i_c_e_- - _n_a_m_e:_s_c_s_i_b_u_s,_t_a_r_g_e_t,_l_u_n or ddeevv== _d_e_v_i_c_e_n_a_m_e:_t_a_r_g_e_t,_l_u_n. If - the name of the device node that has been specified on - such a system refers to exactly one SCSI device, a short- - hand in the form ddeevv== _d_e_v_i_c_e_n_a_m_e:_@ or ddeevv== _d_e_v_i_c_e_- - _n_a_m_e:_@,_l_u_n may be used instead of ddeevv== _d_e_v_i_c_e_n_a_m_e:_s_c_s_i_- - _b_u_s,_t_a_r_g_e_t,_l_u_n. - - - To access remote SCSI devices, you need to prepend the - SCSI device name by a remote device indicator. The remote - device indicator is either RREEMMOOTTEE::_u_s_e_r_@_h_o_s_t_: or - RREEMMOOTTEE::_h_o_s_t_: - A valid remote SCSI device name may be: RREEMMOOTTEE::_u_s_e_r_@_h_o_s_t_: - to allow remote SCSI bus scanning or - RREEMMOOTTEE::_u_s_e_r_@_h_o_s_t_:_1_,_0_,_0 to access the SCSI device at _h_o_s_t - connected to SCSI bus # 1,target 0 lun 0. - - - To access SCSI devices via alternate transport layers, you - need to prepend the SCSI device name by a transport layer - indicator. The transport layer indicator may be something - like UUSSCCSSII:: or AATTAAPPII::. To get a list of supported trans- - port layers for your platform, use ddeevv== _H_E_L_P: - - - To make rreeaaddccdd portable to all UNIX platforms, the syntax - ddeevv== _d_e_v_i_c_e_n_a_m_e:_s_c_s_i_b_u_s,_t_a_r_g_e_t,_l_u_n is preferred as is - hides OS specific knowledge about device names from the - user. A specific OS must not necessarily support a way to - specify a real device file name nor a way to specify _s_c_s_i_- - _b_u_s,_t_a_r_g_e_t,_l_u_n. - - - _S_c_s_i_b_u_s 0 is the default SCSI bus on the machine. Watch - the boot messages for more information or look into - //vvaarr//aaddmm//mmeessssaaggeess for more information about the SCSI con- - figuration of your machine. If you have problems to fig- - ure out what values for _s_c_s_i_b_u_s,_t_a_r_g_e_t,_l_u_n should be used, - try the --ssccaannbbuuss option of ccddrreeccoorrdd. + DDeevviiccee nnaammiinngg + Most users do not need to care about device naming at all. + If no ddeevv== option was specified, rreeaaddccdd implements aauuttoo ttaarr-- + ggeett support and automagically finds the drive in case that + exactly one CD-ROM type drive is available in the system. + In case that more than one CD-ROM type drive exists on the + system, a list of possible device name parameters may be + retrieved with rreeaaddccdd -ssccaannbbuuss or from the target example + from the output of rreeaaddccdd ddeevv==hheellpp, then the ddeevv== parameter + may be set based on the device listing. + + The _d_e_v_i_c_e parameter to the ddeevv== option explained below + refers to _s_c_s_i_b_u_s/_t_a_r_g_e_t/_l_u_n of the CD/DVD/BluRay-Recorder. + If a file /etc/default/cdrecord exists, the parameter to the + ddeevv== option may also be a drive name label in said file (see + FILES section). OOPPTTIIOONNSS - If no options except the _d_e_v_= option have been specified, - rreeaaddccdd goes into interactive mode. Select a primary func- - tion and then follow the instructions. - - - --vveerrssiioonn - Print version information and exit. - - ddeevv==_t_a_r_g_e_t - Sets the SCSI target for the drive, see notes - above. A typical device specification is ddeevv==_6_,_0 . - If a filename must be provided together with the - numerical target specification, the filename is - implementation specific. The correct filename in - this case can be found in the system specific manu- - als of the target operating system. On a _F_r_e_e_B_S_D - system without _C_A_M support, you need to use the - control device (e.g. _/_d_e_v_/_r_c_d_0_._c_t_l). A correct - device specification in this case may be - ddeevv==_/_d_e_v_/_r_c_d_0_._c_t_l_:_@ . - - On Linux, drives connected to a parallel port - adapter are mapped to a virtual SCSI bus. Different - adapters are mapped to different targets on this - virtual SCSI bus. - - If no _d_e_v option is present, ccddrreeccoorrdd will try to - get the device from the CCDDRR__DDEEVVIICCEE environment. - - If the argument to the ddeevv== option does not contain - the characters ',', '/', '@' or ':', it is inter- - preted as an label name that may be found in the - file /etc/default/cdrecord (see FILES section). - - ttiimmeeoouutt==_# - Set the default SCSI command timeout value to _# - seconds. The default SCSI command timeout is the - minimum timeout used for sending SCSI commands. If - a SCSI command fails due to a timeout, you may try - to raise the default SCSI command timeout above the - timeout value of the failed command. If the com- - mand runs correctly with a raised command timeout, - please report the better timeout value and the cor- - responding command to the author of the program. - If no _t_i_m_e_o_u_t option is present, a default timeout - of 40 seconds is used. - - ddeebbuugg==_#_, --dd - Set the misc debug value to # (with debug=#) or - increment the misc debug level by one (with -d). If - you specify _-_d_d_, this equals to ddeebbuugg==_2_. This may - help to find problems while opening a driver for - libscg. as well as with sector sizes and sector - types. Using --ddeebbuugg slows down the process and may - be the reason for a buffer underrun. - - kkddeebbuugg==#, kkdd==# - Tell the ssccgg-driver to modify the kernel debug - value while SCSI commands are running. - - --ssiilleenntt, --ss - Do not print out a status report for failed SCSI - commands. - - --vv Increment the level of general verbosity by one. - This is used e.g. to display the progress of the - process. - - --VV Increment the verbose level with respect of SCSI - command transport by one. This helps to debug - problems during the process, that occur in the CD- - Recorder. If you get incomprehensible error mes- - sages you should use this flag to get more detailed - output. --VVVV will show data buffer content in addi- - tion. Using --VV or --VVVV slows down the process. - - ff==_f_i_l_e Specify the filename where the output should be - written or the inout should be taken from. Using - '-' as filename will cause rreeaaddccdd to use ssttddoouutt - resp. ssttddiinn. - - --ww Switch to write mode. If this option is not pre- - sent, rreeaaddccdd reads from the specified device. - - --cc22ssccaann - Scans the whole CD or the range specified by the - sseeccttoorrss==_r_a_n_g_e for C2 errors. C2 errors are errors - that are uncorrectable after the second stage of - the 24/28 + 28/32 Reed Solomon correction system at - audio level (2352 bytes sector size). If an audio - CD has C2 errors, interpolation is needed to hide - the errors. If a data CD has C2 errors, these - errors are in most cases corrected by the ECC/EDC - code that makes 2352 bytes out of 2048 data bytes. - The ECC/EDC code should be able to correct about - 100 C2 error bytes per sector. - - If you find C2 errors you may want to reduce the - speed using the ssppeeeedd== option as C2 errors may be a - result of dynamic unbalance on the medium. - - sseeccttoorrss==_r_a_n_g_e - Specify a sector range that should be read. The - range is specified by the starting sector number, a - minus sign and the ending sector number. The end - sector is not included in the list, so sseeccttoorrss==0-0 - will not read anything and may be used to check for - a CD in the drive. - - ssppeeeedd==# - Set the speed factor of the read or write process - to #. # is an integer, representing a multiple of - the audio speed. This is about 150 KB/s for CD-ROM - and about 172 KB/s for CD-Audio. If no _s_p_e_e_d - option is present, rreeaaddccdd will use maximum speed. - Only MMC compliant drives will benefit from this - option. The speed of non MMC drives is not - changed. - - Using a lower speed may increase the readability of - a CD or DVD. - - --nnoottrruunncc - Do not truncate the outputfile when opening it. - - --ffuullllttoocc - Retrieve a full TOC from the current disk and print - it in hex. - - --cclloonnee Do a clone read. Read the CD with all sub-channel - data and a full TOC. The full TOC data will be but - into a file with similar name as with the ff== option - but the suffix ..ttoocc added. - - --nnooeerrrroorr - Do not abort if the high level error checking in - rreeaaddccdd found an uncorrectable error in the data - stream. - - --nnooccoorrrr - Switch the drive into a mode where it ignores read - errors in data sectors that are a result of uncor- - rectable ECC/EDC errors before reading. If rreeaaddccdd - completes, the error recovery mode of the drive is - switched back to the remembered old mode. - - rreettrriieess==_# - Set the retry count for high level retries in - rreeaaddccdd to _#. The default is to do 128 retries - which may be too much if you like to read a CD with - many unreadable sectors. - - --oovveerrhheeaadd - Meter the SCSI command overhead time. This is done - by executing several commands 1000 times and print- - ing the total time used. If you divide the dis- - played times by 1000, you get the average overhead - time for a single command. + If no options except the _d_e_v= option have been specified, + rreeaaddccdd goes into interactive mode. Select a primary func- + tion and then follow the instructions. + + IInnffoorrmmaattiivvee ooppttiioonnss + -hheellpp + display version information for rreeaaddccdd on standard out- + put. + + -vveerrssiioonn + Print version information and exit. + + -vv Increment the level of general verbosity by one. This + is used e.g. to display the progress of the process. + + RReeaaddccdd ffuunnccttiioonnaall ooppttiioonnss + -cclloonnee + Do a clone read. Read the CD with all sub-channel data + and a full TOC. The full TOC data will be put into a + file with similar name as with the ff== option but the + suffix ..ttoocc added. + + Note that reading in cclloonnee mode results in having no + + + +Joerg Schilling Last change: Version 3.0 1 + + + + + + +Schily's USER COMMANDS READCD(1) + + + + error correction at sub-channel level. Even in the main + data channel, there is less error correction than with + other read modes. This results in a slightly quality + degradation. Avoid copying audio CDs in cclloonnee mode for + this reason. + + -cc22ssccaann + Scans the whole CD or the range specified by the + sseeccttoorrss==_r_a_n_g_e for C2 errors. C2 errors are errors that + are uncorrectable after the second stage of the 24/28 + + 28/32 Reed Solomon correction system at audio level + (2352 bytes sector size). If an audio CD has C2 errors, + interpolation is needed to hide the errors. If a data + CD has C2 errors, these errors are in most cases + corrected by the ECC/EDC code that makes 2352 bytes out + of 2048 data bytes. The ECC/EDC code should be able to + correct about 100 C2 error bytes per sector. + + If you find C2 errors you may want to reduce the speed + using the ssppeeeedd== option as C2 errors may be a result of + dynamic unbalance on the medium. + + -ccxxssccaann + Scans the whole CD or the range specified by the + sseeccttoorrss==_r_a_n_g_e for C1/C2/CU errors. In non-verbose + mode, only a summary is printed. With -vv, a line for + each non error free second is printed. with -vvvv, a + line for each second is printed. This scan method only + works for a few drives. + + -eeddcc-ccoorrrr + In this mode, rreeaaddccdd reads CD data sectors in + uncorrected audio mode and then tries to correct the + data using the ECC/EDC decoder library from Heiko + Eissfeldt. As this library implements looping over two + layers of error correction, rreeaaddccdd may be able to + correct more data than the firmware of the CD-ROM + drive. + + This option is currently experimental and only applica- + ble with CD media and currently only supports plain + 2048 Byte CD-ROM sectors. + + ff==_f_i_l_e + Specify the filename where the output should be written + or the input should be taken from. Using '-' as + filename will cause rreeaaddccdd to use ssttddoouutt resp. ssttddiinn. + + -ffaaccttoorr + Output the speed values for mmeesshhppooiinnttss==# as factor + based on _s_i_n_g_l_e _s_p_e_e_d of the current medium. This only + works if rreeaaddccdd is able to determine the current medium + + + +Joerg Schilling Last change: Version 3.0 2 + + + + + + +Schily's USER COMMANDS READCD(1) + + + + type. + + -ffuullllttoocc + Retrieve a full TOC from the current disk and print it + in hex. + + mmeesshhppooiinnttss==# + Print read-speed at # locations. The purpose of this + option is to create a list of read speed values suit- + able for e.g. ggnnuupplloott. The speed values are calcu- + lated assuming that 1000 bytes are one kilobyte as + documented in the SCSI standard. The output data + created for this purpose is written to _s_t_d_o_u_t. + + -nnooccoorrrr + Switch the drive into a mode where it ignores read + errors in data sectors that are a result of uncorrect- + able ECC/EDC errors before reading. If rreeaaddccdd com- + pletes, the error recovery mode of the drive is + switched back to the remembered old mode. + + -nnooeerrrroorr + Do not abort if the high level error checking in rreeaaddccdd + found an uncorrectable error in the data stream. + + -nnoottrruunncc + Do not truncate the output file when opening it. + + -oovveerrhheeaadd + Meter the SCSI command overhead time. This is done by + executing several commands 1000 times and printing the + total time used. If you divide the displayed times by + 1000, you get the average overhead time for a single + command. + + -ppii88ssccaann + Scans the whole DVD or the range specified by the + sseeccttoorrss==_r_a_n_g_e for ppiissuumm88 errors. In non-verbose mode, + only a summary is printed. With -vv, a line for each + non error free block of 8 * 32 kB is printed. with + -vvvv, a line for each block of 8 * 32 kB is printed. + This scan method only works for a few drives. + + -ppiiffssccaann + Scans the whole DVD or the range specified by the + sseeccttoorrss==_r_a_n_g_e for ppiiff errors. In non-verbose mode, + only a summary is printed. With -vv, a line for each + non error free block of 32 kB is printed. with -vvvv, a + line for each block of 32 kB is printed. This scan + method only works for a few drives. + + -pplloott + + + +Joerg Schilling Last change: Version 3.0 3 + + + + + + +Schily's USER COMMANDS READCD(1) + + + + This option modified the behavior for -ccxxssccaann, -ppii88ssccaann + and -ppiiffssccaann. The output is better suited for gnuplot. + + rreettrriieess==# + Set the retry count for high level retries in rreeaaddccdd to + #. The default is to do 128 retries which may be too + much if you like to read a CD with many unreadable sec- + tors. + + sseeccttoorrss==_r_a_n_g_e + Specify a sector range that should be read. The range + is specified by the starting sector number, a minus + sign and the ending sector number. The end sector is + not included in the list, so sseeccttoorrss==0-0 will not read + anything and may be used to check for a CD in the + drive. + + ssppeeeedd==# + Set the speed factor of the read or write process to #. + # is an integer, representing a multiple of the audio + speed. This is about 150 KB/s for CD-ROM and about 172 + KB/s for CD-Audio. If no _s_p_e_e_d option is present, + rreeaaddccdd will use maximum speed. Only MMC compliant + drives will benefit from this option. The speed of non + MMC drives is not changed. + + Using a lower speed may increase the readability of a + CD or DVD. + + -ww Switch to write mode. Writing is only possible to + DVD-RAM media. For other media, use ccddrreeccoorrdd instead. + Note that ccddrreeccoorrdd also supports to write DVD-RAM + media. + + If this option is not present, rreeaaddccdd reads from the + specified device. + + SSCCSSII ooppttiioonnss + ddeevv==_t_a_r_g_e_t + Set the SCSI target for the CD/DVD/BluRay-Recorder, see + notes above. A typical target device specification is + ddeevv==_1,_6,_0 . If a filename must be provided together + with the numerical target specification, the filename + is implementation specific. The correct filename in + this case can be found in the system specific manuals + of the target operating system. On a _F_r_e_e_B_S_D system + without _C_A_M support, you need to use the control device + (e.g. /_d_e_v/_r_c_d_0._c_t_l). A correct device specification + in this case may be ddeevv==/_d_e_v/_r_c_d_0._c_t_l:@ . + + GGeenneerraall SSCCSSII aaddddrreessssiinngg + The _t_a_r_g_e_t _d_e_v_i_c_e to the ddeevv== option refers to + + + +Joerg Schilling Last change: Version 3.0 4 + + + + + + +Schily's USER COMMANDS READCD(1) + + + + _s_c_s_i_b_u_s/_t_a_r_g_e_t/_l_u_n of the CD/DVD/BluRay-Recorder. Com- + munication on _S_u_n_O_S is done with the SCSI general + driver ssccgg.. Other operating systems are using a library + simulation of this driver. Possible syntax is: ddeevv== + _s_c_s_i_b_u_s,_t_a_r_g_e_t,_l_u_n or ddeevv== _t_a_r_g_e_t,_l_u_n. In the latter + case, the CD/DVD/BluRay-Recorder has to be connected to + the default SCSI bus of the machine. _S_c_s_i_b_u_s, _t_a_r_g_e_t + and _l_u_n are integer numbers. Some operating systems or + SCSI transport implementations may require to specify a + filename in addition. In this case the correct syntax + for the device is: ddeevv== _d_e_v_i_c_e_n_a_m_e:_s_c_s_i_b_u_s,_t_a_r_g_e_t, or + ddeevv== _d_e_v_i_c_e_n_a_m_e:_t_a_r_g_e_t,_l_u_n. If the name of the device + node that has been specified on such a system refers to + exactly one SCSI device, a shorthand in the form ddeevv== + _d_e_v_i_c_e_n_a_m_e:@ or ddeevv== _d_e_v_i_c_e_n_a_m_e:@,_l_u_n may be used + instead of ddeevv== _d_e_v_i_c_e_n_a_m_e:_s_c_s_i_b_u_s,_t_a_r_g_e_t, + + RReemmoottee SSCCSSII aaddddrreessssiinngg + To access remote SCSI devices, you need to prepend the + SCSI device name by a remote device indicator. The + remote device indicator is either RREEMMOOTTEE::_u_s_e_r@_h_o_s_t: or + RREEMMOOTTEE::_h_o_s_t: A valid remote SCSI device name may be: + RREEMMOOTTEE::_u_s_e_r@_h_o_s_t: to allow remote SCSI bus scanning or + RREEMMOOTTEE::_u_s_e_r@_h_o_s_t:_1,_0,_0 to access the SCSI device at + _h_o_s_t connected to SCSI bus # 1,target 0, lun 0. In + order to allow remote access to a specific _h_o_s_t, the + rrssccssii(1) program needs to be present and configured on + the _h_o_s_t. + + AAlltteerrnnaattee SSCCSSII ttrraannssppoorrttss + CCddrreeccoorrdd is completely based on SSCCSSII commands but this + is no problem as all CD/DVD/BluRay writers ever made + use SSCCSSII commands for the communication. Even AATTAAPPII + drives are just SSCCSSII drives that inherently use the _A_T_A + _p_a_c_k_e_t _i_n_t_e_r_f_a_c_e as SSCCSSII command transport layer build + into the IDE (ATA) transport. You may need to specify + an alternate transport layer on the command line if + your OS does not implement a fully integrated kernel + driver subsystem that allows to access any drive using + SSCCSSII commands via a single unique user interface. + + To access SCSI devices via alternate transport layers, + you need to prepend the SCSI device name by a transport + layer indicator. The transport layer indicator may be + something like UUSSCCSSII:: or AATTAAPPII::. To get a list of sup- + ported transport layers for your platform, use ddeevv== + _H_E_L_P: + + PPoorrttaabbiilliittyy BBaacckkggrroouunndd + To make rreeaaddccdd portable to all UNIX platforms, the syn- + tax ddeevv== _d_e_v_i_c_e_n_a_m_e:_s_c_s_i_b_u_s,_t_a_r_g_e_t, is preferred as it + hides OS specific knowledge about device names from the + + + +Joerg Schilling Last change: Version 3.0 5 + + + + + + +Schily's USER COMMANDS READCD(1) + + + + user. A specific OS may not necessarily support a way + to specify a real device file name nor a way to specify + _s_c_s_i_b_u_s,_t_a_r_g_e_t,_l_u_n. + + _S_c_s_i_b_u_s 0 is the default SCSI bus on the machine. Watch + the boot messages for more information or look into + //vvaarr//aaddmm//mmeessssaaggeess for more information about the SCSI + configuration of your machine. If you have problems to + figure out what values for _s_c_s_i_b_u_s,_t_a_r_g_e_t,_l_u_n should be + used, try the -ssccaannbbuuss option of rreeaaddccdd described + below. + + UUssiinngg llooggiiccaall nnaammeess ffoorr ddeevviicceess + If no _d_e_v option is present, rreeaaddccdd will try to get the + device from the CCDDRR__DDEEVVIICCEE environment. + + If a file /etc/default/cdrecord exists, and if the + argument to the ddeevv== option or the CCDDRR__DDEEVVIICCEE environ- + ment does not contain the characters ',', '/', '@' or + ':', it is interpreted as a device label name that was + defined in the file /etc/default/cdrecord (see FILES + section). + + AAuuttoottaarrggeett MMooddee + If no ddeevv== option and no CCDDRR__DDEEVVIICCEE environment is + present, or if it only contains a transport specifyer + but no address notation, rreeaaddccdd tries to scan the SCSI + address space for CD-ROM drives. If exactly one is + found, this is used by default. + + ddeebbuugg==#, -dd + Set the misc debug value to # (with debug=#) or incre- + ment the misc debug level by one (with -d). If you + specify -_d_d, this equals to ddeebbuugg==_2. This may help to + find problems while opening a driver for libscg. as + well as with sector sizes and sector types. Using + -ddeebbuugg slows down the process and may be the reason for + a buffer underrun. + + kkddeebbuugg==#, kkdd==# + Tell the ssccgg-driver to modify the kernel debug value + while SCSI commands are running. + + -ssccaannbbuuss + Scan all SCSI devices on all SCSI busses and print the + inquiry strings. This option may be used to find SCSI + address of the devices on a system. The numbers + printed out as labels are computed by: bbuuss ** 110000 ++ ttaarr-- + ggeett + + -ssiilleenntt, -ss + Do not print out a status report for failed SCSI + + + +Joerg Schilling Last change: Version 3.0 6 + + + + + + +Schily's USER COMMANDS READCD(1) + + + + commands. + + ttiimmeeoouutt==# + Set the default SCSI command timeout value to # + seconds. The default SCSI command timeout is the + minimum timeout used for sending SCSI commands. If a + SCSI command fails due to a timeout, you may try to + raise the default SCSI command timeout above the + timeout value of the failed command. If the command + runs correctly with a raised command timeout, please + report the better timeout value and the corresponding + command to the author of the program. If no _t_i_m_e_o_u_t + option is present, a default timeout of 40 seconds is + used. + + ttss==# Set the maximum transfer size for a single SCSI command + to #. The syntax for the ttss== option is the same as for + cdrecord fs=# or sdd bs=#. + + If no ttss== option has been specified, rreeaaddccdd defaults to + a transfer size of 256 kB. If libscg gets lower values + from the operating system, the value is reduced to the + maximum value that is possible with the current operat- + ing system. Sometimes, it may help to further reduce + the transfer size or to enhance it, but note that it + may take a long time to find a better value by experi- + menting with the ttss== option. + + -VV Increment the verbose level with respect of SCSI com- + mand transport by one. This helps to debug problems + during the process, that occur in the CD-Recorder. If + you get incomprehensible error messages you should use + this flag to get more detailed output. -VVVV will show + data buffer content in addition. Using -VV or -VVVV slows + down the process. EEXXAAMMPPLLEESS - For all examples below, it will be assumed that the drive - is connected to the primary SCSI bus of the machine. The - SCSI target id is set to 2. + For all examples below, it will be assumed that the drive is + connected to the primary SCSI bus of the machine. The SCSI + target id is set to 2. + + To read the complete media from a CD-ROM writing the data to + the file _c_d_i_m_a_g_e._r_a_w: + + readcd dev=2,0 f=cdimage.raw + + To read sectors from range 150 ... 10000 from a CD-ROM writ- + ing the data to the file _c_d_i_m_a_g_e._r_a_w: + + readcd dev=2,0 sectors=150-10000 f=cdimage.raw + + - To read the complete media from a CD-ROM writing the data - to the file _c_d_i_m_a_g_e_._r_a_w: - readcd dev=2,0 f=cdimage.raw - To read sectors from range 150 ... 10000 from a CD-ROM - writing the data to the file _c_d_i_m_a_g_e_._r_a_w: +Joerg Schilling Last change: Version 3.0 7 - readcd dev=2,0 sectors=150-10000 f=cdimage.raw - To write the data from the file _c_d_i_m_a_g_e_._r_a_w (e.g. a - filesystem image from mmkkiissooffss) to a DVD-RAM, call: - readcd dev=2,0 -w f=cdimage.raw + + + +Schily's USER COMMANDS READCD(1) + + + + To write the data from the file _c_d_i_m_a_g_e._r_a_w (e.g. a filesys- + tem image from mmkkiissooffss) to a DVD-RAM, call: + + readcd dev=2,0 -w f=cdimage.raw EENNVVIIRROONNMMEENNTT - RRSSHH If the RRSSHH environment is present, the remote con- - nection will not be created via rrccmmdd(3) but by - calling the program pointed to by RRSSHH. Use e.g. - RRSSHH==/usr/bin/ssh to create a secure shell connec- - tion. - - Note that this forces ccddrreeccoorrdd to create a pipe to - the rrsshh((11)) program and disallows ccddrreeccoorrdd to - directly access the network socket to the remote - server. This makes it impossible to set up perfor- - mance parameters and slows down the connection com- - pared to a rroooott initiated rrccmmdd((33)) connection. - - RRSSCCSSII If the RRSSCCSSII environment is present, the remote - SCSI server will not be the program - //oopptt//sscchhiillyy//ssbbiinn//rrssccssii but the program pointed to - by RRSSCCSSII. Note that the remote SCSI server program - name will be ignored if you log in using an account - that has been created with a remote SCSI server - program as login shell. + RRSSHH If the RRSSHH environment is present, the remote connec- + tion will not be created via rrccmmdd(3) but by calling the + program pointed to by RRSSHH. Use e.g. RRSSHH==/usr/bin/ssh + to create a secure shell connection. + + Note that this forces ccddrreeccoorrdd to create a pipe to the + rrsshh((11)) program and disallows ccddrreeccoorrdd to directly + access the network socket to the remote server. This + makes it impossible to set up performance parameters + and slows down the connection compared to a rroooott ini- + tiated rrccmmdd((33)) connection. + + RRSSCCSSII + If the RRSSCCSSII environment is present, the remote SCSI + server will not be the program //oopptt//sscchhiillyy//ssbbiinn//rrssccssii + but the program pointed to by RRSSCCSSII. Note that the + remote SCSI server program name will be ignored if you + log in using an account that has been created with a + remote SCSI server program as login shell. FFIILLEESS SSEEEE AALLSSOO - ccddrreeccoorrdd(1), mmkkiissooffss(1), ssccgg(7), ffbbkk(7), rrccmmdd(3), sssshh(1). + ccddrreeccoorrdd(1), mmkkiissooffss(1), ssccgg(7), ffbbkk(7), rrccmmdd(3), sssshh(1). NNOOTTEESS - If you don't want to allow users to become root on your - system, rreeaaddccdd may safely be installed suid root. This - allows all users or a group of users with no root privi- - leges to use rreeaaddccdd.. RReeaaddccdd in this case will only allow - access to CD-ROM type drives- To give all user access to - use rreeaaddccdd,, enter: - - chown root /usr/local/bin/readcd - chmod 4711 /usr/local/bin/readcd - - To give a restricted group of users access to rreeaaddccdd - enter: - - chown root /usr/local/bin/readcd - chgrp cdburners /usr/local/bin/readcd - chmod 4710 /usr/local/bin/readcd - - and add a group _c_d_b_u_r_n_e_r_s on your system. - - Never give write permissions for non root users to the - _/_d_e_v_/_s_c_g_? devices unless you would allow anybody to - read/write/format all your disks. - - You should not connect old drives that do not support dis- - connect/reconnect to either the SCSI bus that is connected - to the CD-Recorder or the source disk. - - When using rreeaaddccdd with the broken LLiinnuuxx SSCCSSII ggeenneerriicc - ddrriivveerr.. You should note that rreeaaddccdd uses a hack, that - tries to emulate the functionality of the scg driver. - Unfortunately, the sg driver on LLiinnuuxx has several severe - bugs: - - +o It cannot see if a SCSI command could not be sent - at all. - - +o It cannot get the SCSI status byte. RReeaaddccdd for - that reason cannot report failing SCSI commands in - some situations. - - +o It cannot get real DMA count of transfer. RReeaaddccdd - cannot tell you if there is an DMA residual count. - - +o It cannot get number of bytes valid in auto sense - data. RReeaaddccdd cannot tell you if device transfers - no sense data at all. + If you don't want to allow users to become root on your sys- + tem, rreeaaddccdd may safely be installed suid root. This allows + all users or a group of users with no root privileges to use + rreeaaddccdd.. RReeaaddccdd in this case will only allow access to CD-ROM + type drives- To give all user access to use rreeaaddccdd,, enter: + + chown root /usr/local/bin/readcd + chmod 4711 /usr/local/bin/readcd + + To give a restricted group of users access to rreeaaddccdd enter: + + chown root /usr/local/bin/readcd + chgrp cdburners /usr/local/bin/readcd + chmod 4710 /usr/local/bin/readcd + + and add a group _c_d_b_u_r_n_e_r_s on your system. + + Never give write permissions for non root users to the + /_d_e_v/_s_c_g? devices unless you would allow anybody to + + - +o It fetches to few data in auto request sense - (CCS/SCSI-2/SCSI-3 needs >= 18). +Joerg Schilling Last change: Version 3.0 8 + + + + + + +Schily's USER COMMANDS READCD(1) + + + + read/write/format all your disks. + + You should not connect old drives that do not support + disconnect/reconnect to either the SCSI bus that is con- + nected to the CD-Recorder or the source disk. + + When using rreeaaddccdd with the LLiinnuuxx SSCCSSII ggeenneerriicc ddrriivveerr.. You + should note that rreeaaddccdd uses a layer, that tries to emulate + the functionality of the scg driver on top of the drives of + the local operating system. Unfortunately, the sg driver on + LLiinnuuxx has several flaws: + + +o It cannot see if a SCSI command could not be sent at + all. + + +o It cannot get the SCSI status byte. RReeaaddccdd for that + reason cannot report failing SCSI commands in some + situations. + + +o It cannot get real DMA count of transfer. RReeaaddccdd cannot + tell you if there is an DMA residual count. + + +o It cannot get number of bytes valid in auto sense data. + RReeaaddccdd cannot tell you if device transfers no sense + data at all. + + +o It fetches to few data in auto request sense + (CCS/SCSI-2/SCSI-3 needs >= 18). DDIIAAGGNNOOSSTTIICCSS - A typical error message for a SCSI command looks like: + A typical error message for a SCSI command looks like: + + readcd: I/O error. test unit ready: scsi sendcmd: no error + CDB: 00 20 00 00 00 00 + status: 0x2 (CHECK CONDITION) + Sense Bytes: 70 00 05 00 00 00 00 0A 00 00 00 00 25 00 00 00 00 00 + Sense Key: 0x5 Illegal Request, Segment 0 + Sense Code: 0x25 Qual 0x00 (logical unit not supported) Fru 0x0 + Sense flags: Blk 0 (not valid) + cmd finished after 0.002s timeout 40s + + The first line gives information about the transport of the + command. The text after the first colon gives the error + text for the system call from the view of the kernel. It + usually is: II//OO eerrrroorr unless other problems happen. The + next words contain a short description for the SCSI command + that fails. The rest of the line tells you if there were any + problems for the transport of the command over the SCSI bus. + ffaattaall eerrrroorr means that it was not possible to transport the + command (i.e. no device present at the requested SCSI + address). + + + +Joerg Schilling Last change: Version 3.0 9 + + + + + + +Schily's USER COMMANDS READCD(1) + - readcd: I/O error. test unit ready: scsi sendcmd: no error - CDB: 00 20 00 00 00 00 - status: 0x2 (CHECK CONDITION) - Sense Bytes: 70 00 05 00 00 00 00 0A 00 00 00 00 25 00 00 00 00 00 - Sense Key: 0x5 Illegal Request, Segment 0 - Sense Code: 0x25 Qual 0x00 (logical unit not supported) Fru 0x0 - Sense flags: Blk 0 (not valid) - cmd finished after 0.002s timeout 40s - - The first line gives information about the transport of - the command. The text after the first colon gives the - error text for the system call from the view of the ker- - nel. It usually is: II//OO eerrrroorr unless other problems hap- - pen. The next words contain a short description for the - SCSI command that fails. The rest of the line tells you if - there were any problems for the transport of the command - over the SCSI bus. ffaattaall eerrrroorr means that it was not pos- - sible to transport the command (i.e. no device present at - the requested SCSI address). - - The second line prints the SCSI command descriptor block - for the failed command. - - The third line gives information on the SCSI status code - returned by the command, if the transport of the command - succeeds. This is error information from the SCSI device. - - The fourth line is a hex dump of the auto request sense - information for the command. - - The fifth line is the error text for the sense key if - available, followed by the segment number that is only - valid if the command was a _c_o_p_y command. If the error mes- - sage is not directly related to the current command, the - text _d_e_f_e_r_r_e_d _e_r_r_o_r is appended. - - The sixth line is the error text for the sense code and - the sense qualifier if available. If the type of the - device is known, the sense data is decoded from tables in - _s_c_s_i_e_r_r_s_._c . The text is followed by the error value for - a field replaceable unit. - - The seventh line prints the block number that is related - to the failed command and text for several error flags. - The block number may not be valid. - The eight line reports the timeout set up for this command - and the time that the command really needed to complete. + The second line prints the SCSI command descriptor block for + the failed command. + + The third line gives information on the SCSI status code + returned by the command, if the transport of the command + succeeds. This is error information from the SCSI device. + + The fourth line is a hex dump of the auto request sense + information for the command. + + The fifth line is the error text for the sense key if avail- + able, followed by the segment number that is only valid if + the command was a _c_o_p_y command. If the error message is not + directly related to the current command, the text _d_e_f_e_r_r_e_d + _e_r_r_o_r is appended. + + The sixth line is the error text for the sense code and the + sense qualifier if available. If the type of the device is + known, the sense data is decoded from tables in _s_c_s_i_e_r_r_s._c . + The text is followed by the error value for a field replace- + able unit. + + The seventh line prints the block number that is related to + the failed command and text for several error flags. The + block number may not be valid. + + The eight line reports the timeout set up for this command + and the time that the command really needed to complete. BBUUGGSS CCRREEDDIITTSS MMAAIILLIINNGG LLIISSTTSS - If you want to actively take part on the development of - cdrecord, you may join the cdwriting mailing list by send- - ing mail to: + If you want to actively take part on the development of + cdrecord, you may join the developer mailing list via this + URL: + + hhttttpp::////lliissttss..bbeerrlliiooss..ddee//mmaaiillmmaann//lliissttiinnffoo//ccddrreeccoorrdd--ddeevveellooppeerrss + + +AAUUTTHHOORR + Joerg Schilling + Seestr. 110 + D-13353 Berlin + Germany + + Additional information can be found on: + http://cdrecord.berlios.de/private/cdrecord.html + + If you have support questions, send them to: + + + + + +Joerg Schilling Last change: Version 3.0 10 + + + + + + +Schily's USER COMMANDS READCD(1) + + + + ccddrreeccoorrdd--ssuuppppoorrtt@@bbeerrlliiooss..ddee + + If you have definitely found a bug, send a mail to: + + ccddrreeccoorrdd--ddeevveellooppeerrss@@bbeerrlliiooss..ddee + or jjooeerrgg..sscchhiilllliinngg@@ffookkuuss..ffrraauunnhhooffeerr..ddee + + To subscribe, use: + + hhttttpp::////lliissttss..bbeerrlliiooss..ddee//mmaaiillmmaann//lliissttiinnffoo//ccddrreeccoorrdd--ddeevveellooppeerrss + or hhttttpp::////lliissttss..bbeerrlliiooss..ddee//mmaaiillmmaann//lliissttiinnffoo//ccddrreeccoorrdd--ssuuppppoorrtt + +IINNTTEERRFFAACCEE SSTTAABBIILLIITTYY + The interfaces provided by rreeaaddccdd are designed for long term + stability. As rreeaaddccdd depends on interfaces provided by the + underlying operating system, the stability of the interfaces + offered by rreeaaddccdd depends on the interface stability of the + OS interfaces. Modified interfaces in the OS may enforce + modified interfaces in rreeaaddccdd. + + + + + + + + + + + + + + + + + + + + + + + + - other-cdwrite-request@lists.debian.org - and include the word _s_u_b_s_c_r_i_b_e in the body. The mail - address of the list is: - cdwrite@lists.debian.org -AAUUTTHHOORR - Joerg Schilling - Seestr. 110 - D-13353 Berlin - Germany - Additional information can be found on: - http://www.fokus.fhg.de/usr/schilling/cdrecord.html - If you have support questions, send them to: - ccddrreeccoorrdd--ssuuppppoorrtt@@bbeerrlliiooss..ddee - or ootthheerr--ccddwwrriittee@@lliissttss..ddeebbiiaann..oorrgg - Of you have definitely found a bug, send a mail to: - ccddrreeccoorrdd--ddeevveellooppeerrss@@bbeerrlliiooss..ddee - or sscchhiilllliinngg@@ffookkuuss..ffhhgg..ddee - To subscribe, use: - hhttttpp::////lliissttss..bbeerrlliiooss..ddee//mmaaiillmmaann//lliissttiinnffoo//ccddrreeccoorrdd--ddeevveelloopp-- - eerrss - or hhttttpp::////lliissttss..bbeerrlliiooss..ddee//mmaaiillmmaann//lliissttiinnffoo//ccddrreeccoorrdd--ssuupp-- - ppoorrtt +Joerg Schilling Last change: Version 3.0 11 -Joerg Schilling Version 2.0 READCD(1) diff -Nru cdrtools-2.01.01a33/doc/readcd.ps cdrtools-3.02a09/doc/readcd.ps --- cdrtools-2.01.01a33/doc/readcd.ps 2002-12-24 15:56:28.000000000 +0000 +++ cdrtools-3.02a09/doc/readcd.ps 2010-05-30 15:56:35.000000000 +0000 @@ -1,660 +1,1802 @@ -%!PS-Adobe-3.0 -%%Creator: groff version 1.17.2 -%%CreationDate: Tue Dec 24 17:02:56 2002 -%%DocumentNeededResources: font Times-Roman -%%+ font Times-Bold -%%+ font Times-Italic -%%DocumentSuppliedResources: procset grops 1.17 2 -%%Pages: 5 -%%PageOrder: Ascend -%%Orientation: Portrait +%!PS +%%Version: 3.15 +%%DocumentFonts: (atend) +%%Pages: (atend) %%EndComments -%%BeginProlog -%%BeginResource: procset grops 1.17 2 -/setpacking where{ -pop -currentpacking -true setpacking -}if -/grops 120 dict dup begin -/SC 32 def -/A/show load def -/B{0 SC 3 -1 roll widthshow}bind def -/C{0 exch ashow}bind def -/D{0 exch 0 SC 5 2 roll awidthshow}bind def -/E{0 rmoveto show}bind def -/F{0 rmoveto 0 SC 3 -1 roll widthshow}bind def -/G{0 rmoveto 0 exch ashow}bind def -/H{0 rmoveto 0 exch 0 SC 5 2 roll awidthshow}bind def -/I{0 exch rmoveto show}bind def -/J{0 exch rmoveto 0 SC 3 -1 roll widthshow}bind def -/K{0 exch rmoveto 0 exch ashow}bind def -/L{0 exch rmoveto 0 exch 0 SC 5 2 roll awidthshow}bind def -/M{rmoveto show}bind def -/N{rmoveto 0 SC 3 -1 roll widthshow}bind def -/O{rmoveto 0 exch ashow}bind def -/P{rmoveto 0 exch 0 SC 5 2 roll awidthshow}bind def -/Q{moveto show}bind def -/R{moveto 0 SC 3 -1 roll widthshow}bind def -/S{moveto 0 exch ashow}bind def -/T{moveto 0 exch 0 SC 5 2 roll awidthshow}bind def -/SF{ -findfont exch -[exch dup 0 exch 0 exch neg 0 0]makefont -dup setfont -[exch/setfont cvx]cvx bind def -}bind def -/MF{ -findfont -[5 2 roll -0 3 1 roll -neg 0 0]makefont -dup setfont -[exch/setfont cvx]cvx bind def -}bind def -/level0 0 def -/RES 0 def -/PL 0 def -/LS 0 def -/MANUAL{ -statusdict begin/manualfeed true store end -}bind def -/PLG{ -gsave newpath clippath pathbbox grestore -exch pop add exch pop -}bind def -/BP{ -/level0 save def -1 setlinecap -1 setlinejoin -72 RES div dup scale -LS{ -90 rotate -}{ -0 PL translate -}ifelse -1 -1 scale -}bind def -/EP{ -level0 restore -showpage -}bind def -/DA{ -newpath arcn stroke -}bind def -/SN{ -transform -.25 sub exch .25 sub exch -round .25 add exch round .25 add exch -itransform -}bind def -/DL{ -SN -moveto -SN -lineto stroke -}bind def -/DC{ -newpath 0 360 arc closepath -}bind def -/TM matrix def -/DE{ -TM currentmatrix pop -translate scale newpath 0 0 .5 0 360 arc closepath -TM setmatrix -}bind def -/RC/rcurveto load def -/RL/rlineto load def -/ST/stroke load def -/MT/moveto load def -/CL/closepath load def -/FL{ -currentgray exch setgray fill setgray -}bind def -/BL/fill load def -/LW/setlinewidth load def -/RE{ -findfont -dup maxlength 1 index/FontName known not{1 add}if dict begin -{ -1 index/FID ne{def}{pop pop}ifelse -}forall -/Encoding exch def -dup/FontName exch def -currentdict end definefont pop -}bind def -/DEFS 0 def -/EBEGIN{ -moveto -DEFS begin -}bind def -/EEND/end load def -/CNT 0 def -/level1 0 def -/PBEGIN{ -/level1 save def -translate -div 3 1 roll div exch scale -neg exch neg exch translate -0 setgray -0 setlinecap -1 setlinewidth -0 setlinejoin -10 setmiterlimit -[]0 setdash -/setstrokeadjust where{ -pop -false setstrokeadjust -}if -/setoverprint where{ -pop -false setoverprint -}if -newpath -/CNT countdictstack def -userdict begin -/showpage{}def -}bind def -/PEND{ -clear -countdictstack CNT sub{end}repeat -level1 restore -}bind def -end def -/setpacking where{ -pop -setpacking -}if -%%EndResource -%%IncludeResource: font Times-Roman -%%IncludeResource: font Times-Bold -%%IncludeResource: font Times-Italic -grops begin/DEFS 1 dict def DEFS begin/u{.001 mul}bind def end/RES 72 -def/PL 841.89 def/LS false def/ENC0[/asciicircum/asciitilde/Scaron -/Zcaron/scaron/zcaron/Ydieresis/trademark/quotesingle/.notdef/.notdef -/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef -/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef -/.notdef/.notdef/.notdef/space/exclam/quotedbl/numbersign/dollar/percent -/ampersand/quoteright/parenleft/parenright/asterisk/plus/comma/hyphen -/period/slash/zero/one/two/three/four/five/six/seven/eight/nine/colon -/semicolon/less/equal/greater/question/at/A/B/C/D/E/F/G/H/I/J/K/L/M/N/O -/P/Q/R/S/T/U/V/W/X/Y/Z/bracketleft/backslash/bracketright/circumflex -/underscore/quoteleft/a/b/c/d/e/f/g/h/i/j/k/l/m/n/o/p/q/r/s/t/u/v/w/x/y -/z/braceleft/bar/braceright/tilde/.notdef/quotesinglbase/guillemotleft -/guillemotright/bullet/florin/fraction/perthousand/dagger/daggerdbl -/endash/emdash/ff/fi/fl/ffi/ffl/dotlessi/dotlessj/grave/hungarumlaut -/dotaccent/breve/caron/ring/ogonek/quotedblleft/quotedblright/oe/lslash -/quotedblbase/OE/Lslash/.notdef/exclamdown/cent/sterling/currency/yen -/brokenbar/section/dieresis/copyright/ordfeminine/guilsinglleft -/logicalnot/minus/registered/macron/degree/plusminus/twosuperior -/threesuperior/acute/mu/paragraph/periodcentered/cedilla/onesuperior -/ordmasculine/guilsinglright/onequarter/onehalf/threequarters -/questiondown/Agrave/Aacute/Acircumflex/Atilde/Adieresis/Aring/AE -/Ccedilla/Egrave/Eacute/Ecircumflex/Edieresis/Igrave/Iacute/Icircumflex -/Idieresis/Eth/Ntilde/Ograve/Oacute/Ocircumflex/Otilde/Odieresis -/multiply/Oslash/Ugrave/Uacute/Ucircumflex/Udieresis/Yacute/Thorn -/germandbls/agrave/aacute/acircumflex/atilde/adieresis/aring/ae/ccedilla -/egrave/eacute/ecircumflex/edieresis/igrave/iacute/icircumflex/idieresis -/eth/ntilde/ograve/oacute/ocircumflex/otilde/odieresis/divide/oslash -/ugrave/uacute/ucircumflex/udieresis/yacute/thorn/ydieresis]def -/Times-Italic@0 ENC0/Times-Italic RE/Times-Bold@0 ENC0/Times-Bold RE -/Times-Roman@0 ENC0/Times-Roman RE +% +% Copyright 2005 Sun Microsystems, Inc. All rights reserved. +% Use is subject to license terms. +% +% CDDL HEADER START +% +% The contents of this file are subject to the terms of the +% Common Development and Distribution License, Version 1.0 only +% (the "License"). You may not use this file except in compliance +% with the License. +% +% You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE +% or http://www.opensolaris.org/os/licensing. +% See the License for the specific language governing permissions +% and limitations under the License. +% +% When distributing Covered Code, include this CDDL HEADER in each +% file and include the License file at usr/src/OPENSOLARIS.LICENSE. +% If applicable, add the following below this CDDL HEADER, with the +% fields enclosed by brackets "[]" replaced with your own identifying +% information: Portions Copyright [yyyy] [name of copyright owner] +% +% CDDL HEADER END +% +%ident "%Z%%M% %I% %E% SMI" +% +% Version 3.16 prologue for troff files. +% + +/#copies 1 store +/aspectratio 1 def +/formsperpage 1 def +/landscape false def +/linewidth .3 def +/magnification 1 def +/margin 0 def +/orientation 0 def +/resolution 720 def +/xoffset 0 def +/yoffset 0 def + +/roundpage true def +/useclippath true def +/pagebbox [0 0 612 792] def + +/R /Times-Roman def +/I /Times-Italic def +/B /Times-Bold def +/BI /Times-BoldItalic def +/H /Helvetica def +/HI /Helvetica-Oblique def +/HB /Helvetica-Bold def +/HX /Helvetica-BoldOblique def +/CW /Courier def +/CO /Courier def +/CI /Courier-Oblique def +/CB /Courier-Bold def +/CX /Courier-BoldOblique def +/PA /Palatino-Roman def +/PI /Palatino-Italic def +/PB /Palatino-Bold def +/PX /Palatino-BoldItalic def +/Hr /Helvetica-Narrow def +/Hi /Helvetica-Narrow-Oblique def +/Hb /Helvetica-Narrow-Bold def +/Hx /Helvetica-Narrow-BoldOblique def +/KR /Bookman-Light def +/KI /Bookman-LightItalic def +/KB /Bookman-Demi def +/KX /Bookman-DemiItalic def +/AR /AvantGarde-Book def +/AI /AvantGarde-BookOblique def +/AB /AvantGarde-Demi def +/AX /AvantGarde-DemiOblique def +/NR /NewCenturySchlbk-Roman def +/NI /NewCenturySchlbk-Italic def +/NB /NewCenturySchlbk-Bold def +/NX /NewCenturySchlbk-BoldItalic def +/ZD /ZapfDingbats def +/ZI /ZapfChancery-MediumItalic def +/VR /Varitimes#Roman def +/VI /Varitimes#Italic def +/VB /Varitimes#Bold def +/VX /Varitimes#BoldItalic def +/S /S def +/S1 /S1 def +/GR /Symbol def + +/inch {72 mul} bind def +/min {2 copy gt {exch} if pop} bind def + +/setup { + counttomark 2 idiv {def} repeat pop + + landscape {/orientation 90 orientation add def} if + /scaling 72 resolution div def + linewidth setlinewidth + 1 setlinecap + + pagedimensions + xcenter ycenter translate + orientation neg rotate + width 2 div neg height 2 div translate + xoffset inch yoffset inch translate + margin 2 div dup neg translate + magnification dup aspectratio mul scale + scaling scaling scale + + /Symbol /S Sdefs cf + /Times-Roman /S1 S1defs cf + 0 0 moveto +} def + +/pagedimensions { + useclippath userdict /gotpagebbox known not and { + /pagebbox [clippath pathbbox newpath] def + roundpage currentdict /roundpagebbox known and {roundpagebbox} if + } if + pagebbox aload pop + 4 -1 roll exch 4 1 roll 4 copy + landscape {4 2 roll} if + sub /width exch def + sub /height exch def + add 2 div /xcenter exch def + add 2 div /ycenter exch def + userdict /gotpagebbox true put +} def + +/pagesetup { + /page exch def + currentdict /pagedict known currentdict page known and { + page load pagedict exch get cvx exec + } if +} def + +/decodingdefs [ + {counttomark 2 idiv {y moveto show} repeat} + {neg /y exch def counttomark 2 idiv {y moveto show} repeat} + {neg moveto {2 index stringwidth pop sub exch div 0 32 4 -1 roll widthshow} repeat} + {neg moveto {spacewidth sub 0.0 32 4 -1 roll widthshow} repeat} + {counttomark 2 idiv {y moveto show} repeat} + {neg setfunnytext} +] def + +/setdecoding {/t decodingdefs 3 -1 roll get bind def} bind def + +/w {neg moveto show} bind def +/m {neg dup /y exch def moveto} bind def +/done {/lastpage where {pop lastpage} if} def + +/f { + dup /font exch def findfont exch + dup /ptsize exch def scaling div dup /size exch def scalefont setfont + linewidth ptsize mul scaling 10 mul div setlinewidth + /spacewidth ( ) stringwidth pop def +} bind def + +/changefont { + /fontheight exch def + /fontslant exch def + currentfont [ + 1 0 + fontheight ptsize div fontslant sin mul fontslant cos div + fontheight ptsize div + 0 0 + ] makefont setfont +} bind def + +/sf {f} bind def + +/cf { + dup length 2 idiv + /entries exch def + /chtab exch def + /newfont exch def + + findfont dup length 1 add dict + /newdict exch def + {1 index /FID ne {newdict 3 1 roll put} {pop pop} ifelse} forall + + newdict /Metrics entries dict put + newdict /Metrics get + begin + chtab aload pop + 1 1 entries {pop def} for + newfont newdict definefont pop + end +} bind def + +% +% A few arrays used to adjust reference points and character widths in some +% of the printer resident fonts. If square roots are too high try changing +% the lines describing /radical and /radicalex to, +% +% /radical [0 -75 550 0] +% /radicalex [-50 -75 500 0] +% + +/Sdefs [ + /bracketlefttp [220 500] + /bracketleftbt [220 500] + /bracketrighttp [-70 380] + /bracketrightbt [-70 380] + /braceleftbt [220 490] + /bracketrightex [220 -125 500 0] + /radical [0 0 550 0] + % NeWSprint's \(br is too low, compensate + statusdict /product get (NeWS Server) eq { + /radicalex [-50 100 500 0] + /parenleftex [-20 100 0 0] + + } { + /radicalex [-50 0 500 0] + /parenleftex [-20 -170 0 0] + } ifelse + /integral [100 -50 500 0] + /infinity [10 -75 730 0] +] def + +/S1defs [ + /underscore [0 80 500 0] + /endash [7 90 650 0] +] def %%EndProlog +%%BeginSetup +mark +/resolution 720 def +setup +2 setdecoding +%%EndSetup %%Page: 1 1 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF 117.615(READCD\(1\) Schily\264s)72 48 R -(USER COMMANDS)2.5 E(READCD\(1\))120.115 E/F1 10.95/Times-Bold@0 SF --.219(NA)72 84 S(ME).219 E F0 -(readcd \255 read or write data Compact Discs)108 96 Q F1(SYNOPSIS)72 -112.8 Q/F2 10/Times-Bold@0 SF -.18(re)108 124.8 S(adcd de).18 E(v=)-.15 -E/F3 10/Times-Italic@0 SF(de).35 E(vice)-.15 E F0([)2.5 E F3(options)2.5 -E F0(])2.5 E F1(DESCRIPTION)72 153.6 Q F2(Readcd)108 165.6 Q F0 -(is used to read or write Compact Discs.)2.5 E(The)108 182.4 Q F3(de) -3.065 E(vice)-.15 E F0 .565(refers to)3.065 F F3(scsib)3.065 E(us)-.2 E -F0(/).27 E F3(tar).13 E -.1(ge)-.37 G(t).1 E F0(/).68 E F3(lun).09 E F0 -.565(of the dri)3.065 F -.15(ve)-.25 G 3.064(.C).15 G .564 -(ommunication on)-3.064 F F3(SunOS)3.064 E F0 .564 -(is done with the SCSI gen-)3.064 F 1.02(eral dri)108 194.4 R -.15(ve) --.25 G(r).15 E F2(scg)3.52 E(.)-.15 E F0 1.02 -(Other operating systems are using a library simulation of this dri)6.02 -F -.15(ve)-.25 G 4.62 -.55(r. P).15 H 1.02(ossible syntax is:).55 F F2 -(de)108 206.4 Q(v=)-.15 E F3(scsib)3.228 E(us)-.2 E F0(,).27 E F3(tar) -.13 E -.1(ge)-.37 G(t).1 E F0(,).68 E F3(lun).09 E F0(or)3.227 E F2(de) -3.227 E(v=)-.15 E F3(tar)3.227 E -.1(ge)-.37 G(t).1 E F0(,).68 E F3(lun) -.09 E F0 5.727(.I).24 G 3.227(nt)-5.727 G .727(he latter case, the dri) --3.227 F 1.027 -.15(ve h)-.25 H .727(as to be connected to the def).15 F -(ault)-.1 E .85(SCSI b)108 218.4 R .85(us of the machine.)-.2 F F3 -(Scsib)5.85 E(us)-.2 E F0(,).27 E F3(tar)3.35 E -.1(ge)-.37 G(t).1 E F0 -(and)3.351 E F3(lun)3.351 E F0 .851(are inte)3.351 F .851(ger numbers.) --.15 F .851(Some operating systems or SCSI)5.851 F .338(transport imple\ -mentations may require to specify a \214lename in addition.)108 230.4 R -.337(In this case the correct syntax for)5.337 F 2.308(the de)108 242.4 -R 2.308(vice is:)-.25 F F2(de)4.808 E(v=)-.15 E F3(de)4.808 E(vicename) --.15 E F0(:).18 E F3(scsib).34 E(us)-.2 E F0(,).27 E F3(tar).13 E -.1 -(ge)-.37 G(t).1 E F0(,).68 E F3(lun).09 E F0(or)4.808 E F2(de)4.808 E -(v=)-.15 E F3(de)4.808 E(vicename)-.15 E F0(:).18 E F3(tar).13 E -.1(ge) --.37 G(t).1 E F0(,).68 E F3(lun).09 E F0 7.308(.I).24 G 4.809(ft)-7.308 -G 2.309(he name of the)-4.809 F(de)108 254.4 Q .465 -(vice node that has been speci\214ed on such a system refers to e)-.25 F -.465(xactly one SCSI de)-.15 F .465(vice, a shorthand in the)-.25 F -(form)108 266.4 Q F2(de)2.646 E(v=)-.15 E F3(de)2.646 E(vicename)-.15 E -F0(:).18 E F3(@)-.68 E F0(or)2.646 E F2(de)2.646 E(v=)-.15 E F3(de)2.647 -E(vicename)-.15 E F0(:).18 E F3(@)-.68 E F0(,)A F3(lun).09 E F0 .147 -(may be used instead of)2.647 F F2(de)2.647 E(v=)-.15 E F3(de)2.647 E -(vicename)-.15 E F0(:).18 E F3(scsib).34 E(us)-.2 E F0(,).27 E F3(tar) -.13 E(-)-.2 E -.1(ge)108 278.4 S(t).1 E F0(,).68 E F3(lun)A F0(.).24 E -2.32 -.8(To a)108 307.2 T .72(ccess remote SCSI de).8 F .72 -(vices, you need to prepend the SCSI de)-.25 F .72 -(vice name by a remote de)-.25 F .72(vice indicator)-.25 F(.)-.55 E -(The remote de)108 319.2 Q(vice indicator is either)-.25 E F2(REMO)2.5 E -(TE:)-.4 E F3(user@host:).08 E F0(or)2.5 E F2(REMO)5 E(TE:)-.4 E F3 -(host:).31 E F0 3.273(Av)108 331.2 S .773(alid remote SCSI de)-3.523 F -.773(vice name may be:)-.25 F F2(REMO)3.273 E(TE:)-.4 E F3(user@host:) -.08 E F0 .773(to allo)3.273 F 3.274(wr)-.25 G .774(emote SCSI b)-3.274 F -.774(us scanning or)-.2 F F2(REMO)108 343.2 Q(TE:)-.4 E F3 -(user@host:1,0,0)A F0(to access the SCSI de)2.5 E(vice at)-.25 E F3 -(host)2.5 E F0(connected to SCSI b)2.5 E(us # 1,tar)-.2 E(get 0 lun 0.) --.18 E 3.074 -.8(To a)108 372 T 1.474(ccess SCSI de).8 F 1.474 -(vices via alternate transport layers, you need to prepend the SCSI de) --.25 F 1.473(vice name by a)-.25 F .057(transport layer indicator)108 -384 R 5.057(.T)-.55 G .057 -(he transport layer indicator may be something lik)-5.057 F(e)-.1 E F2 -(USCSI:)2.558 E F0(or)2.558 E F2 -1.5 -.95(AT A)2.558 H(PI:).95 E F0 -5.058(.T)C 2.558(og)-5.858 G .058(et a)-2.558 F -(list of supported transport layers for your platform, use)108 396 Q F2 -(de)2.5 E(v=)-.15 E F3(HELP)2.5 E F0(:).44 E 1.862 -.8(To m)108 424.8 T -(ak).8 E(e)-.1 E F2 -.18(re)2.762 G(adcd).18 E F0 .262(portable to all) -2.762 F/F4 8/Times-Roman@0 SF(UNIX)2.761 E F0 .261 -(platforms, the syntax)2.761 F F2(de)2.761 E(v=)-.15 E F3(de)2.761 E -(vicename)-.15 E F0(:).18 E F3(scsib).34 E(us)-.2 E F0(,).27 E F3(tar) -.13 E -.1(ge)-.37 G(t).1 E F0(,).68 E F3(lun).09 E F0 .261(is preferred) -2.761 F .754(as is hides OS speci\214c kno)108 436.8 R .755 -(wledge about de)-.25 F .755(vice names from the user)-.25 F 5.755(.A) --.55 G .755(speci\214c OS must not necessarily)-2.5 F(support a w)108 -448.8 Q(ay to specify a real de)-.1 E(vice \214le name nor a w)-.25 E -(ay to specify)-.1 E F3(scsib)2.5 E(us)-.2 E F0(,).27 E F3(tar).13 E -.1 -(ge)-.37 G(t).1 E F0(,).68 E F3(lun).09 E F0(.).24 E F3(Scsib)108 477.6 -Q(us)-.2 E F0 3.257(0i)3.257 G 3.257(st)-3.257 G .757(he def)-3.257 F -.757(ault SCSI b)-.1 F .757(us on the machine. W)-.2 F .756 -(atch the boot messages for more information or look)-.8 F(into)108 -489.6 Q F2(/v)2.995 E(ar/adm/messages)-.1 E F0 .496 -(for more information about the SCSI con\214guration of your machine.) -2.995 F .496(If you ha)5.496 F -.15(ve)-.2 G 2.158 -(problems to \214gure out what v)108 501.6 R 2.158(alues for)-.25 F F3 -(scsib)4.658 E(us)-.2 E F0(,).27 E F3(tar).13 E -.1(ge)-.37 G(t).1 E F0 -(,).68 E F3(lun).09 E F0 2.158(should be used, try the)4.658 F F2 -(\255scanb)4.658 E(us)-.2 E F0 2.158(option of)4.658 F F2(cdr)108 513.6 -Q(ecord)-.18 E F0(.)A F1(OPTIONS)72 542.4 Q F0 .483(If no options e)108 -554.4 R .483(xcept the)-.15 F F3(de)2.983 E(v=)-.15 E F0 .483(option ha) -2.983 F .783 -.15(ve b)-.2 H .484(een speci\214ed,).15 F F2 -.18(re) -2.984 G(adcd).18 E F0 .484(goes into interacti)2.984 F .784 -.15(ve m) --.25 H 2.984(ode. Select).15 F 2.984(ap)2.984 G(ri-)-2.984 E -(mary function and then follo)108 566.4 Q 2.5(wt)-.25 G -(he instructions.)-2.5 E F2108 588 Q(ersion)-.1 E F0(Print v)144 -600 Q(ersion information and e)-.15 E(xit.)-.15 E F2(de)108 616.8 Q(v=) --.15 E F3(tar).13 E -.1(ge)-.37 G(t).1 E F0 .142(Sets the SCSI tar)144 -628.8 R .142(get for the dri)-.18 F -.15(ve)-.25 G 2.642(,s).15 G .142 -(ee notes abo)-2.642 F -.15(ve)-.15 G 5.142(.A).15 G .142(typical de) --2.5 F .141(vice speci\214cation is)-.25 F F2(de)2.641 E(v=)-.15 E F3 -(6,0).2 E F0 5.141(.I)2.641 G 2.641(fa)-5.141 G .533 -(\214lename must be pro)144 640.8 R .533 -(vided together with the numerical tar)-.15 F .533 -(get speci\214cation, the \214lename is imple-)-.18 F .497 -(mentation speci\214c.)144 652.8 R .497(The correct \214lename in this \ -case can be found in the system speci\214c manuals)5.497 F .637 -(of the tar)144 664.8 R .637(get operating system.)-.18 F .637(On a) -5.637 F F3 -1.77 -.55(Fr e)3.137 H(eBSD).55 E F0 .638(system without) -3.137 F F3(CAM)3.138 E F0 .638(support, you need to use the)3.138 F -4.624(control de)144 676.8 R 4.624(vice \(e.g.)-.25 F F3(/de)9.624 E -(v/r)-.15 E(cd0.ctl)-.37 E F0 7.124(\). A).51 F 4.623(correct de)7.123 F -4.623(vice speci\214cation in this case may be)-.25 F F2(de)144 688.8 Q -(v=)-.15 E F3(/de)1.15 E(v/r)-.15 E(cd0.ctl:@)-.37 E F0(.)2.5 E .571 -(On Linux, dri)144 712.8 R -.15(ve)-.25 G 3.072(sc).15 G .572 -(onnected to a parallel port adapter are mapped to a virtual SCSI b) --3.072 F .572(us. Dif)-.2 F(ferent)-.25 E(adapters are mapped to dif)144 -724.8 Q(ferent tar)-.25 E(gets on this virtual SCSI b)-.18 E(us.)-.2 E -(J)72 768 Q -.25(..)-5.5 K(or)-4.5 5.5 M 2.5(gS)-.18 G 153.065 -(chilling V)-2.5 F(ersion 2.0)-1.11 E(1)206.225 E EP +save +mark +1 pagesetup +10 R f +(Schily)720 480 w +10 S1 f +(\302)976 480 w +10 R f +( \( 1 \))3 164( READCD)1 3277(s USER COMMANDS)2 950 3 1009 480 t +9 B f +( E)1 0( ME)1 60(N NA AM)2 215 3 720 960 t +10 R f +(readcd)1080 1080 w +10 S1 f +(\261)1378 1080 w +10 R f +(read or write data Compact Discs or related madia)8 2070 1 1476 1080 t +9 B f +( S)1 0( IS)1 50( SI)1 35( PS)1 50( OP)1 55( YN NO)2 135(S SY)1 115 7 720 1248 t +10 B f +( d)1 0( cd)1 56( dc)1 44( ad)1 56(r re ea)2 138 5 1080 1368 t +10 R f +([)1407 1368 w +10 B f +( =)1 0( v=)1 57( ev)1 50(d de)1 100 4 1473 1368 t +10 I f +(device)1680 1368 w +10 R f +(][)1967 1368 w +10 I f +(options)2066 1368 w +10 R f +(])2394 1368 w +9 B f +( N)1 0( ON)1 65( IO)1 70( TI)1 35( PT)1 60( IP)1 55( CR RI)2 100( SC)1 65( ES)1 50(D DE)1 125 10 720 1656 t +10 B f +( d)1 0( cd)1 56( dc)1 44( ad)1 56( ea)1 50(R Re)1 116 6 1080 1776 t +10 R f +(is used to read or write Compact Discs.)7 1626 1 1435 1776 t +9 B f +( g)1 0( ng)1 45( in)1 50( mi)1 25( am)1 75( na)1 45( n)1 80( ce e)2 40( ic)1 40( vi)1 25( ev)1 45(D De)1 105 12 900 1944 t +10 R f +( no)1 144( If)1 142(Most users do not need to care about device naming at all.)11 2522 3 1080 2064 t +10 B f +( =)1 0( v=)1 57( ev)1 50(d de)1 100 4 3932 2064 t +10 R f +(option was speci\256ed,)2 879 1 4183 2064 t +10 B f +( d)1 0( cd)1 56( dc)1 44( ad)1 56(r re ea)2 138 5 5106 2064 t +10 R f +(implements)1080 2184 w +10 B f +( t)1 0( et)1 33( ge)1 44( rg)1 50( ar)1 44( ta)1 50( t)1 80( o)1 0( to)1 50( ut)1 33(a au)1 106 11 1594 2184 t +10 R f +(support and automagically \256nds the drive in case that exactly one CD-ROM)11 3269 1 2131 2184 t +( the sys-)2 355( case that more than one CD-ROM type drive exists on)10 2297( In)1 151(type drive is available in the system.)6 1517 4 1080 2304 t +( be retrieved with)3 734(tem, a list of possible device name parameters may)8 2134 2 1080 2424 t +10 B f +( d)1 0( cd)1 56( dc)1 44( ad)1 56(r re ea)2 138 5 3984 2424 t +10 S1 f +(\261 \261)1 65 1 4314 2424 t +10 B f +( s)1 0( nb bu us)3 151( an)1 56( ca)1 50(s sc)1 83 5 4379 2424 t +10 R f +(or from the tar-)3 645 1 4755 2424 t +(get example from the output of)5 1340 1 1080 2544 t +10 B f +( p)1 0( lp)1 56( el)1 28( he)1 44( =h)1 56( v=)1 57( ev)1 50( de)1 44( d)1 101( d)1 0( cd)1 56( dc)1 44( ad)1 56(r re ea)2 138 14 2465 2544 t +10 R f +(, then the)2 409 1 3195 2544 t +10 B f +( =)1 0( v=)1 57( ev)1 50(d de)1 100 4 3649 2544 t +10 R f +( be set based on the)5 884(parameter may)1 615 2 3901 2544 t +(device listing.)1 569 1 1080 2664 t +(The)1080 2832 w +10 I f +(device)1310 2832 w +10 R f +(parameter to the)2 748 1 1639 2832 t +10 B f +( =)1 0( v=)1 57( ev)1 50(d de)1 100 4 2462 2832 t +10 R f +( below refers to)3 776(option explained)1 719 2 2744 2832 t +10 I f +(scsibus)4315 2832 w +10 R f +(/)4612 2832 w +10 I f +(target)4640 2832 w +10 R f +(/)4887 2832 w +10 I f +(lun)4915 2832 w +10 R f +(of the)1 281 1 5119 2832 t +( the)1 161( a \256le /etc/default/cdrecord exists, the parameter to)7 2128(CD/DVD/BluRay-Recorder. If)1 1279 3 1080 2952 t +10 B f +( =)1 0( v=)1 57( ev)1 50(d de)1 100 4 4687 2952 t +10 R f +(option may)1 467 1 4933 2952 t +(also be a drive name label in said \256le \(see FILES section\).)11 2412 1 1080 3072 t +9 B f +( S)1 0( NS)1 50( ON)1 65( IO)1 70( TI)1 35( PT)1 60(O OP)1 125 7 720 3360 t +10 R f +( the)1 162(If no options except)3 838 2 1080 3480 t +10 I f +(dev=)2120 3480 w +10 R f +(option have been speci\256ed,)3 1132 1 2366 3480 t +10 B f +( d)1 0( cd)1 56( dc)1 44( ad)1 56(r re ea)2 138 5 3538 3480 t +10 R f +( a)1 84( Select)1 317(goes into interactive mode.)3 1127 3 3872 3480 t +(primary function and then follow the instructions.)6 2038 1 1080 3600 t +9 B f +( s)1 0( ns)1 35( on)1 50( io)1 45( ti)1 25( pt)1 30( op)1 50( o)1 75( e)1 0( ve)1 40( iv)1 45( ti)1 25( at)1 30( ma)1 45( rm)1 75( or)1 40( fo)1 45( nf)1 30(I In)1 85 19 900 3768 t +10 S1 f +(\261 \261)1 65 1 1080 3888 t +10 B f +( p)1 0( lp)1 56( el)1 28(h he)1 100 4 1145 3888 t +10 R f +(display version information for)3 1270 1 1440 3888 t +10 B f +( d)1 0( cd)1 56( dc)1 44( ad)1 56(r re ea)2 138 5 2743 3888 t +10 R f +(on standard output.)2 785 1 3070 3888 t +10 S1 f +(\261 \261)1 65 1 1080 4056 t +10 B f +( n)1 0( on)1 56( io)1 50( si)1 28( er rs)2 83(v ve)1 94 6 1145 4056 t +10 R f +(Print version information and exit.)4 1412 1 1440 4176 t +10 S1 f +(\261 \261)1 65 1 1080 4344 t +10 B f +(v v)1 50 1 1145 4344 t +10 R f +( used e.g. to display the progress of the)8 1639( is)1 101( This)1 245(Increment the level of general verbosity by one.)7 1975 4 1440 4344 t +(process.)1440 4464 w +9 B f +( s)1 0( ns)1 35( on)1 50( io)1 45( ti)1 25( pt)1 30( op)1 50( o)1 75( l)1 0( al)1 25( na)1 45( on)1 50( io)1 45( ti)1 25( ct)1 30( un nc)2 90( fu)1 50( f)1 60( d)1 0( cd)1 50( dc)1 40( ad)1 50( ea)1 45(R Re)1 105 24 900 4632 t +10 S1 f +(\261 \261)1 65 1 1080 4752 t +10 B f +( e)1 0( ne)1 44( on)1 56( lo)1 50(c cl)1 72 5 1145 4752 t +10 R f +( full TOC data)3 631( The)1 230( a full TOC.)3 534(Do a clone read. Read the CD with all sub-channel data and)11 2565 4 1440 4752 t +(will be put into a \256le with similar name as with the)11 2124 1 1440 4872 t +10 B f +( =)1 0(f f=)1 90 2 3597 4872 t +10 R f +(option but the suf\256x)3 833 1 3720 4872 t +10 B f +( c)1 0( oc)1 44( to)1 50(. .t)1 58 4 4586 4872 t +10 R f +(added.)4771 4872 w +( reading in)2 445(Note that)1 377 2 1440 5112 t +10 B f +( e)1 0( ne)1 44( on)1 56( lo)1 50(c cl)1 72 5 2296 5112 t +10 R f +(mode results in having no error correction at sub-channel level. Even)10 2848 1 2552 5112 t +( channel, there is less error correction than with other read modes. This results)13 3280(in the main data)3 680 2 1440 5232 t +(in a slightly quality degradation. Avoid copying audio CDs in)9 2544 1 1440 5352 t +10 B f +( e)1 0( ne)1 44( on)1 56( lo)1 50(c cl)1 72 5 4017 5352 t +10 R f +(mode for this reason.)3 867 1 4272 5352 t +10 S1 f +(\261 \261)1 65 1 1080 5520 t +10 B f +( n)1 0( an)1 56( ca)1 50( sc)1 44( 2s)1 39(c c2)1 94 6 1145 5520 t +10 R f +(Scans the whole CD or the range speci\256ed by the)9 2119 1 1440 5640 t +10 B f +( =)1 0( s=)1 57( rs)1 39( or)1 44( to)1 50( ec ct)2 77(s se)1 83 7 3601 5640 t +10 I f +(range)3951 5640 w +10 R f +( errors. C2 errors are)4 899(for C2)1 275 2 4226 5640 t +( 24/28 + 28/32 Reed Solomon correc-)6 1582(errors that are uncorrectable after the second stage of the)9 2378 2 1440 5760 t +( \(2352 bytes sector size\). If an audio CD has C2 errors, interpolation)12 2890(tion system at audio level)4 1070 2 1440 5880 t +( the errors. If a data CD has C2 errors, these errors are in most cases corrected)16 3256(is needed to hide)3 704 2 1440 6000 t +( that makes 2352 bytes out of 2048 data bytes. The ECC/EDC code)12 2983(by the ECC/EDC code)3 977 2 1440 6120 t +(should be able to correct about 100 C2 error bytes per sector.)11 2527 1 1440 6240 t +( the)1 162(If you \256nd C2 errors you may want to reduce the speed using)12 2614 2 1440 6480 t +10 B f +( =)1 0( d=)1 57( ee ed)2 100( pe)1 44(s sp)1 95 5 4256 6480 t +10 R f +(option as C2 errors)3 808 1 4592 6480 t +(may be a result of dynamic unbalance on the medium.)9 2235 1 1440 6600 t +10 S1 f +(\261 \261)1 65 1 1080 6768 t +10 B f +( n)1 0( an)1 56( ca)1 50( sc)1 44( xs)1 39(c cx)1 94 6 1145 6768 t +10 R f +( range speci\256ed by the)4 942(Scans the whole CD or the)5 1118 2 1440 6888 t +10 B f +( =)1 0( s=)1 57( rs)1 39( or)1 44( to)1 50( ec ct)2 77(s se)1 83 7 3536 6888 t +10 I f +(range)3886 6888 w +10 R f +( non-)1 219( In)1 152(for C1/C2/CU errors.)2 874 3 4155 6888 t +( With)1 276(verbose mode, only a summary is printed.)6 1784 2 1440 7008 t +10 S1 f +(\261 \261)1 65 1 3543 7008 t +10 B f +(v v)1 50 1 3608 7008 t +10 R f +( free second is)3 624(, a line for each non error)6 1118 2 3658 7008 t +(printed. with)1 559 1 1440 7128 t +10 S1 f +(\261 \261)1 65 1 2039 7128 t +10 B f +(v vv v)2 100 1 2104 7128 t +10 R f +( scan method only works for a few)7 1495( This)1 252(, a line for each second is printed.)7 1449 3 2204 7128 t +(drives.)1440 7248 w +(J)720 7728 w +(. .)1 47 1 759 7673 t +( 1)1 1829( change: Version 3.0)3 850( Last)1 1434(org Schilling)1 528 4 759 7728 t +cleartomark +showpage +restore +%%EndPage: 1 1 %%Page: 2 2 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF 117.615(READCD\(1\) Schily\264s)72 48 R -(USER COMMANDS)2.5 E(READCD\(1\))120.115 E .527(If no)144 84 R/F1 10 -/Times-Italic@0 SF(de)3.027 E(v)-.15 E F0 .527(option is present,)3.027 -F/F2 10/Times-Bold@0 SF(cdr)3.027 E(ecord)-.18 E F0 .527 -(will try to get the de)3.027 F .527(vice from the)-.25 F F2(CDR_DEVICE) -3.026 E F0(en)3.026 E(viron-)-.4 E(ment.)144 96 Q 1.046(If the ar)144 -120 R 1.046(gument to the)-.18 F F2(de)3.547 E(v=)-.15 E F0 1.047 -(option does not contain the characters ',)3.547 F 1.047 -(', '/', '@' or ':', it is inter)-.7 F(-)-.2 E -(preted as an label name that may be found in the \214le /etc/def)144 -132 Q(ault/cdrecord \(see FILES section\).)-.1 E F2(timeout=)108 148.8 Q -F1(#).48 E F0 .13(Set the def)144 160.8 R .13 -(ault SCSI command timeout v)-.1 F .13(alue to)-.25 F F1(#)2.63 E F0 -2.63(seconds. The)3.53 F(def)2.63 E .13(ault SCSI command timeout is)-.1 -F .451(the minimum timeout used for sending SCSI commands.)144 172.8 R -.451(If a SCSI command f)5.451 F .452(ails due to a time-)-.1 F .367 -(out, you may try to raise the def)144 184.8 R .366 -(ault SCSI command timeout abo)-.1 F .666 -.15(ve t)-.15 H .366 -(he timeout v).15 F .366(alue of the f)-.25 F(ailed)-.1 E 2.715 -(command. If)144 196.8 R .216(the command runs correctly with a raised \ -command timeout, please report the better)2.715 F .402(timeout v)144 -208.8 R .401 -(alue and the corresponding command to the author of the program.)-.25 F -.401(If no)5.401 F F1(timeout)2.901 E F0(option)2.901 E -(is present, a def)144 220.8 Q(ault timeout of 40 seconds is used.)-.1 E -F2(deb)108 237.6 Q(ug=)-.2 E F1(#,).48 E F2(-d)2.5 E F0 .385 -(Set the misc deb)144 249.6 R .385(ug v)-.2 F .385(alue to # \(with deb) --.25 F .386(ug=#\) or increment the misc deb)-.2 F .386(ug le)-.2 F -.15 -(ve)-.25 G 2.886(lb).15 G 2.886(yo)-2.886 G .386(ne \(with -d\).)-2.886 -F .13(If you specify)144 261.6 R F1(-dd,)2.63 E F0 .13(this equals to) -2.63 F F2(deb)2.63 E(ug=)-.2 E F1(2.).38 E F0 .13 -(This may help to \214nd problems while opening a dri)5.13 F -.15(ve) --.25 G(r).15 E .863(for libscg.)144 273.6 R .864 -(as well as with sector sizes and sector types.)5.863 F(Using)5.864 E F2 -(\255deb)3.364 E(ug)-.2 E F0(slo)3.364 E .864(ws do)-.25 F .864 -(wn the process)-.25 F(and may be the reason for a b)144 285.6 Q(uf)-.2 -E(fer underrun.)-.25 E F2(kdeb)108 302.4 Q(ug=)-.2 E F0(#,)A F2(kd=)2.5 -E F0(#)A -.7(Te)144 314.4 S(ll the).7 E F2(scg)2.5 E F0(-dri)A -.15(ve) --.25 G 2.5(rt).15 G 2.5(om)-2.5 G(odify the k)-2.5 E(ernel deb)-.1 E -(ug v)-.2 E(alue while SCSI commands are running.)-.25 E F2(\255silent) -108 331.2 Q F0(,)A F22.5 E F0 -(Do not print out a status report for f)144 343.2 Q -(ailed SCSI commands.)-.1 E F2108 360 Q F0 .994(Increment the le) -25.3 F -.15(ve)-.25 G 3.494(lo).15 G 3.494(fg)-3.494 G .994(eneral v) --3.494 F .994(erbosity by one.)-.15 F .993 -(This is used e.g. to display the progress of the)5.994 F(process.)144 -372 Q F2108 388.8 Q F0 .324(Increment the v)23.08 F .324 -(erbose le)-.15 F -.15(ve)-.25 G 2.824(lw).15 G .324 -(ith respect of SCSI command transport by one.)-2.824 F .324 -(This helps to deb)5.324 F(ug)-.2 E 1.194 -(problems during the process, that occur in the CD-Recorder)144 400.8 R -6.194(.I)-.55 G 3.694(fy)-6.194 G 1.193(ou get incomprehensible error) --3.694 F .273 -(messages you should use this \215ag to get more detailed output.)144 -412.8 R F2(\255VV)5.273 E F0 .273(will sho)2.773 F 2.773(wd)-.25 G .274 -(ata b)-2.773 F(uf)-.2 E .274(fer content)-.25 F(in addition.)144 424.8 -Q(Using)5 E F22.5 E F0(or)2.5 E F2(\255VV)2.5 E F0(slo)2.5 E -(ws do)-.25 E(wn the process.)-.25 E F2(f=)108 441.6 Q F1(\214le)1.91 E -F0 .471(Specify the \214lename where the output should be written or th\ -e inout should be tak)12.84 F .47(en from. Using)-.1 F -('-' as \214lename will cause)144 453.6 Q F2 -.18(re)2.5 G(adcd).18 E F0 -(to use)2.5 E F2(stdout)2.5 E F0(resp.)2.5 E F2(stdin)2.5 E F0(.)A F2 -108 470.4 Q F0 -(Switch to write mode. If this option is not present,)23.08 E F2 -.18 -(re)2.5 G(adcd).18 E F0(reads from the speci\214ed de)2.5 E(vice.)-.25 E -F2(\255c2scan)108 487.2 Q F0 .071 -(Scans the whole CD or the range speci\214ed by the)144 499.2 R F2 -(sectors=)2.571 E F1 -.15(ra)C(ng).15 E(e)-.1 E F0 .071 -(for C2 errors. C2 errors are errors)2.571 F .085(that are uncorrectabl\ -e after the second stage of the 24/28 + 28/32 Reed Solomon correction s\ -ystem)144 511.2 R 1.082(at audio le)144 523.2 R -.15(ve)-.25 G 3.583 -(l\().15 G 1.083(2352 bytes sector size\). If an audio CD has C2 errors\ -, interpolation is needed to)-3.583 F 2.191(hide the errors. If a data \ -CD has C2 errors, these errors are in most cases corrected by the)144 -535.2 R .157(ECC/EDC code that mak)144 547.2 R .158 -(es 2352 bytes out of 2048 data bytes. The ECC/EDC code should be able) --.1 F(to correct about 100 C2 error bytes per sector)144 559.2 Q(.)-.55 -E .302(If you \214nd C2 errors you may w)144 583.2 R .302 -(ant to reduce the speed using the)-.1 F F2(speed=)2.801 E F0 .301 -(option as C2 errors may)2.801 F -(be a result of dynamic unbalance on the medium.)144 595.2 Q F2 -(sectors=)108 612 Q F1 -.15(ra)C(ng).15 E(e)-.1 E F0 .349 -(Specify a sector range that should be read.)144 624 R .349 -(The range is speci\214ed by the starting sector number)5.349 F 2.849 -(,a)-.4 G 1.891(minus sign and the ending sector number)144 636 R 6.891 -(.T)-.55 G 1.89(he end sector is not included in the list, so)-6.891 F -F2(sec-)4.39 E(tors=)144 648 Q F0(0-0 will not read an)A -(ything and may be used to check for a CD in the dri)-.15 E -.15(ve)-.25 -G(.).15 E F2(speed=)108 664.8 Q F0(#)A .1(Set the speed f)144 676.8 R .1 -(actor of the read or write process to #.)-.1 F 2.601(#i)5.101 G 2.601 -(sa)-2.601 G 2.601(ni)-2.601 G(nte)-2.601 E(ger)-.15 E 2.601(,r)-.4 G -.101(epresenting a multiple of the)-2.601 F 1.548(audio speed.)144 688.8 -R 1.548(This is about 150 KB/s for CD-R)6.548 F 1.547 -(OM and about 172 KB/s for CD-Audio.)-.4 F 1.547(If no)6.547 F F1(speed) -144 700.8 Q F0 .134(option is present,)2.634 F F2 -.18(re)2.634 G(adcd) -.18 E F0 .134(will use maximum speed.)2.634 F .135 -(Only MMC compliant dri)5.134 F -.15(ve)-.25 G 2.635(sw).15 G .135 -(ill bene-)-2.635 F(\214t from this option.)144 712.8 Q -(The speed of non MMC dri)5 E -.15(ve)-.25 G 2.5(si).15 G 2.5(sn)-2.5 G -(ot changed.)-2.5 E(J)72 768 Q -.25(..)-5.5 K(or)-4.5 5.5 M 2.5(gS)-.18 -G 153.065(chilling V)-2.5 F(ersion 2.0)-1.11 E(2)206.225 E EP +save +mark +2 pagesetup +10 R f +(Schily)720 480 w +10 S1 f +(\302)976 480 w +10 R f +( \( 1 \))3 164( READCD)1 3277(s USER COMMANDS)2 950 3 1009 480 t +10 S1 f +(\261 \261)1 65 1 1080 960 t +10 B f +( c)1 0( dc)1 44(e ed)1 100 3 1145 960 t +10 S1 f +(\261 \261)1 65 1 1289 960 t +10 B f +( rr r)2 44( or)1 44(c co)1 94 3 1354 960 t +10 R f +(In this mode,)2 545 1 1440 1080 t +10 B f +( d)1 0( cd)1 56( dc)1 44( ad)1 56(r re ea)2 138 5 2020 1080 t +10 R f +( and then tries to correct)5 1022(reads CD data sectors in uncorrected audio mode)7 2029 2 2349 1080 t +( Heiko Eissfeldt. As this library implements)6 1848(the data using the ECC/EDC decoder library from)7 2112 2 1440 1200 t +( two layers of error correction,)5 1293(looping over)1 522 2 1440 1320 t +10 B f +( d)1 0( cd)1 56( dc)1 44( ad)1 56(r re ea)2 138 5 3295 1320 t +10 R f +(may be able to correct more data than the)8 1771 1 3629 1320 t +(\256rmware of the CD-ROM drive.)4 1327 1 1440 1440 t +( CD media and currently only)5 1300(This option is currently experimental and only applicable with)8 2660 2 1440 1680 t +(supports plain 2048 Byte CD-ROM sectors.)5 1795 1 1440 1800 t +10 B f +( =)1 0(f f=)1 90 2 1080 1968 t +10 I f +(\256le)1170 1968 w +10 R f +( the output should be written or the input should be taken from.)12 2805(Specify the \256lename where)3 1155 2 1440 1968 t +(Using ')1 305 1 1440 2088 t +10 S1 f +(\261)1745 2088 w +10 R f +(' as \256lename will cause)4 969 1 1810 2088 t +10 B f +( d)1 0( cd)1 56( dc)1 44( ad)1 56(r re ea)2 138 5 2812 2088 t +10 R f +(to use)1 244 1 3139 2088 t +10 B f +( t)1 0( ut)1 33( ou)1 56( do)1 50( td)1 56(s st)1 72 6 3416 2088 t +10 R f +(resp.)3716 2088 w +10 B f +( n)1 0( in)1 56( di)1 28( td)1 56(s st)1 72 5 3940 2088 t +10 R f +(.)4152 2088 w +10 S1 f +(\261 \261)1 65 1 1080 2256 t +10 B f +( r)1 0( or)1 44( to)1 50( ct)1 33( ac)1 44(f fa)1 83 6 1145 2256 t +10 R f +(Output the speed values for)4 1218 1 1440 2256 t +10 B f +( =)1 0( s=)1 57( ts)1 39( nt)1 33( in)1 56( oi)1 28( hp po)2 106( sh)1 56( es)1 39(m me)1 127 10 2713 2256 t +10 S1 f +(#)3254 2256 w +10 R f +( on)1 156(as factor based)2 652 2 3359 2256 t +10 I f +(single speed)1 522 1 4223 2256 t +10 R f +(of the current)2 599 1 4801 2256 t +( only works if)3 582(medium. This)1 597 2 1440 2376 t +10 B f +( d)1 0( cd)1 56( dc)1 44( ad)1 56(r re ea)2 138 5 2652 2376 t +10 R f +(is able to determine the current medium type.)7 1870 1 2979 2376 t +10 S1 f +(\261 \261)1 65 1 1080 2544 t +10 B f +( c)1 0( oc)1 44( to)1 50( ll lt)2 61( ul)1 28(f fu)1 89 6 1145 2544 t +10 R f +(Retrieve a full TOC from the current disk and print it in hex.)12 2518 1 1440 2664 t +10 B f +( =)1 0( s=)1 57( ts)1 39( nt)1 33( in)1 56( oi)1 28( hp po)2 106( sh)1 56( es)1 39(m me)1 127 10 1080 2832 t +10 S1 f +(#)1621 2832 w +10 R f +(Print read-speed at)2 792 1 1440 2952 t +10 S1 f +(#)2279 2952 w +10 R f +( option is to create a list of read speed)9 1718( purpose of this)3 685(locations. The)1 621 3 2376 2952 t +( e.g.)1 179(values suitable for)2 754 2 1440 3072 t +10 B f +( t)1 0( ot)1 33( lo)1 50( nu up pl)3 140(g gn)1 106 5 2441 3072 t +10 R f +( speed values are calculated assuming that 1000 bytes are)9 2382(. The)1 248 2 2770 3072 t +( is)1 108( output data created for this purpose)6 1526( The)1 228(one kilobyte as documented in the SCSI standard.)7 2098 4 1440 3192 t +(written to)1 394 1 1440 3312 t +10 I f +(stdout)1867 3312 w +10 R f +(.)2120 3312 w +10 S1 f +(\261 \261)1 65 1 1080 3480 t +10 B f +( rr r)2 44( or)1 44( co)1 50( oc)1 44(n no)1 106 5 1145 3480 t +10 R f +( are a result of)4 650(Switch the drive into a mode where it ignores read errors in data sectors that)14 3310 2 1440 3600 t +( If)1 142(uncorrectable ECC/EDC errors before reading.)4 1951 2 1440 3720 t +10 B f +( d)1 0( cd)1 56( dc)1 44( ad)1 56(r re ea)2 138 5 3576 3720 t +10 R f +(completes, the error recovery mode)4 1487 1 3913 3720 t +(of the drive is switched back to the remembered old mode.)10 2423 1 1440 3840 t +10 S1 f +(\261 \261)1 65 1 1080 4008 t +10 B f +( r)1 0( or)1 44( er rr ro)3 138( oe)1 44(n no)1 106 5 1145 4008 t +10 R f +(Do not abort if the high level error checking in)9 1956 1 1440 4128 t +10 B f +( d)1 0( cd)1 56( dc)1 44( ad)1 56(r re ea)2 138 5 3431 4128 t +10 R f +( the data)2 360(found an uncorrectable error in)4 1280 2 3760 4128 t +(stream.)1440 4248 w +10 S1 f +(\261 \261)1 65 1 1080 4416 t +10 B f +( c)1 0( un nc)2 100( ru)1 56( tr)1 44( ot)1 33(n no)1 106 6 1145 4416 t +10 R f +(Do not truncate the output \256le when opening it.)8 1960 1 1440 4536 t +10 S1 f +(\261 \261)1 65 1 1080 4704 t +10 B f +( d)1 0( ad)1 56( ea)1 50( he)1 44( er rh)2 100(o ov ve)2 144 6 1145 4704 t +10 R f +( by executing several commands 1000)5 1618( is done)2 345( This)1 253(Meter the SCSI command overhead time.)5 1744 4 1440 4824 t +( the displayed times by 1000, you get the)8 1761(times and printing the total time used. If you divide)9 2199 2 1440 4944 t +(average overhead time for a single command.)6 1868 1 1440 5064 t +10 S1 f +(\261 \261)1 65 1 1080 5232 t +10 B f +( n)1 0( an)1 56( ca)1 50( sc)1 44( 8s)1 39( i8)1 50(p pi)1 84 7 1145 5232 t +10 R f +(Scans the whole DVD or the range speci\256ed by the)9 2160 1 1440 5352 t +10 B f +( =)1 0( s=)1 57( rs)1 39( or)1 44( to)1 50( ec ct)2 77(s se)1 83 7 3638 5352 t +10 I f +(range)3988 5352 w +10 R f +(for)4260 5352 w +10 B f +( 8)1 0( m8)1 50( um)1 83( su)1 56( is)1 39(p pi)1 84 6 4415 5352 t +10 R f +( non-)1 222(errors. In)1 412 2 4766 5352 t +( With)1 268( a summary is printed.)4 931(verbose mode, only)2 807 3 1440 5472 t +10 S1 f +(\261 \261)1 65 1 3481 5472 t +10 B f +(v v)1 50 1 3546 5472 t +10 R f +(, a line for each non error free block of 8)10 1719 1 3596 5472 t +10 S f +(*)5350 5472 w +10 R f +( with)1 250(32 kB is printed.)3 709 2 1440 5592 t +10 S1 f +(\261 \261)1 65 1 2438 5592 t +10 B f +(v vv v)2 100 1 2503 5592 t +10 R f +( of 8)2 213(, a line for each block)5 934 2 2603 5592 t +10 S f +(*)3790 5592 w +10 R f +( scan method)2 557( This)1 251(32 kB is printed.)3 712 3 3880 5592 t +(only works for a few drives.)5 1165 1 1440 5712 t +10 S1 f +(\261 \261)1 65 1 1080 5880 t +10 B f +( n)1 0( an)1 56( ca)1 50( sc)1 44( fs)1 39( if)1 33(p pi)1 84 7 1145 5880 t +10 R f +(Scans the whole DVD or the range speci\256ed by the)9 2277 1 1440 6000 t +10 B f +( =)1 0( s=)1 57( rs)1 39( or)1 44( to)1 50( ec ct)2 77(s se)1 83 7 3768 6000 t +10 I f +(range)4118 6000 w +10 R f +(for)4403 6000 w +10 B f +( f)1 0( if)1 33(p pi)1 84 3 4571 6000 t +10 R f +( non-)1 235(errors. In)1 425 2 4740 6000 t +( With)1 270( only a summary is printed.)5 1154(verbose mode,)1 595 3 1440 6120 t +10 S1 f +(\261 \261)1 65 1 3496 6120 t +10 B f +(v v)1 50 1 3561 6120 t +10 R f +(, a line for each non error free block of 32)10 1789 1 3611 6120 t +( with)1 256(kB is printed.)2 582 2 1440 6240 t +10 S1 f +(\261 \261)1 65 1 2323 6240 t +10 B f +(v vv v)2 100 1 2388 6240 t +10 R f +( method only)2 570( scan)1 222( This)1 256(, a line for each block of 32 kB is printed.)10 1864 4 2488 6240 t +(works for a few drives.)4 954 1 1440 6360 t +10 S1 f +(\261 \261)1 65 1 1080 6528 t +10 B f +( t)1 0( ot)1 33( lo)1 50(p pl)1 84 4 1145 6528 t +10 R f +( the behavior for)3 713(This option modi\256ed)2 872 2 1440 6528 t +10 S1 f +(\261 \261)1 65 1 3067 6528 t +10 B f +( n)1 0( an)1 56( ca)1 50( sc)1 44( xs)1 39(c cx)1 94 6 3132 6528 t +10 R f +(,)3415 6528 w +10 S1 f +(\261 \261)1 65 1 3482 6528 t +10 B f +( n)1 0( an)1 56( ca)1 50( sc)1 44( 8s)1 39( i8)1 50(p pi)1 84 7 3547 6528 t +10 R f +(and)3912 6528 w +10 S1 f +(\261 \261)1 65 1 4098 6528 t +10 B f +( n)1 0( an)1 56( ca)1 50( sc)1 44( fs)1 39( if)1 33(p pi)1 84 7 4163 6528 t +10 R f +( output is better)3 676(. The)1 255 2 4469 6528 t +(suited for gnuplot.)2 752 1 1440 6648 t +10 B f +( =)1 0( s=)1 57( es)1 39( ie)1 44( ri)1 28( tr)1 44(r re et)2 121 7 1080 6816 t +10 S1 f +(#)1413 6816 w +10 R f +( in)1 114(Set the retry count for high level retries)7 1642 2 1440 6936 t +10 B f +( d)1 0( cd)1 56( dc)1 44( ad)1 56(r re ea)2 138 5 3232 6936 t +10 R f +(to)3562 6936 w +10 S1 f +(#)3676 6936 w +10 R f +( default is to do 128 retries which)7 1417(. The)1 249 2 3734 6936 t +(may be too much if you like to read a CD with many unreadable sectors.)14 3010 1 1440 7056 t +10 B f +( =)1 0( s=)1 57( rs)1 39( or)1 44( to)1 50( ec ct)2 77(s se)1 83 7 1080 7224 t +10 I f +(range)1430 7224 w +10 R f +(J)720 7704 w +(. .)1 47 1 759 7649 t +( 2)1 1829( change: Version 3.0)3 850( Last)1 1434(org Schilling)1 528 4 759 7704 t +cleartomark +showpage +restore +%%EndPage: 2 2 %%Page: 3 3 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF 117.615(READCD\(1\) Schily\264s)72 48 R -(USER COMMANDS)2.5 E(READCD\(1\))120.115 E(Using a lo)144 84 Q -(wer speed may increase the readability of a CD or D)-.25 E(VD.)-.4 E/F1 -10/Times-Bold@0 SF(\255notrunc)108 100.8 Q F0 -(Do not truncate the output\214le when opening it.)144 112.8 Q F1 -(\255fulltoc)108 129.6 Q F0(Retrie)144 141.6 Q .3 -.15(ve a f)-.25 H -(ull T).15 E(OC from the current disk and print it in he)-.18 E(x.)-.15 -E F1(\255clone)108 158.4 Q F0 .002 -(Do a clone read. Read the CD with all sub-channel data and a full T) -8.08 F 2.502(OC. The)-.18 F .002(full T)2.502 F .002(OC data will be) --.18 F -.2(bu)144 170.4 S 2.5(ti).2 G -(nto a \214le with similar name as with the)-2.5 E F1(f=)2.5 E F0 -(option b)2.5 E(ut the suf)-.2 E<8c78>-.25 E F1(.toc)2.5 E F0(added.)2.5 -E F1(\255noerr)108 187.2 Q(or)-.18 E F0 .997 -(Do not abort if the high le)144 199.2 R -.15(ve)-.25 G 3.497(le).15 G -.997(rror checking in)-3.497 F F1 -.18(re)3.497 G(adcd).18 E F0 .997 -(found an uncorrectable error in the data)3.497 F(stream.)144 211.2 Q F1 -(\255nocorr)108 228 Q F0 .309(Switch the dri)144 240 R .609 -.15(ve i) --.25 H .308(nto a mode where it ignores read errors in data sectors tha\ -t are a result of uncor).15 F(-)-.2 E 1.361 -(rectable ECC/EDC errors before reading.)144 252 R(If)6.361 E F1 -.18 -(re)3.861 G(adcd).18 E F0 1.362(completes, the error reco)3.862 F -.15 -(ve)-.15 G 1.362(ry mode of the).15 F(dri)144 264 Q .3 -.15(ve i)-.25 H -2.5(ss).15 G(witched back to the remembered old mode.)-2.5 E F1 -.18(re) -108 280.8 S(tries=).18 E/F2 10/Times-Italic@0 SF(#).48 E F0 .07 -(Set the retry count for high le)144 292.8 R -.15(ve)-.25 G 2.57(lr).15 -G .07(etries in)-2.57 F F1 -.18(re)2.57 G(adcd).18 E F0(to)2.57 E F2(#) -2.569 E F0 5.069(.T).9 G .069(he def)-5.069 F .069 -(ault is to do 128 retries which may)-.1 F(be too much if you lik)144 -304.8 Q 2.5(et)-.1 G 2.5(or)-2.5 G(ead a CD with man)-2.5 E 2.5(yu)-.15 -G(nreadable sectors.)-2.5 E F1108 321.6 Q -.1(ve)-.1 G(rhead).1 E -F0 1.845(Meter the SCSI command o)144 333.6 R -.15(ve)-.15 G 1.845 -(rhead time.).15 F 1.845(This is done by e)6.845 F -.15(xe)-.15 G 1.846 -(cuting se).15 F -.15(ve)-.25 G 1.846(ral commands 1000).15 F .225 -(times and printing the total time used. If you di)144 345.6 R .225 -(vide the displayed times by 1000, you get the a)-.25 F -.15(ve)-.2 G --.2(r-).15 G(age o)144 357.6 Q -.15(ve)-.15 G -(rhead time for a single command.).15 E/F3 10.95/Times-Bold@0 SF -(EXAMPLES)72 374.4 Q F0 -.15(Fo)108 386.4 S 4.105(ra).15 G 1.605(ll e) --4.105 F 1.605(xamples belo)-.15 F 2.905 -.65(w, i)-.25 H 4.105(tw).65 G -1.605(ill be assumed that the dri)-4.105 F 1.905 -.15(ve i)-.25 H 4.105 -(sc).15 G 1.606(onnected to the primary SCSI b)-4.105 F 1.606(us of the) --.2 F(machine. The SCSI tar)108 398.4 Q(get id is set to 2.)-.18 E 1.6 --.8(To r)108 415.2 T(ead the complete media from a CD-R).8 E -(OM writing the data to the \214le)-.4 E F2(cdima)2.5 E -.1(ge)-.1 G(.r) --.05 E(aw)-.15 E F0(:).31 E(readcd de)118 432 Q(v=2,0 f=cdimage.ra)-.25 -E(w)-.15 E 1.6 -.8(To r)108 448.8 T -(ead sectors from range 150 ... 10000 from a CD-R).8 E -(OM writing the data to the \214le)-.4 E F2(cdima)2.5 E -.1(ge)-.1 G(.r) --.05 E(aw)-.15 E F0(:).31 E(readcd de)118 465.6 Q -(v=2,0 sectors=150-10000 f=cdimage.ra)-.25 E(w)-.15 E 1.6 -.8(To w)108 -482.4 T(rite the data from the \214le).8 E F2(cdima)2.5 E -.1(ge)-.1 G -(.r)-.05 E(aw)-.15 E F0(\(e.g. a \214lesystem image from)2.5 E F1 -(mkisofs)2.5 E F0 2.5(\)t)C 2.5(oaD)-2.5 G(VD-RAM, call:)-2.9 E -(readcd de)118 499.2 Q(v=2,0 -w f=cdimage.ra)-.25 E(w)-.15 E F3(ENVIR)72 -528 Q(ONMENT)-.329 E F1(RSH)108 540 Q F0 .55(If the)15.44 F F1(RSH)3.05 -E F0(en)3.05 E .549 -(vironment is present, the remote connection will not be created via)-.4 -F F1 -.18(rc)3.049 G(md).18 E F0 .549(\(3\) b)B .549(ut by)-.2 F .578 -(calling the program pointed to by)144 552 R F1(RSH)3.079 E F0 5.579(.U) -C .579(se e.g.)-5.579 F F1(RSH=)5.579 E F0 .579 -(/usr/bin/ssh to create a secure shell con-)B(nection.)144 564 Q .87 -(Note that this forces)144 588 R F1(cdr)3.37 E(ecord)-.18 E F0 .869 -(to create a pipe to the)3.37 F F1(rsh\(1\))3.369 E F0 .869 -(program and disallo)3.369 F(ws)-.25 E F1(cdr)3.369 E(ecord)-.18 E F0 -(to)3.369 E .28(directly access the netw)144 600 R .28(ork sock)-.1 F -.28(et to the remote serv)-.1 F(er)-.15 E 5.281(.T)-.55 G .281(his mak) --5.281 F .281(es it impossible to set up perfor)-.1 F(-)-.2 E .813 -(mance parameters and slo)144 612 R .813(ws do)-.25 F .813 -(wn the connection compared to a)-.25 F F1 -.18(ro)3.313 G(ot).18 E F0 -(initiated)3.313 E F1 -.18(rc)3.313 G(md\(3\)).18 E F0(connec-)3.313 E -(tion.)144 624 Q F1(RSCSI)108 640.8 Q F0 3.942(If the)6.55 F F1(RSCSI) -6.442 E F0(en)6.443 E 3.943(vironment is present, the remote SCSI serv) --.4 F 3.943(er will not be the program)-.15 F F1(/opt/schily/sbin/rscsi) -144 652.8 Q F0 -.2(bu)3.737 G 3.737(tt).2 G 1.236 -(he program pointed to by)-3.737 F F1(RSCSI)3.736 E F0 6.236(.N)C 1.236 -(ote that the remote SCSI serv)-6.236 F(er)-.15 E .553(program name wil\ -l be ignored if you log in using an account that has been created with \ -a remote)144 664.8 R(SCSI serv)144 676.8 Q(er program as login shell.) --.15 E F3(FILES)72 693.6 Q(SEE ALSO)72 705.6 Q F1(cdr)108 717.6 Q(ecord) --.18 E F0(\(1\),)A F1(mkisofs)2.5 E F0(\(1\),)A F1(scg)2.5 E F0(\(7\),)A -F1(fbk)2.5 E F0(\(7\),)A F1 -.18(rc)2.5 G(md).18 E F0(\(3\),)A F1(ssh) -2.5 E F0(\(1\).)A(J)72 768 Q -.25(..)-5.5 K(or)-4.5 5.5 M 2.5(gS)-.18 G -153.065(chilling V)-2.5 F(ersion 2.0)-1.11 E(3)206.225 E EP +save +mark +3 pagesetup +10 R f +(Schily)720 480 w +10 S1 f +(\302)976 480 w +10 R f +( \( 1 \))3 164( READCD)1 3277(s USER COMMANDS)2 950 3 1009 480 t +( range is speci\256ed by the starting sector)7 1802( The)1 245( sector range that should be read.)6 1508(Specify a)1 405 4 1440 960 t +( list,)1 183( end sector is not included in the)7 1373( The)1 224(number, a minus sign and the ending sector number.)8 2180 4 1440 1080 t +(so)1440 1200 w +10 B f +( =)1 0( s=)1 57( rs)1 39( or)1 44( to)1 50( ec ct)2 77(s se)1 83 7 1562 1200 t +10 R f +(0-0 will not read anything and may be used to check for a CD in the drive.)16 3098 1 1912 1200 t +10 B f +( =)1 0( d=)1 57( ee ed)2 100( pe)1 44(s sp)1 95 5 1080 1368 t +10 S1 f +(#)1376 1368 w +10 R f +(Set the speed factor of the read or write process to)10 2080 1 1440 1488 t +10 S1 f +(#)3553 1488 w +10 R f +(.)3603 1488 w +10 S1 f +(#)3695 1488 w +10 R f +(is an integer, representing a multiple of)6 1621 1 3779 1488 t +( If)1 137( is about 150 KB/s for CD-ROM and about 172 KB/s for CD-Audio.)12 2902( This)1 249(the audio speed.)2 672 4 1440 1608 t +(no)1440 1728 w +10 I f +(speed)1574 1728 w +10 R f +(option is present,)2 704 1 1835 1728 t +10 B f +( d)1 0( cd)1 56( dc)1 44( ad)1 56(r re ea)2 138 5 2573 1728 t +10 R f +( drives will)2 470( MMC compliant)2 713( Only)1 267(will use maximum speed.)3 1049 4 2901 1728 t +( speed of non MMC drives is not changed.)8 1765( The)1 221(bene\256t from this option.)3 991 3 1440 1848 t +(Using a lower speed may increase the readability of a CD or DVD.)12 2770 1 1440 2088 t +10 S1 f +(\261 \261)1 65 1 1080 2256 t +10 B f +(w w)1 72 1 1145 2256 t +10 R f +( to DVD-RAM media. For other media, use)7 1906( is only possible)3 714( Writing)1 391(Switch to write mode.)3 949 4 1440 2256 t +10 B f +( d)1 0( rd)1 56( or)1 44( re ec co)3 138( dr)1 44(c cd)1 100 6 1440 2376 t +10 R f +( that)1 183(instead. Note)1 568 2 1855 2376 t +10 B f +( d)1 0( rd)1 56( or)1 44( re ec co)3 138( dr)1 44(c cd)1 100 6 2639 2376 t +10 R f +(also supports to write DVD-RAM media.)5 1694 1 3054 2376 t +(If this option is not present,)5 1140 1 1440 2616 t +10 B f +( d)1 0( cd)1 56( dc)1 44( ad)1 56(r re ea)2 138 5 2613 2616 t +10 R f +(reads from the speci\256ed device.)4 1298 1 2940 2616 t +9 B f +( s)1 0( ns)1 35( on)1 50( io)1 45( ti)1 25( pt)1 30( op)1 50( o)1 75( I)1 0( SI)1 35( CS)1 50(S SC)1 115 12 900 2784 t +10 B f +( =)1 0( v=)1 57( ev)1 50(d de)1 100 4 1080 2904 t +10 I f +(target)1287 2904 w +10 R f +( typical target dev-)3 796( A)1 145(Set the SCSI target for the CD/DVD/BluRay-Recorder, see notes above.)9 3019 3 1440 3024 t +(ice speci\256cation is)2 762 1 1440 3144 t +10 B f +( =)1 0( v=)1 57( ev)1 50(d de)1 100 4 2239 3144 t +10 I f +(1,6,0)2446 3144 w +10 R f +( a \256lename must be provided together with the numerical tar-)10 2556(. If)1 161 2 2683 3144 t +( correct \256lename in this case can)6 1374( The)1 225( implementation speci\256c.)2 1032(get speci\256cation, the \256lename is)4 1329 4 1440 3264 t +( a)1 81( On)1 192( the system speci\256c manuals of the target operating system.)9 2483(be found in)2 481 4 1440 3384 t +10 I f +(FreeBSD)4714 3384 w +10 R f +(system)5122 3384 w +(without)1440 3504 w +10 I f +(CAM)1780 3504 w +10 R f +( use the control device \(e.g.)5 1150(support, you need to)3 843 2 2025 3504 t +10 I f +(/dev/rcd0.ctl)4086 3504 w +10 R f +( correct device)2 606(\). A)1 198 2 4596 3504 t +(speci\256cation in this case may be)5 1330 1 1440 3624 t +10 B f +( =)1 0( v=)1 57( ev)1 50(d de)1 100 4 2803 3624 t +10 I f +(/dev/rcd0.ctl:)3010 3624 w +10 S1 f +(@)3545 3624 w +10 R f +(.)3670 3624 w +10 B f +( g)1 0( ng)1 50( in)1 56( ss si)2 67( re es)2 83( dd dr)2 100( ad)1 56( a)1 83( I)1 0( SI)1 39( CS)1 56( SC)1 72( S)1 89( l)1 0( al)1 28( er ra)2 94( ne)1 44( en)1 56(G Ge)1 122 19 1240 3864 t +10 R f +(The)1440 3984 w +10 I f +(target device)1 548 1 1650 3984 t +10 R f +(to the)1 255 1 2253 3984 t +10 B f +( =)1 0( v=)1 57( ev)1 50(d de)1 100 4 2563 3984 t +10 R f +(option refers to)2 670 1 2825 3984 t +10 I f +(scsibus)3550 3984 w +10 R f +(/)3847 3984 w +10 I f +(target)3875 3984 w +10 R f +(/)4122 3984 w +10 I f +(lun)4150 3984 w +10 R f +(of the CD/DVD/BluRay-)2 1067 1 4333 3984 t +(Recorder. Communication on)2 1211 1 1440 4104 t +10 I f +(SunOS)2689 4104 w +10 R f +( the SCSI general driver)4 1013(is done with)2 515 2 2999 4104 t +10 B f +( .)1 0( g.)1 25( cg)1 50(s sc)1 83 4 4564 4104 t +10 R f +(Other operating)1 641 1 4759 4104 t +( is:)1 189( syntax)1 354( Possible)1 460(systems are using a library simulation of this driver.)8 2623 4 1440 4224 t +10 B f +( =)1 0( v=)1 57( ev)1 50(d de)1 100 4 5193 4224 t +10 I f +(scsibus)1440 4344 w +10 R f +(,)1737 4344 w +10 I f +(target)1762 4344 w +10 R f +(,)2009 4344 w +10 I f +(lun)2034 4344 w +10 R f +(or)2201 4344 w +10 B f +( =)1 0( v=)1 57( ev)1 50(d de)1 100 4 2323 4344 t +10 I f +(target)2569 4344 w +10 R f +(,)2816 4344 w +10 I f +(lun)2841 4344 w +10 R f +( to)1 116( the latter case, the CD/DVD/BluRay-Recorder has)6 2127(. In)1 180 3 2977 4344 t +( SCSI bus of the machine.)5 1184(be connected to the default)4 1183 2 1440 4464 t +10 I f +(Scsibus)3893 4464 w +10 R f +(,)4201 4464 w +10 I f +(target)4279 4464 w +10 R f +(and)4571 4464 w +10 I f +(lun)4768 4464 w +10 R f +(are integer)1 451 1 4949 4464 t +( require to specify a)4 852(numbers. Some operating systems or SCSI transport implementations may)8 3108 2 1440 4584 t +( this case the correct syntax for the device is:)9 2441( In)1 213(\256lename in addition.)2 969 3 1440 4704 t +10 B f +( =)1 0( v=)1 57( ev)1 50(d de)1 100 4 5193 4704 t +10 I f +(devicename)1440 4824 w +10 R f +(:)1918 4824 w +10 I f +(scsibus)1946 4824 w +10 R f +(,)2243 4824 w +10 I f +(target)2268 4824 w +10 R f +(, or)1 143 1 2515 4824 t +10 B f +( =)1 0( v=)1 57( ev)1 50(d de)1 100 4 2693 4824 t +10 I f +(devicename)2935 4824 w +10 R f +(:)3413 4824 w +10 I f +(target)3441 4824 w +10 R f +(,)3688 4824 w +10 I f +(lun)3713 4824 w +10 R f +( the name of the device node that)7 1392(. If)1 159 2 3849 4824 t +( the form)2 390(has been speci\256ed on such a system refers to exactly one SCSI device, a shorthand in)15 3570 2 1440 4944 t +10 B f +( =)1 0( v=)1 57( ev)1 50(d de)1 100 4 1440 5064 t +10 I f +(devicename)1756 5064 w +10 R f +(:)2234 5064 w +10 S1 f +(@)2262 5064 w +10 R f +(or)2463 5064 w +10 B f +( =)1 0( v=)1 57( ev)1 50(d de)1 100 4 2655 5064 t +10 I f +(devicename)2971 5064 w +10 R f +(:)3449 5064 w +10 S1 f +(@)3477 5064 w +10 R f +(,)3577 5064 w +10 I f +(lun)3602 5064 w +10 R f +(may be used instead of)4 1247 1 3838 5064 t +10 B f +( =)1 0( v=)1 57( ev)1 50(d de)1 100 4 5193 5064 t +10 I f +(devicename)1440 5184 w +10 R f +(:)1918 5184 w +10 I f +(scsibus)1946 5184 w +10 R f +(,)2243 5184 w +10 I f +(target)2268 5184 w +10 R f +(,)2515 5184 w +10 B f +( g)1 0( ng)1 50( in)1 56( ss si)2 67( re es)2 83( dd dr)2 100( ad)1 56( a)1 83( I)1 0( SI)1 39( CS)1 56( SC)1 72( S)1 89( e)1 0( te)1 44( ot)1 33( mo)1 50( em)1 83(R Re)1 116 19 1240 5424 t +10 R f +( to prepend the SCSI device name by a remote device)10 2240(To access remote SCSI devices, you need)6 1720 2 1440 5544 t +(indicator. The remote device indicator is either)6 1961 1 1440 5664 t +10 B f +( :)1 0( TE E:)2 100( OT)1 67( MO)1 78( EM)1 94(R RE)1 139 6 3441 5664 t +10 I f +(user)3919 5664 w +10 S1 f +(@)4091 5664 w +10 I f +(host:)4183 5664 w +10 R f +(or)4456 5664 w +10 B f +( :)1 0( TE E:)2 100( OT)1 67( MO)1 78( EM)1 94(R RE)1 139 6 4578 5664 t +10 I f +(host:)5056 5664 w +10 R f +(A)5328 5664 w +(valid remote SCSI device name may be:)6 1741 1 1440 5784 t +10 B f +( :)1 0( TE E:)2 100( OT)1 67( MO)1 78( EM)1 94(R RE)1 139 6 3261 5784 t +10 I f +(user)3739 5784 w +10 S1 f +(@)3911 5784 w +10 I f +(host:)4003 5784 w +10 R f +( bus)1 187(to allow remote SCSI)3 930 2 4283 5784 t +(scanning or)1 482 1 1440 5904 t +10 B f +( :)1 0( TE E:)2 100( OT)1 67( MO)1 78( EM)1 94(R RE)1 139 6 1966 5904 t +10 I f +(user)2444 5904 w +10 S1 f +(@)2616 5904 w +10 I f +(host:1,0,0)2708 5904 w +10 R f +( SCSI device at)3 673(to access the)2 542 2 3152 5904 t +10 I f +(host)4410 5904 w +10 R f +(connected to SCSI)2 780 1 4620 5904 t +(bus)1440 6024 w +10 S1 f +(#)1614 6024 w +10 R f +( to a speci\256c)3 535( order to allow remote access)5 1216( In)1 151(1,target 0, lun 0.)3 685 4 1699 6024 t +10 I f +(host)4322 6024 w +10 R f +(, the)1 183 1 4497 6024 t +10 B f +( i)1 0( si)1 28( cs)1 39( sc)1 44(r rs)1 83 5 4716 6024 t +10 R f +(\(1\) program)1 490 1 4910 6024 t +(needs to be present and con\256gured on the)7 1711 1 1440 6144 t +10 I f +(host)3184 6144 w +10 R f +(.)3359 6144 w +10 B f +( s)1 0( ts)1 39( rt)1 33( or)1 44( po)1 50( sp)1 56( ns)1 39( an)1 56( ra)1 50( tr)1 44( t)1 66( I)1 0( SI)1 39( CS)1 56( SC)1 72( S)1 89( e)1 0( te)1 44( at)1 33( na)1 50( er rn)2 100( te)1 44( lt)1 33(A Al)1 100 24 1240 6384 t +( d)1 0( rd)1 56( or)1 44( re ec co)3 138( dr)1 44(C Cd)1 128 6 1440 6504 t +10 R f +(is completely based on)3 1090 1 1934 6504 t +10 B f +( I)1 0( SI)1 39( CS)1 56(S SC)1 128 4 3108 6504 t +10 R f +(commands but this is no problem as all)7 1984 1 3416 6504 t +(CD/DVD/BluRay writers ever made use)4 1658 1 1440 6624 t +10 B f +( I)1 0( SI)1 39( CS)1 56(S SC)1 128 4 3133 6624 t +10 R f +(commands for the communication. Even)4 1663 1 3391 6624 t +10 B f +( I)1 0( PI)1 39( AP)1 61( TA)1 72(A AT)1 139 5 5089 6624 t +10 R f +(drives are just)2 606 1 1440 6744 t +10 B f +( I)1 0( SI)1 39( CS)1 56(S SC)1 128 4 2094 6744 t +10 R f +( use the)2 353(drives that inherently)2 895 2 2365 6744 t +10 I f +(ATA packet interface)2 891 1 3662 6744 t +10 R f +(as)4602 6744 w +10 B f +( I)1 0( SI)1 39( CS)1 56(S SC)1 128 4 4734 6744 t +10 R f +(command)5006 6744 w +( need to specify an alternate tran-)6 1395( may)1 209( You)1 242(transport layer build into the IDE \(ATA\) transport.)7 2114 4 1440 6864 t +( fully integrated kernel driver)4 1211( if your OS does not implement a)7 1386( line)1 216(sport layer on the command)4 1147 4 1440 6984 t +(subsystem that allows to access any drive using)7 1971 1 1440 7104 t +10 B f +( I)1 0( SI)1 39( CS)1 56(S SC)1 128 4 3446 7104 t +10 R f +(commands via a single unique user inter-)6 1696 1 3704 7104 t +(face.)1440 7224 w +(J)720 7704 w +(. .)1 47 1 759 7649 t +( 3)1 1829( change: Version 3.0)3 850( Last)1 1434(org Schilling)1 528 4 759 7704 t +cleartomark +showpage +restore +%%EndPage: 3 3 %%Page: 4 4 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF 117.615(READCD\(1\) Schily\264s)72 48 R -(USER COMMANDS)2.5 E(READCD\(1\))120.115 E/F1 10.95/Times-Bold@0 SF(NO) -72 84 Q(TES)-.438 E F0 .511(If you don')108 96 R 3.011(tw)-.18 G .511 -(ant to allo)-3.111 F 3.011(wu)-.25 G .511 -(sers to become root on your system,)-3.011 F/F2 10/Times-Bold@0 SF -.18 -(re)3.01 G(adcd).18 E F0 .51(may safely be installed suid root.)3.01 F -.865(This allo)108 108 R .865 -(ws all users or a group of users with no root pri)-.25 F(vile)-.25 E -.866(ges to use)-.15 F F2 -.18(re)3.366 G 3.366(adcd. Readcd).18 F F0 -.866(in this case will)3.366 F(only allo)108 120 Q 2.5(wa)-.25 G -(ccess to CD-R)-2.5 E(OM type dri)-.4 E -.15(ve)-.25 G(s- T).15 E 2.5 -(og)-.8 G -2.15 -.25(iv e)-2.5 H(all user access to use)2.75 E F2 -.18 -(re)2.5 G(adcd,).18 E F0(enter:)2.5 E(cho)144 136.8 Q -(wn root /usr/local/bin/readcd)-.25 E(chmod 4711 /usr/local/bin/readcd) -144 148.8 Q 1.6 -.8(To g)108 165.6 T -2.15 -.25(iv e).8 H 2.5(ar)2.75 G -(estricted group of users access to)-2.5 E F2 -.18(re)2.5 G(adcd).18 E -F0(enter:)2.5 E(cho)144 182.4 Q(wn root /usr/local/bin/readcd)-.25 E -(chgrp cdb)144 194.4 Q(urners /usr/local/bin/readcd)-.2 E -(chmod 4710 /usr/local/bin/readcd)144 206.4 Q(and add a group)108 223.2 -Q/F3 10/Times-Italic@0 SF(cdb)2.5 E(urner)-.2 E(s)-.1 E F0 -(on your system.)2.5 E(Ne)108 240 Q -.15(ve)-.25 G 3.03(rg).15 G -2.15 --.25(iv e)-3.03 H .53(write permissions for non root users to the)3.28 F -F3(/de)3.03 E(v/scg?)-.15 E F0(de)5.53 E .53(vices unless you w)-.25 F -.53(ould allo)-.1 F 3.03(wa)-.25 G -.15(ny)-3.03 G(body).15 E -(to read/write/format all your disks.)108 252 Q -1.1(Yo)108 268.8 S -3.356(us)1.1 G .856(hould not connect old dri)-3.356 F -.15(ve)-.25 G -3.356(st).15 G .857 -(hat do not support disconnect/reconnect to either the SCSI b)-3.356 F -.857(us that is)-.2 F(connected to the CD-Recorder or the source disk.) -108 280.8 Q .021(When using)108 297.6 R F2 -.18(re)2.521 G(adcd).18 E F0 -.021(with the brok)2.521 F(en)-.1 E F2 .021(Linux SCSI generic dri)2.521 -F -.1(ve)-.1 G -1(r.).1 G F0 -1.1(Yo)6.021 G 2.52(us)1.1 G .02 -(hould note that)-2.52 F F2 -.18(re)2.52 G(adcd).18 E F0 .02 -(uses a hack,)2.52 F .784 -(that tries to emulate the functionality of the scg dri)108 309.6 R -.15 -(ve)-.25 G 4.385 -.55(r. U).15 H(nfortunately).55 E 3.285(,t)-.65 G .785 -(he sg dri)-3.285 F -.15(ve)-.25 G 3.285(ro).15 G(n)-3.285 E F2(Linux) -3.285 E F0 .785(has se)3.285 F -.15(ve)-.25 G(ral).15 E(se)108 321.6 Q --.15(ve)-.25 G(re b).15 E(ugs:)-.2 E 32.5<8349>108 338.4 S 2.5(tc)-32.5 -G(annot see if a SCSI command could not be sent at all.)-2.5 E 32.5 -<8349>108 355.2 S 3.113(tc)-32.5 G .613(annot get the SCSI status byte.) --3.113 F F2(Readcd)5.613 E F0 .612(for that reason cannot report f)3.113 -F .612(ailing SCSI commands)-.1 F(in some situations.)144 367.2 Q 32.5 -<8349>108 384 S 3.722(tc)-32.5 G 1.223 -(annot get real DMA count of transfer)-3.722 F(.)-.55 E F2(Readcd)6.223 -E F0 1.223(cannot tell you if there is an DMA residual)3.723 F(count.) -144 396 Q 32.5<8349>108 412.8 S 2.936(tc)-32.5 G .436 -(annot get number of bytes v)-2.936 F .435(alid in auto sense data.)-.25 -F F2(Readcd)5.435 E F0 .435(cannot tell you if de)2.935 F .435 -(vice transfers)-.25 F(no sense data at all.)144 424.8 Q 32.5<8349>108 -441.6 S 2.5(tf)-32.5 G(etches to fe)-2.5 E 2.5(wd)-.25 G -(ata in auto request sense \(CCS/SCSI-2/SCSI-3 needs >= 18\).)-2.5 E F1 -(DIA)72 470.4 Q(GNOSTICS)-.602 E F0 2.5(At)108 482.4 S -(ypical error message for a SCSI command looks lik)-2.5 E(e:)-.1 E -(readcd: I/O error)144 506.4 Q 2.5(.t)-.55 G -(est unit ready: scsi sendcmd: no error)-2.5 E 2.5(CDB: 00)144 518.4 R -(20 00 00 00 00)2.5 E(status: 0x2 \(CHECK CONDITION\))144 530.4 Q -(Sense Bytes: 70 00 05 00 00 00 00 0A 00 00 00 00 25 00 00 00 00 00)144 -542.4 Q(Sense K)144 554.4 Q -.15(ey)-.25 G 2.5(:0).15 G(x5 Ille)-2.5 E --.05(ga)-.15 G 2.5(lR).05 G(equest, Se)-2.5 E(gment 0)-.15 E -(Sense Code: 0x25 Qual 0x00 \(logical unit not supported\) Fru 0x0)144 -566.4 Q(Sense \215ags: Blk 0 \(not v)144 578.4 Q(alid\))-.25 E -(cmd \214nished after 0.002s timeout 40s)144 590.4 Q .351 -(The \214rst line gi)108 614.4 R -.15(ve)-.25 G 2.851(si).15 G .352 -(nformation about the transport of the command.)-2.851 F .352(The te) -5.352 F .352(xt after the \214rst colon gi)-.15 F -.15(ve)-.25 G 2.852 -(st).15 G(he)-2.852 E .041(error te)108 626.4 R .041 -(xt for the system call from the vie)-.15 F 2.541(wo)-.25 G 2.541(ft) --2.541 G .04(he k)-2.541 F .04(ernel. It usually is:)-.1 F F2 .04 -(I/O err)2.54 F(or)-.18 E F0 .04(unless other problems hap-)2.54 F .579 -(pen. The ne)108 638.4 R .579(xt w)-.15 F .579 -(ords contain a short description for the SCSI command that f)-.1 F .58 -(ails. The rest of the line tells)-.1 F .051(you if there were an)108 -650.4 R 2.551(yp)-.15 G .051(roblems for the transport of the command o) --2.551 F -.15(ve)-.15 G 2.551(rt).15 G .051(he SCSI b)-2.551 F(us.)-.2 E -F2 .051(fatal err)5.051 F(or)-.18 E F0 .051(means that)2.551 F(it w)108 -662.4 Q(as not possible to transport the command \(i.e. no de)-.1 E -(vice present at the requested SCSI address\).)-.25 E -(The second line prints the SCSI command descriptor block for the f)108 -679.2 Q(ailed command.)-.1 E .706(The third line gi)108 696 R -.15(ve) --.25 G 3.206(si).15 G .707(nformation on the SCSI status code returned \ -by the command, if the transport of the)-3.206 F(command succeeds.)108 -708 Q(This is error information from the SCSI de)5 E(vice.)-.25 E -(The fourth line is a he)108 724.8 Q 2.5(xd)-.15 G -(ump of the auto request sense information for the command.)-2.5 E(J)72 -768 Q -.25(..)-5.5 K(or)-4.5 5.5 M 2.5(gS)-.18 G 153.065(chilling V)-2.5 -F(ersion 2.0)-1.11 E(4)206.225 E EP +save +mark +4 pagesetup +10 R f +(Schily)720 480 w +10 S1 f +(\302)976 480 w +10 R f +( \( 1 \))3 164( READCD)1 3277(s USER COMMANDS)2 950 3 1009 480 t +( devices via alternate transport layers, you need to prepend the SCSI device)12 3289(To access SCSI)2 671 2 1440 960 t +( indicator may be something like)5 1468( transport layer)2 668( The)1 245(name by a transport layer indicator.)5 1579 4 1440 1080 t +10 B f +( :)1 0( I:)1 33( SI)1 39( CS)1 56( SC)1 72(U US)1 128 6 1440 1200 t +10 R f +(or)1812 1200 w +10 B f +( :)1 0( I:)1 33( PI)1 39( AP)1 61( TA)1 72(A AT)1 139 6 1939 1200 t +10 R f +( of supported transport layers for your platform, use)8 2231( get a list)3 421(. To)1 213 3 2283 1200 t +10 B f +( =)1 0( v=)1 57( ev)1 50(d de)1 100 4 5193 1200 t +10 I f +(HELP)1440 1320 w +10 R f +(:)1698 1320 w +10 B f +( un nd d)3 112( ou)1 56( ro)1 50( gr)1 44( kg)1 50( ck)1 56( ac)1 44( Ba)1 50( B)1 100( y)1 0( ty)1 50( il li it)3 89( bi)1 28( ab)1 56( ta)1 50( rt)1 33( or)1 44(P Po)1 111 18 1240 1560 t +10 R f +(To make)1 366 1 1440 1680 t +10 B f +( d)1 0( cd)1 56( dc)1 44( ad)1 56(r re ea)2 138 5 1845 1680 t +10 R f +( all)1 140(portable to)1 444 2 2178 1680 t +8 R f +(UNIX)2795 1680 w +10 R f +(platforms, the syntax)2 871 1 3035 1680 t +10 B f +( =)1 0( v=)1 57( ev)1 50(d de)1 100 4 3946 1680 t +10 I f +(devicename)4193 1680 w +10 R f +(:)4671 1680 w +10 I f +(scsibus)4699 1680 w +10 R f +(,)4996 1680 w +10 I f +(target)5021 1680 w +10 R f +(, is)1 132 1 5268 1680 t +( speci\256c OS)2 511( A)1 144( names from the user.)4 918(preferred as it hides OS speci\256c knowledge about device)8 2387 4 1440 1800 t +( to specify)2 466(may not necessarily support a way to specify a real device \256le name nor a way)15 3494 2 1440 1920 t +10 I f +(scsibus)1440 2040 w +10 R f +(,)1737 2040 w +10 I f +(target)1762 2040 w +10 R f +(,)2009 2040 w +10 I f +(lun)2034 2040 w +10 R f +(.)2170 2040 w +10 I f +(Scsibus)1440 2280 w +10 R f +( the machine. Watch the boot messages for more informa-)9 2434(0 is the default SCSI bus on)6 1189 2 1777 2280 t +(tion or look into)3 675 1 1440 2400 t +10 B f +( s)1 0( es)1 39( ag ge)2 94( ss sa)2 89( es)1 39( me)1 44( /m)1 83( m/)1 28( dm)1 83( ad)1 56( /a)1 50( r/)1 28( va ar)2 94(/ /v)1 78 14 2149 2400 t +10 R f +(for more information about the SCSI con\256guration of your)8 2412 1 2988 2400 t +( you have problems to \256gure out what values for)9 2029(machine. If)1 497 2 1440 2520 t +10 I f +(scsibus)4001 2520 w +10 R f +(,)4298 2520 w +10 I f +(target)4323 2520 w +10 R f +(,)4570 2520 w +10 I f +(lun)4595 2520 w +10 R f +(should be used,)2 641 1 4759 2520 t +(try the)1 266 1 1440 2640 t +10 S1 f +(\261 \261)1 65 1 1739 2640 t +10 B f +( s)1 0( nb bu us)3 151( an)1 56( ca)1 50(s sc)1 83 5 1804 2640 t +10 R f +(option of)1 372 1 2177 2640 t +10 B f +( d)1 0( cd)1 56( dc)1 44( ad)1 56(r re ea)2 138 5 2582 2640 t +10 R f +(described below.)1 684 1 2909 2640 t +10 B f +( s)1 0( ce es)2 83( ic)1 44( vi)1 28( ev)1 50( de)1 44( d)1 89( r)1 0( or)1 44( fo)1 50( f)1 66( s)1 0( es)1 39( me)1 44( am)1 83( na)1 50( n)1 89( l)1 0( al)1 28( ca)1 50( ic)1 44( og gi)2 78( lo)1 50( l)1 61( g)1 0( ng)1 50( in)1 56( si)1 28(U Us)1 111 29 1240 2880 t +10 R f +(If no)1 201 1 1440 3000 t +10 I f +(dev)1676 3000 w +10 R f +(option is present,)2 706 1 1849 3000 t +10 B f +( d)1 0( cd)1 56( dc)1 44( ad)1 56(r re ea)2 138 5 2590 3000 t +10 R f +( to get the device from the)6 1114(will try)1 302 2 2919 3000 t +10 B f +(C CD DR R)3 216 1 4371 3000 t +10 S f +(_ _)1 50 1 4587 3000 t +10 B f +( E)1 0( CE)1 67( IC)1 72( VI)1 39( EV)1 72(D DE)1 139 6 4637 3000 t +10 R f +(environ-)5062 3000 w +(ment.)1440 3120 w +( the argument to the)4 1007(If a \256le /etc/default/cdrecord exists, and if)6 1977 2 1440 3360 t +10 B f +( =)1 0( v=)1 57( ev)1 50(d de)1 100 4 4501 3360 t +10 R f +(option or the)2 615 1 4785 3360 t +10 B f +(C CD DR R)3 216 1 1440 3480 t +10 S f +(_ _)1 50 1 1656 3480 t +10 B f +( E)1 0( CE)1 67( IC)1 72( VI)1 39( EV)1 72(D DE)1 139 6 1706 3480 t +10 R f +( not contain the characters ',', '/', ')7 1474(environment does)1 726 2 2133 3480 t +10 S1 f +(@)4333 3480 w +10 R f +(' or ':', it is interpreted)5 975 1 4425 3480 t +(as a device label name that was de\256ned in the \256le /etc/default/cdrecord \(see FILES section\).)14 3779 1 1440 3600 t +10 B f +( e)1 0( de)1 44( od)1 56( Mo)1 50( M)1 127( t)1 0( et)1 33( ge)1 44( rg)1 50( ar)1 44( ta)1 50( ot)1 33( to)1 50( ut)1 33(A Au)1 128 15 1240 3840 t +10 R f +(If no)1 203 1 1440 3960 t +10 B f +( =)1 0( v=)1 57( ev)1 50(d de)1 100 4 1680 3960 t +10 R f +( no)1 138(option and)1 437 2 1924 3960 t +10 B f +(C CD DR R)3 216 1 2537 3960 t +10 S f +(_ _)1 50 1 2753 3960 t +10 B f +( E)1 0( CE)1 67( IC)1 72( VI)1 39( EV)1 72(D DE)1 139 6 2803 3960 t +10 R f +(environment is present, or if it only contains a tran-)9 2170 1 3230 3960 t +(sport specifyer but no address notation,)5 1665 1 1440 4080 t +10 B f +( d)1 0( cd)1 56( dc)1 44( ad)1 56(r re ea)2 138 5 3149 4080 t +10 R f +(tries to scan the SCSI address space for CD-)8 1913 1 3487 4080 t +( exactly one is found, this is used by default.)9 1851( If)1 132(ROM drives.)1 530 3 1440 4200 t +10 B f +( =)1 0( g=)1 57( bu ug)2 106( eb)1 56(d de)1 100 5 1080 4368 t +10 S1 f +(#)1399 4368 w +10 I f +(,)1449 4368 w +10 S1 f +(\261 \261)1 65 1 1515 4368 t +10 B f +(d d)1 56 1 1580 4368 t +10 R f +(Set the misc debug value to)5 1167 1 1440 4488 t +10 S1 f +(#)2645 4488 w +10 R f +(\(with debug=)1 549 1 2733 4488 t +10 S1 f +(#)3282 4488 w +10 R f +( the misc debug level by one \(with)7 1477(\) or increment)2 591 2 3332 4488 t +10 S1 f +(\261)1440 4608 w +10 R f +(d\). If you specify)3 729 1 1505 4608 t +10 S1 f +(\261)2272 4608 w +10 I f +(dd,)2337 4608 w +10 R f +(this equals to)2 554 1 2500 4608 t +10 B f +( =)1 0( g=)1 57( bu ug)2 106( eb)1 56(d de)1 100 5 3092 4608 t +10 I f +(2.)3411 4608 w +10 R f +(This may help to \256nd problems while open-)7 1843 1 3557 4608 t +( Using)1 319( sector sizes and sector types.)5 1285( well as with)3 571( as)1 162(ing a driver for libscg.)4 974 5 1440 4728 t +10 S1 f +(\261 \261)1 65 1 4798 4728 t +10 B f +( g)1 0( bu ug)2 106( eb)1 56(d de)1 100 4 4863 4728 t +10 R f +(slows)5172 4728 w +(down the process and may be the reason for a buffer underrun.)11 2586 1 1440 4848 t +10 B f +( =)1 0( g=)1 57( bu ug)2 106( eb)1 56(k kd de)2 156 5 1080 5016 t +10 S1 f +(#)1455 5016 w +10 R f +(,)1505 5016 w +10 B f +( =)1 0(k kd d=)2 169 2 1563 5016 t +10 S1 f +(#)1732 5016 w +10 R f +(Tell the)1 316 1 1440 5136 t +10 B f +( g)1 0( cg)1 50(s sc)1 83 3 1789 5136 t +10 R f +(-driver to modify the kernel debug value while SCSI commands are running.)11 3156 1 1922 5136 t +10 S1 f +(\261 \261)1 65 1 1080 5304 t +10 B f +( s)1 0( nb bu us)3 151( an)1 56( ca)1 50(s sc)1 83 5 1145 5304 t +10 R f +( be used)2 345(Scan all SCSI devices on all SCSI busses and print the inquiry strings. This option may)15 3615 2 1440 5424 t +( com-)1 244( numbers printed out as labels are)6 1432( The)1 228(to \256nd SCSI address of the devices on a system.)9 2056 4 1440 5544 t +(puted by:)1 383 1 1440 5664 t +10 B f +( s)1 0(b bu us)2 151 2 1856 5664 t +10 S f +(* *)1 50 1 2040 5664 t +10 B f +( t)1 0( et)1 33( ge)1 44( rg)1 50( ar)1 44( ta)1 50( t)1 66( +)1 0( +)1 90(1 10 00 0)3 150 10 2123 5664 t +10 S1 f +(\261 \261)1 65 1 1080 5832 t +10 B f +( t)1 0( nt)1 33( en)1 56( il le)2 72(s si)1 67 5 1145 5832 t +10 R f +(,)1373 5832 w +10 S1 f +(\261 \261)1 65 1 1431 5832 t +10 B f +(s s)1 39 1 1496 5832 t +10 R f +(Do not print out a status report for failed SCSI commands.)10 2420 1 1440 5952 t +10 B f +( =)1 0( t=)1 57( ut)1 33( ou)1 56( eo)1 50( me)1 44( im)1 83(t ti)1 61 8 1080 6120 t +10 S1 f +(#)1464 6120 w +10 R f +(Set the default SCSI command timeout value to)7 2139 1 1440 6240 t +10 S1 f +(#)3637 6240 w +10 R f +( default SCSI command)3 1060(seconds. The)1 587 2 3753 6240 t +( a SCSI command fails)4 982( If)1 139( commands.)1 498(timeout is the minimum timeout used for sending SCSI)8 2341 4 1440 6360 t +( a timeout, you may try to raise the default SCSI command timeout above the timeout)15 3696(due to)1 264 2 1440 6480 t +( runs correctly with a raised command timeout,)7 1991( the command)2 598( If)1 140(value of the failed command.)4 1231 4 1440 6600 t +( the author of the pro-)5 933(please report the better timeout value and the corresponding command to)10 3027 2 1440 6720 t +( no)1 133(gram. If)1 362 2 1440 6840 t +10 I f +(timeout)1968 6840 w +10 R f +(option is present, a default timeout of 40 seconds is used.)10 2367 1 2301 6840 t +10 B f +( =)1 0( s=)1 57(t ts)1 72 3 1080 7008 t +10 S1 f +(#)1209 7008 w +10 R f +(Set the maximum transfer size for a single SCSI command to)10 2558 1 1440 7008 t +10 S1 f +(#)4034 7008 w +10 R f +( the)1 159( syntax for)2 449(. The)1 249 3 4084 7008 t +10 B f +( =)1 0( s=)1 57(t ts)1 72 3 4978 7008 t +10 R f +(option)5144 7008 w +(is the same as for cdrecord fs=)6 1267 1 1440 7128 t +10 S1 f +(#)2707 7128 w +10 R f +(or sdd bs=)2 433 1 2790 7128 t +10 S1 f +(#)3223 7128 w +10 R f +(.)3273 7128 w +(J)720 7680 w +(. .)1 47 1 759 7625 t +( 4)1 1829( change: Version 3.0)3 850( Last)1 1434(org Schilling)1 528 4 759 7680 t +cleartomark +showpage +restore +%%EndPage: 4 4 %%Page: 5 5 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF 117.615(READCD\(1\) Schily\264s)72 48 R -(USER COMMANDS)2.5 E(READCD\(1\))120.115 E .846 -(The \214fth line is the error te)108 84 R .846(xt for the sense k)-.15 -F 1.146 -.15(ey i)-.1 H 3.346(fa).15 G -.25(va)-3.546 G .846 -(ilable, follo).25 F .846(wed by the se)-.25 F .846 -(gment number that is only)-.15 F -.25(va)108 96 S .421 -(lid if the command w).25 F .421(as a)-.1 F/F1 10/Times-Italic@0 SF -(copy)2.921 E F0 .421(command. If the error message is not directly rel\ -ated to the current com-)2.921 F(mand, the te)108 108 Q(xt)-.15 E F1 -(deferr)2.5 E(ed err)-.37 E(or)-.45 E F0(is appended.)2.5 E 1.279 -(The sixth line is the error te)108 124.8 R 1.279 -(xt for the sense code and the sense quali\214er if a)-.15 F -.25(va)-.2 -G 3.778(ilable. If).25 F 1.278(the type of the)3.778 F(de)108 136.8 Q -.012(vice is kno)-.25 F .012 -(wn, the sense data is decoded from tables in)-.25 F F1(scsierr)2.512 E -(s.c)-.1 E F0 5.012(.T)2.822 G .012(he te)-5.012 F .012(xt is follo)-.15 -F .012(wed by the error v)-.25 F(alue)-.25 E -(for a \214eld replaceable unit.)108 148.8 Q 1.069(The se)108 165.6 R --.15(ve)-.25 G 1.069 -(nth line prints the block number that is related to the f).15 F 1.069 -(ailed command and te)-.1 F 1.069(xt for se)-.15 F -.15(ve)-.25 G 1.068 -(ral error).15 F(\215ags. The block number may not be v)108 177.6 Q -(alid.)-.25 E .356(The eight line reports the timeout set up for this c\ -ommand and the time that the command really needed to)108 194.4 R -(complete.)108 206.4 Q/F2 10.95/Times-Bold@0 SF -.11(BU)72 235.2 S(GS) -.11 E(CREDITS)72 247.2 Q(MAILING LISTS)72 259.2 Q F0 .103(If you w)108 -271.2 R .102(ant to acti)-.1 F -.15(ve)-.25 G .102(ly tak).15 F 2.602 -(ep)-.1 G .102(art on the de)-2.602 F -.15(ve)-.25 G .102 -(lopment of cdrecord, you may join the cdwriting mailing list by).15 F -(sending mail to:)108 283.2 Q(other)144 307.2 Q -(-cdwrite-request@lists.debian.or)-.2 E(g)-.18 E(and include the w)108 -331.2 Q(ord)-.1 E F1(subscribe)2.5 E F0(in the body)2.5 E 5(.T)-.65 G -(he mail address of the list is:)-5 E(cdwrite@lists.debian.or)144 355.2 -Q(g)-.18 E F2 -.548(AU)72 384 S(THOR).548 E F0(J)108 396 Q -.25(..)-5.5 -K(or)-4.5 5.5 M 2.5(gS)-.18 G(chilling)-2.5 E(Seestr)108 408 Q 2.5(.1) --.55 G(10)-2.5 E(D-13353 Berlin)108 420 Q(German)108 432 Q(y)-.15 E -(Additional information can be found on:)108 448.8 Q(http://www)108 -460.8 Q(.fokus.fhg.de/usr/schilling/cdrecord.html)-.65 E(If you ha)108 -477.6 Q .3 -.15(ve s)-.2 H(upport questions, send them to:).15 E/F3 10 -/Times-Bold@0 SF(cdr)108 494.4 Q(ecord-support@berlios.de)-.18 E F0(or) -108 506.4 Q F3(other)2.5 E(-cd)-.37 E(write@lists.debian.or)-.15 E(g)-.1 -E F0(Of you ha)108 523.2 Q .3 -.15(ve d)-.2 H(e\214nitely found a b).15 -E(ug, send a mail to:)-.2 E F3(cdr)108 540 Q(ecord-de)-.18 E -.1(ve)-.15 -G(lopers@berlios.de).1 E F0(or)108 552 Q F3(schilling@f)2.5 E(okus.fhg) --.25 E(.de)-.15 E F0 1.6 -.8(To s)108 568.8 T(ubscribe, use:).8 E F3 -(http://lists.berlios.de/mailman/listinf)108 585.6 Q(o/cdr)-.25 E -(ecord-de)-.18 E -.1(ve)-.15 G(lopers).1 E F0(or)108 597.6 Q F3 -(http://lists.berlios.de/mailman/listinf)2.5 E(o/cdr)-.25 E -(ecord-support)-.18 E F0(J)72 768 Q -.25(..)-5.5 K(or)-4.5 5.5 M 2.5(gS) --.18 G 153.065(chilling V)-2.5 F(ersion 2.0)-1.11 E(5)206.225 E EP +save +mark +5 pagesetup +10 R f +(Schily)720 480 w +10 S1 f +(\302)976 480 w +10 R f +( \( 1 \))3 164( READCD)1 3277(s USER COMMANDS)2 950 3 1009 480 t +(If no)1 203 1 1440 960 t +10 B f +( =)1 0( s=)1 57(t ts)1 72 3 1680 960 t +10 R f +(option has been speci\256ed,)3 1068 1 1846 960 t +10 B f +( d)1 0( cd)1 56( dc)1 44( ad)1 56(r re ea)2 138 5 2951 960 t +10 R f +(defaults to a transfer size of 256 kB. If libscg gets)10 2118 1 3282 960 t +( is reduced to the maximum value that is pos-)9 1899(lower values from the operating system, the value)7 2061 2 1440 1080 t +( help to further reduce the transfer)6 1458( it may)2 308( Sometimes,)1 543(sible with the current operating system.)5 1651 4 1440 1200 t +( a long time to \256nd a better value by experiment-)10 2043(size or to enhance it, but note that it may take)10 1917 2 1440 1320 t +(ing with the)2 494 1 1440 1440 t +10 B f +( =)1 0( s=)1 57(t ts)1 72 3 1967 1440 t +10 R f +(option.)2129 1440 w +10 S1 f +(\261 \261)1 65 1 1080 1608 t +10 B f +(V V)1 72 1 1145 1608 t +10 R f +( helps to)2 383( This)1 258( verbose level with respect of SCSI command transport by one.)10 2747(Increment the)1 572 4 1440 1608 t +( during the process, that occur in the CD-Recorder. If you get incomprehensible)12 3308(debug problems)1 652 2 1440 1728 t +(error messages you should use this \257ag to get more detailed output.)11 2978 1 1440 1848 t +10 S1 f +(\261 \261)1 65 1 4502 1848 t +10 B f +(V VV V)2 144 1 4567 1848 t +10 R f +(will show data)2 637 1 4763 1848 t +( Using)1 305(buffer content in addition.)3 1067 2 1440 1968 t +10 S1 f +(\261 \261)1 65 1 2845 1968 t +10 B f +(V V)1 72 1 2910 1968 t +10 R f +(or)3015 1968 w +10 S1 f +(\261 \261)1 65 1 3131 1968 t +10 B f +(V VV V)2 144 1 3196 1968 t +10 R f +(slows down the process.)3 995 1 3373 1968 t +9 B f +( S)1 0( LE ES)2 110( PL)1 60( MP)1 55( XA AM)2 150(E EX)1 125 6 720 2136 t +10 R f +( primary SCSI bus of the)5 1077(For all examples below, it will be assumed that the drive is connected to the)14 3243 2 1080 2256 t +(machine. The SCSI target id is set to 2.)8 1630 1 1080 2376 t +(To read the complete media from a CD-ROM writing the data to the \256le)13 2986 1 1080 2544 t +10 I f +(cdimage.raw)4099 2544 w +10 R f +(:)4626 2544 w +(readcd dev=2,0 f=cdimage.raw)2 1257 1 1212 2712 t +(To read sectors from range 150 ... 10000 from a CD-ROM writing the data to the \256le)16 3520 1 1080 2880 t +10 I f +(cdimage.raw)4633 2880 w +10 R f +(:)5160 2880 w +(readcd dev=2,0 sectors=150-10000 f=cdimage.raw)3 2056 1 1212 3048 t +( the data from the \256le)5 952(To write)1 359 2 1080 3216 t +10 I f +(cdimage.raw)2435 3216 w +10 R f +(\(e.g. a \256lesystem image from)4 1241 1 2998 3216 t +10 B f +( s)1 0( fs)1 39( of)1 33( so)1 50( is)1 39( ki)1 28(m mk)1 139 7 4283 3216 t +10 R f +(\) to a DVD-RAM,)3 789 1 4611 3216 t +(call:)1080 3336 w +(readcd dev=2,0)1 623 1 1212 3504 t +10 S1 f +(\261)1868 3504 w +10 R f +(w f=cdimage.raw)1 706 1 1933 3504 t +9 B f +( T)1 0( NT)1 60( EN)1 65( ME)1 60( NM)1 85( ON)1 65( RO)1 70( IR)1 65( NV VI)2 100(E EN)1 125 10 720 3792 t +10 B f +( H)1 0( SH)1 78(R RS)1 128 3 1080 3912 t +10 R f +(If the)1 227 1 1440 3912 t +10 B f +( H)1 0( SH)1 78(R RS)1 128 3 1706 3912 t +10 R f +(environment is present, the remote connection will not be created via)10 2899 1 1951 3912 t +10 B f +( d)1 0( md)1 56(r rc cm)2 171 3 4889 3912 t +10 R f +(\(3\) but)1 284 1 5116 3912 t +( by)1 137(by calling the program pointed to)5 1400 2 1440 4032 t +10 B f +( H)1 0( SH)1 78(R RS)1 128 3 3014 4032 t +10 R f +( e.g.)1 181(. Use)1 250 2 3220 4032 t +10 B f +( =)1 0( H=)1 57( SH)1 78(R RS)1 128 4 3688 4032 t +10 R f +(/usr/bin/ssh to create a secure shell)5 1449 1 3951 4032 t +(connection.)1440 4152 w +(Note that this forces)3 831 1 1440 4392 t +10 B f +( d)1 0( rd)1 56( or)1 44( re ec co)3 138( dr)1 44(c cd)1 100 6 2304 4392 t +10 R f +(to create a pipe to the)5 901 1 2720 4392 t +10 B f +( \))1 0( 1\))1 33( \(1)1 50( h\()1 33( sh)1 56(r rs)1 83 6 3655 4392 t +10 R f +(program and disallows)2 928 1 3944 4392 t +10 B f +( d)1 0( rd)1 56( or)1 44( re ec co)3 138( dr)1 44(c cd)1 100 6 4906 4392 t +10 R f +(to)5322 4392 w +( makes it impossible to set up per-)7 1432( This)1 245( socket to the remote server.)5 1170(directly access the network)3 1113 4 1440 4512 t +( slows down the connection compared to a)7 1770(formance parameters and)2 1025 2 1440 4632 t +10 B f +( t)1 0( oo ot)2 83(r ro)1 94 3 4270 4632 t +10 R f +(initiated)4482 4632 w +10 B f +( \))1 0( 3\))1 33( \(3)1 50( d\()1 33( md)1 56(r rc cm)2 171 6 4845 4632 t +10 R f +(con-)5223 4632 w +(nection.)1440 4752 w +10 B f +( I)1 0( SI)1 39( CS)1 56( SC)1 72(R RS)1 128 5 1080 4920 t +10 R f +(If the)1 252 1 1440 4920 t +10 B f +( I)1 0( SI)1 39( CS)1 56( SC)1 72(R RS)1 128 5 1756 4920 t +10 R f +( not be the program)4 942(environment is present, the remote SCSI server will)7 2343 2 2115 4920 t +10 B f +( i)1 0( si)1 28( cs)1 39( sc)1 44( rs)1 39( /r)1 44( n/)1 28( in)1 56( bi)1 28( sb)1 56( /s)1 39( y/)1 28( il ly)2 78( hi)1 28( ch)1 56( sc)1 44( /s)1 39( t/)1 28( pt)1 33( op)1 56(/ /o)1 78 21 1440 5040 t +10 R f +(but the program pointed to by)5 1251 1 2346 5040 t +10 B f +( I)1 0( SI)1 39( CS)1 56( SC)1 72(R RS)1 128 5 3633 5040 t +10 R f +( that the remote SCSI server)5 1184(. Note)1 288 2 3928 5040 t +(program name will be ignored if you log in using an account that has been created with a)17 3960 1 1440 5160 t +(remote SCSI server program as login shell.)6 1771 1 1440 5280 t +9 B f +( S)1 0( LE ES)2 110( IL)1 60(F FI)1 90 4 720 5448 t +( O)1 0( SO)1 70( LS)1 50( AL)1 60( A)1 110( EE E)2 60(S SE)1 110 7 720 5568 t +10 B f +( d)1 0( rd)1 56( or)1 44( re ec co)3 138( dr)1 44(c cd)1 100 6 1080 5688 t +10 R f +(\(1\),)1462 5688 w +10 B f +( s)1 0( fs)1 39( of)1 33( so)1 50( is)1 39( ki)1 28(m mk)1 139 7 1636 5688 t +10 R f +(\(1\),)1964 5688 w +10 B f +( g)1 0( cg)1 50(s sc)1 83 3 2138 5688 t +10 R f +(\(7\),)2271 5688 w +10 B f +( bk k)2 56(f fb)1 89 2 2445 5688 t +10 R f +(\(7\),)2590 5688 w +10 B f +( d)1 0( md)1 56(r rc cm)2 171 3 2764 5688 t +10 R f +(\(3\),)2991 5688 w +10 B f +( h)1 0(s ss sh)2 134 2 3165 5688 t +10 R f +(\(1\).)3299 5688 w +9 B f +( S)1 0( TE ES)2 110( OT)1 60(N NO)1 135 4 720 5976 t +10 R f +( don't want to allow users to become root on your system,)11 2507(If you)1 257 2 1080 6096 t +10 B f +( d)1 0( cd)1 56( dc)1 44( ad)1 56(r re ea)2 138 5 3886 6096 t +10 R f +(may safely be installed suid)4 1178 1 4222 6096 t +( users or a group of users with no root privileges to use)12 2293(root. This allows all)3 827 2 1080 6216 t +10 B f +( d)1 0( cd)1 56( dc)1 44( ad)1 56( ea)1 50( Re)1 44( R)1 105( .)1 0( d.)1 25( cd)1 56( dc)1 44( ad)1 56(r re ea)2 138 13 4233 6216 t +10 R f +(in this case)2 460 1 4940 6216 t +(will only allow access to CD-ROM type drives- To give all user access to use)14 3213 1 1080 6336 t +10 B f +( ,)1 0( d,)1 25( cd)1 56( dc)1 44( ad)1 56(r re ea)2 138 6 4326 6336 t +10 R f +(enter:)4678 6336 w +(chown root /usr/local/bin/readcd)2 1314 1 1440 6504 t +(chmod 4711 /usr/local/bin/readcd)2 1359 1 1440 6624 t +(To give a restricted group of users access to)8 1815 1 1080 6792 t +10 B f +( d)1 0( cd)1 56( dc)1 44( ad)1 56(r re ea)2 138 5 2928 6792 t +10 R f +(enter:)3255 6792 w +(chown root /usr/local/bin/readcd)2 1314 1 1440 6960 t +(chgrp cdburners /usr/local/bin/readcd)2 1507 1 1440 7080 t +(chmod 4710 /usr/local/bin/readcd)2 1359 1 1440 7200 t +(J)720 7680 w +(. .)1 47 1 759 7625 t +( 5)1 1829( change: Version 3.0)3 850( Last)1 1434(org Schilling)1 528 4 759 7680 t +cleartomark +showpage +restore +%%EndPage: 5 5 +%%Page: 6 6 +save +mark +6 pagesetup +10 R f +(Schily)720 480 w +10 S1 f +(\302)976 480 w +10 R f +( \( 1 \))3 164( READCD)1 3277(s USER COMMANDS)2 950 3 1009 480 t +(and add a group)3 664 1 1080 960 t +10 I f +(cdburners)1777 960 w +10 R f +(on your system.)2 652 1 2215 960 t +( to the)2 284(Never give write permissions for non root users)7 2017 2 1080 1128 t +10 I f +(/dev/scg?)3423 1128 w +10 R f +(devices unless you would allow any-)5 1558 1 3842 1128 t +(body to read/write/format all your disks.)5 1655 1 1080 1248 t +( not connect old drives that do not support disconnect/reconnect to either the SCSI bus that)15 3843(You should)1 477 2 1080 1416 t +(is connected to the CD-Recorder or the source disk.)8 2129 1 1080 1536 t +(When using)1 498 1 1080 1704 t +10 B f +( d)1 0( cd)1 56( dc)1 44( ad)1 56(r re ea)2 138 5 1621 1704 t +10 R f +(with the)1 343 1 1958 1704 t +10 B f +( .)1 0( er r.)2 69( ve)1 44( iv)1 50( ri)1 28( dr)1 44( d)1 99( c)1 0( ic)1 44( er ri)2 72( ne)1 44( en)1 56( ge)1 44( g)1 93( I)1 0( SI)1 39( CS)1 56( SC)1 72( S)1 99( x)1 0( nu ux)2 106( in)1 56(L Li)1 95 23 2344 1704 t +10 R f +(You should note that)3 893 1 3597 1704 t +10 B f +( d)1 0( cd)1 56( dc)1 44( ad)1 56(r re ea)2 138 5 4534 1704 t +10 R f +(uses a layer,)2 528 1 4872 1704 t +( the drives of the local operating system.)7 1676(that tries to emulate the functionality of the scg driver on top of)12 2644 2 1080 1824 t +(Unfortunately, the sg driver on)4 1266 1 1080 1944 t +10 B f +( x)1 0( nu ux)2 106( in)1 56(L Li)1 95 4 2379 1944 t +10 R f +(has several \257aws:)2 720 1 2669 1944 t +( cannot see if a SCSI command could not be sent at all.)12 2302(\267 It)1 421 2 1080 2112 t +( cannot get the SCSI status byte.)6 1435(\267 It)1 421 2 1080 2280 t +10 B f +( d)1 0( cd)1 56( dc)1 44( ad)1 56( ea)1 50(R Re)1 116 6 2984 2280 t +10 R f +( SCSI com-)2 515(for that reason cannot report failing)5 1531 2 3354 2280 t +(mands in some situations.)3 1058 1 1440 2400 t +( count of transfer.)3 751( cannot get real DMA)4 922(\267 It)1 421 3 1080 2568 t +10 B f +( d)1 0( cd)1 56( dc)1 44( ad)1 56( ea)1 50(R Re)1 116 6 3213 2568 t +10 R f +(cannot tell you if there is an DMA residual)8 1826 1 3574 2568 t +(count.)1440 2688 w +( cannot get number of bytes valid in auto sense data.)10 2364(\267 It)1 421 2 1080 2856 t +10 B f +( d)1 0( cd)1 56( dc)1 44( ad)1 56( ea)1 50(R Re)1 116 6 3950 2856 t +10 R f +( you if device)3 630(cannot tell)1 446 2 4324 2856 t +(transfers no sense data at all.)5 1187 1 1440 2976 t +( fetches to few data in auto request sense \(CCS/SCSI-2/SCSI-3 needs)10 2855(\267 It)1 421 2 1080 3144 t +10 S1 f +(>)4389 3144 w +10 R f +(= 18\).)1 247 1 4445 3144 t +9 B f +( S)1 0( CS)1 50( IC)1 65( TI)1 35( ST)1 60( OS)1 50( NO)1 70( GN)1 65( AG)1 70( IA)1 65(D DI)1 100 11 720 3432 t +10 R f +(A typical error message for a SCSI command looks like:)9 2333 1 1080 3552 t +(readcd: I/O error. test unit ready: scsi sendcmd: no error)9 2311 1 1440 3792 t +( 20 00 00 00 00)5 665(CDB: 00)1 400 2 1440 3912 t +(status: 0x2 \(CHECK CONDITION\))3 1464 1 1440 4032 t +(Sense Bytes: 70 00 05 00 00 00 00 0A 00 00 00 00 25 00 00 00 00 00)19 2938 1 1440 4152 t +(Sense Key: 0x5 Illegal Request, Segment 0)6 1777 1 1440 4272 t +(Sense Code: 0x25 Qual 0x00 \(logical unit not supported\) Fru 0x0)10 2701 1 1440 4392 t +(Sense \257ags: Blk 0 \(not valid\))5 1204 1 1440 4512 t +(cmd \256nished after 0.002s timeout 40s)5 1545 1 1440 4632 t +( text after the \256rst colon gives)6 1265( The)1 225( of the command.)3 735(The \256rst line gives information about the transport)7 2095 4 1080 4872 t +( from the view of the kernel. It usually is:)9 1740(the error text for the system call)6 1335 2 1080 4992 t +10 B f +( r)1 0( or)1 44( er rr ro)3 138( e)1 78( O)1 0( /O)1 78(I I/)1 67 7 4222 4992 t +10 R f +(unless other prob-)2 739 1 4661 4992 t +( a short description for the SCSI command that fails. The rest of)12 2753(lems happen. The next words contain)5 1567 2 1080 5112 t +( if there were any problems for the transport of the command over the SCSI bus.)15 3361(the line tells you)3 697 2 1080 5232 t +10 B f +( l)1 0( al)1 28( ta)1 50( at)1 33(f fa)1 83 5 5206 5232 t +( r)1 0( or)1 44(e er rr ro)3 182 3 1080 5352 t +10 R f +( was not possible to transport the command \(i.e. no device present at the requested)14 3513(means that it)2 541 2 1346 5352 t +(SCSI address\).)1 602 1 1080 5472 t +(The second line prints the SCSI command descriptor block for the failed command.)12 3439 1 1080 5640 t +( transport of)2 522(The third line gives information on the SCSI status code returned by the command, if the)15 3798 2 1080 5808 t +(the command succeeds. This is error information from the SCSI device.)10 2948 1 1080 5928 t +(The fourth line is a hex dump of the auto request sense information for the command.)15 3537 1 1080 6096 t +( is only)2 313(The \256fth line is the error text for the sense key if available, followed by the segment number that)18 4007 2 1080 6264 t +(valid if the command was a)5 1191 1 1080 6384 t +10 I f +(copy)2314 6384 w +10 R f +( error message is not directly related to the current)9 2162(command. If the)2 693 2 2545 6384 t +(command, the text)2 757 1 1080 6504 t +10 I f +(deferred error)1 582 1 1870 6504 t +10 R f +(is appended.)1 507 1 2485 6504 t +( the type of the)4 651( If)1 137( the sense quali\256er if available.)5 1307(The sixth line is the error text for the sense code and)11 2225 4 1080 6672 t +(device is known, the sense data is decoded from tables in)10 2402 1 1080 6792 t +10 I f +(scsierrs.c)3519 6792 w +10 R f +( by the error)3 523( text is followed)3 683(. The)1 250 3 3944 6792 t +(value for a \256eld replaceable unit.)5 1353 1 1080 6912 t +( to the failed command and text for several error)9 2030(The seventh line prints the block number that is related)9 2290 2 1080 7080 t +(\257ags. The block number may not be valid.)7 1746 1 1080 7200 t +(J)720 7680 w +(. .)1 47 1 759 7625 t +( 6)1 1829( change: Version 3.0)3 850( Last)1 1434(org Schilling)1 528 4 759 7680 t +cleartomark +showpage +restore +%%EndPage: 6 6 +%%Page: 7 7 +save +mark +7 pagesetup +10 R f +(Schily)720 480 w +10 S1 f +(\302)976 480 w +10 R f +( \( 1 \))3 164( READCD)1 3277(s USER COMMANDS)2 950 3 1009 480 t +( set up for this command and the time that the command really needed)13 2940(The eight line reports the timeout)5 1380 2 1080 960 t +(to complete.)1 502 1 1080 1080 t +9 B f +( S)1 0( GS)1 50( UG)1 70(B BU)1 125 4 720 1368 t +( S)1 0( TS)1 50( IT)1 60( DI)1 35( ED)1 65(C CR RE)2 190 6 720 1488 t +( S)1 0( TS)1 50( ST)1 60( IS)1 50( LI)1 35( L)1 90( G)1 0( NG)1 70( IN)1 65( LI)1 35( IL)1 60( AI)1 35(M MA)1 150 13 720 1608 t +10 R f +( may join the developer mailing)5 1359(If you want to actively take part on the development of cdrecord, you)12 2961 2 1080 1728 t +(list via this URL:)3 717 1 1080 1848 t +10 B f +( s)1 0( er rs)2 83( pe)1 44( op)1 56( lo)1 50( el)1 28( ve)1 44( ev)1 50( de)1 44( -d)1 56( d-)1 33( rd)1 56( or)1 44( re ec co)3 138( dr)1 44( cd)1 56( /c)1 44( o/)1 28( fo)1 50( nf)1 33( in)1 56( ti)1 28( st)1 33( /l li is)3 95( n/)1 28( an)1 56( ma)1 50( il lm)2 111( ai)1 28( ma)1 50( /m)1 83( e/)1 28( de)1 44( .d)1 56( s.)1 25( os)1 39( li io)2 78( er rl)2 72( be)1 44( .b)1 56( s.)1 25( ts)1 39( st)1 33( // /l li is)4 123( :/)1 28( p:)1 33( tt tp)2 89(h ht)1 89 48 1080 2088 t +9 B f +( R)1 0( HO OR)2 135( TH)1 70(A AU UT)2 190 4 720 2376 t +10 R f +(J)1080 2496 w +(. .)1 47 1 1119 2441 t +(org Schilling)1 528 1 1119 2496 t +(Seestr. 110)1 452 1 1080 2616 t +(D-13353 Berlin)1 638 1 1080 2736 t +(Germany)1080 2856 w +(Additional information can be found on:)5 1658 1 1080 3024 t +(http://cdrecord.berlios.de/private/cdrecord.html)1080 3144 w +(If you have support questions, send them to:)7 1827 1 1080 3312 t +10 B f +( t)1 0( rt)1 33( or)1 44( up pp po)3 162( su)1 56( -s)1 39( d-)1 33( rd)1 56( or)1 44( re ec co)3 138( dr)1 44(c cd)1 100 12 1080 3480 t +10 S1 f +(@ @)1 92 1 1829 3480 t +10 B f +( e)1 0( de)1 44( .d)1 56( s.)1 25( os)1 39( li io)2 78( er rl)2 72(b be)1 100 8 1921 3480 t +10 R f +(If you have de\256nitely found a bug, send a mail to:)10 2075 1 1080 3648 t +10 B f +( s)1 0( er rs)2 83( pe)1 44( op)1 56( lo)1 50( el)1 28( ve)1 44( ev)1 50( de)1 44( -d)1 56( d-)1 33( rd)1 56( or)1 44( re ec co)3 138( dr)1 44(c cd)1 100 16 1080 3816 t +10 S1 f +(@ @)1 92 1 1950 3816 t +10 B f +( e)1 0( de)1 44( .d)1 56( s.)1 25( os)1 39( li io)2 78( er rl)2 72(b be)1 100 8 2042 3816 t +10 R f +(or)1080 3936 w +10 B f +( g)1 0( ng)1 50( il ll li in)4 140( hi)1 28( ch)1 56( sc)1 44( .s)1 39( g.)1 25( er rg)2 94( oe)1 44(j jo)1 83 11 1196 3936 t +10 S1 f +(@ @)1 92 1 1799 3936 t +10 B f +( e)1 0( de)1 44( .d)1 56( er r.)2 69( fe)1 44( of)1 33( un nh ho)3 162( au)1 56( ra)1 50( fr)1 44( .f)1 33( s.)1 25( ku us)2 95( ok)1 56(f fo)1 83 15 1891 3936 t +10 R f +(To subscribe, use:)2 740 1 1080 4104 t +10 B f +( s)1 0( er rs)2 83( pe)1 44( op)1 56( lo)1 50( el)1 28( ve)1 44( ev)1 50( de)1 44( -d)1 56( d-)1 33( rd)1 56( or)1 44( re ec co)3 138( dr)1 44( cd)1 56( /c)1 44( o/)1 28( fo)1 50( nf)1 33( in)1 56( ti)1 28( st)1 33( /l li is)3 95( n/)1 28( an)1 56( ma)1 50( il lm)2 111( ai)1 28( ma)1 50( /m)1 83( e/)1 28( de)1 44( .d)1 56( s.)1 25( os)1 39( li io)2 78( er rl)2 72( be)1 44( .b)1 56( s.)1 25( ts)1 39( st)1 33( // /l li is)4 123( :/)1 28( p:)1 33( tt tp)2 89(h ht)1 89 48 1080 4272 t +10 R f +(or)1080 4392 w +10 B f +( t)1 0( rt)1 33( or)1 44( up pp po)3 162( su)1 56( -s)1 39( d-)1 33( rd)1 56( or)1 44( re ec co)3 138( dr)1 44( cd)1 56( /c)1 44( o/)1 28( fo)1 50( nf)1 33( in)1 56( ti)1 28( st)1 33( /l li is)3 95( n/)1 28( an)1 56( ma)1 50( il lm)2 111( ai)1 28( ma)1 50( /m)1 83( e/)1 28( de)1 44( .d)1 56( s.)1 25( os)1 39( li io)2 78( er rl)2 72( be)1 44( .b)1 56( s.)1 25( ts)1 39( st)1 33( // /l li is)4 123( :/)1 28( p:)1 33( tt tp)2 89(h ht)1 89 44 1196 4392 t +9 B f +( Y)1 0( TY)1 65( IT)1 60( LI)1 35( IL)1 60( BI)1 35( AB)1 60( TA)1 65( ST)1 60( S)1 80( E)1 0( AC CE)2 125( FA)1 65( RF)1 55( TE ER)2 125( NT)1 60(I IN)1 100 17 720 4560 t +10 R f +(The interfaces provided by)3 1126 1 1080 4680 t +10 B f +( d)1 0( cd)1 56( dc)1 44( ad)1 56(r re ea)2 138 5 2249 4680 t +10 R f +( As)1 187(are designed for long term stability.)5 1516 2 2586 4680 t +10 B f +( d)1 0( cd)1 56( dc)1 44( ad)1 56(r re ea)2 138 5 4332 4680 t +10 R f +(depends on inter-)2 731 1 4669 4680 t +( of the interfaces offered by)5 1229(faces provided by the underlying operating system, the stability)8 2747 2 1080 4800 t +10 B f +( d)1 0( cd)1 56( dc)1 44( ad)1 56(r re ea)2 138 5 5106 4800 t +10 R f +( interfaces. Modi\256ed interfaces in the OS may enforce)8 2396(depends on the interface stability of the OS)7 1924 2 1080 4920 t +(modi\256ed interfaces in)2 887 1 1080 5040 t +10 B f +( d)1 0( cd)1 56( dc)1 44( ad)1 56(r re ea)2 138 5 2000 5040 t +10 R f +(.)2294 5040 w +(J)720 7680 w +(. .)1 47 1 759 7625 t +( 7)1 1829( change: Version 3.0)3 850( Last)1 1434(org Schilling)1 528 4 759 7680 t +cleartomark +showpage +restore +%%EndPage: 7 7 %%Trailer -end -%%EOF +done +%%DocumentFonts: Times-Roman Times-Bold Times-Italic Symbol +%%Pages: 7 diff -Nru cdrtools-2.01.01a33/doc/scgcheck.man cdrtools-3.02a09/doc/scgcheck.man --- cdrtools-2.01.01a33/doc/scgcheck.man 2002-12-24 15:56:55.000000000 +0000 +++ cdrtools-3.02a09/doc/scgcheck.man 2010-05-30 15:55:36.000000000 +0000 @@ -1,257 +1,396 @@ -SCGCHECK(1) Schily's USER COMMANDS SCGCHECK(1) + + + +Schily's USER COMMANDS SCGCHECK(1) NNAAMMEE - scgcheck - check and validate the ABI of libscg + scgcheck - check and validate the ABI of libscg SSYYNNOOPPSSIISS - ssccggcchheecckk [ _o_p_t_i_o_n_s ] + ssccggcchheecckk [ _o_p_t_i_o_n_s ] DDEESSCCRRIIPPTTIIOONN - SSccggcchheecckk is used to check and verify the Application - Binary Interface of libscg. + SSccggcchheecckk is used to check and verify the Application Binary + Interface of libscg. - The _d_e_v_i_c_e refers to _s_c_s_i_b_u_s/_t_a_r_g_e_t/_l_u_n of the drive. Com- - munication on _S_u_n_O_S is done with the SCSI general driver - ssccgg.. Other operating systems are using a library simula- - tion of this driver. Possible syntax is: ddeevv== _s_c_s_i_- - _b_u_s,_t_a_r_g_e_t,_l_u_n or ddeevv== _t_a_r_g_e_t,_l_u_n. In the latter case, - the drive has to be connected to the default SCSI bus of - the machine. _S_c_s_i_b_u_s, _t_a_r_g_e_t and _l_u_n are integer numbers. - Some operating systems or SCSI transport implementations - may require to specify a filename in addition. In this - case the correct syntax for the device is: ddeevv== _d_e_v_i_c_e_- - _n_a_m_e:_s_c_s_i_b_u_s,_t_a_r_g_e_t,_l_u_n or ddeevv== _d_e_v_i_c_e_n_a_m_e:_t_a_r_g_e_t,_l_u_n. If - the name of the device node that has been specified on - such a system refers to exactly one SCSI device, a short- - hand in the form ddeevv== _d_e_v_i_c_e_n_a_m_e:_@ or ddeevv== _d_e_v_i_c_e_- - _n_a_m_e:_@,_l_u_n may be used instead of ddeevv== _d_e_v_i_c_e_n_a_m_e:_s_c_s_i_- - _b_u_s,_t_a_r_g_e_t,_l_u_n. - - - To access remote SCSI devices, you need to prepend the - SCSI device name by a remote device indicator. The remote - device indicator is either RREEMMOOTTEE::_u_s_e_r_@_h_o_s_t_: or - RREEMMOOTTEE::_h_o_s_t_: - A valid remote SCSI device name may be: RREEMMOOTTEE::_u_s_e_r_@_h_o_s_t_: - to allow remote SCSI bus scanning or - RREEMMOOTTEE::_u_s_e_r_@_h_o_s_t_:_1_,_0_,_0 to access the SCSI device at _h_o_s_t - connected to SCSI bus # 1,target 0 lun 0. - - - To make rreeaaddccdd portable to all UNIX platforms, the syntax - ddeevv== _d_e_v_i_c_e_n_a_m_e:_s_c_s_i_b_u_s,_t_a_r_g_e_t,_l_u_n is preferred as is - hides OS specific knowledge about device names from the - user. A specific OS must not necessarily support a way to - specify a real device file name nor a way to specify _s_c_s_i_- - _b_u_s,_t_a_r_g_e_t,_l_u_n. - - - _S_c_s_i_b_u_s 0 is the default SCSI bus on the machine. Watch - the boot messages for more information or look into - //vvaarr//aaddmm//mmeessssaaggeess for more information about the SCSI con- - figuration of your machine. If you have problems to fig- - ure out what values for _s_c_s_i_b_u_s,_t_a_r_g_e_t,_l_u_n should be used, - try the --ssccaannbbuuss option of ccddrreeccoorrdd. + DDeevviiccee nnaammiinngg + Most users do not need to care about device naming at all, + as in -aauuttoo mode, ssccggcchheecckk implements aauuttoo ttaarrggeett support + and automagically finds a test drive in case that exactly + one CD-ROM type drive is available in the system. OOPPTTIIOONNSS - --vveerrssiioonn - Print version information and exit. + -vveerrssiioonn + Print version information and exit. + + -aauuttoo + Instead of asking to confirm each test before runing + it, ssccggcchheecckk tries to do a fully automated test. + + ddeevv==_t_a_r_g_e_t + Set the SCSI target for the device, see notes above. A + typical target device specification is ddeevv==_1,_6,_0 . If + a filename must be provided together with the numerical + target specification, the filename is implementation + specific. The correct filename in this case can be + found in the system specific manuals of the target + operating system. On a _F_r_e_e_B_S_D system without _C_A_M sup- + port, you need to use the control device (e.g. + /_d_e_v/_r_c_d_0._c_t_l). A correct device specification in this + case may be ddeevv==/_d_e_v/_r_c_d_0._c_t_l:@ . + + GGeenneerraall SSCCSSII aaddddrreessssiinngg + The _t_a_r_g_e_t _d_e_v_i_c_e to the ddeevv== option refers to + _s_c_s_i_b_u_s/_t_a_r_g_e_t/_l_u_n of the device. Communication on + _S_u_n_O_S is done with the SCSI general driver ssccgg.. Other + operating systems are using a library simulation of + this driver. Possible syntax is: ddeevv== + _s_c_s_i_b_u_s,_t_a_r_g_e_t,_l_u_n or ddeevv== _t_a_r_g_e_t,_l_u_n. In the latter + case, the device has to be connected to the default + SCSI bus of the machine. _S_c_s_i_b_u_s, _t_a_r_g_e_t and _l_u_n are + integer numbers. Some operating systems or SCSI tran- + sport implementations may require to specify a filename + in addition. In this case the correct syntax for the + device is: ddeevv== _d_e_v_i_c_e_n_a_m_e:_s_c_s_i_b_u_s,_t_a_r_g_e_t, or ddeevv== + + + +Joerg Schilling Last change: Version 3.0 1 + + + + + + +Schily's USER COMMANDS SCGCHECK(1) + + + + _d_e_v_i_c_e_n_a_m_e:_t_a_r_g_e_t,_l_u_n. If the name of the device node + that has been specified on such a system refers to + exactly one SCSI device, a shorthand in the form ddeevv== + _d_e_v_i_c_e_n_a_m_e:@ or ddeevv== _d_e_v_i_c_e_n_a_m_e:@,_l_u_n may be used + instead of ddeevv== _d_e_v_i_c_e_n_a_m_e:_s_c_s_i_b_u_s,_t_a_r_g_e_t, + + RReemmoottee SSCCSSII aaddddrreessssiinngg + To access remote SCSI devices, you need to prepend the + SCSI device name by a remote device indicator. The + remote device indicator is either RREEMMOOTTEE::_u_s_e_r@_h_o_s_t: or + RREEMMOOTTEE::_h_o_s_t: A valid remote SCSI device name may be: + RREEMMOOTTEE::_u_s_e_r@_h_o_s_t: to allow remote SCSI bus scanning or + RREEMMOOTTEE::_u_s_e_r@_h_o_s_t:_1,_0,_0 to access the SCSI device at + _h_o_s_t connected to SCSI bus # 1,target 0, lun 0. In + order to allow remote access to a specific _h_o_s_t, the + rrssccssii(1) program needs to be present and configured on + the _h_o_s_t. + + AAlltteerrnnaattee SSCCSSII ttrraannssppoorrttss + AATTAAPPII drives are just SSCCSSII drives that inherently use + the _A_T_A _p_a_c_k_e_t _i_n_t_e_r_f_a_c_e as SSCCSSII command transport + layer build into the IDE (ATA) transport. You may need + to specify an alternate transport layer on the command + line if your OS does not implement a fully integrated + kernel driver subsystem that allows to access any drive + using SSCCSSII commands via a single unique user interface. + + To access SCSI devices via alternate transport layers, + you need to prepend the SCSI device name by a transport + layer indicator. The transport layer indicator may be + something like UUSSCCSSII:: or AATTAAPPII::. To get a list of sup- + ported transport layers for your platform, use ddeevv== + _H_E_L_P: + + PPoorrttaabbiilliittyy BBaacckkggrroouunndd + To make ssccggcchheecckk portable to all UNIX platforms, the + syntax ddeevv== _d_e_v_i_c_e_n_a_m_e:_s_c_s_i_b_u_s,_t_a_r_g_e_t, is preferred as + it hides OS specific knowledge about device names from + the user. A specific OS may not necessarily support a + way to specify a real device file name nor a way to + specify _s_c_s_i_b_u_s,_t_a_r_g_e_t,_l_u_n. + + _S_c_s_i_b_u_s 0 is the default SCSI bus on the machine. Watch + the boot messages for more information or look into + //vvaarr//aaddmm//mmeessssaaggeess for more information about the SCSI + configuration of your machine. If you have problems to + figure out what values for _s_c_s_i_b_u_s,_t_a_r_g_e_t,_l_u_n should be + used, try the -ssccaannbbuuss option of ssccggcchheecckk described + below. + + AAuuttoottaarrggeett MMooddee + If no ddeevv== option is present, or if it only contains a + + + +Joerg Schilling Last change: Version 3.0 2 + + + + + + +Schily's USER COMMANDS SCGCHECK(1) + + - ddeevv==_t_a_r_g_e_t - Sets the SCSI target default for SCSI Bus scanning - test, see notes above. This allows e.g. to specify - to use Solaris USCSI or remote SCSI for the bus - scanning case. - - For the non bus scanning case, a typical device - specification is ddeevv==_6_,_0 . If a filename must be - provided together with the numerical target speci- - fication, the filename is implementation specific. - The correct filename in this case can be found in - the system specific manuals of the target operating - system. On a _F_r_e_e_B_S_D system without _C_A_M support, - you need to use the control device (e.g. - _/_d_e_v_/_r_c_d_0_._c_t_l). A correct device specification in - this case may be ddeevv==_/_d_e_v_/_r_c_d_0_._c_t_l_:_@ . - - On Linux, drives connected to a parallel port - adapter are mapped to a virtual SCSI bus. Different - adapters are mapped to different targets on this - virtual SCSI bus. - - If no _d_e_v option is present, ccddrreeccoorrdd will try to - get the device from the CCDDRR__DDEEVVIICCEE environment. - - If the argument to the ddeevv== option does not contain - the characters ',', '/', '@' or ':', it is inter- - preted as an label name that may be found in the - file /etc/default/cdrecord (see FILES section). - - ttiimmeeoouutt==_# - Set the default SCSI command timeout value to _# - seconds. The default SCSI command timeout is the - minimum timeout used for sending SCSI commands. If - a SCSI command fails due to a timeout, you may try - to raise the default SCSI command timeout above the - timeout value of the failed command. If the com- - mand runs correctly with a raised command timeout, - please report the better timeout value and the cor- - responding command to the author of the program. - If no _t_i_m_e_o_u_t option is present, a default timeout - of 40 seconds is used. - - ddeebbuugg==_#_, --dd - Set the misc debug value to # (with debug=#) or - increment the misc debug level by one (with -d). If - you specify _-_d_d_, this equals to ddeebbuugg==_2_. This may - help to find problems while opening a driver for - libscg. as well as with sector sizes and sector - types. Using --ddeebbuugg slows down the process and may - be the reason for a buffer underrun. - - kkddeebbuugg==#, kkdd==# - Tell the ssccgg-driver to modify the kernel debug - value while SCSI commands are running. - - --ssiilleenntt, --ss - Do not print out a status report for failed SCSI - commands. - - --vv Increment the level of general verbosity by one. - This is used e.g. to display the progress of the - process. - - --VV Increment the verbose level with respect of SCSI - command transport by one. This helps to debug - problems during the process, that occur in the CD- - Recorder. If you get incomprehensible error - messages you should use this flag to get more - detailed output. --VVVV will show data buffer content - in addition. Using --VV or --VVVV slows down the pro- - cess. + transport specifyer but no address notation, ssccggcchheecckk + tries to scan the SCSI address space for CD-ROM drives. + If exactly one is found, this is used by default. - ff==_f_i_l_e Specify the log file to be used instead of - _c_h_e_c_k_._l_o_g. + ttiimmeeoouutt==# + Set the default SCSI command timeout value to # + seconds. The default SCSI command timeout is the + minimum timeout used for sending SCSI commands. If a + SCSI command fails due to a timeout, you may try to + raise the default SCSI command timeout above the + timeout value of the failed command. If the command + runs correctly with a raised command timeout, please + report the better timeout value and the corresponding + command to the author of the program. If no _t_i_m_e_o_u_t + option is present, a default timeout of 40 seconds is + used. + + ddeebbuugg==#, -dd + Set the misc debug value to # (with debug=#) or incre- + ment the misc debug level by one (with -d). If you + specify -_d_d, this equals to ddeebbuugg==_2. This may help to + find problems while opening a driver for libscg. as + well as with sector sizes and sector types. Using + -ddeebbuugg slows down the process and may be the reason for + a buffer underrun. + + kkddeebbuugg==#, kkdd==# + Tell the ssccgg-driver to modify the kernel debug value + while SCSI commands are running. + + -ssiilleenntt, -ss + Do not print out a status report for failed SCSI com- + mands. + + -vv Increment the level of general verbosity by one. This + is used e.g. to display the progress of the process. + + -VV Increment the verbose level with respect of SCSI com- + mand transport by one. This helps to debug problems + during the process, that occur in the CD-Recorder. If + you get incomprehensible error messages you should use + this flag to get more detailed output. -VVVV will show + data buffer content in addition. Using -VV or -VVVV slows + down the process. + + ff==_f_i_l_e + Specify the log file to be used instead of _c_h_e_c_k._l_o_g. EEXXAAMMPPLLEESS FFIILLEESS + + + + +Joerg Schilling Last change: Version 3.0 3 + + + + + + +Schily's USER COMMANDS SCGCHECK(1) + + + SSEEEE AALLSSOO - ccddrreeccoorrdd(1), rreeaaddccdd(1), mmkkiissooffss(1), ssccgg(7). + ccddrreeccoorrdd(1), rreeaaddccdd(1), mmkkiissooffss(1), ssccgg(7). NNOOTTEESS - When using ssccggcckkeecckk with the broken LLiinnuuxx SSCCSSII ggeenneerriicc - ddrriivveerr.. You should note that ssccggcchheecckk uses a hack, that - tries to emulate the functionality of the scg driver. - Unfortunately, the sg driver on LLiinnuuxx has several severe - bugs: - - +o It cannot see if a SCSI command could not be sent - at all. - - +o It cannot get the SCSI status byte. SSccggcchheecckk for - that reason cannot report failing SCSI commands in - some situations. - - +o It cannot get real DMA count of transfer. SSccggcchheecckk - cannot tell you if there is an DMA residual count. - - +o It cannot get number of bytes valid in auto sense - data. SSccggcchheecckk cannot tell you if device transfers - no sense data at all. + When using ssccggcckkeecckk with the broken LLiinnuuxx SSCCSSII ggeenneerriicc + ddrriivveerr.. You should note that ssccggcchheecckk uses a hack, that + tries to emulate the functionality of the scg driver. + Unfortunately, the sg driver on LLiinnuuxx has several severe + bugs: + + +o It cannot see if a SCSI command could not be sent at + all. + + +o It cannot get the SCSI status byte. SSccggcchheecckk for that + reason cannot report failing SCSI commands in some + situations. + + +o It cannot get real DMA count of transfer. SSccggcchheecckk can- + not tell you if there is an DMA residual count. + + +o It cannot get number of bytes valid in auto sense data. + SSccggcchheecckk cannot tell you if device transfers no sense + data at all. - +o It fetches to few data in auto request sense - (CCS/SCSI-2/SCSI-3 needs >= 18). + +o It fetches to few data in auto request sense + (CCS/SCSI-2/SCSI-3 needs >= 18). DDIIAAGGNNOOSSTTIICCSS - A typical error message for a SCSI command looks like: + A typical error message for a SCSI command looks like: + + scgcheck: I/O error. test unit ready: scsi sendcmd: no error + CDB: 00 20 00 00 00 00 + status: 0x2 (CHECK CONDITION) + Sense Bytes: 70 00 05 00 00 00 00 0A 00 00 00 00 25 00 00 00 00 00 + Sense Key: 0x5 Illegal Request, Segment 0 + Sense Code: 0x25 Qual 0x00 (logical unit not supported) Fru 0x0 + Sense flags: Blk 0 (not valid) + cmd finished after 0.002s timeout 40s + + The first line gives information about the transport of the + command. The text after the first colon gives the error + text for the system call from the view of the kernel. It + usually is: II//OO eerrrroorr unless other problems happen. The + next words contain a short description for the SCSI command + that fails. The rest of the line tells you if there were any + problems for the transport of the command over the SCSI bus. + ffaattaall eerrrroorr means that it was not possible to transport the + command (i.e. no device present at the requested SCSI + address). + + + + +Joerg Schilling Last change: Version 3.0 4 + + + + + + +Schily's USER COMMANDS SCGCHECK(1) + + + + The second line prints the SCSI command descriptor block for + the failed command. - readcd: I/O error. test unit ready: scsi sendcmd: no error - CDB: 00 20 00 00 00 00 - status: 0x2 (CHECK CONDITION) - Sense Bytes: 70 00 05 00 00 00 00 0A 00 00 00 00 25 00 00 00 00 00 - Sense Key: 0x5 Illegal Request, Segment 0 - Sense Code: 0x25 Qual 0x00 (logical unit not supported) Fru 0x0 - Sense flags: Blk 0 (not valid) - cmd finished after 0.002s timeout 40s - - The first line gives information about the transport of - the command. The text after the first colon gives the - error text for the system call from the view of the ker- - nel. It usually is: II//OO eerrrroorr unless other problems hap- - pen. The next words contain a short description for the - SCSI command that fails. The rest of the line tells you if - there were any problems for the transport of the command - over the SCSI bus. ffaattaall eerrrroorr means that it was not pos- - sible to transport the command (i.e. no device present at - the requested SCSI address). - - The second line prints the SCSI command descriptor block - for the failed command. - - The third line gives information on the SCSI status code - returned by the command, if the transport of the command - succeeds. This is error information from the SCSI device. - - The fourth line is a hex dump of the auto request sense - information for the command. - - The fifth line is the error text for the sense key if - available, followed by the segment number that is only - valid if the command was a _c_o_p_y command. If the error mes- - sage is not directly related to the current command, the - text _d_e_f_e_r_r_e_d _e_r_r_o_r is appended. - - The sixth line is the error text for the sense code and - the sense qualifier if available. If the type of the - device is known, the sense data is decoded from tables in - _s_c_s_i_e_r_r_s_._c . The text is followed by the error value for - a field replaceable unit. - - The seventh line prints the block number that is related - to the failed command and text for several error flags. - The block number may not be valid. + The third line gives information on the SCSI status code + returned by the command, if the transport of the command + succeeds. This is error information from the SCSI device. - The eight line reports the timeout set up for this command - and the time that the command realy needed to complete. + The fourth line is a hex dump of the auto request sense + information for the command. + + The fifth line is the error text for the sense key if avail- + able, followed by the segment number that is only valid if + the command was a _c_o_p_y command. If the error message is not + directly related to the current command, the text _d_e_f_e_r_r_e_d + _e_r_r_o_r is appended. + + The sixth line is the error text for the sense code and the + sense qualifier if available. If the type of the device is + known, the sense data is decoded from tables in _s_c_s_i_e_r_r_s._c . + The text is followed by the error value for a field replace- + able unit. + + The seventh line prints the block number that is related to + the failed command and text for several error flags. The + block number may not be valid. + + The eight line reports the timeout set up for this command + and the time that the command realy needed to complete. BBUUGGSS CCRREEDDIITTSS MMAAIILLIINNGG LLIISSTTSS AAUUTTHHOORR - Joerg Schilling - Seestr. 110 - D-13353 Berlin - Germany + Joerg Schilling + Seestr. 110 + D-13353 Berlin + Germany + + Additional information can be found on: + http://cdrecord.berlios.de/private/cdrecord.html + + If you have support questions, send them to: + + ccddrreeccoorrdd--ssuuppppoorrtt@@bbeerrlliiooss..ddee + + If you have definitely found a bug, send a mail to: + + ccddrreeccoorrdd--ddeevveellooppeerrss@@bbeerrlliiooss..ddee + or jjooeerrgg..sscchhiilllliinngg@@ffookkuuss..ffrraauunnhhooffeerr..ddee + + + + + +Joerg Schilling Last change: Version 3.0 5 + + + + + + +Schily's USER COMMANDS SCGCHECK(1) + + + + To subscribe, use: + + hhttttpp::////lliissttss..bbeerrlliiooss..ddee//mmaaiillmmaann//lliissttiinnffoo//ccddrreeccoorrdd--ddeevveellooppeerrss + or hhttttpp::////lliissttss..bbeerrlliiooss..ddee//mmaaiillmmaann//lliissttiinnffoo//ccddrreeccoorrdd--ssuuppppoorrtt + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - Additional information can be found on: - http://www.fokus.fhg.de/usr/schilling/cdrecord.html - If you have support questions, send them to: - ccddrreeccoorrdd--ssuuppppoorrtt@@bbeerrlliiooss..ddee - or ootthheerr--ccddwwrriittee@@lliissttss..ddeebbiiaann..oorrgg - Of you have definitely found a bug, send a mail to: - ccddrreeccoorrdd--ddeevveellooppeerrss@@bbeerrlliiooss..ddee - or sscchhiilllliinngg@@ffookkuuss..ffhhgg..ddee - To subscribe, use: - hhttttpp::////lliissttss..bbeerrlliiooss..ddee//mmaaiillmmaann//lliissttiinnffoo//ccddrreeccoorrdd--ddeevveelloopp-- - eerrss - or hhttttpp::////lliissttss..bbeerrlliiooss..ddee//mmaaiillmmaann//lliissttiinnffoo//ccddrreeccoorrdd--ssuupp-- - ppoorrtt +Joerg Schilling Last change: Version 3.0 6 -Joerg Schilling Version 2.0 SCGCHECK(1) diff -Nru cdrtools-2.01.01a33/doc/scgcheck.ps cdrtools-3.02a09/doc/scgcheck.ps --- cdrtools-2.01.01a33/doc/scgcheck.ps 2002-12-24 15:57:15.000000000 +0000 +++ cdrtools-3.02a09/doc/scgcheck.ps 2010-05-30 15:55:55.000000000 +0000 @@ -1,479 +1,1037 @@ -%!PS-Adobe-3.0 -%%Creator: groff version 1.17.2 -%%CreationDate: Tue Dec 24 17:03:44 2002 -%%DocumentNeededResources: font Times-Roman -%%+ font Times-Bold -%%+ font Times-Italic -%%DocumentSuppliedResources: procset grops 1.17 2 -%%Pages: 3 -%%PageOrder: Ascend -%%Orientation: Portrait +%!PS +%%Version: 3.15 +%%DocumentFonts: (atend) +%%Pages: (atend) %%EndComments -%%BeginProlog -%%BeginResource: procset grops 1.17 2 -/setpacking where{ -pop -currentpacking -true setpacking -}if -/grops 120 dict dup begin -/SC 32 def -/A/show load def -/B{0 SC 3 -1 roll widthshow}bind def -/C{0 exch ashow}bind def -/D{0 exch 0 SC 5 2 roll awidthshow}bind def -/E{0 rmoveto show}bind def -/F{0 rmoveto 0 SC 3 -1 roll widthshow}bind def -/G{0 rmoveto 0 exch ashow}bind def -/H{0 rmoveto 0 exch 0 SC 5 2 roll awidthshow}bind def -/I{0 exch rmoveto show}bind def -/J{0 exch rmoveto 0 SC 3 -1 roll widthshow}bind def -/K{0 exch rmoveto 0 exch ashow}bind def -/L{0 exch rmoveto 0 exch 0 SC 5 2 roll awidthshow}bind def -/M{rmoveto show}bind def -/N{rmoveto 0 SC 3 -1 roll widthshow}bind def -/O{rmoveto 0 exch ashow}bind def -/P{rmoveto 0 exch 0 SC 5 2 roll awidthshow}bind def -/Q{moveto show}bind def -/R{moveto 0 SC 3 -1 roll widthshow}bind def -/S{moveto 0 exch ashow}bind def -/T{moveto 0 exch 0 SC 5 2 roll awidthshow}bind def -/SF{ -findfont exch -[exch dup 0 exch 0 exch neg 0 0]makefont -dup setfont -[exch/setfont cvx]cvx bind def -}bind def -/MF{ -findfont -[5 2 roll -0 3 1 roll -neg 0 0]makefont -dup setfont -[exch/setfont cvx]cvx bind def -}bind def -/level0 0 def -/RES 0 def -/PL 0 def -/LS 0 def -/MANUAL{ -statusdict begin/manualfeed true store end -}bind def -/PLG{ -gsave newpath clippath pathbbox grestore -exch pop add exch pop -}bind def -/BP{ -/level0 save def -1 setlinecap -1 setlinejoin -72 RES div dup scale -LS{ -90 rotate -}{ -0 PL translate -}ifelse -1 -1 scale -}bind def -/EP{ -level0 restore -showpage -}bind def -/DA{ -newpath arcn stroke -}bind def -/SN{ -transform -.25 sub exch .25 sub exch -round .25 add exch round .25 add exch -itransform -}bind def -/DL{ -SN -moveto -SN -lineto stroke -}bind def -/DC{ -newpath 0 360 arc closepath -}bind def -/TM matrix def -/DE{ -TM currentmatrix pop -translate scale newpath 0 0 .5 0 360 arc closepath -TM setmatrix -}bind def -/RC/rcurveto load def -/RL/rlineto load def -/ST/stroke load def -/MT/moveto load def -/CL/closepath load def -/FL{ -currentgray exch setgray fill setgray -}bind def -/BL/fill load def -/LW/setlinewidth load def -/RE{ -findfont -dup maxlength 1 index/FontName known not{1 add}if dict begin -{ -1 index/FID ne{def}{pop pop}ifelse -}forall -/Encoding exch def -dup/FontName exch def -currentdict end definefont pop -}bind def -/DEFS 0 def -/EBEGIN{ -moveto -DEFS begin -}bind def -/EEND/end load def -/CNT 0 def -/level1 0 def -/PBEGIN{ -/level1 save def -translate -div 3 1 roll div exch scale -neg exch neg exch translate -0 setgray -0 setlinecap -1 setlinewidth -0 setlinejoin -10 setmiterlimit -[]0 setdash -/setstrokeadjust where{ -pop -false setstrokeadjust -}if -/setoverprint where{ -pop -false setoverprint -}if -newpath -/CNT countdictstack def -userdict begin -/showpage{}def -}bind def -/PEND{ -clear -countdictstack CNT sub{end}repeat -level1 restore -}bind def -end def -/setpacking where{ -pop -setpacking -}if -%%EndResource -%%IncludeResource: font Times-Roman -%%IncludeResource: font Times-Bold -%%IncludeResource: font Times-Italic -grops begin/DEFS 1 dict def DEFS begin/u{.001 mul}bind def end/RES 72 -def/PL 841.89 def/LS false def/ENC0[/asciicircum/asciitilde/Scaron -/Zcaron/scaron/zcaron/Ydieresis/trademark/quotesingle/.notdef/.notdef -/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef -/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef -/.notdef/.notdef/.notdef/space/exclam/quotedbl/numbersign/dollar/percent -/ampersand/quoteright/parenleft/parenright/asterisk/plus/comma/hyphen -/period/slash/zero/one/two/three/four/five/six/seven/eight/nine/colon -/semicolon/less/equal/greater/question/at/A/B/C/D/E/F/G/H/I/J/K/L/M/N/O -/P/Q/R/S/T/U/V/W/X/Y/Z/bracketleft/backslash/bracketright/circumflex -/underscore/quoteleft/a/b/c/d/e/f/g/h/i/j/k/l/m/n/o/p/q/r/s/t/u/v/w/x/y -/z/braceleft/bar/braceright/tilde/.notdef/quotesinglbase/guillemotleft -/guillemotright/bullet/florin/fraction/perthousand/dagger/daggerdbl -/endash/emdash/ff/fi/fl/ffi/ffl/dotlessi/dotlessj/grave/hungarumlaut -/dotaccent/breve/caron/ring/ogonek/quotedblleft/quotedblright/oe/lslash -/quotedblbase/OE/Lslash/.notdef/exclamdown/cent/sterling/currency/yen -/brokenbar/section/dieresis/copyright/ordfeminine/guilsinglleft -/logicalnot/minus/registered/macron/degree/plusminus/twosuperior -/threesuperior/acute/mu/paragraph/periodcentered/cedilla/onesuperior -/ordmasculine/guilsinglright/onequarter/onehalf/threequarters -/questiondown/Agrave/Aacute/Acircumflex/Atilde/Adieresis/Aring/AE -/Ccedilla/Egrave/Eacute/Ecircumflex/Edieresis/Igrave/Iacute/Icircumflex -/Idieresis/Eth/Ntilde/Ograve/Oacute/Ocircumflex/Otilde/Odieresis -/multiply/Oslash/Ugrave/Uacute/Ucircumflex/Udieresis/Yacute/Thorn -/germandbls/agrave/aacute/acircumflex/atilde/adieresis/aring/ae/ccedilla -/egrave/eacute/ecircumflex/edieresis/igrave/iacute/icircumflex/idieresis -/eth/ntilde/ograve/oacute/ocircumflex/otilde/odieresis/divide/oslash -/ugrave/uacute/ucircumflex/udieresis/yacute/thorn/ydieresis]def -/Times-Italic@0 ENC0/Times-Italic RE/Times-Bold@0 ENC0/Times-Bold RE -/Times-Roman@0 ENC0/Times-Roman RE +% +% Copyright 2005 Sun Microsystems, Inc. All rights reserved. +% Use is subject to license terms. +% +% CDDL HEADER START +% +% The contents of this file are subject to the terms of the +% Common Development and Distribution License, Version 1.0 only +% (the "License"). You may not use this file except in compliance +% with the License. +% +% You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE +% or http://www.opensolaris.org/os/licensing. +% See the License for the specific language governing permissions +% and limitations under the License. +% +% When distributing Covered Code, include this CDDL HEADER in each +% file and include the License file at usr/src/OPENSOLARIS.LICENSE. +% If applicable, add the following below this CDDL HEADER, with the +% fields enclosed by brackets "[]" replaced with your own identifying +% information: Portions Copyright [yyyy] [name of copyright owner] +% +% CDDL HEADER END +% +%ident "%Z%%M% %I% %E% SMI" +% +% Version 3.16 prologue for troff files. +% + +/#copies 1 store +/aspectratio 1 def +/formsperpage 1 def +/landscape false def +/linewidth .3 def +/magnification 1 def +/margin 0 def +/orientation 0 def +/resolution 720 def +/xoffset 0 def +/yoffset 0 def + +/roundpage true def +/useclippath true def +/pagebbox [0 0 612 792] def + +/R /Times-Roman def +/I /Times-Italic def +/B /Times-Bold def +/BI /Times-BoldItalic def +/H /Helvetica def +/HI /Helvetica-Oblique def +/HB /Helvetica-Bold def +/HX /Helvetica-BoldOblique def +/CW /Courier def +/CO /Courier def +/CI /Courier-Oblique def +/CB /Courier-Bold def +/CX /Courier-BoldOblique def +/PA /Palatino-Roman def +/PI /Palatino-Italic def +/PB /Palatino-Bold def +/PX /Palatino-BoldItalic def +/Hr /Helvetica-Narrow def +/Hi /Helvetica-Narrow-Oblique def +/Hb /Helvetica-Narrow-Bold def +/Hx /Helvetica-Narrow-BoldOblique def +/KR /Bookman-Light def +/KI /Bookman-LightItalic def +/KB /Bookman-Demi def +/KX /Bookman-DemiItalic def +/AR /AvantGarde-Book def +/AI /AvantGarde-BookOblique def +/AB /AvantGarde-Demi def +/AX /AvantGarde-DemiOblique def +/NR /NewCenturySchlbk-Roman def +/NI /NewCenturySchlbk-Italic def +/NB /NewCenturySchlbk-Bold def +/NX /NewCenturySchlbk-BoldItalic def +/ZD /ZapfDingbats def +/ZI /ZapfChancery-MediumItalic def +/VR /Varitimes#Roman def +/VI /Varitimes#Italic def +/VB /Varitimes#Bold def +/VX /Varitimes#BoldItalic def +/S /S def +/S1 /S1 def +/GR /Symbol def + +/inch {72 mul} bind def +/min {2 copy gt {exch} if pop} bind def + +/setup { + counttomark 2 idiv {def} repeat pop + + landscape {/orientation 90 orientation add def} if + /scaling 72 resolution div def + linewidth setlinewidth + 1 setlinecap + + pagedimensions + xcenter ycenter translate + orientation neg rotate + width 2 div neg height 2 div translate + xoffset inch yoffset inch translate + margin 2 div dup neg translate + magnification dup aspectratio mul scale + scaling scaling scale + + /Symbol /S Sdefs cf + /Times-Roman /S1 S1defs cf + 0 0 moveto +} def + +/pagedimensions { + useclippath userdict /gotpagebbox known not and { + /pagebbox [clippath pathbbox newpath] def + roundpage currentdict /roundpagebbox known and {roundpagebbox} if + } if + pagebbox aload pop + 4 -1 roll exch 4 1 roll 4 copy + landscape {4 2 roll} if + sub /width exch def + sub /height exch def + add 2 div /xcenter exch def + add 2 div /ycenter exch def + userdict /gotpagebbox true put +} def + +/pagesetup { + /page exch def + currentdict /pagedict known currentdict page known and { + page load pagedict exch get cvx exec + } if +} def + +/decodingdefs [ + {counttomark 2 idiv {y moveto show} repeat} + {neg /y exch def counttomark 2 idiv {y moveto show} repeat} + {neg moveto {2 index stringwidth pop sub exch div 0 32 4 -1 roll widthshow} repeat} + {neg moveto {spacewidth sub 0.0 32 4 -1 roll widthshow} repeat} + {counttomark 2 idiv {y moveto show} repeat} + {neg setfunnytext} +] def + +/setdecoding {/t decodingdefs 3 -1 roll get bind def} bind def + +/w {neg moveto show} bind def +/m {neg dup /y exch def moveto} bind def +/done {/lastpage where {pop lastpage} if} def + +/f { + dup /font exch def findfont exch + dup /ptsize exch def scaling div dup /size exch def scalefont setfont + linewidth ptsize mul scaling 10 mul div setlinewidth + /spacewidth ( ) stringwidth pop def +} bind def + +/changefont { + /fontheight exch def + /fontslant exch def + currentfont [ + 1 0 + fontheight ptsize div fontslant sin mul fontslant cos div + fontheight ptsize div + 0 0 + ] makefont setfont +} bind def + +/sf {f} bind def + +/cf { + dup length 2 idiv + /entries exch def + /chtab exch def + /newfont exch def + + findfont dup length 1 add dict + /newdict exch def + {1 index /FID ne {newdict 3 1 roll put} {pop pop} ifelse} forall + + newdict /Metrics entries dict put + newdict /Metrics get + begin + chtab aload pop + 1 1 entries {pop def} for + newfont newdict definefont pop + end +} bind def + +% +% A few arrays used to adjust reference points and character widths in some +% of the printer resident fonts. If square roots are too high try changing +% the lines describing /radical and /radicalex to, +% +% /radical [0 -75 550 0] +% /radicalex [-50 -75 500 0] +% + +/Sdefs [ + /bracketlefttp [220 500] + /bracketleftbt [220 500] + /bracketrighttp [-70 380] + /bracketrightbt [-70 380] + /braceleftbt [220 490] + /bracketrightex [220 -125 500 0] + /radical [0 0 550 0] + % NeWSprint's \(br is too low, compensate + statusdict /product get (NeWS Server) eq { + /radicalex [-50 100 500 0] + /parenleftex [-20 100 0 0] + + } { + /radicalex [-50 0 500 0] + /parenleftex [-20 -170 0 0] + } ifelse + /integral [100 -50 500 0] + /infinity [10 -75 730 0] +] def + +/S1defs [ + /underscore [0 80 500 0] + /endash [7 90 650 0] +] def %%EndProlog +%%BeginSetup +mark +/resolution 720 def +setup +2 setdecoding +%%EndSetup %%Page: 1 1 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF 105.385(SCGCHECK\(1\) Schily\264s)72 48 R -(USER COMMANDS)2.5 E(SCGCHECK\(1\))107.885 E/F1 10.95/Times-Bold@0 SF --.219(NA)72 84 S(ME).219 E F0(scgcheck \255 check and v)108 96 Q -(alidate the ABI of libscg)-.25 E F1(SYNOPSIS)72 112.8 Q/F2 10 -/Times-Bold@0 SF(scgcheck)108 124.8 Q F0([)2.5 E/F3 10/Times-Italic@0 SF -(options)2.5 E F0(])2.5 E F1(DESCRIPTION)72 153.6 Q F2(Scgcheck)108 -165.6 Q F0(is used to check and v)2.5 E -(erify the Application Binary Interf)-.15 E(ace of libscg.)-.1 E(The)108 -194.4 Q F3(de)3.065 E(vice)-.15 E F0 .565(refers to)3.065 F F3(scsib) -3.065 E(us)-.2 E F0(/).27 E F3(tar).13 E -.1(ge)-.37 G(t).1 E F0(/).68 E -F3(lun).09 E F0 .565(of the dri)3.065 F -.15(ve)-.25 G 3.064(.C).15 G -.564(ommunication on)-3.064 F F3(SunOS)3.064 E F0 .564 -(is done with the SCSI gen-)3.064 F 1.02(eral dri)108 206.4 R -.15(ve) --.25 G(r).15 E F2(scg)3.52 E(.)-.15 E F0 1.02 -(Other operating systems are using a library simulation of this dri)6.02 -F -.15(ve)-.25 G 4.62 -.55(r. P).15 H 1.02(ossible syntax is:).55 F F2 -(de)108 218.4 Q(v=)-.15 E F3(scsib)3.228 E(us)-.2 E F0(,).27 E F3(tar) -.13 E -.1(ge)-.37 G(t).1 E F0(,).68 E F3(lun).09 E F0(or)3.227 E F2(de) -3.227 E(v=)-.15 E F3(tar)3.227 E -.1(ge)-.37 G(t).1 E F0(,).68 E F3(lun) -.09 E F0 5.727(.I).24 G 3.227(nt)-5.727 G .727(he latter case, the dri) --3.227 F 1.027 -.15(ve h)-.25 H .727(as to be connected to the def).15 F -(ault)-.1 E .85(SCSI b)108 230.4 R .85(us of the machine.)-.2 F F3 -(Scsib)5.85 E(us)-.2 E F0(,).27 E F3(tar)3.35 E -.1(ge)-.37 G(t).1 E F0 -(and)3.351 E F3(lun)3.351 E F0 .851(are inte)3.351 F .851(ger numbers.) --.15 F .851(Some operating systems or SCSI)5.851 F .338(transport imple\ -mentations may require to specify a \214lename in addition.)108 242.4 R -.337(In this case the correct syntax for)5.337 F 2.308(the de)108 254.4 -R 2.308(vice is:)-.25 F F2(de)4.808 E(v=)-.15 E F3(de)4.808 E(vicename) --.15 E F0(:).18 E F3(scsib).34 E(us)-.2 E F0(,).27 E F3(tar).13 E -.1 -(ge)-.37 G(t).1 E F0(,).68 E F3(lun).09 E F0(or)4.808 E F2(de)4.808 E -(v=)-.15 E F3(de)4.808 E(vicename)-.15 E F0(:).18 E F3(tar).13 E -.1(ge) --.37 G(t).1 E F0(,).68 E F3(lun).09 E F0 7.308(.I).24 G 4.809(ft)-7.308 -G 2.309(he name of the)-4.809 F(de)108 266.4 Q .465 -(vice node that has been speci\214ed on such a system refers to e)-.25 F -.465(xactly one SCSI de)-.15 F .465(vice, a shorthand in the)-.25 F -(form)108 278.4 Q F2(de)2.646 E(v=)-.15 E F3(de)2.646 E(vicename)-.15 E -F0(:).18 E F3(@)-.68 E F0(or)2.646 E F2(de)2.646 E(v=)-.15 E F3(de)2.647 -E(vicename)-.15 E F0(:).18 E F3(@)-.68 E F0(,)A F3(lun).09 E F0 .147 -(may be used instead of)2.647 F F2(de)2.647 E(v=)-.15 E F3(de)2.647 E -(vicename)-.15 E F0(:).18 E F3(scsib).34 E(us)-.2 E F0(,).27 E F3(tar) -.13 E(-)-.2 E -.1(ge)108 290.4 S(t).1 E F0(,).68 E F3(lun)A F0(.).24 E -2.32 -.8(To a)108 319.2 T .72(ccess remote SCSI de).8 F .72 -(vices, you need to prepend the SCSI de)-.25 F .72 -(vice name by a remote de)-.25 F .72(vice indicator)-.25 F(.)-.55 E -(The remote de)108 331.2 Q(vice indicator is either)-.25 E F2(REMO)2.5 E -(TE:)-.4 E F3(user@host:).08 E F0(or)2.5 E F2(REMO)5 E(TE:)-.4 E F3 -(host:).31 E F0 3.273(Av)108 343.2 S .773(alid remote SCSI de)-3.523 F -.773(vice name may be:)-.25 F F2(REMO)3.273 E(TE:)-.4 E F3(user@host:) -.08 E F0 .773(to allo)3.273 F 3.274(wr)-.25 G .774(emote SCSI b)-3.274 F -.774(us scanning or)-.2 F F2(REMO)108 355.2 Q(TE:)-.4 E F3 -(user@host:1,0,0)A F0(to access the SCSI de)2.5 E(vice at)-.25 E F3 -(host)2.5 E F0(connected to SCSI b)2.5 E(us # 1,tar)-.2 E(get 0 lun 0.) --.18 E 1.862 -.8(To m)108 384 T(ak).8 E(e)-.1 E F2 -.18(re)2.762 G(adcd) -.18 E F0 .262(portable to all)2.762 F/F4 8/Times-Roman@0 SF(UNIX)2.761 E -F0 .261(platforms, the syntax)2.761 F F2(de)2.761 E(v=)-.15 E F3(de) -2.761 E(vicename)-.15 E F0(:).18 E F3(scsib).34 E(us)-.2 E F0(,).27 E F3 -(tar).13 E -.1(ge)-.37 G(t).1 E F0(,).68 E F3(lun).09 E F0 .261 -(is preferred)2.761 F .754(as is hides OS speci\214c kno)108 396 R .755 -(wledge about de)-.25 F .755(vice names from the user)-.25 F 5.755(.A) --.55 G .755(speci\214c OS must not necessarily)-2.5 F(support a w)108 -408 Q(ay to specify a real de)-.1 E(vice \214le name nor a w)-.25 E -(ay to specify)-.1 E F3(scsib)2.5 E(us)-.2 E F0(,).27 E F3(tar).13 E -.1 -(ge)-.37 G(t).1 E F0(,).68 E F3(lun).09 E F0(.).24 E F3(Scsib)108 436.8 -Q(us)-.2 E F0 3.257(0i)3.257 G 3.257(st)-3.257 G .757(he def)-3.257 F -.757(ault SCSI b)-.1 F .757(us on the machine. W)-.2 F .756 -(atch the boot messages for more information or look)-.8 F(into)108 -448.8 Q F2(/v)2.995 E(ar/adm/messages)-.1 E F0 .496 -(for more information about the SCSI con\214guration of your machine.) -2.995 F .496(If you ha)5.496 F -.15(ve)-.2 G 2.158 -(problems to \214gure out what v)108 460.8 R 2.158(alues for)-.25 F F3 -(scsib)4.658 E(us)-.2 E F0(,).27 E F3(tar).13 E -.1(ge)-.37 G(t).1 E F0 -(,).68 E F3(lun).09 E F0 2.158(should be used, try the)4.658 F F2 -(\255scanb)4.658 E(us)-.2 E F0 2.158(option of)4.658 F F2(cdr)108 472.8 -Q(ecord)-.18 E F0(.)A F1(OPTIONS)72 501.6 Q F2108 513.6 Q(ersion) --.1 E F0(Print v)144 525.6 Q(ersion information and e)-.15 E(xit.)-.15 E -F2(de)108 542.4 Q(v=)-.15 E F3(tar).13 E -.1(ge)-.37 G(t).1 E F0 .207 -(Sets the SCSI tar)144 554.4 R .207(get def)-.18 F .208 -(ault for SCSI Bus scanning test, see notes abo)-.1 F -.15(ve)-.15 G -5.208(.T).15 G .208(his allo)-5.208 F .208(ws e.g. to spec-)-.25 F -(ify to use Solaris USCSI or remote SCSI for the b)144 566.4 Q -(us scanning case.)-.2 E -.15(Fo)144 590.4 S 3.452(rt).15 G .952 -(he non b)-3.452 F .952(us scanning case, a typical de)-.2 F .952 -(vice speci\214cation is)-.25 F F2(de)3.452 E(v=)-.15 E F3(6,0).2 E F0 -5.952(.I)3.452 G 3.451(fa\214)-5.952 G .951(lename must be)-3.451 F(pro) -144 602.4 Q .503(vided together with the numerical tar)-.15 F .504 -(get speci\214cation, the \214lename is implementation speci\214c.)-.18 -F .385(The correct \214lename in this case can be found in the system s\ -peci\214c manuals of the tar)144 614.4 R .384(get operat-)-.18 F .398 -(ing system.)144 626.4 R .398(On a)5.398 F F3 -1.77 -.55(Fr e)2.898 H -(eBSD).55 E F0 .399(system without)2.899 F F3(CAM)2.899 E F0 .399 -(support, you need to use the control de)2.899 F .399(vice \(e.g.)-.25 F -F3(/de)144 638.4 Q(v/r)-.15 E(cd0.ctl)-.37 E F0 2.5(\). A).51 F -(correct de)2.5 E(vice speci\214cation in this case may be)-.25 E F2(de) -2.5 E(v=)-.15 E F3(/de)1.15 E(v/r)-.15 E(cd0.ctl:@)-.37 E F0(.)2.5 E -.572(On Linux, dri)144 662.4 R -.15(ve)-.25 G 3.072(sc).15 G .572 -(onnected to a parallel port adapter are mapped to a virtual SCSI b) --3.072 F .571(us. Dif)-.2 F(ferent)-.25 E(adapters are mapped to dif)144 -674.4 Q(ferent tar)-.25 E(gets on this virtual SCSI b)-.18 E(us.)-.2 E -.526(If no)144 698.4 R F3(de)3.026 E(v)-.15 E F0 .527 -(option is present,)3.027 F F2(cdr)3.027 E(ecord)-.18 E F0 .527 -(will try to get the de)3.027 F .527(vice from the)-.25 F F2(CDR_DEVICE) -3.027 E F0(en)3.027 E(viron-)-.4 E(ment.)144 710.4 Q(J)72 768 Q -.25(..) --5.5 K(or)-4.5 5.5 M 2.5(gS)-.18 G 153.065(chilling V)-2.5 F(ersion 2.0) --1.11 E(1)206.225 E EP +save +mark +1 pagesetup +10 R f +(Schily)720 480 w +10 S1 f +(\302)976 480 w +10 R f +( \( 1 \))3 164( SCGCHECK)1 3277(s USER COMMANDS)2 950 3 1009 480 t +9 B f +( E)1 0( ME)1 60(N NA AM)2 215 3 720 960 t +10 R f +(scgcheck)1080 1080 w +10 S1 f +(\261)1478 1080 w +10 R f +(check and validate the ABI of libscg)6 1506 1 1576 1080 t +9 B f +( S)1 0( IS)1 50( SI)1 35( PS)1 50( OP)1 55( YN NO)2 135(S SY)1 115 7 720 1248 t +10 B f +( k)1 0( ec ck)2 100( he)1 44( ch)1 56( gc)1 44( cg)1 50(s sc)1 83 7 1080 1368 t +10 R f +([)1490 1368 w +10 I f +(options)1556 1368 w +10 R f +(])1884 1368 w +9 B f +( N)1 0( ON)1 65( IO)1 70( TI)1 35( PT)1 60( IP)1 55( CR RI)2 100( SC)1 65( ES)1 50(D DE)1 125 10 720 1656 t +10 B f +( k)1 0( ec ck)2 100( he)1 44( ch)1 56( gc)1 44( cg)1 50(S Sc)1 100 7 1080 1776 t +10 R f +(is used to check and verify the Application Binary Interface of libscg.)11 2871 1 1507 1776 t +9 B f +( g)1 0( ng)1 45( in)1 50( mi)1 25( am)1 75( na)1 45( n)1 80( ce e)2 40( ic)1 40( vi)1 25( ev)1 45(D De)1 105 12 900 2064 t +10 R f +(Most users do not need to care about device naming at all, as in)13 2795 1 1080 2184 t +10 S1 f +(\261 \261)1 65 1 3920 2184 t +10 B f +( o)1 0( to)1 50( ut)1 33(a au)1 106 4 3985 2184 t +10 R f +(mode,)4219 2184 w +10 B f +( k)1 0( ec ck)2 100( he)1 44( ch)1 56( gc)1 44( cg)1 50(s sc)1 83 7 4511 2184 t +10 R f +(implements)4933 2184 w +10 B f +( t)1 0( et)1 33( ge)1 44( rg)1 50( ar)1 44( ta)1 50( t)1 69( o)1 0( to)1 50( ut)1 33(a au)1 106 11 1080 2304 t +10 R f +( type drive is)3 549(support and automagically \256nds a test drive in case that exactly one CD-ROM)12 3256 2 1595 2304 t +(available in the system.)3 962 1 1080 2424 t +9 B f +( S)1 0( NS)1 50( ON)1 65( IO)1 70( TI)1 35( PT)1 60(O OP)1 125 7 720 2712 t +10 S1 f +(\261 \261)1 65 1 1080 2832 t +10 B f +( n)1 0( on)1 56( io)1 50( si)1 28( er rs)2 83(v ve)1 94 6 1145 2832 t +10 R f +(Print version information and exit.)4 1412 1 1440 2952 t +10 S1 f +(\261 \261)1 65 1 1080 3120 t +10 B f +( o)1 0( to)1 50( ut)1 33(a au)1 106 4 1145 3120 t +10 R f +(Instead of asking to con\256rm each test before runing it,)9 2298 1 1440 3120 t +10 B f +( k)1 0( ec ck)2 100( he)1 44( ch)1 56( gc)1 44( cg)1 50(s sc)1 83 7 3778 3120 t +10 R f +(tries to do a fully automated)5 1204 1 4196 3120 t +(test.)1440 3240 w +10 B f +( =)1 0( v=)1 57( ev)1 50(d de)1 100 4 1080 3408 t +10 I f +(target)1287 3408 w +10 R f +( typical target device speci\256cation is)5 1571( A)1 153(Set the SCSI target for the device, see notes above.)9 2236 3 1440 3528 t +10 B f +( =)1 0( v=)1 57( ev)1 50(d de)1 100 4 1440 3648 t +10 I f +(1,6,0)1647 3648 w +10 R f +( a \256lename must be provided together with the numerical target speci\256cation, the)12 3357(. If)1 160 2 1883 3648 t +( this case can be found in the sys-)8 1446( correct \256lename in)3 809( The)1 225(\256lename is implementation speci\256c.)3 1480 4 1440 3768 t +( a)1 81( On)1 192( operating system.)2 754(tem speci\256c manuals of the target)5 1410 4 1440 3888 t +10 I f +(FreeBSD)3914 3888 w +10 R f +(system without)1 621 1 4322 3888 t +10 I f +(CAM)4980 3888 w +10 R f +(sup-)5228 3888 w +( to use the control device \(e.g.)6 1293(port, you need)2 602 2 1440 4008 t +10 I f +(/dev/rcd0.ctl)3408 4008 w +10 R f +( correct device speci\256cation in)4 1279(\). A)1 203 2 3918 4008 t +(this case may be)3 681 1 1440 4128 t +10 B f +( =)1 0( v=)1 57( ev)1 50(d de)1 100 4 2154 4128 t +10 I f +(/dev/rcd0.ctl:)2361 4128 w +10 S1 f +(@)2896 4128 w +10 R f +(.)3021 4128 w +10 B f +( g)1 0( ng)1 50( in)1 56( ss si)2 67( re es)2 83( dd dr)2 100( ad)1 56( a)1 83( I)1 0( SI)1 39( CS)1 56( SC)1 72( S)1 89( l)1 0( al)1 28( er ra)2 94( ne)1 44( en)1 56(G Ge)1 122 19 1240 4368 t +10 R f +(The)1440 4488 w +10 I f +(target device)1 530 1 1632 4488 t +10 R f +(to the)1 237 1 2199 4488 t +10 B f +( =)1 0( v=)1 57( ev)1 50(d de)1 100 4 2473 4488 t +10 R f +(option refers to)2 634 1 2717 4488 t +10 I f +(scsibus)3388 4488 w +10 R f +(/)3685 4488 w +10 I f +(target)3713 4488 w +10 R f +(/)3960 4488 w +10 I f +(lun)3988 4488 w +10 R f +( Communication)1 683(of the device.)2 564 2 4153 4488 t +(on)1440 4608 w +10 I f +(SunOS)1575 4608 w +10 R f +(is done with the SCSI general driver)6 1514 1 1882 4608 t +10 B f +( .)1 0( g.)1 25( cg)1 50(s sc)1 83 4 3431 4608 t +10 R f +( using a library)3 629(Other operating systems are)3 1147 2 3624 4608 t +( syntax is:)2 442( Possible)1 410(simulation of this driver.)3 1043 3 1440 4728 t +10 B f +( =)1 0( v=)1 57( ev)1 50(d de)1 100 4 3412 4728 t +10 I f +(scsibus)3663 4728 w +10 R f +(,)3960 4728 w +10 I f +(target)3985 4728 w +10 R f +(,)4232 4728 w +10 I f +(lun)4257 4728 w +10 R f +(or)4429 4728 w +10 B f +( =)1 0( v=)1 57( ev)1 50(d de)1 100 4 4556 4728 t +10 I f +(target)4807 4728 w +10 R f +(,)5054 4728 w +10 I f +(lun)5079 4728 w +10 R f +(. In)1 185 1 5215 4728 t +( be connected to the default SCSI bus of the machine.)10 2234(the latter case, the device has to)6 1326 2 1440 4848 t +10 I f +(Scsibus)5067 4848 w +10 R f +(,)5375 4848 w +10 I f +(target)1440 4968 w +10 R f +(and)1715 4968 w +10 I f +(lun)1896 4968 w +10 R f +(are integer numbers. Some operating systems or SCSI transport implementations)9 3339 1 2061 4968 t +( this case the correct syntax for the device is:)9 1901( In)1 154(may require to specify a \256lename in addition.)7 1905 3 1440 5088 t +10 B f +( =)1 0( v=)1 57( ev)1 50(d de)1 100 4 1440 5208 t +10 I f +(devicename)1699 5208 w +10 R f +(:)2177 5208 w +10 I f +(scsibus)2205 5208 w +10 R f +(,)2502 5208 w +10 I f +(target)2527 5208 w +10 R f +(, or)1 160 1 2774 5208 t +10 B f +( =)1 0( v=)1 57( ev)1 50(d de)1 100 4 2986 5208 t +10 I f +(devicename)3245 5208 w +10 R f +(:)3723 5208 w +10 I f +(target)3751 5208 w +10 R f +(,)3998 5208 w +10 I f +(lun)4023 5208 w +10 R f +( the device)2 488( the name of)3 577(. If)1 176 3 4159 5208 t +( refers to exactly one SCSI device, a shorthand in)9 2055(node that has been speci\256ed on such a system)8 1905 2 1440 5328 t +(the form)1 380 1 1440 5448 t +10 B f +( =)1 0( v=)1 57( ev)1 50(d de)1 100 4 1884 5448 t +10 I f +(devicename)2155 5448 w +10 R f +(:)2633 5448 w +10 S1 f +(@)2661 5448 w +10 R f +(or)2817 5448 w +10 B f +( =)1 0( v=)1 57( ev)1 50(d de)1 100 4 2964 5448 t +10 I f +(devicename)3235 5448 w +10 R f +(:)3713 5448 w +10 S1 f +(@)3741 5448 w +10 R f +(,)3841 5448 w +10 I f +(lun)3866 5448 w +10 R f +(may be used instead of)4 1071 1 4058 5448 t +10 B f +( =)1 0( v=)1 57( ev)1 50(d de)1 100 4 5193 5448 t +10 I f +(devicename)1440 5568 w +10 R f +(:)1918 5568 w +10 I f +(scsibus)1946 5568 w +10 R f +(,)2243 5568 w +10 I f +(target)2268 5568 w +10 R f +(,)2515 5568 w +10 B f +( g)1 0( ng)1 50( in)1 56( ss si)2 67( re es)2 83( dd dr)2 100( ad)1 56( a)1 83( I)1 0( SI)1 39( CS)1 56( SC)1 72( S)1 89( e)1 0( te)1 44( ot)1 33( mo)1 50( em)1 83(R Re)1 116 19 1240 5808 t +10 R f +( to prepend the SCSI device name by a remote device)10 2240(To access remote SCSI devices, you need)6 1720 2 1440 5928 t +(indicator. The remote device indicator is either)6 1961 1 1440 6048 t +10 B f +( :)1 0( TE E:)2 100( OT)1 67( MO)1 78( EM)1 94(R RE)1 139 6 3441 6048 t +10 I f +(user)3919 6048 w +10 S1 f +(@)4091 6048 w +10 I f +(host:)4183 6048 w +10 R f +(or)4456 6048 w +10 B f +( :)1 0( TE E:)2 100( OT)1 67( MO)1 78( EM)1 94(R RE)1 139 6 4578 6048 t +10 I f +(host:)5056 6048 w +10 R f +(A)5328 6048 w +(valid remote SCSI device name may be:)6 1741 1 1440 6168 t +10 B f +( :)1 0( TE E:)2 100( OT)1 67( MO)1 78( EM)1 94(R RE)1 139 6 3261 6168 t +10 I f +(user)3739 6168 w +10 S1 f +(@)3911 6168 w +10 I f +(host:)4003 6168 w +10 R f +( bus)1 187(to allow remote SCSI)3 930 2 4283 6168 t +(scanning or)1 482 1 1440 6288 t +10 B f +( :)1 0( TE E:)2 100( OT)1 67( MO)1 78( EM)1 94(R RE)1 139 6 1966 6288 t +10 I f +(user)2444 6288 w +10 S1 f +(@)2616 6288 w +10 I f +(host:1,0,0)2708 6288 w +10 R f +( SCSI device at)3 673(to access the)2 542 2 3152 6288 t +10 I f +(host)4410 6288 w +10 R f +(connected to SCSI)2 780 1 4620 6288 t +(bus)1440 6408 w +10 S1 f +(#)1614 6408 w +10 R f +( to a speci\256c)3 535( order to allow remote access)5 1216( In)1 151(1,target 0, lun 0.)3 685 4 1699 6408 t +10 I f +(host)4322 6408 w +10 R f +(, the)1 183 1 4497 6408 t +10 B f +( i)1 0( si)1 28( cs)1 39( sc)1 44(r rs)1 83 5 4716 6408 t +10 R f +(\(1\) program)1 490 1 4910 6408 t +(needs to be present and con\256gured on the)7 1711 1 1440 6528 t +10 I f +(host)3184 6528 w +10 R f +(.)3359 6528 w +10 B f +( s)1 0( ts)1 39( rt)1 33( or)1 44( po)1 50( sp)1 56( ns)1 39( an)1 56( ra)1 50( tr)1 44( t)1 66( I)1 0( SI)1 39( CS)1 56( SC)1 72( S)1 89( e)1 0( te)1 44( at)1 33( na)1 50( er rn)2 100( te)1 44( lt)1 33(A Al)1 100 24 1240 6768 t +( I)1 0( PI)1 39( AP)1 61( TA)1 72(A AT)1 139 5 1440 6888 t +10 R f +(drives are just)2 584 1 1788 6888 t +10 B f +( I)1 0( SI)1 39( CS)1 56(S SC)1 128 4 2409 6888 t +10 R f +(drives that inherently use the)4 1202 1 2669 6888 t +10 I f +(ATA packet interface)2 867 1 3908 6888 t +10 R f +(as)4813 6888 w +10 B f +( I)1 0( SI)1 39( CS)1 56(S SC)1 128 4 4934 6888 t +10 R f +(com-)5195 6888 w +( may need to specify an alternate)6 1367( You)1 239( IDE \(ATA\) transport.)3 919(mand transport layer build into the)5 1435 4 1440 7008 t +( if your OS does not implement a fully integrated kernel)10 2402( line)1 224(transport layer on the command)4 1334 3 1440 7128 t +( allows to access any drive using)6 1357(driver subsystem that)2 873 2 1440 7248 t +10 B f +( I)1 0( SI)1 39( CS)1 56(S SC)1 128 4 3703 7248 t +10 R f +(commands via a single unique user)5 1441 1 3959 7248 t +(J)720 7728 w +(. .)1 47 1 759 7673 t +( 1)1 1829( change: Version 3.0)3 850( Last)1 1434(org Schilling)1 528 4 759 7728 t +cleartomark +showpage +restore +%%EndPage: 1 1 %%Page: 2 2 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF 105.385(SCGCHECK\(1\) Schily\264s)72 48 R -(USER COMMANDS)2.5 E(SCGCHECK\(1\))107.885 E 1.047(If the ar)144 84 R -1.047(gument to the)-.18 F/F1 10/Times-Bold@0 SF(de)3.547 E(v=)-.15 E F0 -1.047(option does not contain the characters ',)3.547 F 1.047 -(', '/', '@' or ':', it is inter)-.7 F(-)-.2 E -(preted as an label name that may be found in the \214le /etc/def)144 96 -Q(ault/cdrecord \(see FILES section\).)-.1 E F1(timeout=)108 112.8 Q/F2 -10/Times-Italic@0 SF(#).48 E F0 .13(Set the def)144 124.8 R .13 -(ault SCSI command timeout v)-.1 F .13(alue to)-.25 F F2(#)2.63 E F0 -2.63(seconds. The)3.53 F(def)2.63 E .13(ault SCSI command timeout is)-.1 -F .452(the minimum timeout used for sending SCSI commands.)144 136.8 R -.451(If a SCSI command f)5.451 F .451(ails due to a time-)-.1 F .366 -(out, you may try to raise the def)144 148.8 R .366 -(ault SCSI command timeout abo)-.1 F .667 -.15(ve t)-.15 H .367 -(he timeout v).15 F .367(alue of the f)-.25 F(ailed)-.1 E 2.716 -(command. If)144 160.8 R .216(the command runs correctly with a raised \ -command timeout, please report the better)2.716 F .401(timeout v)144 -172.8 R .401 -(alue and the corresponding command to the author of the program.)-.25 F -.402(If no)5.402 F F2(timeout)2.902 E F0(option)2.902 E -(is present, a def)144 184.8 Q(ault timeout of 40 seconds is used.)-.1 E -F1(deb)108 201.6 Q(ug=)-.2 E F2(#,).48 E F1(-d)2.5 E F0 .386 -(Set the misc deb)144 213.6 R .386(ug v)-.2 F .386(alue to # \(with deb) --.25 F .385(ug=#\) or increment the misc deb)-.2 F .385(ug le)-.2 F -.15 -(ve)-.25 G 2.885(lb).15 G 2.885(yo)-2.885 G .385(ne \(with -d\).)-2.885 -F .13(If you specify)144 225.6 R F2(-dd,)2.63 E F0 .13(this equals to) -2.63 F F1(deb)2.63 E(ug=)-.2 E F2(2.).38 E F0 .13 -(This may help to \214nd problems while opening a dri)5.13 F -.15(ve) --.25 G(r).15 E .864(for libscg.)144 237.6 R .864 -(as well as with sector sizes and sector types.)5.864 F(Using)5.864 E F1 -(\255deb)3.364 E(ug)-.2 E F0(slo)3.363 E .863(ws do)-.25 F .863 -(wn the process)-.25 F(and may be the reason for a b)144 249.6 Q(uf)-.2 -E(fer underrun.)-.25 E F1(kdeb)108 266.4 Q(ug=)-.2 E F0(#,)A F1(kd=)2.5 -E F0(#)A -.7(Te)144 278.4 S(ll the).7 E F1(scg)2.5 E F0(-dri)A -.15(ve) --.25 G 2.5(rt).15 G 2.5(om)-2.5 G(odify the k)-2.5 E(ernel deb)-.1 E -(ug v)-.2 E(alue while SCSI commands are running.)-.25 E F1(\255silent) -108 295.2 Q F0(,)A F12.5 E F0 -(Do not print out a status report for f)144 307.2 Q -(ailed SCSI commands.)-.1 E F1108 324 Q F0 .993(Increment the le) -25.3 F -.15(ve)-.25 G 3.493(lo).15 G 3.493(fg)-3.493 G .993(eneral v) --3.493 F .993(erbosity by one.)-.15 F .994 -(This is used e.g. to display the progress of the)5.993 F(process.)144 -336 Q F1108 352.8 Q F0 .324(Increment the v)23.08 F .324 -(erbose le)-.15 F -.15(ve)-.25 G 2.824(lw).15 G .324 -(ith respect of SCSI command transport by one.)-2.824 F .324 -(This helps to deb)5.324 F(ug)-.2 E 1.194 -(problems during the process, that occur in the CD-Recorder)144 364.8 R -6.194(.I)-.55 G 3.694(fy)-6.194 G 1.194(ou get incomprehensible error) --3.694 F .273 -(messages you should use this \215ag to get more detailed output.)144 -376.8 R F1(\255VV)5.273 E F0 .273(will sho)2.773 F 2.773(wd)-.25 G .273 -(ata b)-2.773 F(uf)-.2 E .273(fer content)-.25 F(in addition.)144 388.8 -Q(Using)5 E F12.5 E F0(or)2.5 E F1(\255VV)2.5 E F0(slo)2.5 E -(ws do)-.25 E(wn the process.)-.25 E F1(f=)108 405.6 Q F2(\214le)1.91 E -F0(Specify the log \214le to be used instead of)12.84 E F2 -.15(ch)2.5 G -(ec).15 E(k.lo)-.2 E(g)-.1 E F0(.).22 E/F3 10.95/Times-Bold@0 SF -(EXAMPLES)72 434.4 Q(FILES)72 446.4 Q(SEE ALSO)72 458.4 Q F1(cdr)108 -470.4 Q(ecord)-.18 E F0(\(1\),)A F1 -.18(re)2.5 G(adcd).18 E F0(\(1\),)A -F1(mkisofs)2.5 E F0(\(1\),)A F1(scg)2.5 E F0(\(7\).)A F3(NO)72 499.2 Q -(TES)-.438 E F0 .456(When using)108 511.2 R F1(scgck)2.956 E(eck)-.1 E -F0 .457(with the brok)2.957 F(en)-.1 E F1 .457(Linux SCSI generic dri) -2.957 F -.1(ve)-.1 G -1(r.).1 G F0 -1.1(Yo)6.457 G 2.957(us)1.1 G .457 -(hould note that)-2.957 F F1(scgcheck)2.957 E F0 .457(uses a)2.957 F -.054(hack, that tries to emulate the functionality of the scg dri)108 -523.2 R -.15(ve)-.25 G 3.654 -.55(r. U).15 H(nfortunately).55 E 2.554 -(,t)-.65 G .054(he sg dri)-2.554 F -.15(ve)-.25 G 2.554(ro).15 G(n) --2.554 E F1(Linux)2.554 E F0 .053(has se)2.553 F(v-)-.25 E(eral se)108 -535.2 Q -.15(ve)-.25 G(re b).15 E(ugs:)-.2 E 32.5<8349>108 552 S 2.5(tc) --32.5 G(annot see if a SCSI command could not be sent at all.)-2.5 E -32.5<8349>108 568.8 S 2.631(tc)-32.5 G .131 -(annot get the SCSI status byte.)-2.631 F F1(Scgcheck)5.131 E F0 .132 -(for that reason cannot report f)2.631 F .132(ailing SCSI commands)-.1 F -(in some situations.)144 580.8 Q 32.5<8349>108 597.6 S 3.299(tc)-32.5 G -.799(annot get real DMA count of transfer)-3.299 F(.)-.55 E F1(Scgcheck) -5.798 E F0 .798(cannot tell you if there is an DMA residual)3.298 F -(count.)144 609.6 Q 32.5<8349>108 626.4 S 2.51(tc)-32.5 G .01 -(annot get number of bytes v)-2.51 F .011(alid in auto sense data.)-.25 -F F1(Scgcheck)5.011 E F0 .011(cannot tell you if de)2.511 F .011 -(vice transfers)-.25 F(no sense data at all.)144 638.4 Q 32.5<8349>108 -655.2 S 2.5(tf)-32.5 G(etches to fe)-2.5 E 2.5(wd)-.25 G -(ata in auto request sense \(CCS/SCSI-2/SCSI-3 needs >= 18\).)-2.5 E F3 -(DIA)72 684 Q(GNOSTICS)-.602 E F0 2.5(At)108 696 S -(ypical error message for a SCSI command looks lik)-2.5 E(e:)-.1 E -(readcd: I/O error)144 720 Q 2.5(.t)-.55 G -(est unit ready: scsi sendcmd: no error)-2.5 E(J)72 768 Q -.25(..)-5.5 K -(or)-4.5 5.5 M 2.5(gS)-.18 G 153.065(chilling V)-2.5 F(ersion 2.0)-1.11 -E(2)206.225 E EP +save +mark +2 pagesetup +10 R f +(Schily)720 480 w +10 S1 f +(\302)976 480 w +10 R f +( \( 1 \))3 164( SCGCHECK)1 3277(s USER COMMANDS)2 950 3 1009 480 t +(interface.)1440 960 w +( devices via alternate transport layers, you need to prepend the SCSI device)12 3289(To access SCSI)2 671 2 1440 1200 t +( indicator may be something like)5 1468( transport layer)2 668( The)1 245(name by a transport layer indicator.)5 1579 4 1440 1320 t +10 B f +( :)1 0( I:)1 33( SI)1 39( CS)1 56( SC)1 72(U US)1 128 6 1440 1440 t +10 R f +(or)1812 1440 w +10 B f +( :)1 0( I:)1 33( PI)1 39( AP)1 61( TA)1 72(A AT)1 139 6 1939 1440 t +10 R f +( of supported transport layers for your platform, use)8 2231( get a list)3 421(. To)1 213 3 2283 1440 t +10 B f +( =)1 0( v=)1 57( ev)1 50(d de)1 100 4 5193 1440 t +10 I f +(HELP)1440 1560 w +10 R f +(:)1698 1560 w +10 B f +( un nd d)3 112( ou)1 56( ro)1 50( gr)1 44( kg)1 50( ck)1 56( ac)1 44( Ba)1 50( B)1 100( y)1 0( ty)1 50( il li it)3 89( bi)1 28( ab)1 56( ta)1 50( rt)1 33( or)1 44(P Po)1 111 18 1240 1800 t +10 R f +(To make)1 368 1 1440 1920 t +10 B f +( k)1 0( ec ck)2 100( he)1 44( ch)1 56( gc)1 44( cg)1 50(s sc)1 83 7 1849 1920 t +10 R f +(portable to all)2 589 1 2268 1920 t +8 R f +(UNIX)2892 1920 w +10 R f +(platforms, the syntax)2 875 1 3134 1920 t +10 B f +( =)1 0( v=)1 57( ev)1 50(d de)1 100 4 4051 1920 t +10 I f +(devicename)4300 1920 w +10 R f +(:)4778 1920 w +10 I f +(scsibus)4806 1920 w +10 R f +(,)5103 1920 w +10 I f +(target)5128 1920 w +10 R f +(,)5375 1920 w +( speci\256c)1 348( A)1 148( names from the user.)4 934(is preferred as it hides OS speci\256c knowledge about device)9 2530 4 1440 2040 t +( nor a way to specify)5 909(OS may not necessarily support a way to specify a real device \256le name)13 3051 2 1440 2160 t +10 I f +(scsibus)1440 2280 w +10 R f +(,)1737 2280 w +10 I f +(target)1762 2280 w +10 R f +(,)2009 2280 w +10 I f +(lun)2034 2280 w +10 R f +(.)2170 2280 w +10 I f +(Scsibus)1440 2520 w +10 R f +( the machine. Watch the boot messages for more informa-)9 2434(0 is the default SCSI bus on)6 1189 2 1777 2520 t +(tion or look into)3 675 1 1440 2640 t +10 B f +( s)1 0( es)1 39( ag ge)2 94( ss sa)2 89( es)1 39( me)1 44( /m)1 83( m/)1 28( dm)1 83( ad)1 56( /a)1 50( r/)1 28( va ar)2 94(/ /v)1 78 14 2149 2640 t +10 R f +(for more information about the SCSI con\256guration of your)8 2412 1 2988 2640 t +( you have problems to \256gure out what values for)9 2029(machine. If)1 497 2 1440 2760 t +10 I f +(scsibus)4001 2760 w +10 R f +(,)4298 2760 w +10 I f +(target)4323 2760 w +10 R f +(,)4570 2760 w +10 I f +(lun)4595 2760 w +10 R f +(should be used,)2 641 1 4759 2760 t +(try the)1 266 1 1440 2880 t +10 S1 f +(\261 \261)1 65 1 1739 2880 t +10 B f +( s)1 0( nb bu us)3 151( an)1 56( ca)1 50(s sc)1 83 5 1804 2880 t +10 R f +(option of)1 372 1 2177 2880 t +10 B f +( k)1 0( ec ck)2 100( he)1 44( ch)1 56( gc)1 44( cg)1 50(s sc)1 83 7 2582 2880 t +10 R f +(described below.)1 684 1 2992 2880 t +10 B f +( e)1 0( de)1 44( od)1 56( Mo)1 50( M)1 127( t)1 0( et)1 33( ge)1 44( rg)1 50( ar)1 44( ta)1 50( ot)1 33( to)1 50( ut)1 33(A Au)1 128 15 1240 3120 t +10 R f +(If no)1 201 1 1440 3240 t +10 B f +( =)1 0( v=)1 57( ev)1 50(d de)1 100 4 1676 3240 t +10 R f +( notation,)1 389(option is present, or if it only contains a transport specifyer but no address)13 3093 2 1918 3240 t +10 B f +( k)1 0( ec ck)2 100( he)1 44( ch)1 56( gc)1 44( cg)1 50(s sc)1 83 7 1440 3360 t +10 R f +( exactly one is found,)4 933( If)1 143(tries to scan the SCSI address space for CD-ROM drives.)9 2462 3 1862 3360 t +(this is used by default.)4 929 1 1440 3480 t +10 B f +( =)1 0( t=)1 57( ut)1 33( ou)1 56( eo)1 50( me)1 44( im)1 83(t ti)1 61 8 1080 3648 t +10 S1 f +(#)1464 3648 w +10 R f +(Set the default SCSI command timeout value to)7 2139 1 1440 3768 t +10 S1 f +(#)3637 3768 w +10 R f +( default SCSI command)3 1060(seconds. The)1 587 2 3753 3768 t +( a SCSI command fails)4 982( If)1 139( commands.)1 498(timeout is the minimum timeout used for sending SCSI)8 2341 4 1440 3888 t +( a timeout, you may try to raise the default SCSI command timeout above the timeout)15 3696(due to)1 264 2 1440 4008 t +( runs correctly with a raised command timeout,)7 1991( the command)2 598( If)1 140(value of the failed command.)4 1231 4 1440 4128 t +( the author of the pro-)5 933(please report the better timeout value and the corresponding command to)10 3027 2 1440 4248 t +( no)1 133(gram. If)1 362 2 1440 4368 t +10 I f +(timeout)1968 4368 w +10 R f +(option is present, a default timeout of 40 seconds is used.)10 2367 1 2301 4368 t +10 B f +( =)1 0( g=)1 57( bu ug)2 106( eb)1 56(d de)1 100 5 1080 4536 t +10 S1 f +(#)1399 4536 w +10 I f +(,)1449 4536 w +10 S1 f +(\261 \261)1 65 1 1515 4536 t +10 B f +(d d)1 56 1 1580 4536 t +10 R f +(Set the misc debug value to)5 1167 1 1440 4656 t +10 S1 f +(#)2645 4656 w +10 R f +(\(with debug=)1 549 1 2733 4656 t +10 S1 f +(#)3282 4656 w +10 R f +( the misc debug level by one \(with)7 1477(\) or increment)2 591 2 3332 4656 t +10 S1 f +(\261)1440 4776 w +10 R f +(d\). If you specify)3 729 1 1505 4776 t +10 S1 f +(\261)2272 4776 w +10 I f +(dd,)2337 4776 w +10 R f +(this equals to)2 554 1 2500 4776 t +10 B f +( =)1 0( g=)1 57( bu ug)2 106( eb)1 56(d de)1 100 5 3092 4776 t +10 I f +(2.)3411 4776 w +10 R f +(This may help to \256nd problems while open-)7 1843 1 3557 4776 t +( Using)1 319( sector sizes and sector types.)5 1285( well as with)3 571( as)1 162(ing a driver for libscg.)4 974 5 1440 4896 t +10 S1 f +(\261 \261)1 65 1 4798 4896 t +10 B f +( g)1 0( bu ug)2 106( eb)1 56(d de)1 100 4 4863 4896 t +10 R f +(slows)5172 4896 w +(down the process and may be the reason for a buffer underrun.)11 2586 1 1440 5016 t +10 B f +( =)1 0( g=)1 57( bu ug)2 106( eb)1 56(k kd de)2 156 5 1080 5184 t +10 S1 f +(#)1455 5184 w +10 R f +(,)1505 5184 w +10 B f +( =)1 0(k kd d=)2 169 2 1563 5184 t +10 S1 f +(#)1732 5184 w +10 R f +(Tell the)1 316 1 1440 5304 t +10 B f +( g)1 0( cg)1 50(s sc)1 83 3 1789 5304 t +10 R f +(-driver to modify the kernel debug value while SCSI commands are running.)11 3156 1 1922 5304 t +10 S1 f +(\261 \261)1 65 1 1080 5472 t +10 B f +( t)1 0( nt)1 33( en)1 56( il le)2 72(s si)1 67 5 1145 5472 t +10 R f +(,)1373 5472 w +10 S1 f +(\261 \261)1 65 1 1431 5472 t +10 B f +(s s)1 39 1 1496 5472 t +10 R f +(Do not print out a status report for failed SCSI commands.)10 2420 1 1440 5592 t +10 S1 f +(\261 \261)1 65 1 1080 5760 t +10 B f +(v v)1 50 1 1145 5760 t +10 R f +( used e.g. to display the progress of the)8 1639( is)1 101( This)1 245(Increment the level of general verbosity by one.)7 1975 4 1440 5760 t +(process.)1440 5880 w +10 S1 f +(\261 \261)1 65 1 1080 6048 t +10 B f +(V V)1 72 1 1145 6048 t +10 R f +( helps to)2 383( This)1 258( verbose level with respect of SCSI command transport by one.)10 2747(Increment the)1 572 4 1440 6048 t +( during the process, that occur in the CD-Recorder. If you get incomprehensible)12 3308(debug problems)1 652 2 1440 6168 t +(error messages you should use this \257ag to get more detailed output.)11 2978 1 1440 6288 t +10 S1 f +(\261 \261)1 65 1 4502 6288 t +10 B f +(V VV V)2 144 1 4567 6288 t +10 R f +(will show data)2 637 1 4763 6288 t +( Using)1 305(buffer content in addition.)3 1067 2 1440 6408 t +10 S1 f +(\261 \261)1 65 1 2845 6408 t +10 B f +(V V)1 72 1 2910 6408 t +10 R f +(or)3015 6408 w +10 S1 f +(\261 \261)1 65 1 3131 6408 t +10 B f +(V VV V)2 144 1 3196 6408 t +10 R f +(slows down the process.)3 995 1 3373 6408 t +10 B f +( =)1 0(f f=)1 90 2 1080 6576 t +10 I f +(\256le)1170 6576 w +10 R f +(Specify the log \256le to be used instead of)8 1668 1 1440 6576 t +10 I f +(check.log)3141 6576 w +10 R f +(.)3528 6576 w +9 B f +( S)1 0( LE ES)2 110( PL)1 60( MP)1 55( XA AM)2 150(E EX)1 125 6 720 6864 t +( S)1 0( LE ES)2 110( IL)1 60(F FI)1 90 4 720 6984 t +10 R f +(J)720 7680 w +(. .)1 47 1 759 7625 t +( 2)1 1829( change: Version 3.0)3 850( Last)1 1434(org Schilling)1 528 4 759 7680 t +cleartomark +showpage +restore +%%EndPage: 2 2 %%Page: 3 3 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF 105.385(SCGCHECK\(1\) Schily\264s)72 48 R -(USER COMMANDS)2.5 E(SCGCHECK\(1\))107.885 E 2.5(CDB: 00)144 84 R -(20 00 00 00 00)2.5 E(status: 0x2 \(CHECK CONDITION\))144 96 Q -(Sense Bytes: 70 00 05 00 00 00 00 0A 00 00 00 00 25 00 00 00 00 00)144 -108 Q(Sense K)144 120 Q -.15(ey)-.25 G 2.5(:0).15 G(x5 Ille)-2.5 E -.05 -(ga)-.15 G 2.5(lR).05 G(equest, Se)-2.5 E(gment 0)-.15 E -(Sense Code: 0x25 Qual 0x00 \(logical unit not supported\) Fru 0x0)144 -132 Q(Sense \215ags: Blk 0 \(not v)144 144 Q(alid\))-.25 E -(cmd \214nished after 0.002s timeout 40s)144 156 Q .352 -(The \214rst line gi)108 180 R -.15(ve)-.25 G 2.852(si).15 G .352 -(nformation about the transport of the command.)-2.852 F .352(The te) -5.352 F .351(xt after the \214rst colon gi)-.15 F -.15(ve)-.25 G 2.851 -(st).15 G(he)-2.851 E .04(error te)108 192 R .04 -(xt for the system call from the vie)-.15 F 2.54(wo)-.25 G 2.54(ft)-2.54 -G .041(he k)-2.54 F .041(ernel. It usually is:)-.1 F/F1 10/Times-Bold@0 -SF .041(I/O err)2.541 F(or)-.18 E F0 .041(unless other problems hap-) -2.541 F .58(pen. The ne)108 204 R .58(xt w)-.15 F .58 -(ords contain a short description for the SCSI command that f)-.1 F .579 -(ails. The rest of the line tells)-.1 F .051(you if there were an)108 -216 R 2.551(yp)-.15 G .051(roblems for the transport of the command o) --2.551 F -.15(ve)-.15 G 2.551(rt).15 G .051(he SCSI b)-2.551 F(us.)-.2 E -F1 .051(fatal err)5.051 F(or)-.18 E F0 .052(means that)2.551 F(it w)108 -228 Q(as not possible to transport the command \(i.e. no de)-.1 E -(vice present at the requested SCSI address\).)-.25 E -(The second line prints the SCSI command descriptor block for the f)108 -244.8 Q(ailed command.)-.1 E .707(The third line gi)108 261.6 R -.15(ve) --.25 G 3.207(si).15 G .707(nformation on the SCSI status code returned \ -by the command, if the transport of the)-3.207 F(command succeeds.)108 -273.6 Q(This is error information from the SCSI de)5 E(vice.)-.25 E -(The fourth line is a he)108 290.4 Q 2.5(xd)-.15 G -(ump of the auto request sense information for the command.)-2.5 E .846 -(The \214fth line is the error te)108 307.2 R .846(xt for the sense k) --.15 F 1.146 -.15(ey i)-.1 H 3.346(fa).15 G -.25(va)-3.546 G .846 -(ilable, follo).25 F .846(wed by the se)-.25 F .846 -(gment number that is only)-.15 F -.25(va)108 319.2 S .421 -(lid if the command w).25 F .421(as a)-.1 F/F2 10/Times-Italic@0 SF -(copy)2.921 E F0 .421(command. If the error message is not directly rel\ -ated to the current com-)2.921 F(mand, the te)108 331.2 Q(xt)-.15 E F2 -(deferr)2.5 E(ed err)-.37 E(or)-.45 E F0(is appended.)2.5 E 1.278 -(The sixth line is the error te)108 348 R 1.279 -(xt for the sense code and the sense quali\214er if a)-.15 F -.25(va)-.2 -G 3.779(ilable. If).25 F 1.279(the type of the)3.779 F(de)108 360 Q .012 -(vice is kno)-.25 F .012(wn, the sense data is decoded from tables in) --.25 F F2(scsierr)2.512 E(s.c)-.1 E F0 5.012(.T)2.822 G .012(he te) --5.012 F .012(xt is follo)-.15 F .012(wed by the error v)-.25 F(alue) --.25 E(for a \214eld replaceable unit.)108 372 Q 1.068(The se)108 388.8 -R -.15(ve)-.25 G 1.069 -(nth line prints the block number that is related to the f).15 F 1.069 -(ailed command and te)-.1 F 1.069(xt for se)-.15 F -.15(ve)-.25 G 1.069 -(ral error).15 F(\215ags. The block number may not be v)108 400.8 Q -(alid.)-.25 E .503(The eight line reports the timeout set up for this c\ -ommand and the time that the command realy needed to)108 417.6 R -(complete.)108 429.6 Q/F3 10.95/Times-Bold@0 SF -.11(BU)72 458.4 S(GS) -.11 E(CREDITS)72 470.4 Q(MAILING LISTS)72 482.4 Q -.548(AU)72 494.4 S -(THOR).548 E F0(J)108 506.4 Q -.25(..)-5.5 K(or)-4.5 5.5 M 2.5(gS)-.18 G -(chilling)-2.5 E(Seestr)108 518.4 Q 2.5(.1)-.55 G(10)-2.5 E -(D-13353 Berlin)108 530.4 Q(German)108 542.4 Q(y)-.15 E -(Additional information can be found on:)108 559.2 Q(http://www)108 -571.2 Q(.fokus.fhg.de/usr/schilling/cdrecord.html)-.65 E(If you ha)108 -588 Q .3 -.15(ve s)-.2 H(upport questions, send them to:).15 E F1(cdr) -108 604.8 Q(ecord-support@berlios.de)-.18 E F0(or)108 616.8 Q F1(other) -2.5 E(-cd)-.37 E(write@lists.debian.or)-.15 E(g)-.1 E F0(Of you ha)108 -633.6 Q .3 -.15(ve d)-.2 H(e\214nitely found a b).15 E -(ug, send a mail to:)-.2 E F1(cdr)108 650.4 Q(ecord-de)-.18 E -.1(ve) --.15 G(lopers@berlios.de).1 E F0(or)108 662.4 Q F1(schilling@f)2.5 E -(okus.fhg)-.25 E(.de)-.15 E F0 1.6 -.8(To s)108 679.2 T(ubscribe, use:) -.8 E F1(http://lists.berlios.de/mailman/listinf)108 696 Q(o/cdr)-.25 E -(ecord-de)-.18 E -.1(ve)-.15 G(lopers).1 E F0(or)108 708 Q F1 -(http://lists.berlios.de/mailman/listinf)2.5 E(o/cdr)-.25 E -(ecord-support)-.18 E F0(J)72 768 Q -.25(..)-5.5 K(or)-4.5 5.5 M 2.5(gS) --.18 G 153.065(chilling V)-2.5 F(ersion 2.0)-1.11 E(3)206.225 E EP +save +mark +3 pagesetup +10 R f +(Schily)720 480 w +10 S1 f +(\302)976 480 w +10 R f +( \( 1 \))3 164( SCGCHECK)1 3277(s USER COMMANDS)2 950 3 1009 480 t +9 B f +( O)1 0( SO)1 70( LS)1 50( AL)1 60( A)1 110( EE E)2 60(S SE)1 110 7 720 960 t +10 B f +( d)1 0( rd)1 56( or)1 44( re ec co)3 138( dr)1 44(c cd)1 100 6 1080 1080 t +10 R f +(\(1\),)1462 1080 w +10 B f +( d)1 0( cd)1 56( dc)1 44( ad)1 56(r re ea)2 138 5 1636 1080 t +10 R f +(\(1\),)1930 1080 w +10 B f +( s)1 0( fs)1 39( of)1 33( so)1 50( is)1 39( ki)1 28(m mk)1 139 7 2104 1080 t +10 R f +(\(1\),)2432 1080 w +10 B f +( g)1 0( cg)1 50(s sc)1 83 3 2606 1080 t +10 R f +(\(7\).)2739 1080 w +9 B f +( S)1 0( TE ES)2 110( OT)1 60(N NO)1 135 4 720 1368 t +10 R f +(When using)1 489 1 1080 1488 t +10 B f +( k)1 0( ec ck)2 100( ke)1 44( ck)1 56( gc)1 44( cg)1 50(s sc)1 83 7 1603 1488 t +10 R f +(with the broken)2 645 1 2014 1488 t +10 B f +( .)1 0( er r.)2 69( ve)1 44( iv)1 50( ri)1 28( dr)1 44( d)1 91( c)1 0( ic)1 44( er ri)2 72( ne)1 44( en)1 56( ge)1 44( g)1 85( I)1 0( SI)1 39( CS)1 56( SC)1 72( S)1 91( x)1 0( nu ux)2 106( in)1 56(L Li)1 95 23 2694 1488 t +10 R f +(You should note that)3 866 1 3915 1488 t +10 B f +( k)1 0( ec ck)2 100( he)1 44( ch)1 56( gc)1 44( cg)1 50(s sc)1 83 7 4816 1488 t +10 R f +(uses)5228 1488 w +( the sg driver on)4 709( Unfortunately,)1 658( scg driver.)2 476(a hack, that tries to emulate the functionality of the)9 2180 4 1080 1608 t +10 B f +( x)1 0( nu ux)2 106( in)1 56(L Li)1 95 4 5143 1608 t +10 R f +(has several severe bugs:)3 985 1 1080 1728 t +( cannot see if a SCSI command could not be sent at all.)12 2302(\267 It)1 421 2 1080 1896 t +( cannot get the SCSI status byte.)6 1405(\267 It)1 421 2 1080 2064 t +10 B f +( k)1 0( ec ck)2 100( he)1 44( ch)1 56( gc)1 44( cg)1 50(S Sc)1 100 7 2949 2064 t +10 R f +( cannot report failing SCSI com-)5 1402(for that reason)2 612 2 3386 2064 t +(mands in some situations.)3 1058 1 1440 2184 t +( cannot get real DMA count of transfer.)7 1642(\267 It)1 421 2 1080 2352 t +10 B f +( k)1 0( ec ck)2 100( he)1 44( ch)1 56( gc)1 44( cg)1 50(S Sc)1 100 7 3177 2352 t +10 R f +(cannot tell you if there is an DMA residual)8 1794 1 3606 2352 t +(count.)1440 2472 w +( valid in auto sense data.)5 1097( cannot get number of bytes)5 1222(\267 It)1 421 3 1080 2640 t +10 B f +( k)1 0( ec ck)2 100( he)1 44( ch)1 56( gc)1 44( cg)1 50(S Sc)1 100 7 3901 2640 t +10 R f +(cannot tell you if device)4 1057 1 4343 2640 t +(transfers no sense data at all.)5 1187 1 1440 2760 t +( fetches to few data in auto request sense \(CCS/SCSI-2/SCSI-3 needs)10 2855(\267 It)1 421 2 1080 2928 t +10 S1 f +(>)4389 2928 w +10 R f +(= 18\).)1 247 1 4445 2928 t +9 B f +( S)1 0( CS)1 50( IC)1 65( TI)1 35( ST)1 60( OS)1 50( NO)1 70( GN)1 65( AG)1 70( IA)1 65(D DI)1 100 11 720 3216 t +10 R f +(A typical error message for a SCSI command looks like:)9 2333 1 1080 3336 t +(scgcheck: I/O error. test unit ready: scsi sendcmd: no error)9 2411 1 1440 3576 t +( 20 00 00 00 00)5 665(CDB: 00)1 400 2 1440 3696 t +(status: 0x2 \(CHECK CONDITION\))3 1464 1 1440 3816 t +(Sense Bytes: 70 00 05 00 00 00 00 0A 00 00 00 00 25 00 00 00 00 00)19 2938 1 1440 3936 t +(Sense Key: 0x5 Illegal Request, Segment 0)6 1777 1 1440 4056 t +(Sense Code: 0x25 Qual 0x00 \(logical unit not supported\) Fru 0x0)10 2701 1 1440 4176 t +(Sense \257ags: Blk 0 \(not valid\))5 1204 1 1440 4296 t +(cmd \256nished after 0.002s timeout 40s)5 1545 1 1440 4416 t +( text after the \256rst colon gives)6 1265( The)1 225( of the command.)3 735(The \256rst line gives information about the transport)7 2095 4 1080 4656 t +( from the view of the kernel. It usually is:)9 1740(the error text for the system call)6 1335 2 1080 4776 t +10 B f +( r)1 0( or)1 44( er rr ro)3 138( e)1 78( O)1 0( /O)1 78(I I/)1 67 7 4222 4776 t +10 R f +(unless other prob-)2 739 1 4661 4776 t +( a short description for the SCSI command that fails. The rest of)12 2753(lems happen. The next words contain)5 1567 2 1080 4896 t +( if there were any problems for the transport of the command over the SCSI bus.)15 3361(the line tells you)3 697 2 1080 5016 t +10 B f +( l)1 0( al)1 28( ta)1 50( at)1 33(f fa)1 83 5 5206 5016 t +( r)1 0( or)1 44(e er rr ro)3 182 3 1080 5136 t +10 R f +( was not possible to transport the command \(i.e. no device present at the requested)14 3513(means that it)2 541 2 1346 5136 t +(SCSI address\).)1 602 1 1080 5256 t +(The second line prints the SCSI command descriptor block for the failed command.)12 3439 1 1080 5424 t +( transport of)2 522(The third line gives information on the SCSI status code returned by the command, if the)15 3798 2 1080 5592 t +(the command succeeds. This is error information from the SCSI device.)10 2948 1 1080 5712 t +(The fourth line is a hex dump of the auto request sense information for the command.)15 3537 1 1080 5880 t +( is only)2 313(The \256fth line is the error text for the sense key if available, followed by the segment number that)18 4007 2 1080 6048 t +(valid if the command was a)5 1191 1 1080 6168 t +10 I f +(copy)2314 6168 w +10 R f +( error message is not directly related to the current)9 2162(command. If the)2 693 2 2545 6168 t +(command, the text)2 757 1 1080 6288 t +10 I f +(deferred error)1 582 1 1870 6288 t +10 R f +(is appended.)1 507 1 2485 6288 t +( the type of the)4 651( If)1 137( the sense quali\256er if available.)5 1307(The sixth line is the error text for the sense code and)11 2225 4 1080 6456 t +(device is known, the sense data is decoded from tables in)10 2402 1 1080 6576 t +10 I f +(scsierrs.c)3519 6576 w +10 R f +( by the error)3 523( text is followed)3 683(. The)1 250 3 3944 6576 t +(value for a \256eld replaceable unit.)5 1353 1 1080 6696 t +( to the failed command and text for several error)9 2030(The seventh line prints the block number that is related)9 2290 2 1080 6864 t +(\257ags. The block number may not be valid.)7 1746 1 1080 6984 t +(J)720 7680 w +(. .)1 47 1 759 7625 t +( 3)1 1829( change: Version 3.0)3 850( Last)1 1434(org Schilling)1 528 4 759 7680 t +cleartomark +showpage +restore +%%EndPage: 3 3 +%%Page: 4 4 +save +mark +4 pagesetup +10 R f +(Schily)720 480 w +10 S1 f +(\302)976 480 w +10 R f +( \( 1 \))3 164( SCGCHECK)1 3277(s USER COMMANDS)2 950 3 1009 480 t +( that the command realy needed)5 1332(The eight line reports the timeout set up for this command and the time)13 2988 2 1080 960 t +(to complete.)1 502 1 1080 1080 t +9 B f +( S)1 0( GS)1 50( UG)1 70(B BU)1 125 4 720 1368 t +( S)1 0( TS)1 50( IT)1 60( DI)1 35( ED)1 65(C CR RE)2 190 6 720 1488 t +( S)1 0( TS)1 50( ST)1 60( IS)1 50( LI)1 35( L)1 90( G)1 0( NG)1 70( IN)1 65( LI)1 35( IL)1 60( AI)1 35(M MA)1 150 13 720 1608 t +( R)1 0( HO OR)2 135( TH)1 70(A AU UT)2 190 4 720 1728 t +10 R f +(J)1080 1848 w +(. .)1 47 1 1119 1793 t +(org Schilling)1 528 1 1119 1848 t +(Seestr. 110)1 452 1 1080 1968 t +(D-13353 Berlin)1 638 1 1080 2088 t +(Germany)1080 2208 w +(Additional information can be found on:)5 1658 1 1080 2376 t +(http://cdrecord.berlios.de/private/cdrecord.html)1080 2496 w +(If you have support questions, send them to:)7 1827 1 1080 2664 t +10 B f +( t)1 0( rt)1 33( or)1 44( up pp po)3 162( su)1 56( -s)1 39( d-)1 33( rd)1 56( or)1 44( re ec co)3 138( dr)1 44(c cd)1 100 12 1080 2832 t +10 S1 f +(@ @)1 92 1 1829 2832 t +10 B f +( e)1 0( de)1 44( .d)1 56( s.)1 25( os)1 39( li io)2 78( er rl)2 72(b be)1 100 8 1921 2832 t +10 R f +(If you have de\256nitely found a bug, send a mail to:)10 2075 1 1080 3000 t +10 B f +( s)1 0( er rs)2 83( pe)1 44( op)1 56( lo)1 50( el)1 28( ve)1 44( ev)1 50( de)1 44( -d)1 56( d-)1 33( rd)1 56( or)1 44( re ec co)3 138( dr)1 44(c cd)1 100 16 1080 3168 t +10 S1 f +(@ @)1 92 1 1950 3168 t +10 B f +( e)1 0( de)1 44( .d)1 56( s.)1 25( os)1 39( li io)2 78( er rl)2 72(b be)1 100 8 2042 3168 t +10 R f +(or)1080 3288 w +10 B f +( g)1 0( ng)1 50( il ll li in)4 140( hi)1 28( ch)1 56( sc)1 44( .s)1 39( g.)1 25( er rg)2 94( oe)1 44(j jo)1 83 11 1196 3288 t +10 S1 f +(@ @)1 92 1 1799 3288 t +10 B f +( e)1 0( de)1 44( .d)1 56( er r.)2 69( fe)1 44( of)1 33( un nh ho)3 162( au)1 56( ra)1 50( fr)1 44( .f)1 33( s.)1 25( ku us)2 95( ok)1 56(f fo)1 83 15 1891 3288 t +10 R f +(To subscribe, use:)2 740 1 1080 3456 t +10 B f +( s)1 0( er rs)2 83( pe)1 44( op)1 56( lo)1 50( el)1 28( ve)1 44( ev)1 50( de)1 44( -d)1 56( d-)1 33( rd)1 56( or)1 44( re ec co)3 138( dr)1 44( cd)1 56( /c)1 44( o/)1 28( fo)1 50( nf)1 33( in)1 56( ti)1 28( st)1 33( /l li is)3 95( n/)1 28( an)1 56( ma)1 50( il lm)2 111( ai)1 28( ma)1 50( /m)1 83( e/)1 28( de)1 44( .d)1 56( s.)1 25( os)1 39( li io)2 78( er rl)2 72( be)1 44( .b)1 56( s.)1 25( ts)1 39( st)1 33( // /l li is)4 123( :/)1 28( p:)1 33( tt tp)2 89(h ht)1 89 48 1080 3624 t +10 R f +(or)1080 3744 w +10 B f +( t)1 0( rt)1 33( or)1 44( up pp po)3 162( su)1 56( -s)1 39( d-)1 33( rd)1 56( or)1 44( re ec co)3 138( dr)1 44( cd)1 56( /c)1 44( o/)1 28( fo)1 50( nf)1 33( in)1 56( ti)1 28( st)1 33( /l li is)3 95( n/)1 28( an)1 56( ma)1 50( il lm)2 111( ai)1 28( ma)1 50( /m)1 83( e/)1 28( de)1 44( .d)1 56( s.)1 25( os)1 39( li io)2 78( er rl)2 72( be)1 44( .b)1 56( s.)1 25( ts)1 39( st)1 33( // /l li is)4 123( :/)1 28( p:)1 33( tt tp)2 89(h ht)1 89 44 1196 3744 t +10 R f +(J)720 7680 w +(. .)1 47 1 759 7625 t +( 4)1 1829( change: Version 3.0)3 850( Last)1 1434(org Schilling)1 528 4 759 7680 t +cleartomark +showpage +restore +%%EndPage: 4 4 %%Trailer -end -%%EOF +done +%%DocumentFonts: Times-Roman Times-Bold Times-Italic +%%Pages: 4 diff -Nru cdrtools-2.01.01a33/doc/scgskeleton.man cdrtools-3.02a09/doc/scgskeleton.man --- cdrtools-2.01.01a33/doc/scgskeleton.man 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/doc/scgskeleton.man 2010-05-30 15:59:31.000000000 +0000 @@ -0,0 +1,396 @@ + + + +Schily's USER COMMANDS SCGSKELETON(1L) + + + +NNAAMMEE + scgskeleton - Skeleton program for SCSI transport using + libscg + +SSYYNNOOPPSSIISS + ssccggsskkeelleettoonn ddeevv==_d_e_v_i_c_e [ _o_p_t_i_o_n_s ] + +DDEESSCCRRIIPPTTIIOONN + SSccggsskkeelleettoonn is s skeleton program to demonstrate the inter- + faces and capabilities of the SCSI transport library lliibbssccgg. + + DDeevviiccee nnaammiinngg + For a list of possible device name parameters call ssccggsskkeellee-- + ttoonn -ssccaannbbuuss or ssccggsskkeelleettoonn ddeevv==hheellpp and then use the right + ddeevv== parameter based on the device listing. + + +OOPPTTIIOONNSS + -hheellpp + Prints a short summary of the pp options and exists. + + -vveerrssiioonn + Print version information and exit. + + ddeevv==_t_a_r_g_e_t + Set the SCSI target for the CD/DVD/BluRay-Recorder, see + notes above. A typical target device specification is + ddeevv==_1,_6,_0 . If a filename must be provided together + with the numerical target specification, the filename + is implementation specific. The correct filename in + this case can be found in the system specific manuals + of the target operating system. On a _F_r_e_e_B_S_D system + without _C_A_M support, you need to use the control device + (e.g. /_d_e_v/_r_c_d_0._c_t_l). A correct device specification + in this case may be ddeevv==/_d_e_v/_r_c_d_0._c_t_l:@ . + + GGeenneerraall SSCCSSII aaddddrreessssiinngg + The _t_a_r_g_e_t _d_e_v_i_c_e to the ddeevv== option refers to + _s_c_s_i_b_u_s/_t_a_r_g_e_t/_l_u_n of the CD/DVD/BluRay-Recorder. Com- + munication on _S_u_n_O_S is done with the SCSI general + driver ssccgg.. Other operating systems are using a library + simulation of this driver. Possible syntax is: ddeevv== + _s_c_s_i_b_u_s,_t_a_r_g_e_t,_l_u_n or ddeevv== _t_a_r_g_e_t,_l_u_n. In the latter + case, the CD/DVD/BluRay-Recorder has to be connected to + the default SCSI bus of the machine. _S_c_s_i_b_u_s, _t_a_r_g_e_t + and _l_u_n are integer numbers. Some operating systems or + SCSI transport implementations may require to specify a + filename in addition. In this case the correct syntax + for the device is: ddeevv== _d_e_v_i_c_e_n_a_m_e:_s_c_s_i_b_u_s,_t_a_r_g_e_t, or + ddeevv== _d_e_v_i_c_e_n_a_m_e:_t_a_r_g_e_t,_l_u_n. If the name of the device + node that has been specified on such a system refers to + exactly one SCSI device, a shorthand in the form ddeevv== + + + +Joerg Schilling Last change: 2010/05/13 1 + + + + + + +Schily's USER COMMANDS SCGSKELETON(1L) + + + + _d_e_v_i_c_e_n_a_m_e:@ or ddeevv== _d_e_v_i_c_e_n_a_m_e:@,_l_u_n may be used + instead of ddeevv== _d_e_v_i_c_e_n_a_m_e:_s_c_s_i_b_u_s,_t_a_r_g_e_t, + + RReemmoottee SSCCSSII aaddddrreessssiinngg + To access remote SCSI devices, you need to prepend the + SCSI device name by a remote device indicator. The + remote device indicator is either RREEMMOOTTEE::_u_s_e_r@_h_o_s_t: or + RREEMMOOTTEE::_h_o_s_t: A valid remote SCSI device name may be: + RREEMMOOTTEE::_u_s_e_r@_h_o_s_t: to allow remote SCSI bus scanning or + RREEMMOOTTEE::_u_s_e_r@_h_o_s_t:_1,_0,_0 to access the SCSI device at + _h_o_s_t connected to SCSI bus # 1,target 0, lun 0. In + order to allow remote access to a specific _h_o_s_t, the + rrssccssii(1) program needs to be present and configured on + the _h_o_s_t. + + AAlltteerrnnaattee SSCCSSII ttrraannssppoorrttss + AATTAAPPII drives are just SSCCSSII drives that inherently use + the _A_T_A _p_a_c_k_e_t _i_n_t_e_r_f_a_c_e as SSCCSSII command transport + layer build into the IDE (ATA) transport. You may need + to specify an alternate transport layer on the command + line if your OS does not implement a fully integrated + kernel driver subsystem that allows to access any drive + using SSCCSSII commands via a single unique user interface. + + To access SCSI devices via alternate transport layers, + you need to prepend the SCSI device name by a transport + layer indicator. The transport layer indicator may be + something like UUSSCCSSII:: or AATTAAPPII::. To get a list of sup- + ported transport layers for your platform, use ddeevv== + _H_E_L_P: + + PPoorrttaabbiilliittyy BBaacckkggrroouunndd + To make ssccggsskkeelleettoonn portable to all UNIX platforms, the + syntax ddeevv== _d_e_v_i_c_e_n_a_m_e:_s_c_s_i_b_u_s,_t_a_r_g_e_t, is preferred as + it hides OS specific knowledge about device names from + the user. A specific OS may not necessarily support a + way to specify a real device file name nor a way to + specify _s_c_s_i_b_u_s,_t_a_r_g_e_t,_l_u_n. + + _S_c_s_i_b_u_s 0 is the default SCSI bus on the machine. Watch + the boot messages for more information or look into + //vvaarr//aaddmm//mmeessssaaggeess for more information about the SCSI + configuration of your machine. If you have problems to + figure out what values for _s_c_s_i_b_u_s,_t_a_r_g_e_t,_l_u_n should be + used, try the -ssccaannbbuuss option of ssccggsskkeelleettoonn described + below. + + UUssiinngg llooggiiccaall nnaammeess ffoorr ddeevviicceess + If no _d_e_v option is present, ssccggsskkeelleettoonn will try to + get the device from the CCDDRR__DDEEVVIICCEE environment. + + If a file /etc/default/cdrecord exists, and if the + + + +Joerg Schilling Last change: 2010/05/13 2 + + + + + + +Schily's USER COMMANDS SCGSKELETON(1L) + + + + argument to the ddeevv== option or the CCDDRR__DDEEVVIICCEE environ- + ment does not contain the characters ',', '/', '@' or + ':', it is interpreted as a device label name that was + defined in the file /etc/default/cdrecord (see FILES + section). + + AAuuttoottaarrggeett MMooddee + If no ddeevv== option and no CCDDRR__DDEEVVIICCEE environment is + present, or if it only contains a transport specifyer + but no address notation, ssccggsskkeelleettoonn tries to scan the + SCSI address space for CD-ROM drives. If exactly one + is found, this is used by default. + + ttiimmeeoouutt==# + Set the default SCSI command timeout value to # + seconds. The default SCSI command timeout is the + minimum timeout used for sending SCSI commands. If a + SCSI command fails due to a timeout, you may try to + raise the default SCSI command timeout above the + timeout value of the failed command. If the command + runs correctly with a raised command timeout, please + report the better timeout value and the corresponding + command to the author of the program. If no _t_i_m_e_o_u_t + option is present, a default timeout of 40 seconds is + used. + + ddeebbuugg==#, --dd + Set the misc debug value to # (with debug=#) or incre- + ment the misc debug level by one (with -d). If you + specify -_d_d, this equals to ddeebbuugg==_2. This may help to + find problems while opening a driver for libscg. as + well as with sector sizes and sector types. Using + -ddeebbuugg slows down the process and may be the reason for + a buffer underrun. + + kkddeebbuugg==#, kkdd==# + Tell the ssccgg-driver to modify the kernel debug value + while SCSI commands are running. + + -ssiilleenntt, -ss + Do not print out a status report for failed SCSI com- + mands. + + -vv Increment the level of general verbosity by one. This + is used e.g. to display the progress of the process. + + -VV Increment the verbose level with respect of SCSI com- + mand transport by one. This helps to debug problems + during the process, that occur in the CD-Recorder. If + you get incomprehensible error messages you should use + this flag to get more detailed output. -VVVV will show + data buffer content in addition. Using -VV or -VVVV slows + + + +Joerg Schilling Last change: 2010/05/13 3 + + + + + + +Schily's USER COMMANDS SCGSKELETON(1L) + + + + down the process. -ssccaannbbuuss Scan all SCSI devices on + all SCSI busses and print the inquiry strings. This + option may be used to find SCSI address of the devices + on a system. The numbers printed out as labels are + computed by: bbuuss ** 110000 ++ ttaarrggeett + + ttss==# Set the maximum transfer size for a single SCSI command + to #. The syntax for the ttss== option is the same as for + cdrecord fs=# or sdd bs=#. + + If no ttss== option has been specified, ssccggsskkeelleettoonn + defaults to a transfer size of 256 kB. If libscg gets + lower values from the operating system, the value is + reduced to the maximum value that is possible with the + current operating system. Sometimes, it may help to + further reduce the transfer size or to enhance it, but + note that it may take a long time to find a better + value by experimenting with the ttss== option. + + + +EEXXAAMMPPLLEESS +EENNVVIIRROONNMMEENNTT + RRSSHH If the RRSSHH environment is present, the remote connec- + tion will not be created via rrccmmdd(3) but by calling the + program pointed to by RRSSHH. Use e.g. RRSSHH==/usr/bin/ssh + to create a secure shell connection. + + Note that this forces ccddrreeccoorrdd to create a pipe to the + rrsshh((11)) program and disallows ccddrreeccoorrdd to directly + access the network socket to the remote server. This + makes it impossible to set up performance parameters + and slows down the connection compared to a rroooott ini- + tiated rrccmmdd((33)) connection. + + RRSSCCSSII + If the RRSSCCSSII environment is present, the remote SCSI + server will not be the program //oopptt//sscchhiillyy//ssbbiinn//rrssccssii + but the program pointed to by RRSSCCSSII. Note that the + remote SCSI server program name will be ignored if you + log in using an account that has been created with a + remote SCSI server program as login shell. + +SSEEEE AALLSSOO + ccddrreeccoorrdd(1), ssccgg(7), rrccmmdd(3), sssshh(1). + +NNOOTTEESS +DDIIAAGGNNOOSSTTIICCSS + A typical error message for a SCSI command looks like: + + scgskeleton: I/O error. test unit ready: scsi sendcmd: no error + CDB: 00 20 00 00 00 00 + + + +Joerg Schilling Last change: 2010/05/13 4 + + + + + + +Schily's USER COMMANDS SCGSKELETON(1L) + + + + status: 0x2 (CHECK CONDITION) + Sense Bytes: 70 00 05 00 00 00 00 0A 00 00 00 00 25 00 00 00 00 00 + Sense Key: 0x5 Illegal Request, Segment 0 + Sense Code: 0x25 Qual 0x00 (logical unit not supported) Fru 0x0 + Sense flags: Blk 0 (not valid) + cmd finished after 0.002s timeout 40s + + The first line gives information about the transport of the + command. The text after the first colon gives the error + text for the system call from the view of the kernel. It + usually is: II//OO eerrrroorr unless other problems happen. The + next words contain a short description for the SCSI command + that fails. The rest of the line tells you if there were any + problems for the transport of the command over the SCSI bus. + ffaattaall eerrrroorr means that it was not possible to transport the + command (i.e. no device present at the requested SCSI + address). + + The second line prints the SCSI command descriptor block for + the failed command. + + The third line gives information on the SCSI status code + returned by the command, if the transport of the command + succeeds. This is error information from the SCSI device. + + The fourth line is a hex dump of the auto request sense + information for the command. + + The fifth line is the error text for the sense key if avail- + able, followed by the segment number that is only valid if + the command was a _c_o_p_y command. If the error message is not + directly related to the current command, the text _d_e_f_e_r_r_e_d + _e_r_r_o_r is appended. + + The sixth line is the error text for the sense code and the + sense qualifier if available. If the type of the device is + known, the sense data is decoded from tables in _s_c_s_i_e_r_r_s._c . + The text is followed by the error value for a field replace- + able unit. + + The seventh line prints the block number that is related to + the failed command and text for several error flags. The + block number may not be valid. + + The eight line reports the timeout set up for this command + and the time that the command really needed to complete. + + +BBUUGGSS +AAUUTTHHOORR + Joerg Schilling + Seestr. 110 + + + +Joerg Schilling Last change: 2010/05/13 5 + + + + + + +Schily's USER COMMANDS SCGSKELETON(1L) + + + + D-13353 Berlin + Germany + + Additional information can be found on: + http://cdrecord.berlios.de/private/cdrecord.html + + If you have support questions, send them to: + + ccddrreeccoorrdd--ssuuppppoorrtt@@bbeerrlliiooss..ddee + + If you have definitely found a bug, send a mail to: + + ccddrreeccoorrdd--ddeevveellooppeerrss@@bbeerrlliiooss..ddee + or jjooeerrgg..sscchhiilllliinngg@@ffookkuuss..ffrraauunnhhooffeerr..ddee + + To subscribe, use: + + hhttttpp::////lliissttss..bbeerrlliiooss..ddee//mmaaiillmmaann//lliissttiinnffoo//ccddrreeccoorrdd--ddeevveellooppeerrss + or hhttttpp::////lliissttss..bbeerrlliiooss..ddee//mmaaiillmmaann//lliissttiinnffoo//ccddrreeccoorrdd--ssuuppppoorrtt + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +Joerg Schilling Last change: 2010/05/13 6 + + + diff -Nru cdrtools-2.01.01a33/doc/scgskeleton.ps cdrtools-3.02a09/doc/scgskeleton.ps --- cdrtools-2.01.01a33/doc/scgskeleton.ps 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/doc/scgskeleton.ps 2010-05-30 15:59:54.000000000 +0000 @@ -0,0 +1,1146 @@ +%!PS +%%Version: 3.15 +%%DocumentFonts: (atend) +%%Pages: (atend) +%%EndComments +% +% Copyright 2005 Sun Microsystems, Inc. All rights reserved. +% Use is subject to license terms. +% +% CDDL HEADER START +% +% The contents of this file are subject to the terms of the +% Common Development and Distribution License, Version 1.0 only +% (the "License"). You may not use this file except in compliance +% with the License. +% +% You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE +% or http://www.opensolaris.org/os/licensing. +% See the License for the specific language governing permissions +% and limitations under the License. +% +% When distributing Covered Code, include this CDDL HEADER in each +% file and include the License file at usr/src/OPENSOLARIS.LICENSE. +% If applicable, add the following below this CDDL HEADER, with the +% fields enclosed by brackets "[]" replaced with your own identifying +% information: Portions Copyright [yyyy] [name of copyright owner] +% +% CDDL HEADER END +% +%ident "%Z%%M% %I% %E% SMI" +% +% Version 3.16 prologue for troff files. +% + +/#copies 1 store +/aspectratio 1 def +/formsperpage 1 def +/landscape false def +/linewidth .3 def +/magnification 1 def +/margin 0 def +/orientation 0 def +/resolution 720 def +/xoffset 0 def +/yoffset 0 def + +/roundpage true def +/useclippath true def +/pagebbox [0 0 612 792] def + +/R /Times-Roman def +/I /Times-Italic def +/B /Times-Bold def +/BI /Times-BoldItalic def +/H /Helvetica def +/HI /Helvetica-Oblique def +/HB /Helvetica-Bold def +/HX /Helvetica-BoldOblique def +/CW /Courier def +/CO /Courier def +/CI /Courier-Oblique def +/CB /Courier-Bold def +/CX /Courier-BoldOblique def +/PA /Palatino-Roman def +/PI /Palatino-Italic def +/PB /Palatino-Bold def +/PX /Palatino-BoldItalic def +/Hr /Helvetica-Narrow def +/Hi /Helvetica-Narrow-Oblique def +/Hb /Helvetica-Narrow-Bold def +/Hx /Helvetica-Narrow-BoldOblique def +/KR /Bookman-Light def +/KI /Bookman-LightItalic def +/KB /Bookman-Demi def +/KX /Bookman-DemiItalic def +/AR /AvantGarde-Book def +/AI /AvantGarde-BookOblique def +/AB /AvantGarde-Demi def +/AX /AvantGarde-DemiOblique def +/NR /NewCenturySchlbk-Roman def +/NI /NewCenturySchlbk-Italic def +/NB /NewCenturySchlbk-Bold def +/NX /NewCenturySchlbk-BoldItalic def +/ZD /ZapfDingbats def +/ZI /ZapfChancery-MediumItalic def +/VR /Varitimes#Roman def +/VI /Varitimes#Italic def +/VB /Varitimes#Bold def +/VX /Varitimes#BoldItalic def +/S /S def +/S1 /S1 def +/GR /Symbol def + +/inch {72 mul} bind def +/min {2 copy gt {exch} if pop} bind def + +/setup { + counttomark 2 idiv {def} repeat pop + + landscape {/orientation 90 orientation add def} if + /scaling 72 resolution div def + linewidth setlinewidth + 1 setlinecap + + pagedimensions + xcenter ycenter translate + orientation neg rotate + width 2 div neg height 2 div translate + xoffset inch yoffset inch translate + margin 2 div dup neg translate + magnification dup aspectratio mul scale + scaling scaling scale + + /Symbol /S Sdefs cf + /Times-Roman /S1 S1defs cf + 0 0 moveto +} def + +/pagedimensions { + useclippath userdict /gotpagebbox known not and { + /pagebbox [clippath pathbbox newpath] def + roundpage currentdict /roundpagebbox known and {roundpagebbox} if + } if + pagebbox aload pop + 4 -1 roll exch 4 1 roll 4 copy + landscape {4 2 roll} if + sub /width exch def + sub /height exch def + add 2 div /xcenter exch def + add 2 div /ycenter exch def + userdict /gotpagebbox true put +} def + +/pagesetup { + /page exch def + currentdict /pagedict known currentdict page known and { + page load pagedict exch get cvx exec + } if +} def + +/decodingdefs [ + {counttomark 2 idiv {y moveto show} repeat} + {neg /y exch def counttomark 2 idiv {y moveto show} repeat} + {neg moveto {2 index stringwidth pop sub exch div 0 32 4 -1 roll widthshow} repeat} + {neg moveto {spacewidth sub 0.0 32 4 -1 roll widthshow} repeat} + {counttomark 2 idiv {y moveto show} repeat} + {neg setfunnytext} +] def + +/setdecoding {/t decodingdefs 3 -1 roll get bind def} bind def + +/w {neg moveto show} bind def +/m {neg dup /y exch def moveto} bind def +/done {/lastpage where {pop lastpage} if} def + +/f { + dup /font exch def findfont exch + dup /ptsize exch def scaling div dup /size exch def scalefont setfont + linewidth ptsize mul scaling 10 mul div setlinewidth + /spacewidth ( ) stringwidth pop def +} bind def + +/changefont { + /fontheight exch def + /fontslant exch def + currentfont [ + 1 0 + fontheight ptsize div fontslant sin mul fontslant cos div + fontheight ptsize div + 0 0 + ] makefont setfont +} bind def + +/sf {f} bind def + +/cf { + dup length 2 idiv + /entries exch def + /chtab exch def + /newfont exch def + + findfont dup length 1 add dict + /newdict exch def + {1 index /FID ne {newdict 3 1 roll put} {pop pop} ifelse} forall + + newdict /Metrics entries dict put + newdict /Metrics get + begin + chtab aload pop + 1 1 entries {pop def} for + newfont newdict definefont pop + end +} bind def + +% +% A few arrays used to adjust reference points and character widths in some +% of the printer resident fonts. If square roots are too high try changing +% the lines describing /radical and /radicalex to, +% +% /radical [0 -75 550 0] +% /radicalex [-50 -75 500 0] +% + +/Sdefs [ + /bracketlefttp [220 500] + /bracketleftbt [220 500] + /bracketrighttp [-70 380] + /bracketrightbt [-70 380] + /braceleftbt [220 490] + /bracketrightex [220 -125 500 0] + /radical [0 0 550 0] + % NeWSprint's \(br is too low, compensate + statusdict /product get (NeWS Server) eq { + /radicalex [-50 100 500 0] + /parenleftex [-20 100 0 0] + + } { + /radicalex [-50 0 500 0] + /parenleftex [-20 -170 0 0] + } ifelse + /integral [100 -50 500 0] + /infinity [10 -75 730 0] +] def + +/S1defs [ + /underscore [0 80 500 0] + /endash [7 90 650 0] +] def +%%EndProlog +%%BeginSetup +mark +/resolution 720 def +setup +2 setdecoding +%%EndSetup +%%Page: 1 1 +save +mark +1 pagesetup +10 R f +(Schily)720 480 w +10 S1 f +(\302)976 480 w +10 R f +( \( 1L \))3 225( SCGSKELETON)1 3216(s USER COMMANDS)2 950 3 1009 480 t +9 B f +( E)1 0( ME)1 60(N NA AM)2 215 3 720 960 t +10 R f +(scgskeleton)1080 1080 w +10 S1 f +(\261)1579 1080 w +10 R f +(Skeleton program for SCSI transport using libscg)6 2025 1 1677 1080 t +9 B f +( S)1 0( IS)1 50( SI)1 35( PS)1 50( OP)1 55( YN NO)2 135(S SY)1 115 7 720 1248 t +10 B f +( =)1 0( v=)1 57( ev)1 50( de)1 44( d)1 89( n)1 0( on)1 56( to)1 50( et)1 33( le)1 44( el)1 28( ke)1 44( sk)1 56( gs)1 39( cg)1 50(s sc)1 83 16 1080 1368 t +10 I f +(device)1803 1368 w +10 R f +([)2090 1368 w +10 I f +(options)2156 1368 w +10 R f +(])2484 1368 w +9 B f +( N)1 0( ON)1 65( IO)1 70( TI)1 35( PT)1 60( IP)1 55( CR RI)2 100( SC)1 65( ES)1 50(D DE)1 125 10 720 1536 t +10 B f +( n)1 0( on)1 56( to)1 50( et)1 33( le)1 44( el)1 28( ke)1 44( sk)1 56( gs)1 39( cg)1 50(S Sc)1 100 11 1080 1656 t +10 R f +( demonstrate the interfaces and capabilities of the SCSI transport)9 2755(is s skeleton program to)4 1023 2 1622 1656 t +(library)1080 1776 w +10 B f +( g)1 0( cg)1 50( sc)1 44( bs)1 39(l li ib)2 112 5 1379 1776 t +10 R f +(.)1624 1776 w +9 B f +( g)1 0( ng)1 45( in)1 50( mi)1 25( am)1 75( na)1 45( n)1 80( ce e)2 40( ic)1 40( vi)1 25( ev)1 45(D De)1 105 12 900 1944 t +10 R f +( possible device name parameters call)5 1585(For a list of)3 506 2 1080 2064 t +10 B f +( n)1 0( on)1 56( to)1 50( et)1 33( le)1 44( el)1 28( ke)1 44( sk)1 56( gs)1 39( cg)1 50(s sc)1 83 11 3211 2064 t +10 S1 f +(\261 \261)1 65 1 3734 2064 t +10 B f +( s)1 0( nb bu us)3 151( an)1 56( ca)1 50(s sc)1 83 5 3799 2064 t +10 R f +(or)4179 2064 w +10 B f +( p)1 0( lp)1 56( el)1 28( he)1 44( =h)1 56( v=)1 57( ev)1 50( de)1 44( d)1 96( n)1 0( on)1 56( to)1 50( et)1 33( le)1 44( el)1 28( ke)1 44( sk)1 56( gs)1 39( cg)1 50(s sc)1 83 20 4302 2064 t +10 R f +(and)5256 2064 w +(then use the right)3 715 1 1080 2184 t +10 B f +( =)1 0( v=)1 57( ev)1 50(d de)1 100 4 1828 2184 t +10 R f +(parameter based on the device listing.)5 1548 1 2068 2184 t +9 B f +( S)1 0( NS)1 50( ON)1 65( IO)1 70( TI)1 35( PT)1 60(O OP)1 125 7 720 2472 t +10 S1 f +(\261 \261)1 65 1 1080 2592 t +10 B f +( p)1 0( lp)1 56( el)1 28(h he)1 100 4 1145 2592 t +10 R f +(Prints a short summary of the)5 1220 1 1440 2592 t +10 B f +(p p)1 56 1 2693 2592 t +10 R f +(options and exists.)2 758 1 2782 2592 t +10 S1 f +(\261 \261)1 65 1 1080 2760 t +10 B f +( n)1 0( on)1 56( io)1 50( si)1 28( er rs)2 83(v ve)1 94 6 1145 2760 t +10 R f +(Print version information and exit.)4 1412 1 1440 2880 t +10 B f +( =)1 0( v=)1 57( ev)1 50(d de)1 100 4 1080 3048 t +10 I f +(target)1287 3048 w +10 R f +( typical target dev-)3 796( A)1 145(Set the SCSI target for the CD/DVD/BluRay-Recorder, see notes above.)9 3019 3 1440 3168 t +(ice speci\256cation is)2 762 1 1440 3288 t +10 B f +( =)1 0( v=)1 57( ev)1 50(d de)1 100 4 2239 3288 t +10 I f +(1,6,0)2446 3288 w +10 R f +( a \256lename must be provided together with the numerical tar-)10 2556(. If)1 161 2 2683 3288 t +( correct \256lename in this case can)6 1374( The)1 225( implementation speci\256c.)2 1032(get speci\256cation, the \256lename is)4 1329 4 1440 3408 t +( a)1 81( On)1 192( the system speci\256c manuals of the target operating system.)9 2483(be found in)2 481 4 1440 3528 t +10 I f +(FreeBSD)4714 3528 w +10 R f +(system)5122 3528 w +(without)1440 3648 w +10 I f +(CAM)1780 3648 w +10 R f +( use the control device \(e.g.)5 1150(support, you need to)3 843 2 2025 3648 t +10 I f +(/dev/rcd0.ctl)4086 3648 w +10 R f +( correct device)2 606(\). A)1 198 2 4596 3648 t +(speci\256cation in this case may be)5 1330 1 1440 3768 t +10 B f +( =)1 0( v=)1 57( ev)1 50(d de)1 100 4 2803 3768 t +10 I f +(/dev/rcd0.ctl:)3010 3768 w +10 S1 f +(@)3545 3768 w +10 R f +(.)3670 3768 w +10 B f +( g)1 0( ng)1 50( in)1 56( ss si)2 67( re es)2 83( dd dr)2 100( ad)1 56( a)1 83( I)1 0( SI)1 39( CS)1 56( SC)1 72( S)1 89( l)1 0( al)1 28( er ra)2 94( ne)1 44( en)1 56(G Ge)1 122 19 1240 4008 t +10 R f +(The)1440 4128 w +10 I f +(target device)1 548 1 1650 4128 t +10 R f +(to the)1 255 1 2253 4128 t +10 B f +( =)1 0( v=)1 57( ev)1 50(d de)1 100 4 2563 4128 t +10 R f +(option refers to)2 670 1 2825 4128 t +10 I f +(scsibus)3550 4128 w +10 R f +(/)3847 4128 w +10 I f +(target)3875 4128 w +10 R f +(/)4122 4128 w +10 I f +(lun)4150 4128 w +10 R f +(of the CD/DVD/BluRay-)2 1067 1 4333 4128 t +(Recorder. Communication on)2 1211 1 1440 4248 t +10 I f +(SunOS)2689 4248 w +10 R f +( the SCSI general driver)4 1013(is done with)2 515 2 2999 4248 t +10 B f +( .)1 0( g.)1 25( cg)1 50(s sc)1 83 4 4564 4248 t +10 R f +(Other operating)1 641 1 4759 4248 t +( is:)1 189( syntax)1 354( Possible)1 460(systems are using a library simulation of this driver.)8 2623 4 1440 4368 t +10 B f +( =)1 0( v=)1 57( ev)1 50(d de)1 100 4 5193 4368 t +10 I f +(scsibus)1440 4488 w +10 R f +(,)1737 4488 w +10 I f +(target)1762 4488 w +10 R f +(,)2009 4488 w +10 I f +(lun)2034 4488 w +10 R f +(or)2201 4488 w +10 B f +( =)1 0( v=)1 57( ev)1 50(d de)1 100 4 2323 4488 t +10 I f +(target)2569 4488 w +10 R f +(,)2816 4488 w +10 I f +(lun)2841 4488 w +10 R f +( to)1 116( the latter case, the CD/DVD/BluRay-Recorder has)6 2127(. In)1 180 3 2977 4488 t +( SCSI bus of the machine.)5 1184(be connected to the default)4 1183 2 1440 4608 t +10 I f +(Scsibus)3893 4608 w +10 R f +(,)4201 4608 w +10 I f +(target)4279 4608 w +10 R f +(and)4571 4608 w +10 I f +(lun)4768 4608 w +10 R f +(are integer)1 451 1 4949 4608 t +( require to specify a)4 852(numbers. Some operating systems or SCSI transport implementations may)8 3108 2 1440 4728 t +( this case the correct syntax for the device is:)9 2441( In)1 213(\256lename in addition.)2 969 3 1440 4848 t +10 B f +( =)1 0( v=)1 57( ev)1 50(d de)1 100 4 5193 4848 t +10 I f +(devicename)1440 4968 w +10 R f +(:)1918 4968 w +10 I f +(scsibus)1946 4968 w +10 R f +(,)2243 4968 w +10 I f +(target)2268 4968 w +10 R f +(, or)1 143 1 2515 4968 t +10 B f +( =)1 0( v=)1 57( ev)1 50(d de)1 100 4 2693 4968 t +10 I f +(devicename)2935 4968 w +10 R f +(:)3413 4968 w +10 I f +(target)3441 4968 w +10 R f +(,)3688 4968 w +10 I f +(lun)3713 4968 w +10 R f +( the name of the device node that)7 1392(. If)1 159 2 3849 4968 t +( the form)2 390(has been speci\256ed on such a system refers to exactly one SCSI device, a shorthand in)15 3570 2 1440 5088 t +10 B f +( =)1 0( v=)1 57( ev)1 50(d de)1 100 4 1440 5208 t +10 I f +(devicename)1756 5208 w +10 R f +(:)2234 5208 w +10 S1 f +(@)2262 5208 w +10 R f +(or)2463 5208 w +10 B f +( =)1 0( v=)1 57( ev)1 50(d de)1 100 4 2655 5208 t +10 I f +(devicename)2971 5208 w +10 R f +(:)3449 5208 w +10 S1 f +(@)3477 5208 w +10 R f +(,)3577 5208 w +10 I f +(lun)3602 5208 w +10 R f +(may be used instead of)4 1247 1 3838 5208 t +10 B f +( =)1 0( v=)1 57( ev)1 50(d de)1 100 4 5193 5208 t +10 I f +(devicename)1440 5328 w +10 R f +(:)1918 5328 w +10 I f +(scsibus)1946 5328 w +10 R f +(,)2243 5328 w +10 I f +(target)2268 5328 w +10 R f +(,)2515 5328 w +10 B f +( g)1 0( ng)1 50( in)1 56( ss si)2 67( re es)2 83( dd dr)2 100( ad)1 56( a)1 83( I)1 0( SI)1 39( CS)1 56( SC)1 72( S)1 89( e)1 0( te)1 44( ot)1 33( mo)1 50( em)1 83(R Re)1 116 19 1240 5568 t +10 R f +( to prepend the SCSI device name by a remote device)10 2240(To access remote SCSI devices, you need)6 1720 2 1440 5688 t +(indicator. The remote device indicator is either)6 1961 1 1440 5808 t +10 B f +( :)1 0( TE E:)2 100( OT)1 67( MO)1 78( EM)1 94(R RE)1 139 6 3441 5808 t +10 I f +(user)3919 5808 w +10 S1 f +(@)4091 5808 w +10 I f +(host:)4183 5808 w +10 R f +(or)4456 5808 w +10 B f +( :)1 0( TE E:)2 100( OT)1 67( MO)1 78( EM)1 94(R RE)1 139 6 4578 5808 t +10 I f +(host:)5056 5808 w +10 R f +(A)5328 5808 w +(valid remote SCSI device name may be:)6 1741 1 1440 5928 t +10 B f +( :)1 0( TE E:)2 100( OT)1 67( MO)1 78( EM)1 94(R RE)1 139 6 3261 5928 t +10 I f +(user)3739 5928 w +10 S1 f +(@)3911 5928 w +10 I f +(host:)4003 5928 w +10 R f +( bus)1 187(to allow remote SCSI)3 930 2 4283 5928 t +(scanning or)1 482 1 1440 6048 t +10 B f +( :)1 0( TE E:)2 100( OT)1 67( MO)1 78( EM)1 94(R RE)1 139 6 1966 6048 t +10 I f +(user)2444 6048 w +10 S1 f +(@)2616 6048 w +10 I f +(host:1,0,0)2708 6048 w +10 R f +( SCSI device at)3 673(to access the)2 542 2 3152 6048 t +10 I f +(host)4410 6048 w +10 R f +(connected to SCSI)2 780 1 4620 6048 t +(bus)1440 6168 w +10 S1 f +(#)1614 6168 w +10 R f +( to a speci\256c)3 535( order to allow remote access)5 1216( In)1 151(1,target 0, lun 0.)3 685 4 1699 6168 t +10 I f +(host)4322 6168 w +10 R f +(, the)1 183 1 4497 6168 t +10 B f +( i)1 0( si)1 28( cs)1 39( sc)1 44(r rs)1 83 5 4716 6168 t +10 R f +(\(1\) program)1 490 1 4910 6168 t +(needs to be present and con\256gured on the)7 1711 1 1440 6288 t +10 I f +(host)3184 6288 w +10 R f +(.)3359 6288 w +10 B f +( s)1 0( ts)1 39( rt)1 33( or)1 44( po)1 50( sp)1 56( ns)1 39( an)1 56( ra)1 50( tr)1 44( t)1 66( I)1 0( SI)1 39( CS)1 56( SC)1 72( S)1 89( e)1 0( te)1 44( at)1 33( na)1 50( er rn)2 100( te)1 44( lt)1 33(A Al)1 100 24 1240 6528 t +( I)1 0( PI)1 39( AP)1 61( TA)1 72(A AT)1 139 5 1440 6648 t +10 R f +(drives are just)2 584 1 1788 6648 t +10 B f +( I)1 0( SI)1 39( CS)1 56(S SC)1 128 4 2409 6648 t +10 R f +(drives that inherently use the)4 1202 1 2669 6648 t +10 I f +(ATA packet interface)2 867 1 3908 6648 t +10 R f +(as)4813 6648 w +10 B f +( I)1 0( SI)1 39( CS)1 56(S SC)1 128 4 4934 6648 t +10 R f +(com-)5195 6648 w +( may need to specify an alternate)6 1367( You)1 239( IDE \(ATA\) transport.)3 919(mand transport layer build into the)5 1435 4 1440 6768 t +( if your OS does not implement a fully integrated kernel)10 2402( line)1 224(transport layer on the command)4 1334 3 1440 6888 t +( allows to access any drive using)6 1357(driver subsystem that)2 873 2 1440 7008 t +10 B f +( I)1 0( SI)1 39( CS)1 56(S SC)1 128 4 3703 7008 t +10 R f +(commands via a single unique user)5 1441 1 3959 7008 t +(interface.)1440 7128 w +(J)720 7680 w +(. .)1 47 1 759 7625 t +( 1)1 1838( change: 2010/05/13)2 832( Last)1 1443(org Schilling)1 528 4 759 7680 t +cleartomark +showpage +restore +%%EndPage: 1 1 +%%Page: 2 2 +save +mark +2 pagesetup +10 R f +(Schily)720 480 w +10 S1 f +(\302)976 480 w +10 R f +( \( 1L \))3 225( SCGSKELETON)1 3216(s USER COMMANDS)2 950 3 1009 480 t +( devices via alternate transport layers, you need to prepend the SCSI device)12 3289(To access SCSI)2 671 2 1440 960 t +( indicator may be something like)5 1468( transport layer)2 668( The)1 245(name by a transport layer indicator.)5 1579 4 1440 1080 t +10 B f +( :)1 0( I:)1 33( SI)1 39( CS)1 56( SC)1 72(U US)1 128 6 1440 1200 t +10 R f +(or)1812 1200 w +10 B f +( :)1 0( I:)1 33( PI)1 39( AP)1 61( TA)1 72(A AT)1 139 6 1939 1200 t +10 R f +( of supported transport layers for your platform, use)8 2231( get a list)3 421(. To)1 213 3 2283 1200 t +10 B f +( =)1 0( v=)1 57( ev)1 50(d de)1 100 4 5193 1200 t +10 I f +(HELP)1440 1320 w +10 R f +(:)1698 1320 w +10 B f +( un nd d)3 112( ou)1 56( ro)1 50( gr)1 44( kg)1 50( ck)1 56( ac)1 44( Ba)1 50( B)1 100( y)1 0( ty)1 50( il li it)3 89( bi)1 28( ab)1 56( ta)1 50( rt)1 33( or)1 44(P Po)1 111 18 1240 1560 t +10 R f +(To make)1 472 1 1440 1680 t +10 B f +( n)1 0( on)1 56( to)1 50( et)1 33( le)1 44( el)1 28( ke)1 44( sk)1 56( gs)1 39( cg)1 50(s sc)1 83 11 2057 1680 t +10 R f +(portable to all)2 795 1 2685 1680 t +8 R f +(UNIX)3618 1680 w +10 R f +(platforms, the syntax)2 1083 1 3964 1680 t +10 B f +( =)1 0( v=)1 57( ev)1 50(d de)1 100 4 5193 1680 t +10 I f +(devicename)1440 1800 w +10 R f +(:)1918 1800 w +10 I f +(scsibus)1946 1800 w +10 R f +(,)2243 1800 w +10 I f +(target)2268 1800 w +10 R f +( device names)2 599(, is preferred as it hides OS speci\256c knowledge about)9 2286 2 2515 1800 t +( \256le)1 171( speci\256c OS may not necessarily support a way to specify a real device)13 3051( A)1 147(from the user.)2 591 4 1440 1920 t +(name nor a way to specify)5 1090 1 1440 2040 t +10 I f +(scsibus)2563 2040 w +10 R f +(,)2860 2040 w +10 I f +(target)2885 2040 w +10 R f +(,)3132 2040 w +10 I f +(lun)3157 2040 w +10 R f +(.)3293 2040 w +10 I f +(Scsibus)1440 2280 w +10 R f +( the machine. Watch the boot messages for more informa-)9 2434(0 is the default SCSI bus on)6 1189 2 1777 2280 t +(tion or look into)3 675 1 1440 2400 t +10 B f +( s)1 0( es)1 39( ag ge)2 94( ss sa)2 89( es)1 39( me)1 44( /m)1 83( m/)1 28( dm)1 83( ad)1 56( /a)1 50( r/)1 28( va ar)2 94(/ /v)1 78 14 2149 2400 t +10 R f +(for more information about the SCSI con\256guration of your)8 2412 1 2988 2400 t +( you have problems to \256gure out what values for)9 2029(machine. If)1 497 2 1440 2520 t +10 I f +(scsibus)4001 2520 w +10 R f +(,)4298 2520 w +10 I f +(target)4323 2520 w +10 R f +(,)4570 2520 w +10 I f +(lun)4595 2520 w +10 R f +(should be used,)2 641 1 4759 2520 t +(try the)1 266 1 1440 2640 t +10 S1 f +(\261 \261)1 65 1 1739 2640 t +10 B f +( s)1 0( nb bu us)3 151( an)1 56( ca)1 50(s sc)1 83 5 1804 2640 t +10 R f +(option of)1 372 1 2177 2640 t +10 B f +( n)1 0( on)1 56( to)1 50( et)1 33( le)1 44( el)1 28( ke)1 44( sk)1 56( gs)1 39( cg)1 50(s sc)1 83 11 2582 2640 t +10 R f +(described below.)1 684 1 3098 2640 t +10 B f +( s)1 0( ce es)2 83( ic)1 44( vi)1 28( ev)1 50( de)1 44( d)1 89( r)1 0( or)1 44( fo)1 50( f)1 66( s)1 0( es)1 39( me)1 44( am)1 83( na)1 50( n)1 89( l)1 0( al)1 28( ca)1 50( ic)1 44( og gi)2 78( lo)1 50( l)1 61( g)1 0( ng)1 50( in)1 56( si)1 28(U Us)1 111 29 1240 2880 t +10 R f +(If no)1 213 1 1440 3000 t +10 I f +(dev)1700 3000 w +10 R f +(option is present,)2 732 1 1885 3000 t +10 B f +( n)1 0( on)1 56( to)1 50( et)1 33( le)1 44( el)1 28( ke)1 44( sk)1 56( gs)1 39( cg)1 50(s sc)1 83 11 2665 3000 t +10 R f +(will try to get the device from the)7 1501 1 3196 3000 t +10 B f +(C CD DR R)3 216 1 4745 3000 t +10 S f +(_ _)1 50 1 4961 3000 t +10 B f +( E)1 0( CE)1 67( IC)1 72( VI)1 39( EV)1 72(D DE)1 139 6 5011 3000 t +10 R f +(environment.)1440 3120 w +( the argument to the)4 1007(If a \256le /etc/default/cdrecord exists, and if)6 1977 2 1440 3360 t +10 B f +( =)1 0( v=)1 57( ev)1 50(d de)1 100 4 4501 3360 t +10 R f +(option or the)2 615 1 4785 3360 t +10 B f +(C CD DR R)3 216 1 1440 3480 t +10 S f +(_ _)1 50 1 1656 3480 t +10 B f +( E)1 0( CE)1 67( IC)1 72( VI)1 39( EV)1 72(D DE)1 139 6 1706 3480 t +10 R f +( not contain the characters ',', '/', ')7 1474(environment does)1 726 2 2133 3480 t +10 S1 f +(@)4333 3480 w +10 R f +(' or ':', it is interpreted)5 975 1 4425 3480 t +(as a device label name that was de\256ned in the \256le /etc/default/cdrecord \(see FILES section\).)14 3779 1 1440 3600 t +10 B f +( e)1 0( de)1 44( od)1 56( Mo)1 50( M)1 127( t)1 0( et)1 33( ge)1 44( rg)1 50( ar)1 44( ta)1 50( ot)1 33( to)1 50( ut)1 33(A Au)1 128 15 1240 3840 t +10 R f +(If no)1 203 1 1440 3960 t +10 B f +( =)1 0( v=)1 57( ev)1 50(d de)1 100 4 1680 3960 t +10 R f +( no)1 138(option and)1 437 2 1924 3960 t +10 B f +(C CD DR R)3 216 1 2537 3960 t +10 S f +(_ _)1 50 1 2753 3960 t +10 B f +( E)1 0( CE)1 67( IC)1 72( VI)1 39( EV)1 72(D DE)1 139 6 2803 3960 t +10 R f +(environment is present, or if it only contains a tran-)9 2170 1 3230 3960 t +(sport specifyer but no address notation,)5 1675 1 1440 4080 t +10 B f +( n)1 0( on)1 56( to)1 50( et)1 33( le)1 44( el)1 28( ke)1 44( sk)1 56( gs)1 39( cg)1 50(s sc)1 83 11 3160 4080 t +10 R f +(tries to scan the SCSI address space for)7 1712 1 3688 4080 t +( exactly one is found, this is used by default.)9 1851( If)1 132(CD-ROM drives.)1 702 3 1440 4200 t +10 B f +( =)1 0( t=)1 57( ut)1 33( ou)1 56( eo)1 50( me)1 44( im)1 83(t ti)1 61 8 1080 4368 t +10 S1 f +(#)1464 4368 w +10 R f +(Set the default SCSI command timeout value to)7 2139 1 1440 4488 t +10 S1 f +(#)3637 4488 w +10 R f +( default SCSI command)3 1060(seconds. The)1 587 2 3753 4488 t +( a SCSI command fails)4 982( If)1 139( commands.)1 498(timeout is the minimum timeout used for sending SCSI)8 2341 4 1440 4608 t +( a timeout, you may try to raise the default SCSI command timeout above the timeout)15 3696(due to)1 264 2 1440 4728 t +( runs correctly with a raised command timeout,)7 1991( the command)2 598( If)1 140(value of the failed command.)4 1231 4 1440 4848 t +( the author of the pro-)5 933(please report the better timeout value and the corresponding command to)10 3027 2 1440 4968 t +( no)1 133(gram. If)1 362 2 1440 5088 t +10 I f +(timeout)1968 5088 w +10 R f +(option is present, a default timeout of 40 seconds is used.)10 2367 1 2301 5088 t +10 B f +( =)1 0( g=)1 57( bu ug)2 106( eb)1 56(d de)1 100 5 1080 5256 t +10 S1 f +(#)1399 5256 w +10 I f +(,)1449 5256 w +10 B f +( d)1 0(- -d)1 89 2 1515 5256 t +10 R f +(Set the misc debug value to)5 1167 1 1440 5376 t +10 S1 f +(#)2645 5376 w +10 R f +(\(with debug=)1 549 1 2733 5376 t +10 S1 f +(#)3282 5376 w +10 R f +( the misc debug level by one \(with)7 1477(\) or increment)2 591 2 3332 5376 t +(-d\). If you specify)3 756 1 1440 5496 t +10 I f +(-dd,)2233 5496 w +10 R f +(this equals to)2 550 1 2427 5496 t +10 B f +( =)1 0( g=)1 57( bu ug)2 106( eb)1 56(d de)1 100 5 3013 5496 t +10 I f +(2.)3332 5496 w +10 R f +(This may help to \256nd problems while opening)7 1924 1 3476 5496 t +( Using)1 313( with sector sizes and sector types.)6 1474( well as)2 335( as)1 156(a driver for libscg.)3 782 5 1440 5616 t +10 S1 f +(\261 \261)1 65 1 4541 5616 t +10 B f +( g)1 0( bu ug)2 106( eb)1 56(d de)1 100 4 4606 5616 t +10 R f +(slows down)1 491 1 4909 5616 t +(the process and may be the reason for a buffer underrun.)10 2331 1 1440 5736 t +10 B f +( =)1 0( g=)1 57( bu ug)2 106( eb)1 56(k kd de)2 156 5 1080 5904 t +10 S1 f +(#)1455 5904 w +10 R f +(,)1505 5904 w +10 B f +( =)1 0(k kd d=)2 169 2 1563 5904 t +10 S1 f +(#)1732 5904 w +10 R f +(Tell the)1 316 1 1440 6024 t +10 B f +( g)1 0( cg)1 50(s sc)1 83 3 1789 6024 t +10 R f +(-driver to modify the kernel debug value while SCSI commands are running.)11 3156 1 1922 6024 t +10 S1 f +(\261 \261)1 65 1 1080 6192 t +10 B f +( t)1 0( nt)1 33( en)1 56( il le)2 72(s si)1 67 5 1145 6192 t +10 R f +(,)1373 6192 w +10 S1 f +(\261 \261)1 65 1 1431 6192 t +10 B f +(s s)1 39 1 1496 6192 t +10 R f +(Do not print out a status report for failed SCSI commands.)10 2420 1 1440 6312 t +10 S1 f +(\261 \261)1 65 1 1080 6480 t +10 B f +(v v)1 50 1 1145 6480 t +10 R f +( used e.g. to display the progress of the)8 1639( is)1 101( This)1 245(Increment the level of general verbosity by one.)7 1975 4 1440 6480 t +(process.)1440 6600 w +10 S1 f +(\261 \261)1 65 1 1080 6768 t +10 B f +(V V)1 72 1 1145 6768 t +10 R f +( helps to)2 383( This)1 258( verbose level with respect of SCSI command transport by one.)10 2747(Increment the)1 572 4 1440 6768 t +( during the process, that occur in the CD-Recorder. If you get incomprehensible)12 3308(debug problems)1 652 2 1440 6888 t +(error messages you should use this \257ag to get more detailed output.)11 2978 1 1440 7008 t +10 S1 f +(\261 \261)1 65 1 4502 7008 t +10 B f +(V VV V)2 144 1 4567 7008 t +10 R f +(will show data)2 637 1 4763 7008 t +( Using)1 320(buffer content in addition.)3 1112 2 1440 7128 t +10 S1 f +(\261 \261)1 65 1 2920 7128 t +10 B f +(V V)1 72 1 2985 7128 t +10 R f +(or)3104 7128 w +10 S1 f +(\261 \261)1 65 1 3234 7128 t +10 B f +(V VV V)2 144 1 3299 7128 t +10 R f +(slows down the process.)3 1037 1 3490 7128 t +10 S1 f +(\261 \261)1 65 1 4607 7128 t +10 B f +( s)1 0( nb bu us)3 151( an)1 56( ca)1 50(s sc)1 83 5 4672 7128 t +10 R f +(Scan all)1 341 1 5059 7128 t +( print the inquiry strings. This option may be used to \256nd)11 2416(SCSI devices on all SCSI busses and)6 1544 2 1440 7248 t +(J)720 7728 w +(. .)1 47 1 759 7673 t +( 2)1 1838( change: 2010/05/13)2 832( Last)1 1443(org Schilling)1 528 4 759 7728 t +cleartomark +showpage +restore +%%EndPage: 2 2 +%%Page: 3 3 +save +mark +3 pagesetup +10 R f +(Schily)720 480 w +10 S1 f +(\302)976 480 w +10 R f +( \( 1L \))3 225( SCGSKELETON)1 3216(s USER COMMANDS)2 950 3 1009 480 t +( numbers printed out as labels are computed by:)8 2010( The)1 225( on a system.)3 558(SCSI address of the devices)4 1167 4 1440 960 t +10 B f +( s)1 0(b bu us)2 151 2 1440 1080 t +10 S f +(* *)1 50 1 1624 1080 t +10 B f +( t)1 0( et)1 33( ge)1 44( rg)1 50( ar)1 44( ta)1 50( t)1 66( +)1 0( +)1 90(1 10 00 0)3 150 10 1707 1080 t +( =)1 0( s=)1 57(t ts)1 72 3 1080 1248 t +10 S1 f +(#)1209 1248 w +10 R f +(Set the maximum transfer size for a single SCSI command to)10 2558 1 1440 1248 t +10 S1 f +(#)4034 1248 w +10 R f +( the)1 159( syntax for)2 449(. The)1 249 3 4084 1248 t +10 B f +( =)1 0( s=)1 57(t ts)1 72 3 4978 1248 t +10 R f +(option)5144 1248 w +(is the same as for cdrecord fs=)6 1267 1 1440 1368 t +10 S1 f +(#)2707 1368 w +10 R f +(or sdd bs=)2 433 1 2790 1368 t +10 S1 f +(#)3223 1368 w +10 R f +(.)3273 1368 w +(If no)1 204 1 1440 1608 t +10 B f +( =)1 0( s=)1 57(t ts)1 72 3 1682 1608 t +10 R f +(option has been speci\256ed,)3 1071 1 1849 1608 t +10 B f +( n)1 0( on)1 56( to)1 50( et)1 33( le)1 44( el)1 28( ke)1 44( sk)1 56( gs)1 39( cg)1 50(s sc)1 83 11 2958 1608 t +10 R f +( If libscg)2 383(defaults to a transfer size of 256 kB.)7 1538 2 3479 1608 t +( from the operating system, the value is reduced to the maximum value that is)14 3245(gets lower values)2 715 2 1440 1728 t +( further reduce the)3 829( it may help to)4 702( Sometimes,)1 559(possible with the current operating system.)5 1870 4 1440 1848 t +( it may take a long time to \256nd a better value by)12 2131(transfer size or to enhance it, but note that)8 1829 2 1440 1968 t +(experimenting with the)2 943 1 1440 2088 t +10 B f +( =)1 0( s=)1 57(t ts)1 72 3 2416 2088 t +10 R f +(option.)2578 2088 w +9 B f +( S)1 0( LE ES)2 110( PL)1 60( MP)1 55( XA AM)2 150(E EX)1 125 6 720 2496 t +( T)1 0( NT)1 60( EN)1 65( ME)1 60( NM)1 85( ON)1 65( RO)1 70( IR)1 65( NV VI)2 100(E EN)1 125 10 720 2616 t +10 B f +( H)1 0( SH)1 78(R RS)1 128 3 1080 2736 t +10 R f +(If the)1 227 1 1440 2736 t +10 B f +( H)1 0( SH)1 78(R RS)1 128 3 1706 2736 t +10 R f +(environment is present, the remote connection will not be created via)10 2899 1 1951 2736 t +10 B f +( d)1 0( md)1 56(r rc cm)2 171 3 4889 2736 t +10 R f +(\(3\) but)1 284 1 5116 2736 t +( by)1 137(by calling the program pointed to)5 1400 2 1440 2856 t +10 B f +( H)1 0( SH)1 78(R RS)1 128 3 3014 2856 t +10 R f +( e.g.)1 181(. Use)1 250 2 3220 2856 t +10 B f +( =)1 0( H=)1 57( SH)1 78(R RS)1 128 4 3688 2856 t +10 R f +(/usr/bin/ssh to create a secure shell)5 1449 1 3951 2856 t +(connection.)1440 2976 w +(Note that this forces)3 831 1 1440 3216 t +10 B f +( d)1 0( rd)1 56( or)1 44( re ec co)3 138( dr)1 44(c cd)1 100 6 2304 3216 t +10 R f +(to create a pipe to the)5 901 1 2720 3216 t +10 B f +( \))1 0( 1\))1 33( \(1)1 50( h\()1 33( sh)1 56(r rs)1 83 6 3655 3216 t +10 R f +(program and disallows)2 928 1 3944 3216 t +10 B f +( d)1 0( rd)1 56( or)1 44( re ec co)3 138( dr)1 44(c cd)1 100 6 4906 3216 t +10 R f +(to)5322 3216 w +( makes it impossible to set up per-)7 1432( This)1 245( socket to the remote server.)5 1170(directly access the network)3 1113 4 1440 3336 t +( slows down the connection compared to a)7 1770(formance parameters and)2 1025 2 1440 3456 t +10 B f +( t)1 0( oo ot)2 83(r ro)1 94 3 4270 3456 t +10 R f +(initiated)4482 3456 w +10 B f +( \))1 0( 3\))1 33( \(3)1 50( d\()1 33( md)1 56(r rc cm)2 171 6 4845 3456 t +10 R f +(con-)5223 3456 w +(nection.)1440 3576 w +10 B f +( I)1 0( SI)1 39( CS)1 56( SC)1 72(R RS)1 128 5 1080 3744 t +10 R f +(If the)1 252 1 1440 3744 t +10 B f +( I)1 0( SI)1 39( CS)1 56( SC)1 72(R RS)1 128 5 1756 3744 t +10 R f +( not be the program)4 942(environment is present, the remote SCSI server will)7 2343 2 2115 3744 t +10 B f +( i)1 0( si)1 28( cs)1 39( sc)1 44( rs)1 39( /r)1 44( n/)1 28( in)1 56( bi)1 28( sb)1 56( /s)1 39( y/)1 28( il ly)2 78( hi)1 28( ch)1 56( sc)1 44( /s)1 39( t/)1 28( pt)1 33( op)1 56(/ /o)1 78 21 1440 3864 t +10 R f +(but the program pointed to by)5 1251 1 2346 3864 t +10 B f +( I)1 0( SI)1 39( CS)1 56( SC)1 72(R RS)1 128 5 3633 3864 t +10 R f +( that the remote SCSI server)5 1184(. Note)1 288 2 3928 3864 t +(program name will be ignored if you log in using an account that has been created with a)17 3960 1 1440 3984 t +(remote SCSI server program as login shell.)6 1771 1 1440 4104 t +9 B f +( O)1 0( SO)1 70( LS)1 50( AL)1 60( A)1 95( EE E)2 60(S SE)1 110 7 720 4272 t +10 B f +( d)1 0( rd)1 56( or)1 44( re ec co)3 138( dr)1 44(c cd)1 100 6 1080 4392 t +10 R f +(\(1\),)1462 4392 w +10 B f +( g)1 0( cg)1 50(s sc)1 83 3 1636 4392 t +10 R f +(\(7\),)1769 4392 w +10 B f +( d)1 0( md)1 56(r rc cm)2 171 3 1943 4392 t +10 R f +(\(3\),)2170 4392 w +10 B f +( h)1 0(s ss sh)2 134 2 2344 4392 t +10 R f +(\(1\).)2478 4392 w +9 B f +( S)1 0( TE ES)2 110( OT)1 60(N NO)1 135 4 720 4560 t +( S)1 0( CS)1 50( IC)1 65( TI)1 35( ST)1 60( OS)1 50( NO)1 70( GN)1 65( AG)1 70( IA)1 65(D DI)1 100 11 720 4680 t +10 R f +(A typical error message for a SCSI command looks like:)9 2333 1 1080 4800 t +(scgskeleton: I/O error. test unit ready: scsi sendcmd: no error)9 2512 1 1440 5040 t +( 20 00 00 00 00)5 665(CDB: 00)1 400 2 1440 5160 t +(status: 0x2 \(CHECK CONDITION\))3 1464 1 1440 5280 t +(Sense Bytes: 70 00 05 00 00 00 00 0A 00 00 00 00 25 00 00 00 00 00)19 2938 1 1440 5400 t +(Sense Key: 0x5 Illegal Request, Segment 0)6 1777 1 1440 5520 t +(Sense Code: 0x25 Qual 0x00 \(logical unit not supported\) Fru 0x0)10 2701 1 1440 5640 t +(Sense \257ags: Blk 0 \(not valid\))5 1204 1 1440 5760 t +(cmd \256nished after 0.002s timeout 40s)5 1545 1 1440 5880 t +( text after the \256rst colon gives)6 1265( The)1 225( of the command.)3 735(The \256rst line gives information about the transport)7 2095 4 1080 6120 t +( from the view of the kernel. It usually is:)9 1740(the error text for the system call)6 1335 2 1080 6240 t +10 B f +( r)1 0( or)1 44( er rr ro)3 138( e)1 78( O)1 0( /O)1 78(I I/)1 67 7 4222 6240 t +10 R f +(unless other prob-)2 739 1 4661 6240 t +( a short description for the SCSI command that fails. The rest of)12 2753(lems happen. The next words contain)5 1567 2 1080 6360 t +( if there were any problems for the transport of the command over the SCSI bus.)15 3361(the line tells you)3 697 2 1080 6480 t +10 B f +( l)1 0( al)1 28( ta)1 50( at)1 33(f fa)1 83 5 5206 6480 t +( r)1 0( or)1 44(e er rr ro)3 182 3 1080 6600 t +10 R f +( was not possible to transport the command \(i.e. no device present at the requested)14 3513(means that it)2 541 2 1346 6600 t +(SCSI address\).)1 602 1 1080 6720 t +(The second line prints the SCSI command descriptor block for the failed command.)12 3439 1 1080 6888 t +( transport of)2 522(The third line gives information on the SCSI status code returned by the command, if the)15 3798 2 1080 7056 t +(the command succeeds. This is error information from the SCSI device.)10 2948 1 1080 7176 t +(J)720 7680 w +(. .)1 47 1 759 7625 t +( 3)1 1838( change: 2010/05/13)2 832( Last)1 1443(org Schilling)1 528 4 759 7680 t +cleartomark +showpage +restore +%%EndPage: 3 3 +%%Page: 4 4 +save +mark +4 pagesetup +10 R f +(Schily)720 480 w +10 S1 f +(\302)976 480 w +10 R f +( \( 1L \))3 225( SCGSKELETON)1 3216(s USER COMMANDS)2 950 3 1009 480 t +(The fourth line is a hex dump of the auto request sense information for the command.)15 3537 1 1080 960 t +( is only)2 313(The \256fth line is the error text for the sense key if available, followed by the segment number that)18 4007 2 1080 1128 t +(valid if the command was a)5 1191 1 1080 1248 t +10 I f +(copy)2314 1248 w +10 R f +( error message is not directly related to the current)9 2162(command. If the)2 693 2 2545 1248 t +(command, the text)2 757 1 1080 1368 t +10 I f +(deferred error)1 582 1 1870 1368 t +10 R f +(is appended.)1 507 1 2485 1368 t +( the type of the)4 651( If)1 137( the sense quali\256er if available.)5 1307(The sixth line is the error text for the sense code and)11 2225 4 1080 1536 t +(device is known, the sense data is decoded from tables in)10 2402 1 1080 1656 t +10 I f +(scsierrs.c)3519 1656 w +10 R f +( by the error)3 523( text is followed)3 683(. The)1 250 3 3944 1656 t +(value for a \256eld replaceable unit.)5 1353 1 1080 1776 t +( to the failed command and text for several error)9 2030(The seventh line prints the block number that is related)9 2290 2 1080 1944 t +(\257ags. The block number may not be valid.)7 1746 1 1080 2064 t +( set up for this command and the time that the command really needed)13 2940(The eight line reports the timeout)5 1380 2 1080 2232 t +(to complete.)1 502 1 1080 2352 t +9 B f +( S)1 0( GS)1 50( UG)1 70(B BU)1 125 4 720 2640 t +( R)1 0( HO OR)2 135( TH)1 70(A AU UT)2 190 4 720 2760 t +10 R f +(J)1080 2880 w +(. .)1 47 1 1119 2825 t +(org Schilling)1 528 1 1119 2880 t +(Seestr. 110)1 452 1 1080 3000 t +(D-13353 Berlin)1 638 1 1080 3120 t +(Germany)1080 3240 w +(Additional information can be found on:)5 1658 1 1080 3408 t +(http://cdrecord.berlios.de/private/cdrecord.html)1080 3528 w +(If you have support questions, send them to:)7 1827 1 1080 3696 t +10 B f +( t)1 0( rt)1 33( or)1 44( up pp po)3 162( su)1 56( -s)1 39( d-)1 33( rd)1 56( or)1 44( re ec co)3 138( dr)1 44(c cd)1 100 12 1080 3864 t +10 S1 f +(@ @)1 92 1 1829 3864 t +10 B f +( e)1 0( de)1 44( .d)1 56( s.)1 25( os)1 39( li io)2 78( er rl)2 72(b be)1 100 8 1921 3864 t +10 R f +(If you have de\256nitely found a bug, send a mail to:)10 2075 1 1080 4032 t +10 B f +( s)1 0( er rs)2 83( pe)1 44( op)1 56( lo)1 50( el)1 28( ve)1 44( ev)1 50( de)1 44( -d)1 56( d-)1 33( rd)1 56( or)1 44( re ec co)3 138( dr)1 44(c cd)1 100 16 1080 4200 t +10 S1 f +(@ @)1 92 1 1950 4200 t +10 B f +( e)1 0( de)1 44( .d)1 56( s.)1 25( os)1 39( li io)2 78( er rl)2 72(b be)1 100 8 2042 4200 t +10 R f +(or)1080 4320 w +10 B f +( g)1 0( ng)1 50( il ll li in)4 140( hi)1 28( ch)1 56( sc)1 44( .s)1 39( g.)1 25( er rg)2 94( oe)1 44(j jo)1 83 11 1196 4320 t +10 S1 f +(@ @)1 92 1 1799 4320 t +10 B f +( e)1 0( de)1 44( .d)1 56( er r.)2 69( fe)1 44( of)1 33( un nh ho)3 162( au)1 56( ra)1 50( fr)1 44( .f)1 33( s.)1 25( ku us)2 95( ok)1 56(f fo)1 83 15 1891 4320 t +10 R f +(To subscribe, use:)2 740 1 1080 4488 t +10 B f +( s)1 0( er rs)2 83( pe)1 44( op)1 56( lo)1 50( el)1 28( ve)1 44( ev)1 50( de)1 44( -d)1 56( d-)1 33( rd)1 56( or)1 44( re ec co)3 138( dr)1 44( cd)1 56( /c)1 44( o/)1 28( fo)1 50( nf)1 33( in)1 56( ti)1 28( st)1 33( /l li is)3 95( n/)1 28( an)1 56( ma)1 50( il lm)2 111( ai)1 28( ma)1 50( /m)1 83( e/)1 28( de)1 44( .d)1 56( s.)1 25( os)1 39( li io)2 78( er rl)2 72( be)1 44( .b)1 56( s.)1 25( ts)1 39( st)1 33( // /l li is)4 123( :/)1 28( p:)1 33( tt tp)2 89(h ht)1 89 48 1080 4656 t +10 R f +(or)1080 4776 w +10 B f +( t)1 0( rt)1 33( or)1 44( up pp po)3 162( su)1 56( -s)1 39( d-)1 33( rd)1 56( or)1 44( re ec co)3 138( dr)1 44( cd)1 56( /c)1 44( o/)1 28( fo)1 50( nf)1 33( in)1 56( ti)1 28( st)1 33( /l li is)3 95( n/)1 28( an)1 56( ma)1 50( il lm)2 111( ai)1 28( ma)1 50( /m)1 83( e/)1 28( de)1 44( .d)1 56( s.)1 25( os)1 39( li io)2 78( er rl)2 72( be)1 44( .b)1 56( s.)1 25( ts)1 39( st)1 33( // /l li is)4 123( :/)1 28( p:)1 33( tt tp)2 89(h ht)1 89 44 1196 4776 t +10 R f +(J)720 7680 w +(. .)1 47 1 759 7625 t +( 4)1 1838( change: 2010/05/13)2 832( Last)1 1443(org Schilling)1 528 4 759 7680 t +cleartomark +showpage +restore +%%EndPage: 4 4 +%%Trailer +done +%%DocumentFonts: Times-Roman Times-Bold Times-Italic Symbol +%%Pages: 4 diff -Nru cdrtools-2.01.01a33/inc/align_test.c cdrtools-3.02a09/inc/align_test.c --- cdrtools-2.01.01a33/inc/align_test.c 2006-09-25 21:38:38.000000000 +0000 +++ cdrtools-3.02a09/inc/align_test.c 2015-11-30 21:07:18.000000000 +0000 @@ -1,12 +1,13 @@ -/* @(#)align_test.c 1.22 06/09/25 Copyright 1995 J. Schilling */ +/* @(#)align_test.c 1.31 15/11/30 Copyright 1995-2015 J. Schilling */ +#include #ifndef lint -static char sccsid[] = - "@(#)align_test.c 1.22 06/09/25 Copyright 1995 J. Schilling"; +static UConst char sccsid[] = + "@(#)align_test.c 1.31 15/11/30 Copyright 1995-2015 J. Schilling"; #endif /* * Generate machine dependant align.h * - * Copyright (c) 1995 J. Schilling + * Copyright (c) 1995-2015 J. Schilling */ /* * The contents of this file are subject to the terms of the @@ -15,16 +16,18 @@ * with the License. * * See the file CDDL.Schily.txt in this distribution for details. + * A copy of the CDDL is also available via the Internet at + * http://www.opensource.org/licenses/cddl1.txt * * When distributing Covered Code, include this CDDL HEADER in each * file and include the License file CDDL.Schily.txt from this distribution. */ -#include -#include +#include #include -#undef NO_LONGLONG /* Make sure that Llong wil be long long */ +#undef NO_LONGLONG /* Make sure that Llong will be long long */ #include +#include /* Define missing prototypes */ /* * Be very careful here as MSVC does not implement long long but rather __int64 @@ -72,14 +75,15 @@ #define ALIGN_longlong sizeof (Llong) #define ALIGN_float sizeof (float) #define ALIGN_double sizeof (double) +#define ALIGN_ldouble sizeof (long double) #define ALIGN_ptr sizeof (char *) #endif #ifdef CHECK_ALIGN -#include -#include +#include +#include LOCAL jmp_buf jb; LOCAL int check_align __PR((int (*)(char *, int), @@ -90,6 +94,9 @@ LOCAL int check_longlong __PR((char *, int)); LOCAL int check_float __PR((char *, int)); LOCAL int check_double __PR((char *, int)); +#ifdef HAVE_LONGDOUBLE +LOCAL int check_ldouble __PR((char *, int)); +#endif LOCAL int check_ptr __PR((char *, int)); LOCAL int speed_check __PR((char *, @@ -100,6 +107,9 @@ LOCAL void speed_longlong __PR((char *, int)); LOCAL void speed_float __PR((char *, int)); LOCAL void speed_double __PR((char *, int)); +#ifdef HAVE_LONGDOUBLE +LOCAL void speed_ldouble __PR((char *, int)); +#endif LOCAL void speed_ptr __PR((char *, int)); #define ALIGN_short check_align(check_short, speed_short, sizeof (short)) @@ -108,20 +118,25 @@ #define ALIGN_longlong check_align(check_longlong, speed_longlong, sizeof (Llong)) #define ALIGN_float check_align(check_float, speed_float, sizeof (float)) #define ALIGN_double check_align(check_double, speed_double, sizeof (double)) +#define ALIGN_ldouble check_align(check_ldouble, speed_ldouble, sizeof (long double)) #define ALIGN_ptr check_align(check_ptr, speed_ptr, sizeof (char *)) #endif #ifdef OFF_ALIGN -#define sm_off(s, m) ((int)&((s)0)->m) +#define sm_off(s, m) ((size_t)&((s)0)->m) +LOCAL void used __PR((int i)); LOCAL int off_short __PR((void)); LOCAL int off_int __PR((void)); LOCAL int off_long __PR((void)); LOCAL int off_longlong __PR((void)); LOCAL int off_float __PR((void)); LOCAL int off_double __PR((void)); +#ifdef HAVE_LONGDOUBLE +LOCAL int off_ldouble __PR((void)); +#endif LOCAL int off_ptr __PR((void)); #define ALIGN_short off_short() @@ -130,6 +145,7 @@ #define ALIGN_longlong off_longlong() #define ALIGN_float off_float() #define ALIGN_double off_double() +#define ALIGN_ldouble off_ldouble() #define ALIGN_ptr off_ptr() #endif @@ -170,7 +186,9 @@ LOCAL char ll[] = "long long"; LOCAL char fl[] = "float"; LOCAL char db[] = "double"; +LOCAL char ld[] = "long double"; LOCAL char pt[] = "pointer"; +LOCAL char mt[] = "max type"; #define xalign(x, a, m) (((char *)(x)) + ((a) - (((UIntptr_t)(x))&(m)))) @@ -182,6 +200,8 @@ char *p; int i; int s; + int amax = 0; + int smax = 0; #ifdef CHECK_ALIGN #ifdef SIGBUS @@ -189,7 +209,7 @@ #endif #endif - i = ((int)buf) % 1024; + i = ((size_t)buf) % 1024; i = 1024 - i; p = &buf[i]; buf_aligned = p; @@ -204,10 +224,16 @@ printf(" * by %s\n", sccsid); printf(" * do not edit by hand.\n"); printf(" */\n"); + printf("#ifndef __ALIGN_H\n"); + printf("#define __ALIGN_H\n\n"); s = sizeof (short); i = ALIGN_short; i = min_align(i); + if (i > amax) + amax = i; + if (s > smax) + smax = s; printf("\n"); printf("#define ALIGN_SHORT %d\t/* %s(%s *)\t*/\n", i, al, sh); printf("#define ALIGN_SMASK %d\t/* %s(%s *)\t*/\n", i-1, ms, sh); @@ -216,6 +242,10 @@ s = sizeof (int); i = ALIGN_int; i = min_align(i); + if (i > amax) + amax = i; + if (s > smax) + smax = s; printf("\n"); printf("#define ALIGN_INT %d\t/* %s(%s *)\t\t*/\n", i, al, in); printf("#define ALIGN_IMASK %d\t/* %s(%s *)\t\t*/\n", i-1, ms, in); @@ -224,6 +254,10 @@ s = sizeof (long); i = ALIGN_long; i = min_align(i); + if (i > amax) + amax = i; + if (s > smax) + smax = s; printf("\n"); printf("#define ALIGN_LONG %d\t/* %s(%s *)\t\t*/\n", i, al, lo); printf("#define ALIGN_LMASK %d\t/* %s(%s *)\t\t*/\n", i-1, ms, lo); @@ -233,6 +267,10 @@ s = sizeof (Llong); i = ALIGN_longlong; i = min_align(i); + if (i > amax) + amax = i; + if (s > smax) + smax = s; #endif printf("\n"); printf("#define ALIGN_LLONG %d\t/* %s(%s *)\t*/\n", i, al, ll); @@ -242,6 +280,10 @@ s = sizeof (float); i = ALIGN_float; i = min_align(i); + if (i > amax) + amax = i; + if (s > smax) + smax = s; printf("\n"); printf("#define ALIGN_FLOAT %d\t/* %s(%s *)\t*/\n", i, al, fl); printf("#define ALIGN_FMASK %d\t/* %s(%s *)\t*/\n", i-1, ms, fl); @@ -250,20 +292,49 @@ s = sizeof (double); i = ALIGN_double; i = min_align(i); + if (i > amax) + amax = i; + if (s > smax) + smax = s; printf("\n"); printf("#define ALIGN_DOUBLE %d\t/* %s(%s *)\t*/\n", i, al, db); printf("#define ALIGN_DMASK %d\t/* %s(%s *)\t*/\n", i-1, ms, db); printf("#define SIZE_DOUBLE %d\t/* %s(%s)\t\t\t*/\n", s, so, db); +#ifdef HAVE_LONGDOUBLE + s = sizeof (long double); + i = ALIGN_ldouble; + i = min_align(i); + if (i > amax) + amax = i; + if (s > smax) + smax = s; +#endif + printf("\n"); + printf("#define ALIGN_LDOUBLE %d\t/* %s(%s *)\t*/\n", i, al, ld); + printf("#define ALIGN_LDMASK %d\t/* %s(%s *)\t*/\n", i-1, ms, ld); + printf("#define SIZE_LDOUBLE %d\t/* %s(%s)\t\t\t*/\n", s, so, ld); + s = sizeof (char *); i = ALIGN_ptr; i = min_align(i); + if (i > amax) + amax = i; + if (s > smax) + smax = s; printf("\n"); printf("#define ALIGN_PTR %d\t/* %s(%s *)\t*/\n", i, al, pt); printf("#define ALIGN_PMASK %d\t/* %s(%s *)\t*/\n", i-1, ms, pt); printf("#define SIZE_PTR %d\t/* %s(%s)\t\t\t*/\n", s, so, pt); + printf("\n"); + printf("#define ALIGN_TMAX %d\t/* %s(%s *)\t*/\n", amax, al, mt); + printf("#define ALIGN_TMMASK %d\t/* %s(%s *)\t*/\n", amax-1, ms, mt); + printf("#define SIZE_TMAX %d\t/* %s(%s)\t\t\t*/\n", smax, so, mt); + printmacs(); + printf("\n#endif /* __ALIGN_H */\n"); + fflush(stdout); return (0); } @@ -277,8 +348,8 @@ printf(" * In order to avoid this warning, we are now using UIntptr_t\n */\n"); /*printf("\n");*/ /*printf("\n");*/ -printf("#define xaligned(a, s) ((((UIntptr_t)(a)) & (s)) == 0 )\n"); -printf("#define x2aligned(a, b, s) (((((UIntptr_t)(a)) | ((UIntptr_t)(b))) & (s)) == 0 )\n"); +printf("#define xaligned(a, s) ((((UIntptr_t)(a)) & (s)) == 0)\n"); +printf("#define x2aligned(a, b, s) (((((UIntptr_t)(a)) | ((UIntptr_t)(b))) & (s)) == 0)\n"); printf("\n"); printf("#define saligned(a) xaligned(a, ALIGN_SMASK)\n"); printf("#define s2aligned(a, b) x2aligned(a, b, ALIGN_SMASK)\n"); @@ -298,15 +369,21 @@ printf("#define daligned(a) xaligned(a, ALIGN_DMASK)\n"); printf("#define d2aligned(a, b) x2aligned(a, b, ALIGN_DMASK)\n"); printf("\n"); +printf("#define ldaligned(a) xaligned(a, ALIGN_LDMASK)\n"); +printf("#define ld2aligned(a, b) x2aligned(a, b, ALIGN_LDMASK)\n"); +printf("\n"); printf("#define paligned(a) xaligned(a, ALIGN_PMASK)\n"); printf("#define p2aligned(a, b) x2aligned(a, b, ALIGN_PMASK)\n"); +printf("\n"); +printf("#define maligned(a) xaligned(a, ALIGN_TMMASK)\n"); +printf("#define m2aligned(a, b) x2aligned(a, b, ALIGN_TMMASK)\n"); printf("\n\n"); printf("/*\n * There used to be a cast to an int but we get a warning from GCC.\n"); printf(" * This warning message from GCC is wrong.\n"); printf(" * Believe me that this macro would even be usable if I would cast to short.\n"); printf(" * In order to avoid this warning, we are now using UIntptr_t\n */\n"); -printf("#define xalign(x, a, m) ( ((char *)(x)) + ( (a) - 1 - ((((UIntptr_t)(x))-1)&(m))) )\n"); +printf("#define xalign(x, a, m) (((char *)(x)) + ((a) - 1 - ((((UIntptr_t)(x))-1)&(m))))\n"); printf("\n"); printf("#define salign(x) xalign((x), ALIGN_SHORT, ALIGN_SMASK)\n"); printf("#define ialign(x) xalign((x), ALIGN_INT, ALIGN_IMASK)\n"); @@ -314,7 +391,9 @@ printf("#define llalign(x) xalign((x), ALIGN_LLONG, ALIGN_LLMASK)\n"); printf("#define falign(x) xalign((x), ALIGN_FLOAT, ALIGN_FMASK)\n"); printf("#define dalign(x) xalign((x), ALIGN_DOUBLE, ALIGN_DMASK)\n"); +printf("#define ldalign(x) xalign((x), ALIGN_LDOUBLE, ALIGN_LDMASK)\n"); printf("#define palign(x) xalign((x), ALIGN_PTR, ALIGN_PMASK)\n"); +printf("#define malign(x) xalign((x), ALIGN_TMAX, ALIGN_TMMASK)\n"); } #ifdef CHECK_ALIGN @@ -447,6 +526,20 @@ return (0); } +#ifdef HAVE_LONGDOUBLE +LOCAL int +check_ldouble(p, i) + char *p; + int i; +{ + long double *dp; + + dp = (long double *)&p[i]; + *dp = 1.0; + return (0); +} +#endif + LOCAL int check_ptr(p, i) char *p; @@ -552,6 +645,22 @@ *dp = i; } +#ifdef HAVE_LONGDOUBLE +LOCAL void +speed_ldouble(p, n) + char *p; + int n; +{ + long double *dp; + int i; + + dp = (long double *)&p[n]; + + for (i = 1000000; --i >= 0; ) + *dp = i; +} +#endif + LOCAL void speed_ptr(p, n) char *p; @@ -567,6 +676,7 @@ } #include +#include LOCAL int speed_check(p, sfunc, n) char *p; @@ -581,10 +691,10 @@ times(&tm2); #ifdef DEBUG - fprintf(stderr, "t1: %ld\n", (long) tm2.tms_utime-tm1.tms_utime); + fprintf(stderr, "t1: %ld\n", (long)tm2.tms_utime-tm1.tms_utime); #endif - return ((int) tm2.tms_utime-tm1.tms_utime); + return ((int)tm2.tms_utime-tm1.tms_utime); } #endif /* CHECK_ALIGN */ @@ -597,6 +707,14 @@ * by the compiler to keep the apropriate type on a properly aligned * address. */ +LOCAL int used_var; +LOCAL void +used(i) + int i; +{ + used_var = i; +} + LOCAL int off_short() { @@ -605,6 +723,7 @@ short s; } ss; ss.c = 0; /* fool C-compiler */ + used(ss.c); return (sm_off(struct ss *, s)); } @@ -617,6 +736,7 @@ int i; } si; si.c = 0; /* fool C-compiler */ + used(si.c); return (sm_off(struct si *, i)); } @@ -629,6 +749,7 @@ long l; } sl; sl.c = 0; /* fool C-compiler */ + used(sl.c); return (sm_off(struct sl *, l)); } @@ -642,6 +763,7 @@ Llong ll; } sll; sll.c = 0; /* fool C-compiler */ + used(sll.c); return (sm_off(struct sll *, ll)); } @@ -655,6 +777,7 @@ float f; } sf; sf.c = 0; /* fool C-compiler */ + used(sf.c); return (sm_off(struct sf *, f)); } @@ -667,10 +790,26 @@ double d; } sd; sd.c = 0; /* fool C-compiler */ + used(sd.c); return (sm_off(struct sd *, d)); } +#ifdef HAVE_LONGDOUBLE +LOCAL int +off_ldouble() +{ + struct sd { + char c; + long double ld; + } sd; + sd.c = 0; /* fool C-compiler */ + used(sd.c); + + return (sm_off(struct sd *, ld)); +} +#endif + LOCAL int off_ptr() { @@ -679,6 +818,7 @@ char *p; } sp; sp.c = 0; /* fool C-compiler */ + used(sp.c); return (sm_off(struct sp *, p)); } diff -Nru cdrtools-2.01.01a33/inc/avoffset.c cdrtools-3.02a09/inc/avoffset.c --- cdrtools-2.01.01a33/inc/avoffset.c 2007-02-22 13:36:44.000000000 +0000 +++ cdrtools-3.02a09/inc/avoffset.c 2017-08-01 18:10:02.000000000 +0000 @@ -1,7 +1,8 @@ -/* @(#)avoffset.c 1.27 07/02/22 Copyright 1987, 1995-2004 J. Schilling */ +/* @(#)avoffset.c 1.35 17/08/01 Copyright 1987, 1995-2017 J. Schilling */ +#include #ifndef lint -static char sccsid[] = - "@(#)avoffset.c 1.27 07/02/22 Copyright 1987, 1995-2004 J. Schilling"; +static UConst char sccsid[] = + "@(#)avoffset.c 1.35 17/08/01 Copyright 1987, 1995-2017 J. Schilling"; #endif /* * This program is a tool to generate the file "avoffset.h". @@ -12,26 +13,15 @@ * FP_INDIR - number of stack frames above main() * before encountering a NULL pointer. * - * Copyright (c) 1987, 1995-2004 J. Schilling - */ -/* - * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. - * - * See the file CDDL.Schily.txt in this distribution for details. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file CDDL.Schily.txt from this distribution. + * Copyright (c) 1987, 1995-2017 J. Schilling */ +/*@@C@@*/ -#include -#include +#include #include #include #include -#include +#include #ifdef HAVE_SCANSTACK # include @@ -46,6 +36,9 @@ int signo; { fprintf(stderr, "Warning: Cannot scan stack on this environment.\n"); + + printf("\n#endif /* __AVOFFSET_H */\n"); + fflush(stdout); exit(0); } @@ -94,6 +87,9 @@ printf(" * If AV_OFFSET or FP_INDIR are missing in this file, all programs\n"); printf(" * which use the definitions are automatically disabled.\n"); printf(" */\n"); + printf("#ifndef __AVOFFSET_H\n"); + printf("#define __AVOFFSET_H\n\n"); + stdir = stack_direction(0); printf("#define STACK_DIRECTION %d\n", stdir); fflush(stdout); @@ -102,8 +98,21 @@ /* * Note: Scanning the stack to look for argc/argv * works only in the main thread. + * + * llvm-gcc-4.2 has a bug and creates an endless loop if we call: + * while (fp->fr_savfp) { + * We now try to limit this to 1000 loops in hope that the bug + * does not affect the new code extended as well. */ - while (fp->fr_savfp) { + while (i <= 1000 && fp->fr_savfp) { + /* + * Workaround for the still buggy clang... + * clang version 4.0.0 on ARM64 FreeBSD has become worse. + * If we do not have the strange write() call, this loop + * becomes an endless loop and the last line in the loop + * is never touched. + */ + write(-1, "", 0); if (fp->fr_savpc == 0) break; @@ -120,21 +129,40 @@ if ((o % sizeof (char *)) != 0) { fprintf(stderr, "AV_OFFSET value (%d) not a multiple of pointer size.\n", o); fprintf(stderr, "Disabling scanning the stack.\n"); + + printf("\n#endif /* __AVOFFSET_H */\n"); exit(0); } if (o < -1000 || o > 1000) { fprintf(stderr, "AV_OFFSET value (%d) does not look reasonable.\n", o); fprintf(stderr, "Disabling scanning the stack.\n"); + + printf("\n#endif /* __AVOFFSET_H */\n"); + exit(0); + } + if (i > 1000) { + fprintf(stderr, "FP_INDIR value (%d) does not look reasonable.\n", i); + fprintf(stderr, "Disabling scanning the stack.\n"); + + printf("\n#endif /* __AVOFFSET_H */\n"); exit(0); } printf("#define AV_OFFSET %d\n", o); printf("#define FP_INDIR %d\n", i); #endif + printf("\n#endif /* __AVOFFSET_H */\n"); + fflush(stdout); exit(0); return (0); /* keep lint happy */ } -LOCAL int +#if __clang__ || (__GNUC__ > 3 || __GNUC__ == 3 && __GNUC_MINOR__ >= 2) +#define __NO_INL__ __attribute__((noinline)) +#else +#define __NO_INL__ +#endif + +LOCAL int __NO_INL__ stack_direction(lp) long *lp; { @@ -153,5 +181,7 @@ } } +#ifdef HAVE_SCANSTACK #define IS_AVOFFSET #include "getfp.c" +#endif diff -Nru cdrtools-2.01.01a33/inc/getfp.c cdrtools-3.02a09/inc/getfp.c --- cdrtools-2.01.01a33/inc/getfp.c 2006-10-05 15:56:51.000000000 +0000 +++ cdrtools-3.02a09/inc/getfp.c 2015-12-23 20:18:33.000000000 +0000 @@ -1,8 +1,8 @@ -/* @(#)getfp.c 1.16 06/10/05 Copyright 1988-2003 J. Schilling */ +/* @(#)getfp.c 1.19 15/12/23 Copyright 1988-2015 J. Schilling */ /* * Get frame pointer * - * Copyright (c) 1988-2003 J. Schilling + * Copyright (c) 1988-2015 J. Schilling */ /* * The contents of this file are subject to the terms of the @@ -11,6 +11,8 @@ * with the License. * * See the file CDDL.Schily.txt in this distribution for details. + * A copy of the CDDL is also available via the Internet at + * http://www.opensource.org/licenses/cddl1.txt * * When distributing Covered Code, include this CDDL HEADER in each * file and include the License file CDDL.Schily.txt from this distribution. @@ -50,8 +52,17 @@ # define FP_OFF 0 #endif +#if defined(__clang__) || \ + (defined(__GNUC__) && \ + ((__GNUC__ > 4) || (__GNUC__ == 4 && __GNUC_MINOR__ > 7))) +#define ATTRIBUTE_NO_SANITIZE_ADDRESS __attribute__((no_sanitize_address)) +#else +#define ATTRIBUTE_NO_SANITIZE_ADDRESS +#endif + EXPORT void **___fpoff __PR((char *cp)); +ATTRIBUTE_NO_SANITIZE_ADDRESS EXPORT void ** getfp() { @@ -91,4 +102,13 @@ } #endif +#else /* HAVE_SCANSTACK */ + +EXPORT void ** +getfp() +{ + raisecond("getfp", 0); + return ((void **)0); +} + #endif /* HAVE_SCANSTACK */ diff -Nru cdrtools-2.01.01a33/inc/Makefile cdrtools-3.02a09/inc/Makefile --- cdrtools-2.01.01a33/inc/Makefile 1999-08-28 15:49:03.000000000 +0000 +++ cdrtools-3.02a09/inc/Makefile 2008-09-09 23:00:45.000000000 +0000 @@ -1,4 +1,4 @@ -#ident "%W% %E% %Q%" +#ident "@(#)Makefile 1.3 08/09/10 " ########################################################################### SRCROOT= .. RULESDIR= RULES @@ -7,6 +7,10 @@ MK_FILES= align_test.mk avoffset.mk +align_test.c: + @echo " ==> MAKING SYMLINKS in ." && sh ./MKLINKS +$(ALLTARGETS): align_test.c + ########################################################################### include $(SRCROOT)/$(RULESDIR)/rules.mks ########################################################################### diff -Nru cdrtools-2.01.01a33/inc/MKLINKS cdrtools-3.02a09/inc/MKLINKS --- cdrtools-2.01.01a33/inc/MKLINKS 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/inc/MKLINKS 2011-08-04 21:45:27.000000000 +0000 @@ -0,0 +1,38 @@ +#!/bin/sh +########################################################################### +#ident "@(#)MKLINKS 1.3 11/08/04 " +########################################################################### +# Written 2008-2011 by J. Schilling +########################################################################### +# Copyright (c) 2008-2011 J. Schilling +########################################################################### +# The contents of this file are subject to the terms of the +# Common Development and Distribution License, Version 1.0 only +# (the "License"). You may not use this file except in compliance +# with the License. +# +# See the file CDDL.Schily.txt in this distribution for details. +# A copy of the CDDL is also available via the Internet at +# http://www.opensource.org/licenses/cddl1.txt +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file CDDL.Schily.txt from this distribution. +########################################################################### +symlink="ln -s" +MKLINKS_TEST=${MKLINKS_TEST-:} +if [ ".$MKLINKS_COPY" = '.' ]; then + rm -f xxzzy.123 xxzzy.345 + echo test > xxzzy.123 + $symlink xxzzy.123 xxzzy.345 + test $? = 0 || symlink=cp + test -r xxzzy.345 || symlink=cp + ${MKLINKS_TEST} -h xxzzy.345 || symlink=cp + rm -f xxzzy.123 xxzzy.345 +else + symlink=cp +fi +########################################################################### + +$symlink ../lib/align_test.c . +$symlink ../lib/avoffset.c . +$symlink ../lib/getfp.c . diff -Nru cdrtools-2.01.01a33/include/scg/aspi-dos.h cdrtools-3.02a09/include/scg/aspi-dos.h --- cdrtools-2.01.01a33/include/scg/aspi-dos.h 2005-05-14 22:48:05.000000000 +0000 +++ cdrtools-3.02a09/include/scg/aspi-dos.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,157 +0,0 @@ -/* @(#)aspi-dos.h 1.2 05/05/15 J. Schilling */ -#ifndef __ASPI16_H_ -#define __ASPI16_H_ - -#define PACKED __attribute__((packed)) -#define FAR -typedef unsigned char BYTE; -typedef unsigned short WORD; -typedef unsigned long DWORD; - -//***************************************************************************** -// %%% SCSI MISCELLANEOUS EQUATES %%% -//***************************************************************************** - -#define SENSE_LEN 14 // Default sense buffer length -#define SRB_DIR_SCSI 0x00 // Direction determined by SCSI -#define SRB_POSTING 0x01 // Enable ASPI posting -#define SRB_ENABLE_RESIDUAL_COUNT 0x04 // Enable residual byte count reporting -#define SRB_DIR_IN 0x08 // Transfer from SCSI target to host -#define SRB_DIR_OUT 0x10 // Transfer from host to SCSI target - -//***************************************************************************** -// %%% ASPI Command Definitions %%% -//***************************************************************************** - -#define SC_HA_INQUIRY 0x00 // Host adapter inquiry -#define SC_GET_DEV_TYPE 0x01 // Get device type -#define SC_EXEC_SCSI_CMD 0x02 // Execute SCSI command -#define SC_ABORT_SRB 0x03 // Abort an SRB -#define SC_RESET_DEV 0x04 // SCSI bus device reset -#define SC_SET_HA_PARMS 0x05 // Set HA parameters -#define SC_GET_DISK_INFO 0x06 // Get Disk information - -//***************************************************************************** -// %%% SRB Status %%% -//***************************************************************************** - -#define SS_PENDING 0x00 // SRB being processed -#define SS_COMP 0x01 // SRB completed without error -#define SS_ABORTED 0x02 // SRB aborted -#define SS_ABORT_FAIL 0x03 // Unable to abort SRB -#define SS_ERR 0x04 // SRB completed with error - -#define SS_INVALID_CMD 0x80 // Invalid ASPI command -#define SS_INVALID_HA 0x81 // Invalid host adapter number -#define SS_NO_DEVICE 0x82 // SCSI device not installed - -//***************************************************************************** -// %%% Host Adapter Status %%% -//***************************************************************************** - -#define HASTAT_OK 0x00 // Host adapter did not detect an - // error -#define HASTAT_SEL_TO 0x11 // Selection Timeout -#define HASTAT_DO_DU 0x12 // Data overrun data underrun -#define HASTAT_BUS_FREE 0x13 // Unexpected bus free -#define HASTAT_PHASE_ERR 0x14 // Target bus phase sequence - // failure -#define HASTAT_TIMEOUT 0x09 // Timed out while SRB was - // waiting to beprocessed. -#define HASTAT_COMMAND_TIMEOUT 0x0B // Adapter timed out processing SRB. -#define HASTAT_MESSAGE_REJECT 0x0D // While processing SRB, the - // adapter received a MESSAGE -#define HASTAT_BUS_RESET 0x0E // A bus reset was detected. -#define HASTAT_PARITY_ERROR 0x0F // A parity error was detected. -#define HASTAT_REQUEST_SENSE_FAILED 0x10 // The adapter failed in issuing - -typedef struct { - - BYTE Cmd; // 00/000 ASPI command code = SC_EXEC_SCSI_CMD - BYTE Status; // 01/001 ASPI command status byte - BYTE HaId; // 02/002 ASPI host adapter number - BYTE Flags; // 03/003 ASPI request flags - DWORD Hdr_Rsvd; // 04/004 Reserved, MUST = 0 - - union { - - struct { - - BYTE Count; // 08/008 Number of host adapters present - BYTE SCSI_ID; // 09/009 SCSI ID of host adapter - BYTE ManagerId[16]; // 0A/010 String describing the manager - BYTE Identifier[16]; // 1A/026 String describing the host adapter - BYTE Unique[16]; // 2A/042 Host Adapter Unique parameters - BYTE ExtBuffer[8]; // 3A/058 Extended inquiry data - - } PACKED HAInquiry; - - struct { - - BYTE Target; // 08/008 Target's SCSI ID - BYTE Lun; // 09/009 Target's LUN number - BYTE DeviceType; // 0A/010 Target's peripheral device type - - } PACKED GetDeviceType; - - struct { - - BYTE Target; // 08/008 Target's SCSI ID - BYTE Lun; // 09/009 Target's LUN number - DWORD BufLen; // 0A/010 Data Allocation Length - BYTE SenseLen; // 0E/014 Sense Allocation Length - BYTE FAR *BufPointer; // 0F/015 Data Buffer Pointer - DWORD Rsvd1; // 13/019 Reserved, MUST = 0 - BYTE CDBLen; // 17/023 CDB Length = 6/10/12 - BYTE HaStat; // 18/024 Host Adapter Status - BYTE TargStat; // 19/025 Target Status - VOID FAR *PostProc; // 1A/026 Post routine - BYTE Rsvd2[34]; // 1E/030 Reserved, MUST = 0 - - union { - - struct { - - BYTE CDBByte[6]; // 40/064 SCSI CDB - BYTE SenseArea[SENSE_LEN+2]; // 46/070 Request Sense buffer - - } PACKED _6; - - struct { - - BYTE CDBByte[10]; // 40/064 SCSI CDB - BYTE SenseArea[SENSE_LEN+2]; // 4A/074 Request Sense buffer - - } PACKED _10; - - struct { - - BYTE CDBByte[12]; // 40/064 SCSI CDB - BYTE SenseArea[SENSE_LEN+2]; // 4C/076 Request Sense buffer - - } PACKED _12; - - } PACKED CmdLen; - - } PACKED ExecSCSICmd; - - struct { - - VOID FAR *SRBToAbort; // 08/008 Pointer to SRB to abort - - } PACKED Abort; - - struct { - BYTE Target; // 08/008 Target's SCSI ID - BYTE Lun; // 09/009 Target's LUN number - BYTE ResetRsvd1[14]; // 0A/010 Reserved, MUST = 0 - BYTE HaStat; // 18/024 Host Adapter Status - BYTE TargStat; // 19/025 Target Status - VOID FAR *PostProc; // 1A/026 Post routine - BYTE ResetRsvd2[34]; // 1E/030 Reserved, MUST = 0 - } Reset; - } PACKED Type; - -} PACKED SRB; - -#endif /* __ASPI16_H_ */ diff -Nru cdrtools-2.01.01a33/include/scg/aspi-win32.h cdrtools-3.02a09/include/scg/aspi-win32.h --- cdrtools-2.01.01a33/include/scg/aspi-win32.h 1999-05-11 22:46:51.000000000 +0000 +++ cdrtools-3.02a09/include/scg/aspi-win32.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,196 +0,0 @@ -#ifndef __ASPI_WIN32_H_ -#define __ASPI_WIN32_H_ - -#include - -/*************************************************************************** - ** SCSI MISCELLANEOUS EQUATES - ***************************************************************************/ -#define SENSE_LEN 14 /* Default sense buffer length */ -#define SRB_DIR_SCSI 0x00 /* Direction determined by SCSI */ -#define SRB_POSTING 0x01 /* Enable ASPI posting */ -#define SRB_ENABLE_RESIDUAL_COUNT 0x04 /* Enable residual byte count */ - /* reporting */ -#define SRB_DIR_IN 0x08 /* Transfer from SCSI target to */ - /* host */ -#define SRB_DIR_OUT 0x10 /* Transfer from host to SCSI */ - /* target */ -#define SRB_EVENT_NOTIFY 0x40 /* Enable ASPI event notification */ -#define RESIDUAL_COUNT_SUPPORTED 0x02 /* Extended buffer flag */ -#define MAX_SRB_TIMEOUT 1080001u /* 30 hour maximum timeout in sec */ -#define DEFAULT_SRB_TIMEOUT 1080001u /* use max.timeout by default */ - -/*************************************************************************** - ** ASPI command definitions - ***************************************************************************/ -#define SC_HA_INQUIRY 0x00 /* Host adapter inquiry */ -#define SC_GET_DEV_TYPE 0x01 /* Get device type */ -#define SC_EXEC_SCSI_CMD 0x02 /* Execute SCSI command */ -#define SC_ABORT_SRB 0x03 /* Abort an SRB */ -#define SC_RESET_DEV 0x04 /* SCSI bus device reset */ -#define SC_SET_HA_PARMS 0x05 /* Set HA parameters */ -#define SC_GET_DISK_INFO 0x06 /* Get Disk */ -#define SC_RESCAN_SCSI_BUS 0x07 /* Rebuild SCSI device map */ -#define SC_GETSET_TIMEOUTS 0x08 /* Get/Set target timeouts */ - - -/*************************************************************************** - ** SRB Status - ***************************************************************************/ -#define SS_PENDING 0x00 /* SRB being processed */ -#define SS_COMP 0x01 /* SRB completed without error */ -#define SS_ABORTED 0x02 /* SRB aborted */ -#define SS_ABORT_FAIL 0x03 /* Unable to abort SRB */ -#define SS_ERR 0x04 /* SRB completed with error */ -#define SS_INVALID_CMD 0x80 /* Invalid ASPI command */ -#define SS_INVALID_HA 0x81 /* Invalid host adapter number */ -#define SS_NO_DEVICE 0x82 /* SCSI device not installed */ -#define SS_INVALID_SRB 0xE0 /* Invalid parameter set in SRB */ -#define SS_OLD_MANAGER 0xE1 /* ASPI manager doesn't support */ - /* windows */ -#define SS_BUFFER_ALIGN 0xE1 /* Buffer not aligned (replaces */ - /* SS_OLD_MANAGER in Win32) */ -#define SS_ILLEGAL_MODE 0xE2 /* Unsupported Windows mode */ -#define SS_NO_ASPI 0xE3 /* No ASPI managers */ -#define SS_FAILED_INIT 0xE4 /* ASPI for windows failed init */ -#define SS_ASPI_IS_BUSY 0xE5 /* No resources available to */ - /* execute command */ -#define SS_BUFFER_TO_BIG 0xE6 /* Buffer size too big to handle */ -#define SS_BUFFER_TOO_BIG 0xE6 /* Correct spelling of 'too' */ -#define SS_MISMATCHED_COMPONENTS 0xE7 /* The DLLs/EXEs of ASPI don't */ - /* version check */ -#define SS_NO_ADAPTERS 0xE8 /* No host adapters to manager */ -#define SS_INSUFFICIENT_RESOURCES 0xE9 /* Couldn't allocate resources */ - /* needed to init */ -#define SS_ASPI_IS_SHUTDOWN 0xEA /* Call came to ASPI after */ - /* PROCESS_DETACH */ -#define SS_BAD_INSTALL 0xEB /* The DLL or other components */ - /* are installed wrong */ - -/*************************************************************************** - ** Host Adapter Status - ***************************************************************************/ -#define HASTAT_OK 0x00 /* No error detected by HA */ -#define HASTAT_SEL_TO 0x11 /* Selection Timeout */ -#define HASTAT_DO_DU 0x12 /* Data overrun/data underrun */ -#define HASTAT_BUS_FREE 0x13 /* Unexpected bus free */ -#define HASTAT_PHASE_ERR 0x14 /* Target bus phase sequence */ -#define HASTAT_TIMEOUT 0x09 /* Timed out while SRB was */ - /* waiting to be processed */ -#define HASTAT_COMMAND_TIMEOUT 0x0B /* Adapter timed out while */ - /* processing SRB */ -#define HASTAT_MESSAGE_REJECT 0x0D /* While processing the SRB, the */ - /* adapter received a MESSAGE */ -#define HASTAT_BUS_RESET 0x0E /* A bus reset was detected */ -#define HASTAT_PARITY_ERROR 0x0F /* A parity error was detected */ -#define HASTAT_REQUEST_SENSE_FAILED 0x10 /* The adapter failed in issuing */ - - -/*************************************************************************** - ** SRB - HOST ADAPTER INQUIRIY - SC_HA_INQUIRY (0) - ***************************************************************************/ -typedef struct { - BYTE SRB_Cmd; /* 00/000 ASPI command code == SC_HA_INQUIRY */ - BYTE SRB_Status; /* 01/001 ASPI command status byte */ - BYTE SRB_HaId; /* 02/002 ASPI host adapter number */ - BYTE SRB_Flags; /* 03/003 ASPI request flags */ - DWORD SRB_Hdr_Rsvd; /* 04/004 Reserved, must = 0 */ - BYTE HA_Count; /* 08/008 Number of host adapters present */ - BYTE HA_SCSI_ID; /* 09/009 SCSI ID of host adapter */ - BYTE HA_ManagerId[16]; /* 0a/010 String describing the manager */ - BYTE HA_Identifier[16]; /* 1a/026 String describing the host adapter */ - BYTE HA_Unique[16]; /* 2a/042 Host Adapter Unique parameters */ - WORD HA_Rsvd1; /* 3a/058 Reserved, must = 0 */ -} PACKED SRB_HAInquiry, *PSRB_HAInquiry, FAR *LPSRB_HAInquiry; - - -/*************************************************************************** - ** SRB - GET DEVICE TYPE - SC_GET_DEV_TYPE (1) - ***************************************************************************/ -typedef struct -{ - BYTE SRB_Cmd; /* 00/000 ASPI cmd code == SC_GET_DEV_TYPE */ - BYTE SRB_Status; /* 01/001 ASPI command status byte */ - BYTE SRB_HaId; /* 02/002 ASPI host adapter number */ - BYTE SRB_Flags; /* 03/003 Reserved, must = 0 */ - DWORD SRB_Hdr_Rsvd; /* 04/004 Reserved, must = 0 */ - BYTE SRB_Target; /* 08/008 Target's SCSI ID */ - BYTE SRB_Lun; /* 09/009 Target's LUN number */ - BYTE SRB_DeviceType; /* 0a/010 Target's peripheral device type */ - BYTE SRB_Rsvd1; /* 0b/011 Reserved, must = 0 */ -} PACKED SRB_GDEVBlock, *PSRB_GDEVBlock, FAR *LPSRB_GDEVBlock; - - -/*************************************************************************** - ** SRB - EXECUTE SCSI COMMAND - SC_EXEC_SCSI_CMD (2) - ***************************************************************************/ -typedef struct -{ - BYTE SRB_Cmd; /* 00/000 ASPI cmd code == SC_EXEC_SCSI_CMD */ - BYTE SRB_Status; /* 01/001 ASPI command status byte */ - BYTE SRB_HaId; /* 02/002 ASPI host adapter number */ - BYTE SRB_Flags; /* 03/003 Reserved, must = 0 */ - DWORD SRB_Hdr_Rsvd; /* 04/004 Reserved, must = 0 */ - BYTE SRB_Target; /* 08/008 Target's SCSI ID */ - BYTE SRB_Lun; /* 09/009 Target's LUN */ - WORD SRB_Rsvd1; /* 0a/010 Reserved for alignment */ - DWORD SRB_BufLen; /* 0c/012 Data Allocation Length */ - BYTE FAR *SRB_BufPointer; /* 10/016 Data Buffer Pointer */ - BYTE SRB_SenseLen; /* 14/020 Sense Allocation Length */ - BYTE SRB_CDBLen; /* 15/021 CDB Length */ - BYTE SRB_HaStat; /* 16/022 Host Adapter Status */ - BYTE SRB_TargStat; /* 17/023 Target Status */ - VOID FAR *SRB_PostProc; /* 18/024 Post routine */ - BYTE SRB_Rsvd2[20]; /* 1c/028 Reserved, must = 0 */ - BYTE CDBByte[16]; /* 30/048 SCSI CDB */ - BYTE SenseArea[SENSE_LEN+2]; /* 40/064 Request Sense buffer */ -} PACKED SRB_ExecSCSICmd, *PSRB_ExecSCSICmd, FAR *LPSRB_ExecSCSICmd; - - -typedef struct -{ - BYTE SRB_Cmd; /* 00/000 ASPI cmd code == SC_ABORT_SRB */ - BYTE SRB_Status; /* 01/001 ASPI command status byte */ - BYTE SRB_HaId; /* 02/002 ASPI host adapter number */ - BYTE SRB_Flags; /* 03/003 Reserved, must = 0 */ - DWORD SRB_Hdr_Rsvd; /* 04/004 Reserved, must = 0 */ - void *SRB_ToAbort; /* 08/008 Pointer to SRB to abort */ -} PACKED SRB_Abort, *PSRB_Abort, FAR *LPSRB_Abort; - - -/*************************************************************************** - ** SRB - BUS DEVICE RESET - SC_RESET_DEV (4) - ***************************************************************************/ -typedef struct -{ - BYTE SRB_Cmd; /* 00/000 ASPI cmd code == SC_RESET_DEV */ - BYTE SRB_Status; /* 01/001 ASPI command status byte */ - BYTE SRB_HaId; /* 02/002 ASPI host adapter number */ - DWORD SRB_Flags; /* 04/004 Reserved */ - BYTE SRB_Target; /* 08/008 Target's SCSI ID */ - BYTE SRB_Lun; /* 09/009 Target's LUN number */ - BYTE SRB_Rsvd1[12]; /* 0A/010 Reserved for alignment */ - BYTE SRB_HaStat; /* 16/022 Host Adapter Status */ - BYTE SRB_TargStat; /* 17/023 Target Status */ - VOID FAR *SRB_PostProc; /* 18/024 Post routine */ - BYTE SRB_Rsvd2[36]; /* 1C/028 Reserved, must = 0 */ -} SRB_BusDeviceReset, *PSRB_BusDeviceReset, FAR *LPSRB_BusDeviceReset; - -typedef struct tag_ASPI32BUFF -{ - PBYTE AB_BufPointer; - DWORD AB_BufLen; - DWORD AB_ZeroFill; - DWORD AB_Reserved; -} PACKED ASPI32BUFF, *PASPI32BUFF, FAR *LPASPI32BUFF; - -typedef struct -{ - BYTE SRB_Cmd; - BYTE SRB_Status; - BYTE SRB_HaId; - BYTE SRB_Flags; - DWORD SRB_Hdr_Rsvd; -} SRB, *PSRB, FAR *LPSRB; - -#endif diff -Nru cdrtools-2.01.01a33/include/scg/scgcmd.h cdrtools-3.02a09/include/scg/scgcmd.h --- cdrtools-2.01.01a33/include/scg/scgcmd.h 2006-09-13 12:24:12.000000000 +0000 +++ cdrtools-3.02a09/include/scg/scgcmd.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,204 +0,0 @@ -/* @(#)scgcmd.h 2.23 06/09/13 Copyright 1986 J. Schilling */ -/* - * Definitions for the SCSI 'scg_cmd' structure that has been created - * for the SCSI general driver 'scg' for SunOS and Solaris but - * now is used for wrapping general libscg SCSI transport requests. - * - * Copyright (c) 1986 J. Schilling - */ -/* - * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. - * - * See the file CDDL.Schily.txt in this distribution for details. - * - * The following exceptions apply: - * CDDL §3.6 needs to be replaced by: "You may create a Larger Work by - * combining Covered Software with other code if all other code is governed by - * the terms of a license that is OSI approved (see www.opensource.org) and - * you may distribute the Larger Work as a single product. In such a case, - * You must make sure the requirements of this License are fulfilled for - * the Covered Software." - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file CDDL.Schily.txt from this distribution. - */ - -#ifndef _SCG_SCGCMD_H -#define _SCG_SCGCMD_H - -#include -#include - -#if defined(_BIT_FIELDS_LTOH) /* Intel byteorder */ -#else -# if defined(_BIT_FIELDS_HTOL) /* Motorola byteorder */ -# else -/* - * #error will not work for all compilers (e.g. sunos4) - * The following line will abort compilation on all compilers - * if none of the above is defines. And that's what we want. - */ -error One of _BIT_FIELDS_LTOH or _BIT_FIELDS_HTOL must be defined -# endif -#endif - -#include -#include -#include - -#ifdef __cplusplus -extern "C" { -#endif - -/* - * Leave these definitions here if possible to avoid the need to - * include scsireg.h which makes problems on some OS because these - * OS define the same types as in scsireg.h - */ - -/* - * SCSI status bits. - */ -#define ST_VU_00 0x01 /* Vendor unique */ -#define ST_CHK_COND 0x02 /* Check condition */ -#define ST_COND_MET 0x04 /* Condition met */ -#define ST_BUSY 0x08 /* Busy */ -#define ST_IS_SEND 0x10 /* Intermediate status send */ -#define ST_VU_05 0x20 /* Vendor unique */ -#define ST_VU_06 0x40 /* Vendor unique */ -#define ST_RSVD_07 0x80 /* Reserved */ - -/* - * Sense key values for extended sense. - */ -#define SC_NO_SENSE 0x00 -#define SC_RECOVERABLE_ERROR 0x01 -#define SC_NOT_READY 0x02 -#define SC_MEDIUM_ERROR 0x03 -#define SC_HARDWARE_ERROR 0x04 -#define SC_ILLEGAL_REQUEST 0x05 -#define SC_UNIT_ATTENTION 0x06 -#define SC_WRITE_PROTECT 0x07 -#define SC_BLANK_CHECK 0x08 -#define SC_VENDOR_UNIQUE 0x09 -#define SC_COPY_ABORTED 0x0A -#define SC_ABORTED_COMMAND 0x0B -#define SC_EQUAL 0x0C -#define SC_VOLUME_OVERFLOW 0x0D -#define SC_MISCOMPARE 0x0E -#define SC_RESERVED 0x0F - -/* - * Messages that SCSI can send. - */ -#define SC_COMMAND_COMPLETE 0x00 -#define SC_SYNCHRONOUS 0x01 -#define SC_SAVE_DATA_PTR 0x02 -#define SC_RESTORE_PTRS 0x03 -#define SC_DISCONNECT 0x04 -#define SC_ABORT 0x06 -#define SC_MSG_REJECT 0x07 -#define SC_NO_OP 0x08 -#define SC_PARITY 0x09 -#define SC_IDENTIFY 0x80 -#define SC_DR_IDENTIFY 0xc0 -#define SC_DEVICE_RESET 0x0c - -#define SC_G0_CDBLEN 6 /* Len of Group 0 commands */ -#define SC_G1_CDBLEN 10 /* Len of Group 1 commands */ -#define SC_G5_CDBLEN 12 /* Len of Group 5 commands */ - -#define SCG_MAX_CMD 24 /* 24 bytes max. size is supported */ -#define SCG_MAX_STATUS 3 /* XXX (sollte 4 allign.) Mamimum Status Len */ -#define SCG_MAX_SENSE 32 /* Mamimum Sense Len for auto Req. Sense */ - -#define DEF_SENSE_LEN 16 /* Default Sense Len */ -#define CCS_SENSE_LEN 18 /* Sense Len for CCS compatible devices */ - -struct scg_cmd { - caddr_t addr; /* Address of data in user space */ - int size; /* DMA count for data transfer */ - int flags; /* see below for definition */ - int cdb_len; /* Size of SCSI command in bytes */ - /* NOTE: rel 4 uses this field only */ - /* with commands not in group 1 or 2*/ - int sense_len; /* for intr() if -1 don't get sense */ - int timeout; /* timeout in seconds */ - /* NOTE: actual resolution depends */ - /* on driver implementation */ - int kdebug; /* driver kernel debug level */ - int resid; /* Bytes not transfered */ - int error; /* Error code from scgintr() */ - int ux_errno; /* UNIX error code */ -#ifdef comment -XXX struct scsi_status scb; ??? /* Status returnd by command */ -#endif - union { - struct scsi_status Scb; /* Status returnd by command */ - Uchar cmd_scb[SCG_MAX_STATUS]; - } u_scb; -#define scb u_scb.Scb -#ifdef comment -XXX struct scsi_sense sense; ??? /* Sense bytes from command */ -#endif - union { - struct scsi_sense Sense; /* Sense bytes from command */ - Uchar cmd_sense[SCG_MAX_SENSE]; - } u_sense; -#define sense u_sense.Sense - int sense_count; /* Number of bytes valid in sense */ - int target; /* SCSI target id */ - /* NOTE: The SCSI target id field */ - /* does not need to be filled unless */ - /* the low level transport is a real */ - /* scg driver. In this case the low */ - /* level transport routine of libscg */ - /* will fill in the needed value */ - union { /* SCSI command descriptor block */ - struct scsi_g0cdb g0_cdb; - struct scsi_g1cdb g1_cdb; - struct scsi_g5cdb g5_cdb; - Uchar cmd_cdb[SCG_MAX_CMD]; - } cdb; /* 24 bytes max. size is supported */ -}; - -#define dma_read flags /* 1 if DMA to Sun, 0 otherwise */ - -/* - * definition for flags field in scg_cmd struct - */ -#define SCG_RECV_DATA 0x0001 /* DMA direction to Sun */ -#define SCG_DISRE_ENA 0x0002 /* enable disconnect/reconnect */ -#define SCG_SILENT 0x0004 /* be silent on errors */ -#define SCG_CMD_RETRY 0x0008 /* enable retries */ -#define SCG_NOPARITY 0x0010 /* disable parity for this command */ - -/* - * definition for error field in scg_cmd struct - * - * The codes refer to SCSI general errors, not to device - * specific errors. Device specific errors are discovered - * by checking the sense data. - * The distinction between retryable and fatal is somewhat ad hoc. - */ -#define SCG_NO_ERROR 0 /* cdb transported without error */ - /* SCG_NO_ERROR incudes all commands */ - /* where the SCSI status is valid */ - -#define SCG_RETRYABLE 1 /* any other case e.g. SCSI bus busy */ - /* SCSI cdb could not be send, */ - /* includes DMA errors other than */ - /* DMA underrun */ - -#define SCG_FATAL 2 /* could not select target */ -#define SCG_TIMEOUT 3 /* driver timed out */ - - -#ifdef __cplusplus -} -#endif - -#endif /* _SCG_SCGCMD_H */ diff -Nru cdrtools-2.01.01a33/include/scg/scgio.h cdrtools-3.02a09/include/scg/scgio.h --- cdrtools-2.01.01a33/include/scg/scgio.h 2000-11-07 23:06:06.000000000 +0000 +++ cdrtools-3.02a09/include/scg/scgio.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,72 +0,0 @@ -/* @(#)scgio.h 2.16 00/11/07 Copyright 1986 J. Schilling */ -/* - * Definitions for the SCSI general driver 'scg' - * - * Copyright (c) 1986 J. Schilling - */ -/* - * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. - * - * See the file CDDL.Schily.txt in this distribution for details. - * - * The following exceptions apply: - * CDDL §3.6 needs to be replaced by: "You may create a Larger Work by - * combining Covered Software with other code if all other code is governed by - * the terms of a license that is OSI approved (see www.opensource.org) and - * you may distribute the Larger Work as a single product. In such a case, - * You must make sure the requirements of this License are fulfilled for - * the Covered Software." - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file CDDL.Schily.txt from this distribution. - */ - -#ifndef _SCG_SCGIO_H -#define _SCG_SCGIO_H - -#ifndef _SCG_SCGCMD_H -#include -#endif - -#if defined(SVR4) -#include -#endif - -#ifdef __cplusplus -extern "C" { -#endif - -#if defined(__STDC__) || defined(SVR4) -#define SCGIOCMD _IOWR('G', 1, struct scg_cmd) /* do a SCSI cmd */ -#define SCGIORESET _IO('G', 2) /* reset SCSI bus */ -#define SCGIOGDISRE _IOR('G', 4, int) /* get sc disre Val*/ -#define SCGIOSDISRE _IOW('G', 5, int) /* set sc disre Val*/ -#define SCGIOIDBG _IO('G', 100) /* Inc Debug Val */ -#define SCGIODDBG _IO('G', 101) /* Dec Debug Val */ -#define SCGIOGDBG _IOR('G', 102, int) /* get Debug Val */ -#define SCGIOSDBG _IOW('G', 103, int) /* set Debug Val */ -#define SCIOGDBG _IOR('G', 104, int) /* get sc Debug Val*/ -#define SCIOSDBG _IOW('G', 105, int) /* set sc Debug Val*/ -#else -#define SCGIOCMD _IOWR(G, 1, struct scg_cmd) /* do a SCSI cmd */ -#define SCGIORESET _IO(G, 2) /* reset SCSI bus */ -#define SCGIOGDISRE _IOR(G, 4, int) /* get sc disre Val*/ -#define SCGIOSDISRE _IOW(G, 5, int) /* set sc disre Val*/ -#define SCGIOIDBG _IO(G, 100) /* Inc Debug Val */ -#define SCGIODDBG _IO(G, 101) /* Dec Debug Val */ -#define SCGIOGDBG _IOR(G, 102, int) /* get Debug Val */ -#define SCGIOSDBG _IOW(G, 103, int) /* set Debug Val */ -#define SCIOGDBG _IOR(G, 104, int) /* get sc Debug Val*/ -#define SCIOSDBG _IOW(G, 105, int) /* set sc Debug Val*/ -#endif - -#define SCGIO_CMD SCGIOCMD /* backward ccompatibility */ - -#ifdef __cplusplus -} -#endif - -#endif /* _SCG_SCGIO_H */ diff -Nru cdrtools-2.01.01a33/include/scg/scgops.h cdrtools-3.02a09/include/scg/scgops.h --- cdrtools-2.01.01a33/include/scg/scgops.h 2006-11-26 16:38:44.000000000 +0000 +++ cdrtools-3.02a09/include/scg/scgops.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,75 +0,0 @@ -/* @(#)scgops.h 1.6 06/11/26 Copyright 2000 J. Schilling */ -/* - * Copyright (c) 2000 J. Schilling - */ -/* - * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. - * - * See the file CDDL.Schily.txt in this distribution for details. - * - * The following exceptions apply: - * CDDL §3.6 needs to be replaced by: "You may create a Larger Work by - * combining Covered Software with other code if all other code is governed by - * the terms of a license that is OSI approved (see www.opensource.org) and - * you may distribute the Larger Work as a single product. In such a case, - * You must make sure the requirements of this License are fulfilled for - * the Covered Software." - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file CDDL.Schily.txt from this distribution. - */ - -#ifndef _SCG_SCGOPS_H -#define _SCG_SCGOPS_H - -#ifdef __cplusplus -extern "C" { -#endif - -typedef struct scg_ops { - int (*scgo_send) __PR((SCSI *scgp)); - - char * (*scgo_version) __PR((SCSI *scgp, int what)); -#ifdef EOF /* stdio.h has been included */ - int (*scgo_help) __PR((SCSI *scgp, FILE *f)); -#else - int (*scgo_help) __PR((SCSI *scgp, void *f)); -#endif - int (*scgo_open) __PR((SCSI *scgp, char *device)); - int (*scgo_close) __PR((SCSI *scgp)); - long (*scgo_maxdma) __PR((SCSI *scgp, long amt)); - void * (*scgo_getbuf) __PR((SCSI *scgp, long amt)); - void (*scgo_freebuf) __PR((SCSI *scgp)); - - - int (*scgo_numbus) __PR((SCSI *scgp)); - BOOL (*scgo_havebus) __PR((SCSI *scgp, int busno)); - int (*scgo_fileno) __PR((SCSI *scgp, int busno, int tgt, int tlun)); - int (*scgo_initiator_id) __PR((SCSI *scgp)); - int (*scgo_isatapi) __PR((SCSI *scgp)); - int (*scgo_reset) __PR((SCSI *scgp, int what)); -} scg_ops_t; - -#define SCGO_SEND(scgp) (*(scgp)->ops->scgo_send)(scgp) -#define SCGO_VERSION(scgp, what) (*(scgp)->ops->scgo_version)(scgp, what) -#define SCGO_HELP(scgp, f) (*(scgp)->ops->scgo_help)(scgp, f) -#define SCGO_OPEN(scgp, device) (*(scgp)->ops->scgo_open)(scgp, device) -#define SCGO_CLOSE(scgp) (*(scgp)->ops->scgo_close)(scgp) -#define SCGO_MAXDMA(scgp, amt) (*(scgp)->ops->scgo_maxdma)(scgp, amt) -#define SCGO_GETBUF(scgp, amt) (*(scgp)->ops->scgo_getbuf)(scgp, amt) -#define SCGO_FREEBUF(scgp) (*(scgp)->ops->scgo_freebuf)(scgp) -#define SCGO_NUMBUS(scgp) (*(scgp)->ops->scgo_numbus)(scgp) -#define SCGO_HAVEBUS(scgp, busno) (*(scgp)->ops->scgo_havebus)(scgp, busno) -#define SCGO_FILENO(scgp, busno, tgt, tlun) (*(scgp)->ops->scgo_fileno)(scgp, busno, tgt, tlun) -#define SCGO_INITIATOR_ID(scgp) (*(scgp)->ops->scgo_initiator_id)(scgp) -#define SCGO_ISATAPI(scgp) (*(scgp)->ops->scgo_isatapi)(scgp) -#define SCGO_RESET(scgp, what) (*(scgp)->ops->scgo_reset)(scgp, what) - -#ifdef __cplusplus -} -#endif - -#endif /* _SCG_SCGOPS_H */ diff -Nru cdrtools-2.01.01a33/include/scg/scsicdb.h cdrtools-3.02a09/include/scg/scsicdb.h --- cdrtools-2.01.01a33/include/scg/scsicdb.h 2006-09-13 12:24:12.000000000 +0000 +++ cdrtools-3.02a09/include/scg/scsicdb.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,253 +0,0 @@ -/* @(#)scsicdb.h 2.20 06/09/13 Copyright 1986 J. Schilling */ -/* - * Definitions for the SCSI Command Descriptor Block - * - * Copyright (c) 1986 J. Schilling - */ -/* - * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. - * - * See the file CDDL.Schily.txt in this distribution for details. - * - * The following exceptions apply: - * CDDL §3.6 needs to be replaced by: "You may create a Larger Work by - * combining Covered Software with other code if all other code is governed by - * the terms of a license that is OSI approved (see www.opensource.org) and - * you may distribute the Larger Work as a single product. In such a case, - * You must make sure the requirements of this License are fulfilled for - * the Covered Software." - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file CDDL.Schily.txt from this distribution. - */ - -#ifndef _SCG_SCSICDB_H -#define _SCG_SCSICDB_H - -#ifndef _SCHILY_UTYPES_H -#include -#endif - -#ifdef __cplusplus -extern "C" { -#endif -/* - * SCSI Operation codes. - */ -#define SC_TEST_UNIT_READY 0x00 -#define SC_REZERO_UNIT 0x01 -#define SC_REQUEST_SENSE 0x03 -#define SC_FORMAT 0x04 -#define SC_FORMAT_TRACK 0x06 -#define SC_REASSIGN_BLOCK 0x07 /* CCS only */ -#define SC_SEEK 0x0b -#define SC_TRANSLATE 0x0f /* ACB4000 only */ -#define SC_INQUIRY 0x12 /* CCS only */ -#define SC_MODE_SELECT 0x15 -#define SC_RESERVE 0x16 -#define SC_RELEASE 0x17 -#define SC_MODE_SENSE 0x1a -#define SC_START 0x1b -#define SC_READ_DEFECT_LIST 0x37 /* CCS only, group 1 */ -#define SC_READ_BUFFER 0x3c /* CCS only, group 1 */ - /* - * Note, these two commands use identical command blocks for all - * controllers except the Adaptec ACB 4000 which sets bit 1 of byte 1. - */ -#define SC_READ 0x08 -#define SC_WRITE 0x0a -#define SC_EREAD 0x28 /* 10 byte read */ -#define SC_EWRITE 0x2a /* 10 byte write */ -#define SC_WRITE_VERIFY 0x2e /* 10 byte write+verify */ -#define SC_WRITE_FILE_MARK 0x10 -#define SC_UNKNOWN 0xff /* cmd list terminator */ - - -/* - * Standard SCSI control blocks. - * These go in or out over the SCSI bus. - */ - -#if defined(_BIT_FIELDS_LTOH) /* Intel byteorder */ - -struct scsi_g0cdb { /* scsi group 0 command description block */ - Uchar cmd; /* command code */ - Ucbit high_addr : 5; /* high part of block address */ - Ucbit lun : 3; /* logical unit number */ - Uchar mid_addr; /* middle part of block address */ - Uchar low_addr; /* low part of block address */ - Uchar count; /* transfer length */ - Ucbit link : 1; /* link (another command follows) */ - Ucbit fr : 1; /* flag request (interrupt at completion) */ - Ucbit naca : 1; /* Normal ACA (Auto Contingent Allegiance) */ - Ucbit rsvd : 3; /* reserved */ - Ucbit vu_56 : 1; /* vendor unique (byte 5 bit 6) */ - Ucbit vu_57 : 1; /* vendor unique (byte 5 bit 7) */ -}; - -#else /* Motorola byteorder */ - -struct scsi_g0cdb { /* scsi group 0 command description block */ - Uchar cmd; /* command code */ - Ucbit lun : 3; /* logical unit number */ - Ucbit high_addr : 5; /* high part of block address */ - Uchar mid_addr; /* middle part of block address */ - Uchar low_addr; /* low part of block address */ - Uchar count; /* transfer length */ - Ucbit vu_57 : 1; /* vendor unique (byte 5 bit 7) */ - Ucbit vu_56 : 1; /* vendor unique (byte 5 bit 6) */ - Ucbit rsvd : 3; /* reserved */ - Ucbit naca : 1; /* Normal ACA (Auto Contingent Allegiance) */ - Ucbit fr : 1; /* flag request (interrupt at completion) */ - Ucbit link : 1; /* link (another command follows) */ -}; -#endif - -#if defined(_BIT_FIELDS_LTOH) /* Intel byteorder */ - -struct scsi_g1cdb { /* scsi group 1 command description block */ - Uchar cmd; /* command code */ - Ucbit reladr : 1; /* address is relative */ - Ucbit res : 4; /* reserved bits 1-4 of byte 1 */ - Ucbit lun : 3; /* logical unit number */ - Uchar addr[4]; /* logical block address */ - Uchar res6; /* reserved byte 6 */ - Uchar count[2]; /* transfer length */ - Ucbit link : 1; /* link (another command follows) */ - Ucbit fr : 1; /* flag request (interrupt at completion) */ - Ucbit naca : 1; /* Normal ACA (Auto Contingent Allegiance) */ - Ucbit rsvd : 3; /* reserved */ - Ucbit vu_96 : 1; /* vendor unique (byte 5 bit 6) */ - Ucbit vu_97 : 1; /* vendor unique (byte 5 bit 7) */ -}; - -#else /* Motorola byteorder */ - -struct scsi_g1cdb { /* scsi group 1 command description block */ - Uchar cmd; /* command code */ - Ucbit lun : 3; /* logical unit number */ - Ucbit res : 4; /* reserved bits 1-4 of byte 1 */ - Ucbit reladr : 1; /* address is relative */ - Uchar addr[4]; /* logical block address */ - Uchar res6; /* reserved byte 6 */ - Uchar count[2]; /* transfer length */ - Ucbit vu_97 : 1; /* vendor unique (byte 5 bit 7) */ - Ucbit vu_96 : 1; /* vendor unique (byte 5 bit 6) */ - Ucbit rsvd : 3; /* reserved */ - Ucbit naca : 1; /* Normal ACA (Auto Contingent Allegiance) */ - Ucbit fr : 1; /* flag request (interrupt at completion) */ - Ucbit link : 1; /* link (another command follows) */ -}; -#endif - -#if defined(_BIT_FIELDS_LTOH) /* Intel byteorder */ - -struct scsi_g5cdb { /* scsi group 5 command description block */ - Uchar cmd; /* command code */ - Ucbit reladr : 1; /* address is relative */ - Ucbit res : 4; /* reserved bits 1-4 of byte 1 */ - Ucbit lun : 3; /* logical unit number */ - Uchar addr[4]; /* logical block address */ - Uchar count[4]; /* transfer length */ - Uchar res10; /* reserved byte 10 */ - Ucbit link : 1; /* link (another command follows) */ - Ucbit fr : 1; /* flag request (interrupt at completion) */ - Ucbit naca : 1; /* Normal ACA (Auto Contingent Allegiance) */ - Ucbit rsvd : 3; /* reserved */ - Ucbit vu_B6 : 1; /* vendor unique (byte B bit 6) */ - Ucbit vu_B7 : 1; /* vendor unique (byte B bit 7) */ -}; - -#else /* Motorola byteorder */ - -struct scsi_g5cdb { /* scsi group 5 command description block */ - Uchar cmd; /* command code */ - Ucbit lun : 3; /* logical unit number */ - Ucbit res : 4; /* reserved bits 1-4 of byte 1 */ - Ucbit reladr : 1; /* address is relative */ - Uchar addr[4]; /* logical block address */ - Uchar count[4]; /* transfer length */ - Uchar res10; /* reserved byte 10 */ - Ucbit vu_B7 : 1; /* vendor unique (byte B bit 7) */ - Ucbit vu_B6 : 1; /* vendor unique (byte B bit 6) */ - Ucbit rsvd : 3; /* reserved */ - Ucbit naca : 1; /* Normal ACA (Auto Contingent Allegiance) */ - Ucbit fr : 1; /* flag request (interrupt at completion) */ - Ucbit link : 1; /* link (another command follows) */ -}; -#endif - -#define g0_cdbaddr(cdb, a) ((cdb)->high_addr = (a) >> 16,\ - (cdb)->mid_addr = ((a) >> 8) & 0xFF,\ - (cdb)->low_addr = (a) & 0xFF) - -#define g1_cdbaddr(cdb, a) ((cdb)->addr[0] = (a) >> 24,\ - (cdb)->addr[1] = ((a) >> 16)& 0xFF,\ - (cdb)->addr[2] = ((a) >> 8) & 0xFF,\ - (cdb)->addr[3] = (a) & 0xFF) - -#define g5_cdbaddr(cdb, a) g1_cdbaddr(cdb, a) - - -#define g0_cdblen(cdb, len) ((cdb)->count = (len)) - -#define g1_cdblen(cdb, len) ((cdb)->count[0] = ((len) >> 8) & 0xFF,\ - (cdb)->count[1] = (len) & 0xFF) - -#define g5_cdblen(cdb, len) ((cdb)->count[0] = (len) >> 24L,\ - (cdb)->count[1] = ((len) >> 16L)& 0xFF,\ - (cdb)->count[2] = ((len) >> 8L) & 0xFF,\ - (cdb)->count[3] = (len) & 0xFF) - -/*#define XXXXX*/ -#ifdef XXXXX -#define i_to_long(a, i) (((Uchar *)(a))[0] = ((i) >> 24)& 0xFF,\ - ((Uchar *)(a))[1] = ((i) >> 16)& 0xFF,\ - ((Uchar *)(a))[2] = ((i) >> 8) & 0xFF,\ - ((Uchar *)(a))[3] = (i) & 0xFF) - -#define i_to_3_byte(a, i) (((Uchar *)(a))[0] = ((i) >> 16)& 0xFF,\ - ((Uchar *)(a))[1] = ((i) >> 8) & 0xFF,\ - ((Uchar *)(a))[2] = (i) & 0xFF) - -#define i_to_4_byte(a, i) (((Uchar *)(a))[0] = ((i) >> 24)& 0xFF,\ - ((Uchar *)(a))[1] = ((i) >> 16)& 0xFF,\ - ((Uchar *)(a))[2] = ((i) >> 8) & 0xFF,\ - ((Uchar *)(a))[3] = (i) & 0xFF) - -#define i_to_short(a, i) (((Uchar *)(a))[0] = ((i) >> 8) & 0xFF,\ - ((Uchar *)(a))[1] = (i) & 0xFF) - -#define a_to_u_short(a) ((unsigned short) \ - ((((Uchar*) a)[1] & 0xFF) | \ - (((Uchar*) a)[0] << 8 & 0xFF00))) - -#define a_to_3_byte(a) ((Ulong) \ - ((((Uchar*) a)[2] & 0xFF) | \ - (((Uchar*) a)[1] << 8 & 0xFF00) | \ - (((Uchar*) a)[0] << 16 & 0xFF0000))) - -#ifdef __STDC__ -#define a_to_u_long(a) ((Ulong) \ - ((((Uchar*) a)[3] & 0xFF) | \ - (((Uchar*) a)[2] << 8 & 0xFF00) | \ - (((Uchar*) a)[1] << 16 & 0xFF0000) | \ - (((Uchar*) a)[0] << 24 & 0xFF000000UL))) -#else -#define a_to_u_long(a) ((Ulong) \ - ((((Uchar*) a)[3] & 0xFF) | \ - (((Uchar*) a)[2] << 8 & 0xFF00) | \ - (((Uchar*) a)[1] << 16 & 0xFF0000) | \ - (((Uchar*) a)[0] << 24 & 0xFF000000))) -#endif -#endif /* XXXX */ - - -#ifdef __cplusplus -} -#endif - -#endif /* _SCG_SCSICDB_H */ diff -Nru cdrtools-2.01.01a33/include/scg/scsidefs.h cdrtools-3.02a09/include/scg/scsidefs.h --- cdrtools-2.01.01a33/include/scg/scsidefs.h 2004-09-04 19:28:05.000000000 +0000 +++ cdrtools-3.02a09/include/scg/scsidefs.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,129 +0,0 @@ -/* @(#)scsidefs.h 1.28 04/09/04 Copyright 1988 J. Schilling */ -/* - * Definitions for SCSI devices i.e. for error strings in scsierrs.c - * - * Copyright (c) 1988 J. Schilling - */ -/* - * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. - * - * See the file CDDL.Schily.txt in this distribution for details. - * - * The following exceptions apply: - * CDDL §3.6 needs to be replaced by: "You may create a Larger Work by - * combining Covered Software with other code if all other code is governed by - * the terms of a license that is OSI approved (see www.opensource.org) and - * you may distribute the Larger Work as a single product. In such a case, - * You must make sure the requirements of this License are fulfilled for - * the Covered Software." - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file CDDL.Schily.txt from this distribution. - */ - -#ifndef _SCG_SCSIDEFS_H -#define _SCG_SCSIDEFS_H - -#ifdef __cplusplus -extern "C" { -#endif - -/* - * Disks - */ -#ifdef DEV_UNKNOWN -/* - * True64 defines DEV_UNKNOWN in /usr/include/sys/devio.h as "UNKNOWN" - */ -#undef DEV_UNKNOWN -#endif -#define DEV_UNKNOWN 0 -#define DEV_ACB40X0 1 -#define DEV_ACB4000 2 -#define DEV_ACB4010 3 -#define DEV_ACB4070 4 -#define DEV_ACB5500 5 -#define DEV_ACB4520A 6 -#define DEV_ACB4525 7 -#define DEV_MD21 8 -#define DEV_MD23 9 -#define DEV_NON_CCS_DSK 10 -#define DEV_CCS_GENDISK 11 - -/* - * Tapes - */ -#define DEV_MT02 100 -#define DEV_SC4000 101 - -/* - * Printer - */ -#define DEV_PRT 200 - -/* - * Processors - */ -#define DEV_PROC 300 - -/* - * Worm - */ -#define DEV_WORM 400 -#define DEV_RXT800S 401 - -/* - * CD-ROM - */ -#define DEV_CDROM 500 -#define DEV_MMC_CDROM 501 -#define DEV_MMC_CDR 502 -#define DEV_MMC_CDRW 503 -#define DEV_MMC_DVD 504 -#define DEV_MMC_DVD_WR 505 - -#define DEV_CDD_521_OLD 510 -#define DEV_CDD_521 511 -#define DEV_CDD_522 512 -#define DEV_PCD_600 513 -#define DEV_CDD_2000 514 -#define DEV_CDD_2600 515 -#define DEV_TYUDEN_EW50 516 -#define DEV_YAMAHA_CDR_100 520 -#define DEV_YAMAHA_CDR_400 521 -#define DEV_PLASMON_RF_4100 530 -#define DEV_SONY_CDU_924 540 -#define DEV_RICOH_RO_1420C 550 -#define DEV_RICOH_RO_1060C 551 -#define DEV_TEAC_CD_R50S 560 -#define DEV_MATSUSHITA_7501 570 -#define DEV_MATSUSHITA_7502 571 -#define DEV_PIONEER_DW_S114X 580 -#define DEV_PIONEER_DVDR_S101 581 - -/* - * Scanners - */ -#define DEV_HRSCAN 600 -#define DEV_MS300A 601 - -/* - * Optical memory - */ -#define DEV_SONY_SMO 700 - - -#define old_acb(d) (((d) == DEV_ACB40X0) || \ - ((d) == DEV_ACB4000) || ((d) == DEV_ACB4010) || \ - ((d) == DEV_ACB4070) || ((d) == DEV_ACB5500)) - -#define is_ccs(d) (!old_acb(d)) - -#ifdef __cplusplus -} -#endif - -#endif /* _SCG_SCSIDEFS_H */ diff -Nru cdrtools-2.01.01a33/include/scg/scsireg.h cdrtools-3.02a09/include/scg/scsireg.h --- cdrtools-2.01.01a33/include/scg/scsireg.h 2006-09-13 12:24:12.000000000 +0000 +++ cdrtools-3.02a09/include/scg/scsireg.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,1233 +0,0 @@ -/* @(#)scsireg.h 1.32 06/09/13 Copyright 1987 J. Schilling */ -/* - * usefull definitions for dealing with CCS SCSI - devices - * - * Copyright (c) 1987 J. Schilling - */ -/* - * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. - * - * See the file CDDL.Schily.txt in this distribution for details. - * - * The following exceptions apply: - * CDDL §3.6 needs to be replaced by: "You may create a Larger Work by - * combining Covered Software with other code if all other code is governed by - * the terms of a license that is OSI approved (see www.opensource.org) and - * you may distribute the Larger Work as a single product. In such a case, - * You must make sure the requirements of this License are fulfilled for - * the Covered Software." - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file CDDL.Schily.txt from this distribution. - */ - -#ifndef _SCG_SCSIREG_H -#define _SCG_SCSIREG_H - -#include -#include - -#ifdef __cplusplus -extern "C" { -#endif - -#if defined(_BIT_FIELDS_LTOH) /* Intel byteorder */ - -struct scsi_inquiry { - Ucbit type : 5; /* 0 */ - Ucbit qualifier : 3; /* 0 */ - - Ucbit type_modifier : 7; /* 1 */ - Ucbit removable : 1; /* 1 */ - - Ucbit ansi_version : 3; /* 2 */ - Ucbit ecma_version : 3; /* 2 */ - Ucbit iso_version : 2; /* 2 */ - - Ucbit data_format : 4; /* 3 */ - Ucbit res3_54 : 2; /* 3 */ - Ucbit termiop : 1; /* 3 */ - Ucbit aenc : 1; /* 3 */ - - Ucbit add_len : 8; /* 4 */ - Ucbit sense_len : 8; /* 5 */ /* only Emulex ??? */ - Ucbit res2 : 8; /* 6 */ - - Ucbit softreset : 1; /* 7 */ - Ucbit cmdque : 1; - Ucbit res7_2 : 1; - Ucbit linked : 1; - Ucbit sync : 1; - Ucbit wbus16 : 1; - Ucbit wbus32 : 1; - Ucbit reladr : 1; /* 7 */ - - char vendor_info[8]; /* 8 */ - char prod_ident[16]; /* 16 */ - char prod_revision[4]; /* 32 */ -#ifdef comment - char vendor_uniq[20]; /* 36 */ - char reserved[40]; /* 56 */ -#endif -}; /* 96 */ - -#else /* Motorola byteorder */ - -struct scsi_inquiry { - Ucbit qualifier : 3; /* 0 */ - Ucbit type : 5; /* 0 */ - - Ucbit removable : 1; /* 1 */ - Ucbit type_modifier : 7; /* 1 */ - - Ucbit iso_version : 2; /* 2 */ - Ucbit ecma_version : 3; - Ucbit ansi_version : 3; /* 2 */ - - Ucbit aenc : 1; /* 3 */ - Ucbit termiop : 1; - Ucbit res3_54 : 2; - Ucbit data_format : 4; /* 3 */ - - Ucbit add_len : 8; /* 4 */ - Ucbit sense_len : 8; /* 5 */ /* only Emulex ??? */ - Ucbit res2 : 8; /* 6 */ - Ucbit reladr : 1; /* 7 */ - Ucbit wbus32 : 1; - Ucbit wbus16 : 1; - Ucbit sync : 1; - Ucbit linked : 1; - Ucbit res7_2 : 1; - Ucbit cmdque : 1; - Ucbit softreset : 1; - char vendor_info[8]; /* 8 */ - char prod_ident[16]; /* 16 */ - char prod_revision[4]; /* 32 */ -#ifdef comment - char vendor_uniq[20]; /* 36 */ - char reserved[40]; /* 56 */ -#endif -}; /* 96 */ -#endif - -#ifdef __SCG_COMPAT__ -#define info vendor_info -#define ident prod_ident -#define revision prod_revision -#endif - -/* Peripheral Device Qualifier */ - -#define INQ_DEV_PRESENT 0x00 /* Physical device present */ -#define INQ_DEV_NOTPR 0x01 /* Physical device not present */ -#define INQ_DEV_RES 0x02 /* Reserved */ -#define INQ_DEV_NOTSUP 0x03 /* Logical unit not supported */ - -/* Peripheral Device Type */ - -#define INQ_DASD 0x00 /* Direct-access device (disk) */ -#define INQ_SEQD 0x01 /* Sequential-access device (tape) */ -#define INQ_PRTD 0x02 /* Printer device */ -#define INQ_PROCD 0x03 /* Processor device */ -#define INQ_OPTD 0x04 /* Write once device (optical disk) */ -#define INQ_WORM 0x04 /* Write once device (optical disk) */ -#define INQ_ROMD 0x05 /* CD-ROM device */ -#define INQ_SCAN 0x06 /* Scanner device */ -#define INQ_OMEM 0x07 /* Optical Memory device */ -#define INQ_JUKE 0x08 /* Medium Changer device (jukebox) */ -#define INQ_COMM 0x09 /* Communications device */ -#define INQ_IT8_1 0x0A /* IT8 */ -#define INQ_IT8_2 0x0B /* IT8 */ -#define INQ_STARR 0x0C /* Storage array device */ -#define INQ_ENCL 0x0D /* Enclosure services device */ -#define INQ_SDAD 0x0E /* Simplyfied direct-access device */ -#define INQ_OCRW 0x0F /* Optical card reader/writer device */ -#define INQ_BRIDGE 0x10 /* Bridging expander device */ -#define INQ_OSD 0x11 /* Object based storage device */ -#define INQ_ADC 0x12 /* Automation/Drive interface */ -#define INQ_WELLKNOWN 0x1E /* Well known logical unit */ -#define INQ_NODEV 0x1F /* Unknown or no device */ -#define INQ_NOTPR 0x1F /* Logical unit not present (SCSI-1) */ - -#if defined(_BIT_FIELDS_LTOH) /* Intel byteorder */ - -struct scsi_mode_header { - Ucbit sense_data_len : 8; - Uchar medium_type; - Ucbit res2 : 4; - Ucbit cache : 1; - Ucbit res : 2; - Ucbit write_prot : 1; - Uchar blockdesc_len; -}; - -#else /* Motorola byteorder */ - -struct scsi_mode_header { - Ucbit sense_data_len : 8; - Uchar medium_type; - Ucbit write_prot : 1; - Ucbit res : 2; - Ucbit cache : 1; - Ucbit res2 : 4; - Uchar blockdesc_len; -}; -#endif - -struct scsi_modesel_header { - Ucbit sense_data_len : 8; - Uchar medium_type; - Ucbit res2 : 8; - Uchar blockdesc_len; -}; - -struct scsi_mode_blockdesc { - Uchar density; - Uchar nlblock[3]; - Ucbit res : 8; - Uchar lblen[3]; -}; - -#if defined(_BIT_FIELDS_LTOH) /* Intel byteorder */ - -struct acb_mode_data { - Uchar listformat; - Uchar ncyl[2]; - Uchar nhead; - Uchar start_red_wcurrent[2]; - Uchar start_precomp[2]; - Uchar landing_zone; - Uchar step_rate; - Ucbit : 2; - Ucbit hard_sec : 1; - Ucbit fixed_media : 1; - Ucbit : 4; - Uchar sect_per_trk; -}; - -#else /* Motorola byteorder */ - -struct acb_mode_data { - Uchar listformat; - Uchar ncyl[2]; - Uchar nhead; - Uchar start_red_wcurrent[2]; - Uchar start_precomp[2]; - Uchar landing_zone; - Uchar step_rate; - Ucbit : 4; - Ucbit fixed_media : 1; - Ucbit hard_sec : 1; - Ucbit : 2; - Uchar sect_per_trk; -}; -#endif - -#if defined(_BIT_FIELDS_LTOH) /* Intel byteorder */ - -struct scsi_mode_page_header { - Ucbit p_code : 6; - Ucbit res : 1; - Ucbit parsave : 1; - Uchar p_len; -}; - -/* - * This is a hack that allows mode pages without - * any further bitfileds to be defined bitorder independent. - */ -#define MP_P_CODE \ - Ucbit p_code : 6; \ - Ucbit p_res : 1; \ - Ucbit parsave : 1 - -#else /* Motorola byteorder */ - -struct scsi_mode_page_header { - Ucbit parsave : 1; - Ucbit res : 1; - Ucbit p_code : 6; - Uchar p_len; -}; - -/* - * This is a hack that allows mode pages without - * any further bitfileds to be defined bitorder independent. - */ -#define MP_P_CODE \ - Ucbit parsave : 1; \ - Ucbit p_res : 1; \ - Ucbit p_code : 6 - -#endif - -#if defined(_BIT_FIELDS_LTOH) /* Intel byteorder */ - -struct scsi_mode_page_01 { /* Error recovery Parameters */ - MP_P_CODE; /* parsave & pagecode */ - Uchar p_len; /* 0x0A = 12 Bytes */ - Ucbit disa_correction : 1; /* Byte 2 */ - Ucbit term_on_rec_err : 1; - Ucbit report_rec_err : 1; - Ucbit en_early_corr : 1; - Ucbit read_continuous : 1; - Ucbit tranfer_block : 1; - Ucbit en_auto_reall_r : 1; - Ucbit en_auto_reall_w : 1; /* Byte 2 */ - Uchar rd_retry_count; /* Byte 3 */ - Uchar correction_span; - char head_offset_count; - char data_strobe_offset; - Uchar res; - Uchar wr_retry_count; - Uchar res_tape[2]; - Uchar recov_timelim[2]; -}; - -#else /* Motorola byteorder */ - -struct scsi_mode_page_01 { /* Error recovery Parameters */ - MP_P_CODE; /* parsave & pagecode */ - Uchar p_len; /* 0x0A = 12 Bytes */ - Ucbit en_auto_reall_w : 1; /* Byte 2 */ - Ucbit en_auto_reall_r : 1; - Ucbit tranfer_block : 1; - Ucbit read_continuous : 1; - Ucbit en_early_corr : 1; - Ucbit report_rec_err : 1; - Ucbit term_on_rec_err : 1; - Ucbit disa_correction : 1; /* Byte 2 */ - Uchar rd_retry_count; /* Byte 3 */ - Uchar correction_span; - char head_offset_count; - char data_strobe_offset; - Uchar res; - Uchar wr_retry_count; - Uchar res_tape[2]; - Uchar recov_timelim[2]; -}; -#endif - - -#if defined(_BIT_FIELDS_LTOH) /* Intel byteorder */ - -struct scsi_mode_page_02 { /* Device dis/re connect Parameters */ - MP_P_CODE; /* parsave & pagecode */ - Uchar p_len; /* 0x0E = 16 Bytes */ - Uchar buf_full_ratio; - Uchar buf_empt_ratio; - Uchar bus_inact_limit[2]; - Uchar disc_time_limit[2]; - Uchar conn_time_limit[2]; - Uchar max_burst_size[2]; /* Start SCSI-2 */ - Ucbit data_tr_dis_ctl : 2; - Ucbit : 6; - Uchar res[3]; -}; - -#else /* Motorola byteorder */ - -struct scsi_mode_page_02 { /* Device dis/re connect Parameters */ - MP_P_CODE; /* parsave & pagecode */ - Uchar p_len; /* 0x0E = 16 Bytes */ - Uchar buf_full_ratio; - Uchar buf_empt_ratio; - Uchar bus_inact_limit[2]; - Uchar disc_time_limit[2]; - Uchar conn_time_limit[2]; - Uchar max_burst_size[2]; /* Start SCSI-2 */ - Ucbit : 6; - Ucbit data_tr_dis_ctl : 2; - Uchar res[3]; -}; -#endif - -#define DTDC_DATADONE 0x01 /* - * Target may not disconnect once - * data transfer is started until - * all data successfully transferred. - */ - -#define DTDC_CMDDONE 0x03 /* - * Target may not disconnect once - * data transfer is started until - * command completed. - */ - - -#if defined(_BIT_FIELDS_LTOH) /* Intel byteorder */ - -struct scsi_mode_page_03 { /* Direct access format Paramters */ - MP_P_CODE; /* parsave & pagecode */ - Uchar p_len; /* 0x16 = 24 Bytes */ - Uchar trk_per_zone[2]; - Uchar alt_sec_per_zone[2]; - Uchar alt_trk_per_zone[2]; - Uchar alt_trk_per_vol[2]; - Uchar sect_per_trk[2]; - Uchar bytes_per_phys_sect[2]; - Uchar interleave[2]; - Uchar trk_skew[2]; - Uchar cyl_skew[2]; - Ucbit : 3; - Ucbit inhibit_save : 1; - Ucbit fmt_by_surface : 1; - Ucbit removable : 1; - Ucbit hard_sec : 1; - Ucbit soft_sec : 1; - Uchar res[3]; -}; - -#else /* Motorola byteorder */ - -struct scsi_mode_page_03 { /* Direct access format Paramters */ - MP_P_CODE; /* parsave & pagecode */ - Uchar p_len; /* 0x16 = 24 Bytes */ - Uchar trk_per_zone[2]; - Uchar alt_sec_per_zone[2]; - Uchar alt_trk_per_zone[2]; - Uchar alt_trk_per_vol[2]; - Uchar sect_per_trk[2]; - Uchar bytes_per_phys_sect[2]; - Uchar interleave[2]; - Uchar trk_skew[2]; - Uchar cyl_skew[2]; - Ucbit soft_sec : 1; - Ucbit hard_sec : 1; - Ucbit removable : 1; - Ucbit fmt_by_surface : 1; - Ucbit inhibit_save : 1; - Ucbit : 3; - Uchar res[3]; -}; -#endif - -#if defined(_BIT_FIELDS_LTOH) /* Intel byteorder */ - -struct scsi_mode_page_04 { /* Rigid disk Geometry Parameters */ - MP_P_CODE; /* parsave & pagecode */ - Uchar p_len; /* 0x16 = 24 Bytes */ - Uchar ncyl[3]; - Uchar nhead; - Uchar start_precomp[3]; - Uchar start_red_wcurrent[3]; - Uchar step_rate[2]; - Uchar landing_zone[3]; - Ucbit rot_pos_locking : 2; /* Start SCSI-2 */ - Ucbit : 6; /* Start SCSI-2 */ - Uchar rotational_off; - Uchar res1; - Uchar rotation_rate[2]; - Uchar res2[2]; -}; - -#else /* Motorola byteorder */ - -struct scsi_mode_page_04 { /* Rigid disk Geometry Parameters */ - MP_P_CODE; /* parsave & pagecode */ - Uchar p_len; /* 0x16 = 24 Bytes */ - Uchar ncyl[3]; - Uchar nhead; - Uchar start_precomp[3]; - Uchar start_red_wcurrent[3]; - Uchar step_rate[2]; - Uchar landing_zone[3]; - Ucbit : 6; /* Start SCSI-2 */ - Ucbit rot_pos_locking : 2; /* Start SCSI-2 */ - Uchar rotational_off; - Uchar res1; - Uchar rotation_rate[2]; - Uchar res2[2]; -}; -#endif - -#if defined(_BIT_FIELDS_LTOH) /* Intel byteorder */ - -struct scsi_mode_page_05 { /* Flexible disk Parameters */ - MP_P_CODE; /* parsave & pagecode */ - Uchar p_len; /* 0x1E = 32 Bytes */ - Uchar transfer_rate[2]; - Uchar nhead; - Uchar sect_per_trk; - Uchar bytes_per_phys_sect[2]; - Uchar ncyl[2]; - Uchar start_precomp[2]; - Uchar start_red_wcurrent[2]; - Uchar step_rate[2]; - Uchar step_pulse_width; - Uchar head_settle_delay[2]; - Uchar motor_on_delay; - Uchar motor_off_delay; - Ucbit spc : 4; - Ucbit : 4; - Ucbit : 5; - Ucbit mo : 1; - Ucbit ssn : 1; - Ucbit trdy : 1; - Uchar write_compensation; - Uchar head_load_delay; - Uchar head_unload_delay; - Ucbit pin_2_use : 4; - Ucbit pin_34_use : 4; - Ucbit pin_1_use : 4; - Ucbit pin_4_use : 4; - Uchar rotation_rate[2]; - Uchar res[2]; -}; - -#else /* Motorola byteorder */ - -struct scsi_mode_page_05 { /* Flexible disk Parameters */ - MP_P_CODE; /* parsave & pagecode */ - Uchar p_len; /* 0x1E = 32 Bytes */ - Uchar transfer_rate[2]; - Uchar nhead; - Uchar sect_per_trk; - Uchar bytes_per_phys_sect[2]; - Uchar ncyl[2]; - Uchar start_precomp[2]; - Uchar start_red_wcurrent[2]; - Uchar step_rate[2]; - Uchar step_pulse_width; - Uchar head_settle_delay[2]; - Uchar motor_on_delay; - Uchar motor_off_delay; - Ucbit trdy : 1; - Ucbit ssn : 1; - Ucbit mo : 1; - Ucbit : 5; - Ucbit : 4; - Ucbit spc : 4; - Uchar write_compensation; - Uchar head_load_delay; - Uchar head_unload_delay; - Ucbit pin_34_use : 4; - Ucbit pin_2_use : 4; - Ucbit pin_4_use : 4; - Ucbit pin_1_use : 4; - Uchar rotation_rate[2]; - Uchar res[2]; -}; -#endif - -#if defined(_BIT_FIELDS_LTOH) /* Intel byteorder */ - -struct scsi_mode_page_07 { /* Verify Error recovery */ - MP_P_CODE; /* parsave & pagecode */ - Uchar p_len; /* 0x0A = 12 Bytes */ - Ucbit disa_correction : 1; /* Byte 2 */ - Ucbit term_on_rec_err : 1; - Ucbit report_rec_err : 1; - Ucbit en_early_corr : 1; - Ucbit res : 4; /* Byte 2 */ - Uchar ve_retry_count; /* Byte 3 */ - Uchar ve_correction_span; - char res2[5]; /* Byte 5 */ - Uchar ve_recov_timelim[2]; /* Byte 10 */ -}; - -#else /* Motorola byteorder */ - -struct scsi_mode_page_07 { /* Verify Error recovery */ - MP_P_CODE; /* parsave & pagecode */ - Uchar p_len; /* 0x0A = 12 Bytes */ - Ucbit res : 4; /* Byte 2 */ - Ucbit en_early_corr : 1; - Ucbit report_rec_err : 1; - Ucbit term_on_rec_err : 1; - Ucbit disa_correction : 1; /* Byte 2 */ - Uchar ve_retry_count; /* Byte 3 */ - Uchar ve_correction_span; - char res2[5]; /* Byte 5 */ - Uchar ve_recov_timelim[2]; /* Byte 10 */ -}; -#endif - -#if defined(_BIT_FIELDS_LTOH) /* Intel byteorder */ - -struct scsi_mode_page_08 { /* Caching Parameters */ - MP_P_CODE; /* parsave & pagecode */ - Uchar p_len; /* 0x0A = 12 Bytes */ - Ucbit disa_rd_cache : 1; /* Byte 2 */ - Ucbit muliple_fact : 1; - Ucbit en_wt_cache : 1; - Ucbit res : 5; /* Byte 2 */ - Ucbit wt_ret_pri : 4; /* Byte 3 */ - Ucbit demand_rd_ret_pri: 4; /* Byte 3 */ - Uchar disa_pref_tr_len[2]; /* Byte 4 */ - Uchar min_pref[2]; /* Byte 6 */ - Uchar max_pref[2]; /* Byte 8 */ - Uchar max_pref_ceiling[2]; /* Byte 10 */ -}; - -#else /* Motorola byteorder */ - -struct scsi_mode_page_08 { /* Caching Parameters */ - MP_P_CODE; /* parsave & pagecode */ - Uchar p_len; /* 0x0A = 12 Bytes */ - Ucbit res : 5; /* Byte 2 */ - Ucbit en_wt_cache : 1; - Ucbit muliple_fact : 1; - Ucbit disa_rd_cache : 1; /* Byte 2 */ - Ucbit demand_rd_ret_pri: 4; /* Byte 3 */ - Ucbit wt_ret_pri : 4; - Uchar disa_pref_tr_len[2]; /* Byte 4 */ - Uchar min_pref[2]; /* Byte 6 */ - Uchar max_pref[2]; /* Byte 8 */ - Uchar max_pref_ceiling[2]; /* Byte 10 */ -}; -#endif - -struct scsi_mode_page_09 { /* Peripheral device Parameters */ - MP_P_CODE; /* parsave & pagecode */ - Uchar p_len; /* >= 0x06 = 8 Bytes */ - Uchar interface_id[2]; /* Byte 2 */ - Uchar res[4]; /* Byte 4 */ - Uchar vendor_specific[1]; /* Byte 8 */ -}; - -#define PDEV_SCSI 0x0000 /* scsi interface */ -#define PDEV_SMD 0x0001 /* SMD interface */ -#define PDEV_ESDI 0x0002 /* ESDI interface */ -#define PDEV_IPI2 0x0003 /* IPI-2 interface */ -#define PDEV_IPI3 0x0004 /* IPI-3 interface */ - -#if defined(_BIT_FIELDS_LTOH) /* Intel byteorder */ - -struct scsi_mode_page_0A { /* Common device Control Parameters */ - MP_P_CODE; /* parsave & pagecode */ - Uchar p_len; /* 0x06 = 8 Bytes */ - Ucbit rep_log_exeption: 1; /* Byte 2 */ - Ucbit res : 7; /* Byte 2 */ - Ucbit dis_queuing : 1; /* Byte 3 */ - Ucbit queuing_err_man : 1; - Ucbit res2 : 2; - Ucbit queue_alg_mod : 4; /* Byte 3 */ - Ucbit EAENP : 1; /* Byte 4 */ - Ucbit UAENP : 1; - Ucbit RAENP : 1; - Ucbit res3 : 4; - Ucbit en_ext_cont_all : 1; /* Byte 4 */ - Ucbit res4 : 8; - Uchar ready_aen_hold_per[2]; /* Byte 6 */ -}; - -#else /* Motorola byteorder */ - -struct scsi_mode_page_0A { /* Common device Control Parameters */ - MP_P_CODE; /* parsave & pagecode */ - Uchar p_len; /* 0x06 = 8 Bytes */ - Ucbit res : 7; /* Byte 2 */ - Ucbit rep_log_exeption: 1; /* Byte 2 */ - Ucbit queue_alg_mod : 4; /* Byte 3 */ - Ucbit res2 : 2; - Ucbit queuing_err_man : 1; - Ucbit dis_queuing : 1; /* Byte 3 */ - Ucbit en_ext_cont_all : 1; /* Byte 4 */ - Ucbit res3 : 4; - Ucbit RAENP : 1; - Ucbit UAENP : 1; - Ucbit EAENP : 1; /* Byte 4 */ - Ucbit res4 : 8; - Uchar ready_aen_hold_per[2]; /* Byte 6 */ -}; -#endif - -#define CTRL_QMOD_RESTRICT 0x0 -#define CTRL_QMOD_UNRESTRICT 0x1 - - -struct scsi_mode_page_0B { /* Medium Types Supported Parameters */ - MP_P_CODE; /* parsave & pagecode */ - Uchar p_len; /* 0x06 = 8 Bytes */ - Uchar res[2]; /* Byte 2 */ - Uchar medium_one_supp; /* Byte 4 */ - Uchar medium_two_supp; /* Byte 5 */ - Uchar medium_three_supp; /* Byte 6 */ - Uchar medium_four_supp; /* Byte 7 */ -}; - -#if defined(_BIT_FIELDS_LTOH) /* Intel byteorder */ - -struct scsi_mode_page_0C { /* Notch & Partition Parameters */ - MP_P_CODE; /* parsave & pagecode */ - Uchar p_len; /* 0x16 = 24 Bytes */ - Ucbit res : 6; /* Byte 2 */ - Ucbit logical_notch : 1; - Ucbit notched_drive : 1; /* Byte 2 */ - Uchar res2; /* Byte 3 */ - Uchar max_notches[2]; /* Byte 4 */ - Uchar active_notch[2]; /* Byte 6 */ - Uchar starting_boundary[4]; /* Byte 8 */ - Uchar ending_boundary[4]; /* Byte 12 */ - Uchar pages_notched[8]; /* Byte 16 */ -}; - -#else /* Motorola byteorder */ - -struct scsi_mode_page_0C { /* Notch & Partition Parameters */ - MP_P_CODE; /* parsave & pagecode */ - Uchar p_len; /* 0x16 = 24 Bytes */ - Ucbit notched_drive : 1; /* Byte 2 */ - Ucbit logical_notch : 1; - Ucbit res : 6; /* Byte 2 */ - Uchar res2; /* Byte 3 */ - Uchar max_notches[2]; /* Byte 4 */ - Uchar active_notch[2]; /* Byte 6 */ - Uchar starting_boundary[4]; /* Byte 8 */ - Uchar ending_boundary[4]; /* Byte 12 */ - Uchar pages_notched[8]; /* Byte 16 */ -}; -#endif - -#if defined(_BIT_FIELDS_LTOH) /* Intel byteorder */ - -struct scsi_mode_page_0D { /* CD-ROM Parameters */ - MP_P_CODE; /* parsave & pagecode */ - Uchar p_len; /* 0x06 = 8 Bytes */ - Uchar res; /* Byte 2 */ - Ucbit inact_timer_mult: 4; /* Byte 3 */ - Ucbit res2 : 4; /* Byte 3 */ - Uchar s_un_per_m_un[2]; /* Byte 4 */ - Uchar f_un_per_s_un[2]; /* Byte 6 */ -}; - -#else /* Motorola byteorder */ - -struct scsi_mode_page_0D { /* CD-ROM Parameters */ - MP_P_CODE; /* parsave & pagecode */ - Uchar p_len; /* 0x06 = 8 Bytes */ - Uchar res; /* Byte 2 */ - Ucbit res2 : 4; /* Byte 3 */ - Ucbit inact_timer_mult: 4; /* Byte 3 */ - Uchar s_un_per_m_un[2]; /* Byte 4 */ - Uchar f_un_per_s_un[2]; /* Byte 6 */ -}; -#endif - -struct sony_mode_page_20 { /* Sony Format Mode Parameters */ - MP_P_CODE; /* parsave & pagecode */ - Uchar p_len; /* 0x0A = 12 Bytes */ - Uchar format_mode; - Uchar format_type; -#define num_bands user_band_size /* Gilt bei Type 1 */ - Uchar user_band_size[4]; /* Gilt bei Type 0 */ - Uchar spare_band_size[2]; - Uchar res[2]; -}; - -#if defined(_BIT_FIELDS_LTOH) /* Intel byteorder */ - -struct toshiba_mode_page_20 { /* Toshiba Speed Control Parameters */ - MP_P_CODE; /* parsave & pagecode */ - Uchar p_len; /* 0x01 = 3 Bytes */ - Ucbit speed : 1; - Ucbit res : 7; -}; - -#else /* Motorola byteorder */ - -struct toshiba_mode_page_20 { /* Toshiba Speed Control Parameters */ - MP_P_CODE; /* parsave & pagecode */ - Uchar p_len; /* 0x01 = 3 Bytes */ - Ucbit res : 7; - Ucbit speed : 1; -}; -#endif - -#if defined(_BIT_FIELDS_LTOH) /* Intel byteorder */ - -struct ccs_mode_page_38 { /* CCS Caching Parameters */ - MP_P_CODE; /* parsave & pagecode */ - Uchar p_len; /* 0x0E = 14 Bytes */ - - Ucbit cache_table_size: 4; /* Byte 3 */ - Ucbit cache_en : 1; - Ucbit res2 : 1; - Ucbit wr_index_en : 1; - Ucbit res : 1; /* Byte 3 */ - Uchar threshold; /* Byte 4 Prefetch threshold */ - Uchar max_prefetch; /* Byte 5 Max. prefetch */ - Uchar max_multiplier; /* Byte 6 Max. prefetch multiplier */ - Uchar min_prefetch; /* Byte 7 Min. prefetch */ - Uchar min_multiplier; /* Byte 8 Min. prefetch multiplier */ - Uchar res3[8]; /* Byte 9 */ -}; - -#else /* Motorola byteorder */ - -struct ccs_mode_page_38 { /* CCS Caching Parameters */ - MP_P_CODE; /* parsave & pagecode */ - Uchar p_len; /* 0x0E = 14 Bytes */ - - Ucbit res : 1; /* Byte 3 */ - Ucbit wr_index_en : 1; - Ucbit res2 : 1; - Ucbit cache_en : 1; - Ucbit cache_table_size: 4; /* Byte 3 */ - Uchar threshold; /* Byte 4 Prefetch threshold */ - Uchar max_prefetch; /* Byte 5 Max. prefetch */ - Uchar max_multiplier; /* Byte 6 Max. prefetch multiplier */ - Uchar min_prefetch; /* Byte 7 Min. prefetch */ - Uchar min_multiplier; /* Byte 8 Min. prefetch multiplier */ - Uchar res3[8]; /* Byte 9 */ -}; -#endif - -#if defined(_BIT_FIELDS_LTOH) /* Intel byteorder */ - -struct cd_mode_page_05 { /* write parameters */ - MP_P_CODE; /* parsave & pagecode */ - Uchar p_len; /* 0x32 = 50 Bytes */ - Ucbit write_type : 4; /* Session write type (PACKET/TAO...)*/ - Ucbit test_write : 1; /* Do not actually write data */ - Ucbit LS_V : 1; /* Link size valid */ - Ucbit BUFE : 1; /* Enable Bufunderrun free rec. */ - Ucbit res_2_7 : 1; - Ucbit track_mode : 4; /* Track mode (Q-sub control nibble) */ - Ucbit copy : 1; /* 1st higher gen of copy prot track ~*/ - Ucbit fp : 1; /* Fixed packed (if in packet mode) */ - Ucbit multi_session : 2; /* Multi session write type */ - Ucbit dbtype : 4; /* Data block type */ - Ucbit res_4 : 4; /* Reserved */ - Uchar link_size; /* Link Size (default is 7) */ - Uchar res_6; /* Reserved */ - Ucbit host_appl_code : 6; /* Host application code of disk */ - Ucbit res_7 : 2; /* Reserved */ - Uchar session_format; /* Session format (DA/CDI/XA) */ - Uchar res_9; /* Reserved */ - Uchar packet_size[4]; /* # of user datablocks/fixed packet */ - Uchar audio_pause_len[2]; /* # of blocks where index is zero */ - Uchar media_cat_number[16]; /* Media catalog Number (MCN) */ - Uchar ISRC[14]; /* ISRC for this track */ - Uchar sub_header[4]; - Uchar vendor_uniq[4]; -}; - -#else /* Motorola byteorder */ - -struct cd_mode_page_05 { /* write parameters */ - MP_P_CODE; /* parsave & pagecode */ - Uchar p_len; /* 0x32 = 50 Bytes */ - Ucbit res_2_7 : 1; - Ucbit BUFE : 1; /* Enable Bufunderrun free rec. */ - Ucbit LS_V : 1; /* Link size valid */ - Ucbit test_write : 1; /* Do not actually write data */ - Ucbit write_type : 4; /* Session write type (PACKET/TAO...)*/ - Ucbit multi_session : 2; /* Multi session write type */ - Ucbit fp : 1; /* Fixed packed (if in packet mode) */ - Ucbit copy : 1; /* 1st higher gen of copy prot track */ - Ucbit track_mode : 4; /* Track mode (Q-sub control nibble) */ - Ucbit res_4 : 4; /* Reserved */ - Ucbit dbtype : 4; /* Data block type */ - Uchar link_size; /* Link Size (default is 7) */ - Uchar res_6; /* Reserved */ - Ucbit res_7 : 2; /* Reserved */ - Ucbit host_appl_code : 6; /* Host application code of disk */ - Uchar session_format; /* Session format (DA/CDI/XA) */ - Uchar res_9; /* Reserved */ - Uchar packet_size[4]; /* # of user datablocks/fixed packet */ - Uchar audio_pause_len[2]; /* # of blocks where index is zero */ - Uchar media_cat_number[16]; /* Media catalog Number (MCN) */ - Uchar ISRC[14]; /* ISRC for this track */ - Uchar sub_header[4]; - Uchar vendor_uniq[4]; -}; - -#endif - -#if defined(_BIT_FIELDS_LTOH) /* Intel byteorder */ - -struct cd_wr_speed_performance { - Uchar res0; /* Reserved */ - Ucbit rot_ctl_sel : 2; /* Rotational control selected */ - Ucbit res_1_27 : 6; /* Reserved */ - Uchar wr_speed_supp[2]; /* Supported write speed */ -}; - -struct cd_mode_page_2A { /* CD Cap / mech status */ - MP_P_CODE; /* parsave & pagecode */ - Uchar p_len; /* 0x14 = 20 Bytes (MMC) */ - /* 0x18 = 24 Bytes (MMC-2) */ - /* 0x1C >= 28 Bytes (MMC-3) */ - Ucbit cd_r_read : 1; /* Reads CD-R media */ - Ucbit cd_rw_read : 1; /* Reads CD-RW media */ - Ucbit method2 : 1; /* Reads fixed packet method2 media */ - Ucbit dvd_rom_read : 1; /* Reads DVD ROM media */ - Ucbit dvd_r_read : 1; /* Reads DVD-R media */ - Ucbit dvd_ram_read : 1; /* Reads DVD-RAM media */ - Ucbit res_2_67 : 2; /* Reserved */ - Ucbit cd_r_write : 1; /* Supports writing CD-R media */ - Ucbit cd_rw_write : 1; /* Supports writing CD-RW media */ - Ucbit test_write : 1; /* Supports emulation write */ - Ucbit res_3_3 : 1; /* Reserved */ - Ucbit dvd_r_write : 1; /* Supports writing DVD-R media */ - Ucbit dvd_ram_write : 1; /* Supports writing DVD-RAM media */ - Ucbit res_3_67 : 2; /* Reserved */ - Ucbit audio_play : 1; /* Supports Audio play operation */ - Ucbit composite : 1; /* Deliveres composite A/V stream */ - Ucbit digital_port_2 : 1; /* Supports digital output on port 2 */ - Ucbit digital_port_1 : 1; /* Supports digital output on port 1 */ - Ucbit mode_2_form_1 : 1; /* Reads Mode-2 form 1 media (XA) */ - Ucbit mode_2_form_2 : 1; /* Reads Mode-2 form 2 media */ - Ucbit multi_session : 1; /* Reads multi-session media */ - Ucbit BUF : 1; /* Supports Buffer under. free rec. */ - Ucbit cd_da_supported : 1; /* Reads audio data with READ CD cmd */ - Ucbit cd_da_accurate : 1; /* READ CD data stream is accurate */ - Ucbit rw_supported : 1; /* Reads R-W sub channel information */ - Ucbit rw_deint_corr : 1; /* Reads de-interleved R-W sub chan */ - Ucbit c2_pointers : 1; /* Supports C2 error pointers */ - Ucbit ISRC : 1; /* Reads ISRC information */ - Ucbit UPC : 1; /* Reads media catalog number (UPC) */ - Ucbit read_bar_code : 1; /* Supports reading bar codes */ - Ucbit lock : 1; /* PREVENT/ALLOW may lock media */ - Ucbit lock_state : 1; /* Lock state 0=unlocked 1=locked */ - Ucbit prevent_jumper : 1; /* State of prev/allow jumper 0=pres */ - Ucbit eject : 1; /* Ejects disc/cartr with STOP LoEj */ - Ucbit res_6_4 : 1; /* Reserved */ - Ucbit loading_type : 3; /* Loading mechanism type */ - Ucbit sep_chan_vol : 1; /* Vol controls each channel separat */ - Ucbit sep_chan_mute : 1; /* Mute controls each channel separat*/ - Ucbit disk_present_rep: 1; /* Changer supports disk present rep */ - Ucbit sw_slot_sel : 1; /* Load empty slot in changer */ - Ucbit side_change : 1; /* Side change capable */ - Ucbit pw_in_lead_in : 1; /* Reads raw P-W sucode from lead in */ - Ucbit res_7 : 2; /* Reserved */ - Uchar max_read_speed[2]; /* Max. read speed in KB/s */ - Uchar num_vol_levels[2]; /* # of supported volume levels */ - Uchar buffer_size[2]; /* Buffer size for the data in KB */ - Uchar cur_read_speed[2]; /* Current read speed in KB/s */ - Uchar res_16; /* Reserved */ - Ucbit res_17_0 : 1; /* Reserved */ - Ucbit BCK : 1; /* Data valid on falling edge of BCK */ - Ucbit RCK : 1; /* Set: HIGH high LRCK=left channel */ - Ucbit LSBF : 1; /* Set: LSB first Clear: MSB first */ - Ucbit length : 2; /* 0=32BCKs 1=16BCKs 2=24BCKs 3=24I2c*/ - Ucbit res_17 : 2; /* Reserved */ - Uchar max_write_speed[2]; /* Max. write speed supported in KB/s*/ - Uchar cur_write_speed[2]; /* Current write speed in KB/s */ - - /* Byte 22 ... Only in MMC-2 */ - Uchar copy_man_rev[2]; /* Copy management revision supported*/ - Uchar res_24; /* Reserved */ - Uchar res_25; /* Reserved */ - - /* Byte 26 ... Only in MMC-3 */ - Uchar res_26; /* Reserved */ - Ucbit res_27_27 : 6; /* Reserved */ - Ucbit rot_ctl_sel : 2; /* Rotational control selected */ - Uchar v3_cur_write_speed[2]; /* Current write speed in KB/s */ - Uchar num_wr_speed_des[2]; /* # of wr speed perf descr. tables */ - struct cd_wr_speed_performance - wr_speed_des[1]; /* wr speed performance descriptor */ - /* Actually more (num_wr_speed_des) */ -}; - -#else /* Motorola byteorder */ - -struct cd_wr_speed_performance { - Uchar res0; /* Reserved */ - Ucbit res_1_27 : 6; /* Reserved */ - Ucbit rot_ctl_sel : 2; /* Rotational control selected */ - Uchar wr_speed_supp[2]; /* Supported write speed */ -}; - -struct cd_mode_page_2A { /* CD Cap / mech status */ - MP_P_CODE; /* parsave & pagecode */ - Uchar p_len; /* 0x14 = 20 Bytes (MMC) */ - /* 0x18 = 24 Bytes (MMC-2) */ - /* 0x1C >= 28 Bytes (MMC-3) */ - Ucbit res_2_67 : 2; /* Reserved */ - Ucbit dvd_ram_read : 1; /* Reads DVD-RAM media */ - Ucbit dvd_r_read : 1; /* Reads DVD-R media */ - Ucbit dvd_rom_read : 1; /* Reads DVD ROM media */ - Ucbit method2 : 1; /* Reads fixed packet method2 media */ - Ucbit cd_rw_read : 1; /* Reads CD-RW media */ - Ucbit cd_r_read : 1; /* Reads CD-R media */ - Ucbit res_3_67 : 2; /* Reserved */ - Ucbit dvd_ram_write : 1; /* Supports writing DVD-RAM media */ - Ucbit dvd_r_write : 1; /* Supports writing DVD-R media */ - Ucbit res_3_3 : 1; /* Reserved */ - Ucbit test_write : 1; /* Supports emulation write */ - Ucbit cd_rw_write : 1; /* Supports writing CD-RW media */ - Ucbit cd_r_write : 1; /* Supports writing CD-R media */ - Ucbit BUF : 1; /* Supports Buffer under. free rec. */ - Ucbit multi_session : 1; /* Reads multi-session media */ - Ucbit mode_2_form_2 : 1; /* Reads Mode-2 form 2 media */ - Ucbit mode_2_form_1 : 1; /* Reads Mode-2 form 1 media (XA) */ - Ucbit digital_port_1 : 1; /* Supports digital output on port 1 */ - Ucbit digital_port_2 : 1; /* Supports digital output on port 2 */ - Ucbit composite : 1; /* Deliveres composite A/V stream */ - Ucbit audio_play : 1; /* Supports Audio play operation */ - Ucbit read_bar_code : 1; /* Supports reading bar codes */ - Ucbit UPC : 1; /* Reads media catalog number (UPC) */ - Ucbit ISRC : 1; /* Reads ISRC information */ - Ucbit c2_pointers : 1; /* Supports C2 error pointers */ - Ucbit rw_deint_corr : 1; /* Reads de-interleved R-W sub chan */ - Ucbit rw_supported : 1; /* Reads R-W sub channel information */ - Ucbit cd_da_accurate : 1; /* READ CD data stream is accurate */ - Ucbit cd_da_supported : 1; /* Reads audio data with READ CD cmd */ - Ucbit loading_type : 3; /* Loading mechanism type */ - Ucbit res_6_4 : 1; /* Reserved */ - Ucbit eject : 1; /* Ejects disc/cartr with STOP LoEj */ - Ucbit prevent_jumper : 1; /* State of prev/allow jumper 0=pres */ - Ucbit lock_state : 1; /* Lock state 0=unlocked 1=locked */ - Ucbit lock : 1; /* PREVENT/ALLOW may lock media */ - Ucbit res_7 : 2; /* Reserved */ - Ucbit pw_in_lead_in : 1; /* Reads raw P-W sucode from lead in */ - Ucbit side_change : 1; /* Side change capable */ - Ucbit sw_slot_sel : 1; /* Load empty slot in changer */ - Ucbit disk_present_rep: 1; /* Changer supports disk present rep */ - Ucbit sep_chan_mute : 1; /* Mute controls each channel separat*/ - Ucbit sep_chan_vol : 1; /* Vol controls each channel separat */ - Uchar max_read_speed[2]; /* Max. read speed in KB/s */ - Uchar num_vol_levels[2]; /* # of supported volume levels */ - Uchar buffer_size[2]; /* Buffer size for the data in KB */ - Uchar cur_read_speed[2]; /* Current read speed in KB/s */ - Uchar res_16; /* Reserved */ - Ucbit res_17 : 2; /* Reserved */ - Ucbit length : 2; /* 0=32BCKs 1=16BCKs 2=24BCKs 3=24I2c*/ - Ucbit LSBF : 1; /* Set: LSB first Clear: MSB first */ - Ucbit RCK : 1; /* Set: HIGH high LRCK=left channel */ - Ucbit BCK : 1; /* Data valid on falling edge of BCK */ - Ucbit res_17_0 : 1; /* Reserved */ - Uchar max_write_speed[2]; /* Max. write speed supported in KB/s*/ - Uchar cur_write_speed[2]; /* Current write speed in KB/s */ - - /* Byte 22 ... Only in MMC-2 */ - Uchar copy_man_rev[2]; /* Copy management revision supported*/ - Uchar res_24; /* Reserved */ - Uchar res_25; /* Reserved */ - - /* Byte 26 ... Only in MMC-3 */ - Uchar res_26; /* Reserved */ - Ucbit res_27_27 : 6; /* Reserved */ - Ucbit rot_ctl_sel : 2; /* Rotational control selected */ - Uchar v3_cur_write_speed[2]; /* Current write speed in KB/s */ - Uchar num_wr_speed_des[2]; /* # of wr speed perf descr. tables */ - struct cd_wr_speed_performance - wr_speed_des[1]; /* wr speed performance descriptor */ - /* Actually more (num_wr_speed_des) */ -}; - -#endif - -#define LT_CADDY 0 -#define LT_TRAY 1 -#define LT_POP_UP 2 -#define LT_RES3 3 -#define LT_CHANGER_IND 4 -#define LT_CHANGER_CART 5 -#define LT_RES6 6 -#define LT_RES7 7 - - -struct scsi_mode_data { - struct scsi_mode_header header; - struct scsi_mode_blockdesc blockdesc; - union pagex { - struct acb_mode_data acb; - struct scsi_mode_page_01 page1; - struct scsi_mode_page_02 page2; - struct scsi_mode_page_03 page3; - struct scsi_mode_page_04 page4; - struct scsi_mode_page_05 page5; - struct scsi_mode_page_07 page7; - struct scsi_mode_page_08 page8; - struct scsi_mode_page_09 page9; - struct scsi_mode_page_0A pageA; - struct scsi_mode_page_0B pageB; - struct scsi_mode_page_0C pageC; - struct scsi_mode_page_0D pageD; - struct sony_mode_page_20 sony20; - struct toshiba_mode_page_20 toshiba20; - struct ccs_mode_page_38 ccs38; - } pagex; -}; - -struct scsi_capacity { - Int32_t c_baddr; /* must convert byteorder!! */ - Int32_t c_bsize; /* must convert byteorder!! */ -}; - -#if defined(_BIT_FIELDS_LTOH) /* Intel byteorder */ - -struct scsi_def_header { - Ucbit : 8; - Ucbit format : 3; - Ucbit gdl : 1; - Ucbit mdl : 1; - Ucbit : 3; - Uchar length[2]; -}; - -#else /* Motorola byteorder */ - -struct scsi_def_header { - Ucbit : 8; - Ucbit : 3; - Ucbit mdl : 1; - Ucbit gdl : 1; - Ucbit format : 3; - Uchar length[2]; -}; -#endif - - -#if defined(_BIT_FIELDS_LTOH) /* Intel byteorder */ - -struct scsi_format_header { - Ucbit res : 8; /* Adaptec 5500: 1 --> format track */ - Ucbit vu : 1; /* Vendor Unique */ - Ucbit immed : 1; /* Return Immediately from Format */ - Ucbit tryout : 1; /* Check if format parameters OK */ - Ucbit ipattern : 1; /* Init patter descriptor present */ - Ucbit serr : 1; /* Stop on error */ - Ucbit dcert : 1; /* Disable certification */ - Ucbit dmdl : 1; /* Disable manufacturer defect list */ - Ucbit enable : 1; /* Enable to use the next 3 bits */ - Uchar length[2]; /* Length of following list in bytes*/ -}; - -#else /* Motorola byteorder */ - -struct scsi_format_header { - Ucbit res : 8; /* Adaptec 5500: 1 --> format track */ - Ucbit enable : 1; /* Enable to use the next 3 bits */ - Ucbit dmdl : 1; /* Disable manufacturer defect list */ - Ucbit dcert : 1; /* Disable certification */ - Ucbit serr : 1; /* Stop on error */ - Ucbit ipattern : 1; /* Init patter descriptor present */ - Ucbit tryout : 1; /* Check if format parameters OK */ - Ucbit immed : 1; /* Return Immediately from Format */ - Ucbit vu : 1; /* Vendor Unique */ - Uchar length[2]; /* Length of following list in bytes*/ -}; -#endif - -struct scsi_def_bfi { - Uchar cyl[3]; - Uchar head; - Uchar bfi[4]; -}; - -struct scsi_def_phys { - Uchar cyl[3]; - Uchar head; - Uchar sec[4]; -}; - -struct scsi_def_list { - struct scsi_def_header hd; - union { - Uchar list_block[1][4]; - struct scsi_def_bfi list_bfi[1]; - struct scsi_def_phys list_phys[1]; - } def_list; -}; - -struct scsi_format_data { - struct scsi_format_header hd; - union { - Uchar list_block[1][4]; - struct scsi_def_bfi list_bfi[1]; - struct scsi_def_phys list_phys[1]; - } def_list; -}; - -#define def_block def_list.list_block -#define def_bfi def_list.list_bfi -#define def_phys def_list.list_phys - -#define SC_DEF_BLOCK 0 -#define SC_DEF_BFI 4 -#define SC_DEF_PHYS 5 -#define SC_DEF_VU 6 -#define SC_DEF_RES 7 - -struct scsi_format_cap_header { - Uchar res[3]; /* Reserved */ - Uchar len; /* Len (a multiple of 8) */ -}; - -#if defined(_BIT_FIELDS_LTOH) /* Intel byteorder */ - -struct scsi_format_cap_desc { - Uchar nblock[4]; /* Number of blocks */ - Ucbit desc_type : 2; /* Descriptor type */ - Ucbit fmt_type : 6; /* Format Taype */ - Uchar blen[3]; /* Logical block length */ -}; - -#else /* Motorola byteorder */ - -struct scsi_format_cap_desc { - Uchar nblock[4]; /* Number of blocks */ - Ucbit fmt_type : 6; /* Format Taype */ - Ucbit desc_type : 2; /* Descriptor type */ - Uchar blen[3]; /* Logical block length */ -}; -#endif - -/* - * Defines for 'fmt_type'. - */ -#define FCAP_TYPE_DVDPLUS_FULL 0x26 /* DVD+RW Full Format */ - -/* - * Defines for 'desc_type'. - * In case of FCAP_DESC_RES, the descriptor is a formatted capacity descriptor - * and the 'blen' field is type dependent. - * For all other cases, this is the Current/Maximum Capacity descriptor and - * the value of 'fmt_type' is reserved and must be zero. - */ -#define FCAP_DESC_RES 0 /* Reserved */ -#define FCAP_DESC_UNFORM 1 /* Unformatted Media */ -#define FCAP_DESC_FORM 2 /* Formatted Media */ -#define FCAP_DESC_NOMEDIA 3 /* No Media */ - -struct scsi_cap_data { - struct scsi_format_cap_header hd; - struct scsi_format_cap_desc list[1]; -}; - - -struct scsi_send_diag_cmd { - Uchar cmd; - Uchar addr[4]; - Ucbit : 8; -}; - -#if defined(_BIT_FIELDS_LTOH) /* Intel byteorder */ - -struct scsi_sector_header { - Uchar cyl[2]; - Uchar head; - Uchar sec; - Ucbit : 5; - Ucbit rp : 1; - Ucbit sp : 1; - Ucbit dt : 1; -}; - -#else /* Motorola byteorder */ - -struct scsi_sector_header { - Uchar cyl[2]; - Uchar head; - Uchar sec; - Ucbit dt : 1; - Ucbit sp : 1; - Ucbit rp : 1; - Ucbit : 5; -}; -#endif - -#ifdef __cplusplus -} -#endif - -#endif /* _SCG_SCSIREG_H */ diff -Nru cdrtools-2.01.01a33/include/scg/scsisense.h cdrtools-3.02a09/include/scg/scsisense.h --- cdrtools-2.01.01a33/include/scg/scsisense.h 2004-09-04 19:27:04.000000000 +0000 +++ cdrtools-3.02a09/include/scg/scsisense.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,209 +0,0 @@ -/* @(#)scsisense.h 2.18 04/09/04 Copyright 1986 J. Schilling */ -/* - * Definitions for the SCSI status code and sense structure - * - * Copyright (c) 1986 J. Schilling - */ -/* - * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. - * - * See the file CDDL.Schily.txt in this distribution for details. - * - * The following exceptions apply: - * CDDL §3.6 needs to be replaced by: "You may create a Larger Work by - * combining Covered Software with other code if all other code is governed by - * the terms of a license that is OSI approved (see www.opensource.org) and - * you may distribute the Larger Work as a single product. In such a case, - * You must make sure the requirements of this License are fulfilled for - * the Covered Software." - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file CDDL.Schily.txt from this distribution. - */ - -#ifndef _SCG_SCSISENSE_H -#define _SCG_SCSISENSE_H - -#ifdef __cplusplus -extern "C" { -#endif - -/* - * SCSI status completion block. - */ -#define SCSI_EXTENDED_STATUS - -#if defined(_BIT_FIELDS_LTOH) /* Intel byteorder */ - -struct scsi_status { - Ucbit vu_00 : 1; /* vendor unique */ - Ucbit chk : 1; /* check condition: sense data available */ - Ucbit cm : 1; /* condition met */ - Ucbit busy : 1; /* device busy or reserved */ - Ucbit is : 1; /* intermediate status sent */ - Ucbit vu_05 : 1; /* vendor unique */ -#define st_scsi2 vu_05 /* SCSI-2 modifier bit */ - Ucbit vu_06 : 1; /* vendor unique */ - Ucbit st_rsvd : 1; /* reserved */ - -#ifdef SCSI_EXTENDED_STATUS -#define ext_st1 st_rsvd /* extended status (next byte valid) */ - /* byte 1 */ - Ucbit ha_er : 1; /* host adapter detected error */ - Ucbit reserved: 6; /* reserved */ - Ucbit ext_st2 : 1; /* extended status (next byte valid) */ - /* byte 2 */ - Uchar byte2; /* third byte */ -#endif /* SCSI_EXTENDED_STATUS */ -}; - -#else /* Motorola byteorder */ - -struct scsi_status { - Ucbit st_rsvd : 1; /* reserved */ - Ucbit vu_06 : 1; /* vendor unique */ - Ucbit vu_05 : 1; /* vendor unique */ -#define st_scsi2 vu_05 /* SCSI-2 modifier bit */ - Ucbit is : 1; /* intermediate status sent */ - Ucbit busy : 1; /* device busy or reserved */ - Ucbit cm : 1; /* condition met */ - Ucbit chk : 1; /* check condition: sense data available */ - Ucbit vu_00 : 1; /* vendor unique */ -#ifdef SCSI_EXTENDED_STATUS -#define ext_st1 st_rsvd /* extended status (next byte valid) */ - /* byte 1 */ - Ucbit ext_st2 : 1; /* extended status (next byte valid) */ - Ucbit reserved: 6; /* reserved */ - Ucbit ha_er : 1; /* host adapter detected error */ - /* byte 2 */ - Uchar byte2; /* third byte */ -#endif /* SCSI_EXTENDED_STATUS */ -}; -#endif - -/* - * OLD Standard (Non Extended) SCSI Sense. Used mainly by the - * Adaptec ACB 4000 which is the only controller that - * does not support the Extended sense format. - */ -#if defined(_BIT_FIELDS_LTOH) /* Intel byteorder */ - -struct scsi_sense { /* scsi sense for error classes 0-6 */ - Ucbit code : 7; /* error class/code */ - Ucbit adr_val : 1; /* sense data is valid */ -#ifdef comment - Ucbit high_addr:5; /* high byte of block addr */ - Ucbit rsvd : 3; -#else - Uchar high_addr; /* high byte of block addr */ -#endif - Uchar mid_addr; /* middle byte of block addr */ - Uchar low_addr; /* low byte of block addr */ -}; - -#else /* Motorola byteorder */ - -struct scsi_sense { /* scsi sense for error classes 0-6 */ - Ucbit adr_val : 1; /* sense data is valid */ - Ucbit code : 7; /* error class/code */ -#ifdef comment - Ucbit rsvd : 3; - Ucbit high_addr:5; /* high byte of block addr */ -#else - Uchar high_addr; /* high byte of block addr */ -#endif - Uchar mid_addr; /* middle byte of block addr */ - Uchar low_addr; /* low byte of block addr */ -}; -#endif - -/* - * SCSI extended sense parameter block. - */ -#ifdef comment -#define SC_CLASS_EXTENDED_SENSE 0x7 /* indicates extended sense */ -#endif - -#if defined(_BIT_FIELDS_LTOH) /* Intel byteorder */ - -struct scsi_ext_sense { /* scsi extended sense for error class 7 */ - /* byte 0 */ - Ucbit type : 7; /* fixed at 0x70 */ - Ucbit adr_val : 1; /* sense data is valid */ - /* byte 1 */ - Uchar seg_num; /* segment number, applies to copy cmd only */ - /* byte 2 */ - Ucbit key : 4; /* sense key, see below */ - Ucbit : 1; /* reserved */ - Ucbit ili : 1; /* incorrect length indicator */ - Ucbit eom : 1; /* end of media */ - Ucbit fil_mk : 1; /* file mark on device */ - /* bytes 3 through 7 */ - Uchar info_1; /* information byte 1 */ - Uchar info_2; /* information byte 2 */ - Uchar info_3; /* information byte 3 */ - Uchar info_4; /* information byte 4 */ - Uchar add_len; /* number of additional bytes */ - /* bytes 8 through 13, CCS additions */ - Uchar optional_8; /* CCS search and copy only */ - Uchar optional_9; /* CCS search and copy only */ - Uchar optional_10; /* CCS search and copy only */ - Uchar optional_11; /* CCS search and copy only */ - Uchar sense_code; /* sense code */ - Uchar qual_code; /* sense code qualifier */ - Uchar fru_code; /* Field replacable unit code */ - Ucbit bptr : 3; /* bit pointer for failure (if bpv) */ - Ucbit bpv : 1; /* bit pointer is valid */ - Ucbit : 2; - Ucbit cd : 1; /* pointers refer to command not data */ - Ucbit sksv : 1; /* sense key specific valid */ - Uchar field_ptr[2]; /* field pointer for failure */ - Uchar add_info[2]; /* round up to 20 bytes */ -}; - -#else /* Motorola byteorder */ - -struct scsi_ext_sense { /* scsi extended sense for error class 7 */ - /* byte 0 */ - Ucbit adr_val : 1; /* sense data is valid */ - Ucbit type : 7; /* fixed at 0x70 */ - /* byte 1 */ - Uchar seg_num; /* segment number, applies to copy cmd only */ - /* byte 2 */ - Ucbit fil_mk : 1; /* file mark on device */ - Ucbit eom : 1; /* end of media */ - Ucbit ili : 1; /* incorrect length indicator */ - Ucbit : 1; /* reserved */ - Ucbit key : 4; /* sense key, see below */ - /* bytes 3 through 7 */ - Uchar info_1; /* information byte 1 */ - Uchar info_2; /* information byte 2 */ - Uchar info_3; /* information byte 3 */ - Uchar info_4; /* information byte 4 */ - Uchar add_len; /* number of additional bytes */ - /* bytes 8 through 13, CCS additions */ - Uchar optional_8; /* CCS search and copy only */ - Uchar optional_9; /* CCS search and copy only */ - Uchar optional_10; /* CCS search and copy only */ - Uchar optional_11; /* CCS search and copy only */ - Uchar sense_code; /* sense code */ - Uchar qual_code; /* sense code qualifier */ - Uchar fru_code; /* Field replacable unit code */ - Ucbit sksv : 1; /* sense key specific valid */ - Ucbit cd : 1; /* pointers refer to command not data */ - Ucbit : 2; - Ucbit bpv : 1; /* bit pointer is valid */ - Ucbit bptr : 3; /* bit pointer for failure (if bpv) */ - Uchar field_ptr[2]; /* field pointer for failure */ - Uchar add_info[2]; /* round up to 20 bytes */ -}; -#endif - -#ifdef __cplusplus -} -#endif - -#endif /* _SCG_SCSISENSE_H */ diff -Nru cdrtools-2.01.01a33/include/scg/scsitransp.h cdrtools-3.02a09/include/scg/scsitransp.h --- cdrtools-2.01.01a33/include/scg/scsitransp.h 2007-07-07 12:53:11.000000000 +0000 +++ cdrtools-3.02a09/include/scg/scsitransp.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,262 +0,0 @@ -/* @(#)scsitransp.h 1.56 07/07/07 Copyright 1995-2007 J. Schilling */ -/* - * Definitions for commands that use functions from scsitransp.c - * - * Copyright (c) 1995-2007 J. Schilling - */ -/* - * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. - * - * See the file CDDL.Schily.txt in this distribution for details. - * - * The following exceptions apply: - * CDDL §3.6 needs to be replaced by: "You may create a Larger Work by - * combining Covered Software with other code if all other code is governed by - * the terms of a license that is OSI approved (see www.opensource.org) and - * you may distribute the Larger Work as a single product. In such a case, - * You must make sure the requirements of this License are fulfilled for - * the Covered Software." - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file CDDL.Schily.txt from this distribution. - */ - -#ifndef _SCG_SCSITRANSP_H -#define _SCG_SCSITRANSP_H - -#ifdef __cplusplus -extern "C" { -#endif - -typedef struct scg_scsi SCSI; - -typedef struct { - int scsibus; /* SCSI bus # for next I/O */ - int target; /* SCSI target # for next I/O */ - int lun; /* SCSI lun # for next I/O */ -} scg_addr_t; - -#ifndef _SCG_SCGOPS_H -#include -#endif - -typedef int (*scg_cb_t) __PR((void *)); - -struct scg_scsi { - scg_ops_t *ops; /* Ptr to low level SCSI transport ops */ - int fd; /* File descriptor for next I/O */ - scg_addr_t addr; /* SCSI address for next I/O */ - int flags; /* Libscg flags (see below) */ - int dflags; /* Drive specific flags (see below) */ - int kdebug; /* Kernel debug value for next I/O */ - int debug; /* Debug value for SCSI library */ - int silent; /* Be silent if value > 0 */ - int verbose; /* Be verbose if value > 0 */ - int overbose; /* Be verbose in open() if value > 0 */ - int disre_disable; - int deftimeout; - int noparity; /* Do not use SCSI parity fo next I/O */ - int dev; /* from scsi_cdr.c */ - struct scg_cmd *scmd; - char *cmdname; - char *curcmdname; - BOOL running; - int error; /* libscg error number */ - - long maxdma; /* Max DMA limit for this open instance */ - long maxbuf; /* Cur DMA buffer limit for this inst. */ - /* This is the size behind bufptr */ - struct timeval *cmdstart; - struct timeval *cmdstop; - const char **nonstderrs; - void *local; /* Local data from the low level code */ - void *bufbase; /* needed for scsi_freebuf() */ - void *bufptr; /* DMA buffer pointer for appl. use */ - char *errstr; /* Error string for scsi_open/sendmcd */ - char *errbeg; /* Pointer to begin of not flushed data */ - char *errptr; /* Actual write pointer into errstr */ - void *errfile; /* FILE to write errors to. NULL for not*/ - /* writing and leaving errs in errstr */ - scg_cb_t cb_fun; - void *cb_arg; - - struct scsi_inquiry *inq; - struct scsi_capacity *cap; -}; - -/* - * Macros for accessing members of the scg address structure. - * scg_settarget() is the only function that is allowed to modify - * the values of the SCSI address. - */ -#define scg_scsibus(scgp) (scgp)->addr.scsibus -#define scg_target(scgp) (scgp)->addr.target -#define scg_lun(scgp) (scgp)->addr.lun - -/* - * Flags for struct SCSI: - */ -#define SCGF_PERM_EXIT 0x01 /* Exit on permission problems */ - -/* - * Drive specific flags for struct SCSI: - */ -#define DRF_MODE_DMA_OVR 0x0001 /* Drive gives DMA overrun */ - /* on mode sense */ - -#define SCSI_ERRSTR_SIZE 4096 - -/* - * Libscg error codes: - */ -#define SCG_ERRBASE 1000000 -#define SCG_NOMEM 1000001 - -/* - * Function codes for scg_version(): - */ -#define SCG_VERSION 0 /* libscg or transport version */ -#define SCG_AUTHOR 1 /* Author of above */ -#define SCG_SCCS_ID 2 /* SCCS id of above */ -#define SCG_RVERSION 10 /* Remote transport version */ -#define SCG_RAUTHOR 11 /* Remote transport author */ -#define SCG_RSCCS_ID 12 /* Remote transport SCCS ID */ -#define SCG_KVERSION 20 /* Kernel transport version */ - -/* - * Function codes for scg_reset(): - */ -#define SCG_RESET_NOP 0 /* Test if reset is supported */ -#define SCG_RESET_TGT 1 /* Reset Target only */ -#define SCG_RESET_BUS 2 /* Reset complete SCSI Bus */ - -/* - * Helpers for the error buffer in SCSI* - */ -#define scg_errsize(scgp) ((scgp)->errptr - (scgp)->errstr) -#define scg_errrsize(scgp) (SCSI_ERRSTR_SIZE - scg_errsize(scgp)) - -/* - * From scsitransp.c: - */ -extern char *scg_version __PR((SCSI *scgp, int what)); -extern int scg__open __PR((SCSI *scgp, char *device)); -extern int scg__close __PR((SCSI *scgp)); -extern int scg_numbus __PR((SCSI *scgp)); -extern BOOL scg_havebus __PR((SCSI *scgp, int)); -extern int scg_initiator_id __PR((SCSI *scgp)); -extern int scg_isatapi __PR((SCSI *scgp)); -extern int scg_reset __PR((SCSI *scgp, int what)); -extern void *scg_getbuf __PR((SCSI *scgp, long)); -extern void scg_freebuf __PR((SCSI *scgp)); -extern long scg_bufsize __PR((SCSI *scgp, long)); -extern void scg_setnonstderrs __PR((SCSI *scgp, const char **)); -extern BOOL scg_yes __PR((char *)); -extern int scg_cmd __PR((SCSI *scgp)); -extern void scg_vhead __PR((SCSI *scgp)); -extern int scg_svhead __PR((SCSI *scgp, char *buf, int maxcnt)); -extern int scg_vtail __PR((SCSI *scgp)); -extern int scg_svtail __PR((SCSI *scgp, int *retp, char *buf, int maxcnt)); -extern void scg_vsetup __PR((SCSI *scgp)); -extern int scg_getresid __PR((SCSI *scgp)); -extern int scg_getdmacnt __PR((SCSI *scgp)); -extern BOOL scg_cmd_err __PR((SCSI *scgp)); -extern void scg_printerr __PR((SCSI *scgp)); -#ifdef EOF /* stdio.h has been included */ -extern void scg_fprinterr __PR((SCSI *scgp, FILE *f)); -#endif -extern int scg_sprinterr __PR((SCSI *scgp, char *buf, int maxcnt)); -extern int scg__sprinterr __PR((SCSI *scgp, char *buf, int maxcnt)); -extern void scg_printcdb __PR((SCSI *scgp)); -extern int scg_sprintcdb __PR((SCSI *scgp, char *buf, int maxcnt)); -extern void scg_printwdata __PR((SCSI *scgp)); -extern int scg_sprintwdata __PR((SCSI *scgp, char *buf, int maxcnt)); -extern void scg_printrdata __PR((SCSI *scgp)); -extern int scg_sprintrdata __PR((SCSI *scgp, char *buf, int maxcnt)); -extern void scg_printresult __PR((SCSI *scgp)); -extern int scg_sprintresult __PR((SCSI *scgp, char *buf, int maxcnt)); -extern void scg_printstatus __PR((SCSI *scgp)); -extern int scg_sprintstatus __PR((SCSI *scgp, char *buf, int maxcnt)); -#ifdef EOF /* stdio.h has been included */ -extern void scg_fprbytes __PR((FILE *, char *, unsigned char *, int)); -extern void scg_fprascii __PR((FILE *, char *, unsigned char *, int)); -#endif -extern void scg_prbytes __PR((char *, unsigned char *, int)); -extern void scg_prascii __PR((char *, unsigned char *, int)); -extern int scg_sprbytes __PR((char *buf, int maxcnt, char *, unsigned char *, int)); -extern int scg_sprascii __PR((char *buf, int maxcnt, char *, unsigned char *, int)); -#ifdef EOF /* stdio.h has been included */ -extern void scg_fprsense __PR((FILE *f, unsigned char *, int)); -#endif -extern void scg_prsense __PR((unsigned char *, int)); -extern int scg_sprsense __PR((char *buf, int maxcnt, unsigned char *, int)); -extern int scg_cmd_status __PR((SCSI *scgp)); -extern int scg_sense_key __PR((SCSI *scgp)); -extern int scg_sense_code __PR((SCSI *scgp)); -extern int scg_sense_qual __PR((SCSI *scgp)); -#ifdef _SCG_SCSIREG_H -#ifdef EOF /* stdio.h has been included */ -extern void scg_fprintdev __PR((FILE *, struct scsi_inquiry *)); -#endif -extern void scg_printdev __PR((struct scsi_inquiry *)); -#endif -extern int scg_printf __PR((SCSI *scgp, const char *form, ...)); -extern int scg_errflush __PR((SCSI *scgp)); -#ifdef EOF /* stdio.h has been included */ -extern int scg_errfflush __PR((SCSI *scgp, FILE *f)); -#endif - -/* - * From scsierrmsg.c: - */ -extern const char *scg_sensemsg __PR((int, int, int, - const char **, char *, int maxcnt)); -#ifdef _SCG_SCSISENSE_H -extern int scg__errmsg __PR((SCSI *scgp, char *obuf, int maxcnt, - struct scsi_sense *, - struct scsi_status *, - int)); -#endif - -/* - * From scsiopen.c: - */ -#ifdef EOF /* stdio.h has been included */ -extern int scg_help __PR((FILE *f)); -#endif -extern SCSI *scg_open __PR((char *scsidev, char *errs, int slen, int odebug, int be_verbose)); -extern int scg_close __PR((SCSI * scgp)); -extern void scg_settimeout __PR((SCSI * scgp, int timeout)); -extern SCSI *scg_smalloc __PR((void)); -extern void scg_sfree __PR((SCSI *scgp)); - -/* - * From scgsettarget.c: - */ -extern int scg_settarget __PR((SCSI *scgp, int scsibus, int target, int lun)); - -/* - * From scsi-remote.c: - */ -extern scg_ops_t *scg_remote __PR((void)); - -/* - * From scsihelp.c: - */ -#ifdef EOF /* stdio.h has been included */ -extern void __scg_help __PR((FILE *f, char *name, char *tcomment, - char *tind, - char *tspec, - char *texample, - BOOL mayscan, - BOOL bydev)); -#endif - -#ifdef __cplusplus -} -#endif - -#endif /* _SCG_SCSITRANSP_H */ diff -Nru cdrtools-2.01.01a33/include/scg/spti-wnt.h cdrtools-3.02a09/include/scg/spti-wnt.h --- cdrtools-2.01.01a33/include/scg/spti-wnt.h 2004-01-04 16:06:29.000000000 +0000 +++ cdrtools-3.02a09/include/scg/spti-wnt.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,131 +0,0 @@ -/* - * distilled information from various header files from Microsoft's - * DDK for Windows NT 4.0 - */ -#ifndef _SCSIPT_H_INC -#define _SCSIPT_H_INC - -#include - -typedef struct { - USHORT Length; - UCHAR ScsiStatus; - UCHAR PathId; - UCHAR TargetId; - UCHAR Lun; - UCHAR CdbLength; - UCHAR SenseInfoLength; - UCHAR DataIn; - ULONG DataTransferLength; - ULONG TimeOutValue; - ULONG DataBufferOffset; - ULONG SenseInfoOffset; - UCHAR Cdb[16]; -} SCSI_PASS_THROUGH, *PSCSI_PASS_THROUGH; - - -typedef struct { - USHORT Length; - UCHAR ScsiStatus; - UCHAR PathId; - UCHAR TargetId; - UCHAR Lun; - UCHAR CdbLength; - UCHAR SenseInfoLength; - UCHAR DataIn; - ULONG DataTransferLength; - ULONG TimeOutValue; - PVOID DataBuffer; - ULONG SenseInfoOffset; - UCHAR Cdb[16]; -} SCSI_PASS_THROUGH_DIRECT, *PSCSI_PASS_THROUGH_DIRECT; - - -typedef struct { - SCSI_PASS_THROUGH spt; - ULONG Filler; - UCHAR ucSenseBuf[32]; - UCHAR ucDataBuf[512]; -} SCSI_PASS_THROUGH_WITH_BUFFERS, *PSCSI_PASS_THROUGH_WITH_BUFFERS; - - -typedef struct { - SCSI_PASS_THROUGH_DIRECT spt; - ULONG Filler; - UCHAR ucSenseBuf[32]; -} SCSI_PASS_THROUGH_DIRECT_WITH_BUFFER, *PSCSI_PASS_THROUGH_DIRECT_WITH_BUFFER; - - - -typedef struct { - UCHAR NumberOfLogicalUnits; - UCHAR InitiatorBusId; - ULONG InquiryDataOffset; -} SCSI_BUS_DATA, *PSCSI_BUS_DATA; - - -typedef struct { - UCHAR NumberOfBusses; - SCSI_BUS_DATA BusData[1]; -} SCSI_ADAPTER_BUS_INFO, *PSCSI_ADAPTER_BUS_INFO; - - -typedef struct { - UCHAR PathId; - UCHAR TargetId; - UCHAR Lun; - BOOLEAN DeviceClaimed; - ULONG InquiryDataLength; - ULONG NextInquiryDataOffset; - UCHAR InquiryData[1]; -} SCSI_INQUIRY_DATA, *PSCSI_INQUIRY_DATA; - - -typedef struct { - ULONG Length; - UCHAR PortNumber; - UCHAR PathId; - UCHAR TargetId; - UCHAR Lun; -} SCSI_ADDRESS, *PSCSI_ADDRESS; - - -/* - * method codes - */ -#define METHOD_BUFFERED 0 -#define METHOD_IN_DIRECT 1 -#define METHOD_OUT_DIRECT 2 -#define METHOD_NEITHER 3 - -/* - * file access values - */ -#define FILE_ANY_ACCESS 0 -#define FILE_READ_ACCESS 0x0001 -#define FILE_WRITE_ACCESS 0x0002 - - -#define IOCTL_SCSI_BASE 0x00000004 - -/* - * constants for DataIn member of SCSI_PASS_THROUGH* structures - */ -#define SCSI_IOCTL_DATA_OUT 0 -#define SCSI_IOCTL_DATA_IN 1 -#define SCSI_IOCTL_DATA_UNSPECIFIED 2 - -/* - * Standard IOCTL define - */ -#define CTL_CODE(DevType, Function, Method, Access) \ - (((DevType) << 16) | ((Access) << 14) | ((Function) << 2) | (Method)) - -#define IOCTL_SCSI_PASS_THROUGH CTL_CODE(IOCTL_SCSI_BASE, 0x0401, METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS) -#define IOCTL_SCSI_MINIPORT CTL_CODE(IOCTL_SCSI_BASE, 0x0402, METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS) -#define IOCTL_SCSI_GET_INQUIRY_DATA CTL_CODE(IOCTL_SCSI_BASE, 0x0403, METHOD_BUFFERED, FILE_ANY_ACCESS) -#define IOCTL_SCSI_GET_CAPABILITIES CTL_CODE(IOCTL_SCSI_BASE, 0x0404, METHOD_BUFFERED, FILE_ANY_ACCESS) -#define IOCTL_SCSI_PASS_THROUGH_DIRECT CTL_CODE(IOCTL_SCSI_BASE, 0x0405, METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS) -#define IOCTL_SCSI_GET_ADDRESS CTL_CODE(IOCTL_SCSI_BASE, 0x0406, METHOD_BUFFERED, FILE_ANY_ACCESS) - -#endif diff -Nru cdrtools-2.01.01a33/include/scg/srb_os2.h cdrtools-3.02a09/include/scg/srb_os2.h --- cdrtools-2.01.01a33/include/scg/srb_os2.h 1998-11-01 17:18:43.000000000 +0000 +++ cdrtools-3.02a09/include/scg/srb_os2.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,171 +0,0 @@ -/* @(#)srb_os2.h 1.1 98/11/01 Copyright 1998 D. Dorau, C. Wohlgemuth J. Schilling */ -/* - * Definitions for ASPI-Router (ASPIROUT.SYS). - * - * Copyright (c) 1998 D. Dorau, C. Wohlgemuth - */ -/* - * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. - * - * See the file CDDL.Schily.txt in this distribution for details. - * - * The following exceptions apply: - * CDDL §3.6 needs to be replaced by: "You may create a Larger Work by - * combining Covered Software with other code if all other code is governed by - * the terms of a license that is OSI approved (see www.opensource.org) and - * you may distribute the Larger Work as a single product. In such a case, - * You must make sure the requirements of this License are fulfilled for - * the Covered Software." - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file CDDL.Schily.txt from this distribution. - */ - -#pragma pack(1) - - /* SRB command */ -#define SRB_Inquiry 0x00 -#define SRB_Device 0x01 -#define SRB_Command 0x02 -#define SRB_Abort 0x03 -#define SRB_Reset 0x04 -#define SRB_Param 0x05 - - /* SRB status */ -#define SRB_Busy 0x00 /* SCSI request in progress */ -#define SRB_Done 0x01 /* SCSI request completed without error */ -#define SRB_Aborted 0x02 /* SCSI aborted by host */ -#define SRB_BadAbort 0x03 /* Unable to abort SCSI request */ -#define SRB_Error 0x04 /* SCSI request completed with error */ -#define SRB_BusyPost 0x10 /* SCSI request in progress with POST - Nokia */ -#define SRB_InvalidCmd 0x80 /* Invalid SCSI request */ -#define SRB_InvalidHA 0x81 /* Invalid Hhost adapter number */ -#define SRB_BadDevice 0x82 /* SCSI device not installed */ - - /* SRB flags */ -#define SRB_Post 0x01 /* Post vector valid */ -#define SRB_Link 0x02 /* Link vector valid */ -#define SRB_SG 0x04 /* Nokia: scatter/gather */ - /* S/G: n * (4 bytes length, 4 bytes addr) */ - /* No of s/g items not limited by HA spec. */ -#define SRB_NoCheck 0x00 /* determined by command, not checked */ -#define SRB_Read 0x08 /* target to host, length checked */ -#define SRB_Write 0x10 /* host to target, length checked */ -#define SRB_NoTransfer 0x18 /* no data transfer */ -#define SRB_DirMask 0x18 /* bit mask */ - - /* SRB host adapter status */ -#define SRB_NoError 0x00 /* No host adapter detected error */ -#define SRB_Timeout 0x11 /* Selection timeout */ -#define SRB_DataLength 0x12 /* Data over/underrun */ -#define SRB_BusFree 0x13 /* Unexpected bus free */ -#define SRB_BusSequence 0x14 /* Target bus sequence failure */ - - /* SRB target status field */ -#define SRB_NoStatus 0x00 /* No target status */ -#define SRB_CheckStatus 0x02 /* Check status (sense data valid) */ -#define SRB_LUN_Busy 0x08 /* Specified LUN is busy */ -#define SRB_Reserved 0x18 /* Reservation conflict */ - -#define MaxCDBStatus 64 /* max size of CDB + status */ - - -typedef struct SRb { - unsigned char cmd, /* 00 */ - status, /* 01 */ - ha_num, /* 02 */ - flags; /* 03 */ - unsigned long res_04_07; /* 04..07 */ - union { /* 08 */ - - /* SRB_Inquiry */ - struct { - unsigned char num_ha, /* 08 */ - ha_target, /* 09 */ - aspimgr_id[16], /* 0A..19 */ - host_id[16], /* 1A..29 */ - unique_id[16]; /* 2A..39 */ - } inq; - - /* SRB_Device */ - struct { - unsigned char target, /* 08 */ - lun, /* 09 */ - devtype; /* 0A */ - } dev; - - /* SRB_Command */ - struct { - unsigned char target, /* 08 */ - lun; /* 09 */ - unsigned long data_len; /* 0A..0D */ - unsigned char sense_len; /* 0E */ - unsigned long data_ptr; /* 0F..12 */ - unsigned long link_ptr; /* 13..16 */ - // void * _Seg16 data_ptr; /* 0F..12 */ - // void * _Seg16 link_ptr; /* 13..16 */ - unsigned char cdb_len, /* 17 */ - ha_status, /* 18 */ - target_status; /* 19 */ - unsigned char _Seg16postSRB[4]; - // void (* _Seg16 post) (SRB *); /* 1A..1D */ - unsigned char res_1E_29[12]; /* 1E..29 */ - unsigned char res_2A_3F[22]; /* 2A..3F */ - unsigned char cdb_st[64]; /* 40..7F CDB+status */ - unsigned char res_80_BF[64]; /* 80..BF */ - } cmd; - - /* SRB_Abort */ - struct { - unsigned char _Seg16srb[4]; - // void * _Seg16 srb; /* 08..0B */ - } abt; - - /* SRB_Reset */ - struct { - unsigned char target, /* 08 */ - lun, /* 09 */ - res_0A_17[14], /* 0A..17 */ - ha_status, /* 18 */ - target_status; /* 19 */ - } res; - - /* SRB_Param - unused by ASPI4OS2 */ - struct { - unsigned char unique[16]; /* 08..17 */ - } par; - - } u; -} SRB; - - -// SCSI sense codes -// Note! This list may not be complete. I did this compilation for use with tape drives. - -#define Sense_Current 0x70; // Current Error -#define Sense_Deferred 0x71; // Deferred Error -#define Sense_Filemark 0x80; // Filemark detected -#define Sense_EOM 0x40; // End of medium detected -#define Sense_ILI 0x20; // Incorrect length indicator - -// Sense Keys - -#define SK_NoSense 0x00; // No Sense -#define SK_RcvrdErr 0x01; // Recovered Error -#define SK_NotReady 0x02; // Not ready -#define SK_MedErr 0x03; // Medium Error -#define SK_HWErr 0x04; // Hardware Error -#define SK_IllReq 0x05; // Illegal Request -#define SK_UnitAtt 0x06; // Unit attention -#define SK_DataProt 0x07: // Data Protect -#define SK_BlankChk 0x08: // Blank Check -#define SK_VndSpec 0x09; // Vendor Specific -#define SK_CopyAbort 0x0A; // Copy Aborted -#define SK_AbtdCmd 0x0B; // Aborted Command -#define SK_Equal 0x0C; // Equal -#define SK_VolOvfl 0x0D; // Volume Overflow -#define SK_MisComp 0x0E; // Miscompare -#define SK_Reserved 0x0F; // Reserved diff -Nru cdrtools-2.01.01a33/include/schily/align.h cdrtools-3.02a09/include/schily/align.h --- cdrtools-2.01.01a33/include/schily/align.h 2007-07-01 11:57:30.000000000 +0000 +++ cdrtools-3.02a09/include/schily/align.h 2013-07-23 19:09:22.000000000 +0000 @@ -1,8 +1,8 @@ -/* @(#)align.h 1.5 07/07/01 Copyright 1995-2006 J. Schilling */ +/* @(#)align.h 1.11 13/07/23 Copyright 1995-2013 J. Schilling */ /* * Platform dependent definitions for aligning data. * - * Copyright (c) 1995-2006 J. Schilling + * Copyright (c) 1995-2013 J. Schilling */ /* * The contents of this file are subject to the terms of the @@ -11,6 +11,8 @@ * with the License. * * See the file CDDL.Schily.txt in this distribution for details. + * A copy of the CDDL is also available via the Internet at + * http://www.opensource.org/licenses/cddl1.txt * * When distributing Covered Code, include this CDDL HEADER in each * file and include the License file CDDL.Schily.txt from this distribution. @@ -45,6 +47,10 @@ #ifndef _SCHILY_ALIGN_H #define _SCHILY_ALIGN_H +#ifndef _SCHILY_MCONFIG_H +#include +#endif + #ifndef _SCHILY_UTYPES_H #include #endif @@ -110,6 +116,27 @@ #define __JS_ARCH_CONF_INCL #endif +#ifdef __LINUX_ARMV6L_GCC32 +#include +#define __JS_ARCH_CONF_INCL +#endif +#ifdef __LINUX_ARMV5L_GCC32 +#include +#define __JS_ARCH_CONF_INCL +#endif +#ifdef __LINUX_ARMV5TEJL_GCC32 +#include +#define __JS_ARCH_CONF_INCL +#endif +#ifdef __LINUX_I386_GCC32 +#include +#define __JS_ARCH_CONF_INCL +#endif +#ifdef __LINUX_amd64_GCC64 +#include +#define __JS_ARCH_CONF_INCL +#endif + #ifdef __MSWIN_X86_CL32 #include #define __JS_ARCH_ALIGN_INCL @@ -121,9 +148,26 @@ #endif #ifndef __JS_ARCH_ALIGN_INCL +/* + * #error will not work for all compilers (e.g. sunos4) + * The following line will abort compilation on all compilers + * if none of the above is defined. And that's what we want. + */ Error unconfigured architecture + +#include /* Avoid "unknown directive" with K&R */ #endif #endif /* SCHILY_BUILD */ +#ifdef __cplusplus +extern "C" { +#endif +/* + * Fake in order to keep the silly hdrchk(1) quiet. + */ +#ifdef __cplusplus +} +#endif + #endif /* _SCHILY_ALIGN_H */ diff -Nru cdrtools-2.01.01a33/include/schily/align.mk cdrtools-3.02a09/include/schily/align.mk --- cdrtools-2.01.01a33/include/schily/align.mk 2006-12-17 21:52:11.000000000 +0000 +++ cdrtools-3.02a09/include/schily/align.mk 2006-12-17 21:52:11.000000000 +0000 @@ -1,4 +1,4 @@ -#ident %W% %E% %Q% +#ident @(#)align.mk 1.1 06/12/17 ########################################################################### # Sample makefile for installing non-localized auxiliary files ########################################################################### diff -Nru cdrtools-2.01.01a33/include/schily/alloca.h cdrtools-3.02a09/include/schily/alloca.h --- cdrtools-2.01.01a33/include/schily/alloca.h 2006-09-13 01:35:18.000000000 +0000 +++ cdrtools-3.02a09/include/schily/alloca.h 2010-08-24 13:40:56.000000000 +0000 @@ -1,4 +1,4 @@ -/* @(#)alloca.h 1.6 06/09/13 Copyright 2002 J. Schilling */ +/* @(#)alloca.h 1.7 10/08/24 Copyright 2002-2010 J. Schilling */ /* * Definitions for users of alloca() * @@ -6,7 +6,7 @@ * and before any other include file. * See comment in _AIX part below. * - * Copyright (c) 2002 J. Schilling + * Copyright (c) 2002-2010 J. Schilling */ /* * The contents of this file are subject to the terms of the @@ -48,6 +48,9 @@ #pragma alloca # else # ifndef alloca +#ifdef __cplusplus +extern "C" { +#endif /* * predefined by HP cc +Olibcalls */ @@ -56,11 +59,13 @@ # else extern char *alloca(); # endif +#ifdef __cplusplus +} +#endif # endif # endif # endif # endif #endif - #endif /* _SCHILY_ALLOCA_H */ diff -Nru cdrtools-2.01.01a33/include/schily/alloca.mk cdrtools-3.02a09/include/schily/alloca.mk --- cdrtools-2.01.01a33/include/schily/alloca.mk 2006-12-17 21:52:11.000000000 +0000 +++ cdrtools-3.02a09/include/schily/alloca.mk 2006-12-17 21:52:11.000000000 +0000 @@ -1,4 +1,4 @@ -#ident %W% %E% %Q% +#ident @(#)alloca.mk 1.1 06/12/17 ########################################################################### # Sample makefile for installing non-localized auxiliary files ########################################################################### diff -Nru cdrtools-2.01.01a33/include/schily/archdefs.h cdrtools-3.02a09/include/schily/archdefs.h --- cdrtools-2.01.01a33/include/schily/archdefs.h 2007-07-01 11:57:58.000000000 +0000 +++ cdrtools-3.02a09/include/schily/archdefs.h 2017-11-24 23:32:36.000000000 +0000 @@ -1,9 +1,9 @@ -/* @(#)archdefs.h 1.6 07/07/01 Copyright 2006-2007 J. Schilling */ +/* @(#)archdefs.h 1.15 17/11/25 Copyright 2006-2017 J. Schilling */ /* * Processor, instruction set and OS architecture specific defines. * The information is fetched from compiler predefinitions only. * - * Copyright (c) 2006-2007 J. Schilling + * Copyright (c) 2006-2017 J. Schilling */ /* * The contents of this file are subject to the terms of the @@ -12,6 +12,8 @@ * with the License. * * See the file CDDL.Schily.txt in this distribution for details. + * A copy of the CDDL is also available via the Internet at + * http://www.opensource.org/licenses/cddl1.txt * * When distributing Covered Code, include this CDDL HEADER in each * file and include the License file CDDL.Schily.txt from this distribution. @@ -20,6 +22,11 @@ #ifndef _SCHILY_ARCHDEFS_H #define _SCHILY_ARCHDEFS_H +/* + * The code in this file only depends on compiler predefined macros. + * For this reason, it does not need to include schily/mconfig.h + */ + #if defined(sun) || defined(__sun) || defined(__sun__) #ifndef __sun #define __sun @@ -44,14 +51,14 @@ #endif #endif -#if defined(i386) || defined(__i386) || defined(__i386__) +#if defined(i386) || defined(__i386) || defined(__i386__) || defined(_M_IX86) #ifndef __i386 #define __i386 #endif #endif #if defined(__amd64) || defined(__amd64__) || \ - defined(__x86_64) || defined(__x86_64__) + defined(__x86_64) || defined(__x86_64__) || defined(_M_AMD64) #ifndef __amd64 #define __amd64 #endif @@ -96,13 +103,13 @@ #define __sun #endif #ifndef __GNUC__ -#ifndef __SUNPRO_C +#ifndef __IS_SUNPRO_C #ifdef __SVR4 -#define __SUNPRO_C +#define __IS_SUNPRO_C #else -#define __SUN_C +#define __IS_SUN_C #endif /* __SVR4 */ -#endif /* !__SUNPRO_C */ +#endif /* !__IS_SUNPRO_C */ #endif /* !__GNUC__ */ #endif /* __sun */ @@ -112,23 +119,27 @@ */ #if defined(__sun) && !defined(__SVR4) -#if defined(__mc6800) +#define __SUNOS4 + +#if defined(__mc68000) +#define __SUNOS4_MC68000 #ifdef __GNUC__ #define __SUNOS4_MC68000_GCC32 #define __JS_ARCH_DEFINED #endif -#ifdef __SUN_C +#ifdef __IS_SUN_C #define __SUNOS4_MC68000_CC32 #define __JS_ARCH_DEFINED #endif -#endif /* __mc6800 */ +#endif /* __mc68000 */ #if defined(__sparc) +#define __SUNOS4_SPARC #ifdef __GNUC__ #define __SUNOS4_SPARC_GCC32 #define __JS_ARCH_DEFINED #endif -#if defined(__SUN_C) || defined(__SUNPRO_C) +#if defined(__IS_SUN_C) || defined(__SUNPRO_C) || defined(__IS_SUNPRO_C) #define __SUNOS4_SPARC_CC32 #define __JS_ARCH_DEFINED #endif @@ -142,6 +153,8 @@ */ #if defined(__sun) && defined(__SVR4) +#define __SUNOS5 + #if defined(__sparc) #ifdef __GNUC__ #ifdef __sparcv9 @@ -151,7 +164,7 @@ #endif #define __JS_ARCH_DEFINED #endif -#if defined(__SUNPRO_C) +#if defined(__SUNPRO_C) || defined(__IS_SUNPRO_C) #ifdef __sparcv9 #define __SUNOS5_SPARC_CC64 #else @@ -170,7 +183,7 @@ #endif #define __JS_ARCH_DEFINED #endif -#if defined(__SUNPRO_C) +#if defined(__SUNPRO_C) || defined(__IS_SUNPRO_C) #ifdef __amd64 #define __SUNOS5_X86_CC64 #else @@ -209,14 +222,58 @@ #endif /* HP-UX */ /* + * Linux specific defines + */ +#if defined(__linux) + +#if defined(__arm__) +#ifdef __GNUC__ +#ifdef __ARM_ARCH_5TE__ +#define __LINUX_ARMV5TEJL_GCC32 +#define __JS_ARCH_DEFINED +#endif +#ifndef __JS_ARCH_DEFINED +#ifdef __ARM_ARCH_6__ +#define __LINUX_ARMV6L_GCC32 +#define __JS_ARCH_DEFINED +#endif +#endif +#ifndef __JS_ARCH_DEFINED +#ifdef __ARM_ARCH_5__ +#define __LINUX_ARMV5L_GCC32 +#define __JS_ARCH_DEFINED +#endif +#endif +#endif /* __GNUC__ */ +#endif /* __arm__ */ + +#if defined(__i386__) || defined(i386) +#ifdef __GNUC__ +#define __LINUX_I386_GCC32 +#define __JS_ARCH_DEFINED +#endif +#endif /* __i386__ */ +#if defined(__amd64__) || defined(__amd64) +#ifdef __GNUC__ +#define __LINUX_amd64_GCC64 +#define __JS_ARCH_DEFINED +#endif +#endif /* __amd64__ */ + +#endif /* Linux */ + +/* * MS-WIN specific defines * * cl defines one of: + * _M_ALPHA * _M_IX86 * _M_AMD64 * _M_M68K - * _M_MPPC - * _M_IA64 + * _M_PPC PPC in general + * _M_MPPC Power Macintosh + * _M_MRX000 Mips + * _M_IA64 Itanium */ #if defined(_MSC_VER) && (defined(_X86_) || defined(_M_IX86)) #define __MSWIN_X86_CL32 diff -Nru cdrtools-2.01.01a33/include/schily/archdefs.mk cdrtools-3.02a09/include/schily/archdefs.mk --- cdrtools-2.01.01a33/include/schily/archdefs.mk 2006-12-17 21:52:11.000000000 +0000 +++ cdrtools-3.02a09/include/schily/archdefs.mk 2006-12-17 21:52:11.000000000 +0000 @@ -1,4 +1,4 @@ -#ident %W% %E% %Q% +#ident @(#)archdefs.mk 1.1 06/12/17 ########################################################################### # Sample makefile for installing non-localized auxiliary files ########################################################################### diff -Nru cdrtools-2.01.01a33/include/schily/assert.h cdrtools-3.02a09/include/schily/assert.h --- cdrtools-2.01.01a33/include/schily/assert.h 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/include/schily/assert.h 2009-08-07 17:06:21.000000000 +0000 @@ -0,0 +1,47 @@ +/* @(#)assert.h 1.1 09/08/07 Copyright 2009 J. Schilling */ +/* + * Abstraction code for assert.h + * + * Copyright (c) 2009 J. Schilling + */ +/* + * The contents of this file are subject to the terms of the + * Common Development and Distribution License, Version 1.0 only + * (the "License"). You may not use this file except in compliance + * with the License. + * + * See the file CDDL.Schily.txt in this distribution for details. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file CDDL.Schily.txt from this distribution. + */ + +#ifndef _SCHILY_ASSERT_H +#define _SCHILY_ASSERT_H + +#ifndef _SCHILY_MCONFIG_H +#include +#endif + +#ifdef HAVE_ASSERT_H +#ifndef _INCL_ASSERT_H +#define _INCL_ASSERT_H +#include +#endif +#else /* !HAVE_ASSERT_H */ + +#undef assert + +#ifdef NDEBUG +#define assert(ignore) ((void) 0) +#else +#if defined(__STDC__) +#define assert(exp) (void)((exp) || (__assert(#exp, __FILE__, __LINE__), 0)) +#else +#define assert(exp) (void)((exp) || (__assert("exp", __FILE__, __LINE__), 0)) +#endif +#endif + +#endif /* !HAVE_ASSERT_H */ + +#endif /* _SCHILY_ASSERT_H */ diff -Nru cdrtools-2.01.01a33/include/schily/assert.mk cdrtools-3.02a09/include/schily/assert.mk --- cdrtools-2.01.01a33/include/schily/assert.mk 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/include/schily/assert.mk 2009-08-07 17:06:21.000000000 +0000 @@ -0,0 +1,17 @@ +#ident "@(#)assert.mk 1.1 09/08/07 " +########################################################################### +# Sample makefile for installing non-localized auxiliary files +########################################################################### +SRCROOT= ../.. +RULESDIR= RULES +include $(SRCROOT)/$(RULESDIR)/rules.top +########################################################################### + +INSDIR= include/schily +TARGET= assert.h +#XMK_FILE= Makefile.man + +########################################################################### +include $(SRCROOT)/$(RULESDIR)/rules.aux +########################################################################### + diff -Nru cdrtools-2.01.01a33/include/schily/avoffset.h cdrtools-3.02a09/include/schily/avoffset.h --- cdrtools-2.01.01a33/include/schily/avoffset.h 2007-07-01 11:57:30.000000000 +0000 +++ cdrtools-3.02a09/include/schily/avoffset.h 2013-08-26 18:06:47.000000000 +0000 @@ -1,8 +1,8 @@ -/* @(#)avoffset.h 1.6 07/07/01 Copyright 1995-2006 J. Schilling */ +/* @(#)avoffset.h 1.13 13/08/26 Copyright 1995-2013 J. Schilling */ /* * Platform dependent definitions for stack scanning. * - * Copyright (c) 1995-2006 J. Schilling + * Copyright (c) 1995-2013 J. Schilling */ /* * The contents of this file are subject to the terms of the @@ -11,6 +11,8 @@ * with the License. * * See the file CDDL.Schily.txt in this distribution for details. + * A copy of the CDDL is also available via the Internet at + * http://www.opensource.org/licenses/cddl1.txt * * When distributing Covered Code, include this CDDL HEADER in each * file and include the License file CDDL.Schily.txt from this distribution. @@ -32,8 +34,8 @@ * If getav0() does not work on a specific architecture * the program which generated this automaticly generated include file * may dump core. In this case, the generated include file does not include - * definitions for AV_OFFSET and FP_INDIR but ends after the STACK_DIRECTION - * definition. + * definitions for AV_OFFSET and FP_INDIR but ends after the + * STACK_DIRECTION definition. * If AV_OFFSET or FP_INDIR are missing in the file, all code * that use the definitions are automatically disabled. */ @@ -105,6 +107,27 @@ #define __JS_ARCH_CONF_INCL #endif +#ifdef __LINUX_ARMV6L_GCC32 +#include +#define __JS_ARCH_CONF_INCL +#endif +#ifdef __LINUX_ARMV5L_GCC32 +#include +#define __JS_ARCH_CONF_INCL +#endif +#ifdef __LINUX_ARMV5TEJL_GCC32 +#include +#define __JS_ARCH_CONF_INCL +#endif +#ifdef __LINUX_I386_GCC32 +#include +#define __JS_ARCH_CONF_INCL +#endif +#ifdef __LINUX_amd64_GCC64 +#include +#define __JS_ARCH_CONF_INCL +#endif + #ifdef __MSWIN_X86_CL32 #include #define __JS_ARCH_AVOFFSET_INCL @@ -116,9 +139,26 @@ #endif #ifndef __JS_ARCH_AVOFFSET_INCL +/* + * #error will not work for all compilers (e.g. sunos4) + * The following line will abort compilation on all compilers + * if none of the above is defined. And that's what we want. + */ Error unconfigured architecture + +#include /* Avoid "unknown directive" with K&R */ #endif #endif /* SCHILY_BUILD */ +#ifdef __cplusplus +extern "C" { +#endif +/* + * Fake in order to keep the silly hdrchk(1) quiet. + */ +#ifdef __cplusplus +} +#endif + #endif /* _SCHILY_AVOFFSET_H */ diff -Nru cdrtools-2.01.01a33/include/schily/avoffset.mk cdrtools-3.02a09/include/schily/avoffset.mk --- cdrtools-2.01.01a33/include/schily/avoffset.mk 2006-12-17 21:52:11.000000000 +0000 +++ cdrtools-3.02a09/include/schily/avoffset.mk 2006-12-17 21:52:11.000000000 +0000 @@ -1,4 +1,4 @@ -#ident %W% %E% %Q% +#ident @(#)avoffset.mk 1.1 06/12/17 ########################################################################### # Sample makefile for installing non-localized auxiliary files ########################################################################### diff -Nru cdrtools-2.01.01a33/include/schily/btorder.h cdrtools-3.02a09/include/schily/btorder.h --- cdrtools-2.01.01a33/include/schily/btorder.h 2007-01-16 14:19:12.000000000 +0000 +++ cdrtools-3.02a09/include/schily/btorder.h 2012-12-03 22:50:40.000000000 +0000 @@ -1,8 +1,8 @@ -/* @(#)btorder.h 1.19 07/01/16 Copyright 1996-2007 J. Schilling */ +/* @(#)btorder.h 1.22 12/12/03 Copyright 1996-2012 J. Schilling */ /* * Definitions for Bit and Byte ordering * - * Copyright (c) 1996-2007 J. Schilling + * Copyright (c) 1996-2012 J. Schilling */ /* * The contents of this file are subject to the terms of the @@ -21,13 +21,17 @@ #define _SCHILY_BTORDER_H #ifndef _SCHILY_MCONFIG_H -#include /* load bit/byte-oder from xmconfig.h*/ +#include /* load bit/byte-oder from xmconfig.h */ #endif #ifndef _SCHILY_TYPES_H #include /* try to load isa_defs.h on Solaris */ #endif +#ifdef __cplusplus +extern "C" { +#endif + /* * Convert bit-order definitions from xconfig.h into our values * and verify them. @@ -52,9 +56,11 @@ /* * #error will not work for all compilers (e.g. sunos4) * The following line will abort compilation on all compilers - * if none of the above is defines. And that's what we want. + * if none of the above is defined. And that's what we want. */ error Only one of _BIT_FIELDS_LTOH or _BIT_FIELDS_HTOL may be defined + +#include /* Avoid "unknown directive" with K&R */ #endif @@ -67,13 +73,13 @@ #if defined(HAVE_C_BIGENDIAN) && \ !defined(WORDS_BIGENDIAN) #define WORDS_LITTLEENDIAN -/*#define _LITTLE_ENDIAN*/ +/* #define _LITTLE_ENDIAN */ #endif #if defined(HAVE_C_BIGENDIAN) && \ defined(WORDS_BIGENDIAN) #undef WORDS_LITTLEENDIAN -/*#define _BIG_ENDIAN*/ +/* #define _BIG_ENDIAN */ #endif #if defined(_BIT_FIELDS_LTOH) || defined(_BIT_FIELDS_HTOL) @@ -111,4 +117,8 @@ # endif #endif +#ifdef __cplusplus +} +#endif + #endif /* _SCHILY_BTORDER_H */ diff -Nru cdrtools-2.01.01a33/include/schily/btorder.mk cdrtools-3.02a09/include/schily/btorder.mk --- cdrtools-2.01.01a33/include/schily/btorder.mk 2006-12-17 21:52:11.000000000 +0000 +++ cdrtools-3.02a09/include/schily/btorder.mk 2006-12-17 21:52:11.000000000 +0000 @@ -1,4 +1,4 @@ -#ident %W% %E% %Q% +#ident @(#)btorder.mk 1.1 06/12/17 ########################################################################### # Sample makefile for installing non-localized auxiliary files ########################################################################### diff -Nru cdrtools-2.01.01a33/include/schily/ccomdefs.h cdrtools-3.02a09/include/schily/ccomdefs.h --- cdrtools-2.01.01a33/include/schily/ccomdefs.h 2006-09-13 01:27:00.000000000 +0000 +++ cdrtools-3.02a09/include/schily/ccomdefs.h 2011-07-21 19:27:19.000000000 +0000 @@ -1,8 +1,8 @@ -/* @(#)ccomdefs.h 1.4 06/09/13 Copyright 2000 J. Schilling */ +/* @(#)ccomdefs.h 1.12 11/07/21 Copyright 2000-2011 J. Schilling */ /* * Various compiler dependant macros. * - * Copyright (c) 2000 J. Schilling + * Copyright (c) 2000-2011 J. Schilling */ /* * The contents of this file are subject to the terms of the @@ -19,6 +19,10 @@ #ifndef _SCHILY_CCOMDEFS_H #define _SCHILY_CCOMDEFS_H +#ifndef _SCHILY_MCONFIG_H +#include +#endif + #ifdef __cplusplus extern "C" { #endif @@ -29,7 +33,8 @@ * that are not known to support the features properly (old versions of gcc-2 * didn't permit keeping the keywords out of the application namespace). */ -#if __GNUC__ < 2 || __GNUC__ == 2 && __GNUC_MINOR__ < 7 +#if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 7) || \ + defined(NO_PRINTFLIKE) #define __printflike__(fmtarg, firstvararg) #define __printf0like__(fmtarg, firstvararg) @@ -56,6 +61,28 @@ #endif /* GNUC */ +#if __GNUC__ > 3 || __GNUC__ == 3 && __GNUC_MINOR__ > 2 +/* GCC-3.3 or more */ + +/* CSTYLED */ +#define UConst __attribute__ ((__used__)) const + +#else /* less than GNUC 3.3 */ + +#define UConst const + +#endif /* less than GNUC 3.3 */ + +#ifdef __PCC__ +/* + * Hack until pcc supports __attribute__ ((__used__)) + */ +#ifdef UConst +#undef UConst +#define UConst const +#endif +#endif + #ifdef __cplusplus } #endif diff -Nru cdrtools-2.01.01a33/include/schily/ccomdefs.mk cdrtools-3.02a09/include/schily/ccomdefs.mk --- cdrtools-2.01.01a33/include/schily/ccomdefs.mk 2006-12-17 21:52:11.000000000 +0000 +++ cdrtools-3.02a09/include/schily/ccomdefs.mk 2006-12-17 21:52:11.000000000 +0000 @@ -1,4 +1,4 @@ -#ident %W% %E% %Q% +#ident @(#)ccomdefs.mk 1.1 06/12/17 ########################################################################### # Sample makefile for installing non-localized auxiliary files ########################################################################### diff -Nru cdrtools-2.01.01a33/include/schily/checkerr.h cdrtools-3.02a09/include/schily/checkerr.h --- cdrtools-2.01.01a33/include/schily/checkerr.h 2007-07-14 12:28:56.000000000 +0000 +++ cdrtools-3.02a09/include/schily/checkerr.h 2012-11-29 19:19:59.000000000 +0000 @@ -1,4 +1,4 @@ -/* @(#)checkerr.h 1.9 07/07/14 Copyright 2003-2007 J. Schilling */ +/* @(#)checkerr.h 1.14 12/11/13 Copyright 2003-2012 J. Schilling */ /* * Generic error control for programs that do file i/o. * The error control is usually used by archiving programs. @@ -9,7 +9,7 @@ * an official stable and "library-compliant" interface, be careful * and watch for changes. * - * Copyright (c) 2003-2007 J. Schilling + * Copyright (c) 2003-2012 J. Schilling */ /* * The contents of this file are subject to the terms of the @@ -26,6 +26,9 @@ #ifndef _SCHILY_CHECKERR_H #define _SCHILY_CHECKERR_H +#ifndef _SCHILY_MCONFIG_H +#include +#endif #ifndef _SCHILY_STANDARD_H #include #endif @@ -33,6 +36,10 @@ #include #endif +#ifdef __cplusplus +extern "C" { +#endif + /* * Error conditions handled by error control. */ @@ -49,6 +56,11 @@ #define E_SPECIALFILE 0x0400 /* Improper file type for archive */ #define E_READLINK 0x0800 /* Could not read symbolic link */ #define E_GETXATTR 0x1000 /* Could not get xattr */ +#define E_CHDIR 0x2000 /* Could not chdir() */ + +/* + * Currently unused: 0x4000 .. 0x8000 + */ #define E_SETTIME 0x10000 /* Could not set file times */ #define E_SETMODE 0x20000 /* Could not set access modes */ @@ -59,6 +71,10 @@ #define E_SETACL 0x400000 /* Could not set ACL for file */ #define E_SETXATTR 0x800000 /* Could not set xattr */ +/* + * Currently unused: 0x1000000 .. 0x8000000 + */ + #define E_DIFF 0x10000000 /* Diffs encountered */ #define E_WARN 0x20000000 /* Print this error but do exit(0) */ #define E_ABORT 0x40000000 /* Abort on this error */ @@ -67,8 +83,13 @@ #define E_ALL (~(UInt32_t)(E_DIFF|E_ABORT)) extern int errconfig __PR((char *name)); -extern BOOL errhidden __PR((int etype, char *fname)); -extern BOOL errwarnonly __PR((int etype, char *fname)); -extern BOOL errabort __PR((int etype, char *fname, BOOL doexit)); +extern BOOL errhidden __PR((int etype, const char *fname)); +extern BOOL errwarnonly __PR((int etype, const char *fname)); +extern BOOL errabort __PR((int etype, const char *fname, + BOOL doexit)); + +#ifdef __cplusplus +} +#endif #endif /* _SCHILY_CHECKERR_H */ diff -Nru cdrtools-2.01.01a33/include/schily/checkerr.mk cdrtools-3.02a09/include/schily/checkerr.mk --- cdrtools-2.01.01a33/include/schily/checkerr.mk 2007-07-14 12:26:55.000000000 +0000 +++ cdrtools-3.02a09/include/schily/checkerr.mk 2007-07-14 12:26:55.000000000 +0000 @@ -1,4 +1,4 @@ -#ident %W% %E% %Q% +#ident @(#)checkerr.mk 1.1 07/07/14 ########################################################################### # Sample makefile for installing non-localized auxiliary files ########################################################################### diff -Nru cdrtools-2.01.01a33/include/schily/ctype.h cdrtools-3.02a09/include/schily/ctype.h --- cdrtools-2.01.01a33/include/schily/ctype.h 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/include/schily/ctype.h 2016-06-19 11:21:19.000000000 +0000 @@ -0,0 +1,40 @@ +/* @(#)ctype.h 1.2 16/06/19 Copyright 2009-2016 J. Schilling */ +/* + * Ctype abstraction + * + * Copyright (c) 2009-2016 J. Schilling + */ +/* + * The contents of this file are subject to the terms of the + * Common Development and Distribution License, Version 1.0 only + * (the "License"). You may not use this file except in compliance + * with the License. + * + * See the file CDDL.Schily.txt in this distribution for details. + * A copy of the CDDL is also available via the Internet at + * http://www.opensource.org/licenses/cddl1.txt + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file CDDL.Schily.txt from this distribution. + */ + +#ifndef _SCHILY_CTYPE_H +#define _SCHILY_CTYPE_H + +#ifndef _SCHILY_MCONFIG_H +#include +#endif +#ifndef _SCHILY_TYPES_H +#include +#endif + +#ifdef HAVE_CTYPE_H +#ifndef _INCL_CTYPE_H +#include +#define _INCL_CTYPE_H +#endif +#else + +#endif /* ! HAVE_CTYPE_H */ + +#endif /* _SCHILY_CTYPE_H */ diff -Nru cdrtools-2.01.01a33/include/schily/ctype.mk cdrtools-3.02a09/include/schily/ctype.mk --- cdrtools-2.01.01a33/include/schily/ctype.mk 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/include/schily/ctype.mk 2009-07-10 19:32:46.000000000 +0000 @@ -0,0 +1,17 @@ +#ident "@(#)ctype.mk 1.1 09/07/10 " +########################################################################### +# Sample makefile for installing non-localized auxiliary files +########################################################################### +SRCROOT= ../.. +RULESDIR= RULES +include $(SRCROOT)/$(RULESDIR)/rules.top +########################################################################### + +INSDIR= include/schily +TARGET= ctype.h +#XMK_FILE= Makefile.man + +########################################################################### +include $(SRCROOT)/$(RULESDIR)/rules.aux +########################################################################### + diff -Nru cdrtools-2.01.01a33/include/schily/dbgmalloc.h cdrtools-3.02a09/include/schily/dbgmalloc.h --- cdrtools-2.01.01a33/include/schily/dbgmalloc.h 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/include/schily/dbgmalloc.h 2015-08-14 20:53:45.000000000 +0000 @@ -0,0 +1,79 @@ +/* @(#)dbgmalloc.h 1.7 15/08/14 Copyright 2009-2015 J. Schilling */ +/* + * Definitions for libdmalloc + * + * Copyright (c) 2009-2015 J. Schilling + */ +/* + * The contents of this file are subject to the terms of the + * Common Development and Distribution License, Version 1.0 only + * (the "License"). You may not use this file except in compliance + * with the License. + * + * See the file CDDL.Schily.txt in this distribution for details. + * A copy of the CDDL is also available via the Internet at + * http://www.opensource.org/licenses/cddl1.txt + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file CDDL.Schily.txt from this distribution. + */ + +#ifndef _SCHILY_DBGMALLOC_H +#define _SCHILY_DBGMALLOC_H + +#ifndef _SCHILY_MCONFIG_H +#include +#endif + +#ifdef DBG_MALLOC +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +extern void *dbg_malloc __PR((size_t size, char *file, + int line)); +extern void *dbg_calloc __PR((size_t nelem, size_t elsize, + char *file, int line)); +extern void *dbg_realloc __PR((void *t, size_t size, char *file, + int line)); +#define malloc(s) dbg_malloc(s, __FILE__, __LINE__) +#define calloc(n, s) dbg_calloc(n, s, __FILE__, __LINE__) +#define realloc(t, s) dbg_realloc(t, s, __FILE__, __LINE__) + +#ifdef __cplusplus +} +#endif + +#endif /* DBG_MALLOC */ + +#ifdef USE_JS_BOOL /* #define USE_JS_BOOL if there is a */ +#define BOOL JS_BOOL /* different (incompatible) BOOL in */ +#endif /* the using code */ +#include + +#ifdef __cplusplus +extern "C" { +#endif + +#ifndef FALSE +extern int acheckdamage __PR((void)); +extern void freechecking __PR((int val)); +extern void nomemraising __PR((int val)); +#else +extern BOOL acheckdamage __PR((void)); +extern void freechecking __PR((BOOL val)); +extern void nomemraising __PR((BOOL val)); +#endif + +#ifdef USE_JS_BOOL /* If in workaround mode, */ +#undef BOOL /* revert to default BOOL */ +#endif + +#ifdef __cplusplus +} +#endif + +#endif /* _SCHILY_DBGMALLOC_H */ diff -Nru cdrtools-2.01.01a33/include/schily/dbgmalloc.mk cdrtools-3.02a09/include/schily/dbgmalloc.mk --- cdrtools-2.01.01a33/include/schily/dbgmalloc.mk 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/include/schily/dbgmalloc.mk 2009-10-15 22:56:05.000000000 +0000 @@ -0,0 +1,17 @@ +#ident "@(#)dbgmalloc.mk 1.1 09/10/16 " +########################################################################### +# Sample makefile for installing non-localized auxiliary files +########################################################################### +SRCROOT= ../.. +RULESDIR= RULES +include $(SRCROOT)/$(RULESDIR)/rules.top +########################################################################### + +INSDIR= include/schily +TARGET= dbgmalloc.h +#XMK_FILE= Makefile.man + +########################################################################### +include $(SRCROOT)/$(RULESDIR)/rules.aux +########################################################################### + diff -Nru cdrtools-2.01.01a33/include/schily/deflts.h cdrtools-3.02a09/include/schily/deflts.h --- cdrtools-2.01.01a33/include/schily/deflts.h 2006-10-10 08:24:14.000000000 +0000 +++ cdrtools-3.02a09/include/schily/deflts.h 2011-11-24 20:54:47.000000000 +0000 @@ -1,8 +1,8 @@ -/* @(#)deflts.h 1.8 06/10/10 Copyright 1997 J. Schilling */ +/* @(#)deflts.h 1.9 11/11/24 Copyright 1997-2011 J. Schilling */ /* * Definitions for reading program defaults. * - * Copyright (c) 1997 J. Schilling + * Copyright (c) 1997-2011 J. Schilling */ /* * The contents of this file are subject to the terms of the @@ -57,7 +57,8 @@ extern int defltopen __PR((const char *name)); extern int defltclose __PR((void)); -extern void defltfirst __PR((void)); +extern int defltsect __PR((const char *name)); +extern int defltfirst __PR((void)); extern char *defltread __PR((const char *name)); extern char *defltnext __PR((const char *name)); extern int defltcntl __PR((int cmd, int flags)); diff -Nru cdrtools-2.01.01a33/include/schily/deflts.mk cdrtools-3.02a09/include/schily/deflts.mk --- cdrtools-2.01.01a33/include/schily/deflts.mk 2006-12-17 21:52:11.000000000 +0000 +++ cdrtools-3.02a09/include/schily/deflts.mk 2006-12-17 21:52:11.000000000 +0000 @@ -1,4 +1,4 @@ -#ident %W% %E% %Q% +#ident @(#)deflts.mk 1.1 06/12/17 ########################################################################### # Sample makefile for installing non-localized auxiliary files ########################################################################### diff -Nru cdrtools-2.01.01a33/include/schily/device.h cdrtools-3.02a09/include/schily/device.h --- cdrtools-2.01.01a33/include/schily/device.h 2007-01-16 14:19:12.000000000 +0000 +++ cdrtools-3.02a09/include/schily/device.h 2017-10-07 11:53:33.000000000 +0000 @@ -1,8 +1,8 @@ -/* @(#)device.h 1.18 07/01/16 Copyright 1995-2007 J. Schilling */ +/* @(#)device.h 1.20 17/10/07 Copyright 1995-2017 J. Schilling */ /* * Generic header for users of major(), minor() and makedev() * - * Copyright (c) 1995-2007 J. Schilling + * Copyright (c) 1995-2017 J. Schilling */ /* * The contents of this file are subject to the terms of the @@ -11,6 +11,8 @@ * with the License. * * See the file CDDL.Schily.txt in this distribution for details. + * A copy of the CDDL is also available via the Internet at + * http://www.opensource.org/licenses/cddl1.txt * * When distributing Covered Code, include this CDDL HEADER in each * file and include the License file CDDL.Schily.txt from this distribution. @@ -36,6 +38,9 @@ #ifndef _SCHILY_TYPES_H #include #endif +#ifndef _SCHILY_STDINT_H +#include +#endif /* * Some systems define major in . @@ -83,6 +88,15 @@ # endif #endif +#ifndef _FOUND_MAJOR_ +# ifdef VMS +# define major(dev) (((((long)dev) >> 8) & 0xFF)) +# define minor(dev) ((((long)dev) & 0xFF)) +# define makedev(majo, mino) (((majo) << 8) | (mino)) +# define _FOUND_MAJOR_ +# endif /* VMS */ +#endif /* _FOUND_MAJOR_ */ + #ifdef __cplusplus extern "C" { #endif @@ -107,7 +121,7 @@ * The following defines are currently only needed for 'star'. * We make it conditional code to avoid to pollute the namespace. */ -#define XDEV_T unsigned long +#define XDEV_T Ullong extern int minorbits; extern XDEV_T minormask; @@ -122,7 +136,7 @@ #define dev_make(majo, mino) ((((XDEV_T)(majo)) << minorbits) | \ ((XDEV_T)(mino))) -#define _dev_make(mbits, majo, mino) ((((XDEV_T)(majo)) << (mbits) | \ +#define _dev_make(mbits, majo, mino) ((((XDEV_T)(majo)) << (mbits)) | \ ((XDEV_T)(mino))) extern void dev_init __PR((BOOL debug)); diff -Nru cdrtools-2.01.01a33/include/schily/device.mk cdrtools-3.02a09/include/schily/device.mk --- cdrtools-2.01.01a33/include/schily/device.mk 2006-12-17 21:52:11.000000000 +0000 +++ cdrtools-3.02a09/include/schily/device.mk 2006-12-17 21:52:11.000000000 +0000 @@ -1,4 +1,4 @@ -#ident %W% %E% %Q% +#ident @(#)device.mk 1.1 06/12/17 ########################################################################### # Sample makefile for installing non-localized auxiliary files ########################################################################### diff -Nru cdrtools-2.01.01a33/include/schily/dirent.h cdrtools-3.02a09/include/schily/dirent.h --- cdrtools-2.01.01a33/include/schily/dirent.h 2007-05-16 10:49:21.000000000 +0000 +++ cdrtools-3.02a09/include/schily/dirent.h 2011-08-04 18:28:19.000000000 +0000 @@ -1,6 +1,6 @@ -/* @(#)dirent.h 1.25 07/05/16 Copyright 1987, 1998, 2000-2007 J. Schilling */ +/* @(#)dirent.h 1.29 11/08/04 Copyright 1987, 1998, 2000-2011 J. Schilling */ /* - * Copyright (c) 1987, 1998, 2000-2007 J. Schilling + * Copyright (c) 1987, 1998, 2000-2011 J. Schilling */ /* * The contents of this file are subject to the terms of the @@ -56,15 +56,15 @@ # ifndef _SCHILY_STAT_H # include # endif -# ifdef HAVE_LIMITS_H -# ifndef _INCL_LIMITS_H -# include -# define _INCL_LIMITS_H -# endif +# ifndef _SCHILY_LIMITS_H +# include # endif # ifndef _SCHILY_PARAM_H # include # endif +# ifndef _SCHILY_STDLIB_H +# include /* MSVC: get _MAX_DIR */ +# endif # ifdef HAVE_DIRENT_H /* This a POSIX compliant system */ # ifndef _INCL_DIRENT_H @@ -107,28 +107,53 @@ /* * Don't use defaults here to allow recognition of problems. */ -# ifdef MAXNAMELEN +# if !defined(FOUND_DIRSIZE) && defined(MAXNAMELEN) # define DIRSIZE MAXNAMELEN /* From sys/param.h */ # define FOUND_DIRSIZE -# else -# ifdef MAXNAMLEN +# endif + +# if !defined(FOUND_DIRSIZE) && defined(MAXNAMLEN) # define DIRSIZE MAXNAMLEN /* From dirent.h */ # define FOUND_DIRSIZE -# else -# ifdef DIRSIZ +# endif + +# ifdef __never__ + /* + * DIRSIZ(dp) is a parameterized macro, we cannot use it here. + */ +# if !defined(FOUND_DIRSIZE) && defined(DIRSIZ) # define DIRSIZE DIRSIZ /* From sys/dir.h */ # define FOUND_DIRSIZE # endif +# endif /* __never__ */ + +# if !defined(FOUND_DIRSIZE) && defined(NAME_MAX) +# define DIRSIZE NAME_MAX /* From limits.h */ +# define FOUND_DIRSIZE # endif -# endif + # else /* !_FOUND_DIR_ */ +# if !defined(FOUND_DIRSIZE) && defined(_MAX_DIR) +# if defined(__MINGW32__) || defined(_MSC_VER) +# define DIRSIZE _MAX_DIR /* From stdlib.h */ +# define FOUND_DIRSIZE +# define NEED_READDIR +# undef dirent +# define dirent _direct +# undef DIR_NAMELEN +# define DIR_NAMELEN(dirent) strlen((dirent)->d_name) +# endif +# endif + +# ifndef NEED_READDIR # define NEED_DIRENT # define NEED_READDIR # undef dirent # define dirent _direct # undef DIR_NAMELEN # define DIR_NAMELEN(dirent) strlen((dirent)->d_name) +# endif /* !NEED_READDIR */ # endif /* _FOUND_DIR_ */ @@ -151,14 +176,17 @@ #ifdef NEED_READDIR -#ifndef _INCL_STDIO_H -#include -#define _INCL_STDIO_H +#ifndef _SCHILY_STDIO_H +#include +#endif +#if defined(__MINGW32__) || defined(_MSC_VER) +#ifndef _SCHILY_IO_H +#include /* for _findfirst() */ +#endif +#ifndef _SCHILY_UTYPES_H +#include +#endif #endif - - typedef struct __dirdesc { - FILE *dd_fd; - } DIR; struct _direct { unsigned long d_ino; @@ -168,9 +196,21 @@ }; #define HAVE_DIRENT_D_INO -extern DIR *opendir(); -extern closedir(); -extern struct dirent *readdir(); + typedef struct __dirdesc { + FILE *dd_fd; + +#if defined(__MINGW32__) || defined(_MSC_VER) + struct _direct dd_dir; /* dirent for this dir */ + struct _finddata_t dd_data; /* _findnext() results */ + intptr_t dd_handle; /* _findnext() handle */ + int dd_state; /* Current Dir state */ + char dd_dirname[1]; /* Dir to open */ +#endif + } DIR; + +extern DIR *opendir __PR((const char *)); +extern int closedir __PR((DIR *)); +extern struct dirent *readdir __PR((DIR *)); #endif /* NEED_READDIR */ diff -Nru cdrtools-2.01.01a33/include/schily/dirent.mk cdrtools-3.02a09/include/schily/dirent.mk --- cdrtools-2.01.01a33/include/schily/dirent.mk 2006-12-17 21:52:11.000000000 +0000 +++ cdrtools-3.02a09/include/schily/dirent.mk 2006-12-17 21:52:11.000000000 +0000 @@ -1,4 +1,4 @@ -#ident %W% %E% %Q% +#ident @(#)dirent.mk 1.1 06/12/17 ########################################################################### # Sample makefile for installing non-localized auxiliary files ########################################################################### diff -Nru cdrtools-2.01.01a33/include/schily/dlfcn.h cdrtools-3.02a09/include/schily/dlfcn.h --- cdrtools-2.01.01a33/include/schily/dlfcn.h 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/include/schily/dlfcn.h 2015-07-13 18:30:52.000000000 +0000 @@ -0,0 +1,110 @@ +/* @(#)dlfcn.h 1.4 15/07/13 Copyright 2015 J. Schilling */ +/* + * Abstraction from dlfcn.h + * + * Copyright (c) 2015 J. Schilling + */ +/* + * The contents of this file are subject to the terms of the + * Common Development and Distribution License, Version 1.0 only + * (the "License"). You may not use this file except in compliance + * with the License. + * + * See the file CDDL.Schily.txt in this distribution for details. + * A copy of the CDDL is also available via the Internet at + * http://www.opensource.org/licenses/cddl1.txt + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file CDDL.Schily.txt from this distribution. + */ + +#ifndef _SCHILY_DLFCN_H +#define _SCHILY_DLFCN_H + +#ifndef _SCHILY_MCONFIG_H +#include +#endif + +#ifdef HAVE_DLFCN_H +#ifndef _INCL_DLFCN_H +#include /* POSIX */ +#define _INCL_DLFCN_H +#define FOUND_DLFCN_H +#endif +#endif + +#ifdef HAVE_DL_H +#ifndef FOUND_DLFCN_H +#ifndef _INCL_DL_H +#include /* HP-UX */ +#define _INCL_DL_H +#define FOUND_DLFCN_H +#endif +#endif +#endif + +#if defined(HAVE_DLOPEN) && defined(HAVE_DLCLOSE) /* POSIX */ +#define HAVE_LOADABLE_LIBS +#endif + +#if !defined(HAVE_LOADABLE_LIBS) && defined(HAVE_SHL_LOAD) /* HP-UX */ +#define HAVE_LOADABLE_LIBS +#endif + +#if !defined(HAVE_LOADABLE_LIBS) && defined(HAVE_LOADLIBRARY) /* Win-DOS */ +#define HAVE_LOADABLE_LIBS +#endif + +/* + * dlopen() modes + */ +#ifndef RTLD_LAZY /* The only mode in SunOS-4.0 */ +#define RTLD_LAZY 0x00001 +#define RTLD_NOW 0x00002 +#define RTLD_GLOBAL 0x00100 +#define RTLD_LOCAL 0x00000 +#endif + +#ifdef __never_ +/* + * dlsym() speudo handles + * These handles are not valid on SunOS-4.0 + */ +#ifndef RTLD_NEXT +#define RTLD_NEXT (void *)-1 +#define RTLD_DEFAULT (void *)-2 +#define RTLD_SELF (void *)-3 +#endif +#endif + +/* + * dlsym() speudo handle for SunOS-4.0 + */ +#if defined(HAVE_DLSYM) && !defined(RTLD_SELF) +#define RTLD_SELF (void *)0 +#endif + +#ifdef __cplusplus +extern "C" { +#endif + +#ifndef HAVE_DLOPEN +extern void *dlopen __PR((const char *__pathname, int mode)); +#endif +#ifndef HAVE_DLCLOSE +extern int dlclose __PR((void *__handle)); +#endif +#ifndef HAVE_DLSYM +extern void *dlsym __PR((void *__handle, const char *name)); +#endif +#ifndef HAVE_DLERROR +extern const char *dlerror __PR((void)); +#endif + +#ifdef __cplusplus +} +#endif + + + +#endif /* _SCHILY_DLFCN_H */ diff -Nru cdrtools-2.01.01a33/include/schily/dlfcn.mk cdrtools-3.02a09/include/schily/dlfcn.mk --- cdrtools-2.01.01a33/include/schily/dlfcn.mk 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/include/schily/dlfcn.mk 2009-05-01 13:59:17.000000000 +0000 @@ -0,0 +1,17 @@ +#ident "@(#)dlfcn.mk 1.1 09/05/01 " +########################################################################### +# Sample makefile for installing non-localized auxiliary files +########################################################################### +SRCROOT= ../.. +RULESDIR= RULES +include $(SRCROOT)/$(RULESDIR)/rules.top +########################################################################### + +INSDIR= include/schily +TARGET= dlfcn.h +#XMK_FILE= Makefile.man + +########################################################################### +include $(SRCROOT)/$(RULESDIR)/rules.aux +########################################################################### + diff -Nru cdrtools-2.01.01a33/include/schily/err_arch.h cdrtools-3.02a09/include/schily/err_arch.h --- cdrtools-2.01.01a33/include/schily/err_arch.h 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/include/schily/err_arch.h 2012-12-03 22:49:13.000000000 +0000 @@ -0,0 +1,24 @@ +/* @(#)err_arch.h 1.1 12/12/03 Copyright 2012 J. Schilling */ +/* + * #error include for unconfigured architecture + * + * Copyright (c) 2012 J. Schilling + */ +/* + * The contents of this file are subject to the terms of the + * Common Development and Distribution License, Version 1.0 only + * (the "License"). You may not use this file except in compliance + * with the License. + * + * See the file CDDL.Schily.txt in this distribution for details. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file CDDL.Schily.txt from this distribution. + */ + +#ifndef _SCHILY_ERR_ARCH_H +#define _SCHILY_ERR_ARCH_H + +#error unconfigured architecture + +#endif /* _SCHILY_ERR_ARCH_H */ diff -Nru cdrtools-2.01.01a33/include/schily/err_arch.mk cdrtools-3.02a09/include/schily/err_arch.mk --- cdrtools-2.01.01a33/include/schily/err_arch.mk 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/include/schily/err_arch.mk 2012-12-03 22:49:13.000000000 +0000 @@ -0,0 +1,17 @@ +#ident "@(#)err_arch.mk 1.1 12/12/03 " +########################################################################### +# Sample makefile for installing non-localized auxiliary files +########################################################################### +SRCROOT= ../.. +RULESDIR= RULES +include $(SRCROOT)/$(RULESDIR)/rules.top +########################################################################### + +INSDIR= include/schily +TARGET= err_arch.h +#XMK_FILE= Makefile.man + +########################################################################### +include $(SRCROOT)/$(RULESDIR)/rules.aux +########################################################################### + diff -Nru cdrtools-2.01.01a33/include/schily/err_bit.h cdrtools-3.02a09/include/schily/err_bit.h --- cdrtools-2.01.01a33/include/schily/err_bit.h 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/include/schily/err_bit.h 2012-12-03 22:49:13.000000000 +0000 @@ -0,0 +1,24 @@ +/* @(#)err_bit.h 1.1 12/12/03 Copyright 2012 J. Schilling */ +/* + * #error include for _BIT_FIELDS_LTOH / _BIT_FIELDS_HTOL + * + * Copyright (c) 2012 J. Schilling + */ +/* + * The contents of this file are subject to the terms of the + * Common Development and Distribution License, Version 1.0 only + * (the "License"). You may not use this file except in compliance + * with the License. + * + * See the file CDDL.Schily.txt in this distribution for details. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file CDDL.Schily.txt from this distribution. + */ + +#ifndef _SCHILY_ERR_BIT_H +#define _SCHILY_ERR_BIT_H + +#error Only one of _BIT_FIELDS_LTOH or _BIT_FIELDS_HTOL may be defined + +#endif /* _SCHILY_ERR_BIT_H */ diff -Nru cdrtools-2.01.01a33/include/schily/err_bit.mk cdrtools-3.02a09/include/schily/err_bit.mk --- cdrtools-2.01.01a33/include/schily/err_bit.mk 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/include/schily/err_bit.mk 2012-12-03 22:49:13.000000000 +0000 @@ -0,0 +1,17 @@ +#ident "@(#)err_bit.mk 1.1 12/12/03 " +########################################################################### +# Sample makefile for installing non-localized auxiliary files +########################################################################### +SRCROOT= ../.. +RULESDIR= RULES +include $(SRCROOT)/$(RULESDIR)/rules.top +########################################################################### + +INSDIR= include/schily +TARGET= err_bit.h +#XMK_FILE= Makefile.man + +########################################################################### +include $(SRCROOT)/$(RULESDIR)/rules.aux +########################################################################### + diff -Nru cdrtools-2.01.01a33/include/schily/err_char.h cdrtools-3.02a09/include/schily/err_char.h --- cdrtools-2.01.01a33/include/schily/err_char.h 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/include/schily/err_char.h 2012-12-03 22:49:13.000000000 +0000 @@ -0,0 +1,24 @@ +/* @(#)err_char.h 1.1 12/12/03 Copyright 2012 J. Schilling */ +/* + * #error include for sizeof (char) error + * + * Copyright (c) 2012 J. Schilling + */ +/* + * The contents of this file are subject to the terms of the + * Common Development and Distribution License, Version 1.0 only + * (the "License"). You may not use this file except in compliance + * with the License. + * + * See the file CDDL.Schily.txt in this distribution for details. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file CDDL.Schily.txt from this distribution. + */ + +#ifndef _SCHILY_ERR_CHAR_H +#define _SCHILY_ERR_CHAR_H + +#error Sizeof char is not equal 1 + +#endif /* _SCHILY_ERR_CHAR_H */ diff -Nru cdrtools-2.01.01a33/include/schily/err_char.mk cdrtools-3.02a09/include/schily/err_char.mk --- cdrtools-2.01.01a33/include/schily/err_char.mk 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/include/schily/err_char.mk 2012-12-03 22:49:13.000000000 +0000 @@ -0,0 +1,17 @@ +#ident "@(#)err_char.mk 1.1 12/12/03 " +########################################################################### +# Sample makefile for installing non-localized auxiliary files +########################################################################### +SRCROOT= ../.. +RULESDIR= RULES +include $(SRCROOT)/$(RULESDIR)/rules.top +########################################################################### + +INSDIR= include/schily +TARGET= err_char.h +#XMK_FILE= Makefile.man + +########################################################################### +include $(SRCROOT)/$(RULESDIR)/rules.aux +########################################################################### + diff -Nru cdrtools-2.01.01a33/include/schily/errno.h cdrtools-3.02a09/include/schily/errno.h --- cdrtools-2.01.01a33/include/schily/errno.h 2006-12-24 23:38:48.000000000 +0000 +++ cdrtools-3.02a09/include/schily/errno.h 2010-08-24 13:40:56.000000000 +0000 @@ -1,8 +1,8 @@ -/* @(#)errno.h 1.6 06/12/25 Copyright 2006 J. Schilling */ +/* @(#)errno.h 1.7 10/08/24 Copyright 2006-2010 J. Schilling */ /* * Error number related definitions * - * Copyright (c) 2006 J. Schilling + * Copyright (c) 2006-2010 J. Schilling */ /* * The contents of this file are subject to the terms of the @@ -46,9 +46,17 @@ extern int sys_nerr; #endif +#ifdef __cplusplus +extern "C" { +#endif + #ifndef seterrno extern int seterrno __PR((int)); #endif extern int geterrno __PR((void)); +#ifdef __cplusplus +} +#endif + #endif /* _SCHILY_ERRNO_H */ diff -Nru cdrtools-2.01.01a33/include/schily/errno.mk cdrtools-3.02a09/include/schily/errno.mk --- cdrtools-2.01.01a33/include/schily/errno.mk 2006-12-17 21:52:11.000000000 +0000 +++ cdrtools-3.02a09/include/schily/errno.mk 2006-12-17 21:52:11.000000000 +0000 @@ -1,4 +1,4 @@ -#ident %W% %E% %Q% +#ident @(#)errno.mk 1.1 06/12/17 ########################################################################### # Sample makefile for installing non-localized auxiliary files ########################################################################### diff -Nru cdrtools-2.01.01a33/include/schily/err_type.h cdrtools-3.02a09/include/schily/err_type.h --- cdrtools-2.01.01a33/include/schily/err_type.h 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/include/schily/err_type.h 2012-12-03 22:49:13.000000000 +0000 @@ -0,0 +1,26 @@ +/* @(#)err_type.h 1.1 12/12/03 Copyright 2012 J. Schilling */ +/* + * #error include for missing type + * + * Copyright (c) 2012 J. Schilling + */ +/* + * The contents of this file are subject to the terms of the + * Common Development and Distribution License, Version 1.0 only + * (the "License"). You may not use this file except in compliance + * with the License. + * + * See the file CDDL.Schily.txt in this distribution for details. + * A copy of the CDDL is also available via the Internet at + * http://www.opensource.org/licenses/cddl1.txt + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file CDDL.Schily.txt from this distribution. + */ + +#ifndef _SCHILY_ERR_TYPE_H +#define _SCHILY_ERR_TYPE_H + +#error Type is missing + +#endif /* _SCHILY_ERR_TYPE_H */ diff -Nru cdrtools-2.01.01a33/include/schily/err_type.mk cdrtools-3.02a09/include/schily/err_type.mk --- cdrtools-2.01.01a33/include/schily/err_type.mk 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/include/schily/err_type.mk 2013-10-23 09:20:49.000000000 +0000 @@ -0,0 +1,17 @@ +#ident "@(#)err_type.mk 1.1 12/12/03 " +########################################################################### +# Sample makefile for installing non-localized auxiliary files +########################################################################### +SRCROOT= ../.. +RULESDIR= RULES +include $(SRCROOT)/$(RULESDIR)/rules.top +########################################################################### + +INSDIR= include/schily +TARGET= err_type.h +#XMK_FILE= Makefile.man + +########################################################################### +include $(SRCROOT)/$(RULESDIR)/rules.aux +########################################################################### + diff -Nru cdrtools-2.01.01a33/include/schily/fcntl.h cdrtools-3.02a09/include/schily/fcntl.h --- cdrtools-2.01.01a33/include/schily/fcntl.h 2007-01-16 14:19:12.000000000 +0000 +++ cdrtools-3.02a09/include/schily/fcntl.h 2011-10-18 22:38:54.000000000 +0000 @@ -1,8 +1,8 @@ -/* @(#)fcntl.h 1.16 07/01/16 Copyright 1996-2007 J. Schilling */ +/* @(#)fcntl.h 1.19 11/10/19 Copyright 1996-2011 J. Schilling */ /* * Generic header for users of open(), creat() and chmod() * - * Copyright (c) 1996-2007 J. Schilling + * Copyright (c) 1996-2011 J. Schilling */ /* * The contents of this file are subject to the terms of the @@ -53,6 +53,10 @@ * * O_BINARY is defined here to allow all applications to compile on a non DOS * environment without repeating this definition. + * O_SEARCH, O_DIRECTORY and NOFOLLOW are defined here to allow to compile on + * older platforms. + * open(name, O_SEARCH) is like UNOS open(name, "") (open neither for read nor + * for write). This allows to call fstat() and to get an fd for openat(fd, ...) */ #ifndef O_RDONLY # define O_RDONLY 0 @@ -69,9 +73,62 @@ #ifndef O_NDELAY /* This is undefined on BeOS :-( */ # define O_NDELAY 0 #endif +#ifndef O_EXEC /* Open for exec only (non-directory) */ +# define O_EXEC O_RDONLY +#endif +#ifndef O_SEARCH /* Open for search only. */ +# define O_SEARCH O_RDONLY +#endif +#ifndef O_DIRECTORY /* Fail if not a directory */ +# define O_DIRECTORY 0 +#endif +#ifndef O_NOFOLLOW /* Fail if a symlink */ +# define O_NOFOLLOW 0 +#endif #ifndef O_ACCMODE -#define O_ACCMODE (O_RDONLY|O_WRONLY|O_RDWR) +#define O_ACCMODE (O_RDONLY|O_WRONLY|O_RDWR|O_EXEC|O_SEARCH) +#endif + +#ifdef O_NOATIME /* Allow #ifdef O_NOATIME */ +#define _O_NOATIME O_NOATIME +#else +#define _O_NOATIME 0 +#endif + +#ifndef FD_CLOEXEC +#define FD_CLOEXEC 1 /* close on exec flag */ +#endif + +/* + * The following definitions are used for emulating the *at() functions. + * We use higher numbers for our definitions, to allow to add emulations + * for missing functions without causing a clash with system definitions. + */ +#ifndef HAVE_OPENAT +#ifndef AT_FDCWD +#define AT_FDCWD 0xffd19553 /* *at() to working dir */ +#endif +#endif +#ifndef HAVE_FSTATAT +#ifndef AT_SYMLINK_NOFOLLOW +#define AT_SYMLINK_NOFOLLOW 0x10000 /* emulate lstat() */ +#endif +#endif +#ifndef HAVE_UNLINKAT +#ifndef AT_REMOVEDIR +#define AT_REMOVEDIR 0x20000 /* emulate rmdir() */ +#endif +#endif +#ifndef HAVE_FACCESSAT +#ifndef AT_EACCESS +#define AT_EACCESS 0x40000 /* EUID access() */ +#endif +#endif +#ifndef HAVE_LINKAT +#ifndef AT_SYMLINK_FOLLOW +#define AT_SYMLINK_FOLLOW 0x80000 /* follow symlinks before link() */ +#endif #endif #endif /* _SCHILY_FCNTL_H */ diff -Nru cdrtools-2.01.01a33/include/schily/fcntl.mk cdrtools-3.02a09/include/schily/fcntl.mk --- cdrtools-2.01.01a33/include/schily/fcntl.mk 2006-12-17 21:52:11.000000000 +0000 +++ cdrtools-3.02a09/include/schily/fcntl.mk 2006-12-17 21:52:11.000000000 +0000 @@ -1,4 +1,4 @@ -#ident %W% %E% %Q% +#ident @(#)fcntl.mk 1.1 06/12/17 ########################################################################### # Sample makefile for installing non-localized auxiliary files ########################################################################### diff -Nru cdrtools-2.01.01a33/include/schily/fetchdir.h cdrtools-3.02a09/include/schily/fetchdir.h --- cdrtools-2.01.01a33/include/schily/fetchdir.h 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/include/schily/fetchdir.h 2016-03-10 22:45:20.000000000 +0000 @@ -0,0 +1,60 @@ +/* @(#)fetchdir.h 1.8 16/03/10 Copyright 2002-2016 J. Schilling */ +/* + * Copyright (c) 2002-2016 J. Schilling + */ +/* + * The contents of this file are subject to the terms of the + * Common Development and Distribution License, Version 1.0 only + * (the "License"). You may not use this file except in compliance + * with the License. + * + * See the file CDDL.Schily.txt in this distribution for details. + * A copy of the CDDL is also available via the Internet at + * http://www.opensource.org/licenses/cddl1.txt + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file CDDL.Schily.txt from this distribution. + */ + +#ifndef _SCHILY_FETCHDIR_H +#define _SCHILY_FETCHDIR_H + +#ifndef _SCHILY_DIRENT_H +#include /* Includes mconfig.h if needed */ +#endif + +/* + * The original value used to fill the info byte before each name was ^A (1). + * We thus need to make this value the "unknown" type value and this finally + * results in the FDT_* values be 1 + the UNIX file type value. + */ +#define FDT_UNKN 1 +#define FDT_FIFO 2 +#define FDT_CHR 3 +#define FDT_DIR 5 +#define FDT_BLK 7 +#define FDT_REG 9 +#define FDT_LNK 11 +#define FDT_SOCK 13 +#define FDT_WHT 15 + +#ifdef __cplusplus +extern "C" { +#endif + +extern char *fetchdir __PR((char *dir, int *entp, int *lenp, + ino_t **inop)); +extern char *dfetchdir __PR((DIR *dir, char *__dirname, int *entp, + int *lenp, ino_t **inop)); +extern int fdircomp __PR((const void *p1, const void *p2)); +extern char **sortdir __PR((char *dir, int *entp)); +extern int cmpdir __PR((int ents1, int ents2, + char **ep1, char **ep2, + char **oa, char **od, + int *alenp, int *dlenp)); + +#ifdef __cplusplus +} +#endif + +#endif /* _SCHILY_FETCHDIR_H */ diff -Nru cdrtools-2.01.01a33/include/schily/fetchdir.mk cdrtools-3.02a09/include/schily/fetchdir.mk --- cdrtools-2.01.01a33/include/schily/fetchdir.mk 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/include/schily/fetchdir.mk 2008-04-06 11:03:24.000000000 +0000 @@ -0,0 +1,17 @@ +#ident @(#)fetchdir.mk 1.1 08/04/06 +########################################################################### +# Sample makefile for installing non-localized auxiliary files +########################################################################### +SRCROOT= ../.. +RULESDIR= RULES +include $(SRCROOT)/$(RULESDIR)/rules.top +########################################################################### + +INSDIR= include/schily +TARGET= fetchdir.h +#XMK_FILE= Makefile.man + +########################################################################### +include $(SRCROOT)/$(RULESDIR)/rules.aux +########################################################################### + diff -Nru cdrtools-2.01.01a33/include/schily/find.h cdrtools-3.02a09/include/schily/find.h --- cdrtools-2.01.01a33/include/schily/find.h 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/include/schily/find.h 2015-07-10 18:31:26.000000000 +0000 @@ -0,0 +1,119 @@ +/* @(#)find.h 1.24 15/07/10 Copyright 2005-2015 J. Schilling */ +/* + * Definitions for libfind users. + * + * Copyright (c) 2004-2015 J. Schilling + */ +/* + * The contents of this file are subject to the terms of the + * Common Development and Distribution License, Version 1.0 only + * (the "License"). You may not use this file except in compliance + * with the License. + * + * See the file CDDL.Schily.txt in this distribution for details. + * A copy of the CDDL is also available via the Internet at + * http://www.opensource.org/licenses/cddl1.txt + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file CDDL.Schily.txt from this distribution. + */ + +#ifndef _SCHILY_FIND_H +#define _SCHILY_FIND_H + +#ifndef _SCHILY_MCONFIG_H +#include +#endif + +#ifndef _SCHILY_STDIO_H +#include +#endif + +#ifndef _SCHILY_STANDARD_H +#include +#endif +#ifndef _SCHILY_STAT_H +#include +#endif + +#ifdef __cplusplus +extern "C" { +#endif + +typedef struct find_args { + int Argc; /* A copy of argc */ + char **Argv; /* A copy of argv */ + FILE *std[3]; /* To redirect stdin/stdout/err */ + int primtype; /* The type of the last primary */ + BOOL found_action; /* -print/-ls/-exec found */ + int patlen; /* strlen() for longest pattern */ + int walkflags; /* Walkflags modifed by parser */ + int maxdepth; /* -mindepth arg */ + int mindepth; /* -maxdepth arg */ + struct plusargs *plusp; /* List of -exec {} + commands */ + void *jmp; /* Used internally by parser */ + int error; /* Error code from find_parse() */ +} finda_t; + +/* + * finda_t->primtype is set to ENDARGS by find_parse() if a complete expression + * could be parsed. + */ +#define FIND_ENDARGS 1000 /* Found End of Arg Vector */ +#define FIND_ERRARG 1001 /* Parser abort by -help or error */ + +/* + * Flags used for struct WALK->pflags: + */ +#define PF_ACL 0x00001 /* Check ACL from struct WALK->pflags */ +#define PF_HAS_ACL 0x10000 /* This file has ACL */ +#define PF_XATTR 0x00002 /* Check XATTR from struct WALK->pflags */ +#define PF_HAS_XATTR 0x20000 /* This file has XATTR */ + +#ifndef FIND_NODE +#define findn_t void +#endif + +#ifndef __sqfun_t_defined +typedef int (*sqfun_t) __PR((void *arg)); +#define __sqfun_t_defined +#endif + +#ifndef __squit_t_defined + +typedef struct { + sqfun_t quitfun; /* Function to query for shell signal quit */ + void *qfarg; /* Generic arg for shell builtin quit fun */ +} squit_t; + +#define __squit_t_defined +#endif + + +extern void find_argsinit __PR((finda_t *fap)); +extern void find_timeinit __PR((time_t __now)); +extern findn_t *find_printnode __PR((void)); +extern findn_t *find_addprint __PR((findn_t *np, finda_t *fap)); +extern void find_free __PR((findn_t *t, finda_t *fap)); +extern int find_token __PR((char *__word)); +extern char *find_tname __PR((int op)); +extern findn_t *find_parse __PR((finda_t *fap)); +extern void find_firstprim __PR((int *pac, char *const **pav)); + +extern BOOL find_primary __PR((findn_t *t, int op)); +extern BOOL find_pname __PR((findn_t *t, char *__word)); +extern BOOL find_hasprint __PR((findn_t *t)); +extern BOOL find_hasexec __PR((findn_t *t)); +extern BOOL find_expr __PR((char *f, char *ff, struct stat *fs, + struct WALK *state, findn_t *t)); + +extern int find_plusflush __PR((void *p, struct WALK *state)); +extern void find_usage __PR((FILE *f)); +extern int find_main __PR((int ac, char **av, char **ev, + FILE *std[3], squit_t *__quit)); + +#ifdef __cplusplus +} +#endif + +#endif /* _SCHILY_FIND_H */ diff -Nru cdrtools-2.01.01a33/include/schily/find.mk cdrtools-3.02a09/include/schily/find.mk --- cdrtools-2.01.01a33/include/schily/find.mk 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/include/schily/find.mk 2008-04-06 12:07:50.000000000 +0000 @@ -0,0 +1,17 @@ +#ident @(#)find.mk 1.1 08/04/06 +########################################################################### +# Sample makefile for installing non-localized auxiliary files +########################################################################### +SRCROOT= ../.. +RULESDIR= RULES +include $(SRCROOT)/$(RULESDIR)/rules.top +########################################################################### + +INSDIR= include/schily +TARGET= find.h +#XMK_FILE= Makefile.man + +########################################################################### +include $(SRCROOT)/$(RULESDIR)/rules.aux +########################################################################### + diff -Nru cdrtools-2.01.01a33/include/schily/float.h cdrtools-3.02a09/include/schily/float.h --- cdrtools-2.01.01a33/include/schily/float.h 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/include/schily/float.h 2009-08-07 22:18:33.000000000 +0000 @@ -0,0 +1,56 @@ +/* @(#)float.h 1.1 09/08/08 Copyright 2009 J. Schilling */ +/* + * Abstraction code for float.h + * + * Copyright (c) 2009 J. Schilling + */ +/* + * The contents of this file are subject to the terms of the + * Common Development and Distribution License, Version 1.0 only + * (the "License"). You may not use this file except in compliance + * with the License. + * + * See the file CDDL.Schily.txt in this distribution for details. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file CDDL.Schily.txt from this distribution. + */ + +#ifndef _SCHILY_FLOAT_H +#define _SCHILY_FLOAT_H + +#ifndef _SCHILY_MCONFIG_H +#include +#endif + +#ifdef HAVE_FLOAT_H +#ifndef _INCL_FLOAT_H +#define _INCL_FLOAT_H +#include +#endif +#endif + +#ifdef HAVE_VALUES_H +#ifndef _INCL_VALUES_H +#define _INCL_VALUES_H +#include +#endif + +#ifndef FLT_MAX +#define FLT_MAX MAXFLOAT +#endif +#ifndef FLT_MIN +#define FLT_MIN MINFLOAT +#endif +#ifndef DBL_MAX +#define DBL_MAX MAXDOUBLE +#endif +#ifndef DBL_MIN +#define DBL_MIN MINDOUBLE +#endif + +#endif + + + +#endif /* _SCHILY_FLOAT_H */ diff -Nru cdrtools-2.01.01a33/include/schily/float.mk cdrtools-3.02a09/include/schily/float.mk --- cdrtools-2.01.01a33/include/schily/float.mk 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/include/schily/float.mk 2009-08-07 22:18:33.000000000 +0000 @@ -0,0 +1,17 @@ +#ident "@(#)float.mk 1.1 09/08/08 " +########################################################################### +# Sample makefile for installing non-localized auxiliary files +########################################################################### +SRCROOT= ../.. +RULESDIR= RULES +include $(SRCROOT)/$(RULESDIR)/rules.top +########################################################################### + +INSDIR= include/schily +TARGET= float.h +#XMK_FILE= Makefile.man + +########################################################################### +include $(SRCROOT)/$(RULESDIR)/rules.aux +########################################################################### + diff -Nru cdrtools-2.01.01a33/include/schily/fnmatch.h cdrtools-3.02a09/include/schily/fnmatch.h --- cdrtools-2.01.01a33/include/schily/fnmatch.h 2006-10-10 08:24:15.000000000 +0000 +++ cdrtools-3.02a09/include/schily/fnmatch.h 2010-10-09 21:45:00.000000000 +0000 @@ -1,4 +1,4 @@ -/* @(#)fnmatch.h 8.6 06/10/10 2006 J. Schilling from 8.1 (Berkeley) */ +/* @(#)fnmatch.h 8.13 10/10/09 Copyright 2006-2010 J. Schilling from 8.1 (Berkeley) */ #ifndef _SCHILY_FNMATCH_H #define _SCHILY_FNMATCH_H @@ -6,9 +6,23 @@ #ifndef _SCHILY_MCONFIG_H #include #endif -#ifdef HAVE_FNMATCH + +#ifdef HAVE_FNMATCH_H #include -#else +#else /* !HAVE_FNMATCH_H */ + +#ifdef __cplusplus +extern "C" { +#endif + +extern int fnmatch __PR((const char *, const char *, int)); + +#ifdef __cplusplus +} +#endif + +#endif /* !HAVE_FNMATCH */ + /* * Copyright (c) 1992, 1993 * The Regents of the University of California. All rights reserved. @@ -37,16 +51,53 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * @(#)fnmatch.h 8.6 (Berkeley) 10/10/06 + * @(#)fnmatch.h 8.13 (Berkeley) 10/09/10 */ +#ifdef __cplusplus +extern "C" { +#endif + +#ifndef FNM_NOMATCH #define FNM_NOMATCH 1 /* Match failed. */ +#endif +#ifndef FNM_ERROR +#define FNM_ERROR 2 /* An error occured */ +#endif +#ifndef FNM_NOSYS +#define FNM_NOSYS 3 /* Function (XPG4) not supported */ +#endif +#ifndef FNM_NOESCAPE #define FNM_NOESCAPE 0x01 /* Disable backslash escaping. */ +#endif +#ifndef FNM_PATHNAME #define FNM_PATHNAME 0x02 /* Slash must be matched by slash. */ +#endif +#ifndef FNM_PERIOD #define FNM_PERIOD 0x04 /* Period must be matched by period. */ +#endif +#if !defined(FNM_IGNORECASE) && !defined(FNM_CASEFOLD) +#define FNM_IGNORECASE 0x10 /* Ignore case when making comparisons */ +#endif +#if !defined(FNM_IGNORECASE) && defined(FNM_CASEFOLD) +#define FNM_IGNORECASE FNM_CASEFOLD +#endif +#ifndef FNM_CASEFOLD +#define FNM_CASEFOLD FNM_IGNORECASE +#endif +#ifndef FNM_LEADING_DIR +#define FNM_LEADING_DIR 0x20 /* Ignore / after Imatch. */ +#endif -int fnmatch __PR((const char *, const char *, int)); +extern int js_fnmatch __PR((const char *, const char *, int)); + +#if !defined(HAVE_FNMATCH_IGNORECASE) +#define fnmatch js_fnmatch +#endif + +#ifdef __cplusplus +} +#endif -#endif /* !HAVE_FNMATCH */ #endif /* !_SCHILY_FNMATCH_H */ diff -Nru cdrtools-2.01.01a33/include/schily/fnmatch.mk cdrtools-3.02a09/include/schily/fnmatch.mk --- cdrtools-2.01.01a33/include/schily/fnmatch.mk 2006-12-17 21:52:11.000000000 +0000 +++ cdrtools-3.02a09/include/schily/fnmatch.mk 2006-12-17 21:52:11.000000000 +0000 @@ -1,4 +1,4 @@ -#ident %W% %E% %Q% +#ident @(#)fnmatch.mk 1.1 06/12/17 ########################################################################### # Sample makefile for installing non-localized auxiliary files ########################################################################### diff -Nru cdrtools-2.01.01a33/include/schily/fstream.h cdrtools-3.02a09/include/schily/fstream.h --- cdrtools-2.01.01a33/include/schily/fstream.h 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/include/schily/fstream.h 2014-04-14 18:51:03.000000000 +0000 @@ -0,0 +1,98 @@ +/* @(#)fstream.h 1.17 14/04/14 Copyright 1985-2014 J. Schilling */ +/* + * Definitions for the file stream package + * + * Copyright (c) 1985-2014 J. Schilling + */ +/* + * The contents of this file are subject to the terms of the + * Common Development and Distribution License, Version 1.0 only + * (the "License"). You may not use this file except in compliance + * with the License. + * + * See the file CDDL.Schily.txt in this distribution for details. + * A copy of the CDDL is also available via the Internet at + * http://www.opensource.org/licenses/cddl1.txt + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file CDDL.Schily.txt from this distribution. + */ + +#ifndef _SCHILY_FSTREAM_H +#define _SCHILY_FSTREAM_H + +#ifndef _SCHILY_MCONFIG_H +#include +#endif + +#ifdef __cplusplus +extern "C" { +#endif + +#define STR_SBUF_SIZE 127 /* Size of "static" stream buffer */ + +#ifdef WSTRINGS +typedef short CHAR; +#else +typedef char CHAR; +#endif + +/* + * The stream filter structure. + * + * If the filter function (*fstr_func)() is a NULL pointer, then fstr_file is + * a FILE * object and input is read from that FILE * by calling the read + * function (*fstr_rfunc)(). + * + * If the filter function (*fstr_func)() is not a NULL pointer, then fstr_file + * is a stream * object and input is read from that stream object by calling + * the filter function (*fstr_func)(). + * + * The two callback functions have the following tasks: + * + * (*fstr_func)(ostream, istream) filters from istream to ostream + * (*fstr_rfunc)(istream) reads a new input from is->fstr_file + * + * As long as fstr_bp points to a non-null character, this character is + * returned. If the local buffer is empty, the functions are checked: + * + * If (*fstr_func)() is not a NULL pointer, then it is a filter function + * that is called whenever fstr_buf is empty. + * + * If (*fstr_func)() is a NULL pointer and (*fstr_rfunc)() is not a NULL pointer + * then (*fstr_rfunc)() is called to fill the buffer and to return the first + * charcter from the buffer. + */ +typedef struct fstream fstream; + +struct fstream { + FILE *fstr_file; /* The input FILE * or input fstream * */ + int fstr_flags; /* Flags available for the caller */ + /* End of the public part of the structure */ + fstream *fstr_pushed; /* Chain of pushed strcutures */ + CHAR *fstr_bp; /* The current pointer to coocked input */ + CHAR *fstr_buf; /* The current buffer for coocked input */ + int (*fstr_func) __PR((struct fstream *__out, FILE *__in)); + int (*fstr_rfunc) __PR((struct fstream *__in)); + CHAR fstr_sbuf[STR_SBUF_SIZE + 1]; +}; + +typedef int (*fstr_fun) __PR((struct fstream *, FILE *)); +typedef int (*fstr_efun) __PR((char *)); +typedef int (*fstr_rfun) __PR((struct fstream *)); + +extern fstream *mkfstream __PR((FILE *f, fstr_fun, fstr_rfun, fstr_efun)); +extern fstream *fspush __PR((fstream *fsp, fstr_efun efun)); +extern fstream *fspop __PR((fstream *fsp)); +extern fstream *fspushed __PR((fstream *fsp)); +extern void fsclose __PR((fstream *fsp)); +extern FILE *fssetfile __PR((fstream *fsp, FILE *f)); +extern int fsgetc __PR((fstream *fsp)); +extern void fspushstr __PR((fstream *fsp, char *ss)); +extern void fspushcha __PR((fstream *fsp, int c)); + +#ifdef __cplusplus +} +#endif + +#endif /* _SCHILY_FSTREAM_H */ diff -Nru cdrtools-2.01.01a33/include/schily/fstream.mk cdrtools-3.02a09/include/schily/fstream.mk --- cdrtools-2.01.01a33/include/schily/fstream.mk 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/include/schily/fstream.mk 2008-01-02 11:28:57.000000000 +0000 @@ -0,0 +1,17 @@ +#ident @(#)fstream.mk 1.1 08/01/02 +########################################################################### +# Sample makefile for installing non-localized auxiliary files +########################################################################### +SRCROOT= ../.. +RULESDIR= RULES +include $(SRCROOT)/$(RULESDIR)/rules.top +########################################################################### + +INSDIR= include/schily +TARGET= fstream.h +#XMK_FILE= Makefile.man + +########################################################################### +include $(SRCROOT)/$(RULESDIR)/rules.aux +########################################################################### + diff -Nru cdrtools-2.01.01a33/include/schily/getargs.h cdrtools-3.02a09/include/schily/getargs.h --- cdrtools-2.01.01a33/include/schily/getargs.h 2007-07-01 22:32:54.000000000 +0000 +++ cdrtools-3.02a09/include/schily/getargs.h 2017-09-19 15:13:43.000000000 +0000 @@ -1,8 +1,8 @@ -/* @(#)getargs.h 1.18 07/07/02 Copyright 1985-2007 J. Schilling */ +/* @(#)getargs.h 1.23 17/09/19 Copyright 1985-2017 J. Schilling */ /* * Definitions for getargs()/getallargs()/getfiles() * - * Copyright (c) 1985-2007 J. Schilling + * Copyright (c) 1985-2017 J. Schilling */ /* * The contents of this file are subject to the terms of the @@ -11,6 +11,8 @@ * with the License. * * See the file CDDL.Schily.txt in this distribution for details. + * A copy of the CDDL is also available via the Internet at + * http://www.opensource.org/licenses/cddl1.txt * * When distributing Covered Code, include this CDDL HEADER in each * file and include the License file CDDL.Schily.txt from this distribution. @@ -50,31 +52,58 @@ * Flag and file arg processing should be terminated after getting a return * code <= 0. */ -#define FLAGDELIM 2 /* "--" stopped flag processing */ -#define NOTAFLAG 1 /* Not a flag type argument */ -#define NOARGS 0 /* No more args */ -#define BADFLAG (-1) /* Not a valid flag argument */ -#define BADFMT (-2) /* Error in format string */ -#define NOTAFILE (-3) /* Seems to be a flag type */ +#define FLAGDELIM 2 /* "--" stopped flag processing */ +#define NOTAFLAG 1 /* Not a flag type argument */ +#define NOARGS 0 /* No more args */ +#define BADFLAG (-1) /* Not a valid flag argument */ +#define BADFMT (-2) /* Error in format string */ +#define NOTAFILE (-3) /* Seems to be a flag type */ + +/* + * The callback functions are called with the following parameters: + * + * arg The option argument + * valp A pointer to the related value argument from a get*arg*() call + * pac A pointer to the current argument counter + * pav A pointer to the current argument vector + * opt The option that caused the call + * + * The return value of the callback function may be: + * + * FLAGDELIM Pretend "--" stopped flag processing + * FLAGPARSED A valid flag was found, getallargs() will continue scanning + * ------------ the following codes will interrupt getallargs() processing: + * NOARGS Pretend all arguments have been examined + * BADFLAG Not a valid flag argument + * BADFMT General Error + * NOTAFILE Continue to check the format string for matches with option arg + */ +#define FLAGPARSED 1 /* Flag was sucessfully parsed */ typedef int (*getargfun) __PR((const char *__arg, void *__valp)); -typedef int (*getpargfun) __PR((const char *__arg, void *__valp, int *__pac, char *const **__pav, const char *__opt)); +typedef int (*getpargfun) __PR((const char *__arg, void *__valp, + int *__pac, char *const **__pav, + const char *__opt)); #define NO_ARGFUN (getargpfun)0 struct ga_flags { - const char *ga_format; - void *ga_arg; - getpargfun ga_funcp; + const char *ga_format; /* Comma separated list for one flag */ + void *ga_arg; /* Ptr. to variable to fill for flag */ + getpargfun ga_funcp; /* Ptr. for function to call (&/~) */ }; struct ga_props { - UInt32_t ga_flags; - UInt32_t ga_oflags; - size_t ga_size; + UInt32_t ga_flags; /* Flags to define behavior */ + UInt32_t ga_oflags; /* State flags */ + size_t ga_size; /* Size of this struct gs_props */ }; -#define GA_NO_PROPS (struct ga_props *)0 +/* + * This may be used instead of a struct ga_props * parameter: + */ +#define GA_NO_PROPS (struct ga_props *)0 /* Default behavior */ +#define GA_POSIX_PROPS (struct ga_props *)-1 /* POSIX behavior */ /* * Definitions for ga_flags @@ -85,15 +114,23 @@ #define GAF_NEED_DASH 0x04 /* Need dash before (-name=val), */ /* name=val is not allowed */ #define GAF_DELIM_DASHDASH 0x08 /* "--" stops even get?allargs() */ +#define GAF_SINGLEARG 0x10 /* Last singlechar opt may have arg */ +#define GAF_POSIX 0x1000 /* Will be expanded as shown below */ /* * POSIX does not allow options in the form "+option", "-option=value" or - * "option=value". + * "option=value". get*files() needs to know what may be a valid option. + * + * If ga_flags == GAF_POSIX, ga_flags is replaced with the value + * of the current definition for GAF_POSIX_DEFAULT. * * GAF_NO_PLUS do not allow options to start with a '+' * GAF_NO_EQUAL do not allow options to contain '=' between name & val + * + * Warning: future versions may need different flags for POSIX, better use the + * GA_POSIX_PROPS "struct" or the GAF_POSIX flag. */ -#define GAF_POSIX_DEFAULT (GAF_NO_PLUS | GAF_NO_EQUAL) +#define GAF_POSIX_DEFAULT (GAF_NO_PLUS | GAF_NO_EQUAL | GAF_SINGLEARG) /* * Keep in sync with schily.h @@ -107,9 +144,12 @@ * The new list versions of the functions need struct ga_props and thus need * getargs.h */ -extern int getlallargs __PR((int *, char * const**, struct ga_props *, const char *, ...)); -extern int getlargs __PR((int *, char * const**, struct ga_props *, const char *, ...)); -extern int getlfiles __PR((int *, char * const**, struct ga_props *, const char *)); +extern int getlallargs __PR((int *, char * const**, struct ga_props *, + const char *, ...)); +extern int getlargs __PR((int *, char * const**, struct ga_props *, + const char *, ...)); +extern int getlfiles __PR((int *, char * const**, struct ga_props *, + const char *)); extern int _getarginit __PR((struct ga_props *, size_t, UInt32_t)); #define getarginit(p, f) _getarginit(p, sizeof (struct ga_props), f) @@ -118,9 +158,12 @@ * The vector versions of the functions need struct ga_flags and thus need * getargs.h */ -extern int getvallargs __PR((int *, char * const**, struct ga_flags *, struct ga_props *)); -extern int getvargs __PR((int *, char * const**, struct ga_flags *, struct ga_props *)); -extern int getvfiles __PR((int *, char * const**, struct ga_flags *, struct ga_props *)); +extern int getvallargs __PR((int *, char * const**, struct ga_props *, + struct ga_flags *)); +extern int getvargs __PR((int *, char * const**, struct ga_props *, + struct ga_flags *)); +extern int getvfiles __PR((int *, char * const**, struct ga_props *, + struct ga_flags *)); #ifdef __cplusplus } diff -Nru cdrtools-2.01.01a33/include/schily/getargs.mk cdrtools-3.02a09/include/schily/getargs.mk --- cdrtools-2.01.01a33/include/schily/getargs.mk 2006-12-17 21:52:11.000000000 +0000 +++ cdrtools-3.02a09/include/schily/getargs.mk 2006-12-17 21:52:11.000000000 +0000 @@ -1,4 +1,4 @@ -#ident %W% %E% %Q% +#ident @(#)getargs.mk 1.1 06/12/17 ########################################################################### # Sample makefile for installing non-localized auxiliary files ########################################################################### diff -Nru cdrtools-2.01.01a33/include/schily/getcwd.h cdrtools-3.02a09/include/schily/getcwd.h --- cdrtools-2.01.01a33/include/schily/getcwd.h 2006-09-13 01:27:00.000000000 +0000 +++ cdrtools-3.02a09/include/schily/getcwd.h 2010-08-24 13:40:56.000000000 +0000 @@ -1,8 +1,8 @@ -/* @(#)getcwd.h 1.4 06/09/13 Copyright 1998 J. Schilling */ +/* @(#)getcwd.h 1.6 10/08/24 Copyright 1998-2010 J. Schilling */ /* * Definitions for getcwd() * - * Copyright (c) 1998 J. Schilling + * Copyright (c) 1998-2010 J. Schilling */ /* * The contents of this file are subject to the terms of the @@ -22,12 +22,22 @@ #ifndef _SCHILY_MCONFIG_H #include #endif +#ifndef _SCHILY_UNISTD_H +#include +#endif #ifdef JOS # ifndef _INCL_SYS_STYPES_H # include # define _INCL_SYS_STYPES_H # endif +#endif + +#ifdef __cplusplus +extern "C" { +#endif + +#ifdef JOS extern char *gwd(); # define getcwd(b, len) gwd(b) #else @@ -36,4 +46,8 @@ # endif #endif +#ifdef __cplusplus +} +#endif + #endif /* _SCHILY_GETCWD_H */ diff -Nru cdrtools-2.01.01a33/include/schily/getcwd.mk cdrtools-3.02a09/include/schily/getcwd.mk --- cdrtools-2.01.01a33/include/schily/getcwd.mk 2006-12-17 21:52:11.000000000 +0000 +++ cdrtools-3.02a09/include/schily/getcwd.mk 2006-12-17 21:52:11.000000000 +0000 @@ -1,4 +1,4 @@ -#ident %W% %E% %Q% +#ident @(#)getcwd.mk 1.1 06/12/17 ########################################################################### # Sample makefile for installing non-localized auxiliary files ########################################################################### diff -Nru cdrtools-2.01.01a33/include/schily/grp.h cdrtools-3.02a09/include/schily/grp.h --- cdrtools-2.01.01a33/include/schily/grp.h 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/include/schily/grp.h 2009-07-10 19:34:11.000000000 +0000 @@ -0,0 +1,53 @@ +/* @(#)grp.h 1.1 09/07/10 Copyright 2009 J. Schilling */ +/* + * Group abstraction + * + * Copyright (c) 2009 J. Schilling + */ +/* + * The contents of this file are subject to the terms of the + * Common Development and Distribution License, Version 1.0 only + * (the "License"). You may not use this file except in compliance + * with the License. + * + * See the file CDDL.Schily.txt in this distribution for details. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file CDDL.Schily.txt from this distribution. + */ + +#ifndef _SCHILY_GRP_H +#define _SCHILY_GRP_H + +#ifndef _SCHILY_MCONFIG_H +#include +#endif +#ifndef _SCHILY_TYPES_H +#include +#endif + +#ifdef HAVE_GRP_H +#ifndef _INCL_GRP_H +#include +#define _INCL_GRP_H +#endif +#else + +#ifdef __cplusplus +extern "C" { +#endif + +struct group { + char *gr_name; + char *gr_passwd; + gid_t gr_gid; + char **gr_mem; +}; + +#ifdef __cplusplus +} +#endif + +#endif /* ! HAVE_GRP_H */ + +#endif /* _SCHILY_GRP_H */ diff -Nru cdrtools-2.01.01a33/include/schily/grp.mk cdrtools-3.02a09/include/schily/grp.mk --- cdrtools-2.01.01a33/include/schily/grp.mk 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/include/schily/grp.mk 2009-07-10 19:34:11.000000000 +0000 @@ -0,0 +1,17 @@ +#ident "@(#)grp.mk 1.1 09/07/10 " +########################################################################### +# Sample makefile for installing non-localized auxiliary files +########################################################################### +SRCROOT= ../.. +RULESDIR= RULES +include $(SRCROOT)/$(RULESDIR)/rules.top +########################################################################### + +INSDIR= include/schily +TARGET= grp.h +#XMK_FILE= Makefile.man + +########################################################################### +include $(SRCROOT)/$(RULESDIR)/rules.aux +########################################################################### + diff -Nru cdrtools-2.01.01a33/include/schily/hostname.h cdrtools-3.02a09/include/schily/hostname.h --- cdrtools-2.01.01a33/include/schily/hostname.h 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/include/schily/hostname.h 2014-01-01 17:55:21.000000000 +0000 @@ -0,0 +1,105 @@ +/* @(#)hostname.h 1.22 14/01/01 Copyright 1995-2014 J. Schilling */ +/* + * This file has been separated from libport.h in order to avoid + * to include netdb.h in case gethostname() is not needed. + * + * Copyright (c) 1995-2014 J. Schilling + */ +/* + * The contents of this file are subject to the terms of the + * Common Development and Distribution License, Version 1.0 only + * (the "License"). You may not use this file except in compliance + * with the License. + * + * See the file CDDL.Schily.txt in this distribution for details. + * A copy of the CDDL is also available via the Internet at + * http://www.opensource.org/licenses/cddl1.txt + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file CDDL.Schily.txt from this distribution. + */ + + +#ifndef _SCHILY_HOSTNAME_H +#define _SCHILY_HOSTNAME_H + +#ifndef _SCHILY_MCONFIG_H +#include +#endif +#ifndef _SCHILY_TYPES_H +#include +#endif + +/* + * Try to get HOST_NAME_MAX for gethostname() from unistd.h or limits.h + */ +#ifndef _SCHILY_UNISTD_H +#include +#endif +#ifndef _SCHILY_LIMITS_H +#include +#endif + +#ifndef HOST_NAME_MAX +#if defined(HAVE_NETDB_H) && !defined(HOST_NOT_FOUND) && \ + !defined(_INCL_NETDB_H) +#ifndef _SCHILY_NETDB_H +#include /* #defines MAXHOSTNAMELEN */ +#endif +#endif +#ifdef MAXHOSTNAMELEN +#define HOST_NAME_MAX MAXHOSTNAMELEN +#endif +#endif + +#ifndef HOST_NAME_MAX +#ifndef _SCHILY_PARAM_H +#include /* Include various defs needed with some OS */ +#endif /* Linux MAXHOSTNAMELEN */ +#ifdef MAXHOSTNAMELEN +#define HOST_NAME_MAX MAXHOSTNAMELEN +#endif +#endif + +#ifndef HOST_NAME_MAX +#define HOST_NAME_MAX 255 +#endif +#ifndef MAXHOSTNAMELEN +#define MAXHOSTNAMELEN HOST_NAME_MAX +#endif + +#ifdef __cplusplus +extern "C" { +#endif + +/* + * The gethostname() prototype from Win-DOS are in the wrong include files + * (winsock*.h instead of unistd.h) and they are in conflict with the standard. + * Because the prototype is in the wrong file and the function is not in libc, + * configure will believe gethostname() is missing. + * We cannot define our own correct prototype, but this is not a problem as the + * return type is int. + */ +#if !defined(__MINGW32__) +#ifndef HAVE_GETHOSTNAME +extern int gethostname __PR((char *name, int namelen)); +#endif +#endif +#ifndef HAVE_GETDOMAINNAME +extern int getdomainname __PR((char *name, int namelen)); +#endif + +#ifdef __SUNOS4 +/* + * Define prototypes for POSIX standard functions that are missing on SunOS-4.x + * to make compilation smooth. + */ +extern int gethostname __PR((char *name, int namelen)); +extern int getdomainname __PR((char *name, int namelen)); +#endif /* __SUNOS4 */ + +#ifdef __cplusplus +} +#endif + +#endif /* _SCHILY_HOSTNAME_H */ diff -Nru cdrtools-2.01.01a33/include/schily/hostname.mk cdrtools-3.02a09/include/schily/hostname.mk --- cdrtools-2.01.01a33/include/schily/hostname.mk 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/include/schily/hostname.mk 2008-12-20 15:28:27.000000000 +0000 @@ -0,0 +1,17 @@ +#ident @(#)hostname.mk 1.1 08/12/20 +########################################################################### +# Sample makefile for installing non-localized auxiliary files +########################################################################### +SRCROOT= ../.. +RULESDIR= RULES +include $(SRCROOT)/$(RULESDIR)/rules.top +########################################################################### + +INSDIR= include/schily +TARGET= hostname.h +#XMK_FILE= Makefile.man + +########################################################################### +include $(SRCROOT)/$(RULESDIR)/rules.aux +########################################################################### + diff -Nru cdrtools-2.01.01a33/include/schily/iconv.h cdrtools-3.02a09/include/schily/iconv.h --- cdrtools-2.01.01a33/include/schily/iconv.h 2007-06-27 12:05:48.000000000 +0000 +++ cdrtools-3.02a09/include/schily/iconv.h 2008-01-02 17:09:16.000000000 +0000 @@ -1,4 +1,4 @@ -/* @(#)iconv.h 1.3 07/06/27 Copyright 2007 J. Schilling */ +/* @(#)iconv.h 1.4 08/01/02 Copyright 2007 J. Schilling */ /* * Abstraction from iconv.h * @@ -40,9 +40,15 @@ #if defined(HAVE_LIBICONV) && defined(HAVE_LIBICONV_OPEN) && \ defined(HAVE_LIBICONV_CLOSE) && \ defined(iconv) && defined(iconv_open) && defined(iconv_close) +# ifndef HAVE_ICONV # define HAVE_ICONV +# endif +# ifndef HAVE_ICONV_OPEN # define HAVE_ICONV_OPEN +# endif +# ifndef HAVE_ICONV_CLOSE # define HAVE_ICONV_CLOSE +# endif #endif #if !defined(HAVE_ICONV_OPEN) || !defined(HAVE_ICONV_CLOSE) diff -Nru cdrtools-2.01.01a33/include/schily/iconv.mk cdrtools-3.02a09/include/schily/iconv.mk --- cdrtools-2.01.01a33/include/schily/iconv.mk 2007-05-04 10:18:27.000000000 +0000 +++ cdrtools-3.02a09/include/schily/iconv.mk 2007-05-04 10:18:27.000000000 +0000 @@ -1,4 +1,4 @@ -#ident %W% %E% %Q% +#ident @(#)iconv.mk 1.1 07/05/04 ########################################################################### # Sample makefile for installing non-localized auxiliary files ########################################################################### diff -Nru cdrtools-2.01.01a33/include/schily/idcache.h cdrtools-3.02a09/include/schily/idcache.h --- cdrtools-2.01.01a33/include/schily/idcache.h 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/include/schily/idcache.h 2010-08-24 13:40:56.000000000 +0000 @@ -0,0 +1,43 @@ +/* @(#)idcache.h 1.3 10/08/24 Copyright 1993, 1995-2010 J. Schilling */ +/* + * Copyright (c) 1993, 1995-2010 J. Schilling + */ +/* + * The contents of this file are subject to the terms of the + * Common Development and Distribution License, Version 1.0 only + * (the "License"). You may not use this file except in compliance + * with the License. + * + * See the file CDDL.Schily.txt in this distribution for details. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file CDDL.Schily.txt from this distribution. + */ + +#ifndef _SCHILY_IDCACHE_H +#define _SCHILY_IDCACHE_H + +#ifndef _SCHILY_MCONFIG_H +#include +#endif + +#ifndef _SCHILY_TYPES_H +#include +#endif + +#ifdef __cplusplus +extern "C" { +#endif + +extern BOOL ic_nameuid __PR((char *name, int namelen, uid_t uid)); +extern BOOL ic_uidname __PR((char *name, int namelen, uid_t *uidp)); +extern BOOL ic_namegid __PR((char *name, int namelen, gid_t gid)); +extern BOOL ic_gidname __PR((char *name, int namelen, gid_t *gidp)); +extern uid_t ic_uid_nobody __PR((void)); +extern gid_t ic_gid_nobody __PR((void)); + +#ifdef __cplusplus +} +#endif + +#endif /* _SCHILY_IDCACHE_H */ diff -Nru cdrtools-2.01.01a33/include/schily/idcache.mk cdrtools-3.02a09/include/schily/idcache.mk --- cdrtools-2.01.01a33/include/schily/idcache.mk 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/include/schily/idcache.mk 2008-04-06 15:07:24.000000000 +0000 @@ -0,0 +1,17 @@ +#ident @(#)idcache.mk 1.1 08/04/06 +########################################################################### +# Sample makefile for installing non-localized auxiliary files +########################################################################### +SRCROOT= ../.. +RULESDIR= RULES +include $(SRCROOT)/$(RULESDIR)/rules.top +########################################################################### + +INSDIR= include/schily +TARGET= idcache.h +#XMK_FILE= Makefile.man + +########################################################################### +include $(SRCROOT)/$(RULESDIR)/rules.aux +########################################################################### + diff -Nru cdrtools-2.01.01a33/include/schily/inet.h cdrtools-3.02a09/include/schily/inet.h --- cdrtools-2.01.01a33/include/schily/inet.h 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/include/schily/inet.h 2013-07-08 19:53:03.000000000 +0000 @@ -0,0 +1,47 @@ +/* @(#)inet.h 1.3 13/07/08 Copyright 2009-2013 J. Schilling */ +/* + * Inet abstraction + * + * Copyright (c) 2009-2013 J. Schilling + */ +/* + * The contents of this file are subject to the terms of the + * Common Development and Distribution License, Version 1.0 only + * (the "License"). You may not use this file except in compliance + * with the License. + * + * See the file CDDL.Schily.txt in this distribution for details. + * A copy of the CDDL is also available via the Internet at + * http://www.opensource.org/licenses/cddl1.txt + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file CDDL.Schily.txt from this distribution. + */ + +#ifndef _SCHILY_INET_H +#define _SCHILY_INET_H + +#ifndef _SCHILY_MCONFIG_H +#include +#endif + +#ifdef HAVE_ARPA_INET_H +#ifndef _INCL_ARPA_INET_H +#include +#define _INCL_ARPA_INET_H +#endif +#else /* !HAVE_ARPA_INET_H */ + +/* + * BeOS does not have + * but inet_ntaoa() is in + */ +#ifdef HAVE_NETDB_H +#ifndef _SCHILY_NETDB_H +#include +#endif +#endif /* HAVE_NETDB_H */ + +#endif /* !HAVE_ARPA_INET_H */ + +#endif /* _SCHILY_INET_H */ diff -Nru cdrtools-2.01.01a33/include/schily/inet.mk cdrtools-3.02a09/include/schily/inet.mk --- cdrtools-2.01.01a33/include/schily/inet.mk 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/include/schily/inet.mk 2009-07-13 17:25:18.000000000 +0000 @@ -0,0 +1,17 @@ +#ident "@(#)inet.mk 1.1 09/07/13 " +########################################################################### +# Sample makefile for installing non-localized auxiliary files +########################################################################### +SRCROOT= ../.. +RULESDIR= RULES +include $(SRCROOT)/$(RULESDIR)/rules.top +########################################################################### + +INSDIR= include/schily +TARGET= inet.h +#XMK_FILE= Makefile.man + +########################################################################### +include $(SRCROOT)/$(RULESDIR)/rules.aux +########################################################################### + diff -Nru cdrtools-2.01.01a33/include/schily/in.h cdrtools-3.02a09/include/schily/in.h --- cdrtools-2.01.01a33/include/schily/in.h 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/include/schily/in.h 2009-07-13 18:04:37.000000000 +0000 @@ -0,0 +1,33 @@ +/* @(#)in.h 1.1 09/07/13 Copyright 2009 J. Schilling */ +/* + * In abstraction + * + * Copyright (c) 2009 J. Schilling + */ +/* + * The contents of this file are subject to the terms of the + * Common Development and Distribution License, Version 1.0 only + * (the "License"). You may not use this file except in compliance + * with the License. + * + * See the file CDDL.Schily.txt in this distribution for details. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file CDDL.Schily.txt from this distribution. + */ + +#ifndef _SCHILY_IN_H +#define _SCHILY_IN_H + +#ifndef _SCHILY_MCONFIG_H +#include +#endif + +#ifdef HAVE_NETINET_IN_H +#ifndef _INCL_NETINET_IN_H +#include +#define _INCL_NETINET_IN_H +#endif +#endif + +#endif /* _SCHILY_IN_H */ diff -Nru cdrtools-2.01.01a33/include/schily/in.mk cdrtools-3.02a09/include/schily/in.mk --- cdrtools-2.01.01a33/include/schily/in.mk 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/include/schily/in.mk 2009-07-13 17:25:18.000000000 +0000 @@ -0,0 +1,17 @@ +#ident "@(#)in.mk 1.1 09/07/13 " +########################################################################### +# Sample makefile for installing non-localized auxiliary files +########################################################################### +SRCROOT= ../.. +RULESDIR= RULES +include $(SRCROOT)/$(RULESDIR)/rules.top +########################################################################### + +INSDIR= include/schily +TARGET= in.h +#XMK_FILE= Makefile.man + +########################################################################### +include $(SRCROOT)/$(RULESDIR)/rules.aux +########################################################################### + diff -Nru cdrtools-2.01.01a33/include/schily/intcvt.h cdrtools-3.02a09/include/schily/intcvt.h --- cdrtools-2.01.01a33/include/schily/intcvt.h 2006-09-13 01:27:00.000000000 +0000 +++ cdrtools-3.02a09/include/schily/intcvt.h 2013-10-26 11:12:55.000000000 +0000 @@ -1,8 +1,8 @@ -/* @(#)intcvt.h 1.5 06/09/13 Copyright 1986-2003 J. Schilling */ +/* @(#)intcvt.h 1.8 13/10/26 Copyright 1986-2013 J. Schilling */ /* * Definitions for conversion to/from integer data types of various size. * - * Copyright (c) 1986-2003 J. Schilling + * Copyright (c) 1986-2013 J. Schilling */ /* * The contents of this file are subject to the terms of the @@ -11,6 +11,8 @@ * with the License. * * See the file CDDL.Schily.txt in this distribution for details. + * A copy of the CDDL is also available via the Internet at + * http://www.opensource.org/licenses/cddl1.txt * * When distributing Covered Code, include this CDDL HEADER in each * file and include the License file CDDL.Schily.txt from this distribution. @@ -22,6 +24,9 @@ #ifndef _SCHILY_MCONFIG_H #include #endif +#ifndef _SCHILY_UTYPES_H +#include +#endif #define i_to_2_byte(a, i) (((Uchar *)(a))[0] = ((i) >> 8) & 0xFF,\ ((Uchar *)(a))[1] = (i) & 0xFF) @@ -37,23 +42,23 @@ -#define a_to_byte(a) (((Int8_t *) a)[0]) +#define a_to_byte(a) (((Int8_t *)a)[0]) #define a_to_u_byte(a) ((UInt8_t) \ - (((Uchar *) a)[0] & 0xFF)) + (((Uchar *)a)[0] & 0xFF)) #define a_to_u_2_byte(a) ((UInt16_t) \ - ((((Uchar *) a)[1] & 0xFF) | \ - (((Uchar *) a)[0] << 8 & 0xFF00))) + ((((Uchar *)a)[1] & 0xFF) | \ + (((Uchar *)a)[0] << 8 & 0xFF00))) #define a_to_2_byte(a) (int)(Int16_t)a_to_u_2_byte(a) #define a_to_u_3_byte(a) ((Ulong) \ - ((((Uchar *) a)[2] & 0xFF) | \ - (((Uchar *) a)[1] << 8 & 0xFF00) | \ - (((Uchar *) a)[0] << 16 & 0xFF0000))) + ((((Uchar *)a)[2] & 0xFF) | \ + (((Uchar *)a)[1] << 8 & 0xFF00) | \ + (((Uchar *)a)[0] << 16 & 0xFF0000))) -#define a_to_3_byte(a) a_to_u_3_byte(a) /* XXX Is there a signed version ? */ +#define a_to_3_byte(a) a_to_u_3_byte(a) /* XXX signed version? */ #ifdef __STDC__ # define __TOP_4BYTE 0xFF000000UL @@ -62,10 +67,10 @@ #endif #define a_to_u_4_byte(a) ((Ulong) \ - ((((Uchar*) a)[3] & 0xFF) | \ - (((Uchar*) a)[2] << 8 & 0xFF00) | \ - (((Uchar*) a)[1] << 16 & 0xFF0000) | \ - (((Uchar*) a)[0] << 24 & __TOP_4BYTE))) + ((((Uchar*)a)[3] & 0xFF) | \ + (((Uchar*)a)[2] << 8 & 0xFF00) | \ + (((Uchar*)a)[1] << 16 & 0xFF0000) | \ + (((Uchar*)a)[0] << 24 & __TOP_4BYTE))) #define a_to_4_byte(a) (long)(Int32_t)a_to_u_4_byte(a) @@ -86,23 +91,23 @@ #define la_to_u_2_byte(a) ((UInt16_t) \ - ((((Uchar*) a)[0] & 0xFF) | \ - (((Uchar*) a)[1] << 8 & 0xFF00))) + ((((Uchar*)a)[0] & 0xFF) | \ + (((Uchar*)a)[1] << 8 & 0xFF00))) #define la_to_2_byte(a) (int)(Int16_t)la_to_u_2_byte(a) #define la_to_u_3_byte(a) ((Ulong) \ - ((((Uchar*) a)[0] & 0xFF) | \ - (((Uchar*) a)[1] << 8 & 0xFF00) | \ - (((Uchar*) a)[2] << 16 & 0xFF0000))) + ((((Uchar*)a)[0] & 0xFF) | \ + (((Uchar*)a)[1] << 8 & 0xFF00) | \ + (((Uchar*)a)[2] << 16 & 0xFF0000))) -#define la_to_3_byte(a) la_to_u_3_byte(a) /* XXX Is there a signed version ? */ +#define la_to_3_byte(a) la_to_u_3_byte(a) /* XXX signed version? */ #define la_to_u_4_byte(a) ((Ulong) \ - ((((Uchar*) a)[0] & 0xFF) | \ - (((Uchar*) a)[1] << 8 & 0xFF00) | \ - (((Uchar*) a)[2] << 16 & 0xFF0000) | \ - (((Uchar*) a)[3] << 24 & __TOP_4BYTE))) + ((((Uchar*)a)[0] & 0xFF) | \ + (((Uchar*)a)[1] << 8 & 0xFF00) | \ + (((Uchar*)a)[2] << 16 & 0xFF0000) | \ + (((Uchar*)a)[3] << 24 & __TOP_4BYTE))) #define la_to_4_byte(a) (long)(Int32_t)la_to_u_4_byte(a) diff -Nru cdrtools-2.01.01a33/include/schily/intcvt.mk cdrtools-3.02a09/include/schily/intcvt.mk --- cdrtools-2.01.01a33/include/schily/intcvt.mk 2006-12-17 21:52:11.000000000 +0000 +++ cdrtools-3.02a09/include/schily/intcvt.mk 2006-12-17 21:52:11.000000000 +0000 @@ -1,4 +1,4 @@ -#ident %W% %E% %Q% +#ident @(#)intcvt.mk 1.1 06/12/17 ########################################################################### # Sample makefile for installing non-localized auxiliary files ########################################################################### diff -Nru cdrtools-2.01.01a33/include/schily/inttypes.h cdrtools-3.02a09/include/schily/inttypes.h --- cdrtools-2.01.01a33/include/schily/inttypes.h 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/include/schily/inttypes.h 2012-01-22 15:09:36.000000000 +0000 @@ -0,0 +1,38 @@ +/* @(#)inttypes.h 1.35 12/01/22 Copyright 1997-2012 J. Schilling */ +/* + * Abstraction from inttypes.h + * + * Copyright (c) 1997-2012 J. Schilling + */ +/* + * The contents of this file are subject to the terms of the + * Common Development and Distribution License, Version 1.0 only + * (the "License"). You may not use this file except in compliance + * with the License. + * + * See the file CDDL.Schily.txt in this distribution for details. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file CDDL.Schily.txt from this distribution. + */ + +#ifndef _SCHILY_INTTYPES_H +#define _SCHILY_INTTYPES_H + +#ifndef _SCHILY_MCONFIG_H +#include +#endif + +/* + * inttypes.h is based on stdint.h + */ +#ifndef _SCHILY_STDINT_H +#include +#endif + +/* + * inttypes.h inaddition to stdint.h defines printf() format strings. + * As we have a portable printf() in libschily, we do not need these #defines. + */ + +#endif /* _SCHILY_INTTYPES_H */ diff -Nru cdrtools-2.01.01a33/include/schily/inttypes.mk cdrtools-3.02a09/include/schily/inttypes.mk --- cdrtools-2.01.01a33/include/schily/inttypes.mk 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/include/schily/inttypes.mk 2012-01-22 15:04:42.000000000 +0000 @@ -0,0 +1,17 @@ +#ident "@(#)inttypes.mk 1.1 12/01/22 " +########################################################################### +# Sample makefile for installing non-localized auxiliary files +########################################################################### +SRCROOT= ../.. +RULESDIR= RULES +include $(SRCROOT)/$(RULESDIR)/rules.top +########################################################################### + +INSDIR= include/schily +TARGET= inttypes.h +#XMK_FILE= Makefile.man + +########################################################################### +include $(SRCROOT)/$(RULESDIR)/rules.aux +########################################################################### + diff -Nru cdrtools-2.01.01a33/include/schily/ioctl.mk cdrtools-3.02a09/include/schily/ioctl.mk --- cdrtools-2.01.01a33/include/schily/ioctl.mk 2007-05-24 10:50:38.000000000 +0000 +++ cdrtools-3.02a09/include/schily/ioctl.mk 2007-05-24 10:50:38.000000000 +0000 @@ -1,4 +1,4 @@ -#ident %W% %E% %Q% +#ident @(#)ioctl.mk 1.1 07/05/24 ########################################################################### # Sample makefile for installing non-localized auxiliary files ########################################################################### diff -Nru cdrtools-2.01.01a33/include/schily/io.h cdrtools-3.02a09/include/schily/io.h --- cdrtools-2.01.01a33/include/schily/io.h 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/include/schily/io.h 2009-07-13 18:04:37.000000000 +0000 @@ -0,0 +1,46 @@ +/* @(#)io.h 1.1 09/07/13 Copyright 2009 J. Schilling */ +/* + * DOS io.h abstraction + * + * Copyright (c) 2009 J. Schilling + */ +/* + * The contents of this file are subject to the terms of the + * Common Development and Distribution License, Version 1.0 only + * (the "License"). You may not use this file except in compliance + * with the License. + * + * See the file CDDL.Schily.txt in this distribution for details. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file CDDL.Schily.txt from this distribution. + */ + +#ifndef _SCHILY_IO_H +#define _SCHILY_IO_H + +#ifndef _SCHILY_MCONFIG_H +#include +#endif +#ifndef _SCHILY_FCNTL_H +#include +#endif + +#ifndef NEED_O_BINARY +#if O_BINARY != 0 +#define NEED_O_BINARY +#endif +#endif + +#if defined(HAVE_IO_H) && defined(NEED_O_BINARY) +#ifndef _INCL_IO_H +#include +#define _INCL_IO_H +#endif +#else /* ! defined(HAVE_IO_H) && defined(NEED_O_BINARY) */ + +#define setmode(f, m) + +#endif + +#endif /* _SCHILY_IO_H */ diff -Nru cdrtools-2.01.01a33/include/schily/io.mk cdrtools-3.02a09/include/schily/io.mk --- cdrtools-2.01.01a33/include/schily/io.mk 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/include/schily/io.mk 2009-07-13 17:25:18.000000000 +0000 @@ -0,0 +1,17 @@ +#ident "@(#)io.mk 1.1 09/07/13 " +########################################################################### +# Sample makefile for installing non-localized auxiliary files +########################################################################### +SRCROOT= ../.. +RULESDIR= RULES +include $(SRCROOT)/$(RULESDIR)/rules.top +########################################################################### + +INSDIR= include/schily +TARGET= io.h +#XMK_FILE= Makefile.man + +########################################################################### +include $(SRCROOT)/$(RULESDIR)/rules.aux +########################################################################### + diff -Nru cdrtools-2.01.01a33/include/schily/ipc.h cdrtools-3.02a09/include/schily/ipc.h --- cdrtools-2.01.01a33/include/schily/ipc.h 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/include/schily/ipc.h 2009-08-07 23:14:43.000000000 +0000 @@ -0,0 +1,33 @@ +/* @(#)ipc.h 1.1 09/08/08 Copyright 2009 J. Schilling */ +/* + * Abstraction code for ipc.h + * + * Copyright (c) 2009 J. Schilling + */ +/* + * The contents of this file are subject to the terms of the + * Common Development and Distribution License, Version 1.0 only + * (the "License"). You may not use this file except in compliance + * with the License. + * + * See the file CDDL.Schily.txt in this distribution for details. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file CDDL.Schily.txt from this distribution. + */ + +#ifndef _SCHILY_IPC_H +#define _SCHILY_IPC_H + +#ifndef _SCHILY_MCONFIG_H +#include +#endif + +#ifdef HAVE_SYS_IPC_H +#ifndef _INCL_SYS_IPC_H +#define _INCL_SYS_IPC_H +#include +#endif +#endif + +#endif /* _SCHILY_IPC_H */ diff -Nru cdrtools-2.01.01a33/include/schily/ipc.mk cdrtools-3.02a09/include/schily/ipc.mk --- cdrtools-2.01.01a33/include/schily/ipc.mk 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/include/schily/ipc.mk 2009-08-07 23:14:43.000000000 +0000 @@ -0,0 +1,17 @@ +#ident "@(#)ipc.mk 1.1 09/08/08 " +########################################################################### +# Sample makefile for installing non-localized auxiliary files +########################################################################### +SRCROOT= ../.. +RULESDIR= RULES +include $(SRCROOT)/$(RULESDIR)/rules.top +########################################################################### + +INSDIR= include/schily +TARGET= ipc.h +#XMK_FILE= Makefile.man + +########################################################################### +include $(SRCROOT)/$(RULESDIR)/rules.aux +########################################################################### + diff -Nru cdrtools-2.01.01a33/include/schily/jmpdefs.h cdrtools-3.02a09/include/schily/jmpdefs.h --- cdrtools-2.01.01a33/include/schily/jmpdefs.h 2007-02-20 09:47:55.000000000 +0000 +++ cdrtools-3.02a09/include/schily/jmpdefs.h 2009-07-13 17:20:22.000000000 +0000 @@ -1,8 +1,8 @@ -/* @(#)jmpdefs.h 1.7 07/02/20 Copyright 1999 J. Schilling */ +/* @(#)jmpdefs.h 1.9 09/07/13 Copyright 1998-2009 J. Schilling */ /* * Definitions that help to handle a jmp_buf * - * Copyright (c) 1998 J. Schilling + * Copyright (c) 1998-2009 J. Schilling */ /* * The contents of this file are subject to the terms of the @@ -19,9 +19,12 @@ #ifndef _SCHILY_JMPDEFS_H #define _SCHILY_JMPDEFS_H -#ifndef _INCL_SETJMP_H -#define _INCL_SETJMP_H -#include +#ifndef _SCHILY_MCONFIG_H +#include +#endif + +#ifndef _SCHILY_SETJMP_H +#include #endif #ifdef __cplusplus diff -Nru cdrtools-2.01.01a33/include/schily/jmpdefs.mk cdrtools-3.02a09/include/schily/jmpdefs.mk --- cdrtools-2.01.01a33/include/schily/jmpdefs.mk 2006-12-17 21:52:11.000000000 +0000 +++ cdrtools-3.02a09/include/schily/jmpdefs.mk 2006-12-17 21:52:11.000000000 +0000 @@ -1,4 +1,4 @@ -#ident %W% %E% %Q% +#ident @(#)jmpdefs.mk 1.1 06/12/17 ########################################################################### # Sample makefile for installing non-localized auxiliary files ########################################################################### diff -Nru cdrtools-2.01.01a33/include/schily/libgen.h cdrtools-3.02a09/include/schily/libgen.h --- cdrtools-2.01.01a33/include/schily/libgen.h 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/include/schily/libgen.h 2010-05-07 17:11:41.000000000 +0000 @@ -0,0 +1,51 @@ +/* @(#)libgen.h 1.2 10/05/07 Copyright 2010 J. Schilling */ +/* + * Abstraction from libgen.h + * + * Copyright (c) 2010 J. Schilling + */ +/* + * The contents of this file are subject to the terms of the + * Common Development and Distribution License, Version 1.0 only + * (the "License"). You may not use this file except in compliance + * with the License. + * + * See the file CDDL.Schily.txt in this distribution for details. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file CDDL.Schily.txt from this distribution. + */ + +#ifndef _SCHILY_LIBGEN_H +#define _SCHILY_LIBGEN_H + +#ifndef _SCHILY_MCONFIG_H +#include +#endif + +#ifdef HAVE_LIBGEN_H +#ifndef _INCL_LIBGEN_H +#define _INCL_LIBGEN_H +#include +#endif +#endif + +#ifdef __cplusplus +extern "C" { +#endif + +/* + * See also libport.h + */ +#ifndef HAVE_BASENAME +extern char *basename __PR((char *name)); +#endif +#ifndef HAVE_DIRNAME +extern char *dirname __PR((char *name)); +#endif + +#ifdef __cplusplus +} +#endif + +#endif /* _SCHILY_LIBGEN_H */ diff -Nru cdrtools-2.01.01a33/include/schily/libgen.mk cdrtools-3.02a09/include/schily/libgen.mk --- cdrtools-2.01.01a33/include/schily/libgen.mk 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/include/schily/libgen.mk 2010-05-07 17:10:14.000000000 +0000 @@ -0,0 +1,17 @@ +#ident "@(#)libgen.mk 1.1 10/04/28 " +########################################################################### +# Sample makefile for installing non-localized auxiliary files +########################################################################### +SRCROOT= ../.. +RULESDIR= RULES +include $(SRCROOT)/$(RULESDIR)/rules.top +########################################################################### + +INSDIR= include/schily +TARGET= libgen.h +#XMK_FILE= Makefile.man + +########################################################################### +include $(SRCROOT)/$(RULESDIR)/rules.aux +########################################################################### + diff -Nru cdrtools-2.01.01a33/include/schily/libport.h cdrtools-3.02a09/include/schily/libport.h --- cdrtools-2.01.01a33/include/schily/libport.h 2007-01-16 14:19:12.000000000 +0000 +++ cdrtools-3.02a09/include/schily/libport.h 2017-05-01 22:39:57.000000000 +0000 @@ -1,6 +1,9 @@ -/* @(#)libport.h 1.14 07/01/16 Copyright 1995-2007 J. Schilling */ +/* @(#)libport.h 1.45 17/05/02 Copyright 1995-2017 J. Schilling */ /* - * Copyright (c) 1995-2007 J. Schilling + * Prototypes for POSIX standard functions that may be missing on the + * local platform and thus are implemented inside libschily. + * + * Copyright (c) 1995-2017 J. Schilling */ /* * The contents of this file are subject to the terms of the @@ -9,6 +12,8 @@ * with the License. * * See the file CDDL.Schily.txt in this distribution for details. + * A copy of the CDDL is also available via the Internet at + * http://www.opensource.org/licenses/cddl1.txt * * When distributing Covered Code, include this CDDL HEADER in each * file and include the License file CDDL.Schily.txt from this distribution. @@ -21,43 +26,25 @@ #ifndef _SCHILY_MCONFIG_H #include #endif -#ifndef _SCHILY_STANDARD_H -#include +#ifndef _SCHILY_TYPES_H +#include #endif -/* - * Try to get HOST_NAME_MAX for gethostname() - */ #ifndef _SCHILY_UNISTD_H #include #endif -#ifndef HOST_NAME_MAX -#if defined(HAVE_NETDB_H) && !defined(HOST_NOT_FOUND) && \ - !defined(_INCL_NETDB_H) -#include -#define _INCL_NETDB_H -#endif -#ifdef MAXHOSTNAMELEN -#define HOST_NAME_MAX MAXHOSTNAMELEN -#endif -#endif - -#ifndef HOST_NAME_MAX -#ifndef _SCHILY_PARAM_H -#include /* Include various defs needed with some OS */ -#endif /* Linux MAXHOSTNAMELEN */ -#ifdef MAXHOSTNAMELEN -#define HOST_NAME_MAX MAXHOSTNAMELEN -#endif +#ifdef __cplusplus +extern "C" { #endif -#ifndef HOST_NAME_MAX -#define HOST_NAME_MAX 255 +#if defined(_INCL_SYS_TYPES_H) || defined(_INCL_TYPES_H) || defined(size_t) +# ifndef FOUND_SIZE_T +# define FOUND_SIZE_T +# endif #endif - -#ifdef __cplusplus -extern "C" { +#if defined(_MSC_VER) && !defined(_SIZE_T_DEFINED) +# undef FOUND_SIZE_T #endif #ifdef OPENSERVER @@ -69,38 +56,358 @@ * Don't #undef HAVE_USLEEP in this file, SCO has a * usleep() prototype in unistd.h */ -/*#undef HAVE_USLEEP*/ +/* #undef HAVE_USLEEP */ #endif -#ifndef HAVE_GETHOSTID -extern long gethostid __PR((void)); +#ifdef FOUND_SIZE_T +/* + * We currently cannot define this here because there IRIX has a definition + * than violates the standard. + */ +#ifndef HAVE_SNPRINTF +/*PRINTFLIKE3*/ +extern int snprintf __PR((char *, size_t, const char *, ...)) + __printflike__(3, 4); +#endif +#endif + +#ifdef EOF /* stdio.h has been included */ +#ifdef FOUND_SIZE_T +#ifndef HAVE_GETDELIM +extern ssize_t getdelim __PR((char **, size_t *, int, FILE *)); #endif -#ifndef HAVE_GETHOSTNAME -extern int gethostname __PR((char *name, int namelen)); #endif -#ifndef HAVE_GETDOMAINNAME -extern int getdomainname __PR((char *name, int namelen)); +#endif + +#ifndef HAVE_GETHOSTID +extern long gethostid __PR((void)); #endif #ifndef HAVE_GETPAGESIZE -EXPORT int getpagesize __PR((void)); +extern int getpagesize __PR((void)); #endif #ifndef HAVE_USLEEP extern int usleep __PR((int usec)); #endif +#ifndef HAVE_STRCASECMP +extern int strcasecmp __PR((const char *, const char *)); +#endif +#ifdef FOUND_SIZE_T +#ifndef HAVE_STRNCASECMP +extern int strncasecmp __PR((const char *, const char *, + size_t)); +#endif +#endif + +#ifndef HAVE_STRCAT +extern char *strcat __PR((char *s1, const char *s2)); +#endif +#ifndef HAVE_STRCHR +extern char *strchr __PR((const char *s1, int c)); +#endif +#ifndef HAVE_STRCMP +extern int strcmp __PR((const char *s1, const char *s2)); +#endif +#ifndef HAVE_STRCPY +extern char *strcpy __PR((char *s1, const char *s2)); +#endif #if !defined(HAVE_STRDUP) || defined(__SVR4) extern char *strdup __PR((const char *s)); #endif -#ifndef HAVE_STRNCPY -extern char *strncpy __PR((char *s1, const char *s2, size_t len)); +#ifdef FOUND_SIZE_T +#ifndef HAVE_STRNDUP +extern char *strndup __PR((const char *s, size_t len)); +#endif +#ifndef HAVE_STRLEN +extern size_t strlen __PR((const char *s)); +#endif +#ifndef HAVE_STRNLEN +extern size_t strnlen __PR((const char *s, size_t len)); +#endif +#ifndef HAVE_STRLCAT +extern size_t strlcat __PR((char *s1, const char *s2, + size_t len)); #endif #ifndef HAVE_STRLCPY -extern size_t strlcpy __PR((char *s1, const char *s2, size_t len)); +extern size_t strlcpy __PR((char *s1, const char *s2, + size_t len)); +#endif +#ifndef HAVE_STRNCAT +extern char *strncat __PR((char *s1, const char *s2, + size_t len)); +#endif +#ifndef HAVE_STRNCMP +extern int strncmp __PR((const char *s1, const char *s2, + size_t len)); +#endif +#ifndef HAVE_STRNCPY +extern char *strncpy __PR((char *s1, const char *s2, + size_t len)); +#endif +#endif /* FOUND_SIZE_T */ +#ifndef HAVE_STRRCHR +extern char *strrchr __PR((const char *s1, int c)); +#endif + +#ifndef HAVE_STRSTR +extern char *strstr __PR((const char *s1, const char *s2)); +#endif + +#ifdef _SCHILY_WCHAR_H +#ifndef HAVE_WCSCAT +extern wchar_t *wcscat __PR((wchar_t *s1, const wchar_t *s2)); +#endif +#ifndef HAVE_WCSCHR +extern wchar_t *wcschr __PR((const wchar_t *s1, wchar_t c)); +#endif +#ifndef HAVE_WCSCMP +extern int wcscmp __PR((const wchar_t *s1, + const wchar_t *s2)); +#endif +#ifndef HAVE_WCSCPY +extern wchar_t *wcscpy __PR((wchar_t *s1, const wchar_t *s2)); +#endif +#ifndef HAVE_WCSDUP +extern wchar_t *wcsdup __PR((const wchar_t *s)); +#endif +#ifdef FOUND_SIZE_T +#ifndef HAVE_WCSNDUP +extern wchar_t *wcsndup __PR((const wchar_t *s, size_t len)); +#endif +#ifndef HAVE_WCSLEN +extern size_t wcslen __PR((const wchar_t *s)); +#endif +#ifndef HAVE_WCSNLEN +extern size_t wcsnlen __PR((const wchar_t *s, size_t len)); #endif +#ifndef HAVE_WCSLCAT +extern size_t wcslcat __PR((wchar_t *s1, const wchar_t *s2, + size_t len)); +#endif +#ifndef HAVE_WCSLCPY +extern size_t wcslcpy __PR((wchar_t *s1, const wchar_t *s2, + size_t len)); +#endif +#ifndef HAVE_WCSNCAT +extern wchar_t *wcsncat __PR((wchar_t *s1, const wchar_t *s2, + size_t len)); +#endif +#ifndef HAVE_WCSNCMP +extern int wcsncmp __PR((const wchar_t *s1, + const wchar_t *s2, + size_t len)); +#endif +#ifndef HAVE_WCSNCPY +extern wchar_t *wcsncpy __PR((wchar_t *s1, const wchar_t *s2, + size_t len)); +#endif +#endif /* FOUND_SIZE_T */ +#ifndef HAVE_WCSRCHR +extern wchar_t *wcsrchr __PR((const wchar_t *s1, wchar_t c)); +#endif + +#ifndef HAVE_WCSSTR +extern wchar_t *wcsstr __PR((const wchar_t *s1, + const wchar_t *s2)); +#endif +#endif /* _SCHILY_WCHAR_H */ #ifndef HAVE_RENAME -extern int rename __PR((const char *old, const char *new)); +extern int rename __PR((const char *__old, + const char *__new)); +#endif + +/* + * XXX Note: libgen.h / -lgen on Solaris contain eaccess() + */ +#ifndef HAVE_EACCESS +extern int eaccess __PR((const char *name, int mode)); +#endif + +/* + * See also libgen.h + */ +#ifndef HAVE_BASENAME +extern char *basename __PR((char *name)); #endif +#ifndef HAVE_DIRNAME +extern char *dirname __PR((char *name)); +#endif + +#ifndef HAVE_TIMEGM +#if defined(_SCHILY_TIME_H) +extern time_t timegm __PR((struct tm *)); +#endif +#endif + +#ifndef HAVE_GETUID +extern uid_t getuid __PR((void)); +#endif +#ifndef HAVE_GETEUID +extern uid_t geteuid __PR((void)); +#endif +#ifndef HAVE_SETUID +extern int setuid __PR((uid_t uid)); +#endif +#ifndef HAVE_SETEUID +extern int seteuid __PR((uid_t uid)); +#endif + +#ifndef HAVE_GETGID +extern gid_t getgid __PR((void)); +#endif +#ifndef HAVE_GETEGID +extern gid_t getegid __PR((void)); +#endif +#ifndef HAVE_SETGID +extern int setgid __PR((gid_t gid)); +#endif +#ifndef HAVE_SETEGID +extern int setegid __PR((gid_t gid)); +#endif + +#ifndef HAVE_GETPWNAM +extern struct passwd *getpwnam __PR((const char *name)); +#endif +#ifndef HAVE_GETPWENT +extern struct passwd *getpwent __PR((void)); +#endif +#ifndef HAVE_GETPWUID +extern struct passwd *getpwuid __PR((uid_t uid)); +#endif +#ifndef HAVE_SETPWENT +extern void setpwent __PR((void)); +#endif +#ifndef HAVE_ENDPWENT +extern void endpwent __PR((void)); +#endif + + +#ifndef HAVE_GETGRNAM +extern struct group *getgrnam __PR((const char *name)); +#endif +#ifndef HAVE_GETGRENT +extern struct group *getgrent __PR((void)); +#endif +#ifndef HAVE_GETGRGID +extern struct group *getgrgid __PR((gid_t gid)); +#endif +#ifndef HAVE_SETGRENT +extern void setgrent __PR((void)); +#endif +#ifndef HAVE_ENDGRENT +extern void endgrent __PR((void)); +#endif + +#ifndef HAVE_FCHDIR +extern int fchdir __PR((int fd)); +#endif +#ifndef HAVE_OPENAT +extern int openat __PR((int fd, const char *name, int oflag, ...)); +#endif + + +#ifndef HAVE_GETTIMEOFDAY +#ifdef _SCHILY_TIME_H +extern int gettimeofday __PR((struct timeval *__tp, void *__tzp)); +#endif +#endif + +#ifndef HAVE_FACCESSAT +extern int faccessat __PR((int fd, const char *name, + int amode, int flag)); +#endif +#ifndef HAVE_FCHMODAT +extern int fchmodat __PR((int fd, const char *name, + mode_t mode, int flag)); +#endif +#ifndef HAVE_LCHMOD +extern int lchmod __PR((const char *name, mode_t mode)); +#endif + +#ifndef HAVE_FCHOWNAT +extern int fchownat __PR((int fd, const char *name, + uid_t owner, gid_t group, int flag)); +#endif + +#ifndef HAVE_FDOPENDIR +#ifdef _SCHILY_DIRENT_H +extern DIR *fdopendir __PR((int fd)); +#endif +#endif + +#ifdef _SCHILY_STAT_H +#ifndef HAVE_FSTATAT +extern int fstatat __PR((int fd, const char *name, + struct stat *sbuf, int flag)); +#endif +#endif /* _SCHILY_STAT_H */ +#ifdef _SCHILY_TIME_H +#ifndef HAVE_FUTIMENS +extern int futimens __PR((int fd, + const struct timespec __times[2])); +#endif +#ifndef HAVE_FUTIMESAT +extern int futimesat __PR((int fd, const char *name, + const struct timeval __times[2])); +#endif +#ifndef HAVE_LUTIMENS +extern int lutimens __PR((const char *name, + const struct timespec __times[2])); +#endif +#endif /* _SCHILY_TIME_H */ +#ifndef HAVE_LINKAT +extern int linkat __PR((int fd1, const char *name1, + int fd2, const char *name2, int flag)); +#endif +#ifndef HAVE_MKDIRAT +extern int mkdirat __PR((int fd, const char *name, mode_t mode)); +#endif +#ifndef HAVE_MKFIFO +extern int mkfifo __PR((const char *name, mode_t mode)); +#endif +#ifndef HAVE_MKFIFOAT +extern int mkfifoat __PR((int fd, const char *name, mode_t mode)); +#endif +#ifndef HAVE_MKNODAT +extern int mknodat __PR((int fd, const char *name, + mode_t mode, dev_t dev)); +#endif +#ifndef HAVE_READLINKAT +extern ssize_t readlinkat __PR((int fd, const char *name, + char *lbuf, size_t lbufsize)); +#endif +#ifndef HAVE_RENAMEAT +extern int renameat __PR((int oldfd, const char *__old, + int newfd, const char *__new)); +#endif +#ifndef HAVE_SYMLINKAT +extern int symlinkat __PR((const char *content, + int fd, const char *name)); +#endif +#ifndef HAVE_UNLINKAT +extern int unlinkat __PR((int fd, const char *name, int flag)); +#endif +#ifdef _SCHILY_TIME_H +#ifndef HAVE_UTIMENS +extern int utimens __PR((const char *name, + const struct timespec __times[2])); +#endif +#ifndef HAVE_UTIMENSAT +extern int utimensat __PR((int fd, const char *name, + const struct timespec __times[2], + int flag)); +#endif +#endif /* _SCHILY_TIME_H */ + +#ifdef __SUNOS4 +/* + * Define prototypes for POSIX standard functions that are missing on SunOS-4.x + * to make compilation smooth. + */ +#include + +#endif /* __SUNOS4 */ #ifdef __cplusplus } diff -Nru cdrtools-2.01.01a33/include/schily/libport.mk cdrtools-3.02a09/include/schily/libport.mk --- cdrtools-2.01.01a33/include/schily/libport.mk 2006-12-17 21:52:11.000000000 +0000 +++ cdrtools-3.02a09/include/schily/libport.mk 2006-12-17 21:52:11.000000000 +0000 @@ -1,4 +1,4 @@ -#ident %W% %E% %Q% +#ident @(#)libport.mk 1.1 06/12/17 ########################################################################### # Sample makefile for installing non-localized auxiliary files ########################################################################### diff -Nru cdrtools-2.01.01a33/include/schily/librmt.h cdrtools-3.02a09/include/schily/librmt.h --- cdrtools-2.01.01a33/include/schily/librmt.h 2007-01-16 14:19:12.000000000 +0000 +++ cdrtools-3.02a09/include/schily/librmt.h 2010-08-27 10:55:21.000000000 +0000 @@ -1,8 +1,8 @@ -/* @(#)librmt.h 1.20 07/01/16 Copyright 1995,1996,2000-2007 J. Schilling */ +/* @(#)librmt.h 1.22 10/08/27 Copyright 1995,1996,2000-2010 J. Schilling */ /* * Prototypes for rmt client subroutines * - * Copyright (c) 1995,1996,2000-2007 J. Schilling + * Copyright (c) 1995,1996,2000-2010 J. Schilling */ /* * The contents of this file are subject to the terms of the @@ -28,28 +28,42 @@ #include +#ifdef __cplusplus +extern "C" { +#endif + /* * remote.c */ -extern void rmtinit __PR((int (*errmsgn)(int, const char *, ...), +extern void rmtinit __PR((int (*errmsgn) + (int, const char *, ...), void (*eexit)(int))); extern int rmtdebug __PR((int dlevel)); extern char *rmtfilename __PR((char *name)); -extern char *rmthostname __PR((char *hostname, int hnsize, char *rmtspec)); -extern int rmtgetconn __PR((char *host, int trsize, int excode)); +extern char *rmthostname __PR((char *hostname, int hnsize, + char *rmtspec)); +extern int rmtgetconn __PR((char *host, int trsize, + int excode)); extern int rmtopen __PR((int fd, char *fname, int fmode)); extern int rmtclose __PR((int fd)); extern int rmtread __PR((int fd, char *buf, int count)); extern int rmtwrite __PR((int fd, char *buf, int count)); -extern off_t rmtseek __PR((int fd, off_t offset, int whence)); +extern off_t rmtseek __PR((int fd, off_t offset, + int whence)); extern int rmtioctl __PR((int fd, int cmd, int count)); #ifdef MTWEOF extern int rmtstatus __PR((int fd, struct mtget *mtp)); #endif extern int rmtxstatus __PR((int fd, struct rmtget *mtp)); #ifdef MTWEOF -extern void _rmtg2mtg __PR((struct mtget *mtp, struct rmtget *rmtp)); -extern int _mtg2rmtg __PR((struct rmtget *rmtp, struct mtget *mtp)); +extern void _rmtg2mtg __PR((struct mtget *mtp, + struct rmtget *rmtp)); +extern int _mtg2rmtg __PR((struct rmtget *rmtp, + struct mtget *mtp)); +#endif + +#ifdef __cplusplus +} #endif #endif /* _SCHILY_LIBRMT_H */ diff -Nru cdrtools-2.01.01a33/include/schily/librmt.mk cdrtools-3.02a09/include/schily/librmt.mk --- cdrtools-2.01.01a33/include/schily/librmt.mk 2006-12-17 21:52:11.000000000 +0000 +++ cdrtools-3.02a09/include/schily/librmt.mk 2006-12-17 21:52:11.000000000 +0000 @@ -1,4 +1,4 @@ -#ident %W% %E% %Q% +#ident @(#)librmt.mk 1.1 06/12/17 ########################################################################### # Sample makefile for installing non-localized auxiliary files ########################################################################### diff -Nru cdrtools-2.01.01a33/include/schily/limits.h cdrtools-3.02a09/include/schily/limits.h --- cdrtools-2.01.01a33/include/schily/limits.h 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/include/schily/limits.h 2011-08-12 22:03:28.000000000 +0000 @@ -0,0 +1,54 @@ +/* @(#)limits.h 1.7 11/08/13 Copyright 2011 J. Schilling */ +/* + * Copyright (c) 2011 J. Schilling + */ +/* + * The contents of this file are subject to the terms of the + * Common Development and Distribution License, Version 1.0 only + * (the "License"). You may not use this file except in compliance + * with the License. + * + * See the file CDDL.Schily.txt in this distribution for details. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file CDDL.Schily.txt from this distribution. + */ + +#ifndef _SCHILY_LIMITS_H +#define _SCHILY_LIMITS_H + +#ifndef _SCHILY_MCONFIG_H +#include +#endif + +#ifdef HAVE_LIMITS_H +#ifndef _INCL_LIMITS_H +#include +#define _INCL_LIMITS_H +#endif +#endif + +#ifndef COLL_WEIGHTS_MAX +#define COLL_WEIGHTS_MAX 2 +#endif + +#ifndef _POSIX2_LINE_MAX +#define _POSIX2_LINE_MAX 2048 +#endif + +/* + * Include sys/param.h for PIPE_BUF + */ +#ifndef _SCHILY_PARAM_H +#include +#endif + +#ifndef PIPE_BUF +#if defined(__MINGW32__) || defined(_MSC_VER) +#define PIPE_BUF 5120 +#else +#define PIPE_BUF 512 +#endif +#endif /* PIPE_BUF */ + +#endif /* _SCHILY_LIMITS_H */ diff -Nru cdrtools-2.01.01a33/include/schily/limits.mk cdrtools-3.02a09/include/schily/limits.mk --- cdrtools-2.01.01a33/include/schily/limits.mk 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/include/schily/limits.mk 2009-05-24 10:57:22.000000000 +0000 @@ -0,0 +1,17 @@ +#ident "@(#)limits.mk 1.1 09/05/24 " +########################################################################### +# Sample makefile for installing non-localized auxiliary files +########################################################################### +SRCROOT= ../.. +RULESDIR= RULES +include $(SRCROOT)/$(RULESDIR)/rules.top +########################################################################### + +INSDIR= include/schily +TARGET= limits.h +#XMK_FILE= Makefile.man + +########################################################################### +include $(SRCROOT)/$(RULESDIR)/rules.aux +########################################################################### + diff -Nru cdrtools-2.01.01a33/include/schily/locale.h cdrtools-3.02a09/include/schily/locale.h --- cdrtools-2.01.01a33/include/schily/locale.h 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/include/schily/locale.h 2009-05-24 10:23:37.000000000 +0000 @@ -0,0 +1,50 @@ +/* @(#)locale.h 1.2 09/05/24 Copyright 2009 J. Schilling */ +/* + * Copyright (c) 2009 J. Schilling + */ +/* + * The contents of this file are subject to the terms of the + * Common Development and Distribution License, Version 1.0 only + * (the "License"). You may not use this file except in compliance + * with the License. + * + * See the file CDDL.Schily.txt in this distribution for details. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file CDDL.Schily.txt from this distribution. + */ + +#ifndef _SCHILY_LOCALE_H +#define _SCHILY_LOCALE_H + +#ifndef _SCHILY_MCONFIG_H +#include +#endif + +#ifdef HAVE_LOCALE_H +#ifndef _INCL_LOCALE_H +#include /* LC_* definitions */ +#define _INCL_LOCALE_H +#endif +#ifndef USE_LOCALE +#define USE_LOCALE +#endif +#else +#undef USE_LOCALE +#endif + +#ifndef HAVE_SETLOCALE +#undef USE_LOCALE +#endif + +#ifdef NO_LOCALE +#undef USE_LOCALE +#endif + +#ifndef USE_LOCALE +#undef setlocale +#define setlocale(n, s) ((void *)0) +#endif + + +#endif /* _SCHILY_LOCALE_H */ diff -Nru cdrtools-2.01.01a33/include/schily/locale.mk cdrtools-3.02a09/include/schily/locale.mk --- cdrtools-2.01.01a33/include/schily/locale.mk 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/include/schily/locale.mk 2009-05-23 14:22:31.000000000 +0000 @@ -0,0 +1,17 @@ +#ident "@(#)locale.mk 1.1 09/05/23 " +########################################################################### +# Sample makefile for installing non-localized auxiliary files +########################################################################### +SRCROOT= ../.. +RULESDIR= RULES +include $(SRCROOT)/$(RULESDIR)/rules.top +########################################################################### + +INSDIR= include/schily +TARGET= locale.h +#XMK_FILE= Makefile.man + +########################################################################### +include $(SRCROOT)/$(RULESDIR)/rules.aux +########################################################################### + diff -Nru cdrtools-2.01.01a33/include/schily/Makefile cdrtools-3.02a09/include/schily/Makefile --- cdrtools-2.01.01a33/include/schily/Makefile 2007-07-15 21:03:54.000000000 +0000 +++ cdrtools-3.02a09/include/schily/Makefile 2013-10-27 10:01:02.000000000 +0000 @@ -1,4 +1,4 @@ -#ident @(#)Makefile 1.6 07/07/14 +#ident @(#)Makefile 1.22 13/10/27 ########################################################################### # Sample makefile for installing non-localized auxiliary files ########################################################################### @@ -9,21 +9,11 @@ INSDIR= include/schily TARGET= align.h -XMK_FILE= \ - align.mk alloca.mk archdefs.mk avoffset.mk btorder.mk \ - ccomdefs.mk checkerr.mk \ - deflts.mk device.mk dirent.mk errno.mk fcntl.mk \ - fnmatch.mk getargs.mk getcwd.mk iconv.mk intcvt.mk ioctl.mk \ - jmpdefs.mk \ - libport.mk librmt.mk maxpath.mk mconfig.mk \ - mman.mk mtio.mk nlsdefs.mk param.mk patmatch.mk prototyp.mk \ - rmtio.mk schily.mk schilyp.mk \ - siconv.mk sigblk.mk signal.mk standard.mk stat.mk \ - stdlib.mk stkframe.mk string.mk termcap.mk termios.mk time.mk \ - types.mk unistd.mk utime.mk utypes.mk varargs.mk \ - wchar.mk wait.mk \ - xconfig.mk xmconfig.mk + +include Targets +XMK_FILE= $(X_MK_LIST) ########################################################################### include $(SRCROOT)/$(RULESDIR)/rules.aux ########################################################################### + diff -Nru cdrtools-2.01.01a33/include/schily/math.h cdrtools-3.02a09/include/schily/math.h --- cdrtools-2.01.01a33/include/schily/math.h 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/include/schily/math.h 2009-08-26 10:34:01.000000000 +0000 @@ -0,0 +1,34 @@ +/* @(#)math.h 1.1 09/08/26 Copyright 2009 J. Schilling */ +/* + * Abstraction from math.h + * + * Copyright (c) 2009 J. Schilling + */ +/* + * The contents of this file are subject to the terms of the + * Common Development and Distribution License, Version 1.0 only + * (the "License"). You may not use this file except in compliance + * with the License. + * + * See the file CDDL.Schily.txt in this distribution for details. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file CDDL.Schily.txt from this distribution. + */ + +#ifndef _SCHILY_MATH_H +#define _SCHILY_MATH_H + +#ifndef _SCHILY_MCONFIG_H +#include +#endif + +#ifdef HAVE_MATH_H +#ifndef _INCL_MATH_H +#define _INCL_MATH_H +#include +#endif +#endif + + +#endif /* _SCHILY_MATH_H */ diff -Nru cdrtools-2.01.01a33/include/schily/math.mk cdrtools-3.02a09/include/schily/math.mk --- cdrtools-2.01.01a33/include/schily/math.mk 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/include/schily/math.mk 2009-08-26 10:32:47.000000000 +0000 @@ -0,0 +1,17 @@ +#ident "@(#)math.mk 1.1 09/08/26 " +########################################################################### +# Sample makefile for installing non-localized auxiliary files +########################################################################### +SRCROOT= ../.. +RULESDIR= RULES +include $(SRCROOT)/$(RULESDIR)/rules.top +########################################################################### + +INSDIR= include/schily +TARGET= math.h +#XMK_FILE= Makefile.man + +########################################################################### +include $(SRCROOT)/$(RULESDIR)/rules.aux +########################################################################### + diff -Nru cdrtools-2.01.01a33/include/schily/maxpath.h cdrtools-3.02a09/include/schily/maxpath.h --- cdrtools-2.01.01a33/include/schily/maxpath.h 2007-02-22 20:12:51.000000000 +0000 +++ cdrtools-3.02a09/include/schily/maxpath.h 2017-04-27 19:39:52.000000000 +0000 @@ -1,8 +1,8 @@ -/* @(#)maxpath.h 1.8 07/02/22 Copyright 1985, 1995, 1998, 2001-2007 J. Schilling */ +/* @(#)maxpath.h 1.13 17/04/27 Copyright 1985, 1995, 1998, 2001-2017 J. Schilling */ /* * Definitions for dealing with statically limitations on pathnames * - * Copyright (c) 1985, 1995, 1998, 2001-2007 J. Schilling + * Copyright (c) 1985, 1995, 1998, 2001-2017 J. Schilling */ /* * The contents of this file are subject to the terms of the @@ -11,6 +11,8 @@ * with the License. * * See the file CDDL.Schily.txt in this distribution for details. + * A copy of the CDDL is also available via the Internet at + * http://www.opensource.org/licenses/cddl1.txt * * When distributing Covered Code, include this CDDL HEADER in each * file and include the License file CDDL.Schily.txt from this distribution. @@ -20,7 +22,7 @@ #define _SCHILY_MAXPATH_H #ifndef _SCHILY_DIRENT_H -#include /* Includes mconfig.h if needed */ +#include /* Includes mconfig.h if needed */ #endif #ifdef JOS @@ -54,7 +56,7 @@ #endif #if !defined(FOUND_MAXPATHNAME) -# define MAXPATHNAME 256 /* Is there a limit? */ +# define MAXPATHNAME 1024 /* Is there a limit? */ #endif #ifndef PATH_MAX @@ -75,17 +77,27 @@ # define FOUND_MAXFILENAME #endif +#ifdef __never__ +/* + * DIRSIZ(dp) is a parameterized macro, we cannot use it here. + */ #if !defined(FOUND_MAXFILENAME) && defined(DIRSIZ) # define MAXFILENAME DIRSIZ /* From sys/dir.h */ # define FOUND_MAXFILENAME #endif +#endif /* __never__ */ + +#if !defined(FOUND_MAXFILENAME) && defined(NAME_MAX) +# define MAXFILENAME NAME_MAX /* From limits.h */ +# define FOUND_MAXFILENAME +#endif #if !defined(FOUND_MAXFILENAME) && defined(FOUND_DIRSIZE) -# define MAXFILENAME DIRSIZE /* From dirdefs.h */ +# define MAXFILENAME DIRSIZE /* From schily/dirent.h */ # define FOUND_MAXFILENAME #endif -#if !defined(FOUND_MAXPATHNAME) +#if !defined(FOUND_MAXFILENAME) #include #endif #if !defined(FOUND_MAXFILENAME) && defined(_MAX_FNAME) @@ -93,5 +105,18 @@ # define FOUND_MAXFILENAME #endif +#if !defined(FOUND_MAXFILENAME) +# define MAXFILENAME 256 +#endif + +#ifndef NAME_MAX +#define NAME_MAX MAXFILENAME +#endif +#ifndef MAXNAMLEN +#define MAXNAMLEN MAXFILENAME +#endif +#ifndef MAXNAMELEN +#define MAXNAMELEN MAXFILENAME +#endif #endif /* _SCHILY_MAXPATH_H */ diff -Nru cdrtools-2.01.01a33/include/schily/maxpath.mk cdrtools-3.02a09/include/schily/maxpath.mk --- cdrtools-2.01.01a33/include/schily/maxpath.mk 2006-12-17 21:52:12.000000000 +0000 +++ cdrtools-3.02a09/include/schily/maxpath.mk 2006-12-17 21:52:12.000000000 +0000 @@ -1,4 +1,4 @@ -#ident %W% %E% %Q% +#ident @(#)maxpath.mk 1.1 06/12/17 ########################################################################### # Sample makefile for installing non-localized auxiliary files ########################################################################### diff -Nru cdrtools-2.01.01a33/include/schily/mconfig.h cdrtools-3.02a09/include/schily/mconfig.h --- cdrtools-2.01.01a33/include/schily/mconfig.h 2007-07-28 18:56:32.000000000 +0000 +++ cdrtools-3.02a09/include/schily/mconfig.h 2015-08-14 20:51:07.000000000 +0000 @@ -1,8 +1,8 @@ -/* @(#)mconfig.h 1.60 07/07/28 Copyright 1995-2006 J. Schilling */ +/* @(#)mconfig.h 1.71 15/08/14 Copyright 1995-2015 J. Schilling */ /* * definitions for machine configuration * - * Copyright (c) 1995-2006 J. Schilling + * Copyright (c) 1995-2015 J. Schilling * * This file must be included before any other file. * If this file is not included before stdio.h you will not be @@ -19,6 +19,8 @@ * with the License. * * See the file CDDL.Schily.txt in this distribution for details. + * A copy of the CDDL is also available via the Internet at + * http://www.opensource.org/licenses/cddl1.txt * * When distributing Covered Code, include this CDDL HEADER in each * file and include the License file CDDL.Schily.txt from this distribution. @@ -38,9 +40,12 @@ #ifdef NO_LARGEFILES #undef USE_LARGEFILES #endif +#ifdef NO_ACL +#undef USE_ACL +#endif /* - * Inside Processor, we get architecture specific defines + * Inside we get architecture specific Processor defines * fetched from compiler predefinitions only. */ #include @@ -75,7 +80,8 @@ #endif #ifndef IS_UNIX -# if (defined(unix) || defined(__unix) || defined(__unix__)) && !defined(__DJGPP__) +# if (defined(unix) || defined(__unix) || defined(__unix__)) && \ + !defined(__DJGPP__) # define IS_UNIX # endif #endif @@ -105,7 +111,7 @@ #endif #endif -/*--------------------------------------------------------------------------*/ +/* ------------------------------------------------------------------------- */ /* * Some magic that cannot (yet) be figured out with autoconf. */ @@ -171,6 +177,15 @@ # endif #endif +/* + * This is the global switch to deactivate using #pragma weak + */ +#ifdef NO_PRAGMA_WEAK +# ifdef HAVE_PRAGMA_WEAK +# undef HAVE_PRAGMA_WEAK +# endif +#endif + #ifdef NO_FORK # ifdef HAVE_FORK # undef HAVE_FORK @@ -272,7 +287,8 @@ #define NO_PRINT_OVR #undef HAVE_USG_STDIO /* - * NeXT Step 3.x uses __flsbuf(unsigned char, FILE *) + * NeXT Step 3.x uses + * __flsbuf(unsigned char, FILE *) * instead of __flsbuf(int, FILE *) */ # ifndef IS_UNIX @@ -304,23 +320,24 @@ #endif /* __OPRINTF__ */ -/*--------------------------------------------------------------------------*/ -/* - * If there is no flock defined by the system, use emulation - * through fcntl record locking. - */ -#ifndef HAVE_FLOCK -#define LOCK_SH 1 /* shared lock */ -#define LOCK_EX 2 /* exclusive lock */ -#define LOCK_NB 4 /* don't block when locking */ -#define LOCK_UN 8 /* unlock */ -#endif +/* ------------------------------------------------------------------------- */ #ifndef _SCHILY_PROTOTYP_H #include #endif /* + * We use HAVE_LONGLONG as generalized test on whether "long long", "__in64" or + * something similar exist. + * + * In case that HAVE_LONGLONG is defined here, this is an indication that + * "long long" works. We define HAVE_LONG_LONG to keep this knowledge. + */ +#ifdef HAVE_LONGLONG +# define HAVE_LONG_LONG +#endif + +/* * Microsoft C defines _MSC_VER * use __int64 instead of long long and use 0i64 for a signed long long const * and 0ui64 for an unsigned long long const. @@ -331,9 +348,9 @@ * use long long * #endif * - * Be very careful here as MSVC does not implement long long but rather __int64 - * and once someone makes 'long long' 128 bits on a 64 bit machine, we need to - * check for a MSVC __int128 type. + * Be very careful here as older MSVC versions do not implement long long but + * rather __int64 and once someone makes 'long long' 128 bits on a 64 bit + * machine, we may need to check for a MSVC __int128 type. */ #ifndef HAVE_LONGLONG # if defined(HAVE___INT64) @@ -342,13 +359,16 @@ #endif /* - * gcc 2.x generally implements the long long type. + * gcc 2.x generally implements the "long long" type. */ #ifdef __GNUC__ # if __GNUC__ > 1 # ifndef HAVE_LONGLONG # define HAVE_LONGLONG # endif +# ifndef HAVE_LONG_LONG +# define HAVE_LONG_LONG +# endif # endif #endif @@ -508,6 +528,30 @@ # define near #endif +/* + * Is there a solution for /dev/tty and similar? + */ +#ifdef HAVE__DEV_NULL +# define DEV_NULL "/dev/null" +#else +#if defined(_MSC_VER) || defined(__MINGW32__) +# define DEV_NULL "NUL" +#else +/* + * What to do here? + */ +#endif +#endif + +#ifdef DBG_MALLOC +/* + * We need to include this here already in order to make sure that + * every program that is based on mconfig.h will include schily/dbgmalloc.h + * in case that we specify -DDBG_MALLOC + */ +#include +#endif + #ifdef __cplusplus } #endif diff -Nru cdrtools-2.01.01a33/include/schily/mconfig.mk cdrtools-3.02a09/include/schily/mconfig.mk --- cdrtools-2.01.01a33/include/schily/mconfig.mk 2006-12-17 21:52:12.000000000 +0000 +++ cdrtools-3.02a09/include/schily/mconfig.mk 2006-12-17 21:52:12.000000000 +0000 @@ -1,4 +1,4 @@ -#ident %W% %E% %Q% +#ident @(#)mconfig.mk 1.1 06/12/17 ########################################################################### # Sample makefile for installing non-localized auxiliary files ########################################################################### diff -Nru cdrtools-2.01.01a33/include/schily/md4.h cdrtools-3.02a09/include/schily/md4.h --- cdrtools-2.01.01a33/include/schily/md4.h 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/include/schily/md4.h 2010-08-27 11:00:43.000000000 +0000 @@ -0,0 +1,59 @@ +/* @(#)md4.h 1.4 10/08/27 2009-2010 J. Schilling */ +/* + * MD4 hash code taken from OpenBSD + * + * Portions Copyright (c) 2009-2010 J. Schilling + */ +/* $OpenBSD: md4.h,v 1.15 2004/06/22 01:57:30 jfb Exp $ */ + +/* + * This code implements the MD4 message-digest algorithm. + * The algorithm is due to Ron Rivest. This code was + * written by Colin Plumb in 1993, no copyright is claimed. + * This code is in the public domain; do with it what you wish. + * Todd C. Miller modified the MD5 code to do MD4 based on RFC 1186. + * + * Equivalent code is available from RSA Data Security, Inc. + * This code has been tested against that, and is equivalent, + * except that you don't need to include two pages of legalese + * with every copy. + */ + +#ifndef _SCHILY_MD4_H +#define _SCHILY_MD4_H + +#ifndef _SCHILY_MCONFIG_H +#include +#endif +#include + +#define MD4_BLOCK_LENGTH 64 +#define MD4_DIGEST_LENGTH 16 +#define MD4_DIGEST_STRING_LENGTH (MD4_DIGEST_LENGTH * 2 + 1) + +typedef struct MD4Context { + UInt32_t state[4]; /* state */ + UInt32_t count[2]; /* number of bits, mod 2^64 */ + UInt8_t buffer[MD4_BLOCK_LENGTH]; /* input buffer */ +} MD4_CTX; + +#ifdef __cplusplus +extern "C" { +#endif + +extern void MD4Init __PR((MD4_CTX *)); +extern void MD4Update __PR((MD4_CTX *, const void *, size_t)); +extern void MD4Pad __PR((MD4_CTX *)); +extern void MD4Final __PR((UInt8_t [MD4_DIGEST_LENGTH], MD4_CTX *)); +extern void MD4Transform __PR((UInt32_t [4], + const UInt8_t [MD4_BLOCK_LENGTH])); +extern char *MD4End __PR((MD4_CTX *, char *)); +extern char *MD4File __PR((const char *, char *)); +extern char *MD4FileChunk __PR((const char *, char *, off_t, off_t)); +extern char *MD4Data __PR((const UInt8_t *, size_t, char *)); + +#ifdef __cplusplus +} +#endif + +#endif /* _SCHILY_MD4_H */ diff -Nru cdrtools-2.01.01a33/include/schily/md4.mk cdrtools-3.02a09/include/schily/md4.mk --- cdrtools-2.01.01a33/include/schily/md4.mk 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/include/schily/md4.mk 2009-06-20 20:32:08.000000000 +0000 @@ -0,0 +1,17 @@ +#ident "@(#)md4.mk 1.1 09/06/20 " +########################################################################### +# Sample makefile for installing non-localized auxiliary files +########################################################################### +SRCROOT= ../.. +RULESDIR= RULES +include $(SRCROOT)/$(RULESDIR)/rules.top +########################################################################### + +INSDIR= include/schily +TARGET= md4.h +#XMK_FILE= Makefile.man + +########################################################################### +include $(SRCROOT)/$(RULESDIR)/rules.aux +########################################################################### + diff -Nru cdrtools-2.01.01a33/include/schily/md5.h cdrtools-3.02a09/include/schily/md5.h --- cdrtools-2.01.01a33/include/schily/md5.h 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/include/schily/md5.h 2010-08-27 11:01:44.000000000 +0000 @@ -0,0 +1,59 @@ +/* @(#)md5.h 1.11 10/08/27 2008-2010 J. Schilling */ +/* + * MD5 hash code taken from OpenBSD + * + * Portions Copyright (c) 2008-2010 J. Schilling + */ + +/* $OpenBSD: md5.h,v 1.16 2004/06/22 01:57:30 jfb Exp $ */ + +/* + * This code implements the MD5 message-digest algorithm. + * The algorithm is due to Ron Rivest. This code was + * written by Colin Plumb in 1993, no copyright is claimed. + * This code is in the public domain; do with it what you wish. + * + * Equivalent code is available from RSA Data Security, Inc. + * This code has been tested against that, and is equivalent, + * except that you don't need to include two pages of legalese + * with every copy. + */ + +#ifndef _SCHILY_MD5_H +#define _SCHILY_MD5_H + +#ifndef _SCHILY_MCONFIG_H +#include +#endif +#include + +#define MD5_BLOCK_LENGTH 64 +#define MD5_DIGEST_LENGTH 16 +#define MD5_DIGEST_STRING_LENGTH (MD5_DIGEST_LENGTH * 2 + 1) + +typedef struct MD5Context { + UInt32_t state[4]; /* state */ + UInt32_t count[2]; /* number of bits, mod 2^64 */ + UInt8_t buffer[MD5_BLOCK_LENGTH]; /* input buffer */ +} MD5_CTX; + +#ifdef __cplusplus +extern "C" { +#endif + +extern void MD5Init __PR((MD5_CTX *)); +extern void MD5Update __PR((MD5_CTX *, const void *, size_t)); +extern void MD5Pad __PR((MD5_CTX *)); +extern void MD5Final __PR((UInt8_t [MD5_DIGEST_LENGTH], MD5_CTX *)); +extern void MD5Transform __PR((UInt32_t [4], + const UInt8_t [MD5_BLOCK_LENGTH])); +extern char *MD5End __PR((MD5_CTX *, char *)); +extern char *MD5File __PR((const char *, char *)); +extern char *MD5FileChunk __PR((const char *, char *, off_t, off_t)); +extern char *MD5Data __PR((const UInt8_t *, size_t, char *)); + +#ifdef __cplusplus +} +#endif + +#endif /* _SCHILY_MD5_H */ diff -Nru cdrtools-2.01.01a33/include/schily/md5.mk cdrtools-3.02a09/include/schily/md5.mk --- cdrtools-2.01.01a33/include/schily/md5.mk 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/include/schily/md5.mk 2009-06-20 20:26:50.000000000 +0000 @@ -0,0 +1,17 @@ +#ident "@(#)md5.mk 1.1 09/06/20 " +########################################################################### +# Sample makefile for installing non-localized auxiliary files +########################################################################### +SRCROOT= ../.. +RULESDIR= RULES +include $(SRCROOT)/$(RULESDIR)/rules.top +########################################################################### + +INSDIR= include/schily +TARGET= md5.h +#XMK_FILE= Makefile.man + +########################################################################### +include $(SRCROOT)/$(RULESDIR)/rules.aux +########################################################################### + diff -Nru cdrtools-2.01.01a33/include/schily/mman.mk cdrtools-3.02a09/include/schily/mman.mk --- cdrtools-2.01.01a33/include/schily/mman.mk 2006-12-17 21:52:12.000000000 +0000 +++ cdrtools-3.02a09/include/schily/mman.mk 2006-12-17 21:52:12.000000000 +0000 @@ -1,4 +1,4 @@ -#ident %W% %E% %Q% +#ident @(#)mman.mk 1.1 06/12/17 ########################################################################### # Sample makefile for installing non-localized auxiliary files ########################################################################### diff -Nru cdrtools-2.01.01a33/include/schily/mtio.h cdrtools-3.02a09/include/schily/mtio.h --- cdrtools-2.01.01a33/include/schily/mtio.h 2006-09-13 00:44:11.000000000 +0000 +++ cdrtools-3.02a09/include/schily/mtio.h 2010-08-23 19:45:07.000000000 +0000 @@ -1,4 +1,4 @@ -/* @(#)mtio.h 1.5 06/09/13 Copyright 1995,2000-2002 J. Schilling */ +/* @(#)mtio.h 1.6 10/08/23 Copyright 1995,2000-2010 J. Schilling */ /* * Generic header for users of magnetic tape ioctl interface. * @@ -7,7 +7,7 @@ * to be able to do at least remote mtio on systems * that have no local mtio * - * Copyright (c) 1995,2000-2002 J. Schilling + * Copyright (c) 1995,2000-2010 J. Schilling */ /* * The contents of this file are subject to the terms of the @@ -58,7 +58,7 @@ #define MTFSF 1 /* fwd space over file mark(s) */ #define MTBSF 2 /* back space over file mark(s) (1/2" only ) */ #define MTFSR 3 /* fwd space record(s) (to inter-record gap) */ -#define MTBSR 4 /* back space record(s) (to inter-record gap)*/ +#define MTBSR 4 /* back space record(s) (to inter-record gap) */ #define MTREW 5 /* rewind tape */ #define MTOFFL 6 /* rewind and put the drive offline */ #define MTNOP 7 /* no operation (sets status ?) */ diff -Nru cdrtools-2.01.01a33/include/schily/mtio.mk cdrtools-3.02a09/include/schily/mtio.mk --- cdrtools-2.01.01a33/include/schily/mtio.mk 2006-12-17 21:52:12.000000000 +0000 +++ cdrtools-3.02a09/include/schily/mtio.mk 2006-12-17 21:52:12.000000000 +0000 @@ -1,4 +1,4 @@ -#ident %W% %E% %Q% +#ident @(#)mtio.mk 1.1 06/12/17 ########################################################################### # Sample makefile for installing non-localized auxiliary files ########################################################################### diff -Nru cdrtools-2.01.01a33/include/schily/netdb.h cdrtools-3.02a09/include/schily/netdb.h --- cdrtools-2.01.01a33/include/schily/netdb.h 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/include/schily/netdb.h 2015-11-30 21:05:59.000000000 +0000 @@ -0,0 +1,42 @@ +/* @(#)netdb.h 1.2 15/11/30 Copyright 2009-2015 J. Schilling */ +/* + * Netdb abstraction + * + * Copyright (c) 2009-2015 J. Schilling + */ +/* + * The contents of this file are subject to the terms of the + * Common Development and Distribution License, Version 1.0 only + * (the "License"). You may not use this file except in compliance + * with the License. + * + * See the file CDDL.Schily.txt in this distribution for details. + * A copy of the CDDL is also available via the Internet at + * http://www.opensource.org/licenses/cddl1.txt + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file CDDL.Schily.txt from this distribution. + */ + +#ifndef _SCHILY_NETDB_H +#define _SCHILY_NETDB_H + +#ifndef _SCHILY_MCONFIG_H +#include +#endif + +#ifdef HAVE_NETDB_H +#ifndef _INCL_NETDB_H +#include +#define _INCL_NETDB_H +#endif +#endif + +#ifdef HAVE_ARPA_AIXRCMDS_H +#ifndef _INCL_ARPA_AIXRCMDS_H +#include +#define _INCL_ARPA_AIXRCMDS_H +#endif +#endif + +#endif /* _SCHILY_NETDB_H */ diff -Nru cdrtools-2.01.01a33/include/schily/netdb.mk cdrtools-3.02a09/include/schily/netdb.mk --- cdrtools-2.01.01a33/include/schily/netdb.mk 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/include/schily/netdb.mk 2009-07-13 17:25:18.000000000 +0000 @@ -0,0 +1,17 @@ +#ident "@(#)netdb.mk 1.1 09/07/13 " +########################################################################### +# Sample makefile for installing non-localized auxiliary files +########################################################################### +SRCROOT= ../.. +RULESDIR= RULES +include $(SRCROOT)/$(RULESDIR)/rules.top +########################################################################### + +INSDIR= include/schily +TARGET= netdb.h +#XMK_FILE= Makefile.man + +########################################################################### +include $(SRCROOT)/$(RULESDIR)/rules.aux +########################################################################### + diff -Nru cdrtools-2.01.01a33/include/schily/nlsdefs.h cdrtools-3.02a09/include/schily/nlsdefs.h --- cdrtools-2.01.01a33/include/schily/nlsdefs.h 2006-12-28 00:16:23.000000000 +0000 +++ cdrtools-3.02a09/include/schily/nlsdefs.h 2010-12-19 12:43:18.000000000 +0000 @@ -1,6 +1,8 @@ -/* @(#)nlsdefs.h 1.2 06/12/28 Copyright 2004 J. Schilling */ +/* @(#)nlsdefs.h 1.5 10/12/19 Copyright 2004-2010 J. Schilling */ /* - * Copyright (c) 2004 J. Schilling + * Native language support + * + * Copyright (c) 2004-2010 J. Schilling */ /* * The contents of this file are subject to the terms of the @@ -14,13 +16,19 @@ * file and include the License file CDDL.Schily.txt from this distribution. */ -#ifndef _NLSDEFS_H -#define _NLSDEFS_H +#ifndef _SCHILY_NLSDEFS_H +#define _SCHILY_NLSDEFS_H #ifndef _SCHILY_MCONFIG_H #include #endif +#ifndef NO_NLS +#ifndef USE_NLS +#define USE_NLS /* Make nls the default */ +#endif +#endif + #ifdef HAVE_LIBINTL_H #ifndef _INCL_LIBINTL_H #include /* gettext() */ @@ -30,12 +38,10 @@ #undef USE_NLS #endif -#ifdef HAVE_LOCALE_H -#ifndef _INCL_LOCALE_H -#include /* LC_* definitions */ -#define _INCL_LOCALE_H +#ifndef _SCHILY_LOCALE_H +#include /* LC_* definitions */ #endif -#else +#ifndef _INCL_LOCALE_H #undef USE_NLS #endif @@ -56,6 +62,9 @@ #undef USE_NLS #endif +#ifdef NO_TEXT_DOMAIN +#undef TEXT_DOMAIN +#endif #ifndef USE_NLS #undef gettext @@ -73,4 +82,22 @@ #define bind_textdomain_codeset(d, c) ((char *)0) #endif -#endif /* _NLSDEFS_H */ +#ifdef lint +/* + * Allow lint to check printf() format strings. + */ +#define _(s) s +#else /* lint */ + +#ifdef USE_DGETTEXT /* e.g. in a library */ +#define _(s) dgettext(TEXT_DOMAIN, s) +#else +#define _(s) gettext(s) +#endif +#endif /* lint */ +/* + * Allow to mark strings for xgettext(1) + */ +#define __(s) s + +#endif /* _SCHILY_NLSDEFS_H */ diff -Nru cdrtools-2.01.01a33/include/schily/nlsdefs.mk cdrtools-3.02a09/include/schily/nlsdefs.mk --- cdrtools-2.01.01a33/include/schily/nlsdefs.mk 2006-12-17 21:52:12.000000000 +0000 +++ cdrtools-3.02a09/include/schily/nlsdefs.mk 2006-12-17 21:52:12.000000000 +0000 @@ -1,4 +1,4 @@ -#ident %W% %E% %Q% +#ident @(#)nlsdefs.mk 1.1 06/12/17 ########################################################################### # Sample makefile for installing non-localized auxiliary files ########################################################################### diff -Nru cdrtools-2.01.01a33/include/schily/param.h cdrtools-3.02a09/include/schily/param.h --- cdrtools-2.01.01a33/include/schily/param.h 2007-05-29 20:13:54.000000000 +0000 +++ cdrtools-3.02a09/include/schily/param.h 2012-01-22 14:27:08.000000000 +0000 @@ -1,8 +1,8 @@ -/* @(#)param.h 1.4 07/05/29 Copyright 2006-2007 J. Schilling */ +/* @(#)param.h 1.7 12/01/22 Copyright 2006-2011 J. Schilling */ /* * Abstraction from sys/param.h * - * Copyright (c) 2006-2007 J. Schilling + * Copyright (c) 2006-2011 J. Schilling */ /* * The contents of this file are subject to the terms of the @@ -29,13 +29,18 @@ #ifndef _SCHILY_TYPES_H #include #endif - #ifdef HAVE_SYS_PARAM_H #ifndef _INCL_SYS_PARAM_H -#include +#include /* Must be before limits.h */ #define _INCL_SYS_PARAM_H #endif #endif +#ifndef _SCHILY_LIMITS_H +#include /* For _SC_CLK_TCK */ +#endif +#ifndef _SCHILY_UNISTD_H +#include /* For _SC_CLK_TCK */ +#endif #ifndef NBBY #define NBBY 8 /* Number of bits per byte */ @@ -52,4 +57,20 @@ #define NODEV ((dev_t)-1L) #endif +#ifndef HZ +#if defined(_SC_CLK_TCK) +#define HZ ((clock_t)sysconf(_SC_CLK_TCK)) +#else +#define HZ 100 +#endif +#endif + +/* + * Do we need to define _XOPEN_SOURCE to get NZERO? + * On Linux, it is needed but on Linux NZERO is 20. + */ +#ifndef NZERO /* for nice(2) */ +#define NZERO 20 +#endif + #endif /* _SCHILY_PARAM_H */ diff -Nru cdrtools-2.01.01a33/include/schily/param.mk cdrtools-3.02a09/include/schily/param.mk --- cdrtools-2.01.01a33/include/schily/param.mk 2007-01-03 13:16:57.000000000 +0000 +++ cdrtools-3.02a09/include/schily/param.mk 2007-01-03 13:16:57.000000000 +0000 @@ -1,4 +1,4 @@ -#ident %W% %E% %Q% +#ident @(#)param.mk 1.1 07/01/03 ########################################################################### # Sample makefile for installing non-localized auxiliary files ########################################################################### diff -Nru cdrtools-2.01.01a33/include/schily/patmatch.h cdrtools-3.02a09/include/schily/patmatch.h --- cdrtools-2.01.01a33/include/schily/patmatch.h 2006-10-10 08:24:15.000000000 +0000 +++ cdrtools-3.02a09/include/schily/patmatch.h 2017-07-02 16:46:23.000000000 +0000 @@ -1,11 +1,11 @@ -/* @(#)patmatch.h 1.12 06/10/10 Copyright 1985 J. Schilling */ +/* @(#)patmatch.h 1.16 17/07/02 Copyright 1985,1993-2017 J. Schilling */ #ifndef _SCHILY_PATMATCH_H #define _SCHILY_PATMATCH_H /* * Definitions for the pattern matching functions. * - * Copyright (c) 1985,1995 J. Schilling + * Copyright (c) 1985,1993-2017 J. Schilling */ /* * The contents of this file are subject to the terms of the @@ -14,6 +14,8 @@ * with the License. * * See the file CDDL.Schily.txt in this distribution for details. + * A copy of the CDDL is also available via the Internet at + * http://www.opensource.org/licenses/cddl1.txt * * When distributing Covered Code, include this CDDL HEADER in each * file and include the License file CDDL.Schily.txt from this distribution. @@ -74,25 +76,68 @@ case LCLASS: case RCLASS: case START: case END: -#define MAXPAT 128 /* Maximum length of pattern */ +#define MAXPAT 128 /* Max length of pattern for opatmatch()/opatlmatch() */ -extern int patcompile __PR((const unsigned char * __pat, int __patlen, int * __aux)); +extern int patcompile __PR((const unsigned char *__pat, int __patlen, + int *__aux)); -extern unsigned char *opatmatch __PR((const unsigned char * __pat, const int * __aux, - const unsigned char * __str, int __soff, int __slen, +extern unsigned char *opatmatch __PR((const unsigned char *__pat, + const int *__aux, + const unsigned char *__str, + int __soff, int __slen, int __alt)); -extern unsigned char *opatlmatch __PR((const unsigned char * __pat, const int * __aux, - const unsigned char * __str, int __soff, int __slen, +extern unsigned char *opatlmatch __PR((const unsigned char *__pat, + const int *__aux, + const unsigned char *__str, + int __soff, int __slen, int __alt)); -extern unsigned char *patmatch __PR((const unsigned char * __pat, const int * __aux, - const unsigned char * __str, int __soff, int __slen, +extern unsigned char *patmatch __PR((const unsigned char *__pat, + const int *__aux, + const unsigned char *__str, + int __soff, int __slen, int __alt, int __state[])); -extern unsigned char *patlmatch __PR((const unsigned char * __pat, const int * __aux, - const unsigned char * __str, int __soff, int __slen, +extern unsigned char *patlmatch __PR((const unsigned char *__pat, + const int *__aux, + const unsigned char *__str, + int __soff, int __slen, int __alt, int __state[])); #ifdef __cplusplus } #endif +#ifdef _SCHILY_WCHAR_H + +#ifdef __cplusplus +extern "C" { +#endif + +extern int patwcompile __PR((const wchar_t *__pat, int __patlen, + int *__aux)); +extern wchar_t *patwmatch __PR((const wchar_t *__pat, const int *__aux, + const wchar_t *__str, + int __soff, int __slen, + int __alt, int __state[])); +extern wchar_t *patwlmatch __PR((const wchar_t *__pat, const int *__aux, + const wchar_t *__str, + int __soff, int __slen, + int __alt, int __state[])); + +extern unsigned char *patmbmatch __PR((const wchar_t *__pat, + const int *__aux, + const unsigned char *__str, + int __soff, int __slen, + int __alt, int __state[])); +extern unsigned char *patmblmatch __PR((const wchar_t *__pat, + const int *__aux, + const unsigned char *__str, + int __soff, int __slen, + int __alt, int __state[])); + + +#ifdef __cplusplus +} +#endif +#endif /* _SCHILY_WCHAR_H */ + #endif /* _SCHILY_PATMATCH_H */ diff -Nru cdrtools-2.01.01a33/include/schily/patmatch.mk cdrtools-3.02a09/include/schily/patmatch.mk --- cdrtools-2.01.01a33/include/schily/patmatch.mk 2006-12-17 21:52:12.000000000 +0000 +++ cdrtools-3.02a09/include/schily/patmatch.mk 2006-12-17 21:52:12.000000000 +0000 @@ -1,4 +1,4 @@ -#ident %W% %E% %Q% +#ident @(#)patmatch.mk 1.1 06/12/17 ########################################################################### # Sample makefile for installing non-localized auxiliary files ########################################################################### diff -Nru cdrtools-2.01.01a33/include/schily/poll.h cdrtools-3.02a09/include/schily/poll.h --- cdrtools-2.01.01a33/include/schily/poll.h 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/include/schily/poll.h 2013-04-29 19:25:20.000000000 +0000 @@ -0,0 +1,43 @@ +/* @(#)poll.h 1.1 13/04/29 Copyright 2013 J. Schilling */ +/* + * Poll abstraction + * + * Copyright (c) 2013 J. Schilling + */ +/* + * The contents of this file are subject to the terms of the + * Common Development and Distribution License, Version 1.0 only + * (the "License"). You may not use this file except in compliance + * with the License. + * + * See the file CDDL.Schily.txt in this distribution for details. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file CDDL.Schily.txt from this distribution. + */ + +#ifndef _SCHILY_POLL_H +#define _SCHILY_POLL_H + +#ifndef _SCHILY_MCONFIG_H +#include +#endif +#ifndef _SCHILY_TYPES_H +#include +#endif +#ifndef _SCHILY_TIME_H +#include +#endif + +#ifdef HAVE_POLL +#ifndef _INCL_POLL_H +#include +#define _INCL_POLL_H +#endif +#else +#ifndef _SCHILY_SELECT_H +#include +#endif +#endif + +#endif /* _SCHILY_POLL_H */ diff -Nru cdrtools-2.01.01a33/include/schily/poll.mk cdrtools-3.02a09/include/schily/poll.mk --- cdrtools-2.01.01a33/include/schily/poll.mk 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/include/schily/poll.mk 2013-04-29 19:25:20.000000000 +0000 @@ -0,0 +1,17 @@ +#ident "@(#)poll.mk 1.1 13/04/29 " +########################################################################### +# Sample makefile for installing non-localized auxiliary files +########################################################################### +SRCROOT= ../.. +RULESDIR= RULES +include $(SRCROOT)/$(RULESDIR)/rules.top +########################################################################### + +INSDIR= include/schily +TARGET= poll.h +#XMK_FILE= Makefile.man + +########################################################################### +include $(SRCROOT)/$(RULESDIR)/rules.aux +########################################################################### + diff -Nru cdrtools-2.01.01a33/include/schily/priv.h cdrtools-3.02a09/include/schily/priv.h --- cdrtools-2.01.01a33/include/schily/priv.h 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/include/schily/priv.h 2013-05-28 18:02:47.000000000 +0000 @@ -0,0 +1,151 @@ +/* @(#)priv.h 1.5 13/05/28 Copyright 2009-2013 J. Schilling */ +/* + * Abstraction code for fine grained process privileges + * + * Copyright (c) 2009-2013 J. Schilling + */ +/* + * The contents of this file are subject to the terms of the + * Common Development and Distribution License, Version 1.0 only + * (the "License"). You may not use this file except in compliance + * with the License. + * + * See the file CDDL.Schily.txt in this distribution for details. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file CDDL.Schily.txt from this distribution. + */ + +#ifndef _SCHILY_PRIV_H +#define _SCHILY_PRIV_H + +#ifndef _SCHILY_MCONFIG_H +#include +#endif + +/* + * The Solaris process privileges interface. + */ +#if defined(HAVE_PRIV_H) && \ + defined(HAVE_GETPPRIV) && defined(HAVE_SETPPRIV) && \ + defined(HAVE_PRIV_SET) + +#define HAVE_SOLARIS_PPRIV +#endif + +#ifdef NO_SOLARIS_PPRIV +#undef HAVE_SOLARIS_PPRIV +#endif + +#ifdef HAVE_SOLARIS_PPRIV +#ifndef _INCL_PRIV_H +#define _INCL_PRIV_H +#include +#endif +#endif + +/* + * AIX implements an incompatible process privileges interface. + * On AIX, we have sys/priv.h, getppriv(), setppriv() but no priv_set(). + */ +#if defined(HAVE_SYS_PRIV_H) && \ + defined(HAVE_GETPPRIV) && defined(HAVE_SETPPRIV) && \ + defined(HAVE_PRIVBIT_SET) + +#define HAVE_AIX_PPRIV +#endif + +#ifdef NO_AIX_PPRIV +#undef HAVE_AIX_PPRIV +#endif + +#ifdef HAVE_AIX_PPRIV +#ifndef _INCL_SYS_PRIV_H +#define _INCL_SYS_PRIV_H +#include +#endif +#endif + +/* + * The POSIX.1e draft has been withdrawn in 1997. + * Linux started to implement this outdated concept in 1997. + * On Linux, we have sys/capability.h, cap_get_proc(), cap_set_proc(), + * cap_set_flag() cap_clear_flag() + */ +#if defined(HAVE_SYS_CAPABILITY_H) && \ + defined(HAVE_CAP_GET_PROC) && defined(HAVE_CAP_SET_PROC) && \ + defined(HAVE_CAP_SET_FLAG) && defined(HAVE_CAP_CLEAR_FLAG) + +#define HAVE_LINUX_CAPS +#endif + +#ifdef NO_LINUX_CAPS +#undef HAVE_LINUX_CAPS +#endif + +#ifdef HAVE_LINUX_CAPS +#ifndef _INCL_SYS_CAPABILITY_H +#define _INCL_SYS_CAPABILITY_H +#include +#endif +#endif + +/* + * Privileges abstraction layer definitions + */ +#define SCHILY_PRIV_FILE_CHOWN 10 /* Allow to chown any file */ +#define SCHILY_PRIV_FILE_CHOWN_SELF 11 /* Allow to chown own files */ +#define SCHILY_PRIV_FILE_DAC_EXECUTE 12 /* Overwrite execute permission */ +#define SCHILY_PRIV_FILE_DAC_READ 13 /* Overwrite read permission */ +#define SCHILY_PRIV_FILE_DAC_SEARCH 14 /* Overwrite dir search permission */ +#define SCHILY_PRIV_FILE_DAC_WRITE 15 /* Overwrite write permission */ +#define SCHILY_PRIV_FILE_DOWNGRADE_SL 16 /* Downgrade sensivity label */ +#define SCHILY_PRIV_FILE_LINK_ANY 17 /* Hard-link files not owned */ +#define SCHILY_PRIV_FILE_OWNER 18 /* Allow chmod ... to unowned files */ +#define SCHILY_PRIV_FILE_SETID 19 /* Allow chown or suid/sgid without being owner */ +#define SCHILY_PRIV_FILE_UPGRADE_SL 20 /* Upgrade sensivity label */ +#define SCHILY_PRIV_FILE_FLAG_SET 22 /* Allow set file attributes as "immutable" */ + +#define SCHILY_PRIV_IPC_DAC_READ 40 /* Overwrite read permission */ +#define SCHILY_PRIV_IPC_DAC_WRITE 41 /* Overwrite write permission */ +#define SCHILY_PRIV_IPC_OWNER 42 /* Allow chmod ... to unowned files */ + +#define SCHILY_PRIV_NET_BINDMLP 50 /* Allow to bind multi-level ports */ +#define SCHILY_PRIV_NET_ICMPACCESS 51 /* Allow to send/receive ICMP packets */ +#define SCHILY_PRIV_NET_MAC_AWARE 52 /* Allow to set NET_MAC_AWARE flag */ +#define SCHILY_PRIV_NET_OBSERVABILITY 53 /* Allow tp access network device for receiving traffic */ +#define SCHILY_PRIV_NET_PRIVADDR 54 /* Allow to bind priv ports */ +#define SCHILY_PRIV_NET_RAWACCESS 55 /* Allow raw network access */ + +#define SCHILY_PRIV_PROC_AUDIT 60 /* Allow to create audit records */ +#define SCHILY_PRIV_PROC_CHROOT 61 /* Allow chroot */ +#define SCHILY_PRIV_PROC_CLOCK_HIGHRES 62 /* Allow to use high resulution timers */ +#define SCHILY_PRIV_PROC_EXEC 63 /* Allow to call exec*() */ +#define SCHILY_PRIV_PROC_FORK 64 /* Allow to call fork*()/vfork*() */ +#define SCHILY_PRIV_PROC_INFO 65 /* Allow to examine /proc status without sendsig priv */ +#define SCHILY_PRIV_PROC_LOCK_MEMORY 66 /* Allow to lock pages into physical memory */ +#define SCHILY_PRIV_PROC_OWNER 67 /* Allow sendsig and /proc to other procs */ +#define SCHILY_PRIV_PROC_PRIOCNTL 68 /* Allow to send sognals or trace outside session */ +#define SCHILY_PRIV_PROC_SESSION 68 /* Allow to send sognals or trace outside session */ +#define SCHILY_PRIV_PROC_SETID 69 /* Allow set proc's UID/GID */ + +#define SCHILY_PRIV_SYS_ACCT 80 /* Allow process accounting */ +#define SCHILY_PRIV_SYS_ADMIN 81 /* Allow system administration */ +#define SCHILY_PRIV_SYS_AUDIT 82 /* Allow so start kernel auditing */ +#define SCHILY_PRIV_SYS_CONFIG 83 /* Allow various system config tasks */ +#define SCHILY_PRIV_SYS_DEVICES 84 /* Allow device specific stuff */ +#define SCHILY_PRIV_SYS_DL_CONFIG 85 /* Allow tp configure datalink interfaces */ +#define SCHILY_PRIV_SYS_IP_CONFIG 86 /* Allow to configure IP interfaces */ +#define SCHILY_PRIV_SYS_LINKDIR 87 /* Allow to link/unlink directories */ +#define SCHILY_PRIV_SYS_MOUNT 88 /* Allow file-system administration */ +#define SCHILY_PRIV_SYS_NET_CONFIG 89 /* Allow to configure the network */ +#define SCHILY_PRIV_SYS_NFS 90 /* Allow to configure NFS */ +#define SCHILY_PRIV_SYS_PPP_CONFIG 91 /* Allow to configure PPP */ +#define SCHILY_PRIV_SYS_RES_CONFIG 92 /* Allow to configure system resources */ +#define SCHILY_PRIV_SYS_RESOURCE 93 /* Allow setrlimit */ +#define SCHILY_PRIV_SYS_SMB 94 /* Allow to configure SMB */ +#define SCHILY_PRIV_SYS_SUSER_COMPAT 95 /* Allow to load modules that call suser() */ +#define SCHILY_PRIV_SYS_TIME 96 /* Allow to set time */ +#define SCHILY_PRIV_SYS_TRANS_LABEL 97 /* Allow to translate labels in trusted extensions */ + +#endif /* _SCHILY_PRIV_H */ diff -Nru cdrtools-2.01.01a33/include/schily/priv.mk cdrtools-3.02a09/include/schily/priv.mk --- cdrtools-2.01.01a33/include/schily/priv.mk 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/include/schily/priv.mk 2009-08-07 17:04:57.000000000 +0000 @@ -0,0 +1,17 @@ +#ident "@(#)priv.mk 1.1 09/08/07 " +########################################################################### +# Sample makefile for installing non-localized auxiliary files +########################################################################### +SRCROOT= ../.. +RULESDIR= RULES +include $(SRCROOT)/$(RULESDIR)/rules.top +########################################################################### + +INSDIR= include/schily +TARGET= priv.h +#XMK_FILE= Makefile.man + +########################################################################### +include $(SRCROOT)/$(RULESDIR)/rules.aux +########################################################################### + diff -Nru cdrtools-2.01.01a33/include/schily/procfs.h cdrtools-3.02a09/include/schily/procfs.h --- cdrtools-2.01.01a33/include/schily/procfs.h 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/include/schily/procfs.h 2009-08-07 21:46:31.000000000 +0000 @@ -0,0 +1,40 @@ +/* @(#)procfs.h 1.1 09/08/07 Copyright 2009 J. Schilling */ +/* + * Abstraction code for the process filesystem + * + * Copyright (c) 2009 J. Schilling + */ +/* + * The contents of this file are subject to the terms of the + * Common Development and Distribution License, Version 1.0 only + * (the "License"). You may not use this file except in compliance + * with the License. + * + * See the file CDDL.Schily.txt in this distribution for details. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file CDDL.Schily.txt from this distribution. + */ + +#ifndef _SCHILY_PROCFS_H +#define _SCHILY_PROCFS_H + +#ifndef _SCHILY_MCONFIG_H +#include +#endif + +#ifdef HAVE_PROCFS_H +#ifndef _INCL_PROCFS_H +#define _INCL_PROCFS_H +#include +#endif +#else +#ifdef HAVE_SYS_PROCFS_H +#ifndef _INCL_SYS_PROCFS_H +#define _INCL_SYS_PROCFS_H +#include +#endif +#endif +#endif + +#endif /* _SCHILY_PROCFS_H */ diff -Nru cdrtools-2.01.01a33/include/schily/procfs.mk cdrtools-3.02a09/include/schily/procfs.mk --- cdrtools-2.01.01a33/include/schily/procfs.mk 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/include/schily/procfs.mk 2009-08-07 21:46:31.000000000 +0000 @@ -0,0 +1,17 @@ +#ident "@(#)procfs.mk 1.1 09/08/07 " +########################################################################### +# Sample makefile for installing non-localized auxiliary files +########################################################################### +SRCROOT= ../.. +RULESDIR= RULES +include $(SRCROOT)/$(RULESDIR)/rules.top +########################################################################### + +INSDIR= include/schily +TARGET= procfs.h +#XMK_FILE= Makefile.man + +########################################################################### +include $(SRCROOT)/$(RULESDIR)/rules.aux +########################################################################### + diff -Nru cdrtools-2.01.01a33/include/schily/prototyp.h cdrtools-3.02a09/include/schily/prototyp.h --- cdrtools-2.01.01a33/include/schily/prototyp.h 2006-09-13 01:37:00.000000000 +0000 +++ cdrtools-3.02a09/include/schily/prototyp.h 2015-12-26 19:32:27.000000000 +0000 @@ -1,8 +1,8 @@ -/* @(#)prototyp.h 1.12 06/09/13 Copyright 1995 J. Schilling */ +/* @(#)prototyp.h 1.17 15/12/26 Copyright 1995-2015 J. Schilling */ /* * Definitions for dealing with ANSI / KR C-Compilers * - * Copyright (c) 1995 J. Schilling + * Copyright (c) 1995-2015 J. Schilling */ /* * The contents of this file are subject to the terms of the @@ -11,21 +11,39 @@ * with the License. * * See the file CDDL.Schily.txt in this distribution for details. + * A copy of the CDDL is also available via the Internet at + * http://www.opensource.org/licenses/cddl1.txt * * When distributing Covered Code, include this CDDL HEADER in each * file and include the License file CDDL.Schily.txt from this distribution. */ /* - * mconfig.h includes prototype.h so we must do this include before we test + * includes + * To be correct, we need to include before we test * for _SCHILY_PROTOTYP_H + * + * In order to keep the silly Solaris hdrchk(1) quiet, we are forced to + * have the _SCHILY_PROTOTYP_H first in . + * To keep hdrchk(1) quiet and be correct, we need to introduce a second + * guard _SCHILY_PROTOTYP_X_H. */ +#ifndef _SCHILY_PROTOTYP_H +#define _SCHILY_PROTOTYP_H + #ifndef _SCHILY_MCONFIG_H +#undef _SCHILY_PROTOTYP_H #include #endif -#ifndef _SCHILY_PROTOTYP_H -#define _SCHILY_PROTOTYP_H +#ifndef _SCHILY_PROTOTYP_X_H +#define _SCHILY_PROTOTYP_X_H + +#include + +#ifdef __cplusplus +extern "C" { +#endif #ifndef PROTOTYPES /* @@ -88,4 +106,27 @@ # define __PR(a) () #endif +#if !defined(PROTOTYPES) && !defined(NO_CONST_DEFINE) +# ifndef const +# define const +# endif +# ifndef signed +# define signed +# endif +# ifndef volatile +# define volatile +# endif +#endif + +#ifdef PROTOTYPES +#define ALERT '\a' +#else +#define ALERT '\07' +#endif + +#ifdef __cplusplus +} +#endif + +#endif /* _SCHILY_PROTOTYP_X_H */ #endif /* _SCHILY_PROTOTYP_H */ diff -Nru cdrtools-2.01.01a33/include/schily/prototyp.mk cdrtools-3.02a09/include/schily/prototyp.mk --- cdrtools-2.01.01a33/include/schily/prototyp.mk 2006-12-17 21:52:12.000000000 +0000 +++ cdrtools-3.02a09/include/schily/prototyp.mk 2006-12-17 21:52:12.000000000 +0000 @@ -1,4 +1,4 @@ -#ident %W% %E% %Q% +#ident @(#)prototyp.mk 1.1 06/12/17 ########################################################################### # Sample makefile for installing non-localized auxiliary files ########################################################################### diff -Nru cdrtools-2.01.01a33/include/schily/pwd.h cdrtools-3.02a09/include/schily/pwd.h --- cdrtools-2.01.01a33/include/schily/pwd.h 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/include/schily/pwd.h 2009-07-10 19:34:46.000000000 +0000 @@ -0,0 +1,56 @@ +/* @(#)pwd.h 1.1 09/07/10 Copyright 2009 J. Schilling */ +/* + * Passwd abstraction + * + * Copyright (c) 2009 J. Schilling + */ +/* + * The contents of this file are subject to the terms of the + * Common Development and Distribution License, Version 1.0 only + * (the "License"). You may not use this file except in compliance + * with the License. + * + * See the file CDDL.Schily.txt in this distribution for details. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file CDDL.Schily.txt from this distribution. + */ + +#ifndef _SCHILY_PWD_H +#define _SCHILY_PWD_H + +#ifndef _SCHILY_MCONFIG_H +#include +#endif +#ifndef _SCHILY_TYPES_H +#include +#endif + +#ifdef HAVE_PWD_H +#ifndef _INCL_PWD_H +#include +#define _INCL_PWD_H +#endif +#else + +#ifdef __cplusplus +extern "C" { +#endif + +struct passwd { + char *pw_name; + char *pw_passwd; + uid_t pw_uid; + gid_t pw_gid; + char *pw_gecos; + char *pw_dir; + char *pw_shell; +}; + +#ifdef __cplusplus +} +#endif + +#endif /* ! HAVE_PWD_H */ + +#endif /* _SCHILY_PWD_H */ diff -Nru cdrtools-2.01.01a33/include/schily/pwd.mk cdrtools-3.02a09/include/schily/pwd.mk --- cdrtools-2.01.01a33/include/schily/pwd.mk 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/include/schily/pwd.mk 2009-07-10 19:34:46.000000000 +0000 @@ -0,0 +1,17 @@ +#ident "@(#)pwd.mk 1.1 09/07/10 " +########################################################################### +# Sample makefile for installing non-localized auxiliary files +########################################################################### +SRCROOT= ../.. +RULESDIR= RULES +include $(SRCROOT)/$(RULESDIR)/rules.top +########################################################################### + +INSDIR= include/schily +TARGET= pwd.h +#XMK_FILE= Makefile.man + +########################################################################### +include $(SRCROOT)/$(RULESDIR)/rules.aux +########################################################################### + diff -Nru cdrtools-2.01.01a33/include/schily/_regex.h cdrtools-3.02a09/include/schily/_regex.h --- cdrtools-2.01.01a33/include/schily/_regex.h 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/include/schily/_regex.h 2010-08-27 10:43:55.000000000 +0000 @@ -0,0 +1,135 @@ +/* @(#)_regex.h 1.6 10/08/27 2010 J. Schilling */ +/* + * regex.h code taken from FreeBSD + * + * Portions Copyright (c) 2010 J. Schilling + */ +/* + * Copyright (c) 1992 Henry Spencer. + * Copyright (c) 1992, 1993 + * The Regents of the University of California. All rights reserved. + * + * This code is derived from software contributed to Berkeley by + * Henry Spencer of the University of Toronto. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. Neither the name of the University nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * @(#)regex.h 8.2 (Berkeley) 1/3/94 + * $FreeBSD: src/include/regex.h,v 1.12 2010/02/16 19:39:50 imp Exp $ + */ + +#ifndef _SCHILY__REGEX_H +#define _SCHILY__REGEX_H + +#ifndef _SCHILY_MCONFIG_H +#include +#endif + +#ifndef _SCHILY_TYPES_H +#include +#endif + +#ifdef __cplusplus +extern "C" { +#endif + +#define __restrict + +/* types */ +typedef ssize_t regoff_t; + +typedef struct { + int re_magic; + size_t re_nsub; /* number of parenthesized subexpressions */ + const char *re_endp; /* end pointer for REG_PEND */ + struct re_guts *re_g; /* none of your business :-) */ +} regex_t; + +typedef struct { + regoff_t rm_so; /* start of match */ + regoff_t rm_eo; /* end of match */ +} regmatch_t; + +/* regcomp() flags */ +#define REG_BASIC 0000 +#define REG_EXTENDED 0001 +#define REG_ICASE 0002 +#define REG_NOSUB 0004 +#define REG_NEWLINE 0010 +#define REG_NOSPEC 0020 +#define REG_PEND 0040 +#define REG_DUMP 0200 + +/* regerror() flags */ +#define REG_ENOSYS (-1) +#define REG_NOMATCH 1 +#define REG_BADPAT 2 +#define REG_ECOLLATE 3 +#define REG_ECTYPE 4 +#define REG_EESCAPE 5 +#define REG_ESUBREG 6 +#define REG_EBRACK 7 +#define REG_EPAREN 8 +#define REG_EBRACE 9 +#define REG_BADBR 10 +#define REG_ERANGE 11 +#define REG_ESPACE 12 +#define REG_BADRPT 13 +#define REG_EMPTY 14 +#define REG_ASSERT 15 +#define REG_INVARG 16 +#define REG_ILLSEQ 17 +#define REG_ATOI 255 /* convert name to number (!) */ +#define REG_ITOA 0400 /* convert number to name (!) */ + +/* regexec() flags */ +#define REG_NOTBOL 00001 +#define REG_NOTEOL 00002 +#define REG_STARTEND 00004 +#define REG_TRACE 00400 /* tracing of execution */ +#define REG_LARGE 01000 /* force large representation */ +#define REG_BACKR 02000 /* force use of backref code */ + +extern int regcomp __PR((regex_t *__restrict, const char *__restrict, + int)); +extern size_t regerror __PR((int, const regex_t *__restrict, char *__restrict, + size_t)); +/* + * XXX forth parameter should be `regmatch_t [__restrict]', but isn't because + * of a bug in GCC 3.2 (when -std=c99 is specified) which perceives this as a + * syntax error. + */ +extern int regexec __PR((const regex_t *__restrict, const char *__restrict, + size_t, + regmatch_t *__restrict, int)); +extern void regfree __PR((regex_t *)); + +#undef __restrict + +#ifdef __cplusplus +} +#endif + +#endif /* _SCHILY__REGEX_H */ diff -Nru cdrtools-2.01.01a33/include/schily/regex.h cdrtools-3.02a09/include/schily/regex.h --- cdrtools-2.01.01a33/include/schily/regex.h 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/include/schily/regex.h 2010-05-07 17:20:25.000000000 +0000 @@ -0,0 +1,36 @@ +/* @(#)regex.h 1.1 10/05/07 Copyright 2010 J. Schilling */ +/* + * Abstraction from regex.h + * + * Copyright (c) 2010 J. Schilling + */ +/* + * The contents of this file are subject to the terms of the + * Common Development and Distribution License, Version 1.0 only + * (the "License"). You may not use this file except in compliance + * with the License. + * + * See the file CDDL.Schily.txt in this distribution for details. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file CDDL.Schily.txt from this distribution. + */ + +#ifndef _SCHILY_REGEX_H +#define _SCHILY_REGEX_H + +#ifndef _SCHILY_MCONFIG_H +#include +#endif + +#ifdef HAVE_REGEX_Ha +#ifndef _INCL_REGEX_H +#define _INCL_REGEX_H +#include +#endif +#else +#include +#endif + + +#endif /* _SCHILY_REGEX_H */ diff -Nru cdrtools-2.01.01a33/include/schily/_regex.mk cdrtools-3.02a09/include/schily/_regex.mk --- cdrtools-2.01.01a33/include/schily/_regex.mk 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/include/schily/_regex.mk 2010-05-07 17:05:59.000000000 +0000 @@ -0,0 +1,17 @@ +#ident "@(#)_regex.mk 1.1 10/05/07 " +########################################################################### +# Sample makefile for installing non-localized auxiliary files +########################################################################### +SRCROOT= ../.. +RULESDIR= RULES +include $(SRCROOT)/$(RULESDIR)/rules.top +########################################################################### + +INSDIR= include/schily +TARGET= _regex.h +#XMK_FILE= Makefile.man + +########################################################################### +include $(SRCROOT)/$(RULESDIR)/rules.aux +########################################################################### + diff -Nru cdrtools-2.01.01a33/include/schily/regex.mk cdrtools-3.02a09/include/schily/regex.mk --- cdrtools-2.01.01a33/include/schily/regex.mk 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/include/schily/regex.mk 2010-05-07 17:12:25.000000000 +0000 @@ -0,0 +1,17 @@ +#ident "@(#)regex.mk 1.1 10/05/07 " +########################################################################### +# Sample makefile for installing non-localized auxiliary files +########################################################################### +SRCROOT= ../.. +RULESDIR= RULES +include $(SRCROOT)/$(RULESDIR)/rules.top +########################################################################### + +INSDIR= include/schily +TARGET= regex.h +#XMK_FILE= Makefile.man + +########################################################################### +include $(SRCROOT)/$(RULESDIR)/rules.aux +########################################################################### + diff -Nru cdrtools-2.01.01a33/include/schily/resource.h cdrtools-3.02a09/include/schily/resource.h --- cdrtools-2.01.01a33/include/schily/resource.h 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/include/schily/resource.h 2015-08-14 20:52:33.000000000 +0000 @@ -0,0 +1,127 @@ +/* @(#)resource.h 1.11 15/08/14 Copyright 1995-2015 J. Schilling */ +/* + * Abstraction from resource limits + * + * Missing parts for wait3() taken from SunOS + * + * Copyright (c) 1995-2015 J. Schilling + */ +/* + * The contents of this file are subject to the terms of the + * Common Development and Distribution License, Version 1.0 only + * (the "License"). You may not use this file except in compliance + * with the License. + * + * See the file CDDL.Schily.txt in this distribution for details. + * A copy of the CDDL is also available via the Internet at + * http://www.opensource.org/licenses/cddl1.txt + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file CDDL.Schily.txt from this distribution. + */ + +#ifndef _SCHILY_RESOURCE_H +#define _SCHILY_RESOURCE_H + +#ifndef _SCHILY_MCONFIG_H +#include +#endif + +#ifndef _SCHILY_TIME_H +#include +#endif + +/* + * Get definitions from system include files + */ +#ifdef HAVE_SYS_RESOURCE_H +#ifndef _INCL_SYS_RESOURCE_H +#include +#define _INCL_SYS_RESOURCE_H +#endif +#endif + +#ifdef __cplusplus +extern "C" { +#endif + +/* + * Now check which definitions are missing and define them localy. + */ + +#ifndef RUSAGE_SELF +/* + * Resource utilization information. + */ + +#define RUSAGE_SELF 0 +#define RUSAGE_CHILDREN -1 + +#endif /* RUSAGE_SELF */ + +#ifndef HAVE_STRUCT_RUSAGE + +/* + * On a vanilla BSD system, all fields are set. + * On other systems, parts may not be supported. + * + * S: 0 means that the value is 0 on Solaris + * S: * means that the value is the sum of rm_asrss on Solaris + * + * POSIX and BeOS/Haiku define only ru_utime and ru_stime. + */ +struct rusage { + struct timeval ru_utime; /* user time used */ + struct timeval ru_stime; /* system time used */ + long ru_maxrss; /* maximum resident set size S: 0 */ +#define ru_first ru_ixrss + long ru_ixrss; /* integral shared memory size S: 0 */ + long ru_idrss; /* integral unshared data size S: * */ + long ru_isrss; /* integral unshared stack size S: 0 */ + long ru_minflt; /* any page faults not requiring I/O */ + long ru_majflt; /* any page faults requiring I/O */ + long ru_nswap; /* swaps */ + long ru_inblock; /* block input operations */ + long ru_oublock; /* block output operations */ + long ru_msgsnd; /* messages sent */ + long ru_msgrcv; /* messages received */ + long ru_nsignals; /* signals received */ + long ru_nvcsw; /* voluntary context switches */ + long ru_nivcsw; /* involuntary " */ +#define ru_last ru_nivcsw +}; +#endif /* HAVE_STRUCT_RUSAGE */ + +#ifndef RLIMIT_CPU +/* + * Resource limits + */ +#define RLIMIT_CPU 0 /* cpu time in milliseconds */ +#define RLIMIT_FSIZE 1 /* maximum file size */ +#define RLIMIT_DATA 2 /* data size */ +#define RLIMIT_STACK 3 /* stack size */ +#define RLIMIT_CORE 4 /* core file size */ +#define RLIMIT_RSS 5 /* resident set size */ + +#define RLIM_NLIMITS 6 /* number of resource limits */ + +#ifndef RLIM_INFINITY +#define RLIM_INFINITY 0x7fffffff +#endif + +#ifndef HAVE_TYPE_RLIM_T +#define rlim_t Intmax_t +#endif + +struct rlimit { + rlim_t rlim_cur; /* current (soft) limit */ + rlim_t rlim_max; /* maximum value for rlim_cur */ +}; + +#endif /* RLIMIT_CPU */ + +#ifdef __cplusplus +} +#endif + +#endif /* _SCHILY_RESOURCE_H */ diff -Nru cdrtools-2.01.01a33/include/schily/resource.mk cdrtools-3.02a09/include/schily/resource.mk --- cdrtools-2.01.01a33/include/schily/resource.mk 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/include/schily/resource.mk 2009-08-03 21:47:49.000000000 +0000 @@ -0,0 +1,17 @@ +#ident "@(#)resource.mk 1.1 09/08/03 " +########################################################################### +# Sample makefile for installing non-localized auxiliary files +########################################################################### +SRCROOT= ../.. +RULESDIR= RULES +include $(SRCROOT)/$(RULESDIR)/rules.top +########################################################################### + +INSDIR= include/schily +TARGET= resource.h +#XMK_FILE= Makefile.man + +########################################################################### +include $(SRCROOT)/$(RULESDIR)/rules.aux +########################################################################### + diff -Nru cdrtools-2.01.01a33/include/schily/rmd160.h cdrtools-3.02a09/include/schily/rmd160.h --- cdrtools-2.01.01a33/include/schily/rmd160.h 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/include/schily/rmd160.h 2010-08-27 11:02:40.000000000 +0000 @@ -0,0 +1,70 @@ +/* @(#)rmd160.h 1.5 10/08/27 2009-2010 J. Schilling */ +/* + * RMD160 hash code taken from OpenBSD + * + * Portions Copyright (c) 2009-2010 J. Schilling + */ +/* $OpenBSD: rmd160.h,v 1.16 2004/06/22 01:57:30 jfb Exp $ */ +/* + * Copyright (c) 2001 Markus Friedl. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +#ifndef _SCHILY_RMD160_H +#define _SCHILY_RMD160_H + +#ifndef _SCHILY_MCONFIG_H +#include +#endif +#include + +#ifdef __cplusplus +extern "C" { +#endif + +#define RMD160_BLOCK_LENGTH 64 +#define RMD160_DIGEST_LENGTH 20 +#define RMD160_DIGEST_STRING_LENGTH (RMD160_DIGEST_LENGTH * 2 + 1) + +/* RMD160 context. */ +typedef struct RMD160Context { + UInt32_t state[5]; /* state */ + UInt32_t count[2]; /* number of bits, mod 2^64 */ + UInt8_t buffer[RMD160_BLOCK_LENGTH]; /* input buffer */ +} RMD160_CTX; + +extern void RMD160Init __PR((RMD160_CTX *)); +extern void RMD160Transform __PR((UInt32_t [5], + const UInt8_t [RMD160_BLOCK_LENGTH])); +extern void RMD160Update __PR((RMD160_CTX *, const UInt8_t *, size_t)); +extern void RMD160Pad __PR((RMD160_CTX *)); +extern void RMD160Final __PR((UInt8_t [RMD160_DIGEST_LENGTH], + RMD160_CTX *)); +extern char *RMD160End __PR((RMD160_CTX *, char *)); +extern char *RMD160File __PR((const char *, char *)); +extern char *RMD160FileChunk __PR((const char *, char *, off_t, off_t)); +extern char *RMD160Data __PR((const UInt8_t *, size_t, char *)); + +#ifdef __cplusplus +} +#endif + +#endif /* _SCHILY_RMD160_H */ diff -Nru cdrtools-2.01.01a33/include/schily/rmd160.mk cdrtools-3.02a09/include/schily/rmd160.mk --- cdrtools-2.01.01a33/include/schily/rmd160.mk 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/include/schily/rmd160.mk 2009-08-08 20:32:15.000000000 +0000 @@ -0,0 +1,17 @@ +#ident "@(#)rmd160.mk 1.1 09/08/08 " +########################################################################### +# Sample makefile for installing non-localized auxiliary files +########################################################################### +SRCROOT= ../.. +RULESDIR= RULES +include $(SRCROOT)/$(RULESDIR)/rules.top +########################################################################### + +INSDIR= include/schily +TARGET= rmd160.h +#XMK_FILE= Makefile.man + +########################################################################### +include $(SRCROOT)/$(RULESDIR)/rules.aux +########################################################################### + diff -Nru cdrtools-2.01.01a33/include/schily/rmtio.h cdrtools-3.02a09/include/schily/rmtio.h --- cdrtools-2.01.01a33/include/schily/rmtio.h 2006-09-13 01:27:00.000000000 +0000 +++ cdrtools-3.02a09/include/schily/rmtio.h 2010-08-24 13:40:56.000000000 +0000 @@ -1,8 +1,8 @@ -/* @(#)rmtio.h 1.6 06/09/13 Copyright 1995,2000 J. Schilling */ +/* @(#)rmtio.h 1.7 10/08/24 Copyright 1995,2000-2010 J. Schilling */ /* * Definition for enhanced remote tape IO * - * Copyright (c) 1995,2000-2002 J. Schilling + * Copyright (c) 1995,2000-2010 J. Schilling */ /* * The contents of this file are subject to the terms of the @@ -26,6 +26,10 @@ #include #endif +#ifdef __cplusplus +extern "C" { +#endif + /* * values for mt_op */ @@ -149,4 +153,8 @@ #define MT_ISSTK9840 0x39 /* sun: STK 9840 (Ironsides) */ #endif +#ifdef __cplusplus +} +#endif + #endif /* _SCHILY_RMTIO_H */ diff -Nru cdrtools-2.01.01a33/include/schily/rmtio.mk cdrtools-3.02a09/include/schily/rmtio.mk --- cdrtools-2.01.01a33/include/schily/rmtio.mk 2006-12-17 21:52:12.000000000 +0000 +++ cdrtools-3.02a09/include/schily/rmtio.mk 2006-12-17 21:52:12.000000000 +0000 @@ -1,4 +1,4 @@ -#ident %W% %E% %Q% +#ident @(#)rmtio.mk 1.1 06/12/17 ########################################################################### # Sample makefile for installing non-localized auxiliary files ########################################################################### diff -Nru cdrtools-2.01.01a33/include/schily/schily.h cdrtools-3.02a09/include/schily/schily.h --- cdrtools-2.01.01a33/include/schily/schily.h 2007-04-03 16:41:25.000000000 +0000 +++ cdrtools-3.02a09/include/schily/schily.h 2017-09-21 12:23:52.000000000 +0000 @@ -1,4 +1,4 @@ -/* @(#)schily.h 1.67 07/04/03 Copyright 1985-2007 J. Schilling */ +/* @(#)schily.h 1.124 17/09/21 Copyright 1985-2017 J. Schilling */ /* * Definitions for libschily * @@ -18,7 +18,7 @@ * include ctype.h past schily/schily.h as OpenBSD does not follow POSIX * and defines EOF in ctype.h * - * Copyright (c) 1985-2007 J. Schilling + * Copyright (c) 1985-2017 J. Schilling */ /* * The contents of this file are subject to the terms of the @@ -27,6 +27,8 @@ * with the License. * * See the file CDDL.Schily.txt in this distribution for details. + * A copy of the CDDL is also available via the Internet at + * http://www.opensource.org/licenses/cddl1.txt * * When distributing Covered Code, include this CDDL HEADER in each * file and include the License file CDDL.Schily.txt from this distribution. @@ -35,6 +37,10 @@ #ifndef _SCHILY_SCHILY_H #define _SCHILY_SCHILY_H +#ifndef _SCHILY_MCONFIG_H +#include +#endif + #ifndef _SCHILY_STANDARD_H #include #endif @@ -46,12 +52,12 @@ extern "C" { #endif -#if defined(_INCL_SYS_TYPES_H) || defined(off_t) +#if defined(_INCL_SYS_TYPES_H) || defined(_INCL_TYPES_H) || defined(off_t) # ifndef FOUND_OFF_T # define FOUND_OFF_T # endif #endif -#if defined(_INCL_SYS_TYPES_H) || defined(size_t) +#if defined(_INCL_SYS_TYPES_H) || defined(_INCL_TYPES_H) || defined(size_t) # ifndef FOUND_SIZE_T # define FOUND_SIZE_T # endif @@ -95,41 +101,92 @@ # define _openfd _openfd64 #endif +/* + * The official POSIX rule is not to define "new" interfaces that + * are in conflict with older interfaces of the same name. + * Our interfaces fexec*() have been defined and published in 1982. + * The new POSIX interfaces define a different interface and the + * new POSIX interfaces even use names that are not compatible with + * POSIX rules. The new POSIX interfaces in question should be called + * fdexec*() to follow the rules of other similar POSIX functions. + * Simiar problems exist with getline()/fgetline(). + */ +#if defined(HAVE_RAW_FEXECL) || defined(HAVE_RAW_FEXECLE) || \ + defined(HAVE_RAW_FEXECV) || defined(HAVE_RAW_FEXECVE) +#define RENAME_FEXEC +#endif +#if defined(HAVE_RAW_FSPAWNV) || defined(HAVE_RAW_FSPAWNL) || \ + defined(HAVE_RAW_FSPAWNV_NOWAIT) +#define RENAME_FSPAWN +#endif +#if defined(HAVE_RAW_GETLINE) || defined(HAVE_RAW_FGETLINE) +#define RENAME_GETLINE +#endif + +#ifdef __needed__ +#define RENAME_FEXEC +#define RENAME_FSPAWN +#define RENAME_GETLINE +#endif + +#if defined(RENAME_FEXEC) || defined(RENAME_FSPAWN) +#ifndef _SCHILY_UNISTD_H +#include /* Need to incl. before fexec*() protoypes */ +#endif +#endif + +#if defined(RENAME_GETLINE) +#ifndef _SCHILY_STDIO_H +#include /* Need to incl. before *getline() protoypes */ +#endif + +#endif + #ifdef EOF /* stdio.h has been included */ extern int _cvmod __PR((const char *, int *, int *)); extern FILE *_fcons __PR((FILE *, int, int)); extern FILE *fdup __PR((FILE *)); +#if !defined(fdown) || defined(PROTOTYPES) +/* + * We cannot declare fdown() with K&R in case that fdown() has been #define'd + */ extern int fdown __PR((FILE *)); -extern int fexecl __PR((const char *, FILE *, FILE *, FILE *, +#endif +extern int js_fexecl __PR((const char *, FILE *, FILE *, FILE *, const char *, ...)); -extern int fexecle __PR((const char *, FILE *, FILE *, FILE *, +extern int js_fexecle __PR((const char *, FILE *, FILE *, FILE *, const char *, ...)); /* 6th arg not const, fexecv forces av[ac] = NULL */ -extern int fexecv __PR((const char *, FILE *, FILE *, FILE *, int, +extern int js_fexecv __PR((const char *, FILE *, FILE *, FILE *, int, char **)); -extern int fexecve __PR((const char *, FILE *, FILE *, FILE *, +extern int js_fexecve __PR((const char *, FILE *, FILE *, FILE *, char * const *, char * const *)); -extern int fspawnv __PR((FILE *, FILE *, FILE *, int, char * const *)); -extern int fspawnl __PR((FILE *, FILE *, FILE *, - const char *, const char *, ...)); -extern int fspawnv_nowait __PR((FILE *, FILE *, FILE *, +extern int js_fspawnv __PR((FILE *, FILE *, FILE *, int, char * const *)); +extern int js_fspawnl __PR((FILE *, FILE *, FILE *, const char *, ...)); +extern int js_fspawnv_nowait __PR((FILE *, FILE *, FILE *, const char *, int, char *const*)); -extern int fgetline __PR((FILE *, char *, int)); +extern int js_fgetline __PR((FILE *, char *, int)); +#ifdef FOUND_SIZE_T +extern ssize_t fgetaline __PR((FILE *, char **, size_t *)); +extern ssize_t getaline __PR((char **, size_t *)); +#endif extern int fgetstr __PR((FILE *, char *, int)); extern int file_getraise __PR((FILE *)); extern void file_raise __PR((FILE *, int)); extern int fileclose __PR((FILE *)); extern FILE *fileluopen __PR((int, const char *)); extern FILE *fileopen __PR((const char *, const char *)); -#ifdef _INCL_SYS_TYPES_H +#ifdef _SCHILY_TYPES_H extern FILE *filemopen __PR((const char *, const char *, mode_t)); #endif #ifdef FOUND_OFF_T extern off_t filepos __PR((FILE *)); #endif -extern int fileread __PR((FILE *, void *, int)); -extern int ffileread __PR((FILE *, void *, int)); +#ifdef FOUND_SIZE_T +extern ssize_t fileread __PR((FILE *, void *, size_t)); +extern ssize_t ffileread __PR((FILE *, void *, size_t)); +#endif extern FILE *filereopen __PR((const char *, const char *, FILE *)); #ifdef FOUND_OFF_T extern int fileseek __PR((FILE *, off_t)); @@ -138,11 +195,15 @@ #ifdef S_IFMT extern int filestat __PR((FILE *, struct stat *)); #endif -extern int filewrite __PR((FILE *, void *, int)); -extern int ffilewrite __PR((FILE *, void *, int)); +#ifdef FOUND_SIZE_T +extern ssize_t filewrite __PR((FILE *, void *, size_t)); +extern ssize_t ffilewrite __PR((FILE *, void *, size_t)); +#endif extern int flush __PR((void)); extern int fpipe __PR((FILE **)); -/*extern int fprintf __PR((FILE *, const char *, ...)) __printflike__(2, 3);*/ +#ifdef __never__ +extern int fprintf __PR((FILE *, const char *, ...)) __printflike__(2, 3); +#endif extern int getbroken __PR((FILE *, char *, char, char **, int)); extern int ofindline __PR((FILE *, char, const char *, int, char **, int)); @@ -153,13 +214,60 @@ * We cannot define this or we may get into problems with DOS based systems. */ extern int spawnv __PR((FILE *, FILE *, FILE *, int, char * const *)); -extern int spawnl __PR((FILE *, FILE *, FILE *, - const char *, const char *, ...)); +extern int spawnl __PR((FILE *, FILE *, FILE *, const char *, ...)); extern int spawnv_nowait __PR((FILE *, FILE *, FILE *, const char *, int, char *const*)); #endif /* __never_def__ */ #endif /* EOF */ +/* + * Flags for absfpath() and resolvefpath(): + */ +#define RSPF_EXIST 0x01 /* All path components must exist */ +#define RSPF_NOFOLLOW_LAST 0x02 /* Don't follow link in last pathcomp */ + +#ifdef FOUND_SIZE_T +extern char *abspath __PR((const char *relp, char *absp, size_t asize)); +extern char *absnpath __PR((const char *relp, char *absp, size_t asize)); +extern char *absfpath __PR((const char *relp, char *absp, size_t asize, + int __flags)); +#ifndef HAVE_RESOLVEPATH +extern int resolvepath __PR((const char *__path, + char *__buf, size_t __bufsiz)); +#endif +extern int resolvenpath __PR((const char *__path, + char *__buf, size_t __bufsiz)); +extern int resolvefpath __PR((const char *__path, + char *__buf, size_t __bufsiz, int __flags)); +#endif + +#ifdef _SCHILY_TYPES_H +extern int mkdirs __PR((char *, mode_t)); +extern int makedirs __PR((char *, mode_t, int __striplast)); +#endif + +extern int lxchdir __PR((char *)); +#ifdef HAVE_FCHDIR +#define fdsetname(fd, name) (0) +#define fdclosename(fd) (0) +#else +extern int fdsetname __PR((int fd, const char *name)); +extern int fdclosename __PR((int fd)); +#endif +extern int diropen __PR((const char *)); +extern int dirrdopen __PR((const char *)); +extern int dirclose __PR((int)); + +struct save_wd { + int fd; + char *name; +}; + +extern int savewd __PR((struct save_wd *sp)); +extern void closewd __PR((struct save_wd *sp)); +extern int restorewd __PR((struct save_wd *sp)); + + #ifdef _SCHILY_UTYPES_H typedef struct gnmult { char key; @@ -175,55 +283,111 @@ extern int getllxtnum __PR((char *arg, Llong *lvalp, gnmult_t *mult)); #endif extern int getnum __PR((char *arg, long *valp)); -#ifdef _SCHILY_TYPES_H +#ifdef _SCHILY_TIME_H extern int gettnum __PR((char *arg, time_t *valp)); #endif -extern int _niread __PR((int, void *, int)); -extern int _niwrite __PR((int, void *, int)); -extern int _nixread __PR((int, void *, int)); -extern int _nixwrite __PR((int, void *, int)); +#ifdef _SCHILY_TIME_H + +extern int getnstimeofday __PR((struct timespec *__tp)); +extern int setnstimeofday __PR((struct timespec *__tp)); + +#ifdef _SCHILY_UTYPES_H +extern Llong mklgmtime __PR((struct tm *)); +#endif +extern time_t mkgmtime __PR((struct tm *)); +#endif + + +#ifdef EOF /* stdio.h has been included */ +#ifdef _SCHILY_TYPES_H +/* + * getperm() flags: + */ +#define GP_NOX 0 /* This is not a dir and 'X' is not valid */ +#define GP_DOX 1 /* 'X' perm character is valid */ +#define GP_XERR 2 /* 'X' perm characters are invalid */ +#define GP_FPERM 4 /* TRUE if we implement find -perm */ +#define GP_UMASK 8 /* TRUE if we implement umask */ + +extern int getperm __PR((FILE *f, char *perm, char *opname, \ + mode_t *modep, int smode, int flag)); +extern void permtostr __PR((mode_t mode, char *)); +#endif +#endif + +#ifdef FOUND_SIZE_T +extern ssize_t _niread __PR((int, void *, size_t)); +extern ssize_t _niwrite __PR((int, void *, size_t)); +extern ssize_t _nixread __PR((int, void *, size_t)); +extern ssize_t _nixwrite __PR((int, void *, size_t)); +#endif extern int _openfd __PR((const char *, int)); extern int on_comerr __PR((void (*fun)(int, void *), void *arg)); /*PRINTFLIKE1*/ extern void comerr __PR((const char *, ...)) __printflike__(1, 2); /*PRINTFLIKE2*/ +extern void xcomerr __PR((int, const char *, ...)) __printflike__(2, 3); +/*PRINTFLIKE2*/ extern void comerrno __PR((int, const char *, ...)) __printflike__(2, 3); +/*PRINTFLIKE3*/ +extern void xcomerrno __PR((int, int, const char *, ...)) __printflike__(3, 4); /*PRINTFLIKE1*/ extern int errmsg __PR((const char *, ...)) __printflike__(1, 2); /*PRINTFLIKE2*/ extern int errmsgno __PR((int, const char *, ...)) __printflike__(2, 3); #ifdef FOUND_SIZE_T /*PRINTFLIKE3*/ -extern int serrmsg __PR((char *, size_t, const char *, ...)) __printflike__(3, 4); +extern int serrmsg __PR((char *, size_t, const char *, ...)) + __printflike__(3, 4); /*PRINTFLIKE4*/ -extern int serrmsgno __PR((int, char *, size_t, const char *, ...)) __printflike__(4, 5); +extern int serrmsgno __PR((int, char *, size_t, const char *, ...)) + __printflike__(4, 5); #endif extern void comexit __PR((int)); extern char *errmsgstr __PR((int)); #ifdef EOF /* stdio.h has been included */ /*PRINTFLIKE2*/ -extern void fcomerr __PR((FILE *, const char *, ...)) __printflike__(2, 3); +extern void fcomerr __PR((FILE *, const char *, ...)) + __printflike__(2, 3); /*PRINTFLIKE3*/ -extern void fcomerrno __PR((FILE *, int, const char *, ...)) __printflike__(3, 4); +extern void fxcomerr __PR((FILE *, int, const char *, ...)) + __printflike__(3, 4); +/*PRINTFLIKE3*/ +extern void fcomerrno __PR((FILE *, int, const char *, ...)) + __printflike__(3, 4); +/*PRINTFLIKE4*/ +extern void fxcomerrno __PR((FILE *, int, int, const char *, ...)) + __printflike__(4, 5); /*PRINTFLIKE2*/ -extern int ferrmsg __PR((FILE *, const char *, ...)) __printflike__(2, 3); +extern int ferrmsg __PR((FILE *, const char *, ...)) + __printflike__(2, 3); /*PRINTFLIKE3*/ -extern int ferrmsgno __PR((FILE *, int, const char *, ...)) __printflike__(3, 4); +extern int ferrmsgno __PR((FILE *, int, const char *, ...)) + __printflike__(3, 4); #ifdef _SCHILY_VARARGS_H -/*PRINTFLIKE4*/ -extern int _comerr __PR((FILE *, int, int, const char *, va_list)); +#define COMERR_RETURN 0 /* Do not exit, return only */ +#define COMERR_EXIT 1 /* Exit program, map (X % 256) != X to -64 */ +#define COMERR_EXCODE 2 /* Exit program, do not map exit codes */ +/*PRINTFLIKE5*/ +extern int _comerr __PR((FILE *, int, int, int, + const char *, va_list)); #endif #endif /*PRINTFLIKE1*/ extern int error __PR((const char *, ...)) __printflike__(1, 2); -extern char *fillbytes __PR((void *, int, char)); -extern char *findbytes __PR((const void *, int, char)); +#ifdef FOUND_SIZE_T +extern char *fillbytes __PR((void *, ssize_t, char)); +extern char *zerobytes __PR((void *, ssize_t)); +extern char *findbytes __PR((const void *, ssize_t, char)); +#endif +extern char *findinpath __PR((char *__name, int __mode, + BOOL __plain_file, char *__path)); extern int findline __PR((const char *, char, const char *, int, char **, int)); -extern int getline __PR((char *, int)); +extern int js_getline __PR((char *, int)); extern int getstr __PR((char *, int)); extern int breakline __PR((char *, char, char **, int)); extern int getallargs __PR((int *, char * const**, const char *, ...)); @@ -239,75 +403,116 @@ extern char *astoullb __PR((const char *, Ullong *, int)); #endif -/*extern void handlecond __PR((const char *, SIGBLK *, int(*)(const char *, long, long), long));*/ -/*extern void unhandlecond __PR((SIGBLK *));*/ - extern int patcompile __PR((const unsigned char *, int, int *)); extern unsigned char *patmatch __PR((const unsigned char *, const int *, - const unsigned char *, int, int, int, int[])); + const unsigned char *, + int, int, int, int[])); extern unsigned char *patlmatch __PR((const unsigned char *, const int *, - const unsigned char *, int, int, int, int[])); + const unsigned char *, + int, int, int, int[])); -/*extern int printf __PR((const char *, ...)) __printflike__(1, 2);*/ -extern char *movebytes __PR((const void *, void *, int)); +#ifdef __never__ +extern int printf __PR((const char *, ...)) __printflike__(1, 2); +#endif +#ifdef FOUND_SIZE_T +extern char *movebytes __PR((const void *, void *, ssize_t)); +extern char *movecbytes __PR((const void *, void *, int, size_t)); +#endif extern void save_args __PR((int, char **)); extern int saved_ac __PR((void)); extern char **saved_av __PR((void)); extern char *saved_av0 __PR((void)); +extern char *searchfileinpath __PR((char *__name, int __mode, + int __file_mode, char *__path)); +#define SIP_ANY_FILE 0x00 /* Search for any file type */ +#define SIP_PLAIN_FILE 0x01 /* Search for plain files - not dirs */ +#define SIP_NO_PATH 0x10 /* Do not do PATH search */ +#define SIP_ONLY_PATH 0x20 /* Do only PATH search */ +#define SIP_NO_STRIPBIN 0x40 /* Do not strip "/bin" from PATH elem. */ +#define SIP_TYPE_MASK 0x0F /* Mask file type related bits */ + #ifndef seterrno extern int seterrno __PR((int)); #endif extern void set_progname __PR((const char *)); extern char *get_progname __PR((void)); +extern char *get_progpath __PR((void)); +extern char *getexecpath __PR((void)); extern void setfp __PR((void * const *)); extern int wait_chld __PR((int)); /* for fspawnv_nowait() */ extern int geterrno __PR((void)); extern void raisecond __PR((const char *, long)); -#ifdef FOUND_SIZE_T +#ifdef __never__ /* - * We currently cannot define this here because there IXIX has a definition - * than violates the standard. + * sprintf() may be declared incorrectly somewhere else + * e.g. in old BSD include files */ -#ifndef HAVE_SNPRINTF -/*PRINTFLIKE3*/ -extern int snprintf __PR((char *, size_t, const char *, ...)) __printflike__(3, 4); -#endif +extern int sprintf __PR((char *, const char *, ...)); #endif -/*extern int sprintf __PR((char *, const char *, ...)); ist woanders falsch deklariert !!!*/ extern char *strcatl __PR((char *, ...)); +#ifdef FOUND_SIZE_T +extern size_t strlcatl __PR((char *, size_t, ...)); +#endif extern int streql __PR((const char *, const char *)); +#ifdef _SCHILY_WCHAR_H +extern wchar_t *wcscatl __PR((wchar_t *, ...)); +#ifdef FOUND_SIZE_T +extern size_t wcslcatl __PR((wchar_t *, size_t, ...)); +#endif +extern int wcseql __PR((const wchar_t *, const wchar_t *)); +#endif #ifdef va_arg -extern int format __PR((void (*)(char, long), long, const char *, va_list)); +extern int format __PR((void (*)(char, void *), void *, const char *, + va_list)); +extern int fprformat __PR((void *, const char *, va_list)); #else -extern int format __PR((void (*)(char, long), long, const char *, void *)); +extern int format __PR((void (*)(char, void *), void *, const char *, void *)); +extern int fprformat __PR((void *, const char *, void *)); #endif extern int ftoes __PR((char *, double, int, int)); extern int ftofs __PR((char *, double, int, int)); +#ifdef HAVE_LONGDOUBLE +extern int qftoes __PR((char *, long double, int, int)); +extern int qftofs __PR((char *, long double, int, int)); +#endif +/*PRINTFLIKE1*/ +extern int js_error __PR((const char *, ...)) __printflike__(1, 2); +/*PRINTFLIKE2*/ +extern int js_dprintf __PR((int, const char *, ...)) + __printflike__(2, 3); #ifdef EOF /* stdio.h has been included */ /*PRINTFLIKE2*/ -extern int js_fprintf __PR((FILE *, const char *, ...)) __printflike__(2, 3); +extern int js_fprintf __PR((FILE *, const char *, ...)) + __printflike__(2, 3); +#endif /* EOF */ /*PRINTFLIKE1*/ extern int js_printf __PR((const char *, ...)) __printflike__(1, 2); #ifdef FOUND_SIZE_T /*PRINTFLIKE3*/ -extern int js_snprintf __PR((char *, size_t, const char *, ...)) __printflike__(3, 4); +extern int js_snprintf __PR((char *, size_t, const char *, ...)) + __printflike__(3, 4); #endif /*PRINTFLIKE2*/ -extern int js_sprintf __PR((char *, const char *, ...)) __printflike__(2, 3); -#endif /* EOF */ +extern int js_sprintf __PR((char *, const char *, ...)) + __printflike__(2, 3); -extern void swabbytes __PR((void *, int)); +#ifdef FOUND_SIZE_T +extern void swabbytes __PR((void *, ssize_t)); +#endif extern char **getmainfp __PR((void)); extern char **getavp __PR((void)); extern char *getav0 __PR((void)); extern void **getfp __PR((void)); extern int flush_reg_windows __PR((int)); -extern int cmpbytes __PR((const void *, const void *, int)); -extern int cmpnullbytes __PR((const void *, int)); +#ifdef FOUND_SIZE_T +extern ssize_t cmpbytes __PR((const void *, const void *, ssize_t)); +extern int cmpmbytes __PR((const void *, const void *, ssize_t)); +extern ssize_t cmpnullbytes __PR((const void *, ssize_t)); +#endif #ifdef nonono #if defined(HAVE_LARGEFILES) @@ -333,7 +538,14 @@ #endif #endif +#ifndef NO_SCHILY_PRINT /* Define to disable *printf() redirects */ #ifdef SCHILY_PRINT +#ifdef __never__ +#undef error +#define error js_error +#endif /* __never__ */ +#undef dprintf +#define dprintf js_dprintf #undef fprintf #define fprintf js_fprintf #undef printf @@ -346,10 +558,38 @@ #ifndef HAVE_SNPRINTF #undef snprintf #define snprintf js_snprintf -#endif +#endif /* HAVE_SNPRINTF */ +#endif /* SCHILY_PRINT */ +#endif /* NO_SCHILY_PRINT */ + +#ifndef NO_SCHILY_GETLINE /* Define to disable *getline() redirect */ +#undef getline +#define getline js_getline +#undef fgetline +#define fgetline js_fgetline +#endif + +#ifndef NO_SCHILY_FEXEC /* Define to disable fexec*() redirect */ +#undef fexecl +#define fexecl js_fexecl +#undef fexecle +#define fexecle js_fexecle +#undef fexecv +#define fexecv js_fexecv +#undef fexecve +#define fexecve js_fexecve +#endif + +#ifndef NO_SCHILY_FSPAWN /* Define to disable fspawn*() redirect */ +#undef fspawnv +#define fspawnv js_fspawnv +#undef fspawnv_nowait +#define fspawnv_nowait js_fspawnv_nowait +#undef fspawnl +#define fspawnl js_fspawnl #endif - +extern int js_mexval __PR((int exval)); #ifdef FOUND_SIZE_T extern void *js_malloc __PR((size_t size, char *msg)); extern void *js_realloc __PR((void *ptr, size_t size, char *msg)); @@ -359,33 +599,43 @@ #ifdef _SCHILY_JMPDEFS_H /* - * Special valued for the "jmp" parameter. + * Special values for the "jmp" parameter. + * + * Control how the siglongjmp() should be handled: */ -#define JM_EXIT ((sigjmps_t *)-1) /* Call comexit(errno) instead of siglongjmp() */ -#define JM_RETURN ((sigjmps_t *)0) /* Return instead of calling siglongjmp() */ +#define JM_EXIT ((sigjmps_t *)-1) /* Call comexit(errno) instead */ +#define JM_RETURN ((sigjmps_t *)0) /* Return instead */ +extern int js_jmexval __PR((int exval)); #ifdef FOUND_SIZE_T extern void *js_jmalloc __PR((size_t size, char *msg, sigjmps_t *jmp)); -extern void *js_jrealloc __PR((void *ptr, size_t size, char *msg, sigjmps_t *jmp)); +extern void *js_jrealloc __PR((void *ptr, size_t size, char *msg, + sigjmps_t *jmp)); #endif extern char *js_jsavestr __PR((const char *s, sigjmps_t *jmp)); +extern int js_fjmexval __PR((int exval)); #ifdef EOF /* stdio.h has been included */ #ifdef FOUND_SIZE_T -extern void *js_fjmalloc __PR((FILE *f, size_t size, char *msg, sigjmps_t *jmp)); -extern void *js_fjrealloc __PR((FILE *f, void *ptr, size_t size, char *msg, sigjmps_t *jmp)); +extern void *js_fjmalloc __PR((FILE *f, size_t size, char *msg, + sigjmps_t *jmp)); +extern void *js_fjrealloc __PR((FILE *f, void *ptr, size_t size, + char *msg, sigjmps_t *jmp)); #endif extern char *js_fjsavestr __PR((FILE *f, const char *s, sigjmps_t *jmp)); #endif /* EOF */ #endif /* _SCHILY_JMPDEFS_H */ -#define __malloc js_malloc -#define __realloc js_realloc -#define __savestr js_savestr +#define ___mexval js_mexval +#define ___malloc js_malloc +#define ___realloc js_realloc +#define ___savestr js_savestr +#define __jmexval js_jmexval #define __jmalloc js_jmalloc #define __jrealloc js_jrealloc #define __jsavestr js_jsavestr #define __fjmalloc js_fjmalloc +#define __fjmexval js_fjmexval #define __fjrealloc js_fjrealloc #define __fjsavestr js_fjsavestr @@ -399,4 +649,11 @@ # endif #endif +#if !defined(_SCHILY_LIBPORT_H) && !defined(NO_LIBPORT_H) +#include +#endif +#if !defined(_SCHILY_HOSTNAME_H) && defined(USE_HOSTNAME_H) +#include +#endif + #endif /* _SCHILY_SCHILY_H */ diff -Nru cdrtools-2.01.01a33/include/schily/schily.mk cdrtools-3.02a09/include/schily/schily.mk --- cdrtools-2.01.01a33/include/schily/schily.mk 2006-12-17 21:52:12.000000000 +0000 +++ cdrtools-3.02a09/include/schily/schily.mk 2006-12-17 21:52:12.000000000 +0000 @@ -1,4 +1,4 @@ -#ident %W% %E% %Q% +#ident @(#)schily.mk 1.1 06/12/17 ########################################################################### # Sample makefile for installing non-localized auxiliary files ########################################################################### diff -Nru cdrtools-2.01.01a33/include/schily/schilyp.h cdrtools-3.02a09/include/schily/schilyp.h --- cdrtools-2.01.01a33/include/schily/schilyp.h 2007-02-13 14:55:19.000000000 +0000 +++ cdrtools-3.02a09/include/schily/schilyp.h 2009-06-05 23:07:39.000000000 +0000 @@ -1,8 +1,8 @@ -/* @(#)schilyp.h 1.1 07/02/13 Copyright 2007 J. Schilling */ +/* @(#)schilyp.h 1.2 09/06/06 Copyright 2007-2009 J. Schilling */ /* * Include definitions for libschily and define *printf() -> js_*printf() * - * Copyright (c) 2007 J. Schilling + * Copyright (c) 2007-2009 J. Schilling */ /* * The contents of this file are subject to the terms of the @@ -19,6 +19,10 @@ #ifndef _SCHILY_SCHILYP_H #define _SCHILY_SCHILYP_H +#ifndef _SCHILY_MCONFIG_H +#include +#endif + #ifndef _SCHILY_SCHILY_H #include #endif diff -Nru cdrtools-2.01.01a33/include/schily/schilyp.mk cdrtools-3.02a09/include/schily/schilyp.mk --- cdrtools-2.01.01a33/include/schily/schilyp.mk 2007-02-13 14:58:00.000000000 +0000 +++ cdrtools-3.02a09/include/schily/schilyp.mk 2007-02-13 14:58:00.000000000 +0000 @@ -1,4 +1,4 @@ -#ident %W% %E% %Q% +#ident @(#)schilyp.mk 1.1 07/02/13 ########################################################################### # Sample makefile for installing non-localized auxiliary files ########################################################################### diff -Nru cdrtools-2.01.01a33/include/schily/select.h cdrtools-3.02a09/include/schily/select.h --- cdrtools-2.01.01a33/include/schily/select.h 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/include/schily/select.h 2009-08-04 19:56:46.000000000 +0000 @@ -0,0 +1,48 @@ +/* @(#)select.h 1.1 09/08/04 Copyright 2009 J. Schilling */ +/* + * Select abstraction + * + * Copyright (c) 2009 J. Schilling + */ +/* + * The contents of this file are subject to the terms of the + * Common Development and Distribution License, Version 1.0 only + * (the "License"). You may not use this file except in compliance + * with the License. + * + * See the file CDDL.Schily.txt in this distribution for details. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file CDDL.Schily.txt from this distribution. + */ + +#ifndef _SCHILY_SELECT_H +#define _SCHILY_SELECT_H + +#ifndef _SCHILY_MCONFIG_H +#include +#endif +#ifndef _SCHILY_TYPES_H +#include +#endif +#ifndef _SCHILY_TIME_H +#include +#endif + +#ifdef HAVE_SYS_SELECT_H +#ifndef _INCL_SYS_SELECT_H +#include +#define _INCL_SYS_SELECT_H +#endif +#endif + +/* + * Some systems need sys/socket.h instead or in addition to sys/select.h + */ +#ifdef NEED_SYS_SOCKET_H +#ifndef _SCHILY_SOCKET_H +#include +#endif +#endif + +#endif /* _SCHILY_SELECT_H */ diff -Nru cdrtools-2.01.01a33/include/schily/select.mk cdrtools-3.02a09/include/schily/select.mk --- cdrtools-2.01.01a33/include/schily/select.mk 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/include/schily/select.mk 2009-08-04 19:56:46.000000000 +0000 @@ -0,0 +1,17 @@ +#ident "@(#)select.mk 1.1 09/08/04 " +########################################################################### +# Sample makefile for installing non-localized auxiliary files +########################################################################### +SRCROOT= ../.. +RULESDIR= RULES +include $(SRCROOT)/$(RULESDIR)/rules.top +########################################################################### + +INSDIR= include/schily +TARGET= select.h +#XMK_FILE= Makefile.man + +########################################################################### +include $(SRCROOT)/$(RULESDIR)/rules.aux +########################################################################### + diff -Nru cdrtools-2.01.01a33/include/schily/sem.h cdrtools-3.02a09/include/schily/sem.h --- cdrtools-2.01.01a33/include/schily/sem.h 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/include/schily/sem.h 2009-08-07 23:15:16.000000000 +0000 @@ -0,0 +1,33 @@ +/* @(#)sem.h 1.1 09/08/08 Copyright 2009 J. Schilling */ +/* + * Abstraction code for sem.h + * + * Copyright (c) 2009 J. Schilling + */ +/* + * The contents of this file are subject to the terms of the + * Common Development and Distribution License, Version 1.0 only + * (the "License"). You may not use this file except in compliance + * with the License. + * + * See the file CDDL.Schily.txt in this distribution for details. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file CDDL.Schily.txt from this distribution. + */ + +#ifndef _SCHILY_SEM_H +#define _SCHILY_SEM_H + +#ifndef _SCHILY_MCONFIG_H +#include +#endif + +#ifdef HAVE_SYS_SEM_H +#ifndef _INCL_SYS_SEM_H +#define _INCL_SYS_SEM_H +#include +#endif +#endif + +#endif /* _SCHILY_SEM_H */ diff -Nru cdrtools-2.01.01a33/include/schily/sem.mk cdrtools-3.02a09/include/schily/sem.mk --- cdrtools-2.01.01a33/include/schily/sem.mk 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/include/schily/sem.mk 2009-08-07 23:15:16.000000000 +0000 @@ -0,0 +1,17 @@ +#ident "@(#)sem.mk 1.1 09/08/08 " +########################################################################### +# Sample makefile for installing non-localized auxiliary files +########################################################################### +SRCROOT= ../.. +RULESDIR= RULES +include $(SRCROOT)/$(RULESDIR)/rules.top +########################################################################### + +INSDIR= include/schily +TARGET= sem.h +#XMK_FILE= Makefile.man + +########################################################################### +include $(SRCROOT)/$(RULESDIR)/rules.aux +########################################################################### + diff -Nru cdrtools-2.01.01a33/include/schily/setjmp.h cdrtools-3.02a09/include/schily/setjmp.h --- cdrtools-2.01.01a33/include/schily/setjmp.h 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/include/schily/setjmp.h 2009-07-13 18:04:37.000000000 +0000 @@ -0,0 +1,31 @@ +/* @(#)setjmp.h 1.1 09/07/13 Copyright 2009 J. Schilling */ +/* + * Setjmp abstraction + * + * Copyright (c) 2009 J. Schilling + */ +/* + * The contents of this file are subject to the terms of the + * Common Development and Distribution License, Version 1.0 only + * (the "License"). You may not use this file except in compliance + * with the License. + * + * See the file CDDL.Schily.txt in this distribution for details. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file CDDL.Schily.txt from this distribution. + */ + +#ifndef _SCHILY_SETJMP_H +#define _SCHILY_SETJMP_H + +#ifndef _SCHILY_MCONFIG_H +#include +#endif + +#ifndef _INCL_SETJMP_H +#define _INCL_SETJMP_H +#include +#endif + +#endif /* _SCHILY_SETJMP_H */ diff -Nru cdrtools-2.01.01a33/include/schily/setjmp.mk cdrtools-3.02a09/include/schily/setjmp.mk --- cdrtools-2.01.01a33/include/schily/setjmp.mk 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/include/schily/setjmp.mk 2009-07-13 17:25:18.000000000 +0000 @@ -0,0 +1,17 @@ +#ident "@(#)setjmp.mk 1.1 09/07/13 " +########################################################################### +# Sample makefile for installing non-localized auxiliary files +########################################################################### +SRCROOT= ../.. +RULESDIR= RULES +include $(SRCROOT)/$(RULESDIR)/rules.top +########################################################################### + +INSDIR= include/schily +TARGET= setjmp.h +#XMK_FILE= Makefile.man + +########################################################################### +include $(SRCROOT)/$(RULESDIR)/rules.aux +########################################################################### + diff -Nru cdrtools-2.01.01a33/include/schily/sha1.h cdrtools-3.02a09/include/schily/sha1.h --- cdrtools-2.01.01a33/include/schily/sha1.h 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/include/schily/sha1.h 2010-08-27 11:03:30.000000000 +0000 @@ -0,0 +1,70 @@ +/* @(#)sha1.h 1.4 10/08/27 2010 J. Schilling */ +/* + * SHA1 hash code taken from OpenBSD + * + * Portions Copyright (c) 2010 J. Schilling + */ + +/* $OpenBSD: sha1.h,v 1.23 2004/06/22 01:57:30 jfb Exp $ */ + +/* + * SHA-1 in C + * By Steve Reid + * 100% Public Domain + */ + +#ifndef _SCHILY_SHA1_H +#define _SCHILY_SHA1_H + +#ifndef _SCHILY_MCONFIG_H +#include +#endif +#ifndef _SCHILY_UTYPES_H +#include +#endif + +#define SHA1_BLOCK_LENGTH 64 +#define SHA1_DIGEST_LENGTH 20 +#define SHA1_DIGEST_STRING_LENGTH (SHA1_DIGEST_LENGTH * 2 + 1) + +typedef struct { + UInt32_t state[5]; + UInt32_t count[2]; + UInt8_t buffer[SHA1_BLOCK_LENGTH]; +} SHA1_CTX; + +#ifdef __cplusplus +extern "C" { +#endif + +extern void SHA1Init __PR((SHA1_CTX *)); +extern void SHA1Pad __PR((SHA1_CTX *)); +extern void SHA1Transform __PR((UInt32_t [5], + const UInt8_t [SHA1_BLOCK_LENGTH])); +extern void SHA1Update __PR((SHA1_CTX *, const UInt8_t *, size_t)); +extern void SHA1Final __PR((UInt8_t [SHA1_DIGEST_LENGTH], + SHA1_CTX *)); +extern char *SHA1End __PR((SHA1_CTX *, char *)); +extern char *SHA1File __PR((const char *, char *)); +extern char *SHA1FileChunk __PR((const char *, char *, off_t, off_t)); +extern char *SHA1Data __PR((const UInt8_t *, size_t, char *)); + +#ifdef __cplusplus +} +#endif + +#define HTONDIGEST(x) do { \ + x[0] = htonl(x[0]); \ + x[1] = htonl(x[1]); \ + x[2] = htonl(x[2]); \ + x[3] = htonl(x[3]); \ + x[4] = htonl(x[4]); } while (0) + +#define NTOHDIGEST(x) do { \ + x[0] = ntohl(x[0]); \ + x[1] = ntohl(x[1]); \ + x[2] = ntohl(x[2]); \ + x[3] = ntohl(x[3]); \ + x[4] = ntohl(x[4]); } while (0) + +#endif /* _SCHILY_SHA1_H */ diff -Nru cdrtools-2.01.01a33/include/schily/sha1.mk cdrtools-3.02a09/include/schily/sha1.mk --- cdrtools-2.01.01a33/include/schily/sha1.mk 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/include/schily/sha1.mk 2009-08-01 18:24:43.000000000 +0000 @@ -0,0 +1,17 @@ +#ident "@(#)sha1.mk 1.1 09/08/01 " +########################################################################### +# Sample makefile for installing non-localized auxiliary files +########################################################################### +SRCROOT= ../.. +RULESDIR= RULES +include $(SRCROOT)/$(RULESDIR)/rules.top +########################################################################### + +INSDIR= include/schily +TARGET= sha1.h +#XMK_FILE= Makefile.man + +########################################################################### +include $(SRCROOT)/$(RULESDIR)/rules.aux +########################################################################### + diff -Nru cdrtools-2.01.01a33/include/schily/sha2.h cdrtools-3.02a09/include/schily/sha2.h --- cdrtools-2.01.01a33/include/schily/sha2.h 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/include/schily/sha2.h 2010-08-27 10:41:30.000000000 +0000 @@ -0,0 +1,135 @@ +/* @(#)sha2.h 1.5 10/08/27 2009-2010 J. Schilling */ +/* + * SHA2 hash code taken from OpenBSD + * + * Portions Copyright (c) 2009-2010 J. Schilling + */ + +/* $OpenBSD: sha2.h,v 1.7 2008/09/06 12:00:19 djm Exp $ */ + +/* + * FILE: sha2.h + * AUTHOR: Aaron D. Gifford + * + * Copyright (c) 2000-2001, Aaron D. Gifford + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. Neither the name of the copyright holder nor the names of contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTOR(S) ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTOR(S) BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $From: sha2.h,v 1.1 2001/11/08 00:02:01 adg Exp adg $ + */ + +#ifndef _SCHILY_SHA2_H +#define _SCHILY_SHA2_H + +#ifndef _SCHILY_MCONFIG_H +#include +#endif +#include + + +/* ** SHA-256/384/512 Various Length Definitions ********************** */ +#define SHA256_BLOCK_LENGTH 64 +#define SHA256_DIGEST_LENGTH 32 +#define SHA256_DIGEST_STRING_LENGTH (SHA256_DIGEST_LENGTH * 2 + 1) +#ifdef HAVE_LONGLONG +#define SHA384_BLOCK_LENGTH 128 +#define SHA384_DIGEST_LENGTH 48 +#define SHA384_DIGEST_STRING_LENGTH (SHA384_DIGEST_LENGTH * 2 + 1) +#define SHA512_BLOCK_LENGTH 128 +#define _SHA512_BLOCK_LENGTH 128 +#define SHA512_DIGEST_LENGTH 64 +#define SHA512_DIGEST_STRING_LENGTH (SHA512_DIGEST_LENGTH * 2 + 1) +#else +#define _SHA512_BLOCK_LENGTH 128 +#endif + + +/* ** SHA-256/384/512 Context Structure ****************************** */ +typedef struct _SHA2_CTX { + union { + UInt32_t st32[8]; +#ifdef HAVE_LONGLONG + UInt64_t st64[8]; +#else + UInt32_t st64[16]; /* Keep original size */ +#endif + } state; +#ifdef HAVE_LONGLONG + UInt64_t bitcount[2]; +#else + UInt32_t bitcount[4]; +#endif + UInt8_t buffer[_SHA512_BLOCK_LENGTH]; +} SHA2_CTX; + + +#ifdef __cplusplus +extern "C" { +#endif + +extern void SHA256Init __PR((SHA2_CTX *)); +extern void SHA256Transform __PR((UInt32_t state[8], + const UInt8_t [SHA256_BLOCK_LENGTH])); +extern void SHA256Update __PR((SHA2_CTX *, const UInt8_t *, size_t)); +extern void SHA256Pad __PR((SHA2_CTX *)); +extern void SHA256Final __PR((UInt8_t [SHA256_DIGEST_LENGTH], + SHA2_CTX *)); +extern char *SHA256End __PR((SHA2_CTX *, char *)); +extern char *SHA256File __PR((const char *, char *)); +extern char *SHA256FileChunk __PR((const char *, char *, off_t, off_t)); +extern char *SHA256Data __PR((const UInt8_t *, size_t, char *)); + +#ifdef HAVE_LONGLONG +extern void SHA384Init __PR((SHA2_CTX *)); +extern void SHA384Transform __PR((UInt64_t state[8], + const UInt8_t [SHA384_BLOCK_LENGTH])); +extern void SHA384Update __PR((SHA2_CTX *, const UInt8_t *, size_t)); +extern void SHA384Pad __PR((SHA2_CTX *)); +extern void SHA384Final __PR((UInt8_t [SHA384_DIGEST_LENGTH], + SHA2_CTX *)); +extern char *SHA384End __PR((SHA2_CTX *, char *)); +extern char *SHA384File __PR((const char *, char *)); +extern char *SHA384FileChunk __PR((const char *, char *, off_t, off_t)); +extern char *SHA384Data __PR((const UInt8_t *, size_t, char *)); + +extern void SHA512Init __PR((SHA2_CTX *)); +extern void SHA512Transform __PR((UInt64_t state[8], + const UInt8_t [SHA512_BLOCK_LENGTH])); +extern void SHA512Update __PR((SHA2_CTX *, const UInt8_t *, size_t)); +extern void SHA512Pad __PR((SHA2_CTX *)); +extern void SHA512Final __PR((UInt8_t [SHA512_DIGEST_LENGTH], + SHA2_CTX *)); +extern char *SHA512End __PR((SHA2_CTX *, char *)); +extern char *SHA512File __PR((const char *, char *)); +extern char *SHA512FileChunk __PR((const char *, char *, off_t, off_t)); +extern char *SHA512Data __PR((const UInt8_t *, size_t, char *)); +#endif + +#ifdef __cplusplus +} +#endif + +#endif /* _SCHILY_SHA2_H */ diff -Nru cdrtools-2.01.01a33/include/schily/sha2.mk cdrtools-3.02a09/include/schily/sha2.mk --- cdrtools-2.01.01a33/include/schily/sha2.mk 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/include/schily/sha2.mk 2009-08-09 12:19:22.000000000 +0000 @@ -0,0 +1,17 @@ +#ident "@(#)sha2.mk 1.1 09/08/09 " +########################################################################### +# Sample makefile for installing non-localized auxiliary files +########################################################################### +SRCROOT= ../.. +RULESDIR= RULES +include $(SRCROOT)/$(RULESDIR)/rules.top +########################################################################### + +INSDIR= include/schily +TARGET= sha2.h +#XMK_FILE= Makefile.man + +########################################################################### +include $(SRCROOT)/$(RULESDIR)/rules.aux +########################################################################### + diff -Nru cdrtools-2.01.01a33/include/schily/sha3.h cdrtools-3.02a09/include/schily/sha3.h --- cdrtools-2.01.01a33/include/schily/sha3.h 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/include/schily/sha3.h 2016-10-26 20:53:50.000000000 +0000 @@ -0,0 +1,90 @@ +/* @(#)sha3.h 1.6 16/10/26 2015-2016 J. Schilling */ +/* sha3.h */ +/* + * SHA3 hash code taken from + * https://github.com/rhash/RHash/tree/master/librhash + * + * Portions Copyright (c) 2015-2016 J. Schilling + */ +#ifndef _SCHILY_SHA3_H +#define _SCHILY_SHA3_H + +#ifndef _SCHILY_MCONFIG_H +#include +#endif +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +#ifdef HAVE_LONGLONG + +#define sha3_224_hash_size 28 +#define sha3_256_hash_size 32 +#define sha3_384_hash_size 48 +#define sha3_512_hash_size 64 +#define sha3_max_permutation_size 25 +#define sha3_max_rate_in_qwords 24 + +#define SHA3_224_DIGEST_LENGTH sha3_224_hash_size +#define SHA3_224_DIGEST_STRING_LENGTH (SHA3_224_DIGEST_LENGTH * 2 + 1) +#define SHA3_256_DIGEST_LENGTH sha3_256_hash_size +#define SHA3_256_DIGEST_STRING_LENGTH (SHA3_256_DIGEST_LENGTH * 2 + 1) +#define SHA3_384_DIGEST_LENGTH sha3_384_hash_size +#define SHA3_384_DIGEST_STRING_LENGTH (SHA3_384_DIGEST_LENGTH * 2 + 1) +#define SHA3_512_DIGEST_LENGTH sha3_512_hash_size +#define SHA3_512_DIGEST_STRING_LENGTH (SHA3_512_DIGEST_LENGTH * 2 + 1) + +/* + * SHA3 Algorithm context. + */ +typedef struct sha3_ctx +{ + /* 1600 bits algorithm hashing state */ + UInt64_t hash[sha3_max_permutation_size]; + /* 1536-bit buffer for leftovers */ + UInt64_t message[sha3_max_rate_in_qwords]; + /* count of bytes in the message[] buffer */ + unsigned rest; + /* size of a message block processed at once */ + unsigned block_size; +} sha3_ctx, SHA3_CTX; + +/* methods for calculating the hash function */ + +void rhash_sha3_224_init __PR((sha3_ctx *ctx)); +void rhash_sha3_256_init __PR((sha3_ctx *ctx)); +void rhash_sha3_384_init __PR((sha3_ctx *ctx)); +void rhash_sha3_512_init __PR((sha3_ctx *ctx)); +void rhash_sha3_update __PR((sha3_ctx *ctx, + const unsigned char *msg, + size_t size)); +void rhash_sha3_final __PR((sha3_ctx *ctx, unsigned char *result)); + +void SHA3_224_Init __PR((SHA3_CTX *ctx)); +void SHA3_256_Init __PR((SHA3_CTX *ctx)); +void SHA3_384_Init __PR((SHA3_CTX *ctx)); +void SHA3_512_Init __PR((SHA3_CTX *ctx)); +void SHA3_Update __PR((SHA3_CTX *ctx, + const unsigned char *msg, + size_t size)); +void SHA3_Final __PR((unsigned char *result, SHA3_CTX *ctx)); + +#ifdef USE_KECCAK +#define rhash_keccak_224_init rhash_sha3_224_init +#define rhash_keccak_256_init rhash_sha3_256_init +#define rhash_keccak_384_init rhash_sha3_384_init +#define rhash_keccak_512_init rhash_sha3_512_init +#define rhash_keccak_update rhash_sha3_update +void rhash_keccak_final __PR((sha3_ctx *ctx, unsigned char *result)); +#endif + +#endif /* HAVE_LONGLONG */ + +#ifdef __cplusplus +} +#endif + +#endif /* _SCHILY_SHA3_H */ diff -Nru cdrtools-2.01.01a33/include/schily/sha3.mk cdrtools-3.02a09/include/schily/sha3.mk --- cdrtools-2.01.01a33/include/schily/sha3.mk 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/include/schily/sha3.mk 2015-11-22 00:16:07.000000000 +0000 @@ -0,0 +1,17 @@ +#ident "@(#)sha3.mk 1.1 15/11/22 " +########################################################################### +# Sample makefile for installing non-localized auxiliary files +########################################################################### +SRCROOT= ../.. +RULESDIR= RULES +include $(SRCROOT)/$(RULESDIR)/rules.top +########################################################################### + +INSDIR= include/schily +TARGET= sha3.h +#XMK_FILE= Makefile.man + +########################################################################### +include $(SRCROOT)/$(RULESDIR)/rules.aux +########################################################################### + diff -Nru cdrtools-2.01.01a33/include/schily/shadow.h cdrtools-3.02a09/include/schily/shadow.h --- cdrtools-2.01.01a33/include/schily/shadow.h 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/include/schily/shadow.h 2009-07-13 18:04:37.000000000 +0000 @@ -0,0 +1,33 @@ +/* @(#)shadow.h 1.1 09/07/13 Copyright 2009 J. Schilling */ +/* + * Shadow abstraction + * + * Copyright (c) 2009 J. Schilling + */ +/* + * The contents of this file are subject to the terms of the + * Common Development and Distribution License, Version 1.0 only + * (the "License"). You may not use this file except in compliance + * with the License. + * + * See the file CDDL.Schily.txt in this distribution for details. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file CDDL.Schily.txt from this distribution. + */ + +#ifndef _SCHILY_SHADOW_H +#define _SCHILY_SHADOW_H + +#ifndef _SCHILY_MCONFIG_H +#include +#endif + +#ifdef HAVE_SHADOW_H +#ifndef _INCL_SHADOW_H +#include +#define _INCL_SHADOW_H +#endif +#endif + +#endif /* _SCHILY_SHADOW_H */ diff -Nru cdrtools-2.01.01a33/include/schily/shadow.mk cdrtools-3.02a09/include/schily/shadow.mk --- cdrtools-2.01.01a33/include/schily/shadow.mk 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/include/schily/shadow.mk 2009-07-13 17:25:18.000000000 +0000 @@ -0,0 +1,17 @@ +#ident "@(#)shadow.mk 1.1 09/07/13 " +########################################################################### +# Sample makefile for installing non-localized auxiliary files +########################################################################### +SRCROOT= ../.. +RULESDIR= RULES +include $(SRCROOT)/$(RULESDIR)/rules.top +########################################################################### + +INSDIR= include/schily +TARGET= shadow.h +#XMK_FILE= Makefile.man + +########################################################################### +include $(SRCROOT)/$(RULESDIR)/rules.aux +########################################################################### + diff -Nru cdrtools-2.01.01a33/include/schily/shcall.h cdrtools-3.02a09/include/schily/shcall.h --- cdrtools-2.01.01a33/include/schily/shcall.h 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/include/schily/shcall.h 2010-08-27 11:15:53.000000000 +0000 @@ -0,0 +1,52 @@ +/* @(#)shcall.h 1.3 10/08/27 Copyright 2009-2010 J. Schilling */ +/* + * Abstraction from shcall.h + * + * Copyright (c) 2009-2010 J. Schilling + */ +/* + * The contents of this file are subject to the terms of the + * Common Development and Distribution License, Version 1.0 only + * (the "License"). You may not use this file except in compliance + * with the License. + * + * See the file CDDL.Schily.txt in this distribution for details. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file CDDL.Schily.txt from this distribution. + */ + +#ifndef _SCHILY_SHCALL_H +#define _SCHILY_SHCALL_H + +#ifndef _SCHILY_MCONFIG_H +#include +#endif + +#ifdef __cplusplus +extern "C" { +#endif + +#ifndef __sqfun_t_defined +typedef int (*sqfun_t) __PR((void *arg)); +#define __sqfun_t_defined +#endif + +#ifndef __squit_t_defined + +typedef struct { + sqfun_t quitfun; /* Function to query for shell signal quit */ + void *qfarg; /* Generic arg for shell builtin quit fun */ +} squit_t; + +#define __squit_t_defined +#endif + +typedef int (*shcall) __PR((int ac, char **av, char **ev, + FILE *std[3], squit_t *__quit)); + +#ifdef __cplusplus +} +#endif + +#endif /* _SCHILY_SHCALL_H */ diff -Nru cdrtools-2.01.01a33/include/schily/shcall.mk cdrtools-3.02a09/include/schily/shcall.mk --- cdrtools-2.01.01a33/include/schily/shcall.mk 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/include/schily/shcall.mk 2009-05-01 21:32:15.000000000 +0000 @@ -0,0 +1,17 @@ +#ident "@(#)shcall.mk 1.1 09/05/01 " +########################################################################### +# Sample makefile for installing non-localized auxiliary files +########################################################################### +SRCROOT= ../.. +RULESDIR= RULES +include $(SRCROOT)/$(RULESDIR)/rules.top +########################################################################### + +INSDIR= include/schily +TARGET= shcall.h +#XMK_FILE= Makefile.man + +########################################################################### +include $(SRCROOT)/$(RULESDIR)/rules.aux +########################################################################### + diff -Nru cdrtools-2.01.01a33/include/schily/shedit.h cdrtools-3.02a09/include/schily/shedit.h --- cdrtools-2.01.01a33/include/schily/shedit.h 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/include/schily/shedit.h 2017-01-18 22:52:31.000000000 +0000 @@ -0,0 +1,97 @@ +/* @(#)shedit.h 1.14 17/01/18 Copyright 2006-2017 J. Schilling */ +/* + * Definitions for libshedit, the history editor for the shell. + * + * Copyright (c) 2006-2017 J. Schilling + */ +/* + * The contents of this file are subject to the terms of the + * Common Development and Distribution License, Version 1.0 only + * (the "License"). You may not use this file except in compliance + * with the License. + * + * See the file CDDL.Schily.txt in this distribution for details. + * A copy of the CDDL is also available via the Internet at + * http://www.opensource.org/licenses/cddl1.txt + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file CDDL.Schily.txt from this distribution. + */ + +#ifndef _SCHILY_SHEDIT_H +#define _SCHILY_SHEDIT_H + +#ifndef _SCHILY_MCONFIG_H +#include +#endif +#ifndef _SCHILY_TYPES_H +#include +#endif +#ifndef _SCHILY_SCHILY_H +#include +#endif + +#ifdef __cplusplus +extern "C" { +#endif + +/* + * Exported functions: + * + * shedit_egetc(): read one character from the edited input + * shedit_getdelim(): get input delimiter + * shedit_treset(): reset terminal modes to non-edit + * shedit_bhist(): the builtin history command + * shedit_bshist(): the builtin savehistory command + * shedit_append_line(): to append a line to the history + * shedit_remap(): the builtin to reread termcap/mapping defaults + * shedit_list_map(): the builtin to list mappings + * shedit_del_map(): the builtin to delete mappings + * shedit_add_map(): the builtin to add mappings + * shedit_getenv(): set up pointer to local getenv() from the shell + * shedit_putenv(): set up pointer to local putenv() from the shell + * shedit_igneof(): set up pointer to local ignoreeof() from the shell + */ +extern int shedit_egetc __PR((void)); +extern int shedit_getdelim __PR((void)); +extern void shedit_treset __PR((void)); +extern void shedit_bhist __PR((int **intrcpp)); +extern void shedit_bshist __PR((int **intrpp)); +extern void shedit_append_line __PR((char *linep, unsigned int len, + unsigned int pos)); +extern void shedit_chghistory __PR((char *__val)); +extern void shedit_histrange __PR((unsigned *firstp, + unsigned *lastp, unsigned *nextp)); +extern void shedit_remap __PR((void)); +extern void shedit_list_map __PR((int *f)); +extern int shedit_del_map __PR((char *from)); +extern int shedit_add_map __PR((char *from, char *to, char *comment)); +extern void shedit_getenv __PR((char *(*genv)(char *name))); +extern void shedit_putenv __PR((void (*penv) (char *name))); +extern void shedit_igneof __PR((BOOL (*ieof) (void))); +extern void shedit_setprompts __PR((int promptidx, int nprompts, + char *newprompts[])); + +/* + * Keep #defines in sync with bsh/bsh.h + */ +#define HI_NOINTR 0 /* History traversal noninterruptable */ +#define HI_INTR 1 /* History traversal is interruptable */ +#define HI_NONUM 2 /* Do not print numbers */ +#define HI_TAB 4 /* Print TABs */ +#define HI_REVERSE 8 /* Print in reverse order */ +#define HI_PRETTYP 16 /* Pretty Type non-printable chars */ +#define HI_ANSI_NL 32 /* Convert ASCII newlines to ANSI nl */ + +extern int shedit_history __PR((int *f, int **intrcpp, int flg, + int _first, int _last, char *_subst)); +extern int shedit_search_history __PR((int **intrcpp, int flg, + int _first, char *_pat)); +extern int shedit_remove_history __PR((int **intrcpp, int flg, + int _first, char *_pat)); +extern int shedit_read_history __PR((int *f, int **intrcpp, int flg)); +#ifdef __cplusplus +} +#endif + +#endif /* _SCHILY_SHEDIT_H */ diff -Nru cdrtools-2.01.01a33/include/schily/shedit.mk cdrtools-3.02a09/include/schily/shedit.mk --- cdrtools-2.01.01a33/include/schily/shedit.mk 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/include/schily/shedit.mk 2013-09-19 21:57:09.000000000 +0000 @@ -0,0 +1,17 @@ +#ident "@(#)shedit.mk 1.1 13/09/19 " +########################################################################### +# Sample makefile for installing non-localized auxiliary files +########################################################################### +SRCROOT= ../.. +RULESDIR= RULES +include $(SRCROOT)/$(RULESDIR)/rules.top +########################################################################### + +INSDIR= include/schily +TARGET= shedit.h +#XMK_FILE= Makefile.man + +########################################################################### +include $(SRCROOT)/$(RULESDIR)/rules.aux +########################################################################### + diff -Nru cdrtools-2.01.01a33/include/schily/shm.h cdrtools-3.02a09/include/schily/shm.h --- cdrtools-2.01.01a33/include/schily/shm.h 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/include/schily/shm.h 2009-08-07 23:15:37.000000000 +0000 @@ -0,0 +1,33 @@ +/* @(#)shm.h 1.1 09/08/08 Copyright 2009 J. Schilling */ +/* + * Abstraction code for shm.h + * + * Copyright (c) 2009 J. Schilling + */ +/* + * The contents of this file are subject to the terms of the + * Common Development and Distribution License, Version 1.0 only + * (the "License"). You may not use this file except in compliance + * with the License. + * + * See the file CDDL.Schily.txt in this distribution for details. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file CDDL.Schily.txt from this distribution. + */ + +#ifndef _SCHILY_SHM_H +#define _SCHILY_SHM_H + +#ifndef _SCHILY_MCONFIG_H +#include +#endif + +#ifdef HAVE_SYS_SHM_H +#ifndef _INCL_SYS_SHM_H +#define _INCL_SYS_SHM_H +#include +#endif +#endif + +#endif /* _SCHILY_SHM_H */ diff -Nru cdrtools-2.01.01a33/include/schily/shm.mk cdrtools-3.02a09/include/schily/shm.mk --- cdrtools-2.01.01a33/include/schily/shm.mk 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/include/schily/shm.mk 2009-08-07 23:15:37.000000000 +0000 @@ -0,0 +1,17 @@ +#ident "@(#)shm.mk 1.1 09/08/08 " +########################################################################### +# Sample makefile for installing non-localized auxiliary files +########################################################################### +SRCROOT= ../.. +RULESDIR= RULES +include $(SRCROOT)/$(RULESDIR)/rules.top +########################################################################### + +INSDIR= include/schily +TARGET= shm.h +#XMK_FILE= Makefile.man + +########################################################################### +include $(SRCROOT)/$(RULESDIR)/rules.aux +########################################################################### + diff -Nru cdrtools-2.01.01a33/include/schily/siconv.h cdrtools-3.02a09/include/schily/siconv.h --- cdrtools-2.01.01a33/include/schily/siconv.h 2007-06-25 21:52:18.000000000 +0000 +++ cdrtools-3.02a09/include/schily/siconv.h 2010-12-19 23:18:33.000000000 +0000 @@ -1,8 +1,8 @@ -/* @(#)siconv.h 1.2 07/06/25 Copyright 2007 J. Schilling */ +/* @(#)siconv.h 1.5 10/12/20 Copyright 2007-2010 J. Schilling */ /* * Definitions fur users of libsiconv * - * Copyright (c) 2007 J. Schilling + * Copyright (c) 2007-2010 J. Schilling */ /* * The contents of this file are subject to the terms of the @@ -38,11 +38,12 @@ struct siconv_table { char *sic_name; /* SICONV charset name */ UInt16_t *sic_cs2uni; /* Charset -> Unicode */ - UInt8_t **sic_uni2cs; /* Unicode -> Charset */ + UInt8_t **sic_uni2cs; /* Unicode -> Charset */ iconv_t sic_cd2uni; /* iconv Charset -> Unicode */ iconv_t sic_uni2cd; /* iconv Unicode -> Charset */ siconvt_t *sic_alt; /* alternate iconv tab */ siconvt_t *sic_next; /* Next table */ + int sic_refcnt; /* Reference count */ }; #define use_iconv(t) ((t)->sic_cd2uni != NULL) @@ -52,7 +53,8 @@ extern int sic_list __PR((FILE *)); extern siconvt_t *sic_open __PR((char *)); -extern void sic_close __PR((siconvt_t *)); +extern const char *sic_base __PR((void)); +extern int sic_close __PR((siconvt_t *)); #ifdef __cplusplus } diff -Nru cdrtools-2.01.01a33/include/schily/siconv.mk cdrtools-3.02a09/include/schily/siconv.mk --- cdrtools-2.01.01a33/include/schily/siconv.mk 2007-05-14 19:47:02.000000000 +0000 +++ cdrtools-3.02a09/include/schily/siconv.mk 2007-05-14 19:47:02.000000000 +0000 @@ -1,4 +1,4 @@ -#ident %W% %E% %Q% +#ident @(#)siconv.mk 1.1 07/05/14 ########################################################################### # Sample makefile for installing non-localized auxiliary files ########################################################################### @@ -15,11 +15,3 @@ include $(SRCROOT)/$(RULESDIR)/rules.aux ########################################################################### -IFDEF= -UJOSxx - -XRELFILES= siconv.h siconv.mk - -########################################################################### -include $(SRCROOT)/$(RULESDIR)/rules.rel -########################################################################### -MAKE_LICENSE=MKCDDL diff -Nru cdrtools-2.01.01a33/include/schily/sigblk.h cdrtools-3.02a09/include/schily/sigblk.h --- cdrtools-2.01.01a33/include/schily/sigblk.h 2006-09-13 01:27:00.000000000 +0000 +++ cdrtools-3.02a09/include/schily/sigblk.h 2008-12-24 16:24:23.000000000 +0000 @@ -1,8 +1,8 @@ -/* @(#)sigblk.h 1.11 06/09/13 Copyright 1985, 1995-2003 J. Schilling */ +/* @(#)sigblk.h 1.12 08/12/24 Copyright 1985, 1995-2008 J. Schilling */ /* * software signal block definition * - * Copyright (c) 1985, 1995-2003 J. Schilling + * Copyright (c) 1985, 1995-2008 J. Schilling */ /* * The contents of this file are subject to the terms of the @@ -22,9 +22,6 @@ #ifndef _SCHILY_MCONFIG_H #include #endif -#ifndef _SCHILY_STANDARD_H -#include -#endif #ifdef __cplusplus extern "C" { diff -Nru cdrtools-2.01.01a33/include/schily/sigblk.mk cdrtools-3.02a09/include/schily/sigblk.mk --- cdrtools-2.01.01a33/include/schily/sigblk.mk 2006-12-17 21:52:12.000000000 +0000 +++ cdrtools-3.02a09/include/schily/sigblk.mk 2006-12-17 21:52:12.000000000 +0000 @@ -1,4 +1,4 @@ -#ident %W% %E% %Q% +#ident @(#)sigblk.mk 1.1 06/12/17 ########################################################################### # Sample makefile for installing non-localized auxiliary files ########################################################################### diff -Nru cdrtools-2.01.01a33/include/schily/signal.h cdrtools-3.02a09/include/schily/signal.h --- cdrtools-2.01.01a33/include/schily/signal.h 2006-09-13 17:10:56.000000000 +0000 +++ cdrtools-3.02a09/include/schily/signal.h 2015-06-23 21:30:59.000000000 +0000 @@ -1,8 +1,8 @@ -/* @(#)signal.h 1.7 06/09/13 Copyright 1997 J. Schilling */ +/* @(#)signal.h 1.10 15/06/23 Copyright 1997-2015 J. Schilling */ /* - * Signal abstraction for BSD/SVR4 signals + * Signal abstraction for signals * - * Copyright (c) 1997 J. Schilling + * Copyright (c) 1997-2015 J. Schilling */ /* * The contents of this file are subject to the terms of the @@ -11,6 +11,8 @@ * with the License. * * See the file CDDL.Schily.txt in this distribution for details. + * A copy of the CDDL is also available via the Internet at + * http://www.opensource.org/licenses/cddl1.txt * * When distributing Covered Code, include this CDDL HEADER in each * file and include the License file CDDL.Schily.txt from this distribution. @@ -23,44 +25,36 @@ #include #endif -#ifdef HAVE_SIGSET -/* - * Try to by default use the function that sets up signal handlers in a way - * that does not reset the handler after it has been called. - */ -#define signal sigset +#ifdef HAVE_SIGNAL_H +#ifndef _INCL_SIGNAL_H +#include +#define _INCL_SIGNAL_H +#endif #endif -#ifdef HAVE_SIGPROCMASK -#define block_sigs(a) { \ - sigset_t __new; \ - \ - sigfillset(&__new); \ - sigprocmask(SIG_BLOCK, &__new, &a);\ - } -#define unblock_sig(s) { \ - sigset_t __new; \ - \ - sigemptyset(&__new); \ - sigaddset(&__new, (s)); \ - sigprocmask(SIG_UNBLOCK, &__new, NULL);\ - } -#define restore_sigs(a) sigprocmask(SIG_SETMASK, &a, 0); - -#else /* !HAVE_SIGPROCMASK */ - -#define sigset_t int -#define block_sigs(a) a = sigblock(0xFFFFFFFF) -#define restore_sigs(a) sigsetmask(a); -#define unblock_sig(s) { \ - int __old, __new; \ - \ - block_sigs(__old); \ - __new = sigmask(s); \ - __new = __old & ~__new; \ - sigsetmask(__new); \ - } +#ifndef SIGCHLD /* POSIX name is missing */ +#ifdef SIGCLD +#define SIGCHLD SIGCLD +#endif +#endif -#endif /* HAVE_SIGPROCMASK */ +/* + * Very old Solaris versions (probably only before 1993) did not include + * siginfo.h in sginal.h. POSIX requires the availaibility of siginfo_t + * from signal.h, so include siginfo.h if available on this platform. + */ +#ifdef HAVE_SIGINFO_H +#ifndef _INCL_SIGINFO_H +#include +#define _INCL_SIGINFO_H +#endif +#else +#ifdef HAVE_SYS_SIGINFO_H +#ifndef _INCL_SYS_SIGINFO_H +#include +#define _INCL_SYS_SIGINFO_H +#endif +#endif +#endif #endif /* _SCHILY_SIGNAL_H */ diff -Nru cdrtools-2.01.01a33/include/schily/signal.mk cdrtools-3.02a09/include/schily/signal.mk --- cdrtools-2.01.01a33/include/schily/signal.mk 2006-12-17 21:52:12.000000000 +0000 +++ cdrtools-3.02a09/include/schily/signal.mk 2006-12-17 21:52:12.000000000 +0000 @@ -1,4 +1,4 @@ -#ident %W% %E% %Q% +#ident @(#)signal.mk 1.1 06/12/17 ########################################################################### # Sample makefile for installing non-localized auxiliary files ########################################################################### diff -Nru cdrtools-2.01.01a33/include/schily/sigset.h cdrtools-3.02a09/include/schily/sigset.h --- cdrtools-2.01.01a33/include/schily/sigset.h 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/include/schily/sigset.h 2011-09-16 21:23:33.000000000 +0000 @@ -0,0 +1,103 @@ +/* @(#)sigset.h 1.11 11/09/16 Copyright 1997-2011 J. Schilling */ +/* + * Signal set abstraction for BSD/SVR4 signals + * + * Copyright (c) 1997-2011 J. Schilling + */ +/* + * The contents of this file are subject to the terms of the + * Common Development and Distribution License, Version 1.0 only + * (the "License"). You may not use this file except in compliance + * with the License. + * + * See the file CDDL.Schily.txt in this distribution for details. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file CDDL.Schily.txt from this distribution. + */ + +#ifndef _SCHILY_SIGSET_H +#define _SCHILY_SIGSET_H + +#ifndef _SCHILY_MCONFIG_H +#include +#endif + +#ifdef HAVE_SIGSET +/* + * Try to by default use the function that sets up signal handlers in a way + * that does not reset the handler after it has been called. + */ +#define signal sigset +#endif + +#ifdef HAVE_SIGPROCMASK +#define blocked_sigs(a) { \ + sigset_t __new; \ + \ + sigemptyset(&__new); \ + sigprocmask(SIG_BLOCK, &__new, &a);\ + } +#define block_sigs(a) { \ + sigset_t __new; \ + \ + sigfillset(&__new); \ + sigprocmask(SIG_BLOCK, &__new, &a);\ + } +#define block_sig(s) { \ + sigset_t __new; \ + \ + sigemptyset(&__new); \ + sigaddset(&__new, (s)); \ + sigprocmask(SIG_BLOCK, &__new, NULL);\ + } +#define unblock_sig(s) { \ + sigset_t __new; \ + \ + sigemptyset(&__new); \ + sigaddset(&__new, (s)); \ + sigprocmask(SIG_UNBLOCK, &__new, NULL);\ + } +#define restore_sigs(a) sigprocmask(SIG_SETMASK, &a, 0); + +#else /* !HAVE_SIGPROCMASK */ +#if defined(HAVE_SIGBLOCK) && defined(HAVE_SIGSETMASK) + +#define sigset_t int +#define block_sigs(a) a = sigblock(0xFFFFFFFF) +#define restore_sigs(a) sigsetmask(a); +#define blocked_sigs(a) { \ + int __old; \ + \ + block_sigs(__old); \ + a = __old; \ + sigsetmask(__old); \ + } +#define block_sig(s) { \ + int __old, __new; \ + \ + block_sigs(__old); \ + __new = sigmask(s); \ + __new = __old | __new; \ + sigsetmask(__new); \ + } +#define unblock_sig(s) { \ + int __old, __new; \ + \ + block_sigs(__old); \ + __new = sigmask(s); \ + __new = __old & ~__new; \ + sigsetmask(__new); \ + } +#else /* ! defined(HAVE_SIGBLOCK) && defined(HAVE_SIGSETMASK) */ + +#define sigset_t int +#define blocked_sigs(a) +#define block_sigs(a) +#define block_sig(a) +#define restore_sigs(a) +#define unblock_sig(s) +#endif /* ! defined(HAVE_SIGBLOCK) && defined(HAVE_SIGSETMASK) */ +#endif /* HAVE_SIGPROCMASK */ + +#endif /* _SCHILY_SIGSET_H */ diff -Nru cdrtools-2.01.01a33/include/schily/sigset.mk cdrtools-3.02a09/include/schily/sigset.mk --- cdrtools-2.01.01a33/include/schily/sigset.mk 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/include/schily/sigset.mk 2009-06-30 18:16:46.000000000 +0000 @@ -0,0 +1,17 @@ +#ident @(#)sigset.mk 1.2 09/06/30 +########################################################################### +# Sample makefile for installing non-localized auxiliary files +########################################################################### +SRCROOT= ../.. +RULESDIR= RULES +include $(SRCROOT)/$(RULESDIR)/rules.top +########################################################################### + +INSDIR= include/schily +TARGET= sigset.h +#XMK_FILE= Makefile.man + +########################################################################### +include $(SRCROOT)/$(RULESDIR)/rules.aux +########################################################################### + diff -Nru cdrtools-2.01.01a33/include/schily/socket.h cdrtools-3.02a09/include/schily/socket.h --- cdrtools-2.01.01a33/include/schily/socket.h 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/include/schily/socket.h 2012-11-14 18:59:10.000000000 +0000 @@ -0,0 +1,64 @@ +/* @(#)socket.h 1.3 12/11/14 Copyright 2009-2012 J. Schilling */ +/* + * Socket abstraction + * + * Copyright (c) 2009-2012 J. Schilling + */ +/* + * The contents of this file are subject to the terms of the + * Common Development and Distribution License, Version 1.0 only + * (the "License"). You may not use this file except in compliance + * with the License. + * + * See the file CDDL.Schily.txt in this distribution for details. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file CDDL.Schily.txt from this distribution. + */ + +#ifndef _SCHILY_SOCKET_H +#define _SCHILY_SOCKET_H + +#ifndef _SCHILY_MCONFIG_H +#include +#endif + +#ifdef HAVE_SYS_SOCKET_H + +#ifndef _INCL_SYS_SOCKET_H +#include +#define _INCL_SYS_SOCKET_H +#endif + +/* + * Compatibility defines for UNIX/POSIX: + * + * Win32 defines a socket layer in winsock.h that is not POSIX compliant. + * The functions socket() and accept() return an "unsigned int" instead of just + * an "int". As a result, an error return from socket() and accept() cannot be + * -1 but is INVALID_SOCKET. All functions from the Win32 socket layer except + * socket() and accept() return -1 on error. + * Since a socket is not a file descriptor on Win32, we cannot call close() + * but need to call closesocket(). + * If we like to write software that compiles on a Win32 system without a + * POSIX layer, we need use the following definitions as a workaround even + * for UNIX/POSIX systems. + */ + +#define SOCKET int /* The socket type on UNIX/POSIX */ +#define INVALID_SOCKET (-1) /* Error return code for socket()/accept() */ +#define closesocket close /* Use instead of close(s) for Win32 compat */ + +#else /* On a non-POSIX system: */ +/* + * If we are on a Win32 system without a POSIX layer, we would need to include + * winsock.h but this includes definitions that cause compatibility problems. + * For this reason, we instead include our windows.h that contains the needed + * workaround. + */ +#ifdef HAVE_WINDOWS_H +#include +#endif /* HAVE_WINDOWS_H */ +#endif + +#endif /* _SCHILY_SOCKET_H */ diff -Nru cdrtools-2.01.01a33/include/schily/socket.mk cdrtools-3.02a09/include/schily/socket.mk --- cdrtools-2.01.01a33/include/schily/socket.mk 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/include/schily/socket.mk 2009-07-13 17:25:18.000000000 +0000 @@ -0,0 +1,17 @@ +#ident "@(#)socket.mk 1.1 09/07/13 " +########################################################################### +# Sample makefile for installing non-localized auxiliary files +########################################################################### +SRCROOT= ../.. +RULESDIR= RULES +include $(SRCROOT)/$(RULESDIR)/rules.top +########################################################################### + +INSDIR= include/schily +TARGET= socket.h +#XMK_FILE= Makefile.man + +########################################################################### +include $(SRCROOT)/$(RULESDIR)/rules.aux +########################################################################### + diff -Nru cdrtools-2.01.01a33/include/schily/standard.h cdrtools-3.02a09/include/schily/standard.h --- cdrtools-2.01.01a33/include/schily/standard.h 2007-02-03 22:37:09.000000000 +0000 +++ cdrtools-3.02a09/include/schily/standard.h 2013-05-01 10:49:02.000000000 +0000 @@ -1,4 +1,4 @@ -/* @(#)standard.h 1.36 07/02/03 Copyright 1985-2007 J. Schilling */ +/* @(#)standard.h 1.40 13/05/01 Copyright 1985-2013 J. Schilling */ /* * standard definitions * @@ -11,7 +11,7 @@ * * If you need stdio.h, you must include it before standard.h * - * Copyright (c) 1985-2007 J. Schilling + * Copyright (c) 1985-2013 J. Schilling */ /* * The contents of this file are subject to the terms of the @@ -32,6 +32,10 @@ #include #endif +#ifdef __cplusplus +extern "C" { +#endif + #ifdef M68000 # ifndef tos # define JOS 1 @@ -50,9 +54,13 @@ #endif /* - * Program exit codes + * Program exit codes used with comerr(), comexit() and similar. + * + * Exit codes between -2 and -63 are currently available to flag + * program specific error conditions. */ -#define EX_BAD (-1) +#define EX_BAD (-1) /* Default error exit code */ +#define EX_CLASH (-64) /* Exit code used with exit clashes */ /* * standard storage class definitions @@ -95,12 +103,12 @@ # endif #endif -#if defined(_INCL_SYS_TYPES_H) || defined(off_t) +#if defined(_INCL_SYS_TYPES_H) || defined(_INCL_TYPES_H) || defined(off_t) # ifndef FOUND_OFF_T # define FOUND_OFF_T # endif #endif -#if defined(_INCL_SYS_TYPES_H) || defined(size_t) +#if defined(_INCL_SYS_TYPES_H) || defined(_INCL_TYPES_H) || defined(size_t) # ifndef FOUND_SIZE_T # define FOUND_SIZE_T # endif @@ -130,6 +138,10 @@ #endif #endif /* __never_def__ */ +#ifdef __cplusplus +} +#endif + #if defined(_JOS) || defined(JOS) # ifndef _SCHILY_SCHILY_H # include diff -Nru cdrtools-2.01.01a33/include/schily/standard.mk cdrtools-3.02a09/include/schily/standard.mk --- cdrtools-2.01.01a33/include/schily/standard.mk 2006-12-17 21:52:12.000000000 +0000 +++ cdrtools-3.02a09/include/schily/standard.mk 2006-12-17 21:52:12.000000000 +0000 @@ -1,4 +1,4 @@ -#ident %W% %E% %Q% +#ident @(#)standard.mk 1.1 06/12/17 ########################################################################### # Sample makefile for installing non-localized auxiliary files ########################################################################### diff -Nru cdrtools-2.01.01a33/include/schily/stat.h cdrtools-3.02a09/include/schily/stat.h --- cdrtools-2.01.01a33/include/schily/stat.h 2007-01-16 14:19:12.000000000 +0000 +++ cdrtools-3.02a09/include/schily/stat.h 2015-08-23 13:25:47.000000000 +0000 @@ -1,8 +1,8 @@ -/* @(#)stat.h 1.13 07/01/16 Copyright 1998-2007 J. Schilling */ +/* @(#)stat.h 1.20 15/08/23 Copyright 1998-2015 J. Schilling */ /* * Definitions for stat() file mode * - * Copyright (c) 1998-2007 J. Schilling + * Copyright (c) 1998-2015 J. Schilling */ /* * The contents of this file are subject to the terms of the @@ -11,6 +11,8 @@ * with the License. * * See the file CDDL.Schily.txt in this distribution for details. + * A copy of the CDDL is also available via the Internet at + * http://www.opensource.org/licenses/cddl1.txt * * When distributing Covered Code, include this CDDL HEADER in each * file and include the License file CDDL.Schily.txt from this distribution. @@ -31,6 +33,10 @@ #define _INCL_SYS_STAT_H #endif +#if !defined(HAVE_LSTAT) || !defined(S_IFLNK) +#define lstat stat +#endif + /* * Apollo Domain/OS has a broken sys/stat.h that defines * S_IFIFO == S_IFSOCK and creates trouble if the constants @@ -49,7 +55,7 @@ #undef S_ISBLK /* Block special */ #undef S_ISMPB /* UNUSED multiplexed b */ #undef S_ISREG /* Regular file */ -#undef S_ISCNT /* Contiguous file */ +#undef S_ISCTG /* Contiguous file */ #undef S_ISLNK /* Symbolic link */ #undef S_ISSHAD /* Solaris shadow inode */ #undef S_ISSOCK /* UNIX domain socket */ @@ -115,11 +121,11 @@ # define S_ISREG(m) (0) # endif #endif -#ifndef S_ISCNT /* 9 Contiguous file */ -# ifdef S_IFCNT -# define S_ISCNT(m) (((m) & S_IFMT) == S_IFCNT) +#ifndef S_ISCTG /* 9 Contiguous file */ +# ifdef S_IFCTG +# define S_ISCTG(m) (((m) & S_IFMT) == S_IFCTG) # else -# define S_ISCNT(m) (0) +# define S_ISCTG(m) (0) # endif #endif #ifndef S_ISLNK /* 10 Symbolic link */ @@ -180,14 +186,16 @@ #endif #ifndef S_TYPEISSEM # ifdef S_INSEM -# define S_TYPEISSEM(_stbuf) (S_ISNAM((_stbuf)->st_mode) && (_stbuf)->st_rdev == S_INSEM) +# define S_TYPEISSEM(_stbuf) (S_ISNAM((_stbuf)->st_mode) && \ + (_stbuf)->st_rdev == S_INSEM) # else # define S_TYPEISSEM(_stbuf) (0) # endif #endif #ifndef S_TYPEISSHM # ifdef S_INSHD -# define S_TYPEISSHM(_stbuf) (S_ISNAM((_stbuf)->st_mode) && (_stbuf)->st_rdev == S_INSHD) +# define S_TYPEISSHM(_stbuf) (S_ISNAM((_stbuf)->st_mode) && \ + (_stbuf)->st_rdev == S_INSHD) # else # define S_TYPEISSHM(_stbuf) (0) # endif @@ -196,6 +204,8 @@ /* * Mode permission bits. * UNIX V.7 has only S_ISUID/S_ISGID/S_ISVTX and S_IREAD/S_IWRITE/S_IEXEC + * + * S_ISUID/S_ISGID/S_ISVTX is available on UNIX V.7 and POSIX */ #ifndef S_ISUID /* Set-user-ID on execution */ #define S_ISUID 0 /* If it is not defined, it is not supported */ @@ -207,68 +217,59 @@ #define S_ISVTX 0 /* If it is not defined, it is not supported */ #endif -#ifndef S_IRUSR /* Read permission, owner */ -#ifdef S_IREAD -#define S_IRUSR S_IREAD /* Needed on old UNIX systems */ +/* + * S_IREAD/S_IWRITE/S_IEXEC is only available on UNIX V.7 but not on POSIX + * Emulate these definitions to support compilation of programs like + * SCCS and the Bourne Shell and to make the other definitions simpler. + */ +#ifndef S_IREAD +#ifdef S_IRUSR +#define S_IREAD S_IRUSR /* Use POSIX name */ #else -#define S_IRUSR 0400 +#define S_IREAD 0400 /* Very old UNIX, use own definition */ #endif #endif -#ifndef S_IWUSR /* Write permission, owner */ -#ifdef S_IWRITE -#define S_IWUSR S_IWRITE /* Needed on old UNIX systems */ +#ifndef S_IWRITE +#ifdef S_IWUSR +#define S_IWRITE S_IWUSR /* Use POSIX name */ #else -#define S_IWUSR 0200 +#define S_IWRITE 0200 /* Very old UNIX, use own definition */ #endif #endif -#ifndef S_IXUSR /* Execute/search permission, owner */ -#ifdef S_IEXEC -#define S_IXUSR S_IEXEC /* Needed on old UNIX systems */ +#ifndef S_IEXEC +#ifdef S_IXUSR +#define S_IEXEC S_IXUSR /* Use POSIX name */ #else -#define S_IXUSR 0100 +#define S_IEXEC 0100 /* Very old UNIX, use own definition */ +#endif +#endif + +#ifndef S_IRUSR /* Read permission, owner */ +#define S_IRUSR S_IREAD /* Needed on old UNIX systems */ +#endif +#ifndef S_IWUSR /* Write permission, owner */ +#define S_IWUSR S_IWRITE /* Needed on old UNIX systems */ #endif +#ifndef S_IXUSR /* Execute/search permission, owner */ +#define S_IXUSR S_IEXEC /* Needed on old UNIX systems */ #endif #ifndef S_IRGRP /* Read permission, group */ -#ifdef S_IREAD #define S_IRGRP (S_IREAD >> 3) /* Needed on old UNIX systems */ -#else -#define S_IRGRP 040 -#endif #endif #ifndef S_IWGRP /* Write permission, group */ -#ifdef S_IWRITE #define S_IWGRP (S_IWRITE >> 3) /* Needed on old UNIX systems */ -#else -#define S_IWGRP 020 -#endif #endif #ifndef S_IXGRP /* Execute/search permission, group */ -#ifdef S_IEXEC #define S_IXGRP (S_IEXEC >> 3) /* Needed on old UNIX systems */ -#else -#define S_IXGRP 010 -#endif #endif #ifndef S_IROTH /* Read permission, others */ -#ifdef S_IREAD #define S_IROTH (S_IREAD >> 6) /* Needed on old UNIX systems */ -#else -#define S_IROTH 004 -#endif #endif #ifndef S_IWOTH /* Write permission, others */ -#ifdef S_IWRITE #define S_IWOTH (S_IWRITE >> 6) /* Needed on old UNIX systems */ -#else -#define S_IWOTH 002 -#endif #endif #ifndef S_IXOTH /* Execute/search permission, others */ -#ifdef S_IEXEC #define S_IXOTH (S_IEXEC >> 6) /* Needed on old UNIX systems */ -#else -#define S_IXOTH 001 -#endif #endif #ifndef S_IRWXU /* Read, write, execute/search by owner */ @@ -289,47 +290,102 @@ */ #if defined(HAVE_ST_ATIMENSEC) +/* + * Found e.g. on NetBSD and OpenBSD. + */ #define stat_ansecs(s) ((s)->st_atimensec) #define stat_mnsecs(s) ((s)->st_mtimensec) #define stat_cnsecs(s) ((s)->st_ctimensec) +#define stat_set_ansecs(s, n) ((s)->st_atimensec = n) +#define stat_set_mnsecs(s, n) ((s)->st_mtimensec = n) +#define stat_set_cnsecs(s, n) ((s)->st_ctimensec = n) + #define _FOUND_STAT_NSECS_ #endif -#if defined(HAVE_ST_SPARE1) && !defined(_FOUND_STAT_NSECS_) +#if defined(HAVE_ST_ATIME_N) -#define stat_ansecs(s) ((s)->st_spare1 * 1000) -#define stat_mnsecs(s) ((s)->st_spare2 * 1000) -#define stat_cnsecs(s) ((s)->st_spare3 * 1000) +/* + * Found e.g. on AIX. + */ +#define stat_ansecs(s) ((s)->st_atime_n) +#define stat_mnsecs(s) ((s)->st_mtime_n) +#define stat_cnsecs(s) ((s)->st_ctime_n) + +#define stat_set_ansecs(s, n) ((s)->st_atime_n = n) +#define stat_set_mnsecs(s, n) ((s)->st_mtime_n = n) +#define stat_set_cnsecs(s, n) ((s)->st_ctime_n = n) -#define _FOUND_STAT_USECS_ #define _FOUND_STAT_NSECS_ #endif #if defined(HAVE_ST__TIM) && !defined(_FOUND_STAT_NSECS_) +/* + * Found e.g. on UnixWare. + */ #define stat_ansecs(s) ((s)->st_atim.st__tim.tv_nsec) #define stat_mnsecs(s) ((s)->st_mtim.st__tim.tv_nsec) #define stat_cnsecs(s) ((s)->st_ctim.st__tim.tv_nsec) +#define stat_set_ansecs(s, n) ((s)->st_atim.st__tim.tv_nsec = n) +#define stat_set_mnsecs(s, n) ((s)->st_mtim.st__tim.tv_nsec = n) +#define stat_set_cnsecs(s, n) ((s)->st_ctim.st__tim.tv_nsec = n) + #define _FOUND_STAT_NSECS_ #endif #if defined(HAVE_ST_NSEC) && !defined(_FOUND_STAT_NSECS_) +/* + * Found e.g. on SunOS-5.x and IRIX. + */ #define stat_ansecs(s) ((s)->st_atim.tv_nsec) #define stat_mnsecs(s) ((s)->st_mtim.tv_nsec) #define stat_cnsecs(s) ((s)->st_ctim.tv_nsec) +#define stat_set_ansecs(s, n) ((s)->st_atim.tv_nsec = n) +#define stat_set_mnsecs(s, n) ((s)->st_mtim.tv_nsec = n) +#define stat_set_cnsecs(s, n) ((s)->st_ctim.tv_nsec = n) + #define _FOUND_STAT_NSECS_ #endif #if defined(HAVE_ST_ATIMESPEC) && !defined(_FOUND_STAT_NSECS_) +/* + * Found e.g. on FreeBSD and Mac OS X. + */ #define stat_ansecs(s) ((s)->st_atimespec.tv_nsec) #define stat_mnsecs(s) ((s)->st_mtimespec.tv_nsec) #define stat_cnsecs(s) ((s)->st_ctimespec.tv_nsec) +#define stat_set_ansecs(s, n) ((s)->st_atimespec.tv_nsec = n) +#define stat_set_mnsecs(s, n) ((s)->st_mtimespec.tv_nsec = n) +#define stat_set_cnsecs(s, n) ((s)->st_ctimespec.tv_nsec = n) + +#define _FOUND_STAT_NSECS_ +#endif + +/* + * st_spare1 is last as some implementations keep backwards + * compatibility although there is one of the nsec implementations. + */ +#if defined(HAVE_ST_SPARE1) && !defined(_FOUND_STAT_NSECS_) + +/* + * Found e.g. on SunOS-4.x and HP-UX. + */ +#define stat_ansecs(s) ((s)->st_spare1 * 1000) +#define stat_mnsecs(s) ((s)->st_spare2 * 1000) +#define stat_cnsecs(s) ((s)->st_spare3 * 1000) + +#define stat_set_ansecs(s, n) ((s)->st_spare1 = n / 1000) +#define stat_set_mnsecs(s, n) ((s)->st_spare2 = n / 1000) +#define stat_set_cnsecs(s, n) ((s)->st_spare3 = n / 1000) + +#define _FOUND_STAT_USECS_ #define _FOUND_STAT_NSECS_ #endif @@ -337,6 +393,10 @@ #define stat_ansecs(s) (0) #define stat_mnsecs(s) (0) #define stat_cnsecs(s) (0) + +#define stat_set_ansecs(s, n) (0) +#define stat_set_mnsecs(s, n) (0) +#define stat_set_cnsecs(s, n) (0) #endif #endif /* _SCHILY_STAT_H */ diff -Nru cdrtools-2.01.01a33/include/schily/stat.mk cdrtools-3.02a09/include/schily/stat.mk --- cdrtools-2.01.01a33/include/schily/stat.mk 2006-12-17 21:52:12.000000000 +0000 +++ cdrtools-3.02a09/include/schily/stat.mk 2006-12-17 21:52:12.000000000 +0000 @@ -1,4 +1,4 @@ -#ident %W% %E% %Q% +#ident @(#)stat.mk 1.1 06/12/17 ########################################################################### # Sample makefile for installing non-localized auxiliary files ########################################################################### diff -Nru cdrtools-2.01.01a33/include/schily/stdarg.h cdrtools-3.02a09/include/schily/stdarg.h --- cdrtools-2.01.01a33/include/schily/stdarg.h 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/include/schily/stdarg.h 2013-04-30 14:06:48.000000000 +0000 @@ -0,0 +1,30 @@ +/* @(#)stdarg.h 1.1 13/04/30 Copyright 2013 J. Schilling */ +/* + * Generic header for users of stdarg.h ... + * + * Copyright (c) 2013 J. Schilling + */ +/* + * The contents of this file are subject to the terms of the + * Common Development and Distribution License, Version 1.0 only + * (the "License"). You may not use this file except in compliance + * with the License. + * + * See the file CDDL.Schily.txt in this distribution for details. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file CDDL.Schily.txt from this distribution. + */ + +#ifndef _SCHILY_STDARG_H +#define _SCHILY_STDARG_H + +#ifndef _SCHILY_MCONFIG_H +#include +#endif + +#ifndef _SCHILY_VARARGS_H +#include +#endif + +#endif /* _SCHILY_STDARG_H */ diff -Nru cdrtools-2.01.01a33/include/schily/stdarg.mk cdrtools-3.02a09/include/schily/stdarg.mk --- cdrtools-2.01.01a33/include/schily/stdarg.mk 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/include/schily/stdarg.mk 2013-04-30 14:06:48.000000000 +0000 @@ -0,0 +1,17 @@ +#ident "@(#)stdarg.mk 1.1 13/04/30 " +########################################################################### +# Sample makefile for installing non-localized auxiliary files +########################################################################### +SRCROOT= ../.. +RULESDIR= RULES +include $(SRCROOT)/$(RULESDIR)/rules.top +########################################################################### + +INSDIR= include/schily +TARGET= stdarg.h +#XMK_FILE= Makefile.man + +########################################################################### +include $(SRCROOT)/$(RULESDIR)/rules.aux +########################################################################### + diff -Nru cdrtools-2.01.01a33/include/schily/stdint.h cdrtools-3.02a09/include/schily/stdint.h --- cdrtools-2.01.01a33/include/schily/stdint.h 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/include/schily/stdint.h 2015-12-10 20:06:10.000000000 +0000 @@ -0,0 +1,488 @@ +/* @(#)stdint.h 1.37 15/12/10 Copyright 1997-2015 J. Schilling */ +/* + * Abstraction from stdint.h + * + * Copyright (c) 1997-2015 J. Schilling + */ +/* + * The contents of this file are subject to the terms of the + * Common Development and Distribution License, Version 1.0 only + * (the "License"). You may not use this file except in compliance + * with the License. + * + * See the file CDDL.Schily.txt in this distribution for details. + * A copy of the CDDL is also available via the Internet at + * http://www.opensource.org/licenses/cddl1.txt + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file CDDL.Schily.txt from this distribution. + */ + +#ifndef _SCHILY_STDINT_H +#define _SCHILY_STDINT_H + +#ifndef _SCHILY_MCONFIG_H +#include +#endif + +/* + * Let us include system defined types too. + */ +#ifndef _SCHILY_TYPES_H +#include +#endif + +/* + * Include sys/param.h for NBBY - needed in case that CHAR_BIT is missing + */ +#ifndef _SCHILY_PARAM_H +#include /* Must be before limits.h */ +#endif + +/* + * Include limits.h for CHAR_BIT - needed by TYPE_MINVAL(t) and TYPE_MAXVAL(t) + */ +#ifndef _SCHILY_LIMITS_H +#include +#endif + +#ifndef CHAR_BIT +#ifdef NBBY +#define CHAR_BIT NBBY +#endif +#endif + +/* + * Last resort: define CHAR_BIT by hand + */ +#ifndef CHAR_BIT +#define CHAR_BIT 8 +#endif + +/* + * These macros may not work on all platforms but as we depend + * on two's complement in many places, they do not reduce portability. + * The macros below work with 2s complement and ones complement machines. + * Verify with this table... + * + * Bits 1's c. 2's complement. + * 100 -3 -4 + * 101 -2 -3 + * 110 -1 -2 + * 111 -0 -1 + * 000 +0 0 + * 001 +1 +1 + * 010 +2 +2 + * 011 +3 +3 + * + * Computing -TYPE_MINVAL(type) will not work on 2's complement machines + * if 'type' is int or more. Use: + * ((unsigned type)(-1 * (TYPE_MINVAL(type)+1))) + 1; + * it works for both 1's complement and 2's complement machines. + */ +#define TYPE_ISSIGNED(t) (((t)-1) < ((t)0)) +#define TYPE_ISUNSIGNED(t) (!TYPE_ISSIGNED(t)) +#define TYPE_MSBVAL(t) ((t)(~((t)0) << (sizeof (t)*CHAR_BIT - 1))) +#define TYPE_MINVAL(t) (TYPE_ISSIGNED(t) \ + ? TYPE_MSBVAL(t) \ + : ((t)0)) +#define TYPE_MAXVAL(t) ((t)(~((t)0) - TYPE_MINVAL(t))) + +/* + * MSVC has size_t in stddef.h + */ +#ifdef HAVE_STDDEF_H +#ifndef _INCL_STDDEF_H +#include +#define _INCL_STDDEF_H +#endif +#endif + +/* + * CHAR_IS_UNSIGNED is needed to define int8_t + */ +#ifdef __CHAR_UNSIGNED__ /* GNU GCC define (dynamic) */ +#ifndef CHAR_IS_UNSIGNED +#define CHAR_IS_UNSIGNED /* Sing Schily define (static) */ +#endif +#endif + +/* + * This is a definition for a compiler dependant 64 bit type. + * There is currently a silently fallback to a long if the compiler does not + * support it. Check if this is the right way. + * + * Be very careful here as MSVC does not implement long long but rather __int64 + * and once someone makes 'long long' 128 bits on a 64 bit machine, we need to + * check for a MSVC __int128 type. + */ +#ifndef NO_LONGLONG +# if !defined(USE_LONGLONG) && defined(HAVE_LONGLONG) +# define USE_LONGLONG +# endif +# if !defined(USE_LONGLONG) && defined(HAVE___INT64) +# define USE_LONGLONG +# endif +#endif + +#ifdef USE_LONGLONG + +# if defined(HAVE___INT64) + +typedef __int64 Llong; +typedef unsigned __int64 Ullong; /* We should avoid this */ +typedef unsigned __int64 ULlong; + +#define SIZEOF_LLONG SIZEOF___INT64 +#define SIZEOF_ULLONG SIZEOF_UNSIGNED___INT64 + +# else /* We must have HAVE_LONG_LONG */ + +typedef long long Llong; +typedef unsigned long long Ullong; /* We should avoid this */ +typedef unsigned long long ULlong; + +#define SIZEOF_LLONG SIZEOF_LONG_LONG +#define SIZEOF_ULLONG SIZEOF_UNSIGNED_LONG_LONG + +# endif /* HAVE___INT64 / HAVE_LONG_LONG */ + +#else /* !USE_LONGLONG */ + +typedef long Llong; +typedef unsigned long Ullong; /* We should avoid this */ +typedef unsigned long ULlong; + +#define SIZEOF_LLONG SIZEOF_LONG +#define SIZEOF_ULLONG SIZEOF_UNSIGNED_LONG + +#endif /* USE_LONGLONG */ + +#ifndef LLONG_MIN +#define LLONG_MIN TYPE_MINVAL(Llong) +#endif +#ifndef LLONG_MAX +#define LLONG_MAX TYPE_MAXVAL(Llong) +#endif +#ifndef ULLONG_MAX +#define ULLONG_MAX TYPE_MAXVAL(Ullong) +#endif + +/* + * Start inttypes.h emulation. + * + * Thanks to Solaris 2.4 and even recent 1999 Linux versions, we + * cannot use the official UNIX-98 names here. Old Solaris versions + * define parts of the types in some exotic include files. + * Linux even defines incompatible types in . + */ + +#if defined(HAVE_INTTYPES_H) || defined(HAVE_STDINT_H) +#if defined(HAVE_INTTYPES_H) +# ifndef _INCL_INTTYPES_H +# include +# define _INCL_INTTYPES_H +# endif +#else +#if defined(HAVE_STDINT_H) +# ifndef _INCL_STDINT_H +# include +# define _INCL_STDINT_H +# endif +#endif +#endif + +#ifdef __cplusplus +extern "C" { +#endif + +/* + * On VMS on VAX, these types are present but non-scalar. + * Thus we may not be able to use them + */ +#ifdef HAVE_LONGLONG +# define HAVE_INT64_T +# define HAVE_UINT64_T +#endif + +#define Int8_t int8_t +#define Int16_t int16_t +#define Int32_t int32_t +#ifdef HAVE_LONGLONG +#define Int64_t int64_t +#endif +#define Intmax_t intmax_t +#define UInt8_t uint8_t +#define UInt16_t uint16_t +#define UInt32_t uint32_t +#ifdef HAVE_LONGLONG +#define UInt64_t uint64_t +#endif +#define UIntmax_t uintmax_t + +#define Intptr_t intptr_t +#define UIntptr_t uintptr_t + +/* + * If we only have a UNIX-98 inttypes.h but no SUSv3 + * + * Beware not to use int64_t / uint64_t as VMS on a VAX defines + * them as non-scalar (structure) based types. + */ +#ifndef HAVE_TYPE_INTMAX_T +#define intmax_t Llong +#endif +#ifndef HAVE_TYPE_UINTMAX_T +#define uintmax_t ULlong +#endif + +#ifdef __cplusplus +} +#endif + +#else /* !HAVE_INTTYPES_H */ + +#ifdef __cplusplus +extern "C" { +#endif + +#if SIZEOF_CHAR != 1 || SIZEOF_UNSIGNED_CHAR != 1 +/* + * #error will not work for all compilers (e.g. sunos4) + * The following line will abort compilation on all compilers + * if the above is true. And that's what we want. + */ +error Sizeof char is not equal 1 + +#include /* Avoid "unknown directive" with K&R */ +#endif + +#if defined(__STDC__) || defined(CHAR_IS_UNSIGNED) + typedef signed char Int8_t; +#else + typedef char Int8_t; +#endif + +#if SIZEOF_SHORT_INT == 2 + typedef short Int16_t; +#else + error No int16_t found + +#include /* Avoid "unknown directive" with K&R */ +#endif + +#if SIZEOF_INT == 4 +#if defined(_MSC_VER) && SIZEOF_LONG_INT == 4 + typedef long Int32_t; +#else + typedef int Int32_t; +#endif +#else + error No int32_t found + +#include /* Avoid "unknown directive" with K&R */ +#endif + +#if SIZEOF_LONG_INT == 8 + typedef long Int64_t; +# define HAVE_INT64_T +#else +#if SIZEOF_LONG_LONG == 8 + typedef long long Int64_t; +# define HAVE_INT64_T +#else +#if SIZEOF___INT64 == 8 + typedef __int64 Int64_t; +# define HAVE_INT64_T +#else +/* + * Tolerate platforms without 64-Bit support. + */ +/* error No int64_t found */ +#endif +#endif +#endif + +#if SIZEOF_CHAR_P == SIZEOF_INT + typedef int Intptr_t; +#else +#if SIZEOF_CHAR_P == SIZEOF_LONG_INT + typedef long Intptr_t; +#else +#if SIZEOF_CHAR_P == SIZEOF_LLONG + typedef Llong Intptr_t; +#else + error No intptr_t found + +#include /* Avoid "unknown directive" with K&R */ +#endif +#endif +#endif + +typedef unsigned char UInt8_t; + +#if SIZEOF_UNSIGNED_SHORT_INT == 2 + typedef unsigned short UInt16_t; +#else + error No uint16_t found + +#include /* Avoid "unknown directive" with K&R */ +#endif + +#if SIZEOF_UNSIGNED_INT == 4 +#if defined(_MSC_VER) && SIZEOF_UNSIGNED_LONG_INT == 4 + typedef unsigned long UInt32_t; +#else + typedef unsigned int UInt32_t; +#endif +#else + error No int32_t found + +#include /* Avoid "unknown directive" with K&R */ +#endif + +#if SIZEOF_UNSIGNED_LONG_INT == 8 + typedef unsigned long UInt64_t; +# define HAVE_UINT64_T +#else +#if SIZEOF_UNSIGNED_LONG_LONG == 8 + typedef unsigned long long UInt64_t; +# define HAVE_UINT64_T +#else +#if SIZEOF_UNSIGNED___INT64 == 8 + typedef unsigned __int64 UInt64_t; +# define HAVE_UINT64_T +#else +/* + * Tolerate platforms without 64-Bit support. + */ +/* error No uint64_t found */ +#endif +#endif +#endif + +#define Intmax_t Llong +#define UIntmax_t Ullong + +#if SIZEOF_CHAR_P == SIZEOF_UNSIGNED_INT + typedef unsigned int UIntptr_t; +#else +#if SIZEOF_CHAR_P == SIZEOF_UNSIGNED_LONG_INT + typedef unsigned long UIntptr_t; +#else +#if SIZEOF_CHAR_P == SIZEOF_ULLONG + typedef ULlong UIntptr_t; +#else + error No uintptr_t found + +#include /* Avoid "unknown directive" with K&R */ +#endif +#endif +#endif + +#ifdef _MSC_VER +/* + * All recent platforms define the POSIX/C-99 compliant types from inttypes.h + * except Microsoft. With these #defines, we may also use official types on a + * Microsoft environment. + * + * Warning: Linux-2.2 and before do not have inttypes.h and define some of the + * types in an incmpatible way. + */ +#undef int8_t +#define int8_t Int8_t +#undef int16_t +#define int16_t Int16_t +#undef int32_t +#define int32_t Int32_t +#undef int64_t +#define int64_t Int64_t +#undef intmax_t +#define intmax_t Intmax_t +#undef uint8_t +#define uint8_t UInt8_t +#undef uint16_t +#define uint16_t UInt16_t +#undef uint32_t +#define uint32_t UInt32_t +#undef uint64_t +#define uint64_t UInt64_t +#undef uintmax_t +#define uintmax_t UIntmax_t + +#undef intptr_t +#define intptr_t Intptr_t +#undef uintptr_t +#define uintptr_t UIntptr_t +#endif /* _MSC_VER */ + +#ifdef __cplusplus +} +#endif + +#endif /* HAVE_INTTYPES_H */ + +#ifndef INT8_MIN +#define INT8_MIN TYPE_MINVAL(Int8_t) +#endif +#ifndef INT8_MAX +#define INT8_MAX TYPE_MAXVAL(Int8_t) +#endif +#ifndef UINT8_MAX +#define UINT8_MAX TYPE_MAXVAL(UInt8_t) +#endif + +#ifndef INT16_MIN +#define INT16_MIN TYPE_MINVAL(Int16_t) +#endif +#ifndef INT16_MAX +#define INT16_MAX TYPE_MAXVAL(Int16_t) +#endif +#ifndef UINT16_MAX +#define UINT16_MAX TYPE_MAXVAL(UInt16_t) +#endif + +#ifndef INT32_MIN +#define INT32_MIN TYPE_MINVAL(Int32_t) +#endif +#ifndef INT32_MAX +#define INT32_MAX TYPE_MAXVAL(Int32_t) +#endif +#ifndef UINT32_MAX +#define UINT32_MAX TYPE_MAXVAL(UInt32_t) +#endif + +#ifdef HAVE_INT64_T +#ifndef INT64_MIN +#define INT64_MIN TYPE_MINVAL(Int64_t) +#endif +#ifndef INT64_MAX +#define INT64_MAX TYPE_MAXVAL(Int64_t) +#endif +#endif +#ifdef HAVE_UINT64_T +#ifndef UINT64_MAX +#define UINT64_MAX TYPE_MAXVAL(UInt64_t) +#endif +#endif + +#ifndef INTMAX_MIN +#define INTMAX_MIN TYPE_MINVAL(Intmax_t) +#endif +#ifndef INTMAX_MAX +#define INTMAX_MAX TYPE_MAXVAL(Intmax_t) +#endif +#ifndef UINTMAX_MAX +#define UINTMAX_MAX TYPE_MAXVAL(UIntmax_t) +#endif + +#define SIZE_T_MIN TYPE_MINVAL(size_t) +#ifdef SIZE_T_MAX +#undef SIZE_T_MAX /* FreeBSD has a similar #define */ +#endif +#define SIZE_T_MAX TYPE_MAXVAL(size_t) + +#define SSIZE_T_MIN TYPE_MINVAL(ssize_t) +#define SSIZE_T_MAX TYPE_MAXVAL(ssize_t) + +#endif /* _SCHILY_STDINT_H */ diff -Nru cdrtools-2.01.01a33/include/schily/stdint.mk cdrtools-3.02a09/include/schily/stdint.mk --- cdrtools-2.01.01a33/include/schily/stdint.mk 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/include/schily/stdint.mk 2012-01-22 15:04:42.000000000 +0000 @@ -0,0 +1,17 @@ +#ident "@(#)stdint.mk 1.1 12/01/22 " +########################################################################### +# Sample makefile for installing non-localized auxiliary files +########################################################################### +SRCROOT= ../.. +RULESDIR= RULES +include $(SRCROOT)/$(RULESDIR)/rules.top +########################################################################### + +INSDIR= include/schily +TARGET= stdint.h +#XMK_FILE= Makefile.man + +########################################################################### +include $(SRCROOT)/$(RULESDIR)/rules.aux +########################################################################### + diff -Nru cdrtools-2.01.01a33/include/schily/stdio.h cdrtools-3.02a09/include/schily/stdio.h --- cdrtools-2.01.01a33/include/schily/stdio.h 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/include/schily/stdio.h 2016-11-05 23:12:08.000000000 +0000 @@ -0,0 +1,136 @@ +/* @(#)stdio.h 1.14 16/11/06 Copyright 2009-2016 J. Schilling */ +/* + * Abstraction from stdio.h + * + * Copyright (c) 2009-2016 J. Schilling + */ +/* + * The contents of this file are subject to the terms of the + * Common Development and Distribution License, Version 1.0 only + * (the "License"). You may not use this file except in compliance + * with the License. + * + * See the file CDDL.Schily.txt in this distribution for details. + * A copy of the CDDL is also available via the Internet at + * http://www.opensource.org/licenses/cddl1.txt + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file CDDL.Schily.txt from this distribution. + */ + +#ifndef _SCHILY_STDIO_H +#define _SCHILY_STDIO_H +#ifndef NO_SCHILY_STDIO_H /* We #undef _SCHILY_STDIO_H later because */ + /* of the ill designed "hdrchk" program */ + +#ifndef _SCHILY_MCONFIG_H +#include +#endif + +#ifdef INCL_MYSTDIO +#ifndef _INCL_MYSTDIO_H +#include +#define _INCL_MYSTDIO_H +#endif + +#else /* INCL_MYSTDIO */ + +#ifndef _INCL_STDIO_H +#include +#define _INCL_STDIO_H +#endif +#endif /* INCL_MYSTDIO */ + +#ifdef __cplusplus +extern "C" { +#endif + +#ifdef HAVE_LARGEFILES +/* + * If HAVE_LARGEFILES is defined, it is guaranteed that fseeko()/ftello() + * both are available. + */ +#define fseek fseeko +#define ftell ftello +#else /* !HAVE_LARGEFILES */ + +/* + * If HAVE_LARGEFILES is not defined, we depend on specific tests for + * fseeko()/ftello() which must have been done before the tests for + * Large File support have been done. + * Note that this only works if the tests used below are really done before + * the Large File autoconf test is run. This is because autoconf does no + * clean testing but instead cumulatively modifes the envivonment used for + * testing. + */ +#ifdef HAVE_FSEEKO +# define fseek fseeko +#endif +#ifdef HAVE_FTELLO +# define ftell ftello +#endif +#endif + +#if !defined(HAVE_POPEN) && defined(HAVE__POPEN) +#define popen(c, m) _popen((c), (m)) +#endif + +#if !defined(HAVE_PCLOSE) && defined(HAVE__PCLOSE) +#define pclose(fp) _pclose(fp) +#endif + +#ifdef FAST_GETC_PUTC +/* + * The following code partially allows libschily to access FILE * as fast as + * from inside libc on Solaris. + * This makes it possible to implement js_printf() from libschily aprox. + * 33% faster than printf() from libc on Solaris. To do this, we + * partially unhide the FILE structure in a 64 bit environment on Solaris + * to allow to run putc_unlocked() as a marcro. + * + * If you believe you can do this on onther platforms, send a note. + */ +#if defined(__SVR4) && defined(__sun) && defined(_LP64) +#ifndef _SCHILY_TYPES_H +#include /* Needed for ssize_t */ +#endif + +/* + * This is how the 64 bit FILE * begins on Solaris. + */ +struct SCHILY__FILE_TAG { + unsigned char *_ptr; /* next character from/to here in buffer */ + unsigned char *_base; /* the buffer */ + unsigned char *_end; /* the end of the buffer */ + ssize_t _cnt; /* number of available characters in buffer */ +}; + +#define __getc_unlocked(p) (--(p)->_cnt < 0 \ + ? __filbuf((FILE *)p) \ + : (int)*(p)->_ptr++) + +#define getc_unlocked(p) __getc_unlocked((struct SCHILY__FILE_TAG *)p) + +#define __putc_unlocked(x, p) (--(p)->_cnt < 0 \ + ? __flsbuf((x), (FILE *)(p)) \ + : (int)(*(p)->_ptr++ = \ + (unsigned char) (x))) + +#define putc_unlocked(x, p) __putc_unlocked(x, (struct SCHILY__FILE_TAG *)p) + +extern int __filbuf __PR((FILE *)); +extern int __flsbuf __PR((int, FILE *)); + +#else /* !defined(__SVR4) && defined(__sun) && defined(_LP64) */ +#undef FAST_GETC_PUTC +#endif /* !defined(__SVR4) && defined(__sun) && defined(_LP64) */ +#endif /* FAST_GETC_PUTC */ + +#ifdef __cplusplus +} +#endif + +#else /* !NO_SCHILY_STDIO_H */ +#undef _SCHILY_STDIO_H /* #undef here to pass "hdrchk" */ +#endif /* NO_SCHILY_STDIO_H */ +#endif /* _SCHILY_STDIO_H */ diff -Nru cdrtools-2.01.01a33/include/schily/stdio.mk cdrtools-3.02a09/include/schily/stdio.mk --- cdrtools-2.01.01a33/include/schily/stdio.mk 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/include/schily/stdio.mk 2009-01-05 19:18:33.000000000 +0000 @@ -0,0 +1,17 @@ +#ident "@(#)stdio.mk 1.1 09/01/05 " +########################################################################### +# Sample makefile for installing non-localized auxiliary files +########################################################################### +SRCROOT= ../.. +RULESDIR= RULES +include $(SRCROOT)/$(RULESDIR)/rules.top +########################################################################### + +INSDIR= include/schily +TARGET= stdio.h +#XMK_FILE= Makefile.man + +########################################################################### +include $(SRCROOT)/$(RULESDIR)/rules.aux +########################################################################### + diff -Nru cdrtools-2.01.01a33/include/schily/stdlib.h cdrtools-3.02a09/include/schily/stdlib.h --- cdrtools-2.01.01a33/include/schily/stdlib.h 2006-09-13 00:44:11.000000000 +0000 +++ cdrtools-3.02a09/include/schily/stdlib.h 2015-11-27 23:52:05.000000000 +0000 @@ -1,8 +1,8 @@ -/* @(#)stdlib.h 1.7 06/09/13 Copyright 1996 J. Schilling */ +/* @(#)stdlib.h 1.11 15/11/28 Copyright 1996-2015 J. Schilling */ /* * Definitions for stdlib * - * Copyright (c) 1996 J. Schilling + * Copyright (c) 1996-2015 J. Schilling */ /* * The contents of this file are subject to the terms of the @@ -11,6 +11,8 @@ * with the License. * * See the file CDDL.Schily.txt in this distribution for details. + * A copy of the CDDL is also available via the Internet at + * http://www.opensource.org/licenses/cddl1.txt * * When distributing Covered Code, include this CDDL HEADER in each * file and include the License file CDDL.Schily.txt from this distribution. @@ -28,14 +30,34 @@ #include #define _INCL_STDLIB_H #endif -#else +#endif /* HAVE_STDLIB_H */ + + +#ifdef HAVE_POSIX_MALLOC_H /* Haiku */ +#ifndef _INCL_POSIX_MALLOC_H +#include +#define _INCL_POSIX_MALLOC_H +#endif +#endif /* HAVE_POSIX_MALLOC_H */ +#ifdef __cplusplus +extern "C" { +#endif + +#if !defined(_INCL_STDLIB_H) && !defined(_INCL_POSIX_MALLOC_H) extern char *malloc(); extern char *realloc(); +#endif +#ifndef _INCL_STDLIB_H extern double atof(); +#endif + +#ifdef __cplusplus +} +#endif + -#endif /* HAVE_STDLIB_H */ #ifndef EXIT_FAILURE #define EXIT_FAILURE 1 diff -Nru cdrtools-2.01.01a33/include/schily/stdlib.mk cdrtools-3.02a09/include/schily/stdlib.mk --- cdrtools-2.01.01a33/include/schily/stdlib.mk 2006-12-17 21:52:12.000000000 +0000 +++ cdrtools-3.02a09/include/schily/stdlib.mk 2006-12-17 21:52:12.000000000 +0000 @@ -1,4 +1,4 @@ -#ident %W% %E% %Q% +#ident @(#)stdlib.mk 1.1 06/12/17 ########################################################################### # Sample makefile for installing non-localized auxiliary files ########################################################################### diff -Nru cdrtools-2.01.01a33/include/schily/stkframe.h cdrtools-3.02a09/include/schily/stkframe.h --- cdrtools-2.01.01a33/include/schily/stkframe.h 2006-09-13 01:27:00.000000000 +0000 +++ cdrtools-3.02a09/include/schily/stkframe.h 2010-08-27 11:18:28.000000000 +0000 @@ -1,4 +1,4 @@ -/* @(#)stkframe.h 1.11 06/09/13 Copyright 1995 J. Schilling */ +/* @(#)stkframe.h 1.13 10/08/27 Copyright 1995-2010 J. Schilling */ /* * Common definitions for routines that parse the stack frame. * @@ -62,6 +62,10 @@ extern "C" { #endif +#ifndef _SCHILY_UTYPES_H +#include +#endif + /* * XXX: I hope this will be useful on other machines (no guarantee) * XXX: It is taken from a sun Motorola system, but should also be useful @@ -72,7 +76,7 @@ struct frame { struct frame *fr_savfp; /* saved frame pointer */ - int fr_savpc; /* saved program counter */ + Intptr_t fr_savpc; /* saved program counter */ int fr_arg[1]; /* array of arguments */ }; @@ -81,6 +85,6 @@ #endif # endif /* ! defined (sun) */ -#endif /* ! defined (sun) && (defined(SVR4) || defined(__SVR4) || defined(__SVR4__)) */ +#endif /* ! defined (sun) && (defined(SVR4) || defined(__SVR4) || ... */ #endif /* _SCHILY_STKFRAME_H */ diff -Nru cdrtools-2.01.01a33/include/schily/stkframe.mk cdrtools-3.02a09/include/schily/stkframe.mk --- cdrtools-2.01.01a33/include/schily/stkframe.mk 2006-12-17 21:52:12.000000000 +0000 +++ cdrtools-3.02a09/include/schily/stkframe.mk 2006-12-17 21:52:12.000000000 +0000 @@ -1,4 +1,4 @@ -#ident %W% %E% %Q% +#ident @(#)stkframe.mk 1.1 06/12/17 ########################################################################### # Sample makefile for installing non-localized auxiliary files ########################################################################### diff -Nru cdrtools-2.01.01a33/include/schily/strar.h cdrtools-3.02a09/include/schily/strar.h --- cdrtools-2.01.01a33/include/schily/strar.h 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/include/schily/strar.h 2017-02-15 21:17:20.000000000 +0000 @@ -0,0 +1,186 @@ +/* @(#)strar.h 1.4 17/02/15 Copyright 2001-2017 J. Schilling */ +/* + * Defitions for the stream archive interfaces. + * + * A stream archive is based on the method used for + * POSIX tar extended headers + * + * Copyright (c) 2001-2017 J. Schilling + */ +/* + * The contents of this file are subject to the terms of the + * Common Development and Distribution License, Version 1.0 only + * (the "License"). You may not use this file except in compliance + * with the License. + * + * See the file CDDL.Schily.txt in this distribution for details. + * A copy of the CDDL is also available via the Internet at + * http://www.opensource.org/licenses/cddl1.txt + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file CDDL.Schily.txt from this distribution. + */ + +#ifndef _SCHILY_STRAR_H +#define _SCHILY_STRAR_H + +#ifndef _SCHILY_MCONFIG_H +#include +#endif +#ifndef _SCHILY_STAT_H +#include +#endif +#ifndef _SCHILY_STDIO_H +#include +#endif +#ifndef _SCHILY_UTYPES_H +#include +#endif + +typedef struct { + FILE *f_fp; /* FILE * f. Archiv */ + const char *f_fpname; /* Archive name */ + FILE *f_list; /* FILE * f. Listing Output */ + const char *f_listname; /* List output name */ + Ulong f_cmdflags; /* Command specific flags */ + + char *f_name; /* Zeiger auf den langen Dateinamen */ + Ulong f_namelen; /* Länge des Dateinamens */ + char *f_lname; /* Zeiger auf den langen Linknamen */ + Ulong f_lnamelen; /* Länge des Linknamens */ + + char *f_uname; /* User name oder NULL Pointer */ + Ulong f_umaxlen; /* Maximale Länge des Usernamens */ + char *f_gname; /* Group name oder NULL Pointer */ + Ulong f_gmaxlen; /* Maximale Länge des Gruppennamens */ + + dev_t f_dev; /* Geraet auf dem sich d. Datei befindet */ + ino_t f_ino; /* Dateinummer */ + nlink_t f_nlink; /* Anzahl der Links */ + + mode_t f_mode; /* Zugriffsrechte */ + + uid_t f_uid; /* Benutzernummer */ + gid_t f_gid; /* Benutzergruppe */ + + Ullong f_llsize; /* Dateigroesze wenn off_t zu kein */ + off_t f_size; /* Dateigroesze */ + off_t f_rsize; /* Dateigroesze auf Band */ + + Ulong f_flags; /* Bearbeitungshinweise */ + Ulong f_xflags; /* Flags für x-header */ + Ulong f_xftype; /* Header Dateityp (neu generell) */ + Ulong f_rxftype; /* Echter Dateityp (neu generell) */ + +#ifdef NEW_RDEV + dev_t f_rdev; /* Major/Minor bei Geraeten */ + major_t f_rdevmaj; /* Major bei Geraeten */ + minor_t f_rdevmin; /* Minor bei Geraeten */ +#else + Ulong f_rdev; /* Major/Minor bei Geraeten */ + Ulong f_rdevmaj; /* Major bei Geraeten */ + Ulong f_rdevmin; /* Minor bei Geraeten */ +#endif + + time_t f_atime; /* Zeit d. letzten Zugriffs */ + long f_ansec; /* nsec Teil " */ + time_t f_mtime; /* Zeit d. letzten Aenderung */ + long f_mnsec; /* nsec Teil " */ + time_t f_ctime; /* Zeit d. letzten Statusaend. */ + long f_cnsec; /* nsec Teil " */ + long f_status; /* File send status */ +} FINFO; + +typedef FINFO strar; + +/* + * Used with f_cmdflags + */ +#define CMD_VERBOSE 0xFF /* Allow verbose levels from 0..255 */ +#define CMD_CREATE 0x100 +#define CMD_XTRACT 0x200 +#define CMD_LIST 0x400 +#define CMD_CTIME 0x800 + +/* + * Used with f_flags + */ +#define F_BAD_SIZE 0x1000 /* Bad size data detected */ +#define F_BAD_META 0x2000 /* Bad meta data detected */ +#define F_BAD_UID 0x4000 /* Bad uid value detected */ +#define F_BAD_GID 0x8000 /* Bad gid value detected */ + +/* + * Used with f_xflags + */ +#define XF_ATIME 0x0001 /* Zeit d. letzten Zugriffs */ +#define XF_CTIME 0x0002 /* Zeit d. letzten Statusaend. */ +#define XF_MTIME 0x0004 /* Zeit d. letzten Aenderung */ +#define XF_COMMENT 0x0008 /* Beliebiger Kommentar */ +#define XF_UID 0x0010 /* Benutzernummer */ +#define XF_UNAME 0x0020 /* Langer Benutzername */ +#define XF_GID 0x0040 /* Benutzergruppe */ +#define XF_GNAME 0x0080 /* Langer Benutzergruppenname */ +#define XF_PATH 0x0100 /* Langer Name */ +#define XF_LINKPATH 0x0200 /* Langer Link Name */ + /* Dateigröße auf Band (f_rsize) */ +#define XF_SIZE 0x0400 /* Dateigröße wenn > 8 GB */ +#define XF_CHARSET 0x0800 /* Zeichensatz für Dateiinhalte */ + +#define XF_DEVMAJOR 0x1000 /* Major bei Geräten */ +#define XF_DEVMINOR 0x2000 /* Major bei Geräten */ + +#define XF_FFLAGS 0x10000 /* File flags */ + /* Echte Dateigröße (f_size) */ +#define XF_REALSIZE 0x20000 /* Dateigröße wenn > 8 GB */ +#define XF_STATUS 0x40000 /* File send status */ +#define XF_EOF 0x80000 /* Logical EOF in archive */ +#define XF_DEV 0x100000 /* Device FS is on */ +#define XF_INO 0x200000 /* Inode number for file */ +#define XF_NLINK 0x400000 /* Link count */ +#define XF_MODE 0x800000 /* File mode */ +#define XF_FILETYPE 0x1000000 /* File type */ + +#define XF_BASE_FILEMETA (XF_FILETYPE | XF_MODE) +#define XF_ALL_FILEMETA (XF_FILETYPE | XF_MODE | \ + XF_ATIME | XF_MTIME | XF_CTIME | \ + XF_UID | XF_GID | XF_UNAME | XF_GNAME | \ + XF_DEV | XF_INO | XF_NLINK | XF_DEVMAJOR | XF_DEVMINOR) + +/* + * All Extended header tags that are covered by POSIX.1-2001 + */ +#define XF_POSIX (XF_ATIME|XF_CTIME|XF_MTIME|XF_COMMENT|\ + XF_UID|XF_UNAME|XF_GID|XF_GNAME|\ + XF_PATH|XF_LINKPATH|XF_SIZE|XF_CHARSET) + + +/* + * Open modes + */ +#define OM_READ 1 +#define OM_WRITE 2 +#define OM_ARFD 4 + +extern int strar_open __PR((strar *s, const char *name, int arfd, + int mode)); +extern int strar_close __PR((strar *s)); +extern void strar_init __PR((strar *s)); +extern void strar_reset __PR((strar *s)); +extern void strar_archtype __PR((strar *s)); +extern void strar_eof __PR((strar *s)); +extern int strar_send __PR((strar *s, const char *name)); +extern int strar_st_send __PR((strar *s, struct stat *sp)); +extern void strar_list_file __PR((strar *s)); +extern void strar_vprint __PR((strar *s)); +extern int strar_receive __PR((strar *s, int (*func)(strar *))); + +extern int strar_hparse __PR((strar *s)); +extern int strar_get __PR((strar *s)); +extern int strar_skip __PR((strar *s)); + +extern int strar_setnowarn __PR((int val)); +extern void strar_xbreset __PR((void)); + + +#endif /* _SCHILY_STRAR_H */ diff -Nru cdrtools-2.01.01a33/include/schily/strar.mk cdrtools-3.02a09/include/schily/strar.mk --- cdrtools-2.01.01a33/include/schily/strar.mk 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/include/schily/strar.mk 2017-02-15 20:49:38.000000000 +0000 @@ -0,0 +1,17 @@ +#ident "@(#)strar.mk 1.1 17/02/15 " +########################################################################### +# Sample makefile for installing non-localized auxiliary files +########################################################################### +SRCROOT= ../.. +RULESDIR= RULES +include $(SRCROOT)/$(RULESDIR)/rules.top +########################################################################### + +INSDIR= include/schily +TARGET= strar.h +#XMK_FILE= Makefile.man + +########################################################################### +include $(SRCROOT)/$(RULESDIR)/rules.aux +########################################################################### + diff -Nru cdrtools-2.01.01a33/include/schily/string.h cdrtools-3.02a09/include/schily/string.h --- cdrtools-2.01.01a33/include/schily/string.h 2006-10-10 08:24:15.000000000 +0000 +++ cdrtools-3.02a09/include/schily/string.h 2011-11-24 20:52:28.000000000 +0000 @@ -1,8 +1,8 @@ -/* @(#)string.h 1.10 06/10/10 Copyright 1996 J. Schilling */ +/* @(#)string.h 1.12 11/11/24 Copyright 1996-2011 J. Schilling */ /* * Definitions for strings * - * Copyright (c) 1996 J. Schilling + * Copyright (c) 1996-2011 J. Schilling */ /* * The contents of this file are subject to the terms of the @@ -23,6 +23,10 @@ #include #endif +#ifndef _SCHILY_TYPES_H +#include /* Try to get size_t */ +#endif + /* * It may be that IBM's AIX has problems when doing * #include @@ -74,13 +78,13 @@ extern char *strchr __PR((const char *, int)); extern int strcspn __PR((const char *, const char *)); -/*#pragma int_to_unsigned strcspn*/ +/* #pragma int_to_unsigned strcspn */ extern char *strpbrk __PR((const char *, const char *)); extern char *strrchr __PR((const char *, int)); extern int strspn __PR((const char *, const char *)); -/*#pragma int_to_unsigned strspn*/ +/* #pragma int_to_unsigned strspn */ extern char *strstr __PR((const char *, const char *)); extern char *strtok __PR((char *, const char *)); @@ -88,15 +92,12 @@ extern char *strerror __PR((int)); extern int strlen __PR((const char *)); -/*#pragma int_to_unsigned strlen*/ +/* #pragma int_to_unsigned strlen */ extern void *memccpy __PR((void *, const void *, int, int)); extern int strcasecmp __PR((const char *, const char *)); -extern int strncasecmp __PR((const char *, const char *, int)); - -/*#define index strchr*/ -/*#define rindex strrchr*/ +extern int strncasecmp __PR((const char *, const char *, size_t)); #ifdef __cplusplus } diff -Nru cdrtools-2.01.01a33/include/schily/string.mk cdrtools-3.02a09/include/schily/string.mk --- cdrtools-2.01.01a33/include/schily/string.mk 2006-12-17 21:52:12.000000000 +0000 +++ cdrtools-3.02a09/include/schily/string.mk 2006-12-17 21:52:12.000000000 +0000 @@ -1,4 +1,4 @@ -#ident %W% %E% %Q% +#ident @(#)string.mk 1.1 06/12/17 ########################################################################### # Sample makefile for installing non-localized auxiliary files ########################################################################### diff -Nru cdrtools-2.01.01a33/include/schily/sunos4_proto.h cdrtools-3.02a09/include/schily/sunos4_proto.h --- cdrtools-2.01.01a33/include/schily/sunos4_proto.h 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/include/schily/sunos4_proto.h 2013-09-14 15:48:14.000000000 +0000 @@ -0,0 +1,287 @@ +/* @(#)sunos4_proto.h 1.3 13/09/14 Copyright 2013 J. Schilling */ +/* + * Prototypes for POSIX standard functions that are missing on SunOS-4.x. + * + * Copyright (c) 2013 J. Schilling + */ +/* + * The contents of this file are subject to the terms of the + * Common Development and Distribution License, Version 1.0 only + * (the "License"). You may not use this file except in compliance + * with the License. + * + * See the file CDDL.Schily.txt in this distribution for details. + * A copy of the CDDL is also available via the Internet at + * http://www.opensource.org/licenses/cddl1.txt + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file CDDL.Schily.txt from this distribution. + */ + + +#ifndef _SCHILY_SUNOS4_PROTO_H +#define _SCHILY_SUNOS4_PROTO_H + +#ifndef _SCHILY_MCONFIG_H +#include +#endif + +#ifdef __cplusplus +extern "C" { +#endif + +/* + * ctype.h + */ +#if defined(_SCHILY_CTYPE_H) || defined(_SCHILY_WCTYPE_H) +extern int tolower __PR((int __c)); +extern int toupper __PR((int __c)); +#endif + +/* + * pwd.h + */ +#ifdef _SCHILY_PWD_H +extern void endpwent __PR((void)); +#endif + +/* + * poll.h + */ +/*#ifdef _sys_poll_h*/ +#ifdef _SCHILY_POLL_H +extern int poll __PR((struct pollfd __fds[], unsigned long __nfds, int __timeout)); +#endif + +/* + * schily/hostname.h + */ +#ifdef _SCHILY_HOSTNAME_H +extern int gethostname __PR((char *name, int namelen)); +extern int getdomainname __PR((char *name, int namelen)); +#endif + +/* + * signal.h + */ +#ifdef _SCHILY_SIGNAL_H +extern int killpg __PR((pid_t __pgrp, int __sig)); +extern int sigvec __PR((int __sig, struct sigvec *__nvec, struct sigvec *__ovec)); +#endif + +/* + * stdio.h + */ +#ifdef _INCL_STDIO_H +extern int fclose __PR((FILE *__stream)); +/* + * XXX libshedit contains #define fflush(a) (0) that would cause a syntax error + * XXX on a K&R compiler. + */ +#ifndef fflush +extern int fflush __PR((FILE *__stream)); +#endif +extern int fgetc __PR((FILE *__stream)); +extern int _filbuf __PR((FILE *__stream)); +extern int _flsbuf __PR((int __c, FILE *__stream)); +extern int fputc __PR((int __c, FILE *__stream)); +extern int fputs __PR((const char *__s, FILE *__stream)); +extern int fprintf __PR((FILE *__stream, const char * __format, ...)); +extern size_t fread __PR((void *__ptr, size_t __size, size_t __nitems, FILE *__stream)); +extern int fseek __PR((FILE *__stream, long __offset, int __whence)); +extern size_t fwrite __PR((void *__ptr, size_t __size, size_t __nitems, FILE *__stream)); +extern int pclose __PR((FILE *__stream)); +extern void rewind __PR((FILE *__stream)); +extern void setbuf __PR((FILE *__stream, char *__buf)); +extern int setvbuf __PR((FILE *__stream, char *__buf, int __type, size_t __size)); +extern int scanf __PR((const char * __format, ...)); +extern int sscanf __PR((const char * __s, const char * __format, ...)); +extern int ungetc __PR((int __c, FILE *__stream)); +#ifdef _SCHILY_VARARGS_H +extern int vfprintf __PR((FILE *__stream, const char *__format, va_list __ap)); +#endif +extern void perror __PR((const char *__s)); +extern int printf __PR((const char * __format, ...)); + +/* Kommt von libschily */ +/*PRINTFLIKE3*/ +extern int snprintf __PR((char * __s, size_t __n, + const char * __format, /* args*/ ...)) + __printflike__(3, 4); +#endif + +/* + * stdlib.h + */ +#ifdef _INCL_STDLIB_H +/* + * XXX cdda2wav includes a #define atexit(f) on_exit(f, 0) that + * XXX would cause syntax errors with the next prototype on a K&R compiler. + */ +#ifndef atexit +extern int atexit __PR((void (*__func)(void))); +#endif +extern int on_exit __PR((void (*__procp)(void), caddr_t __arg)); +extern char * ecvt __PR((double __value, int __ndigit, int * __decpt, int * __sign)); +/* + * XXX Sun has extern int free(), but GCC has extern void free() in stdlib.h + */ +/*extern void free __PR((void *__ptr));*/ +extern char * fcvt __PR((double __value, int __ndigit, int * __decpt, int * __sign)); +extern char * gcvt __PR((double __value, int __ndigit, char * __buf)); +extern int mkstemp __PR((char *__template)); +extern char * mktemp __PR((char *__template)); +extern int putenv __PR((char *__string)); +extern long strtol __PR((const char * __str, char ** __endptr, int __base)); +extern int system __PR((const char *_string)); +extern void * valloc __PR((size_t __size)); +#endif + +/* + * string.h + */ +#ifdef _SCHILY_STRING_H +extern void * memchr __PR((const void *__s, int __c, size_t __n)); +extern int strcoll __PR((const char *__s1, const char *__s2)); +extern int strncasecmp __PR((const char *__s1, const char *__s2, size_t __n)); + +/* + * strings.h + */ +extern void bcopy __PR((const void *__s1, void *__s2, size_t __n)); +extern void bzero __PR((void *__s, size_t __n)); +#endif + +/* + * sys/file.h + */ +#ifdef _SCHILY_FCNTL_H +extern int flock __PR((int __fd, int __operation)); +#endif + +/* + * sys/mman.h + */ +#ifdef _SCHILY_MMAN_H +extern int mlock __PR((caddr_t __addr, size_t __len)); +extern int mlockall __PR((int __flags)); +#endif + +/* + * sys/resource.h + */ +#ifdef _SCHILY_RESOURCE_H +extern int getrlimit __PR((int __resource, struct rlimit *__rlp)); +extern int setrlimit __PR((int __resource, const struct rlimit *__rlp)); +extern int getrusage __PR((int __who, struct rusage *__r_usage)); +extern int getpriority __PR((int __which, int __who)); +extern int setpriority __PR((int _which, int __who, int __value)); + +extern pid_t wait3 __PR((int *__statusp, int __options, struct rusage *__rusage)); +#endif + +/* + * sys/shm.h + */ +#ifdef _SCHILY_SHM_H +extern void * shmat __PR((int __shmid, const void *__shmaddr, int __shmflg)); +extern int shmctl __PR((int __shmid, int __cmd, struct shmid_ds *__buf)); +extern int shmget __PR((key_t __key, size_t __size, int __shmflg)); +#endif + +/* + * sys/socket.h + */ +#ifdef _SCHILY_SOCKET_H +extern int connect __PR((int __s, const struct sockaddr *__name, int __namelen)); +extern int socket __PR((int __domain, int __type, int __protocol)); +extern int getsockopt __PR((int __s, int __level, int __optname, void *__optval, + int *__optlen)); +extern int setsockopt __PR((int __s, int __level, int __optname, const void *__optval, + int __optlen)); +extern int getpeername __PR((int __s, struct sockaddr *__name, socklen_t *__namelen)); +extern int socketpair __PR((int __domain, int __type, int __protocol, int __sv[2])); +#endif + +/* + * sys/stat.h + */ +#ifdef _INCL_SYS_STAT_H +extern int stat __PR((const char * __path, struct stat * __buf)); +extern int lstat __PR((const char * __path, struct stat * __buf)); +extern int fchmod __PR((int __fildes, mode_t __mode)); +extern int fstat __PR((int __filedes, struct stat * __buf)); +extern int mknod __PR((const char *__path, mode_t __mode, dev_t __dev)); +#endif + +/* + * sys/time.h + */ +#ifdef _INCL_SYS_TIME_H +extern int gettimeofday __PR((struct timeval *__tp, void *__tzp)); +extern int settimeofday __PR((struct timeval *__tp, void *__tzp)); +extern int utimes __PR((const char *__path, const struct timeval __times[2])); +extern int select __PR((int __nfds, fd_set * __readfds, fd_set * __writefds, + fd_set * __errorfds, + struct timeval * __timeout)); + +#endif + +/* + * sys/timeb.h + */ +#ifdef _sys_timeb_h +extern int ftime __PR((struct timeb *__tp)); +#endif + +/* + * time.h + */ +#ifdef _SCHILY_TIME_H +extern clock_t clock __PR((void)); +extern time_t mktime __PR((struct tm *__timeptr)); +extern size_t strftime __PR((char * _s, size_t _maxsize, + const char * __format, + const struct tm * __timeptr)); +extern time_t time __PR((time_t *__tloc)); +#endif + +/* + * unistd.h + */ +#ifdef _SCHILY_UNISTD_H +/*extern int chdir __PR((const char *__path));*/ +extern int fchdir __PR((int __fildes)); +extern int fsync __PR((int __fildes)); +extern int getdtablesize __PR((void)); +extern long gethostid __PR((void)); +extern int getopt __PR((int __argc, char * const __argv[], const char *__optstring)); +extern int ioctl __PR((int __fildes, int __request, /* arg */ ...)); +extern int lockf __PR((int __fildes, int __function, off_t __size)); +extern int rcmd __PR((char **__ahost, unsigned short __inport, const char *__luser, + const char *__ruser, const char *__cmd, int *__fd2p)); +extern ssize_t readlink __PR((const char * __path, char * __buf, size_t __bufsiz)); +extern int rename __PR((const char *__old, const char *__new)); +extern int setreuid __PR((uid_t __ruid, uid_t __euid)); +extern int seteuid __PR((uid_t __euid)); +extern int setegid __PR((gid_t __egid)); + +extern int symlink __PR((const char *__name1, const char *__name2)); +extern void sync __PR((void)); + +extern int truncate __PR((const char *__path, off_t __length)); +extern int ftruncate __PR((int __fildes, off_t __length)); + +extern int brk __PR((void *__endds)); +/*extern void * sbrk __PR((intptr_t __incr));*/ +extern void * sbrk __PR((Intptr_t __incr)); + +/*extern int usleep __PR((useconds_t __useconds));*/ +extern int usleep __PR((unsigned __useconds)); +#endif + +#ifdef __cplusplus +} +#endif + +#endif /* _SCHILY_SUNOS4_PROTO_H */ diff -Nru cdrtools-2.01.01a33/include/schily/sunos4_proto.mk cdrtools-3.02a09/include/schily/sunos4_proto.mk --- cdrtools-2.01.01a33/include/schily/sunos4_proto.mk 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/include/schily/sunos4_proto.mk 2013-05-06 20:48:47.000000000 +0000 @@ -0,0 +1,17 @@ +#ident "@(#)sunos4_proto.mk 1.1 13/05/06 " +########################################################################### +# Sample makefile for installing non-localized auxiliary files +########################################################################### +SRCROOT= ../.. +RULESDIR= RULES +include $(SRCROOT)/$(RULESDIR)/rules.top +########################################################################### + +INSDIR= include/schily +TARGET= sunos4_proto.h +#XMK_FILE= Makefile.man + +########################################################################### +include $(SRCROOT)/$(RULESDIR)/rules.aux +########################################################################### + diff -Nru cdrtools-2.01.01a33/include/schily/sysexits.h cdrtools-3.02a09/include/schily/sysexits.h --- cdrtools-2.01.01a33/include/schily/sysexits.h 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/include/schily/sysexits.h 2015-04-22 18:23:51.000000000 +0000 @@ -0,0 +1,135 @@ +/* @(#)sysexits.h 1.6 15/04/22 J. Schilling */ +/* + * + * Copyright (c) 2009-2015 J. Schilling + * + * Copyright (c) 1987, 1993 + * The Regents of the University of California. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. Neither the name of the University nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * @(#)sysexits.h 8.1 (Berkeley) 6/2/93 + */ + +#ifndef _SCHILY_SYSEXITS_H +#define _SCHILY_SYSEXITS_H + +#ifndef _SCHILY_MCONFIG_H +#include +#endif + +#ifdef HAVE_SYSEXITS_H +#include +#endif /* HAVE_SYSEXITS_H */ + +/* + * SYSEXITS.H -- Exit status codes for system programs. + * + * This include file attempts to categorize possible error + * exit statuses for system programs, notably delivermail + * and the Berkeley network. + * + * Error numbers begin at EX__BASE to reduce the possibility of + * clashing with other exit statuses that random programs may + * already return. The meaning of the codes is approximately + * as follows: + * + * EX_USAGE -- The command was used incorrectly, e.g., with + * the wrong number of arguments, a bad flag, a bad + * syntax in a parameter, or whatever. + * EX_DATAERR -- The input data was incorrect in some way. + * This should only be used for user's data & not + * system files. + * EX_NOINPUT -- An input file (not a system file) did not + * exist or was not readable. This could also include + * errors like "No message" to a mailer (if it cared + * to catch it). + * EX_NOUSER -- The user specified did not exist. This might + * be used for mail addresses or remote logins. + * EX_NOHOST -- The host specified did not exist. This is used + * in mail addresses or network requests. + * EX_UNAVAILABLE -- A service is unavailable. This can occur + * if a support program or file does not exist. This + * can also be used as a catchall message when something + * you wanted to do doesn't work, but you don't know + * why. + * EX_SOFTWARE -- An internal software error has been detected. + * This should be limited to non-operating system related + * errors as possible. + * EX_OSERR -- An operating system error has been detected. + * This is intended to be used for such things as "cannot + * fork", "cannot create pipe", or the like. It includes + * things like getuid returning a user that does not + * exist in the passwd file. + * EX_OSFILE -- Some system file (e.g., /etc/passwd, /etc/utmp, + * etc.) does not exist, cannot be opened, or has some + * sort of error (e.g., syntax error). + * EX_CANTCREAT -- A (user specified) output file cannot be + * created. + * EX_IOERR -- An error occurred while doing I/O on some file. + * EX_TEMPFAIL -- temporary failure, indicating something that + * is not really an error. In sendmail, this means + * that a mailer (e.g.) could not create a connection, + * and the request should be reattempted later. + * EX_PROTOCOL -- the remote system returned something that + * was "not possible" during a protocol exchange. + * EX_NOPERM -- You did not have sufficient permission to + * perform the operation. This is not intended for + * file system problems, which should use NOINPUT or + * CANTCREAT, but rather for higher level permissions. + * + * Haiku recently added an #ifdef _BSD_SOURCE around the definitions, + * so we may need to #define things even though we did include the + * system's sysexits.h. + */ + +#ifndef EX_OK +#define EX_OK 0 /* successful termination */ +#endif + +#ifndef EX__BASE +#define EX__BASE 64 /* base value for error messages */ + +#define EX_USAGE 64 /* command line usage error */ +#define EX_DATAERR 65 /* data format error */ +#define EX_NOINPUT 66 /* cannot open input */ +#define EX_NOUSER 67 /* addressee unknown */ +#define EX_NOHOST 68 /* host name unknown */ +#define EX_UNAVAILABLE 69 /* service unavailable */ +#define EX_SOFTWARE 70 /* internal software error */ +#define EX_OSERR 71 /* system error (e.g., can't fork) */ +#define EX_OSFILE 72 /* critical OS file missing */ +#define EX_CANTCREAT 73 /* can't create (user) output file */ +#define EX_IOERR 74 /* input/output error */ +#define EX_TEMPFAIL 75 /* temp failure; user is invited to retry */ +#define EX_PROTOCOL 76 /* remote error in protocol */ +#define EX_NOPERM 77 /* permission denied */ +#define EX_CONFIG 78 /* configuration error */ + +#define EX_NOTFOUND 79 /* entry not found */ +#define EX__MAX 79 /* maximum listed value */ +#endif + +#endif /* !_SCHILY_SYSEXITS_H */ diff -Nru cdrtools-2.01.01a33/include/schily/sysexits.mk cdrtools-3.02a09/include/schily/sysexits.mk --- cdrtools-2.01.01a33/include/schily/sysexits.mk 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/include/schily/sysexits.mk 2009-02-04 21:05:38.000000000 +0000 @@ -0,0 +1,17 @@ +#ident "@(#)sysexits.mk 1.1 09/02/04 " +########################################################################### +# Sample makefile for installing non-localized auxiliary files +########################################################################### +SRCROOT= ../.. +RULESDIR= RULES +include $(SRCROOT)/$(RULESDIR)/rules.top +########################################################################### + +INSDIR= include/schily +TARGET= sysexits.h +#XMK_FILE= Makefile.man + +########################################################################### +include $(SRCROOT)/$(RULESDIR)/rules.aux +########################################################################### + diff -Nru cdrtools-2.01.01a33/include/schily/syslog.h cdrtools-3.02a09/include/schily/syslog.h --- cdrtools-2.01.01a33/include/schily/syslog.h 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/include/schily/syslog.h 2009-08-07 17:07:10.000000000 +0000 @@ -0,0 +1,33 @@ +/* @(#)syslog.h 1.1 09/08/07 Copyright 2009 J. Schilling */ +/* + * Abstraction code for syslog + * + * Copyright (c) 2009 J. Schilling + */ +/* + * The contents of this file are subject to the terms of the + * Common Development and Distribution License, Version 1.0 only + * (the "License"). You may not use this file except in compliance + * with the License. + * + * See the file CDDL.Schily.txt in this distribution for details. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file CDDL.Schily.txt from this distribution. + */ + +#ifndef _SCHILY_SYSLOG_H +#define _SCHILY_SYSLOG_H + +#ifndef _SCHILY_MCONFIG_H +#include +#endif + +#ifdef HAVE_SYSLOG_H +#ifndef _INCL_SYSLOG_H +#define _INCL_SYSLOG_H +#include +#endif +#endif + +#endif /* _SCHILY_SYSLOG_H */ diff -Nru cdrtools-2.01.01a33/include/schily/syslog.mk cdrtools-3.02a09/include/schily/syslog.mk --- cdrtools-2.01.01a33/include/schily/syslog.mk 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/include/schily/syslog.mk 2009-08-07 17:07:10.000000000 +0000 @@ -0,0 +1,17 @@ +#ident "@(#)syslog.mk 1.1 09/08/07 " +########################################################################### +# Sample makefile for installing non-localized auxiliary files +########################################################################### +SRCROOT= ../.. +RULESDIR= RULES +include $(SRCROOT)/$(RULESDIR)/rules.top +########################################################################### + +INSDIR= include/schily +TARGET= syslog.h +#XMK_FILE= Makefile.man + +########################################################################### +include $(SRCROOT)/$(RULESDIR)/rules.aux +########################################################################### + diff -Nru cdrtools-2.01.01a33/include/schily/systeminfo.h cdrtools-3.02a09/include/schily/systeminfo.h --- cdrtools-2.01.01a33/include/schily/systeminfo.h 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/include/schily/systeminfo.h 2009-07-13 22:56:08.000000000 +0000 @@ -0,0 +1,33 @@ +/* @(#)systeminfo.h 1.1 09/07/14 Copyright 2009 J. Schilling */ +/* + * Systeminfo abstraction + * + * Copyright (c) 2009 J. Schilling + */ +/* + * The contents of this file are subject to the terms of the + * Common Development and Distribution License, Version 1.0 only + * (the "License"). You may not use this file except in compliance + * with the License. + * + * See the file CDDL.Schily.txt in this distribution for details. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file CDDL.Schily.txt from this distribution. + */ + +#ifndef _SCHILY_SYSTEMINFO_H +#define _SCHILY_SYSTEMINFO_H + +#ifndef _SCHILY_MCONFIG_H +#include +#endif + +#ifdef HAVE_SYS_SYSTEMINFO_H +#ifndef _INCL_SYS_SYSTEMINFO_H +#define _INCL_SYS_SYSTEMINFO_H +#include +#endif +#endif + +#endif /* _SCHILY_SYSTEMINFO_H */ diff -Nru cdrtools-2.01.01a33/include/schily/systeminfo.mk cdrtools-3.02a09/include/schily/systeminfo.mk --- cdrtools-2.01.01a33/include/schily/systeminfo.mk 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/include/schily/systeminfo.mk 2009-07-13 22:56:54.000000000 +0000 @@ -0,0 +1,17 @@ +#ident "@(#)systeminfo.mk 1.1 09/07/14 " +########################################################################### +# Sample makefile for installing non-localized auxiliary files +########################################################################### +SRCROOT= ../.. +RULESDIR= RULES +include $(SRCROOT)/$(RULESDIR)/rules.top +########################################################################### + +INSDIR= include/schily +TARGET= systeminfo.h +#XMK_FILE= Makefile.man + +########################################################################### +include $(SRCROOT)/$(RULESDIR)/rules.aux +########################################################################### + diff -Nru cdrtools-2.01.01a33/include/schily/Targets cdrtools-3.02a09/include/schily/Targets --- cdrtools-2.01.01a33/include/schily/Targets 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/include/schily/Targets 2017-02-15 21:35:56.000000000 +0000 @@ -0,0 +1,36 @@ +#ident @(#)Targets 1.24 17/02/15 + +X_MK_LIST= \ + align.mk alloca.mk archdefs.mk assert.mk avoffset.mk \ + btorder.mk \ + ccomdefs.mk checkerr.mk ctype.mk \ + dbgmalloc.mk deflts.mk device.mk dirent.mk dlfcn.mk \ + err_arch.mk err_bit.mk err_char.mk err_type.mk \ + errno.mk fcntl.mk \ + fetchdir.mk find.mk float.mk fnmatch.mk fstream.mk \ + getargs.mk getcwd.mk grp.mk \ + hostname.mk \ + iconv.mk idcache.mk in.mk inet.mk io.mk ioctl.mk ipc.mk \ + intcvt.mk inttypes.mk \ + jmpdefs.mk \ + libgen.mk libport.mk librmt.mk limits.mk locale.mk \ + math.mk maxpath.mk mconfig.mk \ + md4.mk md5.mk \ + mman.mk mtio.mk \ + netdb.mk nlsdefs.mk \ + param.mk patmatch.mk poll.mk priv.mk procfs.mk prototyp.mk pwd.mk \ + regex.mk _regex.mk resource.mk rmd160.mk rmtio.mk \ + schily.mk schilyp.mk select.mk sem.mk shedit.mk shm.mk \ + setjmp.mk sha1.mk sha2.mk sha3.mk shcall.mk \ + siconv.mk shadow.mk \ + sigblk.mk signal.mk sigset.mk socket.mk standard.mk stat.mk \ + stdarg.mk stdint.mk stdio.mk \ + stdlib.mk stkframe.mk strar.mk string.mk \ + sunos4_proto.mk \ + sysexits.mk syslog.mk systeminfo.mk \ + termcap.mk termios.mk time.mk timeb.mk times.mk \ + types.mk unistd.mk utime.mk utsname.mk utypes.mk \ + varargs.mk vfork.mk \ + walk.mk wchar.mk wctype.mk wait.mk \ + windows.mk \ + xconfig.mk xmconfig.mk diff -Nru cdrtools-2.01.01a33/include/schily/termcap.h cdrtools-3.02a09/include/schily/termcap.h --- cdrtools-2.01.01a33/include/schily/termcap.h 2006-10-10 07:27:57.000000000 +0000 +++ cdrtools-3.02a09/include/schily/termcap.h 2010-08-27 11:19:16.000000000 +0000 @@ -1,6 +1,6 @@ -/* @(#)termcap.h 1.8 06/10/10 Copyright 1995 J. Schilling */ +/* @(#)termcap.h 1.10 10/08/27 Copyright 1995-2010 J. Schilling */ /* - * Copyright (c) 1995 J. Schilling + * Copyright (c) 1995-2010 J. Schilling */ /* * The contents of this file are subject to the terms of the @@ -32,11 +32,11 @@ * Flags for tcsetflags() */ #define TCF_NO_TC 0x0001 /* Don't follow tc= entries */ -#define TCF_NO_SIZE 0x0002 /* Don't get actual ttysize (li#/co#)*/ +#define TCF_NO_SIZE 0x0002 /* Don't get actual ttysize (li#/co#) */ #define TCF_NO_STRIP 0x0004 /* Don't strip down termcap buffer */ extern char PC; /* Pad character */ -extern char *BC; /* Backspace if not "\b" from "bc" capability*/ +extern char *BC; /* Backspace if not "\b" from "bc" capability */ extern char *UP; /* Cursor up string from "up" capability */ extern short ospeed; /* output speed coded as in ioctl */ @@ -45,10 +45,11 @@ extern char *tcgetbuf __PR((void)); extern int tgetnum __PR((char *ent)); extern BOOL tgetflag __PR((char *ent)); -extern char *tgetstr __PR((char *ent, char **array)); -extern char *tdecode __PR((char *ep, char **array)); +extern char *tgetstr __PR((char *ent, char **array)); +extern char *tdecode __PR((char *ep, char **array)); -extern int tputs __PR((char *cp, int affcnt, int (*outc)(int c))); +extern int tputs __PR((char *cp, int affcnt, + int (*outc)(int c))); extern char *tgoto __PR((char *cm, int destcol, int destline)); #ifdef __cplusplus diff -Nru cdrtools-2.01.01a33/include/schily/termcap.mk cdrtools-3.02a09/include/schily/termcap.mk --- cdrtools-2.01.01a33/include/schily/termcap.mk 2006-12-17 21:52:12.000000000 +0000 +++ cdrtools-3.02a09/include/schily/termcap.mk 2006-12-17 21:52:12.000000000 +0000 @@ -1,4 +1,4 @@ -#ident %W% %E% %Q% +#ident @(#)termcap.mk 1.1 06/12/17 ########################################################################### # Sample makefile for installing non-localized auxiliary files ########################################################################### diff -Nru cdrtools-2.01.01a33/include/schily/termios.h cdrtools-3.02a09/include/schily/termios.h --- cdrtools-2.01.01a33/include/schily/termios.h 2007-05-24 10:59:55.000000000 +0000 +++ cdrtools-3.02a09/include/schily/termios.h 2011-08-12 22:04:06.000000000 +0000 @@ -1,8 +1,8 @@ -/* @(#)termios.h 1.31 07/05/24 Copyright 1984-2007 J. Schilling */ +/* @(#)termios.h 1.34 11/08/13 Copyright 1984-2011 J. Schilling */ /* * Terminal driver tty mode handling * - * Copyright (c) 1984-2007 J. Schilling + * Copyright (c) 1984-2011 J. Schilling */ /* * The contents of this file are subject to the terms of the @@ -27,14 +27,19 @@ #ifndef _SCHILY_TYPES_H #include #endif +#ifndef _SCHILY_UNISTD_H +#include /* Haiku needs this for _POSIX_VDISABLE */ +#endif #ifdef JOS # include # include #else #ifdef HAVE_TERMIOS_H +# ifndef _INCL_TERMIOS_H # include # define _INCL_TERMIOS_H +# endif /* _INCL_TERMIOS_H */ # ifdef TIOCGETA /* FreeBSD */ # define TCGETS TIOCGETA # define TCSETSW TIOCSETAW @@ -45,8 +50,10 @@ # endif #else # ifdef HAVE_TERMIO_H +# ifndef _INCL_TERMIO_H # include # define _INCL_TERMIO_H +# endif /* _INCL_TERMIO_H */ # ifndef TCGETS # define termios termio # define TCGETS TCGETA @@ -60,20 +67,54 @@ #if !defined(HAVE_TCGETATTR) || !defined(HAVE_TCSETATTR) # undef TCSANOW +#else +# define USE_TCSETATTR /* Use tcsetattr() instead of ioctl() */ +# define USE_TERMIOS /* Termio as classification */ #endif #ifndef TCSANOW # if !defined(TCGETS) || !defined(TCSETSW) # define USE_V7_TTY +# else +# define USE_TCSETSW /* Use ioctl()s */ +# ifndef USE_TERMIOS +# define USE_TERMIOS /* Termio as classification */ +# endif +# endif +#endif + +#if defined(USE_V7_TTY) && defined(HAVE_SGTTY_H) +# ifndef _INCL_SGTTY_H +# include +# define _INCL_SGTTY_H # endif #endif +#if defined(USE_V7_TTY) +# ifndef TIOCGETP +# undef USE_V7_TTY +# define USE_NO_TTY_IOCTL /* A DOS system? */ +# endif +#endif + +#if defined(USE_NO_TTY_IOCTL) && defined(HAVE_CONIO_H) +# ifndef _INCL_CONIO_H +# include +# define _INCL_CONIO_H +# endif /* _INCL_CONIO_H */ +# define USE_GETCH /* A DOS system! */ +#endif + + #if !defined(_INCL_TERMIOS_H) && !defined(_INCL_TERMIO_H) # include #endif #ifdef HAVE_SYS_BSDTTY_H +#ifndef _INCL_SYS_BSDTTY_H #include +#define _INCL_SYS_BSDTTY_H +#endif #endif #if !defined(TIOCGWINSZ) && ! defined(TIOCGSIZE) diff -Nru cdrtools-2.01.01a33/include/schily/termios.mk cdrtools-3.02a09/include/schily/termios.mk --- cdrtools-2.01.01a33/include/schily/termios.mk 2006-12-17 21:52:12.000000000 +0000 +++ cdrtools-3.02a09/include/schily/termios.mk 2006-12-17 21:52:12.000000000 +0000 @@ -1,4 +1,4 @@ -#ident %W% %E% %Q% +#ident @(#)termios.mk 1.1 06/12/17 ########################################################################### # Sample makefile for installing non-localized auxiliary files ########################################################################### diff -Nru cdrtools-2.01.01a33/include/schily/timeb.h cdrtools-3.02a09/include/schily/timeb.h --- cdrtools-2.01.01a33/include/schily/timeb.h 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/include/schily/timeb.h 2013-04-29 22:20:33.000000000 +0000 @@ -0,0 +1,39 @@ +/* @(#)timeb.h 1.1 13/04/30 Copyright 2013 J. Schilling */ +/* + * ftime abstraction + * + * Copyright (c) 2013 J. Schilling + */ +/* + * The contents of this file are subject to the terms of the + * Common Development and Distribution License, Version 1.0 only + * (the "License"). You may not use this file except in compliance + * with the License. + * + * See the file CDDL.Schily.txt in this distribution for details. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file CDDL.Schily.txt from this distribution. + */ + +#ifndef _SCHILY_TIMEB_H +#define _SCHILY_TIMEB_H + +#ifndef _SCHILY_MCONFIG_H +#include +#endif +#ifndef _SCHILY_TYPES_H +#include +#endif +#ifndef _SCHILY_TIME_H +#include +#endif + +#ifdef HAVE_FTIME +#ifndef _INCL_SYS_TIMEB_H +#include +#define _INCL_SYS_TIMEB_H +#endif +#endif + +#endif /* _SCHILY_TIMEB_H */ diff -Nru cdrtools-2.01.01a33/include/schily/timeb.mk cdrtools-3.02a09/include/schily/timeb.mk --- cdrtools-2.01.01a33/include/schily/timeb.mk 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/include/schily/timeb.mk 2013-04-29 22:20:33.000000000 +0000 @@ -0,0 +1,17 @@ +#ident "@(#)timeb.mk 1.1 13/04/30 " +########################################################################### +# Sample makefile for installing non-localized auxiliary files +########################################################################### +SRCROOT= ../.. +RULESDIR= RULES +include $(SRCROOT)/$(RULESDIR)/rules.top +########################################################################### + +INSDIR= include/schily +TARGET= timeb.h +#XMK_FILE= Makefile.man + +########################################################################### +include $(SRCROOT)/$(RULESDIR)/rules.aux +########################################################################### + diff -Nru cdrtools-2.01.01a33/include/schily/time.h cdrtools-3.02a09/include/schily/time.h --- cdrtools-2.01.01a33/include/schily/time.h 2007-04-25 14:54:03.000000000 +0000 +++ cdrtools-3.02a09/include/schily/time.h 2013-10-01 20:22:24.000000000 +0000 @@ -1,10 +1,10 @@ -/* @(#)time.h 1.18 07/04/25 Copyright 1996-2007 J. Schilling */ +/* @(#)time.h 1.20 13/10/01 Copyright 1996-2013 J. Schilling */ /* * Generic header for users of time(), gettimeofday() ... * * It includes definitions for time_t, struct timeval, ... * - * Copyright (c) 1996-2007 J. Schilling + * Copyright (c) 1996-2013 J. Schilling */ /* * The contents of this file are subject to the terms of the @@ -13,6 +13,8 @@ * with the License. * * See the file CDDL.Schily.txt in this distribution for details. + * A copy of the CDDL is also available via the Internet at + * http://www.opensource.org/licenses/cddl1.txt * * When distributing Covered Code, include this CDDL HEADER in each * file and include the License file CDDL.Schily.txt from this distribution. @@ -81,6 +83,15 @@ }; #endif +#ifndef HAVE_STRUCT_TIMESPEC + +struct timespec { + time_t tv_sec; + long tv_nsec; +}; +#endif + + #undef timerclear #define timerclear(tvp) (tvp)->tv_sec = (tvp)->tv_usec = 0 @@ -115,6 +126,37 @@ timerfix1(tvp1); timerfix2(tvp1); \ } while (0) + +#undef timespecclear +#define timespecclear(tsp) (tsp)->tv_sec = (tsp)->tv_nsec = 0 + +#undef timespecfix +#define timespecfix1(tsp) while ((tsp)->tv_nsec < 0) { \ + (tsp)->tv_sec--; \ + (tsp)->tv_nsec += 1000000000; \ + } + +#define timespecfix2(tsp) while ((tsp)->tv_nsec > 1000000000) { \ + (tsp)->tv_sec++; \ + (tsp)->tv_nsec -= 1000000000; \ + } + +#define timespecfix(tsp) do { timespecfix1(tsp); timespecfix2(tsp); } while (0) + +#undef timespecsub +#define timespecsub(tsp1, tsp2) do { \ + (tsp1)->tv_sec -= (tsp2)->tv_sec; \ + (tsp1)->tv_nsec -= (tsp2)->tv_nsec; \ + timespecfix1(tsp1); timespecfix2(tsp1); \ + } while (0) + +#undef timespecadd +#define timespecadd(tsp1, tsp2) do { \ + (tsp1)->tv_sec += (tsp2)->tv_sec; \ + (tsp1)->tv_nsec += (tsp2)->tv_nsec; \ + timespecfix1(tsp1); timespecfix2(tsp1); \ + } while (0) + #ifdef __cplusplus } #endif diff -Nru cdrtools-2.01.01a33/include/schily/time.mk cdrtools-3.02a09/include/schily/time.mk --- cdrtools-2.01.01a33/include/schily/time.mk 2006-12-17 21:52:12.000000000 +0000 +++ cdrtools-3.02a09/include/schily/time.mk 2006-12-17 21:52:12.000000000 +0000 @@ -1,4 +1,4 @@ -#ident %W% %E% %Q% +#ident @(#)time.mk 1.1 06/12/17 ########################################################################### # Sample makefile for installing non-localized auxiliary files ########################################################################### diff -Nru cdrtools-2.01.01a33/include/schily/times.h cdrtools-3.02a09/include/schily/times.h --- cdrtools-2.01.01a33/include/schily/times.h 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/include/schily/times.h 2009-07-13 18:04:37.000000000 +0000 @@ -0,0 +1,53 @@ +/* @(#)times.h 1.1 09/07/13 Copyright 2009 J. Schilling */ +/* + * Times abstraction + * + * Copyright (c) 2009 J. Schilling + */ +/* + * The contents of this file are subject to the terms of the + * Common Development and Distribution License, Version 1.0 only + * (the "License"). You may not use this file except in compliance + * with the License. + * + * See the file CDDL.Schily.txt in this distribution for details. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file CDDL.Schily.txt from this distribution. + */ + +#ifndef _SCHILY_TIMES_H +#define _SCHILY_TIMES_H + +#ifndef _SCHILY_MCONFIG_H +#include +#endif +#ifndef _SCHILY_TIME_H +#include +#endif +#ifndef _SCHILY_LIMITS_H +#include +#endif +#ifndef _SCHILY_UNISTD_H +#include +#endif + +/* + * Make sure to include schily/time.h before, because of a Next Step bug. + */ +#ifdef HAVE_SYS_TIMES_H +#ifndef _INCL_SYS_TIMES_H +#define _INCL_SYS_TIMES_H +#include +#endif +#endif + +#ifndef CLK_TCK +#if defined(_SC_CLK_TCK) +#define CLK_TCK ((clock_t)sysconf(_SC_CLK_TCK)) +#else +#define CLK_TCK 60 +#endif +#endif + +#endif /* _SCHILY_TIMES_H */ diff -Nru cdrtools-2.01.01a33/include/schily/times.mk cdrtools-3.02a09/include/schily/times.mk --- cdrtools-2.01.01a33/include/schily/times.mk 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/include/schily/times.mk 2009-07-13 17:25:18.000000000 +0000 @@ -0,0 +1,17 @@ +#ident "@(#)times.mk 1.1 09/07/13 " +########################################################################### +# Sample makefile for installing non-localized auxiliary files +########################################################################### +SRCROOT= ../.. +RULESDIR= RULES +include $(SRCROOT)/$(RULESDIR)/rules.top +########################################################################### + +INSDIR= include/schily +TARGET= times.h +#XMK_FILE= Makefile.man + +########################################################################### +include $(SRCROOT)/$(RULESDIR)/rules.aux +########################################################################### + diff -Nru cdrtools-2.01.01a33/include/schily/types.h cdrtools-3.02a09/include/schily/types.h --- cdrtools-2.01.01a33/include/schily/types.h 2007-01-16 14:19:12.000000000 +0000 +++ cdrtools-3.02a09/include/schily/types.h 2009-10-22 21:20:13.000000000 +0000 @@ -1,8 +1,8 @@ -/* @(#)types.h 1.2 07/01/16 Copyright 2006-2007 J. Schilling */ +/* @(#)types.h 1.5 09/10/22 Copyright 2006-2009 J. Schilling */ /* * Abstraction from sys/types.h * - * Copyright (c) 2006-2007 J. Schilling + * Copyright (c) 2006-2009 J. Schilling */ /* * The contents of this file are subject to the terms of the @@ -28,6 +28,20 @@ #include #define _INCL_SYS_TYPES_H #endif +#else +#ifdef HAVE_TYPES_H +#ifndef _INCL_TYPES_H +#include +#define _INCL_TYPES_H +#endif +#endif +#endif + +#ifdef HAVE_STDDEF_H +#ifndef _INCL_STDDEF_H +#include /* For offsetof(), ptrdiff_t, wchar_t, size_t */ +#define _INCL_STDDEF_H +#endif #endif #endif /* _SCHILY_TYPES_H */ diff -Nru cdrtools-2.01.01a33/include/schily/types.mk cdrtools-3.02a09/include/schily/types.mk --- cdrtools-2.01.01a33/include/schily/types.mk 2007-01-03 13:16:11.000000000 +0000 +++ cdrtools-3.02a09/include/schily/types.mk 2007-01-03 13:16:11.000000000 +0000 @@ -1,4 +1,4 @@ -#ident %W% %E% %Q% +#ident @(#)types.mk 1.1 07/01/03 ########################################################################### # Sample makefile for installing non-localized auxiliary files ########################################################################### diff -Nru cdrtools-2.01.01a33/include/schily/unistd.h cdrtools-3.02a09/include/schily/unistd.h --- cdrtools-2.01.01a33/include/schily/unistd.h 2007-01-16 14:19:12.000000000 +0000 +++ cdrtools-3.02a09/include/schily/unistd.h 2017-04-30 20:37:55.000000000 +0000 @@ -1,8 +1,8 @@ -/* @(#)unistd.h 1.19 07/01/16 Copyright 1996-2007 J. Schilling */ +/* @(#)unistd.h 1.28 17/04/30 Copyright 1996-2017 J. Schilling */ /* * Definitions for unix system interface * - * Copyright (c) 1996-2007 J. Schilling + * Copyright (c) 1996-2017 J. Schilling */ /* * The contents of this file are subject to the terms of the @@ -11,6 +11,8 @@ * with the License. * * See the file CDDL.Schily.txt in this distribution for details. + * A copy of the CDDL is also available via the Internet at + * http://www.opensource.org/licenses/cddl1.txt * * When distributing Covered Code, include this CDDL HEADER in each * file and include the License file CDDL.Schily.txt from this distribution. @@ -30,6 +32,13 @@ #include #endif +/* + * inttypes.h grants things like Intptr_t to be typedef'd. + */ +#ifndef _SCHILY_INTTYPES_H +#include +#endif + #ifdef HAVE_UNISTD_H #ifndef _INCL_UNISTD_H @@ -43,7 +52,11 @@ #endif #endif -#endif /* HAVE_UNISTD_H */ +#else /* !HAVE_UNISTD_H */ +#ifndef _SCHILY_STDLIB_H +#include /* MSVC: no unistd.h environ is in stdlib.h */ +#endif +#endif /* !HAVE_UNISTD_H */ /* * MSVC has getcwd()/chdir()/mkdir()/rmdir() in direct.h @@ -111,16 +124,35 @@ #define SEEK_END 2 /* Set file pointer to EOF plus "offset" */ #endif +#ifdef __cplusplus +extern "C" { +#endif + +#ifndef HAVE_ENVIRON_DEF +extern char **environ; +#endif + #if !defined(HAVE_UNISTD_H) || !defined(_POSIX_VERSION) /* * Maybe we need a lot more definitions here... * It is not clear whether we should have prototyped definitions. */ +#if !defined(_MSC_VER) && !defined(__MINGW32__) +/* + * MS C comes with broken prototypes in wrong header files (in our case, the + * wrong prototype is in io.h). Avoid to redefine the broken MS stuff with + * correct prototypes. + */ extern int access __PR((const char *, int)); extern int close __PR((int)); extern int dup __PR((int)); extern int dup2 __PR((int, int)); -#ifndef _MSC_VER +extern int link __PR((const char *, const char *)); +extern int read __PR((int, void *, size_t)); +extern int unlink __PR((const char *)); +extern int write __PR((int, const void *, size_t)); +#endif +#if !defined(_MSC_VER) && !defined(__MINGW32__) /* * MS C comes with broken prototypes in wrong header files (in our case, the * wrong prototype is in stdlib.h). Avoid to redefine the broken MS stuff with @@ -128,10 +160,24 @@ */ extern void _exit __PR((int)); #endif -extern int link __PR((const char *, const char *)); -extern int read __PR((int, void *, size_t)); -extern int unlink __PR((const char *)); -extern int write __PR((int, const void *, size_t)); +#endif + +#if !defined(HAVE_PIPE) && defined(HAVE__PIPE) && defined(HAVE_IO_H) +#ifndef _SCHILY_LIMITS_H +#include /* for PIPE_BUF */ +#endif +#ifndef _SCHILY_FCNTL_H +#include /* for O_BINARY */ +#endif +#ifndef _SCHILY_IO_H +#include /* for _pipe() */ +#endif + +#define pipe(pp) _pipe(pp, PIPE_BUF, O_BINARY) +#endif + +#ifdef __cplusplus +} #endif #endif /* _SCHILY_UNISTD_H */ diff -Nru cdrtools-2.01.01a33/include/schily/unistd.mk cdrtools-3.02a09/include/schily/unistd.mk --- cdrtools-2.01.01a33/include/schily/unistd.mk 2006-12-17 21:52:12.000000000 +0000 +++ cdrtools-3.02a09/include/schily/unistd.mk 2006-12-17 21:52:12.000000000 +0000 @@ -1,4 +1,4 @@ -#ident %W% %E% %Q% +#ident @(#)unistd.mk 1.1 06/12/17 ########################################################################### # Sample makefile for installing non-localized auxiliary files ########################################################################### diff -Nru cdrtools-2.01.01a33/include/schily/utime.h cdrtools-3.02a09/include/schily/utime.h --- cdrtools-2.01.01a33/include/schily/utime.h 2007-01-16 14:19:13.000000000 +0000 +++ cdrtools-3.02a09/include/schily/utime.h 2010-08-24 13:40:56.000000000 +0000 @@ -1,8 +1,8 @@ -/* @(#)utime.h 1.8 07/01/16 Copyright 2001-2007 J. Schilling */ +/* @(#)utime.h 1.9 10/08/24 Copyright 2001-2010 J. Schilling */ /* * Defines for utimes() / utime() * - * Copyright (c) 2001-2007 J. Schilling + * Copyright (c) 2001-2010 J. Schilling */ /* * The contents of this file are subject to the terms of the @@ -45,10 +45,20 @@ #define _INCL_SYS_UTIME_H #endif #else + +#ifdef __cplusplus +extern "C" { +#endif + struct utimbuf { time_t actime; time_t modtime; }; + +#ifdef __cplusplus +} +#endif + #endif #endif @@ -67,5 +77,4 @@ #endif /* __comment__ */ - #endif /* _SCHILY_UTIME_H */ diff -Nru cdrtools-2.01.01a33/include/schily/utime.mk cdrtools-3.02a09/include/schily/utime.mk --- cdrtools-2.01.01a33/include/schily/utime.mk 2006-12-17 21:52:13.000000000 +0000 +++ cdrtools-3.02a09/include/schily/utime.mk 2006-12-17 21:52:13.000000000 +0000 @@ -1,4 +1,4 @@ -#ident %W% %E% %Q% +#ident @(#)utime.mk 1.1 06/12/17 ########################################################################### # Sample makefile for installing non-localized auxiliary files ########################################################################### diff -Nru cdrtools-2.01.01a33/include/schily/utsname.h cdrtools-3.02a09/include/schily/utsname.h --- cdrtools-2.01.01a33/include/schily/utsname.h 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/include/schily/utsname.h 2011-08-05 18:06:53.000000000 +0000 @@ -0,0 +1,62 @@ +/* @(#)utsname.h 1.3 11/08/05 Copyright 2009-2011 J. Schilling */ +/* + * Utsname abstraction + * + * Copyright (c) 2009-2011 J. Schilling + */ +/* + * The contents of this file are subject to the terms of the + * Common Development and Distribution License, Version 1.0 only + * (the "License"). You may not use this file except in compliance + * with the License. + * + * See the file CDDL.Schily.txt in this distribution for details. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file CDDL.Schily.txt from this distribution. + */ + +#ifndef _SCHILY_UTSNAME_H +#define _SCHILY_UTSNAME_H + +#ifndef _SCHILY_MCONFIG_H +#include +#endif + +/* + * NeXT Step has sys/utsname but not uname() + */ +#ifdef HAVE_SYS_UTSNAME_H +#ifndef _INCL_SYS_UTSNAME_H +#define _INCL_SYS_UTSNAME_H +#include +#endif +#else /* !HAVE_SYS_UTSNAME_H */ + +#ifdef __cplusplus +extern "C" { +#endif + +#ifndef SYS_NMLN +#define SYS_NMLN 257 +#endif + +struct utsname { + char sysname[SYS_NMLN]; /* Name of this OS */ + char nodename[SYS_NMLN]; /* Name of this network node */ + char release[SYS_NMLN]; /* Release level */ + char version[SYS_NMLN]; /* Version level */ + char machine[SYS_NMLN]; /* hardware type */ +}; + +#ifndef HAVE_UNAME +extern int uname __PR((struct utsname *)); +#endif + +#ifdef __cplusplus +} +#endif + +#endif /* !HAVE_SYS_UTSNAME_H */ + +#endif /* _SCHILY_UTSNAME_H */ diff -Nru cdrtools-2.01.01a33/include/schily/utsname.mk cdrtools-3.02a09/include/schily/utsname.mk --- cdrtools-2.01.01a33/include/schily/utsname.mk 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/include/schily/utsname.mk 2009-07-13 17:25:18.000000000 +0000 @@ -0,0 +1,17 @@ +#ident "@(#)utsname.mk 1.1 09/07/13 " +########################################################################### +# Sample makefile for installing non-localized auxiliary files +########################################################################### +SRCROOT= ../.. +RULESDIR= RULES +include $(SRCROOT)/$(RULESDIR)/rules.top +########################################################################### + +INSDIR= include/schily +TARGET= utsname.h +#XMK_FILE= Makefile.man + +########################################################################### +include $(SRCROOT)/$(RULESDIR)/rules.aux +########################################################################### + diff -Nru cdrtools-2.01.01a33/include/schily/utypes.h cdrtools-3.02a09/include/schily/utypes.h --- cdrtools-2.01.01a33/include/schily/utypes.h 2007-01-16 14:19:13.000000000 +0000 +++ cdrtools-3.02a09/include/schily/utypes.h 2013-09-14 15:48:14.000000000 +0000 @@ -1,8 +1,8 @@ -/* @(#)utypes.h 1.26 07/01/16 Copyright 1997-2007 J. Schilling */ +/* @(#)utypes.h 1.36 13/09/14 Copyright 1997-2013 J. Schilling */ /* * Definitions for some user defined types * - * Copyright (c) 1997-2008 J. Schilling + * Copyright (c) 1997-2013 J. Schilling */ /* * The contents of this file are subject to the terms of the @@ -11,6 +11,8 @@ * with the License. * * See the file CDDL.Schily.txt in this distribution for details. + * A copy of the CDDL is also available via the Internet at + * http://www.opensource.org/licenses/cddl1.txt * * When distributing Covered Code, include this CDDL HEADER in each * file and include the License file CDDL.Schily.txt from this distribution. @@ -24,89 +26,14 @@ #endif /* - * Let us include system defined types too. + * uypes.h is based on inttypes.h */ -#ifndef _SCHILY_TYPES_H -#include +#ifndef _SCHILY_INTTYPES_H +#include #endif -/* - * Include limits.h for CHAR_BIT - */ -#ifdef HAVE_LIMITS_H -#ifndef _INCL_LIMITS_H -#include -#define _INCL_LIMITS_H -#endif -#endif - -/* - * Do we need to define _XOPEN_SOURCE to get NZERO? - * On Linux, it is needed but on Linux NZERO is 20. - */ -#ifndef NZERO /* for nice(2) */ -#define NZERO 20 -#endif - -/* - * Include sys/param.h for NBBY - */ -#ifndef _SCHILY_PARAM_H -#include -#endif - -#ifndef CHAR_BIT -#ifdef NBBY -#define CHAR_BIT NBBY -#endif -#endif - -#ifndef CHAR_BIT -#define CHAR_BIT 8 -#endif - -/* - * These macros may not work on all platforms but as we depend - * on two's complement in many places, they do not reduce portability. - * The macros below work with 2s complement and ones complement machines. - * Verify with this table... - * - * Bits 1's c. 2's complement. - * 100 -3 -4 - * 101 -2 -3 - * 110 -1 -2 - * 111 -0 -1 - * 000 +0 0 - * 001 +1 +1 - * 010 +2 +2 - * 011 +3 +3 - * - * Computing -TYPE_MINVAL(type) will not work on 2's complement machines - * if 'type' is int or more. Use -(UIntmax_t)TYPE_MINVAL(type), it works - * for both 1's complement and 2's complement machines. - */ -#define TYPE_ISSIGNED(t) (((t)-1) < ((t)0)) -#define TYPE_ISUNSIGNED(t) (!TYPE_ISSIGNED(t)) -#define TYPE_MSBVAL(t) ((t)(~((t)0) << (sizeof (t)*CHAR_BIT - 1))) -#define TYPE_MINVAL(t) (TYPE_ISSIGNED(t) \ - ? TYPE_MSBVAL(t) \ - : ((t)0)) -#define TYPE_MAXVAL(t) ((t)(~((t)0) - TYPE_MINVAL(t))) - -/* - * MSVC has size_t in stddef.h - */ -#ifdef HAVE_STDDEF_H -#ifndef _INCL_STDDEF_H -#include -#define _INCL_STDDEF_H -#endif -#endif - -#ifdef __CHAR_UNSIGNED__ /* GNU GCC define (dynamic) */ -#ifndef CHAR_IS_UNSIGNED -#define CHAR_IS_UNSIGNED /* Sing Schily define (static) */ -#endif +#ifdef __cplusplus +extern "C" { #endif /* @@ -118,63 +45,6 @@ typedef unsigned char Uchar; /* - * This is a definition for a compiler dependant 64 bit type. - * It currently is silently a long if the compiler does not - * support it. Check if this is the right way. - * - * Be very careful here as MSVC does not implement long long but rather __int64 - * and once someone makes 'long long' 128 bits on a 64 bit machine, we need to - * check for a MSVC __int128 type. - */ -#ifndef NO_LONGLONG -# if defined(HAVE_LONGLONG) -# define USE_LONGLONG -# endif -#endif - -#ifdef USE_LONGLONG - -# if defined(HAVE___INT64) - -typedef __int64 Llong; -typedef unsigned __int64 Ullong; /* We should avoid this */ -typedef unsigned __int64 ULlong; - -#define SIZEOF_LLONG SIZEOF___INT64 -#define SIZEOF_ULLONG SIZEOF_UNSIGNED___INT64 - -# else /* We must have HAVE_LONG_LONG */ - -typedef long long Llong; -typedef unsigned long long Ullong; /* We should avoid this */ -typedef unsigned long long ULlong; - -#define SIZEOF_LLONG SIZEOF_LONG_LONG -#define SIZEOF_ULLONG SIZEOF_UNSIGNED_LONG_LONG - -# endif /* HAVE___INT64 / HAVE_LONG_LONG */ - -#else - -typedef long Llong; -typedef unsigned long Ullong; /* We should avoid this */ -typedef unsigned long ULlong; - -#define SIZEOF_LLONG SIZEOF_LONG -#define SIZEOF_ULLONG SIZEOF_UNSIGNED_LONG - -#endif -#ifndef LLONG_MIN -#define LLONG_MIN TYPE_MINVAL(Llong) -#endif -#ifndef LLONG_MAX -#define LLONG_MAX TYPE_MAXVAL(Llong) -#endif -#ifndef ULLONG_MAX -#define ULLONG_MAX TYPE_MAXVAL(Ullong) -#endif - -/* * The IBM AIX C-compiler seems to be the only compiler on the world * which does not allow to use unsigned char bit fields as a hint * for packed bit fields. Define a pesical type to avoid warnings. @@ -190,175 +60,6 @@ #endif -/* - * Start inttypes.h emulation. - * - * Thanks to Solaris 2.4 and even recent 1999 Linux versions, we - * cannot use the official UNIX-98 names here. Old Solaris versions - * define parts of the types in some exotic include files. - * Linux even defines incompatible types in . - */ - -#ifdef HAVE_INTTYPES_H -# ifndef _INCL_INTTYPES_H -# include -# define _INCL_INTTYPES_H -# endif -# define HAVE_INT64_T -# define HAVE_UINT64_T - -#define Int8_t int8_t -#define Int16_t int16_t -#define Int32_t int32_t -#define Int64_t int64_t -#define Intmax_t intmax_t -#define UInt8_t uint8_t -#define UInt16_t uint16_t -#define UInt32_t uint32_t -#define UInt64_t uint64_t -#define UIntmax_t uintmax_t - -#define Intptr_t intptr_t -#define UIntptr_t uintptr_t - -#else /* !HAVE_INTTYPES_H */ - -#if SIZEOF_CHAR != 1 || SIZEOF_UNSIGNED_CHAR != 1 -/* - * #error will not work for all compilers (e.g. sunos4) - * The following line will abort compilation on all compilers - * if the above is true. And that's what we want. - */ -error Sizeof char is not equal 1 -#endif - -#if defined(__STDC__) || defined(CHAR_IS_UNSIGNED) - typedef signed char Int8_t; -#else - typedef char Int8_t; -#endif - -#if SIZEOF_SHORT_INT == 2 - typedef short Int16_t; -#else - error No int16_t found -#endif - -#if SIZEOF_INT == 4 - typedef int Int32_t; -#else - error No int32_t found -#endif - -#if SIZEOF_LONG_INT == 8 - typedef long Int64_t; -# define HAVE_INT64_T -#else -#if SIZEOF_LONG_LONG == 8 - typedef long long Int64_t; -# define HAVE_INT64_T -#else -#if SIZEOF___INT64 == 8 - typedef __int64 Int64_t; -# define HAVE_INT64_T -#else -/* error No int64_t found*/ -#endif -#endif -#endif - -#if SIZEOF_CHAR_P == SIZEOF_INT - typedef int Intptr_t; -#else -#if SIZEOF_CHAR_P == SIZEOF_LONG_INT - typedef long Intptr_t; -#else - error No intptr_t found -#endif -#endif - -typedef unsigned char UInt8_t; - -#if SIZEOF_UNSIGNED_SHORT_INT == 2 - typedef unsigned short UInt16_t; -#else - error No uint16_t found -#endif - -#if SIZEOF_UNSIGNED_INT == 4 - typedef unsigned int UInt32_t; -#else - error No int32_t found -#endif - -#if SIZEOF_UNSIGNED_LONG_INT == 8 - typedef unsigned long UInt64_t; -# define HAVE_UINT64_T -#else -#if SIZEOF_UNSIGNED_LONG_LONG == 8 - typedef unsigned long long UInt64_t; -# define HAVE_UINT64_T -#else -#if SIZEOF_UNSIGNED___INT64 == 8 - typedef unsigned __int64 UInt64_t; -# define HAVE_UINT64_T -#else -/* error No uint64_t found*/ -#endif -#endif -#endif - -#define Intmax_t Llong -#define UIntmax_t Ullong - -#if SIZEOF_CHAR_P == SIZEOF_UNSIGNED_INT - typedef unsigned int UIntptr_t; -#else -#if SIZEOF_CHAR_P == SIZEOF_UNSIGNED_LONG_INT - typedef unsigned long UIntptr_t; -#else - error No uintptr_t found -#endif -#endif - -#ifdef _MSC_VER -/* - * All recent platforms define the POSIX/C-99 compliant types from inttypes.h - * except Microsoft. With these #defines, we may also use official types on a - * Microsoft environment. - * - * Warning: Linux-2.2 and before do not have inttypes.h and define some of the - * types in an incmpatible way. - */ -#undef int8_t -#define int8_t Int8_t -#undef int16_t -#define int16_t Int16_t -#undef int32_t -#define int32_t Int32_t -#undef int64_t -#define int64_t Int64_t -#undef intmax_t -#define intmax_t Intmax_t -#undef uint8_t -#define uint8_t UInt8_t -#undef uint16_t -#define uint16_t UInt16_t -#undef uint32_t -#define uint32_t UInt32_t -#undef uint64_t -#define uint64_t UInt64_t -#undef uintmax_t -#define uintmax_t UIntmax_t - -#undef intptr_t -#define intptr_t Intptr_t -#undef uintptr_t -#define uintptr_t UIntptr_t -#endif /* _MSC_VER */ - -#endif /* HAVE_INTTYPES_H */ - #ifndef CHAR_MIN #define CHAR_MIN TYPE_MINVAL(char) #endif @@ -399,69 +100,6 @@ #define ULONG_MAX TYPE_MAXVAL(unsigned long) #endif -#ifndef INT8_MIN -#define INT8_MIN TYPE_MINVAL(Int8_t) -#endif -#ifndef INT8_MAX -#define INT8_MAX TYPE_MAXVAL(Int8_t) -#endif -#ifndef UINT8_MAX -#define UINT8_MAX TYPE_MAXVAL(UInt8_t) -#endif - -#ifndef INT16_MIN -#define INT16_MIN TYPE_MINVAL(Int16_t) -#endif -#ifndef INT16_MAX -#define INT16_MAX TYPE_MAXVAL(Int16_t) -#endif -#ifndef UINT16_MAX -#define UINT16_MAX TYPE_MAXVAL(UInt16_t) -#endif - -#ifndef INT32_MIN -#define INT32_MIN TYPE_MINVAL(Int32_t) -#endif -#ifndef INT32_MAX -#define INT32_MAX TYPE_MAXVAL(Int32_t) -#endif -#ifndef UINT32_MAX -#define UINT32_MAX TYPE_MAXVAL(UInt32_t) -#endif - -#ifdef HAVE_INT64_T -#ifndef INT64_MIN -#define INT64_MIN TYPE_MINVAL(Int64_t) -#endif -#ifndef INT64_MAX -#define INT64_MAX TYPE_MAXVAL(Int64_t) -#endif -#endif -#ifdef HAVE_UINT64_T -#ifndef UINT64_MAX -#define UINT64_MAX TYPE_MAXVAL(UInt64_t) -#endif -#endif - -#ifndef INTMAX_MIN -#define INTMAX_MIN TYPE_MINVAL(Intmax_t) -#endif -#ifndef INTMAX_MAX -#define INTMAX_MAX TYPE_MAXVAL(Intmax_t) -#endif -#ifndef UINTMAX_MAX -#define UINTMAX_MAX TYPE_MAXVAL(UIntmax_t) -#endif - -#define SIZE_T_MIN TYPE_MINVAL(size_t) -#ifdef SIZE_T_MAX -#undef SIZE_T_MAX /* FreeBSD has a similar #define */ -#endif -#define SIZE_T_MAX TYPE_MAXVAL(size_t) - -#define SSIZE_T_MIN TYPE_MINVAL(ssize_t) -#define SSIZE_T_MAX TYPE_MAXVAL(ssize_t) - #define OFF_T_MIN TYPE_MINVAL(off_t) #define OFF_T_MAX TYPE_MAXVAL(off_t) @@ -513,4 +151,8 @@ #define SOCKLEN_T_MIN TYPE_MINVAL(socklen_t) #define SOCKLEN_T_MAX TYPE_MAXVAL(socklen_t) +#ifdef __cplusplus +} +#endif + #endif /* _SCHILY_UTYPES_H */ diff -Nru cdrtools-2.01.01a33/include/schily/utypes.mk cdrtools-3.02a09/include/schily/utypes.mk --- cdrtools-2.01.01a33/include/schily/utypes.mk 2006-12-17 21:52:13.000000000 +0000 +++ cdrtools-3.02a09/include/schily/utypes.mk 2006-12-17 21:52:13.000000000 +0000 @@ -1,4 +1,4 @@ -#ident %W% %E% %Q% +#ident @(#)utypes.mk 1.1 06/12/17 ########################################################################### # Sample makefile for installing non-localized auxiliary files ########################################################################### diff -Nru cdrtools-2.01.01a33/include/schily/varargs.h cdrtools-3.02a09/include/schily/varargs.h --- cdrtools-2.01.01a33/include/schily/varargs.h 2006-09-13 00:44:11.000000000 +0000 +++ cdrtools-3.02a09/include/schily/varargs.h 2014-01-06 20:25:13.000000000 +0000 @@ -1,4 +1,4 @@ -/* @(#)varargs.h 1.6 06/09/13 Copyright 1998 J. Schilling */ +/* @(#)varargs.h 1.8 14/01/06 Copyright 1998-2014 J. Schilling */ /* * Generic header for users of var args ... * @@ -6,7 +6,10 @@ * and some magic know how about the SVr4 Power PC var args ABI * to create a __va_arg_list() macro. * - * Copyright (c) 1998 J. Schilling + * The __va_arg_list() macro is needed to fetch a va_list type argument + * from a va_list. This is needed to implement a recursive "%r" printf. + * + * Copyright (c) 1998-2014 J. Schilling */ /* * The contents of this file are subject to the terms of the @@ -15,6 +18,8 @@ * with the License. * * See the file CDDL.Schily.txt in this distribution for details. + * A copy of the CDDL is also available via the Internet at + * http://www.opensource.org/licenses/cddl1.txt * * When distributing Covered Code, include this CDDL HEADER in each * file and include the License file CDDL.Schily.txt from this distribution. @@ -27,6 +32,10 @@ #include #endif +#ifdef __cplusplus +extern "C" { +#endif + #ifdef PROTOTYPES /* * For ANSI C-compilers prefer stdarg.h @@ -60,7 +69,8 @@ #endif #if (defined(__linux__) || defined(__linux) || defined(sun)) && \ - (defined(__ppc) || defined(__PPC) || defined(powerpc) || defined(__powerpc__)) + (defined(__ppc) || defined(__PPC) || \ + defined(powerpc) || defined(__powerpc__)) # ifndef VA_LIST_IS_ARRAY # define VA_LIST_IS_ARRAY @@ -113,4 +123,18 @@ # define __va_arg_list(list) va_arg(list, va_list) #endif +/* + * This structure allows to work around the C limitation that a variable of + * type array cannot appear at the left side of an assignement operator. + * By putting va_list inside a struture, the assignement will work even in case + * that va_list is an array2. + */ +typedef struct { + va_list ap; +} va_lists_t; + +#ifdef __cplusplus +} +#endif + #endif /* _SCHILY_VARARGS_H */ diff -Nru cdrtools-2.01.01a33/include/schily/varargs.mk cdrtools-3.02a09/include/schily/varargs.mk --- cdrtools-2.01.01a33/include/schily/varargs.mk 2006-12-17 21:52:13.000000000 +0000 +++ cdrtools-3.02a09/include/schily/varargs.mk 2006-12-17 21:52:13.000000000 +0000 @@ -1,4 +1,4 @@ -#ident %W% %E% %Q% +#ident @(#)varargs.mk 1.1 06/12/17 ########################################################################### # Sample makefile for installing non-localized auxiliary files ########################################################################### diff -Nru cdrtools-2.01.01a33/include/schily/vfork.h cdrtools-3.02a09/include/schily/vfork.h --- cdrtools-2.01.01a33/include/schily/vfork.h 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/include/schily/vfork.h 2009-11-15 13:03:38.000000000 +0000 @@ -0,0 +1,69 @@ +/* @(#)vfork.h 1.4 09/11/15 Copyright 2009 J. Schilling */ +/* + * Vfork abstraction + * + * Copyright (c) 2009 J. Schilling + */ +/* + * The contents of this file are subject to the terms of the + * Common Development and Distribution License, Version 1.0 only + * (the "License"). You may not use this file except in compliance + * with the License. + * + * See the file CDDL.Schily.txt in this distribution for details. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file CDDL.Schily.txt from this distribution. + */ + +#ifndef _SCHILY_VFORK_H +#define _SCHILY_VFORK_H + +#ifndef _SCHILY_MCONFIG_H +#include +#endif +#ifndef _SCHILY_UNISTD_H +#include /* vfork() definitions are here on Solaris */ +#endif + +#ifdef HAVE_VFORK_H +#ifndef _INCL_VFORK_H +#define _INCL_VFORK_H +#include +#endif +#endif +#ifdef HAVE_SYS_FORK_H +#ifndef _INCL_SYS_FORK_H +#define _INCL_SYS_FORK_H +#include +#endif +#endif + +#ifdef VMS +#ifndef VMS_VFORK_OK +/* + * vfork() on VMS implements strange deviations from the expected behavior. + * The child does not run correctly unless it calls exec*(). + * The file descriptors are not separated from the parent. + * + * decc$set_child_standard_streams() allows to work around the most important + * problem of having no separate space for file descriptors if the code is + * prepared for the deviations. + * + * As VMS silently overwrites the "vfork" #definition from mconfig.h in + * unistd.h, we need to reset to the definition in mconfig.h for all programs + * that are not prepared for the deviations. + */ +#ifndef HAVE_VFORK /* Paranoia in case VMS implements a working vfork() */ +#undef vfork +#define vfork fork +#endif /* HAVE_VFORK */ + +#else /* VMS_VFORK_OK */ + +#define set_child_standard_fds(in, out, err) \ + decc$set_child_standard_streams((in), (out), (err)) +#endif /* VMS_VFORK_OK */ +#endif /* VMS */ + +#endif /* _SCHILY_VFORK_H */ diff -Nru cdrtools-2.01.01a33/include/schily/vfork.mk cdrtools-3.02a09/include/schily/vfork.mk --- cdrtools-2.01.01a33/include/schily/vfork.mk 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/include/schily/vfork.mk 2009-07-13 17:25:18.000000000 +0000 @@ -0,0 +1,17 @@ +#ident "@(#)vfork.mk 1.1 09/07/13 " +########################################################################### +# Sample makefile for installing non-localized auxiliary files +########################################################################### +SRCROOT= ../.. +RULESDIR= RULES +include $(SRCROOT)/$(RULESDIR)/rules.top +########################################################################### + +INSDIR= include/schily +TARGET= vfork.h +#XMK_FILE= Makefile.man + +########################################################################### +include $(SRCROOT)/$(RULESDIR)/rules.aux +########################################################################### + diff -Nru cdrtools-2.01.01a33/include/schily/wait.h cdrtools-3.02a09/include/schily/wait.h --- cdrtools-2.01.01a33/include/schily/wait.h 2007-01-16 14:19:13.000000000 +0000 +++ cdrtools-3.02a09/include/schily/wait.h 2016-04-02 10:56:12.000000000 +0000 @@ -1,8 +1,8 @@ -/* @(#)wait.h 1.13 07/01/16 Copyright 1995-2007 J. Schilling */ +/* @(#)wait.h 1.26 16/04/02 Copyright 1995-2016 J. Schilling */ /* * Definitions to deal with various kinds of wait flavour * - * Copyright (c) 1995-2007 J. Schilling + * Copyright (c) 1995-2016 J. Schilling */ /* * The contents of this file are subject to the terms of the @@ -11,6 +11,8 @@ * with the License. * * See the file CDDL.Schily.txt in this distribution for details. + * A copy of the CDDL is also available via the Internet at + * http://www.opensource.org/licenses/cddl1.txt * * When distributing Covered Code, include this CDDL HEADER in each * file and include the License file CDDL.Schily.txt from this distribution. @@ -54,81 +56,226 @@ # endif # endif #endif +#ifdef JOS +# ifndef _INCL_SYS_EXIT_H +# include +# define _INCL_SYS_EXIT_H +# endif +#endif +#if defined(__EMX__) || defined(__DJGPP__) +# ifndef _INCL_PROCESS_H +# include +# define _INCL_PROCESS_H +# endif +#endif + +#if !defined(HAVE_TYPE_SIGINFO_T) && defined(HAVE_SIGINFO_T) +#ifndef _SCHILY_SIGNAL_H +#include +#endif +#endif #ifdef __cplusplus extern "C" { #endif -#ifdef HAVE_UNION_WAIT +/* + * waitid() idtype_t definition, define when missing or broken. + * NetBSD-5 has an idtype_t that is in conflict with POSIX. + */ +#ifndef HAVE_TYPE_IDTYPE_T + +#undef HAVE_WAITID /* Can't have waitid() with broken idtype_t */ + +#undef P_PID +#undef P_PPID +#undef P_PGID +#undef P_SID +#undef P_CID +#undef P_UID +#undef P_GID +#undef P_ALL + +#define P_PID MY_P_PID +#define P_PPID MY_P_PPID +#define P_PGID MY_P_PGID +#define P_SID MY_P_SID +#define P_CID MY_P_CID +#define P_UID MY_P_UID +#define P_GID MY_P_GID +#define P_ALL MY_P_ALL + +typedef enum { + P_PID, /* A process identifier. */ + P_PPID, /* A parent process identifier. */ + P_PGID, /* A process group (job control group) */ + /* identifier. */ + P_SID, /* A session identifier. */ + P_CID, /* A scheduling class identifier. */ + P_UID, /* A user identifier. */ + P_GID, /* A group identifier. */ + P_ALL, /* All processes. */ +} my_idtype_t; + +#undef idtype_t +#define idtype_t my_idtype_t + +#endif /* HAVE_TYPE_IDTYPE_T */ + +#ifndef WCOREFLG +#ifdef WCOREFLAG +#define WCOREFLG WCOREFLAG +#else +#define WCOREFLG 0x80 +#endif +#define NO_WCOREFLG +#endif + +#ifndef WSTOPFLG +#ifdef _WSTOPPED +#define WSTOPFLG _WSTOPPED +#else +#define WSTOPFLG 0x7F +#endif +#define NO_WSTOPFLG +#endif + +#ifndef WCONTFLG +#define WCONTFLG 0xFFFF +#define NO_WCONTFLG +#endif + +/* + * Work around a NetBSD bug that has been imported from BSD. + * There is a #define WSTOPPED _WSTOPPED that is in conflict with the + * AT&T waitid() flags definition that is part of the POSIX standard. + */ +#if defined(WSTOPPED) && defined(_WSTOPPED) && WSTOPPED == _WSTOPPED +#undef WSTOPPED +#define WSTOPPED WUNTRACED +#endif + +/* + * waitid() option flags: + */ +#ifndef WCONTINUED +#define WCONTINUED 0 +#define NO_WCONTINUED +#endif +#ifndef WEXITED +#define WEXITED 0 +#define NO_WEXITED +#endif +#ifndef WNOHANG +#define WNOHANG 0 +#define NO_WNOHANG +#endif +#ifndef WNOWAIT +#define WNOWAIT 0 +#define NO_WNOWAIT +#endif +#ifndef WSTOPPED +#ifdef WUNTRACED +#define WSTOPPED WUNTRACED +#else +#define WSTOPPED 0 +#endif +#define NO_WSTOPPED +#endif +#ifndef WTRAPPED +#define WTRAPPED 0 +#define NO_WTRAPPED +#endif + +/* + * waitid() code values, #define them when they are missing: + */ +#ifndef CLD_EXITED /* Assume all is missing then */ +#define CLD_EXITED 1 /* child has exited */ +#define CLD_KILLED 2 /* child was killed */ +#define CLD_DUMPED 3 /* child has coredumped */ +#define CLD_TRAPPED 4 /* traced child has stopped */ +#define CLD_STOPPED 5 /* child has stopped on signal */ +#define CLD_CONTINUED 6 /* stopped child has continued */ +#define NO_CLD_EXITED +#endif /* CLD_EXITED */ + +#if defined(HAVE_UNION_WAIT) && defined(USE_UNION_WAIT) # define WAIT_T union wait -# ifndef WSTOPPED -# define WSTOPPED 0x7F -# endif +# define _W_U(w) ((union wait *)&(w)) # ifndef WTERMSIG -# define WTERMSIG(status) ((status).w_termsig) +# define WTERMSIG(status) (_W_U(status)->w_termsig) # endif # ifndef WCOREDUMP -# define WCOREDUMP(status) ((status).w_coredump) +# define WCOREDUMP(status) (_W_U(status)->w_coredump) # endif # ifndef WEXITSTATUS -# define WEXITSTATUS(status) ((status).w_retcode) +# define WEXITSTATUS(status) (_W_U(status)->w_retcode) # endif # ifndef WSTOPSIG -# define WSTOPSIG(status) ((status).w_stopsig) +# define WSTOPSIG(status) (_W_U(status)->w_stopsig) +# endif +# ifndef WIFCONTINUED +# define WIFCONTINUED(status) (0) # endif # ifndef WIFSTOPPED -# define WIFSTOPPED(status) ((status).w_stopval == \ - WSTOPPED) +# define WIFSTOPPED(status) (_W_U(status)->w_stopval == \ + WSTOPFLG) # endif # ifndef WIFSIGNALED -# define WIFSIGNALED(status) ((status).w_stopval != \ - WSTOPPED && \ - (status).w_termsig != 0) +# define WIFSIGNALED(status) (_W_U(status)->w_stopval != \ + WSTOPFLG && \ + _W_U(status)->w_termsig != 0) # endif # ifndef WIFEXITED -# define WIFEXITED(status) ((status).w_stopval != \ - WSTOPPED && \ - (status).w_termsig == 0) +# define WIFEXITED(status) (_W_U(status)->w_stopval != \ + WSTOPFLG && \ + _W_U(status)->w_termsig == 0) # endif #else # define WAIT_T int +# define _W_I(w) (*(int *)&(w)) # ifndef WTERMSIG -# define WTERMSIG(status) ((status) & 0x7F) +# define WTERMSIG(status) (_W_I(status) & 0x7F) # endif # ifndef WCOREDUMP -# define WCOREDUMP(status) ((status) & 0x80) +# ifdef WIFCORED /* Haiku */ +# define WCOREDUMP(status) (WIFCORED(_W_I(status))) +# else +# define WCOREDUMP(status) (_W_I(status) & 0x80) +# endif # endif # ifndef WEXITSTATUS -# define WEXITSTATUS(status) (((status) >> 8) & 0xFF) +# define WEXITSTATUS(status) ((_W_I(status) >> 8) & 0xFF) # endif # ifndef WSTOPSIG -# define WSTOPSIG(status) (((status) >> 8) & 0xFF) +# define WSTOPSIG(status) ((_W_I(status) >> 8) & 0xFF) +# endif +/* + * WIFSTOPPED and WIFSIGNALED match the definitions on older UNIX versions + * e.g. SunOS-4.x or HP-UX + */ +# ifndef WIFCONTINUED +# ifdef NO_WCONTINUED +# define WIFCONTINUED(status) (0) +# else +# define WIFCONTINUED(status) ((_W_I(status) & 0xFFFF) == \ + WCONTFLG) +# endif # endif # ifndef WIFSTOPPED -# define WIFSTOPPED(status) (((status) & 0xFF) == 0x7F) +# define WIFSTOPPED(status) ((_W_I(status) & 0xFF) == 0x7F) # endif # ifndef WIFSIGNALED -# define WIFSIGNALED(status) (((status) & 0xFF) != 0x7F && \ +# define WIFSIGNALED(status) ((_W_I(status) & 0xFF) != 0x7F && \ WTERMSIG(status) != 0) # endif # ifndef WIFEXITED -# define WIFEXITED(status) (((status) & 0xFF) == 0) +# define WIFEXITED(status) ((_W_I(status) & 0xFF) == 0) # endif #endif -#ifndef WCOREFLG -#define WCOREFLG 0x80 -#endif - -#ifndef WSTOPFLG -#define WSTOPFLG 0x7F -#endif - -#ifndef WCONTFLG -#define WCONTFLG 0xFFFF -#endif - #ifdef __cplusplus } #endif diff -Nru cdrtools-2.01.01a33/include/schily/wait.mk cdrtools-3.02a09/include/schily/wait.mk --- cdrtools-2.01.01a33/include/schily/wait.mk 2006-12-17 21:52:13.000000000 +0000 +++ cdrtools-3.02a09/include/schily/wait.mk 2006-12-17 21:52:13.000000000 +0000 @@ -1,4 +1,4 @@ -#ident %W% %E% %Q% +#ident @(#)wait.mk 1.1 06/12/17 ########################################################################### # Sample makefile for installing non-localized auxiliary files ########################################################################### diff -Nru cdrtools-2.01.01a33/include/schily/walk.h cdrtools-3.02a09/include/schily/walk.h --- cdrtools-2.01.01a33/include/schily/walk.h 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/include/schily/walk.h 2016-03-10 22:45:20.000000000 +0000 @@ -0,0 +1,133 @@ +/* @(#)walk.h 1.31 16/03/10 Copyright 2004-2016 J. Schilling */ +/* + * Definitions for directory tree walking + * + * Copyright (c) 2004-2016 J. Schilling + */ +/* + * The contents of this file are subject to the terms of the + * Common Development and Distribution License, Version 1.0 only + * (the "License"). You may not use this file except in compliance + * with the License. + * + * See the file CDDL.Schily.txt in this distribution for details. + * A copy of the CDDL is also available via the Internet at + * http://www.opensource.org/licenses/cddl1.txt + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file CDDL.Schily.txt from this distribution. + */ + +#ifndef _SCHILY_WALK_H +#define _SCHILY_WALK_H + +#ifndef _SCHILY_MCONFIG_H +#include +#endif + +#ifndef _SCHILY_STAT_H +#include +#endif + +#ifndef _SCHILY_STDIO_H +#include +#endif + +#ifdef __cplusplus +extern "C" { +#endif + +/* + * Flags to control treewalk() via 'walkflags'. + * + * WALK_CHDIR is not implemented, treewalk() always does chdir() + * + * WALK_PHYS Clearing WALK_PHYS has highest precedence and equals + * 'find -follow'. If WALK_PHYS is clear, always use stat. + * By default, WALK_PHYS should be set. + * + * WALK_ARGFOLLOW If WALK_ARGFOLLOW is set, symlinks that are used as + * the first argument for trewalk() are followed even + * if WALK_PHYS is set. Setting WALK_ARGFOLLOW equals + * 'find -H'. + * + * WALK_ALLFOLLOW If WALK_ALLFOLLOW is set, all symlinks are followed + * even if WALK_PHYS is set. Setting WALK_ALLFOLLOW + * equals 'find -L'. + */ +#define WALK_PHYS 1 /* Use lstat() instead of stat() */ +#define WALK_MOUNT 2 /* Do not cross mount points */ +#define WALK_DEPTH 4 /* Call content before calling the dir */ +#define WALK_CHDIR 8 /* Use chdir() to each directory */ +#define WALK_ARGFOLLOW 0x10 /* Use stat() for top level args only */ +#define WALK_ALLFOLLOW 0x20 /* Use stat() for all files */ +#define WALK_NOSTAT 0x40 /* Avoid to call stat() if st_nlink =>2 */ +#define WALK_NOEXIT 0x100 /* Do not exit() in case of hard errors */ +#define WALK_NOMSG 0x200 /* Do not write messages to stderr */ +#define WALK_LS_ATIME 0x1000 /* -ls lists atime instead of mtime */ +#define WALK_LS_CTIME 0x2000 /* -ls lists ctime instead of mtime */ +#define WALK_STRIPLDOT 0x4000 /* Strip leading "./" from path */ + +/* + * The 'type' argument to walkfun. + */ +#define WALK_F 1 /* File */ +#define WALK_SL 2 /* Symbolic Link */ +#define WALK_D 3 /* Directory */ +#define WALK_DP 4 /* Directory previously visited */ +#define WALK_DNR 5 /* Directory with no read permission */ +#define WALK_NS 6 /* Unknown file type stat failed */ +#define WALK_SLN 7 /* Symbolic Link points to nonexistent file */ + +#ifndef __sqfun_t_defined +typedef int (*sqfun_t) __PR((void *arg)); +#define __sqfun_t_defined +#endif + +struct WALK { + int flags; /* Flags for communication with (*walkfun)() */ + int base; /* Filename offset in path for (*walkfun)() */ + int level; /* The nesting level set up for (*walkfun)() */ + int walkflags; /* treewalk() control flags */ + void *twprivate; /* treewalk() private do not touch */ + FILE *std[3]; /* To redirect stdin/stdout/err in treewalk */ + char **env; /* To allow different env in treewalk/exec */ + sqfun_t quitfun; /* Function to query for shell signal quit */ + void *qfarg; /* Generic arg for shell builtin quit fun */ + int maxdepth; /* (*walkfun)() private, unused by treewalk */ + int mindepth; /* (*walkfun)() private, unused by treewalk */ + char *lname; /* (*walkfun)() private, unused by treewalk */ + void *tree; /* (*walkfun)() private, unused by treewalk */ + void *patstate; /* (*walkfun)() private, unused by treewalk */ + int err; /* (*walkfun)() private, unused by treewalk */ + int pflags; /* (*walkfun)() private, unused by treewalk */ + int auxi; /* (*walkfun)() private, unused by treewalk */ + void *auxp; /* (*walkfun)() private, unused by treewalk */ +}; + +/* + * Flags in struct WALK used to communicate with (*walkfun)() + */ +#define WALK_WF_PRUNE 1 /* (*walkfun)() -> walk(): abort waking tree */ +#define WALK_WF_QUIT 2 /* (*walkfun)() -> walk(): quit completely */ +#define WALK_WF_NOCHDIR 4 /* walk() -> (*walkfun)(): WALK_DNR w chdir() */ +#define WALK_WF_NOCWD 8 /* walk() -> caller: cannot get working dir */ +#define WALK_WF_NOHOME 16 /* walk() -> caller: cannot chdir("..") */ +#define WALK_WF_NOTDIR 32 /* walk() -> walk(): file is not a directory */ + +typedef int (*walkfun) __PR((char *_nm, struct stat *_fs, int _type, + struct WALK *_state)); + +extern int treewalk __PR((char *_nm, walkfun _fn, + struct WALK *_state)); +extern void walkinitstate __PR((struct WALK *_state)); +extern void *walkopen __PR((struct WALK *_state)); +extern int walkgethome __PR((struct WALK *_state)); +extern int walkhome __PR((struct WALK *_state)); +extern int walkclose __PR((struct WALK *_state)); + +#ifdef __cplusplus +} +#endif + +#endif /* _SCHILY_WALK_H */ diff -Nru cdrtools-2.01.01a33/include/schily/walk.mk cdrtools-3.02a09/include/schily/walk.mk --- cdrtools-2.01.01a33/include/schily/walk.mk 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/include/schily/walk.mk 2008-04-06 12:07:34.000000000 +0000 @@ -0,0 +1,17 @@ +#ident @(#)walk.mk 1.1 08/04/06 +########################################################################### +# Sample makefile for installing non-localized auxiliary files +########################################################################### +SRCROOT= ../.. +RULESDIR= RULES +include $(SRCROOT)/$(RULESDIR)/rules.top +########################################################################### + +INSDIR= include/schily +TARGET= walk.h +#XMK_FILE= Makefile.man + +########################################################################### +include $(SRCROOT)/$(RULESDIR)/rules.aux +########################################################################### + diff -Nru cdrtools-2.01.01a33/include/schily/wchar.h cdrtools-3.02a09/include/schily/wchar.h --- cdrtools-2.01.01a33/include/schily/wchar.h 2007-04-25 16:54:45.000000000 +0000 +++ cdrtools-3.02a09/include/schily/wchar.h 2011-07-19 18:06:51.000000000 +0000 @@ -1,8 +1,8 @@ -/* @(#)wchar.h 1.4 07/04/25 Copyright 2007 J. Schilling */ +/* @(#)wchar.h 1.21 11/07/19 Copyright 2007-2011 J. Schilling */ /* * Abstraction from wchar.h * - * Copyright (c) 2007 J. Schilling + * Copyright (c) 2007-2011 J. Schilling */ /* * The contents of this file are subject to the terms of the @@ -24,47 +24,98 @@ #endif #ifndef _SCHILY_STDLIB_H -#include /* for MB_CUR_MAX */ +#include /* for MB_CUR_MAX, mbtowc()/wctomb() */ +#endif +#ifndef _SCHILY_TYPES_H +#include +#endif +#ifdef HAVE_STDDEF_H +#ifndef _INCL_STDDEF_H +#include /* Needed for e.g. size_t (POSIX) */ +#define _INCL_STDDEF_H +#endif +#endif +#ifndef _SCHILY_STDIO_H +#include /* Needed for e.g. FILE (POSIX) */ +#endif +#ifndef _SCHILY_VARARGS_H +#include /* Needed for e.g. va_list (POSIX) */ +#endif + + +#if !defined(HAVE_MBTOWC) || !defined(HAVE_WCTOMB) +#if defined(HAVE_MBRTOWC) && defined(HAVE_WCRTOMB) +# define mbtowc(wp, cp, len) mbrtowc(wp, cp, len, (mbstate_t *)0) +# define wctomb(cp, wc) wcrtomb(cp, wc, (mbstate_t *)0) +#else +# define NO_WCHAR +#endif #endif #ifdef HAVE_WCHAR_H +#ifndef _INCL_WCHAR_H #include +#define _INCL_WCHAR_H +#endif -#else /* HAVE_WCHAR_H */ - -#ifndef _SCHILY_TYPES_H -#include +#ifndef HAVE_MBSINIT +#define mbsinit(sp) ((int)((sp) == 0)) #endif -#ifdef HAVE_STDDEF_H -#include +#ifndef HAVE_MBRTOWC +#define mbrtowc(wp, cp, len, sp) mbtowc(wp, cp, len) #endif - -#ifndef _INCL_STDIO_H -#include -#define _INCL_STDIO_H +#ifndef HAVE_WCRTOMB +#define wcrtomb(cp, wc, sp) wctomb(cp, wc) #endif -#ifndef _SCHILY_VARARGS_H -#include +#ifndef USE_WCHAR +#define USE_WCHAR #endif +#else /* HAVE_WCHAR_H */ #undef USE_WCHAR #endif /* !HAVE_WCHAR_H */ +#if !defined(HAVE_WCTYPE_H) && !defined(HAVE_ISWPRINT) +#undef USE_WCHAR +#undef USE_WCTYPE +#endif + +#ifdef NO_WCTYPE +#undef USE_WCHAR +#undef USE_WCTYPE +#endif + +#ifdef NO_WCHAR +#undef USE_WCHAR +#undef USE_WCTYPE +#endif + #ifndef USE_WCHAR +/* + * We either don't have wide chars or we don't use them... + */ #undef wchar_t #define wchar_t char #undef wint_t #define wint_t int +/* + * We cannot define wctype_t here because of a bug in Linux (missing xctype_t + * definition in wchar.h + */ +#ifdef __never__ +#undef wctype_t +#define wctype_t int +#endif #undef WEOF #define WEOF ((wint_t)-1) #ifndef _SCHILY_UTYPES_H -#include +#include /* For TYPE_MAXVAL() */ #endif #undef WCHAR_MAX @@ -72,48 +123,58 @@ #undef WCHAR_MIN #define WCHAR_MIN TYPE_MINVAL(wchar_t) -#include +#undef WINT_MAX +#define WINT_MAX TYPE_MAXVAL(wint_t) +#undef WINT_MIN +#define WINT_MIN TYPE_MINVAL(wint_t) + +#undef WCTYPE_MAX +#define WCTYPE_MAX TYPE_MAXVAL(wctype_t) +#undef WCTYPE_MIN +#define WCTYPE_MIN TYPE_MINVAL(wctype_t) -#undef iswalnum -#define iswalnum(c) isalnum(c) -#undef iswalpha -#define iswalpha(c) isalpha(c) -#undef iswcntrl -#define iswcntrl(c) iscntrl(c) -#undef iswcntrl -#define iswcntrl(c) iscntrl(c) -#undef iswdigit -#define iswdigit(c) isdigit(c) -#undef iswgraph -#define iswgraph(c) isgraph(c) -#undef iswlower -#define iswlower(c) islower(c) -#undef iswprint -#define iswprint(c) isprint(c) -#undef iswpunct -#define iswpunct(c) ispunct(c) -#undef iswspace -#define iswspace(c) isspace(c) -#undef iswupper -#define iswupper(c) isupper(c) -#undef iswxdigit -#define iswxdigit(c) isxdigit(c) - -#undef towlower -#define towlower(c) tolower(c) -#undef towupper -#define towupper(c) toupper(c) +#undef SIZEOF_WCHAR_T +#define SIZEOF_WCHAR_T SIZEOF_CHAR #undef MB_CUR_MAX #define MB_CUR_MAX 1 #undef MB_LEN_MAX #define MB_LEN_MAX 1 +/* + * The mbtowc() for the non-multibyte case could be as simple as + * + * #define mbtowc(wp, cp, len) (*(wp) = *(cp), 1) + * + * but Mac OS X forces us to do many mbtowc(NULL, NULL, 0) calls in order + * to reset the internal state. On other platforms that do not support + * wide chars, NULL may be defined as (void *)0, so we need to check + * for "wp" != NULL and to cast "wp" and "cp" to their expected types. + */ #undef mbtowc -#define mbtowc(wp, cp, len) (*(wp) = *(cp), 1) +#define mbtowc(wp, cp, len) ((void)((wp) ? \ + *(wchar_t *)(wp) = *(char *)(cp) : 1), 1) +#undef mbrtowc +#define mbrtowc(wp, cp, len, sp) ((void)((wp) ? \ + *(wchar_t *)(wp) = *(char *)(cp) : 1), 1) #undef wctomb #define wctomb(cp, wc) (*(cp) = wc, 1) +#undef wcrtomb +#define wcrtomb(cp, wc, sp) (*(cp) = wc, 1) + +#undef mbsinit +#define mbsinit(sp) ((int)((sp) == 0)) + +#undef wcwidth +#define wcwidth(wc) (1) + +#else /* USE_WCHAR */ + +#ifndef HAVE_WCWIDTH +#undef wcwidth +#define wcwidth(wc) (1) +#endif -#endif /* !USE_WCHAR */ +#endif /* USE_WCHAR */ #endif /* _SCHILY_WCHAR_H */ diff -Nru cdrtools-2.01.01a33/include/schily/wchar.mk cdrtools-3.02a09/include/schily/wchar.mk --- cdrtools-2.01.01a33/include/schily/wchar.mk 2007-01-24 13:47:08.000000000 +0000 +++ cdrtools-3.02a09/include/schily/wchar.mk 2007-01-24 13:47:08.000000000 +0000 @@ -1,4 +1,4 @@ -#ident %W% %E% %Q% +#ident @(#)wchar.mk 1.1 07/01/24 ########################################################################### # Sample makefile for installing non-localized auxiliary files ########################################################################### diff -Nru cdrtools-2.01.01a33/include/schily/wctype.h cdrtools-3.02a09/include/schily/wctype.h --- cdrtools-2.01.01a33/include/schily/wctype.h 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/include/schily/wctype.h 2017-08-05 17:38:24.000000000 +0000 @@ -0,0 +1,103 @@ +/* @(#)wctype.h 1.9 17/08/05 Copyright 2009-2017 J. Schilling */ +/* + * Abstraction from wctype.h + * + * Copyright (c) 2009-2017 J. Schilling + */ +/* + * The contents of this file are subject to the terms of the + * Common Development and Distribution License, Version 1.0 only + * (the "License"). You may not use this file except in compliance + * with the License. + * + * See the file CDDL.Schily.txt in this distribution for details. + * A copy of the CDDL is also available via the Internet at + * http://www.opensource.org/licenses/cddl1.txt + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file CDDL.Schily.txt from this distribution. + */ + +#ifndef _SCHILY_WCTYPE_H +#define _SCHILY_WCTYPE_H + +#ifndef _SCHILY_MCONFIG_H +#include +#endif + +#ifndef _SCHILY_WCHAR_H +#include +#endif + +#ifdef HAVE_WCTYPE_H +/* + * Include wctype.h if wchars have been enabled in schily/wchar.h + */ +#ifdef USE_WCHAR +#ifndef _INCL_WCTYPE_H +#include +#define _INCL_WCTYPE_H +#endif +#ifndef USE_WCTYPE +#define USE_WCTYPE +#endif +#endif /* USE_WCHAR */ +#endif /* HAVE_WCTYPE_H */ + +#if defined(HAVE_ISWPRINT) && defined(USE_WCHAR) +#ifndef USE_WCTYPE +#undef USE_WCTYPE +#endif +#endif + +#if !defined(HAVE_WCTYPE_H) && !defined(HAVE_ISWPRINT) +#undef USE_WCTYPE +#endif + +#ifdef NO_WCTYPE +#undef USE_WCTYPE +#endif + +#ifndef USE_WCTYPE + +#ifndef _SCHILY_CTYPE_H +#include +#endif + +#undef iswalnum +#define iswalnum(c) isalnum(c) +#undef iswalpha +#define iswalpha(c) isalpha(c) +#ifdef HAVE_ISBLANK +#undef iswblank +#define iswblank(c) isblank(c) +#endif +#undef iswcntrl +#define iswcntrl(c) iscntrl(c) +#undef iswcntrl +#define iswcntrl(c) iscntrl(c) +#undef iswdigit +#define iswdigit(c) isdigit(c) +#undef iswgraph +#define iswgraph(c) isgraph(c) +#undef iswlower +#define iswlower(c) islower(c) +#undef iswprint +#define iswprint(c) isprint(c) +#undef iswpunct +#define iswpunct(c) ispunct(c) +#undef iswspace +#define iswspace(c) isspace(c) +#undef iswupper +#define iswupper(c) isupper(c) +#undef iswxdigit +#define iswxdigit(c) isxdigit(c) + +#undef towlower +#define towlower(c) tolower(c) +#undef towupper +#define towupper(c) toupper(c) + +#endif /* !USE_WCTYPE */ + +#endif /* _SCHILY_WCTYPE_H */ diff -Nru cdrtools-2.01.01a33/include/schily/wctype.mk cdrtools-3.02a09/include/schily/wctype.mk --- cdrtools-2.01.01a33/include/schily/wctype.mk 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/include/schily/wctype.mk 2009-04-12 13:11:05.000000000 +0000 @@ -0,0 +1,17 @@ +#ident "@(#)wctype.mk 1.1 09/04/12 " +########################################################################### +# Sample makefile for installing non-localized auxiliary files +########################################################################### +SRCROOT= ../.. +RULESDIR= RULES +include $(SRCROOT)/$(RULESDIR)/rules.top +########################################################################### + +INSDIR= include/schily +TARGET= wctype.h +#XMK_FILE= Makefile.man + +########################################################################### +include $(SRCROOT)/$(RULESDIR)/rules.aux +########################################################################### + diff -Nru cdrtools-2.01.01a33/include/schily/windows.h cdrtools-3.02a09/include/schily/windows.h --- cdrtools-2.01.01a33/include/schily/windows.h 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/include/schily/windows.h 2013-10-26 11:33:27.000000000 +0000 @@ -0,0 +1,88 @@ +/* @(#)windows.h 1.4 13/10/26 Copyright 2011-2013 J. Schilling */ +/* + * Definitions for windows.h + * + * Copyright (c) 2011-2013 J. Schilling + */ +/* + * The contents of this file are subject to the terms of the + * Common Development and Distribution License, Version 1.0 only + * (the "License"). You may not use this file except in compliance + * with the License. + * + * See the file CDDL.Schily.txt in this distribution for details. + * A copy of the CDDL is also available via the Internet at + * http://www.opensource.org/licenses/cddl1.txt + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file CDDL.Schily.txt from this distribution. + */ + +#ifndef _SCHILY_WINDOWS_H +#define _SCHILY_WINDOWS_H + +#ifndef _SCHILY_MCONFIG_H +#include +#endif + +#ifdef HAVE_WINDOWS_H +#ifndef _INCL_WINDOWS_H + +/* + * configure believes they are missing and #define's them: + */ +#if defined(_MSC_VER) || defined(__MINGW32__) +/* BEGIN CSTYLED */ +#undef u_char +#undef u_short +#undef u_int +#undef u_long +/* END CSTYLED */ +#endif + +#if defined(__CYGWIN32__) || defined(__CYGWIN__) + +/* + * Cygwin-1.7.17 (Autumn 2012) makes life hard as it prevents to rename + * the Cygwin BOOL definition. Note that we have our own BOOL definition + * in schily/standard.h that exists since 1982 which happened before Microsoft + * introduced their BOOL. + * + * Previous Cygwin versions have been compatible to the original MS include + * files and allowed to rename the BOOL from windows.h (windef.h) by just using + * #define BOOL WBOOL before #include . + * + * Recent Cygwin version are unfriendly to us and prevent this. + * We now need a two level #define to redirect the BOOL from windows.h to the + * Cygwin specific WINBOOL typedef. + * + * If we do not include schily/standard.h with newer Cygwin, we cannot get + * working typedefs for "PBOOL" and "LPBOOL". + */ +#include /* Get our BOOL typedef */ + +#define _NO_BOOL_TYPEDEF /* Avoid 2nd BOOL typedef on Cygwin-1.7.17 */ + +#define WBOOL WINBOOL /* Cygwin-1.7.17 prevents to avoid BOOL */ +#endif /* defined(__CYGWIN32__) || defined(__CYGWIN__) */ + + +#define BOOL WBOOL /* This is the Win BOOL */ +#define format __ms_format /* Avoid format parameter hides global ... */ + +#ifdef timerclear /* struct timeval has already been declared */ +#define timeval __ms_timeval +#endif + +#include + +#undef BOOL /* MS Code uses WBOOL or #define BOOL WBOOL */ +#undef format /* Return to previous definition */ +#undef timeval + +#define _INCL_WINDOWS_H +#endif + +#endif /* HAVE_WINDOWS_H */ + +#endif /* _SCHILY_WINDOWS_H */ diff -Nru cdrtools-2.01.01a33/include/schily/windows.mk cdrtools-3.02a09/include/schily/windows.mk --- cdrtools-2.01.01a33/include/schily/windows.mk 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/include/schily/windows.mk 2011-08-02 18:09:22.000000000 +0000 @@ -0,0 +1,17 @@ +#ident "@(#)windows.mk 1.1 11/08/02 " +########################################################################### +# Sample makefile for installing non-localized auxiliary files +########################################################################### +SRCROOT= ../.. +RULESDIR= RULES +include $(SRCROOT)/$(RULESDIR)/rules.top +########################################################################### + +INSDIR= include/schily +TARGET= windows.h +#XMK_FILE= Makefile.man + +########################################################################### +include $(SRCROOT)/$(RULESDIR)/rules.aux +########################################################################### + diff -Nru cdrtools-2.01.01a33/include/schily/xconfig.h cdrtools-3.02a09/include/schily/xconfig.h --- cdrtools-2.01.01a33/include/schily/xconfig.h 2007-07-01 11:57:30.000000000 +0000 +++ cdrtools-3.02a09/include/schily/xconfig.h 2013-07-23 19:09:22.000000000 +0000 @@ -1,8 +1,8 @@ -/* @(#)xconfig.h 1.6 07/07/01 Copyright 1995-2007 J. Schilling */ +/* @(#)xconfig.h 1.13 13/07/23 Copyright 1995-2013 J. Schilling */ /* * This file either includes the dynamic or manual autoconf stuff. * - * Copyright (c) 1995-2007 J. Schilling + * Copyright (c) 1995-2013 J. Schilling * * This file is included from and usually * includes $(SRCROOT)/incs/$(OARCH)/xconfig.h via @@ -19,6 +19,8 @@ * with the License. * * See the file CDDL.Schily.txt in this distribution for details. + * A copy of the CDDL is also available via the Internet at + * http://www.opensource.org/licenses/cddl1.txt * * When distributing Covered Code, include this CDDL HEADER in each * file and include the License file CDDL.Schily.txt from this distribution. @@ -36,6 +38,10 @@ # define USE_STATIC_CONF #endif +#ifdef NO_STATIC_CONF +#undef USE_STATIC_CONF +#endif + #ifdef USE_STATIC_CONF # include /* The static autoconf stuff */ #else /* USE_STATIC_CONF */ @@ -85,6 +91,19 @@ #define __JS_ARCH_CONF_INCL #endif +#ifdef __SUNOS4_MC68000_CC32 +#ifdef __mc68020 +#include +#define __JS_ARCH_CONF_INCL +#endif +#endif +#ifdef __SUNOS4_MC68000_GCC32 +#ifdef __mc68020 +#include +#define __JS_ARCH_CONF_INCL +#endif +#endif + #ifdef __HPUX_HPPA_CC32 #include #define __JS_ARCH_CONF_INCL @@ -102,6 +121,27 @@ #define __JS_ARCH_CONF_INCL #endif +#ifdef __LINUX_ARMV6L_GCC32 +#include +#define __JS_ARCH_CONF_INCL +#endif +#ifdef __LINUX_ARMV5L_GCC32 +#include +#define __JS_ARCH_CONF_INCL +#endif +#ifdef __LINUX_ARMV5TEJL_GCC32 +#include +#define __JS_ARCH_CONF_INCL +#endif +#ifdef __LINUX_I386_GCC32 +#include +#define __JS_ARCH_CONF_INCL +#endif +#ifdef __LINUX_amd64_GCC64 +#include +#define __JS_ARCH_CONF_INCL +#endif + #ifdef __MSWIN_X86_CL32 #include #define __JS_ARCH_CONF_INCL @@ -113,11 +153,28 @@ #endif #ifndef __JS_ARCH_CONF_INCL +/* + * #error will not work for all compilers (e.g. sunos4) + * The following line will abort compilation on all compilers + * if none of the above is defined. And that's what we want. + */ Error unconfigured architecture + +#include /* Avoid "unknown directive" with K&R */ #endif #endif /* SCHILY_BUILD */ #endif /* USE_STATIC_CONF */ +#ifdef __cplusplus +extern "C" { +#endif +/* + * Fake in order to keep the silly hdrchk(1) quiet. + */ +#ifdef __cplusplus +} +#endif + #endif /* _SCHILY_XCONFIG_H */ diff -Nru cdrtools-2.01.01a33/include/schily/xconfig.mk cdrtools-3.02a09/include/schily/xconfig.mk --- cdrtools-2.01.01a33/include/schily/xconfig.mk 2006-12-17 21:52:13.000000000 +0000 +++ cdrtools-3.02a09/include/schily/xconfig.mk 2006-12-17 21:52:13.000000000 +0000 @@ -1,4 +1,4 @@ -#ident %W% %E% %Q% +#ident @(#)xconfig.mk 1.1 06/12/17 ########################################################################### # Sample makefile for installing non-localized auxiliary files ########################################################################### diff -Nru cdrtools-2.01.01a33/include/schily/xmconfig.h cdrtools-3.02a09/include/schily/xmconfig.h --- cdrtools-2.01.01a33/include/schily/xmconfig.h 2006-10-21 08:27:44.000000000 +0000 +++ cdrtools-3.02a09/include/schily/xmconfig.h 2010-08-27 10:04:43.000000000 +0000 @@ -1,9 +1,9 @@ -/* @(#)xmconfig.h 1.34 06/10/21 Copyright 1995-2006 J. Schilling */ +/* @(#)xmconfig.h 1.45 10/08/27 Copyright 1995-2010 J. Schilling */ /* * This file either includes the manual generated * static definitions for a machine configuration. * - * Copyright (c) 1995-2006 J. Schilling + * Copyright (c) 1995-2010 J. Schilling * * Use only cpp instructions. * @@ -36,10 +36,12 @@ #if defined(VMS) # define PROTOTYPES -# define HAVE_OSDEF /* prevent later definitions to overwrite current */ +# define HAVE_OSDEF /* prevent later defines to overwrite current */ # define __NOT_SVR4__ /* Not a real SVR4 implementation */ # define HAVE_UNISTD_H +# define HAVE_SYS_TYPES_H +# define HAVE_CTYPE_H /* # define HAVE_SYS_TIME_H */ # define HAVE_FCNTL_H # define HAVE_USLEEP @@ -78,81 +80,36 @@ # define HOST_VENDOR "HP" # define HOST_OS "VMS/OpenVMS" # define RETSIGTYPE void -/*# define HAVE_ELF */ -/*# define HAVE_COFF */ -/*# define HAVE_AOUT */ # define HAVE_STDARG_H -/*# define HAVE_VA_COPY */ # define HAVE_STDLIB_H # define HAVE_STRING_H # define HAVE_STDC_HEADERS # define STDC_HEADERS -/*# define HAVE_LONGLONG */ - # define HAVE_UNISTD_H # define HAVE_FCNTL_H # define HAVE_DIRENT_H -/*# define HAVE_SYS_DIR_H */ -/*# define HAVE_NDIR_H */ -/*# define HAVE_SYS_NDIR_H */ -/*# define HAVE_TERMIOS_H */ -/*# define HAVE_TERMIO_H */ -/*# define HAVE_SYS_TIME_H */ -/*# define HAVE_UTIMES */ -/*# define HAVE_UTIME_H */ # define HAVE_WAIT_H -/*# define HAVE_SYS_WAIT_H */ -/*# define HAVE_SYS_SYSTEMINFO_H */ -/*# define HAVE_SYS_UTSNAME_H */ -/*# define HAVE_SYS_PRIOCNTL_H */ -/*# define HAVE_SYS_RTPRIOCNTL_H */ -/*# define HAVE_SYS_MTIO_H */ -/*# define HAVE_MTGET_DSREG */ -/*# define HAVE_MTGET_RESID */ -/*# define HAVE_MTGET_FILENO */ -/*# define HAVE_MTGET_BLKNO */ -/*# define MAJOR_IN_MKDEV */ -/*# define MAJOR_IN_SYSMACROS */ -/*# define HAVE_USG_STDIO */ -/*# define HAVE_DTOA */ +# define HAVE_SYS_UTSNAME_H # define HAVE_GETCWD # define HAVE_STRERROR # define HAVE_MEMMOVE # define HAVE_MMAP -/*# define HAVE_SMMAP */ -/*# define HAVE_USGSHM */ -/*# define HAVE_USGSEM */ -/*# define HAVE_MSEM */ -/*# define HAVE_LDSTUB */ -/*# define HAVE_XCHG */ # define HAVE_FLOCK -/*# define HAVE_FCHDIR */ -/*# define HAVE_STATVFS */ -/*# define HAVE_QUOTA */ -/*# define HAVE_YP */ -/*# define HAVE_SHADOW */ -/*# define HAVE_SETREUID */ -/*# define HAVE_SETRESUID */ -/*# define HAVE_SETEUID */ -/*# define HAVE_LCHOWN */ -/*# define HAVE_PROCFS */ -/*# define HAVE_PROCFS2 */ -/*# define HAVE_SIGINFO */ -/*# define HAVE_WAIT3 */ -/*# define HAVE_WAITPID */ -/*# define HAVE_UNION_WAIT */ # define HAVE_GETHOSTNAME -/*# define HAVE_STREAMS */ -/*# define HAVE_STRPTYS */ -/*# define HAVE_POLL */ # define HAVE_SELECT -/*# define HAVE_TIRPC */ -/*# define GID_T gid_t */ -# define USLEEPRETURN_T uint -/*# define USLEEPRETURN_T void */ -/*# define USLEEPISVOID */ -/*# define HAVE_GETAV0 */ -/*# define HAVE_SCANSTACK */ +# define USLEEPRETURN_T unsigned int + +# define HAVE_STRUCT_TIMEVAL +# define HAVE_UTSNAME_ARCH /* uname -p */ + +# define HAVE_MALLOC +# define HAVE_CALLOC +# define HAVE_REALLOC + +# define HAVE_UNAME +# define HAVE_RENAME +# define HAVE_PUTENV +# define HAVE_STRNCPY /* 2005-11-22 SMS. Enabled some above. Added some below. */ # define HAVE_ECVT @@ -167,9 +124,11 @@ # define NICE_DECR -8 /* 2005-03-14 SMS. Need VMS-specific open() parameters. */ -# define _OPENFD_SRC /* Use VMS-specific _openfd() function.*/ +#ifndef NO_OPENFD_SRC +# define _OPENFD_SRC /* Use VMS-specific _openfd() function. */ # define _openfd openfd_vms /* This one. */ # define O_BINARY 0x0004 /* DOS-like value. Implies "ctx=bin". */ +#endif # define HAVE_C_BIGENDIAN # define HAVE_C_BITFIELDS diff -Nru cdrtools-2.01.01a33/include/schily/xmconfig.mk cdrtools-3.02a09/include/schily/xmconfig.mk --- cdrtools-2.01.01a33/include/schily/xmconfig.mk 2006-12-17 21:52:13.000000000 +0000 +++ cdrtools-3.02a09/include/schily/xmconfig.mk 2006-12-17 21:52:13.000000000 +0000 @@ -1,4 +1,4 @@ -#ident %W% %E% %Q% +#ident @(#)xmconfig.mk 1.1 06/12/17 ########################################################################### # Sample makefile for installing non-localized auxiliary files ########################################################################### diff -Nru cdrtools-2.01.01a33/INSTALL cdrtools-3.02a09/INSTALL --- cdrtools-2.01.01a33/INSTALL 2007-07-01 13:04:59.000000000 +0000 +++ cdrtools-3.02a09/INSTALL 2017-11-28 19:19:10.000000000 +0000 @@ -1,3 +1,5 @@ +# @(#)README.compile 1.35 17/11/28 Copyright 1997-2017 J. Schilling + Short overview for those who don't read manuals: Calling configure manually is outdated because this is a task of the @@ -13,16 +15,16 @@ All results in general will be placed into a directory named OBJ// in the current projects leaf directory. - You **need** either my "smake" program, the SunPRO make + You **need** either the Schily "smake" program, the SunPRO make from /usr/bin/make (SunOS 4.x) or /usr/ccs/bin/make (SunOS 5.x) - or GNU make to compile this program. Read README.gmake for + or GNU make to compile this program. Read READMEs/README.gmake for more information on gmake and a list of the most annoying bugs in gmake. All other make programs are either not smart enough or have bugs. My "smake" source is at: - ftp://ftp.berlios.de/pub/smake/alpha/ + https://sourceforge.net/projects/s-make/files/ It is easy to compile and doesn't need a working make program on your machine. If you don't have a working "make" program on the @@ -42,28 +44,32 @@ ***** Schily makefilesystem you cannot use GNU make. ***** ***** In this case, the automake features of smake are required. ***** + Note that GNU make has major bugs on various platforms and thus cannot + be used at all on VMS and OS/2. GNU make on Cygwin causes problems + because it does not deal with spaces and newlines correctly. + Please read the README's for your operating system too. WARNING Do not use 'mc' to extract the tar file! All mc versions before 4.0.14 cannot extract symbolic links correctly. - The versions of WinZip that support tar archives cannot be used too. + The versions of WinZip that support tar archives cannot be used either. The reason is that they don't support symbolic links. Star and Gnutar do support symbolic links even on win32 systems. To support symbolic links on win32, you need to link with the Cygwin32 POSIX library. - To unpack an archive use: + To unpack an archive, use: - gzip -d < some-arch.tar.gz | tar -xpf - + gzip -d < some-arch.tar.gz | tar xpf - - Replace 'star' by the actual archive name. + Replace 'some-arch.tar.gz' by the actual archive name. - If your Platform does not support hard links or symbolic links, you + If your platform does not support hard links or symbolic links, you first need to compile "star" and then call: - star -xpz -copy-links < some-arch.tar.gz + star -xp -copy-links < some-arch.tar.gz If your platform does not support hard links but supports symbolic links, you only need to call the command above once. @@ -87,10 +93,11 @@ all needed targets. Calling 'make install' will install all needed files. - This program uses a new makefilesystem. This makefilesystem uses - techniques and ideas from the 1980s and 1990s, is designed in a - modular way and allows sources to be combined in a modular way. - For mor information on the modular features read README.SSPM. + This program uses a new makefilesystem, introduced in 1993. This + makefilesystem uses techniques and ideas from the 1980s and 1990s, + is designed in a modular way and allows sources to be combined in a + modular way. For mor information on the modular features read + README.SSPM. The makefilesystem is optimized for a program called 'smake' Copyright 1985 by Jörg Schilling, but SunPro make (the make program @@ -104,10 +111,10 @@ Finding Compilation Results: - To allow this, all binaries and results of a 'compilation' in any form - are placed in sub-directories. This includes automatically generated - include files. Results in general will be placed into - a directory named OBJ// in the current projects + To allow simultaneous compilations, all binaries and results of a + 'compilation' in any form are placed in sub-directories. This includes + automatically generated include files. Results will in general be + placed into a directory named OBJ// in the current project's leaf directory, libraries will be placed into a directory called libs// that is located in the source tree root directory. @@ -121,8 +128,10 @@ To compile a system or sub-system, simply enter 'smake', 'make' or 'Gmake'. Compilation may be initialized at any point of the source - tree of a system. If compilation is started in a sub tree, all objects - in that sub tree will be made. + tree of a system. + + WARNING: If compilation is started in a sub tree, only all objects + in that sub tree will be made. This usually excludes needed libraries. How to install results: @@ -149,14 +158,17 @@ Using a different installation directory: - If your system does not yet use the standard installation path /opt + If your system does not yet use the standard installation path in + + /opt/ + or if you don't like this installation directory, you can easily change the installation directory. You may edit the DEFAULTS file for your system and modify the macro INS_BASE. You may use a different installation directory without editing the - DEFAULTS files. If you like to install everything in /usr/local, call: - + DEFAULTS files. If you like to install everything in the deprecated path + /usr/local, the next paragraph describes the procedure. If your make program supports to propagate make macros to sub make programs which is the case for recent smake releases as well as for a recent gnumake: @@ -165,19 +177,148 @@ or gmake INS_BASE=/usr/local install - If you make program doesn't propagate make macros (e.g. SunPRO make) call: + If your make program doesn't propagate make macros (e.g. SunPRO make), + call: env INS_BASE=/usr/local make -e install + Note that INS_BASE=/usr/local needs to be specified for every operation + that compiles or links programs, as the path may be stored inside the + binaries. + + The location for the root specific configuratin files is controlled + via the INS_RBASE= make macro. The default vaulue for this macro is "/". + If you like to install global default configuration files into + /usr/local/etc instead of /etc, you need to spefify INS_RBASE=/usr/local + + Note that some binaries have $(INS_BASE) and $(INS_RBASE) compiled into. + If you like to like to modify the compiled-in path values, call: + + smake clean + smake INS_BASE=/usr/local INS_RBASE=/usr/local + + +Setting up a different Link mode: + + The following link modes are available: + + static statical linking as in historical UNIX + + dynamic dynamic linking as introduced by SunOS + in 1987, Microsoft's DLLs, ... + The knowledge on how to achieve this for + a particular platform is hidden in the + makefile system. + + profiled Linking against profiled libraries. + Profiled libraries are prepared for the + use with "gprof" (introduced by BSD in the + late 1970s). + + The makefile system sets up a default linkmode in the patform + related defaults file (typically in the file DEFAULTS/Defaults.) + in the projects root directory. This is done with the entry: + + DEFLINKMODE= + + A different linkmode may be selected at compile/link time by e.g. calling: + + smake LINKMODE=dynamic + + If there are already existing binaries, call: + + smake relink LINKMODE=dynamic + + instead. + + +Compiling a different ELF RUNPATH into the binaries: + + In order to allow binaries to work correctly even if the shared + libraries are not in the default search path of the runtime linker, + a RUNPATH needs to be set. + + The ELF RUNPATH is by default derived from $(INS_BASE). If you like to + set INS_BASE=/usr and create binaries that do not include a RUNPATH at all, + call: + + smake relink RUNPATH= + + +Using a different man path prefix: + + Manual pages are by default installed under: + + $(INS_BASE)/$(MANBASE)/man + and MANBASE=share + + If you like a different prefix for man pages, call: + + smake DEFMANBASE=something install + + to install man pages into $(INS_BASE)/something/man/* + + If you like to install man pages under $(INS_BASE)/man/*, call + + smake DEFMANBASE=. install -Using a different C-compiler: +Installing stripped binaries: - If the configured default compiler is not present on the current machine, - the makefilesystem will try an automatic fallback to GCC. For this reason - in most cases you will not need to manually select a compiler. + If you like to install stripped binaries via "smake install", call: - The default C-compiler can be modified in the files in the - DEFAULT directory. If you want to have a different compiler + smake STRIPFLAGS=-s install + + This calls "strip" on every final install path for all executable + binaries. + +Installing to a prototype directory to implement package creation staging: + + If you like to create a prototype directory tree that is used as an + intermediate store for package creation, use the DESTDIR macro: + + smake INS_BASE=/usr/local DESTDIR=/tmp install + + This will compile in "/usr/local" as prefix into all related binaries + and then create a usr/local tree below /tmp (i.e. /tmp/usr/local). + + Note that you need to call "smake clean" before in case that the code + was previously compiled with different defaults with regards to INS_BASE + +Setting different default directory permissions for install directories: + + All directories that are created by the Schily makefile system in the + target directory path when + + smake install + + is called system use a special default 022 that is in DEFINSUMASK= + This causes all directories in the target install path to be created + with 0755 permissions. + + All other directories that are created by the Schily makefile system + use a single global default 002 that is in DEFUMASK= + + If you like to create install directories with e.g. 0775 permissions, + call: + + smake DEFINSUMASK=002 install + +Using a different C compiler: + + The *compiler family* is configured via the CCOM= make macro. This + selects a whole set of related macros that are needed to support a + specific compiler family. + + The *compiler family* usually defines a C compiler and a related + C++ compiler. + + If the configured default compiler family is not present on the current + machine, the makefilesystem will try an automatic fallback to GCC. For + this reason, in most cases, you will not need to manually select a + compiler. + + The default compiler family can be modified in the files in the + DEFAULT directory. If you want to have a different compiler family for one compilation, call: make CCOM=gcc @@ -197,8 +338,8 @@ It is not clear if GCC already supports other platforms in 64 bit mode. As all GCC versions before 3.1 did emit hundreds of compilation - warnings related to 64 bit bugs when compiling itself, there is little - hope that other platforms are already supported in 64 bit mode. + warnings related to 64 bit bugs when compiling itself, so there may be + other platforms are not supported in 64 bit mode. Creating executables using the Sun Studio compiler on Linux: @@ -215,14 +356,44 @@ lines like: "#if defined(__GNUC__) && !defined(__STRICT_ANSI__)" as well as the related #endif. +Creating executables using the clang compiler: + + Simply call: + + make CCOM=clang + + And in order to intentionally create 32 bit or 64 bit binaries, call: + make CCOM=clang64 + or + make CCOM=clang64 + + +Using a different compiler binary name: + + Call: -Getting help from make: + make CC=/opt/instrumented/bin/cc + + Note that all knowledge about the options of a compiler is derived + from the CCOM= variable, so if you like to use an instrumented gcc + variant, you may like to call: + + make CCOM=gcc CC=fluffy-gcc + + You may use CC="fluffy-gcc fluffy-gcc-specific options" if you like + to enforce specific options with the compiler. See hints on cross + compilation below. + + +Getting help from the make file system: For a list of targets call: make .help + .help is a special target that prints help for the makefile system. + Getting more information on the make file system: @@ -235,7 +406,7 @@ For further information read - ftp://ftp.berlios.de/pub/makefiles/PortableSoftware.ps.gz + http://sf.net/projects/schilytools/files/makefiles/PortableSoftware.ps.gz Hints for compilation: @@ -245,7 +416,7 @@ SunPro make will work as is. GNU make need some special preparation. - Read README.gmake for more information on gmake. + Read READMEs/README.gmake for more information on gmake. To use GNU make create a file called 'Gmake' in your search path that contains: @@ -255,14 +426,14 @@ export MAKEPROG exec gmake "$@" - and call 'Gmake' instead of gmake. On Linux there is no gmake, 'make' - on Linux is really a gmake. + and call 'Gmake' instead of gmake. On Linux, there is no gmake, the + program installed as 'make' on Linux is really a gmake. 'Gmake' and 'Gmake.linux' are part of this distribution. Some versions of gmake are very buggy. There are e.g. versions of gmake on some architectures that will not correctly recognize the default - target. In this case call 'make all' or ../Gmake all'. + target. In this case, call 'make all' or '../Gmake all'. Note that pseudo error messages from gmake similar to: @@ -270,7 +441,7 @@ ../RULES/rules.cnf:58: ../incs/sparc-sunos5-cc/Inull: No such file or directory ../RULES/rules.cnf:59: ../incs/sparc-sunos5-cc/rules.cnf: No such file or directory - Are a result of a bug un GNU make. The make file system itself is + are a result of a bug in GNU make. The make file system itself is correct (as you could prove by using smake). If your gmake version still has this bug, send a bug report to: @@ -281,7 +452,7 @@ If you like to use 'smake', please always compile it from source. The packages are located on: - ftp://ftp.berlios.de/pub/smake/alpha/ + https://sourceforge.net/projects/s-make/files/alpha/ Smake has a -D flag to see the actual makefile source used and a -d flag that gives easy to read debugging info. Use smake -xM @@ -292,8 +463,8 @@ The defaults found in the directory DEFAULTS are configured to give minimum warnings. This is made because many people will - be irritated by warning messages and because the GNU c-compiler - will give warnings for perfectly correct and portable c-code. + be irritated by warning messages and because the GNU C compiler + will give warnings for perfectly correct and portable C code. If you want to port code to new platforms or do engineering on the code, you should use the alternate set of defaults found @@ -303,6 +474,19 @@ make DEFAULTSDIR=DEFAULTS_ENG + Note however, that some GCC versions print a lot of wrong warnings + in this mode. Well known problems with GCC warnings are: + + - The recursive printf format "%r" that is in use since ~ 1980 + is not supported and causes a lot of incorrect warnings as + GCC does not know that "%r" takes 2 parameters. + + - The standard C construct "(void) read(fd, buf, sizeof (buf))" + is flagged by some versions of GCC even though the void cast + is a clear expression of the fact that the return code from read + is intentionally ignored. This may cause many useless warnings + for last resort error messages used in programs. + Compiling the project to allow debugging with dbx/gdb: @@ -312,15 +496,38 @@ make clean make COPTX=-g LDOPTX=-g + If your debugger does not like optimized binaries, call something + like: + + make "COPTX=-g -xO0" LDOPTX=-g + or + make "COPTX=-g -O0" LDOPTX=-g + + depending on the option system used by your C compiler. + + +Compiling the project to allow performance monitoring with gprof from BSD: + + If you like to compile for performance monitoriing with gprof, + call: + + make clean + make COPTX=-xpg LDOPTX=-xpg LINKMODE=profiled + + or + make COPTX=-pg LDOPTX=-pg LINKMODE=profiled -Creting Blastwave packages: + depending on the option system used by your C compiler. + + +Creating Blastwave packages: Call: .clean smake -f Mcsw You need the program "fakeroot" and will find the results - in packages/ + in packages/. Note that a single program source tree will allow you to create packages like CSWstar but not the packages CSWschilybase and @@ -332,7 +539,7 @@ If you want to see an example, please have a look at the "star" source. It may be found on: - ftp://ftp.berlios.de/pub/star + http://sourceforge.net/projects/s-tar/files/ Have a look at the manual page, it is included in the distribution. Install the manual page with @@ -345,6 +552,205 @@ man -F +Compiling in a cross compilation environment: + + The Schily autoconf system has been enhanced to support cross + compilation. Schily autoconf is based on GNU autoconf-2.13 and + GNU autoconf does not support cross compilation because it needs + to run scripts on the target system for some of the tests. + + The "configure" script that is delivered with the Schily makefile + system runs more than 770 tests and aprox 70 of them need to be + run on the target system. + + The Schily autoconf system now supports a method to run these ~70 + tests natively on a target system. You either need a target machine + with remote login features or you need an emulator with a method to + copy files into the emulated system and to run binaries on the + emulated system as e.g. the Android emulator. + + We currently deliver three scripts for "remote" execution of + programs on the target system: + + runrmt_ssh runs the commands remove via ssh + runrmt_rsh runs the commands remove via rsh + runrmt_android runs the commands remove via the debug bridge + + If you need to remotely run programs on a system that is not + supported by one of there three scripts, you need to modify one + of them to match your needs. + + To enable Cross Compilation use the following environment variables: + + CONFIG_RMTCALL= Set up to point to a script that does + the remote execution, e.g.: + + CONFIG_RMTCALL=`pwd`/conf/runrmt_ssh + + CONFIG_RMTHOST= Set up to point to your remote host, e.g.: + + CONFIG_RMTHOST=hostname + or + CONFIG_RMTHOST=user@hostname + + use a dummy if you like to use something + like the Android emulator. + + CONFIG_RMTDEBUG= Set to something non-null in order to + let the remote execution script mark + remote comands. This will result in + configure messages like: + + checking bits in minor device number... REMOTE 8 + + If you cannot run commands on the target + platform, you may set: + + CONFIG_RMTDEBUG=true + CONFIG_RMTCALL=: + + carefully watch for the "REMOTE" flagged test + output and later manually edit the file: + + incs//xconfig.h + + Do not forget to manually edit the files: + + incs//align.h + and + incs//avoffset.h + + Note that smake includes automake features that automatically + retrieve system ID information. For this reason, you need to overwrite + related macros from the command line if you like to do a + cross compilation. + + Related make macros: + + K_ARCH= # (sun4v) Kernel ARCH filled from uname -m / arch -k + M_ARCH= # (sun4) Machine filled from arch + P_ARCH= # (sparc) CPU ARCH filled from uname -p / mach + OSNAME= # sunos, linux, .... + OSREL= # 5.11 + OSVERSION= # snv_130 + CCOM= # generic compiler name (e.g. "gcc") + CC= # compiler to call (name for binary) + CC_COM= # compiler to call (name + basic args) + + ARCH= overwrites M_ARCH and P_ARCH + + It is usually suffucient to set ARCH and OSNAME. + + In order to use a cross compiler environment instead of a native compiler, + set the make macro CC_COM or CC to something different than "cc". + + If you are on Linux and like to compile for Android, do the following: + + 1) set up CC acording to the instructions from the cross compiler + tool chain. Important: you need to read the information for your + tool chain. A working setup may look similar to: + + NDK=/home/joerg/android-ndk-r7 + SYSROOT=\$NDK/platforms/android-14/arch-arm + CC="\$NDK/toolchains/arm-linux-androideabi-4.4.3/prebuilt/linux-x86/bin/arm-linux-androideabi-gcc --sysroot=\$SYSROOT" + export NDK + export SYSROOT + export CC + + + 2) set environment variables CONFIG_RMTCALL / CONFIG_RMTHOST, e.g.: + setenv CONFIG_RMTCALL `pwd`/conf/runrmt_android + setenv CONFIG_RMTHOST NONE + + 3) call smake: + + smake ARCH=armv5 OSNAME=linux CCOM=gcc "CC_COM=$CC" + + or + + smake ARCH=armv5 OSNAME=linux CCOM=gcc "CC=$CC" + + +Compiling with the address sanitizer: + + Be careful with a compiler enhancement called "addess sanitizer". + + First a note: the address sanitizer needs a lot of memory when in + 64-bit mode. For this reason, it is recommended to run the tests + in 32-bit mode as it may be impossible to provdie a sufficient amount + of memory for the 64-bit mode. + + 1) The address sanitizer may cause autoconf to behave incorrectly in + case that the compiler options used by the "configure" run include the + address sanitizer. It seems that in addition, the address sanitizer + adds more libraries to the link list and as a result prevents + the correct autoconf decision on whether a specific library from + a "configure" test is needed by some binaries. + + If you are not sure about the current state of the source tree, start + with calling: + + ./.clean + + in the top level source directory. This makes the source tree to behave + as if if was recently unpacked from the tar archive. + + Then run run e.g.: + + cd inc/ + smake CCOM=gcc32 + cd .. + + to prepare the auto-configuration without using the address sanitizer. + This special treatment is needed as the assumptions in the address + sanitizer would not allow us to run the autoconfiguration code + correctly. + + 2) The address sanitizer by default ignores installed SIGSEGV handlers + and thus ignores the intention of the author of the code. + + The correct behavior may be switched on via setting the environment + variable: + + ASAN_OPTIONS=allow_user_segv_handler=true + + As a redult, the command line to compile the code after the + auto-configuration has been done as mentioned above is: + + ASAN_OPTIONS=allow_user_segv_handler=true smake CCOM=gcc32 COPTX="-g -O0 -fsanitize=address" LDOPTX="-g -fsanitize=address" + + 3) If you are on Linux, do not forget to call "ulimit -c unlimited", + before calling the binary. This is needed as the default on Linux is + not to create a core file. + + 4) Set the environment ASAN_OPTIONS= for the execution of the binary + to control the behavior of the Address Sanitizer while the binary + is run. + + If you like to disable the memory leak detection because your program + is a short running program that intentionally does not free() resources + before calling exit(), use: + + ASAN_OPTIONS=allow_user_segv_handler=true:detect_leaks=0 + + If you also like to get a core dump on error to debug, you may like + to use: + + ASAN_OPTIONS=allow_user_segv_handler=true:detect_leaks=0:abort_on_error=1 + + Note that the Address Sanitizer disables the creation of a core file + for 64 bit binaries as the tables used by the Address Sanitizer may + cause the core file to have a size of 16 TB. + + +Compiling with the "Americal fuzzy lop": + + Follow the instruction from above for the address sanitizer, but + use this command line to call the compiler: + + ASAN_OPTIONS=allow_user_segv_handler=true AFL_HARDEN=1 AFL_USE_ASAN=1 smake CC=afl-gcc CCOM=gcc32 + + Author: Joerg Schilling @@ -353,6 +759,6 @@ Germany Email: joerg@schily.isdn.cs.tu-berlin.de, js@cs.tu-berlin.de - schilling@fokus.fhg.de + joerg.schilling@fokus.fraunhofer.de Please mail bugs and suggestions to me. diff -Nru cdrtools-2.01.01a33/libcdrdeflt/cdrdeflt.c cdrtools-3.02a09/libcdrdeflt/cdrdeflt.c --- cdrtools-2.01.01a33/libcdrdeflt/cdrdeflt.c 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/libcdrdeflt/cdrdeflt.c 2009-07-10 21:57:18.000000000 +0000 @@ -0,0 +1,273 @@ +/* @(#)cdrdeflt.c 1.25 09/07/10 Copyright 1998-2009 J. Schilling */ +#include +#ifndef lint +static UConst char sccsid[] = + "@(#)cdrdeflt.c 1.25 09/07/10 Copyright 1998-2009 J. Schilling"; +#endif +/* + * Copyright (c) 1998-2009 J. Schilling + */ +/* + * The contents of this file are subject to the terms of the + * Common Development and Distribution License, Version 1.0 only + * (the "License"). You may not use this file except in compliance + * with the License. + * + * See the file CDDL.Schily.txt in this distribution for details. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file CDDL.Schily.txt from this distribution. + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include "cdrdeflt.h" + +LOCAL int open_cdrdefaults __PR((void)); +EXPORT void cdr_defaults __PR((char **devp, int *speedp, long *fsp, long *bufsizep, char **drvoptp)); +LOCAL void cdr_xdefaults __PR((char **devp, int *speedp, long *fsp, long *bufsizep, char **drvoptp)); +LOCAL char * strsv __PR((char *s)); + +LOCAL int +open_cdrdefaults() +{ + /* + * WARNING you are only allowed to change this filename if you also + * change the documentation and add a statement that makes clear + * where the official location of the file is why you did choose a + * nonstandard location and that the nonstandard location only refers + * to inofficial cdrecord versions. + * + * I was forced to add this because some people change cdrecord without + * rational reason and then publish the result. As those people + * don't contribute work and don't give support, they are causing extra + * work for me and this way slow down the cdrecord development. + */ + return (defltopen("/etc/default/cdrecord")); +} + +EXPORT void +cdr_defaults(devp, speedp, fsp, bufsizep, drvoptp) + char **devp; /* dev= */ + int *speedp; /* speed= */ + long *fsp; /* fs= */ + long *bufsizep; /* ts= */ + char **drvoptp; /* driveropts= */ +{ + char *dev = NULL; + int speed = 0; + long fs = 0L; + long bufsize = 0L; + + if (devp != NULL) + dev = *devp; + if (speedp != NULL) + speed = *speedp; + if (fsp != NULL) + fs = *fsp; + if (bufsizep != NULL) + bufsize = *bufsizep; + + if (!dev && devp != NULL) { + *devp = getenv("CDR_DEVICE"); + + if (!*devp && open_cdrdefaults() == 0) { + dev = defltread("CDR_DEVICE="); + if (dev != NULL) + *devp = strsv(dev); + } + } + if (devp != NULL && *devp) + cdr_xdefaults(devp, &speed, &fs, &bufsize, drvoptp); + + if (speed < 0) { + char *p = getenv("CDR_SPEED"); + + if (!p) { + if (open_cdrdefaults() == 0) { + p = defltread("CDR_SPEED="); + } + } + if (p) { + speed = atoi(p); + if (speed < 0 && speed != -1) { + comerrno(EX_BAD, + "Bad speed environment (%s).\n", p); + } + } + } + if (speed >= 0 && speedp != NULL) + *speedp = speed; + + if (fs < 0L) { + char *p = getenv("CDR_FIFOSIZE"); + + if (!p) { + if (open_cdrdefaults() == 0) { + p = defltread("CDR_FIFOSIZE="); + } + } + if (p) { + if (getnum(p, &fs) != 1) { + comerrno(EX_BAD, + "Bad fifo size environment (%s).\n", p); + } + } + } + if (fs > 0L && fsp != NULL) { + char *p = NULL; + long maxfs; + + if (open_cdrdefaults() == 0) { + p = defltread("CDR_MAXFIFOSIZE="); + } + if (p) { + if (getnum(p, &maxfs) != 1) { + comerrno(EX_BAD, + "Bad max fifo size default (%s).\n", p); + } + if (fs > maxfs) + fs = maxfs; + } + *fsp = fs; + } + + if (bufsize < 0L && bufsizep != NULL) { + char *p = getenv("CDR_TRANSFERSIZE"); + + if (!p) { + if (open_cdrdefaults() == 0) { + p = defltread("CDR_TRANSFERSIZE="); + } + } + if (p) { + if (getnum(p, &bufsize) != 1) { + comerrno(EX_BAD, + "Bad transfer size environment (%s).\n", p); + } + } + } + if (bufsize > 0L && bufsizep != NULL) + *bufsizep = bufsize; + + + defltclose(); +} + +/* + * All args except "drvoptp" are granted to be non NULL pointers. + */ +LOCAL void +cdr_xdefaults(devp, speedp, fsp, bufsizep, drvoptp) + char **devp; /* dev= */ + int *speedp; /* speed= */ + long *fsp; /* fs= */ + long *bufsizep; /* ts= */ + char **drvoptp; /* driveropts= */ +{ + char dname[256]; + char *p = *devp; + char *x = ",:/@"; + + while (*x) { + if (strchr(p, *x)) + return; + x++; + } + js_snprintf(dname, sizeof (dname), "%s=", p); + if (open_cdrdefaults() != 0) + return; + + p = defltread(dname); + if (p != NULL) { + while (*p == '\t' || *p == ' ') + p++; + if ((x = strchr(p, '\t')) != NULL) + *x = '\0'; + else if ((x = strchr(p, ' ')) != NULL) + *x = '\0'; + *devp = strsv(p); + if (x) { + p = ++x; + while (*p == '\t' || *p == ' ') + p++; + if ((x = strchr(p, '\t')) != NULL) + *x = '\0'; + else if ((x = strchr(p, ' ')) != NULL) + *x = '\0'; + if (*speedp < 0) + *speedp = atoi(p); + if (*speedp < 0 && *speedp != -1) { + comerrno(EX_BAD, + "Bad speed in defaults (%s).\n", p); + } + } + if (x) { + p = ++x; + while (*p == '\t' || *p == ' ') + p++; + if ((x = strchr(p, '\t')) != NULL) + *x = '\0'; + else if ((x = strchr(p, ' ')) != NULL) + *x = '\0'; + if (*fsp < 0L) { + if (getnum(p, fsp) != 1) { + comerrno(EX_BAD, + "Bad fifo size in defaults (%s).\n", + p); + } + } + } + if (x) { + p = ++x; + while (*p == '\t' || *p == ' ') + p++; + if ((x = strchr(p, '\t')) != NULL) + *x = '\0'; + else if ((x = strchr(p, ' ')) != NULL) + *x = '\0'; + if (strcmp(p, "\"\"") != '\0') { + /* + * Driver opts found. + */ + if (drvoptp && *drvoptp == NULL) + *drvoptp = strsv(p); + } + } + if (x) { + p = ++x; + while (*p == '\t' || *p == ' ') + p++; + if ((x = strchr(p, '\t')) != NULL) + *x = '\0'; + else if ((x = strchr(p, ' ')) != NULL) + *x = '\0'; + if (*bufsizep < 0L) { + if (getnum(p, bufsizep) != 1) { + comerrno(EX_BAD, + "Bad transfer size in defaults (%s).\n", + p); + } + } + } + } +} + +LOCAL char * +strsv(s) + char *s; +{ + char *p; + int len = strlen(s); + + p = malloc(len+1); + if (p) + strcpy(p, s); + return (p); +} diff -Nru cdrtools-2.01.01a33/libcdrdeflt/cdrdeflt.h cdrtools-3.02a09/libcdrdeflt/cdrdeflt.h --- cdrtools-2.01.01a33/libcdrdeflt/cdrdeflt.h 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/libcdrdeflt/cdrdeflt.h 2008-10-25 21:18:14.000000000 +0000 @@ -0,0 +1,26 @@ +/* @(#)cdrdeflt.h 1.4 08/10/25 Copyright 1998-2008 J. Schilling */ +/* + * The cdrecord defaults (/etc/default/cdrecord) interface + * + * Copyright (c) 1998-2008 J. Schilling + */ +/* + * The contents of this file are subject to the terms of the + * Common Development and Distribution License, Version 1.0 only + * (the "License"). You may not use this file except in compliance + * with the License. + * + * See the file CDDL.Schily.txt in this distribution for details. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file CDDL.Schily.txt from this distribution. + */ + +#ifndef _CDRDEFLT_H +#define _CDRDEFLT_H +/* + * defaults.c + */ +extern void cdr_defaults __PR((char **devp, int *speedp, long *fsp, long *bufsizep, char **drvoptp)); + +#endif /* _CDRDEFLT_H */ diff -Nru cdrtools-2.01.01a33/libcdrdeflt/libcdrdeflt-mapvers cdrtools-3.02a09/libcdrdeflt/libcdrdeflt-mapvers --- cdrtools-2.01.01a33/libcdrdeflt/libcdrdeflt-mapvers 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/libcdrdeflt/libcdrdeflt-mapvers 2010-10-02 20:09:14.000000000 +0000 @@ -0,0 +1,9 @@ +# /* @(#)libcdrdeflt-mapvers 1.2 10/10/02 Copyright 2008-2010 J. Schilling */ + +SCHILY_1.0 { + +global: + cdr_defaults; +local: + *; +}; diff -Nru cdrtools-2.01.01a33/libcdrdeflt/libcdrdeflt.mk cdrtools-3.02a09/libcdrdeflt/libcdrdeflt.mk --- cdrtools-2.01.01a33/libcdrdeflt/libcdrdeflt.mk 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/libcdrdeflt/libcdrdeflt.mk 2008-10-25 21:29:11.000000000 +0000 @@ -0,0 +1,22 @@ +#ident @(#)libcdrdeflt.mk 1.1 08/10/25 +########################################################################### +SRCROOT= .. +RULESDIR= RULES +include $(SRCROOT)/$(RULESDIR)/rules.top +########################################################################### + +#.SEARCHLIST: . $(ARCHDIR) stdio $(ARCHDIR) +#VPATH= .:stdio:$(ARCHDIR) +INSDIR= lib +TARGETLIB= cdrdeflt +CPPOPTS += -I. + +include Targets +LIBS= + +########################################################################### +include $(SRCROOT)/$(RULESDIR)/rules.lib +########################################################################### +#CC= echo " ==> COMPILING \"$@\""; cc +########################################################################### + diff -Nru cdrtools-2.01.01a33/libcdrdeflt/libcdrdeflt_p.mk cdrtools-3.02a09/libcdrdeflt/libcdrdeflt_p.mk --- cdrtools-2.01.01a33/libcdrdeflt/libcdrdeflt_p.mk 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/libcdrdeflt/libcdrdeflt_p.mk 2008-10-25 21:29:11.000000000 +0000 @@ -0,0 +1,24 @@ +#ident @(#)libcdrdeflt_p.mk 1.1 08/10/25 +########################################################################### +SRCROOT= .. +RULESDIR= RULES +include $(SRCROOT)/$(RULESDIR)/rules.top +########################################################################### + +SUBARCHDIR= /profiled +SUBINSDIR= /profiled +#.SEARCHLIST: . $(ARCHDIR) stdio $(ARCHDIR) +#VPATH= .:stdio:$(ARCHDIR) +INSDIR= lib +TARGETLIB= cdrdeflt +CPPOPTS += -I. +COPTS += $(COPTGPROF) + +include Targets +LIBS= + +########################################################################### +include $(SRCROOT)/$(RULESDIR)/rules.lib +########################################################################### +#CC= echo " ==> COMPILING \"$@\""; cc +########################################################################### diff -Nru cdrtools-2.01.01a33/libcdrdeflt/Makefile cdrtools-3.02a09/libcdrdeflt/Makefile --- cdrtools-2.01.01a33/libcdrdeflt/Makefile 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/libcdrdeflt/Makefile 2008-10-25 21:18:26.000000000 +0000 @@ -0,0 +1,12 @@ +#ident @(#)Makefile 1.1 08/10/25 +########################################################################### +SRCROOT= .. +RULESDIR= RULES +include $(SRCROOT)/$(RULESDIR)/rules.top +########################################################################### + +MK_FILES= libcdrdeflt.mk libcdrdeflt_p.mk $(NO_SHL)shlcdrdeflt.mk + +########################################################################### +include $(SRCROOT)/$(RULESDIR)/rules.mks +########################################################################### diff -Nru cdrtools-2.01.01a33/libcdrdeflt/noshlcdrdeflt.mk cdrtools-3.02a09/libcdrdeflt/noshlcdrdeflt.mk --- cdrtools-2.01.01a33/libcdrdeflt/noshlcdrdeflt.mk 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/libcdrdeflt/noshlcdrdeflt.mk 2008-10-25 21:29:11.000000000 +0000 @@ -0,0 +1,9 @@ +#ident @(#)noshlcdrdeflt.mk 1.1 08/10/25 +########################################################################### +SRCROOT= .. +RULESDIR= RULES +include $(SRCROOT)/$(RULESDIR)/rules.top +########################################################################### + +all: + @echo " ==> NO shared libs on this platform (yet)" diff -Nru cdrtools-2.01.01a33/libcdrdeflt/shlcdrdeflt.mk cdrtools-3.02a09/libcdrdeflt/shlcdrdeflt.mk --- cdrtools-2.01.01a33/libcdrdeflt/shlcdrdeflt.mk 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/libcdrdeflt/shlcdrdeflt.mk 2008-10-26 20:58:13.000000000 +0000 @@ -0,0 +1,22 @@ +#ident @(#)shlcdrdeflt.mk 1.1 08/10/25 +########################################################################### +SRCROOT= .. +RULESDIR= RULES +include $(SRCROOT)/$(RULESDIR)/rules.top +########################################################################### + +SUBARCHDIR= /pic +#.SEARCHLIST: . $(ARCHDIR) stdio $(ARCHDIR) +#VPATH= .:stdio:$(ARCHDIR) +INSDIR= lib +TARGETLIB= cdrdeflt +CPPOPTS += -I. + +include Targets +LIBS= -ldeflt -lschily -lc + +########################################################################### +include $(SRCROOT)/$(RULESDIR)/rules.shl +########################################################################### +#CC= echo " ==> COMPILING \"$@\""; cc +########################################################################### diff -Nru cdrtools-2.01.01a33/libcdrdeflt/Targets cdrtools-3.02a09/libcdrdeflt/Targets --- cdrtools-2.01.01a33/libcdrdeflt/Targets 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/libcdrdeflt/Targets 2008-10-25 21:20:29.000000000 +0000 @@ -0,0 +1,5 @@ +# @(#)Targets 1.1 08/10/25 Copyright 2008 J. Schilling + +CFILES= cdrdeflt.c + +HFILES= cdrdeflt.h diff -Nru cdrtools-2.01.01a33/libdeflt/default.c cdrtools-3.02a09/libdeflt/default.c --- cdrtools-2.01.01a33/libdeflt/default.c 2006-09-13 13:24:59.000000000 +0000 +++ cdrtools-3.02a09/libdeflt/default.c 2017-07-15 18:11:14.000000000 +0000 @@ -1,10 +1,11 @@ -/* @(#)default.c 1.6 06/09/13 Copyright 1997 J. Schilling */ +/* @(#)default.c 1.11 17/07/15 Copyright 1997-2017 J. Schilling */ +#include #ifndef lint -static char sccsid[] = - "@(#)default.c 1.6 06/09/13 Copyright 1997 J. Schilling"; +static UConst char sccsid[] = + "@(#)default.c 1.11 17/07/15 Copyright 1997-2017 J. Schilling"; #endif /* - * Copyright (c) 1997 J. Schilling + * Copyright (c) 1997-2017 J. Schilling */ /* * The contents of this file are subject to the terms of the @@ -13,24 +14,31 @@ * with the License. * * See the file CDDL.Schily.txt in this distribution for details. + * A copy of the CDDL is also available via the Internet at + * http://www.opensource.org/licenses/cddl1.txt * * When distributing Covered Code, include this CDDL HEADER in each * file and include the License file CDDL.Schily.txt from this distribution. */ -#include #include -#include +#include #include +#include /* For strncasecmp size_t */ +#include #include +#include /* Define missing prototypes */ #define MAXLINE 512 static FILE *dfltfile = (FILE *)NULL; +static const char *dfltsect = NULL; +static int dfltflags = DC_STD; EXPORT int defltopen __PR((const char *name)); EXPORT int defltclose __PR((void)); -EXPORT void defltfirst __PR((void)); +EXPORT int defltsect __PR((const char *name)); +EXPORT int defltfirst __PR((void)); EXPORT char *defltread __PR((const char *name)); EXPORT char *defltnext __PR((const char *name)); EXPORT int defltcntl __PR((int cmd, int flags)); @@ -39,18 +47,21 @@ defltopen(name) const char *name; { - if (dfltfile != (FILE *)NULL) + if (dfltfile != (FILE *)NULL) { fclose(dfltfile); + dfltfile = NULL; + } if (name == (char *)NULL) { - fclose(dfltfile); - dfltfile = NULL; return (0); } if ((dfltfile = fopen(name, "r")) == (FILE *)NULL) { return (-1); } + dfltflags = DC_STD; + dfltsect = NULL; + return (0); } @@ -67,13 +78,64 @@ return (0); } -EXPORT void +EXPORT int +defltsect(name) + const char *name; +{ + size_t len; + + if (name == NULL) { + dfltsect = NULL; + return (0); + } + if (*name != '[') + return (-1); + + len = strlen(name); + if (len >= MAXLINE) + return (-1); + if (len < 3 || name[len-1] != ']') + return (-1); + + dfltsect = name; + return (0); +} + +EXPORT int defltfirst() { if (dfltfile == (FILE *)NULL) { - return; + return (-1); } rewind(dfltfile); + if (dfltsect) { + register int len; + register int sectlen; + char buf[MAXLINE]; + + sectlen = strlen(dfltsect); + while (fgets(buf, sizeof (buf), dfltfile)) { + len = strlen(buf); + if (buf[len-1] == '\n') { + buf[len-1] = 0; + } else { + continue; + } + if (buf[0] != '[') + continue; + if (dfltflags & DC_CASE) { + if (strncmp(dfltsect, buf, sectlen) == 0) { + return (0); + } + } else { + if (strncasecmp(dfltsect, buf, sectlen) == 0) { + return (0); + } + } + } + return (-1); + } + return (0); } EXPORT char * @@ -83,7 +145,7 @@ if (dfltfile == (FILE *)NULL) { return ((char *)NULL); } - rewind(dfltfile); + defltfirst(); return (defltnext(name)); } @@ -107,8 +169,22 @@ } else { return ((char *)NULL); } - if (strncmp(name, buf, namelen) == 0) { - return (&buf[namelen]); + /* + * Check for end of current section. Seek to the end of file to + * prevent other calls to defltnext() return unexpected data. + */ + if (dfltsect != NULL && buf[0] == '[') { + fseek(dfltfile, (off_t)0, SEEK_END); + return ((char *)NULL); + } + if (dfltflags & DC_CASE) { + if (strncmp(name, buf, namelen) == 0) { + return (&buf[namelen]); + } + } else { + if (strncasecmp(name, buf, namelen) == 0) { + return (&buf[namelen]); + } } } return ((char *)NULL); @@ -119,7 +195,9 @@ int cmd; int flags; { - int oldflags = 0; + int oldflags = dfltflags; + + dfltflags = flags; return (oldflags); } diff -Nru cdrtools-2.01.01a33/libdeflt/libdeflt-mapvers cdrtools-3.02a09/libdeflt/libdeflt-mapvers --- cdrtools-2.01.01a33/libdeflt/libdeflt-mapvers 2005-06-12 16:22:50.000000000 +0000 +++ cdrtools-3.02a09/libdeflt/libdeflt-mapvers 2013-09-12 15:16:25.000000000 +0000 @@ -1,3 +1,11 @@ +# /* @(#)libdeflt-mapvers 1.2 13/09/12 Copyright 2005-2013 J. Schilling */ + +SCHILY_1.1 { +global: + defltsect; + +} SCHILY_1.0; + SCHILY_1.0 { global: defltopen; @@ -9,4 +17,4 @@ local: *; -}; \ No newline at end of file +}; diff -Nru cdrtools-2.01.01a33/libdeflt/libdeflt.mk cdrtools-3.02a09/libdeflt/libdeflt.mk --- cdrtools-2.01.01a33/libdeflt/libdeflt.mk 2005-06-12 23:23:36.000000000 +0000 +++ cdrtools-3.02a09/libdeflt/libdeflt.mk 2011-04-15 20:06:58.000000000 +0000 @@ -1,4 +1,4 @@ -#ident @(#)libdeflt.mk 1.1 05/06/13 +#ident @(#)libdeflt.mk 1.2 11/04/15 ########################################################################### SRCROOT= .. RULESDIR= RULES @@ -18,3 +18,4 @@ ########################################################################### #CC= echo " ==> COMPILING \"$@\""; cc ########################################################################### + diff -Nru cdrtools-2.01.01a33/libdeflt/libdeflt_p.mk cdrtools-3.02a09/libdeflt/libdeflt_p.mk --- cdrtools-2.01.01a33/libdeflt/libdeflt_p.mk 2007-06-30 11:13:33.000000000 +0000 +++ cdrtools-3.02a09/libdeflt/libdeflt_p.mk 2008-01-11 17:25:18.000000000 +0000 @@ -1,4 +1,4 @@ -#ident @(#)libdeflt_p.mk 1.2 07/06/30 +#ident @(#)libdeflt_p.mk 1.3 08/01/11 ########################################################################### SRCROOT= .. RULESDIR= RULES @@ -6,6 +6,7 @@ ########################################################################### SUBARCHDIR= /profiled +SUBINSDIR= /profiled #.SEARCHLIST: . $(ARCHDIR) stdio $(ARCHDIR) #VPATH= .:stdio:$(ARCHDIR) INSDIR= lib diff -Nru cdrtools-2.01.01a33/libedc/ecc.h cdrtools-3.02a09/libedc/ecc.h --- cdrtools-2.01.01a33/libedc/ecc.h 2006-05-15 19:14:30.000000000 +0000 +++ cdrtools-3.02a09/libedc/ecc.h 2012-12-02 12:50:59.000000000 +0000 @@ -1,10 +1,10 @@ -/* @(#)ecc.h 1.5 06/05/14 Copyright 1998-2002 Heiko Eissfeldt, Joerg Schilling */ +/* @(#)ecc.h 1.6 12/12/02 Copyright 1998-2002 Heiko Eissfeldt, Joerg Schilling */ /* * compact disc reed-solomon routines * * (c) 1998-2002 by Heiko Eissfeldt, heiko@colossus.escape.de - * (c) 2002 by Joerg Schilling + * (c) 2002-2012 by Joerg Schilling */ /* * The contents of this file are subject to the terms of the @@ -18,22 +18,23 @@ * file and include the License file CDDL.Schily.txt from this distribution. */ -#define RS_L12_BITS 8 +#define RS_L12_BITS 8 /* audio sector definitions for CIRC */ -#define FRAMES_PER_SECTOR 98 +#define FRAMES_PER_SECTOR 98 /* user data bytes per frame */ -#define L1_RAW 24 +#define L1_RAW 24 /* parity bytes with 8 bit */ -#define L1_Q 4 -#define L1_P 4 +#define L1_Q 4 +#define L1_P 4 /* audio sector Cross Interleaved Reed-Solomon Code (CIRC) encoder (layer 1) */ -/* adds P- and Q- parity information to audio (f2) frames. Also - optionally handles the various delays and permutations. The output with all - stages enabled can be fed into the Eight-Fourteen-Modulator. - On input: 2352 bytes of audio data is given. - On output: 3136 bytes of CIRC enriched audio data are returned. +/* + * adds P- and Q- parity information to audio (f2) frames. Also + * optionally handles the various delays and permutations. The output with all + * stages enabled can be fed into the Eight-Fourteen-Modulator. + * On input: 2352 bytes of audio data is given. + * On output: 3136 bytes of CIRC enriched audio data are returned. */ int do_encode_L1 __PR((unsigned char in[L1_RAW*FRAMES_PER_SECTOR], unsigned char out[(L1_RAW+L1_Q+L1_P)*FRAMES_PER_SECTOR], @@ -41,17 +42,17 @@ /* data sector definitions for RSPC */ /* user data bytes per frame */ -#define L2_RAW (1024*2) +#define L2_RAW (1024*2) /* parity bytes for 16 bit units */ -#define L2_Q (26*2*2) -#define L2_P (43*2*2) +#define L2_Q (26*2*2) +#define L2_P (43*2*2) /* known sector types */ -#define MODE_0 0 -#define MODE_1 1 -#define MODE_2 2 -#define MODE_2_FORM_1 3 -#define MODE_2_FORM_2 4 +#define MODE_0 0 +#define MODE_1 1 +#define MODE_2 2 +#define MODE_2_FORM_1 3 +#define MODE_2_FORM_2 4 /* set one of the MODE_* constants for subsequent data sector formatting */ int set_sector_type __PR((int st)); @@ -59,27 +60,28 @@ int get_sector_type __PR((void)); /* data sector layer 2 Reed-Solomon Product Code encoder */ -/* encode the given data portion depending on sector type (see - get/set_sector_type() functions). Use the given address for the header. - The returned data is __unscrambled__ and not in F2-frame format (for that - see function scramble_L2()). - Supported sector types: - MODE_0: a 12-byte sync field, a header and 2336 zeros are returned. - MODE_1: the user data portion (2048 bytes) has to be given - at offset 16 in the inout array. - Sync-, header-, edc-, spare-, p- and q- fields will be added. - MODE_2: the user data portion (2336 bytes) has to be given - at offset 16 in the inout array. - Sync- and header- fields will be added. - MODE_2_FORM_1: the user data portion (8 bytes subheader followed - by 2048 bytes data) has to be given at offset 16 - in the inout array. - Sync-, header-, edc-, p- and q- fields will be added. - MODE_2_FORM_2: the user data portion (8 bytes subheader followed - by 2324 bytes data) has to be given at offset 16 - in the inout array. - Sync-, header- and edc- fields will be added. -*/ +/* + * encode the given data portion depending on sector type (see + * get/set_sector_type() functions). Use the given address for the header. + * The returned data is __unscrambled__ and not in F2-frame format (for that + * see function scramble_L2()). + * Supported sector types: + * MODE_0: a 12-byte sync field, a header and 2336 zeros are returned. + * MODE_1: the user data portion (2048 bytes) has to be given + * at offset 16 in the inout array. + * Sync-, header-, edc-, spare-, p- and q- fields will be added. + * MODE_2: the user data portion (2336 bytes) has to be given + * at offset 16 in the inout array. + * Sync- and header- fields will be added. + * MODE_2_FORM_1: the user data portion (8 bytes subheader followed + * by 2048 bytes data) has to be given at offset 16 + * in the inout array. + * Sync-, header-, edc-, p- and q- fields will be added. + * MODE_2_FORM_2: the user data portion (8 bytes subheader followed + * by 2324 bytes data) has to be given at offset 16 + * in the inout array. + * Sync-, header- and edc- fields will be added. + */ int do_encode_L2 __PR((unsigned char *inout, int sectortype, unsigned address)); int encode_L2_Q __PR((unsigned char inout[4 + L2_RAW + 4 + 8 + L2_P + L2_Q])); int encode_L2_P __PR((unsigned char inout[4 + L2_RAW + 4 + 8 + L2_P])); @@ -88,28 +90,31 @@ int decode_L2_P __PR((unsigned char inout[4 + L2_RAW + 12 + L2_Q + L2_P])); unsigned int build_edc __PR((unsigned char inout[], int from, int upto)); -/* generates f2 frames from otherwise fully formatted sectors (generated by - do_encode_L2()). */ +/* + * generates f2 frames from otherwise fully formatted sectors (generated by + * do_encode_L2()). + */ #define EDC_SCRAMBLE_NOSWAP 1 /* Do not swap bytes while scrambling */ int scramble_L2 __PR((unsigned char *inout)); /* r-w sub channel definitions */ -#define RS_SUB_RW_BITS 6 +#define RS_SUB_RW_BITS 6 -#define PACKETS_PER_SUBCHANNELFRAME 4 -#define LSUB_RAW 18 -#define LSUB_QRAW 2 +#define PACKETS_PER_SUBCHANNELFRAME 4 +#define LSUB_RAW 18 +#define LSUB_QRAW 2 /* 6 bit */ -#define LSUB_Q 2 -#define LSUB_P 4 +#define LSUB_Q 2 +#define LSUB_P 4 /* R-W subchannel encoder */ -/* On input: 72 bytes packed user data, four frames with each 18 bytes. - On output: per frame: 2 bytes user data, 2 bytes Q parity, - 16 bytes user data, 4 bytes P parity. - Options: - delay1: use low level delay line - scramble: perform low level permutations +/* + * On input: 72 bytes packed user data, four frames with each 18 bytes. + * On output: per frame: 2 bytes user data, 2 bytes Q parity, + * 16 bytes user data, 4 bytes P parity. + * Options: + * delay1: use low level delay line + * scramble: perform low level permutations */ int do_encode_sub __PR((unsigned char in[LSUB_RAW*PACKETS_PER_SUBCHANNELFRAME], unsigned char out[(LSUB_RAW+LSUB_Q+LSUB_P)*PACKETS_PER_SUBCHANNELFRAME], diff -Nru cdrtools-2.01.01a33/libedc/edc_ecc.c cdrtools-3.02a09/libedc/edc_ecc.c --- cdrtools-2.01.01a33/libedc/edc_ecc.c 2006-09-25 21:45:37.000000000 +0000 +++ cdrtools-3.02a09/libedc/edc_ecc.c 2013-04-28 13:44:05.000000000 +0000 @@ -1,12 +1,13 @@ -/* @(#)edc_ecc.c 1.24 06/09/25 Copyright 1998-2006 Heiko Eissfeldt, Joerg Schilling */ +/* @(#)edc_ecc.c 1.31 13/04/28 Copyright 1998-2013 Heiko Eissfeldt, Joerg Schilling */ +#include #ifndef lint -static char sccsid[] = - "@(#)edc_ecc.c 1.24 06/09/25 Copyright 1998-2006 Heiko Eissfeldt, Joerg Schilling"; +static UConst char sccsid[] = + "@(#)edc_ecc.c 1.31 13/04/28 Copyright 1998-2013 Heiko Eissfeldt, Joerg Schilling"; #endif /* - * Copyright 1998-2002 by Heiko Eissfeldt - * Copyright 2002-2006 by Joerg Schilling + * Copyright 1998-2002,2008 by Heiko Eissfeldt + * Copyright 2002-2013 by Joerg Schilling * * This file contains protected intellectual property. * @@ -25,8 +26,7 @@ * file and include the License file CDDL.Schily.txt from this distribution. */ -#include -#include +#include #include #include #include @@ -34,10 +34,17 @@ #include "ecc.h" #ifndef HAVE_MEMMOVE +#include /* Define missing prototypes */ /*#define memmove(dst, src, size) movebytes((src), (dst), (size))*/ -#define memmove(d, s, n) bcopy ((s), (d), (n)) +#define memmove(d, s, n) bcopy((s), (d), (n)) #endif +/* + * The functions do_decode_L1(), do_decode_L2(), decode_L1_P(), decode_L1_Q() + * are currently static and limited to debug mode (#ifdef MAIN). + * After they are ready, they will be made public without #ifdef MAIN. + */ +#ifdef MAIN /* these prototypes will become public when the function are implemented */ static int do_decode_L2 __PR((unsigned char in[(L2_RAW+L2_Q+L2_P)], unsigned char out[L2_RAW])); @@ -45,14 +52,15 @@ static int do_decode_L1 __PR((unsigned char in[(L1_RAW+L1_Q+L1_P)*FRAMES_PER_SECTOR], unsigned char out[L1_RAW*FRAMES_PER_SECTOR], int delay1, int delay2, int delay3, int scramble)); +#endif /* ------------- tables generated by gen_encodes --------------*/ #include "scramble_table" -#define DO4(a) a;a;a;a; -#define DO13(a) a;a;a;a;a;a;a;a;a;a;a;a;a; +#define DO4(a) a; a; a; a; +#define DO13(a) a; a; a; a; a; a; a; a; a; a; a; a; a; /* * Scrambles 2352 - 12 = 2340 bytes @@ -67,13 +75,13 @@ unsigned int *f = (unsigned int *)inout; #endif - if (!xaligned(inout + 12, sizeof(UInt32_t)-1)) { + if (!xaligned(inout + 12, sizeof (UInt32_t)-1)) { Uchar *r = inout + 12; const Uchar *s = yellowbook_scrambler; register int i; - for (i = (L2_RAW + L2_Q + L2_P +16)/sizeof(unsigned char)/4; --i >= 0;) { + for (i = (L2_RAW + L2_Q + L2_P +16)/sizeof (unsigned char)/4; --i >= 0; ) { DO4(*r++ ^= *s++); } @@ -82,7 +90,7 @@ const UInt32_t *s = yellowbook_scrambler_uint32; register int i; - for (i = (L2_RAW + L2_Q + L2_P +16)/sizeof(UInt32_t)/13; --i >= 0;) { + for (i = (L2_RAW + L2_Q + L2_P +16)/sizeof (UInt32_t)/13; --i >= 0; ) { DO13(*r++ ^= *s++); } } @@ -90,7 +98,7 @@ #ifndef EDC_SCRAMBLE_NOSWAP /* generate F1 frames */ - for (i = 2352/sizeof(unsigned int); i; i--) { + for (i = 2352/sizeof (unsigned int); i; i--) { *f++ = ((*f & 0xff00ff00UL) >> 8) | ((*f & 0x00ff00ffUL) << 8); } #endif @@ -132,11 +140,11 @@ dp += 2*44-1; if (dp >= &inout[(4 + L2_RAW + 4 + 8 + L2_P)]) { dp -= (4 + L2_RAW + 4 + 8 + L2_P); - } + } } - Q[0] = a >> 8; - Q[26*2] = a; - Q[1] = b >> 8; + Q[0] = a >> 8; + Q[26*2] = a; + Q[1] = b >> 8; Q[26*2+1] = b; Q += 2; @@ -174,9 +182,9 @@ dp += 2*43 -1; } - P[0] = a >> 8; - P[43*2] = a; - P[1] = b >> 8; + P[0] = a >> 8; + P[43*2] = a; + P[1] = b >> 8; P[43*2+1] = b; P += 2; @@ -258,14 +266,14 @@ { unsigned int result; -/* SYNCPATTERN "\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff" */ -#define SYNCPATTERN "\000\377\377\377\377\377\377\377\377\377\377" +/* SYNCPATTERN "\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff" */ +#define SYNCPATTERN "\000\377\377\377\377\377\377\377\377\377\377" /* supply initial sync pattern */ - memcpy(inout, SYNCPATTERN, sizeof(SYNCPATTERN)); + memcpy(inout, SYNCPATTERN, sizeof (SYNCPATTERN)); if (sectortype == MODE_0) { - memset(inout + sizeof(SYNCPATTERN), 0, 4 + L2_RAW + 12 + L2_P + L2_Q); + memset(inout + sizeof (SYNCPATTERN), 0, 4 + L2_RAW + 12 + L2_P + L2_Q); build_address(inout, sectortype, address); return (0); } @@ -334,10 +342,12 @@ Q = inout + L1_RAW/2; memset(Q, 0, L1_Q); - for (i = 0; i < L1_RAW + L1_Q; i++) { + for (i = 0; i < L1_RAW; i++) { unsigned char data; - if (i == L1_RAW/2) i += L1_Q; + if (i == L1_RAW/2) { + inout += L1_Q; + } data = inout[i]; if (data != 0) { unsigned char base = rs_l12_log[data]; @@ -363,7 +373,7 @@ P = inout + L1_RAW + L1_Q; memset(P, 0, L1_P); - for (i = 0; i < L2_RAW + L2_Q + L2_P; i++) { + for (i = 0; i < L1_RAW + L1_Q + L1_P; i++) { unsigned char data; data = inout[i]; @@ -379,6 +389,8 @@ return (0); } +#ifdef MAIN /* Make public (non-static) if completely implemented */ + static int decode_L1_Q __PR((unsigned char inout[L1_RAW + L1_Q])); static int @@ -396,6 +408,7 @@ { return (0); } +#endif /* MAIN */ int decode_L2_Q __PR((unsigned char inout[4 + L2_RAW + 12 + L2_Q])); @@ -482,7 +495,7 @@ int i; memset(Q, 0, LSUB_Q); - for (i = LSUB_QRAW + LSUB_Q -1; i>=0; i--) { + for (i = LSUB_QRAW + LSUB_Q -1; i >= 0; i--) { unsigned char data; data = inout[LSUB_QRAW + LSUB_Q -1 -i] & 0x3f; @@ -506,7 +519,7 @@ int i; memset(P, 0, LSUB_P); - for (i = LSUB_RAW + LSUB_Q + LSUB_P-1; i>=0; i--) { + for (i = LSUB_RAW + LSUB_Q + LSUB_P-1; i >= 0; i--) { unsigned char data; data = inout[LSUB_RAW + LSUB_Q + LSUB_P -1 -i] & 0x3f; @@ -523,11 +536,11 @@ } /* Layer 1 CIRC en/decoder */ -#define MAX_L1_DEL1 2 +#define MAX_L1_DEL1 2 static unsigned char l1_delay_line1[MAX_L1_DEL1][L1_RAW]; -#define MAX_L1_DEL2 108 +#define MAX_L1_DEL2 108 static unsigned char l1_delay_line2[MAX_L1_DEL2][L1_RAW+L1_Q]; -#define MAX_L1_DEL3 1 +#define MAX_L1_DEL3 1 static unsigned char l1_delay_line3[MAX_L1_DEL3][L1_RAW+L1_Q+L1_P]; static unsigned l1_del_index; @@ -535,7 +548,8 @@ unsigned char out[(L1_RAW+L1_Q+L1_P)*FRAMES_PER_SECTOR], int delay1, int delay2, int delay3, int permute)); -int do_encode_L1(in, out, delay1, delay2, delay3, permute) +int +do_encode_L1(in, out, delay1, delay2, delay3, permute) unsigned char in[L1_RAW*FRAMES_PER_SECTOR]; unsigned char out[(L1_RAW+L1_Q+L1_P)*FRAMES_PER_SECTOR]; int delay1; @@ -616,12 +630,9 @@ return (0); } -static -int do_decode_L1 __PR((unsigned char in[(L1_RAW+L1_Q+L1_P)*FRAMES_PER_SECTOR], - unsigned char out[L1_RAW*FRAMES_PER_SECTOR], - int delay1, int delay2, int delay3, int permute)); +#ifdef MAIN /* Make public (non-static) if completely implemented */ -static /* XXX should be non static XXX*/ +static /* XXX should be non static XXX*/ int do_decode_L1(in, out, delay1, delay2, delay3, permute) @@ -705,9 +716,6 @@ return (0); } -static int do_decode_L2 __PR((unsigned char in[(L2_RAW+L2_Q+L2_P)], - unsigned char out[L2_RAW])); - static int do_decode_L2(in, out) unsigned char in[(L2_RAW+L2_Q+L2_P)]; @@ -715,10 +723,10 @@ { return (0); } +#endif /* MAIN */ - -#define MAX_SUB_DEL 8 +#define MAX_SUB_DEL 8 static unsigned char sub_delay_line[MAX_SUB_DEL][LSUB_RAW+LSUB_Q+LSUB_P]; static unsigned sub_del_index; @@ -737,7 +745,8 @@ { int i; - if (in == out) return -1; + if (in == out) + return (-1); for (i = 0; i < PACKETS_PER_SUBCHANNELFRAME; i++) { int j; @@ -775,13 +784,13 @@ return (0); } -int +int do_decode_sub __PR(( unsigned char in[(LSUB_RAW+LSUB_Q+LSUB_P)*PACKETS_PER_SUBCHANNELFRAME], unsigned char out[LSUB_RAW*PACKETS_PER_SUBCHANNELFRAME], int delay1, int permute)); -int +int do_decode_sub(in, out, delay1, permute) unsigned char in[(LSUB_RAW+LSUB_Q+LSUB_P)*PACKETS_PER_SUBCHANNELFRAME]; unsigned char out[LSUB_RAW*PACKETS_PER_SUBCHANNELFRAME]; @@ -790,7 +799,8 @@ { int i; - if (in == out) return -1; + if (in == out) + return (-1); for (i = 0; i < PACKETS_PER_SUBCHANNELFRAME; i++) { int j; @@ -846,7 +856,7 @@ set_sector_type(st) int st; { - switch(st) { + switch (st) { case MODE_0: case MODE_1: @@ -854,22 +864,22 @@ case MODE_2_FORM_1: case MODE_2_FORM_2: sectortype = st; - return 0; + return (0); default: - return -1; + return (-1); } } /* ------------- --------------*/ #ifdef MAIN -#define DO_L1 1 -#define DO_L2 2 -#define DO_SUB 4 +#define DO_L1 1 +#define DO_L2 2 +#define DO_SUB 4 static const unsigned sect_size[8][2] = { /* nothing */ -{0,0}, +{0, 0}, /* Layer 1 decode/encode */ { (L1_RAW+L1_Q+L1_P)*FRAMES_PER_SECTOR, L1_RAW*FRAMES_PER_SECTOR}, /* Layer 2 decode/encode */ @@ -878,25 +888,25 @@ { (L1_RAW+L1_Q+L1_P)*FRAMES_PER_SECTOR, L1_RAW*FRAMES_PER_SECTOR}, /* Subchannel decode/encode */ { (LSUB_RAW+LSUB_Q+LSUB_P)*PACKETS_PER_SUBCHANNELFRAME, - LSUB_RAW*PACKETS_PER_SUBCHANNELFRAME}, + LSUB_RAW*PACKETS_PER_SUBCHANNELFRAME}, /* Layer 1 and subchannel decode/encode */ { (L1_RAW+L1_Q+L1_P)*FRAMES_PER_SECTOR + - (LSUB_RAW+LSUB_Q+LSUB_P)*PACKETS_PER_SUBCHANNELFRAME, - LSUB_RAW*PACKETS_PER_SUBCHANNELFRAME + - L1_RAW*FRAMES_PER_SECTOR}, + (LSUB_RAW+LSUB_Q+LSUB_P)*PACKETS_PER_SUBCHANNELFRAME, + LSUB_RAW*PACKETS_PER_SUBCHANNELFRAME + + L1_RAW*FRAMES_PER_SECTOR}, /* Layer 2 and subchannel decode/encode */ -{ L2_RAW+L2_Q+L2_P+ - (LSUB_RAW+LSUB_Q+LSUB_P)*PACKETS_PER_SUBCHANNELFRAME, - LSUB_RAW*PACKETS_PER_SUBCHANNELFRAME + - L2_RAW}, +{ L2_RAW+L2_Q+L2_P + + (LSUB_RAW+LSUB_Q+LSUB_P)*PACKETS_PER_SUBCHANNELFRAME, + LSUB_RAW*PACKETS_PER_SUBCHANNELFRAME + + L2_RAW}, /* Layer 1, 2 and subchannel decode/encode */ { (L1_RAW+L1_Q+L1_P)*FRAMES_PER_SECTOR + - (LSUB_RAW+LSUB_Q+LSUB_P)*PACKETS_PER_SUBCHANNELFRAME, - LSUB_RAW*PACKETS_PER_SUBCHANNELFRAME + - L1_RAW*FRAMES_PER_SECTOR}, + (LSUB_RAW+LSUB_Q+LSUB_P)*PACKETS_PER_SUBCHANNELFRAME, + LSUB_RAW*PACKETS_PER_SUBCHANNELFRAME + + L1_RAW*FRAMES_PER_SECTOR}, }; -int main __PR(((int argc, char **argv)); +int main __PR((int argc, char **argv)); int main(argc, argv) @@ -927,7 +937,7 @@ infp = fopen("sectors_in", "rb"); outfp = fopen("sectors_out", "wb"); - sectortype= MODE_1; + sectortype = MODE_1; address = 0 + 75*2; switch (sectortype) { @@ -943,7 +953,7 @@ default: load_offset = 0; } - while(1) { + while (1) { if (1 != fread(inbuf+load_offset, sect_size[mask][encode], 1, infp)) { @@ -960,27 +970,27 @@ break; case MODE_2: if (1 != - fread(inbuf+load_offset+ + fread(inbuf+load_offset+ sect_size[mask][encode], - 2336 - sect_size[mask][encode], + 2336 - sect_size[mask][encode], 1, infp)) { perror(""); break; } break; case MODE_2_FORM_1: break; case MODE_2_FORM_2: if (1 != - fread(inbuf+load_offset+ + fread(inbuf+load_offset+ sect_size[mask][encode], - 2324 - sect_size[mask][encode], + 2324 - sect_size[mask][encode], 1, infp)) { perror(""); break; } break; default: if (1 != - fread(inbuf+load_offset+ + fread(inbuf+load_offset+ sect_size[mask][encode], - 2448 - sect_size[mask][encode], + 2448 - sect_size[mask][encode], 1, infp)) { perror(""); break; } - memset(inbuf,0,16); + memset(inbuf, 0, 16); /*memset(inbuf+16+2048,0,12+272);*/ break; } @@ -992,7 +1002,7 @@ sub_outbuf = l2_outbuf + 12 + 4+ L2_RAW+4+ 8+ L2_Q+L2_P; } if (mask & DO_L1) { - do_encode_L1(l1_inbuf, l1_outbuf,1,1,1,1); + do_encode_L1(l1_inbuf, l1_outbuf, 1, 1, 1, 1); last_outbuf = l1_outbuf; sub_inbuf = l1_inbuf + L1_RAW*FRAMES_PER_SECTOR; sub_outbuf = l1_outbuf + (L1_RAW+L1_Q+L1_P)*FRAMES_PER_SECTOR; @@ -1002,7 +1012,7 @@ } } else { if (mask & DO_L1) { - do_decode_L1(l1_inbuf, l1_outbuf,1,1,1,1); + do_decode_L1(l1_inbuf, l1_outbuf, 1, 1, 1, 1); last_outbuf = l2_inbuf = l1_outbuf; l2_outbuf = l1_inbuf; sub_inbuf = l1_inbuf + (L1_RAW+L1_Q+L1_P)*FRAMES_PER_SECTOR; @@ -1027,6 +1037,9 @@ #if 0 /* flush the data from the delay lines with zeroed sectors, if necessary */ #endif + fclose(infp); + fclose(outfp); + return (0); } #endif diff -Nru cdrtools-2.01.01a33/libedc/edc_ecc_dec.c cdrtools-3.02a09/libedc/edc_ecc_dec.c --- cdrtools-2.01.01a33/libedc/edc_ecc_dec.c 2007-07-28 15:16:35.000000000 +0000 +++ cdrtools-3.02a09/libedc/edc_ecc_dec.c 2016-03-31 22:14:38.000000000 +0000 @@ -1,7 +1,8 @@ -/* @(#)edc_ecc_dec.c 1.5 07/07/28 Copyright 1998-2001 Heiko Eissfeldt */ +/* @(#)edc_ecc_dec.c 1.14 16/04/01 Copyright 1998-2001 Heiko Eissfeldt, Copyright 2006-2013 J. Schilling */ +#include #ifndef lint -static char sccsid[] = - "@(#)edc_ecc_dec.c 1.5 07/07/28 Copyright 1998-2001 Heiko Eissfeldt"; +static UConst char sccsid[] = + "@(#)edc_ecc_dec.c 1.14 16/04/01 Copyright 1998-2001 Heiko Eissfeldt, Copyright 2006-2013 J. Schilling"; #endif /* @@ -10,35 +11,26 @@ * reed-solomon encoder / decoder for compact discs. * * Copyright 1998-2001 by Heiko Eissfeldt + * Copyright 2006-2013 by Joerg Schilling */ -/* - * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. - * - * See the file CDDL.Schily.txt in this distribution for details. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file CDDL.Schily.txt from this distribution. - */ +/*@@C@@*/ -#include -#include +#include #include #include #include #include -#define EDC_DECODER_HACK /* Hack to allow using edc.h with ecc.h */ -#define EDC_DECODER -#define EDC_SUBCHANNEL -#define EDC_LAYER2 +#define EDC_DECODER_HACK /* Hack to allow using edc.h with ecc.h */ +#define EDC_DECODER +#define EDC_SUBCHANNEL +#define EDC_LAYER2 #include "edc.h" #ifndef HAVE_MEMMOVE +#include /* Define missing prototypes */ /*#define memmove(dst, src, size) movebytes((src), (dst), (size))*/ -#define memmove(d, s, n) bcopy ((s), (d), (n)) +#define memmove(d, s, n) bcopy((s), (d), (n)) #endif #include "edc_code_tables" @@ -55,37 +47,37 @@ /* macros for high level functionality */ /* initialize the Berlekamp-Massey decoder */ -#define INIT_BMD \ - memset(err_locations, 0, sizeof(err_locations)); \ - memset(err_values, 0, sizeof(err_values)); \ - memset(tmp_loc, 0, sizeof(tmp_loc)); \ - err_locations[0] = 1; \ +#define INIT_BMD \ + memset(err_locations, 0, sizeof (err_locations)); \ + memset(err_values, 0, sizeof (err_values)); \ + memset(tmp_loc, 0, sizeof (tmp_loc)); \ + err_locations[0] = 1; \ err_values[0] = 1; /* create an error location polynomial from given erasures. */ -#define INIT_ERASURES(ERAS, ERRORS, MODUL, LOG, ALOG) \ - err_locations[1] = ALOG[MODUL - (ERAS[0]+1)]; \ - for (i = 1; i < min(erasures, ERRORS*2); i++) { \ +#define INIT_ERASURES(ERAS, ERRORS, MODUL, LOG, ALOG) \ + err_locations[1] = ALOG[MODUL - (ERAS[0]+1)]; \ + for (i = 1; i < min(erasures, ERRORS*2); i++) { \ for (j = i+1; j > 0; j--) { \ if (err_locations[j - 1] != 0) { \ - err_locations[j] ^= ALOG[ \ - LOG[err_locations[j - 1]] \ - + MODUL - (ERAS[i]+1)]; \ - } \ - } \ + err_locations[j] ^= ALOG[ \ + LOG[err_locations[j - 1]] \ + + MODUL - (ERAS[i]+1)]; \ + } \ + } \ } /* the condition for ignoring this root */ -#define FIND_ROOTS_TABOO(SECTORMACRO, UNIT, SKIPPED) \ - ((SECTORMACRO(UNIT,(i-SKIPPED))) >= low_taboo && \ - (SECTORMACRO(UNIT,(i-SKIPPED))) <= high_taboo) +#define FIND_ROOTS_TABOO(SECTORMACRO, UNIT, SKIPPED) \ + ((SECTORMACRO(UNIT, (i-SKIPPED))) >= low_taboo && \ + (SECTORMACRO(UNIT, (i-SKIPPED))) <= high_taboo) /* debugging code for the error location polynomial. */ -#define DEBUG_ERASURE_POLY(LOG, ALOG, MODUL, ERRORS, SKIPPED, TABOO) \ - if (DEBUG>4) { \ +#define DEBUG_ERASURE_POLY(LOG, ALOG, MODUL, ERRORS, SKIPPED, TABOO) \ + if (DEBUG > 4) { \ fprintf(stderr, " Errloc coeff.: "); \ for (i = 0; i <= min(erasures, ERRORS); i++) { \ - fprintf(stderr, "%d (%d), ",err_locations[i], LOG[err_locations[i]]); \ + fprintf(stderr, "%d (%d), ", err_locations[i], LOG[err_locations[i]]); \ } \ fprintf(stderr, "\n"); \ } \ @@ -103,13 +95,13 @@ } \ if (pval != 0) continue; \ roots_found++; \ - if (DEBUG>4) fprintf(stderr, "root at %d\n", i - SKIPPED); \ + if (DEBUG > 4) fprintf(stderr, "root at %d\n", i - SKIPPED); \ } \ if (min(erasures, ERRORS*2) != roots_found) \ - fprintf(stderr, "error location poly is wrong erasures=%d, roots=%d\n",erasures,roots_found); + fprintf(stderr, "error location poly is wrong erasures=%d, roots=%d\n", erasures, roots_found); /* calculate the 'discrepancy' in the Berlekmap-Massey decoder. */ -#define CALC_DISCREPANCY(LOG, ALOG) \ +#define CALC_DISCREPANCY(LOG, ALOG) \ discrepancy = SYND(j); \ for (i = 1; i <= j; i++) { \ if (err_locations[i] == 0 || SYND(j-i) == 0) \ @@ -120,46 +112,46 @@ } /* build a stage of the shift register. */ -#define BUILD_SHIFT_REGISTER(LOG, ALOG, MODUL, ERRORS) \ +#define BUILD_SHIFT_REGISTER(LOG, ALOG, MODUL, ERRORS) \ int ld = LOG[discrepancy]; \ if (l+l <= j + erasures) { \ /* \ * complex case \ * err_locations and tmp_loc needs to be changed \ */ \ - unsigned char tmp_errl[2*ERRORS]; \ - int lnd = MODUL - ld; \ - /* \ - * change shift register length \ - */ \ - memcpy(tmp_errl, err_locations+k, l); \ - for (i = 0; i < k + l; i++) { \ - int c=err_locations[i]; \ - if (i < l) { \ - int e=tmp_loc[i]; \ + unsigned char tmp_errl[2*ERRORS+1]; \ + int lnd = MODUL - ld; \ + /* \ + * change shift register length \ + */ \ + memcpy(tmp_errl, err_locations+k, l); \ + for (i = 0; i < k + l; i++) { \ + int c = err_locations[i]; \ + if (i < l) { \ + int e = tmp_loc[i]; \ if (e != 0) \ tmp_errl[i] ^= ALOG[ LOG[e] + ld]; \ - } \ - if (c != 0) \ + } \ + if (c != 0) \ tmp_loc[i] = ALOG[LOG[c] + lnd]; \ - else \ - tmp_loc[i] = 0; \ - } \ - memcpy(err_locations+k, tmp_errl, l); \ - l = j - l + erasures + 1; \ - k = 0; \ - } else { \ - /* \ - * increase order of shift register \ - */ \ - for (i = k; i < k + l; i++) { \ - if (tmp_loc[i-k] != 0) \ + else \ + tmp_loc[i] = 0; \ + } \ + memcpy(err_locations+k, tmp_errl, l); \ + l = j - l + erasures + 1; \ + k = 0; \ + } else { \ + /* \ + * increase order of shift register \ + */ \ + for (i = k; i < k + l; i++) { \ + if (tmp_loc[i-k] != 0) \ err_locations[i] ^= ALOG[ LOG[tmp_loc[i-k]] + ld]; \ - } \ + } \ } /* do a chien search to find roots of the error location polynomial. */ -#define FIND_ROOTS(LOG, ALOG, MODUL, ERRORS, SKIPPED, TABOOMACRO) \ +#define FIND_ROOTS(LOG, ALOG, MODUL, ERRORS, SKIPPED, TABOOMACRO) \ for (roots_found = 0, i = SKIPPED; i < MODUL; i++) { \ unsigned pval; \ if (TABOOMACRO) { \ @@ -178,7 +170,7 @@ roots[roots_found] = (unsigned char)i; \ } \ roots_found++; \ -if (DEBUG>3) fprintf(stderr, "%d. root=%d\t", roots_found, i - SKIPPED); \ +if (DEBUG > 3) fprintf(stderr, "%d. root=%d\t", roots_found, i - SKIPPED); \ } \ } @@ -192,18 +184,20 @@ } \ } -/* do the correction in the 'msb' part of the p layer - at column 'column' and row 'i' - with an error of 'ERROR' */ +/* + * do the correction in the 'msb' part of the p layer + * at column 'column' and row 'i' + * with an error of 'ERROR' + */ #define DO_L2_P_CORRECTION(ERROR, SKIPPED) \ { \ unsigned position; \ unsigned dia; \ - position = SECBPL(column,i-SKIPPED); \ - assert (position < 2352-12); \ + position = SECBPL(column, i-SKIPPED); \ + assert(position < 2352-12); \ if (NO_DECODING_FAILURES) { \ - if (gdp->global_erasures != NULL \ - && gdp->global_erasures[position+msb] == 0) return 1; \ + if (gdp->global_erasures != NULL &&\ + gdp->global_erasures[position+msb] == 0) return (1); \ } \ dia = DIALO(position/2); \ if (STOP_FAILURE) { \ @@ -211,39 +205,41 @@ gdp->Pcorrcount[msb][dia] == 0 && \ gdp->corrcount[position+msb] == 0) { \ calc_L2_Q_syndrome(inout-msb, dia, &gdp->Qsyndromes[2*dia]); \ - if (gdp->Qsyndromes[2*dia+msb] == 0 \ - && gdp->Qsyndromes[2*dia+msb+L2_Q/2] == 0) { \ + if (gdp->Qsyndromes[2*dia+msb] == 0 &&\ + gdp->Qsyndromes[2*dia+msb+L2_Q/2] == 0) { \ /* probably a decoding failure */ \ if (TELLME) { \ - fprintf(stderr, "FAILURE (@%d) Dia %d is clean\n",position+12+msb, dia); \ + fprintf(stderr, "FAILURE (@%d) Dia %d is clean\n", position+12+msb, dia); \ } \ - return 1; \ + return (1); \ } \ } \ } \ if (gdp->corrcount[position+msb] < MAX_TOGGLE) { \ inout[position] ^= (unsigned char)ERROR; \ - if (DEBUG>1) { \ + if (DEBUG > 1) { \ fprintf(stderr, "\t-%d-", 12+position + msb); \ } \ gdp->corrcount[position+msb]++; \ gdp->Pcorrcount[msb][column]++; \ kill_erasure(position, msb, gdp); \ if (loops != 0) check_P_for_decoding_failures(gdp->Qsyndromes, msb, position/2, gdp); \ - } else return 1; \ + } else return (1); \ } -/* do the correction in the 'msb' part of the q layer - at diagonal 'diagonal' and offset 'i' - with an error of 'ERROR' */ +/* + * do the correction in the 'msb' part of the q layer + * at diagonal 'diagonal' and offset 'i' + * with an error of 'ERROR' + */ #define DO_L2_Q_CORRECTION(ERROR, SKIPPED) \ { \ unsigned position; \ - position = SECBQL(diagonal,i-SKIPPED); \ - assert (position < 2352-12); \ + position = SECBQL(diagonal, i-SKIPPED); \ + assert(position < 2352-12); \ if (NO_DECODING_FAILURES) { \ - if (gdp->global_erasures != NULL \ - && gdp->global_erasures[position+msb] == 0) return 1; \ + if (gdp->global_erasures != NULL &&\ + gdp->global_erasures[position+msb] == 0) return (1); \ } \ if (STOP_FAILURE2) { \ if (position < 2236) { \ @@ -253,13 +249,15 @@ (gdp->Pcorrcount[msb][col] == 0 && \ gdp->corrcount[position+msb] > 0)) { \ calc_L2_P_syndrome(inout-msb, col, &gdp->Psyndromes[2*col]); \ - if (gdp->Psyndromes[2*col+msb] == 0 \ - && gdp->Psyndromes[2*col+msb+L2_P/2] == 0) { \ - /* probably a decoding failure */ \ - if (TELLME) { \ - fprintf(stderr, "FAILURE (@%d) col %d is clean\n",position+12+msb, col); \ - } \ - return 1; \ + if (gdp->Psyndromes[2*col+msb] == 0 &&\ + gdp->Psyndromes[2*col+msb+L2_P/2] == 0) { \ + /* probably a decoding failure */ \ + if (TELLME) { \ + fprintf(stderr, \ + "FAILURE (@%d) col %d is clean\n", \ + position+12+msb, col); \ + } \ + return (1); \ } \ } \ } \ @@ -268,34 +266,38 @@ inout[position] ^= (unsigned char)ERROR; \ gdp->corrcount[position+msb]++; \ gdp->Qcorrcount[msb][diagonal]++; \ - if (DEBUG>1) { \ + if (DEBUG > 1) { \ fprintf(stderr, "\t-%d-", 12+position + msb); \ } \ kill_erasure(position, msb, gdp); \ if (i-SKIPPED < L12_P_LENGTH) *q_changed_p = 1; \ check_Q_for_decoding_failures(gdp->Psyndromes, msb, position/2, gdp); \ - } else return 1; \ + } else return (1); \ } -/* do the correction in one of the subchannel layers - at offset 'i' - with an error of 'ERROR' */ -#define DO_SUB_CORRECTION(ERROR, SKIPPED) \ +/* + * do the correction in one of the subchannel layers + * at offset 'i' + * with an error of 'ERROR' + */ +#define DO_SUB_CORRECTION(ERROR, SKIPPED) \ { \ unsigned position; \ position = (i-SKIPPED); \ - if (DEBUG>1) \ + if (DEBUG > 1) \ fprintf(stderr, \ - "Position %d=0x%x has error 0x%x giving 0x%x\n", \ - position, inout[position], ERROR, \ - inout[position] ^ ERROR); \ + "Position %d=0x%x has error 0x%x giving 0x%x\n", \ + position, inout[position], ERROR, \ + inout[position] ^ ERROR); \ inout[position] ^= (unsigned char)ERROR; \ } -/* apply the forney algorithm on error valuator and error location - * polynomial in order to do the corrections. */ -#define APPLY_FORNEY_ALGORITHM(LOG, ALOG, MODUL, SKIPPED, DO_CORRECTION) \ +/* + * apply the forney algorithm on error valuator and error location + * polynomial in order to do the corrections. + */ +#define APPLY_FORNEY_ALGORITHM(LOG, ALOG, MODUL, SKIPPED, DO_CORRECTION) \ for (j = 0; j < roots_found; j++) { \ /* \ * root in error location polynomial is found! \ @@ -322,7 +324,7 @@ if (k == 0) \ break; \ } \ - assert (denominator != 0); \ + assert(denominator != 0); \ error = ALOG[(MODUL - LOG[denominator] + LOG[numerator]) % MODUL]; \ DO_CORRECTION(error, SKIPPED) \ } else { \ @@ -349,7 +351,9 @@ #define THOROUGH 1 #if THOROUGH +#ifndef MAXLOOPS #define MAXLOOPS 15 +#endif #else #define MAXLOOPS 1 #endif @@ -435,18 +439,18 @@ loops = 1; break; default: - return 0; + return (0); } result = build_edc(inout, low, high); if (loops == 0 && result == 0 && gdp->global_erasures != NULL) { unsigned i; /* kill all erasures for this range */ - for (i = max(low,12)-12; i <= high-12; i++) { + for (i = max(low, 12)-12; i <= high-12; i++) { if (gdp->global_erasures[i] == 1) kill_erasure(i, i & 1, gdp); } } - return result == 0; /* failed, if result != 0 */ + return (result == 0); /* failed, if result != 0 */ } @@ -464,11 +468,12 @@ * */ int crc_check __PR((unsigned char inout[(L2_RAW + L2_Q + L2_P)], int type)); -int crc_check(inout, type) +int +crc_check(inout, type) unsigned char inout[(L2_RAW + L2_Q + L2_P)]; int type; { - return do_crc_check(inout, type, 1, NULL); + return (do_crc_check(inout, type, 1, NULL)); } /******************* SYNDROM FUNCTIONS ************************/ @@ -500,45 +505,45 @@ unsigned diagonal; unsigned char syndrome[L2_Q/2+2]; { - register unsigned dp0,dp1; - register const unsigned short *qa; - register unsigned char *Q; + register unsigned dp0, dp1; + register const unsigned short *qa; + register unsigned char *Q; qa = &qacc[diagonal][44]; - Q = syndrome; + Q = syndrome; Q[0] = Q[2*L12_Q_LENGTH] = 0; Q[1] = Q[2*L12_Q_LENGTH+1] = 0; -#define QBODYEND(i) \ - dp0 = inout[*qa]; \ - dp1 = inout[*qa+1]; \ - \ +#define QBODYEND(i) \ + dp0 = inout[*qa]; \ + dp1 = inout[*qa+1]; \ + \ *Q++ ^= (unsigned char)dp0; \ *Q ^= (unsigned char)dp1; \ - Q += 26*2-1; \ - *Q++ ^= L2syn[i][dp0]; \ + Q += 26*2-1; \ + *Q++ ^= L2syn[i][dp0]; \ *Q ^= L2syn[i][dp1]; -#define QBODY(i) \ +#define QBODY(i) \ QBODYEND(i) \ qa--; \ Q -= 26*2+1; - QBODY( 0);QBODY( 1); QBODY( 2); QBODY( 3); QBODY( 4); - QBODY( 5);QBODY( 6); QBODY( 7); QBODY( 8); QBODY( 9); - QBODY(10);QBODY(11); QBODY(12); QBODY(13); QBODY(14); - QBODY(15);QBODY(16); QBODY(17); QBODY(18); QBODY(19); - QBODY(20);QBODY(21); QBODY(22); QBODY(23); QBODY(24); - QBODY(25);QBODY(26); QBODY(27); QBODY(28); QBODY(29); - QBODY(30);QBODY(31); QBODY(32); QBODY(33); QBODY(34); - QBODY(35);QBODY(36); QBODY(37); QBODY(38); QBODY(39); - QBODY(40);QBODY(41); QBODY(42); QBODY(43); QBODYEND(44); + QBODY(0); QBODY(1); QBODY(2); QBODY(3); QBODY(4); + QBODY(5); QBODY(6); QBODY(7); QBODY(8); QBODY(9); + QBODY(10); QBODY(11); QBODY(12); QBODY(13); QBODY(14); + QBODY(15); QBODY(16); QBODY(17); QBODY(18); QBODY(19); + QBODY(20); QBODY(21); QBODY(22); QBODY(23); QBODY(24); + QBODY(25); QBODY(26); QBODY(27); QBODY(28); QBODY(29); + QBODY(30); QBODY(31); QBODY(32); QBODY(33); QBODY(34); + QBODY(35); QBODY(36); QBODY(37); QBODY(38); QBODY(39); + QBODY(40); QBODY(41); QBODY(42); QBODY(43); QBODYEND(44); #undef QBODY #undef QBODYEND - return 0 == syndrome[0] - && 0 == syndrome[1] - && 0 == syndrome[0 + L12_Q_LENGTH * 2] - && 0 == syndrome[1 + L12_Q_LENGTH * 2]; + return (0 == syndrome[0] && + 0 == syndrome[1] && + 0 == syndrome[0 + L12_Q_LENGTH * 2] && + 0 == syndrome[1 + L12_Q_LENGTH * 2]); } /* @@ -567,40 +572,40 @@ unsigned column; unsigned char syndrome[L2_P/2+2]; { - register unsigned char *P; - register unsigned dp0, dp1; + register unsigned char *P; + register unsigned dp0, dp1; - P = syndrome; - P[0] = P[1] = P[L12_P_LENGTH*2] = P[1+L12_P_LENGTH*2] = 0; - inout += 2*column + (L12_Q_LENGTH-1)*L12_P_LENGTH*2 + 1; - -#define PBODYEND(i) \ - dp1 = *inout--; \ - dp0 = *inout; \ - \ - *P++ ^= (unsigned char)dp0;\ - *P ^= (unsigned char)dp1;\ - P += L12_P_LENGTH*2-1;\ - *P++ ^= L2syn[i][dp0];\ - *P ^= L2syn[i][dp1]; - -#define PBODY(i) \ - PBODYEND(i) \ - inout -= L12_P_LENGTH*2-1;\ - P -= L12_P_LENGTH*2+1; + P = syndrome; + P[0] = P[1] = P[L12_P_LENGTH*2] = P[1+L12_P_LENGTH*2] = 0; + inout += 2*column + (L12_Q_LENGTH-1)*L12_P_LENGTH*2 + 1; + +#define PBODYEND(i) \ + dp1 = *inout--; \ + dp0 = *inout; \ + \ + *P++ ^= (unsigned char)dp0; \ + *P ^= (unsigned char)dp1; \ + P += L12_P_LENGTH*2-1; \ + *P++ ^= L2syn[i][dp0]; \ + *P ^= L2syn[i][dp1]; + +#define PBODY(i) \ + PBODYEND(i) \ + inout -= L12_P_LENGTH*2-1; \ + P -= L12_P_LENGTH*2+1; - PBODY( 0) PBODY( 1) PBODY( 2) PBODY( 3) PBODY( 4) - PBODY( 5) PBODY( 6) PBODY( 7) PBODY( 8) PBODY( 9) + PBODY(0) PBODY(1) PBODY(2) PBODY(3) PBODY(4) + PBODY(5) PBODY(6) PBODY(7) PBODY(8) PBODY(9) PBODY(10) PBODY(11) PBODY(12) PBODY(13) PBODY(14) PBODY(15) PBODY(16) PBODY(17) PBODY(18) PBODY(19) PBODY(20) PBODY(21) PBODY(22) PBODY(23) PBODY(24) PBODYEND(25) #undef PBODY #undef PBODYEND - return 0 == syndrome[0] - && 0 == syndrome[1] - && 0 == syndrome[0 + L12_P_LENGTH * 2] - && 0 == syndrome[1 + L12_P_LENGTH * 2]; + return (0 == syndrome[0] && + 0 == syndrome[1] && + 0 == syndrome[0 + L12_P_LENGTH * 2] && + 0 == syndrome[1 + L12_P_LENGTH * 2]); } @@ -609,7 +614,7 @@ * * Input parameters: * position: even offset in the sector after the sync header. - * msb: 1 for the most significant byte. + * msb: 1 for the most significant byte. * 0 for the least significant byte. * gdp: pointer to auxiliary structure. */ @@ -641,7 +646,7 @@ if (k == gdp->Pcount[msb][col]) gdp->Perapos[msb][col][gdp->Pcount[msb][col]++] = (unsigned char)cpos; -#if DEBUG >=0 +#if DEBUG >= 0 fprintf(stderr, "\t+%d(c%u,d%u)", position+12+msb, col, dia); if (gdp->global_erasures[position+msb] == 0) fprintf(stderr, "??"); } else { @@ -670,33 +675,34 @@ * * Input parameters: * position: even offset in the sector after the sync header. - * msb: 1 for the most significant byte. + * msb: 1 for the most significant byte. * 0 for the least significant byte. * gdp is a pointer to auxiliary book keeping data. */ static void -kill_erasure (position, msb, gdp) +kill_erasure(position, msb, gdp) unsigned position; unsigned msb; gdatp gdp; { - unsigned i,j; + unsigned i, j; unsigned dia; unsigned pos; unsigned col; unsigned char *p, *q; - if (gdp->global_erasures==NULL) return; + if (gdp->global_erasures == NULL) + return; -#if DEBUG>=7 - if(global_erasures[position + msb] == 0) { +#if DEBUG >= 7 + if (global_erasures[position + msb] == 0) { fprintf(stderr, "=0 +#if DEBUG >= 0 /* is the erasure really defined once? */ if (position < 2*L12_P_LENGTH*L12_Q_LENGTH) { col = COL(position/2); @@ -706,8 +712,8 @@ if (*p == pos + L12_P_SKIPPED) { dia++; } - if (dia > 1) - fprintf(stderr, "\nkill:P position %d %d times, count=%d!\n",position+12+msb,dia,gdp->Pcount[msb][col]); + if (dia > 1) + fprintf(stderr, "\nkill:P position %d %d times, count=%d!\n", position+12+msb, dia, gdp->Pcount[msb][col]); } dia = DIA(position/2); pos = POSQ(position/2); @@ -716,8 +722,8 @@ if (*q == pos + L12_Q_SKIPPED) { col++; } - if (col > 1) - fprintf(stderr, "\nkill:Q position %d %d times!\n",position+12+msb,col); + if (col > 1) + fprintf(stderr, "\nkill:Q position %d %d times!\n", position+12+msb, col); #endif gdp->global_erasures[position+msb] ^= 1; @@ -734,7 +740,7 @@ if (j > 1) memmove(p, p+1, j-1); else if (j == 1) - *p=0; + *p = 0; if (gdp->Pcount[msb][col] > 0) gdp->Pcount[msb][col]--; @@ -749,24 +755,24 @@ if (i > 1) memmove(q, q+1, i-1); else if (i == 1) - *q=0; + *q = 0; if (gdp->Qcount[msb][dia] > 0) gdp->Qcount[msb][dia]--; -#if DEBUG >=0 +#if DEBUG >= 0 /* has the erasure really been deleted? */ pos = POSP(position/2); p = gdp->Perapos[msb][col]; for (j = gdp->Pcount[msb][col]; j > 0; j--, p++) if (*p == pos + L12_P_SKIPPED) { - fprintf(stderr, "\nkill_era: error in p (pos=%d,dia=%d,col=%d)!\n",position+12+msb,dia,col); + fprintf(stderr, "\nkill_era: error in p (pos=%d,dia=%d,col=%d)!\n", position+12+msb, dia, col); } pos = POSQ(position/2); q = gdp->Qerapos[msb][dia]; for (i = gdp->Qcount[msb][dia]; i > 0; i--, q++) if (*q == pos + L12_Q_SKIPPED) { - fprintf(stderr, "\nkill_era: error in q (pos=%d,dia=%d,col=%d)!\n",position+12+msb,dia,col); + fprintf(stderr, "\nkill_era: error in q (pos=%d,dia=%d,col=%d)!\n", position+12+msb, dia, col); } #endif } @@ -776,7 +782,7 @@ * translate the erasures in p and q coordinates. * * Input parameters: - * have_erasures: the number of erasures + * have_erasures: the number of erasures * set in the erasures array. * inout: the content of the data sector as a byte array * at offset 12. @@ -797,15 +803,16 @@ unsigned retval = 0; if (have_erasures != 0) - return 0; + return (0); - /* We assume the q layer has just been done. This possibly changed + /* + * We assume the q layer has just been done. This possibly changed * something, so we update the status for the p layer. */ for (i = 0; i < L2_P/4; i++) { unsigned char synd[L2_P]; - calc_L2_P_syndrome(inout,i,synd); + calc_L2_P_syndrome(inout, i, synd); if (synd[0] == 0 && synd[L2_P/2] == 0) { gdp->Pfailed[0][i] = 0; } @@ -847,7 +854,7 @@ } } #if DEBUG >= 0 - fprintf(stderr, " pc%d qc%d\n",pcounter, qcounter); + fprintf(stderr, " pc%d qc%d\n", pcounter, qcounter); #endif /* @@ -859,7 +866,7 @@ #if DEBUG >= 0 fprintf(stderr, "\n"); #endif - return 1; + return (1); } /* @@ -870,10 +877,10 @@ for (i = 0; i < L2_Q/4; i++) { if (gdp->Qfailed[msb][i] != 0) { if (gdp->global_erasures != NULL && - (gdp->global_erasures[SECBQL(i,L2_P/4)+msb] == 0 - || gdp->global_erasures[SECBQL(i,L2_P/4 + 1)+msb] == 0)) { - set_erasure(SECBQL(i,L2_P/4),msb, gdp); - set_erasure(SECBQL(i,L2_P/4 + 1),msb, gdp); + (gdp->global_erasures[SECBQL(i, L2_P/4)+msb] == 0 || + gdp->global_erasures[SECBQL(i, L2_P/4 + 1)+msb] == 0)) { + set_erasure(SECBQL(i, L2_P/4), msb, gdp); + set_erasure(SECBQL(i, L2_P/4 + 1), msb, gdp); retval = 1; } } @@ -885,10 +892,10 @@ if (gdp->Qfailed[msb][i] != 0) { for (j = 0; j < L2_P/4; j++) { if (gdp->Pfailed[msb][j] != 0) { - set_erasure(SECBQL(i,j)+msb, gdp); + set_erasure(SECBQL(i, j)+msb, gdp); retval = 1; #if DEBUG >= 0 - fprintf(stderr, " 2P%d\n",j); + fprintf(stderr, " 2P%d\n", j); #endif } } @@ -906,10 +913,10 @@ if (gdp->Pfailed[msb][i] != 0) { for (j = 0; j < L2_Q/4; j++) { if (gdp->Qfailed[msb][j] != 0) { - set_erasure(SECBQL(j,i),msb, gdp); + set_erasure(SECBQL(j, i), msb, gdp); retval = 1; #if DEBUG >= 0 - fprintf(stderr, " 2Q%d\n",j); + fprintf(stderr, " 2Q%d\n", j); #endif } } @@ -922,17 +929,19 @@ /* look for P status */ for (j = 0; j < L2_P/4; j++) { if (pcounter == 0) { - set_erasure(SECBQL(i,L2_P/4),msb, gdp); - set_erasure(SECBQL(i,L2_P/4 + 1),msb, gdp); + set_erasure(SECBQL(i, L2_P/4), msb, gdp); + set_erasure(SECBQL(i, L2_P/4 + 1), msb, gdp); break; #if 0 } else if (gdp->Pcount[msb][j] > 0 && - gdp->Pcount[msb][j] <= 2) { + gdp->Pcount[msb][j] <= 2) { int k; for (k = 0; k < gdp->Pcount[msb][j]; k++) { - set_erasure(SECBQL(i,gdp->Perapos[msb][j][k] - P_SKIPPED)+msb, gdp); + set_erasure(SECBQL(i, + gdp->Perapos[msb][j][k] - P_SKIPPED)+msb, + gdp); #if DEBUG >= 0 - fprintf(stderr, " P%d,%d ",j,k); + fprintf(stderr, " P%d,%d ", j, k); #endif } #endif @@ -945,14 +954,14 @@ #if DEBUG >= 0 fprintf(stderr, " ->%d\n", retval); #endif - return retval; + return (retval); } /* - * Initialize our seperated p and q erasure arrays. + * Initialize our separated p and q erasure arrays. * * Input parameters: - * have_erasures: the number of erasures + * have_erasures: the number of erasures * set in the erasures array. * erasures: the byte array for the erasures. Each byte * corresponds to a data byte in the L2 sector. @@ -969,10 +978,10 @@ { int i; - memset(gdp->Perapos, 0, sizeof(gdp->Perapos)); - memset(gdp->Qerapos, 0, sizeof(gdp->Qerapos)); - memset(gdp->Pcount, 0, sizeof(gdp->Pcount)); - memset(gdp->Qcount, 0, sizeof(gdp->Qcount)); + memset(gdp->Perapos, 0, sizeof (gdp->Perapos)); + memset(gdp->Qerapos, 0, sizeof (gdp->Qerapos)); + memset(gdp->Pcount, 0, sizeof (gdp->Pcount)); + memset(gdp->Qcount, 0, sizeof (gdp->Qcount)); if (erasures == NULL) { have_erasures = 0; @@ -980,7 +989,7 @@ } else { gdp->global_erasures = erasures+12; } -#if DEBUG>2 +#if DEBUG > 2 if (gdp->global_erasures != NULL) { #else if (have_erasures != 0) { @@ -989,29 +998,29 @@ /* * We can only use erasures at offset 12 and above. - * Further we need the number/positions of erasures seperated + * Further we need the number/positions of erasures separated * for LSB and MSB. So count them. */ - for (i = 0; i < 2*L12_P_LENGTH*L12_Q_LENGTH; i+=2) { + for (i = 0; i < 2*L12_P_LENGTH*L12_Q_LENGTH; i += 2) { if (gdp->global_erasures[i ] != 0) { gdp->Perapos[0][COL(i/2)] - [gdp->Pcount[0][COL(i/2)]] + [gdp->Pcount[0][COL(i/2)]] = (unsigned char)(POSP(i/2) + L12_P_SKIPPED); -#if DEBUG>2 +#if DEBUG > 2 fprintf(stderr, "off %d -> col %d pos %d dia %d pos %d\n", i+12, COL(i/2), POSP(i/2), DIA(i/2), POSQ(i/2)); - if (have_erasures != 0) + if (have_erasures != 0) #endif gdp->Pcount[0][COL(i/2)]++; } if (gdp->global_erasures[i+1] != 0) { gdp->Perapos[1][COL(i/2)] - [gdp->Pcount[1][COL(i/2)]] + [gdp->Pcount[1][COL(i/2)]] = (unsigned char)(POSP(i/2) + L12_P_SKIPPED); -#if DEBUG>2 +#if DEBUG > 2 fprintf(stderr, "off %d -> col %d pos %d dia %d pos %d\n", i+12+1, COL(i/2), POSP(i/2), DIA(i/2), POSQ(i/2)); - if (have_erasures != 0) + if (have_erasures != 0) #endif gdp->Pcount[1][COL(i/2)]++; } @@ -1019,23 +1028,23 @@ for (i = 0; i < L12_Q_LENGTH; i++) { int j; for (j = 0; j < L12_P_LENGTH; j++) { - int ind = SECBQLLO(i,j); + int ind = SECBQLLO(i, j); if (gdp->global_erasures[ind ] != 0) { gdp->Qerapos[0][i][gdp->Qcount[0][i]] = (unsigned char)(j + L12_Q_SKIPPED); -#if DEBUG>2 +#if DEBUG > 2 fprintf(stderr, "off %d -> dia %d pos %d col %d pos %d\n", ind+12, i, j, COL(ind/2), POSP(ind/2)); - if (have_erasures != 0) + if (have_erasures != 0) #endif gdp->Qcount[0][i]++; } if (gdp->global_erasures[ind+1] != 0) { gdp->Qerapos[1][i][gdp->Qcount[1][i]] = (unsigned char)(j + L12_Q_SKIPPED); -#if DEBUG>2 +#if DEBUG > 2 fprintf(stderr, "off %d -> dia %d pos %d col %d pos %d\n", ind+12+1, i, j, COL(ind/2), POSP(ind/2)); - if (have_erasures != 0) + if (have_erasures != 0) #endif gdp->Qcount[1][i]++; } @@ -1044,23 +1053,23 @@ for (i = 0; i < L12_Q_LENGTH; i++) { int j; for (j = L12_P_LENGTH; j < L12_P_LENGTH + 2; j++) { - int ind = SECBQLHI(i,j); + int ind = SECBQLHI(i, j); if (gdp->global_erasures[ind ] != 0) { gdp->Qerapos[0][i][gdp->Qcount[0][i]] = (unsigned char)(j + L12_Q_SKIPPED); -#if DEBUG>2 +#if DEBUG > 2 fprintf(stderr, "off %d -> dia %d pos %d col -- pos --\n", ind+12, i, j); - if (have_erasures != 0) + if (have_erasures != 0) #endif gdp->Qcount[0][i]++; } if (gdp->global_erasures[ind+1] != 0) { gdp->Qerapos[1][i][gdp->Qcount[1][i]] = (unsigned char)(j + L12_Q_SKIPPED); -#if DEBUG>2 +#if DEBUG > 2 fprintf(stderr, "off %d -> dia %d pos %d col -- pos --\n", ind+12+1, i, j); - if (have_erasures != 0) + if (have_erasures != 0) #endif gdp->Qcount[1][i]++; } @@ -1085,7 +1094,8 @@ unsigned msb, unsigned position, gdatp gdp)); static -void check_P_for_decoding_failures(syndrome, msb, position, gdp) +void +check_P_for_decoding_failures(syndrome, msb, position, gdp) unsigned char syndrome[]; unsigned msb; unsigned position; @@ -1094,7 +1104,7 @@ unsigned pos = msb+2*DIALO(position); /* check Q syndrome at that position */ if (syndrome[pos] == 0 && syndrome[pos+L2_Q/2] == 0) { -#if DEBUG >1 +#if DEBUG > 1 fprintf(stderr, " inval Q d %d", DIALO(position)); #endif syndrome[pos] = 1; @@ -1120,7 +1130,8 @@ unsigned msb, unsigned position, gdatp gdp)); static -void check_Q_for_decoding_failures(syndrome, msb, position, gdp) +void +check_Q_for_decoding_failures(syndrome, msb, position, gdp) unsigned char syndrome[]; unsigned msb; unsigned position; @@ -1128,12 +1139,13 @@ { unsigned pos; - if (position >= L12_P_LENGTH*L12_Q_LENGTH) return; + if (position >= L12_P_LENGTH*L12_Q_LENGTH) + return; pos = msb+2*COL(position); /* check P syndrome at that position */ if (syndrome[pos] == 0 && syndrome[pos+L2_P/2] == 0) { -#if DEBUG >1 +#if DEBUG > 1 fprintf(stderr, " inval P c %d", COL(position)); #endif syndrome[pos] = 1; @@ -1205,7 +1217,7 @@ INIT_BMD -#if DEBUG>0 +#if DEBUG > 0 fprintf(stderr, "tab(%u-%u), era(%u)", low_taboo, high_taboo, erasures); #endif @@ -1215,10 +1227,10 @@ */ if (erasures > 0) { - INIT_ERASURES(Perasures, L12_P_ERRORS, L12_MODUL, + INIT_ERASURES(Perasures, L12_P_ERRORS, L12_MODUL, rs_l12_log, rs_l12_alog) - if (DEBUG>2) { DEBUG_ERASURE_POLY(rs_l12_log, rs_l12_alog, + if (DEBUG > 2) { DEBUG_ERASURE_POLY(rs_l12_log, rs_l12_alog, L12_MODUL, L12_P_ERRORS, L12_P_SKIPPED, 0) } } @@ -1235,46 +1247,47 @@ BUILD_SHIFT_REGISTER(rs_l12_log, rs_l12_alog, L12_MODUL, L12_P_ERRORS) } -#if DEBUG>4 +#if DEBUG > 4 fprintf(stderr, " Pdisc=%d, ", discrepancy); fprintf(stderr, "j=%d, ", j); - fprintf(stderr, "k=%d, l(errors)=%d, e0=%d, e1=%d, B0=%d, B1=%d\n", k, l, err_locations[0], err_locations[1], tmp_loc[0], tmp_loc[1]); + fprintf(stderr, "k=%d, l(errors)=%d, e0=%d, e1=%d, B0=%d, B1=%d\n", + k, l, err_locations[0], err_locations[1], tmp_loc[0], tmp_loc[1]); #endif } -#if DEBUG>0 +#if DEBUG > 0 fprintf(stderr, ",l(%d) ", l); if (gdp->global_erasures != NULL) { int b; for (b = 0; b < L12_Q_LENGTH; b++) { - if (gdp->global_erasures[SECBPL(column,b)+ msb] == 1) { - fprintf(stderr, "%4d, ", 12+SECBPL(column,b) + msb); + if (gdp->global_erasures[SECBPL(column, b)+ msb] == 1) { + fprintf(stderr, "%4d, ", 12+SECBPL(column, b) + msb); } } for (b = 0; b < gdp->Pcount[msb][column]; b++) { - if (gdp->global_erasures[SECBPL(column,gdp->Perapos[msb][column][b] - L12_P_SKIPPED) + msb] == 0) { - fprintf(stderr, " :%4d: ", 12+SECBPL(column,gdp->Perapos[msb][column][b] - L12_P_SKIPPED) + msb); + if (gdp->global_erasures[SECBPL(column, gdp->Perapos[msb][column][b] - L12_P_SKIPPED) + msb] == 0) { + fprintf(stderr, " :%4d: ", 12+SECBPL(column, gdp->Perapos[msb][column][b] - L12_P_SKIPPED) + msb); } } } #endif if (l > L12_P_ERRORS+erasures/2) { -#if DEBUG>0 +#if DEBUG > 0 fprintf(stderr, "\tl > 2+era/2 "); #endif - return 1; + return (1); } /* find roots of err_locations */ - FIND_ROOTS(rs_l12_log, rs_l12_alog, L12_MODUL, L12_P_ERRORS, + FIND_ROOTS(rs_l12_log, rs_l12_alog, L12_MODUL, L12_P_ERRORS, L12_P_SKIPPED, (FIND_ROOTS_TABOO(SECWP, column, L12_P_SKIPPED))) /* too many errors if the number of roots is not what we expected */ if (roots_found != l) { -#if DEBUG>0 +#if DEBUG > 0 fprintf(stderr, "roots(%d)!=l(%d)\t", roots_found, l); #endif - return 1; + return (1); } /* @@ -1285,10 +1298,10 @@ CALC_ERROR_VALUATOR(rs_l12_log, rs_l12_alog) /* use roots of err_locations */ - APPLY_FORNEY_ALGORITHM(rs_l12_log, rs_l12_alog, L12_MODUL, + APPLY_FORNEY_ALGORITHM(rs_l12_log, rs_l12_alog, L12_MODUL, L12_P_SKIPPED, DO_L2_P_CORRECTION) - return 0; + return (0); } #undef SYND @@ -1313,7 +1326,7 @@ * low_taboo: the lower limit of a range left to be unchanged. * high_taboo: the upper limit of a range left to be unchanged. * q_changed_p: pointer to int; the integer is set true, if a - * correction affects the part covered by the + * correction affects the part covered by the * p parity layer. * loops: >= 0, the loop count of the iteration * gdp: is a pointer to auxiliary book keeping data. @@ -1321,7 +1334,7 @@ #define SYND(a) syndrome[(a)*L12_Q_LENGTH*2] static int -correct_Q __PR((unsigned char inout[4 + L2_RAW + 4 + 8 + L2_P + L2_Q], +correct_Q __PR((unsigned char inout[4 + L2_RAW + 4 + 8 + L2_P + L2_Q], unsigned msb, unsigned diagonal, unsigned char syndrome[L2_Q/2+2], unsigned erasures, unsigned char Qerasures[L12_P_LENGTH], @@ -1354,7 +1367,7 @@ INIT_BMD -#if DEBUG>0 +#if DEBUG > 0 fprintf(stderr, "tab(%u-%u), era(%u)", low_taboo, high_taboo, erasures); #endif @@ -1364,10 +1377,10 @@ */ if (erasures > 0) { - INIT_ERASURES(Qerasures, L12_Q_ERRORS, L12_MODUL, + INIT_ERASURES(Qerasures, L12_Q_ERRORS, L12_MODUL, rs_l12_log, rs_l12_alog) - if (DEBUG>2) { DEBUG_ERASURE_POLY(rs_l12_log, rs_l12_alog, + if (DEBUG > 2) { DEBUG_ERASURE_POLY(rs_l12_log, rs_l12_alog, L12_MODUL, L12_Q_ERRORS, L12_Q_SKIPPED, (FIND_ROOTS_TABOO(SECWQ, diagonal, L12_Q_SKIPPED))) } } @@ -1385,34 +1398,36 @@ BUILD_SHIFT_REGISTER(rs_l12_log, rs_l12_alog, L12_MODUL, L12_Q_ERRORS) } -#if DEBUG>4 +#if DEBUG > 4 fprintf(stderr, " Qdisc=%d, ", discrepancy); fprintf(stderr, "j=%d, ", j); - fprintf(stderr, "k=%d, l(errors)=%d, e0=%d, e1=%d, B0=%d, B1=%d\n", k, l, err_locations[0], err_locations[1], tmp_loc[0], tmp_loc[1]); + fprintf(stderr, "k=%d, l(errors)=%d, e0=%d, e1=%d, B0=%d, B1=%d\n", + k, l, err_locations[0], err_locations[1], tmp_loc[0], tmp_loc[1]); #endif } -#if DEBUG>0 +#if DEBUG > 0 fprintf(stderr, ",l(%d) ", l); if (gdp->global_erasures != NULL) { int b; for (b = 0; b < L12_P_LENGTH+2; b++) { - if (gdp->global_erasures[SECBQL(diagonal,b)+ msb] == 1) { - fprintf(stderr, "%4d, ", 12+SECBQL(diagonal,b) + msb); + if (gdp->global_erasures[SECBQL(diagonal, b)+ msb] == 1) { + fprintf(stderr, "%4d, ", 12+SECBQL(diagonal, b) + msb); } } for (b = 0; b < gdp->Qcount[msb][diagonal]; b++) { - if (gdp->global_erasures[SECBQL(diagonal,gdp->Qerapos[msb][diagonal][b] - L12_Q_SKIPPED) + msb] == 0) { - fprintf(stderr, " :%4d: ", 12+SECBQL(diagonal,gdp->Qerapos[msb][diagonal][b] - L12_Q_SKIPPED) + msb); + if (gdp->global_erasures[SECBQL(diagonal, gdp->Qerapos[msb][diagonal][b] - L12_Q_SKIPPED) + msb] == 0) { + fprintf(stderr, " :%4d: ", + 12+SECBQL(diagonal, gdp->Qerapos[msb][diagonal][b] - L12_Q_SKIPPED) + msb); } } } #endif if (l > L12_Q_ERRORS+erasures/2) { -#if DEBUG>0 +#if DEBUG > 0 fprintf(stderr, "l > 2+era/2 "); #endif - return 1; + return (1); } /* find roots of err_locations */ @@ -1421,10 +1436,10 @@ /* too many errors if the number of roots are not what we expected */ if (roots_found != l) { -#if DEBUG>0 +#if DEBUG > 0 fprintf(stderr, "roots(%d)!=l(%d)\t", roots_found, l); #endif - return 1; + return (1); } /* @@ -1435,10 +1450,10 @@ CALC_ERROR_VALUATOR(rs_l12_log, rs_l12_alog) /* use roots of err_locations */ - APPLY_FORNEY_ALGORITHM(rs_l12_log, rs_l12_alog, L12_MODUL, + APPLY_FORNEY_ALGORITHM(rs_l12_log, rs_l12_alog, L12_MODUL, L12_Q_SKIPPED, DO_L2_Q_CORRECTION) - return 0; + return (0); } #undef SYND @@ -1448,7 +1463,7 @@ * in the p parity layer. * * Input/output parameters: - * inout_pq: the byte array with the sector data + * inout_pq: the byte array with the sector data * after the sync header to be corrected. * p_changed: pointer to int; set true, if a * correction (change) has been done. @@ -1486,64 +1501,64 @@ gdp->Pfailed[0][i] = gdp->Pfailed[1][i] = 0; - if (loops > 0 - && gdp->Psyndromes[2*i] == 0 - && gdp->Psyndromes[2*i+1] == 0 - && gdp->Psyndromes[2*i+L2_P/2] == 0 - && gdp->Psyndromes[2*i+L2_P/2+1] == 0 ) continue; + if (loops > 0 && + gdp->Psyndromes[2*i] == 0 && + gdp->Psyndromes[2*i+1] == 0 && + gdp->Psyndromes[2*i+L2_P/2] == 0 && + gdp->Psyndromes[2*i+L2_P/2+1] == 0) continue; if (!calc_L2_P_syndrome(inout_pq, i, &gdp->Psyndromes[2*i])) { - unsigned msb; - /* - * error(s) in column i in layer of p (LSB and MSB) - */ - for (msb = 0; msb < 2; msb++) { - int retval; - - if (gdp->Psyndromes[2*i+msb] != 0 - || gdp->Psyndromes[2*i+msb+L2_P/2] != 0) { - if (TELLME) fprintf(stderr, "%2d p %s c %2d: ", loops, msb ? "MSB" : "LSB", i); -if (0) fprintf(stderr, "\nP taboo:%u-%u, c/p:%u/%u - %u/%u\n", -low_taboo, high_taboo, lowcol, lowpos, higcol, higpos ); - retval = correct_P(inout_pq+msb, msb, i, - &gdp->Psyndromes[2*i+msb], gdp->Pcount[msb][i], - gdp->Perapos[msb][i], - i >= lowcol ? lowpos : lowpos+1, - i <= higcol || higpos == 0 ? higpos : higpos-1, - loops, gdp); - *p_changed |= !retval; - have_error[msb] |= retval; - if (retval == 0) { -#if DEBUG>=0 - /* recheck */ - calc_L2_P_syndrome(inout_pq, i, &gdp->Psyndromes[2*i]); + unsigned msb; + /* + * error(s) in column i in layer of p (LSB and MSB) + */ + for (msb = 0; msb < 2; msb++) { + int retval; + if (gdp->Psyndromes[2*i+msb] != 0 || gdp->Psyndromes[2*i+msb+L2_P/2] != 0) { + if (TELLME) fprintf(stderr, "%2d p %s c %2d: ", loops, msb ? "MSB" : "LSB", i); +if (0) fprintf(stderr, "\nP taboo:%u-%u, c/p:%u/%u - %u/%u\n", +low_taboo, high_taboo, lowcol, lowpos, higcol, higpos); + retval = correct_P(inout_pq+msb, msb, i, + &gdp->Psyndromes[2*i+msb], gdp->Pcount[msb][i], + gdp->Perapos[msb][i], + i >= lowcol ? lowpos : lowpos+1, + i <= higcol || higpos == 0 ? higpos : higpos-1, + loops, gdp); + *p_changed |= !retval; + have_error[msb] |= retval; + if (retval == 0) { +#if DEBUG >= 0 + /* recheck */ + calc_L2_P_syndrome(inout_pq, i, &gdp->Psyndromes[2*i]); + if (gdp->Psyndromes[2*i+msb] != 0 || + gdp->Psyndromes[2*i+msb+L2_P/2] != 0) { fprintf(stderr, "\n P %s internal error in %s, %d\n", msb ? "MSB" : "LSB", __FILE__, __LINE__); - } + } #endif - gdp->Psyndromes[2*i+msb] = 0; - gdp->Psyndromes[2*i+msb+L2_P/2] = 0; - } else { - gdp->Pfailed[msb][i] = 1; - } - if (TELLME) fputs("\n", stderr); - } /* error in byte layer */ + gdp->Psyndromes[2*i+msb] = 0; + gdp->Psyndromes[2*i+msb+L2_P/2] = 0; + } else { + gdp->Pfailed[msb][i] = 1; + } + if (TELLME) fputs("\n", stderr); + } /* error in byte layer */ #if DEBUG >= 0 - else { - /* - * if this column is clean, - * there should be no erasures left - */ - if (gdp->Pcount[msb][i] != 0) { + else { + /* + * if this column is clean, + * there should be no erasures left + */ + if (gdp->Pcount[msb][i] != 0) { fprintf(stderr, "p: %d stale erasures in column %d, MSB=%d\n", gdp->Pcount[msb][i], i, msb); + } } - } #endif - } /* for LSB and MSB */ + } /* for LSB and MSB */ } /* error in column */ } /* for all columns */ - return have_error[0] == 0 && have_error[1] == 0; + return (have_error[0] == 0 && have_error[1] == 0); } @@ -1552,7 +1567,7 @@ * in the q parity layer. * * Input/output parameters: - * inout_pq: the byte array with the sector data + * inout_pq: the byte array with the sector data * after the sync header to be corrected. * q_changed: pointer to int; set true, if a * correction (change) has been done. @@ -1590,64 +1605,64 @@ gdp->Qfailed[0][i] = gdp->Qfailed[1][i] = 0; - if (loops > 0 - && gdp->Qsyndromes[2*i] == 0 - && gdp->Qsyndromes[2*i+1] == 0 - && gdp->Qsyndromes[2*i+L2_Q/2] == 0 - && gdp->Qsyndromes[2*i+L2_Q/2+1] == 0 ) continue; + if (loops > 0 && + gdp->Qsyndromes[2*i] == 0 && + gdp->Qsyndromes[2*i+1] == 0 && + gdp->Qsyndromes[2*i+L2_Q/2] == 0 && + gdp->Qsyndromes[2*i+L2_Q/2+1] == 0) continue; if (!calc_L2_Q_syndrome(inout_pq, i, &gdp->Qsyndromes[2*i])) { - unsigned msb; - /* - * error(s) in diagonal i in layer of q (LSB and MSB) - */ - for (msb = 0; msb < 2; msb++) { - if (gdp->Qsyndromes[2*i+msb] != 0 - || gdp->Qsyndromes[2*i+msb+L2_Q/2] != 0) { - int retval; - - if (TELLME) fprintf(stderr, "%2d q %s d %2d: ", loops, msb ? "MSB" : "LSB", i); - - retval = correct_Q(inout_pq+msb, msb, i, - &gdp->Qsyndromes[2*i+msb], gdp->Qcount[msb][i], - gdp->Qerapos[msb][i], - low_taboo, - high_taboo, - q_changed_p, - gdp); - *q_changed |= !retval; - have_error[msb] |= retval; - if (retval == 0) { -#if DEBUG>=0 - /* recheck */ - calc_L2_Q_syndrome(inout_pq, i, &gdp->Qsyndromes[2*i]); + unsigned msb; + /* + * error(s) in diagonal i in layer of q (LSB and MSB) + */ + for (msb = 0; msb < 2; msb++) { if (gdp->Qsyndromes[2*i+msb] != 0 || gdp->Qsyndromes[2*i+msb+L2_Q/2] != 0) { + int retval; + + if (TELLME) fprintf(stderr, "%2d q %s d %2d: ", loops, msb ? "MSB" : "LSB", i); + + retval = correct_Q(inout_pq+msb, msb, i, + &gdp->Qsyndromes[2*i+msb], gdp->Qcount[msb][i], + gdp->Qerapos[msb][i], + low_taboo, + high_taboo, + q_changed_p, + gdp); + *q_changed |= !retval; + have_error[msb] |= retval; + if (retval == 0) { +#if DEBUG >= 0 + /* recheck */ + calc_L2_Q_syndrome(inout_pq, i, &gdp->Qsyndromes[2*i]); + if (gdp->Qsyndromes[2*i+msb] != 0 || + gdp->Qsyndromes[2*i+msb+L2_Q/2] != 0) { fprintf(stderr, "\n Q %s internal error in %s, %d\n", msb ? "MSB" : "LSB", __FILE__, __LINE__); - } + } #endif - gdp->Qsyndromes[2*i+msb] = 0; - gdp->Qsyndromes[2*i+msb+L2_Q/2] = 0; - } else { - gdp->Qfailed[msb][i] = 1; - } - if (TELLME) fputs("\n", stderr); - } /* error in byte layer */ + gdp->Qsyndromes[2*i+msb] = 0; + gdp->Qsyndromes[2*i+msb+L2_Q/2] = 0; + } else { + gdp->Qfailed[msb][i] = 1; + } + if (TELLME) fputs("\n", stderr); + } /* error in byte layer */ #if DEBUG >= 0 - else { - /* - * if this column is clean, - * there should be no erasures left - */ - if (gdp->Qcount[msb][i] != 0) { + else { + /* + * if this column is clean, + * there should be no erasures left + */ + if (gdp->Qcount[msb][i] != 0) { fprintf(stderr, "q: %d stale erasures in diagonal %d, MSB=%d\n", gdp->Qcount[msb][i], i, msb); + } } - } #endif - } /* for LSB and MSB */ + } /* for LSB and MSB */ } /* error in column */ } /* for all columns */ - return have_error[0] == 0 && have_error[1] == 0; + return (have_error[0] == 0 && have_error[1] == 0); } @@ -1672,9 +1687,9 @@ int do_decode_L2 __PR((unsigned char inout[(L2_RAW + L2_Q + L2_P)], - int sectortype, - int have_erasures, - unsigned char erasures[(L2_RAW + L2_Q + L2_P)])); + int sectortype, + int have_erasures, + unsigned char erasures[(L2_RAW + L2_Q + L2_P)])); int do_decode_L2(inout, sectortype, have_erasures, erasures) @@ -1683,19 +1698,20 @@ int have_erasures; unsigned char erasures[(L2_RAW + L2_Q + L2_P)]; { - int crc_ok; - int q_ok=-1; - int p_ok=-1; + int crc_ok; + int q_ok = -1; + int p_ok = -1; unsigned p_changed = 0; unsigned q_changed = 0; unsigned q_changed_p = 0; - int loops; + int loops; unsigned low_taboo; unsigned high_taboo; gdat gdata; gdatp gdp = &gdata; - if (sectortype != EDC_MODE_1 && sectortype != EDC_MODE_2_FORM_1) return WRONG_TYPE; + if (sectortype != EDC_MODE_1 && sectortype != EDC_MODE_2_FORM_1) + return (WRONG_TYPE); memcpy(inout, "\000\377\377\377\377\377\377\377\377\377\377\000", 12); if (sectortype == EDC_MODE_1) { @@ -1709,9 +1725,9 @@ init_erasures(have_erasures, erasures, gdp); - memset(gdp->corrcount, 0, sizeof(gdp->corrcount)); - memset(gdp->Pcorrcount, 0, sizeof(gdp->Pcorrcount)); - memset(gdp->Qcorrcount, 0, sizeof(gdp->Qcorrcount)); + memset(gdp->corrcount, 0, sizeof (gdp->corrcount)); + memset(gdp->Pcorrcount, 0, sizeof (gdp->Pcorrcount)); + memset(gdp->Qcorrcount, 0, sizeof (gdp->Qcorrcount)); loops = 0; do { @@ -1720,48 +1736,51 @@ /* we are satisfied, when the crc is correct. */ if (crc_ok) { -#if DEBUG>=3 -fprintf(stderr, "loop1:%d crc=%d, p=%d, p_chan=%d, q=%d, q_chan=%d, q_chan_p=%d lo=%d, hi=%d\n", loops, crc_ok, p_ok, p_changed, q_ok, q_changed, q_changed_p, low_taboo, high_taboo); +#if DEBUG >= 3 +fprintf(stderr, "loop1:%d crc=%d, p=%d, p_chan=%d, q=%d, q_chan=%d, q_chan_p=%d lo=%d, hi=%d\n", + loops, crc_ok, p_ok, p_changed, q_ok, q_changed, q_changed_p, low_taboo, high_taboo); #endif break; } p_ok = p_correct_all(inout+12, &p_changed, low_taboo, high_taboo, loops, gdp); - + if (p_ok && p_changed) { crc_ok = do_crc_check(inout, sectortype, loops, gdp); /* we are satisfied, when the crc is correct. */ if (crc_ok) { -#if DEBUG>=3 -fprintf(stderr, "loop2:%d crc=%d, p=%d, p_chan=%d, q=%d, q_chan=%d, q_chan_p=%d lo=%d, hi=%d\n", loops, crc_ok, p_ok, p_changed, q_ok, q_changed, q_changed_p, low_taboo, high_taboo); +#if DEBUG >= 3 +fprintf(stderr, "loop2:%d crc=%d, p=%d, p_chan=%d, q=%d, q_chan=%d, q_chan_p=%d lo=%d, hi=%d\n", + loops, crc_ok, p_ok, p_changed, q_ok, q_changed, q_changed_p, low_taboo, high_taboo); #endif break; } } if (loops > 0 && !crc_ok && q_ok && p_ok) { - memset(gdp->Psyndromes, 1, sizeof(gdp->Psyndromes)); - memset(gdp->Qsyndromes, 1, sizeof(gdp->Qsyndromes)); + memset(gdp->Psyndromes, 1, sizeof (gdp->Psyndromes)); + memset(gdp->Qsyndromes, 1, sizeof (gdp->Qsyndromes)); } q_ok = q_correct_all(inout+12, &q_changed, &q_changed_p, - low_taboo, high_taboo, loops, gdp); + low_taboo, high_taboo, loops, gdp); -#if DEBUG>=2 -fprintf(stderr, "loop :%d crc=%d, p=%d, p_chan=%d, q=%d, q_chan=%d, q_chan_p=%d lo=%d, hi=%d\n", loops, crc_ok, p_ok, p_changed, q_ok, q_changed, q_changed_p, low_taboo, high_taboo); +#if DEBUG >= 2 +fprintf(stderr, "loop :%d crc=%d, p=%d, p_chan=%d, q=%d, q_chan=%d, q_chan_p=%d lo=%d, hi=%d\n", + loops, crc_ok, p_ok, p_changed, q_ok, q_changed, q_changed_p, low_taboo, high_taboo); #endif if (!q_changed_p && crc_ok && q_ok) { if (loops == 0 && !q_changed && !p_changed && p_ok) - return NO_ERRORS; + return (NO_ERRORS); if (p_ok) - return FULLY_CORRECTED; + return (FULLY_CORRECTED); } if ((!q_ok) && !q_changed_p) q_changed_p |= unify_erasures(have_erasures, inout+12, gdp); loops++; - } while ( q_changed_p && loops < MAXLOOPS); + } while (q_changed_p && loops < MAXLOOPS); if (crc_ok) { unsigned i; @@ -1774,43 +1793,45 @@ for (i = 0, q_ok = 1; i < L2_Q/4; i++) { q_ok &= calc_L2_Q_syndrome(inout+12, i, &gdp->Qsyndromes[2*i]); } -#if DEBUG>=2 -fprintf(stderr, "loop :%d crc=%d, p=%d, p_chan=%d, q=%d, q_chan=%d, q_chan_p=%d lo=%d, hi=%d\n", -1, crc_ok, p_ok, p_changed, q_ok, q_changed, q_changed_p, low_taboo, high_taboo); +#if DEBUG >= 2 +fprintf(stderr, "loop :%d crc=%d, p=%d, p_chan=%d, q=%d, q_chan=%d, q_chan_p=%d lo=%d, hi=%d\n", + -1, crc_ok, p_ok, p_changed, q_ok, q_changed, q_changed_p, low_taboo, high_taboo); #endif if (p_ok && q_ok) - return NO_ERRORS; + return (NO_ERRORS); } #endif if (p_ok && q_ok && !q_changed_p) - return FULLY_CORRECTED; + return (FULLY_CORRECTED); /* restore unused, p and q portions */ - if (sectortype == EDC_MODE_1) + if (sectortype == EDC_MODE_1) memset(inout + 2064 + 4, 0, 8); - encode_L2_P(inout + 12); - encode_L2_Q(inout + 12); + encode_L2_P(inout + 12); + encode_L2_Q(inout + 12); - return FULLY_CORRECTED; + return (FULLY_CORRECTED); } crc_ok = do_crc_check(inout, sectortype, 1, gdp); -#if DEBUG>=2 -fprintf(stderr, "loop:%d crc=%d, p=%d, p_chan=%d, q=%d, q_chan=%d, q_chan_p=%d lo=%d, hi=%d\n", 99, crc_ok, p_ok, p_changed, q_ok, q_changed, q_changed_p, low_taboo, high_taboo); +#if DEBUG >= 2 +fprintf(stderr, "loop:%d crc=%d, p=%d, p_chan=%d, q=%d, q_chan=%d, q_chan_p=%d lo=%d, hi=%d\n", + 99, crc_ok, p_ok, p_changed, q_ok, q_changed, q_changed_p, low_taboo, high_taboo); #endif if (crc_ok) { if (p_ok && q_ok) - return FULLY_CORRECTED; + return (FULLY_CORRECTED); /* restore unused, p and q portions */ if (sectortype == EDC_MODE_1) memset(inout + 2064 + 4, 0, 8); - encode_L2_P(inout + 12); - encode_L2_Q(inout + 12); + encode_L2_P(inout + 12); + encode_L2_Q(inout + 12); - return FULLY_CORRECTED; + return (FULLY_CORRECTED); } - return UNCORRECTABLE; + return (UNCORRECTABLE); } #endif #endif @@ -1851,22 +1872,22 @@ syndrome[0] = syndrome[1] = 0; inout += 4-1; -#define QBODYEND(i) \ - data = *inout & (unsigned)0x3f; \ - \ - *Q++ ^= (unsigned char)data;\ +#define QBODYEND(i) \ + data = *inout & (unsigned)0x3f; \ + \ + *Q++ ^= (unsigned char)data; \ *Q ^= SUBsyn[i][0][data]; -#define QBODY(i) \ - QBODYEND(i) \ - inout--; \ +#define QBODY(i) \ + QBODYEND(i) \ + inout--; \ Q--; QBODY(0) QBODY(1) QBODY(2) QBODYEND(3) - return (syndrome[0] | syndrome[1]) != 0; + return ((syndrome[0] | syndrome[1]) != 0); } static int @@ -1884,29 +1905,30 @@ syndrome[0] = syndrome[1] = syndrome[2] = syndrome[3] = 0; inout += 24-1; -#define PBODYEND(i) \ - data = *inout & (unsigned)0x3f; \ - \ - *P++ ^= (unsigned char)data;\ - *P++ ^= SUBsyn[i][0][data]; \ - *P++ ^= SUBsyn[i][1][data]; \ +#define PBODYEND(i) \ + data = *inout & (unsigned)0x3f; \ + \ + *P++ ^= (unsigned char)data; \ + *P++ ^= SUBsyn[i][0][data]; \ + *P++ ^= SUBsyn[i][1][data]; \ *P ^= SUBsyn[i][2][data]; -#define PBODY(i) \ +#define PBODY(i) \ PBODYEND(i) \ inout--; \ P -= 3; - PBODY( 0) PBODY( 1) PBODY( 2) PBODY( 3) PBODY( 4) - PBODY( 5) PBODY( 6) PBODY( 7) PBODY( 8) PBODY( 9) + PBODY(0) PBODY(1) PBODY(2) PBODY(3) PBODY(4) + PBODY(5) PBODY(6) PBODY(7) PBODY(8) PBODY(9) PBODY(10) PBODY(11) PBODY(12) PBODY(13) PBODY(14) PBODY(15) PBODY(16) PBODY(17) PBODY(18) PBODY(19) PBODY(20) PBODY(21) PBODY(22) PBODYEND(23) - return (syndrome[0] | syndrome[1] | - syndrome[2] | syndrome[3] ) != 0; + return ((syndrome[0] | syndrome[1] | + syndrome[2] | syndrome[3]) != 0); } +#ifdef __needed__ #define SYND(a) syndrome[a] static int correct_QSUB __PR((unsigned char inout[LSUB_RAW + LSUB_P + LSUB_Q], @@ -1940,10 +1962,10 @@ */ if (erasures > 0) { - INIT_ERASURES(Qerasures, LSUB_Q_ERRORS, LSUB_MODUL, + INIT_ERASURES(Qerasures, LSUB_Q_ERRORS, LSUB_MODUL, rs_sub_rw_log, rs_sub_rw_alog) - if (DEBUG>2) { DEBUG_ERASURE_POLY(rs_sub_rw_log, rs_sub_rw_alog, + if (DEBUG > 2) { DEBUG_ERASURE_POLY(rs_sub_rw_log, rs_sub_rw_alog, LSUB_MODUL, LSUB_Q_ERRORS, LSUB_Q_SKIPPED, 0) } } /* erasure initialisation */ @@ -1961,21 +1983,23 @@ LSUB_MODUL, LSUB_Q_ERRORS) } -#if DEBUG>2 +#if DEBUG > 2 fprintf(stderr, "Qdisc=%d, ", discrepancy); fprintf(stderr, "j=%d, ", j); - fprintf(stderr, "k=%d, l(errors)=%d, e0=%d, e1=%d, B0=%d, B1=%d\n", k, l, err_locations[0], err_locations[1], tmp_loc[0], tmp_loc[1]); + fprintf(stderr, "k=%d, l(errors)=%d, e0=%d, e1=%d, B0=%d, B1=%d\n", + k, l, err_locations[0], err_locations[1], tmp_loc[0], tmp_loc[1]); #endif } - if (l > LSUB_Q_ERRORS+erasures/2) return 1; + if (l > LSUB_Q_ERRORS+erasures/2) + return (1); /* find roots of err_locations */ - FIND_ROOTS(rs_sub_rw_log, rs_sub_rw_alog, LSUB_MODUL, LSUB_Q_ERRORS, + FIND_ROOTS(rs_sub_rw_log, rs_sub_rw_alog, LSUB_MODUL, LSUB_Q_ERRORS, LSUB_Q_SKIPPED, 0) if (roots_found != l) { - return 1; + return (1); } /* @@ -1985,13 +2009,15 @@ */ CALC_ERROR_VALUATOR(rs_sub_rw_log, rs_sub_rw_alog) - APPLY_FORNEY_ALGORITHM(rs_sub_rw_log, rs_sub_rw_alog, LSUB_MODUL, + APPLY_FORNEY_ALGORITHM(rs_sub_rw_log, rs_sub_rw_alog, LSUB_MODUL, LSUB_Q_SKIPPED, DO_SUB_CORRECTION) - return roots_found ? 0 : 1; + return (roots_found ? 0 : 1); } #undef SYND +#endif /* __needed__ */ +#ifdef __needed__ #define SYND(a) syndrome[a] static int correct_PSUB __PR((unsigned char inout[LSUB_RAW + LSUB_P + LSUB_Q], @@ -2025,10 +2051,10 @@ */ if (erasures > 0) { - INIT_ERASURES(Perasures, LSUB_P_ERRORS, LSUB_MODUL, + INIT_ERASURES(Perasures, LSUB_P_ERRORS, LSUB_MODUL, rs_sub_rw_log, rs_sub_rw_alog) - if (DEBUG>2) { DEBUG_ERASURE_POLY(rs_sub_rw_log, rs_sub_rw_alog, + if (DEBUG > 2) { DEBUG_ERASURE_POLY(rs_sub_rw_log, rs_sub_rw_alog, LSUB_MODUL, LSUB_P_ERRORS, LSUB_P_SKIPPED, 0) } } /* erasure initialisation */ @@ -2045,21 +2071,23 @@ BUILD_SHIFT_REGISTER(rs_sub_rw_log, rs_sub_rw_alog, LSUB_MODUL, LSUB_P_ERRORS) } -#if DEBUG>2 +#if DEBUG > 2 fprintf(stderr, "Pdisc=%d, ", discrepancy); fprintf(stderr, "j=%d, ", j); -fprintf(stderr, "k=%d, l(errors)=%d, e0=%d, e1=%d, B0=%d, B1=%d\n", k, l, err_locations[0], err_locations[1], tmp_loc[0], tmp_loc[1]); +fprintf(stderr, "k=%d, l(errors)=%d, e0=%d, e1=%d, B0=%d, B1=%d\n", + k, l, err_locations[0], err_locations[1], tmp_loc[0], tmp_loc[1]); #endif } - if (l > LSUB_P_ERRORS+erasures/2) return 1; + if (l > LSUB_P_ERRORS+erasures/2) + return (1); /* find roots of err_locations */ - FIND_ROOTS(rs_sub_rw_log, rs_sub_rw_alog, LSUB_MODUL, LSUB_P_ERRORS, + FIND_ROOTS(rs_sub_rw_log, rs_sub_rw_alog, LSUB_MODUL, LSUB_P_ERRORS, LSUB_P_SKIPPED, 0) if (roots_found != l) { - return 1; + return (1); } /* @@ -2072,21 +2100,22 @@ /* * apply the forney algorithm */ - APPLY_FORNEY_ALGORITHM(rs_sub_rw_log, rs_sub_rw_alog, LSUB_MODUL, + APPLY_FORNEY_ALGORITHM(rs_sub_rw_log, rs_sub_rw_alog, LSUB_MODUL, LSUB_P_SKIPPED, DO_SUB_CORRECTION) - return roots_found ? 0 : 1; + return (roots_found ? 0 : 1); } #undef SYND +#endif /* __needed__ */ #ifdef DECODE_SUB_IN_ENCODER /* XXX we need to fix this in edc_ecc.c */ int do_decode_sub __PR(( - unsigned char inout[(LSUB_RAW + LSUB_Q + LSUB_P)*PACKETS_PER_SUBCHANNELFRAME], - int have_erasures, - unsigned char erasures[(LSUB_RAW +LSUB_Q +LSUB_P)*PACKETS_PER_SUBCHANNELFRAME], - int results[PACKETS_PER_SUBCHANNELFRAME] + unsigned char inout[(LSUB_RAW + LSUB_Q + LSUB_P)*PACKETS_PER_SUBCHANNELFRAME], + int have_erasures, + unsigned char erasures[(LSUB_RAW +LSUB_Q +LSUB_P)*PACKETS_PER_SUBCHANNELFRAME], + int results[PACKETS_PER_SUBCHANNELFRAME] )); int @@ -2115,14 +2144,14 @@ int changed_P; int retval = -12; - memset(Perapos, 0, sizeof(Perapos)); - memset(Qerapos, 0, sizeof(Qerapos)); - memset(Pcount, 0, sizeof(Pcount)); - memset(Qcount, 0, sizeof(Qcount)); + memset(Perapos, 0, sizeof (Perapos)); + memset(Qerapos, 0, sizeof (Qerapos)); + memset(Pcount, 0, sizeof (Pcount)); + memset(Qcount, 0, sizeof (Qcount)); if (have_erasures != 0) { unsigned char i; /* - * seperate erasures for Q and P level. + * separate erasures for Q and P level. */ for (i = 0; i < (LSUB_QRAW + LSUB_Q)* PACKETS_PER_SUBCHANNELFRAME; i++) { if (erasures[i] != 0) { @@ -2141,80 +2170,82 @@ } } } - for (have_error = 1, packet = 0; - packet < PACKETS_PER_SUBCHANNELFRAME; + for (have_error = 1, packet = 0; + packet < PACKETS_PER_SUBCHANNELFRAME; packet++, Qsyndromesp += LSUB_Q, Psyndromesp += LSUB_P, Qcountp++, Pcountp++, Qeraposp += LSUB_QRAW + LSUB_Q, Peraposp += LSUB_RAW + LSUB_Q + LSUB_P, - inout += 24 ) { + inout += 24) { int iCnt; - for (iCnt = 0; have_error && iCnt < 2; iCnt++) { - unsigned i = 0; - changed_Q = have_error = 0; - - if (calc_LSUB_P_syndrome(inout, Psyndromesp)) { - error |= 2 << (2*i); - - retval = correct_PSUB(inout,Psyndromesp,0,NULL); - have_error |= retval; - changed_P = !retval; - if (retval == 0) { - Pcountp[0] = 0; -#if DEBUG>=0 - calc_LSUB_P_syndrome(inout, Psyndromesp); - if (Psyndromesp[0] != 0 || - Psyndromesp[1] != 0 || - Psyndromesp[2] != 0 || - Psyndromesp[3] != 0) { + + for (iCnt = 0; have_error && iCnt < 2; iCnt++) { + unsigned i = 0; + changed_Q = have_error = 0; + + if (calc_LSUB_P_syndrome(inout, Psyndromesp)) { + error |= 2 << (2*i); + + retval = correct_PSUB(inout, Psyndromesp, 0, NULL); + have_error |= retval; + changed_P = !retval; + if (retval == 0) { + Pcountp[0] = 0; +#if DEBUG >= 0 + calc_LSUB_P_syndrome(inout, Psyndromesp); + if (Psyndromesp[0] != 0 || + Psyndromesp[1] != 0 || + Psyndromesp[2] != 0 || + Psyndromesp[3] != 0) { fprintf(stderr, "\nSubP internal error in %s, %d\n", __FILE__, __LINE__); - } + } #endif + } } - } - if (calc_LSUB_Q_syndrome(inout, Qsyndromesp)) { - error |= 1 << (2*i); - retval = correct_QSUB(inout,Qsyndromesp,0,NULL); - have_error |= retval; - changed_Q = !retval; - if (retval == 0) { - Qcountp[0] = 0; -#if DEBUG>=0 - calc_LSUB_Q_syndrome(inout, Qsyndromesp); - if (Qsyndromesp[0] != 0 || - Qsyndromesp[1] != 0) { + if (calc_LSUB_Q_syndrome(inout, Qsyndromesp)) { + error |= 1 << (2*i); + retval = correct_QSUB(inout, Qsyndromesp, 0, NULL); + have_error |= retval; + changed_Q = !retval; + if (retval == 0) { + Qcountp[0] = 0; +#if DEBUG >= 0 + calc_LSUB_Q_syndrome(inout, Qsyndromesp); + if (Qsyndromesp[0] != 0 || + Qsyndromesp[1] != 0) { fprintf(stderr, "\nSubQ internal error in %s, %d\n", __FILE__, __LINE__); - } + } #endif + } + } + if (results != NULL) { + results[packet] = (error & (3 << (2*i))) != 0; } } - if (results != NULL) { - results[packet] = (error & (3 << (2*i))) != 0; - } - } } - return have_error; + return (have_error); } #endif /* DECODE_SUB_IN_ENCODER XXX we need to fix this in edc_ecc.c */ int check_sub __PR((unsigned char input[])); -int check_sub(input) +int +check_sub(input) unsigned char input[]; { int error = 0; int packet; - for (packet = 0; - !error && packet < PACKETS_PER_SUBCHANNELFRAME; + for (packet = 0; + !error && packet < PACKETS_PER_SUBCHANNELFRAME; packet++, input += 24) { unsigned char syndromes[4]; error |= calc_LSUB_P_syndrome(input, syndromes); error |= calc_LSUB_Q_syndrome(input, syndromes); } - return error; + return (error); } #endif #endif diff -Nru cdrtools-2.01.01a33/libedc/edc.h cdrtools-3.02a09/libedc/edc.h --- cdrtools-2.01.01a33/libedc/edc.h 2006-05-15 19:14:30.000000000 +0000 +++ cdrtools-3.02a09/libedc/edc.h 2012-12-02 12:50:59.000000000 +0000 @@ -1,10 +1,11 @@ -/* @(#)edc.h 1.2 06/05/14 Copyright 1998-2001 Heiko Eissfeldt */ +/* @(#)edc.h 1.3 12/12/02 Copyright 1998-2001 Heiko Eissfeldt */ /* * This file contains protected intellectual property. * * Compact disc reed-solomon routines. * Copyright (c) 1998-2001 by Heiko Eissfeldt, heiko@hexco.de + * Copyright (c) 2006-2012 by Joerg Schilling */ /* * The contents of this file are subject to the terms of the @@ -20,9 +21,9 @@ #ifdef EDC_DECODER_HACK -#ifndef min -#define min(a,b) ((a) < (b) ? (a) : (b)) -#define max(a,b) ((a) > (b) ? (a) : (b)) +#ifndef min +#define min(a, b) ((a) < (b) ? (a) : (b)) +#define max(a, b) ((a) > (b) ? (a) : (b)) #endif #define DO2(a) a\ @@ -35,19 +36,19 @@ DO4(a) #if defined EDC_LAYER1 || defined EDC_LAYER2 -#define RS_L12_BITS 8 +#define RS_L12_BITS 8 #endif /* * known sector types */ -#define EDC_MODE_0 0 -#define EDC_MODE_1 1 -#define EDC_MODE_2 2 -#define EDC_MODE_2_FORM_1 3 -#define EDC_MODE_2_FORM_2 4 -#define EDC_AUDIO 5 -#define EDC_UNKNOWN 6 +#define EDC_MODE_0 0 +#define EDC_MODE_1 1 +#define EDC_MODE_2 2 +#define EDC_MODE_2_FORM_1 3 +#define EDC_MODE_2_FORM_2 4 +#define EDC_AUDIO 5 +#define EDC_UNKNOWN 6 typedef struct bcdmsf { @@ -62,21 +63,21 @@ * data sector definitions for RSPC * user data bytes per frame */ -#define L2_RAW (1024*2) +#define L2_RAW (1024*2) -#define L12_MODUL 255 -#define L12_P_ERRORS 1 -#define L12_Q_ERRORS 1 -#define L12_P_LENGTH 43 -#define L12_Q_LENGTH 26 -#define L12_P_SKIPPED (L12_MODUL-L12_Q_LENGTH) -#define L12_Q_SKIPPED (L12_MODUL-L12_P_LENGTH-2*L12_Q_ERRORS) +#define L12_MODUL 255 +#define L12_P_ERRORS 1 +#define L12_Q_ERRORS 1 +#define L12_P_LENGTH 43 +#define L12_Q_LENGTH 26 +#define L12_P_SKIPPED (L12_MODUL-L12_Q_LENGTH) +#define L12_Q_SKIPPED (L12_MODUL-L12_P_LENGTH-2*L12_Q_ERRORS) /* * parity bytes for 16 bit units */ -#define L2_Q (L12_Q_LENGTH*2*L12_Q_ERRORS*2) -#define L2_P (L12_P_LENGTH*2*L12_P_ERRORS*2) +#define L2_Q (L12_Q_LENGTH*2*L12_Q_ERRORS*2) +#define L2_P (L12_P_LENGTH*2*L12_P_ERRORS*2) /* * sector access macros @@ -91,45 +92,45 @@ * z is L for the least significant and M for the most significant byte */ /* word macros */ -#define SECWP(col,p) (L12_P_LENGTH*(p)+(col)) +#define SECWP(col, p) (L12_P_LENGTH*(p)+(col)) /* byte macros */ -#define SECBPL(col,p) (SECWP(col,p) << 1) -#define SECBPM(col,p) (SECBPL(col,p)+1) +#define SECBPL(col, p) (SECWP(col, p) << 1) +#define SECBPM(col, p) (SECBPL(col, p)+1) #if defined USE_ARRAY /* word macros */ -#define SECWQ(dia,p) (qacc[dia][p] >> 1) -#define SECWQLO(dia,p) (qacc[dia][p] >> 1) -#define SECWQHI(dia,p) (qacc[dia][p] >> 1) +#define SECWQ(dia, p) (qacc[dia][p] >> 1) +#define SECWQLO(dia, p) (qacc[dia][p] >> 1) +#define SECWQHI(dia, p) (qacc[dia][p] >> 1) /* byte macros */ -#define SECBQLLO(dia,p) (qacc[dia][p]) -#define SECBQLHI(dia,p) (qacc[dia][p]) -#define SECBQL(dia,p) (qacc[dia][p]) -#define SECBQMLO(dia,p) (SECBQLLO(dia,p)+1) -#define SECBQMHI(dia,p) (SECBQLHI(dia,p)+1) -#define SECBQM(dia,p) (SECBQL(dia,p)+1) +#define SECBQLLO(dia, p) (qacc[dia][p]) +#define SECBQLHI(dia, p) (qacc[dia][p]) +#define SECBQL(dia, p) (qacc[dia][p]) +#define SECBQMLO(dia, p) (SECBQLLO(dia, p)+1) +#define SECBQMHI(dia, p) (SECBQLHI(dia, p)+1) +#define SECBQM(dia, p) (SECBQL(dia, p)+1) #else -#define SECWQ(dia,p) (SECWQC(dia,p)) -#define SECWQLO(dia,p) (SECWQLOC(dia,p)) -#define SECWQHI(dia,p) (SECWQHIC(dia,p)) -#define SECBQLLO(dia,p) (SECBQLLOC(dia,p)) -#define SECBQLHI(dia,p) (SECBQLHIC(dia,p)) -#define SECBQL(dia,p) (SECBQLC(dia,p)) -#define SECBQMLO(dia,p) (SECBQMLOC(dia,p)) -#define SECBQMHI(dia,p) (SECBQMHIC(dia,p)) -#define SECBQM(dia,p) (SECBQMC(dia,p)) +#define SECWQ(dia, p) (SECWQC(dia, p)) +#define SECWQLO(dia, p) (SECWQLOC(dia, p)) +#define SECWQHI(dia, p) (SECWQHIC(dia, p)) +#define SECBQLLO(dia, p) (SECBQLLOC(dia, p)) +#define SECBQLHI(dia, p) (SECBQLHIC(dia, p)) +#define SECBQL(dia, p) (SECBQLC(dia, p)) +#define SECBQMLO(dia, p) (SECBQMLOC(dia, p)) +#define SECBQMHI(dia, p) (SECBQMHIC(dia, p)) +#define SECBQM(dia, p) (SECBQMC(dia, p)) #endif /* word macros */ -#define SECWQLOC(dia,p) ((unsigned short)(L12_P_LENGTH*((p)+(dia))+(p)) % (unsigned short) (L12_P_LENGTH*L12_Q_LENGTH)) -#define SECWQHIC(dia,p) (L12_Q_LENGTH*(p)+(dia)) -#define SECWQC(dia,p) ((p) < L12_P_LENGTH ? SECWQLOC(dia,p) : SECWQHIC(dia,p)) +#define SECWQLOC(dia, p) ((unsigned short)(L12_P_LENGTH*((p)+(dia))+(p)) % (unsigned short) (L12_P_LENGTH*L12_Q_LENGTH)) +#define SECWQHIC(dia, p) (L12_Q_LENGTH*(p)+(dia)) +#define SECWQC(dia, p) ((p) < L12_P_LENGTH ? SECWQLOC(dia, p) : SECWQHIC(dia, p)) /* byte macros */ -#define SECBQLLOC(dia,p) (SECWQLOC(dia,p) << 1) -#define SECBQLHIC(dia,p) (SECWQHIC(dia,p) << 1) -#define SECBQLC(dia,p) ((p) < L12_P_LENGTH ? SECBQLLOC(dia,p) : SECBQLHIC(dia,p)) -#define SECBQMLOC(dia,p) (SECBQLLOC(dia,p)+1) -#define SECBQMHIC(dia,p) (SECBQLHIC(dia,p)+1) -#define SECBQMC(dia,p) (SECBQLC(dia,p)+1) +#define SECBQLLOC(dia, p) (SECWQLOC(dia, p) << 1) +#define SECBQLHIC(dia, p) (SECWQHIC(dia, p) << 1) +#define SECBQLC(dia, p) ((p) < L12_P_LENGTH ? SECBQLLOC(dia, p) : SECBQLHIC(dia, p)) +#define SECBQMLOC(dia, p) (SECBQLLOC(dia, p)+1) +#define SECBQMHIC(dia, p) (SECBQLHIC(dia, p)+1) +#define SECBQMC(dia, p) (SECBQLC(dia, p)+1) /* @@ -144,16 +145,16 @@ * DIA calculates the diagonal */ /* p parity macros */ -#define POSP(off) (unsigned)((unsigned short)(off) / (unsigned short)L12_P_LENGTH) -#define COL(off) (unsigned)((unsigned short)(off) % (unsigned short)L12_P_LENGTH) +#define POSP(off) (unsigned)((unsigned short)(off) / (unsigned short)L12_P_LENGTH) +#define COL(off) (unsigned)((unsigned short)(off) % (unsigned short)L12_P_LENGTH) /* q parity macros */ -#define POSQLO(off) COL(off) -#define POSQHI(off) (unsigned)((unsigned short)(off) / (unsigned short)L12_Q_LENGTH) -#define POSQ(off) ((unsigned short)(off) < (unsigned short)(L12_P_LENGTH*L12_Q_LENGTH) ? POSQLO(off) : POSQHI(off)) -#define DIALO(off) (unsigned)((unsigned short)(POSP(off)-COL(off)+2*L12_Q_LENGTH)%(unsigned short)L12_Q_LENGTH) -#define DIAHI(off) (unsigned)((unsigned short)(off) % (unsigned short)L12_Q_LENGTH) -#define DIA(off) ((unsigned short)(off) < (unsigned short)(L12_P_LENGTH*L12_Q_LENGTH) ? DIALO(off) : DIAHI(off)) +#define POSQLO(off) COL(off) +#define POSQHI(off) (unsigned)((unsigned short)(off) / (unsigned short)L12_Q_LENGTH) +#define POSQ(off) ((unsigned short)(off) < (unsigned short)(L12_P_LENGTH*L12_Q_LENGTH) ? POSQLO(off) : POSQHI(off)) +#define DIALO(off) (unsigned)((unsigned short)(POSP(off)-COL(off)+2*L12_Q_LENGTH)%(unsigned short)L12_Q_LENGTH) +#define DIAHI(off) (unsigned)((unsigned short)(off) % (unsigned short)L12_Q_LENGTH) +#define DIA(off) ((unsigned short)(off) < (unsigned short)(L12_P_LENGTH*L12_Q_LENGTH) ? DIALO(off) : DIAHI(off)) #ifdef EDC_ENCODER /* @@ -183,17 +184,17 @@ * Sync-, header- and edc- fields will be added. * * inout is an array of 2352 or more bytes. - * address is a pointer to a bcdmsf_t struct + * address is a pointer to a bcdmsf_t struct * holding bcd values for minute/second/frame address parts. * */ -int do_encode_L2 __PR((unsigned char *inout, int sectortype, bcdmsf_t *address)); +int do_encode_L2 __PR((unsigned char *inout, int sectortype, bcdmsf_t *address)); #endif #ifdef EDC_DECODER #define NO_ERRORS 1 -#define FULLY_CORRECTED 0 +#define FULLY_CORRECTED 0 #define UNCORRECTABLE -1 #define WRONG_TYPE -2 /* @@ -210,7 +211,9 @@ * 0 corrected * 1 uncorrected (no correction needed) */ -int do_decode_L2 __PR((unsigned char inout[(L2_RAW + L2_Q + L2_P)], int sectortype, int have_erasures, unsigned char erasures[(L2_RAW + L2_Q + L2_P)])); +int do_decode_L2 __PR((unsigned char inout[(L2_RAW + L2_Q + L2_P)], + int sectortype, int have_erasures, + unsigned char erasures[(L2_RAW + L2_Q + L2_P)])); /* * calculate the crc checksum depending on the sector type. @@ -228,8 +231,8 @@ -int encode_L2_P __PR((unsigned char *inout)); -int encode_L2_Q __PR((unsigned char *inout)); +int encode_L2_P __PR((unsigned char *inout)); +int encode_L2_Q __PR((unsigned char *inout)); #endif extern const unsigned short qacc[26][64]; @@ -243,24 +246,24 @@ * generates f2 frames from otherwise fully formatted sectors (generated by * do_encode_L2()). */ -int scramble_L2 __PR((unsigned char *inout)); +int scramble_L2 __PR((unsigned char *inout)); #endif #ifdef EDC_SUBCHANNEL /* * r-w sub channel definitions */ -#define RS_SUB_RW_BITS 6 +#define RS_SUB_RW_BITS 6 -#define PACKETS_PER_SUBCHANNELFRAME 4 -#define LSUB_RAW 18 -#define LSUB_QRAW 2 +#define PACKETS_PER_SUBCHANNELFRAME 4 +#define LSUB_RAW 18 +#define LSUB_QRAW 2 /* * 6 bit entities */ -#define LSUB_Q 2 -#define LSUB_P 4 +#define LSUB_Q 2 +#define LSUB_P 4 typedef struct del *edc_sub_delp; @@ -282,7 +285,7 @@ * This routine fills the q and p parity fields. * No interleaving is done here. */ -int do_encode_sub __PR(( +int do_encode_sub __PR(( unsigned char inout[(LSUB_RAW + LSUB_Q + LSUB_P) * PACKETS_PER_SUBCHANNELFRAME])); @@ -298,7 +301,7 @@ * swap : if true, perform low level permutations (swaps) * delay: if true, use low level delay line * delp: pointer to a edc_sub_del struct - * (holding the state of the delay line) + * (holding the state of the delay line) * this pointer is dereferenced only, if parameter delay is true. */ int @@ -320,7 +323,7 @@ * swap : if true, perform permutations (swaps) * delay: if true, use delay line * delp: pointer to a edc_sub_delp struct - * (holding the state of the delay line) + * (holding the state of the delay line) * this pointer is dereferenced only, if parameter delay is true. */ int @@ -342,10 +345,9 @@ */ int do_decode_sub __PR(( unsigned char inout[(LSUB_RAW + LSUB_Q + LSUB_P) * PACKETS_PER_SUBCHANNELFRAME], - int have_erasures, + int have_erasures, unsigned char erasures[(LSUB_RAW + LSUB_Q+LSUB_P) *PACKETS_PER_SUBCHANNELFRAME], -int results[PACKETS_PER_SUBCHANNELFRAME] - )); +int results[PACKETS_PER_SUBCHANNELFRAME])); int check_sub __PR((unsigned char input[])); @@ -356,5 +358,7 @@ /* * XXX Remove this if EDC_DECODER_HACK is removed */ -int do_decode_L2 __PR((unsigned char inout[(L2_RAW + L2_Q + L2_P)], int sectortype, int have_erasures, unsigned char erasures[(L2_RAW + L2_Q + L2_P)])); +int do_decode_L2 __PR((unsigned char inout[(L2_RAW + L2_Q + L2_P)], + int sectortype, int have_erasures, + unsigned char erasures[(L2_RAW + L2_Q + L2_P)])); int crc_check __PR((unsigned char inout[(L2_RAW + L2_Q + L2_P)], int type)); diff -Nru cdrtools-2.01.01a33/libedc/edcspeed.c cdrtools-3.02a09/libedc/edcspeed.c --- cdrtools-2.01.01a33/libedc/edcspeed.c 2006-09-13 13:36:03.000000000 +0000 +++ cdrtools-3.02a09/libedc/edcspeed.c 2017-07-15 18:15:36.000000000 +0000 @@ -1,13 +1,15 @@ -/* @(#)edcspeed.c 1.2 06/09/13 Copyright 2002-2006 J. Schilling */ +/* @(#)edcspeed.c 1.7 17/07/15 Copyright 2002-2017 J. Schilling */ +#include #ifndef lint -static char sccsid[] = - "@(#)edcspeed.c 1.2 06/09/13 Copyright 2002-2006 J. Schilling"; +static UConst char sccsid[] = + "@(#)edcspeed.c 1.7 17/07/15 Copyright 2002-2017 J. Schilling"; #endif /* - * Copyright (c) 2002-2006 J. Schilling + * Copyright (c) 2002-2017 J. Schilling */ -#include -#include +/*@@C@@*/ + +#include #include #include #include @@ -22,26 +24,25 @@ LOCAL int encspeed() { - register Uchar *sect; + Uchar sbuf[2352]; + register Uchar *sect = sbuf; register int i; register int end; register int secs; struct timeval tv; struct timeval tv2; - sect = malloc(2352); - secs = 10; end = 75*1000000 * secs; - memset(sect, 0, sizeof(sect)); - for (i=0; i < 2352; ) { + memset(sect, 0, sizeof (sect)); + for (i = 0; i < 2352; ) { sect[i++] = 'J'; sect[i++] = 'S'; } gettimeofday(&tv, (struct timezone *)0); - for (i=0; i < end; i++) { + for (i = 0; i < end; i++) { #ifdef OLD_LIBEDC do_encode_L2(sect, 1, 1); scramble_L2(sect); @@ -61,7 +62,7 @@ printf("%d sectors/%ds\n", i, secs); printf("%d sectors/s\n", i/secs); printf("speed: %5.2fx\n", (1.0*i)/750.0); - return ((i+74)/75) / secs ; + return (((i+74)/75) / secs); } int diff -Nru cdrtools-2.01.01a33/libedc/libedc_dec.mk cdrtools-3.02a09/libedc/libedc_dec.mk --- cdrtools-2.01.01a33/libedc/libedc_dec.mk 2006-05-15 19:14:32.000000000 +0000 +++ cdrtools-3.02a09/libedc/libedc_dec.mk 2010-06-23 20:48:26.000000000 +0000 @@ -1,4 +1,4 @@ -#ident "@(#)libedc_dec.mk 1.1 06/05/15 " +#ident "@(#)libedc_dec.mk 1.3 10/06/23 " ########################################################################### SRCROOT= .. RULESDIR= RULES @@ -15,8 +15,8 @@ # be reported to the GCC people. As a workaround, you may remove the next # lines to fall back to the standard optimisation level. # -_XARCH_OPT= $(OARCH:%cc64=-xarch=generic64) -XARCH_OPT= $(_XARCH_OPT:%cc=-xarch=generic) +_XARCH_OPT= $(OARCH:%cc64=$(SUNPROCOPT64)) +XARCH_OPT= $(_XARCH_OPT:%cc=$(XARCH_GEN)) SUNPROCOPTOPT= -fast $(XARCH_OPT) GCCOPTOPT= -O3 -fexpensive-optimizations diff -Nru cdrtools-2.01.01a33/libedc/libedc_dec_p.mk cdrtools-3.02a09/libedc/libedc_dec_p.mk --- cdrtools-2.01.01a33/libedc/libedc_dec_p.mk 2007-06-30 11:13:33.000000000 +0000 +++ cdrtools-3.02a09/libedc/libedc_dec_p.mk 2010-06-23 20:48:26.000000000 +0000 @@ -1,4 +1,4 @@ -#ident @(#)libedc_dec_p.mk 1.2 07/06/30 +#ident @(#)libedc_dec_p.mk 1.5 10/06/23 ########################################################################### SRCROOT= .. RULESDIR= RULES @@ -6,6 +6,7 @@ ########################################################################### SUBARCHDIR= /profiled +SUBINSDIR= /profiled INSDIR= lib TARGETLIB= edc_ecc_dec COPTS += $(COPTGPROF) @@ -17,8 +18,8 @@ # be reported to the GCC people. As a workaround, you may remove the next # lines to fall back to the standard optimisation level. # -_XARCH_OPT= $(OARCH:%cc64=-xarch=generic64) -XARCH_OPT= $(_XARCH_OPT:%cc=-xarch=generic) +_XARCH_OPT= $(OARCH:%cc64=$(SUNPROCOPT64)) +XARCH_OPT= $(_XARCH_OPT:%cc=$(XARCH_GEN)) SUNPROCOPTOPT= -fast $(XARCH_OPT) GCCOPTOPT= -O3 -fexpensive-optimizations diff -Nru cdrtools-2.01.01a33/libedc/libedc_ecc_dec-mapvers cdrtools-3.02a09/libedc/libedc_ecc_dec-mapvers --- cdrtools-2.01.01a33/libedc/libedc_ecc_dec-mapvers 2006-09-14 12:25:08.000000000 +0000 +++ cdrtools-3.02a09/libedc/libedc_ecc_dec-mapvers 2010-10-02 19:54:56.000000000 +0000 @@ -1,4 +1,4 @@ -#ident %W% %E% %Q% +# /* @(#)libedc_ecc_dec-mapvers 1.2 10/10/02 Copyright 2006-2010 J. Schilling */ SCHILY_1.0 { global: diff -Nru cdrtools-2.01.01a33/libedc/libedc_ecc-mapvers cdrtools-3.02a09/libedc/libedc_ecc-mapvers --- cdrtools-2.01.01a33/libedc/libedc_ecc-mapvers 2006-05-15 19:14:32.000000000 +0000 +++ cdrtools-3.02a09/libedc/libedc_ecc-mapvers 2010-10-02 19:54:56.000000000 +0000 @@ -1,4 +1,4 @@ -# @(#)libedc_ecc-mapvers 1.2 06/05/14 Copyright 2005 J. Schilling +# /* @(#)libedc_ecc-mapvers 1.3 10/10/02 Copyright 2005-2010 J. Schilling */ SCHILY_1.1 { global: diff -Nru cdrtools-2.01.01a33/libedc/libedc.mk cdrtools-3.02a09/libedc/libedc.mk --- cdrtools-2.01.01a33/libedc/libedc.mk 2006-05-15 19:14:32.000000000 +0000 +++ cdrtools-3.02a09/libedc/libedc.mk 2010-06-23 20:48:26.000000000 +0000 @@ -1,4 +1,4 @@ -#ident @(#)libedc.mk 1.5 05/08/06 +#ident @(#)libedc.mk 1.7 10/06/23 ########################################################################### SRCROOT= .. RULESDIR= RULES @@ -19,8 +19,8 @@ # be reported to the GCC people. As a workaround, you may remove the next # lines to fall back to the standard optimisation level. # -_XARCH_OPT= $(OARCH:%cc64=-xarch=generic64) -XARCH_OPT= $(_XARCH_OPT:%cc=-xarch=generic) +_XARCH_OPT= $(OARCH:%cc64=$(SUNPROCOPT64)) +XARCH_OPT= $(_XARCH_OPT:%cc=$(XARCH_GEN)) SUNPROCOPTOPT= -fast $(XARCH_OPT) GCCOPTOPT= -O3 -fexpensive-optimizations diff -Nru cdrtools-2.01.01a33/libedc/libedc_p.mk cdrtools-3.02a09/libedc/libedc_p.mk --- cdrtools-2.01.01a33/libedc/libedc_p.mk 2007-06-30 11:13:33.000000000 +0000 +++ cdrtools-3.02a09/libedc/libedc_p.mk 2010-06-23 20:48:26.000000000 +0000 @@ -1,4 +1,4 @@ -#ident @(#)libedc_p.mk 1.2 07/06/30 +#ident @(#)libedc_p.mk 1.5 10/06/23 ########################################################################### SRCROOT= .. RULESDIR= RULES @@ -6,6 +6,7 @@ ########################################################################### SUBARCHDIR= /profiled +SUBINSDIR= /profiled #.SEARCHLIST: . $(ARCHDIR) stdio $(ARCHDIR) #VPATH= .:stdio:$(ARCHDIR) INSDIR= lib @@ -21,8 +22,8 @@ # be reported to the GCC people. As a workaround, you may remove the next # lines to fall back to the standard optimisation level. # -_XARCH_OPT= $(OARCH:%cc64=-xarch=generic64) -XARCH_OPT= $(_XARCH_OPT:%cc=-xarch=generic) +_XARCH_OPT= $(OARCH:%cc64=$(SUNPROCOPT64)) +XARCH_OPT= $(_XARCH_OPT:%cc=$(XARCH_GEN)) SUNPROCOPTOPT= -fast $(XARCH_OPT) GCCOPTOPT= -O3 -fexpensive-optimizations diff -Nru cdrtools-2.01.01a33/libedc/repair.c cdrtools-3.02a09/libedc/repair.c --- cdrtools-2.01.01a33/libedc/repair.c 2006-09-13 13:36:03.000000000 +0000 +++ cdrtools-3.02a09/libedc/repair.c 2010-05-24 13:57:23.000000000 +0000 @@ -1,7 +1,8 @@ -/* @(#)repair.c 1.2 06/09/13 Copyright 2001-2006 J. Schilling */ +/* @(#)repair.c 1.4 10/05/24 Copyright 2001-2010 J. Schilling */ +#include #ifndef lint -static char sccsid[] = - "@(#)repair.c 1.2 06/09/13 Copyright 2001-2006 J. Schilling"; +static UConst char sccsid[] = + "@(#)repair.c 1.4 10/05/24 Copyright 2001-2010 J. Schilling"; #endif /* * Code to check libedc_ecc_dec @@ -18,8 +19,7 @@ * file and include the License file CDDL.Schily.txt from this distribution. */ -#include -#include +#include #include #include @@ -28,7 +28,7 @@ #define EDC_LAYER2 #define EDC_ENCODER -#define EDC_DECODER +#define EDC_DECODER #define EDC_SUBCHANNEL #include "ecc.h" @@ -67,8 +67,8 @@ printf("crc_check %d\n", crc_check((unsigned char *)xxx, EDC_MODE_1)); -#define FALSE 0 - do_decode_L2((unsigned char*)xxx, EDC_MODE_1, FALSE, 0); +#define FALSE 0 + do_decode_L2((unsigned char *)xxx, EDC_MODE_1, FALSE, 0); printf("crc_check %d\n", crc_check((unsigned char *)xxx, EDC_MODE_1)); diff -Nru cdrtools-2.01.01a33/libedc/shledc_dec.mk cdrtools-3.02a09/libedc/shledc_dec.mk --- cdrtools-2.01.01a33/libedc/shledc_dec.mk 2007-02-07 20:51:50.000000000 +0000 +++ cdrtools-3.02a09/libedc/shledc_dec.mk 2010-06-23 20:48:26.000000000 +0000 @@ -1,4 +1,4 @@ -#ident @(#)shledc_dec.mk 1.2 07/02/07 +#ident @(#)shledc_dec.mk 1.4 10/06/23 ########################################################################### SRCROOT= .. RULESDIR= RULES @@ -16,8 +16,8 @@ # be reported to the GCC people. As a workaround, you may remove the next # lines to fall back to the standard optimisation level. # -_XARCH_OPT= $(OARCH:%cc64=-xarch=generic64) -XARCH_OPT= $(_XARCH_OPT:%cc=-xarch=generic) +_XARCH_OPT= $(OARCH:%cc64=$(SUNPROCOPT64)) +XARCH_OPT= $(_XARCH_OPT:%cc=$(XARCH_GEN)) SUNPROCOPTOPT= -fast $(XARCH_OPT) GCCOPTOPT= -O3 -fexpensive-optimizations diff -Nru cdrtools-2.01.01a33/libedc/shledc.mk cdrtools-3.02a09/libedc/shledc.mk --- cdrtools-2.01.01a33/libedc/shledc.mk 2005-08-06 12:50:17.000000000 +0000 +++ cdrtools-3.02a09/libedc/shledc.mk 2010-06-23 20:48:26.000000000 +0000 @@ -1,4 +1,4 @@ -#ident @(#)shledc.mk 1.2 05/08/06 +#ident @(#)shledc.mk 1.4 10/06/23 ########################################################################### SRCROOT= .. RULESDIR= RULES @@ -20,8 +20,8 @@ # be reported to the GCC people. As a workaround, you may remove the next # lines to fall back to the standard optimisation level. # -_XARCH_OPT= $(OARCH:%cc64=-xarch=generic64) -XARCH_OPT= $(_XARCH_OPT:%cc=-xarch=generic) +_XARCH_OPT= $(OARCH:%cc64=$(SUNPROCOPT64)) +XARCH_OPT= $(_XARCH_OPT:%cc=$(XARCH_GEN)) SUNPROCOPTOPT= -fast $(XARCH_OPT) GCCOPTOPT= -O3 -fexpensive-optimizations diff -Nru cdrtools-2.01.01a33/libfile/apprentice.c cdrtools-3.02a09/libfile/apprentice.c --- cdrtools-2.01.01a33/libfile/apprentice.c 2007-02-08 09:42:39.000000000 +0000 +++ cdrtools-3.02a09/libfile/apprentice.c 2017-07-17 19:52:39.000000000 +0000 @@ -1,7 +1,8 @@ -/* @(#)apprentice.c 1.10 07/02/08 joerg */ +/* @(#)apprentice.c 1.14 17/07/17 joerg */ +#include #ifndef lint -static char sccsid[] = - "@(#)apprentice.c 1.10 07/02/08 joerg"; +static UConst char sccsid[] = + "@(#)apprentice.c 1.14 17/07/17 joerg"; #endif /* ** find file types by using a modified "magic" file @@ -17,37 +18,41 @@ * Copyright (c) Ian F. Darwin, 1987. * Written by Ian F. Darwin. * - * This software is not subject to any license of the American Telephone - * and Telegraph Company or of the Regents of the University of California. - * - * Permission is granted to anyone to use this software for any purpose on - * any computer system, and to alter it and redistribute it freely, subject - * to the following restrictions: - * - * 1. The author is not responsible for the consequences of use of this - * software, no matter how awful, even if they arise from flaws in it. + * This software is not subject to any export provision of the United States + * Department of Commerce, and may be exported to any country or planet. * - * 2. The origin of this software must not be misrepresented, either by - * explicit claim or by omission. Since few users ever read sources, - * credits must appear in the documentation. - * - * 3. Altered versions must be plainly marked as such, and must not be - * misrepresented as being the original software. Since few users - * ever read sources, credits must appear in the documentation. - * - * 4. This notice may not be removed or altered. + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice immediately at the beginning of the file, without modification, + * this list of conditions, and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. */ -#include -#include +#include #include #include -#include +#include #include "file.h" #include #ifndef lint -static char *moduleid = +static UConst char moduleid[] = "@(#)$Id: apprentice.c,v 1.25 1997/01/15 17:23:24 christos Exp $"; #endif /* lint */ @@ -180,13 +185,15 @@ int i = 0, nd = *ndx; struct magic *m; char *t, *s; + struct magic *__f_magic2; #define ALLOC_INCR 20 if (nd+1 >= maxmagic){ maxmagic += ALLOC_INCR; - if ((__f_magic = (struct magic *) realloc(__f_magic, + if ((__f_magic2 = (struct magic *) realloc(__f_magic, sizeof(struct magic) * maxmagic)) == NULL) { + maxmagic -= ALLOC_INCR; #ifdef MAIN (void) fprintf(stderr, "%s: Out of memory.\n", progname); #else @@ -197,6 +204,7 @@ else exit(1); } + __f_magic = __f_magic2; memset(&__f_magic[*ndx], 0, sizeof(struct magic) * ALLOC_INCR); } m = &__f_magic[*ndx]; diff -Nru cdrtools-2.01.01a33/libfile/file.c cdrtools-3.02a09/libfile/file.c --- cdrtools-2.01.01a33/libfile/file.c 2006-09-13 13:46:24.000000000 +0000 +++ cdrtools-3.02a09/libfile/file.c 2009-08-04 19:25:12.000000000 +0000 @@ -1,7 +1,8 @@ -/* @(#)file.c 1.6 06/09/13 joerg */ +/* @(#)file.c 1.10 09/08/04 joerg */ +#include #ifndef lint -static char sccsid[] = - "@(#)file.c 1.6 06/09/13 joerg"; +static UConst char sccsid[] = + "@(#)file.c 1.10 09/08/04 joerg"; #endif /* ** find file types by using a modified "magic" file @@ -40,33 +41,37 @@ * Copyright (c) Ian F. Darwin, 1987. * Written by Ian F. Darwin. * - * This software is not subject to any license of the American Telephone - * and Telegraph Company or of the Regents of the University of California. - * - * Permission is granted to anyone to use this software for any purpose on - * any computer system, and to alter it and redistribute it freely, subject - * to the following restrictions: - * - * 1. The author is not responsible for the consequences of use of this - * software, no matter how awful, even if they arise from flaws in it. + * This software is not subject to any export provision of the United States + * Department of Commerce, and may be exported to any country or planet. * - * 2. The origin of this software must not be misrepresented, either by - * explicit claim or by omission. Since few users ever read sources, - * credits must appear in the documentation. - * - * 3. Altered versions must be plainly marked as such, and must not be - * misrepresented as being the original software. Since few users - * ever read sources, credits must appear in the documentation. - * - * 4. This notice may not be removed or altered. + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice immediately at the beginning of the file, without modification, + * this list of conditions, and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. */ #ifndef lint -static char *moduleid = +static UConst char moduleid[] = "@(#)$Id: file.c,v 1.38 1997/01/15 19:28:35 christos Exp $"; #endif /* lint */ -#include -#include +#include #include #include /* for read() */ #include @@ -80,7 +85,7 @@ #endif #if 0 -#include /* for byte swapping */ +#include /* for byte swapping */ #endif #include "patchlevel.h" diff -Nru cdrtools-2.01.01a33/libfile/file.h cdrtools-3.02a09/libfile/file.h --- cdrtools-2.01.01a33/libfile/file.h 2007-05-19 21:25:18.000000000 +0000 +++ cdrtools-3.02a09/libfile/file.h 2009-07-13 19:23:50.000000000 +0000 @@ -1,4 +1,4 @@ -/* @(#)file.h 1.10 07/05/19 joerg */ +/* @(#)file.h 1.12 09/07/13 joerg */ /* * file.h - definitions for file(1) program * @(#)$Id: file.h,v 1.25 1997/01/15 19:28:35 christos Exp $ @@ -6,25 +6,30 @@ * Copyright (c) Ian F. Darwin, 1987. * Written by Ian F. Darwin. * - * This software is not subject to any license of the American Telephone - * and Telegraph Company or of the Regents of the University of California. + * This software is not subject to any export provision of the United States + * Department of Commerce, and may be exported to any country or planet. * - * Permission is granted to anyone to use this software for any purpose on - * any computer system, and to alter it and redistribute it freely, subject - * to the following restrictions: - * - * 1. The author is not responsible for the consequences of use of this - * software, no matter how awful, even if they arise from flaws in it. - * - * 2. The origin of this software must not be misrepresented, either by - * explicit claim or by omission. Since few users ever read sources, - * credits must appear in the documentation. - * - * 3. Altered versions must be plainly marked as such, and must not be - * misrepresented as being the original software. Since few users - * ever read sources, credits must appear in the documentation. - * - * 4. This notice may not be removed or altered. + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice immediately at the beginning of the file, without modification, + * this list of conditions, and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. */ #ifndef __file_h__ @@ -80,7 +85,7 @@ char desc[MAXDESC]; /* description */ }; -#include /* Include that here, to make sure __P gets defined */ +#include extern int init_magic __PR((char *)); extern int ascmagic __PR((unsigned char *, int)); diff -Nru cdrtools-2.01.01a33/libfile/LEGAL.NOTICE cdrtools-3.02a09/libfile/LEGAL.NOTICE --- cdrtools-2.01.01a33/libfile/LEGAL.NOTICE 1996-06-22 22:04:22.000000000 +0000 +++ cdrtools-3.02a09/libfile/LEGAL.NOTICE 2008-10-19 20:39:41.000000000 +0000 @@ -1,32 +1,37 @@ -# @(#)LEGAL.NOTICE 1.1 96/06/23 joerg +# @(#)LEGAL.NOTICE 1.2 08/10/19 joerg Copyright (c) Ian F. Darwin 1986, 1987, 1989, 1990, 1991, 1992, 1994, 1995. Software written by Ian F. Darwin and others; maintained by Christos Zoulas. $Id: LEGAL.NOTICE,v 1.9 1995/10/27 23:14:20 christos Exp $ -This software (or derivative software) may not be made subject to any -license which denies anyone permission to alter it and redistribute it -freely. Derivative software must also still fall under this license. +License changed Oct 19th 2008 by J. Schilling with permission from +Ian F. Darwin, Christos Zoulas and James Pearson to: + +$File: COPYING,v 1.1 2008/02/05 19:08:11 christos Exp $ +Copyright (c) Ian F. Darwin 1986, 1987, 1989, 1990, 1991, 1992, 1994, 1995. +Software written by Ian F. Darwin and others; +maintained 1994- Christos Zoulas. This software is not subject to any export provision of the United States Department of Commerce, and may be exported to any country or planet. -Permission is granted to anyone to use this software for any purpose on -any computer system, and to alter it and redistribute it freely, subject -to the following restrictions: - -1. The author is not responsible for the consequences of use of this - software, no matter how awful, even if they arise from flaws in it. - -2. The origin of this software must not be misrepresented, either by - explicit claim or by omission. Since few users ever read sources, - credits must appear in the documentation. - -3. Altered versions must be plainly marked as such, and must not be - misrepresented as being the original software. Since few users - ever read sources, credits must appear in the documentation. - Derivative works must also be marked as such, and credits must appear - in the documentation. - -4. This notice may not be removed or altered. - - +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright + notice immediately at the beginning of the file, without modification, + this list of conditions, and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +SUCH DAMAGE. diff -Nru cdrtools-2.01.01a33/libfile/libfile-mapvers cdrtools-3.02a09/libfile/libfile-mapvers --- cdrtools-2.01.01a33/libfile/libfile-mapvers 2005-06-12 19:04:15.000000000 +0000 +++ cdrtools-3.02a09/libfile/libfile-mapvers 2010-10-02 19:55:33.000000000 +0000 @@ -1,3 +1,5 @@ +# /* @(#)libfile-mapvers 1.1 10/10/02 Copyright 2005-2010 J. Schilling */ + SCHILY_1.0 { global: clean_magic; @@ -7,4 +9,4 @@ local: *; -}; \ No newline at end of file +}; diff -Nru cdrtools-2.01.01a33/libfile/libfile_p.mk cdrtools-3.02a09/libfile/libfile_p.mk --- cdrtools-2.01.01a33/libfile/libfile_p.mk 2007-06-30 11:13:33.000000000 +0000 +++ cdrtools-3.02a09/libfile/libfile_p.mk 2008-01-11 17:24:28.000000000 +0000 @@ -1,4 +1,4 @@ -#ident @(#)libfile_p.mk 1.3 07/06/30 +#ident @(#)libfile_p.mk 1.4 08/01/11 ########################################################################### # Sample makefile for non-shared libraries ########################################################################### @@ -8,6 +8,7 @@ ########################################################################### SUBARCHDIR= /profiled +SUBINSDIR= /profiled INSDIR= lib TARGETLIB= file #CPPOPTS += -DFOKUS diff -Nru cdrtools-2.01.01a33/libfile/softmagic.c cdrtools-3.02a09/libfile/softmagic.c --- cdrtools-2.01.01a33/libfile/softmagic.c 2007-02-04 00:59:07.000000000 +0000 +++ cdrtools-3.02a09/libfile/softmagic.c 2009-07-10 22:34:41.000000000 +0000 @@ -1,7 +1,8 @@ -/* @(#)softmagic.c 1.9 07/02/04 joerg */ +/* @(#)softmagic.c 1.12 09/07/11 joerg */ +#include #ifndef lint -static char sccsid[] = - "@(#)softmagic.c 1.9 07/02/04 joerg"; +static UConst char sccsid[] = + "@(#)softmagic.c 1.12 09/07/11 joerg"; #endif /* ** find file types by using a modified "magic" file @@ -17,29 +18,33 @@ * Copyright (c) Ian F. Darwin, 1987. * Written by Ian F. Darwin. * - * This software is not subject to any license of the American Telephone - * and Telegraph Company or of the Regents of the University of California. - * - * Permission is granted to anyone to use this software for any purpose on - * any computer system, and to alter it and redistribute it freely, subject - * to the following restrictions: - * - * 1. The author is not responsible for the consequences of use of this - * software, no matter how awful, even if they arise from flaws in it. + * This software is not subject to any export provision of the United States + * Department of Commerce, and may be exported to any country or planet. * - * 2. The origin of this software must not be misrepresented, either by - * explicit claim or by omission. Since few users ever read sources, - * credits must appear in the documentation. - * - * 3. Altered versions must be plainly marked as such, and must not be - * misrepresented as being the original software. Since few users - * ever read sources, credits must appear in the documentation. - * - * 4. This notice may not be removed or altered. + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice immediately at the beginning of the file, without modification, + * this list of conditions, and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. */ -#include -#include +#include #include #include #include @@ -47,7 +52,7 @@ #include "file.h" #ifndef lint -static char *moduleid = +static UConst char moduleid[] = "@(#)$Id: softmagic.c,v 1.34 1997/01/15 19:28:35 christos Exp $"; #endif /* lint */ diff -Nru cdrtools-2.01.01a33/libfind/cmpdir.c cdrtools-3.02a09/libfind/cmpdir.c --- cdrtools-2.01.01a33/libfind/cmpdir.c 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/libfind/cmpdir.c 2009-07-10 22:14:37.000000000 +0000 @@ -0,0 +1,188 @@ +/* @(#)cmpdir.c 1.27 09/07/11 Copyright 2002-2009 J. Schilling */ +#include +#ifndef lint +static UConst char sccsid[] = + "@(#)cmpdir.c 1.27 09/07/11 Copyright 2002-2009 J. Schilling"; +#endif +/* + * Blocked directory sort/compare. + * + * Copyright (c) 2002-2009 J. Schilling + */ +/* + * The contents of this file are subject to the terms of the + * Common Development and Distribution License, Version 1.0 only + * (the "License"). You may not use this file except in compliance + * with the License. + * + * See the file CDDL.Schily.txt in this distribution for details. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file CDDL.Schily.txt from this distribution. + */ + +#include +#include +#include +#include +#include +#include +#include +#include + +EXPORT int fdircomp __PR((const void *p1, const void *p2)); +EXPORT char **sortdir __PR((char *dir, int *entp)); +EXPORT int cmpdir __PR((int ents1, int ents2, + char **ep1, char **ep2, + char **oa, char **od, + int *alenp, int *dlenp)); + +/* + * Compare directory entries from fetchdir(). + * Ignore first byte, it does not belong to the directory data. + */ +EXPORT int +fdircomp(p1, p2) + const void *p1; + const void *p2; +{ + register Uchar *s1; + register Uchar *s2; + + s1 = *(Uchar **)p1; + s2 = *(Uchar **)p2; + s1++; + s2++; + while (*s1 == *s2) { + if (*s1 == '\0') + return (0); + s1++; + s2++; + } + return (*s1 - *s2); +} + +/* + * Sort a directory string as returned by fetchdir(). + * + * Return allocated arry with string pointers. + */ +EXPORT char ** +sortdir(dir, entp) + char *dir; + int *entp; +{ + int ents = -1; + char **ea; + char *d; + char *p; + int i; + + if (entp) + ents = *entp; + if (ents < 0) { + d = dir; + ents = 0; + while (*d) { + ents++; + p = strchr(d, '\0'); + d = &p[1]; + } + } + ea = ___malloc((ents+1)*sizeof (char *), "sortdir"); + for (i = 0; i < ents; i++) { + ea[i] = NULL; + } + for (i = 0; i < ents; i++) { + ea[i] = dir; + p = strchr(dir, '\0'); + if (p == NULL) + break; + dir = ++p; + } + ea[ents] = NULL; + qsort(ea, ents, sizeof (char *), fdircomp); + if (entp) + *entp = ents; + return (ea); +} + +EXPORT int +cmpdir(ents1, ents2, ep1, ep2, oa, od, alenp, dlenp) + register int ents1; /* # of directory entries in arch */ + register int ents2; /* # of directory entries on disk */ + register char **ep1; /* Directory entry pointer array (arch) */ + register char **ep2; /* Directory entry pointer array (disk) */ + register char **oa; /* Only in arch pointer array */ + register char **od; /* Only on disk pointer array */ + int *alenp; /* Len pointer for "only in arch" array */ + int *dlenp; /* Len pointer for "only on disk" array */ +{ + register int i1; /* Index for 'only in archive' */ + register int i2; /* Index for 'only on disk' */ + register int d; /* 'diff' amount (== 0 means equal) */ + register int alen = 0; /* Number of ents only in archive */ + register int dlen = 0; /* Number of ents only on disk */ + + for (i1 = i2 = 0; i1 < ents1 && i2 < ents2; i1++, i2++) { + d = fdircomp(&ep1[i1], &ep2[i2]); + retry: + + if (d > 0) { + do { + d = fdircomp(&ep1[i1], &ep2[i2]); + if (d <= 0) + goto retry; + if (od) + od[dlen] = ep2[i2]; + dlen++; + i2++; + } while (i1 < ents1 && i2 < ents2); + } + if (d < 0) { + do { + d = fdircomp(&ep1[i1], &ep2[i2]); + if (d >= 0) + goto retry; + if (oa) + oa[alen] = ep1[i1]; + alen++; + i1++; + } while (i1 < ents1 && i2 < ents2); + } + /* + * Do not increment i1 & i2 in case that the last elements are + * not equal and need to be treaten as longer list elements in + * the code below. + */ + if (i1 >= ents1 || i2 >= ents2) + break; + } + /* + * One of both lists is longer after some amount. + */ + if (od == NULL) { + if (i2 < ents2) + dlen += ents2 - i2; + } else { + for (; i2 < ents2; i2++) { + od[dlen] = ep2[i2]; + dlen++; + } + } + if (oa == NULL) { + if (i1 < ents1) + alen += ents1 - i1; + } else { + for (; i1 < ents1; i1++) { + oa[alen] = ep1[i1]; + alen++; + } + } + if (alenp) + *alenp = alen; + if (dlenp) + *dlenp = dlen; + + return (alen + dlen); +} diff -Nru cdrtools-2.01.01a33/libfind/fetchdir.c cdrtools-3.02a09/libfind/fetchdir.c --- cdrtools-2.01.01a33/libfind/fetchdir.c 2007-04-06 21:50:21.000000000 +0000 +++ cdrtools-3.02a09/libfind/fetchdir.c 2016-03-10 22:45:20.000000000 +0000 @@ -1,12 +1,13 @@ -/* @(#)fetchdir.c 1.21 07/04/06 Copyright 2002-2007 J. Schilling */ +/* @(#)fetchdir.c 1.29 16/03/10 Copyright 2002-2016 J. Schilling */ +#include #ifndef lint -static char sccsid[] = - "@(#)fetchdir.c 1.21 07/04/06 Copyright 2002-2007 J. Schilling"; +static UConst char sccsid[] = + "@(#)fetchdir.c 1.29 16/03/10 Copyright 2002-2016 J. Schilling"; #endif /* * Blocked directory handling. * - * Copyright (c) 2002-2007 J. Schilling + * Copyright (c) 2002-2016 J. Schilling */ /* * The contents of this file are subject to the terms of the @@ -15,13 +16,14 @@ * with the License. * * See the file CDDL.Schily.txt in this distribution for details. + * A copy of the CDDL is also available via the Internet at + * http://www.opensource.org/licenses/cddl1.txt * * When distributing Covered Code, include this CDDL HEADER in each * file and include the License file CDDL.Schily.txt from this distribution. */ -#include -#include +#include #include #include #include @@ -31,23 +33,19 @@ #include #include #include -#ifdef __STAR__ -#include "star.h" -#include "starsubs.h" -#endif +#include #ifndef HAVE_LSTAT #define lstat stat #endif -EXPORT char *fetchdir __PR((char *dir, int *entp, int *lenp, ino_t **inop)); -EXPORT char *dfetchdir __PR((DIR *dir, char *dirname, int *entp, int *lenp, ino_t **inop)); -EXPORT int fdircomp __PR((const void *p1, const void *p2)); -EXPORT char **sortdir __PR((char *dir, int *entp)); -EXPORT int cmpdir __PR((int ents1, int ents2, - char **ep1, char **ep2, - char **oa, char **od, - int *alenp, int *dlenp)); +EXPORT char *fetchdir __PR((char *dir, int *entp, int *lenp, + ino_t **inop)); +#ifdef HAVE_DIRENT_D_TYPE +LOCAL int fdt __PR((int type)); +#endif +EXPORT char *dfetchdir __PR((DIR *dir, char *dir_name, int *entp, + int *lenp, ino_t **inop)); EXPORT char * fetchdir(dir, entp, lenp, inop) @@ -66,6 +64,42 @@ return (ret); } +#ifdef HAVE_DIRENT_D_TYPE +LOCAL int +fdt(type) + int type; +{ + switch (type) { + +#ifdef DT_FIFO + case DT_FIFO: return (FDT_FIFO); +#endif +#ifdef DT_CHR + case DT_CHR: return (FDT_CHR); +#endif +#ifdef DT_DIR + case DT_DIR: return (FDT_DIR); +#endif +#ifdef DT_BLK + case DT_BLK: return (FDT_BLK); +#endif +#ifdef DT_REG + case DT_REG: return (FDT_REG); +#endif +#ifdef DT_LNK + case DT_LNK: return (FDT_LNK); +#endif +#ifdef DT_SOCK + case DT_SOCK: return (FDT_SOCK); +#endif +#ifdef DT_WHT + case DT_WHT: return (FDT_WHT); +#endif + default: return (FDT_UNKN); + } +} +#endif /* HAVE_DIRENT_D_TYPE */ + /* * Fetch content of a directory and return all entries (except '.' & '..') * concatenated in one memory chunk. @@ -75,9 +109,9 @@ * The end of the returned string contains two additional null character. */ EXPORT char * -dfetchdir(d, dirname, entp, lenp, inop) +dfetchdir(d, dir_name, entp, lenp, inop) DIR *d; - char *dirname; /* The name of the directory */ + char *dir_name; /* The name of the directory */ int *entp; /* Pointer to # of entries found */ int *lenp; /* Pointer to len of returned str */ ino_t **inop; @@ -97,7 +131,7 @@ char sname[PATH_MAX+1]; #endif - if ((erg = __malloc(esize, "fetchdir")) == NULL) + if ((erg = ___malloc(esize, "fetchdir")) == NULL) return (NULL); erg[0] = '\0'; erg[1] = '\0'; @@ -117,7 +151,7 @@ mino *= 2; else mino += msize / sizeof (ino_t); - if ((ino = __realloc(ino, mino * sizeof (ino_t), "fetchdir")) == NULL) + if ((ino = ___realloc(ino, mino * sizeof (ino_t), "fetchdir")) == NULL) return (NULL); } #ifdef HAVE_DIRENT_D_INO @@ -130,9 +164,9 @@ * Do not care about speed, this should be a rare * exception. */ - if (dirname != NULL) { + if (dir_name != NULL) { snprintf(sname, sizeof (sname), "%s/%s", - dirname, name); + dir_name, name); sbuf.st_ino = (ino_t)0; lstat(sname, &sbuf); ino[nents] = sbuf.st_ino; @@ -154,14 +188,18 @@ if (esize < (off + nlen)) continue; - if ((erg = __realloc(erg, esize, "fetchdir")) == NULL) + if ((erg = ___realloc(erg, esize, "fetchdir")) == NULL) return (NULL); } #ifdef DEBUG if (off > 0) erg[off-1] = 2; /* Hack: ^B statt ^@ zwischen Namen */ #endif - erg[off++] = 1; /* Platzhalter: ^A vor jeden Namen */ +#ifdef HAVE_DIRENT_D_TYPE + erg[off++] = fdt(dp->d_type); /* File type */ +#else + erg[off++] = FDT_UNKN; /* Platzhalter: ^A vor jeden Namen */ +#endif strcpy(&erg[off], name); off += nlen -3; /* ^A + ^@^@ Platz fuer Ende */ @@ -187,158 +225,3 @@ return (erg); } - -/* - * XXX These functions should better go into cmpdir.c - */ -#ifdef __STAR__ -/* - * Compare directory entries from fetchdir(). - * Ignore first byte, it does not belong to the directory data. - */ -EXPORT int -fdircomp(p1, p2) - const void *p1; - const void *p2; -{ - register Uchar *s1; - register Uchar *s2; - - s1 = *(Uchar **)p1; - s2 = *(Uchar **)p2; - s1++; - s2++; - while (*s1 == *s2) { - if (*s1 == '\0') - return (0); - s1++; - s2++; - } - return (*s1 - *s2); -} - -/* - * Sort a directory string as returned by fetchdir(). - * - * Return allocated arry with string pointers. - */ -EXPORT char ** -sortdir(dir, entp) - char *dir; - int *entp; -{ - int ents = -1; - char **ea; - char *d; - char *p; - int i; - - if (entp) - ents = *entp; - if (ents < 0) { - d = dir; - ents = 0; - while (*d) { - ents++; - p = strchr(d, '\0'); - d = &p[1]; - } - } - ea = __malloc((ents+1)*sizeof (char *), "sortdir"); - for (i = 0; i < ents; i++) { - ea[i] = NULL; - } - for (i = 0; i < ents; i++) { - ea[i] = dir; - p = strchr(dir, '\0'); - if (p == NULL) - break; - dir = ++p; - } - ea[ents] = NULL; - qsort(ea, ents, sizeof (char *), fdircomp); - if (entp) - *entp = ents; - return (ea); -} - -EXPORT int -cmpdir(ents1, ents2, ep1, ep2, oa, od, alenp, dlenp) - register int ents1; /* # of directory entries in arch */ - register int ents2; /* # of directory entries on disk */ - register char **ep1; /* Directory entry pointer array (arch) */ - register char **ep2; /* Directory entry pointer array (disk) */ - register char **oa; /* Only in arch pointer array */ - register char **od; /* Only on disk pointer array */ - int *alenp; /* Len pointer for "only in arch" array */ - int *dlenp; /* Len pointer for "only on disk" array */ -{ - register int i1; /* Index for 'only in archive' */ - register int i2; /* Index for 'only on disk' */ - register int d; /* 'diff' amount (== 0 means equal) */ - register int alen = 0; /* Number of ents only in archive */ - register int dlen = 0; /* Number of ents only on disk */ - - for (i1 = i2 = 0; i1 < ents1 && i2 < ents2; i1++, i2++) { - d = fdircomp(&ep1[i1], &ep2[i2]); - retry: - - if (d > 0) { - do { - d = fdircomp(&ep1[i1], &ep2[i2]); - if (d <= 0) - goto retry; - if (od) - od[dlen] = ep2[i2]; - dlen++; - i2++; - } while (i1 < ents1 && i2 < ents2); - } - if (d < 0) { - do { - d = fdircomp(&ep1[i1], &ep2[i2]); - if (d >= 0) - goto retry; - if (oa) - oa[alen] = ep1[i1]; - alen++; - i1++; - } while (i1 < ents1 && i2 < ents2); - } - /* - * Do not increment i1 & i2 in case that the last elements are - * not equal and need to be treaten as longer list elements in - * the code below. - */ - if (i1 >= ents1 || i2 >= ents2) - break; - } - /* - * One of both lists is longer after some amount. - */ - if (od == NULL) { - if (i2 < ents2) - dlen += ents2 - i2; - } else { - for (; i2 < ents2; i2++) { - od[dlen] = ep2[i2]; - dlen++; - } - } - if (oa == NULL) { - if (i1 < ents1) - alen += ents1 - i1; - } else { - for (; i1 < ents1; i1++) { - oa[alen] = ep1[i1]; - alen++; - } - } - if (alenp) - *alenp = alen; - if (dlenp) - *dlenp = dlen; - - return (alen + dlen); -} -#endif /* __STAR__ */ diff -Nru cdrtools-2.01.01a33/libfind/fetchdir.h cdrtools-3.02a09/libfind/fetchdir.h --- cdrtools-2.01.01a33/libfind/fetchdir.h 2007-02-18 19:06:26.000000000 +0000 +++ cdrtools-3.02a09/libfind/fetchdir.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,20 +0,0 @@ -/* @(#)fetchdir.h 1.3 07/02/18 Copyright 2004-2006 J. Schilling */ -/* - * Copyright (c) 2004-2006 J. Schilling - */ -/* - * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. - * - * See the file CDDL.Schily.txt in this distribution for details. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file CDDL.Schily.txt from this distribution. - */ - -extern char *fetchdir __PR((char *dir, int *entp, int *lenp, ino_t **inop)); -#ifdef _SCHILY_DIRENT_H -extern char *dfetchdir __PR((DIR *dir, char *dirname, int *entp, int *lenp, ino_t **inop)); -#endif diff -Nru cdrtools-2.01.01a33/libfind/find.c cdrtools-3.02a09/libfind/find.c --- cdrtools-2.01.01a33/libfind/find.c 2007-07-06 11:01:15.000000000 +0000 +++ cdrtools-3.02a09/libfind/find.c 2015-10-26 23:53:39.000000000 +0000 @@ -1,13 +1,14 @@ /*#define PLUS_DEBUG*/ -/* @(#)find.c 1.64 07/07/06 Copyright 2004-2007 J. Schilling */ +/* @(#)find.c 1.102 15/10/27 Copyright 2004-2015 J. Schilling */ +#include #ifndef lint -static char sccsid[] = - "@(#)find.c 1.64 07/07/06 Copyright 2004-2007 J. Schilling"; +static UConst char sccsid[] = + "@(#)find.c 1.102 15/10/27 Copyright 2004-2015 J. Schilling"; #endif /* * Another find implementation... * - * Copyright (c) 2004-2007 J. Schilling + * Copyright (c) 2004-2015 J. Schilling */ /* * The contents of this file are subject to the terms of the @@ -16,6 +17,8 @@ * with the License. * * See the file CDDL.Schily.txt in this distribution for details. + * A copy of the CDDL is also available via the Internet at + * http://www.opensource.org/licenses/cddl1.txt * * When distributing Covered Code, include this CDDL HEADER in each * file and include the License file CDDL.Schily.txt from this distribution. @@ -25,42 +28,36 @@ #define FIND_MAIN #endif -#include -#include +#include #include #include -#ifdef HAVE_FCHDIR #include -#else -#include -#endif #include +#include #include #include #include #include /* incl. limits.h (_POSIX_ARG_MAX/ARG_MAX) */ -#ifdef HAVE_SYS_PARAM_H -#include /* #defines NCARGS on old systems */ -#endif -#ifndef DEV_BSIZE -#define DEV_BSIZE 512 -#endif +#include /* #defines NCARGS on old systems */ #include -#include #include -#if defined(HAVE_FNMATCH_H) & defined(HAVE_FNMATCH) -#include -#endif +#include #include #include #include -#include -#include +#include +#include +#define VMS_VFORK_OK +#include #include +#if defined(_ARG_MAX32) && defined(_ARG_MAX64) +#define MULTI_ARG_MAX /* SunOS only ? */ +#endif + #ifdef __FIND__ -char strvers[] = "1.3"; /* The pure version string */ +char strvers[] = "1.4"; /* The pure version string */ #endif typedef struct { @@ -79,143 +76,17 @@ gid_t gid; size_t size; time_t time; + FILE *fp; } val, val2; } findn_t; -#include "walk.h" +#include #define FIND_NODE -#include "find.h" +#include #include "find_list.h" #include "find_misc.h" - -LOCAL char *tokennames[] = { -#define OPEN 0 - "(", -#define CLOSE 1 - ")", -#define LNOT 2 - "!", -#define AND 3 - "a", -#define LOR 4 - "o", -#define ATIME 5 - "atime", -#define CTIME 6 - "ctime", -#define DEPTH 7 - "depth", -#define EXEC 8 - "exec", -#define FOLLOW 9 /* POSIX Extension */ - "follow", -#define FSTYPE 10 /* POSIX Extension */ - "fstype", -#define GROUP 11 - "group", -#define INUM 12 /* POSIX Extension */ - "inum", -#define LINKS 13 - "links", -#define LOCL 14 /* POSIX Extension */ - "local", -#define LS 15 /* POSIX Extension */ - "ls", -#define MODE 16 /* POSIX Extension */ - "mode", -#define MOUNT 17 /* POSIX Extension */ - "mount", -#define MTIME 18 - "mtime", -#define NAME 19 - "name", -#define NEWER 20 - "newer", -#define NOGRP 21 - "nogroup", -#define NOUSER 22 - "nouser", -#define OK_EXEC 23 - "ok", -#define PERM 24 - "perm", -#define PRINT 25 - "print", -#define PRINTNNL 26 /* POSIX Extension */ - "printnnl", -#define PRUNE 27 - "prune", -#define SIZE 28 - "size", -#define TIME 29 /* POSIX Extension */ - "time", -#define TYPE 30 - "type", -#define USER 31 - "user", -#define XDEV 32 - "xdev", -#define PATH 33 /* POSIX Extension */ - "path", -#define LNAME 34 /* POSIX Extension */ - "lname", -#define PAT 35 /* POSIX Extension */ - "pat", -#define PPAT 36 /* POSIX Extension */ - "ppat", -#define LPAT 37 /* POSIX Extension */ - "lpat", -#define PACL 38 /* POSIX Extension */ - "acl", -#define XATTR 39 /* POSIX Extension */ - "xattr", -#define LINKEDTO 40 /* POSIX Extension */ - "linkedto", -#define NEWERAA 41 /* POSIX Extension */ - "neweraa", -#define NEWERAC 42 /* POSIX Extension */ - "newerac", -#define NEWERAM 43 /* POSIX Extension */ - "neweram", -#define NEWERCA 44 /* POSIX Extension */ - "newerca", -#define NEWERCC 45 /* POSIX Extension */ - "newercc", -#define NEWERCM 46 /* POSIX Extension */ - "newercm", -#define NEWERMA 47 /* POSIX Extension */ - "newerma", -#define NEWERMC 48 /* POSIX Extension */ - "newermc", -#define NEWERMM 49 /* POSIX Extension */ - "newermm", -#define SPARSE 50 /* POSIX Extension */ - "sparse", -#define LTRUE 51 /* POSIX Extension */ - "true", -#define LFALSE 52 /* POSIX Extension */ - "false", -#define MAXDEPTH 53 /* POSIX Extension */ - "maxdepth", -#define MINDEPTH 54 /* POSIX Extension */ - "mindepth", -#define HELP 55 /* POSIX Extension */ - "help", -#define CHOWN 56 /* POSIX Extension */ - "chown", -#define CHGRP 57 /* POSIX Extension */ - "chgrp", -#define CHMOD 58 /* POSIX Extension */ - "chmod", -#define DOSTAT 59 /* POSIX Extension */ - "dostat", -#define ENDPRIM 60 - 0, -#define EXECPLUS 61 - "exec", - 0 -}; -#define NTOK ((sizeof (tokennames) / sizeof (tokennames[0])) - 1) +#define TOKEN_NAMES +#include "find_tok.h" /* * The struct plusargs and the adjacent space that holds the @@ -243,12 +114,25 @@ * --------------------------------- * | Space for first arg string | Space for ARG_MAX ends here * --------------------------------- "endp" points here + * + * The Arg vector in struct plusargs uses the native pointer size + * for libfind. ARG_MAX however is based on the pointer size in the + * called program. + * + * If a 32 bit libfind calls a 64 bit program, the arg vector and the + * environment array in the called program needs more space than in the + * calling libfind code. + * + * If a 64 bit libfind calls a 32 bit program, the arg vector and the + * environment array in the called program needs less space than in the + * calling libfind code. */ struct plusargs { struct plusargs *next; /* Next in list for flushing */ char *endp; /* Points to end of data block */ char **nextargp; /* Points to next av[] entry */ char *laststr; /* points to last used string */ + int nenv; /* Number of entries in env */ int ac; /* The argc for our command */ char *av[1]; /* The argv for our command */ }; @@ -264,13 +148,10 @@ extern time_t find_sixmonth; /* 6 months before limit (ls) */ extern time_t find_now; /* now limit (ls) */ +LOCAL time_t find_xnow; /* The exact start time */ LOCAL findn_t Printnode = { 0, 0, 0, PRINT }; -#ifndef __GNUC__ -#define inline -#endif - EXPORT void find_argsinit __PR((finda_t *fap)); EXPORT void find_timeinit __PR((time_t now)); EXPORT findn_t *find_printnode __PR((void)); @@ -288,14 +169,11 @@ LOCAL findn_t *parse __PR((finda_t *fap)); LOCAL findn_t *parseand __PR((finda_t *fap)); LOCAL findn_t *parseprim __PR((finda_t *fap)); -LOCAL int getperm __PR((FILE *f, findn_t *t, BOOL findperm, int smode, int isX)); -LOCAL char *getsperm __PR((FILE *f, char *p, mode_t *mp, int smode, int isX)); -LOCAL mode_t iswho __PR((int c)); -LOCAL int isop __PR((int c)); -LOCAL mode_t isperm __PR((int c, int isX)); EXPORT void find_firstprim __PR((int *pac, char *const **pav)); EXPORT BOOL find_primary __PR((findn_t *t, int op)); EXPORT BOOL find_pname __PR((findn_t *t, char *word)); +EXPORT BOOL find_hasprint __PR((findn_t *t)); +EXPORT BOOL find_hasexec __PR((findn_t *t)); #ifdef FIND_MAIN LOCAL int walkfunc __PR((char *nm, struct stat *fs, int type, struct WALK *state)); #endif @@ -304,10 +182,19 @@ #else EXPORT BOOL find_expr __PR((char *f, char *ff, struct stat *fs, struct WALK *state, findn_t *t)); #endif -LOCAL BOOL doexec __PR((char *f, int ac, char **av, struct WALK *state)); -LOCAL int argsize __PR((void)); +#ifdef HAVE_FORK +LOCAL BOOL doexec __PR((char *f, findn_t *t, int ac, char **av, struct WALK *state)); +#endif +LOCAL int countenv __PR((void)); +LOCAL int argsize __PR((int xtype)); +LOCAL int extype __PR((char *name)); +#ifdef MULTI_ARG_MAX +LOCAL int xargsize __PR((int xtype, int maxarg)); +#endif LOCAL BOOL pluscreate __PR((FILE *f, int ac, char **av, finda_t *fap)); +#ifdef HAVE_FORK LOCAL BOOL plusexec __PR((char *f, findn_t *t, struct WALK *state)); +#endif EXPORT int find_plusflush __PR((void *p, struct WALK *state)); EXPORT void find_usage __PR((FILE *f)); #ifdef FIND_MAIN @@ -340,6 +227,7 @@ find_timeinit(now) time_t now; { + find_xnow = now; find_now = now + 60; find_sixmonth = now - 6L*30L*24L*60L*60L; } @@ -435,6 +323,11 @@ if (t->right != NULL) free(t->right); /* aux array for patcompile() */ break; + case FLS: + case FPRINT: + case FPRINT0: + case FPRINTNNL: + fclose(t->val.fp); default: ; } @@ -479,7 +372,7 @@ if ((fap->primtype = find_token(word)) >= 0) return (TRUE); - ferrmsgno(fap->std[2], EX_BAD, gettext("Bad Option: '%s'.\n"), word); + ferrmsgno(fap->std[2], EX_BAD, _("Bad Option: '%s'.\n"), word); find_usage(fap->std[2]); fap->primtype = FIND_ERRARG; /* Mark as "parse aborted" */ return (FALSE); @@ -502,6 +395,7 @@ register char *word; { char **tp; + char *tn; char *equalp; int type; @@ -518,7 +412,10 @@ goto bad; } for (type = 0, tp = tokennames; *tp; tp++, type++) { - if (streql(*tp, word)) { + tn = *tp; + if (*tn != *word) + continue; + if (streql(tn, word)) { if (equalp) *equalp = '='; return (type); @@ -553,11 +450,11 @@ prim = tokennames[pt]; if (prim) { ferrmsgno(fap->std[2], EX_BAD, - gettext("Missing arg for '%s%s'.\n"), + _("Missing arg for '%s%s'.\n"), pt > LNOT ? "-":"", prim); } else { ferrmsgno(fap->std[2], EX_BAD, - gettext("Missing arg.\n")); + _("Missing arg.\n")); } errjmp(fap, EX_BAD); /* NOTREACHED */ @@ -693,22 +590,43 @@ /* * Use simple to old (historic) shell globbing. */ + case INAME: + case ILNAME: + case IPATH: +#ifndef FNM_IGNORECASE + ferrmsgno(fap->std[2], + EX_BAD, _("The primary '-%s' is unsupported on this OS.\n"), + tokennames[n->op]); + errjmp(fap, EX_BAD); + /* NOTREACHED */ +#endif case NAME: case PATH: case LNAME: -#if defined(HAVE_FNMATCH_H) & defined(HAVE_FNMATCH) +#ifndef HAVE_FNMATCH +#define HAVE_FNMATCH /* We have fnmatch() in libschily */ +#endif +#if defined(HAVE_FNMATCH) n->this = nextarg(fap, n); nexttoken(fap); fap->jmp = ojmp; /* Restore old jump target */ return (n); #endif - /* FALLTHROUGH */ + /* FALLTHRU */ /* Implement "fallback" to patmatch() if we have no fnmatch() */ /* * Use patmatch() which is a regular expression matcher that implements * extensions that are compatible to old (historic) shell globbing. */ + case IPAT: + case IPPAT: + case ILPAT: + ferrmsgno(fap->std[2], + EX_BAD, _("The primary '-%s' is currently unsupported.\n"), + tokennames[n->op]); + errjmp(fap, EX_BAD); + /* NOTREACHED */ case PAT: case PPAT: case LPAT: { @@ -722,7 +640,7 @@ if ((n->val.i = patcompile((Uchar *)n->this, plen, (int *)n->right)) == 0) { ferrmsgno(fap->std[2], - EX_BAD, gettext("Bad pattern in '-%s %s'.\n"), + EX_BAD, _("Bad pattern in '-%s %s'.\n"), tokennames[n->op], n->this); errjmp(fap, EX_BAD); /* NOTREACHED */ @@ -732,18 +650,26 @@ return (n); } - case SIZE: + case SIZE: { + char *numarg; + fap->walkflags &= ~WALK_NOSTAT; p = n->left = nextarg(fap, n); + numarg = p; if (p[0] == '-' || p[0] == '+') - p++; + numarg = ++p; p = astoll(p, &ll); - if (p[0] == 'c' && p[1] == '\0') + if (p[0] == '\0') { + /* EMPTY */ + ; + } else if (p[0] == 'c' && p[1] == '\0') { + n->this = p; + } else if (getllnum(numarg, &ll) == 1) { n->this = p; - else if (*p) { + } else if (*p) { ferrmsgno(fap->std[2], EX_BAD, - gettext("Non numeric character '%c' in '-size %s'.\n"), + _("Non numeric character '%c' in '-size %s'.\n"), *p, n->left); errjmp(fap, EX_BAD); /* NOTREACHED */ @@ -752,6 +678,13 @@ nexttoken(fap); fap->jmp = ojmp; /* Restore old jump target */ return (n); + } + + case EMPTY: + fap->walkflags &= ~WALK_NOSTAT; + nexttoken(fap); + fap->jmp = ojmp; /* Restore old jump target */ + return (n); case LINKS: fap->walkflags &= ~WALK_NOSTAT; @@ -762,7 +695,7 @@ p = astoll(p, &ll); if (*p) { ferrmsgno(fap->std[2], EX_BAD, - gettext("Non numeric character '%c' in '-links %s'.\n"), + _("Non numeric character '%c' in '-links %s'.\n"), *p, n->left); errjmp(fap, EX_BAD); /* NOTREACHED */ @@ -781,7 +714,7 @@ p = astoll(p, &ll); if (*p) { ferrmsgno(fap->std[2], EX_BAD, - gettext("Non numeric character '%c' in '-inum %s'.\n"), + _("Non numeric character '%c' in '-inum %s'.\n"), *p, n->left); errjmp(fap, EX_BAD); /* NOTREACHED */ @@ -798,7 +731,7 @@ if (stat(n->left = nextarg(fap, n), &ns) < 0) { ferrmsg(fap->std[2], - gettext("Cannot stat '%s'.\n"), n->left); + _("Cannot stat '%s'.\n"), n->left); errjmp(fap, geterrno()); /* NOTREACHED */ } @@ -809,6 +742,10 @@ return (n); } + case AMIN: + case CMIN: + case MMIN: + n->val2.i = 1; case TIME: case ATIME: case CTIME: @@ -822,16 +759,27 @@ p++; if (gettnum(p, &n->val.time) != 1) { ferrmsgno(fap->std[2], EX_BAD, - gettext("Bad timespec in '-%s %s'.\n"), + _("Bad timespec in '-%s %s'.\n"), tokennames[n->op], n->left); errjmp(fap, EX_BAD); /* NOTREACHED */ } + if (n->val2.i) + n->val.time *= 60; + len = strlen(p); if (len > 0) { len = (Uchar)p[len-1]; - if (!(len >= '0' && len <= '9')) - n->val2.i = 1; + if (!(len >= '0' && len <= '9')) { + if (n->val2.i) { /* -mmin, No ext. time spec */ + ferrmsgno(fap->std[2], EX_BAD, + _("Unsupported timespec in '-%s %s'.\n"), + tokennames[n->op], n->left); + errjmp(fap, geterrno()); + /* NOTREACHED */ + } + n->val2.i = 1; /* Ext. time spec permitted */ + } } nexttoken(fap); fap->jmp = ojmp; /* Restore old jump target */ @@ -847,7 +795,7 @@ if (stat(n->left = nextarg(fap, n), &ns) < 0) { ferrmsg(fap->std[2], - gettext("Cannot stat '%s'.\n"), n->left); + _("Cannot stat '%s'.\n"), n->left); errjmp(fap, geterrno()); /* NOTREACHED */ } @@ -866,7 +814,7 @@ if (stat(n->left = nextarg(fap, n), &ns) < 0) { ferrmsg(fap->std[2], - gettext("Cannot stat '%s'.\n"), n->left); + _("Cannot stat '%s'.\n"), n->left); errjmp(fap, geterrno()); /* NOTREACHED */ } @@ -886,7 +834,7 @@ if (stat(n->left = nextarg(fap, n), &ns) < 0) { ferrmsg(fap->std[2], - gettext("Cannot stat '%s'.\n"), n->left); + _("Cannot stat '%s'.\n"), n->left); errjmp(fap, geterrno()); /* NOTREACHED */ } @@ -902,9 +850,14 @@ n->this = (char *)nextarg(fap, n); switch (*(n->this)) { + /* + * 'b'lock, 'c'har, 'd'ir, 'D'oor, + * 'e'ventcount, 'f'ile, 'l'ink, 'p'ipe, + * 'P'ort event, 's'ocket + */ case 'b': case 'c': case 'd': case 'D': case 'e': case 'f': case 'l': case 'p': - case 's': + case 'P': case 's': if ((n->this)[1] == '\0') { nexttoken(fap); fap->jmp = ojmp; /* Restore old jump target */ @@ -912,7 +865,7 @@ } } ferrmsgno(fap->std[2], EX_BAD, - gettext("Bad type '%c' in '-type %s'.\n"), + _("Bad type '%c' in '-type %s'.\n"), *n->this, n->this); errjmp(fap, EX_BAD); /* NOTREACHED */ @@ -925,7 +878,7 @@ n->this = (char *)nextarg(fap, n); #else ferrmsgno(fap->std[2], EX_BAD, - gettext("-fstype not supported by this OS.\n")); + _("-fstype not supported by this OS.\n")); errjmp(fap, EX_BAD); /* NOTREACHED */ #endif @@ -938,7 +891,7 @@ #ifndef HAVE_ST_FSTYPE ferrmsgno(fap->std[2], EX_BAD, - gettext("-local not supported by this OS.\n")); + _("-local not supported by this OS.\n")); errjmp(fap, EX_BAD); /* NOTREACHED */ #endif @@ -963,7 +916,7 @@ } else { if (*astoll(n->left, &ll)) { ferrmsgno(fap->std[2], EX_BAD, - gettext("User '%s' not in passwd database.\n"), + _("User '%s' not in passwd database.\n"), n->left); errjmp(fap, EX_BAD); /* NOTREACHED */ @@ -992,7 +945,7 @@ } else { if (*astoll(n->left, &ll)) { ferrmsgno(fap->std[2], EX_BAD, - gettext("Group '%s' not in group database.\n"), + _("Group '%s' not in group database.\n"), n->left); errjmp(fap, EX_BAD); /* NOTREACHED */ @@ -1010,8 +963,17 @@ case PERM: fap->walkflags &= ~WALK_NOSTAT; - n->left = nextarg(fap, n); - if (getperm(fap->std[2], n, n->op == PERM, 0, n->op == PERM ? -1:0) < 0) { + p = n->left = nextarg(fap, n); + if (p[0] == '+') { + if (p[1] == '0' || + p[1] == 'u' || p[1] == 'g' || p[1] == 'o' || p[1] == 'a') + p++; + else + n->left = ""; + } + if (getperm(fap->std[2], p, tokennames[n->op], + &n->val.mode, (mode_t)0, + n->op == PERM ? GP_FPERM|GP_XERR:GP_NOX) < 0) { errjmp(fap, EX_BAD); /* NOTREACHED */ } @@ -1023,7 +985,7 @@ fap->walkflags &= ~WALK_NOSTAT; ferrmsgno(fap->std[2], EX_BAD, - gettext("-mode not yet implemented.\n")); + _("-mode not yet implemented.\n")); errjmp(fap, EX_BAD); /* NOTREACHED */ nexttoken(fap); @@ -1054,7 +1016,7 @@ p = astoll(p, &ll); if (*p) { ferrmsgno(fap->std[2], EX_BAD, - gettext("Non numeric character '%c' in '-%s %s'.\n"), + _("Non numeric character '%c' in '-%s %s'.\n"), *p, tokennames[n->op], n->left); errjmp(fap, EX_BAD); /* NOTREACHED */ @@ -1075,15 +1037,21 @@ case SPARSE: case DOSTAT: fap->walkflags &= ~WALK_NOSTAT; + /* FALLTHRU */ case PRUNE: case LTRUE: case LFALSE: + case READABLE: + case WRITABLE: + case EXECUTABLE: nexttoken(fap); fap->jmp = ojmp; /* Restore old jump target */ return (n); case OK_EXEC: - case EXEC: { + case OK_EXECDIR: + case EXEC: + case EXECDIR: { int i = 1; n->this = (char *)fap->Argv; /* Cheat: Pointer is pointer */ @@ -1092,6 +1060,13 @@ if (streql(p, ";")) break; else if (streql(p, "+") && streql(fap->Argv[-2], "{}")) { + if (n->op == OK_EXECDIR || n->op == EXECDIR) { + ferrmsgno(fap->std[2], EX_BAD, + _("'-%s' does not yet work with '+'.\n"), + tokennames[n->op]); + errjmp(fap, EX_BAD); + /* NOTREACHED */ + } n->op = fap->primtype = EXECPLUS; if (!pluscreate(fap->std[2], --i, (char **)n->this, fap)) { errjmp(fap, EX_BAD); @@ -1115,8 +1090,25 @@ case LS: fap->walkflags &= ~WALK_NOSTAT; + goto found_action; + case FLS: + fap->walkflags &= ~WALK_NOSTAT; + case FPRINT: + case FPRINT0: + case FPRINTNNL: + p = nextarg(fap, n); + n->val.fp = fileopen(p, "wcta"); + if (n->val.fp == NULL) { + ferrmsg(fap->std[2], + _("Cannot open '%s' for '-%s'.\n"), + p, tokennames[n->op]); + errjmp(fap, EX_BAD); + /* NOTREACHED */ + } case PRINT: + case PRINT0: case PRINTNNL: + found_action: fap->found_action = TRUE; nexttoken(fap); fap->jmp = ojmp; /* Restore old jump target */ @@ -1125,10 +1117,10 @@ case FIND_ENDARGS: #ifdef DEBUG ferrmsgno(fap->std[2], EX_BAD, - gettext("ENDARGS in parseprim()\n")); + _("ENDARGS in parseprim()\n")); #endif ferrmsgno(fap->std[2], EX_BAD, - gettext("Incomplete expression.\n")); + _("Incomplete expression.\n")); find_freenode(n); fap->jmp = ojmp; /* Restore old jump target */ return ((findn_t *)NULL); @@ -1136,9 +1128,14 @@ case OPEN: nexttoken(fap); n->this = (char *)parse(fap); + if (n->this == NULL) { + find_freenode(n); + fap->jmp = ojmp; /* Restore old jump target */ + return ((findn_t *)NULL); + } if (fap->primtype != CLOSE) { ferrmsgno(fap->std[2], EX_BAD, - gettext("Found '%s', but ')' expected.\n"), + _("Found '%s', but ')' expected.\n"), fap->Argv[-1]); errjmp(fap, EX_BAD); /* NOTREACHED */ @@ -1150,7 +1147,10 @@ break; case CLOSE: - ferrmsgno(fap->std[2], EX_BAD, gettext("Missing '('.\n")); + /* + * The triggering arg is at fap->Argv[-2]. + */ + ferrmsgno(fap->std[2], EX_BAD, _("Missing '('.\n")); errjmp(fap, EX_BAD); /* NOTREACHED */ @@ -1159,7 +1159,7 @@ n->this = (char *)parseprim(fap); if (n->this == NULL) { find_freenode(n); - return ((findn_t *)NULL); + n = (findn_t *)NULL; } fap->jmp = ojmp; /* Restore old jump target */ return (n); @@ -1167,18 +1167,20 @@ case AND: case LOR: ferrmsgno(fap->std[2], EX_BAD, - gettext("Invalid expression with -%s.\n"), tokennames[n->op]); + _("Invalid expression with '-%s'.\n"), tokennames[n->op]); errjmp(fap, EX_BAD); /* NOTREACHED */ case HELP: find_usage(fap->std[2]); find_freenode(n); + fap->jmp = ojmp; /* Restore old jump target */ return ((findn_t *)NULL); default: ferrmsgno(fap->std[2], EX_BAD, - gettext("Internal malfunction.\n")); + _("Internal malfunction, found unknown primary '-%s' (%d).\n"), + find_tname(n->op), n->op); errjmp(fap, EX_BAD); /* NOTREACHED */ } @@ -1187,278 +1189,10 @@ return (0); } -/* - * This is the mode bit translation code stolen from star... - */ -#define TSUID 04000 /* Set UID on execution */ -#define TSGID 02000 /* Set GID on execution */ -#define TSVTX 01000 /* On directories, restricted deletion flag */ -#define TUREAD 00400 /* Read by owner */ -#define TUWRITE 00200 /* Write by owner special */ -#define TUEXEC 00100 /* Execute/search by owner */ -#define TGREAD 00040 /* Read by group */ -#define TGWRITE 00020 /* Write by group */ -#define TGEXEC 00010 /* Execute/search by group */ -#define TOREAD 00004 /* Read by other */ -#define TOWRITE 00002 /* Write by other */ -#define TOEXEC 00001 /* Execute/search by other */ - -#define TALLMODES 07777 /* The low 12 bits mentioned in the standard */ - #define S_ALLPERM (S_IRWXU|S_IRWXG|S_IRWXO) #define S_ALLFLAGS (S_ISUID|S_ISGID|S_ISVTX) #define S_ALLMODES (S_ALLFLAGS | S_ALLPERM) -#if S_ISUID == TSUID && S_ISGID == TSGID && S_ISVTX == TSVTX && \ - S_IRUSR == TUREAD && S_IWUSR == TUWRITE && S_IXUSR == TUEXEC && \ - S_IRGRP == TGREAD && S_IWGRP == TGWRITE && S_IXGRP == TGEXEC && \ - S_IROTH == TOREAD && S_IWOTH == TOWRITE && S_IXOTH == TOEXEC - -#define HAVE_POSIX_MODE_BITS /* st_mode bits are equal to TAR mode bits */ -#endif - -#ifdef HAVE_POSIX_MODE_BITS /* st_mode bits are equal to TAR mode bits */ -#define OSMODE(xmode) (xmode) -#else -#define OSMODE(xmode) ((xmode & TSUID ? S_ISUID : 0) \ - | (xmode & TSGID ? S_ISGID : 0) \ - | (xmode & TSVTX ? S_ISVTX : 0) \ - | (xmode & TUREAD ? S_IRUSR : 0) \ - | (xmode & TUWRITE ? S_IWUSR : 0) \ - | (xmode & TUEXEC ? S_IXUSR : 0) \ - | (xmode & TGREAD ? S_IRGRP : 0) \ - | (xmode & TGWRITE ? S_IWGRP : 0) \ - | (xmode & TGEXEC ? S_IXGRP : 0) \ - | (xmode & TOREAD ? S_IROTH : 0) \ - | (xmode & TOWRITE ? S_IWOTH : 0) \ - | (xmode & TOEXEC ? S_IXOTH : 0)) -#endif - -LOCAL int -getperm(f, t, findperm, smode, isX) - FILE *f; /* FILE * to print error messages to */ - findn_t *t; - BOOL findperm; /* TRUE if we implement find -perm */ - int smode; /* The start mode for the computation */ - int isX; /* -1: Ignore X, 0: no dir/X 1: X OK */ -{ - char *p; - Llong ll; - mode_t mm; - - p = t->left; - if (findperm && *p == '-') - p++; - - if (*p >= '0' && *p <= '7') { - p = astollb(p, &ll, 8); - if (*p) { - ferrmsgno(f, EX_BAD, - gettext("Non octal character '%c' in '-%s %s'.\n"), - *p, tokennames[t->op], t->left); - return (-1); - } - mm = ll & TALLMODES; - t->val.mode = OSMODE(mm); - return (0); - } - p = getsperm(f, p, &t->val.mode, smode, isX); - if (p && *p != '\0') { - ferrmsgno(f, EX_BAD, - gettext("Bad perm character '%c' found in '-%s %s'.\n"), - *p, tokennames[t->op], t->left); - return (-1); - } -#ifdef PERM_DEBUG - error("GETPERM (%c) %4.4lo\n", *t->left, (long)t->val.mode); -#endif - return (0); -} - -LOCAL char * -getsperm(f, p, mp, smode, isX) - FILE *f; - char *p; /* The perm input string */ - mode_t *mp; /* To set t->val.mode */ - int smode; /* The start mode for the computation */ - int isX; /* -1: Ignore X, 0: no dir/X 1: X OK */ -{ -#ifdef OLD - mode_t permval = 0; /* POSIX start value for "find" */ -#else - mode_t permval = smode; /* POSIX start value for "find" */ -#endif - mode_t who; - mode_t m; - int op; - mode_t perms; - mode_t pm; - -nextclause: -#ifdef PERM_DEBUG - error("getsperm(%s)\n", p); -#endif - who = 0; - while ((m = iswho(*p)) != 0) { - p++; - who |= m; - } - if (who == 0) { - mode_t mask = umask(0); - - umask(mask); - who = ~mask; - who &= (S_ISUID|S_ISGID|S_ISVTX|S_IRWXU|S_IRWXG|S_IRWXO); - } -#ifdef PERM_DEBUG - error("WHO %4.4lo\n", (long)who); - error("getsperm(--->%s)\n", p); -#endif - -nextop: - if ((op = isop(*p)) != '\0') - p++; -#ifdef PERM_DEBUG - error("op '%c'\n", op); - error("getsperm(--->%s)\n", p); -#endif - if (op == 0) { - ferrmsgno(f, EX_BAD, gettext("Missing -perm op.\n")); - return (p); - } - - perms = 0; - while ((pm = isperm(*p, isX)) != (mode_t)-1) { - p++; - perms |= pm; - } -#ifdef PERM_DEBUG - error("PERM %4.4lo\n", (long)perms); - error("START PERMVAL %4.4lo\n", (long)permval); -#endif - if ((perms == 0) && (*p == 'u' || *p == 'g' || *p == 'o')) { - mode_t what = 0; - - /* - * First select the bit triple we like to copy. - */ - switch (*p) { - - case 'u': - what = permval & S_IRWXU; - break; - case 'g': - what = permval & S_IRWXG; - break; - case 'o': - what = permval & S_IRWXO; - break; - } - /* - * Now copy over bit by bit without relying on shifts - * that would make implicit assumptions on values. - */ - if (what & (S_IRUSR|S_IRGRP|S_IROTH)) - perms |= (who & (S_IRUSR|S_IRGRP|S_IROTH)); - if (what & (S_IWUSR|S_IWGRP|S_IWOTH)) - perms |= (who & (S_IWUSR|S_IWGRP|S_IWOTH)); - if (what & (S_IXUSR|S_IXGRP|S_IXOTH)) - perms |= (who & (S_IXUSR|S_IXGRP|S_IXOTH)); - p++; - } -#ifdef PERM_DEBUG - error("getsperm(--->%s)\n", p); -#endif - switch (op) { - - case '=': - permval &= ~who; - /* FALLTHRU */ - case '+': - permval |= (who & perms); - break; - - case '-': - permval &= ~(who & perms); - break; - } -#ifdef PERM_DEBUG - error("END PERMVAL %4.4lo\n", (long)permval); -#endif - if (isop(*p)) - goto nextop; - if (*p == ',') { - p++; - goto nextclause; - } - *mp = permval; - return (p); -} - -LOCAL mode_t -iswho(c) - int c; -{ - switch (c) { - - case 'u': /* user */ - return (S_ISUID|S_ISVTX|S_IRWXU); - case 'g': /* group */ - return (S_ISGID|S_ISVTX|S_IRWXG); - case 'o': /* other */ - return (S_ISVTX|S_IRWXO); - case 'a': /* all */ - return (S_ISUID|S_ISGID|S_ISVTX|S_IRWXU|S_IRWXG|S_IRWXO); - default: - return (0); - } -} - -LOCAL int -isop(c) - int c; /* The current perm character to parse */ -{ - switch (c) { - - case '+': - case '-': - case '=': - return (c); - default: - return (0); - } -} - -LOCAL mode_t -isperm(c, isX) - int c; /* The current perm character to parse */ - int isX; /* -1: Ignore X, 0: no dir/X 1: X OK */ -{ - switch (c) { - - case 'r': - return (S_IRUSR|S_IRGRP|S_IROTH); - case 'w': - return (S_IWUSR|S_IWGRP|S_IWOTH); - case 'X': - if (isX < 0) - return ((mode_t)-1); /* Singnal parse error */ - if (isX == 0) - return ((mode_t)0); /* No 'X' handling here */ - /* FALLTROUGH */ - case 'x': - return (S_IXUSR|S_IXGRP|S_IXOTH); - case 's': - return (S_ISUID|S_ISGID); - case 'l': - return (S_ISGID); - case 't': - return (S_ISVTX); - default: - return ((mode_t)-1); - } -} - EXPORT void find_firstprim(pac, pav) int *pac; @@ -1521,9 +1255,42 @@ { if (streql(word, "-exec+")) return (find_primary(t, EXECPLUS)); + if (streql(word, "-execdir+")) + return (find_primary(t, EXECDIRPLUS)); return (find_primary(t, find_token(word))); } +EXPORT BOOL +find_hasprint(t) + findn_t *t; +{ + if (t == NULL) + return (FALSE); + + if (find_primary(t, PRINT) || find_primary(t, PRINTNNL) || + find_primary(t, PRINT0)) + return (TRUE); + if (find_primary(t, LS)) + return (TRUE); + return (FALSE); +} + +EXPORT BOOL +find_hasexec(t) + findn_t *t; +{ + if (t == NULL) + return (FALSE); + + if (find_primary(t, EXEC) || find_primary(t, EXECPLUS)) + return (TRUE); + if (find_primary(t, EXECDIR) || find_primary(t, EXECDIRPLUS)) + return (TRUE); + if (find_primary(t, OK_EXEC) || find_primary(t, OK_EXECDIR)) + return (TRUE); + return (FALSE); +} + #ifdef FIND_MAIN LOCAL int walkfunc(nm, fs, type, state) @@ -1533,21 +1300,21 @@ struct WALK *state; { if (type == WALK_NS) { - ferrmsg(state->std[2], gettext("Cannot stat '%s'.\n"), nm); + ferrmsg(state->std[2], _("Cannot stat '%s'.\n"), nm); state->err = 1; return (0); } else if (type == WALK_SLN && (state->walkflags & WALK_PHYS) == 0) { ferrmsg(state->std[2], - gettext("Cannot follow symlink '%s'.\n"), nm); + _("Cannot follow symlink '%s'.\n"), nm); state->err = 1; return (0); } else if (type == WALK_DNR) { if (state->flags & WALK_WF_NOCHDIR) { ferrmsg(state->std[2], - gettext("Cannot chdir to '%s'.\n"), nm); + _("Cannot chdir to '%s'.\n"), nm); } else { ferrmsg(state->std[2], - gettext("Cannot read '%s'.\n"), nm); + _("Cannot read '%s'.\n"), nm); } state->err = 1; return (0); @@ -1576,11 +1343,17 @@ findn_t *t; { time_t xtime; + FILE *fp = state->std[1]; char *p; char lname[8192]; + int fnflags = 0; switch (t->op) { + case ILNAME: +#ifdef FNM_IGNORECASE + fnflags = FNM_IGNORECASE; +#endif case LNAME: { int lsize; @@ -1592,10 +1365,14 @@ goto nmatch; } lname[0] = '\0'; + /* + * For file names from the command line, we did not perform + * a chdir() before, so we need to use the full path name. + */ lsize = readlink(state->level ? ff : f, lname, sizeof (lname)); if (lsize < 0) { ferrmsg(state->std[2], - gettext("Cannot read link '%s'.\n"), ff); + _("Cannot read link '%s'.\n"), ff); return (FALSE); } lname[sizeof (lname)-1] = '\0'; @@ -1604,14 +1381,22 @@ p = lname; goto nmatch; } + case IPATH: +#ifdef FNM_IGNORECASE + fnflags = FNM_IGNORECASE; +#endif case PATH: p = f; goto nmatch; + case INAME: +#ifdef FNM_IGNORECASE + fnflags = FNM_IGNORECASE; +#endif case NAME: p = ff; nmatch: -#if defined(HAVE_FNMATCH_H) & defined(HAVE_FNMATCH) - return (!fnmatch(t->this, p, 0)); +#if defined(HAVE_FNMATCH) + return (!fnmatch(t->this, p, fnflags)); #else goto pattern; /* Use patmatch() as "fallback" */ #endif @@ -1627,10 +1412,14 @@ goto pattern; } lname[0] = '\0'; + /* + * For file names from the command line, we did not perform + * a chdir() before, so we need to use the full path name. + */ lsize = readlink(state->level ? ff : f, lname, sizeof (lname)); if (lsize < 0) { ferrmsg(state->std[2], - gettext("Cannot read link '%s'.\n"), ff); + _("Cannot read link '%s'.\n"), ff); return (FALSE); } lname[sizeof (lname)-1] = '\0'; @@ -1668,6 +1457,39 @@ return ((fs->st_size+511)/512 == t->val.size); } + case EMPTY: + if (S_ISREG(fs->st_mode) && fs->st_size == 0) + return (TRUE); + /* + * For file names from the command line, we did not perform + * a chdir() before, so we need to use the full path name. + */ + if (S_ISDIR(fs->st_mode)) { + struct dirent *dp; + DIR *d = opendir(state->level ? ff : f); + + if (d == NULL) { + ferrmsg(state->std[2], + _("Cannot open directory '%s'.\n"), + ff); + return (FALSE); + } + while ((dp = readdir(d)) != NULL) { + register char *name = dp->d_name; + /* + * Skip the following names: "", ".", "..". + */ + if (name[name[0] != '.' ? 0 : + name[1] != '.' ? 1 : 2] == '\0') + continue; + closedir(d); + return (FALSE); + } + closedir(d); + return (TRUE); + } + return (FALSE); + case LINKS: switch (*(t->left)) { case '+': @@ -1692,12 +1514,32 @@ return ((fs->st_ino == t->val.ino) && (fs->st_dev == t->val2.dev)); + case READABLE: + t->val.i = R_OK; + goto check_access; + case WRITABLE: + t->val.i = W_OK; + goto check_access; + case EXECUTABLE: + t->val.i = X_OK; + check_access: + /* + * For file names from the command line, we did not perform + * a chdir() before, so we need to use the full path name. + */ + if (access(state->level ? ff : f, t->val.i) < 0) + return (FALSE); + return (TRUE); + + case AMIN: case ATIME: xtime = fs->st_atime; goto times; + case CMIN: case CTIME: xtime = fs->st_ctime; goto times; + case MMIN: case MTIME: case TIME: xtime = fs->st_mtime; @@ -1707,20 +1549,20 @@ switch (*(t->left)) { case '+': - return ((find_now-xtime)/DAYSECS > t->val.time); + return ((find_xnow-xtime)/DAYSECS > t->val.time); case '-': - return ((find_now-xtime)/DAYSECS < t->val.time); + return ((find_xnow-xtime)/DAYSECS < t->val.time); default: - return ((find_now-xtime)/DAYSECS == t->val.time); + return ((find_xnow-xtime)/DAYSECS == t->val.time); } timex: switch (*(t->left)) { case '+': - return ((find_now-xtime) > t->val.time); + return ((find_xnow-xtime) > t->val.time); case '-': - return ((find_now-xtime) < t->val.time); + return ((find_xnow-xtime) < t->val.time); default: - return ((find_now-xtime) == t->val.time); + return ((find_xnow-xtime) == t->val.time); } case NEWERAA: @@ -1815,16 +1657,20 @@ #ifdef CHMOD case CHMOD: - getperm(state->std[2], t, FALSE, fs->st_mode & S_ALLMODES, - S_ISDIR(fs->st_mode) || - (fs->st_mode & (S_IXUSR|S_IXGRP|S_IXOTH)) != 0); + getperm(state->std[2], t->left, tokennames[t->op], + &t->val.mode, fs->st_mode & S_ALLMODES, + (S_ISDIR(fs->st_mode) || + (fs->st_mode & (S_IXUSR|S_IXGRP|S_IXOTH)) != 0) ? + GP_DOX:GP_NOX); fs->st_mode &= ~S_ALLMODES; fs->st_mode |= t->val.mode; return (TRUE); #endif case PERM: - if (t->left[0] == '-') + if (t->left[0] == '+') + return ((fs->st_mode & t->val.mode) != 0); + else if (t->left[0] == '-') return ((fs->st_mode & t->val.mode) == t->val.mode); else return ((fs->st_mode & S_ALLMODES) == t->val.mode); @@ -1840,11 +1686,9 @@ return (TRUE); case NOUSER: -/* return (nameuid(NULL, 32, fs->st_uid));*/ return (getpwuid(fs->st_uid) == NULL); case NOGRP: -/* return (namegid(NULL, 32, fs->st_gid));*/ return (getgrgid(fs->st_gid) == NULL); case PRUNE: @@ -1876,7 +1720,8 @@ return (FALSE); #endif - case OK_EXEC: { + case OK_EXEC: + case OK_EXECDIR: { char qbuf[32]; fflush(state->std[1]); @@ -1894,22 +1739,58 @@ /* FALLTHRU */ case EXEC: - return (doexec(f, t->val.i, (char **)t->this, state)); + case EXECDIR: +#ifdef HAVE_FORK + return (doexec( + state->level && (t->op == OK_EXECDIR || t->op == EXECDIR)? + ff:f, + t, t->val.i, (char **)t->this, state)); +#else + ferrmsgno(state->std[2], EX_BAD, + _("'-%s' is unsupported on this platform, returning FALSE.\n"), + find_tname(t->op)); + return (FALSE); +#endif case EXECPLUS: +#ifdef HAVE_FORK return (plusexec(f, t, state)); +#else + ferrmsgno(state->std[2], EX_BAD, + _("'-%s' is unsupported on this platform, returning FALSE.\n"), + find_tname(t->op)); + return (FALSE); +#endif + case FPRINT: + fp = t->val.fp; + /* FALLTHRU */ case PRINT: - filewrite(state->std[1], f, strlen(f)); - putc('\n', state->std[1]); + filewrite(fp, f, strlen(f)); + putc('\n', fp); return (TRUE); + case FPRINT0: + fp = t->val.fp; + /* FALLTHRU */ + case PRINT0: + filewrite(fp, f, strlen(f)); + putc('\0', fp); + return (TRUE); + + case FPRINTNNL: + fp = t->val.fp; + /* FALLTHRU */ case PRINTNNL: - filewrite(state->std[1], f, strlen(f)); - putc(' ', state->std[1]); + filewrite(fp, f, strlen(f)); + putc(' ', fp); return (TRUE); - case LS: + case FLS: + fp = t->val.fp; + /* FALLTHRU */ + case LS: { + FILE *std[3]; /* * The third parameter is the file name used for readlink() * (inside find_list()) relatively to the current working @@ -1917,9 +1798,12 @@ * perform a chdir() before, so we need to use the full path * name. */ - find_list(state->std, fs, f, state->level ? ff : f, state); + std[0] = state->std[0]; + std[1] = fp; + std[2] = state->std[2]; + find_list(std, fs, f, state->level ? ff : f, state); return (TRUE); - + } case LTRUE: return (TRUE); @@ -1937,39 +1821,99 @@ return (find_expr(f, ff, fs, state, (findn_t *)t->left) ? 1 : find_expr(f, ff, fs, state, (findn_t *)t->right)); } + if (!(state->pflags & 0x80000000)) { + + ferrmsgno(state->std[2], EX_BAD, + _("Internal malfunction, found unknown primary '-%s' (%d).\n"), + find_tname(t->op), t->op); + state->pflags |= 0x80000000; + } return (FALSE); /* Unknown operator ??? */ } +#ifdef HAVE_FORK LOCAL BOOL -doexec(f, ac, av, state) +doexec(f, t, ac, av, state) char *f; + findn_t *t; int ac; char **av; struct WALK *state; { +#ifdef HAVE_VFORK + char ** volatile aav = NULL; +#endif pid_t pid; int retval; - if ((pid = fork()) < 0) { - ferrmsg(state->std[2], gettext("Cannot fork child.\n")); +#ifdef HAVE_VFORK + if (f && ac >= 32) { + aav = malloc((ac+1) * sizeof (char **)); + if (aav == NULL) { + ferrmsg(state->std[2], _("Cannot malloc arg vector for -exec.\n")); + return (FALSE); + } + } +#endif + if ((pid = vfork()) < 0) { +#ifdef HAVE_VFORK + ferrmsg(state->std[2], _("Cannot vfork child.\n")); +#else + ferrmsg(state->std[2], _("Cannot fork child.\n")); +#endif +#ifdef HAVE_VFORK + /* + * Ugly code as a workaround for broken Linux include files + * that do not specify vfork() as a problem. This may + * cause aav to be != NULL even when malloc() above was never + * called. Freeing a random address on some platforms causes a + * coredump. + * As similar problems may exist on other platforms, where the + * correct fix to mark aav volatile does not work, we keep the + * workaround to check f and ac as well. + */ + if (aav && f && ac >= 32) + free(aav); +#endif return (FALSE); } if (pid) { while (wait(&retval) != pid) /* LINTED */ ; +#ifdef HAVE_VFORK + /* + * Ugly code as a workaround for broken Linux include files + * that do not specify vfork() as a problem. This may + * cause aav to be != NULL even when malloc() above was never + * called. Freeing a random address on some platforms causes a + * coredump. + * As similar problems may exist on other platforms, where the + * correct fix to mark aav volatile does not work, we keep the + * workaround to check f and ac as well. + */ + if (aav && f && ac >= 32) + free(aav); +#endif return (retval == 0); } else { +#ifdef HAVE_VFORK + char *xav[32]; + register char **pp2 = xav; +#endif register int i; register char **pp = av; + int err; /* * This is the forked process and for this reason, we may * call fcomerr() here without problems. */ - if (walkhome(state) < 0) { + if (t != NULL && /* Not called from find_plusflush() */ + t->op != OK_EXECDIR && t->op != EXECDIR && + walkhome(state) < 0) { fcomerr(state->std[2], - gettext("Cannot chdir to '.'.\n")); + _("Cannot chdir to '.'.\n")); } #ifndef F_SETFD walkclose(state); @@ -1977,20 +1921,46 @@ #define iscurlypair(p) ((p)[0] == '{' && (p)[1] == '}' && (p)[2] == '\0') - if (f) { +#ifdef HAVE_VFORK + if (aav) + pp2 = aav; +#endif + if (f) { /* NULL for -exec+ */ for (i = 0; i < ac; i++, pp++) { register char *p = *pp; +#ifdef HAVE_VFORK + if (iscurlypair(p)) /* streql(p, "{}") */ + *pp2++ = f; + else + *pp2++ = p; +#else if (iscurlypair(p)) /* streql(p, "{}") */ *pp = f; +#endif } +#ifdef HAVE_VFORK + if (aav) + pp = aav; + else + pp = xav; +#endif + } else { + pp = av; } +#ifndef HAVE_VFORK + pp = av; +#endif #ifdef PLUS_DEBUG error("argsize %d\n", (plusp->endp - (char *)&plusp->nextargp[0]) - (plusp->laststr - (char *)&plusp->nextargp[1])); #endif - fexecv(av[0], state->std[0], state->std[1], state->std[2], ac, av); + pp[ac] = NULL; /* -exec {} \; is not NULL terminated */ + + fexecve(av[0], state->std[0], state->std[1], state->std[2], + pp, state->env); + err = geterrno(); #ifdef PLUS_DEBUG error("argsize %d\n", (plusp->endp - (char *)&plusp->nextargp[0]) - @@ -1998,14 +1968,16 @@ #endif /* * This is the forked process and for this reason, we may - * call fcomerr() here without problems. + * call _exit() here without problems. */ - fcomerr(state->std[2], - gettext("Cannot execute '%s'.\n"), av[0]); + ferrmsgno(state->std[2], err, + _("Cannot execute '%s'.\n"), av[0]); + _exit(err); /* NOTREACHED */ return (-1); } } +#endif /* HAVE FORK */ #ifndef LINE_MAX #define LINE_MAX 1024 @@ -2023,13 +1995,30 @@ #endif /* + * Return the number of environment entries including the final NULL pointer. + */ +LOCAL int +countenv() +{ + register int evs = 0; + register char **ep; + + for (ep = environ; *ep; ep++) { + evs++; + } + evs++; /* The environ NULL ptr at the end */ + return (evs); +} + +/* * Return ARG_MAX - LINE_MAX - size of current environment. * * The return value is reduced by LINE_MAX to allow the called * program to do own exec(2) calls with slightly increased arg size. */ LOCAL int -argsize() +argsize(xtype) + int xtype; { static int ret = 0; @@ -2045,15 +2034,28 @@ #ifdef _SC_ARG_MAX ret = sysconf(_SC_ARG_MAX); if (ret < 0) +#ifdef _POSIX_ARG_MAX ret = _POSIX_ARG_MAX; #else + ret = ARG_MAX; +#endif +#else /* VV NO _SC_ARG_MAX VV */ #ifdef ARG_MAX ret = ARG_MAX; #else #ifdef NCARGS - ret = NCARGS; + /* + * On Solaris: ARG_MAX = NCARGS - space for other stuff on + * initial stack. This size is 256 for 32 bit and 512 for + * 64 bit programs. + */ + ret = NCARGS - 256; /* Let us do the same */ +#endif #endif #endif + +#ifdef MULTI_ARG_MAX + ret = xargsize(xtype, ret); #endif #ifdef PLUS_DEBUG @@ -2064,7 +2066,7 @@ if (ret <= 0) ret = 10000; /* Just a guess */ - ret -= evs; + ret -= evs; /* Subtract current env size */ if ((ret - LINE_MAX) > 0) ret -= LINE_MAX; else @@ -2073,6 +2075,88 @@ return (ret); } +/* + * Return the executable type: + * + * 0 unknown type -> default + * 32 a 32 bit binary + * 64 a 64 bit binary + */ +LOCAL int +extype(name) + char *name; +{ + int f; + char *xname; + char elfbuf[8]; + + xname = findinpath(name, X_OK, TRUE, NULL); + if (name == NULL) + xname = name; + + if ((f = open(xname, O_RDONLY|O_BINARY)) < 0) { + if (xname != name) + free(xname); + return (0); + } + if (xname != name) + free(xname); + if (read(f, elfbuf, sizeof (elfbuf)) < sizeof (elfbuf)) { + close(f); + return (0); + } + close(f); + + /* + * We only support ELF binaries + */ + if (elfbuf[0] != 0x7F || + elfbuf[1] != 'E' || elfbuf[2] != 'L' || elfbuf[3] != 'F') + return (0); + + switch (elfbuf[4] & 0xFF) { + + case 1: /* ELFCLASS32 */ + return (32); + + case 2: /* ELFCLASS64 */ + return (64); + } + return (0); +} + +#ifdef MULTI_ARG_MAX +/* + * If we have both _ARG_MAX32 and _ARG_MAX64 (currently on SunOS) + * correct maxarg based on the target binary type. + */ +LOCAL int +xargsize(xtype, maxarg) + int xtype; + int maxarg; +{ + /* + * Set up a safe fallback in case we are not able to determine the + * binary type. + */ + if (maxarg > _ARG_MAX32) + maxarg = _ARG_MAX32; + + switch (xtype) { + + case 32: + maxarg = _ARG_MAX32; + break; + + case 64: + maxarg = _ARG_MAX64; + break; + } + + return (maxarg); +} +#endif + LOCAL BOOL pluscreate(f, ac, av, fap) FILE *f; @@ -2083,6 +2167,25 @@ struct plusargs *pp; register char **ap = av; register int i; + int mxtype; + int xtype; + int maxarg; + int nenv; + + xtype = extype(av[0]); /* Get -exec executable type */ + maxarg = argsize(xtype); /* Get ARG_MAX for executable */ + nenv = countenv(); /* # of ents in current env */ + + mxtype = sizeof (char *) * CHAR_BIT; + if (xtype == 0) + mxtype = 0; + + if (xtype == mxtype) + nenv = 0; /* Easy case */ + else if (xtype > mxtype) + nenv = -nenv; /* Need to reduce arg size */ + + maxarg += nenv * (32 / CHAR_BIT); /* Correct maxarg by ptr size */ #ifdef PLUS_DEBUG printf("Argc %d\n", ac); @@ -2091,16 +2194,17 @@ printf("ARG %d '%s'\n", i, *ap); #endif - pp = __fjmalloc(fap->std[2], argsize() + sizeof (struct plusargs), + pp = __fjmalloc(fap->std[2], maxarg + sizeof (struct plusargs), "-exec args", fap->jmp); - pp->laststr = pp->endp = (char *)(&pp->av[0]) + argsize(); + pp->laststr = pp->endp = (char *)(&pp->av[0]) + maxarg; + pp->nenv = nenv; pp->ac = 0; pp->nextargp = &pp->av[0]; #ifdef PLUS_DEBUG printf("pp %d\n", pp); printf("pp->laststr %d\n", pp->laststr); - printf("argsize() %d\n", argsize()); + printf("argsize() %d\n", maxarg); #endif /* @@ -2116,7 +2220,7 @@ pp->ac++; if (pp->laststr <= (char *)pp->nextargp) { ferrmsgno(f, EX_BAD, - gettext("No space to copy -exec args.\n")); + _("No space to copy -exec args.\n")); free(pp); /* The exec plusargs struct */ return (FALSE); } @@ -2145,6 +2249,7 @@ return (TRUE); } +#ifdef HAVE_FORK LOCAL BOOL plusexec(f, t, state) char *f; @@ -2156,24 +2261,30 @@ register char **ap; register int i; #endif - int size; - int slen = strlen(f) + 1; + size_t size; + size_t slen = strlen(f) + 1; + char *nargp = (char *)&pp->nextargp[2]; char *cp; int ret = TRUE; - size = pp->laststr - (char *)&pp->nextargp[2]; + size = pp->laststr - (char *)&pp->nextargp[2]; /* Remaining strlen */ + + if (pp->nenv < 0) /* Called cmd has */ + nargp += pp->ac * (32 / CHAR_BIT); /* larger ptr size */ - if (slen > size) { + if (pp->laststr < nargp || /* Already full */ + slen > size) { /* str does not fit */ pp->nextargp[0] = NULL; - ret = doexec(NULL, pp->ac, pp->av, state); + ret = doexec(NULL, t, pp->ac, pp->av, state); pp->laststr = pp->endp; pp->ac = t->val.i; pp->nextargp = &pp->av[t->val.i]; size = pp->laststr - (char *)&pp->nextargp[2]; } - if (slen > size) { + if (pp->laststr < nargp || + slen > size) { ferrmsgno(state->std[2], EX_BAD, - gettext("No space for arg '%s'.\n"), f); + _("No space for arg '%s'.\n"), f); return (FALSE); } cp = pp->laststr - slen; @@ -2192,6 +2303,7 @@ #endif return (ret); } +#endif /* HAVE_FORK */ EXPORT int find_plusflush(p, state) @@ -2210,8 +2322,10 @@ #endif if (plusp->laststr != plusp->endp) { plusp->nextargp[0] = NULL; - if (!doexec(NULL, plusp->ac, plusp->av, state)) +#ifdef HAVE_FORK + if (!doexec(NULL, NULL, plusp->ac, plusp->av, state)) ret = FALSE; +#endif } plusp = plusp->next; } @@ -2222,69 +2336,86 @@ find_usage(f) FILE *f; { - fprintf(f, gettext("Usage: %s [options] [path_1 ... path_n] [expression]\n"), get_progname()); - fprintf(f, gettext("Options:\n")); - fprintf(f, gettext(" -H follow symbolic links encountered on command line\n")); - fprintf(f, gettext(" -L follow all symbolic links\n")); - fprintf(f, gettext("* -P do not follow symbolic links (default)\n")); - fprintf(f, gettext("* -help Print this help.\n")); - fprintf(f, gettext("* -version Print version number.\n")); - fprintf(f, gettext("Operators in decreasing precedence:\n")); - fprintf(f, gettext(" ( ) group an expression\n")); - fprintf(f, gettext(" !, -a, -o negate a primary (unary NOT), logical AND, logical OR\n")); - fprintf(f, gettext("Primaries:\n")); - fprintf(f, gettext("* -acl TRUE if the file has additional ACLs defined\n")); - fprintf(f, gettext(" -atime # TRUE if st_atime is in specified range\n")); + fprintf(f, _("Usage: %s [options] [path_1 ... path_n] [expression]\n"), get_progname()); + fprintf(f, _("Options:\n")); + fprintf(f, _(" -H follow symbolic links encountered on command line\n")); + fprintf(f, _(" -L follow all symbolic links\n")); + fprintf(f, _("* -P do not follow symbolic links (default)\n")); + fprintf(f, _("* -help Print this help.\n")); + fprintf(f, _("* -version Print version number.\n")); + fprintf(f, _("Operators in decreasing precedence:\n")); + fprintf(f, _(" ( ) group an expression\n")); + fprintf(f, _(" !, -a, -o negate a primary (unary NOT), logical AND, logical OR\n")); + fprintf(f, _("Primaries:\n")); + fprintf(f, _("* -acl TRUE if the file has additional ACLs defined\n")); + fprintf(f, _(" -atime # TRUE if st_atime is in specified range\n")); #ifdef CHGRP - fprintf(f, gettext("* -chgrp gname/gid always TRUE, sets st_gid to gname/gid\n")); + fprintf(f, _("* -chgrp gname/gid always TRUE, sets st_gid to gname/gid\n")); #endif #ifdef CHMOD - fprintf(f, gettext("* -chmod mode/onum always TRUE, sets permissions to mode/onum\n")); + fprintf(f, _("* -chmod mode/onum always TRUE, sets permissions to mode/onum\n")); #endif #ifdef CHOWN - fprintf(f, gettext("* -chown uname/uid always TRUE, sets st_uid to uname/uid\n")); + fprintf(f, _("* -chown uname/uid always TRUE, sets st_uid to uname/uid\n")); #endif - fprintf(f, gettext(" -ctime # TRUE if st_ctime is in specified range\n")); - fprintf(f, gettext(" -depth evaluate directory content before directory (always TRUE)\n")); - fprintf(f, gettext("* -dostat Do not do stat optimization (always TRUE)\n")); - fprintf(f, gettext(" -exec program [argument ...] \\;\n")); - fprintf(f, gettext(" -exec program [argument ...] {} +\n")); - fprintf(f, gettext("* -false always FALSE\n")); - fprintf(f, gettext("* -follow outdated: follow all symbolic links (always TRUE)\n")); - fprintf(f, gettext("* -fstype type TRUE if st_fstype matches type\n")); - fprintf(f, gettext(" -group gname/gid TRUE if st_gid matches gname/gid\n")); - fprintf(f, gettext("* -inum # TRUE if st_ino is in specified range\n")); - fprintf(f, gettext("* -linkedto path TRUE if the file is linked to path\n")); - fprintf(f, gettext(" -links # TRUE if st_nlink is in specified range\n")); - fprintf(f, gettext("* -lname glob TRUE if symlink name matches shell glob\n")); - fprintf(f, gettext("* -local TRUE if st_fstype does not match remote fs types\n")); - fprintf(f, gettext("* -lpat pattern TRUE if symlink name matches pattern\n")); - fprintf(f, gettext("* -ls list files similar to 'ls -ilds' (always TRUE)\n")); - fprintf(f, gettext("* -maxdepth # descend at most # directory levels (always TRUE)\n")); - fprintf(f, gettext("* -mindepth # start tests at directory level # (always TRUE)\n")); - fprintf(f, gettext(" -mtime # TRUE if st_mtime is in specified range\n")); - fprintf(f, gettext(" -name glob TRUE if path component matches shell glob\n")); - fprintf(f, gettext(" -newer file TRUE if st_mtime newer then mtime of file\n")); - fprintf(f, gettext(" -newerXY file TRUE if [acm]time (X) newer then [acm]time (Y) of file\n")); - fprintf(f, gettext(" -nogroup TRUE if not in group database\n")); - fprintf(f, gettext(" -nouser TRUE if not in user database\n")); - fprintf(f, gettext(" -ok program [argument ...] \\;\n")); - fprintf(f, gettext("* -pat pattern TRUE if path component matches pattern\n")); - fprintf(f, gettext("* -path glob TRUE if full path matches shell glob\n")); - fprintf(f, gettext(" -perm mode/onum TRUE if symbolic/octal permission matches\n")); - fprintf(f, gettext("* -ppat pattern TRUE if full path matches pattern\n")); - fprintf(f, gettext(" -print print file names line separated to stdout (always TRUE)\n")); - fprintf(f, gettext("* -printnnl print file names space separated to stdout (always TRUE)\n")); - fprintf(f, gettext(" -prune do not descent current directory (always TRUE)\n")); - fprintf(f, gettext(" -size # TRUE if st_size is in specified range\n")); - fprintf(f, gettext("* -sparse TRUE if file appears to be sparse\n")); - fprintf(f, gettext("* -true always TRUE\n")); - fprintf(f, gettext(" -type c TRUE if file type matches, c is from (b c d D e f l p P s)\n")); - fprintf(f, gettext(" -user uname/uid TRUE if st_uid matches uname/uid\n")); - fprintf(f, gettext("* -xattr TRUE if the file has extended attributes\n")); - fprintf(f, gettext(" -xdev, -mount restrict search to current filesystem (always TRUE)\n")); - fprintf(f, gettext("Primaries marked with '*' are POSIX extensions, avoid them in portable scripts.\n")); - fprintf(f, gettext("If path is omitted, '.' is used. If expression is omitted, -print is used.\n")); + fprintf(f, _(" -ctime # TRUE if st_ctime is in specified range\n")); + fprintf(f, _(" -depth evaluate directory content before directory (always TRUE)\n")); + fprintf(f, _("* -dostat Do not do stat optimization (always TRUE)\n")); + fprintf(f, _("* -empty TRUE zero sized plain file or empty directory\n")); + fprintf(f, _(" -exec program [argument ...] \\;\n")); + fprintf(f, _(" -exec program [argument ...] {} +\n")); + fprintf(f, _("* -execdir program [argument ...] \\;\n")); + fprintf(f, _("* -executable TRUE if file is executable by real user id\n")); + fprintf(f, _("* -false always FALSE\n")); + fprintf(f, _("* -fls file list files similar to 'ls -ilds' into 'file' (always TRUE)\n")); + fprintf(f, _("* -follow outdated: follow all symbolic links (always TRUE)\n")); + fprintf(f, _("* -fprint file print file names line separated into 'file' (always TRUE)\n")); + fprintf(f, _("* -fprint0 file print file names nul separated into 'file' (always TRUE)\n")); + fprintf(f, _("* -fprintnnl file print file names space separated into 'file' (always TRUE)\n")); + fprintf(f, _("* -fstype type TRUE if st_fstype matches type\n")); + fprintf(f, _(" -group gname/gid TRUE if st_gid matches gname/gid\n")); + fprintf(f, _("* -ilname glob TRUE if symlink name matches shell glob\n")); + fprintf(f, _("* -ilpat pattern TRUE if symlink name matches pattern\n")); + fprintf(f, _("* -iname glob TRUE if path component matches shell glob\n")); + fprintf(f, _("* -inum # TRUE if st_ino is in specified range\n")); + fprintf(f, _("* -ipat pattern TRUE if path component matches pattern\n")); + fprintf(f, _("* -ipath glob TRUE if full path matches shell glob\n")); + fprintf(f, _("* -ippat pattern TRUE if full path matches pattern\n")); + fprintf(f, _("* -linkedto path TRUE if the file is linked to path\n")); + fprintf(f, _(" -links # TRUE if st_nlink is in specified range\n")); + fprintf(f, _("* -lname glob TRUE if symlink name matches shell glob\n")); + fprintf(f, _("* -local TRUE if st_fstype does not match remote fs types\n")); + fprintf(f, _("* -lpat pattern TRUE if symlink name matches pattern\n")); + fprintf(f, _("* -ls list files similar to 'ls -ilds' (always TRUE)\n")); + fprintf(f, _("* -maxdepth # descend at most # directory levels (always TRUE)\n")); + fprintf(f, _("* -mindepth # start tests at directory level # (always TRUE)\n")); + fprintf(f, _(" -mtime # TRUE if st_mtime is in specified range\n")); + fprintf(f, _(" -name glob TRUE if path component matches shell glob\n")); + fprintf(f, _(" -newer file TRUE if st_mtime newer then mtime of file\n")); + fprintf(f, _("* -newerXY file TRUE if [acm]time (X) newer then [acm]time (Y) of file\n")); + fprintf(f, _(" -nogroup TRUE if not in group database\n")); + fprintf(f, _(" -nouser TRUE if not in user database\n")); + fprintf(f, _(" -ok program [argument ...] \\;\n")); + fprintf(f, _("* -okdir program [argument ...] \\;\n")); + fprintf(f, _("* -pat pattern TRUE if path component matches pattern\n")); + fprintf(f, _("* -path glob TRUE if full path matches shell glob\n")); + fprintf(f, _(" -perm mode/onum TRUE if symbolic/octal permission matches\n")); + fprintf(f, _("* -ppat pattern TRUE if full path matches pattern\n")); + fprintf(f, _(" -print print file names line separated to stdout (always TRUE)\n")); + fprintf(f, _("* -print0 print file names nul separated to stdout (always TRUE)\n")); + fprintf(f, _("* -printnnl print file names space separated to stdout (always TRUE)\n")); + fprintf(f, _(" -prune do not descent current directory (always TRUE)\n")); + fprintf(f, _("* -readable TRUE if file is readable by real user id\n")); + fprintf(f, _(" -size # TRUE if st_size is in specified range\n")); + fprintf(f, _("* -sparse TRUE if file appears to be sparse\n")); + fprintf(f, _("* -true always TRUE\n")); + fprintf(f, _(" -type c TRUE if file type matches, c is from (b c d D e f l p P s)\n")); + fprintf(f, _(" -user uname/uid TRUE if st_uid matches uname/uid\n")); + fprintf(f, _("* -writable TRUE if file is writable by real user id\n")); + fprintf(f, _("* -xattr TRUE if the file has extended attributes\n")); + fprintf(f, _(" -xdev, -mount restrict search to current filesystem (always TRUE)\n")); + fprintf(f, _("Primaries marked with '*' are POSIX extensions, avoid them in portable scripts.\n")); + fprintf(f, _("If path is omitted, '.' is used. If expression is omitted, -print is used.\n")); } #ifdef FIND_MAIN @@ -2295,8 +2426,6 @@ char *optstr; long *argp; { -/* error("optstr: '%s'\n", optstr);*/ - if (optstr[1] != '\0') return (-1); @@ -2323,9 +2452,9 @@ char **av; { int cac = ac; - char * *cav = av; - char * *firstpath; - char * *firstprim; + char **cav = av; + char **firstpath; + char **firstprim; BOOL help = FALSE; BOOL prversion = FALSE; finda_t fa; @@ -2357,7 +2486,7 @@ return (0); } if (prversion) { - printf("sfind release %s (%s-%s-%s) Copyright (C) 2004-2007 Jörg Schilling\n", + printf("sfind release %s (%s-%s-%s) Copyright (C) 2004-2008 Jörg Schilling\n", strvers, HOST_CPU, HOST_VENDOR, HOST_OS); return (0); @@ -2377,14 +2506,14 @@ } if (fa.primtype != FIND_ENDARGS) { ferrmsgno(stderr, EX_BAD, - gettext("Incomplete expression.\n")); + _("Incomplete expression.\n")); find_free(Tree, &fa); return (EX_BAD); } if (find_pname(Tree, "-chown") || find_pname(Tree, "-chgrp") || find_pname(Tree, "-chmod")) { ferrmsgno(stderr, EX_BAD, - gettext("Unsupported primary -chown/-chgrp/-chmod.\n")); + _("Unsupported primary -chown/-chgrp/-chmod.\n")); find_free(Tree, &fa); return (EX_BAD); } diff -Nru cdrtools-2.01.01a33/libfind/find.h cdrtools-3.02a09/libfind/find.h --- cdrtools-2.01.01a33/libfind/find.h 2007-04-03 23:24:06.000000000 +0000 +++ cdrtools-3.02a09/libfind/find.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,99 +0,0 @@ -/* @(#)find.h 1.17 07/04/04 Copyright 2005-2007 J. Schilling */ -/* - * Definitions for libfind users. - */ -/* - * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. - * - * See the file CDDL.Schily.txt in this distribution for details. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file CDDL.Schily.txt from this distribution. - */ - -#ifndef _FIND_H -#define _FIND_H - -#ifndef _SCHILY_MCONFIG_H -#include -#endif - -#ifndef _INCL_STDIO_H -#include -#define _INCL_STDIO_H -#endif - -#ifndef _SCHILY_STANDARD_H -#include -#endif -#ifndef _SCHILY_STAT_H -#include -#endif - -typedef struct find_args { - int Argc; /* A copy of argc */ - char **Argv; /* A copy of argv */ - FILE *std[3]; /* To redirect stdin/stdout/err */ - int primtype; /* The type of the last primary */ - BOOL found_action; /* -print/-ls/-exec found */ - int patlen; /* strlen() for longest pattern */ - int walkflags; /* Walkflags modifed by parser */ - int maxdepth; /* -mindepth arg */ - int mindepth; /* -maxdepth arg */ - struct plusargs *plusp; /* List of -exec {} + commands */ - void *jmp; /* Used internally by parser */ - int error; /* Error code from find_parse() */ -} finda_t; - -/* - * finda_t->primtype is set to ENDARGS by find_parse() if a complete expression - * could be parsed. - */ -#define FIND_ENDARGS 1000 /* Found End of Arg Vector */ -#define FIND_ERRARG 1001 /* Parser abort by -help or error */ - -/* - * Flags used for struct WALK->pflags: - */ -#define PF_ACL 0x00001 /* Check ACL from struct WALK->pflags */ -#define PF_HAS_ACL 0x10000 /* This file has ACL */ -#define PF_XATTR 0x00002 /* Check XATTR from struct WALK->pflags */ -#define PF_HAS_XATTR 0x20000 /* This file has XATTR */ - -#ifndef FIND_NODE -#define findn_t void -#endif - -#ifndef __squit_t_defined - -typedef struct { - sqfun_t quitfun; /* Function to query for shell signal quit */ - void *qfarg; /* Generic arg for shell builtin quit fun */ -} squit_t; - -#define __squit_t_defined -#endif - - -extern void find_argsinit __PR((finda_t *fap)); -extern void find_timeinit __PR((time_t __now)); -extern findn_t *find_printnode __PR((void)); -extern findn_t *find_addprint __PR((findn_t *np, finda_t *fap)); -extern void find_free __PR((findn_t *t, finda_t *fap)); -extern int find_token __PR((char *word)); -extern char *find_tname __PR((int op)); -extern findn_t *find_parse __PR((finda_t *fap)); -extern void find_firstprim __PR((int *pac, char *const **pav)); - -extern BOOL find_primary __PR((findn_t *t, int op)); -extern BOOL find_pname __PR((findn_t *t, char *word)); -extern BOOL find_expr __PR((char *f, char *ff, struct stat *fs, struct WALK *state, findn_t *t)); - -extern int find_plusflush __PR((void *p, struct WALK *state)); -extern void find_usage __PR((FILE *f)); -extern int find_main __PR((int ac, char **av, FILE *std[3], squit_t *__quit)); - -#endif /* _FIND_H */ diff -Nru cdrtools-2.01.01a33/libfind/find_list.c cdrtools-3.02a09/libfind/find_list.c --- cdrtools-2.01.01a33/libfind/find_list.c 2007-05-16 13:00:38.000000000 +0000 +++ cdrtools-3.02a09/libfind/find_list.c 2015-09-12 10:54:43.000000000 +0000 @@ -1,12 +1,13 @@ -/* @(#)find_list.c 1.19 07/05/16 Copyright 1985, 1995, 2000-2007 J. Schilling*/ +/* @(#)find_list.c 1.28 15/09/12 Copyright 1985, 1995, 2000-2010 J. Schilling */ +#include #ifndef lint -static char sccsid[] = - "@(#)find_list.c 1.19 07/05/16 Copyright 1985, 1995, 2000-2007 J. Schilling"; +static UConst char sccsid[] = + "@(#)find_list.c 1.28 15/09/12 Copyright 1985, 1995, 2000-2010 J. Schilling"; #endif /* * List a file * - * Copyright (c) 1985, 1995, 2000-2007 J. Schilling + * Copyright (c) 1985, 1995, 2000-2010 J. Schilling */ /* * The contents of this file are subject to the terms of the @@ -15,13 +16,14 @@ * with the License. * * See the file CDDL.Schily.txt in this distribution for details. + * A copy of the CDDL is also available via the Internet at + * http://www.opensource.org/licenses/cddl1.txt * * When distributing Covered Code, include this CDDL HEADER in each * file and include the License file CDDL.Schily.txt from this distribution. */ -#include -#include +#include #include #include #include @@ -31,16 +33,10 @@ #include #include #include - -#ifdef HAVE_SYS_PARAM_H -#include -#endif -#ifndef DEV_BSIZE -#define DEV_BSIZE 512 -#endif - -#include "walk.h" -#include "find.h" +#include +#include +#include +#include #include "find_list.h" #include "find_misc.h" @@ -62,13 +58,12 @@ extern BOOL numeric; extern int verbose; -LOCAL void modstr __PR((FILE *f, struct stat *fs, char *s, char *name, char *sname, struct WALK *state)); -EXPORT void find_list __PR((FILE *std[3], struct stat *fs, char *name, char *sname, struct WALK *state)); - -/*--------------------------------------------------------------------------*/ -extern BOOL nameuid __PR((char *name, int namelen, uid_t uid)); -extern BOOL namegid __PR((char *name, int namelen, gid_t gid)); -/*--------------------------------------------------------------------------*/ +LOCAL void modstr __PR((FILE *f, struct stat *fs, char *s, + char *name, char *sname, + struct WALK *state)); +EXPORT void find_list __PR((FILE *std[3], struct stat *fs, + char *name, char *sname, + struct WALK *state)); /* * Convert POSIX.1 mode/permission flags into string. @@ -176,7 +171,7 @@ &fs->st_ctime : &fs->st_mtime); tstr = ctime(tp); - if (nameuid(nuid, sizeof (nuid), fs->st_uid)) { + if (ic_nameuid(nuid, sizeof (nuid), fs->st_uid)) { uname = nuid; umaxlen = sizeof (nuid)-1; } else { @@ -185,7 +180,7 @@ umaxlen = sizeof (nuid)-1; } - if (namegid(ngid, sizeof (ngid), fs->st_gid)) { + if (ic_namegid(ngid, sizeof (ngid), fs->st_gid)) { gname = ngid; gmaxlen = sizeof (ngid)-1; } else { @@ -199,13 +194,15 @@ #ifdef HAVE_ST_BLOCKS fprintf(std[1], "%4llu ", (Llong)fs->st_blocks/K_DIV); #else - fprintf(std[1], "%4llu ", (Llong)(fs->st_size+1023)/1024); + fprintf(std[1], "%4llu ", + (Llong)(fs->st_size+1023)/1024); #endif } if (!paxls) { if (S_ISBLK(fs->st_mode) || S_ISCHR(fs->st_mode)) fprintf(std[1], "%3lu %3lu", - (long)major(fs->st_rdev), (long)minor(fs->st_rdev)); + (long)major(fs->st_rdev), + (long)minor(fs->st_rdev)); else fprintf(std[1], "%7llu", (Llong)fs->st_size); } @@ -234,7 +231,7 @@ lsize = readlink(sname, lname, sizeof (lname)); if (lsize < 0) ferrmsg(std[2], - gettext("Cannot read link '%s'.\n"), + _("Cannot read link '%s'.\n"), name); lname[sizeof (lname)-1] = '\0'; if (lsize >= 0) @@ -293,9 +290,9 @@ umaxlen, uname, gmaxlen, gname); if (S_ISBLK(fs->st_mode) || S_ISCHR(fs->st_mode)) -/* fprintf(std[1], "%3lu %3lu",*/ /* XXXXXXXXXXXXXX */ fprintf(std[1], "%3lu, %3lu", - (long)major(fs->st_rdev), (long)minor(fs->st_rdev)); + (long)major(fs->st_rdev), + (long)minor(fs->st_rdev)); else fprintf(std[1], "%7llu", (Llong)fs->st_size); if ((*tp < find_sixmonth) || (*tp > find_now)) { diff -Nru cdrtools-2.01.01a33/libfind/find_list.h cdrtools-3.02a09/libfind/find_list.h --- cdrtools-2.01.01a33/libfind/find_list.h 2007-04-04 12:49:46.000000000 +0000 +++ cdrtools-3.02a09/libfind/find_list.h 2009-07-10 20:02:42.000000000 +0000 @@ -1,6 +1,6 @@ -/* @(#)find_list.h 1.7 07/04/04 Copyright 2004-2007 J. Schilling */ +/* @(#)find_list.h 1.8 09/07/10 Copyright 2004-2008 J. Schilling */ /* - * Copyright (c) 2004-2007 J. Schilling + * Copyright (c) 2004-2008 J. Schilling */ /* * The contents of this file are subject to the terms of the @@ -14,18 +14,16 @@ * file and include the License file CDDL.Schily.txt from this distribution. */ -#ifndef _LIST_H -#define _LIST_H +#ifndef _FIND_LIST_H +#define _FIND_LIST_H #ifndef _SCHILY_MCONFIG_H #include #endif - -#ifndef _INCL_STDIO_H -#include -#define _INCL_STDIO_H +#ifndef _SCHILY_STDIO_H +#include #endif extern void find_list __PR((FILE *std[3], struct stat *fs, char *name, char *sname, struct WALK *state)); -#endif /* _LIST_H */ +#endif /* _FIND_LIST_H */ diff -Nru cdrtools-2.01.01a33/libfind/find_main.c cdrtools-3.02a09/libfind/find_main.c --- cdrtools-2.01.01a33/libfind/find_main.c 2007-07-01 12:52:19.000000000 +0000 +++ cdrtools-3.02a09/libfind/find_main.c 2015-09-12 10:54:43.000000000 +0000 @@ -1,13 +1,14 @@ /*#define PLUS_DEBUG*/ -/* @(#)find_main.c 1.58 07/07/01 Copyright 2004-2007 J. Schilling */ +/* @(#)find_main.c 1.69 15/09/12 Copyright 2004-2010 J. Schilling */ +#include #ifndef lint -static char sccsid[] = - "@(#)find_main.c 1.58 07/07/01 Copyright 2004-2007 J. Schilling"; +static UConst char sccsid[] = + "@(#)find_main.c 1.69 15/09/12 Copyright 2004-2010 J. Schilling"; #endif /* * Another find implementation... * - * Copyright (c) 2004-2007 J. Schilling + * Copyright (c) 2004-2010 J. Schilling */ /* * The contents of this file are subject to the terms of the @@ -16,13 +17,14 @@ * with the License. * * See the file CDDL.Schily.txt in this distribution for details. + * A copy of the CDDL is also available via the Internet at + * http://www.opensource.org/licenses/cddl1.txt * * When distributing Covered Code, include this CDDL HEADER in each * file and include the License file CDDL.Schily.txt from this distribution. */ -#include -#include +#include #include #include #include @@ -34,14 +36,14 @@ #include -char strvers[] = "1.3"; /* The pure version string */ +char strvers[] = "1.5"; /* The pure version string */ -#include "walk.h" -#include "find.h" +#include +#include LOCAL int walkfunc __PR((char *nm, struct stat *fs, int type, struct WALK *state)); LOCAL int getflg __PR((char *optstr, long *argp)); -EXPORT int find_main __PR((int ac, char **av, FILE *std[3], squit_t *quit)); +EXPORT int find_main __PR((int ac, char **av, char **ev, FILE *std[3], squit_t *quit)); LOCAL int walkfunc(nm, fs, type, state) @@ -61,21 +63,21 @@ } if (type == WALK_NS) { ferrmsg(state->std[2], - gettext("Cannot stat '%s'.\n"), nm); + _("Cannot stat '%s'.\n"), nm); state->err = 1; return (0); } else if (type == WALK_SLN && (state->walkflags & WALK_PHYS) == 0) { ferrmsg(state->std[2], - gettext("Cannot follow symlink '%s'.\n"), nm); + _("Cannot follow symlink '%s'.\n"), nm); state->err = 1; return (0); } else if (type == WALK_DNR) { if (state->flags & WALK_WF_NOCHDIR) { ferrmsg(state->std[2], - gettext("Cannot chdir to '%s'.\n"), nm); + _("Cannot chdir to '%s'.\n"), nm); } else { ferrmsg(state->std[2], - gettext("Cannot read '%s'.\n"), nm); + _("Cannot read '%s'.\n"), nm); } state->err = 1; return (0); @@ -98,7 +100,9 @@ char *optstr; long *argp; { -/* error("optstr: '%s'\n", optstr);*/ +#ifdef GETFLG_DEBUG + error("optstr: '%s'\n", optstr); +#endif if (optstr[1] != '\0') return (-1); @@ -121,16 +125,17 @@ } EXPORT int -find_main(ac, av, std, quit) +find_main(ac, av, ev, std, quit) int ac; char **av; + char **ev; FILE *std[3]; squit_t *quit; { int cac = ac; - char * *cav = av; - char * *firstpath; - char * *firstprim; + char **cav = av; + char **firstpath; + char **firstprim; BOOL help = FALSE; BOOL prversion = FALSE; finda_t fa; @@ -144,8 +149,7 @@ #ifdef USE_NLS setlocale(LC_ALL, ""); - bindtextdomain("SCHILY_FIND", "/opt/schily/lib/locale"); - textdomain("SCHILY_FIND"); + bindtextdomain(TEXT_DOMAIN, "/opt/schily/lib/locale"); #endif find_argsinit(&fa); for (i = 0; i < 3; i++) { @@ -171,7 +175,7 @@ } if (prversion) { fprintf(std[1], - "sfind release %s (%s-%s-%s) Copyright (C) 2004-2007 Jörg Schilling\n", + "sfind release %s (%s-%s-%s) Copyright (C) 2004-2010 Jörg Schilling\n", strvers, HOST_CPU, HOST_VENDOR, HOST_OS); goto out; @@ -192,7 +196,7 @@ } if (fa.primtype != FIND_ENDARGS) { ferrmsgno(std[2], EX_BAD, - gettext("Incomplete expression.\n")); + _("Incomplete expression.\n")); find_free(Tree, &fa); ret = EX_BAD; goto out; @@ -200,7 +204,7 @@ if (find_pname(Tree, "-chown") || find_pname(Tree, "-chgrp") || find_pname(Tree, "-chmod")) { ferrmsgno(std[2], EX_BAD, - gettext("Unsupported primary -chown/-chgrp/-chmod.\n")); + _("Unsupported primary -chown/-chgrp/-chmod.\n")); find_free(Tree, &fa); ret = EX_BAD; goto out; @@ -220,6 +224,8 @@ walkinitstate(&walkstate); for (i = 0; i < 3; i++) walkstate.std[i] = std[i]; + if (ev) + walkstate.env = ev; if (quit) { walkstate.quitfun = quit->quitfun; walkstate.qfarg = quit->qfarg; @@ -267,7 +273,7 @@ for (i = 0; i < 3; i++) { fflush(std[i]); if (ferror(std[i])) - clearerr(std[i]); + clearerr(std[i]); file_raise(std[i], oraise[i]); } return (ret); diff -Nru cdrtools-2.01.01a33/libfind/find_misc.c cdrtools-3.02a09/libfind/find_misc.c --- cdrtools-2.01.01a33/libfind/find_misc.c 2007-04-04 12:49:46.000000000 +0000 +++ cdrtools-3.02a09/libfind/find_misc.c 2015-09-12 10:54:43.000000000 +0000 @@ -1,10 +1,11 @@ -/* @(#)find_misc.c 1.11 07/04/04 Copyright 2004-2007 J. Schilling */ +/* @(#)find_misc.c 1.16 15/09/12 Copyright 2004-2009 J. Schilling */ +#include #ifndef lint -static char sccsid[] = - "@(#)find_misc.c 1.11 07/04/04 Copyright 2004-2007 J. Schilling"; +static UConst char sccsid[] = + "@(#)find_misc.c 1.16 15/09/12 Copyright 2004-2009 J. Schilling"; #endif /* - * Copyright (c) 2004-2007 J. Schilling + * Copyright (c) 2004-2009 J. Schilling */ /* * The contents of this file are subject to the terms of the @@ -13,13 +14,14 @@ * with the License. * * See the file CDDL.Schily.txt in this distribution for details. + * A copy of the CDDL is also available via the Internet at + * http://www.opensource.org/licenses/cddl1.txt * * When distributing Covered Code, include this CDDL HEADER in each * file and include the License file CDDL.Schily.txt from this distribution. */ -#include -#include +#include #include #include #include @@ -85,7 +87,7 @@ if (geterrno() == ENOSYS) return (FALSE); #endif - ferrmsg(f, gettext("Cannot get ACL count for '%s'.\n"), name); + ferrmsg(f, _("Cannot get ACL count for '%s'.\n"), name); return (FALSE); } return (aclcount > MIN_ACL_ENTRIES); @@ -104,6 +106,7 @@ acl_t acl; if ((acl = acl_get_file(sname, ACL_TYPE_ACCESS)) != NULL) { +#ifdef HAVEACL_GET_ENTRY int id = ACL_FIRST_ENTRY; int num; acl_entry_t dummy; @@ -113,6 +116,12 @@ acl_free(acl); if (num > 3) return (TRUE); +#else +#ifdef NACLBASE + if (acl->acl_cnt > NACLBASE) + return (TRUE); +#endif +#endif } /* * Only directories have DEFAULT ACLs @@ -120,6 +129,7 @@ if (!S_ISDIR(sp->st_mode)) return (FALSE); if ((acl = acl_get_file(sname, ACL_TYPE_DEFAULT)) != NULL) { +#ifdef HAVEACL_GET_ENTRY int id = ACL_FIRST_ENTRY; int num; acl_entry_t dummy; @@ -129,6 +139,12 @@ acl_free(acl); if (num > 0) return (TRUE); +#else +#ifdef NACLBASE + if (acl->acl_cnt > NACLBASE) + return (TRUE); +#endif +#endif } #endif /* HAVE_POSIX_ACL */ diff -Nru cdrtools-2.01.01a33/libfind/find_misc.h cdrtools-3.02a09/libfind/find_misc.h --- cdrtools-2.01.01a33/libfind/find_misc.h 2007-04-04 12:49:46.000000000 +0000 +++ cdrtools-3.02a09/libfind/find_misc.h 2009-07-10 20:02:42.000000000 +0000 @@ -1,6 +1,6 @@ -/* @(#)find_misc.h 1.6 07/04/04 Copyright 2004-2007 J. Schilling */ +/* @(#)find_misc.h 1.7 09/07/10 Copyright 2004-2009 J. Schilling */ /* - * Copyright (c) 2004-2007 J. Schilling + * Copyright (c) 2004-2009 J. Schilling */ /* * The contents of this file are subject to the terms of the @@ -14,8 +14,8 @@ * file and include the License file CDDL.Schily.txt from this distribution. */ -#ifndef _MISC_H -#define _MISC_H +#ifndef _FIND_MISC_H +#define _FIND_MISC_H #ifndef _SCHILY_MCONFIG_H #include @@ -23,10 +23,8 @@ #ifndef _SCHILY_UNIXSTD_H #include #endif - -#ifndef _INCL_STDIO_H -#include -#define _INCL_STDIO_H +#ifndef _SCHILY_STDIO_H +#include #endif #if defined(UNIXWARE) && defined(HAVE_ACL) @@ -53,4 +51,4 @@ extern BOOL has_acl __PR((FILE *f, char *name, char *sname, struct stat *sp)); extern BOOL has_xattr __PR((FILE *f, char *sname)); -#endif /* _MISC_H */ +#endif /* _FIND_MISC_H */ diff -Nru cdrtools-2.01.01a33/libfind/find_tok.h cdrtools-3.02a09/libfind/find_tok.h --- cdrtools-2.01.01a33/libfind/find_tok.h 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/libfind/find_tok.h 2010-04-18 22:14:23.000000000 +0000 @@ -0,0 +1,202 @@ +/* @(#)find_tok.h 1.6 10/04/19 Copyright 2004-2010 J. Schilling */ +/* + * Copyright (c) 2004-2010 J. Schilling + */ +/* + * The contents of this file are subject to the terms of the + * Common Development and Distribution License, Version 1.0 only + * (the "License"). You may not use this file except in compliance + * with the License. + * + * See the file CDDL.Schily.txt in this distribution for details. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file CDDL.Schily.txt from this distribution. + */ + +#ifndef _FIND_TOK_H +#define _FIND_TOK_H + +#define OPEN 0 /* ( */ +#define CLOSE 1 /* ) */ +#define LNOT 2 /* ! */ +#define AND 3 /* a */ +#define LOR 4 /* o */ +#define ATIME 5 /* -atime */ +#define CTIME 6 /* -ctime */ +#define DEPTH 7 /* -depth */ +#define EXEC 8 /* -exec */ +#define FOLLOW 9 /* -follow POSIX Extension */ +#define FSTYPE 10 /* -fstype POSIX Extension */ +#define GROUP 11 /* -group */ +#define INUM 12 /* -inum POSIX Extension */ +#define LINKS 13 /* -links */ +#define LOCL 14 /* -local POSIX Extension */ +#define LS 15 /* -ls POSIX Extension */ +#define MODE 16 /* -mode POSIX Extension */ +#define MOUNT 17 /* -mount POSIX Extension */ +#define MTIME 18 /* -mtime */ +#define NAME 19 /* -name */ +#define NEWER 20 /* -newer */ +#define NOGRP 21 /* -nogroup */ +#define NOUSER 22 /* -nouser */ +#define OK_EXEC 23 /* -ok */ +#define PERM 24 /* -perm */ +#define PRINT 25 /* -print */ +#define PRINTNNL 26 /* -printnnl POSIX Extension */ +#define PRUNE 27 /* -prune */ +#define SIZE 28 /* -size */ +#define TIME 29 /* -time POSIX Extension */ +#define TYPE 30 /* -type */ +#define USER 31 /* -user */ +#define XDEV 32 /* -xdev */ +#define PATH 33 /* -path POSIX Extension */ +#define LNAME 34 /* -lname POSIX Extension */ +#define PAT 35 /* -pat POSIX Extension */ +#define PPAT 36 /* -ppat POSIX Extension */ +#define LPAT 37 /* -lpat POSIX Extension */ +#define PACL 38 /* -ack POSIX Extension */ +#define XATTR 39 /* -xattr POSIX Extension */ +#define LINKEDTO 40 /* -linkedto POSIX Extension */ +#define NEWERAA 41 /* -neweraa POSIX Extension */ +#define NEWERAC 42 /* -newerac POSIX Extension */ +#define NEWERAM 43 /* -neweram POSIX Extension */ +#define NEWERCA 44 /* -newerca POSIX Extension */ +#define NEWERCC 45 /* -newercc POSIX Extension */ +#define NEWERCM 46 /* -newercm POSIX Extension */ +#define NEWERMA 47 /* -newerma POSIX Extension */ +#define NEWERMC 48 /* -newermc POSIX Extension */ +#define NEWERMM 49 /* -newermm POSIX Extension */ +#define SPARSE 50 /* -sparse POSIX Extension */ +#define LTRUE 51 /* -true POSIX Extension */ +#define LFALSE 52 /* -false POSIX Extension */ +#define MAXDEPTH 53 /* -maxdepth POSIX Extension */ +#define MINDEPTH 54 /* -mindepth POSIX Extension */ +#define HELP 55 /* -help POSIX Extension */ +#define CHOWN 56 /* -chown POSIX Extension */ +#define CHGRP 57 /* -chgrp POSIX Extension */ +#define CHMOD 58 /* -chmod POSIX Extension */ +#define DOSTAT 59 /* -dostat POSIX Extension */ +#define INAME 60 /* -iname POSIX Extension */ +#define ILNAME 61 /* -ilname POSIX Extension */ +#define IPATH 62 /* -ipath POSIX Extension */ +#define IPAT 63 /* -ipat POSIX Extension */ +#define IPPAT 64 /* -ippat POSIX Extension */ +#define ILPAT 65 /* -ilpat POSIX Extension */ +#define AMIN 66 /* -amin POSIX Extension */ +#define CMIN 67 /* -cmin POSIX Extension */ +#define MMIN 68 /* -mmin POSIX Extension */ +#define PRINT0 69 /* -print0 POSIX Extension */ +#define FPRINT 70 /* -fprint POSIX Extension */ +#define FPRINTNNL 71 /* -fprintnnl POSIX Extension */ +#define FPRINT0 72 /* -fprint0 POSIX Extension */ +#define FLS 73 /* -fls POSIX Extension */ +#define EMPTY 74 /* -empty POSIX Extension */ +#define READABLE 75 /* -readable POSIX Extension */ +#define WRITABLE 76 /* -writable POSIX Extension */ +#define EXECUTABLE 77 /* -executable POSIX Extension */ +#define EXECDIR 78 /* -execdir POSIX Extension */ +#define OK_EXECDIR 79 /* -okdir POSIX Extension */ +#define ENDPRIM 90 /* End of primary list */ +#define EXECPLUS 81 /* -exec */ +#define EXECDIRPLUS 82 /* -execdir */ +#define ENDTLIST 83 /* End of token list */ + +#define tokennames _find_tokennames + +#ifdef TOKEN_NAMES +LOCAL char *tokennames[] = { + "(", /* 0 OPEN */ + ")", /* 1 CLOSE */ + "!", /* 2 LNOT */ + "a", /* 3 AND */ + "o", /* 4 LOR */ + "atime", /* 5 ATIME */ + "ctime", /* 6 CTIME */ + "depth", /* 7 DEPTH */ + "exec", /* 8 EXEC */ + "follow", /* 9 FOLLOW POSIX Extension */ + "fstype", /* 10 FSTYPE POSIX Extension */ + "group", /* 11 GROUP */ + "inum", /* 12 INUM POSIX Extension */ + "links", /* 13 LINKS */ + "local", /* 14 LOCL POSIX Extension */ + "ls", /* 15 LS POSIX Extension */ + "mode", /* 16 MODE POSIX Extension */ + "mount", /* 17 MOUNT POSIX Extension */ + "mtime", /* 18 MTIME */ + "name", /* 19 NAME */ + "newer", /* 20 NEWER */ + "nogroup", /* 21 NOGRP */ + "nouser", /* 22 NOUSER */ + "ok", /* 23 OK_EXEC */ + "perm", /* 24 PERM */ + "print", /* 25 PRINT */ + "printnnl", /* 26 PRINTNNL POSIX Extension */ + "prune", /* 27 PRUNE */ + "size", /* 28 SIZE */ + "time", /* 29 TIME POSIX Extension */ + "type", /* 30 TYPE */ + "user", /* 31 USER */ + "xdev", /* 32 XDEV */ + "path", /* 33 PATH POSIX Extension */ + "lname", /* 34 LNAME POSIX Extension */ + "pat", /* 35 PAT POSIX Extension */ + "ppat", /* 36 PPAT POSIX Extension */ + "lpat", /* 37 LPAT POSIX Extension */ + "acl", /* 38 PACL POSIX Extension */ + "xattr", /* 39 XATTR POSIX Extension */ + "linkedto", /* 40 LINKEDTO POSIX Extension */ + "neweraa", /* 41 NEWERAA POSIX Extension */ + "newerac", /* 42 NEWERAC POSIX Extension */ + "neweram", /* 43 NEWERAM POSIX Extension */ + "newerca", /* 44 NEWERCA POSIX Extension */ + "newercc", /* 45 NEWERCC POSIX Extension */ + "newercm", /* 46 NEWERCM POSIX Extension */ + "newerma", /* 47 NEWERMA POSIX Extension */ + "newermc", /* 48 NEWERMC POSIX Extension */ + "newermm", /* 49 NEWERMM POSIX Extension */ + "sparse", /* 50 SPARSE POSIX Extension */ + "true", /* 51 LTRUE POSIX Extension */ + "false", /* 52 LFALSE POSIX Extension */ + "maxdepth", /* 53 MAXDEPTH POSIX Extension */ + "mindepth", /* 54 MINDEPTH POSIX Extension */ + "help", /* 55 HELP POSIX Extension */ + "chown", /* 56 CHOWN POSIX Extension */ + "chgrp", /* 57 CHGRP POSIX Extension */ + "chmod", /* 58 CHMOD POSIX Extension */ + "dostat", /* 59 DOSTAT POSIX Extension */ + "iname", /* 60 INAME POSIX Extension */ + "ilname", /* 61 ILNAME POSIX Extension */ + "ipath", /* 62 IPATH POSIX Extension */ + "ipat", /* 63 IPAT POSIX Extension */ + "ippat", /* 64 IPPAT POSIX Extension */ + "ilpat", /* 65 ILPAT POSIX Extension */ + "amin", /* 66 AMIN POSIX Extension */ + "cmin", /* 67 CMIN POSIX Extension */ + "mmin", /* 68 MMIN POSIX Extension */ + "print0", /* 69 PRINT0 POSIX Extension */ + "fprint", /* 70 FPRINT POSIX Extension */ + "fprintnnl", /* 71 FPRINTNNL POSIX Extension */ + "fprint0", /* 72 FPRINT0 POSIX Extension */ + "fls", /* 73 FLS POSIX Extension */ + "empty", /* 74 EMPTY POSIX Extension */ + "readable", /* 75 READABLE POSIX Extension */ + "writable", /* 76 WRITABLE POSIX Extension */ + "executable", /* 77 EXECUTABLE POSIX Extension */ + "execdir", /* 78 EXECDIR POSIX Extension */ + "okdir", /* 79 OK_EXECDIR POSIX Extension */ + 0, /* 80 End of primary list */ + "exec", /* 81 Map EXECPLUS -> "exec" */ + "execdir", /* 82 Map EXECDIRPLUS -> "execdir" */ + 0 /* 83 End of list */ +}; +#define NTOK ((sizeof (tokennames) / sizeof (tokennames[0])) - 1) + +#else /* TOKEN_NAMES */ + +#define NTOK ENDTLIST + +#endif /* TOKEN_NAMES */ + +#endif /* _FIND_TOK_H */ diff -Nru cdrtools-2.01.01a33/libfind/idcache.c cdrtools-3.02a09/libfind/idcache.c --- cdrtools-2.01.01a33/libfind/idcache.c 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/libfind/idcache.c 2015-05-01 11:14:38.000000000 +0000 @@ -0,0 +1,296 @@ +/* @(#)idcache.c 1.30 15/05/01 Copyright 1993, 1995-2015 J. Schilling */ +#include +#ifndef lint +static UConst char sccsid[] = + "@(#)idcache.c 1.30 15/05/01 Copyright 1993, 1995-2015 J. Schilling"; +#endif +/* + * UID/GID caching functions + * + * Copyright (c) 1993, 1995-2015 J. Schilling + */ +/* + * The contents of this file are subject to the terms of the + * Common Development and Distribution License, Version 1.0 only + * (the "License"). You may not use this file except in compliance + * with the License. + * + * See the file CDDL.Schily.txt in this distribution for details. + * A copy of the CDDL is also available via the Internet at + * http://www.opensource.org/licenses/cddl1.txt + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file CDDL.Schily.txt from this distribution. + */ + +#include +#include +#include +#include +#include +#include +#include + +#define TUNMLEN 32 /* Max. UID name len (POSIX) */ +#define TGNMLEN 32 /* Max. GID name len (POSIX) */ + +#define C_SIZE 16 /* Cache size (cache is static) */ + +typedef struct u_id { + uid_t uid; + char name[TUNMLEN+1]; + char valid; +} uidc_t; + +typedef struct g_id { + gid_t gid; + char name[TGNMLEN+1]; + char valid; +} gidc_t; + +LOCAL uidc_t uidcache[C_SIZE]; +LOCAL int lastuidx; /* Last index for new entry */ + +LOCAL gidc_t gidcache[C_SIZE]; +LOCAL int lastgidx; /* Last index for new entry */ + +LOCAL uid_t _uid_nobody; /* Uid for user "nobody" */ +LOCAL gid_t _gid_nobody; /* Gid for user "nobody" */ +LOCAL BOOL name_init = FALSE; + +EXPORT BOOL ic_nameuid __PR((char *name, int namelen, uid_t uid)); +EXPORT BOOL ic_uidname __PR((char *name, int namelen, uid_t *uidp)); +EXPORT BOOL ic_namegid __PR((char *name, int namelen, gid_t gid)); +EXPORT BOOL ic_gidname __PR((char *name, int namelen, gid_t *gidp)); +LOCAL void nameinit __PR((void)); +EXPORT uid_t ic_uid_nobody __PR((void)); +EXPORT gid_t ic_gid_nobody __PR((void)); + +/* + * Get name from uid + */ +#ifdef PROTOTYPES +EXPORT BOOL +ic_nameuid(char *name, int namelen, uid_t uid) +#else +EXPORT BOOL +ic_nameuid(name, namelen, uid) + char *name; + int namelen; + uid_t uid; +#endif +{ + struct passwd *pw; + register int i; + register uidc_t *idp; + + for (i = 0, idp = uidcache; i < C_SIZE; i++, idp++) { + if (idp->valid == 0) /* Entry not yet filled */ + break; + if (idp->uid == uid) + goto out; + } + idp = &uidcache[lastuidx++]; /* Round robin fill next ent */ + if (lastuidx >= C_SIZE) + lastuidx = 0; + + idp->uid = uid; + idp->name[0] = '\0'; + idp->valid = 1; + if ((pw = getpwuid(uid)) != NULL) + strlcpy(idp->name, pw->pw_name, sizeof (idp->name)); + +out: + strlcpy(name, idp->name, namelen); + return (name[0] != '\0'); +} + +/* + * Get uid from name + */ +EXPORT BOOL +ic_uidname(name, namelen, uidp) + char *name; + int namelen; + uid_t *uidp; +{ + struct passwd *pw; + register int len = namelen > TUNMLEN?TUNMLEN:namelen; + register int i; + register uidc_t *idp; + + if (name[0] == '\0') { + *uidp = ic_uid_nobody(); /* Return UID_NOBODY */ + return (FALSE); + } + + for (i = 0, idp = uidcache; i < C_SIZE; i++, idp++) { + if (idp->valid == 0) /* Entry not yet filled */ + break; + if (name[0] == idp->name[0] && + strncmp(name, idp->name, len) == 0) { + *uidp = idp->uid; + if (idp->valid == 2) { /* Name not found */ + *uidp = ic_uid_nobody(); /* Return UID_NOBODY */ + return (FALSE); + } + return (TRUE); + } + } + idp = &uidcache[lastuidx++]; /* Round robin fill next ent */ + if (lastuidx >= C_SIZE) + lastuidx = 0; + + idp->uid = 0; + idp->name[0] = '\0'; + strlcpy(idp->name, name, len+1); /* uidc_t.name is TUNMLEN+1 */ + idp->valid = 1; + if ((pw = getpwnam(idp->name)) != NULL) { + idp->uid = pw->pw_uid; + *uidp = idp->uid; + return (TRUE); + } else { + idp->valid = 2; /* Mark name as not found */ + *uidp = ic_uid_nobody(); /* Return UID_NOBODY */ + return (FALSE); + } +} + +/* + * Get name from gid + */ +#ifdef PROTOTYPES +EXPORT BOOL +ic_namegid(char *name, int namelen, gid_t gid) +#else +EXPORT BOOL +ic_namegid(name, namelen, gid) + char *name; + int namelen; + gid_t gid; +#endif +{ + struct group *gr; + register int i; + register gidc_t *idp; + + for (i = 0, idp = gidcache; i < C_SIZE; i++, idp++) { + if (idp->valid == 0) /* Entry not yet filled */ + break; + if (idp->gid == gid) + goto out; + } + idp = &gidcache[lastgidx++]; /* Round robin fill next ent */ + if (lastgidx >= C_SIZE) + lastgidx = 0; + + idp->gid = gid; + idp->name[0] = '\0'; + idp->valid = 1; + if ((gr = getgrgid(gid)) != NULL) + strlcpy(idp->name, gr->gr_name, sizeof (idp->name)); + +out: + strlcpy(name, idp->name, namelen); + return (name[0] != '\0'); +} + +/* + * Get gid from name + */ +EXPORT BOOL +ic_gidname(name, namelen, gidp) + char *name; + int namelen; + gid_t *gidp; +{ + struct group *gr; + register int len = namelen > TGNMLEN?TGNMLEN:namelen; + register int i; + register gidc_t *idp; + + if (name[0] == '\0') { + *gidp = ic_gid_nobody(); /* Return GID_NOBODY */ + return (FALSE); + } + + for (i = 0, idp = gidcache; i < C_SIZE; i++, idp++) { + if (idp->valid == 0) /* Entry not yet filled */ + break; + if (name[0] == idp->name[0] && + strncmp(name, idp->name, len) == 0) { + *gidp = idp->gid; + if (idp->valid == 2) { /* Name not found */ + *gidp = ic_gid_nobody(); /* Return GID_NOBODY */ + return (FALSE); + } + return (TRUE); + } + } + idp = &gidcache[lastgidx++]; /* Round robin fill next ent */ + if (lastgidx >= C_SIZE) + lastgidx = 0; + + idp->gid = 0; + idp->name[0] = '\0'; + strlcpy(idp->name, name, len+1); /* gidc_t.name is TGNMLEN+1 */ + idp->valid = 1; + if ((gr = getgrnam(idp->name)) != NULL) { + idp->gid = gr->gr_gid; + *gidp = idp->gid; + return (TRUE); + } else { + idp->valid = 2; /* Mark name as not found */ + *gidp = ic_gid_nobody(); /* Return GID_NOBODY */ + return (FALSE); + } +} + +#include + +#ifndef UID_NOBODY +#define UID_NOBODY 65534 /* The old SunOS-4.x and *BSD value */ +#endif +#ifndef GID_NOBODY +#define GID_NOBODY 65534 /* The old SunOS-4.x and *BSD value */ +#endif + +LOCAL void +nameinit() +{ + char *name; + int namelen; + uid_t uid; + gid_t gid; + + /* + * Make sure that uidname()/gidname() do not call nameinit(). + */ + name_init = TRUE; + + name = "nobody"; + namelen = strlen(name); + if (!ic_uidname(name, namelen, &uid)) + uid = UID_NOBODY; + _uid_nobody = uid; + + if (!ic_gidname(name, namelen, &gid)) + gid = GID_NOBODY; + _gid_nobody = gid; +} + +EXPORT uid_t +ic_uid_nobody() +{ + if (!name_init) + nameinit(); + return (_uid_nobody); +} + +EXPORT gid_t +ic_gid_nobody() +{ + if (!name_init) + nameinit(); + return (_gid_nobody); +} diff -Nru "/tmp/tmp8CR4sm/BacCz1ZzAG/cdrtools-2.01.01a33/libfind/if\033pdi" "/tmp/tmp8CR4sm/QJ4ahLjC3j/cdrtools-3.02a09/libfind/if\033pdi" --- "/tmp/tmp8CR4sm/BacCz1ZzAG/cdrtools-2.01.01a33/libfind/if\033pdi" 1970-01-01 00:00:00.000000000 +0000 +++ "/tmp/tmp8CR4sm/QJ4ahLjC3j/cdrtools-3.02a09/libfind/if\033pdi" 2015-09-12 10:54:43.000000000 +0000 @@ -0,0 +1,2566 @@ +/*#define PLUS_DEBUG*/ +/* @(#)find.c 1.101 15/09/12 Copyright 2004-2015 J. Schilling */ +#include +#ifndef lint +static UConst char sccsid[] = + "@(#)find.c 1.101 15/09/12 Copyright 2004-2015 J. Schilling"; +#endif +/* + * Another find implementation... + * + * Copyright (c) 2004-2015 J. Schilling + */ +/* + * The contents of this file are subject to the terms of the + * Common Development and Distribution License, Version 1.0 only + * (the "License"). You may not use this file except in compliance + * with the License. + * + * See the file CDDL.Schily.txt in this distribution for details. + * A copy of the CDDL is also available via the Internet at + * http://www.opensource.org/licenses/cddl1.txt + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file CDDL.Schily.txt from this distribution. + */ + +#ifdef __FIND__ +#define FIND_MAIN +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include /* incl. limits.h (_POSIX_ARG_MAX/ARG_MAX) */ +#include /* #defines NCARGS on old systems */ +#include +#include +#include +#include +#include +#include +#include +#include +#define VMS_VFORK_OK +#include + +#include + +#if defined(_ARG_MAX32) && defined(_ARG_MAX64) +#define MULTI_ARG_MAX /* SunOS only ? */ +#endif + +#ifdef __FIND__ +char strvers[] = "1.4"; /* The pure version string */ +#endif + +typedef struct { + char *left; + char *right; + char *this; + int op; + union { + int i; + long l; + dev_t dev; + ino_t ino; + mode_t mode; + nlink_t nlink; + uid_t uid; + gid_t gid; + size_t size; + time_t time; + FILE *fp; + } val, val2; +} findn_t; + +#include +#define FIND_NODE +#include +#include "find_list.h" +#include "find_misc.h" +#define TOKEN_NAMES +#include "find_tok.h" + +/* + * The struct plusargs and the adjacent space that holds the + * arg vector and the string table. The struct plusargs member "av" + * is also part of the ARG_MAX sized space that follows. + * + * --------------------------------- + * | Other struct plusargs fields | Don't count against ARG_MAX + * --------------------------------- + * --------------------------------- + * | New Arg vector[0] | Space for ARG_MAX starts here + * --------------------------------- + * | . | + * | . | Arg space grows upwards + * | V | + * --------------------------------- + * | Arg vector end | "nextargp" points here + * --------------------------------- + * --------------------------------- + * | Space for first arg string | + * --------------------------------- "laststr" points here + * | ^ | + * | . | String space "grows" downwards + * | . | + * --------------------------------- + * | Space for first arg string | Space for ARG_MAX ends here + * --------------------------------- "endp" points here + * + * The Arg vector in struct plusargs uses the native pointer size + * for libfind. ARG_MAX however is based on the pointer size in the + * called program. + * + * If a 32 bit libfind calls a 64 bit program, the arg vector and the + * environment array in the called program needs more space than in the + * calling libfind code. + * + * If a 64 bit libfind calls a 32 bit program, the arg vector and the + * environment array in the called program needs less space than in the + * calling libfind code. + */ +struct plusargs { + struct plusargs *next; /* Next in list for flushing */ + char *endp; /* Points to end of data block */ + char **nextargp; /* Points to next av[] entry */ + char *laststr; /* points to last used string */ + int nenv; /* Number of entries in env */ + int ac; /* The argc for our command */ + char *av[1]; /* The argv for our command */ +}; + +#ifdef PLUS_DEBUG /* We are no longer reentrant */ +LOCAL struct plusargs *plusp; /* Avoid PLUS_DEBUG if possible */ +#endif + +#define MINSECS (60) +#define HOURSECS (60 * MINSECS) +#define DAYSECS (24 * HOURSECS) +#define YEARSECS (365 * DAYSECS) + +extern time_t find_sixmonth; /* 6 months before limit (ls) */ +extern time_t find_now; /* now limit (ls) */ + +LOCAL findn_t Printnode = { 0, 0, 0, PRINT }; + +EXPORT void find_argsinit __PR((finda_t *fap)); +EXPORT void find_timeinit __PR((time_t now)); +EXPORT findn_t *find_printnode __PR((void)); +EXPORT findn_t *find_addprint __PR((findn_t *np, finda_t *fap)); +LOCAL findn_t *allocnode __PR((finda_t *fap)); +EXPORT void find_free __PR((findn_t *t, finda_t *fap)); +LOCAL void find_freenode __PR((findn_t *t)); +LOCAL void nexttoken __PR((finda_t *fap)); +LOCAL BOOL _nexttoken __PR((finda_t *fap)); +LOCAL void errjmp __PR((finda_t *fap, int err)); +EXPORT int find_token __PR((char *word)); +EXPORT char *find_tname __PR((int op)); +LOCAL char *nextarg __PR((finda_t *fap, findn_t *t)); +EXPORT findn_t *find_parse __PR((finda_t *fap)); +LOCAL findn_t *parse __PR((finda_t *fap)); +LOCAL findn_t *parseand __PR((finda_t *fap)); +LOCAL findn_t *parseprim __PR((finda_t *fap)); +EXPORT void find_firstprim __PR((int *pac, char *const **pav)); +EXPORT BOOL find_primary __PR((findn_t *t, int op)); +EXPORT BOOL find_pname __PR((findn_t *t, char *word)); +EXPORT BOOL find_hasprint __PR((findn_t *t)); +EXPORT BOOL find_hasexec __PR((findn_t *t)); +#ifdef FIND_MAIN +LOCAL int walkfunc __PR((char *nm, struct stat *fs, int type, struct WALK *state)); +#endif +#ifdef __FIND__ +LOCAL inline BOOL find_expr __PR((char *f, char *ff, struct stat *fs, struct WALK *state, findn_t *t)); +#else +EXPORT BOOL find_expr __PR((char *f, char *ff, struct stat *fs, struct WALK *state, findn_t *t)); +#endif +#ifdef HAVE_FORK +LOCAL BOOL doexec __PR((char *f, findn_t *t, int ac, char **av, struct WALK *state)); +#endif +LOCAL int countenv __PR((void)); +LOCAL int argsize __PR((int xtype)); +LOCAL int extype __PR((char *name)); +#ifdef MULTI_ARG_MAX +LOCAL int xargsize __PR((int xtype, int maxarg)); +#endif +LOCAL BOOL pluscreate __PR((FILE *f, int ac, char **av, finda_t *fap)); +#ifdef HAVE_FORK +LOCAL BOOL plusexec __PR((char *f, findn_t *t, struct WALK *state)); +#endif +EXPORT int find_plusflush __PR((void *p, struct WALK *state)); +EXPORT void find_usage __PR((FILE *f)); +#ifdef FIND_MAIN +LOCAL int getflg __PR((char *optstr, long *argp)); +EXPORT int main __PR((int ac, char **av)); +#endif + + +EXPORT void +find_argsinit(fap) + finda_t *fap; +{ + fap->Argc = 0; + fap->Argv = (char **)NULL; + fap->std[0] = stdin; + fap->std[1] = stdout; + fap->std[2] = stderr; + fap->primtype = 0; + fap->found_action = FALSE; + fap->patlen = 0; + fap->walkflags = 0; + fap->maxdepth = -1; + fap->mindepth = -1; + fap->plusp = (struct plusargs *)NULL; + fap->jmp = NULL; + fap->error = 0; +} + +EXPORT void +find_timeinit(now) + time_t now; +{ + find_now = now + 60; + find_sixmonth = now - 6L*30L*24L*60L*60L; +} + +EXPORT findn_t * +find_printnode() +{ + return (&Printnode); +} + +/* + * Add a -print node to the parsed tree if there is no action already. + */ +EXPORT findn_t * +find_addprint(np, fap) + findn_t *np; + finda_t *fap; +{ + findn_t *n; + + n = allocnode(fap); + if (n == NULL) { + find_freenode(np); + return ((void *)NULL); + } + n->op = AND; + n->left = (char *)np; + n->right = (char *)&Printnode; + return (n); +} + +/* + * allocnode is currently called by: + * find_addprint(), parse(), parseand(), parseprim() + */ +LOCAL findn_t * +allocnode(fap) + finda_t *fap; +{ + findn_t *n; + + n = __fjmalloc(fap->std[2], sizeof (findn_t), "allocnode", JM_RETURN); + if (n == NULL) + return (n); + n->left = 0; + n->right = 0; + n->this = 0; + n->op = 0; + n->val.l = 0; + n->val2.l = 0; + return (n); +} + +EXPORT void +find_free(t, fap) + findn_t *t; + finda_t *fap; +{ + if (fap != NULL) { + struct plusargs *p; + struct plusargs *np = NULL; + + for (p = fap->plusp; p != NULL; p = np) { + np = p->next; + free(p); + } + } + + find_freenode(t); +} + +LOCAL void +find_freenode(t) + findn_t *t; +{ + if (t == (findn_t *)NULL || t == &Printnode) + return; + + switch (t->op) { + + case OPEN: + case LNOT: + find_freenode((findn_t *)t->this); + break; + case AND: + case LOR: + find_freenode((findn_t *)t->left); + find_freenode((findn_t *)t->right); + break; + case PAT: + case PPAT: + case LPAT: + if (t->right != NULL) + free(t->right); /* aux array for patcompile() */ + break; + case FLS: + case FPRINT: + case FPRINT0: + case FPRINTNNL: + fclose(t->val.fp); + default: + ; + } + free(t); +} + +LOCAL void +nexttoken(fap) + register finda_t *fap; +{ + if (!_nexttoken(fap)) { + errjmp(fap, EX_BAD); + /* NOTREACHED */ + } +} + +/* + * No errjmp() variant of nexttoken(), returns FALSE on error. + */ +LOCAL BOOL +_nexttoken(fap) + register finda_t *fap; +{ + register char *word; + register char *tail; + + if (fap->Argc <= 0) { + fap->primtype = FIND_ENDARGS; + return (TRUE); + } + word = *fap->Argv; + if ((tail = strchr(word, '=')) != NULL) { +#ifdef XXX + if (*tail == '\0') { + fap->Argv++; fap->Argc--; + } else +#endif + *fap->Argv = ++tail; + } else { + fap->Argv++; fap->Argc--; + } + if ((fap->primtype = find_token(word)) >= 0) + return (TRUE); + + ferrmsgno(fap->std[2], EX_BAD, _("Bad Option: '%s'.\n"), word); + find_usage(fap->std[2]); + fap->primtype = FIND_ERRARG; /* Mark as "parse aborted" */ + return (FALSE); +} + +LOCAL void +errjmp(fap, err) + register finda_t *fap; + int err; +{ + fap->primtype = FIND_ERRARG; /* Mark as "parse aborted" */ + fap->error = err; /* Set error return */ + + siglongjmp(((sigjmps_t *)fap->jmp)->jb, 1); + /* NOTREACHED */ +} + +EXPORT int +find_token(word) + register char *word; +{ + char **tp; + char *tn; + char *equalp; + int type; + + if ((equalp = strchr(word, '=')) != NULL) + *equalp = '\0'; + + if (*word == '-') { + /* + * Do not allow -(, -), -! + */ + if (word[1] == '\0' || !strchr("()!", word[1])) + word++; + } else if (!strchr("()!", word[0]) && (!equalp || equalp[1] == '\0')) { + goto bad; + } + for (type = 0, tp = tokennames; *tp; tp++, type++) { + tn = *tp; + if (*tn != *word) + continue; + if (streql(tn, word)) { + if (equalp) + *equalp = '='; + return (type); + } + } +bad: + if (equalp) + *equalp = '='; + + return (-1); +} + +EXPORT char * +find_tname(op) + int op; +{ + if (op >= 0 && op < NTOK) + return (tokennames[op]); + return ("unknown"); +} + +LOCAL char * +nextarg(fap, t) + finda_t *fap; + findn_t *t; +{ + if (fap->Argc-- <= 0) { + char *prim = NULL; + int pt = t->op; + + if (pt >= 0 && pt < NTOK) + prim = tokennames[pt]; + if (prim) { + ferrmsgno(fap->std[2], EX_BAD, + _("Missing arg for '%s%s'.\n"), + pt > LNOT ? "-":"", prim); + } else { + ferrmsgno(fap->std[2], EX_BAD, + _("Missing arg.\n")); + } + errjmp(fap, EX_BAD); + /* NOTREACHED */ + return ((char *)0); + } else { + return (*fap->Argv++); + } +} + +EXPORT findn_t * +find_parse(fap) + finda_t *fap; +{ + findn_t *ret; + + if (!_nexttoken(fap)) + return ((findn_t *)NULL); /* Immediate parse error */ + if (fap->primtype == FIND_ENDARGS) + return ((findn_t *)NULL); /* Empty command */ + + ret = parse(fap); + if (ret) + return (ret); + + if (fap->primtype == HELP) { + fap->primtype = FIND_ERRARG; + } else if (fap->error == 0) { + fap->primtype = FIND_ERRARG; + fap->error = geterrno(); + if (fap->error == 0) + fap->error = EX_BAD; + } + return (ret); +} + +LOCAL findn_t * +parse(fap) + finda_t *fap; +{ + findn_t *n; + + n = parseand(fap); + if (n == NULL) + return (n); + if (fap->primtype == LOR) { + findn_t *l = allocnode(fap); + + if (l == NULL) + goto err; + l->left = (char *)n; + l->op = fap->primtype; + if (_nexttoken(fap)) + l->right = (char *)parse(fap); + if (l->right == NULL) { + find_freenode(l); + n = NULL; /* Do not free twice */ + goto err; + } + return (l); + } + return (n); +err: + find_freenode(n); + fap->primtype = FIND_ERRARG; /* Mark as "parse aborted" */ + return ((findn_t *)NULL); +} + +LOCAL findn_t * +parseand(fap) + finda_t *fap; +{ + findn_t *n; + + n = parseprim(fap); + if (n == NULL) + return (n); + + if ((fap->primtype == AND) || + (fap->primtype != LOR && fap->primtype != CLOSE && + fap->primtype != FIND_ENDARGS)) { + findn_t *l = allocnode(fap); + BOOL ok = TRUE; + + if (l == NULL) + goto err; + l->left = (char *)n; + l->op = AND; /* If no Operator, default to AND -a */ + if (fap->primtype == AND) /* Fetch Operator for next node */ + ok = _nexttoken(fap); + if (ok) + l->right = (char *)parseand(fap); + if (l->right == NULL) { + find_freenode(l); + n = NULL; /* Do not free twice */ + goto err; + } + return (l); + } + return (n); +err: + find_freenode(n); + fap->primtype = FIND_ERRARG; /* Mark as "parse aborted" */ + return ((findn_t *)NULL); +} + +LOCAL findn_t * +parseprim(fap) + finda_t *fap; +{ + sigjmps_t jmp; + sigjmps_t *ojmp = fap->jmp; + register findn_t *n; + register char *p; + Llong ll; + + n = allocnode(fap); + if (n == (findn_t *)NULL) { + fap->primtype = FIND_ERRARG; /* Mark as "parse aborted" */ + return ((findn_t *)NULL); + } + + fap->jmp = &jmp; + if (sigsetjmp(jmp.jb, 1) != 0) { + /* + * We come here from siglongjmp() + */ + find_freenode(n); + fap->jmp = ojmp; /* Restore old jump target */ + return ((findn_t *)NULL); + } + switch (n->op = fap->primtype) { + + /* + * Use simple to old (historic) shell globbing. + */ + case INAME: + case ILNAME: + case IPATH: +#ifndef FNM_IGNORECASE + ferrmsgno(fap->std[2], + EX_BAD, _("The primary '-%s' is unsupported on this OS.\n"), + tokennames[n->op]); + errjmp(fap, EX_BAD); + /* NOTREACHED */ +#endif + case NAME: + case PATH: + case LNAME: +#ifndef HAVE_FNMATCH +#define HAVE_FNMATCH /* We have fnmatch() in libschily */ +#endif +#if defined(HAVE_FNMATCH) + n->this = nextarg(fap, n); + nexttoken(fap); + fap->jmp = ojmp; /* Restore old jump target */ + return (n); +#endif + /* FALLTHRU */ + /* Implement "fallback" to patmatch() if we have no fnmatch() */ + + /* + * Use patmatch() which is a regular expression matcher that implements + * extensions that are compatible to old (historic) shell globbing. + */ + case IPAT: + case IPPAT: + case ILPAT: + ferrmsgno(fap->std[2], + EX_BAD, _("The primary '-%s' is currently unsupported.\n"), + tokennames[n->op]); + errjmp(fap, EX_BAD); + /* NOTREACHED */ + case PAT: + case PPAT: + case LPAT: { + int plen; + + plen = strlen(n->this = nextarg(fap, n)); + if (plen > fap->patlen) + fap->patlen = plen; + n->right = __fjmalloc(fap->std[2], sizeof (int)*plen, + "space for pattern", fap->jmp); + + if ((n->val.i = patcompile((Uchar *)n->this, plen, (int *)n->right)) == 0) { + ferrmsgno(fap->std[2], + EX_BAD, _("Bad pattern in '-%s %s'.\n"), + tokennames[n->op], n->this); + errjmp(fap, EX_BAD); + /* NOTREACHED */ + } + nexttoken(fap); + fap->jmp = ojmp; /* Restore old jump target */ + return (n); + } + + case SIZE: { + char *numarg; + + fap->walkflags &= ~WALK_NOSTAT; + + p = n->left = nextarg(fap, n); + numarg = p; + if (p[0] == '-' || p[0] == '+') + numarg = ++p; + p = astoll(p, &ll); + if (p[0] == '\0') { + /* EMPTY */ + ; + } else if (p[0] == 'c' && p[1] == '\0') { + n->this = p; + } else if (getllnum(numarg, &ll) == 1) { + n->this = p; + } else if (*p) { + ferrmsgno(fap->std[2], EX_BAD, + _("Non numeric character '%c' in '-size %s'.\n"), + *p, n->left); + errjmp(fap, EX_BAD); + /* NOTREACHED */ + } + n->val.size = ll; + nexttoken(fap); + fap->jmp = ojmp; /* Restore old jump target */ + return (n); + } + + case EMPTY: + fap->walkflags &= ~WALK_NOSTAT; + nexttoken(fap); + fap->jmp = ojmp; /* Restore old jump target */ + return (n); + + case LINKS: + fap->walkflags &= ~WALK_NOSTAT; + + p = n->left = nextarg(fap, n); + if (p[0] == '-' || p[0] == '+') + p++; + p = astoll(p, &ll); + if (*p) { + ferrmsgno(fap->std[2], EX_BAD, + _("Non numeric character '%c' in '-links %s'.\n"), + *p, n->left); + errjmp(fap, EX_BAD); + /* NOTREACHED */ + } + n->val.nlink = ll; + nexttoken(fap); + fap->jmp = ojmp; /* Restore old jump target */ + return (n); + + case INUM: + fap->walkflags &= ~WALK_NOSTAT; + + p = n->left = nextarg(fap, n); + if (p[0] == '-' || p[0] == '+') + p++; + p = astoll(p, &ll); + if (*p) { + ferrmsgno(fap->std[2], EX_BAD, + _("Non numeric character '%c' in '-inum %s'.\n"), + *p, n->left); + errjmp(fap, EX_BAD); + /* NOTREACHED */ + } + n->val.ino = ll; + nexttoken(fap); + fap->jmp = ojmp; /* Restore old jump target */ + return (n); + + case LINKEDTO: { + struct stat ns; + + fap->walkflags &= ~WALK_NOSTAT; + + if (stat(n->left = nextarg(fap, n), &ns) < 0) { + ferrmsg(fap->std[2], + _("Cannot stat '%s'.\n"), n->left); + errjmp(fap, geterrno()); + /* NOTREACHED */ + } + n->val.ino = ns.st_ino; + n->val2.dev = ns.st_dev; + nexttoken(fap); + fap->jmp = ojmp; /* Restore old jump target */ + return (n); + } + + case AMIN: + case CMIN: + case MMIN: + n->val2.i = 1; + case TIME: + case ATIME: + case CTIME: + case MTIME: { + int len; + + fap->walkflags &= ~WALK_NOSTAT; + + p = n->left = nextarg(fap, n); + if (p[0] == '-' || p[0] == '+') + p++; + if (gettnum(p, &n->val.time) != 1) { + ferrmsgno(fap->std[2], EX_BAD, + _("Bad timespec in '-%s %s'.\n"), + tokennames[n->op], n->left); + errjmp(fap, EX_BAD); + /* NOTREACHED */ + } + if (n->val2.i) + n->val.time *= 60; + + len = strlen(p); + if (len > 0) { + len = (Uchar)p[len-1]; + if (!(len >= '0' && len <= '9')) { + if (n->val2.i) { /* -mmin, No ext. time spec */ + ferrmsgno(fap->std[2], EX_BAD, + _("Unsupported timespec in '-%s %s'.\n"), + tokennames[n->op], n->left); + errjmp(fap, geterrno()); + /* NOTREACHED */ + } + n->val2.i = 1; /* Ext. time spec permitted */ + } + } + nexttoken(fap); + fap->jmp = ojmp; /* Restore old jump target */ + return (n); + } + + case NEWERAA: + case NEWERCA: + case NEWERMA: { + struct stat ns; + + fap->walkflags &= ~WALK_NOSTAT; + + if (stat(n->left = nextarg(fap, n), &ns) < 0) { + ferrmsg(fap->std[2], + _("Cannot stat '%s'.\n"), n->left); + errjmp(fap, geterrno()); + /* NOTREACHED */ + } + n->val.time = ns.st_atime; + nexttoken(fap); + fap->jmp = ojmp; /* Restore old jump target */ + return (n); + } + + case NEWERAC: + case NEWERCC: + case NEWERMC: { + struct stat ns; + + fap->walkflags &= ~WALK_NOSTAT; + + if (stat(n->left = nextarg(fap, n), &ns) < 0) { + ferrmsg(fap->std[2], + _("Cannot stat '%s'.\n"), n->left); + errjmp(fap, geterrno()); + /* NOTREACHED */ + } + n->val.time = ns.st_ctime; + nexttoken(fap); + fap->jmp = ojmp; /* Restore old jump target */ + return (n); + } + + case NEWERAM: + case NEWERCM: + case NEWERMM: + case NEWER: { + struct stat ns; + + fap->walkflags &= ~WALK_NOSTAT; + + if (stat(n->left = nextarg(fap, n), &ns) < 0) { + ferrmsg(fap->std[2], + _("Cannot stat '%s'.\n"), n->left); + errjmp(fap, geterrno()); + /* NOTREACHED */ + } + n->val.time = ns.st_mtime; + nexttoken(fap); + fap->jmp = ojmp; /* Restore old jump target */ + return (n); + } + + case TYPE: + fap->walkflags &= ~WALK_NOSTAT; + + n->this = (char *)nextarg(fap, n); + switch (*(n->this)) { + + /* + * 'b'lock, 'c'har, 'd'ir, 'D'oor, + * 'e'ventcount, 'f'ile, 'l'ink, 'p'ipe, + * 'P'ort event, 's'ocket + */ + case 'b': case 'c': case 'd': case 'D': + case 'e': case 'f': case 'l': case 'p': + case 'P': case 's': + if ((n->this)[1] == '\0') { + nexttoken(fap); + fap->jmp = ojmp; /* Restore old jump target */ + return (n); + } + } + ferrmsgno(fap->std[2], EX_BAD, + _("Bad type '%c' in '-type %s'.\n"), + *n->this, n->this); + errjmp(fap, EX_BAD); + /* NOTREACHED */ + break; + + case FSTYPE: + fap->walkflags &= ~WALK_NOSTAT; + +#ifdef HAVE_ST_FSTYPE + n->this = (char *)nextarg(fap, n); +#else + ferrmsgno(fap->std[2], EX_BAD, + _("-fstype not supported by this OS.\n")); + errjmp(fap, EX_BAD); + /* NOTREACHED */ +#endif + nexttoken(fap); + fap->jmp = ojmp; /* Restore old jump target */ + return (n); + + case LOCL: + fap->walkflags &= ~WALK_NOSTAT; + +#ifndef HAVE_ST_FSTYPE + ferrmsgno(fap->std[2], EX_BAD, + _("-local not supported by this OS.\n")); + errjmp(fap, EX_BAD); + /* NOTREACHED */ +#endif + nexttoken(fap); + fap->jmp = ojmp; /* Restore old jump target */ + return (n); + +#ifdef CHOWN + case CHOWN: +#endif + case USER: { + struct passwd *pw; + char *u; + + fap->walkflags &= ~WALK_NOSTAT; + + u = n->left = nextarg(fap, n); + if (u[0] == '-' || u[0] == '+') + u++; + if ((pw = getpwnam(u)) != NULL) { + n->val.uid = pw->pw_uid; + } else { + if (*astoll(n->left, &ll)) { + ferrmsgno(fap->std[2], EX_BAD, + _("User '%s' not in passwd database.\n"), + n->left); + errjmp(fap, EX_BAD); + /* NOTREACHED */ + } + n->val.uid = ll; + } + nexttoken(fap); + fap->jmp = ojmp; /* Restore old jump target */ + return (n); + } + +#ifdef CHGRP + case CHGRP: +#endif + case GROUP: { + struct group *gr; + char *g; + + fap->walkflags &= ~WALK_NOSTAT; + + g = n->left = nextarg(fap, n); + if (g[0] == '-' || g[0] == '+') + g++; + if ((gr = getgrnam(g)) != NULL) { + n->val.gid = gr->gr_gid; + } else { + if (*astoll(n->left, &ll)) { + ferrmsgno(fap->std[2], EX_BAD, + _("Group '%s' not in group database.\n"), + n->left); + errjmp(fap, EX_BAD); + /* NOTREACHED */ + } + n->val.gid = ll; + } + nexttoken(fap); + fap->jmp = ojmp; /* Restore old jump target */ + return (n); + } + +#ifdef CHMOD + case CHMOD: +#endif + case PERM: + fap->walkflags &= ~WALK_NOSTAT; + + p = n->left = nextarg(fap, n); + if (p[0] == '+') { + if (p[1] == '0' || + p[1] == 'u' || p[1] == 'g' || p[1] == 'o' || p[1] == 'a') + p++; + else + n->left = ""; + } + if (getperm(fap->std[2], p, tokennames[n->op], + &n->val.mode, (mode_t)0, + n->op == PERM ? GP_FPERM|GP_XERR:GP_NOX) < 0) { + errjmp(fap, EX_BAD); + /* NOTREACHED */ + } + nexttoken(fap); + fap->jmp = ojmp; /* Restore old jump target */ + return (n); + + case MODE: + fap->walkflags &= ~WALK_NOSTAT; + + ferrmsgno(fap->std[2], EX_BAD, + _("-mode not yet implemented.\n")); + errjmp(fap, EX_BAD); + /* NOTREACHED */ + nexttoken(fap); + fap->jmp = ojmp; /* Restore old jump target */ + return (n); + + case XDEV: + case MOUNT: + fap->walkflags &= ~WALK_NOSTAT; + fap->walkflags |= WALK_MOUNT; + nexttoken(fap); + fap->jmp = ojmp; /* Restore old jump target */ + return (n); + case DEPTH: + fap->walkflags |= WALK_DEPTH; + nexttoken(fap); + fap->jmp = ojmp; /* Restore old jump target */ + return (n); + case FOLLOW: + fap->walkflags &= ~WALK_PHYS; + nexttoken(fap); + fap->jmp = ojmp; /* Restore old jump target */ + return (n); + + case MAXDEPTH: + case MINDEPTH: + p = n->left = nextarg(fap, n); + p = astoll(p, &ll); + if (*p) { + ferrmsgno(fap->std[2], EX_BAD, + _("Non numeric character '%c' in '-%s %s'.\n"), + *p, tokennames[n->op], n->left); + errjmp(fap, EX_BAD); + /* NOTREACHED */ + } + n->val.l = ll; + if (n->op == MAXDEPTH) + fap->maxdepth = ll; + else + fap->mindepth = ll; + nexttoken(fap); + fap->jmp = ojmp; /* Restore old jump target */ + return (n); + + case NOUSER: + case NOGRP: + case PACL: + case XATTR: + case SPARSE: + case DOSTAT: + fap->walkflags &= ~WALK_NOSTAT; + /* FALLTHRU */ + case PRUNE: + case LTRUE: + case LFALSE: + case READABLE: + case WRITABLE: + case EXECUTABLE: + nexttoken(fap); + fap->jmp = ojmp; /* Restore old jump target */ + return (n); + + case OK_EXEC: + case OK_EXECDIR: + case EXEC: + case EXECDIR: { + int i = 1; + + n->this = (char *)fap->Argv; /* Cheat: Pointer is pointer */ + nextarg(fap, n); /* Eat up cmd name */ + while ((p = nextarg(fap, n)) != NULL) { + if (streql(p, ";")) + break; + else if (streql(p, "+") && streql(fap->Argv[-2], "{}")) { + if (n->op == OK_EXECDIR || n->op == EXECDIR) { + ferrmsgno(fap->std[2], EX_BAD, + _("'-%s' does not yet work with '+'.\n"), + tokennames[n->op]); + errjmp(fap, EX_BAD); + /* NOTREACHED */ + } + n->op = fap->primtype = EXECPLUS; + if (!pluscreate(fap->std[2], --i, (char **)n->this, fap)) { + errjmp(fap, EX_BAD); + /* NOTREACHED */ + } + n->this = (char *)fap->plusp; + break; + } + i++; + } + n->val.i = i; +#ifdef PLUS_DEBUG + if (0) { + char **pp = (char **)n->this; + for (i = 0; i < n->val.i; i++, pp++) + printf("ARG %d '%s'\n", i, *pp); + } +#endif + } + /* FALLTHRU */ + + case LS: + fap->walkflags &= ~WALK_NOSTAT; + goto found_action; + case FLS: + fap->walkflags &= ~WALK_NOSTAT; + case FPRINT: + case FPRINT0: + case FPRINTNNL: + p = nextarg(fap, n); + n->val.fp = fileopen(p, "wcta"); + if (n->val.fp == NULL) { + ferrmsg(fap->std[2], + _("Cannot open '%s' for '-%s'.\n"), + p, tokennames[n->op]); + errjmp(fap, EX_BAD); + /* NOTREACHED */ + } + case PRINT: + case PRINT0: + case PRINTNNL: + found_action: + fap->found_action = TRUE; + nexttoken(fap); + fap->jmp = ojmp; /* Restore old jump target */ + return (n); + + case FIND_ENDARGS: +#ifdef DEBUG + ferrmsgno(fap->std[2], EX_BAD, + _("ENDARGS in parseprim()\n")); +#endif + ferrmsgno(fap->std[2], EX_BAD, + _("Incomplete expression.\n")); + find_freenode(n); + fap->jmp = ojmp; /* Restore old jump target */ + return ((findn_t *)NULL); + + case OPEN: + nexttoken(fap); + n->this = (char *)parse(fap); + if (n->this == NULL) { + find_freenode(n); + fap->jmp = ojmp; /* Restore old jump target */ + return ((findn_t *)NULL); + } + if (fap->primtype != CLOSE) { + ferrmsgno(fap->std[2], EX_BAD, + _("Found '%s', but ')' expected.\n"), + fap->Argv[-1]); + errjmp(fap, EX_BAD); + /* NOTREACHED */ + } else { + nexttoken(fap); + fap->jmp = ojmp; /* Restore old jump target */ + return (n); + } + break; + + case CLOSE: + /* + * The triggering arg is at fap->Argv[-2]. + */ + ferrmsgno(fap->std[2], EX_BAD, _("Missing '('.\n")); + errjmp(fap, EX_BAD); + /* NOTREACHED */ + + case LNOT: + nexttoken(fap); + n->this = (char *)parseprim(fap); + if (n->this == NULL) { + find_freenode(n); + n = (findn_t *)NULL; + } + fap->jmp = ojmp; /* Restore old jump target */ + return (n); + + case AND: + case LOR: + ferrmsgno(fap->std[2], EX_BAD, + _("Invalid expression with '-%s'.\n"), tokennames[n->op]); + errjmp(fap, EX_BAD); + /* NOTREACHED */ + + case HELP: + find_usage(fap->std[2]); + find_freenode(n); + fap->jmp = ojmp; /* Restore old jump target */ + return ((findn_t *)NULL); + + default: + ferrmsgno(fap->std[2], EX_BAD, + _("Internal malfunction, found unknown primary '-%s' (%d).\n"), + find_tname(n->op), n->op); + errjmp(fap, EX_BAD); + /* NOTREACHED */ + } + fap->jmp = ojmp; /* Restore old jump target */ + fap->primtype = FIND_ERRARG; /* Mark as "parse aborted" */ + return (0); +} + +#define S_ALLPERM (S_IRWXU|S_IRWXG|S_IRWXO) +#define S_ALLFLAGS (S_ISUID|S_ISGID|S_ISVTX) +#define S_ALLMODES (S_ALLFLAGS | S_ALLPERM) + +EXPORT void +find_firstprim(pac, pav) + int *pac; + char *const *pav[]; +{ + register int cac = *pac; + register char *const *cav = *pav; + register char c; + + while (cac > 0 && + (c = **cav) != '-' && c != '(' && c != ')' && c != '!') { + cav++; + cac--; + } + *pac = cac; + *pav = cav; +} + +EXPORT BOOL +find_primary(t, op) + findn_t *t; + int op; +{ + BOOL ret = FALSE; + + if (t->op == op) { + return (TRUE); + } + switch (t->op) { + + case OPEN: + ret = find_primary((findn_t *)t->this, op); + break; + case LNOT: + ret = find_primary((findn_t *)t->this, op); + break; + case AND: + ret = find_primary((findn_t *)t->left, op); + if (ret) + return (ret); + ret = find_primary((findn_t *)t->right, op); + break; + case LOR: + ret = find_primary((findn_t *)t->left, op); + if (ret) + return (ret); + ret = find_primary((findn_t *)t->right, op); + break; + + default: + ; + } + return (ret); +} + +EXPORT BOOL +find_pname(t, word) + findn_t *t; + char *word; +{ + if (streql(word, "-exec+")) + return (find_primary(t, EXECPLUS)); + if (streql(word, "-execdir+")) + return (find_primary(t, EXECDIRPLUS)); + return (find_primary(t, find_token(word))); +} + +EXPORT BOOL +find_hasprint(t) + findn_t *t; +{ + if (t == NULL) + return (FALSE); + + if (find_primary(t, PRINT) || find_primary(t, PRINTNNL) || + find_primary(t, PRINT0)) + return (TRUE); + if (find_primary(t, LS)) + return (TRUE); + return (FALSE); +} + +EXPORT BOOL +find_hasexec(t) + findn_t *t; +{ + if (t == NULL) + return (FALSE); + + if (find_primary(t, EXEC) || find_primary(t, EXECPLUS)) + return (TRUE); + if (find_primary(t, EXECDIR) || find_primary(t, EXECDIRPLUS)) + return (TRUE); + if (find_primary(t, OK_EXEC) || find_primary(t, OK_EXECDIR)) + return (TRUE); + return (FALSE); +} + +#ifdef FIND_MAIN +LOCAL int +walkfunc(nm, fs, type, state) + char *nm; + struct stat *fs; + int type; + struct WALK *state; +{ + if (type == WALK_NS) { + ferrmsg(state->std[2], _("Cannot stat '%s'.\n"), nm); + state->err = 1; + return (0); + } else if (type == WALK_SLN && (state->walkflags & WALK_PHYS) == 0) { + ferrmsg(state->std[2], + _("Cannot follow symlink '%s'.\n"), nm); + state->err = 1; + return (0); + } else if (type == WALK_DNR) { + if (state->flags & WALK_WF_NOCHDIR) { + ferrmsg(state->std[2], + _("Cannot chdir to '%s'.\n"), nm); + } else { + ferrmsg(state->std[2], + _("Cannot read '%s'.\n"), nm); + } + state->err = 1; + return (0); + } + + if (state->maxdepth >= 0 && state->level >= state->maxdepth) + state->flags |= WALK_WF_PRUNE; + if (state->mindepth >= 0 && state->level < state->mindepth) + return (0); + + find_expr(nm, nm + state->base, fs, state, state->tree); + return (0); +} +#endif + +#ifdef __FIND__ +LOCAL inline BOOL +#else +EXPORT BOOL +#endif +find_expr(f, ff, fs, state, t) + char *f; /* path name */ + char *ff; /* file name */ + struct stat *fs; + struct WALK *state; + findn_t *t; +{ + time_t xtime; + FILE *fp = state->std[1]; + char *p; + char lname[8192]; + int fnflags = 0; + + switch (t->op) { + + case ILNAME: +#ifdef FNM_IGNORECASE + fnflags = FNM_IGNORECASE; +#endif + case LNAME: { + int lsize; + + if (!S_ISLNK(fs->st_mode)) + return (FALSE); + + if (state->lname != NULL) { + p = state->lname; + goto nmatch; + } + lname[0] = '\0'; + /* + * For file names from the command line, we did not perform + * a chdir() before, so we need to use the full path name. + */ + lsize = readlink(state->level ? ff : f, lname, sizeof (lname)); + if (lsize < 0) { + ferrmsg(state->std[2], + _("Cannot read link '%s'.\n"), ff); + return (FALSE); + } + lname[sizeof (lname)-1] = '\0'; + if (lsize >= 0) + lname[lsize] = '\0'; + p = lname; + goto nmatch; + } + case IPATH: +#ifdef FNM_IGNORECASE + fnflags = FNM_IGNORECASE; +#endif + case PATH: + p = f; + goto nmatch; + case INAME: +#ifdef FNM_IGNORECASE + fnflags = FNM_IGNORECASE; +#endif + case NAME: + p = ff; + nmatch: +#if defined(HAVE_FNMATCH) + return (!fnmatch(t->this, p, fnflags)); +#else + goto pattern; /* Use patmatch() as "fallback" */ +#endif + + case LPAT: { + int lsize; + + if (!S_ISLNK(fs->st_mode)) + return (FALSE); + + if (state->lname != NULL) { + p = state->lname; + goto pattern; + } + lname[0] = '\0'; + /* + * For file names from the command line, we did not perform + * a chdir() before, so we need to use the full path name. + */ + lsize = readlink(state->level ? ff : f, lname, sizeof (lname)); + if (lsize < 0) { + ferrmsg(state->std[2], + _("Cannot read link '%s'.\n"), ff); + return (FALSE); + } + lname[sizeof (lname)-1] = '\0'; + if (lsize >= 0) + lname[lsize] = '\0'; + p = lname; + goto pattern; + } + case PPAT: + p = f; + goto pattern; + case PAT: + p = ff; + pattern: { + Uchar *pr; /* patmatch() return */ + + pr = patmatch((Uchar *)t->this, (int *)t->right, + (Uchar *)p, 0, strlen(p), t->val.i, state->patstate); + return (*p && pr && (*pr == '\0')); + } + + case SIZE: + switch (*(t->left)) { + case '+': + if (t->this) + return (fs->st_size > t->val.size); + return ((fs->st_size+511)/512 > t->val.size); + case '-': + if (t->this) + return (fs->st_size < t->val.size); + return ((fs->st_size+511)/512 < t->val.size); + default: + if (t->this) + return (fs->st_size == t->val.size); + return ((fs->st_size+511)/512 == t->val.size); + } + + case EMPTY: + if (S_ISREG(fs->st_mode) && fs->st_size == 0) + return (TRUE); + /* + * For file names from the command line, we did not perform + * a chdir() before, so we need to use the full path name. + */ + if (S_ISDIR(fs->st_mode)) { + struct dirent *dp; + DIR *d = opendir(state->level ? ff : f); + + if (d == NULL) { + ferrmsg(state->std[2], + _("Cannot open directory '%s'.\n"), + ff); + return (FALSE); + } + while ((dp = readdir(d)) != NULL) { + register char *name = dp->d_name; + /* + * Skip the following names: "", ".", "..". + */ + if (name[name[0] != '.' ? 0 : + name[1] != '.' ? 1 : 2] == '\0') + continue; + closedir(d); + return (FALSE); + } + closedir(d); + return (TRUE); + } + return (FALSE); + + case LINKS: + switch (*(t->left)) { + case '+': + return (fs->st_nlink > t->val.nlink); + case '-': + return (fs->st_nlink < t->val.nlink); + default: + return (fs->st_nlink == t->val.nlink); + } + + case INUM: + switch (*(t->left)) { + case '+': + return (fs->st_ino > t->val.ino); + case '-': + return (fs->st_ino < t->val.ino); + default: + return (fs->st_ino == t->val.ino); + } + + case LINKEDTO: + return ((fs->st_ino == t->val.ino) && + (fs->st_dev == t->val2.dev)); + + case READABLE: + t->val.i = R_OK; + goto check_access; + case WRITABLE: + t->val.i = W_OK; + goto check_access; + case EXECUTABLE: + t->val.i = X_OK; + check_access: + /* + * For file names from the command line, we did not perform + * a chdir() before, so we need to use the full path name. + */ + if (access(state->level ? ff : f, t->val.i) < 0) + return (FALSE); + return (TRUE); + + case AMIN: + case ATIME: + xtime = fs->st_atime; + goto times; + case CMIN: + case CTIME: + xtime = fs->st_ctime; + goto times; + case MMIN: + case MTIME: + case TIME: + xtime = fs->st_mtime; + times: + if (t->val2.i != 0) + goto timex; + + switch (*(t->left)) { + case '+': + return ((find_now-xtime)/DAYSECS > t->val.time); + case '-': + return ((find_now-xtime)/DAYSECS < t->val.time); + default: + return ((find_now-xtime)/DAYSECS == t->val.time); + } + timex: + switch (*(t->left)) { + case '+': + return ((find_now-xtime) > t->val.time); + case '-': + return ((find_now-xtime) < t->val.time); + default: + return ((find_now-xtime) == t->val.time); + } + + case NEWERAA: + case NEWERAC: + case NEWERAM: + return (t->val.time < fs->st_atime); + + case NEWERCA: + case NEWERCC: + case NEWERCM: + return (t->val.time < fs->st_ctime); + + case NEWER: + case NEWERMA: + case NEWERMC: + case NEWERMM: + return (t->val.time < fs->st_mtime); + + case TYPE: + switch (*(t->this)) { + case 'b': + return (S_ISBLK(fs->st_mode)); + case 'c': + return (S_ISCHR(fs->st_mode)); + case 'd': + return (S_ISDIR(fs->st_mode)); + case 'D': + return (S_ISDOOR(fs->st_mode)); + case 'e': + return (S_ISEVC(fs->st_mode)); + case 'f': + return (S_ISREG(fs->st_mode)); + case 'l': + return (S_ISLNK(fs->st_mode)); + case 'p': + return (S_ISFIFO(fs->st_mode)); + case 'P': + return (S_ISPORT(fs->st_mode)); + case 's': + return (S_ISSOCK(fs->st_mode)); + default: + return (FALSE); + } + + case FSTYPE: +#ifdef HAVE_ST_FSTYPE + return (streql(t->this, fs->st_fstype)); +#else + return (TRUE); +#endif + + case LOCL: +#ifdef HAVE_ST_FSTYPE + if (streql("nfs", fs->st_fstype) || + streql("autofs", fs->st_fstype) || + streql("cachefs", fs->st_fstype)) + return (FALSE); +#endif + return (TRUE); + +#ifdef CHOWN + case CHOWN: + fs->st_uid = t->val.uid; + return (TRUE); +#endif + + case USER: + switch (*(t->left)) { + case '+': + return (fs->st_uid > t->val.uid); + case '-': + return (fs->st_uid < t->val.uid); + default: + return (fs->st_uid == t->val.uid); + } + +#ifdef CHGRP + case CHGRP: + fs->st_gid = t->val.gid; + return (TRUE); +#endif + + case GROUP: + switch (*(t->left)) { + case '+': + return (fs->st_gid > t->val.gid); + case '-': + return (fs->st_gid < t->val.gid); + default: + return (fs->st_gid == t->val.gid); + } + +#ifdef CHMOD + case CHMOD: + getperm(state->std[2], t->left, tokennames[t->op], + &t->val.mode, fs->st_mode & S_ALLMODES, + (S_ISDIR(fs->st_mode) || + (fs->st_mode & (S_IXUSR|S_IXGRP|S_IXOTH)) != 0) ? + GP_DOX:GP_NOX); + fs->st_mode &= ~S_ALLMODES; + fs->st_mode |= t->val.mode; + return (TRUE); +#endif + + case PERM: + if (t->left[0] == '+') + return ((fs->st_mode & t->val.mode) != 0); + else if (t->left[0] == '-') + return ((fs->st_mode & t->val.mode) == t->val.mode); + else + return ((fs->st_mode & S_ALLMODES) == t->val.mode); + + case MODE: + return (TRUE); + + case XDEV: + case MOUNT: + case DEPTH: + case FOLLOW: + case DOSTAT: + return (TRUE); + + case NOUSER: + return (getpwuid(fs->st_uid) == NULL); + + case NOGRP: + return (getgrgid(fs->st_gid) == NULL); + + case PRUNE: + state->flags |= WALK_WF_PRUNE; + return (TRUE); + + case MAXDEPTH: + case MINDEPTH: + return (TRUE); + + case PACL: + if (state->pflags & PF_ACL) { + return ((state->pflags & PF_HAS_ACL) != 0); + } + return (has_acl(state->std[2], f, ff, fs)); + + case XATTR: + if (state->pflags & PF_XATTR) { + return ((state->pflags & PF_HAS_XATTR) != 0); + } + return (has_xattr(state->std[2], ff)); + + case SPARSE: + if (!S_ISREG(fs->st_mode)) + return (FALSE); +#ifdef HAVE_ST_BLOCKS + return (fs->st_size > (fs->st_blocks * DEV_BSIZE + DEV_BSIZE)); +#else + return (FALSE); +#endif + + case OK_EXEC: + case OK_EXECDIR: { + char qbuf[32]; + + fflush(state->std[1]); + fprintf(state->std[2], "< %s ... %s > ? ", ((char **)t->this)[0], f); + fflush(state->std[2]); + fgetline(state->std[0], qbuf, sizeof (qbuf) - 1); + + switch (qbuf[0]) { + case 'y': + if (qbuf[1] == '\0' || streql(qbuf, "yes")) break; + default: + return (FALSE); + } + } + /* FALLTHRU */ + + case EXEC: + case EXECDIR: +#ifdef HAVE_FORK + return (doexec( + state->level && (t->op == OK_EXECDIR || t->op == EXECDIR)? + ff:f, + t, t->val.i, (char **)t->this, state)); +#else + ferrmsgno(state->std[2], EX_BAD, + _("'-%s' is unsupported on this platform, returning FALSE.\n"), + find_tname(t->op)); + return (FALSE); +#endif + + case EXECPLUS: +#ifdef HAVE_FORK + return (plusexec(f, t, state)); +#else + ferrmsgno(state->std[2], EX_BAD, + _("'-%s' is unsupported on this platform, returning FALSE.\n"), + find_tname(t->op)); + return (FALSE); +#endif + + case FPRINT: + fp = t->val.fp; + /* FALLTHRU */ + case PRINT: + filewrite(fp, f, strlen(f)); + putc('\n', fp); + return (TRUE); + + case FPRINT0: + fp = t->val.fp; + /* FALLTHRU */ + case PRINT0: + filewrite(fp, f, strlen(f)); + putc('\0', fp); + return (TRUE); + + case FPRINTNNL: + fp = t->val.fp; + /* FALLTHRU */ + case PRINTNNL: + filewrite(fp, f, strlen(f)); + putc(' ', fp); + return (TRUE); + + case FLS: + fp = t->val.fp; + /* FALLTHRU */ + case LS: { + FILE *std[3]; + /* + * The third parameter is the file name used for readlink() + * (inside find_list()) relatively to the current working + * directory. For file names from the command line, we did not + * perform a chdir() before, so we need to use the full path + * name. + */ + std[0] = state->std[0]; + std[1] = fp; + std[2] = state->std[2]; + find_list(std, fs, f, state->level ? ff : f, state); + return (TRUE); + } + case LTRUE: + return (TRUE); + + case LFALSE: + return (FALSE); + + case OPEN: + return (find_expr(f, ff, fs, state, (findn_t *)t->this)); + case LNOT: + return (!find_expr(f, ff, fs, state, (findn_t *)t->this)); + case AND: + return (find_expr(f, ff, fs, state, (findn_t *)t->left) ? + find_expr(f, ff, fs, state, (findn_t *)t->right) : 0); + case LOR: + return (find_expr(f, ff, fs, state, (findn_t *)t->left) ? + 1 : find_expr(f, ff, fs, state, (findn_t *)t->right)); + } + if (!(state->pflags & 0x80000000)) { + + ferrmsgno(state->std[2], EX_BAD, + _("Internal malfunction, found unknown primary '-%s' (%d).\n"), + find_tname(t->op), t->op); + state->pflags |= 0x80000000; + } + return (FALSE); /* Unknown operator ??? */ +} + +#ifdef HAVE_FORK +LOCAL BOOL +doexec(f, t, ac, av, state) + char *f; + findn_t *t; + int ac; + char **av; + struct WALK *state; +{ +#ifdef HAVE_VFORK + char ** volatile aav = NULL; +#endif + pid_t pid; + int retval; + +#ifdef HAVE_VFORK + if (f && ac >= 32) { + aav = malloc((ac+1) * sizeof (char **)); + if (aav == NULL) { + ferrmsg(state->std[2], _("Cannot malloc arg vector for -exec.\n")); + return (FALSE); + } + } +#endif + if ((pid = vfork()) < 0) { +#ifdef HAVE_VFORK + ferrmsg(state->std[2], _("Cannot vfork child.\n")); +#else + ferrmsg(state->std[2], _("Cannot fork child.\n")); +#endif +#ifdef HAVE_VFORK + /* + * Ugly code as a workaround for broken Linux include files + * that do not specify vfork() as a problem. This may + * cause aav to be != NULL even when malloc() above was never + * called. Freeing a random address on some platforms causes a + * coredump. + * As similar problems may exist on other platforms, where the + * correct fix to mark aav volatile does not work, we keep the + * workaround to check f and ac as well. + */ + if (aav && f && ac >= 32) + free(aav); +#endif + return (FALSE); + } + if (pid) { + while (wait(&retval) != pid) + /* LINTED */ + ; +#ifdef HAVE_VFORK + /* + * Ugly code as a workaround for broken Linux include files + * that do not specify vfork() as a problem. This may + * cause aav to be != NULL even when malloc() above was never + * called. Freeing a random address on some platforms causes a + * coredump. + * As similar problems may exist on other platforms, where the + * correct fix to mark aav volatile does not work, we keep the + * workaround to check f and ac as well. + */ + if (aav && f && ac >= 32) + free(aav); +#endif + return (retval == 0); + } else { +#ifdef HAVE_VFORK + char *xav[32]; + register char **pp2 = xav; +#endif + register int i; + register char **pp = av; + int err; + + /* + * This is the forked process and for this reason, we may + * call fcomerr() here without problems. + */ + if (t != NULL && /* Not called from find_plusflush() */ + t->op != OK_EXECDIR && t->op != EXECDIR && + walkhome(state) < 0) { + fcomerr(state->std[2], + _("Cannot chdir to '.'.\n")); + } +#ifndef F_SETFD + walkclose(state); +#endif + +#define iscurlypair(p) ((p)[0] == '{' && (p)[1] == '}' && (p)[2] == '\0') + +#ifdef HAVE_VFORK + if (aav) + pp2 = aav; +#endif + if (f) { /* NULL for -exec+ */ + for (i = 0; i < ac; i++, pp++) { + register char *p = *pp; + +#ifdef HAVE_VFORK + if (iscurlypair(p)) /* streql(p, "{}") */ + *pp2++ = f; + else + *pp2++ = p; +#else + if (iscurlypair(p)) /* streql(p, "{}") */ + *pp = f; +#endif + } +#ifdef HAVE_VFORK + if (aav) + pp = aav; + else + pp = xav; +#endif + } else { + pp = av; + } +#ifndef HAVE_VFORK + pp = av; +#endif +#ifdef PLUS_DEBUG + error("argsize %d\n", + (plusp->endp - (char *)&plusp->nextargp[0]) - + (plusp->laststr - (char *)&plusp->nextargp[1])); +#endif + pp[ac] = NULL; /* -exec {} \; is not NULL terminated */ + + fexecve(av[0], state->std[0], state->std[1], state->std[2], + pp, state->env); + err = geterrno(); +#ifdef PLUS_DEBUG + error("argsize %d\n", + (plusp->endp - (char *)&plusp->nextargp[0]) - + (plusp->laststr - (char *)&plusp->nextargp[1])); +#endif + /* + * This is the forked process and for this reason, we may + * call _exit() here without problems. + */ + ferrmsgno(state->std[2], err, + _("Cannot execute '%s'.\n"), av[0]); + _exit(err); + /* NOTREACHED */ + return (-1); + } +} +#endif /* HAVE FORK */ + +#ifndef LINE_MAX +#define LINE_MAX 1024 +#endif + +#if defined(IS_MACOS_X) && defined(HAVE_CRT_EXTERNS_H) +/* + * The MAC OS X linker does not grok "common" varaibles. + * We need to fetch the address of "environ" using a hack. + */ +#include +#define environ *_NSGetEnviron() +#else +extern char **environ; +#endif + +/* + * Return the number of environment entries including the final NULL pointer. + */ +LOCAL int +countenv() +{ + register int evs = 0; + register char **ep; + + for (ep = environ; *ep; ep++) { + evs++; + } + evs++; /* The environ NULL ptr at the end */ + return (evs); +} + +/* + * Return ARG_MAX - LINE_MAX - size of current environment. + * + * The return value is reduced by LINE_MAX to allow the called + * program to do own exec(2) calls with slightly increased arg size. + */ +LOCAL int +argsize(xtype) + int xtype; +{ + static int ret = 0; + + if (ret == 0) { + register int evs = 0; + register char **ep; + + for (ep = environ; *ep; ep++) { + evs += strlen(*ep) + 1 + sizeof (ep); + } + evs += sizeof (char **); /* The environ NULL ptr at the end */ + +#ifdef _SC_ARG_MAX + ret = sysconf(_SC_ARG_MAX); + if (ret < 0) +#ifdef _POSIX_ARG_MAX + ret = _POSIX_ARG_MAX; +#else + ret = ARG_MAX; +#endif +#else /* VV NO _SC_ARG_MAX VV */ +#ifdef ARG_MAX + ret = ARG_MAX; +#else +#ifdef NCARGS + /* + * On Solaris: ARG_MAX = NCARGS - space for other stuff on + * initial stack. This size is 256 for 32 bit and 512 for + * 64 bit programs. + */ + ret = NCARGS - 256; /* Let us do the same */ +#endif +#endif +#endif + +#ifdef MULTI_ARG_MAX + ret = xargsize(xtype, ret); +#endif + +#ifdef PLUS_DEBUG + ret = 3000; +#define LINE_MAX 100 + error("evs %d\n", evs); +#endif + if (ret <= 0) + ret = 10000; /* Just a guess */ + + ret -= evs; /* Subtract current env size */ + if ((ret - LINE_MAX) > 0) + ret -= LINE_MAX; + else + ret -= 100; + } + return (ret); +} + +/* + * Return the executable type: + * + * 0 unknown type -> default + * 32 a 32 bit binary + * 64 a 64 bit binary + */ +LOCAL int +extype(name) + char *name; +{ + int f; + char *xname; + char elfbuf[8]; + + xname = findinpath(name, X_OK, TRUE, NULL); + if (name == NULL) + xname = name; + + if ((f = open(xname, O_RDONLY|O_BINARY)) < 0) { + if (xname != name) + free(xname); + return (0); + } + if (xname != name) + free(xname); + if (read(f, elfbuf, sizeof (elfbuf)) < sizeof (elfbuf)) { + close(f); + return (0); + } + close(f); + + /* + * We only support ELF binaries + */ + if (elfbuf[0] != 0x7F || + elfbuf[1] != 'E' || elfbuf[2] != 'L' || elfbuf[3] != 'F') + return (0); + + switch (elfbuf[4] & 0xFF) { + + case 1: /* ELFCLASS32 */ + return (32); + + case 2: /* ELFCLASS64 */ + return (64); + } + return (0); +} + +#ifdef MULTI_ARG_MAX +/* + * If we have both _ARG_MAX32 and _ARG_MAX64 (currently on SunOS) + * correct maxarg based on the target binary type. + */ +LOCAL int +xargsize(xtype, maxarg) + int xtype; + int maxarg; +{ + /* + * Set up a safe fallback in case we are not able to determine the + * binary type. + */ + if (maxarg > _ARG_MAX32) + maxarg = _ARG_MAX32; + + switch (xtype) { + + case 32: + maxarg = _ARG_MAX32; + break; + + case 64: + maxarg = _ARG_MAX64; + break; + } + + return (maxarg); +} +#endif + +LOCAL BOOL +pluscreate(f, ac, av, fap) + FILE *f; + int ac; + char **av; + finda_t *fap; +{ + struct plusargs *pp; + register char **ap = av; + register int i; + int mxtype; + int xtype; + int maxarg; + int nenv; + + xtype = extype(av[0]); /* Get -exec executable type */ + maxarg = argsize(xtype); /* Get ARG_MAX for executable */ + nenv = countenv(); /* # of ents in current env */ + + mxtype = sizeof (char *) * CHAR_BIT; + if (xtype == 0) + mxtype = 0; + + if (xtype == mxtype) + nenv = 0; /* Easy case */ + else if (xtype > mxtype) + nenv = -nenv; /* Need to reduce arg size */ + + maxarg += nenv * (32 / CHAR_BIT); /* Correct maxarg by ptr size */ + +#ifdef PLUS_DEBUG + printf("Argc %d\n", ac); + ap = av; + for (i = 0; i < ac; i++, ap++) + printf("ARG %d '%s'\n", i, *ap); +#endif + + pp = __fjmalloc(fap->std[2], maxarg + sizeof (struct plusargs), + "-exec args", fap->jmp); + pp->laststr = pp->endp = (char *)(&pp->av[0]) + maxarg; + pp->nenv = nenv; + pp->ac = 0; + pp->nextargp = &pp->av[0]; + +#ifdef PLUS_DEBUG + printf("pp %d\n", pp); + printf("pp->laststr %d\n", pp->laststr); + printf("argsize() %d\n", maxarg); +#endif + + /* + * Copy args from command line. + */ + ap = av; + for (i = 0; i < ac; i++, ap++) { +#ifdef PLUS_DEBUG + printf("ARG %d '%s'\n", i, *ap); +#endif + *(pp->nextargp++) = *ap; + pp->laststr -= strlen(*ap) + 1; + pp->ac++; + if (pp->laststr <= (char *)pp->nextargp) { + ferrmsgno(f, EX_BAD, + _("No space to copy -exec args.\n")); + free(pp); /* The exec plusargs struct */ + return (FALSE); + } + } +#ifdef PLUS_DEBUG + error("lastr %d endp %d diff %d\n", + pp->laststr, pp->endp, pp->endp - pp->laststr); +#endif + pp->endp = pp->laststr; /* Reduce endp by the size of cmdline args */ + +#ifdef PLUS_DEBUG + ap = &pp->av[0]; + for (i = 0; i < pp->ac; i++, ap++) { + printf("ARG %d '%s'\n", i, *ap); + } +#endif +#ifdef PLUS_DEBUG + printf("pp %d\n", pp); + printf("pp->laststr %d\n", pp->laststr); +#endif + pp->next = fap->plusp; + fap->plusp = pp; +#ifdef PLUS_DEBUG + plusp = fap->plusp; /* Makes libfind not MT safe */ +#endif + return (TRUE); +} + +#ifdef HAVE_FORK +LOCAL BOOL +plusexec(f, t, state) + char *f; + findn_t *t; + struct WALK *state; +{ + register struct plusargs *pp = (struct plusargs *)t->this; +#ifdef PLUS_DEBUG + register char **ap; + register int i; +#endif + size_t size; + size_t slen = strlen(f) + 1; + char *nargp = (char *)&pp->nextargp[2]; + char *cp; + int ret = TRUE; + + size = pp->laststr - (char *)&pp->nextargp[2]; /* Remaining strlen */ + + if (pp->nenv < 0) /* Called cmd has */ + nargp += pp->ac * (32 / CHAR_BIT); /* larger ptr size */ + + if (pp->laststr < nargp || /* Already full */ + slen > size) { /* str does not fit */ + pp->nextargp[0] = NULL; + ret = doexec(NULL, t, pp->ac, pp->av, state); + pp->laststr = pp->endp; + pp->ac = t->val.i; + pp->nextargp = &pp->av[t->val.i]; + size = pp->laststr - (char *)&pp->nextargp[2]; + } + if (pp->laststr < nargp || + slen > size) { + ferrmsgno(state->std[2], EX_BAD, + _("No space for arg '%s'.\n"), f); + return (FALSE); + } + cp = pp->laststr - slen; + strcpy(cp, f); + pp->nextargp[0] = cp; + pp->ac++; + pp->nextargp++; + pp->laststr -= slen; + +#ifdef PLUS_DEBUG + ap = &plusp->av[0]; + for (i = 0; i < plusp->ac; i++, ap++) { + printf("ARG %d '%s'\n", i, *ap); + } + error("EXECPLUS '%s'\n", f); +#endif + return (ret); +} +#endif /* HAVE_FORK */ + +EXPORT int +find_plusflush(p, state) + void *p; + struct WALK *state; +{ + struct plusargs *plusp = p; + BOOL ret = TRUE; + + /* + * Execute all unflushed '-exec .... {} +' expressions. + */ + while (plusp) { +#ifdef PLUS_DEBUG + error("lastr %p endp %p\n", plusp->laststr, plusp->endp); +#endif + if (plusp->laststr != plusp->endp) { + plusp->nextargp[0] = NULL; +#ifdef HAVE_FORK + if (!doexec(NULL, NULL, plusp->ac, plusp->av, state)) + ret = FALSE; +#endif + } + plusp = plusp->next; + } + return (ret); +} + +EXPORT void +find_usage(f) + FILE *f; +{ + fprintf(f, _("Usage: %s [options] [path_1 ... path_n] [expression]\n"), get_progname()); + fprintf(f, _("Options:\n")); + fprintf(f, _(" -H follow symbolic links encountered on command line\n")); + fprintf(f, _(" -L follow all symbolic links\n")); + fprintf(f, _("* -P do not follow symbolic links (default)\n")); + fprintf(f, _("* -help Print this help.\n")); + fprintf(f, _("* -version Print version number.\n")); + fprintf(f, _("Operators in decreasing precedence:\n")); + fprintf(f, _(" ( ) group an expression\n")); + fprintf(f, _(" !, -a, -o negate a primary (unary NOT), logical AND, logical OR\n")); + fprintf(f, _("Primaries:\n")); + fprintf(f, _("* -acl TRUE if the file has additional ACLs defined\n")); + fprintf(f, _(" -atime # TRUE if st_atime is in specified range\n")); +#ifdef CHGRP + fprintf(f, _("* -chgrp gname/gid always TRUE, sets st_gid to gname/gid\n")); +#endif +#ifdef CHMOD + fprintf(f, _("* -chmod mode/onum always TRUE, sets permissions to mode/onum\n")); +#endif +#ifdef CHOWN + fprintf(f, _("* -chown uname/uid always TRUE, sets st_uid to uname/uid\n")); +#endif + fprintf(f, _(" -ctime # TRUE if st_ctime is in specified range\n")); + fprintf(f, _(" -depth evaluate directory content before directory (always TRUE)\n")); + fprintf(f, _("* -dostat Do not do stat optimization (always TRUE)\n")); + fprintf(f, _("* -empty TRUE zero sized plain file or empty directory\n")); + fprintf(f, _(" -exec program [argument ...] \\;\n")); + fprintf(f, _(" -exec program [argument ...] {} +\n")); + fprintf(f, _("* -execdir program [argument ...] \\;\n")); + fprintf(f, _("* -executable TRUE if file is executable by real user id\n")); + fprintf(f, _("* -false always FALSE\n")); + fprintf(f, _("* -fls file list files similar to 'ls -ilds' into 'file' (always TRUE)\n")); + fprintf(f, _("* -follow outdated: follow all symbolic links (always TRUE)\n")); + fprintf(f, _("* -fprint file print file names line separated into 'file' (always TRUE)\n")); + fprintf(f, _("* -fprint0 file print file names nul separated into 'file' (always TRUE)\n")); + fprintf(f, _("* -fprintnnl file print file names space separated into 'file' (always TRUE)\n")); + fprintf(f, _("* -fstype type TRUE if st_fstype matches type\n")); + fprintf(f, _(" -group gname/gid TRUE if st_gid matches gname/gid\n")); + fprintf(f, _("* -ilname glob TRUE if symlink name matches shell glob\n")); + fprintf(f, _("* -ilpat pattern TRUE if symlink name matches pattern\n")); + fprintf(f, _("* -iname glob TRUE if path component matches shell glob\n")); + fprintf(f, _("* -inum # TRUE if st_ino is in specified range\n")); + fprintf(f, _("* -ipat pattern TRUE if path component matches pattern\n")); + fprintf(f, _("* -ipath glob TRUE if full path matches shell glob\n")); + fprintf(f, _("* -ippat pattern TRUE if full path matches pattern\n")); + fprintf(f, _("* -linkedto path TRUE if the file is linked to path\n")); + fprintf(f, _(" -links # TRUE if st_nlink is in specified range\n")); + fprintf(f, _("* -lname glob TRUE if symlink name matches shell glob\n")); + fprintf(f, _("* -local TRUE if st_fstype does not match remote fs types\n")); + fprintf(f, _("* -lpat pattern TRUE if symlink name matches pattern\n")); + fprintf(f, _("* -ls list files similar to 'ls -ilds' (always TRUE)\n")); + fprintf(f, _("* -maxdepth # descend at most # directory levels (always TRUE)\n")); + fprintf(f, _("* -mindepth # start tests at directory level # (always TRUE)\n")); + fprintf(f, _(" -mtime # TRUE if st_mtime is in specified range\n")); + fprintf(f, _(" -name glob TRUE if path component matches shell glob\n")); + fprintf(f, _(" -newer file TRUE if st_mtime newer then mtime of file\n")); + fprintf(f, _("* -newerXY file TRUE if [acm]time (X) newer then [acm]time (Y) of file\n")); + fprintf(f, _(" -nogroup TRUE if not in group database\n")); + fprintf(f, _(" -nouser TRUE if not in user database\n")); + fprintf(f, _(" -ok program [argument ...] \\;\n")); + fprintf(f, _("* -okdir program [argument ...] \\;\n")); + fprintf(f, _("* -pat pattern TRUE if path component matches pattern\n")); + fprintf(f, _("* -path glob TRUE if full path matches shell glob\n")); + fprintf(f, _(" -perm mode/onum TRUE if symbolic/octal permission matches\n")); + fprintf(f, _("* -ppat pattern TRUE if full path matches pattern\n")); + fprintf(f, _(" -print print file names line separated to stdout (always TRUE)\n")); + fprintf(f, _("* -print0 print file names nul separated to stdout (always TRUE)\n")); + fprintf(f, _("* -printnnl print file names space separated to stdout (always TRUE)\n")); + fprintf(f, _(" -prune do not descent current directory (always TRUE)\n")); + fprintf(f, _("* -readable TRUE if file is readable by real user id\n")); + fprintf(f, _(" -size # TRUE if st_size is in specified range\n")); + fprintf(f, _("* -sparse TRUE if file appears to be sparse\n")); + fprintf(f, _("* -true always TRUE\n")); + fprintf(f, _(" -type c TRUE if file type matches, c is from (b c d D e f l p P s)\n")); + fprintf(f, _(" -user uname/uid TRUE if st_uid matches uname/uid\n")); + fprintf(f, _("* -writable TRUE if file is writable by real user id\n")); + fprintf(f, _("* -xattr TRUE if the file has extended attributes\n")); + fprintf(f, _(" -xdev, -mount restrict search to current filesystem (always TRUE)\n")); + fprintf(f, _("Primaries marked with '*' are POSIX extensions, avoid them in portable scripts.\n")); + fprintf(f, _("If path is omitted, '.' is used. If expression is omitted, -print is used.\n")); +} + +#ifdef FIND_MAIN + +/* ARGSUSED */ +LOCAL int +getflg(optstr, argp) + char *optstr; + long *argp; +{ + if (optstr[1] != '\0') + return (-1); + + switch (*optstr) { + + case 'H': + *(int *)argp |= WALK_ARGFOLLOW; + return (TRUE); + case 'L': + *(int *)argp |= WALK_ALLFOLLOW; + return (TRUE); + case 'P': + *(int *)argp &= ~(WALK_ARGFOLLOW | WALK_ALLFOLLOW); + return (TRUE); + + default: + return (-1); + } +} + +EXPORT int +main(ac, av) + int ac; + char **av; +{ + int cac = ac; + char **cav = av; + char **firstpath; + char **firstprim; + BOOL help = FALSE; + BOOL prversion = FALSE; + finda_t fa; + findn_t *Tree; + struct WALK walkstate; + + save_args(ac, av); + +#ifdef USE_NLS + setlocale(LC_ALL, ""); + bindtextdomain("SCHILY_FIND", "/opt/schily/lib/locale"); + textdomain("SCHILY_FIND"); +#endif + find_argsinit(&fa); + fa.walkflags = WALK_CHDIR | WALK_PHYS; + fa.walkflags |= WALK_NOSTAT; + fa.walkflags |= WALK_NOEXIT; + + /* + * Do not check the return code for getargs() as we may get an error + * code from e.g. "find -print" and we do not like to handle this here. + */ + cac--, cav++; + getargs(&cac, (char * const **)&cav, "help,version,&", + &help, &prversion, + getflg, (long *)&fa.walkflags); + if (help) { + find_usage(stderr); + return (0); + } + if (prversion) { + printf("sfind release %s (%s-%s-%s) Copyright (C) 2004-2008 Jörg Schilling\n", + strvers, + HOST_CPU, HOST_VENDOR, HOST_OS); + return (0); + } + + firstpath = cav; /* Remember first file type arg */ + find_firstprim(&cac, (char *const **)&cav); + firstprim = cav; /* Remember first Primary type arg */ + fa.Argv = cav; + fa.Argc = cac; + + if (cac) { + Tree = find_parse(&fa); + if (fa.primtype == FIND_ERRARG) { + find_free(Tree, &fa); + return (fa.error); + } + if (fa.primtype != FIND_ENDARGS) { + ferrmsgno(stderr, EX_BAD, + _("Incomplete expression.\n")); + find_free(Tree, &fa); + return (EX_BAD); + } + if (find_pname(Tree, "-chown") || find_pname(Tree, "-chgrp") || + find_pname(Tree, "-chmod")) { + ferrmsgno(stderr, EX_BAD, + _("Unsupported primary -chown/-chgrp/-chmod.\n")); + find_free(Tree, &fa); + return (EX_BAD); + } + } else { + Tree = 0; + } + if (Tree == 0) { + Tree = find_printnode(); + } else if (!fa.found_action) { + Tree = find_addprint(Tree, &fa); + if (Tree == (findn_t *)NULL) + return (geterrno()); + } + walkinitstate(&walkstate); + if (fa.patlen > 0) { + walkstate.patstate = __jmalloc(sizeof (int) * fa.patlen, + "space for pattern state", JM_RETURN); + if (walkstate.patstate == NULL) + return (geterrno()); + } + + find_timeinit(time(0)); + + walkstate.walkflags = fa.walkflags; + walkstate.maxdepth = fa.maxdepth; + walkstate.mindepth = fa.mindepth; + walkstate.lname = NULL; + walkstate.tree = Tree; + walkstate.err = 0; + walkstate.pflags = 0; + + if (firstpath == firstprim) { + treewalk(".", walkfunc, &walkstate); + } else { + for (cav = firstpath; cav != firstprim; cav++) { + treewalk(*cav, walkfunc, &walkstate); + /* + * XXX hier break wenn treewalk() Fehler gemeldet + */ + } + } + /* + * Execute all unflushed '-exec .... {} +' expressions. + */ + find_plusflush(fa.plusp, &walkstate); + find_free(Tree, &fa); + if (walkstate.patstate != NULL) + free(walkstate.patstate); + return (walkstate.err); +} + +#endif /* FIND_MAIN */ diff -Nru cdrtools-2.01.01a33/libfind/libfind-mapvers cdrtools-3.02a09/libfind/libfind-mapvers --- cdrtools-2.01.01a33/libfind/libfind-mapvers 2007-03-31 11:01:57.000000000 +0000 +++ cdrtools-3.02a09/libfind/libfind-mapvers 2015-05-18 22:42:36.000000000 +0000 @@ -1,8 +1,18 @@ -# @(#)libfind-mapvers 1.8 07/03/31 Copyright 2005-2007 J. Schilling +# /* @(#)libfind-mapvers 1.11 15/05/19 Copyright 2005-2015 J. Schilling */ + +SCHILY_0.2 { # Not yet a stable interface! +global: + find_hasexec; # find.c + find_hasprint; # find.c +} SCHILY_0.1; SCHILY_0.1 { # Not yet a stable interface! global: + dfetchdir; # fetchdir.c fetchdir; # fetchdir.c + cmpdir; # cmpdir.c + sortdir; # cmpdir.c + fdircomp; # cmpdir.c find_addprint; # find.c find_argsinit; # find.c find_expr; # find.c @@ -19,18 +29,21 @@ find_tname; # find.c find_token; # find.c find_usage; # find.c - gid_nobody; # name.c - gidname; # name.c has_acl; # find_misc.c has_xattr; # find_misc.c - namegid; # name.c - nameuid; # name.c treewalk; # walk.c - uid_nobody; # name.c - uidname; # name.c + walkopen; # walk.c walkclose; # walk.c walkhome; # walk.c + walkgethome; # walk.c walkinitstate; # walk.c + ic_gidname; # idcache.c + ic_namegid; # idcache.c + ic_nameuid; # idcache.c + ic_uidname; # idcache.c + ic_uid_nobody; # idcache.c + ic_gid_nobody; # idcache.c + local: *; }; diff -Nru cdrtools-2.01.01a33/libfind/libfind.mk cdrtools-3.02a09/libfind/libfind.mk --- cdrtools-2.01.01a33/libfind/libfind.mk 2007-02-03 23:00:05.000000000 +0000 +++ cdrtools-3.02a09/libfind/libfind.mk 2015-09-12 10:54:43.000000000 +0000 @@ -1,4 +1,4 @@ -#ident @(#)libfind.mk 1.2 07/02/04 +#ident @(#)libfind.mk 1.4 15/09/12 ########################################################################### SRCROOT= .. RULESDIR= RULES @@ -17,6 +17,8 @@ CPPOPTS += -DUSE_ACL CPPOPTS += -DUSE_XATTR CPPOPTS += -DUSE_NLS +CPPOPTS += -DUSE_DGETTEXT # _() -> dgettext() +CPPOPTS += -DTEXT_DOMAIN=\"SCHILY_FIND\" CPPOPTS += -DSCHILY_PRINT include Targets @@ -25,3 +27,4 @@ ########################################################################### include $(SRCROOT)/$(RULESDIR)/rules.lib ########################################################################### + diff -Nru cdrtools-2.01.01a33/libfind/libfind_p.mk cdrtools-3.02a09/libfind/libfind_p.mk --- cdrtools-2.01.01a33/libfind/libfind_p.mk 2007-06-30 11:13:34.000000000 +0000 +++ cdrtools-3.02a09/libfind/libfind_p.mk 2015-09-12 10:54:43.000000000 +0000 @@ -1,4 +1,4 @@ -#ident @(#)libfind_p.mk 1.3 07/06/30 +#ident @(#)libfind_p.mk 1.5 15/09/12 ########################################################################### SRCROOT= .. RULESDIR= RULES @@ -6,6 +6,7 @@ ########################################################################### SUBARCHDIR= /profiled +SUBINSDIR= /profiled #.SEARCHLIST: . $(ARCHDIR) stdio $(ARCHDIR) #VPATH= .:stdio:$(ARCHDIR) INSDIR= lib @@ -19,6 +20,8 @@ CPPOPTS += -DUSE_ACL CPPOPTS += -DUSE_XATTR CPPOPTS += -DUSE_NLS +CPPOPTS += -DUSE_DGETTEXT # _() -> dgettext() +CPPOPTS += -DTEXT_DOMAIN=\"SCHILY_FIND\" CPPOPTS += -DSCHILY_PRINT include Targets diff -Nru cdrtools-2.01.01a33/libfind/names.c cdrtools-3.02a09/libfind/names.c --- cdrtools-2.01.01a33/libfind/names.c 2007-04-20 15:05:36.000000000 +0000 +++ cdrtools-3.02a09/libfind/names.c 1970-01-01 00:00:00.000000000 +0000 @@ -1,314 +0,0 @@ -/* @(#)names.c 1.23 07/04/20 Copyright 1993, 1995-2007 J. Schilling */ -#ifndef lint -static char sccsid[] = - "@(#)names.c 1.23 07/04/20 Copyright 1993, 1995-2007 J. Schilling"; -#endif -/* - * Handle user/group names for archive header - * - * Copyright (c) 1993, 1995-2007 J. Schilling - */ -/* - * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. - * - * See the file CDDL.Schily.txt in this distribution for details. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file CDDL.Schily.txt from this distribution. - */ - -#include -#include -#include -#include -#include -#include -#include -#ifdef __STAR__ -#include "star.h" -#include "starsubs.h" -#else -#define TUNMLEN 32 -#define TGNMLEN 32 -#endif -#include - -#define C_SIZE 16 - -typedef struct u_id { - uid_t uid; - char name[TUNMLEN+1]; - char valid; -} uidc_t; - -typedef struct g_id { - gid_t gid; - char name[TGNMLEN+1]; - char valid; -} gidc_t; - -LOCAL uidc_t uidcache[C_SIZE]; -LOCAL int lastuidx; /* Last index for new entry */ - -LOCAL gidc_t gidcache[C_SIZE]; -LOCAL int lastgidx; /* Last index for new entry */ - -LOCAL uid_t _uid_nobody; /* Uid for user "nobody" */ -LOCAL gid_t _gid_nobody; /* Gid for user "nobody" */ -LOCAL BOOL name_init = FALSE; - -EXPORT BOOL nameuid __PR((char *name, int namelen, uid_t uid)); -EXPORT BOOL uidname __PR((char *name, int namelen, uid_t *uidp)); -EXPORT BOOL namegid __PR((char *name, int namelen, gid_t gid)); -EXPORT BOOL gidname __PR((char *name, int namelen, gid_t *gidp)); -LOCAL void nameinit __PR((void)); -EXPORT uid_t uid_nobody __PR((void)); -EXPORT gid_t gid_nobody __PR((void)); - -/* - * Get name from uid - */ -#ifdef PROTOTYPES -EXPORT BOOL -nameuid(char *name, int namelen, uid_t uid) -#else -EXPORT BOOL -nameuid(name, namelen, uid) - char *name; - int namelen; - uid_t uid; -#endif -{ - struct passwd *pw; - register int i; - register uidc_t *idp; - - for (i = 0, idp = uidcache; i < C_SIZE; i++, idp++) { - if (idp->valid == 0) /* Entry not yet filled */ - break; - if (idp->uid == uid) - goto out; - } - idp = &uidcache[lastuidx++]; /* Round robin fill next ent */ - if (lastuidx >= C_SIZE) - lastuidx = 0; - - idp->uid = uid; - idp->name[0] = '\0'; - idp->valid = 1; - if ((pw = getpwuid(uid)) != NULL) { - strncpy(idp->name, pw->pw_name, TUNMLEN); - idp->name[TUNMLEN] = '\0'; - /* - * XXX We should find a better method than shortening the cache - */ - if (namelen <= (TUNMLEN+1)) - idp->name[namelen-1] = 0; - } -out: - strcpy(name, idp->name); - return (name[0] != '\0'); -} - -/* - * Get uid from name - */ -EXPORT BOOL -uidname(name, namelen, uidp) - char *name; - int namelen; - uid_t *uidp; -{ - struct passwd *pw; - register int len = namelen > TUNMLEN?TUNMLEN:namelen; - register int i; - register uidc_t *idp; - - if (name[0] == '\0') { - *uidp = uid_nobody(); /* Return UID_NOBODY */ - return (FALSE); - } - - for (i = 0, idp = uidcache; i < C_SIZE; i++, idp++) { - if (idp->valid == 0) /* Entry not yet filled */ - break; - if (name[0] == idp->name[0] && - strncmp(name, idp->name, len) == 0) { - *uidp = idp->uid; - if (idp->valid == 2) { /* Name not found */ - *uidp = uid_nobody(); /* Return UID_NOBODY */ - return (FALSE); - } - return (TRUE); - } - } - idp = &uidcache[lastuidx++]; /* Round robin fill next ent */ - if (lastuidx >= C_SIZE) - lastuidx = 0; - - idp->uid = 0; - idp->name[0] = '\0'; - strncpy(idp->name, name, len); - idp->name[len] = '\0'; - idp->valid = 1; - if ((pw = getpwnam(idp->name)) != NULL) { - idp->uid = pw->pw_uid; - *uidp = idp->uid; - return (TRUE); - } else { - idp->valid = 2; /* Mark name as not found */ - *uidp = uid_nobody(); /* Return UID_NOBODY */ - return (FALSE); - } -} - -/* - * Get name from gid - */ -#ifdef PROTOTYPES -EXPORT BOOL -namegid(char *name, int namelen, gid_t gid) -#else -EXPORT BOOL -namegid(name, namelen, gid) - char *name; - int namelen; - gid_t gid; -#endif -{ - struct group *gr; - register int i; - register gidc_t *idp; - - for (i = 0, idp = gidcache; i < C_SIZE; i++, idp++) { - if (idp->valid == 0) /* Entry not yet filled */ - break; - if (idp->gid == gid) - goto out; - } - idp = &gidcache[lastgidx++]; /* Round robin fill next ent */ - if (lastgidx >= C_SIZE) - lastgidx = 0; - - idp->gid = gid; - idp->name[0] = '\0'; - idp->valid = 1; - if ((gr = getgrgid(gid)) != NULL) { - strncpy(idp->name, gr->gr_name, TGNMLEN); - idp->name[TGNMLEN] = '\0'; - /* - * XXX We should find a better method than shortening the cache - */ - if (namelen <= (TGNMLEN+1)) - idp->name[namelen-1] = 0; - } -out: - strcpy(name, idp->name); - return (name[0] != '\0'); -} - -/* - * Get gid from name - */ -EXPORT BOOL -gidname(name, namelen, gidp) - char *name; - int namelen; - gid_t *gidp; -{ - struct group *gr; - register int len = namelen > TGNMLEN?TGNMLEN:namelen; - register int i; - register gidc_t *idp; - - if (name[0] == '\0') { - *gidp = gid_nobody(); /* Return GID_NOBODY */ - return (FALSE); - } - - for (i = 0, idp = gidcache; i < C_SIZE; i++, idp++) { - if (idp->valid == 0) /* Entry not yet filled */ - break; - if (name[0] == idp->name[0] && - strncmp(name, idp->name, len) == 0) { - *gidp = idp->gid; - if (idp->valid == 2) { /* Name not found */ - *gidp = gid_nobody(); /* Return GID_NOBODY */ - return (FALSE); - } - return (TRUE); - } - } - idp = &gidcache[lastgidx++]; /* Round robin fill next ent */ - if (lastgidx >= C_SIZE) - lastgidx = 0; - - idp->gid = 0; - idp->name[0] = '\0'; - strncpy(idp->name, name, len); - idp->name[len] = '\0'; - idp->valid = 1; - if ((gr = getgrnam(idp->name)) != NULL) { - idp->gid = gr->gr_gid; - *gidp = idp->gid; - return (TRUE); - } else { - idp->valid = 2; /* Mark name as not found */ - *gidp = gid_nobody(); /* Return GID_NOBODY */ - return (FALSE); - } -} - -#ifdef HAVE_SYS_PARAM_H -#include -#endif - -#ifndef UID_NOBODY -#define UID_NOBODY 65534 /* The old SunOS-4.x and *BSD value */ -#endif -#ifndef GID_NOBODY -#define GID_NOBODY 65534 /* The old SunOS-4.x and *BSD value */ -#endif - -LOCAL void -nameinit() -{ - char *name; - int namelen; - uid_t uid; - gid_t gid; - - /* - * Make sure that uidname()/gidname() do not call nameinit(). - */ - name_init = TRUE; - - name = "nobody"; - namelen = strlen(name); - if (!uidname(name, namelen, &uid)) - uid = UID_NOBODY; - _uid_nobody = uid; - - if (!gidname(name, namelen, &gid)) - gid = GID_NOBODY; - _gid_nobody = gid; -} - -EXPORT uid_t -uid_nobody() -{ - if (!name_init) - nameinit(); - return (_uid_nobody); -} - -EXPORT uid_t -gid_nobody() -{ - if (!name_init) - nameinit(); - return (_gid_nobody); -} diff -Nru cdrtools-2.01.01a33/libfind/README cdrtools-3.02a09/libfind/README --- cdrtools-2.01.01a33/libfind/README 2007-04-04 10:59:45.000000000 +0000 +++ cdrtools-3.02a09/libfind/README 2008-01-04 11:59:10.000000000 +0000 @@ -47,7 +47,7 @@ std[0] = stdin; std[1] = stdout; std[2] = stderr; - return (find_main(ac, av, std, NULL)); + return (find_main(ac, av, NULL, std, NULL)); } /*--------------------------------------------------------------------------*/ @@ -74,7 +74,7 @@ quit.quitfun = quitfun; /* The function to evaluate "ctlc" */ quit.qfarg = &ctlc; /* The ^C catched counter */ - ex_status = find_main(vp->v_ac, vp->v_av, std, &quit); + ex_status = find_main(vp->v_ac, vp->v_av, evarray, std, &quit); } /*--------------------------------------------------------------------------*/ @@ -120,7 +120,7 @@ std[0] = fdopen(i, "r+"); std[1] = fdopen(o, "w"); std[2] = fdopen(e, "w+"); - ret = find_main(ac, av, std, &quit); + ret = find_main(ac, av, NULL, std, &quit); fclose(std[0]); fclose(std[1]); fclose(std[2]); diff -Nru cdrtools-2.01.01a33/libfind/shlfind.mk cdrtools-3.02a09/libfind/shlfind.mk --- cdrtools-2.01.01a33/libfind/shlfind.mk 2007-02-03 23:00:05.000000000 +0000 +++ cdrtools-3.02a09/libfind/shlfind.mk 2017-07-06 21:31:03.000000000 +0000 @@ -1,4 +1,4 @@ -#ident @(#)shlfind.mk 1.2 07/02/04 +#ident @(#)shlfind.mk 1.5 17/07/06 ########################################################################### SRCROOT= .. RULESDIR= RULES @@ -18,10 +18,12 @@ CPPOPTS += -DUSE_ACL CPPOPTS += -DUSE_XATTR CPPOPTS += -DUSE_NLS +CPPOPTS += -DUSE_DGETTEXT # _() -> dgettext() +CPPOPTS += -DTEXT_DOMAIN=\"SCHILY_FIND\" CPPOPTS += -DSCHILY_PRINT include Targets -LIBS= -lschily -lc +LIBS= -lschily $(LIB_ACL_TEST) $(LIB_INTL) -lc ########################################################################### include $(SRCROOT)/$(RULESDIR)/rules.shl diff -Nru cdrtools-2.01.01a33/libfind/Targets cdrtools-3.02a09/libfind/Targets --- cdrtools-2.01.01a33/libfind/Targets 2007-02-21 19:37:39.000000000 +0000 +++ cdrtools-3.02a09/libfind/Targets 2010-04-04 18:36:34.000000000 +0000 @@ -1,4 +1,4 @@ -# @(#)Targets 1.4 07/02/21 Copyright 2005 J. Schilling +# @(#)Targets 1.6 10/04/04 Copyright 2005-2010 J. Schilling -CFILES= find.c walk.c fetchdir.c find_misc.c find_list.c find_main.c names.c -HFILES= find.h fetchdir.h find_misc.h find_list.h walk.h +CFILES= find.c walk.c fetchdir.c cmpdir.c find_misc.c find_list.c find_main.c idcache.c +HFILES= find_misc.h find_list.h find_tok.h diff -Nru cdrtools-2.01.01a33/libfind/walk.c cdrtools-3.02a09/libfind/walk.c --- cdrtools-2.01.01a33/libfind/walk.c 2007-04-03 23:28:29.000000000 +0000 +++ cdrtools-3.02a09/libfind/walk.c 2016-03-10 22:45:20.000000000 +0000 @@ -1,12 +1,13 @@ -/* @(#)walk.c 1.28 07/04/04 Copyright 2004-2007 J. Schilling */ +/* @(#)walk.c 1.46 16/03/10 Copyright 2004-2016 J. Schilling */ +#include #ifndef lint -static char sccsid[] = - "@(#)walk.c 1.28 07/04/04 Copyright 2004-2007 J. Schilling"; +static UConst char sccsid[] = + "@(#)walk.c 1.46 16/03/10 Copyright 2004-2016 J. Schilling"; #endif /* * Walk a directory tree * - * Copyright (c) 2004-2007 J. Schilling + * Copyright (c) 2004-2016 J. Schilling * * In order to make treewalk() thread safe, we need to make it to not use * chdir(2)/fchdir(2) which is process global. @@ -29,13 +30,14 @@ * with the License. * * See the file CDDL.Schily.txt in this distribution for details. + * A copy of the CDDL is also available via the Internet at + * http://www.opensource.org/licenses/cddl1.txt * * When distributing Covered Code, include this CDDL HEADER in each * file and include the License file CDDL.Schily.txt from this distribution. */ -#include -#include +#include #include #include #ifdef HAVE_FCHDIR @@ -43,15 +45,28 @@ #else #include #endif +#include /* NODEV */ #include #include #include #include #include +#include #include #include -#include "walk.h" -#include "fetchdir.h" +#include +#include + +#if defined(IS_MACOS_X) && defined(HAVE_CRT_EXTERNS_H) +/* + * The MAC OS X linker does not grok "common" varaibles. + * We need to fetch the address of "environ" using a hack. + */ +#include +#define environ *_NSGetEnviron() +#else +extern char **environ; +#endif #ifndef HAVE_LSTAT #define lstat stat @@ -73,10 +88,13 @@ (p)[3] == '\0') #define DIR_INCR 1024 /* How to increment Curdir size */ +#define TW_MALLOC 0x01 /* Struct was allocated */ struct twvars { char *Curdir; /* The current path name */ int Curdtail; /* Where to append to Curdir */ int Curdlen; /* Current size of 'Curdir' */ + int Flags; /* Flags related to this struct */ + struct WALK *Walk; /* Backpointer to struct WALK */ struct stat Sb; /* stat(2) buffer for start dir */ #ifdef HAVE_FCHDIR int Home; /* open fd to start CWD */ @@ -96,15 +114,19 @@ typedef int (*statfun) __PR((const char *_nm, struct stat *_fs)); -EXPORT int treewalk __PR((char *nm, walkfun fn, struct WALK *_state)); -LOCAL int walk __PR((char *nm, statfun sf, walkfun fn, struct WALK *state, struct pdirs *last)); -LOCAL int incr_dspace __PR((struct twvars *varp, int amt)); +EXPORT int treewalk __PR((char *nm, walkfun fn, + struct WALK *_state)); +LOCAL int walk __PR((char *nm, statfun sf, walkfun fn, + struct WALK *state, + struct pdirs *last)); +LOCAL int incr_dspace __PR((FILE *f, struct twvars *varp, int amt)); EXPORT void walkinitstate __PR((struct WALK *_state)); EXPORT void *walkopen __PR((struct WALK *_state)); EXPORT int walkgethome __PR((struct WALK *_state)); EXPORT int walkhome __PR((struct WALK *_state)); EXPORT int walkclose __PR((struct WALK *_state)); -LOCAL int xchdotdot __PR((struct pdirs *last, int tail, struct WALK *_state)); +LOCAL int xchdotdot __PR((struct pdirs *last, int tail, + struct WALK *_state)); LOCAL int xchdir __PR((char *p)); EXPORT int @@ -114,7 +136,7 @@ struct WALK *state; /* Walk state */ { struct twvars vars; - statfun statf = &stat; + statfun statf = stat; int nlen; if ((state->walkflags & WALK_CHDIR) == 0) { @@ -125,19 +147,31 @@ vars.Curdir = NULL; vars.Curdlen = 0; vars.Curdtail = 0; + vars.Flags = 0; #ifdef HAVE_FCHDIR vars.Home = -1; #endif state->twprivate = &vars; + vars.Walk = state; if (walkgethome(state) < 0) { state->twprivate = NULL; return (-1); } - if (nm == NULL || nm[0] == '\0') + if (nm == NULL || nm[0] == '\0') { nm = "."; + } else if (state->walkflags & WALK_STRIPLDOT) { + if (nm[0] == '.' && nm[1] == '/') { + for (nm++; nm[0] == '/'; nm++) + /* LINTED */ + ; + } + } - vars.Curdir = __malloc(DIR_INCR, "path buffer"); + vars.Curdir = __fjmalloc(state->std[2], + DIR_INCR, "path buffer", JM_RETURN); + if (vars.Curdir == NULL) + return (-1); vars.Curdir[0] = 0; vars.Curdlen = DIR_INCR; /* @@ -145,7 +179,8 @@ */ nlen = strlen(nm); if ((vars.Curdlen - 2) < nlen) - incr_dspace(&vars, nlen + 2); + if (incr_dspace(state->std[2], &vars, nlen + 2) < 0) + return (-1); while (lstat(nm, &vars.Sb) < 0 && geterrno() == EINTR) ; @@ -155,10 +190,10 @@ state->level = 0; if (state->walkflags & WALK_PHYS) - statf = &lstat; + statf = lstat; if (state->walkflags & (WALK_ARGFOLLOW|WALK_ALLFOLLOW)) - statf = &stat; + statf = stat; nlen = walk(nm, statf, fn, state, (struct pdirs *)0); walkhome(state); @@ -187,24 +222,48 @@ otail = varp->Curdtail; state->base = otail; - state->flags = 0; if (varp->Curdtail == 0 || varp->Curdir[varp->Curdtail-1] == '/') { - p = strcatl(&varp->Curdir[varp->Curdtail], nm, 0); - varp->Curdtail = p - varp->Curdir; + if (varp->Curdtail == 0 && + (state->walkflags & WALK_STRIPLDOT) && + (nm[0] == '.' && nm[1] == '\0')) { + varp->Curdir[0] = '.'; + varp->Curdir[1] = '\0'; + } else { + p = strcatl(&varp->Curdir[varp->Curdtail], nm, + (char *)0); + varp->Curdtail = p - varp->Curdir; + } } else { - p = strcatl(&varp->Curdir[varp->Curdtail], "/", nm, 0); + p = strcatl(&varp->Curdir[varp->Curdtail], "/", nm, (char *)0); varp->Curdtail = p - varp->Curdir; state->base++; } if ((state->walkflags & WALK_NOSTAT) && - last != NULL && !last->p_stat && last->p_nlink <= 0) { + ( +#ifdef HAVE_DIRENT_D_TYPE + (state->flags & WALK_WF_NOTDIR) || +#endif + (last != NULL && !last->p_stat && last->p_nlink <= 0))) { + /* + * Set important fields to useful values to make sure that + * no wrong information is evaluated in the no stat(2) case. + */ + fs.st_mode = 0; + fs.st_ino = 0; + fs.st_dev = NODEV; + fs.st_nlink = 0; + fs.st_size = 0; + type = WALK_F; + state->flags = 0; + goto type_known; } else { while ((ret = (*sf)(nm, &fs)) < 0 && geterrno() == EINTR) ; } + state->flags = 0; if (ret >= 0) { #ifdef HAVE_ST_FSTYPE /* @@ -263,7 +322,7 @@ ret = 0; if ((state->walkflags & (WALK_PHYS|WALK_ALLFOLLOW)) == WALK_PHYS) - sf = &lstat; + sf = lstat; /* * Search parent dir structure for possible loops. @@ -347,9 +406,19 @@ name = &dp[1]; nlen = strlen(name); - if (Dspace < nlen) - Dspace += incr_dspace(varp, nlen + 2); - + if (Dspace < nlen) { + int incr = incr_dspace(state->std[2], + varp, nlen + 2); + if (incr < 0) { + ret = -1; + break; + } + Dspace += incr; + } +#ifdef HAVE_DIRENT_D_TYPE + if (dp[0] != FDT_DIR && dp[0] != FDT_UNKN) + state->flags |= WALK_WF_NOTDIR; +#endif state->level++; ret = walk(name, sf, fn, state, &thisd); state->level--; @@ -367,7 +436,7 @@ state->flags |= WALK_WF_NOHOME; if ((state->walkflags & WALK_NOMSG) == 0) { ferrmsg(state->std[2], - gettext( + _( "Cannot chdir to '..' from '%s/'.\n"), varp->Curdir); } @@ -379,8 +448,15 @@ if (ret < 0) /* Do not call callback */ goto out; /* func past fatal errors */ } - if ((state->walkflags & WALK_DEPTH) != 0) + if ((state->walkflags & WALK_DEPTH) != 0) { + if (varp->Curdtail == 0 && + (state->walkflags & WALK_STRIPLDOT) && + (nm[0] == '.' && nm[1] == '\0')) { + varp->Curdir[0] = '.'; + varp->Curdir[1] = '\0'; + } ret = (*fn)(varp->Curdir, &fs, type, state); + } } else { /* * Any other non-directory and non-symlink file type. @@ -394,22 +470,30 @@ } LOCAL int -incr_dspace(varp, amt) - int amt; +incr_dspace(f, varp, amt) + FILE *f; struct twvars *varp; + int amt; { int incr = DIR_INCR; + char *new; if (amt < 0) amt = 0; while (incr < amt) incr += DIR_INCR; - varp->Curdir = __realloc(varp->Curdir, varp->Curdlen + incr, - "path buffer"); + new = __fjrealloc(f, varp->Curdir, varp->Curdlen + incr, + "path buffer", JM_RETURN); + if (new == NULL) + return (-1); + varp->Curdir = new; varp->Curdlen += incr; return (incr); } +/* + * Call first to create a useful WALK state default. + */ EXPORT void walkinitstate(state) struct WALK *state; @@ -419,6 +503,7 @@ state->std[0] = stdin; state->std[1] = stdout; state->std[2] = stderr; + state->env = environ; state->quitfun = NULL; state->qfarg = NULL; state->maxdepth = state->mindepth = 0; @@ -427,23 +512,30 @@ state->auxp = NULL; } +/* + * For users that do not call treewalk(), e.g. star in extract mode. + */ EXPORT void * walkopen(state) struct WALK *state; { - struct twvars *varp = __malloc(sizeof (struct twvars), "walk vars"); + struct twvars *varp = __fjmalloc(state->std[2], + sizeof (struct twvars), "walk vars", + JM_RETURN); if (varp == NULL) return (NULL); varp->Curdir = NULL; varp->Curdlen = 0; varp->Curdtail = 0; + varp->Flags = TW_MALLOC; #ifdef HAVE_FCHDIR varp->Home = -1; #else varp->Home[0] = '\0'; #endif state->twprivate = varp; + varp->Walk = state; return ((void *)varp); } @@ -458,7 +550,7 @@ if (varp == NULL) { if ((state->walkflags & WALK_NOMSG) == 0) ferrmsg(state->std[2], - gettext("walkgethome: NULL twprivate\n")); + _("walkgethome: NULL twprivate\n")); if ((state->walkflags & WALK_NOEXIT) == 0) comexit(err); return (-1); @@ -466,18 +558,18 @@ #ifdef HAVE_FCHDIR if (varp->Home >= 0) close(varp->Home); - if ((varp->Home = open(".", O_RDONLY|O_NDELAY)) < 0) { + if ((varp->Home = open(".", O_SEARCH|O_NDELAY)) < 0) { err = geterrno(); state->flags |= WALK_WF_NOCWD; if ((state->walkflags & WALK_NOMSG) == 0) ferrmsg(state->std[2], - gettext("Cannot get working directory.\n")); + _("Cannot get working directory.\n")); if ((state->walkflags & WALK_NOEXIT) == 0) comexit(err); return (-1); } #ifdef F_SETFD - fcntl(varp->Home, F_SETFD, 1); + fcntl(varp->Home, F_SETFD, FD_CLOEXEC); #endif #else if (getcwd(varp->Home, sizeof (varp->Home)) == NULL) { @@ -485,7 +577,7 @@ state->flags |= WALK_WF_NOCWD; if ((state->walkflags & WALK_NOMSG) == 0) ferrmsg(state->std[2], - gettext("Cannot get working directory.\n")); + _("Cannot get working directory.\n")); if ((state->walkflags & WALK_NOEXIT) == 0) comexit(err); return (-1); @@ -528,6 +620,10 @@ #else varp->Home[0] = '\0'; #endif + if (varp->Flags & TW_MALLOC) { + free(varp); + state->twprivate = NULL; + } return (ret); } diff -Nru cdrtools-2.01.01a33/libfind/walk.h cdrtools-3.02a09/libfind/walk.h --- cdrtools-2.01.01a33/libfind/walk.h 2007-04-04 12:49:46.000000000 +0000 +++ cdrtools-3.02a09/libfind/walk.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,115 +0,0 @@ -/* @(#)walk.h 1.21 07/04/04 Copyright 2004-2007 J. Schilling */ -/* - * Definitions for directory tree walking - * - * Copyright (c) 2004-2007 J. Schilling - */ -/* - * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. - * - * See the file CDDL.Schily.txt in this distribution for details. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file CDDL.Schily.txt from this distribution. - */ - -#ifndef _WALK_H -#define _WALK_H - -#ifndef _SCHILY_STAT_H -#include -#endif - -#ifndef _INCL_STDIO_H -#include -#define _INCL_STDIO_H -#endif - -/* - * Flags to control treewalk() via 'walkflags'. - * - * WALK_CHDIR is not implemented, treewalk() always does chdir() - * - * WALK_PHYS Clearing WALK_PHYS has highest precedence and equals - * 'find -follow'. If WALK_PHYS is clear, always use stat. - * By default, WALK_PHYS should be set. - * - * WALK_ARGFOLLOW If WALK_ARGFOLLOW is set, symlinks that are used as - * the first argument for trewalk() are followed even - * if WALK_PHYS is set. Setting WALK_ARGFOLLOW equals - * 'find -H'. - * - * WALK_ALLFOLLOW If WALK_ALLFOLLOW is set, all symlinks are followed - * even if WALK_PHYS is set. Setting WALK_ALLFOLLOW - * equals 'find -L'. - */ -#define WALK_PHYS 1 /* Use lstat() instead of stat() */ -#define WALK_MOUNT 2 /* Do not cross mount points */ -#define WALK_DEPTH 4 /* Call content before calling the dir */ -#define WALK_CHDIR 8 /* Use chdir() to each directory */ -#define WALK_ARGFOLLOW 0x10 /* Use stat() for top level args only */ -#define WALK_ALLFOLLOW 0x20 /* Use stat() for all files */ -#define WALK_NOSTAT 0x40 /* Avoid to call stat() if st_nlink =>2 */ -#define WALK_NOEXIT 0x100 /* Do not exit() in case of hard errors */ -#define WALK_NOMSG 0x200 /* Do not write messages to stderr */ -#define WALK_LS_ATIME 0x1000 /* -ls lists atime instead of mtime */ -#define WALK_LS_CTIME 0x2000 /* -ls lists ctime instead of mtime */ - -/* - * The 'type' argument to walkfun. - */ -#define WALK_F 1 /* File */ -#define WALK_SL 2 /* Symbolic Link */ -#define WALK_D 3 /* Directory */ -#define WALK_DP 4 /* Directory previously visited */ -#define WALK_DNR 5 /* Directory with no read permission */ -#define WALK_NS 6 /* Unknown file type stat failed */ -#define WALK_SLN 7 /* Symbolic Link that points to nonexistent file */ - -#ifndef __sqfun_t_defined -typedef int (*sqfun_t) __PR((void *arg)); -#define __sqfun_t_defined -#endif - -struct WALK { - int flags; /* Flags for communication with (*walkfun)() */ - int base; /* Filename offset in path for (*walkfun)() */ - int level; /* The nesting level set up for (*walkfun)() */ - int walkflags; /* treewalk() control flags */ - void *twprivate; /* treewalk() private do not touch */ - FILE *std[3]; /* To redirect stdin/stdout/err in treewalk */ - sqfun_t quitfun; /* Function to query for shell signal quit */ - void *qfarg; /* Generic arg for shell builtin quit fun */ - int maxdepth; /* (*walkfun)() private, unused by treewalk */ - int mindepth; /* (*walkfun)() private, unused by treewalk */ - char *lname; /* (*walkfun)() private, unused by treewalk */ - void *tree; /* (*walkfun)() private, unused by treewalk */ - void *patstate; /* (*walkfun)() private, unused by treewalk */ - int err; /* (*walkfun)() private, unused by treewalk */ - int pflags; /* (*walkfun)() private, unused by treewalk */ - int auxi; /* (*walkfun)() private, unused by treewalk */ - void *auxp; /* (*walkfun)() private, unused by treewalk */ -}; - -/* - * Flags in struct WALK used to communicate with (*walkfun)() - */ -#define WALK_WF_PRUNE 1 /* (*walkfun)() -> walk(): abort waking tree */ -#define WALK_WF_QUIT 2 /* (*walkfun)() -> walk(): quit completely */ -#define WALK_WF_NOCHDIR 4 /* walk() -> (*walkfun)(): WALK_DNR is cannot chdir() */ -#define WALK_WF_NOCWD 8 /* walk() -> caller: cannot get working dir */ -#define WALK_WF_NOHOME 16 /* walk() -> caller: cannot chdir("..") */ - -typedef int (*walkfun) __PR((char *_nm, struct stat *_fs, int _type, struct WALK *_state)); - -extern int treewalk __PR((char *_nm, walkfun _fn, struct WALK *_state)); -extern void walkinitstate __PR((struct WALK *_state)); -extern void *walkopen __PR((struct WALK *_state)); -extern int walkgethome __PR((struct WALK *_state)); -extern int walkhome __PR((struct WALK *_state)); -extern int walkclose __PR((struct WALK *_state)); - -#endif /* _WALK_H */ diff -Nru cdrtools-2.01.01a33/libhfs_iso/block.c cdrtools-3.02a09/libhfs_iso/block.c --- cdrtools-2.01.01a33/libhfs_iso/block.c 2006-09-26 12:43:54.000000000 +0000 +++ cdrtools-3.02a09/libhfs_iso/block.c 2009-07-13 19:22:58.000000000 +0000 @@ -1,7 +1,8 @@ -/* @(#)block.c 1.5 06/09/26 joerg */ +/* @(#)block.c 1.8 09/07/13 joerg */ +#include #ifndef lint -static char sccsid[] = - "@(#)block.c 1.5 06/09/26 joerg"; +static UConst char sccsid[] = + "@(#)block.c 1.8 09/07/13 joerg"; #endif /* * hfsutils - tools for reading and writing Macintosh HFS volumes @@ -22,7 +23,6 @@ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -#include #include #include #include @@ -33,7 +33,7 @@ #include "low.h" #ifdef DEBUG -#include +#include #endif /* DEBUG */ /* diff -Nru cdrtools-2.01.01a33/libhfs_iso/btree.c cdrtools-3.02a09/libhfs_iso/btree.c --- cdrtools-2.01.01a33/libhfs_iso/btree.c 2006-09-26 12:43:54.000000000 +0000 +++ cdrtools-3.02a09/libhfs_iso/btree.c 2009-07-10 22:42:35.000000000 +0000 @@ -1,7 +1,8 @@ -/* @(#)btree.c 1.5 06/09/26 joerg */ +/* @(#)btree.c 1.7 09/07/11 joerg */ +#include #ifndef lint -static char sccsid[] = - "@(#)btree.c 1.5 06/09/26 joerg"; +static UConst char sccsid[] = + "@(#)btree.c 1.7 09/07/11 joerg"; #endif /* * hfsutils - tools for reading and writing Macintosh HFS volumes @@ -22,7 +23,6 @@ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -#include #include #include #include diff -Nru cdrtools-2.01.01a33/libhfs_iso/data.c cdrtools-3.02a09/libhfs_iso/data.c --- cdrtools-2.01.01a33/libhfs_iso/data.c 2006-09-13 14:10:52.000000000 +0000 +++ cdrtools-3.02a09/libhfs_iso/data.c 2013-04-30 05:11:35.000000000 +0000 @@ -1,7 +1,8 @@ -/* @(#)data.c 1.6 06/09/13 joerg */ +/* @(#)data.c 1.9 13/04/30 joerg */ +#include #ifndef lint -static char sccsid[] = - "@(#)data.c 1.6 06/09/13 joerg"; +static UConst char sccsid[] = + "@(#)data.c 1.9 13/04/30 joerg"; #endif /* * hfsutils - tools for reading and writing Macintosh HFS volumes @@ -22,7 +23,6 @@ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -#include #include #include @@ -334,12 +334,12 @@ unsigned long d_tomtime(secs) unsigned long secs; { - time_t utime = secs; + time_t uxtime = secs; if (tzdiff == TZNONE) calctzdiff(); - return utime + tzdiff + MUTDIFF; + return uxtime + tzdiff + MUTDIFF; } /* @@ -349,12 +349,12 @@ unsigned long d_toutime(secs) unsigned long secs; { - time_t utime = secs; + time_t uxtime = secs; if (tzdiff == TZNONE) calctzdiff(); - return utime - MUTDIFF - tzdiff; + return uxtime - MUTDIFF - tzdiff; } #ifdef APPLE_HYB @@ -365,12 +365,12 @@ unsigned long d_dtoutime(secs) long secs; { - time_t utime = secs; + time_t uxtime = secs; if (tzdiff == TZNONE) calctzdiff(); - return utime + DUTDIFF - tzdiff; + return uxtime + DUTDIFF - tzdiff; } #endif /* APPLE_HYB */ diff -Nru cdrtools-2.01.01a33/libhfs_iso/file.c cdrtools-3.02a09/libhfs_iso/file.c --- cdrtools-2.01.01a33/libhfs_iso/file.c 2006-09-26 12:43:54.000000000 +0000 +++ cdrtools-3.02a09/libhfs_iso/file.c 2017-09-20 21:31:57.000000000 +0000 @@ -1,11 +1,13 @@ -/* @(#)file.c 1.5 06/09/26 joerg */ +/* @(#)file.c 1.9 17/09/20 joerg */ +#include #ifndef lint -static char sccsid[] = - "@(#)file.c 1.5 06/09/26 joerg"; +static UConst char sccsid[] = + "@(#)file.c 1.9 17/09/20 joerg"; #endif /* * hfsutils - tools for reading and writing Macintosh HFS volumes * Copyright (C) 1996, 1997 Robert Leslie + * Copyright (C) 2001-2017 J. Schilling * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -22,7 +24,6 @@ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -#include #include #include @@ -34,8 +35,9 @@ #include "record.h" #include "volume.h" -/* #include */ - +#ifdef DEBUG +#include +#endif /* DEBUG */ /* * NAME: file->selectfork() @@ -138,7 +140,7 @@ if this happens, then a serious problem has occured, may be a hard linked file? */ #ifdef DEBUG - fprintf(stderr,"fragmented file: %s %d\n",file->name, i); */ + fprintf(stderr,"fragmented file: %s %d\n",file->name, i); #endif /* DEBUG */ ERROR(HCE_ERROR, "Possible Catalog file overflow - please report error"); return -1; diff -Nru cdrtools-2.01.01a33/libhfs_iso/gdata.c cdrtools-3.02a09/libhfs_iso/gdata.c --- cdrtools-2.01.01a33/libhfs_iso/gdata.c 2007-02-08 09:55:44.000000000 +0000 +++ cdrtools-3.02a09/libhfs_iso/gdata.c 2009-07-10 22:42:35.000000000 +0000 @@ -1,10 +1,10 @@ -/* @(#)gdata.c 1.3 07/02/08 Copyright 2001 J. Schilling */ +/* @(#)gdata.c 1.5 09/07/11 Copyright 2001-2009 J. Schilling */ +#include #ifndef lint -static char sccsid[] = - "@(#)gdata.c 1.3 07/02/08 Copyright 2001 J. Schilling"; +static UConst char sccsid[] = + "@(#)gdata.c 1.5 09/07/11 Copyright 2001-2009 J. Schilling"; #endif -#include #include "internal.h" char *hfs_error = "no error"; /* static error string */ diff -Nru cdrtools-2.01.01a33/libhfs_iso/hfs.c cdrtools-3.02a09/libhfs_iso/hfs.c --- cdrtools-2.01.01a33/libhfs_iso/hfs.c 2006-09-26 12:43:54.000000000 +0000 +++ cdrtools-3.02a09/libhfs_iso/hfs.c 2009-11-07 19:43:09.000000000 +0000 @@ -1,7 +1,8 @@ -/* @(#)hfs.c 1.11 06/09/26 joerg */ +/* @(#)hfs.c 1.15 09/11/07 joerg */ +#include #ifndef lint -static char sccsid[] = - "@(#)hfs.c 1.11 06/09/26 joerg"; +static UConst char sccsid[] = + "@(#)hfs.c 1.15 09/11/07 joerg"; #endif /* * hfsutils - tools for reading and writing Macintosh HFS volumes @@ -24,13 +25,12 @@ /* APPLE_HYB James Pearson j.pearson@ps.ucl.ac.uk 16/7/97 */ -#include #include #include #include #include #include -#include +#include #include #include "internal.h" @@ -405,7 +405,7 @@ { while (hfs_mounts) #ifdef APPLE_HYB - continue; + hfs_umount(hfs_mounts, 0L, 0L); #else hfs_umount(hfs_mounts); #endif /* APPLE_HYB */ @@ -911,7 +911,7 @@ /* write boot blocks */ - memset(&b, 0, sizeof(b)); + memset(b, 0, sizeof(b)); b_writelb(&vol, 0, &b); b_writelb(&vol, 1, &b); diff -Nru cdrtools-2.01.01a33/libhfs_iso/hfs.h cdrtools-3.02a09/libhfs_iso/hfs.h --- cdrtools-2.01.01a33/libhfs_iso/hfs.h 2006-09-13 14:04:15.000000000 +0000 +++ cdrtools-3.02a09/libhfs_iso/hfs.h 2013-04-28 14:24:49.000000000 +0000 @@ -1,4 +1,4 @@ -/* @(#)hfs.h 1.5 06/09/13 joerg */ +/* @(#)hfs.h 1.6 13/04/28 joerg */ /* * hfsutils - tools for reading and writing Macintosh HFS volumes * Copyright (C) 1996, 1997 Robert Leslie @@ -20,6 +20,7 @@ #include #include +#include /* Define missing prototypes */ #ifdef APPLE_HYB #include "hybrid.h" diff -Nru cdrtools-2.01.01a33/libhfs_iso/libhfs-mapvers cdrtools-3.02a09/libhfs_iso/libhfs-mapvers --- cdrtools-2.01.01a33/libhfs_iso/libhfs-mapvers 2005-06-12 20:07:46.000000000 +0000 +++ cdrtools-3.02a09/libhfs_iso/libhfs-mapvers 2010-10-02 20:01:14.000000000 +0000 @@ -1,3 +1,5 @@ +# /* @(#)libhfs-mapvers 1.1 10/10/02 Copyright 2005-2010 J. Schilling */ + SCHILY_1.0 { global: d_dtoutime; @@ -60,4 +62,4 @@ local: *; -}; \ No newline at end of file +}; diff -Nru cdrtools-2.01.01a33/libhfs_iso/libhfs_p.mk cdrtools-3.02a09/libhfs_iso/libhfs_p.mk --- cdrtools-2.01.01a33/libhfs_iso/libhfs_p.mk 2007-06-30 11:13:33.000000000 +0000 +++ cdrtools-3.02a09/libhfs_iso/libhfs_p.mk 2008-01-11 17:24:14.000000000 +0000 @@ -1,4 +1,4 @@ -#ident @(#)libhfs_p.mk 1.2 07/06/30 +#ident @(#)libhfs_p.mk 1.3 08/01/11 ########################################################################### # Sample makefile for non-shared libraries ########################################################################### @@ -8,6 +8,7 @@ ########################################################################### SUBARCHDIR= /profiled +SUBINSDIR= /profiled INSDIR= lib TARGETLIB= hfs CPPOPTS += -DAPPLE_HYB diff -Nru cdrtools-2.01.01a33/libhfs_iso/low.c cdrtools-3.02a09/libhfs_iso/low.c --- cdrtools-2.01.01a33/libhfs_iso/low.c 2006-09-26 12:43:54.000000000 +0000 +++ cdrtools-3.02a09/libhfs_iso/low.c 2009-10-17 18:45:14.000000000 +0000 @@ -1,7 +1,8 @@ -/* @(#)low.c 1.6 06/09/26 joerg */ +/* @(#)low.c 1.10 09/10/17 joerg */ +#include #ifndef lint -static char sccsid[] = - "@(#)low.c 1.6 06/09/26 joerg"; +static UConst char sccsid[] = + "@(#)low.c 1.10 09/10/17 joerg"; #endif /* * hfsutils - tools for reading and writing Macintosh HFS volumes @@ -22,7 +23,6 @@ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -#include #include #include #include @@ -380,7 +380,7 @@ hfsfile *cat = &vol->cat.f; int i; - memset(&b, 0, sizeof(b)); + memset(b, 0, sizeof(b)); mdb->drXTFlSize = ext->cat.u.fil.filPyLen; mdb->drXTClpSiz = ext->clump; @@ -454,7 +454,7 @@ { #ifdef APPLE_HYB /* "write" alternative MDB to memory copy */ - memcpy(vol->hce->hfs_alt_mdb, &b, sizeof(b)); + memcpy(vol->hce->hfs_alt_mdb, b, sizeof(b)); #else if (b_writelb(vol, vol->vlen - 2, &b) < 0) return -1; @@ -474,6 +474,7 @@ { int vbmst = vol->mdb.drVBMSt; int vbmsz = (vol->mdb.drNmAlBlks + 4095) / (unsigned)4096; + int s2 = (vol->vlen / vol->lpa + 4095) / 4096; block *bp; if ((int)(vol->mdb.drAlBlSt - vbmst) < vbmsz) @@ -482,6 +483,8 @@ return -1; } + if (s2 > vbmsz) + vbmsz = s2; bp = ALLOC(block, vbmsz); if (bp == 0) { diff -Nru cdrtools-2.01.01a33/libhfs_iso/node.c cdrtools-3.02a09/libhfs_iso/node.c --- cdrtools-2.01.01a33/libhfs_iso/node.c 2006-09-26 12:43:54.000000000 +0000 +++ cdrtools-3.02a09/libhfs_iso/node.c 2009-07-10 22:42:35.000000000 +0000 @@ -1,7 +1,8 @@ -/* @(#)node.c 1.4 06/09/26 joerg */ +/* @(#)node.c 1.6 09/07/11 joerg */ +#include #ifndef lint -static char sccsid[] = - "@(#)node.c 1.4 06/09/26 joerg"; +static UConst char sccsid[] = + "@(#)node.c 1.6 09/07/11 joerg"; #endif /* * hfsutils - tools for reading and writing Macintosh HFS volumes @@ -22,7 +23,6 @@ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -#include #include #include #include diff -Nru cdrtools-2.01.01a33/libhfs_iso/record.c cdrtools-3.02a09/libhfs_iso/record.c --- cdrtools-2.01.01a33/libhfs_iso/record.c 2006-09-26 12:43:54.000000000 +0000 +++ cdrtools-3.02a09/libhfs_iso/record.c 2009-07-10 22:42:35.000000000 +0000 @@ -1,7 +1,8 @@ -/* @(#)record.c 1.3 06/09/26 joerg */ +/* @(#)record.c 1.5 09/07/11 joerg */ +#include #ifndef lint -static char sccsid[] = - "@(#)record.c 1.3 06/09/26 joerg"; +static UConst char sccsid[] = + "@(#)record.c 1.5 09/07/11 joerg"; #endif /* * hfsutils - tools for reading and writing Macintosh HFS volumes @@ -22,7 +23,6 @@ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -#include #include #include #include diff -Nru cdrtools-2.01.01a33/libhfs_iso/volume.c cdrtools-3.02a09/libhfs_iso/volume.c --- cdrtools-2.01.01a33/libhfs_iso/volume.c 2006-09-26 12:43:54.000000000 +0000 +++ cdrtools-3.02a09/libhfs_iso/volume.c 2009-07-10 22:42:35.000000000 +0000 @@ -1,7 +1,8 @@ -/* @(#)volume.c 1.6 06/09/26 joerg */ +/* @(#)volume.c 1.9 09/07/11 joerg */ +#include #ifndef lint -static char sccsid[] = - "@(#)volume.c 1.6 06/09/26 joerg"; +static UConst char sccsid[] = + "@(#)volume.c 1.9 09/07/11 joerg"; #endif /* * hfsutils - tools for reading and writing Macintosh HFS volumes @@ -22,7 +23,6 @@ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -#include #include #include #include @@ -105,12 +105,12 @@ /* in case bt_search() clobbers these */ - memcpy(&extsave, &file->ext, sizeof(ExtDataRec)); + memcpy(extsave, &file->ext, sizeof(ExtDataRec)); fabnsave = file->fabn; found = bt_search(&file->vol->ext, pkey, np); - memcpy(&file->ext, &extsave, sizeof(ExtDataRec)); + memcpy(file->ext, extsave, sizeof(ExtDataRec)); file->fabn = fabnsave; if (found <= 0) diff -Nru cdrtools-2.01.01a33/libmdigest/byte_order.c cdrtools-3.02a09/libmdigest/byte_order.c --- cdrtools-2.01.01a33/libmdigest/byte_order.c 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/libmdigest/byte_order.c 2015-11-22 12:16:12.000000000 +0000 @@ -0,0 +1,190 @@ +/* @(#)byte_order.c 1.4 15/11/22 2015 J. Schilling */ +#include +#ifndef lint +static UConst char sccsid[] = + "@(#)byte_order.c 1.4 15/11/22 2015 J. Schilling"; +#endif +/* + * SHA3 hash code taken from + * https://github.com/rhash/RHash/tree/master/librhash + * + * Portions Copyright (c) 2015 J. Schilling + */ + +/* + * byte_order.c - byte order related platform dependent routines, + * + * Copyright: 2008-2012 Aleksey Kravchenko + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY + * or FITNESS FOR A PARTICULAR PURPOSE. Use this program at your own risk! + */ +#include "byte_order.h" + +#ifdef HAVE_LONGLONG + +#if !(__GNUC__ >= 4 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)) /* if !GCC or GCC < 4.3 */ + +#if _MSC_VER >= 1300 && (_M_IX86 || _M_AMD64 || _M_IA64) /* if MSVC++ >= 2002 on x86/x64 */ +#include +#pragma intrinsic(_BitScanForward) + +/* + * Returns index of the trailing bit of x. + * + * @param x the number to process + * @return zero-based index of the trailing bit + */ +unsigned +rhash_ctz(unsigned x) +{ + unsigned long index; + unsigned char isNonzero = _BitScanForward(&index, x); /* MSVC intrinsic */ + return (isNonzero ? (unsigned)index : 0); +} +#else /* _MSC_VER >= 1300... */ + +/* + * Returns index of the trailing bit of a 32-bit number. + * This is a plain C equivalent for GCC __builtin_ctz() bit scan. + * + * @param x the number to process + * @return zero-based index of the trailing bit + */ +unsigned +rhash_ctz(x) + unsigned x; +{ + /* array for conversion to bit position */ + static unsigned char bit_pos[32] = { + 0, 1, 28, 2, 29, 14, 24, 3, 30, 22, 20, 15, 25, 17, 4, 8, + 31, 27, 13, 23, 21, 19, 16, 7, 26, 12, 18, 6, 11, 5, 10, 9 + }; + + /* + * The De Bruijn bit-scan was devised in 1997, according to Donald Knuth + * by Martin Lauter. The constant 0x077CB531UL is a De Bruijn sequence, + * which produces a unique pattern of bits into the high 5 bits for each + * possible bit position that it is multiplied against. + * See http://graphics.stanford.edu/~seander/bithacks.html + * and http://chessprogramming.wikispaces.com/BitScan + */ + return ((unsigned)bit_pos[((UInt32_t)((x & -x) * (unsigned)0x077CB531)) >> 27]); +} +#endif /* _MSC_VER >= 1300... */ +#endif /* !(GCC >= 4.3) */ + +/* + * Copy a memory block with simultaneous exchanging byte order. + * The byte order is changed from little-endian 32-bit integers + * to big-endian (or vice-versa). + * + * @param to the pointer where to copy memory block + * @param index the index to start writing from + * @param from the source block to copy + * @param length length of the memory block + */ +void +rhash_swap_copy_str_to_u32(to, idx, from, length) + void *to; + int idx; + const void *from; + size_t length; +{ + /* if all pointers and length are 32-bits aligned */ + if (0 == (((int)((char *)to - (char *)0) | ((char *)from - (char *)0) | idx | length) & 3)) { + /* copy memory as 32-bit words */ + const UInt32_t *src = (const UInt32_t *)from; + const UInt32_t *end = (const UInt32_t *)((const char *)src + length); + UInt32_t *dst = (UInt32_t *)((char *)to + idx); + while (src < end) *(dst++) = bswap_32(*(src++)); + } else { + const char *src = (const char *)from; + for (length += idx; (size_t)idx < length; idx++) ((char *)to)[idx ^ 3] = *(src++); + } +} + +/* + * Copy a memory block with changed byte order. + * The byte order is changed from little-endian 64-bit integers + * to big-endian (or vice-versa). + * + * @param to the pointer where to copy memory block + * @param index the index to start writing from + * @param from the source block to copy + * @param length length of the memory block + */ +void +rhash_swap_copy_str_to_u64(to, idx, from, length) + void *to; + int idx; + const void *from; + size_t length; +{ + /* if all pointers and length are 64-bits aligned */ + if (0 == (((int)((char *)to - (char *)0) | ((char *)from - (char *)0) | idx | length) & 7)) { + /* copy aligned memory block as 64-bit integers */ + const UInt64_t *src = (const UInt64_t *)from; + const UInt64_t *end = (const UInt64_t *)((const char *)src + length); + UInt64_t *dst = (UInt64_t *)((char *)to + idx); + while (src < end) *(dst++) = bswap_64(*(src++)); + } else { + const char *src = (const char *)from; + for (length += idx; (size_t)idx < length; idx++) ((char *)to)[idx ^ 7] = *(src++); + } +} + +/* + * Copy data from a sequence of 64-bit words to a binary string of given length, + * while changing byte order. + * + * @param to the binary string to receive data + * @param from the source sequence of 64-bit words + * @param length the size in bytes of the data being copied + */ +void +rhash_swap_copy_u64_to_str(to, from, length) + void *to; + const void *from; + size_t length; +{ + /* if all pointers and length are 64-bits aligned */ + if (0 == (((int)((char *)to - (char *)0) | ((char *)from - (char *)0) | length) & 7)) { + /* copy aligned memory block as 64-bit integers */ + const UInt64_t *src = (const UInt64_t *)from; + const UInt64_t *end = (const UInt64_t *)((const char *)src + length); + UInt64_t *dst = (UInt64_t *)to; + while (src < end) *(dst++) = bswap_64(*(src++)); + } else { + size_t idx; + char *dst = (char *)to; + for (idx = 0; idx < length; idx++) *(dst++) = ((char *)from)[idx ^ 7]; + } +} + +/* + * Exchange byte order in the given array of 32-bit integers. + * + * @param arr the array to process + * @param length array length + */ +void +rhash_u32_mem_swap(arr, length) + unsigned *arr; + int length; +{ + unsigned *end = arr + length; + for (; arr < end; arr++) { + *arr = bswap_32(*arr); + } +} + +#endif /* HAVE_LONGLONG */ diff -Nru cdrtools-2.01.01a33/libmdigest/byte_order.h cdrtools-3.02a09/libmdigest/byte_order.h --- cdrtools-2.01.01a33/libmdigest/byte_order.h 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/libmdigest/byte_order.h 2015-11-22 12:06:07.000000000 +0000 @@ -0,0 +1,212 @@ +/* @(#)byte_order.h 1.3 15/11/22 2015 J. Schilling */ +/* byte_order.h */ +/* + * SHA3 hash code taken from + * https://github.com/rhash/RHash/tree/master/librhash + * + * Portions Copyright (c) 2015 J. Schilling + */ +#ifndef BYTE_ORDER_H +#define BYTE_ORDER_H +#include +#include +#include + +#ifdef IN_RHASH +#include "config.h" +#endif + +#ifdef __GLIBC__ +# include +#endif + +#ifdef __cplusplus +extern "C" { +#endif + +#ifdef HAVE_C_BIGENDIAN + +/* + * Use the Schily autoconf results. + */ +#ifdef WORDS_BIGENDIAN +#define CPU_BIG_ENDIAN +#else +#define CPU_LITTLE_ENDIAN +#endif + +#else /* HAVE_C_BIGENDIAN */ + +/* if x86 compatible cpu */ +#if defined(i386) || defined(__i386__) || defined(__i486__) || \ + defined(__i586__) || defined(__i686__) || defined(__pentium__) || \ + defined(__pentiumpro__) || defined(__pentium4__) || \ + defined(__nocona__) || defined(prescott) || defined(__core2__) || \ + defined(__k6__) || defined(__k8__) || defined(__athlon__) || \ + defined(__amd64) || defined(__amd64__) || \ + defined(__x86_64) || defined(__x86_64__) || defined(_M_IX86) || \ + defined(_M_AMD64) || defined(_M_IA64) || defined(_M_X64) +/* detect if x86-64 instruction set is supported */ +# if defined(_LP64) || defined(__LP64__) || defined(__x86_64) || \ + defined(__x86_64__) || defined(_M_AMD64) || defined(_M_X64) +#define CPU_X64 +#else +#define CPU_IA32 +#endif +#endif + + +/* detect CPU endianness */ +#if (defined(__BYTE_ORDER) && defined(__LITTLE_ENDIAN) && \ + __BYTE_ORDER == __LITTLE_ENDIAN) || \ + defined(CPU_IA32) || defined(CPU_X64) || \ + defined(__ia64) || defined(__ia64__) || defined(__alpha__) || defined(_M_ALPHA) || \ + defined(vax) || defined(MIPSEL) || defined(_ARM_) +#define CPU_LITTLE_ENDIAN +#define IS_BIG_ENDIAN 0 +#define IS_LITTLE_ENDIAN 1 +#elif (defined(__BYTE_ORDER) && defined(__BIG_ENDIAN) && \ + __BYTE_ORDER == __BIG_ENDIAN) || \ + defined(__sparc) || defined(__sparc__) || defined(sparc) || \ + defined(_ARCH_PPC) || defined(_ARCH_PPC64) || defined(_POWER) || \ + defined(__POWERPC__) || defined(POWERPC) || defined(__powerpc) || \ + defined(__powerpc__) || defined(__powerpc64__) || defined(__ppc__) || \ + defined(__hpux) || defined(_MIPSEB) || defined(mc68000) || \ + defined(__s390__) || defined(__s390x__) || defined(sel) +#define CPU_BIG_ENDIAN +#define IS_BIG_ENDIAN 1 +#define IS_LITTLE_ENDIAN 0 +#else + error "Can't detect CPU architechture" +#endif + +#endif /* HAVE_C_BIGENDIAN */ + +#define IS_ALIGNED_32(p) (0 == (3 & ((const char *)(p) - (const char *)0))) +#define IS_ALIGNED_64(p) (0 == (7 & ((const char *)(p) - (const char *)0))) + +#if defined(_MSC_VER) +#define ALIGN_ATTR(n) __declspec(align(n)) +#elif defined(__GNUC__) +#define ALIGN_ATTR(n) __attribute__((aligned(n))) +#else +#define ALIGN_ATTR(n) /* nothing */ +#endif + + +#ifdef PROTOTYPES +#if defined(_MSC_VER) || defined(__BORLANDC__) +#define I64(x) x##ui64 +#define UI64(x) x##ui64 +#else +#define I64(x) x##LL +#define UI64(x) x##ULL +#endif +#else /* !PROTOTYPES */ +#ifdef __hpux +#define I64(x) x/**/LL +#define UI64(x) x/**/ULL +#else +#define I64(x) ((long long)(x)) +#define UI64(x) ((unsigned long long)(x)) +#endif +#endif /* !PROTOTYPES */ + +/* convert a hash flag to index */ +#if __GNUC__ >= 4 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4) /* GCC < 3.4 */ +#define rhash_ctz(x) __builtin_ctz(x) +#else +unsigned rhash_ctz __PR((unsigned)); /* define as function */ +#endif + +void rhash_swap_copy_str_to_u32 __PR((void* to, int idx, const void* from, size_t length)); +void rhash_swap_copy_str_to_u64 __PR((void* to, int idx, const void* from, size_t length)); +void rhash_swap_copy_u64_to_str __PR((void* to, const void* from, size_t length)); +void rhash_u32_mem_swap __PR((unsigned *p, int length_in_u32)); + +/* define bswap_32 */ +#if defined(__GNUC__) && defined(CPU_IA32) && !defined(__i386__) +/* for intel x86 CPU */ +static inline UInt32_t bswap_32(UInt32_t x) { + __asm("bswap\t%0" : "=r" (x) : "0" (x)); + return (x); +} +#elif defined(__GNUC__) && (__GNUC__ >= 4) && (__GNUC__ > 4 || __GNUC_MINOR__ >= 3) +/* for GCC >= 4.3 */ +# define bswap_32(x) __builtin_bswap32(x) +#elif (_MSC_VER > 1300) && (defined(CPU_IA32) || defined(CPU_X64)) /* MS VC */ +# define bswap_32(x) _byteswap_ulong((unsigned long)x) +#elif !defined(__STRICT_ANSI__) +/* general bswap_32 definition */ +static inline UInt32_t bswap_32 __PR((UInt32_t x)); +static inline UInt32_t bswap_32(x) + UInt32_t x; +{ + x = ((x << 8) & 0xFF00FF00) | ((x >> 8) & 0x00FF00FF); + return ((x >> 16) | (x << 16)); +} +#else +#define bswap_32(x) ((((x) & 0xff000000) >> 24) | (((x) & 0x00ff0000) >> 8) | \ + (((x) & 0x0000ff00) << 8) | (((x) & 0x000000ff) << 24)) +#endif /* bswap_32 */ + +#if defined(__GNUC__) && (__GNUC__ >= 4) && (__GNUC__ > 4 || __GNUC_MINOR__ >= 3) +# define bswap_64(x) __builtin_bswap64(x) +#elif (_MSC_VER > 1300) && (defined(CPU_IA32) || defined(CPU_X64)) /* MS VC */ +# define bswap_64(x) _byteswap_uint64((__int64)x) +#elif !defined(__STRICT_ANSI__) +static inline UInt64_t bswap_64 __PR((UInt64_t x)); +static inline UInt64_t bswap_64(x) + UInt64_t x; +{ + union { + UInt64_t ll; + UInt32_t l[2]; + } w, r; + w.ll = x; + r.l[0] = bswap_32(w.l[1]); + r.l[1] = bswap_32(w.l[0]); + return (r.ll); +} +#else + error "bswap_64 unsupported" +#endif + +#ifdef CPU_BIG_ENDIAN +# define be2me_32(x) (x) +# define be2me_64(x) (x) +# define le2me_32(x) bswap_32(x) +# define le2me_64(x) bswap_64(x) + +# define be32_copy(to, index, from, length) memcpy((to) + (index), (from), (length)) +# define le32_copy(to, index, from, length) rhash_swap_copy_str_to_u32((to), (index), (from), (length)) +# define be64_copy(to, index, from, length) memcpy((to) + (index), (from), (length)) +# define le64_copy(to, index, from, length) rhash_swap_copy_str_to_u64((to), (index), (from), (length)) +# define me64_to_be_str(to, from, length) memcpy((to), (from), (length)) +# define me64_to_le_str(to, from, length) rhash_swap_copy_u64_to_str((to), (from), (length)) + +#else /* CPU_BIG_ENDIAN */ +# define be2me_32(x) bswap_32(x) +# define be2me_64(x) bswap_64(x) +# define le2me_32(x) (x) +# define le2me_64(x) (x) + +# define be32_copy(to, index, from, length) rhash_swap_copy_str_to_u32((to), (index), (from), (length)) +# define le32_copy(to, index, from, length) memcpy((to) + (index), (from), (length)) +# define be64_copy(to, index, from, length) rhash_swap_copy_str_to_u64((to), (index), (from), (length)) +# define le64_copy(to, index, from, length) memcpy((to) + (index), (from), (length)) +# define me64_to_be_str(to, from, length) rhash_swap_copy_u64_to_str((to), (from), (length)) +# define me64_to_le_str(to, from, length) memcpy((to), (from), (length)) +#endif /* CPU_BIG_ENDIAN */ + +/* ROTL/ROTR macros rotate a 32/64-bit word left/right by n bits */ +#define ROTL32(dword, n) ((dword) << (n) ^ ((dword) >> (32 - (n)))) +#define ROTR32(dword, n) ((dword) >> (n) ^ ((dword) << (32 - (n)))) +#define ROTL64(qword, n) ((qword) << (n) ^ ((qword) >> (64 - (n)))) +#define ROTR64(qword, n) ((qword) >> (n) ^ ((qword) << (64 - (n)))) + +#ifdef __cplusplus +} /* extern "C" */ +#endif /* __cplusplus */ + +#endif /* BYTE_ORDER_H */ diff -Nru cdrtools-2.01.01a33/libmdigest/libmdigest-mapvers cdrtools-3.02a09/libmdigest/libmdigest-mapvers --- cdrtools-2.01.01a33/libmdigest/libmdigest-mapvers 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/libmdigest/libmdigest-mapvers 2015-12-27 15:52:04.000000000 +0000 @@ -0,0 +1,66 @@ +# /* %Z%%M% %I% %E% Copyright 2009-2010 J. Schilling */ + +SCHILY_1.1 { +global: + SHA3_224_Init; + SHA3_256_Init; + SHA3_384_Init; + SHA3_512_Init; + SHA3_Update; + SHA3_Final; +} SCHILY_1.0; + +SCHILY_1.0 { +global: + MD4Final; + MD4Init; + MD4Pad; + MD4Transform; + MD4Update; + + MD5Final; + MD5Init; + MD5Pad; + MD5Transform; + MD5Update; + +#ifdef __never__ + MD5End; + MD5File; + MD5FileChunk; + MD5Data; +#endif + + RMD160Final; + RMD160Init; + RMD160Pad; + RMD160Transform; + RMD160Update; + + SHA1Final; + SHA1Init; + SHA1Pad; + SHA1Transform; + SHA1Update; + + SHA256Final; + SHA256Init; + SHA256Pad; + SHA256Transform; + SHA256Update; + + SHA384Final; + SHA384Init; + SHA384Pad; + SHA384Transform; + SHA384Update; + + SHA512Final; + SHA512Init; + SHA512Pad; + SHA512Transform; + SHA512Update; + +local: + *; +}; diff -Nru cdrtools-2.01.01a33/libmdigest/Makefile cdrtools-3.02a09/libmdigest/Makefile --- cdrtools-2.01.01a33/libmdigest/Makefile 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/libmdigest/Makefile 2009-08-01 10:59:14.000000000 +0000 @@ -0,0 +1,12 @@ +#ident "@(#)Makefile 1.3 09/08/01 " +########################################################################### +SRCROOT= .. +RULESDIR= RULES +include $(SRCROOT)/$(RULESDIR)/rules.top +########################################################################### + +MK_FILES= mdigest.mk mdigest_p.mk $(NO_SHL)shlmdigest.mk + +########################################################################### +include $(SRCROOT)/$(RULESDIR)/rules.mks +########################################################################### diff -Nru cdrtools-2.01.01a33/libmdigest/md4.c cdrtools-3.02a09/libmdigest/md4.c --- cdrtools-2.01.01a33/libmdigest/md4.c 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/libmdigest/md4.c 2009-07-11 10:23:14.000000000 +0000 @@ -0,0 +1,264 @@ +/* @(#)md4.c 1.3 09/07/11 2009 J. Schilling */ +#include +#ifndef lint +static UConst char sccsid[] = + "@(#)md4.c 1.3 09/07/11 2009 J. Schilling"; +#endif +/* + * MD5 hash code taken from OpenBSD + * + * Portions Copyright (c) 2009 J. Schilling + */ +/* $OpenBSD: md4.c,v 1.7 2005/08/08 08:05:35 espie Exp $ */ + +/* + * This code implements the MD4 message-digest algorithm. + * The algorithm is due to Ron Rivest. This code was + * written by Colin Plumb in 1993, no copyright is claimed. + * This code is in the public domain; do with it what you wish. + * Todd C. Miller modified the MD5 code to do MD4 based on RFC 1186. + * + * Equivalent code is available from RSA Data Security, Inc. + * This code has been tested against that, and is equivalent, + * except that you don't need to include two pages of legalese + * with every copy. + * + * To compute the message digest of a chunk of bytes, declare an + * MD4Context structure, pass it to MD4Init, call MD4Update as + * needed on buffers full of bytes, and then call MD4Final, which + * will fill a supplied 16-byte array with the digest. + */ + +#include +#include +#include + +#if !defined(HAVE_MEMCPY) || !defined(HAVE_MEMSET) +#include +#endif +#if !defined(HAVE_MEMCPY) && !defined(memcpy) +#define memcpy(s1, s2, n) movebytes(s2, s1, n) +#endif +#if !defined(HAVE_MEMSET) && !defined(memset) +#define memset(s, c, n) fillbytes(s, n, c) +#endif + + +#define PUT_64BIT_LE(cp, value) do { \ + (cp)[7] = (value)[1] >> 24; \ + (cp)[6] = (value)[1] >> 16; \ + (cp)[5] = (value)[1] >> 8; \ + (cp)[4] = (value)[1]; \ + (cp)[3] = (value)[0] >> 24; \ + (cp)[2] = (value)[0] >> 16; \ + (cp)[1] = (value)[0] >> 8; \ + (cp)[0] = (value)[0]; } while (0) + +#define PUT_32BIT_LE(cp, value) do { \ + (cp)[3] = (value) >> 24; \ + (cp)[2] = (value) >> 16; \ + (cp)[1] = (value) >> 8; \ + (cp)[0] = (value); } while (0) + +static UInt8_t PADDING[MD4_BLOCK_LENGTH] = { + 0x80, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 +}; + +/* + * Start MD4 accumulation. + * Set bit count to 0 and buffer to mysterious initialization constants. + */ +void +MD4Init(ctx) + MD4_CTX *ctx; +{ + ctx->count[0] = ctx->count[1] = 0; + ctx->state[0] = 0x67452301; + ctx->state[1] = 0xefcdab89; + ctx->state[2] = 0x98badcfe; + ctx->state[3] = 0x10325476; +} + +/* + * Update context to reflect the concatenation of another buffer full + * of bytes. + */ +void +MD4Update(ctx, inputv, len) + MD4_CTX *ctx; + const void *inputv; + size_t len; +{ + const unsigned char *input = inputv; + size_t have, need; + + /* Check how many bytes we already have and how many more we need. */ + have = (size_t)((ctx->count[0] >> 3) & (MD4_BLOCK_LENGTH - 1)); + need = MD4_BLOCK_LENGTH - have; + + /* Update bitcount */ + if ((ctx->count[0] += (UInt32_t)len << 3) < ((UInt32_t)len << 3)) + ctx->count[1] += 1; + + if (len >= need) { + if (have != 0) { + memcpy(ctx->buffer + have, input, need); + MD4Transform(ctx->state, ctx->buffer); + input += need; + len -= need; + have = 0; + } + + /* Process data in MD4_BLOCK_LENGTH-byte chunks. */ + while (len >= MD4_BLOCK_LENGTH) { + MD4Transform(ctx->state, input); + input += MD4_BLOCK_LENGTH; + len -= MD4_BLOCK_LENGTH; + } + } + + /* Handle any remaining bytes of data. */ + if (len != 0) + memcpy(ctx->buffer + have, input, len); +} + +/* + * Pad pad to 64-byte boundary with the bit pattern + * 1 0* (64-bit count of bits processed, MSB-first) + */ +void +MD4Pad(ctx) + MD4_CTX *ctx; +{ + UInt8_t count[8]; + size_t padlen; + + /* Convert count to 8 bytes in little endian order. */ + PUT_64BIT_LE(count, ctx->count); + + /* Pad out to 56 mod 64. */ + padlen = MD4_BLOCK_LENGTH - + ((ctx->count[0] >> 3) & (MD4_BLOCK_LENGTH - 1)); + if (padlen < 1 + 8) + padlen += MD4_BLOCK_LENGTH; + MD4Update(ctx, PADDING, padlen - 8); /* padlen - 8 <= 64 */ + MD4Update(ctx, count, 8); +} + +/* + * Final wrapup--call MD4Pad, fill in digest and zero out ctx. + */ +void +MD4Final(digest, ctx) + unsigned char digest[MD4_DIGEST_LENGTH]; + MD4_CTX *ctx; +{ + int i; + + MD4Pad(ctx); + if (digest != NULL) { + for (i = 0; i < 4; i++) + PUT_32BIT_LE(digest + i * 4, ctx->state[i]); + memset(ctx, 0, sizeof (*ctx)); + } +} + + +/* The three core functions - F1 is optimized somewhat */ + +/* #define F1(x, y, z) (x & y | ~x & z) */ +#define F1(x, y, z) (z ^ (x & (y ^ z))) +#define F2(x, y, z) ((x & y) | (x & z) | (y & z)) +#define F3(x, y, z) (x ^ y ^ z) + +/* This is the central step in the MD4 algorithm. */ +#define MD4STEP(f, w, x, y, z, data, s) \ + (w += f(x, y, z) + data, w = w<>(32-s)) + +/* + * The core of the MD4 algorithm, this alters an existing MD4 hash to + * reflect the addition of 16 longwords of new data. MD4Update blocks + * the data and converts bytes into longwords for this routine. + */ +void +MD4Transform(state, block) + UInt32_t state[4]; + const UInt8_t block[MD4_BLOCK_LENGTH]; +{ + UInt32_t a, b, c, d, in[MD4_BLOCK_LENGTH / 4]; + +#ifndef WORDS_BIGENDIAN + memcpy(in, block, sizeof (in)); +#else + for (a = 0; a < MD4_BLOCK_LENGTH / 4; a++) { + in[a] = (UInt32_t)( + (UInt32_t)(block[a * 4 + 0]) | + (UInt32_t)(block[a * 4 + 1]) << 8 | + (UInt32_t)(block[a * 4 + 2]) << 16 | + (UInt32_t)(block[a * 4 + 3]) << 24); + } +#endif + + a = state[0]; + b = state[1]; + c = state[2]; + d = state[3]; + + MD4STEP(F1, a, b, c, d, in[ 0], 3); + MD4STEP(F1, d, a, b, c, in[ 1], 7); + MD4STEP(F1, c, d, a, b, in[ 2], 11); + MD4STEP(F1, b, c, d, a, in[ 3], 19); + MD4STEP(F1, a, b, c, d, in[ 4], 3); + MD4STEP(F1, d, a, b, c, in[ 5], 7); + MD4STEP(F1, c, d, a, b, in[ 6], 11); + MD4STEP(F1, b, c, d, a, in[ 7], 19); + MD4STEP(F1, a, b, c, d, in[ 8], 3); + MD4STEP(F1, d, a, b, c, in[ 9], 7); + MD4STEP(F1, c, d, a, b, in[10], 11); + MD4STEP(F1, b, c, d, a, in[11], 19); + MD4STEP(F1, a, b, c, d, in[12], 3); + MD4STEP(F1, d, a, b, c, in[13], 7); + MD4STEP(F1, c, d, a, b, in[14], 11); + MD4STEP(F1, b, c, d, a, in[15], 19); + + MD4STEP(F2, a, b, c, d, in[ 0] + 0x5a827999, 3); + MD4STEP(F2, d, a, b, c, in[ 4] + 0x5a827999, 5); + MD4STEP(F2, c, d, a, b, in[ 8] + 0x5a827999, 9); + MD4STEP(F2, b, c, d, a, in[12] + 0x5a827999, 13); + MD4STEP(F2, a, b, c, d, in[ 1] + 0x5a827999, 3); + MD4STEP(F2, d, a, b, c, in[ 5] + 0x5a827999, 5); + MD4STEP(F2, c, d, a, b, in[ 9] + 0x5a827999, 9); + MD4STEP(F2, b, c, d, a, in[13] + 0x5a827999, 13); + MD4STEP(F2, a, b, c, d, in[ 2] + 0x5a827999, 3); + MD4STEP(F2, d, a, b, c, in[ 6] + 0x5a827999, 5); + MD4STEP(F2, c, d, a, b, in[10] + 0x5a827999, 9); + MD4STEP(F2, b, c, d, a, in[14] + 0x5a827999, 13); + MD4STEP(F2, a, b, c, d, in[ 3] + 0x5a827999, 3); + MD4STEP(F2, d, a, b, c, in[ 7] + 0x5a827999, 5); + MD4STEP(F2, c, d, a, b, in[11] + 0x5a827999, 9); + MD4STEP(F2, b, c, d, a, in[15] + 0x5a827999, 13); + + MD4STEP(F3, a, b, c, d, in[ 0] + 0x6ed9eba1, 3); + MD4STEP(F3, d, a, b, c, in[ 8] + 0x6ed9eba1, 9); + MD4STEP(F3, c, d, a, b, in[ 4] + 0x6ed9eba1, 11); + MD4STEP(F3, b, c, d, a, in[12] + 0x6ed9eba1, 15); + MD4STEP(F3, a, b, c, d, in[ 2] + 0x6ed9eba1, 3); + MD4STEP(F3, d, a, b, c, in[10] + 0x6ed9eba1, 9); + MD4STEP(F3, c, d, a, b, in[ 6] + 0x6ed9eba1, 11); + MD4STEP(F3, b, c, d, a, in[14] + 0x6ed9eba1, 15); + MD4STEP(F3, a, b, c, d, in[ 1] + 0x6ed9eba1, 3); + MD4STEP(F3, d, a, b, c, in[ 9] + 0x6ed9eba1, 9); + MD4STEP(F3, c, d, a, b, in[ 5] + 0x6ed9eba1, 11); + MD4STEP(F3, b, c, d, a, in[13] + 0x6ed9eba1, 15); + MD4STEP(F3, a, b, c, d, in[ 3] + 0x6ed9eba1, 3); + MD4STEP(F3, d, a, b, c, in[11] + 0x6ed9eba1, 9); + MD4STEP(F3, c, d, a, b, in[ 7] + 0x6ed9eba1, 11); + MD4STEP(F3, b, c, d, a, in[15] + 0x6ed9eba1, 15); + + state[0] += a; + state[1] += b; + state[2] += c; + state[3] += d; +} diff -Nru cdrtools-2.01.01a33/libmdigest/md5.c cdrtools-3.02a09/libmdigest/md5.c --- cdrtools-2.01.01a33/libmdigest/md5.c 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/libmdigest/md5.c 2009-07-11 10:23:14.000000000 +0000 @@ -0,0 +1,282 @@ +/* @(#)md5.c 1.6 09/07/11 2008 J. Schilling */ +#include +#ifndef lint +static UConst char sccsid[] = + "@(#)md5.c 1.6 09/07/11 2008 J. Schilling"; +#endif +/* + * MD5 hash code taken from OpenBSD + * + * Portions Copyright (c) 2008 J. Schilling + */ + +/* $OpenBSD: md5.c,v 1.8 2005/08/08 08:05:35 espie Exp $ */ + +/* + * This code implements the MD5 message-digest algorithm. + * The algorithm is due to Ron Rivest. This code was + * written by Colin Plumb in 1993, no copyright is claimed. + * This code is in the public domain; do with it what you wish. + * + * Equivalent code is available from RSA Data Security, Inc. + * This code has been tested against that, and is equivalent, + * except that you don't need to include two pages of legalese + * with every copy. + * + * To compute the message digest of a chunk of bytes, declare an + * MD5Context structure, pass it to MD5Init, call MD5Update as + * needed on buffers full of bytes, and then call MD5Final, which + * will fill a supplied 16-byte array with the digest. + */ + +#include +#include +#include + +#if !defined(HAVE_MEMCPY) || !defined(HAVE_MEMSET) +#include +#endif +#if !defined(HAVE_MEMCPY) && !defined(memcpy) +#define memcpy(s1, s2, n) movebytes(s2, s1, n) +#endif +#if !defined(HAVE_MEMSET) && !defined(memset) +#define memset(s, c, n) fillbytes(s, n, c) +#endif + + +#define PUT_64BIT_LE(cp, value) do { \ + (cp)[7] = (value)[1] >> 24; \ + (cp)[6] = (value)[1] >> 16; \ + (cp)[5] = (value)[1] >> 8; \ + (cp)[4] = (value)[1]; \ + (cp)[3] = (value)[0] >> 24; \ + (cp)[2] = (value)[0] >> 16; \ + (cp)[1] = (value)[0] >> 8; \ + (cp)[0] = (value)[0]; } while (0) + +#define PUT_32BIT_LE(cp, value) do { \ + (cp)[3] = (value) >> 24; \ + (cp)[2] = (value) >> 16; \ + (cp)[1] = (value) >> 8; \ + (cp)[0] = (value); } while (0) + +static UInt8_t PADDING[MD5_BLOCK_LENGTH] = { + 0x80, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 +}; + +/* + * Start MD5 accumulation. Set bit count to 0 and buffer to mysterious + * initialization constants. + */ +void +MD5Init(ctx) + MD5_CTX *ctx; +{ + ctx->count[0] = ctx->count[1] = 0; + ctx->state[0] = 0x67452301; + ctx->state[1] = 0xefcdab89; + ctx->state[2] = 0x98badcfe; + ctx->state[3] = 0x10325476; +} + +/* + * Update context to reflect the concatenation of another buffer full + * of bytes. + */ +void +MD5Update(ctx, inputv, len) + MD5_CTX *ctx; + const void *inputv; + size_t len; +{ + const unsigned char *input = inputv; + size_t have, need; + + /* Check how many bytes we already have and how many more we need. */ + have = (size_t)((ctx->count[0] >> 3) & (MD5_BLOCK_LENGTH - 1)); + need = MD5_BLOCK_LENGTH - have; + + /* Update bitcount */ + if ((ctx->count[0] += (UInt32_t)len << 3) < ((UInt32_t)len << 3)) + ctx->count[1] += 1; + + if (len >= need) { + if (have != 0) { + memcpy(ctx->buffer + have, input, need); + MD5Transform(ctx->state, ctx->buffer); + input += need; + len -= need; + have = 0; + } + + /* Process data in MD5_BLOCK_LENGTH-byte chunks. */ + while (len >= MD5_BLOCK_LENGTH) { + MD5Transform(ctx->state, input); + input += MD5_BLOCK_LENGTH; + len -= MD5_BLOCK_LENGTH; + } + } + + /* Handle any remaining bytes of data. */ + if (len != 0) + memcpy(ctx->buffer + have, input, len); +} + +/* + * Pad pad to 64-byte boundary with the bit pattern + * 1 0* (64-bit count of bits processed, MSB-first) + */ +void +MD5Pad(ctx) + MD5_CTX *ctx; +{ + UInt8_t count[8]; + size_t padlen; + + /* Convert count to 8 bytes in little endian order. */ + PUT_64BIT_LE(count, ctx->count); + + /* Pad out to 56 mod 64. */ + padlen = MD5_BLOCK_LENGTH - + ((ctx->count[0] >> 3) & (MD5_BLOCK_LENGTH - 1)); + if (padlen < 1 + 8) + padlen += MD5_BLOCK_LENGTH; + MD5Update(ctx, PADDING, padlen - 8); /* padlen - 8 <= 64 */ + MD5Update(ctx, count, 8); +} + +/* + * Final wrapup--call MD5Pad, fill in digest and zero out ctx. + */ +void +MD5Final(digest, ctx) + unsigned char digest[MD5_DIGEST_LENGTH]; + MD5_CTX *ctx; +{ + int i; + + MD5Pad(ctx); + if (digest != NULL) { + for (i = 0; i < 4; i++) + PUT_32BIT_LE(digest + i * 4, ctx->state[i]); + memset(ctx, 0, sizeof (*ctx)); + } +} + + +/* The four core functions - F1 is optimized somewhat */ + +/* #define F1(x, y, z) (x & y | ~x & z) */ +#define F1(x, y, z) (z ^ (x & (y ^ z))) +#define F2(x, y, z) F1(z, x, y) +#define F3(x, y, z) (x ^ y ^ z) +#define F4(x, y, z) (y ^ (x | ~z)) + +/* This is the central step in the MD5 algorithm. */ +#define MD5STEP(f, w, x, y, z, data, s) \ + (w += f(x, y, z) + data, w = w<>(32-s), w += x) + +/* + * The core of the MD5 algorithm, this alters an existing MD5 hash to + * reflect the addition of 16 longwords of new data. MD5Update blocks + * the data and converts bytes into longwords for this routine. + */ +void +MD5Transform(state, block) + UInt32_t state[4]; + const UInt8_t block[MD5_BLOCK_LENGTH]; +{ + UInt32_t a, b, c, d, in[MD5_BLOCK_LENGTH / 4]; + +#ifndef WORDS_BIGENDIAN + memcpy(in, block, sizeof (in)); +#else + for (a = 0; a < MD5_BLOCK_LENGTH / 4; a++) { + in[a] = (UInt32_t)( + (UInt32_t)(block[a * 4 + 0]) | + (UInt32_t)(block[a * 4 + 1]) << 8 | + (UInt32_t)(block[a * 4 + 2]) << 16 | + (UInt32_t)(block[a * 4 + 3]) << 24); + } +#endif + + a = state[0]; + b = state[1]; + c = state[2]; + d = state[3]; + + MD5STEP(F1, a, b, c, d, in[ 0] + 0xd76aa478, 7); + MD5STEP(F1, d, a, b, c, in[ 1] + 0xe8c7b756, 12); + MD5STEP(F1, c, d, a, b, in[ 2] + 0x242070db, 17); + MD5STEP(F1, b, c, d, a, in[ 3] + 0xc1bdceee, 22); + MD5STEP(F1, a, b, c, d, in[ 4] + 0xf57c0faf, 7); + MD5STEP(F1, d, a, b, c, in[ 5] + 0x4787c62a, 12); + MD5STEP(F1, c, d, a, b, in[ 6] + 0xa8304613, 17); + MD5STEP(F1, b, c, d, a, in[ 7] + 0xfd469501, 22); + MD5STEP(F1, a, b, c, d, in[ 8] + 0x698098d8, 7); + MD5STEP(F1, d, a, b, c, in[ 9] + 0x8b44f7af, 12); + MD5STEP(F1, c, d, a, b, in[10] + 0xffff5bb1, 17); + MD5STEP(F1, b, c, d, a, in[11] + 0x895cd7be, 22); + MD5STEP(F1, a, b, c, d, in[12] + 0x6b901122, 7); + MD5STEP(F1, d, a, b, c, in[13] + 0xfd987193, 12); + MD5STEP(F1, c, d, a, b, in[14] + 0xa679438e, 17); + MD5STEP(F1, b, c, d, a, in[15] + 0x49b40821, 22); + + MD5STEP(F2, a, b, c, d, in[ 1] + 0xf61e2562, 5); + MD5STEP(F2, d, a, b, c, in[ 6] + 0xc040b340, 9); + MD5STEP(F2, c, d, a, b, in[11] + 0x265e5a51, 14); + MD5STEP(F2, b, c, d, a, in[ 0] + 0xe9b6c7aa, 20); + MD5STEP(F2, a, b, c, d, in[ 5] + 0xd62f105d, 5); + MD5STEP(F2, d, a, b, c, in[10] + 0x02441453, 9); + MD5STEP(F2, c, d, a, b, in[15] + 0xd8a1e681, 14); + MD5STEP(F2, b, c, d, a, in[ 4] + 0xe7d3fbc8, 20); + MD5STEP(F2, a, b, c, d, in[ 9] + 0x21e1cde6, 5); + MD5STEP(F2, d, a, b, c, in[14] + 0xc33707d6, 9); + MD5STEP(F2, c, d, a, b, in[ 3] + 0xf4d50d87, 14); + MD5STEP(F2, b, c, d, a, in[ 8] + 0x455a14ed, 20); + MD5STEP(F2, a, b, c, d, in[13] + 0xa9e3e905, 5); + MD5STEP(F2, d, a, b, c, in[ 2] + 0xfcefa3f8, 9); + MD5STEP(F2, c, d, a, b, in[ 7] + 0x676f02d9, 14); + MD5STEP(F2, b, c, d, a, in[12] + 0x8d2a4c8a, 20); + + MD5STEP(F3, a, b, c, d, in[ 5] + 0xfffa3942, 4); + MD5STEP(F3, d, a, b, c, in[ 8] + 0x8771f681, 11); + MD5STEP(F3, c, d, a, b, in[11] + 0x6d9d6122, 16); + MD5STEP(F3, b, c, d, a, in[14] + 0xfde5380c, 23); + MD5STEP(F3, a, b, c, d, in[ 1] + 0xa4beea44, 4); + MD5STEP(F3, d, a, b, c, in[ 4] + 0x4bdecfa9, 11); + MD5STEP(F3, c, d, a, b, in[ 7] + 0xf6bb4b60, 16); + MD5STEP(F3, b, c, d, a, in[10] + 0xbebfbc70, 23); + MD5STEP(F3, a, b, c, d, in[13] + 0x289b7ec6, 4); + MD5STEP(F3, d, a, b, c, in[ 0] + 0xeaa127fa, 11); + MD5STEP(F3, c, d, a, b, in[ 3] + 0xd4ef3085, 16); + MD5STEP(F3, b, c, d, a, in[ 6] + 0x04881d05, 23); + MD5STEP(F3, a, b, c, d, in[ 9] + 0xd9d4d039, 4); + MD5STEP(F3, d, a, b, c, in[12] + 0xe6db99e5, 11); + MD5STEP(F3, c, d, a, b, in[15] + 0x1fa27cf8, 16); + MD5STEP(F3, b, c, d, a, in[2 ] + 0xc4ac5665, 23); + + MD5STEP(F4, a, b, c, d, in[ 0] + 0xf4292244, 6); + MD5STEP(F4, d, a, b, c, in[7 ] + 0x432aff97, 10); + MD5STEP(F4, c, d, a, b, in[14] + 0xab9423a7, 15); + MD5STEP(F4, b, c, d, a, in[5 ] + 0xfc93a039, 21); + MD5STEP(F4, a, b, c, d, in[12] + 0x655b59c3, 6); + MD5STEP(F4, d, a, b, c, in[3 ] + 0x8f0ccc92, 10); + MD5STEP(F4, c, d, a, b, in[10] + 0xffeff47d, 15); + MD5STEP(F4, b, c, d, a, in[1 ] + 0x85845dd1, 21); + MD5STEP(F4, a, b, c, d, in[8 ] + 0x6fa87e4f, 6); + MD5STEP(F4, d, a, b, c, in[15] + 0xfe2ce6e0, 10); + MD5STEP(F4, c, d, a, b, in[6 ] + 0xa3014314, 15); + MD5STEP(F4, b, c, d, a, in[13] + 0x4e0811a1, 21); + MD5STEP(F4, a, b, c, d, in[4 ] + 0xf7537e82, 6); + MD5STEP(F4, d, a, b, c, in[11] + 0xbd3af235, 10); + MD5STEP(F4, c, d, a, b, in[2 ] + 0x2ad7d2bb, 15); + MD5STEP(F4, b, c, d, a, in[9 ] + 0xeb86d391, 21); + + state[0] += a; + state[1] += b; + state[2] += c; + state[3] += d; +} diff -Nru cdrtools-2.01.01a33/libmdigest/mdigest.mk cdrtools-3.02a09/libmdigest/mdigest.mk --- cdrtools-2.01.01a33/libmdigest/mdigest.mk 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/libmdigest/mdigest.mk 2010-06-23 20:49:56.000000000 +0000 @@ -0,0 +1,35 @@ +#ident "@(#)mdigest.mk 1.4 10/06/23 " +########################################################################### +SRCROOT= .. +RULESDIR= RULES +include $(SRCROOT)/$(RULESDIR)/rules.top +########################################################################### + +#.SEARCHLIST: . $(ARCHDIR) stdio $(ARCHDIR) +#VPATH= .:stdio:$(ARCHDIR) +INSDIR= lib +TARGETLIB= mdigest +#CPPOPTS += -Ispecincl +CPPOPTS += -DUSE_PG +# +# Selectively increase the opimisation for libmdigest for better performance +# +# The code has been tested for correctness with this level of optimisation +# If your GCC creates defective code, you found a GCC bug that should +# be reported to the GCC people. As a workaround, you may remove the next +# lines to fall back to the standard optimisation level. +# +_XARCH_OPT= $(OARCH:%cc64=$(SUNPROCOPT64)) +XARCH_OPT= $(_XARCH_OPT:%cc=$(XARCH_GEN)) + +SUNPROCOPTOPT= -fast $(XARCH_OPT) +GCCOPTOPT= -O3 -fexpensive-optimizations +# +include Targets +LIBS= + +########################################################################### +include $(SRCROOT)/$(RULESDIR)/rules.lib +########################################################################### +#CC= echo " ==> COMPILING \"$@\""; cc +########################################################################### diff -Nru cdrtools-2.01.01a33/libmdigest/mdigest_p.mk cdrtools-3.02a09/libmdigest/mdigest_p.mk --- cdrtools-2.01.01a33/libmdigest/mdigest_p.mk 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/libmdigest/mdigest_p.mk 2009-06-21 21:43:45.000000000 +0000 @@ -0,0 +1,24 @@ +#ident "@(#)mdigest_p.mk 1.2 09/06/21 " +########################################################################### +SRCROOT= .. +RULESDIR= RULES +include $(SRCROOT)/$(RULESDIR)/rules.top +########################################################################### + +SUBARCHDIR= /profiled +SUBINSDIR= /profiled +#.SEARCHLIST: . $(ARCHDIR) stdio $(ARCHDIR) +#VPATH= .:stdio:$(ARCHDIR) +INSDIR= lib +TARGETLIB= mdigest +#CPPOPTS += -Ispecincl +CPPOPTS += -DUSE_PG +COPTS += $(COPTGPROF) +include Targets +LIBS= + +########################################################################### +include $(SRCROOT)/$(RULESDIR)/rules.lib +########################################################################### +#CC= echo " ==> COMPILING \"$@\""; cc +########################################################################### diff -Nru cdrtools-2.01.01a33/libmdigest/noshlmdigest.mk cdrtools-3.02a09/libmdigest/noshlmdigest.mk --- cdrtools-2.01.01a33/libmdigest/noshlmdigest.mk 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/libmdigest/noshlmdigest.mk 2009-06-15 21:39:33.000000000 +0000 @@ -0,0 +1,9 @@ +#ident "@(#)noshldigest.mk 1.1 09/06/15 " +########################################################################### +SRCROOT= .. +RULESDIR= RULES +include $(SRCROOT)/$(RULESDIR)/rules.top +########################################################################### + +all: + @echo " ==> NO shared libs on this platform (yet)" diff -Nru cdrtools-2.01.01a33/libmdigest/rmd160.c cdrtools-3.02a09/libmdigest/rmd160.c --- cdrtools-2.01.01a33/libmdigest/rmd160.c 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/libmdigest/rmd160.c 2009-08-08 21:28:57.000000000 +0000 @@ -0,0 +1,427 @@ +/* @(#)rmd160.c 1.4 09/08/08 2009 J. Schilling */ +#include +#ifndef lint +static UConst char sccsid[] = + "@(#)rmd160.c 1.4 09/08/08 2009 J. Schilling"; +#endif +/* + * RMD160 hash code taken from OpenBSD + * + * Portions Copyright (c) 2009 J. Schilling + */ + +/* + * Copyright (c) 2001 Markus Friedl. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +/* + * Preneel, Bosselaers, Dobbertin, "The Cryptographic Hash Function RIPEMD-160", + * RSA Laboratories, CryptoBytes, Volume 3, Number 2, Autumn 1997, + * ftp://ftp.rsasecurity.com/pub/cryptobytes/crypto3n2.pdf + */ + +#include +#include +#include + +#if !defined(HAVE_MEMCPY) || !defined(HAVE_MEMSET) +#include +#endif +#if !defined(HAVE_MEMCPY) && !defined(memcpy) +#define memcpy(s1, s2, n) movebytes(s2, s1, n) +#endif +#if !defined(HAVE_MEMSET) && !defined(memset) +#define memset(s, c, n) fillbytes(s, n, c) +#endif + + +#define PUT_64BIT_LE(cp, value) do { \ + (cp)[7] = (value)[1] >> 24; \ + (cp)[6] = (value)[1] >> 16; \ + (cp)[5] = (value)[1] >> 8; \ + (cp)[4] = (value)[1]; \ + (cp)[3] = (value)[0] >> 24; \ + (cp)[2] = (value)[0] >> 16; \ + (cp)[1] = (value)[0] >> 8; \ + (cp)[0] = (value)[0]; } while (0) + +#define PUT_32BIT_LE(cp, value) do { \ + (cp)[3] = (value) >> 24; \ + (cp)[2] = (value) >> 16; \ + (cp)[1] = (value) >> 8; \ + (cp)[0] = (value); } while (0) + +#ifdef PROTOTYPES +#define H0 0x67452301U +#define H1 0xEFCDAB89U +#define H2 0x98BADCFEU +#define H3 0x10325476U +#define H4 0xC3D2E1F0U + +#define K0 0x00000000U +#define K1 0x5A827999U +#define K2 0x6ED9EBA1U +#define K3 0x8F1BBCDCU +#define K4 0xA953FD4EU + +#define KK0 0x50A28BE6U +#define KK1 0x5C4DD124U +#define KK2 0x6D703EF3U +#define KK3 0x7A6D76E9U +#define KK4 0x00000000U +#else +#define H0 0x67452301 +#define H1 0xEFCDAB89 +#define H2 0x98BADCFE +#define H3 0x10325476 +#define H4 0xC3D2E1F0 + +#define K0 0x00000000 +#define K1 0x5A827999 +#define K2 0x6ED9EBA1 +#define K3 0x8F1BBCDC +#define K4 0xA953FD4E + +#define KK0 0x50A28BE6 +#define KK1 0x5C4DD124 +#define KK2 0x6D703EF3 +#define KK3 0x7A6D76E9 +#define KK4 0x00000000 +#endif + +/* rotate x left n bits. */ +#define ROL(n, x) (((x) << (n)) | ((x) >> (32-(n)))) + +#define F0(x, y, z) ((x) ^ (y) ^ (z)) +#define F1(x, y, z) (((x) & (y)) | ((~x) & (z))) +#define F2(x, y, z) (((x) | (~y)) ^ (z)) +#define F3(x, y, z) (((x) & (z)) | ((y) & (~z))) +#define F4(x, y, z) ((x) ^ ((y) | (~z))) + +#define R(a, b, c, d, e, Fj, Kj, sj, rj) \ + do { \ + a = ROL(sj, a + Fj(b, c, d) + X(rj) + Kj) + e; \ + c = ROL(10, c); \ + } while (0) + +#define X(i) x[i] + +static UInt8_t PADDING[RMD160_BLOCK_LENGTH] = { + 0x80, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 +}; + +void +RMD160Init(ctx) + RMD160_CTX *ctx; +{ + ctx->count[0] = ctx->count[1] = 0; + ctx->state[0] = H0; + ctx->state[1] = H1; + ctx->state[2] = H2; + ctx->state[3] = H3; + ctx->state[4] = H4; +} + +void +RMD160Update(ctx, input, len) + RMD160_CTX *ctx; + const UInt8_t *input; + size_t len; +{ + size_t have, off, need; + + have = (size_t) ((ctx->count[0] / 8) % RMD160_BLOCK_LENGTH); + need = RMD160_BLOCK_LENGTH - have; + + /* Update bitcount */ + if ((ctx->count[0] += (UInt32_t)len << 3) < ((UInt32_t)len << 3)) + ctx->count[1] += 1; + + off = 0; + + if (len >= need) { + if (have) { + memcpy(ctx->buffer + have, input, need); + RMD160Transform(ctx->state, ctx->buffer); + off = need; + have = 0; + } + /* now the buffer is empty */ + while (off + RMD160_BLOCK_LENGTH <= len) { + RMD160Transform(ctx->state, input+off); + off += RMD160_BLOCK_LENGTH; + } + } + if (off < len) + memcpy(ctx->buffer + have, input+off, len-off); +} + +void +RMD160Pad(ctx) + RMD160_CTX *ctx; +{ + UInt8_t size[8]; + size_t padlen; + + PUT_64BIT_LE(size, ctx->count); + + /* + * pad to RMD160_BLOCK_LENGTH byte blocks, at least one byte from + * PADDING plus 8 bytes for the size + */ + padlen = RMD160_BLOCK_LENGTH - ((ctx->count[0] / 8) % RMD160_BLOCK_LENGTH); + if (padlen < 1 + 8) + padlen += RMD160_BLOCK_LENGTH; + RMD160Update(ctx, PADDING, padlen - 8); /* padlen - 8 <= 64 */ + RMD160Update(ctx, size, 8); +} + +void +RMD160Final(digest, ctx) + UInt8_t digest[RMD160_DIGEST_LENGTH]; + RMD160_CTX *ctx; +{ + int i; + + RMD160Pad(ctx); + if (digest != NULL) { + for (i = 0; i < 5; i++) + PUT_32BIT_LE(digest + i*4, ctx->state[i]); + memset(ctx, 0, sizeof (*ctx)); + } +} + +void +RMD160Transform(state, block) + UInt32_t state[5]; + const UInt8_t block[RMD160_BLOCK_LENGTH]; +{ + UInt32_t a, b, c, d, e, aa, bb, cc, dd, ee, t, x[16]; + +#ifndef WORDS_BIGENDIAN + memcpy(x, block, RMD160_BLOCK_LENGTH); +#else + int i; + + for (i = 0; i < 16; i++) + x[i] = (UInt32_t)( + (UInt32_t)(block[i*4 + 0]) | + (UInt32_t)(block[i*4 + 1]) << 8 | + (UInt32_t)(block[i*4 + 2]) << 16 | + (UInt32_t)(block[i*4 + 3]) << 24); +#endif + + a = state[0]; + b = state[1]; + c = state[2]; + d = state[3]; + e = state[4]; + + /* Round 1 */ + R(a, b, c, d, e, F0, K0, 11, 0); + R(e, a, b, c, d, F0, K0, 14, 1); + R(d, e, a, b, c, F0, K0, 15, 2); + R(c, d, e, a, b, F0, K0, 12, 3); + R(b, c, d, e, a, F0, K0, 5, 4); + R(a, b, c, d, e, F0, K0, 8, 5); + R(e, a, b, c, d, F0, K0, 7, 6); + R(d, e, a, b, c, F0, K0, 9, 7); + R(c, d, e, a, b, F0, K0, 11, 8); + R(b, c, d, e, a, F0, K0, 13, 9); + R(a, b, c, d, e, F0, K0, 14, 10); + R(e, a, b, c, d, F0, K0, 15, 11); + R(d, e, a, b, c, F0, K0, 6, 12); + R(c, d, e, a, b, F0, K0, 7, 13); + R(b, c, d, e, a, F0, K0, 9, 14); + R(a, b, c, d, e, F0, K0, 8, 15); /* #15 */ + /* Round 2 */ + R(e, a, b, c, d, F1, K1, 7, 7); + R(d, e, a, b, c, F1, K1, 6, 4); + R(c, d, e, a, b, F1, K1, 8, 13); + R(b, c, d, e, a, F1, K1, 13, 1); + R(a, b, c, d, e, F1, K1, 11, 10); + R(e, a, b, c, d, F1, K1, 9, 6); + R(d, e, a, b, c, F1, K1, 7, 15); + R(c, d, e, a, b, F1, K1, 15, 3); + R(b, c, d, e, a, F1, K1, 7, 12); + R(a, b, c, d, e, F1, K1, 12, 0); + R(e, a, b, c, d, F1, K1, 15, 9); + R(d, e, a, b, c, F1, K1, 9, 5); + R(c, d, e, a, b, F1, K1, 11, 2); + R(b, c, d, e, a, F1, K1, 7, 14); + R(a, b, c, d, e, F1, K1, 13, 11); + R(e, a, b, c, d, F1, K1, 12, 8); /* #31 */ + /* Round 3 */ + R(d, e, a, b, c, F2, K2, 11, 3); + R(c, d, e, a, b, F2, K2, 13, 10); + R(b, c, d, e, a, F2, K2, 6, 14); + R(a, b, c, d, e, F2, K2, 7, 4); + R(e, a, b, c, d, F2, K2, 14, 9); + R(d, e, a, b, c, F2, K2, 9, 15); + R(c, d, e, a, b, F2, K2, 13, 8); + R(b, c, d, e, a, F2, K2, 15, 1); + R(a, b, c, d, e, F2, K2, 14, 2); + R(e, a, b, c, d, F2, K2, 8, 7); + R(d, e, a, b, c, F2, K2, 13, 0); + R(c, d, e, a, b, F2, K2, 6, 6); + R(b, c, d, e, a, F2, K2, 5, 13); + R(a, b, c, d, e, F2, K2, 12, 11); + R(e, a, b, c, d, F2, K2, 7, 5); + R(d, e, a, b, c, F2, K2, 5, 12); /* #47 */ + /* Round 4 */ + R(c, d, e, a, b, F3, K3, 11, 1); + R(b, c, d, e, a, F3, K3, 12, 9); + R(a, b, c, d, e, F3, K3, 14, 11); + R(e, a, b, c, d, F3, K3, 15, 10); + R(d, e, a, b, c, F3, K3, 14, 0); + R(c, d, e, a, b, F3, K3, 15, 8); + R(b, c, d, e, a, F3, K3, 9, 12); + R(a, b, c, d, e, F3, K3, 8, 4); + R(e, a, b, c, d, F3, K3, 9, 13); + R(d, e, a, b, c, F3, K3, 14, 3); + R(c, d, e, a, b, F3, K3, 5, 7); + R(b, c, d, e, a, F3, K3, 6, 15); + R(a, b, c, d, e, F3, K3, 8, 14); + R(e, a, b, c, d, F3, K3, 6, 5); + R(d, e, a, b, c, F3, K3, 5, 6); + R(c, d, e, a, b, F3, K3, 12, 2); /* #63 */ + /* Round 5 */ + R(b, c, d, e, a, F4, K4, 9, 4); + R(a, b, c, d, e, F4, K4, 15, 0); + R(e, a, b, c, d, F4, K4, 5, 5); + R(d, e, a, b, c, F4, K4, 11, 9); + R(c, d, e, a, b, F4, K4, 6, 7); + R(b, c, d, e, a, F4, K4, 8, 12); + R(a, b, c, d, e, F4, K4, 13, 2); + R(e, a, b, c, d, F4, K4, 12, 10); + R(d, e, a, b, c, F4, K4, 5, 14); + R(c, d, e, a, b, F4, K4, 12, 1); + R(b, c, d, e, a, F4, K4, 13, 3); + R(a, b, c, d, e, F4, K4, 14, 8); + R(e, a, b, c, d, F4, K4, 11, 11); + R(d, e, a, b, c, F4, K4, 8, 6); + R(c, d, e, a, b, F4, K4, 5, 15); + R(b, c, d, e, a, F4, K4, 6, 13); /* #79 */ + + aa = a; bb = b; cc = c; dd = d; ee = e; + + a = state[0]; + b = state[1]; + c = state[2]; + d = state[3]; + e = state[4]; + + /* Parallel round 1 */ + R(a, b, c, d, e, F4, KK0, 8, 5); + R(e, a, b, c, d, F4, KK0, 9, 14); + R(d, e, a, b, c, F4, KK0, 9, 7); + R(c, d, e, a, b, F4, KK0, 11, 0); + R(b, c, d, e, a, F4, KK0, 13, 9); + R(a, b, c, d, e, F4, KK0, 15, 2); + R(e, a, b, c, d, F4, KK0, 15, 11); + R(d, e, a, b, c, F4, KK0, 5, 4); + R(c, d, e, a, b, F4, KK0, 7, 13); + R(b, c, d, e, a, F4, KK0, 7, 6); + R(a, b, c, d, e, F4, KK0, 8, 15); + R(e, a, b, c, d, F4, KK0, 11, 8); + R(d, e, a, b, c, F4, KK0, 14, 1); + R(c, d, e, a, b, F4, KK0, 14, 10); + R(b, c, d, e, a, F4, KK0, 12, 3); + R(a, b, c, d, e, F4, KK0, 6, 12); /* #15 */ + /* Parallel round 2 */ + R(e, a, b, c, d, F3, KK1, 9, 6); + R(d, e, a, b, c, F3, KK1, 13, 11); + R(c, d, e, a, b, F3, KK1, 15, 3); + R(b, c, d, e, a, F3, KK1, 7, 7); + R(a, b, c, d, e, F3, KK1, 12, 0); + R(e, a, b, c, d, F3, KK1, 8, 13); + R(d, e, a, b, c, F3, KK1, 9, 5); + R(c, d, e, a, b, F3, KK1, 11, 10); + R(b, c, d, e, a, F3, KK1, 7, 14); + R(a, b, c, d, e, F3, KK1, 7, 15); + R(e, a, b, c, d, F3, KK1, 12, 8); + R(d, e, a, b, c, F3, KK1, 7, 12); + R(c, d, e, a, b, F3, KK1, 6, 4); + R(b, c, d, e, a, F3, KK1, 15, 9); + R(a, b, c, d, e, F3, KK1, 13, 1); + R(e, a, b, c, d, F3, KK1, 11, 2); /* #31 */ + /* Parallel round 3 */ + R(d, e, a, b, c, F2, KK2, 9, 15); + R(c, d, e, a, b, F2, KK2, 7, 5); + R(b, c, d, e, a, F2, KK2, 15, 1); + R(a, b, c, d, e, F2, KK2, 11, 3); + R(e, a, b, c, d, F2, KK2, 8, 7); + R(d, e, a, b, c, F2, KK2, 6, 14); + R(c, d, e, a, b, F2, KK2, 6, 6); + R(b, c, d, e, a, F2, KK2, 14, 9); + R(a, b, c, d, e, F2, KK2, 12, 11); + R(e, a, b, c, d, F2, KK2, 13, 8); + R(d, e, a, b, c, F2, KK2, 5, 12); + R(c, d, e, a, b, F2, KK2, 14, 2); + R(b, c, d, e, a, F2, KK2, 13, 10); + R(a, b, c, d, e, F2, KK2, 13, 0); + R(e, a, b, c, d, F2, KK2, 7, 4); + R(d, e, a, b, c, F2, KK2, 5, 13); /* #47 */ + /* Parallel round 4 */ + R(c, d, e, a, b, F1, KK3, 15, 8); + R(b, c, d, e, a, F1, KK3, 5, 6); + R(a, b, c, d, e, F1, KK3, 8, 4); + R(e, a, b, c, d, F1, KK3, 11, 1); + R(d, e, a, b, c, F1, KK3, 14, 3); + R(c, d, e, a, b, F1, KK3, 14, 11); + R(b, c, d, e, a, F1, KK3, 6, 15); + R(a, b, c, d, e, F1, KK3, 14, 0); + R(e, a, b, c, d, F1, KK3, 6, 5); + R(d, e, a, b, c, F1, KK3, 9, 12); + R(c, d, e, a, b, F1, KK3, 12, 2); + R(b, c, d, e, a, F1, KK3, 9, 13); + R(a, b, c, d, e, F1, KK3, 12, 9); + R(e, a, b, c, d, F1, KK3, 5, 7); + R(d, e, a, b, c, F1, KK3, 15, 10); + R(c, d, e, a, b, F1, KK3, 8, 14); /* #63 */ + /* Parallel round 5 */ + R(b, c, d, e, a, F0, KK4, 8, 12); + R(a, b, c, d, e, F0, KK4, 5, 15); + R(e, a, b, c, d, F0, KK4, 12, 10); + R(d, e, a, b, c, F0, KK4, 9, 4); + R(c, d, e, a, b, F0, KK4, 12, 1); + R(b, c, d, e, a, F0, KK4, 5, 5); + R(a, b, c, d, e, F0, KK4, 14, 8); + R(e, a, b, c, d, F0, KK4, 6, 7); + R(d, e, a, b, c, F0, KK4, 8, 6); + R(c, d, e, a, b, F0, KK4, 13, 2); + R(b, c, d, e, a, F0, KK4, 6, 13); + R(a, b, c, d, e, F0, KK4, 5, 14); + R(e, a, b, c, d, F0, KK4, 15, 0); + R(d, e, a, b, c, F0, KK4, 13, 3); + R(c, d, e, a, b, F0, KK4, 11, 9); + R(b, c, d, e, a, F0, KK4, 11, 11); /* #79 */ + + t = state[1] + cc + d; + state[1] = state[2] + dd + e; + state[2] = state[3] + ee + a; + state[3] = state[4] + aa + b; + state[4] = state[0] + bb + c; + state[0] = t; +} diff -Nru cdrtools-2.01.01a33/libmdigest/sha1.c cdrtools-3.02a09/libmdigest/sha1.c --- cdrtools-2.01.01a33/libmdigest/sha1.c 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/libmdigest/sha1.c 2012-12-02 12:14:13.000000000 +0000 @@ -0,0 +1,272 @@ +/* @(#)sha1.c 1.3 12/12/02 2009-2012 J. Schilling */ +#include +#ifndef lint +static UConst char sccsid[] = + "@(#)sha1.c 1.3 12/12/02 2009-2012 J. Schilling"; +#endif +/* + * SHA1 hash code taken from OpenBSD + * + * Portions Copyright (c) 2009-2012 J. Schilling + */ + +/* $OpenBSD: sha1.c,v 1.21 2008/07/29 19:32:50 miod Exp $ */ + +/* + * SHA-1 in C + * By Steve Reid + * 100% Public Domain + * + * Test Vectors (from FIPS PUB 180-1) + * "abc" + * A9993E36 4706816A BA3E2571 7850C26C 9CD0D89D + * "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq" + * 84983E44 1C3BD26E BAAE4AA1 F95129E5 E54670F1 + * A million repetitions of "a" + * 34AA973C D4C4DAA4 F61EEB2B DBAD2731 6534016F + */ + +#include +#include +#include + +#if !defined(HAVE_MEMCPY) || !defined(HAVE_MEMSET) +#include +#endif +#if !defined(HAVE_MEMCPY) && !defined(memcpy) +#define memcpy(s1, s2, n) movebytes(s2, s1, n) +#endif +#if !defined(HAVE_MEMSET) && !defined(memset) +#define memset(s, c, n) fillbytes(s, n, c) +#endif + + +#define rol(value, bits) (((value) << (bits)) | ((value) >> (32 - (bits)))) + +/* + * blk0() and blk() perform the initial expand. + * I got the idea of expanding during the round function from SSLeay + */ +#ifndef WORDS_BIGENDIAN +#define blk0(i) (block->l[i] = (rol(block->l[i], 24)&0xFF00FF00) \ + |(rol(block->l[i], 8)&0x00FF00FF)) +#else +#define blk0(i) block->l[i] +#endif +#define blk(i) (block->l[i&15] = rol(block->l[(i+13)&15]^block->l[(i+8)&15] \ + ^block->l[(i+2)&15]^block->l[i&15], 1)) + +/* + * (R0+R1), R2, R3, R4 are the different operations (rounds) used in SHA1 + */ +#define R0(v, w, x, y, z, i) z += ((w&(x^y))^y)+blk0(i)+0x5A827999+rol(v, 5); w = rol(w, 30); +#define R1(v, w, x, y, z, i) z += ((w&(x^y))^y)+blk(i)+0x5A827999+rol(v, 5); w = rol(w, 30); +#define R2(v, w, x, y, z, i) z += (w^x^y)+blk(i)+0x6ED9EBA1+rol(v, 5); w = rol(w, 30); +#define R3(v, w, x, y, z, i) z += (((w|x)&y)|(w&x))+blk(i)+0x8F1BBCDC+rol(v, 5); w = rol(w, 30); +#define R4(v, w, x, y, z, i) z += (w^x^y)+blk(i)+0xCA62C1D6+rol(v, 5); w = rol(w, 30); + +typedef union { + UInt8_t c[64]; + UInt32_t l[16]; +} CHAR64LONG16; + +#ifdef __sh__ +static void do_R01(UInt32_t *a, UInt32_t *b, UInt32_t *c, UInt32_t *d, UInt32_t *e, CHAR64LONG16 *); +static void do_R2(UInt32_t *a, UInt32_t *b, UInt32_t *c, UInt32_t *d, UInt32_t *e, CHAR64LONG16 *); +static void do_R3(UInt32_t *a, UInt32_t *b, UInt32_t *c, UInt32_t *d, UInt32_t *e, CHAR64LONG16 *); +static void do_R4(UInt32_t *a, UInt32_t *b, UInt32_t *c, UInt32_t *d, UInt32_t *e, CHAR64LONG16 *); + +#define nR0(v, w, x, y, z, i) R0(*v, *w, *x, *y, *z, i) +#define nR1(v, w, x, y, z, i) R1(*v, *w, *x, *y, *z, i) +#define nR2(v, w, x, y, z, i) R2(*v, *w, *x, *y, *z, i) +#define nR3(v, w, x, y, z, i) R3(*v, *w, *x, *y, *z, i) +#define nR4(v, w, x, y, z, i) R4(*v, *w, *x, *y, *z, i) + +/* BEGIN CSTYLED */ +static void +do_R01(UInt32_t *a, UInt32_t *b, UInt32_t *c, UInt32_t *d, UInt32_t *e, CHAR64LONG16 *block) +{ + nR0(a,b,c,d,e, 0); nR0(e,a,b,c,d, 1); nR0(d,e,a,b,c, 2); nR0(c,d,e,a,b, 3); + nR0(b,c,d,e,a, 4); nR0(a,b,c,d,e, 5); nR0(e,a,b,c,d, 6); nR0(d,e,a,b,c, 7); + nR0(c,d,e,a,b, 8); nR0(b,c,d,e,a, 9); nR0(a,b,c,d,e,10); nR0(e,a,b,c,d,11); + nR0(d,e,a,b,c,12); nR0(c,d,e,a,b,13); nR0(b,c,d,e,a,14); nR0(a,b,c,d,e,15); + nR1(e,a,b,c,d,16); nR1(d,e,a,b,c,17); nR1(c,d,e,a,b,18); nR1(b,c,d,e,a,19); +} + +static void +do_R2(UInt32_t *a, UInt32_t *b, UInt32_t *c, UInt32_t *d, UInt32_t *e, CHAR64LONG16 *block) +{ + nR2(a,b,c,d,e,20); nR2(e,a,b,c,d,21); nR2(d,e,a,b,c,22); nR2(c,d,e,a,b,23); + nR2(b,c,d,e,a,24); nR2(a,b,c,d,e,25); nR2(e,a,b,c,d,26); nR2(d,e,a,b,c,27); + nR2(c,d,e,a,b,28); nR2(b,c,d,e,a,29); nR2(a,b,c,d,e,30); nR2(e,a,b,c,d,31); + nR2(d,e,a,b,c,32); nR2(c,d,e,a,b,33); nR2(b,c,d,e,a,34); nR2(a,b,c,d,e,35); + nR2(e,a,b,c,d,36); nR2(d,e,a,b,c,37); nR2(c,d,e,a,b,38); nR2(b,c,d,e,a,39); +} + +static void +do_R3(UInt32_t *a, UInt32_t *b, UInt32_t *c, UInt32_t *d, UInt32_t *e, CHAR64LONG16 *block) +{ + nR3(a,b,c,d,e,40); nR3(e,a,b,c,d,41); nR3(d,e,a,b,c,42); nR3(c,d,e,a,b,43); + nR3(b,c,d,e,a,44); nR3(a,b,c,d,e,45); nR3(e,a,b,c,d,46); nR3(d,e,a,b,c,47); + nR3(c,d,e,a,b,48); nR3(b,c,d,e,a,49); nR3(a,b,c,d,e,50); nR3(e,a,b,c,d,51); + nR3(d,e,a,b,c,52); nR3(c,d,e,a,b,53); nR3(b,c,d,e,a,54); nR3(a,b,c,d,e,55); + nR3(e,a,b,c,d,56); nR3(d,e,a,b,c,57); nR3(c,d,e,a,b,58); nR3(b,c,d,e,a,59); +} + +static void +do_R4(UInt32_t *a, UInt32_t *b, UInt32_t *c, UInt32_t *d, UInt32_t *e, CHAR64LONG16 *block) +{ + nR4(a,b,c,d,e,60); nR4(e,a,b,c,d,61); nR4(d,e,a,b,c,62); nR4(c,d,e,a,b,63); + nR4(b,c,d,e,a,64); nR4(a,b,c,d,e,65); nR4(e,a,b,c,d,66); nR4(d,e,a,b,c,67); + nR4(c,d,e,a,b,68); nR4(b,c,d,e,a,69); nR4(a,b,c,d,e,70); nR4(e,a,b,c,d,71); + nR4(d,e,a,b,c,72); nR4(c,d,e,a,b,73); nR4(b,c,d,e,a,74); nR4(a,b,c,d,e,75); + nR4(e,a,b,c,d,76); nR4(d,e,a,b,c,77); nR4(c,d,e,a,b,78); nR4(b,c,d,e,a,79); +} +/* END CSTYLED */ +#endif + +/* + * Hash a single 512-bit block. This is the core of the algorithm. + */ +EXPORT void +SHA1Transform(state, buffer) + UInt32_t state[5]; + const UInt8_t buffer[SHA1_BLOCK_LENGTH]; +{ + UInt32_t a, b, c, d, e; + UInt8_t workspace[SHA1_BLOCK_LENGTH]; + CHAR64LONG16 *block = (CHAR64LONG16 *)workspace; + + (void) memcpy(block, buffer, SHA1_BLOCK_LENGTH); + + /* Copy context->state[] to working vars */ + a = state[0]; + b = state[1]; + c = state[2]; + d = state[3]; + e = state[4]; + +#ifdef __sh__ + do_R01(&a, &b, &c, &d, &e, block); + do_R2(&a, &b, &c, &d, &e, block); + do_R3(&a, &b, &c, &d, &e, block); + do_R4(&a, &b, &c, &d, &e, block); +#else + /* BEGIN CSTYLED */ + /* 4 rounds of 20 operations each. Loop unrolled. */ + R0(a,b,c,d,e, 0); R0(e,a,b,c,d, 1); R0(d,e,a,b,c, 2); R0(c,d,e,a,b, 3); + R0(b,c,d,e,a, 4); R0(a,b,c,d,e, 5); R0(e,a,b,c,d, 6); R0(d,e,a,b,c, 7); + R0(c,d,e,a,b, 8); R0(b,c,d,e,a, 9); R0(a,b,c,d,e,10); R0(e,a,b,c,d,11); + R0(d,e,a,b,c,12); R0(c,d,e,a,b,13); R0(b,c,d,e,a,14); R0(a,b,c,d,e,15); + R1(e,a,b,c,d,16); R1(d,e,a,b,c,17); R1(c,d,e,a,b,18); R1(b,c,d,e,a,19); + R2(a,b,c,d,e,20); R2(e,a,b,c,d,21); R2(d,e,a,b,c,22); R2(c,d,e,a,b,23); + R2(b,c,d,e,a,24); R2(a,b,c,d,e,25); R2(e,a,b,c,d,26); R2(d,e,a,b,c,27); + R2(c,d,e,a,b,28); R2(b,c,d,e,a,29); R2(a,b,c,d,e,30); R2(e,a,b,c,d,31); + R2(d,e,a,b,c,32); R2(c,d,e,a,b,33); R2(b,c,d,e,a,34); R2(a,b,c,d,e,35); + R2(e,a,b,c,d,36); R2(d,e,a,b,c,37); R2(c,d,e,a,b,38); R2(b,c,d,e,a,39); + R3(a,b,c,d,e,40); R3(e,a,b,c,d,41); R3(d,e,a,b,c,42); R3(c,d,e,a,b,43); + R3(b,c,d,e,a,44); R3(a,b,c,d,e,45); R3(e,a,b,c,d,46); R3(d,e,a,b,c,47); + R3(c,d,e,a,b,48); R3(b,c,d,e,a,49); R3(a,b,c,d,e,50); R3(e,a,b,c,d,51); + R3(d,e,a,b,c,52); R3(c,d,e,a,b,53); R3(b,c,d,e,a,54); R3(a,b,c,d,e,55); + R3(e,a,b,c,d,56); R3(d,e,a,b,c,57); R3(c,d,e,a,b,58); R3(b,c,d,e,a,59); + R4(a,b,c,d,e,60); R4(e,a,b,c,d,61); R4(d,e,a,b,c,62); R4(c,d,e,a,b,63); + R4(b,c,d,e,a,64); R4(a,b,c,d,e,65); R4(e,a,b,c,d,66); R4(d,e,a,b,c,67); + R4(c,d,e,a,b,68); R4(b,c,d,e,a,69); R4(a,b,c,d,e,70); R4(e,a,b,c,d,71); + R4(d,e,a,b,c,72); R4(c,d,e,a,b,73); R4(b,c,d,e,a,74); R4(a,b,c,d,e,75); + R4(e,a,b,c,d,76); R4(d,e,a,b,c,77); R4(c,d,e,a,b,78); R4(b,c,d,e,a,79); + /* END CSTYLED */ +#endif + + /* Add the working vars back into context.state[] */ + state[0] += a; + state[1] += b; + state[2] += c; + state[3] += d; + state[4] += e; + + /* Wipe variables */ + a = b = c = d = e = 0; +} + + +/* + * SHA1Init - Initialize new context + */ +EXPORT void +SHA1Init(context) + SHA1_CTX *context; +{ + + /* SHA1 initialization constants */ + context->count[0] = context->count[1] = 0; + context->state[0] = 0x67452301; + context->state[1] = 0xEFCDAB89; + context->state[2] = 0x98BADCFE; + context->state[3] = 0x10325476; + context->state[4] = 0xC3D2E1F0; +} + + +/* + * Run your data through this. + */ +EXPORT void +SHA1Update(context, data, len) + SHA1_CTX *context; + const UInt8_t *data; + size_t len; +{ + size_t i, j; + + j = (size_t)((context->count[0] >> 3) & 63); + if ((context->count[0] += (UInt32_t)len << 3) < ((UInt32_t)len << 3)) + context->count[1] += 1; + if ((j + len) > 63) { + (void) memcpy(&context->buffer[j], data, (i = 64-j)); + SHA1Transform(context->state, context->buffer); + for (; i + 63 < len; i += 64) + SHA1Transform(context->state, (UInt8_t *)&data[i]); + j = 0; + } else { + i = 0; + } + (void) memcpy(&context->buffer[j], &data[i], len - i); +} + + +/* + * Add padding and return the message digest. + */ +EXPORT void +SHA1Pad(context) + SHA1_CTX *context; +{ + UInt8_t finalcount[8]; + u_int i; + + for (i = 0; i < 8; i++) { + finalcount[i] = (UInt8_t)((context->count[1- (i / 4)] >> + (((7 - (i & 7)) * 8)%32)) & 255); /* Endian independent */ + } + SHA1Update(context, (UInt8_t *)"\200", 1); + while ((context->count[0] & 504) != 448) + SHA1Update(context, (UInt8_t *)"\0", 1); + SHA1Update(context, finalcount, 8); /* Should cause a SHA1Transform() */ +} + +EXPORT void +SHA1Final(digest, context) + UInt8_t digest[SHA1_DIGEST_LENGTH]; + SHA1_CTX *context; +{ + u_int i; + + SHA1Pad(context); + if (digest) { + for (i = 0; i < SHA1_DIGEST_LENGTH; i++) { + digest[i] = (UInt8_t) + ((context->state[i>>2] >> ((3-(i & 3)) * 8)) & 255); + } + memset(context, 0, sizeof (*context)); + } +} diff -Nru cdrtools-2.01.01a33/libmdigest/sha2.c cdrtools-3.02a09/libmdigest/sha2.c --- cdrtools-2.01.01a33/libmdigest/sha2.c 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/libmdigest/sha2.c 2015-07-06 20:35:34.000000000 +0000 @@ -0,0 +1,1026 @@ +/* @(#)sha2.c 1.7 15/07/06 2009-2015 J. Schilling */ +#include +#ifndef lint +static UConst char sccsid[] = + "@(#)sha2.c 1.7 15/07/06 2009-2015 J. Schilling"; +#endif +/* + * SHA2 hash code taken from OpenBSD + * + * Portions Copyright (c) 2009-2015 J. Schilling + */ + +/* $OpenBSD: sha2.c,v 1.13 2009/04/15 00:55:52 djm Exp $ */ + +/* + * FILE: sha2.c + * AUTHOR: Aaron D. Gifford + * + * Copyright (c) 2000-2001, Aaron D. Gifford + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. Neither the name of the copyright holder nor the names of contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTOR(S) ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTOR(S) BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $From: sha2.c,v 1.1 2001/11/08 00:01:51 adg Exp adg $ + */ + +#include +#include +#include + +#ifndef HAVE_LONGLONG +#define SHA256_ONLY +#endif + +#if !defined(HAVE_MEMCPY) || !defined(HAVE_MEMSET) +#include +#endif +#if !defined(HAVE_MEMCPY) && !defined(memcpy) +#define memcpy(s1, s2, n) movebytes(s2, s1, n) +#endif +#if !defined(HAVE_MEMSET) && !defined(memset) +#define memset(s, c, n) fillbytes(s, n, c) +#endif + + +/* + * UNROLLED TRANSFORM LOOP NOTE: + * You can define SHA2_UNROLL_TRANSFORM to use the unrolled transform + * loop version for the hash transform rounds (defined using macros + * later in this file). Either define on the command line, for example: + * + * cc -DSHA2_UNROLL_TRANSFORM -o sha2 sha2.c sha2prog.c + * + * or define below: + * + * #define SHA2_UNROLL_TRANSFORM + * + */ + +/*** SHA-256/384/512 Machine Architecture Definitions *****************/ +/* + * BYTE_ORDER NOTE: + * + * Please make sure that your system defines BYTE_ORDER. If your + * architecture is little-endian, make sure it also defines + * LITTLE_ENDIAN and that the two (BYTE_ORDER and LITTLE_ENDIAN) are + * equivilent. + * + * If your system does not define the above, then you can do so by + * hand like this: + * + * #define LITTLE_ENDIAN 1234 + * #define BIG_ENDIAN 4321 + * + * And for little-endian machines, add: + * + * #define BYTE_ORDER LITTLE_ENDIAN + * + * Or for big-endian machines: + * + * #define BYTE_ORDER BIG_ENDIAN + * + * The FreeBSD machine this was written on defines BYTE_ORDER + * appropriately by including (which in turn includes + * where the appropriate definitions are actually + * made). + */ +#ifdef __never__ +#if !defined(BYTE_ORDER) || (BYTE_ORDER != LITTLE_ENDIAN && BYTE_ORDER != BIG_ENDIAN) +error Define BYTE_ORDER to be equal to either LITTLE_ENDIAN or BIG_ENDIAN +#endif +#endif + + +/*** SHA-256/384/512 Various Length Definitions ***********************/ +/* NOTE: Most of these are in sha2.h */ +#define SHA256_SHORT_BLOCK_LENGTH (SHA256_BLOCK_LENGTH - 8) +#define SHA384_SHORT_BLOCK_LENGTH (SHA384_BLOCK_LENGTH - 16) +#define SHA512_SHORT_BLOCK_LENGTH (SHA512_BLOCK_LENGTH - 16) + +/*** ENDIAN SPECIFIC COPY MACROS **************************************/ +#define BE_8_TO_32(dst, cp) do { \ + (dst) = (UInt32_t)(cp)[3] | ((UInt32_t)(cp)[2] << 8) | \ + ((UInt32_t)(cp)[1] << 16) | ((UInt32_t)(cp)[0] << 24); \ +} while (0) + +#define BE_8_TO_64(dst, cp) do { \ + (dst) = (UInt64_t)(cp)[7] | ((UInt64_t)(cp)[6] << 8) | \ + ((UInt64_t)(cp)[5] << 16) | ((UInt64_t)(cp)[4] << 24) | \ + ((UInt64_t)(cp)[3] << 32) | ((UInt64_t)(cp)[2] << 40) | \ + ((UInt64_t)(cp)[1] << 48) | ((UInt64_t)(cp)[0] << 56); \ +} while (0) + +#define BE_64_TO_8(cp, src) do { \ + (cp)[0] = (src) >> 56; \ + (cp)[1] = (src) >> 48; \ + (cp)[2] = (src) >> 40; \ + (cp)[3] = (src) >> 32; \ + (cp)[4] = (src) >> 24; \ + (cp)[5] = (src) >> 16; \ + (cp)[6] = (src) >> 8; \ + (cp)[7] = (src); \ +} while (0) + +#define BE_64A_TO_8(cp, src) do { \ + (cp)[0] = (src)[1] >> 24; \ + (cp)[2] = (src)[1] >> 16; \ + (cp)[2] = (src)[1] >> 8; \ + (cp)[3] = (src)[1]; \ + (cp)[4] = (src)[0] >> 24; \ + (cp)[5] = (src)[0] >> 16; \ + (cp)[6] = (src)[0] >> 8; \ + (cp)[7] = (src)[0]; \ +} while (0) + +#define BE_32_TO_8(cp, src) do { \ + (cp)[0] = (src) >> 24; \ + (cp)[1] = (src) >> 16; \ + (cp)[2] = (src) >> 8; \ + (cp)[3] = (src); \ +} while (0) + +/* + * Macro for incrementally adding the unsigned 64-bit integer n to the + * unsigned 128-bit integer (represented using a two-element array of + * 64-bit words): + */ +#define ADDINC128(w, n) do { \ + (w)[0] += (UInt64_t)(n); \ + if ((w)[0] < (n)) { \ + (w)[1]++; \ + } \ +} while (0) + +/*** THE SIX LOGICAL FUNCTIONS ****************************************/ +/* + * Bit shifting and rotation (used by the six SHA-XYZ logical functions: + * + * NOTE: The naming of R and S appears backwards here (R is a SHIFT and + * S is a ROTATION) because the SHA-256/384/512 description document + * (see http://csrc.nist.gov/cryptval/shs/sha256-384-512.pdf) uses this + * same "backwards" definition. + */ +/* Shift-right (used in SHA-256, SHA-384, and SHA-512): */ +#define R(b, x) ((x) >> (b)) +/* 32-bit Rotate-right (used in SHA-256): */ +#define S32(b, x) (((x) >> (b)) | ((x) << (32 - (b)))) +/* 64-bit Rotate-right (used in SHA-384 and SHA-512): */ +#define S64(b, x) (((x) >> (b)) | ((x) << (64 - (b)))) + +/* Two of six logical functions used in SHA-256, SHA-384, and SHA-512: */ +#define Ch(x, y, z) (((x) & (y)) ^ ((~(x)) & (z))) +#define Maj(x, y, z) (((x) & (y)) ^ ((x) & (z)) ^ ((y) & (z))) + +/* Four of six logical functions used in SHA-256: */ +#define Sigma0_256(x) (S32(2, (x)) ^ S32(13, (x)) ^ S32(22, (x))) +#define Sigma1_256(x) (S32(6, (x)) ^ S32(11, (x)) ^ S32(25, (x))) +#define sigma0_256(x) (S32(7, (x)) ^ S32(18, (x)) ^ R(3, (x))) +#define sigma1_256(x) (S32(17, (x)) ^ S32(19, (x)) ^ R(10, (x))) + +/* Four of six logical functions used in SHA-384 and SHA-512: */ +#define Sigma0_512(x) (S64(28, (x)) ^ S64(34, (x)) ^ S64(39, (x))) +#define Sigma1_512(x) (S64(14, (x)) ^ S64(18, (x)) ^ S64(41, (x))) +#define sigma0_512(x) (S64(1, (x)) ^ S64(8, (x)) ^ R(7, (x))) +#define sigma1_512(x) (S64(19, (x)) ^ S64(61, (x)) ^ R(6, (x))) + + +/*** SHA-XYZ INITIAL HASH VALUES AND CONSTANTS ************************/ + +#ifdef PROTOTYPES +/* Hash constant words K for SHA-256: */ +static const UInt32_t K256[64] = { + 0x428a2f98UL, 0x71374491UL, 0xb5c0fbcfUL, 0xe9b5dba5UL, + 0x3956c25bUL, 0x59f111f1UL, 0x923f82a4UL, 0xab1c5ed5UL, + 0xd807aa98UL, 0x12835b01UL, 0x243185beUL, 0x550c7dc3UL, + 0x72be5d74UL, 0x80deb1feUL, 0x9bdc06a7UL, 0xc19bf174UL, + 0xe49b69c1UL, 0xefbe4786UL, 0x0fc19dc6UL, 0x240ca1ccUL, + 0x2de92c6fUL, 0x4a7484aaUL, 0x5cb0a9dcUL, 0x76f988daUL, + 0x983e5152UL, 0xa831c66dUL, 0xb00327c8UL, 0xbf597fc7UL, + 0xc6e00bf3UL, 0xd5a79147UL, 0x06ca6351UL, 0x14292967UL, + 0x27b70a85UL, 0x2e1b2138UL, 0x4d2c6dfcUL, 0x53380d13UL, + 0x650a7354UL, 0x766a0abbUL, 0x81c2c92eUL, 0x92722c85UL, + 0xa2bfe8a1UL, 0xa81a664bUL, 0xc24b8b70UL, 0xc76c51a3UL, + 0xd192e819UL, 0xd6990624UL, 0xf40e3585UL, 0x106aa070UL, + 0x19a4c116UL, 0x1e376c08UL, 0x2748774cUL, 0x34b0bcb5UL, + 0x391c0cb3UL, 0x4ed8aa4aUL, 0x5b9cca4fUL, 0x682e6ff3UL, + 0x748f82eeUL, 0x78a5636fUL, 0x84c87814UL, 0x8cc70208UL, + 0x90befffaUL, 0xa4506cebUL, 0xbef9a3f7UL, 0xc67178f2UL +}; + +/* Initial hash value H for SHA-256: */ +static const UInt32_t sha256_initial_hash_value[8] = { + 0x6a09e667UL, + 0xbb67ae85UL, + 0x3c6ef372UL, + 0xa54ff53aUL, + 0x510e527fUL, + 0x9b05688cUL, + 0x1f83d9abUL, + 0x5be0cd19UL +}; +#else +/* Hash constant words K for SHA-256: */ +static const UInt32_t K256[64] = { + 0x428a2f98, 0x71374491, 0xb5c0fbcf, 0xe9b5dba5, + 0x3956c25b, 0x59f111f1, 0x923f82a4, 0xab1c5ed5, + 0xd807aa98, 0x12835b01, 0x243185be, 0x550c7dc3, + 0x72be5d74, 0x80deb1fe, 0x9bdc06a7, 0xc19bf174, + 0xe49b69c1, 0xefbe4786, 0x0fc19dc6, 0x240ca1cc, + 0x2de92c6f, 0x4a7484aa, 0x5cb0a9dc, 0x76f988da, + 0x983e5152, 0xa831c66d, 0xb00327c8, 0xbf597fc7, + 0xc6e00bf3, 0xd5a79147, 0x06ca6351, 0x14292967, + 0x27b70a85, 0x2e1b2138, 0x4d2c6dfc, 0x53380d13, + 0x650a7354, 0x766a0abb, 0x81c2c92e, 0x92722c85, + 0xa2bfe8a1, 0xa81a664b, 0xc24b8b70, 0xc76c51a3, + 0xd192e819, 0xd6990624, 0xf40e3585, 0x106aa070, + 0x19a4c116, 0x1e376c08, 0x2748774c, 0x34b0bcb5, + 0x391c0cb3, 0x4ed8aa4a, 0x5b9cca4f, 0x682e6ff3, + 0x748f82ee, 0x78a5636f, 0x84c87814, 0x8cc70208, + 0x90befffa, 0xa4506ceb, 0xbef9a3f7, 0xc67178f2 +}; + +/* Initial hash value H for SHA-256: */ +static const UInt32_t sha256_initial_hash_value[8] = { + 0x6a09e667, + 0xbb67ae85, + 0x3c6ef372, + 0xa54ff53a, + 0x510e527f, + 0x9b05688c, + 0x1f83d9ab, + 0x5be0cd19 +}; +#endif + +#ifndef SHA256_ONLY +/* Hash constant words K for SHA-384 and SHA-512: */ +static const UInt64_t K512[80] = { + 0x428a2f98d728ae22ULL, 0x7137449123ef65cdULL, + 0xb5c0fbcfec4d3b2fULL, 0xe9b5dba58189dbbcULL, + 0x3956c25bf348b538ULL, 0x59f111f1b605d019ULL, + 0x923f82a4af194f9bULL, 0xab1c5ed5da6d8118ULL, + 0xd807aa98a3030242ULL, 0x12835b0145706fbeULL, + 0x243185be4ee4b28cULL, 0x550c7dc3d5ffb4e2ULL, + 0x72be5d74f27b896fULL, 0x80deb1fe3b1696b1ULL, + 0x9bdc06a725c71235ULL, 0xc19bf174cf692694ULL, + 0xe49b69c19ef14ad2ULL, 0xefbe4786384f25e3ULL, + 0x0fc19dc68b8cd5b5ULL, 0x240ca1cc77ac9c65ULL, + 0x2de92c6f592b0275ULL, 0x4a7484aa6ea6e483ULL, + 0x5cb0a9dcbd41fbd4ULL, 0x76f988da831153b5ULL, + 0x983e5152ee66dfabULL, 0xa831c66d2db43210ULL, + 0xb00327c898fb213fULL, 0xbf597fc7beef0ee4ULL, + 0xc6e00bf33da88fc2ULL, 0xd5a79147930aa725ULL, + 0x06ca6351e003826fULL, 0x142929670a0e6e70ULL, + 0x27b70a8546d22ffcULL, 0x2e1b21385c26c926ULL, + 0x4d2c6dfc5ac42aedULL, 0x53380d139d95b3dfULL, + 0x650a73548baf63deULL, 0x766a0abb3c77b2a8ULL, + 0x81c2c92e47edaee6ULL, 0x92722c851482353bULL, + 0xa2bfe8a14cf10364ULL, 0xa81a664bbc423001ULL, + 0xc24b8b70d0f89791ULL, 0xc76c51a30654be30ULL, + 0xd192e819d6ef5218ULL, 0xd69906245565a910ULL, + 0xf40e35855771202aULL, 0x106aa07032bbd1b8ULL, + 0x19a4c116b8d2d0c8ULL, 0x1e376c085141ab53ULL, + 0x2748774cdf8eeb99ULL, 0x34b0bcb5e19b48a8ULL, + 0x391c0cb3c5c95a63ULL, 0x4ed8aa4ae3418acbULL, + 0x5b9cca4f7763e373ULL, 0x682e6ff3d6b2b8a3ULL, + 0x748f82ee5defb2fcULL, 0x78a5636f43172f60ULL, + 0x84c87814a1f0ab72ULL, 0x8cc702081a6439ecULL, + 0x90befffa23631e28ULL, 0xa4506cebde82bde9ULL, + 0xbef9a3f7b2c67915ULL, 0xc67178f2e372532bULL, + 0xca273eceea26619cULL, 0xd186b8c721c0c207ULL, + 0xeada7dd6cde0eb1eULL, 0xf57d4f7fee6ed178ULL, + 0x06f067aa72176fbaULL, 0x0a637dc5a2c898a6ULL, + 0x113f9804bef90daeULL, 0x1b710b35131c471bULL, + 0x28db77f523047d84ULL, 0x32caab7b40c72493ULL, + 0x3c9ebe0a15c9bebcULL, 0x431d67c49c100d4cULL, + 0x4cc5d4becb3e42b6ULL, 0x597f299cfc657e2aULL, + 0x5fcb6fab3ad6faecULL, 0x6c44198c4a475817ULL +}; + +/* Initial hash value H for SHA-384 */ +static const UInt64_t sha384_initial_hash_value[8] = { + 0xcbbb9d5dc1059ed8ULL, + 0x629a292a367cd507ULL, + 0x9159015a3070dd17ULL, + 0x152fecd8f70e5939ULL, + 0x67332667ffc00b31ULL, + 0x8eb44a8768581511ULL, + 0xdb0c2e0d64f98fa7ULL, + 0x47b5481dbefa4fa4ULL +}; + +/* Initial hash value H for SHA-512 */ +static const UInt64_t sha512_initial_hash_value[8] = { + 0x6a09e667f3bcc908ULL, + 0xbb67ae8584caa73bULL, + 0x3c6ef372fe94f82bULL, + 0xa54ff53a5f1d36f1ULL, + 0x510e527fade682d1ULL, + 0x9b05688c2b3e6c1fULL, + 0x1f83d9abfb41bd6bULL, + 0x5be0cd19137e2179ULL +}; +#endif /* SHA256_ONLY */ + +/*** SHA-256: *********************************************************/ +void +SHA256Init(context) + SHA2_CTX *context; +{ + if (context == NULL) + return; + memcpy(context->state.st32, sha256_initial_hash_value, + sizeof (sha256_initial_hash_value)); + memset(context->buffer, 0, sizeof (context->buffer)); + context->bitcount[0] = context->bitcount[1] = 0; +} + +#ifdef SHA2_UNROLL_TRANSFORM + +/* Unrolled SHA-256 round macros: */ + +#define ROUND256_0_TO_15(a, b, c, d, e, f, g, h) do { \ + BE_8_TO_32(W256[j], data); \ + data += 4; \ + T1 = (h) + Sigma1_256((e)) + Ch((e), (f), (g)) + K256[j] + W256[j]; \ + (d) += T1; \ + (h) = T1 + Sigma0_256((a)) + Maj((a), (b), (c)); \ + j++; \ +} while (0) + +#define ROUND256(a, b, c, d, e, f, g, h) do { \ + s0 = W256[(j+1)&0x0f]; \ + s0 = sigma0_256(s0); \ + s1 = W256[(j+14)&0x0f]; \ + s1 = sigma1_256(s1); \ + T1 = (h) + Sigma1_256((e)) + Ch((e), (f), (g)) + K256[j] + \ + (W256[j&0x0f] += s1 + W256[(j+9)&0x0f] + s0); \ + (d) += T1; \ + (h) = T1 + Sigma0_256((a)) + Maj((a), (b), (c)); \ + j++; \ +} while (0) + +void +SHA256Transform(state, data) + UInt32_t state[8]; + const UInt8_t data[SHA256_BLOCK_LENGTH]; +{ + UInt32_t a, b, c, d, e, f, g, h, s0, s1; + UInt32_t T1, W256[16]; + int j; + + /* Initialize registers with the prev. intermediate value */ + a = state[0]; + b = state[1]; + c = state[2]; + d = state[3]; + e = state[4]; + f = state[5]; + g = state[6]; + h = state[7]; + + j = 0; + do { + /* Rounds 0 to 15 (unrolled): */ + ROUND256_0_TO_15(a, b, c, d, e, f, g, h); + ROUND256_0_TO_15(h, a, b, c, d, e, f, g); + ROUND256_0_TO_15(g, h, a, b, c, d, e, f); + ROUND256_0_TO_15(f, g, h, a, b, c, d, e); + ROUND256_0_TO_15(e, f, g, h, a, b, c, d); + ROUND256_0_TO_15(d, e, f, g, h, a, b, c); + ROUND256_0_TO_15(c, d, e, f, g, h, a, b); + ROUND256_0_TO_15(b, c, d, e, f, g, h, a); + } while (j < 16); + + /* Now for the remaining rounds up to 63: */ + do { + ROUND256(a, b, c, d, e, f, g, h); + ROUND256(h, a, b, c, d, e, f, g); + ROUND256(g, h, a, b, c, d, e, f); + ROUND256(f, g, h, a, b, c, d, e); + ROUND256(e, f, g, h, a, b, c, d); + ROUND256(d, e, f, g, h, a, b, c); + ROUND256(c, d, e, f, g, h, a, b); + ROUND256(b, c, d, e, f, g, h, a); + } while (j < 64); + + /* Compute the current intermediate hash value */ + state[0] += a; + state[1] += b; + state[2] += c; + state[3] += d; + state[4] += e; + state[5] += f; + state[6] += g; + state[7] += h; + + /* Clean up */ + a = b = c = d = e = f = g = h = T1 = 0; +} + +#else /* SHA2_UNROLL_TRANSFORM */ + +void +SHA256Transform(state, data) + UInt32_t state[8]; + const UInt8_t data[SHA256_BLOCK_LENGTH]; +{ + UInt32_t a, b, c, d, e, f, g, h, s0, s1; + UInt32_t T1, T2, W256[16]; + int j; + + /* Initialize registers with the prev. intermediate value */ + a = state[0]; + b = state[1]; + c = state[2]; + d = state[3]; + e = state[4]; + f = state[5]; + g = state[6]; + h = state[7]; + + j = 0; + do { + BE_8_TO_32(W256[j], data); + data += 4; + /* Apply the SHA-256 compression function to update a..h */ + T1 = h + Sigma1_256(e) + Ch(e, f, g) + K256[j] + W256[j]; + T2 = Sigma0_256(a) + Maj(a, b, c); + h = g; + g = f; + f = e; + e = d + T1; + d = c; + c = b; + b = a; + a = T1 + T2; + + j++; + } while (j < 16); + + do { + /* Part of the message block expansion: */ + s0 = W256[(j+1)&0x0f]; + s0 = sigma0_256(s0); + s1 = W256[(j+14)&0x0f]; + s1 = sigma1_256(s1); + + /* Apply the SHA-256 compression function to update a..h */ + T1 = h + Sigma1_256(e) + Ch(e, f, g) + K256[j] + + (W256[j&0x0f] += s1 + W256[(j+9)&0x0f] + s0); + T2 = Sigma0_256(a) + Maj(a, b, c); + h = g; + g = f; + f = e; + e = d + T1; + d = c; + c = b; + b = a; + a = T1 + T2; + + j++; + } while (j < 64); + + /* Compute the current intermediate hash value */ + state[0] += a; + state[1] += b; + state[2] += c; + state[3] += d; + state[4] += e; + state[5] += f; + state[6] += g; + state[7] += h; + + /* Clean up */ + a = b = c = d = e = f = g = h = T1 = T2 = 0; +} + +#endif /* SHA2_UNROLL_TRANSFORM */ + +void +SHA256Update(context, data, len) + SHA2_CTX *context; + const UInt8_t *data; + size_t len; +{ + size_t freespace, usedspace; + + /* Calling with no data is valid (we do nothing) */ + if (len == 0) + return; + + usedspace = (context->bitcount[0] >> 3) % SHA256_BLOCK_LENGTH; + if (usedspace > 0) { + /* Calculate how much free space is available in the buffer */ + freespace = SHA256_BLOCK_LENGTH - usedspace; + + if (len >= freespace) { + /* Fill the buffer completely and process it */ + memcpy(&context->buffer[usedspace], data, freespace); + context->bitcount[0] += freespace << 3; +#ifndef HAVE_LONGLONG + if (context->bitcount[0] < (freespace << 3)) + context->bitcount[1] += 1; +#endif + len -= freespace; + data += freespace; + SHA256Transform(context->state.st32, context->buffer); + } else { + /* The buffer is not yet full */ + memcpy(&context->buffer[usedspace], data, len); + context->bitcount[0] += len << 3; +#ifndef HAVE_LONGLONG + if (context->bitcount[0] < (len << 3)) + context->bitcount[1] += 1; +#endif + /* Clean up: */ + usedspace = freespace = 0; + return; + } + } + while (len >= SHA256_BLOCK_LENGTH) { + /* Process as many complete blocks as we can */ + SHA256Transform(context->state.st32, data); + context->bitcount[0] += SHA256_BLOCK_LENGTH << 3; +#ifndef HAVE_LONGLONG + if (context->bitcount[0] < (SHA256_BLOCK_LENGTH << 3)) + context->bitcount[1] += 1; +#endif + len -= SHA256_BLOCK_LENGTH; + data += SHA256_BLOCK_LENGTH; + } + if (len > 0) { + /* There's left-overs, so save 'em */ + memcpy(context->buffer, data, len); + context->bitcount[0] += len << 3; +#ifndef HAVE_LONGLONG + if (context->bitcount[0] < (len << 3)) + context->bitcount[1] += 1; +#endif + } + /* Clean up: */ + usedspace = freespace = 0; +} + +void +SHA256Pad(context) + SHA2_CTX *context; +{ + unsigned int usedspace; + + usedspace = (context->bitcount[0] >> 3) % SHA256_BLOCK_LENGTH; + if (usedspace > 0) { + /* Begin padding with a 1 bit: */ + context->buffer[usedspace++] = 0x80; + + if (usedspace <= SHA256_SHORT_BLOCK_LENGTH) { + /* Set-up for the last transform: */ + memset(&context->buffer[usedspace], 0, + SHA256_SHORT_BLOCK_LENGTH - usedspace); + } else { + if (usedspace < SHA256_BLOCK_LENGTH) { + memset(&context->buffer[usedspace], 0, + SHA256_BLOCK_LENGTH - usedspace); + } + /* Do second-to-last transform: */ + SHA256Transform(context->state.st32, context->buffer); + + /* Prepare for last transform: */ + memset(context->buffer, 0, SHA256_SHORT_BLOCK_LENGTH); + } + } else { + /* Set-up for the last transform: */ + memset(context->buffer, 0, SHA256_SHORT_BLOCK_LENGTH); + + /* Begin padding with a 1 bit: */ + *context->buffer = 0x80; + } + /* Store the length of input data (in bits) in big endian format: */ +#ifdef HAVE_LONGLONG + BE_64_TO_8(&context->buffer[SHA256_SHORT_BLOCK_LENGTH], + context->bitcount[0]); +#else + BE_64A_TO_8(&context->buffer[SHA256_SHORT_BLOCK_LENGTH], + context->bitcount); +#endif + + /* Final transform: */ + SHA256Transform(context->state.st32, context->buffer); + + /* Clean up: */ + usedspace = 0; +} + +void +SHA256Final(digest, context) + UInt8_t digest[SHA256_DIGEST_LENGTH]; + SHA2_CTX *context; +{ + SHA256Pad(context); + + /* If no digest buffer is passed, we don't bother doing this: */ + if (digest != NULL) { +#ifndef WORDS_BIGENDIAN + int i; + + /* Convert TO host byte order */ + for (i = 0; i < 8; i++) + BE_32_TO_8(digest + i * 4, context->state.st32[i]); +#else + memcpy(digest, context->state.st32, SHA256_DIGEST_LENGTH); +#endif + memset(context, 0, sizeof (*context)); + } +} + + +#ifndef SHA256_ONLY +/*** SHA-512: *********************************************************/ +void +SHA512Init(context) + SHA2_CTX *context; +{ + if (context == NULL) + return; + memcpy(context->state.st64, sha512_initial_hash_value, + sizeof (sha512_initial_hash_value)); + memset(context->buffer, 0, sizeof (context->buffer)); + context->bitcount[0] = context->bitcount[1] = 0; +} + +#ifdef SHA2_UNROLL_TRANSFORM + +/* Unrolled SHA-512 round macros: */ + +#define ROUND512_0_TO_15(a, b, c, d, e, f, g, h) do { \ + BE_8_TO_64(W512[j], data); \ + data += 8; \ + T1 = (h) + Sigma1_512((e)) + Ch((e), (f), (g)) + K512[j] + W512[j]; \ + (d) += T1; \ + (h) = T1 + Sigma0_512((a)) + Maj((a), (b), (c)); \ + j++; \ +} while (0) + + +#define ROUND512(a, b, c, d, e, f, g, h) do { \ + s0 = W512[(j+1)&0x0f]; \ + s0 = sigma0_512(s0); \ + s1 = W512[(j+14)&0x0f]; \ + s1 = sigma1_512(s1); \ + T1 = (h) + Sigma1_512((e)) + Ch((e), (f), (g)) + K512[j] + \ + (W512[j&0x0f] += s1 + W512[(j+9)&0x0f] + s0); \ + (d) += T1; \ + (h) = T1 + Sigma0_512((a)) + Maj((a), (b), (c)); \ + j++; \ +} while (0) + +void +SHA512Transform(state, data) + UInt64_t state[8]; + const UInt8_t data[SHA512_BLOCK_LENGTH]; +{ + UInt64_t a, b, c, d, e, f, g, h, s0, s1; + UInt64_t T1, W512[16]; + int j; + + /* Initialize registers with the prev. intermediate value */ + a = state[0]; + b = state[1]; + c = state[2]; + d = state[3]; + e = state[4]; + f = state[5]; + g = state[6]; + h = state[7]; + + j = 0; + do { + /* Rounds 0 to 15 (unrolled): */ + ROUND512_0_TO_15(a, b, c, d, e, f, g, h); + ROUND512_0_TO_15(h, a, b, c, d, e, f, g); + ROUND512_0_TO_15(g, h, a, b, c, d, e, f); + ROUND512_0_TO_15(f, g, h, a, b, c, d, e); + ROUND512_0_TO_15(e, f, g, h, a, b, c, d); + ROUND512_0_TO_15(d, e, f, g, h, a, b, c); + ROUND512_0_TO_15(c, d, e, f, g, h, a, b); + ROUND512_0_TO_15(b, c, d, e, f, g, h, a); + } while (j < 16); + + /* Now for the remaining rounds up to 79: */ + do { + ROUND512(a, b, c, d, e, f, g, h); + ROUND512(h, a, b, c, d, e, f, g); + ROUND512(g, h, a, b, c, d, e, f); + ROUND512(f, g, h, a, b, c, d, e); + ROUND512(e, f, g, h, a, b, c, d); + ROUND512(d, e, f, g, h, a, b, c); + ROUND512(c, d, e, f, g, h, a, b); + ROUND512(b, c, d, e, f, g, h, a); + } while (j < 80); + + /* Compute the current intermediate hash value */ + state[0] += a; + state[1] += b; + state[2] += c; + state[3] += d; + state[4] += e; + state[5] += f; + state[6] += g; + state[7] += h; + + /* Clean up */ + a = b = c = d = e = f = g = h = T1 = 0; +} + +#else /* SHA2_UNROLL_TRANSFORM */ + +void +SHA512Transform(state, data) + UInt64_t state[8]; + const UInt8_t data[SHA512_BLOCK_LENGTH]; +{ + UInt64_t a, b, c, d, e, f, g, h, s0, s1; + UInt64_t T1, T2, W512[16]; + int j; + + /* Initialize registers with the prev. intermediate value */ + a = state[0]; + b = state[1]; + c = state[2]; + d = state[3]; + e = state[4]; + f = state[5]; + g = state[6]; + h = state[7]; + + j = 0; + do { + BE_8_TO_64(W512[j], data); + data += 8; + /* Apply the SHA-512 compression function to update a..h */ + T1 = h + Sigma1_512(e) + Ch(e, f, g) + K512[j] + W512[j]; + T2 = Sigma0_512(a) + Maj(a, b, c); + h = g; + g = f; + f = e; + e = d + T1; + d = c; + c = b; + b = a; + a = T1 + T2; + + j++; + } while (j < 16); + + do { + /* Part of the message block expansion: */ + s0 = W512[(j+1)&0x0f]; + s0 = sigma0_512(s0); + s1 = W512[(j+14)&0x0f]; + s1 = sigma1_512(s1); + + /* Apply the SHA-512 compression function to update a..h */ + T1 = h + Sigma1_512(e) + Ch(e, f, g) + K512[j] + + (W512[j&0x0f] += s1 + W512[(j+9)&0x0f] + s0); + T2 = Sigma0_512(a) + Maj(a, b, c); + h = g; + g = f; + f = e; + e = d + T1; + d = c; + c = b; + b = a; + a = T1 + T2; + + j++; + } while (j < 80); + + /* Compute the current intermediate hash value */ + state[0] += a; + state[1] += b; + state[2] += c; + state[3] += d; + state[4] += e; + state[5] += f; + state[6] += g; + state[7] += h; + + /* Clean up */ + a = b = c = d = e = f = g = h = T1 = T2 = 0; +} + +#endif /* SHA2_UNROLL_TRANSFORM */ + +void +SHA512Update(context, data, len) + SHA2_CTX *context; + const UInt8_t *data; + size_t len; +{ + size_t freespace, usedspace; + + /* Calling with no data is valid (we do nothing) */ + if (len == 0) + return; + + usedspace = (context->bitcount[0] >> 3) % SHA512_BLOCK_LENGTH; + if (usedspace > 0) { + /* Calculate how much free space is available in the buffer */ + freespace = SHA512_BLOCK_LENGTH - usedspace; + + if (len >= freespace) { + /* Fill the buffer completely and process it */ + memcpy(&context->buffer[usedspace], data, freespace); + ADDINC128(context->bitcount, freespace << 3); + len -= freespace; + data += freespace; + SHA512Transform(context->state.st64, context->buffer); + } else { + /* The buffer is not yet full */ + memcpy(&context->buffer[usedspace], data, len); + ADDINC128(context->bitcount, len << 3); + /* Clean up: */ + usedspace = freespace = 0; + return; + } + } + while (len >= SHA512_BLOCK_LENGTH) { + /* Process as many complete blocks as we can */ + SHA512Transform(context->state.st64, data); + ADDINC128(context->bitcount, SHA512_BLOCK_LENGTH << 3); + len -= SHA512_BLOCK_LENGTH; + data += SHA512_BLOCK_LENGTH; + } + if (len > 0) { + /* There's left-overs, so save 'em */ + memcpy(context->buffer, data, len); + ADDINC128(context->bitcount, len << 3); + } + /* Clean up: */ + usedspace = freespace = 0; +} + +void +SHA512Pad(context) + SHA2_CTX *context; +{ + unsigned int usedspace; + + usedspace = (context->bitcount[0] >> 3) % SHA512_BLOCK_LENGTH; + if (usedspace > 0) { + /* Begin padding with a 1 bit: */ + context->buffer[usedspace++] = 0x80; + + if (usedspace <= SHA512_SHORT_BLOCK_LENGTH) { + /* Set-up for the last transform: */ + memset(&context->buffer[usedspace], 0, SHA512_SHORT_BLOCK_LENGTH - usedspace); + } else { + if (usedspace < SHA512_BLOCK_LENGTH) { + memset(&context->buffer[usedspace], 0, SHA512_BLOCK_LENGTH - usedspace); + } + /* Do second-to-last transform: */ + SHA512Transform(context->state.st64, context->buffer); + + /* And set-up for the last transform: */ + memset(context->buffer, 0, SHA512_BLOCK_LENGTH - 2); + } + } else { + /* Prepare for final transform: */ + memset(context->buffer, 0, SHA512_SHORT_BLOCK_LENGTH); + + /* Begin padding with a 1 bit: */ + *context->buffer = 0x80; + } + /* Store the length of input data (in bits) in big endian format: */ + BE_64_TO_8(&context->buffer[SHA512_SHORT_BLOCK_LENGTH], + context->bitcount[1]); + BE_64_TO_8(&context->buffer[SHA512_SHORT_BLOCK_LENGTH + 8], + context->bitcount[0]); + + /* Final transform: */ + SHA512Transform(context->state.st64, context->buffer); + + /* Clean up: */ + usedspace = 0; +} + +void +SHA512Final(digest, context) + UInt8_t digest[SHA512_DIGEST_LENGTH]; + SHA2_CTX *context; +{ + SHA512Pad(context); + + /* If no digest buffer is passed, we don't bother doing this: */ + if (digest != NULL) { +#ifndef WORDS_BIGENDIAN + int i; + + /* Convert TO host byte order */ + for (i = 0; i < 8; i++) + BE_64_TO_8(digest + i * 8, context->state.st64[i]); +#else + memcpy(digest, context->state.st64, SHA512_DIGEST_LENGTH); +#endif + memset(context, 0, sizeof (*context)); + } +} + + +/*** SHA-384: *********************************************************/ +void +SHA384Init(context) + SHA2_CTX *context; +{ + if (context == NULL) + return; + memcpy(context->state.st64, sha384_initial_hash_value, + sizeof (sha384_initial_hash_value)); + memset(context->buffer, 0, sizeof (context->buffer)); + context->bitcount[0] = context->bitcount[1] = 0; +} + +/* + * The Cygwin compile environment incorrectly implements #pragma weak. + * The weak symbols are only defined as local symbols making it impossible + * to use them from outside the scope of this source file. + * A platform that allows linking with global symbols has HAVE_LINK_WEAK + * defined. + */ +#if defined(HAVE_PRAGMA_WEAK) && defined(HAVE_LINK_WEAK) +#pragma weak SHA384Transform = SHA512Transform +#pragma weak SHA384Update = SHA512Update +#pragma weak SHA384Pad = SHA512Pad +#else +void +SHA384Transform(state, data) + UInt64_t state[8]; + const UInt8_t data[SHA512_BLOCK_LENGTH]; +{ + SHA512Transform(state, data); +} + +void +SHA384Update(context, data, len) + SHA2_CTX *context; + const UInt8_t *data; + size_t len; +{ + SHA512Update(context, data, len); +} + +void +SHA384Pad(context) + SHA2_CTX *context; +{ + SHA512Pad(context); +} +#endif + +void +SHA384Final(digest, context) + UInt8_t digest[SHA384_DIGEST_LENGTH]; + SHA2_CTX *context; +{ + SHA384Pad(context); + + /* If no digest buffer is passed, we don't bother doing this: */ + if (digest != NULL) { +#ifndef WORDS_BIGENDIAN + int i; + + /* Convert TO host byte order */ + for (i = 0; i < 6; i++) + BE_64_TO_8(digest + i * 8, context->state.st64[i]); +#else + memcpy(digest, context->state.st64, SHA384_DIGEST_LENGTH); +#endif + } + + /* Zero out state data */ + memset(context, 0, sizeof (*context)); +} +#endif /* SHA256_ONLY */ diff -Nru cdrtools-2.01.01a33/libmdigest/sha3.c cdrtools-3.02a09/libmdigest/sha3.c --- cdrtools-2.01.01a33/libmdigest/sha3.c 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/libmdigest/sha3.c 2015-12-27 15:50:57.000000000 +0000 @@ -0,0 +1,507 @@ +/* @(#)sha3.c 1.4 15/12/27 2015 J. Schilling */ +#include +#ifndef lint +static UConst char sccsid[] = + "@(#)sha3.c 1.4 15/12/27 2015 J. Schilling"; +#endif +/* + * SHA3 hash code taken from + * https://github.com/rhash/RHash/tree/master/librhash + * + * Portions Copyright (c) 2015 J. Schilling + */ + +/* + * sha3.c - an implementation of Secure Hash Algorithm 3 (Keccak). + * based on the + * The Keccak SHA-3 submission. Submission to NIST (Round 3), 2011 + * by Guido Bertoni, Joan Daemen, Michaël Peeters and Gilles Van Assche + * + * Copyright: 2013 Aleksey Kravchenko + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY + * or FITNESS FOR A PARTICULAR PURPOSE. Use this program at your own risk! + */ + +#include +#include +#include "byte_order.h" +#include + +#ifdef HAVE_LONGLONG + +#if !defined(HAVE_MEMCPY) || !defined(HAVE_MEMSET) +#include +#endif +#if !defined(HAVE_MEMCPY) && !defined(memcpy) +#define memcpy(s1, s2, n) movebytes(s2, s1, n) +#endif +#if !defined(HAVE_MEMSET) && !defined(memset) +#define memset(s, c, n) fillbytes(s, n, c) +#endif + +static void rhash_keccak_init __PR((sha3_ctx *ctx, unsigned bits)); +static void keccak_theta __PR((UInt64_t *A)); +static void keccak_pi __PR((UInt64_t *A)); +static void keccak_chi __PR((UInt64_t *A)); +static void rhash_sha3_permutation __PR((UInt64_t *state)); +static void rhash_sha3_process_block __PR((UInt64_t hash[25], + const UInt64_t *block, + size_t block_size)); + +/* + * The Cygwin compile environment incorrectly implements #pragma weak. + * The weak symbols are only defined as local symbols making it impossible + * to use them from outside the scope of this source file. + * A platform that allows linking with global symbols has HAVE_LINK_WEAK + * defined. + */ +#if defined(HAVE_PRAGMA_WEAK) && defined(HAVE_LINK_WEAK) +#pragma weak SHA3_224_Init = rhash_sha3_224_init +#pragma weak SHA3_256_Init = rhash_sha3_256_init +#pragma weak SHA3_384_Init = rhash_sha3_384_init +#pragma weak SHA3_512_Init = rhash_sha3_512_init +#pragma weak SHA3_Update = rhash_sha3_update +#else + +void SHA3_224_Init __PR((SHA3_CTX *ctx)); +void SHA3_256_Init __PR((SHA3_CTX *ctx)); +void SHA3_384_Init __PR((SHA3_CTX *ctx)); +void SHA3_512_Init __PR((SHA3_CTX *ctx)); +void SHA3_Update __PR((SHA3_CTX *ctx, + const unsigned char *msg, + size_t size)); + +void +SHA3_224_Init(ctx) + SHA3_CTX *ctx; +{ + rhash_sha3_224_init(ctx); +} + +void +SHA3_256_Init(ctx) + SHA3_CTX *ctx; +{ + rhash_sha3_256_init(ctx); +} + +void +SHA3_384_Init(ctx) + SHA3_CTX *ctx; +{ + rhash_sha3_384_init(ctx); +} + +void +SHA3_512_Init(ctx) + SHA3_CTX *ctx; +{ + rhash_sha3_512_init(ctx); +} + +void +SHA3_Update(ctx, msg, size) + SHA3_CTX *ctx; + const unsigned char *msg; + size_t size; +{ + rhash_sha3_update(ctx, msg, size); +} +#endif /* defined(HAVE_PRAGMA_WEAK) && defined(HAVE_LINK_WEAK) */ + +/* constants */ +#define NumberOfRounds 24 + +/* SHA3 (Keccak) constants for 24 rounds */ +static UInt64_t keccak_round_constants[NumberOfRounds] = { + UI64(0x0000000000000001), UI64(0x0000000000008082), + UI64(0x800000000000808A), UI64(0x8000000080008000), + UI64(0x000000000000808B), UI64(0x0000000080000001), + UI64(0x8000000080008081), UI64(0x8000000000008009), + UI64(0x000000000000008A), UI64(0x0000000000000088), + UI64(0x0000000080008009), UI64(0x000000008000000A), + UI64(0x000000008000808B), UI64(0x800000000000008B), + UI64(0x8000000000008089), UI64(0x8000000000008003), + UI64(0x8000000000008002), UI64(0x8000000000000080), + UI64(0x000000000000800A), UI64(0x800000008000000A), + UI64(0x8000000080008081), UI64(0x8000000000008080), + UI64(0x0000000080000001), UI64(0x8000000080008008) +}; + +/* Initializing a sha3 context for given number of output bits */ +static void +rhash_keccak_init(ctx, bits) + sha3_ctx *ctx; + unsigned bits; +{ + /* NB: The Keccak capacity parameter = bits * 2 */ + unsigned rate = 1600 - bits * 2; + + memset(ctx, 0, sizeof (sha3_ctx)); + ctx->block_size = rate / 8; + assert(rate <= 1600 && (rate % 64) == 0); +} + +/* + * Initialize context before calculating hash. + * + * @param ctx context to initialize + */ +void +rhash_sha3_224_init(ctx) + sha3_ctx *ctx; +{ + rhash_keccak_init(ctx, 224); +} + +/* + * Initialize context before calculating hash. + * + * @param ctx context to initialize + */ +void +rhash_sha3_256_init(ctx) + sha3_ctx *ctx; +{ + rhash_keccak_init(ctx, 256); +} + +/* + * Initialize context before calculating hash. + * + * @param ctx context to initialize + */ +void +rhash_sha3_384_init(ctx) + sha3_ctx *ctx; +{ + rhash_keccak_init(ctx, 384); +} + +/* + * Initialize context before calculating hash. + * + * @param ctx context to initialize + */ +void +rhash_sha3_512_init(ctx) + sha3_ctx *ctx; +{ + rhash_keccak_init(ctx, 512); +} + +/* Keccak theta() transformation */ +static void +keccak_theta(A) + UInt64_t *A; +{ + unsigned int x; + UInt64_t C[5], D[5]; + + for (x = 0; x < 5; x++) { + C[x] = A[x] ^ A[x + 5] ^ A[x + 10] ^ A[x + 15] ^ A[x + 20]; + } + D[0] = ROTL64(C[1], 1) ^ C[4]; + D[1] = ROTL64(C[2], 1) ^ C[0]; + D[2] = ROTL64(C[3], 1) ^ C[1]; + D[3] = ROTL64(C[4], 1) ^ C[2]; + D[4] = ROTL64(C[0], 1) ^ C[3]; + + for (x = 0; x < 5; x++) { + A[x] ^= D[x]; + A[x + 5] ^= D[x]; + A[x + 10] ^= D[x]; + A[x + 15] ^= D[x]; + A[x + 20] ^= D[x]; + } +} + +/* Keccak pi() transformation */ +static void +keccak_pi(A) + UInt64_t *A; +{ + UInt64_t A1; + A1 = A[1]; + A[ 1] = A[ 6]; + A[ 6] = A[ 9]; + A[ 9] = A[22]; + A[22] = A[14]; + A[14] = A[20]; + A[20] = A[ 2]; + A[ 2] = A[12]; + A[12] = A[13]; + A[13] = A[19]; + A[19] = A[23]; + A[23] = A[15]; + A[15] = A[ 4]; + A[ 4] = A[24]; + A[24] = A[21]; + A[21] = A[ 8]; + A[ 8] = A[16]; + A[16] = A[ 5]; + A[ 5] = A[ 3]; + A[ 3] = A[18]; + A[18] = A[17]; + A[17] = A[11]; + A[11] = A[ 7]; + A[ 7] = A[10]; + A[10] = A1; + /* note: A[ 0] is left as is */ +} + +/* Keccak chi() transformation */ +static void +keccak_chi(A) + UInt64_t *A; +{ + int i; + for (i = 0; i < 25; i += 5) { + UInt64_t A0 = A[0 + i], A1 = A[1 + i]; + A[0 + i] ^= ~A1 & A[2 + i]; + A[1 + i] ^= ~A[2 + i] & A[3 + i]; + A[2 + i] ^= ~A[3 + i] & A[4 + i]; + A[3 + i] ^= ~A[4 + i] & A0; + A[4 + i] ^= ~A0 & A1; + } +} + +static void +rhash_sha3_permutation(state) + UInt64_t *state; +{ + int round; + for (round = 0; round < NumberOfRounds; round++) + { + keccak_theta(state); + + /* apply Keccak rho() transformation */ + state[ 1] = ROTL64(state[ 1], 1); + state[ 2] = ROTL64(state[ 2], 62); + state[ 3] = ROTL64(state[ 3], 28); + state[ 4] = ROTL64(state[ 4], 27); + state[ 5] = ROTL64(state[ 5], 36); + state[ 6] = ROTL64(state[ 6], 44); + state[ 7] = ROTL64(state[ 7], 6); + state[ 8] = ROTL64(state[ 8], 55); + state[ 9] = ROTL64(state[ 9], 20); + state[10] = ROTL64(state[10], 3); + state[11] = ROTL64(state[11], 10); + state[12] = ROTL64(state[12], 43); + state[13] = ROTL64(state[13], 25); + state[14] = ROTL64(state[14], 39); + state[15] = ROTL64(state[15], 41); + state[16] = ROTL64(state[16], 45); + state[17] = ROTL64(state[17], 15); + state[18] = ROTL64(state[18], 21); + state[19] = ROTL64(state[19], 8); + state[20] = ROTL64(state[20], 18); + state[21] = ROTL64(state[21], 2); + state[22] = ROTL64(state[22], 61); + state[23] = ROTL64(state[23], 56); + state[24] = ROTL64(state[24], 14); + + keccak_pi(state); + keccak_chi(state); + + /* apply iota(state, round) */ + *state ^= keccak_round_constants[round]; + } +} + +/* + * The core transformation. Process the specified block of data. + * + * @param hash the algorithm state + * @param block the message block to process + * @param block_size the size of the processed block in bytes + */ +static void +rhash_sha3_process_block(hash, block, block_size) + UInt64_t hash[25]; + const UInt64_t *block; + size_t block_size; +{ + /* expanded loop */ + hash[ 0] ^= le2me_64(block[ 0]); + hash[ 1] ^= le2me_64(block[ 1]); + hash[ 2] ^= le2me_64(block[ 2]); + hash[ 3] ^= le2me_64(block[ 3]); + hash[ 4] ^= le2me_64(block[ 4]); + hash[ 5] ^= le2me_64(block[ 5]); + hash[ 6] ^= le2me_64(block[ 6]); + hash[ 7] ^= le2me_64(block[ 7]); + hash[ 8] ^= le2me_64(block[ 8]); + /* if not sha3-512 */ + if (block_size > 72) { + hash[ 9] ^= le2me_64(block[ 9]); + hash[10] ^= le2me_64(block[10]); + hash[11] ^= le2me_64(block[11]); + hash[12] ^= le2me_64(block[12]); + /* if not sha3-384 */ + if (block_size > 104) { + hash[13] ^= le2me_64(block[13]); + hash[14] ^= le2me_64(block[14]); + hash[15] ^= le2me_64(block[15]); + hash[16] ^= le2me_64(block[16]); + /* if not sha3-256 */ + if (block_size > 136) { + hash[17] ^= le2me_64(block[17]); +#ifdef FULL_SHA3_FAMILY_SUPPORT + /* if not sha3-224 */ + if (block_size > 144) { + hash[18] ^= le2me_64(block[18]); + hash[19] ^= le2me_64(block[19]); + hash[20] ^= le2me_64(block[20]); + hash[21] ^= le2me_64(block[21]); + hash[22] ^= le2me_64(block[22]); + hash[23] ^= le2me_64(block[23]); + hash[24] ^= le2me_64(block[24]); + } +#endif + } + } + } + /* make a permutation of the hash */ + rhash_sha3_permutation(hash); +} + +#define SHA3_FINALIZED 0x80000000 + +/* + * Calculate message hash. + * Can be called repeatedly with chunks of the message to be hashed. + * + * @param ctx the algorithm context containing current hashing state + * @param msg message chunk + * @param size length of the message chunk + */ +void +rhash_sha3_update(ctx, msg, size) + sha3_ctx *ctx; + const unsigned char *msg; + size_t size; +{ + size_t idx = (size_t)ctx->rest; + size_t block_size = (size_t)ctx->block_size; + + if (ctx->rest & SHA3_FINALIZED) + return; /* too late for additional input */ + ctx->rest = (unsigned)((ctx->rest + size) % block_size); + + /* fill partial block */ + if (idx) { + size_t left = block_size - idx; + memcpy((char *)ctx->message + idx, msg, + (size < left ? size : left)); + if (size < left) + return; + + /* process partial block */ + rhash_sha3_process_block(ctx->hash, ctx->message, block_size); + msg += left; + size -= left; + } + while (size >= block_size) { + UInt64_t *aligned_message_block; + if (IS_ALIGNED_64(msg)) { + /* + * the most common case is processing of an already + * aligned message without copying it + */ + aligned_message_block = (UInt64_t *)msg; + } else { + memcpy(ctx->message, msg, block_size); + aligned_message_block = ctx->message; + } + + rhash_sha3_process_block(ctx->hash, aligned_message_block, + block_size); + msg += block_size; + size -= block_size; + } + if (size) { + memcpy(ctx->message, msg, size); /* save leftovers */ + } +} + +/* + * Store calculated hash into the given array. + * + * @param ctx the algorithm context containing current hashing state + * @param result calculated hash in binary form + */ +void +rhash_sha3_final(ctx, result) + sha3_ctx *ctx; + unsigned char *result; +{ + size_t digest_length = 100 - ctx->block_size / 2; + const size_t block_size = ctx->block_size; + + if (!(ctx->rest & SHA3_FINALIZED)) + { + /* clear the rest of the data queue */ + memset((char *)ctx->message + ctx->rest, 0, + block_size - ctx->rest); + ((char *)ctx->message)[ctx->rest] |= 0x06; + ((char *)ctx->message)[block_size - 1] |= 0x80; + + /* process final block */ + rhash_sha3_process_block(ctx->hash, ctx->message, block_size); + ctx->rest = SHA3_FINALIZED; /* mark context as finalized */ + } + + assert(block_size > digest_length); + if (result) me64_to_le_str(result, ctx->hash, digest_length); +} + +void +SHA3_Final(result, ctx) + UInt8_t *result; + SHA3_CTX *ctx; +{ + rhash_sha3_final(ctx, result); +} + +#ifdef USE_KECCAK +/* + * Store calculated hash into the given array. + * + * @param ctx the algorithm context containing current hashing state + * @param result calculated hash in binary form + */ +void +rhash_keccak_final(sha3_ctx *ctx, unsigned char *result) +{ + size_t digest_length = 100 - ctx->block_size / 2; + const size_t block_size = ctx->block_size; + + if (!(ctx->rest & SHA3_FINALIZED)) { + /* clear the rest of the data queue */ + memset((char *)ctx->message + ctx->rest, 0, + block_size - ctx->rest); + ((char *)ctx->message)[ctx->rest] |= 0x01; + ((char *)ctx->message)[block_size - 1] |= 0x80; + + /* process final block */ + rhash_sha3_process_block(ctx->hash, ctx->message, block_size); + ctx->rest = SHA3_FINALIZED; /* mark context as finalized */ + } + + assert(block_size > digest_length); + if (result) + me64_to_le_str(result, ctx->hash, digest_length); +} +#endif /* USE_KECCAK */ + +#endif /* HAVE_LONGLONG */ diff -Nru cdrtools-2.01.01a33/libmdigest/shlmdigest.mk cdrtools-3.02a09/libmdigest/shlmdigest.mk --- cdrtools-2.01.01a33/libmdigest/shlmdigest.mk 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/libmdigest/shlmdigest.mk 2010-06-23 20:49:56.000000000 +0000 @@ -0,0 +1,36 @@ +#ident "@(#)shlmdigest.mk 1.4 10/06/23 " +########################################################################### +SRCROOT= .. +RULESDIR= RULES +include $(SRCROOT)/$(RULESDIR)/rules.top +########################################################################### + +SUBARCHDIR= /pic +#.SEARCHLIST: . $(ARCHDIR) stdio $(ARCHDIR) +#VPATH= .:stdio:$(ARCHDIR) +INSDIR= lib +TARGETLIB= mdigest +#CPPOPTS += -Ispecincl +CPPOPTS += -DUSE_PG +# +# Selectively increase the opimisation for libmdigest for better performance +# +# The code has been tested for correctness with this level of optimisation +# If your GCC creates defective code, you found a GCC bug that should +# be reported to the GCC people. As a workaround, you may remove the next +# lines to fall back to the standard optimisation level. +# +_XARCH_OPT= $(OARCH:%cc64=$(SUNPROCOPT64)) +XARCH_OPT= $(_XARCH_OPT:%cc=$(XARCH_GEN)) + +SUNPROCOPTOPT= -fast $(XARCH_OPT) +GCCOPTOPT= -O3 -fexpensive-optimizations +# +include Targets +LIBS= -lschily -lc + +########################################################################### +include $(SRCROOT)/$(RULESDIR)/rules.shl +########################################################################### +#CC= echo " ==> COMPILING \"$@\""; cc +########################################################################### diff -Nru cdrtools-2.01.01a33/libmdigest/Targets cdrtools-3.02a09/libmdigest/Targets --- cdrtools-2.01.01a33/libmdigest/Targets 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/libmdigest/Targets 2015-11-22 11:38:18.000000000 +0000 @@ -0,0 +1,3 @@ +CFILES= md4.c md5.c rmd160.c sha1.c sha2.c sha3.c byte_order.c + +CPPOPTS += -DSHA2_UNROLL_TRANSFORM diff -Nru cdrtools-2.01.01a33/libparanoia/cdda_paranoia.h cdrtools-3.02a09/libparanoia/cdda_paranoia.h --- cdrtools-2.01.01a33/libparanoia/cdda_paranoia.h 2007-07-28 13:01:57.000000000 +0000 +++ cdrtools-3.02a09/libparanoia/cdda_paranoia.h 2013-12-22 12:05:47.000000000 +0000 @@ -1,8 +1,8 @@ -/* @(#)cdda_paranoia.h 1.24 07/07/28 J. Schilling from cdparanoia-III-alpha9.8 */ +/* @(#)cdda_paranoia.h 1.29 13/12/22 J. Schilling from cdparanoia-III-alpha9.8 */ /* * CopyPolicy: GNU Lesser General Public License v2.1 applies - * Copyright (C) 1997-2001 by Monty (xiphmont@mit.edu) - * Copyright (C) 2002-2006 by J. Schilling + * Copyright (C) 1997-2001,2008 by Monty (xiphmont@mit.edu) + * Copyright (C) 2002-2013 by J. Schilling */ #ifndef _CDROM_PARANOIA_H @@ -15,20 +15,20 @@ #include #endif -#ifndef __GNUC__ -#define inline -#endif - #define CD_FRAMESIZE_RAW 2352 #define CD_FRAMEWORDS (CD_FRAMESIZE_RAW/2) +#define CD_C2PTR_RAW (CD_FRAMESIZE_RAW/8) +#define CD_C2SIZE_RAW (CD_FRAMESIZE_RAW + CD_C2PTR_RAW) + +#define CD_READAHEAD 150 /* # of sectors to read for a block */ /* * Second parameter of the callback function */ #define PARANOIA_CB_READ 0 /* Read off adjust ??? */ #define PARANOIA_CB_VERIFY 1 /* Verifying jitter */ -#define PARANOIA_CB_FIXUP_EDGE 2 /* Fixed edge jitter */ -#define PARANOIA_CB_FIXUP_ATOM 3 /* Fixed atom jitter */ +#define PARANOIA_CB_FIXUP_EDGE 2 /* Fixed jitter at edge */ +#define PARANOIA_CB_FIXUP_ATOM 3 /* Fixed jitter in atomic read */ #define PARANOIA_CB_SCRATCH 4 /* Unsupported */ #define PARANOIA_CB_REPAIR 5 /* Unsupported */ #define PARANOIA_CB_SKIP 6 /* Skip exhausted retry */ @@ -38,11 +38,17 @@ #define PARANOIA_CB_FIXUP_DROPPED 10 /* Fixed dropped bytes */ #define PARANOIA_CB_FIXUP_DUPED 11 /* Fixed duplicate bytes */ #define PARANOIA_CB_READERR 12 /* Hard read error */ +#define PARANOIA_CB_CACHEERR 13 /* Cache seek positional error */ +#define PARANOIA_CB_SECS 14 /* # of sectors with last read */ +#define PARANOIA_CB_C2ERR 15 /* # of reads with C2 errors */ +#define PARANOIA_CB_C2BYTES 16 /* # of bytes with C2 errors */ +#define PARANOIA_CB_C2SECS 17 /* # of sectors with C2 errors */ +#define PARANOIA_CB_C2MAXERRS 18 /* Max. # of C2 errors per sector */ /* * Cdparanoia modes to be set with paranoia_modeset() */ -#define PARANOIA_MODE_FULL 0xFF +#define PARANOIA_MODE_FULL 0xFF /* Everything except C2CHECK */ #define PARANOIA_MODE_DISABLE 0 #define PARANOIA_MODE_VERIFY 1 /* Verify data integrity in overlap area */ @@ -51,6 +57,7 @@ #define PARANOIA_MODE_SCRATCH 8 /* unsupported */ #define PARANOIA_MODE_REPAIR 16 /* unsupported */ #define PARANOIA_MODE_NEVERSKIP 32 /* Do not skip failed reads (retry maxretries) */ +#define PARANOIA_MODE_C2CHECK 256 /* Check C2 error pointer */ #ifndef CDP_COMPILE @@ -59,6 +66,25 @@ /* * The interface from libcdparanoia to the high level caller + * + * paranoia_init() is a new function that was not present in the original + * implementation from Monty which works only on Linux and only with gcc. + * It is needed to make libparanoia reentrant and useful on systems with + * a limited linker (e.g. Mac OS X). + * + * The first parameter "void *d" is a pointer to the I/O handle for + * the callback functions. This typically is "SCSI *" when using raw + * SCSI based I/O. + * + * The callbacks do the following: + * d_read read raw audio sectors, return # of sectors read + * d_disc_firstsector return first audio sector on disk + * d_disc_lastsector return last audio sector on disk + * d_tracks return # of audio tracks on disk + * d_track_firstsector return first audio sector for track + * d_track_lastsector return last audio sector for track + * d_sector_gettrack return track number for a sector number + * d_track_audiop return whether track is a data track */ extern cdrom_paranoia *paranoia_init __PR((void * d, int nsectors, long (*d_read) __PR((void *d, void *buffer, @@ -72,17 +98,44 @@ int (*d_sector_gettrack) __PR((void *d, long sector)), int (*d_track_audiop) __PR((void *d, int track)))); +/* + * paranoia_dynoverlapset set dynamic setcot overlap range + * paranoia_modeset set paranoia modes from bit values above + * paranoia_modeget get paranoia modes from bit values above + * paranoia_set_readahead set # of sectors to be read on a bulk + * paranoia_get_readahead get # of sectors to be read on a bulk + * paranoia_seek seek to new sector for paranoia operations + * paranoia_read read a single audio sector from seek pointer + * paranoia_read_limited like paranoia_read() but with retry counter + * paranoia_free free allocated data from last operation + * paranoia_overlapset set static overlap (disables dynamic overlap) + * + * The callback function is called to update statistics information. + */ extern void paranoia_dynoverlapset __PR((cdrom_paranoia * p, int minoverlap, int maxoverlap)); extern void paranoia_modeset __PR((cdrom_paranoia * p, int mode)); -extern long paranoia_seek __PR((cdrom_paranoia * p, long seek, int mode)); -extern Int16_t *paranoia_read __PR((cdrom_paranoia * p, void (*callback) (long, int))); -extern Int16_t *paranoia_read_limited __PR((cdrom_paranoia * p, void (*callback) (long, int), int maxretries)); +extern int paranoia_modeget __PR((cdrom_paranoia * p)); +extern void paranoia_set_readahead __PR((cdrom_paranoia * p, + int readahead)); +extern int paranoia_get_readahead __PR((cdrom_paranoia * p)); +extern long paranoia_seek __PR((cdrom_paranoia * p, + long seek, + int mode)); +extern Int16_t *paranoia_read __PR((cdrom_paranoia * p, + void (*callback) (long, int))); +extern Int16_t *paranoia_read_limited __PR((cdrom_paranoia * p, + void (*callback) (long, int), + int maxretries)); extern void paranoia_free __PR((cdrom_paranoia * p)); -extern void paranoia_overlapset __PR((cdrom_paranoia * p, long overlap)); +extern void paranoia_overlapset __PR((cdrom_paranoia * p, + long overlap)); #ifndef HAVE_MEMMOVE +#ifndef _SCHILY_SCHILY_H +#include +#endif #define memmove(dst, src, size) movebytes((src), (dst), (size)) #endif diff -Nru cdrtools-2.01.01a33/libparanoia/gap.c cdrtools-3.02a09/libparanoia/gap.c --- cdrtools-2.01.01a33/libparanoia/gap.c 2006-09-13 14:15:05.000000000 +0000 +++ cdrtools-3.02a09/libparanoia/gap.c 2009-07-10 22:28:18.000000000 +0000 @@ -1,19 +1,19 @@ -/* @(#)gap.c 1.14 06/09/13 J. Schilling from cdparanoia-III-alpha9.8 */ +/* @(#)gap.c 1.18 09/07/11 J. Schilling from cdparanoia-III-alpha9.8 */ +#include #ifndef lint -static char sccsid[] = -"@(#)gap.c 1.14 06/09/13 J. Schilling from cdparanoia-III-alpha9.8"; +static UConst char sccsid[] = +"@(#)gap.c 1.18 09/07/11 J. Schilling from cdparanoia-III-alpha9.8"; #endif /* * CopyPolicy: GNU Lesser General Public License v2.1 applies - * Copyright (C) 1997-2001 by Monty (xiphmont@mit.edu) - * Copyright (C) 2002-2006 by J. Schilling + * Copyright (C) 1997-2001,2008 by Monty (xiphmont@mit.edu) + * Copyright (C) 2002-2009 by J. Schilling * - * Gapa analysis support code for paranoia + * Gap analysis support code for paranoia * */ -#include #include #include #include @@ -48,6 +48,20 @@ /* * Gap analysis code */ + +/* + * i_paranoia_overlap_r (internal) + * + * This function seeks backward through two vectors (starting at the given + * offsets) to determine how many consecutive samples agree. It returns + * the number of matching samples, which may be 0. + * + * Unlike its sibling, i_paranoia_overlap_f, this function doesn't need to + * be given the size of the vectors (all vectors stop at offset 0). + * + * This function is used by i_analyze_rift_r() below to find where a + * leading rift ends. + */ EXPORT long i_paranoia_overlap_r(buffA, buffB, offsetA, offsetB) Int16_t *buffA; @@ -58,15 +72,30 @@ long beginA = offsetA; long beginB = offsetB; + /* + * Start at the given offsets and work our way backwards until we hit + * the beginning of one of the vectors. + */ for (; beginA >= 0 && beginB >= 0; beginA--, beginB--) if (buffA[beginA] != buffB[beginB]) break; - beginA++; - beginB++; return (offsetA - beginA); } +/* + * i_paranoia_overlap_f (internal) + * + * This function seeks forward through two vectors (starting at the given + * offsets) to determine how many consecutive samples agree. It returns + * the number of matching samples, which may be 0. + * + * Unlike its sibling, i_paranoia_overlap_r, this function needs to given + * the size of the vectors. + * + * This function is used by i_analyze_rift_f() below to find where a + * trailing rift ends. + */ EXPORT long i_paranoia_overlap_f(buffA, buffB, offsetA, offsetB, sizeA, sizeB) Int16_t *buffA; @@ -79,6 +108,10 @@ long endA = offsetA; long endB = offsetB; + /* + * Start at the given offsets and work our way forward until we hit + * the end of one of the vectors. + */ for (; endA < sizeA && endB < sizeB; endA++, endB++) if (buffA[endA] != buffB[endB]) break; @@ -86,6 +119,17 @@ return (endA - offsetA); } +/* + * i_stutter_or_gap (internal) + * + * This function compares (gap) samples of two vectors at the given offsets. + * It returns 0 if all the samples are identical, or nonzero if they differ. + * + * This is used by i_analyze_rift_[rf] below to determine whether a rift + * contains samples dropped by the other vector (that should be inserted), + * or whether the rift contains a stutter (that should be dropped). See + * i_analyze_rift_[rf] for more details. + */ EXPORT int i_stutter_or_gap(A, B, offA, offB, gap) Int16_t *A; @@ -97,16 +141,60 @@ long a1 = offA; long b1 = offB; + /* BEGIN CSTYLED */ + /* + * If the rift was so big that there aren't enough samples in the other + * vector to compare against the full gap, then just compare what we + * have available. E.g.: + * + * (5678)|(newly matching run ...) + * (... 12345678)| (345678) |(newly matching run ...) + * + * In this case, a1 would be -2, since we'd want to compare 6 samples + * against a vector that had only 4. So we start 2 samples later, and + * compare the 4 available samples. + * + * Again, this approach to identifying stutters is simply a heuristic, + * so this may not produce correct results in all cases. + */ + /* END CSTYLED */ if (a1 < 0) { + /* + * Note that a1 is negative, so we're increasing b1 and decreasing (gap). + */ b1 -= a1; gap += a1; a1 = 0; } + + /* + * Note that we don't have an equivalent adjustment for leading rifts. + * Thus, it's possible for the following memcmp() to run off the end + * of A. See the bug note in i_analyze_rift_r(). + * + * Multiply gap by 2 because samples are 2 bytes long and memcmp compares + * at the byte level. + */ return (memcmp(A + a1, B + b1, gap * 2)); } /* * riftv is the first value into the rift -> or <- + * + * i_analyze_rift_f (internal) + * + * This function examines a trailing rift to see how far forward the rift goes + * and to determine what kind of rift it is. This function is called by + * i_stage2_each() when a trailing rift is detected. (aoffset,boffset) are + * the offsets into (A,B) of the first mismatching sample. + * + * This function returns: + * matchA > 0 if there are (matchA) samples missing from A + * matchA < 0 if there are (-matchA) duplicate samples (stuttering) in A + * matchB > 0 if there are (matchB) samples missing from B + * matchB < 0 if there are (-matchB) duplicate samples in B + * matchC != 0 if there are (matchC) samples of garbage, after which + * both A and B are in sync again */ EXPORT void i_analyze_rift_f(A, B, sizeA, sizeB, aoffset, boffset, matchA, matchB, matchC) @@ -127,29 +215,74 @@ *matchA = 0, *matchB = 0, *matchC = 0; + /* BEGIN CSTYLED */ /* - * Look for three possible matches... (A) Ariftv->B, - * (B) Briftv->A and (c) AB->AB. + * Look forward to see where we regain agreement between vectors + * A and B (of at least MIN_WORDS_RIFT samples). We look for one of + * the following possible matches: + * + * edge + * v + * (1) (... A matching run)|(aoffset matches ...) + * (... B matching run)| (rift) |(boffset+i matches ...) + * + * (2) (... A matching run)| (rift) |(aoffset+i matches ...) + * (... B matching run)|(boffset matches ...) + * + * (3) (... A matching run)| (rift) |(aoffset+i matches ...) + * (... B matching run)| (rift) |(boffset+i matches ...) + * + * Anything that doesn't match one of these three is too corrupt to + * for us to recover from. E.g.: + * + * (... A matching run)| (rift) |(eventual match ...) + * (... B matching run)| (big rift) |(eventual match ...) + * + * We won't find the eventual match, since we wouldn't be sure how + * to fix the rift. */ + /* END CSTYLED */ for (i = 0; ; i++) { - if (i < bpast) /* A */ + /* + * Search for whatever case we hit first, so as to end up with the + * smallest rift. + */ + if (i < bpast) { /* Don't search for (1) past the end of B */ + /* + * See if we match case (1) above, which either means that A dropped + * samples at the rift, or that B stuttered. + */ if (i_paranoia_overlap_f(A, B, aoffset, boffset + i, sizeA, sizeB) >= MIN_WORDS_RIFT) { *matchA = i; break; } - if (i < apast) { /* B */ + } + if (i < apast) { /* Don't search for (2) or (3) past the beginning of A */ + /* + * See if we match case (2) above, which either means that B dropped + * samples at the rift, or that A stuttered. + */ if (i_paranoia_overlap_f(A, B, aoffset + i, boffset, sizeA, sizeB) >= MIN_WORDS_RIFT) { *matchB = i; break; } - if (i < bpast) /* C */ + if (i < bpast) /* Don't search for (3) past the end of B */ + /* + * See if we match case (3) above, which means that a fixed-length + * rift of samples is getting read unreliably. + */ if (i_paranoia_overlap_f(A, B, aoffset + i, boffset + i, sizeA, sizeB) >= MIN_WORDS_RIFT) { *matchC = i; break; } - } else if (i >= bpast) + } else if (i >= bpast) { + /* + * Stop searching when we've reached the end of both vectors. + * In theory we could stop when there aren't MIN_WORDS_RIFT samples + * left in both vectors, but this case should happen fairly rarely. + */ break; - + } } if (*matchA == 0 && *matchB == 0 && *matchC == 0) @@ -157,7 +290,38 @@ if (*matchC) return; + + /* BEGIN CSTYLED */ + /* + * For case (1) or (2), we need to determine whether the rift contains + * samples dropped by the other vector (that should be inserted), or + * whether the rift contains a stutter (that should be dropped). To + * distinguish, we check the contents of the rift against the good samples + * just before the rift. If the contents match, then the rift contains + * a stutter. + * + * A stutter in the second vector: + * (...good samples... 1234)|(567 ...newly matched run...) + * (...good samples... 1234)| (1234) | (567 ...newly matched run) + * + * Samples missing from the first vector: + * (...good samples... 1234)|(901 ...newly matched run...) + * (...good samples... 1234)| (5678) |(901 ...newly matched run...) + * + * Of course, there's no theoretical guarantee that a non-stutter + * truly represents missing samples, but given that we're dealing with + * verified fragments in stage 2, we can have some confidence that this + * is the case. + */ + /* END CSTYLED */ if (*matchA) { + /* + * For case (1), we need to determine whether A dropped samples at the + * rift or whether B stuttered. + * + * If the rift doesn't match the good samples in A (and hence in B), + * it's not a stutter, and the rift should be inserted into A. + */ if (i_stutter_or_gap(A, B, aoffset - *matchA, boffset, *matchA)) return; *matchB = -*matchA; /* signify we need to remove n bytes */ @@ -165,6 +329,9 @@ *matchA = 0; return; } else { + /* + * Case (2) is the inverse of case (1) above. + */ if (i_stutter_or_gap(B, A, boffset - *matchB, aoffset, *matchB)) return; *matchA = -*matchB; @@ -175,6 +342,21 @@ /* * riftv must be first even val of rift moving back + * + * i_analyze_rift_r (internal) + * + * This function examines a leading rift to see how far back the rift goes + * and to determine what kind of rift it is. This function is called by + * i_stage2_each() when a leading rift is detected. (aoffset,boffset) are + * the offsets into (A,B) of the first mismatching sample. + * + * This function returns: + * matchA > 0 if there are (matchA) samples missing from A + * matchA < 0 if there are (-matchA) duplicate samples (stuttering) in A + * matchB > 0 if there are (matchB) samples missing from B + * matchB < 0 if there are (-matchB) duplicate samples in B + * matchC != 0 if there are (matchC) samples of garbage, after which + * both A and B are in sync again */ EXPORT void i_analyze_rift_r(A, B, sizeA, sizeB, aoffset, boffset, matchA, matchB, matchC) @@ -195,29 +377,78 @@ *matchA = 0, *matchB = 0, *matchC = 0; + /* BEGIN CSTYLED */ /* - * Look for three possible matches... (A) Ariftv->B, (B) Briftv->A and - * (c) AB->AB. + * Look backward to see where we regain agreement between vectors + * A and B (of at least MIN_WORDS_RIFT samples). We look for one of + * the following possible matches: + * + * edge + * v + * (1) (... aoffset matches)|(A matching run ...) + * (... boffset-i matches)| (rift) |(B matching run ...) + * + * (2) (... aoffset-i matches)| (rift) |(A matching run ...) + * (... boffset matches)|(B matching run ...) + * + * (3) (... aoffset-i matches)| (rift) |(A matching run ...) + * (... boffset-i matches)| (rift) |(B matching run ...) + * + * Anything that doesn't match one of these three is too corrupt to + * for us to recover from. E.g.: + * + * (... eventual match)| (rift) |(A matching run ...) + * (... eventual match) | (big rift) |(B matching run ...) + * + * We won't find the eventual match, since we wouldn't be sure how + * to fix the rift. */ + /* END CSTYLED */ for (i = 0; ; i++) { - if (i < bpast) /* A */ + /* + * Search for whatever case we hit first, so as to end up with the + * smallest rift. + */ + if (i < bpast) { /* Don't search for (1) past the beginning of B */ + /* + * See if we match case (1) above, which either means that A dropped + * samples at the rift, or that B stuttered. + */ if (i_paranoia_overlap_r(A, B, aoffset, boffset - i) >= MIN_WORDS_RIFT) { *matchA = i; break; } - if (i < apast) { /* B */ + } + if (i < apast) { /* Don't search for (2) or (3) past the beginning of A */ + /* + * See if we match case (2) above, which either means that B dropped + * samples at the rift, or that A stuttered. + */ if (i_paranoia_overlap_r(A, B, aoffset - i, boffset) >= MIN_WORDS_RIFT) { *matchB = i; break; } - if (i < bpast) /* C */ + if (i < bpast) { /* Don't search for (3) past the beginning of B */ + /* + * See if we match case (3) above, which means that a fixed-length + * rift of samples is getting read unreliably. + */ if (i_paranoia_overlap_r(A, B, aoffset - i, boffset - i) >= MIN_WORDS_RIFT) { *matchC = i; break; } - } else if (i >= bpast) + } + } else if (i >= bpast) { + /* + * Stop searching when we've reached the end of both vectors. + * In theory we could stop when there aren't MIN_WORDS_RIFT samples + * left in both vectors, but this case should happen fairly rarely. + */ break; - + } + /* + * Try the search again with a larger tentative rift. + */ } if (*matchA == 0 && *matchB == 0 && *matchC == 0) @@ -226,14 +457,60 @@ if (*matchC) return; + /* BEGIN CSTYLED */ + /* + * For case (1) or (2), we need to determine whether the rift contains + * samples dropped by the other vector (that should be inserted), or + * whether the rift contains a stutter (that should be dropped). To + * distinguish, we check the contents of the rift against the good samples + * just after the rift. If the contents match, then the rift contains + * a stutter. + * + * A stutter in the second vector: + * (...newly matched run... 234)|(5678 ...good samples...) + * (...newly matched run... 234)| (5678) |(5678 ...good samples...) + * + * Samples missing from the first vector: + * (...newly matched run... 890)|(5678 ...good samples...) + * (...newly matched run... 890)| (1234) |(5678 ...good samples...) + * + * Of course, there's no theoretical guarantee that a non-stutter + * truly represents missing samples, but given that we're dealing with + * verified fragments in stage 2, we can have some confidence that this + * is the case. + */ + /* END CSTYLED */ if (*matchA) { + /* + * For case (1), we need to determine whether A dropped samples at the + * rift or whether B stuttered. + * + * If the rift doesn't match the good samples in A (and hence in B), + * it's not a stutter, and the rift should be inserted into A. + * + * ???BUG??? It's possible for aoffset+1+*matchA to be > sizeA, in + * which case the comparison in i_stutter_or_gap() will extend beyond + * the bounds of A. Thankfully, this isn't writing data and thus + * trampling memory, but it's still a memory access error that should + * be fixed. + * + * This bug is not fixed yet. + */ if (i_stutter_or_gap(A, B, aoffset + 1, boffset - *matchA + 1, *matchA)) return; + + /* + * It is a stutter, so we need to signal that we need to remove + * (matchA) bytes from B. + */ *matchB = -*matchA; /* signify we need to remove n bytes */ /* from B */ *matchA = 0; return; } else { + /* + * Case (2) is the inverse of case (1) above. + */ if (i_stutter_or_gap(B, A, boffset + 1, aoffset - *matchB + 1, *matchB)) return; *matchA = -*matchB; @@ -242,6 +519,26 @@ } } +/* + * analyze_rift_silence_f (internal) + * + * This function examines the fragment and root from the rift onward to + * see if they have a rift's worth of silence (or if they end with silence). + * It sets (*matchA) to -1 if A's rift is silence, (*matchB) to -1 if B's + * rift is silence, and sets them to 0 otherwise. + * + * Note that, unlike every other function in cdparanoia, this function + * considers any repeated value to be silence (which, in effect, it is). + * All other functions only consider repeated zeroes to be silence. + * + * This function is called by i_stage2_each() if it runs into a trailing rift + * that i_analyze_rift_f couldn't diagnose. This checks for another variant: + * where one vector has silence and the other doesn't. We then assume + * that the silence (and anything following it) is garbage. + * + * Note that while this function checks both A and B for silence, the caller + * assumes that only one or the other has silence. + */ EXPORT void analyze_rift_silence_f(A, B, sizeA, sizeB, aoffset, boffset, matchA, matchB) Int16_t *A; @@ -262,6 +559,10 @@ aoffset++; boffset++; + /* + * Check whether A has only "silence" within the search range. Note + * that "silence" here is a single, repeated value (zero or not). + */ while (aoffset < sizeA) { if (A[aoffset] != A[aoffset - 1]) { *matchA = 0; @@ -270,6 +571,13 @@ aoffset++; } + /* + * Check whether B has only "silence" within the search range. Note + * that "silence" here is a single, repeated value (zero or not). + * + * Also note that while the caller assumes that only matchA or matchB + * is set, we check both vectors here. + */ while (boffset < sizeB) { if (B[boffset] != B[boffset - 1]) { *matchB = 0; diff -Nru cdrtools-2.01.01a33/libparanoia/isort.c cdrtools-3.02a09/libparanoia/isort.c --- cdrtools-2.01.01a33/libparanoia/isort.c 2006-09-13 14:15:05.000000000 +0000 +++ cdrtools-3.02a09/libparanoia/isort.c 2009-07-10 22:28:18.000000000 +0000 @@ -1,13 +1,14 @@ -/* @(#)isort.c 1.16 06/09/13 J. Schilling from cdparanoia-III-alpha9.8 */ +/* @(#)isort.c 1.19 09/07/11 J. Schilling from cdparanoia-III-alpha9.8 */ +#include #ifndef lint -static char sccsid[] = -"@(#)isort.c 1.16 06/09/13 J. Schilling from cdparanoia-III-alpha9.8"; +static UConst char sccsid[] = +"@(#)isort.c 1.19 09/07/11 J. Schilling from cdparanoia-III-alpha9.8"; #endif /* * CopyPolicy: GNU Lesser General Public License v2.1 applies - * Copyright (C) 1997-2001 by Monty (xiphmont@mit.edu) - * Copyright (C) 2002-2006 by J. Schilling + * Copyright (C) 1997-2001,2008 by Monty (xiphmont@mit.edu) + * Copyright (C) 2002-2009 by J. Schilling * * sorted vector abstraction for paranoia * @@ -18,7 +19,17 @@ * give a go at speed through a more alpha-6-like mechanism. */ -#include +/* + * "Sort" is a bit of a misnomer in this implementation. It's actually + * basically a hash table of sample values (with a linked-list collision + * resolution), which lets you quickly determine where in a vector a + * particular sample value occurs. + * + * Collisions aren't due to hash collisions, as the table has one bucket + * for each possible sample value. Instead, the "collisions" represent + * multiple occurrences of a given value. + */ + #include #include #include @@ -42,6 +53,12 @@ EXPORT sort_link *sort_nextmatch __PR((sort_info * i, sort_link * prev)); +/* + * sort_alloc() + * + * Allocates and initializes a new, empty sort_info object, which can be + * used to index up to (size) samples from a vector. + */ EXPORT sort_info * sort_alloc(size) long size; @@ -61,10 +78,23 @@ return (ret); } +/* + * sort_unsortall() (internal) + * + * This function resets the index for further use with a different vector + * or range, without the overhead of an unnecessary free/alloc. + */ EXPORT void sort_unsortall(i) sort_info *i; { + /* + * If there were few enough different samples encountered (and hence few + * enough buckets used), we can just zero out those buckets. If there + * were many (2000 is picked somewhat arbitrarily), it's faster simply to + * zero out all buckets with a memset() rather than walking the data + * structure and zeroing them out one by one. + */ if (i->lastbucket > 2000) { /* a guess */ memset(i->head, 0, 65536 * sizeof (sort_link *)); } else { @@ -76,8 +106,19 @@ i->lastbucket = 0; i->sortbegin = -1; + + /* + * Curiously, this function preserves the vector association created + * by sort_setup(), but it is used only internally by sort_setup, so + * preserving this association is unnecessary. + */ } +/* + * sort_free() + * + * Releases all memory consumed by a sort_info object. + */ EXPORT void sort_free(i) sort_info *i; @@ -88,6 +129,13 @@ _pfree(i); } +/* + * sort_sort() (internal) + * + * This function builds the index to allow for fast searching for sample + * values within a portion (sortlo - sorthi) of the object's associated + * vector. It is called internally and only when needed. + */ LOCAL void sort_sort(i, sortlo, sorthi) sort_info *i; @@ -96,22 +144,62 @@ { long j; + /* + * We walk backward through the range to index because we insert new + * samples at the head of each bucket's list. At the end, they'll be + * sorted from first to last occurrence. + */ for (j = sorthi - 1; j >= sortlo; j--) { + /* + * i->vector[j] = the signed 16-bit sample to index. + * hv = pointer to the head of the sorted list of occurences + * of this sample + * l = the node to associate with this sample + * + * We add 32768 to convert the signed 16-bit integer to an unsigned + * range from 0 to 65535. + * + * Note that l is located within i->revindex at a position + * corresponding to the sample's position in the vector. This allows + * ipos() to determine the sample position from a returned sort_link. + */ sort_link **hv = i->head + i->vector[j] + 32768; sort_link *l = i->revindex + j; + /* + * If this is the first time we've encountered this sample, add its + * bucket to the list of buckets used. This list is used only for + * resetting the index quickly. + */ if (*hv == NULL) { i->bucketusage[i->lastbucket] = i->vector[j] + 32768; i->lastbucket++; } + /* + * Point the new node at the old head, then assign the new node as + * the new head. + */ l->next = *hv; *hv = l; } + /* + * Mark the index as initialized. + */ i->sortbegin = 0; } /* - * size *must* be less than i->maxsize + * sort_setup() + * + * This function initializes a previously allocated sort_info_t. The + * sort_info_t is associated with a vector of samples of length + * (size), whose position begins at (*abspos) within the CD's stream + * of samples. Only the range of samples between (sortlo, sorthi) + * will eventually be indexed for fast searching. (sortlo, sorthi) + * are absolute sample positions. + * + * Note: size *must* be <= i->maxsize given to the preceding sort_alloc(), + * but no error checking is done here. */ EXPORT void sort_setup(i, vector, abspos, size, sortlo, sorthi) @@ -122,6 +210,9 @@ long sortlo; long sorthi; { + /* + * Reset the index if it has already been built. + */ if (i->sortbegin != -1) sort_unsortall(i); @@ -129,10 +220,26 @@ i->size = size; i->abspos = abspos; + /* + * Convert the absolute (sortlo, sorthi) to offsets within the vector. + * Note that the index will not be built until sort_getmatch() is called. + * Here we're simply hanging on to the range to index until then. + */ i->lo = min(size, max(sortlo - *abspos, 0)); i->hi = max(0, min(sorthi - *abspos, size)); } +/* + * sort_getmatch() + * + * This function returns a sort_link_t pointer which refers to the + * first sample equal to (value) in the vector. It only searches for + * hits within (overlap) samples of (post), where (post) is an offset + * within the vector. The caller can determine the position of the + * matched sample using ipos(sort_info *, sort_link *). + * + * This function returns NULL if no matches were found. + */ EXPORT sort_link * sort_getmatch(i, post, overlap, value) sort_info *i; @@ -142,18 +249,37 @@ { sort_link *ret; + /* + * If the vector hasn't been indexed yet, index it now. + */ if (i->sortbegin == -1) sort_sort(i, i->lo, i->hi); /* * Now we reuse lo and hi + * + * We'll only return samples within (overlap) samples of (post). + * Clamp the boundaries to search to the boundaries of the array, + * convert the signed sample to an unsigned offset, and store the + * state so that future calls to sort_nextmatch do the right thing. + * + * Reusing lo and hi this way is awful. */ post = max(0, min(i->size, post)); i->val = value + 32768; i->lo = max(0, post - overlap); /* absolute position */ i->hi = min(i->size, post + overlap); /* absolute position */ + /* + * Walk through the linked list of samples with this value, until + * we find the first one within the bounds specified. If there + * aren't any, return NULL. + */ ret = i->head[i->val]; while (ret) { + /* + * ipos() calculates the offset (in terms of the original vector) + * of this hit. + */ if (ipos(i, ret) < i->lo) { ret = ret->next; } else { @@ -166,6 +292,15 @@ return (ret); } +/* + * sort_nextmatch() + * + * This function returns a sort_link_t pointer which refers to the next sample + * matching the criteria previously passed to sort_getmatch(). See + * sort_getmatch() for details. + * + * This function returns NULL if no further matches were found. + */ EXPORT sort_link * sort_nextmatch(i, prev) sort_info *i; @@ -173,6 +308,10 @@ { sort_link *ret = prev->next; + /* + * If there aren't any more hits, or we've passed the boundary requested + * of sort_getmatch(), we're done. + */ if (!ret || ipos(i, ret) >= i->hi) return (NULL); return (ret); diff -Nru cdrtools-2.01.01a33/libparanoia/isort.h cdrtools-3.02a09/libparanoia/isort.h --- cdrtools-2.01.01a33/libparanoia/isort.h 2006-05-06 16:21:00.000000000 +0000 +++ cdrtools-3.02a09/libparanoia/isort.h 2008-09-18 12:37:34.000000000 +0000 @@ -1,8 +1,8 @@ -/* @(#)isort.h 1.11 06/05/06 J. Schilling from cdparanoia-III-alpha9.8 */ +/* @(#)isort.h 1.12 08/09/18 J. Schilling from cdparanoia-III-alpha9.8 */ /* * CopyPolicy: GNU Lesser General Public License v2.1 applies - * Copyright (C) 1997-2001 by Monty (xiphmont@mit.edu) - * Copyright (C) 2002-2006 by J. Schilling + * Copyright (C) 1997-2001,2008 by Monty (xiphmont@mit.edu) + * Copyright (C) 2002-2008 by J. Schilling */ #ifndef _ISORT_H @@ -37,20 +37,116 @@ } sort_info; +/* + * sort_alloc() + * + * Allocates and initializes a new, empty sort_info object, which can + * be used to index up to (size) samples from a vector. + */ extern sort_info *sort_alloc __PR((long size)); + +/* + * sort_unsortall() (internal) + * + * This function resets the index for further use with a different + * vector or range, without the overhead of an unnecessary free/alloc. + */ extern void sort_unsortall __PR((sort_info * i)); + +/* + * sort_setup() + * + * This function initializes a previously allocated sort_info_t. The + * sort_info_t is associated with a vector of samples of length + * (size), whose position begins at (*abspos) within the CD's stream + * of samples. Only the range of samples between (sortlo, sorthi) + * will eventually be indexed for fast searching. (sortlo, sorthi) + * are absolute sample positions. + * + * Note: size *must* be <= the size given to the preceding sort_alloc(), + * but no error checking is done here. + */ extern void sort_setup __PR((sort_info * i, Int16_t * vector, long *abspos, long size, long sortlo, long sorthi)); + +/* + * sort_free() + * + * Releases all memory consumed by a sort_info object. + */ extern void sort_free __PR((sort_info * i)); + +/* + * sort_getmatch() + * + * This function returns a sort_link_t pointer which refers to the + * first sample equal to (value) in the vector. It only searches for + * hits within (overlap) samples of (post), where (post) is an offset + * within the vector. The caller can determine the position of the + * matched sample using ipos(sort_info *, sort_link *). + * + * This function returns NULL if no matches were found. + */ extern sort_link *sort_getmatch __PR((sort_info * i, long post, long overlap, int value)); + +/* + * sort_nextmatch() + * + * This function returns a sort_link_t pointer which refers to the + * next sample matching the criteria previously passed to + * sort_getmatch(). See sort_getmatch() for details. + * + * This function returns NULL if no further matches were found. + */ extern sort_link *sort_nextmatch __PR((sort_info * i, sort_link * prev)); + + +/* + * is() + * + * This macro returns the size of the vector indexed by the given sort_info_t. + */ #define is(i) ((i)->size) + +/* + * ib() + * + * This macro returns the absolute position of the first sample in the vector + * indexed by the given sort_info_t. + */ #define ib(i) (*(i)->abspos) + +/* + * ie() + * + * This macro returns the absolute position of the sample after the last + * sample in the vector indexed by the given sort_info_t. + */ #define ie(i) ((i)->size + *(i)->abspos) + +/* + * iv() + * + * This macro returns the vector indexed by the given sort_info_t. + */ #define iv(i) ((i)->vector) + +/* + * ipos() + * + * This macro returns the relative position (offset) within the indexed vector + * at which the given match was found. + * + * It uses a little-known and frightening aspect of C pointer arithmetic: + * subtracting a pointer is not an arithmetic subtraction, but rather the + * additive inverse. In other words, since + * q = p + n returns a pointer to the nth object in p, + * q - p = p + n - p, and + * q - p = n, not the difference of the two addresses. + */ #define ipos(i, l) ((l) - (i)->revindex) #endif /* _ISORT_H */ diff -Nru cdrtools-2.01.01a33/libparanoia/libparanoia-mapvers cdrtools-3.02a09/libparanoia/libparanoia-mapvers --- cdrtools-2.01.01a33/libparanoia/libparanoia-mapvers 2005-06-12 19:21:42.000000000 +0000 +++ cdrtools-3.02a09/libparanoia/libparanoia-mapvers 2013-12-22 12:05:47.000000000 +0000 @@ -1,3 +1,12 @@ +# /* @(#)libparanoia-mapvers 1.2 13/12/22 Copyright 2005-2010 J. Schilling */ + +SCHILY_1.1 { +global: + paranoia_modeget; + paranoia_set_readahead; + paranoia_get_readahead; +} SCHILY_1.0; + SCHILY_1.0 { global: paranoia_dynoverlapset; @@ -13,4 +22,4 @@ local: *; -}; \ No newline at end of file +}; diff -Nru cdrtools-2.01.01a33/libparanoia/LICENSE cdrtools-3.02a09/libparanoia/LICENSE --- cdrtools-2.01.01a33/libparanoia/LICENSE 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/libparanoia/LICENSE 2007-09-02 18:47:48.000000000 +0000 @@ -0,0 +1,4 @@ +The original code from Monty has been published under "GPLv2 only". + +The license for libparanoia has been changed from "GPLv2 only" to +"LGPLv2.1 only" on may 6th 2006 with permission from Monty. diff -Nru cdrtools-2.01.01a33/libparanoia/overlap.c cdrtools-3.02a09/libparanoia/overlap.c --- cdrtools-2.01.01a33/libparanoia/overlap.c 2006-09-13 14:15:05.000000000 +0000 +++ cdrtools-3.02a09/libparanoia/overlap.c 2009-07-10 22:28:18.000000000 +0000 @@ -1,19 +1,19 @@ -/* @(#)overlap.c 1.13 06/09/13 J. Schilling from cdparanoia-III-alpha9.8 */ +/* @(#)overlap.c 1.16 09/07/11 J. Schilling from cdparanoia-III-alpha9.8 */ +#include #ifndef lint -static char sccsid[] = -"@(#)overlap.c 1.13 06/09/13 J. Schilling from cdparanoia-III-alpha9.8"; +static UConst char sccsid[] = +"@(#)overlap.c 1.16 09/07/11 J. Schilling from cdparanoia-III-alpha9.8"; #endif /* * CopyPolicy: GNU Lesser General Public License v2.1 applies - * Copyright (C) 1997-2001 by Monty (xiphmont@mit.edu) - * Copyright (C) 2002-2006 by J. Schilling + * Copyright (C) 1997-2001,2008 by Monty (xiphmont@mit.edu) + * Copyright (C) 2002-2009 by J. Schilling * * Statistic code and cache management for overlap settings * */ -#include #include #include #include @@ -120,6 +120,17 @@ /* * Statistical and heuristic[al? :-] management + * + * offset_adjust_settings (internal) + * + * This function is called by offset_add_value() every time 10 samples have + * been accumulated. This function updates the internal statistics for + * paranoia (dynoverlap, dyndrift) that compensate for jitter and drift. + * + * (dynoverlap) influences how far stage 1 and stage 2 search for matching + * runs. In low-jitter conditions, it will be very small (or even 0), + * narrowing our search. In high-jitter conditions, it will be much larger, + * widening our search at the cost of speed. */ EXPORT void offset_adjust_settings(p, callback) @@ -213,6 +224,31 @@ } } +/* + * offset_add_value (internal) + * + * This function adds the given jitter detected (value) to the statistics + * for the given stage (o). It is called whenever jitter has been identified + * by stage 1 or 2. After every 10 samples, we update the overall jitter- + * compensation settings (e.g. dynoverlap). This allows us to narrow our + * search for matching runs (in both stages) in low-jitter conditions + * and also widen our search appropriately when there is jitter. + * + * + * "???BUG???: + * Note that there is a bug in the way that this is called by try_sort_sync(). + * Silence looks like zero jitter, and dynoverlap may be incorrectly reduced + * when there's lots of silence but also jitter." + * + * Strictly speaking, this is only sort-of true. The silence will + * incorrectly somewhat reduce dynoverlap. However, it will increase + * again once past the silence (even if reduced to zero, it will be + * increased by the block read loop if we're not getting matches). + * In reality, silence usually passes rapidly. Anyway, long streaks + * of silence benefit performance-wise from having dynoverlap decrease + * momentarily. There is no correctness bug. --Monty + * + */ EXPORT void offset_add_value(p, o, value, callback) cdrom_paranoia *p; @@ -222,15 +258,27 @@ { if (o->offpoints != -1) { + /* + * Track the average magnitude of jitter (in either direction) + */ o->offdiff += abs(value); o->offpoints++; o->newpoints++; + /* + * Track the net value of the jitter (to track drift) + */ o->offaccum += value; + /* + * Track the largest jitter we've encountered in each direction + */ if (value < o->offmin) o->offmin = value; if (value > o->offmax) o->offmax = value; + /* + * After 10 samples, update dynoverlap, etc. + */ if (o->newpoints >= 10) offset_adjust_settings(p, callback); } diff -Nru cdrtools-2.01.01a33/libparanoia/paranoia.c cdrtools-3.02a09/libparanoia/paranoia.c --- cdrtools-2.01.01a33/libparanoia/paranoia.c 2007-02-09 11:28:36.000000000 +0000 +++ cdrtools-3.02a09/libparanoia/paranoia.c 2015-11-17 19:21:50.000000000 +0000 @@ -1,13 +1,14 @@ -/* @(#)paranoia.c 1.36 07/02/09 J. Schilling from cdparanoia-III-alpha9.8 */ +/* @(#)paranoia.c 1.48 15/11/17 J. Schilling from cdparanoia-III-alpha9.8 */ +#include #ifndef lint -static char sccsid[] = -"@(#)paranoia.c 1.36 07/02/09 J. Schilling from cdparanoia-III-alpha9.8"; +static UConst char sccsid[] = +"@(#)paranoia.c 1.48 15/11/17 J. Schilling from cdparanoia-III-alpha9.8"; #endif /* * CopyPolicy: GNU Lesser General Public License v2.1 applies - * Copyright (C) 1997-2001 by Monty (xiphmont@mit.edu) - * Copyright (C) 2002-2006 by J. Schilling + * Copyright (C) 1997-2001,2008 by Monty (xiphmont@mit.edu) + * Copyright (C) 2002-2015 by J. Schilling * * Toplevel file for the paranoia abstraction over the cdda lib * @@ -52,13 +53,34 @@ * audio that interfaces with silence; an edge must be 'wet'. */ -#include +/* + * Let's translate the above vivid metaphor into something a mere mortal + * can understand: + * + * Non-silent audio is "solid." Silent audio is "wet" and fluid. The reason + * to treat silence as fluid is that if there's a long enough span of + * silence, we can't reliably detect jitter or dropped samples within that + * span (since all silence looks alike). Non-silent audio, on the other + * hand, is distinctive and can be reliably reassembled. + * + * So we treat long spans of silence specially. We only consider an edge + * of a non-silent region ("continent" or "island") to be "wet" if it borders + * a long span of silence. Short spans of silence are merely damp and can + * be reliably placed within a continent. + * + * We position ("anchor") the non-silent regions somewhat arbitrarily (since + * they may be jittered and we have no way to verify their exact position), + * and fill the intervening space with silence. + * + * See i_silence_match() for the gory details. + */ + #include #include #include #include #include -#include +#include #include #include "p_block.h" #include "cdda_paranoia.h" @@ -76,6 +98,13 @@ long end; } sync_result; +struct c2errs { + long c2errs; /* # of reads with C2 errors */ + long c2bytes; /* # of bytes with C2 errors */ + long c2secs; /* # of sectorss with C2 errors */ + long c2maxerrs; /* Max. # of C2 errors per sector */ +}; + LOCAL inline long re __PR((root_block * root)); LOCAL inline long rb __PR((root_block * root)); LOCAL inline long rs __PR((root_block * root)); @@ -123,6 +152,9 @@ EXPORT void paranoia_free __PR((cdrom_paranoia * p)); EXPORT void paranoia_modeset __PR((cdrom_paranoia * p, int enable)); EXPORT long paranoia_seek __PR((cdrom_paranoia * p, long seek, int mode)); +LOCAL void c2_audiocopy __PR((void *to, void *from, int nsectors)); +LOCAL int bits __PR((int c)); +LOCAL void c2_errcopy __PR((void *to, void *from, int nsectors, struct c2errs *errp)); c_block *i_read_c_block __PR((cdrom_paranoia * p, long beginword, long endword, void (*callback) (long, int))); EXPORT Int16_t *paranoia_read __PR((cdrom_paranoia * p, void (*callback) (long, int))); @@ -130,7 +162,10 @@ int max_retries)); EXPORT void paranoia_overlapset __PR((cdrom_paranoia * p, long overlap)); - +/* + * Return end offset of current block. + * End offset counts in multiples of samples (16 bits). + */ LOCAL inline long re(root) root_block *root; @@ -142,6 +177,10 @@ return (ce(root->vector)); } +/* + * Return begin offset of current block. + * Begin offset counts in multiples of samples (16 bits). + */ LOCAL inline long rb(root) root_block *root; @@ -153,6 +192,10 @@ return (cb(root->vector)); } +/* + * Return size of current block. + * Size counts in multiples of samples (16 bits). + */ LOCAL inline long rs(root) root_block *root; @@ -164,6 +207,9 @@ return (cs(root->vector)); } +/* + * Return data vector from current block. + */ LOCAL inline Int16_t * rv(root) root_block *root; @@ -178,8 +224,39 @@ #define rc(r) ((r)->vector) /* + * Flags indicating the status of a read samples. + * + * Imagine the below enumeration values are #defines to be used in a + * bitmask rather than distinct values of an enum. + * + * The variable part of the declaration is trickery to force the enum + * symbol values to be recorded in debug symbol tables. They are used + * to allow one refer to the enumeration value names in a debugger + * and in debugger expressions. + */ +#define FLAGS_EDGE 0x1 /**< first/last N words of frame */ +#define FLAGS_UNREAD 0x2 /**< unread, hence missing and unmatchable */ +#define FLAGS_VERIFIED 0x4 /**< block read and verified */ +#define FLAGS_C2 0x8 /**< sample with C2 error */ + +/* * matching and analysis code */ + +/* + * i_paranoia_overlap() (internal) + * + * This function is called when buffA[offsetA] == buffB[offsetB]. This + * function searches backward and forward to see how many consecutive + * samples also match. + * + * This function is called by do_const_sync() when we're not doing any + * verification. Its more complicated sibling is i_paranoia_overlap2. + * + * This function returns the number of consecutive matching samples. + * If (ret_begin) or (ret_end) are not NULL, it fills them with the + * offsets of the first and last matching samples in A. + */ LOCAL inline long i_paranoia_overlap(buffA, buffB, offsetA, offsetB, sizeA, sizeB, ret_begin, ret_end) Int16_t *buffA; @@ -196,16 +273,25 @@ long beginB = offsetB; long endB = offsetB; + /* + * Scan backward to extend the matching run in that direction. + */ for (; beginA >= 0 && beginB >= 0; beginA--, beginB--) if (buffA[beginA] != buffB[beginB]) break; beginA++; beginB++; + /* + * Scan forward to extend the matching run in that direction. + */ for (; endA < sizeA && endB < sizeB; endA++, endB++) if (buffA[endA] != buffB[endB]) break; + /* + * Return the result of our search. + */ if (ret_begin) *ret_begin = beginA; if (ret_end) @@ -213,6 +299,22 @@ return (endA - beginA); } +/* + * i_paranoia_overlap2() (internal) + * + * This function is called when buffA[offsetA] == buffB[offsetB]. This + * function searches backward and forward to see how many consecutive + * samples also match. + * + * This function is called by do_const_sync() when we're verifying the + * data coming off the CD. Its less complicated sibling is + * i_paranoia_overlap, which is a good place to look to see the simplest + * outline of how this function works. + * + * This function returns the number of consecutive matching samples. + * If (ret_begin) or (ret_end) are not NULL, it fills them with the + * offsets of the first and last matching samples in A. + */ LOCAL inline long i_paranoia_overlap2(buffA, buffB, flagsA, flagsB, offsetA, offsetB, sizeA, sizeB, ret_begin, ret_end) Int16_t *buffA; @@ -231,13 +333,22 @@ long beginB = offsetB; long endB = offsetB; + /* + * Scan backward to extend the matching run in that direction. + */ for (; beginA >= 0 && beginB >= 0; beginA--, beginB--) { if (buffA[beginA] != buffB[beginB]) break; /* - * don't allow matching across matching sector boundaries + * don't allow matching across matching sector boundaries. The + * liklihood of the drive skipping identically in two + * different reads with the same sector read boundary is actually + * relatively very high compared to the liklihood of it skipping + * when one read is continuous across the boundary and other was + * discontinuous. + * Stop if both samples were at the edges of a low-level read. */ - if ((flagsA[beginA] & flagsB[beginB] & 1)) { + if ((flagsA[beginA] & flagsB[beginB] & FLAGS_EDGE)) { beginA--; beginB--; break; @@ -245,28 +356,35 @@ /* * don't allow matching through known missing data */ - if ((flagsA[beginA] & 2) || (flagsB[beginB] & 2)) + if ((flagsA[beginA] & FLAGS_UNREAD) || (flagsB[beginB] & FLAGS_UNREAD)) break; } beginA++; beginB++; + /* + * Scan forward to extend the matching run in that direction. + */ for (; endA < sizeA && endB < sizeB; endA++, endB++) { if (buffA[endA] != buffB[endB]) break; /* * don't allow matching across matching sector boundaries */ - if ((flagsA[endA] & flagsB[endB] & 1) && endA != beginA) { + if ((flagsA[endA] & flagsB[endB] & FLAGS_EDGE) && endA != beginA) { break; } /* * don't allow matching through known missing data + * Stop if both samples were at the edges of a low-level read. */ - if ((flagsA[endA] & 2) || (flagsB[endB] & 2)) + if ((flagsA[endA] & FLAGS_UNREAD) || (flagsB[endB] & FLAGS_UNREAD)) break; } + /* + * Return the result of our search. + */ if (ret_begin) *ret_begin = beginA; if (ret_end) @@ -274,16 +392,22 @@ return (endA - beginA); } -/* Top level of the first stage matcher */ - /* - * We match each analysis point of new to the preexisting blocks - * recursively. We can also optionally maintain a list of fragments of - * the preexisting block that didn't match anything, and match them back - * afterward. + * do_const_sync() (internal) + * + * This function is called when samples A[posA] == B[posB]. It tries to + * build a matching run from that point, looking forward and backward to + * see how many consecutive samples match. Since the starting samples + * might only be coincidentally identical, we only consider the run to + * be a true match if it's longer than MIN_WORDS_SEARCH. + * + * This function returns the length of the run if a matching run was found, + * or 0 otherwise. If a matching run was found, (begin) and (end) are set + * to the absolute positions of the beginning and ending samples of the + * run in A, and (offset) is set to the jitter between the c_blocks. + * (I.e., offset indicates the distance between what A considers sample N + * on the CD and what B considers sample N.) */ -#define OVERLAP_ADJ (MIN_WORDS_OVERLAP/2-1) - LOCAL inline long do_const_sync(A, B, flagB, posA, posB, begin, end, offset) c_block *A; @@ -298,15 +422,32 @@ Uchar *flagA = A->flags; long ret = 0; + /* + * If we're doing any verification whatsoever, we have flags in stage + * 1, and will take them into account. Otherwise (e.g. in stage 2), + * we just do the simple equality test for samples on both sides of + * the initial match. + */ if (flagB == NULL) ret = i_paranoia_overlap(cv(A), iv(B), posA, posB, cs(A), is(B), begin, end); - else if ((flagB[posB] & 2) == 0) + else if ((flagB[posB] & FLAGS_UNREAD) == 0) ret = i_paranoia_overlap2(cv(A), iv(B), flagA, flagB, posA, posB, cs(A), is(B), begin, end); + /* + * Small matching runs could just be coincidental. We only consider this + * a real match if it's long enough. + */ if (ret > MIN_WORDS_SEARCH) { + *offset = (posA + cb(A)) - (posB + ib(B)); + + /* + * Note that try_sort_sync()'s swaps A & B when it calls this function, + * so while we adjust begin & end to be relative to A here, that means + * it's relative to B in try_sort_sync(). + */ *begin += cb(A); *end += cb(A); return (ret); @@ -315,6 +456,27 @@ } /* + * try_sort_sync() (internal) + * + * Starting from the sample in B with the absolute position (post), look + * for a matching run in A. This search will look in A for a first + * matching sample within (p->dynoverlap) samples around (post). If it + * finds one, it will then determine how many consecutive samples match + * both A and B from that point, looking backwards and forwards. If + * this search produces a matching run longer than MIN_WORDS_SEARCH, we + * consider it a match. + * + * When used by stage 1, the "post" is planted with respect to the old + * c_block being compare to the new c_block. In stage 2, the "post" is + * planted with respect to the verified root. + * + * This function returns 1 if a match is found and 0 if not. When a match + * is found, (begin) and (end) are set to the boundaries of the run, and + * (offset) is set to the difference in position of the run in A and B. + * (begin) and (end) are the absolute positions of the samples in + * B. (offset) transforms A to B's frame of reference. I.e., an offset of + * 2 would mean that A's absolute 3 is equivalent to B's 5. + * * post is w.r.t. B. in stage one, we post from old. In stage 2 we * post from root. Begin, end, offset count from B's frame of * reference @@ -337,9 +499,9 @@ Uchar *Bflags = B->flags; /* - * block flag matches 0x02 (unmatchable) + * block flag matches FLAGS_UNREAD (unmatchable) */ - if (Bflags == NULL || (Bflags[post - cb(B)] & 2) == 0) { + if (Bflags == NULL || (Bflags[post - cb(B)] & FLAGS_UNREAD) == 0) { /* * always try absolute offset zero first! */ @@ -347,7 +509,19 @@ long zeropos = post - ib(A); if (zeropos >= 0 && zeropos < is(A)) { + /* + * Before we bother with the search for a matching samples, + * we check the simple case. If there's no jitter at all + * (i.e. the absolute positions of A's and B's samples are + * consistent), A's sample at (post) should be identical + * to B's sample at the same position. + */ if (cv(B)[post - cb(B)] == iv(A)[zeropos]) { + /* + * The first sample matched, now try to grow the matching run + * in both directions. We only consider it a match if more + * than MIN_WORDS_SEARCH consecutive samples match. + */ if (do_const_sync(B, A, Aflags, post - cb(B), zeropos, begin, end, offset)) { @@ -362,25 +536,76 @@ } else return (0); + /* + * If the samples with the same absolute position didn't match, it's + * either a bad sample, or the two c_blocks are jittered with respect + * to each other. Now we search through A for samples that do have + * the same value as B's post. The search looks from first to last + * occurrence witin (dynoverlap) samples of (post). + */ ptr = sort_getmatch(A, post - ib(A), dynoverlap, cv(B)[post - cb(B)]); while (ptr) { - + /* + * We've found a matching sample, so try to grow the matching run in + * both directions. If we find a long enough run (longer than + * MIN_WORDS_SEARCH), we've found a match. + */ if (do_const_sync(B, A, Aflags, post - cb(B), ipos(A, ptr), begin, end, offset)) { offset_add_value(p, &(p->stage1), *offset, callback); return (1); } + /* + * The matching sample was just a fluke -- there weren't enough adjacent + * samples that matched to consider a matching run. So now we check + * for the next occurrence of that value in A. + */ ptr = sort_nextmatch(A, ptr); } + /* + * We didn't find any matches. + */ *begin = -1; *end = -1; *offset = -1; return (0); } +/* + * STAGE 1 MATCHING + */ +/* Top level of the first stage matcher */ + +/* + * We match each analysis point of new to the preexisting blocks + * recursively. We can also optionally maintain a list of fragments of + * the preexisting block that didn't match anything, and match them back + * afterward. + */ +#define OVERLAP_ADJ (MIN_WORDS_OVERLAP/2-1) + +/* + * stage1_matched() (internal) + * + * This function is called whenever stage 1 verification finds two identical + * runs of samples from different reads. The runs must be more than + * MIN_WORDS_SEARCH samples long. They may be jittered (i.e. their absolute + * positions on the CD may not match due to inaccurate seeking) with respect + * to each other, but they have been verified to have no dropped samples + * within them. + * + * This function provides feedback via the callback mechanism and marks the + * runs as verified. The details of the marking are somehwat subtle and + * are described near the relevant code. + * + * Subsequent portions of the stage 1 code will build a verified fragment + * from this run. The verified fragment will eventually be merged + * into the verified root (and its absolute position determined) in + * stage 2. + */ LOCAL inline void stage1_matched(old, new, matchbegin, matchend, matchoffset, callback) c_block *old; @@ -396,10 +621,23 @@ long newadjbegin = matchbegin - matchoffset - cb(new); long newadjend = matchend - matchoffset - cb(new); + /* + * Provide feedback via the callback about the samples we've just + * verified. + * + * "???: How can matchbegin ever be < cb(old)?" + * Sorry, old bulletproofing habit. I often use <= to mean "not >" + * --Monty + * + * "???: Why do edge samples get logged only when there's jitter + * between the matched runs (matchoffset != 0)?" + * FIXUP_EDGE is actually logging a jitter event, not a rift-- + * a rift is FIXUP_ATOM --Monty + */ if (matchbegin - matchoffset <= cb(new) || matchbegin <= cb(old) || - (new->flags[newadjbegin] & 1) || - (old->flags[oldadjbegin] & 1)) { + (new->flags[newadjbegin] & FLAGS_EDGE) || + (old->flags[oldadjbegin] & FLAGS_EDGE)) { if (matchoffset) if (callback) (*callback) (matchbegin, PARANOIA_CB_FIXUP_EDGE); @@ -407,35 +645,103 @@ (*callback) (matchbegin, PARANOIA_CB_FIXUP_ATOM); if (matchend - matchoffset >= ce(new) || - (new->flags[newadjend] & 1) || + (new->flags[newadjend] & FLAGS_EDGE) || matchend >= ce(old) || - (old->flags[oldadjend] & 1)) { + (old->flags[oldadjend] & FLAGS_EDGE)) { if (matchoffset) if (callback) (*callback) (matchend, PARANOIA_CB_FIXUP_EDGE); } else if (callback) (*callback) (matchend, PARANOIA_CB_FIXUP_ATOM); + /* BEGIN CSTYLED */ /* + * Mark verified samples as "verified," but trim the verified region + * by OVERLAP_ADJ samples on each side. There are several significant + * implications of this trimming: + * + * 1) Why we trim at all: We have to trim to distinguish between two + * adjacent verified runs and one long verified run. We encounter this + * situation when samples have been dropped: + * + * matched portion of read 1 ....)(.... matched portion of read 1 + * read 2 adjacent run .....)(..... read 2 adjacent run + * || + * dropped samples in read 2 + * + * So at this point, the fact that we have two adjacent runs means + * that we have not yet verified that the two runs really are adjacent. + * (In fact, just the opposite: there are two runs because they were + * matched by separate runs, indicating that some samples didn't match + * across the length of read 2.) + * + * If we verify that they are actually adjacent (e.g. if the two runs + * are simply a result of matching runs from different reads, not from + * dropped samples), we will indeed mark them as one long merged run. + * + * 2) Why we trim by this amount: We want to ensure that when we + * verify the relationship between these two runs, we do so with + * an overlapping fragment at least OVERLAP samples long. Following + * from the above example: + * + * (..... matched portion of read 3 .....) + * read 2 adjacent run .....)(..... read 2 adjacent run + * + * Assuming there were no dropped samples between the adjacent runs, + * the matching portion of read 3 will need to be at least OVERLAP + * samples long to mark the two runs as one long verified run. + * If there were dropped samples, read 3 wouldn't match across the + * two runs, proving our caution worthwhile. + * + * 3) Why we partially discard the work we've done: We don't. + * When subsequently creating verified fragments from this run, + * we compensate for this trimming. Thus the verified fragment will + * contain the full length of verified samples. Only the c_blocks + * will reflect this trimming. + * * Mark the verification flags. Don't mark the first or last OVERLAP/2 * elements so that overlapping fragments have to overlap by OVERLAP to * actually merge. We also remove elements from the sort such that * later sorts do not have to sift through already matched data */ + /* END CSTYLED */ newadjbegin += OVERLAP_ADJ; newadjend -= OVERLAP_ADJ; for (i = newadjbegin; i < newadjend; i++) - new->flags[i] |= 4; /* mark verified */ + new->flags[i] |= FLAGS_VERIFIED; /* mark verified */ oldadjbegin += OVERLAP_ADJ; oldadjend -= OVERLAP_ADJ; for (i = oldadjbegin; i < oldadjend; i++) - old->flags[i] |= 4; /* mark verified */ + old->flags[i] |= FLAGS_VERIFIED; /* mark verified */ } #define CB_NULL (void (*) __PR((long, int)))0 +/* + * i_iterate_stage1 (internal) + * + * This function is called by i_stage1() to compare newly read samples with + * previously read samples, searching for contiguous runs of identical + * samples. Matching runs indicate that at least two reads of the CD + * returned identical data, with no dropped samples in that run. + * The runs may be jittered (i.e. their absolute positions on the CD may + * not be accurate due to inaccurate seeking) at this point. Their + * positions will be determined in stage 2. + * + * This function compares the new c_block (which has been indexed in + * p->sortcache) to a previous c_block. It is called for each previous + * c_block. It searches for runs of identical samples longer than + * MIN_WORDS_SEARCH. Samples in matched runs are marked as verified. + * + * Subsequent stage 1 code builds verified fragments from the runs of + * verified samples. These fragments are merged into the verified root + * in stage 2. + * + * This function returns the number of distinct runs verified in the new + * c_block when compared against this old c_block. + */ LOCAL long i_iterate_stage1(p, old, new, callback) cdrom_paranoia *p; @@ -449,6 +755,18 @@ long matchoffset; /* + * "???: Why do we limit our search only to the samples with overlapping + * absolute positions? It could be because it eliminates some further + * bounds checking." + * Short answer is yes --Monty + * + * "Why do we "no longer try to spread the ... search" as mentioned + * below?" + * The search is normally much faster without the spread, + * even in heavy jitter. Dynoverlap tends to be a bigger deal in + * stage 2. --Monty + */ + /* * we no longer try to spread the stage one search area by dynoverlap */ long searchend = min(ce(old), ce(new)); @@ -466,10 +784,26 @@ /* * match return values are in terms of the new vector, not old + * "???: Why 23?" Odd, prime number --Monty */ for (j = searchbegin; j < searchend; j += 23) { - if ((new->flags[j - cb(new)] & 6) == 0) { + /* + * Skip past any samples verified in previous comparisons to + * other old c_blocks. Also, obviously, don't bother verifying + * unread/unmatchable samples. + */ + if ((new->flags[j - cb(new)] & (FLAGS_VERIFIED|FLAGS_UNREAD)) == 0) { tried++; + /* + * Starting from the sample in the old c_block with the absolute + * position j, look for a matching run in the new c_block. This + * search will look a certain distance around j, and if successful + * will extend the matching run as far backward and forward as + * it can. + * + * The search will only return 1 if it finds a matching run long + * enough to be deemed significant. + */ if (try_sort_sync(p, i, new->flags, old, j, &matchbegin, &matchend, &matchoffset, callback) == 1) { @@ -487,6 +821,12 @@ for (; jj < end; jj++) if (cv(old)[jj] != 0) break; + + /* + * Mark the matched samples in both c_blocks as verified. + * In reality, not all the samples are marked. See + * stage1_matched() for details. + */ if (jj < end) { stage1_matched(old, new, matchbegin, matchend, matchoffset, callback); } else { @@ -494,6 +834,10 @@ } } ret++; + + /* + * Skip past this verified run to look for more matches. + */ if (matchend - 1 > j) j = matchend - 1; } @@ -507,6 +851,35 @@ return (ret); } +/* + * i_stage1() (internal) + * + * Compare newly read samples against previously read samples, searching + * for contiguous runs of identical samples. Matching runs indicate that + * at least two reads of the CD returned identical data, with no dropped + * samples in that run. The runs may be jittered (i.e. their absolute + * positions on the CD may not be accurate due to inaccurate seeking) at + * this point. Their positions will be determined in stage 2. + * + * This function compares a new c_block against all other c_blocks in memory, + * searching for sufficiently long runs of identical samples. Since each + * c_block represents a separate call to read_c_block, this ensures that + * multiple reads have returned identical data. (Additionally, read_c_block + * varies the reads so that multiple reads are unlikely to produce identical + * errors, so any matches between reads are considered verified. See + * i_read_c_block for more details.) + * + * Each time we find such a run (longer than MIN_WORDS_SEARCH), we mark + * the samples as "verified" in both c_blocks. Runs of verified samples in + * the new c_block are promoted into verified fragments, which will later + * be merged into the verified root in stage 2. + * + * In reality, not all the verified samples are marked as "verified." + * See stage1_matched() for an explanation. + * + * This function returns the number of verified fragments created by the + * stage 1 matching. + */ LOCAL long i_stage1(p, new, callback) cdrom_paranoia *p; @@ -520,10 +893,25 @@ long begin = 0; long end; + /* + * We're going to be comparing the new c_block against the other + * c_blocks in memory. Initialize the "sort cache" index to allow + * for fast searching through the new c_block. (The index will + * actually be built the first time we search.) + */ if (ptr) sort_setup(p->sortcache, cv(new), &cb(new), cs(new), cb(new), ce(new)); + /* + * Iterate from oldest to newest c_block, comparing the new c_block + * to each, looking for a sufficiently long run of identical samples + * (longer than MIN_WORDS_SEARCH), which will be marked as "verified" + * in both c_blocks. + * + * Since the new c_block is already in the list (at the head), don't + * compare it against itself. + */ while (ptr && ptr != new) { if (callback) @@ -535,20 +923,33 @@ /* * parse the verified areas of new into v_fragments + * + * Find each run of contiguous verified samples in the new c_block + * and create a verified fragment from each run. */ begin = 0; while (begin < size) { for (; begin < size; begin++) - if (new->flags[begin] & 4) + if (new->flags[begin] & FLAGS_VERIFIED) break; for (end = begin; end < size; end++) - if ((new->flags[end] & 4) == 0) + if ((new->flags[end] & FLAGS_VERIFIED) == 0) break; if (begin >= size) break; ret++; + /* + * We create a new verified fragment from the contiguous run + * of verified samples. + * + * We expand the "verified" range by OVERLAP_ADJ on each side + * to compensate for trimming done to the verified range by + * stage1_matched(). The samples were actually verified, and + * hence belong in the verified fragment. See stage1_matched() + * for an explanation of the trimming. + */ new_v_fragment(p, new, cb(new) + max(0, begin - OVERLAP_ADJ), cb(new) + min(size, end + OVERLAP_ADJ), (end + OVERLAP_ADJ >= size && new->lastsector)); @@ -556,15 +957,48 @@ begin = end; } + /* + * Return the number of distinct verified fragments we found with + * stage 1 matching. + */ return (ret); } /* + * STAGE 2 MATCHING + */ +/* * reconcile v_fragments to root buffer. Free if matched, fragment/fixup root * if necessary * * do *not* match using zero posts */ +/* + * i_iterate_stage2 (internal) + * + * This function searches for a sufficiently long run of identical samples + * between the passed verified fragment and the verified root. The search + * is similar to that performed by i_iterate_stage1. Of course, what we do + * as a result of a match is different. + * + * Our search is slightly different in that we refuse to match silence to + * silence. All silence looks alike, and it would result in too many false + * positives here, so we handle silence separately. + * + * Also, because we're trying to determine whether this fragment as a whole + * overlaps with the root at all, we narrow our search (since it should match + * immediately or not at all). This is in contrast to stage 1, where we + * search the entire vector looking for all possible matches. + * + * This function returns 0 if no match was found (including failure to find + * one due to silence), or 1 if we found a match. + * + * When a match is found, the sync_result_t is set to the boundaries of + * matching run (begin/end, in terms of the root) and how far out of sync + * the fragment is from the canonical root (offset). Note that this offset + * is opposite in sign from the notion of offset used by try_sort_sync() + * and stage 1 generally. + */ LOCAL long i_iterate_stage2(p, v, r, callback) cdrom_paranoia *p; @@ -583,6 +1017,16 @@ fprintf(stderr, "Stage 2 search: fbv=%ld fev=%ld\n", fb(v), fe(v)); #endif + /* + * Quickly check whether there could possibly be any overlap between + * the verified fragment and the root. Our search will allow up to + * (p->dynoverlap) jitter between the two, so we expand the fragment + * search area by p->dynoverlap on both sides and see if that expanded + * area overlaps with the root. + * + * We could just as easily expand root's boundaries by p->dynoverlap + * instead and achieve the same result. + */ if (min(fe(v) + p->dynoverlap, re(root)) - max(fb(v) - p->dynoverlap, rb(root)) <= 0) return (0); @@ -591,39 +1035,107 @@ (*callback) (fb(v), PARANOIA_CB_VERIFY); /* - * just a bit of v; determine the correct area + * We're going to try to match the fragment to the root while allowing + * for p->dynoverlap jitter, so we'll actually be looking at samples + * in the fragment whose position claims to be up to p->dynoverlap + * outside the boundaries of the root. But, of course, don't extend + * past the edges of the fragment. */ fbv = max(fb(v), rb(root) - p->dynoverlap); /* - * we want to avoid zeroes + * Skip past leading zeroes in the fragment, and bail if there's nothing + * but silence. We handle silence later separately. */ while (fbv < fe(v) && fv(v)[fbv - fb(v)] == 0) fbv++; if (fbv == fe(v)) return (0); + + /* + * This is basically the same idea as the initial calculation for fbv + * above. Look at samples up to p->dynoverlap outside the boundaries + * of the root, but don't extend past the edges of the fragment. + * + * However, we also limit the search to no more than 256 samples. + * Unlike stage 1, we're not trying to find all possible matches within + * two runs -- rather, we're trying to see if the fragment as a whole + * overlaps with the root. If we can't find a match within 256 samples, + * there's probably no match to be found (because this fragment doesn't + * overlap with the root). + * + * "??? Is this why? Why 256?" 256 is simply a 'large enough number'. --Monty + */ fev = min(min(fbv + 256, re(root) + p->dynoverlap), fe(v)); { /* - * spread the search area a bit. We post from root, so - * containment must strictly adhere to root + * Because we'll allow for up to (p->dynoverlap) jitter between the + * fragment and the root, we expand the search area (fbv to fev) by + * p->dynoverlap on both sides. But, because we're iterating through + * root, we need to constrain the search area not to extend beyond + * the root's boundaries. */ long searchend = min(fev + p->dynoverlap, re(root)); long searchbegin = max(fbv - p->dynoverlap, rb(root)); sort_info *i = p->sortcache; long j; + /* + * Initialize the "sort cache" index to allow for fast searching + * through the verified fragment between (fbv,fev). (The index will + * actually be built the first time we search.) + */ sort_setup(i, fv(v), &fb(v), fs(v), fbv, fev); for (j = searchbegin; j < searchend; j += 23) { + /* + * Skip past silence in the root. If there are just a few silent + * samples, the effect is minimal. The real reason we need this is + * for large regions of silence. All silence looks alike, so you + * could false-positive "match" two runs of silence that are either + * unrelated or ought to be jittered, and try_sort_sync can't + * accurately determine jitter (offset) from silence. + * + * Therefore, we want to post on a non-zero sample. If there's + * nothing but silence left in the root, bail. We don't want + * to match it here. + */ while (j < searchend && rv(root)[j - rb(root)] == 0) j++; if (j == searchend) break; + /* + * Starting from the (non-zero) sample in the root with the absolute + * position j, look for a matching run in the verified fragment. This + * search will look a certain distance around j, and if successful + * will extend the matching run as far backward and forward as + * it can. + * + * The search will only return 1 if it finds a matching run long + * enough to be deemed significant. Note that the search is limited + * by the boundaries given to sort_setup() above. + * + * Note also that flags aren't used in stage 2 (since neither verified + * fragments nor the root have them). + */ if (try_sort_sync(p, i, (Uchar *)0, rc(root), j, &matchbegin, &matchend, &offset, callback)) { + /* + * If we found a matching run, we return the results of our match. + * + * Note that we flip the sign of (offset) because try_sort_sync() + * returns it in terms of the fragment (i.e. what we add + * to the fragment's position to yield the corresponding position + * in the root), but here we consider the root to be canonical, + * and so our returned "offset" reflects how the fragment is offset + * from the root. + * + * E.g.: If the fragment's sample 10 corresponds to root's 12, + * try_sort_sync() would return 2. But since root is canonical, + * we say that the fragment is off by -2. + */ r->begin = matchbegin; r->end = matchend; r->offset = -offset; @@ -638,7 +1150,16 @@ } /* - * simple test for a root vector that ends in silence + * i_silence_test() (internal) + * + * If the entire root is silent, or there's enough trailing silence + * to be significant (MIN_SILENCE_BOUNDARY samples), mark the beginning + * of the silence and "light" the silence flag. This flag will remain lit + * until i_silence_match() appends some non-silent samples to the root. + * + * We do this because if there's a long enough span of silence, we can't + * reliably detect jitter or dropped samples within that span. See + * i_silence_match() for details on how we recover from this situation. */ LOCAL void i_silence_test(root) @@ -648,9 +1169,19 @@ long end = re(root) - rb(root) - 1; long j; + /* + * Look backward from the end of the root to find the first non-silent + * sample. + */ for (j = end - 1; j >= 0; j--) if (vec[j] != 0) break; + + /* + * If the entire root is silent, or there's enough trailing silence + * to be significant, mark the beginning of the silence and "light" + * the silence flag. + */ if (j < 0 || end - j > MIN_SILENCE_BOUNDARY) { if (j < 0) j = 0; @@ -662,9 +1193,29 @@ } /* - * match into silence vectors at offset zero if at all possible. This - * also must be called with vectors in ascending begin order in case - * there are nonzero islands + * i_silence_match() (internal) + * + * This function is merges verified fragments into the verified root in cases + * where there is a problematic amount of silence (MIN_SILENCE_BOUNDARY + * samples) at the end of the root. + * + * We need a special approach because if there's a long enough span of + * silence, we can't reliably detect jitter or dropped samples within that + * span (since all silence looks alike). + * + * Only fragments that begin with MIN_SILENCE_BOUNDARY samples are eligible + * to be merged in this case. Fragments that are too far beyond the edge + * of the root to possibly overlap are also disregarded. + * + * Our first approach is to assume that such fragments have no jitter (since + * we can't establish otherwise) and merge them. However, if it's clear + * that there must be jitter (i.e. because non-silent samples overlap when + * we assume no jitter), we assume the fragment has the minimum possible + * jitter and then merge it. + * + * This function extends silence fairly aggressively, so it must be called + * with fragments in ascending order (beginning position) in case there are + * small non-silent regions within the silence. */ LOCAL long i_silence_match(root, v, callback) @@ -680,7 +1231,14 @@ long j; /* - * does this vector begin wet? + * See how much leading silence this fragment has. If there are fewer than + * MIN_SILENCE_BOUNDARY leading silent samples, we don't do this special + * silence matching. + * + * This fragment could actually belong here, but we can't be sure unless + * it has enough silence on its leading edge. This fragment will likely + * stick around until we do successfully extend the root, at which point + * it will be merged using the usual method. */ if (end < MIN_SILENCE_BOUNDARY) return (0); @@ -689,81 +1247,193 @@ break; if (j < MIN_SILENCE_BOUNDARY) return (0); + + /* + * Convert the offset of the first non-silent sample to an absolute + * position. For the time being, we will assume that this position + * is accurate, with no jitter. + */ j += fb(v); /* - * is the new silent section ahead of the end of the old - * by < p->dynoverlap? + * If this fragment is ahead of the root, see if that could just be due + * to jitter (if it's within p->dynoverlap samples of the end of root). */ if (fb(v) >= re(root) && fb(v) - p->dynoverlap < re(root)) { /* - * extend the zeroed area of root + * This fragment is within jitter range of the root, so we extend the + * root's silence so that it overlaps with this fragment. At this point + * we know that the fragment has at least MIN_SILENCE_BOUNDARY silent + * samples at the beginning, so we overlap by that amount. + * * XXX dynarrays are not needed here. */ long addto = fb(v) + MIN_SILENCE_BOUNDARY - re(root); -/* Int16_t avec[addto];*/ +#ifdef HAVE_DYN_ARRAYS + Int16_t avec[addto]; +#else #ifdef HAVE_ALLOCA Int16_t *avec = alloca(addto * sizeof (Int16_t)); #else Int16_t *avec = _pmalloc(addto * sizeof (Int16_t)); #endif +#endif - memset(avec, 0, sizeof (avec)); + memset(avec, 0, addto * sizeof (Int16_t)); c_append(rc(root), avec, addto); +#ifndef HAVE_DYN_ARRAYS #ifndef HAVE_ALLOCA _pfree(avec); #endif +#endif } + /* - * do we have an 'effortless' overlap? + * Calculate the overlap of the root's trailing silence and the fragment's + * leading silence. (begin,end) are the boundaries of that overlap. */ begin = max(fb(v), root->silencebegin); end = min(j, re(root)); + /* + * If there is an overlap, we assume that both the root and the fragment + * are jitter-free (since there's no way for us to tell otherwise). + */ if (begin < end) { /* - * don't use it unless it will extend... + * If the fragment will extend the root, then we append it to the root. + * Otherwise, no merging is necessary, as the fragment should already + * be contained within the root. */ if (fe(v) > re(root)) { long voff = begin - fb(v); + /* + * Truncate the overlapping silence from the end of the root. + */ c_remove(rc(root), begin - rb(root), -1); + /* + * Append the fragment to the root, starting from the point of overlap. + */ c_append(rc(root), vec + voff, fs(v) - voff); } + /* + * Record the fact that we merged this fragment assuming zero jitter. + */ offset_add_value(p, &p->stage2, 0, callback); } else { + /* + * We weren't able to merge the fragment assuming zero jitter. + * + * Check whether the fragment's leading silence ends before the root's + * trailing silence begins. If it does, we assume that the root is + * jittered forward. + */ if (j < begin) { /* - * OK, we'll have to force it a bit as the root is - * jittered forward + * We're going to append the non-silent samples of the fragment + * to the root where its silence begins. + * + * "??? This seems to be a very strange approach. At this point + * the root has a lot of trailing silence, and the fragment has + * the lot of leading silence. This merge will drop the silence + * and just splice the non-silence together. + * + * In theory, rift analysis will either confirm or fix this result. + * What circumstances motivated this approach?" + * + * This is an 'all bets are off' situation and we choose to make + * the best guess we can, based on absolute position being + * returned by the most recent reads. There are drives that + * will randomly lose what they're doing during a read and just + * pad out the results with zeros and return no error. This at + * least has a shot of addressing that situation. --Monty + * + * Compute the amount of silence at the beginning of the fragment. */ long voff = j - fb(v); /* - * don't use it unless it will extend... + * If attaching the non-silent tail of the fragment to the end + * of the non-silent portion of the root will extend the root, + * then we'll append the samples to the root. Otherwise, no + * merging is necessary, as the fragment should already be contained + * within the root. */ if (begin + fs(v) - voff > re(root)) { + /* + * Truncate the trailing silence from the root. + */ c_remove(rc(root), root->silencebegin - rb(root), -1); + /* + * Append the non-silent tail of the fragment to the root. + */ c_append(rc(root), vec + voff, fs(v) - voff); } + /* + * Record the fact that we merged this fragment assuming (end-begin) + * jitter. + */ offset_add_value(p, &p->stage2, end - begin, callback); - } else + } else { + /* + * We only get here if the fragment is past the end of the root, + * which means it must be farther than (dynoverlap) away, due to our + * root extension above. + * + * We weren't able to merge this fragment into the root after all. + */ return (0); + } } /* - * test the new root vector for ending in silence + * We only get here if we merged the fragment into the root. Update + * the root's silence flag. + * + * Note that this is the only place silenceflag is reset. In other words, + * once i_silence_test() lights the silence flag, it can only be reset + * by i_silence_match(). */ root->silenceflag = 0; + /* + * Now see if the new, extended root ends in silence. + */ i_silence_test(root); + /* + * Since we merged the fragment, we can free it now. But first we propagate + * its lastsector flag. + */ if (v->lastsector) root->lastsector = 1; free_v_fragment(v); return (1); } +/* + * i_stage2_each (internal) + * + * This function (which is entirely too long) attempts to merge the passed + * verified fragment into the verified root. + * + * First this function looks for a run of identical samples between + * the root and the fragment. If it finds a long enough run, it then + * checks for "rifts" (see below) and fixes the root and/or fragment as + * necessary. Finally, if the fragment will extend the tail of the root, + * we merge the fragment and extend the root. + * + * Most of the ugliness in this function has to do with handling "rifts", + * which are points of disagreement between the root and the verified + * fragment. This can happen when a drive consistently drops a few samples + * or stutters and repeats a few samples. It has to be consistent enough + * to result in a verified fragment (i.e. it happens twice), but inconsistent + * enough (e.g. due to the jiggled reads) not to happen every time. + * + * This function returns 1 if the fragment was successfully merged into the + * root, and 0 if not. + */ LOCAL long i_stage2_each(root, v, callback) root_block *root; @@ -771,21 +1441,51 @@ void (*callback) __PR((long, int)); { - cdrom_paranoia *p = v->p; - long dynoverlap = p->dynoverlap / 2 * 2; + cdrom_paranoia *p; + long dynoverlap; + /* + * If this fragment has already been merged & freed, abort. + */ if (!v || !v->one) return (0); + p = v->p; + /* + * "??? Why do we round down to an even dynoverlap?" Dynoverlap is + * in samples, not stereo frames --Monty + */ + dynoverlap = p->dynoverlap / 2 * 2; + + /* + * If there's no verified root yet, abort. + */ if (!rv(root)) { return (0); } else { sync_result r; + /* + * Search for a sufficiently long run of identical samples between + * the verified fragment and the verified root. There's a little + * bit of subtlety in the search when silence is involved. + */ if (i_iterate_stage2(p, v, &r, callback)) { - + /* + * Convert the results of the search to be relative to the root. + */ long begin = r.begin - rb(root); long end = r.end - rb(root); + + /* + * Convert offset into a value that will transform a relative + * position in the root to the corresponding relative position in + * the fragment. I.e., if offset = -2, then the sample at relative + * position 2 in the root is at relative position 0 in the fragment. + * + * While a bit opaque, this does reduce the number of calculations + * below. + */ long offset = r.begin + r.offset - fb(v) - begin; long temp; c_block *l = NULL; @@ -800,22 +1500,98 @@ #endif /* - * chase backward - * note that we don't extend back right now, only - * forward. + * Convert offset into a value that will transform a relative + * position in the root to the corresponding relative position in + * the fragment. I.e., if offset = -2, then the sample at relative + * position 2 in the root is at relative position 0 in the fragment. + * + * While a bit opaque, this does reduce the number of calculations + * below. + */ + /* + * Now that we've found a sufficiently long run of identical samples + * between the fragment and the root, we need to check for rifts. + * + * A "rift", as mentioned above, is a disagreement between the + * fragment and the root. When there's a rift, the matching run + * found by i_iterate_stage2() will obviously stop where the root + * and the fragment disagree. + * + * So we detect rifts by checking whether the matching run extends + * to the ends of the fragment and root. If the run does extend to + * the ends of the fragment and root, then all overlapping samples + * agreed, and there's no rift. If, however, the matching run + * stops with samples left over in both the root and the fragment, + * that means the root and fragment disagreed at that point. + * Leftover samples at the beginning of the match indicate a + * leading rift, and leftover samples at the end of the match indicate + * a trailing rift. + * + * Once we detect a rift, we attempt to fix it, depending on the + * nature of the disagreement. See i_analyze_rift_[rf] for details + * on how we determine what kind of rift it is. See below for + * how we attempt to fix the rifts. + */ + + /* + * First, check for a leading rift, fix it if possible, and then + * extend the match forward until either we hit the limit of the + * overlapping samples, or until we encounter another leading rift. + * Keep doing this until we hit the beginning of the overlap. + * + * Note that while we do fix up leading rifts, we don't extend + * the root backward (earlier samples) -- only forward (later + * samples). + */ + + /* + * If the beginning of the match didn't reach the beginning of + * either the fragment or the root, we have a leading rift to be + * examined. + * + * Remember that (begin) is the offset into the root, and (begin+offset) + * is the equivalent offset into the fragment. If neither one is at + * zero, then they both have samples before the match, and hence a + * rift. */ while ((begin + offset > 0 && begin > 0)) { long matchA = 0, matchB = 0, matchC = 0; + /* + * (begin) is the offset into the root of the first matching sample, + * (beginL) is the offset into the fragment of the first matching + * sample. These samples are at the edge of the rift. + */ long beginL = begin + offset; + /* + * The first time we encounter a leading rift, allocate a + * scratch copy of the verified fragment which we'll use if + * we need to fix up the fragment before merging it into + * the root. + */ if (l == NULL) { Int16_t *buff = _pmalloc(fs(v) * sizeof (Int16_t)); l = c_alloc(buff, fb(v), fs(v)); memcpy(buff, fv(v), fs(v) * sizeof (Int16_t)); } + + /* BEGIN CSTYLED */ + /* + * Starting at the first mismatching sample, see how far back the + * rift goes, and determine what kind of rift it is. Note that + * we're searching through the fixed up copy of the fragment. + * + * matchA > 0 if there are samples missing from the root + * matchA < 0 if there are duplicate samples (stuttering) in the root + * matchB > 0 if there are samples missing from the fragment + * matchB < 0 if there are duplicate samples in the fragment + * matchC != 0 if there's a section of garbage, after which + * the fragment and root agree and are in sync + */ + /* END CSTYLED */ i_analyze_rift_r(rv(root), cv(l), rs(root), cs(l), begin - 1, beginL - 1, @@ -825,36 +1601,68 @@ fprintf(stderr, "matching rootR: matchA:%ld matchB:%ld matchC:%ld\n", matchA, matchB, matchC); #endif - + /* + * "??? The root.returnedlimit checks below are presently a mystery." + * Those are for the case where our backtracking wants to take + * us to back before bytes we've already returned to the + * application. In short, it's a "we're screwed" + * check. --Monty + */ if (matchA) { /* - * a problem with root + * There's a problem with the root */ if (matchA > 0) { /* - * dropped bytes; add back from v + * There were (matchA) samples dropped from the root. We'll add + * them back from the fixed up fragment. */ if (callback) (*callback) (begin + rb(root) - 1, PARANOIA_CB_FIXUP_DROPPED); if (rb(root) + begin < p->root.returnedlimit) break; else { + /* + * At the edge of the rift in the root, insert the missing + * samples from the fixed up fragment. They're the (matchA) + * samples immediately preceding the edge of the rift in the + * fragment. + */ c_insert(rc(root), begin, cv(l) + beginL - matchA, matchA); + + /* + * We just inserted (matchA) samples into the root, so update + * our begin/end offsets accordingly. Also adjust the + * (offset) to compensate (since we use it to find samples in + * the fragment, and the fragment hasn't changed). + */ offset -= matchA; begin += matchA; end += matchA; } } else { /* - * duplicate bytes; drop from root + * There were (-matchA) duplicate samples (stuttering) in the + * root. We'll drop them. */ if (callback) (*callback) (begin + rb(root) - 1, PARANOIA_CB_FIXUP_DUPED); if (rb(root) + begin + matchA < p->root.returnedlimit) break; else { + /* + * Remove the (-matchA) samples immediately preceding the + * edge of the rift in the root. + */ c_remove(rc(root), begin + matchA, -matchA); + + /* + * We just removed (-matchA) samples from the root, so update + * our begin/end offsets accordingly. Also adjust the offset + * to compensate. Remember that matchA < 0, so we're actually + * subtracting from begin/end. + */ offset -= matchA; begin += matchA; end += matchA; @@ -862,53 +1670,122 @@ } } else if (matchB) { /* - * a problem with the fragment + * There's a problem with the fragment */ if (matchB > 0) { /* - * dropped bytes + * There were (matchB) samples dropped from the fragment. We'll + * add them back from the root. */ if (callback) (*callback) (begin + rb(root) - 1, PARANOIA_CB_FIXUP_DROPPED); + + /* + * At the edge of the rift in the fragment, insert the missing + * samples from the root. They're the (matchB) samples + * immediately preceding the edge of the rift in the root. + * Note that we're fixing up the scratch copy of the fragment. + */ c_insert(l, beginL, rv(root) + begin - matchB, matchB); + + /* + * We just inserted (matchB) samples into the fixed up fragment, + * so update (offset), since we use it to find samples in the + * fragment based on the root's unchanged offsets. + */ offset += matchB; } else { /* - * duplicate bytes + * There were (-matchB) duplicate samples (stuttering) in the + * fixed up fragment. We'll drop them. */ if (callback) (*callback) (begin + rb(root) - 1, PARANOIA_CB_FIXUP_DUPED); + + /* + * Remove the (-matchB) samples immediately preceding the edge + * of the rift in the fixed up fragment. + */ c_remove(l, beginL + matchB, -matchB); + + /* + * We just removed (-matchB) samples from the fixed up fragment, + * so update (offset), since we use it to find samples in the + * fragment based on the root's unchanged offsets. + */ offset += matchB; } } else if (matchC) { /* - * Uhh... problem with both - * Set 'disagree' flags in root + * There are (matchC) samples that simply disagree between the + * fragment and the root. On the other side of the mismatch, the + * fragment and root agree again. We can't classify the mismatch + * as either a stutter or dropped samples, and we have no way of + * telling whether the fragment or the root is right. + * + * "The original comment indicated that we set "disagree" + * flags in the root, but it seems to be historical." The + * disagree flags were from a time when we did interpolation + * over samples we simply couldn't get to agree. Yes, + * historical functionality that didn;t work well. --Monty */ if (rb(root) + begin - matchC < p->root.returnedlimit) break; + + /* + * Overwrite the mismatching (matchC) samples in root with the + * samples from the fixed up fragment. + * + * "??? Do we think the fragment is more likely correct, is this + * just arbitrary, or is there some other reason for overwriting + * the root?" + * We think these samples are more likely to be correct --Monty + */ c_overwrite(rc(root), begin - matchC, cv(l) + beginL - matchC, matchC); } else { /* - * do we have a mismatch due to silence - * beginning/end case? - * in the 'chase back' case, we don't - * do anything. - * Did not determine nature of - * difficulty... report and bail + * We may have had a mismatch because we ran into leading silence. + * + * "??? To be studied: why would this cause a mismatch? + * Neither i_analyze_rift_r nor i_iterate_stage2() nor + * i_paranoia_overlap() appear to take silence into + * consideration in this regard. It could be due to our + * skipping of silence when searching for a match." Jitter + * and or skipping in sections of silence could end up with + * two sets of verified vectors that agree completely except + * for the length of the silence. Silence is a huge bugaboo + * in general because there's no entropy within it to base + * verification on. --Monty + * + * Since we don't extend the root in that direction, we don't + * do anything, just move on to trailing rifts. + */ + /* + * If the rift was too complex to fix (see i_analyze_rift_r), + * we just stop and leave the leading edge where it is. */ /* RRR(*callback)(post,PARANOIA_CB_XXX); */ break; } /* - * not the most efficient way, but it will do - * for now + * Recalculate the offset of the edge of the rift in the fixed + * up fragment, in case it changed. + * + * "??? Why is this done here rather than in the (matchB) case above, + * which should be the only time beginL will change." + * Because there's no reason not to? --Monty */ beginL = begin + offset; + + /* + * Now that we've fixed up the root or fragment as necessary, see + * how far we can extend the matching run. This function is + * overkill, as it tries to extend the matching run in both + * directions (and rematches what we already matched), but it works. + */ i_paranoia_overlap(rv(root), cv(l), begin, beginL, rs(root), cs(l), @@ -916,22 +1793,71 @@ } /* - * chase forward + * Second, check for a trailing rift, fix it if possible, and then + * extend the match forward until either we hit the limit of the + * overlapping samples, or until we encounter another trailing rift. + * Keep doing this until we hit the end of the overlap. + * + * If the end of the match didn't reach the end of either the fragment + * or the root, we have a trailing rift to be examined. + * + * Remember that (end) is the offset into the root, and (end+offset) + * is the equivalent offset into the fragment. If neither one is + * at the end of the vector, then they both have samples after the + * match, and hence a rift. + * + * (temp) is the size of the (potentially fixed-up) fragment. If + * there was a leading rift, (l) is the fixed up fragment, and + * (offset) is now relative to it. */ temp = l ? cs(l) : fs(v); while (end + offset < temp && end < rs(root)) { long matchA = 0, matchB = 0, matchC = 0; + /* + * (begin) is the offset into the root of the first matching sample, + * (beginL) is the offset into the fragment of the first matching + * sample. We know these samples match and will use these offsets + * later when we try to extend the matching run. + */ long beginL = begin + offset; + /* + * (end) is the offset into the root of the first mismatching sample + * after the matching run, (endL) is the offset into the fragment of + * the equivalent sample. These samples are at the edge of the rift. + */ long endL = end + offset; + /* + * The first time we encounter a rift, allocate a scratch copy of + * the verified fragment which we'll use if we need to fix up the + * fragment before merging it into the root. + * + * Note that if there was a leading rift, we'll already have + * this (potentially fixed-up) scratch copy allocated. + */ if (l == NULL) { Int16_t *buff = _pmalloc(fs(v) * sizeof (Int16_t)); l = c_alloc(buff, fb(v), fs(v)); memcpy(buff, fv(v), fs(v) * sizeof (Int16_t)); } + + /* BEGIN CSTYLED */ + /* + * Starting at the first mismatching sample, see how far forward the + * rift goes, and determine what kind of rift it is. Note that we're + * searching through the fixed up copy of the fragment. + * + * matchA > 0 if there are samples missing from the root + * matchA < 0 if there are duplicate samples (stuttering) in the root + * matchB > 0 if there are samples missing from the fragment + * matchB < 0 if there are duplicate samples in the fragment + * matchC != 0 if there's a section of garbage, after which + * the fragment and root agree and are in sync + */ + /* END CSTYLED */ i_analyze_rift_f(rv(root), cv(l), rs(root), cs(l), end, endL, @@ -944,62 +1870,135 @@ if (matchA) { /* - * a problem with root + * There's a problem with the root */ if (matchA > 0) { /* - * dropped bytes; add back from v + * There were (matchA) samples dropped from the root. We'll add + * them back from the fixed up fragment. */ if (callback) (*callback) (end + rb(root), PARANOIA_CB_FIXUP_DROPPED); if (end + rb(root) < p->root.returnedlimit) break; + + /* + * At the edge of the rift in the root, insert the missing + * samples from the fixed up fragment. They're the (matchA) + * samples immediately preceding the edge of the rift in the + * fragment. + */ c_insert(rc(root), end, cv(l) + endL, matchA); + + /* + * Although we just inserted samples into the root, we did so + * after (begin) and (end), so we needn't update those offsets. + */ } else { /* - * duplicate bytes; drop from root + * There were (-matchA) duplicate samples (stuttering) in the + * root. We'll drop them. */ if (callback) (*callback) (end + rb(root), PARANOIA_CB_FIXUP_DUPED); if (end + rb(root) < p->root.returnedlimit) break; + + /* + * Remove the (-matchA) samples immediately following the edge + * of the rift in the root. + */ c_remove(rc(root), end, -matchA); + + /* + * Although we just removed samples from the root, we did so + * after (begin) and (end), so we needn't update those offsets. + */ } } else if (matchB) { /* - * a problem with the fragment + * There's a problem with the fragment */ if (matchB > 0) { /* - * dropped bytes + * There were (matchB) samples dropped from the fragment. We'll + * add them back from the root. */ if (callback) (*callback) (end + rb(root), PARANOIA_CB_FIXUP_DROPPED); + + /* + * At the edge of the rift in the fragment, insert the missing + * samples from the root. They're the (matchB) samples + * immediately following the dge of the rift in the root. + * Note that we're fixing up the scratch copy of the fragment. + */ c_insert(l, endL, rv(root) + end, matchB); + + /* + * Although we just inserted samples into the fragment, we did so + * after (begin) and (end), so (offset) hasn't changed either. + */ } else { /* - * duplicate bytes + * There were (-matchB) duplicate samples (stuttering) in thea + * fixed up fragment. We'll drop them. */ if (callback) (*callback) (end + rb(root), PARANOIA_CB_FIXUP_DUPED); + + /* + * Remove the (-matchB) samples immediately following the edge + * of the rift in the fixed up fragment. + */ c_remove(l, endL, -matchB); + + /* + * Although we just removed samples from the fragment, we did so + * after (begin) and (end), so (offset) hasn't changed either. + */ } } else if (matchC) { /* - * Uhh... problem with both - * Set 'disagree' flags in root + * There are (matchC) samples that simply disagree between the + * fragment and the root. On the other side of the mismatch, the + * fragment and root agree again. We can't classify the mismatch + * as either a stutter or dropped samples, and we have no way of + * telling whether the fragment or the root is right. + * + * The original comment indicated that we set "disagree" flags + * in the root, but it seems to be historical. */ if (end + rb(root) < p->root.returnedlimit) break; + + /* + * Overwrite the mismatching (matchC) samples in root with the + * samples from the fixed up fragment. + */ c_overwrite(rc(root), end, cv(l) + endL, matchC); } else { + /* + * We may have had a mismatch because we ran into trailing silence. + * + * At this point we have a trailing rift. We check whether + * one of the vectors (fragment or root) has trailing silence. + */ analyze_rift_silence_f(rv(root), cv(l), rs(root), cs(l), end, endL, &matchA, &matchB); if (matchA) { /* - * silence in root + * The contents of the root's trailing rift are silence. The + * fragment's are not (otherwise there wouldn't be a rift). + * We therefore assume that the root has garbage from this + * point forward and truncate it. + * + * This will have the effect of eliminating the trailing + * rift, causing the fragment's samples to be appended to + * the root. + * * Can only do this if we haven't * already returned data */ @@ -1008,7 +2007,17 @@ } } else if (matchB) { /* - * silence in fragment; lose it + * The contents of the fragment's trailing rift are silence. + * The root's are not (otherwise there wouldn't be a rift). + * We therefore assume that the fragment has garbage from this + * point forward. + * + * We needn't actually truncate the fragment, because the root + * has already been fixed up from this fragment as much as + * possible, and the truncated fragment wouldn't extend the + * root. Therefore, we can consider this (truncated) fragment + * to be already merged into the root. So we dispose of it and + * return a success. */ if (l) i_cblock_destructor(l); @@ -1017,15 +2026,19 @@ } else { /* - * Could not determine nature of - * difficulty... report and bail + * If the rift was too complex to fix (see i_analyze_rift_f), + * we just stop and leave the trailing edge where it is. */ /* RRR(*callback)(post,PARANOIA_CB_XXX); */ } break; } + /* - * not the most efficient way, but it will do for now + * Now that we've fixed up the root or fragment as necessary, see + * how far we can extend the matching run. This function is + * overkill, as it tries to extend the matching run in both + * directions (and rematches what we already matched), but it works. */ i_paranoia_overlap(rv(root), cv(l), begin, beginL, @@ -1034,7 +2047,28 @@ } /* - * if this extends our range, let's glom + * Third and finally, if the overlapping verified fragment extends + * our range forward (later samples), we append ("glom") the new + * samples to the end of the root. + * + * Note that while we did fix up leading rifts, we don't extend + * the root backward (earlier samples) -- only forward (later + * samples). + * + * This is generally fine, since the verified root is supposed to + * slide from earlier samples to later samples across multiple calls + * to paranoia_read(). + * + * "??? But, is this actually right? Because of this, we don't + * extend the root to hold the earliest read sample, if we + * happened to initialize the root with a later sample due to + * jitter. There are probably some ugly side effects from + * extending the root backward, in the general case, but it may + * not be so dire if we're near sample 0. To be investigated." + * In the begin case, any start position is arbitrary due to + * inexact seeking. Later, we can't back-extend the root as the + * samples preceeding the beginning have already been returned + * to the application! --Monty */ { long sizeA = rs(root); @@ -1042,6 +2076,10 @@ long vecbegin; Int16_t *vector; + /* + * If there were any rifts, we'll use the fixed up fragment (l), + * otherwise, we use the original fragment (v). + */ if (l) { sizeB = cs(l); vector = cv(l); @@ -1052,21 +2090,60 @@ vecbegin = fb(v); } + /* + * Convert the fragment-relative offset (sizeB) into an offset + * relative to the root (A), and see if the offset is past the + * end of the root (> sizeA). If it is, this fragment will extend + * our root. + * + * "??? Why do we check for v->lastsector separately?" Because + * of the case where root extends *too* far; if we never get a + * read that accidentally extends that far again, we could + * hang and loop forever. --Monty + */ if (sizeB - offset > sizeA || v->lastsector) { if (v->lastsector) { root->lastsector = 1; } + + /* + * "??? Why would end be < sizeA? Why do we truncate root?" + * Because it can happen (seeking is very very inexact) and + * end of disk tends to be very problematic in terms of + * stopping point. We also generally believe more recent + * information over previous information when they disagree + * and both are 'verified'. --Monty + */ if (end < sizeA) c_remove(rc(root), end, -1); + /* + * Extend the root with the samples from the end of the + * (potentially fixed up) fragment. + */ if (sizeB - offset - end) c_append(rc(root), vector + end + offset, sizeB - offset - end); + /* + * Any time we update the root we need to check whether it ends + * with a large span of silence. + */ i_silence_test(root); /* - * add offset into dynoverlap stats + * Add the dynoverlap offset into our stage 2 statistics. + * + * Note that we convert our peculiar offset (which is in terms of + * the relative positions of samples within each vector) back into + * the actual offset between what A considers sample N and what B + * considers sample N. + * + * We do this at the end of rift handling because any original + * offset returned by i_iterate_stage2() might have been due to + * dropped or duplicated samples. Once we've fixed up the root + * and the fragment, we have an offset which more reliably + * indicates jitter. */ offset_add_value(p, &p->stage2, offset + vecbegin - rb(root), callback); } @@ -1078,7 +2155,21 @@ } else { /* - * D'oh. No match. What to do with the fragment? + * We were unable to merge this fragment into the root. + * + * Check whether the fragment should have overlapped with the root, + * even taking possible jitter into account. (I.e., If the fragment + * ends so far before the end of the root that even (dynoverlap) + * samples of jitter couldn't push it beyond the end of the root, + * it should have overlapped.) + * + * It is, however, possible that we failed to match using the normal + * tests because we're dealing with silence, which we handle + * separately. + * + * If the fragment should have overlapped, and we're not dealing + * with the special silence case, we don't know what to make of + * this fragment, and we just discard it. */ if (fe(v) + dynoverlap < re(root) && !root->silenceflag) { /* @@ -1118,6 +2209,10 @@ memcpy(buff, fv(v), fs(v) * sizeof (Int16_t)); root->vector = c_alloc(buff, fb(v), fs(v)); } + + /* + * Check whether the new root has a long span of trailing silence. + */ i_silence_test(root); return (1); @@ -1133,6 +2228,31 @@ return ((*(v_fragment **) a)->begin - (*(v_fragment **) b)->begin); } +/* + * i_stage2 (internal) + * + * This function attempts to extend the verified root by merging verified + * fragments into it. It keeps extending the tail end of the root until + * it runs out of matching fragments. See i_stage2_each (and + * i_iterate_stage2) for details of fragment matching and merging. + * + * This function is called by paranoia_read_limited when the verified root + * doesn't contain sufficient data to satisfy the request for samples. + * If this function fails to extend the verified root far enough (having + * exhausted the currently available verified fragments), the caller + * will then read the device again to try and establish more verified + * fragments. + * + * We first try to merge all the fragments in ascending order using the + * standard method (i_stage2_each()), and then we try to merge the + * remaining fragments using silence matching (i_silence_match()) + * if the root has a long span of trailing silence. See the initial + * comments on silence and i_silence_match() for an explanation of this + * distinction. + * + * This function returns the number of verified fragments successfully + * merged into the verified root. + */ LOCAL int i_stage2(p, beginword, endword, callback) cdrom_paranoia *p; @@ -1155,9 +2275,17 @@ * matching in the event that there are still audio vectors with * content to be sunk before the silence */ + + /* + * This flag is not the silence flag. Rather, it indicates whether + * we succeeded in adding a verified fragment to the verified root. + * In short, we keep adding fragments until we no longer find a + * match. + */ while (flag) { /* - * loop through all the current fragments + * Convert the linked list of verified fragments into an array, + * to be sorted in order of beginning sample position */ v_fragment *first = v_first(p); long active = p->fragments->active, @@ -1175,29 +2303,82 @@ first = next; } + /* + * Reset the flag so that if we don't match any fragments, we + * stop looping. Then, proceed only if there are any fragments + * to match. + */ flag = 0; if (count) { /* - * sorted in ascending order of beginning + * Sort the array of verified fragments in order of beginning + * sample position. */ qsort(list, active, sizeof (v_fragment *), vsort); /* - * we try a nonzero based match even if in silent mode - * in the case that there are still cached vectors to - * sink behind continent->ocean boundary + * We don't check for the silence flag yet, because even if the + * verified root ends in silence (and thus the silence flag is set), + * there may be a non-silent region at the beginning of the verified + * root, into which we can merge the verified fragments. + * + * Iterate through the verified fragments, starting at the fragment + * with the lowest beginning sample position. */ for (count = 0; count < active; count++) { first = list[count]; + + /* + * Make sure this fragment hasn't already been merged (and + * thus freed). + */ if (first->one) { + /* + * If we don't have a verified root yet, just promote the first + * fragment (with lowest beginning sample) to be the verified + * root. + * + * "??? It seems that this could be fairly arbitrary if jitter + * is an issue. If we've verified two fragments allegedly + * beginning at "0" (which are actually slightly offset due to + * jitter), the root might not begin at the earliest read + * sample. Additionally, because subsequent fragments are + * only merged at the tail end of the root, this situation + * won't be fixed by merging the earlier samples. + * + * Practically, this ends up not being critical since most + * drives insert some extra silent samples at the beginning + * of the stream. Missing a few of them doesn't cause any + * real lost data. But it is non-deterministic." + * + * On such a drive, the entire act of CDDA read is highly + * nondeterministic. All redbook says is +/- 75 sectors. + * If you insist on the earliest possible sample, you can + * get into a situation where the first read was far earlier + * than all the others and no other read ever repeats the + * early positioning. --Monty + */ if (rv(root) == NULL) { if (i_init_root(&(p->root), first, beginword, callback)) { free_v_fragment(first); + + /* + * Consider this a merged fragment, so set the flag + * to keep looping. + */ flag = 1; ret++; } } else { + /* + * Try to merge this fragment with the verified root, + * extending the tail of the root. + */ if (i_stage2_each(root, first, callback)) { + /* + * If we successfully merged the fragment, set the flag + * to keep looping. + */ ret++; flag = 1; } @@ -1207,13 +2388,34 @@ /* * silence handling + * + * If the verified root ends in a long span of silence, iterate + * through the remaining unmerged fragments to see if they can be + * merged using our special silence matching. */ if (!flag && p->root.silenceflag) { for (count = 0; count < active; count++) { first = list[count]; + + /* + * Make sure this fragment hasn't already been merged (and + * thus freed). + */ if (first->one) { if (rv(root) != NULL) { + /* + * Try to merge the fragment into the root. This will only + * succeed if the fragment overlaps and begins with sufficient + * silence to be a presumed match. + * + * Note that the fragments must be passed to i_silence_match() + * in ascending order, as they are here. + */ if (i_silence_match(root, first, callback)) { + /* + * If we successfully merged the fragment, set the flag + * to keep looping. + */ ret++; flag = 1; } @@ -1225,7 +2427,18 @@ #ifndef HAVE_DYN_ARRAYS _pfree(list); #endif + + /* + * If we were able to extend the verified root at all during this pass + * through the loop, loop again to see if we can merge any remaining + * fragments with the extended root. + */ } + + /* + * Return the number of fragments we successfully merged into the + * verified root. + */ return (ret); } @@ -1317,11 +2530,11 @@ if (cbegin <= post && cend > post) { long vend = post; - if (c->flags[post - cbegin] & 4) { + if (c->flags[post - cbegin] & FLAGS_VERIFIED) { /* * verified area! */ - while (vend < cend && (c->flags[vend - cbegin] & 4)) + while (vend < cend && (c->flags[vend - cbegin] & FLAGS_VERIFIED)) vend++; if (!vflag || vend > vflag) { graft = c; @@ -1333,7 +2546,7 @@ * not a verified area */ if (!vflag) { - while (vend < cend && (c->flags[vend - cbegin] & 4) == 0) + while (vend < cend && (c->flags[vend - cbegin] & FLAGS_VERIFIED) == 0) vend++; if (graft == NULL || gend > vend) { /* @@ -1352,7 +2565,7 @@ long cbegin = cb(graft); long cend = ce(graft); - while (gend < cend && (graft->flags[gend - cbegin] & 4)) + while (gend < cend && (graft->flags[gend - cbegin] & FLAGS_VERIFIED)) gend++; gend = min(gend + OVERLAP_ADJ, cend); @@ -1396,6 +2609,8 @@ { paranoia_resetall(p); sort_free(p->sortcache); + free_list(p->cache, 1); + free_list(p->fragments, 1); _pfree(p); } @@ -1405,6 +2620,37 @@ int enable; { p->enable = enable; + if (enable & PARANOIA_MODE_C2CHECK) { + p->sectsize = CD_C2SIZE_RAW; + p->sectwords = CD_C2SIZE_RAW/2; + } else { + p->sectsize = CD_FRAMESIZE_RAW; + p->sectwords = CD_FRAMESIZE_RAW/2; + } +} + +EXPORT int +paranoia_modeget(p) + cdrom_paranoia *p; +{ + return (p->enable); +} + +EXPORT void +paranoia_set_readahead(p, readahead) + cdrom_paranoia *p; + int readahead; +{ + p->readahead = readahead; + sort_free(p->sortcache); + p->sortcache = sort_alloc(p->readahead * CD_FRAMEWORDS); +} + +EXPORT int +paranoia_get_readahead(p) + cdrom_paranoia *p; +{ + return (p->readahead); } EXPORT long @@ -1449,8 +2695,131 @@ return (ret); } +LOCAL void +c2_audiocopy(to, from, nsectors) + void *to; + void *from; + int nsectors; +{ + char *tocp = to; + char *fromcp = from; + + while (--nsectors >= 0) { + memmove(tocp, fromcp, CD_FRAMESIZE_RAW); + tocp += CD_FRAMESIZE_RAW; + fromcp += CD_C2SIZE_RAW; + } +} + +/* + * Stolen from readcd(1) + */ +LOCAL int +bits(c) + int c; +{ + int n = 0; + + if (c & 0x01) + n++; + if (c & 0x02) + n++; + if (c & 0x04) + n++; + if (c & 0x08) + n++; + if (c & 0x10) + n++; + if (c & 0x20) + n++; + if (c & 0x40) + n++; + if (c & 0x80) + n++; + return (n); +} + +LOCAL void +c2_errcopy(to, from, nsectors, errp) + void *to; + void *from; + int nsectors; + struct c2errs *errp; +{ + char dummy[CD_C2PTR_RAW * 4]; + char *tocp = to; + char *fromcp = from; + int errs = 0; + UInt8_t *ep; + UInt8_t e; + int i; + + errp->c2errs = 0; + errp->c2bytes = 0; + errp->c2secs = 0; + errp->c2maxerrs = 0; + + while (--nsectors >= 0) { + if (to == NULL) + tocp = dummy; + ep = (UInt8_t *)(fromcp + CD_FRAMESIZE_RAW); + for (i = CD_C2PTR_RAW; --i >= 0; tocp += 4) { + if ((e = *ep++) != 0) { + if (e & 0xC0) + tocp[0] |= FLAGS_C2; + if (e & 0x30) + tocp[1] |= FLAGS_C2; + if (e & 0x0C) + tocp[2] |= FLAGS_C2; + if (e & 0x03) + tocp[3] |= FLAGS_C2; + errs += bits(e); + } + } + if (errs > 0) { + errp->c2bytes += errs; + errp->c2secs++; + if (errs > errp->c2maxerrs) + errp->c2maxerrs = errs; + errs = 0; + } + + fromcp += CD_C2SIZE_RAW; + } + if (errp->c2secs > 0) + errp->c2errs++; +} + /* - * returns last block read, -1 on error + * read_c_block() (internal) + * + * This funtion reads many (p->readahead) sectors, encompassing at least + * the requested words. + * + * It returns a c_block which encapsulates these sectors' data and sector + * number. The sectors come come from multiple low-level read requests. + * + * This function reads many sectors in order to exhaust any caching on the + * drive itself, as caching would simply return the same incorrect data + * over and over. Paranoia depends on truly re-reading portions of the + * disc to make sure the reads are accurate and correct any inaccuracies. + * + * Which precise sectors are read varies ("jiggles") between calls to + * read_c_block, to prevent consistent errors across multiple reads + * from being misinterpreted as correct data. + * + * The size of each low-level read is determined by the underlying driver + * (p->d->nsectors), which allows the driver to specify how many sectors + * can be read in a single request. Historically, the Linux kernel could + * only read 8 sectors at a time, with likely dropped samples between each + * read request. Other operating systems may have different limitations. + * + * This function is called by paranoia_read_limited(), which breaks the + * c_block of read data into runs of samples that are likely to be + * contiguous, verifies them and stores them in verified fragments, and + * eventually merges the fragments into the verified root. + * + * This function returns the last c_block read or NULL on error. */ EXPORT c_block * i_read_c_block(p, beginword, endword, callback) @@ -1484,6 +2853,13 @@ #define valign(x, a) (((char *)(x)) + ((a) - 1 - ((((UIntptr_t)(x))-1)%(a)))) /* + * Calculate the first sector to read. This calculation takes + * into account the need to jitter the starting point of the read + * to reveal consistent errors as well as the low reliability of + * the edge words of a read. + */ + + /* * What is the first sector to read? want some pre-buffer if we're not * at the extreme beginning of the disc */ @@ -1522,6 +2898,11 @@ readat += driftcomp; + /* + * Create a new, empty c_block and add it to the head of the + * list of c_blocks in memory. It will be empty until the end of + * this subroutine. + */ if (p->enable & (PARANOIA_MODE_OVERLAP | PARANOIA_MODE_VERIFY)) { flags = _pcalloc(totaltoread * CD_FRAMEWORDS, 1); new = new_c_block(p); @@ -1547,19 +2928,27 @@ if (pagesize < 0) pagesize = 4096; /* Just a guess */ } - reduce = pagesize / CD_FRAMESIZE_RAW; - bufbase = _pmalloc(totaltoread * CD_FRAMESIZE_RAW + pagesize); + reduce = pagesize / p->sectsize; + bufbase = _pmalloc(totaltoread * p->sectsize + pagesize); buffer = (Int16_t *)valign(bufbase, pagesize); sofar = 0; firstread = -1; /* + * Issue each of the low-level reads; the optimal read size is + * approximately the cachemodel's cdrom cache size. The only reason + * to read less would be memory considerations. + * + * p->readahead = total number of sectors to read + * p->d->nsectors = number of sectors to read per request + */ + /* * actual read loop */ while (sofar < totaltoread) { - long secread = sectatonce; - long adjread = readat; - long thisread; + long secread = sectatonce; /* number of sectors to read this request */ + long adjread = readat; /* first sector to read for this request */ + long thisread; /* how many sectors were read this request */ /* * don't under/overflow the audio session @@ -1583,10 +2972,38 @@ secread = sectatonce - reduce; if (secread > 0) { + struct c2errs c2errs; + + /* + * We only evaluate it when the PARANOIA_MODE_C2CHECK + * flag is present, but let us be nice. + */ + c2errs.c2errs = c2errs.c2bytes = c2errs.c2secs = + c2errs.c2maxerrs = 0; if (firstread < 0) firstread = adjread; - if ((thisread = p->d_read(p->d, buffer + sofar * CD_FRAMEWORDS, adjread, + + /* + * Issue the low-level read to the driver. + * + * If the low-level read returned too few sectors, pad the result + * with null data and mark it as invalid (FLAGS_UNREAD). We pad + * because we're going to be appending further reads to the current + * c_block. + * + * "???: Why not re-read? It might be to keep you from getting + * hung up on a bad sector. Or it might be to avoid + * interrupting the streaming as much as possible." + * + * There are drives on which you will never get a full read in + * some positions. They always abort out early due to firmware + * boundary cases. Reread will cause exactly the same thing to + * happen again. NEC MultiSpeed 4x is one such drive. In these + * cases, you take what part of the read you know is good, and + * you get substantially better performance. --Monty + */ + if ((thisread = p->d_read(p->d, buffer + sofar * p->sectwords, adjread, secread)) < secread) { if (thisread < 0) @@ -1601,12 +3018,28 @@ memset(buffer + (sofar + thisread) * CD_FRAMEWORDS, 0, CD_FRAMESIZE_RAW * (secread - thisread)); if (flags) - memset(flags + (sofar + thisread) * CD_FRAMEWORDS, 2, + memset(flags + (sofar + thisread) * CD_FRAMEWORDS, FLAGS_UNREAD, CD_FRAMEWORDS * (secread - thisread)); } if (thisread != 0) anyflag = 1; + /* BEGIN CSTYLED */ + /* + * Because samples are likely to be dropped between read requests, + * mark the samples near the the boundaries of the read requests + * as suspicious (FLAGS_EDGE). This means that any span of samples + * against which these adjacent read requests are compared must + * overlap beyond the edges and into the more trustworthy data. + * Such overlapping spans are accordingly at least MIN_WORDS_OVERLAP + * words long (and naturally longer if any samples were dropped + * between the read requests). + * + * (EEEEE...overlapping span...EEEEE) + * (read 1 ...........EEEEE) (EEEEE...... read 2 ......EEEEE) ... + * dropped samples --^ + */ + /* END CSTYLED */ if (flags && sofar != 0) { /* * Don't verify across overlaps that are too @@ -1615,15 +3048,31 @@ int i = 0; for (i = -MIN_WORDS_OVERLAP / 2; i < MIN_WORDS_OVERLAP / 2; i++) - flags[sofar * CD_FRAMEWORDS + i] |= 1; + flags[sofar * CD_FRAMEWORDS + i] |= FLAGS_EDGE; + } + if (flags && p->enable & PARANOIA_MODE_C2CHECK) { + c2_errcopy(flags + sofar * CD_FRAMEWORDS, + buffer + sofar * p->sectwords, thisread, &c2errs); } p->lastread = adjread + secread; if (adjread + secread - 1 == p->current_lastsector) new->lastsector = -1; - if (callback) + if (callback) { + (*callback) (thisread, PARANOIA_CB_SECS); + if (p->enable & PARANOIA_MODE_C2CHECK) { + if (c2errs.c2errs > 0) + (*callback) (adjread * CD_FRAMEWORDS, PARANOIA_CB_C2ERR); + if (c2errs.c2bytes > 0) + (*callback) (c2errs.c2bytes, PARANOIA_CB_C2BYTES); + if (c2errs.c2secs > 0) + (*callback) (c2errs.c2secs, PARANOIA_CB_C2SECS); + if (c2errs.c2maxerrs > 0) + (*callback) (c2errs.c2maxerrs, PARANOIA_CB_C2MAXERRS); + } (*callback) ((adjread + secread - 1) * CD_FRAMEWORDS, PARANOIA_CB_READ); + } sofar += secread; readat = adjread + secread; @@ -1636,11 +3085,25 @@ } else { break; /* due to being past the readable area */ } + + /* + * Keep issuing read requests until we've read enough sectors to + * exhaust the drive's cache. + */ } + /* + * If we managed to read any sectors at all (anyflag), fill in the + * previously allocated c_block with the read data. Otherwise, free + * our buffers, dispose of the c_block, and return NULL. + */ if (anyflag) { new->vector = _pmalloc(totaltoread * CD_FRAMESIZE_RAW); - memcpy(new->vector, buffer, totaltoread * CD_FRAMESIZE_RAW); + if (p->enable & PARANOIA_MODE_C2CHECK) { + c2_audiocopy(new->vector, buffer, totaltoread); + } else { + memcpy(new->vector, buffer, totaltoread * CD_FRAMESIZE_RAW); + } _pfree(bufbase); new->begin = firstread * CD_FRAMEWORDS - p->dyndrift; @@ -1661,6 +3124,11 @@ } /* + * paranoia_read(), paranoia_read_limited() + * + * These functions "read" the next sector of audio data and returns + * a pointer to a full sector of verified samples (2352 bytes). + * * The returned buffer is *not* to be freed by the caller. It will * persist only until the next call to paranoia_read() for this p */ @@ -1694,6 +3162,14 @@ lastend = re(root); /* + * Since paranoia reads and verifies chunks of data at a time + * (which it needs to counteract dropped samples and inaccurate + * seeking), the requested samples may already be in memory, + * in the verified "root". + * + * The root is where paranoia stores samples that have been + * verified and whose position has been accurately determined. + * * First, is the sector we want already in the root? */ while (rv(root) == NULL || @@ -1704,22 +3180,48 @@ /* * Nope; we need to build or extend the root verified range + * + * We may have already read the necessary samples and placed + * them into verified fragments, but not yet merged them into + * the verified root. We'll check that before we actually + * try to read data from the drive. */ if (p->enable & (PARANOIA_MODE_VERIFY | PARANOIA_MODE_OVERLAP)) { + /* + * We need to make sure our memory consumption doesn't grow + * to the size of the whole CD. But at the same time, we + * need to hang onto some of the verified data (even perhaps + * data that's already been returned by paranoia_read()) in + * order to verify and accurately position future samples. + * + * Therefore, we free some of the verified data that we + * no longer need. + */ i_paranoia_trim(p, beginword, endword); recover_cache(p); - if (rb(root) != -1 && p->root.lastsector) + if (rb(root) != -1 && p->root.lastsector) { i_end_case(p, endword + p->maxdynoverlap, callback); - else + } else { + /* + * Merge as many verified fragments into the verified root + * as we need to satisfy the pending request. We may + * not have all the fragments we need, in which case we'll + * read data from the CD further below. + */ i_stage2(p, beginword, endword + p->maxdynoverlap, callback); + } } else i_end_case(p, endword + p->maxdynoverlap, callback); /* only trips if we're already */ /* done */ + /* + * If we were able to fill the verified root with data already + * in memory, we don't need to read any more data from the drive. + */ if (!(rb(root) == -1 || rb(root) > beginword || re(root) < endword + p->maxdynoverlap)) break; @@ -1728,15 +3230,38 @@ * Hmm, need more. Read another block */ { + /* + * Read many sectors, encompassing at least the requested words. + * + * The returned c_block encapsulates these sectors' data and + * sector number. The sectors come come from multiple low-level + * read requests, and words which were near the boundaries of + * those read requests are marked with FLAGS_EDGE. + */ c_block *new = i_read_c_block(p, beginword, endword, callback); if (new) { if (p->enable & (PARANOIA_MODE_OVERLAP | PARANOIA_MODE_VERIFY)) { - + /* + * If we need to verify these samples, send them to + * stage 1 verification, which will add verified samples + * to the set of verified fragments. Verified fragments + * will be merged into the verified root during stage 2 + * overlap analysis. + */ if (p->enable & PARANOIA_MODE_VERIFY) i_stage1(p, new, callback); else { /* + * If we're only doing overlapping reads (no stage 1 + * verification), consider each low-level read in the + * c_block to be a verified fragment. We exclude the + * edges from these fragments to enforce the requirement + * that we overlap the reads by the minimum amount. + * These fragments will be merged into the verified + * root during stage 2 overlap analysis. + */ + /* * just make v_fragments from the * boundary information. */ @@ -1744,10 +3269,10 @@ end = 0; while (begin < cs(new)) { - while (end < cs(new) && (new->flags[begin] & 1)) + while (end < cs(new) && (new->flags[begin] & FLAGS_EDGE)) begin++; end = begin + 1; - while (end < cs(new) && (new->flags[end] & 1) == 0) + while (end < cs(new) && (new->flags[end] & FLAGS_EDGE) == 0) end++; { new_v_fragment(p, new, begin + cb(new), @@ -1759,7 +3284,11 @@ } } else { - + /* + * If we're not doing any overlapping reads or verification + * of data, skip over the stage 1 and stage 2 verification and + * promote this c_block directly to the current "verified" root. + */ if (p->root.vector) i_cblock_destructor(p->root.vector); free_elem(new->e, 0); @@ -1810,9 +3339,20 @@ } } } + + /* + * Having read data from the drive and placed it into verified + * fragments, we now loop back to try to extend the root with + * the newly loaded data. Alternatively, if the root already + * contains the needed data, we'll just fall through. + */ } p->cursor++; + /* + * Return a pointer into the verified root. Thus, the caller + * must NOT free the returned pointer! + */ return (rv(root) + (beginword - rb(root))); } diff -Nru cdrtools-2.01.01a33/libparanoia/paranoia_p.mk cdrtools-3.02a09/libparanoia/paranoia_p.mk --- cdrtools-2.01.01a33/libparanoia/paranoia_p.mk 2007-06-30 11:13:33.000000000 +0000 +++ cdrtools-3.02a09/libparanoia/paranoia_p.mk 2008-01-11 17:24:07.000000000 +0000 @@ -1,4 +1,4 @@ -#ident "@(#)paranoia_p.mk 1.2 07/06/30 " +#ident "@(#)paranoia_p.mk 1.3 08/01/11 " ########################################################################### SRCROOT= .. RULESDIR= RULES @@ -6,6 +6,7 @@ ########################################################################### SUBARCHDIR= /profiled +SUBINSDIR= /profiled #.SEARCHLIST: . $(ARCHDIR) stdio $(ARCHDIR) #VPATH= .:stdio:$(ARCHDIR) INSDIR= lib diff -Nru cdrtools-2.01.01a33/libparanoia/p_block.c cdrtools-3.02a09/libparanoia/p_block.c --- cdrtools-2.01.01a33/libparanoia/p_block.c 2007-07-28 13:01:57.000000000 +0000 +++ cdrtools-3.02a09/libparanoia/p_block.c 2013-12-22 12:05:47.000000000 +0000 @@ -1,15 +1,15 @@ -/* @(#)p_block.c 1.24 07/07/28 J. Schilling from cdparanoia-III-alpha9.8 */ +/* @(#)p_block.c 1.29 13/12/22 J. Schilling from cdparanoia-III-alpha9.8 */ +#include #ifndef lint -static char sccsid[] = -"@(#)p_block.c 1.24 07/07/28 J. Schilling from cdparanoia-III-alpha9.8"; +static UConst char sccsid[] = +"@(#)p_block.c 1.29 13/12/22 J. Schilling from cdparanoia-III-alpha9.8"; #endif /* * CopyPolicy: GNU Lesser General Public License v2.1 applies - * Copyright (C) 1997-2001 by Monty (xiphmont@mit.edu) - * Copyright (C) 2002-2006 by J. Schilling + * Copyright (C) 1997-2001,2008 by Monty (xiphmont@mit.edu) + * Copyright (C) 2002-2013 by J. Schilling */ -#include #include #include #include @@ -506,6 +506,17 @@ /* * Initialization */ + +/* + * Get the beginning and ending sector bounds given cursor position. + * + * There are a couple of subtle differences between this and the + * cdda_firsttrack_sector and cdda_lasttrack_sector. If the cursor is + * at a sector later than cdda_firsttrack_sector, that sector will be + * used. As for the difference between cdda_lasttrack_sector, if the CD + * is mixed and there is a data track after the cursor but before the + * last audio track, the end of the audio sector before that is used. + */ EXPORT void i_paranoia_firstlast(p) cdrom_paranoia *p; @@ -567,7 +578,9 @@ vp_v_fragment_destructor_func); p->nsectors = nsectors; - p->readahead = 150; + p->sectsize = CD_FRAMESIZE_RAW; + p->sectwords = CD_FRAMESIZE_RAW/2; + p->readahead = CD_READAHEAD; p->sortcache = sort_alloc(p->readahead * CD_FRAMEWORDS); p->d = d; p->mindynoverlap = MIN_SECTOR_EPSILON; @@ -595,9 +608,14 @@ { if (minoverlap >= 0) p->mindynoverlap = minoverlap; - if (maxoverlap > minoverlap) + if (maxoverlap > p->mindynoverlap) p->maxdynoverlap = maxoverlap; if (p->maxdynoverlap < p->mindynoverlap) p->maxdynoverlap = p->mindynoverlap; + + if (p->dynoverlap < p->mindynoverlap) + p->dynoverlap = p->mindynoverlap; + if (p->dynoverlap > p->maxdynoverlap) + p->dynoverlap = p->maxdynoverlap; } diff -Nru cdrtools-2.01.01a33/libparanoia/p_block.h cdrtools-3.02a09/libparanoia/p_block.h --- cdrtools-2.01.01a33/libparanoia/p_block.h 2007-02-09 11:28:35.000000000 +0000 +++ cdrtools-3.02a09/libparanoia/p_block.h 2015-09-20 11:59:04.000000000 +0000 @@ -1,8 +1,8 @@ -/* @(#)p_block.h 1.18 07/02/09 J. Schilling from cdparanoia-III-alpha9.8 */ +/* @(#)p_block.h 1.21 15/09/20 J.^ Schilling from cdparanoia-III-alpha9.8 */ /* * CopyPolicy: GNU Lesser General Public License v2.1 applies * Copyright (C) 1997-2001 by Monty (xiphmont@mit.edu) - * Copyright (C) 2002-2006 by J. Schilling + * Copyright (C) 2002-2015 by J. Schilling */ #ifndef _P_BLOCK_H @@ -17,8 +17,12 @@ #define JIGGLE_MODULO 15 /* sectors */ #define MIN_SILENCE_BOUNDARY 1024 /* 16 bit words */ -#define min(x, y) ((x) > (y)?(y):(x)) -#define max(x, y) ((x) < (y)?(y):(x)) +#undef abs +#define abs(x) ((x) < 0 ? -(x) : (x)) +#undef min +#define min(x, y) ((x) < (y) ? (x) : (y)) +#undef max +#define max(x, y) ((x) < (y) ? (y) : (x)) #include "isort.h" @@ -56,8 +60,8 @@ typedef struct c_block { /* The buffer */ Int16_t *vector; - long begin; - long size; + long begin; /* Begin diskoff, multiples of 16bit samples */ + long size; /* Size, multiples of 16bit samples */ /* auxiliary support structures */ unsigned char *flags; @@ -149,6 +153,8 @@ int (*d_track_audiop) __PR((void *d, int track)); /* -> int Is audiotrack */ int nsectors; /* # of sectors that fit into DMA buf */ + int sectsize; /* size of a sector, 2353 or 2646 bytes */ + int sectwords; /* words in a sector, 2353/2 or 2646/2 */ root_block root; /* verified/reconstructed cached data */ linked_list *cache; /* our data as read from the cdrom */ @@ -161,7 +167,7 @@ int jitter; long lastread; - int enable; + int enable; /* modes from paranoia_modeset() */ long cursor; long current_lastsector; long current_firstsector; diff -Nru cdrtools-2.01.01a33/libparanoia/pmalloc.c cdrtools-3.02a09/libparanoia/pmalloc.c --- cdrtools-2.01.01a33/libparanoia/pmalloc.c 2006-09-13 14:15:05.000000000 +0000 +++ cdrtools-3.02a09/libparanoia/pmalloc.c 2009-07-10 22:28:18.000000000 +0000 @@ -1,12 +1,13 @@ -/* @(#)pmalloc.c 1.4 06/09/13 Copyright 2004 J. Schilling */ +/* @(#)pmalloc.c 1.7 09/07/11 Copyright 2004-2009 J. Schilling */ +#include #ifndef lint -static char sccsid[] = - "@(#)pmalloc.c 1.4 06/09/13 Copyright 2004 J. Schilling"; +static UConst char sccsid[] = + "@(#)pmalloc.c 1.7 09/07/11 Copyright 2004-2009 J. Schilling"; #endif /* * Paranoia malloc() functions * - * Copyright (c) 2004 J. Schilling + * Copyright (c) 2004-2009 J. Schilling */ /* * This library is free software; you can redistribute it and/or modify @@ -23,7 +24,6 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ -#include #include #include #include @@ -43,7 +43,8 @@ _pfree(ptr) void *ptr; { - free(ptr); + if (ptr) + free(ptr); } EXPORT void * @@ -84,6 +85,9 @@ { void *p; + if (ptr == 0) + return (_pmalloc(size)); + p = realloc(ptr, size + radd); if (p == NULL) raisecond("NO MEM", 0L); diff -Nru cdrtools-2.01.01a33/librscg/librscg.mk cdrtools-3.02a09/librscg/librscg.mk --- cdrtools-2.01.01a33/librscg/librscg.mk 2007-02-03 22:50:32.000000000 +0000 +++ cdrtools-3.02a09/librscg/librscg.mk 2008-08-03 17:36:03.000000000 +0000 @@ -1,4 +1,4 @@ -#ident @(#)librscg.mk 1.3 07/02/03 +#ident @(#)librscg.mk 1.5 08/08/03 ########################################################################### SRCROOT= .. RULESDIR= RULES @@ -9,7 +9,7 @@ #VPATH= .:stdio:$(ARCHDIR) INSDIR= lib TARGETLIB= rscg -#CPPOPTS += -Ispecincl +CPPOPTS += -I../libscg CPPOPTS += -DUSE_PG CPPOPTS += -DUSE_RCMD_RSH CPPOPTS += -DSCHILY_PRINT diff -Nru cdrtools-2.01.01a33/librscg/librscg_p.mk cdrtools-3.02a09/librscg/librscg_p.mk --- cdrtools-2.01.01a33/librscg/librscg_p.mk 2007-06-30 11:13:34.000000000 +0000 +++ cdrtools-3.02a09/librscg/librscg_p.mk 2008-08-03 17:36:03.000000000 +0000 @@ -1,4 +1,4 @@ -#ident "@(#)librscg_p.mk 1.3 07/06/30 " +#ident "@(#)librscg_p.mk 1.6 08/08/03 " ########################################################################### SRCROOT= .. RULESDIR= RULES @@ -6,11 +6,12 @@ ########################################################################### SUBARCHDIR= /profiled +SUBINSDIR= /profiled #.SEARCHLIST: . $(ARCHDIR) stdio $(ARCHDIR) #VPATH= .:stdio:$(ARCHDIR) INSDIR= lib TARGETLIB= rscg -#CPPOPTS += -Ispecincl +CPPOPTS += -I../libscg CPPOPTS += -DUSE_PG CPPOPTS += -DUSE_RCMD_RSH CPPOPTS += -DSCHILY_PRINT diff -Nru cdrtools-2.01.01a33/librscg/scsi-remote.c cdrtools-3.02a09/librscg/scsi-remote.c --- cdrtools-2.01.01a33/librscg/scsi-remote.c 2006-11-26 16:38:20.000000000 +0000 +++ cdrtools-3.02a09/librscg/scsi-remote.c 2013-04-21 18:23:45.000000000 +0000 @@ -1,8 +1,8 @@ #define USE_REMOTE -/* @(#)scsi-remote.c 1.21 06/11/26 Copyright 1990,2000-2003 J. Schilling */ +/* @(#)scsi-remote.c 1.34 13/04/21 Copyright 1990,2000-2013 J. Schilling */ #ifndef lint static char __sccsid[] = - "@(#)scsi-remote.c 1.21 06/11/26 Copyright 1990,2000-2003 J. Schilling"; + "@(#)scsi-remote.c 1.34 13/04/21 Copyright 1990,2000-2013 J. Schilling"; #endif /* * Remote SCSI user level command transport routines @@ -13,7 +13,7 @@ * Choose your name instead of "schily" and make clear that the version * string is related to a modified source. * - * Copyright (c) 1990,2000-2003 J. Schilling + * Copyright (c) 1990,2000-2013 J. Schilling */ /* * The contents of this file are subject to the terms of the @@ -52,25 +52,20 @@ #endif #ifdef USE_REMOTE -#include -#include +#include +#include #include -#ifdef HAVE_SYS_SOCKET_H -#include -#endif +#include #include -#include -#ifdef HAVE_NETDB_H -#include -#endif -#ifdef HAVE_PWD_H -#include -#endif +#include +#include +#include #include #include #include #include #include +#include #include #include @@ -83,10 +78,10 @@ * On Cygwin, there are no privilleged ports. * On UNIX, rcmd() uses privilleged port that only work for root. */ -#ifdef IS_CYGWIN +#if defined(IS_CYGWIN) || defined(__MINGW32__) #define privport_ok() (1) #else -#ifdef HAVE_GETPPRIV +#if defined(HAVE_SOLARIS_PPRIV) || defined(HAVE_LINUX_CAPS) #define privport_ok() ppriv_ok() #else #define privport_ok() (geteuid() == 0) @@ -95,14 +90,17 @@ #define CMD_SIZE 80 -#define MAX_SCG 16 /* Max # of SCSI controllers */ +/* + * On Linux we have a max bus number of 1000 + 13 + */ +#define MAX_SCG 1024 /* Max # of SCSI controllers */ #define MAX_TGT 16 #define MAX_LUN 8 /*extern BOOL debug;*/ LOCAL BOOL debug = 1; -LOCAL char _scg_trans_version[] = "remote-1.21"; /* The version for remote SCSI */ +LOCAL char _scg_trans_version[] = "remote-1.34"; /* The version for remote SCSI */ LOCAL char _scg_auth_schily[] = "schily"; /* The author for this module */ LOCAL int scgo_rsend __PR((SCSI *scgp)); @@ -156,7 +154,7 @@ const char *remuser, const char *cmd, const char *rsh)); -#ifdef HAVE_GETPPRIV +#if defined(HAVE_SOLARIS_PPRIV) || defined(HAVE_LINUX_CAPS) LOCAL BOOL ppriv_ok __PR((void)); #endif #endif @@ -219,41 +217,40 @@ { int f; - if (scgp->local == NULL) + if (scgp == (SCSI *)0 || scgp->local == NULL) return ((char *)0); f = scglocal(scgp)->remfd; - if (scgp != (SCSI *)0) { - switch (what) { - case SCG_VERSION: - return (_scg_trans_version); - /* - * If you changed this source, you are not allowed to - * return "schily" for the SCG_AUTHOR request. - */ - case SCG_AUTHOR: - return (_scg_auth_schily); - case SCG_SCCS_ID: - return (__sccsid); - - case SCG_RVERSION: - if (scglocal(scgp)->v_version == NULL) - scglocal(scgp)->v_version = rscsiversion(scgp, f, SCG_VERSION); - return (scglocal(scgp)->v_version); - /* - * If you changed this source, you are not allowed to - * return "schily" for the SCG_AUTHOR request. - */ - case SCG_RAUTHOR: - if (scglocal(scgp)->v_author == NULL) - scglocal(scgp)->v_author = rscsiversion(scgp, f, SCG_AUTHOR); - return (scglocal(scgp)->v_author); - case SCG_RSCCS_ID: - if (scglocal(scgp)->v_sccs_id == NULL) - scglocal(scgp)->v_sccs_id = rscsiversion(scgp, f, SCG_SCCS_ID); - return (scglocal(scgp)->v_sccs_id); - } + switch (what) { + + case SCG_VERSION: + return (_scg_trans_version); + /* + * If you changed this source, you are not allowed to + * return "schily" for the SCG_AUTHOR request. + */ + case SCG_AUTHOR: + return (_scg_auth_schily); + case SCG_SCCS_ID: + return (__sccsid); + + case SCG_RVERSION: + if (scglocal(scgp)->v_version == NULL) + scglocal(scgp)->v_version = rscsiversion(scgp, f, SCG_VERSION); + return (scglocal(scgp)->v_version); + /* + * If you changed this source, you are not allowed to + * return "schily" for the SCG_AUTHOR request. + */ + case SCG_RAUTHOR: + if (scglocal(scgp)->v_author == NULL) + scglocal(scgp)->v_author = rscsiversion(scgp, f, SCG_AUTHOR); + return (scglocal(scgp)->v_author); + case SCG_RSCCS_ID: + if (scglocal(scgp)->v_sccs_id == NULL) + scglocal(scgp)->v_sccs_id = rscsiversion(scgp, f, SCG_SCCS_ID); + return (scglocal(scgp)->v_sccs_id); } return ((char *)0); } @@ -278,7 +275,7 @@ int tlun = scg_lun(scgp); register int f; register int nopen = 0; - char devname[128]; + char sdevname[128]; char *p; if (scgp->overbose) @@ -319,12 +316,12 @@ /* * Save non user@host:device */ - js_snprintf(devname, sizeof (devname), "%s", device); + js_snprintf(sdevname, sizeof (sdevname), "%s", device); - if ((p = strchr(devname, ':')) != NULL) + if ((p = strchr(sdevname, ':')) != NULL) *p++ = '\0'; - f = rscsigetconn(scgp, devname); + f = rscsigetconn(scgp, sdevname); if (f < 0) { if (scgp->errstr) js_snprintf(scgp->errstr, SCSI_ERRSTR_SIZE, @@ -604,6 +601,8 @@ js_snprintf(cbuf, sizeof (cbuf), "V%d\n", what); ret = rscsicmd(scgp, fd, "version", cbuf); + if (ret <= 0) + return (NULL); p = malloc(ret); if (p == NULL) return (p); @@ -998,7 +997,8 @@ voidsize = count - SCSI_ERRSTR_SIZE; count = SCSI_ERRSTR_SIZE; } - rscsireadbuf(scgp, fd, scgp->errstr, count); + if (count > 0) + rscsireadbuf(scgp, fd, scgp->errstr, count); rscsivoidarg(scgp, fd, voidsize); } if (scgp->debug > 0) @@ -1190,8 +1190,7 @@ return (-1); /* keep gcc happy */ } -#ifdef HAVE_GETPPRIV -#include +#ifdef HAVE_SOLARIS_PPRIV LOCAL BOOL ppriv_ok() @@ -1214,7 +1213,23 @@ return (net_privaddr); } -#endif /* HAVE_GETPPRIV */ +#else /* HAVE_SOLARIS_PPRIV */ + +#ifdef HAVE_LINUX_CAPS +LOCAL BOOL +ppriv_ok() +{ + cap_t cset; + cap_flag_value_t val = CAP_CLEAR; + + cset = cap_get_proc(); + + cap_get_flag(cset, CAP_NET_BIND_SERVICE, CAP_EFFECTIVE, &val); + return (val == CAP_SET); +} +#endif /* HAVE_LINUX_CAPS */ + +#endif /* HAVE_SOLARIS_PPRIV */ #endif /* USE_RCMD_RSH */ diff -Nru cdrtools-2.01.01a33/librscg/shlrscg.mk cdrtools-3.02a09/librscg/shlrscg.mk --- cdrtools-2.01.01a33/librscg/shlrscg.mk 2007-02-03 22:50:32.000000000 +0000 +++ cdrtools-3.02a09/librscg/shlrscg.mk 2013-04-22 17:50:59.000000000 +0000 @@ -1,4 +1,4 @@ -#ident @(#)shlrscg.mk 1.2 07/02/03 +#ident @(#)shlrscg.mk 1.5 13/04/22 ########################################################################### SRCROOT= .. RULESDIR= RULES @@ -10,14 +10,17 @@ #VPATH= .:stdio:$(ARCHDIR) INSDIR= lib TARGETLIB= rscg -#CPPOPTS += -Ispecincl +CPPOPTS += -I../libscg CPPOPTS += -DUSE_PG CPPOPTS += -DUSE_RCMD_RSH CPPOPTS += -DSCHILY_PRINT #include Targets CFILES= scsi-remote.c -LIBS= -lscg -lschily -lc +# +# LIB_CAP is needed for Linux capability support in librscg. +# +LIBS= -lscg -lschily $(LIB_SOCKET) $(LIB_CAP) -lc ########################################################################### include $(SRCROOT)/$(RULESDIR)/rules.shl diff -Nru cdrtools-2.01.01a33/libscg/libscg-mapvers cdrtools-3.02a09/libscg/libscg-mapvers --- cdrtools-2.01.01a33/libscg/libscg-mapvers 2007-03-08 13:22:25.000000000 +0000 +++ cdrtools-3.02a09/libscg/libscg-mapvers 2010-10-02 20:05:30.000000000 +0000 @@ -1,3 +1,6 @@ +# /* @(#)libscg-mapvers 1.3 10/10/02 Copyright 2006-2010 J. Schilling */ +#include + SCHILY_1.0 { global: __scg_help; @@ -11,13 +14,17 @@ scg_cmd; scg_cmd_err; scg_cmd_status; - #scg_comerr; +#ifdef __use_scglerror__ + scg_comerr; +#endif scg_dummy_ops; scg_errfflush; scg_errflush; - #scg_errmsg; - #scg_exit; - #scg_ferrmsg; +#ifdef __use_scglerror__ + scg_errmsg; + scg_exit; + scg_ferrmsg; +#endif scg_fprascii; scg_fprbytes; scg_fprintdev; @@ -51,7 +58,9 @@ scg_sense_key; scg_sense_qual; scg_sensemsg; - #scg_serrmsg; +#ifdef __use_scglerror__ + scg_serrmsg; +#endif scg_setnonstderrs; scg_settarget; scg_settimeout; diff -Nru cdrtools-2.01.01a33/libscg/libscg.mk cdrtools-3.02a09/libscg/libscg.mk --- cdrtools-2.01.01a33/libscg/libscg.mk 2007-02-03 22:50:32.000000000 +0000 +++ cdrtools-3.02a09/libscg/libscg.mk 2011-03-07 22:51:28.000000000 +0000 @@ -1,4 +1,4 @@ -#ident @(#)libscg.mk 1.2 07/02/03 +#ident @(#)libscg.mk 1.5 11/03/07 ########################################################################### SRCROOT= .. RULESDIR= RULES @@ -9,7 +9,7 @@ #VPATH= .:stdio:$(ARCHDIR) INSDIR= lib TARGETLIB= scg -#CPPOPTS += -Ispecincl +CPPOPTS += -I. CPPOPTS += -DUSE_PG CPPOPTS += -DSCHILY_PRINT @@ -21,3 +21,4 @@ ########################################################################### #CC= echo " ==> COMPILING \"$@\""; cc ########################################################################### + diff -Nru cdrtools-2.01.01a33/libscg/libscg_p.mk cdrtools-3.02a09/libscg/libscg_p.mk --- cdrtools-2.01.01a33/libscg/libscg_p.mk 2007-06-30 11:13:34.000000000 +0000 +++ cdrtools-3.02a09/libscg/libscg_p.mk 2008-07-31 22:51:33.000000000 +0000 @@ -1,4 +1,4 @@ -#ident "@(#)libscg_p.mk 1.3 07/06/30 " +#ident "@(#)libscg_p.mk 1.5 08/08/01 " ########################################################################### SRCROOT= .. RULESDIR= RULES @@ -6,11 +6,12 @@ ########################################################################### SUBARCHDIR= /profiled +SUBINSDIR= /profiled #.SEARCHLIST: . $(ARCHDIR) stdio $(ARCHDIR) #VPATH= .:stdio:$(ARCHDIR) INSDIR= lib TARGETLIB= scg -#CPPOPTS += -Ispecincl +CPPOPTS += -I. CPPOPTS += -DUSE_PG CPPOPTS += -DSCHILY_PRINT COPTS += $(COPTGPROF) diff -Nru cdrtools-2.01.01a33/libscg/rdummy.c cdrtools-3.02a09/libscg/rdummy.c --- cdrtools-2.01.01a33/libscg/rdummy.c 2006-09-13 14:34:05.000000000 +0000 +++ cdrtools-3.02a09/libscg/rdummy.c 2010-05-24 10:13:43.000000000 +0000 @@ -1,13 +1,14 @@ -/* @(#)rdummy.c 1.2 06/09/13 Copyright 2000 J. Schilling */ +/* @(#)rdummy.c 1.4 10/05/24 Copyright 2000-2010 J. Schilling */ +#include #ifndef lint -static char _sccsid[] = - "@(#)rdummy.c 1.2 06/09/13 Copyright 2000 J. Schilling"; +static UConst char _sccsid[] = + "@(#)rdummy.c 1.4 10/05/24 Copyright 2000-2010 J. Schilling"; #endif /* - * scg Library + * scg Library * dummy remote ops * - * Copyright (c) 2000 J. Schilling + * Copyright (c) 2000-2010 J. Schilling */ /* * The contents of this file are subject to the terms of the diff -Nru cdrtools-2.01.01a33/libscg/scg/aspi-dos.h cdrtools-3.02a09/libscg/scg/aspi-dos.h --- cdrtools-2.01.01a33/libscg/scg/aspi-dos.h 2005-05-14 22:48:05.000000000 +0000 +++ cdrtools-3.02a09/libscg/scg/aspi-dos.h 2010-08-07 23:41:31.000000000 +0000 @@ -1,4 +1,4 @@ -/* @(#)aspi-dos.h 1.2 05/05/15 J. Schilling */ +/* @(#)aspi-dos.h 1.3 10/08/08 J. Schilling */ #ifndef __ASPI16_H_ #define __ASPI16_H_ @@ -105,7 +105,7 @@ BYTE CDBLen; // 17/023 CDB Length = 6/10/12 BYTE HaStat; // 18/024 Host Adapter Status BYTE TargStat; // 19/025 Target Status - VOID FAR *PostProc; // 1A/026 Post routine + void FAR *PostProc; // 1A/026 Post routine BYTE Rsvd2[34]; // 1E/030 Reserved, MUST = 0 union { @@ -137,7 +137,7 @@ struct { - VOID FAR *SRBToAbort; // 08/008 Pointer to SRB to abort + void FAR *SRBToAbort; // 08/008 Pointer to SRB to abort } PACKED Abort; @@ -147,7 +147,7 @@ BYTE ResetRsvd1[14]; // 0A/010 Reserved, MUST = 0 BYTE HaStat; // 18/024 Host Adapter Status BYTE TargStat; // 19/025 Target Status - VOID FAR *PostProc; // 1A/026 Post routine + void FAR *PostProc; // 1A/026 Post routine BYTE ResetRsvd2[34]; // 1E/030 Reserved, MUST = 0 } Reset; } PACKED Type; diff -Nru cdrtools-2.01.01a33/libscg/scg/aspi-dos.mk cdrtools-3.02a09/libscg/scg/aspi-dos.mk --- cdrtools-2.01.01a33/libscg/scg/aspi-dos.mk 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/libscg/scg/aspi-dos.mk 2008-07-07 15:55:07.000000000 +0000 @@ -0,0 +1,17 @@ +#ident @(#)aspi-dos.mk 1.1 08/07/07 +########################################################################### +# Sample makefile for installing non-localized auxiliary files +########################################################################### +SRCROOT= ../.. +RULESDIR= RULES +include $(SRCROOT)/$(RULESDIR)/rules.top +########################################################################### + +INSDIR= include/scg +TARGET= aspi-dos.h +#XMK_FILE= Makefile.man + +########################################################################### +include $(SRCROOT)/$(RULESDIR)/rules.aux +########################################################################### + diff -Nru cdrtools-2.01.01a33/libscg/scg/aspi-win32.h cdrtools-3.02a09/libscg/scg/aspi-win32.h --- cdrtools-2.01.01a33/libscg/scg/aspi-win32.h 1999-05-11 22:46:51.000000000 +0000 +++ cdrtools-3.02a09/libscg/scg/aspi-win32.h 2012-12-31 15:57:33.000000000 +0000 @@ -1,7 +1,20 @@ +/* @(#)aspi-win32.h 1.4 12/12/31 1999-2012 J. Schilling */ + #ifndef __ASPI_WIN32_H_ #define __ASPI_WIN32_H_ -#include +#include + +#ifdef _MSC_VER +#define PACKED +#else +#if !defined(PACKED) && defined(__GNUC__) +#define PACKED __attribute__((packed)) +#endif +#endif +#if !defined(PACKED) +#define PACKED +#endif /*************************************************************************** ** SCSI MISCELLANEOUS EQUATES diff -Nru cdrtools-2.01.01a33/libscg/scg/aspi-win32.mk cdrtools-3.02a09/libscg/scg/aspi-win32.mk --- cdrtools-2.01.01a33/libscg/scg/aspi-win32.mk 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/libscg/scg/aspi-win32.mk 2008-07-07 15:57:45.000000000 +0000 @@ -0,0 +1,17 @@ +#ident @(#)aspi-win32.mk 1.1 08/07/07 +########################################################################### +# Sample makefile for installing non-localized auxiliary files +########################################################################### +SRCROOT= ../.. +RULESDIR= RULES +include $(SRCROOT)/$(RULESDIR)/rules.top +########################################################################### + +INSDIR= include/scg +TARGET= aspi-win32.h +#XMK_FILE= Makefile.man + +########################################################################### +include $(SRCROOT)/$(RULESDIR)/rules.aux +########################################################################### + diff -Nru cdrtools-2.01.01a33/libscg/scg/Makefile cdrtools-3.02a09/libscg/scg/Makefile --- cdrtools-2.01.01a33/libscg/scg/Makefile 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/libscg/scg/Makefile 2008-07-07 16:01:18.000000000 +0000 @@ -0,0 +1,22 @@ +#ident @(#)Makefile 1.1 08/07/07 +########################################################################### +# Sample makefile for installing non-localized auxiliary files +########################################################################### +SRCROOT= ../.. +RULESDIR= RULES +include $(SRCROOT)/$(RULESDIR)/rules.top +########################################################################### + +INSDIR= include/scg +TARGET= scgcmd.h +XMK_FILE= \ + aspi-dos.mk aspi-win32.mk \ + scgcmd.mk scgio.mk scgops.mk \ + scsicdb.mk scsidefs.mk scsireg.mk scsisense.mk scsitransp.mk \ + spti-wnt.mk \ + srb_os2.mk + + +########################################################################### +include $(SRCROOT)/$(RULESDIR)/rules.aux +########################################################################### diff -Nru cdrtools-2.01.01a33/libscg/scg/scgcmd.h cdrtools-3.02a09/libscg/scg/scgcmd.h --- cdrtools-2.01.01a33/libscg/scg/scgcmd.h 2006-09-13 12:24:12.000000000 +0000 +++ cdrtools-3.02a09/libscg/scg/scgcmd.h 2011-05-17 16:09:30.000000000 +0000 @@ -1,4 +1,4 @@ -/* @(#)scgcmd.h 2.23 06/09/13 Copyright 1986 J. Schilling */ +/* @(#)scgcmd.h 2.26 07/11/22 Copyright 1986 J. Schilling */ /* * Definitions for the SCSI 'scg_cmd' structure that has been created * for the SCSI general driver 'scg' for SunOS and Solaris but @@ -29,6 +29,12 @@ #ifndef _SCG_SCGCMD_H #define _SCG_SCGCMD_H +#ifdef _KERNEL +#define scsi_status scg_status +#define scsi_sense scg_sense +#define scsi_ext_sense scg_ext_sense +#endif + #include #include @@ -133,17 +139,12 @@ int resid; /* Bytes not transfered */ int error; /* Error code from scgintr() */ int ux_errno; /* UNIX error code */ -#ifdef comment -XXX struct scsi_status scb; ??? /* Status returnd by command */ -#endif union { struct scsi_status Scb; /* Status returnd by command */ Uchar cmd_scb[SCG_MAX_STATUS]; } u_scb; #define scb u_scb.Scb -#ifdef comment -XXX struct scsi_sense sense; ??? /* Sense bytes from command */ -#endif + union { struct scsi_sense Sense; /* Sense bytes from command */ Uchar cmd_sense[SCG_MAX_SENSE]; @@ -165,6 +166,44 @@ } cdb; /* 24 bytes max. size is supported */ }; +#if defined(_KERNEL) && defined(_MULTI_DATAMODEL) +struct scg_cmd32 { + caddr32_t addr; /* Address of data in user space */ + int size; /* DMA count for data transfer */ + int flags; /* see below for definition */ + int cdb_len; /* Size of SCSI command in bytes */ + /* NOTE: rel 4 uses this field only */ + /* with commands not in group 1 or 2*/ + int sense_len; /* for intr() if -1 don't get sense */ + int timeout; /* timeout in seconds */ + /* NOTE: actual resolution depends */ + /* on driver implementation */ + int kdebug; /* driver kernel debug level */ + int resid; /* Bytes not transfered */ + int error; /* Error code from scgintr() */ + int ux_errno; /* UNIX error code */ + union { + struct scsi_status Scb; /* Status returnd by command */ + Uchar cmd_scb[SCG_MAX_STATUS]; + } u_scb; +#define scb u_scb.Scb + + union { + struct scsi_sense Sense; /* Sense bytes from command */ + Uchar cmd_sense[SCG_MAX_SENSE]; + } u_sense; +#define sense u_sense.Sense + int sense_count; /* Number of bytes valid in sense */ + int target; /* SCSI target id */ + union { /* SCSI command descriptor block */ + struct scsi_g0cdb g0_cdb; + struct scsi_g1cdb g1_cdb; + struct scsi_g5cdb g5_cdb; + Uchar cmd_cdb[SCG_MAX_CMD]; + } cdb; /* 24 bytes max. size is supported */ +}; +#endif /* defined(_KERNEL) && defined(_MULTI_DATAMODEL) */ + #define dma_read flags /* 1 if DMA to Sun, 0 otherwise */ /* @@ -201,4 +240,10 @@ } #endif +#ifdef _KERNEL +#undef scsi_status +#undef scsi_sense +#undef scsi_ext_sense +#endif + #endif /* _SCG_SCGCMD_H */ diff -Nru cdrtools-2.01.01a33/libscg/scg/scgcmd.mk cdrtools-3.02a09/libscg/scg/scgcmd.mk --- cdrtools-2.01.01a33/libscg/scg/scgcmd.mk 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/libscg/scg/scgcmd.mk 2008-07-07 15:58:01.000000000 +0000 @@ -0,0 +1,17 @@ +#ident @(#)scgcmd.mk 1.1 08/07/07 +########################################################################### +# Sample makefile for installing non-localized auxiliary files +########################################################################### +SRCROOT= ../.. +RULESDIR= RULES +include $(SRCROOT)/$(RULESDIR)/rules.top +########################################################################### + +INSDIR= include/scg +TARGET= scgcmd.h +#XMK_FILE= Makefile.man + +########################################################################### +include $(SRCROOT)/$(RULESDIR)/rules.aux +########################################################################### + diff -Nru cdrtools-2.01.01a33/libscg/scg/scgio.h cdrtools-3.02a09/libscg/scg/scgio.h --- cdrtools-2.01.01a33/libscg/scg/scgio.h 2000-11-07 23:06:06.000000000 +0000 +++ cdrtools-3.02a09/libscg/scg/scgio.h 2007-11-21 21:10:27.000000000 +0000 @@ -1,4 +1,4 @@ -/* @(#)scgio.h 2.16 00/11/07 Copyright 1986 J. Schilling */ +/* @(#)scgio.h 2.17 07/11/21 Copyright 1986 J. Schilling */ /* * Definitions for the SCSI general driver 'scg' * @@ -41,6 +41,7 @@ #if defined(__STDC__) || defined(SVR4) #define SCGIOCMD _IOWR('G', 1, struct scg_cmd) /* do a SCSI cmd */ +#define SCGIOCMD32 _IOWR('G', 1, struct scg_cmd32) /* do a SCSI cmd */ #define SCGIORESET _IO('G', 2) /* reset SCSI bus */ #define SCGIOGDISRE _IOR('G', 4, int) /* get sc disre Val*/ #define SCGIOSDISRE _IOW('G', 5, int) /* set sc disre Val*/ @@ -52,6 +53,7 @@ #define SCIOSDBG _IOW('G', 105, int) /* set sc Debug Val*/ #else #define SCGIOCMD _IOWR(G, 1, struct scg_cmd) /* do a SCSI cmd */ +#define SCGIOCMD32 _IOWR(G, 1, struct scg_cmd32) /* do a SCSI cmd */ #define SCGIORESET _IO(G, 2) /* reset SCSI bus */ #define SCGIOGDISRE _IOR(G, 4, int) /* get sc disre Val*/ #define SCGIOSDISRE _IOW(G, 5, int) /* set sc disre Val*/ diff -Nru cdrtools-2.01.01a33/libscg/scg/scgio.mk cdrtools-3.02a09/libscg/scg/scgio.mk --- cdrtools-2.01.01a33/libscg/scg/scgio.mk 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/libscg/scg/scgio.mk 2008-07-07 15:58:20.000000000 +0000 @@ -0,0 +1,17 @@ +#ident @(#)scgio.mk 1.1 08/07/07 +########################################################################### +# Sample makefile for installing non-localized auxiliary files +########################################################################### +SRCROOT= ../.. +RULESDIR= RULES +include $(SRCROOT)/$(RULESDIR)/rules.top +########################################################################### + +INSDIR= include/scg +TARGET= scgio.h +#XMK_FILE= Makefile.man + +########################################################################### +include $(SRCROOT)/$(RULESDIR)/rules.aux +########################################################################### + diff -Nru cdrtools-2.01.01a33/libscg/scg/scgops.mk cdrtools-3.02a09/libscg/scg/scgops.mk --- cdrtools-2.01.01a33/libscg/scg/scgops.mk 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/libscg/scg/scgops.mk 2008-07-07 15:58:34.000000000 +0000 @@ -0,0 +1,17 @@ +#ident @(#)scgops.mk 1.1 08/07/07 +########################################################################### +# Sample makefile for installing non-localized auxiliary files +########################################################################### +SRCROOT= ../.. +RULESDIR= RULES +include $(SRCROOT)/$(RULESDIR)/rules.top +########################################################################### + +INSDIR= include/scg +TARGET= scgops.h +#XMK_FILE= Makefile.man + +########################################################################### +include $(SRCROOT)/$(RULESDIR)/rules.aux +########################################################################### + diff -Nru cdrtools-2.01.01a33/libscg/scg/scsicdb.mk cdrtools-3.02a09/libscg/scg/scsicdb.mk --- cdrtools-2.01.01a33/libscg/scg/scsicdb.mk 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/libscg/scg/scsicdb.mk 2008-07-07 15:58:54.000000000 +0000 @@ -0,0 +1,17 @@ +#ident @(#)scsicdb.mk 1.1 08/07/07 +########################################################################### +# Sample makefile for installing non-localized auxiliary files +########################################################################### +SRCROOT= ../.. +RULESDIR= RULES +include $(SRCROOT)/$(RULESDIR)/rules.top +########################################################################### + +INSDIR= include/scg +TARGET= scsicdb.h +#XMK_FILE= Makefile.man + +########################################################################### +include $(SRCROOT)/$(RULESDIR)/rules.aux +########################################################################### + diff -Nru cdrtools-2.01.01a33/libscg/scg/scsidefs.mk cdrtools-3.02a09/libscg/scg/scsidefs.mk --- cdrtools-2.01.01a33/libscg/scg/scsidefs.mk 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/libscg/scg/scsidefs.mk 2008-07-07 15:59:09.000000000 +0000 @@ -0,0 +1,17 @@ +#ident @(#)scsidefs.mk 1.1 08/07/07 +########################################################################### +# Sample makefile for installing non-localized auxiliary files +########################################################################### +SRCROOT= ../.. +RULESDIR= RULES +include $(SRCROOT)/$(RULESDIR)/rules.top +########################################################################### + +INSDIR= include/scg +TARGET= scsidefs.h +#XMK_FILE= Makefile.man + +########################################################################### +include $(SRCROOT)/$(RULESDIR)/rules.aux +########################################################################### + diff -Nru cdrtools-2.01.01a33/libscg/scg/scsireg.h cdrtools-3.02a09/libscg/scg/scsireg.h --- cdrtools-2.01.01a33/libscg/scg/scsireg.h 2006-09-13 12:24:12.000000000 +0000 +++ cdrtools-3.02a09/libscg/scg/scsireg.h 2012-03-15 23:34:36.000000000 +0000 @@ -1,8 +1,8 @@ -/* @(#)scsireg.h 1.32 06/09/13 Copyright 1987 J. Schilling */ +/* @(#)scsireg.h 1.35 12/03/16 Copyright 1987-2011 J. Schilling */ /* * usefull definitions for dealing with CCS SCSI - devices * - * Copyright (c) 1987 J. Schilling + * Copyright (c) 1987-2012 J. Schilling */ /* * The contents of this file are subject to the terms of the @@ -65,13 +65,19 @@ Ucbit wbus32 : 1; Ucbit reladr : 1; /* 7 */ - char vendor_info[8]; /* 8 */ - char prod_ident[16]; /* 16 */ - char prod_revision[4]; /* 32 */ + union { + + struct { + char vendor_info[8]; /* 8 */ + char prod_ident[16]; /* 16 */ + char prod_revision[4]; /* 32 */ #ifdef comment - char vendor_uniq[20]; /* 36 */ - char reserved[40]; /* 56 */ + char vendor_uniq[20]; /* 36 */ + char reserved[40]; /* 56 */ #endif + } vi; + char vi_space[8+16+4]; + } vu; }; /* 96 */ #else /* Motorola byteorder */ @@ -103,22 +109,35 @@ Ucbit res7_2 : 1; Ucbit cmdque : 1; Ucbit softreset : 1; - char vendor_info[8]; /* 8 */ - char prod_ident[16]; /* 16 */ - char prod_revision[4]; /* 32 */ + + union { + + struct { + char vendor_info[8]; /* 8 */ + char prod_ident[16]; /* 16 */ + char prod_revision[4]; /* 32 */ #ifdef comment - char vendor_uniq[20]; /* 36 */ - char reserved[40]; /* 56 */ + char vendor_uniq[20]; /* 36 */ + char reserved[40]; /* 56 */ #endif + } vi; + char vi_space[8+16+4]; + } vu; }; /* 96 */ #endif #ifdef __SCG_COMPAT__ -#define info vendor_info -#define ident prod_ident -#define revision prod_revision +#define info inq_vendor_info +#define ident inq_prod_ident +#define revision inq_prod_revision #endif +#define inq_vendor_info vu.vi.vendor_info +#define inq_prod_ident vu.vi.prod_ident +#define inq_prod_revision vu.vi.prod_revision + +#define inq_info_space vu.vi_space + /* Peripheral Device Qualifier */ #define INQ_DEV_PRESENT 0x00 /* Physical device present */ @@ -1158,7 +1177,7 @@ struct scsi_format_cap_desc { Uchar nblock[4]; /* Number of blocks */ Ucbit desc_type : 2; /* Descriptor type */ - Ucbit fmt_type : 6; /* Format Taype */ + Ucbit fmt_type : 6; /* Format Type */ Uchar blen[3]; /* Logical block length */ }; @@ -1166,7 +1185,7 @@ struct scsi_format_cap_desc { Uchar nblock[4]; /* Number of blocks */ - Ucbit fmt_type : 6; /* Format Taype */ + Ucbit fmt_type : 6; /* Format Type */ Ucbit desc_type : 2; /* Descriptor type */ Uchar blen[3]; /* Logical block length */ }; @@ -1175,7 +1194,23 @@ /* * Defines for 'fmt_type'. */ +#define FCAP_TYPE_FULL 0x00 /* Full Format */ +#define FCAP_TYPE_EXPAND_SPARE 0x01 /* Spare area expansion */ +#define FCAP_TYPE_ZONE_REFORMAT 0x04 /* DVD-RAM Zone Reformat */ +#define FCAP_TYPE_ZONE_FORMAT 0x05 /* DVD-RAM Zone Format */ +#define FCAP_TYPE_CDRW_FULL 0x10 /* CD-RW/DVD-RW Full Format */ +#define FACP_TYPE_CDRW_GROW_SES 0x11 /* CD-RW/DVD-RW grow session */ +#define FACP_TYPE_CDRW_ADD_SES 0x12 /* CD-RW/DVD-RW add session */ +#define FACP_TYPE_DVDRW_QGROW 0x13 /* DVD-RW quick grow last border*/ +#define FACP_TYPE_DVDRW_QADD_SES 0x14 /* DVD-RW quick add session */ +#define FACP_TYPE_DVDRW_QUICK 0x15 /* DVD-RW quick interm. session */ +#define FCAP_TYPE_FULL_SPARE 0x20 /* Full Format with sparing */ +#define FCAP_TYPE_MRW_FULL 0x24 /* CD-RW/DVD+RW Full Format */ +#define FCAP_TYPE_DVDPLUS_BASIC 0x26 /* DVD+RW Basic Format */ #define FCAP_TYPE_DVDPLUS_FULL 0x26 /* DVD+RW Full Format */ +#define FCAP_TYPE_BDRE_SPARE 0x30 /* BD-RE Full Format with spare */ +#define FCAP_TYPE_BDRE 0x31 /* BD-RE Full Format without spare*/ +#define FCAP_TYPE_BDR_SPARE 0x32 /* BD-R Full Format with spare */ /* * Defines for 'desc_type'. diff -Nru cdrtools-2.01.01a33/libscg/scg/scsireg.mk cdrtools-3.02a09/libscg/scg/scsireg.mk --- cdrtools-2.01.01a33/libscg/scg/scsireg.mk 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/libscg/scg/scsireg.mk 2008-07-07 15:59:24.000000000 +0000 @@ -0,0 +1,17 @@ +#ident @(#)scsireg.mk 1.1 08/07/07 +########################################################################### +# Sample makefile for installing non-localized auxiliary files +########################################################################### +SRCROOT= ../.. +RULESDIR= RULES +include $(SRCROOT)/$(RULESDIR)/rules.top +########################################################################### + +INSDIR= include/scg +TARGET= scsireg.h +#XMK_FILE= Makefile.man + +########################################################################### +include $(SRCROOT)/$(RULESDIR)/rules.aux +########################################################################### + diff -Nru cdrtools-2.01.01a33/libscg/scg/scsisense.mk cdrtools-3.02a09/libscg/scg/scsisense.mk --- cdrtools-2.01.01a33/libscg/scg/scsisense.mk 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/libscg/scg/scsisense.mk 2008-07-07 15:59:41.000000000 +0000 @@ -0,0 +1,17 @@ +#ident @(#)scsisense.mk 1.1 08/07/07 +########################################################################### +# Sample makefile for installing non-localized auxiliary files +########################################################################### +SRCROOT= ../.. +RULESDIR= RULES +include $(SRCROOT)/$(RULESDIR)/rules.top +########################################################################### + +INSDIR= include/scg +TARGET= scsisense.h +#XMK_FILE= Makefile.man + +########################################################################### +include $(SRCROOT)/$(RULESDIR)/rules.aux +########################################################################### + diff -Nru cdrtools-2.01.01a33/libscg/scg/scsitransp.h cdrtools-3.02a09/libscg/scg/scsitransp.h --- cdrtools-2.01.01a33/libscg/scg/scsitransp.h 2007-07-07 12:53:11.000000000 +0000 +++ cdrtools-3.02a09/libscg/scg/scsitransp.h 2016-01-21 22:22:14.000000000 +0000 @@ -1,8 +1,8 @@ -/* @(#)scsitransp.h 1.56 07/07/07 Copyright 1995-2007 J. Schilling */ +/* @(#)scsitransp.h 1.58 16/01/21 Copyright 1995-2016 J. Schilling */ /* * Definitions for commands that use functions from scsitransp.c * - * Copyright (c) 1995-2007 J. Schilling + * Copyright (c) 1995-2016 J. Schilling */ /* * The contents of this file are subject to the terms of the @@ -11,6 +11,8 @@ * with the License. * * See the file CDDL.Schily.txt in this distribution for details. + * A copy of the CDDL is also available via the Internet at + * http://www.opensource.org/licenses/cddl1.txt * * The following exceptions apply: * CDDL §3.6 needs to be replaced by: "You may create a Larger Work by @@ -99,7 +101,11 @@ /* * Flags for struct SCSI: */ -#define SCGF_PERM_EXIT 0x01 /* Exit on permission problems */ +#define SCGF_PERM_EXIT 0x01 /* Exit on permission problems */ +#define SCGF_PERM_PRINT 0x02 /* Print msg on permission problems */ +#define SCGF_IGN_RESID 0x04 /* Ignore DMA residual count */ + +#define SCGF_USER_FLAGS 0x04 /* All user definable flags */ /* * Drive specific flags for struct SCSI: @@ -234,6 +240,11 @@ extern void scg_sfree __PR((SCSI *scgp)); /* + * From scsiopts.c: + */ +extern int scg_opts __PR((SCSI *scgp, const char *scgoptions)); + +/* * From scgsettarget.c: */ extern int scg_settarget __PR((SCSI *scgp, int scsibus, int target, int lun)); diff -Nru cdrtools-2.01.01a33/libscg/scg/scsitransp.mk cdrtools-3.02a09/libscg/scg/scsitransp.mk --- cdrtools-2.01.01a33/libscg/scg/scsitransp.mk 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/libscg/scg/scsitransp.mk 2008-07-07 16:00:03.000000000 +0000 @@ -0,0 +1,17 @@ +#ident @(#)scsitransp.mk 1.1 08/07/07 +########################################################################### +# Sample makefile for installing non-localized auxiliary files +########################################################################### +SRCROOT= ../.. +RULESDIR= RULES +include $(SRCROOT)/$(RULESDIR)/rules.top +########################################################################### + +INSDIR= include/scg +TARGET= scsitransp.h +#XMK_FILE= Makefile.man + +########################################################################### +include $(SRCROOT)/$(RULESDIR)/rules.aux +########################################################################### + diff -Nru cdrtools-2.01.01a33/libscg/scg/spti-wnt.h cdrtools-3.02a09/libscg/scg/spti-wnt.h --- cdrtools-2.01.01a33/libscg/scg/spti-wnt.h 2004-01-04 16:06:29.000000000 +0000 +++ cdrtools-3.02a09/libscg/scg/spti-wnt.h 2011-08-02 18:28:57.000000000 +0000 @@ -1,3 +1,4 @@ +/* @(#)spti-wnt.h 1.3 11/08/02 2004-2011 J. Schilling */ /* * distilled information from various header files from Microsoft's * DDK for Windows NT 4.0 @@ -5,7 +6,7 @@ #ifndef _SCSIPT_H_INC #define _SCSIPT_H_INC -#include +#include typedef struct { USHORT Length; @@ -100,10 +101,18 @@ /* * file access values + * + * These are #defined already when we include a MSC windows.h */ +#ifndef FILE_ANY_ACCESS #define FILE_ANY_ACCESS 0 +#endif +#ifndef FILE_READ_ACCESS #define FILE_READ_ACCESS 0x0001 +#endif +#ifndef FILE_WRITE_ACCESS #define FILE_WRITE_ACCESS 0x0002 +#endif #define IOCTL_SCSI_BASE 0x00000004 @@ -118,9 +127,14 @@ /* * Standard IOCTL define */ +#ifndef CTL_CODE #define CTL_CODE(DevType, Function, Method, Access) \ (((DevType) << 16) | ((Access) << 14) | ((Function) << 2) | (Method)) +#endif +/* + * These are in ntddscsi.h with MSC + */ #define IOCTL_SCSI_PASS_THROUGH CTL_CODE(IOCTL_SCSI_BASE, 0x0401, METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS) #define IOCTL_SCSI_MINIPORT CTL_CODE(IOCTL_SCSI_BASE, 0x0402, METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS) #define IOCTL_SCSI_GET_INQUIRY_DATA CTL_CODE(IOCTL_SCSI_BASE, 0x0403, METHOD_BUFFERED, FILE_ANY_ACCESS) diff -Nru cdrtools-2.01.01a33/libscg/scg/spti-wnt.mk cdrtools-3.02a09/libscg/scg/spti-wnt.mk --- cdrtools-2.01.01a33/libscg/scg/spti-wnt.mk 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/libscg/scg/spti-wnt.mk 2008-07-07 16:00:20.000000000 +0000 @@ -0,0 +1,17 @@ +#ident @(#)spti-wnt.mk 1.1 08/07/07 +########################################################################### +# Sample makefile for installing non-localized auxiliary files +########################################################################### +SRCROOT= ../.. +RULESDIR= RULES +include $(SRCROOT)/$(RULESDIR)/rules.top +########################################################################### + +INSDIR= include/scg +TARGET= spti-wnt.h +#XMK_FILE= Makefile.man + +########################################################################### +include $(SRCROOT)/$(RULESDIR)/rules.aux +########################################################################### + diff -Nru cdrtools-2.01.01a33/libscg/scg/srb_os2.mk cdrtools-3.02a09/libscg/scg/srb_os2.mk --- cdrtools-2.01.01a33/libscg/scg/srb_os2.mk 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/libscg/scg/srb_os2.mk 2008-07-07 16:00:38.000000000 +0000 @@ -0,0 +1,17 @@ +#ident @(#)srb_os2.mk 1.1 08/07/07 +########################################################################### +# Sample makefile for installing non-localized auxiliary files +########################################################################### +SRCROOT= ../.. +RULESDIR= RULES +include $(SRCROOT)/$(RULESDIR)/rules.top +########################################################################### + +INSDIR= include/scg +TARGET= srb_os2.h +#XMK_FILE= Makefile.man + +########################################################################### +include $(SRCROOT)/$(RULESDIR)/rules.aux +########################################################################### + diff -Nru cdrtools-2.01.01a33/libscg/scgsettarget.c cdrtools-3.02a09/libscg/scgsettarget.c --- cdrtools-2.01.01a33/libscg/scgsettarget.c 2006-09-13 14:34:05.000000000 +0000 +++ cdrtools-3.02a09/libscg/scgsettarget.c 2008-12-22 13:26:10.000000000 +0000 @@ -1,7 +1,8 @@ -/* @(#)scgsettarget.c 1.3 06/09/13 Copyright 2000 J. Schilling */ +/* @(#)scgsettarget.c 1.4 08/12/22 Copyright 2000 J. Schilling */ +#include #ifndef lint -static char _sccsid[] = - "@(#)scgsettarget.c 1.3 06/09/13 Copyright 2000 J. Schilling"; +static const char _sccsid[] = + "@(#)scgsettarget.c 1.4 08/12/22 Copyright 2000 J. Schilling"; #endif /* * scg Library diff -Nru cdrtools-2.01.01a33/libscg/scgtimes.c cdrtools-3.02a09/libscg/scgtimes.c --- cdrtools-2.01.01a33/libscg/scgtimes.c 2006-09-13 14:34:05.000000000 +0000 +++ cdrtools-3.02a09/libscg/scgtimes.c 2009-07-10 22:38:16.000000000 +0000 @@ -1,12 +1,13 @@ -/* @(#)scgtimes.c 1.2 06/09/13 Copyright 1995,2000 J. Schilling */ +/* @(#)scgtimes.c 1.4 09/07/11 Copyright 1995-2009 J. Schilling */ +#include #ifndef lint -static char sccsid[] = - "@(#)scgtimes.c 1.2 06/09/13 Copyright 1995,2000 J. Schilling"; +static UConst char sccsid[] = + "@(#)scgtimes.c 1.4 09/07/11 Copyright 1995-2009 J. Schilling"; #endif /* * SCSI user level command timing * - * Copyright (c) 1995,2000 J. Schilling + * Copyright (c) 1995-2009 J. Schilling */ /* * The contents of this file are subject to the terms of the @@ -28,7 +29,6 @@ * file and include the License file CDDL.Schily.txt from this distribution. */ -#include #include #include #include diff -Nru cdrtools-2.01.01a33/libscg/scsi-aix.c cdrtools-3.02a09/libscg/scsi-aix.c --- cdrtools-2.01.01a33/libscg/scsi-aix.c 2006-11-26 17:12:57.000000000 +0000 +++ cdrtools-3.02a09/libscg/scsi-aix.c 2012-12-02 13:27:48.000000000 +0000 @@ -1,7 +1,7 @@ -/* @(#)scsi-aix.c 1.37 06/11/26 Copyright 1997 J. Schilling */ +/* @(#)scsi-aix.c 1.40 12/12/02 Copyright 1997-2012 J. Schilling */ #ifndef lint static char __sccsid[] = - "@(#)scsi-aix.c 1.37 06/11/26 Copyright 1997 J. Schilling"; + "@(#)scsi-aix.c 1.40 12/12/02 Copyright 1997-2012 J. Schilling"; #endif /* * Interface for the AIX generic SCSI implementation. @@ -15,7 +15,7 @@ * Choose your name instead of "schily" and make clear that the version * string is related to a modified source. * - * Copyright (c) 1997 J. Schilling + * Copyright (c) 1997-2012 J. Schilling */ /* * The contents of this file are subject to the terms of the @@ -38,6 +38,16 @@ */ #include +#include + +/* + * The scsi_inquiry struct in clashes + * with the one in "scg/scsireg.h". + * Well, our scg/scsireg.h is from 1986, AIX sys/scsi_buf.h is from 1995 ;-) + */ +#define scsi_inquiry _scsi_inquiry +#include +#undef scsi_inquiry /* * Warning: you may change this source, but if you do that @@ -46,7 +56,7 @@ * Choose your name instead of "schily" and make clear that the version * string is related to a modified source. */ -LOCAL char _scg_trans_version[] = "scsi-aix.c-1.37"; /* The version for this transport*/ +LOCAL char _scg_trans_version[] = "scsi-aix.c-1.40"; /* The version for this transport*/ #define MAX_SCG 16 /* Max # of SCSI controllers */ @@ -55,11 +65,26 @@ struct scg_local { short scgfiles[MAX_SCG][MAX_TGT][MAX_LUN]; + char trtypes[MAX_SCG][MAX_TGT]; + char transp; }; #define scglocal(p) ((struct scg_local *)((p)->local)) -#define MAX_DMA_AIX (64*1024) +#define TR_UNKNONW 0 +#define TR_DKIOCMD 1 +#define TR_DKPASSTHRU 2 +#define TR_IDEPASSTHRU 3 + +/* + * At least with ATAPI, AIX is unable to transfer more than 65535 + */ +#define MAX_DMA_AIX ((64*1024)-1) + +LOCAL void sciocmd_to_scpassthru __PR((struct sc_iocmd *req, struct sc_passthru *pthru_req, struct scg_cmd *sp)); +LOCAL void scpassthru_to_sciocmd __PR((struct sc_passthru *pthru_req, struct sc_iocmd *req)); +LOCAL int sciocmd_to_idepassthru __PR((struct sc_iocmd *req, struct ide_atapi_passthru *ide_req, struct scg_cmd *sp)); +LOCAL int do_ioctl __PR((SCSI *scgp, struct sc_iocmd *req, struct scg_cmd *sp)); LOCAL int do_scg_cmd __PR((SCSI *scgp, struct scg_cmd *sp)); LOCAL int do_scg_sense __PR((SCSI *scgp, struct scg_cmd *sp)); @@ -130,10 +155,13 @@ if (scgp->local == NULL) return (0); + scglocal(scgp)->transp = TR_UNKNONW; + for (b = 0; b < MAX_SCG; b++) { for (t = 0; t < MAX_TGT; t++) { for (l = 0; l < MAX_LUN; l++) scglocal(scgp)->scgfiles[b][t][l] = (short)-1; + scglocal(scgp)->trtypes[b][t] = TR_UNKNONW; } } } @@ -295,6 +323,21 @@ if (scgp->local == NULL) return (-1); + if (scglocal(scgp)->transp != TR_UNKNONW) { + int obusno = scg_scsibus(scgp); + int otgt = scg_target(scgp); + + /* + * Try to remember old transport type if possible + */ + if (obusno >= 0 && otgt >= 0) { + scglocal(scgp)->trtypes[obusno][otgt] = + scglocal(scgp)->transp; + } + } + + scglocal(scgp)->transp = scglocal(scgp)->trtypes[busno][tgt]; + return ((int)scglocal(scgp)->scgfiles[busno][tgt][tlun]); } @@ -305,10 +348,152 @@ return (-1); } +LOCAL void +sciocmd_to_scpassthru(req, pthru_req, sp) + struct sc_iocmd *req; + struct sc_passthru *pthru_req; + struct scg_cmd *sp; +{ + fillbytes(pthru_req, sizeof (*pthru_req), '\0'); + + pthru_req->version = SCSI_VERSION_1; + pthru_req->status_validity = req->status_validity; + pthru_req->scsi_bus_status = req->scsi_bus_status; + pthru_req->adapter_status = req->adapter_status; + pthru_req->adap_q_status = req->adap_q_status; + pthru_req->q_tag_msg = req->q_tag_msg; + pthru_req->flags = req->flags; + pthru_req->devflags = SC_QUIESCE_IO; + pthru_req->q_flags = req->q_flags; + pthru_req->command_length = req->command_length; + pthru_req->autosense_length = 0; + pthru_req->timeout_value = req->timeout_value; + pthru_req->data_length = (unsigned long long)req->data_length; + pthru_req->scsi_id = 0; + pthru_req->lun_id = req->lun; + pthru_req->buffer = req->buffer; + pthru_req->autosense_buffer_ptr = NULL; + movebytes(&sp->cdb, pthru_req->scsi_cdb, 12); +} + +LOCAL void +scpassthru_to_sciocmd(pthru_req, req) + struct sc_passthru *pthru_req; + struct sc_iocmd *req; +{ + req->data_length = pthru_req->data_length; + req->buffer = pthru_req->buffer; + req->timeout_value = pthru_req->timeout_value; + req->status_validity = pthru_req->status_validity; + req->scsi_bus_status = pthru_req->scsi_bus_status; + req->adapter_status = pthru_req->adapter_status; + req->adap_q_status = pthru_req->adap_q_status; + req->q_tag_msg = pthru_req->q_tag_msg; + req->flags = pthru_req->flags; +} + +LOCAL int +sciocmd_to_idepassthru(req, ide_req, sp) + struct sc_iocmd *req; + struct ide_atapi_passthru *ide_req; + struct scg_cmd *sp; +{ + fillbytes(ide_req, sizeof (*ide_req), '\0'); + + if (sp->size > 65535) { /* Too large for IDE */ + sp->ux_errno = errno = EINVAL; + return (-1); + } else { + ide_req->buffsize = (ushort)sp->size; + } + + if (sp->flags & SCG_RECV_DATA) { + ide_req->flags |= ATA_LBA_MODE | IDE_PASSTHRU_READ; + } else if (sp->size > 0) { + ide_req->flags |= ATA_LBA_MODE; + } + + if (sp->size > 0) { + ide_req->data_ptr = (uchar *)sp->addr; + } else { + ide_req->data_ptr = NULL; + } + ide_req->timeout_value = (uint) sp->timeout; + + /* IDE cmd length is 12 */ + ide_req->atapi_cmd.length = 12; + movebytes(&sp->cdb, &(ide_req->atapi_cmd.packet), 12); + + return (0); +} + +LOCAL int +do_ioctl(scgp, req, sp) + SCSI *scgp; + struct sc_iocmd *req; + struct scg_cmd *sp; +{ + int dkiocmd_ret; + int dkiocmd_errno; + int ret; + int transp = scglocal(scgp)->transp; + struct sc_passthru pthru_req; + struct ide_atapi_passthru ide_req; + + if (transp == TR_UNKNONW) { + /* Try with DKIOCMD first. */ + if ((dkiocmd_ret = ioctl(scgp->fd, DKIOCMD, req)) >= 0) { + scglocal(scgp)->transp = TR_DKIOCMD; + return (dkiocmd_ret); + } else { + dkiocmd_errno = geterrno(); + } + + /* Try DKPASSTHRU second. */ + sciocmd_to_scpassthru(req, &pthru_req, sp); + if ((ret = ioctl(scgp->fd, DK_PASSTHRU, &pthru_req)) >= 0) { + scglocal(scgp)->transp = TR_DKPASSTHRU; + scpassthru_to_sciocmd(&pthru_req, req); + return (ret); + } + + /* Last try IDEPASSTHRU */ + if (sciocmd_to_idepassthru(req, &ide_req, sp) < 0) /* Bad size */ + return (-1); + if ((ret = ioctl(scgp->fd, IDEPASSTHRU, &ide_req)) >= 0) { + scglocal(scgp)->transp = TR_IDEPASSTHRU; + return (ret); + } + + /* Everything failed. */ + errno = dkiocmd_errno; + return (dkiocmd_ret); + } else if (transp == TR_DKIOCMD) { + return (ioctl(scgp->fd, DKIOCMD, req)); + } else if (transp == TR_DKPASSTHRU) { + sciocmd_to_scpassthru(req, &pthru_req, sp); + ret = ioctl(scgp->fd, DK_PASSTHRU, &pthru_req); + scpassthru_to_sciocmd(&pthru_req, req); + return (ret); + } else if (transp == TR_IDEPASSTHRU) { + if (sciocmd_to_idepassthru(req, &ide_req, sp) < 0) + ret = -1; + else + ret = ioctl(scgp->fd, IDEPASSTHRU, &ide_req); + + return (ret); + } else { + /* Shouldn't get here. */ + return (-1); + } +} + LOCAL int scgo_isatapi(scgp) SCSI *scgp; { + if (scglocal(scgp)->transp == TR_IDEPASSTHRU) + return (TRUE); return (FALSE); } @@ -355,12 +540,12 @@ movebytes(&sp->cdb, req.scsi_cdb, 12); errno = 0; - ret = ioctl(scgp->fd, DKIOCMD, &req); + ret = do_ioctl(scgp, &req, sp); if (scgp->debug > 0) { js_fprintf((FILE *)scgp->errfile, "ret: %d errno: %d (%s)\n", ret, errno, errmsgstr(errno)); js_fprintf((FILE *)scgp->errfile, "data_length: %d\n", req.data_length); - js_fprintf((FILE *)scgp->errfile, "buffer: 0x%X\n", req.buffer); + js_fprintf((FILE *)scgp->errfile, "buffer: %p\n", req.buffer); js_fprintf((FILE *)scgp->errfile, "timeout_value: %d\n", req.timeout_value); js_fprintf((FILE *)scgp->errfile, "status_validity: %d\n", req.status_validity); js_fprintf((FILE *)scgp->errfile, "scsi_bus_status: 0x%X\n", req.scsi_bus_status); @@ -368,6 +553,21 @@ js_fprintf((FILE *)scgp->errfile, "adap_q_status: 0x%X\n", req.adap_q_status); js_fprintf((FILE *)scgp->errfile, "q_tag_msg: 0x%X\n", req.q_tag_msg); js_fprintf((FILE *)scgp->errfile, "flags: 0X%X\n", req.flags); + + switch (scglocal(scgp)->transp) { + case TR_UNKNONW: + js_fprintf((FILE *)scgp->errfile, "using ioctl: Unknown\n"); + break; + case TR_DKIOCMD: + js_fprintf((FILE *)scgp->errfile, "using ioctl: DKIOCMD\n"); + break; + case TR_DKPASSTHRU: + js_fprintf((FILE *)scgp->errfile, "using ioctl: DK_PASSTHRU\n"); + break; + case TR_IDEPASSTHRU: + js_fprintf((FILE *)scgp->errfile, "using ioctl: IDEPASSTHRU\n"); + break; + } } if (ret < 0) { sp->ux_errno = geterrno(); @@ -420,7 +620,7 @@ struct scg_cmd s_cmd; fillbytes((caddr_t)&s_cmd, sizeof (s_cmd), '\0'); - s_cmd.addr = sp->u_sense.cmd_sense; + s_cmd.addr = (caddr_t)sp->u_sense.cmd_sense; s_cmd.size = sp->sense_len; s_cmd.flags = SCG_RECV_DATA|SCG_DISRE_ENA; s_cmd.cdb_len = SC_G0_CDBLEN; @@ -444,6 +644,8 @@ SCSI *scgp; { struct scg_cmd *sp = scgp->scmd; + int err = sp->error; /* GCC: error shadows error() */ + Uchar status = sp->u_scb.cmd_scb[0]; int ret; if (scgp->fd < 0) { @@ -451,9 +653,11 @@ return (0); } ret = do_scg_cmd(scgp, sp); - if (ret < 0) - return (ret); - if (sp->u_scb.cmd_scb[0] & 02) - ret = do_scg_sense(scgp, sp); + if (ret >= 0) { + if (sp->u_scb.cmd_scb[0] & 02) + ret = do_scg_sense(scgp, sp); + } + sp->error = err; + sp->u_scb.cmd_scb[0] = status; return (ret); } diff -Nru cdrtools-2.01.01a33/libscg/scsi-apollo.c cdrtools-3.02a09/libscg/scsi-apollo.c --- cdrtools-2.01.01a33/libscg/scsi-apollo.c 2006-11-26 17:12:57.000000000 +0000 +++ cdrtools-3.02a09/libscg/scsi-apollo.c 2011-03-07 22:03:51.000000000 +0000 @@ -1,7 +1,7 @@ -/* @(#)scsi-apollo.c 1.7 06/11/26 Copyright 1997,2000 J. Schilling */ +/* @(#)scsi-apollo.c 1.8 11/03/07 Copyright 1997,2000 J. Schilling */ #ifndef lint static char __sccsid[] = - "@(#)scsi-apollo.c 1.7 06/11/26 Copyright 1997,2000 J. Schilling"; + "@(#)scsi-apollo.c 1.8 11/03/07 Copyright 1997,2000 J. Schilling"; #endif /* * Code to support Apollo Domain/OS 10.4.1 @@ -41,7 +41,7 @@ * Choose your name instead of "schily" and make clear that the version * string is related to a modified source. */ -LOCAL char _scg_trans_version[] = "scsi-apollo.c-1.7"; /* The version for this transport */ +LOCAL char _scg_trans_version[] = "scsi-apollo.c-1.8"; /* The version for this transport */ #define MAX_SCG 1 /* Max # of SCSI controllers */ @@ -538,6 +538,10 @@ op_status.op_status); exit(EXIT_FAILURE); } + /* + * Is this the right place to copy the SCSI status byte? + */ + sp->u_scb.cmd_scb[0] = op_status.op_status; break; /* * Handle recognized error conditions by copying the error diff -Nru cdrtools-2.01.01a33/libscg/scsi-atari.c cdrtools-3.02a09/libscg/scsi-atari.c --- cdrtools-2.01.01a33/libscg/scsi-atari.c 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/libscg/scsi-atari.c 2009-07-13 19:19:47.000000000 +0000 @@ -0,0 +1,735 @@ +/* @(#)scsi-atari.c 1.3 09/07/13 Copyright 1997,2000,2009 J. Schilling */ +#ifndef lint +static char __sccsid[] = + "@(#)scsi-atari.c 1.3 09/07/13 Copyright 1997,2000,2009 J. Schilling"; +#endif +/* + * Interface for Atari generic SCSI implementation. + * + * Copyright (c) 1997, 2000, 2009 J. Schilling + * Atari systems support code written by Yvan Doyeux + * + * + * SCSIDRV driver is needed to enable libscg on Atari computers. + * I need to pass through assembler to avoid using of -mshort GCC option. + * Actually SCSIDRV requires real 16-bit word for several function arguments. + * + * If you are using HDDRIVER, it already includes the SCSIDRV programming interface, + * otherwise you must run SCSIDRV.PRG before. + * + * The following bus-numbers are reserved for this: + * 0 (ACSI) + * 1 (Standard SCSI: Falcon, TT, Medusa, MagicMac...) + * 2 (IDE in Atari-compatibles) + * + * For further information, see packages SCSIDRV.ZIP and CBHD502.ZIP. + * + * Warning: you may change this source, but if you do that + * you need to change the _scg_version and _scg_auth* string below. + * You may not return "schily" for an SCG_AUTHOR request anymore. + * Choose your name instead of "schily" and make clear that the version + * string is related to a modified source. + */ +/* + * The contents of this file are subject to the terms of the + * Common Development and Distribution License, Version 1.0 only + * (the "License"). You may not use this file except in compliance + * with the License. + * + * See the file CDDL.Schily.txt in this distribution for details. + * + * The following exceptions apply: + * CDDL §3.6 needs to be replaced by: "You may create a Larger Work by + * combining Covered Software with other code if all other code is governed by + * the terms of a license that is OSI approved (see www.opensource.org) and + * you may distribute the Larger Work as a single product. In such a case, + * You must make sure the requirements of this License are fulfilled for + * the Covered Software." + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file CDDL.Schily.txt from this distribution. + */ + +#include +#include +#include +#include +#include + +#define cdecl + +#define BOOLEAN long +#define BYTE char /* Signed byte */ +#define UBYTE unsigned char /* Unsigned byte */ +#define WORD short /* Signed word (16 bits) */ +#define UWORD unsigned short /* Unsigned word */ + +#define SCSIRevision 0x0101 + +#define MAXBUSNO 31 +#define MAX_SCSIDRV_HANDLE 32 + +#define MAX_SCG 3 /* Max # of SCSI controllers */ +#define MAX_TGT 8 +#define MAX_LUN 1 + +/* + * SCSIDRV return values + */ +#define CHECKCONDITION 2L +#define NOSCSIERROR 0L +#define SELECTERROR -1L +#define STATUSERROR -2L +#define PHASEERROR -3L +#define BSYERROR -4L +#define BUSERROR -5L +#define TRANSERROR -6L +#define FREEERROR -7L +#define TIMEOUTERROR -8L +#define DATATOOLONG -9L +#define LINKERROR -10L +#define TIMEOUTARBIT -11L +#define PENDINGERROR -12L +#define PARITYERROR -13L + +LOCAL char _scg_trans_version[] = "scsi-atari.c-1.3"; /* The version for this transport */ +LOCAL char _scg_auth[] = "Yvan Doyeux"; + + +typedef struct { + unsigned long hi; + unsigned long lo; +} DLONG; + +typedef struct { + unsigned long BusIds; + BYTE resrvd[28]; +} tPrivate; + +typedef WORD *tHandle; + +typedef struct { + tHandle Handle; + BYTE *Cmd; + UWORD CmdLen; + void *Buffer; + unsigned long TransferLen; + BYTE *SenseBuffer; + unsigned long Timeout; + UWORD Flags; +#define Disconnect 0x10 +} tSCSICmd; +typedef tSCSICmd *tpSCSICmd; + + +typedef struct { + tPrivate Private; + char BusName[20]; + UWORD BusNo; + UWORD Features; +#define cArbit 0x01 +#define cAllCmds 0x02 +#define cTargCtrl 0x04 +#define cTarget 0x08 +#define cCanDisconnect 0x10 +#define cScatterGather 0x20 + unsigned long MaxLen; +} tBusInfo; + + +typedef struct { + BYTE Private[32]; + DLONG SCSIId; +} tDevInfo; + + +typedef struct ttargethandler { + struct ttargethandler *next; + BOOLEAN cdecl (*TSel) (WORD bus, UWORD CSB, UWORD CSD); + BOOLEAN cdecl (*TCmd) (WORD bus, BYTE *Cmd); + UWORD cdecl (*TCmdLen) (WORD bus, UWORD Cmd); + void cdecl (*TReset) (UWORD bus); + void cdecl (*TEOP) (UWORD bus); + void cdecl (*TPErr) (UWORD bus); + void cdecl (*TPMism) (UWORD bus); + void cdecl (*TBLoss) (UWORD bus); + void cdecl (*TUnknownInt) (UWORD bus); +} tTargetHandler; + +typedef tTargetHandler *tpTargetHandler; + +typedef BYTE tReqData[18]; + +typedef struct +{ + UWORD Version; + + /* Routinen als Initiator */ + long cdecl (*In) (tpSCSICmd Parms); + long cdecl (*Out) (tpSCSICmd Parms); + + long cdecl (*InquireSCSI) (WORD what, tBusInfo *Info); +#define cInqFirst 0 +#define cInqNext 1 + long cdecl (*InquireBus) (WORD what, WORD BusNo, tDevInfo *Dev); + long cdecl (*CheckDev) (WORD BusNo, const DLONG *SCSIId, char *Name, UWORD *Features); + long cdecl (*RescanBus) (WORD BusNo); + long cdecl (*Open) (WORD BusNo, const DLONG *SCSIId, unsigned long *MaxLen); + long cdecl (*Close) (tHandle handle); + long cdecl (*Error) (tHandle handle, WORD rwflag, WORD ErrNo); +#define cErrRead 0 +#define cErrWrite 1 +#define cErrMediach 0 +#define cErrReset 1 + + long cdecl (*Install) (WORD bus, tpTargetHandler Handler); + long cdecl (*Deinstall) (WORD bus, tpTargetHandler Handler); + long cdecl (*GetCmd) (WORD bus, BYTE *Cmd); + long cdecl (*SendData) (WORD bus, BYTE *Buffer, unsigned long Len); + long cdecl (*GetData) (WORD bus, void *Buffer, unsigned long Len); + long cdecl (*SendStatus) (WORD bus, UWORD Status); + long cdecl (*SendMsg) (WORD bus, UWORD Msg); + long cdecl (*GetMsg) (WORD bus, UWORD *Msg); + + tReqData *ReqData; +} tScsiCall; + +typedef tScsiCall *tpScsiCall; + + +LOCAL int num_handle_opened = 0; +LOCAL tHandle tab_handle_opened[MAX_SCSIDRV_HANDLE]; +LOCAL SCSI *scgp_local; + +tpScsiCall scsicall; + +struct bus_struct { + tBusInfo bus; + tDevInfo *dev[MAX_TGT]; +}; + +struct scg_local { + struct bus_struct *atari_bus[MAX_SCG]; +}; + +#define scglocal(p) ((struct scg_local *)((p)->local)) + +/* + * Return version information for the low level SCSI transport code. + * This has been introduced to make it easier to trace down problems + * in applications. + */ +LOCAL char * +scgo_version(scgp, what) + SCSI *scgp; + int what; +{ + if (scgp != (SCSI *)0) { + switch (what) { + + case SCG_VERSION: + return (_scg_trans_version); + /* + * If you changed this source, you are not allowed to + * return "schily" for the SCG_AUTHOR request. + */ + case SCG_AUTHOR: + return (_scg_auth); + case SCG_SCCS_ID: + return (__sccsid); + } + } + return ((char *)0); +} + + + +LOCAL int +scgo_help(scgp, f) + SCSI *scgp; + FILE *f; +{ + __scg_help(f, "SCSIDRV Interface", "Atari generic SCSI implementation", + "", "bus,target,lun", "1,2,0", TRUE, FALSE); + printf("\nSCSIDRV driver is needed to enable libscg on Atari computers.\n"); + printf("If you are using HDDRIVER, it already includes the SCSIDRV\n"); + printf("programming interface otherwise you must run SCSIDRV.PRG before.\n"); + printf("The following bus-numbers are reserved for this:\n"); + printf("0 (ACSI)\n"); + printf("1 (Standard SCSI: Falcon, TT, Medusa, MagicMac...)\n"); + printf("2 (IDE in Atari-compatibles)\n"); + printf("For further information, see packages SCSIDRV.ZIP and CBHD502.ZIP.\n"); + + return (0); +} + + +LOCAL void +scsidrv_close() +{ + long rc; + + rc = (long)scsicall->Close; + { + register long retvalue __asm__("d0"); + + /* BEGIN CSTYLED */ + __asm__ volatile (" + movl %1,sp@-; + jbsr (%2); + lea sp@(4),sp " + : "=r"(retvalue) /* outputs */ + : "r"((tHandle) scgp_local->fd),"a"(rc) /* inputs */ + : "d0", "d1", "d2", "a0", "a1", "a2" /* clobbered regs */ + AND_MEMORY); + /* END CSTYLED */ + } + + num_handle_opened = num_handle_opened - 1; + if ((num_handle_opened-1) >= 0) + scgp_local->fd = (int)tab_handle_opened[num_handle_opened-1]; + else + scgp_local->fd = 0; +} + +LOCAL void +atari_free_scsi_all() +{ + int i; + int j; + + for (j = 0; j < MAX_SCG; j++) { + if (scglocal(scgp_local)->atari_bus[j] != (struct bus_struct *)-1) { + for (i = 0; i < MAX_TGT; i++) { + if (scglocal(scgp_local)->atari_bus[j]->dev[i] != (tDevInfo *)-1) { + free(scglocal(scgp_local)->atari_bus[j]->dev[i]); + } + } + free(scglocal(scgp_local)->atari_bus[j]); + } + } + if (scgp_local->local) { + free(scgp_local->local); + } + + scgo_freebuf(scgp_local); +} + + + +LOCAL int +scgo_open(scgp, device) + SCSI *scgp; + char *device; + +{ + /* SCSIDRV present ? */ + BOOL scsidrv = FALSE; + BOOL nopen = FALSE; + void *oldstack; + long rc_bus; + int i; + int j; + tBusInfo Bus; + WORD Inq_bus = cInqFirst; + long cookie_value; + + scsicall = NULL; + scgp_local = scgp; + + if (Getcookie(0x53435349L, &cookie_value) == 0) { + scsicall = (tpScsiCall)cookie_value; + printf("SCSIDRV found on your ATARI!\n"); + scsidrv = TRUE; + } else { + printf("I can't find SCSIDRV on your ATARI...\n"); + scsidrv = FALSE; + nopen = FALSE; + } + + + if (scsidrv == TRUE) { + if (scgp->local == NULL) { + scgp->local = malloc(sizeof (struct scg_local)); + if (scgp->local == NULL) + return (0); + for (j = 0; j < MAX_SCG; j++) { + scglocal(scgp)->atari_bus[j] = (struct bus_struct *)-1; + } + } + + + + oldstack = (void *)Super(NULL); + rc_bus = (long)scsicall->InquireSCSI; /* busses available */ + /* + * InquireSCSI + */ + { + register long ret_bus_value __asm__("d0") = 0; /* Return of InquireSCSI */ + long ret_bus = 0; + + while (ret_bus == 0) { + + /* BEGIN CSTYLED */ + __asm__ volatile (" + movl %1,sp@-; /* Pointer of bus structure (32-bit long)*/ + movw %3,sp@-; /* Inq_bus argument (16-bit WORD) */ + jbsr (%2); /* Call to InquireSCSI SCSIDRV function */ + lea sp@(6),sp /* Fix the stack */ " + : "=r"(ret_bus_value) /* outputs */ + : "r"(&Bus),"a"(rc_bus), "r"(Inq_bus) /* inputs */ + : "d0", "d1", "d2", "a0", "a1", "a2" /* clobbered regs */ + AND_MEMORY); + /* END CSTYLED */ + + ret_bus = ret_bus_value; + if (ret_bus == 0) { + scglocal(scgp)->atari_bus[Bus.BusNo] = malloc(sizeof (struct bus_struct)); + memcpy(&scglocal(scgp)->atari_bus[Bus.BusNo]->bus, &Bus, sizeof (tBusInfo)); + for (i = 0; i < MAX_TGT; i++) { + scglocal(scgp)->atari_bus[Bus.BusNo]->dev[i] = (tDevInfo *)-1; + } + + { + long rc_dev; + WORD Inq_dev = cInqFirst; + register long ret_dev_value __asm__("d0") = 0; + long ret_dev = 0; + tDevInfo Dev; + rc_dev = (long)scsicall->InquireBus; /* we inquiry for devices in bus Bus.BusNo */ + while (ret_dev == 0) { + + /* BEGIN CSTYLED */ + __asm__ volatile (" + movl %2,sp@-; + movw %1,sp@-; + movw %4,sp@-; + jbsr (%3); + lea sp@(8),sp " + : "=r"(ret_dev_value) /* outputs */ + : "r"(Bus.BusNo),"r"(&Dev),"a"(rc_dev), "r"(Inq_dev) /* inputs */ + : "d0", "d1", "d2", "a0", "a1", "a2" /* clobbered regs */ + AND_MEMORY); + /* END CSTYLED */ + + ret_dev = ret_dev_value; + if (ret_dev == 0) { + scglocal(scgp)->atari_bus[Bus.BusNo]->dev[(int)Dev.SCSIId.lo] = malloc(sizeof (tDevInfo)); + memcpy(scglocal(scgp)->atari_bus[Bus.BusNo]->dev[(int)Dev.SCSIId.lo], &Dev, sizeof (tDevInfo)); + } + Inq_dev = cInqNext; + } + } + + } + Inq_bus = cInqNext; + } + } + + + Super(oldstack); + + atexit(scsidrv_close); + atexit(atari_free_scsi_all); + + nopen = TRUE; + } + return (nopen); + +} + + + +LOCAL int +scgo_close(SCSI * scgp) +{ + scsidrv_close(); + atari_free_scsi_all(); + return (0); +} + + +LOCAL long +scgo_maxdma(scgp, amt) + SCSI *scgp; + long amt; +{ + /* return (63*1024); */ + return (256*1024); +} + + + +LOCAL void * +scgo_getbuf(scgp, amt) + SCSI *scgp; + long amt; +{ + if (scgp->debug > 0) { + js_fprintf((FILE *)scgp->errfile, + "scgo_getbuf: %ld bytes\n", amt); + } + scgp->bufbase = malloc((size_t)(amt)); + return (scgp->bufbase); + +} + + + +LOCAL void +scgo_freebuf(scgp) + SCSI *scgp; +{ + if (scgp->bufbase) + free(scgp->bufbase); + scgp->bufbase = NULL; +} + + + + +LOCAL int +scgo_numbus(scgp) + SCSI *scgp; +{ + return (MAX_SCG); +} + + + +LOCAL BOOL +scgo_havebus(scgp, busno) + SCSI *scgp; + int busno; +{ + return (TRUE); +} + + + +LOCAL int +scgo_fileno(scgp, busno, tgt, tlun) + SCSI *scgp; + int busno; + int tgt; + int tlun; +{ + long rc; + unsigned long MaxLen; + int fd = 0; + tBusInfo Bus; + void *oldstack; + + if (scgp_local->fd > 0) { /* handle exists ? */ + scsidrv_close(); + } + + if (busno < 0 || busno >= MAX_SCG || + tgt < 0 || tgt >= MAX_TGT || + tlun < 0 || tlun >= MAX_LUN) { + errno = EINVAL; + return (-1); + } + + if (scglocal(scgp)->atari_bus[busno] == (struct bus_struct *)-1) { + errno = EINVAL; + return (-1); + } + + if ((struct tDevInfo *) scglocal(scgp)->atari_bus[busno]->dev[tgt] == (struct tDevInfo *)-1) { + errno = EINVAL; + return (-1); + } + + + oldstack = (void *)Super(NULL); + rc = (long)scsicall->Open; + { + register long retvalue __asm__("d0") = 0; + + /* BEGIN CSTYLED */ + __asm__ volatile (" + movl %3,sp@-; + movl %2,sp@-; + movw %1,sp@-; + jbsr (%4); + lea sp@(10),sp " + : "=r"(retvalue) /* outputs */ + : "r"(scglocal(scgp)->atari_bus[busno]->bus.BusNo), + "r"(&scglocal(scgp)->atari_bus[busno]->dev[tgt]->SCSIId),"r"(&MaxLen),"a"(rc) /* inputs */ + : "d0", "d1", "d2", "a0", "a1", "a2" /* clobbered regs */ + AND_MEMORY); + /* END CSTYLED */ + + fd = (int)retvalue; + } + + + Super(oldstack); + + if (fd > 0) { + tab_handle_opened[num_handle_opened] = (tHandle)fd; + num_handle_opened = num_handle_opened + 1; + return (fd); + } else { + return (-1); + } +} + + +LOCAL int +scgo_initiator_id(scgp) + SCSI *scgp; +{ + return (-1); +} + + +LOCAL int +scgo_isatapi(scgp) + SCSI *scgp; +{ + return (FALSE); +} + + + +LOCAL int +scgo_reset(scgp, what) + SCSI *scgp; + int what; +{ + /* XXX synchronous reset command - is this wise? */ + errno = EINVAL; + return (-1); +} + + +LOCAL int +scgo_send(scgp) + SCSI *scgp; +{ + long rc; + void *oldstack; + tSCSICmd cmd; + tBusInfo Bus; + tDevInfo Dev; + unsigned long MaxLen; + long ret = 0; + BYTE reqbuff[18]; + + scgp->scmd->ux_errno = 0; + + if (scgp->fd <= 0) { + scgp->scmd->error = SCG_FATAL; + return (0); + } + + + oldstack = (void *)Super(NULL); + cmd.Handle = (tHandle) scgp->fd; + cmd.Cmd = malloc(scgp->scmd->cdb_len); + movebytes(&scgp->scmd->cdb, cmd.Cmd, scgp->scmd->cdb_len); + cmd.CmdLen = /* (UWORD) */ scgp->scmd->cdb_len; + cmd.Buffer = scgp->scmd->addr; + cmd.TransferLen = scgp->scmd->size; + cmd.SenseBuffer = scgp->scmd->u_sense.cmd_sense; + fillbytes(cmd.SenseBuffer, sizeof (reqbuff), '\0'); + cmd.Timeout = scgp->scmd->timeout * 200; + cmd.Flags = scgp->scmd->flags & SCG_RECV_DATA; + scgp->scmd->u_scb.cmd_scb[0] = 0; + + + if ((scgp->scmd->flags & SCG_RECV_DATA)) { + rc = (long)scsicall->In; + { + register long retvalue __asm__("d0"); + + /* BEGIN CSTYLED */ + __asm__ volatile (" + movl %1,sp@-; + jbsr (%2); + lea sp@(4),sp " + : "=r"(retvalue) /* outputs */ + : "r"(&cmd),"a"(rc) /* inputs */ + : "d0", "d1", "d2", "a0", "a1", "a2" /* clobbered regs */ + AND_MEMORY); + /* END CSTYLED */ + + ret = retvalue; + } + } else if (scgp->scmd->size > 0) { + + rc = (long)scsicall->Out; + { + register long retvalue __asm__("d0"); + + /* BEGIN CSTYLED */ + __asm__ volatile (" + movl %1,sp@-; + jbsr (%2); + lea sp@(4),sp " + : "=r"(retvalue) /* outputs */ + : "r"(&cmd),"a"(rc) /* inputs */ + : "d0", "d1", "d2", "a0", "a1", "a2" /* clobbered regs */ + AND_MEMORY); + /* END CSTYLED */ + + ret = retvalue; + } + } else { + + rc = (long)scsicall->Out; + { + register long retvalue __asm__("d0"); + + /* BEGIN CSTYLED */ + __asm__ volatile (" + movl %1,sp@-; + jbsr (%2); + lea sp@(4),sp " + : "=r"(retvalue) /* outputs */ + : "r"(&cmd),"a"(rc) /* inputs */ + : "d0", "d1", "d2", "a0", "a1", "a2" /* clobbered regs */ + AND_MEMORY); + /* BEGIN CSTYLED */ + + ret = retvalue; + } + } + + Super(oldstack); + + scgp->scmd->resid = 0; + + scgp->scmd->sense_count = sizeof (reqbuff); /* 18 */ + movebytes(cmd.SenseBuffer, &scgp->scmd->u_sense.cmd_sense, sizeof (reqbuff)); + + free(cmd.Cmd); + + scgp->scmd->u_scb.cmd_scb[0] = ret; + + + switch (ret) { + case CHECKCONDITION: + scgp->scmd->ux_errno = geterrno(); + scgp->scmd->error = SCG_NO_ERROR; + break; + case TIMEOUTERROR: + scgp->scmd->ux_errno = geterrno(); + scgp->scmd->error = SCG_TIMEOUT; + break; + default: + if (ret < 0) + { + scgp->scmd->ux_errno = geterrno(); + scgp->scmd->error = SCG_FATAL; + } + else + scgp->scmd->error = SCG_NO_ERROR; + break; + } + + return (ret); +} diff -Nru cdrtools-2.01.01a33/libscg/scsi-beos.c cdrtools-3.02a09/libscg/scsi-beos.c --- cdrtools-2.01.01a33/libscg/scsi-beos.c 2006-11-26 17:12:57.000000000 +0000 +++ cdrtools-3.02a09/libscg/scsi-beos.c 2009-06-30 18:34:03.000000000 +0000 @@ -1,7 +1,7 @@ -/* @(#)scsi-beos.c 1.24 06/11/26 Copyright 1998 J. Schilling */ +/* @(#)scsi-beos.c 1.29 09/06/30 Copyright 1998-2009 J. Schilling */ #ifndef lint static char __sccsid[] = - "@(#)scsi-beos.c 1.24 06/11/26 Copyright 1998 J. Schilling"; + "@(#)scsi-beos.c 1.29 09/06/30 Copyright 1998-2009 J. Schilling"; #endif /* * Interface for the BeOS user-land raw SCSI implementation. @@ -17,7 +17,7 @@ * Choose your name instead of "schily" and make clear that the version * string is related to a modified source. * - * Copyright (c) 1998 J. Schilling + * Copyright (c) 1998-2009 J. Schilling */ /* * The contents of this file are subject to the terms of the @@ -47,7 +47,7 @@ * Choose your name instead of "schily" and make clear that the version * string is related to a modified source. */ -LOCAL char _scg_trans_version[] = "scsi-beos.c-1.24"; /* The version for this transport*/ +LOCAL char _scg_trans_version[] = "scsi-beos.c-1.29"; /* The version for this transport*/ /* * There are also defines for: @@ -56,7 +56,14 @@ * * in BeOS 5 */ -#ifndef B_BEOS_VERSION_5 +#ifdef B_BEOS_VERSION_5 +#define NEW_BEOS +#endif +#ifdef __HAIKU__ +#define NEW_BEOS +#endif + +#ifndef NEW_BEOS /* * New BeOS seems to include from device/scsi.h */ @@ -71,7 +78,7 @@ #endif /* _SYS_TYPES_H */ #include -#include +#include #include @@ -125,11 +132,11 @@ #endif /* ! B_BEOS_VERSION_5 */ -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include #include /* this is really really dumb (tm) */ @@ -138,7 +145,11 @@ #include #undef bool +#ifdef __HAIKU__ /* Probaby already since BeOS 5 */ +#include +#else #include +#endif struct _fdmap_ { struct _fdmap_ *next; @@ -283,7 +294,11 @@ if (busno < 8) js_snprintf(buf, sizeof (buf), "/dev/bus/scsi/%d", busno); else +#ifdef __HAIKU__ + js_snprintf(buf, sizeof (buf), "/dev/disk/atapi/%d", busno-8); +#else js_snprintf(buf, sizeof (buf), "/dev/disk/ide/atapi/%d", busno-8); +#endif if (stat(buf, &sb)) return (FALSE); return (TRUE); @@ -311,8 +326,13 @@ } else { char *tgtstr = (tgt == 0) ? "master" : (tgt == 1) ? "slave" : "dummy"; js_snprintf(buf, sizeof (buf), +#ifdef __HAIKU__ + "/dev/disk/atapi/%d/%s/raw", + busno-8, tgtstr); +#else "/dev/disk/ide/atapi/%d/%s/%d/raw", busno-8, tgtstr, tlun); +#endif } fd = open(buf, 0); diff -Nru cdrtools-2.01.01a33/libscg/scsi-bsd.c cdrtools-3.02a09/libscg/scsi-bsd.c --- cdrtools-2.01.01a33/libscg/scsi-bsd.c 2007-03-25 20:18:56.000000000 +0000 +++ cdrtools-3.02a09/libscg/scsi-bsd.c 2015-10-08 20:58:17.000000000 +0000 @@ -1,7 +1,7 @@ -/* @(#)scsi-bsd.c 1.44 07/03/25 Copyright 1997 J. Schilling */ +/* @(#)scsi-bsd.c 1.53 15/10/08 Copyright 1997-2015 J. Schilling */ #ifndef lint static char __sccsid[] = - "@(#)scsi-bsd.c 1.44 07/03/25 Copyright 1997 J. Schilling"; + "@(#)scsi-bsd.c 1.53 15/10/08 Copyright 1997-2015 J. Schilling"; #endif /* * Interface for the NetBSD/FreeBSD/OpenBSD generic SCSI implementation. @@ -18,7 +18,7 @@ * Choose your name instead of "schily" and make clear that the version * string is related to a modified source. * - * Copyright (c) 1997 J. Schilling + * Copyright (c) 1997-2015 J. Schilling */ /* * The contents of this file are subject to the terms of the @@ -27,6 +27,8 @@ * with the License. * * See the file CDDL.Schily.txt in this distribution for details. + * A copy of the CDDL is also available via the Internet at + * http://www.opensource.org/licenses/cddl1.txt * * The following exceptions apply: * CDDL §3.6 needs to be replaced by: "You may create a Larger Work by @@ -44,6 +46,11 @@ #undef sense #include +#if defined(__NetBSD__) +#ifdef USE_GETRAWPARTITION +#include +#endif +#endif /* * Warning: you may change this source, but if you do that @@ -52,9 +59,9 @@ * Choose your name instead of "schily" and make clear that the version * string is related to a modified source. */ -LOCAL char _scg_trans_version[] = "scsi-bsd.c-1.44"; /* The version for this transport*/ +LOCAL char _scg_trans_version[] = "scsi-bsd.c-1.53"; /* The version for this transport*/ -#define MAX_SCG 16 /* Max # of SCSI controllers */ +#define MAX_SCG 32 /* Max # of SCSI controllers */ #define MAX_TGT 16 #define MAX_LUN 8 @@ -90,6 +97,9 @@ #define SADDR_LUN(a) (a).lun #endif /* __NetBSD__ && TYPE_ATAPI */ +#if defined(__NetBSD__) || defined(__OpenBSD__) +LOCAL int getslice __PR((int n)); +#endif LOCAL BOOL scg_setup __PR((SCSI *scgp, int f, int busno, int tgt, int tlun)); /* @@ -126,7 +136,11 @@ FILE *f; { __scg_help(f, "SCIOCCOMMAND", "SCSI for devices known by *BSD", +#if defined(__OpenBSD__) + "", "device or bus,target,lun", "/dev/rcd0c:@ or 1,2,0", FALSE, TRUE); +#else "", "device or bus,target,lun", "/dev/rcd0a:@ or 1,2,0", FALSE, TRUE); +#endif return (0); } @@ -143,7 +157,14 @@ register int t; register int l; register int nopen = 0; - char devname[64]; + char dev_name[64]; +#if defined(__NetBSD__) || defined(__OpenBSD__) +#ifdef USE_GETRAWPARTITION + int myslicename = getrawpartition(); +#else + int myslicename = 0; +#endif +#endif if (busno >= MAX_SCG || tgt >= MAX_TGT || tlun >= MAX_LUN) { errno = EINVAL; @@ -170,11 +191,93 @@ if ((device != NULL && *device != '\0') || (busno == -2 && tgt == -2)) goto openbydev; + +#if defined(__NetBSD__) || defined(__OpenBSD__) + /* + * I know of no method in NetBSD/OpenBSD to probe the scsibus and get + * the mapping busnumber,target,lun --> devicename. + * + * For now, implement a true brute force hack to find cdroms to allow + * cdrecord to work, but libscg is a generic SCSI transport lib. + * + * Note that this method only finds cd0-cd9. For a more correct + * implementation we would at least need to also scan the disk and tape + * devices. + * + * This still does not include scanners and other SCSI devices. + * Help is needed! + */ if (busno >= 0 && tgt >= 0 && tlun >= 0) { + struct scsi_addr mysaddr; + + for (l = 0; l < 10; l++) { + nextslice1: + sprintf(dev_name, "/dev/rcd%d%c", l, 'a' + myslicename); + f = open(dev_name, O_RDWR); + if (f >= 0) { + if (ioctl(f, SCIOCIDENTIFY, &mysaddr) < 0) { +#ifndef USE_GETRAWPARTITION + if (errno == ENOTTY && myslicename < 16) { + close(f); + myslicename = getslice(l); + goto nextslice1; + } +#endif + close(f); + errno = EINVAL; + return (0); + } + if (busno == SADDR_BUS(mysaddr) && + tgt == SADDR_TARGET(mysaddr) && + tlun == SADDR_LUN(mysaddr)) { + scglocal(scgp)->scgfiles[busno][tgt][tlun] = f; + return (1); + } + } else { +#if defined(__OpenBSD__) && defined(ENOMEDIUM) && defined(ENXIO) + if ((errno == ENOMEDIUM || errno == ENXIO) && myslicename < 16) { + myslicename = getslice(l); + goto nextslice1; + } +#endif + } + } + } else for (l = 0; l < 10; l++) { + struct scsi_addr mysaddr; - js_snprintf(devname, sizeof (devname), + nextslice2: + sprintf(dev_name, "/dev/rcd%d%c", l, 'a' + myslicename); + f = open(dev_name, O_RDWR); + if (f >= 0) { + if (ioctl(f, SCIOCIDENTIFY, &mysaddr) < 0) { +#ifndef USE_GETRAWPARTITION + if (errno == ENOTTY && myslicename < 16) { + close(f); + myslicename = getslice(l); + goto nextslice2; + } +#endif + close(f); + errno = EINVAL; + return (0); + } + if (scg_setup(scgp, f, busno, tgt, tlun)) + nopen++; + } else { +#if defined(__OpenBSD__) && defined(ENOMEDIUM) && defined(ENXIO) + if ((errno == ENOMEDIUM || errno == ENXIO) && myslicename < 16) { + myslicename = getslice(l); + goto nextslice2; + } +#endif + } + } +#else /* ! __NetBSD__ || __OpenBSD__ */ + if (busno >= 0 && tgt >= 0 && tlun >= 0) { + + js_snprintf(dev_name, sizeof (dev_name), "/dev/su%d-%d-%d", busno, tgt, tlun); - f = open(devname, O_RDWR); + f = open(dev_name, O_RDWR); if (f < 0) { goto openbydev; } @@ -184,10 +287,10 @@ } else for (b = 0; b < MAX_SCG; b++) { for (t = 0; t < MAX_TGT; t++) { for (l = 0; l < MAX_LUN; l++) { - js_snprintf(devname, sizeof (devname), + js_snprintf(dev_name, sizeof (dev_name), "/dev/su%d-%d-%d", b, t, l); - f = open(devname, O_RDWR); -/* error("open (%s) = %d\n", devname, f);*/ + f = open(dev_name, O_RDWR); +/* error("open (%s) = %d\n", dev_name, f);*/ if (f < 0) { if (errno != ENOENT && @@ -196,7 +299,7 @@ if (scgp->errstr) js_snprintf(scgp->errstr, SCSI_ERRSTR_SIZE, "Cannot open '%s'", - devname); + dev_name); return (0); } } else { @@ -206,6 +309,7 @@ } } } +#endif /* ! __NetBSD__ || __OpebBSD__ */ /* * Could not open /dev/su-* or got dev=devname:b,l,l / dev=devname:@,l * We do the apropriate tests and try our best. @@ -246,6 +350,35 @@ return (nopen); } +#if defined(__NetBSD__) || defined(__OpenBSD__) +/* + * Avoid to call getrawpartition() because this would force us to + * link against libutil. + */ +LOCAL int +getslice(n) + int n; +{ + struct scsi_addr saddr; + char dev_name[64]; + int slice; + int f; + + for (slice = 0; slice < 16; slice++) { + sprintf(dev_name, "/dev/rcd%d%c", n, 'a' + slice); + f = open(dev_name, O_RDWR); + if (f >= 0) { + if (ioctl(f, SCIOCIDENTIFY, &saddr) >= 0) { + close(f); + break; + } + close(f); + } + } + return (slice); +} +#endif + LOCAL int scgo_close(scgp) SCSI *scgp; @@ -307,8 +440,10 @@ return (FALSE); } - if (scglocal(scgp)->scgfiles[Bus][Target][Lun] == (short)-1) + if (scglocal(scgp)->scgfiles[Bus][Target][Lun] == (short)-1) { scglocal(scgp)->scgfiles[Bus][Target][Lun] = (short)f; + return (TRUE); + } if (onetarget) { if (Bus == busno && Target == tgt && Lun == tlun) { @@ -529,7 +664,7 @@ * * Copyright (c) 1998 Michael Smith * Copyright (c) 1998 Kenneth D. Merry - * Copyright (c) 1998 Joerg Schilling + * Copyright (c) 1998-2011 Joerg Schilling * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -572,7 +707,7 @@ * Choose your name instead of "schily" and make clear that the version * string is related to a modified source. */ -LOCAL char _scg_trans_version[] = "scsi-bsd.c-1.44"; /* The version for this transport*/ +LOCAL char _scg_trans_version[] = "scsi-bsd.c-1.53"; /* The version for this transport*/ #define CAM_MAXDEVS 128 struct scg_local { @@ -637,6 +772,7 @@ struct periph_match_pattern *match_pat; int fd; + seterrno(0); if ((device != NULL && *device != '\0') || (busno == -2 && tgt == -2)) { errno = EINVAL; if (scgp->errstr) @@ -685,6 +821,9 @@ * system. */ ccb.ccb_h.func_code = XPT_DEV_MATCH; + ccb.ccb_h.path_id = CAM_XPT_PATH_ID; + ccb.ccb_h.target_id = CAM_TARGET_WILDCARD; + ccb.ccb_h.target_lun = CAM_LUN_WILDCARD; /* * Setup the result buffer. @@ -967,7 +1106,8 @@ union ccb ccb_space; union ccb *ccb = &ccb_space; int rv, result; - u_int32_t ccb_flags; + u_int32_t flags; + int sense_len; if (scgp->fd < 0) { #if 0 @@ -992,13 +1132,13 @@ * Set the data direction flags. */ if (sp->size != 0) { - ccb_flags = (sp->flags & SCG_RECV_DATA) ? CAM_DIR_IN : + flags = (sp->flags & SCG_RECV_DATA) ? CAM_DIR_IN : CAM_DIR_OUT; } else { - ccb_flags = CAM_DIR_NONE; + flags = CAM_DIR_NONE; } - ccb_flags |= CAM_DEV_QFRZDIS; + flags |= CAM_DEV_QFRZDIS; /* * If you don't want to bother with sending tagged commands under CAM, @@ -1006,23 +1146,51 @@ * tagged commands to those devices that support it, we'll need to set * the tag action valid field like this in scgo_send(): * - * ccb_flags |= CAM_DEV_QFRZDIS | CAM_TAG_ACTION_VALID; + * flags |= CAM_DEV_QFRZDIS | CAM_TAG_ACTION_VALID; + * + * Note that SSD_FULL_SIZE is 32 on FreeBSD and that it is impossible + * to get more that SSD_FULL_SIZE == sizeof ((struct scsi_sense_data) + * on FreeBSD. */ + sense_len = sp->sense_len; + if (sense_len > SSD_FULL_SIZE) + sense_len = SSD_FULL_SIZE; cam_fill_csio(&ccb->csio, /* retries */ 1, /* cbfncp */ NULL, - /* flags */ ccb_flags, + /* flags */ flags, /* tag_action */ MSG_SIMPLE_Q_TAG, /* data_ptr */ (u_int8_t *)sp->addr, /* dxfer_len */ sp->size, - /* sense_len */ SSD_FULL_SIZE, + /* sense_len */ sense_len, /* cdb_len */ sp->cdb_len, /* timeout */ sp->timeout * 1000); /* Run the command */ errno = 0; - if ((rv = cam_send_ccb(dev, ccb)) == -1) { + result = 16; + do { + /* + * CAM_REQUEUE_REQ is a very unspecified status code. For this + * reason, only the kernel could know why it happened. + * This is therefore a loop that should be handled inside the + * kernel in order not to break the layering model. + * FreBSD unfortunately has dozens of places in the kernel that + * set CAM_REQUEUE_REQ and most of the places that set + * CAM_REQUEUE_REQ are handling missing kernel resources. As + * it seems to be unlikely that there will be a clean fix in + * the kernel soon, we are forced to handle this status here. + * + * Note that for May 2010, there is at least one definite bug + * in the kernel where CAM_REQUEUE_REQ is returned for a SCSI + * reservation conflict. + */ + rv = cam_send_ccb(dev, ccb); + } while (rv != -1 && --result > 0 && + (ccb->ccb_h.status & CAM_STATUS_MASK) == CAM_REQUEUE_REQ); + + if (rv == -1) { return (rv); } else { /* @@ -1053,12 +1221,14 @@ /* Pass the result back up */ fillbytes(&sp->scb, sizeof (sp->scb), '\0'); +#ifdef CLEAR_SENSE fillbytes(&sp->u_sense.cmd_sense, sizeof (sp->u_sense.cmd_sense), '\0'); +#endif sp->resid = ccb->csio.resid; - sp->sense_count = SSD_FULL_SIZE - ccb->csio.sense_resid; + sp->sense_count = sense_len - ccb->csio.sense_resid; /* - * Determine how much room we have for sense data. + * Determine how much room we have for sense data in struct scg_cmd. */ if (sp->sense_count > SCG_MAX_SENSE) sp->sense_count = SCG_MAX_SENSE; diff -Nru cdrtools-2.01.01a33/libscg/scsierrs.c cdrtools-3.02a09/libscg/scsierrs.c --- cdrtools-2.01.01a33/libscg/scsierrs.c 2006-09-13 14:34:05.000000000 +0000 +++ cdrtools-3.02a09/libscg/scsierrs.c 2010-05-24 10:01:46.000000000 +0000 @@ -1,12 +1,13 @@ -/* @(#)scsierrs.c 2.30 06/09/13 Copyright 1987-1996 J. Schilling */ +/* @(#)scsierrs.c 2.34 10/05/24 Copyright 1987-2010 J. Schilling */ +#include #ifndef lint -static char sccsid[] = - "@(#)scsierrs.c 2.30 06/09/13 Copyright 1987-1996 J. Schilling"; +static UConst char sccsid[] = + "@(#)scsierrs.c 2.34 10/05/24 Copyright 1987-2010 J. Schilling"; #endif /* * Error printing for scsitransp.c * - * Copyright (c) 1987-1996 J. Schilling + * Copyright (c) 1987-2010 J. Schilling */ /* * The contents of this file are subject to the terms of the @@ -28,9 +29,7 @@ * file and include the License file CDDL.Schily.txt from this distribution. */ -#include - -#include +#include #include /* for sys/types.h needed in schily.h for sprintf() */ #include #include @@ -55,6 +54,7 @@ struct scsi_sense *, struct scsi_status *, int)); +#ifdef KEY_FROM_OLD_SENSE /* * Map old non extended sense to sense key. */ @@ -64,9 +64,10 @@ 4, 3, 3, 3, 3, 4, 3, 1, /* 0x10-0x17 */ 1, 1, 3, 4, 3, 4, 3, 3, /* 0x18-0x1f */ 5, 5, 5, 5, 5, 5, 5, 7, /* 0x20-0x27 */ - 6, 6, 6, 5, 4,11,11,11 /* 0x28-0x2f */ + 6, 6, 6, 5, 4, 11, 11, 11 /* 0x28-0x2f */ }; #define MAX_ADAPTEC_KEYS (sizeof (sd_adaptec_keys)) +#endif /* * Deviations to CCS found on old pre CCS devices @@ -116,9 +117,9 @@ "\004\004logical unit not ready, format in progress", /* 04 04 */ "\004\005logical unit not ready, rebuild in progress", /* 04 05 */ "\004\006logical unit not ready, recalculation in progress", /* 04 06 */ - "\004\007logical unit not ready, operation in progress",/* 04 07 */ + "\004\007logical unit not ready, operation in progress", /* 04 07 */ "\004\010logical unit not ready, long write in progress", /* 04 08 */ - "\004\011logical unit not ready, self-test in progress",/* 04 09 */ + "\004\011logical unit not ready, self-test in progress", /* 04 09 */ "\004\012asymmetric access code 3 (00-232) [proposed]", /* 04 0A */ "\004\013asymmetric access code 1 (00-232) [proposed]", /* 04 0B */ "\004\014asymmetric access code 2 (00-232) [proposed]", /* 04 0C */ @@ -245,7 +246,7 @@ "\041\000logical block address out of range", /* 21 00 */ "\041\001invalid element address", /* 21 01 */ "\041\002invalid address for write", /* 21 02 */ - "\042\000illegal function (use 20 00, 24 00, or 26 00)",/* 22 00 */ + "\042\000illegal function (use 20 00, 24 00, or 26 00)", /* 22 00 */ #ifdef __used__ "\043\000", /* 23 00 */ #endif @@ -277,7 +278,7 @@ "\047\006conditional write protect", /* 27 06 */ "\050\000not ready to ready change, medium may have changed", /* 28 00 */ "\050\001import or export element accessed", /* 28 01 */ - "\051\000power on, reset, or bus device reset occurred",/* 29 00 */ + "\051\000power on, reset, or bus device reset occurred", /* 29 00 */ "\051\001power on occurred", /* 29 01 */ "\051\002scsi bus reset occurred", /* 29 02 */ "\051\003bus device reset function occurred", /* 29 03 */ @@ -454,24 +455,24 @@ "\135\001media failure prediction threshold exceeded", /* 5D 01 */ "\135\002logical unit failure prediction threshold exceeded", /* 5D 02 */ "\135\003spare area exhaustion prediction threshold exceeded", /* 5D 03 */ - "\135\020hardware impending failure general hard drive failure",/* 5D 10 */ + "\135\020hardware impending failure general hard drive failure", /* 5D 10 */ "\135\021hardware impending failure drive error rate too high", /* 5D 11 */ "\135\022hardware impending failure data error rate too high", /* 5D 12 */ "\135\023hardware impending failure seek error rate too high", /* 5D 13 */ "\135\024hardware impending failure too many block reassigns", /* 5D 14 */ "\135\025hardware impending failure access times too high", /* 5D 15 */ "\135\026hardware impending failure start unit times too high", /* 5D 16 */ - "\135\027hardware impending failure channel parametrics",/* 5D 17 */ - "\135\030hardware impending failure controller detected",/* 5D 18 */ + "\135\027hardware impending failure channel parametrics", /* 5D 17 */ + "\135\030hardware impending failure controller detected", /* 5D 18 */ "\135\031hardware impending failure throughput performance", /* 5D 19 */ "\135\032hardware impending failure seek time performance", /* 5D 1A */ "\135\033hardware impending failure spin-up retry count", /* 5D 1B */ "\135\034hardware impending failure drive calibration retry count", /* 5D 1C */ "\135\040controller impending failure general hard drive failure", /* 5D 20 */ "\135\041controller impending failure drive error rate too high", /* 5D 21 */ - "\135\042controller impending failure data error rate too high",/* 5D 22 */ - "\135\043controller impending failure seek error rate too high",/* 5D 23 */ - "\135\044controller impending failure too many block reassigns",/* 5D 24 */ + "\135\042controller impending failure data error rate too high", /* 5D 22 */ + "\135\043controller impending failure seek error rate too high", /* 5D 23 */ + "\135\044controller impending failure too many block reassigns", /* 5D 24 */ "\135\045controller impending failure access times too high", /* 5D 25 */ "\135\046controller impending failure start unit times too high", /* 5D 26 */ "\135\047controller impending failure channel parametrics", /* 5D 27 */ @@ -489,7 +490,7 @@ "\135\066data channel impending failure start unit times too high", /* 5D 36 */ "\135\067data channel impending failure channel parametrics", /* 5D 37 */ "\135\070data channel impending failure controller detected", /* 5D 38 */ - "\135\071data channel impending failure throughput performance",/* 5D 39 */ + "\135\071data channel impending failure throughput performance", /* 5D 39 */ "\135\072data channel impending failure seek time performance", /* 5D 3A */ "\135\073data channel impending failure spin-up retry count", /* 5D 3B */ "\135\074data channel impending failure drive calibration retry count", /* 5D 3C */ @@ -498,14 +499,14 @@ "\135\102servo impending failure data error rate too high", /* 5D 42 */ "\135\103servo impending failure seek error rate too high", /* 5D 43 */ "\135\104servo impending failure too many block reassigns", /* 5D 44 */ - "\135\105servo impending failure access times too high",/* 5D 45 */ + "\135\105servo impending failure access times too high", /* 5D 45 */ "\135\106servo impending failure start unit times too high", /* 5D 46 */ - "\135\107servo impending failure channel parametrics", /* 5D 47 */ - "\135\110servo impending failure controller detected", /* 5D 48 */ + "\135\107servo impending failure channel parametrics", /* 5D 47 */ + "\135\110servo impending failure controller detected", /* 5D 48 */ "\135\111servo impending failure throughput performance", /* 5D 49 */ - "\135\112servo impending failure seek time performance",/* 5D 4A */ - "\135\113servo impending failure spin-up retry count", /* 5D 4B */ - "\135\114servo impending failure drive calibration retry count",/* 5D 4C */ + "\135\112servo impending failure seek time performance", /* 5D 4A */ + "\135\113servo impending failure spin-up retry count", /* 5D 4B */ + "\135\114servo impending failure drive calibration retry count", /* 5D 4C */ "\135\120spindle impending failure general hard drive failure", /* 5D 50 */ "\135\121spindle impending failure drive error rate too high", /* 5D 51 */ "\135\122spindle impending failure data error rate too high", /* 5D 52 */ @@ -513,13 +514,13 @@ "\135\124spindle impending failure too many block reassigns", /* 5D 54 */ "\135\125spindle impending failure access times too high", /* 5D 55 */ "\135\126spindle impending failure start unit times too high", /* 5D 56 */ - "\135\127spindle impending failure channel parametrics",/* 5D 57 */ - "\135\130spindle impending failure controller detected",/* 5D 58 */ + "\135\127spindle impending failure channel parametrics", /* 5D 57 */ + "\135\130spindle impending failure controller detected", /* 5D 58 */ "\135\131spindle impending failure throughput performance", /* 5D 59 */ "\135\132spindle impending failure seek time performance", /* 5D 5A */ - "\135\133spindle impending failure spin-up retry count",/* 5D 5B */ + "\135\133spindle impending failure spin-up retry count", /* 5D 5B */ "\135\134spindle impending failure drive calibration retry count", /* 5D 5C */ - "\135\140firmware impending failure general hard drive failure",/* 5D 60 */ + "\135\140firmware impending failure general hard drive failure", /* 5D 60 */ "\135\141firmware impending failure drive error rate too high", /* 5D 61 */ "\135\142firmware impending failure data error rate too high", /* 5D 62 */ "\135\143firmware impending failure seek error rate too high", /* 5D 63 */ @@ -532,7 +533,7 @@ "\135\152firmware impending failure seek time performance", /* 5D 6A */ "\135\153firmware impending failure spin-up retry count", /* 5D 6B */ "\135\154firmware impending failure drive calibration retry count", /* 5D 6C */ - "\135\377failure prediction threshold exceeded (false)",/* 5D FF */ + "\135\377failure prediction threshold exceeded (false)", /* 5D FF */ "\136\000low power condition on", /* 5E 00 */ "\136\001idle condition activated by timer", /* 5E 01 */ "\136\002standby condition activated by timer", /* 5E 02 */ @@ -583,7 +584,7 @@ "\154\000rebuild failure occurred", /* 6C 00 */ "\155\000recalculate failure occurred", /* 6D 00 */ "\156\000command to logical unit failed", /* 6E 00 */ - "\157\000copy protection key exchange failure - authentication failure",/* 6F 00 */ + "\157\000copy protection key exchange failure - authentication failure", /* 6F 00 */ "\157\001copy protection key exchange failure - key not present", /* 6F 01 */ "\157\002copy protection key exchange failure - key not established", /* 6F 02 */ "\157\003read of scrambled sector without authentication", /* 6F 03 */ @@ -667,6 +668,7 @@ "Reserved" /* 0x0f */ }; +#ifdef MAP_SCSI_CMDS static char *sd_cmds[] = { "\000test unit ready", /* 0x00 */ "\001rezero", /* 0x01 */ @@ -687,6 +689,7 @@ "\067read defect data", /* 0x37 */ NULL }; +#endif EXPORT const char * @@ -780,7 +783,7 @@ { char sbuf[80]; const char *sensemsg, *cmdname, *sensekey; -#define ext_sense ((struct scsi_ext_sense* ) sense) +#define ext_sense ((struct scsi_ext_sense *) sense) register int blkno = 0; register int code; int badqual = 0; @@ -835,19 +838,19 @@ } blkvalid = sense->adr_val; - sensemsg = scg_sensemsg(scgp->dev, code, qual, scgp->nonstderrs, sbuf, sizeof(sbuf)); + sensemsg = scg_sensemsg(scgp->dev, code, qual, scgp->nonstderrs, sbuf, sizeof (sbuf)); if (sensemsg == NULL) { - sensemsg = scg_sensemsg(scgp->dev, code, 0, scgp->nonstderrs, sbuf, sizeof(sbuf)); + sensemsg = scg_sensemsg(scgp->dev, code, 0, scgp->nonstderrs, sbuf, sizeof (sbuf)); badqual = 1; } } -/* - if (un->un_cmd < sizeof(scsi_cmds)) { +#ifdef nonono + if (un->un_cmd < sizeof (scsi_cmds)) { cmdname = scsi_cmds[un->un_cmd]; } else { cmdname = "unknown cmd"; } -*/ +#endif cmdname = ""; n = js_snprintf(obuf, sizeleft, "%sSense Key: 0x%X %s%s, Segment %d\n", cmdname, key, sensekey, @@ -905,7 +908,7 @@ } obuf += n; sizeleft -= n; - break; + break; case SC_RECOVERABLE_ERROR: case SC_HARDWARE_ERROR: @@ -924,7 +927,7 @@ case SC_NOT_READY: n = js_snprintf(obuf, sizeleft, "operation %d%% done", (100*(ext_sense->field_ptr[0] << 8 | - ext_sense->field_ptr[1]))/(unsigned)65536); + ext_sense->field_ptr[1]))/(unsigned)65536); if (n < 0) { obuf[0] = '\0'; return (maxcnt - sizeleft); @@ -997,7 +1000,7 @@ for (i = 0; i < 0x30; i++) { /* js_printf("Code: 0x%x Key: 0x%x ", i, sd_adaptec_keys[i]);*/ js_printf("Key: 0x%x %-16s ", sd_adaptec_keys[i], - sd_sense_keys[sd_adaptec_keys[i]] ); + sd_sense_keys[sd_adaptec_keys[i]]); js_print_err(i, CTYPE_ACB4000); js_printf("\n"); } diff -Nru cdrtools-2.01.01a33/libscg/scsihack.c cdrtools-3.02a09/libscg/scsihack.c --- cdrtools-2.01.01a33/libscg/scsihack.c 2007-05-24 11:32:46.000000000 +0000 +++ cdrtools-3.02a09/libscg/scsihack.c 2013-07-30 18:37:09.000000000 +0000 @@ -1,7 +1,7 @@ -/* @(#)scsihack.c 1.49 07/05/24 Copyright 1997,2000,2001 J. Schilling */ +/* @(#)scsihack.c 1.60 13/07/30 Copyright 1997,2000-2013 J. Schilling */ #ifndef lint static char _sccsid[] = - "@(#)scsihack.c 1.49 07/05/24 Copyright 1997,2000,2001 J. Schilling"; + "@(#)scsihack.c 1.60 13/07/30 Copyright 1997,2000-2013 J. Schilling"; #endif /* * Interface for other generic SCSI implementations. @@ -24,7 +24,7 @@ * If your version has been integrated into the main steam release, * the return value will be set to "schily". * - * Copyright (c) 1997,2000,2001 J. Schilling + * Copyright (c) 1997,2000-2013 J. Schilling */ /* * The contents of this file are subject to the terms of the @@ -33,6 +33,8 @@ * with the License. * * See the file CDDL.Schily.txt in this distribution for details. + * A copy of the CDDL is also available via the Internet at + * http://www.opensource.org/licenses/cddl1.txt * * The following exceptions apply: * CDDL §3.6 needs to be replaced by: "You may create a Larger Work by @@ -48,10 +50,8 @@ #include -#ifdef HAVE_SYS_PARAM_H -#include /* Include various defs needed with some OS */ -#endif -#include +#include /* Include various defs needed with some OS */ +#include #include #include #include @@ -101,6 +101,8 @@ scgo_reset, }; +#ifndef NO_SCSI_IMPL + /*#undef sun*/ /*#undef __sun*/ /*#undef __sun__*/ @@ -126,7 +128,12 @@ #ifdef USE_PG_ONLY #include "scsi-linux-pg.c" #else +#if (defined(HAVE_SCSI_SCSI_H) || defined(HAVE_LINUX_SCSI_H)) && \ + (defined(HAVE_SCSI_SG_H) || defined(HAVE_LINUX_SG_H)) #include "scsi-linux-sg.c" +#else +#undef SCSI_IMPL /* We have no SCSI for this Linux variant */ +#endif #endif #endif /* linux */ @@ -140,8 +147,7 @@ #endif /* *BSD */ #if defined(__bsdi__) /* We have a SCSI implementation for BSD/OS 3.x (and later?) */ -# include -# if (_BSDI_VERSION >= 199701) +# if (_BSDI_VERSION >= 199701) /* From sys/param.h included via schily/param.h */ # define SCSI_IMPL # include "scsi-bsd-os.c" @@ -223,12 +229,12 @@ #endif /* OS/2 */ -#ifdef __BEOS__ +#if defined(__BEOS__) || defined(__HAIKU__) #define SCSI_IMPL /* Yep, BeOS does that funky scsi stuff */ #include "scsi-beos.c" #endif -#ifdef __CYGWIN32__ +#if defined(__CYGWIN32__) || defined(__CYGWIN__) || defined(__MINGW32__) || defined(_MSC_VER) #define SCSI_IMPL /* Yep, we support WNT and W9? */ #include "scsi-wnt.c" #endif @@ -253,6 +259,16 @@ #include "scsi-dos.c" #endif +#ifdef __MINT__ /* We have a SCSI implementation for ATARI/FreeMINT */ +#define SCSI_IMPL +#include "scsi-atari.c" +#endif + +#if defined(__SYLLABLE__) || defined(__PYRO__) +#define SCSI_IMPL /* We have a SCSI implementation for Syllable and Pyro */ +#include "scsi-syllable.c" +#endif + #ifdef __NEW_ARCHITECTURE #define SCSI_IMPL /* We have a SCSI implementation for XXX */ /* @@ -261,6 +277,7 @@ #include "scsi-new-arch.c" #endif +#endif /* !NO_SCSI_IMPL */ #ifndef SCSI_IMPL /* @@ -342,7 +359,7 @@ * Choose your name instead of "schily" and make clear that the version * string is related to a modified source. */ -LOCAL char _scg_trans_dversion[] = "scsihack.c-1.49"; /* The version for this transport*/ +LOCAL char _scg_trans_dversion[] = "scsihack.c-1.60"; /* The version for this transport*/ /* * Return version information for the low level SCSI transport code. diff -Nru cdrtools-2.01.01a33/libscg/scsihelp.c cdrtools-3.02a09/libscg/scsihelp.c --- cdrtools-2.01.01a33/libscg/scsihelp.c 2006-09-13 14:34:06.000000000 +0000 +++ cdrtools-3.02a09/libscg/scsihelp.c 2009-07-10 22:38:16.000000000 +0000 @@ -1,13 +1,14 @@ -/* @(#)scsihelp.c 1.5 06/09/13 Copyright 2002 J. Schilling */ +/* @(#)scsihelp.c 1.7 09/07/11 Copyright 2002-2009 J. Schilling */ +#include #ifndef lint -static char sccsid[] = - "@(#)scsihelp.c 1.5 06/09/13 Copyright 2002 J. Schilling"; +static UConst char sccsid[] = + "@(#)scsihelp.c 1.7 09/07/11 Copyright 2002-2009 J. Schilling"; #endif /* * scg Library * Help subsystem * - * Copyright (c) 2002 J. Schilling + * Copyright (c) 2002-2009 J. Schilling */ /* * The contents of this file are subject to the terms of the @@ -29,8 +30,7 @@ * file and include the License file CDDL.Schily.txt from this distribution. */ -#include -#include +#include #include #include diff -Nru cdrtools-2.01.01a33/libscg/scsi-hpux.c cdrtools-3.02a09/libscg/scsi-hpux.c --- cdrtools-2.01.01a33/libscg/scsi-hpux.c 2006-11-26 17:12:57.000000000 +0000 +++ cdrtools-3.02a09/libscg/scsi-hpux.c 2009-10-09 19:43:32.000000000 +0000 @@ -1,7 +1,7 @@ -/* @(#)scsi-hpux.c 1.33 06/11/26 Copyright 1997 J. Schilling */ +/* @(#)scsi-hpux.c 1.34 09/10/09 Copyright 1997 J. Schilling */ #ifndef lint static char __sccsid[] = - "@(#)scsi-hpux.c 1.33 06/11/26 Copyright 1997 J. Schilling"; + "@(#)scsi-hpux.c 1.34 09/10/09 Copyright 1997 J. Schilling"; #endif /* * Interface for the HP-UX generic SCSI implementation. @@ -44,7 +44,7 @@ * Choose your name instead of "schily" and make clear that the version * string is related to a modified source. */ -LOCAL char _scg_trans_version[] = "scsi-hpux.c-1.33"; /* The version for this transport*/ +LOCAL char _scg_trans_version[] = "scsi-hpux.c-1.34"; /* The version for this transport*/ #define MAX_SCG 16 /* Max # of SCSI controllers */ #define MAX_TGT 16 @@ -355,7 +355,8 @@ return (ret); } if (scgp->debug > 0) -error("cdb_status: %X, size: %d xfer: %d\n", sctl_io.cdb_status, sctl_io.data_length, sctl_io.data_xfer); +error("cdb_status: %X, size: %d xfer: %d senselen: %d sensexfer: %d\n", +sctl_io.cdb_status, sctl_io.data_length, sctl_io.data_xfer, sp->sense_len, sctl_io.sense_xfer); if (sctl_io.cdb_status == 0 || sctl_io.cdb_status == 0x02) sp->resid = sp->size - sctl_io.data_xfer; @@ -363,13 +364,17 @@ if (sctl_io.cdb_status & SCTL_SELECT_TIMEOUT || sctl_io.cdb_status & SCTL_INVALID_REQUEST) { sp->error = SCG_FATAL; +#ifdef SCTL_POWERFAIL + } else if (sctl_io.cdb_status & SCTL_POWERFAIL) { /* Cannot select ATA */ + sp->error = SCG_FATAL; +#endif } else if (sctl_io.cdb_status & SCTL_INCOMPLETE) { sp->error = SCG_TIMEOUT; } else if (sctl_io.cdb_status > 0xFF) { errmsgno(EX_BAD, "SCSI problems: cdb_status: %X\n", sctl_io.cdb_status); } else if ((sctl_io.cdb_status & 0xFF) != 0) { - sp->error = SCG_RETRYABLE; +/* sp->error = SCG_RETRYABLE;*/ sp->ux_errno = EIO; sp->u_scb.cmd_scb[0] = sctl_io.cdb_status & 0xFF; diff -Nru cdrtools-2.01.01a33/libscg/scsi-linux-ata.c cdrtools-3.02a09/libscg/scsi-linux-ata.c --- cdrtools-2.01.01a33/libscg/scsi-linux-ata.c 2006-11-26 20:58:49.000000000 +0000 +++ cdrtools-3.02a09/libscg/scsi-linux-ata.c 2013-05-28 18:19:31.000000000 +0000 @@ -1,7 +1,7 @@ -/* @(#)scsi-linux-ata.c 1.13 06/11/26 Copyright 2002 J. Schilling */ +/* @(#)scsi-linux-ata.c 1.16 13/05/28 Copyright 2002-2013 J. Schilling */ #ifndef lint static char ata_sccsid[] = - "@(#)scsi-linux-ata.c 1.13 06/11/26 Copyright 2002 J. Schilling"; + "@(#)scsi-linux-ata.c 1.16 13/05/28 Copyright 2002-2013 J. Schilling"; #endif /* * Interface for Linux generic SCSI implementation (sg). @@ -18,7 +18,7 @@ * Choose your name instead of "schily" and make clear that the version * string is related to a modified source. * - * Copyright (c) 2002 J. Schilling + * Copyright (c) 2002-2013 J. Schilling * * Thanks to Alexander Kern for the idea and first * code fragments for supporting the CDROM_SEND_PACKET ioctl() from @@ -52,7 +52,7 @@ #ifdef USE_ATAPI -LOCAL char _scg_atrans_version[] = "scsi-linux-ata.c-1.13"; /* The version for ATAPI transport*/ +LOCAL char _scg_atrans_version[] = "scsi-linux-ata.c-1.16"; /* The version for ATAPI transport*/ LOCAL char * scgo_aversion __PR((SCSI *scgp, int what)); LOCAL int scgo_ahelp __PR((SCSI *scgp, FILE *f)); @@ -809,11 +809,11 @@ l = 0; #endif /* nonono */ /* other solution, with ioctl */ - int Chan, - Ino, - Bus, - Target, - Lun; + int Chan = -1, + Ino = -1, + Bus = -1, + Target = -1, + Lun = -1; subsystem = HOST_SCSI; sg_amapdev_scsi(scgp, f, &Bus, &Target, &Lun, &Chan, &Ino); @@ -1153,6 +1153,9 @@ case ENXIO: p = "ENXIO"; break; + case EPERM: + p = "EPERM"; + break; case EACCES: p = "EACCES"; break; @@ -1174,8 +1177,8 @@ #endif /* DEBUG */ if (ret < 0) { /* - * Check if SCSI command cound not be send at all. - * Linux usually returns EINVAL for an unknoen ioctl. + * Check if SCSI command could not be send at all. + * Linux usually returns EINVAL for an unknown ioctl. * In case somebody from the Linux kernel team learns that the * corect errno would be ENOTTY, we check for this errno too. */ @@ -1197,7 +1200,9 @@ */ return (-1); } - if (sp->ux_errno == ENXIO || sp->ux_errno == EACCES) { + if (sp->ux_errno == ENXIO || + sp->ux_errno == EPERM || + sp->ux_errno == EACCES) { return (-1); } } else if (ret == 0) { diff -Nru cdrtools-2.01.01a33/libscg/scsi-linux-pg.c cdrtools-3.02a09/libscg/scsi-linux-pg.c --- cdrtools-2.01.01a33/libscg/scsi-linux-pg.c 2006-11-26 17:12:57.000000000 +0000 +++ cdrtools-3.02a09/libscg/scsi-linux-pg.c 2011-03-07 22:19:21.000000000 +0000 @@ -1,7 +1,7 @@ -/* @(#)scsi-linux-pg.c 1.45 06/11/26 Copyright 1997 J. Schilling */ +/* @(#)scsi-linux-pg.c 1.46 11/03/07 Copyright 1997 J. Schilling */ #ifndef lint static char ___sccsid[] = - "@(#)scsi-linux-pg.c 1.45 06/11/26 Copyright 1997 J. Schilling"; + "@(#)scsi-linux-pg.c 1.46 11/03/07 Copyright 1997 J. Schilling"; #endif /* * Interface for the Linux PARIDE implementation. @@ -51,7 +51,7 @@ * Choose your name instead of "schily" and make clear that the version * string is related to a modified source. */ -LOCAL char _scg_trans_version_pg[] = "scsi-linux-pg.c-1.45"; /* The version for this transport*/ +LOCAL char _scg_trans_version_pg[] = "scsi-linux-pg.c-1.46"; /* The version for this transport*/ #ifdef USE_PG_ONLY @@ -586,6 +586,8 @@ SCSI *scgp; { struct scg_cmd *sp = scgp->scmd; + int error = sp->error; + Uchar status = sp->u_scb.cmd_scb[0]; int ret; if (scgp->fd < 0) { @@ -593,10 +595,12 @@ return (0); } ret = do_scg_cmd(scgp, sp); - if (ret < 0) - return (ret); - if (sp->u_scb.cmd_scb[0] & 2) - ret = do_scg_sense(scgp, sp); + if (ret >= 0) { + if (sp->u_scb.cmd_scb[0] & 02) + ret = do_scg_sense(scgp, sp); + } + sp->error = error; + sp->u_scb.cmd_scb[0] = status; return (ret); } diff -Nru cdrtools-2.01.01a33/libscg/scsi-linux-sg.c cdrtools-3.02a09/libscg/scsi-linux-sg.c --- cdrtools-2.01.01a33/libscg/scsi-linux-sg.c 2007-04-23 21:13:33.000000000 +0000 +++ cdrtools-3.02a09/libscg/scsi-linux-sg.c 2016-01-11 22:29:44.000000000 +0000 @@ -1,7 +1,7 @@ -/* @(#)scsi-linux-sg.c 1.92 07/04/23 Copyright 1997 J. Schilling */ +/* @(#)scsi-linux-sg.c 1.98 16/01/11 Copyright 1997-2016 J. Schilling */ #ifndef lint static char __sccsid[] = - "@(#)scsi-linux-sg.c 1.92 07/04/23 Copyright 1997 J. Schilling"; + "@(#)scsi-linux-sg.c 1.98 16/01/11 Copyright 1997-2016 J. Schilling"; #endif /* * Interface for Linux generic SCSI implementation (sg). @@ -39,7 +39,7 @@ * Choose your name instead of "schily" and make clear that the version * string is related to a modified source. * - * Copyright (c) 1997 J. Schilling + * Copyright (c) 1997-2016 J. Schilling */ /* * The contents of this file are subject to the terms of the @@ -48,6 +48,8 @@ * with the License. * * See the file CDDL.Schily.txt in this distribution for details. + * A copy of the CDDL is also available via the Internet at + * http://www.opensource.org/licenses/cddl1.txt * * The following exceptions apply: * CDDL §3.6 needs to be replaced by: "You may create a Larger Work by @@ -127,7 +129,7 @@ * Choose your name instead of "schily" and make clear that the version * string is related to a modified source. */ -LOCAL char _scg_trans_version[] = "scsi-linux-sg.c-1.92"; /* The version for this transport*/ +LOCAL char _scg_trans_version[] = "scsi-linux-sg.c-1.98"; /* The version for this transport*/ #ifndef SCSI_IOCTL_GET_BUS_NUMBER #define SCSI_IOCTL_GET_BUS_NUMBER 0x5386 @@ -169,12 +171,12 @@ * XXX Should add extra space in buscookies and scgfiles for a "PP bus" * XXX and for two or more "ATAPI busses". */ -#define MAX_SCG 256 /* Max # of SCSI controllers */ -#define MAX_ATA 13 /* Max # of ATA devices */ +#define MAX_SCG (512-MAX_ATA) /* Max # of SCSI controllers */ +#define MAX_ATA 13 /* Max # of ATA devices */ #define MAX_TGT 16 #define MAX_LUN 8 -#if MAX_SCG >= 1000 +#if (MAX_SCG+MAX_ATA) >= 1000 error too many SCSI busses #endif @@ -991,7 +993,7 @@ for (t = 0; t < MAX_TGT; t++) { for (l = 0; l < MAX_LUN; l++) { /* - * XXX Remove the SG_GET_MAX_TRANSFER_LENGTH after the + * XXX Remove the SG_GET_MAX_TRANSFER_LENGTH after the * XXX SG_GET_RESERVED_SIZE call returns the real max DMA. */ #ifdef SG_GET_MAX_TRANSFER_LENGTH @@ -1395,8 +1397,8 @@ if (ret < 0) { sp->ux_errno = geterrno(); /* - * Check if SCSI command cound not be send at all. - * Linux usually returns EINVAL for an unknoen ioctl. + * Check if SCSI command could not be send at all. + * Linux usually returns EINVAL for an unknown ioctl. * In case somebody from the Linux kernel team learns that the * corect errno would be ENOTTY, we check for this errno too. */ @@ -1486,14 +1488,19 @@ to.tv_usec = 500000; __scg_times(scgp); - if (scgp->cmdstop->tv_sec < to.tv_sec || + if (scgp->cmdstop->tv_sec > to.tv_sec || (scgp->cmdstop->tv_sec == to.tv_sec && - scgp->cmdstop->tv_usec < to.tv_usec)) { + scgp->cmdstop->tv_usec > to.tv_usec)) { sp->ux_errno = 0; sp->error = SCG_TIMEOUT; /* a timeout */ } else { sp->error = SCG_RETRYABLE; + if (!scgp->silent) { + js_fprintf((FILE *)scgp->errfile, + "Unknown sg_io.host_status %X\n", + sg_io.host_status); + } } break; } @@ -1783,7 +1790,7 @@ if (scgp->verbose > 0 && scgp->debug > 0) { #ifdef SG_GET_BUFSIZE js_fprintf((FILE *)scgp->errfile, - "status: 0x%08X pack_len: %d, reply_len: %d pack_id: %d result: %d wn: %d gn: %d cdb_len: %d sense_len: %d sense[0]: %02X\n", +"status: 0x%08X pack_len: %d, reply_len: %d pack_id: %d result: %d wn: %d gn: %d cdb_len: %d sense_len: %d sense[0]: %02X\n", GETINT(sgp->hd.sg_cmd_status), GETINT(sgp->hd.pack_len), GETINT(sgp->hd.reply_len), diff -Nru cdrtools-2.01.01a33/libscg/scsi-mac-iokit.c cdrtools-3.02a09/libscg/scsi-mac-iokit.c --- cdrtools-2.01.01a33/libscg/scsi-mac-iokit.c 2007-04-25 16:50:18.000000000 +0000 +++ cdrtools-3.02a09/libscg/scsi-mac-iokit.c 2010-05-24 10:15:16.000000000 +0000 @@ -1,7 +1,7 @@ -/* @(#)scsi-mac-iokit.c 1.13 07/04/25 Copyright 1997,2001-2007 J. Schilling */ +/* @(#)scsi-mac-iokit.c 1.17 10/05/24 Copyright 1997,2001-2010 J. Schilling */ #ifndef lint static char __sccsid[] = - "@(#)scsi-mac-iokit.c 1.13 07/04/25 Copyright 1997,2001-2007 J. Schilling"; + "@(#)scsi-mac-iokit.c 1.17 10/05/24 Copyright 1997,2001-2010 J. Schilling"; #endif /* * Interface to the Darwin IOKit SCSI drivers @@ -19,7 +19,7 @@ * Choose your name instead of "schily" and make clear that the version * string is related to a modified source. * - * Copyright (c) 1997,2001-2007 J. Schilling + * Copyright (c) 1997,2001-2010 J. Schilling */ /* * The contents of this file are subject to the terms of the @@ -48,7 +48,7 @@ * Choose your name instead of "schily" and make clear that the version * string is related to a modified source. */ -LOCAL char _scg_trans_version[] = "scsi-mac-iokit.c-1.13"; /* The version for this transport */ +LOCAL char _scg_trans_version[] = "scsi-mac-iokit.c-1.17"; /* The version for this transport */ #define MAX_SCG 16 /* Max # of SCSI controllers */ #define MAX_TGT 16 @@ -59,12 +59,29 @@ #include #include #include -#include +/* + * IOKit/scsi-commands/ (being a symlink at least between Panther and Leopard) + * did disappear on "Snow Leopard" but we do not know whether IOKit/scsi/ + * exist before. I do not like to create an autoconf test for the file, + * please report if you have problems on older Mac OS X releases. + */ +/*#include */ +#include #include -struct scg_local { +struct scg_if { MMCDeviceInterface **mmcDeviceInterface; SCSITaskDeviceInterface **scsiTaskDeviceInterface; + int flags; +}; + +/* + * Defines for flags + */ +#define NO_ACCESS 0x01 + +struct scg_local { + struct scg_if scg_if[MAX_SCG][MAX_TGT]; mach_port_t masterPort; }; #define scglocal(p) ((struct scg_local *)((p)->local)) @@ -74,6 +91,10 @@ #define MAX_DMA_NEXT (64*1024) /* Check if this is not too big */ #endif +LOCAL int iokit_open __PR((SCSI *scgp, BOOL bydev, char *device, int busno, int tgt, int tlun)); +LOCAL void iokit_warn __PR((SCSI *scgp)); + + /* * Return version information for the low level SCSI transport code. * This has been introduced to make it easier to trace down problems @@ -108,11 +129,18 @@ FILE *f; { __scg_help(f, "SCSITaskDeviceInterface", "Apple SCSI", - "", "Mac Prom device name", "IOCompactDiscServices/0 or IODVDServices/0", + "", "Mac Prom device name", "IOCompactDiscServices/0 or IODVDServices/0 or IOBDServices/0", FALSE, FALSE); return (0); } +LOCAL char *devnames[] = { + "IOCompactDiscServices", + "IODVDServices", + "IOBDServices", + 0 +}; +#define NDEVS ((int)(sizeof (devnames) / sizeof (devnames[0]) - 1)) /* * Valid Device names: @@ -129,6 +157,112 @@ SCSI *scgp; char *device; { + int busno = scg_scsibus(scgp); + int tgt = scg_target(scgp); + int tlun = scg_lun(scgp); + int b; + int t; + int nopen = 0; + int ret; + + if (busno >= MAX_SCG || busno >= NDEVS || tgt >= MAX_TGT || tlun >= MAX_LUN) { + errno = EINVAL; + if (scgp->errstr) { + js_snprintf(scgp->errstr, SCSI_ERRSTR_SIZE, + "Illegal value for busno, target or lun '%d,%d,%d'", + busno, tgt, tlun); + } + return (-1); + } + + if (scgp->local == NULL) { + scgp->local = malloc(sizeof (struct scg_local)); + if (scgp->local == NULL) { + if (scgp->errstr) + js_snprintf(scgp->errstr, SCSI_ERRSTR_SIZE, "No memory for scg_local"); + return (0); + } + for (b = 0; b < MAX_SCG; b++) { + for (t = 0; t < MAX_TGT; t++) { + scglocal(scgp)->scg_if[b][t].mmcDeviceInterface = NULL; + scglocal(scgp)->scg_if[b][t].scsiTaskDeviceInterface = NULL; + scglocal(scgp)->scg_if[b][t].flags = 0; + } + } + } + + if ((device != NULL && *device != '\0') || (busno == -2 && tgt == -2)) + goto openbydev; + + if (busno >= 0 && tgt >= 0 && tlun >= 0) { + ret = iokit_open(scgp, FALSE, devnames[busno], busno, tgt, tlun); + if (ret == 1) + scg_settarget(scgp, busno, tgt, tlun); + else + scgo_close(scgp); + if (scgp->fd == -2) + iokit_warn(scgp); + return (ret); + } else { + int errsav = 0; + int exwarn = 0; + + for (b = 0; b < NDEVS; b++) { + for (t = 0; t < MAX_TGT; t++) { + ret = iokit_open(scgp, FALSE, devnames[b], b, t, 0); + if ((scgp->debug > 0 && ret > 0) || scgp->debug > 2) { + js_fprintf((FILE *)scgp->errfile, + "b %d t %d ret %d fd %d\n", + b, t, ret, scgp->fd); + } + if (ret == 1) + nopen++; + if (exwarn == 0 && scgp->fd == -2) { + iokit_warn(scgp); + exwarn++; + } + } + } + seterrno(errsav); + } +openbydev: + if (nopen == 0) { + if (device == NULL || device[0] == '\0') + return (0); + + ret = iokit_open(scgp, TRUE, device, 0, 0, 0); + if (ret == 1) + nopen++; + if (scgp->fd == -2) + iokit_warn(scgp); + } + if (nopen <= 0) + scgo_close(scgp); + return (nopen); +} + +LOCAL void +iokit_warn(scgp) + SCSI *scgp; +{ + js_fprintf((FILE *)scgp->errfile, "\nWarning, 'diskarbitrationd' is running and does not allow us to\n"); + js_fprintf((FILE *)scgp->errfile, "send SCSI commands to the drive.\n"); + js_fprintf((FILE *)scgp->errfile, "To allow us to send SCSI commands, do the following:\n"); + js_fprintf((FILE *)scgp->errfile, "Eject all removable media, then call as root:\n"); + js_fprintf((FILE *)scgp->errfile, " kill -STOP `(ps -ef | grep diskarbitrationd | awk '{ print $2 }')`\n"); + js_fprintf((FILE *)scgp->errfile, "then re-run the failed command. To continue 'diskarbitrationd' call as root:\n"); + js_fprintf((FILE *)scgp->errfile, " kill -CONT `(ps -ef | grep diskarbitrationd | awk '{ print $2 }')`\n\n"); +} + +LOCAL int +iokit_open(scgp, bydev, device, busno, tgt, tlun) + SCSI *scgp; + BOOL bydev; + char *device; + int busno; + int tgt; + int tlun; +{ mach_port_t masterPort = 0; io_iterator_t scsiObjectIterator = 0; IOReturn ioReturnValue = kIOReturnSuccess; @@ -140,41 +274,52 @@ SCSITaskDeviceInterface **scsiTaskDeviceInterface = NULL; SInt32 score = 0; int err = -1; - char *realdevice = NULL, *tmp; - int driveidx = 1, idx = 1; - - if (device == NULL) { - js_snprintf(scgp->errstr, SCSI_ERRSTR_SIZE, - "Please specify a device name (e.g. IOCompactDiscServices/0)"); - goto out; - } + char *realdevice = device; + char *tmp; + int idx; - realdevice = tmp = strdup(device); - tmp = strchr(tmp, '/'); - if (tmp != NULL) { - *tmp++ = '\0'; - driveidx = atoi(tmp); - } + if (scgp->local == NULL) + return (err); - if (scgp->local == NULL) { - scgp->local = malloc(sizeof (struct scg_local)); - if (scgp->local == NULL) - goto out; + if (bydev) { + realdevice = tmp = strdup(device); + if (realdevice == NULL) + return (err); + tmp = strchr(tmp, '/'); + if (tmp != NULL) { + *tmp++ = '\0'; + tgt = atoi(tmp); + } } - ioReturnValue = IOMasterPort(bootstrap_port, &masterPort); - - if (ioReturnValue != kIOReturnSuccess) { - js_snprintf(scgp->errstr, SCSI_ERRSTR_SIZE, - "Couldn't get a master IOKit port. Error %d", - ioReturnValue); - goto out; + /* + * Get master port handle + * The master port handle is deallocated in scgo_close() + */ + masterPort = scglocal(scgp)->masterPort; + if (!masterPort) { + ioReturnValue = IOMasterPort(bootstrap_port, &masterPort); + + if (ioReturnValue != kIOReturnSuccess) { + js_snprintf(scgp->errstr, SCSI_ERRSTR_SIZE, + "Couldn't get a master IOKit port. Error %d", + ioReturnValue); + if (bydev) + free(realdevice); + return (err); + } + scglocal(scgp)->masterPort = masterPort; } + /* + * Get Service dict for "IOCompactDiscServices" or "IODVDServices" + * or "IODBDServices" + */ dict = IOServiceMatching(realdevice); if (dict == NULL) { js_snprintf(scgp->errstr, SCSI_ERRSTR_SIZE, - "Couldn't create dictionary for searching"); + "Couldn't create dictionary for searching '%s'.", + realdevice); goto out; } @@ -185,16 +330,13 @@ if (scsiObjectIterator == 0 || (ioReturnValue != kIOReturnSuccess)) { js_snprintf(scgp->errstr, SCSI_ERRSTR_SIZE, - "No matching device %s found.", device); + "No matching device %s/%d found.", + realdevice, tgt); goto out; } - if (driveidx <= 0) - driveidx = 1; - - idx = 1; - while ((scsiDevice = IOIteratorNext(scsiObjectIterator)) != 0) { - if (idx == driveidx) + for (idx = 0; (scsiDevice = IOIteratorNext(scsiObjectIterator)) != 0; idx++) { + if (idx == tgt) break; IOObjectRelease(scsiDevice); scsiDevice = 0; @@ -203,7 +345,8 @@ if (scsiDevice == 0) { js_snprintf(scgp->errstr, SCSI_ERRSTR_SIZE, - "No matching device found. Iterator failed."); + "No matching device %s/%d found. Iterator failed.", + realdevice, tgt); goto out; } @@ -269,6 +412,8 @@ if (ioReturnValue != kIOReturnSuccess) { js_snprintf(scgp->errstr, SCSI_ERRSTR_SIZE, "Unable to get exclusive access to device"); + scglocal(scgp)->scg_if[busno][tgt].flags |= NO_ACCESS; + scg_settarget(scgp, busno, tgt, tlun); goto out; } @@ -276,10 +421,10 @@ (*mmcDeviceInterface)->AddRef(mmcDeviceInterface); } (*scsiTaskDeviceInterface)->AddRef(scsiTaskDeviceInterface); - scglocal(scgp)->mmcDeviceInterface = mmcDeviceInterface; - scglocal(scgp)->scsiTaskDeviceInterface = scsiTaskDeviceInterface; scglocal(scgp)->masterPort = masterPort; - scg_settarget(scgp, 0, 0, 0); + scglocal(scgp)->scg_if[busno][tgt].mmcDeviceInterface = mmcDeviceInterface; + scglocal(scgp)->scg_if[busno][tgt].scsiTaskDeviceInterface = scsiTaskDeviceInterface; + scg_settarget(scgp, busno, tgt, tlun); err = 1; out: @@ -299,22 +444,11 @@ IOObjectRelease(scsiObjectIterator); } - if (err < 0) { - if (scgp->local) { - free(scgp->local); - scgp->local = NULL; - } - - if (masterPort) { - mach_port_deallocate(mach_task_self(), masterPort); - } - } - if (dict != NULL) { CFRelease(dict); } - if (realdevice != NULL) { + if (bydev) { free(realdevice); } return (err); @@ -324,20 +458,28 @@ scgo_close(scgp) SCSI *scgp; { + int b; + int t; SCSITaskDeviceInterface **sc; MMCDeviceInterface **mmc; if (scgp->local == NULL) return (-1); - sc = scglocal(scgp)->scsiTaskDeviceInterface; - (*sc)->ReleaseExclusiveAccess(sc); - (*sc)->Release(sc); - scglocal(scgp)->scsiTaskDeviceInterface = NULL; - - mmc = scglocal(scgp)->mmcDeviceInterface; - if (mmc != NULL) - (*mmc)->Release(mmc); + for (b = 0; b < MAX_SCG; b++) { + for (t = 0; t < MAX_TGT; t++) { + sc = scglocal(scgp)->scg_if[b][t].scsiTaskDeviceInterface; + if (sc) { + (*sc)->ReleaseExclusiveAccess(sc); + (*sc)->Release(sc); + } + scglocal(scgp)->scg_if[b][t].scsiTaskDeviceInterface = NULL; + mmc = scglocal(scgp)->scg_if[b][t].mmcDeviceInterface; + if (mmc != NULL) + (*mmc)->Release(mmc); + scglocal(scgp)->scg_if[b][t].mmcDeviceInterface = NULL; + } + } mach_port_deallocate(mach_task_self(), scglocal(scgp)->masterPort); @@ -393,7 +535,7 @@ scgo_numbus(scgp) SCSI *scgp; { - return (1); + return (MAX_SCG); } LOCAL BOOL @@ -401,8 +543,15 @@ SCSI *scgp; int busno; { - if (busno == 0) - return (TRUE); + register int t; + + if (scgp->local == NULL || busno < 0 || busno >= MAX_SCG) + return (FALSE); + + for (t = 0; t < MAX_TGT; t++) { + if (scglocal(scgp)->scg_if[busno][t].scsiTaskDeviceInterface != NULL) + return (TRUE); + } return (FALSE); } @@ -413,6 +562,13 @@ int tgt; int tlun; { + if (scglocal(scgp) == NULL) + return (-1); + + if (scglocal(scgp)->scg_if[busno][tgt].flags & NO_ACCESS) + return (-2); + if (scglocal(scgp)->scg_if[busno][tgt].scsiTaskDeviceInterface != NULL) + return (0); return (-1); } @@ -454,7 +610,11 @@ struct scg_cmd *sp = scgp->scmd; SCSITaskDeviceInterface **sc = NULL; SCSITaskInterface **cmd = NULL; +#if defined(__LP64__) /* Ugly differences for LP64 */ + IOAddressRange iov; +#else IOVirtualRange iov; +#endif SCSI_Sense_Data senseData; SCSITaskStatus status; UInt64 bytesTransferred; @@ -462,10 +622,14 @@ int ret = 0; if (scgp->local == NULL) { - return (-1); + sp->error = SCG_FATAL; + return (0); + } + sc = scglocal(scgp)->scg_if[scg_scsibus(scgp)][scg_target(scgp)].scsiTaskDeviceInterface; + if (sc == NULL) { + sp->error = SCG_FATAL; + return (0); } - - sc = scglocal(scgp)->scsiTaskDeviceInterface; cmd = (*sc)->CreateSCSITask(sc); if (cmd == NULL) { @@ -479,7 +643,11 @@ } +#if defined(__LP64__) /* Ugly differences for LP64 */ + iov.address = (mach_vm_address_t) sp->addr; +#else iov.address = (IOVirtualAddress) sp->addr; +#endif iov.length = sp->size; ioReturnValue = (*cmd)->SetCommandDescriptorBlock(cmd, diff -Nru cdrtools-2.01.01a33/libscg/scsiopen.c cdrtools-3.02a09/libscg/scsiopen.c --- cdrtools-2.01.01a33/libscg/scsiopen.c 2006-09-26 11:40:27.000000000 +0000 +++ cdrtools-3.02a09/libscg/scsiopen.c 2009-07-10 22:38:16.000000000 +0000 @@ -1,12 +1,13 @@ -/* @(#)scsiopen.c 1.97 06/09/26 Copyright 1995,2000 J. Schilling */ +/* @(#)scsiopen.c 1.101 09/07/11 Copyright 1995-2009 J. Schilling */ +#include #ifndef lint -static char sccsid[] = - "@(#)scsiopen.c 1.97 06/09/26 Copyright 1995,2000 J. Schilling"; +static UConst char sccsid[] = + "@(#)scsiopen.c 1.101 09/07/11 Copyright 1995-2009 J. Schilling"; #endif /* * SCSI command functions for cdrecord * - * Copyright (c) 1995,2000 J. Schilling + * Copyright (c) 1995-2009 J. Schilling */ /* * The contents of this file are subject to the terms of the @@ -40,9 +41,8 @@ * values to scg_scsibus() scg_target() and scg_lun() * is scg_settarget(). */ -#include -#include +#include #include #include #include @@ -103,7 +103,7 @@ int debug; int be_verbose; { - char devname[256]; + char sdevname[256]; char *devp = NULL; char *sdev = NULL; int x1; @@ -124,7 +124,7 @@ scgp->debug = debug; scgp->overbose = be_verbose; - devname[0] = '\0'; + sdevname[0] = '\0'; if (scsidev != NULL && scsidev[0] != '\0') { sdev = scsidev; if ((strncmp(scsidev, "HELP", 4) == 0) || @@ -141,8 +141,8 @@ * We must send the complete device spec to the remote * site to allow parsing on both sites. */ - strncpy(devname, scsidev, sizeof (devname)-1); - devname[sizeof (devname)-1] = '\0'; + strncpy(sdevname, scsidev, sizeof (sdevname)-1); + sdevname[sizeof (sdevname)-1] = '\0'; if (sdev[6] == '(' || sdev[6] == ':') sdev = strchr(sdev, ':'); else @@ -154,7 +154,7 @@ * Give it a chance with a standard parsing. */ sdev = scsidev; - devname[0] = '\0'; + sdevname[0] = '\0'; } else { /* * Now try to go past user@host spec. @@ -175,10 +175,10 @@ /* We may come here too with 'USCSI' */ n = -1; lun = -2; /* Lun must be known */ - if (devname[0] == '\0') { - strncpy(devname, scsidev, - sizeof (devname)-1); - devname[sizeof (devname)-1] = '\0'; + if (sdevname[0] == '\0') { + strncpy(sdevname, scsidev, + sizeof (sdevname)-1); + sdevname[sizeof (sdevname)-1] = '\0'; } } else { /* Basic notation form: 'bus,tgt,lun' */ @@ -187,15 +187,15 @@ } else { /* Notation form: 'devname:bus,tgt,lun'/'devname:@' */ /* We may come here too with 'USCSI:' */ - if (devname[0] == '\0') { + if (sdevname[0] == '\0') { /* * Copy over the part before the ':' */ x1 = devp - scsidev; - if (x1 >= (int)sizeof (devname)) - x1 = sizeof (devname)-1; - strncpy(devname, scsidev, x1); - devname[x1] = '\0'; + if (x1 >= (int)sizeof (sdevname)) + x1 = sizeof (sdevname)-1; + strncpy(sdevname, scsidev, x1); + sdevname[x1] = '\0'; } devp++; /* Check for a notation in the form 'devname:@' */ @@ -226,9 +226,9 @@ devp = NULL; } else if (strchr(sdev, ',') == NULL) { /* We may come here with 'ATAPI:/dev/hdc' */ - strncpy(devname, scsidev, - sizeof (devname)-1); - devname[sizeof (devname)-1] = '\0'; + strncpy(sdevname, scsidev, + sizeof (sdevname)-1); + sdevname[sizeof (sdevname)-1] = '\0'; n = -1; lun = -2; /* Lun must be known */ /* @@ -262,17 +262,17 @@ } if (be_verbose && scsidev != NULL) { js_fprintf(stderr, "scsidev: '%s'\n", scsidev); - if (devname[0] != '\0') - js_fprintf(stderr, "devname: '%s'\n", devname); + if (sdevname[0] != '\0') + js_fprintf(stderr, "devname: '%s'\n", sdevname); js_fprintf(stderr, "scsibus: %d target: %d lun: %d\n", scg_scsibus(scgp), scg_target(scgp), scg_lun(scgp)); } if (debug > 0) { js_fprintf(stderr, "scg__open(%s) %d,%d,%d\n", - devname, + sdevname, scg_scsibus(scgp), scg_target(scgp), scg_lun(scgp)); } - if (scg__open(scgp, devname) <= 0) { + if (scg__open(scgp, sdevname) <= 0) { if (errs && scgp->errstr) js_snprintf(errs, slen, "%s", scgp->errstr); scg_sfree(scgp); diff -Nru cdrtools-2.01.01a33/libscg/scsi-openserver.c cdrtools-3.02a09/libscg/scsi-openserver.c --- cdrtools-2.01.01a33/libscg/scsi-openserver.c 2006-11-26 17:12:57.000000000 +0000 +++ cdrtools-3.02a09/libscg/scsi-openserver.c 2010-05-24 14:02:59.000000000 +0000 @@ -1,7 +1,7 @@ -/* @(#)scsi-openserver.c 1.32 06/11/26 Copyright 1998 J. Schilling, Santa Cruz Operation */ +/* @(#)scsi-openserver.c 1.35 10/05/24 Copyright 1998-2010 J. Schilling, Copyright 1998,2000 Santa Cruz Operation */ #ifndef lint static char __sccsid[] = - "@(#)scsi-openserver.c 1.32 06/11/26 Copyright 1998 J. Schilling, Santa Cruz Operation"; + "@(#)scsi-openserver.c 1.35 10/05/24 Copyright 1998-2010 J. Schilling, Copyright 1998,2000 Santa Cruz Operation"; #endif /* * Interface for the SCO SCSI implementation. @@ -12,7 +12,8 @@ * Choose your name instead of "schily" and make clear that the version * string is related to a modified source. * - * Copyright (c) 1998 J. Schilling, Santa Cruz Operation + * Copyright (c) 1998-2010 J. Schilling + * Copyright (c) 1998,2000 Santa Cruz Operation */ /* * The contents of this file are subject to the terms of the @@ -45,7 +46,7 @@ * Choose your name instead of "schily" and make clear that the version * string is related to a modified source. */ -LOCAL char _scg_trans_version[] = "scsi-openserver.c-1.32"; /* The version for this transport*/ +LOCAL char _scg_trans_version[] = "scsi-openserver.c-1.35"; /* The version for this transport*/ #define MAX_SCG 16 /* Max # of cdrom devices */ #define MAX_TGT 16 /* Not really needed */ @@ -126,7 +127,7 @@ * By default we will use the SCSIUSERCMD2 ioctl(), in order to execute * the SCSIUSERCMD ioctl() instead set the environment variable * LIBSCG_SCSIUSERCMD to any value. Using the olderSCSIUSERCMD ioctl() will - * if the SCSI commands returns a CHECK CONDITION status, run a seperate + * if the SCSI commands returns a CHECK CONDITION status, run a separate * REQUEST_SENSE command immediately. But we need to remember that in a * multi-tasking environment, there might be other code which has accessed * the device in between these two steps and therefore the sense code @@ -993,9 +994,13 @@ if (scgp->debug > 0) { if (errno != 0) - js_fprintf((FILE *)scgp->errfile, "ux_errno: %d (%s) \n", sp->ux_errno, strerror(sp->ux_errno)); + js_fprintf((FILE *)scgp->errfile, + "ux_errno: %d (%s) \n", + sp->ux_errno, strerror(sp->ux_errno)); if (sp->u_scb.cmd_scb[0] != 0) - js_fprintf((FILE *)scgp->errfile, "tgt_stat: %d \n", sp->u_scb.cmd_scb[0]); + js_fprintf((FILE *)scgp->errfile, + "tgt_stat: %d \n", + sp->u_scb.cmd_scb[0]); } break; @@ -1034,9 +1039,13 @@ if (scgp->debug > 0) { if (errno != 0) - js_fprintf((FILE *)scgp->errfile, "ux_errno: %d (%s) \n", sp->ux_errno, strerror(sp->ux_errno)); + js_fprintf((FILE *)scgp->errfile, + "ux_errno: %d (%s) \n", + sp->ux_errno, strerror(sp->ux_errno)); if (sp->u_scb.cmd_scb[0] != 0) - js_fprintf((FILE *)scgp->errfile, "tgt_stat: %d \n", sp->u_scb.cmd_scb[0]); + js_fprintf((FILE *)scgp->errfile, + "tgt_stat: %d \n", + sp->u_scb.cmd_scb[0]); } break; diff -Nru cdrtools-2.01.01a33/libscg/scsiopts.c cdrtools-3.02a09/libscg/scsiopts.c --- cdrtools-2.01.01a33/libscg/scsiopts.c 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/libscg/scsiopts.c 2016-01-21 22:22:39.000000000 +0000 @@ -0,0 +1,106 @@ +/* @(#)scsiopts.c 1.1 16/01/21 Copyright 2016 J. Schilling */ +#include +#ifndef lint +static UConst char sccsid[] = + "@(#)scsiopts.c 1.1 16/01/21 Copyright 2016 J. Schilling"; +#endif +/* + * SCSI option parser + * + * Copyright (c) 2016 J. Schilling + */ +/* + * The contents of this file are subject to the terms of the + * Common Development and Distribution License, Version 1.0 only + * (the "License"). You may not use this file except in compliance + * with the License. + * + * See the file CDDL.Schily.txt in this distribution for details. + * A copy of the CDDL is also available via the Internet at + * http://www.opensource.org/licenses/cddl1.txt + * + * The following exceptions apply: + * CDDL §3.6 needs to be replaced by: "You may create a Larger Work by + * combining Covered Software with other code if all other code is governed by + * the terms of a license that is OSI approved (see www.opensource.org) and + * you may distribute the Larger Work as a single product. In such a case, + * You must make sure the requirements of this License are fulfilled for + * the Covered Software." + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file CDDL.Schily.txt from this distribution. + */ + +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include + +#include + +EXPORT int scg_opts __PR((SCSI *scgp, const char *optstr)); +LOCAL void scg_optusage __PR((void)); + +EXPORT int +scg_opts(scgp, optstr) + SCSI *scgp; + const char *optstr; +{ + char *ep; + char *np; + int optlen; + int flags; + BOOL not = FALSE; + + flags = scgp->flags & SCGF_USER_FLAGS; + while (*optstr) { + if ((ep = strchr(optstr, ',')) != NULL) { + optlen = ep - optstr; + np = ep + 1; + } else { + optlen = strlen(optstr); + np = (char *)optstr + optlen; + } + if (optstr[0] == '!') { + optstr++; + optlen--; + not = TRUE; + } + if (strncmp(optstr, "not", optlen) == 0 || + strncmp(optstr, "!", optlen) == 0) { + not = TRUE; + } else if (strncmp(optstr, "ignore-resid", optlen) == 0) { + flags |= SCGF_IGN_RESID; + } else if (strncmp(optstr, "disable", optlen) == 0) { + flags = 0; + } else if (strncmp(optstr, "help", optlen) == 0) { + scg_optusage(); + return (0); + } else { + errmsgno(EX_BAD, "Unknown option '%s'.\n", optstr); + scg_optusage(); + return (-1); + } + optstr = np; + } + if (not) + flags = (~flags) & SCGF_USER_FLAGS; + scgp->flags |= flags; + return (1); +} + +LOCAL void +scg_optusage() +{ + error("scg options:\n"); + error("help print this help\n"); + error("ignore-resid ignore DMA residual count (needed for broken kernel drivers)\n"); +} diff -Nru cdrtools-2.01.01a33/libscg/scsi-osf.c cdrtools-3.02a09/libscg/scsi-osf.c --- cdrtools-2.01.01a33/libscg/scsi-osf.c 2006-11-26 17:12:57.000000000 +0000 +++ cdrtools-3.02a09/libscg/scsi-osf.c 2009-06-30 18:34:03.000000000 +0000 @@ -1,7 +1,7 @@ -/* @(#)scsi-osf.c 1.27 06/11/26 Copyright 1998 J. Schilling */ +/* @(#)scsi-osf.c 1.28 09/06/30 Copyright 1998-2009 J. Schilling */ #ifndef lint static char __sccsid[] = - "@(#)scsi-osf.c 1.27 06/11/26 Copyright 1998 J. Schilling"; + "@(#)scsi-osf.c 1.28 09/06/30 Copyright 1998-2009 J. Schilling"; #endif /* * Interface for Digital UNIX (OSF/1 generic SCSI implementation (/dev/cam). @@ -16,7 +16,7 @@ * Choose your name instead of "schily" and make clear that the version * string is related to a modified source. * - * Copyright (c) 1998 J. Schilling + * Copyright (c) 1998-2009 J. Schilling */ /* * The contents of this file are subject to the terms of the @@ -38,7 +38,7 @@ * file and include the License file CDDL.Schily.txt from this distribution. */ -#include +#include #include #include #include @@ -50,7 +50,7 @@ * Choose your name instead of "schily" and make clear that the version * string is related to a modified source. */ -LOCAL char _scg_trans_version[] = "scsi-osf.c-1.27"; /* The version for this transport*/ +LOCAL char _scg_trans_version[] = "scsi-osf.c-1.28"; /* The version for this transport*/ #define MAX_SCG 16 /* Max # of SCSI controllers */ #define MAX_TGT 16 diff -Nru cdrtools-2.01.01a33/libscg/scsi-qnx.c cdrtools-3.02a09/libscg/scsi-qnx.c --- cdrtools-2.01.01a33/libscg/scsi-qnx.c 2006-11-26 17:12:58.000000000 +0000 +++ cdrtools-3.02a09/libscg/scsi-qnx.c 2009-06-30 18:34:03.000000000 +0000 @@ -1,7 +1,7 @@ -/* @(#)scsi-qnx.c 1.4 06/11/26 Copyright 1998-2003 J. Schilling */ +/* @(#)scsi-qnx.c 1.5 09/06/30 Copyright 1998-2009 J. Schilling */ #ifndef lint static char __sccsid[] = - "@(#)scsi-qnx.c 1.4 06/11/26 Copyright 1998-2003 J. Schilling"; + "@(#)scsi-qnx.c 1.5 09/06/30 Copyright 1998-2009 J. Schilling"; #endif /* * Interface for QNX (Neutrino generic SCSI implementation). @@ -14,7 +14,7 @@ * Choose your name instead of "schily" and make clear that the version * string is related to a modified source. * - * Copyright (c) 1998-2003 J. Schilling + * Copyright (c) 1998-2009 J. Schilling */ /* * The contents of this file are subject to the terms of the @@ -36,8 +36,8 @@ * file and include the License file CDDL.Schily.txt from this distribution. */ -#include -#include +#include +#include #include #include @@ -48,7 +48,7 @@ * Choose your name instead of "schily" and make clear that the version * string is related to a modified source. */ -LOCAL char _scg_trans_version[] = "scsi-qnx.c-1.4"; /* The version for this transport*/ +LOCAL char _scg_trans_version[] = "scsi-qnx.c-1.5"; /* The version for this transport*/ #define MAX_SCG 16 /* Max # of SCSI controllers */ #define MAX_TGT 16 diff -Nru cdrtools-2.01.01a33/libscg/scsi-sgi.c cdrtools-3.02a09/libscg/scsi-sgi.c --- cdrtools-2.01.01a33/libscg/scsi-sgi.c 2006-11-26 17:12:58.000000000 +0000 +++ cdrtools-3.02a09/libscg/scsi-sgi.c 2009-11-28 19:33:22.000000000 +0000 @@ -1,7 +1,7 @@ -/* @(#)scsi-sgi.c 1.37 06/11/26 Copyright 1997 J. Schilling */ +/* @(#)scsi-sgi.c 1.38 09/11/28 Copyright 1997 J. Schilling */ #ifndef lint static char __sccsid[] = - "@(#)scsi-sgi.c 1.37 06/11/26 Copyright 1997 J. Schilling"; + "@(#)scsi-sgi.c 1.38 09/11/28 Copyright 1997 J. Schilling"; #endif /* * Interface for the SGI generic SCSI implementation. @@ -49,11 +49,11 @@ * Choose your name instead of "schily" and make clear that the version * string is related to a modified source. */ -LOCAL char _scg_trans_version[] = "scsi-sgi.c-1.37"; /* The version for this transport*/ +LOCAL char _scg_trans_version[] = "scsi-sgi.c-1.38"; /* The version for this transport*/ #ifdef USE_DSLIB -struct dsreq * dsp = 0; +struct dsreq *dsp = 0; #define MAX_SCG 1 /* Max # of SCSI controllers */ #else @@ -386,9 +386,9 @@ __scg_times(scgp); if (sp->cdb.g0_cdb.cmd == SC_TEST_UNIT_READY && - scgp->cmdstop->tv_sec < to.tv_sec || + (scgp->cmdstop->tv_sec < to.tv_sec || (scgp->cmdstop->tv_sec == to.tv_sec && - scgp->cmdstop->tv_usec < to.tv_usec)) { + scgp->cmdstop->tv_usec < to.tv_usec))) { RET(dsp) = DSRT_NOSEL; return (-1); @@ -422,8 +422,6 @@ { struct scg_cmd *sp = scgp->scmd; int ret; - int i; - int amt = sp->cdb_len; int flags; #ifndef USE_DSLIB struct dsreq ds; diff -Nru cdrtools-2.01.01a33/libscg/scsi-sun.c cdrtools-3.02a09/libscg/scsi-sun.c --- cdrtools-2.01.01a33/libscg/scsi-sun.c 2007-07-07 12:56:40.000000000 +0000 +++ cdrtools-3.02a09/libscg/scsi-sun.c 2013-05-14 21:16:09.000000000 +0000 @@ -1,7 +1,7 @@ -/* @(#)scsi-sun.c 1.87 07/07/07 Copyright 1988,1995,2000-2004 J. Schilling */ +/* @(#)scsi-sun.c 1.90 13/05/14 Copyright 1988,1995,2000-2013 J. Schilling */ #ifndef lint static char __sccsid[] = - "@(#)scsi-sun.c 1.87 07/07/07 Copyright 1988,1995,2000-2004 J. Schilling"; + "@(#)scsi-sun.c 1.90 13/05/14 Copyright 1988,1995,2000-2013 J. Schilling"; #endif /* * SCSI user level command transport routines for @@ -13,7 +13,7 @@ * Choose your name instead of "schily" and make clear that the version * string is related to a modified source. * - * Copyright (c) 1988,1995,2000-2004 J. Schilling + * Copyright (c) 1988,1995,2000-2013 J. Schilling */ /* * The contents of this file are subject to the terms of the @@ -64,10 +64,10 @@ # define USE_USCSI #endif -LOCAL char _scg_trans_version[] = "scg-1.87"; /* The version for /dev/scg */ -LOCAL char _scg_utrans_version[] = "uscsi-1.87"; /* The version for USCSI */ - +LOCAL char _scg_trans_version[] = "scg-1.90"; /* The version for /dev/scg */ #ifdef USE_USCSI +LOCAL char _scg_utrans_version[] = "uscsi-1.90"; /* The version for USCSI */ + LOCAL int scgo_uhelp __PR((SCSI *scgp, FILE *f)); LOCAL int scgo_uopen __PR((SCSI *scgp, char *device)); LOCAL int scgo_volopen __PR((SCSI *scgp, char *devname)); @@ -295,11 +295,11 @@ long amt; { long maxdma = MAX_DMA_OTHER; -#if !defined(__i386_) && !defined(i386) +#if !defined(__i386) && !defined(i386) && !defined(__amd64) && !defined(__x86_64) int cpu_type; #endif -#if defined(__i386_) || defined(i386) +#if defined(__i386) || defined(i386) || defined(__amd64) || defined(__x86_64) maxdma = MAX_DMA_SUN386; #else cpu_type = gethostid() >> 24; @@ -902,7 +902,7 @@ } } -#if defined(__i386_) || defined(i386) +#if defined(__i386) || defined(i386) || defined(__amd64) || defined(__x86_64) /* * At least on Solaris 9 x86, DKIOCINFO returns a wrong value * for dki_maxtransfer if the target is an ATAPI drive. @@ -951,7 +951,7 @@ return (maxdma); } -#if defined(__i386_) || defined(i386) +#if defined(__i386) || defined(i386) || defined(__amd64) || defined(__x86_64) LOCAL int scgo_openide() { diff -Nru cdrtools-2.01.01a33/libscg/scsi-syllable.c cdrtools-3.02a09/libscg/scsi-syllable.c --- cdrtools-2.01.01a33/libscg/scsi-syllable.c 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/libscg/scsi-syllable.c 2012-12-02 22:09:06.000000000 +0000 @@ -0,0 +1,322 @@ +/* @(#)scsi-syllable.c 1.2 12/12/02 Copyright 1998-2012 J. Schilling, 2005 Kristian Van Der Vliet */ +#ifndef lint +static char sccsid[] = + "@(#)scsi-syllable.c 1.2 12/12/02 Copyright 1998-2012 J. Schilling, 2005 Kristian Van Der Vliet"; +#endif +/* + * Interface for the Syllable "SCSI" implementation. + * + * Current versions of Syllable do not implement a complete SCSI layer, + * but the ATAPI portion of the ATA driver has a simple interface that + * can be used to send raw ATAPI packets to the device. + * + * This drives can be seen only as a first hack. As it does not support + * SCSI bus scanning, there is not yet support for the auto-target + * feature os higher level applications. + * + * Warning: you may change this source, but if you do that + * you need to change the _scg_version and _scg_auth* string below. + * You may not return "schily" for an SCG_AUTHOR request anymore. + * Choose your name instead of "schily" and make clear that the version + * string is related to a modified source. + * + * Copyright (c) 1998-2012 J. Schilling + */ +/* + * The contents of this file are subject to the terms of the + * Common Development and Distribution License, Version 1.0 only + * (the "License"). You may not use this file except in compliance + * with the License. + * + * See the file CDDL.Schily.txt in this distribution for details. + * + * The following exceptions apply: + * CDDL §3.6 needs to be replaced by: "You may create a Larger Work by + * combining Covered Software with other code if all other code is governed by + * the terms of a license that is OSI approved (see www.opensource.org) and + * you may distribute the Larger Work as a single product. In such a case, + * You must make sure the requirements of this License are fulfilled for + * the Covered Software." + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file CDDL.Schily.txt from this distribution. + */ + +/* + * Warning: you may change this source, but if you do that + * you need to change the _scg_version and _scg_auth* string below. + * You may not return "schily" for an SCG_AUTHOR request anymore. + * Choose your name instead of "schily" and make clear that the version + * string is related to a modified source. + */ +LOCAL char _scg_trans_version[] = "scsi-syllable.c-1.2"; /* The version for this transport */ + +#include +#include +#include +#include +#include +#ifdef __PYRO__ /* Pyro */ +#include +#include +#else /* Syllable and AtheOS */ +#include +#include +#endif + +#define MAX_SCG 16 /* Max # of SCSI controllers */ + +struct scg_local { + int fd; +}; + +#define scglocal(p) ((struct scg_local *)((p)->local)) + +/* + * Return version information for the low level SCSI transport code. + * This has been introduced to make it easier to trace down problems + * in applications. + */ +LOCAL char * +scgo_version(scgp, what) + SCSI *scgp; + int what; +{ + if (scgp != (SCSI *)0) { + switch (what) { + + case SCG_VERSION: + return (_scg_trans_version); + case SCG_AUTHOR: + return ("vanders"); + case SCG_SCCS_ID: + return (__sccsid); + } + } + return ((char *)0); +} + +LOCAL int +scgo_help(scgp, f) + SCSI *scgp; + FILE *f; +{ + __scg_help(f, "ATA", "ATA Packet SCSI transport", + "ATAPI:", "device", "/dev/disk/ata/cdc/raw", FALSE, TRUE); + return (0); +} + +LOCAL int +scgo_open(scgp, device) + SCSI *scgp; + char *device; +{ + int fd; + + if (device == NULL || *device == '\0') { + errno = EINVAL; + if (scgp->errstr) + js_snprintf(scgp->errstr, SCSI_ERRSTR_SIZE, + "'devname' must be specified on this OS"); + return (-1); + } + + if (scgp->local == NULL) { + scgp->local = malloc(sizeof (struct scg_local)); + if (scgp->local == NULL) + return (0); + scglocal(scgp)->fd = -1; + } + + if (scglocal(scgp)->fd != -1) /* multiple open? */ + return (1); + + if ((scglocal(scgp)->fd = open(device, O_RDONLY, 0)) < 0) { + if (scgp->errstr) + js_snprintf(scgp->errstr, SCSI_ERRSTR_SIZE, + "Cannot open '%s'", device); + return (-1); + } + + scg_settarget(scgp, 0, 0, 0); + + return (1); +} + +LOCAL int +scgo_close(scgp) + SCSI *scgp; +{ + if (scgp->local == NULL) + return (-1); + + if (scglocal(scgp)->fd >= 0) + close(scglocal(scgp)->fd); + scglocal(scgp)->fd = -1; + return (0); +} + +LOCAL long +scgo_maxdma(scgp, amt) + SCSI *scgp; + long amt; +{ + return (256*1024); +} + +LOCAL void * +scgo_getbuf(scgp, amt) + SCSI *scgp; + long amt; +{ + if (scgp->debug > 0) { + js_fprintf((FILE *)scgp->errfile, + "scgo_getbuf: %ld bytes\n", amt); + } + scgp->bufbase = malloc((size_t)(amt)); + return (scgp->bufbase); +} + +LOCAL void +scgo_freebuf(scgp) + SCSI *scgp; +{ + if (scgp->bufbase) + free(scgp->bufbase); + scgp->bufbase = NULL; +} + +LOCAL int +scgo_numbus(scgp) + SCSI *scgp; +{ + return (MAX_SCG); +} + +LOCAL BOOL +scgo_havebus(scgp, busno) + SCSI *scgp; + int busno; +{ + return (TRUE); +} + +LOCAL int +scgo_fileno(scgp, busno, tgt, tlun) + SCSI *scgp; + int busno; + int tgt; + int tlun; +{ + if (scgp->local == NULL) + return (-1); + + return ((busno < 0 || busno >= MAX_SCG) ? -1 : scglocal(scgp)->fd); +} + +LOCAL int +scgo_initiator_id(scgp) + SCSI *scgp; +{ + return (-1); +} + +LOCAL int +scgo_isatapi(scgp) + SCSI *scgp; +{ + return (TRUE); +} + +LOCAL int +scgo_reset(scgp, what) + SCSI *scgp; + int what; +{ + errno = EINVAL; + return (-1); +} + +LOCAL int +scgo_send(scgp) + SCSI *scgp; +{ + struct scg_cmd *sp = scgp->scmd; + int ret; + cdrom_packet_cmd_s cmd; + + if (scgp->fd < 0) { + sp->error = SCG_FATAL; + return (-1); + } + + /* + * As long as we only support ATAPI, we limit the SCSI CDB size to 12. + */ + if (sp->cdb_len > 12) { + if (scgp->debug > 0) + error("sp->cdb_len > 12!\n"); + sp->error = SCG_FATAL; + sp->ux_errno = EIO; + return (0); + } + + /* initialize */ + fillbytes((caddr_t) & cmd, sizeof (cmd), '\0'); + fillbytes((caddr_t) & sp->u_sense.cmd_sense, + sizeof (sp->u_sense.cmd_sense), '\0'); + + memcpy(cmd.nCommand, &(sp->cdb), sp->cdb_len); + cmd.nCommandLength = sp->cdb_len; + cmd.pnData = (uint8 *)sp->addr; + cmd.nDataLength = sp->size; + cmd.pnSense = (uint8 *)sp->u_sense.cmd_sense; + cmd.nSenseLength = sp->sense_len; + cmd.nFlags = 0; + + if (sp->size > 0) { + if (sp->flags & SCG_RECV_DATA) + cmd.nDirection = READ; + else + cmd.nDirection = WRITE; + } else { + cmd.nDirection = NO_DATA; + } + + if (scgp->debug > 0) { + error("SEND(%d): cmd %02x, cdb = %d, data = %d, sense = %d\n", + scgp->fd, cmd.nCommand[0], cmd.nCommandLength, + cmd.nDataLength, cmd.nSenseLength); + } + ret = ioctl(scgp->fd, CD_PACKET_COMMAND, &cmd, sizeof (cmd)); + if (ret < 0) + sp->ux_errno = geterrno(); + + if (ret < 0 && scgp->debug > 4) { + js_fprintf((FILE *) scgp->errfile, + "ioctl(CD_PACKET_COMMAND) ret: %d\n", ret); + } + + if (ret < 0 && cmd.nError) { + sp->u_scb.cmd_scb[0] = ST_CHK_COND; + if (scgp->debug > 0) + error("result: scsi %02x\n", cmd.nError); + + switch (cmd.nError) { + + case SC_UNIT_ATTENTION: + case SC_NOT_READY: + sp->error = SCG_RETRYABLE; /* may be BUS_BUSY */ + sp->u_scb.cmd_scb[0] |= ST_BUSY; + break; + case SC_ILLEGAL_REQUEST: + break; + default: + break; + } + } else { + sp->u_scb.cmd_scb[0] = 0x00; + } + + return (0); +} diff -Nru cdrtools-2.01.01a33/libscg/scsitransp.c cdrtools-3.02a09/libscg/scsitransp.c --- cdrtools-2.01.01a33/libscg/scsitransp.c 2007-07-07 12:55:33.000000000 +0000 +++ cdrtools-3.02a09/libscg/scsitransp.c 2016-01-21 22:22:14.000000000 +0000 @@ -1,7 +1,7 @@ -/* @(#)scsitransp.c 1.96 07/07/07 Copyright 1988,1995,2000-2004 J. Schilling */ +/* @(#)scsitransp.c 1.100 16/01/21 Copyright 1988,1995,2000-2016 J. Schilling */ /*#ifndef lint*/ static char sccsid[] = - "@(#)scsitransp.c 1.96 07/07/07 Copyright 1988,1995,2000-2004 J. Schilling"; + "@(#)scsitransp.c 1.100 16/01/21 Copyright 1988,1995,2000-2016 J. Schilling"; /*#endif*/ /* * SCSI user level command transport routines (generic part). @@ -12,7 +12,7 @@ * Choose your name instead of "schily" and make clear that the version * string is related to a modified source. * - * Copyright (c) 1988,1995,2000-2004 J. Schilling + * Copyright (c) 1988,1995,2000-2016 J. Schilling */ /* * The contents of this file are subject to the terms of the @@ -21,6 +21,8 @@ * with the License. * * See the file CDDL.Schily.txt in this distribution for details. + * A copy of the CDDL is also available via the Internet at + * http://www.opensource.org/licenses/cddl1.txt * * The following exceptions apply: * CDDL §3.6 needs to be replaced by: "You may create a Larger Work by @@ -35,7 +37,7 @@ */ #include -#include +#include #include #include #include @@ -414,18 +416,9 @@ ret = SCGO_SEND(scgp); scgp->running = FALSE; __scg_times(scgp); + if (scgp->flags & SCGF_IGN_RESID) + scmd->resid = 0; if (ret < 0) { - /* - * Old /dev/scg versions will not allow to access targets > 7. - * Include a workaround to make this non fatal. - */ - if (scg_target(scgp) < 8 || geterrno() != EINVAL) { - int err = geterrno(); - - errmsgno(err, "Cannot send SCSI cmd via ioctl.\n"); - if (scgp->flags & SCGF_PERM_EXIT) - comexit(err); - } if (scmd->ux_errno == 0) scmd->ux_errno = geterrno(); if (scmd->error == SCG_NO_ERROR) @@ -434,6 +427,36 @@ errmsg("ret < 0 errno: %d ux_errno: %d error: %d\n", geterrno(), scmd->ux_errno, scmd->error); } + if (scmd->ux_errno == EPERM && scgp->flags & SCGF_PERM_PRINT) { + char errbuf[SCSI_ERRSTR_SIZE]; + int amt; + + amt = scg__sprinterr(scgp, errbuf, sizeof (errbuf)); + if (amt > 0) { + FILE *f = scgp->errfile; + + if (f == NULL) + f = stderr; + filewrite(f, errbuf, amt); + ferrmsgno(f, scmd->ux_errno, + "Cannot send SCSI cmd via ioctl.\n"); + fflush(f); + } + } + /* + * Old /dev/scg versions will not allow to access targets > 7. + * Include a workaround to make this non fatal. + */ + if (scg_target(scgp) < 8 || scmd->ux_errno != EINVAL) { + + if (scmd->ux_errno != EPERM || + (scgp->flags & SCGF_PERM_PRINT) == 0) { + errmsgno(scmd->ux_errno, + "Cannot send SCSI cmd via ioctl.\n"); + } + if (scgp->flags & SCGF_PERM_EXIT) + comexit(scmd->ux_errno); + } } ret = scg_vtail(scgp); diff -Nru cdrtools-2.01.01a33/libscg/scsi-unixware.c cdrtools-3.02a09/libscg/scsi-unixware.c --- cdrtools-2.01.01a33/libscg/scsi-unixware.c 2006-11-26 17:12:58.000000000 +0000 +++ cdrtools-3.02a09/libscg/scsi-unixware.c 2011-03-07 22:19:21.000000000 +0000 @@ -1,7 +1,7 @@ -/* @(#)scsi-unixware.c 1.38 06/11/26 Copyright 1998 J. Schilling, Santa Cruz Operation */ +/* @(#)scsi-unixware.c 1.39 11/03/07 Copyright 1998 J. Schilling, Santa Cruz Operation */ #ifndef lint static char __sccsid[] = - "@(#)scsi-unixware.c 1.38 06/11/26 Copyright 1998 J. Schilling, Santa Cruz Operation"; + "@(#)scsi-unixware.c 1.39 11/03/07 Copyright 1998 J. Schilling, Santa Cruz Operation"; #endif /* * Interface for the SCO UnixWare SCSI implementation. @@ -50,7 +50,7 @@ * Choose your name instead of "schily" and make clear that the version * string is related to a modified source. */ -LOCAL char _scg_trans_version[] = "scsi-unixware.c-1.38"; /* The version for this transport*/ +LOCAL char _scg_trans_version[] = "scsi-unixware.c-1.39"; /* The version for this transport*/ /* Max. number of scg scsibusses. The real limit would be */ /* MAX_HBA * MAX_BUS (which would be 32 * 8 on UnixWare 2.1/7.x), */ @@ -871,6 +871,8 @@ SCSI *scgp; { struct scg_cmd *sp = scgp->scmd; + int error = sp->error; + Uchar status = sp->u_scb.cmd_scb[0]; int ret; if (scgp->fd < 0) { @@ -879,12 +881,12 @@ } ret = do_scg_cmd(scgp, sp); - if (ret < 0) - return (ret); - - if (sp->u_scb.cmd_scb[0] & S_CKCON) - ret = do_scg_sense(scgp, sp); - + if (ret >= 0) { + if (sp->u_scb.cmd_scb[0] & S_CKCON) + ret = do_scg_sense(scgp, sp); + } + sp->error = error; + sp->u_scb.cmd_scb[0] = status; return (ret); } diff -Nru cdrtools-2.01.01a33/libscg/scsi-vms.c cdrtools-3.02a09/libscg/scsi-vms.c --- cdrtools-2.01.01a33/libscg/scsi-vms.c 2006-11-26 17:12:58.000000000 +0000 +++ cdrtools-3.02a09/libscg/scsi-vms.c 2017-07-17 19:54:05.000000000 +0000 @@ -1,7 +1,7 @@ -/* @(#)scsi-vms.c 1.34 06/11/26 Copyright 1997 J. Schilling */ +/* @(#)scsi-vms.c 1.36 17/07/17 Copyright 1997,2017 J. Schilling */ #ifndef lint static char __sccsid[] = - "@(#)scsi-vms.c 1.34 06/11/26 Copyright 1997 J. Schilling"; + "@(#)scsi-vms.c 1.36 17/07/17 Copyright 1997,2017 J. Schilling"; #endif /* * Interface for the VMS generic SCSI implementation. @@ -19,7 +19,7 @@ * Choose your name instead of "schily" and make clear that the version * string is related to a modified source. * - * Copyright (c) 1997 J. Schilling + * Copyright (c) 1997,2017 J. Schilling */ /* * The contents of this file are subject to the terms of the @@ -28,6 +28,8 @@ * with the License. * * See the file CDDL.Schily.txt in this distribution for details. + * A copy of the CDDL is also available via the Internet at + * http://www.opensource.org/licenses/cddl1.txt * * The following exceptions apply: * CDDL §3.6 needs to be replaced by: "You may create a Larger Work by @@ -55,7 +57,7 @@ * Choose your name instead of "schily" and make clear that the version * string is related to a modified source. */ -LOCAL char _scg_trans_version[] = "scsi-vms.c-1.34"; /* The version for this transport*/ +LOCAL char _scg_trans_version[] = "scsi-vms.c-1.36"; /* The version for this transport*/ #define VMS_MAX_DK 4 /* DK[A-D] VMS device controllers */ #define VMS_MAX_GK 4 /* GK[A-D] VMS device controllers */ @@ -258,6 +260,12 @@ } else if (busno < VMS_DQRANGE_MAX) { /* in the dq range? */ range = 2; range_offset = busno - VMS_GKRANGE_MAX; + } else { + errno = EINVAL; + if (scgp->errstr) + js_snprintf(scgp->errstr, SCSI_ERRSTR_SIZE, + "Illegal value for busno '%d'", busno); + return (-1); } buschar = vmschar[range]; /* get first device char*/ buschar1 = vmschar1[range]; /* get 2nd device char*/ @@ -556,6 +564,8 @@ SCSI *scgp; { struct scg_cmd *sp = scgp->scmd; + int error = sp->error; + Uchar status = sp->u_scb.cmd_scb[0]; int ret; if (scgp->fd < 0) { @@ -563,9 +573,11 @@ return (0); } ret = do_scg_cmd(scgp, sp); - if (ret < 0) - return (ret); - if (sp->u_scb.cmd_scb[0] & 02) - ret = do_scg_sense(scgp, sp); + if (ret >= 0) { + if (sp->u_scb.cmd_scb[0] & 02) + ret = do_scg_sense(scgp, sp); + } + sp->error = error; + sp->u_scb.cmd_scb[0] = status; return (ret); } diff -Nru cdrtools-2.01.01a33/libscg/scsi-wnt.c cdrtools-3.02a09/libscg/scsi-wnt.c --- cdrtools-2.01.01a33/libscg/scsi-wnt.c 2006-11-26 17:12:58.000000000 +0000 +++ cdrtools-3.02a09/libscg/scsi-wnt.c 2017-08-01 19:45:16.000000000 +0000 @@ -1,7 +1,7 @@ -/* @(#)scsi-wnt.c 1.46 06/11/26 Copyright 1998-2004 J. Schilling, A.L. Faber, J.A. Key */ +/* @(#)scsi-wnt.c 1.51 17/08/01 Copyright 1998-2017 J. Schilling, A.L. Faber, J.A. Key */ #ifndef lint static char __sccsid[] = - "@(#)scsi-wnt.c 1.46 06/11/26 Copyright 1998-2004 J. Schilling, A.L. Faber, J.A. Key"; + "@(#)scsi-wnt.c 1.51 17/08/01 Copyright 1998-2017 J. Schilling, A.L. Faber, J.A. Key"; #endif /* * Interface for the Win32 ASPI library. @@ -14,7 +14,7 @@ * Choose your name instead of "schily" and make clear that the version * string is related to a modified source. * - * Copyright (c) 1998-2004 J. Schilling + * Copyright (c) 1998-2017 J. Schilling * Copyright (c) 1999 A.L. Faber for the first implementation * of this interface. * TODO: @@ -29,6 +29,8 @@ * with the License. * * See the file CDDL.Schily.txt in this distribution for details. + * A copy of the CDDL is also available via the Internet at + * http://www.opensource.org/licenses/cddl1.txt * * The following exceptions apply: * CDDL §3.6 needs to be replaced by: "You may create a Larger Work by @@ -51,14 +53,14 @@ * We define BOOL to make all local code use BOOL * from Windows.h and use the hidden __SBOOL for * our global interfaces. + * + * These workarounds are now applied in schily/windows.h */ -#define BOOL WBOOL /* This is the Win BOOL */ -#define format __format +#include #include #include -#undef format -#ifdef __CYGWIN32__ /* Use dlopen() */ +#if defined(__CYGWIN32__) || defined(__CYGWIN__) /* Use dlopen() */ #include #endif @@ -69,15 +71,15 @@ * Choose your name instead of "schily" and make clear that the version * string is related to a modified source. */ -LOCAL char _scg_trans_version[] = "scsi-wnt.c-1.46"; /* The version for this transport*/ -LOCAL char _scg_itrans_version[] = "SPTI-scsi-wnt.c-1.46"; /* The version for SPTI */ +LOCAL char _scg_trans_version[] = "scsi-wnt.c-1.51"; /* The version for this transport*/ +LOCAL char _scg_itrans_version[] = "SPTI-scsi-wnt.c-1.51"; /* The version for SPTI */ /* * Local defines and constants */ /*#define DEBUG_WNTASPI*/ -#define MAX_SCG 16 /* Max # of SCSI controllers */ +#define MAX_SCG 64 /* Max # of SCSI controllers */ #define MAX_TGT 16 /* Max # of SCSI Targets */ #define MAX_LUN 8 /* Max # of SCSI LUNs */ @@ -282,7 +284,8 @@ for (i = NUM_FLOPPY_DRIVES; i < NUM_MAX_NTSCSI_DRIVES; i++) if (sptiglobal.drive[i].bUsed) for (j = 0; j < sptihamax; j++) { - if (sptihasortarr[j] == ((sptiglobal.drive[i].PortNumber<<8) | sptiglobal.drive[i].PathId)) { + if (sptihasortarr[j] == + ((sptiglobal.drive[i].PortNumber<<8) | sptiglobal.drive[i].PathId)) { sptiglobal.drive[i].ha = j; break; } @@ -520,7 +523,7 @@ swb.spt.CdbLength = 6; swb.spt.SenseInfoLength = 24; swb.spt.DataIn = SCSI_IOCTL_DATA_IN; - swb.spt.DataTransferLength = 100; + swb.spt.DataTransferLength = sizeof (inqData); swb.spt.TimeOutValue = 2; swb.spt.DataBuffer = inqData; swb.spt.SenseInfoOffset = offsetof(SCSI_PASS_THROUGH_DIRECT_WITH_BUFFER, ucSenseBuf); @@ -569,7 +572,11 @@ pDrive->driveLetter = i; pDrive->hDevice = INVALID_HANDLE_VALUE; - } else if (GetLastError() == 50) { /* support USB/FIREWIRE devices where this call is not supported assign drive letter as device ID */ + } else if (GetLastError() == 50) { + /* + * support USB/FIREWIRE devices where this call is not supported + * assign drive letter as device ID + */ pDrive->bUsed = TRUE; pDrive->ha = i; pDrive->PortNumber = i+64; /* hopefully no conflict with other PortNumber */ @@ -1150,7 +1157,7 @@ } js_fprintf((FILE *)scgp->errfile, "\n"); - /* +#ifdef __MORE_DEBUG__ if (bDisplayBuffer != 0 && s->SRB_BufLen >= 8) { js_fprintf((FILE *)scgp->errfile, "s->SRB_BufPointer ="); @@ -1160,7 +1167,8 @@ } js_fprintf((FILE *)scgp->errfile, "\n"); } -*/ +#endif /* __MORE_DEBUG__ */ + js_fprintf((FILE *)scgp->errfile, "Debug done\n"); } #endif @@ -1544,7 +1552,7 @@ load_aspi(scgp) SCSI *scgp; { -#ifdef __CYGWIN32__ +#if defined(__CYGWIN32__) || defined(__CYGWIN__) hAspiLib = dlopen("WNASPI32", RTLD_NOW); #else hAspiLib = LoadLibrary("WNASPI32"); @@ -1563,7 +1571,7 @@ * Get a pointer to GetASPI32SupportInfo function * and a pointer to SendASPI32Command function */ -#ifdef __CYGWIN32__ +#if defined(__CYGWIN32__) || defined(__CYGWIN__) pfnGetASPI32SupportInfo = (DWORD(*)(void))dlsym(hAspiLib, "GetASPI32SupportInfo"); pfnSendASPI32Command = (DWORD(*)(LPSRB))dlsym(hAspiLib, "SendASPI32Command"); #else @@ -1582,7 +1590,7 @@ * If we start to use them, we need to check whether the founctions * could be found in the ASPI library that just has been loaded. */ -#ifdef __CYGWIN32__ +#if defined(__CYGWIN32__) || defined(__CYGWIN__) pfnGetASPI32Buffer = (BOOL(*)(PASPI32BUFF))dlsym(hAspiLib, "GetASPI32Buffer"); pfnFreeASPI32Buffer = (BOOL(*)(PASPI32BUFF))dlsym(hAspiLib, "FreeASPI32Buffer"); pfnTranslateASPI32Address = (BOOL(*)(PDWORD, PDWORD))dlsym(hAspiLib, "TranslateASPI32Address"); @@ -1628,7 +1636,7 @@ /* * Free ASPI library, we do not need it any longer */ -#ifdef __CYGWIN32__ +#if defined(__CYGWIN32__) || defined(__CYGWIN__) dlclose(hAspiLib); #else FreeLibrary(hAspiLib); diff -Nru cdrtools-2.01.01a33/libscg/shlscg.mk cdrtools-3.02a09/libscg/shlscg.mk --- cdrtools-2.01.01a33/libscg/shlscg.mk 2007-02-03 22:50:32.000000000 +0000 +++ cdrtools-3.02a09/libscg/shlscg.mk 2008-07-31 22:51:33.000000000 +0000 @@ -1,4 +1,4 @@ -#ident @(#)shlscg.mk 1.2 07/02/03 +#ident @(#)shlscg.mk 1.3 08/08/01 ########################################################################### SRCROOT= .. RULESDIR= RULES @@ -10,7 +10,7 @@ #VPATH= .:stdio:$(ARCHDIR) INSDIR= lib TARGETLIB= scg -#CPPOPTS += -Ispecincl +CPPOPTS += -I. CPPOPTS += -DUSE_PG CPPOPTS += -DSCHILY_PRINT diff -Nru cdrtools-2.01.01a33/libscg/Targets cdrtools-3.02a09/libscg/Targets --- cdrtools-2.01.01a33/libscg/Targets 2006-09-16 20:13:51.000000000 +0000 +++ cdrtools-3.02a09/libscg/Targets 2016-01-21 22:22:57.000000000 +0000 @@ -1,3 +1,13 @@ CFILES= scsitransp.c scsihack.c scsiopen.c scgsettarget.c \ - scsierrs.c scgtimes.c scsihelp.c \ + scsierrs.c scgtimes.c scsihelp.c scsiopts.c \ rdummy.c + +# +# scgmisc.c fuer aspiemu.c ... +# +#CFILES= scsitransp.c scsihack.c scsiopen.c scgsettarget.c \ +# scgmisc.c \ +# scsierrs.c scgtimes.c \ +# scglerror.c \ +# rdummy.c + diff -Nru cdrtools-2.01.01a33/libscgcmd/buffer.c cdrtools-3.02a09/libscgcmd/buffer.c --- cdrtools-2.01.01a33/libscgcmd/buffer.c 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/libscgcmd/buffer.c 2009-07-10 21:55:16.000000000 +0000 @@ -0,0 +1,104 @@ +/* @(#)buffer.c 1.158 09/07/10 Copyright 1995-2009 J. Schilling */ +#include +#ifndef lint +static UConst char sccsid[] = + "@(#)buffer.c 1.158 09/07/10 Copyright 1995-2009 J. Schilling"; +#endif +/* + * SCSI command functions for read_buffer/write_buffer + * + * Copyright (c) 1995-2009 J. Schilling + */ +/* + * The contents of this file are subject to the terms of the + * Common Development and Distribution License, Version 1.0 only + * (the "License"). You may not use this file except in compliance + * with the License. + * + * See the file CDDL.Schily.txt in this distribution for details. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file CDDL.Schily.txt from this distribution. + */ + +#include +#include + +#include +#include +#include +#include + +#include +#include +#include +#include + +#include "libscgcmd.h" + +EXPORT int read_buffer __PR((SCSI *scgp, caddr_t bp, int cnt, int mode)); +EXPORT int write_buffer __PR((SCSI *scgp, char *buffer, long length, int mode, int bufferid, long offset)); + + +EXPORT int +read_buffer(scgp, bp, cnt, mode) + SCSI *scgp; + caddr_t bp; + int cnt; + int mode; +{ + register struct scg_cmd *scmd = scgp->scmd; + + fillbytes((caddr_t)scmd, sizeof (*scmd), '\0'); + scmd->addr = bp; + scmd->size = cnt; + scmd->dma_read = 1; + scmd->cdb_len = SC_G1_CDBLEN; + scmd->sense_len = CCS_SENSE_LEN; + scmd->cdb.g1_cdb.cmd = 0x3C; /* Read Buffer */ + scmd->cdb.g1_cdb.lun = scg_lun(scgp); + scmd->cdb.cmd_cdb[1] |= (mode & 7); + g1_cdblen(&scmd->cdb.g1_cdb, cnt); + + scgp->cmdname = "read buffer"; + + return (scg_cmd(scgp)); +} + +EXPORT int +write_buffer(scgp, buffer, length, mode, bufferid, offset) + SCSI *scgp; + char *buffer; + long length; + int mode; + int bufferid; + long offset; +{ + register struct scg_cmd *scmd = scgp->scmd; + char *cdb; + + fillbytes((caddr_t)scmd, sizeof (*scmd), '\0'); + scmd->addr = buffer; + scmd->size = length; + scmd->flags = SCG_DISRE_ENA|SCG_CMD_RETRY; + scmd->cdb_len = SC_G1_CDBLEN; + scmd->sense_len = CCS_SENSE_LEN; + + cdb = (char *)scmd->cdb.cmd_cdb; + + cdb[0] = 0x3B; + cdb[1] = mode & 7; + cdb[2] = bufferid; + cdb[3] = offset >> 16; + cdb[4] = (offset >> 8) & 0xff; + cdb[5] = offset & 0xff; + cdb[6] = length >> 16; + cdb[7] = (length >> 8) & 0xff; + cdb[8] = length & 0xff; + + scgp->cmdname = "write_buffer"; + + if (scg_cmd(scgp) >= 0) + return (1); + return (0); +} diff -Nru cdrtools-2.01.01a33/libscgcmd/inquiry.c cdrtools-3.02a09/libscgcmd/inquiry.c --- cdrtools-2.01.01a33/libscgcmd/inquiry.c 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/libscgcmd/inquiry.c 2009-07-10 21:55:16.000000000 +0000 @@ -0,0 +1,68 @@ +/* @(#)inquiry.c 1.158 09/07/10 Copyright 1995-2009 J. Schilling */ +#include +#ifndef lint +static UConst char sccsid[] = + "@(#)inquiry.c 1.158 09/07/10 Copyright 1995-2009 J. Schilling"; +#endif +/* + * SCSI command functions for inquiry + * + * Copyright (c) 1995-2009 J. Schilling + */ +/* + * The contents of this file are subject to the terms of the + * Common Development and Distribution License, Version 1.0 only + * (the "License"). You may not use this file except in compliance + * with the License. + * + * See the file CDDL.Schily.txt in this distribution for details. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file CDDL.Schily.txt from this distribution. + */ + +#include +#include + +#include +#include +#include +#include + +#include +#include +#include +#include + +#include "libscgcmd.h" + +EXPORT int inquiry __PR((SCSI *scgp, caddr_t, int)); + + +EXPORT int +inquiry(scgp, bp, cnt) + SCSI *scgp; + caddr_t bp; + int cnt; +{ + register struct scg_cmd *scmd = scgp->scmd; + + fillbytes(bp, cnt, '\0'); + fillbytes((caddr_t)scmd, sizeof (*scmd), '\0'); + scmd->addr = bp; + scmd->size = cnt; + scmd->flags = SCG_RECV_DATA|SCG_DISRE_ENA; + scmd->cdb_len = SC_G0_CDBLEN; + scmd->sense_len = CCS_SENSE_LEN; + scmd->cdb.g0_cdb.cmd = SC_INQUIRY; + scmd->cdb.g0_cdb.lun = scg_lun(scgp); + scmd->cdb.g0_cdb.count = cnt; + + scgp->cmdname = "inquiry"; + + if (scg_cmd(scgp) < 0) + return (-1); + if (scgp->verbose) + scg_prbytes("Inquiry Data :", (Uchar *)bp, cnt - scg_getresid(scgp)); + return (0); +} diff -Nru cdrtools-2.01.01a33/libscgcmd/libscgcmd.h cdrtools-3.02a09/libscgcmd/libscgcmd.h --- cdrtools-2.01.01a33/libscgcmd/libscgcmd.h 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/libscgcmd/libscgcmd.h 2008-10-26 21:31:32.000000000 +0000 @@ -0,0 +1,63 @@ +/* @(#)libscgcmd.h 1.1 08/10/26 Copyright 1986-2008 J. Schilling */ + +#ifndef _LIBSCGCMD_H +#define _LIBSCGCMD_H + +/* + * buffer.c + */ +extern int read_buffer __PR((SCSI *scgp, caddr_t bp, int cnt, int mode)); +extern int write_buffer __PR((SCSI *scgp, char *buffer, long length, int mode, int bufferid, long offset)); + +/* + * inquiry.c + */ +extern int inquiry __PR((SCSI *scgp, caddr_t, int)); + +/* + * modes.c + */ +extern BOOL get_mode_params __PR((SCSI *scgp, int page, char *pagename, + Uchar *modep, Uchar *cmodep, + Uchar *dmodep, Uchar *smodep, + int *lenp)); +extern BOOL set_mode_params __PR((SCSI *scgp, char *pagename, Uchar *modep, + int len, int save, int secsize)); + +/* + * modesense.c + */ +extern BOOL __is_atapi __PR((void)); +extern BOOL allow_atapi __PR((SCSI *scgp, BOOL new)); +extern int mode_select __PR((SCSI *scgp, Uchar *, int, int, int)); +extern int mode_sense __PR((SCSI *scgp, Uchar *dp, int cnt, int page, int pcf)); +extern int mode_select_sg0 __PR((SCSI *scgp, Uchar *, int, int, int)); +extern int mode_sense_sg0 __PR((SCSI *scgp, Uchar *dp, int cnt, int page, int pcf)); +extern int mode_select_g0 __PR((SCSI *scgp, Uchar *, int, int, int)); +extern int mode_select_g1 __PR((SCSI *scgp, Uchar *, int, int, int)); +extern int mode_sense_g0 __PR((SCSI *scgp, Uchar *dp, int cnt, int page, int pcf)); +extern int mode_sense_g1 __PR((SCSI *scgp, Uchar *dp, int cnt, int page, int pcf)); + +/* + * read.c + */ +extern int read_scsi __PR((SCSI *scgp, caddr_t, long, int)); +extern int read_g0 __PR((SCSI *scgp, caddr_t, long, int)); +extern int read_g1 __PR((SCSI *scgp, caddr_t, long, int)); + +/* + * readcap.c + */ +extern int read_capacity __PR((SCSI *scgp)); +#ifdef EOF /* stdio.h has been included */ +extern void print_capacity __PR((SCSI *scgp, FILE *f)); +#endif + +/* + * ready.c + */ +extern BOOL unit_ready __PR((SCSI *scgp)); +extern BOOL wait_unit_ready __PR((SCSI *scgp, int secs)); +extern int test_unit_ready __PR((SCSI *scgp)); + +#endif /* _LIBSCGCMD_H */ diff -Nru cdrtools-2.01.01a33/libscgcmd/libscgcmd-mapvers cdrtools-3.02a09/libscgcmd/libscgcmd-mapvers --- cdrtools-2.01.01a33/libscgcmd/libscgcmd-mapvers 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/libscgcmd/libscgcmd-mapvers 2010-10-02 20:08:40.000000000 +0000 @@ -0,0 +1,32 @@ +# /* @(#)libscgcmd-mapvers 1.2 10/10/02 Copyright 2008-2010 J. Schilling */ + +SCHILY_1.0 { + +global: + __is_atapi; + allow_atapi; + get_mode_params; + inquiry; + mode_select; + mode_select_g0; + mode_select_g1; + mode_select_sg0; + mode_sense; + mode_sense_g0; + mode_sense_g1; + mode_sense_sg0; + print_capacity; + read_buffer; + read_capacity; + read_g0; + read_g1; + read_scsi; + set_mode_params; + test_unit_ready; + unit_ready; + wait_unit_ready; + write_buffer; + +local: + *; +}; diff -Nru cdrtools-2.01.01a33/libscgcmd/libscgcmd.mk cdrtools-3.02a09/libscgcmd/libscgcmd.mk --- cdrtools-2.01.01a33/libscgcmd/libscgcmd.mk 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/libscgcmd/libscgcmd.mk 2008-10-26 22:04:26.000000000 +0000 @@ -0,0 +1,25 @@ +#ident @(#)libscgcmd.mk 1.2 08/10/26 +########################################################################### +SRCROOT= .. +RULESDIR= RULES +include $(SRCROOT)/$(RULESDIR)/rules.top +########################################################################### + +#.SEARCHLIST: . $(ARCHDIR) stdio $(ARCHDIR) +#VPATH= .:stdio:$(ARCHDIR) +INSDIR= lib +TARGETLIB= scgcmd +CPPOPTS += -I. +CPPOPTS += -I../libscg +CPPOPTS += -DUSE_LARGEFILES +CPPOPTS += -DSCHILY_PRINT + +include Targets +LIBS= + +########################################################################### +include $(SRCROOT)/$(RULESDIR)/rules.lib +########################################################################### +#CC= echo " ==> COMPILING \"$@\""; cc +########################################################################### + diff -Nru cdrtools-2.01.01a33/libscgcmd/libscgcmd_p.mk cdrtools-3.02a09/libscgcmd/libscgcmd_p.mk --- cdrtools-2.01.01a33/libscgcmd/libscgcmd_p.mk 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/libscgcmd/libscgcmd_p.mk 2008-10-26 22:04:26.000000000 +0000 @@ -0,0 +1,27 @@ +#ident @(#)libscgcmd_p.mk 1.2 08/10/26 +########################################################################### +SRCROOT= .. +RULESDIR= RULES +include $(SRCROOT)/$(RULESDIR)/rules.top +########################################################################### + +SUBARCHDIR= /profiled +SUBINSDIR= /profiled +#.SEARCHLIST: . $(ARCHDIR) stdio $(ARCHDIR) +#VPATH= .:stdio:$(ARCHDIR) +INSDIR= lib +TARGETLIB= scgcmd +CPPOPTS += -I. +CPPOPTS += -I../libscg +CPPOPTS += -DUSE_LARGEFILES +CPPOPTS += -DSCHILY_PRINT +COPTS += $(COPTGPROF) + +include Targets +LIBS= + +########################################################################### +include $(SRCROOT)/$(RULESDIR)/rules.lib +########################################################################### +#CC= echo " ==> COMPILING \"$@\""; cc +########################################################################### diff -Nru cdrtools-2.01.01a33/libscgcmd/Makefile cdrtools-3.02a09/libscgcmd/Makefile --- cdrtools-2.01.01a33/libscgcmd/Makefile 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/libscgcmd/Makefile 2008-10-26 21:01:52.000000000 +0000 @@ -0,0 +1,12 @@ +#ident @(#)Makefile 1.1 08/10/26 +########################################################################### +SRCROOT= .. +RULESDIR= RULES +include $(SRCROOT)/$(RULESDIR)/rules.top +########################################################################### + +MK_FILES= libscgcmd.mk libscgcmd_p.mk $(NO_SHL)shlscgcmd.mk + +########################################################################### +include $(SRCROOT)/$(RULESDIR)/rules.mks +########################################################################### diff -Nru cdrtools-2.01.01a33/libscgcmd/modes.c cdrtools-3.02a09/libscgcmd/modes.c --- cdrtools-2.01.01a33/libscgcmd/modes.c 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/libscgcmd/modes.c 2009-07-10 21:55:16.000000000 +0000 @@ -0,0 +1,296 @@ +/* @(#)modes.c 1.29 09/07/10 Copyright 1988, 1997-2001, 2004-2009 J. Schilling */ +#include +#ifndef lint +static UConst char sccsid[] = + "@(#)modes.c 1.29 09/07/10 Copyright 1988, 1997-2001, 2004-2009 J. Schilling"; +#endif +/* + * SCSI mode page handling + * + * Copyright (c) 1988, 1997-2001, 2004-2009 J. Schilling + */ +/* + * The contents of this file are subject to the terms of the + * Common Development and Distribution License, Version 1.0 only + * (the "License"). You may not use this file except in compliance + * with the License. + * + * See the file CDDL.Schily.txt in this distribution for details. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file CDDL.Schily.txt from this distribution. + */ + +#include +#include +#include +#include +#include +#include + +#include "libscgcmd.h" + +EXPORT int scsi_compliant; + +LOCAL BOOL has_mode_page __PR((SCSI *scgp, int page, char *pagename, int *lenp)); +EXPORT BOOL get_mode_params __PR((SCSI *scgp, int page, char *pagename, + Uchar *modep, Uchar *cmodep, + Uchar *dmodep, Uchar *smodep, + int *lenp)); +EXPORT BOOL set_mode_params __PR((SCSI *scgp, char *pagename, Uchar *modep, + int len, int save, int secsize)); + +#define XXX + +#ifdef XXX +LOCAL BOOL +has_mode_page(scgp, page, pagename, lenp) + SCSI *scgp; + int page; + char *pagename; + int *lenp; +{ + Uchar mode[0x100]; + int hdlen; + int len = 1; /* Nach SCSI Norm */ + int try = 0; + struct scsi_mode_page_header *mp; + + /* + * ATAPI drives (used e.g. by IOMEGA) from y2k have the worst firmware + * I've seen. They create DMA buffer overruns if we request less than + * 3 bytes with 6 byte mode sense which equals 4 byte with 10 byte mode + * sense. In order to prevent repeated bus resets, we remember this + * bug. + * + * IOMEGA claims that they are using Philips clone drives but a Philips + * drive I own does not have the problem. + */ + if ((scgp->dflags & DRF_MODE_DMA_OVR) != 0) + len = sizeof (struct scsi_mode_header); +again: + fillbytes((caddr_t)mode, sizeof (mode), '\0'); + if (lenp) + *lenp = 0; + + scgp->silent++; + (void) unit_ready(scgp); +/* Maxoptix bringt Aborted cmd 0x0B mit code 0x4E (overlapping cmds)*/ + + /* + * The Matsushita CW-7502 will sometimes deliver a zeroed + * mode page 2A if "Page n default" is used instead of "current". + */ + if (mode_sense(scgp, mode, len, page, 0) < 0) { /* Page n current */ + scgp->silent--; + if (len < (int)sizeof (struct scsi_mode_header) && try == 0) { + len = sizeof (struct scsi_mode_header); + goto again; + } + return (FALSE); + } else { + if (len > 1 && try == 0) { + /* + * If we come here, we got a hard failure with the + * fist try. Remember this (IOMEGA USB) firmware bug. + */ + if ((scgp->dflags & DRF_MODE_DMA_OVR) == 0) { + /* XXX if (!nowarn) */ + errmsgno(EX_BAD, + "Warning: controller creates hard SCSI failure when retrieving %s page.\n", + pagename); + scgp->dflags |= DRF_MODE_DMA_OVR; + } + } + len = ((struct scsi_mode_header *)mode)->sense_data_len + 1; + } + /* + * ATAPI drives as used by IOMEGA may receive a SCSI bus device reset + * in between these two mode sense commands. + */ + (void) unit_ready(scgp); + if (mode_sense(scgp, mode, len, page, 0) < 0) { /* Page n current */ + scgp->silent--; + return (FALSE); + } + scgp->silent--; + + if (scgp->verbose) + scg_prbytes("Mode Sense Data", mode, len - scg_getresid(scgp)); + hdlen = sizeof (struct scsi_mode_header) + + ((struct scsi_mode_header *)mode)->blockdesc_len; + mp = (struct scsi_mode_page_header *)(mode + hdlen); + if (scgp->verbose) + scg_prbytes("Mode Page Data", (Uchar *)mp, mp->p_len+2); + + if (mp->p_len == 0) { + if (!scsi_compliant && try == 0) { + len = hdlen; + /* + * add sizeof page header (page # + len byte) + * (should normaly result in len == 14) + * this allowes to work with: + * Quantum Q210S (wants at least 13) + * MD2x (wants at least 4) + */ + len += 2; + try++; + goto again; + } + /* XXX if (!nowarn) */ + errmsgno(EX_BAD, + "Warning: controller returns zero sized %s page.\n", + pagename); + } + if (!scsi_compliant && + (len < (int)(mp->p_len + hdlen + 2))) { + len = mp->p_len + hdlen + 2; + + /* XXX if (!nowarn) */ + errmsgno(EX_BAD, + "Warning: controller returns wrong size for %s page.\n", + pagename); + } + if (mp->p_code != page) { + /* XXX if (!nowarn) */ + errmsgno(EX_BAD, + "Warning: controller returns wrong page %X for %s page (%X).\n", + mp->p_code, pagename, page); + return (FALSE); + } + + if (lenp) + *lenp = len; + return (mp->p_len > 0); +} +#endif + +EXPORT BOOL +get_mode_params(scgp, page, pagename, modep, cmodep, dmodep, smodep, lenp) + SCSI *scgp; + int page; + char *pagename; + Uchar *modep; + Uchar *cmodep; + Uchar *dmodep; + Uchar *smodep; + int *lenp; +{ + int len; + BOOL ret = TRUE; + +#ifdef XXX + if (lenp) + *lenp = 0; + if (!has_mode_page(scgp, page, pagename, &len)) { + if (!scgp->silent) errmsgno(EX_BAD, + "Warning: controller does not support %s page.\n", + pagename); + return (FALSE); + } + if (lenp) + *lenp = len; +#else + if (lenp == 0) + len = 0xFF; +#endif + + if (modep) { + fillbytes(modep, 0x100, '\0'); + scgp->silent++; + (void) unit_ready(scgp); + scgp->silent--; + if (mode_sense(scgp, modep, len, page, 0) < 0) { /* Page x current */ + errmsgno(EX_BAD, "Cannot get %s data.\n", pagename); + ret = FALSE; + } else if (scgp->verbose) { + scg_prbytes("Mode Sense Data", modep, len - scg_getresid(scgp)); + } + } + + if (cmodep) { + fillbytes(cmodep, 0x100, '\0'); + scgp->silent++; + (void) unit_ready(scgp); + scgp->silent--; + if (mode_sense(scgp, cmodep, len, page, 1) < 0) { /* Page x change */ + errmsgno(EX_BAD, "Cannot get %s mask.\n", pagename); + ret = FALSE; + } else if (scgp->verbose) { + scg_prbytes("Mode Sense Data", cmodep, len - scg_getresid(scgp)); + } + } + + if (dmodep) { + fillbytes(dmodep, 0x100, '\0'); + scgp->silent++; + (void) unit_ready(scgp); + scgp->silent--; + if (mode_sense(scgp, dmodep, len, page, 2) < 0) { /* Page x default */ + errmsgno(EX_BAD, "Cannot get default %s data.\n", + pagename); + ret = FALSE; + } else if (scgp->verbose) { + scg_prbytes("Mode Sense Data", dmodep, len - scg_getresid(scgp)); + } + } + + if (smodep) { + fillbytes(smodep, 0x100, '\0'); + scgp->silent++; + (void) unit_ready(scgp); + scgp->silent--; + if (mode_sense(scgp, smodep, len, page, 3) < 0) { /* Page x saved */ + errmsgno(EX_BAD, "Cannot get saved %s data.\n", pagename); + ret = FALSE; + } else if (scgp->verbose) { + scg_prbytes("Mode Sense Data", smodep, len - scg_getresid(scgp)); + } + } + + return (ret); +} + +EXPORT BOOL +set_mode_params(scgp, pagename, modep, len, save, secsize) + SCSI *scgp; + char *pagename; + Uchar *modep; + int len; + int save; + int secsize; +{ + int i; + + ((struct scsi_modesel_header *)modep)->sense_data_len = 0; + ((struct scsi_modesel_header *)modep)->res2 = 0; + + i = ((struct scsi_mode_header *)modep)->blockdesc_len; + if (i > 0) { + i_to_3_byte( + ((struct scsi_mode_data *)modep)->blockdesc.nlblock, + 0); + if (secsize >= 0) + i_to_3_byte(((struct scsi_mode_data *)modep)->blockdesc.lblen, + secsize); + } + + scgp->silent++; + (void) unit_ready(scgp); + scgp->silent--; + if (save == 0 || mode_select(scgp, modep, len, save, scgp->inq->data_format >= 2) < 0) { + scgp->silent++; + (void) unit_ready(scgp); + scgp->silent--; + if (mode_select(scgp, modep, len, 0, scgp->inq->data_format >= 2) < 0) { + if (scgp->silent == 0) { + errmsgno(EX_BAD, + "Warning: using default %s data.\n", + pagename); + scg_prbytes("Mode Select Data", modep, len); + } + return (FALSE); + } + } + return (TRUE); +} diff -Nru cdrtools-2.01.01a33/libscgcmd/modesense.c cdrtools-3.02a09/libscgcmd/modesense.c --- cdrtools-2.01.01a33/libscgcmd/modesense.c 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/libscgcmd/modesense.c 2009-07-10 21:55:16.000000000 +0000 @@ -0,0 +1,335 @@ +/* @(#)modesense.c 1.158 09/07/10 Copyright 1995-2009 J. Schilling */ +#include +#ifndef lint +static UConst char sccsid[] = + "@(#)modesense.c 1.158 09/07/10 Copyright 1995-2009 J. Schilling"; +#endif +/* + * SCSI command functions for mode sense/mode select handling. + * + * Copyright (c) 1995-2009 J. Schilling + */ +/* + * The contents of this file are subject to the terms of the + * Common Development and Distribution License, Version 1.0 only + * (the "License"). You may not use this file except in compliance + * with the License. + * + * See the file CDDL.Schily.txt in this distribution for details. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file CDDL.Schily.txt from this distribution. + */ + +#include +#include + +#include +#include +#include +#include + +#include +#include +#include +#include + +#include "libscgcmd.h" + +EXPORT BOOL __is_atapi __PR((void)); +EXPORT BOOL allow_atapi __PR((SCSI *scgp, BOOL new)); +EXPORT int mode_select __PR((SCSI *scgp, Uchar *, int, int, int)); +EXPORT int mode_sense __PR((SCSI *scgp, Uchar *dp, int cnt, int page, int pcf)); +EXPORT int mode_select_sg0 __PR((SCSI *scgp, Uchar *, int, int, int)); +EXPORT int mode_sense_sg0 __PR((SCSI *scgp, Uchar *dp, int cnt, int page, int pcf)); +EXPORT int mode_select_g0 __PR((SCSI *scgp, Uchar *, int, int, int)); +EXPORT int mode_select_g1 __PR((SCSI *scgp, Uchar *, int, int, int)); +EXPORT int mode_sense_g0 __PR((SCSI *scgp, Uchar *dp, int cnt, int page, int pcf)); +EXPORT int mode_sense_g1 __PR((SCSI *scgp, Uchar *dp, int cnt, int page, int pcf)); + +/* + * XXX First try to handle ATAPI: + * XXX ATAPI cannot handle SCSI 6 byte commands. + * XXX We try to simulate 6 byte mode sense/select. + */ +LOCAL BOOL is_atapi; + +EXPORT BOOL +__is_atapi() +{ + return (is_atapi); +} + +EXPORT BOOL +allow_atapi(scgp, new) + SCSI *scgp; + BOOL new; +{ + BOOL old = is_atapi; + Uchar mode[256]; + + if (new == old) + return (old); + + scgp->silent++; + /* + * If a bad drive has been reset before, we may need to fire up two + * test unit ready commands to clear status. + */ + (void) unit_ready(scgp); + if (new && + mode_sense_g1(scgp, mode, 8, 0x3F, 0) < 0) { /* All pages current */ + new = FALSE; + } + scgp->silent--; + + is_atapi = new; + return (old); +} + +EXPORT int +mode_select(scgp, dp, cnt, smp, pf) + SCSI *scgp; + Uchar *dp; + int cnt; + int smp; + int pf; +{ + if (is_atapi) + return (mode_select_sg0(scgp, dp, cnt, smp, pf)); + return (mode_select_g0(scgp, dp, cnt, smp, pf)); +} + +EXPORT int +mode_sense(scgp, dp, cnt, page, pcf) + SCSI *scgp; + Uchar *dp; + int cnt; + int page; + int pcf; +{ + if (is_atapi) + return (mode_sense_sg0(scgp, dp, cnt, page, pcf)); + return (mode_sense_g0(scgp, dp, cnt, page, pcf)); +} + +/* + * Simulate mode select g0 with mode select g1. + */ +EXPORT int +mode_select_sg0(scgp, dp, cnt, smp, pf) + SCSI *scgp; + Uchar *dp; + int cnt; + int smp; + int pf; +{ + Uchar xmode[256+4]; + int amt = cnt; + + if (amt < 1 || amt > 255) { + /* XXX clear SCSI error codes ??? */ + return (-1); + } + + if (amt < 4) { /* Data length. medium type & VU */ + amt += 1; + } else { + amt += 4; + movebytes(&dp[4], &xmode[8], cnt-4); + } + xmode[0] = 0; + xmode[1] = 0; + xmode[2] = dp[1]; + xmode[3] = dp[2]; + xmode[4] = 0; + xmode[5] = 0; + i_to_2_byte(&xmode[6], (unsigned int)dp[3]); + + if (scgp->verbose) scg_prbytes("Mode Parameters (un-converted)", dp, cnt); + + return (mode_select_g1(scgp, xmode, amt, smp, pf)); +} + +/* + * Simulate mode sense g0 with mode sense g1. + */ +EXPORT int +mode_sense_sg0(scgp, dp, cnt, page, pcf) + SCSI *scgp; + Uchar *dp; + int cnt; + int page; + int pcf; +{ + Uchar xmode[256+4]; + int amt = cnt; + int len; + + if (amt < 1 || amt > 255) { + /* XXX clear SCSI error codes ??? */ + return (-1); + } + + fillbytes((caddr_t)xmode, sizeof (xmode), '\0'); + if (amt < 4) { /* Data length. medium type & VU */ + amt += 1; + } else { + amt += 4; + } + if (mode_sense_g1(scgp, xmode, amt, page, pcf) < 0) + return (-1); + + amt = cnt - scg_getresid(scgp); +/* + * For tests: Solaris 8 & LG CD-ROM always returns resid == amt + */ +/* amt = cnt;*/ + if (amt > 4) + movebytes(&xmode[8], &dp[4], amt-4); + len = a_to_u_2_byte(xmode); + if (len == 0) { + dp[0] = 0; + } else if (len < 6) { + if (len > 2) + len = 2; + dp[0] = len; + } else { + dp[0] = len - 3; + } + dp[1] = xmode[2]; + dp[2] = xmode[3]; + len = a_to_u_2_byte(&xmode[6]); + dp[3] = len; + + if (scgp->verbose) scg_prbytes("Mode Sense Data (converted)", dp, amt); + return (0); +} + +EXPORT int +mode_select_g0(scgp, dp, cnt, smp, pf) + SCSI *scgp; + Uchar *dp; + int cnt; + int smp; + int pf; +{ + register struct scg_cmd *scmd = scgp->scmd; + + fillbytes((caddr_t)scmd, sizeof (*scmd), '\0'); + scmd->addr = (caddr_t)dp; + scmd->size = cnt; + scmd->flags = SCG_DISRE_ENA; + scmd->cdb_len = SC_G0_CDBLEN; + scmd->sense_len = CCS_SENSE_LEN; + scmd->cdb.g0_cdb.cmd = SC_MODE_SELECT; + scmd->cdb.g0_cdb.lun = scg_lun(scgp); + scmd->cdb.g0_cdb.high_addr = smp ? 1 : 0 | pf ? 0x10 : 0; + scmd->cdb.g0_cdb.count = cnt; + + if (scgp->verbose) { + error("%s ", smp?"Save":"Set "); + scg_prbytes("Mode Parameters", dp, cnt); + } + + scgp->cmdname = "mode select g0"; + + return (scg_cmd(scgp)); +} + +EXPORT int +mode_select_g1(scgp, dp, cnt, smp, pf) + SCSI *scgp; + Uchar *dp; + int cnt; + int smp; + int pf; +{ + register struct scg_cmd *scmd = scgp->scmd; + + fillbytes((caddr_t)scmd, sizeof (*scmd), '\0'); + scmd->addr = (caddr_t)dp; + scmd->size = cnt; + scmd->flags = SCG_DISRE_ENA; + scmd->cdb_len = SC_G1_CDBLEN; + scmd->sense_len = CCS_SENSE_LEN; + scmd->cdb.g1_cdb.cmd = 0x55; + scmd->cdb.g1_cdb.lun = scg_lun(scgp); + scmd->cdb.g0_cdb.high_addr = smp ? 1 : 0 | pf ? 0x10 : 0; + g1_cdblen(&scmd->cdb.g1_cdb, cnt); + + if (scgp->verbose) { + printf("%s ", smp?"Save":"Set "); + scg_prbytes("Mode Parameters", dp, cnt); + } + + scgp->cmdname = "mode select g1"; + + return (scg_cmd(scgp)); +} + +EXPORT int +mode_sense_g0(scgp, dp, cnt, page, pcf) + SCSI *scgp; + Uchar *dp; + int cnt; + int page; + int pcf; +{ + register struct scg_cmd *scmd = scgp->scmd; + + fillbytes((caddr_t)scmd, sizeof (*scmd), '\0'); + scmd->addr = (caddr_t)dp; + scmd->size = 0xFF; + scmd->size = cnt; + scmd->flags = SCG_RECV_DATA|SCG_DISRE_ENA; + scmd->cdb_len = SC_G0_CDBLEN; + scmd->sense_len = CCS_SENSE_LEN; + scmd->cdb.g0_cdb.cmd = SC_MODE_SENSE; + scmd->cdb.g0_cdb.lun = scg_lun(scgp); +#ifdef nonono + scmd->cdb.g0_cdb.high_addr = 1<<4; /* DBD Disable Block desc. */ +#endif + scmd->cdb.g0_cdb.mid_addr = (page&0x3F) | ((pcf<<6)&0xC0); + scmd->cdb.g0_cdb.count = page ? 0xFF : 24; + scmd->cdb.g0_cdb.count = cnt; + + scgp->cmdname = "mode sense g0"; + + if (scg_cmd(scgp) < 0) + return (-1); + if (scgp->verbose) scg_prbytes("Mode Sense Data", dp, cnt - scg_getresid(scgp)); + return (0); +} + +EXPORT int +mode_sense_g1(scgp, dp, cnt, page, pcf) + SCSI *scgp; + Uchar *dp; + int cnt; + int page; + int pcf; +{ + register struct scg_cmd *scmd = scgp->scmd; + + fillbytes((caddr_t)scmd, sizeof (*scmd), '\0'); + scmd->addr = (caddr_t)dp; + scmd->size = cnt; + scmd->flags = SCG_RECV_DATA|SCG_DISRE_ENA; + scmd->cdb_len = SC_G1_CDBLEN; + scmd->sense_len = CCS_SENSE_LEN; + scmd->cdb.g1_cdb.cmd = 0x5A; + scmd->cdb.g1_cdb.lun = scg_lun(scgp); +#ifdef nonono + scmd->cdb.g0_cdb.high_addr = 1<<4; /* DBD Disable Block desc. */ +#endif + scmd->cdb.g1_cdb.addr[0] = (page&0x3F) | ((pcf<<6)&0xC0); + g1_cdblen(&scmd->cdb.g1_cdb, cnt); + + scgp->cmdname = "mode sense g1"; + + if (scg_cmd(scgp) < 0) + return (-1); + if (scgp->verbose) scg_prbytes("Mode Sense Data", dp, cnt - scg_getresid(scgp)); + return (0); +} diff -Nru cdrtools-2.01.01a33/libscgcmd/noshlscgcmd.mk cdrtools-3.02a09/libscgcmd/noshlscgcmd.mk --- cdrtools-2.01.01a33/libscgcmd/noshlscgcmd.mk 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/libscgcmd/noshlscgcmd.mk 2008-10-26 20:55:10.000000000 +0000 @@ -0,0 +1,9 @@ +#ident @(#)noshlscgcmd.mk 1.1 08/10/26 +########################################################################### +SRCROOT= .. +RULESDIR= RULES +include $(SRCROOT)/$(RULESDIR)/rules.top +########################################################################### + +all: + @echo " ==> NO shared libs on this platform (yet)" diff -Nru cdrtools-2.01.01a33/libscgcmd/read.c cdrtools-3.02a09/libscgcmd/read.c --- cdrtools-2.01.01a33/libscgcmd/read.c 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/libscgcmd/read.c 2010-05-24 09:55:57.000000000 +0000 @@ -0,0 +1,113 @@ +/* @(#)read.c 1.159 10/05/24 Copyright 1995-2010 J. Schilling */ +#include +#ifndef lint +static UConst char sccsid[] = + "@(#)read.c 1.159 10/05/24 Copyright 1995-2010 J. Schilling"; +#endif +/* + * SCSI command functions for the read call + * + * Copyright (c) 1995-2010 J. Schilling + */ +/* + * The contents of this file are subject to the terms of the + * Common Development and Distribution License, Version 1.0 only + * (the "License"). You may not use this file except in compliance + * with the License. + * + * See the file CDDL.Schily.txt in this distribution for details. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file CDDL.Schily.txt from this distribution. + */ + +#include +#include + +#include +#include +#include +#include + +#include +#include +#include +#include + +#include "libscgcmd.h" + +EXPORT int read_scsi __PR((SCSI *scgp, caddr_t, long, int)); +EXPORT int read_g0 __PR((SCSI *scgp, caddr_t, long, int)); +EXPORT int read_g1 __PR((SCSI *scgp, caddr_t, long, int)); + +#define G0_MAXADDR 0x1FFFFFL + +EXPORT int +read_scsi(scgp, bp, addr, cnt) + SCSI *scgp; + caddr_t bp; + long addr; + int cnt; +{ + if (addr <= G0_MAXADDR && cnt < 256 && !__is_atapi()) + return (read_g0(scgp, bp, addr, cnt)); + else + return (read_g1(scgp, bp, addr, cnt)); +} + +EXPORT int +read_g0(scgp, bp, addr, cnt) + SCSI *scgp; + caddr_t bp; + long addr; + int cnt; +{ + register struct scg_cmd *scmd = scgp->scmd; + + if (scgp->cap->c_bsize <= 0) + raisecond("capacity_not_set", 0L); + + fillbytes((caddr_t)scmd, sizeof (*scmd), '\0'); + scmd->addr = bp; + scmd->size = cnt*scgp->cap->c_bsize; + scmd->flags = SCG_RECV_DATA|SCG_DISRE_ENA; + scmd->cdb_len = SC_G0_CDBLEN; + scmd->sense_len = CCS_SENSE_LEN; + scmd->cdb.g0_cdb.cmd = SC_READ; + scmd->cdb.g0_cdb.lun = scg_lun(scgp); + g0_cdbaddr(&scmd->cdb.g0_cdb, addr); + scmd->cdb.g0_cdb.count = cnt; +/* scmd->cdb.g0_cdb.vu_56 = 1;*/ + + scgp->cmdname = "read_g0"; + + return (scg_cmd(scgp)); +} + +EXPORT int +read_g1(scgp, bp, addr, cnt) + SCSI *scgp; + caddr_t bp; + long addr; + int cnt; +{ + register struct scg_cmd *scmd = scgp->scmd; + + if (scgp->cap->c_bsize <= 0) + raisecond("capacity_not_set", 0L); + + fillbytes((caddr_t)scmd, sizeof (*scmd), '\0'); + scmd->addr = bp; + scmd->size = cnt*scgp->cap->c_bsize; + scmd->flags = SCG_RECV_DATA|SCG_DISRE_ENA; + scmd->cdb_len = SC_G1_CDBLEN; + scmd->sense_len = CCS_SENSE_LEN; + scmd->cdb.g1_cdb.cmd = SC_EREAD; + scmd->cdb.g1_cdb.lun = scg_lun(scgp); + g1_cdbaddr(&scmd->cdb.g1_cdb, addr); + g1_cdblen(&scmd->cdb.g1_cdb, cnt); + + scgp->cmdname = "read_g1"; + + return (scg_cmd(scgp)); +} diff -Nru cdrtools-2.01.01a33/libscgcmd/readcap.c cdrtools-3.02a09/libscgcmd/readcap.c --- cdrtools-2.01.01a33/libscgcmd/readcap.c 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/libscgcmd/readcap.c 2009-07-10 21:55:16.000000000 +0000 @@ -0,0 +1,96 @@ +/* @(#)readcap.c 1.158 09/07/10 Copyright 1995-2009 J. Schilling */ +#include +#ifndef lint +static UConst char sccsid[] = + "@(#)readcap.c 1.158 09/07/10 Copyright 1995-2009 J. Schilling"; +#endif +/* + * SCSI command functions for read capacity + * + * Copyright (c) 1995-2009 J. Schilling + */ +/* + * The contents of this file are subject to the terms of the + * Common Development and Distribution License, Version 1.0 only + * (the "License"). You may not use this file except in compliance + * with the License. + * + * See the file CDDL.Schily.txt in this distribution for details. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file CDDL.Schily.txt from this distribution. + */ + +#include +#include + +#include +#include +#include +#include + +#include +#include +#include +#include + +#include "libscgcmd.h" + +EXPORT int read_capacity __PR((SCSI *scgp)); +EXPORT void print_capacity __PR((SCSI *scgp, FILE *f)); + + +EXPORT int +read_capacity(scgp) + SCSI *scgp; +{ + register struct scg_cmd *scmd = scgp->scmd; + + fillbytes((caddr_t)scmd, sizeof (*scmd), '\0'); + scmd->addr = (caddr_t)scgp->cap; + scmd->size = sizeof (struct scsi_capacity); + scmd->flags = SCG_RECV_DATA|SCG_DISRE_ENA; + scmd->cdb_len = SC_G1_CDBLEN; + scmd->sense_len = CCS_SENSE_LEN; + scmd->cdb.g1_cdb.cmd = 0x25; /* Read Capacity */ + scmd->cdb.g1_cdb.lun = scg_lun(scgp); + g1_cdblen(&scmd->cdb.g1_cdb, 0); /* Full Media */ + + scgp->cmdname = "read capacity"; + + if (scg_cmd(scgp) < 0) { + return (-1); + } else { + long cbsize; + long cbaddr; + + /* + * c_bsize & c_baddr are signed Int32_t + * so we use signed int conversion here. + */ + cbsize = a_to_4_byte(&scgp->cap->c_bsize); + cbaddr = a_to_4_byte(&scgp->cap->c_baddr); + scgp->cap->c_bsize = cbsize; + scgp->cap->c_baddr = cbaddr; + } + return (0); +} + +EXPORT void +print_capacity(scgp, f) + SCSI *scgp; + FILE *f; +{ + long kb; + long mb; + long prmb; + double dkb; + + dkb = (scgp->cap->c_baddr+1.0) * (scgp->cap->c_bsize/1024.0); + kb = dkb; + mb = dkb / 1024.0; + prmb = dkb / 1000.0 * 1.024; + fprintf(f, "Capacity: %ld Blocks = %ld kBytes = %ld MBytes = %ld prMB\n", + (long)scgp->cap->c_baddr+1, kb, mb, prmb); + fprintf(f, "Sectorsize: %ld Bytes\n", (long)scgp->cap->c_bsize); +} diff -Nru cdrtools-2.01.01a33/libscgcmd/ready.c cdrtools-3.02a09/libscgcmd/ready.c --- cdrtools-2.01.01a33/libscgcmd/ready.c 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/libscgcmd/ready.c 2009-07-10 21:55:16.000000000 +0000 @@ -0,0 +1,155 @@ +/* @(#)ready.c 1.158 09/07/10 Copyright 1995-2009 J. Schilling */ +#include +#ifndef lint +static UConst char sccsid[] = + "@(#)ready.c 1.158 09/07/10 Copyright 1995-2009 J. Schilling"; +#endif +/* + * SCSI command functions related to test unit ready + * + * Copyright (c) 1995-2009 J. Schilling + */ +/* + * The contents of this file are subject to the terms of the + * Common Development and Distribution License, Version 1.0 only + * (the "License"). You may not use this file except in compliance + * with the License. + * + * See the file CDDL.Schily.txt in this distribution for details. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file CDDL.Schily.txt from this distribution. + */ + +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include + +#include +#include +#include +#include + +#include "libscgcmd.h" + +EXPORT BOOL unit_ready __PR((SCSI *scgp)); +EXPORT BOOL wait_unit_ready __PR((SCSI *scgp, int secs)); +EXPORT int test_unit_ready __PR((SCSI *scgp)); + +EXPORT BOOL +unit_ready(scgp) + SCSI *scgp; +{ + register struct scg_cmd *scmd = scgp->scmd; + + if (test_unit_ready(scgp) >= 0) /* alles OK */ + return (TRUE); + else if (scmd->error >= SCG_FATAL) /* nicht selektierbar */ + return (FALSE); + + if (scg_sense_key(scgp) == SC_UNIT_ATTENTION) { + if (test_unit_ready(scgp) >= 0) /* alles OK */ + return (TRUE); + } + if ((scg_cmd_status(scgp) & ST_BUSY) != 0) { + /* + * Busy/reservation_conflict + */ + usleep(500000); + if (test_unit_ready(scgp) >= 0) /* alles OK */ + return (TRUE); + } + if (scg_sense_key(scgp) == -1) { /* non extended Sense */ + if (scg_sense_code(scgp) == 4) /* NOT_READY */ + return (FALSE); + return (TRUE); + } + /* FALSE wenn NOT_READY */ + return (scg_sense_key(scgp) != SC_NOT_READY); +} + +EXPORT BOOL +wait_unit_ready(scgp, secs) + SCSI *scgp; + int secs; +{ + int i; + int c; + int k; + int ret; + int err; + + seterrno(0); + scgp->silent++; + ret = test_unit_ready(scgp); /* eat up unit attention */ + if (ret < 0) { + err = geterrno(); + + if (err == EPERM || err == EACCES) { + scgp->silent--; + return (FALSE); + } + ret = test_unit_ready(scgp); /* got power on condition? */ + } + scgp->silent--; + + if (ret >= 0) /* success that's enough */ + return (TRUE); + + scgp->silent++; + for (i = 0; i < secs && (ret = test_unit_ready(scgp)) < 0; i++) { + if (scgp->scmd->scb.busy != 0) { + sleep(1); + continue; + } + c = scg_sense_code(scgp); + k = scg_sense_key(scgp); + /* + * Abort quickly if it does not make sense to wait. + * 0x30 == Cannot read medium + * 0x3A == Medium not present + */ + if ((k == SC_NOT_READY && (c == 0x3A || c == 0x30)) || + (k == SC_MEDIUM_ERROR)) { + if (scgp->silent <= 1) + scg_printerr(scgp); + scgp->silent--; + return (FALSE); + } + sleep(1); + } + scgp->silent--; + if (ret < 0) + return (FALSE); + return (TRUE); +} + +EXPORT int +test_unit_ready(scgp) + SCSI *scgp; +{ + register struct scg_cmd *scmd = scgp->scmd; + + fillbytes((caddr_t)scmd, sizeof (*scmd), '\0'); + scmd->addr = (caddr_t)0; + scmd->size = 0; + scmd->flags = SCG_DISRE_ENA | (scgp->silent ? SCG_SILENT:0); + scmd->cdb_len = SC_G0_CDBLEN; + scmd->sense_len = CCS_SENSE_LEN; + scmd->cdb.g0_cdb.cmd = SC_TEST_UNIT_READY; + scmd->cdb.g0_cdb.lun = scg_lun(scgp); + + scgp->cmdname = "test unit ready"; + + return (scg_cmd(scgp)); +} diff -Nru cdrtools-2.01.01a33/libscgcmd/shlscgcmd.mk cdrtools-3.02a09/libscgcmd/shlscgcmd.mk --- cdrtools-2.01.01a33/libscgcmd/shlscgcmd.mk 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/libscgcmd/shlscgcmd.mk 2008-10-26 22:04:26.000000000 +0000 @@ -0,0 +1,25 @@ +#ident @(#)shlscgcmd.mk 1.2 08/10/26 +########################################################################### +SRCROOT= .. +RULESDIR= RULES +include $(SRCROOT)/$(RULESDIR)/rules.top +########################################################################### + +SUBARCHDIR= /pic +#.SEARCHLIST: . $(ARCHDIR) stdio $(ARCHDIR) +#VPATH= .:stdio:$(ARCHDIR) +INSDIR= lib +TARGETLIB= scgcmd +CPPOPTS += -I. +CPPOPTS += -I../libscg +CPPOPTS += -DUSE_LARGEFILES +CPPOPTS += -DSCHILY_PRINT + +include Targets +LIBS= -lscg -lschily -lc + +########################################################################### +include $(SRCROOT)/$(RULESDIR)/rules.shl +########################################################################### +#CC= echo " ==> COMPILING \"$@\""; cc +########################################################################### diff -Nru cdrtools-2.01.01a33/libscgcmd/Targets cdrtools-3.02a09/libscgcmd/Targets --- cdrtools-2.01.01a33/libscgcmd/Targets 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/libscgcmd/Targets 2008-10-26 21:04:03.000000000 +0000 @@ -0,0 +1,5 @@ +# @(#)Targets 1.1 08/10/26 Copyright 2008 J. Schilling + +CFILES= buffer.c inquiry.c modes.c modesense.c read.c readcap.c ready.c + +HFILES= libscgcmd.h diff -Nru cdrtools-2.01.01a33/libschily/absfpath.3 cdrtools-3.02a09/libschily/absfpath.3 --- cdrtools-2.01.01a33/libschily/absfpath.3 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/libschily/absfpath.3 2015-04-27 19:36:32.000000000 +0000 @@ -0,0 +1,2 @@ +.so man3/abspath.3 +.\" @(#)absfpath.3 1.1 15/04/27 joerg diff -Nru cdrtools-2.01.01a33/libschily/absfpath.mk3 cdrtools-3.02a09/libschily/absfpath.mk3 --- cdrtools-2.01.01a33/libschily/absfpath.mk3 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/libschily/absfpath.mk3 2015-04-27 19:36:16.000000000 +0000 @@ -0,0 +1,18 @@ +#ident @(#)absfpath.mk3 1.1 15/04/27 +########################################################################### +# Sample makefile for installing manual pages +########################################################################### +SRCROOT= .. +RULESDIR= RULES +include $(SRCROOT)/$(RULESDIR)/rules.top +########################################################################### + +MANDIR= man +TARGETMAN= absfpath +MANSECT= $(MANSECT_LIB) +MANSUFFIX= $(MANSUFF_LIB) +MANFILE= absfpath.3 + +########################################################################### +include $(SRCROOT)/$(RULESDIR)/rules.man +########################################################################### diff -Nru cdrtools-2.01.01a33/libschily/absnpath.3 cdrtools-3.02a09/libschily/absnpath.3 --- cdrtools-2.01.01a33/libschily/absnpath.3 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/libschily/absnpath.3 2015-04-27 19:36:32.000000000 +0000 @@ -0,0 +1,2 @@ +.so man3/abspath.3 +.\" @(#)absnpath.3 1.1 15/04/27 joerg diff -Nru cdrtools-2.01.01a33/libschily/absnpath.mk3 cdrtools-3.02a09/libschily/absnpath.mk3 --- cdrtools-2.01.01a33/libschily/absnpath.mk3 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/libschily/absnpath.mk3 2015-04-27 19:36:16.000000000 +0000 @@ -0,0 +1,18 @@ +#ident @(#)absnpath.mk3 1.1 15/04/27 +########################################################################### +# Sample makefile for installing manual pages +########################################################################### +SRCROOT= .. +RULESDIR= RULES +include $(SRCROOT)/$(RULESDIR)/rules.top +########################################################################### + +MANDIR= man +TARGETMAN= absnpath +MANSECT= $(MANSECT_LIB) +MANSUFFIX= $(MANSUFF_LIB) +MANFILE= absnpath.3 + +########################################################################### +include $(SRCROOT)/$(RULESDIR)/rules.man +########################################################################### diff -Nru cdrtools-2.01.01a33/libschily/abspath.3 cdrtools-3.02a09/libschily/abspath.3 --- cdrtools-2.01.01a33/libschily/abspath.3 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/libschily/abspath.3 2015-04-27 19:39:00.000000000 +0000 @@ -0,0 +1,97 @@ +. \" Manual Seite fuer abspath +. \" @(#)abspath.3 1.1 15/04/27 Copyright 2015 J. Schilling +. \" +.if t .ds a \v'-0.55m'\h'0.00n'\z.\h'0.40n'\z.\v'0.55m'\h'-0.40n'a +.if t .ds o \v'-0.55m'\h'0.00n'\z.\h'0.45n'\z.\v'0.55m'\h'-0.45n'o +.if t .ds u \v'-0.55m'\h'0.00n'\z.\h'0.40n'\z.\v'0.55m'\h'-0.40n'u +.if t .ds A \v'-0.77m'\h'0.25n'\z.\h'0.45n'\z.\v'0.77m'\h'-0.70n'A +.if t .ds O \v'-0.77m'\h'0.25n'\z.\h'0.45n'\z.\v'0.77m'\h'-0.70n'O +.if t .ds U \v'-0.77m'\h'0.30n'\z.\h'0.45n'\z.\v'0.77m'\h'-.75n'U +.if t .ds s \(*b +.if t .ds S SS +.if n .ds a ae +.if n .ds o oe +.if n .ds u ue +.if n .ds s sz +.TH ABSPATH 3 "%e%" "J\*org Schilling" "Schily\'s LIBRARY FUNCTIONS" +.SH NAME +abspath(), absnpath(), absfpath() \- Expands a relative pathname to a full (absolute) pathname +.SH SYNOPSIS +.nf +#include +.sp +.B char * +.B abspath(relp, absp, asize) +.B " const char *relp; +.B " char *absp; +.B " size_t asize; +.sp +.B char * +.B absnpath(relp, absp, asize) +.B " const char *relp; +.B " char *absp; +.B " size_t asize; +.sp +.B char * +.B absfpath(relp, absp, asize, flags) +.B " const char *relp; +.B " char *absp; +.B " size_t asize; +.B " int flags; +.fi +.SH DESCRIPTION +.LP +.BR abspath () +takes a relative path name and converts it into an absolute path name. +.I relp +is relative path name that is used as the input. +.I absp +is the buffer used for the result of the conversion. +.I asize +is the size of the result buffer. +.LP +.BR absnpath () +behaves like +.BR abspath () +exept that the file does not need to exist. +.LP +.BR absfpath () +takes an additional +.I flags +parameter from the set of flags from +.BR resolvefpath () +to control the behavior. + +.SH RETURN VALUE +.LP +On successful completion, +.BR abspath(), +.BR absnpath() +and +.BR absfpath() +return a pointer to the resolved name +.BR absp . +Otherwise, a null pointer is returned and errno is set to indicate +the error, and the contents of the buffer pointed to by +.B absp +is left in an indeterminate state. +.SH ERRORS +.LP +.TP 10 +.B ERANGE +The path does not fit into the suplied buffer. +.TP +.B EFAULT +A null pointer was suplied as pathname. +.TP +.B EINVAL +An empty relative path was supplied. +.SH EXAMPLES +.LP +.SH "SEE ALSO" +.LP +.BR resolvepath (3), +.BR resolvenpath (3), +.BR resolvefpath (3) +.SH NOTES +none diff -Nru cdrtools-2.01.01a33/libschily/abspath.c cdrtools-3.02a09/libschily/abspath.c --- cdrtools-2.01.01a33/libschily/abspath.c 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/libschily/abspath.c 2013-10-30 20:06:10.000000000 +0000 @@ -0,0 +1,206 @@ +/* @(#)abspath.c 1.5 13/10/30 Copyright 2011-2013 J. Schilling */ +/* + * Compute the absolute path for a relative path name + * + * Copyright (c) 2011-2013 J. Schilling + */ +/* + * The contents of this file are subject to the terms of the + * Common Development and Distribution License, Version 1.0 only + * (the "License"). You may not use this file except in compliance + * with the License. + * + * See the file CDDL.Schily.txt in this distribution for details. + * A copy of the CDDL is also available via the Internet at + * http://www.opensource.org/licenses/cddl1.txt + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file CDDL.Schily.txt from this distribution. + */ + +#include +#include +#include +#include +#include +#include +#include + +EXPORT char *abspath __PR((const char *relp, char *absp, size_t asize)); +EXPORT char *absnpath __PR((const char *relp, char *absp, size_t asize)); +LOCAL char *pathabs __PR((const char *relp, char *absp, size_t asize, int flags)); +LOCAL void ashorten __PR((char *name)); + +/* + * Expands a relative pathname to a full (absolute) pathname. + */ +EXPORT char * +abspath(relp, absp, asize) + const char *relp; + char *absp; + size_t asize; +{ + return (pathabs(relp, absp, asize, RSPF_EXIST)); +} + +/* + * Expands a relative pathname to a full (absolute) pathname. + * Not all path elements need to exist. + */ +EXPORT char * +absnpath(relp, absp, asize) + const char *relp; + char *absp; + size_t asize; +{ + return (pathabs(relp, absp, asize, 0)); +} + +/* + * Expands a relative pathname to a full (absolute) pathname. + * The behavior may be controlled via flags. + */ +EXPORT char * +absfpath(relp, absp, asize, flags) + const char *relp; + char *absp; + size_t asize; + int flags; +{ + return (pathabs(relp, absp, asize, flags)); +} + +/* + * Expands a relative pathname to a full (absolute) pathname. + */ +LOCAL char * +pathabs(relp, absp, asize, flags) + const char *relp; + char *absp; + size_t asize; + int flags; +{ + register char *rel; + register char *full; + int ret; + + ret = resolvefpath(relp, absp, asize, flags); + if (ret < 0) + return (NULL); /* errno set by resolvepath() */ + if (ret >= asize) { + seterrno(ERANGE); + return (NULL); + } + if (absp[0] == '/') + return (absp); + + if (absp[0] == '.' && absp[1] == '\0') + return (getcwd(absp, asize)); /* Working directory. */ + + { int len = strlen(absp)+1; +#ifdef HAVE_DYN_ARRAYS + char tbuf[len]; +#else + char *tbuf = malloc(len); + if (tbuf == NULL) + return (NULL); +#endif + strcpy(tbuf, absp); + absp[0] = '\0'; + full = getcwd(absp, asize); /* Working directory. */ + + if (full && strlcat(full, "/", asize) >= asize) { + seterrno(ERANGE); + full = NULL; + } + if (full && strlcat(full, tbuf, asize) >= asize) { + seterrno(ERANGE); + full = NULL; + } + +#ifndef HAVE_DYN_ARRAYS + free(tbuf); +#endif + if (full == NULL) + return (full); + } + rel = full; + for (;;) { + for (;;) { + rel = strchr(++rel, '/'); + if (rel == NULL) + break; + if (rel[1] == '/' || rel[1] == '\0') { + *rel++ = '\0'; + /* CSTYLED */ + /* /foo//bar = /foo/bar */ + while (rel[0] == '/') + rel++; + break; + } + if (rel[1] == '.') { + /* /foo/./bar = /foo/bar */ + if (rel[2] == '/') { + *rel = '\0'; + rel += 3; + break; + } + /* /foo/. = /foo */ + if (rel[2] == '\0') { + *rel = '\0'; + rel += 2; + break; + } + if (rel[2] == '.') { + /* /foo/../bar = /bar */ + if (rel[3] == '/') { + *rel = '\0'; + rel += 4; + ashorten(full); + break; + } + /* /foo/bar/.. = /foo */ + if (rel[3] == '\0') { + *rel = '\0'; + ashorten(full); + break; + } + } + } + } + if (rel == NULL || rel[0] == '\0') + break; + +#ifdef DEBUG + printf("%s / %s\n", full, rel); +#endif + if (strlcat(full, "/", asize) >= asize) { + seterrno(ERANGE); + return (NULL); + } + if (strlcat(full, rel, asize) >= asize) { + seterrno(ERANGE); + return (NULL); + } + rel = full; + } + if (full[1] == '.' && full[2] == '\0') /* /. = / */ + full[1] = '\0'; + return (full); +} + +/* + * Removes last path name component in absolute path name. + */ +LOCAL void +ashorten(name) + register char *name; +{ + register char *p; + + for (p = name++; *p++ != '\0'; ); + while (p > name) + if (*--p == '/') + break; + *p = '\0'; +} diff -Nru cdrtools-2.01.01a33/libschily/abspath.mk3 cdrtools-3.02a09/libschily/abspath.mk3 --- cdrtools-2.01.01a33/libschily/abspath.mk3 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/libschily/abspath.mk3 2015-04-26 18:01:43.000000000 +0000 @@ -0,0 +1,18 @@ +#ident @(#)abspath.mk3 1.1 15/04/26 +########################################################################### +# Sample makefile for installing manual pages +########################################################################### +SRCROOT= .. +RULESDIR= RULES +include $(SRCROOT)/$(RULESDIR)/rules.top +########################################################################### + +MANDIR= man +TARGETMAN= abspath +MANSECT= $(MANSECT_LIB) +MANSUFFIX= $(MANSUFF_LIB) +MANFILE= abspath.3 + +########################################################################### +include $(SRCROOT)/$(RULESDIR)/rules.man +########################################################################### diff -Nru cdrtools-2.01.01a33/libschily/astoi.3 cdrtools-3.02a09/libschily/astoi.3 --- cdrtools-2.01.01a33/libschily/astoi.3 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/libschily/astoi.3 2015-04-26 13:42:06.000000000 +0000 @@ -0,0 +1,55 @@ +. \" Manual Seite fuer astoi +. \" @(#)astoi.3 1.3 15/04/26 Copyright 2015 J. Schilling +. \" +.if t .ds a \v'-0.55m'\h'0.00n'\z.\h'0.40n'\z.\v'0.55m'\h'-0.40n'a +.if t .ds o \v'-0.55m'\h'0.00n'\z.\h'0.45n'\z.\v'0.55m'\h'-0.45n'o +.if t .ds u \v'-0.55m'\h'0.00n'\z.\h'0.40n'\z.\v'0.55m'\h'-0.40n'u +.if t .ds A \v'-0.77m'\h'0.25n'\z.\h'0.45n'\z.\v'0.77m'\h'-0.70n'A +.if t .ds O \v'-0.77m'\h'0.25n'\z.\h'0.45n'\z.\v'0.77m'\h'-0.70n'O +.if t .ds U \v'-0.77m'\h'0.30n'\z.\h'0.45n'\z.\v'0.77m'\h'-.75n'U +.if t .ds s \(*b +.if t .ds S SS +.if n .ds a ae +.if n .ds o oe +.if n .ds u ue +.if n .ds s sz +.TH ASTOI 3 "15. Juli 1988" "J\*org Schilling" "Schily\'s LIBRARY FUNCTIONS" +.SH NAME +astoi() \- converts ASCII to integer +.SH SYNOPSIS +.nf +#include +.sp +.B char *astoi(string,result) +.B + char *string; /* the string to convert */ +.B + int *result; /* where to store the result */ +.fi +.SH DESCRIPTION +astoi() converts the characters pointed to by string to an integer +stored at +.IR result . +It returns a pointer to the first character in the +string that was not used for the conversion. If the entire +string is to be used, it should point to a NULL character +('\\0'). +Leading spaces and tabs are skipped. +.LP +The ASCII string accepts a leading `+' or `\-'. A leading zero in +the string makes the number octal, while a leading 0x makes the +number hexadecimal. +Leading spaces and tabs are skipped. +.SH RETURNS +Returns a pointer to the first unused character. +.SH EXAMPLES +.nf +if (*astoi(string, &i) != '\\0') + error("Not a number %s\\n", string); +.fi +.SH "SEE ALSO" +.BR astol (3) +.SH NOTES +Range errors are not checked. Conversion stops (and a pointer +is returned) at the first non-numeric character other than the +leading sign or 0x, as described above. diff -Nru cdrtools-2.01.01a33/libschily/astoi.c cdrtools-3.02a09/libschily/astoi.c --- cdrtools-2.01.01a33/libschily/astoi.c 2006-09-13 15:05:35.000000000 +0000 +++ cdrtools-3.02a09/libschily/astoi.c 2015-12-10 20:23:38.000000000 +0000 @@ -1,4 +1,4 @@ -/* @(#)astoi.c 1.9 06/09/13 Copyright 1985, 1995-2003 J. Schilling */ +/* @(#)astoi.c 1.11 15/12/10 Copyright 1985, 1995-2015 J. Schilling */ /* * astoi() converts a string to int * astol() converts a string to long @@ -11,7 +11,7 @@ * leading "0" makes conversion octal (base 8) * leading "0x" makes conversion hex (base 16) * - * Copyright (c) 1985, 1995-2003 J. Schilling + * Copyright (c) 1985, 1995-2015 J. Schilling */ /* * The contents of this file are subject to the terms of the @@ -20,6 +20,8 @@ * with the License. * * See the file CDDL.Schily.txt in this distribution for details. + * A copy of the CDDL is also available via the Internet at + * http://www.opensource.org/licenses/cddl1.txt * * When distributing Covered Code, include this CDDL HEADER in each * file and include the License file CDDL.Schily.txt from this distribution. @@ -27,6 +29,7 @@ #include #include +#include #define is_space(c) ((c) == ' ' || (c) == '\t') #define is_digit(c) ((c) >= '0' && (c) <= '9') @@ -34,8 +37,16 @@ ((c) >= 'a' && (c) <= 'f') || \ ((c) >= 'A' && (c) <= 'F')) +#define is_lower(c) ((c) >= 'a' && (c) <= 'z') +#define is_upper(c) ((c) >= 'A' && (c) <= 'Z') #define to_lower(c) (((c) >= 'A' && (c) <= 'Z') ? (c) - 'A'+'a' : (c)) +#if ('i' + 1) < 'j' +#define BASE_MAX ('i' - 'a' + 10 + 1) /* This is EBCDIC */ +#else +#define BASE_MAX ('z' - 'a' + 10 + 1) /* This is ASCII */ +#endif + #ifdef notdef EXPORT int atoi(s) @@ -44,7 +55,7 @@ long l; (void) astol(s, &l); - return ((int) l); + return ((int)l); } EXPORT long @@ -68,6 +79,16 @@ ret = astol(s, &l); *i = l; +#if SIZEOF_INT != SIZEOF_LONG_INT + if (*i != l) { + if (l < 0) { + *i = TYPE_MINVAL(int); + } else { + *i = TYPE_MAXVAL(int); + } + seterrno(ERANGE); + } +#endif return (ret); } @@ -86,10 +107,17 @@ register int base; { int neg = 0; - register long ret = 0L; + register unsigned long ret = 0L; + unsigned long maxmult; + unsigned long maxval; register int digit; register char c; + if (base > BASE_MAX || base == 1 || base < 0) { + seterrno(EINVAL); + return ((char *)s); + } + while (is_space(*s)) s++; @@ -112,25 +140,65 @@ base = 10; } } + if (neg) { + /* + * Portable way to compute the positive value of "min-long" + * as -TYPE_MINVAL(long) does not work. + */ + maxval = ((unsigned long)(-1 * (TYPE_MINVAL(long)+1))) + 1; + } else { + maxval = TYPE_MAXVAL(long); + } + maxmult = maxval / base; for (; (c = *s) != 0; s++) { if (is_digit(c)) { digit = c - '0'; - } else if (is_hex(c)) { - digit = to_lower(c) - 'a' + 10; + } else if (is_lower(c)) { + digit = c - 'a' + 10; + } else if (is_upper(c)) { + digit = c - 'A' + 10; } else { break; } if (digit < base) { + if (ret > maxmult) + goto overflow; ret *= base; + if (maxval - ret < digit) + goto overflow; ret += digit; } else { break; } } - if (neg) - ret = -ret; - *l = ret; + if (neg) { + *l = (Llong)-1 * ret; + } else { + *l = (Llong)ret; + } + return ((char *)s); +overflow: + for (; (c = *s) != 0; s++) { + + if (is_digit(c)) { + digit = c - '0'; + } else if (is_lower(c)) { + digit = c - 'a' + 10; + } else if (is_upper(c)) { + digit = c - 'A' + 10; + } else { + break; + } + if (digit >= base) + break; + } + if (neg) { + *l = TYPE_MINVAL(long); + } else { + *l = TYPE_MAXVAL(long); + } + seterrno(ERANGE); return ((char *)s); } diff -Nru cdrtools-2.01.01a33/libschily/astoi.mk3 cdrtools-3.02a09/libschily/astoi.mk3 --- cdrtools-2.01.01a33/libschily/astoi.mk3 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/libschily/astoi.mk3 2015-04-26 18:01:43.000000000 +0000 @@ -0,0 +1,18 @@ +#ident @(#)astoi.mk3 1.1 15/04/26 +########################################################################### +# Sample makefile for installing manual pages +########################################################################### +SRCROOT= .. +RULESDIR= RULES +include $(SRCROOT)/$(RULESDIR)/rules.top +########################################################################### + +MANDIR= man +TARGETMAN= astoi +MANSECT= $(MANSECT_LIB) +MANSUFFIX= $(MANSUFF_LIB) +MANFILE= astoi.3 + +########################################################################### +include $(SRCROOT)/$(RULESDIR)/rules.man +########################################################################### diff -Nru cdrtools-2.01.01a33/libschily/astol.3 cdrtools-3.02a09/libschily/astol.3 --- cdrtools-2.01.01a33/libschily/astol.3 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/libschily/astol.3 2015-04-26 12:41:00.000000000 +0000 @@ -0,0 +1,45 @@ +. \" Manual Seite fuer astol +. \" @(#)astol.3 1.1 +. \" +.if t .ds a \v'-0.55m'\h'0.00n'\z.\h'0.40n'\z.\v'0.55m'\h'-0.40n'a +.if t .ds o \v'-0.55m'\h'0.00n'\z.\h'0.45n'\z.\v'0.55m'\h'-0.45n'o +.if t .ds u \v'-0.55m'\h'0.00n'\z.\h'0.40n'\z.\v'0.55m'\h'-0.40n'u +.if t .ds A \v'-0.77m'\h'0.25n'\z.\h'0.45n'\z.\v'0.77m'\h'-0.70n'A +.if t .ds O \v'-0.77m'\h'0.25n'\z.\h'0.45n'\z.\v'0.77m'\h'-0.70n'O +.if t .ds U \v'-0.77m'\h'0.30n'\z.\h'0.45n'\z.\v'0.77m'\h'-.75n'U +.if t .ds s \(*b +.if t .ds S SS +.if n .ds a ae +.if n .ds o oe +.if n .ds u ue +.if n .ds s sz +.TH ASTOL 3 "15. Juli 1988" "J\*org Schilling" "Schily\'s LIBRARY FUNCTIONS" +.SH NAME +astol() \- converts ASCII to long +.SH SYNOPSIS +.nf +.B astol(string,l) +.B char *string; +.B int *l; +.fi +.SH DESCRIPTION +astol() converts the characters pointed to by string to a long +stored at l. It returns a pointer to the first character in the +string that was not used for the conversion. If the entire +string is to be used, it should point to a NULL character +('\\0'). +Leading spaces and tabs are skipped. +.SH RETURN VALUES +.SH ERRORS +.SH EXAMPLES +.nf +extern char *astol(); +if (*astod(string, &l) != '\\0') + error("Not a number %s\\n", string); +.fi +.SH "SEE ALSO" +astod(3), astof(3), astoi(3) +.SH RETURNS +Returns a pointer to first unused character. +.SH NOTES +none diff -Nru cdrtools-2.01.01a33/libschily/astoll.c cdrtools-3.02a09/libschily/astoll.c --- cdrtools-2.01.01a33/libschily/astoll.c 2006-09-13 15:05:35.000000000 +0000 +++ cdrtools-3.02a09/libschily/astoll.c 2015-12-10 20:24:14.000000000 +0000 @@ -1,4 +1,4 @@ -/* @(#)astoll.c 1.4 06/09/13 Copyright 1985, 2000-2003 J. Schilling */ +/* @(#)astoll.c 1.5 15/12/10 Copyright 1985, 2000-2015 J. Schilling */ /* * astoll() converts a string to long long * @@ -13,7 +13,7 @@ * Llong is silently reverted to long if the compiler does not * support long long. * - * Copyright (c) 1985, 2000-2003 J. Schilling + * Copyright (c) 1985, 2000-2015 J. Schilling */ /* * The contents of this file are subject to the terms of the @@ -22,6 +22,8 @@ * with the License. * * See the file CDDL.Schily.txt in this distribution for details. + * A copy of the CDDL is also available via the Internet at + * http://www.opensource.org/licenses/cddl1.txt * * When distributing Covered Code, include this CDDL HEADER in each * file and include the License file CDDL.Schily.txt from this distribution. @@ -31,6 +33,7 @@ #include #include #include +#include #define is_space(c) ((c) == ' ' || (c) == '\t') #define is_digit(c) ((c) >= '0' && (c) <= '9') @@ -38,8 +41,17 @@ ((c) >= 'a' && (c) <= 'f') || \ ((c) >= 'A' && (c) <= 'F')) +#define is_lower(c) ((c) >= 'a' && (c) <= 'z') +#define is_upper(c) ((c) >= 'A' && (c) <= 'Z') #define to_lower(c) (((c) >= 'A' && (c) <= 'Z') ? (c) - 'A'+'a' : (c)) +#if ('i' + 1) < 'j' +#define BASE_MAX ('i' - 'a' + 10 + 1) /* This is EBCDIC */ +#else +#define BASE_MAX ('z' - 'a' + 10 + 1) /* This is ASCII */ +#endif + + char * astoll(s, l) register const char *s; @@ -55,10 +67,17 @@ register int base; { int neg = 0; - register Llong ret = (Llong)0; + register ULlong ret = (ULlong)0; + ULlong maxmult; + ULlong maxval; register int digit; register char c; + if (base > BASE_MAX || base == 1 || base < 0) { + seterrno(EINVAL); + return ((char *)s); + } + while (is_space(*s)) s++; @@ -81,25 +100,65 @@ base = 10; } } + if (neg) { + /* + * Portable way to compute the positive value of "min-Llong" + * as -TYPE_MINVAL(Llong) does not work. + */ + maxval = ((ULlong)(-1 * (TYPE_MINVAL(Llong)+1))) + 1; + } else { + maxval = TYPE_MAXVAL(Llong); + } + maxmult = maxval / base; for (; (c = *s) != 0; s++) { if (is_digit(c)) { digit = c - '0'; - } else if (is_hex(c)) { - digit = to_lower(c) - 'a' + 10; + } else if (is_lower(c)) { + digit = c - 'a' + 10; + } else if (is_upper(c)) { + digit = c - 'A' + 10; } else { break; } if (digit < base) { + if (ret > maxmult) + goto overflow; ret *= base; + if (maxval - ret < digit) + goto overflow; ret += digit; } else { break; } } - if (neg) - ret = -ret; - *l = ret; + if (neg) { + *l = (Llong)-1 * ret; + } else { + *l = (Llong)ret; + } + return ((char *)s); +overflow: + for (; (c = *s) != 0; s++) { + + if (is_digit(c)) { + digit = c - '0'; + } else if (is_lower(c)) { + digit = c - 'a' + 10; + } else if (is_upper(c)) { + digit = c - 'A' + 10; + } else { + break; + } + if (digit >= base) + break; + } + if (neg) { + *l = TYPE_MINVAL(Llong); + } else { + *l = TYPE_MAXVAL(Llong); + } + seterrno(ERANGE); return ((char *)s); } diff -Nru cdrtools-2.01.01a33/libschily/astol.mk3 cdrtools-3.02a09/libschily/astol.mk3 --- cdrtools-2.01.01a33/libschily/astol.mk3 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/libschily/astol.mk3 2015-04-26 18:01:43.000000000 +0000 @@ -0,0 +1,18 @@ +#ident @(#)astol.mk3 1.1 15/04/26 +########################################################################### +# Sample makefile for installing manual pages +########################################################################### +SRCROOT= .. +RULESDIR= RULES +include $(SRCROOT)/$(RULESDIR)/rules.top +########################################################################### + +MANDIR= man +TARGETMAN= astol +MANSECT= $(MANSECT_LIB) +MANSUFFIX= $(MANSUFF_LIB) +MANFILE= astol.3 + +########################################################################### +include $(SRCROOT)/$(RULESDIR)/rules.man +########################################################################### diff -Nru cdrtools-2.01.01a33/libschily/astoul.c cdrtools-3.02a09/libschily/astoul.c --- cdrtools-2.01.01a33/libschily/astoul.c 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/libschily/astoul.c 2015-12-10 20:20:40.000000000 +0000 @@ -0,0 +1,158 @@ +/* @(#)astoul.c 1.1 15/12/10 Copyright 1985, 2000-2015 J. Schilling */ +/* + * astoul() converts a string to unsigned long + * + * Leading tabs and spaces are ignored. + * Both return pointer to the first char that has not been used. + * Caller must check if this means a bad conversion. + * + * leading "+" is ignored + * leading "0" makes conversion octal (base 8) + * leading "0x" makes conversion hex (base 16) + * + * Copyright (c) 1985, 2000-2015 J. Schilling + */ +/* + * The contents of this file are subject to the terms of the + * Common Development and Distribution License, Version 1.0 only + * (the "License"). You may not use this file except in compliance + * with the License. + * + * See the file CDDL.Schily.txt in this distribution for details. + * A copy of the CDDL is also available via the Internet at + * http://www.opensource.org/licenses/cddl1.txt + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file CDDL.Schily.txt from this distribution. + */ + +#include +#include +#include +#include +#include + +#define is_space(c) ((c) == ' ' || (c) == '\t') +#define is_digit(c) ((c) >= '0' && (c) <= '9') +#define is_hex(c) (\ + ((c) >= 'a' && (c) <= 'f') || \ + ((c) >= 'A' && (c) <= 'F')) + +#define is_lower(c) ((c) >= 'a' && (c) <= 'z') +#define is_upper(c) ((c) >= 'A' && (c) <= 'Z') +#define to_lower(c) (((c) >= 'A' && (c) <= 'Z') ? (c) - 'A'+'a' : (c)) + +#if ('i' + 1) < 'j' +#define BASE_MAX ('i' - 'a' + 10 + 1) /* This is EBCDIC */ +#else +#define BASE_MAX ('z' - 'a' + 10 + 1) /* This is ASCII */ +#endif + + + +EXPORT char *astoul __PR((const char *s, unsigned long *l)); +EXPORT char *astoulb __PR((const char *s, unsigned long *l, int base)); + +EXPORT char * +astoul(s, l) + register const char *s; + unsigned long *l; +{ + return (astoulb(s, l, 0)); +} + +EXPORT char * +astoulb(s, l, base) + register const char *s; + unsigned long *l; + register int base; +{ +#ifdef DO_SIGNED + int neg = 0; +#endif + register unsigned long ret = (unsigned long)0; + unsigned long maxmult; + register int digit; + register char c; + + if (base > BASE_MAX || base == 1 || base < 0) { + seterrno(EINVAL); + return ((char *)s); + } + + while (is_space(*s)) + s++; + + if (*s == '+') { + s++; + } else if (*s == '-') { +#ifndef DO_SIGNED + seterrno(EINVAL); + return ((char *)s); +#else + s++; + neg++; +#endif + } + + if (base == 0) { + if (*s == '0') { + base = 8; + s++; + if (*s == 'x' || *s == 'X') { + s++; + base = 16; + } + } else { + base = 10; + } + } + maxmult = TYPE_MAXVAL(unsigned long) / base; + for (; (c = *s) != 0; s++) { + + if (is_digit(c)) { + digit = c - '0'; + } else if (is_lower(c)) { + digit = c - 'a' + 10; + } else if (is_upper(c)) { + digit = c - 'A' + 10; + } else { + break; + } + + if (digit < base) { + if (ret > maxmult) + goto overflow; + ret *= base; + if (TYPE_MAXVAL(unsigned long) - ret < digit) + goto overflow; + ret += digit; + } else { + break; + } + } +#ifdef DO_SIGNED + if (neg) + ret = -ret; +#endif + *l = ret; + return ((char *)s); +overflow: + for (; (c = *s) != 0; s++) { + + if (is_digit(c)) { + digit = c - '0'; + } else if (is_lower(c)) { + digit = c - 'a' + 10; + } else if (is_upper(c)) { + digit = c - 'A' + 10; + } else { + break; + } + if (digit >= base) + break; + } + *l = TYPE_MAXVAL(unsigned long); + seterrno(ERANGE); + return ((char *)s); +} diff -Nru cdrtools-2.01.01a33/libschily/astoull.c cdrtools-3.02a09/libschily/astoull.c --- cdrtools-2.01.01a33/libschily/astoull.c 2006-09-26 11:19:50.000000000 +0000 +++ cdrtools-3.02a09/libschily/astoull.c 2009-07-26 17:48:27.000000000 +0000 @@ -1,4 +1,4 @@ -/* %Z%%M% %I% %E% Copyright 1985, 2000-2006 J. Schilling */ +/* @(#)astoull.c 1.2 09/07/26 Copyright 1985, 2000-2006 J. Schilling */ /* * astoll() converts a string to long long * @@ -77,7 +77,7 @@ register char c; if (base > BASE_MAX || base == 1 || base < 0) { - errno = EINVAL; + seterrno(EINVAL); return ((char *)s); } @@ -88,7 +88,7 @@ s++; } else if (*s == '-') { #ifndef DO_SIGNED - errno = EINVAL; + seterrno(EINVAL); return ((char *)s); #else s++; @@ -159,6 +159,6 @@ break; } *l = TYPE_MAXVAL(Ullong); - errno = ERANGE; + seterrno(ERANGE); return ((char *)s); } diff -Nru cdrtools-2.01.01a33/libschily/at-base2.c cdrtools-3.02a09/libschily/at-base2.c --- cdrtools-2.01.01a33/libschily/at-base2.c 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/libschily/at-base2.c 2013-10-30 22:36:08.000000000 +0000 @@ -0,0 +1,235 @@ +/* @(#)at-base2.c 1.1 13/10/30 Copyright 2011-2013 J. Schilling */ +/* + * Emulate the behavior of openat(fd, name, flag, mode) + * + * Note that emulation methods that do not use the /proc filesystem are + * not MT safe. In the non-MT-safe case, we do: + * + * savewd()/fchdir()/open(name)/restorewd() + * + * Errors may force us to abort the program as our caller is not expected + * to know that we do more than a simple open() here and that the + * working directory may be changed by us. + * + * Copyright (c) 2011-13 J. Schilling + */ +/* + * The contents of this file are subject to the terms of the + * Common Development and Distribution License, Version 1.0 only + * (the "License"). You may not use this file except in compliance + * with the License. + * + * See the file CDDL.Schily.txt in this distribution for details. + * A copy of the CDDL is also available via the Internet at + * http://www.opensource.org/licenses/cddl1.txt + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file CDDL.Schily.txt from this distribution. + */ + +#ifndef ENAMETOOLONG +#define ENAMETOOLONG EINVAL +#endif + +EXPORT FUNC_RESULT +FUNC_NAME(fd1, name1, fd2, name2 KR_ARGS) + int fd1; + const char *name1; + int fd2; + const char *name2; + KR_DECL +{ + int n; + BOOL same_fd = FALSE; + FUNC_RESULT ret = 0; + char buf1[PATH_MAX]; + char buf2[PATH_MAX]; + char *proc_name1; + char *proc_name2; + struct save_wd save_wd; + + FLAG_CHECK(); + +/* + * There are 17 cases to implement: + * + * case fd1 name1 fd2 name2 + * 1 AT_CWD absolute AT_CWD absolute call xxx(name1, name2) + * 2 AT_CWD absolute AT_CWD relative call xxx(name1, name2) + * 3 AT_CWD relative AT_CWD absolute call xxx(name1, name2) + * 4 AT_CWD relative AT_CWD relative call xxx(name1, name2) + * 5 AT_CWD absolute fd absolute call xxx(name1, name2) + * 6 AT_CWD relative fd absolute call xxx(name1, name2) + * 7 fd absolute AT_CWD absolute call xxx(name1, name2) + * 8 fd absolute AT_CWD relative call xxx(name1, name2) + * 9 fd absolute fd absolute call xxx(name1, name2) + * + * 10 AT_CWD absolute fd relative chdir to fd2; call xxx(name1, name2) + * 11 AT_CWD relative fd relative convert name1 to abs; case 10 + * 12 fd relative AT_CWD absolute chdir to fd1; call xxx(name1, name2) + * 13 fd relative AT_CWD relative convert name2 to abs; case 12 + * + * 14 fd absolute fd relative chdir to fd2; call xxx(name1, name2) + * 15 fd relative fd absolute chdir to fd1; call xxx(name1, name2) + * + * 16 fd1 relative fd1 relative chdir to fd1; call xxx(name1, name2) + * 17 fd relative fd relative chdir to fd1; case 11 + */ + + /* + * Case 1..9 + */ + if ((fd1 == AT_FDCWD || ABS_NAME(name1)) && + (fd2 == AT_FDCWD || ABS_NAME(name2))) + return (FUNC_CALL(name1, name2)); + + /* + * If the procfs interface works, we can catch all other cases here: + */ + if ((proc_name1 = proc_fd2name(buf1, fd1, name1)) != NULL && + (proc_name2 = proc_fd2name(buf2, fd2, name2)) != NULL) { + ret = FUNC_CALL(proc_name1, proc_name2); + if (ret >= 0 || NON_PROCFS_ERRNO(errno)) + return (ret); + } else if (geterrno() == ENAMETOOLONG) { + return (-1); + } + + if (savewd(&save_wd) < 0) { + /* + * We abort here as the caller may not know that we are forced + * to savewd/fchdir/restorewd here and misinterpret errno. + */ + savewd_abort(geterrno()); + /* NOTREACHED */ + return (-1); + } + if ((fd1 >= 0 && save_wd.fd == fd1) || + (fd2 >= 0 && save_wd.fd == fd2)) { + /* + * If we just opened "fd" with the same number in savewd(), + * fd1/fd2 must have been illegal when calling us(); + */ + closewd(&save_wd); + seterrno(EBADF); + return (-1); + } + if (!ABS_NAME(name1) && !ABS_NAME(name2)) { + /* + * Check for case 16 + */ + if (fd1 == fd2) { + same_fd = TRUE; + } +#ifndef _MSC_VER + /* + * Are there other non-cooperative platforms where stat() + * does not allow to compare files? + */ + else { + struct stat sb1; + struct stat sb2; + + if (fstat(fd1, &sb1) >= 0 && + fstat(fd2, &sb2) >= 0) { + if (sb1.st_dev == sb2.st_dev && + sb1.st_ino == sb2.st_ino) + same_fd = TRUE; + } + } +#endif + } +case_10_12: + if (ABS_NAME(name1) || ABS_NAME(name2) || same_fd) { + /* + * Handle case 10, 12, 14, 15, 16 + */ + int fd; + + if (ABS_NAME(name1)) + fd = fd2; + else + fd = fd1; + if ((n = fchdir(fd)) < 0) { + int err = geterrno(); + /* + * In case that fchdir() is emulated via chdir() + * and we use a multi hop chdir(), we may be on + * an undefined intermediate directory. Try to + * return to last working directory and if this + * fails, abort for security. + */ + if (n == -2 && restorewd(&save_wd) < 0) { + restorewd_abort(geterrno()); + /* NOTREACHED */ + } + closewd(&save_wd); + seterrno(err); + return (-1); + } + } else { + /* + * Handle case 11, 13, 17 + */ + if (fd1 == AT_FDCWD) { +case_11: + /* + * Existing file: follow all but last component, abort + * if the file does not exist. + */ + if (absfpath(name1, buf1, sizeof (buf1), + RSPF_EXIST | RSPF_NOFOLLOW_LAST) == NULL) { + ret = -1; + goto fail; + } + name1 = buf1; + goto case_10_12; + } else if (fd2 == AT_FDCWD) { + /* + * New file: may not exist, + * use absnpath() -> absfpath(... 0) + */ + if (absnpath(name2, buf2, sizeof (buf2)) == NULL) { + ret = -1; + goto fail; + } + name2 = buf2; + goto case_10_12; + } else { + if ((n = fchdir(fd1)) < 0) { + int err = geterrno(); + /* + * In case that fchdir() is emulated via chdir() + * and we use a multi hop chdir(), we may be on + * an undefined intermediate directory. Try to + * return to last working directory and if this + * fails, abort for security. + */ + if (n == -2 && restorewd(&save_wd) < 0) { + restorewd_abort(geterrno()); + /* NOTREACHED */ + } + closewd(&save_wd); + seterrno(err); + return (-1); + } + goto case_11; + } + } + + ret = FUNC_CALL(name1, name2); /* The actual call() */ + +fail: + if (restorewd(&save_wd) < 0) { + int err = geterrno(); + + closewd(&save_wd); + restorewd_abort(err); + /* NOTREACHED */ + seterrno(err); + return (-1); + } + closewd(&save_wd); + + return (ret); +} diff -Nru cdrtools-2.01.01a33/libschily/at-base.c cdrtools-3.02a09/libschily/at-base.c --- cdrtools-2.01.01a33/libschily/at-base.c 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/libschily/at-base.c 2013-10-27 17:03:37.000000000 +0000 @@ -0,0 +1,116 @@ +/* @(#)at-base.c 1.1 13/10/27 Copyright 2011-2013 J. Schilling */ +/* + * Emulate the behavior of openat(fd, name, flag, mode) + * + * Note that emulation methods that do not use the /proc filesystem are + * not MT safe. In the non-MT-safe case, we do: + * + * savewd()/fchdir()/open(name)/restorewd() + * + * Errors may force us to abort the program as our caller is not expected + * to know that we do more than a simple open() here and that the + * working directory may be changed by us. + * + * Copyright (c) 2011-13 J. Schilling + */ +/* + * The contents of this file are subject to the terms of the + * Common Development and Distribution License, Version 1.0 only + * (the "License"). You may not use this file except in compliance + * with the License. + * + * See the file CDDL.Schily.txt in this distribution for details. + * A copy of the CDDL is also available via the Internet at + * http://www.opensource.org/licenses/cddl1.txt + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file CDDL.Schily.txt from this distribution. + */ + +#ifndef ENAMETOOLONG +#define ENAMETOOLONG EINVAL +#endif + +#ifndef _AT_TRIGGER +#define _AT_TRIGGER 0 +#endif + +#ifdef PROTOTYPES +EXPORT FUNC_RESULT +FUNC_NAME(int fd, const char *name PROTO_DECL) +#else +EXPORT FUNC_RESULT +FUNC_NAME(fd, name KR_ARGS) + int fd; + const char *name; + KR_DECL +#endif +{ + int n; + FUNC_RESULT ret = 0; + char buf[PATH_MAX]; + char *proc_name; + struct save_wd save_wd; + + FLAG_CHECK(); + if (fd == AT_FDCWD || ABS_NAME(name)) + return (FUNC_CALL(name)); + + if ((proc_name = proc_fd2name(buf, fd, name)) != NULL) { + ret = FUNC_CALL(proc_name); + if (ret >= 0 || NON_PROCFS_ERRNO(errno)) + return (ret); + } else if (geterrno() == ENAMETOOLONG) { + return (-1); + } + + if (savewd(&save_wd) < 0) { + /* + * We abort here as the caller may not know that we are forced + * to savewd/fchdir/restorewd here and misinterpret errno. + */ + savewd_abort(geterrno()); + /* NOTREACHED */ + return (-1); + } + if (fd >= 0 && save_wd.fd == fd) { + /* + * If we just opened "fd" with the same number in savewd(), fd + * must have been illegal when calling openat(); + */ + closewd(&save_wd); + seterrno(EBADF); + return (-1); + } + if ((n = fchdir(fd)) < 0) { + int err = geterrno(); + /* + * In case that fchdir() is emulated via chdir() and we use a + * multi hop chdir(), we may be on an undefined intermediate + * directory. Try to return to last working directory and if + * this fails, abort for security. + */ + if (n == -2 && restorewd(&save_wd) < 0) { + restorewd_abort(geterrno()); + /* NOTREACHED */ + } + closewd(&save_wd); + seterrno(err); + return (-1); + } + + ret = FUNC_CALL(name); /* The actual call() */ + + if (restorewd(&save_wd) < 0) { + int err = geterrno(); + + closewd(&save_wd); + restorewd_abort(err); + /* NOTREACHED */ + seterrno(err); + return (-1); + } + closewd(&save_wd); + + return (ret); +} diff -Nru cdrtools-2.01.01a33/libschily/at-defs.h cdrtools-3.02a09/libschily/at-defs.h --- cdrtools-2.01.01a33/libschily/at-defs.h 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/libschily/at-defs.h 2011-10-21 17:59:16.000000000 +0000 @@ -0,0 +1,71 @@ +/* @(#)at-defs.h 1.1 11/10/21 Copyright 2011 J. Schilling */ +/* + * Libschily internal definitions for openat() emulation + * and related functions. + * + * Copyright (c) 2011 J. Schilling + */ +/* + * The contents of this file are subject to the terms of the + * Common Development and Distribution License, Version 1.0 only + * (the "License"). You may not use this file except in compliance + * with the License. + * + * See the file CDDL.Schily.txt in this distribution for details. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file CDDL.Schily.txt from this distribution. + */ +#ifndef _AT_DEFS_H + +/* + * This is a list of errors that are expected to be not a result of + * a /proc fs problem. If such an error is encountered, then we return + * after the open() or other call without trying to emulate the *at() + * interface via savewd()/fchdir()/doit()/restorewd(). + */ +#ifdef ENOSYS +#define __ENOSYS ENOSYS +#else +#define __ENOSYS ENOENT +#endif +#ifdef EOPNOTSUPP +#define __EOPNOTSUPP EOPNOTSUPP +#else +#define __EOPNOTSUPP ENOENT +#endif + +#define NON_PROCFS_ERRNO(e) \ + ((e) == ENOENT || (e) == ENOTDIR || \ + (e) == EACCES || (e) == EPERM || \ + (e) == __ENOSYS /* Solaris */ || \ + (e) == __EOPNOTSUPP /* FreeBSD */) + +/* + * n refers to an absolute path name. + */ +#define ABS_NAME(n) ((n)[0] == '/') + +#ifdef min +#undef min +#endif +#define min(a, b) ((a) < (b) ? (a):(b)) + +#ifdef max +#undef max +#endif +#define max(a, b) ((a) < (b) ? (b):(a)) + +/* + * From procnameat.c + */ +extern char *proc_fd2name __PR((char *buf, int fd, const char *name)); + +/* + * From wdabort.c + */ +extern void savewd_abort __PR((int err)); +extern void fchdir_abort __PR((int err)); +extern void restorewd_abort __PR((int err)); + +#endif /* _AT_DEFS_H */ diff -Nru cdrtools-2.01.01a33/libschily/basename.c cdrtools-3.02a09/libschily/basename.c --- cdrtools-2.01.01a33/libschily/basename.c 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/libschily/basename.c 2010-05-08 15:20:36.000000000 +0000 @@ -0,0 +1,48 @@ +/* @(#)basename.c 1.1 10/05/08 Copyright 2010 J. Schilling */ +/* + * basename() to be used if missing in libc + * + * Copyright (c) 2010 J. Schilling + */ +/* + * The contents of this file are subject to the terms of the + * Common Development and Distribution License, Version 1.0 only + * (the "License"). You may not use this file except in compliance + * with the License. + * + * See the file CDDL.Schily.txt in this distribution for details. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file CDDL.Schily.txt from this distribution. + */ + +#include +#include +#include + +#ifndef HAVE_BASENAME + +EXPORT char * +basename(name) + char *name; +{ + char *n; + + if (name == 0 || *name == '\0') + return ("."); + + n = name + strlen(name); + while (n != name && *--n == '/') + *n = '\0'; + + if (n == name && *n == '\0') + return ("/"); + + while (n != name) { + if (*--n == '/') + return (++n); + } + return (n); +} + +#endif diff -Nru cdrtools-2.01.01a33/libschily/breakline.3 cdrtools-3.02a09/libschily/breakline.3 --- cdrtools-2.01.01a33/libschily/breakline.3 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/libschily/breakline.3 1988-07-22 13:27:02.000000000 +0000 @@ -0,0 +1,57 @@ +. \" Manual Seite fuer breakline +. \" @(#)breakline.3 1.1 +. \" +.if t .ds a \v'-0.55m'\h'0.00n'\z.\h'0.40n'\z.\v'0.55m'\h'-0.40n'a +.if t .ds o \v'-0.55m'\h'0.00n'\z.\h'0.45n'\z.\v'0.55m'\h'-0.45n'o +.if t .ds u \v'-0.55m'\h'0.00n'\z.\h'0.40n'\z.\v'0.55m'\h'-0.40n'u +.if t .ds A \v'-0.77m'\h'0.25n'\z.\h'0.45n'\z.\v'0.77m'\h'-0.70n'A +.if t .ds O \v'-0.77m'\h'0.25n'\z.\h'0.45n'\z.\v'0.77m'\h'-0.70n'O +.if t .ds U \v'-0.77m'\h'0.30n'\z.\h'0.45n'\z.\v'0.77m'\h'-.75n'U +.if t .ds s \(*b +.if t .ds S SS +.if n .ds a ae +.if n .ds o oe +.if n .ds u ue +.if n .ds s sz +.TH BREAKLINE 3 "15. Juli 1988" "J\*org Schilling" "Schily\'s LIBRARY FUNCTIONS" +.SH NAME +breakline() \- breaks a buffer into fields +.SH SYNOPSIS +.nf +.B int breakline(buf, delim, array, max) +.B char *buf; +.B char delim; +.B char *array[]; +.B int max; +.fi +.SH DESCRIPTION +breakline() breaks the buffer buf into fields delimited by the +character delim, replacing the occurrences of delim in buf with +the NULL character ('\\0'). It fills in the array with pointers +to the beginning of each field in the buffer. max defines how +many entries to fill in the array. If there are not enough +fields in buf, the extra entries in the array will point to a +NULL string. +.SH RETURNS +Returns the number of fields actually in the buffer, but not +more than max. +.SH EXAMPLES +.nf +char *buf = "a:bc:d:efg"; +char *array[10]; + +breakline(buf, ':', array, 10); + +now the `:' are replaced by '\\0' and: + + array[0] = "a"; + array[1] = "bc"; + array[2] = "d" + array[3] = "efg"; + array[4] .\|.\|. array[9] = ""; + +.fi +.SH "SEE ALSO" +findline(3) +.SH NOTES +none diff -Nru cdrtools-2.01.01a33/libschily/breakline.mk3 cdrtools-3.02a09/libschily/breakline.mk3 --- cdrtools-2.01.01a33/libschily/breakline.mk3 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/libschily/breakline.mk3 2015-04-26 18:01:43.000000000 +0000 @@ -0,0 +1,18 @@ +#ident @(#)breakline.mk3 1.1 15/04/26 +########################################################################### +# Sample makefile for installing manual pages +########################################################################### +SRCROOT= .. +RULESDIR= RULES +include $(SRCROOT)/$(RULESDIR)/rules.top +########################################################################### + +MANDIR= man +TARGETMAN= breakline +MANSECT= $(MANSECT_LIB) +MANSUFFIX= $(MANSUFF_LIB) +MANFILE= breakline.3 + +########################################################################### +include $(SRCROOT)/$(RULESDIR)/rules.man +########################################################################### diff -Nru cdrtools-2.01.01a33/libschily/checkerr.c cdrtools-3.02a09/libschily/checkerr.c --- cdrtools-2.01.01a33/libschily/checkerr.c 2007-07-15 21:25:11.000000000 +0000 +++ cdrtools-3.02a09/libschily/checkerr.c 2009-07-08 21:56:15.000000000 +0000 @@ -1,7 +1,8 @@ -/* @(#)checkerr.c 1.16 07/07/15 Copyright 2003-2007 J. Schilling */ +/* @(#)checkerr.c 1.24 09/07/08 Copyright 2003-2009 J. Schilling */ +#include #ifndef lint -static char sccsid[] = - "@(#)checkerr.c 1.16 07/07/15 Copyright 2003-2007 J. Schilling"; +static UConst char sccsid[] = + "@(#)checkerr.c 1.24 09/07/08 Copyright 2003-2009 J. Schilling"; #endif /* * Generic error control for programs that do file i/o. @@ -13,7 +14,7 @@ * an official stable and "library-compliant" interface, be careful * and watch for changes. * - * Copyright (c) 2003-2007 J. Schilling + * Copyright (c) 2003-2009 J. Schilling */ /* * The contents of this file are subject to the terms of the @@ -27,8 +28,7 @@ * file and include the License file CDDL.Schily.txt from this distribution. */ -#include -#include +#include #include #include #include @@ -55,10 +55,10 @@ LOCAL char *_endword __PR((char *p)); LOCAL void parse_errctl __PR((char *line)); LOCAL UInt32_t errflags __PR((char *eflag, BOOL doexit)); -LOCAL ec_t *_errptr __PR((int etype, char *fname)); -EXPORT BOOL errhidden __PR((int etype, char *fname)); -EXPORT BOOL errwarnonly __PR((int etype, char *fname)); -EXPORT BOOL errabort __PR((int etype, char *fname, BOOL doexit)); +LOCAL ec_t *_errptr __PR((int etype, const char *fname)); +EXPORT BOOL errhidden __PR((int etype, const char *fname)); +EXPORT BOOL errwarnonly __PR((int etype, const char *fname)); +EXPORT BOOL errabort __PR((int etype, const char *fname, BOOL doexit)); /* * Read and parse error configuration file @@ -83,7 +83,7 @@ fclose(f); } if (maxplen > omaxplen) { - ec_state = __realloc(ec_state, (maxplen+1)*sizeof (int), + ec_state = ___realloc(ec_state, (maxplen+1)*sizeof (int), "pattern state"); } return (1); @@ -126,19 +126,19 @@ /* * Find end of white space after word. */ - for (pattern++ ; *pattern != '\0' && + for (pattern++; *pattern != '\0' && (*pattern == '\t' || *pattern == ' '); pattern++) { ; /* LINTED */ } - ep = __malloc(sizeof (ec_t), "errcheck node"); + ep = ___malloc(sizeof (ec_t), "errcheck node"); ep->ec_flags = errflags(line, TRUE); ep->ec_plen = plen = strlen(pattern); if (ep->ec_plen > maxplen) maxplen = ep->ec_plen; - ep->ec_pat = (const Uchar *)__savestr(pattern); - ep->ec_aux = __malloc(plen*sizeof (int), "compiled pattern"); + ep->ec_pat = (const Uchar *)___savestr(pattern); + ep->ec_aux = ___malloc(plen*sizeof (int), "compiled pattern"); if ((ep->ec_alt = patcompile((const Uchar *)pattern, plen, ep->ec_aux)) == 0) comerrno(EX_BAD, "Bad errctl pattern: '%s'.\n", pattern); @@ -165,6 +165,7 @@ { "SPECIALFILE", E_SPECIALFILE }, { "READLINK", E_READLINK }, { "GETXATTR", E_GETXATTR }, + { "CHDIR", E_CHDIR }, { "SETTIME", E_SETTIME }, { "SETMODE", E_SETMODE }, @@ -194,13 +195,10 @@ { register char *p = eflag; char *ef = _endword(eflag); - char ec; register struct eflags *ep; register int slen; register UInt32_t nflags = 0; - ec = *ef; - *ef = '\0'; do { for (ep = eflags; ep->fname; ep++) { slen = strlen(ep->fname); @@ -214,13 +212,11 @@ if (ep->fname == NULL) { if (doexit) comerrno(EX_BAD, "Bad flag '%s'\n", p); - *ef = ec; /* Restore old character */ return (0); } p = strchr(p, '|'); - } while (p && *p++ == '|'); + } while (p < ef && p && *p++ == '|'); - *ef = ec; /* Restore old character */ if ((nflags & ~(UInt32_t)(E_ABORT|E_WARN)) == 0) { if (doexit) comerrno(EX_BAD, "Bad error condition '%s'.\n", eflag); @@ -231,8 +227,8 @@ LOCAL ec_t * _errptr(etype, fname) - int etype; - char *fname; + int etype; + const char *fname; { ec_t *ep = ec_root; char *ret; @@ -266,13 +262,13 @@ */ EXPORT BOOL errhidden(etype, fname) - int etype; - char *fname; + int etype; + const char *fname; { ec_t *ep; if ((ep = _errptr(etype, fname)) != NULL) { - if ((ep->ec_flags & E_ABORT) != 0) + if ((ep->ec_flags & (E_ABORT|E_WARN)) != 0) return (FALSE); return (TRUE); } @@ -284,8 +280,8 @@ */ EXPORT BOOL errwarnonly(etype, fname) - int etype; - char *fname; + int etype; + const char *fname; { ec_t *ep; @@ -302,9 +298,9 @@ */ EXPORT BOOL errabort(etype, fname, doexit) - int etype; - char *fname; - BOOL doexit; + int etype; + const char *fname; + BOOL doexit; { ec_t *ep; diff -Nru cdrtools-2.01.01a33/libschily/chown.c cdrtools-3.02a09/libschily/chown.c --- cdrtools-2.01.01a33/libschily/chown.c 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/libschily/chown.c 2011-08-14 14:07:45.000000000 +0000 @@ -0,0 +1,30 @@ +/* @(#)chown.c 1.1 11/08/14 Copyright 2011 J. Schilling */ +/* + * Copyright (c) 2011 J. Schilling + */ +/* + * The contents of this file are subject to the terms of the + * Common Development and Distribution License, Version 1.0 only + * (the "License"). You may not use this file except in compliance + * with the License. + * + * See the file CDDL.Schily.txt in this distribution for details. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file CDDL.Schily.txt from this distribution. + */ + +#include +#include +#include + +#ifndef HAVE_CHOWN +EXPORT int +chown(path, owner, group) + const char *path; + uid_t owner; + gid_t group; +{ + return (0); /* Fake success */ +} +#endif diff -Nru cdrtools-2.01.01a33/libschily/cmpbytes.3 cdrtools-3.02a09/libschily/cmpbytes.3 --- cdrtools-2.01.01a33/libschily/cmpbytes.3 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/libschily/cmpbytes.3 2017-02-15 21:04:23.000000000 +0000 @@ -0,0 +1,51 @@ +. \" Manual Seite fuer cmpbytes +. \" @(#)cmpbytes.3 1.1 17/02/15 Copyright 1988-2017 J. Schilling +. \" +.if t .ds a \v'-0.55m'\h'0.00n'\z.\h'0.40n'\z.\v'0.55m'\h'-0.40n'a +.if t .ds o \v'-0.55m'\h'0.00n'\z.\h'0.45n'\z.\v'0.55m'\h'-0.45n'o +.if t .ds u \v'-0.55m'\h'0.00n'\z.\h'0.40n'\z.\v'0.55m'\h'-0.40n'u +.if t .ds A \v'-0.77m'\h'0.25n'\z.\h'0.45n'\z.\v'0.77m'\h'-0.70n'A +.if t .ds O \v'-0.77m'\h'0.25n'\z.\h'0.45n'\z.\v'0.77m'\h'-0.70n'O +.if t .ds U \v'-0.77m'\h'0.30n'\z.\h'0.45n'\z.\v'0.77m'\h'-0.75n'U +.if t .ds s \(*b +.if n .ds a ae +.if n .ds o oe +.if n .ds u ue +.if n .ds A Ae +.if n .ds O Oe +.if n .ds U Ue +.if n .ds s sz +.ds S SS +.TH CMPBYTES 3 "%e%" "J\*org Schilling" "Schily\'s LIBRARY FUNCTIONS" +.SH NAME +cmpbytes() \- compare data +.SH SYNOPSIS +.nf +.B +ssize_t cmpbytes(from, to, cnt) +.B const void *from; +.B const void *to; +.B ssize_t cnt; +.fi +.SH DESCRIPTION +cmpbytes() compares size bytes from from to to. +.SH RETURN VALUE +The the offset of the first differing character in the strings. +.I to +string. +.SH ERRORS +.LP +No errors are defined +.SH EXAMPLES +.SH "SEE ALSO" +.LP +.BR cmpmbytes (3), +.BR cmpnullbytes (3), +.BR fillbytes (3), +.BR findbytes (3), +.BR movebytes (3), +.BR movecbytes (3), +.BR swapbytes (3), +.BR zerobytes (3) +.SH NOTES +This routine correctly handles overlapping buffers. diff -Nru cdrtools-2.01.01a33/libschily/cmpbytes.c cdrtools-3.02a09/libschily/cmpbytes.c --- cdrtools-2.01.01a33/libschily/cmpbytes.c 2007-06-24 11:25:39.000000000 +0000 +++ cdrtools-3.02a09/libschily/cmpbytes.c 2010-08-21 10:04:02.000000000 +0000 @@ -1,13 +1,14 @@ -/* @(#)cmpbytes.c 1.18 07/06/24 Copyright 1988, 1995-2007 J. Schilling */ +/* @(#)cmpbytes.c 1.23 10/08/21 Copyright 1988, 1995-2010 J. Schilling */ +#include #ifndef lint -static char sccsid[] = - "@(#)cmpbytes.c 1.18 07/06/24 Copyright 1988, 1995-2007 J. Schilling"; +static UConst char sccsid[] = + "@(#)cmpbytes.c 1.23 10/08/21 Copyright 1988, 1995-2010 J. Schilling"; #endif /* lint */ /* * compare data - * Return the index of the first differing character + * Return the index of the first differing character * - * Copyright (c) 1988, 1995-2007 J. Schilling + * Copyright (c) 1988, 1995-2010 J. Schilling */ /* * The contents of this file are subject to the terms of the @@ -23,6 +24,7 @@ #include #include +#include #include #define DO8(a) a; a; a; a; a; a; a; a; @@ -31,16 +33,16 @@ * Return the index of the first differing character * This interface is not compatible to memcmp() */ -EXPORT int +EXPORT ssize_t cmpbytes(fromp, top, cnt) const void *fromp; const void *top; - int cnt; + ssize_t cnt; { register const char *from = (char *)fromp; register const char *to = (char *)top; - register int n; - register int i; + register ssize_t n; + register ssize_t i; /* * If we change cnt to be unsigned, check for == instead of <= @@ -58,18 +60,20 @@ } n++; - if (n >= (int)(8 * sizeof (long))) { + if (n >= (ssize_t)(8 * sizeof (long))) { if (l2aligned(from, to)) { register const long *froml = (const long *)from; register const long *tol = (const long *)to; - register int rem = n % (8 * sizeof (long)); + register ssize_t rem = n % (8 * sizeof (long)); n /= (8 * sizeof (long)); do { + /* BEGIN CSTYLED */ DO8( if (*tol++ != *froml++) break; ); + /* END CSTYLED */ } while (--n > 0); if (n > 0) { @@ -87,10 +91,12 @@ if (n >= 8) { n -= 8; do { + /* BEGIN CSTYLED */ DO8( if (*to++ != *from++) goto cdiff; ); + /* END CSTYLED */ } while ((n -= 8) >= 0); n += 8; } @@ -112,5 +118,5 @@ goto cdiff; } while (--n > 0); cdiff: - return (--from - (char *)fromp); + return ((ssize_t)(--from - (char *)fromp)); } diff -Nru cdrtools-2.01.01a33/libschily/cmpbytes.mk3 cdrtools-3.02a09/libschily/cmpbytes.mk3 --- cdrtools-2.01.01a33/libschily/cmpbytes.mk3 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/libschily/cmpbytes.mk3 2017-02-15 21:04:23.000000000 +0000 @@ -0,0 +1,18 @@ +#ident "@(#)cmpbytes.mk3 1.1 17/02/15 " +########################################################################### +# Sample makefile for installing manual pages +########################################################################### +SRCROOT= .. +RULESDIR= RULES +include $(SRCROOT)/$(RULESDIR)/rules.top +########################################################################### + +MANDIR= man +TARGETMAN= cmpbytes +MANSECT= $(MANSECT_LIB) +MANSUFFIX= $(MANSUFF_LIB) +MANFILE= cmpbytes.3 + +########################################################################### +include $(SRCROOT)/$(RULESDIR)/rules.man +########################################################################### diff -Nru cdrtools-2.01.01a33/libschily/cmpmbytes.c cdrtools-3.02a09/libschily/cmpmbytes.c --- cdrtools-2.01.01a33/libschily/cmpmbytes.c 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/libschily/cmpmbytes.c 2011-08-16 21:29:37.000000000 +0000 @@ -0,0 +1,122 @@ +/* @(#)cmpmbytes.c 1.2 11/08/16 Copyright 1988, 1995-2011 J. Schilling */ +#include +#ifndef lint +static UConst char sccsid[] = + "@(#)cmpmbytes.c 1.2 11/08/16 Copyright 1988, 1995-2011 J. Schilling"; +#endif +/* + * compare data + * Return the difference from the first differing characters + * + * Copyright (c) 1988, 1995-2011 J. Schilling + */ +/* + * The contents of this file are subject to the terms of the + * Common Development and Distribution License, Version 1.0 only + * (the "License"). You may not use this file except in compliance + * with the License. + * + * See the file CDDL.Schily.txt in this distribution for details. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file CDDL.Schily.txt from this distribution. + */ + +#include +#include +#include +#include + +#define DO8(a) a; a; a; a; a; a; a; a; + +/* + * Return the difference from the first differing characters + * This interface is compatible to memcmp() + */ +EXPORT int +cmpmbytes(fromp, top, cnt) + const void *fromp; + const void *top; + ssize_t cnt; +{ + register const char *from = (char *)fromp; + register const char *to = (char *)top; + register ssize_t n; + register ssize_t i; + + /* + * If we change cnt to be unsigned, check for == instead of <= + */ + if ((n = cnt) <= 0) + return (0); + + /* + * Compare byte-wise until properly aligned for a long pointer. + */ + i = sizeof (long) - 1; + while (--n >= 0 && --i >= 0 && !l2aligned(from, to)) { + if (*to++ != *from++) + goto cdiff; + } + n++; + + if (n >= (ssize_t)(8 * sizeof (long))) { + if (l2aligned(from, to)) { + register const long *froml = (const long *)from; + register const long *tol = (const long *)to; + register ssize_t rem = n % (8 * sizeof (long)); + + n /= (8 * sizeof (long)); + do { + /* BEGIN CSTYLED */ + DO8( + if (*tol++ != *froml++) + break; + ); + /* END CSTYLED */ + } while (--n > 0); + + if (n > 0) { + --froml; + --tol; + to = (const char *)tol; + from = (const char *)froml; + goto ldiff; + } + to = (const char *)tol; + from = (const char *)froml; + n = rem; + } + + if (n >= 8) { + n -= 8; + do { + /* BEGIN CSTYLED */ + DO8( + if (*to++ != *from++) + goto cdiff; + ); + /* END CSTYLED */ + } while ((n -= 8) >= 0); + n += 8; + } + if (n > 0) do { + if (*to++ != *from++) + goto cdiff; + } while (--n > 0); + return (0); + } + if (n > 0) do { + if (*to++ != *from++) + goto cdiff; + } while (--n > 0); + return (0); +ldiff: + n = sizeof (long); + do { + if (*to++ != *from++) + goto cdiff; + } while (--n > 0); +cdiff: + return (*((unsigned char *)--from) - *((unsigned char *)--to)); +} diff -Nru cdrtools-2.01.01a33/libschily/cmpnullbytes.c cdrtools-3.02a09/libschily/cmpnullbytes.c --- cdrtools-2.01.01a33/libschily/cmpnullbytes.c 2007-06-24 11:25:39.000000000 +0000 +++ cdrtools-3.02a09/libschily/cmpnullbytes.c 2010-08-21 10:04:02.000000000 +0000 @@ -1,13 +1,14 @@ -/* @(#)cmpnullbytes.c 1.5 07/06/24 Copyright 1988,2002-2007 J. Schilling */ +/* @(#)cmpnullbytes.c 1.10 10/08/21 Copyright 1988,2002-2010 J. Schilling */ +#include #ifndef lint -static char sccsid[] = - "@(#)cmpnullbytes.c 1.5 07/06/24 Copyright 1988,2002-2007 J. Schilling"; +static UConst char sccsid[] = + "@(#)cmpnullbytes.c 1.10 10/08/21 Copyright 1988,2002-2010 J. Schilling"; #endif /* lint */ /* * compare data against null - * Return the index of the first non-null character + * Return the index of the first non-null character * - * Copyright (c) 1988,2002-2007 J. Schilling + * Copyright (c) 1988,2002-2010 J. Schilling */ /* * The contents of this file are subject to the terms of the @@ -23,6 +24,7 @@ #include #include +#include #include #define DO8(a) a; a; a; a; a; a; a; a; @@ -30,13 +32,13 @@ /* * Return the index of the first non-null character */ -EXPORT int +EXPORT ssize_t cmpnullbytes(fromp, cnt) const void *fromp; - int cnt; + ssize_t cnt; { register const char *from = (char *)fromp; - register int n; + register ssize_t n; /* * If we change cnt to be unsigned, check for == instead of <= @@ -53,17 +55,19 @@ } n++; - if (n >= (int)(8 * sizeof (long))) { + if (n >= (ssize_t)(8 * sizeof (long))) { if (laligned(from)) { register const long *froml = (const long *)from; - register int rem = n % (8 * sizeof (long)); + register ssize_t rem = n % (8 * sizeof (long)); n /= (8 * sizeof (long)); do { + /* BEGIN CSTYLED */ DO8( if (*froml++ != 0) break; ); + /* END CSTYLED */ } while (--n > 0); if (n > 0) { @@ -78,10 +82,12 @@ if (n >= 8) { n -= 8; do { + /* BEGIN CSTYLED */ DO8( if (*from++ != 0) goto cdiff; ); + /* END CSTYLED */ } while ((n -= 8) >= 0); n += 8; } @@ -103,5 +109,5 @@ goto cdiff; } while (--n > 0); cdiff: - return (--from - (char *)fromp); + return ((ssize_t)(--from - (char *)fromp)); } diff -Nru cdrtools-2.01.01a33/libschily/comerr.3 cdrtools-3.02a09/libschily/comerr.3 --- cdrtools-2.01.01a33/libschily/comerr.3 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/libschily/comerr.3 1990-06-07 01:14:31.000000000 +0000 @@ -0,0 +1,56 @@ +. \" Manual Seite fuer comerr +. \" @(#)comerr.3 1.1 +. \" +.if t .ds a \v'-0.55m'\h'0.00n'\z.\h'0.40n'\z.\v'0.55m'\h'-0.40n'a +.if t .ds o \v'-0.55m'\h'0.00n'\z.\h'0.45n'\z.\v'0.55m'\h'-0.45n'o +.if t .ds u \v'-0.55m'\h'0.00n'\z.\h'0.40n'\z.\v'0.55m'\h'-0.40n'u +.if t .ds A \v'-0.77m'\h'0.25n'\z.\h'0.45n'\z.\v'0.77m'\h'-0.70n'A +.if t .ds O \v'-0.77m'\h'0.25n'\z.\h'0.45n'\z.\v'0.77m'\h'-0.70n'O +.if t .ds U \v'-0.77m'\h'0.30n'\z.\h'0.45n'\z.\v'0.77m'\h'-.75n'U +.if t .ds s \(*b +.if t .ds S SS +.if n .ds a ae +.if n .ds o oe +.if n .ds u ue +.if n .ds s sz +.TH COMERR 3 "15. Juli 1988" "J\*org Schilling" "Schily\'s LIBRARY FUNCTIONS" +.SH NAME +comerr() \- prints error message and exits +.SH SYNOPSIS +.nf +.B +comerr(format,arg1,\|.\|.\|.,argn) +.B char *format; +.fi +.SH DESCRIPTION +comerr() formats and prints a message on the error output +stream. Part of the message is the last error encountered by +the system while executing the process. +comerr() begins its output with the current program name (as +passed to it by exec() ) followed by a colon ":" and the +detailed system error message. It then formats the user +supplied format string and arguments in the form printf() would. +.SH RETURNS +none +.br +Rather than return, comerr() terminates the current process and +exits with the system error number as the exit code. +.SH EXAMPLES +.nf +if (( f = fileopen("file", "r")) == NULL) + comerr("Cannot open file.\\n"); +.fi +.PP +On +.I stderr +it appears as: +.PP +.B +prog_name: No such file or directory. Cannot open file. +.SH "SEE ALSO" +comerrno(3), error(3), errmsg(3), error(3) geterrno(3), printf(3), format(3) +.SH NOTES +comerr() attempts to find a line in the message file that +corresponds to the system error number. If none can be found, or +it has trouble finding or reading the file, it simply says: +error #. diff -Nru cdrtools-2.01.01a33/libschily/comerr.c cdrtools-3.02a09/libschily/comerr.c --- cdrtools-2.01.01a33/libschily/comerr.c 2007-02-26 12:01:47.000000000 +0000 +++ cdrtools-3.02a09/libschily/comerr.c 2017-11-03 00:12:47.000000000 +0000 @@ -1,8 +1,8 @@ -/* @(#)comerr.c 1.32 07/02/26 Copyright 1985-1989, 1995-2007 J. Schilling */ +/* @(#)comerr.c 1.46 17/11/03 Copyright 1985-1989, 1995-2017 J. Schilling */ /* * Routines for printing command errors * - * Copyright (c) 1985-1989, 1995-2007 J. Schilling + * Copyright (c) 1985-1989, 1995-2017 J. Schilling */ /* * The contents of this file are subject to the terms of the @@ -11,6 +11,8 @@ * with the License. * * See the file CDDL.Schily.txt in this distribution for details. + * A copy of the CDDL is also available via the Internet at + * http://www.opensource.org/licenses/cddl1.txt * * When distributing Covered Code, include this CDDL HEADER in each * file and include the License file CDDL.Schily.txt from this distribution. @@ -18,7 +20,7 @@ #include #include /* include try to get size_t */ -#include /* Try again for size_t */ +#include /* Try again for size_t */ #include /* Try again for size_t */ #include #include @@ -28,10 +30,14 @@ EXPORT int on_comerr __PR((void (*fun)(int, void *), void *arg)); EXPORT void comerr __PR((const char *, ...)); +EXPORT void xcomerr __PR((int, const char *, ...)); EXPORT void comerrno __PR((int, const char *, ...)); +EXPORT void xcomerrno __PR((int, int, const char *, ...)); EXPORT int errmsg __PR((const char *, ...)); EXPORT int errmsgno __PR((int, const char *, ...)); -EXPORT int _comerr __PR((FILE *, int, int, const char *, va_list)); +EXPORT int _comerr __PR((FILE *, int, int, int, + const char *, va_list)); +LOCAL int _ex_clash __PR((int)); EXPORT void comexit __PR((int)); EXPORT char *errmsgstr __PR((int)); @@ -43,6 +49,11 @@ LOCAL ex_t *exfuncs; +/* + * Set list of callback functions to call with *comerr() and comexit(). + * The function set up last with on_comerr() is called first on exit; + * in other words: call order is the reverse order of registration. + */ EXPORT int on_comerr(func, arg) void (*func) __PR((int, void *)); @@ -61,6 +72,9 @@ return (0); } +/* + * Fetch current errno, print a related message and exit(errno). + */ /* VARARGS1 */ #ifdef PROTOTYPES EXPORT void @@ -79,11 +93,41 @@ #else va_start(args); #endif - (void) _comerr(stderr, TRUE, geterrno(), msg, args); + (void) _comerr(stderr, COMERR_EXIT, 0, geterrno(), msg, args); + /* NOTREACHED */ + va_end(args); +} + +/* + * Fetch current errno, print a related message and exit(exc). + */ +/* VARARGS2 */ +#ifdef PROTOTYPES +EXPORT void +xcomerr(int exc, const char *msg, ...) +#else +EXPORT void +xcomerr(exc, msg, va_alist) + int exc; + char *msg; + va_dcl +#endif +{ + va_list args; + +#ifdef PROTOTYPES + va_start(args, msg); +#else + va_start(args); +#endif + (void) _comerr(stderr, COMERR_EXCODE, exc, geterrno(), msg, args); /* NOTREACHED */ va_end(args); } +/* + * Print a message related to err and exit(err). + */ /* VARARGS2 */ #ifdef PROTOTYPES EXPORT void @@ -103,11 +147,42 @@ #else va_start(args); #endif - (void) _comerr(stderr, TRUE, err, msg, args); + (void) _comerr(stderr, COMERR_EXIT, 0, err, msg, args); + /* NOTREACHED */ + va_end(args); +} + +/* + * Print a message related to err and exit(exc). + */ +/* VARARGS3 */ +#ifdef PROTOTYPES +EXPORT void +xcomerrno(int exc, int err, const char *msg, ...) +#else +EXPORT void +xcomerrno(exc, err, msg, va_alist) + int exc; + int err; + char *msg; + va_dcl +#endif +{ + va_list args; + +#ifdef PROTOTYPES + va_start(args, msg); +#else + va_start(args); +#endif + (void) _comerr(stderr, COMERR_EXCODE, exc, err, msg, args); /* NOTREACHED */ va_end(args); } +/* + * Fetch current errno, print a related message and return(errno). + */ /* VARARGS1 */ #ifdef PROTOTYPES EXPORT int @@ -127,11 +202,14 @@ #else va_start(args); #endif - ret = _comerr(stderr, FALSE, geterrno(), msg, args); + ret = _comerr(stderr, COMERR_RETURN, 0, geterrno(), msg, args); va_end(args); return (ret); } +/* + * Print a message related to err and return(err). + */ /* VARARGS2 */ #ifdef PROTOTYPES EXPORT int @@ -152,12 +230,12 @@ #else va_start(args); #endif - ret = _comerr(stderr, FALSE, err, msg, args); + ret = _comerr(stderr, COMERR_RETURN, 0, err, msg, args); va_end(args); return (ret); } -#ifdef __BEOS__ +#if defined(__BEOS__) || defined(__HAIKU__) /* * On BeOS errno is a big negative number (0x80000000 + small number). * We assume that small negative numbers are safe to be used as special @@ -178,12 +256,13 @@ #define silent_error(e) ((e) < 0) #endif EXPORT int -_comerr(f, exflg, err, msg, args) - FILE *f; - int exflg; - int err; - const char *msg; - va_list args; +_comerr(f, exflg, exc, err, msg, args) + FILE *f; /* FILE * to print to */ + int exflg; /* COMERR_RETURN, COMERR_EXIT, COMERR_EXCODE */ + int exc; /* Use for exit() if exflg & COMERR_EXCODE */ + int err; /* Errno for text, exit(err) if !COMERR_EXIT */ + const char *msg; /* printf() format */ + va_list args; /* printf() args for format */ { char errbuf[20]; char *errnam; @@ -201,24 +280,79 @@ js_fprintf(f, "%s: %s. %r", prognam, errnam, msg, args); } if (exflg) { + if (exflg & COMERR_EXCODE) + err = exc; + else + err = _ex_clash(err); comexit(err); /* NOTREACHED */ } return (err); } +LOCAL int +_ex_clash(exc) + int exc; +{ + int exmod = exc % 256; + + /* + * On a recent POSIX System that supports waitid(), siginfo.si_status + * holds the exit(2) value as an int. So if waitid() is used to wait + * for the process, we do not have problems from folded exit codes. + * All other wait*() functions fold the exit code by masking it + * with 0377. + * + * Exit codes used with comerr*()/comexit() are frequently errno values + * that have been in the range 0..31 with UNIX.V5 in the mid 1970s and + * that now are in the range 0..151 on Solaris. These values do not + * cause problems from folding to 8 bits, but "sysexits.h" contains + * definitions in the range 64..79 that cause (even unfolded) clashes + * with errno values. + * + * To avoid clashes with errno values, "schily/standard.h" defines + * EX_BAD (-1) as default error exit code and + * EX_CLASH (-64) as marker for clashes. + * Exit codes in the range -2..-63 (254..193 seen as unsigned two's + * complement) are available as software specific exit codes. + * We map all other negative exit codes to EX_CLASH if they would fold + * to -2..-63. + * + * Do not map exit codes in case that the "COMERR_EXCODE" environment + * is present. + */ + if (getenv("COMERR_EXCODE")) + return (exc); + if (exc != exmod && exmod <= 0 && exmod >= EX_CLASH) + exc = EX_CLASH; + return (exc); +} + +/* + * Do a program exit() with previously calling functions registered via + * on_comerr(). + */ EXPORT void comexit(err) int err; { while (exfuncs) { + ex_t *fp; + (*exfuncs->func)(err, exfuncs->arg); + fp = exfuncs; exfuncs = exfuncs->next; + free(fp); } exit(err); /* NOTREACHED */ } +/* + * Wrapper around the strange POSIX strerror(). + * If there is a problem with retrieving the correct error text, + * return NULL. + */ EXPORT char * errmsgstr(err) int err; diff -Nru cdrtools-2.01.01a33/libschily/comerr.mk3 cdrtools-3.02a09/libschily/comerr.mk3 --- cdrtools-2.01.01a33/libschily/comerr.mk3 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/libschily/comerr.mk3 2015-04-26 18:01:43.000000000 +0000 @@ -0,0 +1,18 @@ +#ident @(#)comerr.mk3 1.1 15/04/26 +########################################################################### +# Sample makefile for installing manual pages +########################################################################### +SRCROOT= .. +RULESDIR= RULES +include $(SRCROOT)/$(RULESDIR)/rules.top +########################################################################### + +MANDIR= man +TARGETMAN= comerr +MANSECT= $(MANSECT_LIB) +MANSUFFIX= $(MANSUFF_LIB) +MANFILE= comerr.3 + +########################################################################### +include $(SRCROOT)/$(RULESDIR)/rules.man +########################################################################### diff -Nru cdrtools-2.01.01a33/libschily/comerrno.3 cdrtools-3.02a09/libschily/comerrno.3 --- cdrtools-2.01.01a33/libschily/comerrno.3 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/libschily/comerrno.3 1988-07-22 13:48:00.000000000 +0000 @@ -0,0 +1,50 @@ +. \" Manual Seite fuer comerrno +. \" @(#)comerrno.3 1.1 +. \" +.if t .ds a \v'-0.55m'\h'0.00n'\z.\h'0.40n'\z.\v'0.55m'\h'-0.40n'a +.if t .ds o \v'-0.55m'\h'0.00n'\z.\h'0.45n'\z.\v'0.55m'\h'-0.45n'o +.if t .ds u \v'-0.55m'\h'0.00n'\z.\h'0.40n'\z.\v'0.55m'\h'-0.40n'u +.if t .ds A \v'-0.77m'\h'0.25n'\z.\h'0.45n'\z.\v'0.77m'\h'-0.70n'A +.if t .ds O \v'-0.77m'\h'0.25n'\z.\h'0.45n'\z.\v'0.77m'\h'-0.70n'O +.if t .ds U \v'-0.77m'\h'0.30n'\z.\h'0.45n'\z.\v'0.77m'\h'-.75n'U +.if t .ds s \(*b +.if t .ds S SS +.if n .ds a ae +.if n .ds o oe +.if n .ds u ue +.if n .ds s sz +.TH COMERRNO 3 "15. Juli 1988" "J\*org Schilling" "Schily\'s LIBRARY FUNCTIONS" +.SH NAME +comerrno() \- prints error message, given error code, and +exits +.SH SYNOPSIS +.nf +.B +comerrno(error,format,args); +.B int error; +.B char *format; +.fi +.SH DESCRIPTION +comerrno() is like comerr(), except that the caller supplies the +error number. Positive numbers are turned into system error +messages. Negative numbers cause the system error portion of +the output to be omitted. +comerrno() is a convenient way to print the name of the program, +and an error message, and exit the process in a single call. +.SH RETURNS +none +.br +Rather than return, comerrno() exits the current process with a +value equal to the error number supplied by the user. +.SH EXAMPLES +.nf +if (argc < 2) + comerrno(-1, "Usage: name arg.\\n"); +.fi +.SH "SEE ALSO" +comerr(3), error(3), errmsg(3), error(3) geterrno(3), printf(3), format(3) +.SH NOTES +comerrno() attempts to find a line in the message file that +corresponds to the system error number. If none can be found, +or if it has trouble finding or reading the file, it simply +says: error #. diff -Nru cdrtools-2.01.01a33/libschily/comerrno.mk3 cdrtools-3.02a09/libschily/comerrno.mk3 --- cdrtools-2.01.01a33/libschily/comerrno.mk3 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/libschily/comerrno.mk3 2015-04-26 18:01:43.000000000 +0000 @@ -0,0 +1,18 @@ +#ident @(#)comerrno.mk3 1.1 15/04/26 +########################################################################### +# Sample makefile for installing manual pages +########################################################################### +SRCROOT= .. +RULESDIR= RULES +include $(SRCROOT)/$(RULESDIR)/rules.top +########################################################################### + +MANDIR= man +TARGETMAN= comerrno +MANSECT= $(MANSECT_LIB) +MANSUFFIX= $(MANSUFF_LIB) +MANFILE= comerrno.3 + +########################################################################### +include $(SRCROOT)/$(RULESDIR)/rules.man +########################################################################### diff -Nru cdrtools-2.01.01a33/libschily/cvt.c cdrtools-3.02a09/libschily/cvt.c --- cdrtools-2.01.01a33/libschily/cvt.c 2006-09-13 15:05:35.000000000 +0000 +++ cdrtools-3.02a09/libschily/cvt.c 2016-02-08 19:38:56.000000000 +0000 @@ -1,4 +1,4 @@ -/* @(#)cvt.c 1.8 06/09/13 Copyright 1998 J. Schilling */ +/* @(#)cvt.c 1.11 16/02/08 Copyright 1998-2016 J. Schilling */ /* * Compatibility routines for 4.4BSD based C-libraries ecvt()/fcvt() * and a working gcvt() that is needed on 4.4BSD and GNU libc systems. @@ -8,7 +8,7 @@ * * Neither __dtoa() nor [efg]cvt() are MT safe. * - * Copyright (c) 1998 J. Schilling + * Copyright (c) 1998-2016 J. Schilling */ /* * The contents of this file are subject to the terms of the @@ -17,6 +17,8 @@ * with the License. * * See the file CDDL.Schily.txt in this distribution for details. + * A copy of the CDDL is also available via the Internet at + * http://www.opensource.org/licenses/cddl1.txt * * When distributing Covered Code, include this CDDL HEADER in each * file and include the License file CDDL.Schily.txt from this distribution. @@ -25,12 +27,15 @@ #include #include #include +#include #ifdef HAVE_DTOA /* 4.4BSD floating point implementation */ #ifdef HAVE_DTOA_R -extern char *__dtoa __PR((double value, int mode, int ndigit, int *decpt, int *sign, char **ep, char **resultp)); +extern char *__dtoa __PR((double value, int mode, int ndigit, int *decpt, + int *sign, char **ep, char **resultp)); #else -extern char *__dtoa __PR((double value, int mode, int ndigit, int *decpt, int *sign, char **ep)); +extern char *__dtoa __PR((double value, int mode, int ndigit, int *decpt, + int *sign, char **ep)); #endif #else @@ -193,10 +198,16 @@ { int sign; int decpt; + char dpoint; register char *b; register char *rs; register int i; +#if defined(HAVE_LOCALECONV) && defined(USE_LOCALE) + dpoint = *(localeconv()->decimal_point); +#else + dpoint = '.'; +#endif b = ecvt(number, ndigit, &decpt, &sign); rs = buf; if (sign) @@ -208,10 +219,10 @@ #else if ((decpt >= 0 && decpt-ndigit > 0) || #endif - (decpt < 0 && decpt < -3)) { /* e-format */ + (decpt < -3)) { /* e-format */ decpt--; *rs++ = *b++; - *rs++ = '.'; + *rs++ = dpoint; /* '.' */ for (i = 1; i < ndigit; i++) *rs++ = *b++; *rs++ = 'e'; @@ -233,7 +244,7 @@ #ifndef V7_FLOATSTYLE *rs++ = '0'; #endif - *rs++ = '.'; + *rs++ = dpoint; /* '.' */ } while (decpt < 0) { decpt++; @@ -243,15 +254,15 @@ for (i = 1; i <= ndigit; i++) { *rs++ = *b++; if (i == decpt) - *rs++ = '.'; + *rs++ = dpoint; /* '.' */ } if (ndigit < decpt) { while (ndigit++ < decpt) *rs++ = '0'; - *rs++ = '.'; + *rs++ = dpoint; /* '.' */ } } - if (rs[-1] == '.') + if (rs[-1] == dpoint) /* '.' */ rs--; *rs = '\0'; return (buf); diff -Nru cdrtools-2.01.01a33/libschily/dirent.c cdrtools-3.02a09/libschily/dirent.c --- cdrtools-2.01.01a33/libschily/dirent.c 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/libschily/dirent.c 2017-02-02 19:58:32.000000000 +0000 @@ -0,0 +1,160 @@ +/* @(#)dirent.c 1.4 17/02/02 Copyright 2011-2017 J. Schilling */ +#include +#ifndef lint +static UConst char sccsid[] = + "@(#)dirent.c 1.4 17/02/02 Copyright 2011-2017 J. Schilling"; +#endif +/* + * Copyright (c) 2011-2017 J. Schilling + */ +/* + * The contents of this file are subject to the terms of the + * Common Development and Distribution License, Version 1.0 only + * (the "License"). You may not use this file except in compliance + * with the License. + * + * See the file CDDL.Schily.txt in this distribution for details. + * A copy of the CDDL is also available via the Internet at + * http://www.opensource.org/licenses/cddl1.txt + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file CDDL.Schily.txt from this distribution. + */ + +#include +#include +#include +#include + +#ifdef NEED_READDIR + +#if defined(__MINGW32__) || defined(_MSC_VER) + +#include +#include +#include + +EXPORT DIR *opendir __PR((const char *)); +EXPORT int closedir __PR((DIR *)); +EXPORT struct dirent *readdir __PR((DIR *)); + +EXPORT DIR * +opendir(dname) + const char *dname; +{ + char path[PATH_MAX]; + size_t len; + uint32_t attr; + DIR *dp; + + if (dname == NULL) { + seterrno(EFAULT); + return ((DIR *)0); + } + len = strlen(dname); + if (len > PATH_MAX) { + seterrno(ENAMETOOLONG); + return ((DIR *)0); + } + if (len == 0) { + seterrno(ENOENT); + return ((DIR *)0); + } + + attr = GetFileAttributes(dname); + if (attr == INVALID_FILE_ATTRIBUTES || + (attr & FILE_ATTRIBUTE_DIRECTORY) == 0) { + seterrno(ENOTDIR); + return ((DIR *)0); + } + path[0] = '\0'; + _fullpath(path, dname, PATH_MAX); + len = strlen(path); + if (len == 0) { + seterrno(ENOENT); + return ((DIR *)0); + } + + dp = malloc(sizeof (*dp) + len + 2); /* Add 2 for "/ *" */ + if (dp == NULL) { + seterrno(ENOMEM); + return ((DIR *)0); + } + strcpy(dp->dd_dirname, path); + if (dp->dd_dirname[len-1] != '/' && + dp->dd_dirname[len-1] != '\\') { + dp->dd_dirname[len] = '\\'; + len++; + } + dp->dd_dirname[len++] = '*'; + dp->dd_dirname[len] = '\0'; + dp->dd_handle = -1; + dp->dd_state = 0; + + dp->dd_dir.d_ino = 0; + dp->dd_dir.d_reclen = 0; + dp->dd_dir.d_namlen = 0; + zerobytes(dp->dd_dir.d_name, sizeof (dp->dd_dir.d_name)); + + return (dp); +} + +EXPORT int +closedir(dp) + DIR *dp; +{ + int ret = 0; + + if (dp == NULL) { + seterrno(EFAULT); + return (-1); + } + if (dp->dd_handle != -1) { + ret = _findclose(dp->dd_handle); + } + free(dp); + + return (ret); +} + +EXPORT struct dirent * +readdir(dp) + DIR *dp; +{ + if (dp == NULL) { + seterrno(EFAULT); + return ((struct dirent *)0); + } + if (dp->dd_state == (char)-1) { + return ((struct dirent *)0); + } else if (dp->dd_state == (char)0) { + dp->dd_handle = _findfirst(dp->dd_dirname, &(dp->dd_data)); + if (dp->dd_handle != -1) + dp->dd_state = 1; + else + dp->dd_state = -1; + } else { + if (_findnext(dp->dd_handle, &(dp->dd_data))) { + uint32_t werrno = GetLastError(); + + if (werrno == ERROR_NO_MORE_FILES) + seterrno(0); + _findclose(dp->dd_handle); + dp->dd_handle = -1; + dp->dd_state = -1; + } else { + dp->dd_state = 1; /* state++ to support seekdir */ + } + } + if (dp->dd_state > 0) { + strlcpy(dp->dd_dir.d_name, dp->dd_data.name, + sizeof (dp->dd_dir.d_name)); + + return (&dp->dd_dir); + } + return ((struct dirent *)0); +} + +#endif /* defined(__MINGW32__) || defined(_MSC_VER) */ + +#endif /* NEED_READDIR */ diff -Nru cdrtools-2.01.01a33/libschily/dirname.c cdrtools-3.02a09/libschily/dirname.c --- cdrtools-2.01.01a33/libschily/dirname.c 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/libschily/dirname.c 2010-05-08 15:20:36.000000000 +0000 @@ -0,0 +1,52 @@ +/* @(#)dirname.c 1.1 10/05/08 Copyright 2010 J. Schilling */ +/* + * dirname() to be used if missing in libc + * + * Copyright (c) 2010 J. Schilling + */ +/* + * The contents of this file are subject to the terms of the + * Common Development and Distribution License, Version 1.0 only + * (the "License"). You may not use this file except in compliance + * with the License. + * + * See the file CDDL.Schily.txt in this distribution for details. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file CDDL.Schily.txt from this distribution. + */ + +#include +#include +#include + +#ifndef HAVE_DIRNAME + +EXPORT char * +dirname(name) + char *name; +{ + char *n; + + if (name == 0 || *name == '\0') + return ("."); + + n = name + strlen(name); + while (n != name && *--n == '/') + ; + + if (n == name && *n == '/') + return ("/"); + + while (n != name) { + if (*--n == '/') { + while (*n == '/' && n != name) + n--; + *++n = '\0'; + return (name); + } + } + return ("."); +} + +#endif diff -Nru cdrtools-2.01.01a33/libschily/diropen.c cdrtools-3.02a09/libschily/diropen.c --- cdrtools-2.01.01a33/libschily/diropen.c 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/libschily/diropen.c 2012-12-02 13:30:31.000000000 +0000 @@ -0,0 +1,86 @@ +/* @(#)diropen.c 1.2 12/12/02 Copyright 2011-2012 J. Schilling */ +/* + * open a directory and call fdsetname() if needed + * + * Copyright (c) 2011-2012 J. Schilling + */ +/* + * The contents of this file are subject to the terms of the + * Common Development and Distribution License, Version 1.0 only + * (the "License"). You may not use this file except in compliance + * with the License. + * + * See the file CDDL.Schily.txt in this distribution for details. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file CDDL.Schily.txt from this distribution. + */ + +#include +#include +#include +#include +#include +#include + +LOCAL int __diropen __PR((const char *name, int oflag)); + +LOCAL int +__diropen(name, oflag) + const char *name; + int oflag; +{ + int f = open(name, oflag); +#if O_DIRECTORY == 0 + struct stat sb; +#endif + if (f < 0) + return (f); + +#if O_DIRECTORY == 0 + fstat(f, &sb); + if (!S_ISDIR(sb.st_mode)) { + close(f); + seterrno(ENOTDIR); + return (-1); + } +#endif +#ifndef HAVE_FCHDIR + if (fdsetname(f, name) < 0) { + close(f); + f = -1; + } +#endif + return (f); +} + +/* + * Open for search only, which is sufficient for fchdir() and fstat(). + * This avoids permission errors when trying to open a non-readable dir. + */ +EXPORT int +diropen(name) + const char *name; +{ + return (__diropen(name, O_SEARCH|O_DIRECTORY|O_NDELAY)); +} + +/* + * Open for reading (e.g. needed for readdir()) + */ +EXPORT int +dirrdopen(name) + const char *name; +{ + return (__diropen(name, O_RDONLY|O_DIRECTORY|O_NDELAY)); +} + +EXPORT int +dirclose(f) + int f; +{ +#ifndef HAVE_FCHDIR + fdclosename(f); +#endif + return (close(f)); +} diff -Nru cdrtools-2.01.01a33/libschily/dlfcn.c cdrtools-3.02a09/libschily/dlfcn.c --- cdrtools-2.01.01a33/libschily/dlfcn.c 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/libschily/dlfcn.c 2014-05-15 20:12:20.000000000 +0000 @@ -0,0 +1,220 @@ +/* @(#)dlfcn.c 1.1 14/05/15 Copyright 2014 J. Schilling */ +/* + * Functions to support POSIX shared library handling + * + * Copyright (c) 2014 J. Schilling + */ +/* + * The contents of this file are subject to the terms of the + * Common Development and Distribution License, Version 1.0 only + * (the "License"). You may not use this file except in compliance + * with the License. + * + * See the file CDDL.Schily.txt in this distribution for details. + * A copy of the CDDL is also available via the Internet at + * http://www.opensource.org/licenses/cddl1.txt + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file CDDL.Schily.txt from this distribution. + */ + +#include +#include +#include + +#ifndef HAVE_DLOPEN + +#if !defined(DID_DLOPEN) && defined(HAVE_LOADLIBRARY) /* Win-DOS */ +#define DID_DLOPEN + +#include + +LOCAL int _dl_lasterror; + +EXPORT void * +dlopen(pathname, mode) + const char *pathname; + int mode; +{ + void *ret = NULL; + + /* + * Nur eine Directory, kein PATH: + * + * BOOL SetDllDirectory(char *pathname) + * DWORD GetDllDirectory(DWORD nBufferLength, LPTSTR lpBuffer) -> len + */ + ret = LoadLibrary(pathname); + if (ret == NULL) + _dl_lasterror = GetLastError(); + + return (ret); +} + +EXPORT int +dlclose(handle) + void *handle; +{ + int ret = 0; + + if (!FreeLibrary(handle)) { + _dl_lasterror = GetLastError(); + ret = -1; + } + + return (ret); +} + +EXPORT void * +dlsym(handle, name) + void *handle; + const char *name; +{ + void *ret = NULL; + + ret = GetProcAddress(handle, name); + if (ret == NULL) + _dl_lasterror = GetLastError(); + + return (ret); +} + +#define ERROR_BUFFER_SIZE 1024 +EXPORT const char * +dlerror() +{ + const char *ret = NULL; + DWORD dwMsgLen; +static char buff[ERROR_BUFFER_SIZE + 1]; + + if (_dl_lasterror == 0) + return (ret); + + buff[0] = 0; + dwMsgLen = FormatMessageA(FORMAT_MESSAGE_FROM_SYSTEM + |FORMAT_MESSAGE_IGNORE_INSERTS + |FORMAT_MESSAGE_MAX_WIDTH_MASK, + NULL, + _dl_lasterror, + MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), + (LPSTR)buff, + ERROR_BUFFER_SIZE, + NULL); + _dl_lasterror = 0; + ret = (const char *)buff; + + return (ret); +} + +#endif /* HAVE_LOADLOBRARY */ + +#if !defined(DID_DLOPEN) && defined(HAVE_SHL_LOAD) /* HP-UX */ +#define DID_DLOPEN + +#include /* for sterror() */ + +LOCAL int _dl_lasterror; + +EXPORT void * +dlopen(pathname, mode) + const char *pathname; + int mode; +{ + void *ret; + int flags = BIND_IMMEDIATE; + + if (mode == RTLD_LAZY) + flags = BIND_DEFERRED; + + ret = shl_load(pathname, flags, 0L); + if (ret == NULL) + _dl_lasterror = errno; + + return (ret); +} + +EXPORT int +dlclose(handle) + void *handle; +{ + return (shl_unload(handle)); +} + +EXPORT void * +dlsym(handle, name) + void *handle; + const char *name; +{ + void *ret = NULL; + + if (shl_findsym(handle, name, TYPE_UNDEFINED, &ret) != 0) + _dl_lasterror = errno; + + return (ret); +} + +EXPORT const char * +dlerror() +{ + const char *ret = NULL; + + if (_dl_lasterror == 0) + return (ret); + ret = strerror(_dl_lasterror); + _dl_lasterror = 0; + + return (ret); +} + +#endif /* HAVE_SHL_LOAD */ + +#if !defined(DID_DLOPEN) /* unknown OS */ +#define DID_DLOPEN + +/* + * If we do not have dlopen(), we at least need to define a + * dummy function of that name. + */ + +EXPORT void * +dlopen(pathname, mode) + const char *pathname; + int mode; +{ + void *ret = NULL; + + return (ret); +} + +EXPORT int +dlclose(handle) + void *handle; +{ + int ret = 0; + + return (ret); +} + +EXPORT void * +dlsym(handle, name) + void *handle; + const char *name; +{ + void *ret = NULL; + + return (ret); +} + +EXPORT const char * +dlerror() +{ + const char *ret = NULL; + + return (ret); +} + +#endif /* HAVE_SHL_LOAD */ + + +#else /* HAVE_DLOPEN */ +#endif /* HAVE_DLOPEN */ diff -Nru cdrtools-2.01.01a33/libschily/eaccess.c cdrtools-3.02a09/libschily/eaccess.c --- cdrtools-2.01.01a33/libschily/eaccess.c 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/libschily/eaccess.c 2014-05-15 20:11:04.000000000 +0000 @@ -0,0 +1,56 @@ +/* @(#)eaccess.c 1.6 14/05/15 Copyright 2004-2014 J. Schilling */ +#include +#ifndef lint +static UConst char sccsid[] = + "@(#)eaccess.c 1.6 14/05/15 Copyright 2004-2014 J. Schilling"; +#endif +/* + * Implement the best possible emulation for eaccess() + * + * Copyright 2004-2014 J. Schilling + */ +/* + * The contents of this file are subject to the terms of the + * Common Development and Distribution License, Version 1.0 only + * (the "License"). You may not use this file except in compliance + * with the License. + * + * See the file CDDL.Schily.txt in this distribution for details. + * A copy of the CDDL is also available via the Internet at + * http://www.opensource.org/licenses/cddl1.txt + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file CDDL.Schily.txt from this distribution. + */ + +#include +#include +#include +#include + +#ifndef HAVE_EACCESS +EXPORT int eaccess __PR((const char *name, int mode)); + +EXPORT int +eaccess(name, mode) + const char *name; + int mode; +{ +#ifdef HAVE_EUIDACCESS + return (euidaccess(name, mode)); +#else +#ifdef HAVE_ACCESS_E_OK + return (access(name, E_OK|mode)); +#else + if (getuid() == geteuid() && getgid() == getegid()) + return (access(name, mode)); +#ifdef EOPNOTSUPP + seterrno(EOPNOTSUPP); +#else + seterrno(EINVAL); +#endif + return (-1); +#endif +#endif +} +#endif diff -Nru cdrtools-2.01.01a33/libschily/errmsg.3 cdrtools-3.02a09/libschily/errmsg.3 --- cdrtools-2.01.01a33/libschily/errmsg.3 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/libschily/errmsg.3 1988-07-22 13:48:12.000000000 +0000 @@ -0,0 +1,49 @@ +. \" Manual Seite fuer errmsg +. \" @(#)errmsg.3 1.1 +. \" +.if t .ds a \v'-0.55m'\h'0.00n'\z.\h'0.40n'\z.\v'0.55m'\h'-0.40n'a +.if t .ds o \v'-0.55m'\h'0.00n'\z.\h'0.45n'\z.\v'0.55m'\h'-0.45n'o +.if t .ds u \v'-0.55m'\h'0.00n'\z.\h'0.40n'\z.\v'0.55m'\h'-0.40n'u +.if t .ds A \v'-0.77m'\h'0.25n'\z.\h'0.45n'\z.\v'0.77m'\h'-0.70n'A +.if t .ds O \v'-0.77m'\h'0.25n'\z.\h'0.45n'\z.\v'0.77m'\h'-0.70n'O +.if t .ds U \v'-0.77m'\h'0.30n'\z.\h'0.45n'\z.\v'0.77m'\h'-.75n'U +.if t .ds s \(*b +.if t .ds S SS +.if n .ds a ae +.if n .ds o oe +.if n .ds u ue +.if n .ds s sz +.TH ERRMSG 3 "15. Juli 1988" "J\*org Schilling" "Schily\'s LIBRARY FUNCTIONS" +.SH NAME +errmsg() \- prints error message +.SH SYNOPSIS +.nf +.B +errmsg (format, arg1\|.\|.\|.argn) +.B char *format; +.fi +.SH DESCRIPTION +errmsg() prints on the error output stream, a message +corresponding to the last error encountered by the system on +behalf of the process. errmsg() begins its output with the +current program name (as passed to it by exec ). The message +can be expanded with additional arguments, in the same form +printf() would. +.SH RETURNS +none +.SH EXAMPLES +.nf +while (more_args) { + if (( f = fileopen(arg, "r")) == NULL) { + errmsg("Skipping file %s.\\n", arg); + continue; + } + doit(f) +} +.fi +.SH "SEE ALSO" +comerr(3), comerrno(3), error(3), geterrno(3), printf(3), format(3) +.SH NOTES +errmsg() is identical to comerr() except that instead of +exiting, errmsg() prints the error message and returns to the +caller. diff -Nru cdrtools-2.01.01a33/libschily/errmsg.mk3 cdrtools-3.02a09/libschily/errmsg.mk3 --- cdrtools-2.01.01a33/libschily/errmsg.mk3 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/libschily/errmsg.mk3 2015-04-26 18:01:43.000000000 +0000 @@ -0,0 +1,18 @@ +#ident @(#)errmsg.mk3 1.1 15/04/26 +########################################################################### +# Sample makefile for installing manual pages +########################################################################### +SRCROOT= .. +RULESDIR= RULES +include $(SRCROOT)/$(RULESDIR)/rules.top +########################################################################### + +MANDIR= man +TARGETMAN= errmsg +MANSECT= $(MANSECT_LIB) +MANSUFFIX= $(MANSUFF_LIB) +MANFILE= errmsg.3 + +########################################################################### +include $(SRCROOT)/$(RULESDIR)/rules.man +########################################################################### diff -Nru cdrtools-2.01.01a33/libschily/errmsgno.3 cdrtools-3.02a09/libschily/errmsgno.3 --- cdrtools-2.01.01a33/libschily/errmsgno.3 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/libschily/errmsgno.3 1988-07-22 13:44:53.000000000 +0000 @@ -0,0 +1,42 @@ +. \" Manual Seite fuer errmsgno +. \" @(#)errmsgno.3 1.1 +. \" +.if t .ds a \v'-0.55m'\h'0.00n'\z.\h'0.40n'\z.\v'0.55m'\h'-0.40n'a +.if t .ds o \v'-0.55m'\h'0.00n'\z.\h'0.45n'\z.\v'0.55m'\h'-0.45n'o +.if t .ds u \v'-0.55m'\h'0.00n'\z.\h'0.40n'\z.\v'0.55m'\h'-0.40n'u +.if t .ds A \v'-0.77m'\h'0.25n'\z.\h'0.45n'\z.\v'0.77m'\h'-0.70n'A +.if t .ds O \v'-0.77m'\h'0.25n'\z.\h'0.45n'\z.\v'0.77m'\h'-0.70n'O +.if t .ds U \v'-0.77m'\h'0.30n'\z.\h'0.45n'\z.\v'0.77m'\h'-.75n'U +.if t .ds s \(*b +.if t .ds S SS +.if n .ds a ae +.if n .ds o oe +.if n .ds u ue +.if n .ds s sz +.TH ERRMSGNO 3 "15. Juli 1988" "J\*org Schilling" "Schily\'s LIBRARY FUNCTIONS" +.SH NAME +errmsgno() \- prints error message, given error code +.SH SYNOPSIS +.nf +.B +errmsgno (errcode, format, arg1\|.\|.\|.argn) +.B int errcode; +.B char *format; +.fi +.SH DESCRIPTION +errmsgno() prints an error output message corresponding to +errcode, which is a standard system error. +errmsgno() begins its output with the current program name (as +passed to it by exec ). The message can be expanded with +additional arguments in the same form printf() would. +.SH RETURNS +none +.SH "SEE ALSO" +comerr(3), comerrno(3), error(3), errmsg(3), error(3) geterrno(3), +printf(3), format(3) +.SH NOTES +errmsgno() is identical to comerrno() except instead of exiting, +it prints the error message and returns to the caller. +If the errcode argument is positive, errmsgno() ignores it and +just prints the program name and the result of expanding +format(). diff -Nru cdrtools-2.01.01a33/libschily/errmsgno.mk3 cdrtools-3.02a09/libschily/errmsgno.mk3 --- cdrtools-2.01.01a33/libschily/errmsgno.mk3 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/libschily/errmsgno.mk3 2015-04-26 18:01:43.000000000 +0000 @@ -0,0 +1,18 @@ +#ident @(#)errmsgno.mk3 1.1 15/04/26 +########################################################################### +# Sample makefile for installing manual pages +########################################################################### +SRCROOT= .. +RULESDIR= RULES +include $(SRCROOT)/$(RULESDIR)/rules.top +########################################################################### + +MANDIR= man +TARGETMAN= errmsgno +MANSECT= $(MANSECT_LIB) +MANSUFFIX= $(MANSUFF_LIB) +MANFILE= errmsgno.3 + +########################################################################### +include $(SRCROOT)/$(RULESDIR)/rules.man +########################################################################### diff -Nru cdrtools-2.01.01a33/libschily/error.3 cdrtools-3.02a09/libschily/error.3 --- cdrtools-2.01.01a33/libschily/error.3 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/libschily/error.3 1988-07-22 13:45:09.000000000 +0000 @@ -0,0 +1,37 @@ +. \" Manual Seite fuer error +. \" @(#)error.3 1.1 +. \" +.if t .ds a \v'-0.55m'\h'0.00n'\z.\h'0.40n'\z.\v'0.55m'\h'-0.40n'a +.if t .ds o \v'-0.55m'\h'0.00n'\z.\h'0.45n'\z.\v'0.55m'\h'-0.45n'o +.if t .ds u \v'-0.55m'\h'0.00n'\z.\h'0.40n'\z.\v'0.55m'\h'-0.40n'u +.if t .ds A \v'-0.77m'\h'0.25n'\z.\h'0.45n'\z.\v'0.77m'\h'-0.70n'A +.if t .ds O \v'-0.77m'\h'0.25n'\z.\h'0.45n'\z.\v'0.77m'\h'-0.70n'O +.if t .ds U \v'-0.77m'\h'0.30n'\z.\h'0.45n'\z.\v'0.77m'\h'-.75n'U +.if t .ds s \(*b +.if t .ds S SS +.if n .ds a ae +.if n .ds o oe +.if n .ds u ue +.if n .ds s sz +.TH ERROR 3 "15. Juli 1988" "J\*org Schilling" "Schily\'s LIBRARY FUNCTIONS" +.SH NAME +error() \- formats and prints on the standard error +stream +.SH SYNOPSIS +.nf +.B +error(format,arg1\|.\|.\|.argn); +.B char *format +.fi +.SH DESCRIPTION +error is the equivalent of: +fprintf(stderr, format, arg1\|.\|.\|.argn). +.SH RETURNS +none +.SH "SEE ALSO" +comerr(3), comerrno(3), error(3), errmsg(3), error(3) geterrno(3), +printf(3), format(3) +.SH NOTES +Normally stderr is unbuffered. Using error() allows a simple +message to be immediately written to the user via the standard +error stream (stderr). diff -Nru cdrtools-2.01.01a33/libschily/error.c cdrtools-3.02a09/libschily/error.c --- cdrtools-2.01.01a33/libschily/error.c 2006-09-13 15:05:35.000000000 +0000 +++ cdrtools-3.02a09/libschily/error.c 2015-07-31 22:21:14.000000000 +0000 @@ -1,8 +1,8 @@ -/* @(#)error.c 1.14 06/09/13 Copyright 1985, 1989, 1995-2003 J. Schilling */ +/* @(#)error.c 1.18 15/08/01 Copyright 1985, 1989, 1995-2015 J. Schilling */ /* * fprintf() on standard error stdio stream * - * Copyright (c) 1985, 1989, 1995-2003 J. Schilling + * Copyright (c) 1985, 1989, 1995-2015 J. Schilling */ /* * The contents of this file are subject to the terms of the @@ -11,17 +11,32 @@ * with the License. * * See the file CDDL.Schily.txt in this distribution for details. + * A copy of the CDDL is also available via the Internet at + * http://www.opensource.org/licenses/cddl1.txt * * When distributing Covered Code, include this CDDL HEADER in each * file and include the License file CDDL.Schily.txt from this distribution. */ #include -#include +#include #include #include #include +#undef error + +#ifndef NO_WEAK_SYMBOLS +/* + * The Cygwin compile environment incorrectly implements #pragma weak. + * The weak symbols are only defined as local symbols making it impossible + * to use them from outside the scope of this source file. + * A platform that allows linking with global symbols has HAVE_LINK_WEAK + * defined. + */ +#if defined(HAVE_PRAGMA_WEAK) && defined(HAVE_LINK_WEAK) +#pragma weak error = js_error +#else /* VARARGS1 */ #ifdef PROTOTYPES EXPORT int @@ -32,6 +47,32 @@ char *fmt; va_dcl #endif +{ + va_list args; + int ret; + +#ifdef PROTOTYPES + va_start(args, fmt); +#else + va_start(args); +#endif + ret = js_fprintf(stderr, "%r", fmt, args); + va_end(args); + return (ret); +} +#endif +#endif /* NO_WEAK_SYMBOLS */ + +/* VARARGS1 */ +#ifdef PROTOTYPES +EXPORT int +js_error(const char *fmt, ...) +#else +EXPORT int +js_error(fmt, va_alist) + char *fmt; + va_dcl +#endif { va_list args; int ret; diff -Nru cdrtools-2.01.01a33/libschily/error.mk3 cdrtools-3.02a09/libschily/error.mk3 --- cdrtools-2.01.01a33/libschily/error.mk3 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/libschily/error.mk3 2015-04-26 18:01:43.000000000 +0000 @@ -0,0 +1,18 @@ +#ident @(#)error.mk3 1.1 15/04/26 +########################################################################### +# Sample makefile for installing manual pages +########################################################################### +SRCROOT= .. +RULESDIR= RULES +include $(SRCROOT)/$(RULESDIR)/rules.top +########################################################################### + +MANDIR= man +TARGETMAN= error +MANSECT= $(MANSECT_LIB) +MANSUFFIX= $(MANSUFF_LIB) +MANFILE= error.3 + +########################################################################### +include $(SRCROOT)/$(RULESDIR)/rules.man +########################################################################### diff -Nru cdrtools-2.01.01a33/libschily/faccessat.c cdrtools-3.02a09/libschily/faccessat.c --- cdrtools-2.01.01a33/libschily/faccessat.c 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/libschily/faccessat.c 2014-05-11 15:49:36.000000000 +0000 @@ -0,0 +1,58 @@ +/* @(#)faccessat.c 1.1 14/05/11 Copyright 2013-2014 J. Schilling */ +/* + * Emulate the behavior of faccessat(int fd, const char *name, + * int amode, int flag) + * + * Note that emulation methods that do not use the /proc filesystem are + * not MT safe. In the non-MT-safe case, we do: + * + * savewd()/fchdir()/open(name)/restorewd() + * + * Errors may force us to abort the program as our caller is not expected + * to know that we do more than a simple open() here and that the + * working directory may be changed by us. + * + * Copyright (c) 2013-2014 J. Schilling + */ +/* + * The contents of this file are subject to the terms of the + * Common Development and Distribution License, Version 1.0 only + * (the "License"). You may not use this file except in compliance + * with the License. + * + * See the file CDDL.Schily.txt in this distribution for details. + * A copy of the CDDL is also available via the Internet at + * http://www.opensource.org/licenses/cddl1.txt + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file CDDL.Schily.txt from this distribution. + */ + +#include +#include +#include +#include +#include +#include +#include +#include "at-defs.h" + +#ifndef HAVE_FACCESSAT + +/* CSTYLED */ +#define PROTO_DECL , int amode, int flag +#define KR_DECL int amode; int flag; +/* CSTYLED */ +#define KR_ARGS , amode, flag +#define FUNC_CALL(n) (flag & AT_EACCESS ? \ + eaccess(n, amode) : access(n, amode)) +#define FLAG_CHECK() if (flag & ~(AT_EACCESS)) { \ + seterrno(EINVAL); \ + return (-1); \ + } +#define FUNC_NAME faccessat +#define FUNC_RESULT int + +#include "at-base.c" + +#endif /* HAVE_FCHOWNAT */ diff -Nru cdrtools-2.01.01a33/libschily/fchdir.c cdrtools-3.02a09/libschily/fchdir.c --- cdrtools-2.01.01a33/libschily/fchdir.c 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/libschily/fchdir.c 2011-10-21 18:41:42.000000000 +0000 @@ -0,0 +1,122 @@ +/* @(#)fchdir.c 1.2 11/10/21 Copyright 2011 J. Schilling */ +/* + * Emulate the behavior of fchdir(fd) + * + * Copyright (c) 2011 J. Schilling + */ +/* + * The contents of this file are subject to the terms of the + * Common Development and Distribution License, Version 1.0 only + * (the "License"). You may not use this file except in compliance + * with the License. + * + * See the file CDDL.Schily.txt in this distribution for details. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file CDDL.Schily.txt from this distribution. + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include "at-defs.h" + +#ifndef HAVE_FCHDIR + +#define DN_SIZE 256 +LOCAL char *dnames[DN_SIZE]; + +EXPORT int +fchdir(fd) + int fd; +{ + if (fd < 0) { + seterrno(EBADF); + return (-1); + } + if (fd >= DN_SIZE) { + seterrno(ENOTDIR); + return (-1); + } + if (dnames[fd] == NULL) { + seterrno(ENOTDIR); + return (-1); + } + return (lxchdir(dnames[fd])); +} + +EXPORT int +fdsetname(fd, name) + int fd; + const char *name; +{ + if (fd < 0) { + seterrno(EBADF); + return (-1); + } + if (fd >= DN_SIZE) + return (-1); + + { + char buf[max(8192, PATH_MAX+1)]; + + if (abspath(name, buf, sizeof (buf)) == NULL) { + return (-1); + } + if (dnames[fd] != NULL) + free(dnames[fd]); + dnames[fd] = strdup(buf); + if (dnames[fd] == NULL) + return (-1); + } + + return (0); +} + +EXPORT int +fdclosename(fd) + int fd; +{ + if (fd < 0) { + seterrno(EBADF); + return (-1); + } + if (fd >= DN_SIZE) + return (-1); + + if (dnames[fd] != NULL) + free(dnames[fd]); + dnames[fd] = NULL; + return (0); +} + +#else /* HAVE_FCHDIR */ + +#undef fdsetname +#undef fdclosename + +extern int fdsetname __PR((int fd, const char *name)); +extern int fdclosename __PR((int fd)); + +/* ARGSUSED */ +EXPORT int +fdsetname(fd, name) + int fd; + const char *name; +{ + return (0); +} + +/* ARGSUSED */ +EXPORT int +fdclosename(fd) + int fd; +{ + return (0); +} +#endif /* HAVE_FCHDIR */ diff -Nru cdrtools-2.01.01a33/libschily/fchmodat.c cdrtools-3.02a09/libschily/fchmodat.c --- cdrtools-2.01.01a33/libschily/fchmodat.c 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/libschily/fchmodat.c 2014-06-03 18:34:47.000000000 +0000 @@ -0,0 +1,81 @@ +/* @(#)fchmodat.c 1.2 14/06/03 Copyright 2014 J. Schilling */ +/* + * Emulate the behavior of fchmodat(int fd, const char *name, mode_t mode, int flag) + * + * Note that emulation methods that do not use the /proc filesystem are + * not MT safe. In the non-MT-safe case, we do: + * + * savewd()/fchdir()/open(name)/restorewd() + * + * Errors may force us to abort the program as our caller is not expected + * to know that we do more than a simple open() here and that the + * working directory may be changed by us. + * + * Copyright (c) 2014 J. Schilling + */ +/* + * The contents of this file are subject to the terms of the + * Common Development and Distribution License, Version 1.0 only + * (the "License"). You may not use this file except in compliance + * with the License. + * + * See the file CDDL.Schily.txt in this distribution for details. + * A copy of the CDDL is also available via the Internet at + * http://www.opensource.org/licenses/cddl1.txt + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file CDDL.Schily.txt from this distribution. + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include "at-defs.h" + +#ifndef HAVE_FCHMODAT +#ifndef HAVE_CHMOD +/* ARGSUSED */ +#ifdef PROTOTYPES +EXPORT int +fchmodat(int fd, const char *name, mode_t mode) +#else +EXPORT int +fchmodat(fd, name, mode) + int fd; + const char *name; + mode_t mode; +#endif +{ +#ifdef ENOSYS + seterrno(ENOSYS); +#else + seterrno(EINVAL); +#endif + return (-1); +} +#else /* HAVE_CHMOD */ + +/* CSTYLED */ +#define PROTO_DECL , mode_t mode, int flag +#define KR_DECL mode_t mode; int flag; +/* CSTYLED */ +#define KR_ARGS , mode, flag +#define FUNC_CALL(n) (flag & AT_SYMLINK_NOFOLLOW ? \ + lchmod(n, mode) : chmod(n, mode)) +#define FLAG_CHECK() if (flag & ~(AT_SYMLINK_NOFOLLOW)) { \ + seterrno(EINVAL); \ + return (-1); \ + } + +#define FUNC_NAME fchmodat +#define FUNC_RESULT int + +#include "at-base.c" + +#endif /* HAVE_CHMOD */ +#endif /* HAVE_FCHMODDAT */ diff -Nru cdrtools-2.01.01a33/libschily/fchownat.c cdrtools-3.02a09/libschily/fchownat.c --- cdrtools-2.01.01a33/libschily/fchownat.c 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/libschily/fchownat.c 2013-10-30 22:54:18.000000000 +0000 @@ -0,0 +1,62 @@ +/* @(#)fchownat.c 1.2 13/10/30 Copyright 2013 J. Schilling */ +/* + * Emulate the behavior of fchownat(int fd, const char *name, + * uid_t owner, gid_t group, int flag) + * + * Note that emulation methods that do not use the /proc filesystem are + * not MT safe. In the non-MT-safe case, we do: + * + * savewd()/fchdir()/open(name)/restorewd() + * + * Errors may force us to abort the program as our caller is not expected + * to know that we do more than a simple open() here and that the + * working directory may be changed by us. + * + * Copyright (c) 2013 J. Schilling + */ +/* + * The contents of this file are subject to the terms of the + * Common Development and Distribution License, Version 1.0 only + * (the "License"). You may not use this file except in compliance + * with the License. + * + * See the file CDDL.Schily.txt in this distribution for details. + * A copy of the CDDL is also available via the Internet at + * http://www.opensource.org/licenses/cddl1.txt + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file CDDL.Schily.txt from this distribution. + */ + +#include +#include +#include +#include +#include +#include +#include +#include "at-defs.h" + +#ifndef HAVE_FCHOWNAT + +#ifndef HAVE_LCHOWN +#define lchown chown +#endif + +/* CSTYLED */ +#define PROTO_DECL , uid_t owner, gid_t group, int flag +#define KR_DECL uid_t owner; gid_t group; int flag; +/* CSTYLED */ +#define KR_ARGS , owner, group, flag +#define FUNC_CALL(n) (flag & AT_SYMLINK_NOFOLLOW ? \ + lchown(n, owner, group) : chown(n, owner, group)) +#define FLAG_CHECK() if (flag & ~(AT_SYMLINK_NOFOLLOW)) { \ + seterrno(EINVAL); \ + return (-1); \ + } +#define FUNC_NAME fchownat +#define FUNC_RESULT int + +#include "at-base.c" + +#endif /* HAVE_FCHOWNAT */ diff -Nru cdrtools-2.01.01a33/libschily/fcomerr.c cdrtools-3.02a09/libschily/fcomerr.c --- cdrtools-2.01.01a33/libschily/fcomerr.c 2007-02-26 12:00:26.000000000 +0000 +++ cdrtools-3.02a09/libschily/fcomerr.c 2015-06-28 21:12:39.000000000 +0000 @@ -1,8 +1,8 @@ -/* @(#)fcomerr.c 1.1 07/02/26 Copyright 1985-1989, 1995-2007 J. Schilling */ +/* @(#)fcomerr.c 1.6 15/06/28 Copyright 1985-1989, 1995-2015 J. Schilling */ /* * Routines for printing command errors on a specified FILE * * - * Copyright (c) 1985-1989, 1995-2007 J. Schilling + * Copyright (c) 1985-1989, 1995-2015 J. Schilling */ /* * The contents of this file are subject to the terms of the @@ -11,6 +11,8 @@ * with the License. * * See the file CDDL.Schily.txt in this distribution for details. + * A copy of the CDDL is also available via the Internet at + * http://www.opensource.org/licenses/cddl1.txt * * When distributing Covered Code, include this CDDL HEADER in each * file and include the License file CDDL.Schily.txt from this distribution. @@ -18,7 +20,7 @@ #include #include /* include try to get size_t */ -#include /* Try again for size_t */ +#include /* Try again for size_t */ #include /* Try again for size_t */ #include #include @@ -27,11 +29,15 @@ #include EXPORT void fcomerr __PR((FILE *, const char *, ...)); +EXPORT void fxcomerr __PR((FILE *, int, const char *, ...)); EXPORT void fcomerrno __PR((FILE *, int, const char *, ...)); +EXPORT void fxcomerrno __PR((FILE *, int, int, const char *, ...)); EXPORT int ferrmsg __PR((FILE *, const char *, ...)); EXPORT int ferrmsgno __PR((FILE *, int, const char *, ...)); -/*extern int _comerr __PR((FILE *, int, int, const char *, va_list));*/ +/* + * Fetch current errno, print a related message and exit(errno). + */ /* VARARGS1 */ #ifdef PROTOTYPES EXPORT void @@ -51,11 +57,42 @@ #else va_start(args); #endif - (void) _comerr(f, TRUE, geterrno(), msg, args); + (void) _comerr(f, COMERR_EXIT, 0, geterrno(), msg, args); /* NOTREACHED */ va_end(args); } +/* + * Fetch current errno, print a related message and exit(exc). + */ +/* VARARGS2 */ +#ifdef PROTOTYPES +EXPORT void +fxcomerr(FILE *f, int exc, const char *msg, ...) +#else +EXPORT void +fxcomerr(f, exc, msg, va_alist) + int exc; + FILE *f; + char *msg; + va_dcl +#endif +{ + va_list args; + +#ifdef PROTOTYPES + va_start(args, msg); +#else + va_start(args); +#endif + (void) _comerr(f, COMERR_EXCODE, exc, geterrno(), msg, args); + /* NOTREACHED */ + va_end(args); +} + +/* + * Print a message related to err and exit(err). + */ /* VARARGS2 */ #ifdef PROTOTYPES EXPORT void @@ -76,11 +113,43 @@ #else va_start(args); #endif - (void) _comerr(f, TRUE, err, msg, args); + (void) _comerr(f, COMERR_EXIT, 0, err, msg, args); /* NOTREACHED */ va_end(args); } +/* + * Print a message related to err and exit(exc). + */ +/* VARARGS3 */ +#ifdef PROTOTYPES +EXPORT void +fxcomerrno(FILE *f, int exc, int err, const char *msg, ...) +#else +EXPORT void +fxcomerrno(f, exc, err, msg, va_alist) + FILE *f; + int exc; + int err; + char *msg; + va_dcl +#endif +{ + va_list args; + +#ifdef PROTOTYPES + va_start(args, msg); +#else + va_start(args); +#endif + (void) _comerr(f, COMERR_EXCODE, exc, err, msg, args); + /* NOTREACHED */ + va_end(args); +} + +/* + * Fetch current errno, print a related message and return(errno). + */ /* VARARGS1 */ #ifdef PROTOTYPES EXPORT int @@ -101,11 +170,14 @@ #else va_start(args); #endif - ret = _comerr(f, FALSE, geterrno(), msg, args); + ret = _comerr(f, COMERR_RETURN, 0, geterrno(), msg, args); va_end(args); return (ret); } +/* + * Print a message related to err and return(err). + */ /* VARARGS2 */ #ifdef PROTOTYPES EXPORT int @@ -127,7 +199,7 @@ #else va_start(args); #endif - ret = _comerr(f, FALSE, err, msg, args); + ret = _comerr(f, COMERR_RETURN, 0, err, msg, args); va_end(args); return (ret); } diff -Nru cdrtools-2.01.01a33/libschily/fconv.c cdrtools-3.02a09/libschily/fconv.c --- cdrtools-2.01.01a33/libschily/fconv.c 2006-10-29 11:46:30.000000000 +0000 +++ cdrtools-3.02a09/libschily/fconv.c 2017-11-16 21:16:59.000000000 +0000 @@ -1,9 +1,9 @@ -/* @(#)fconv.c 1.36 06/10/29 Copyright 1985, 1995-2003 J. Schilling */ +/* @(#)fconv.c 1.46 17/11/16 Copyright 1985, 1995-2017 J. Schilling */ /* * Convert floating point numbers to strings for format.c * Should rather use the MT-safe routines [efg]convert() * - * Copyright (c) 1985, 1995-2003 J. Schilling + * Copyright (c) 1985, 1995-2017 J. Schilling */ /* * The contents of this file are subject to the terms of the @@ -12,6 +12,8 @@ * with the License. * * See the file CDDL.Schily.txt in this distribution for details. + * A copy of the CDDL is also available via the Internet at + * http://www.opensource.org/licenses/cddl1.txt * * When distributing Covered Code, include this CDDL HEADER in each * file and include the License file CDDL.Schily.txt from this distribution. @@ -20,10 +22,13 @@ #include /* <- may define NO_FLOATINGPOINT */ #ifndef NO_FLOATINGPOINT +#ifndef __DO_LONG_DOUBLE__ #include #include #include #include +#include /* The default place for isinf()/isnan() */ +#include #if !defined(HAVE_STDLIB_H) || defined(HAVE_DTOA) extern char *ecvt __PR((double, int, int *, int *)); @@ -34,13 +39,17 @@ /* * *BSD alike libc */ +#define FOUND_ISNAN +#define FOUND_ISINF #define FOUND_ISXX #endif -#include - #if defined(HAVE_C99_ISNAN) && defined(HAVE_C99_ISINF) +#ifndef FOUND_ISXX #define FOUND_ISXX +#endif +#define FOUND_C99_ISNAN +#define FOUND_C99_ISINF #define FOUND_C99_ISXX #endif @@ -59,49 +68,123 @@ * Let's hope that we will not get problems with the new order. */ #include -#ifndef isnan +#if !defined(isnan) && defined(IS_NAN) #define isnan IS_NAN +#define FOUND_ISNAN #endif -#ifndef isinf +#if !defined(isinf) && defined(FINITE) #define isinf !FINITE -/*#define isinf IS_INF*/ +#define FOUND_ISINF #endif +#if defined(FOUND_ISNAN) && defined(FOUND_ISINF) #define FOUND_ISXX #endif +#endif -#if defined(HAVE_IEEEFP_H) && !defined(FOUND_ISXX) +#if defined(HAVE_IEEEFP_H) && !defined(FOUND_ISXX) && \ + !defined(FOUND_C99_ISXX) /* * SVR4 */ #include +#ifdef HAVE_ISNAND #ifndef isnan #define isnan isnand +#define FOUND_ISNAN +#endif #endif +#ifdef HAVE_FINITE #ifndef isinf #define isinf !finite +#define FOUND_ISINF +#endif #endif +#if defined(FOUND_ISNAN) && defined(FOUND_ISINF) #define FOUND_ISXX #endif +#endif /* * WAS: * #if defined(__hpux) || defined(VMS) || defined(_SCO_DS) || defined(__QNX__) */ +#ifdef __nneded__ #if defined(__hpux) || defined(__QNX__) || defined(__DJGPP__) #ifndef FOUND_C99_ISXX #undef isnan #undef isinf #endif #endif +#endif /* __needed__ */ -#if !defined(isnan) && !defined(HAVE_ISNAN) && !defined(HAVE_C99_ISNAN) +/* + * As we no longer check for defined(isnan)/defined(isinf), the next block + * should also handle the problems with DJGPP, HP-UX, QNX and VMS. + */ +#if !defined(FOUND_ISNAN) && !defined(HAVE_C99_ISNAN) +#undef isnan #define isnan(val) (0) +#define NO_ISNAN #endif -#if !defined(isinf) && !defined(HAVE_ISINF) && !defined(HAVE_C99_ISINF) +#if !defined(FOUND_ISINF) && !defined(HAVE_C99_ISINF) +#undef isinf #define isinf(val) (0) +#define NO_ISINF +#endif + +#if defined(NO_ISNAN) || defined(NO_ISINF) +#include /* For values.h */ +#if (_IEEE - 0) > 0 /* We know that there is IEEE FP */ +/* + * Note that older HP-UX versions have different #defines for MAXINT in + * values.h and sys/param.h + */ +#include +#include + +#ifdef WORDS_BIGENDIAN +#define fpw_high(x) ((UInt32_t *)&x)[0] +#define fpw_low(x) ((UInt32_t *)&x)[1] +#else +#define fpw_high(x) ((UInt32_t *)&x)[1] +#define fpw_low(x) ((UInt32_t *)&x)[0] #endif +#define FP_EXP 0x7FF00000 +#define fp_exp(x) (fpw_high(x) & FP_EXP) +#define fp_exc(x) (fp_exp(x) == FP_EXP) + +#ifdef NO_ISNAN +#undef isnan +#define isnan(val) (fp_exc(val) && \ + (fpw_low(val) != 0 || (fpw_high(val) & 0xFFFFF) != 0)) +#endif +#ifdef NO_ISINF +#undef isinf +#define isinf(val) (fp_exc(val) && \ + fpw_low(val) == 0 && (fpw_high(val) & 0xFFFFF) == 0) +#endif +#endif /* We know that there is IEEE FP */ +#endif /* defined(NO_ISNAN) || defined(NO_ISINF) */ + #if !defined(HAVE_ECVT) || !defined(HAVE_FCVT) || !defined(HAVE_GCVT) + +#ifdef NO_USER_XCVT + /* + * We cannot define our own ecvt()/fcvt()/gcvt() so we need to use + * local names instead. + */ +#ifndef HAVE_ECVT +#define ecvt js_ecvt +#endif +#ifndef HAVE_FCVT +#define fcvt js_fcvt +#endif +#ifndef HAVE_GCVT +#define gcvt js_gcvt +#endif +#endif + #include "cvt.c" #endif @@ -109,16 +192,25 @@ static char _js_inf[] = "(Infinity)"; static int _ferr __PR((char *, double)); +#endif /* __DO_LONG_DOUBLE__ */ + +#ifdef __DO_LONG_DOUBLE__ +#undef MDOUBLE +#define MDOUBLE long double +#else +#undef MDOUBLE +#define MDOUBLE double +#endif #ifdef abs -# undef abs +#undef abs #endif #define abs(i) ((i) < 0 ? -(i) : (i)) EXPORT int ftoes(s, val, fieldwidth, ndigits) register char *s; - double val; + MDOUBLE val; register int fieldwidth; register int ndigits; { @@ -128,9 +220,16 @@ register int rdecpt; int decpt; int sign; + int Efmt = FALSE; +#ifndef __DO_LONG_DOUBLE__ if ((len = _ferr(s, val)) > 0) return (len); +#endif + if (ndigits < 0) { + ndigits = -ndigits; + Efmt = TRUE; + } rs = s; #ifdef V7_FLOATSTYLE b = ecvt(val, ndigits, &decpt, &sign); @@ -139,6 +238,13 @@ b = ecvt(val, ndigits+1, &decpt, &sign); rdecpt = decpt-1; #endif +#ifdef __DO_LONG_DOUBLE__ + len = *b; + if (len < '0' || len > '9') { /* Inf/NaN */ + strcpy(s, b); + return (strlen(b)); + } +#endif len = ndigits + 6; /* Punkt e +/- nnn */ if (sign) len++; @@ -151,12 +257,25 @@ if (*b) *rs++ = *b++; #endif +#if defined(HAVE_LOCALECONV) && defined(USE_LOCALE) + *rs++ = *(localeconv()->decimal_point); +#else *rs++ = '.'; +#endif while (*b && ndigits-- > 0) *rs++ = *b++; - *rs++ = 'e'; + if (Efmt) + *rs++ = 'E'; + else + *rs++ = 'e'; *rs++ = rdecpt >= 0 ? '+' : '-'; rdecpt = abs(rdecpt); +#ifdef __DO_LONG_DOUBLE__ + if (rdecpt >= 1000) { /* Max-Exp is > 4000 */ + *rs++ = rdecpt / 1000 + '0'; + rdecpt %= 1000; + } +#endif #ifndef V7_FLOATSTYLE if (rdecpt >= 100) #endif @@ -180,7 +299,7 @@ EXPORT int ftofs(s, val, fieldwidth, ndigits) register char *s; - double val; + MDOUBLE val; register int fieldwidth; register int ndigits; { @@ -190,9 +309,16 @@ register int rdecpt; int decpt; int sign; + int Ffmt = FALSE; +#ifndef __DO_LONG_DOUBLE__ if ((len = _ferr(s, val)) > 0) return (len); +#endif + if (ndigits < 0) { + ndigits = -ndigits; + Ffmt = TRUE; + } rs = s; #ifdef USE_ECVT /* @@ -208,6 +334,13 @@ #else b = fcvt(val, ndigits, &decpt, &sign); #endif +#ifdef __DO_LONG_DOUBLE__ + len = *b; + if (len < '0' || len > '9') { /* Inf/NaN */ + strcpy(s, b); + return (strlen(b)); + } +#endif rdecpt = decpt; len = rdecpt + ndigits + 1; if (rdecpt < 0) @@ -233,7 +366,11 @@ *rs++ = '0'; } #endif +#if defined(HAVE_LOCALECONV) && defined(USE_LOCALE) + *rs++ = *(localeconv()->decimal_point); +#else *rs++ = '.'; +#endif if (rdecpt < 0) { len = rdecpt; while (len++ < 0 && ndigits-- > 0) @@ -249,6 +386,28 @@ return (rs - s); } +#ifndef __DO_LONG_DOUBLE__ + +#ifdef HAVE_LONGDOUBLE +#ifdef HAVE__LDECVT +#define qecvt(ld, n, dp, sp) _ldecvt(*(long_double *)&ld, n, dp, sp) +#endif +#ifdef HAVE__LDFCVT +#define qfcvt(ld, n, dp, sp) _ldfcvt(*(long_double *)&ld, n, dp, sp) +#endif + +#if (defined(HAVE_QECVT) || defined(HAVE__LDECVT)) && \ + (defined(HAVE_QFCVT) || defined(HAVE__LDFCVT)) +#define __DO_LONG_DOUBLE__ +#define ftoes qftoes +#define ftofs qftofs +#define ecvt qecvt +#define fcvt qfcvt +#include "fconv.c" +#undef __DO_LONG_DOUBLE__ +#endif +#endif /* HAVE_LONGDOUBLE */ + LOCAL int _ferr(s, val) char *s; @@ -268,4 +427,5 @@ } return (0); } +#endif /* __DO_LONG_DOUBLE__ */ #endif /* NO_FLOATINGPOINT */ diff -Nru cdrtools-2.01.01a33/libschily/fdopendir.c cdrtools-3.02a09/libschily/fdopendir.c --- cdrtools-2.01.01a33/libschily/fdopendir.c 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/libschily/fdopendir.c 2013-10-27 17:03:37.000000000 +0000 @@ -0,0 +1,122 @@ +/* @(#)fdopendir.c 1.1 13/10/27 Copyright 2011-2013 J. Schilling */ +/* + * Emulate the behavior of fdopendir(fd) + * + * Note that emulation methods that do not use the /proc filesystem are + * not MT safe. In the non-MT-safe case, we do: + * + * savewd()/fchdir()/open(name)/restorewd() + * + * Errors may force us to abort the program as our caller is not expected + * to know that we do more than a simple open() here and that the + * working directory may be changed by us. + * + * Copyright (c) 2011-13 J. Schilling + */ +/* + * The contents of this file are subject to the terms of the + * Common Development and Distribution License, Version 1.0 only + * (the "License"). You may not use this file except in compliance + * with the License. + * + * See the file CDDL.Schily.txt in this distribution for details. + * A copy of the CDDL is also available via the Internet at + * http://www.opensource.org/licenses/cddl1.txt + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file CDDL.Schily.txt from this distribution. + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include "at-defs.h" + +#ifndef HAVE_FDOPENDIR + +#ifndef ENAMETOOLONG +#define ENAMETOOLONG EINVAL +#endif + +EXPORT DIR * +fdopendir(fd) + int fd; +{ + int n; + DIR *ret = 0; + char buf[PATH_MAX]; + char *proc_name; + struct save_wd save_wd; + + if ((proc_name = proc_fd2name(buf, fd, ".")) != NULL) { + ret = opendir(proc_name); + if (ret != (DIR *)NULL) { + close(fd); + return (ret); + } + if (NON_PROCFS_ERRNO(errno)) + return (ret); + } else if (geterrno() == ENAMETOOLONG) { + return ((DIR *)NULL); + } + + if (savewd(&save_wd) < 0) { + /* + * We abort here as the caller may not know that we are forced + * to savewd/fchdir/restorewd here and misinterpret errno. + */ + savewd_abort(geterrno()); + /* NOTREACHED */ + return ((DIR *)NULL); + } + if (fd >= 0 && save_wd.fd == fd) { + /* + * If we just opened "fd" with the same number in savewd(), fd + * must have been illegal when calling openat(); + */ + closewd(&save_wd); + seterrno(EBADF); + return ((DIR *)NULL); + } + if ((n = fchdir(fd)) < 0) { + int err = geterrno(); + /* + * In case that fchdir() is emulated via chdir() and we use a + * multi hop chdir(), we may be on an undefined intermediate + * directory. Try to return to last working directory and if + * this fails, abort for security. + */ + if (n == -2 && restorewd(&save_wd) < 0) { + restorewd_abort(geterrno()); + /* NOTREACHED */ + } + closewd(&save_wd); + seterrno(err); + return ((DIR *)NULL); + } + + ret = opendir("."); /* The actual call() */ + if (ret != (DIR *)NULL) + close(fd); + + if (restorewd(&save_wd) < 0) { + int err = geterrno(); + + closedir(ret); + closewd(&save_wd); + restorewd_abort(err); + /* NOTREACHED */ + seterrno(err); + return ((DIR *)NULL); + } + closewd(&save_wd); + + return (ret); +} + +#endif /* HAVE_FDOPENDIR */ diff -Nru cdrtools-2.01.01a33/libschily/fdown.3 cdrtools-3.02a09/libschily/fdown.3 --- cdrtools-2.01.01a33/libschily/fdown.3 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/libschily/fdown.3 1988-07-31 11:37:46.000000000 +0000 @@ -0,0 +1,37 @@ +. \" Manual Seite fuer fdown +. \" @(#)fdown.3 1.1 +. \" +.if t .ds a \v'-0.55m'\h'0.00n'\z.\h'0.40n'\z.\v'0.55m'\h'-0.40n'a +.if t .ds o \v'-0.55m'\h'0.00n'\z.\h'0.45n'\z.\v'0.55m'\h'-0.45n'o +.if t .ds u \v'-0.55m'\h'0.00n'\z.\h'0.40n'\z.\v'0.55m'\h'-0.40n'u +.if t .ds A \v'-0.77m'\h'0.25n'\z.\h'0.45n'\z.\v'0.77m'\h'-0.70n'A +.if t .ds O \v'-0.77m'\h'0.25n'\z.\h'0.45n'\z.\v'0.77m'\h'-0.70n'O +.if t .ds U \v'-0.77m'\h'0.30n'\z.\h'0.45n'\z.\v'0.77m'\h'-.75n'U +.if t .ds s \(*b +.if t .ds S SS +.if n .ds a ae +.if n .ds o oe +.if n .ds u ue +.if n .ds s sz +.TH FDOWN 3 "15. Juli 1988" "J\*org Schilling" "Schily\'s LIBRARY FUNCTIONS" +.SH NAME +fdown() \- returns a logical unit number +.SH SYNOPSIS +.nf +.B +int fdown(f) +.B FILE *f; +.fi +.SH DESCRIPTION +fdown(), given a standard I/O FILE *f, returns the file +number. A file number is usually a small number like 2 +which is not a unique number system-wide but is peculiar to the +specified process. +fdown() can be used to implement additional functions not +provided for in the standard I/O library. It verifies that the +file was opened via fileopen(). +.SH RETURNS +Returns the actual system file number. +.SH NOTES +Since this call is system dependent, it should be used +carefully. diff -Nru cdrtools-2.01.01a33/libschily/fdown.mk3 cdrtools-3.02a09/libschily/fdown.mk3 --- cdrtools-2.01.01a33/libschily/fdown.mk3 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/libschily/fdown.mk3 2015-04-26 18:01:43.000000000 +0000 @@ -0,0 +1,18 @@ +#ident @(#)fdown.mk3 1.1 15/04/26 +########################################################################### +# Sample makefile for installing manual pages +########################################################################### +SRCROOT= .. +RULESDIR= RULES +include $(SRCROOT)/$(RULESDIR)/rules.top +########################################################################### + +MANDIR= man +TARGETMAN= fdown +MANSECT= $(MANSECT_LIB) +MANSUFFIX= $(MANSUFF_LIB) +MANFILE= fdown.3 + +########################################################################### +include $(SRCROOT)/$(RULESDIR)/rules.man +########################################################################### diff -Nru cdrtools-2.01.01a33/libschily/fdup.3 cdrtools-3.02a09/libschily/fdup.3 --- cdrtools-2.01.01a33/libschily/fdup.3 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/libschily/fdup.3 1988-07-21 15:51:36.000000000 +0000 @@ -0,0 +1,37 @@ +. \" Manual Seite fuer fdup +. \" @(#)fdup.3 1.1 +. \" +.if t .ds a \v'-0.55m'\h'0.00n'\z.\h'0.40n'\z.\v'0.55m'\h'-0.40n'a +.if t .ds o \v'-0.55m'\h'0.00n'\z.\h'0.45n'\z.\v'0.55m'\h'-0.45n'o +.if t .ds u \v'-0.55m'\h'0.00n'\z.\h'0.40n'\z.\v'0.55m'\h'-0.40n'u +.if t .ds A \v'-0.77m'\h'0.25n'\z.\h'0.45n'\z.\v'0.77m'\h'-0.70n'A +.if t .ds O \v'-0.77m'\h'0.25n'\z.\h'0.45n'\z.\v'0.77m'\h'-0.70n'O +.if t .ds U \v'-0.77m'\h'0.30n'\z.\h'0.45n'\z.\v'0.77m'\h'-.75n'U +.if t .ds s \(*b +.if t .ds S SS +.if n .ds a ae +.if n .ds o oe +.if n .ds u ue +.if n .ds s sz +.TH FDUP 3 "15. Juli 1988" "J\*org Schilling" "Schily\'s LIBRARY FUNCTIONS" +.SH NAME +fdup() \- returns new file identical to the given file +.SH SYNOPSIS +.nf +.B +FILE fdup(f) +.B FILE *f; +.fi +.SH DESCRIPTION +fdup() creates a new file stream which accesses the same file as +f. The new file will have the same read/write/buffered +attributes as the old file. +fdup() can be used to simultaneously read from two different +positions in a file. +.SH RETURNS +Returns the duplicate file, if successful. +Returns NULL, if it could not create the new stream. +.SH NOTES +This call should be used carefully on buffered files open for +writing. Changes made on one stream might be superseded by +changes made on the other. diff -Nru cdrtools-2.01.01a33/libschily/fdup.mk3 cdrtools-3.02a09/libschily/fdup.mk3 --- cdrtools-2.01.01a33/libschily/fdup.mk3 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/libschily/fdup.mk3 2015-04-26 18:01:43.000000000 +0000 @@ -0,0 +1,18 @@ +#ident @(#)fdup.mk3 1.1 15/04/26 +########################################################################### +# Sample makefile for installing manual pages +########################################################################### +SRCROOT= .. +RULESDIR= RULES +include $(SRCROOT)/$(RULESDIR)/rules.top +########################################################################### + +MANDIR= man +TARGETMAN= fdup +MANSECT= $(MANSECT_LIB) +MANSUFFIX= $(MANSUFF_LIB) +MANFILE= fdup.3 + +########################################################################### +include $(SRCROOT)/$(RULESDIR)/rules.man +########################################################################### diff -Nru cdrtools-2.01.01a33/libschily/fexec.c cdrtools-3.02a09/libschily/fexec.c --- cdrtools-2.01.01a33/libschily/fexec.c 2007-07-01 10:04:35.000000000 +0000 +++ cdrtools-3.02a09/libschily/fexec.c 2015-07-06 20:35:35.000000000 +0000 @@ -1,8 +1,13 @@ -/* @(#)fexec.c 1.32 07/07/01 Copyright 1985, 1995-2007 J. Schilling */ +/* @(#)fexec.c 1.51 15/07/06 Copyright 1985, 1995-2015 J. Schilling */ /* * Execute a program with stdio redirection * - * Copyright (c) 1985, 1995-2007 J. Schilling + * Copyright (c) 1985, 1995-2015 J. Schilling + * + * This is an interface that exists in the public since 1982. + * The POSIX.1-2008 standard did ignore POSIX rules not to + * redefine existing public interfaces and redefined the interfaces + * forcing us to add a js_*() prefix to the original functions. */ /* * The contents of this file are subject to the terms of the @@ -11,21 +16,23 @@ * with the License. * * See the file CDDL.Schily.txt in this distribution for details. + * A copy of the CDDL is also available via the Internet at + * http://www.opensource.org/licenses/cddl1.txt * * When distributing Covered Code, include this CDDL HEADER in each * file and include the License file CDDL.Schily.txt from this distribution. */ +#ifndef __DO__FEXEC__ + +#define fexecl __no__fexecl__ +#define fexecle __no__fexecle__ +#define fexecv __no__fexecv__ +#define fexecve __no__fexecve__ + #include -#include +#include #include -#define fexecl __nothing_1_ /* prototype in schily/schily.h is wrong */ -#define fexecle __nothing_2_ /* prototype in schily/schily.h is wrong */ -#include -#undef fexecl -#undef fexecle - int fexecl __PR((const char *, FILE *, FILE *, FILE *, ...)); - int fexecle __PR((const char *, FILE *, FILE *, FILE *, ...)); #include #include #include @@ -34,81 +41,183 @@ #include #include #include +#include +#define VMS_VFORK_OK +#include +#endif /* __DO__FEXEC__ */ + +#if defined(IS_MACOS_X) && defined(HAVE_CRT_EXTERNS_H) +/* + * The MAC OS X linker does not grok "common" varaibles. + * We need to fetch the address of "environ" using a hack. + */ +#include +#define environ *_NSGetEnviron() +#else +extern char **environ; +#endif /* * Check whether fexec may be implemented... */ #if defined(HAVE_DUP) && (defined(HAVE_DUP2) || defined(F_DUPFD)) - #define MAX_F_ARGS 16 -#if defined(IS_MACOS_X) && defined(HAVE_CRT_EXTERNS_H) +#ifndef __DO__FEXEC__ +#ifndef NO_FEXEC_COMPAT /* Define to disable backward compatibility */ +#undef fexecl +#undef fexecle +#undef fexecv +#undef fexecve + /* - * The MAC OS X linker does not grok "common" varaibles. - * We need to fetch the address of "environ" using a hack. + * The Cygwin compile environment incorrectly implements #pragma weak. + * The weak symbols are only defined as local symbols making it impossible + * to use them from outside the scope of this source file. + * A platform that allows linking with global symbols has HAVE_LINK_WEAK + * defined. */ -#include -#define environ *_NSGetEnviron() +#if defined(HAVE_PRAGMA_WEAK) && defined(HAVE_LINK_WEAK) +#pragma weak fexecl = js_fexecl +#pragma weak fexecle = js_fexecle +#pragma weak fexecv = js_fexecv +#pragma weak fexecve = js_fexecve #else -extern char **environ; + +EXPORT int fexecl __PR((const char *, FILE *, FILE *, FILE *, + const char *, ...)); +EXPORT int fexecle __PR((const char *, FILE *, FILE *, FILE *, + const char *, ...)); + /* 6th arg not const, fexecv forces av[ac] = NULL */ +EXPORT int fexecv __PR((const char *, FILE *, FILE *, FILE *, int, + char **)); +EXPORT int fexecve __PR((const char *, FILE *, FILE *, FILE *, + char * const *, char * const *)); + +#define __DO__FEXEC__ +#define js_fexecl fexecl +#define js_fexecle fexecle +#include "fexec.c" +#undef js_fexecl +#undef js_fexecle +#undef __DO__FEXEC__ + +/* + * Use ac == -1 together with a NULL terminated arg vector. + */ +EXPORT int +fexecv(name, in, out, err, ac, av) + const char *name; + FILE *in, *out, *err; + int ac; + char *av[]; +{ + if (ac >= 0) + av[ac] = NULL; /* force list to be null terminated */ + return (js_fexecve(name, in, out, err, av, environ)); +} + +EXPORT int +fexecve(name, in, out, err, av, env) + const char *name; + FILE *in, *out, *err; + char * const av[], * const env[]; +{ + return (js_fexecve(name, in, out, err, av, env)); +} +#endif /* HAVE_PRAGMA_WEAK && HAVE_LINK_WEAK */ +#endif /* NO_FEXEC_COMPAT */ + + +#ifdef JOS +#define enofile(t) ((t) == EMISSDIR || \ + (t) == ENOFILE || \ + (t) == EISADIR || \ + (t) == EIOERR) +#else +#define enofile(t) ((t) == ENOENT || \ + (t) == ENOTDIR || \ + (t) == EISDIR || \ + (t) == EIO) #endif +#ifndef set_child_standard_fds LOCAL void fdcopy __PR((int, int)); LOCAL void fdmove __PR((int, int)); +#endif LOCAL const char *chkname __PR((const char *, const char *)); LOCAL const char *getpath __PR((char * const *)); +#ifdef F_GETFD +#define fd_getfd(fd) fcntl((fd), F_GETFD, 0) +#else +#define fd_getfd(fd) (0) +#endif +#ifdef F_SETFD +#define fd_setfd(fd, val) fcntl((fd), F_SETFD, (val)); +#else +#define fd_setfd(fd, val) (0) +#endif +#endif /* __DO__FEXEC__ */ + #ifdef PROTOTYPES EXPORT int -fexecl(const char *name, FILE *in, FILE *out, FILE *err, ...) +js_fexecl(const char *name, FILE *in, FILE *out, FILE *err, const char *arg0, + ...) #else EXPORT int -fexecl(name, in, out, err, va_alist) - char *name; - FILE *in; - FILE *out; - FILE *err; +js_fexecl(name, in, out, err, arg0, va_alist) + char *name; + FILE *in; + FILE *out; + FILE *err; + const char *arg0; va_dcl #endif { va_list args; int ac = 0; - char *xav[MAX_F_ARGS]; + char *xav[MAX_F_ARGS+1]; char **av; - char **pav; +const char **pav; char *p; int ret; #ifdef PROTOTYPES - va_start(args, err); + va_start(args, arg0); #else va_start(args); #endif - while (va_arg(args, char *) != NULL) + if (arg0) { ac++; + while (va_arg(args, char *) != NULL) + ac++; + } va_end(args); - if (ac < MAX_F_ARGS) { - pav = av = xav; + if (ac <= MAX_F_ARGS) { + av = xav; } else { - pav = av = (char **)malloc((ac+1)*sizeof (char *)); + av = (char **)malloc((ac+1)*sizeof (char *)); if (av == 0) return (-1); } + pav = (const char **)av; #ifdef PROTOTYPES - va_start(args, err); + va_start(args, arg0); #else va_start(args); #endif - do { + *pav++ = arg0; + if (arg0) do { p = va_arg(args, char *); *pav++ = p; } while (p != NULL); va_end(args); - ret = fexecv(name, in, out, err, ac, av); + ret = js_fexecv(name, in, out, err, ac, av); if (av != xav) free(av); return (ret); @@ -116,74 +225,86 @@ #ifdef PROTOTYPES EXPORT int -fexecle(const char *name, FILE *in, FILE *out, FILE *err, ...) +js_fexecle(const char *name, FILE *in, FILE *out, FILE *err, const char *arg0, + ...) #else EXPORT int -fexecle(name, in, out, err, va_alist) - char *name; - FILE *in; - FILE *out; - FILE *err; +js_fexecle(name, in, out, err, arg0, va_alist) + char *name; + FILE *in; + FILE *out; + FILE *err; + const char *arg0; va_dcl #endif { va_list args; int ac = 0; - char *xav[MAX_F_ARGS]; + char *xav[MAX_F_ARGS+1]; char **av; - char **pav; +const char **pav; char *p; char **env; int ret; #ifdef PROTOTYPES - va_start(args, err); + va_start(args, arg0); #else va_start(args); #endif - while (va_arg(args, char *) != NULL) + if (arg0) { ac++; + while (va_arg(args, char *) != NULL) + ac++; + } env = va_arg(args, char **); va_end(args); - if (ac < MAX_F_ARGS) { - pav = av = xav; + if (ac <= MAX_F_ARGS) { + av = xav; } else { - pav = av = (char **)malloc((ac+1)*sizeof (char *)); + av = (char **)malloc((ac+1)*sizeof (char *)); if (av == 0) return (-1); } + pav = (const char **)av; #ifdef PROTOTYPES - va_start(args, err); + va_start(args, arg0); #else va_start(args); #endif - do { + *pav++ = arg0; + if (arg0) do { p = va_arg(args, char *); *pav++ = p; } while (p != NULL); va_end(args); - ret = fexecve(name, in, out, err, av, env); + ret = js_fexecve(name, in, out, err, av, env); if (av != xav) free(av); return (ret); } +#ifndef __DO__FEXEC__ +/* + * Use ac == -1 together with a NULL terminated arg vector. + */ EXPORT int -fexecv(name, in, out, err, ac, av) +js_fexecv(name, in, out, err, ac, av) const char *name; FILE *in, *out, *err; int ac; char *av[]; { - av[ac] = NULL; /* force list to be null terminated */ - return (fexecve(name, in, out, err, av, environ)); + if (ac >= 0) + av[ac] = NULL; /* force list to be null terminated */ + return (js_fexecve(name, in, out, err, av, environ)); } EXPORT int -fexecve(name, in, out, err, av, env) +js_fexecve(name, in, out, err, av, env) const char *name; FILE *in, *out, *err; char * const av[], * const env[]; @@ -191,6 +312,9 @@ char nbuf[MAXPATHNAME+1]; char *np; const char *path; +#if defined(__BEOS__) || defined(__HAIKU__) + char *av0 = av[0]; +#endif int ret; int fin; int fout; @@ -198,7 +322,7 @@ #ifndef JOS int o[3]; /* Old fd's for stdin/stdout/stderr */ int f[3]; /* Old close on exec flags for above */ - int errsav; + int errsav = 0; o[0] = o[1] = o[2] = -1; f[0] = f[1] = f[2] = 0; @@ -257,36 +381,28 @@ #else /* JOS */ +#ifdef set_child_standard_fds + set_child_standard_fds(fin, fout, ferr); +#else if (fin != STDIN_FILENO) { -#ifdef F_GETFD - f[0] = fcntl(STDIN_FILENO, F_GETFD, 0); -#endif + f[0] = fd_getfd(STDIN_FILENO); o[0] = dup(STDIN_FILENO); -#ifdef F_SETFD - fcntl(o[0], F_SETFD, 1); -#endif + fd_setfd(o[0], FD_CLOEXEC); fdmove(fin, STDIN_FILENO); } if (fout != STDOUT_FILENO) { -#ifdef F_GETFD - f[1] = fcntl(STDOUT_FILENO, F_GETFD, 0); -#endif + f[1] = fd_getfd(STDOUT_FILENO); o[1] = dup(STDOUT_FILENO); -#ifdef F_SETFD - fcntl(o[1], F_SETFD, 1); -#endif + fd_setfd(o[1], FD_CLOEXEC); fdmove(fout, STDOUT_FILENO); } if (ferr != STDERR_FILENO) { -#ifdef F_GETFD - f[2] = fcntl(STDERR_FILENO, F_GETFD, 0); -#endif + f[2] = fd_getfd(STDERR_FILENO); o[2] = dup(STDERR_FILENO); -#ifdef F_SETFD - fcntl(o[2], F_SETFD, 1); -#endif + fd_setfd(o[2], FD_CLOEXEC); fdmove(ferr, STDERR_FILENO); } +#endif /* * If name contains a pathdelimiter ('/' on unix) @@ -305,11 +421,16 @@ if ((geterrno() == ENOENT) && strlen(name) <= (sizeof (nbuf) - 6)) { strcatl(nbuf, "/bin/", name, (char *)NULL); ret = execve(nbuf, av, env); +#if defined(__BEOS__) || defined(__HAIKU__) + ((char **)av)[0] = av0; /* BeOS destroys things ... */ +#endif } } else { int nlen = strlen(name); for (;;) { + int xerr; + np = nbuf; while (*path != PATH_ENV_DELIM && *path != '\0' && np < &nbuf[MAXPATHNAME-nlen-2]) { @@ -322,37 +443,41 @@ else strcatl(nbuf, nbuf, "/", name, (char *)NULL); ret = execve(nbuf, av, env); - if (geterrno() != ENOENT || *path == '\0') +#if defined(__BEOS__) || defined(__HAIKU__) + ((char **)av)[0] = av0; /* BeOS destroys things ... */ +#endif + xerr = geterrno(); + if (errsav == 0 && !enofile(xerr)) + errsav = xerr; + if ((!enofile(xerr) && !(xerr == EACCES)) || *path == '\0') break; path++; } } - errsav = geterrno(); + if (errsav == 0) + errsav = geterrno(); + +#ifndef set_child_standard_fds /* reestablish old files */ if (ferr != STDERR_FILENO) { fdmove(STDERR_FILENO, ferr); fdmove(o[2], STDERR_FILENO); -#ifdef F_SETFD if (f[2] == 0) - fcntl(STDERR_FILENO, F_SETFD, 0); -#endif + fd_setfd(STDERR_FILENO, 0); } if (fout != STDOUT_FILENO) { fdmove(STDOUT_FILENO, fout); fdmove(o[1], STDOUT_FILENO); -#ifdef F_SETFD if (f[1] == 0) - fcntl(STDOUT_FILENO, F_SETFD, 0); -#endif + fd_setfd(STDOUT_FILENO, 0); } if (fin != STDIN_FILENO) { fdmove(STDIN_FILENO, fin); fdmove(o[0], STDIN_FILENO); -#ifdef F_SETFD if (f[0] == 0) - fcntl(STDIN_FILENO, F_SETFD, 0); -#endif + fd_setfd(STDIN_FILENO, 0); } +#endif seterrno(errsav); return (ret); @@ -360,6 +485,7 @@ } #ifndef JOS +#ifndef set_child_standard_fds LOCAL void fdcopy(fd1, fd2) @@ -386,13 +512,11 @@ } #endif +#endif -/*---------------------------------------------------------------------------- -| -| get PATH from env -| -+----------------------------------------------------------------------------*/ - +/* + * get PATH from env + */ LOCAL const char * getpath(env) char * const *env; @@ -411,13 +535,10 @@ } -/*---------------------------------------------------------------------------- -| -| Check if name is in environment. -| Return pointer to value name is found. -| -+----------------------------------------------------------------------------*/ - +/* + * Check if name is in environment. + * Return pointer to value name is found. + */ LOCAL const char * chkname(name, ev) const char *name; @@ -433,5 +554,6 @@ ev++; } } +#endif /* __DO__FEXEC__ */ #endif /* defined(HAVE_DUP) && (defined(HAVE_DUP2) || defined(F_DUPFD)) */ diff -Nru cdrtools-2.01.01a33/libschily/fexecl.3 cdrtools-3.02a09/libschily/fexecl.3 --- cdrtools-2.01.01a33/libschily/fexecl.3 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/libschily/fexecl.3 1988-07-21 15:52:40.000000000 +0000 @@ -0,0 +1,43 @@ +. \" Manual Seite fuer fexecl +. \" @(#)fexecl.3 1.1 +. \" +.if t .ds a \v'-0.55m'\h'0.00n'\z.\h'0.40n'\z.\v'0.55m'\h'-0.40n'a +.if t .ds o \v'-0.55m'\h'0.00n'\z.\h'0.45n'\z.\v'0.55m'\h'-0.45n'o +.if t .ds u \v'-0.55m'\h'0.00n'\z.\h'0.40n'\z.\v'0.55m'\h'-0.40n'u +.if t .ds A \v'-0.77m'\h'0.25n'\z.\h'0.45n'\z.\v'0.77m'\h'-0.70n'A +.if t .ds O \v'-0.77m'\h'0.25n'\z.\h'0.45n'\z.\v'0.77m'\h'-0.70n'O +.if t .ds U \v'-0.77m'\h'0.30n'\z.\h'0.45n'\z.\v'0.77m'\h'-.75n'U +.if t .ds s \(*b +.if t .ds S SS +.if n .ds a ae +.if n .ds o oe +.if n .ds u ue +.if n .ds s sz +.TH FEXECL 3 "15. Juli 1988" "J\*org Schilling" "Schily\'s LIBRARY FUNCTIONS" +.SH NAME +fexecl() \- executes a program +.SH SYNOPSIS +.nf +.B +fexecl(name, in, out, err, arg0, arg1, \|.\|.\|. argn, NULL) +.B char *name; +.B FILE *in, *out, *err; +.B char *arg0\|.\|.\|.*argn; +.fi +.SH DESCRIPTION +fexecl() is a variation of fexecve(). The description of +fexecve() applies to fexecl(), with two exceptions. +First, fexecl() does not permit the environment list to be +specified; it causes the new program to have the same +environment as the current program, using the global environment +pointer environ. +Second, the argument list for the new program is constructed as +part of the call to fexecl(). This is a lot easier to write +than the code to construct a vector of strings, but is limited +to cases with a fixed number of arguments. The argument list +will consist of the strings a0, a1, and so on. By convention, +a0 is the name of the new program. +.SH RETURNS +Returns system error code; doesn't return if successful. +.SH NOTES +none diff -Nru cdrtools-2.01.01a33/libschily/fexecle.3 cdrtools-3.02a09/libschily/fexecle.3 --- cdrtools-2.01.01a33/libschily/fexecle.3 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/libschily/fexecle.3 1988-07-21 15:53:19.000000000 +0000 @@ -0,0 +1,40 @@ +. \" Manual Seite fuer fexecle +. \" @(#)fexecle.3 1.1 +. \" +.if t .ds a \v'-0.55m'\h'0.00n'\z.\h'0.40n'\z.\v'0.55m'\h'-0.40n'a +.if t .ds o \v'-0.55m'\h'0.00n'\z.\h'0.45n'\z.\v'0.55m'\h'-0.45n'o +.if t .ds u \v'-0.55m'\h'0.00n'\z.\h'0.40n'\z.\v'0.55m'\h'-0.40n'u +.if t .ds A \v'-0.77m'\h'0.25n'\z.\h'0.45n'\z.\v'0.77m'\h'-0.70n'A +.if t .ds O \v'-0.77m'\h'0.25n'\z.\h'0.45n'\z.\v'0.77m'\h'-0.70n'O +.if t .ds U \v'-0.77m'\h'0.30n'\z.\h'0.45n'\z.\v'0.77m'\h'-.75n'U +.if t .ds s \(*b +.if t .ds S SS +.if n .ds a ae +.if n .ds o oe +.if n .ds u ue +.if n .ds s sz +.TH FEXECLE 3 "15. Juli 1988" "J\*org Schilling" "Schily\'s LIBRARY FUNCTIONS" +.SH NAME +fexecle() \- executes a program +.SH SYNOPSIS +.nf +.B +fexecle(name, in, out, err, a0, a1, a2, \|.\|.\|. NULL, envptr) +.B char *name; +.B FILE *in, *out, *err; +.B char *a0, *a1, *a2\|.\|.\|.; +.B char **envptr; +.fi +.SH DESCRIPTION +fexecle() is a variation of fexecve(). +The description for fexecve() also applies to fexecle() except +for the argument list. fexecle() permits the argument list, +which is a vector of pointers with a NULL at the end, to be +constructed as part of the call to fexecle(), rather than as a C +vector. Thus, in the new program, av[0] will be the same as a0 +in this program, etc. +.SH RETURNS +Returns a system error code; fexecle() does not return if it +succeeds. +.SH NOTES +none diff -Nru cdrtools-2.01.01a33/libschily/fexecle.mk3 cdrtools-3.02a09/libschily/fexecle.mk3 --- cdrtools-2.01.01a33/libschily/fexecle.mk3 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/libschily/fexecle.mk3 2015-04-26 18:01:43.000000000 +0000 @@ -0,0 +1,18 @@ +#ident @(#)fexecle.mk3 1.1 15/04/26 +########################################################################### +# Sample makefile for installing manual pages +########################################################################### +SRCROOT= .. +RULESDIR= RULES +include $(SRCROOT)/$(RULESDIR)/rules.top +########################################################################### + +MANDIR= man +TARGETMAN= fexecle +MANSECT= $(MANSECT_LIB) +MANSUFFIX= $(MANSUFF_LIB) +MANFILE= fexecle.3 + +########################################################################### +include $(SRCROOT)/$(RULESDIR)/rules.man +########################################################################### diff -Nru cdrtools-2.01.01a33/libschily/fexecl.mk3 cdrtools-3.02a09/libschily/fexecl.mk3 --- cdrtools-2.01.01a33/libschily/fexecl.mk3 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/libschily/fexecl.mk3 2015-04-26 18:01:43.000000000 +0000 @@ -0,0 +1,18 @@ +#ident @(#)fexecl.mk3 1.1 15/04/26 +########################################################################### +# Sample makefile for installing manual pages +########################################################################### +SRCROOT= .. +RULESDIR= RULES +include $(SRCROOT)/$(RULESDIR)/rules.top +########################################################################### + +MANDIR= man +TARGETMAN= fexecl +MANSECT= $(MANSECT_LIB) +MANSUFFIX= $(MANSUFF_LIB) +MANFILE= fexecl.3 + +########################################################################### +include $(SRCROOT)/$(RULESDIR)/rules.man +########################################################################### diff -Nru cdrtools-2.01.01a33/libschily/fexecv.3 cdrtools-3.02a09/libschily/fexecv.3 --- cdrtools-2.01.01a33/libschily/fexecv.3 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/libschily/fexecv.3 1988-07-21 15:53:49.000000000 +0000 @@ -0,0 +1,36 @@ +. \" Manual Seite fuer fexecv +. \" @(#)fexecv.3 1.1 +. \" +.if t .ds a \v'-0.55m'\h'0.00n'\z.\h'0.40n'\z.\v'0.55m'\h'-0.40n'a +.if t .ds o \v'-0.55m'\h'0.00n'\z.\h'0.45n'\z.\v'0.55m'\h'-0.45n'o +.if t .ds u \v'-0.55m'\h'0.00n'\z.\h'0.40n'\z.\v'0.55m'\h'-0.40n'u +.if t .ds A \v'-0.77m'\h'0.25n'\z.\h'0.45n'\z.\v'0.77m'\h'-0.70n'A +.if t .ds O \v'-0.77m'\h'0.25n'\z.\h'0.45n'\z.\v'0.77m'\h'-0.70n'O +.if t .ds U \v'-0.77m'\h'0.30n'\z.\h'0.45n'\z.\v'0.77m'\h'-.75n'U +.if t .ds s \(*b +.if t .ds S SS +.if n .ds a ae +.if n .ds o oe +.if n .ds u ue +.if n .ds s sz +.TH FEXECV 3 "15. Juli 1988" "J\*org Schilling" "Schily\'s LIBRARY FUNCTIONS" +.SH NAME +fexecv() \- executes a program +.SH SYNOPSIS +.nf +.B +fexecv(name, in, out, err, ac, av) +.B char *name; +.B FILE *in, *out, *err; +.B int ac; +.B char **av; +.fi +.SH DESCRIPTION +fexecv() functions identically to fexecve() except that fexecv() +passes the current environment list ( environ ) to the new +program, where fexecve() passes the environment list specified +as one of its arguments. +.SH RETURNS +Returns a system error code; fexecv() does not normally return. +.SH NOTES +none diff -Nru cdrtools-2.01.01a33/libschily/fexecve.3 cdrtools-3.02a09/libschily/fexecve.3 --- cdrtools-2.01.01a33/libschily/fexecve.3 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/libschily/fexecve.3 1988-07-21 15:55:26.000000000 +0000 @@ -0,0 +1,65 @@ +. \" Manual Seite fuer fexecve +. \" @(#)fexecve.3 1.1 +. \" +.if t .ds a \v'-0.55m'\h'0.00n'\z.\h'0.40n'\z.\v'0.55m'\h'-0.40n'a +.if t .ds o \v'-0.55m'\h'0.00n'\z.\h'0.45n'\z.\v'0.55m'\h'-0.45n'o +.if t .ds u \v'-0.55m'\h'0.00n'\z.\h'0.40n'\z.\v'0.55m'\h'-0.40n'u +.if t .ds A \v'-0.77m'\h'0.25n'\z.\h'0.45n'\z.\v'0.77m'\h'-0.70n'A +.if t .ds O \v'-0.77m'\h'0.25n'\z.\h'0.45n'\z.\v'0.77m'\h'-0.70n'O +.if t .ds U \v'-0.77m'\h'0.30n'\z.\h'0.45n'\z.\v'0.77m'\h'-.75n'U +.if t .ds s \(*b +.if t .ds S SS +.if n .ds a ae +.if n .ds o oe +.if n .ds u ue +.if n .ds s sz +.TH FEXECVE 3 "15. Juli 1988" "J\*org Schilling" "Schily\'s LIBRARY FUNCTIONS" +.SH NAME +fexecve() \- executes a program +.SH SYNOPSIS +.nf +.B +fexecve (name, in, out, err, argptr, envptr) +.B char *name; +.B FILE *in, *out, *err; +.B char **argptr, **envptr; +.fi +.SH DESCRIPTION +fexecve() causes the current process to execute a new program. +The text, data, and stack segments of the process are discarded +and replaced with the text and data sections of the new object +file and a new stack. The argument list and environment list +are copied into the new address space where they become the +arguments to the entry point of the new program. +.PP +name is a string containing the name of the object file to be +executed. If the name contains a slash (/), it is assumed to be +a pathname to the file. If there is no slash, fexecve() +searches for the file in a list of directories contained in the +environment variable PATH, or if there is no such variable, it +searches the working directory first, then /bin. The PATH +variable (which is taken from the new environment list envptr ) +has a value which is a series of directory names separated by +colons. The working directory is represented in this list by +omitting a name (before the first colon, between two colons, or +after the last colon). Thus the default search rules may be +expressed as +.PP +.B "PATH=:/bin" +.PP +in, out, and err are files which are to be substituted for +stdin, stdout, and stderr, respectively, when the new program is +executed. +.PP +argptr and envptr are pointers to arrays of pointers to strings, +with a NULL pointer as the last element of the array. By +convention, argptr[0] is the name of the program. +.SH RETURNS +Returns a standard system error code; fexecve() does not return +if it succeeds, as the program that calls it is no longer in +this process's memory. +.SH NOTES +If a program needs to run another program without destroying +itself, it can use fork(), some variation of fexecve(), and +cwait(). These three functions are combined in spawnl() and +spawnv(). diff -Nru cdrtools-2.01.01a33/libschily/fexecve.mk3 cdrtools-3.02a09/libschily/fexecve.mk3 --- cdrtools-2.01.01a33/libschily/fexecve.mk3 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/libschily/fexecve.mk3 2015-04-26 18:01:43.000000000 +0000 @@ -0,0 +1,18 @@ +#ident @(#)fexecve.mk3 1.1 15/04/26 +########################################################################### +# Sample makefile for installing manual pages +########################################################################### +SRCROOT= .. +RULESDIR= RULES +include $(SRCROOT)/$(RULESDIR)/rules.top +########################################################################### + +MANDIR= man +TARGETMAN= fexecve +MANSECT= $(MANSECT_LIB) +MANSUFFIX= $(MANSUFF_LIB) +MANFILE= fexecve.3 + +########################################################################### +include $(SRCROOT)/$(RULESDIR)/rules.man +########################################################################### diff -Nru cdrtools-2.01.01a33/libschily/fexecv.mk3 cdrtools-3.02a09/libschily/fexecv.mk3 --- cdrtools-2.01.01a33/libschily/fexecv.mk3 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/libschily/fexecv.mk3 2015-04-26 18:01:43.000000000 +0000 @@ -0,0 +1,18 @@ +#ident @(#)fexecv.mk3 1.1 15/04/26 +########################################################################### +# Sample makefile for installing manual pages +########################################################################### +SRCROOT= .. +RULESDIR= RULES +include $(SRCROOT)/$(RULESDIR)/rules.top +########################################################################### + +MANDIR= man +TARGETMAN= fexecv +MANSECT= $(MANSECT_LIB) +MANSUFFIX= $(MANSUFF_LIB) +MANFILE= fexecv.3 + +########################################################################### +include $(SRCROOT)/$(RULESDIR)/rules.man +########################################################################### diff -Nru cdrtools-2.01.01a33/libschily/fgetline.3 cdrtools-3.02a09/libschily/fgetline.3 --- cdrtools-2.01.01a33/libschily/fgetline.3 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/libschily/fgetline.3 1988-07-21 15:56:01.000000000 +0000 @@ -0,0 +1,40 @@ +. \" Manual Seite fuer fgetline +. \" @(#)fgetline.3 1.1 +. \" +.if t .ds a \v'-0.55m'\h'0.00n'\z.\h'0.40n'\z.\v'0.55m'\h'-0.40n'a +.if t .ds o \v'-0.55m'\h'0.00n'\z.\h'0.45n'\z.\v'0.55m'\h'-0.45n'o +.if t .ds u \v'-0.55m'\h'0.00n'\z.\h'0.40n'\z.\v'0.55m'\h'-0.40n'u +.if t .ds A \v'-0.77m'\h'0.25n'\z.\h'0.45n'\z.\v'0.77m'\h'-0.70n'A +.if t .ds O \v'-0.77m'\h'0.25n'\z.\h'0.45n'\z.\v'0.77m'\h'-0.70n'O +.if t .ds U \v'-0.77m'\h'0.30n'\z.\h'0.45n'\z.\v'0.77m'\h'-.75n'U +.if t .ds s \(*b +.if t .ds S SS +.if n .ds a ae +.if n .ds o oe +.if n .ds u ue +.if n .ds s sz +.TH FGETLINE 3 "15. Juli 1988" "J\*org Schilling" "Schily\'s LIBRARY FUNCTIONS" +.SH NAME +fgetline() \- gets a line from a file +.SH SYNOPSIS +.nf +.B +int fgetline(f,buf,length) +.B FILE *f; +.B char *buf; +.B int length; +.fi +.SH DESCRIPTION +fgetline() reads up to length characters from the input file +using getc() (q.v.). The transfer is also terminated by a +newline, end of file, or read error. The newline character is +stripped and the string is NULL ('\\0') terminated. +.SH RETURNS +.TP +.B >=0 +the number of bytes read. +.TP +.B < 0 +if an error occurred. +.SH NOTES +none diff -Nru cdrtools-2.01.01a33/libschily/fgetline.mk3 cdrtools-3.02a09/libschily/fgetline.mk3 --- cdrtools-2.01.01a33/libschily/fgetline.mk3 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/libschily/fgetline.mk3 2015-04-26 18:01:43.000000000 +0000 @@ -0,0 +1,18 @@ +#ident @(#)fgetline.mk3 1.1 15/04/26 +########################################################################### +# Sample makefile for installing manual pages +########################################################################### +SRCROOT= .. +RULESDIR= RULES +include $(SRCROOT)/$(RULESDIR)/rules.top +########################################################################### + +MANDIR= man +TARGETMAN= fgetline +MANSECT= $(MANSECT_LIB) +MANSUFFIX= $(MANSUFF_LIB) +MANFILE= fgetline.3 + +########################################################################### +include $(SRCROOT)/$(RULESDIR)/rules.man +########################################################################### diff -Nru cdrtools-2.01.01a33/libschily/fileclose.3 cdrtools-3.02a09/libschily/fileclose.3 --- cdrtools-2.01.01a33/libschily/fileclose.3 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/libschily/fileclose.3 1988-08-11 09:20:45.000000000 +0000 @@ -0,0 +1,36 @@ +. \" Manual Seite fuer fclose +. \" @(#)fclose.3 1.1 +. \" +.if t .ds a \v'-0.55m'\h'0.00n'\z.\h'0.40n'\z.\v'0.55m'\h'-0.40n'a +.if t .ds o \v'-0.55m'\h'0.00n'\z.\h'0.45n'\z.\v'0.55m'\h'-0.45n'o +.if t .ds u \v'-0.55m'\h'0.00n'\z.\h'0.40n'\z.\v'0.55m'\h'-0.40n'u +.if t .ds A \v'-0.77m'\h'0.25n'\z.\h'0.45n'\z.\v'0.77m'\h'-0.70n'A +.if t .ds O \v'-0.77m'\h'0.25n'\z.\h'0.45n'\z.\v'0.77m'\h'-0.70n'O +.if t .ds U \v'-0.77m'\h'0.30n'\z.\h'0.45n'\z.\v'0.77m'\h'-.75n'U +.if t .ds s \(*b +.if t .ds S SS +.if n .ds a ae +.if n .ds o oe +.if n .ds u ue +.if n .ds s sz +.TH FILECLOSE 3 "15. Juli 1988" "J\*org Schilling" "Schily\'s LIBRARY FUNCTIONS" +.SH NAME +fileclose() \- closes a file +.SH SYNOPSIS +.nf +.B +fileclose(f) +.B FILE *f; +.fi +.SH DESCRIPTION +fileclose() closes the file f and flushes all buffers. +.SH RETURNS +.TP +.B 0 +on success +.TP +.B EOF +on error +none +.SH NOTES +none diff -Nru cdrtools-2.01.01a33/libschily/fileclose.mk3 cdrtools-3.02a09/libschily/fileclose.mk3 --- cdrtools-2.01.01a33/libschily/fileclose.mk3 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/libschily/fileclose.mk3 2015-04-26 18:01:43.000000000 +0000 @@ -0,0 +1,18 @@ +#ident @(#)fileclose.mk3 1.1 15/04/26 +########################################################################### +# Sample makefile for installing manual pages +########################################################################### +SRCROOT= .. +RULESDIR= RULES +include $(SRCROOT)/$(RULESDIR)/rules.top +########################################################################### + +MANDIR= man +TARGETMAN= fileclose +MANSECT= $(MANSECT_LIB) +MANSUFFIX= $(MANSUFF_LIB) +MANFILE= fileclose.3 + +########################################################################### +include $(SRCROOT)/$(RULESDIR)/rules.man +########################################################################### diff -Nru cdrtools-2.01.01a33/libschily/fileluopen.3 cdrtools-3.02a09/libschily/fileluopen.3 --- cdrtools-2.01.01a33/libschily/fileluopen.3 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/libschily/fileluopen.3 1988-07-31 11:38:17.000000000 +0000 @@ -0,0 +1,42 @@ +. \" Manual Seite fuer fileluopen +. \" @(#)fileluopen.3 1.1 +. \" +.if t .ds a \v'-0.55m'\h'0.00n'\z.\h'0.40n'\z.\v'0.55m'\h'-0.40n'a +.if t .ds o \v'-0.55m'\h'0.00n'\z.\h'0.45n'\z.\v'0.55m'\h'-0.45n'o +.if t .ds u \v'-0.55m'\h'0.00n'\z.\h'0.40n'\z.\v'0.55m'\h'-0.40n'u +.if t .ds A \v'-0.77m'\h'0.25n'\z.\h'0.45n'\z.\v'0.77m'\h'-0.70n'A +.if t .ds O \v'-0.77m'\h'0.25n'\z.\h'0.45n'\z.\v'0.77m'\h'-0.70n'O +.if t .ds U \v'-0.77m'\h'0.30n'\z.\h'0.45n'\z.\v'0.77m'\h'-.75n'U +.if t .ds s \(*b +.if t .ds S SS +.if n .ds a ae +.if n .ds o oe +.if n .ds u ue +.if n .ds s sz +.TH FILELUOPEN 3 "15. Juli 1988" "J\*org Schilling" "Schily\'s LIBRARY FUNCTIONS" +.SH NAME +fileluopen() \- opens a file given a logical unit number +.SH SYNOPSIS +.nf +.B +FILE *fileluopen(lu, modes) +.B int lu; +.B char *modes; +.fi +.SH DESCRIPTION +fileluopen() makes an object of type FILE, suitable for use with +fileread(), putc(), etc. +.PP +The lu argument is a logical unit number assigned by the kernel +when it opens a file. Logical unit numbers are not usually +visible, although several routines reguire LUs as +arguments and fdown() may be used to map a FILE object to a +corresponding LU number. +.PP +The modes argument is a string encoding the modes of the file, +just as for fileopen(), except that the 'c' and 't' options are +not allowed. +.SH RETURNS +Returns the FILE value. +.SH NOTES +none diff -Nru cdrtools-2.01.01a33/libschily/fileluopen.mk3 cdrtools-3.02a09/libschily/fileluopen.mk3 --- cdrtools-2.01.01a33/libschily/fileluopen.mk3 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/libschily/fileluopen.mk3 2015-04-26 18:01:43.000000000 +0000 @@ -0,0 +1,18 @@ +#ident @(#)fileluopen.mk3 1.1 15/04/26 +########################################################################### +# Sample makefile for installing manual pages +########################################################################### +SRCROOT= .. +RULESDIR= RULES +include $(SRCROOT)/$(RULESDIR)/rules.top +########################################################################### + +MANDIR= man +TARGETMAN= fileluopen +MANSECT= $(MANSECT_LIB) +MANSUFFIX= $(MANSUFF_LIB) +MANFILE= fileluopen.3 + +########################################################################### +include $(SRCROOT)/$(RULESDIR)/rules.man +########################################################################### diff -Nru cdrtools-2.01.01a33/libschily/fileopen.3 cdrtools-3.02a09/libschily/fileopen.3 --- cdrtools-2.01.01a33/libschily/fileopen.3 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/libschily/fileopen.3 1988-07-21 16:00:13.000000000 +0000 @@ -0,0 +1,55 @@ +. \" Manual Seite fuer fileopen +. \" @(#)fileopen.3 1.1 +. \" +.if t .ds a \v'-0.55m'\h'0.00n'\z.\h'0.40n'\z.\v'0.55m'\h'-0.40n'a +.if t .ds o \v'-0.55m'\h'0.00n'\z.\h'0.45n'\z.\v'0.55m'\h'-0.45n'o +.if t .ds u \v'-0.55m'\h'0.00n'\z.\h'0.40n'\z.\v'0.55m'\h'-0.40n'u +.if t .ds A \v'-0.77m'\h'0.25n'\z.\h'0.45n'\z.\v'0.77m'\h'-0.70n'A +.if t .ds O \v'-0.77m'\h'0.25n'\z.\h'0.45n'\z.\v'0.77m'\h'-0.70n'O +.if t .ds U \v'-0.77m'\h'0.30n'\z.\h'0.45n'\z.\v'0.77m'\h'-.75n'U +.if t .ds s \(*b +.if t .ds S SS +.if n .ds a ae +.if n .ds o oe +.if n .ds u ue +.if n .ds s sz +.TH FILEOPEN 3 "15. Juli 1988" "J\*org Schilling" "Schily\'s LIBRARY FUNCTIONS" +.SH NAME +fileopen() \- opens or creates files +.SH SYNOPSIS +.nf +.B +FILE *fileopen(filename,modes) +.B char *filename; +.B char *modes; +.fi +.SH DESCRIPTION +fileopen() opens filename. The mode is specified by the +characters from the following set: +.TP +.B a +seek to end-of-file after opening +.TP +.B c +create file if necessary +.TP +.B r +allow read access +.TP +.B t +truncate file after opening if it already exists +.TP +.B u +unbuffered all read/writes directly to system +.TP +.B w +allow write access +.SH RETURNS +NULL open failed. +other value should be used in other I/O calls and is of the +type FILE. +.SH NOTES +The file is opened with rw rw access. +If there is not enough room to allocate a buffer, the file is +opened in an unbuffered mode. There is a limit to the number of +open files. diff -Nru cdrtools-2.01.01a33/libschily/fileopen.mk3 cdrtools-3.02a09/libschily/fileopen.mk3 --- cdrtools-2.01.01a33/libschily/fileopen.mk3 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/libschily/fileopen.mk3 2015-04-26 18:01:43.000000000 +0000 @@ -0,0 +1,18 @@ +#ident @(#)fileopen.mk3 1.1 15/04/26 +########################################################################### +# Sample makefile for installing manual pages +########################################################################### +SRCROOT= .. +RULESDIR= RULES +include $(SRCROOT)/$(RULESDIR)/rules.top +########################################################################### + +MANDIR= man +TARGETMAN= fileopen +MANSECT= $(MANSECT_LIB) +MANSUFFIX= $(MANSUFF_LIB) +MANFILE= fileopen.3 + +########################################################################### +include $(SRCROOT)/$(RULESDIR)/rules.man +########################################################################### diff -Nru cdrtools-2.01.01a33/libschily/filepos.3 cdrtools-3.02a09/libschily/filepos.3 --- cdrtools-2.01.01a33/libschily/filepos.3 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/libschily/filepos.3 1990-06-07 01:12:32.000000000 +0000 @@ -0,0 +1,43 @@ +. \" Manual Seite fuer filepos +. \" @(#)filepos.3 1.1 +. \" +.if t .ds a \v'-0.55m'\h'0.00n'\z.\h'0.40n'\z.\v'0.55m'\h'-0.40n'a +.if t .ds o \v'-0.55m'\h'0.00n'\z.\h'0.45n'\z.\v'0.55m'\h'-0.45n'o +.if t .ds u \v'-0.55m'\h'0.00n'\z.\h'0.40n'\z.\v'0.55m'\h'-0.40n'u +.if t .ds A \v'-0.77m'\h'0.25n'\z.\h'0.45n'\z.\v'0.77m'\h'-0.70n'A +.if t .ds O \v'-0.77m'\h'0.25n'\z.\h'0.45n'\z.\v'0.77m'\h'-0.70n'O +.if t .ds U \v'-0.77m'\h'0.30n'\z.\h'0.45n'\z.\v'0.77m'\h'-.75n'U +.if t .ds s \(*b +.if t .ds S SS +.if n .ds a ae +.if n .ds o oe +.if n .ds u ue +.if n .ds s sz +.TH FILEPOS 3 "15. Juli 1988" "J\*org Schilling" "Schily\'s LIBRARY FUNCTIONS" +.SH NAME +filepos() \- returns the logical position in a file +.SH SYNOPSIS +.nf +.B +long filepos(f) +.B FILE *f; +.fi +.SH DESCRIPTION +filepos() returns the current file position as an offset in bytes +from the beginning of the file. This is the position of the next +byte to be read or written. +.SH RETURNS +Returns the current offset into file f. +.SH NOTES +The numbering of bytes in a file starts at 0. For byte +sequential devices, such as a terminal, the value returned will +be the number of bytes read or written from the current file, +unless a seek call is issued which changes the logical position +but does not affect the device. +.PP +File positions may be set to arbitrary values (via fileseek() ) +and are only used by the file system when actual reading or +writing occur. +.PP +Normally, the file position is incremented by the amount of data +transferred for each sequential read or write. diff -Nru cdrtools-2.01.01a33/libschily/filepos.mk3 cdrtools-3.02a09/libschily/filepos.mk3 --- cdrtools-2.01.01a33/libschily/filepos.mk3 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/libschily/filepos.mk3 2015-04-26 18:01:43.000000000 +0000 @@ -0,0 +1,18 @@ +#ident @(#)filepos.mk3 1.1 15/04/26 +########################################################################### +# Sample makefile for installing manual pages +########################################################################### +SRCROOT= .. +RULESDIR= RULES +include $(SRCROOT)/$(RULESDIR)/rules.top +########################################################################### + +MANDIR= man +TARGETMAN= filepos +MANSECT= $(MANSECT_LIB) +MANSUFFIX= $(MANSUFF_LIB) +MANFILE= filepos.3 + +########################################################################### +include $(SRCROOT)/$(RULESDIR)/rules.man +########################################################################### diff -Nru cdrtools-2.01.01a33/libschily/file_raise.3 cdrtools-3.02a09/libschily/file_raise.3 --- cdrtools-2.01.01a33/libschily/file_raise.3 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/libschily/file_raise.3 1988-07-21 15:56:32.000000000 +0000 @@ -0,0 +1,40 @@ +. \" Manual Seite fuer file_raise +. \" @(#)file_raise.3 1.1 +. \" +.if t .ds a \v'-0.55m'\h'0.00n'\z.\h'0.40n'\z.\v'0.55m'\h'-0.40n'a +.if t .ds o \v'-0.55m'\h'0.00n'\z.\h'0.45n'\z.\v'0.55m'\h'-0.45n'o +.if t .ds u \v'-0.55m'\h'0.00n'\z.\h'0.40n'\z.\v'0.55m'\h'-0.40n'u +.if t .ds A \v'-0.77m'\h'0.25n'\z.\h'0.45n'\z.\v'0.77m'\h'-0.70n'A +.if t .ds O \v'-0.77m'\h'0.25n'\z.\h'0.45n'\z.\v'0.77m'\h'-0.70n'O +.if t .ds U \v'-0.77m'\h'0.30n'\z.\h'0.45n'\z.\v'0.77m'\h'-.75n'U +.if t .ds s \(*b +.if t .ds S SS +.if n .ds a ae +.if n .ds o oe +.if n .ds u ue +.if n .ds s sz +.TH FILE_RAISE 3 "15. Juli 1988" "J\*org Schilling" "Schily\'s LIBRARY FUNCTIONS" +.SH NAME +file_raise() \- controls raising of file_read_err and +file_write_err +.SH SYNOPSIS +.nf +.B +file_raise(f,flag) +.B FILE *f; +.B BOOL flag; +.fi +.SH DESCRIPTION +file_raise() can be used to control whether the conditions +"file_read_err" and "file_write_err" are raised when an error +occurs during an I/O function ( fileread(), filewrite() , etc) +on FILE f. Calling file_raise() with the flag TRUE enables +raising, calling it with flag FALSE disables raising. If raising +is disabled and an error occurs the function will return an +appropriate error code, this is equivalent to handling the +condition and ignoring it. The default is to raise the +conditions. +.SH RETURNS +none +.SH NOTES +none diff -Nru cdrtools-2.01.01a33/libschily/file_raise.mk3 cdrtools-3.02a09/libschily/file_raise.mk3 --- cdrtools-2.01.01a33/libschily/file_raise.mk3 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/libschily/file_raise.mk3 2015-04-26 18:01:43.000000000 +0000 @@ -0,0 +1,18 @@ +#ident @(#)file_raise.mk3 1.1 15/04/26 +########################################################################### +# Sample makefile for installing manual pages +########################################################################### +SRCROOT= .. +RULESDIR= RULES +include $(SRCROOT)/$(RULESDIR)/rules.top +########################################################################### + +MANDIR= man +TARGETMAN= file_raise +MANSECT= $(MANSECT_LIB) +MANSUFFIX= $(MANSUFF_LIB) +MANFILE= file_raise.3 + +########################################################################### +include $(SRCROOT)/$(RULESDIR)/rules.man +########################################################################### diff -Nru cdrtools-2.01.01a33/libschily/fileread.3 cdrtools-3.02a09/libschily/fileread.3 --- cdrtools-2.01.01a33/libschily/fileread.3 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/libschily/fileread.3 1988-07-21 16:01:35.000000000 +0000 @@ -0,0 +1,47 @@ +. \" Manual Seite fuer fileread +. \" @(#)fileread.3 1.1 +. \" +.if t .ds a \v'-0.55m'\h'0.00n'\z.\h'0.40n'\z.\v'0.55m'\h'-0.40n'a +.if t .ds o \v'-0.55m'\h'0.00n'\z.\h'0.45n'\z.\v'0.55m'\h'-0.45n'o +.if t .ds u \v'-0.55m'\h'0.00n'\z.\h'0.40n'\z.\v'0.55m'\h'-0.40n'u +.if t .ds A \v'-0.77m'\h'0.25n'\z.\h'0.45n'\z.\v'0.77m'\h'-0.70n'A +.if t .ds O \v'-0.77m'\h'0.25n'\z.\h'0.45n'\z.\v'0.77m'\h'-0.70n'O +.if t .ds U \v'-0.77m'\h'0.30n'\z.\h'0.45n'\z.\v'0.77m'\h'-.75n'U +.if t .ds s \(*b +.if t .ds S SS +.if n .ds a ae +.if n .ds o oe +.if n .ds u ue +.if n .ds s sz +.TH FILEREAD 3 "15. Juli 1988" "J\*org Schilling" "Schily\'s LIBRARY FUNCTIONS" +.SH NAME +fileread() \- reads file into buffer +.SH SYNOPSIS +.nf +.B +int fileread(f,buf,size) +.B FILE *f; +.B char *buf; +.B int size; +.fi +.SH DESCRIPTION +fileread() reads up to size bytes from the file into buf. The +number actually read may be smaller if end-of-file is reached. +The file pointer (implied) is left pointing to one past the last +character read. +.SH RETURNS +.TP +.B > 0 +the number of bytes actually read. +.TP +.B = 0 +file was at end-of-file. +.TP +.B < 0 +error code. +.PP +It returns the number of bytes actually read or an error +code. +.SH NOTES +The buffer must be at least size long. If reading from a "raw" +device, size must be a multiple of 512. diff -Nru cdrtools-2.01.01a33/libschily/fileread.mk3 cdrtools-3.02a09/libschily/fileread.mk3 --- cdrtools-2.01.01a33/libschily/fileread.mk3 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/libschily/fileread.mk3 2015-04-26 18:01:43.000000000 +0000 @@ -0,0 +1,18 @@ +#ident @(#)fileread.mk3 1.1 15/04/26 +########################################################################### +# Sample makefile for installing manual pages +########################################################################### +SRCROOT= .. +RULESDIR= RULES +include $(SRCROOT)/$(RULESDIR)/rules.top +########################################################################### + +MANDIR= man +TARGETMAN= fileread +MANSECT= $(MANSECT_LIB) +MANSUFFIX= $(MANSUFF_LIB) +MANFILE= fileread.3 + +########################################################################### +include $(SRCROOT)/$(RULESDIR)/rules.man +########################################################################### diff -Nru cdrtools-2.01.01a33/libschily/filereopen.3 cdrtools-3.02a09/libschily/filereopen.3 --- cdrtools-2.01.01a33/libschily/filereopen.3 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/libschily/filereopen.3 1988-07-21 16:02:19.000000000 +0000 @@ -0,0 +1,39 @@ +. \" Manual Seite fuer filereopen +. \" @(#)filereopen.3 1.1 +. \" +.if t .ds a \v'-0.55m'\h'0.00n'\z.\h'0.40n'\z.\v'0.55m'\h'-0.40n'a +.if t .ds o \v'-0.55m'\h'0.00n'\z.\h'0.45n'\z.\v'0.55m'\h'-0.45n'o +.if t .ds u \v'-0.55m'\h'0.00n'\z.\h'0.40n'\z.\v'0.55m'\h'-0.40n'u +.if t .ds A \v'-0.77m'\h'0.25n'\z.\h'0.45n'\z.\v'0.77m'\h'-0.70n'A +.if t .ds O \v'-0.77m'\h'0.25n'\z.\h'0.45n'\z.\v'0.77m'\h'-0.70n'O +.if t .ds U \v'-0.77m'\h'0.30n'\z.\h'0.45n'\z.\v'0.77m'\h'-.75n'U +.if t .ds s \(*b +.if t .ds S SS +.if n .ds a ae +.if n .ds o oe +.if n .ds u ue +.if n .ds s sz +.TH FILEREOPEN 3 "15. Juli 1988" "J\*org Schilling" "Schily\'s LIBRARY FUNCTIONS" +.SH NAME +filereopen() \- opens a new file on an open stream +.SH SYNOPSIS +.nf +.B +FILE *filereopen(filename,modes,f) +.B char *name; +.B char *modes; +.B FILE *f; +.fi +.SH DESCRIPTION +filereopen() opens the file filename with modes modes on stream +f. modes has the same format as for fileopen(). The stream f +must be open. +.SH RETURNS +.TP +.B NULL +reopen failed. +.TP +.B other +old stream. +.SH NOTES +none diff -Nru cdrtools-2.01.01a33/libschily/filereopen.mk3 cdrtools-3.02a09/libschily/filereopen.mk3 --- cdrtools-2.01.01a33/libschily/filereopen.mk3 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/libschily/filereopen.mk3 2015-04-26 18:01:43.000000000 +0000 @@ -0,0 +1,18 @@ +#ident @(#)filereopen.mk3 1.1 15/04/26 +########################################################################### +# Sample makefile for installing manual pages +########################################################################### +SRCROOT= .. +RULESDIR= RULES +include $(SRCROOT)/$(RULESDIR)/rules.top +########################################################################### + +MANDIR= man +TARGETMAN= filereopen +MANSECT= $(MANSECT_LIB) +MANSUFFIX= $(MANSUFF_LIB) +MANFILE= filereopen.3 + +########################################################################### +include $(SRCROOT)/$(RULESDIR)/rules.man +########################################################################### diff -Nru cdrtools-2.01.01a33/libschily/fileseek.3 cdrtools-3.02a09/libschily/fileseek.3 --- cdrtools-2.01.01a33/libschily/fileseek.3 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/libschily/fileseek.3 1988-07-21 16:02:46.000000000 +0000 @@ -0,0 +1,34 @@ +. \" Manual Seite fuer fileseek +. \" @(#)fileseek.3 1.1 +. \" +.if t .ds a \v'-0.55m'\h'0.00n'\z.\h'0.40n'\z.\v'0.55m'\h'-0.40n'a +.if t .ds o \v'-0.55m'\h'0.00n'\z.\h'0.45n'\z.\v'0.55m'\h'-0.45n'o +.if t .ds u \v'-0.55m'\h'0.00n'\z.\h'0.40n'\z.\v'0.55m'\h'-0.40n'u +.if t .ds A \v'-0.77m'\h'0.25n'\z.\h'0.45n'\z.\v'0.77m'\h'-0.70n'A +.if t .ds O \v'-0.77m'\h'0.25n'\z.\h'0.45n'\z.\v'0.77m'\h'-0.70n'O +.if t .ds U \v'-0.77m'\h'0.30n'\z.\h'0.45n'\z.\v'0.77m'\h'-.75n'U +.if t .ds s \(*b +.if t .ds S SS +.if n .ds a ae +.if n .ds o oe +.if n .ds u ue +.if n .ds s sz +.TH FILESEEK 3 "15. Juli 1988" "J\*org Schilling" "Schily\'s LIBRARY FUNCTIONS" +.SH NAME +fileseek() \- sets file position +.SH SYNOPSIS +.nf +.B +fileseek(f,offset) +.B FILE *f; +.B long offset; +.fi +.SH DESCRIPTION +fileseek() sets the logical position in the file f to offset. +The next read or write operation begins with the byte at the new +offset. +.SH RETURNS +none +.SH NOTES +File positions begin with 0 for the first byte. When writing, +it is legal to seek beyond the end of file. diff -Nru cdrtools-2.01.01a33/libschily/fileseek.mk3 cdrtools-3.02a09/libschily/fileseek.mk3 --- cdrtools-2.01.01a33/libschily/fileseek.mk3 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/libschily/fileseek.mk3 2015-04-26 18:01:43.000000000 +0000 @@ -0,0 +1,18 @@ +#ident @(#)fileseek.mk3 1.1 15/04/26 +########################################################################### +# Sample makefile for installing manual pages +########################################################################### +SRCROOT= .. +RULESDIR= RULES +include $(SRCROOT)/$(RULESDIR)/rules.top +########################################################################### + +MANDIR= man +TARGETMAN= fileseek +MANSECT= $(MANSECT_LIB) +MANSUFFIX= $(MANSUFF_LIB) +MANFILE= fileseek.3 + +########################################################################### +include $(SRCROOT)/$(RULESDIR)/rules.man +########################################################################### diff -Nru cdrtools-2.01.01a33/libschily/filesize.3 cdrtools-3.02a09/libschily/filesize.3 --- cdrtools-2.01.01a33/libschily/filesize.3 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/libschily/filesize.3 1988-07-21 16:03:30.000000000 +0000 @@ -0,0 +1,38 @@ +. \" Manual Seite fuer filesize +. \" @(#)filesize.3 1.1 +. \" +.if t .ds a \v'-0.55m'\h'0.00n'\z.\h'0.40n'\z.\v'0.55m'\h'-0.40n'a +.if t .ds o \v'-0.55m'\h'0.00n'\z.\h'0.45n'\z.\v'0.55m'\h'-0.45n'o +.if t .ds u \v'-0.55m'\h'0.00n'\z.\h'0.40n'\z.\v'0.55m'\h'-0.40n'u +.if t .ds A \v'-0.77m'\h'0.25n'\z.\h'0.45n'\z.\v'0.77m'\h'-0.70n'A +.if t .ds O \v'-0.77m'\h'0.25n'\z.\h'0.45n'\z.\v'0.77m'\h'-0.70n'O +.if t .ds U \v'-0.77m'\h'0.30n'\z.\h'0.45n'\z.\v'0.77m'\h'-.75n'U +.if t .ds s \(*b +.if t .ds S SS +.if n .ds a ae +.if n .ds o oe +.if n .ds u ue +.if n .ds s sz +.TH FILESIZE 3 "15. Juli 1988" "J\*org Schilling" "Schily\'s LIBRARY FUNCTIONS" +.SH NAME +filesize() \- returns size of file +.SH SYNOPSIS +.nf +.B +long filesize(f) +.B FILE *f; +.fi +.SH DESCRIPTION +filesize() returns the file size in bytes. +.SH RETURNS +.TP +.B >= 0 +filesize. +.TP +.B < 0 +an error code. +.SH NOTES +If the file was written in the current process and was buffered, +do a fflush() before using filesize() +..PP +NOTE: The call does not work on terminals or other devices. diff -Nru cdrtools-2.01.01a33/libschily/filesize.mk3 cdrtools-3.02a09/libschily/filesize.mk3 --- cdrtools-2.01.01a33/libschily/filesize.mk3 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/libschily/filesize.mk3 2015-04-26 18:01:43.000000000 +0000 @@ -0,0 +1,18 @@ +#ident @(#)filesize.mk3 1.1 15/04/26 +########################################################################### +# Sample makefile for installing manual pages +########################################################################### +SRCROOT= .. +RULESDIR= RULES +include $(SRCROOT)/$(RULESDIR)/rules.top +########################################################################### + +MANDIR= man +TARGETMAN= filesize +MANSECT= $(MANSECT_LIB) +MANSUFFIX= $(MANSUFF_LIB) +MANFILE= filesize.3 + +########################################################################### +include $(SRCROOT)/$(RULESDIR)/rules.man +########################################################################### diff -Nru cdrtools-2.01.01a33/libschily/filestat.3 cdrtools-3.02a09/libschily/filestat.3 --- cdrtools-2.01.01a33/libschily/filestat.3 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/libschily/filestat.3 1988-07-21 16:04:15.000000000 +0000 @@ -0,0 +1,34 @@ +. \" Manual Seite fuer filestat +. \" @(#)filestat.3 1.1 +. \" +.if t .ds a \v'-0.55m'\h'0.00n'\z.\h'0.40n'\z.\v'0.55m'\h'-0.40n'a +.if t .ds o \v'-0.55m'\h'0.00n'\z.\h'0.45n'\z.\v'0.55m'\h'-0.45n'o +.if t .ds u \v'-0.55m'\h'0.00n'\z.\h'0.40n'\z.\v'0.55m'\h'-0.40n'u +.if t .ds A \v'-0.77m'\h'0.25n'\z.\h'0.45n'\z.\v'0.77m'\h'-0.70n'A +.if t .ds O \v'-0.77m'\h'0.25n'\z.\h'0.45n'\z.\v'0.77m'\h'-0.70n'O +.if t .ds U \v'-0.77m'\h'0.30n'\z.\h'0.45n'\z.\v'0.77m'\h'-.75n'U +.if t .ds s \(*b +.if t .ds S SS +.if n .ds a ae +.if n .ds o oe +.if n .ds u ue +.if n .ds s sz +.TH FILESTAT 3 "15. Juli 1988" "J\*org Schilling" "Schily\'s LIBRARY FUNCTIONS" +.SH NAME +filestat() \- copies file descriptor information to buffer +.SH SYNOPSIS +.nf +.B +int filestat(f,buf) +.B FILE *f; +.B FILEDESC *buf; +.fi +.SH DESCRIPTION +filestat() places system dependent information about the file f +into the buffer buf. +.SH RETURNS +Returns a value equal to or greater than zero when successful. +Otherwise, returns the standard error code. +.SH NOTES +The size and the interpretation of the buffer is system +dependent. To use filestat() include . diff -Nru cdrtools-2.01.01a33/libschily/filestat.mk3 cdrtools-3.02a09/libschily/filestat.mk3 --- cdrtools-2.01.01a33/libschily/filestat.mk3 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/libschily/filestat.mk3 2015-04-26 18:01:43.000000000 +0000 @@ -0,0 +1,18 @@ +#ident @(#)filestat.mk3 1.1 15/04/26 +########################################################################### +# Sample makefile for installing manual pages +########################################################################### +SRCROOT= .. +RULESDIR= RULES +include $(SRCROOT)/$(RULESDIR)/rules.top +########################################################################### + +MANDIR= man +TARGETMAN= filestat +MANSECT= $(MANSECT_LIB) +MANSUFFIX= $(MANSUFF_LIB) +MANFILE= filestat.3 + +########################################################################### +include $(SRCROOT)/$(RULESDIR)/rules.man +########################################################################### diff -Nru cdrtools-2.01.01a33/libschily/filewrite.3 cdrtools-3.02a09/libschily/filewrite.3 --- cdrtools-2.01.01a33/libschily/filewrite.3 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/libschily/filewrite.3 1988-07-21 16:04:53.000000000 +0000 @@ -0,0 +1,42 @@ +. \" Manual Seite fuer filewrite +. \" @(#)filewrite.3 1.1 +. \" +.if t .ds a \v'-0.55m'\h'0.00n'\z.\h'0.40n'\z.\v'0.55m'\h'-0.40n'a +.if t .ds o \v'-0.55m'\h'0.00n'\z.\h'0.45n'\z.\v'0.55m'\h'-0.45n'o +.if t .ds u \v'-0.55m'\h'0.00n'\z.\h'0.40n'\z.\v'0.55m'\h'-0.40n'u +.if t .ds A \v'-0.77m'\h'0.25n'\z.\h'0.45n'\z.\v'0.77m'\h'-0.70n'A +.if t .ds O \v'-0.77m'\h'0.25n'\z.\h'0.45n'\z.\v'0.77m'\h'-0.70n'O +.if t .ds U \v'-0.77m'\h'0.30n'\z.\h'0.45n'\z.\v'0.77m'\h'-.75n'U +.if t .ds s \(*b +.if t .ds S SS +.if n .ds a ae +.if n .ds o oe +.if n .ds u ue +.if n .ds s sz +.TH FILEWRITE 3 "15. Juli 1988" "J\*org Schilling" "Schily\'s LIBRARY FUNCTIONS" +.SH NAME +filewrite() \- writes into file +.SH SYNOPSIS +.nf +.B +int filewrite(f,buf,size) +.B FILE *f; +.B char *buf; +.B int size; +.fi +.SH DESCRIPTION +filewrite() writes the size bytes starting at buf into the file. +The file must be open for writing. +.SH RETURNS +.TP +.B >= 0 +the number of bytes written. +.TP +.B < 0 +error code. +.SH NOTES +The process suspends if any of the error conditions are not +handled. +.PP +Writing anywhere in the file is allowed. When writing to "raw" +devices the size must be multiples of 512. diff -Nru cdrtools-2.01.01a33/libschily/filewrite.mk3 cdrtools-3.02a09/libschily/filewrite.mk3 --- cdrtools-2.01.01a33/libschily/filewrite.mk3 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/libschily/filewrite.mk3 2015-04-26 18:01:43.000000000 +0000 @@ -0,0 +1,18 @@ +#ident @(#)filewrite.mk3 1.1 15/04/26 +########################################################################### +# Sample makefile for installing manual pages +########################################################################### +SRCROOT= .. +RULESDIR= RULES +include $(SRCROOT)/$(RULESDIR)/rules.top +########################################################################### + +MANDIR= man +TARGETMAN= filewrite +MANSECT= $(MANSECT_LIB) +MANSUFFIX= $(MANSUFF_LIB) +MANFILE= filewrite.3 + +########################################################################### +include $(SRCROOT)/$(RULESDIR)/rules.man +########################################################################### diff -Nru cdrtools-2.01.01a33/libschily/fillbytes.c cdrtools-3.02a09/libschily/fillbytes.c --- cdrtools-2.01.01a33/libschily/fillbytes.c 2007-06-24 11:25:39.000000000 +0000 +++ cdrtools-3.02a09/libschily/fillbytes.c 2010-08-21 11:39:07.000000000 +0000 @@ -1,8 +1,8 @@ -/* @(#)fillbytes.c 1.16 07/06/24 Copyright 1987, 1995-2007 J. Schilling */ +/* @(#)fillbytes.c 1.18 10/08/21 Copyright 1987, 1995-2010 J. Schilling */ /* * fill memory with data * - * Copyright (c) 1987, 1995-2007 J. Schilling + * Copyright (c) 1987, 1995-2010 J. Schilling */ /* * The contents of this file are subject to the terms of the @@ -18,28 +18,29 @@ #include #include +#include #include #define DO8(a) a; a; a; a; a; a; a; a; -#define cval ((char) lval) +#define cval ((char)lval) /* * fillbytes(to, cnt, val) is the same as memset(to, val, cnt) */ #ifdef PROTOTYPES EXPORT char * -fillbytes(void *tov, int cnt, char val) +fillbytes(void *tov, ssize_t cnt, char val) #else EXPORT char * fillbytes(tov, cnt, val) void *tov; - int cnt; + ssize_t cnt; char val; #endif { register char *to = (char *)tov; - register int n; + register ssize_t n; register long lval; /* @@ -58,8 +59,8 @@ } n++; - if (n >= (int)(8 * sizeof (long))) { - register int rem = n % (8 * sizeof (long)); + if (n >= (ssize_t)(8 * sizeof (long))) { + register ssize_t rem = n % (8 * sizeof (long)); lval |= (lval<<8); lval |= (lval<<16); diff -Nru cdrtools-2.01.01a33/libschily/findbytes.c cdrtools-3.02a09/libschily/findbytes.c --- cdrtools-2.01.01a33/libschily/findbytes.c 2007-06-24 11:25:39.000000000 +0000 +++ cdrtools-3.02a09/libschily/findbytes.c 2010-08-23 13:38:00.000000000 +0000 @@ -1,8 +1,8 @@ -/* @(#)findbytes.c 1.5 07/06/24 Copyright 2000-2007 J. Schilling */ +/* @(#)findbytes.c 1.7 10/08/23 Copyright 2000-2009 J. Schilling */ /* * Find a byte with specific value in memory. * - * Copyright (c) 2000-2007 J. Schilling + * Copyright (c) 2000-2009 J. Schilling * * Based on a strlen() idea from Torbjorn Granlund (tege@sics.se) and * Dan Sahlin (dan@sics.se) and the memchr() suggestion @@ -26,6 +26,7 @@ #include #include #include +#include #include /* @@ -33,12 +34,12 @@ */ #ifdef PROTOTYPES EXPORT char * -findbytes(const void *vp, int cnt, char val) +findbytes(const void *vp, ssize_t cnt, char val) #else EXPORT char * findbytes(vp, cnt, val) const void *vp; - register int cnt; + register ssize_t cnt; char val; #endif { @@ -96,7 +97,8 @@ #if SIZE_LONG > 8 error SIZE_LONG has unknown value #endif - for (lp = (const Ulong *)cp; cnt >= sizeof (long); cnt -= sizeof (long)) { + for (lp = (const Ulong *)cp; cnt >= sizeof (long); + cnt -= sizeof (long)) { /* * We are not looking for 0 bytes so we need to xor with the * long mask of repeated bytes. If any of the bytes matches our @@ -111,7 +113,7 @@ * This will happen if there is 0x80nnnnnn / 0x80nnnnnnnnnnnnnn */ lval = (*lp++ ^ lmask); /* create 0 byte on match */ - lval = (lval + magic_mask) ^ ~lval; /* set bits unchanged by +*/ + lval = (lval + magic_mask) ^ ~lval; /* + and set unchg. bits */ if ((lval & ~magic_mask) != 0) { /* a magic hole was set */ /* * If any of the hole bits did not change by addition, diff -Nru cdrtools-2.01.01a33/libschily/findinpath.c cdrtools-3.02a09/libschily/findinpath.c --- cdrtools-2.01.01a33/libschily/findinpath.c 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/libschily/findinpath.c 2010-10-06 22:11:30.000000000 +0000 @@ -0,0 +1,116 @@ +/* @(#)findinpath.c 1.6 10/10/07 Copyright 2004-2010 J. Schilling */ +#include +#ifndef lint +static UConst char sccsid[] = + "@(#)findinpath.c 1.6 10/10/07 Copyright 2004-2010 J. Schilling"; +#endif +/* + * Search a file name in the PATH and return the path name in allocated space. + * + * Copyright 2004-2010 J. Schilling + */ +/* + * The contents of this file are subject to the terms of the + * Common Development and Distribution License, Version 1.0 only + * (the "License"). You may not use this file except in compliance + * with the License. + * + * See the file CDDL.Schily.txt in this distribution for details. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file CDDL.Schily.txt from this distribution. + */ + +#include +#include +#include +#include +#include +#include + +EXPORT char *findinpath __PR((char *name, int mode, BOOL plain_file, + char *path)); + +#ifdef JOS +#define enofile(t) ((t) == EMISSDIR || \ + (t) == ENOFILE || \ + (t) == EISADIR || \ + (t) == EIOERR) +#else +#define enofile(t) ((t) == ENOENT || \ + (t) == ENOTDIR || \ + (t) == EISDIR || \ + (t) == EIO) +#endif + +EXPORT char * +findinpath(name, mode, plain_file, path) + char *name; /* The name to execute */ + int mode; /* Mode for access() e.g. X_OK */ + BOOL plain_file; /* Whether to check only plain files */ + char *path; /* PATH to use if not NULL */ +{ + char *pathlist; + char *p1; + char *p2; + char *tmp; + int err = 0; + int exerr = 0; + struct stat sb; + + if (name == NULL) + return (NULL); + if (strchr(name, '/')) + return (strdup(name)); + + if (path != NULL) + pathlist = path; + else if ((pathlist = getenv("PATH")) == NULL) + pathlist = "/bin"; + p2 = pathlist = strdup(pathlist); + if (pathlist == NULL) + return (NULL); + + for (;;) { + p1 = p2; + if ((p2 = strchr(p2, PATH_ENV_DELIM)) != NULL) + *p2++ = '\0'; + if (*p1 == '\0') { + tmp = strdup(name); + if (tmp == NULL) { + free(pathlist); + return (NULL); + } + } else { + size_t len = strlen(p1) + strlen(name) + 2; + + tmp = malloc(len); + if (tmp == NULL) { + free(pathlist); + return (strdup(name)); + } + strcatl(tmp, p1, PATH_DELIM_STR, name, (char *)NULL); + } + + seterrno(0); + if (stat(tmp, &sb) >= 0) { + if ((!plain_file || S_ISREG(sb.st_mode)) && + (eaccess(tmp, mode) >= 0)) { + free(pathlist); + return (tmp); + } + if ((err = geterrno()) == 0) + err = ENOEXEC; + } else { + err = geterrno(); + } + free(tmp); + if (exerr == 0 && !enofile(err)) + exerr = err; + if ((!enofile(err) && !(err == EACCES)) || p2 == NULL) + break; + } + free(pathlist); + seterrno(exerr); + return (NULL); +} diff -Nru cdrtools-2.01.01a33/libschily/findline.3 cdrtools-3.02a09/libschily/findline.3 --- cdrtools-2.01.01a33/libschily/findline.3 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/libschily/findline.3 1988-07-21 16:22:34.000000000 +0000 @@ -0,0 +1,64 @@ +. \" Manual Seite fuer findline +. \" @(#)findline.3 1.1 +. \" +.if t .ds a \v'-0.55m'\h'0.00n'\z.\h'0.40n'\z.\v'0.55m'\h'-0.40n'a +.if t .ds o \v'-0.55m'\h'0.00n'\z.\h'0.45n'\z.\v'0.55m'\h'-0.45n'o +.if t .ds u \v'-0.55m'\h'0.00n'\z.\h'0.40n'\z.\v'0.55m'\h'-0.40n'u +.if t .ds A \v'-0.77m'\h'0.25n'\z.\h'0.45n'\z.\v'0.77m'\h'-0.70n'A +.if t .ds O \v'-0.77m'\h'0.25n'\z.\h'0.45n'\z.\v'0.77m'\h'-0.70n'O +.if t .ds U \v'-0.77m'\h'0.30n'\z.\h'0.45n'\z.\v'0.77m'\h'-.75n'U +.if t .ds s \(*b +.if t .ds S SS +.if n .ds a ae +.if n .ds o oe +.if n .ds u ue +.if n .ds s sz +.TH FINDLINE 3 "15. Juli 1988" "J\*org Schilling" "Schily\'s LIBRARY FUNCTIONS" +.SH NAME +findline() \- finds a line that has a matching field +.SH SYNOPSIS +.nf +.B +int findline(fname,delim,string,field,array,arraysize) +.B + char *fname; /* file name */ +.B + char delim; /* field delimiter */ +.B + char *string; /* string to match */ +.B + int field; /* field number to match, 0-n */ +.B + char *array[]; /* array to fill pointers in */ +.B + int arraysize; /* number of entries in the arrays */ +.fi +.SH DESCRIPTION +findline() retrieves specific fields from the first line of the +file fname. +.PP +findline() fills in array with pointers to strings that make up +the fields on the line. The strings are allocated new storage. +The field delimiter, delim, is used to break up each line of the +file into fields. string is the string to match. fieldno is +the field number to match. Fields are numbered 0..n. array is +an array of pointers to fill in. arraysize is the number of +elements in the array. +.SH RETURNS +.TP +.B +1 +match. +.TP +.B \-1 +no match. +.TP +.B \-2 +arg error. +.TP +.B \-3 +cannot open file. +.TP +.B \-4 +not enough memory to allocate space for fields. +.SH NOTES +Each line of the file must be less than 512 characters long. diff -Nru cdrtools-2.01.01a33/libschily/findline.c cdrtools-3.02a09/libschily/findline.c --- cdrtools-2.01.01a33/libschily/findline.c 2006-09-13 15:05:35.000000000 +0000 +++ cdrtools-3.02a09/libschily/findline.c 2009-07-10 19:54:04.000000000 +0000 @@ -1,4 +1,4 @@ -/* @(#)findline.c 1.17 06/09/13 Copyright 1985, 1995-2003 J. Schilling */ +/* @(#)findline.c 1.18 09/07/10 Copyright 1985, 1995-2003 J. Schilling */ /* * findline * get a line from a file with matching string in a given field @@ -28,7 +28,7 @@ #define USE_LARGEFILES /* We must make this module large file aware */ #include -#include +#include #include #include #include /* Include sys/types.h to make off_t available */ diff -Nru cdrtools-2.01.01a33/libschily/findline.mk3 cdrtools-3.02a09/libschily/findline.mk3 --- cdrtools-2.01.01a33/libschily/findline.mk3 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/libschily/findline.mk3 2015-04-26 18:01:43.000000000 +0000 @@ -0,0 +1,18 @@ +#ident @(#)findline.mk3 1.1 15/04/26 +########################################################################### +# Sample makefile for installing manual pages +########################################################################### +SRCROOT= .. +RULESDIR= RULES +include $(SRCROOT)/$(RULESDIR)/rules.top +########################################################################### + +MANDIR= man +TARGETMAN= findline +MANSECT= $(MANSECT_LIB) +MANSUFFIX= $(MANSUFF_LIB) +MANFILE= findline.3 + +########################################################################### +include $(SRCROOT)/$(RULESDIR)/rules.man +########################################################################### diff -Nru cdrtools-2.01.01a33/libschily/fjmem.c cdrtools-3.02a09/libschily/fjmem.c --- cdrtools-2.01.01a33/libschily/fjmem.c 2007-04-03 16:30:35.000000000 +0000 +++ cdrtools-3.02a09/libschily/fjmem.c 2015-05-10 08:25:13.000000000 +0000 @@ -1,12 +1,13 @@ -/* @(#)fjmem.c 1.11 07/04/03 Copyright 1998-2007 J. Schilling */ +/* @(#)fjmem.c 1.14 15/05/10 Copyright 1998-2015 J. Schilling */ +#include #ifndef lint -static char sccsid[] = - "@(#)fjmem.c 1.11 07/04/03 Copyright 1998-2007 J. Schilling"; +static UConst char sccsid[] = + "@(#)fjmem.c 1.14 15/05/10 Copyright 1998-2015 J. Schilling"; #endif /* * Memory handling with error checking * - * Copyright (c) 1998-2006 J. Schilling + * Copyright (c) 1998-2015 J. Schilling */ /* * The contents of this file are subject to the terms of the @@ -15,13 +16,14 @@ * with the License. * * See the file CDDL.Schily.txt in this distribution for details. + * A copy of the CDDL is also available via the Internet at + * http://www.opensource.org/licenses/cddl1.txt * * When distributing Covered Code, include this CDDL HEADER in each * file and include the License file CDDL.Schily.txt from this distribution. */ -#include -#include +#include #include #include #include @@ -30,10 +32,24 @@ #include #include +EXPORT int __fjmexval __PR((int exval)); EXPORT void *__fjmalloc __PR((FILE *f, size_t size, char *msg, sigjmps_t *jmp)); EXPORT void *__fjrealloc __PR((FILE *f, void *ptr, size_t size, char *msg, sigjmps_t *jmp)); EXPORT char *__fjsavestr __PR((FILE *f, const char *s, sigjmps_t *jmp)); +LOCAL int fjmexval; + +EXPORT int +__fjmexval(exval) + int exval; +{ + int ret = fjmexval; + + fjmexval = exval; + + return (ret); +} + EXPORT void * __fjmalloc(f, size, msg, jmp) FILE *f; @@ -52,6 +68,8 @@ gettext("Cannot allocate memory for %s.\n"), msg); } + if (fjmexval) + err = fjmexval; if (jmp == JM_EXIT) comexit(err); if (jmp != NULL) @@ -82,6 +100,8 @@ gettext("Cannot realloc memory for %s.\n"), msg); } + if (fjmexval) + err = fjmexval; if (jmp == JM_EXIT) comexit(err); if (jmp != NULL) diff -Nru cdrtools-2.01.01a33/libschily/flush.3 cdrtools-3.02a09/libschily/flush.3 --- cdrtools-2.01.01a33/libschily/flush.3 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/libschily/flush.3 1988-07-21 16:06:50.000000000 +0000 @@ -0,0 +1,30 @@ +. \" Manual Seite fuer flush +. \" @(#)flush.3 1.1 +. \" +.if t .ds a \v'-0.55m'\h'0.00n'\z.\h'0.40n'\z.\v'0.55m'\h'-0.40n'a +.if t .ds o \v'-0.55m'\h'0.00n'\z.\h'0.45n'\z.\v'0.55m'\h'-0.45n'o +.if t .ds u \v'-0.55m'\h'0.00n'\z.\h'0.40n'\z.\v'0.55m'\h'-0.40n'u +.if t .ds A \v'-0.77m'\h'0.25n'\z.\h'0.45n'\z.\v'0.77m'\h'-0.70n'A +.if t .ds O \v'-0.77m'\h'0.25n'\z.\h'0.45n'\z.\v'0.77m'\h'-0.70n'O +.if t .ds U \v'-0.77m'\h'0.30n'\z.\h'0.45n'\z.\v'0.77m'\h'-.75n'U +.if t .ds s \(*b +.if t .ds S SS +.if n .ds a ae +.if n .ds o oe +.if n .ds u ue +.if n .ds s sz +.TH FLUSH 3 "15. Juli 1988" "J\*org Schilling" "Schily\'s LIBRARY FUNCTIONS" +.SH NAME +flush() \- flushes the buffer for standard output +.SH SYNOPSIS +.B +flush() +.SH DESCRIPTION +flush() prompts to standard output. It is used because the +output is not visible to the user until a flush(), close() or +exit() is done. +.SH RETURNS +none +.SH NOTES +flush() is defined in the standard header file, stdio.h, as +fflush(stdout). diff -Nru cdrtools-2.01.01a33/libschily/flush.mk3 cdrtools-3.02a09/libschily/flush.mk3 --- cdrtools-2.01.01a33/libschily/flush.mk3 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/libschily/flush.mk3 2015-04-26 18:01:43.000000000 +0000 @@ -0,0 +1,18 @@ +#ident @(#)flush.mk3 1.1 15/04/26 +########################################################################### +# Sample makefile for installing manual pages +########################################################################### +SRCROOT= .. +RULESDIR= RULES +include $(SRCROOT)/$(RULESDIR)/rules.top +########################################################################### + +MANDIR= man +TARGETMAN= flush +MANSECT= $(MANSECT_LIB) +MANSUFFIX= $(MANSUFF_LIB) +MANFILE= flush.3 + +########################################################################### +include $(SRCROOT)/$(RULESDIR)/rules.man +########################################################################### diff -Nru cdrtools-2.01.01a33/libschily/fnmatch.3 cdrtools-3.02a09/libschily/fnmatch.3 --- cdrtools-2.01.01a33/libschily/fnmatch.3 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/libschily/fnmatch.3 1995-04-28 10:28:56.000000000 +0000 @@ -0,0 +1,126 @@ +.\" Copyright (c) 1989, 1991, 1993 +.\" The Regents of the University of California. All rights reserved. +.\" +.\" This code is derived from software contributed to Berkeley by +.\" Guido van Rossum. +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" 3. All advertising materials mentioning features or use of this software +.\" must display the following acknowledgement: +.\" This product includes software developed by the University of +.\" California, Berkeley and its contributors. +.\" 4. Neither the name of the University nor the names of its contributors +.\" may be used to endorse or promote products derived from this software +.\" without specific prior written permission. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +.\" SUCH DAMAGE. +.\" +.\" @(#)fnmatch.3 8.3 (Berkeley) 4/28/95 +.\" +.Dd April 28, 1995 +.Dt FNMATCH 3 +.Os +.Sh NAME +.Nm fnmatch +.Nd match filename or pathname +.Sh SYNOPSIS +.Fd #include +.Ft int +.Fn fnmatch "const char *pattern" "const char *string" "int flags" +.Sh DESCRIPTION +The +.Fn fnmatch +function +matches patterns according to the rules used by the shell. +It checks the string specified by the +.Fa string +argument to see if it matches the pattern specified by the +.Fa pattern +argument. +.Pp +The +.Fa flags +argument modifies the interpretation of +.Fa pattern +and +.Fa string . +The value of +.Fa flags +is the bitwise inclusive +.Tn OR +of any of the following +constants, which are defined in the include file +.Pa fnmatch.h . +.Bl -tag -width FNM_PATHNAME +.It Dv FNM_NOESCAPE +Normally, every occurrence of a backslash +.Pq Ql \e +followed by a character in +.Fa pattern +is replaced by that character. +This is done to negate any special meaning for the character. +If the +.Dv FNM_NOESCAPE +flag is set, a backslash character is treated as an ordinary character. +.It Dv FNM_PATHNAME +Slash characters in +.Fa string +must be explicitly matched by slashes in +.Fa pattern . +If this flag is not set, then slashes are treated as regular characters. +.It Dv FNM_PERIOD +Leading periods in strings match periods in patterns. +The definition of ``leading'' is related to the specification of +.Dv FNM_PATHNAME. +A period is always ``leading'' if it is the first character in +.Ar string . +Additionally, if +.Dv FNM_PATHNAME +is set, +a period is ``leading'' if it immediately follows a slash. +.El +.Sh RETURN VALUES +The +.Fn fnmatch +function returns zero if +.Fa string +matches the pattern specified by +.Fa pattern , +otherwise, it returns the value +.Dv FNM_NOMATCH . +.Sh SEE ALSO +.Xr sh 1 , +.Xr glob 3 , +.Xr regex 3 +.Sh STANDARDS +The +.Fn fnmatch +function conforms to +.St -p1003.2 . +.Sh HISTORY +The +.Fn fnmatch +function first appeared in +.Bx 4.4 . +.Sh BUGS +The pattern +.Ql * +matches the empty string, even if +.Dv FNM_PATHNAME +is specified. diff -Nru cdrtools-2.01.01a33/libschily/fnmatch.c cdrtools-3.02a09/libschily/fnmatch.c --- cdrtools-2.01.01a33/libschily/fnmatch.c 2006-09-13 15:05:35.000000000 +0000 +++ cdrtools-3.02a09/libschily/fnmatch.c 2017-08-29 23:04:40.000000000 +0000 @@ -1,7 +1,8 @@ -/* @(#)fnmatch.c 8.6 06/09/13 2006 J. Schilling from 8.2 (Berkeley) */ +/* @(#)fnmatch.c 8.24 17/08/30 2005-2017 J. Schilling from 8.2 (Berkeley) */ +#include #ifndef lint -static char sccsid[] = - "@(#)fnmatch.c 8.6 06/09/13 2005 J. Schilling from 8.2 (Berkeley)"; +static UConst char sccsid[] = + "@(#)fnmatch.c 8.24 17/08/30 2005-2017 J. Schilling from 8.2 (Berkeley)"; #endif /* * Copyright (c) 1989, 1993, 1994 @@ -10,6 +11,12 @@ * This code is derived from software contributed to Berkeley by * Guido van Rossum. * + * Copyright (c) 2005-2017 J. Schilling + * Copyright (c) 2011 The FreeBSD Foundation + * All rights reserved. + * Portions of this software were developed by David Chisnall + * under sponsorship from the FreeBSD Foundation. + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: @@ -36,46 +43,134 @@ */ #if defined(LIBC_SCCS) && !defined(lint) -static char sccsid[] = "@(#)fnmatch.c 8.6 (Berkeley) 09/13/06"; +static UConst char sccsid[] = "@(#)fnmatch.c 8.24 (Berkeley) 08/30/17"; #endif /* LIBC_SCCS and not lint */ +/* "FBSD src/lib/libc/gen/fnmatch.c,v 1.19 2010/04/16 22:29:24 jilles Exp $" */ /* * Function fnmatch() as specified in POSIX 1003.2-1992, section B.6. * Compares a filename or pathname to a pattern. */ +/* + * Some notes on multibyte character support: + * 1. Patterns with illegal byte sequences match nothing. + * 2. Illegal byte sequences in the "string" argument are handled by treating + * them as single-byte characters with a value of the first byte of the + * sequence cast to wchar_t. + * 3. Multibyte conversion state objects (mbstate_t) are passed around and + * used for most, but not all, conversions. Further work will be required + * to support state-dependent encodings. + */ + #include -#ifndef HAVE_FNMATCH #include +#include #include +#include +#include +#include /* Define missing prototypes */ #define EOS '\0' -static const char *rangematch __PR((const char *, int, int)); +#define RANGE_MATCH 1 +#define RANGE_NOMATCH 0 +#define RANGE_ERROR (-1) + +#define CL_SIZE 32 /* Max size for '[: :]' */ + +static int rangematch __PR((const char *, wchar_t, int, char **, mbstate_t *)); +static int fnmatch1 __PR((const char *, const char *, const char *, int, + mbstate_t, mbstate_t)); + +#ifndef HAVE_FNMATCH +#undef fnmatch +/* + * The Cygwin compile environment incorrectly implements #pragma weak. + * The weak symbols are only defined as local symbols making it impossible + * to use them from outside the scope of this source file. + * A platform that allows linking with global symbols has HAVE_LINK_WEAK + * defined. + */ +#if defined(HAVE_PRAGMA_WEAK) && defined(HAVE_LINK_WEAK) +#pragma weak fnmatch = js_fnmatch +#else int fnmatch(pattern, string, flags) const char *pattern; const char *string; int flags; { - const char *stringstart; - char c, test; + return (js_fnmatch(pattern, string, flags)); +} +#endif +#endif + +int +js_fnmatch(pattern, string, flags) + const char *pattern; + const char *string; + int flags; +{ + /* + * SunPro C gives a warning if we do not initialize an object: + * static const mbstate_t initial; + * GCC gives a warning if we try to initialize it. + * As the POSIX standard forbids mbstate_t from being an array, + * we do not need "const", the var is always copied when used as + * a parapemeter for fnmatch1(); + */ + static mbstate_t initial; + + return (fnmatch1(pattern, string, string, flags, initial, initial)); +} - for (stringstart = string; ; ) - switch (c = *pattern++) { +static int +fnmatch1(pattern, string, stringstart, flags, patmbs, strmbs) + const char *pattern; + const char *string; + const char *stringstart; + int flags; + mbstate_t patmbs; + mbstate_t strmbs; +{ + const char *bt_pattern, *bt_string; + mbstate_t bt_patmbs, bt_strmbs; + char *newp; + char c; + wchar_t pc, sc; + size_t pclen, sclen; + + bt_pattern = bt_string = NULL; + for (;;) { + pclen = mbrtowc(&pc, pattern, MB_LEN_MAX, &patmbs); + if (pclen == (size_t)-1 || pclen == (size_t)-2) + return (FNM_NOMATCH); + pattern += pclen; + sclen = mbrtowc(&sc, string, MB_LEN_MAX, &strmbs); + if (sclen == (size_t)-1 || sclen == (size_t)-2) { + sc = (unsigned char)*string; + sclen = 1; + memset(&strmbs, 0, sizeof (strmbs)); + } + switch (pc) { case EOS: - return (*string == EOS ? 0 : FNM_NOMATCH); + if ((flags & FNM_LEADING_DIR) && sc == '/') + return (0); + if (sc == EOS) + return (0); + goto backtrack; case '?': - if (*string == EOS) - return (FNM_NOMATCH); - if (*string == '/' && (flags & FNM_PATHNAME)) + if (sc == EOS) return (FNM_NOMATCH); - if (*string == '.' && (flags & FNM_PERIOD) && + if (sc == '/' && (flags & FNM_PATHNAME)) + goto backtrack; + if (sc == '.' && (flags & FNM_PERIOD) && (string == stringstart || ((flags & FNM_PATHNAME) && *(string - 1) == '/'))) - return (FNM_NOMATCH); - ++string; + goto backtrack; + string += sclen; break; case '*': c = *pattern; @@ -83,66 +178,131 @@ while (c == '*') c = *++pattern; - if (*string == '.' && (flags & FNM_PERIOD) && + if (sc == '.' && (flags & FNM_PERIOD) && (string == stringstart || ((flags & FNM_PATHNAME) && *(string - 1) == '/'))) - return (FNM_NOMATCH); + goto backtrack; /* Optimize for pattern with * at end or before /. */ - if (c == EOS) + if (c == EOS) { if (flags & FNM_PATHNAME) - return (strchr(string, '/') == NULL ? + return ((flags & FNM_LEADING_DIR) || + strchr(string, '/') == NULL ? 0 : FNM_NOMATCH); else return (0); - else if (c == '/' && flags & FNM_PATHNAME) { + } else if (c == '/' && flags & FNM_PATHNAME) { if ((string = strchr(string, '/')) == NULL) return (FNM_NOMATCH); break; } - /* General case, use recursion. */ - while ((test = *string) != EOS) { - if (!fnmatch(pattern, string, flags & ~FNM_PERIOD)) - return (0); - if (test == '/' && flags & FNM_PATHNAME) - break; - ++string; - } - return (FNM_NOMATCH); + /* + * First try the shortest match for the '*' that + * could work. We can forget any earlier '*' since + * there is no way having it match more characters + * can help us, given that we are already here. + */ + bt_pattern = pattern, bt_patmbs = patmbs; + bt_string = string, bt_strmbs = strmbs; + break; case '[': - if (*string == EOS) + if (sc == EOS) return (FNM_NOMATCH); - if (*string == '/' && flags & FNM_PATHNAME) - return (FNM_NOMATCH); - if ((pattern = - rangematch(pattern, *string, flags)) == NULL) - return (FNM_NOMATCH); - ++string; + if (sc == '/' && (flags & FNM_PATHNAME)) + goto backtrack; + if (sc == '.' && (flags & FNM_PERIOD) && + (string == stringstart || + ((flags & FNM_PATHNAME) && *(string - 1) == '/'))) + goto backtrack; + + switch (rangematch(pattern, sc, flags, &newp, + &patmbs)) { + case RANGE_ERROR: + goto norm; + case RANGE_MATCH: + pattern = newp; + break; + case RANGE_NOMATCH: + goto backtrack; + } + string += sclen; break; case '\\': if (!(flags & FNM_NOESCAPE)) { - if ((c = *pattern++) == EOS) { - c = '\\'; - --pattern; - } + pclen = mbrtowc(&pc, pattern, MB_LEN_MAX, + &patmbs); + if (pclen == (size_t)-1 || pclen == (size_t)-2) + return (FNM_NOMATCH); + if (pclen == 0) + return (FNM_NOMATCH); + pattern += pclen; } /* FALLTHROUGH */ default: - if (c != *string++) - return (FNM_NOMATCH); + norm: + string += sclen; + if (pc == sc) { + ; + } else if ((flags & FNM_CASEFOLD) && + (towlower(pc) == towlower(sc))) { + ; + } else { + backtrack: + /* + * If we have a mismatch (other than hitting + * the end of the string), go back to the last + * '*' seen and have it match one additional + * character. + */ + if (bt_pattern == NULL) + return (FNM_NOMATCH); + sclen = mbrtowc(&sc, bt_string, MB_LEN_MAX, + &bt_strmbs); + if (sclen == (size_t)-1 || + sclen == (size_t)-2) { + sc = (unsigned char)*bt_string; + sclen = 1; + memset(&bt_strmbs, 0, + sizeof (bt_strmbs)); + } + if (sc == EOS) + return (FNM_NOMATCH); + if (sc == '/' && flags & FNM_PATHNAME) + return (FNM_NOMATCH); + bt_string += sclen; + pattern = bt_pattern, patmbs = bt_patmbs; + string = bt_string, strmbs = bt_strmbs; + } break; } + } /* NOTREACHED */ } -static const char * -rangematch(pattern, test, flags) +#ifdef PROTOTYPES +static int +rangematch(const char *pattern, wchar_t test, int flags, char **newp, + mbstate_t *patmbs) +#else +static int +rangematch(pattern, test, flags, newp, patmbs) const char *pattern; - int test, flags; + wchar_t test; + int flags; + char **newp; + mbstate_t *patmbs; +#endif { int negate, ok; - char c, c2; + wchar_t c, c2; + wchar_t otest = test; + size_t pclen; + const char *origpat; +#ifdef XXX_COLLATE + struct xlocale_collate *table = (struct xlocale_collate *) + __get_locale()->components[XLC_COLLATE]; +#endif /* * A bracket expression starting with an unquoted circumflex @@ -151,26 +311,109 @@ * consistency with the regular expression syntax. * J.T. Conklin (conklin@ngai.kaleida.com) */ - if (negate = (*pattern == '!' || *pattern == '^')) + if ((negate = (*pattern == '!' || *pattern == '^'))) ++pattern; - for (ok = 0; (c = *pattern++) != ']'; ) { - if (c == '\\' && !(flags & FNM_NOESCAPE)) - c = *pattern++; - if (c == EOS) - return (NULL); - if (*pattern == '-' && - (c2 = *(pattern+1)) != EOS && c2 != ']') { - pattern += 2; - if (c2 == '\\' && !(flags & FNM_NOESCAPE)) - c2 = *pattern++; + if (flags & FNM_CASEFOLD) + test = towlower(test); + + /* + * A right bracket shall lose its special meaning and represent + * itself in a bracket expression if it occurs first in the list. + * -- POSIX.2 2.8.3.2 + */ + ok = 0; + origpat = pattern; + for (;;) { + int quoted = 0; + + if (*pattern == ']' && pattern > origpat) { + pattern++; + break; + } else if (*pattern == '\0') { + return (RANGE_ERROR); + } else if (*pattern == '/' && (flags & FNM_PATHNAME)) { + return (RANGE_NOMATCH); + } else if (*pattern == '\\' && !(flags & FNM_NOESCAPE)) { + pattern++; + quoted++; + } + pclen = mbrtowc(&c, pattern, MB_LEN_MAX, patmbs); + if (pclen == (size_t)-1 || pclen == (size_t)-2) + return (RANGE_NOMATCH); + pattern += pclen; + + if (!quoted && c == '[') { + if (pattern[0] == ':') { + char class[CL_SIZE+1]; + char *pc = class; + const char *p; + + p = pattern + 1; /* Eat ':' */ + for (;;) { + if (*p == '\0') + return (RANGE_ERROR); + if (*p == ':' && p[1] == ']') + break; + if (pc >= &class[CL_SIZE]) + return (RANGE_ERROR); + *pc++ = *p++; + } + if (pc == class) + return (RANGE_ERROR); + *pc = '\0'; + pattern = p + 2; /* Skip ":]" */ + if (iswctype(otest, wctype(class))) { + ok = 1; + } else if (flags & FNM_CASEFOLD) { + /* + * Convert to the other case + */ + if (strcmp(class, "upper") == 0) + if (iswctype(otest, + wctype("lower"))) + ok = 1; + else if (strcmp(class, "lower") == 0) + if (iswctype(otest, + wctype("upper"))) + ok = 1; + } + continue; + } + } + + if (flags & FNM_CASEFOLD) + c = towlower(c); + + if (*pattern == '-' && *(pattern + 1) != EOS && + *(pattern + 1) != ']') { + if (*++pattern == '\\' && !(flags & FNM_NOESCAPE)) + if (*pattern != EOS) + pattern++; + pclen = mbrtowc(&c2, pattern, MB_LEN_MAX, patmbs); + if (pclen == (size_t)-1 || pclen == (size_t)-2) + return (RANGE_NOMATCH); + pattern += pclen; if (c2 == EOS) - return (NULL); + return (RANGE_ERROR); + + if (flags & FNM_CASEFOLD) + c2 = towlower(c2); + +#ifdef XXX_COLLATE + if (table->__collate_load_error ? + c <= test && test <= c2 : + __wcollate_range_cmp(c, test) <= 0 && + __wcollate_range_cmp(test, c2) <= 0) + ok = 1; +#else if (c <= test && test <= c2) ok = 1; +#endif } else if (c == test) ok = 1; } - return (ok == negate ? NULL : pattern); + + *newp = (char *)pattern; + return (ok == negate ? RANGE_NOMATCH : RANGE_MATCH); } -#endif /* HAVE_FNMATCH */ diff -Nru cdrtools-2.01.01a33/libschily/fnmatch.mk3 cdrtools-3.02a09/libschily/fnmatch.mk3 --- cdrtools-2.01.01a33/libschily/fnmatch.mk3 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/libschily/fnmatch.mk3 2015-04-26 18:01:43.000000000 +0000 @@ -0,0 +1,18 @@ +#ident @(#)fnmatch.mk3 1.1 15/04/26 +########################################################################### +# Sample makefile for installing manual pages +########################################################################### +SRCROOT= .. +RULESDIR= RULES +include $(SRCROOT)/$(RULESDIR)/rules.top +########################################################################### + +MANDIR= man +TARGETMAN= fnmatch +MANSECT= $(MANSECT_LIB) +MANSUFFIX= $(MANSUFF_LIB) +MANFILE= fnmatch.3 + +########################################################################### +include $(SRCROOT)/$(RULESDIR)/rules.man +########################################################################### diff -Nru cdrtools-2.01.01a33/libschily/format.3 cdrtools-3.02a09/libschily/format.3 --- cdrtools-2.01.01a33/libschily/format.3 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/libschily/format.3 2017-12-08 10:53:48.000000000 +0000 @@ -0,0 +1,532 @@ +'\" t +. \" Manual Seite fuer format +. \" @(#)format.3 1.4 17/12/08 Copyright 1985-2017 J. Schilling +. \" +.if t .ds a \v'-0.55m'\h'0.00n'\z.\h'0.40n'\z.\v'0.55m'\h'-0.40n'a +.if t .ds o \v'-0.55m'\h'0.00n'\z.\h'0.45n'\z.\v'0.55m'\h'-0.45n'o +.if t .ds u \v'-0.55m'\h'0.00n'\z.\h'0.40n'\z.\v'0.55m'\h'-0.40n'u +.if t .ds A \v'-0.77m'\h'0.25n'\z.\h'0.45n'\z.\v'0.77m'\h'-0.70n'A +.if t .ds O \v'-0.77m'\h'0.25n'\z.\h'0.45n'\z.\v'0.77m'\h'-0.70n'O +.if t .ds U \v'-0.77m'\h'0.30n'\z.\h'0.45n'\z.\v'0.77m'\h'-.75n'U +.if t .ds s \(*b +.if t .ds S SS +.if n .ds a ae +.if n .ds o oe +.if n .ds u ue +.if n .ds s sz +.TH FORMAT 3 "2017/12/08" "J\*org Schilling" "Schily\'s LIBRARY FUNCTIONS" +.SH NAME +format() \- generates formatted output as in printf +.SH SYNOPSIS +.nf +.B +int format(cfun, farg, formatstr, formatargs) +.B int (*cfun)(); +.B void *farg; +.B char *formatstr; +.B va_list formatargs; +.fi +.SH DESCRIPTION +format() generates ASCII data, based on a specified input +string. format() knows how to create ASCII representations of +all C data types. +.PP +This subroutine takes four arguments: +.TP +.B cfun +is the address of a function declared in C as +.RS +.PP +.nf +.B int cfun(ch, farg) +.B char ch; +.B void *farg; +.fi +.PP +cfun is called with each character generated by format(). +farg is an arbitrary value passed as the second argument to +cfun. +.RE +.TP +.B formatstr +is a format string that controls the output, as +described below. +.TP +.B formatargs +points to a list of arguments that are to be +formatted. +.PP +.B Formatting Options +.PP +The formatting, although complicated, has a great deal of +flexibility. The format string contains a string to be +processed and places where other strings can be inserted. These +places are denoted by a % followed by characters which specify +how the next argument from formatargs is to be placed in the +string. For example, %c inserts a character. The format string +"I am printing the letter %c." with the character 'f' results in +the string, "I am printing the letter f." +.PP +The simplest formatting options are as follows: +.TP +.B %c +outputs byte as a character +.TP +.B %d +outputs integer as a decimal number +.TP +.B %i +outputs integer as a decimal number +.TP +.B %D +outputs long as a decimal number +.TP +.B %o +outputs integer as an octal number +.TP +.B %O +outputs long as an octal number +.TP +.B %u +outputs unsigned integer as a decimal number +.TP +.B %x +outputs integer as a hexadecimal number +.TP +.B %X +outputs long as a hexadecimal number +.TP +.B %l +outputs long decimal +.TP +.B %ld +outputs long decimal +.TP +.B %li +outputs long decimal +.TP +.B %lo +outputs long octal +.TP +.B %lu +outputs unsigned long as a decimal number +.TP +.B %lx +outputs long hexadecimal +.PP +For more specialized formatting, use the portable set. The +syntax for the portable set is: +.PP +.I % +.PP +.I , , +and +.I +are one character options, +as follows: +.PP +.TS +center; +cb cb lb +ci c l. +Option Character Means +.sp .5 + U unsigned + none signed +.sp .5 + C char + I int + S short + L long +.sp .5 + O octal + X hexadecimal + D decimal +.TE +.PP +.I +indicates the type of argument, while +.I +indicates the type of format you want +.I +printed in. +.PP +For example, use %CO to output a character in octal or %US to +output an unsigned short in decimal. +.PP +Note that in +.I The C Programming Language, +Kernighan and Ritchie +document %x and %d; in the portable set, %IX performs the same +function as %x, while %ID performs the same function as %d. +.PP +Using U for the +.I +option is only useful when D is used as the +.I +option because octal and hexadecimal numbers are never signed. +.PP +.B Specifying Field Width +.PP +Any type of formatting option can also have a number which +further specifies the formatting. The number appears after the +percent sign and before any characters. The number is of the +form +.I y.z +and can be negative. +.PP +.I y +specifies the minimum number of characters that the formatted +argument will fill. If the number is positive, the result will +be right justified. If it is negative, the result will be left +justified. This only specifies a minimum, so if there are more +characters than can fit into +.I y +characters, the rest will be +printed. Thus, "%6c" with the character 'f' results in the +following: +.PP +.TS +center; +l l. +.B +"%6c" "\ \ \ \ \ f" +.B +"%-6c" "f\ \ \ \ \ " +.TE +.PP +A leading 0 in the +.I y +specification causes zero filling for the +right justification, so 3 printed in %06d yields "000003". The +zero does not mean octal. +.PP +.I z +specifies a maximum number of characters or significant digits +and is not used for the above types because they are all fixed +length. The +.I z +is, however, used in %s, %b, %e, %f, and %g formats. +.LP +A field width or the significant digits or both may be +indicated by an asterisk +.RB ( \(** ) +instead of a digit string. +In this case, an integer +.I arg +supplies +the field width or the significant digits. The +.I arg +that is actually converted is not fetched until +the conversion letter is seen, so the +.IR arg s +specifying field width or the significant digits must appear +.I before +the +.I arg +(if any) to be converted. +A negative field width argument is taken as a +.RB ` \- ' +flag followed by a positive field width. +If the significant digits argument is negative, +it will be changed to zero. +.TP +.B %s +Inserts a string. +.RS +.PP +Useful for printing strings that have no null terminator. +The minimum width of the string is +.I y +and the maximum width +of the string is +.I z. +.PP +NOTE: When string formatting reaches a null, the +formatting stops. If the +.I y +field has specified more +characters, the result is padded with blanks. Thus, +formatting "test" results in the following: +.PP +.TS +center; +l l. +.B +"%6s" "\ \ test" +.B +"%-6s" "test\ \ " +.B +"%.2" "te" +.B +"%6.2" "\ \ \ \ te" +.TE +.RE +.TP +.B %b +Inserts a string bounded by a length. +.RS +.PP +This actually uses TWO arguments: the first is a string, +and the second is a number. For instance: +.PP +.B +"%b", x, 3 +is the same as +.B +"%.3s", x +.PP +The number argument is used as the maximum number of +characters in the string. %b is used when the number of +characters used might change with different calls. +.RE +.TP +.B %e +Inserts a floating number in 'e format'. +.br +This is of the form "~.####e*&&": +.RS +.TP +.B ~ +either a minus sign or nothing +.TP +.B #'s +the digits of the mantissa +.TP +.B * +either plus or minus +.TP +.B &'s +the digits of the exponent +.PP +Thus, 43.5 is formatted as .435e+02 and \-.00435 is +formatted as \-.435e-02. There are always two digits of +exponent. The +.I y +field gives a minimum width for the entire number, and the +.I z +field gives the maximum number of digits in the mantissa. +.I z +defaults to 6. Thus, formatting 43.5 results in the following: +.PP +.TS +center; +l l. +.B +"%10e" "\ \ .435e+02" +.B +"%-10e" ".435e+02\ \ " +.B +"%5e" ".435e+02" +.B +"%10.1e" "\ \ \ \ .4e+02" +.TE +.RE +.TP +.B %E +Inserts a floating number in 'E format'. +.br +This is of the form "~.####E*&&", and identical +to the +.B %e +format except that +.B E +is used instead of +.B e +in the exponent. +.TP +.B %f +Inserts a floating number in 'f format'. +.br +This is of the form "~####.&&": +.RS +.TP +.B ~ +either a minus sign or nothing +.TP +.B #'s +the digits before the decimal point +.TP +.B &'s +the digits after the decimal point +.PP +The number of #'s is always the number needed. Again, the +.I y +field gives a minimum on the size of the entire number, +while the +.I z +field is the number of significant digits to +keep after the decimal point. +.I z +defaults to 6. Thus, +formatting 1.23456 results in the following: +.PP +.TS +center; +l l. +.B +"%10f" "\ \ 1.234560" +.B +"%-10f" "1.234560\ \ " +.B +"%.2f" "1.23" +.B +"%5.2f" "\ 1.23" +.TE +.RE +.TP +.B %F +Inserts a floating number in 'F format'. +.br +This is mainly the same as the +.B %f +format. +.TP +.B %g +Inserts a floating number in optional format. +.RS +.PP +Prints in either %e or %f format, whichever is shorter, +with the minimum number of digits needed to the right of +the decimal. Whole numbers will have no digits to the +right of the decimal because trailing zeroes are +suppressed. +.I z +gives the maximum number of significant +digits including digits before the decimal point. +.I z +defaults to 6. For example, the format string "%10.4g" +results in the following: +.PP +.TS +center; +l l. +.B +435.0 "\ \ \ \ \ \ 435." +.B +4.35 "\ \ \ \ \ \ 4.35" +.B +\&.0435 "\ \ .435e-01" +.B +\&.000435 "\ \ .435e-03" +.TE +.RE +.TP +.B %G +Inserts a floating number in 'G format'. +.br +This outputs the form "~.####E*&&" in case that the exponent +variant is used. +.TP +.B %r +Recursive or remote format. +.RS +.PP +This takes two arguments: the first is a format string, +and the second is a pointer to the argument list. The new +format string is formatted and put out in place of the %r. +.PP +The field width and significant digit specification is ignored +within the %r format. The recursive format makes it possible to write +variable arg printing routines without using format(3) directly. +.RE +.TP +.B %% +Inserts %. +.RS +.PP +A double percent sign in the format string becomes a +single percent sign in the output. This does not use an +argument. +.RE +.TP +.B % +Inserts spaces. +.RS +.PP +A space character as a format control causes a field of +.I y +spaces to be output. This does not use an argument. +Note that an actual space should appear where appears +above. +.SH RETURNS +the number of characters transmitted exluding the trailing null byte. +.SH EXAMPLES +.TP +.B 1. +.B fprintf() +(formatted print to a file) could be implemented this way: +.RS +.PP +.nf +#include +#include +/* VARARGS2 */ +fprintf(f, fmt, va_alist) + FILE *f; + char *fmt; + va_dcl +{ + va_list args; + extern int fputc(); + + va_start(args); + format(&fputc, (long)f, fmt, args); + va_end(args); +} +.RE +.fi +.TP +.B 2. +.B comerr() +could be implemented this way: +.RS +.PP +.nf +#include +#include +/* VARARGS1 */ +comerr(fmt, va_alist) + char *fmt; + va_dcl +{ + va_list args; + int err; + char errbuf[20]; + char *errnam; + extern int errno; + extern int sys_nerr; + extern char *sys_errlist[]; + + err = errno; + va_start(args); + if (err < 0) { + fprintf(stderr, "Progname: %r", fmt, args); + } else { + if (err >= sys_nerr) { + sprintf(errbuf, "Error %d", err); + errnam = errbuf; + } else { + errnam = sys_errlist[err]; + } + fprintf(stderr, "Progname: %s. %r", + errnam, fmt, args); + } + va_end(args); + exit(err); +} +.RE +.fi +.SH "SEE ALSO" +comerr(3), error(3), fprintf(3), printf(3), sprintf(3) +.SH NOTES +If there are no floating point operations anywhere in the +program, the floating point package is not loaded and therefore +floating point printing commands will possibly not work correctly. +.PP +To just print a string without any formatting, use the %s format +to ensure that the string is correctly interpreted. This is +especially important if the string itself contains % characters, +because format() will attempt to interpret them, which causes +unwanted additions in the output string. The number of +characters inserted for either %s or %b should be less than 512. diff -Nru cdrtools-2.01.01a33/libschily/format.c cdrtools-3.02a09/libschily/format.c --- cdrtools-2.01.01a33/libschily/format.c 2006-12-17 20:47:44.000000000 +0000 +++ cdrtools-3.02a09/libschily/format.c 2017-11-16 21:17:00.000000000 +0000 @@ -1,4 +1,4 @@ -/* @(#)format.c 1.41 06/12/17 Copyright 1985-2006 J. Schilling */ +/* @(#)format.c 1.64 17/11/16 Copyright 1985-2017 J. Schilling */ /* * format * common code for printf fprintf & sprintf @@ -6,7 +6,7 @@ * allows recursive printf with "%r", used in: * error, comerr, comerrno, errmsg, errmsgno and the like * - * Copyright (c) 1985-2006 J. Schilling + * Copyright (c) 1985-2017 J. Schilling */ /* * The contents of this file are subject to the terms of the @@ -15,6 +15,8 @@ * with the License. * * See the file CDDL.Schily.txt in this distribution for details. + * A copy of the CDDL is also available via the Internet at + * http://www.opensource.org/licenses/cddl1.txt * * When distributing Covered Code, include this CDDL HEADER in each * file and include the License file CDDL.Schily.txt from this distribution. @@ -47,6 +49,49 @@ #undef USE_LONGLONG #endif +#ifndef USE_NL_ARGS +#define USE_NL_ARGS +#endif + +#ifdef NO_NL_ARGS +#undef USE_NL_ARGS +#endif + +/* + * Avoid to keep copies of the variable arg list in case that + * format() was compiled without including NL support for + * argument reordering. + */ +#ifdef USE_NL_ARGS +#define args fargs.ap /* Use working copy */ +#else +#define args oargs /* Directly use format() arg */ +#endif + +/* + * We may need to decide whether we should check whether all + * flags occur according to the standard which is either directly past: + * "%" or directly past "%n$". + * + * This however may make printf() slower in some cases. + */ +#ifdef USE_CHECKFLAG +#define CHECKFLAG() if (fa.flags & GOTSTAR) goto flagerror +#else +#define CHECKFLAG() +#endif + +#ifdef NO_USER_XCVT + /* + * We cannot define our own gcvt() so we need to use a + * local name instead. + */ +#ifndef HAVE_GCVT +# define gcvt js_gcvt +EXPORT char *gcvt __PR((double value, int ndigit, char *buf)); +#endif +#endif + /* * Some CPU's (e.g. PDP-11) cannot do logical shifts. * They use rotate instead. Masking the low bits before, @@ -88,8 +133,14 @@ #endif typedef struct f_args { - void (*outf)__PR((char, long)); /* Func from format(fun, arg) */ - long farg; /* Arg from format (fun, arg) */ +#ifdef FORMAT_BUFFER +#define BFSIZ 256 + char *ptr; /* Current ptr in buf */ + int cnt; /* Free char count in buf */ +#else + void (*outf)__PR((char, void *)); /* Func from format(fun, arg) */ +#endif + void *farg; /* Arg from format (fun, arg) */ int minusflag; /* Fieldwidth is negative */ int flags; /* General flags (+-#) */ int fldwidth; /* Field width as in %3d */ @@ -100,12 +151,23 @@ char fillc; /* Left fill char (' ' or '0') */ char *prefix; /* Prefix to print before buf */ int prefixlen; /* Len of prefix ('+','-','0x') */ +#ifdef FORMAT_BUFFER + /* rarely used members last: */ + char iobuf[BFSIZ]; /* buffer for stdio */ + FILE *fp; /* FILE * for fprformat() */ + int err; /* FILE * I/O error */ +#endif } f_args; #define MINUSFLG 1 /* '-' flag */ #define PLUSFLG 2 /* '+' flag */ #define SPACEFLG 4 /* ' ' flag */ #define HASHFLG 8 /* '#' flag */ +#define APOFLG 16 /* '\'' flag */ +#define GOTDOT 32 /* '.' found */ +#define GOTSTAR 64 /* '*' found */ + +#define FMT_ARGMAX 30 /* Number of fast args */ LOCAL void prnum __PR((Ulong, unsigned, f_args *)); LOCAL void prdnum __PR((Ulong, f_args *)); @@ -126,20 +188,71 @@ LOCAL void dbg_print __PR((char *fmt, int a, int b, int c, int d, int e, int f, int g, int h, int i)); #endif +#ifdef USE_NL_ARGS +#ifndef FORMAT_FUNC_NAME +#define FORMAT_IMPL +EXPORT void _fmtarglist __PR((const char *fmt, va_lists_t, va_lists_t arglist[])); +EXPORT void _fmtgetarg __PR((const char *fmt, int num, va_lists_t *)); +#else +extern void _fmtarglist __PR((const char *fmt, va_lists_t, va_lists_t arglist[])); +extern void _fmtgetarg __PR((const char *fmt, int num, va_lists_t *)); +#endif +#endif + +#ifdef FORMAT_BUFFER +LOCAL char xflsbuf __PR((int c, f_args *ap)); + +LOCAL char +xflsbuf(c, ap) + int c; + f_args *ap; +{ + *ap->ptr++ = c; + if (filewrite((FILE *)ap->fp, ap->iobuf, ap->ptr - ap->iobuf) < 0) + ap->err = 1; + + ap->cnt = BFSIZ; + ap->ptr = ap->iobuf; + return (c); +} + +#undef ofun +#define ofun(c, xp) (--((f_args *)xp)->cnt <= 0 ? \ + xflsbuf(c, (f_args *)xp) : \ + (*(((f_args *)xp)->ptr)++ = (c))) + +#endif + +#ifndef FORMAT_FUNC_NAME +#define FORMAT_FUNC_NAME format +#define FORMAT_FUNC_PARM + +#define FORMAT_FUNC_PROTO_DECL void (*fun)(char, void *), +#define FORMAT_FUNC_KR_DECL register void (*fun)(); +#define FORMAT_FUNC_KR_ARGS fun, + +#define ofun(c, fp) (*fun)(c, fp) +#endif + +#ifdef FORMAT_BUFFER +#define FARG ((void *)((UIntptr_t)farg|1)) +#else +#define FARG farg +#endif #ifdef PROTOTYPES EXPORT int -format(void (*fun)(char, long), - long farg, +FORMAT_FUNC_NAME(FORMAT_FUNC_PROTO_DECL + void *farg, const char *fmt, - va_list args) + va_list oargs) #else EXPORT int -format(fun, farg, fmt, args) - register void (*fun)(); - register long farg; +FORMAT_FUNC_NAME(FORMAT_FUNC_KR_ARGS farg, fmt, oargs) + FORMAT_FUNC_KR_DECL + register void *farg; register char *fmt; - va_list args; + va_list oargs; #endif { #ifdef FORMAT_LOW_MEM @@ -154,6 +267,7 @@ register char mode; register char c; int count; + int num; int i; short sh; const char *str; @@ -164,10 +278,36 @@ Ulong res; char *rfmt; f_args fa; - +#ifdef USE_NL_ARGS + va_lists_t fargs; /* Used to get arguments */ + va_lists_t sargs; /* Saved argument state */ + va_lists_t arglist[FMT_ARGMAX+1]; /* List of fast args */ + const char *ofmt = fmt; /* Saved original format */ + BOOL didlist = FALSE; /* Need to scan arguments */ +#endif + +#ifdef FORMAT_BUFFER + if (((UIntptr_t)farg & 1) == 0) { /* Called externally */ + fa.cnt = BFSIZ; + fa.ptr = fa.iobuf; + fa.fp = (FILE *)farg; + fa.err = 0; + farg = fa.farg = &fa; + } else { /* recursion */ + farg = (void *)((UIntptr_t)farg & ~1); + } +#endif +#ifdef FORMAT_FUNC_PARM fa.outf = fun; +#endif fa.farg = farg; count = 0; + +#ifdef USE_NL_ARGS + va_copy(sargs.ap, oargs); /* Keep a copy in sargs */ + fargs = sargs; /* Make a working copy */ +#endif + /* * Main loop over the format string. * Increment and check for end of string is made here. @@ -176,8 +316,8 @@ c = *fmt; while (c != '%') { if (c == '\0') - return (count); - (*fun)(c, farg); + goto out; + ofun(c, farg); c = *(++fmt); count++; } @@ -198,18 +338,28 @@ unsflag = FALSE; type = '\0'; mode = '\0'; + /* + * %f.s + * %*.* + * %n$f.s + * %n$*n$.*n$ + */ newflag: switch (*(++fmt)) { case '+': + CHECKFLAG(); fa.flags |= PLUSFLG; goto newflag; case '-': + CHECKFLAG(); fa.minusflag++; + fa.flags |= MINUSFLG; goto newflag; case ' ': + CHECKFLAG(); /* * If the space and the + flag are present, * the space flag will be ignored. @@ -218,47 +368,129 @@ goto newflag; case '#': + CHECKFLAG(); fa.flags |= HASHFLG; goto newflag; - case '0': - /* - * '0' is a flag. - */ - fa.fillc = '0'; + case '\'': + CHECKFLAG(); + fa.flags |= APOFLG; goto newflag; - } - if (*fmt == '*') { - fmt++; - fa.fldwidth = va_arg(args, int); - /* - * A negative fieldwith is a minus flag with a - * positive fieldwidth. - */ - if (fa.fldwidth < 0) { - fa.fldwidth = -fa.fldwidth; -/* fa.minusflag ^= 1;*/ - fa.minusflag = 1; - } - } else while (c = *fmt, is_dig(c)) { - fa.fldwidth *= 10; - fa.fldwidth += c - '0'; - fmt++; - } - if (*fmt == '.') { - fmt++; + + case '.': + fa.flags |= GOTDOT; fa.signific = 0; - if (*fmt == '*') { - fmt++; + goto newflag; + + case '*': + fa.flags |= GOTSTAR; +#ifdef USE_NL_ARGS + if (is_dig(fmt[1])) { /* *n$ */ + fmt++; /* Eat up '*' */ + goto dodig; + } +#endif + if (!(fa.flags & GOTDOT)) { + fa.fldwidth = va_arg(args, int); + /* + * A negative fieldwith is a minus flag with a + * positive fieldwidth. + */ + if (fa.fldwidth < 0) { + fa.fldwidth = -fa.fldwidth; + fa.minusflag = 1; + } + } else { + /* + * A negative significance (precision) is taken + * as if the precision and '.' were omitted. + */ fa.signific = va_arg(args, int); if (fa.signific < 0) - fa.signific = 0; - } else while (c = *fmt, is_dig(c)) { - fa.signific *= 10; - fa.signific += c - '0'; + fa.signific = -1; + } + goto newflag; + + case '0': + /* + * '0' may be a flag. + */ + if (!(fa.flags & (GOTDOT | GOTSTAR | MINUSFLG))) + fa.fillc = '0'; + /* FALLTHRU */ + case '1': case '2': case '3': case '4': + case '5': case '6': case '7': case '8': case '9': +#ifdef USE_NL_ARGS + dodig: +#endif + num = *fmt++ - '0'; + while (c = *fmt, is_dig(c)) { + num *= 10; + num += c - '0'; fmt++; } +#ifdef USE_NL_ARGS + if (c == '$') + goto doarglist; +#endif + fmt--; /* backup to last digit */ + if (!(fa.flags & GOTDOT)) + fa.fldwidth = num; + else + fa.signific = num; + goto newflag; + +#ifdef USE_NL_ARGS + doarglist: + { + va_lists_t tmp; /* Temporary arg state */ + if (num <= 0) /* Illegal arg offset */ + goto newflag; /* Continue after '$' */ + if (!didlist) { /* Need to init arglist */ + _fmtarglist(ofmt, sargs, arglist); + didlist = TRUE; + } + if (num <= FMT_ARGMAX) { + tmp = arglist[num-1]; + } else { + tmp = arglist[FMT_ARGMAX-1]; + _fmtgetarg(ofmt, num, &tmp); + } + if (!(fa.flags & GOTSTAR)) { + fargs = tmp; + } else { + if (!(fa.flags & GOTDOT)) { + fa.fldwidth = va_arg(tmp.ap, int); + /* + * A negative fieldwith is a minus flag + * with a positive fieldwidth. + */ + if (fa.fldwidth < 0) { + fa.fldwidth = -fa.fldwidth; + fa.minusflag = 1; + } + } else { + /* + * A negative significance (precision) + * is taken as if the precision and '.' + * were omitted. + */ + fa.signific = va_arg(tmp.ap, int); + if (fa.signific < 0) + fa.signific = -1; + } + } + goto newflag; + } +#endif + +#ifdef USE_CHECKFLAG + flagerror: + fmt = ++sfmt; /* Don't print '%' */ + continue; +#endif } + if (strchr("UCSIL", *fmt)) { /* * Enhancements to K&R and ANSI: @@ -287,15 +519,25 @@ mode = *fmt; } else { /* - * got CSIL + * got CSIL type */ type = *fmt++; if (!strchr("ZODX", mode = *fmt)) { + /* + * Check long double "Le", "Lf" or "Lg" + */ + if (type == 'L' && + (mode == 'e' || mode == 'E' || + mode == 'f' || mode == 'F' || + mode == 'g' || mode == 'G')) + goto checkfmt; fmt--; mode = 'D'; /* default mode */ } } - } else switch (*fmt) { + } else { + checkfmt: + switch (*fmt) { case 'h': if (!type) @@ -310,15 +552,54 @@ case 'j': if (!type) type = 'J'; /* convert to intmax_t type */ + goto getmode; + + case 'z': /* size_t */ +#if SIZEOF_SIZE_T == SIZEOF_INT + if (!type) + type = 'I'; /* convert to int type */ +#else +#if SIZEOF_SIZE_T == SIZEOF_LONG_INT + if (!type) + type = 'L'; /* convert to long type */ +#else +#if SIZEOF_SIZE_T == SIZEOF_LLONG + if (!type) + type = 'Q'; /* convert to long long type */ +#else +error sizeof (size_t) is unknown +#endif +#endif +#endif + goto getmode; + + case 't': /* ptrdiff_t */ +#if SIZEOF_PTRDIFF_T == SIZEOF_INT + if (!type) + type = 'I'; /* convert to int type */ +#else +#if SIZEOF_PTRDIFF_T == SIZEOF_LONG_INT + if (!type) + type = 'L'; /* convert to long type */ +#else +#if SIZEOF_PTRDIFF_T == SIZEOF_LLONG + if (!type) + type = 'Q'; /* convert to long long type */ +#else +error sizeof (ptrdiff_t) is unknown +#endif +#endif +#endif /* * XXX Future length modifiers: - * XXX 'z' size_t - * XXX 't' ptrdiff_t * XXX 'L' with double: long double */ getmode: - if (!strchr("udioxX", *(++fmt))) { + if (!strchr("udioxXn", *(++fmt))) { + /* + * %hhd -> char in decimal + */ if (type == 'H' && *fmt == 'h') { type = 'C'; goto getmode; @@ -331,13 +612,15 @@ #endif fmt--; mode = 'D'; - } else { + } else { /* One of "udioxXn": */ mode = *fmt; + if (mode == 'n') + goto gotn; if (mode != 'x') mode = to_cap(mode); if (mode == 'U') unsflag = TRUE; - else if (mode == 'I') /*XXX */ + else if (mode == 'I') /* XXX */ mode = 'D'; } break; @@ -358,16 +641,17 @@ case 'o': case 'O': case 'd': case 'D': case 'i': case 'I': - case 'z': case 'Z': + case 'Z': mode = to_cap(*fmt); havemode: if (!type) type = cap_ty(*fmt); #ifdef DEBUG -/*dbg_print("*fmt: '%c' mode: '%c' type: '%c'\n", *fmt, mode, type);*/ + dbg_print("*fmt: '%c' mode: '%c' type: '%c'\n", + *fmt, mode, type); #endif - if (mode == 'I') /*XXX kann entfallen*/ - mode = 'D'; /*wenn besseres uflg*/ + if (mode == 'I') /* XXX kann entfallen */ + mode = 'D'; /* wenn besseres uflg */ break; case 'p': mode = 'P'; @@ -396,33 +680,107 @@ #ifndef NO_FLOATINGPOINT case 'e': + case 'E': { + int signific; + if (fa.signific == -1) fa.signific = 6; + signific = fa.signific; + if (*fmt == 'E') + signific = -signific; + if (type == 'L') { +#ifdef HAVE_LONGDOUBLE + long double ldval = va_arg(args, long double); + +#if (defined(HAVE_QECVT) || defined(HAVE__LDECVT)) + qftoes(buf, ldval, 0, signific); + count += prbuf(buf, &fa); + continue; +#else + dval = ldval; +#endif +#endif + } dval = va_arg(args, double); - ftoes(buf, dval, 0, fa.signific); + ftoes(buf, dval, 0, signific); count += prbuf(buf, &fa); continue; + } case 'f': + case 'F': { + int signific; + if (fa.signific == -1) fa.signific = 6; + signific = fa.signific; + if (*fmt == 'F') + signific = -signific; + if (type == 'L') { +#ifdef HAVE_LONGDOUBLE + long double ldval = va_arg(args, long double); + +#if (defined(HAVE_QFCVT) || defined(HAVE__LDFCVT)) + qftofs(buf, ldval, 0, signific); + count += prbuf(buf, &fa); + continue; +#else + dval = ldval; +#endif +#endif + } dval = va_arg(args, double); - ftofs(buf, dval, 0, fa.signific); + ftofs(buf, dval, 0, signific); count += prbuf(buf, &fa); continue; + } case 'g': + case 'G': { if (fa.signific == -1) fa.signific = 6; if (fa.signific == 0) fa.signific = 1; + if (type == 'L') { +#ifdef HAVE_LONGDOUBLE + long double ldval = va_arg(args, long double); + +#if (defined(HAVE_QGCVT) || defined(HAVE__LDGCVT)) + +#ifdef HAVE__LDGCVT +#define qgcvt(ld, n, b) _ldgcvt(*(long_double *)&ld, n, b) +#endif + (void) qgcvt(ldval, fa.signific, buf); + if (*fmt == 'G') { + char *p = strchr(buf, 'e'); + + if (p) + *p = 'E'; + } + count += prbuf(buf, &fa); + continue; +#else + dval = ldval; +#endif +#endif + } dval = va_arg(args, double); - gcvt(dval, fa.signific, buf); + (void) gcvt(dval, fa.signific, buf); + if (*fmt == 'G') { + char *p = strchr(buf, 'e'); + + if (p) + *p = 'E'; + } count += prbuf(buf, &fa); continue; + } #else # ifdef USE_FLOATINGARGS case 'e': + case 'E': case 'f': + case 'F': case 'g': + case 'G': dval = va_arg(args, double); continue; # endif @@ -445,31 +803,64 @@ * It would be nice to have something like * __va_arg_list() in stdarg.h */ - count += format(fun, farg, rfmt, __va_arg_list(args)); + count += FORMAT_FUNC_NAME(FORMAT_FUNC_KR_ARGS + FARG, rfmt, __va_arg_list(args)); continue; + gotn: case 'n': - { + switch (type) { + + case 'C': { + signed char *cp = va_arg(args, signed char *); + + *cp = count; + } + continue; + case 'H': { + short *sp = va_arg(args, short *); + + *sp = count; + } + continue; + case 'L': { + long *lp = va_arg(args, long *); + + *lp = count; + } + continue; +#ifdef USE_LONGLONG + case 'J': /* For now Intmax_t is Llong */ + case 'Q': { + Llong *qp = va_arg(args, Llong *); + + *qp = count; + } + continue; +#endif + default: { int *ip = va_arg(args, int *); *ip = count; + } + continue; } - continue; default: /* Unknown '%' format */ sfmt++; /* Dont't print '%' */ count += fmt - sfmt; while (sfmt < fmt) - (*fun)(*(sfmt++), farg); + ofun(*(sfmt++), farg); if (*fmt == '\0') { fmt--; continue; } else { - (*fun)(*fmt, farg); + ofun(*fmt, farg); count++; continue; } } + } /* * print numbers: * first prepare type 'C'har, s'H'ort, 'I'nt, or 'L'ong @@ -515,6 +906,7 @@ break; #ifdef USE_LONGLONG case 'J': /* For now Intmax_t is Llong */ + type = 'Q'; /* use 'Q' for processing */ case 'Q': llval = va_arg(args, Llong); val = llval != 0; @@ -660,6 +1052,16 @@ fa.fillc = ' '; count += prbuf(fa.bufp, &fa); } +out: +#ifdef FORMAT_BUFFER + if (farg == &fa) { /* Top level call, flush buffer */ + if (fa.err) + return (EOF); + if ((fa.ptr != fa.iobuf) && + (filewrite(fa.fp, fa.iobuf, fa.ptr - fa.iobuf) < 0)) + return (EOF); + } +#endif return (count); } @@ -837,8 +1239,10 @@ { register int diff; register int rfillc; - register long arg = fa->farg; - register void (*fun) __PR((char, long)) = fa->outf; + register void *arg = fa->farg; +#ifdef FORMAT_FUNC_PARM + register void (*fun) __PR((char, void *)) = fa->outf; +#endif register int count; register int lzero = 0; @@ -856,28 +1260,28 @@ if (fa->prefixlen && fa->fillc != ' ') { while (*fa->prefix != '\0') - (*fun)(*fa->prefix++, arg); + ofun(*fa->prefix++, arg); } if (!fa->minusflag) { rfillc = fa->fillc; while (--diff >= 0) - (*fun)(rfillc, arg); + ofun(rfillc, arg); } if (fa->prefixlen && fa->fillc == ' ') { while (*fa->prefix != '\0') - (*fun)(*fa->prefix++, arg); + ofun(*fa->prefix++, arg); } if (lzero > 0) { rfillc = '0'; while (--lzero >= 0) - (*fun)(rfillc, arg); + ofun(rfillc, arg); } while (*s != '\0') - (*fun)(*s++, arg); + ofun(*s++, arg); if (fa->minusflag) { rfillc = ' '; while (--diff >= 0) - (*fun)(rfillc, arg); + ofun(rfillc, arg); } return (count); } @@ -901,8 +1305,10 @@ { register int diff; register int rfillc; - register long arg = fa->farg; - register void (*fun) __PR((char, long)) = fa->outf; + register void *arg = fa->farg; +#ifdef FORMAT_FUNC_PARM + register void (*fun) __PR((char, void *)) = fa->outf; +#endif register int count; count = 1; @@ -913,13 +1319,13 @@ if (!fa->minusflag) { rfillc = fa->fillc; while (--diff >= 0) - (*fun)(rfillc, arg); + ofun(rfillc, arg); } - (*fun)(c, arg); + ofun(c, arg); if (fa->minusflag) { rfillc = ' '; while (--diff >= 0) - (*fun)(rfillc, arg); + ofun(rfillc, arg); } return (count); } @@ -964,3 +1370,368 @@ write(STDERR_FILENO, ff, strlen(ff)); } #endif + +#ifdef USE_NL_ARGS +#ifdef FORMAT_IMPL +/* + * The following code is shared between format() and fprformat(). + */ + +/* + * Format argument types. + * As "char" and "short" type arguments are fetched as "int" + * we start with size "int" and ignore the 'h' modifier when + * parsing sizes. + */ +#define AT_NONE 0 +#define AT_INT 1 +#define AT_LONG 2 +#define AT_LONG_LONG 3 +#define AT_DOUBLE 4 +#define AT_LONG_DOUBLE 5 +#define AT_VOID_PTR 6 +#define AT_CHAR_PTR 7 +#define AT_SHORT_PTR 8 +#define AT_INT_PTR 9 +#define AT_LONG_PTR 10 +#define AT_LONG_LONG_PTR 11 +#define AT_R_FMT 12 +#define AT_R_VA_LIST 13 +#define AT_BOUNDS 14 + +#define AF_NONE 0 +#define AF_LONG 1 +#define AF_LONG_LONG 2 +#define AF_LONG_DOUBLE 4 +#define AF_STAR 8 + +static const char skips[] = "+- #'.$h1234567890"; +static const char *digits = &skips[8]; + +/* + * Parse the format string and store the first FMT_ARGMAX args in the arglist + * parameter. + * + * This is done in two stages: + * 1 parse the format string and store the types in argtypes[]. + * 2 use the type list in argtypes[], fetch the args in order and + * store the related va_list state in arglist[] + */ +EXPORT void +_fmtarglist(fmt, fargs, arglist) + const char *fmt; + va_lists_t fargs; + va_lists_t arglist[]; +{ + int i; + int argindex; + int maxindex; + int thistype; + int thisflag; + int argtypes[FMT_ARGMAX+1]; + + for (i = 0; i < FMT_ARGMAX; i++) + argtypes[i] = AT_NONE; + + maxindex = -1; + argindex = 0; + while ((fmt = strchr(fmt, '%')) != NULL) { + fmt++; + i = strspn(fmt, digits); + if (fmt[i] == '$') { + int c; + + argindex = *fmt++ - '0'; + while (c = *fmt, is_dig(c)) { + argindex *= 10; + argindex += c - '0'; + fmt++; + } + argindex -= 1; + } + thistype = AT_NONE; + thisflag = AF_NONE; + newarg: + fmt += strspn(fmt, skips); + switch (*fmt++) { + + case '%': /* %% format no arg */ + continue; + + case 'l': + if (thisflag & AF_LONG) { + thisflag |= AF_LONG_LONG; + } else { + thisflag |= AF_LONG; + } + goto newarg; + case 'j': /* intmax_t for now is long long */ + thisflag |= AF_LONG_LONG; + goto newarg; + case 'z': /* size_t */ +#if SIZEOF_SIZE_T == SIZEOF_INT + if (thistype == AT_NONE) + thistype = AT_INT; +#else +#if SIZEOF_SIZE_T == SIZEOF_LONG_INT + if (thistype == AT_NONE) + thistype = AT_LONG; +#else +#if SIZEOF_SIZE_T == SIZEOF_LLONG + if (thistype == AT_NONE) + thistype = AT_LONG_LONG; +#else +error sizeof (size_t) is unknown +#endif +#endif +#endif + goto newarg; + case 't': /* ptrdiff_t */ +#if SIZEOF_PTRDIFF_T == SIZEOF_INT + if (thistype == AT_NONE) + thistype = AT_INT; +#else +#if SIZEOF_PTRDIFF_T == SIZEOF_LONG_INT + if (thistype == AT_NONE) + thistype = AT_LONG; +#else +#if SIZEOF_PTRDIFF_T == SIZEOF_LLONG + if (thistype == AT_NONE) + thistype = AT_LONG_LONG; +#else +error sizeof (ptrdiff_t) is unknown +#endif +#endif +#endif + goto newarg; +#ifndef NO_UCSIL + /* + * Enhancements to K&R and ANSI: + * + * got a type specifyer + * + * XXX 'S' in C99 is %ls, 'S' should become 'H' + */ + case 'U': + if (!strchr("CSILZODX", *fmt)) { + /* + * Got only 'U'nsigned specifyer, + * use default type and mode. + */ + thistype = AT_INT; + break; + } + if (!strchr("CSIL", *fmt)) { + /* + * Got 'U' and ZODX. + * no type, use default + */ + thistype = AT_INT; + fmt++; /* Skip ZODX */ + break; + } + fmt++; /* Unsigned, skip 'U', get CSIL */ + /* FALLTHRU */ + case 'C': + case 'S': + case 'I': + case 'L': + fmt--; /* Undo fmt++ from switch() */ + { + /* + * got CSIL type + */ + int type = *fmt++; /* Undo above fmt-- */ + int mode = *fmt; + if (!strchr("ZODX", mode)) { + /* + * Check long double "Le", "Lf" or "Lg" + */ + if (type == 'L' && + (mode == 'e' || + mode == 'f' || + mode == 'g')) { + thisflag |= AF_LONG_DOUBLE; + goto newarg; + } + } else { + fmt++; /* Skip ZODX */ + } + if (type == 'L') + thistype = AT_LONG; + else + thistype = AT_INT; + } + break; +#else + case 'L': + thisflag |= AF_LONG_DOUBLE; + goto newarg; +#endif + + case 'e': + case 'E': + case 'f': + case 'F': + case 'g': + case 'G': + if (thisflag & AF_LONG_DOUBLE) + thistype = AT_LONG_DOUBLE; + else + thistype = AT_DOUBLE; + break; + + case 'p': + thistype = AT_VOID_PTR; + break; + case 's': + thistype = AT_CHAR_PTR; + break; + case 'b': + thistype = AT_BOUNDS; + break; + case 'n': + if (thisflag & AF_LONG_LONG) + thistype = AT_LONG_LONG_PTR; + else if (thistype & AF_LONG) + thistype = AT_LONG_PTR; + else + thistype = AT_INT_PTR; + break; + case 'r': + thistype = AT_R_FMT; + break; + default: + if (thistype == AT_NONE) { + if (thisflag & AF_LONG_LONG) + thistype = AT_LONG_LONG; + else if (thistype & AF_LONG) + thistype = AT_LONG; + else + thistype = AT_INT; + } + break; + + case '*': + if (is_dig(*fmt)) { + int c; + int starindex; + + starindex = *fmt++ - '0'; + while (c = *fmt, is_dig(c)) { + starindex *= 10; + starindex += c - '0'; + fmt++; + } + starindex -= 1; + if (starindex >= 0 && starindex < FMT_ARGMAX) { + argtypes[starindex] = AT_INT; + if (starindex > maxindex) + maxindex = starindex; + } + goto newarg; + } + thistype = AT_INT; + thisflag |= AF_STAR; /* Make sure to rescan for type */ + break; + } + if (argindex >= 0 && argindex < FMT_ARGMAX) { + argtypes[argindex] = thistype; + if (thistype == AT_R_FMT) + argtypes[++argindex] = AT_R_VA_LIST; + else if (thistype == AT_BOUNDS) + argtypes[++argindex] = AT_INT; + + if (argindex > maxindex) + maxindex = argindex; + } + ++argindex; /* Default to next arg in list */ + if (thisflag & AF_STAR) { /* Found '*', continue for type */ + thisflag &= ~AF_STAR; + goto newarg; + } + } + + for (i = 0; i <= maxindex; i++) { /* Do not fetch more args than known */ + arglist[i] = fargs; /* Save state before fetching this */ + + switch (argtypes[i]) { + + default: + /* FALLTHRU */ + case AT_NONE: /* This matches '*' args */ + /* FALLTHRU */ + case AT_INT: + (void) va_arg(fargs.ap, int); + break; + case AT_LONG: + (void) va_arg(fargs.ap, long); + break; + case AT_LONG_LONG: + (void) va_arg(fargs.ap, Llong); + break; + case AT_DOUBLE: + (void) va_arg(fargs.ap, double); + break; + case AT_LONG_DOUBLE: +#ifdef HAVE_LONGDOUBLE + (void) va_arg(fargs.ap, long double); +#endif + break; + case AT_VOID_PTR: + (void) va_arg(fargs.ap, void *); + break; + case AT_CHAR_PTR: + (void) va_arg(fargs.ap, char *); + break; + case AT_SHORT_PTR: + (void) va_arg(fargs.ap, short *); + break; + case AT_INT_PTR: + (void) va_arg(fargs.ap, int *); + break; + case AT_LONG_PTR: + (void) va_arg(fargs.ap, long *); + break; + case AT_LONG_LONG_PTR: + (void) va_arg(fargs.ap, Llong *); + break; + case AT_R_FMT: + (void) va_arg(fargs.ap, char *); + arglist[++i] = fargs; + (void) __va_arg_list(fargs.ap); + break; + case AT_R_VA_LIST: + break; + case AT_BOUNDS: + (void) va_arg(fargs.ap, char *); + arglist[++i] = fargs; + (void) va_arg(fargs.ap, int); + break; + } + } +} + +/* + * In case that the format references an argument > FMT_ARGMAX, we use this + * implementation. It is slow (n*n - where n is (argno - FMT_ARGMAX)). + * Fortunately, it is most unlikely that there are more positional args than + * the current FMT_ARGMAX definition of 30. + */ +EXPORT void +_fmtgetarg(fmt, num, fargs) + const char *fmt; + int num; + va_lists_t *fargs; +{ + const char *sfmt = fmt; + int i; + + /* + * Hacky preliminary support for all int type args bejond FMT_ARGMAX. + */ + for (i = FMT_ARGMAX; i < num; i++) + (void) va_arg((*fargs).ap, int); +} +#endif /* FORMAT_IMPL */ +#endif /* USE_NL_ARGS */ diff -Nru cdrtools-2.01.01a33/libschily/format.mk3 cdrtools-3.02a09/libschily/format.mk3 --- cdrtools-2.01.01a33/libschily/format.mk3 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/libschily/format.mk3 2015-04-26 18:01:43.000000000 +0000 @@ -0,0 +1,18 @@ +#ident @(#)format.mk3 1.1 15/04/26 +########################################################################### +# Sample makefile for installing manual pages +########################################################################### +SRCROOT= .. +RULESDIR= RULES +include $(SRCROOT)/$(RULESDIR)/rules.top +########################################################################### + +MANDIR= man +TARGETMAN= format +MANSECT= $(MANSECT_LIB) +MANSUFFIX= $(MANSUFF_LIB) +MANFILE= format.3 + +########################################################################### +include $(SRCROOT)/$(RULESDIR)/rules.man +########################################################################### diff -Nru cdrtools-2.01.01a33/libschily/fpipe.3 cdrtools-3.02a09/libschily/fpipe.3 --- cdrtools-2.01.01a33/libschily/fpipe.3 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/libschily/fpipe.3 1988-07-21 16:07:51.000000000 +0000 @@ -0,0 +1,37 @@ +. \" Manual Seite fuer fpipe +. \" @(#)fpipe.3 1.1 +. \" +.if t .ds a \v'-0.55m'\h'0.00n'\z.\h'0.40n'\z.\v'0.55m'\h'-0.40n'a +.if t .ds o \v'-0.55m'\h'0.00n'\z.\h'0.45n'\z.\v'0.55m'\h'-0.45n'o +.if t .ds u \v'-0.55m'\h'0.00n'\z.\h'0.40n'\z.\v'0.55m'\h'-0.40n'u +.if t .ds A \v'-0.77m'\h'0.25n'\z.\h'0.45n'\z.\v'0.77m'\h'-0.70n'A +.if t .ds O \v'-0.77m'\h'0.25n'\z.\h'0.45n'\z.\v'0.77m'\h'-0.70n'O +.if t .ds U \v'-0.77m'\h'0.30n'\z.\h'0.45n'\z.\v'0.77m'\h'-.75n'U +.if t .ds s \(*b +.if t .ds S SS +.if n .ds a ae +.if n .ds o oe +.if n .ds u ue +.if n .ds s sz +.TH FPIPE 3 "15. Juli 1988" "J\*org Schilling" "Schily\'s LIBRARY FUNCTIONS" +.SH NAME +fpipe() \- sets up a two ended pipe +.SH SYNOPSIS +.nf +.B +int fpipe(pp) +.B FILE *pp[2]; +.fi +.SH DESCRIPTION +fpipe() sets up a two ended pipe: +.TP +.B pp[0] +is set to a FILE open for reading. +.TP +.B pp[1] +is open for writing. +.SH RETURNS +NULL a pipe could not be created. +other completed successfully. +.SH NOTES +none diff -Nru cdrtools-2.01.01a33/libschily/fpipe.mk3 cdrtools-3.02a09/libschily/fpipe.mk3 --- cdrtools-2.01.01a33/libschily/fpipe.mk3 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/libschily/fpipe.mk3 2015-04-26 18:01:43.000000000 +0000 @@ -0,0 +1,18 @@ +#ident @(#)fpipe.mk3 1.1 15/04/26 +########################################################################### +# Sample makefile for installing manual pages +########################################################################### +SRCROOT= .. +RULESDIR= RULES +include $(SRCROOT)/$(RULESDIR)/rules.top +########################################################################### + +MANDIR= man +TARGETMAN= fpipe +MANSECT= $(MANSECT_LIB) +MANSUFFIX= $(MANSUFF_LIB) +MANFILE= fpipe.3 + +########################################################################### +include $(SRCROOT)/$(RULESDIR)/rules.man +########################################################################### diff -Nru cdrtools-2.01.01a33/libschily/fprformat.c cdrtools-3.02a09/libschily/fprformat.c --- cdrtools-2.01.01a33/libschily/fprformat.c 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/libschily/fprformat.c 2016-01-18 21:48:11.000000000 +0000 @@ -0,0 +1,62 @@ +/* @(#)fprformat.c 1.4 16/01/18 Copyright 2013-2016 J. Schilling */ +/* + * fprformat + * common code for printf fprintf & sprintf + * This is the variant that uses stdio und directly calls putc. + * If putc() is a FILE * derived macro, then a printf() based on this + * variant is faster than a format() based printf that needs to call a + * function for every character in the output. + * + * allows recursive printf with "%r", used in: + * error, comerr, comerrno, errmsg, errmsgno and the like + * + * Copyright (c) 2013-2016 J. Schilling + */ +/* + * The contents of this file are subject to the terms of the + * Common Development and Distribution License, Version 1.0 only + * (the "License"). You may not use this file except in compliance + * with the License. + * + * See the file CDDL.Schily.txt in this distribution for details. + * A copy of the CDDL is also available via the Internet at + * http://www.opensource.org/licenses/cddl1.txt + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file CDDL.Schily.txt from this distribution. + */ + +#include +#include +#include +#include +#ifdef DEBUG +#include +#endif +#include +#include +#define __EXTENSIONS__ /* Enable putc_unlocked() macro on Solaris */ +#define FAST_GETC_PUTC /* Enable stdio extensions in schily/stdio.h */ +#include +#include /* Must be past stdio.h */ + +#define FORMAT_FUNC_NAME fprformat +#define FORMAT_FUNC_PROTO_DECL +#define FORMAT_FUNC_KR_DECL +#define FORMAT_FUNC_KR_ARGS +#undef FORMAT_FUNC_PARM +#ifdef HAVE_PUTC_UNLOCKED +#define ofun(c, fp) putc_unlocked(c, (FILE *)fp) +#else +#define ofun(c, fp) putc(c, (FILE *)fp) +#endif + +/* + * If enabled, an internally buffered version of fprformat() is implemented + * that avoids completely unbuffered printing on onubuffered FILE pointers. + * This is 15% slower than the version that directly calls putc_unlocked() + * but it works on any OS. + */ +#define FORMAT_BUFFER + +#include "format.c" diff -Nru cdrtools-2.01.01a33/libschily/fprintf.3 cdrtools-3.02a09/libschily/fprintf.3 --- cdrtools-2.01.01a33/libschily/fprintf.3 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/libschily/fprintf.3 1988-07-22 13:53:05.000000000 +0000 @@ -0,0 +1,37 @@ +. \" Manual Seite fuer fprintf +. \" @(#)fprintf.3 1.1 +. \" +.if t .ds a \v'-0.55m'\h'0.00n'\z.\h'0.40n'\z.\v'0.55m'\h'-0.40n'a +.if t .ds o \v'-0.55m'\h'0.00n'\z.\h'0.45n'\z.\v'0.55m'\h'-0.45n'o +.if t .ds u \v'-0.55m'\h'0.00n'\z.\h'0.40n'\z.\v'0.55m'\h'-0.40n'u +.if t .ds A \v'-0.77m'\h'0.25n'\z.\h'0.45n'\z.\v'0.77m'\h'-0.70n'A +.if t .ds O \v'-0.77m'\h'0.25n'\z.\h'0.45n'\z.\v'0.77m'\h'-0.70n'O +.if t .ds U \v'-0.77m'\h'0.30n'\z.\h'0.45n'\z.\v'0.77m'\h'-.75n'U +.if t .ds s \(*b +.if t .ds S SS +.if n .ds a ae +.if n .ds o oe +.if n .ds u ue +.if n .ds s sz +.TH FPRINTF 3 "15. Juli 1988" "J\*org Schilling" "Schily\'s LIBRARY FUNCTIONS" +.SH NAME +fprintf() \- formats and prints to a file +.SH SYNOPSIS +.nf +.B +fprintf(file, format, arg1, \|.\|.\|., argn) +.B FILE *file; +.B char *format; +.fi +.SH DESCRIPTION +fprintf formats its arguments using the format() routine, and +writes the result on the given file. +.PP +See format() for information about the available formatting +options. +.SH RETURNS +none +.SH "SEE ALSO" +format(3), printf(3) +.SH NOTES +none diff -Nru cdrtools-2.01.01a33/libschily/fprintf.mk3 cdrtools-3.02a09/libschily/fprintf.mk3 --- cdrtools-2.01.01a33/libschily/fprintf.mk3 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/libschily/fprintf.mk3 2015-04-26 18:01:43.000000000 +0000 @@ -0,0 +1,18 @@ +#ident @(#)fprintf.mk3 1.1 15/04/26 +########################################################################### +# Sample makefile for installing manual pages +########################################################################### +SRCROOT= .. +RULESDIR= RULES +include $(SRCROOT)/$(RULESDIR)/rules.top +########################################################################### + +MANDIR= man +TARGETMAN= fprintf +MANSECT= $(MANSECT_LIB) +MANSUFFIX= $(MANSUFF_LIB) +MANFILE= fprintf.3 + +########################################################################### +include $(SRCROOT)/$(RULESDIR)/rules.man +########################################################################### diff -Nru cdrtools-2.01.01a33/libschily/fstatat.c cdrtools-3.02a09/libschily/fstatat.c --- cdrtools-2.01.01a33/libschily/fstatat.c 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/libschily/fstatat.c 2013-10-30 22:54:18.000000000 +0000 @@ -0,0 +1,63 @@ +/* @(#)fstatat.c 1.2 13/10/30 Copyright 2013 J. Schilling */ +/* + * Emulate the behavior of fstatat(int fd, const char *name, + * struct stat *sbuf, int flag) + * + * Note that emulation methods that do not use the /proc filesystem are + * not MT safe. In the non-MT-safe case, we do: + * + * savewd()/fchdir()/open(name)/restorewd() + * + * Errors may force us to abort the program as our caller is not expected + * to know that we do more than a simple open() here and that the + * working directory may be changed by us. + * + * Copyright (c) 2013 J. Schilling + */ +/* + * The contents of this file are subject to the terms of the + * Common Development and Distribution License, Version 1.0 only + * (the "License"). You may not use this file except in compliance + * with the License. + * + * See the file CDDL.Schily.txt in this distribution for details. + * A copy of the CDDL is also available via the Internet at + * http://www.opensource.org/licenses/cddl1.txt + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file CDDL.Schily.txt from this distribution. + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include "at-defs.h" + +#ifndef HAVE_FSTATAT + +#ifndef HAVE_LSTAT +#define lstat stat +#endif + +/* CSTYLED */ +#define PROTO_DECL , struct stat *sbuf, int flag +#define KR_DECL struct stat *sbuf; int flag; +/* CSTYLED */ +#define KR_ARGS , sbuf, flag +#define FUNC_CALL(n) (flag & AT_SYMLINK_NOFOLLOW ? \ + lstat(n, sbuf) : stat(n, sbuf)) +#define FLAG_CHECK() if (flag & ~(AT_SYMLINK_NOFOLLOW|_AT_TRIGGER)) { \ + seterrno(EINVAL); \ + return (-1); \ + } +#define FUNC_NAME fstatat +#define FUNC_RESULT int + +#include "at-base.c" + +#endif /* HAVE_FSTATAT */ diff -Nru cdrtools-2.01.01a33/libschily/fstream.c cdrtools-3.02a09/libschily/fstream.c --- cdrtools-2.01.01a33/libschily/fstream.c 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/libschily/fstream.c 2017-10-21 18:52:34.000000000 +0000 @@ -0,0 +1,325 @@ +/* @(#)fstream.c 1.32 17/10/21 Copyright 1985-2017 J. Schilling */ +#include +#ifndef lint +static UConst char sccsid[] = + "@(#)fstream.c 1.32 17/10/21 Copyright 1985-2017 J. Schilling"; +#endif +/* + * Stream filter module + * + * Copyright (c) 1985-2017 J. Schilling + * + * Exported functions: + * mkfstream(f, fun, rfun, efun) Construct new fstream + * fsclose(fsp) Close a fstream + * fssetfile(fsp, f) Replace file pointer in fstream + * fsgetc(fsp) Get one character from fstream + * fspushcha(fsp, c) Push one character on fstream + * fspushstr(fsp, str) Push a string on fstream + */ +/* + * The contents of this file are subject to the terms of the + * Common Development and Distribution License, Version 1.0 only + * (the "License"). You may not use this file except in compliance + * with the License. + * + * See the file CDDL.Schily.txt in this distribution for details. + * A copy of the CDDL is also available via the Internet at + * http://www.opensource.org/licenses/cddl1.txt + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file CDDL.Schily.txt from this distribution. + */ + +#define WSTRINGS +#include +#include +#include +#include +#include +#include + +EXPORT fstream *mkfstream __PR((FILE *f, fstr_fun sfun, fstr_rfun rfun, + fstr_efun efun)); +EXPORT fstream *fspush __PR((fstream *fsp, fstr_efun efun)); +EXPORT fstream *fspop __PR((fstream *fsp)); +EXPORT fstream *fspushed __PR((fstream *fsp)); +EXPORT void fsclose __PR((fstream *fsp)); +EXPORT FILE *fssetfile __PR((fstream *fsp, FILE *f)); +EXPORT int fsgetc __PR((fstream *fsp)); +EXPORT void fspushstr __PR((fstream *fsp, char *ss)); +EXPORT void fspushcha __PR((fstream *fsp, int c)); +LOCAL void s_ccpy __PR((CHAR *ts, unsigned char *ss)); +LOCAL void s_scpy __PR((CHAR *ts, CHAR *ss)); +LOCAL void s_scat __PR((CHAR *ts, CHAR *ss)); + +/* + * Set up a new stream + */ +EXPORT fstream * +mkfstream(f, sfun, rfun, efun) + FILE *f; /* The "file" parameter may be a fstream * */ + fstr_fun sfun; /* The fstream transfer/filter function */ + fstr_rfun rfun; /* The read/input function */ + fstr_efun efun; /* The error function used by this func */ +{ + register fstream *fsp; + + if ((fsp = (fstream *)malloc(sizeof (fstream))) == (fstream *)NULL) { + if (efun) + efun("no memory for new fstream"); + return ((fstream *)NULL); + } + fsp->fstr_bp = fsp->fstr_buf = fsp->fstr_sbuf; + *fsp->fstr_bp = '\0'; + fsp->fstr_file = f; + fsp->fstr_flags = 0; + fsp->fstr_pushed = (fstream *)0; + fsp->fstr_func = sfun; + fsp->fstr_rfunc = rfun; + return (fsp); +} + +/* + * Push a new stream + */ +EXPORT fstream * +fspush(fsp, efun) + fstream *fsp; + fstr_efun efun; /* The error function used by this func */ +{ + fstream *new = mkfstream((FILE *)0, (fstr_fun)0, (fstr_rfun)0, efun); + + if (new == (fstream *)NULL) + return (new); + + new->fstr_pushed = fsp->fstr_pushed; + fsp->fstr_pushed = new; + return (new); +} + +/* + * Pop a stream + */ +EXPORT fstream * +fspop(fsp) + fstream *fsp; +{ + fstream *prev = fsp->fstr_pushed; + + if (prev == (fstream *)NULL) + return (prev); + + fsp->fstr_pushed = prev->fstr_pushed; + fsclose(prev); + + return (fsp); +} + +/* + * Return pushed stream + */ +EXPORT fstream * +fspushed(fsp) + fstream *fsp; +{ + return (fsp->fstr_pushed); +} + +/* + * close the stream + * Do not close the file fsp->fstr_file! + */ +EXPORT void +fsclose(fsp) + fstream *fsp; +{ + if (fsp->fstr_buf != fsp->fstr_sbuf) + free(fsp->fstr_buf); + free((char *)fsp); +} + +/* + * Change the FILE * member of the stream. + */ +EXPORT FILE * +fssetfile(fsp, f) + register fstream *fsp; + FILE *f; +{ + FILE *tmp = fsp->fstr_file; + + fsp->fstr_file = f; + return (tmp); +} + +/* + * get nect character from stream + */ +EXPORT int +fsgetc(fsp) + register fstream *fsp; +{ + /* + * If there are pushed streams, refer to the top of pushed streams. + */ + if (fsp->fstr_pushed != NULL) + fsp = fsp->fstr_pushed; + /* + * If our buffer is non-empty, "read" from the buffer. + */ + while (*fsp->fstr_bp == '\0') { /* buffer is empty */ + if (fsp->fstr_func != (fstr_fun)0) { /* call function */ + int ret; + + /* + * We have a filter function, so call it. + */ + if ((ret = (*fsp->fstr_func)(fsp, fsp->fstr_file)) < 0) + return (ret); + } else if (fsp->fstr_file == (FILE *)NULL) { /* no file */ + /* + * If we have no input, return EOF. + */ + return (EOF); + } else { /* read from FILE */ +#ifdef DEBUG + printf("read character from file at %06x\n", fsp->fstr_file); +#endif + if (fsp->fstr_rfunc != (fstr_rfun)0) + return ((*fsp->fstr_rfunc)(fsp)); + return (EOF); + } + } +#ifdef DEBUG + printf("character '%c' from buffer\n", *fsp->fstr_bp); +#endif + return (*fsp->fstr_bp++); /* char from buffer */ +} + +/* + * Push a null terminated string on the stream + */ +EXPORT void +fspushstr(fsp, ss) + register fstream *fsp; + register char *ss; +{ + register CHAR *tp; + CHAR *ts; + CHAR tbuf[STR_SBUF_SIZE + 1]; + unsigned len; + + /* + * If there are pushed streams, refer to the top of pushed streams. + */ + if (fsp->fstr_pushed != NULL) + fsp = fsp->fstr_pushed; + + for (tp = fsp->fstr_bp; *tp; tp++); /* Wide char strlen() */ + len = tp - fsp->fstr_bp + strlen(ss); + if (len > STR_SBUF_SIZE) { /* realloc !!! */ + if ((ts = (CHAR *)malloc(sizeof (*ts)*(len+1))) == NULL) + raisecond("fspushstr", (long)NULL); +#ifdef WSTRINGS + s_ccpy(ts, (unsigned char *)ss); + s_scat(ts, fsp->fstr_bp); +#else + strcatl(ts, ss, fsp->fstr_bp, (char *)NULL); +#endif + if (fsp->fstr_buf != fsp->fstr_sbuf) + free(fsp->fstr_buf); + fsp->fstr_buf = fsp->fstr_bp = ts; + } else { +#ifdef WSTRINGS + s_scpy(tbuf, fsp->fstr_bp); +#else + strcatl(tbuf, fsp->fstr_bp, (char *)NULL); +#endif + if (fsp->fstr_buf != fsp->fstr_sbuf) { + free(fsp->fstr_buf); + fsp->fstr_buf = fsp->fstr_sbuf; + } +#ifdef WSTRINGS + s_ccpy(fsp->fstr_buf, (unsigned char *)ss); + s_scat(fsp->fstr_buf, tbuf); +#else + strcatl(fsp->fstr_buf, ss, tbuf, (char *)NULL); +#endif + fsp->fstr_bp = fsp->fstr_buf; + } +} + +/* + * Push a character on the stream + */ +EXPORT void +fspushcha(fsp, c) + fstream *fsp; + int c; +{ + char t[2]; + + t[0] = (char)c; + t[1] = 0; + fspushstr(fsp, t); +#ifdef WSTRINGS + /* + * Solange es kein fspushstr mit SHORT * gibt, wird zuerst Platz + * geschafft und dann der korrekte Buchstabe eingetragen. + */ + *fsp->fstr_bp = c; +#endif +} + +/* + * Copy from narrow char string to wide char string + */ +LOCAL void +s_ccpy(ts, ss) + register CHAR *ts; + register unsigned char *ss; +{ + while (*ss) + *ts++ = *ss++; + *ts = 0; +} + +/* + * Copy from wide char string to wide char string + */ +LOCAL void +s_scpy(ts, ss) + register CHAR *ts; + register CHAR *ss; +{ + while (*ss) + *ts++ = *ss++; + *ts = 0; +} + +#ifdef __needed__ +LOCAL void +s_ccat(ts, ss) + register string ts; + register unsigned char *ss; +{ + while (*ts) + ts++; + while (*ss) + *ts++ = *ss++; + *ts = 0; +} +#endif + +LOCAL void +s_scat(ts, ss) + register CHAR *ts; + register CHAR *ss; +{ + while (*ts) + ts++; + while (*ss) + *ts++ = *ss++; + *ts = 0; +} diff -Nru cdrtools-2.01.01a33/libschily/futimens.c cdrtools-3.02a09/libschily/futimens.c --- cdrtools-2.01.01a33/libschily/futimens.c 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/libschily/futimens.c 2014-05-01 13:50:44.000000000 +0000 @@ -0,0 +1,78 @@ +/* @(#)futimens.c 1.3 14/05/01 Copyright 2013-2014 J. Schilling */ +/* + * Emulate the behavior of futimens(int fd, + * const struct timespec times[2]) + * + * Copyright (c) 2013-2014 J. Schilling + */ +/* + * The contents of this file are subject to the terms of the + * Common Development and Distribution License, Version 1.0 only + * (the "License"). You may not use this file except in compliance + * with the License. + * + * See the file CDDL.Schily.txt in this distribution for details. + * A copy of the CDDL is also available via the Internet at + * http://www.opensource.org/licenses/cddl1.txt + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file CDDL.Schily.txt from this distribution. + */ + +#include +#include +#include +#include +#include +#include +#include +#include + +#ifndef HAVE_FUTIMENS + +EXPORT int +futimens(fd, times) + int fd; + const struct timespec times[2]; +{ +#if defined(HAVE_UTIMENSAT) && defined(sun) + /* + * The support for path == NULL is Sun specific. + */ + return (utimensat(fd, NULL, times, 0)); +#else +#ifdef HAVE_FUTIMESAT /* Sun specific */ + struct timeval tv[2]; + + if (times == NULL) + return (futimesat(fd, NULL, NULL)); + tv[0].tv_sec = times[0].tv_sec; + tv[0].tv_usec = times[0].tv_nsec/1000; + tv[1].tv_sec = times[1].tv_sec; + tv[1].tv_usec = times[1].tv_nsec/1000; + return (futimesat(fd, NULL, tv)); +#else +#ifdef HAVE_FUTIMES /* BSD specific */ + struct timeval tv[2]; + + if (times == NULL) + return (futimes(fd, NULL)); + tv[0].tv_sec = times[0].tv_sec; + tv[0].tv_usec = times[0].tv_nsec/1000; + tv[1].tv_sec = times[1].tv_sec; + tv[1].tv_usec = times[1].tv_nsec/1000; + return (futimes(fd, tv)); + +#else +#ifdef ENOSYS + seterrno(ENOSYS); +#else + seterrno(EINVAL); +#endif + return (-1); +#endif +#endif +#endif +} + +#endif /* HAVE_FUTIMENS */ diff -Nru cdrtools-2.01.01a33/libschily/futimesat.c cdrtools-3.02a09/libschily/futimesat.c --- cdrtools-2.01.01a33/libschily/futimesat.c 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/libschily/futimesat.c 2013-10-30 22:54:18.000000000 +0000 @@ -0,0 +1,55 @@ +/* @(#)futimesat.c 1.2 13/10/30 Copyright 2013 J. Schilling */ +/* + * Emulate the behavior of futimesat(int fd, const char *name, + * const struct timeval times[2]) + * + * Note that emulation methods that do not use the /proc filesystem are + * not MT safe. In the non-MT-safe case, we do: + * + * savewd()/fchdir()/open(name)/restorewd() + * + * Errors may force us to abort the program as our caller is not expected + * to know that we do more than a simple open() here and that the + * working directory may be changed by us. + * + * Copyright (c) 2013 J. Schilling + */ +/* + * The contents of this file are subject to the terms of the + * Common Development and Distribution License, Version 1.0 only + * (the "License"). You may not use this file except in compliance + * with the License. + * + * See the file CDDL.Schily.txt in this distribution for details. + * A copy of the CDDL is also available via the Internet at + * http://www.opensource.org/licenses/cddl1.txt + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file CDDL.Schily.txt from this distribution. + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include "at-defs.h" + +#ifndef HAVE_FUTIMESAT + +/* CSTYLED */ +#define PROTO_DECL , const struct timeval times[2] +#define KR_DECL const struct timeval times[2]; +/* CSTYLED */ +#define KR_ARGS , times +#define FUNC_CALL(n) utimes(n, times) +#define FLAG_CHECK() +#define FUNC_NAME futimesat +#define FUNC_RESULT int + +#include "at-base.c" + +#endif /* HAVE_FUTIMESAT */ diff -Nru cdrtools-2.01.01a33/libschily/getallargs.3 cdrtools-3.02a09/libschily/getallargs.3 --- cdrtools-2.01.01a33/libschily/getallargs.3 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/libschily/getallargs.3 2016-10-12 23:19:01.000000000 +0000 @@ -0,0 +1,142 @@ +. \" Manual Seite fuer getallargs +. \" @(#)getallargs.3 1.4 16/10/13 Copyright 1985 J. Schilling +. \" +.if t .ds a \v'-0.55m'\h'0.00n'\z.\h'0.40n'\z.\v'0.55m'\h'-0.40n'a +.if t .ds o \v'-0.55m'\h'0.00n'\z.\h'0.45n'\z.\v'0.55m'\h'-0.45n'o +.if t .ds u \v'-0.55m'\h'0.00n'\z.\h'0.40n'\z.\v'0.55m'\h'-0.40n'u +.if t .ds A \v'-0.77m'\h'0.25n'\z.\h'0.45n'\z.\v'0.77m'\h'-0.70n'A +.if t .ds O \v'-0.77m'\h'0.25n'\z.\h'0.45n'\z.\v'0.77m'\h'-0.70n'O +.if t .ds U \v'-0.77m'\h'0.30n'\z.\h'0.45n'\z.\v'0.77m'\h'-.75n'U +.if t .ds s \(*b +.if t .ds S SS +.if n .ds a ae +.if n .ds o oe +.if n .ds u ue +.if n .ds s sz +.TH GETALLARGS 3 "15. Juli 1988" "J\*org Schilling" "Schily\'s LIBRARY FUNCTIONS" +.SH NAME +getallargs() \- parses all the flag-type arguments +.SH SYNOPSIS +.nf +#include + +.B +int getallargs(pac, pav, fmt, a1, \|.\|.\|., an) +.B + int *pac; /* pointer to arg count */ +.B + char *(*pav)[]; /* pointer to address of arg vector */ +.B + char *fmt; /* format string */ +.B + type *a1; /* pointer to result 1 */ +.B + /* (corresponding to the */ +.B + /* first descriptor in fmt) */ +.B + type *an; /* pointer to result n */ +.B + /* (corresponding to the */ +.B + /* nth descriptor in fmt) */ +.fi +.SH DESCRIPTION +.BR getallargs () +parses all flag (option) arguments (anywhere on the command line). +It does not return until all the arguments have been parsed +correctly (returning 0), or an error has occurred (returning < +0). +.PP +See +.BR getargs () +for a more detailed description of the parameter +matching. +.SH RETURNS +.TP 14 +.B NOARGS\ \ \ \ 0 +All arguments have been successfully examined. +.TP +.B BADFLAG\ \ \-1 +A bad flag (option) argument was supplied to the program. +The argument +.B *pav +contains the offending command line argument. +.TP +.B BADFMT\ \ \-2 +A bad format descriptor string has been detected. +The calling program, rather than the user, was in error. +.LP +General rules for the return code: +.TP 14 +.B >\ 0 +A file type argument was found. +.TP +.B \ \ 0 +All arguments have been parsed. +.TP +.B <\ 0 +An error occured or not a file type argument. +.LP +Flag and file arg processing should be terminated after getting a +return code <= 0. + +.SH EXAMPLES + +.SH "SEE ALSO" +.nh +.sp +.LP +.BR getargs (3), +.BR getargerror (3), +.BR getfiles (3). + +.SH NOTES +.BR getallargs () +must be called with the address of a count of items +in the vector and the address of a pointer to the vector. Both +addresses must already have been properly treated in order to +skip over the first parameter which is the name of the program. +[e.g. +.BR "\-\-ac; ++av" ]. +.PP +Since +.BR getallargs () +will destroy these values, copies should be +made for later use in the program. If an error occurs, +.B av[0] +points to the unmatched argument. +.PP +The special argument, +.B +"\-\-"\fP, +is ignored, but the following +argument in the command line is treated as a literal filename +argument. This way, filenames beginning with +.RB ' \- ', +.RB ' + ', +or containing +.RB ' = ' +can be passed to the routine. + +.SH BUGS +none + +.SH AUTHOR +.nf +J\*org Schilling +Seestr. 110 +D\-13353 Berlin +Germany +.fi +.PP +Mail bugs and suggestions to: +.PP +.B +schilling@fokus.gmd.de +or +.B +js@cs.tu\-berlin.de +or +.B +joerg@schily.isdn.cs.tu\-berlin.de diff -Nru cdrtools-2.01.01a33/libschily/getallargs.mk3 cdrtools-3.02a09/libschily/getallargs.mk3 --- cdrtools-2.01.01a33/libschily/getallargs.mk3 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/libschily/getallargs.mk3 2015-04-26 18:01:43.000000000 +0000 @@ -0,0 +1,18 @@ +#ident @(#)getallargs.mk3 1.1 15/04/26 +########################################################################### +# Sample makefile for installing manual pages +########################################################################### +SRCROOT= .. +RULESDIR= RULES +include $(SRCROOT)/$(RULESDIR)/rules.top +########################################################################### + +MANDIR= man +TARGETMAN= getallargs +MANSECT= $(MANSECT_LIB) +MANSUFFIX= $(MANSUFF_LIB) +MANFILE= getallargs.3 + +########################################################################### +include $(SRCROOT)/$(RULESDIR)/rules.man +########################################################################### diff -Nru cdrtools-2.01.01a33/libschily/getargs.3 cdrtools-3.02a09/libschily/getargs.3 --- cdrtools-2.01.01a33/libschily/getargs.3 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/libschily/getargs.3 2016-10-13 20:41:57.000000000 +0000 @@ -0,0 +1,566 @@ +. \" Manual Seite fuer getargs +. \" @(#)getargs.3 1.6 16/10/13 Copyright 1985 J. Schilling +. \" +.if t .ds a \v'-0.55m'\h'0.00n'\z.\h'0.40n'\z.\v'0.55m'\h'-0.40n'a +.if t .ds o \v'-0.55m'\h'0.00n'\z.\h'0.45n'\z.\v'0.55m'\h'-0.45n'o +.if t .ds u \v'-0.55m'\h'0.00n'\z.\h'0.40n'\z.\v'0.55m'\h'-0.40n'u +.if t .ds A \v'-0.77m'\h'0.25n'\z.\h'0.45n'\z.\v'0.77m'\h'-0.70n'A +.if t .ds O \v'-0.77m'\h'0.25n'\z.\h'0.45n'\z.\v'0.77m'\h'-0.70n'O +.if t .ds U \v'-0.77m'\h'0.30n'\z.\h'0.45n'\z.\v'0.77m'\h'-.75n'U +.if t .ds s \(*b +.if t .ds S SS +.if n .ds a ae +.if n .ds o oe +.if n .ds u ue +.if n .ds s sz +.TH GETARGS 3 "15. Juli 1988" "J\*org Schilling" "Schily\'s LIBRARY FUNCTIONS" +.SH NAME +getargs() \- parses arguments until a non-flag is reached +.SH SYNOPSIS +.nf +#include + +.B +int getargs(pac, pav, fmt, a1, \|.\|.\|., an) +.B + int *pac; /* pointer to arg count */ +.B + char *(*pav)[]; /* pointer to address of arg vector */ +.B + char *fmt; /* format string */ +.B + type *a1; /* pointer to result 1 (corresponding */ +.B + /* to the first descriptor in fmt) */ +.B + type *an; /* pointer to result n (corresponding */ +.B + /* to the nth descriptor in fmt) */ +.B + +int getlargs(pac, pav, props, fmt, a1, \|.\|.\|., an) +.B + int *pac; /* pointer to arg count */ +.B + char *(*pav)[]; /* pointer to address of arg vector */ +.B + struct ga_props *props; /* control properties */ +.B + char *fmt; /* format string */ +.B + type *a1; /* pointer to result 1 (corresponding */ +.B + /* to the first descriptor in fmt) */ +.B + type *an; /* pointer to result n (corresponding */ +.B + /* to the nth descriptor in fmt) */ +.fi +.SH DESCRIPTION +.BR getargs () +looks at each argument that begins with +.RB ' \- ', +.RB ' + ', +or has an +.RB ' = ' +in it and trys to find a matching description in +.BR fmt . +If a match is found, the corresponding value pointed at by +.B a1 +to +.B an +is set to the value according to the conversion specification. +.PP +.BR getlargs () +is similar to +.BR getargs () +but it implements an additional +.B ga_props +parameter that must be initialized with +.BR getarginit () +before it is passed. +.LP +Each normal format takes one address argument from +.B a1 +to +.B an +and each function type format takes two address arguments from +.B a1 +to +.BR an . +.PP +If a match is not found, +.BR getargs () +returns the error code +.BR "\-1 " ( BADFLAG ), +with +.B *pav[0] +pointing to the bad argument. If an argument that does +not begin with +.RB ' \- ' +or +.RB ' + ' +or contain an +.RB ' = ' +is found, +.BR getargs () +returns +.BR "+1 " ( NOTAFLAG ), +again with +.B pav[0] +pointing to the non-flag argument. +If the argument "\c +.B \-\-\c +" is found, +.BR getargs () +returns +.BR "+2 " ( FLAGDELIM ) +and +.B pav[0] +points to the argument after the argument "\c +.B \-\-\c +". +.PP +In the description, it is assumed that +.B pac=&ac +and +.BR pav=&av , +where +.B ac +and +.B av +are the two arguments passed to +.BR main (). +The pointers are necessary so that +.BR getargs () +can update +.B ac +and +.B av +as it verifies each argument and reflects the +.I current +position back to the user. +.PP +The format string is a series of one or more option descriptors. +Each option descriptor starts with the +.B option-name +which is composed of +.BR characters , +.BR numbers , +the +.BR "underscore character `-'" , +.BR minus +or +.BR plus , +which must match the option parameter on the command line. +It is followed by the optional +.B format descriptor +and an optional +.BR "size modifier" . +.PP +Legal conversions and their meanings are: +.TP +.BR #c " or " #C +.B Char integer +.RS +.PP +The remainder of the current argument, or if it is +empty, the next existing argument is converted to a +character sized integer value. An error in conversion results +in a +.B BADFLAG +situation. +.RE +.TP +.BR #s " or " #S +.B Short integer +.RS +.PP +The remainder of the current argument, or if it is +empty, the next existing argument is converted to a +short integer value. An error in conversion results +in a +.B BADFLAG +situation. +.RE +.TP +.BR # " or " #i " or " #I +.B Integer +.RS +.PP +The remainder of the current argument, or, if it is +empty, the next existing argument is converted to an +int value. An error in conversion results in a +.B BADFLAG +situation. +.RE +.TP +.BR #l " or " #L +.B Long integer +.RS +.PP +The remainder of the current argument, or if it is +empty, the next existing argument is converted to a +long integer value. An error in conversion results +in a +.B BADFLAG +situation. +.RE +.TP +.BR #ll " or " #LL +.B Long long integer +.RS +.PP +The remainder of the current argument, or if it is +empty, the next existing argument is converted to a +long long integer value. An error in conversion results +in a +.B BADFLAG +situation. +.RE +.TP +.B + +.BI Increment " sized " integer +.RS +.PP +The value of the related argument pointer is incremented, assuming a +.I size +that depends on the optional +.B size modifier +after the +.BR + . +See the integer conversions above for a list of valid +.BR "size modifiers" . +.RE +.TP +.I empty +.BR BOOL "ean " TRUE +.RS +.PP +If the +.B option-name +is not followed by a format descriptor, +the value of the related argument pointer is interpreted as an integer +and set to +.BR TRUE " (" +1 ). +.RE +.TP +.BR %0 " or " %1 +.BI Set " sized " BOOL +.RS +.PP +The value of the related argument pointer is either set to +.B 0 +(when using the format +.BR %0 ), +or set to +.B 1 +(when using the format +.BR %1 ), +assuming a +.I size +that depends on the optional +.B size modifier +after the +.BR %0 " or " %1 . +See the integer conversions above for a list of valid +.BR "size modifiers" . +.RE +.TP +.B ? +.B Character +.RS +.PP +The next character in the current argument is the +result. If there is no next char, the result is +.RB ' \e0 '. +.RE +.TP +.B * +.B String +.RS +.PP +A pointer to the remainder of the current argument +is returned in the related argument pinter. +If there are no more data in the +argument the next argument is used, and if there is +no next argument, a +.B BADFLAG +situation is returned. +.RE +.TP +.B & +.B Function +.RS +.PP +This format takes two parameters in the argument list of +.BR getargs (). +The first argument is a pointer to a function to call. +The second argument is a pointer to a variable that is passed to the +function as second argument. +.PP +Because the argument just after the function address argument is passed +as a second argument to the function, common routines can have +their results in different places depending on which switch is +invoked. +.LP +The function is called with five arguments: +.TP +.BR 1 ) +A pointer to the option argument, taken from the matching element +from the command line from +.BR *pav . +.TP +.BR 2 ) +A pointer to the variable that should be set by the function. +.TP +.BR 3 ) +The current value of +.BR pac . +.TP +.BR 4 ) +The current value of +.BR pav . +.TP +.BR 5 ) +A pointer to the matching part of the format string. +.LP +The function must return one of these values: +.TP 18 +.BR FLAGDELIM "\ =\ " +2 +Pretend that "\c +.B \-\-\c +" stopped flag processing. +.TP +.BR FLAGPARSED "\ =\ " +1 +Option processing was successful. +.TP +.BR NOARGS "\ =\ " 0 +Pretend that all arguments have been examined. +.TP +.BR BADFLAG "\ =\ " \-1 +The current flag argument or parameter is not understood. +.TP +.BR BADFMT "\ =\ " \-2 +An unspecified error occurred. +.TP +.BR NOTAFILE "\ =\ " \-3 +Probably another flag type argument. +Tell the calling function +.RB ( getargs ()) +to continue to check for other flag type arguments in the +format string for a possible match. +.PP +Note: If a flag is found multiple times, the function is called +each time. +.RE +.TP +.B ~ +.BR Function " for " BOOL "ean flag +.RS +.PP +This is a variant of the +.BR & -format, +but as a boolean flag is assumed, no option argument is assumed and +if the related option is a single char option, it may be combined with +other single char options. The called function permits to reset other +options at the same time. +.PP +As boolean flags take no arguments, +the first argument of the called function points to an empty string. +.RE +.PP +Descriptors are separated by a +.RB ' , ' +(without whitespace) in the +format string. They correspond in order to the resultant pointers, +.BR a1\|.\|.\|.an . +Note that function type formats take two arguments from resultant pointers, +.BR a1\|.\|.\|.an . +.PP +It is an error to expect more than one conversion from a single +match (e.g., +.B +"x#*" +to attempt to get both the numerical value +and the actual string for the +.B x +flag); a +.BR "\-2 " ( BADFMT ) +error will result if this is attempted. +.PP +Although flags must appear exactly as they do in the +format string, the format string does not contain the leading +.RB ' \- '. +If the flag should start with a +.RB ' \+ ', +the +.RB ' \+ ' +needs to be in the format string. +If the flag should start with a +.RB ' \-\- ', +a single +.RB ' \- ' +needs to be in the format string. +.PP +.ne 3 +Flags, where conversion is to take place, may appear +either as: +.TP +.BI \-f value +.PD 0 +.TP +.BI f= value +.TP +.BI f= " value" +.TP +.BI \-f= value +.TP +.BI \-f= " value" +.PD +.PP +where +.B f +is the matching flag string. No additional effort is +required to get these different ways of specifying values. +.PP +.ne 3 +Long flags, where conversion is to take place, may appear +either as: +.TP +.BI \-flag value +.PD 0 +.TP +.BI \-\-flag value +.TP +.BI flag= value +.TP +.BI flag= " value" +.TP +.BI \-flag= value +.TP +.BI \-\-flag= value +.TP +.BI \-flag= " value" +.TP +.BI \-\-flag= " value" +.PD +.PP +where +.B flag +is the matching flag string. No additional effort is +required to get these different ways of specifying values. +.LP +For flags or type: +.BR * , +.BR ? , +.B & +and +.BR # , +when the format character is immediately followed by a space +or underscore character, the permitted option calling variants +are limited: +.TP +.B - +The underscore character enforces that +.B option-name +and +.B option-argument +need to be written as a single argument. +This permits to implement options with optional arguments. +.TP +.B - +The space character enforces that +.B option-name +and +.B option-argument +need to be written as separate arguments. +.SH RETURNS +.TP 14 +.B FLAGDELIM\ 2 +The command line argument "\c +.B \-\-\c +" +stopped flag processing. +.TP +.B NOTAFLAG\ \ 1 +The argument +.B *pav +does not appear to be a flag. +.TP +.B NOARGS\ \ \ \ 0 +All arguments have been successfully examined. +.TP +.B BADFLAG\ \ \-1 +A bad flag (option) argument was supplied to the program. +The argument +.B *pav +contains the offending command line argument. +.TP +.B BADFMT\ \ \-2 +A bad format descriptor string has been detected. +The calling program, rather than the user, was in error. +.LP +General rules for the return code: +.TP 14 +.B >\ 0 +A file type argument was found. +.TP +.B \ \ 0 +All arguments have been parsed. +.TP +.B <\ 0 +An error occurred or not a file type argument. +.LP +Flag and file arg processing should be terminated after getting a +return code <= 0. + +.SH EXAMPLES + +.SH "SEE ALSO" +.nh +.sp +.LP +.BR getarginit (3), +.BR getallargs (3), +.BR getargerror (3), +.BR getfiles (3), +.BR getlallargs (3), +.BR getlargs (3), +.BR getlfiles (3), +.BR getvallargs (3), +.BR getvargs (3), +.BR getvfiles (3). + +.SH NOTES +.BR getargs () +assumes the first argument is at +.BR av[0] . +Commands are invoked by the system with the command name in +.B av[0] +and the first argument in +.BR av[1] , +so they must increment +.B av +and decrement +.B ac +before calling +.BR getargs (). +.PP +.BR getargs () +should only be used when the position of the switches +influences how an argument is processed (e.g., format and pr +commands), or when all switches must be before all the arguments +(e.g, write command). In other cases, use +.BR getallargs (). + +.SH BUGS +none + +.SH AUTHOR +.nf +J\*org Schilling +D\-13353 Berlin +Germany +.fi +.PP diff -Nru cdrtools-2.01.01a33/libschily/getargs.c cdrtools-3.02a09/libschily/getargs.c --- cdrtools-2.01.01a33/libschily/getargs.c 2007-07-02 22:01:04.000000000 +0000 +++ cdrtools-3.02a09/libschily/getargs.c 2017-09-25 20:58:56.000000000 +0000 @@ -1,11 +1,12 @@ -/* @(#)getargs.c 2.52 07/07/03 Copyright 1985, 1988, 1994-2007 J. Schilling */ +/* @(#)getargs.c 2.76 17/09/25 Copyright 1985, 1988, 1994-2017 J. Schilling */ +#include #ifndef lint -static char sccsid[] = - "@(#)getargs.c 2.52 07/07/03 Copyright 1985, 1988, 1994-2007 J. Schilling"; +static UConst char sccsid[] = + "@(#)getargs.c 2.76 17/09/25 Copyright 1985, 1988, 1994-2017 J. Schilling"; #endif #define NEW /* - * Copyright (c) 1985, 1988, 1994-2007 J. Schilling + * Copyright (c) 1985, 1988, 1994-2017 J. Schilling * * 1.3.88 Start implementation of release 2 */ @@ -23,9 +24,6 @@ * '~' call function for BOOLEAN flag * '+' inctype +++ NEU +++ * - * XXX Single char Boolen type '~' flags cannot yet be combined - * XXX Single char Boolen type '%' flags cannot yet be combined - * * The format string 'f* ' may be used to disallow -ffoo for f* * The same behavior is implemented for 'f# ', 'f? ' and 'f& '. * The ' ' needs to immediately follow the format type specifier. @@ -51,6 +49,8 @@ * with the License. * * See the file CDDL.Schily.txt in this distribution for details. + * A copy of the CDDL is also available via the Internet at + * http://www.opensource.org/licenses/cddl1.txt * * When distributing Covered Code, include this CDDL HEADER in each * file and include the License file CDDL.Schily.txt from this distribution. @@ -63,14 +63,19 @@ #include #include #include -#include +#include +/* + * Various return values + */ +#define RETMAX 2 /* Max. value for getargerror() */ #define FLAGDELIM 2 /* "--" stopped flag processing */ #define NOTAFLAG 1 /* Not a flag type argument */ #define NOARGS 0 /* No more args */ #define BADFLAG (-1) /* Not a valid flag argument */ #define BADFMT (-2) /* Error in format string */ #define NOTAFILE (-3) /* Seems to be a flag type arg */ +#define RETMIN (-3) /* Min. value for getargerror() */ LOCAL char *retnames[] = { "NOTAFILE", @@ -80,12 +85,16 @@ "NOTAFLAG", "FLAGDELIM", }; -#define RNAME(a) (retnames[(a)+3]) +#define RNAME(a) (retnames[(a)-RETMIN]) #define SCANONLY 0 /* Do not try to set argument values */ #define SETARGS 1 /* Set argument values from cmdline */ -#define ARGVECTOR 2 /* Use vector instead of list interface */ -#define NOEQUAL 4 /* -opt=val not allowed for -opt val */ +#define CHECKARGS 2 /* To not update argv and argc */ +#define ARGVECTOR 4 /* Use vector instead of list interface */ +#define NOEQUAL 8 /* -opt=val not allowed for -opt val */ +#define SINGLEARG 16 /* Last singlechar opt may have arg */ + +LOCAL struct ga_props *_getprops __PR((struct ga_props *)); int _getargs __PR((int *, char *const **, void *, int, @@ -95,7 +104,9 @@ struct ga_props *)); LOCAL int doflag __PR((int *, char *const **, const char *, void *, int, va_list)); -LOCAL int dosflags __PR((const char *, void *, int, va_list)); +LOCAL int dosflags __PR((const char *, void *, + int *, char *const **, + int, va_list)); LOCAL int checkfmt __PR((const char *)); LOCAL int checkeql __PR((const char *)); @@ -106,6 +117,7 @@ #define isfmtspec(c) (strchr(fmtspecs, c) != NULL) LOCAL struct ga_props props_default = { 0, 0, sizeof (struct ga_props) }; +LOCAL struct ga_props props_posix = { GAF_POSIX_DEFAULT, 0, sizeof (struct ga_props) }; EXPORT int _getarginit(props, size, flags) @@ -116,17 +128,41 @@ if (size > sizeof (struct ga_props)) return (-1); + /* + * GAF_POSIX may be used as an alias for the flags that currently + * define POSIX behavior. + */ + if (flags == GAF_POSIX) + flags = GAF_POSIX_DEFAULT; + props->ga_flags = flags; props->ga_oflags = 0; props->ga_size = size; return (0); } -/*--------------------------------------------------------------------------- -| -| get flags until a non flag type argument is reached (old version) -| -+---------------------------------------------------------------------------*/ +LOCAL struct ga_props * +_getprops(props) + struct ga_props *props; +{ + if (props == GA_NO_PROPS) + props = &props_default; + else if (props == GA_POSIX_PROPS) + props = &props_posix; + props->ga_oflags = 0; + /* + * GAF_POSIX may be used as an alias for the flags that currently + * define POSIX behavior. + */ + if (props->ga_flags == GAF_POSIX) + props->ga_flags = GAF_POSIX_DEFAULT; + + return (props); +} + +/* + * get flags until a non flag type argument is reached (old version) + */ /* VARARGS3 */ #ifdef PROTOTYPES EXPORT int @@ -154,11 +190,9 @@ } -/*--------------------------------------------------------------------------- -| -| get flags until a non flag type argument is reached (list version) -| -+---------------------------------------------------------------------------*/ +/* + * get flags until a non flag type argument is reached (list version) + */ /* VARARGS4 */ #ifdef PROTOTYPES EXPORT int @@ -187,27 +221,23 @@ } -/*--------------------------------------------------------------------------- -| -| get flags until a non flag type argument is reached (vector version) -| -+---------------------------------------------------------------------------*/ +/* + * get flags until a non flag type argument is reached (vector version) + */ EXPORT int -getvargs(pac, pav, vfmt, props) +getvargs(pac, pav, props, vfmt) int *pac; char * const *pav[]; - struct ga_flags *vfmt; struct ga_props *props; + struct ga_flags *vfmt; { return (_getargs(pac, pav, vfmt, SETARGS | ARGVECTOR, props, va_dummy)); } -/*--------------------------------------------------------------------------- -| -| get all flags on the command line, do not stop on files (old version) -| -+---------------------------------------------------------------------------*/ +/* + * get all flags on the command line, do not stop on files (old version) + */ /* VARARGS3 */ #ifdef PROTOTYPES EXPORT int @@ -238,11 +268,9 @@ } -/*--------------------------------------------------------------------------- -| -| get all flags on the command line, do not stop on files (list version) -| -+---------------------------------------------------------------------------*/ +/* + * get all flags on the command line, do not stop on files (list version) + */ /* VARARGS4 */ #ifdef PROTOTYPES EXPORT int @@ -265,10 +293,15 @@ #else va_start(args); #endif + props = _getprops(props); for (; ; (*pac)--, (*pav)++) { if ((ret = _getargs(pac, pav, (void *)fmt, SETARGS, props, args)) < NOTAFLAG) break; - if (ret == FLAGDELIM && props && (props->ga_flags & GAF_DELIM_DASHDASH)) + /* + * The default is to parse all options on the command line and + * to let "--" only make the next argument a non-option. + */ + if (ret == FLAGDELIM && (props->ga_flags & GAF_DELIM_DASHDASH)) break; } va_end(args); @@ -276,36 +309,37 @@ } -/*--------------------------------------------------------------------------- -| -| get all flags on the command line, do not stop on files (vector version) -| -+---------------------------------------------------------------------------*/ +/* + * get all flags on the command line, do not stop on files (vector version) + */ EXPORT int -getvallargs(pac, pav, vfmt, props) +getvallargs(pac, pav, props, vfmt) int *pac; char * const *pav[]; - struct ga_flags *vfmt; struct ga_props *props; + struct ga_flags *vfmt; { int ret; + props = _getprops(props); for (; ; (*pac)--, (*pav)++) { if ((ret = _getargs(pac, pav, vfmt, SETARGS | ARGVECTOR, props, va_dummy)) < NOTAFLAG) break; - if (ret == FLAGDELIM && props && (props->ga_flags & GAF_DELIM_DASHDASH)) + /* + * The default is to parse all options on the command line and + * to let "--" only make the next argument a non-option. + */ + if (ret == FLAGDELIM && (props->ga_flags & GAF_DELIM_DASHDASH)) break; } return (ret); } -/*--------------------------------------------------------------------------- -| -| get next non flag type argument (i.e. a file) (old version) -| getfiles() is a dry run getargs() -| -+---------------------------------------------------------------------------*/ +/* + * get next non flag type argument (i.e. a file) (old version) + * getfiles() is a dry run getargs() + */ EXPORT int getfiles(pac, pav, fmt) int *pac; @@ -316,12 +350,10 @@ } -/*--------------------------------------------------------------------------- -| -| get next non flag type argument (i.e. a file) (list version) -| getlfiles() is a dry run getlargs() -| -+---------------------------------------------------------------------------*/ +/* + * get next non flag type argument (i.e. a file) (list version) + * getlfiles() is a dry run getlargs() + */ EXPORT int getlfiles(pac, pav, props, fmt) int *pac; @@ -333,38 +365,35 @@ } -/*--------------------------------------------------------------------------- -| -| get next non flag type argument (i.e. a file) (vector version) -| getvfiles() is a dry run getvargs() -| -+---------------------------------------------------------------------------*/ +/* + * get next non flag type argument (i.e. a file) (vector version) + * getvfiles() is a dry run getvargs() + */ EXPORT int -getvfiles(pac, pav, vfmt, props) +getvfiles(pac, pav, props, vfmt) int *pac; char *const *pav[]; - struct ga_flags *vfmt; struct ga_props *props; + struct ga_flags *vfmt; { return (_getargs(pac, pav, vfmt, SCANONLY | ARGVECTOR, props, va_dummy)); } -/*--------------------------------------------------------------------------- -| -| check args until the next non flag type argmument is reached -| *pac is decremented, *pav is incremented so that the -| non flag type argument is at *pav[0] -| -| return code: -| +2 FLAGDELIM "--" stopped flag processing -| +1 NOTAFLAG not a flag type argument (is a file) -| 0 NOARGS no more args -| -1 BADFLAG a non-matching flag type argument -| -2 BADFMT bad syntax in format string -| -+---------------------------------------------------------------------------*/ -/*LOCAL*/ int +/* + * check args until the next non flag type argmument is reached + * *pac is decremented, *pav is incremented so that the + * non flag type argument is at *pav[0] + * + * return code: + * +2 FLAGDELIM "--" stopped flag processing + * +1 NOTAFLAG not a flag type argument (is a file) + * 0 NOARGS no more args + * -1 BADFLAG a non-matching flag type argument + * -2 BADFMT bad syntax in format string + */ +/* LOCAL int */ +EXPORT int _getargs(pac, pav, vfmt, flags, props, args) register int *pac; register char *const **pav; @@ -377,11 +406,12 @@ int ret; - if (props == GA_NO_PROPS) - props = &props_default; - props->ga_oflags = 0; + props = _getprops(props); + if (props->ga_flags & GAF_NO_EQUAL) flags |= NOEQUAL; + if (props->ga_flags & GAF_SINGLEARG) + flags |= SINGLEARG; for (; *pac > 0; (*pac)--, (*pav)++) { argp = **pav; @@ -400,11 +430,9 @@ } -/*--------------------------------------------------------------------------- -| -| check if *pargp is a file type argument -| -+---------------------------------------------------------------------------*/ +/* + * check if *pargp is a file type argument + */ LOCAL int dofile(pac, pav, pargp, props) register int *pac; @@ -465,17 +493,15 @@ } -/*--------------------------------------------------------------------------- -| -| compare argp with the format string -| if a match is found store the result a la scanf in one of the -| arguments pointed to in the va_list -| -| If (flags & SETARGS) == 0, only check arguments for getfiles() -| In case that (flags & SETARGS) == 0 or that (flags & ARGVECTOR) != 0, -| va_list may be a dummy argument. -| -+---------------------------------------------------------------------------*/ +/* + * compare argp with the format string + * if a match is found store the result a la scanf in one of the + * arguments pointed to in the va_list + * + * If (flags & SETARGS) == 0, only check arguments for getfiles() + * In case that (flags & SETARGS) == 0 or that (flags & ARGVECTOR) != 0, + * va_list may be a dummy argument. + */ LOCAL int doflag(pac, pav, argp, vfmt, flags, oargs) int *pac; @@ -487,7 +513,6 @@ { register const char *fmt = (const char *)vfmt; struct ga_flags *flagp = vfmt; - char argstr[2]; const char *fmtp; long val; Llong llval; @@ -559,7 +584,9 @@ * check if the first flag in format string is a singlechar flag */ again: - if (fmt[1] == ',' || fmt[1] == '+' || fmt[1] == '\0') + if (fmt[0] != '\0' && + (fmt[1] == ',' || fmt[1] == '+' || + fmt[1] == '~' || fmt[1] == '%' || fmt[1] == '\0')) singlecharflag++; /* * check the whole format string for a match @@ -701,23 +728,26 @@ argp = sargp; goto again; } - if (singlecharflag && !doubledash && - (val = dosflags(sargp, vfmt, flags, - oargs)) != BADFLAG) { - return (val); - } - return (BADFLAG); } if (singlecharflag && !doubledash && - (val = dosflags(sargp, vfmt, flags, oargs)) != - BADFLAG) + (val = dosflags(sargp, vfmt, pac, pav, + CHECKARGS | + (flags & ~SETARGS), + va_dummy)) == BADFLAG) { return (val); - - + } + if (singlecharflag && !doubledash && + (val = dosflags(sargp, vfmt, pac, pav, + flags, + oargs)) != BADFLAG) { + return (val); + } return (BADFLAG); case ',': fmt++; + if (fmt[0] == '\0') /* Should we allow "a,b,c,"? */ + return (BADFMT); if (fmt[1] == ',' || fmt[1] == '+' || fmt[1] == '\0') singlecharflag++; if ((flags & (SETARGS|ARGVECTOR)) == SETARGS) @@ -790,8 +820,6 @@ goto nextchance; fmtp = fmt; - argstr[0] = fmt[1]; - argstr[1] = '\0'; if (fmt[1] == 'l' || fmt[1] == 'L') { if (fmt[2] == 'l' || fmt[2] == 'L') { if (flags & SETARGS) @@ -837,8 +865,6 @@ goto nextchance; fmtp = fmt; - argstr[0] = fmt[1]; - argstr[1] = '\0'; llval = (Llong)val; if (fmt[1] == 'l' || fmt[1] == 'L') { if (fmt[2] == 'l' || fmt[2] == 'L') { @@ -904,8 +930,6 @@ continue; } fmtp = fmt; - argstr[0] = fmt[1]; - argstr[1] = '\0'; val = (long)llval; if (fmt[1] == 'l' || fmt[1] == 'L') { if (fmt[2] == 'l' || fmt[2] == 'L') { @@ -982,6 +1006,8 @@ int ret; void *funarg = va_arg(args, void *); + if (curarg == NULL) + return (BADFMT); ret = ((*(getpargfun)curarg) (argp, funarg, pac, pav, fmtp)); if (ret != NOTAFILE) @@ -998,35 +1024,39 @@ } -/*--------------------------------------------------------------------------- -| -| parse args for combined single char flags -| -+---------------------------------------------------------------------------*/ +/* + * parse args for combined single char flags + */ typedef struct { - void *curarg; /* The pointer to the arg to modify */ - short count; /* The number of times a sc flag appears */ - char c; /* The single char flag character */ - char type; /* The type of the single char flag */ + void *curarg; /* The pointer to the arg to modify */ + void *curfun; /* The pointer to the function to call */ + char c; /* The single char flag character */ + char type; /* The type of the single char flag */ + char fmt; /* The format type of the single char flag */ + char val; /* The value to assign for BOOL flags */ } sflags; LOCAL int -dosflags(argp, vfmt, flags, oargs) +dosflags(argp, vfmt, pac, pav, flags, oargs) register const char *argp; void *vfmt; + int *pac; + char *const **pav; int flags; va_list oargs; { register const char *fmt = (const char *)vfmt; struct ga_flags *flagp = vfmt; -#define MAXSF 32 +#define MAXSF 64 sflags sf[MAXSF]; + char fl[256]; va_list args; register sflags *rsf = sf; register int nsf = 0; register const char *p = argp; register int i; register void *curarg = (void *)0; + getpargfun curfun = 0; char type; /* @@ -1049,41 +1079,59 @@ fmt = flagp->ga_format; if (fmt == NULL) fmt = ""; - if (flags & SETARGS) + if (flags & SETARGS) { curarg = flagp->ga_arg; + curfun = flagp->ga_funcp; + } } else if (flags & SETARGS) { + /* + * We set curfun to curarg. We later get the real + * curarg in case that we see a function callback + * but we need curfun first in this case. + */ curarg = va_arg(args, void *); + curfun = (getpargfun)curarg; } + for (i = 0; i < sizeof (fl); i++) { + fl[i] = 0; + } while (*p) { for (i = 0; i < nsf; i++) { if (rsf[i].c == *p) break; } - if (i >= MAXSF) + if (i >= MAXSF) { + va_end(args); return (BADFLAG); + } if (i == nsf) { rsf[i].curarg = (void *)0; - rsf[i].count = 0; + rsf[i].curfun = (void *)0; rsf[i].c = *p; rsf[i].type = (char)-1; + rsf[i].fmt = '\0'; + rsf[i].val = (char)TRUE; nsf++; } - rsf[i].count++; + fl[*p & 0xFF] = i; p++; } - /* - * XXX Single char Boolen type '~' flags cannot yet be combined - */ again: while (*fmt) { - if (!isfmtspec(*fmt) && - (fmt[1] == ',' || fmt[1] == '+' || fmt[1] == '\0') && + if ((((flags & SINGLEARG) && + ((fmt[1] == '*' || fmt[1] == '?' || + fmt[1] == '&' || fmt[1] == '#'))) || + (!isfmtspec(*fmt) && + (fmt[1] == ',' || fmt[1] == '+' || + fmt[1] == '~' || fmt[1] == '%' || fmt[1] == '\0'))) && strchr(argp, *fmt)) { for (i = 0; i < nsf; i++) { if (rsf[i].c == *fmt) { - if (fmt[1] == '+') { + if ((fmt[1] == '+') || + (fmt[1] == '#' && (flags & SINGLEARG))) { + rsf[i].fmt = fmt[1]; fmt++; if (fmt[1] == ',' || fmt[1] == '\0') { @@ -1103,6 +1151,56 @@ */ rsf[i].type = fmt[1]; } + } else if (fmt[1] == '%') { + fmt++; + rsf[i].fmt = '%'; + if (fmt[1] == '0') + rsf[i].val = (char)FALSE; + else if (fmt[1] == '1') + rsf[i].val = (char)TRUE; + fmt++; + if (fmt[1] == ',' || + fmt[1] == '\0') { + rsf[i].type = 'i'; + } else if ((fmt[1] == 'l' || + fmt[1] == 'L') && + (fmt[2] == 'l' || + fmt[2] == 'L')) { + /* + * Type 'Q'uad (ll) + */ + rsf[i].type = 'Q'; + fmt++; + } else { + /* + * Type 'l','i','s','c' + */ + rsf[i].type = fmt[1]; + } + } else if ((fmt[1] == '*' || + fmt[1] == '?') && + (flags & SINGLEARG)) { + fmt++; + rsf[i].fmt = fmt[0]; + rsf[i].type = fmt[0]; + if (fmt[1] == ' ' || fmt[1] == '_') + rsf[i].type = fmt[1]; + } else if ((fmt[1] == '~') || + (fmt[1] == '&' && (flags & SINGLEARG))) { + rsf[i].fmt = fmt[1]; + rsf[i].type = fmt[1]; + /* + * Let fmt point to ',' to + * prevent to fetch the + * func arg twice. + */ + fmt += 2; + if ((rsf[i].fmt == '&') && + (fmt[0] == ' ' || fmt[0] == '_')) + rsf[i].type = fmt[0]; + rsf[i].curfun = (void *)curfun; + if ((flags & (SETARGS|ARGVECTOR)) == SETARGS) + curarg = va_arg(args, void *); } else { /* * ',' or '\0' for BOOL @@ -1115,7 +1213,10 @@ } } while (*fmt != ',' && *fmt != '\0') { - /* function has extra arg on stack */ + /* + * function has extra arg on stack. The code above + * prevents us from fetching this arg twice. + */ if ((*fmt == '&' || *fmt == '~') && (flags & (SETARGS|ARGVECTOR)) == SETARGS) { curarg = va_arg(args, void *); @@ -1124,51 +1225,164 @@ } if (*fmt != '\0') fmt++; + else + break; - if ((flags & (SETARGS|ARGVECTOR)) == SETARGS) + if ((flags & (SETARGS|ARGVECTOR)) == SETARGS) { + /* + * We set curfun to curarg. We later get the real + * curarg in case that we see a function callback + * but we need curfun first in this case. + */ curarg = va_arg(args, void *); + curfun = (getpargfun)curarg; + } } if ((flags & ARGVECTOR) && flagp[1].ga_format != NULL) { flagp++; fmt = flagp->ga_format; - if (flags & SETARGS) + if (flags & SETARGS) { curarg = flagp->ga_arg; + curfun = flagp->ga_funcp; + } goto again; } - for (i = 0; i < nsf; i++) { + for (p = argp; *p; p++) { + char tfmt; + + i = fl[*p & 0xFF]; + tfmt = rsf[i].fmt; type = rsf[i].type; if (type == (char)-1) { return (BADFLAG); } - if (rsf[i].curarg) { + + if ((flags & SETARGS) == 0 && + (tfmt == '*' || tfmt == '?' || tfmt == '&' || tfmt == '#')) { + /* + * POSIX 12.2 Guideline 5 requires that any number of + * options without argument may be followed by a + * single option with parameter. So all characters + * past this one belong to the argument of this option. + */ + if (flags & CHECKARGS) + break; + if (*++p == '\0' && type != '_') { + if (*pac > 1) { + (*pac)--; + (*pav)++; + p = **pav; + } else { + return (BADFLAG); + } + } + break; + } + if ((flags & SETARGS) && + (rsf[i].curfun || rsf[i].curarg)) { + Llong llval = 0; + long val = 0; + + if (tfmt == '*' || tfmt == '?' || + tfmt == '&' || tfmt == '#') { + /* + * If type is '_', then -f ... results in an + * empty argument. This is because we disallow + * -f foo for f* in this case. + */ + if (*++p == '\0' && type != '_') { + if (*pac > 1) { + (*pac)--; + (*pav)++; + p = **pav; + } else { + return (BADFLAG); + } + } + } + + if (tfmt == '#' && *astoll(p, &llval) != '\0') { + return (BADFLAG); + } + val = (long)llval; + if (type == ',' || type == '\0') { *((int *)rsf[i].curarg) = TRUE; } else if (type == 'i' || type == 'I') { - *((int *)rsf[i].curarg) += rsf[i].count; + if (tfmt == '+') + *((int *)rsf[i].curarg) += 1; + else if (tfmt == '#') + *((int *)rsf[i].curarg) = (int)val; + else + *((int *)rsf[i].curarg) = rsf[i].val; } else if (type == 'l' || type == 'L') { - *((long *)rsf[i].curarg) += rsf[i].count; + if (tfmt == '+') + *((long *)rsf[i].curarg) += 1; + else if (tfmt == '#') + *((long *)rsf[i].curarg) = val; + else + *((long *)rsf[i].curarg) = rsf[i].val; } else if (type == 'Q') { - *((Llong *)rsf[i].curarg) += rsf[i].count; + if (tfmt == '+') + *((Llong *)rsf[i].curarg) += 1; + else if (tfmt == '#') + *((Llong *)rsf[i].curarg) = llval; + else + *((Llong *)rsf[i].curarg) = rsf[i].val; } else if (type == 's' || type == 'S') { - *((short *)rsf[i].curarg) += rsf[i].count; + if (tfmt == '+') + *((short *)rsf[i].curarg) += 1; + else if (tfmt == '#') + *((short *)rsf[i].curarg) = (short)val; + else + *((short *)rsf[i].curarg) = rsf[i].val; } else if (type == 'c' || type == 'C') { - *((char *)rsf[i].curarg) += rsf[i].count; + if (tfmt == '+') + *((char *)rsf[i].curarg) += 1; + else if (tfmt == '#') + *((char *)rsf[i].curarg) = (char)val; + else + *((char *)rsf[i].curarg) = rsf[i].val; + } else if (tfmt == '*' || tfmt == '?') { + if (tfmt == '*') + *((const char **)rsf[i].curarg) = p; + else + *((char *)rsf[i].curarg) = *p; + break; + } else if (tfmt == '~' || tfmt == '&') { + int ret; + char cfmt[3]; + + cfmt[0] = '-'; + cfmt[1] = rsf[i].c; + cfmt[2] = '\0'; + + if (rsf[i].curfun == NULL) + return (BADFMT); + ret = ((*(getpargfun)rsf[i].curfun) (tfmt == '&' + ?p:"", + rsf[i].curarg, + pac, pav, cfmt)); + if (ret != NOTAFLAG) + return (ret); + if (tfmt == '&') + break; } else { return (BADFLAG); } + if (tfmt == '#') + break; } } return (NOTAFLAG); } -/*--------------------------------------------------------------------------- -| -| If the next format character is a comma or the string delimiter, -| there are no invalid format specifiers. Return success. -| Otherwise raise the getarg_bad_format condition. -| -+---------------------------------------------------------------------------*/ +/* + * If the next format character is a comma or the string delimiter, + * there are no invalid format specifiers. Return success. + * Otherwise raise the getarg_bad_format condition. + */ LOCAL int checkfmt(fmt) const char *fmt; @@ -1186,15 +1400,13 @@ } } -/*--------------------------------------------------------------------------- -| -| Parse the string as long as valid characters can be found. -| Valid flag identifiers are chosen from the set of -| alphanumeric characters, '-' and '_'. -| If the next character is an equal sign the string -| contains a valid flag identifier. -| -+---------------------------------------------------------------------------*/ +/* + * Parse the string as long as valid characters can be found. + * Valid flag identifiers are chosen from the set of + * alphanumeric characters, '-' and '_'. + * If the next character is an equal sign the string + * contains a valid flag identifier. + */ LOCAL int checkeql(str) register const char *str; @@ -1203,7 +1415,7 @@ for (c = (unsigned char)*str; isalnum(c) || c == '_' || c == '-' || c == '+'; - c = *str++) + c = *++str) /* LINTED */ ; return (c == '='); @@ -1213,7 +1425,7 @@ getargerror(err) int err; { - if (err < -3 || err > 2) + if (err < RETMIN || err > RETMAX) return ("Illegal arg error"); return (RNAME(err)); } diff -Nru cdrtools-2.01.01a33/libschily/getargs.mk3 cdrtools-3.02a09/libschily/getargs.mk3 --- cdrtools-2.01.01a33/libschily/getargs.mk3 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/libschily/getargs.mk3 2015-04-26 18:01:43.000000000 +0000 @@ -0,0 +1,18 @@ +#ident @(#)getargs.mk3 1.1 15/04/26 +########################################################################### +# Sample makefile for installing manual pages +########################################################################### +SRCROOT= .. +RULESDIR= RULES +include $(SRCROOT)/$(RULESDIR)/rules.top +########################################################################### + +MANDIR= man +TARGETMAN= getargs +MANSECT= $(MANSECT_LIB) +MANSUFFIX= $(MANSUFF_LIB) +MANFILE= getargs.3 + +########################################################################### +include $(SRCROOT)/$(RULESDIR)/rules.man +########################################################################### diff -Nru cdrtools-2.01.01a33/libschily/getav0.c cdrtools-3.02a09/libschily/getav0.c --- cdrtools-2.01.01a33/libschily/getav0.c 2006-10-05 15:56:51.000000000 +0000 +++ cdrtools-3.02a09/libschily/getav0.c 2009-07-08 21:56:15.000000000 +0000 @@ -1,12 +1,13 @@ -/* @(#)getav0.c 1.18 06/10/05 Copyright 1985, 1995-2004 J. Schilling */ +/* @(#)getav0.c 1.23 09/07/08 Copyright 1985, 1995-2009 J. Schilling */ +#include #ifndef lint -static char sccsid[] = - "@(#)getav0.c 1.18 06/10/05 Copyright 1985, 1995-2004 J. Schilling"; +static UConst char sccsid[] = + "@(#)getav0.c 1.23 09/07/08 Copyright 1985, 1995-2009 J. Schilling"; #endif /* * Get arg vector by scanning the stack * - * Copyright (c) 1985, 1995-2004 J. Schilling + * Copyright (c) 1985, 1995-2009 J. Schilling */ /* * The contents of this file are subject to the terms of the @@ -20,7 +21,6 @@ * file and include the License file CDDL.Schily.txt from this distribution. */ -#include #include #include #include @@ -67,7 +67,7 @@ return (NULL); while (fp->fr_savfp) { - if (fp->fr_savpc == NULL) + if (fp->fr_savpc == 0) break; if (!is_even(fp->fr_savfp)) { @@ -91,7 +91,7 @@ return (NULL); while (fp->fr_savfp) { - if (fp->fr_savpc == NULL) + if (fp->fr_savpc == 0) break; if (!is_even(fp->fr_savfp)) { @@ -135,6 +135,20 @@ #else +EXPORT char ** +getmainfp() +{ + raisecond("getmainfp", 0); + return ((char **)0); +} + +EXPORT char ** +getavp() +{ + raisecond("getavp", 0); + return ((char **)0); +} + EXPORT char * getav0() { diff -Nru cdrtools-2.01.01a33/libschily/getdomainname.c cdrtools-3.02a09/libschily/getdomainname.c --- cdrtools-2.01.01a33/libschily/getdomainname.c 2006-09-13 15:05:35.000000000 +0000 +++ cdrtools-3.02a09/libschily/getdomainname.c 2010-08-23 12:49:33.000000000 +0000 @@ -1,10 +1,11 @@ -/* @(#)getdomainname.c 1.17 06/09/13 Copyright 1995-2003 J. Schilling */ +/* @(#)getdomainname.c 1.23 10/08/23 Copyright 1995-2010 J. Schilling */ +#include #ifndef lint -static char sccsid[] = - "@(#)getdomainname.c 1.17 06/09/13 Copyright 1995-2003 J. Schilling"; +static UConst char sccsid[] = + "@(#)getdomainname.c 1.23 10/08/23 Copyright 1995-2010 J. Schilling"; #endif /* - * Copyright (c) 1995-2003 J. Schilling + * Copyright (c) 1995-2010 J. Schilling */ /* * The contents of this file are subject to the terms of the @@ -18,22 +19,16 @@ * file and include the License file CDDL.Schily.txt from this distribution. */ -#include #include #include -#ifdef HAVE_SYS_SYSTEMINFO_H -#include -#endif -#include +#include +#include #ifndef HAVE_GETDOMAINNAME EXPORT int getdomainname __PR((char *name, int namelen)); #endif -/*#undef HAVE_GETDOMAINNAME*/ -/*#undef SI_SRPC_DOMAIN*/ - #if !defined(HAVE_GETDOMAINNAME) && defined(SI_SRPC_DOMAIN) #define FUNC_GETDOMAINNAME @@ -51,7 +46,7 @@ #if !defined(HAVE_GETDOMAINNAME) && !defined(FUNC_GETDOMAINNAME) #define FUNC_GETDOMAINNAME -#include +#include #include #include diff -Nru cdrtools-2.01.01a33/libschily/getdtablesize.c cdrtools-3.02a09/libschily/getdtablesize.c --- cdrtools-2.01.01a33/libschily/getdtablesize.c 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/libschily/getdtablesize.c 2013-12-26 18:19:51.000000000 +0000 @@ -0,0 +1,46 @@ +/* @(#)getdtablesize.c 1.2 13/12/26 Copyright 2011-2013 J. Schilling */ +/* + * Copyright (c) 2011-2013 J. Schilling + */ +/* + * The contents of this file are subject to the terms of the + * Common Development and Distribution License, Version 1.0 only + * (the "License"). You may not use this file except in compliance + * with the License. + * + * See the file CDDL.Schily.txt in this distribution for details. + * A copy of the CDDL is also available via the Internet at + * http://www.opensource.org/licenses/cddl1.txt + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file CDDL.Schily.txt from this distribution. + */ + +#include +#include +#include +#include +#include + +#ifndef HAVE_GETDTABLESIZE +EXPORT int +getdtablesize() +{ +#ifdef RLIMIT_NOFILE + struct rlimit rlim; + + getrlimit(RLIMIT_NOFILE, &rlim); + return (rlim.rlim_cur); +#else /* RLIMIT_NOFILE */ +#if defined(_MSC_VER) || defined(__MINGW32__) + return (2048); +#else +#ifdef OPEN_MAX + return (OPEN_MAX); +#else + return (20); +#endif +#endif +#endif /* RLIMIT_NOFILE */ +} +#endif diff -Nru cdrtools-2.01.01a33/libschily/geterrno.3 cdrtools-3.02a09/libschily/geterrno.3 --- cdrtools-2.01.01a33/libschily/geterrno.3 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/libschily/geterrno.3 1988-07-22 13:45:30.000000000 +0000 @@ -0,0 +1,37 @@ +. \" Manual Seite fuer geterrno +. \" @(#)geterrno.3 1.1 +. \" +.if t .ds a \v'-0.55m'\h'0.00n'\z.\h'0.40n'\z.\v'0.55m'\h'-0.40n'a +.if t .ds o \v'-0.55m'\h'0.00n'\z.\h'0.45n'\z.\v'0.55m'\h'-0.45n'o +.if t .ds u \v'-0.55m'\h'0.00n'\z.\h'0.40n'\z.\v'0.55m'\h'-0.40n'u +.if t .ds A \v'-0.77m'\h'0.25n'\z.\h'0.45n'\z.\v'0.77m'\h'-0.70n'A +.if t .ds O \v'-0.77m'\h'0.25n'\z.\h'0.45n'\z.\v'0.77m'\h'-0.70n'O +.if t .ds U \v'-0.77m'\h'0.30n'\z.\h'0.45n'\z.\v'0.77m'\h'-.75n'U +.if t .ds s \(*b +.if t .ds S SS +.if n .ds a ae +.if n .ds o oe +.if n .ds u ue +.if n .ds s sz +.TH GETERRNO 3 "15. Juli 1988" "J\*org Schilling" "Schily\'s LIBRARY FUNCTIONS" +.SH NAME +geterrno() \- gets system error number +.SH SYNOPSIS +.B +int geterrno() +.SH DESCRIPTION +geterrno() enables the programmer to find out exactly what the +last failure was. This is often necessary since some +subroutines just indicate success or failure, rather than +directly return definitive error codes. +.PP +For example, comerr() uses geterrno() to learn the error so that +an appropriate message can be printed. +.SH RETURNS +Returns the error code for the last system error that occurred +in the current process, e.g., after a call to fileopen() failed. +.SH "SEE ALSO" +comerr(3), comerrno(3), error(3), errmsg(3) +.SH NOTES +The value returned by geterrno() is only valid after the +immediately preceding system call failed. diff -Nru cdrtools-2.01.01a33/libschily/geterrno.c cdrtools-3.02a09/libschily/geterrno.c --- cdrtools-2.01.01a33/libschily/geterrno.c 2006-09-26 11:29:58.000000000 +0000 +++ cdrtools-3.02a09/libschily/geterrno.c 2010-08-23 12:43:25.000000000 +0000 @@ -1,8 +1,8 @@ -/* @(#)geterrno.c 1.11 06/09/26 Copyright 1985, 1995-2003 J. Schilling */ +/* @(#)geterrno.c 1.14 10/08/23 Copyright 1985, 1995-2010 J. Schilling */ /* * Get error number * - * Copyright (c) 1985, 1995-2003 J. Schilling + * Copyright (c) 1985, 1995-2010 J. Schilling */ /* * The contents of this file are subject to the terms of the @@ -16,6 +16,12 @@ * file and include the License file CDDL.Schily.txt from this distribution. */ +#ifndef _TS_ERRNO +#define _TS_ERRNO /* Solaris: get thread safe errno value */ +#endif +#ifndef _LIBC_REENTRANT +#define _LIBC_REENTRANT /* Linux: get thread safe errno value */ +#endif #include #include #include diff -Nru cdrtools-2.01.01a33/libschily/geterrno.mk3 cdrtools-3.02a09/libschily/geterrno.mk3 --- cdrtools-2.01.01a33/libschily/geterrno.mk3 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/libschily/geterrno.mk3 2015-04-26 18:01:43.000000000 +0000 @@ -0,0 +1,18 @@ +#ident @(#)geterrno.mk3 1.1 15/04/26 +########################################################################### +# Sample makefile for installing manual pages +########################################################################### +SRCROOT= .. +RULESDIR= RULES +include $(SRCROOT)/$(RULESDIR)/rules.top +########################################################################### + +MANDIR= man +TARGETMAN= geterrno +MANSECT= $(MANSECT_LIB) +MANSUFFIX= $(MANSUFF_LIB) +MANFILE= geterrno.3 + +########################################################################### +include $(SRCROOT)/$(RULESDIR)/rules.man +########################################################################### diff -Nru cdrtools-2.01.01a33/libschily/getexecpath.c cdrtools-3.02a09/libschily/getexecpath.c --- cdrtools-2.01.01a33/libschily/getexecpath.c 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/libschily/getexecpath.c 2010-11-18 20:47:35.000000000 +0000 @@ -0,0 +1,80 @@ +/* @(#)getexecpath.c 1.1 10/11/18 Copyright 2006-2010 J. Schilling */ +/* + * Copyright (c) 2006.2010 J. Schilling + */ +/* + * The contents of this file are subject to the terms of the + * Common Development and Distribution License, Version 1.0 only + * (the "License"). You may not use this file except in compliance + * with the License. + * + * See the file CDDL.Schily.txt in this distribution for details. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file CDDL.Schily.txt from this distribution. + */ + +#include +#include +#include +#include +#include +#include + +#if (defined(sun) || defined(__sun) || defined(__sun__)) && defined(__SVR4) +#define PATH_IMPL +#define METHOD_SYMLINK +#define SYMLINK_PATH "/proc/self/path/a.out" /* Solaris 10 -> ... */ +#endif + +#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) +#define PATH_IMPL +#define METHOD_SYMLINK +#define SYMLINK_PATH "/proc/curproc/file" /* /proc may nor be mounted */ +#endif + +#if defined(__linux__) || defined(__linux)|| defined(linux) +#define PATH_IMPL +#define METHOD_SYMLINK +#define SYMLINK_PATH "/proc/self/exe" +#endif + +#if defined(HAVE_PROC_PIDPATH) /* Mac OS X */ +#ifdef HAVE_LIBPROC_H +#include +#endif +#define PATH_IMPL +#endif + +/* + * TODO: AIX: /proc/$$/object/a.out -> plain file, match via st_dev/st_ino + */ + + +EXPORT char * +getexecpath() +{ +#ifdef PATH_IMPL +#ifdef METHOD_SYMLINK + char buf[1024]; + ssize_t len; + + len = readlink(SYMLINK_PATH, buf, sizeof (buf)-1); + if (len == -1) + return (NULL); + buf[len] = '\0'; + return (strdup(buf)); +#endif +#ifdef HAVE_PROC_PIDPATH /* Mac OS X */ + char buf[1024]; + int len; + + len = proc_pidpath(getpid(), buf, sizeof (buf)); + if (len == -1) + return (NULL); + return (strdup(buf)); +#endif +#else + return (NULL); +#endif +} diff -Nru cdrtools-2.01.01a33/libschily/getfiles.3 cdrtools-3.02a09/libschily/getfiles.3 --- cdrtools-2.01.01a33/libschily/getfiles.3 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/libschily/getfiles.3 2016-10-12 23:19:01.000000000 +0000 @@ -0,0 +1,139 @@ +. \" Manual Seite fuer getfiles +. \" @(#)getfiles.3 1.4 16/10/13 Copyright 1985 J. Schilling +. \" +.if t .ds a \v'-0.55m'\h'0.00n'\z.\h'0.40n'\z.\v'0.55m'\h'-0.40n'a +.if t .ds o \v'-0.55m'\h'0.00n'\z.\h'0.45n'\z.\v'0.55m'\h'-0.45n'o +.if t .ds u \v'-0.55m'\h'0.00n'\z.\h'0.40n'\z.\v'0.55m'\h'-0.40n'u +.if t .ds A \v'-0.77m'\h'0.25n'\z.\h'0.45n'\z.\v'0.77m'\h'-0.70n'A +.if t .ds O \v'-0.77m'\h'0.25n'\z.\h'0.45n'\z.\v'0.77m'\h'-0.70n'O +.if t .ds U \v'-0.77m'\h'0.30n'\z.\h'0.45n'\z.\v'0.77m'\h'-.75n'U +.if t .ds s \(*b +.if t .ds S SS +.if n .ds a ae +.if n .ds o oe +.if n .ds u ue +.if n .ds s sz +.TH GETFILES 3 "15. Juli 1988" "J\*org Schilling" "Schily\'s LIBRARY FUNCTIONS" +.SH NAME +getfiles() \- gets next non flag-type argument +.SH SYNOPSIS +.nf +#include + +.B +int getfiles(pac, pav, fmt) +.B + int *pac; /* pointer to arg count */ +.B + char *(*pav)[]; /* pointer to address of arg vector */ +.B + char *fmt; /* format string */ +.fi +.SH DESCRIPTION +.BR getfiles () +returns, with a value of +.BR "+1 " ( NOTAFLAG ) +or +.BR "+2 " ( FLAGDELIM ), +whenever a non-flag type argument is encountered. +Flag-type (option) arguments, along with their +values, are ignored. The filename is at +.BR *pav[0] . +The caller must increment +.B *pav +and decrement +.B *pac +before calling +.BR getfiles () +again. +.SH RETURNS +.TP 14 +.B FLAGDELIM\ 2 +The command line argument "\c +.B \-\-\c +" +stopped flag processing. +.TP +.B NOTAFLAG\ \ 1 +The argument +.B *pav +does not appear to be a flag. +.TP +.B NOARGS\ \ \ \ 0 +All arguments have been successfully examined. +.TP +.B BADFLAG\ \ \-1 +A bad flag (option) argument was supplied to the program. +The argument +.B *pav +contains the offending command line argument. +.TP +.B BADFMT\ \ \-2 +A bad format descriptor string has been detected. +The calling program, rather than the user, was in error. +.de .. +.TP +.B NOTAFILE\ \-3 +A flag type argument rather than a file type argument has been detected. +.. +.LP +General rules for the return code: +.TP 14 +.B >\ 0 +A file type argument was found. +.TP +.B \ \ 0 +All arguments have been parsed. +.TP +.B <\ 0 +An error occured or not a file type argument. +.LP +Flag and file arg processing should be terminated after getting a +return code <= 0. + +.SH EXAMPLES + +.SH "SEE ALSO" +.nh +.sp +.LP +.BR getallargs (3), +.BR getargerror (3), +.BR getargs (3). + +.SH NOTES +Initially, +.B *pav +must point to the first argument (not the +program name) and +.B *pac +must not count the program name. Before calling +.BR getfiles () +again, decrement +.B *pac +and increment +.BR *pav , +or the same name will be pointed to by +.BR *pav . + +.SH BUGS +none + +.SH AUTHOR +.nf +J\*org Schilling +Seestr. 110 +D\-13353 Berlin +Germany +.fi +.PP +Mail bugs and suggestions to: +.PP +.B +schilling@fokus.gmd.de +or +.B +js@cs.tu\-berlin.de +or +.B +joerg@schily.isdn.cs.tu\-berlin.de diff -Nru cdrtools-2.01.01a33/libschily/getfiles.mk3 cdrtools-3.02a09/libschily/getfiles.mk3 --- cdrtools-2.01.01a33/libschily/getfiles.mk3 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/libschily/getfiles.mk3 2015-04-26 18:01:43.000000000 +0000 @@ -0,0 +1,18 @@ +#ident @(#)getfiles.mk3 1.1 15/04/26 +########################################################################### +# Sample makefile for installing manual pages +########################################################################### +SRCROOT= .. +RULESDIR= RULES +include $(SRCROOT)/$(RULESDIR)/rules.top +########################################################################### + +MANDIR= man +TARGETMAN= getfiles +MANSECT= $(MANSECT_LIB) +MANSUFFIX= $(MANSUFF_LIB) +MANFILE= getfiles.3 + +########################################################################### +include $(SRCROOT)/$(RULESDIR)/rules.man +########################################################################### diff -Nru cdrtools-2.01.01a33/libschily/getfp.c cdrtools-3.02a09/libschily/getfp.c --- cdrtools-2.01.01a33/libschily/getfp.c 2006-10-05 15:56:51.000000000 +0000 +++ cdrtools-3.02a09/libschily/getfp.c 2015-12-23 20:18:33.000000000 +0000 @@ -1,8 +1,8 @@ -/* @(#)getfp.c 1.16 06/10/05 Copyright 1988-2003 J. Schilling */ +/* @(#)getfp.c 1.19 15/12/23 Copyright 1988-2015 J. Schilling */ /* * Get frame pointer * - * Copyright (c) 1988-2003 J. Schilling + * Copyright (c) 1988-2015 J. Schilling */ /* * The contents of this file are subject to the terms of the @@ -11,6 +11,8 @@ * with the License. * * See the file CDDL.Schily.txt in this distribution for details. + * A copy of the CDDL is also available via the Internet at + * http://www.opensource.org/licenses/cddl1.txt * * When distributing Covered Code, include this CDDL HEADER in each * file and include the License file CDDL.Schily.txt from this distribution. @@ -50,8 +52,17 @@ # define FP_OFF 0 #endif +#if defined(__clang__) || \ + (defined(__GNUC__) && \ + ((__GNUC__ > 4) || (__GNUC__ == 4 && __GNUC_MINOR__ > 7))) +#define ATTRIBUTE_NO_SANITIZE_ADDRESS __attribute__((no_sanitize_address)) +#else +#define ATTRIBUTE_NO_SANITIZE_ADDRESS +#endif + EXPORT void **___fpoff __PR((char *cp)); +ATTRIBUTE_NO_SANITIZE_ADDRESS EXPORT void ** getfp() { @@ -91,4 +102,13 @@ } #endif +#else /* HAVE_SCANSTACK */ + +EXPORT void ** +getfp() +{ + raisecond("getfp", 0); + return ((void **)0); +} + #endif /* HAVE_SCANSTACK */ diff -Nru cdrtools-2.01.01a33/libschily/getgrent.c cdrtools-3.02a09/libschily/getgrent.c --- cdrtools-2.01.01a33/libschily/getgrent.c 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/libschily/getgrent.c 2011-07-12 20:33:01.000000000 +0000 @@ -0,0 +1,140 @@ +/* @(#)getgrent.c 1.1 11/07/12 Copyright 2011 J. Schilling */ +/* + * Group functions for platforms (like MINGW) that do not have them. + * + * Copyright (c) 2011 J. Schilling + */ +/* + * The contents of this file are subject to the terms of the + * Common Development and Distribution License, Version 1.0 only + * (the "License"). You may not use this file except in compliance + * with the License. + * + * See the file CDDL.Schily.txt in this distribution for details. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file CDDL.Schily.txt from this distribution. + */ + +#include +#include +#include +#include +#include + +#if !defined(HAVE_GETGRNAM) && !defined(HAVE_GETGRENT) && \ + !defined(HAVE_GETGRGID) && !defined(HAVE_SETGRENT) && \ + !defined(HAVE_ENDGRENT) + +LOCAL FILE *grpf; +LOCAL char *list[16+1]; +LOCAL struct group grp; +LOCAL struct group rootgrp = { "root", "*", 0, list }; +LOCAL char grpbuf[128]; + +LOCAL struct group *mkgrp __PR((char *arr[])); +LOCAL struct group *findgrent __PR((const char *string, int field)); + + +EXPORT struct group * +getgrent() +{ + char *arr[7]; + + if (grpf == (FILE *)NULL) { + grpf = fileopen("/etc/group", "r"); + if (grpf == (FILE *)NULL) + return ((struct group *)0); + } + if (fgetline(grpf, grpbuf, sizeof (grpbuf)) == EOF) + return ((struct group *)0); + breakline(grpbuf, ':', arr, 7); + return (mkgrp(arr)); +} + +EXPORT void +setgrent() +{ + if (grpf == (FILE *)NULL) { + grpf = fileopen("/etc/group", "r"); + if (grpf == (FILE *)NULL) + return; + } + fileseek(grpf, (off_t)0); +} + +EXPORT void +endgrent() +{ + if (grpf != (FILE *)NULL) { + fclose(grpf); + grpf = (FILE *)NULL; + } +} + +EXPORT struct group * +getgrnam(name) + const char *name; +{ + setgrent(); + if (grpf == (FILE *)NULL) { + list[0] = NULL; + if (streql(rootgrp.gr_name, name)) + return (&rootgrp); + return ((struct group *)0); + } + return (findgrent(name, 0)); +} + +EXPORT struct group * +getgrgid(gid) + gid_t gid; +{ + char sgid[32]; + + setgrent(); + if (grpf == (FILE *)NULL) { + list[0] = NULL; + if (gid == 0) + return (&rootgrp); + return ((struct group *)0); + } + js_snprintf(sgid, sizeof (sgid), "%lld", (Llong)gid); + return (findgrent(sgid, 2)); +} + +LOCAL struct group * +mkgrp(arr) + char *arr[]; +{ + long l; + + grp.gr_name = arr[0]; + grp.gr_passwd = arr[1]; + (void) astolb(arr[2], &l, 10); + grp.gr_gid = l; + l = breakline(arr[3], ',', list, 16); + list[l] = NULL; + if (list[0][0] == '\0') + list[0] = NULL; + grp.gr_mem = list; + return (&grp); +} + +LOCAL struct group * +findgrent(string, field) + const char *string; + int field; +{ + char *arr[7]; + + for (;;) { + if (fgetline(grpf, grpbuf, sizeof (grpbuf)) == EOF) + return ((struct group *)0); + breakline(grpbuf, ':', arr, 7); + if (streql(string, arr[field])) + return (mkgrp(arr)); + } +} + +#endif diff -Nru cdrtools-2.01.01a33/libschily/gethostid.c cdrtools-3.02a09/libschily/gethostid.c --- cdrtools-2.01.01a33/libschily/gethostid.c 2006-09-26 11:29:58.000000000 +0000 +++ cdrtools-3.02a09/libschily/gethostid.c 2009-08-04 18:05:25.000000000 +0000 @@ -1,10 +1,11 @@ -/* @(#)gethostid.c 1.17 06/09/26 Copyright 1995-2003 J. Schilling */ +/* @(#)gethostid.c 1.20 09/08/04 Copyright 1995-2009 J. Schilling */ +#include #ifndef lint -static char sccsid[] = - "@(#)gethostid.c 1.17 06/09/26 Copyright 1995-2003 J. Schilling"; +static UConst char sccsid[] = + "@(#)gethostid.c 1.20 09/08/04 Copyright 1995-2009 J. Schilling"; #endif /* - * Copyright (c) 1995-2003 J. Schilling + * Copyright (c) 1995-2009 J. Schilling */ /* * The contents of this file are subject to the terms of the @@ -18,13 +19,10 @@ * file and include the License file CDDL.Schily.txt from this distribution. */ -#include #include #include #include -#ifdef HAVE_SYS_SYSTEMINFO_H -#include -#endif +#include #include #ifndef HAVE_GETHOSTID diff -Nru cdrtools-2.01.01a33/libschily/gethostname.c cdrtools-3.02a09/libschily/gethostname.c --- cdrtools-2.01.01a33/libschily/gethostname.c 2006-09-13 15:05:35.000000000 +0000 +++ cdrtools-3.02a09/libschily/gethostname.c 2011-08-04 18:19:49.000000000 +0000 @@ -1,10 +1,11 @@ -/* @(#)gethostname.c 1.16 06/09/13 Copyright 1995 J. Schilling */ +/* @(#)gethostname.c 1.21 11/08/04 Copyright 1995-2011 J. Schilling */ +#include #ifndef lint -static char sccsid[] = - "@(#)gethostname.c 1.16 06/09/13 Copyright 1995 J. Schilling"; +static UConst char sccsid[] = + "@(#)gethostname.c 1.21 11/08/04 Copyright 1995-2011 J. Schilling"; #endif /* - * Copyright (c) 1995 J. Schilling + * Copyright (c) 1995-2011 J. Schilling */ /* * The contents of this file are subject to the terms of the @@ -18,13 +19,10 @@ * file and include the License file CDDL.Schily.txt from this distribution. */ -#include #include #include -#ifdef HAVE_SYS_SYSTEMINFO_H -#include -#endif -#include +#include +#include #ifndef HAVE_GETHOSTNAME EXPORT int gethostname __PR((char *name, int namelen)); @@ -41,10 +39,10 @@ return (-1); return (0); } -#else +#else /* ! SI_HOSTNAME */ -#if defined(HAVE_UNAME) && defined(HAVE_SYS_UTSNAME_H) -#include +#ifdef HAVE_UNAME +#include #include EXPORT int @@ -60,8 +58,71 @@ strncpy(name, uts.nodename, namelen); return (0); } +#else /* !HAVE_UNAME */ + +#if defined(__MINGW32__) || defined(_MSC_VER) +#include +#include +#define gethostname __winsock_gethostname +#include +#undef gethostname + +EXPORT int +gethostname(name, namelen) + char *name; + int namelen; +{ + uint32_t len = namelen; + char nbuf[MAX_COMPUTERNAME_LENGTH+1]; + + if (namelen < 0) { +#ifdef ENOSYS + seterrno(ENOSYS); +#else + seterrno(EINVAL); #endif + return (-1); + } + if (namelen == 0) + return (0); + + name[0] = '\0'; + if (!GetComputerName(name, &len)) { + if (len > namelen) { + nbuf[0] = '\0'; + len = sizeof (nbuf); + (void) GetComputerName(nbuf, &len); + strncpy(name, nbuf, namelen); + return (0); + } + seterrno(EIO); + return (-1); + } + return (0); +} +#else +#include +EXPORT int +gethostname(name, namelen) + char *name; + int namelen; +{ + if (namelen < 0) { +#ifdef ENOSYS + seterrno(ENOSYS); +#else + seterrno(EINVAL); #endif + return (-1); + } + if (namelen > 0) + name[0] = '\0'; + return (0); +} +#endif +#endif /* !HAVE_UNAME */ + +#endif /* !SI_HOSTNAME */ #endif /* HAVE_GETHOSTNAME */ diff -Nru cdrtools-2.01.01a33/libschily/getline.3 cdrtools-3.02a09/libschily/getline.3 --- cdrtools-2.01.01a33/libschily/getline.3 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/libschily/getline.3 1988-07-21 16:35:39.000000000 +0000 @@ -0,0 +1,36 @@ +. \" Manual Seite fuer getline +. \" @(#)getline.3 1.1 +. \" +.if t .ds a \v'-0.55m'\h'0.00n'\z.\h'0.40n'\z.\v'0.55m'\h'-0.40n'a +.if t .ds o \v'-0.55m'\h'0.00n'\z.\h'0.45n'\z.\v'0.55m'\h'-0.45n'o +.if t .ds u \v'-0.55m'\h'0.00n'\z.\h'0.40n'\z.\v'0.55m'\h'-0.40n'u +.if t .ds A \v'-0.77m'\h'0.25n'\z.\h'0.45n'\z.\v'0.77m'\h'-0.70n'A +.if t .ds O \v'-0.77m'\h'0.25n'\z.\h'0.45n'\z.\v'0.77m'\h'-0.70n'O +.if t .ds U \v'-0.77m'\h'0.30n'\z.\h'0.45n'\z.\v'0.77m'\h'-.75n'U +.if t .ds s \(*b +.if t .ds S SS +.if n .ds a ae +.if n .ds o oe +.if n .ds u ue +.if n .ds s sz +.TH GETLINE 3 "15. Juli 1988" "J\*org Schilling" "Schily\'s LIBRARY FUNCTIONS" +.SH NAME +getline() \- reads a line from standard input +.SH SYNOPSIS +.nf +.B +int getline(buffer,length) +.B char *buffer; +.B int length; +.fi +.SH DESCRIPTION +getline() reads up to length characters from the standard input +using getc() (q.v.). The transfer is also terminated by a +newline, end of file, or read error. The buffer is NULL ('\\0') +terminated with the new line removed. +.SH RETURNS +Returns either the number of bytes in the buffer or a standard +system error code (including EOF). +.SH NOTES +getline() always reads to the end of the input line, even if the +line is longer than the buffer. diff -Nru cdrtools-2.01.01a33/libschily/getline.mk3 cdrtools-3.02a09/libschily/getline.mk3 --- cdrtools-2.01.01a33/libschily/getline.mk3 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/libschily/getline.mk3 2015-04-26 18:01:43.000000000 +0000 @@ -0,0 +1,18 @@ +#ident @(#)getline.mk3 1.1 15/04/26 +########################################################################### +# Sample makefile for installing manual pages +########################################################################### +SRCROOT= .. +RULESDIR= RULES +include $(SRCROOT)/$(RULESDIR)/rules.top +########################################################################### + +MANDIR= man +TARGETMAN= getline +MANSECT= $(MANSECT_LIB) +MANSUFFIX= $(MANSUFF_LIB) +MANFILE= getline.3 + +########################################################################### +include $(SRCROOT)/$(RULESDIR)/rules.man +########################################################################### diff -Nru cdrtools-2.01.01a33/libschily/getlogin.c cdrtools-3.02a09/libschily/getlogin.c --- cdrtools-2.01.01a33/libschily/getlogin.c 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/libschily/getlogin.c 2011-08-14 15:22:34.000000000 +0000 @@ -0,0 +1,26 @@ +/* @(#)getlogin.c 1.1 11/08/14 Copyright 2011 J. Schilling */ +/* + * Copyright (c) 2011 J. Schilling + */ +/* + * The contents of this file are subject to the terms of the + * Common Development and Distribution License, Version 1.0 only + * (the "License"). You may not use this file except in compliance + * with the License. + * + * See the file CDDL.Schily.txt in this distribution for details. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file CDDL.Schily.txt from this distribution. + */ + +#include +#include + +#ifndef HAVE_GETLOGIN +EXPORT char * +getlogin() +{ + return ("root"); +} +#endif diff -Nru cdrtools-2.01.01a33/libschily/getnstimeofday.c cdrtools-3.02a09/libschily/getnstimeofday.c --- cdrtools-2.01.01a33/libschily/getnstimeofday.c 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/libschily/getnstimeofday.c 2013-09-30 21:23:34.000000000 +0000 @@ -0,0 +1,96 @@ +/* @(#)getnstimeofday.c 1.2 13/09/30 Copyright 2007-2013 J. Schilling */ +#include +#ifndef lint +static UConst char sccsid[] = + "@(#)getnstimeofday.c 1.2 13/09/30 Copyright 2007-2013 J. Schilling"; +#endif +/* + * getnstimeofday() a nanosecond enabled version of gettimeofday() + * + * Copyright (c) 2007-2013 J. Schilling + */ +/* + * The contents of this file are subject to the terms of the + * Common Development and Distribution License, Version 1.0 only + * (the "License"). You may not use this file except in compliance + * with the License. + * + * See the file CDDL.Schily.txt in this distribution for details. + * A copy of the CDDL is also available via the Internet at + * http://www.opensource.org/licenses/cddl1.txt + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file CDDL.Schily.txt from this distribution. + */ + +#if (defined(_MSC_VER) || defined(__MINGW32__)) +#include +#include +#include +#include + +#ifdef _MSC_VER +const __int64 MS_FTIME_ADD = 0x2b6109100i64; +const __int64 MS_FTIME_SECS = 10000000i64; +#else +const Int64_t MS_FTIME_ADD = 0x2b6109100LL; +const Int64_t MS_FTIME_SECS = 10000000LL; +#endif + +EXPORT int +getnstimeofday(tp) + struct timespec *tp; +{ + FILETIME ft; + Int64_t T; + + if (tp == 0) + return (0); + + GetSystemTimeAsFileTime(&ft); /* 100ns time since 1601 */ + T = ft.dwHighDateTime; + T <<= 32; + T += ft.dwLowDateTime; + + /* + * Cast to avoid a loss of data warning + * MSVC uses long instead of time_t for tv_sec + */ + tp->tv_sec = (long) (T / MS_FTIME_SECS - MS_FTIME_ADD); + tp->tv_nsec = (long) (T % MS_FTIME_SECS) * 100; + + return (0); +} +#else /* (defined(_MSC_VER) || defined(__MINGW32__)) */ + +#include +#include +#include + +EXPORT int +getnstimeofday(tp) + struct timespec *tp; +{ + struct timeval tv; + int ret; + +#if defined(HAVE_CLOCK_GETTIME) && defined(HAVE_CLOCK_GETTIME_IN_LIBC) +#ifdef __CLOCK_REALTIME0 + /* + * Use fasttrap on Solaris + */ + if (clock_gettime(__CLOCK_REALTIME0, tp) == 0) + return (0); +#else + if (clock_gettime(CLOCK_REALTIME, tp) == 0) + return (0); +#endif +#endif + + ret = gettimeofday(&tv, (void *)0); + tp->tv_sec = tv.tv_sec; + tp->tv_nsec = tv.tv_usec * 1000; + return (ret); +} + +#endif /* (defined(_MSC_VER) || defined(__MINGW32__)) */ diff -Nru cdrtools-2.01.01a33/libschily/getnum.c cdrtools-3.02a09/libschily/getnum.c --- cdrtools-2.01.01a33/libschily/getnum.c 2007-02-04 22:19:10.000000000 +0000 +++ cdrtools-3.02a09/libschily/getnum.c 2009-07-08 21:56:15.000000000 +0000 @@ -1,12 +1,13 @@ -/* @(#)getnum.c 1.4 07/02/04 Copyright 1984-2007 J. Schilling */ +/* @(#)getnum.c 1.6 09/07/08 Copyright 1984-2009 J. Schilling */ +#include #ifndef lint -static char sccsid[] = - "@(#)getnum.c 1.4 07/02/04 Copyright 1984-2007 J. Schilling"; +static UConst char sccsid[] = + "@(#)getnum.c 1.6 09/07/08 Copyright 1984-2009 J. Schilling"; #endif /* * Number conversion routines to implement 'dd' like number options. * - * Copyright (c) 1984-2007 J. Schilling + * Copyright (c) 1984-2009 J. Schilling */ /* * The contents of this file are subject to the terms of the @@ -20,7 +21,6 @@ * file and include the License file CDDL.Schily.txt from this distribution. */ -#include #include #include #include diff -Nru cdrtools-2.01.01a33/libschily/getpagesize.c cdrtools-3.02a09/libschily/getpagesize.c --- cdrtools-2.01.01a33/libschily/getpagesize.c 2006-09-13 15:05:35.000000000 +0000 +++ cdrtools-3.02a09/libschily/getpagesize.c 2009-07-10 19:55:11.000000000 +0000 @@ -1,10 +1,11 @@ -/* @(#)getpagesize.c 1.2 06/09/13 Copyright 2001 J. Schilling */ +/* @(#)getpagesize.c 1.5 09/07/10 Copyright 2001-2009 J. Schilling */ +#include #ifndef lint -static char sccsid[] = - "@(#)getpagesize.c 1.2 06/09/13 Copyright 2001 J. Schilling"; +static UConst char sccsid[] = + "@(#)getpagesize.c 1.5 09/07/10 Copyright 2001-2009 J. Schilling"; #endif /* - * Copyright (c) 2001 J. Schilling + * Copyright (c) 2001-2009 J. Schilling */ /* * The contents of this file are subject to the terms of the @@ -18,14 +19,10 @@ * file and include the License file CDDL.Schily.txt from this distribution. */ -#include - #ifndef HAVE_GETPAGESIZE #include #include -#ifdef HAVE_SYS_PARAM_H -#include -#endif +#include #include #ifdef HAVE_OS_H diff -Nru cdrtools-2.01.01a33/libschily/getperm.c cdrtools-3.02a09/libschily/getperm.c --- cdrtools-2.01.01a33/libschily/getperm.c 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/libschily/getperm.c 2012-04-15 10:41:05.000000000 +0000 @@ -0,0 +1,334 @@ +/* @(#)getperm.c 1.5 12/04/15 Copyright 2004-2009 J. Schilling */ +#include +#ifndef lint +static UConst char sccsid[] = + "@(#)getperm.c 1.5 12/04/15 Copyright 2004-2009 J. Schilling"; +#endif +/* + * Parser for chmod(1)/find(1)-perm, .... + * + * Copyright (c) 2004-2009 J. Schilling + */ +/* + * The contents of this file are subject to the terms of the + * Common Development and Distribution License, Version 1.0 only + * (the "License"). You may not use this file except in compliance + * with the License. + * + * See the file CDDL.Schily.txt in this distribution for details. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file CDDL.Schily.txt from this distribution. + */ + +#include +#include +#include +#include +#include + +#include + +EXPORT int getperm __PR((FILE *f, char *perm, char *opname, mode_t *modep, int smode, int flag)); +LOCAL char *getsperm __PR((FILE *f, char *p, mode_t *mp, int smode, int flag)); +LOCAL mode_t iswho __PR((int c)); +LOCAL int isop __PR((int c)); +LOCAL mode_t isperm __PR((int c, int isX)); + +/* + * This is the mode bit translation code stolen from star... + */ +#define TSUID 04000 /* Set UID on execution */ +#define TSGID 02000 /* Set GID on execution */ +#define TSVTX 01000 /* On directories, restricted deletion flag */ +#define TUREAD 00400 /* Read by owner */ +#define TUWRITE 00200 /* Write by owner special */ +#define TUEXEC 00100 /* Execute/search by owner */ +#define TGREAD 00040 /* Read by group */ +#define TGWRITE 00020 /* Write by group */ +#define TGEXEC 00010 /* Execute/search by group */ +#define TOREAD 00004 /* Read by other */ +#define TOWRITE 00002 /* Write by other */ +#define TOEXEC 00001 /* Execute/search by other */ + +#define TALLMODES 07777 /* The low 12 bits mentioned in the standard */ + +#define S_ALLPERM (S_IRWXU|S_IRWXG|S_IRWXO) +#define S_ALLFLAGS (S_ISUID|S_ISGID|S_ISVTX) +#define S_ALLMODES (S_ALLFLAGS | S_ALLPERM) + +#if S_ISUID == TSUID && S_ISGID == TSGID && S_ISVTX == TSVTX && \ + S_IRUSR == TUREAD && S_IWUSR == TUWRITE && S_IXUSR == TUEXEC && \ + S_IRGRP == TGREAD && S_IWGRP == TGWRITE && S_IXGRP == TGEXEC && \ + S_IROTH == TOREAD && S_IWOTH == TOWRITE && S_IXOTH == TOEXEC + +#define HAVE_POSIX_MODE_BITS /* st_mode bits are equal to TAR mode bits */ +#endif + +#ifdef HAVE_POSIX_MODE_BITS /* st_mode bits are equal to TAR mode bits */ +#define OSMODE(xmode) (xmode) +#else +#define OSMODE(xmode) ((xmode & TSUID ? S_ISUID : 0) \ + | (xmode & TSGID ? S_ISGID : 0) \ + | (xmode & TSVTX ? S_ISVTX : 0) \ + | (xmode & TUREAD ? S_IRUSR : 0) \ + | (xmode & TUWRITE ? S_IWUSR : 0) \ + | (xmode & TUEXEC ? S_IXUSR : 0) \ + | (xmode & TGREAD ? S_IRGRP : 0) \ + | (xmode & TGWRITE ? S_IWGRP : 0) \ + | (xmode & TGEXEC ? S_IXGRP : 0) \ + | (xmode & TOREAD ? S_IROTH : 0) \ + | (xmode & TOWRITE ? S_IWOTH : 0) \ + | (xmode & TOEXEC ? S_IXOTH : 0)) +#endif + +EXPORT int +getperm(f, perm, opname, modep, smode, flag) + FILE *f; /* FILE * to print error messages to */ + char *perm; /* Perm string to parse */ + char *opname; /* find(1) operator name / NULL */ + mode_t *modep; /* The mode result */ + int smode; /* The start mode for the computation */ + int flag; /* Flags, see getperm() flag defs */ +{ + char *p; + Llong ll; + mode_t mm; + + p = perm; + if ((flag & GP_FPERM) && *p == '-') + p++; + + if (*p >= '0' && *p <= '7') { + p = astollb(p, &ll, 8); + if (*p) { + if (f) { + if (opname) { + ferrmsgno(f, EX_BAD, + gettext("Non octal character '%c' in '-%s %s'.\n"), + *p, opname, perm); + } else { + ferrmsgno(f, EX_BAD, + gettext("Non octal character '%c' in '%s'.\n"), + *p, perm); + } + } + return (-1); + } + mm = ll & TALLMODES; + *modep = OSMODE(mm); + return (0); + } + p = getsperm(f, p, modep, smode, flag); + if (p && *p != '\0') { + if (f) { + if (opname) { + ferrmsgno(f, EX_BAD, + gettext("Bad perm character '%c' found in '-%s %s'.\n"), + *p, opname, perm); + } else { + ferrmsgno(f, EX_BAD, + gettext("Bad perm character '%c' found in '%s'.\n"), + *p, perm); + } + } + return (-1); + } +#ifdef PERM_DEBUG + error("GETPERM (%c) %4.4lo\n", perm, (long)*modep); +#endif + return (0); +} + +LOCAL char * +getsperm(f, p, mp, smode, flag) + FILE *f; + char *p; /* The perm input string */ + mode_t *mp; /* To set the mode */ + int smode; /* The start mode for the computation */ + int flag; /* Flags, see getperm() flag defs */ +{ +#ifdef OLD + mode_t permval = 0; /* POSIX start value for "find" */ +#else + mode_t permval = smode; /* POSIX start value for "find" */ +#endif + mode_t who; + mode_t m; + int op; + mode_t perms; + mode_t pm; + +nextclause: +#ifdef PERM_DEBUG + error("getsperm(%s)\n", p); +#endif + who = 0; + while ((m = iswho(*p)) != 0) { + p++; + who |= m; + } + if (who == 0) { + mode_t mask; + + if (flag & GP_UMASK) { + who = (S_ISUID|S_ISGID|S_ISVTX|S_IRWXU|S_IRWXG|S_IRWXO); + } else { + umask(mask = umask(0)); + who = ~mask; + who &= (S_ISUID|S_ISGID|S_ISVTX|S_IRWXU|S_IRWXG|S_IRWXO); + } + } +#ifdef PERM_DEBUG + error("WHO %4.4lo\n", (long)who); + error("getsperm(--->%s)\n", p); +#endif + +nextop: + if ((op = isop(*p)) != '\0') + p++; +#ifdef PERM_DEBUG + error("op '%c'\n", op); + error("getsperm(--->%s)\n", p); +#endif + if (op == 0) { + if (f) { + ferrmsgno(f, EX_BAD, gettext("Missing -perm op.\n")); + } + return (p); + } + + flag &= ~(GP_FPERM|GP_UMASK); + if (flag & GP_XERR) + flag = -1; + perms = 0; + while ((pm = isperm(*p, flag)) != (mode_t)-1) { + p++; + perms |= pm; + } +#ifdef PERM_DEBUG + error("PERM %4.4lo\n", (long)perms); + error("START PERMVAL %4.4lo\n", (long)permval); +#endif + if ((perms == 0) && (*p == 'u' || *p == 'g' || *p == 'o')) { + mode_t what = 0; + + /* + * First select the bit triple we like to copy. + */ + switch (*p) { + + case 'u': + what = permval & S_IRWXU; + break; + case 'g': + what = permval & S_IRWXG; + break; + case 'o': + what = permval & S_IRWXO; + break; + } + /* + * Now copy over bit by bit without relying on shifts + * that would make implicit assumptions on values. + */ + if (what & (S_IRUSR|S_IRGRP|S_IROTH)) + perms |= (who & (S_IRUSR|S_IRGRP|S_IROTH)); + if (what & (S_IWUSR|S_IWGRP|S_IWOTH)) + perms |= (who & (S_IWUSR|S_IWGRP|S_IWOTH)); + if (what & (S_IXUSR|S_IXGRP|S_IXOTH)) + perms |= (who & (S_IXUSR|S_IXGRP|S_IXOTH)); + p++; + } +#ifdef PERM_DEBUG + error("getsperm(--->%s)\n", p); +#endif + switch (op) { + + case '=': + permval &= ~who; + /* FALLTHRU */ + case '+': + permval |= (who & perms); + break; + + case '-': + permval &= ~(who & perms); + break; + } +#ifdef PERM_DEBUG + error("END PERMVAL %4.4lo\n", (long)permval); +#endif + if (isop(*p)) + goto nextop; + if (*p == ',') { + p++; + goto nextclause; + } + *mp = permval; + return (p); +} + +LOCAL mode_t +iswho(c) + int c; +{ + switch (c) { + + case 'u': /* user */ + return (S_ISUID|S_ISVTX|S_IRWXU); + case 'g': /* group */ + return (S_ISGID|S_ISVTX|S_IRWXG); + case 'o': /* other */ + return (S_ISVTX|S_IRWXO); + case 'a': /* all */ + return (S_ISUID|S_ISGID|S_ISVTX|S_IRWXU|S_IRWXG|S_IRWXO); + default: + return (0); + } +} + +LOCAL int +isop(c) + int c; /* The current perm character to parse */ +{ + switch (c) { + + case '+': + case '-': + case '=': + return (c); + default: + return (0); + } +} + +LOCAL mode_t +isperm(c, isX) + int c; /* The current perm character to parse */ + int isX; /* -1: Ignore X, 0: no dir/X 1: X OK */ +{ + switch (c) { + + case 'r': + return (S_IRUSR|S_IRGRP|S_IROTH); + case 'w': + return (S_IWUSR|S_IWGRP|S_IWOTH); + case 'X': + if (isX < 0) + return ((mode_t)-1); /* Singnal parse error */ + if (isX == 0) + return ((mode_t)0); /* No 'X' handling here */ + /* FALLTHRU */ + case 'x': + return (S_IXUSR|S_IXGRP|S_IXOTH); + case 's': + return (S_ISUID|S_ISGID); + case 'l': + return (S_ISGID); + case 't': + return (S_ISVTX); + default: + return ((mode_t)-1); + } +} diff -Nru cdrtools-2.01.01a33/libschily/getpwent.c cdrtools-3.02a09/libschily/getpwent.c --- cdrtools-2.01.01a33/libschily/getpwent.c 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/libschily/getpwent.c 2011-07-12 20:33:01.000000000 +0000 @@ -0,0 +1,138 @@ +/* @(#)getpwent.c 1.1 11/07/12 Copyright 2011 J. Schilling */ +/* + * Passwd functions for platforms (like MINGW) that do not have them. + * + * Copyright (c) 2011 J. Schilling + */ +/* + * The contents of this file are subject to the terms of the + * Common Development and Distribution License, Version 1.0 only + * (the "License"). You may not use this file except in compliance + * with the License. + * + * See the file CDDL.Schily.txt in this distribution for details. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file CDDL.Schily.txt from this distribution. + */ + +#include +#include +#include +#include +#include + +#if !defined(HAVE_GETPWNAM) && !defined(HAVE_GETPWENT) && \ + !defined(HAVE_GETPWUID) && !defined(HAVE_SETPWENT) && \ + !defined(HAVE_ENDPWENT) + + +LOCAL FILE *pwdf; +LOCAL struct passwd pwd; +LOCAL struct passwd rootpwd = { "root", "*", 0, 0, "", "/", "" }; +LOCAL char pwdbuf[128]; + +LOCAL struct passwd *mkpwd __PR((char *arr[])); +LOCAL struct passwd *findpwent __PR((const char *string, int field)); + +EXPORT struct passwd * +getpwent() +{ + char *arr[7]; + + if (pwdf == (FILE *)NULL) { + pwdf = fileopen("/etc/passwd", "r"); + if (pwdf == (FILE *)NULL) + return ((struct passwd *)0); + } + if (fgetline(pwdf, pwdbuf, sizeof (pwdbuf)) == EOF) + return ((struct passwd *)0); + breakline(pwdbuf, ':', arr, 7); + return (mkpwd(arr)); +} + +EXPORT void +setpwent() +{ + if (pwdf == (FILE *)NULL) { + pwdf = fileopen("/etc/passwd", "r"); + if (pwdf == (FILE *)NULL) + return; + } + fileseek(pwdf, (off_t)0); +} + +EXPORT void +endpwent() +{ + if (pwdf != (FILE *)NULL) { + fclose(pwdf); + pwdf = (FILE *)NULL; + } +} + +EXPORT struct passwd * +getpwnam(name) + const char *name; +{ + setpwent(); + if (pwdf == (FILE *)NULL) { + if (streql(rootpwd.pw_name, name)) + return (&rootpwd); + return ((struct passwd *)0); + } + return (findpwent(name, 0)); +} + +EXPORT struct passwd * +getpwuid(uid) + uid_t uid; +{ + char suid[32]; + + setpwent(); + if (pwdf == (FILE *)NULL) { + if (uid == 0) + return (&rootpwd); + return ((struct passwd *)0); + } + js_snprintf(suid, sizeof (suid), "%lld", (Llong)uid); + return (findpwent(suid, 2)); +} + +LOCAL struct passwd * +mkpwd(arr) + char *arr[]; +{ + long l; + + pwd.pw_name = arr[0]; + pwd.pw_passwd = arr[1]; + (void) astolb(arr[2], &l, 10); + pwd.pw_uid = l; + (void) astolb(arr[3], &l, 10); + pwd.pw_gid = l; + pwd.pw_gecos = arr[4]; + pwd.pw_dir = arr[5]; + pwd.pw_shell = arr[6]; + + return (&pwd); +} + +LOCAL struct passwd * +findpwent(string, field) + const char *string; + int field; +{ + char *arr[7]; + + for (;;) { + if (fgetline(pwdf, pwdbuf, sizeof (pwdbuf)) == EOF) + return ((struct passwd *)0); + breakline(pwdbuf, ':', arr, 7); + if (streql(string, arr[field])) + return (mkpwd(arr)); + } +} + +#endif diff -Nru cdrtools-2.01.01a33/libschily/gettimeofday.c cdrtools-3.02a09/libschily/gettimeofday.c --- cdrtools-2.01.01a33/libschily/gettimeofday.c 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/libschily/gettimeofday.c 2012-11-29 21:59:41.000000000 +0000 @@ -0,0 +1,89 @@ +/* @(#)gettimeofday.c 1.9 12/11/29 Copyright 2007-2012 J. Schilling */ +#include +#ifndef lint +static UConst char sccsid[] = + "@(#)gettimeofday.c 1.9 12/11/29 Copyright 2007-2012 J. Schilling"; +#endif +/* + * Emulate gettimeofday where it does not exist + * + * Copyright (c) 2007-2012 J. Schilling + */ +/* + * The contents of this file are subject to the terms of the + * Common Development and Distribution License, Version 1.0 only + * (the "License"). You may not use this file except in compliance + * with the License. + * + * See the file CDDL.Schily.txt in this distribution for details. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file CDDL.Schily.txt from this distribution. + */ + +#if !defined(HAVE_GETTIMEOFDAY) +#if (defined(_MSC_VER) || defined(__MINGW32__)) +#include +#include +#include +#include + +#ifdef _MSC_VER +const __int64 MS_FTIME_ADD = 0x2b6109100i64; +const __int64 MS_FTIME_SECS = 10000000i64; +#else +const Int64_t MS_FTIME_ADD = 0x2b6109100LL; +const Int64_t MS_FTIME_SECS = 10000000LL; +#endif + +EXPORT int +gettimeofday(tp, dummy) + struct timeval *tp; + void *dummy; /* tzp is unspecified by POSIX */ +{ + FILETIME ft; + Int64_t T; + + if (tp == 0) + return (0); + + GetSystemTimeAsFileTime(&ft); /* 100ns time since 1601 */ + T = ft.dwHighDateTime; + T <<= 32; + T += ft.dwLowDateTime; + + /* + * Cast to avoid a loss of data warning + * MSVC uses long instead of time_t for tv_sec + */ + tp->tv_sec = (long) (T / MS_FTIME_SECS - MS_FTIME_ADD); + tp->tv_usec = (long) (T % MS_FTIME_SECS) / 10; + + return (0); +} +#else /* (defined(_MSC_VER) || defined(__MINGW32__)) */ + +#ifdef HAVE_TIME +#include +#include + +EXPORT int +gettimeofday(tp, dummy) + struct timeval *tp; + void *dummy; /* tzp is unspecified by POSIX */ +{ + time_t t; + + if (tp == 0) + return (0); + + (void) time(&t); + tp->tv_sec = t; + tp->tv_usec = 0; + + return (0); +} +#endif + +#endif /* (defined(_MSC_VER) || defined(__MINGW32__)) */ +#endif /* !defined(HAVE_GETTIMEOFDAY) */ diff -Nru cdrtools-2.01.01a33/libschily/gettnum.c cdrtools-3.02a09/libschily/gettnum.c --- cdrtools-2.01.01a33/libschily/gettnum.c 2007-02-04 22:19:10.000000000 +0000 +++ cdrtools-3.02a09/libschily/gettnum.c 2009-07-08 21:56:15.000000000 +0000 @@ -1,13 +1,14 @@ -/* @(#)gettnum.c 1.7 07/02/04 Copyright 1984-2002, 2004-2007 J. Schilling */ +/* @(#)gettnum.c 1.9 09/07/08 Copyright 1984-2002, 2004-2009 J. Schilling */ +#include #ifndef lint -static char sccsid[] = - "@(#)gettnum.c 1.7 07/02/04 Copyright 1984-2002, 2004-2007 J. Schilling"; +static UConst char sccsid[] = + "@(#)gettnum.c 1.9 09/07/08 Copyright 1984-2002, 2004-2009 J. Schilling"; #endif /* * Generic time conversion routines rewritten from * 'dd' like number conversion in 'sdd'. * - * Copyright (c) 1984-2002, 2004-2007 J. Schilling + * Copyright (c) 1984-2002, 2004-2009 J. Schilling */ /* * The contents of this file are subject to the terms of the @@ -21,7 +22,6 @@ * file and include the License file CDDL.Schily.txt from this distribution. */ -#include #include #include #include diff -Nru cdrtools-2.01.01a33/libschily/getxnum.c cdrtools-3.02a09/libschily/getxnum.c --- cdrtools-2.01.01a33/libschily/getxnum.c 2007-02-04 22:19:10.000000000 +0000 +++ cdrtools-3.02a09/libschily/getxnum.c 2009-07-08 21:56:15.000000000 +0000 @@ -1,13 +1,14 @@ -/* @(#)getxnum.c 1.4 07/02/04 Copyright 1984-2007 J. Schilling */ +/* @(#)getxnum.c 1.6 09/07/08 Copyright 1984-2009 J. Schilling */ +#include #ifndef lint -static char sccsid[] = - "@(#)getxnum.c 1.4 07/02/04 Copyright 1984-2007 J. Schilling"; +static UConst char sccsid[] = + "@(#)getxnum.c 1.6 09/07/08 Copyright 1984-2009 J. Schilling"; #endif /* * Generic number conversion routines. * Originally taken from sdd.c to implement 'dd' like number options. * - * Copyright (c) 1984-2007 J. Schilling + * Copyright (c) 1984-2009 J. Schilling */ /* * The contents of this file are subject to the terms of the @@ -21,7 +22,6 @@ * file and include the License file CDDL.Schily.txt from this distribution. */ -#include #include #include #include diff -Nru cdrtools-2.01.01a33/libschily/getxtnum.c cdrtools-3.02a09/libschily/getxtnum.c --- cdrtools-2.01.01a33/libschily/getxtnum.c 2007-02-04 22:19:10.000000000 +0000 +++ cdrtools-3.02a09/libschily/getxtnum.c 2009-07-08 21:56:15.000000000 +0000 @@ -1,13 +1,14 @@ -/* @(#)getxtnum.c 1.7 07/02/04 Copyright 1984-2002, 2004-2007 J. Schilling */ +/* @(#)getxtnum.c 1.9 09/07/08 Copyright 1984-2002, 2004-2009 J. Schilling */ +#include #ifndef lint -static char sccsid[] = - "@(#)getxtnum.c 1.7 07/02/04 Copyright 1984-2002, 2004-2007 J. Schilling"; +static UConst char sccsid[] = + "@(#)getxtnum.c 1.9 09/07/08 Copyright 1984-2002, 2004-2009 J. Schilling"; #endif /* * Generic time conversion routines rewritten from * 'dd' like number conversion in 'sdd'. * - * Copyright (c) 1984-2002, 2004-2007 J. Schilling + * Copyright (c) 1984-2002, 2004-2009 J. Schilling */ /* * The contents of this file are subject to the terms of the @@ -21,7 +22,6 @@ * file and include the License file CDDL.Schily.txt from this distribution. */ -#include #include #include #include diff -Nru cdrtools-2.01.01a33/libschily/gid.c cdrtools-3.02a09/libschily/gid.c --- cdrtools-2.01.01a33/libschily/gid.c 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/libschily/gid.c 2011-07-11 21:45:33.000000000 +0000 @@ -0,0 +1,64 @@ +/* @(#)gid.c 1.1 11/07/11 Copyright 2011 J. Schilling */ +/* + * Dummy functions for gid handling, used e.g. on MINGW + * + * Copyright (c) 2011 J. Schilling + */ +/* + * The contents of this file are subject to the terms of the + * Common Development and Distribution License, Version 1.0 only + * (the "License"). You may not use this file except in compliance + * with the License. + * + * See the file CDDL.Schily.txt in this distribution for details. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file CDDL.Schily.txt from this distribution. + */ + +#include +#include +#include +#include + +#ifndef HAVE_GETGID + +EXPORT gid_t +getgid() +{ + return (0); +} + +#endif + +#ifndef HAVE_GETEGID + +EXPORT gid_t +getegid() +{ + return (0); +} + +#endif + +#ifndef HAVE_SETGID + +EXPORT int +setgid(gid) + gid_t gid; +{ + return (0); +} + +#endif + +#ifndef HAVE_SETEGID + +EXPORT int +setegid(gid) + gid_t gid; +{ + return (0); +} + +#endif diff -Nru cdrtools-2.01.01a33/libschily/handlecond.3 cdrtools-3.02a09/libschily/handlecond.3 --- cdrtools-2.01.01a33/libschily/handlecond.3 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/libschily/handlecond.3 1989-08-30 21:41:59.000000000 +0000 @@ -0,0 +1,89 @@ +. \" Manual Seite fuer handle +. \" @(#)handle.3 1.1 +. \" +.if t .ds a \v'-0.55m'\h'0.00n'\z.\h'0.40n'\z.\v'0.55m'\h'-0.40n'a +.if t .ds o \v'-0.55m'\h'0.00n'\z.\h'0.45n'\z.\v'0.55m'\h'-0.45n'o +.if t .ds u \v'-0.55m'\h'0.00n'\z.\h'0.40n'\z.\v'0.55m'\h'-0.40n'u +.if t .ds A \v'-0.77m'\h'0.25n'\z.\h'0.45n'\z.\v'0.77m'\h'-0.70n'A +.if t .ds O \v'-0.77m'\h'0.25n'\z.\h'0.45n'\z.\v'0.77m'\h'-0.70n'O +.if t .ds U \v'-0.77m'\h'0.30n'\z.\h'0.45n'\z.\v'0.77m'\h'-.75n'U +.if t .ds s \(*b +.if t .ds S SS +.if n .ds a ae +.if n .ds o oe +.if n .ds u ue +.if n .ds s sz +.TH HANDLE 3 "15. Juli 1988" "J\*org Schilling" "Schily\'s LIBRARY FUNCTIONS" +.SH NAME +handle() \- sets a function to handle a condition +.SH SYNOPSIS +.nf +.B +#include +.B +handle(signame, sp, func, arg1) +.B char *signame; +.B SIGBLK *sp; +.B int (*func)(); +.B long arg1; +.fi +.SH DESCRIPTION +handle() sets up a handler for a condition. The user must +explicitly allocate the condition block and pass it to the +function. +.PP +handle() establishes function func as the condition handler for +the condition signame. arg1 is passed to func at the time of +condition signalling. signame "any_other", catches all +conditions. +.PP +The specified function is called with the actual condition being +signalled, with arguments from the latest handle() call for that +function in the given frame and from the call to raise(). For +instance: +.PP +.nf +.B +int func (signame, arg1, arg2) +.B + char *signame; /* the actual condition being +.B + /* signalled */ +.B + int arg1; /* arg1 comes from the handle +.B + /* call that set up the handler */ +.B + int arg2; /* arg2 comes from the raise call */ +.fi +.PP +If the function returns TRUE (non-zero), it is assumed that the +condition has been successfully handled; otherwise, the +condition is signalled farther down the stack. +.SH RETURNS +none +.SH NOTES +Be careful when declaring args to func if they are not long; +both args will occupy sizeof(long) bytes in the arglist. +If FALSE is returned by a condition handler, and there is an +any_other handler in the same block, the any_other handler will +be invoked (only once, since it too may return FALSE). +.PP +To revert a condition handler simply use NULL as func. +.PP +SIGBLK, defined in , must be included. +handle() is frequently used with longjmp() and setjmp(). +.PP +Eah function which calls +.I handle() +must call +.I unhandle() +before it returns. Otherwise the return will fail. +.SH BUGS +.I Handle() +makes the framepointer odd, to mark the current stack frame. +.PP +This confuses programs like +.B adb(1) +and +.B dbx(1). diff -Nru cdrtools-2.01.01a33/libschily/handlecond.mk3 cdrtools-3.02a09/libschily/handlecond.mk3 --- cdrtools-2.01.01a33/libschily/handlecond.mk3 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/libschily/handlecond.mk3 2015-04-26 18:01:43.000000000 +0000 @@ -0,0 +1,18 @@ +#ident @(#)handlecond.mk3 1.1 15/04/26 +########################################################################### +# Sample makefile for installing manual pages +########################################################################### +SRCROOT= .. +RULESDIR= RULES +include $(SRCROOT)/$(RULESDIR)/rules.top +########################################################################### + +MANDIR= man +TARGETMAN= handlecond +MANSECT= $(MANSECT_LIB) +MANSUFFIX= $(MANSUFF_LIB) +MANFILE= handlecond.3 + +########################################################################### +include $(SRCROOT)/$(RULESDIR)/rules.man +########################################################################### diff -Nru cdrtools-2.01.01a33/libschily/jmem.c cdrtools-3.02a09/libschily/jmem.c --- cdrtools-2.01.01a33/libschily/jmem.c 2007-04-03 16:30:35.000000000 +0000 +++ cdrtools-3.02a09/libschily/jmem.c 2015-05-10 08:25:13.000000000 +0000 @@ -1,12 +1,13 @@ -/* @(#)jmem.c 1.10 07/04/03 Copyright 1998-2007 J. Schilling */ +/* @(#)jmem.c 1.13 15/05/10 Copyright 1998-2015 J. Schilling */ +#include #ifndef lint -static char sccsid[] = - "@(#)jmem.c 1.10 07/04/03 Copyright 1998-2007 J. Schilling"; +static UConst char sccsid[] = + "@(#)jmem.c 1.13 15/05/10 Copyright 1998-2015 J. Schilling"; #endif /* * Memory handling with error checking * - * Copyright (c) 1998-2007 J. Schilling + * Copyright (c) 1998-2015 J. Schilling */ /* * The contents of this file are subject to the terms of the @@ -15,13 +16,14 @@ * with the License. * * See the file CDDL.Schily.txt in this distribution for details. + * A copy of the CDDL is also available via the Internet at + * http://www.opensource.org/licenses/cddl1.txt * * When distributing Covered Code, include this CDDL HEADER in each * file and include the License file CDDL.Schily.txt from this distribution. */ -#include -#include +#include #include #include #include @@ -30,10 +32,24 @@ #include #include +EXPORT int __jmexval __PR((int exval)); EXPORT void *__jmalloc __PR((size_t size, char *msg, sigjmps_t *jmp)); EXPORT void *__jrealloc __PR((void *ptr, size_t size, char *msg, sigjmps_t *jmp)); EXPORT char *__jsavestr __PR((const char *s, sigjmps_t *jmp)); +LOCAL int jmexval; + +EXPORT int +__jmexval(exval) + int exval; +{ + int ret = jmexval; + + jmexval = exval; + + return (ret); +} + EXPORT void * __jmalloc(size, msg, jmp) size_t size; @@ -47,6 +63,8 @@ int err = geterrno(); errmsg(gettext("Cannot allocate memory for %s.\n"), msg); + if (jmexval) + err = jmexval; if (jmp == JM_EXIT) comexit(err); if (jmp != NULL) @@ -72,6 +90,8 @@ int err = geterrno(); errmsg(gettext("Cannot realloc memory for %s.\n"), msg); + if (jmexval) + err = jmexval; if (jmp == JM_EXIT) comexit(err); if (jmp != NULL) diff -Nru cdrtools-2.01.01a33/libschily/jsdprintf.c cdrtools-3.02a09/libschily/jsdprintf.c --- cdrtools-2.01.01a33/libschily/jsdprintf.c 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/libschily/jsdprintf.c 2017-08-03 19:30:51.000000000 +0000 @@ -0,0 +1,96 @@ +/* @(#)jsdprintf.c 1.2 17/08/03 Copyright 1985, 1989, 1995-2017 J. Schilling */ +/* + * Copyright (c) 1985, 1989, 1995-2017 J. Schilling + */ +/* + * The contents of this file are subject to the terms of the + * Common Development and Distribution License, Version 1.0 only + * (the "License"). You may not use this file except in compliance + * with the License. + * + * See the file CDDL.Schily.txt in this distribution for details. + * A copy of the CDDL is also available via the Internet at + * http://www.opensource.org/licenses/cddl1.txt + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file CDDL.Schily.txt from this distribution. + */ + +#include +#include +#include +#include +#include + +#define BFSIZ 256 + +typedef struct { + short cnt; + char *ptr; + char buf[BFSIZ]; + int count; + int fd; +} *BUF, _BUF; + +LOCAL void _bflush __PR((BUF)); +LOCAL void _bput __PR((char, void *)); +EXPORT int js_dprintf __PR((int, const char *, ...)) __printflike__(2, 3); + +LOCAL void +_bflush(bp) + register BUF bp; +{ + bp->count += bp->ptr - bp->buf; + if (write(bp->fd, bp->buf, bp->ptr - bp->buf) < 0) + bp->count = EOF; + bp->ptr = bp->buf; + bp->cnt = BFSIZ; +} + +#ifdef PROTOTYPES +LOCAL void +_bput(char c, void *l) +#else +LOCAL void +_bput(c, l) + char c; + void *l; +#endif +{ + register BUF bp = (BUF)l; + + *bp->ptr++ = c; + if (--bp->cnt <= 0) + _bflush(bp); +} + +/* VARARGS2 */ +#ifdef PROTOTYPES +EXPORT int +js_dprintf(int fd, const char *form, ...) +#else +EXPORT int +js_dprintf(fd, form, va_alist) + int fd; + char *form; + va_dcl +#endif +{ + va_list args; + _BUF bb; + + bb.ptr = bb.buf; + bb.cnt = BFSIZ; + bb.count = 0; + bb.fd = fd; +#ifdef PROTOTYPES + va_start(args, form); +#else + va_start(args); +#endif + format(_bput, &bb, form, args); + va_end(args); + if (bb.cnt < BFSIZ) + _bflush(&bb); + return (bb.count); +} diff -Nru cdrtools-2.01.01a33/libschily/jsprintf.c cdrtools-3.02a09/libschily/jsprintf.c --- cdrtools-2.01.01a33/libschily/jsprintf.c 2006-09-13 15:05:35.000000000 +0000 +++ cdrtools-3.02a09/libschily/jsprintf.c 2017-08-03 19:30:51.000000000 +0000 @@ -1,6 +1,6 @@ -/* @(#)jsprintf.c 1.16 06/09/13 Copyright 1985, 1995-2003 J. Schilling */ +/* @(#)jsprintf.c 1.20 17/08/03 Copyright 1985, 1995-2017 J. Schilling */ /* - * Copyright (c) 1985, 1995-2003 J. Schilling + * Copyright (c) 1985, 1995-2017 J. Schilling */ /* * The contents of this file are subject to the terms of the @@ -9,17 +9,89 @@ * with the License. * * See the file CDDL.Schily.txt in this distribution for details. + * A copy of the CDDL is also available via the Internet at + * http://www.opensource.org/licenses/cddl1.txt * * When distributing Covered Code, include this CDDL HEADER in each * file and include the License file CDDL.Schily.txt from this distribution. */ #include -#include +#include +#include #include #include #include +#ifdef NO_FPRFORMAT +#undef USE_FPRFORMAT +#else +#define USE_FPRFORMAT +#endif + +#ifdef USE_FPRFORMAT +/* + * This is the speed-optimized version that currently only has been tested + * on Solaris. + * It is based on fprformat() instead of format() and is faster than the + * the format() based standard implementation, in case that putc() or + * putc_unlocked() is a macro. + */ + +/* VARARGS1 */ +#ifdef PROTOTYPES +EXPORT int +js_printf(const char *form, ...) +#else +EXPORT int +js_printf(form, va_alist) + char *form; + va_dcl +#endif +{ + va_list args; + int ret; + +#ifdef PROTOTYPES + va_start(args, form); +#else + va_start(args); +#endif + ret = fprformat(stdout, form, args); + va_end(args); + return (ret); +} + +/* VARARGS2 */ +#ifdef PROTOTYPES +EXPORT int +js_fprintf(FILE *file, const char *form, ...) +#else +EXPORT int +js_fprintf(file, form, va_alist) + FILE *file; + char *form; + va_dcl +#endif +{ + va_list args; + int ret; + +#ifdef PROTOTYPES + va_start(args, form); +#else + va_start(args); +#endif + ret = fprformat(file, form, args); + va_end(args); + return (ret); +} + +#else /* !USE_FPRFORMAT */ +/* + * This is the portable standard implementation that works anywhere. + */ + #define BFSIZ 256 typedef struct { @@ -31,7 +103,7 @@ } *BUF, _BUF; LOCAL void _bflush __PR((BUF)); -LOCAL void _bput __PR((char, long)); +LOCAL void _bput __PR((char, void *)); EXPORT int js_fprintf __PR((FILE *, const char *, ...)); EXPORT int js_printf __PR((const char *, ...)); @@ -48,12 +120,12 @@ #ifdef PROTOTYPES LOCAL void -_bput(char c, long l) +_bput(char c, void *l) #else LOCAL void _bput(c, l) char c; - long l; + void *l; #endif { register BUF bp = (BUF)l; @@ -86,7 +158,7 @@ #else va_start(args); #endif - format(_bput, (long)&bb, form, args); + format(_bput, &bb, form, args); va_end(args); if (bb.cnt < BFSIZ) _bflush(&bb); @@ -117,9 +189,10 @@ #else va_start(args); #endif - format(_bput, (long)&bb, form, args); + format(_bput, &bb, form, args); va_end(args); if (bb.cnt < BFSIZ) _bflush(&bb); return (bb.count); } +#endif diff -Nru cdrtools-2.01.01a33/libschily/jssnprintf.c cdrtools-3.02a09/libschily/jssnprintf.c --- cdrtools-2.01.01a33/libschily/jssnprintf.c 2006-09-13 15:05:35.000000000 +0000 +++ cdrtools-3.02a09/libschily/jssnprintf.c 2017-08-03 19:30:51.000000000 +0000 @@ -1,6 +1,6 @@ -/* @(#)jssnprintf.c 1.11 06/09/13 Copyright 1985, 1995-2004 J. Schilling */ +/* @(#)jssnprintf.c 1.14 17/08/03 Copyright 1985, 1995-2017 J. Schilling */ /* - * Copyright (c) 1985, 1995-2004 J. Schilling + * Copyright (c) 1985, 1995-2017 J. Schilling */ /* * The contents of this file are subject to the terms of the @@ -9,6 +9,8 @@ * with the License. * * See the file CDDL.Schily.txt in this distribution for details. + * A copy of the CDDL is also available via the Internet at + * http://www.opensource.org/licenses/cddl1.txt * * When distributing Covered Code, include this CDDL HEADER in each * file and include the License file CDDL.Schily.txt from this distribution. @@ -16,8 +18,8 @@ #include #include /* include try to get size_t */ -#include /* Try again for size_t */ -#include /* Try again for size_t */ +#include /* Try again for size_t */ +#include /* Try again for size_t */ #include #include #include @@ -30,11 +32,13 @@ } *BUF, _BUF; #ifdef PROTOTYPES -static void _cput(char c, long l) +static void +_cput(char c, void *l) #else -static void _cput(c, l) +static void +_cput(c, l) char c; - long l; + void *l; #endif { register BUF bp = (BUF)l; @@ -74,7 +78,7 @@ #else va_start(args); #endif - cnt = format(_cput, (long)&bb, form, args); + cnt = format(_cput, &bb, form, args); va_end(args); if (maxcnt > 0) *(bb.ptr) = '\0'; diff -Nru cdrtools-2.01.01a33/libschily/jssprintf.c cdrtools-3.02a09/libschily/jssprintf.c --- cdrtools-2.01.01a33/libschily/jssprintf.c 2006-09-13 15:05:35.000000000 +0000 +++ cdrtools-3.02a09/libschily/jssprintf.c 2017-08-03 19:30:51.000000000 +0000 @@ -1,6 +1,6 @@ -/* @(#)jssprintf.c 1.16 06/09/13 Copyright 1985, 1995-2003 J. Schilling */ +/* @(#)jssprintf.c 1.19 17/08/03 Copyright 1985, 1995-2017 J. Schilling */ /* - * Copyright (c) 1985, 1995-2003 J. Schilling + * Copyright (c) 1985, 1995-2017 J. Schilling */ /* * The contents of this file are subject to the terms of the @@ -9,6 +9,8 @@ * with the License. * * See the file CDDL.Schily.txt in this distribution for details. + * A copy of the CDDL is also available via the Internet at + * http://www.opensource.org/licenses/cddl1.txt * * When distributing Covered Code, include this CDDL HEADER in each * file and include the License file CDDL.Schily.txt from this distribution. @@ -25,14 +27,16 @@ EXPORT int js_sprintf __PR((char *, const char *, ...)); #ifdef PROTOTYPES -static void _cput(char c, long ba) +static void +_cput(char c, void *ba) #else -static void _cput(c, ba) +static void +_cput(c, ba) char c; - long ba; + void *ba; #endif { - *(*(char **) ba)++ = c; + *(*(char **)ba)++ = c; } /* VARARGS2 */ @@ -56,7 +60,7 @@ #else va_start(args); #endif - cnt = format(_cput, (long)&bp, form, args); + cnt = format(_cput, &bp, form, args); va_end(args); *bp = '\0'; diff -Nru cdrtools-2.01.01a33/libschily/kill.c cdrtools-3.02a09/libschily/kill.c --- cdrtools-2.01.01a33/libschily/kill.c 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/libschily/kill.c 2011-08-05 19:32:35.000000000 +0000 @@ -0,0 +1,96 @@ +/* @(#)kill.c 1.1 11/08/05 Copyright 2011 J. Schilling */ +#include +#ifndef lint +static UConst char sccsid[] = + "@(#)kill.c 1.1 11/08/05 Copyright 2011 J. Schilling"; +#endif +/* + * Copyright (c) 2011 J. Schilling + */ +/* + * The contents of this file are subject to the terms of the + * Common Development and Distribution License, Version 1.0 only + * (the "License"). You may not use this file except in compliance + * with the License. + * + * See the file CDDL.Schily.txt in this distribution for details. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file CDDL.Schily.txt from this distribution. + */ + +#ifndef HAVE_KILL + +#include +#include +#include +#include + +EXPORT int kill __PR((pid_t pid, int sig)); + +#if defined(__MINGW32__) || defined(_MSC_VER) +#include +#include +#include + +#pragma comment(lib, "Psapi.lib") + +LOCAL int have_pid __PR((pid_t pid)); + +#define MAX_PIDS 1024 + +LOCAL int +have_pid(pid) + pid_t pid; +{ + uint32_t procs[MAX_PIDS]; + uint32_t nents; + int i; + + if (pid == 0) + return (0); + + if (!EnumProcesses(procs, sizeof (procs), &nents)) { + seterrno(ESRCH); + return (-1); + } + nents /= sizeof (uint32_t); + + for (i = 0; i < nents; i++) { + if (pid == procs[i]) + return (0); + } + seterrno(ESRCH); + return (-1); +} + +EXPORT int +kill(pid, sig) + pid_t pid; + int sig; +{ + if (sig != 0) { + seterrno(ENOSYS); + return (-1); + } + return (have_pid(pid)); +} + +#else /* defined(__MINGW32__) || defined(_MSC_VER) */ + +EXPORT int +kill(pid, sig) + pid_t pid; + int sig; +{ +#ifdef ENOSYS + seterrno(ENOSYS); +#else + seterrno(EINVAL); +#endif + return (-1); +} + +#endif /* defined(__MINGW32__) || defined(_MSC_VER) */ + +#endif /* HAVE_KILL */ diff -Nru cdrtools-2.01.01a33/libschily/lchmod.c cdrtools-3.02a09/libschily/lchmod.c --- cdrtools-2.01.01a33/libschily/lchmod.c 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/libschily/lchmod.c 2014-06-03 18:32:37.000000000 +0000 @@ -0,0 +1,68 @@ +/* @(#)lchmod.c 1.1 14/06/03 Copyright 2014 J. Schilling */ +/* + * Emulate the behavior of lchmod(const char *name, mode_t mode) + * + * Copyright (c) 2014 J. Schilling + */ +/* + * The contents of this file are subject to the terms of the + * Common Development and Distribution License, Version 1.0 only + * (the "License"). You may not use this file except in compliance + * with the License. + * + * See the file CDDL.Schily.txt in this distribution for details. + * A copy of the CDDL is also available via the Internet at + * http://www.opensource.org/licenses/cddl1.txt + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file CDDL.Schily.txt from this distribution. + */ + +#include +#include +#include +#include +#include +#include +#include +#include + +#ifndef HAVE_LCHMOD +#ifdef PROTOTYPES +EXPORT int +lchmod(const char *name, mode_t mode) +#else +EXPORT int +lchmod(name, mode) + const char *name; + mode_t mode; +#endif +{ + struct stat statbuf; + + statbuf.st_mode = 0; + fstatat(AT_FDCWD, name, &statbuf, AT_SYMLINK_NOFOLLOW); + +#ifdef HAVE_CHMOD + if (!S_ISLNK(statbuf.st_mode)) + return (chmod(name, mode)); + +#else /* !HAVE_CHMOD */ + if (!S_ISLNK(statbuf.st_mode)) { +#ifdef ENOSYS + seterrno(ENOSYS); +#else + seterrno(EINVAL); +#endif + return (-1); + } +#endif /* !HAVE_CHMOD */ + +#ifdef EOPNOTSUPP + seterrno(EOPNOTSUPP); +#else + seterrno(EINVAL); +#endif + return (-1); +} +#endif /* HAVE_LCHMOD */ diff -Nru cdrtools-2.01.01a33/libschily/libschily-mapvers cdrtools-3.02a09/libschily/libschily-mapvers --- cdrtools-2.01.01a33/libschily/libschily-mapvers 2007-04-03 16:39:50.000000000 +0000 +++ cdrtools-3.02a09/libschily/libschily-mapvers 2017-07-02 16:46:23.000000000 +0000 @@ -1,4 +1,312 @@ -# @(#)libschily-mapvers 1.10 07/04/03 Copyright 2005-2006 J. Schilling +# /* @(#)libschily-mapvers 1.52 17/07/02 Copyright 2005-2015 J. Schilling */ +#include + +SCHILY_1.8 { +global: + astoul; + astoulb; + js_dprintf; + movecbytes; + patmbmatch; + patmblmatch; +} SCHILY_1.7; + +SCHILY_1.7 { +global: +#ifndef HAVE_GETDELIM + getdelim; +#endif + js_fjmexval; + js_jmexval; + js_mexval; + strlcatl; + wcslcatl; +} SCHILY_1.6; + +SCHILY_1.6 { +global: + absfpath; + resolvefpath; + closewd; + fdsetname; + fdclosename; + lxchdir; + qftoes; + qftofs; + restorewd; + savewd; +#ifndef HAVE_FACCESSAT + faccessat; +#endif +#ifndef HAVE_LCHMOD + lchmod; +#endif +#ifndef HAVE_FCHDIR + fchdir; +#endif +#ifndef HAVE_FCHMODAT + fchmodat; +#endif +#ifndef HAVE_FCHOWNAT + fchownat; +#endif +#ifndef HAVE_FDOPENDIR + fdopendir; +#endif +#ifndef HAVE_FSTATAT + fstatat; +#endif +#ifndef HAVE_FUTIMENS + futimens; +#endif +#ifndef HAVE_FUTIMESAT + futimesat; +#endif +#ifndef HAVE_LUTIMENS + lutimens; +#endif +#ifndef HAVE_LINKAT + linkat; +#endif +#ifndef HAVE_MKDIRAT + mkdirat; +#endif +#ifndef HAVE_MKFIFO + mkfifo; +#endif +#ifndef HAVE_MKFIFOAT + mkfifoat; +#endif +#ifndef HAVE_MKNODAT + mknodat; +#endif +#ifndef HAVE_READLINKAT + readlinkat; +#endif +#ifndef HAVE_RENAMEAT + renameat; +#endif +#ifndef HAVE_SYMLINKAT + symlinkat; +#endif +#ifndef HAVE_UNLINKAT + unlinkat; +#endif +#ifndef HAVE_UTIMENS + utimens; +#endif +#ifndef HAVE_UTIMENSAT + utimensat; +#endif + fxcomerr; + fxcomerrno; + xcomerr; + xcomerrno; + fprformat; + + fspush; + fspop; + fspushed; + +#ifndef HAVE_DLOPEN + dlopen; + dlclose; + dlsym; + dlerror; +#endif +} SCHILY_1.5; + +SCHILY_1.5 { +global: + getnstimeofday; + setnstimeofday; + +#ifndef HAVE_GETUID + getuid; +#endif +#ifndef HAVE_GETEUID + geteuid; +#endif +#ifndef HAVE_SETUID + setuid; +#endif +#ifndef HAVE_SETEUID + seteuid; +#endif + +#ifndef HAVE_GETGID + getgid; +#endif +#ifndef HAVE_GETEGID + getegid; +#endif +#ifndef HAVE_SETGID + setgid; +#endif +#ifndef HAVE_SETEGID + setegid; +#endif +#if !defined(HAVE_GETGRNAM) && !defined(HAVE_GETGRENT) && \ + !defined(HAVE_GETGRGID) && !defined(HAVE_SETGRENT) && \ + !defined(HAVE_ENDGRENT) + getgrent; + setgrent; + endgrent; + getgrnam; + getgrgid; +#endif +#if !defined(HAVE_GETPWNAM) && !defined(HAVE_GETPWENT) && \ + !defined(HAVE_GETPWUID) && !defined(HAVE_SETPWENT) && \ + !defined(HAVE_ENDPWENT) + getpwent; + setpwent; + endpwent; + getpwnam; + getpwuid; +#endif + get_progpath; + getexecpath; + + diropen; + dirrdopen; + dirclose; + + fgetaline; + getaline; + + js_fgetline; + js_getline; + + js_fexecl; + js_fexecle; + js_fexecv; + js_fexecve; + + js_fspawnv; + js_fspawnl; + js_fspawnv_nowait; + + _getarginit; + + getlallargs; + getlargs; + getlfiles; + + mkgmtime; + mklgmtime; + mkdirs; + makedirs; + abspath; + absnpath; +#ifndef HAVE_RESOLVEPATH + resolvepath; +#endif + resolvenpath; + +#if !defined(HAVE_FNMATCH) + fnmatch; +#endif + js_fnmatch; + + findinpath; + permtostr; + searchfileinpath; + +#ifndef HAVE_TIMEGM + timegm; +#endif + cmpmbytes; + zerobytes; + +#ifndef HAVE_STRCASECMP + strcasecmp; +#endif +#ifndef HAVE_STRNCASECMP + strncasecmp; +#endif + +} SCHILY_1.4; + +SCHILY_1.4 { +global: + patwcompile; + patwmatch; + patwlmatch; + +#ifndef HAVE_STRNDUP + strndup; +#endif +#ifndef HAVE_WCSCAT + wcscat; +#endif + + wcscatl; + +#ifndef HAVE_WCSCHR + wcschr; +#endif +#ifndef HAVE_WCSCMP + wcscmp; +#endif +#ifndef HAVE_WCSCPY + wcscpy; +#endif +#ifndef HAVE_WCSDUP + wcsdup; +#endif + + wcseql; + +#ifndef HAVE_WCSLCAT + wcslcat; +#endif +#ifndef HAVE_WCSLCPY + wcslcpy; +#endif +#ifndef HAVE_WCSLEN + wcslen; +#endif +#ifndef HAVE_WCSNCAT + wcsncat; +#endif +#ifndef HAVE_WCSNCMP + wcsncmp; +#endif +#ifndef HAVE_WCSNCPY + wcsncpy; +#endif +#ifndef HAVE_WCSNDUP + wcsndup; +#endif +#ifndef HAVE_WCSNLEN + wcsnlen; +#endif +#ifndef HAVE_WCSRCHR + wcsrchr; +#endif +} SCHILY_1.3; + +SCHILY_1.3 { +global: +#ifndef HAVE_EACCESS + eaccess; +#endif + + errabort; # Non stable + errconfig; # Non stable + errhidden; # Non stable + errwarnonly; # Non stable + + getperm; + + mkfstream; + fsclose; + fsgetc; + fspushcha; + fspushstr; + fssetfile; + +} SCHILY_1.2; SCHILY_1.2 { global: @@ -15,9 +323,12 @@ getvfiles; getargerror; -# fnmatch; -# strlcpy; -# strncpy; +#ifndef HAVE_STRLCPY + strlcpy; +#endif +#ifndef HAVE_STRNCPY + strncpy; +#endif js_malloc; js_realloc; @@ -74,13 +385,17 @@ fdown; fdup; fdup64; +#ifndef NO_FEXEC_COMPAT fexecl; fexecle; fexecv; fexecve; +#endif ffileread; ffilewrite; +#ifndef NO_GETLINE_COMPAT fgetline; +#endif fgetstr; file_raise; fileclose; @@ -108,9 +423,11 @@ flush; format; fpipe; +#ifndef NO_FSPAWN_COMPAT fspawnl; fspawnv; fspawnv_nowait; +#endif ftoes; ftofs; get_progname; @@ -123,7 +440,9 @@ geterrno; getfiles; getfp; +#ifndef NO_GETLINE_COMPAT getline; +#endif getmainfp; getstr; handlecond; @@ -151,16 +470,49 @@ seterrno; setfp; starthandlecond; +#ifndef HAVE_STRCAT + strcat; +#endif + strcatl; + +#ifndef HAVE_STRCHR + strchr; +#endif +#ifndef HAVE_STRCMP + strcmp; +#endif +#ifndef HAVE_STRCPY + strcpy; +#endif +#ifndef HAVE_STRDUP + strdup; +#endif + streql; + +#ifndef HAVE_STRLEN + strlen; +#endif +#ifndef HAVE_STRNCAT + strncat; +#endif +#ifndef HAVE_STRNCMP + strncmp; +#endif +#ifndef HAVE_STRRCHR + strrchr; +#endif swabbytes; unhandlecond; wait_chld; -# fprintf; -# printf; -# snprintf; -# sprintf; +#ifdef _should_we_ + fprintf; + printf; + snprintf; + sprintf; +#endif local: *; diff -Nru cdrtools-2.01.01a33/libschily/libschily.mk cdrtools-3.02a09/libschily/libschily.mk --- cdrtools-2.01.01a33/libschily/libschily.mk 2007-07-01 09:38:54.000000000 +0000 +++ cdrtools-3.02a09/libschily/libschily.mk 2016-11-06 19:04:53.000000000 +0000 @@ -1,4 +1,4 @@ -#ident @(#)libschily.mk 1.5 07/07/01 +#ident @(#)libschily.mk 1.10 16/11/06 ########################################################################### SRCROOT= .. RULESDIR= RULES @@ -13,8 +13,10 @@ CPPOPTS += -DUSE_SCANSTACK # Try to scan stack frames CPPOPTS += -DPORT_ONLY # Add missing funcs line snprintf for porting include Targets +include Targets.man LIBS= +XMK_FILE= Makefile.man ########################################################################### include $(SRCROOT)/$(RULESDIR)/rules.lib ########################################################################### diff -Nru cdrtools-2.01.01a33/libschily/libschily_p.mk cdrtools-3.02a09/libschily/libschily_p.mk --- cdrtools-2.01.01a33/libschily/libschily_p.mk 2007-07-01 09:38:54.000000000 +0000 +++ cdrtools-3.02a09/libschily/libschily_p.mk 2008-01-11 17:21:57.000000000 +0000 @@ -1,4 +1,4 @@ -#ident @(#)libschily_p.mk 1.6 07/07/01 +#ident @(#)libschily_p.mk 1.7 08/01/11 ########################################################################### SRCROOT= .. RULESDIR= RULES @@ -6,6 +6,7 @@ ########################################################################### SUBARCHDIR= /profiled +SUBINSDIR= /profiled .SEARCHLIST: . $(ARCHDIR) stdio $(ARCHDIR) VPATH= .:stdio:$(ARCHDIR) INSDIR= lib diff -Nru cdrtools-2.01.01a33/libschily/linkat.c cdrtools-3.02a09/libschily/linkat.c --- cdrtools-2.01.01a33/libschily/linkat.c 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/libschily/linkat.c 2016-08-10 21:02:32.000000000 +0000 @@ -0,0 +1,81 @@ +/* @(#)linkat.c 1.4 16/08/10 Copyright 2011-2016 J. Schilling */ +/* + * Emulate the behavior of linkat(int fd1, const char *name1, int fd2, + * const char *name2, int flag) + * + * Note that emulation methods that do not use the /proc filesystem are + * not MT safe. In the non-MT-safe case, we do: + * + * savewd()/fchdir()/open(name)/restorewd() + * + * Errors may force us to abort the program as our caller is not expected + * to know that we do more than a simple open() here and that the + * working directory may be changed by us. + * + * Copyright (c) 2011-2016 J. Schilling + */ +/* + * The contents of this file are subject to the terms of the + * Common Development and Distribution License, Version 1.0 only + * (the "License"). You may not use this file except in compliance + * with the License. + * + * See the file CDDL.Schily.txt in this distribution for details. + * A copy of the CDDL is also available via the Internet at + * http://www.opensource.org/licenses/cddl1.txt + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file CDDL.Schily.txt from this distribution. + */ + +#include +#include +#include +#include +#include +#include +#include +#include "at-defs.h" + +#ifndef HAVE_LINKAT + +#ifndef ENAMETOOLONG +#define ENAMETOOLONG EINVAL +#endif + +EXPORT int linkfollow __PR((const char *old, const char *new)); +EXPORT int +linkfollow(old, new) + const char *old; + const char *new; +{ + char buf[max(8192, PATH_MAX+1)]; + int blen; + + buf[0] = '\0'; + if ((blen = resolvepath(old, buf, sizeof (buf))) < 0) { + return (-1); + } else if (blen >= sizeof (buf)) { + seterrno(ENAMETOOLONG); + return (-1); /* Path too long */ + } else { + buf[blen] = '\0'; /* Solaris syscall does not null-terminate */ + } + return (link(buf, new)); +} + +#define KR_DECL int flag; +/* CSTYLED */ +#define KR_ARGS , flag +#define FUNC_CALL(n1, n2) (flag & AT_SYMLINK_FOLLOW ? \ + linkfollow(n1, n2) : link(n1, n2)) +#define FLAG_CHECK() if (flag & ~(AT_SYMLINK_FOLLOW)) { \ + seterrno(EINVAL); \ + return (-1); \ + } +#define FUNC_NAME linkat +#define FUNC_RESULT int + +#include "at-base2.c" + +#endif /* HAVE_LINKAT */ diff -Nru cdrtools-2.01.01a33/libschily/lutimens.c cdrtools-3.02a09/libschily/lutimens.c --- cdrtools-2.01.01a33/libschily/lutimens.c 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/libschily/lutimens.c 2013-10-30 22:41:25.000000000 +0000 @@ -0,0 +1,85 @@ +/* @(#)lutimens.c 1.2 13/10/30 Copyright 2013 J. Schilling */ +/* + * Emulate the behavior of lutimens(const char *name, + * const struct timespec times[2]) + * + * Copyright (c) 2013 J. Schilling + */ +/* + * The contents of this file are subject to the terms of the + * Common Development and Distribution License, Version 1.0 only + * (the "License"). You may not use this file except in compliance + * with the License. + * + * See the file CDDL.Schily.txt in this distribution for details. + * A copy of the CDDL is also available via the Internet at + * http://www.opensource.org/licenses/cddl1.txt + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file CDDL.Schily.txt from this distribution. + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#ifndef HAVE_LUTIMENS + +#ifndef HAVE_LSTAT +#define lstat stat +#endif + +EXPORT int +lutimens(name, times) + const char *name; + const struct timespec times[2]; +{ +#ifdef HAVE_UTIMENSAT + return (utimensat(AT_FDCWD, name, times, AT_SYMLINK_NOFOLLOW)); +#else +#ifdef HAVE_LUTIMES + struct timeval tv[2]; + + if (times == NULL) + return (lutimes(name, NULL)); + tv[0].tv_sec = times[0].tv_sec; + tv[0].tv_usec = times[0].tv_nsec/1000; + tv[1].tv_sec = times[1].tv_sec; + tv[1].tv_usec = times[1].tv_nsec/1000; + return (lutimes(name, tv)); + +#else +#ifdef HAVE_LUTIME + struct utimbuf ut; + + if (times == NULL) + return (lutime(name, NULL)); + ut.actime = times[0].tv_sec; + ut.modtime = times[1].tv_sec; + + return (lutime(name, &ut)); +#else + struct stat sb; + + if (lstat(name, &sb) >= 0) { + if (!S_ISLNK(sb.st_mode)) + return (utimens(name, times)); + } +#ifdef ENOSYS + seterrno(ENOSYS); +#else + seterrno(EINVAL); +#endif + return (-1); +#endif +#endif +#endif +} + +#endif /* HAVE_UTIMENS */ diff -Nru cdrtools-2.01.01a33/libschily/lxchdir.c cdrtools-3.02a09/libschily/lxchdir.c --- cdrtools-2.01.01a33/libschily/lxchdir.c 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/libschily/lxchdir.c 2011-10-21 17:59:16.000000000 +0000 @@ -0,0 +1,82 @@ +/* @(#)lxchdir.c 1.1 11/10/21 Copyright 2004-2011 J. Schilling */ +/* + * Long path name aware chdir(). + * + * The code has been adopted from libfind. + * + * Copyright (c) 2004-2011 J. Schilling + */ +/* + * The contents of this file are subject to the terms of the + * Common Development and Distribution License, Version 1.0 only + * (the "License"). You may not use this file except in compliance + * with the License. + * + * See the file CDDL.Schily.txt in this distribution for details. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file CDDL.Schily.txt from this distribution. + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include "at-defs.h" + +#ifndef ENAMETOOLONG +#define ENAMETOOLONG EINVAL +#endif + +EXPORT int lxchdir __PR((char *p)); +LOCAL int xchdir __PR((char *p)); + +EXPORT int +lxchdir(p) + char *p; +{ + if (chdir(p) < 0) { + if (geterrno() != ENAMETOOLONG) + return (-1); + + return (xchdir(p)); + } + return (0); +} + +LOCAL int +xchdir(p) + char *p; +{ + char *p2; + BOOL first = TRUE; + + while (*p) { + if ((p2 = strchr(p, '/')) != NULL) + *p2 = '\0'; + + if (first && p2 && p[0] == '\0') { + if (chdir("/") < 0) + return (-1); + } else { + /* + * If this is not the first chdir() and we are doing a + * multi hop chdir(), we may be on an undefined + * intermediate directory. Mark this case by returning + * -2 instead of -1. + */ + if (chdir(p) < 0) + return (first?-1:-2); + } + if (p2 == NULL) + break; + *p2 = '/'; + p = &p2[1]; + first = FALSE; + } + return (0); +} diff -Nru cdrtools-2.01.01a33/libschily/Makefile.man cdrtools-3.02a09/libschily/Makefile.man --- cdrtools-2.01.01a33/libschily/Makefile.man 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/libschily/Makefile.man 2015-04-27 19:35:34.000000000 +0000 @@ -0,0 +1,13 @@ +#ident "@(#)Makefile.man 1.2 15/04/27 " +########################################################################### +SRCROOT= .. +RULESDIR= RULES +include $(SRCROOT)/$(RULESDIR)/rules.top +########################################################################### + +include Targets.man +MK_FILES= $(MAN_MK_FILES) + +########################################################################### +include $(SRCROOT)/$(RULESDIR)/rules.mks +########################################################################### diff -Nru cdrtools-2.01.01a33/libschily/match.c cdrtools-3.02a09/libschily/match.c --- cdrtools-2.01.01a33/libschily/match.c 2006-09-13 15:05:35.000000000 +0000 +++ cdrtools-3.02a09/libschily/match.c 2017-10-03 13:41:07.000000000 +0000 @@ -1,10 +1,18 @@ -/* @(#)match.c 1.22 06/09/13 Copyright 1985, 1995-2003 J. Schilling */ +/* @(#)match.c 1.28 17/10/03 Copyright 1985, 1995-2017 J. Schilling */ #include #include +#define POSIX_CLASS /* Support [[:alpha:]] by default */ +#ifdef NO_POSIX_CLASS /* Allow to disable [[:alpha:]] */ +#undef POSIX_CLASS +#endif +#ifdef POSIX_CLASS +#include /* With [[:alpha:]], we need wctype() */ +#include /* and thus wchar.h and wctype.h */ +#endif /* * Pattern matching functions * - * Copyright (c) 1985, 1995-2003 J. Schilling + * Copyright (c) 1985, 1995-2017 J. Schilling */ /* * The contents of this file are subject to the terms of the @@ -13,6 +21,8 @@ * with the License. * * See the file CDDL.Schily.txt in this distribution for details. + * A copy of the CDDL is also available via the Internet at + * http://www.opensource.org/licenses/cddl1.txt * * When distributing Covered Code, include this CDDL HEADER in each * file and include the License file CDDL.Schily.txt from this distribution. @@ -33,22 +43,60 @@ * * Character classes have been added to allow "[]" * to be used. + * POSIX features like [[:alpha:]] have been added. * Start of line '^' and end of line '$' have been added. */ +#undef CHAR + #ifdef __LINE_MATCH +#ifdef __WIDE_CHAR +#define patmatch patwlmatch +#else #define opatmatch opatlmatch #define patmatch patlmatch #endif +#endif -#define ENDSTATE (-1) +#ifdef __WIDE_CHAR +#ifndef __LINE_MATCH +#define patcompile patwcompile +#define patmatch patwmatch +#endif +#define CHAR wchar_t +#define PCHAR wchar_t +#endif + +#ifdef __MB_CHAR +#undef patmatch +#ifdef __LINE_MATCH +#define patmatch patmblmatch +#else +#define patmatch patmbmatch +#endif +#define PCHAR wchar_t +#endif + +#ifndef CHAR +typedef unsigned char Uchar; +#define DID_UCHAR_TYPE +#define CHAR Uchar +#endif + +#ifndef PCHAR +#ifndef DID_UCHAR_TYPE typedef unsigned char Uchar; +#endif +#define PCHAR Uchar +#endif + +#define ENDSTATE (-1) -/*--------------------------------------------------------------------------- -| -| The Interpreter -| -+---------------------------------------------------------------------------*/ +#define CL_SIZE 32 /* Max size for '[: :]' */ + +/* + * The Interpreter + */ /* @@ -75,22 +123,63 @@ /* * match a character in class - */ + * + * Syntax errors do not appear here, they are handled by the compiler, + * so in theory we could remove the "return (0)" statements from the + * the POSIX class code. + */ +#ifdef POSIX_CLASS +#define CHK_POSIX_CLASS \ + else if (*lpat == LCLASS) { \ + if (lpat[1] == ':') { \ + char class[CL_SIZE+1]; \ + char *pc = class; \ + \ + lpat += 2; /* Eat ':' */ \ + for (;;) { \ + if (*lpat == '\0') { \ + ok = FALSE; \ + goto out; \ + } \ + if (*lpat == ':' && lpat[1] == RCLASS) \ + break; \ + if (pc >= &class[CL_SIZE]) { \ + ok = FALSE; \ + goto out; \ + } \ + *pc++ = *lpat++; \ + } \ + if (pc == class) { \ + ok = FALSE; \ + goto out; \ + } \ + *pc = '\0'; \ + lpat += 2; /* Skip ":]" */ \ + if (iswctype(lc, wctype(class))) { \ + ok = !ok; \ + goto out; \ + } \ + continue; \ + } \ + } +#else +#define CHK_POSIX_CLASS +#endif #define in_class(found, pat, c) { \ - register const Uchar *lpat = pat; \ + register const PCHAR *lpat = pat; \ register int lc = c; \ int lo_bound; \ int hi_bound; \ - \ - found = FALSE; \ + BOOL ok = FALSE; \ \ if (*lpat == NOT) { \ lpat++; \ - found = TRUE; \ + ok = TRUE; \ } \ while (*lpat != RCLASS) { \ if (*lpat == QUOTE) \ lpat++; \ + CHK_POSIX_CLASS \ lo_bound = *lpat++; \ if (*lpat == RANGE) { \ lpat++; \ @@ -101,10 +190,12 @@ hi_bound = lo_bound; \ } \ if (lo_bound <= lc && lc <= hi_bound) { \ - found = !found; \ - break; \ + ok = !ok; \ + goto out; \ } \ } \ +out: \ + found = ok; \ } /* @@ -113,11 +204,12 @@ * Trys to match a string beginning at offset * against the compiled pattern. */ -EXPORT Uchar +#if !defined(__WIDE_CHAR) && !defined(__MB_CHAR) +EXPORT CHAR *opatmatch(pat, aux, str, soff, slen, alt) - const Uchar *pat; + const PCHAR *pat; const int *aux; - const Uchar *str; + const CHAR *str; int soff; int slen; int alt; @@ -126,6 +218,7 @@ return (patmatch(pat, aux, str, soff, slen, alt, state)); } +#endif /* * patmatch - the external interpreter interface. @@ -133,11 +226,11 @@ * Trys to match a string beginning at offset * against the compiled pattern. */ -EXPORT Uchar * +EXPORT CHAR * patmatch(pat, aux, str, soff, slen, alt, state) - const Uchar *pat; + const PCHAR *pat; const int *aux; - const Uchar *str; + const CHAR *str; int soff; int slen; int alt; @@ -148,8 +241,13 @@ register int *i; register int p; register int q, s, k; +#ifdef __MB_CHAR + wchar_t c; + int mlen = 1; +#else int c; - const Uchar *lastp = (Uchar *)NULL; +#endif + const CHAR *lastp = (CHAR *)NULL; #ifdef __LINE_MATCH for (; soff <= slen; soff++) { @@ -160,14 +258,29 @@ if (alt != ENDSTATE) put(sp, state, sp, alt); +#ifdef __MB_CHAR + mbtowc(NULL, NULL, 0); + for (s = soff; ; s += mlen) { +#else for (s = soff; ; s++) { +#endif /* * next char from input string */ - if (s >= slen) + if (s >= slen) { c = 0; - else + } else { +#ifdef __MB_CHAR + mlen = mbtowc(&c, (char *)&str[s], slen - s); + if (mlen < 0) { + mbtowc(NULL, NULL, 0); + c = str[s]; + mlen = 1; + } +#else c = str[s]; +#endif + } /* * first complete the closure */ @@ -210,7 +323,7 @@ } } if (c == 0) - return ((Uchar *)lastp); + return ((CHAR *)lastp); /* * now try to match next character @@ -254,34 +367,32 @@ #ifdef __LINE_MATCH if (lastp || (soff == slen - 1)) - return ((Uchar *)lastp); + return ((CHAR *)lastp); else break; #else - return ((Uchar *)lastp); + return ((CHAR *)lastp); #endif } } #ifdef __LINE_MATCH } -return ((Uchar *)lastp); +return ((CHAR *)lastp); #endif } -#ifndef __LINE_MATCH -/*--------------------------------------------------------------------------- -| -| The Compiler -| -+---------------------------------------------------------------------------*/ +#if !defined(__LINE_MATCH) && !defined(__MB_CHAR) +/* + * The Compiler + */ typedef struct args { - const Uchar *pattern; + const PCHAR *pattern; int *aux; int patp; int length; - Uchar Ch; + PCHAR Ch; } arg_t; LOCAL void nextitem __PR((arg_t *)); @@ -302,6 +413,15 @@ } /* + * 'peek' the next character from pattern + */ +#define pch(ap) \ + ((((ap)->patp + 1) >= (ap)->length) ? \ + 0 \ + : \ + (ap)->pattern[(ap)->patp+1]) \ + +/* * get the next item from pattern */ LOCAL void @@ -332,8 +452,39 @@ case RBRACK: return (ENDSTATE); case LCLASS: - while (ap->Ch != RCLASS && ap->Ch != '\0') + while (ap->Ch != RCLASS && ap->Ch != '\0') { +#ifdef POSIX_CLASS + if (ap->Ch == LCLASS) { + if (pch(ap) == ':') { /* [:alpha:] */ + char class[CL_SIZE+1]; + char *pc = class; + + nextitem(ap); + nextitem(ap); + while (ap->Ch != ':' && + ap->Ch != '\0') { + if (pc > &class[CL_SIZE]) + return (ENDSTATE); + *pc = ap->Ch; + if (*pc++ != ap->Ch) + return (ENDSTATE); + nextitem(ap); + } + if (pc == class) + return (ENDSTATE); + *pc = '\0'; + if (ap->Ch == '\0') + return (ENDSTATE); + if (wctype(class) == 0) + return (ENDSTATE); + nextitem(ap); + } + if (ap->Ch != RCLASS) + return (ENDSTATE); + } +#endif nextitem(ap); + } if (ap->Ch == '\0') return (ENDSTATE); nextitem(ap); @@ -365,10 +516,12 @@ int exits = ENDSTATE; int a; int *aux = ap->aux; - Uchar Ch; + PCHAR Ch; for (;;) { a = prim(ap); + if (a == ENDSTATE) + return (ENDSTATE); Ch = ap->Ch; if (Ch == ALT || Ch == RBRACK || Ch == '\0') { exits = join(aux, exits, a); @@ -429,7 +582,7 @@ */ EXPORT int patcompile(pat, len, aux) - const Uchar *pat; + const PCHAR *pat; int len; int *aux; { @@ -451,4 +604,4 @@ setexits(aux, i, ENDSTATE); return (alt); } -#endif /* LMATCH */ +#endif /* !defined(__LINE_MATCH) && !defined(__MB_CHAR) */ diff -Nru cdrtools-2.01.01a33/libschily/matchmb.c cdrtools-3.02a09/libschily/matchmb.c --- cdrtools-2.01.01a33/libschily/matchmb.c 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/libschily/matchmb.c 2017-07-02 15:31:40.000000000 +0000 @@ -0,0 +1,25 @@ +/* @(#)matchmb.c 1.1 17/07/02 Copyright 2017 J. Schilling */ +/* + * Pattern matching function for multi byte match. + * + * Copyright (c) 2017 J. Schilling + */ +/* + * The contents of this file are subject to the terms of the + * Common Development and Distribution License, Version 1.0 only + * (the "License"). You may not use this file except in compliance + * with the License. + * + * See the file CDDL.Schily.txt in this distribution for details. + * A copy of the CDDL is also available via the Internet at + * http://www.opensource.org/licenses/cddl1.txt + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file CDDL.Schily.txt from this distribution. + */ + +#define USE_WCHAR +#include + +#define __MB_CHAR +#include "match.c" diff -Nru cdrtools-2.01.01a33/libschily/matchmbl.c cdrtools-3.02a09/libschily/matchmbl.c --- cdrtools-2.01.01a33/libschily/matchmbl.c 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/libschily/matchmbl.c 2017-07-02 15:31:40.000000000 +0000 @@ -0,0 +1,26 @@ +/* @(#)matchmbl.c 1.1 17/07/02 Copyright 2017 J. Schilling */ +/* + * Pattern matching function for multi byte line match (grep like). + * + * Copyright (c) 2017 J. Schilling + */ +/* + * The contents of this file are subject to the terms of the + * Common Development and Distribution License, Version 1.0 only + * (the "License"). You may not use this file except in compliance + * with the License. + * + * See the file CDDL.Schily.txt in this distribution for details. + * A copy of the CDDL is also available via the Internet at + * http://www.opensource.org/licenses/cddl1.txt + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file CDDL.Schily.txt from this distribution. + */ + +#define USE_WCHAR +#include + +#define __MB_CHAR +#define __LINE_MATCH +#include "match.c" diff -Nru cdrtools-2.01.01a33/libschily/matchw.c cdrtools-3.02a09/libschily/matchw.c --- cdrtools-2.01.01a33/libschily/matchw.c 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/libschily/matchw.c 2009-05-27 22:40:09.000000000 +0000 @@ -0,0 +1,23 @@ +/* @(#)matchw.c 1.1 09/05/28 Copyright 2009 J. Schilling */ +/* + * Pattern matching function for line match (grep like). + * + * Copyright (c) 2009 J. Schilling + */ +/* + * The contents of this file are subject to the terms of the + * Common Development and Distribution License, Version 1.0 only + * (the "License"). You may not use this file except in compliance + * with the License. + * + * See the file CDDL.Schily.txt in this distribution for details. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file CDDL.Schily.txt from this distribution. + */ + +#define USE_WCHAR +#include + +#define __WIDE_CHAR +#include "match.c" diff -Nru cdrtools-2.01.01a33/libschily/matchwl.c cdrtools-3.02a09/libschily/matchwl.c --- cdrtools-2.01.01a33/libschily/matchwl.c 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/libschily/matchwl.c 2009-05-27 22:40:11.000000000 +0000 @@ -0,0 +1,24 @@ +/* @(#)matchwl.c 1.1 09/05/28 Copyright 2009 J. Schilling */ +/* + * Pattern matching function for line match (grep like). + * + * Copyright (c) 2009 J. Schilling + */ +/* + * The contents of this file are subject to the terms of the + * Common Development and Distribution License, Version 1.0 only + * (the "License"). You may not use this file except in compliance + * with the License. + * + * See the file CDDL.Schily.txt in this distribution for details. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file CDDL.Schily.txt from this distribution. + */ + +#define USE_WCHAR +#include + +#define __WIDE_CHAR +#define __LINE_MATCH +#include "match.c" diff -Nru cdrtools-2.01.01a33/libschily/mem.c cdrtools-3.02a09/libschily/mem.c --- cdrtools-2.01.01a33/libschily/mem.c 2006-11-05 01:20:54.000000000 +0000 +++ cdrtools-3.02a09/libschily/mem.c 2015-05-10 08:25:13.000000000 +0000 @@ -1,12 +1,13 @@ -/* @(#)mem.c 1.7 06/11/05 Copyright 1998-2006 J. Schilling */ +/* @(#)mem.c 1.11 15/05/10 Copyright 1998-2015 J. Schilling */ +#include #ifndef lint -static char sccsid[] = - "@(#)mem.c 1.7 06/11/05 Copyright 1998-2006 J. Schilling"; +static UConst char sccsid[] = + "@(#)mem.c 1.11 15/05/10 Copyright 1998-2015 J. Schilling"; #endif /* * Memory handling with error checking * - * Copyright (c) 1998-2006 J. Schilling + * Copyright (c) 1998-2015 J. Schilling */ /* * The contents of this file are subject to the terms of the @@ -15,13 +16,14 @@ * with the License. * * See the file CDDL.Schily.txt in this distribution for details. + * A copy of the CDDL is also available via the Internet at + * http://www.opensource.org/licenses/cddl1.txt * * When distributing Covered Code, include this CDDL HEADER in each * file and include the License file CDDL.Schily.txt from this distribution. */ -#include -#include +#include #include #include #include @@ -29,12 +31,26 @@ #include #include -EXPORT void *__malloc __PR((size_t size, char *msg)); -EXPORT void *__realloc __PR((void *ptr, size_t size, char *msg)); -EXPORT char *__savestr __PR((const char *s)); +EXPORT int ___mexval __PR((int exval)); +EXPORT void *___malloc __PR((size_t size, char *msg)); +EXPORT void *___realloc __PR((void *ptr, size_t size, char *msg)); +EXPORT char *___savestr __PR((const char *s)); + +LOCAL int mexval; + +EXPORT int +___mexval(exval) + int exval; +{ + int ret = mexval; + + mexval = exval; + + return (ret); +} EXPORT void * -__malloc(size, msg) +___malloc(size, msg) size_t size; char *msg; { @@ -42,14 +58,19 @@ ret = malloc(size); if (ret == NULL) { - comerr(gettext("Cannot allocate memory for %s.\n"), msg); + int err = geterrno(); + + errmsg(gettext("Cannot allocate memory for %s.\n"), msg); + if (mexval) + err = mexval; + comexit(err); /* NOTREACHED */ } return (ret); } EXPORT void * -__realloc(ptr, size, msg) +___realloc(ptr, size, msg) void *ptr; size_t size; char *msg; @@ -61,17 +82,22 @@ else ret = realloc(ptr, size); if (ret == NULL) { - comerr(gettext("Cannot realloc memory for %s.\n"), msg); + int err = geterrno(); + + errmsg(gettext("Cannot realloc memory for %s.\n"), msg); + if (mexval) + err = mexval; + comexit(err); /* NOTREACHED */ } return (ret); } EXPORT char * -__savestr(s) +___savestr(s) const char *s; { - char *ret = __malloc(strlen(s)+1, "saved string"); + char *ret = ___malloc(strlen(s)+1, "saved string"); strcpy(ret, s); return (ret); diff -Nru cdrtools-2.01.01a33/libschily/mkdirat.c cdrtools-3.02a09/libschily/mkdirat.c --- cdrtools-2.01.01a33/libschily/mkdirat.c 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/libschily/mkdirat.c 2013-12-26 18:16:52.000000000 +0000 @@ -0,0 +1,57 @@ +/* @(#)mkdirat.c 1.3 13/12/26 Copyright 2013 J. Schilling */ +/* + * Emulate the behavior of mkdirat(int fd, const char *name, mode_t mode) + * + * Note that emulation methods that do not use the /proc filesystem are + * not MT safe. In the non-MT-safe case, we do: + * + * savewd()/fchdir()/open(name)/restorewd() + * + * Errors may force us to abort the program as our caller is not expected + * to know that we do more than a simple open() here and that the + * working directory may be changed by us. + * + * Copyright (c) 2013 J. Schilling + */ +/* + * The contents of this file are subject to the terms of the + * Common Development and Distribution License, Version 1.0 only + * (the "License"). You may not use this file except in compliance + * with the License. + * + * See the file CDDL.Schily.txt in this distribution for details. + * A copy of the CDDL is also available via the Internet at + * http://www.opensource.org/licenses/cddl1.txt + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file CDDL.Schily.txt from this distribution. + */ + +#include +#include +#include +#include +#include +#include +#include +#include "at-defs.h" + +#ifndef HAVE_MKDIRAT + +/* CSTYLED */ +#define PROTO_DECL , mode_t mode +#define KR_DECL mode_t mode; +/* CSTYLED */ +#define KR_ARGS , mode +#if defined(_MSC_VER) || defined(__MINGW32__) +#define FUNC_CALL(n) mkdir(n) +#else +#define FUNC_CALL(n) mkdir(n, mode) +#endif +#define FLAG_CHECK() +#define FUNC_NAME mkdirat +#define FUNC_RESULT int + +#include "at-base.c" + +#endif /* HAVE_MKDIRAT */ diff -Nru cdrtools-2.01.01a33/libschily/mkdirs.c cdrtools-3.02a09/libschily/mkdirs.c --- cdrtools-2.01.01a33/libschily/mkdirs.c 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/libschily/mkdirs.c 2014-01-02 15:20:09.000000000 +0000 @@ -0,0 +1,127 @@ +/* @(#)mkdirs.c 1.4 14/01/02 Copyright 2011-2014 J. Schilling */ +/* + * mkdirs() is the equivalent to "mkdir -p path" + * makedirs() allows to create missing direcories before a final + * path element if called makedirs(path, mode, TRUE). + * + * "name" must be a modifyable string. + * + * Copyright (c) 2011-2014 J. Schilling + */ +/* + * The contents of this file are subject to the terms of the + * Common Development and Distribution License, Version 1.0 only + * (the "License"). You may not use this file except in compliance + * with the License. + * + * See the file CDDL.Schily.txt in this distribution for details. + * A copy of the CDDL is also available via the Internet at + * http://www.opensource.org/licenses/cddl1.txt + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file CDDL.Schily.txt from this distribution. + */ + +#include +#include +#include +#include +#include +#include + +#if defined(ENOTEMPTY) && ENOTEMPTY != EEXIST +#define is_eexist(err) ((err) == EEXIST || (err) == ENOTEMPTY) +#else +#define is_eexist(err) ((err) == EEXIST) +#endif +#if defined(EMISSDIR) +#define is_enoent(err) ((err) == ENOENT || (err) == EMISSDIR) +#else +#define is_enoent(err) ((err) == ENOENT) +#endif + +#ifdef __MINGW32__ +#define mkdir(a, b) mkdir(a) +#endif + +EXPORT BOOL makedirs __PR((char *name, mode_t mode, int striplast)); + +#ifdef PROTOTYPES +EXPORT int +mkdirs(register char *name, mode_t mode) +#else +EXPORT int +mkdirs(name, mode) + register char *name; + mode_t mode; +#endif +{ + return (makedirs(name, mode, FALSE)); +} + +#ifdef PROTOTYPES +EXPORT int +makedirs(register char *name, mode_t mode, int striplast) +#else +EXPORT int +makedirs(name, mode, striplast) + register char *name; + mode_t mode; + int striplast; +#endif +{ + register char *p; + char *ls = NULL; + int ret = 0; + int err = 0; + mode_t mask; + struct stat sb; + + if (name == NULL) { + seterrno(EFAULT); + return (-1); + } + if (*name == '\0') { + seterrno(EINVAL); + return (-1); + } + mask = umask(S_IRWXU|S_IRWXG|S_IRWXO); + (void) umask(mask); + + for (p = &name[1]; *p; p++) { + if (*p != '/') + continue; + + *p = '\0'; + if (stat(name, &sb) < 0) { + if (mkdir(name, mode | S_IRWXU) < 0) { + err = geterrno(); + + if (!is_eexist(err)) { + ret = -1; + goto errout; + } + } else { + if (ls && (mode & S_IRWXU) != S_IRWXU) { + *ls = '\0'; + chmod(name, mode & ~mask); + *ls = '/'; + } + ls = p; + } + } + *p = '/'; + } + err = 0; + if (!striplast) + ret = mkdir(name, mode); +errout: + if (ls && (mode & S_IRWXU) != S_IRWXU) { + *ls = '\0'; + chmod(name, mode & ~mask); + *ls = '/'; + if (err) + seterrno(err); + } + return (ret); +} diff -Nru cdrtools-2.01.01a33/libschily/mkfifoat.c cdrtools-3.02a09/libschily/mkfifoat.c --- cdrtools-2.01.01a33/libschily/mkfifoat.c 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/libschily/mkfifoat.c 2013-12-26 17:52:38.000000000 +0000 @@ -0,0 +1,53 @@ +/* @(#)mkfifoat.c 1.3 13/12/26 Copyright 2013 J. Schilling */ +/* + * Emulate the behavior of mkfifoat(int fd, const char *name, mode_t mode) + * + * Note that emulation methods that do not use the /proc filesystem are + * not MT safe. In the non-MT-safe case, we do: + * + * savewd()/fchdir()/open(name)/restorewd() + * + * Errors may force us to abort the program as our caller is not expected + * to know that we do more than a simple open() here and that the + * working directory may be changed by us. + * + * Copyright (c) 2013 J. Schilling + */ +/* + * The contents of this file are subject to the terms of the + * Common Development and Distribution License, Version 1.0 only + * (the "License"). You may not use this file except in compliance + * with the License. + * + * See the file CDDL.Schily.txt in this distribution for details. + * A copy of the CDDL is also available via the Internet at + * http://www.opensource.org/licenses/cddl1.txt + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file CDDL.Schily.txt from this distribution. + */ + +#include +#include +#include +#include +#include +#include +#include +#include "at-defs.h" + +#ifndef HAVE_MKFIFOAT + +/* CSTYLED */ +#define PROTO_DECL , mode_t mode +#define KR_DECL mode_t mode; +/* CSTYLED */ +#define KR_ARGS , mode +#define FUNC_CALL(n) mkfifo(n, mode) +#define FLAG_CHECK() +#define FUNC_NAME mkfifoat +#define FUNC_RESULT int + +#include "at-base.c" + +#endif /* HAVE_FIFOAT */ diff -Nru cdrtools-2.01.01a33/libschily/mkfifo.c cdrtools-3.02a09/libschily/mkfifo.c --- cdrtools-2.01.01a33/libschily/mkfifo.c 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/libschily/mkfifo.c 2013-10-27 17:03:37.000000000 +0000 @@ -0,0 +1,58 @@ +/* @(#)mkfifo.c 1.1 13/10/27 Copyright 2013 J. Schilling */ +/* + * Emulate the behavior of mkfifo(const char *name, mode_t mode) + * + * Copyright (c) 2013 J. Schilling + */ +/* + * The contents of this file are subject to the terms of the + * Common Development and Distribution License, Version 1.0 only + * (the "License"). You may not use this file except in compliance + * with the License. + * + * See the file CDDL.Schily.txt in this distribution for details. + * A copy of the CDDL is also available via the Internet at + * http://www.opensource.org/licenses/cddl1.txt + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file CDDL.Schily.txt from this distribution. + */ + +#include +#include +#include +#include +#include +#include +#include +#include + +#ifndef HAVE_MKFIFO + +#define S_ALLPERM (S_IRWXU|S_IRWXG|S_IRWXO) +#define S_ALLFLAGS (S_ISUID|S_ISGID|S_ISVTX) +#define S_ALLMODES (S_ALLFLAGS | S_ALLPERM) + +#ifdef PROTOTYPES +EXPORT int +mkfifo(const char *name, mode_t mode) +#else +EXPORT int +mkfifo(name, mode) + const char *name; + mode_t mode; +#endif +{ +#ifdef HAVE_MKNOD + return (mknod(name, S_IFIFO | (mode & S_ALLMODES), 0)); +#else +#ifdef ENOSYS + seterrno(ENOSYS); +#else + seterrno(EINVAL); +#endif + return (-1); +#endif +} + +#endif /* HAVE_MKFIFO */ diff -Nru cdrtools-2.01.01a33/libschily/mkgmtime.c cdrtools-3.02a09/libschily/mkgmtime.c --- cdrtools-2.01.01a33/libschily/mkgmtime.c 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/libschily/mkgmtime.c 2011-08-28 12:17:09.000000000 +0000 @@ -0,0 +1,115 @@ +/* @(#)mkgmtime.c 1.4 11/08/28 Copyright 2011 J. Schilling */ +#include +#ifndef lint +static UConst char sccsid[] = + "@(#)mkgmtime.c 1.4 11/08/28 Copyright 2011 J. Schilling"; +#endif +/* + * mkgmtime() is a complement to mktime() + * + * Copyright (c) 2011 J. Schilling + */ +/* + * The contents of this file are subject to the terms of the + * Common Development and Distribution License, Version 1.0 only + * (the "License"). You may not use this file except in compliance + * with the License. + * + * See the file CDDL.Schily.txt in this distribution for details. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file CDDL.Schily.txt from this distribution. + */ + +#include +#include +#include +#include +#include + +EXPORT Llong mklgmtime __PR((struct tm *tp)); +EXPORT time_t mkgmtime __PR((struct tm *tp)); + +/* + * The Gregorian leap year formula + */ +#define dysize(A) (((A)%4)? 365 : (((A)%100) == 0 && ((A)%400)) ? 365 : 366) +#define isleap(A) (((A)%4)? 0 : (((A)%100) == 0 && ((A)%400)) ? 0 : 1) +/* + * Return the number of leap years since 0 AD assuming that the Gregorian + * calendar applies to all years. + */ +#define LEAPS(Y) ((Y) / 4 - (Y) / 100 + (Y) / 400) +/* + * Return the number of days since 0 AD + */ +#define YRDAYS(Y) (((Y) * 365L) + LEAPS(Y)) +/* + * Return the number of days between Januar 1 1970 and the end of the year + * before the the year used as argument. + */ +#define DAYS_SINCE_70(Y) (YRDAYS((Y)-1) - YRDAYS(1970-1)) + +LOCAL int dmbeg[12] = {0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334}; + +EXPORT Llong +mklgmtime(tp) + struct tm *tp; +{ + register Llong tim; + + if (tp->tm_mon >= 12) { + tp->tm_year += tp->tm_mon / 12; + tp->tm_mon %= 12; + } else if (tp->tm_mon < 0) { + int m = -tp->tm_mon; + + tp->tm_year -= m / 12; + m %= 12; + if (m) { + tp->tm_year -= 1; + tp->tm_mon = 12 - m; + } else { + tp->tm_mon = 0; + } + } + + { + register int y = tp->tm_year + 1900; + register int t = tp->tm_mon; + + tim = DAYS_SINCE_70(y); + + if (t >= 2 && isleap(y)) /* March or later */ + tim += 1; /* Add 29.2. */ + tim += dmbeg[t]; + } + + tim += tp->tm_mday - 1; + tim *= 24; + tim += tp->tm_hour; + tim *= 60; + tim += tp->tm_min; + tim *= 60; + tim += tp->tm_sec; + return (tim); +} + +EXPORT time_t +mkgmtime(tp) + struct tm *tp; +{ + Llong tim; + time_t t; + + t = tim = mklgmtime(tp); + if (t != tim) { +#ifdef EOVERFLOW + seterrno(EOVERFLOW); +#else + seterrno(EINVAL); +#endif + return (-1); + } + return (t); +} diff -Nru cdrtools-2.01.01a33/libschily/mknodat.c cdrtools-3.02a09/libschily/mknodat.c --- cdrtools-2.01.01a33/libschily/mknodat.c 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/libschily/mknodat.c 2014-05-01 14:06:08.000000000 +0000 @@ -0,0 +1,76 @@ +/* @(#)mknodat.c 1.4 14/05/01 Copyright 2013-2014 J. Schilling */ +/* + * Emulate the behavior of mknodat(int fd, const char *name, mode_t mode, dev_t dev) + * + * Note that emulation methods that do not use the /proc filesystem are + * not MT safe. In the non-MT-safe case, we do: + * + * savewd()/fchdir()/open(name)/restorewd() + * + * Errors may force us to abort the program as our caller is not expected + * to know that we do more than a simple open() here and that the + * working directory may be changed by us. + * + * Copyright (c) 2013-2014 J. Schilling + */ +/* + * The contents of this file are subject to the terms of the + * Common Development and Distribution License, Version 1.0 only + * (the "License"). You may not use this file except in compliance + * with the License. + * + * See the file CDDL.Schily.txt in this distribution for details. + * A copy of the CDDL is also available via the Internet at + * http://www.opensource.org/licenses/cddl1.txt + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file CDDL.Schily.txt from this distribution. + */ + +#include +#include +#include +#include +#include +#include +#include +#include "at-defs.h" + +#ifndef HAVE_MKNODAT +#ifndef HAVE_MKNOD +/* ARGSUSED */ +#ifdef PROTOTYPES +EXPORT int +mknodat(int fd, const char *name, mode_t mode, dev_t dev) +#else +EXPORT int +mknodat(fd, name, mode, dev) + int fd; + const char *name; + mode_t mode; + dev_t dev; +#endif +{ +#ifdef ENOSYS + seterrno(ENOSYS); +#else + seterrno(EINVAL); +#endif + return (-1); +} +#else /* HAVE_MKNOD */ + +/* CSTYLED */ +#define PROTO_DECL , mode_t mode, dev_t dev +#define KR_DECL mode_t mode; dev_t dev; +/* CSTYLED */ +#define KR_ARGS , mode, dev +#define FUNC_CALL(n) mknod(n, mode, dev) +#define FLAG_CHECK() +#define FUNC_NAME mknodat +#define FUNC_RESULT int + +#include "at-base.c" + +#endif /* HAVE_MKNOD */ +#endif /* HAVE_MKNODAT */ diff -Nru cdrtools-2.01.01a33/libschily/mkstemp.c cdrtools-3.02a09/libschily/mkstemp.c --- cdrtools-2.01.01a33/libschily/mkstemp.c 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/libschily/mkstemp.c 2014-05-15 20:11:42.000000000 +0000 @@ -0,0 +1,44 @@ +/* @(#)mkstemp.c 1.2 14/05/15 Copyright 2011-2014 J. Schilling */ +/* + * Copyright (c) 2011-2014 J. Schilling + */ +/* + * The contents of this file are subject to the terms of the + * Common Development and Distribution License, Version 1.0 only + * (the "License"). You may not use this file except in compliance + * with the License. + * + * See the file CDDL.Schily.txt in this distribution for details. + * A copy of the CDDL is also available via the Internet at + * http://www.opensource.org/licenses/cddl1.txt + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file CDDL.Schily.txt from this distribution. + */ + +#include +#include +#include +#include +#include +#include +#include + +#ifndef HAVE_MKSTEMP +EXPORT int +mkstemp(path) + char *path; +{ +#ifdef HAVE_MKTEMP + mktemp(path); + return (open(path, O_CREAT|O_EXCL|O_RDWR, S_IRUSR|S_IWUSR)); +#else +#ifdef ENOSYS + seterrno(ENOSYS); +#else + seterrno(EINVAL); +#endif + return (-1); +#endif +} +#endif diff -Nru cdrtools-2.01.01a33/libschily/movebytes.3 cdrtools-3.02a09/libschily/movebytes.3 --- cdrtools-2.01.01a33/libschily/movebytes.3 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/libschily/movebytes.3 2017-02-08 21:56:27.000000000 +0000 @@ -0,0 +1,54 @@ +. \" Manual Seite fuer movebytes +. \" @(#)movebytes.3 1.3 17/02/08 Copyright 1988-2017 J. Schilling +. \" +.if t .ds a \v'-0.55m'\h'0.00n'\z.\h'0.40n'\z.\v'0.55m'\h'-0.40n'a +.if t .ds o \v'-0.55m'\h'0.00n'\z.\h'0.45n'\z.\v'0.55m'\h'-0.45n'o +.if t .ds u \v'-0.55m'\h'0.00n'\z.\h'0.40n'\z.\v'0.55m'\h'-0.40n'u +.if t .ds A \v'-0.77m'\h'0.25n'\z.\h'0.45n'\z.\v'0.77m'\h'-0.70n'A +.if t .ds O \v'-0.77m'\h'0.25n'\z.\h'0.45n'\z.\v'0.77m'\h'-0.70n'O +.if t .ds U \v'-0.77m'\h'0.30n'\z.\h'0.45n'\z.\v'0.77m'\h'-.75n'U +.if t .ds s \(*b +.if t .ds S SS +.if n .ds a ae +.if n .ds o oe +.if n .ds u ue +.if n .ds s sz +.TH MOVEBYTES 3 "2017/02/08" "J\*org Schilling" "Schily\'s LIBRARY FUNCTIONS" +.SH NAME +movebytes() \- moves data +.SH SYNOPSIS +.nf +.B +char *movebytes(from, to, size) +.B const void *from; +.B void *to; +.B ssize_t size; +.fi +.SH DESCRIPTION +.B movebytes() +copies +.I size +bytes from +.I from +to +.IR to . +.SH RETURN VALUE +A pointer just after the last transferred byte in the +.I to +string. +.SH ERRORS +.LP +No errors are defined +.SH EXAMPLES +.SH "SEE ALSO" +.LP +.BR cmpbytes (3), +.BR cmpmbytes (3), +.BR cmpnullbytes (3), +.BR fillbytes (3), +.BR findbytes (3), +.BR movecbytes (3), +.BR swapbytes (3), +.BR zerobytes (3) +.SH NOTES +This routine correctly handles overlapping buffers. diff -Nru cdrtools-2.01.01a33/libschily/movebytes.c cdrtools-3.02a09/libschily/movebytes.c --- cdrtools-2.01.01a33/libschily/movebytes.c 2007-06-24 11:25:39.000000000 +0000 +++ cdrtools-3.02a09/libschily/movebytes.c 2009-10-17 20:14:16.000000000 +0000 @@ -1,8 +1,8 @@ -/* @(#)movebytes.c 1.16 07/06/24 Copyright 1985, 1989, 1995-2007 J. Schilling */ +/* @(#)movebytes.c 1.18 09/10/17 Copyright 1985, 1989, 1995-2009 J. Schilling */ /* * move data * - * Copyright (c) 1985, 1989, 1995-2007 J. Schilling + * Copyright (c) 1985, 1989, 1995-2009 J. Schilling */ /* * The contents of this file are subject to the terms of the @@ -18,6 +18,7 @@ #include #include +#include #include #define DO8(a) a; a; a; a; a; a; a; a; @@ -29,11 +30,11 @@ movebytes(fromv, tov, cnt) const void *fromv; void *tov; - int cnt; + ssize_t cnt; { register const char *from = fromv; register char *to = tov; - register int n; + register ssize_t n; /* * If we change cnt to be unsigned, check for == instead of <= @@ -43,14 +44,14 @@ if (from >= to) { /* - * source is on higher adresses than destination: + * source is on higher addresses than destination: * move bytes forwards */ - if (n >= (int)(8 * sizeof (long))) { + if (n >= (ssize_t)(8 * sizeof (long))) { if (l2aligned(from, to)) { register const long *froml = (const long *)from; register long *tol = (long *)to; - register int rem = n % (8 * sizeof (long)); + register ssize_t rem = n % (8 * sizeof (long)); n /= (8 * sizeof (long)); do { @@ -83,17 +84,17 @@ char *ep; /* - * source is on lower adresses than destination: + * source is on lower addresses than destination: * move bytes backwards */ to += n; from += n; ep = to; - if (n >= (int)(8 * sizeof (long))) { + if (n >= (ssize_t)(8 * sizeof (long))) { if (l2aligned(from, to)) { register const long *froml = (const long *)from; register long *tol = (long *)to; - register int rem = n % (8 * sizeof (long)); + register ssize_t rem = n % (8 * sizeof (long)); n /= (8 * sizeof (long)); do { diff -Nru cdrtools-2.01.01a33/libschily/movebytes.mk3 cdrtools-3.02a09/libschily/movebytes.mk3 --- cdrtools-2.01.01a33/libschily/movebytes.mk3 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/libschily/movebytes.mk3 2015-04-26 18:01:43.000000000 +0000 @@ -0,0 +1,18 @@ +#ident @(#)movebytes.mk3 1.1 15/04/26 +########################################################################### +# Sample makefile for installing manual pages +########################################################################### +SRCROOT= .. +RULESDIR= RULES +include $(SRCROOT)/$(RULESDIR)/rules.top +########################################################################### + +MANDIR= man +TARGETMAN= movebytes +MANSECT= $(MANSECT_LIB) +MANSUFFIX= $(MANSUFF_LIB) +MANFILE= movebytes.3 + +########################################################################### +include $(SRCROOT)/$(RULESDIR)/rules.man +########################################################################### diff -Nru cdrtools-2.01.01a33/libschily/movecbytes.c cdrtools-3.02a09/libschily/movecbytes.c --- cdrtools-2.01.01a33/libschily/movecbytes.c 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/libschily/movecbytes.c 2016-11-05 19:26:04.000000000 +0000 @@ -0,0 +1,107 @@ +/* @(#)movecbytes.c 1.2 16/11/05 Copyright 2016 J. Schilling */ +/* + * move data, stop if character c is copied + * + * Copyright (c) 2016 J. Schilling + */ +/* + * The contents of this file are subject to the terms of the + * Common Development and Distribution License, Version 1.0 only + * (the "License"). You may not use this file except in compliance + * with the License. + * + * See the file CDDL.Schily.txt in this distribution for details. + * A copy of the CDDL is also available via the Internet at + * http://www.opensource.org/licenses/cddl1.txt + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file CDDL.Schily.txt from this distribution. + */ + +#include +#include +#include + +#define DO8(a) a; a; a; a; a; a; a; a; + +/* + * movecbytes(from, to, c, cnt) is the same as memccpy(to, from, c, cnt) + */ +EXPORT char * +movecbytes(fromv, tov, c, cnt) + const void *fromv; + void *tov; + register int c; + size_t cnt; +{ + register const char *from = fromv; + register char *to = tov; + register size_t n; + + if ((n = cnt) == 0) + return (NULL); + +#define separate_code +#ifdef separate_code + while (n >= 8) { + /* BEGIN CSTYLED */ + DO8( + if ((*to++ = *from++) == (char)c) + return (to); + ); + /* END CSTYLED */ + n -= 8; + } + + switch (n) { + + case 7: if ((*to++ = *from++) == (char)c) + return (to); + case 6: if ((*to++ = *from++) == (char)c) + return (to); + case 5: if ((*to++ = *from++) == (char)c) + return (to); + case 4: if ((*to++ = *from++) == (char)c) + return (to); + case 3: if ((*to++ = *from++) == (char)c) + return (to); + case 2: if ((*to++ = *from++) == (char)c) + return (to); + case 1: if ((*to++ = *from++) == (char)c) + return (to); + } +#else + /* + * This variant should be as fast as the code above but + * half the size. Unfortunately, most compilers do not optmize + * it correctly. + */ + int rest = n % 8; + + n -= rest; + + switch (rest) { + + case 0: while (n != 0) { + n -= 8; + if ((*to++ = *from++) == (char)c) + return (to); + case 7: if ((*to++ = *from++) == (char)c) + return (to); + case 6: if ((*to++ = *from++) == (char)c) + return (to); + case 5: if ((*to++ = *from++) == (char)c) + return (to); + case 4: if ((*to++ = *from++) == (char)c) + return (to); + case 3: if ((*to++ = *from++) == (char)c) + return (to); + case 2: if ((*to++ = *from++) == (char)c) + return (to); + case 1: if ((*to++ = *from++) == (char)c) + return (to); + } + } +#endif + return (NULL); +} diff -Nru cdrtools-2.01.01a33/libschily/ofindline.3 cdrtools-3.02a09/libschily/ofindline.3 --- cdrtools-2.01.01a33/libschily/ofindline.3 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/libschily/ofindline.3 1988-07-21 16:54:00.000000000 +0000 @@ -0,0 +1,58 @@ +. \" Manual Seite fuer ofindline +. \" @(#)ofindline.3 1.1 +. \" +.if t .ds a \v'-0.55m'\h'0.00n'\z.\h'0.40n'\z.\v'0.55m'\h'-0.40n'a +.if t .ds o \v'-0.55m'\h'0.00n'\z.\h'0.45n'\z.\v'0.55m'\h'-0.45n'o +.if t .ds u \v'-0.55m'\h'0.00n'\z.\h'0.40n'\z.\v'0.55m'\h'-0.40n'u +.if t .ds A \v'-0.77m'\h'0.25n'\z.\h'0.45n'\z.\v'0.77m'\h'-0.70n'A +.if t .ds O \v'-0.77m'\h'0.25n'\z.\h'0.45n'\z.\v'0.77m'\h'-0.70n'O +.if t .ds U \v'-0.77m'\h'0.30n'\z.\h'0.45n'\z.\v'0.77m'\h'-.75n'U +.if t .ds s \(*b +.if t .ds S SS +.if n .ds a ae +.if n .ds o oe +.if n .ds u ue +.if n .ds s sz +.TH OFINDLINE 3 "15. Juli 1988" "J\*org Schilling" "Schily\'s LIBRARY FUNCTIONS" +.SH NAME +ofindline() \- finds a line with a matching field +.SH SYNOPSIS +.nf +.B +int ofindline(f,delim,string,field,array,arraysize) +.B FILE *f; +.B char delim; +.B char *string; +.B int field; +.B char *array[]; +.B int arraysize; +.fi +.SH DESCRIPTION +ofindline() retrieves a line from an open file that has a +matching character string in the given field. +.PP +ofindline() fills in array with pointers to strings that make up +each field on the line. The strings are allocated new storage. +The field delimiter, delim, is used to break up each line of the +file into fields. string is the string to match. fieldno is +the field number to match. Fields are numbered 0..n. array is +an array of pointers to fill in. arraysize is the size of +array. +.SH RETURNS +.TP +.B +1 +match. +.TP +.B \-1 +no match. +.TP +.B \-2 +arg error. Returned only if the condition +findline_arg_err is handled and the handler returns. +.TP +.B \-4 +not enough memory to allocate space for files. +Returned only if the condition findline_storage is +handled and the handler returns. +.SH NOTES +none diff -Nru cdrtools-2.01.01a33/libschily/ofindline.mk3 cdrtools-3.02a09/libschily/ofindline.mk3 --- cdrtools-2.01.01a33/libschily/ofindline.mk3 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/libschily/ofindline.mk3 2015-04-26 18:01:43.000000000 +0000 @@ -0,0 +1,18 @@ +#ident @(#)ofindline.mk3 1.1 15/04/26 +########################################################################### +# Sample makefile for installing manual pages +########################################################################### +SRCROOT= .. +RULESDIR= RULES +include $(SRCROOT)/$(RULESDIR)/rules.top +########################################################################### + +MANDIR= man +TARGETMAN= ofindline +MANSECT= $(MANSECT_LIB) +MANSUFFIX= $(MANSUFF_LIB) +MANFILE= ofindline.3 + +########################################################################### +include $(SRCROOT)/$(RULESDIR)/rules.man +########################################################################### diff -Nru cdrtools-2.01.01a33/libschily/openat.c cdrtools-3.02a09/libschily/openat.c --- cdrtools-2.01.01a33/libschily/openat.c 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/libschily/openat.c 2011-10-22 11:42:58.000000000 +0000 @@ -0,0 +1,140 @@ +/* @(#)openat.c 1.2 11/10/22 Copyright 2011 J. Schilling */ +/* + * Emulate the behavior of openat(fd, name, flag, mode) + * + * Note that emulation methods that do not use the /proc filesystem are + * not MT safe. In the non-MT-safe case, we do: + * + * savewd()/fchdir()/open(name)/restorewd() + * + * Errors may force us to abort the program as our caller is not expected + * to know that we do more than a simple open() here and that the + * working directory may be changed by us. + * + * Copyright (c) 2011 J. Schilling + */ +/* + * The contents of this file are subject to the terms of the + * Common Development and Distribution License, Version 1.0 only + * (the "License"). You may not use this file except in compliance + * with the License. + * + * See the file CDDL.Schily.txt in this distribution for details. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file CDDL.Schily.txt from this distribution. + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include "at-defs.h" + +#ifndef HAVE_OPENAT + +#ifndef ENAMETOOLONG +#define ENAMETOOLONG EINVAL +#endif + +/* VARARGS3 */ +#ifdef PROTOTYPES +EXPORT int +openat(int fd, const char *name, int oflag, ...) +#else +EXPORT int +openat(fd, name, oflag, va_alist) + int fd; + const char *name; + int oflag; + va_dcl +#endif +{ + va_list args; + mode_t omode = 0; + int n; + int ret; + char buf[PATH_MAX]; + char *proc_name; + struct save_wd save_wd; + + if (oflag & O_CREAT) { +#ifdef PROTOTYPES + va_start(args, oflag); +#else + va_start(args); +#endif + /* + * If sizeof (mode_t) is < sizeof (int) and used with va_arg(), + * GCC4 will abort the code. So we need to use the promoted + * size. + */ + omode = va_arg(args, PROMOTED_MODE_T); + va_end(args); + } + if (fd == AT_FDCWD || ABS_NAME(name)) + return (open(name, oflag, omode)); + + if ((proc_name = proc_fd2name(buf, fd, name)) != NULL) { + ret = open(proc_name, oflag, omode); + if (ret >= 0 || NON_PROCFS_ERRNO(errno)) + return (ret); + } else if (geterrno() == ENAMETOOLONG) { + return (-1); + } + + if (savewd(&save_wd) < 0) { + /* + * We abort here as the caller may not know that we are forced + * to savewd/fchdir/restorewd here and misinterpret errno. + */ + savewd_abort(geterrno()); + /* NOTREACHED */ + return (-1); + } + if (fd >= 0 && save_wd.fd == fd) { + /* + * If we just opened "fd" with the same number in savewd(), fd + * must have been illegal when calling openat(); + */ + closewd(&save_wd); + seterrno(EBADF); + return (-1); + } + if ((n = fchdir(fd)) < 0) { + int err = geterrno(); + /* + * In case that fchdir() is emulated via chdir() and we use a + * multi hop chdir(), we may be on an undefined intermediate + * directory. Try to return to last working directory and if + * this fails, abort for security. + */ + if (n == -2 && restorewd(&save_wd) < 0) { + restorewd_abort(geterrno()); + } + closewd(&save_wd); + seterrno(err); + return (-1); + } + + ret = open(name, oflag, omode); /* The actual open() */ + + if (restorewd(&save_wd) < 0) { + int err = geterrno(); + + close(ret); + closewd(&save_wd); + restorewd_abort(err); + seterrno(err); + return (-1); + } + closewd(&save_wd); + + return (ret); +} + +#endif /* HAVE_OPENAT */ diff -Nru cdrtools-2.01.01a33/libschily/patcompile.3 cdrtools-3.02a09/libschily/patcompile.3 --- cdrtools-2.01.01a33/libschily/patcompile.3 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/libschily/patcompile.3 2016-01-27 20:04:28.000000000 +0000 @@ -0,0 +1,64 @@ +. \" @(#)patcompile.3 1.3 16/01/27 Copyright 1985,1995-2016 J. Schilling +. \" Manual Seite fuer patcompile +. \" +.if t .ds a \v'-0.55m'\h'0.00n'\z.\h'0.40n'\z.\v'0.55m'\h'-0.40n'a +.if t .ds o \v'-0.55m'\h'0.00n'\z.\h'0.45n'\z.\v'0.55m'\h'-0.45n'o +.if t .ds u \v'-0.55m'\h'0.00n'\z.\h'0.40n'\z.\v'0.55m'\h'-0.40n'u +.if t .ds A \v'-0.77m'\h'0.25n'\z.\h'0.45n'\z.\v'0.77m'\h'-0.70n'A +.if t .ds O \v'-0.77m'\h'0.25n'\z.\h'0.45n'\z.\v'0.77m'\h'-0.70n'O +.if t .ds U \v'-0.77m'\h'0.30n'\z.\h'0.45n'\z.\v'0.77m'\h'-0.75n'U +.if t .ds s \(*b +.if t .ds S SS +.if n .ds a ae +.if n .ds o oe +.if n .ds u ue +.if n .ds A Ae +.if n .ds O Oe +.if n .ds U Ue +.if n .ds s sz +.TH PATCOMPILE 3 "15. Juli 1988" "J\*org Schilling" "Schily\'s LIBRARY FUNCTIONS" +.SH NAME +patcompile() \- compiles a matching pattern +.SH SYNOPSIS +.nf +.B +int patcompile(pattern, length, aux) +.B char *pattern; +.B int length; +.B int aux[]; +.fi +.SH DESCRIPTION +.B patcompile() +compiles a pattern into an internal form which +.BR patmatch (3) +can use. +.PP +The string at +.I pattern +with size +.I length +is scanned. The array +.B aux +is filled in with state information for +.BR patmatch (3). +.B aux +should have at least +.I length +elements. +.SH RETURNS +Returns 0 if the pattern contains an error. +.PP +Other values should be passed to +.BR patmatch (3) +as the +.B alt +argument. +.SH "SEE ALSO +.BR match (1) +.PP +For a description ot the regular expressions. +.SH NOTES +The pattern matching functions are based on ones presented by +Martin Richards in "A Compact Function for Regular Expression +Pattern Matching", Software-Practice and Experience vol 9, +527-534 (1979). diff -Nru cdrtools-2.01.01a33/libschily/patcompile.mk3 cdrtools-3.02a09/libschily/patcompile.mk3 --- cdrtools-2.01.01a33/libschily/patcompile.mk3 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/libschily/patcompile.mk3 2015-04-26 18:01:43.000000000 +0000 @@ -0,0 +1,18 @@ +#ident @(#)patcompile.mk3 1.1 15/04/26 +########################################################################### +# Sample makefile for installing manual pages +########################################################################### +SRCROOT= .. +RULESDIR= RULES +include $(SRCROOT)/$(RULESDIR)/rules.top +########################################################################### + +MANDIR= man +TARGETMAN= patcompile +MANSECT= $(MANSECT_LIB) +MANSUFFIX= $(MANSUFF_LIB) +MANFILE= patcompile.3 + +########################################################################### +include $(SRCROOT)/$(RULESDIR)/rules.man +########################################################################### diff -Nru cdrtools-2.01.01a33/libschily/patmatch.3 cdrtools-3.02a09/libschily/patmatch.3 --- cdrtools-2.01.01a33/libschily/patmatch.3 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/libschily/patmatch.3 2000-11-12 22:56:00.000000000 +0000 @@ -0,0 +1,75 @@ +. \" @(#)patmatch.3 1.2 00/11/12 Copyright 1985,1995 J. Schilling +. \" Manual Seite fuer patmatch +. \" +.if t .ds a \v'-0.55m'\h'0.00n'\z.\h'0.40n'\z.\v'0.55m'\h'-0.40n'a +.if t .ds o \v'-0.55m'\h'0.00n'\z.\h'0.45n'\z.\v'0.55m'\h'-0.45n'o +.if t .ds u \v'-0.55m'\h'0.00n'\z.\h'0.40n'\z.\v'0.55m'\h'-0.40n'u +.if t .ds A \v'-0.77m'\h'0.25n'\z.\h'0.45n'\z.\v'0.77m'\h'-0.70n'A +.if t .ds O \v'-0.77m'\h'0.25n'\z.\h'0.45n'\z.\v'0.77m'\h'-0.70n'O +.if t .ds U \v'-0.77m'\h'0.30n'\z.\h'0.45n'\z.\v'0.77m'\h'-0.75n'U +.if t .ds s \\(*b +.if t .ds S SS +.if n .ds a ae +.if n .ds o oe +.if n .ds u ue +.if n .ds s sz +.TH PATMATCH 3 "12. Nov 2000" "J\*org Schilling" "Schily\'s LIBRARY FUNCTIONS" +.SH NAME +patmatch() \- checks string for matches +.SH SYNOPSIS +.nf +.B +char *patmatch(pattern, aux, string, soff, slen, alt, state) +.B char *pattern; +.B int *aux; +.B char *string; +.B int soff; +.B int slen; +.B int alt; +.B int state[]; +.fi +.SH DESCRIPTION +.B patmatch() +uses the pattern matching information +.IR pattern +and in addition +.IR aux " and " alt +(previously set up by a call to +.BR patcompile (3)) +to check string for a match. The length of the string is +.I slen +and the starting index used for matching is +.IR soff . +The string can also be terminated by a null byte. +.PP +The +.I state +array is set up and used internally by +.B patmatch +and should have at least +.BI "strlen(" pattern ") + 1" +elements. +.SH RETURNS +Returns a NULL pointer if the +.I string +starting at the specified offset did not match the +.IR pattern . +.PP +Any non-NULL return is a pointer to the first character of +.I string +after the part that matches. +.SH "SEE ALSO +.BR patcompile (3) +for information on +.I aux +and +.IR alt . +.PP +And +.BR match (1) +for a description ot the regular expressions. +.SH NOTES +The pattern matching functions are based on ones presented by +Martin Richards in "A Compact Function for Regular Expression +Pattern Matching", Software-Practice and Experience vol 9, +527-534 (1979). diff -Nru cdrtools-2.01.01a33/libschily/patmatch.mk3 cdrtools-3.02a09/libschily/patmatch.mk3 --- cdrtools-2.01.01a33/libschily/patmatch.mk3 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/libschily/patmatch.mk3 2015-04-26 18:01:43.000000000 +0000 @@ -0,0 +1,18 @@ +#ident @(#)patmatch.mk3 1.1 15/04/26 +########################################################################### +# Sample makefile for installing manual pages +########################################################################### +SRCROOT= .. +RULESDIR= RULES +include $(SRCROOT)/$(RULESDIR)/rules.top +########################################################################### + +MANDIR= man +TARGETMAN= patmatch +MANSECT= $(MANSECT_LIB) +MANSUFFIX= $(MANSUFF_LIB) +MANFILE= patmatch.3 + +########################################################################### +include $(SRCROOT)/$(RULESDIR)/rules.man +########################################################################### diff -Nru cdrtools-2.01.01a33/libschily/peekc.3 cdrtools-3.02a09/libschily/peekc.3 --- cdrtools-2.01.01a33/libschily/peekc.3 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/libschily/peekc.3 1988-07-21 16:59:40.000000000 +0000 @@ -0,0 +1,36 @@ +. \" Manual Seite fuer peekc +. \" @(#)peekc.3 1.1 +. \" +.if t .ds a \v'-0.55m'\h'0.00n'\z.\h'0.40n'\z.\v'0.55m'\h'-0.40n'a +.if t .ds o \v'-0.55m'\h'0.00n'\z.\h'0.45n'\z.\v'0.55m'\h'-0.45n'o +.if t .ds u \v'-0.55m'\h'0.00n'\z.\h'0.40n'\z.\v'0.55m'\h'-0.40n'u +.if t .ds A \v'-0.77m'\h'0.25n'\z.\h'0.45n'\z.\v'0.77m'\h'-0.70n'A +.if t .ds O \v'-0.77m'\h'0.25n'\z.\h'0.45n'\z.\v'0.77m'\h'-0.70n'O +.if t .ds U \v'-0.77m'\h'0.30n'\z.\h'0.45n'\z.\v'0.77m'\h'-.75n'U +.if t .ds s \(*b +.if t .ds S SS +.if n .ds a ae +.if n .ds o oe +.if n .ds u ue +.if n .ds s sz +.TH PEEKC 3 "15. Juli 1988" "J\*org Schilling" "Schily\'s LIBRARY FUNCTIONS" +.SH NAME +peekc() \- shows the next character in the file +.SH SYNOPSIS +.nf +.B +int peekc(f) +.B FILE *f; +.fi +.SH DESCRIPTION +peekc() shows the next character in the file. It does not +remove the character. The next call to peekc() or getc() will +return the same character. +.SH RETURNS +Returns the next character in the file or EOF if the file is at +the end of data. +.SH NOTES +This call may be used only on buffered files. +.PP +Notice that peekc() is not declared as type char, since EOF is +not a valid value for a char object. diff -Nru cdrtools-2.01.01a33/libschily/peekc.mk3 cdrtools-3.02a09/libschily/peekc.mk3 --- cdrtools-2.01.01a33/libschily/peekc.mk3 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/libschily/peekc.mk3 2015-04-26 18:01:43.000000000 +0000 @@ -0,0 +1,18 @@ +#ident @(#)peekc.mk3 1.1 15/04/26 +########################################################################### +# Sample makefile for installing manual pages +########################################################################### +SRCROOT= .. +RULESDIR= RULES +include $(SRCROOT)/$(RULESDIR)/rules.top +########################################################################### + +MANDIR= man +TARGETMAN= peekc +MANSECT= $(MANSECT_LIB) +MANSUFFIX= $(MANSUFF_LIB) +MANFILE= peekc.3 + +########################################################################### +include $(SRCROOT)/$(RULESDIR)/rules.man +########################################################################### diff -Nru cdrtools-2.01.01a33/libschily/permtostr.c cdrtools-3.02a09/libschily/permtostr.c --- cdrtools-2.01.01a33/libschily/permtostr.c 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/libschily/permtostr.c 2011-08-16 21:29:41.000000000 +0000 @@ -0,0 +1,77 @@ +/* @(#)permtostr.c 1.2 11/08/16 Copyright 2011 J. Schilling */ +#include +#ifndef lint +static UConst char sccsid[] = + "@(#)permtostr.c 1.2 11/08/16 Copyright 2011 J. Schilling"; +#endif +/* + * mkgmtime() is a complement to getperm() + * + * Copyright (c) 2011 J. Schilling + */ +/* + * The contents of this file are subject to the terms of the + * Common Development and Distribution License, Version 1.0 only + * (the "License"). You may not use this file except in compliance + * with the License. + * + * See the file CDDL.Schily.txt in this distribution for details. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file CDDL.Schily.txt from this distribution. + */ + +#include +#include +#include +#include + +EXPORT void permtostr __PR((mode_t mode, char *s)); + +LOCAL mode_t modebits[9] = { + S_IXOTH, S_IWOTH, S_IROTH, + S_IXGRP, S_IWGRP, S_IRGRP, + S_IXUSR, S_IWUSR, S_IRUSR +}; + +/* + * The maximum length of the perm string (including the final null byte) is 24. + * If all permission related mode bits are set, the generated string will + * be: "u=srwx,g=srwx,o=rwx,a+t". + */ +#ifdef PROTOTYPES +EXPORT void +permtostr(register mode_t mode, char *s) +#else +EXPORT void +permtostr(mode, s) + register mode_t mode; + char *s; +#endif +{ + register char *mstr = "xwrxwrxwr"; + register char *str = s; + register int i; + + for (i = 9; --i >= 0; ) { + if (i % 3 == 2) { + if (str > s) + *str++ = ','; + *str++ = "ogu"[i/3]; + *str++ = '='; + if (i == 8 && mode & S_ISUID) + *str++ = 's'; + if (i == 5 && mode & S_ISGID) + *str++ = 's'; + } + if (mode & modebits[i]) + *str++ = mstr[i]; + } + if (mode & S_ISVTX) { + *str++ = ','; + *str++ = 'a'; + *str++ = '+'; + *str++ = 't'; + } + *str = '\0'; +} diff -Nru cdrtools-2.01.01a33/libschily/printf.3 cdrtools-3.02a09/libschily/printf.3 --- cdrtools-2.01.01a33/libschily/printf.3 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/libschily/printf.3 1988-07-22 13:53:19.000000000 +0000 @@ -0,0 +1,34 @@ +. \" Manual Seite fuer printf +. \" @(#)printf.3 1.1 +. \" +.if t .ds a \v'-0.55m'\h'0.00n'\z.\h'0.40n'\z.\v'0.55m'\h'-0.40n'a +.if t .ds o \v'-0.55m'\h'0.00n'\z.\h'0.45n'\z.\v'0.55m'\h'-0.45n'o +.if t .ds u \v'-0.55m'\h'0.00n'\z.\h'0.40n'\z.\v'0.55m'\h'-0.40n'u +.if t .ds A \v'-0.77m'\h'0.25n'\z.\h'0.45n'\z.\v'0.77m'\h'-0.70n'A +.if t .ds O \v'-0.77m'\h'0.25n'\z.\h'0.45n'\z.\v'0.77m'\h'-0.70n'O +.if t .ds U \v'-0.77m'\h'0.30n'\z.\h'0.45n'\z.\v'0.77m'\h'-.75n'U +.if t .ds s \(*b +.if t .ds S SS +.if n .ds a ae +.if n .ds o oe +.if n .ds u ue +.if n .ds s sz +.TH PRINTF 3 "15. Juli 1988" "J\*org Schilling" "Schily\'s LIBRARY FUNCTIONS" +.SH NAME +printf() \- formats and prints to standard output +.SH SYNOPSIS +.nf +.B +printf(format, arg1, \|.\|.\|., argn) +.B char *format; +.fi +.SH DESCRIPTION +printf() formats its arguments using the routine format(). +See format() for information about the options for formatting. +.SH RETURNS +none +.SH "SEE ALSO" +format(3), fprintf(3) +.SH NOTES +printf() buffers its output internally until it is finished then +the buffer is flushed. diff -Nru cdrtools-2.01.01a33/libschily/printf.c cdrtools-3.02a09/libschily/printf.c --- cdrtools-2.01.01a33/libschily/printf.c 2006-09-13 15:05:35.000000000 +0000 +++ cdrtools-3.02a09/libschily/printf.c 2009-07-10 19:55:11.000000000 +0000 @@ -1,4 +1,4 @@ -/* @(#)printf.c 1.16 06/09/13 Copyright 1985, 1989, 1995-2003 J. Schilling */ +/* @(#)printf.c 1.17 09/07/10 Copyright 1985, 1989, 1995-2003 J. Schilling */ /* * Copyright (c) 1985, 1989, 1995-2003 J. Schilling */ @@ -27,7 +27,7 @@ # define fprintf __nothing2__ #endif -#include +#include #include #include #include diff -Nru cdrtools-2.01.01a33/libschily/printf.mk3 cdrtools-3.02a09/libschily/printf.mk3 --- cdrtools-2.01.01a33/libschily/printf.mk3 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/libschily/printf.mk3 2015-04-26 18:01:43.000000000 +0000 @@ -0,0 +1,18 @@ +#ident @(#)printf.mk3 1.1 15/04/26 +########################################################################### +# Sample makefile for installing manual pages +########################################################################### +SRCROOT= .. +RULESDIR= RULES +include $(SRCROOT)/$(RULESDIR)/rules.top +########################################################################### + +MANDIR= man +TARGETMAN= printf +MANSECT= $(MANSECT_LIB) +MANSUFFIX= $(MANSUFF_LIB) +MANFILE= printf.3 + +########################################################################### +include $(SRCROOT)/$(RULESDIR)/rules.man +########################################################################### diff -Nru cdrtools-2.01.01a33/libschily/procnameat.c cdrtools-3.02a09/libschily/procnameat.c --- cdrtools-2.01.01a33/libschily/procnameat.c 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/libschily/procnameat.c 2011-10-22 19:53:49.000000000 +0000 @@ -0,0 +1,99 @@ +/* @(#)procnameat.c 1.2 11/10/22 Copyright 2011 J. Schilling */ +/* + * Return a path name for a /proc related access to fd/name if possible. + * + * We need to test this at runtime in order to avoid incorrect behavior + * from running a program on a newer OS that it has been compiled for. + * + * NOTE: The entries /proc/self/{fd|path}/%d are symlinks and thus do + * not allow to access paths of unlimited length as possible + * with a real openat(fd, name, flags) call. + * + * Copyright (c) 2011 J. Schilling + */ +/* + * The contents of this file are subject to the terms of the + * Common Development and Distribution License, Version 1.0 only + * (the "License"). You may not use this file except in compliance + * with the License. + * + * See the file CDDL.Schily.txt in this distribution for details. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file CDDL.Schily.txt from this distribution. + */ + +#include +#include +#include +#include +#include +#include +#include +#include "at-defs.h" + +#ifndef ENAMETOOLONG +#define ENAMETOOLONG EINVAL +#endif + +#define PROC_SELF_FD_FORMAT "/proc/self/fd/%d/%s" /* Older procfs */ +#define PROC_SELF_PATH_FORMAT "/proc/self/path/%d/%s" /* Newer procfs */ +#define PROC_PID_FD_FORMAT "/proc/%ld/fd/%d/%s" /* AIX has no self */ + +char * +proc_fd2name(buf, fd, name) + char *buf; + int fd; + const char *name; +{ +static int proc_type; + + if (proc_type == 0) { + int proc_fd; + + /* + * First test the newer feature as the older /proc/self/fd/%d + * feature is still available on newer systems. + */ + proc_fd = open("/proc/self/path", O_SEARCH); + if (proc_fd >= 0) { + proc_type = 1; + close(proc_fd); + } else { + proc_fd = open("/proc/self/fd", O_SEARCH); + if (proc_fd >= 0) { + proc_type = 2; + close(proc_fd); + } else { + js_snprintf(buf, PATH_MAX, + "/proc/%ld/fd", (long)getpid()); + proc_fd = open(buf, O_SEARCH); + if (proc_fd >= 0) { + proc_type = 3; + close(proc_fd); + } else { + proc_type = -1; + return ((char *)0); + } + } + } + } else if (proc_type < 0) { + return ((char *)0); + } + if (proc_type == 3) { + if (js_snprintf(buf, PATH_MAX, + PROC_PID_FD_FORMAT, + (long)getpid(), fd, name) >= PATH_MAX) { + seterrno(ENAMETOOLONG); + return (NULL); + } + } else if (js_snprintf(buf, PATH_MAX, + proc_type == 1 ? + PROC_SELF_PATH_FORMAT : + PROC_SELF_FD_FORMAT, + fd, name) >= PATH_MAX) { + seterrno(ENAMETOOLONG); + return (NULL); + } + return (buf); +} diff -Nru cdrtools-2.01.01a33/libschily/raisecond.3 cdrtools-3.02a09/libschily/raisecond.3 --- cdrtools-2.01.01a33/libschily/raisecond.3 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/libschily/raisecond.3 1989-08-30 21:41:15.000000000 +0000 @@ -0,0 +1,49 @@ +. \" Manual Seite fuer raise +. \" @(#)raise.3 1.1 +. \" +.if t .ds a \v'-0.55m'\h'0.00n'\z.\h'0.40n'\z.\v'0.55m'\h'-0.40n'a +.if t .ds o \v'-0.55m'\h'0.00n'\z.\h'0.45n'\z.\v'0.55m'\h'-0.45n'o +.if t .ds u \v'-0.55m'\h'0.00n'\z.\h'0.40n'\z.\v'0.55m'\h'-0.40n'u +.if t .ds A \v'-0.77m'\h'0.25n'\z.\h'0.45n'\z.\v'0.77m'\h'-0.70n'A +.if t .ds O \v'-0.77m'\h'0.25n'\z.\h'0.45n'\z.\v'0.77m'\h'-0.70n'O +.if t .ds U \v'-0.77m'\h'0.30n'\z.\h'0.45n'\z.\v'0.77m'\h'-.75n'U +.if t .ds s \(*b +.if t .ds S SS +.if n .ds a ae +.if n .ds o oe +.if n .ds u ue +.if n .ds s sz +.TH RAISE 3 "15. Juli 1988" "J\*org Schilling" "Schily\'s LIBRARY FUNCTIONS" +.SH NAME +raise() \- raises a condition +.SH SYNOPSIS +.nf +.B +raise(signame, arg2) +.B char *signame; +.B long arg2; +.fi +.SH DESCRIPTION +raise causes the condition signame to be signalled on the stack, +in each frame in order from the most recent (top of stack) to +the oldest. Each frame is checked for a condition handler for +signame or, if one is not found in the frame, for any_other. If +a handler is found, it is called with signame and with arg1, +established in the call to handle(), and arg2, from this call. +If a handler is not found, the process is repeated in the next +older stack frame. If raise() reaches the end of the stack +without finding a handler, it prints "Condition not caught: +condition_name" on stderr and the process is suspended via +abort(). +.PP +If the handler returns TRUE, raise() returns. Otherwise it +continues just as if it had not found the handler. +.SH RETURNS +none +.SH NOTES +handle() and raise() are frequently used with the subroutines +longjmp() and setjmp(). +.PP +Routines that call raise() can choose to ignore the result; +however, they should anticipate the condition in order to ensure +a reasonable outcome to the program. diff -Nru cdrtools-2.01.01a33/libschily/raisecond.c cdrtools-3.02a09/libschily/raisecond.c --- cdrtools-2.01.01a33/libschily/raisecond.c 2007-02-07 13:59:01.000000000 +0000 +++ cdrtools-3.02a09/libschily/raisecond.c 2009-07-10 19:54:04.000000000 +0000 @@ -1,4 +1,4 @@ -/* @(#)raisecond.c 1.21 07/02/07 Copyright 1985, 1989, 1995-2004 J. Schilling */ +/* @(#)raisecond.c 1.22 09/07/10 Copyright 1985, 1989, 1995-2004 J. Schilling */ /* * raise a condition (software signal) */ @@ -22,7 +22,7 @@ * Copyright (c) 1985, 1989, 1995-2004 J. Schilling */ #include -#include +#include #include #include #include diff -Nru cdrtools-2.01.01a33/libschily/raisecond.mk3 cdrtools-3.02a09/libschily/raisecond.mk3 --- cdrtools-2.01.01a33/libschily/raisecond.mk3 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/libschily/raisecond.mk3 2015-04-26 18:01:43.000000000 +0000 @@ -0,0 +1,18 @@ +#ident @(#)raisecond.mk3 1.1 15/04/26 +########################################################################### +# Sample makefile for installing manual pages +########################################################################### +SRCROOT= .. +RULESDIR= RULES +include $(SRCROOT)/$(RULESDIR)/rules.top +########################################################################### + +MANDIR= man +TARGETMAN= raisecond +MANSECT= $(MANSECT_LIB) +MANSUFFIX= $(MANSUFF_LIB) +MANFILE= raisecond.3 + +########################################################################### +include $(SRCROOT)/$(RULESDIR)/rules.man +########################################################################### diff -Nru cdrtools-2.01.01a33/libschily/readlinkat.c cdrtools-3.02a09/libschily/readlinkat.c --- cdrtools-2.01.01a33/libschily/readlinkat.c 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/libschily/readlinkat.c 2013-10-30 22:54:18.000000000 +0000 @@ -0,0 +1,71 @@ +/* @(#)readlinkat.c 1.2 13/10/30 Copyright 2013 J. Schilling */ +/* + * Emulate the behavior of readlinkat(int fd, const char *name, char *lbuf, size_t lbufsize) + * + * Note that emulation methods that do not use the /proc filesystem are + * not MT safe. In the non-MT-safe case, we do: + * + * savewd()/fchdir()/open(name)/restorewd() + * + * Errors may force us to abort the program as our caller is not expected + * to know that we do more than a simple open() here and that the + * working directory may be changed by us. + * + * Copyright (c) 2013 J. Schilling + */ +/* + * The contents of this file are subject to the terms of the + * Common Development and Distribution License, Version 1.0 only + * (the "License"). You may not use this file except in compliance + * with the License. + * + * See the file CDDL.Schily.txt in this distribution for details. + * A copy of the CDDL is also available via the Internet at + * http://www.opensource.org/licenses/cddl1.txt + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file CDDL.Schily.txt from this distribution. + */ + +#include +#include +#include +#include +#include +#include +#include +#include "at-defs.h" + +#ifndef HAVE_READLINKAT +#ifndef HAVE_READLINK +/* ARGSUSED */ +EXPORT ssize_t +readlinkat(fd, name, lbuf, lbufsize) + int fd; + const char *name; + char *lbuf; + size_t lbufsize; +{ +#ifdef ENOSYS + seterrno(ENOSYS); +#else + seterrno(EINVAL); +#endif + return (-1); +} +#else + +/* CSTYLED */ +#define PROTO_DECL , char *lbuf, size_t lbufsize +#define KR_DECL char *lbuf; size_t lbufsize; +/* CSTYLED */ +#define KR_ARGS , lbuf, lbufsize +#define FUNC_CALL(n) readlink(n, lbuf, lbufsize) +#define FLAG_CHECK() +#define FUNC_NAME readlinkat +#define FUNC_RESULT ssize_t + +#include "at-base.c" + +#endif /* HAVE_READLINK */ +#endif /* HAVE_READLINKAT */ diff -Nru cdrtools-2.01.01a33/libschily/renameat.c cdrtools-3.02a09/libschily/renameat.c --- cdrtools-2.01.01a33/libschily/renameat.c 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/libschily/renameat.c 2015-11-17 19:08:40.000000000 +0000 @@ -0,0 +1,52 @@ +/* @(#)renameat.c 1.2 15/11/17 Copyright 2011-2015 J. Schilling */ +/* + * Emulate the behavior of renameat(int fd1, const char *name1, + * int fd2, const char *name2) + * + * Note that emulation methods that do not use the /proc filesystem are + * not MT safe. In the non-MT-safe case, we do: + * + * savewd()/fchdir()/open(name)/restorewd() + * + * Errors may force us to abort the program as our caller is not expected + * to know that we do more than a simple open() here and that the + * working directory may be changed by us. + * + * Copyright (c) 2015 J. Schilling + */ +/* + * The contents of this file are subject to the terms of the + * Common Development and Distribution License, Version 1.0 only + * (the "License"). You may not use this file except in compliance + * with the License. + * + * See the file CDDL.Schily.txt in this distribution for details. + * A copy of the CDDL is also available via the Internet at + * http://www.opensource.org/licenses/cddl1.txt + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file CDDL.Schily.txt from this distribution. + */ + +#include /* POSIX requires stdio.h for rename */ +#include +#include +#include +#include +#include +#include +#include +#include "at-defs.h" + +#ifndef HAVE_RENAMEAT + +#define KR_DECL +#define KR_ARGS +#define FUNC_CALL(n1, n2) rename(n2, n2) +#define FLAG_CHECK() +#define FUNC_NAME renameat +#define FUNC_RESULT int + +#include "at-base2.c" + +#endif /* HAVE_RENAMEAT */ diff -Nru cdrtools-2.01.01a33/libschily/rename.c cdrtools-3.02a09/libschily/rename.c --- cdrtools-2.01.01a33/libschily/rename.c 2006-09-26 11:29:58.000000000 +0000 +++ cdrtools-3.02a09/libschily/rename.c 2011-06-18 19:23:42.000000000 +0000 @@ -1,12 +1,13 @@ -/* @(#)rename.c 1.8 06/09/26 Copyright 1998-2003 J. Schilling */ +/* @(#)rename.c 1.11 11/06/18 Copyright 1998-2011 J. Schilling */ +#include #ifndef lint -static char sccsid[] = - "@(#)rename.c 1.8 06/09/26 Copyright 1998-2003 J. Schilling"; +static UConst char sccsid[] = + "@(#)rename.c 1.11 11/06/18 Copyright 1998-2011 J. Schilling"; #endif /* * rename() for old systems that don't have it. * - * Copyright (c) 1998-2003 J. Schilling + * Copyright (c) 1998-2011 J. Schilling */ /* * The contents of this file are subject to the terms of the @@ -25,7 +26,8 @@ #ifndef HAVE_RENAME -#include /* XXX not OK but needed for js_xx() in schily/schily.h */ +#include /* XXX not OK but needed for js_xx() in schily/schily.h */ +#include #include #include #include @@ -59,10 +61,11 @@ const char *old; const char *new; { - char nname[MAXNAME]; char bakname[MAXNAME]; + char *p; char strpid[32]; int strplen; + int plen; BOOL savpresent = FALSE; BOOL newpresent = FALSE; int serrno; @@ -81,21 +84,34 @@ return (0); /* old == new we are done */ } - strplen = js_snprintf(strpid, sizeof (strpid), ".%lld", +#ifndef HAVE_MKTEMP + strplen = js_snprintf(strpid, sizeof (strpid), ".%llx", (Llong)getpid()); +#else + strplen = 6; + strcpy(strpid, "XXXXXX"); +#endif - if (strlen(new) <= (MAXNAME-strplen) || - strchr(&new[MAXNAME-strplen], '/') == NULL) { - /* - * Save old version of file 'new'. - */ - strncpy(nname, new, MAXNAME-strplen); - nname[MAXNAME-strplen] = '\0'; - js_snprintf(bakname, sizeof (bakname), "%s%s", nname, strpid); - unlink(bakname); - if (link(new, bakname) >= 0) - savpresent = TRUE; - } + /* + * Save old version of file 'new' to allow us to restore it. + * Platforms without rename() usually only support short filenames + * but limit pid to 32000. + */ + strlcpy(bakname, new, MAXNAME-strplen); + p = strrchr(bakname, '/'); + if (p == NULL) + p = bakname; + else + p++; + plen = strlen(p); + if ((plen + strplen) > 14) + p[14-strplen] = '\0'; + strcat(p, strpid); +#ifdef HAVE_MKTEMP + mktemp(bakname); +#endif + if (bakname[0] != '\0' && link(new, bakname) >= 0) + savpresent = TRUE; if (newpresent) { if (rmdir(new) < 0) { @@ -126,7 +142,8 @@ } if (unlink(old) < 0) return (-1); - unlink(bakname); /* Fails in most cases... */ + if (savpresent) + unlink(bakname); /* Fails in most cases... */ seterrno(serrno); /* ...so restore errno */ return (0); } diff -Nru cdrtools-2.01.01a33/libschily/resolvefpath.3 cdrtools-3.02a09/libschily/resolvefpath.3 --- cdrtools-2.01.01a33/libschily/resolvefpath.3 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/libschily/resolvefpath.3 2015-04-27 19:37:50.000000000 +0000 @@ -0,0 +1,2 @@ +.so man3/resolvepath.3 +.\" @(#)resolvefpath.3 1.1 15/04/27 joerg diff -Nru cdrtools-2.01.01a33/libschily/resolvefpath.mk3 cdrtools-3.02a09/libschily/resolvefpath.mk3 --- cdrtools-2.01.01a33/libschily/resolvefpath.mk3 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/libschily/resolvefpath.mk3 2015-04-26 18:01:43.000000000 +0000 @@ -0,0 +1,18 @@ +#ident @(#)resolvefpath.mk3 1.1 15/04/26 +########################################################################### +# Sample makefile for installing manual pages +########################################################################### +SRCROOT= .. +RULESDIR= RULES +include $(SRCROOT)/$(RULESDIR)/rules.top +########################################################################### + +MANDIR= man +TARGETMAN= resolvefpath +MANSECT= $(MANSECT_LIB) +MANSUFFIX= $(MANSUFF_LIB) +MANFILE= resolvefpath.3 + +########################################################################### +include $(SRCROOT)/$(RULESDIR)/rules.man +########################################################################### diff -Nru cdrtools-2.01.01a33/libschily/resolvenpath.3 cdrtools-3.02a09/libschily/resolvenpath.3 --- cdrtools-2.01.01a33/libschily/resolvenpath.3 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/libschily/resolvenpath.3 2015-04-27 19:37:50.000000000 +0000 @@ -0,0 +1,2 @@ +.so man3/resolvepath.3 +.\" @(#)resolvenpath.3 1.1 15/04/27 joerg diff -Nru cdrtools-2.01.01a33/libschily/resolvenpath.mk3 cdrtools-3.02a09/libschily/resolvenpath.mk3 --- cdrtools-2.01.01a33/libschily/resolvenpath.mk3 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/libschily/resolvenpath.mk3 2015-04-26 18:01:43.000000000 +0000 @@ -0,0 +1,18 @@ +#ident @(#)resolvenpath.mk3 1.1 15/04/26 +########################################################################### +# Sample makefile for installing manual pages +########################################################################### +SRCROOT= .. +RULESDIR= RULES +include $(SRCROOT)/$(RULESDIR)/rules.top +########################################################################### + +MANDIR= man +TARGETMAN= resolvenpath +MANSECT= $(MANSECT_LIB) +MANSUFFIX= $(MANSUFF_LIB) +MANFILE= resolvenpath.3 + +########################################################################### +include $(SRCROOT)/$(RULESDIR)/rules.man +########################################################################### diff -Nru cdrtools-2.01.01a33/libschily/resolvepath.3 cdrtools-3.02a09/libschily/resolvepath.3 --- cdrtools-2.01.01a33/libschily/resolvepath.3 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/libschily/resolvepath.3 2015-04-27 19:38:34.000000000 +0000 @@ -0,0 +1,114 @@ +. \" Manual Seite fuer resolvepath +. \" @(#)resolvepath.3 1.1 15/04/27 Copyright 2015 J. Schilling +. \" +.if t .ds a \v'-0.55m'\h'0.00n'\z.\h'0.40n'\z.\v'0.55m'\h'-0.40n'a +.if t .ds o \v'-0.55m'\h'0.00n'\z.\h'0.45n'\z.\v'0.55m'\h'-0.45n'o +.if t .ds u \v'-0.55m'\h'0.00n'\z.\h'0.40n'\z.\v'0.55m'\h'-0.40n'u +.if t .ds A \v'-0.77m'\h'0.25n'\z.\h'0.45n'\z.\v'0.77m'\h'-0.70n'A +.if t .ds O \v'-0.77m'\h'0.25n'\z.\h'0.45n'\z.\v'0.77m'\h'-0.70n'O +.if t .ds U \v'-0.77m'\h'0.30n'\z.\h'0.45n'\z.\v'0.77m'\h'-.75n'U +.if t .ds s \(*b +.if t .ds S SS +.if n .ds a ae +.if n .ds o oe +.if n .ds u ue +.if n .ds s sz +.TH RESOLVEPATH 3 "%e%" "J\*org Schilling" "Schily\'s LIBRARY FUNCTIONS" +.SH NAME +resolvepath(), resolvenpath(), resolvefpath() \- resolve all symbolic links of a path name +.SH SYNOPSIS +.nf +#include +.sp +.B int +.B resolvepath(path, buf, bufsiz) +.B " const char *path; +.B " char *buf; +.B " size_t bufsiz; +.sp +.B int +.B resolvenpath(path, buf, bufsiz) +.B " const char *path; +.B " char *buf; +.B " size_t bufsiz; +.sp +.B int +.B resolvefpath(path, buf, bufsiz, flags) +.B " const char *path; +.B " char *buf; +.B " size_t bufsiz; +.B " int flags; +.fi +.SH DESCRIPTION +.LP +.BR resolvepath () +takes a relative path name and resolves all smbolic links in the path name. +The result is a path name that is free of symbolic links. +.I path +is relative path name that is used as the input. +.I buf +is the buffer used for the result of the conversion. +.I bufsiz +is the size of the result buffer. +.LP +All ``.'' components are eliminated and every non-leading +``..'' component is eliminated together with its preceding +directory component. If leading ``..'' components reach to +the root directory, they are replaced by ``/''. +.LP +.BR resolvenpath () +behaves like +.BR resolvepath () +exept that the file does not need to exist. +.LP +.BR resolvefpath () +takes an additional +.I flags +parameter from the set of flags from the following set: +.TP 20 +.B RSPF_EXIST +All path components must exist. +.TP +.B RSPF_NOFOLLOW_LAST +Don't follow symbolic links in the last path component. + +.SH RETURN VALUE +.LP +Upon successful completion, +.BR resolvepath (), +.BR resolvenpath () +and +.BR resolvefpath () +return the number of bytes placed in the buffer +Otherwise, -1 is returned and errno is set to indicate the error. +In case of an error, the contents of result buffer is left +in an intermediate state. +.SH ERRORS +.LP +.TP 10 +.B ERANGE +The path does not fit into the suplied buffer. +.TP +.B EFAULT +A null pointer was suplied as pathname. +.TP +.B EINVAL +An empty relative path was supplied. +.TP +other +Any other value that may be a result of an underlying filesystem +operation. +.SH USAGE +Applications should not assume that the returned contents of +the buffer are null-terminated. This is because the function +.BR resolvepath (3) +may be the Solaris version of the rogram is compiled on Solaris. +.SH EXAMPLES +.LP +.SH "SEE ALSO" +.LP +.BR resolvepath (3), +.BR resolvenpath (3), +.BR resolvefpath (3) +.SH NOTES +none diff -Nru cdrtools-2.01.01a33/libschily/resolvepath.c cdrtools-3.02a09/libschily/resolvepath.c --- cdrtools-2.01.01a33/libschily/resolvepath.c 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/libschily/resolvepath.c 2015-07-20 18:34:55.000000000 +0000 @@ -0,0 +1,289 @@ +/* @(#)resolvepath.c 1.6 15/07/20 Copyright 2011-2015 J. Schilling */ +/* + * resolvepath() removes "./" and non-leading "/.." path components. + * It tries to do the same as the Solaris syscall with the same name. + * + * Copyright (c) 2011-2015 J. Schilling + */ +/* + * The contents of this file are subject to the terms of the + * Common Development and Distribution License, Version 1.0 only + * (the "License"). You may not use this file except in compliance + * with the License. + * + * See the file CDDL.Schily.txt in this distribution for details. + * A copy of the CDDL is also available via the Internet at + * http://www.opensource.org/licenses/cddl1.txt + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file CDDL.Schily.txt from this distribution. + */ + +#include +#include +#include +#include +#include +#include +#include + +#ifndef HAVE_LSTAT +#define lstat stat +#endif + +#ifndef HAVE_RESOLVEPATH +EXPORT int resolvepath __PR((const char *path, char *buf, + size_t bufsiz)); +#endif +EXPORT int resolvenpath __PR((const char *path, char *buf, + size_t bufsiz)); +LOCAL int pathresolve __PR((const char *path, const char *p, + char *buf, char *b, + size_t bufsiz, int flags)); +LOCAL int shorten __PR((char *path)); + +#ifndef HAVE_RESOLVEPATH +/* + * Warning: The Solaris system call "resolvepath()" does not null-terminate + * the result in "buf". Code that used resolvepath() should manually + * null-terminate the buffer. + * + * Note: Path needs to exist. + */ +EXPORT int +resolvepath(path, buf, bufsiz) + register const char *path; + char *buf; + size_t bufsiz; +{ + return (pathresolve(path, path, buf, buf, bufsiz, RSPF_EXIST)); +} +#endif + +/* + * Path may not exist. + */ +EXPORT int +resolvenpath(path, buf, bufsiz) + register const char *path; + char *buf; + size_t bufsiz; +{ + return (pathresolve(path, path, buf, buf, bufsiz, 0)); +} + +/* + * The behavior may be controlled via flags: + * + * RSPF_EXIST All path components must exist + * RSPF_NOFOLLOW_LAST Do not follow link in last path component + */ +EXPORT int +resolvefpath(path, buf, bufsiz, flags) + register const char *path; + char *buf; + size_t bufsiz; + int flags; +{ + return (pathresolve(path, path, buf, buf, bufsiz, flags)); +} + + +LOCAL int +pathresolve(path, p, buf, b, bufsiz, flags) + register const char *path; + register const char *p; + char *buf; + register char *b; + size_t bufsiz; + int flags; +{ +register char *e; + int len = 0; + struct stat rsb; + struct stat sb; + + if (path == NULL || buf == NULL) { + seterrno(EFAULT); + return (-1); + } + if (*path == '\0') { + seterrno(EINVAL); + return (-1); + } + + if (bufsiz <= 0) + return (0); + if (p == path && p[0] == '/') + *b++ = *p++; + + rsb.st_ino = 0; + rsb.st_nlink = 0; + + while (*p) { + if ((b - buf) >= bufsiz) { + buf[bufsiz-1] = '\0'; /* bufziz > 0 tested before */ + return (bufsiz); + } + *b = '\0'; + + if (p[0] == '/') { + p += 1; + continue; + } + if (p[0] == '.' && + (p[1] == '/' || p[1] == '\0')) { + if (p == path && p[1] == '\0') + return (strlcpy(buf, ".", bufsiz)); + if (p[1] == '\0') + p += 1; + else + p += 2; + continue; + } + + if (p[0] == '.' && p[1] == '.' && + (p[2] == '/' || p[2] == '\0')) { + if (p[2] == '\0') + p += 2; + else + p += 3; + if (!shorten(buf)) { + if (strlcat(buf, + buf[0]?"/..":"..", bufsiz) >= bufsiz) { + return (bufsiz); + } + } + b = buf + strlen(buf); + if (stat(buf, &sb) < 0) { + return (-1); + } + if (rsb.st_ino == 0 || rsb.st_nlink == 0) { + if (stat("/", &rsb) < 0) + return (-1); + } + if (sb.st_dev == rsb.st_dev && + sb.st_ino == rsb.st_ino) { + if (strlcpy(buf, "/", bufsiz) >= bufsiz) { + return (bufsiz); + } + } + continue; + } + + if (b > &buf[1] || (b == &buf[1] && buf[0] != '/')) + *b++ = '/'; + if ((b - buf) >= bufsiz) { + buf[bufsiz-1] = '\0'; /* bufziz > 0 tested before */ + return (bufsiz); + } + e = strchr(p, '/'); + if (e) + len = e - p; + else + len = strlen(p); + if (++len > (bufsiz - (b - buf))) { /* Add one for strlcpy() */ + len = bufsiz - (b - buf); + strlcpy(b, p, len); + return (bufsiz); + } + + strlcpy(b, p, len); + p += len - 1; + if (lstat(buf, &sb) < 0) { + if (flags & RSPF_EXIST) + return (-1); + sb.st_mode = S_IFREG; + } + if (e == NULL && (flags & RSPF_NOFOLLOW_LAST) && + S_ISLNK(sb.st_mode)) { + b += len - 1; + break; + } else if (S_ISLNK(sb.st_mode)) { + char lname[PATH_MAX+1]; + + len = readlink(buf, lname, sizeof (lname)); + if (len < 0) { + return (-1); + } + if (len < sizeof (lname)) + lname[len] = '\0'; + else + lname[sizeof (lname)-1] = '\0'; + *b = '\0'; + len += strlen(buf) + 1; + { +#ifdef HAVE_DYN_ARRAYS + char bx[len]; +#else + char *bx = malloc(len); + if (bx == NULL) + return (-1); +#endif + strcatl(bx, buf, lname, (char *)0); + if (b > &buf[1] && b[-1] == '/') + --b; + len = pathresolve(bx, bx + (b - buf), buf, b, + bufsiz, flags); +#ifndef HAVE_DYN_ARRAYS + free(bx); +#endif + } + if (len < 0) { + return (-1); + } + b = buf + len; + } else { + b += len - 1; + } + if (e == NULL) + break; + } + + if ((b - buf) >= bufsiz) { + buf[bufsiz-1] = '\0'; /* bufziz > 0 tested before */ + return (bufsiz); + } + buf[(b - buf)] = '\0'; + return (b - buf); +} + +/* + * Removes last path name component. + * Returns FALSE if path could not be shortened. + * Does not remove path components if already at root direcory. + */ +LOCAL int +shorten(path) + register char *path; +{ + register char *p = path; + + + if (p[0] == '\0') /* Cannot shorten empty path */ + return (FALSE); /* Leave empty to add ".." */ + if (p[0] == '.' && p[1] == '\0') { /* Path is just "." */ + *p = '\0'; /* Prepare to add ".." */ + return (FALSE); + } + + for (p = path; *p++ != '\0'; ); + while (p > path) { + if (*--p == '/') + break; + } + + if (p[0] == '.' && p[1] == '.' && p[2] == '\0') { + return (FALSE); + } + if (p[0] == '/' && p[1] == '.' && p[2] == '.' && p[3] == '\0') { + return (FALSE); + } + + if (p == path && p[0] == '/') + p++; + else if (p == path) + *p++ = '.'; + *p = '\0'; + return (TRUE); +} diff -Nru cdrtools-2.01.01a33/libschily/resolvepath.mk3 cdrtools-3.02a09/libschily/resolvepath.mk3 --- cdrtools-2.01.01a33/libschily/resolvepath.mk3 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/libschily/resolvepath.mk3 2015-04-26 18:01:43.000000000 +0000 @@ -0,0 +1,18 @@ +#ident @(#)resolvepath.mk3 1.1 15/04/26 +########################################################################### +# Sample makefile for installing manual pages +########################################################################### +SRCROOT= .. +RULESDIR= RULES +include $(SRCROOT)/$(RULESDIR)/rules.top +########################################################################### + +MANDIR= man +TARGETMAN= resolvepath +MANSECT= $(MANSECT_LIB) +MANSUFFIX= $(MANSUFF_LIB) +MANFILE= resolvepath.3 + +########################################################################### +include $(SRCROOT)/$(RULESDIR)/rules.man +########################################################################### diff -Nru cdrtools-2.01.01a33/libschily/saveargs.c cdrtools-3.02a09/libschily/saveargs.c --- cdrtools-2.01.01a33/libschily/saveargs.c 2006-10-05 15:56:51.000000000 +0000 +++ cdrtools-3.02a09/libschily/saveargs.c 2010-11-17 23:29:19.000000000 +0000 @@ -1,8 +1,8 @@ -/* @(#)saveargs.c 1.13 06/10/05 Copyright 1995-2003 J. Schilling */ +/* @(#)saveargs.c 1.16 10/11/18 Copyright 1995-2010 J. Schilling */ /* * save argc, argv for command error printing routines * - * Copyright (c) 1995-2003 J. Schilling + * Copyright (c) 1995-2010 J. Schilling */ /* * The contents of this file are subject to the terms of the @@ -22,6 +22,7 @@ #include #include #include +#include #if !defined(AV_OFFSET) || !defined(FP_INDIR) # ifdef HAVE_SCANSTACK @@ -29,54 +30,92 @@ # endif #endif +#ifdef HAVE_VAR___PROGNAME +extern char *__progname; +#ifdef HAVE_VAR___PROGNAME_FULL +extern char *__progname_full; +#else +#define __progname_full __progname +#endif +#endif + static int ac_saved; static char **av_saved; static char *av0_saved; +static char *av0_name_saved; +static char *progpath_saved; static char *progname_saved; static char av0_sp[32]; /* av0 space, avoid malloc() in most cases */ static char prn_sp[32]; /* name space, avoid malloc() in most cases */ static char dfl_str[] = "?"; +LOCAL void save_av0 __PR((char *av0)); +LOCAL void init_progname __PR((void)); +LOCAL void init_arginfo __PR((void)); + EXPORT void save_args(ac, av) int ac; char *av[]; { - int slen; - ac_saved = ac; av_saved = av; + save_av0(av[0]); +} + +LOCAL void +save_av0(av0) + char *av0; +{ + int slen; + char *p; if (av0_saved && av0_saved != av0_sp) free(av0_saved); - slen = strlen(av[0]) + 1; + slen = strlen(av0) + 1; if (slen <= (int)sizeof (av0_sp)) av0_saved = av0_sp; else av0_saved = malloc(slen); - if (av0_saved) - strcpy(av0_saved, av[0]); + if (av0_saved) { + strcpy(av0_saved, av0); + av0 = av0_saved; + } + + if ((p = strrchr(av0, '/')) == NULL) + av0_name_saved = av0; + else + av0_name_saved = ++p; } EXPORT int saved_ac() { + if (av_saved == NULL) + init_arginfo(); + return (ac_saved); } EXPORT char ** saved_av() { + if (av_saved == NULL) + init_arginfo(); + return (av_saved); } EXPORT char * saved_av0() { + if (av0_saved == NULL) + init_arginfo(); + return (av0_saved); } @@ -85,36 +124,98 @@ const char *name; { int slen; + char *p; - if (progname_saved && progname_saved != prn_sp) - free(progname_saved); + if (progpath_saved && progpath_saved != prn_sp) + free(progpath_saved); slen = strlen(name) + 1; if (slen <= sizeof (prn_sp)) - progname_saved = prn_sp; + progpath_saved = prn_sp; else - progname_saved = malloc(slen); + progpath_saved = malloc(slen); - if (progname_saved) - strcpy(progname_saved, name); + if (progpath_saved) { + strcpy(progpath_saved, name); + name = progpath_saved; + } + + if ((p = strrchr(name, '/')) == NULL) + progname_saved = (char *)name; + else + progname_saved = ++p; } EXPORT char * get_progname() { -#ifdef HAVE_SCANSTACK - char *progname; -#endif - if (progname_saved) return (progname_saved); + if (av0_name_saved == NULL) + init_progname(); + if (av0_name_saved) + return (av0_name_saved); + return (dfl_str); +} + +EXPORT char * +get_progpath() +{ + if (progpath_saved) + return (progpath_saved); + if (av0_saved == NULL) + init_progname(); if (av0_saved) return (av0_saved); + return (dfl_str); +} + +LOCAL void +init_progname() +{ +#if defined(HAVE_SCANSTACK) || defined(HAVE_GETPROGNAME) + char *progname; +#endif + + if (av0_name_saved == NULL) + init_arginfo(); + if (av0_name_saved) + return; +#ifdef HAVE_GETPROGNAME + progname = (char *)getprogname(); + if (progname) { + save_av0(progname); + return; + } +#endif +#ifdef HAVE_VAR___PROGNAME + if (__progname_full) { + save_av0(__progname_full); + return; + } +#endif #ifdef HAVE_SCANSTACK progname = getav0(); /* scan stack to get argv[0] */ - if (progname) - return (progname); + if (progname) { + save_av0(progname); + return; + } +#endif +} + +LOCAL void +init_arginfo() +{ +#if defined(HAVE_DLINFO) && defined(HAVE_DLOPEN_IN_LIBC) && defined(RTLD_DI_ARGSINFO) + Dl_argsinfo args; + + if (dlinfo(RTLD_SELF, RTLD_DI_ARGSINFO, &args) < 0 || + args.dla_argc <= 0 || + args.dla_argv[0] == NULL) + return; + + if (av_saved == NULL) + save_args(args.dla_argc, args.dla_argv); #endif - return (dfl_str); } diff -Nru cdrtools-2.01.01a33/libschily/savewd.c cdrtools-3.02a09/libschily/savewd.c --- cdrtools-2.01.01a33/libschily/savewd.c 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/libschily/savewd.c 2011-10-21 17:59:16.000000000 +0000 @@ -0,0 +1,88 @@ +/* @(#)savewd.c 1.1 11/10/21 Copyright 2004-2011 J. Schilling */ +/* + * Save and restore working directory. + * + * The code has been adopted from libfind. + * + * Copyright (c) 2004-2011 J. Schilling + */ +/* + * The contents of this file are subject to the terms of the + * Common Development and Distribution License, Version 1.0 only + * (the "License"). You may not use this file except in compliance + * with the License. + * + * See the file CDDL.Schily.txt in this distribution for details. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file CDDL.Schily.txt from this distribution. + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include "at-defs.h" + +EXPORT int savewd __PR((struct save_wd *sp)); +EXPORT void closewd __PR((struct save_wd *sp)); +EXPORT int restorewd __PR((struct save_wd *sp)); + + +EXPORT int +savewd(sp) + struct save_wd *sp; +{ + sp->fd = -1; + sp->name = NULL; +#ifdef HAVE_FCHDIR + if ((sp->fd = open(".", O_SEARCH|O_NDELAY)) >= 0) { +#ifdef F_SETFD + (void) fcntl(sp->fd, F_SETFD, FD_CLOEXEC); +#endif + return (0); + } +#endif + { + char buf[max(8192, PATH_MAX+1)]; + + if (getcwd(buf, sizeof (buf)) == NULL) { + return (-1); + } + sp->name = strdup(buf); + if (sp->name == NULL) + return (-1); + } + return (0); +} + +EXPORT void +closewd(sp) + struct save_wd *sp; +{ + if (sp->fd >= 0) + close(sp->fd); + if (sp->name != NULL) + free(sp->name); + sp->fd = -1; + sp->name = NULL; +} + +EXPORT int +restorewd(sp) + struct save_wd *sp; +{ +#ifdef HAVE_FCHDIR + if (sp->fd >= 0) + return (fchdir(sp->fd)); +#endif + if (sp->name != NULL) + return (lxchdir(sp->name)); + + seterrno(EINVAL); + return (-1); +} diff -Nru cdrtools-2.01.01a33/libschily/searchinpath.c cdrtools-3.02a09/libschily/searchinpath.c --- cdrtools-2.01.01a33/libschily/searchinpath.c 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/libschily/searchinpath.c 2016-08-01 20:07:53.000000000 +0000 @@ -0,0 +1,245 @@ +/* @(#)searchinpath.c 1.5 16/08/01 Copyright 1999-2016 J. Schilling */ +#include +#ifndef lint +static UConst char sccsid[] = + "@(#)searchinpath.c 1.5 16/08/01 Copyright 1999-2016 J. Schilling"; +#endif +/* + * Search a file name in the PATH of the current exeecutable. + * Return the path to the file name in allocated space. + * + * Copyright (c) 1999-2016 J. Schilling + */ +/* + * The contents of this file are subject to the terms of the + * Common Development and Distribution License, Version 1.0 only + * (the "License"). You may not use this file except in compliance + * with the License. + * + * See the file CDDL.Schily.txt in this distribution for details. + * A copy of the CDDL is also available via the Internet at + * http://www.opensource.org/licenses/cddl1.txt + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file CDDL.Schily.txt from this distribution. + */ + +#include +#include +#include +#include /* getexecname() */ +#include +#include +#include +#include + + +#define NAMEMAX 4096 + +EXPORT char *searchfileinpath __PR((char *name, int mode, + int file_mode, + char *path)); +LOCAL char *searchonefile __PR((char *name, int mode, + BOOL plain_file, + char *xn, + char *nbuf, + char *np, char *ep)); +#if defined(__DJGPP__) +LOCAL char *strbs2s __PR((char *s)); +#endif + +#ifdef JOS +#define enofile(t) ((t) == EMISSDIR || \ + (t) == ENOFILE || \ + (t) == EISADIR || \ + (t) == EIOERR) +#else +#define enofile(t) ((t) == ENOENT || \ + (t) == ENOTDIR || \ + (t) == EISDIR || \ + (t) == EIO) +#endif + +/* + * Search for the "name" file in the PATH of the user. + * Assume that the file is ... bin/../name. + */ +EXPORT char * +searchfileinpath(name, mode, file_mode, path) + char *name; /* Find /../name in PATH */ + int mode; /* Mode for access() e.g. X_OK */ + int file_mode; /* How to check files */ + char *path; /* PATH to use if not NULL */ +{ + char pbuf[NAMEMAX]; + char *nbuf = pbuf; + char *np; + char *ep; + char *xn; + int nlen = strlen(name); + int oerrno = geterrno(); + int err = 0; +#ifdef HAVE_GETEXECNAME + char *pn = (char *)getexecname(); /* pn is on the stack */ +#else + char *pn = getexecpath(); /* pn is from strdup() */ + char ebuf[NAMEMAX]; + + if (pn) { + strlcpy(ebuf, pn, sizeof (ebuf)); + free(pn); + pn = ebuf; + } +#endif + + if (pn == NULL) + xn = get_progname(); + else + xn = pn; + if ((np = strrchr(xn, '/')) != NULL) + xn = ++np; + + /* + * getexecname() is the best choice for our seach. getexecname() + * returns either "foo" (if called from the current directory) or + * an absolute path after symlinks have been resolved. + * If getexecname() returns a path with slashes, try to search + * first relatively to the known location of the current binary. + */ + if ((file_mode & SIP_ONLY_PATH) == 0 && + pn != NULL && strchr(pn, '/') != NULL) { + strlcpy(nbuf, pn, sizeof (pbuf)); + np = nbuf + strlen(nbuf); + + while (np > nbuf && np[-1] != '/') + *--np = '\0'; + pn = &nbuf[sizeof (pbuf) - 1]; + if ((np = searchonefile(name, mode, + file_mode & (SIP_PLAIN_FILE|SIP_NO_STRIPBIN), + xn, + nbuf, np, pn)) != NULL) { + seterrno(oerrno); + return (np); + } + } + + if (file_mode & SIP_NO_PATH) + return (NULL); + + if (path == NULL) + path = getenv("PATH"); + if (path == NULL) + return (NULL); + + +#ifdef __DJGPP__ + path = strdup(path); + if (path == NULL) + return (NULL); + strbs2s(path); /* PATH under DJGPP can contain both slashes */ +#endif + + /* + * A PATH name search should lead us to the path under which we + * called the binary, but not necessarily to the install path as + * we may have been called thorugh a symlink or hardlink. In case + * of a symlink, we can follow the link. In case of a hardlink, we + * are lost. + */ + ep = &nbuf[sizeof (pbuf) - 1]; + for (;;) { + np = nbuf; + while (*path != PATH_ENV_DELIM && *path != '\0' && + np < &nbuf[sizeof (pbuf) - nlen]) + *np++ = *path++; + *np = '\0'; + if ((np = searchonefile(name, mode, + file_mode & (SIP_PLAIN_FILE|SIP_NO_STRIPBIN), + xn, + nbuf, np, ep)) != NULL) { +#ifdef __DJGPP__ + free(path); +#endif + seterrno(oerrno); + return (np); + } + if (err == 0) { + err = geterrno(); + if (enofile(err)) + err = 0; + } + if (*path == '\0') + break; + path++; + } +#ifdef __DJGPP__ + free(path); +#endif + if (err) + seterrno(err); + else + seterrno(oerrno); + return (NULL); +} + +LOCAL char * +searchonefile(name, mode, plain_file, xn, nbuf, np, ep) + register char *name; /* Find /../name in PATH */ + int mode; /* Mode for access() e.g. X_OK */ + BOOL plain_file; /* Whether to check only plain files */ + char *xn; /* The basename of the executable */ + register char *nbuf; /* Name buffer base */ + register char *np; /* Where to append name to path */ + register char *ep; /* Point to last valid char in nbuf */ +{ + struct stat sb; + + while (np > nbuf && np[-1] == '/') + *--np = '\0'; + if (xn) { + *np++ = '/'; + strlcpy(np, xn, ep - np); + if (stat(nbuf, &sb) < 0) + return (NULL); + if (!S_ISREG(sb.st_mode)) + return (NULL); + *--np = '\0'; + } + if ((plain_file & SIP_NO_STRIPBIN) == 0) { + if (np >= &nbuf[4] && streql(&np[-4], "/bin")) + np = &np[-4]; + } + plain_file &= SIP_PLAIN_FILE; + *np++ = '/'; + *np = '\0'; + strlcpy(np, name, ep - np); + + seterrno(0); + if (stat(nbuf, &sb) >= 0) { + if ((!plain_file || S_ISREG(sb.st_mode)) && + (eaccess(nbuf, mode) >= 0)) { + return (strdup(nbuf)); + } + if (geterrno() == 0) + seterrno(EACCES); + } + return (NULL); +} + +#ifdef __DJGPP__ +LOCAL char * +strbs2s(s) + char *s; +{ + char *tmp = s; + + if (tmp) { + while (*tmp) { + if (*tmp == '\\') + *tmp = '/'; + tmp++; + } + } + return (s); +} +#endif diff -Nru cdrtools-2.01.01a33/libschily/serrmsg.c cdrtools-3.02a09/libschily/serrmsg.c --- cdrtools-2.01.01a33/libschily/serrmsg.c 2006-09-13 15:05:35.000000000 +0000 +++ cdrtools-3.02a09/libschily/serrmsg.c 2009-07-10 19:54:04.000000000 +0000 @@ -1,4 +1,4 @@ -/* @(#)serrmsg.c 1.4 06/09/13 Copyright 1985, 2000-2003 J. Schilling */ +/* @(#)serrmsg.c 1.5 09/07/10 Copyright 1985, 2000-2003 J. Schilling */ /* * Routines for printing command errors * @@ -18,7 +18,7 @@ #include #include /* include try to get size_t */ -#include /* Try again for size_t */ +#include /* Try again for size_t */ #include /* Try again for size_t */ #include #include diff -Nru cdrtools-2.01.01a33/libschily/seterrno.c cdrtools-3.02a09/libschily/seterrno.c --- cdrtools-2.01.01a33/libschily/seterrno.c 2006-09-26 11:29:58.000000000 +0000 +++ cdrtools-3.02a09/libschily/seterrno.c 2010-08-23 12:43:25.000000000 +0000 @@ -1,8 +1,8 @@ -/* @(#)seterrno.c 1.10 06/09/26 Copyright 1985, 1995-2003 J. Schilling */ +/* @(#)seterrno.c 1.13 10/08/23 Copyright 1985, 1995-2010 J. Schilling */ /* * Set error number * - * Copyright (c) 1985, 1995-2003 J. Schilling + * Copyright (c) 1985, 1995-2010 J. Schilling */ /* * The contents of this file are subject to the terms of the @@ -16,6 +16,12 @@ * file and include the License file CDDL.Schily.txt from this distribution. */ +#ifndef _TS_ERRNO +#define _TS_ERRNO /* Solaris: get thread safe errno value */ +#endif +#ifndef _LIBC_REENTRANT +#define _LIBC_REENTRANT /* Linux: get thread safe errno value */ +#endif #include #include #include diff -Nru cdrtools-2.01.01a33/libschily/setnstimeofday.c cdrtools-3.02a09/libschily/setnstimeofday.c --- cdrtools-2.01.01a33/libschily/setnstimeofday.c 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/libschily/setnstimeofday.c 2013-09-30 21:22:39.000000000 +0000 @@ -0,0 +1,89 @@ +/* @(#)setnstimeofday.c 1.1 13/09/30 Copyright 2007-2013 J. Schilling */ +#include +#ifndef lint +static UConst char sccsid[] = + "@(#)setnstimeofday.c 1.1 13/09/30 Copyright 2007-2013 J. Schilling"; +#endif +/* + * setnstimeofday() a nanosecond enabled version of settimeofday() + * + * Copyright (c) 2007-2013 J. Schilling + */ +/* + * The contents of this file are subject to the terms of the + * Common Development and Distribution License, Version 1.0 only + * (the "License"). You may not use this file except in compliance + * with the License. + * + * See the file CDDL.Schily.txt in this distribution for details. + * A copy of the CDDL is also available via the Internet at + * http://www.opensource.org/licenses/cddl1.txt + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file CDDL.Schily.txt from this distribution. + */ + +#if (defined(_MSC_VER) || defined(__MINGW32__)) +#include +#include +#include +#include + +#ifdef _MSC_VER +const __int64 MS_FTIME_ADD = 0x2b6109100i64; +const __int64 MS_FTIME_SECS = 10000000i64; +#else +const Int64_t MS_FTIME_ADD = 0x2b6109100LL; +const Int64_t MS_FTIME_SECS = 10000000LL; +#endif + +EXPORT int +setnstimeofday(tp) + struct timespec *tp; +{ + FILETIME ft; + SYSTEMTIME st; + Int64_t T; + + if (tp == 0) + return (0); + + /* 100ns time since 1601 */ + + T = (tp->tv_sec + MS_FTIME_ADD) * MS_FTIME_SECS; + T += tp->tv_nsec / 100; /* T Granularity is 100ns */ + ft.dwLowDateTime = T & 0xFFFFFFFFUL; + T >>= 32; + ft.dwHighDateTime = T; + + if (FileTimeToSystemTime(&ft, &st) == 0) + return (-1); + + if (SetSystemTime(&st) == 0) + return (-1); + + return (0); +} +#else /* (defined(_MSC_VER) || defined(__MINGW32__)) */ + +#include +#include +#include + +EXPORT int +setnstimeofday(tp) + struct timespec *tp; +{ + struct timeval tv; + +#if defined(HAVE_CLOCK_SETTIME) && defined(HAVE_CLOCK_GETTIME_IN_LIBC) + if (clock_settime(CLOCK_REALTIME, tp) == 0) + return (0); +#endif + + tv.tv_sec = tp->tv_sec; + tv.tv_usec = tp->tv_nsec / 1000; + return (settimeofday(&tv, (void *)0)); +} + +#endif /* (defined(_MSC_VER) || defined(__MINGW32__)) */ diff -Nru cdrtools-2.01.01a33/libschily/shlschily.mk cdrtools-3.02a09/libschily/shlschily.mk --- cdrtools-2.01.01a33/libschily/shlschily.mk 2007-07-01 09:38:54.000000000 +0000 +++ cdrtools-3.02a09/libschily/shlschily.mk 2012-08-14 21:25:30.000000000 +0000 @@ -1,4 +1,4 @@ -#ident @(#)shlschily.mk 1.7 07/07/01 +#ident @(#)shlschily.mk 1.8 12/08/14 ########################################################################### SRCROOT= .. RULESDIR= RULES @@ -14,7 +14,7 @@ CPPOPTS += -DUSE_SCANSTACK # Try to scan stack frames CPPOPTS += -DPORT_ONLY # Add missing funcs line snprintf for porting include Targets -LIBS= -lc +LIBS= $(LIB_INTL) -lc # Now needs gettext() ########################################################################### include $(SRCROOT)/$(RULESDIR)/rules.shl diff -Nru cdrtools-2.01.01a33/libschily/sleep.c cdrtools-3.02a09/libschily/sleep.c --- cdrtools-2.01.01a33/libschily/sleep.c 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/libschily/sleep.c 2014-03-03 22:42:42.000000000 +0000 @@ -0,0 +1,57 @@ +/* @(#)sleep.c 1.6 14/03/03 Copyright 2007-2014 J. Schilling */ +#include +#ifndef lint +static UConst char sccsid[] = + "@(#)sleep.c 1.6 14/03/03 Copyright 2007-2014 J. Schilling"; +#endif +/* + * Emulate sleep where it does not exist + * + * Copyright (c) 2007-2014 J. Schilling + */ +/* + * The contents of this file are subject to the terms of the + * Common Development and Distribution License, Version 1.0 only + * (the "License"). You may not use this file except in compliance + * with the License. + * + * See the file CDDL.Schily.txt in this distribution for details. + * A copy of the CDDL is also available via the Internet at + * http://www.opensource.org/licenses/cddl1.txt + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file CDDL.Schily.txt from this distribution. + */ + +#if !defined(HAVE_SLEEP) && (defined(_MSC_VER) || defined(__MINGW32__)) +#include +#include + +EXPORT unsigned int +sleep(secs) + unsigned int secs; +{ + DWORD ms; + + if (secs == 0) + return (0); + + ms = secs * 1000; + Sleep(ms); + return (0); +} + +EXPORT int +usleep(usecs) + unsigned int usecs; +{ + DWORD ms; + + if (usecs == 0) + return (0); + + ms = usecs / 1000; + Sleep(ms); + return (0); +} +#endif diff -Nru cdrtools-2.01.01a33/libschily/snprintf.c cdrtools-3.02a09/libschily/snprintf.c --- cdrtools-2.01.01a33/libschily/snprintf.c 2007-07-01 09:38:54.000000000 +0000 +++ cdrtools-3.02a09/libschily/snprintf.c 2016-08-10 21:02:32.000000000 +0000 @@ -1,6 +1,6 @@ -/* @(#)snprintf.c 1.12 07/07/01 Copyright 1985, 1996-2004 J. Schilling */ +/* @(#)snprintf.c 1.14 16/08/10 Copyright 1985, 1996-2016 J. Schilling */ /* - * Copyright (c) 1985, 1996-2004 J. Schilling + * Copyright (c) 1985, 1996-2016 J. Schilling */ /* * The contents of this file are subject to the terms of the @@ -9,6 +9,8 @@ * with the License. * * See the file CDDL.Schily.txt in this distribution for details. + * A copy of the CDDL is also available via the Internet at + * http://www.opensource.org/licenses/cddl1.txt * * When distributing Covered Code, include this CDDL HEADER in each * file and include the License file CDDL.Schily.txt from this distribution. @@ -17,7 +19,7 @@ #define snprintf __nothing__ /* prototype may be wrong (e.g. IRIX) */ #include #include /* include try to get size_t */ -#include /* Try again for size_t */ +#include /* Try again for size_t */ #include /* Try again for size_t */ #include #include @@ -38,9 +40,11 @@ } *BUF, _BUF; #ifdef PROTOTYPES -static void _cput(char c, long l) +static void +_cput(char c, long l) #else -static void _cput(c, l) +static void +_cput(c, l) char c; long l; #endif diff -Nru cdrtools-2.01.01a33/libschily/spawn.c cdrtools-3.02a09/libschily/spawn.c --- cdrtools-2.01.01a33/libschily/spawn.c 2006-09-26 11:29:58.000000000 +0000 +++ cdrtools-3.02a09/libschily/spawn.c 2015-07-06 20:28:32.000000000 +0000 @@ -1,8 +1,13 @@ -/* @(#)spawn.c 1.19 06/09/26 Copyright 1985, 1989, 1995-2003 J. Schilling */ +/* @(#)spawn.c 1.30 15/07/06 Copyright 1985, 1989, 1995-2015 J. Schilling */ /* * Spawn another process/ wait for child process * - * Copyright (c) 1985, 1989, 1995-2003 J. Schilling + * Copyright (c) 1985, 1989, 1995-2015 J. Schilling + * + * This is an interface that exists in the public since 1982. + * The POSIX.1-2008 standard did ignore POSIX rules not to + * redefine existing public interfaces and redefined the interfaces + * forcing us to add a js_*() prefix to the original functions. */ /* * The contents of this file are subject to the terms of the @@ -11,29 +16,56 @@ * with the License. * * See the file CDDL.Schily.txt in this distribution for details. + * A copy of the CDDL is also available via the Internet at + * http://www.opensource.org/licenses/cddl1.txt * * When distributing Covered Code, include this CDDL HEADER in each * file and include the License file CDDL.Schily.txt from this distribution. */ +#ifndef __DO__FSPAWNL__ +#define fspawnv __no__fspawnv__ +#define fspawnl __no__fspawnl__ +#define fspawnv_nowait __no__fspawnv_nowait__ + #include -#include +#include #include -#define fspawnl __nothing__ /* prototype in schily/schily.h is wrong */ -#define spawnl __nothing__ /* prototype in schily/schily.h is wrong */ -#include -#undef fspawnl -#undef spawnl #include #include #include #include #include +#include +#define VMS_VFORK_OK +#include +#endif /* __DO__FSPAWNL__ */ #define MAX_F_ARGS 16 -EXPORT int fspawnl __PR((FILE *, FILE *, FILE *, ...)); +#ifndef __DO__FSPAWNL__ +#ifndef NO_FSPAWN_COMPAT /* Define to disable backward compatibility */ +#undef fspawnv +#undef fspawnl +#undef fspawnv_nowait +/* + * The Cygwin compile environment incorrectly implements #pragma weak. + * The weak symbols are only defined as local symbols making it impossible + * to use them from outside the scope of this source file. + * A platform that allows linking with global symbols has HAVE_LINK_WEAK + * defined. + */ +#if defined(HAVE_PRAGMA_WEAK) && defined(HAVE_LINK_WEAK) +#pragma weak fspawnv = js_fspawnv +#pragma weak fspawnl = js_fspawnl +#pragma weak fspawnv_nowait = js_fspawnv_nowait +#else + +EXPORT int fspawnv __PR((FILE *, FILE *, FILE *, int, char * const *)); +EXPORT int fspawnl __PR((FILE *, FILE *, FILE *, const char *, ...)); +EXPORT int fspawnv_nowait __PR((FILE *, FILE *, FILE *, + const char *, int, char *const*)); EXPORT int fspawnv(in, out, err, argc, argv) FILE *in; @@ -42,71 +74,111 @@ int argc; char * const argv[]; { + return (js_fspawnv(in, out, err, argc, argv)); +} + +EXPORT int +fspawnv_nowait(in, out, err, name, argc, argv) + FILE *in; + FILE *out; + FILE *err; + const char *name; + int argc; + char * const argv[]; +{ + return (js_fspawnv_nowait(in, out, err, name, argc, argv)); +} + +#define __DO__FSPAWNL__ +#define js_fspawnl fspawnl +#include "spawn.c" +#undef js_fspawnl +#undef __DO__FSPAWNL__ + +#endif /* HAVE_PRAGMA_WEAK && HAVE_LINK_WEAK */ +#endif /* NO_FSPAWN_COMPAT */ + +EXPORT int +js_fspawnv(in, out, err, argc, argv) + FILE *in; + FILE *out; + FILE *err; + int argc; + char * const argv[]; +{ int pid; - if ((pid = fspawnv_nowait(in, out, err, argv[0], argc, argv)) < 0) + if ((pid = js_fspawnv_nowait(in, out, err, argv[0], argc, argv)) < 0) return (pid); return (wait_chld(pid)); } +#endif /* __DO__FSPAWNL__ */ /* VARARGS3 */ #ifdef PROTOTYPES EXPORT int -fspawnl(FILE *in, FILE *out, FILE *err, ...) +js_fspawnl(FILE *in, FILE *out, FILE *err, const char *arg0, ...) #else EXPORT int -fspawnl(in, out, err, va_alist) - FILE *in; - FILE *out; - FILE *err; +js_fspawnl(in, out, err, arg0, va_alist) + FILE *in; + FILE *out; + FILE *err; + const char *arg0; va_dcl #endif { va_list args; int ac = 0; - char *xav[MAX_F_ARGS]; + char *xav[MAX_F_ARGS+1]; char **av; - char **pav; +const char **pav; char *p; int ret; #ifdef PROTOTYPES - va_start(args, err); + va_start(args, arg0); #else va_start(args); #endif - while (va_arg(args, char *) != NULL) + if (arg0) { ac++; + while (va_arg(args, char *) != NULL) + ac++; + } va_end(args); - if (ac < MAX_F_ARGS) { - pav = av = xav; + if (ac <= MAX_F_ARGS) { + av = xav; } else { - pav = av = (char **)malloc((ac+1)*sizeof (char *)); + av = (char **)malloc((ac+1)*sizeof (char *)); if (av == 0) return (-1); } + pav = (const char **)av; #ifdef PROTOTYPES - va_start(args, err); + va_start(args, arg0); #else va_start(args); #endif - do { + *pav++ = arg0; + if (arg0) do { p = va_arg(args, char *); *pav++ = p; } while (p != NULL); va_end(args); - ret = fspawnv(in, out, err, ac, av); + ret = js_fspawnv(in, out, err, ac, av); if (av != xav) free(av); return (ret); } +#ifndef __DO__FSPAWNL__ EXPORT int -fspawnv_nowait(in, out, err, name, argc, argv) +js_fspawnv_nowait(in, out, err, name, argc, argv) FILE *in; FILE *out; FILE *err; @@ -115,10 +187,10 @@ char * const argv[]; { int pid = -1; /* Initialization needed to make GCC happy */ - int i; + volatile int i; for (i = 1; i < 64; i *= 2) { - if ((pid = fork()) >= 0) + if ((pid = vfork()) >= 0) break; sleep(i); } @@ -129,7 +201,7 @@ * so we have to cast argv tp (char **) */ fexecv(name, in, out, err, argc, (char **)argv); - exit(geterrno()); + _exit(geterrno()); /* NOTREACHED */ #ifndef lint return (0); /* keep gnu compiler happy */ @@ -154,5 +226,8 @@ if (WCOREDUMP(status)) unlink("core"); - return (WEXITSTATUS(status)); + if (WIFEXITED(status)) + return (WEXITSTATUS(status)); + return (-WTERMSIG(status)); } +#endif /* __DO__FSPAWNL__ */ diff -Nru cdrtools-2.01.01a33/libschily/spawnl.3 cdrtools-3.02a09/libschily/spawnl.3 --- cdrtools-2.01.01a33/libschily/spawnl.3 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/libschily/spawnl.3 1988-07-21 17:15:17.000000000 +0000 @@ -0,0 +1,55 @@ +. \" Manual Seite fuer spawnl +. \" @(#)spawnl.3 1.1 +. \" +.if t .ds a \v'-0.55m'\h'0.00n'\z.\h'0.40n'\z.\v'0.55m'\h'-0.40n'a +.if t .ds o \v'-0.55m'\h'0.00n'\z.\h'0.45n'\z.\v'0.55m'\h'-0.45n'o +.if t .ds u \v'-0.55m'\h'0.00n'\z.\h'0.40n'\z.\v'0.55m'\h'-0.40n'u +.if t .ds A \v'-0.77m'\h'0.25n'\z.\h'0.45n'\z.\v'0.77m'\h'-0.70n'A +.if t .ds O \v'-0.77m'\h'0.25n'\z.\h'0.45n'\z.\v'0.77m'\h'-0.70n'O +.if t .ds U \v'-0.77m'\h'0.30n'\z.\h'0.45n'\z.\v'0.77m'\h'-.75n'U +.if t .ds s \(*b +.if t .ds S SS +.if n .ds a ae +.if n .ds o oe +.if n .ds u ue +.if n .ds s sz +.TH SPAWNL 3 "15. Juli 1988" "J\*org Schilling" "Schily\'s LIBRARY FUNCTIONS" +.SH NAME +spawnl() \- calls a command with specified arguments +.SH SYNOPSIS +.nf +.B +int spawnl(Sin,Sout,Serr,Command_Name,arg1\|.\|.\|.argn,NULL) +.B FILE *Sin, *Sout, *Serr; +.B char *Command_Name, *arg1\|.\|.\|.*argn; +.SH DESCRIPTION +spawnl() causes the named command to be called in a subsidiary +process with the given arguments. The last argument to spawnl() +must be NULL to indicate the end of the list. The streams Sin, +Sout and Serr become stdin, stout, and stderr for the command. +The Command_Name may be an absolute or a relative pathname. To +locate the command, the working directory is searched first, +then /bin. This is a property of fexecv(), which spawnl() +calls. +.PP +When the command finishes, spawnl() returns to the caller. +.SH RETURNS +Returns 0 when successful. Otherwise, returns a non-zero value +which could be: +.PP +an error code from fork() or fexecl(). +the argument to exit() in the Command_name. +.TP +.B 1, +if stopped by a control C (^C). +.TP +.B 2, +if killed by another process. +.TP +.B 4, +if suspended by any fault, raise, control Y ^Y or by +another process. (In this case, spawnl() kills the +suspended process.) +.SH NOTES +spawnl() just calls spawnv() with the address and length of the +argument list. diff -Nru cdrtools-2.01.01a33/libschily/spawnl.mk3 cdrtools-3.02a09/libschily/spawnl.mk3 --- cdrtools-2.01.01a33/libschily/spawnl.mk3 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/libschily/spawnl.mk3 2015-04-26 18:01:43.000000000 +0000 @@ -0,0 +1,18 @@ +#ident @(#)spawnl.mk3 1.1 15/04/26 +########################################################################### +# Sample makefile for installing manual pages +########################################################################### +SRCROOT= .. +RULESDIR= RULES +include $(SRCROOT)/$(RULESDIR)/rules.top +########################################################################### + +MANDIR= man +TARGETMAN= spawnl +MANSECT= $(MANSECT_LIB) +MANSUFFIX= $(MANSUFF_LIB) +MANFILE= spawnl.3 + +########################################################################### +include $(SRCROOT)/$(RULESDIR)/rules.man +########################################################################### diff -Nru cdrtools-2.01.01a33/libschily/spawnv.3 cdrtools-3.02a09/libschily/spawnv.3 --- cdrtools-2.01.01a33/libschily/spawnv.3 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/libschily/spawnv.3 1988-07-21 17:16:27.000000000 +0000 @@ -0,0 +1,49 @@ +. \" Manual Seite fuer spawnv +. \" @(#)spawnv.3 1.1 +. \" +.if t .ds a \v'-0.55m'\h'0.00n'\z.\h'0.40n'\z.\v'0.55m'\h'-0.40n'a +.if t .ds o \v'-0.55m'\h'0.00n'\z.\h'0.45n'\z.\v'0.55m'\h'-0.45n'o +.if t .ds u \v'-0.55m'\h'0.00n'\z.\h'0.40n'\z.\v'0.55m'\h'-0.40n'u +.if t .ds A \v'-0.77m'\h'0.25n'\z.\h'0.45n'\z.\v'0.77m'\h'-0.70n'A +.if t .ds O \v'-0.77m'\h'0.25n'\z.\h'0.45n'\z.\v'0.77m'\h'-0.70n'O +.if t .ds U \v'-0.77m'\h'0.30n'\z.\h'0.45n'\z.\v'0.77m'\h'-.75n'U +.if t .ds s \(*b +.if t .ds S SS +.if n .ds a ae +.if n .ds o oe +.if n .ds u ue +.if n .ds s sz +.TH SPAWNV 3 "15. Juli 1988" "J\*org Schilling" "Schily\'s LIBRARY FUNCTIONS" +.SH NAME +spawnv() \- calls a command with specified arguments +.SH SYNOPSIS +.nf +.B +int spawnv(Sin,Sout,Serr,ArgC,ArgV) +.B FILE *Sin, *Sout, *Serr; +.B int ArgC; +.B char *ArgV[]; +.fi +.SH DESCRIPTION +spawnv() causes the command, named in ArgV[0], to be called with +the given arguments. Functionally this subroutine is the same +as spawnl(), differing only in the form of the argument. +.SH RETURNS +Returns 0 when successful. Otherwise, returns a non-zero value +which could be: +.PP +an error code from fork() or fexecl(). +the argument to exit() in the Command_name. +.TP +.B 1, +if stopped by a control C (^C). +.TP +.B 2, +if killed by another process. +.TP +.B 4, +if suspended by any fault, raise, control Y ^Y or by +another process. (In this case, spawnv() kills the +suspended process.) +.SH NOTES +none diff -Nru cdrtools-2.01.01a33/libschily/spawnv.mk3 cdrtools-3.02a09/libschily/spawnv.mk3 --- cdrtools-2.01.01a33/libschily/spawnv.mk3 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/libschily/spawnv.mk3 2015-04-26 18:01:43.000000000 +0000 @@ -0,0 +1,18 @@ +#ident @(#)spawnv.mk3 1.1 15/04/26 +########################################################################### +# Sample makefile for installing manual pages +########################################################################### +SRCROOT= .. +RULESDIR= RULES +include $(SRCROOT)/$(RULESDIR)/rules.top +########################################################################### + +MANDIR= man +TARGETMAN= spawnv +MANSECT= $(MANSECT_LIB) +MANSUFFIX= $(MANSUFF_LIB) +MANFILE= spawnv.3 + +########################################################################### +include $(SRCROOT)/$(RULESDIR)/rules.man +########################################################################### diff -Nru cdrtools-2.01.01a33/libschily/sprintf.3 cdrtools-3.02a09/libschily/sprintf.3 --- cdrtools-2.01.01a33/libschily/sprintf.3 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/libschily/sprintf.3 1988-07-22 13:53:31.000000000 +0000 @@ -0,0 +1,35 @@ +. \" Manual Seite fuer sprintf +. \" @(#)sprintf.3 1.1 +. \" +.if t .ds a \v'-0.55m'\h'0.00n'\z.\h'0.40n'\z.\v'0.55m'\h'-0.40n'a +.if t .ds o \v'-0.55m'\h'0.00n'\z.\h'0.45n'\z.\v'0.55m'\h'-0.45n'o +.if t .ds u \v'-0.55m'\h'0.00n'\z.\h'0.40n'\z.\v'0.55m'\h'-0.40n'u +.if t .ds A \v'-0.77m'\h'0.25n'\z.\h'0.45n'\z.\v'0.77m'\h'-0.70n'A +.if t .ds O \v'-0.77m'\h'0.25n'\z.\h'0.45n'\z.\v'0.77m'\h'-0.70n'O +.if t .ds U \v'-0.77m'\h'0.30n'\z.\h'0.45n'\z.\v'0.77m'\h'-.75n'U +.if t .ds s \(*b +.if t .ds S SS +.if n .ds a ae +.if n .ds o oe +.if n .ds u ue +.if n .ds s sz +.TH SPRINTF 3 "15. Juli 1988" "J\*org Schilling" "Schily\'s LIBRARY FUNCTIONS" +.SH NAME +sprintf() \- formats and places output in buffer +.SH SYNOPSIS +.nf +.B +sprintf(buf,form,arg1\|.\|.\|.argn) +.B char *buf; +.B char *form; +.fi +.SH DESCRIPTION +sprintf() is similar to fprintf() except the formatted output is +placed into buf. +.SH RETURNS +none +.SH "SEE ALSO" +format(3), printf(3) +.SH NOTES +A NULL ('\\0') is appended to the end of the formatted output. +There is no check for overflowing the buffer. diff -Nru cdrtools-2.01.01a33/libschily/sprintf.c cdrtools-3.02a09/libschily/sprintf.c --- cdrtools-2.01.01a33/libschily/sprintf.c 2006-09-13 15:05:35.000000000 +0000 +++ cdrtools-3.02a09/libschily/sprintf.c 2010-08-21 11:39:07.000000000 +0000 @@ -1,6 +1,6 @@ -/* @(#)sprintf.c 1.15 06/09/13 Copyright 1985, 1988-2003 J. Schilling */ +/* @(#)sprintf.c 1.16 10/08/21 Copyright 1985, 1988-2010 J. Schilling */ /* - * Copyright (c) 1985, 1988-2003 J. Schilling + * Copyright (c) 1985, 1988-2010 J. Schilling */ /* * The contents of this file are subject to the terms of the @@ -32,7 +32,7 @@ long ba; #endif { - *(*(char **) ba)++ = c; + *(*(char **)ba)++ = c; } /* VARARGS2 */ diff -Nru cdrtools-2.01.01a33/libschily/sprintf.mk3 cdrtools-3.02a09/libschily/sprintf.mk3 --- cdrtools-2.01.01a33/libschily/sprintf.mk3 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/libschily/sprintf.mk3 2015-04-26 18:01:43.000000000 +0000 @@ -0,0 +1,18 @@ +#ident @(#)sprintf.mk3 1.1 15/04/26 +########################################################################### +# Sample makefile for installing manual pages +########################################################################### +SRCROOT= .. +RULESDIR= RULES +include $(SRCROOT)/$(RULESDIR)/rules.top +########################################################################### + +MANDIR= man +TARGETMAN= sprintf +MANSECT= $(MANSECT_LIB) +MANSUFFIX= $(MANSUFF_LIB) +MANFILE= sprintf.3 + +########################################################################### +include $(SRCROOT)/$(RULESDIR)/rules.man +########################################################################### diff -Nru cdrtools-2.01.01a33/libschily/stdio/fcons64.c cdrtools-3.02a09/libschily/stdio/fcons64.c --- cdrtools-2.01.01a33/libschily/stdio/fcons64.c 2004-08-08 11:02:05.000000000 +0000 +++ cdrtools-3.02a09/libschily/stdio/fcons64.c 2010-08-23 12:28:50.000000000 +0000 @@ -1,4 +1,4 @@ -/* @(#)fcons64.c 1.6 04/08/08 Copyright 2000 J. Schilling */ +/* @(#)fcons64.c 1.7 10/08/23 Copyright 2000 J. Schilling */ /* * Copyright (c) 2000 J. Schilling */ @@ -18,7 +18,6 @@ #include "schilyio.h" -/*#if _LFS_LARGEFILE*/ #ifdef HAVE_LARGEFILES #include "fcons.c" diff -Nru cdrtools-2.01.01a33/libschily/stdio/fcons.c cdrtools-3.02a09/libschily/stdio/fcons.c --- cdrtools-2.01.01a33/libschily/stdio/fcons.c 2007-04-03 16:38:03.000000000 +0000 +++ cdrtools-3.02a09/libschily/stdio/fcons.c 2010-11-06 20:07:32.000000000 +0000 @@ -1,6 +1,6 @@ -/* @(#)fcons.c 2.18 07/04/03 Copyright 1986, 1995-2007 J. Schilling */ +/* @(#)fcons.c 2.20 10/11/06 Copyright 1986, 1995-2010 J. Schilling */ /* - * Copyright (c) 1986, 1995-2007 J. Schilling + * Copyright (c) 1986, 1995-2010 J. Schilling */ /* * The contents of this file are subject to the terms of the @@ -17,8 +17,8 @@ #include "schilyio.h" /* - * Note that because of a definition in schilyio.h we are using fseeko()/ftello() - * instead of fseek()/ftell() if available. + * Note that because of a definition in schilyio.h we are using + * fseeko()/ftello() instead of fseek()/ftell() if available. */ LOCAL char *fmtab[] = { @@ -75,5 +75,5 @@ if (flag & FI_CLOSE) close(f); - return ((FILE *) NULL); + return ((FILE *)NULL); } diff -Nru cdrtools-2.01.01a33/libschily/stdio/fdup64.c cdrtools-3.02a09/libschily/stdio/fdup64.c --- cdrtools-2.01.01a33/libschily/stdio/fdup64.c 2004-08-08 11:02:05.000000000 +0000 +++ cdrtools-3.02a09/libschily/stdio/fdup64.c 2010-08-23 12:28:50.000000000 +0000 @@ -1,4 +1,4 @@ -/* @(#)fdup64.c 1.6 04/08/08 Copyright 2000 J. Schilling */ +/* @(#)fdup64.c 1.7 10/08/23 Copyright 2000 J. Schilling */ /* * Copyright (c) 2000 J. Schilling */ @@ -18,7 +18,6 @@ #include "schilyio.h" -/*#if _LFS_LARGEFILE*/ #ifdef HAVE_LARGEFILES #include "fdup.c" diff -Nru cdrtools-2.01.01a33/libschily/stdio/fdup.c cdrtools-3.02a09/libschily/stdio/fdup.c --- cdrtools-2.01.01a33/libschily/stdio/fdup.c 2004-08-08 11:02:05.000000000 +0000 +++ cdrtools-3.02a09/libschily/stdio/fdup.c 2010-11-06 20:07:32.000000000 +0000 @@ -1,6 +1,6 @@ -/* @(#)fdup.c 1.14 04/08/08 Copyright 1986, 1995-2003 J. Schilling */ +/* @(#)fdup.c 1.16 10/11/06 Copyright 1986, 1995-2010 J. Schilling */ /* - * Copyright (c) 1986, 1995-2003 J. Schilling + * Copyright (c) 1986, 1995-2010 J. Schilling */ /* * The contents of this file are subject to the terms of the @@ -17,8 +17,8 @@ #include "schilyio.h" /* - * Note that because of a definition in schilyio.h we are using fseeko()/ftello() - * instead of fseek()/ftell() if available. + * Note that because of a definition in schilyio.h we are using + * fseeko()/ftello() instead of fseek()/ftell() if available. */ EXPORT FILE * @@ -29,7 +29,7 @@ down(f); if ((newfd = dup(fileno(f))) < 0) - return ((FILE *) NULL); + return ((FILE *)NULL); lseek(newfd, ftell(f), SEEK_SET); return (_fcons((FILE *)0, newfd, (FI_READ | FI_WRITE | FI_CLOSE))); diff -Nru cdrtools-2.01.01a33/libschily/stdio/ffileread.c cdrtools-3.02a09/libschily/stdio/ffileread.c --- cdrtools-2.01.01a33/libschily/stdio/ffileread.c 2006-09-26 11:16:36.000000000 +0000 +++ cdrtools-3.02a09/libschily/stdio/ffileread.c 2009-06-30 19:46:20.000000000 +0000 @@ -1,6 +1,6 @@ -/* @(#)ffileread.c 1.11 06/09/26 Copyright 1986, 1996-2003 J. Schilling */ +/* @(#)ffileread.c 1.13 09/06/30 Copyright 1986, 1996-2009 J. Schilling */ /* - * Copyright (c) 1986, 1996-2003 J. Schilling + * Copyright (c) 1986, 1996-2009 J. Schilling */ /* * The contents of this file are subject to the terms of the @@ -16,20 +16,25 @@ #include "schilyio.h" -EXPORT int +EXPORT ssize_t ffileread(f, buf, len) register FILE *f; void *buf; - int len; + size_t len; { - register int fd; - register int ret; + register int fd; + register ssize_t ret; + int oerrno = geterrno(); down2(f, _IOREAD, _IORW); fd = fileno(f); - while ((ret = read(fd, buf, len)) < 0 && geterrno() == EINTR) - /* LINTED */ - ; + while ((ret = read(fd, buf, len)) < 0 && geterrno() == EINTR) { + /* + * Set back old 'errno' so we don't change the errno visible + * to the outside if we did not fail. + */ + seterrno(oerrno); + } return (ret); } diff -Nru cdrtools-2.01.01a33/libschily/stdio/ffilewrite.c cdrtools-3.02a09/libschily/stdio/ffilewrite.c --- cdrtools-2.01.01a33/libschily/stdio/ffilewrite.c 2004-08-08 11:02:05.000000000 +0000 +++ cdrtools-3.02a09/libschily/stdio/ffilewrite.c 2009-06-30 19:46:20.000000000 +0000 @@ -1,6 +1,6 @@ -/* @(#)ffilewrite.c 1.6 04/08/08 Copyright 1986 J. Schilling */ +/* @(#)ffilewrite.c 1.8 09/06/30 Copyright 1986-2009 J. Schilling */ /* - * Copyright (c) 1986 J. Schilling + * Copyright (c) 1986-2009 J. Schilling */ /* * The contents of this file are subject to the terms of the @@ -16,13 +16,25 @@ #include "schilyio.h" -EXPORT int +EXPORT ssize_t ffilewrite(f, buf, len) register FILE *f; void *buf; - int len; + size_t len; { + register int fd; + register ssize_t ret; + int oerrno = geterrno(); + down2(f, _IORWT, _IORW); + fd = fileno(f); - return (write(fileno(f), (char *)buf, len)); + while ((ret = write(fd, buf, len)) < 0 && geterrno() == EINTR) { + /* + * Set back old 'errno' so we don't change the errno visible + * to the outside if we did not fail. + */ + seterrno(oerrno); + } + return (ret); } diff -Nru cdrtools-2.01.01a33/libschily/stdio/fgetaline.c cdrtools-3.02a09/libschily/stdio/fgetaline.c --- cdrtools-2.01.01a33/libschily/stdio/fgetaline.c 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/libschily/stdio/fgetaline.c 2015-05-09 15:03:53.000000000 +0000 @@ -0,0 +1,100 @@ +/* @(#)fgetaline.c 1.5 15/05/09 Copyright 2011-2015 J. Schilling */ +/* + * Copyright (c) 2011-2015 J. Schilling + * + */ +/* + * The contents of this file are subject to the terms of the + * Common Development and Distribution License, Version 1.0 only + * (the "License"). You may not use this file except in compliance + * with the License. + * + * See the file CDDL.Schily.txt in this distribution for details. + * A copy of the CDDL is also available via the Internet at + * http://www.opensource.org/licenses/cddl1.txt + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file CDDL.Schily.txt from this distribution. + */ + +#include "schilyio.h" +#include +#include + +EXPORT ssize_t fgetaline __PR((FILE *, char **, size_t *)); +EXPORT ssize_t getaline __PR((char **, size_t *)); + +#define DEF_LINE_SIZE 128 + +EXPORT ssize_t +fgetaline(f, bufp, lenp) + register FILE *f; + char **bufp; + register size_t *lenp; +{ +#if defined(HAVE_GETDELIM) || !defined(USE_FGETS_FOR_FGETALINE) + return (getdelim(bufp, lenp, '\n', f)); +#else + /* + * WARNING: fgets() cannot signal that the read line-buffer + * WARNING: has embedded nul bytes. We cannot distinguish + * WARNING: read nul bytes from the inserted nul past '\n' + * WARNING: without knowing file positions before and after. + */ + int eof; + register size_t used = 0; + register size_t line_size; + register char *line; + + if (bufp == NULL || lenp == NULL) { + seterrno(EINVAL); + return (-1); + } + + line_size = *lenp; + line = *bufp; + if (line == NULL || line_size == 0) { + if (line_size == 0) + line_size = DEF_LINE_SIZE; + if (line == NULL) + line = (char *) malloc(line_size); + if (line == NULL) + return (-1); + } + /* read until EOF or newline encountered */ + line[0] = '\0'; + do { + line[line_size - 1] = '\t'; /* arbitrary non-zero char */ + line[line_size - 2] = ' '; /* arbitrary non-newline char */ + if (!(eof = (fgets(line+used, + line_size-used, + f) == NULL))) { + + if (line[line_size - 1] != '\0' || + line[line_size - 2] == '\n') + break; + + used = line_size - 1; + + line_size += DEF_LINE_SIZE; + line = (char *) realloc(line, line_size); + if (line == NULL) + return (-1); + } + } while (!eof); + used += strlen(&line[used]); + *bufp = line; + *lenp = line_size; + if (eof && (used == 0)) + return (-1); + return (used); +#endif +} + +EXPORT ssize_t +getaline(bufp, lenp) + char **bufp; + size_t *lenp; +{ + return (fgetaline(stdin, bufp, lenp)); +} diff -Nru cdrtools-2.01.01a33/libschily/stdio/fgetline.c cdrtools-3.02a09/libschily/stdio/fgetline.c --- cdrtools-2.01.01a33/libschily/stdio/fgetline.c 2004-09-25 12:23:36.000000000 +0000 +++ cdrtools-3.02a09/libschily/stdio/fgetline.c 2016-11-07 19:56:52.000000000 +0000 @@ -1,6 +1,11 @@ -/* @(#)fgetline.c 1.8 04/09/25 Copyright 1986, 1996-2003 J. Schilling */ +/* @(#)fgetline.c 1.14 16/11/07 Copyright 1986, 1996-2016 J. Schilling */ /* - * Copyright (c) 1986, 1996-2003 J. Schilling + * Copyright (c) 1986, 1996-2016 J. Schilling + * + * This is an interface that exists in the public since 1982. + * The POSIX.1-2008 standard did ignore POSIX rules not to + * redefine existing public interfaces and redefined the interfaces + * forcing us to add a js_*() prefix to the original functions. */ /* * The contents of this file are subject to the terms of the @@ -9,61 +14,170 @@ * with the License. * * See the file CDDL.Schily.txt in this distribution for details. + * A copy of the CDDL is also available via the Internet at + * http://www.opensource.org/licenses/cddl1.txt * * When distributing Covered Code, include this CDDL HEADER in each * file and include the License file CDDL.Schily.txt from this distribution. */ +#define fgetline __no__fgetline__ +#define getline __no__getline__ + +#define FAST_GETC_PUTC /* Will be reset if not possible */ #include "schilyio.h" +#ifdef LIB_SHEDIT +#undef HAVE_USG_STDIO +#undef FAST_GETC_PUTC +#endif + +#ifndef NO_GETLINE_COMPAT /* Define to disable backward compatibility */ +#undef fgetline +#undef getline +#ifdef HAVE_PRAGMA_WEAK +#pragma weak fgetline = js_fgetline +#pragma weak getline = js_getline +#else + +EXPORT int fgetline __PR((FILE *, char *, int)); +EXPORT int getline __PR((char *, int)); + +EXPORT int +fgetline(f, buf, len) + FILE *f; + char *buf; + int len; +{ + return (js_fgetline(f, buf, len)); +} + +EXPORT int +getline(buf, len) + char *buf; + int len; +{ + return (js_fgetline(stdin, buf, len)); +} +#endif +#endif + +#if !defined(getc) && defined(USE_FGETS_FOR_FGETLINE) +#include + /* - * XXX should we check if HAVE_USG_STDIO is defined and - * XXX use something line memccpy to speed things up ??? + * Warning: this prevents us from being able to have embedded null chars. */ +EXPORT int +js_fgetline(f, buf, len) + register FILE *f; + char *buf; + register int len; +{ + char *bp = fgets(buf, len, f); + + if (bp) { + len = strlen(bp); + if (len > 0) { + if (bp[len-1] == '\n') + bp[--len] = '\0'; + } + return (len); + } + buf[0] = '\0'; + return (-1); +} + +#else EXPORT int -fgetline(f, buf, len) +js_fgetline(f, buf, len) register FILE *f; char *buf; register int len; { - register int c = '\0'; register char *bp = buf; +#if defined(HAVE_USG_STDIO) || defined(FAST_GETC_PUTC) + register char *p; +#else register int nl = '\n'; + register int c = '\0'; +#endif down2(f, _IOREAD, _IORW); + if (len <= 0) + return (0); + + *bp = '\0'; for (;;) { - if ((c = getc(f)) < 0) +#if defined(HAVE_USG_STDIO) || defined(FAST_GETC_PUTC) + size_t n; + + if ((__c f)->_cnt <= 0) { + if (usg_filbuf(f) == EOF) { + /* + * If buffer is empty and we hit EOF, return EOF + */ + if (bp == buf) + return (EOF); + break; + } + (__c f)->_cnt++; + (__c f)->_ptr--; + } + + n = len; + if (n > (__c f)->_cnt) + n = (__c f)->_cnt; + p = movecbytes((__c f)->_ptr, bp, '\n', n); + if (p) { + n = p - bp; + } + (__c f)->_ptr += n; + (__c f)->_cnt -= n; + bp += n; + len -= n; + if (p != NULL) { + bp--; /* Remove '\n' */ break; + } +#else + if ((c = getc(f)) < 0) { + /* + * If buffer is empty and we hit EOF, return EOF + */ + if (bp == buf) + return (c); + break; + } if (c == nl) break; if (--len > 0) { *bp++ = (char)c; } else { +#ifdef __never__ /* * Read up to end of line */ while ((c = getc(f)) >= 0 && c != nl) /* LINTED */ ; +#endif break; } +#endif } *bp = '\0'; - /* - * If buffer is empty and we hit EOF, return EOF - */ - if (c < 0 && bp == buf) - return (c); return (bp - buf); } +#endif EXPORT int -getline(buf, len) +js_getline(buf, len) char *buf; int len; { - return (fgetline(stdin, buf, len)); + return (js_fgetline(stdin, buf, len)); } diff -Nru cdrtools-2.01.01a33/libschily/stdio/fgetstr.c cdrtools-3.02a09/libschily/stdio/fgetstr.c --- cdrtools-2.01.01a33/libschily/stdio/fgetstr.c 2004-09-25 12:26:06.000000000 +0000 +++ cdrtools-3.02a09/libschily/stdio/fgetstr.c 2016-11-07 19:56:52.000000000 +0000 @@ -1,6 +1,6 @@ -/* @(#)fgetstr.c 1.9 04/09/25 Copyright 1986, 1996-2003 J. Schilling */ +/* @(#)fgetstr.c 1.12 16/11/07 Copyright 1986, 1996-2016 J. Schilling */ /* - * Copyright (c) 1986, 1996-2003 J. Schilling + * Copyright (c) 1986, 1996-2016 J. Schilling */ /* * The contents of this file are subject to the terms of the @@ -9,17 +9,38 @@ * with the License. * * See the file CDDL.Schily.txt in this distribution for details. + * A copy of the CDDL is also available via the Internet at + * http://www.opensource.org/licenses/cddl1.txt * * When distributing Covered Code, include this CDDL HEADER in each * file and include the License file CDDL.Schily.txt from this distribution. */ +#define FAST_GETC_PUTC /* Will be reset if not possible */ #include "schilyio.h" +#if !defined(getc) && defined(USE_FGETS_FOR_FGETSTR) +#include + /* - * XXX should we check if HAVE_USG_STDIO is defined and - * XXX use something line memccpy to speed things up ??? + * Warning: this prevents us from being able to have embedded null chars. */ +EXPORT int +fgetstr(f, buf, len) + register FILE *f; + char *buf; + register int len; +{ + char *bp = fgets(buf, len, f); + + if (bp) { + return (strlen(bp)); + } + buf[0] = '\0'; + return (-1); +} + +#else EXPORT int fgetstr(f, buf, len) @@ -27,30 +48,72 @@ char *buf; register int len; { - register int c = '\0'; register char *bp = buf; +#if defined(HAVE_USG_STDIO) || defined(FAST_GETC_PUTC) + register char *p; +#else + register int c = '\0'; register int nl = '\n'; +#endif down2(f, _IOREAD, _IORW); + if (len <= 0) + return (0); + + *bp = '\0'; for (;;) { - if ((c = getc(f)) < 0) +#if defined(HAVE_USG_STDIO) || defined(FAST_GETC_PUTC) + size_t n; + + if ((__c f)->_cnt <= 0) { + if (usg_filbuf(f) == EOF) { + /* + * If buffer is empty and we hit EOF, return EOF + */ + if (bp == buf) + return (EOF); + break; + } + (__c f)->_cnt++; + (__c f)->_ptr--; + } + + n = len; + if (n > (__c f)->_cnt) + n = (__c f)->_cnt; + p = movecbytes((__c f)->_ptr, bp, '\n', n); + if (p) { + n = p - bp; + } + (__c f)->_ptr += n; + (__c f)->_cnt -= n; + bp += n; + len -= n; + if (p != NULL) break; +#else + if ((c = getc(f)) < 0) { + /* + * If buffer is empty and we hit EOF, return EOF + */ + if (bp == buf) + return (c); + break; + } if (--len > 0) *bp++ = (char)c; if (c == nl) break; +#endif } *bp = '\0'; - /* - * If buffer is empty and we hit EOF, return EOF - */ - if (c < 0 && bp == buf) - return (c); return (bp - buf); } +#endif + EXPORT int getstr(buf, len) char *buf; diff -Nru cdrtools-2.01.01a33/libschily/stdio/fileluopen64.c cdrtools-3.02a09/libschily/stdio/fileluopen64.c --- cdrtools-2.01.01a33/libschily/stdio/fileluopen64.c 2004-08-08 11:02:05.000000000 +0000 +++ cdrtools-3.02a09/libschily/stdio/fileluopen64.c 2010-08-23 12:28:50.000000000 +0000 @@ -1,4 +1,4 @@ -/* @(#)fileluopen64.c 1.6 04/08/08 Copyright 2000 J. Schilling */ +/* @(#)fileluopen64.c 1.7 10/08/23 Copyright 2000 J. Schilling */ /* * Copyright (c) 2000 J. Schilling */ @@ -18,7 +18,6 @@ #include "schilyio.h" -/*#if _LFS_LARGEFILE*/ #ifdef HAVE_LARGEFILES #include "fileluopen.c" diff -Nru cdrtools-2.01.01a33/libschily/stdio/fileluopen.c cdrtools-3.02a09/libschily/stdio/fileluopen.c --- cdrtools-2.01.01a33/libschily/stdio/fileluopen.c 2004-08-08 11:02:05.000000000 +0000 +++ cdrtools-3.02a09/libschily/stdio/fileluopen.c 2010-11-06 20:07:32.000000000 +0000 @@ -1,6 +1,6 @@ -/* @(#)fileluopen.c 1.17 04/08/08 Copyright 1986, 1995-2003 J. Schilling */ +/* @(#)fileluopen.c 1.19 10/11/06 Copyright 1986, 1995-2010 J. Schilling */ /* - * Copyright (c) 1986, 1995-2003 J. Schilling + * Copyright (c) 1986, 1995-2010 J. Schilling */ /* * The contents of this file are subject to the terms of the @@ -17,8 +17,8 @@ #include "schilyio.h" /* - * Note that because of a definition in schilyio.h we are using fseeko()/ftello() - * instead of fseek()/ftell() if available. + * Note that because of a definition in schilyio.h we are using + * fseeko()/ftello() instead of fseek()/ftell() if available. */ #ifndef O_NDELAY /* This is undefined on BeOS :-( */ @@ -46,17 +46,17 @@ int flag = 0; if (!_cvmod(mode, &omode, &flag)) - return ((FILE *) NULL); + return ((FILE *)NULL); if (omode & (O_NDELAY|O_CREAT|O_TRUNC|O_EXCL)) { raisecond(_badmode, 0L); - return ((FILE *) NULL); + return ((FILE *)NULL); } #ifdef F_GETFD if (fcntl(f, F_GETFD, 0) < 0) { raisecond(_badfile, 0L); - return ((FILE *) NULL); + return ((FILE *)NULL); } #endif diff -Nru cdrtools-2.01.01a33/libschily/stdio/filemopen64.c cdrtools-3.02a09/libschily/stdio/filemopen64.c --- cdrtools-2.01.01a33/libschily/stdio/filemopen64.c 2004-08-08 11:02:05.000000000 +0000 +++ cdrtools-3.02a09/libschily/stdio/filemopen64.c 2010-08-23 12:28:50.000000000 +0000 @@ -1,4 +1,4 @@ -/* @(#)filemopen64.c 1.2 04/08/08 Copyright 2000-2004 J. Schilling */ +/* @(#)filemopen64.c 1.3 10/08/23 Copyright 2000-2004 J. Schilling */ /* * Copyright (c) 2000-2004 J. Schilling */ @@ -18,7 +18,6 @@ #include "schilyio.h" -/*#if _LFS_LARGEFILE*/ #ifdef HAVE_LARGEFILES #include "filemopen.c" diff -Nru cdrtools-2.01.01a33/libschily/stdio/filemopen.c cdrtools-3.02a09/libschily/stdio/filemopen.c --- cdrtools-2.01.01a33/libschily/stdio/filemopen.c 2005-08-18 10:14:22.000000000 +0000 +++ cdrtools-3.02a09/libschily/stdio/filemopen.c 2010-08-21 09:50:12.000000000 +0000 @@ -1,6 +1,6 @@ -/* @(#)filemopen.c 1.4 05/08/18 Copyright 1986, 1995-2005 J. Schilling */ +/* @(#)filemopen.c 1.5 10/08/21 Copyright 1986, 1995-2010 J. Schilling */ /* - * Copyright (c) 1986, 1995-2005 J. Schilling + * Copyright (c) 1986, 1995-2010 J. Schilling */ /* * The contents of this file are subject to the terms of the @@ -31,10 +31,10 @@ int flag = 0; if (!_cvmod(mode, &omode, &flag)) - return ((FILE *) NULL); + return ((FILE *)NULL); if ((ret = open(name, omode, cmode)) < 0) - return ((FILE *) NULL); + return ((FILE *)NULL); return (_fcons((FILE *)0, ret, flag | FI_CLOSE)); } diff -Nru cdrtools-2.01.01a33/libschily/stdio/fileopen64.c cdrtools-3.02a09/libschily/stdio/fileopen64.c --- cdrtools-2.01.01a33/libschily/stdio/fileopen64.c 2004-08-08 11:02:05.000000000 +0000 +++ cdrtools-3.02a09/libschily/stdio/fileopen64.c 2010-08-23 12:28:50.000000000 +0000 @@ -1,4 +1,4 @@ -/* @(#)fileopen64.c 1.6 04/08/08 Copyright 2000 J. Schilling */ +/* @(#)fileopen64.c 1.7 10/08/23 Copyright 2000 J. Schilling */ /* * Copyright (c) 2000 J. Schilling */ @@ -18,7 +18,6 @@ #include "schilyio.h" -/*#if _LFS_LARGEFILE*/ #ifdef HAVE_LARGEFILES #include "fileopen.c" diff -Nru cdrtools-2.01.01a33/libschily/stdio/fileopen.c cdrtools-3.02a09/libschily/stdio/fileopen.c --- cdrtools-2.01.01a33/libschily/stdio/fileopen.c 2005-08-18 10:14:22.000000000 +0000 +++ cdrtools-3.02a09/libschily/stdio/fileopen.c 2010-08-21 09:50:12.000000000 +0000 @@ -1,6 +1,6 @@ -/* @(#)fileopen.c 1.11 05/08/18 Copyright 1986, 1995-2005 J. Schilling */ +/* @(#)fileopen.c 1.12 10/08/21 Copyright 1986, 1995-2010 J. Schilling */ /* - * Copyright (c) 1986, 1995-2005 J. Schilling + * Copyright (c) 1986, 1995-2010 J. Schilling */ /* * The contents of this file are subject to the terms of the @@ -26,10 +26,10 @@ int flag = 0; if (!_cvmod(mode, &omode, &flag)) - return ((FILE *) NULL); + return ((FILE *)NULL); if ((ret = _openfd(name, omode)) < 0) - return ((FILE *) NULL); + return ((FILE *)NULL); return (_fcons((FILE *)0, ret, flag | FI_CLOSE)); } diff -Nru cdrtools-2.01.01a33/libschily/stdio/filepos64.c cdrtools-3.02a09/libschily/stdio/filepos64.c --- cdrtools-2.01.01a33/libschily/stdio/filepos64.c 2004-08-08 11:02:05.000000000 +0000 +++ cdrtools-3.02a09/libschily/stdio/filepos64.c 2010-08-23 12:28:50.000000000 +0000 @@ -1,4 +1,4 @@ -/* @(#)filepos64.c 1.6 04/08/08 Copyright 2000 J. Schilling */ +/* @(#)filepos64.c 1.7 10/08/23 Copyright 2000 J. Schilling */ /* * Copyright (c) 2000 J. Schilling */ @@ -18,7 +18,6 @@ #include "schilyio.h" -/*#if _LFS_LARGEFILE*/ #ifdef HAVE_LARGEFILES #include "filepos.c" diff -Nru cdrtools-2.01.01a33/libschily/stdio/filepos.c cdrtools-3.02a09/libschily/stdio/filepos.c --- cdrtools-2.01.01a33/libschily/stdio/filepos.c 2004-08-08 11:02:05.000000000 +0000 +++ cdrtools-3.02a09/libschily/stdio/filepos.c 2010-11-06 20:07:32.000000000 +0000 @@ -1,6 +1,6 @@ -/* @(#)filepos.c 1.10 04/08/08 Copyright 1986, 1996-2003 J. Schilling */ +/* @(#)filepos.c 1.11 10/11/06 Copyright 1986, 1996-2010 J. Schilling */ /* - * Copyright (c) 1986, 1996-2003 J. Schilling + * Copyright (c) 1986, 1996-2010 J. Schilling */ /* * The contents of this file are subject to the terms of the @@ -17,8 +17,8 @@ #include "schilyio.h" /* - * Note that because of a definition in schilyio.h we are using fseeko()/ftello() - * instead of fseek()/ftell() if available. + * Note that because of a definition in schilyio.h we are using + * fseeko()/ftello() instead of fseek()/ftell() if available. */ EXPORT off_t diff -Nru cdrtools-2.01.01a33/libschily/stdio/fileread.c cdrtools-3.02a09/libschily/stdio/fileread.c --- cdrtools-2.01.01a33/libschily/stdio/fileread.c 2007-04-03 16:38:04.000000000 +0000 +++ cdrtools-3.02a09/libschily/stdio/fileread.c 2012-02-26 14:19:42.000000000 +0000 @@ -1,6 +1,6 @@ -/* @(#)fileread.c 1.15 07/04/03 Copyright 1986, 1995-2007 J. Schilling */ +/* @(#)fileread.c 1.17 12/02/26 Copyright 1986, 1995-2012 J. Schilling */ /* - * Copyright (c) 1986, 1995-2007 J. Schilling + * Copyright (c) 1986, 1995-2012 J. Schilling */ /* * The contents of this file are subject to the terms of the @@ -20,13 +20,13 @@ #ifdef HAVE_USG_STDIO -EXPORT int +EXPORT ssize_t fileread(f, buf, len) register FILE *f; void *buf; - int len; + size_t len; { - int cnt; + ssize_t cnt; register int n; down2(f, _IOREAD, _IORW); @@ -59,20 +59,20 @@ } if (!ferror(f)) return (cnt); - if (!(my_flag(f) & _JS_IONORAISE)) + if (!(my_flag(f) & _JS_IONORAISE) && !(_io_glflag & _JS_IONORAISE)) raisecond(_readerr, 0L); return (-1); } #else -EXPORT int +EXPORT ssize_t fileread(f, buf, len) register FILE *f; void *buf; - int len; + size_t len; { - int cnt; + ssize_t cnt; down2(f, _IOREAD, _IORW); @@ -82,7 +82,7 @@ if (!ferror(f)) return (cnt); - if (!(my_flag(f) & _JS_IONORAISE)) + if (!(my_flag(f) & _JS_IONORAISE) && !(_io_glflag & _JS_IONORAISE)) raisecond(_readerr, 0L); return (-1); } diff -Nru cdrtools-2.01.01a33/libschily/stdio/filereopen.c cdrtools-3.02a09/libschily/stdio/filereopen.c --- cdrtools-2.01.01a33/libschily/stdio/filereopen.c 2007-04-03 16:38:04.000000000 +0000 +++ cdrtools-3.02a09/libschily/stdio/filereopen.c 2010-11-06 20:13:34.000000000 +0000 @@ -1,8 +1,8 @@ -/* @(#)filereopen.c 1.16 07/04/03 Copyright 1986, 1995-2007 J. Schilling */ +/* @(#)filereopen.c 1.18 10/11/06 Copyright 1986, 1995-2010 J. Schilling */ /* * open new file on old stream * - * Copyright (c) 1986, 1995-2007 J. Schilling + * Copyright (c) 1986, 1995-2010 J. Schilling */ /* * The contents of this file are subject to the terms of the @@ -19,8 +19,8 @@ #include "schilyio.h" /* - * Note that because of a definition in schilyio.h we are using fseeko()/ftello() - * instead of fseek()/ftell() if available. + * Note that because of a definition in schilyio.h we are using + * fseeko()/ftello() instead of fseek()/ftell() if available. */ LOCAL char *fmtab[] = { @@ -57,24 +57,26 @@ const char *mode; FILE *fp; { - int ret; + int ret = -1; int omode = 0; int flag = 0; if (!_cvmod(mode, &omode, &flag)) - return ((FILE *) NULL); + return ((FILE *)NULL); /* * create/truncate file if necessary */ - if ((ret = _openfd(name, omode)) < 0) - return ((FILE *) NULL); - close(ret); + if ((flag & (FI_CREATE | FI_TRUNC)) != 0) { + if ((ret = _openfd(name, omode)) < 0) + return ((FILE *)NULL); + close(ret); + } fp = freopen(name, fmtab[flag & (FI_READ | FI_WRITE | FI_BINARY | FI_APPEND)], fp); - if (fp != (FILE *) NULL) { + if (fp != (FILE *)NULL) { set_my_flag(fp, 0); /* must clear it if fp is reused */ if (flag & FI_APPEND) { diff -Nru cdrtools-2.01.01a33/libschily/stdio/fileseek64.c cdrtools-3.02a09/libschily/stdio/fileseek64.c --- cdrtools-2.01.01a33/libschily/stdio/fileseek64.c 2004-08-08 11:02:05.000000000 +0000 +++ cdrtools-3.02a09/libschily/stdio/fileseek64.c 2010-08-23 12:28:50.000000000 +0000 @@ -1,4 +1,4 @@ -/* @(#)fileseek64.c 1.6 04/08/08 Copyright 2000 J. Schilling */ +/* @(#)fileseek64.c 1.7 10/08/23 Copyright 2000 J. Schilling */ /* * Copyright (c) 2000 J. Schilling */ @@ -18,7 +18,6 @@ #include "schilyio.h" -/*#if _LFS_LARGEFILE*/ #ifdef HAVE_LARGEFILES #include "fileseek.c" diff -Nru cdrtools-2.01.01a33/libschily/stdio/fileseek.c cdrtools-3.02a09/libschily/stdio/fileseek.c --- cdrtools-2.01.01a33/libschily/stdio/fileseek.c 2007-04-03 16:38:04.000000000 +0000 +++ cdrtools-3.02a09/libschily/stdio/fileseek.c 2012-02-26 14:19:42.000000000 +0000 @@ -1,6 +1,6 @@ -/* @(#)fileseek.c 1.13 07/04/03 Copyright 1986, 1996-2007 J. Schilling */ +/* @(#)fileseek.c 1.15 12/02/26 Copyright 1986, 1996-2012 J. Schilling */ /* - * Copyright (c) 1986, 1996-2007 J. Schilling + * Copyright (c) 1986, 1996-2012 J. Schilling */ /* * The contents of this file are subject to the terms of the @@ -17,8 +17,8 @@ #include "schilyio.h" /* - * Note that because of a definition in schilyio.h we are using fseeko()/ftello() - * instead of fseek()/ftell() if available. + * Note that because of a definition in schilyio.h we are using + * fseeko()/ftello() instead of fseek()/ftell() if available. */ static char _seekerr[] = "file_seek_err"; @@ -32,7 +32,8 @@ down(f); ret = fseek(f, pos, SEEK_SET); - if (ret < 0 && !(my_flag(f) & _JS_IONORAISE)) + if (ret < 0 && !(my_flag(f) & _JS_IONORAISE) && + !(_io_glflag & _JS_IONORAISE)) raisecond(_seekerr, 0L); return (ret); } diff -Nru cdrtools-2.01.01a33/libschily/stdio/filesize64.c cdrtools-3.02a09/libschily/stdio/filesize64.c --- cdrtools-2.01.01a33/libschily/stdio/filesize64.c 2004-08-08 11:02:05.000000000 +0000 +++ cdrtools-3.02a09/libschily/stdio/filesize64.c 2010-08-23 12:28:50.000000000 +0000 @@ -1,4 +1,4 @@ -/* @(#)filesize64.c 1.6 04/08/08 Copyright 2000 J. Schilling */ +/* @(#)filesize64.c 1.7 10/08/23 Copyright 2000 J. Schilling */ /* * Copyright (c) 2000 J. Schilling */ @@ -18,7 +18,6 @@ #include "schilyio.h" -/*#if _LFS_LARGEFILE*/ #ifdef HAVE_LARGEFILES #include "filesize.c" diff -Nru cdrtools-2.01.01a33/libschily/stdio/filestat64.c cdrtools-3.02a09/libschily/stdio/filestat64.c --- cdrtools-2.01.01a33/libschily/stdio/filestat64.c 2004-08-08 11:02:05.000000000 +0000 +++ cdrtools-3.02a09/libschily/stdio/filestat64.c 2010-08-23 12:28:50.000000000 +0000 @@ -1,4 +1,4 @@ -/* @(#)filestat64.c 1.6 04/08/08 Copyright 2000 J. Schilling */ +/* @(#)filestat64.c 1.7 10/08/23 Copyright 2000 J. Schilling */ /* * Copyright (c) 2000 J. Schilling */ @@ -18,7 +18,6 @@ #include "schilyio.h" -/*#if _LFS_LARGEFILE*/ #ifdef HAVE_LARGEFILES #include "filestat.c" diff -Nru cdrtools-2.01.01a33/libschily/stdio/filewrite.c cdrtools-3.02a09/libschily/stdio/filewrite.c --- cdrtools-2.01.01a33/libschily/stdio/filewrite.c 2007-04-03 16:38:04.000000000 +0000 +++ cdrtools-3.02a09/libschily/stdio/filewrite.c 2012-02-26 14:19:42.000000000 +0000 @@ -1,6 +1,6 @@ -/* @(#)filewrite.c 1.15 07/04/03 Copyright 1986, 1995-2007 J. Schilling */ +/* @(#)filewrite.c 1.18 12/02/26 Copyright 1986, 1995-2012 J. Schilling */ /* - * Copyright (c) 1986, 1995-2007 J. Schilling + * Copyright (c) 1986, 1995-2012 J. Schilling */ /* * The contents of this file are subject to the terms of the @@ -20,20 +20,20 @@ #ifdef HAVE_USG_STDIO -EXPORT int +EXPORT ssize_t filewrite(f, vbuf, len) register FILE *f; void *vbuf; - int len; + size_t len; { register int n; - int cnt; - char *buf = vbuf; + ssize_t cnt; + char *buf = vbuf; down2(f, _IOWRT, _IORW); if (f->_flag & _IONBF) { - cnt = write(fileno(f), buf, len); + cnt = _niwrite(fileno(f), buf, len); if (cnt < 0) { f->_flag |= _IOERR; if (!(my_flag(f) & _JS_IONORAISE)) @@ -60,32 +60,32 @@ } if (!ferror(f)) return (cnt); - if (!(my_flag(f) & _JS_IONORAISE)) - raisecond(_writeerr, 0L); + if (!(my_flag(f) & _JS_IONORAISE) && !(_io_glflag & _JS_IONORAISE)) + raisecond(_writeerr, 0L); return (-1); } #else -EXPORT int +EXPORT ssize_t filewrite(f, vbuf, len) register FILE *f; void *vbuf; - int len; + size_t len; { - int cnt; - char *buf = vbuf; + ssize_t cnt; + char *buf = vbuf; down2(f, _IOWRT, _IORW); if (my_flag(f) & _JS_IOUNBUF) - return (write(fileno(f), buf, len)); + return (_niwrite(fileno(f), buf, len)); cnt = fwrite(buf, 1, len, f); if (!ferror(f)) return (cnt); - if (!(my_flag(f) & _JS_IONORAISE)) - raisecond(_writeerr, 0L); + if (!(my_flag(f) & _JS_IONORAISE) && !(_io_glflag & _JS_IONORAISE)) + raisecond(_writeerr, 0L); return (-1); } diff -Nru cdrtools-2.01.01a33/libschily/stdio/flag.c cdrtools-3.02a09/libschily/stdio/flag.c --- cdrtools-2.01.01a33/libschily/stdio/flag.c 2007-04-03 16:38:04.000000000 +0000 +++ cdrtools-3.02a09/libschily/stdio/flag.c 2010-11-06 20:09:42.000000000 +0000 @@ -1,6 +1,6 @@ -/* @(#)flag.c 2.13 07/04/03 Copyright 1986-2007 J. Schilling */ +/* @(#)flag.c 2.14 10/11/06 Copyright 1986-2010 J. Schilling */ /* - * Copyright (c) 1986-2007 J. Schilling + * Copyright (c) 1986-2010 J. Schilling */ /* * The contents of this file are subject to the terms of the @@ -30,7 +30,7 @@ #else EXPORT int _io_glflag; /* global default flag */ #endif -LOCAL int _fl_inc = 10; /* increment for expanding flag struct */ +LOCAL int _fl_inc = 10; /* increment to expand flag struct */ EXPORT int _fl_max = FL_INIT; /* max fd currently in _io_myfl */ LOCAL _io_fl _io_smyfl[FL_INIT]; /* initial static space */ EXPORT _io_fl *_io_myfl = _io_smyfl; /* init to static space */ diff -Nru cdrtools-2.01.01a33/libschily/stdio/getdelim.c cdrtools-3.02a09/libschily/stdio/getdelim.c --- cdrtools-2.01.01a33/libschily/stdio/getdelim.c 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/libschily/stdio/getdelim.c 2016-11-06 20:33:25.000000000 +0000 @@ -0,0 +1,124 @@ +/* @(#)getdelim.c 1.3 16/11/06 Copyright 2015-2016 J. Schilling */ +/* + * Copyright (c) 2015-2016 J. Schilling + * + */ +/* + * The contents of this file are subject to the terms of the + * Common Development and Distribution License, Version 1.0 only + * (the "License"). You may not use this file except in compliance + * with the License. + * + * See the file CDDL.Schily.txt in this distribution for details. + * A copy of the CDDL is also available via the Internet at + * http://www.opensource.org/licenses/cddl1.txt + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file CDDL.Schily.txt from this distribution. + */ + +#define FAST_GETC_PUTC +#include "schilyio.h" +#include + +#ifndef HAVE_GETDELIM +EXPORT ssize_t getdelim __PR((char **, size_t *, int, FILE *)); + +#define DEF_LINE_SIZE 128 + +EXPORT ssize_t +getdelim(bufp, lenp, delim, f) + char **bufp; + size_t *lenp; + register int delim; + register FILE *f; +{ + register char *lp; + register char *ep; + register size_t line_size; + register char *line; +#if defined(HAVE_USG_STDIO) || defined(FAST_GETC_PUTC) + char *p; +#else + register int c; +#endif + + if (bufp == NULL || lenp == NULL || + delim < 0 || delim > UINT8_MAX) { + seterrno(EINVAL); + return (-1); + } + + line_size = *lenp; + line = *bufp; + if (line == NULL || line_size == 0) { + if (line_size == 0) + line_size = DEF_LINE_SIZE; + if (line == NULL) + line = (char *) malloc(line_size); + if (line == NULL) + return (-1); + *bufp = line; + *lenp = line_size; + } + /* read until EOF or delim encountered */ + lp = line; + ep = &line[line_size - 1]; + do { +#if defined(HAVE_USG_STDIO) || defined(FAST_GETC_PUTC) + size_t n; + + if ((__c f)->_cnt <= 0) { + if (usg_filbuf(f) == EOF) + break; + (__c f)->_cnt++; + (__c f)->_ptr--; + } + + n = ep - lp; + if (n > (__c f)->_cnt) + n = (__c f)->_cnt; + p = movecbytes((__c f)->_ptr, lp, delim, n); + if (p) { + n = p - lp; + } + (__c f)->_ptr += n; + (__c f)->_cnt -= n; + lp += n; +#else + c = getc(f); + if (c == EOF) + break; + *lp++ = c; +#endif + if (lp >= ep) { + ep = line; + line_size += DEF_LINE_SIZE; + line = (char *) realloc(line, line_size); + if (line == NULL) { + *lp = '\0'; + return (-1); + } + lp = line + (lp - ep); + ep = &line[line_size - 1]; + *bufp = line; + *lenp = line_size; + } +#if defined(HAVE_USG_STDIO) || defined(FAST_GETC_PUTC) + } while (p == NULL); +#else + } while (c != delim); +#endif + *lp = '\0'; + line_size = lp - line; + if (line_size > SSIZE_T_MAX) { +#ifdef EOVERFLOW + seterrno(EOVERFLOW); +#else + seterrno(EINVAL); +#endif + return (-1); + } + return (line_size ? line_size : -1); +} +#endif /* HAVE_GETDELIM */ diff -Nru cdrtools-2.01.01a33/libschily/stdio/niread.c cdrtools-3.02a09/libschily/stdio/niread.c --- cdrtools-2.01.01a33/libschily/stdio/niread.c 2006-09-26 11:16:36.000000000 +0000 +++ cdrtools-3.02a09/libschily/stdio/niread.c 2009-06-30 19:38:31.000000000 +0000 @@ -1,8 +1,8 @@ -/* @(#)niread.c 1.13 06/09/26 Copyright 1986, 1996-2003 J. Schilling */ +/* @(#)niread.c 1.14 09/06/30 Copyright 1986, 1996-2009 J. Schilling */ /* * Non interruptable read * - * Copyright (c) 1986, 1996-2003 J. Schilling + * Copyright (c) 1986, 1996-2009 J. Schilling */ /* * The contents of this file are subject to the terms of the @@ -18,15 +18,19 @@ #include "schilyio.h" -EXPORT int +EXPORT ssize_t _niread(f, buf, count) int f; void *buf; - int count; + size_t count; { - int ret; + ssize_t ret; int oerrno = geterrno(); + if ((ret = (ssize_t)count) < 0) { + seterrno(EINVAL); + return ((ssize_t)-1); + } while ((ret = read(f, buf, count)) < 0 && geterrno() == EINTR) { /* * Set back old 'errno' so we don't change the errno visible diff -Nru cdrtools-2.01.01a33/libschily/stdio/niwrite.c cdrtools-3.02a09/libschily/stdio/niwrite.c --- cdrtools-2.01.01a33/libschily/stdio/niwrite.c 2006-09-26 11:16:36.000000000 +0000 +++ cdrtools-3.02a09/libschily/stdio/niwrite.c 2009-06-30 19:38:31.000000000 +0000 @@ -1,8 +1,8 @@ -/* @(#)niwrite.c 1.6 06/09/26 Copyright 1986, 2001-2003 J. Schilling */ +/* @(#)niwrite.c 1.7 09/06/30 Copyright 1986, 2001-2009 J. Schilling */ /* * Non interruptable write * - * Copyright (c) 1986, 2001-2003 J. Schilling + * Copyright (c) 1986, 2001-2009 J. Schilling */ /* * The contents of this file are subject to the terms of the @@ -18,15 +18,19 @@ #include "schilyio.h" -EXPORT int +EXPORT ssize_t _niwrite(f, buf, count) int f; void *buf; - int count; + size_t count; { - int ret; + ssize_t ret; int oerrno = geterrno(); + if ((ret = (ssize_t)count) < 0) { + seterrno(EINVAL); + return ((ssize_t)-1); + } while ((ret = write(f, buf, count)) < 0 && geterrno() == EINTR) { /* * Set back old 'errno' so we don't change the errno visible diff -Nru cdrtools-2.01.01a33/libschily/stdio/nixread.c cdrtools-3.02a09/libschily/stdio/nixread.c --- cdrtools-2.01.01a33/libschily/stdio/nixread.c 2006-09-26 11:16:36.000000000 +0000 +++ cdrtools-3.02a09/libschily/stdio/nixread.c 2009-06-30 19:38:31.000000000 +0000 @@ -1,8 +1,8 @@ -/* @(#)nixread.c 1.13 06/09/26 Copyright 1986, 1996-2003 J. Schilling */ +/* @(#)nixread.c 1.14 09/06/30 Copyright 1986, 1996-2009 J. Schilling */ /* * Non interruptable extended read * - * Copyright (c) 1986, 1996-2003 J. Schilling + * Copyright (c) 1986, 1996-2009 J. Schilling */ /* * The contents of this file are subject to the terms of the @@ -18,17 +18,21 @@ #include "schilyio.h" -EXPORT int +EXPORT ssize_t _nixread(f, buf, count) int f; void *buf; - int count; + size_t count; { - register char *p = (char *)buf; - register int ret; - register int total = 0; + register char *p = (char *)buf; + register ssize_t ret; + register int total = 0; int oerrno = geterrno(); + if ((ret = (ssize_t)count) < 0) { + seterrno(EINVAL); + return ((ssize_t)-1); + } while (count > 0) { while ((ret = read(f, p, count)) < 0) { if (geterrno() == EINTR) { diff -Nru cdrtools-2.01.01a33/libschily/stdio/nixwrite.c cdrtools-3.02a09/libschily/stdio/nixwrite.c --- cdrtools-2.01.01a33/libschily/stdio/nixwrite.c 2006-09-26 11:16:36.000000000 +0000 +++ cdrtools-3.02a09/libschily/stdio/nixwrite.c 2009-06-30 19:38:31.000000000 +0000 @@ -1,8 +1,8 @@ -/* @(#)nixwrite.c 1.6 06/09/26 Copyright 1986, 2001-2003 J. Schilling */ +/* @(#)nixwrite.c 1.7 09/06/30 Copyright 1986, 2001-2009 J. Schilling */ /* * Non interruptable extended write * - * Copyright (c) 1986, 2001-2003 J. Schilling + * Copyright (c) 1986, 2001-2009 J. Schilling */ /* * The contents of this file are subject to the terms of the @@ -18,17 +18,21 @@ #include "schilyio.h" -EXPORT int +EXPORT ssize_t _nixwrite(f, buf, count) int f; void *buf; - int count; + size_t count; { - register char *p = (char *)buf; - register int ret; - register int total = 0; + register char *p = (char *)buf; + register ssize_t ret; + register int total = 0; int oerrno = geterrno(); + if ((ret = (ssize_t)count) < 0) { + seterrno(EINVAL); + return ((ssize_t)-1); + } while (count > 0) { while ((ret = write(f, p, count)) < 0) { if (geterrno() == EINTR) { diff -Nru cdrtools-2.01.01a33/libschily/stdio/openfd.c cdrtools-3.02a09/libschily/stdio/openfd.c --- cdrtools-2.01.01a33/libschily/stdio/openfd.c 2006-11-28 16:46:05.000000000 +0000 +++ cdrtools-3.02a09/libschily/stdio/openfd.c 2010-11-06 20:11:46.000000000 +0000 @@ -1,6 +1,6 @@ -/* @(#)openfd.c 1.10 06/11/28 Copyright 1986, 1995 J. Schilling */ +/* @(#)openfd.c 1.11 10/11/06 Copyright 1986, 1995-2010 J. Schilling */ /* - * Copyright (c) 1986, 1995 J. Schilling + * Copyright (c) 1986, 1995-2010 J. Schilling */ /* * The contents of this file are subject to the terms of the @@ -17,7 +17,7 @@ #include "schilyio.h" #if defined(_openfd) && !defined(USE_LARGEFILES) -# undef _openfd +#undef _openfd #endif EXPORT int diff -Nru cdrtools-2.01.01a33/libschily/stdio/schilyio.h cdrtools-3.02a09/libschily/stdio/schilyio.h --- cdrtools-2.01.01a33/libschily/stdio/schilyio.h 2007-04-03 16:38:04.000000000 +0000 +++ cdrtools-3.02a09/libschily/stdio/schilyio.h 2016-11-06 00:07:11.000000000 +0000 @@ -1,6 +1,6 @@ -/* @(#)schilyio.h 2.26 07/04/03 Copyright 1986, 1995-2007 J. Schilling */ +/* @(#)schilyio.h 2.31 16/11/06 Copyright 1986, 1995-2016 J. Schilling */ /* - * Copyright (c) 1986, 1995-2007 J. Schilling + * Copyright (c) 1986, 1995-2016 J. Schilling */ /* * The contents of this file are subject to the terms of the @@ -9,6 +9,8 @@ * with the License. * * See the file CDDL.Schily.txt in this distribution for details. + * A copy of the CDDL is also available via the Internet at + * http://www.opensource.org/licenses/cddl1.txt * * When distributing Covered Code, include this CDDL HEADER in each * file and include the License file CDDL.Schily.txt from this distribution. @@ -18,8 +20,9 @@ #define _STDIO_SCHILYIO_H #include -#include +#include #include +#include #include #include #include @@ -31,7 +34,6 @@ # endif #endif -/*#if _LFS_LARGEFILE*/ #ifdef HAVE_LARGEFILES /* * XXX We may need to put this code to a more global place to allow all @@ -150,11 +152,22 @@ #endif /* DO_MYFLAG */ -#ifdef HAVE_USG_STDIO +#if defined(HAVE_USG_STDIO) || defined(FAST_GETC_PUTC) +/* + * We are on a system with AT&T compatible stdio implementation + */ /* * Use the right filbuf()/flsbuf() function. */ +#ifdef FAST_GETC_PUTC + +#define __c (struct SCHILY__FILE_TAG *) + +#ifndef HAVE___FILBUF +#define HAVE___FILBUF +#endif +#endif #ifdef HAVE___FILBUF # define usg_filbuf(fp) __filbuf(fp) # define usg_flsbuf(c, fp) __flsbuf(c, fp) @@ -162,8 +175,7 @@ * Define prototypes to verify if our interface is right */ extern int __filbuf __PR((FILE *)); -/*extern int __flsbuf __PR(());*/ -#else +#else /* !HAVE___FILBUF */ # ifdef HAVE__FILBUF # define usg_filbuf(fp) _filbuf(fp) # define usg_flsbuf(c, fp) _flsbuf(c, fp) @@ -171,13 +183,12 @@ * Define prototypes to verify if our interface is right */ extern int _filbuf __PR((FILE *)); -/*extern int _flsbuf __PR(());*/ # else /* * no filbuf() but this will not happen on USG_STDIO systems. */ # endif -#endif +#endif /* !HAVE___FILBUF */ /* * Do not check this because flsbuf()'s 1st parameter may be * int SunOS @@ -186,12 +197,16 @@ * * Note that the interface is now checked by autoconf. */ -/*extern int _flsbuf __PR((int, FILE *));*/ -#else +#else /* !HAVE_USG_STDIO */ /* * If we are on a non USG system we cannot down file pointers + * and we do not know about the internals of the FILE structure. */ #undef DO_DOWN +#endif /* !HAVE_USG_STDIO */ + +#ifndef __c +#define __c #endif #ifndef DO_DOWN @@ -212,19 +227,19 @@ * and if iop->_flag refers to a stream with appropriate modes. * If _iob[] gets expanded by malloc() we cannot check upper bound. */ -#define down(f) ((f) == 0 || (f)->_flag == 0 ? \ +#define down(f) ((f) == 0 || (__c f)->_flag == 0 ? \ (raisecond(_badfile, 0L), (FILE *)0) : (f)) -#define down1(f, fl1) ((f) == 0 || (f)->_flag == 0 ? \ +#define down1(f, fl1) ((f) == 0 || (__c f)->_flag == 0 ? \ (raisecond(_badfile, 0L), (FILE *)0) : \ - (((f)->_flag & fl1) != fl1 ? \ + (((__c f)->_flag & fl1) != fl1 ? \ (raisecond(_badop, 0L), (FILE *)0) : \ (f))) -#define down2(f, fl1, fl2) ((f) == 0 || (f)->_flag == 0 ? \ +#define down2(f, fl1, fl2) ((f) == 0 || (__c f)->_flag == 0 ? \ (raisecond(_badfile, 0L), (FILE *)0) : \ - (((f)->_flag & fl1) != fl1 && \ - ((f)->_flag & fl2) != fl2 ? \ + (((__c f)->_flag & fl1) != fl1 && \ + ((__c f)->_flag & fl2) != fl2 ? \ (raisecond(_badop, 0L), (FILE *)0) : \ (f))) #endif /* DO_DOWN */ diff -Nru cdrtools-2.01.01a33/libschily/strcasecmp.c cdrtools-3.02a09/libschily/strcasecmp.c --- cdrtools-2.01.01a33/libschily/strcasecmp.c 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/libschily/strcasecmp.c 2011-11-24 21:03:11.000000000 +0000 @@ -0,0 +1,46 @@ +/* @(#)strcasecmp.c 1.1 11/11/24 Copyright 2011 J. Schilling */ +/* + * strcasecmp() to be used if missing in libc + * + * Copyright (c) 2011 J. Schilling + */ +/* + * The contents of this file are subject to the terms of the + * Common Development and Distribution License, Version 1.0 only + * (the "License"). You may not use this file except in compliance + * with the License. + * + * See the file CDDL.Schily.txt in this distribution for details. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file CDDL.Schily.txt from this distribution. + */ + +#include +#include +#include + +#ifndef HAVE_STRCASECMP + +EXPORT int strcasecmp __PR((const char *s1, const char *s2)); + +EXPORT int +strcasecmp(s1, s2) + register const char *s1; + register const char *s2; +{ +extern const char js_strcase_charmap[]; + register const char *chm = js_strcase_charmap; + + if (s1 == s2) + return (0); + + while (chm[* (const unsigned char *)s1] == + chm[* (const unsigned char *)s2++]) { + if (*s1++ == '\0') + return (0); + } + return (chm[*(unsigned char *)s1] - chm[*(unsigned char *)(--s2)]); +} + +#endif diff -Nru cdrtools-2.01.01a33/libschily/strcasemap.c cdrtools-3.02a09/libschily/strcasemap.c --- cdrtools-2.01.01a33/libschily/strcasemap.c 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/libschily/strcasemap.c 2011-11-24 21:03:11.000000000 +0000 @@ -0,0 +1,61 @@ +/* @(#)strcasemap.c 1.1 11/11/24 Copyright 2011 J. Schilling */ +/* + * Character map for strcasecmp()/strncasecmp() + * + * This only maps 7-Bit ASCII upper case chars to lower case chars. + * + * Copyright (c) 2011 J. Schilling + */ +/* + * The contents of this file are subject to the terms of the + * Common Development and Distribution License, Version 1.0 only + * (the "License"). You may not use this file except in compliance + * with the License. + * + * See the file CDDL.Schily.txt in this distribution for details. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file CDDL.Schily.txt from this distribution. + */ + +#include +#include + +#if !defined(HAVE_STRCASECMP) || !defined(HAVE_STRNCASECMP) + +const char js_strcase_charmap[] = { + '\000', '\001', '\002', '\003', '\004', '\005', '\006', '\007', + '\010', '\011', '\012', '\013', '\014', '\015', '\016', '\017', + '\020', '\021', '\022', '\023', '\024', '\025', '\026', '\027', + '\030', '\031', '\032', '\033', '\034', '\035', '\036', '\037', + '\040', '\041', '\042', '\043', '\044', '\045', '\046', '\047', + '\050', '\051', '\052', '\053', '\054', '\055', '\056', '\057', + '\060', '\061', '\062', '\063', '\064', '\065', '\066', '\067', + '\070', '\071', '\072', '\073', '\074', '\075', '\076', '\077', + '\100', '\141', '\142', '\143', '\144', '\145', '\146', '\147', + '\150', '\151', '\152', '\153', '\154', '\155', '\156', '\157', + '\160', '\161', '\162', '\163', '\164', '\165', '\166', '\167', + '\170', '\171', '\172', '\133', '\134', '\135', '\136', '\137', + '\140', '\141', '\142', '\143', '\144', '\145', '\146', '\147', + '\150', '\151', '\152', '\153', '\154', '\155', '\156', '\157', + '\160', '\161', '\162', '\163', '\164', '\165', '\166', '\167', + '\170', '\171', '\172', '\173', '\174', '\175', '\176', '\177', + '\200', '\201', '\202', '\203', '\204', '\205', '\206', '\207', + '\210', '\211', '\212', '\213', '\214', '\215', '\216', '\217', + '\220', '\221', '\222', '\223', '\224', '\225', '\226', '\227', + '\230', '\231', '\232', '\233', '\234', '\235', '\236', '\237', + '\240', '\241', '\242', '\243', '\244', '\245', '\246', '\247', + '\250', '\251', '\252', '\253', '\254', '\255', '\256', '\257', + '\260', '\261', '\262', '\263', '\264', '\265', '\266', '\267', + '\270', '\271', '\272', '\273', '\274', '\275', '\276', '\277', + '\300', '\301', '\302', '\303', '\304', '\305', '\306', '\307', + '\310', '\311', '\312', '\313', '\314', '\315', '\316', '\317', + '\320', '\321', '\322', '\323', '\324', '\325', '\326', '\327', + '\330', '\331', '\332', '\333', '\334', '\335', '\336', '\337', + '\340', '\341', '\342', '\343', '\344', '\345', '\346', '\347', + '\350', '\351', '\352', '\353', '\354', '\355', '\356', '\357', + '\360', '\361', '\362', '\363', '\364', '\365', '\366', '\367', + '\370', '\371', '\372', '\373', '\374', '\375', '\376', '\377', +}; + +#endif diff -Nru cdrtools-2.01.01a33/libschily/strcat.c cdrtools-3.02a09/libschily/strcat.c --- cdrtools-2.01.01a33/libschily/strcat.c 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/libschily/strcat.c 2009-07-08 21:56:15.000000000 +0000 @@ -0,0 +1,43 @@ +/* @(#)strcat.c 1.2 09/07/08 Copyright 2006-2009 J. Schilling */ +#include +#ifndef lint +static UConst char sccsid[] = + "@(#)strcat.c 1.2 09/07/08 Copyright 2006-2009 J. Schilling"; +#endif +/* + * strcat() to be used if missing in libc + * + * Copyright (c) 2006-2009 J. Schilling + */ +/* + * The contents of this file are subject to the terms of the + * Common Development and Distribution License, Version 1.0 only + * (the "License"). You may not use this file except in compliance + * with the License. + * + * See the file CDDL.Schily.txt in this distribution for details. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file CDDL.Schily.txt from this distribution. + */ + +#include +#include + +#ifndef HAVE_STRCAT + +EXPORT char * +strcat(s1, s2) + register char *s1; + register const char *s2; +{ + char *ret = s1; + + while (*s1++ != '\0') + ; + s1--; + while ((*s1++ = *s2++) != '\0') + ; + return (ret); +} +#endif /* HAVE_STRCAT */ diff -Nru cdrtools-2.01.01a33/libschily/strcatl.3 cdrtools-3.02a09/libschily/strcatl.3 --- cdrtools-2.01.01a33/libschily/strcatl.3 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/libschily/strcatl.3 1988-07-21 17:18:03.000000000 +0000 @@ -0,0 +1,37 @@ +. \" Manual Seite fuer strcatl +. \" @(#)strcatl.3 1.1 +. \" +.if t .ds a \v'-0.55m'\h'0.00n'\z.\h'0.40n'\z.\v'0.55m'\h'-0.40n'a +.if t .ds o \v'-0.55m'\h'0.00n'\z.\h'0.45n'\z.\v'0.55m'\h'-0.45n'o +.if t .ds u \v'-0.55m'\h'0.00n'\z.\h'0.40n'\z.\v'0.55m'\h'-0.40n'u +.if t .ds A \v'-0.77m'\h'0.25n'\z.\h'0.45n'\z.\v'0.77m'\h'-0.70n'A +.if t .ds O \v'-0.77m'\h'0.25n'\z.\h'0.45n'\z.\v'0.77m'\h'-0.70n'O +.if t .ds U \v'-0.77m'\h'0.30n'\z.\h'0.45n'\z.\v'0.77m'\h'-.75n'U +.if t .ds s \(*b +.if t .ds S SS +.if n .ds a ae +.if n .ds o oe +.if n .ds u ue +.if n .ds s sz +.TH STRCATL 3 "15. Juli 1988" "J\*org Schilling" "Schily\'s LIBRARY FUNCTIONS" +.SH NAME +strcatl() \- concatenates strings +.SH SYNOPSIS +.nf +.B +char *strcatl(outbuf,s1\|.\|.\|.sn,NULL) +.B char *outbuf,*s1\|.\|.\|.*sn; +.fi +.SH DESCRIPTION +strcatl() concatenates the "to" strings (s1\|.\|.\|.sn) into outbuf. +The end of the list is signalled by NULL. +.SH RETURNS +Returns a pointer to the end of the concatenated output, in +outbuf. +.SH NOTES +No check for buffer overflow is made. +.PP +A strcatl() of the form: strcatl(foo,bar,foo,NULL) does not work +correctly, although a strcatl() of the form +"strcatl(foo,foo,bar,NULL)" will. The destination string can +only be a source string if it is the first string in the list. diff -Nru cdrtools-2.01.01a33/libschily/strcatl.mk3 cdrtools-3.02a09/libschily/strcatl.mk3 --- cdrtools-2.01.01a33/libschily/strcatl.mk3 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/libschily/strcatl.mk3 2015-04-26 18:01:43.000000000 +0000 @@ -0,0 +1,18 @@ +#ident @(#)strcatl.mk3 1.1 15/04/26 +########################################################################### +# Sample makefile for installing manual pages +########################################################################### +SRCROOT= .. +RULESDIR= RULES +include $(SRCROOT)/$(RULESDIR)/rules.top +########################################################################### + +MANDIR= man +TARGETMAN= strcatl +MANSECT= $(MANSECT_LIB) +MANSUFFIX= $(MANSUFF_LIB) +MANFILE= strcatl.3 + +########################################################################### +include $(SRCROOT)/$(RULESDIR)/rules.man +########################################################################### diff -Nru cdrtools-2.01.01a33/libschily/strchr.c cdrtools-3.02a09/libschily/strchr.c --- cdrtools-2.01.01a33/libschily/strchr.c 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/libschily/strchr.c 2009-06-07 12:07:51.000000000 +0000 @@ -0,0 +1,36 @@ +/* @(#)strchr.c 1.3 09/06/07 Copyright 1985,2009 J. Schilling */ +/* + * strchr() to be used if missing in libc + * + * Copyright (c) 1985,2009 J. Schilling + */ +/* + * The contents of this file are subject to the terms of the + * Common Development and Distribution License, Version 1.0 only + * (the "License"). You may not use this file except in compliance + * with the License. + * + * See the file CDDL.Schily.txt in this distribution for details. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file CDDL.Schily.txt from this distribution. + */ + +#include +#include + +#ifndef HAVE_STRCHR + +EXPORT char * +strchr(s, c) + register const char *s; + register int c; +{ + do { + if (*s == (char)c) + return ((char *)s); + } while (*s++ != '\0'); + return (0); +} + +#endif diff -Nru cdrtools-2.01.01a33/libschily/strcmp.c cdrtools-3.02a09/libschily/strcmp.c --- cdrtools-2.01.01a33/libschily/strcmp.c 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/libschily/strcmp.c 2009-06-07 13:38:34.000000000 +0000 @@ -0,0 +1,39 @@ +/* @(#)strcmp.c 1.6 09/06/07 Copyright 1985,2009 J. Schilling */ +/* + * strcmp() to be used if missing in libc + * + * Copyright (c) 1985,2009 J. Schilling + */ +/* + * The contents of this file are subject to the terms of the + * Common Development and Distribution License, Version 1.0 only + * (the "License"). You may not use this file except in compliance + * with the License. + * + * See the file CDDL.Schily.txt in this distribution for details. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file CDDL.Schily.txt from this distribution. + */ + +#include +#include + +#ifndef HAVE_STRCMP + +EXPORT int +strcmp(s1, s2) + register const char *s1; + register const char *s2; +{ + if (s1 == s2) + return (0); + + while (*s1 == *s2++) { + if (*s1++ == '\0') + return (0); + } + return (*(unsigned char *)s1 - *(unsigned char *)(--s2)); +} + +#endif diff -Nru cdrtools-2.01.01a33/libschily/strcpy.c cdrtools-3.02a09/libschily/strcpy.c --- cdrtools-2.01.01a33/libschily/strcpy.c 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/libschily/strcpy.c 2009-07-08 21:56:15.000000000 +0000 @@ -0,0 +1,40 @@ +/* @(#)strcpy.c 1.2 09/07/08 Copyright 2006-2009 J. Schilling */ +#include +#ifndef lint +static UConst char sccsid[] = + "@(#)strcpy.c 1.2 09/07/08 Copyright 2006-2009 J. Schilling"; +#endif +/* + * strcpy() to be used if missing in libc + * + * Copyright (c) 2006-2009 J. Schilling + */ +/* + * The contents of this file are subject to the terms of the + * Common Development and Distribution License, Version 1.0 only + * (the "License"). You may not use this file except in compliance + * with the License. + * + * See the file CDDL.Schily.txt in this distribution for details. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file CDDL.Schily.txt from this distribution. + */ + +#include +#include + +#ifndef HAVE_STRCPY + +EXPORT char * +strcpy(s1, s2) + register char *s1; + register const char *s2; +{ + char *ret = s1; + + while ((*s1++ = *s2++) != '\0') + ; + return (ret); +} +#endif /* HAVE_STRCPY */ diff -Nru cdrtools-2.01.01a33/libschily/strcspn.c cdrtools-3.02a09/libschily/strcspn.c --- cdrtools-2.01.01a33/libschily/strcspn.c 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/libschily/strcspn.c 2014-01-06 22:56:14.000000000 +0000 @@ -0,0 +1,47 @@ +/* @(#)strcspn.c 1.1 14/01/06 Copyright 2014 J. Schilling */ +/* + * find maximum number of chars in s1 that consists solely of chars + * NOT in s2 + * + * Copyright (c) 2014 J. Schilling + */ +/* + * The contents of this file are subject to the terms of the + * Common Development and Distribution License, Version 1.0 only + * (the "License"). You may not use this file except in compliance + * with the License. + * + * See the file CDDL.Schily.txt in this distribution for details. + * A copy of the CDDL is also available via the Internet at + * http://www.opensource.org/licenses/cddl1.txt + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file CDDL.Schily.txt from this distribution. + */ +#include +#include +#include + +#ifndef HAVE_STRCSPN + +EXPORT size_t +strcspn(s1, s2) + register const char *s1; /* The string to search */ + const char *s2; /* The charset used to search */ +{ + register const char *a; + register const char *b; + + if (*s2 == '\0') + return (strlen(s1)); + + for (a = s1; *a != '\0'; a++) { + for (b = s2; *b != '\0' && *a != *b; b++) + ; + if (*b != '\0') + break; + } + return (a - s1); +} + +#endif diff -Nru cdrtools-2.01.01a33/libschily/strdup.c cdrtools-3.02a09/libschily/strdup.c --- cdrtools-2.01.01a33/libschily/strdup.c 2006-09-13 15:05:35.000000000 +0000 +++ cdrtools-3.02a09/libschily/strdup.c 2010-08-21 11:39:07.000000000 +0000 @@ -1,12 +1,13 @@ -/* @(#)strdup.c 1.2 06/09/13 Copyright 2003 J. Schilling */ +/* @(#)strdup.c 1.6 10/08/21 Copyright 2003-2010 J. Schilling */ +#include #ifndef lint -static char sccsid[] = - "@(#)strdup.c 1.2 06/09/13 Copyright 2003 J. Schilling"; +static UConst char sccsid[] = + "@(#)strdup.c 1.6 10/08/21 Copyright 2003-2010 J. Schilling"; #endif /* - * strdup() to be used if missing on libc + * strdup() to be used if missing in libc * - * Copyright (c) 2003 J. Schilling + * Copyright (c) 2003-2010 J. Schilling */ /* * The contents of this file are subject to the terms of the @@ -20,10 +21,10 @@ * file and include the License file CDDL.Schily.txt from this distribution. */ -#include #include #include #include +#include #include #include @@ -39,7 +40,7 @@ if (res == NULL) return (NULL); if (i > 16) { - movebytes(s, res, (int) i); + movebytes(s, res, (int)i); } else { char *s2 = res; diff -Nru cdrtools-2.01.01a33/libschily/streql.3 cdrtools-3.02a09/libschily/streql.3 --- cdrtools-2.01.01a33/libschily/streql.3 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/libschily/streql.3 1988-07-21 17:19:25.000000000 +0000 @@ -0,0 +1,32 @@ +. \" Manual Seite fuer streql +. \" @(#)streql.3 1.1 +. \" +.if t .ds a \v'-0.55m'\h'0.00n'\z.\h'0.40n'\z.\v'0.55m'\h'-0.40n'a +.if t .ds o \v'-0.55m'\h'0.00n'\z.\h'0.45n'\z.\v'0.55m'\h'-0.45n'o +.if t .ds u \v'-0.55m'\h'0.00n'\z.\h'0.40n'\z.\v'0.55m'\h'-0.40n'u +.if t .ds A \v'-0.77m'\h'0.25n'\z.\h'0.45n'\z.\v'0.77m'\h'-0.70n'A +.if t .ds O \v'-0.77m'\h'0.25n'\z.\h'0.45n'\z.\v'0.77m'\h'-0.70n'O +.if t .ds U \v'-0.77m'\h'0.30n'\z.\h'0.45n'\z.\v'0.77m'\h'-.75n'U +.if t .ds s \(*b +.if t .ds S SS +.if n .ds a ae +.if n .ds o oe +.if n .ds u ue +.if n .ds s sz +.TH STREQL 3 "15. Juli 1988" "J\*org Schilling" "Schily\'s LIBRARY FUNCTIONS" +.SH NAME +streql() \- compares two strings for equality +.SH SYNOPSIS +.nf +.B +BOOL streql(s1,s2) +.B char *s1, *s2; +.fi +.SH DESCRIPTION +streql() checks two strings for equality. +.SH RETURNS +Returns TRUE if the string s1 is the same length and has the +same characters as s2. Otherwise, returns FALSE. +.SH NOTES +When comparing two strings, the strings are not considered equal +if one has padding (extra spaces). diff -Nru cdrtools-2.01.01a33/libschily/streql.c cdrtools-3.02a09/libschily/streql.c --- cdrtools-2.01.01a33/libschily/streql.c 2006-09-13 15:05:35.000000000 +0000 +++ cdrtools-3.02a09/libschily/streql.c 2009-06-07 13:41:57.000000000 +0000 @@ -1,8 +1,8 @@ -/* @(#)streql.c 1.8 06/09/13 Copyright 1985, 1995-2003 J. Schilling */ +/* @(#)streql.c 1.10 09/06/07 Copyright 1985, 1995-2009 J. Schilling */ /* * Check if two strings are equal * - * Copyright (c) 1985, 1995-2003 J. Schilling + * Copyright (c) 1985, 1995-2009 J. Schilling */ /* * The contents of this file are subject to the terms of the @@ -30,6 +30,9 @@ if (s1 == NULL || s2 == NULL) return (FALSE); + if (s1 == s2) + return (TRUE); + while (*s1 == *s2++) if (*s1++ == '\0') return (TRUE); diff -Nru cdrtools-2.01.01a33/libschily/streql.mk3 cdrtools-3.02a09/libschily/streql.mk3 --- cdrtools-2.01.01a33/libschily/streql.mk3 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/libschily/streql.mk3 2015-04-26 18:01:43.000000000 +0000 @@ -0,0 +1,18 @@ +#ident @(#)streql.mk3 1.1 15/04/26 +########################################################################### +# Sample makefile for installing manual pages +########################################################################### +SRCROOT= .. +RULESDIR= RULES +include $(SRCROOT)/$(RULESDIR)/rules.top +########################################################################### + +MANDIR= man +TARGETMAN= streql +MANSECT= $(MANSECT_LIB) +MANSUFFIX= $(MANSUFF_LIB) +MANFILE= streql.3 + +########################################################################### +include $(SRCROOT)/$(RULESDIR)/rules.man +########################################################################### diff -Nru cdrtools-2.01.01a33/libschily/strlcat.c cdrtools-3.02a09/libschily/strlcat.c --- cdrtools-2.01.01a33/libschily/strlcat.c 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/libschily/strlcat.c 2010-04-26 13:59:59.000000000 +0000 @@ -0,0 +1,59 @@ +/* @(#)strlcat.c 1.1 10/04/26 Copyright 2010 J. Schilling */ +#include +#ifndef lint +static UConst char sccsid[] = + "@(#)strlcat.c 1.1 10/04/26 Copyright 2010 J. Schilling"; +#endif +/* + * strlcat() to be used if missing in libc + * + * Copyright (c) 2010 J. Schilling + */ +/* + * The contents of this file are subject to the terms of the + * Common Development and Distribution License, Version 1.0 only + * (the "License"). You may not use this file except in compliance + * with the License. + * + * See the file CDDL.Schily.txt in this distribution for details. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file CDDL.Schily.txt from this distribution. + */ + +#include +#include +#include +#include + +#ifndef HAVE_STRLCAT + +EXPORT size_t +strlcat(s1, s2, len) + register char *s1; + register const char *s2; + register size_t len; +{ + const char *os1 = s1; + size_t olen = len; + + if (len > 0) { + while (--len > 0 && *s1++ != '\0') + ; + + if (len == 0) + return (olen + strlen(s2)); + + s1--; + len++; + while (--len > 0 && (*s1++ = *s2++) != '\0') + ; + if (len == 0) { + *s1 = '\0'; + return (s1 - os1 + strlen(s2)); + } + return (--s1 - os1); + } + return (strlen(s2)); +} +#endif /* HAVE_STRLCAT */ diff -Nru cdrtools-2.01.01a33/libschily/strlcatl.c cdrtools-3.02a09/libschily/strlcatl.c --- cdrtools-2.01.01a33/libschily/strlcatl.c 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/libschily/strlcatl.c 2015-03-03 20:15:39.000000000 +0000 @@ -0,0 +1,84 @@ +/* @(#)strlcatl.c 1.1 15/03/03 Copyright 2015 J. Schilling */ +/* + * list version of strlcat() + * + * concatenates all past first parameter until a NULL pointer is reached + * + * WARNING: a NULL constant is not a NULL pointer, so a caller must + * cast a NULL constant to a pointer: (char *)NULL + * + * returns number of bytes needed to fit all + * + * Copyright (c) 2015 J. Schilling + */ +/* + * The contents of this file are subject to the terms of the + * Common Development and Distribution License, Version 1.0 only + * (the "License"). You may not use this file except in compliance + * with the License. + * + * See the file CDDL.Schily.txt in this distribution for details. + * A copy of the CDDL is also available via the Internet at + * http://www.opensource.org/licenses/cddl1.txt + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file CDDL.Schily.txt from this distribution. + */ + +#include +#include +#include +#include +#include + +/* VARARGS3 */ +#ifdef PROTOTYPES +EXPORT size_t +strlcatl(char *to, size_t len, ...) +#else +EXPORT size_t +strlcatl(to, len, va_alist) + char *to; + size_t len; + va_dcl +#endif +{ + va_list args; + register char *p; + register char *tor = to; + size_t olen = len; + +#ifdef PROTOTYPES + va_start(args, len); +#else + va_start(args); +#endif + if (len > 0) { + while (--len > 0 && *tor++ != '\0') + ; + + if (len == 0) + goto toolong; + + while ((p = va_arg(args, char *)) != NULL) { + tor--; + len++; + while (--len > 0 && (*tor++ = *p++) != '\0') + ; + if (len == 0) { + *tor = '\0'; + olen = tor - to + strlen(p); + goto toolong; + } + } + olen = --tor - to; + } + va_end(args); + return (olen); +toolong: + while ((p = va_arg(args, char *)) != NULL) { + olen += strlen(p); + } + va_end(args); + return (olen); +} diff -Nru cdrtools-2.01.01a33/libschily/strlcpy.c cdrtools-3.02a09/libschily/strlcpy.c --- cdrtools-2.01.01a33/libschily/strlcpy.c 2006-10-12 13:05:29.000000000 +0000 +++ cdrtools-3.02a09/libschily/strlcpy.c 2009-07-08 21:56:15.000000000 +0000 @@ -1,12 +1,13 @@ -/* @(#)strlcpy.c 1.2 06/09/13 Copyright 2006 J. Schilling */ +/* @(#)strlcpy.c 1.4 09/07/08 Copyright 2006-2009 J. Schilling */ +#include #ifndef lint -static char sccsid[] = - "@(#)strlcpy.c 1.2 06/09/13 Copyright 2006 J. Schilling"; +static UConst char sccsid[] = + "@(#)strlcpy.c 1.4 09/07/08 Copyright 2006-2009 J. Schilling"; #endif /* - * strlcpy() to be used if missing on libc + * strlcpy() to be used if missing in libc * - * Copyright (c) 2006 J. Schilling + * Copyright (c) 2006-2009 J. Schilling */ /* * The contents of this file are subject to the terms of the @@ -20,7 +21,6 @@ * file and include the License file CDDL.Schily.txt from this distribution. */ -#include #include #include #include diff -Nru cdrtools-2.01.01a33/libschily/strlen.3 cdrtools-3.02a09/libschily/strlen.3 --- cdrtools-2.01.01a33/libschily/strlen.3 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/libschily/strlen.3 1988-07-21 17:19:58.000000000 +0000 @@ -0,0 +1,31 @@ +. \" Manual Seite fuer strlen +. \" @(#)strlen.3 1.1 +. \" +.if t .ds a \v'-0.55m'\h'0.00n'\z.\h'0.40n'\z.\v'0.55m'\h'-0.40n'a +.if t .ds o \v'-0.55m'\h'0.00n'\z.\h'0.45n'\z.\v'0.55m'\h'-0.45n'o +.if t .ds u \v'-0.55m'\h'0.00n'\z.\h'0.40n'\z.\v'0.55m'\h'-0.40n'u +.if t .ds A \v'-0.77m'\h'0.25n'\z.\h'0.45n'\z.\v'0.77m'\h'-0.70n'A +.if t .ds O \v'-0.77m'\h'0.25n'\z.\h'0.45n'\z.\v'0.77m'\h'-0.70n'O +.if t .ds U \v'-0.77m'\h'0.30n'\z.\h'0.45n'\z.\v'0.77m'\h'-.75n'U +.if t .ds s \(*b +.if t .ds S SS +.if n .ds a ae +.if n .ds o oe +.if n .ds u ue +.if n .ds s sz +.TH STRLEN 3 "15. Juli 1988" "J\*org Schilling" "Schily\'s LIBRARY FUNCTIONS" +.SH NAME +strlen() \- returns string length +.SH SYNOPSIS +.nf +.B +int strlen(string) +.B char *string; +.fi +.SH DESCRIPTION +strlen() returns the length of string in characters. The +trailing '\\0' byte is NOT counted. +.SH RETURNS +Returns length of string. +.SH NOTES +For allocating space, remember to add one for the NULL. diff -Nru cdrtools-2.01.01a33/libschily/strlen.c cdrtools-3.02a09/libschily/strlen.c --- cdrtools-2.01.01a33/libschily/strlen.c 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/libschily/strlen.c 2009-06-06 11:38:50.000000000 +0000 @@ -0,0 +1,36 @@ +/* @(#)strlen.c 1.3 09/06/06 Copyright 1985,2009 J. Schilling */ +/* + * strlen() to be used if missing in libc + * + * Copyright (c) 1985,2009 J. Schilling + */ +/* + * The contents of this file are subject to the terms of the + * Common Development and Distribution License, Version 1.0 only + * (the "License"). You may not use this file except in compliance + * with the License. + * + * See the file CDDL.Schily.txt in this distribution for details. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file CDDL.Schily.txt from this distribution. + */ + +#include +#include +#include + +#ifndef HAVE_STRLEN + +EXPORT size_t +strlen(s) + register const char *s; +{ + register const char *rs = s; + + while (*rs++ != '\0') + ; + return (--rs - s); +} + +#endif diff -Nru cdrtools-2.01.01a33/libschily/strlen.mk3 cdrtools-3.02a09/libschily/strlen.mk3 --- cdrtools-2.01.01a33/libschily/strlen.mk3 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/libschily/strlen.mk3 2015-04-26 18:01:43.000000000 +0000 @@ -0,0 +1,18 @@ +#ident @(#)strlen.mk3 1.1 15/04/26 +########################################################################### +# Sample makefile for installing manual pages +########################################################################### +SRCROOT= .. +RULESDIR= RULES +include $(SRCROOT)/$(RULESDIR)/rules.top +########################################################################### + +MANDIR= man +TARGETMAN= strlen +MANSECT= $(MANSECT_LIB) +MANSUFFIX= $(MANSUFF_LIB) +MANFILE= strlen.3 + +########################################################################### +include $(SRCROOT)/$(RULESDIR)/rules.man +########################################################################### diff -Nru cdrtools-2.01.01a33/libschily/strncasecmp.c cdrtools-3.02a09/libschily/strncasecmp.c --- cdrtools-2.01.01a33/libschily/strncasecmp.c 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/libschily/strncasecmp.c 2011-11-24 21:03:11.000000000 +0000 @@ -0,0 +1,57 @@ +/* @(#)strncasecmp.c 1.1 11/11/24 Copyright 2011 J. Schilling */ +/* + * strcasecmp() to be used if missing in libc + * + * Copyright (c) 2011 J. Schilling + */ +/* + * The contents of this file are subject to the terms of the + * Common Development and Distribution License, Version 1.0 only + * (the "License"). You may not use this file except in compliance + * with the License. + * + * See the file CDDL.Schily.txt in this distribution for details. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file CDDL.Schily.txt from this distribution. + */ + +#include +#include +#include /* For strncasecmp size_t */ +#include + +#ifndef HAVE_STRNCASECMP + +EXPORT int strncasecmp __PR((const char *s1, const char *s2, + size_t len)); + +EXPORT int +strncasecmp(s1, s2, len) + register const char *s1; + register const char *s2; + register size_t len; +{ +extern const char js_strcase_charmap[]; + register const char *chm = js_strcase_charmap; + + if (s1 == s2) + return (0); + + if (len == 0) + return (0); + + do { + if (chm[* (const unsigned char *)s1] == + chm[* (const unsigned char *)s2++]) { + if (*s1++ == '\0') + return (0); + } else { + break; + } + } while (--len > 0); + + return (len == 0 ? 0 : chm[*(unsigned char *)s1] - + chm[*(unsigned char *)(--s2)]); +} +#endif diff -Nru cdrtools-2.01.01a33/libschily/strncat.c cdrtools-3.02a09/libschily/strncat.c --- cdrtools-2.01.01a33/libschily/strncat.c 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/libschily/strncat.c 2010-05-06 21:59:24.000000000 +0000 @@ -0,0 +1,51 @@ +/* @(#)strncat.c 1.3 10/05/06 Copyright 2006-2010 J. Schilling */ +#include +#ifndef lint +static UConst char sccsid[] = + "@(#)strncat.c 1.3 10/05/06 Copyright 2006-2010 J. Schilling"; +#endif +/* + * strncat() to be used if missing in libc + * + * Copyright (c) 2006-2010 J. Schilling + */ +/* + * The contents of this file are subject to the terms of the + * Common Development and Distribution License, Version 1.0 only + * (the "License"). You may not use this file except in compliance + * with the License. + * + * See the file CDDL.Schily.txt in this distribution for details. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file CDDL.Schily.txt from this distribution. + */ + +#include +#include +#include + +#ifndef HAVE_STRNCAT + +EXPORT char * +strncat(s1, s2, len) + register char *s1; + register const char *s2; + register size_t len; +{ + char *ret = s1; + + if (len == 0) + return (ret); + + while (*s1++ != '\0') + ; + s1--; + do { + if ((*s1++ = *s2++) == '\0') + return (ret); + } while (--len > 0); + *s1 = '\0'; + return (ret); +} +#endif /* HAVE_STRNCAT */ diff -Nru cdrtools-2.01.01a33/libschily/strncmp.c cdrtools-3.02a09/libschily/strncmp.c --- cdrtools-2.01.01a33/libschily/strncmp.c 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/libschily/strncmp.c 2010-05-06 21:57:43.000000000 +0000 @@ -0,0 +1,53 @@ +/* @(#)strncmp.c 1.4 10/05/06 Copyright 2006-2010 J. Schilling */ +#include +#ifndef lint +static UConst char sccsid[] = + "@(#)strncmp.c 1.4 10/05/06 Copyright 2006-2010 J. Schilling"; +#endif +/* + * strncmp() to be used if missing in libc + * + * Copyright (c) 2006-2010 J. Schilling + */ +/* + * The contents of this file are subject to the terms of the + * Common Development and Distribution License, Version 1.0 only + * (the "License"). You may not use this file except in compliance + * with the License. + * + * See the file CDDL.Schily.txt in this distribution for details. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file CDDL.Schily.txt from this distribution. + */ + +#include +#include +#include + +#ifndef HAVE_STRNCMP + +EXPORT int +strncmp(s1, s2, len) + register const char *s1; + register const char *s2; + register size_t len; +{ + if (s1 == s2) + return (0); + + if (len == 0) + return (0); + + do { + if (*s1 == *s2++) { + if (*s1++ == '\0') + return (0); + } else { + break; + } + } while (--len > 0); + + return (len == 0 ? 0 : *(unsigned char *)s1 - *(unsigned char *)(--s2)); +} +#endif /* HAVE_STRNCMP */ diff -Nru cdrtools-2.01.01a33/libschily/strncpy.c cdrtools-3.02a09/libschily/strncpy.c --- cdrtools-2.01.01a33/libschily/strncpy.c 2006-09-13 15:05:35.000000000 +0000 +++ cdrtools-3.02a09/libschily/strncpy.c 2010-05-06 22:00:41.000000000 +0000 @@ -1,12 +1,13 @@ -/* @(#)strncpy.c 1.2 06/09/13 Copyright 2006 J. Schilling */ +/* @(#)strncpy.c 1.5 10/05/07 Copyright 2006-2010 J. Schilling */ +#include #ifndef lint -static char sccsid[] = - "@(#)strncpy.c 1.2 06/09/13 Copyright 2006 J. Schilling"; +static UConst char sccsid[] = + "@(#)strncpy.c 1.5 10/05/07 Copyright 2006-2010 J. Schilling"; #endif /* - * strncpy() to be used if missing on libc + * strncpy() to be used if missing in libc * - * Copyright (c) 2006 J. Schilling + * Copyright (c) 2006-2010 J. Schilling */ /* * The contents of this file are subject to the terms of the @@ -20,7 +21,6 @@ * file and include the License file CDDL.Schily.txt from this distribution. */ -#include #include #include #include @@ -35,15 +35,13 @@ { char *ret = s1; - if (++len == 0) { /* unsigned overflow */ - --len; - while (len-- > 0 && (*s1++ = *s2++) != '\0') - ; - len++; - } else { - while (--len > 0 && (*s1++ = *s2++) != '\0') - ; - } + if (len == 0) + return (ret); + + do { + if ((*s1++ = *s2++) == '\0') + break; + } while (--len > 0); if (len > 0) { while (--len > 0) *s1++ = '\0'; diff -Nru cdrtools-2.01.01a33/libschily/strndup.c cdrtools-3.02a09/libschily/strndup.c --- cdrtools-2.01.01a33/libschily/strndup.c 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/libschily/strndup.c 2010-05-06 11:37:54.000000000 +0000 @@ -0,0 +1,56 @@ +/* @(#)strndup.c 1.1 10/05/06 Copyright 2003-2010 J. Schilling */ +#include +#ifndef lint +static UConst char sccsid[] = + "@(#)strndup.c 1.1 10/05/06 Copyright 2003-2010 J. Schilling"; +#endif +/* + * strndup() to be used if missing in libc + * + * Copyright (c) 2003-2010 J. Schilling + */ +/* + * The contents of this file are subject to the terms of the + * Common Development and Distribution License, Version 1.0 only + * (the "License"). You may not use this file except in compliance + * with the License. + * + * See the file CDDL.Schily.txt in this distribution for details. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file CDDL.Schily.txt from this distribution. + */ + +#include +#include +#include +#include +#include +#include + +#ifndef HAVE_STRNDUP + +EXPORT char * +strndup(s, len) + const char *s; + size_t len; +{ + size_t i = strnlen(s, len) + 1; + char *res = malloc(i); + + if (res == NULL) + return (NULL); + if (i > 16) { + movebytes(s, res, --i); + res[i] = '\0'; + } else { + char *s2 = res; + + while (--i > 0 && (*s2++ = *s++) != '\0') + ; + if (i == 0) + *s2 = '\0'; + } + return (res); +} +#endif /* HAVE_STRDUP */ diff -Nru cdrtools-2.01.01a33/libschily/strnlen.c cdrtools-3.02a09/libschily/strnlen.c --- cdrtools-2.01.01a33/libschily/strnlen.c 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/libschily/strnlen.c 2010-05-06 22:00:06.000000000 +0000 @@ -0,0 +1,42 @@ +/* @(#)strnlen.c 1.3 10/05/07 Copyright 2010 J. Schilling */ +/* + * strnlen() to be used if missing in libc + * + * Copyright (c) 2010 J. Schilling + */ +/* + * The contents of this file are subject to the terms of the + * Common Development and Distribution License, Version 1.0 only + * (the "License"). You may not use this file except in compliance + * with the License. + * + * See the file CDDL.Schily.txt in this distribution for details. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file CDDL.Schily.txt from this distribution. + */ + +#include +#include +#include + +#ifndef HAVE_STRNLEN + +EXPORT size_t +strnlen(s, len) + register const char *s; + register size_t len; +{ + register const char *rs = s; + + if (len == 0) + return (0); + + while (*rs++ != '\0' && --len > 0) + ; + if (len == 0) + return (rs - s); + return (--rs - s); +} + +#endif diff -Nru cdrtools-2.01.01a33/libschily/strrchr.c cdrtools-3.02a09/libschily/strrchr.c --- cdrtools-2.01.01a33/libschily/strrchr.c 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/libschily/strrchr.c 2009-06-07 11:58:26.000000000 +0000 @@ -0,0 +1,38 @@ +/* @(#)strrchr.c 1.2 09/06/07 Copyright 1985,2009 J. Schilling */ +/* + * strrchr() to be used if missing in libc + * + * Copyright (c) 1985,2009 J. Schilling + */ +/* + * The contents of this file are subject to the terms of the + * Common Development and Distribution License, Version 1.0 only + * (the "License"). You may not use this file except in compliance + * with the License. + * + * See the file CDDL.Schily.txt in this distribution for details. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file CDDL.Schily.txt from this distribution. + */ + +#include +#include + +#ifndef HAVE_STRRCHR + +EXPORT char * +strrchr(s, c) + register const char *s; + register int c; +{ + register char *p = NULL; + + do { + if (*s == (char)c) + p = (char *)s; + } while (*s++ != '\0'); + return (p); +} + +#endif diff -Nru cdrtools-2.01.01a33/libschily/strspn.c cdrtools-3.02a09/libschily/strspn.c --- cdrtools-2.01.01a33/libschily/strspn.c 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/libschily/strspn.c 2014-01-06 22:56:14.000000000 +0000 @@ -0,0 +1,47 @@ +/* @(#)strspn.c 1.1 14/01/06 Copyright 2014 J. Schilling */ +/* + * find maximum number of chars in s1 that consists solely of chars + * from s2 + * + * Copyright (c) 2014 J. Schilling + */ +/* + * The contents of this file are subject to the terms of the + * Common Development and Distribution License, Version 1.0 only + * (the "License"). You may not use this file except in compliance + * with the License. + * + * See the file CDDL.Schily.txt in this distribution for details. + * A copy of the CDDL is also available via the Internet at + * http://www.opensource.org/licenses/cddl1.txt + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file CDDL.Schily.txt from this distribution. + */ +#include +#include +#include + +#ifndef HAVE_STRSPN + +EXPORT size_t +strspn(s1, s2) + register const char *s1; /* The string to search */ + const char *s2; /* The charset used to search */ +{ + register const char *a; + register const char *b; + + if (*s2 == '\0') + return (0); + + for (a = s1; *a != '\0'; a++) { + for (b = s2; *b != '\0' && *a != *b; b++) + ; + if (*b == '\0') + break; + } + return (a - s1); +} + +#endif diff -Nru cdrtools-2.01.01a33/libschily/strstr.c cdrtools-3.02a09/libschily/strstr.c --- cdrtools-2.01.01a33/libschily/strstr.c 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/libschily/strstr.c 2013-11-11 20:34:48.000000000 +0000 @@ -0,0 +1,49 @@ +/* @(#)strstr.c 1.3 13/11/11 Copyright 1985-2013 J. Schilling */ +/* + * find string s2 in string s1 + * return NULL if s2 is not found + * otherwise return pointer of first occurrence of s2 in s1 + * + * Copyright (c) 1985-2013 J. Schilling + */ +/* + * The contents of this file are subject to the terms of the + * Common Development and Distribution License, Version 1.0 only + * (the "License"). You may not use this file except in compliance + * with the License. + * + * See the file CDDL.Schily.txt in this distribution for details. + * A copy of the CDDL is also available via the Internet at + * http://www.opensource.org/licenses/cddl1.txt + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file CDDL.Schily.txt from this distribution. + */ +#include +#include + +#ifndef HAVE_STRSTR + +EXPORT char * +strstr(s1, s2) + register const char *s1; + const char *s2; +{ + register const char *a; + register const char *b; + + if (*s2 == '\0') + return ((char *)s1); + + for (; *s1 != '\0'; s1++) { + for (a = s2, b = s1; *a == *b++; ) { + if (*a++ == '\0') + return ((char *)s1); + } + if (*a == '\0') + return ((char *)s1); + } + return ((char *)NULL); +} + +#endif diff -Nru cdrtools-2.01.01a33/libschily/strtod.c cdrtools-3.02a09/libschily/strtod.c --- cdrtools-2.01.01a33/libschily/strtod.c 2006-09-26 11:29:58.000000000 +0000 +++ cdrtools-3.02a09/libschily/strtod.c 2010-08-20 22:11:59.000000000 +0000 @@ -1,6 +1,11 @@ -/* @(#)strtod.c 1.3 06/09/26 joerg */ +/* @(#)strtod.c 1.5 10/08/21 joerg */ /* $NetBSD: strtod.c,v 1.23 1996/10/13 00:07:55 christos Exp $ */ +/* + * The layout for this file was done by AT&T, we did not change it. + * Switch off cstyle(1) checks for now. + */ +/* BEGIN CSTYLED */ /**************************************************************** * @@ -146,7 +151,7 @@ #define ULong UInt32_t #ifdef DEBUG -#include "stdio.h" +#include #define Bug(x) {fprintf(stderr, "%s\n", x); exit(1);} #endif @@ -174,7 +179,7 @@ #define MALLOC malloc #endif -#include "ctype.h" +#include #include #ifdef Bad_float_h @@ -216,12 +221,13 @@ #ifndef LONG_MAX #define LONG_MAX 2147483647 #endif -#else -#include "float.h" -#endif -#ifndef __MATH_H__ -#include "math.h" -#endif + +#else /* Bad_float_h */ +#include +#endif /* Bad_float_h */ +/*#ifndef __MATH_H__*/ +#include +/*#endif*/ #ifdef __cplusplus extern "C" { diff -Nru cdrtools-2.01.01a33/libschily/swabbytes.c cdrtools-3.02a09/libschily/swabbytes.c --- cdrtools-2.01.01a33/libschily/swabbytes.c 2006-09-13 15:05:35.000000000 +0000 +++ cdrtools-3.02a09/libschily/swabbytes.c 2010-08-21 10:07:06.000000000 +0000 @@ -1,8 +1,8 @@ -/* @(#)swabbytes.c 1.7 06/09/13 Copyright 1988, 1995-2003 J. Schilling */ +/* @(#)swabbytes.c 1.10 10/08/21 Copyright 1988, 1995-2010 J. Schilling */ /* * swab bytes in memory * - * Copyright (c) 1988, 1995-2003 J. Schilling + * Copyright (c) 1988, 1995-2010 J. Schilling */ /* * The contents of this file are subject to the terms of the @@ -17,6 +17,7 @@ */ #include +#include #include #define DO8(a) a; a; a; a; a; a; a; a; @@ -24,13 +25,14 @@ EXPORT void swabbytes(vp, cnt) void *vp; - register int cnt; + register ssize_t cnt; { register char *bp = (char *)vp; register char c; cnt /= 2; /* even count only */ while ((cnt -= 8) >= 0) { + /* CSTYLED */ DO8(c = *bp++; bp[-1] = *bp; *bp++ = c;); } cnt += 8; diff -Nru cdrtools-2.01.01a33/libschily/symlinkat.c cdrtools-3.02a09/libschily/symlinkat.c --- cdrtools-2.01.01a33/libschily/symlinkat.c 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/libschily/symlinkat.c 2013-10-30 22:54:18.000000000 +0000 @@ -0,0 +1,90 @@ +/* @(#)symlinkat.c 1.3 13/10/30 Copyright 2013 J. Schilling */ +/* + * Emulate the behavior of symlinkat(const char *content, int fd, const char *name) + * + * Note that emulation methods that do not use the /proc filesystem are + * not MT safe. In the non-MT-safe case, we do: + * + * savewd()/fchdir()/open(name)/restorewd() + * + * Errors may force us to abort the program as our caller is not expected + * to know that we do more than a simple open() here and that the + * working directory may be changed by us. + * + * Copyright (c) 2013 J. Schilling + */ +/* + * The contents of this file are subject to the terms of the + * Common Development and Distribution License, Version 1.0 only + * (the "License"). You may not use this file except in compliance + * with the License. + * + * See the file CDDL.Schily.txt in this distribution for details. + * A copy of the CDDL is also available via the Internet at + * http://www.opensource.org/licenses/cddl1.txt + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file CDDL.Schily.txt from this distribution. + */ + +#include +#include +#include +#include +#include +#include +#include +#include "at-defs.h" + +#ifndef HAVE_SYMLINKAT +#ifndef HAVE_SYMLINK +/* ARGSUSED */ +EXPORT int +symlinkat(content, fd, name) + const char *content; + int fd; + const char *name; +{ +#ifdef ENOSYS + seterrno(ENOSYS); +#else + seterrno(EINVAL); +#endif + return (-1); +} +#else + +EXPORT int rev_symlink __PR((const char *name, const char *content)); +EXPORT int rev_symlinkat __PR((int fd, const char *name, const char *content)); + +EXPORT int +rev_symlink(name, content) + const char *name; + const char *content; +{ + return (symlink(content, name)); +} + +/* CSTYLED */ +#define PROTO_DECL , const char *content +#define KR_DECL const char *content; +/* CSTYLED */ +#define KR_ARGS , content +#define FUNC_CALL(n) rev_symlink(n, content) +#define FLAG_CHECK() +#define FUNC_NAME rev_symlinkat +#define FUNC_RESULT int + +#include "at-base.c" + +EXPORT int +symlinkat(content, fd, name) + const char *content; + int fd; + const char *name; +{ + return (rev_symlinkat(fd, name, content)); +} + +#endif /* HAVE_SYMLINK */ +#endif /* HAVE_SYMLINKAT */ diff -Nru cdrtools-2.01.01a33/libschily/Targets cdrtools-3.02a09/libschily/Targets --- cdrtools-2.01.01a33/libschily/Targets 2007-07-15 21:22:27.000000000 +0000 +++ cdrtools-3.02a09/libschily/Targets 2017-08-05 17:42:56.000000000 +0000 @@ -1,45 +1,95 @@ -# @(#)Targets 1.9 07/04/03 Copyright 1995 J. Schilling +# @(#)Targets 1.56 17/08/05 Copyright 1995-2014 J. Schilling CFILES_STDIO= cvmod.c dat.c fcons.c fdown.c fdup.c \ ffileread.c ffilewrite.c \ - fgetline.c fgetstr.c file_getraise.c file_raise.c \ + fgetaline.c fgetline.c fgetstr.c file_getraise.c file_raise.c \ fileclose.c fileluopen.c fileopen.c filemopen.c \ filepos.c fileread.c filereopen.c fileseek.c filesize.c \ filestat.c filewrite.c flag.c flush.c fpipe.c \ + getdelim.c \ niread.c niwrite.c nixread.c nixwrite.c openfd.c peekc.c \ fcons64.c fdup64.c fileluopen64.c fileopen64.c filemopen64.c \ filepos64.c filereopen64.c fileseek64.c filesize64.c \ filestat64.c openfd64.c +HFILES_STDIO= schilyio.h + # # Note: getfp.c must be before getav0.c # Otherwise getfp.o would be made as dependency of avoffset # -CFILES_REST= astoi.c astoll.c astoull.c breakline.c \ - checkerr.c comerr.c fcomerr.c cmpbytes.c cmpnullbytes.c \ - error.c \ - fconv.c fexec.c fillbytes.c \ +CFILES_REST= abspath.c astoi.c astoll.c astoul.c astoull.c basename.c breakline.c \ + checkerr.c comerr.c fcomerr.c \ + chown.c \ + cmpbytes.c cmpmbytes.c cmpnullbytes.c \ + dirent.c dirname.c diropen.c \ + dlfcn.c \ + eaccess.c error.c \ + faccessat.c fchdir.c \ + fchmodat.c fchownat.c fconv.c fdopendir.c fexec.c fillbytes.c \ + findinpath.c \ findbytes.c findline.c fnmatch.c format.c \ - getargs.c getav0.c geterrno.c getfp.c \ + fprformat.c \ + fstatat.c fstream.c \ + futimens.c futimesat.c \ + getargs.c getav0.c geterrno.c getexecpath.c getfp.c \ + getgrent.c \ + getdtablesize.c \ getdomainname.c gethostid.c gethostname.c getpagesize.c \ + getlogin.c \ getnum.c getxnum.c \ gettnum.c getxtnum.c \ + getperm.c \ + getpwent.c \ + getnstimeofday.c gettimeofday.c \ + gid.c \ handlecond.c \ - jsprintf.c jssnprintf.c jssprintf.c \ - match.c matchl.c movebytes.c \ + jsdprintf.c jsprintf.c jssnprintf.c jssprintf.c \ + kill.c \ + lchmod.c linkat.c lutimens.c \ + lxchdir.c \ + match.c matchl.c matchmb.c matchmbl.c matchw.c matchwl.c \ + movebytes.c movecbytes.c \ + mkdirat.c mkdirs.c mkfifo.c mkfifoat.c mkgmtime.c mknodat.c \ + mkstemp.c \ mem.c jmem.c fjmem.c \ - raisecond.c rename.c \ - saveargs.c serrmsg.c seterrno.c setfp.c \ + openat.c \ + permtostr.c \ + procnameat.c \ + raisecond.c readlinkat.c rename.c renameat.c resolvepath.c \ + saveargs.c savewd.c \ + searchinpath.c serrmsg.c seterrno.c setfp.c \ + setnstimeofday.c \ + sleep.c \ + snprintf.c \ spawn.c \ - strcatl.c strdup.c streql.c strlcpy.c strncpy.c \ + strcasecmp.c strncasecmp.c strcasemap.c \ + strcat.c strcatl.c strchr.c strcmp.c strcpy.c strcspn.c \ + strdup.c streql.c strlen.c strlcat.c strlcatl.c strlcpy.c strncat.c strncmp.c \ + strncpy.c strndup.c strnlen.c strrchr.c strspn.c strstr.c \ swabbytes.c \ - usleep.c + symlinkat.c \ + timegm.c \ + uid.c unlinkat.c uname.c usleep.c utimens.c utimensat.c \ + wcscat.c wcscatl.c wcschr.c wcscmp.c wcscpy.c wcscspn.c \ + wcsdup.c wcseql.c wcslen.c wcslcat.c wcslcatl.c wcslcpy.c wcsncat.c wcsncmp.c \ + wcsncpy.c wcsndup.c wcsnlen.c wcsrchr.c wcsspn.c wcsstr.c \ + wctype.c \ + wdabort.c \ + zerobytes.c + +HFILES_REST= at-defs.h # # These interfaces have been moved to libschilypr in order to make # programs that use libschily compatible with all software. # # printf.c snprintf.c sprintf.c +# +# snprintf.c however is needed for portability on systems +# that do not provide snprintf() CFILES= $(CFILES_STDIO) $(CFILES_REST) + +HFILES= $(HFILES_STDIO) $(HFILES_REST) diff -Nru cdrtools-2.01.01a33/libschily/Targets.man cdrtools-3.02a09/libschily/Targets.man --- cdrtools-2.01.01a33/libschily/Targets.man 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/libschily/Targets.man 2017-02-15 21:04:51.000000000 +0000 @@ -0,0 +1,62 @@ +# @(#)Targets.man 1.3 17/02/15 Copyright 2015 J. Schilling + +MAN_MK_FILES= \ + absfpath.mk3 \ + absnpath.mk3 \ + abspath.mk3 \ + astoi.mk3 \ + astol.mk3 \ + breakline.mk3 \ + cmpbytes.mk3 \ + comerr.mk3 \ + comerrno.mk3 \ + errmsg.mk3 \ + errmsgno.mk3 \ + error.mk3 \ + fdown.mk3 \ + fdup.mk3 \ + fexecl.mk3 \ + fexecle.mk3 \ + fexecv.mk3 \ + fexecve.mk3 \ + fgetline.mk3 \ + file_raise.mk3 \ + fileclose.mk3 \ + fileluopen.mk3 \ + fileopen.mk3 \ + filepos.mk3 \ + fileread.mk3 \ + filereopen.mk3 \ + fileseek.mk3 \ + filesize.mk3 \ + filestat.mk3 \ + filewrite.mk3 \ + findline.mk3 \ + flush.mk3 \ + fnmatch.mk3 \ + format.mk3 \ + fpipe.mk3 \ + fprintf.mk3 \ + getallargs.mk3 \ + getargs.mk3 \ + geterrno.mk3 \ + getfiles.mk3 \ + getline.mk3 \ + handlecond.mk3 \ + movebytes.mk3 \ + ofindline.mk3 \ + patcompile.mk3 \ + patmatch.mk3 \ + peekc.mk3 \ + printf.mk3 \ + raisecond.mk3 \ + resolvefpath.mk3 \ + resolvepath.mk3 \ + resolvenpath.mk3 \ + spawnl.mk3 \ + spawnv.mk3 \ + sprintf.mk3 \ + strcatl.mk3 \ + streql.mk3 \ + strlen.mk3 \ + diff -Nru cdrtools-2.01.01a33/libschily/timegm.c cdrtools-3.02a09/libschily/timegm.c --- cdrtools-2.01.01a33/libschily/timegm.c 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/libschily/timegm.c 2011-06-04 14:51:00.000000000 +0000 @@ -0,0 +1,37 @@ +/* @(#)timegm.c 1.1 11/06/04 Copyright 2011 J. Schilling */ +#include +#ifndef lint +static UConst char sccsid[] = + "@(#)timegm.c 1.1 11/06/04 Copyright 2011 J. Schilling"; +#endif +/* + * timegm() is a complement to timelocal() + * + * Copyright (c) 2011 J. Schilling + */ +/* + * The contents of this file are subject to the terms of the + * Common Development and Distribution License, Version 1.0 only + * (the "License"). You may not use this file except in compliance + * with the License. + * + * See the file CDDL.Schily.txt in this distribution for details. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file CDDL.Schily.txt from this distribution. + */ + +#include +#include +#include + +EXPORT time_t timegm __PR((struct tm *tp)); + +#ifndef HAVE_TIMEGM +EXPORT time_t +timegm(tp) + struct tm *tp; +{ + return (mkgmtime(tp)); +} +#endif diff -Nru cdrtools-2.01.01a33/libschily/uid.c cdrtools-3.02a09/libschily/uid.c --- cdrtools-2.01.01a33/libschily/uid.c 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/libschily/uid.c 2011-07-11 21:45:26.000000000 +0000 @@ -0,0 +1,64 @@ +/* @(#)uid.c 1.1 11/07/11 Copyright 2011 J. Schilling */ +/* + * Dummy functions for uid handling, used e.g. on MINGW + * + * Copyright (c) 2011 J. Schilling + */ +/* + * The contents of this file are subject to the terms of the + * Common Development and Distribution License, Version 1.0 only + * (the "License"). You may not use this file except in compliance + * with the License. + * + * See the file CDDL.Schily.txt in this distribution for details. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file CDDL.Schily.txt from this distribution. + */ + +#include +#include +#include +#include + +#ifndef HAVE_GETUID + +EXPORT uid_t +getuid() +{ + return (0); +} + +#endif + +#ifndef HAVE_GETEUID + +EXPORT uid_t +geteuid() +{ + return (0); +} + +#endif + +#ifndef HAVE_SETUID + +EXPORT int +setuid(uid) + uid_t uid; +{ + return (0); +} + +#endif + +#ifndef HAVE_SETEUID + +EXPORT int +seteuid(uid) + uid_t uid; +{ + return (0); +} + +#endif diff -Nru cdrtools-2.01.01a33/libschily/uname.c cdrtools-3.02a09/libschily/uname.c --- cdrtools-2.01.01a33/libschily/uname.c 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/libschily/uname.c 2011-08-16 21:29:39.000000000 +0000 @@ -0,0 +1,226 @@ +/* @(#)uname.c 1.2 11/08/16 Copyright 2011 J. Schilling */ +#include +#ifndef lint +static UConst char sccsid[] = + "@(#)uname.c 1.2 11/08/16 Copyright 2011 J. Schilling"; +#endif +/* + * uname() replacement in case it does not exist + * + * Copyright (c) 2011 J. Schilling + */ +/* + * The contents of this file are subject to the terms of the + * Common Development and Distribution License, Version 1.0 only + * (the "License"). You may not use this file except in compliance + * with the License. + * + * See the file CDDL.Schily.txt in this distribution for details. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file CDDL.Schily.txt from this distribution. + */ + +#ifndef HAVE_UNAME + +#include +#include +#include +#include + +#if defined(__MINGW32__) || defined(_MSC_VER) +#define gethostname __winsock_gethostname +#include +#undef gethostname + +/* + * cystyle believes BOOL is a function name and does not like: + * typedef BOOL (WINAPI *LPFN_ISWOW64PROCESS) (HANDLE, PBOOL); + */ +typedef BOOL(WINAPI *LPFN_ISWOW64PROCESS) (HANDLE, PBOOL); + +LOCAL BOOL +iswow64() +{ + BOOL IsWow64 = FALSE; + LPFN_ISWOW64PROCESS IsWow64Processp; + + /* + * "IsWow64Process" is not supported on all platforms + */ + IsWow64Processp = (LPFN_ISWOW64PROCESS) + GetProcAddress(GetModuleHandle(TEXT("kernel32")), + "IsWow64Process"); + + if (IsWow64Processp) { + if (!IsWow64Processp(GetCurrentProcess(), &IsWow64)) + return (FALSE); + } + return (IsWow64 != 0); +} + +EXPORT int +uname(ubuf) + struct utsname *ubuf; +{ + SYSTEM_INFO sysinfo; + uint32_t version; + uint32_t majversion; + uint32_t minversion; + uint32_t builtnum = 0; + char dbuf[16]; + char *p; + + strlcpy(ubuf->sysname, "Win32", sizeof (ubuf->sysname)); + if (iswow64()) + strlcat(ubuf->sysname, "-WOW64", sizeof (ubuf->sysname)); + + gethostname(ubuf->nodename, sizeof (ubuf->nodename)); + ubuf->nodename[sizeof (ubuf->nodename)-1] = '\0'; + + version = GetVersion(); + majversion = version & 0xFF; + minversion = (version >> 8) & 0xFF; + if (version < 0x80000000) + builtnum = (version >> 16) & 0xFFFF; + + strlcpy(ubuf->release, "NT-0.0", sizeof (ubuf->release)); + if (sizeof (ubuf->release) > 7) { + ubuf->release[3] = majversion + '0'; + ubuf->release[5] = minversion + '0'; + } + + p = &dbuf[sizeof (dbuf)-1]; + *p = '\0'; + do { + *--p = builtnum % 10 + '0'; + builtnum /= 10; + } while (builtnum > 0); + strlcpy(ubuf->version, p, sizeof (ubuf->version)); + + /* + * cpu, pagesize, numproc, ... + * See also IsWow64Process() + */ + GetSystemInfo(&sysinfo); + + switch (sysinfo.wProcessorArchitecture) { +#ifdef PROCESSOR_ARCHITECTURE_INTEL + case PROCESSOR_ARCHITECTURE_INTEL: + switch (sysinfo.dwProcessorType) { + +#ifdef PROCESSOR_INTEL_386 + case PROCESSOR_INTEL_386: + /* FALLTHRU */ +#endif + default: + strlcpy(ubuf->machine, "i386", sizeof (ubuf->machine)); + break; +#ifdef PROCESSOR_INTEL_486 + case PROCESSOR_INTEL_486: + strlcpy(ubuf->machine, "i486", sizeof (ubuf->machine)); + break; +#endif +#ifdef PROCESSOR_INTEL_PENTIUM + case PROCESSOR_INTEL_PENTIUM: { + int level = sysinfo.wProcessorLevel; + if (level > 9) + level = 6; + strlcpy(ubuf->machine, "i586", sizeof (ubuf->machine)); + if (level > 5) + ubuf->machine[1] = level + '0'; + } + break; +#endif + } + break; +#endif +#ifdef PROCESSOR_ARCHITECTURE_MIPS + case PROCESSOR_ARCHITECTURE_MIPS: + strlcpy(ubuf->machine, "mips", sizeof (ubuf->machine)); + break; +#endif +#ifdef PROCESSOR_ARCHITECTURE_ALPHA + case PROCESSOR_ARCHITECTURE_ALPHA: + strlcpy(ubuf->machine, "alpha", sizeof (ubuf->machine)); + break; +#endif +#ifdef PROCESSOR_ARCHITECTURE_PPC + case PROCESSOR_ARCHITECTURE_PPC: + strlcpy(ubuf->machine, "PPC", sizeof (ubuf->machine)); + break; +#endif +#ifdef PROCESSOR_ARCHITECTURE_SHX + case PROCESSOR_ARCHITECTURE_SHX: + strlcpy(ubuf->machine, "shx", sizeof (ubuf->machine)); + break; +#endif +#ifdef PROCESSOR_ARCHITECTURE_ARM + case PROCESSOR_ARCHITECTURE_ARM: + strlcpy(ubuf->machine, "arm", sizeof (ubuf->machine)); + break; +#endif +#ifdef PROCESSOR_ARCHITECTURE_IA64 + case PROCESSOR_ARCHITECTURE_IA64: + strlcpy(ubuf->machine, "ia64", sizeof (ubuf->machine)); + break; +#endif +#ifdef PROCESSOR_ARCHITECTURE_ALPHA64 + case PROCESSOR_ARCHITECTURE_ALPHA64: + strlcpy(ubuf->machine, "alpha64", sizeof (ubuf->machine)); + break; +#endif +#ifdef PROCESSOR_ARCHITECTURE_MSIL + case PROCESSOR_ARCHITECTURE_MSIL: + strlcpy(ubuf->machine, "msil", sizeof (ubuf->machine)); + break; +#endif +#ifdef PROCESSOR_ARCHITECTURE_AMD64 + case PROCESSOR_ARCHITECTURE_AMD64: + strlcpy(ubuf->machine, "amd64", sizeof (ubuf->machine)); + break; +#endif +#ifdef PROCESSOR_ARCHITECTURE_IA32_ON_WIN64 + case PROCESSOR_ARCHITECTURE_IA32_ON_WIN64: + strlcpy(ubuf->machine, "ia32_win64", sizeof (ubuf->machine)); + break; +#endif + default: + strlcpy(ubuf->machine, "unknown", sizeof (ubuf->machine)); + } + return (0); +} + +#else +EXPORT int +uname(ubuf) + struct utsname *ubuf; +{ + strlcpy(ubuf->sysname, "unknown", sizeof (ubuf->sysname)); + strlcpy(ubuf->nodename, "unknown", sizeof (ubuf->nodename)); + strlcpy(ubuf->release, "unknown", sizeof (ubuf->release)); + strlcpy(ubuf->version, "unknown", sizeof (ubuf->version)); + + strlcpy(ubuf->machine, "unknown", sizeof (ubuf->machine)); +#ifdef mc68000 +#ifdef mc68020 + strlcpy(ubuf->machine, "mc68020", sizeof (ubuf->machine)); +#else + strlcpy(ubuf->machine, "mc68000", sizeof (ubuf->machine)); +#endif +#endif +#if defined(__sparc) || defined(sparc) + strlcpy(ubuf->machine, "sparc", sizeof (ubuf->machine)); +#endif +#if defined(__i386__) || defined(__i386) || defined(i386) +#if defined(__amd64__) || defined(__amd64) + strlcpy(ubuf->machine, "amd64", sizeof (ubuf->machine)); +#else + strlcpy(ubuf->machine, "i386", sizeof (ubuf->machine)); +#endif +#endif + return (0); +} +#endif + +#endif /* HAVE_UNAME */ diff -Nru cdrtools-2.01.01a33/libschily/unlinkat.c cdrtools-3.02a09/libschily/unlinkat.c --- cdrtools-2.01.01a33/libschily/unlinkat.c 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/libschily/unlinkat.c 2013-10-30 22:54:18.000000000 +0000 @@ -0,0 +1,57 @@ +/* @(#)unlinkat.c 1.2 13/10/30 Copyright 2013 J. Schilling */ +/* + * Emulate the behavior of unlinkat(int fd, const char *name, int flag) + * + * Note that emulation methods that do not use the /proc filesystem are + * not MT safe. In the non-MT-safe case, we do: + * + * savewd()/fchdir()/open(name)/restorewd() + * + * Errors may force us to abort the program as our caller is not expected + * to know that we do more than a simple open() here and that the + * working directory may be changed by us. + * + * Copyright (c) 2013 J. Schilling + */ +/* + * The contents of this file are subject to the terms of the + * Common Development and Distribution License, Version 1.0 only + * (the "License"). You may not use this file except in compliance + * with the License. + * + * See the file CDDL.Schily.txt in this distribution for details. + * A copy of the CDDL is also available via the Internet at + * http://www.opensource.org/licenses/cddl1.txt + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file CDDL.Schily.txt from this distribution. + */ + +#include +#include +#include +#include +#include +#include +#include +#include "at-defs.h" + +#ifndef HAVE_UNLINKAT + +/* CSTYLED */ +#define PROTO_DECL , int flag +#define KR_DECL int flag; +/* CSTYLED */ +#define KR_ARGS , flag +#define FUNC_CALL(n) (flag & AT_REMOVEDIR ? \ + rmdir(n) : unlink(n)) +#define FLAG_CHECK() if (flag & ~(AT_REMOVEDIR)) { \ + seterrno(EINVAL); \ + return (-1); \ + } +#define FUNC_NAME unlinkat +#define FUNC_RESULT int + +#include "at-base.c" + +#endif /* HAVE_UNLINKAT */ diff -Nru cdrtools-2.01.01a33/libschily/usleep.c cdrtools-3.02a09/libschily/usleep.c --- cdrtools-2.01.01a33/libschily/usleep.c 2006-09-13 15:05:36.000000000 +0000 +++ cdrtools-3.02a09/libschily/usleep.c 2014-03-03 22:42:42.000000000 +0000 @@ -1,10 +1,11 @@ -/* @(#)usleep.c 1.19 06/09/13 Copyright 1995-2003 J. Schilling */ +/* @(#)usleep.c 1.24 14/03/03 Copyright 1995-2014 J. Schilling */ +#include #ifndef lint -static char sccsid[] = - "@(#)usleep.c 1.19 06/09/13 Copyright 1995-2003 J. Schilling"; +static UConst char sccsid[] = + "@(#)usleep.c 1.24 14/03/03 Copyright 1995-20014 J. Schilling"; #endif /* - * Copyright (c) 1995-2003 J. Schilling + * Copyright (c) 1995-2014 J. Schilling */ /* * The contents of this file are subject to the terms of the @@ -13,12 +14,13 @@ * with the License. * * See the file CDDL.Schily.txt in this distribution for details. + * A copy of the CDDL is also available via the Internet at + * http://www.opensource.org/licenses/cddl1.txt * * When distributing Covered Code, include this CDDL HEADER in each * file and include the License file CDDL.Schily.txt from this distribution. */ -#include #define usleep __nothing_ /* prototype in unistd.h may be different */ #include #include @@ -30,9 +32,7 @@ # include # endif #endif -#ifdef HAVE_SYS_SYSTEMINFO_H -#include -#endif +#include #include #undef usleep @@ -120,6 +120,10 @@ nanosleep(&ts, 0); #endif +#if (defined(_MSC_VER) || defined(__MINGW32__)) && !defined(HAVE_USLEEP) +#define HAVE_USLEEP + Sleep(usec/1000); +#endif #if !defined(HAVE_USLEEP) #define HAVE_USLEEP diff -Nru cdrtools-2.01.01a33/libschily/utimensat.c cdrtools-3.02a09/libschily/utimensat.c --- cdrtools-2.01.01a33/libschily/utimensat.c 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/libschily/utimensat.c 2013-10-30 22:54:18.000000000 +0000 @@ -0,0 +1,59 @@ +/* @(#)utimensat.c 1.2 13/10/30 Copyright 2013 J. Schilling */ +/* + * Emulate the behavior of utimensat(int fd, const char *name, + * const struct timespec times[2], int flag) + * + * Note that emulation methods that do not use the /proc filesystem are + * not MT safe. In the non-MT-safe case, we do: + * + * savewd()/fchdir()/open(name)/restorewd() + * + * Errors may force us to abort the program as our caller is not expected + * to know that we do more than a simple open() here and that the + * working directory may be changed by us. + * + * Copyright (c) 2013 J. Schilling + */ +/* + * The contents of this file are subject to the terms of the + * Common Development and Distribution License, Version 1.0 only + * (the "License"). You may not use this file except in compliance + * with the License. + * + * See the file CDDL.Schily.txt in this distribution for details. + * A copy of the CDDL is also available via the Internet at + * http://www.opensource.org/licenses/cddl1.txt + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file CDDL.Schily.txt from this distribution. + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include "at-defs.h" + +#ifndef HAVE_UTIMENSAT + +/* CSTYLED */ +#define PROTO_DECL , const struct timespec times[2], int flag +#define KR_DECL const struct timespec times[2]; int flag; +/* CSTYLED */ +#define KR_ARGS , times, flag +#define FUNC_CALL(n) (flag & AT_SYMLINK_NOFOLLOW ? \ + lutimens(n, times) : utimens(n, times)) +#define FLAG_CHECK() if (flag & ~(AT_SYMLINK_NOFOLLOW)) { \ + seterrno(EINVAL); \ + return (-1); \ + } +#define FUNC_NAME utimensat +#define FUNC_RESULT int + +#include "at-base.c" + +#endif /* HAVE_UTIMENSAT */ diff -Nru cdrtools-2.01.01a33/libschily/utimens.c cdrtools-3.02a09/libschily/utimens.c --- cdrtools-2.01.01a33/libschily/utimens.c 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/libschily/utimens.c 2013-10-30 22:42:29.000000000 +0000 @@ -0,0 +1,74 @@ +/* @(#)utimens.c 1.2 13/10/30 Copyright 2013 J. Schilling */ +/* + * Emulate the behavior of utimens(const char *name, + * const struct timespec times[2]) + * + * Copyright (c) 2013 J. Schilling + */ +/* + * The contents of this file are subject to the terms of the + * Common Development and Distribution License, Version 1.0 only + * (the "License"). You may not use this file except in compliance + * with the License. + * + * See the file CDDL.Schily.txt in this distribution for details. + * A copy of the CDDL is also available via the Internet at + * http://www.opensource.org/licenses/cddl1.txt + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file CDDL.Schily.txt from this distribution. + */ + +#include +#include +#include +#include +#include +#include +#include +#include + +#ifndef HAVE_UTIMENS + +EXPORT int +utimens(name, times) + const char *name; + const struct timespec times[2]; +{ +#ifdef HAVE_UTIMENSAT + return (utimensat(AT_FDCWD, name, times, 0)); +#else +#ifdef HAVE_UTIMES + struct timeval tv[2]; + + if (times == NULL) + return (utimes(name, NULL)); + tv[0].tv_sec = times[0].tv_sec; + tv[0].tv_usec = times[0].tv_nsec/1000; + tv[1].tv_sec = times[1].tv_sec; + tv[1].tv_usec = times[1].tv_nsec/1000; + return (utimes(name, tv)); + +#else +#ifdef HAVE_UTIME + struct utimbuf ut; + + if (times == NULL) + return (utime(name, NULL)); + ut.actime = times[0].tv_sec; + ut.modtime = times[1].tv_sec; + + return (utime(name, &ut)); +#else +#ifdef ENOSYS + seterrno(ENOSYS); +#else + seterrno(EINVAL); +#endif + return (-1); +#endif +#endif +#endif +} + +#endif /* HAVE_UTIMENS */ diff -Nru cdrtools-2.01.01a33/libschily/wcscat.c cdrtools-3.02a09/libschily/wcscat.c --- cdrtools-2.01.01a33/libschily/wcscat.c 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/libschily/wcscat.c 2009-07-08 21:56:15.000000000 +0000 @@ -0,0 +1,44 @@ +/* @(#)wcscat.c 1.2 09/07/08 Copyright 2006-2009 J. Schilling */ +#include +#ifndef lint +static UConst char sccsid[] = + "@(#)wcscat.c 1.2 09/07/08 Copyright 2006-2009 J. Schilling"; +#endif +/* + * wcscat() to be used if missing in libc + * + * Copyright (c) 2006-2009 J. Schilling + */ +/* + * The contents of this file are subject to the terms of the + * Common Development and Distribution License, Version 1.0 only + * (the "License"). You may not use this file except in compliance + * with the License. + * + * See the file CDDL.Schily.txt in this distribution for details. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file CDDL.Schily.txt from this distribution. + */ + +#include +#include +#include + +#ifndef HAVE_WCSCAT + +EXPORT wchar_t * +wcscat(s1, s2) + register wchar_t *s1; + register const wchar_t *s2; +{ + wchar_t *ret = s1; + + while (*s1++ != '\0') + ; + s1--; + while ((*s1++ = *s2++) != '\0') + ; + return (ret); +} +#endif /* HAVE_WCSCAT */ diff -Nru cdrtools-2.01.01a33/libschily/wcscatl.c cdrtools-3.02a09/libschily/wcscatl.c --- cdrtools-2.01.01a33/libschily/wcscatl.c 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/libschily/wcscatl.c 2009-06-05 19:43:01.000000000 +0000 @@ -0,0 +1,59 @@ +/* @(#)wcscatl.c 1.14 09/06/05 Copyright 1985, 1989, 1995-2009 J. Schilling */ +/* + * list version of wcscat() + * + * concatenates all past first parameter until a NULL pointer is reached + * + * WARNING: a NULL constant is not a NULL pointer, so a caller must + * cast a NULL constant to a pointer: (wchar_t *)NULL + * + * returns pointer past last character (to '\0' "char") + * + * Copyright (c) 1985, 1989, 1995-2009 J. Schilling + */ +/* + * The contents of this file are subject to the terms of the + * Common Development and Distribution License, Version 1.0 only + * (the "License"). You may not use this file except in compliance + * with the License. + * + * See the file CDDL.Schily.txt in this distribution for details. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file CDDL.Schily.txt from this distribution. + */ + +#include +#include +#include +#include + +/* VARARGS3 */ +#ifdef PROTOTYPES +EXPORT wchar_t * +wcscatl(wchar_t *to, ...) +#else +EXPORT wchar_t * +wcscatl(to, va_alist) + wchar_t *to; + va_dcl +#endif +{ + va_list args; + register wchar_t *p; + register wchar_t *tor = to; + +#ifdef PROTOTYPES + va_start(args, to); +#else + va_start(args); +#endif + while ((p = va_arg(args, wchar_t *)) != NULL) { + while ((*tor = *p++) != '\0') { + tor++; + } + } + *tor = '\0'; + va_end(args); + return (tor); +} diff -Nru cdrtools-2.01.01a33/libschily/wcschr.c cdrtools-3.02a09/libschily/wcschr.c --- cdrtools-2.01.01a33/libschily/wcschr.c 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/libschily/wcschr.c 2009-06-07 12:07:51.000000000 +0000 @@ -0,0 +1,37 @@ +/* @(#)wcschr.c 1.4 09/06/07 Copyright 1985,2009 J. Schilling */ +/* + * wcschr() to be used if missing in libc + * + * Copyright (c) 1985,2009 J. Schilling + */ +/* + * The contents of this file are subject to the terms of the + * Common Development and Distribution License, Version 1.0 only + * (the "License"). You may not use this file except in compliance + * with the License. + * + * See the file CDDL.Schily.txt in this distribution for details. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file CDDL.Schily.txt from this distribution. + */ + +#include +#include +#include + +#ifndef HAVE_WCSCHR + +EXPORT wchar_t * +wcschr(s, c) + register const wchar_t *s; + register wchar_t c; +{ + do { + if (*s == c) + return ((wchar_t *)s); + } while (*s++ != '\0'); + return (0); +} + +#endif diff -Nru cdrtools-2.01.01a33/libschily/wcscmp.c cdrtools-3.02a09/libschily/wcscmp.c --- cdrtools-2.01.01a33/libschily/wcscmp.c 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/libschily/wcscmp.c 2009-06-07 13:38:34.000000000 +0000 @@ -0,0 +1,38 @@ +/* @(#)wcscmp.c 1.6 09/06/07 Copyright 1985,2009 J. Schilling */ +/* + * Copyright (c) 1985,2009 J. Schilling + */ +/* + * The contents of this file are subject to the terms of the + * Common Development and Distribution License, Version 1.0 only + * (the "License"). You may not use this file except in compliance + * with the License. + * + * See the file CDDL.Schily.txt in this distribution for details. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file CDDL.Schily.txt from this distribution. + */ + +#include +#include +#include + +#ifndef HAVE_WCSCMP + +EXPORT int +wcscmp(s1, s2) + register const wchar_t *s1; + register const wchar_t *s2; +{ + if (s1 == s2) + return (0); + + while (*s1 == *s2++) { + if (*s1++ == '\0') + return (0); + } + return (*s1 - *(--s2)); +} + +#endif diff -Nru cdrtools-2.01.01a33/libschily/wcscpy.c cdrtools-3.02a09/libschily/wcscpy.c --- cdrtools-2.01.01a33/libschily/wcscpy.c 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/libschily/wcscpy.c 2009-07-08 21:56:15.000000000 +0000 @@ -0,0 +1,42 @@ +/* @(#)wcscpy.c 1.2 09/07/08 Copyright 2006-2009 J. Schilling */ +#include +#ifndef lint +static UConst char sccsid[] = + "@(#)wcscpy.c 1.2 09/07/08 Copyright 2006-2009 J. Schilling"; +#endif +/* + * wcscpy() to be used if missing in libc + * + * Copyright (c) 2006-2009 J. Schilling + */ +/* + * The contents of this file are subject to the terms of the + * Common Development and Distribution License, Version 1.0 only + * (the "License"). You may not use this file except in compliance + * with the License. + * + * See the file CDDL.Schily.txt in this distribution for details. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file CDDL.Schily.txt from this distribution. + */ + +#include +#include +#include +#include + +#ifndef HAVE_WCSCPY + +EXPORT wchar_t * +wcscpy(s1, s2) + register wchar_t *s1; + register const wchar_t *s2; +{ + wchar_t *ret = s1; + + while ((*s1++ = *s2++) != '\0') + ; + return (ret); +} +#endif /* HAVE_WCSCPY */ diff -Nru cdrtools-2.01.01a33/libschily/wcscspn.c cdrtools-3.02a09/libschily/wcscspn.c --- cdrtools-2.01.01a33/libschily/wcscspn.c 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/libschily/wcscspn.c 2014-01-06 22:56:14.000000000 +0000 @@ -0,0 +1,48 @@ +/* @(#)wcscspn.c 1.1 14/01/06 Copyright 2014 J. Schilling */ +/* + * find maximum number of chars in s1 that consists solely of chars + * NOT in s2 + * + * Copyright (c) 2014 J. Schilling + */ +/* + * The contents of this file are subject to the terms of the + * Common Development and Distribution License, Version 1.0 only + * (the "License"). You may not use this file except in compliance + * with the License. + * + * See the file CDDL.Schily.txt in this distribution for details. + * A copy of the CDDL is also available via the Internet at + * http://www.opensource.org/licenses/cddl1.txt + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file CDDL.Schily.txt from this distribution. + */ +#include +#include +#include +#include + +#ifndef HAVE_WCSCSPN + +EXPORT size_t +wcscspn(s1, s2) + register const wchar_t *s1; /* The string to search */ + const wchar_t *s2; /* The charset used to search */ +{ + register const wchar_t *a; + register const wchar_t *b; + + if (*s2 == '\0') + return (wcslen(s1)); + + for (a = s1; *a != '\0'; a++) { + for (b = s2; *b != '\0' && *a != *b; b++) + ; + if (*b != '\0') + break; + } + return (a - s1); +} + +#endif diff -Nru cdrtools-2.01.01a33/libschily/wcsdup.c cdrtools-3.02a09/libschily/wcsdup.c --- cdrtools-2.01.01a33/libschily/wcsdup.c 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/libschily/wcsdup.c 2010-08-21 11:39:07.000000000 +0000 @@ -0,0 +1,51 @@ +/* @(#)wcsdup.c 1.7 10/08/21 Copyright 2003-2010 J. Schilling */ +#include +#ifndef lint +static UConst char sccsid[] = + "@(#)wcsdup.c 1.7 10/08/21 Copyright 2003-2010 J. Schilling"; +#endif +/* + * wcsdup() to be used if missing in libc + * + * Copyright (c) 2003-2010 J. Schilling + */ +/* + * The contents of this file are subject to the terms of the + * Common Development and Distribution License, Version 1.0 only + * (the "License"). You may not use this file except in compliance + * with the License. + * + * See the file CDDL.Schily.txt in this distribution for details. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file CDDL.Schily.txt from this distribution. + */ + +#include +#include +#include +#include +#include + +#ifndef HAVE_WCSDUP + +EXPORT wchar_t * +wcsdup(s) + const wchar_t *s; +{ + unsigned i = wcslen(s) + 1; + wchar_t *res = malloc(i * sizeof (wchar_t)); + + if (res == NULL) + return (NULL); + if (i > 16) { + movebytes(s, res, (int)(i * sizeof (wchar_t))); + } else { + wchar_t *s2 = res; + + while ((*s2++ = *s++) != '\0') + ; + } + return (res); +} +#endif /* HAVE_WCSDUP */ diff -Nru cdrtools-2.01.01a33/libschily/wcseql.c cdrtools-3.02a09/libschily/wcseql.c --- cdrtools-2.01.01a33/libschily/wcseql.c 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/libschily/wcseql.c 2009-06-07 13:36:41.000000000 +0000 @@ -0,0 +1,44 @@ +/* @(#)wcseql.c 1.10 09/06/07 Copyright 1985, 1995-2009 J. Schilling */ +/* + * Check if two wide strings are equal + * + * Copyright (c) 1985, 1995-2009 J. Schilling + */ +/* + * The contents of this file are subject to the terms of the + * Common Development and Distribution License, Version 1.0 only + * (the "License"). You may not use this file except in compliance + * with the License. + * + * See the file CDDL.Schily.txt in this distribution for details. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file CDDL.Schily.txt from this distribution. + */ + +#include +#include +#include + +EXPORT int +wcseql(a, b) + const wchar_t *a; + const wchar_t *b; +{ + register const wchar_t *s1 = a; + register const wchar_t *s2 = b; + + if (s1 == s2) + return (TRUE); + +#ifdef __never__ + if (s1 == NULL || s2 == NULL) + return (FALSE); +#endif + + while (*s1 == *s2++) + if (*s1++ == '\0') + return (TRUE); + + return (FALSE); +} diff -Nru cdrtools-2.01.01a33/libschily/wcslcat.c cdrtools-3.02a09/libschily/wcslcat.c --- cdrtools-2.01.01a33/libschily/wcslcat.c 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/libschily/wcslcat.c 2010-04-26 13:59:20.000000000 +0000 @@ -0,0 +1,59 @@ +/* @(#)wcslcat.c 1.1 10/04/26 Copyright 2010 J. Schilling */ +#include +#ifndef lint +static UConst char sccsid[] = + "@(#)wcslcat.c 1.1 10/04/26 Copyright 2010 J. Schilling"; +#endif +/* + * wcslcat() to be used if missing in libc + * + * Copyright (c) 2010 J. Schilling + */ +/* + * The contents of this file are subject to the terms of the + * Common Development and Distribution License, Version 1.0 only + * (the "License"). You may not use this file except in compliance + * with the License. + * + * See the file CDDL.Schily.txt in this distribution for details. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file CDDL.Schily.txt from this distribution. + */ + +#include +#include +#include +#include + +#ifndef HAVE_WCSLCAT + +EXPORT size_t +wcslcat(s1, s2, len) + register wchar_t *s1; + register const wchar_t *s2; + register size_t len; +{ + const wchar_t *os1 = s1; + size_t olen = len; + + if (len > 0) { + while (--len > 0 && *s1++ != '\0') + ; + + if (len == 0) + return (olen + wcslen(s2)); + + s1--; + len++; + while (--len > 0 && (*s1++ = *s2++) != '\0') + ; + if (len == 0) { + *s1 = '\0'; + return (s1 - os1 + wcslen(s2)); + } + return (--s1 - os1); + } + return (wcslen(s2)); +} +#endif /* HAVE_WCSLCAT */ diff -Nru cdrtools-2.01.01a33/libschily/wcslcatl.c cdrtools-3.02a09/libschily/wcslcatl.c --- cdrtools-2.01.01a33/libschily/wcslcatl.c 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/libschily/wcslcatl.c 2015-03-03 20:16:39.000000000 +0000 @@ -0,0 +1,85 @@ +/* @(#)wcslcatl.c 1.1 15/03/03 Copyright 2015 J. Schilling */ +/* + * list version of strlcat() + * + * concatenates all past first parameter until a NULL pointer is reached + * + * WARNING: a NULL constant is not a NULL pointer, so a caller must + * cast a NULL constant to a pointer: (wchar_t *)NULL + * + * returns number of bytes needed to fit all + * + * Copyright (c) 2015 J. Schilling + */ +/* + * The contents of this file are subject to the terms of the + * Common Development and Distribution License, Version 1.0 only + * (the "License"). You may not use this file except in compliance + * with the License. + * + * See the file CDDL.Schily.txt in this distribution for details. + * A copy of the CDDL is also available via the Internet at + * http://www.opensource.org/licenses/cddl1.txt + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file CDDL.Schily.txt from this distribution. + */ + +#include +#include +#include +#include +#include +#include + +/* VARARGS3 */ +#ifdef PROTOTYPES +EXPORT size_t +wcslcatl(wchar_t *to, size_t len, ...) +#else +EXPORT size_t +wcslcatl(to, len, va_alist) + wchar_t *to; + size_t len; + va_dcl +#endif +{ + va_list args; + register wchar_t *p; + register wchar_t *tor = to; + size_t olen = len; + +#ifdef PROTOTYPES + va_start(args, len); +#else + va_start(args); +#endif + if (len > 0) { + while (--len > 0 && *tor++ != '\0') + ; + + if (len == 0) + goto toolong; + + while ((p = va_arg(args, wchar_t *)) != NULL) { + tor--; + len++; + while (--len > 0 && (*tor++ = *p++) != '\0') + ; + if (len == 0) { + *tor = '\0'; + olen = tor - to + wcslen(p); + goto toolong; + } + } + olen = --tor - to; + } + va_end(args); + return (olen); +toolong: + while ((p = va_arg(args, wchar_t *)) != NULL) { + olen += wcslen(p); + } + va_end(args); + return (olen); +} diff -Nru cdrtools-2.01.01a33/libschily/wcslcpy.c cdrtools-3.02a09/libschily/wcslcpy.c --- cdrtools-2.01.01a33/libschily/wcslcpy.c 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/libschily/wcslcpy.c 2009-07-08 21:56:15.000000000 +0000 @@ -0,0 +1,53 @@ +/* @(#)wcslcpy.c 1.5 09/07/08 Copyright 2006-2009 J. Schilling */ +#include +#ifndef lint +static UConst char sccsid[] = + "@(#)wcslcpy.c 1.5 09/07/08 Copyright 2006-2009 J. Schilling"; +#endif +/* + * wcslcpy() to be used if missing in libc + * + * Copyright (c) 2006-2009 J. Schilling + */ +/* + * The contents of this file are subject to the terms of the + * Common Development and Distribution License, Version 1.0 only + * (the "License"). You may not use this file except in compliance + * with the License. + * + * See the file CDDL.Schily.txt in this distribution for details. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file CDDL.Schily.txt from this distribution. + */ + +#include +#include +#include +#include + +#ifndef HAVE_WCSLCPY + +EXPORT size_t +wcslcpy(s1, s2, len) + register wchar_t *s1; + register const wchar_t *s2; + register size_t len; +{ + const wchar_t *os2 = s2; + + if (len > 0) { + while (--len > 0 && (*s1++ = *s2++) != '\0') + ; + if (len == 0) { + *s1 = '\0'; + while (*s2++ != '\0') + ; + } + } else { + while (*s2++ != '\0') + ; + } + return (--s2 - os2); +} +#endif /* HAVE_WCSLCPY */ diff -Nru cdrtools-2.01.01a33/libschily/wcslen.c cdrtools-3.02a09/libschily/wcslen.c --- cdrtools-2.01.01a33/libschily/wcslen.c 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/libschily/wcslen.c 2009-06-07 11:55:40.000000000 +0000 @@ -0,0 +1,36 @@ +/* @(#)wcslen.c 1.5 09/06/07 Copyright 1985,2009 J. Schilling */ +/* + * wcslen() to be used if missing in libc + * + * Copyright (c) 1985,2009 J. Schilling + */ +/* + * The contents of this file are subject to the terms of the + * Common Development and Distribution License, Version 1.0 only + * (the "License"). You may not use this file except in compliance + * with the License. + * + * See the file CDDL.Schily.txt in this distribution for details. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file CDDL.Schily.txt from this distribution. + */ + +#include +#include +#include + +#ifndef HAVE_WCSLEN + +EXPORT size_t +wcslen(s) + register const wchar_t *s; +{ + register const wchar_t *rs = s; + + while (*rs++ != '\0') + ; + return (--rs - s); +} + +#endif diff -Nru cdrtools-2.01.01a33/libschily/wcsncat.c cdrtools-3.02a09/libschily/wcsncat.c --- cdrtools-2.01.01a33/libschily/wcsncat.c 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/libschily/wcsncat.c 2010-05-06 21:59:24.000000000 +0000 @@ -0,0 +1,53 @@ +/* @(#)wcsncat.c 1.3 10/05/06 Copyright 2006-2010 J. Schilling */ +#include +#ifndef lint +static UConst char sccsid[] = + "@(#)wcsncat.c 1.3 10/05/06 Copyright 2006-2010 J. Schilling"; +#endif +/* + * wcsncat() to be used if missing in libc + * + * Copyright (c) 2006-2010 J. Schilling + */ +/* + * The contents of this file are subject to the terms of the + * Common Development and Distribution License, Version 1.0 only + * (the "License"). You may not use this file except in compliance + * with the License. + * + * See the file CDDL.Schily.txt in this distribution for details. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file CDDL.Schily.txt from this distribution. + */ + +#include +#include +#include +#include + +#ifndef HAVE_WCSNCAT + +EXPORT wchar_t * +wcsncat(s1, s2, len) + register wchar_t *s1; + register const wchar_t *s2; + register size_t len; +{ + wchar_t *ret = s1; + + + if (len == 0) + return (ret); + + while (*s1++ != '\0') + ; + s1--; + do { + if ((*s1++ = *s2++) == '\0') + return (ret); + } while (--len > 0); + *s1 = '\0'; + return (ret); +} +#endif /* HAVE_WCSNCAT */ diff -Nru cdrtools-2.01.01a33/libschily/wcsncmp.c cdrtools-3.02a09/libschily/wcsncmp.c --- cdrtools-2.01.01a33/libschily/wcsncmp.c 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/libschily/wcsncmp.c 2010-05-06 21:57:43.000000000 +0000 @@ -0,0 +1,54 @@ +/* @(#)wcsncmp.c 1.4 10/05/06 Copyright 2006-2010 J. Schilling */ +#include +#ifndef lint +static UConst char sccsid[] = + "@(#)wcsncmp.c 1.4 10/05/06 Copyright 2006-2010 J. Schilling"; +#endif +/* + * wcsncmp() to be used if missing in libc + * + * Copyright (c) 2006-2010 J. Schilling + */ +/* + * The contents of this file are subject to the terms of the + * Common Development and Distribution License, Version 1.0 only + * (the "License"). You may not use this file except in compliance + * with the License. + * + * See the file CDDL.Schily.txt in this distribution for details. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file CDDL.Schily.txt from this distribution. + */ + +#include +#include +#include +#include + +#ifndef HAVE_WCSNCMP + +EXPORT int +wcsncmp(s1, s2, len) + register const wchar_t *s1; + register const wchar_t *s2; + register size_t len; +{ + if (s1 == s2) + return (0); + + if (len == 0) + return (0); + + do { + if (*s1 == *s2++) { + if (*s1++ == '\0') + return (0); + } else { + break; + } + } while (--len > 0); + + return (len == 0 ? 0 : *s1 - *(--s2)); +} +#endif /* HAVE_WCSNCMP */ diff -Nru cdrtools-2.01.01a33/libschily/wcsncpy.c cdrtools-3.02a09/libschily/wcsncpy.c --- cdrtools-2.01.01a33/libschily/wcsncpy.c 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/libschily/wcsncpy.c 2010-05-06 22:00:41.000000000 +0000 @@ -0,0 +1,52 @@ +/* @(#)wcsncpy.c 1.6 10/05/07 Copyright 2006-2010 J. Schilling */ +#include +#ifndef lint +static UConst char sccsid[] = + "@(#)wcsncpy.c 1.6 10/05/07 Copyright 2006-2010 J. Schilling"; +#endif +/* + * wcsncpy() to be used if missing in libc + * + * Copyright (c) 2006-2010 J. Schilling + */ +/* + * The contents of this file are subject to the terms of the + * Common Development and Distribution License, Version 1.0 only + * (the "License"). You may not use this file except in compliance + * with the License. + * + * See the file CDDL.Schily.txt in this distribution for details. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file CDDL.Schily.txt from this distribution. + */ + +#include +#include +#include +#include + +#ifndef HAVE_WCSNCPY + +EXPORT wchar_t * +wcsncpy(s1, s2, len) + register wchar_t *s1; + register const wchar_t *s2; + register size_t len; +{ + wchar_t *ret = s1; + + if (len == 0) + return (ret); + + do { + if ((*s1++ = *s2++) == '\0') + break; + } while (--len > 0); + if (len > 0) { + while (--len > 0) + *s1++ = '\0'; + } + return (ret); +} +#endif /* HAVE_WCSNCPY */ diff -Nru cdrtools-2.01.01a33/libschily/wcsndup.c cdrtools-3.02a09/libschily/wcsndup.c --- cdrtools-2.01.01a33/libschily/wcsndup.c 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/libschily/wcsndup.c 2010-07-21 21:00:55.000000000 +0000 @@ -0,0 +1,57 @@ +/* @(#)wcsndup.c 1.2 10/07/21 Copyright 2003-2010 J. Schilling */ +#include +#ifndef lint +static UConst char sccsid[] = + "@(#)wcsndup.c 1.2 10/07/21 Copyright 2003-2010 J. Schilling"; +#endif +/* + * wcsndup() to be used if missing in libc + * + * Copyright (c) 2003-2010 J. Schilling + */ +/* + * The contents of this file are subject to the terms of the + * Common Development and Distribution License, Version 1.0 only + * (the "License"). You may not use this file except in compliance + * with the License. + * + * See the file CDDL.Schily.txt in this distribution for details. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file CDDL.Schily.txt from this distribution. + */ + +#include +#include +#include +#include +#include +#include +#include + +#ifndef HAVE_WCSNDUP + +EXPORT wchar_t * +wcsndup(s, len) + const wchar_t *s; + size_t len; +{ + size_t i = wcsnlen(s, len) + 1; + wchar_t *res = malloc(i); + + if (res == NULL) + return (NULL); + if (i > 16) { + movebytes(s, res, --i); + res[i] = '\0'; + } else { + wchar_t *s2 = res; + + while (--i > 0 && (*s2++ = *s++) != '\0') + ; + if (i == 0) + *s2 = '\0'; + } + return (res); +} +#endif /* HAVE_STRDUP */ diff -Nru cdrtools-2.01.01a33/libschily/wcsnlen.c cdrtools-3.02a09/libschily/wcsnlen.c --- cdrtools-2.01.01a33/libschily/wcsnlen.c 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/libschily/wcsnlen.c 2010-05-06 22:00:06.000000000 +0000 @@ -0,0 +1,43 @@ +/* @(#)wcsnlen.c 1.3 10/05/07 Copyright 2010 J. Schilling */ +/* + * wcsnlen() to be used if missing in libc + * + * Copyright (c) 2010 J. Schilling + */ +/* + * The contents of this file are subject to the terms of the + * Common Development and Distribution License, Version 1.0 only + * (the "License"). You may not use this file except in compliance + * with the License. + * + * See the file CDDL.Schily.txt in this distribution for details. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file CDDL.Schily.txt from this distribution. + */ + +#include +#include +#include +#include + +#ifndef HAVE_WCSNLEN + +EXPORT size_t +wcsnlen(s, len) + register const wchar_t *s; + register size_t len; +{ + register const wchar_t *rs = s; + + if (len == 0) + return (0); + + while (*rs++ != '\0' && --len > 0) + ; + if (len == 0) + return (rs - s); + return (--rs - s); +} + +#endif diff -Nru cdrtools-2.01.01a33/libschily/wcsrchr.c cdrtools-3.02a09/libschily/wcsrchr.c --- cdrtools-2.01.01a33/libschily/wcsrchr.c 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/libschily/wcsrchr.c 2009-06-05 21:17:00.000000000 +0000 @@ -0,0 +1,39 @@ +/* @(#)wcsrchr.c 1.2 09/06/05 Copyright 1985,2009 J. Schilling */ +/* + * wcsrchr() to be used if missing in libc + * + * Copyright (c) 1985,2009 J. Schilling + */ +/* + * The contents of this file are subject to the terms of the + * Common Development and Distribution License, Version 1.0 only + * (the "License"). You may not use this file except in compliance + * with the License. + * + * See the file CDDL.Schily.txt in this distribution for details. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file CDDL.Schily.txt from this distribution. + */ + +#include +#include +#include + +#ifndef HAVE_WCSRCHR + +EXPORT wchar_t * +wcsrchr(s, c) + register const wchar_t *s; + register wchar_t c; +{ + register wchar_t *p = NULL; + + do { + if (*s == c) + p = (wchar_t *)s; + } while (*s++ != '\0'); + return (p); +} + +#endif diff -Nru cdrtools-2.01.01a33/libschily/wcsspn.c cdrtools-3.02a09/libschily/wcsspn.c --- cdrtools-2.01.01a33/libschily/wcsspn.c 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/libschily/wcsspn.c 2014-01-06 22:56:14.000000000 +0000 @@ -0,0 +1,48 @@ +/* @(#)wcsspn.c 1.1 14/01/06 Copyright 2014 J. Schilling */ +/* + * find maximum number of chars in s1 that consists solely of chars + * from s2 + * + * Copyright (c) 2014 J. Schilling + */ +/* + * The contents of this file are subject to the terms of the + * Common Development and Distribution License, Version 1.0 only + * (the "License"). You may not use this file except in compliance + * with the License. + * + * See the file CDDL.Schily.txt in this distribution for details. + * A copy of the CDDL is also available via the Internet at + * http://www.opensource.org/licenses/cddl1.txt + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file CDDL.Schily.txt from this distribution. + */ +#include +#include +#include +#include + +#ifndef HAVE_WCSSPN + +EXPORT size_t +wcsspn(s1, s2) + register const wchar_t *s1; /* The string to search */ + const wchar_t *s2; /* The charset used to search */ +{ + register const wchar_t *a; + register const wchar_t *b; + + if (*s2 == '\0') + return (0); + + for (a = s1; *a != '\0'; a++) { + for (b = s2; *b != '\0' && *a != *b; b++) + ; + if (*b == '\0') + break; + } + return (a - s1); +} + +#endif diff -Nru cdrtools-2.01.01a33/libschily/wcsstr.c cdrtools-3.02a09/libschily/wcsstr.c --- cdrtools-2.01.01a33/libschily/wcsstr.c 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/libschily/wcsstr.c 2013-11-11 20:34:48.000000000 +0000 @@ -0,0 +1,50 @@ +/* @(#)wcsstr.c 1.3 13/11/11 Copyright 1985-2013 J. Schilling */ +/* + * find string s2 in string s1 + * return NULL if s2 is not found + * otherwise return pointer of first occurrence of s2 in s1 + * + * Copyright (c) 1985-2013 J. Schilling + */ +/* + * The contents of this file are subject to the terms of the + * Common Development and Distribution License, Version 1.0 only + * (the "License"). You may not use this file except in compliance + * with the License. + * + * See the file CDDL.Schily.txt in this distribution for details. + * A copy of the CDDL is also available via the Internet at + * http://www.opensource.org/licenses/cddl1.txt + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file CDDL.Schily.txt from this distribution. + */ +#include +#include +#include + +#ifndef HAVE_WCSSTR + +EXPORT wchar_t * +wcsstr(s1, s2) + register const wchar_t *s1; + const wchar_t *s2; +{ + register const wchar_t *a; + register const wchar_t *b; + + if (*s2 == '\0') + return ((wchar_t *)s1); + + for (; *s1 != '\0'; s1++) { + for (a = s2, b = s1; *a == *b++; ) { + if (*a++ == '\0') + return ((wchar_t *)s1); + } + if (*a == '\0') + return ((wchar_t *)s1); + } + return ((wchar_t *)NULL); +} + +#endif diff -Nru cdrtools-2.01.01a33/libschily/wctype.c cdrtools-3.02a09/libschily/wctype.c --- cdrtools-2.01.01a33/libschily/wctype.c 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/libschily/wctype.c 2017-08-13 09:22:49.000000000 +0000 @@ -0,0 +1,90 @@ +/* @(#)wctype.c 1.3 17/08/13 Copyright 2017 J. Schilling */ +/* + * Emulate the behavior of wctype() and iswctype() + * + * Copyright (c) 2017 J. Schilling + */ +/* + * The contents of this file are subject to the terms of the + * Common Development and Distribution License, Version 1.0 only + * (the "License"). You may not use this file except in compliance + * with the License. + * + * See the file CDDL.Schily.txt in this distribution for details. + * A copy of the CDDL is also available via the Internet at + * http://www.opensource.org/licenses/cddl1.txt + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file CDDL.Schily.txt from this distribution. + */ + +#include +#include +#include +#include +#include + +#ifndef HAVE_WCTYPE +LOCAL struct wct { + char *name; + wctype_t val; +} wct[] = { + {"alnum", 1}, + {"alpha", 2}, + {"blank", 3}, + {"cntrl", 4}, + {"digit", 5}, + {"graph", 6}, + {"lower", 7}, + {"print", 8}, + {"punct", 9}, + {"space", 10}, + {"upper", 11}, + {"xdigit", 12}, + { NULL, 0} +}; + +wctype_t +wctype(n) + const char *n; +{ + register struct wct *wp = wct; + + for (; wp->name; wp++) { + if (*n != *wp->name) + continue; + if (strcmp(n, wp->name) == 0) + return (wp->val); + } + return (0); +} + +int +iswctype(wc, t) + wint_t wc; + wctype_t t; +{ + switch (t) { + + case 1: return (iswalnum(wc)); + case 2: return (iswalpha(wc)); +#if defined(HAVE_ISWBLANK) || ((MB_LEN_MAX == 1) && defined(HAVE_ISBLANK)) + case 3: return (iswblank(wc)); +#else + case 3: return (isspace(wc)); +#endif + case 4: return (iswcntrl(wc)); + case 5: return (iswdigit(wc)); + case 6: return (iswgraph(wc)); + case 7: return (iswlower(wc)); + case 8: return (iswprint(wc)); + case 9: return (iswpunct(wc)); + case 10: return (iswspace(wc)); + case 11: return (iswupper(wc)); + case 12: return (iswxdigit(wc)); + + default: + return (0); + } +} +#endif /* HAVE_WCTYPE */ diff -Nru cdrtools-2.01.01a33/libschily/wdabort.c cdrtools-3.02a09/libschily/wdabort.c --- cdrtools-2.01.01a33/libschily/wdabort.c 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/libschily/wdabort.c 2011-10-21 17:59:16.000000000 +0000 @@ -0,0 +1,42 @@ +/* @(#)wdabort.c 1.1 11/10/21 Copyright 2011 J. Schilling */ +/* + * Functions to abort after problems in directory handling. + * + * Copyright (c) 2011 J. Schilling + */ +/* + * The contents of this file are subject to the terms of the + * Common Development and Distribution License, Version 1.0 only + * (the "License"). You may not use this file except in compliance + * with the License. + * + * See the file CDDL.Schily.txt in this distribution for details. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file CDDL.Schily.txt from this distribution. + */ + +#include +#include +#include "at-defs.h" + +void +savewd_abort(err) + int err; +{ + comerrno(err, "Cannot save current working directory.\n"); +} + +void +fchdir_abort(err) + int err; +{ + comerrno(err, "Cannot completely chdir() to new directory.\n"); +} + +void +restorewd_abort(err) + int err; +{ + comerrno(err, "Cannot restore current working directory.\n"); +} diff -Nru cdrtools-2.01.01a33/libschily/zerobytes.c cdrtools-3.02a09/libschily/zerobytes.c --- cdrtools-2.01.01a33/libschily/zerobytes.c 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/libschily/zerobytes.c 2011-07-30 13:53:06.000000000 +0000 @@ -0,0 +1,90 @@ +/* @(#)zerobytes.c 1.2 11/07/30 Copyright Copyright 1987, 1995-2011 J. Schilling */ +/* + * fill memory with null bytes + * + * Copyright (c) 1987, 1995-2011 J. Schilling + */ +/* + * The contents of this file are subject to the terms of the + * Common Development and Distribution License, Version 1.0 only + * (the "License"). You may not use this file except in compliance + * with the License. + * + * See the file CDDL.Schily.txt in this distribution for details. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file CDDL.Schily.txt from this distribution. + */ + +#include +#include +#include +#include + +#define DO8(a) a; a; a; a; a; a; a; a; + +/* + * zero(to, cnt) + */ +EXPORT char * +zerobytes(tov, cnt) + void *tov; + ssize_t cnt; +{ + register char *to = (char *)tov; + register ssize_t n; + register long lval = 0L; + + /* + * If we change cnt to be unsigned, check for == instead of <= + */ + if ((n = cnt) <= 0) + return (to); + + if (n < 8 * sizeof (long)) { /* Simple may be faster... */ + do { /* n is always > 0 */ + *to++ = '\0'; + } while (--n > 0); + return (to); + } + + /* + * Assign byte-wise until properly aligned for a long pointer. + */ + while (--n >= 0 && !laligned(to)) { + *to++ = '\0'; + } + n++; + + if (n >= (ssize_t)(8 * sizeof (long))) { + register ssize_t rem = n % (8 * sizeof (long)); + + n /= (8 * sizeof (long)); + { + register long *tol = (long *)to; + + do { + DO8 (*tol++ = lval); + } while (--n > 0); + + to = (char *)tol; + } + n = rem; + + if (n >= 8) { + n -= 8; + do { + DO8 (*to++ = '\0'); + } while ((n -= 8) >= 0); + n += 8; + } + if (n > 0) do { + *to++ = '\0'; + } while (--n > 0); + return (to); + } + if (n > 0) do { + *to++ = '\0'; + } while (--n > 0); + return (to); +} diff -Nru cdrtools-2.01.01a33/libsiconv/libsiconv-mapvers cdrtools-3.02a09/libsiconv/libsiconv-mapvers --- cdrtools-2.01.01a33/libsiconv/libsiconv-mapvers 2007-05-19 12:25:39.000000000 +0000 +++ cdrtools-3.02a09/libsiconv/libsiconv-mapvers 2015-05-18 22:45:37.000000000 +0000 @@ -1,4 +1,9 @@ -# @(#)libsiconv-mapvers 1.1 07/05/19 Copyright 2007 J. Schilling +# /* @(#)libsiconv-mapvers 1.3 15/05/19 Copyright 2007-2015 J. Schilling */ + +SCHILY_1.1 { +global: + sic_base; +} SCHILY_1.0; SCHILY_1.0 { global: diff -Nru cdrtools-2.01.01a33/libsiconv/libsiconv.mk cdrtools-3.02a09/libsiconv/libsiconv.mk --- cdrtools-2.01.01a33/libsiconv/libsiconv.mk 2007-05-19 12:24:07.000000000 +0000 +++ cdrtools-3.02a09/libsiconv/libsiconv.mk 2010-12-23 21:01:13.000000000 +0000 @@ -1,4 +1,4 @@ -#ident @(#)libsiconv.mk 1.1 07/05/19 +#ident @(#)libsiconv.mk 1.2 10/12/23 ########################################################################### SRCROOT= .. RULESDIR= RULES @@ -18,3 +18,4 @@ ########################################################################### include $(SRCROOT)/$(RULESDIR)/rules.lib ########################################################################### + diff -Nru cdrtools-2.01.01a33/libsiconv/libsiconv_p.mk cdrtools-3.02a09/libsiconv/libsiconv_p.mk --- cdrtools-2.01.01a33/libsiconv/libsiconv_p.mk 2007-06-30 11:13:34.000000000 +0000 +++ cdrtools-3.02a09/libsiconv/libsiconv_p.mk 2008-01-11 17:25:57.000000000 +0000 @@ -1,4 +1,4 @@ -#ident @(#)libsiconv_p.mk 1.2 07/06/30 +#ident @(#)libsiconv_p.mk 1.3 08/01/11 ########################################################################### SRCROOT= .. RULESDIR= RULES @@ -6,6 +6,7 @@ ########################################################################### SUBARCHDIR= /profiled +SUBINSDIR= /profiled INSDIR= lib TARGETLIB= siconv #CPPOPTS += -Istdio diff -Nru cdrtools-2.01.01a33/libsiconv/sic_nls.c cdrtools-3.02a09/libsiconv/sic_nls.c --- cdrtools-2.01.01a33/libsiconv/sic_nls.c 2007-07-28 13:21:36.000000000 +0000 +++ cdrtools-3.02a09/libsiconv/sic_nls.c 2014-01-15 21:54:49.000000000 +0000 @@ -1,7 +1,8 @@ -/* @(#)sic_nls.c 1.3 07/07/28 Copyright 2007 J. Schilling */ +/* @(#)sic_nls.c 1.18 14/01/15 Copyright 2007-2014 J. Schilling */ +#include #ifndef lint -static char sccsid[] = - "@(#)sic_nls.c 1.3 07/07/28 Copyright 2007 J. Schilling"; +static UConst char sccsid[] = + "@(#)sic_nls.c 1.18 14/01/15 Copyright 2007-2014 J. Schilling"; #endif /* * This code reads translation files in the format used by @@ -11,7 +12,7 @@ * from single byte character sets to unicode. * We use this code on systems that do not provide the iconv() function. * - * Copyright 2007 J. Schilling + * Copyright 2007-2014 J. Schilling */ /* * The contents of this file are subject to the terms of the @@ -20,37 +21,62 @@ * with the License. * * See the file CDDL.Schily.txt in this distribution for details. + * A copy of the CDDL is also available via the Internet at + * http://www.opensource.org/licenses/cddl1.txt * * When distributing Covered Code, include this CDDL HEADER in each * file and include the License file CDDL.Schily.txt from this distribution. */ -#include -#include +#include #include #include #include /* For strdup() */ +#include /* For R_OK */ #include #include #include #define TAB_SIZE (UINT8_MAX+1) -#ifdef PROTOTYPES +#define __CAN_TAB_SIZE__ + +#ifndef PROTOTYPES +#undef __CAN_TAB_SIZE__ +#endif +#if (!defined(__STDC__) || __STDC__ < 1) && \ + !defined(__SUNPRO_C) /* Sun Compilers are OK even with __STDC__ 0 */ /* * C-preprocessors from K&R compilers cannot do the computation for TAB_SIZE * in the next line We need to disable this test in case of a K&R compiler. */ +#undef __CAN_TAB_SIZE__ +#endif +#ifdef __GNUC__ +#if __GNUC__ < 2 +#undef __CAN_TAB_SIZE__ +#endif +#if __GNUC__ < 3 && __GNUC_MINOR__ < 95 +#undef __CAN_TAB_SIZE__ +#endif +#endif +#if defined(VMS) && !defined(__GNUC__) +#undef __CAN_TAB_SIZE__ +#endif + +#ifdef __CAN_TAB_SIZE__ #if TAB_SIZE < 256 Error Table size too small #endif -#endif /* PROTOTYPES */ +#endif LOCAL UInt8_t nullpage[TAB_SIZE] = { 0 }; +LOCAL char *ins_base; LOCAL siconvt_t *insert_sic __PR((siconvt_t *sip)); LOCAL int remove_sic __PR((siconvt_t *sip)); EXPORT siconvt_t *sic_open __PR((char *name)); -EXPORT void sic_close __PR((siconvt_t *sip)); +EXPORT const char *sic_base __PR((void)); +EXPORT int sic_close __PR((siconvt_t *sip)); EXPORT int sic_list __PR((FILE *f)); LOCAL void freetbl __PR((UInt8_t **uni2cs)); LOCAL FILE *pfopen __PR((char *name)); @@ -97,9 +123,27 @@ remove_sic(sip) siconvt_t *sip; { - siconvt_t **sp = &glist; + siconvt_t **sp = &glist; while (*sp) { +#ifdef USE_ICONV + if (strcmp(sip->sic_name, (*sp)->sic_name) == 0) { + siconvt_t *sap = *sp; + + if (sip == *sp) { + *sp = sip->sic_next; + return (0); + } + while (sap->sic_alt != NULL) { + if (sap->sic_alt == sip) { + sap->sic_alt = sip->sic_alt; + sip->sic_name = NULL; /* No free() */ + return (0); + } + sap = sap->sic_alt; + } + } +#endif if (sip == *sp) { *sp = sip->sic_next; return (0); @@ -127,6 +171,7 @@ if (sip->sic_cd2uni != 0) return (dup_iconv_sic(sip)); #endif + sip->sic_refcnt++; return (sip); } sip = sip->sic_next; @@ -135,12 +180,50 @@ } /* + * Open a new translation + */ +EXPORT const char * +sic_base() +{ + if (ins_base == NULL) { + ins_base = searchfileinpath("lib/siconv/iso8859-1", R_OK, + SIP_PLAIN_FILE, NULL); + if (ins_base != NULL) { + int len = strlen(ins_base); + + ins_base[len - 9] = '\0'; + } + } + return (ins_base); +} + +/* * Close a translation */ -EXPORT void +EXPORT int sic_close(sip) siconvt_t *sip; { + if (remove_sic(sip) < 0) + return (-1); + + if (--sip->sic_refcnt > 0) + return (0); + + if (sip->sic_name) + free(sip->sic_name); + if (sip->sic_uni2cs) + freetbl(sip->sic_uni2cs); + if (sip->sic_cs2uni) + free(sip->sic_cs2uni); +#ifdef USE_ICONV + if (sip->sic_cd2uni) + iconv_close(sip->sic_cd2uni); + if (sip->sic_uni2cd) + iconv_close(sip->sic_uni2cd); +#endif + + return (0); } /* @@ -155,7 +238,13 @@ struct dirent *dp; int i = 0; - snprintf(path, sizeof (path), "%s/lib/siconv/", INS_BASE); + if (ins_base == NULL) + (void) sic_base(); + + if (ins_base != NULL) + snprintf(path, sizeof (path), "%s", ins_base); + else + snprintf(path, sizeof (path), "%s/lib/siconv/", INS_BASE); if ((d = opendir(path)) == NULL) return (-1); @@ -198,18 +287,24 @@ char *name; { char path[1024]; - FILE *f; - - if ((f = fopen(name, "r")) != NULL) - return (f); + char *p; if (strchr(name, '/')) - return ((FILE *)NULL); + return (fopen(name, "r")); + + if (ins_base == NULL) + (void) sic_base(); + p = ins_base; + if (p != NULL) { + snprintf(path, sizeof (path), "%s%s", p, name); + return (fopen(path, "r")); + } snprintf(path, sizeof (path), "%s/lib/siconv/%s", INS_BASE, name); return (fopen(path, "r")); } + /* * Create a new translation either from a file or from iconv_open() */ @@ -265,6 +360,7 @@ if ((cs2uni = (UInt16_t *) malloc(sizeof (UInt16_t) * TAB_SIZE)) == NULL) { + fclose(f); return ((siconvt_t *)NULL); } @@ -358,6 +454,7 @@ sip->sic_uni2cd = NULL; sip->sic_alt = NULL; sip->sic_next = NULL; + sip->sic_refcnt = 1; return (insert_sic(sip)); } @@ -368,7 +465,7 @@ /* * Create a new translation from iconv_open() */ -LOCAL siconvt_t * +LOCAL siconvt_t * create_iconv_sic(name) char *name; { @@ -406,6 +503,7 @@ sip->sic_uni2cd = to; sip->sic_alt = NULL; sip->sic_next = NULL; + sip->sic_refcnt = 1; return (insert_sic(sip)); } @@ -420,12 +518,15 @@ siconvt_t *sp; iconv_t to; iconv_t from; - char *nm = sip->sic_name; + char *nm; if ((sp = (siconvt_t *)malloc(sizeof (siconvt_t))) == NULL) { return ((siconvt_t *)NULL); } + nm = sip->sic_name; + if (strncmp("iconv:", nm, 6) == 0) + nm = &nm[6]; if ((from = iconv_open("UCS-2BE", nm)) == (iconv_t)-1) { free(sp); return ((siconvt_t *)NULL); @@ -435,13 +536,14 @@ iconv_close(from); return ((siconvt_t *)NULL); } - sp->sic_name = nm; /* Allow to compare name pointers */ - sip->sic_uni2cs = NULL; - sip->sic_cs2uni = NULL; - sip->sic_cd2uni = from; - sip->sic_uni2cd = to; + sp->sic_name = sip->sic_name; /* Allow to compare name pointers */ + sp->sic_uni2cs = NULL; + sp->sic_cs2uni = NULL; + sp->sic_cd2uni = from; + sp->sic_uni2cd = to; sp->sic_alt = NULL; sp->sic_next = NULL; + sp->sic_refcnt = 1; sip->sic_alt = sp; return (sp); } diff -Nru cdrtools-2.01.01a33/.links cdrtools-3.02a09/.links --- cdrtools-2.01.01a33/.links 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/.links 2017-12-08 16:22:27.000000000 +0000 @@ -0,0 +1,432 @@ +./btcflash/cd_misc.c +./btcflash/io.c +./btcflash/misc.c +./btcflash/scsi_cdr.c +./btcflash/scsi_scan.c +./cdda2wav/acgeneral.m4 +./cdda2wav/aclocal.m4 +./cdda2wav/acoldnames.m4 +./cdda2wav/acspecific.m4 +./cdda2wav/autoconf +./cdda2wav/autoconf.m4 +./cdda2wav/autoheader.m4 +./cdda2wav/cd_misc.c +./cdda2wav/config.guess +./cdda2wav/config.sub +./cdda2wav/install-sh +./cdda2wav/priv.c +./cdda2wav/scsi_cdr.c +./cdda2wav/scsi_scan.c +./mkisofs/diag/scsi.c +./readcd/cd_misc.c +./readcd/misc.c +./readcd/movesect.c +./readcd/priv.c +./readcd/scsi_cdr.c +./readcd/scsi_mmc.c +./readcd/scsi_scan.c +./RULES/9000-710-hp-ux-cc.rul +./RULES/9000-710-hp-ux-cc64.rul +./RULES/9000-710-hp-ux-gcc.rul +./RULES/9000-712-hp-ux-cc.rul +./RULES/9000-712-hp-ux-cc64.rul +./RULES/9000-712-hp-ux-gcc.rul +./RULES/9000-715-hp-ux-cc.rul +./RULES/9000-715-hp-ux-cc64.rul +./RULES/9000-715-hp-ux-gcc.rul +./RULES/9000-725-hp-ux-cc64.rul +./RULES/9000-735-hp-ux-cc.rul +./RULES/9000-735-hp-ux-cc64.rul +./RULES/9000-735-hp-ux-gcc.rul +./RULES/9000-743-hp-ux-cc.rul +./RULES/9000-743-hp-ux-cc64.rul +./RULES/9000-743-hp-ux-gcc.rul +./RULES/9000-755-hp-ux-cc.rul +./RULES/9000-755-hp-ux-cc64.rul +./RULES/9000-755-hp-ux-gcc.rul +./RULES/9000-777-hp-ux-cc.rul +./RULES/9000-777-hp-ux-cc64.rul +./RULES/9000-777-hp-ux-gcc.rul +./RULES/9000-778-hp-ux-cc.rul +./RULES/9000-778-hp-ux-cc64.rul +./RULES/9000-778-hp-ux-gcc.rul +./RULES/9000-780-hp-ux-cc.rul +./RULES/9000-780-hp-ux-cc64.rul +./RULES/9000-780-hp-ux-gcc.rul +./RULES/9000-782-hp-ux-cc.rul +./RULES/9000-782-hp-ux-cc64.rul +./RULES/9000-782-hp-ux-gcc.rul +./RULES/9000-785-hp-ux-cc.rul +./RULES/9000-785-hp-ux-cc64.rul +./RULES/9000-785-hp-ux-gcc.rul +./RULES/9000-800-hp-ux-cc.rul +./RULES/9000-800-hp-ux-cc64.rul +./RULES/9000-800-hp-ux-gcc.rul +./RULES/9000-820-hp-ux-cc.rul +./RULES/9000-820-hp-ux-cc64.rul +./RULES/9000-820-hp-ux-gcc.rul +./RULES/9000-831-hp-ux-cc.rul +./RULES/9000-831-hp-ux-cc64.rul +./RULES/9000-831-hp-ux-gcc.rul +./RULES/9000-899-hp-ux-cc.rul +./RULES/9000-899-hp-ux-cc64.rul +./RULES/9000-899-hp-ux-gcc.rul +./RULES/aarch64-linux-cc.rul +./RULES/aarch64-linux-clang.rul +./RULES/aarch64-linux-clang32.rul +./RULES/aarch64-linux-clang64.rul +./RULES/aarch64-linux-gcc.rul +./RULES/aarch64-linux-gcc32.rul +./RULES/aarch64-linux-gcc64.rul +./RULES/aarch64-sunos5-clang.rul +./RULES/aarch64-sunos5-clang32.rul +./RULES/aarch64-sunos5-clang64.rul +./RULES/aarch64-sunos5-gcc.rul +./RULES/aarch64-sunos5-gcc32.rul +./RULES/aarch64-sunos5-gcc64.rul +./RULES/alpha-linux-cc.rul +./RULES/alpha-linux-gcc.rul +./RULES/alpha-netbsd-cc.rul +./RULES/alpha-netbsd-gcc.rul +./RULES/alphaserver_ds20_500_mhz-openvms-cc.rul +./RULES/amd64-bitrig-clang32.rul +./RULES/amd64-bitrig-clang64.rul +./RULES/amd64-freebsd-cc.rul +./RULES/amd64-freebsd-clang.rul +./RULES/amd64-freebsd-clang32.rul +./RULES/amd64-freebsd-clang64.rul +./RULES/amd64-freebsd-gcc.rul +./RULES/amd64-gnu-kfreebsd-cc.rul +./RULES/amd64-gnu-kfreebsd-gcc.rul +./RULES/amd64-gnu-kfreebsd-gcc32.rul +./RULES/amd64-netbsd-cc.rul +./RULES/amd64-netbsd-gcc.rul +./RULES/amd64-openbsd-cc.rul +./RULES/amd64-openbsd-gcc.rul +./RULES/amiga-netbsd-cc.rul +./RULES/amiga-netbsd-gcc.rul +./RULES/aranym-freemint-gcc.rul +./RULES/arm64-freebsd-clang.rul +./RULES/arm64-freebsd-clang32.rul +./RULES/arm64-freebsd-clang64.rul +./RULES/armv4l-linux-cc.rul +./RULES/armv4l-linux-gcc.rul +./RULES/armv4tl-linux-cc.rul +./RULES/armv4tl-linux-gcc.rul +./RULES/armv5l-linux-cc.rul +./RULES/armv5l-linux-gcc.rul +./RULES/armv5teb-linux-cc.rul +./RULES/armv5teb-linux-gcc.rul +./RULES/armv5tejl-linux-cc.rul +./RULES/armv5tejl-linux-gcc.rul +./RULES/armv5tel-linux-cc.rul +./RULES/armv5tel-linux-gcc.rul +./RULES/armv6l-linux-cc.rul +./RULES/armv6l-linux-gcc.rul +./RULES/armv7l-linux-cc.rul +./RULES/armv7l-linux-gcc.rul +./RULES/atariclone-freemint-gcc.rul +./RULES/atariste-freemint-gcc.rul +./RULES/ataritt-freemint-gcc.rul +./RULES/bemac-beos-gcc.rul +./RULES/bemac-haiku-cc.rul +./RULES/bemac-haiku-gcc.rul +./RULES/cc-clang32.rul +./RULES/cc-clang64.rul +./RULES/cc-gcc32.rul +./RULES/cc-gcc64.rul +./RULES/cc-ibm32.rul +./RULES/cc-ibm64.rul +./RULES/cc-sunpro32.rul +./RULES/cc-sunpro64.rul +./RULES/falcon-freemint-gcc.rul +./RULES/hades-freemint-gcc.rul +./RULES/i386-bitrig-clang.rul +./RULES/i386-cygwin32_nt-cc.rul +./RULES/i386-cygwin32_nt-cl.rul +./RULES/i386-cygwin32_nt-gcc.rul +./RULES/i386-darwin-cc.rul +./RULES/i386-darwin-cc32.rul +./RULES/i386-darwin-cc64.rul +./RULES/i386-darwin-clang32.rul +./RULES/i386-darwin-clang64.rul +./RULES/i386-darwin-gcc.rul +./RULES/i386-darwin-gcc32.rul +./RULES/i386-darwin-gcc64.rul +./RULES/i386-dragonfly-cc.rul +./RULES/i386-dragonfly-gcc.rul +./RULES/i386-freebsd-clang32.rul +./RULES/i386-freebsd-clang64.rul +./RULES/i386-gnu-kfreebsd-cc.rul +./RULES/i386-gnu-kfreebsd-gcc.rul +./RULES/i386-linux-cc.rul +./RULES/i386-linux-gcc.rul +./RULES/i386-linux-suncc.rul +./RULES/i386-nextstep-cc.rul +./RULES/i386-nextstep-gcc.rul +./RULES/i486-cygwin32_nt-cc32.rul +./RULES/i486-cygwin32_nt-cc64.rul +./RULES/i486-cygwin32_nt-gcc32.rul +./RULES/i486-cygwin32_nt-gcc64.rul +./RULES/i486-gnu-kfreebsd-cc.rul +./RULES/i486-gnu-kfreebsd-gcc.rul +./RULES/i486-linux-cc.rul +./RULES/i486-linux-gcc.rul +./RULES/i486-linux-suncc.rul +./RULES/i486-ms-dos-gcc.rul +./RULES/i486-unixware-cc.rul +./RULES/i486-unixware-gcc.rul +./RULES/i586-cygwin32_nt-cc.rul +./RULES/i586-cygwin32_nt-cl.rul +./RULES/i586-cygwin32_nt-gcc.rul +./RULES/i586-gnu-kfreebsd-cc.rul +./RULES/i586-gnu-kfreebsd-gcc.rul +./RULES/i586-linux-cc64.rul +./RULES/i586-linux-clang32.rul +./RULES/i586-linux-clang64.rul +./RULES/i586-linux-gcc32.rul +./RULES/i586-linux-gcc64.rul +./RULES/i586-linux-suncc32.rul +./RULES/i586-linux-suncc64.rul +./RULES/i586-ms-dos-gcc.rul +./RULES/i586-unixware-cc.rul +./RULES/i586-unixware-gcc.rul +./RULES/i686-at386-gnu-cc.rul +./RULES/i686-at386-gnu-gcc.rul +./RULES/i686-cygwin32_nt-cc.rul +./RULES/i686-cygwin32_nt-cl.rul +./RULES/i686-cygwin32_nt-cl64.rul +./RULES/i686-cygwin32_nt-gcc.rul +./RULES/i686-cygwin32_wow-cc.rul +./RULES/i686-cygwin32_wow-cc64.rul +./RULES/i686-cygwin32_wow-cl.rul +./RULES/i686-cygwin32_wow-cl64.rul +./RULES/i686-cygwin32_wow-gcc.rul +./RULES/i686-cygwin32_wow-gcc64.rul +./RULES/i686-cygwin32_wow64-cc.rul +./RULES/i686-cygwin32_wow64-cc64.rul +./RULES/i686-cygwin32_wow64-cl.rul +./RULES/i686-cygwin32_wow64-gcc.rul +./RULES/i686-cygwin32_wow64-gcc64.rul +./RULES/i686-gnu-kfreebsd-cc.rul +./RULES/i686-gnu-kfreebsd-gcc.rul +./RULES/i686-linux-cc.rul +./RULES/i686-linux-gcc.rul +./RULES/i686-linux-suncc.rul +./RULES/i686-linux-suncc64.rul +./RULES/i686-ms-dos-gcc.rul +./RULES/i786-cygwin32_nt-cc.rul +./RULES/i786-cygwin32_nt-cl.rul +./RULES/i786-cygwin32_nt-cl64.rul +./RULES/i786-cygwin32_nt-gcc.rul +./RULES/i786-cygwin32_wow-cc.rul +./RULES/i786-cygwin32_wow-cc64.rul +./RULES/i786-cygwin32_wow-cl.rul +./RULES/i786-cygwin32_wow-cl64.rul +./RULES/i786-cygwin32_wow-gcc.rul +./RULES/i786-cygwin32_wow-gcc64.rul +./RULES/i786-cygwin32_wow64-cc.rul +./RULES/i786-cygwin32_wow64-cc64.rul +./RULES/i786-cygwin32_wow64-cl.rul +./RULES/i786-cygwin32_wow64-gcc.rul +./RULES/i786-cygwin32_wow64-gcc64.rul +./RULES/i786-ms-dos-gcc.rul +./RULES/i86pc-sunos5-cc32.rul +./RULES/i86pc-sunos5-cc64.rul +./RULES/i86pc-sunos5-clang32.rul +./RULES/i86pc-sunos5-clang64.rul +./RULES/i86pc-sunos5-gcc32.rul +./RULES/i86pc-sunos5-gcc64.rul +./RULES/ia64-hp-ux-cc.rul +./RULES/ia64-hp-ux-cc64.rul +./RULES/ia64-hp-ux-gcc.rul +./RULES/ia64-linux-cc.rul +./RULES/ia64-linux-gcc.rul +./RULES/ip17-irix-cc.rul +./RULES/ip17-irix-cc64.rul +./RULES/ip17-irix-gcc.rul +./RULES/ip17-irix-gcc64.rul +./RULES/ip20-irix-cc.rul +./RULES/ip20-irix-cc64.rul +./RULES/ip20-irix-gcc.rul +./RULES/ip20-irix-gcc64.rul +./RULES/ip22-irix-cc64.rul +./RULES/ip22-irix-gcc64.rul +./RULES/ip27-irix-cc.rul +./RULES/ip27-irix-cc64.rul +./RULES/ip27-irix-gcc.rul +./RULES/ip27-irix-gcc64.rul +./RULES/ip28-irix-cc.rul +./RULES/ip28-irix-cc64.rul +./RULES/ip28-irix-gcc.rul +./RULES/ip28-irix-gcc64.rul +./RULES/ip30-irix-cc.rul +./RULES/ip30-irix-cc64.rul +./RULES/ip30-irix-gcc.rul +./RULES/ip30-irix-gcc64.rul +./RULES/ip32-irix-cc.rul +./RULES/ip32-irix-cc64.rul +./RULES/ip32-irix-gcc.rul +./RULES/ip32-irix-gcc64.rul +./RULES/ip35-irix-cc.rul +./RULES/ip35-irix-cc64.rul +./RULES/ip35-irix-gcc.rul +./RULES/ip35-irix-gcc64.rul +./RULES/ldummy.lnk +./RULES/m68k-linux-cc.rul +./RULES/m68k-linux-gcc.rul +./RULES/m68k-nextstep-cc.rul +./RULES/m68k-nextstep-gcc.rul +./RULES/mac68k-netbsd-cc.rul +./RULES/mac68k-netbsd-gcc.rul +./RULES/macppc-netbsd-cc.rul +./RULES/macppc-netbsd-gcc.rul +./RULES/milan-freemint-gcc.rul +./RULES/mips-linux-cc.rul +./RULES/mips-linux-gcc.rul +./RULES/mips64-linux-cc.rul +./RULES/mips64-linux-gcc.rul +./RULES/mips64-linux-gcc32.rul +./RULES/mipsel-linux-cc.rul +./RULES/mipsel-linux-gcc.rul +./RULES/mk-build.id +./RULES/mk-make.id +./RULES/os-cygwin_98-4.0.id +./RULES/os-irix64.id +./RULES/os-openunix.id +./RULES/parisc-linux-cc.rul +./RULES/parisc-linux-gcc.rul +./RULES/parisc64-linux-cc.rul +./RULES/parisc64-linux-gcc.rul +./RULES/parisc64-linux-gcc32.rul +./RULES/pentium-4-unixware-cc.rul +./RULES/pentium-4-unixware-gcc.rul +./RULES/pentium-iii-unixware-cc.rul +./RULES/pentium-iii-unixware-gcc.rul +./RULES/pentium-pro-unixware-cc.rul +./RULES/pentium-pro-unixware-gcc.rul +./RULES/power-macintosh-darwin-cc32.rul +./RULES/power-macintosh-darwin-cc64.rul +./RULES/power-macintosh-darwin-gcc32.rul +./RULES/power-macintosh-darwin-gcc64.rul +./RULES/power-macintosh-mac-os10-cc.rul +./RULES/power-macintosh-mac-os10-gcc.rul +./RULES/ppc-linux-cc.rul +./RULES/ppc-linux-gcc.rul +./RULES/ppc64-linux-cc.rul +./RULES/ppc64-linux-gcc.rul +./RULES/ppc64le-linux-cc.rul +./RULES/ppc64le-linux-gcc.rul +./RULES/r-build.dep +./RULES/r-build.obj +./RULES/r-build.tag +./RULES/r-gmake.obj +./RULES/r-sunpro.tag +./RULES/r-sunpro.obj +./RULES/rs6000-aix-cc32.rul +./RULES/rs6000-aix-cc64.rul +./RULES/rs6000-aix-gcc32.rul +./RULES/rs6000-aix-gcc64.rul +./RULES/s390-linux-cc.rul +./RULES/s390-linux-gcc.rul +./RULES/s390x-linux-cc.rul +./RULES/s390x-linux-gcc.rul +./RULES/sh3-linux-cc.rul +./RULES/sh3-linux-gcc.rul +./RULES/sh4-linux-cc.rul +./RULES/sh4-linux-gcc.rul +./RULES/sh4a-linux-cc.rul +./RULES/sh4a-linux-gcc.rul +./RULES/sparc-bsd-os-cc.rul +./RULES/sparc-bsd-os-gcc.rul +./RULES/sparc-bsd-os3-cc.rul +./RULES/sparc-bsd-os3-gcc.rul +./RULES/sparc-linux-cc.rul +./RULES/sparc-linux-gcc.rul +./RULES/sparc-netbsd-cc.rul +./RULES/sparc-netbsd-gcc.rul +./RULES/sparc-nextstep-cc.rul +./RULES/sparc-nextstep-gcc.rul +./RULES/sparc64-freebsd-cc.rul +./RULES/sparc64-freebsd-gcc.rul +./RULES/sparc64-linux-cc.rul +./RULES/sparc64-linux-gcc.rul +./RULES/sparc64-linux-gcc32.rul +./RULES/sparc64-linux-gcc64.rul +./RULES/sun4-sunos5-cc32.rul +./RULES/sun4-sunos5-cc64.rul +./RULES/sun4-sunos5-clang32.rul +./RULES/sun4-sunos5-clang64.rul +./RULES/sun4-sunos5-gcc32.rul +./RULES/sun4-sunos5-gcc64.rul +./RULES/sun4c-sunos4-cc.rul +./RULES/sun4c-sunos4-gcc.rul +./RULES/sun4c-sunos5-cc.rul +./RULES/sun4c-sunos5-gcc.rul +./RULES/sun4d-sunos5-cc.rul +./RULES/sun4d-sunos5-gcc.rul +./RULES/sun4e-sunos5-cc.rul +./RULES/sun4e-sunos5-gcc.rul +./RULES/sun4L-sunos5-cc.rul +./RULES/sun4L-sunos5-gcc.rul +./RULES/sun4m-sunos4-cc.rul +./RULES/sun4m-sunos4-gcc.rul +./RULES/sun4m-sunos5-cc.rul +./RULES/sun4m-sunos5-gcc.rul +./RULES/sun4u-sunos5-cc.rul +./RULES/sun4u-sunos5-cc64.rul +./RULES/sun4u-sunos5-gcc.rul +./RULES/sun4u-sunos5-gcc64.rul +./RULES/sun4us-sunos5-cc.rul +./RULES/sun4us-sunos5-cc64.rul +./RULES/sun4us-sunos5-gcc.rul +./RULES/sun4us-sunos5-gcc64.rul +./RULES/sun4v-sunos5-cc.rul +./RULES/sun4v-sunos5-cc64.rul +./RULES/sun4v-sunos5-gcc.rul +./RULES/sun4v-sunos5-gcc64.rul +./RULES/x86_64-cygwin32_nt-gcc.rul +./RULES/x86_64-cygwin32_nt-gcc32.rul +./RULES/x86_64-cygwin32_nt-gcc64.rul +./RULES/x86_64-darwin-cc.rul +./RULES/x86_64-darwin-cc32.rul +./RULES/x86_64-darwin-cc64.rul +./RULES/x86_64-darwin-clang.rul +./RULES/x86_64-darwin-clang32.rul +./RULES/x86_64-darwin-clang64.rul +./RULES/x86_64-darwin-gcc.rul +./RULES/x86_64-darwin-gcc32.rul +./RULES/x86_64-darwin-gcc64.rul +./RULES/x86_64-dragonfly-cc.rul +./RULES/x86_64-dragonfly-gcc.rul +./RULES/x86_64-gnu-kfreebsd-cc.rul +./RULES/x86_64-gnu-kfreebsd-gcc.rul +./RULES/x86_64-gnu-kfreebsd-gcc32.rul +./RULES/x86_64-haiku-cc.rul +./RULES/x86_64-haiku-gcc.rul +./RULES/x86_64-linux-cc.rul +./RULES/x86_64-linux-clang.rul +./RULES/x86_64-linux-clang32.rul +./RULES/x86_64-linux-clang64.rul +./RULES/x86_64-linux-gcc.rul +./RULES/x86_64-linux-gcc32.rul +./RULES/x86_64-linux-gcc64.rul +./RULES/x86_64-linux-suncc.rul +./RULES/x86_64-linux-suncc64.rul +./TEMPLATES/cmd.mk +./TEMPLATES/inc.mk +./TEMPLATES/ldummy.lnk +./TEMPLATES/lib.mk +./TEMPLATES/shl.mk +./TEMPLATES/temp-clang32.rul +./TEMPLATES/temp-clang64.rul +./TEMPLATES/temp-gcc32.rul +./TEMPLATES/temp-gcc64.rul +./scgcheck/cd_misc.c +./scgcheck/scsi_cdr.c +./scgcheck/scsi_scan.c +./scgskeleton/cd_misc.c +./scgskeleton/io.c +./scgskeleton/misc.c +./scgskeleton/scsi_cdr.c +./scgskeleton/scsi_scan.c diff -Nru cdrtools-2.01.01a33/man/man4/makefiles.4 cdrtools-3.02a09/man/man4/makefiles.4 --- cdrtools-2.01.01a33/man/man4/makefiles.4 2001-04-29 11:28:20.000000000 +0000 +++ cdrtools-3.02a09/man/man4/makefiles.4 2009-04-10 22:08:53.000000000 +0000 @@ -1,4 +1,4 @@ -. \" @(#)makefiles.4 1.6 01/04/29 Copyr 1996 J. Schilling +. \" @(#)makefiles.4 1.7 09/04/11 Copyr 1996 J. Schilling . \" User Manual page for makefile system . \" .if t .ds a \v'-0.55m'\h'0.00n'\z.\h'0.40n'\z.\v'0.55m'\h'-0.40n'a @@ -836,7 +836,7 @@ .B smake only. It contains operating system specific defines for the compiler -(e.g. -D__SVR4). +(e.g. \-D__SVR4). .br Do not change this macro. . diff -Nru cdrtools-2.01.01a33/Mcsw cdrtools-3.02a09/Mcsw --- cdrtools-2.01.01a33/Mcsw 2007-06-16 14:15:52.000000000 +0000 +++ cdrtools-3.02a09/Mcsw 2011-09-28 16:49:01.000000000 +0000 @@ -1,4 +1,4 @@ -#ident %W% %E% %Q% +#ident @(#)Mcsw 1.4 11/09/28 ########################################################################### deftgt: SRCROOT= . @@ -13,14 +13,15 @@ PROJECTNAME= CSWschily-10.06.2006 TARGET_AR= opt-schily-0.99 INS_BASE= /opt/csw -COPTX="-DSEEK_DATA=3 -DSEEK_HOLE=4 -D_PC_MIN_HOLE_SIZE=21 -DNO_DOIT" +COPTX="-DSEEK_DATA=3 -DSEEK_HOLE=4 -D_PC_MIN_HOLE_SIZE=21 -DNO_DOIT -DNO_DEFAULTS_PATH" +PKG_TYPE=CSW deftgt: $(MAKE) -f Mcsw INS_BASE=$(INS_BASE) COPTX=$(COPTX) all $(MAKE) -f Mcsw INS_BASE=$(INS_BASE) COPTX=$(COPTX) all #$(MAKE) -f Mcsw INS_BASE=/ COPTX=$(COPTX) pkg1 $(MAKE) -f Mcsw INS_BASE=$(INS_BASE) COPTX=$(COPTX) pkg1 - fakeroot '$(MAKE) -f Mcsw INS_BASE=$(INS_BASE) COPTX=$(COPTX) package PKGTYPE=CSW' + fakeroot '$(MAKE) -f Mcsw INS_BASE=$(INS_BASE) COPTX=$(COPTX) package PKGTYPE=$(PKG_TYPE)' STRIPLIST= ./$(INS_BASE)/*bin/* ./$(INS_BASE)/ccs/bin/* STRIPXLIST= ./$(INS_BASE)/lib/*.so.* @@ -29,9 +30,7 @@ PRE_INST_CMDS= mkdir -p etc/default POST_INST_CMDS= mkdir -p usr/bin; \ (cd usr/bin; ln -s ../../$(INS_BASE)/bin/* . ; rm -f cut paste label tar mt); \ - (cd ./$(INS_BASE)/bin; ln -s ../ccs/bin/sccs sccs); \ - mkdir -p usr/ccs/bin; \ - mv ./$(INS_BASE)/etc/default/* etc/default + mkdir -p usr/ccs/bin; POST_STRIP_CMDS= chmod -f u=rwx,g=x,o=x,u+s \ ./$(INS_BASE)/bin/readcd ./$(INS_BASE)/bin/cdda2wav \ ./$(INS_BASE)/bin/smt ./$(INS_BASE)/bin/sdd \ diff -Nru cdrtools-2.01.01a33/mkisofs/apple.c cdrtools-3.02a09/mkisofs/apple.c --- cdrtools-2.01.01a33/mkisofs/apple.c 2007-07-25 22:50:26.000000000 +0000 +++ cdrtools-3.02a09/mkisofs/apple.c 2016-10-10 21:17:18.000000000 +0000 @@ -1,11 +1,12 @@ -/* @(#)apple.c 1.29 07/07/26 joerg, Copyright 1997, 1998, 1999, 2000 James Pearson */ +/* @(#)apple.c 1.46 16/10/10 joerg, Copyright 1997, 1998, 1999, 2000 James Pearson, Copyright 2000-2016 J. Schilling */ +#include #ifndef lint -static char sccsid[] = - "@(#)apple.c 1.29 07/07/26 joerg, Copyright 1997, 1998, 1999, 2000 James Pearson"; +static UConst char sccsid[] = + "@(#)apple.c 1.46 16/10/10 joerg, Copyright 1997, 1998, 1999, 2000 James Pearson, Copyright 2000-2016 J. Schilling"; #endif /* * Copyright (c) 1997, 1998, 1999, 2000 James Pearson - * Copyright (c) 2000-2007 J. Schilling + * Copyright (c) 2000-2016 J. Schilling * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -38,20 +39,18 @@ * Check file size = finder + rsrc [+ data] is needed */ -#ifdef APPLE_HYB - -#include #include "mkisofs.h" #include #include #include -#include -#ifdef HAVE_NETINET_IN_H -#include -#endif -#include "apple.h" +#include +#include #include +#ifdef APPLE_HYB + +#include "apple.h" + /* tidy up mkisofs definition ... */ typedef struct directory_entry dir_ent; @@ -572,15 +571,15 @@ info.fi_magic == FI_MAGIC && info.fi_bitmap & FI_BM_MACINTOSHFILENAME) { /* use the finderinfo name if it exists */ - cstrncpy((char *) (hfs_ent->name), - (char *) (info.fi_macfilename), HFS_MAX_FLEN); + cstrncpy((char *)(hfs_ent->name), + (char *)(info.fi_macfilename), HFS_MAX_FLEN); set_Dinfo(info.finderinfo, hfs_ent); return (ret); } else { /* otherwise give it it's Unix name */ - hstrncpy((unsigned char *) (s_entry->hfs_ent->name), + hstrncpy((unsigned char *)(s_entry->hfs_ent->name), dname, HFS_MAX_FLEN); return (TYPE_NONE); } @@ -609,11 +608,11 @@ if (info.fi_bitmap & FI_BM_MACINTOSHFILENAME) { /* use the finderinfo name if it exists */ - cstrncpy((char *) (hfs_ent->name), - (char *) (info.fi_macfilename), HFS_MAX_FLEN); + cstrncpy((char *)(hfs_ent->name), + (char *)(info.fi_macfilename), HFS_MAX_FLEN); } else { /* use Unix name */ - hstrncpy((unsigned char *) (hfs_ent->name), dname, + hstrncpy((unsigned char *)(hfs_ent->name), dname, HFS_MAX_FLEN); } @@ -637,7 +636,7 @@ /* failed to open/read finderinfo - so try afpfile mapping */ if (verbose > 2) { fprintf(stderr, - "warning: %s doesn't appear to be a %s file\n", + _("warning: %s doesn't appear to be a %s file\n"), s_entry->whole_name, hfs_types[ret].desc); } ret = get_none_info(hname, dname, s_entry, TYPE_NONE); @@ -693,7 +692,7 @@ /* failed to open/read finderinfo - so try afpfile mapping */ if (verbose > 2) { fprintf(stderr, - "warning: %s doesn't appear to be a %s file\n", + _("warning: %s doesn't appear to be a %s file\n"), s_entry->whole_name, hfs_types[ret].desc); } ret = get_none_dir(hname, dname, s_entry, TYPE_NONE); @@ -758,18 +757,18 @@ set_Finfo(uinfo->finderinfo, hfs_ent); /* set create and modified date - if they exist */ - if (uinfo->ctime) + if (d_getl(uinfo->ctime)) hfs_ent->crdate = d_getl(uinfo->ctime); - if (uinfo->mtime) + if (d_getl(uinfo->mtime)) hfs_ent->mddate = d_getl(uinfo->mtime); } else { /* failed to open/read finderinfo - so try afpfile mapping */ if (verbose > 2) { fprintf(stderr, - "warning: %s doesn't appear to be a %s file\n", + _("warning: %s doesn't appear to be a %s file\n"), s_entry->whole_name, hfs_types[ret].desc); } ret = get_none_info(hname, dname, s_entry, TYPE_NONE); @@ -793,7 +792,7 @@ s_entry1->hfs_off = ES_INFO_SIZE; } - set_733((char *) s_entry1->isorec.size, s_entry1->size); + set_733((char *)s_entry1->isorec.size, s_entry1->size); return (ret); } @@ -873,7 +872,7 @@ crc_calc = calc_mb_crc((unsigned char *) info, 124, 0); crc_file = d_getw(info->crc); #ifdef DEBUG - fprintf(stderr, "%s: file %d, calc %d\n", hname, + fprintf(stderr, _("%s: file %d, calc %d\n"), hname, crc_file, crc_calc); #endif /* DEBUG */ if (crc_file == crc_calc) @@ -911,8 +910,8 @@ hfs_ent = s_entry->hfs_ent; /* type and creator from finder info */ - t = (char *) (info->type); - c = (char *) (info->auth); + t = (char *)(info->type); + c = (char *)(info->auth); set_ct(hfs_ent, c, t); @@ -921,9 +920,9 @@ if (icon_pos) { hfs_ent->fdlocation.v = - d_getw((unsigned char *) info->icon_vert); + d_getw((unsigned char *)info->icon_vert); hfs_ent->fdlocation.h = - d_getw((unsigned char *) info->icon_horiz); + d_getw((unsigned char *)info->icon_horiz); } else { /* * clear HFS_FNDR_HASBEENINITED to have tidy desktop ?? @@ -941,8 +940,8 @@ hfs_ent->mddate = d_toutime(d_getl(info->mdate)); /* set name */ - hstrncpy((unsigned char *) (hfs_ent->name), - (char *) (info->name), MIN(HFS_MAX_FLEN, info->nlen)); + hstrncpy((unsigned char *)(hfs_ent->name), + (char *)(info->name), MIN(HFS_MAX_FLEN, info->nlen)); /* set correct fork sizes */ hfs_ent->u.file.dsize = d_getl(info->dflen); @@ -951,7 +950,7 @@ /* update directory entries for data fork */ s_entry->size = hfs_ent->u.file.dsize; s_entry->hfs_off = MB_SIZE; - set_733((char *) s_entry->isorec.size, s_entry->size); + set_733((char *)s_entry->isorec.size, s_entry->size); /* * real rsrc file starts after data fork (must be a multiple of @@ -959,7 +958,7 @@ */ s_entry1->size = hfs_ent->u.file.rsize; s_entry1->hfs_off = MB_SIZE + ROUND_UP(hfs_ent->u.file.dsize, MB_SIZE); - set_733((char *) s_entry1->isorec.size, s_entry1->size); + set_733((char *)s_entry1->isorec.size, s_entry1->size); } return (ret); @@ -1008,7 +1007,7 @@ d_getl(hp->version) == A_VERSION2)))) { /* read TOC of the AppleDouble file */ - nentries = (int) d_getw(hp->nentries); + nentries = (int)d_getw(hp->nentries); if (fread(hp->entries, A_ENTRY_SIZE, nentries, fp) < 1) { fail = 1; nentries = 0; @@ -1036,6 +1035,7 @@ } fclose(fp); + fp = NULL; /* skip this if we had a problem */ if (!fail) { @@ -1050,7 +1050,7 @@ * length, the rest is the actual string. * The following *should* be OK */ - if (len == 32 && (int) name[0] < 32) { + if (len == 32 && (int)name[0] < 32) { cstrncpy(hfs_ent->name, &name[1], MIN(name[0], HFS_MAX_FLEN)); } else { @@ -1058,22 +1058,22 @@ HFS_MAX_FLEN); } } else { - hstrncpy((unsigned char *) (hfs_ent->name), + hstrncpy((unsigned char *)(hfs_ent->name), dname, HFS_MAX_FLEN); } } } else { /* failed to open/read finderinfo */ fail = 1; - if (fp) - fclose(fp); } + if (fp) + fclose(fp); if (fail) { /* problem with the file - try mapping/magic */ if (verbose > 2) { fprintf(stderr, - "warning: %s doesn't appear to be a %s file\n", + _("warning: %s doesn't appear to be a %s file\n"), s_entry->whole_name, hfs_types[ret].desc); } ret = get_none_dir(hname, dname, s_entry, TYPE_NONE); @@ -1150,7 +1150,7 @@ (ver == A_VERSION1 || ver == A_VERSION2)))) { /* read TOC of the AppleDouble file */ - nentries = (int) d_getw(hp->nentries); + nentries = (int)d_getw(hp->nentries); if (fread(hp->entries, A_ENTRY_SIZE, nentries, fp) < 1) { fail = 1; nentries = 0; @@ -1171,7 +1171,7 @@ hfs_ent->u.file.rsize = s_entry1->size; /* offset to start of real rsrc fork */ s_entry1->hfs_off = d_getl(ep->offset); - set_733((char *) s_entry1->isorec.size, + set_733((char *)s_entry1->isorec.size, s_entry1->size); break; case ID_NAME: @@ -1220,6 +1220,7 @@ } fclose(fp); + fp = NULL; /* skip this if we had a problem */ if (!fail) { @@ -1233,7 +1234,7 @@ * length, the rest is the actual string. * The following *should* be OK */ - if (len == 32 && (int) name[0] < 32) { + if (len == 32 && (int)name[0] < 32) { cstrncpy(hfs_ent->name, &name[1], MIN(name[0], HFS_MAX_FLEN)); } else { @@ -1241,22 +1242,22 @@ HFS_MAX_FLEN); } } else { - hstrncpy((unsigned char *) (hfs_ent->name), + hstrncpy((unsigned char *)(hfs_ent->name), dname, HFS_MAX_FLEN); } } } else { /* failed to open/read finderinfo */ fail = 1; - if (fp) - fclose(fp); } + if (fp) + fclose(fp); if (fail) { /* problem with the file - try mapping/magic */ if (verbose > 2) { fprintf(stderr, - "warning: %s doesn't appear to be a %s file\n", + _("warning: %s doesn't appear to be a %s file\n"), s_entry->whole_name, hfs_types[ret].desc); } ret = get_none_info(hname, dname, s_entry, TYPE_NONE); @@ -1306,7 +1307,7 @@ return (TYPE_NONE); /* check we have TOC for the AppleSingle file */ - nentries = (int) d_getw(hp->nentries); + nentries = (int)d_getw(hp->nentries); if (p_num < (int)(A_HDR_SIZE + nentries * A_ENTRY_SIZE)) return (TYPE_NONE); @@ -1324,7 +1325,7 @@ hfs_ent = s_entry->hfs_ent; - nentries = (int) d_getw(hp->nentries); + nentries = (int)d_getw(hp->nentries); ver = d_getl(hp->version); /* extract what is needed */ @@ -1332,7 +1333,7 @@ switch ((int)d_getl(ep->id)) { case ID_FINDER: /* get the finder info */ - info = (FileInfo *) (p_buf + d_getl(ep->offset)); + info = (FileInfo *)(p_buf + d_getl(ep->offset)); break; case ID_DATA: /* set the offset and correct data fork size */ @@ -1340,7 +1341,7 @@ d_getl(ep->length); /* offset to start of real data fork */ s_entry->hfs_off = d_getl(ep->offset); - set_733((char *) s_entry->isorec.size, + set_733((char *)s_entry->isorec.size, s_entry->size); break; case ID_RESOURCE: @@ -1349,7 +1350,7 @@ d_getl(ep->length); /* offset to start of real rsrc fork */ s_entry1->hfs_off = d_getl(ep->offset); - set_733((char *) s_entry1->isorec.size, + set_733((char *)s_entry1->isorec.size, s_entry1->size); break; case ID_NAME: @@ -1391,7 +1392,7 @@ */ if (verbose > 2) { fprintf(stderr, - "warning: %s doesn't appear to be a %s file\n", + _("warning: %s doesn't appear to be a %s file\n"), s_entry->whole_name, hfs_types[ret].desc); } @@ -1408,14 +1409,14 @@ * format - first char is the length, the rest is the * actual string. The following *should* be OK */ - if (len == 32 && (int) name[0] < 32) { + if (len == 32 && (int)name[0] < 32) { cstrncpy(hfs_ent->name, &name[1], MIN(name[0], HFS_MAX_FLEN)); } else { cstrncpy(hfs_ent->name, name, HFS_MAX_FLEN); } } else { - hstrncpy((unsigned char *) (hfs_ent->name), dname, + hstrncpy((unsigned char *)(hfs_ent->name), dname, HFS_MAX_FLEN); } } @@ -1452,9 +1453,6 @@ *k; int i; - if ((fp = fopen(name, "rb")) == NULL) - return (NULL); - /* * no longer attempt to find out FAT cluster * - rely on command line parameter @@ -1465,6 +1463,9 @@ fe_num = afe_size / FE_SIZE; fe_pad = afe_size % FE_SIZE; + if ((fp = fopen(name, "rb")) == NULL) + return (NULL); + while (fread(&info, 1, FE_SIZE, fp) != 0) { /* the Mac name may be NULL - so ignore this entry */ @@ -1480,13 +1481,13 @@ * get the bits we need * - ignore [cm]time for the moment */ - cstrncpy(hfs_info->name, (char *) (info.name), + cstrncpy(hfs_info->name, (char *)(info.name), info.nlen); memcpy(hfs_info->finderinfo, info.finderinfo, INFOLEN); - s = (char *) (info.sname); - e = (char *) (info.ext); + s = (char *)(info.sname); + e = (char *)(info.ext); k = keyname; /* @@ -1503,7 +1504,7 @@ } /* extension - if it exists */ - if (strncmp((const char *) (info.ext), " ", 3)) { + if (strncmp((const char *)(info.ext), " ", 3)) { *k = '.'; k++; for (i = 0; i < 3; i++, e++, k++) { @@ -1515,7 +1516,7 @@ } *k = '\0'; - hfs_info1->keyname = strdup(keyname); + hfs_info1->keyname = e_strdup(keyname); } /* * each record is FE_SIZE long, and there are FE_NUM @@ -1711,7 +1712,7 @@ } /* no entry found - use extension mapping */ if (verbose > 2) { - fprintf(stderr, "warning: %s doesn't appear to be a %s file\n", + fprintf(stderr, _("warning: %s doesn't appear to be a %s file\n"), s_entry->whole_name, hfs_types[ret].desc); } ret = get_none_info(hname, dname, s_entry, TYPE_NONE); @@ -1805,7 +1806,7 @@ } /* no entry found, so try file extension */ if (verbose > 2) { - fprintf(stderr, "warning: %s doesn't appear to be a %s file\n", + fprintf(stderr, _("warning: %s doesn't appear to be a %s file\n"), s_entry->whole_name, hfs_types[ret].desc); } ret = get_none_info(hname, dname, s_entry, TYPE_NONE); @@ -1846,7 +1847,7 @@ /* failed to open/read finderinfo - so try afpfile mapping */ if (verbose > 2) { fprintf(stderr, - "warning: %s doesn't appear to be a %s file\n", + _("warning: %s doesn't appear to be a %s file\n"), s_entry->whole_name, hfs_types[ret].desc); } ret = get_none_info(hname, dname, s_entry, TYPE_NONE); @@ -1956,7 +1957,6 @@ attrinfo ainfo; struct attrlist attrs; int i; - int size; char tmphname[2048]; /* XXX is this sufficient with -find? */ strlcpy(tmphname, hname, sizeof (tmphname)); @@ -2030,7 +2030,7 @@ */ if (verbose > 2) { fprintf(stderr, - "warning: %s doesn't appear to be a %s file\n", + _("warning: %s doesn't appear to be a %s file\n"), s_entry->whole_name, hfs_types[ret].desc); } #endif @@ -2299,11 +2299,12 @@ close(p_fd); return (TYPE_NONE); } - /* get file pointer and close file */ + /* get file pointer file */ p_fp = fdopen(p_fd, "rb"); - close(p_fd); - if (p_fp == NULL) + if (p_fp == NULL) { + close(p_fd); return (TYPE_NONE); + } } } /* @@ -2627,21 +2628,21 @@ print_hfs_info(s_entry) dir_ent *s_entry; { - fprintf(stderr, "Name: %s\n", s_entry->whole_name); - fprintf(stderr, "\tFile type: %s\n", hfs_types[s_entry->hfs_type].desc); - fprintf(stderr, "\tHFS Name: %s\n", s_entry->hfs_ent->name); - fprintf(stderr, "\tISO Name: %s\n", s_entry->isorec.name); - fprintf(stderr, "\tCREATOR: '%s'\n", s_entry->hfs_ent->u.file.creator); - fprintf(stderr, "\tTYPE: '%s'\n", s_entry->hfs_ent->u.file.type); - fprintf(stderr, "\tFlags: %d\n", s_entry->hfs_ent->fdflags); - fprintf(stderr, "\tISO-Size: %ld\n", (long)get_733(s_entry->isorec.size)); - fprintf(stderr, "\tSize: %llu\n", s_entry->size); - fprintf(stderr, "\tExtent: %ld\n", (long)get_733(s_entry->isorec.extent)); + fprintf(stderr, _("Name: %s\n"), s_entry->whole_name); + fprintf(stderr, _("\tFile type: %s\n"), hfs_types[s_entry->hfs_type].desc); + fprintf(stderr, _("\tHFS Name: %s\n"), s_entry->hfs_ent->name); + fprintf(stderr, _("\tISO Name: %s\n"), s_entry->isorec.name); + fprintf(stderr, _("\tCREATOR: '%s'\n"), s_entry->hfs_ent->u.file.creator); + fprintf(stderr, _("\tTYPE: '%s'\n"), s_entry->hfs_ent->u.file.type); + fprintf(stderr, _("\tFlags: %d\n"), s_entry->hfs_ent->fdflags); + fprintf(stderr, _("\tISO-Size: %ld\n"), (long)get_733(s_entry->isorec.size)); + fprintf(stderr, _("\tSize: %llu\n"), (Llong)s_entry->size); + fprintf(stderr, _("\tExtent: %ld\n"), (long)get_733(s_entry->isorec.extent)); if (s_entry->assoc) { - fprintf(stderr, "\tResource Name: %s\n", s_entry->assoc->whole_name); - fprintf(stderr, "\t\tISO-Size: %ld\n", (long)get_733(s_entry->assoc->isorec.size)); - fprintf(stderr, "\t\tSize: %llu\n", s_entry->assoc->size); - fprintf(stderr, "\t\tExtent: %ld\n", (long)get_733(s_entry->assoc->isorec.extent)); + fprintf(stderr, _("\tResource Name: %s\n"), s_entry->assoc->whole_name); + fprintf(stderr, _("\t\tISO-Size: %ld\n"), (long)get_733(s_entry->assoc->isorec.size)); + fprintf(stderr, _("\t\tSize: %llu\n"), (Llong)s_entry->assoc->size); + fprintf(stderr, _("\t\tExtent: %ld\n"), (long)get_733(s_entry->assoc->isorec.extent)); } } @@ -2749,7 +2750,7 @@ /* initialise magic file */ if (magic_file && init_magic(magic_file) != 0) - perr("unable to open magic file"); + comerr("Unable to open magic file '%s'.\n", magic_file); /* set defaults */ map_num = last_ent = 0; @@ -2788,7 +2789,7 @@ return; } if ((fp = fopen(name, "r")) == NULL) - perr("unable to open mapping file"); + comerr("Unable to open mapping file '%s'.\n", name); map = (afpmap **) e_malloc(NUMMAP * sizeof (afpmap *)); @@ -2805,7 +2806,7 @@ count += NUMMAP; map = (afpmap **)realloc(map, count * sizeof (afpmap *)); if (map == NULL) - perr("not enough memory"); + perr("not enough memory for mapping file"); } /* allocate memory for this entry */ amap = (afpmap *) e_malloc(sizeof (afpmap)); @@ -2818,13 +2819,12 @@ tmp, c, c + 1, c + 2, c + 3, t, t + 1, t + 2, t + 3) != 9) { fprintf(stderr, - "error scanning afpfile %s - continuing", name); + _("error scanning afpfile %s - continuing\n"), name); free(amap); continue; } /* copy the extension found */ - if ((amap->extn = (char *) strdup(tmp)) == NULL) - perr("not enough memory"); + amap->extn = e_strdup(tmp); /* set end-of-string */ *(t + 4) = *(c + 4) = '\0'; @@ -2850,12 +2850,13 @@ map[map_num++] = amap; } + fclose(fp); /* free up some memory */ if (map_num != count) { map = (afpmap **) realloc(map, map_num * sizeof (afpmap *)); if (map == NULL) - perr("not enough memory"); + perr("not enough memory for mapping file"); } } @@ -2976,8 +2977,6 @@ clean_magic(); } -#endif /* APPLE_HYB */ - /* * We are in hope that errno is set up by libhfs_iso if there * is no system error code. @@ -2987,7 +2986,96 @@ char *a; { if (a) - comerr("%s\n", a); + comerr("%s\n", _(a)); else - comerr("\n"); + comerr(_("\n")); +} +#endif /* APPLE_HYB */ + + +#ifndef APPLE_HFS_HYB + +/* + * Convert 2 bytes in big-endian format into local host format + */ +EXPORT short +d_getw(p) + Uchar *p; +{ + return ((short)((p[0] << 8) | p[1])); +} + +/* + * Convert 4 bytes in big-endian format into local host format + */ +EXPORT long +d_getl(p) + Uchar *p; +{ + return ((long)((p[0] << 24) | (p[1] << 16) | (p[2] << 8) | p[3])); +} + +/* + * Apple v1 strores dates beginnign with 1st Jan 1904 + * Apple v2 strores dates beginnign with 1st Jan 2000 + */ +#define V2TDIFF 946684800L /* 30 years (1970 .. 2000) */ +#define V1TDIFF 2082844800L /* 66 years (1904 .. 1970) */ +#define TZNONE 0x0F0F0F0F /* no valid time */ + +LOCAL unsigned long tzdiff = TZNONE; + +/* + * Calculate the timezone difference between local time and UTC + */ +LOCAL void +inittzdiff() +{ + time_t now; + struct tm tm; + struct tm *lmp; + struct tm *gmp; + + time(&now); + lmp = localtime(&now); + gmp = gmtime(&now); + + tzdiff = 0; + if (lmp && gmp) { + tm = *gmp; + tm.tm_isdst = lmp->tm_isdst; + + tzdiff = now - mktime(&tm); + } +} + +/* + * Convert Macintosh time to UNIX time + */ +EXPORT unsigned long +d_toutime(secs) + unsigned long secs; +{ + time_t utime = secs; + + if (tzdiff == TZNONE) + inittzdiff(); + + return (utime - V1TDIFF - tzdiff); +} + +/* + * Convert Apple Double v2 time to UNIX time + */ +EXPORT unsigned long +d_dtoutime(secs) + long secs; +{ + time_t utime = secs; + + if (tzdiff == TZNONE) + inittzdiff(); + + return (utime + V2TDIFF - tzdiff); } +#endif /* !APPLE_HFS_HYB */ diff -Nru cdrtools-2.01.01a33/mkisofs/apple_driver.c cdrtools-3.02a09/mkisofs/apple_driver.c --- cdrtools-2.01.01a33/mkisofs/apple_driver.c 2006-09-13 16:04:59.000000000 +0000 +++ cdrtools-3.02a09/mkisofs/apple_driver.c 2017-07-16 22:05:41.000000000 +0000 @@ -1,7 +1,7 @@ -/* @(#)apple_driver.c 1.7 06/09/13 joerg */ +/* @(#)apple_driver.c 1.10 17/07/17 joerg */ #ifndef lint static char sccsid[] = - "@(#)apple_driver.c 1.7 06/09/13 joerg"; + "@(#)apple_driver.c 1.10 17/07/17 joerg"; #endif /* * apple_driver.c: extract Mac partition label, maps and boot driver @@ -25,31 +25,36 @@ * Apple Computer, Inc. Software License Agreements. * * James Pearson 17/5/98 + * Copyright (c) 1998-2010,2017 J. Schilling */ #include #include "mkisofs.h" -#include +#include "mac_label.h" #include -EXPORT int get_732 __PR((char *p)); -EXPORT int get_722 __PR((char *p)); -EXPORT int main __PR((int argc, char **argv)); - -EXPORT int -get_732(p) - char *p; +EXPORT UInt32_t get_732 __PR((void *vp)); +EXPORT UInt32_t get_722 __PR((void *vp)); +EXPORT int main __PR((int argc, char **argv)); + +EXPORT UInt32_t +get_732(vp) + void *vp; { + Uchar *p = vp; + return ((p[3] & 0xff) | ((p[2] & 0xff) << 8) | ((p[1] & 0xff) << 16) | ((p[0] & 0xff) << 24)); } -EXPORT int -get_722(p) - char *p; +EXPORT UInt32_t +get_722(vp) + void *vp; { + Uchar *p = vp; + return ((p[1] & 0xff) | ((p[0] & 0xff) << 8)); } @@ -62,6 +67,9 @@ FILE *fp; MacLabel *mac_label; MacPart *mac_part; +#if defined(USE_NLS) + char *dir; +#endif unsigned char Block0[HFS_BLOCKSZ]; unsigned char block[SECTOR_SIZE]; unsigned char bootb[2*HFS_BLOCKSZ]; @@ -77,80 +85,99 @@ save_args(argc, argv); + (void) setlocale(LC_ALL, ""); + +#if defined(USE_NLS) +#if !defined(TEXT_DOMAIN) /* Should be defined by cc -D */ +#define TEXT_DOMAIN "mkisofs" /* Use this only if it weren't */ +#endif + dir = searchfileinpath("share/locale", F_OK, + SIP_ANY_FILE|SIP_NO_PATH, NULL); + if (dir) + (void) bindtextdomain(TEXT_DOMAIN, dir); + else +#ifdef PROTOTYPES + (void) bindtextdomain(TEXT_DOMAIN, INS_BASE "/share/locale"); +#else + (void) bindtextdomain(TEXT_DOMAIN, "/usr/share/locale"); +#endif + (void) textdomain(TEXT_DOMAIN); +#endif + if (argc != 2) - comerrno(EX_BAD, "Usage: %s device-path", argv[0]); + comerrno(EX_BAD, _("Usage: %s device-path\n"), argv[0]); if ((fp = fopen(argv[1], "rb")) == NULL) - comerr("Can't open '%s'.", argv[1]); + comerr(_("Can't open '%s'.\n"), argv[1]); if (fread(Block0, 1, HFS_BLOCKSZ, fp) != HFS_BLOCKSZ) - comerr("Can't read '%s'.", argv[1]); + comerr(_("Can't read '%s'.\n"), argv[1]); mac_label = (MacLabel *)Block0; mac_part = (MacPart *)block; - sbBlkSize = get_722((char *)mac_label->sbBlkSize); + sbBlkSize = get_722(mac_label->sbBlkSize); if (! IS_MAC_LABEL(mac_label) || sbBlkSize != SECTOR_SIZE) - comerrno(EX_BAD, "%s is not a bootable Mac disk", argv[1]); + comerrno(EX_BAD, _("%s is not a bootable Mac disk.\n"), argv[1]); i = 1; do { if (fseek(fp, i * HFS_BLOCKSZ, SEEK_SET) != 0) - comerr("Ccan't seek %s", argv[1]); + comerr(_("Can't seek '%s'.\n"), argv[1]); if (fread(block, 1, HFS_BLOCKSZ, fp) != HFS_BLOCKSZ) - comerr("Can't read '%s'.", argv[1]); + comerr(_("Can't read '%s'.\n"), argv[1]); - pmMapBlkCnt = get_732((char *)mac_part->pmMapBlkCnt); + pmMapBlkCnt = get_732(mac_part->pmMapBlkCnt); if (!have_boot && strncmp((char *)mac_part->pmPartType, pmPartType_2, 12) == 0) { - hfs_start = get_732((char *)mac_part->pmPyPartStart); + hfs_start = get_732(mac_part->pmPyPartStart); - fprintf(stderr, "%s: found 512 driver partition (at block %d)\n", argv[0], hfs_start); + fprintf(stderr, _("%s: found 512 driver partition (at block %d).\n"), argv[0], hfs_start); memcpy(pmBlock512, block, HFS_BLOCKSZ); have_boot = 1; } if (!have_hfs && strncmp((char *)mac_part->pmPartType, pmPartType_4, 9) == 0) { - hfs_start = get_732((char *)mac_part->pmPyPartStart); + hfs_start = get_732(mac_part->pmPyPartStart); if (fseek(fp, hfs_start*HFS_BLOCKSZ, SEEK_SET) != 0) - comerr("Can't seek '%s'.", argv[1]); + comerr(_("Can't seek '%s'.\n"), argv[1]); if (fread(bootb, 2, HFS_BLOCKSZ, fp) != HFS_BLOCKSZ) - comerr("Can't read '%s'.", argv[1]); + comerr(_("Can't read '%s'.\n"), argv[1]); - if (get_722((char *)bootb) == 0x4c4b) { + if (get_722(bootb) == 0x4c4b) { - fprintf(stderr, "%s: found HFS partition (at blk %d)\n", argv[0], hfs_start); + fprintf(stderr, _("%s: found HFS partition (at blk %d).\n"), argv[0], hfs_start); have_hfs = 1; } } } while (i++ < pmMapBlkCnt); if (!have_hfs || !have_boot) - comerrno(EX_BAD, "%s is not a bootable Mac disk", argv[1]); + comerrno(EX_BAD, _("%s is not a bootable Mac disk.\n"), argv[1]); i = 1; do { if (fseek(fp, i*sbBlkSize, SEEK_SET) != 0) - comerr("Can't seek '%s'.", argv[1]); + comerr(_("Can't seek '%s'.\n"), argv[1]); if (fread(block, 1, HFS_BLOCKSZ, fp) != HFS_BLOCKSZ) - comerr("Can't read '%s'.", argv[1]); + comerr(_("Can't read '%s'.\n"), argv[1]); - pmMapBlkCnt = get_732((char *)mac_part->pmMapBlkCnt); + pmMapBlkCnt = get_732(mac_part->pmMapBlkCnt); if (strncmp((char *)mac_part->pmPartType, pmPartType_2, 12) == 0) { int start, num; - fprintf(stderr, "%s: extracting %s ", argv[0], mac_part->pmPartType); - start = get_732((char *)mac_part->pmPyPartStart); - num = get_732((char *)mac_part->pmPartBlkCnt); + fprintf(stderr, _("%s: extracting %s "), argv[0], mac_part->pmPartType); + start = get_732(mac_part->pmPyPartStart); + num = get_732(mac_part->pmPartBlkCnt); fwrite(Block0, 1, HFS_BLOCKSZ, stdout); fwrite(block, 1, HFS_BLOCKSZ, stdout); fwrite(pmBlock512, 1, HFS_BLOCKSZ, stdout); @@ -158,11 +185,11 @@ fwrite(block, 1, HFS_BLOCKSZ, stdout); if (fseek(fp, start*sbBlkSize, SEEK_SET) != 0) - comerr("Can't seek '%s'.", argv[1]); + comerr(_("Can't seek '%s'.\n"), argv[1]); for (j = 0; j < num; j++) { if (fread(block, 1, sbBlkSize, fp) != sbBlkSize) - comerr("Can't read '%s'.", argv[1]); + comerr(_("Can't read '%s'.\n"), argv[1]); fwrite(block, 1, sbBlkSize, stdout); fprintf(stderr, "."); @@ -175,9 +202,10 @@ } if (!IS_MAC_PART(mac_part)) - comerrno(EX_BAD, "Unable to find boot partition"); + comerrno(EX_BAD, _("Unable to find boot partition.\n")); } while (i++ < pmMapBlkCnt); + fclose(fp); return (0); } diff -Nru cdrtools-2.01.01a33/mkisofs/apple_driver.mk cdrtools-3.02a09/mkisofs/apple_driver.mk --- cdrtools-2.01.01a33/mkisofs/apple_driver.mk 2006-10-03 22:20:54.000000000 +0000 +++ cdrtools-3.02a09/mkisofs/apple_driver.mk 2010-12-19 19:16:30.000000000 +0000 @@ -1,4 +1,4 @@ -#ident @(#)apple_driver.mk 1.2 06/10/04 +#ident @(#)apple_driver.mk 1.3 10/12/19 ########################################################################### # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License version 2 @@ -23,6 +23,9 @@ CPPOPTS += -DAPPLE_HYB CPPOPTS += -I../libhfs_iso/ CPPOPTS += -I../cdrecord +CPPOPTS += -DINS_BASE=\"${INS_BASE}\" +CPPOPTS += -DTEXT_DOMAIN=\"SCHILY_cdrtools\" + CFILES= apple_driver.c HFILES= config.h mac_label.h mkisofs.h LIBS= -lschily diff -Nru cdrtools-2.01.01a33/mkisofs/boot.c cdrtools-3.02a09/mkisofs/boot.c --- cdrtools-2.01.01a33/mkisofs/boot.c 2007-02-17 15:48:16.000000000 +0000 +++ cdrtools-3.02a09/mkisofs/boot.c 2016-10-23 17:20:55.000000000 +0000 @@ -1,30 +1,17 @@ -/* @(#)boot.c 1.20 07/02/17 Copyright 1999-2007 J. Schilling */ +/* @(#)boot.c 1.28 16/10/23 Copyright 1999-2016 J. Schilling */ +#include #ifndef lint -static char sccsid[] = - "@(#)boot.c 1.20 07/02/17 Copyright 1999-2007 J. Schilling"; +static UConst char sccsid[] = + "@(#)boot.c 1.28 16/10/23 Copyright 1999-2016 J. Schilling"; #endif /* * Support for generic boot (sector 0..16) * and to boot Sun sparc and Sun x86 systems. * - * Copyright (c) 1999-2007 J. Schilling - */ -/* - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 - * as published by the Free Software Foundation. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License along with - * this program; see the file COPYING. If not, write to the Free Software - * Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * Copyright (c) 1999-2016 J. Schilling */ +/*@@C@@*/ -#include #include "mkisofs.h" #include #include @@ -50,9 +37,9 @@ LOCAL void dup_sun_label __PR((int part)); LOCAL int sunboot_write __PR((FILE *outfile)); LOCAL int sunlabel_size __PR((UInt32_t starting_extent)); -LOCAL int sunlabel_write __PR((FILE * outfile)); +LOCAL int sunlabel_write __PR((FILE *outfile)); LOCAL int genboot_size __PR((UInt32_t starting_extent)); -LOCAL int genboot_write __PR((FILE * outfile)); +LOCAL int genboot_write __PR((FILE *outfile)); /* * Set the virtual geometry in the disk label. @@ -142,14 +129,14 @@ if (use_sunx86boot) comerrno(EX_BAD, - "-sparc-boot and -sunx86-boot are mutual exclusive.\n"); + _("-sparc-boot and -sunx86-boot are mutual exclusive.\n")); use_sparcboot++; init_sparc_label(); do { if (i >= NDKMAP) - comerrno(EX_BAD, "Too many boot partitions.\n"); + comerrno(EX_BAD, _("Too many boot partitions.\n")); boot_files[i++] = files; if ((p = strchr(files, ',')) != NULL) *p++ = '\0'; @@ -167,7 +154,7 @@ status = stat_filter(p, &statbuf); if (status < 0 || access(p, R_OK) < 0) - comerr("Cannot access '%s'.\n", p); + comerr(_("Cannot access '%s'.\n"), p); i_to_4_byte(cd_label.dkl_map[i].dkl_nblk, roundup(statbuf.st_size, CD_CYLSIZE)/512); @@ -191,7 +178,7 @@ if (use_sparcboot) comerrno(EX_BAD, - "-sparc-boot and -sunx86-boot are mutual exclusive.\n"); + _("-sparc-boot and -sunx86-boot are mutual exclusive.\n")); use_sunx86boot++; @@ -199,7 +186,7 @@ do { if (i >= NDKMAP) - comerrno(EX_BAD, "Too many boot partitions.\n"); + comerrno(EX_BAD, _("Too many boot partitions.\n")); boot_files[i++] = files; if ((p = strchr(files, ',')) != NULL) *p++ = '\0'; @@ -218,12 +205,12 @@ continue; if (i == 1 || i == 2) { comerrno(EX_BAD, - "Partition %d may not have a filename.\n", i); + _("Partition %d may not have a filename.\n"), i); } status = stat_filter(p, &statbuf); if (status < 0 || access(p, R_OK) < 0) - comerr("Cannot access '%s'.\n", p); + comerr(_("Cannot access '%s'.\n"), p); li_to_4_byte(sx86_label.dkl_vtoc.v_part[i].p_size, roundup(statbuf.st_size, CD_CYLSIZE)/512); @@ -292,7 +279,6 @@ int bsize; int i; int partoff = 1; /* The offset of the Solaris 0x82 partition */ - char *p; /* * Compute the size of the padding for the iso9660 image @@ -314,7 +300,6 @@ for (i = 0; i < NDKMAP; i++) { if (i == 2) /* Never include the whole disk in */ continue; /* size/offset computations */ - p = boot_files[i]; if ((nblk = la_to_4_byte(sx86_label.dkl_vtoc.v_part[i].p_size)) == 0) continue; @@ -414,19 +399,19 @@ continue; } if ((f = open(boot_files[i], O_RDONLY| O_BINARY)) < 0) - comerr("Cannot open '%s'.\n", boot_files[i]); + comerr(_("Cannot open '%s'.\n"), boot_files[i]); amt = nblk / 4; for (n = 0; n < amt; n++) { memset(buffer, 0, sizeof (buffer)); if (read(f, buffer, SECTOR_SIZE) < 0) - comerr("Read error on '%s'.\n", boot_files[i]); + comerr(_("Read error on '%s'.\n"), boot_files[i]); xfwrite(buffer, SECTOR_SIZE, 1, outfile, 0, FALSE); last_extent_written++; } close(f); } - fprintf(stderr, "Total extents including %s boot = %u\n", + fprintf(stderr, _("Total extents including %s boot = %u\n"), use_sunx86boot ? "Solaris x86":"sparc", last_extent_written - session_start); return (0); @@ -441,16 +426,16 @@ UInt32_t starting_extent; { if (last_extent != session_start) - comerrno(EX_BAD, "Cannot create sparc boot on offset != 0.\n"); + comerrno(EX_BAD, _("Cannot create sparc boot on offset != 0.\n")); last_extent++; return (0); } /* - * Cumpute the checksum and write a Sun disk label to the first sector + * Compute the checksum and write a Sun disk label to the first sector * of the disk. * If the -generic-boot option has been specified too, overlay the - * Sun disk label on the firs 512 bytes of the generic boot code. + * Sun disk label on the first 512 bytes of the generic boot code. */ LOCAL int sunlabel_write(outfile) @@ -464,10 +449,10 @@ memset(buffer, 0, sizeof (buffer)); if (genboot_image) { if ((f = open(genboot_image, O_RDONLY| O_BINARY)) < 0) - comerr("Cannot open '%s'.\n", genboot_image); + comerr(_("Cannot open '%s'.\n"), genboot_image); if (read(f, buffer, SECTOR_SIZE) < 0) - comerr("Read error on '%s'.\n", genboot_image); + comerr(_("Read error on '%s'.\n"), genboot_image); close(f); } @@ -482,7 +467,10 @@ sx86_label.dkl_cksum[0] ^= *p++; sx86_label.dkl_cksum[1] ^= *p++; } - memcpy(&buffer[0x1BE], &fdisk_part.part, 512-0x1BE); + memcpy(&buffer[0x1BE], fdisk_part.part, sizeof (fdisk_part.part)); + p = &buffer[510]; + *p++ = 0x55; + *p = 0xAA; memcpy(&buffer[1024], &sx86_label, 512); } else { /* @@ -515,7 +503,7 @@ UInt32_t starting_extent; { if (last_extent > (session_start + 1)) - comerrno(EX_BAD, "Cannot create generic boot on offset != 0.\n"); + comerrno(EX_BAD, _("Cannot create generic boot on offset != 0.\n")); last_extent = session_start + 16; return (0); } @@ -533,12 +521,12 @@ int f; if ((f = open(genboot_image, O_RDONLY| O_BINARY)) < 0) - comerr("Cannot open '%s'.\n", genboot_image); + comerr(_("Cannot open '%s'.\n"), genboot_image); for (i = 0; i < 16; i++) { memset(buffer, 0, sizeof (buffer)); if (read(f, buffer, SECTOR_SIZE) < 0) - comerr("Read error on '%s'.\n", genboot_image); + comerr(_("Read error on '%s'.\n"), genboot_image); if (i != 0 || last_extent_written == session_start) { xfwrite(buffer, SECTOR_SIZE, 1, outfile, 0, FALSE); diff -Nru cdrtools-2.01.01a33/mkisofs/cd_misc.c cdrtools-3.02a09/mkisofs/cd_misc.c --- cdrtools-2.01.01a33/mkisofs/cd_misc.c 2006-10-05 19:07:47.000000000 +0000 +++ cdrtools-3.02a09/mkisofs/cd_misc.c 1970-01-01 00:00:00.000000000 +0000 @@ -1,189 +0,0 @@ -/* @(#)cd_misc.c 1.14 06/10/05 Copyright 1997-2006 J. Schilling */ -#ifndef lint -static char sccsid[] = - "@(#)cd_misc.c 1.14 06/10/05 Copyright 1997-2006 J. Schilling"; -#endif -/* - * Misc CD support routines - * - * Copyright (c) 1997-2006 J. Schilling - */ -/* - * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. - * - * See the file CDDL.Schily.txt in this distribution for details. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file CDDL.Schily.txt from this distribution. - */ - -#include -#include -#include /* Includes for caddr_t */ -#include -#include - -#include "cdrecord.h" - -EXPORT int from_bcd __PR((int b)); -EXPORT int to_bcd __PR((int i)); -EXPORT long msf_to_lba __PR((int m, int s, int f, BOOL force_positive)); -EXPORT BOOL lba_to_msf __PR((long lba, msf_t *mp)); -EXPORT void sec_to_msf __PR((long sec, msf_t *mp)); -EXPORT void print_min_atip __PR((long li, long lo)); -EXPORT BOOL is_cdspeed __PR((int speed)); - -EXPORT int -from_bcd(b) - int b; -{ - return ((b & 0x0F) + 10 * (((b)>> 4) & 0x0F)); -} - -EXPORT int -to_bcd(i) - int i; -{ - return (i % 10 | ((i / 10) % 10) << 4); -} - -EXPORT long -msf_to_lba(m, s, f, force_positive) - int m; - int s; - int f; - BOOL force_positive; -{ - long ret = m * 60 + s; - - ret *= 75; - ret += f; - if (m < 90 || force_positive) - ret -= 150; - else - ret -= 450150; - return (ret); -} - -EXPORT BOOL -lba_to_msf(lba, mp) - long lba; - msf_t *mp; -{ - int m; - int s; - int f; - -#ifdef __follow_redbook__ - if (lba >= -150 && lba < 405000) { /* lba <= 404849 */ -#else - if (lba >= -150) { -#endif - m = (lba + 150) / 60 / 75; - s = (lba + 150 - m*60*75) / 75; - f = (lba + 150 - m*60*75 - s*75); - - } else if (lba >= -45150 && lba <= -151) { - m = (lba + 450150) / 60 / 75; - s = (lba + 450150 - m*60*75) / 75; - f = (lba + 450150 - m*60*75 - s*75); - - } else { - mp->msf_min = -1; - mp->msf_sec = -1; - mp->msf_frame = -1; - - return (FALSE); - } - mp->msf_min = m; - mp->msf_sec = s; - mp->msf_frame = f; - - if (lba > 404849) /* 404850 -> 404999: lead out */ - return (FALSE); - return (TRUE); -} - -EXPORT void -sec_to_msf(sec, mp) - long sec; - msf_t *mp; -{ - int m; - int s; - int f; - - m = (sec) / 60 / 75; - s = (sec - m*60*75) / 75; - f = (sec - m*60*75 - s*75); - - mp->msf_min = m; - mp->msf_sec = s; - mp->msf_frame = f; -} - -EXPORT void -print_min_atip(li, lo) - long li; - long lo; -{ - msf_t msf; - - if (li < 0) { - lba_to_msf(li, &msf); - - printf(" ATIP start of lead in: %ld (%02d:%02d/%02d)\n", - li, msf.msf_min, msf.msf_sec, msf.msf_frame); - } - if (lo > 0) { - lba_to_msf(lo, &msf); - printf(" ATIP start of lead out: %ld (%02d:%02d/%02d)\n", - lo, msf.msf_min, msf.msf_sec, msf.msf_frame); - } -} - -/* - * Make a probability guess whether the speed is related to CD or DVD speed. - */ -EXPORT BOOL -is_cdspeed(speed) - int speed; -{ - int cdspeed; - long cdrest; - int dvdspeed; - long dvdrest; - - cdspeed = speed / 176; - cdrest = cdspeed * 1764; - cdrest = speed * 10 - cdrest; - if (cdrest < 0) - cdrest *= -1; - if (cdrest > 1764/2) - cdrest = 1764 - cdrest; - - /* - * 3324 = 1382 * 2.4 - * speed > 0.9 * 3324 && speed < 1.1 * 3324 - */ - if (speed >= 2990 && speed <= 3656) { - dvdrest = 33240; - dvdrest = speed * 10 - dvdrest; - } else { - dvdspeed = speed / 1385; - dvdrest = dvdspeed * 13850; - dvdrest = speed * 10 - dvdrest; - } - if (dvdrest < 0) - dvdrest *= -1; - if (dvdrest > 13850/2) - dvdrest = 13850 - dvdrest; - - /* - * 1385 / 176.4 = 7.85, so we need to multiply the CD rest by 7.85 - */ - return (dvdrest > (cdrest*8 - cdrest/6)); -} diff -Nru cdrtools-2.01.01a33/mkisofs/defaults.c cdrtools-3.02a09/mkisofs/defaults.c --- cdrtools-2.01.01a33/mkisofs/defaults.c 2006-09-13 15:35:12.000000000 +0000 +++ cdrtools-3.02a09/mkisofs/defaults.c 1970-01-01 00:00:00.000000000 +0000 @@ -1,235 +0,0 @@ -/* @(#)defaults.c 1.20 06/09/13 Copyright 1998-2006 J. Schilling */ -#ifndef lint -static char sccsid[] = - "@(#)defaults.c 1.20 06/09/13 Copyright 1998-2006 J. Schilling"; -#endif -/* - * Copyright (c) 1998-2006 J. Schilling - */ -/* - * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. - * - * See the file CDDL.Schily.txt in this distribution for details. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file CDDL.Schily.txt from this distribution. - */ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include "cdrecord.h" /* only for getnum() */ -#include "defaults.h" - -LOCAL int open_cdrdefaults __PR((void)); -EXPORT void cdr_defaults __PR((char **devp, int *speedp, long *fsp, char **drvoptp)); -LOCAL void cdr_xdefaults __PR((char **devp, int *speedp, long *fsp, char **drvoptp)); -LOCAL char * strsv __PR((char *s)); - -LOCAL int -open_cdrdefaults() -{ - /* - * WARNING you are only allowed to change this filename if you also - * change the documentation and add a statement that makes clear - * where the official location of the file is why you did choose a - * nonstandard location and that the nonstandard location only refers - * to inofficial cdrecord versions. - * - * I was forced to add this because some people change cdrecord without - * rational reason and then publish the result. As those people - * don't contribute work and don't give support, they are causing extra - * work for me and this way slow down the cdrecord development. - */ - return (defltopen("/etc/default/cdrecord")); -} - -EXPORT void -cdr_defaults(devp, speedp, fsp, drvoptp) - char **devp; - int *speedp; - long *fsp; - char **drvoptp; -{ - char *dev = NULL; - int speed = 0; - long fs = 0L; - - if (devp != NULL) - dev = *devp; - if (speedp != NULL) - speed = *speedp; - if (fsp != NULL) - fs = *fsp; - - if (!dev && devp != NULL) { - *devp = getenv("CDR_DEVICE"); - - if (!*devp && open_cdrdefaults() == 0) { - dev = defltread("CDR_DEVICE="); - if (dev != NULL) - *devp = strsv(dev); - } - } - if (devp != NULL && *devp) - cdr_xdefaults(devp, &speed, &fs, drvoptp); - - if (speed < 0) { - char *p = getenv("CDR_SPEED"); - - if (!p) { - if (open_cdrdefaults() == 0) { - p = defltread("CDR_SPEED="); - } - } - if (p) { - speed = atoi(p); - if (speed < 0 && speed != -1) { - comerrno(EX_BAD, - "Bad speed environment (%s).\n", p); - } - } - } - if (speed >= 0 && speedp != NULL) - *speedp = speed; - - if (fs < 0L) { - char *p = getenv("CDR_FIFOSIZE"); - - if (!p) { - if (open_cdrdefaults() == 0) { - p = defltread("CDR_FIFOSIZE="); - } - } - if (p) { - if (getnum(p, &fs) != 1) { - comerrno(EX_BAD, - "Bad fifo size environment (%s).\n", p); - } - } - } - if (fs > 0L && fsp != NULL) { - char *p = NULL; - long maxfs; - - if (open_cdrdefaults() == 0) { - p = defltread("CDR_MAXFIFOSIZE="); - } - if (p) { - if (getnum(p, &maxfs) != 1) { - comerrno(EX_BAD, - "Bad max fifo size default (%s).\n", p); - } - if (fs > maxfs) - fs = maxfs; - } - *fsp = fs; - } - - - defltclose(); -} - -/* - * All args except "drvoptp" are granted to be non NULL pointers. - */ -LOCAL void -cdr_xdefaults(devp, speedp, fsp, drvoptp) - char **devp; - int *speedp; - long *fsp; - char **drvoptp; -{ - char dname[256]; - char *p = *devp; - char *x = ",:/@"; - - while (*x) { - if (strchr(p, *x)) - return; - x++; - } - js_snprintf(dname, sizeof (dname), "%s=", p); - if (open_cdrdefaults() != 0) - return; - - p = defltread(dname); - if (p != NULL) { - while (*p == '\t' || *p == ' ') - p++; - if ((x = strchr(p, '\t')) != NULL) - *x = '\0'; - else if ((x = strchr(p, ' ')) != NULL) - *x = '\0'; - *devp = strsv(p); - if (x) { - p = ++x; - while (*p == '\t' || *p == ' ') - p++; - if ((x = strchr(p, '\t')) != NULL) - *x = '\0'; - else if ((x = strchr(p, ' ')) != NULL) - *x = '\0'; - if (*speedp < 0) - *speedp = atoi(p); - if (*speedp < 0 && *speedp != -1) { - comerrno(EX_BAD, - "Bad speed in defaults (%s).\n", p); - } - } - if (x) { - p = ++x; - while (*p == '\t' || *p == ' ') - p++; - if ((x = strchr(p, '\t')) != NULL) - *x = '\0'; - else if ((x = strchr(p, ' ')) != NULL) - *x = '\0'; - if (*fsp < 0L) { - if (getnum(p, fsp) != 1) { - comerrno(EX_BAD, - "Bad fifo size in defaults (%s).\n", - p); - } - } - } - if (x) { - p = ++x; - while (*p == '\t' || *p == ' ') - p++; - if ((x = strchr(p, '\t')) != NULL) - *x = '\0'; - else if ((x = strchr(p, ' ')) != NULL) - *x = '\0'; - if (strcmp(p, "\"\"") != '\0') { - /* - * Driver opts found. - */ - if (drvoptp && *drvoptp == NULL) - *drvoptp = strsv(p); - } - } - } -} - -LOCAL char * -strsv(s) - char *s; -{ - char *p; - int len = strlen(s); - - p = malloc(len+1); - if (p) - strcpy(p, s); - return (p); -} diff -Nru cdrtools-2.01.01a33/mkisofs/defaults.h cdrtools-3.02a09/mkisofs/defaults.h --- cdrtools-2.01.01a33/mkisofs/defaults.h 2006-11-11 21:42:43.000000000 +0000 +++ cdrtools-3.02a09/mkisofs/defaults.h 2016-12-12 22:02:20.000000000 +0000 @@ -1,18 +1,18 @@ -/* @(#)defaults.h 1.20 06/11/11 joerg */ +/* @(#)defaults.h 1.26 16/12/12 joerg */ /* * Header file defaults.h - assorted default values for character strings in * the volume descriptor. * - * Copyright (c) 1999-2004 J. Schilling + * Copyright (c) 1999-2016 J. Schilling */ #define PREPARER_DEFAULT NULL #define PUBLISHER_DEFAULT NULL #ifndef APPID_DEFAULT #ifdef APPLE_HYB -#define APPID_DEFAULT "MKISOFS ISO 9660/HFS FILESYSTEM BUILDER (C) 1993 E.YOUNGDALE (C) 1997 J.PEARSON/J.SCHILLING" +#define APPID_DEFAULT "MKISOFS ISO9660/HFS/UDF FILESYSTEM BUILDER (C) 1993 E.YOUNGDALE (C) 1997 J.PEARSON/J.SCHILLING" #else -#define APPID_DEFAULT "MKISOFS ISO 9660 FILESYSTEM BUILDER (C) 1993 E.YOUNGDALE (C) 1997 J.PEARSON/J.SCHILLING" +#define APPID_DEFAULT "MKISOFS ISO9660/UDF FILESYSTEM BUILDER (C) 1993 E.YOUNGDALE (C) 1997 J.PEARSON/J.SCHILLING" #endif /* APPLE_HYB */ #endif #define COPYRIGHT_DEFAULT NULL @@ -55,9 +55,17 @@ #define SYSTEM_ID_DEFAULT "AIX" #endif -#if defined(_WIN) || defined(__CYGWIN32__) || defined(__CYGWIN__) -#define SYSTEM_ID_DEFAULT "Win32" -#endif /* _WIN */ +#if defined(__CYGWIN32__) || defined(__CYGWIN__) +#define SYSTEM_ID_DEFAULT "Win32/Cygwin" +#endif + +#if defined(__MINGW32__) +#define SYSTEM_ID_DEFAULT "Win32/MinGW" +#endif + +#if defined(_MSC_VER) +#define SYSTEM_ID_DEFAULT "Win32/MSVC" +#endif #ifdef __EMX__ #define SYSTEM_ID_DEFAULT "OS/2" @@ -101,6 +109,10 @@ #define SYSTEM_ID_DEFAULT "BeOS" #endif +#ifdef __HAIKU__ +#define SYSTEM_ID_DEFAULT "Haiku" +#endif + #ifdef __OS2 #define SYSTEM_ID_DEFAULT "OS/2" #endif @@ -125,6 +137,18 @@ #define SYSTEM_ID_DEFAULT "DOS" #endif +#ifdef __MINT__ +#define SYSTEM_ID_DEFAULT "ATARI-MiNT" +#endif + +#ifdef __SYLLABLE__ +#define SYSTEM_ID_DEFAULT "Syllable" +#endif + +#ifdef AMIGA +#define SYSTEM_ID_DEFAULT "AMIGA" +#endif + #ifndef SYSTEM_ID_DEFAULT #define SYSTEM_ID_DEFAULT "UNIX" #endif diff -Nru cdrtools-2.01.01a33/mkisofs/desktop.c cdrtools-3.02a09/mkisofs/desktop.c --- cdrtools-2.01.01a33/mkisofs/desktop.c 2006-09-13 16:04:59.000000000 +0000 +++ cdrtools-3.02a09/mkisofs/desktop.c 2009-07-08 22:25:26.000000000 +0000 @@ -1,10 +1,12 @@ -/* @(#)desktop.c 1.7 06/09/13 joerg, Copyright 1997, 1998, 1999, 2000 James Pearson */ +/* @(#)desktop.c 1.10 09/07/09 joerg, Copyright 1997, 1998, 1999, 2000 James Pearson, Copyright 2000-2009 J. Schilling */ +#include #ifndef lint -static char sccsid[] = - "@(#)desktop.c 1.7 06/09/13 joerg, Copyright 1997, 1998, 1999, 2000 James Pearson"; +static UConst char sccsid[] = + "@(#)desktop.c 1.10 09/07/09 joerg, Copyright 1997, 1998, 1999, 2000 James Pearson, Copyright 2000-2009 J. Schilling"; #endif /* * Copyright (c) 1997, 1998, 1999, 2000 James Pearson + * Copyright (c) 2000-2009 J. Schilling * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -43,9 +45,8 @@ * Adapted from mkhfs routines for mkhybrid */ -#ifdef APPLE_HYB +#ifdef APPLE_HFS_HYB -#include #include "mkisofs.h" #define DB "Desktop DB" @@ -171,4 +172,4 @@ return (0); } -#endif /* APPLE_HYB */ +#endif /* APPLE_HFS_HYB */ diff -Nru cdrtools-2.01.01a33/mkisofs/diag/cd_misc.c cdrtools-3.02a09/mkisofs/diag/cd_misc.c --- cdrtools-2.01.01a33/mkisofs/diag/cd_misc.c 2006-10-05 19:07:47.000000000 +0000 +++ cdrtools-3.02a09/mkisofs/diag/cd_misc.c 1970-01-01 00:00:00.000000000 +0000 @@ -1,189 +0,0 @@ -/* @(#)cd_misc.c 1.14 06/10/05 Copyright 1997-2006 J. Schilling */ -#ifndef lint -static char sccsid[] = - "@(#)cd_misc.c 1.14 06/10/05 Copyright 1997-2006 J. Schilling"; -#endif -/* - * Misc CD support routines - * - * Copyright (c) 1997-2006 J. Schilling - */ -/* - * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. - * - * See the file CDDL.Schily.txt in this distribution for details. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file CDDL.Schily.txt from this distribution. - */ - -#include -#include -#include /* Includes for caddr_t */ -#include -#include - -#include "cdrecord.h" - -EXPORT int from_bcd __PR((int b)); -EXPORT int to_bcd __PR((int i)); -EXPORT long msf_to_lba __PR((int m, int s, int f, BOOL force_positive)); -EXPORT BOOL lba_to_msf __PR((long lba, msf_t *mp)); -EXPORT void sec_to_msf __PR((long sec, msf_t *mp)); -EXPORT void print_min_atip __PR((long li, long lo)); -EXPORT BOOL is_cdspeed __PR((int speed)); - -EXPORT int -from_bcd(b) - int b; -{ - return ((b & 0x0F) + 10 * (((b)>> 4) & 0x0F)); -} - -EXPORT int -to_bcd(i) - int i; -{ - return (i % 10 | ((i / 10) % 10) << 4); -} - -EXPORT long -msf_to_lba(m, s, f, force_positive) - int m; - int s; - int f; - BOOL force_positive; -{ - long ret = m * 60 + s; - - ret *= 75; - ret += f; - if (m < 90 || force_positive) - ret -= 150; - else - ret -= 450150; - return (ret); -} - -EXPORT BOOL -lba_to_msf(lba, mp) - long lba; - msf_t *mp; -{ - int m; - int s; - int f; - -#ifdef __follow_redbook__ - if (lba >= -150 && lba < 405000) { /* lba <= 404849 */ -#else - if (lba >= -150) { -#endif - m = (lba + 150) / 60 / 75; - s = (lba + 150 - m*60*75) / 75; - f = (lba + 150 - m*60*75 - s*75); - - } else if (lba >= -45150 && lba <= -151) { - m = (lba + 450150) / 60 / 75; - s = (lba + 450150 - m*60*75) / 75; - f = (lba + 450150 - m*60*75 - s*75); - - } else { - mp->msf_min = -1; - mp->msf_sec = -1; - mp->msf_frame = -1; - - return (FALSE); - } - mp->msf_min = m; - mp->msf_sec = s; - mp->msf_frame = f; - - if (lba > 404849) /* 404850 -> 404999: lead out */ - return (FALSE); - return (TRUE); -} - -EXPORT void -sec_to_msf(sec, mp) - long sec; - msf_t *mp; -{ - int m; - int s; - int f; - - m = (sec) / 60 / 75; - s = (sec - m*60*75) / 75; - f = (sec - m*60*75 - s*75); - - mp->msf_min = m; - mp->msf_sec = s; - mp->msf_frame = f; -} - -EXPORT void -print_min_atip(li, lo) - long li; - long lo; -{ - msf_t msf; - - if (li < 0) { - lba_to_msf(li, &msf); - - printf(" ATIP start of lead in: %ld (%02d:%02d/%02d)\n", - li, msf.msf_min, msf.msf_sec, msf.msf_frame); - } - if (lo > 0) { - lba_to_msf(lo, &msf); - printf(" ATIP start of lead out: %ld (%02d:%02d/%02d)\n", - lo, msf.msf_min, msf.msf_sec, msf.msf_frame); - } -} - -/* - * Make a probability guess whether the speed is related to CD or DVD speed. - */ -EXPORT BOOL -is_cdspeed(speed) - int speed; -{ - int cdspeed; - long cdrest; - int dvdspeed; - long dvdrest; - - cdspeed = speed / 176; - cdrest = cdspeed * 1764; - cdrest = speed * 10 - cdrest; - if (cdrest < 0) - cdrest *= -1; - if (cdrest > 1764/2) - cdrest = 1764 - cdrest; - - /* - * 3324 = 1382 * 2.4 - * speed > 0.9 * 3324 && speed < 1.1 * 3324 - */ - if (speed >= 2990 && speed <= 3656) { - dvdrest = 33240; - dvdrest = speed * 10 - dvdrest; - } else { - dvdspeed = speed / 1385; - dvdrest = dvdspeed * 13850; - dvdrest = speed * 10 - dvdrest; - } - if (dvdrest < 0) - dvdrest *= -1; - if (dvdrest > 13850/2) - dvdrest = 13850 - dvdrest; - - /* - * 1385 / 176.4 = 7.85, so we need to multiply the CD rest by 7.85 - */ - return (dvdrest > (cdrest*8 - cdrest/6)); -} diff -Nru cdrtools-2.01.01a33/mkisofs/diag/defaults.c cdrtools-3.02a09/mkisofs/diag/defaults.c --- cdrtools-2.01.01a33/mkisofs/diag/defaults.c 2006-09-13 15:35:12.000000000 +0000 +++ cdrtools-3.02a09/mkisofs/diag/defaults.c 1970-01-01 00:00:00.000000000 +0000 @@ -1,235 +0,0 @@ -/* @(#)defaults.c 1.20 06/09/13 Copyright 1998-2006 J. Schilling */ -#ifndef lint -static char sccsid[] = - "@(#)defaults.c 1.20 06/09/13 Copyright 1998-2006 J. Schilling"; -#endif -/* - * Copyright (c) 1998-2006 J. Schilling - */ -/* - * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. - * - * See the file CDDL.Schily.txt in this distribution for details. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file CDDL.Schily.txt from this distribution. - */ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include "cdrecord.h" /* only for getnum() */ -#include "defaults.h" - -LOCAL int open_cdrdefaults __PR((void)); -EXPORT void cdr_defaults __PR((char **devp, int *speedp, long *fsp, char **drvoptp)); -LOCAL void cdr_xdefaults __PR((char **devp, int *speedp, long *fsp, char **drvoptp)); -LOCAL char * strsv __PR((char *s)); - -LOCAL int -open_cdrdefaults() -{ - /* - * WARNING you are only allowed to change this filename if you also - * change the documentation and add a statement that makes clear - * where the official location of the file is why you did choose a - * nonstandard location and that the nonstandard location only refers - * to inofficial cdrecord versions. - * - * I was forced to add this because some people change cdrecord without - * rational reason and then publish the result. As those people - * don't contribute work and don't give support, they are causing extra - * work for me and this way slow down the cdrecord development. - */ - return (defltopen("/etc/default/cdrecord")); -} - -EXPORT void -cdr_defaults(devp, speedp, fsp, drvoptp) - char **devp; - int *speedp; - long *fsp; - char **drvoptp; -{ - char *dev = NULL; - int speed = 0; - long fs = 0L; - - if (devp != NULL) - dev = *devp; - if (speedp != NULL) - speed = *speedp; - if (fsp != NULL) - fs = *fsp; - - if (!dev && devp != NULL) { - *devp = getenv("CDR_DEVICE"); - - if (!*devp && open_cdrdefaults() == 0) { - dev = defltread("CDR_DEVICE="); - if (dev != NULL) - *devp = strsv(dev); - } - } - if (devp != NULL && *devp) - cdr_xdefaults(devp, &speed, &fs, drvoptp); - - if (speed < 0) { - char *p = getenv("CDR_SPEED"); - - if (!p) { - if (open_cdrdefaults() == 0) { - p = defltread("CDR_SPEED="); - } - } - if (p) { - speed = atoi(p); - if (speed < 0 && speed != -1) { - comerrno(EX_BAD, - "Bad speed environment (%s).\n", p); - } - } - } - if (speed >= 0 && speedp != NULL) - *speedp = speed; - - if (fs < 0L) { - char *p = getenv("CDR_FIFOSIZE"); - - if (!p) { - if (open_cdrdefaults() == 0) { - p = defltread("CDR_FIFOSIZE="); - } - } - if (p) { - if (getnum(p, &fs) != 1) { - comerrno(EX_BAD, - "Bad fifo size environment (%s).\n", p); - } - } - } - if (fs > 0L && fsp != NULL) { - char *p = NULL; - long maxfs; - - if (open_cdrdefaults() == 0) { - p = defltread("CDR_MAXFIFOSIZE="); - } - if (p) { - if (getnum(p, &maxfs) != 1) { - comerrno(EX_BAD, - "Bad max fifo size default (%s).\n", p); - } - if (fs > maxfs) - fs = maxfs; - } - *fsp = fs; - } - - - defltclose(); -} - -/* - * All args except "drvoptp" are granted to be non NULL pointers. - */ -LOCAL void -cdr_xdefaults(devp, speedp, fsp, drvoptp) - char **devp; - int *speedp; - long *fsp; - char **drvoptp; -{ - char dname[256]; - char *p = *devp; - char *x = ",:/@"; - - while (*x) { - if (strchr(p, *x)) - return; - x++; - } - js_snprintf(dname, sizeof (dname), "%s=", p); - if (open_cdrdefaults() != 0) - return; - - p = defltread(dname); - if (p != NULL) { - while (*p == '\t' || *p == ' ') - p++; - if ((x = strchr(p, '\t')) != NULL) - *x = '\0'; - else if ((x = strchr(p, ' ')) != NULL) - *x = '\0'; - *devp = strsv(p); - if (x) { - p = ++x; - while (*p == '\t' || *p == ' ') - p++; - if ((x = strchr(p, '\t')) != NULL) - *x = '\0'; - else if ((x = strchr(p, ' ')) != NULL) - *x = '\0'; - if (*speedp < 0) - *speedp = atoi(p); - if (*speedp < 0 && *speedp != -1) { - comerrno(EX_BAD, - "Bad speed in defaults (%s).\n", p); - } - } - if (x) { - p = ++x; - while (*p == '\t' || *p == ' ') - p++; - if ((x = strchr(p, '\t')) != NULL) - *x = '\0'; - else if ((x = strchr(p, ' ')) != NULL) - *x = '\0'; - if (*fsp < 0L) { - if (getnum(p, fsp) != 1) { - comerrno(EX_BAD, - "Bad fifo size in defaults (%s).\n", - p); - } - } - } - if (x) { - p = ++x; - while (*p == '\t' || *p == ' ') - p++; - if ((x = strchr(p, '\t')) != NULL) - *x = '\0'; - else if ((x = strchr(p, ' ')) != NULL) - *x = '\0'; - if (strcmp(p, "\"\"") != '\0') { - /* - * Driver opts found. - */ - if (drvoptp && *drvoptp == NULL) - *drvoptp = strsv(p); - } - } - } -} - -LOCAL char * -strsv(s) - char *s; -{ - char *p; - int len = strlen(s); - - p = malloc(len+1); - if (p) - strcpy(p, s); - return (p); -} diff -Nru cdrtools-2.01.01a33/mkisofs/diag/dump.c cdrtools-3.02a09/mkisofs/diag/dump.c --- cdrtools-2.01.01a33/mkisofs/diag/dump.c 2007-07-26 16:35:14.000000000 +0000 +++ cdrtools-3.02a09/mkisofs/diag/dump.c 2015-12-07 20:04:19.000000000 +0000 @@ -1,7 +1,8 @@ -/* @(#)dump.c 1.28 07/07/26 joerg */ +/* @(#)dump.c 1.41 15/12/07 joerg */ +#include #ifndef lint -static char sccsid[] = - "@(#)dump.c 1.28 07/07/26 joerg"; +static UConst char sccsid[] = + "@(#)dump.c 1.41 15/12/07 joerg"; #endif /* * File dump.c - dump a file/device both in hex and in ASCII. @@ -9,7 +10,7 @@ * Written by Eric Youngdale (1993). * * Copyright 1993 Yggdrasil Computing, Incorporated - * Copyright (c) 1999-2007 J. Schilling + * Copyright (c) 1999-2015 J. Schilling * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 @@ -25,20 +26,20 @@ * Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#include #include #include #include #include -#include +#include #include #include -#include +#include #include +#include #include "../scsi.h" -#include "../../cdrecord/defaults.h" +#include "cdrdeflt.h" #include "../../cdrecord/version.h" /* @@ -55,6 +56,7 @@ #define infile in_image EXPORT FILE *infile = NULL; +EXPORT BOOL ignerr = FALSE; LOCAL off_t file_addr; LOCAL off_t sec_addr = (off_t)-1; LOCAL Uchar sector[2048]; @@ -66,9 +68,11 @@ LOCAL struct sgttyb savetty; LOCAL struct sgttyb newtty; #else +#ifdef USE_TERMIOS LOCAL struct termios savetty; LOCAL struct termios newtty; #endif +#endif LOCAL void reset_tty __PR((void)); LOCAL void set_tty __PR((void)); @@ -86,18 +90,18 @@ #ifdef USE_V7_TTY if (ioctl(STDIN_FILENO, TIOCSETN, &savetty) == -1) { #else -#ifdef TCSANOW +#ifdef USE_TERMIOS +#ifdef TCSANOW if (tcsetattr(STDIN_FILENO, TCSANOW, &savetty) == -1) { #else if (ioctl(STDIN_FILENO, TCSETAF, &savetty) == -1) { #endif +#else /* USE_TERMIOS */ + if (0) { +#endif /* USE_TERMIOS */ #endif -#ifdef USE_LIBSCHILY - comerr("Cannot put tty into normal mode\n"); -#else - printf("Cannot put tty into normal mode\n"); + printf(_("Cannot put tty into normal mode\n")); exit(1); -#endif } } @@ -107,18 +111,18 @@ #ifdef USE_V7_TTY if (ioctl(STDIN_FILENO, TIOCSETN, &newtty) == -1) { #else -#ifdef TCSANOW +#ifdef USE_TERMIOS +#ifdef TCSANOW if (tcsetattr(STDIN_FILENO, TCSANOW, &newtty) == -1) { #else if (ioctl(STDIN_FILENO, TCSETAF, &newtty) == -1) { #endif +#else /* USE_TERMIOS */ + if (0) { +#endif /* USE_TERMIOS */ #endif -#ifdef USE_LIBSCHILY - comerr("Cannot put tty into raw mode\n"); -#else - printf("Cannot put tty into raw mode\n"); + printf(_("Cannot put tty into raw mode\n")); exit(1); -#endif } } @@ -211,10 +215,10 @@ } crsr2(20, 1); if (sizeof (file_addr) > sizeof (long)) { - printf(" Zone, zone offset: %14llx %12.12llx ", + printf(_(" Zone, zone offset: %14llx %12.12llx "), (Llong)file_addr>>11, (Llong)file_addr & 0x7ff); } else { - printf(" Zone, zone offset: %6lx %4.4lx ", + printf(_(" Zone, zone offset: %6lx %4.4lx "), (long)(file_addr>>11), (long)(file_addr & 0x7ff)); } fflush(stdout); @@ -236,15 +240,16 @@ usage(excode) int excode; { - errmsgno(EX_BAD, "Usage: %s [options] [image]\n", + errmsgno(EX_BAD, _("Usage: %s [options] [image]\n"), get_progname()); - error("Options:\n"); - error("\t-help, -h Print this help\n"); - error("\t-version Print version info and exit\n"); - error("\t-i filename Filename to read ISO-9660 image from\n"); - error("\tdev=target SCSI target to use as CD/DVD-Recorder\n"); - error("\nIf neither -i nor dev= are speficied, is needed.\n"); + error(_("Options:\n")); + error(_("\t-help, -h Print this help\n")); + error(_("\t-version Print version info and exit\n")); + error(_("\t-ignore-error Ignore errors\n")); + error(_("\t-i filename Filename to read ISO-9660 image from\n")); + error(_("\tdev=target SCSI target to use as CD/DVD-Recorder\n")); + error(_("\nIf neither -i nor dev= are specified, is needed.\n")); exit(excode); } @@ -255,65 +260,84 @@ { int cac; char * const *cav; - char *opts = "help,h,version,i*,dev*"; + char *opts = "help,h,version,ignore-error,i*,dev*"; BOOL help = FALSE; BOOL prvers = FALSE; char *filename = NULL; - char *devname = NULL; + char *sdevname = NULL; +#if defined(USE_NLS) + char *dir; +#endif char c; int i; int j; save_args(argc, argv); +#if defined(USE_NLS) + setlocale(LC_ALL, ""); +#if !defined(TEXT_DOMAIN) /* Should be defined by cc -D */ +#define TEXT_DOMAIN "isoinfo" /* Use this only if it weren't */ +#endif + dir = searchfileinpath("share/locale", F_OK, + SIP_ANY_FILE|SIP_NO_PATH, NULL); + if (dir) + (void) bindtextdomain(TEXT_DOMAIN, dir); + else +#if defined(PROTOTYPES) && defined(INS_BASE) + (void) bindtextdomain(TEXT_DOMAIN, INS_BASE "/share/locale"); +#else + (void) bindtextdomain(TEXT_DOMAIN, "/usr/share/locale"); +#endif + (void) textdomain(TEXT_DOMAIN); +#endif + cac = argc - 1; cav = argv + 1; - if (getallargs(&cac, &cav, opts, &help, &help, &prvers, - &filename, &devname) < 0) { - errmsgno(EX_BAD, "Bad Option: '%s'\n", cav[0]); + if (getallargs(&cac, &cav, opts, &help, &help, &prvers, &ignerr, + &filename, &sdevname) < 0) { + errmsgno(EX_BAD, _("Bad Option: '%s'\n"), cav[0]); usage(EX_BAD); } if (help) usage(0); if (prvers) { - printf("devdump %s (%s-%s-%s) Copyright (C) 1993-1999 Eric Youngdale (C) 1999-2007 Jörg Schilling\n", + printf(_("devdump %s (%s-%s-%s) Copyright (C) 1993-1999 %s (C) 1999-2015 %s\n"), VERSION, - HOST_CPU, HOST_VENDOR, HOST_OS); + HOST_CPU, HOST_VENDOR, HOST_OS, + _("Eric Youngdale"), + _("Joerg Schilling")); exit(0); } cac = argc - 1; cav = argv + 1; - if (filename == NULL && devname == NULL) { + if (filename == NULL && sdevname == NULL) { if (getfiles(&cac, &cav, opts) != 0) { filename = cav[0]; cac--, cav++; } } if (getfiles(&cac, &cav, opts) != 0) { - errmsgno(EX_BAD, "Bad Argument: '%s'\n", cav[0]); + errmsgno(EX_BAD, _("Bad Argument: '%s'\n"), cav[0]); usage(EX_BAD); } - if (filename != NULL && devname != NULL) { - errmsgno(EX_BAD, "Only one of -i or dev= allowed\n"); + if (filename != NULL && sdevname != NULL) { + errmsgno(EX_BAD, _("Only one of -i or dev= allowed\n")); usage(EX_BAD); } #ifdef USE_SCG - if (filename == NULL && devname == NULL) - cdr_defaults(&devname, NULL, NULL, NULL); -#endif - if (filename == NULL && devname == NULL) { -#ifdef USE_LIBSCHILY - errmsgno(EX_BAD, "ISO-9660 image not specified\n"); -#else - fprintf(stderr, "ISO-9660 image not specified\n"); + if (filename == NULL && sdevname == NULL) + cdr_defaults(&sdevname, NULL, NULL, NULL, NULL); #endif + if (filename == NULL && sdevname == NULL) { + fprintf(stderr, _("ISO-9660 image not specified\n")); usage(EX_BAD); } if (filename != NULL) infile = fopen(filename, "rb"); else - filename = devname; + filename = sdevname; if (infile != NULL) { /* EMPTY */; @@ -322,12 +346,8 @@ #else } else { #endif -#ifdef USE_LIBSCHILY - comerr("Cannot open '%s'\n", filename); -#else - fprintf(stderr, "Cannot open '%s'\n", filename); + fprintf(stderr, _("Cannot open '%s'\n"), filename); exit(1); -#endif } for (i = 0; i < 30; i++) @@ -340,28 +360,31 @@ #ifdef USE_V7_TTY if (ioctl(STDIN_FILENO, TIOCGETP, &savetty) == -1) { #else -#ifdef TCSANOW +#ifdef USE_TERMIOS +#ifdef TCSANOW if (tcgetattr(STDIN_FILENO, &savetty) == -1) { #else if (ioctl(STDIN_FILENO, TCGETA, &savetty) == -1) { #endif +#else /* USE_TERMIOS */ + if (0) { +#endif /* USE_TERMIOS */ #endif -#ifdef USE_LIBSCHILY - comerr("Stdin must be a tty\n"); -#else - printf("Stdin must be a tty\n"); + printf(_("Stdin must be a tty\n")); exit(1); -#endif } - newtty = savetty; #ifdef USE_V7_TTY + newtty = savetty; newtty.sg_flags &= ~(ECHO|CRMOD); newtty.sg_flags |= CBREAK; #else +#ifdef USE_TERMIOS + newtty = savetty; newtty.c_lflag &= ~ICANON; newtty.c_lflag &= ~ECHO; newtty.c_cc[VMIN] = 1; #endif +#endif set_tty(); #ifdef SIGTSTP signal(SIGTSTP, onsusp); @@ -371,14 +394,18 @@ do { if (file_addr < (off_t)0) file_addr = (off_t)0; showblock(1); +#ifdef USE_GETCH + c = getch(); /* DOS console input */ +#else read(STDIN_FILENO, &c, 1); +#endif if (c == 'a') file_addr -= PAGE; if (c == 'b') file_addr += PAGE; if (c == 'g') { crsr2(20, 1); - printf("Enter new starting block (in hex):"); + printf(_("Enter new starting block (in hex):")); if (sizeof (file_addr) > sizeof (long)) { Llong ll; scanf("%llx", &ll); @@ -394,7 +421,7 @@ } if (c == 'f') { crsr2(20, 1); - printf("Enter new search string:"); + printf(_("Enter new search string:")); fgets((char *)search, sizeof (search), stdin); while (search[strlen((char *)search)-1] == '\n') search[strlen((char *)search)-1] = 0; diff -Nru cdrtools-2.01.01a33/mkisofs/diag/dump.mk cdrtools-3.02a09/mkisofs/diag/dump.mk --- cdrtools-2.01.01a33/mkisofs/diag/dump.mk 2007-02-04 23:25:38.000000000 +0000 +++ cdrtools-3.02a09/mkisofs/diag/dump.mk 2013-04-21 18:24:56.000000000 +0000 @@ -1,4 +1,4 @@ -#ident @(#)dump.mk 1.7 07/02/05 +#ident @(#)dump.mk 1.12 13/04/21 ########################################################################### # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License version 2 @@ -11,7 +11,7 @@ # # You should have received a copy of the GNU General Public License along with # this program; see the file COPYING. If not, write to the Free Software -# Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ########################################################################### SRCROOT= ../.. RULESDIR= RULES @@ -24,13 +24,20 @@ CPPOPTS += -DUSE_LARGEFILES CPPOPTS += -DUSE_SCG CPPOPTS += -I.. -CPPOPTS += -I../../cdrecord +CPPOPTS += -I../../libscg +CPPOPTS += -I../../libscgcmd +CPPOPTS += -I../../libcdrdeflt CPPOPTS += -DSCHILY_PRINT +CPPOPTS += -DINS_BASE=\"${INS_BASE}\" +CPPOPTS += -DTEXT_DOMAIN=\"SCHILY_cdrtools\" CFILES= dump.c \ - scsi.c scsi_cdr.c cd_misc.c modes.c \ - defaults.c -LIBS= -lrscg -lscg $(LIB_VOLMGT) -ldeflt -lschily $(SCSILIB) $(LIB_SOCKET) + scsi.c + +# +# LIB_CAP is needed for Linux capability support in librscg. +# +LIBS= -lscgcmd -lrscg -lscg $(LIB_VOLMGT) -lcdrdeflt -ldeflt -lschily $(SCSILIB) $(LIB_SOCKET) $(LIB_INTL) $(LIB_CAP) XMK_FILE= devdump_man.mk ########################################################################### diff -Nru cdrtools-2.01.01a33/mkisofs/diag/isodebug.8 cdrtools-3.02a09/mkisofs/diag/isodebug.8 --- cdrtools-2.01.01a33/mkisofs/diag/isodebug.8 2006-02-08 22:38:05.000000000 +0000 +++ cdrtools-3.02a09/mkisofs/diag/isodebug.8 2015-11-02 22:04:12.000000000 +0000 @@ -1,4 +1,4 @@ -.\" @(#)isodebug.8 1.1 06/02/08 Copyr 2006 J. Schilling +.\" @(#)isodebug.8 1.6 15/11/02 Copyr 2006-2015 J. Schilling .\" Manual page for isodebug .\" .if t .ds a \v'-0.55m'\h'0.00n'\z.\h'0.40n'\z.\v'0.55m'\h'-0.40n'a @@ -13,7 +13,7 @@ .if n .ds o oe .if n .ds u ue .if n .ds s sz -.TH ISODEBUG 1L "06/02/08" "J\*org Schilling" "Schily\'s USER COMMANDS" +.TH ISODEBUG 1L "Version 3.02 2015/11/02" "J\*org Schilling" "Schily\'s USER COMMANDS" .SH NAME isodebug \- print mkisofs debug info from ISO-9660 image .SH SYNOPSIS @@ -47,6 +47,14 @@ .BI \-i " filename Filename to read ISO-9660 image from. .TP +.BI \-ignore\-error +Ignore errors. +.B isodebug +by default aborts on several errors, such as read errors. With this option in effect, +.B isodebug +tries to continue. +Use with care. +.TP .BI dev= target SCSI target to use as CD/DVD-Recorder. See @@ -72,31 +80,28 @@ .PP Additional information can be found on: .br -http://www.fokus.fhg.de/usr/schilling/cdrecord.html +http://cdrecord.org/private/cdrecord.html .PP If you have support questions, send them to: .PP .B -cdrecord-support@berlios.de -.br -or -.B -other-cdwrite@lists.debian.org +cdrtools-support@lists.sourceforge.net + .PP If you have definitely found a bug, send a mail to: .PP .B -cdrecord-developers@berlios.de +cdrtools-developers@lists.sourceforge.net .br or .B -schilling@fokus.fhg.de +joerg.schilling@fokus.fraunhofer.de .PP To subscribe, use: .PP .B -http://lists.berlios.de/mailman/listinfo/cdrecord-developers +https://lists.sourceforge.net/lists/listinfo/cdrtools-developers .br or .B -http://lists.berlios.de/mailman/listinfo/cdrecord-support +https://lists.sourceforge.net/lists/listinfo/cdrtools-support diff -Nru cdrtools-2.01.01a33/mkisofs/diag/isodebug.c cdrtools-3.02a09/mkisofs/diag/isodebug.c --- cdrtools-2.01.01a33/mkisofs/diag/isodebug.c 2007-07-26 16:35:14.000000000 +0000 +++ cdrtools-3.02a09/mkisofs/diag/isodebug.c 2015-11-29 21:59:44.000000000 +0000 @@ -1,10 +1,11 @@ -/* @(#)isodebug.c 1.18 07/07/26 Copyright 1996-2007 J. Schilling */ +/* @(#)isodebug.c 1.30 15/11/29 Copyright 1996-2015 J. Schilling */ +#include #ifndef lint -static char sccsid[] = - "@(#)isodebug.c 1.18 07/07/26 Copyright 1996-2007 J. Schilling"; +static UConst char sccsid[] = + "@(#)isodebug.c 1.30 15/11/29 Copyright 1996-2015 J. Schilling"; #endif /* - * Copyright (c) 1996-2007 J. Schilling + * Copyright (c) 1996-2015 J. Schilling */ /* * This program is free software; you can redistribute it and/or modify @@ -18,12 +19,11 @@ * * You should have received a copy of the GNU General Public License along with * this program; see the file COPYING. If not, write to the Free Software - * Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -#include -#include -#include +#include +#include #include #include #include @@ -32,9 +32,10 @@ #include #include #include +#include #include "../scsi.h" -#include "../../cdrecord/defaults.h" +#include "cdrdeflt.h" #include "../../cdrecord/version.h" #define _delta(from, to) ((to) - (from) + 1) @@ -109,6 +110,7 @@ #define infile in_image EXPORT FILE *infile = NULL; +EXPORT BOOL ignerr = FALSE; LOCAL int vol_desc_sum; LOCAL void usage __PR((int excode)); @@ -119,15 +121,16 @@ usage(excode) int excode; { - errmsgno(EX_BAD, "Usage: %s [options] image\n", + errmsgno(EX_BAD, _("Usage: %s [options] image\n"), get_progname()); - error("Options:\n"); - error("\t-help,-h Print this help\n"); - error("\t-version Print version info and exit\n"); - error("\t-i filename Filename to read ISO-9660 image from\n"); - error("\tdev=target SCSI target to use as CD/DVD-Recorder\n"); - error("\nIf neither -i nor dev= are speficied, is needed.\n"); + error(_("Options:\n")); + error(_("\t-help,-h Print this help\n")); + error(_("\t-version Print version info and exit\n")); + error(_("\t-ignore-error Ignore errors\n")); + error(_("\t-i filename Filename to read ISO-9660 image from\n")); + error(_("\tdev=target SCSI target to use as CD/DVD-Recorder\n")); + error(_("\nIf neither -i nor dev= are speficied, is needed.\n")); exit(excode); } @@ -207,8 +210,8 @@ if (strncmp((char *)&vd, "MKI ", 4) == 0) return ((char *)&vd); - - for(i = 0; i < 16; i++) { + + for (i = 0; i < 16; i++) { #ifdef USE_SCG readsecs(sec_off, &vd, 1); #else @@ -232,60 +235,82 @@ { int cac; char * const *cav; - char *opts = "help,h,version,i*,dev*"; + char *opts = "help,h,version,ignore-error,i*,dev*"; BOOL help = FALSE; BOOL prvers = FALSE; char *filename = NULL; - char *devname = NULL; + char *sdevname = NULL; +#if defined(USE_NLS) + char *dir; +#endif char *p; char *eol; save_args(argc, argv); +#if defined(USE_NLS) + setlocale(LC_ALL, ""); +#if !defined(TEXT_DOMAIN) /* Should be defined by cc -D */ +#define TEXT_DOMAIN "isoinfo" /* Use this only if it weren't */ +#endif + dir = searchfileinpath("share/locale", F_OK, + SIP_ANY_FILE|SIP_NO_PATH, NULL); + if (dir) + (void) bindtextdomain(TEXT_DOMAIN, dir); + else +#if defined(PROTOTYPES) && defined(INS_BASE) + (void) bindtextdomain(TEXT_DOMAIN, INS_BASE "/share/locale"); +#else + (void) bindtextdomain(TEXT_DOMAIN, "/usr/share/locale"); +#endif + (void) textdomain(TEXT_DOMAIN); +#endif + cac = argc - 1; cav = argv + 1; - if (getallargs(&cac, &cav, opts, &help, &help, &prvers, - &filename, &devname) < 0) { - errmsgno(EX_BAD, "Bad Option: '%s'\n", cav[0]); + if (getallargs(&cac, &cav, opts, &help, &help, &prvers, &ignerr, + &filename, &sdevname) < 0) { + errmsgno(EX_BAD, _("Bad Option: '%s'\n"), cav[0]); usage(EX_BAD); } if (help) usage(0); if (prvers) { - printf("isodebug %s (%s-%s-%s) Copyright (C) 1996-2007 Jörg Schilling\n", + printf(_("isodebug %s (%s-%s-%s) Copyright (C) 1996-2015 %s\n"), VERSION, - HOST_CPU, HOST_VENDOR, HOST_OS); + HOST_CPU, HOST_VENDOR, HOST_OS, + _("Joerg Schilling")); exit(0); } cac = argc - 1; cav = argv + 1; - if (filename == NULL && devname == NULL) { + if (filename == NULL && sdevname == NULL) { if (getfiles(&cac, &cav, opts) != 0) { filename = cav[0]; cac--, cav++; } } if (getfiles(&cac, &cav, opts) != 0) { - errmsgno(EX_BAD, "Bad Argument: '%s'\n", cav[0]); + errmsgno(EX_BAD, _("Bad Argument: '%s'\n"), cav[0]); usage(EX_BAD); } - if (filename != NULL && devname != NULL) { - errmsgno(EX_BAD, "Only one of -i or dev= allowed\n"); + if (filename != NULL && sdevname != NULL) { + errmsgno(EX_BAD, _("Only one of -i or dev= allowed\n")); usage(EX_BAD); } #ifdef USE_SCG - if (filename == NULL && devname == NULL) - cdr_defaults(&devname, NULL, NULL, NULL); + if (filename == NULL && sdevname == NULL) + cdr_defaults(&sdevname, NULL, NULL, NULL, NULL); #endif - if (filename == NULL && devname == NULL) { - errmsgno(EX_BAD, "ISO-9660 image not specified\n"); + if (filename == NULL && sdevname == NULL) { + errmsgno(EX_BAD, _("ISO-9660 image not specified\n")); usage(EX_BAD); } if (filename != NULL) infile = fopen(filename, "rb"); else - filename = devname; + filename = sdevname; if (infile != NULL) { /* EMPTY */; @@ -294,12 +319,12 @@ #else } else { #endif - comerr("Cannot open '%s'\n", filename); + comerr(_("Cannot open '%s'\n"), filename); } p = isodinfo(infile); if (p == NULL) { - printf("No ISO-9660 image debug info.\n"); + printf(_("No ISO-9660 image debug info.\n")); } else if (strncmp(p, "MKI ", 4) == 0) { int sum; @@ -310,14 +335,14 @@ sum += p[2047] & 0xFF; p[2045] = '\0'; if (sum == vol_desc_sum) - printf("ISO-9660 image includes checksum signature for correct inode numbers.\n"); + printf(_("ISO-9660 image includes checksum signature for correct inode numbers.\n")); eol = strchr(p, '\n'); if (eol) *eol = '\0'; - printf("ISO-9660 image created at %s\n", &p[4]); + printf(_("ISO-9660 image created at %s\n"), &p[4]); if (eol) { - printf("\nCmdline: '%s'\n", &eol[1]); + printf(_("\nCmdline: '%s'\n"), &eol[1]); } } return (0); diff -Nru cdrtools-2.01.01a33/mkisofs/diag/isodebug.mk cdrtools-3.02a09/mkisofs/diag/isodebug.mk --- cdrtools-2.01.01a33/mkisofs/diag/isodebug.mk 2007-02-04 23:25:38.000000000 +0000 +++ cdrtools-3.02a09/mkisofs/diag/isodebug.mk 2013-04-21 18:24:56.000000000 +0000 @@ -1,4 +1,4 @@ -#ident @(#)isodebug.mk 1.5 07/02/05 +#ident @(#)isodebug.mk 1.10 13/04/21 ########################################################################### # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License version 2 @@ -11,7 +11,7 @@ # # You should have received a copy of the GNU General Public License along with # this program; see the file COPYING. If not, write to the Free Software -# Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ########################################################################### SRCROOT= ../.. RULESDIR= RULES @@ -24,13 +24,20 @@ CPPOPTS += -DUSE_LARGEFILES CPPOPTS += -DUSE_SCG CPPOPTS += -I.. -CPPOPTS += -I../../cdrecord +CPPOPTS += -I../../libscg +CPPOPTS += -I../../libscgcmd +CPPOPTS += -I../../libcdrdeflt CPPOPTS += -DSCHILY_PRINT +CPPOPTS += -DINS_BASE=\"${INS_BASE}\" +CPPOPTS += -DTEXT_DOMAIN=\"SCHILY_cdrtools\" CFILES= isodebug.c \ - scsi.c scsi_cdr.c cd_misc.c modes.c \ - defaults.c -LIBS= -lrscg -lscg $(LIB_VOLMGT) -ldeflt -lschily $(SCSILIB) $(LIB_SOCKET) + scsi.c + +# +# LIB_CAP is needed for Linux capability support in librscg. +# +LIBS= -lscgcmd -lrscg -lscg $(LIB_VOLMGT) -lcdrdeflt -ldeflt -lschily $(SCSILIB) $(LIB_SOCKET) $(LIB_INTL) $(LIB_CAP) XMK_FILE= isodebug_man.mk ########################################################################### diff -Nru cdrtools-2.01.01a33/mkisofs/diag/isodump.c cdrtools-3.02a09/mkisofs/diag/isodump.c --- cdrtools-2.01.01a33/mkisofs/diag/isodump.c 2007-07-26 16:35:14.000000000 +0000 +++ cdrtools-3.02a09/mkisofs/diag/isodump.c 2015-12-08 20:20:53.000000000 +0000 @@ -1,7 +1,8 @@ -/* @(#)isodump.c 1.31 07/07/26 joerg */ +/* @(#)isodump.c 1.52 15/12/08 joerg */ +#include #ifndef lint -static char sccsid[] = - "@(#)isodump.c 1.31 07/07/26 joerg"; +static UConst char sccsid[] = + "@(#)isodump.c 1.52 15/12/08 joerg"; #endif /* * File isodump.c - dump iso9660 directory information. @@ -10,7 +11,7 @@ * Written by Eric Youngdale (1993). * * Copyright 1993 Yggdrasil Computing, Incorporated - * Copyright (c) 1999-2007 J. Schilling + * Copyright (c) 1999-2015 J. Schilling * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 @@ -26,20 +27,22 @@ * Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#include #include #include #include #include -#include +#include #include #include -#include +#include #include +#include +#include "../iso9660.h" +#include "../rock.h" #include "../scsi.h" -#include "../../cdrecord/defaults.h" +#include "cdrdeflt.h" #include "../../cdrecord/version.h" /* @@ -67,76 +70,29 @@ #define ISO_BLOCKS(X) (((X) / SECTOR_SIZE) + (((X)%SECTOR_SIZE)?1:0)) #define infile in_image -FILE *infile = NULL; -off_t file_addr; -unsigned char buffer[2048]; -unsigned char search[64]; -int blocksize; +EXPORT FILE *infile = NULL; +EXPORT BOOL ignerr = FALSE; +LOCAL off_t file_addr; +LOCAL int su_version; +LOCAL int rr_version; +LOCAL int use_rock = TRUE; +LOCAL unsigned char buffer[2048]; +LOCAL unsigned char search[64]; +LOCAL int blocksize; #define PAGE sizeof (buffer) -#define ISODCL(from, to) (to - from + 1) - -struct iso_primary_descriptor { - unsigned char type [ISODCL(1, 1)]; /* 711 */ - unsigned char id [ISODCL(2, 6)]; - unsigned char version [ISODCL(7, 7)]; /* 711 */ - unsigned char unused1 [ISODCL(8, 8)]; - unsigned char system_id [ISODCL(9, 40)]; /* aunsigned chars */ - unsigned char volume_id [ISODCL(41, 72)]; /* dunsigned chars */ - unsigned char unused2 [ISODCL(73, 80)]; - unsigned char volume_space_size [ISODCL(81, 88)]; /* 733 */ - unsigned char unused3 [ISODCL(89, 120)]; - unsigned char volume_set_size [ISODCL(121, 124)]; /* 723 */ - unsigned char volume_sequence_number [ISODCL(125, 128)]; /* 723 */ - unsigned char logical_block_size [ISODCL(129, 132)]; /* 723 */ - unsigned char path_table_size [ISODCL(133, 140)]; /* 733 */ - unsigned char type_l_path_table [ISODCL(141, 144)]; /* 731 */ - unsigned char opt_type_l_path_table [ISODCL(145, 148)]; /* 731 */ - unsigned char type_m_path_table [ISODCL(149, 152)]; /* 732 */ - unsigned char opt_type_m_path_table [ISODCL(153, 156)]; /* 732 */ - unsigned char root_directory_record [ISODCL(157, 190)]; /* 9.1 */ - unsigned char volume_set_id [ISODCL(191, 318)]; /* dunsigned chars */ - unsigned char publisher_id [ISODCL(319, 446)]; /* achars */ - unsigned char preparer_id [ISODCL(447, 574)]; /* achars */ - unsigned char application_id [ISODCL(575, 702)]; /* achars */ - unsigned char copyright_file_id [ISODCL(703, 739)]; /* 7.5 dchars */ - unsigned char abstract_file_id [ISODCL(740, 776)]; /* 7.5 dchars */ - unsigned char bibliographic_file_id [ISODCL(777, 813)]; /* 7.5 dchars */ - unsigned char creation_date [ISODCL(814, 830)]; /* 8.4.26.1 */ - unsigned char modification_date [ISODCL(831, 847)]; /* 8.4.26.1 */ - unsigned char expiration_date [ISODCL(848, 864)]; /* 8.4.26.1 */ - unsigned char effective_date [ISODCL(865, 881)]; /* 8.4.26.1 */ - unsigned char file_structure_version [ISODCL(882, 882)]; /* 711 */ - unsigned char unused4 [ISODCL(883, 883)]; - unsigned char application_data [ISODCL(884, 1395)]; - unsigned char unused5 [ISODCL(1396, 2048)]; -}; - -struct iso_directory_record { - unsigned char length [ISODCL(1, 1)]; /* 711 */ - unsigned char ext_attr_length [ISODCL(2, 2)]; /* 711 */ - unsigned char extent [ISODCL(3, 10)]; /* 733 */ - unsigned char size [ISODCL(11, 18)]; /* 733 */ - unsigned char date [ISODCL(19, 25)]; /* 7 by 711 */ - unsigned char flags [ISODCL(26, 26)]; - unsigned char file_unit_size [ISODCL(27, 27)]; /* 711 */ - unsigned char interleave [ISODCL(28, 28)]; /* 711 */ - unsigned char volume_sequence_number [ISODCL(29, 32)]; /* 723 */ - unsigned char name_len [ISODCL(33, 33)]; /* 711 */ - unsigned char name [1]; -}; - LOCAL int isonum_731 __PR((char * p)); LOCAL int isonum_721 __PR((char * p)); LOCAL int isonum_723 __PR((char * p)); -LOCAL int isonum_733 __PR((unsigned char * p)); +LOCAL int isonum_733 __PR((char * p)); LOCAL void reset_tty __PR((void)); LOCAL void set_tty __PR((void)); LOCAL void onsusp __PR((int signo)); LOCAL void crsr2 __PR((int row, int col)); LOCAL int parse_rr __PR((unsigned char * pnt, int len, int cont_flag)); -LOCAL void dump_rr __PR((struct iso_directory_record * idr)); +LOCAL void find_rr __PR((struct iso_directory_record * idr, Uchar **pntp, int *lenp)); +LOCAL int dump_rr __PR((struct iso_directory_record * idr)); LOCAL void showblock __PR((int flag)); LOCAL int getbyte __PR((void)); LOCAL void usage __PR((int excode)); @@ -165,12 +121,8 @@ { #if 0 if (p[0] != p[3] || p[1] != p[2]) { -#ifdef USE_LIBSCHILY - comerrno(EX_BAD, "invalid format 7.2.3 number\n"); -#else fprintf(stderr, "invalid format 7.2.3 number\n"); exit(1); -#endif } #endif return (isonum_721(p)); @@ -179,18 +131,20 @@ LOCAL int isonum_733(p) - unsigned char *p; + char *p; { - return (isonum_731((char *)p)); + return (isonum_731(p)); } #ifdef USE_V7_TTY LOCAL struct sgttyb savetty; LOCAL struct sgttyb newtty; #else +#ifdef USE_TERMIOS LOCAL struct termios savetty; LOCAL struct termios newtty; #endif +#endif LOCAL void reset_tty() @@ -198,18 +152,18 @@ #ifdef USE_V7_TTY if (ioctl(STDIN_FILENO, TIOCSETN, &savetty) == -1) { #else -#ifdef TCSANOW - if (tcsetattr(STDIN_FILENO, TCSANOW, &savetty) == -1) { +#ifdef USE_TERMIOS +#ifdef TCSANOW + if (tcsetattr(STDIN_FILENO, TCSANOW, &savetty) == -1) { #else if (ioctl(STDIN_FILENO, TCSETAF, &savetty) == -1) { #endif +#else /* USE_TERMIOS */ + if (0) { +#endif /* USE_TERMIOS */ #endif -#ifdef USE_LIBSCHILY - comerr("Cannot put tty into normal mode\n"); -#else - printf("Cannot put tty into normal mode\n"); + printf(_("Cannot put tty into normal mode\n")); exit(1); -#endif } } @@ -219,18 +173,18 @@ #ifdef USE_V7_TTY if (ioctl(STDIN_FILENO, TIOCSETN, &newtty) == -1) { #else -#ifdef TCSANOW +#ifdef USE_TERMIOS +#ifdef TCSANOW if (tcsetattr(STDIN_FILENO, TCSANOW, &newtty) == -1) { #else if (ioctl(STDIN_FILENO, TCSETAF, &newtty) == -1) { #endif +#else /* USE_TERMIOS */ + if (0) { +#endif /* USE_TERMIOS */ #endif -#ifdef USE_LIBSCHILY - comerr("Cannot put tty into raw mode\n"); -#else - printf("Cannot put tty into raw mode\n"); + printf(_("Cannot put tty into raw mode\n")); exit(1); -#endif } } @@ -287,7 +241,7 @@ unsigned char *pnts; char symlinkname[1024]; char name[1024]; - int goof; + int goof = 0; /* printf(" RRlen=%d ", len); */ @@ -297,7 +251,8 @@ cont_offset = cont_size = 0; ncount = 0; - flag1 = flag2 = 0; + flag1 = -1; + flag2 = 0; while (len >= 4) { if (ncount) printf(","); @@ -305,16 +260,19 @@ printf("["); printf("%c%c", pnt[0], pnt[1]); if (pnt[3] != 1 && pnt[3] != 2) { - printf("**BAD RRVERSION (%d) for %c%c\n", pnt[3], pnt[0], pnt[1]); + printf(_("**BAD RRVERSION (%d) for %c%c\n"), pnt[3], pnt[0], pnt[1]); return (0); /* JS ??? Is this right ??? */ + } else if (pnt[2] < 4) { + printf(_("**BAD RRLEN (%d) in '%2.2s' field %2.2X %2.2X.\n"), pnt[2], pnt, pnt[0], pnt[1]); + return (0); /* JS ??? Is this right ??? */ } else if (pnt[0] == 'R' && pnt[1] == 'R') { - printf("=%d", pnt[3]); + printf("=%d", pnt[3]); /* RR version */ } ncount++; if (pnt[0] == 'R' && pnt[1] == 'R') flag1 = pnt[4] & 0xff; - if (strncmp((char *)pnt, "PX", 2) == 0) flag2 |= 1; - if (strncmp((char *)pnt, "PN", 2) == 0) flag2 |= 2; - if (strncmp((char *)pnt, "SL", 2) == 0) flag2 |= 4; + if (strncmp((char *)pnt, "PX", 2) == 0) flag2 |= RR_FLAG_PX; + if (strncmp((char *)pnt, "PN", 2) == 0) flag2 |= RR_FLAG_PN; + if (strncmp((char *)pnt, "SL", 2) == 0) flag2 |= RR_FLAG_SL; if (strncmp((char *)pnt, "NM", 2) == 0) { slen = pnt[2] - 5; pnts = pnt+5; @@ -324,35 +282,57 @@ memset(name, 0, sizeof (name)); memcpy(name, pnts, slen); printf("=%s", name); - flag2 |= 8; + flag2 |= RR_FLAG_NM; } - if (strncmp((char *)pnt, "CL", 2) == 0) flag2 |= 16; - if (strncmp((char *)pnt, "PL", 2) == 0) flag2 |= 32; - if (strncmp((char *)pnt, "RE", 2) == 0) flag2 |= 64; - if (strncmp((char *)pnt, "TF", 2) == 0) flag2 |= 128; + if (strncmp((char *)pnt, "CL", 2) == 0) flag2 |= RR_FLAG_CL; + if (strncmp((char *)pnt, "PL", 2) == 0) flag2 |= RR_FLAG_PL; + if (strncmp((char *)pnt, "RE", 2) == 0) flag2 |= RR_FLAG_RE; + if (strncmp((char *)pnt, "TF", 2) == 0) flag2 |= RR_FLAG_TF; if (strncmp((char *)pnt, "PX", 2) == 0) { - extent = isonum_733(pnt+12); + extent = isonum_733((char *)pnt+12); /* Link count */ printf("=%x", extent); } if (strncmp((char *)pnt, "CE", 2) == 0) { - cont_extent = (off_t)isonum_733(pnt+4); - cont_offset = isonum_733(pnt+12); - cont_size = isonum_733(pnt+20); + cont_extent = (off_t)isonum_733((char *)pnt+4); + cont_offset = isonum_733((char *)pnt+12); + cont_size = isonum_733((char *)pnt+20); printf("=[%x,%x,%d]", (int)cont_extent, cont_offset, cont_size); } + if (strncmp((char *)pnt, "ER", 2) == 0) { /* ER */ + int lid = pnt[4] & 0xFF; /* Len ID */ + int ldes = pnt[5] & 0xFF; /* Len des */ + int lsrc = pnt[6] & 0xFF; /* Len src */ + int xver = pnt[7] & 0xFF; /* X vers */ + flag2 |= RR_FLAG_ER; /* ER record */ + + rr_version = xver; + printf(_("=[len_id=%d,len_des=%d,len_src=%d,ext_ver=%d,id=\"%.*s\"]"), + lid, ldes, lsrc, xver, lid, &pnt[8]); + + } + if (strncmp((char *)pnt, "SP", 2) == 0) { /* SUSP */ + flag2 |= RR_FLAG_SP; /* SUSP record */ + su_version = pnt[3] & 0xff; + printf(_("=[skip=%d]"), pnt[6] & 0xFF); /* SUSP skip off */ + + } + if (strncmp((char *)pnt, "ST", 2) == 0) { /* Terminate SUSP */ + break; + } + if (strncmp((char *)pnt, "PL", 2) == 0 || strncmp((char *)pnt, "CL", 2) == 0) { - extent = isonum_733(pnt+4); - printf("=%x", extent); + extent = isonum_733((char *)pnt+4); + printf("=%x", extent); /* DIR extent */ } if (strncmp((char *)pnt, "SL", 2) == 0) { int cflag; - cflag = pnt[4]; + cflag = pnt[4]; /* Component flag */ pnts = pnt+5; slen = pnt[2] - 5; while (slen >= 1) { @@ -372,19 +352,19 @@ break; case 16: strcat(symlinkname, "/mnt"); - printf("Warning - mount point requested"); + printf(_("Warning - mount point requested")); break; case 32: strcat(symlinkname, "kafka"); - printf("Warning - host_name requested"); + printf(_("Warning - host_name requested")); break; default: - printf("Reserved bit setting in symlink"); + printf(_("Reserved bit setting in symlink")); goof++; break; } if ((pnts[0] & 0xfe) && pnts[1] != 0) { - printf("Incorrect length in symlink component"); + printf(_("Incorrect length in symlink component")); } if ((pnts[0] & 1) == 0) strcat(symlinkname, "/"); @@ -400,37 +380,44 @@ len -= pnt[2]; pnt += pnt[2]; - if (len <= 3 && cont_extent) { - unsigned char sector[2048]; + } + if (cont_extent) { + unsigned char sector[2048]; #ifdef USE_SCG - readsecs(cont_extent * blocksize / 2048, sector, ISO_BLOCKS(sizeof (sector))); + readsecs(cont_extent * blocksize / 2048, sector, ISO_BLOCKS(sizeof (sector))); #else - lseek(fileno(infile), cont_extent * blocksize, SEEK_SET); - read(fileno(infile), sector, sizeof (sector)); + lseek(fileno(infile), cont_extent * blocksize, SEEK_SET); + read(fileno(infile), sector, sizeof (sector)); #endif - flag2 |= parse_rr(§or[cont_offset], cont_size, 1); - } + flag2 |= parse_rr(§or[cont_offset], cont_size, 1); } if (ncount) printf("]"); - if (!cont_flag && flag1 != flag2) { - printf("Flag %x != %x", flag1, flag2); + if (!cont_flag && flag1 != -1 && flag1 != (flag2 & 0xFF)) { + printf(_("Flag %x != %x"), flag1, flag2); goof++; } + /* + * XXX Check goof? + */ return (flag2); } LOCAL void -dump_rr(idr) +find_rr(idr, pntp, lenp) struct iso_directory_record *idr; + Uchar **pntp; + int *lenp; { - int len; - unsigned char *pnt; + struct iso_xa_dir_record *xadp; + int len; + unsigned char * pnt; len = idr->length[0] & 0xff; len -= offsetof(struct iso_directory_record, name[0]); len -= idr->name_len[0]; + pnt = (unsigned char *) idr; pnt += offsetof(struct iso_directory_record, name[0]); pnt += idr->name_len[0]; @@ -438,7 +425,28 @@ pnt++; len--; } - parse_rr(pnt, len, 0); + if (len >= 14) { + xadp = (struct iso_xa_dir_record *)pnt; + + if (xadp->signature[0] == 'X' && xadp->signature[1] == 'A' && + xadp->reserved[0] == '\0') { + len -= 14; + pnt += 14; + } + } + *pntp = pnt; + *lenp = len; +} + +LOCAL int +dump_rr(idr) + struct iso_directory_record *idr; +{ + int len; + unsigned char *pnt; + + find_rr(idr, &pnt, &len); + return (parse_rr(pnt, len, 0)); } @@ -481,7 +489,8 @@ for (j = 0; j < (int)idr->name_len[0]; j++) printf("%c", idr->name[j]); for (j = 0; j < (14 - (int)idr->name_len[0]); j++) printf(" "); } - dump_rr(idr); + if (use_rock) + dump_rr(idr); printf("\n"); i += buffer[i]; if (i > 2048 - offsetof(struct iso_directory_record, name[0])) @@ -491,11 +500,11 @@ } printf("\n"); if (sizeof (file_addr) > sizeof (long)) { - printf(" Zone, zone offset: %14llx %12.12llx ", + printf(_(" Zone, zone offset: %14llx %12.12llx "), (Llong)file_addr / blocksize, (Llong)file_addr & (Llong)(blocksize - 1)); } else { - printf(" Zone, zone offset: %6lx %4.4lx ", + printf(_(" Zone, zone offset: %6lx %4.4lx "), (long) (file_addr / blocksize), (long) file_addr & (blocksize - 1)); } @@ -518,15 +527,16 @@ usage(excode) int excode; { - errmsgno(EX_BAD, "Usage: %s [options] image\n", + errmsgno(EX_BAD, _("Usage: %s [options] image\n"), get_progname()); - error("Options:\n"); - error("\t-help, -h Print this help\n"); - error("\t-version Print version info and exit\n"); - error("\t-i filename Filename to read ISO-9660 image from\n"); - error("\tdev=target SCSI target to use as CD/DVD-Recorder\n"); - error("\nIf neither -i nor dev= are speficied, is needed.\n"); + error(_("Options:\n")); + error(_("\t-help, -h Print this help\n")); + error(_("\t-version Print version info and exit\n")); + error(_("\t-ignore-error Ignore errors\n")); + error(_("\t-i filename Filename to read ISO-9660 image from\n")); + error(_("\tdev=target SCSI target to use as CD/DVD-Recorder\n")); + error(_("\nIf neither -i nor dev= are specified, is needed.\n")); exit(excode); } @@ -537,11 +547,14 @@ { int cac; char * const *cav; - char *opts = "help,h,version,i*,dev*"; + char *opts = "help,h,version,ignore-error,i*,dev*"; BOOL help = FALSE; BOOL prvers = FALSE; char *filename = NULL; - char *devname = NULL; + char *sdevname = NULL; +#if defined(USE_NLS) + char *dir; +#endif char c; int i; struct iso_primary_descriptor ipd; @@ -549,54 +562,70 @@ save_args(argc, argv); +#if defined(USE_NLS) + setlocale(LC_ALL, ""); +#if !defined(TEXT_DOMAIN) /* Should be defined by cc -D */ +#define TEXT_DOMAIN "isoinfo" /* Use this only if it weren't */ +#endif + dir = searchfileinpath("share/locale", F_OK, + SIP_ANY_FILE|SIP_NO_PATH, NULL); + if (dir) + (void) bindtextdomain(TEXT_DOMAIN, dir); + else +#if defined(PROTOTYPES) && defined(INS_BASE) + (void) bindtextdomain(TEXT_DOMAIN, INS_BASE "/share/locale"); +#else + (void) bindtextdomain(TEXT_DOMAIN, "/usr/share/locale"); +#endif + (void) textdomain(TEXT_DOMAIN); +#endif + cac = argc - 1; cav = argv + 1; - if (getallargs(&cac, &cav, opts, &help, &help, &prvers, - &filename, &devname) < 0) { - errmsgno(EX_BAD, "Bad Option: '%s'\n", cav[0]); + if (getallargs(&cac, &cav, opts, &help, &help, &prvers, &ignerr, + &filename, &sdevname) < 0) { + errmsgno(EX_BAD, _("Bad Option: '%s'\n"), cav[0]); usage(EX_BAD); } if (help) usage(0); if (prvers) { - printf("isodump %s (%s-%s-%s) Copyright (C) 1993-1999 Eric Youngdale (C) 1999-2007 Jörg Schilling\n", + printf(_("isodump %s (%s-%s-%s) Copyright (C) 1993-1999 %s (C) 1999-2015 %s\n"), VERSION, - HOST_CPU, HOST_VENDOR, HOST_OS); + HOST_CPU, HOST_VENDOR, HOST_OS, + _("Eric Youngdale"), + _("Joerg Schilling")); exit(0); } cac = argc - 1; cav = argv + 1; - if (filename == NULL && devname == NULL) { + if (filename == NULL && sdevname == NULL) { if (getfiles(&cac, &cav, opts) != 0) { filename = cav[0]; cac--, cav++; } } if (getfiles(&cac, &cav, opts) != 0) { - errmsgno(EX_BAD, "Bad Argument: '%s'\n", cav[0]); + errmsgno(EX_BAD, _("Bad Argument: '%s'\n"), cav[0]); usage(EX_BAD); } - if (filename != NULL && devname != NULL) { - errmsgno(EX_BAD, "Only one of -i or dev= allowed\n"); + if (filename != NULL && sdevname != NULL) { + errmsgno(EX_BAD, _("Only one of -i or dev= allowed\n")); usage(EX_BAD); } #ifdef USE_SCG - if (filename == NULL && devname == NULL) - cdr_defaults(&devname, NULL, NULL, NULL); -#endif - if (filename == NULL && devname == NULL) { -#ifdef USE_LIBSCHILY - errmsgno(EX_BAD, "ISO-9660 image not specified\n"); -#else - fprintf(stderr, "ISO-9660 image not specified\n"); + if (filename == NULL && sdevname == NULL) + cdr_defaults(&sdevname, NULL, NULL, NULL, NULL); #endif + if (filename == NULL && sdevname == NULL) { + fprintf(stderr, _("ISO-9660 image not specified\n")); usage(EX_BAD); } if (filename != NULL) infile = fopen(filename, "rb"); else - filename = devname; + filename = sdevname; if (infile != NULL) { /* EMPTY */; @@ -605,12 +634,8 @@ #else } else { #endif -#ifdef USE_LIBSCHILY - comerr("Cannot open '%s'\n", filename); -#else - fprintf(stderr, "Cannot open '%s'\n", filename); + fprintf(stderr, _("Cannot open '%s'\n"), filename); exit(1); -#endif } file_addr = (off_t) (16 << 11); @@ -630,32 +655,47 @@ file_addr = (off_t)isonum_733(idr->extent); file_addr = file_addr * blocksize; +#ifdef USE_SCG + readsecs(file_addr / 2048, buffer, ISO_BLOCKS(sizeof (buffer))); +#else + lseek(fileno(infile), file_addr, SEEK_SET); + read(fileno(infile), buffer, sizeof (buffer)); +#endif + i = dump_rr((struct iso_directory_record *) buffer); + if (i == 0 || + (i & (RR_FLAG_SP | RR_FLAG_ER)) == 0 || su_version < 1 || rr_version < 1) { + use_rock = FALSE; + } + /* Now setup the keyboard for single character input. */ #ifdef USE_V7_TTY if (ioctl(STDIN_FILENO, TIOCGETP, &savetty) == -1) { #else -#ifdef TCSANOW +#ifdef USE_TERMIOS +#ifdef TCSANOW if (tcgetattr(STDIN_FILENO, &savetty) == -1) { #else if (ioctl(STDIN_FILENO, TCGETA, &savetty) == -1) { #endif +#else /* USE_TERMIOS */ + if (0) { +#endif /* USE_TERMIOS */ #endif -#ifdef USE_LIBSCHILY - comerr("Stdin must be a tty\n"); -#else - printf("Stdin must be a tty\n"); + printf(_("Stdin must be a tty\n")); exit(1); -#endif } - newtty = savetty; #ifdef USE_V7_TTY + newtty = savetty; newtty.sg_flags &= ~(ECHO|CRMOD); newtty.sg_flags |= CBREAK; #else +#ifdef USE_TERMIOS + newtty = savetty; newtty.c_lflag &= ~ICANON; newtty.c_lflag &= ~ECHO; newtty.c_cc[VMIN] = 1; #endif +#endif set_tty(); #ifdef SIGTSTP signal(SIGTSTP, onsusp); @@ -666,14 +706,18 @@ if (file_addr < 0) file_addr = (off_t)0; showblock(1); +#ifdef USE_GETCH + c = getch(); /* DOS console input */ +#else read(STDIN_FILENO, &c, 1); +#endif if (c == 'a') file_addr -= blocksize; if (c == 'b') file_addr += blocksize; if (c == 'g') { crsr2(20, 1); - printf("Enter new starting block (in hex):"); + printf(_("Enter new starting block (in hex):")); if (sizeof (file_addr) > sizeof (long)) { Llong ll; scanf("%llx", &ll); @@ -689,7 +733,7 @@ } if (c == 'f') { crsr2(20, 1); - printf("Enter new search string:"); + printf(_("Enter new search string:")); fgets((char *)search, sizeof (search), stdin); while (search[strlen((char *)search)-1] == '\n') search[strlen((char *)search)-1] = 0; diff -Nru cdrtools-2.01.01a33/mkisofs/diag/isodump.mk cdrtools-3.02a09/mkisofs/diag/isodump.mk --- cdrtools-2.01.01a33/mkisofs/diag/isodump.mk 2007-02-04 23:25:38.000000000 +0000 +++ cdrtools-3.02a09/mkisofs/diag/isodump.mk 2013-04-21 18:24:56.000000000 +0000 @@ -1,4 +1,4 @@ -#ident @(#)isodump.mk 1.7 07/02/05 +#ident @(#)isodump.mk 1.12 13/04/21 ########################################################################### # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License version 2 @@ -11,7 +11,7 @@ # # You should have received a copy of the GNU General Public License along with # this program; see the file COPYING. If not, write to the Free Software -# Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ########################################################################### SRCROOT= ../.. RULESDIR= RULES @@ -24,13 +24,20 @@ CPPOPTS += -DUSE_LARGEFILES CPPOPTS += -DUSE_SCG CPPOPTS += -I.. -CPPOPTS += -I../../cdrecord +CPPOPTS += -I../../libscg +CPPOPTS += -I../../libscgcmd +CPPOPTS += -I../../libcdrdeflt CPPOPTS += -DSCHILY_PRINT +CPPOPTS += -DINS_BASE=\"${INS_BASE}\" +CPPOPTS += -DTEXT_DOMAIN=\"SCHILY_cdrtools\" CFILES= isodump.c \ - scsi.c scsi_cdr.c cd_misc.c modes.c \ - defaults.c -LIBS= -lrscg -lscg $(LIB_VOLMGT) -ldeflt -lschily $(SCSILIB) $(LIB_SOCKET) + scsi.c + +# +# LIB_CAP is needed for Linux capability support in librscg. +# +LIBS= -lscgcmd -lrscg -lscg $(LIB_VOLMGT) -lcdrdeflt -ldeflt -lschily $(SCSILIB) $(LIB_SOCKET) $(LIB_INTL) $(LIB_CAP) XMK_FILE= isodump_man.mk ########################################################################### diff -Nru cdrtools-2.01.01a33/mkisofs/diag/isoinfo.8 cdrtools-3.02a09/mkisofs/diag/isoinfo.8 --- cdrtools-2.01.01a33/mkisofs/diag/isoinfo.8 2007-06-29 20:21:35.000000000 +0000 +++ cdrtools-3.02a09/mkisofs/diag/isoinfo.8 2015-11-02 22:04:12.000000000 +0000 @@ -1,5 +1,5 @@ .\" -.\" @(#)isoinfo.8 1.8 07/06/29 joerg +.\" @(#)isoinfo.8 1.16 15/11/02 joerg .\" .\" -*- nroff -*- .if t .ds a \v'-0.55m'\h'0.00n'\z.\h'0.40n'\z.\v'0.55m'\h'-0.40n'a @@ -14,7 +14,7 @@ .if n .ds o oe .if n .ds u ue .if n .ds s sz -.TH ISOINFO 8 "07/06/29" "Version 2.0" +.TH ISOINFO 8 "2015/11/02" "Version 3.02" .SH NAME devdump, isoinfo, isovfy, isodump \- Utility programs for dumping and verifying iso9660 images. @@ -27,46 +27,13 @@ .PP .B isoinfo [ -.B \-d -] -[ -.B \-h -] -[ -.B \-R -] -[ -.B \-J -] -[ -.B \-j -.I charset -] -[ -.B \-f -] -[ -.B \-l -] -[ -.B \-p +.I options ] [ -.B \-T -.I sector -] -[ -.B \-N -.I sector -] -[ -.B \-i -.I isoimage -] +.B\-find [ -.B \-x -.I path -] +.I find expression +]] .PP .B isovfy .I isoimage @@ -134,6 +101,29 @@ image with the .B -f option. +The same output is created by calling +.I isoinfo +with +.B \-find \-print +.TP +.BI \-find " find expression +This option acts a separator. If it is used, all +.B isoinfo +options must be to the left of the +.B \-find +option. To the right of the +.B \-find +option, mkisofs accepts the find command line syntax only. +If the find expression includes a +.B \-print +or +.B \-ls +promary, the +.B \-l to +.B isoinfo +is ignored. +If the find expression evaluates as true, the selected action (e.g. +list the ISO-9660 directory) is performed. .TP .B \-i iso_image Specifies the path of the iso9660 image that we wish to examine. @@ -143,6 +133,13 @@ .BI dev= target are mutual exclusive. .TP +.BI \-ignore\-error +Ignore errors. +The commands +by default aborts on several errors, such as read errors. With this option in effect, +the commands try to continue. +Use with care. +.TP .BI dev= target Sets the SCSI target for the drive, see notes above. A typical device specification is @@ -185,6 +182,15 @@ .BI dev= target are mutual exclusive. .TP +.B \-debug +Print additional debug information. This enables e.g. printing +of all directory entries if a file has more than one directory entry +and printing of more information from the primary volume descriptor. +.sp +In debug mode, Rock Ridge information is parsed with +.B \-R +even if it is not standard compliant. +.TP .B \-l generate output as if a 'ls -lR' command had been run on the iso9660 image. You should not use the @@ -192,6 +198,39 @@ image with the .B -l option. +.sp +The numbers in square brackets are the starting sector number as decimal +number (based on 2048 bytes per sector) and the iso9660 directory flags +as hexadecimal number as follows: +.RS +.TP +.B 0x00 +A plain file (not really a flag). +.TP +.B 0x01 +Hide the file name from directory listings. +.TP +.B 0x02 +A directory. +.TP +.B 0x04 +An accociated file (e.g. an Apple resource fork). +.TP +.B 0x08 +Record format in extended attributes is used. +.TP +.B 0x10 +No read/execute permission in extended attributes. +.TP +.B 0x20 +reserved +.TP +.B 0x40 +reserved +.TP +.B 0x80 +Not the final entry of a multi extent file. +.RE .TP .B \-N sector Quick hack to help examine single session disc files that are to be written to @@ -206,6 +245,9 @@ Extract information from Rock Ridge extensions (if present) for permissions, file names and ownerships. .TP +.B \-s +Print file size infos in multiples of sector size (2048 bytes). +.TP .B \-J Extract information from Joliet extensions (if present) for file names. .TP @@ -219,8 +261,33 @@ to a multi-session disc. The sector number specified is the sector number for the start of the session we wish to display. .TP +.B \-X +Extract files from the image and put them into the filesystem. +If the +.B \-find +option is not used, all files are extracted. +.sp +The +.B isoinfo +program supports to extract all files, even multi extent +files (files > 4 GB). +.sp +Before extracting files using the +.B \-X +option, it is recommended to change the current directory +to an empty directory in order to prevent to clobber existing files. +.TP .B \-x pathname Extract specified file to stdout. +The +.B pathname +needs to start with a shlash ('/') and in case of iso9660 names, must match +the full pathname of the file inluding the version number (usually ';1'). +If the option +.B \-R +has been specified and the filesystem carries Rock Ridge attributes, the +.B pathname +must match the full Rock Ridge pathname of the file. .SH AUTHOR The author of the original sources (1993 .\|.\|. 1998) is Eric Youngdale or is to blame @@ -242,8 +309,8 @@ .SH AVAILABILITY These utilities come with the .B cdrtools -package, and the primary ftp site -is ftp.berlios.de in /pub/cdrecord and many other mirror +package, and the primary download site +is https://sourceforge.net/projects/cdrtools/files/ and many other mirror sites. Despite the name, the software is not beta. .SH ENVIRONMENT diff -Nru cdrtools-2.01.01a33/mkisofs/diag/isoinfo.c cdrtools-3.02a09/mkisofs/diag/isoinfo.c --- cdrtools-2.01.01a33/mkisofs/diag/isoinfo.c 2007-07-29 22:33:21.000000000 +0000 +++ cdrtools-3.02a09/mkisofs/diag/isoinfo.c 2016-08-10 21:18:33.000000000 +0000 @@ -1,7 +1,8 @@ -/* @(#)isoinfo.c 1.58 07/07/30 joerg */ +/* @(#)isoinfo.c 1.108 16/08/10 joerg */ +#include #ifndef lint -static char sccsid[] = - "@(#)isoinfo.c 1.58 07/07/30 joerg"; +static UConst char sccsid[] = + "@(#)isoinfo.c 1.108 16/08/10 joerg"; #endif /* * File isodump.c - dump iso9660 directory information. @@ -10,7 +11,7 @@ * Written by Eric Youngdale (1993). * * Copyright 1993 Yggdrasil Computing, Incorporated - * Copyright (c) 1999-2007 J. Schilling + * Copyright (c) 1999-2016 J. Schilling * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 @@ -38,29 +39,37 @@ * isoinfo -f -i imagefile */ -#include #include #include #include -#include +#include #include #include -#include -#include +#include #include +#include +#include #include +#include +#include +#include +#include +#include +#include #include #include "../iso9660.h" +#include "../rock.h" #include "../scsi.h" -#include "../../cdrecord/defaults.h" +#include "cdrdeflt.h" #include "../../cdrecord/version.h" #include - -#if defined(__CYGWIN32__) || defined(__EMX__) || defined(__DJGPP__) -#include /* for setmode() prototype */ +#include /* for setmode() prototype */ +#ifdef USE_FIND +#include +#include #endif /* @@ -73,9 +82,8 @@ * XXX Eric's wrong comment: * XXX From what I can tell SunOS is the only one with this trouble. */ -#ifdef HAVE_LIMITS_H -#include -#endif +#include + #ifndef NAME_MAX #ifdef FILENAME_MAX #define NAME_MAX FILENAME_MAX @@ -104,17 +112,6 @@ #define offsetof(TYPE, MEMBER) ((size_t) &((TYPE *)0)->MEMBER) #endif -#ifndef S_ISLNK -#define S_ISLNK(m) (((m) & S_IFMT) == S_IFLNK) -#endif -#ifndef S_ISSOCK -#ifdef S_IFSOCK -# define S_ISSOCK(m) (((m) & S_IFMT) == S_IFSOCK) -#else -# define S_ISSOCK(m) (0) -#endif -#endif - /* * Note: always use these macros to avoid problems. * @@ -127,68 +124,132 @@ #define ISO_ROUND_UP(X) (((X) + (SECTOR_SIZE - 1)) & ~(SECTOR_SIZE - 1)) #define ISO_BLOCKS(X) (((X) / SECTOR_SIZE) + (((X)%SECTOR_SIZE)?1:0)) +#define GET_UBYTE(a) a_to_u_byte(a) + #define infile in_image -FILE *infile = NULL; -int use_rock = 0; -int use_joliet = 0; -int do_listing = 0; -int do_find = 0; -int do_sectors = 0; -int do_pathtab = 0; -int do_pvd = 0; -BOOL debug = FALSE; -char *xtract = 0; -int su_version = 0; -int aa_version = 0; -int ucs_level = 0; - -struct stat fstat_buf; -int found_rr; -char name_buf[256]; -char xname[2048]; -unsigned char date_buf[9]; +EXPORT FILE *infile = NULL; +EXPORT BOOL ignerr = FALSE; +LOCAL int use_rock = 0; +LOCAL int use_joliet = 0; +LOCAL int do_listing = 0; +LOCAL int do_f = 0; +LOCAL int do_find = 0; +LOCAL int find_ac = 0; /* ac past -find option */ +LOCAL char *const *find_av = NULL; /* av past -find option */ +LOCAL int find_pac = 0; /* ac for first find primary */ +LOCAL char *const *find_pav = NULL; /* av for first find primary */ +LOCAL int do_sectors = 0; +LOCAL int do_pathtab = 0; +LOCAL int do_pvd = 0; +LOCAL BOOL debug = FALSE; +LOCAL char *xtract = 0; +LOCAL BOOL Xtract = FALSE; +LOCAL char er_id[256]; +LOCAL int su_version = 0; +LOCAL int rr_version = 0; +LOCAL int aa_version = 0; +LOCAL int cl_extent = 0; +LOCAL int ucs_level = 0; +LOCAL BOOL iso9660_inodes = FALSE; +LOCAL uid_t myuid; + +#ifdef USE_FIND +LOCAL findn_t *find_node; /* syntaxtree from find_parse() */ +LOCAL void *plusp; /* residual for -exec ...{} + */ +LOCAL int find_patlen; /* len for -find pattern state */ +LOCAL BOOL find_print = FALSE; /* -print or -ls primary found */ + +LOCAL int walkflags = WALK_CHDIR | WALK_PHYS | WALK_NOEXIT; +LOCAL int maxdepth = -1; +LOCAL int mindepth = -1; +LOCAL struct WALK walkstate; +#endif + +LOCAL struct stat fstat_buf; +LOCAL int found_rr; +LOCAL char name_buf[256*3]; +LOCAL char xname[8192]; +LOCAL unsigned char date_buf[9]; /* iso_directory_record.date[7] */ /* * Use sector_offset != 0 (-N #) if we have an image file * of a single session and we need to list the directory contents. * This is the session block (sector) number of the start * of the session when it would be on disk. */ -unsigned int sector_offset = 0; +LOCAL unsigned int sector_offset = 0; -unsigned char buffer[2048]; +LOCAL unsigned char buffer[2048]; -siconvt_t *unls; +LOCAL siconvt_t *unls; #define PAGE sizeof (buffer) #define ISODCL(from, to) (to - from + 1) +struct todo +{ + struct todo *next; + struct todo *prev; + char *name; + int extent; + int length; +}; -int isonum_721 __PR((char * p)); -int isonum_723 __PR((char * p)); -int isonum_731 __PR((char * p)); -int isonum_732 __PR((char * p)); -int isonum_733 __PR((unsigned char * p)); -void printchars __PR((char *s, int n)); -char *sdate __PR((char *dp)); -void dump_pathtab __PR((int block, int size)); -int parse_rr __PR((unsigned char * pnt, int len, int cont_flag)); -void find_rr __PR((struct iso_directory_record * idr, Uchar **pntp, int *lenp)); -int dump_rr __PR((struct iso_directory_record * idr)); -void dump_stat __PR((struct iso_directory_record * idr, int extent)); -void extract_file __PR((struct iso_directory_record * idr)); -void parse_dir __PR((char * rootname, int extent, int len)); -void usage __PR((int excode)); -int main __PR((int argc, char *argv[])); +LOCAL struct todo *todo_idr = NULL; +LOCAL struct todo **todo_pp = &todo_idr; + +LOCAL int isonum_721 __PR((char * p)); +LOCAL int isonum_723 __PR((char * p)); +LOCAL int isonum_731 __PR((char * p)); +LOCAL int isonum_732 __PR((char * p)); +LOCAL int isonum_733 __PR((unsigned char * p)); +LOCAL void printchars __PR((char *s, int n, BOOL ucs)); +LOCAL char *sdate __PR((char *dp)); +LOCAL void dump_pathtab __PR((int block, int size)); +LOCAL int parse_rr __PR((unsigned char * pnt, int len, + int cont_flag)); +LOCAL void find_rr __PR((struct iso_directory_record * idr, + Uchar **pntp, int *lenp)); +LOCAL int dump_rr __PR((struct iso_directory_record * idr)); +LOCAL BOOL dump_stat __PR((char *rootname, + struct iso_directory_record * idr, + char *fname, + int extent)); +LOCAL void extract __PR((char *rootname, + struct iso_directory_record * idr, + char *fname)); +LOCAL void extract_file __PR((int f, + struct iso_directory_record * idr, + char *fname)); +LOCAL void parse_cl_dir __PR((struct iso_directory_record *idr, + int extent)); +LOCAL BOOL parse_de __PR((struct iso_directory_record *idr)); +LOCAL void parse_dir __PR((struct todo *dp, + char * rootname, int extent, int len)); +LOCAL void usage __PR((int excode)); +EXPORT int main __PR((int argc, char *argv[])); +LOCAL void list_vd __PR((struct iso_primary_descriptor *vp, BOOL ucs)); LOCAL void list_locales __PR((void)); LOCAL void printf_bootinfo __PR((FILE *f, int bootcat_offset)); LOCAL char *arch_name __PR((int val)); LOCAL char *boot_name __PR((int val)); LOCAL char *bootmedia_name __PR((int val)); +LOCAL int time_cvt __PR((unsigned char *dp, int len)); +LOCAL time_t iso9660_time __PR((unsigned char *date, int *hsecp, + BOOL longfmt)); +#ifdef USE_FIND +LOCAL int getfind __PR((char *arg, long *valp, + int *pac, char *const **pav)); +LOCAL BOOL find_stat __PR((char *rootname, + struct iso_directory_record * idr, + char *fname, + int extent)); +#endif + -int +LOCAL int isonum_721(p) char *p; { @@ -196,24 +257,20 @@ | ((p[1] & 0xff) << 8)); } -int +LOCAL int isonum_723(p) char * p; { #if 0 if (p[0] != p[3] || p[1] != p[2]) { -#ifdef USE_LIBSCHILY - comerrno(EX_BAD, "invalid format 7.2.3 number\n"); -#else fprintf(stderr, "invalid format 7.2.3 number\n"); exit(1); -#endif } #endif return (isonum_721(p)); } -int +LOCAL int isonum_731(p) char *p; { @@ -223,7 +280,7 @@ | ((p[3] & 0xff) << 24)); } -int +LOCAL int isonum_732(p) char *p; { @@ -233,38 +290,59 @@ | ((p[0] & 0xff) << 24)); } -int +LOCAL int isonum_733(p) unsigned char *p; { return (isonum_731((char *)p)); } -void -printchars(s, n) +LOCAL void +printchars(s, n, ucs) char *s; int n; + BOOL ucs; { int i; char *p; + int c; - for (; n > 0 && *s; n--) { - if (*s == ' ') { + for (; n > 0 && (*s || (ucs && s[1])); n--) { + if (ucs) { + c = *s++ & 0xFF; + c *= 256; + c += *s++ & 0xFF; + n--; + } else { + c = *s++; + } + if (c == ' ') { + int c2; p = s; i = n; - while (--i >= 0 && *p++ == ' ') - ; + while (--i >= 0) { + if (ucs) { + c2 = *p++ & 0xFF; + c2 *= 256; + c2 += *p++ & 0xFF; + i--; + } else { + c2 = *p++; + } + if (c2 != ' ') + break; + } if (i <= 0) break; } - putchar(*s++); + putchar(c); } } /* * Print date info from PVD */ -char * +LOCAL char * sdate(dp) char *dp; { @@ -286,7 +364,7 @@ return (d); } -void +LOCAL void dump_pathtab(block, size) int block; int size; @@ -299,11 +377,11 @@ int j; int len; int jlen; - char namebuf[255]; + char namebuf[256*3]; unsigned char uc; - printf("Path table starts at block %d, size %d\n", block, size); + printf(_("Path table starts at block %d, size %d\n"), block, size); buf = (unsigned char *) malloc(ISO_ROUND_UP(size)); @@ -326,18 +404,55 @@ case 1: jlen = len/2; namebuf[0] = '\0'; +#ifdef USE_ICONV +#ifdef HAVE_ICONV_CONST +#define __IC_CONST const +#else +#define __IC_CONST +#endif + if (use_iconv(unls)) { + int u; + char *to = namebuf; + + for (j = 0, u = 0; j < jlen; j++) { + char *ibuf = (char *)&buf[offset + 8 + j*2]; + size_t isize = 2; /* UCS-2 character size */ + size_t osize = 4; + + if (iconv(unls->sic_uni2cd, (__IC_CONST char **)&ibuf, &isize, + (char **)&to, &osize) == -1) { + int err = geterrno(); + + if ((err == EINVAL || err == EILSEQ) && + osize == 4) { + *to = '_'; + u += 1; + to++; + } + } else { + u += 4 - osize; + to = &namebuf[u]; + } + } + j = u; + } else +#endif for (j = 0; j < jlen; j++) { UInt16_t unichar; unichar = (buf[offset + 8 + j*2] & 0xFF) * 256 + - (buf[offset + 8 + j*2+1] & 0xFF); + (buf[offset + 8 + j*2+1] & 0xFF); - uc = sic_uni2c(unls, unichar); /* Get the backconverted char */ + if (unls) + uc = sic_uni2c(unls, unichar); /* Get the backconverted char */ + else + uc = unichar > 255 ? '_' : unichar; namebuf[j] = uc ? uc : '_'; } - printf("%4d: %4d %x %.*s\n", - idx, pindex, extent, jlen, namebuf); + namebuf[j] = '\0'; + printf("%4d: %4d %x %s\n", + idx, pindex, extent, namebuf); break; case 0: printf("%4d: %4d %x %.*s\n", @@ -353,7 +468,7 @@ free(buf); } -int +LOCAL int parse_rr(pnt, len, cont_flag) unsigned char *pnt; int len; @@ -362,53 +477,106 @@ int slen; int xlen; int ncount; - int extent; + int pl_extent; int cont_extent, cont_offset, cont_size; int flag1, flag2; unsigned char *pnts; char symlinkname[1024]; - int goof; + int goof = 0; symlinkname[0] = 0; - cont_extent = cont_offset = cont_size = 0; + cl_extent = cont_extent = cont_offset = cont_size = 0; ncount = 0; - flag1 = flag2 = 0; + flag1 = -1; + flag2 = 0; while (len >= 4) { if (pnt[3] != 1 && pnt[3] != 2) { - printf("**BAD RRVERSION (%d)\n", pnt[3]); + printf(_("**BAD RRVERSION (%d) in '%2.2s' field %2.2X %2.2X.\n"), pnt[3], pnt, pnt[0], pnt[1]); + return (0); /* JS ??? Is this right ??? */ + } + if (pnt[2] < 4) { + printf(_("**BAD RRLEN (%d) in '%2.2s' field %2.2X %2.2X.\n"), pnt[2], pnt, pnt[0], pnt[1]); return (0); /* JS ??? Is this right ??? */ } + ncount++; if (pnt[0] == 'R' && pnt[1] == 'R') flag1 = pnt[4] & 0xff; - if (strncmp((char *)pnt, "PX", 2) == 0) flag2 |= 1; /* POSIX attributes */ - if (strncmp((char *)pnt, "PN", 2) == 0) flag2 |= 2; /* POSIX device number */ - if (strncmp((char *)pnt, "SL", 2) == 0) flag2 |= 4; /* Symlink */ - if (strncmp((char *)pnt, "NM", 2) == 0) flag2 |= 8; /* Alternate Name */ - if (strncmp((char *)pnt, "CL", 2) == 0) flag2 |= 16; /* Child link */ - if (strncmp((char *)pnt, "PL", 2) == 0) flag2 |= 32; /* Parent link */ - if (strncmp((char *)pnt, "RE", 2) == 0) flag2 |= 64; /* Relocated Direcotry */ - if (strncmp((char *)pnt, "TF", 2) == 0) flag2 |= 128; /* Time stamp */ + if (strncmp((char *)pnt, "PX", 2) == 0) flag2 |= RR_FLAG_PX; /* POSIX attributes */ + if (strncmp((char *)pnt, "PN", 2) == 0) flag2 |= RR_FLAG_PN; /* POSIX device number */ + if (strncmp((char *)pnt, "SL", 2) == 0) flag2 |= RR_FLAG_SL; /* Symlink */ + if (strncmp((char *)pnt, "NM", 2) == 0) flag2 |= RR_FLAG_NM; /* Alternate Name */ + if (strncmp((char *)pnt, "CL", 2) == 0) flag2 |= RR_FLAG_CL; /* Child link */ + if (strncmp((char *)pnt, "PL", 2) == 0) flag2 |= RR_FLAG_PL; /* Parent link */ + if (strncmp((char *)pnt, "RE", 2) == 0) flag2 |= RR_FLAG_RE; /* Relocated Direcotry */ + if (strncmp((char *)pnt, "TF", 2) == 0) { + BOOL longfmt; + int size = 7; + int hsec; + unsigned char *p = &pnt[5]; + + flag2 |= RR_FLAG_TF; /* Time stamp */ + longfmt = (pnt[4] & 0x80) != 0; + if (longfmt) + size = 17; + if (pnt[4] & 0x01) { + p += size; + } + if (pnt[4] & 0x02) { + fstat_buf.st_mtime = iso9660_time(p, + &hsec, longfmt); + hsec *= 10000000; + stat_set_mnsecs(&fstat_buf, hsec); + p += size; + } + if (pnt[4] & 0x04) { + fstat_buf.st_atime = iso9660_time(p, + &hsec, longfmt); + hsec *= 10000000; + stat_set_ansecs(&fstat_buf, hsec); + p += size; + } + if (pnt[4] & 0x08) { + fstat_buf.st_ctime = iso9660_time(p, + &hsec, longfmt); + hsec *= 10000000; + stat_set_cnsecs(&fstat_buf, hsec); + p += size; + } + } + if (strncmp((char *)pnt, "SF", 2) == 0) flag2 |= RR_FLAG_SF; /* Sparse File */ + if (strncmp((char *)pnt, "SP", 2) == 0) { - flag2 |= 1024; /* SUSP record */ + flag2 |= RR_FLAG_SP; /* SUSP record */ su_version = pnt[3] & 0xff; } - if (strncmp((char *)pnt, "AA", 2) == 0) { - flag2 |= 2048; /* Apple Signature record */ + if (strncmp((char *)pnt, "AA", 2) == 0) { /* Neither SUSP nor RR */ + flag2 |= RR_FLAG_AA; /* Apple Signature record */ aa_version = pnt[3] & 0xff; } + if (strncmp((char *)pnt, "ER", 2) == 0) { + flag2 |= RR_FLAG_ER; /* ER record */ + rr_version = pnt[7] & 0xff; /* Ext Version */ + strlcpy(er_id, (char *)&pnt[8], (pnt[4] & 0xFF) + 1); + } - if (strncmp((char *)pnt, "PX", 2) == 0) { /* POSIX attributes */ + if (strncmp((char *)pnt, "PX", 2) == 0) { /* POSIX attributes */ fstat_buf.st_mode = isonum_733(pnt+4); fstat_buf.st_nlink = isonum_733(pnt+12); fstat_buf.st_uid = isonum_733(pnt+20); fstat_buf.st_gid = isonum_733(pnt+28); - fstat_buf.st_ino = 0; - if ((pnt[2] & 0xFF)>= 44) + if ((pnt[2] & 0xFF) >= 44) /* Check for RR 1.12 */ fstat_buf.st_ino = (UInt32_t)isonum_733(pnt+36); } + if (strncmp((char *)pnt, "PN", 2) == 0) { /* POSIX device number */ + dev_t devmajor = isonum_733(pnt+4); + dev_t devminor = isonum_733(pnt+12); + + fstat_buf.st_rdev = makedev(devmajor, devminor); + } + if (strncmp((char *)pnt, "NM", 2) == 0) { /* Alternate Name */ int l = strlen(name_buf); @@ -425,8 +593,15 @@ cont_size = isonum_733(pnt+20); } - if (strncmp((char *)pnt, "PL", 2) == 0 || strncmp((char *)pnt, "CL", 2) == 0) { - extent = isonum_733(pnt+4); + if (strncmp((char *)pnt, "ST", 2) == 0) { /* Terminate SUSP */ + break; + } + + if (strncmp((char *)pnt, "CL", 2) == 0) { + cl_extent = isonum_733(pnt+4); /* Child link location */ + } + if (strncmp((char *)pnt, "PL", 2) == 0) { + pl_extent = isonum_733(pnt+4); /* Parent link location */ } if (strncmp((char *)pnt, "SL", 2) == 0) { /* Symlink */ @@ -448,29 +623,33 @@ strcat(symlinkname, ".."); break; case 8: - strcat(symlinkname, "/"); + symlinkname[0] = '\0'; break; case 16: strcat(symlinkname, "/mnt"); - printf("Warning - mount point requested"); + printf(_("Warning - mount point requested")); break; case 32: strcat(symlinkname, "kafka"); - printf("Warning - host_name requested"); + printf(_("Warning - host_name requested")); break; default: - printf("Reserved bit setting in symlink"); + printf(_("Reserved bit setting in symlink")); goof++; break; } if ((pnts[0] & 0xfe) && pnts[1] != 0) { - printf("Incorrect length in symlink component"); + printf(_("Incorrect length in symlink component")); } - if (xname[0] == 0) strcpy(xname, "-> "); + if (pnts[0] == 8) + xname[0] = '\0'; + if (xname[0] == 0) + strcpy(xname, "-> "); strcat(xname, symlinkname); symlinkname[0] = 0; xlen = strlen(xname); - if ((pnts[0] & 1) == 0 && xname[xlen-1] != '/') strcat(xname, "/"); + if ((pnts[0] & 1) == 0) + strcat(xname, "/"); slen -= (pnts[1] + 2); pnts += (pnts[1] + 2); @@ -480,28 +659,29 @@ len -= pnt[2]; pnt += pnt[2]; - if (len <= 3 && cont_extent) { - unsigned char sector[2048]; + } + if (cont_extent) { + unsigned char sector[2048]; #ifdef USE_SCG - readsecs(cont_extent - sector_offset, sector, ISO_BLOCKS(sizeof (sector))); + readsecs(cont_extent - sector_offset, sector, ISO_BLOCKS(sizeof (sector))); #else - lseek(fileno(infile), ((off_t)(cont_extent - sector_offset)) << 11, SEEK_SET); - read(fileno(infile), sector, sizeof (sector)); + lseek(fileno(infile), ((off_t)(cont_extent - sector_offset)) << 11, SEEK_SET); + read(fileno(infile), sector, sizeof (sector)); #endif - flag2 |= parse_rr(§or[cont_offset], cont_size, 1); - } + flag2 |= parse_rr(§or[cont_offset], cont_size, 1); } /* * for symbolic links, strip out the last '/' */ if (xname[0] != 0 && xname[strlen(xname)-1] == '/') { - xname[strlen(xname)-1] = '\0'; + if (strlen(xname) > 4) + xname[strlen(xname)-1] = '\0'; } return (flag2); } -void +LOCAL void find_rr(idr, pntp, lenp) struct iso_directory_record *idr; Uchar **pntp; @@ -535,7 +715,7 @@ *lenp = len; } -int +LOCAL int dump_rr(idr) struct iso_directory_record *idr; { @@ -546,28 +726,33 @@ return (parse_rr(pnt, len, 0)); } -struct todo -{ - struct todo *next; - char *name; - int extent; - int length; -}; - -struct todo *todo_idr = NULL; - -char *months[12] = {"Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", +LOCAL char *months[12] = {"Jan", "Feb", "Mar", "Apr", + "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"}; -void -dump_stat(idr, extent) +/* + * Return TRUE if this file was "selected" either based on find rules + * or for all files if there was no find rule. + */ +LOCAL BOOL +dump_stat(rootname, idr, fname, extent) + char *rootname; struct iso_directory_record *idr; + char *fname; int extent; { int i; int off = 0; char outline[100]; + if (do_find) { + if (!find_stat(rootname, idr, fname, extent)) + return (FALSE); + if (!do_listing || find_print) + return (TRUE); + } else if (!do_listing) + return (TRUE); + memset(outline, ' ', sizeof (outline)); if (fstat_buf.st_ino != 0) @@ -628,6 +813,11 @@ if (date_buf[1] >= 1 && date_buf[1] <= 12) { memcpy(outline+off+1, months[date_buf[1]-1], 3); off += 4; + } else { + /* + * Some broken ISO-9660 formatters write illegal month numbers. + */ + off += 1 + js_sprintf(outline+off+1, "???"); } off += js_sprintf(outline+off, " %2d", date_buf[2]); @@ -641,55 +831,351 @@ } outline[off] = 0; printf("%s %s %s\n", outline, name_buf, xname); + return (TRUE); } -void -extract_file(idr) - struct iso_directory_record *idr; +LOCAL void +extract(rootname, idr, fname) + char *rootname; + struct iso_directory_record *idr; + char *fname; +{ + int f; + struct timespec times[2]; +static BOOL isfirst = TRUE; + + if ((idr->flags[0] & 2) != 0 && + (idr->name_len[0] == 1 && + (idr->name[0] == 0 || idr->name[0] == 1))) { + /* + * Catch all "." and ".." entries here. + */ + if (idr->name[0] == 1) /* Skip "/.." */ + return; + if (rootname[0] == '/' && rootname[1] == '\0') + fname = "/."; + } + if (*fname == '/') + fname++; + makedirs(fname, S_IRUSR|S_IWUSR|S_IXUSR| + S_IRGRP|S_IWGRP|S_IXGRP| + S_IROTH|S_IWOTH|S_IXOTH, TRUE); + + switch (fstat_buf.st_mode & S_IFMT) { + +#ifndef HAVE_MKNOD + err: +#endif + default: + errmsgno(EX_BAD, + "Unsupported file type %0lo for '%s'.\n", + (unsigned long)fstat_buf.st_mode & S_IFMT, + fname); + return; + + + case S_IFDIR: +#ifdef __MINGW32__ +#define mkdir(n, m) mkdir(n) +#endif + if (mkdir(fname, fstat_buf.st_mode) < 0 && + geterrno() != EEXIST) + errmsg("Cannot make directory '%s'.\n", fname); + goto setmode; + +#ifdef S_IFBLK + case S_IFBLK: +#ifdef HAVE_MKNOD + if (mknod(fname, fstat_buf.st_mode, fstat_buf.st_rdev) < 0) + errmsg("Cannot make block device '%s'.\n", fname); + goto setmode; +#else + goto err; +#endif +#endif +#ifdef S_IFCHR + case S_IFCHR: +#ifdef HAVE_MKNOD + if (mknod(fname, fstat_buf.st_mode, fstat_buf.st_rdev) < 0) + errmsg("Cannot make character device '%s'.\n", fname); + goto setmode; +#else + goto err; +#endif +#endif +#ifdef S_IFIFO + case S_IFIFO: +#ifdef HAVE_MKFIFO + if (mkfifo(fname, fstat_buf.st_mode) < 0) + errmsg("Cannot make fifo '%s'.\n", fname); + goto setmode; +#else + goto err; +#endif +#endif +#ifdef S_IFSOCK + case S_IFSOCK: +#ifdef HAVE_MKNOD + if (mknod(fname, fstat_buf.st_mode, 0) < 0) + errmsg("Cannot make socket '%s'.\n", fname); + goto setmode; +#else + goto err; +#endif +#endif +#ifdef S_IFLNK + case S_IFLNK: + if (symlink(&xname[3], fname) < 0) + errmsg("Cannot make symlink '%s'.\n", fname); + goto setmode; +#endif + + case S_IFREG: break; + } + + makedirs(fname, S_IRUSR|S_IWUSR|S_IXUSR| + S_IRGRP|S_IWGRP|S_IXGRP| + S_IROTH|S_IWOTH|S_IXOTH, TRUE); + if (isfirst) + f = open(fname, O_WRONLY|O_CREAT|O_TRUNC, 0600); + else + f = open(fname, O_WRONLY|O_CREAT, 0600); + if (f < 0) { + errmsg("Cannot create '%s'.\n", fname); + return; + } + lseek(f, 0, SEEK_END); + extract_file(f, idr, fname); + if ((idr->flags[0] & ISO_MULTIEXTENT) == 0) { +#ifdef HAVE_FCHOWN + fchown(f, fstat_buf.st_uid, fstat_buf.st_gid); +#else + fchownat(AT_FDCWD, fname, fstat_buf.st_uid, fstat_buf.st_gid, 0); +#endif +#ifdef HAVE_FCHMOD + fchmod(f, fstat_buf.st_mode); +#else + fchmodat(AT_FDCWD, fname, fstat_buf.st_mode, 0); +#endif + times[0].tv_sec = fstat_buf.st_atime; + times[0].tv_nsec = stat_ansecs(&fstat_buf); + times[1].tv_sec = fstat_buf.st_mtime; + times[1].tv_nsec = stat_mnsecs(&fstat_buf); +#if defined(HAVE_FUTIMESAT) || defined(HAVE_FUTIMES) || defined(HAVE_FUTIMENS) + futimens(f, times); +#else + utimensat(AT_FDCWD, fname, times, 0); +#endif + isfirst = TRUE; /* Next call is for a new file */ + } else { + isfirst = FALSE; /* Next call is a continuation */ + } + close(f); + return; +setmode: + fchownat(AT_FDCWD, fname, fstat_buf.st_uid, fstat_buf.st_gid, AT_SYMLINK_NOFOLLOW); + fchmodat(AT_FDCWD, fname, fstat_buf.st_mode, AT_SYMLINK_NOFOLLOW); + times[0].tv_sec = fstat_buf.st_atime; + times[0].tv_nsec = stat_ansecs(&fstat_buf); + times[1].tv_sec = fstat_buf.st_mtime; + times[1].tv_nsec = stat_mnsecs(&fstat_buf); + utimensat(AT_FDCWD, fname, times, AT_SYMLINK_NOFOLLOW); +} + +LOCAL void +extract_file(f, idr, fname) + int f; + struct iso_directory_record *idr; + char *fname; { int extent, len, tlen; - unsigned char buff[2048]; + unsigned char buff[20480]; -#if defined(__CYGWIN32__) || defined(__CYGWIN__) || defined(__EMX__) || defined(__DJGPP__) - setmode(fileno(stdout), O_BINARY); -#endif + if (f == STDOUT_FILENO) + setmode(fileno(stdout), O_BINARY); extent = isonum_733((unsigned char *)idr->extent); len = isonum_733((unsigned char *)idr->size); while (len > 0) { -#ifdef USE_SCG - readsecs(extent - sector_offset, buff, ISO_BLOCKS(sizeof (buff))); tlen = (len > sizeof (buff) ? sizeof (buff) : len); +#ifdef USE_SCG + readsecs(extent - sector_offset, buff, ISO_BLOCKS(tlen)); #else lseek(fileno(infile), ((off_t)(extent - sector_offset)) << 11, SEEK_SET); - tlen = (len > sizeof (buff) ? sizeof (buff) : len); read(fileno(infile), buff, tlen); #endif len -= tlen; - extent++; - write(STDOUT_FILENO, buff, tlen); + extent += ISO_BLOCKS(tlen); + if (write(f, buff, tlen) != tlen) + errmsg("Write error on '%s'.\n", fname); + } +} + + +LOCAL void +parse_cl_dir(idr, extent) + struct iso_directory_record *idr; + int extent; +{ + char cl_name_buf[256*3]; + + strlcpy(cl_name_buf, name_buf, sizeof (cl_name_buf)); +#ifdef USE_SCG + readsecs(extent - sector_offset, idr, 1); +#else + lseek(fileno(infile), ((off_t)(extent - sector_offset)) << 11, SEEK_SET); + read(fileno(infile), idr, 2048); +#endif + + if (parse_de(idr) && use_rock) + dump_rr(idr); + strlcpy(name_buf, cl_name_buf, sizeof (name_buf)); +} + +LOCAL BOOL +parse_de(idr) + struct iso_directory_record *idr; +{ + unsigned char uc; + + if (idr->length[0] == 0) + return (FALSE); + memset(&fstat_buf, 0, sizeof (fstat_buf)); + found_rr = 0; + name_buf[0] = xname[0] = 0; + fstat_buf.st_size = (off_t)(unsigned)isonum_733((unsigned char *)idr->size); + if (idr->flags[0] & 2) + fstat_buf.st_mode |= S_IFDIR; + else + fstat_buf.st_mode |= S_IFREG; + if (idr->name_len[0] == 1 && idr->name[0] == 0) + strcpy(name_buf, "."); + else if (idr->name_len[0] == 1 && idr->name[0] == 1) + strcpy(name_buf, ".."); + else { + switch (ucs_level) { + case 3: + case 2: + case 1: + /* + * Unicode name. Convert as best we can. + */ + { + int j; + name_buf[0] = '\0'; +#ifdef USE_ICONV + if (use_iconv(unls)) { + int u; + char *to = name_buf; + + for (j = 0, u = 0; j < (int)idr->name_len[0] / 2; j++) { + char *ibuf = (char *)&idr->name[j*2]; + size_t isize = 2; /* UCS-2 character size */ + size_t osize = 4; + + if (iconv(unls->sic_uni2cd, (__IC_CONST char **)&ibuf, &isize, + (char **)&to, &osize) == -1) { + int err = geterrno(); + + if ((err == EINVAL || err == EILSEQ) && + osize == 4) { + *to = '_'; + u += 1; + to++; + } + } else { + u += 4 - osize; + to = &name_buf[u]; + } + } + j = u; + } else +#endif + for (j = 0; j < (int)idr->name_len[0] / 2; j++) { + UInt16_t unichar; + + unichar = (idr->name[j*2] & 0xFF) * 256 + + (idr->name[j*2+1] & 0xFF); + + /* + * Get the backconverted char + */ + if (unls) + uc = sic_uni2c(unls, unichar); + else + uc = unichar > 255 ? '_' : unichar; + + name_buf[j] = uc ? uc : '_'; + } + name_buf[j] = '\0'; + } + break; + case 0: + /* + * Normal non-Unicode name. + */ + strncpy(name_buf, idr->name, idr->name_len[0]); + name_buf[idr->name_len[0]] = 0; + break; + default: + /* + * Don't know how to do these yet. Maybe they are the same + * as one of the above. + */ + exit(1); + } } + memcpy(date_buf, idr->date, sizeof (idr->date)); + /* + * Always first set up time stamps and file modes from + * ISO-9660. This is used as a fallback in case that + * there is no related Rock Ridge based data. + */ + fstat_buf.st_atime = + fstat_buf.st_mtime = + fstat_buf.st_ctime = iso9660_time(date_buf, NULL, FALSE); + fstat_buf.st_mode |= S_IRUSR|S_IXUSR | + S_IRGRP|S_IXGRP | + S_IROTH|S_IXOTH; + fstat_buf.st_nlink = 1; + fstat_buf.st_ino = 0; + fstat_buf.st_uid = 0; + fstat_buf.st_gid = 0; + if (iso9660_inodes) { + fstat_buf.st_ino = (unsigned long) + isonum_733((unsigned char *)idr->extent); + } + return (TRUE); } -void -parse_dir(rootname, extent, len) +LOCAL void +parse_dir(dp, rootname, extent, len) + struct todo *dp; char *rootname; - int extent; - int len; + int extent; /* Directory extent */ + int len; /* Directory size */ { - char testname[PATH_MAX+1]; struct todo *td; int i; struct iso_directory_record * idr; - unsigned char uc; + struct iso_directory_record didr; + struct stat dstat; + unsigned char cl_buffer[2048]; unsigned char flags = 0; Llong size = 0; int sextent = 0; + int rlen; + int blen; + int rr_flags = 0; +static char *n = 0; +static int nlen = 0; + + if (do_listing && (!do_find || !find_print)) + printf(_("\nDirectory listing of %s\n"), rootname); - if (do_listing) - printf("\nDirectory listing of %s\n", rootname); + rlen = strlen(rootname); while (len > 0) { #ifdef USE_SCG @@ -703,108 +1189,132 @@ i = 0; while (1 == 1) { idr = (struct iso_directory_record *) &buffer[i]; - if (idr->length[0] == 0) break; - memset(&fstat_buf, 0, sizeof (fstat_buf)); - found_rr = 0; - name_buf[0] = xname[0] = 0; - fstat_buf.st_size = (off_t)(unsigned)isonum_733((unsigned char *)idr->size); - if (idr->flags[0] & 2) - fstat_buf.st_mode |= S_IFDIR; - else - fstat_buf.st_mode |= S_IFREG; - if (idr->name_len[0] == 1 && idr->name[0] == 0) - strcpy(name_buf, "."); - else if (idr->name_len[0] == 1 && idr->name[0] == 1) - strcpy(name_buf, ".."); - else { - switch (ucs_level) { - case 3: - case 2: - case 1: - /* - * Unicode name. Convert as best we can. - */ - { - int j; - - name_buf[0] = '\0'; - for (j = 0; j < (int)idr->name_len[0] / 2; j++) { - UInt16_t unichar; - - unichar = (idr->name[j*2] & 0xFF) * 256 + - (idr->name[j*2+1] & 0xFF); - - /* - * Get the backconverted char - */ - uc = sic_uni2c(unls, unichar); + if (idr->length[0] == 0) + break; + parse_de(idr); + if (use_rock) { + rr_flags = dump_rr(idr); - name_buf[j] = uc ? uc : '_'; - } - name_buf[idr->name_len[0]/2] = '\0'; - } - break; - case 0: + if (rr_flags & RR_FLAG_CL) { /* - * Normal non-Unicode name. + * Need to reparse the child link + * but note that we parse "CL/." + * so we get no usable file name. */ - strncpy(name_buf, idr->name, idr->name_len[0]); - name_buf[idr->name_len[0]] = 0; - break; - default: - /* - * Don't know how to do these yet. Maybe they are the same - * as one of the above. - */ - exit(1); - } + idr = (struct iso_directory_record *) cl_buffer; + parse_cl_dir(idr, cl_extent); + } else if (rr_flags & RR_FLAG_RE) + goto cont; /* skip rr_moved */ + } + if (Xtract && + (idr->flags[0] & 2) != 0 && + idr->name_len[0] == 1 && + idr->name[0] == 0) { + /* + * The '.' entry. + */ + didr = *idr; + dstat = fstat_buf; } - memcpy(date_buf, idr->date, 9); - if (use_rock) - dump_rr(idr); + blen = strlen(name_buf); + + blen = rlen + blen + 1; + if (nlen < blen) { + n = ___realloc(n, blen, _("find_stat name")); + nlen = blen; + } + strcatl(n, rootname, name_buf, (char *)0); + if (name_buf[0] == '.' && name_buf[1] == '\0') + n[rlen] = '\0'; + if ((idr->flags[0] & 2) != 0 && + ((rr_flags & RR_FLAG_CL) || (idr->name_len[0] != 1 || - (idr->name[0] != 0 && idr->name[0] != 1))) { + (idr->name[0] != 0 && idr->name[0] != 1)))) { /* + * This is a plain directory (neither "xxx/." + * nor "xxx/.."). * Add this directory to the todo list. */ - td = todo_idr; - if (td != NULL) { - while (td->next != NULL) - td = td->next; - td->next = (struct todo *) malloc(sizeof (*td)); - td = td->next; - } else { - todo_idr = td = (struct todo *) malloc(sizeof (*td)); + int dir_loop = 0; + int nextent; + struct todo *tp = dp; + + nextent = isonum_733((unsigned char *)idr->extent); + while (tp) { + if (tp->extent == nextent) { + dir_loop = 1; + break; + } + tp = tp->prev; } - td->next = NULL; - td->extent = isonum_733((unsigned char *)idr->extent); - td->length = isonum_733((unsigned char *)idr->size); - td->name = (char *) malloc(strlen(rootname) + if (dir_loop == 0) { + td = (struct todo *) malloc(sizeof (*td)); + if (td == NULL) + comerr(_("No memory.\n")); + td->next = NULL; + td->prev = dp; + td->extent = isonum_733((unsigned char *)idr->extent); + td->length = isonum_733((unsigned char *)idr->size); + td->name = (char *) malloc(strlen(rootname) + strlen(name_buf) + 2); - strcpy(td->name, rootname); - strcat(td->name, name_buf); - strcat(td->name, "/"); + if (td->name == NULL) + comerr(_("No memory.\n")); + strcpy(td->name, rootname); + strcat(td->name, name_buf); + strcat(td->name, "/"); + + *todo_pp = td; + todo_pp = &td->next; + } } else { - strcpy(testname, rootname); - strcat(testname, name_buf); - if (xtract && strcmp(xtract, testname) == 0) { - extract_file(idr); + if (xtract && strcmp(xtract, n) == 0) { + extract_file(STDOUT_FILENO, idr, "stdout"); } } - if (do_find && + if (do_f && (idr->name_len[0] != 1 || (idr->name[0] != 0 && idr->name[0] != 1))) { - strcpy(testname, rootname); - strcat(testname, name_buf); - printf("%s\n", testname); + printf("%s\n", n); } - if (do_listing) { + if (do_listing || Xtract || do_find) { + /* + * In case if a multi-extent file, remember the + * start extent number. + */ if ((idr->flags[0] & ISO_MULTIEXTENT) && size == 0) sextent = isonum_733((unsigned char *)idr->extent); + if (debug || ((idr->flags[0] & ISO_MULTIEXTENT) == 0 && size == 0)) { - dump_stat(idr, isonum_733((unsigned char *)idr->extent)); + if (dump_stat(rootname, idr, n, + isonum_733((unsigned char *)idr->extent))) { + if (Xtract) { + if ((idr->flags[0] & 2) != 0 && + idr->name_len[0] != 1 && + idr->name[0] != 1) { + char *p = n; + if (*p == '/') + p++; + makedirs(p, + S_IRUSR|S_IWUSR|S_IXUSR| + S_IRGRP|S_IWGRP|S_IXGRP| + S_IROTH|S_IWOTH|S_IXOTH, + FALSE); + } else { + if (myuid != 0 && + S_ISDIR(fstat_buf.st_mode)) { + fstat_buf.st_mode |= S_IWUSR; + } + extract(rootname, idr, n); + } + } + } + } else if (Xtract && find_stat(rootname, idr, n, sextent)) { + /* + * Extract all multi extent files here... + */ + extract(rootname, idr, n); } size += fstat_buf.st_size; if ((flags & ISO_MULTIEXTENT) && @@ -812,7 +1322,7 @@ fstat_buf.st_size = size; if (!debug) idr->flags[0] |= ISO_MULTIEXTENT; - dump_stat(idr, sextent); + dump_stat(rootname, idr, n, sextent); if (!debug) idr->flags[0] &= ~ISO_MULTIEXTENT; } @@ -820,39 +1330,59 @@ if ((idr->flags[0] & ISO_MULTIEXTENT) == 0) size = 0; } + cont: i += buffer[i]; if (i > 2048 - offsetof(struct iso_directory_record, name[0])) break; } } + if (Xtract) { + char *nm = strrchr(rootname, '/'); + + if (nm != rootname) + nm++; + if (find_stat(rootname, &didr, nm, 0)) { + fstat_buf = dstat; + extract(rootname, &didr, rootname); + } + } } -void +LOCAL void usage(excode) int excode; { - errmsgno(EX_BAD, "Usage: %s [options] -i filename\n", get_progname()); +#ifdef USE_FIND + errmsgno(EX_BAD, _("Usage: %s [options] -i filename [-find [[find expr.]]\n"), get_progname()); +#else + errmsgno(EX_BAD, _("Usage: %s [options] -i filename\n"), get_progname()); +#endif - error("Options:\n"); - error("\t-help,-h Print this help\n"); - error("\t-version Print version info and exit\n"); - error("\t-debug Print additional debug info\n"); - error("\t-d Print information from the primary volume descriptor\n"); - error("\t-f Generate output similar to 'find . -print'\n"); - error("\t-J Print information from Joliet extensions\n"); - error("\t-j charset Use charset to display Joliet file names\n"); - error("\t-l Generate output similar to 'ls -lR'\n"); - error("\t-p Print Path Table\n"); - error("\t-R Print information from Rock Ridge extensions\n"); - error("\t-s Print file size infos in multiples of sector size (%ld bytes).\n", (long)PAGE); - error("\t-N sector Sector number where ISO image should start on CD\n"); - error("\t-T sector Sector number where actual session starts on CD\n"); - error("\t-i filename Filename to read ISO-9660 image from\n"); - error("\tdev=target SCSI target to use as CD/DVD-Recorder\n"); - error("\t-x pathname Extract specified file to stdout\n"); + error(_("Options:\n")); + error(_("\t-help,-h Print this help\n")); + error(_("\t-version Print version info and exit\n")); + error(_("\t-debug Print additional debug info\n")); + error(_("\t-ignore-error Ignore errors\n")); + error(_("\t-d Print information from the primary volume descriptor\n")); + error(_("\t-f Generate output similar to 'find . -print'\n")); +#ifdef USE_FIND + error(_("\t-find [find expr.] Option separator: Use find command line to the right\n")); +#endif + error(_("\t-J Print information from Joliet extensions\n")); + error(_("\t-j charset Use charset to display Joliet file names\n")); + error(_("\t-l Generate output similar to 'ls -lR'\n")); + error(_("\t-p Print Path Table\n")); + error(_("\t-R Print information from Rock Ridge extensions\n")); + error(_("\t-s Print file size infos in multiples of sector size (%ld bytes).\n"), (long)PAGE); + error(_("\t-N sector Sector number where ISO image should start on CD\n")); + error(_("\t-T sector Sector number where actual session starts on CD\n")); + error(_("\t-i filename Filename to read ISO-9660 image from\n")); + error(_("\tdev=target SCSI target to use as CD/DVD-Recorder\n")); + error(_("\t-X Extract all matching files to the filesystem\n")); + error(_("\t-x pathname Extract specified file to stdout\n")); exit(excode); } -int +EXPORT int main(argc, argv) int argc; char *argv[]; @@ -860,8 +1390,12 @@ int cac; char * const *cav; int c; - char * filename = NULL; - char * devname = NULL; + int ret = 0; + char *filename = NULL; + char *sdevname = NULL; +#if defined(USE_NLS) + char *dir; +#endif /* * Use toc_offset != 0 (-T #) if we have a complete multi-session * disc that we want/need to play with. @@ -876,47 +1410,192 @@ struct eltorito_boot_descriptor bpd; struct iso_directory_record * idr; char *charset = NULL; - char *opts = "help,h,version,debug,d,p,i*,dev*,J,R,l,x*,f,s,N#l,T#l,j*"; + char *opts = "help,h,version,debug,ignore-error,d,p,i*,dev*,J,R,l,x*,X,find~,f,s,N#l,T#l,j*"; BOOL help = FALSE; BOOL prvers = FALSE; BOOL found_eltorito = FALSE; int bootcat_offset = 0; + int voldesc_sum = 0; + char *cp; save_args(argc, argv); +#if defined(USE_NLS) + setlocale(LC_ALL, ""); +#if !defined(TEXT_DOMAIN) /* Should be defined by cc -D */ +#define TEXT_DOMAIN "isoinfo" /* Use this only if it weren't */ +#endif + dir = searchfileinpath("share/locale", F_OK, + SIP_ANY_FILE|SIP_NO_PATH, NULL); + if (dir) + (void) bindtextdomain(TEXT_DOMAIN, dir); + else +#if defined(PROTOTYPES) && defined(INS_BASE) + (void) bindtextdomain(TEXT_DOMAIN, INS_BASE "/share/locale"); +#else + (void) bindtextdomain(TEXT_DOMAIN, "/usr/share/locale"); +#endif + (void) textdomain(TEXT_DOMAIN); +#endif + cac = argc - 1; cav = argv + 1; if (getallargs(&cac, &cav, opts, - &help, &help, &prvers, &debug, + &help, &help, &prvers, &debug, &ignerr, &do_pvd, &do_pathtab, - &filename, &devname, + &filename, &sdevname, &use_joliet, &use_rock, &do_listing, - &xtract, - &do_find, &do_sectors, + &xtract, &Xtract, + getfind, NULL, + &do_f, &do_sectors, §or_offset, &toc_offset, &charset) < 0) { - errmsgno(EX_BAD, "Bad Option: '%s'\n", cav[0]); + errmsgno(EX_BAD, _("Bad Option: '%s'\n"), cav[0]); usage(EX_BAD); } if (help) usage(0); if (prvers) { - printf("isoinfo %s (%s-%s-%s) Copyright (C) 1993-1999 Eric Youngdale (C) 1999-2007 Jörg Schilling\n", + printf(_("isoinfo %s (%s-%s-%s) Copyright (C) 1993-1999 %s (C) 1999-2016 %s\n"), VERSION, - HOST_CPU, HOST_VENDOR, HOST_OS); + HOST_CPU, HOST_VENDOR, HOST_OS, + _("Eric Youngdale"), + _("Joerg Schilling")); exit(0); } + myuid = getuid(); +#ifdef USE_FIND + if (do_find) { + finda_t fa; + + cac = find_ac; + cav = find_av; + find_firstprim(&cac, &cav); + find_pac = cac; + find_pav = cav; + + if (cac > 0) { + find_argsinit(&fa); + fa.walkflags = walkflags; + fa.Argc = cac; + fa.Argv = (char **)cav; + find_node = find_parse(&fa); + if (fa.primtype == FIND_ERRARG) + comexit(fa.error); + if (fa.primtype != FIND_ENDARGS) + comerrno(EX_BAD, _("Incomplete expression.\n")); + plusp = fa.plusp; + find_patlen = fa.patlen; + walkflags = fa.walkflags; + maxdepth = fa.maxdepth; + mindepth = fa.mindepth; + + if (find_node && xtract) { + if (find_pname(find_node, "-exec") || + find_pname(find_node, "-exec+") || + find_pname(find_node, "-ok")) + comerrno(EX_BAD, + "Cannot -exec with '-o -'.\n"); + } + if (find_node && find_hasprint(find_node)) + find_print = TRUE; + } + if (find_ac > find_pac) { + errmsgno(EX_BAD, _("Unsupported pathspec for -find.\n")); + usage(EX_BAD); + } +#ifdef __not_yet__ + if (find_ac <= 0 || find_ac == find_pac) { + errmsgno(EX_BAD, _("Missing pathspec for -find.\n")); + usage(EX_BAD); + } +#endif + + walkinitstate(&walkstate); + if (find_patlen > 0) { + walkstate.patstate = ___malloc(sizeof (int) * find_patlen, + _("space for pattern state")); + } + + find_timeinit(time(0)); + walkstate.walkflags = walkflags; + walkstate.maxdepth = maxdepth; + walkstate.mindepth = mindepth; + walkstate.lname = NULL; + walkstate.tree = find_node; + walkstate.err = 0; + walkstate.pflags = 0; + } +#endif cac = argc - 1; cav = argv + 1; - if (getfiles(&cac, &cav, opts) != 0) { - errmsgno(EX_BAD, "Bad Argument: '%s'\n", cav[0]); + if (!do_find && getfiles(&cac, &cav, opts) != 0) { + errmsgno(EX_BAD, _("Bad Argument: '%s'\n"), cav[0]); usage(EX_BAD); } +#if defined(USE_NLS) && defined(HAVE_NL_LANGINFO) && defined(CODESET) + /* + * If the locale has not been set up, nl_langinfo() returns the + * name of the default codeset. This should be either "646", + * "ISO-646", "ASCII", or something similar. Unfortunately, the + * POSIX standard does not include a list of valid locale names, + * so ne need to find all values in use. + * + * Observed: + * Solaris "646" + * Linux "ANSI_X3.4-1968" strange value from Linux... + */ + if (charset == NULL) { + char *codeset = nl_langinfo(CODESET); + Uchar *p; + + if (codeset != NULL) + codeset = strdup(codeset); + if (codeset == NULL) /* Should not happen */ + goto setcharset; + if (*codeset == '\0') /* Invalid locale */ + goto setcharset; + + for (p = (Uchar *)codeset; *p != '\0'; p++) { + if (islower(*p)) + *p = toupper(*p); + } + p = (Uchar *)strstr(codeset, "ISO"); + if (p != NULL) { + if (*p == '_' || *p == '-') + p++; + codeset = (char *)p; + } + if (strcmp("646", codeset) != 0 && + strcmp("ASCII", codeset) != 0 && + strcmp("US-ASCII", codeset) != 0 && + strcmp("US_ASCII", codeset) != 0 && + strcmp("USASCII", codeset) != 0 && + strcmp("ANSI_X3.4-1968", codeset) != 0) + charset = nl_langinfo(CODESET); + + if (codeset != NULL) + free(codeset); + +#define verbose 1 + if (verbose > 0 && charset != NULL) { + error(_("Setting input-charset to '%s' from locale.\n"), + charset); + } + } +setcharset: + /* + * Allow to switch off locale with -input-charset "". + */ + if (charset != NULL && *charset == '\0') + charset = NULL; +#endif + if (charset == NULL) { -#if (defined(__CYGWIN32__) || defined(__CYGWIN__) || defined(__DJGPP__)) && !defined(IS_CYGWIN_1) +#if (defined(__CYGWIN32__) || defined(__CYGWIN__) || defined(__DJGPP__) || defined(__MINGW32__)) && !defined(IS_CYGWIN_1) unls = sic_open("cp437"); #else unls = sic_open("default"); @@ -925,7 +1604,7 @@ unls = sic_open(charset); } if (unls == NULL) { /* Unknown charset specified */ - fprintf(stderr, "Unknown charset: %s\nKnown charsets are:\n", + fprintf(stderr, _("Unknown charset: %s\nKnown charsets are:\n"), charset); sic_list(stdout); /* List all known charset names */ @@ -933,32 +1612,24 @@ exit(EX_BAD); exit(1); } - if (use_iconv(unls)) { - fprintf(stderr, "Iconv not yet supported\n"); - unls = NULL; - } - if (filename != NULL && devname != NULL) { - errmsgno(EX_BAD, "Only one of -i or dev= allowed\n"); + if (filename != NULL && sdevname != NULL) { + errmsgno(EX_BAD, _("Only one of -i or dev= allowed\n")); usage(EX_BAD); } #ifdef USE_SCG - if (filename == NULL && devname == NULL) - cdr_defaults(&devname, NULL, NULL, NULL); -#endif - if (filename == NULL && devname == NULL) { -#ifdef USE_LIBSCHILY - errmsgno(EX_BAD, "ISO-9660 image not specified\n"); -#else - fprintf(stderr, "ISO-9660 image not specified\n"); + if (filename == NULL && sdevname == NULL) + cdr_defaults(&sdevname, NULL, NULL, NULL, NULL); #endif + if (filename == NULL && sdevname == NULL) { + fprintf(stderr, _("ISO-9660 image not specified\n")); usage(EX_BAD); } if (filename != NULL) infile = fopen(filename, "rb"); else - filename = devname; + filename = sdevname; if (infile != NULL) { /* EMPTY */; @@ -967,12 +1638,8 @@ #else } else { #endif -#ifdef USE_LIBSCHILY - comerr("Unable to open %s\n", filename); -#else - fprintf(stderr, "Unable to open %s\n", filename); + fprintf(stderr, _("Unable to open %s\n"), filename); exit(1); -#endif } /* @@ -985,6 +1652,57 @@ read(fileno(infile), &ipd, sizeof (ipd)); #endif idr = (struct iso_directory_record *)ipd.root_directory_record; + for (c = 0, cp = (char *)&ipd; c < 2048; c++) + voldesc_sum += *cp++ & 0xFF; + if (GET_UBYTE(ipd.type) == ISO_VD_PRIMARY) { + c = 17; + do { +#ifdef USE_SCG + readsecs(c + toc_offset, &jpd, ISO_BLOCKS(sizeof (jpd))); +#else + lseek(fileno(infile), ((off_t)(c + toc_offset)) <<11, SEEK_SET); + read(fileno(infile), &jpd, sizeof (jpd)); +#endif + } while (++c < 32 && GET_UBYTE(jpd.type) != ISO_VD_END); + if (GET_UBYTE(jpd.type) == ISO_VD_END) do { +#ifdef USE_SCG + readsecs(c + toc_offset, &jpd, ISO_BLOCKS(sizeof (jpd))); +#else + lseek(fileno(infile), ((off_t)(c + toc_offset)) <<11, SEEK_SET); + read(fileno(infile), &jpd, sizeof (jpd)); +#endif + cp = (char *)&jpd; + if (strncmp(cp, "MKI ", 4) == 0) { + int sum; + + sum = cp[2045] & 0xFF; + sum *= 256; + sum += cp[2046] & 0xFF; + sum *= 256; + sum += cp[2047] & 0xFF; + if (sum == voldesc_sum) + iso9660_inodes = TRUE; + break; + } + } while (++c < 48); + } + + /* + * Read '.' entry for the root directory. + */ + extent = isonum_733((unsigned char *)idr->extent); +#ifdef USE_SCG + readsecs(extent - sector_offset, buffer, ISO_BLOCKS(sizeof (buffer))); +#else + lseek(fileno(infile), ((off_t)(extent - sector_offset)) <<11, SEEK_SET); + read(fileno(infile), buffer, sizeof (buffer)); +#endif + c = dump_rr((struct iso_directory_record *) buffer); + if (c == 0 || + (c & (RR_FLAG_SP | RR_FLAG_ER)) == 0 || su_version < 1 || rr_version < 1) { + if (!debug) + use_rock = FALSE; + } if (do_pvd) { /* * High sierra: @@ -996,7 +1714,7 @@ if ((((char *)&ipd)[8] == 1) && (strncmp(&((char *)&ipd)[9], "CDROM", 5) == 0) && (((char *)&ipd)[14] == 1)) { - printf("CD-ROM is in High Sierra format\n"); + printf(_("CD-ROM is in High Sierra format\n")); exit(0); } /* @@ -1009,81 +1727,20 @@ if ((ipd.type[0] != ISO_VD_PRIMARY) || (strncmp(ipd.id, ISO_STANDARD_ID, sizeof (ipd.id)) != 0) || (ipd.version[0] != 1)) { - printf("CD-ROM is NOT in ISO 9660 format\n"); + printf(_("CD-ROM is NOT in ISO 9660 format\n")); exit(1); } - printf("CD-ROM is in ISO 9660 format\n"); - printf("System id: "); - printchars(ipd.system_id, 32); - putchar('\n'); - printf("Volume id: "); - printchars(ipd.volume_id, 32); - putchar('\n'); - - printf("Volume set id: "); - printchars(ipd.volume_set_id, 128); - putchar('\n'); - printf("Publisher id: "); - printchars(ipd.publisher_id, 128); - putchar('\n'); - printf("Data preparer id: "); - printchars(ipd.preparer_id, 128); - putchar('\n'); - printf("Application id: "); - printchars(ipd.application_id, 128); - putchar('\n'); - - printf("Copyright File id: "); - printchars(ipd.copyright_file_id, 37); - putchar('\n'); - printf("Abstract File id: "); - printchars(ipd.abstract_file_id, 37); - putchar('\n'); - printf("Bibliographic File id: "); - printchars(ipd.bibliographic_file_id, 37); - putchar('\n'); - - printf("Volume set size is: %d\n", isonum_723(ipd.volume_set_size)); - printf("Volume set sequence number is: %d\n", isonum_723(ipd.volume_sequence_number)); - printf("Logical block size is: %d\n", isonum_723(ipd.logical_block_size)); - printf("Volume size is: %d\n", isonum_733((unsigned char *)ipd.volume_space_size)); - if (debug) { - int dextent; - int dlen; - - dextent = isonum_733((unsigned char *)idr->extent); - dlen = isonum_733((unsigned char *)idr->size); - printf("Root directory extent: %d size: %d\n", - dextent, dlen); - printf("Path table size is: %d\n", - isonum_733((unsigned char *)ipd.path_table_size)); - printf("L Path table start: %d\n", - isonum_731(ipd.type_l_path_table)); - printf("L Path opt table start: %d\n", - isonum_731(ipd.opt_type_l_path_table)); - printf("M Path table start: %d\n", - isonum_732(ipd.type_m_path_table)); - printf("M Path opt table start: %d\n", - isonum_732(ipd.opt_type_m_path_table)); - printf("Creation Date: %s\n", - sdate(ipd.creation_date)); - printf("Modification Date: %s\n", - sdate(ipd.modification_date)); - printf("Expiration Date: %s\n", - sdate(ipd.expiration_date)); - printf("Effective Date: %s\n", - sdate(ipd.effective_date)); - printf("File structure version: %d\n", - ipd.file_structure_version[0]); - } + printf(_("CD-ROM is in ISO 9660 format\n")); + if (!use_joliet) + list_vd(&ipd, FALSE); { int block = 16; movebytes(&ipd, &jpd, sizeof (ipd)); while ((Uchar)jpd.type[0] != ISO_VD_END) { if (debug && (Uchar) jpd.type[0] == ISO_VD_SUPPLEMENTARY) - error("Joliet escape sequence 0: '%c' 1: '%c' 2: '%c' 3: '%c'\n", + error(_("Joliet escape sequence 0: '%c' 1: '%c' 2: '%c' 3: '%c'\n"), jpd.escape_sequences[0], jpd.escape_sequences[1], jpd.escape_sequences[2], @@ -1110,13 +1767,13 @@ (Uchar)bpd.bootcat_ptr[2] * 65536 + (Uchar)bpd.bootcat_ptr[3] * 16777216; found_eltorito = TRUE; - printf("El Torito VD version %d found, boot catalog is in sector %d\n", + printf(_("El Torito VD version %d found, boot catalog is in sector %d\n"), bpd.version[0], bootcat_offset); } } if (jpd.version[0] == 2) { - printf("CD-ROM uses ISO 9660:1999 relaxed format\n"); + printf(_("CD-ROM uses ISO 9660:1999 relaxed format\n")); break; } @@ -1141,7 +1798,7 @@ if ((ipd.type[0] != ISO_VD_PRIMARY) || (strncmp(ipd.id, ISO_STANDARD_ID, sizeof (ipd.id)) != 0) || (ipd.version[0] != 1)) { - printf("CD-ROM is NOT in ISO 9660 format\n"); + printf(_("CD-ROM is NOT in ISO 9660 format\n")); exit(1); } @@ -1150,7 +1807,7 @@ movebytes(&ipd, &jpd, sizeof (ipd)); while ((unsigned char) jpd.type[0] != ISO_VD_END) { if (debug && (unsigned char) jpd.type[0] == ISO_VD_SUPPLEMENTARY) - error("Joliet escape sequence 0: '%c' 1: '%c' 2: '%c' 3: '%c'\n", + error(_("Joliet escape sequence 0: '%c' 1: '%c' 2: '%c' 3: '%c'\n"), jpd.escape_sequences[0], jpd.escape_sequences[1], jpd.escape_sequences[2], @@ -1179,12 +1836,8 @@ } if (use_joliet && ((unsigned char) jpd.type[0] == ISO_VD_END)) { -#ifdef USE_LIBSCHILY - comerrno(EX_BAD, "Unable to find Joliet SVD\n"); -#else - fprintf(stderr, "Unable to find Joliet SVD\n"); + fprintf(stderr, _("Unable to find Joliet SVD\n")); exit(1); -#endif } switch (jpd.escape_sequences[2]) { @@ -1200,59 +1853,65 @@ } if (ucs_level > 3) { -#ifdef USE_LIBSCHILY - comerrno(EX_BAD, - "Don't know what ucs_level == %d means\n", - ucs_level); -#else fprintf(stderr, - "Don't know what ucs_level == %d means\n", + _("Don't know what ucs_level == %d means\n"), ucs_level); exit(1); -#endif } if (jpd.escape_sequences[3] == ' ') errmsgno(EX_BAD, - "Warning: Joliet escape sequence uses illegal space at offset 3\n"); + _("Warning: Joliet escape sequence uses illegal space at offset 3\n")); } if (do_pvd) { - if (ucs_level > 0) - printf("Joliet with UCS level %d found\n", ucs_level); - else - printf("NO Joliet present\n"); - - extent = isonum_733((unsigned char *)idr->extent); + if (ucs_level > 0) { + if (use_joliet) { + printf(_("\nJoliet with UCS level %d found,"), ucs_level); + printf(_(" Joliet volume descriptor:\n")); + list_vd(&jpd, TRUE); + } else { + printf(_("\nJoliet with UCS level %d found."), ucs_level); + } + } else { + printf(_("NO Joliet present\n")); + } -#ifdef USE_SCG - readsecs(extent - sector_offset, buffer, ISO_BLOCKS(sizeof (buffer))); -#else - lseek(fileno(infile), - ((off_t)(extent - sector_offset)) <<11, SEEK_SET); - read(fileno(infile), buffer, sizeof (buffer)); + if (c != 0) { +#ifdef RR_DEBUG + printf("RR %X %d\n", c, c); #endif - idr = (struct iso_directory_record *) buffer; - if ((c = dump_rr(idr)) != 0) { -/* printf("RR %X %d\n", c, c);*/ - if (c & 1024) { + if (c & RR_FLAG_SP) { printf( - "Rock Ridge signatures version %d found\n", + _("\nSUSP signatures version %d found\n"), su_version); + if (c & RR_FLAG_ER) { + if (rr_version < 1) { + printf( + _("No valid Rock Ridge signature found\n")); + } else { + printf( + _("Rock Ridge signatures version %d found\n"), + rr_version); + printf( + _("Rock Ridge id '%s'\n"), + er_id); + } + } } else { printf( - "Bad Rock Ridge signatures found (SU record missing)\n"); + _("\nBad Rock Ridge signatures found (SU record missing)\n")); } /* * This is currently a no op! * We need to check the first plain file instead of * the '.' entry in the root directory. */ - if (c & 2048) { - printf("Apple signatures version %d found\n", + if (c & RR_FLAG_AA) { + printf(_("\nApple signatures version %d found\n"), aa_version); } } else { - printf("NO Rock Ridge present\n"); + printf(_("\nNo SUSP/Rock Ridge present\n")); } if (found_eltorito) printf_bootinfo(infile, bootcat_offset); @@ -1272,17 +1931,104 @@ } } - parse_dir("/", isonum_733((unsigned char *)idr->extent), + parse_dir(todo_idr, "/", isonum_733((unsigned char *)idr->extent), isonum_733((unsigned char *)idr->size)); td = todo_idr; while (td) { - parse_dir(td->name, td->extent, td->length); + parse_dir(td, td->name, td->extent, td->length); + free(td->name); td = td->next; } + /* + * Execute all unflushed '-exec .... {} +' expressions. + */ + if (do_find) { + find_plusflush(plusp, &walkstate); +#ifdef __use_find_free__ + find_free(Tree, &fa); +#endif + if (walkstate.patstate != NULL) + free(walkstate.patstate); + ret = walkstate.err; + } + if (infile != NULL) fclose(infile); - return (0); + return (ret); +} + +LOCAL void +list_vd(vp, ucs) + struct iso_primary_descriptor *vp; + BOOL ucs; +{ + struct iso_directory_record *idr = (struct iso_directory_record *) + vp->root_directory_record; + + printf(_("System id: ")); + printchars(vp->system_id, 32, ucs); + putchar('\n'); + printf(_("Volume id: ")); + printchars(vp->volume_id, 32, ucs); + putchar('\n'); + + printf(_("Volume set id: ")); + printchars(vp->volume_set_id, 128, ucs); + putchar('\n'); + printf(_("Publisher id: ")); + printchars(vp->publisher_id, 128, ucs); + putchar('\n'); + printf(_("Data preparer id: ")); + printchars(vp->preparer_id, 128, ucs); + putchar('\n'); + printf(_("Application id: ")); + printchars(vp->application_id, 128, ucs); + putchar('\n'); + + printf(_("Copyright File id: ")); + printchars(vp->copyright_file_id, 37, ucs); + putchar('\n'); + printf(_("Abstract File id: ")); + printchars(vp->abstract_file_id, 37, ucs); + putchar('\n'); + printf(_("Bibliographic File id: ")); + printchars(vp->bibliographic_file_id, 37, ucs); + putchar('\n'); + + printf(_("Volume set size is: %d\n"), isonum_723(vp->volume_set_size)); + printf(_("Volume set sequence number is: %d\n"), isonum_723(vp->volume_sequence_number)); + printf(_("Logical block size is: %d\n"), isonum_723(vp->logical_block_size)); + printf(_("Volume size is: %d\n"), isonum_733((unsigned char *)vp->volume_space_size)); + if (debug) { + int dextent; + int dlen; + + dextent = isonum_733((unsigned char *)idr->extent); + dlen = isonum_733((unsigned char *)idr->size); + printf(_("Root directory extent: %d size: %d\n"), + dextent, dlen); + printf(_("Path table size is: %d\n"), + isonum_733((unsigned char *)vp->path_table_size)); + printf(_("L Path table start: %d\n"), + isonum_731(vp->type_l_path_table)); + printf(_("L Path opt table start: %d\n"), + isonum_731(vp->opt_type_l_path_table)); + printf(_("M Path table start: %d\n"), + isonum_732(vp->type_m_path_table)); + printf(_("M Path opt table start: %d\n"), + isonum_732(vp->opt_type_m_path_table)); + printf(_("Creation Date: %s\n"), + sdate(vp->creation_date)); + printf(_("Modification Date: %s\n"), + sdate(vp->modification_date)); + printf(_("Expiration Date: %s\n"), + sdate(vp->expiration_date)); + printf(_("Effective Date: %s\n"), + sdate(vp->effective_date)); + printf(_("File structure version: %d\n"), + vp->file_structure_version[0]); + } } LOCAL void @@ -1293,17 +2039,17 @@ n = sic_list(stdout); if (n <= 0) { errmsgno(EX_BAD, "'%s/lib/siconv/' %s.\n", - INS_BASE, n < 0 ? "missing":"incomplete"); + INS_BASE, n < 0 ? _("missing"):_("incomplete")); if (n == 0) { errmsgno(EX_BAD, - "Check '%s/lib/siconv/' for missing translation tables.\n", + _("Check '%s/lib/siconv/' for missing translation tables.\n"), INS_BASE); } } #ifdef USE_ICONV if (n > 0) { errmsgno(EX_BAD, - "'iconv -l' lists more available names.\n"); + _("'iconv -l' lists more available names.\n")); } #endif } @@ -1315,6 +2061,9 @@ FILE *f; int bootcat_offset; { + int s = 0; + int i; + Uchar *p; struct eltorito_validation_entry *evp; struct eltorito_defaultboot_entry *ebe; @@ -1328,19 +2077,29 @@ evp = (struct eltorito_validation_entry *)buffer; ebe = (struct eltorito_defaultboot_entry *)&buffer[32]; - printf("Eltorito validation header:\n"); - printf(" Hid %d\n", (Uchar)evp->headerid[0]); - printf(" Arch %d (%s)\n", (Uchar)evp->arch[0], arch_name((Uchar)evp->arch[0])); - printf(" ID '%.23s'\n", evp->id); - printf(" Key %X %X\n", (Uchar)evp->key1[0], (Uchar)evp->key2[0]); - - printf(" Eltorito defaultboot header:\n"); - printf(" Bootid %X (%s)\n", (Uchar)ebe->boot_id[0], boot_name((Uchar)ebe->boot_id[0])); - printf(" Boot media %X (%s)\n", (Uchar)ebe->boot_media[0], bootmedia_name((Uchar)ebe->boot_media[0])); - printf(" Load segment %X\n", la_to_2_byte(ebe->loadseg)); - printf(" Sys type %X\n", (Uchar)ebe->sys_type[0]); - printf(" Nsect %X\n", la_to_2_byte(ebe->nsect)); - printf(" Bootoff %lX %ld\n", la_to_4_byte(ebe->bootoff), la_to_4_byte(ebe->bootoff)); + + p = (Uchar *)evp; + for (i = 0; i < 32; i += 2) { + s += p[i] & 0xFF; + s += (p[i+1] & 0xFF) * 256; + } + s = s % 65536; + + printf(_("Eltorito validation header:\n")); + printf(_(" Hid %d\n"), (Uchar)evp->headerid[0]); + printf(_(" Arch %d (%s)\n"), (Uchar)evp->arch[0], arch_name((Uchar)evp->arch[0])); + printf(_(" ID '%.23s'\n"), evp->id); + printf(_(" Cksum %2.2X %2.2X %s\n"), (Uchar)evp->cksum[0], (Uchar)evp->cksum[1], + s == 0 ? _("OK"):_("BAD")); + printf(_(" Key %X %X\n"), (Uchar)evp->key1[0], (Uchar)evp->key2[0]); + + printf(_(" Eltorito defaultboot header:\n")); + printf(_(" Bootid %X (%s)\n"), (Uchar)ebe->boot_id[0], boot_name((Uchar)ebe->boot_id[0])); + printf(_(" Boot media %X (%s)\n"), (Uchar)ebe->boot_media[0], bootmedia_name((Uchar)ebe->boot_media[0])); + printf(_(" Load segment %X\n"), la_to_2_byte(ebe->loadseg)); + printf(_(" Sys type %X\n"), (Uchar)ebe->sys_type[0]); + printf(_(" Nsect %X\n"), la_to_2_byte(ebe->nsect)); + printf(_(" Bootoff %lX %ld\n"), la_to_4_byte(ebe->bootoff), la_to_4_byte(ebe->bootoff)); } @@ -1396,3 +2155,130 @@ return ("Illegal Bootmedia"); } } + +LOCAL int +time_cvt(dp, len) + unsigned char *dp; + int len; +{ + int ret; + + for (ret = 0; --len >= 0; ) { + ret *= 10; + ret += *dp++ - '0'; + } + return (ret); +} + +LOCAL time_t +iso9660_time(date, hsecp, longfmt) + unsigned char *date; + int *hsecp; + BOOL longfmt; +{ + time_t t; + int y; + int m; + int d; + int days; + int hour; + int min; + int sec; + int hsec; + int gmtoff; + + if (longfmt) { + y = time_cvt(&date[0], 4); /* Year 0..9999 */ + m = time_cvt(&date[4], 2); + d = time_cvt(&date[6], 2); + hour = time_cvt(&date[8], 2); + min = time_cvt(&date[10], 2); + sec = time_cvt(&date[12], 2); + hsec = time_cvt(&date[14], 2); + gmtoff = ((char *)date)[16]; + } else { + y = date[0] + 1900; /* Year 1900..2155 */ + m = date[1]; + d = date[2]; + hour = date[3]; + min = date[4]; + sec = date[5]; + hsec = 0; + gmtoff = ((char *)date)[6]; + } + if (hsecp) + *hsecp = hsec; + /* + * The original algorithm did win a Fortan contest in early times. + * It computes days relative to September 19th 1989. + * days = 367*(y-1980)-7*(y+(m+9)/12)/4-3*((y+(m-9)/7)/100+1)/4+275*m/9+d-100; + * The updated algorithm was modified to use Jan 1st 1970 as base + * and was taken from FreeBSD. + */ + days = 367*(y-1960)-7*(y+(m+9)/12)/4-3*((y+(m+9)/12-1)/100+1)/4+275*m/9+d-239; + t = days; + t = ((((t * 24) + hour) * 60 + min) * 60) + sec; + if (-48 <= gmtoff && gmtoff <= 52) + t -= gmtoff * 15 * 60; + return (t); +} + +#ifdef USE_FIND +/* ARGSUSED */ +LOCAL int +getfind(arg, valp, pac, pav) + char *arg; + long *valp; /* Not used until we introduce a ptr to opt struct */ + int *pac; + char *const **pav; +{ + do_find = TRUE; + find_ac = *pac; + find_av = *pav; + find_ac--, find_av++; + return (NOARGS); +} + +/* + * Called from dump_stat() + */ +LOCAL BOOL +find_stat(rootname, idr, fname, extent) + char *rootname; + struct iso_directory_record *idr; + char *fname; + int extent; +{ + BOOL ret; + int rlen; + + if (name_buf[0] == '.' && name_buf[1] == '.' && name_buf[2] == '\0') + if (find_node) + return (FALSE); + + if (find_node == NULL) /* No find(1) rules */ + return (TRUE); /* so pass everything */ + + rlen = strlen(rootname); + +#ifdef HAVE_ST_BLKSIZE + fstat_buf.st_blksize = 0; +#endif +#ifdef HAVE_ST_BLOCKS + fstat_buf.st_blocks = (fstat_buf.st_size+1023) / DEV_BSIZE; +#endif + walkstate.lname = &xname[3]; + walkstate.pflags = PF_ACL|PF_XATTR; +#ifdef XXX + if (info->f_xflags & (XF_ACL_ACCESS|XF_ACL_DEFAULT)) + walkstate.pflags |= PF_HAS_ACL; + if (info->f_xflags & XF_XATTR) + walkstate.pflags |= PF_HAS_XATTR; +#endif + + ret = find_expr(fname, &fname[rlen], &fstat_buf, &walkstate, find_node); + if (!ret) + return (ret); + return (ret); +} +#endif /* USE_FIND */ diff -Nru cdrtools-2.01.01a33/mkisofs/diag/isoinfo.mk cdrtools-3.02a09/mkisofs/diag/isoinfo.mk --- cdrtools-2.01.01a33/mkisofs/diag/isoinfo.mk 2007-06-27 12:23:00.000000000 +0000 +++ cdrtools-3.02a09/mkisofs/diag/isoinfo.mk 2013-04-21 18:24:56.000000000 +0000 @@ -1,4 +1,4 @@ -#ident @(#)isoinfo.mk 1.10 07/06/27 +#ident @(#)isoinfo.mk 1.17 13/04/21 ########################################################################### # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License version 2 @@ -11,7 +11,7 @@ # # You should have received a copy of the GNU General Public License along with # this program; see the file COPYING. If not, write to the Free Software -# Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ########################################################################### SRCROOT= ../.. RULESDIR= RULES @@ -24,16 +24,25 @@ CPPOPTS += -DUSE_LARGEFILES CPPOPTS += -DUSE_SCG CPPOPTS += -I.. -CPPOPTS += -I../../cdrecord +CPPOPTS += -I../../libscg +CPPOPTS += -I../../libscgcmd +CPPOPTS += -I../../libcdrdeflt +CPPOPTS += -DUSE_FIND CPPOPTS += -DSCHILY_PRINT +CPPOPTS += -DUSE_NLS CPPOPTS += -DUSE_ICONV CPPOPTS += -DINS_BASE=\"${INS_BASE}\" +CPPOPTS += -DTEXT_DOMAIN=\"SCHILY_cdrtools\" CFILES= isoinfo.c \ - scsi.c scsi_cdr.c cd_misc.c modes.c \ - defaults.c -LIBS= -lsiconv -lrscg -lscg $(LIB_VOLMGT) -ldeflt -lschily \ - $(SCSILIB) $(LIB_SOCKET) $(LIB_ICONV) $(LIB_INTL) + scsi.c + +# +# LIB_CAP is needed for Linux capability support in librscg. +# +LIBS= -lsiconv -lscgcmd -lrscg -lscg $(LIB_VOLMGT) \ + -lcdrdeflt -ldeflt -lfind -lschily \ + $(LIB_ACL_TEST) $(SCSILIB) $(LIB_SOCKET) $(LIB_ICONV) $(LIB_INTL) $(LIB_INTL) $(LIB_CAP) XMK_FILE= isoinfo_man.mk diff -Nru cdrtools-2.01.01a33/mkisofs/diag/isovfy.8 cdrtools-3.02a09/mkisofs/diag/isovfy.8 --- cdrtools-2.01.01a33/mkisofs/diag/isovfy.8 2006-02-08 22:19:59.000000000 +0000 +++ cdrtools-3.02a09/mkisofs/diag/isovfy.8 2006-02-08 22:19:59.000000000 +0000 @@ -1,2 +1,2 @@ .so man8/isoinfo.8 -.\" %Z%%M% %I% %E% joerg +.\" @(#)isovfy.8 1.1 06/02/08 joerg diff -Nru cdrtools-2.01.01a33/mkisofs/diag/isovfy.c cdrtools-3.02a09/mkisofs/diag/isovfy.c --- cdrtools-2.01.01a33/mkisofs/diag/isovfy.c 2007-07-26 16:35:14.000000000 +0000 +++ cdrtools-3.02a09/mkisofs/diag/isovfy.c 2015-12-08 23:58:44.000000000 +0000 @@ -1,7 +1,8 @@ -/* @(#)isovfy.c 1.30 07/07/26 joerg */ +/* @(#)isovfy.c 1.50 15/12/09 joerg */ +#include #ifndef lint -static char sccsid[] = - "@(#)isovfy.c 1.30 07/07/26 joerg"; +static UConst char sccsid[] = + "@(#)isovfy.c 1.50 15/12/09 joerg"; #endif /* * File isovfy.c - verify consistency of iso9660 filesystem. @@ -10,7 +11,7 @@ * Written by Eric Youngdale (1993). * * Copyright 1993 Yggdrasil Computing, Incorporated - * Copyright (c) 1999-2007 J. Schilling + * Copyright (c) 1999-2015 J. Schilling * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 @@ -32,13 +33,16 @@ #include #include -#include +#include #include -#include +#include #include +#include +#include "../iso9660.h" +#include "../rock.h" #include "../scsi.h" -#include "../../cdrecord/defaults.h" +#include "cdrdeflt.h" #include "../../cdrecord/version.h" /* @@ -66,74 +70,37 @@ #define ISO_BLOCKS(X) (((X) / SECTOR_SIZE) + (((X)%SECTOR_SIZE)?1:0)) #define infile in_image -FILE *infile = NULL; -int blocksize; +EXPORT FILE *infile = NULL; +EXPORT BOOL ignerr = FALSE; +LOCAL int su_version; +LOCAL int rr_version; +LOCAL int aa_version; +LOCAL int use_rock = TRUE; +LOCAL int blocksize; #define PAGE sizeof (buffer) -#define ISODCL(from, to) (to - from + 1) - -struct iso_primary_descriptor { - unsigned char type [ISODCL(1, 1)]; /* 711 */ - unsigned char id [ISODCL(2, 6)]; - unsigned char version [ISODCL(7, 7)]; /* 711 */ - unsigned char unused1 [ISODCL(8, 8)]; - unsigned char system_id [ISODCL(9, 40)]; /* aunsigned chars */ - unsigned char volume_id [ISODCL(41, 72)]; /* dunsigned chars */ - unsigned char unused2 [ISODCL(73, 80)]; - unsigned char volume_space_size [ISODCL(81, 88)]; /* 733 */ - unsigned char unused3 [ISODCL(89, 120)]; - unsigned char volume_set_size [ISODCL(121, 124)]; /* 723 */ - unsigned char volume_sequence_number [ISODCL(125, 128)]; /* 723 */ - unsigned char logical_block_size [ISODCL(129, 132)]; /* 723 */ - unsigned char path_table_size [ISODCL(133, 140)]; /* 733 */ - unsigned char type_l_path_table [ISODCL(141, 144)]; /* 731 */ - unsigned char opt_type_l_path_table [ISODCL(145, 148)]; /* 731 */ - unsigned char type_m_path_table [ISODCL(149, 152)]; /* 732 */ - unsigned char opt_type_m_path_table [ISODCL(153, 156)]; /* 732 */ - unsigned char root_directory_record [ISODCL(157, 190)]; /* 9.1 */ - unsigned char volume_set_id [ISODCL(191, 318)]; /* dunsigned chars */ - unsigned char publisher_id [ISODCL(319, 446)]; /* achars */ - unsigned char preparer_id [ISODCL(447, 574)]; /* achars */ - unsigned char application_id [ISODCL(575, 702)]; /* achars */ - unsigned char copyright_file_id [ISODCL(703, 739)]; /* 7.5 dchars */ - unsigned char abstract_file_id [ISODCL(740, 776)]; /* 7.5 dchars */ - unsigned char bibliographic_file_id [ISODCL(777, 813)]; /* 7.5 dchars */ - unsigned char creation_date [ISODCL(814, 830)]; /* 8.4.26.1 */ - unsigned char modification_date [ISODCL(831, 847)]; /* 8.4.26.1 */ - unsigned char expiration_date [ISODCL(848, 864)]; /* 8.4.26.1 */ - unsigned char effective_date [ISODCL(865, 881)]; /* 8.4.26.1 */ - unsigned char file_structure_version [ISODCL(882, 882)]; /* 711 */ - unsigned char unused4 [ISODCL(883, 883)]; - unsigned char application_data [ISODCL(884, 1395)]; - unsigned char unused5 [ISODCL(1396, 2048)]; -}; - -struct iso_directory_record { - unsigned char length [ISODCL(1, 1)]; /* 711 */ - unsigned char ext_attr_length [ISODCL(2, 2)]; /* 711 */ - unsigned char extent [ISODCL(3, 10)]; /* 733 */ - unsigned char size [ISODCL(11, 18)]; /* 733 */ - unsigned char date [ISODCL(19, 25)]; /* 7 by 711 */ - unsigned char flags [ISODCL(26, 26)]; - unsigned char file_unit_size [ISODCL(27, 27)]; /* 711 */ - unsigned char interleave [ISODCL(28, 28)]; /* 711 */ - unsigned char volume_sequence_number [ISODCL(29, 32)]; /* 723 */ - unsigned char name_len [ISODCL(33, 33)]; /* 711 */ - unsigned char name [38]; +struct diraddr { + struct diraddr *next; + int addr; }; LOCAL int isonum_721 __PR((char * p)); LOCAL int isonum_723 __PR((char * p)); LOCAL int isonum_711 __PR((char * p)); LOCAL int isonum_731 __PR((char * p)); +#if 0 LOCAL int isonum_722 __PR((char * p)); +#endif LOCAL int isonum_732 __PR((char * p)); -LOCAL int isonum_733 __PR((unsigned char * p)); +LOCAL int isonum_733 __PR((char * p)); LOCAL int parse_rr __PR((unsigned char * pnt, int len, int cont_flag)); +LOCAL void find_rr __PR((struct iso_directory_record * idr, Uchar **pntp, int *lenp)); LOCAL int dump_rr __PR((struct iso_directory_record * idr)); -LOCAL void check_tree __PR((off_t file_addr, int file_size, off_t parent_addr)); +LOCAL void check_tree __PR((struct diraddr *dirs, off_t file_addr, int file_size, off_t parent_addr)); +#if 0 LOCAL void check_path_tables __PR((int typel_extent, int typem_extent, int path_table_size)); +#endif LOCAL void usage __PR((int excode)); EXPORT int main __PR((int argc, char *argv[])); @@ -150,12 +117,8 @@ { #if 0 if (p[0] != p[3] || p[1] != p[2]) { -#ifdef USE_LIBSCHILY - comerrno(EX_BAD, "invalid format 7.2.3 number\n"); -#else fprintf(stderr, "invalid format 7.2.3 number\n"); exit(1); -#endif } #endif return (isonum_721(p)); @@ -178,6 +141,7 @@ | ((p[3] & 0xff) << 24)); } +#if 0 LOCAL int isonum_722(p) char *p; @@ -185,6 +149,7 @@ return ((p[1] & 0xff) | ((p[0] & 0xff) << 8)); } +#endif LOCAL int isonum_732(p) @@ -198,9 +163,9 @@ LOCAL int isonum_733(p) - unsigned char *p; + char *p; { - return (isonum_731((char *)p)); + return (isonum_731(p)); } char lbuffer[1024]; @@ -234,7 +199,8 @@ symlinkname[0] = 0; ncount = 0; - flag1 = flag2 = 0; + flag1 = -1; + flag2 = 0; while (len >= 4) { if (ncount) sprintf(lbuffer+iline, ","); @@ -245,7 +211,7 @@ iline += strlen(lbuffer + iline); if (pnt[0] < 'A' || pnt[0] > 'Z' || pnt[1] < 'A' || pnt[1] > 'Z') { - sprintf(lbuffer+iline, "**BAD SUSP %d %d]", + sprintf(lbuffer+iline, _("**BAD SUSP %d %d]"), pnt[0], pnt[1]); rr_goof++; iline += strlen(lbuffer + iline); @@ -253,33 +219,59 @@ } if (pnt[3] != 1 && pnt[3] != 2) { - sprintf(lbuffer+iline, "**BAD RRVERSION (%d)\n", pnt[3]); + sprintf(lbuffer+iline, _("**BAD RRVERSION (%d)\n"), pnt[3]); + rr_goof++; + iline += strlen(lbuffer + iline); + return (flag2); + } + if (pnt[2] < 4) { + sprintf(lbuffer+iline, + _("**BAD RRLEN (%d) in '%2.2s' field %2.2X %2.2X.\n"), + pnt[2], pnt, pnt[0], pnt[1]); rr_goof++; iline += strlen(lbuffer + iline); return (flag2); } ncount++; if (pnt[0] == 'R' && pnt[1] == 'R') flag1 = pnt[4] & 0xff; - if (strncmp((char *)pnt, "PX", 2) == 0) flag2 |= 1; - if (strncmp((char *)pnt, "PN", 2) == 0) flag2 |= 2; - if (strncmp((char *)pnt, "SL", 2) == 0) flag2 |= 4; - if (strncmp((char *)pnt, "NM", 2) == 0) flag2 |= 8; - if (strncmp((char *)pnt, "CL", 2) == 0) flag2 |= 16; - if (strncmp((char *)pnt, "PL", 2) == 0) flag2 |= 32; - if (strncmp((char *)pnt, "RE", 2) == 0) flag2 |= 64; - if (strncmp((char *)pnt, "TF", 2) == 0) flag2 |= 128; + if (strncmp((char *)pnt, "PX", 2) == 0) flag2 |= RR_FLAG_PX; + if (strncmp((char *)pnt, "PN", 2) == 0) flag2 |= RR_FLAG_PN; + if (strncmp((char *)pnt, "SL", 2) == 0) flag2 |= RR_FLAG_SL; + if (strncmp((char *)pnt, "NM", 2) == 0) flag2 |= RR_FLAG_NM; + if (strncmp((char *)pnt, "CL", 2) == 0) flag2 |= RR_FLAG_CL; + if (strncmp((char *)pnt, "PL", 2) == 0) flag2 |= RR_FLAG_PL; + if (strncmp((char *)pnt, "RE", 2) == 0) flag2 |= RR_FLAG_RE; + if (strncmp((char *)pnt, "TF", 2) == 0) flag2 |= RR_FLAG_TF; + + if (strncmp((char *)pnt, "SP", 2) == 0) { + flag2 |= RR_FLAG_SP; /* SUSP record */ + su_version = pnt[3] & 0xff; + } + if (strncmp((char *)pnt, "AA", 2) == 0) { /* Neither SUSP nor RR */ + flag2 |= RR_FLAG_AA; /* Apple Signature record */ + aa_version = pnt[3] & 0xff; + } + if (strncmp((char *)pnt, "ER", 2) == 0) { + flag2 |= RR_FLAG_ER; /* ER record */ + rr_version = pnt[7] & 0xff; /* Ext Version */ +/* strlcpy(er_id, (char *)&pnt[8], (pnt[4] & 0xFF) + 1);*/ + } if (strncmp((char *)pnt, "CE", 2) == 0) { - cont_extent = (off_t)isonum_733(pnt+4); - cont_offset = isonum_733(pnt+12); - cont_size = isonum_733(pnt+20); + cont_extent = (off_t)isonum_733((char *)pnt+4); + cont_offset = isonum_733((char *)pnt+12); + cont_size = isonum_733((char *)pnt+20); sprintf(lbuffer+iline, "=[%x,%x,%d]", (int)cont_extent, cont_offset, cont_size); iline += strlen(lbuffer + iline); } + if (strncmp((char *)pnt, "ST", 2) == 0) { /* Terminate SUSP */ + break; + } + if (strncmp((char *)pnt, "PL", 2) == 0 || strncmp((char *)pnt, "CL", 2) == 0) { - extent = isonum_733(pnt+4); + extent = isonum_733((char *)pnt+4); sprintf(lbuffer+iline, "=%x", extent); iline += strlen(lbuffer + iline); if (extent == 0) @@ -304,22 +296,22 @@ break; case 16: strcat(symlinkname, "/mnt"); - sprintf(lbuffer+iline, "Warning - mount point requested"); + sprintf(lbuffer+iline, _("Warning - mount point requested")); iline += strlen(lbuffer + iline); break; case 32: strcat(symlinkname, "kafka"); - sprintf(lbuffer+iline, "Warning - host_name requested"); + sprintf(lbuffer+iline, _("Warning - host_name requested")); iline += strlen(lbuffer + iline); break; default: - sprintf(lbuffer+iline, "Reserved bit setting in symlink"); + sprintf(lbuffer+iline, _("Reserved bit setting in symlink")); rr_goof++; iline += strlen(lbuffer + iline); break; } if ((pnts[0] & 0xfe) && pnts[1] != 0) { - sprintf(lbuffer+iline, "Incorrect length in symlink component"); + sprintf(lbuffer+iline, _("Incorrect length in symlink component")); iline += strlen(lbuffer + iline); } if ((pnts[0] & 1) == 0) @@ -336,51 +328,73 @@ len -= pnt[2]; pnt += pnt[2]; - if (len <= 3 && cont_extent) { - unsigned char sector[2048]; + } + if (cont_extent) { + unsigned char sector[2048]; #ifdef USE_SCG - readsecs(cont_extent * blocksize / 2048, sector, ISO_BLOCKS(sizeof (sector))); + readsecs(cont_extent * blocksize / 2048, sector, ISO_BLOCKS(sizeof (sector))); #else - lseek(fileno(infile), cont_extent * blocksize, SEEK_SET); - read(fileno(infile), sector, sizeof (sector)); + lseek(fileno(infile), cont_extent * blocksize, SEEK_SET); + read(fileno(infile), sector, sizeof (sector)); #endif - flag2 |= parse_rr(§or[cont_offset], cont_size, 1); - } + flag2 |= parse_rr(§or[cont_offset], cont_size, 1); } if (ncount) { sprintf(lbuffer+iline, "]"); iline += strlen(lbuffer + iline); } - if (!cont_flag && flag1 && flag1 != flag2) { - sprintf(lbuffer+iline, "Flag %x != %x", flag1, flag2); + if (!cont_flag && flag1 != -1 && flag1 != (flag2 & 0xFF)) { + sprintf(lbuffer+iline, _("Flag %x != %x"), flag1, flag2); rr_goof++; iline += strlen(lbuffer + iline); } return (flag2); } -LOCAL int -dump_rr(idr) +LOCAL void +find_rr(idr, pntp, lenp) struct iso_directory_record *idr; + Uchar **pntp; + int *lenp; { + struct iso_xa_dir_record *xadp; int len; - char * pnt; + unsigned char * pnt; len = idr->length[0] & 0xff; len -= offsetof(struct iso_directory_record, name[0]); len -= idr->name_len[0]; - pnt = (char *) idr; + + pnt = (unsigned char *) idr; pnt += offsetof(struct iso_directory_record, name[0]); pnt += idr->name_len[0]; - if ((idr->name_len[0] & 1) == 0) { pnt++; len--; } + if (len >= 14) { + xadp = (struct iso_xa_dir_record *)pnt; + + if (xadp->signature[0] == 'X' && xadp->signature[1] == 'A' && + xadp->reserved[0] == '\0') { + len -= 14; + pnt += 14; + } + } + *pntp = pnt; + *lenp = len; +} + +LOCAL int +dump_rr(idr) + struct iso_directory_record *idr; +{ + int len; + unsigned char * pnt; rr_goof = 0; - parse_rr((unsigned char *)pnt, len, 0); - return (rr_goof); + find_rr(idr, &pnt, &len); + return (parse_rr(pnt, len, 0)); } @@ -389,7 +403,8 @@ LOCAL int ngoof = 0; LOCAL void -check_tree(file_addr, file_size, parent_addr) +check_tree(dirs, file_addr, file_size, parent_addr) + struct diraddr *dirs; off_t file_addr; int file_size; off_t parent_addr; @@ -428,7 +443,7 @@ dir_size_count += file_size / blocksize; if (file_size & 0x3ff) - printf("********Directory has unusual size\n"); + printf(_("********Directory has unusual size\n")); for (k = 0; k < (file_size / sizeof (buffer)); k++) { #ifdef USE_SCG @@ -454,7 +469,7 @@ iline += strlen(lbuffer + iline); if (idr->name_len[0] > 33) { - sprintf(&lbuffer[iline], "File name length=(%d)", + sprintf(&lbuffer[iline], _("File name length=(%d)"), idr->name_len[0]); goof++; iline += strlen(lbuffer + iline); @@ -462,13 +477,18 @@ sprintf(&lbuffer[iline], ". "); iline += strlen(lbuffer + iline); rflag = 0; - if (orig_file_addr != (off_t)(isonum_733(idr->extent) + isonum_711((char *) idr->ext_attr_length))) { - sprintf(&lbuffer[iline], "***** Directory has null extent."); +#ifdef Eric_seems_to_be_wrong + if (orig_file_addr != (off_t)(isonum_733(idr->extent) + + isonum_711((char *) idr->ext_attr_length))) { +#else + if (orig_file_addr != (off_t)isonum_733(idr->extent)) { +#endif + sprintf(&lbuffer[iline], _("***** Directory has null extent.")); goof++; iline += strlen(lbuffer + iline); } if (i1) { - sprintf(&lbuffer[iline], "***** . not first entry."); + sprintf(&lbuffer[iline], _("***** . not first entry.")); rr_goof++; iline += strlen(lbuffer + iline); } @@ -476,19 +496,24 @@ sprintf(&lbuffer[iline], ".. "); iline += strlen(lbuffer + iline); rflag = 0; - if (parent_file_addr != (off_t)(isonum_733(idr->extent) + isonum_711((char *) idr->ext_attr_length))) { - sprintf(&lbuffer[iline], "***** Directory has null extent."); +#ifdef Eric_seems_to_be_wrong + if (parent_file_addr != (off_t)(isonum_733(idr->extent) + + isonum_711((char *) idr->ext_attr_length))) { +#else + if (parent_file_addr != (off_t)isonum_733(idr->extent)) { +#endif + sprintf(&lbuffer[iline], _("***** Directory has null extent.")); goof++; iline += strlen(lbuffer + iline); } if (i1 != 1) { - sprintf(&lbuffer[iline], "***** .. not second entry."); + sprintf(&lbuffer[iline], _("***** .. not second entry.")); rr_goof++; iline += strlen(lbuffer + iline); } } else { if (i1 < 2) { - sprintf(&lbuffer[iline], " Improper sorting."); + sprintf(&lbuffer[iline], _(" Improper sorting.")); rr_goof++; } for (j = 0; j < (int)idr->name_len[0]; j++) { @@ -502,43 +527,46 @@ } if (size && extent == 0) { - sprintf(&lbuffer[iline], "****Extent==0, size != 0"); + sprintf(&lbuffer[iline], _("****Extent==0, size != 0")); goof++; iline += strlen(lbuffer + iline); } #if 0 /* This is apparently legal. */ if (size == 0 && extent) { - sprintf(&lbuffer[iline], "****Extent!=0, size == 0"); + sprintf(&lbuffer[iline], _("****Extent!=0, size == 0")); goof++; iline += strlen(lbuffer + iline); } #endif if (idr->flags[0] & 0xf5) { - sprintf(&lbuffer[iline], "Flags=(%x) ", idr->flags[0]); + sprintf(&lbuffer[iline], _("Flags=(%x) "), idr->flags[0]); goof++; iline += strlen(lbuffer + iline); } if (idr->interleave[0]) { - sprintf(&lbuffer[iline], "Interleave=(%d) ", idr->interleave[0]); + sprintf(&lbuffer[iline], _("Interleave=(%d) "), idr->interleave[0]); goof++; iline += strlen(lbuffer + iline); } if (idr->file_unit_size[0]) { - sprintf(&lbuffer[iline], "File unit size=(%d) ", idr->file_unit_size[0]); + sprintf(&lbuffer[iline], _("File unit size=(%d) "), idr->file_unit_size[0]); goof++; iline += strlen(lbuffer + iline); } if (idr->volume_sequence_number[0] != 1) { - sprintf(&lbuffer[iline], "Volume sequence number=(%d) ", idr->volume_sequence_number[0]); + sprintf(&lbuffer[iline], _("Volume sequence number=(%d) "), idr->volume_sequence_number[0]); goof++; iline += strlen(lbuffer + iline); } - goof += dump_rr(idr); + if (use_rock) { + dump_rr(idr); + goof += rr_goof; + } sprintf(&lbuffer[iline], "\n"); iline += strlen(lbuffer + iline); @@ -555,10 +583,33 @@ - if (rflag && (idr->flags[0] & 2)) - check_tree((off_t)(isonum_733(idr->extent) + isonum_711((char *)idr->ext_attr_length)) * blocksize, + if (rflag && (idr->flags[0] & 2)) { + struct diraddr dir; + struct diraddr *dp; + int addr = isonum_733(idr->extent); + BOOL isloop = FALSE; + + dir.next = dirs; + dir.addr = addr; + + for (dp = dirs; dp; dp = dp->next) { + if (addr == dp->addr) { + isloop = TRUE; + break; + } + } + if (!isloop) { +#ifdef Eric_seems_to_be_wrong + check_tree(&dir, (off_t)(adr + isonum_711((char *)idr->ext_attr_length)) * blocksize, isonum_733(idr->size), orig_file_addr * blocksize); +#else + check_tree(&dir, (off_t)addr * blocksize, + isonum_733(idr->size), + orig_file_addr * blocksize); +#endif + } + } i += buffer[i]; i1++; if (i > 2048 - offsetof(struct iso_directory_record, name[0])) @@ -582,6 +633,7 @@ unsigned short parent; }; +#if 0 LOCAL void check_path_tables(typel_extent, typem_extent, path_table_size) int typel_extent; @@ -659,21 +711,25 @@ } printf("%4.4d %4.4d %8.8x %s\n", count++, idx, extent, name); } + free(typel); + free(typem); } +#endif LOCAL void usage(excode) int excode; { - errmsgno(EX_BAD, "Usage: %s [options] image\n", + errmsgno(EX_BAD, _("Usage: %s [options] image\n"), get_progname()); - error("Options:\n"); - error("\t-help, -h Print this help\n"); - error("\t-version Print version info and exit\n"); - error("\t-i filename Filename to read ISO-9660 image from\n"); - error("\tdev=target SCSI target to use as CD/DVD-Recorder\n"); - error("\nIf neither -i nor dev= are speficied, is needed.\n"); + error(_("Options:\n")); + error(_("\t-help, -h Print this help\n")); + error(_("\t-version Print version info and exit\n")); + error(_("\t-ignore-error Ignore errors\n")); + error(_("\t-i filename Filename to read ISO-9660 image from\n")); + error(_("\tdev=target SCSI target to use as CD/DVD-Recorder\n")); + error(_("\nIf neither -i nor dev= are specified, is needed.\n")); exit(excode); } @@ -684,11 +740,15 @@ { int cac; char * const *cav; - char *opts = "help,h,version,i*,dev*"; + int c; + char *opts = "help,h,version,ignore-error,i*,dev*"; BOOL help = FALSE; BOOL prvers = FALSE; char *filename = NULL; - char *devname = NULL; + char *sdevname = NULL; +#if defined(USE_NLS) + char *dir; +#endif off_t file_addr; int file_size; struct iso_primary_descriptor ipd; @@ -696,57 +756,74 @@ int typel_extent; int typem_extent; int path_table_size; + char buffer[2048]; save_args(argc, argv); +#if defined(USE_NLS) + setlocale(LC_ALL, ""); +#if !defined(TEXT_DOMAIN) /* Should be defined by cc -D */ +#define TEXT_DOMAIN "isoinfo" /* Use this only if it weren't */ +#endif + dir = searchfileinpath("share/locale", F_OK, + SIP_ANY_FILE|SIP_NO_PATH, NULL); + if (dir) + (void) bindtextdomain(TEXT_DOMAIN, dir); + else +#if defined(PROTOTYPES) && defined(INS_BASE) + (void) bindtextdomain(TEXT_DOMAIN, INS_BASE "/share/locale"); +#else + (void) bindtextdomain(TEXT_DOMAIN, "/usr/share/locale"); +#endif + (void) textdomain(TEXT_DOMAIN); +#endif + cac = argc - 1; cav = argv + 1; - if (getallargs(&cac, &cav, opts, &help, &help, &prvers, - &filename, &devname) < 0) { - errmsgno(EX_BAD, "Bad Option: '%s'\n", cav[0]); + if (getallargs(&cac, &cav, opts, &help, &help, &prvers, &ignerr, + &filename, &sdevname) < 0) { + errmsgno(EX_BAD, _("Bad Option: '%s'\n"), cav[0]); usage(EX_BAD); } if (help) usage(0); if (prvers) { - printf("isovfy %s (%s-%s-%s) Copyright (C) 1993-1999 Eric Youngdale (C) 1999-2007 Jörg Schilling\n", + printf(_("isovfy %s (%s-%s-%s) Copyright (C) 1993-1999 %s (C) 1999-2015 %s\n"), VERSION, - HOST_CPU, HOST_VENDOR, HOST_OS); + HOST_CPU, HOST_VENDOR, HOST_OS, + _("Eric Youngdale"), + _("Joerg Schilling")); exit(0); } cac = argc - 1; cav = argv + 1; - if (filename == NULL && devname == NULL) { + if (filename == NULL && sdevname == NULL) { if (getfiles(&cac, &cav, opts) != 0) { filename = cav[0]; cac--, cav++; } } if (getfiles(&cac, &cav, opts) != 0) { - errmsgno(EX_BAD, "Bad Argument: '%s'\n", cav[0]); + errmsgno(EX_BAD, _("Bad Argument: '%s'\n"), cav[0]); usage(EX_BAD); } - if (filename != NULL && devname != NULL) { - errmsgno(EX_BAD, "Only one of -i or dev= allowed\n"); + if (filename != NULL && sdevname != NULL) { + errmsgno(EX_BAD, _("Only one of -i or dev= allowed\n")); usage(EX_BAD); } #ifdef USE_SCG - if (filename == NULL && devname == NULL) - cdr_defaults(&devname, NULL, NULL, NULL); -#endif - if (filename == NULL && devname == NULL) { -#ifdef USE_LIBSCHILY - errmsgno(EX_BAD, "ISO-9660 image not specified\n"); -#else - fprintf(stderr, "ISO-9660 image not specified\n"); + if (filename == NULL && sdevname == NULL) + cdr_defaults(&sdevname, NULL, NULL, NULL, NULL); #endif + if (filename == NULL && sdevname == NULL) { + fprintf(stderr, _("ISO-9660 image not specified\n")); usage(EX_BAD); } if (filename != NULL) infile = fopen(filename, "rb"); else - filename = devname; + filename = sdevname; if (infile != NULL) { /* EMPTY */; @@ -755,12 +832,8 @@ #else } else { #endif -#ifdef USE_LIBSCHILY - comerr("Cannot open '%s'\n", filename); -#else - fprintf(stderr, "Cannot open '%s'\n", filename); + fprintf(stderr, _("Cannot open '%s'\n"), filename); exit(1); -#endif } @@ -779,17 +852,33 @@ blocksize = 2048; } +#ifdef Eric_seems_to_be_wrong file_addr = (off_t)isonum_733(idr->extent) + isonum_711((char *)idr->ext_attr_length); +#else + file_addr = (off_t)isonum_733(idr->extent); +#endif file_size = isonum_733(idr->size); +#ifdef USE_SCG + readsecs(file_addr, buffer, ISO_BLOCKS(sizeof (buffer))); +#else + lseek(fileno(infile), file_addr * blocksize, SEEK_SET); + read(fileno(infile), buffer, sizeof (buffer)); +#endif + c = dump_rr((struct iso_directory_record *) buffer); + if (c == 0 || + (c & (RR_FLAG_SP | RR_FLAG_ER)) == 0 || su_version < 1 || rr_version < 1) { + use_rock = FALSE; + } + if (sizeof (file_addr) > sizeof (long)) { - printf("Root at extent %llx, %d bytes\n", (Llong)file_addr, file_size); + printf(_("Root at extent %llx, %d bytes\n"), (Llong)file_addr, file_size); } else { - printf("Root at extent %lx, %d bytes\n", (long)file_addr, file_size); + printf(_("Root at extent %lx, %d bytes\n"), (long)file_addr, file_size); } file_addr = file_addr * blocksize; - check_tree(file_addr, file_size, file_addr); + check_tree((struct diraddr *)NULL, file_addr, file_size, file_addr); typel_extent = isonum_731((char *)ipd.type_l_path_table); typem_extent = isonum_732((char *)ipd.type_m_path_table); @@ -804,6 +893,6 @@ fclose(infile); if (!ngoof) - printf("No errors found\n"); + printf(_("No errors found\n")); return (0); } diff -Nru cdrtools-2.01.01a33/mkisofs/diag/isovfy.mk cdrtools-3.02a09/mkisofs/diag/isovfy.mk --- cdrtools-2.01.01a33/mkisofs/diag/isovfy.mk 2007-02-04 23:25:38.000000000 +0000 +++ cdrtools-3.02a09/mkisofs/diag/isovfy.mk 2013-04-21 18:24:56.000000000 +0000 @@ -1,4 +1,4 @@ -#ident @(#)isovfy.mk 1.7 07/02/05 +#ident @(#)isovfy.mk 1.12 13/04/21 ########################################################################### # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License version 2 @@ -11,7 +11,7 @@ # # You should have received a copy of the GNU General Public License along with # this program; see the file COPYING. If not, write to the Free Software -# Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ########################################################################### SRCROOT= ../.. RULESDIR= RULES @@ -24,13 +24,20 @@ CPPOPTS += -DUSE_LARGEFILES CPPOPTS += -DUSE_SCG CPPOPTS += -I.. -CPPOPTS += -I../../cdrecord +CPPOPTS += -I../../libscg +CPPOPTS += -I../../libscgcmd +CPPOPTS += -I../../libcdrdeflt CPPOPTS += -DSCHILY_PRINT +CPPOPTS += -DINS_BASE=\"${INS_BASE}\" +CPPOPTS += -DTEXT_DOMAIN=\"SCHILY_cdrtools\" CFILES= isovfy.c \ - scsi.c scsi_cdr.c cd_misc.c modes.c \ - defaults.c -LIBS= -lrscg -lscg $(LIB_VOLMGT) -ldeflt -lschily $(SCSILIB) $(LIB_SOCKET) + scsi.c + +# +# LIB_CAP is needed for Linux capability support in librscg. +# +LIBS= -lscgcmd -lrscg -lscg $(LIB_VOLMGT) -lcdrdeflt -ldeflt -lschily $(SCSILIB) $(LIB_SOCKET) $(LIB_INTL) $(LIB_CAP) XMK_FILE= isovfy_man.mk ########################################################################### diff -Nru cdrtools-2.01.01a33/mkisofs/diag/Makefile cdrtools-3.02a09/mkisofs/diag/Makefile --- cdrtools-2.01.01a33/mkisofs/diag/Makefile 2001-04-03 21:39:37.000000000 +0000 +++ cdrtools-3.02a09/mkisofs/diag/Makefile 2010-12-19 19:28:12.000000000 +0000 @@ -1,4 +1,4 @@ -#ident "@(#)Makefile 1.6 01/04/03 " +#ident "@(#)Makefile 1.10 10/12/19 " ########################################################################### # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License version 2 @@ -21,6 +21,15 @@ MK_FILES= dump.mk isodump.mk isoinfo.mk isovfy.mk isodebug.mk #XMK_FILE= Makefile.man +scsi.c: + @echo " ==> MAKING SYMLINKS in ." && sh ./MKLINKS +$(ALLTARGETS): scsi.c + ########################################################################### include $(SRCROOT)/$(RULESDIR)/rules.mks ########################################################################### + +CFILES: dump.c isodebug.c isodump.c isoinfo.c isovfy.c + +xtxt: $(CFILES) + gxgettext --no-wrap -k_ -k__ $(CFILES) diff -Nru cdrtools-2.01.01a33/mkisofs/diag/MKLINKS cdrtools-3.02a09/mkisofs/diag/MKLINKS --- cdrtools-2.01.01a33/mkisofs/diag/MKLINKS 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/mkisofs/diag/MKLINKS 2011-08-04 21:45:27.000000000 +0000 @@ -0,0 +1,34 @@ +#!/bin/sh +########################################################################### +#ident "@(#)MKLINKS 1.5 11/08/04 " +########################################################################### +# Written 2008-2011 by J. Schilling +########################################################################### +# Copyright (c) 2008-2011 J. Schilling +########################################################################### +# The contents of this file are subject to the terms of the +# Common Development and Distribution License, Version 1.0 only +# (the "License"). You may not use this file except in compliance +# with the License. +# +# See the file CDDL.Schily.txt in this distribution for details. +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file CDDL.Schily.txt from this distribution. +########################################################################### +symlink="ln -s" +MKLINKS_TEST=${MKLINKS_TEST-:} +if [ ".$MKLINKS_COPY" = '.' ]; then + rm -f xxzzy.123 xxzzy.345 + echo test > xxzzy.123 + $symlink xxzzy.123 xxzzy.345 + test $? = 0 || symlink=cp + test -r xxzzy.345 || symlink=cp + ${MKLINKS_TEST} -h xxzzy.345 || symlink=cp + rm -f xxzzy.123 xxzzy.345 +else + symlink=cp +fi +########################################################################### + +$symlink ../scsi.c . diff -Nru cdrtools-2.01.01a33/mkisofs/diag/modes.c cdrtools-3.02a09/mkisofs/diag/modes.c --- cdrtools-2.01.01a33/mkisofs/diag/modes.c 2006-09-13 15:35:12.000000000 +0000 +++ cdrtools-3.02a09/mkisofs/diag/modes.c 1970-01-01 00:00:00.000000000 +0000 @@ -1,296 +0,0 @@ -/* @(#)modes.c 1.26 06/09/13 Copyright 1988, 1997-2001, 2004 J. Schilling */ -#ifndef lint -static char sccsid[] = - "@(#)modes.c 1.26 06/09/13 Copyright 1988, 1997-2001, 2004 J. Schilling"; -#endif -/* - * SCSI mode page handling - * - * Copyright (c) 1988, 1997-2001, 2004 J. Schilling - */ -/* - * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. - * - * See the file CDDL.Schily.txt in this distribution for details. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file CDDL.Schily.txt from this distribution. - */ - -#include -#include -#include -#include -#include -#include -#include - -#include "cdrecord.h" - -EXPORT int scsi_compliant; - -LOCAL BOOL has_mode_page __PR((SCSI *scgp, int page, char *pagename, int *lenp)); -EXPORT BOOL get_mode_params __PR((SCSI *scgp, int page, char *pagename, - Uchar *modep, Uchar *cmodep, - Uchar *dmodep, Uchar *smodep, - int *lenp)); -EXPORT BOOL set_mode_params __PR((SCSI *scgp, char *pagename, Uchar *modep, - int len, int save, int secsize)); - -#define XXX - -#ifdef XXX -LOCAL BOOL -has_mode_page(scgp, page, pagename, lenp) - SCSI *scgp; - int page; - char *pagename; - int *lenp; -{ - Uchar mode[0x100]; - int hdlen; - int len = 1; /* Nach SCSI Norm */ - int try = 0; - struct scsi_mode_page_header *mp; - - /* - * ATAPI drives (used e.g. by IOMEGA) from y2k have the worst firmware - * I've seen. They create DMA buffer overruns if we request less than - * 3 bytes with 6 byte mode sense which equals 4 byte with 10 byte mode - * sense. In order to prevent repeated bus resets, we remember this - * bug. - * - * IOMEGA claims that they are using Philips clone drives but a Philips - * drive I own does not have the problem. - */ - if ((scgp->dflags & DRF_MODE_DMA_OVR) != 0) - len = sizeof (struct scsi_mode_header); -again: - fillbytes((caddr_t)mode, sizeof (mode), '\0'); - if (lenp) - *lenp = 0; - - scgp->silent++; - (void) unit_ready(scgp); -/* Maxoptix bringt Aborted cmd 0x0B mit code 0x4E (overlapping cmds)*/ - - /* - * The Matsushita CW-7502 will sometimes deliver a zeroed - * mode page 2A if "Page n default" is used instead of "current". - */ - if (mode_sense(scgp, mode, len, page, 0) < 0) { /* Page n current */ - scgp->silent--; - if (len < (int)sizeof (struct scsi_mode_header) && try == 0) { - len = sizeof (struct scsi_mode_header); - goto again; - } - return (FALSE); - } else { - if (len > 1 && try == 0) { - /* - * If we come here, we got a hard failure with the - * fist try. Remember this (IOMEGA USB) firmware bug. - */ - if ((scgp->dflags & DRF_MODE_DMA_OVR) == 0) { - /* XXX if (!nowarn) */ - errmsgno(EX_BAD, - "Warning: controller creates hard SCSI failure when retrieving %s page.\n", - pagename); - scgp->dflags |= DRF_MODE_DMA_OVR; - } - } - len = ((struct scsi_mode_header *)mode)->sense_data_len + 1; - } - /* - * ATAPI drives as used by IOMEGA may receive a SCSI bus device reset - * in between these two mode sense commands. - */ - (void) unit_ready(scgp); - if (mode_sense(scgp, mode, len, page, 0) < 0) { /* Page n current */ - scgp->silent--; - return (FALSE); - } - scgp->silent--; - - if (scgp->verbose) - scg_prbytes("Mode Sense Data", mode, len - scg_getresid(scgp)); - hdlen = sizeof (struct scsi_mode_header) + - ((struct scsi_mode_header *)mode)->blockdesc_len; - mp = (struct scsi_mode_page_header *)(mode + hdlen); - if (scgp->verbose) - scg_prbytes("Mode Page Data", (Uchar *)mp, mp->p_len+2); - - if (mp->p_len == 0) { - if (!scsi_compliant && try == 0) { - len = hdlen; - /* - * add sizeof page header (page # + len byte) - * (should normaly result in len == 14) - * this allowes to work with: - * Quantum Q210S (wants at least 13) - * MD2x (wants at least 4) - */ - len += 2; - try++; - goto again; - } - /* XXX if (!nowarn) */ - errmsgno(EX_BAD, - "Warning: controller returns zero sized %s page.\n", - pagename); - } - if (!scsi_compliant && - (len < (int)(mp->p_len + hdlen + 2))) { - len = mp->p_len + hdlen + 2; - - /* XXX if (!nowarn) */ - errmsgno(EX_BAD, - "Warning: controller returns wrong size for %s page.\n", - pagename); - } - if (mp->p_code != page) { - /* XXX if (!nowarn) */ - errmsgno(EX_BAD, - "Warning: controller returns wrong page %X for %s page (%X).\n", - mp->p_code, pagename, page); - return (FALSE); - } - - if (lenp) - *lenp = len; - return (mp->p_len > 0); -} -#endif - -EXPORT BOOL -get_mode_params(scgp, page, pagename, modep, cmodep, dmodep, smodep, lenp) - SCSI *scgp; - int page; - char *pagename; - Uchar *modep; - Uchar *cmodep; - Uchar *dmodep; - Uchar *smodep; - int *lenp; -{ - int len; - BOOL ret = TRUE; - -#ifdef XXX - if (lenp) - *lenp = 0; - if (!has_mode_page(scgp, page, pagename, &len)) { - if (!scgp->silent) errmsgno(EX_BAD, - "Warning: controller does not support %s page.\n", - pagename); - return (FALSE); - } - if (lenp) - *lenp = len; -#else - if (lenp == 0) - len = 0xFF; -#endif - - if (modep) { - fillbytes(modep, 0x100, '\0'); - scgp->silent++; - (void) unit_ready(scgp); - scgp->silent--; - if (mode_sense(scgp, modep, len, page, 0) < 0) { /* Page x current */ - errmsgno(EX_BAD, "Cannot get %s data.\n", pagename); - ret = FALSE; - } else if (scgp->verbose) { - scg_prbytes("Mode Sense Data", modep, len - scg_getresid(scgp)); - } - } - - if (cmodep) { - fillbytes(cmodep, 0x100, '\0'); - scgp->silent++; - (void) unit_ready(scgp); - scgp->silent--; - if (mode_sense(scgp, cmodep, len, page, 1) < 0) { /* Page x change */ - errmsgno(EX_BAD, "Cannot get %s mask.\n", pagename); - ret = FALSE; - } else if (scgp->verbose) { - scg_prbytes("Mode Sense Data", cmodep, len - scg_getresid(scgp)); - } - } - - if (dmodep) { - fillbytes(dmodep, 0x100, '\0'); - scgp->silent++; - (void) unit_ready(scgp); - scgp->silent--; - if (mode_sense(scgp, dmodep, len, page, 2) < 0) { /* Page x default */ - errmsgno(EX_BAD, "Cannot get default %s data.\n", - pagename); - ret = FALSE; - } else if (scgp->verbose) { - scg_prbytes("Mode Sense Data", dmodep, len - scg_getresid(scgp)); - } - } - - if (smodep) { - fillbytes(smodep, 0x100, '\0'); - scgp->silent++; - (void) unit_ready(scgp); - scgp->silent--; - if (mode_sense(scgp, smodep, len, page, 3) < 0) { /* Page x saved */ - errmsgno(EX_BAD, "Cannot get saved %s data.\n", pagename); - ret = FALSE; - } else if (scgp->verbose) { - scg_prbytes("Mode Sense Data", smodep, len - scg_getresid(scgp)); - } - } - - return (ret); -} - -EXPORT BOOL -set_mode_params(scgp, pagename, modep, len, save, secsize) - SCSI *scgp; - char *pagename; - Uchar *modep; - int len; - int save; - int secsize; -{ - int i; - - ((struct scsi_modesel_header *)modep)->sense_data_len = 0; - ((struct scsi_modesel_header *)modep)->res2 = 0; - - i = ((struct scsi_mode_header *)modep)->blockdesc_len; - if (i > 0) { - i_to_3_byte( - ((struct scsi_mode_data *)modep)->blockdesc.nlblock, - 0); - if (secsize >= 0) - i_to_3_byte(((struct scsi_mode_data *)modep)->blockdesc.lblen, - secsize); - } - - scgp->silent++; - (void) unit_ready(scgp); - scgp->silent--; - if (save == 0 || mode_select(scgp, modep, len, save, scgp->inq->data_format >= 2) < 0) { - scgp->silent++; - (void) unit_ready(scgp); - scgp->silent--; - if (mode_select(scgp, modep, len, 0, scgp->inq->data_format >= 2) < 0) { - if (scgp->silent == 0) { - errmsgno(EX_BAD, - "Warning: using default %s data.\n", - pagename); - scg_prbytes("Mode Select Data", modep, len); - } - return (FALSE); - } - } - return (TRUE); -} diff -Nru cdrtools-2.01.01a33/mkisofs/diag/scsi.c cdrtools-3.02a09/mkisofs/diag/scsi.c --- cdrtools-2.01.01a33/mkisofs/diag/scsi.c 2007-07-26 16:36:52.000000000 +0000 +++ cdrtools-3.02a09/mkisofs/diag/scsi.c 1970-01-01 00:00:00.000000000 +0000 @@ -1,176 +0,0 @@ -/* @(#)scsi.c 1.27 07/07/26 Copyright 1997-2007 J. Schilling */ -#ifndef lint -static char sccsid[] = - "@(#)scsi.c 1.27 07/07/26 Copyright 1997-2007 J. Schilling"; -#endif -/* - * Copyright (c) 1997-2007 J. Schilling - */ -/* - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 - * as published by the Free Software Foundation. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License along with - * this program; see the file COPYING. If not, write to the Free Software - * Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - */ - -#ifdef USE_SCG -#include - -#include -#include -#include -#include -#include - -#include "mkisofs.h" -#include -#include - -#include "cdrecord.h" -#include "../cdrecord/defaults.h" - -/* - * NOTICE: You should not make BUF_SIZE more than - * the buffer size of the CD-Recorder. - * - * Do not set BUF_SIZE to be more than 126 KBytes - * if you are running cdrecord on a sun4c machine. - * - * WARNING: Philips CDD 521 dies if BUF_SIZE is to big. - */ -#define BUF_SIZE (62*1024) /* Must be a multiple of 2048 */ - -LOCAL SCSI *scgp; -LOCAL long bufsize; /* The size of the transfer buffer */ - -EXPORT int readsecs __PR((UInt32_t startsecno, void *buffer, int sectorcount)); -EXPORT int scsidev_open __PR((char *path)); -EXPORT int scsidev_close __PR((void)); - -EXPORT int -readsecs(startsecno, buffer, sectorcount) - UInt32_t startsecno; - void *buffer; - int sectorcount; -{ - int f; - int secsize; /* The drive's SCSI sector size */ - long amount; /* The number of bytes to be transfered */ - long secno; /* The sector number to read from */ - long secnum; /* The number of sectors to read */ - char *bp; - long amt; - - if (in_image == NULL) { - /* - * We are using the standard CD-ROM sectorsize of 2048 bytes - * while the drive may be switched to 512 bytes per sector. - * - * XXX We assume that secsize is no more than SECTOR_SIZE - * XXX and that SECTOR_SIZE / secsize is not a fraction. - */ - secsize = scgp->cap->c_bsize; - amount = sectorcount * SECTOR_SIZE; - secno = startsecno * (SECTOR_SIZE / secsize); - bp = buffer; - - while (amount > 0) { - amt = amount; - if (amount > bufsize) - amt = bufsize; - secnum = amt / secsize; - - if (read_scsi(scgp, bp, secno, secnum) < 0 || - scg_getresid(scgp) != 0) { -#ifdef OLD - return (-1); -#else - comerr("Read error on old image\n"); -#endif - } - - amount -= secnum * secsize; - bp += secnum * secsize; - secno += secnum; - } - return (SECTOR_SIZE * sectorcount); - } - - f = fileno(in_image); - - if (lseek(f, (off_t)startsecno * SECTOR_SIZE, SEEK_SET) == (off_t)-1) { - comerr("Seek error on old image\n"); - } - if ((amt = read(f, buffer, (sectorcount * SECTOR_SIZE))) - != (sectorcount * SECTOR_SIZE)) { - if (amt < 0) - comerr("Read error on old image\n"); - comerrno(EX_BAD, "Short read on old image\n"); /* < secnt aber > 0 */ - } - return (sectorcount * SECTOR_SIZE); -} - -EXPORT int -scsidev_open(path) - char *path; -{ - char errstr[80]; - char *buf; /* ignored, bit OS/2 ASPI layer needs memory which */ - /* has been allocated by scsi_getbuf() */ - - /* - * Call scg_remote() to force loading the remote SCSI transport library - * code that is located in librscg instead of the dummy remote routines - * that are located inside libscg. - */ - scg_remote(); - - cdr_defaults(&path, NULL, NULL, NULL); - /* path, debug, verboseopen */ - scgp = scg_open(path, errstr, sizeof (errstr), 0, 0); - if (scgp == 0) { - errmsg("%s%sCannot open SCSI driver.\n", errstr, errstr[0]?". ":""); - return (-1); - } - - bufsize = scg_bufsize(scgp, BUF_SIZE); - if ((buf = scg_getbuf(scgp, bufsize)) == NULL) { - errmsg("Cannot get SCSI I/O buffer.\n"); - scg_close(scgp); - return (-1); - } - - bufsize = (bufsize / SECTOR_SIZE) * SECTOR_SIZE; - - allow_atapi(scgp, TRUE); - - if (!wait_unit_ready(scgp, 60)) { /* Eat Unit att / Wait for drive */ - return (-1); - } - - scgp->silent++; - read_capacity(scgp); /* Set Capacity/Sectorsize for I/O */ - scgp->silent--; - - return (1); -} - -EXPORT int -scsidev_close() -{ - if (in_image == NULL) { - return (scg_close(scgp)); - } else { - return (fclose(in_image)); - } -} - -#endif /* USE_SCG */ diff -Nru cdrtools-2.01.01a33/mkisofs/diag/scsi_cdr.c cdrtools-3.02a09/mkisofs/diag/scsi_cdr.c --- cdrtools-2.01.01a33/mkisofs/diag/scsi_cdr.c 2007-07-08 18:37:18.000000000 +0000 +++ cdrtools-3.02a09/mkisofs/diag/scsi_cdr.c 1970-01-01 00:00:00.000000000 +0000 @@ -1,3108 +0,0 @@ -/* @(#)scsi_cdr.c 1.150 07/07/08 Copyright 1995-2007 J. Schilling */ -#ifndef lint -static char sccsid[] = - "@(#)scsi_cdr.c 1.150 07/07/08 Copyright 1995-2007 J. Schilling"; -#endif -/* - * SCSI command functions for cdrecord - * covering pre-MMC standard functions up to MMC-2 - * - * Copyright (c) 1995-2007 J. Schilling - */ -/* - * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. - * - * See the file CDDL.Schily.txt in this distribution for details. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file CDDL.Schily.txt from this distribution. - */ - -/* - * NOTICE: The Philips CDD 521 has several firmware bugs. - * One of them is not to respond to a SCSI selection - * within 200ms if the general load on the - * SCSI bus is high. To deal with this problem - * most of the SCSI commands are send with the - * SCG_CMD_RETRY flag enabled. - */ -#include - -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include - -#include -#include -#include -#include - -#include "scsimmc.h" -#include "cdrecord.h" - -#define strbeg(s1, s2) (strstr((s2), (s1)) == (s2)) - -EXPORT BOOL unit_ready __PR((SCSI *scgp)); -EXPORT BOOL wait_unit_ready __PR((SCSI *scgp, int secs)); -EXPORT BOOL scsi_in_progress __PR((SCSI *scgp)); -EXPORT BOOL cdr_underrun __PR((SCSI *scgp)); -EXPORT int test_unit_ready __PR((SCSI *scgp)); -EXPORT int rezero_unit __PR((SCSI *scgp)); -EXPORT int request_sense __PR((SCSI *scgp)); -EXPORT int request_sense_b __PR((SCSI *scgp, caddr_t bp, int cnt)); -EXPORT int inquiry __PR((SCSI *scgp, caddr_t, int)); -EXPORT int read_capacity __PR((SCSI *scgp)); -EXPORT void print_capacity __PR((SCSI *scgp, FILE *f)); -EXPORT int scsi_load_unload __PR((SCSI *scgp, int)); -EXPORT int scsi_prevent_removal __PR((SCSI *scgp, int)); -EXPORT int scsi_start_stop_unit __PR((SCSI *scgp, int, int, BOOL immed)); -EXPORT int scsi_set_speed __PR((SCSI *scgp, int readspeed, int writespeed, int rotctl)); -EXPORT int scsi_get_speed __PR((SCSI *scgp, int *readspeedp, int *writespeedp)); -EXPORT int qic02 __PR((SCSI *scgp, int)); -EXPORT int write_xscsi __PR((SCSI *scgp, caddr_t, long, long, int)); -EXPORT int write_xg0 __PR((SCSI *scgp, caddr_t, long, long, int)); -EXPORT int write_xg1 __PR((SCSI *scgp, caddr_t, long, long, int)); -EXPORT int write_xg5 __PR((SCSI *scgp, caddr_t, long, long, int)); -EXPORT int seek_scsi __PR((SCSI *scgp, long addr)); -EXPORT int seek_g0 __PR((SCSI *scgp, long addr)); -EXPORT int seek_g1 __PR((SCSI *scgp, long addr)); -EXPORT int scsi_flush_cache __PR((SCSI *scgp, BOOL immed)); -EXPORT int read_buffer __PR((SCSI *scgp, caddr_t bp, int cnt, int mode)); -EXPORT int write_buffer __PR((SCSI *scgp, char *buffer, long length, int mode, int bufferid, long offset)); -EXPORT int read_subchannel __PR((SCSI *scgp, caddr_t bp, int track, - int cnt, int msf, int subq, int fmt)); -EXPORT int read_toc __PR((SCSI *scgp, caddr_t, int, int, int, int)); -EXPORT int read_toc_philips __PR((SCSI *scgp, caddr_t, int, int, int, int)); -EXPORT int read_header __PR((SCSI *scgp, caddr_t, long, int, int)); -EXPORT int read_disk_info __PR((SCSI *scgp, caddr_t, int)); -EXPORT int read_track_info __PR((SCSI *scgp, caddr_t, int type, int addr, int cnt)); -EXPORT int get_trackinfo __PR((SCSI *scgp, caddr_t, int type, int addr, int cnt)); -EXPORT int read_rzone_info __PR((SCSI *scgp, caddr_t bp, int cnt)); -EXPORT int reserve_tr_rzone __PR((SCSI *scgp, long size)); -EXPORT int read_dvd_structure __PR((SCSI *scgp, caddr_t bp, int cnt, int mt, int addr, int layer, int fmt)); -EXPORT int send_dvd_structure __PR((SCSI *scgp, caddr_t bp, int cnt, int fmt)); -EXPORT int send_opc __PR((SCSI *scgp, caddr_t, int cnt, int doopc)); -EXPORT int read_track_info_philips __PR((SCSI *scgp, caddr_t, int, int)); -EXPORT int scsi_close_tr_session __PR((SCSI *scgp, int type, int track, BOOL immed)); -EXPORT int read_master_cue __PR((SCSI *scgp, caddr_t bp, int sheet, int cnt)); -EXPORT int send_cue_sheet __PR((SCSI *scgp, caddr_t bp, long size)); -EXPORT int read_buff_cap __PR((SCSI *scgp, long *, long *)); -EXPORT int scsi_blank __PR((SCSI *scgp, long addr, int blanktype, BOOL immed)); -EXPORT BOOL allow_atapi __PR((SCSI *scgp, BOOL new)); -EXPORT int mode_select __PR((SCSI *scgp, Uchar *, int, int, int)); -EXPORT int mode_sense __PR((SCSI *scgp, Uchar *dp, int cnt, int page, int pcf)); -EXPORT int mode_select_sg0 __PR((SCSI *scgp, Uchar *, int, int, int)); -EXPORT int mode_sense_sg0 __PR((SCSI *scgp, Uchar *dp, int cnt, int page, int pcf)); -EXPORT int mode_select_g0 __PR((SCSI *scgp, Uchar *, int, int, int)); -EXPORT int mode_select_g1 __PR((SCSI *scgp, Uchar *, int, int, int)); -EXPORT int mode_sense_g0 __PR((SCSI *scgp, Uchar *dp, int cnt, int page, int pcf)); -EXPORT int mode_sense_g1 __PR((SCSI *scgp, Uchar *dp, int cnt, int page, int pcf)); -EXPORT int read_tochdr __PR((SCSI *scgp, cdr_t *, int *, int *)); -EXPORT int read_cdtext __PR((SCSI *scgp)); -EXPORT int read_trackinfo __PR((SCSI *scgp, int, long *, struct msf *, int *, int *, int *)); -EXPORT int read_B0 __PR((SCSI *scgp, BOOL isbcd, long *b0p, long *lop)); -EXPORT int read_session_offset __PR((SCSI *scgp, long *)); -EXPORT int read_session_offset_philips __PR((SCSI *scgp, long *)); -EXPORT int sense_secsize __PR((SCSI *scgp, int current)); -EXPORT int select_secsize __PR((SCSI *scgp, int)); -EXPORT BOOL is_cddrive __PR((SCSI *scgp)); -EXPORT BOOL is_unknown_dev __PR((SCSI *scgp)); -EXPORT int read_scsi __PR((SCSI *scgp, caddr_t, long, int)); -EXPORT int read_g0 __PR((SCSI *scgp, caddr_t, long, int)); -EXPORT int read_g1 __PR((SCSI *scgp, caddr_t, long, int)); -EXPORT BOOL getdev __PR((SCSI *scgp, BOOL)); -EXPORT void printinq __PR((SCSI *scgp, FILE *f)); -EXPORT void printdev __PR((SCSI *scgp)); -EXPORT BOOL do_inquiry __PR((SCSI *scgp, BOOL)); -EXPORT BOOL recovery_needed __PR((SCSI *scgp, cdr_t *)); -EXPORT int scsi_load __PR((SCSI *scgp, cdr_t *)); -EXPORT int scsi_unload __PR((SCSI *scgp, cdr_t *)); -EXPORT int scsi_cdr_write __PR((SCSI *scgp, caddr_t bp, long sectaddr, long size, int blocks, BOOL islast)); -EXPORT struct cd_mode_page_2A * mmc_cap __PR((SCSI *scgp, Uchar *modep)); -EXPORT void mmc_getval __PR((struct cd_mode_page_2A *mp, - BOOL *cdrrp, BOOL *cdwrp, - BOOL *cdrrwp, BOOL *cdwrwp, - BOOL *dvdp, BOOL *dvdwp)); -EXPORT BOOL is_mmc __PR((SCSI *scgp, BOOL *cdwp, BOOL *dvdwp)); -EXPORT BOOL mmc_check __PR((SCSI *scgp, BOOL *cdrrp, BOOL *cdwrp, - BOOL *cdrrwp, BOOL *cdwrwp, - BOOL *dvdp, BOOL *dvdwp)); -LOCAL void print_speed __PR((char *fmt, int val)); -EXPORT void print_capabilities __PR((SCSI *scgp)); -extern int verify __PR((SCSI *scgp, long start, int count, long *bad_block)); - -EXPORT BOOL -unit_ready(scgp) - SCSI *scgp; -{ - register struct scg_cmd *scmd = scgp->scmd; - - if (test_unit_ready(scgp) >= 0) /* alles OK */ - return (TRUE); - else if (scmd->error >= SCG_FATAL) /* nicht selektierbar */ - return (FALSE); - - if (scg_sense_key(scgp) == SC_UNIT_ATTENTION) { - if (test_unit_ready(scgp) >= 0) /* alles OK */ - return (TRUE); - } - if ((scg_cmd_status(scgp) & ST_BUSY) != 0) { - /* - * Busy/reservation_conflict - */ - usleep(500000); - if (test_unit_ready(scgp) >= 0) /* alles OK */ - return (TRUE); - } - if (scg_sense_key(scgp) == -1) { /* non extended Sense */ - if (scg_sense_code(scgp) == 4) /* NOT_READY */ - return (FALSE); - return (TRUE); - } - /* FALSE wenn NOT_READY */ - return (scg_sense_key(scgp) != SC_NOT_READY); -} - -EXPORT BOOL -wait_unit_ready(scgp, secs) - SCSI *scgp; - int secs; -{ - int i; - int c; - int k; - int ret; - int err; - - seterrno(0); - scgp->silent++; - ret = test_unit_ready(scgp); /* eat up unit attention */ - if (ret < 0) { - err = geterrno(); - - if (err == EPERM || err == EACCES) { - scgp->silent--; - return (FALSE); - } - ret = test_unit_ready(scgp); /* got power on condition? */ - } - scgp->silent--; - - if (ret >= 0) /* success that's enough */ - return (TRUE); - - scgp->silent++; - for (i = 0; i < secs && (ret = test_unit_ready(scgp)) < 0; i++) { - if (scgp->scmd->scb.busy != 0) { - sleep(1); - continue; - } - c = scg_sense_code(scgp); - k = scg_sense_key(scgp); - /* - * Abort quickly if it does not make sense to wait. - * 0x30 == Cannot read medium - * 0x3A == Medium not present - */ - if ((k == SC_NOT_READY && (c == 0x3A || c == 0x30)) || - (k == SC_MEDIUM_ERROR)) { - if (scgp->silent <= 1) - scg_printerr(scgp); - scgp->silent--; - return (FALSE); - } - sleep(1); - } - scgp->silent--; - if (ret < 0) - return (FALSE); - return (TRUE); -} - -EXPORT BOOL -scsi_in_progress(scgp) - SCSI *scgp; -{ - if (scg_sense_key(scgp) == SC_NOT_READY && - /* - * Logigal unit not ready operation/long_write in progress - */ - scg_sense_code(scgp) == 0x04 && - (scg_sense_qual(scgp) == 0x04 || /* CyberDr. "format in progress"*/ - scg_sense_qual(scgp) == 0x07 || /* "operation in progress" */ - scg_sense_qual(scgp) == 0x08)) { /* "long write in progress" */ - return (TRUE); - } else { - if (scgp->silent <= 1) - scg_printerr(scgp); - } - return (FALSE); -} - -EXPORT BOOL -cdr_underrun(scgp) - SCSI *scgp; -{ - if ((scg_sense_key(scgp) != SC_ILLEGAL_REQUEST && - scg_sense_key(scgp) != SC_MEDIUM_ERROR)) - return (FALSE); - - if ((scg_sense_code(scgp) == 0x21 && - (scg_sense_qual(scgp) == 0x00 || /* logical block address out of range */ - scg_sense_qual(scgp) == 0x02)) || /* invalid address for write */ - - (scg_sense_code(scgp) == 0x0C && - scg_sense_qual(scgp) == 0x09)) { /* write error - loss of streaming */ - return (TRUE); - } - /* - * XXX Bei manchen Brennern kommt mach dem der Brennvorgang bereits - * XXX eine Weile gelaufen ist ein 5/24/0 Invalid field in CDB. - * XXX Daher sollte man testen ob schon geschrieben wurde... - */ - return (FALSE); -} - -EXPORT int -test_unit_ready(scgp) - SCSI *scgp; -{ - register struct scg_cmd *scmd = scgp->scmd; - - fillbytes((caddr_t)scmd, sizeof (*scmd), '\0'); - scmd->addr = (caddr_t)0; - scmd->size = 0; - scmd->flags = SCG_DISRE_ENA | (scgp->silent ? SCG_SILENT:0); - scmd->cdb_len = SC_G0_CDBLEN; - scmd->sense_len = CCS_SENSE_LEN; - scmd->cdb.g0_cdb.cmd = SC_TEST_UNIT_READY; - scmd->cdb.g0_cdb.lun = scg_lun(scgp); - - scgp->cmdname = "test unit ready"; - - return (scg_cmd(scgp)); -} - -EXPORT int -rezero_unit(scgp) - SCSI *scgp; -{ - register struct scg_cmd *scmd = scgp->scmd; - - fillbytes((caddr_t)scmd, sizeof (*scmd), '\0'); - scmd->addr = (caddr_t)0; - scmd->size = 0; - scmd->flags = SCG_DISRE_ENA; - scmd->cdb_len = SC_G0_CDBLEN; - scmd->sense_len = CCS_SENSE_LEN; - scmd->cdb.g0_cdb.cmd = SC_REZERO_UNIT; - scmd->cdb.g0_cdb.lun = scg_lun(scgp); - - scgp->cmdname = "rezero unit"; - - return (scg_cmd(scgp)); -} - -EXPORT int -request_sense(scgp) - SCSI *scgp; -{ - char sensebuf[CCS_SENSE_LEN]; - char *cmdsave; - - cmdsave = scgp->cmdname; - - if (request_sense_b(scgp, sensebuf, sizeof (sensebuf)) < 0) - return (-1); - scgp->cmdname = cmdsave; - scg_prsense((Uchar *)sensebuf, CCS_SENSE_LEN - scg_getresid(scgp)); - return (0); -} - -EXPORT int -request_sense_b(scgp, bp, cnt) - SCSI *scgp; - caddr_t bp; - int cnt; -{ - register struct scg_cmd *scmd = scgp->scmd; - - - fillbytes((caddr_t)scmd, sizeof (*scmd), '\0'); - scmd->addr = bp; - scmd->size = cnt; - scmd->flags = SCG_RECV_DATA|SCG_DISRE_ENA; - scmd->cdb_len = SC_G0_CDBLEN; - scmd->sense_len = CCS_SENSE_LEN; - scmd->cdb.g0_cdb.cmd = SC_REQUEST_SENSE; - scmd->cdb.g0_cdb.lun = scg_lun(scgp); - scmd->cdb.g0_cdb.count = cnt; - - scgp->cmdname = "request_sense"; - - if (scg_cmd(scgp) < 0) - return (-1); - return (0); -} - -EXPORT int -inquiry(scgp, bp, cnt) - SCSI *scgp; - caddr_t bp; - int cnt; -{ - register struct scg_cmd *scmd = scgp->scmd; - - fillbytes(bp, cnt, '\0'); - fillbytes((caddr_t)scmd, sizeof (*scmd), '\0'); - scmd->addr = bp; - scmd->size = cnt; - scmd->flags = SCG_RECV_DATA|SCG_DISRE_ENA; - scmd->cdb_len = SC_G0_CDBLEN; - scmd->sense_len = CCS_SENSE_LEN; - scmd->cdb.g0_cdb.cmd = SC_INQUIRY; - scmd->cdb.g0_cdb.lun = scg_lun(scgp); - scmd->cdb.g0_cdb.count = cnt; - - scgp->cmdname = "inquiry"; - - if (scg_cmd(scgp) < 0) - return (-1); - if (scgp->verbose) - scg_prbytes("Inquiry Data :", (Uchar *)bp, cnt - scg_getresid(scgp)); - return (0); -} - -EXPORT int -read_capacity(scgp) - SCSI *scgp; -{ - register struct scg_cmd *scmd = scgp->scmd; - - fillbytes((caddr_t)scmd, sizeof (*scmd), '\0'); - scmd->addr = (caddr_t)scgp->cap; - scmd->size = sizeof (struct scsi_capacity); - scmd->flags = SCG_RECV_DATA|SCG_DISRE_ENA; - scmd->cdb_len = SC_G1_CDBLEN; - scmd->sense_len = CCS_SENSE_LEN; - scmd->cdb.g1_cdb.cmd = 0x25; /* Read Capacity */ - scmd->cdb.g1_cdb.lun = scg_lun(scgp); - g1_cdblen(&scmd->cdb.g1_cdb, 0); /* Full Media */ - - scgp->cmdname = "read capacity"; - - if (scg_cmd(scgp) < 0) { - return (-1); - } else { - long cbsize; - long cbaddr; - - /* - * c_bsize & c_baddr are signed Int32_t - * so we use signed int conversion here. - */ - cbsize = a_to_4_byte(&scgp->cap->c_bsize); - cbaddr = a_to_4_byte(&scgp->cap->c_baddr); - scgp->cap->c_bsize = cbsize; - scgp->cap->c_baddr = cbaddr; - } - return (0); -} - -EXPORT void -print_capacity(scgp, f) - SCSI *scgp; - FILE *f; -{ - long kb; - long mb; - long prmb; - double dkb; - - dkb = (scgp->cap->c_baddr+1.0) * (scgp->cap->c_bsize/1024.0); - kb = dkb; - mb = dkb / 1024.0; - prmb = dkb / 1000.0 * 1.024; - fprintf(f, "Capacity: %ld Blocks = %ld kBytes = %ld MBytes = %ld prMB\n", - (long)scgp->cap->c_baddr+1, kb, mb, prmb); - fprintf(f, "Sectorsize: %ld Bytes\n", (long)scgp->cap->c_bsize); -} - -EXPORT int -scsi_load_unload(scgp, load) - SCSI *scgp; - int load; -{ - register struct scg_cmd *scmd = scgp->scmd; - - fillbytes((caddr_t)scmd, sizeof (*scmd), '\0'); - scmd->flags = SCG_DISRE_ENA; - scmd->cdb_len = SC_G5_CDBLEN; - scmd->sense_len = CCS_SENSE_LEN; - scmd->cdb.g5_cdb.cmd = 0xA6; - scmd->cdb.g5_cdb.lun = scg_lun(scgp); - scmd->cdb.g5_cdb.addr[1] = load?3:2; - scmd->cdb.g5_cdb.count[2] = 0; /* slot # */ - - scgp->cmdname = "medium load/unload"; - - if (scg_cmd(scgp) < 0) - return (-1); - return (0); -} - -EXPORT int -scsi_prevent_removal(scgp, prevent) - SCSI *scgp; - int prevent; -{ - register struct scg_cmd *scmd = scgp->scmd; - - fillbytes((caddr_t)scmd, sizeof (*scmd), '\0'); - scmd->flags = SCG_DISRE_ENA; - scmd->cdb_len = SC_G0_CDBLEN; - scmd->sense_len = CCS_SENSE_LEN; - scmd->cdb.g0_cdb.cmd = 0x1E; - scmd->cdb.g0_cdb.lun = scg_lun(scgp); - scmd->cdb.g0_cdb.count = prevent & 1; - - scgp->cmdname = "prevent/allow medium removal"; - - if (scg_cmd(scgp) < 0) - return (-1); - return (0); -} - - -EXPORT int -scsi_start_stop_unit(scgp, flg, loej, immed) - SCSI *scgp; - int flg; - int loej; - BOOL immed; -{ - register struct scg_cmd *scmd = scgp->scmd; - - fillbytes((caddr_t)scmd, sizeof (*scmd), '\0'); - scmd->flags = SCG_DISRE_ENA; - scmd->cdb_len = SC_G0_CDBLEN; - scmd->sense_len = CCS_SENSE_LEN; - scmd->cdb.g0_cdb.cmd = 0x1B; /* Start Stop Unit */ - scmd->cdb.g0_cdb.lun = scg_lun(scgp); - scmd->cdb.g0_cdb.count = (flg ? 1:0) | (loej ? 2:0); - - if (immed) - scmd->cdb.cmd_cdb[1] |= 0x01; - - scgp->cmdname = "start/stop unit"; - - return (scg_cmd(scgp)); -} - -EXPORT int -scsi_set_speed(scgp, readspeed, writespeed, rotctl) - SCSI *scgp; - int readspeed; - int writespeed; - int rotctl; -{ - register struct scg_cmd *scmd = scgp->scmd; - - fillbytes((caddr_t)scmd, sizeof (*scmd), '\0'); - scmd->flags = SCG_DISRE_ENA; - scmd->cdb_len = SC_G5_CDBLEN; - scmd->sense_len = CCS_SENSE_LEN; - scmd->cdb.g5_cdb.cmd = 0xBB; - scmd->cdb.g5_cdb.lun = scg_lun(scgp); - - if (readspeed < 0) - i_to_2_byte(&scmd->cdb.g5_cdb.addr[0], 0xFFFF); - else - i_to_2_byte(&scmd->cdb.g5_cdb.addr[0], readspeed); - if (writespeed < 0) - i_to_2_byte(&scmd->cdb.g5_cdb.addr[2], 0xFFFF); - else - i_to_2_byte(&scmd->cdb.g5_cdb.addr[2], writespeed); - - scmd->cdb.cmd_cdb[1] |= rotctl & 0x03; - - scgp->cmdname = "set cd speed"; - - if (scg_cmd(scgp) < 0) - return (-1); - return (0); -} - -EXPORT int -scsi_get_speed(scgp, readspeedp, writespeedp) - SCSI *scgp; - int *readspeedp; - int *writespeedp; -{ - struct cd_mode_page_2A *mp; - Uchar m[256]; - int val; - - scgp->silent++; - mp = mmc_cap(scgp, m); /* Get MMC capabilities in allocated mp */ - scgp->silent--; - if (mp == NULL) - return (-1); /* Pre SCSI-3/mmc drive */ - - val = a_to_u_2_byte(mp->cur_read_speed); - if (readspeedp) - *readspeedp = val; - - if (mp->p_len >= 28) - val = a_to_u_2_byte(mp->v3_cur_write_speed); - else - val = a_to_u_2_byte(mp->cur_write_speed); - if (writespeedp) - *writespeedp = val; - - return (0); -} - - -EXPORT int -qic02(scgp, cmd) - SCSI *scgp; - int cmd; -{ - register struct scg_cmd *scmd = scgp->scmd; - - fillbytes((caddr_t)scmd, sizeof (*scmd), '\0'); - scmd->addr = (caddr_t)0; - scmd->size = 0; - scmd->flags = SCG_DISRE_ENA; - scmd->cdb_len = SC_G0_CDBLEN; - scmd->sense_len = DEF_SENSE_LEN; - scmd->cdb.g0_cdb.cmd = 0x0D; /* qic02 Sysgen SC4000 */ - scmd->cdb.g0_cdb.lun = scg_lun(scgp); - scmd->cdb.g0_cdb.mid_addr = cmd; - - scgp->cmdname = "qic 02"; - return (scg_cmd(scgp)); -} - -#define G0_MAXADDR 0x1FFFFFL - -EXPORT int -write_xscsi(scgp, bp, addr, size, cnt) - SCSI *scgp; - caddr_t bp; /* address of buffer */ - long addr; /* disk address (sector) to put */ - long size; /* number of bytes to transfer */ - int cnt; /* sectorcount */ -{ - if (addr <= G0_MAXADDR) - return (write_xg0(scgp, bp, addr, size, cnt)); - else - return (write_xg1(scgp, bp, addr, size, cnt)); -} - -EXPORT int -write_xg0(scgp, bp, addr, size, cnt) - SCSI *scgp; - caddr_t bp; /* address of buffer */ - long addr; /* disk address (sector) to put */ - long size; /* number of bytes to transfer */ - int cnt; /* sectorcount */ -{ - register struct scg_cmd *scmd = scgp->scmd; - - fillbytes((caddr_t)scmd, sizeof (*scmd), '\0'); - scmd->addr = bp; - scmd->size = size; - scmd->flags = SCG_DISRE_ENA|SCG_CMD_RETRY; -/* scmd->flags = SCG_DISRE_ENA;*/ - scmd->cdb_len = SC_G0_CDBLEN; - scmd->sense_len = CCS_SENSE_LEN; - scmd->cdb.g0_cdb.cmd = SC_WRITE; - scmd->cdb.g0_cdb.lun = scg_lun(scgp); - g0_cdbaddr(&scmd->cdb.g0_cdb, addr); - scmd->cdb.g0_cdb.count = cnt; - - scgp->cmdname = "write_g0"; - - if (scg_cmd(scgp) < 0) - return (-1); - return (size - scg_getresid(scgp)); -} - -EXPORT int -write_xg1(scgp, bp, addr, size, cnt) - SCSI *scgp; - caddr_t bp; /* address of buffer */ - long addr; /* disk address (sector) to put */ - long size; /* number of bytes to transfer */ - int cnt; /* sectorcount */ -{ - register struct scg_cmd *scmd = scgp->scmd; - - fillbytes((caddr_t)scmd, sizeof (*scmd), '\0'); - scmd->addr = bp; - scmd->size = size; - scmd->flags = SCG_DISRE_ENA|SCG_CMD_RETRY; -/* scmd->flags = SCG_DISRE_ENA;*/ - scmd->cdb_len = SC_G1_CDBLEN; - scmd->sense_len = CCS_SENSE_LEN; - scmd->cdb.g1_cdb.cmd = SC_EWRITE; - scmd->cdb.g1_cdb.lun = scg_lun(scgp); - g1_cdbaddr(&scmd->cdb.g1_cdb, addr); - g1_cdblen(&scmd->cdb.g1_cdb, cnt); - - scgp->cmdname = "write_g1"; - - if (scg_cmd(scgp) < 0) - return (-1); - return (size - scg_getresid(scgp)); -} - -EXPORT int -write_xg5(scgp, bp, addr, size, cnt) - SCSI *scgp; - caddr_t bp; /* address of buffer */ - long addr; /* disk address (sector) to put */ - long size; /* number of bytes to transfer */ - int cnt; /* sectorcount */ -{ - register struct scg_cmd *scmd = scgp->scmd; - - fillbytes((caddr_t)scmd, sizeof (*scmd), '\0'); - scmd->addr = bp; - scmd->size = size; - scmd->flags = SCG_DISRE_ENA|SCG_CMD_RETRY; -/* scmd->flags = SCG_DISRE_ENA;*/ - scmd->cdb_len = SC_G5_CDBLEN; - scmd->sense_len = CCS_SENSE_LEN; - scmd->cdb.g5_cdb.cmd = 0xAA; - scmd->cdb.g5_cdb.lun = scg_lun(scgp); - g5_cdbaddr(&scmd->cdb.g5_cdb, addr); - g5_cdblen(&scmd->cdb.g5_cdb, cnt); - - scgp->cmdname = "write_g5"; - - if (scg_cmd(scgp) < 0) - return (-1); - return (size - scg_getresid(scgp)); -} - -EXPORT int -seek_scsi(scgp, addr) - SCSI *scgp; - long addr; -{ - if (addr <= G0_MAXADDR) - return (seek_g0(scgp, addr)); - else - return (seek_g1(scgp, addr)); -} - -EXPORT int -seek_g0(scgp, addr) - SCSI *scgp; - long addr; -{ - register struct scg_cmd *scmd = scgp->scmd; - - fillbytes((caddr_t)scmd, sizeof (*scmd), '\0'); - scmd->flags = SCG_DISRE_ENA; - scmd->cdb_len = SC_G0_CDBLEN; - scmd->sense_len = CCS_SENSE_LEN; - scmd->cdb.g0_cdb.cmd = 0x0B; /* Seek */ - scmd->cdb.g0_cdb.lun = scg_lun(scgp); - g0_cdbaddr(&scmd->cdb.g0_cdb, addr); - - scgp->cmdname = "seek_g0"; - - return (scg_cmd(scgp)); -} - -EXPORT int -seek_g1(scgp, addr) - SCSI *scgp; - long addr; -{ - register struct scg_cmd *scmd = scgp->scmd; - - fillbytes((caddr_t)scmd, sizeof (*scmd), '\0'); - scmd->flags = SCG_DISRE_ENA; - scmd->cdb_len = SC_G1_CDBLEN; - scmd->sense_len = CCS_SENSE_LEN; - scmd->cdb.g1_cdb.cmd = 0x2B; /* Seek G1 */ - scmd->cdb.g1_cdb.lun = scg_lun(scgp); - g1_cdbaddr(&scmd->cdb.g1_cdb, addr); - - scgp->cmdname = "seek_g1"; - - return (scg_cmd(scgp)); -} - -EXPORT int -scsi_flush_cache(scgp, immed) - SCSI *scgp; - BOOL immed; -{ - register struct scg_cmd *scmd = scgp->scmd; - - fillbytes((caddr_t)scmd, sizeof (*scmd), '\0'); - scmd->flags = SCG_DISRE_ENA; - scmd->cdb_len = SC_G1_CDBLEN; - scmd->sense_len = CCS_SENSE_LEN; - scmd->timeout = 2 * 60; /* Max: sizeof (CDR-cache)/150KB/s */ - scmd->cdb.g1_cdb.cmd = 0x35; - scmd->cdb.g1_cdb.lun = scg_lun(scgp); - - if (immed) - scmd->cdb.cmd_cdb[1] |= 0x02; - - scgp->cmdname = "flush cache"; - - if (scg_cmd(scgp) < 0) - return (-1); - return (0); -} - -EXPORT int -read_buffer(scgp, bp, cnt, mode) - SCSI *scgp; - caddr_t bp; - int cnt; - int mode; -{ - register struct scg_cmd *scmd = scgp->scmd; - - fillbytes((caddr_t)scmd, sizeof (*scmd), '\0'); - scmd->addr = bp; - scmd->size = cnt; - scmd->dma_read = 1; - scmd->cdb_len = SC_G1_CDBLEN; - scmd->sense_len = CCS_SENSE_LEN; - scmd->cdb.g1_cdb.cmd = 0x3C; /* Read Buffer */ - scmd->cdb.g1_cdb.lun = scg_lun(scgp); - scmd->cdb.cmd_cdb[1] |= (mode & 7); - g1_cdblen(&scmd->cdb.g1_cdb, cnt); - - scgp->cmdname = "read buffer"; - - return (scg_cmd(scgp)); -} - -EXPORT int -write_buffer(scgp, buffer, length, mode, bufferid, offset) - SCSI *scgp; - char *buffer; - long length; - int mode; - int bufferid; - long offset; -{ - register struct scg_cmd *scmd = scgp->scmd; - char *cdb; - - fillbytes((caddr_t)scmd, sizeof (*scmd), '\0'); - scmd->addr = buffer; - scmd->size = length; - scmd->flags = SCG_DISRE_ENA|SCG_CMD_RETRY; - scmd->cdb_len = SC_G1_CDBLEN; - scmd->sense_len = CCS_SENSE_LEN; - - cdb = (char *)scmd->cdb.cmd_cdb; - - cdb[0] = 0x3B; - cdb[1] = mode & 7; - cdb[2] = bufferid; - cdb[3] = offset >> 16; - cdb[4] = (offset >> 8) & 0xff; - cdb[5] = offset & 0xff; - cdb[6] = length >> 16; - cdb[7] = (length >> 8) & 0xff; - cdb[8] = length & 0xff; - - scgp->cmdname = "write_buffer"; - - if (scg_cmd(scgp) >= 0) - return (1); - return (0); -} - -EXPORT int -read_subchannel(scgp, bp, track, cnt, msf, subq, fmt) - SCSI *scgp; - caddr_t bp; - int track; - int cnt; - int msf; - int subq; - int fmt; - -{ - register struct scg_cmd *scmd = scgp->scmd; - - fillbytes((caddr_t)scmd, sizeof (*scmd), '\0'); - scmd->addr = bp; - scmd->size = cnt; - scmd->flags = SCG_RECV_DATA|SCG_DISRE_ENA; - scmd->cdb_len = SC_G1_CDBLEN; - scmd->sense_len = CCS_SENSE_LEN; - scmd->cdb.g1_cdb.cmd = 0x42; - scmd->cdb.g1_cdb.lun = scg_lun(scgp); - if (msf) - scmd->cdb.g1_cdb.res = 1; - if (subq) - scmd->cdb.g1_cdb.addr[0] = 0x40; - scmd->cdb.g1_cdb.addr[1] = fmt; - scmd->cdb.g1_cdb.res6 = track; - g1_cdblen(&scmd->cdb.g1_cdb, cnt); - - scgp->cmdname = "read subchannel"; - - if (scg_cmd(scgp) < 0) - return (-1); - return (0); -} - -EXPORT int -read_toc(scgp, bp, track, cnt, msf, fmt) - SCSI *scgp; - caddr_t bp; - int track; - int cnt; - int msf; - int fmt; - -{ - register struct scg_cmd *scmd = scgp->scmd; - - fillbytes((caddr_t)scmd, sizeof (*scmd), '\0'); - scmd->addr = bp; - scmd->size = cnt; - scmd->flags = SCG_RECV_DATA|SCG_DISRE_ENA; - scmd->cdb_len = SC_G1_CDBLEN; - scmd->sense_len = CCS_SENSE_LEN; - scmd->cdb.g1_cdb.cmd = 0x43; - scmd->cdb.g1_cdb.lun = scg_lun(scgp); - if (msf) - scmd->cdb.g1_cdb.res = 1; - scmd->cdb.g1_cdb.addr[0] = fmt & 0x0F; - scmd->cdb.g1_cdb.res6 = track; - g1_cdblen(&scmd->cdb.g1_cdb, cnt); - - scgp->cmdname = "read toc"; - - if (scg_cmd(scgp) < 0) - return (-1); - return (0); -} - -EXPORT int -read_toc_philips(scgp, bp, track, cnt, msf, fmt) - SCSI *scgp; - caddr_t bp; - int track; - int cnt; - int msf; - int fmt; - -{ - register struct scg_cmd *scmd = scgp->scmd; - - fillbytes((caddr_t)scmd, sizeof (*scmd), '\0'); - scmd->addr = bp; - scmd->size = cnt; - scmd->flags = SCG_RECV_DATA|SCG_DISRE_ENA; - scmd->cdb_len = SC_G1_CDBLEN; - scmd->sense_len = CCS_SENSE_LEN; - scmd->timeout = 4 * 60; /* May last 174s on a TEAC CD-R55S */ - scmd->cdb.g1_cdb.cmd = 0x43; - scmd->cdb.g1_cdb.lun = scg_lun(scgp); - if (msf) - scmd->cdb.g1_cdb.res = 1; - scmd->cdb.g1_cdb.res6 = track; - g1_cdblen(&scmd->cdb.g1_cdb, cnt); - - if (fmt & 1) - scmd->cdb.g1_cdb.vu_96 = 1; - if (fmt & 2) - scmd->cdb.g1_cdb.vu_97 = 1; - - scgp->cmdname = "read toc"; - - if (scg_cmd(scgp) < 0) - return (-1); - return (0); -} - -EXPORT int -read_header(scgp, bp, addr, cnt, msf) - SCSI *scgp; - caddr_t bp; - long addr; - int cnt; - int msf; -{ - register struct scg_cmd *scmd = scgp->scmd; - - fillbytes((caddr_t)scmd, sizeof (*scmd), '\0'); - scmd->addr = bp; - scmd->size = cnt; - scmd->flags = SCG_RECV_DATA|SCG_DISRE_ENA; - scmd->cdb_len = SC_G1_CDBLEN; - scmd->sense_len = CCS_SENSE_LEN; - scmd->cdb.g1_cdb.cmd = 0x44; - scmd->cdb.g1_cdb.lun = scg_lun(scgp); - if (msf) - scmd->cdb.g1_cdb.res = 1; - g1_cdbaddr(&scmd->cdb.g1_cdb, addr); - g1_cdblen(&scmd->cdb.g1_cdb, cnt); - - scgp->cmdname = "read header"; - - if (scg_cmd(scgp) < 0) - return (-1); - return (0); -} - -EXPORT int -read_disk_info(scgp, bp, cnt) - SCSI *scgp; - caddr_t bp; - int cnt; - -{ - register struct scg_cmd *scmd = scgp->scmd; - - fillbytes((caddr_t)scmd, sizeof (*scmd), '\0'); - scmd->addr = bp; - scmd->size = cnt; - scmd->flags = SCG_RECV_DATA|SCG_DISRE_ENA; - scmd->cdb_len = SC_G1_CDBLEN; - scmd->sense_len = CCS_SENSE_LEN; - scmd->timeout = 4 * 60; /* Needs up to 2 minutes */ - scmd->cdb.g1_cdb.cmd = 0x51; - scmd->cdb.g1_cdb.lun = scg_lun(scgp); - g1_cdblen(&scmd->cdb.g1_cdb, cnt); - - scgp->cmdname = "read disk info"; - - if (scg_cmd(scgp) < 0) - return (-1); - return (0); -} - -EXPORT int -read_track_info(scgp, bp, type, addr, cnt) - SCSI *scgp; - caddr_t bp; - int type; - int addr; - int cnt; - -{ - register struct scg_cmd *scmd = scgp->scmd; - - fillbytes((caddr_t)scmd, sizeof (*scmd), '\0'); - scmd->addr = bp; - scmd->size = cnt; - scmd->flags = SCG_RECV_DATA|SCG_DISRE_ENA; - scmd->cdb_len = SC_G1_CDBLEN; - scmd->sense_len = CCS_SENSE_LEN; - scmd->timeout = 4 * 60; /* Needs up to 2 minutes */ - scmd->cdb.g1_cdb.cmd = 0x52; - scmd->cdb.g1_cdb.lun = scg_lun(scgp); -/* scmd->cdb.cmd_cdb[1] = type & 0x03;*/ - scmd->cdb.cmd_cdb[1] = type; - g1_cdbaddr(&scmd->cdb.g1_cdb, addr); /* LBA/Track/Session */ - g1_cdblen(&scmd->cdb.g1_cdb, cnt); - - scgp->cmdname = "read track info"; - - if (scg_cmd(scgp) < 0) - return (-1); - return (0); -} - -EXPORT int -get_trackinfo(scgp, bp, type, addr, cnt) - SCSI *scgp; - caddr_t bp; - int type; - int addr; - int cnt; -{ - int len; - int ret; - - fillbytes(bp, cnt, '\0'); - - /* - * Used to be 2 instead of 4 (now). But some Y2k ATAPI drives as used - * by IOMEGA create a DMA overrun if we try to transfer only 2 bytes. - */ - if (read_track_info(scgp, bp, type, addr, 4) < 0) - return (-1); - - len = a_to_u_2_byte(bp); - len += 2; - if (len > cnt) - len = cnt; - ret = read_track_info(scgp, bp, type, addr, len); - -#ifdef DEBUG - if (lverbose > 1) - scg_prbytes("Track info:", (Uchar *)bp, - len-scg_getresid(scgp)); -#endif - return (ret); -} - -EXPORT int -read_rzone_info(scgp, bp, cnt) - SCSI *scgp; - caddr_t bp; - int cnt; -{ - return (get_trackinfo(scgp, bp, TI_TYPE_LBA, 0, cnt)); -} - -EXPORT int -reserve_tr_rzone(scgp, size) - SCSI *scgp; - long size; /* number of blocks */ -{ - register struct scg_cmd *scmd = scgp->scmd; - - fillbytes((caddr_t)scmd, sizeof (*scmd), '\0'); - scmd->addr = (caddr_t)0; - scmd->size = 0; - scmd->flags = SCG_DISRE_ENA|SCG_CMD_RETRY; - scmd->cdb_len = SC_G1_CDBLEN; - scmd->sense_len = CCS_SENSE_LEN; - scmd->cdb.g1_cdb.cmd = 0x53; - scmd->cdb.g1_cdb.lun = scg_lun(scgp); - - i_to_4_byte(&scmd->cdb.g1_cdb.addr[3], size); - - scgp->cmdname = "reserve_track_rzone"; - - if (scg_cmd(scgp) < 0) - return (-1); - return (0); -} - -EXPORT int -read_dvd_structure(scgp, bp, cnt, mt, addr, layer, fmt) - SCSI *scgp; - caddr_t bp; - int cnt; - int mt; - int addr; - int layer; - int fmt; -{ - register struct scg_cmd *scmd = scgp->scmd; - - fillbytes((caddr_t)scmd, sizeof (*scmd), '\0'); - scmd->addr = bp; - scmd->size = cnt; - scmd->flags = SCG_RECV_DATA|SCG_DISRE_ENA; - scmd->cdb_len = SC_G5_CDBLEN; - scmd->sense_len = CCS_SENSE_LEN; - scmd->timeout = 4 * 60; /* Needs up to 2 minutes ??? */ - scmd->cdb.g5_cdb.cmd = 0xAD; - scmd->cdb.g5_cdb.lun = scg_lun(scgp); - scmd->cdb.cmd_cdb[1] |= (mt & 0x0F); /* Media Type */ - g5_cdbaddr(&scmd->cdb.g5_cdb, addr); - g5_cdblen(&scmd->cdb.g5_cdb, cnt); - scmd->cdb.g5_cdb.count[0] = layer; - scmd->cdb.g5_cdb.count[1] = fmt; - - scgp->cmdname = "read dvd structure"; - - if (scg_cmd(scgp) < 0) - return (-1); - return (0); -} - -EXPORT int -send_dvd_structure(scgp, bp, cnt, fmt) - SCSI *scgp; - caddr_t bp; - int cnt; - int fmt; -{ - register struct scg_cmd *scmd = scgp->scmd; - - fillbytes((caddr_t)scmd, sizeof (*scmd), '\0'); - scmd->addr = bp; - scmd->size = cnt; - scmd->flags = SCG_DISRE_ENA; - scmd->cdb_len = SC_G5_CDBLEN; - scmd->sense_len = CCS_SENSE_LEN; - scmd->timeout = 4 * 60; /* Needs up to 2 minutes ??? */ - scmd->cdb.g5_cdb.cmd = 0xBF; - scmd->cdb.g5_cdb.lun = scg_lun(scgp); - g5_cdblen(&scmd->cdb.g5_cdb, cnt); - scmd->cdb.g5_cdb.count[0] = 0; - scmd->cdb.g5_cdb.count[1] = fmt; - - scgp->cmdname = "send dvd structure"; - - if (scg_cmd(scgp) < 0) - return (-1); - return (0); -} - -EXPORT int -send_opc(scgp, bp, cnt, doopc) - SCSI *scgp; - caddr_t bp; - int cnt; - int doopc; -{ - register struct scg_cmd *scmd = scgp->scmd; - - fillbytes((caddr_t)scmd, sizeof (*scmd), '\0'); - scmd->addr = bp; - scmd->size = cnt; - scmd->flags = SCG_DISRE_ENA; - scmd->cdb_len = SC_G1_CDBLEN; - scmd->sense_len = CCS_SENSE_LEN; - scmd->timeout = 60; - scmd->cdb.g1_cdb.cmd = 0x54; - scmd->cdb.g1_cdb.lun = scg_lun(scgp); - scmd->cdb.g1_cdb.reladr = doopc?1:0; - g1_cdblen(&scmd->cdb.g1_cdb, cnt); - - scgp->cmdname = "send opc"; - - if (scg_cmd(scgp) < 0) - return (-1); - return (0); -} - -EXPORT int -read_track_info_philips(scgp, bp, track, cnt) - SCSI *scgp; - caddr_t bp; - int track; - int cnt; - -{ - register struct scg_cmd *scmd = scgp->scmd; - - fillbytes((caddr_t)scmd, sizeof (*scmd), '\0'); - scmd->addr = bp; - scmd->size = cnt; - scmd->flags = SCG_RECV_DATA|SCG_DISRE_ENA; - scmd->cdb_len = SC_G1_CDBLEN; - scmd->sense_len = CCS_SENSE_LEN; - scmd->cdb.g1_cdb.cmd = 0xE5; - scmd->cdb.g1_cdb.lun = scg_lun(scgp); - g1_cdbaddr(&scmd->cdb.g1_cdb, track); - g1_cdblen(&scmd->cdb.g1_cdb, cnt); - - scgp->cmdname = "read track info"; - - if (scg_cmd(scgp) < 0) - return (-1); - return (0); -} - -EXPORT int -scsi_close_tr_session(scgp, type, track, immed) - SCSI *scgp; - int type; - int track; - BOOL immed; -{ - register struct scg_cmd *scmd = scgp->scmd; - - fillbytes((caddr_t)scmd, sizeof (*scmd), '\0'); - scmd->flags = SCG_DISRE_ENA; - scmd->cdb_len = SC_G1_CDBLEN; - scmd->sense_len = CCS_SENSE_LEN; - scmd->timeout = 8 * 60; /* Needs up to 4 minutes */ - scmd->cdb.g1_cdb.cmd = 0x5B; - scmd->cdb.g1_cdb.lun = scg_lun(scgp); - scmd->cdb.g1_cdb.addr[0] = type; - scmd->cdb.g1_cdb.addr[3] = track; - - if (immed) - scmd->cdb.g1_cdb.reladr = 1; -/* scmd->cdb.cmd_cdb[1] |= 0x01;*/ -#ifdef nono - scmd->cdb.g1_cdb.reladr = 1; /* IMM hack to test Mitsumi behaviour*/ -#endif - - scgp->cmdname = "close track/session"; - - if (scg_cmd(scgp) < 0) - return (-1); - return (0); -} - -EXPORT int -read_master_cue(scgp, bp, sheet, cnt) - SCSI *scgp; - caddr_t bp; /* address of master cue sheet */ - int sheet; /* Sheet number */ - int cnt; /* Transfer count */ -{ - register struct scg_cmd *scmd = scgp->scmd; - - fillbytes((caddr_t)scmd, sizeof (*scmd), '\0'); - scmd->addr = bp; - scmd->size = cnt; - scmd->flags = SCG_RECV_DATA|SCG_DISRE_ENA; - scmd->cdb_len = SC_G1_CDBLEN; - scmd->sense_len = CCS_SENSE_LEN; - scmd->cdb.g1_cdb.cmd = 0x59; /* Read master cue */ - scmd->cdb.g1_cdb.lun = scg_lun(scgp); - scmd->cdb.g1_cdb.addr[2] = sheet; - g1_cdblen(&scmd->cdb.g1_cdb, cnt); - - scgp->cmdname = "read master cue"; - - if (scg_cmd(scgp) < 0) - return (-1); - return (0); -} - -EXPORT int -send_cue_sheet(scgp, bp, size) - SCSI *scgp; - caddr_t bp; /* address of cue sheet buffer */ - long size; /* number of bytes to transfer */ -{ - register struct scg_cmd *scmd = scgp->scmd; - - fillbytes((caddr_t)scmd, sizeof (*scmd), '\0'); - scmd->addr = bp; - scmd->size = size; - scmd->flags = SCG_DISRE_ENA; - scmd->cdb_len = SC_G1_CDBLEN; - scmd->sense_len = CCS_SENSE_LEN; - scmd->cdb.g1_cdb.cmd = 0x5D; /* Send CUE sheet */ - scmd->cdb.g1_cdb.lun = scg_lun(scgp); - g1_cdblen(&scmd->cdb.g1_cdb, size); - - scgp->cmdname = "send_cue_sheet"; - - if (scg_cmd(scgp) < 0) - return (-1); - return (size - scmd->resid); -} - -EXPORT int -read_buff_cap(scgp, sp, fp) - SCSI *scgp; - long *sp; /* Size pointer */ - long *fp; /* Free pointer */ -{ - char resp[12]; - Ulong freespace; - Ulong bufsize; - int per; - register struct scg_cmd *scmd = scgp->scmd; - - fillbytes((caddr_t)scmd, sizeof (*scmd), '\0'); - scmd->addr = (caddr_t)resp; - scmd->size = sizeof (resp); - scmd->flags = SCG_RECV_DATA|SCG_DISRE_ENA; - scmd->cdb_len = SC_G1_CDBLEN; - scmd->sense_len = CCS_SENSE_LEN; - scmd->cdb.g1_cdb.cmd = 0x5C; /* Read buffer cap */ - scmd->cdb.g1_cdb.lun = scg_lun(scgp); - g1_cdblen(&scmd->cdb.g1_cdb, sizeof (resp)); - - scgp->cmdname = "read buffer cap"; - - if (scg_cmd(scgp) < 0) - return (-1); - - bufsize = a_to_u_4_byte(&resp[4]); - freespace = a_to_u_4_byte(&resp[8]); - if (sp) - *sp = bufsize; - if (fp) - *fp = freespace; - - if (scgp->verbose || (sp == 0 && fp == 0)) - printf("BFree: %ld K BSize: %ld K\n", freespace >> 10, bufsize >> 10); - - if (bufsize == 0) - return (0); - per = (100 * (bufsize - freespace)) / bufsize; - if (per < 0) - return (0); - if (per > 100) - return (100); - return (per); -} - -EXPORT int -scsi_blank(scgp, addr, blanktype, immed) - SCSI *scgp; - long addr; - int blanktype; - BOOL immed; -{ - register struct scg_cmd *scmd = scgp->scmd; - - fillbytes((caddr_t)scmd, sizeof (*scmd), '\0'); - scmd->flags = SCG_DISRE_ENA; - scmd->cdb_len = SC_G5_CDBLEN; - scmd->sense_len = CCS_SENSE_LEN; - scmd->timeout = 160 * 60; /* full blank at 1x could take 80 minutes */ - scmd->cdb.g5_cdb.cmd = 0xA1; /* Blank */ - scmd->cdb.g0_cdb.high_addr = blanktype; - g1_cdbaddr(&scmd->cdb.g5_cdb, addr); - - if (immed) - scmd->cdb.g5_cdb.res |= 8; -/* scmd->cdb.cmd_cdb[1] |= 0x10;*/ - - scgp->cmdname = "blank unit"; - - return (scg_cmd(scgp)); -} - -/* - * XXX First try to handle ATAPI: - * XXX ATAPI cannot handle SCSI 6 byte commands. - * XXX We try to simulate 6 byte mode sense/select. - */ -LOCAL BOOL is_atapi; - -EXPORT BOOL -allow_atapi(scgp, new) - SCSI *scgp; - BOOL new; -{ - BOOL old = is_atapi; - Uchar mode[256]; - - if (new == old) - return (old); - - scgp->silent++; - /* - * If a bad drive has been reset before, we may need to fire up two - * test unit ready commands to clear status. - */ - (void) unit_ready(scgp); - if (new && - mode_sense_g1(scgp, mode, 8, 0x3F, 0) < 0) { /* All pages current */ - new = FALSE; - } - scgp->silent--; - - is_atapi = new; - return (old); -} - -EXPORT int -mode_select(scgp, dp, cnt, smp, pf) - SCSI *scgp; - Uchar *dp; - int cnt; - int smp; - int pf; -{ - if (is_atapi) - return (mode_select_sg0(scgp, dp, cnt, smp, pf)); - return (mode_select_g0(scgp, dp, cnt, smp, pf)); -} - -EXPORT int -mode_sense(scgp, dp, cnt, page, pcf) - SCSI *scgp; - Uchar *dp; - int cnt; - int page; - int pcf; -{ - if (is_atapi) - return (mode_sense_sg0(scgp, dp, cnt, page, pcf)); - return (mode_sense_g0(scgp, dp, cnt, page, pcf)); -} - -/* - * Simulate mode select g0 with mode select g1. - */ -EXPORT int -mode_select_sg0(scgp, dp, cnt, smp, pf) - SCSI *scgp; - Uchar *dp; - int cnt; - int smp; - int pf; -{ - Uchar xmode[256+4]; - int amt = cnt; - - if (amt < 1 || amt > 255) { - /* XXX clear SCSI error codes ??? */ - return (-1); - } - - if (amt < 4) { /* Data length. medium type & VU */ - amt += 1; - } else { - amt += 4; - movebytes(&dp[4], &xmode[8], cnt-4); - } - xmode[0] = 0; - xmode[1] = 0; - xmode[2] = dp[1]; - xmode[3] = dp[2]; - xmode[4] = 0; - xmode[5] = 0; - i_to_2_byte(&xmode[6], (unsigned int)dp[3]); - - if (scgp->verbose) scg_prbytes("Mode Parameters (un-converted)", dp, cnt); - - return (mode_select_g1(scgp, xmode, amt, smp, pf)); -} - -/* - * Simulate mode sense g0 with mode sense g1. - */ -EXPORT int -mode_sense_sg0(scgp, dp, cnt, page, pcf) - SCSI *scgp; - Uchar *dp; - int cnt; - int page; - int pcf; -{ - Uchar xmode[256+4]; - int amt = cnt; - int len; - - if (amt < 1 || amt > 255) { - /* XXX clear SCSI error codes ??? */ - return (-1); - } - - fillbytes((caddr_t)xmode, sizeof (xmode), '\0'); - if (amt < 4) { /* Data length. medium type & VU */ - amt += 1; - } else { - amt += 4; - } - if (mode_sense_g1(scgp, xmode, amt, page, pcf) < 0) - return (-1); - - amt = cnt - scg_getresid(scgp); -/* - * For tests: Solaris 8 & LG CD-ROM always returns resid == amt - */ -/* amt = cnt;*/ - if (amt > 4) - movebytes(&xmode[8], &dp[4], amt-4); - len = a_to_u_2_byte(xmode); - if (len == 0) { - dp[0] = 0; - } else if (len < 6) { - if (len > 2) - len = 2; - dp[0] = len; - } else { - dp[0] = len - 3; - } - dp[1] = xmode[2]; - dp[2] = xmode[3]; - len = a_to_u_2_byte(&xmode[6]); - dp[3] = len; - - if (scgp->verbose) scg_prbytes("Mode Sense Data (converted)", dp, amt); - return (0); -} - -EXPORT int -mode_select_g0(scgp, dp, cnt, smp, pf) - SCSI *scgp; - Uchar *dp; - int cnt; - int smp; - int pf; -{ - register struct scg_cmd *scmd = scgp->scmd; - - fillbytes((caddr_t)scmd, sizeof (*scmd), '\0'); - scmd->addr = (caddr_t)dp; - scmd->size = cnt; - scmd->flags = SCG_DISRE_ENA; - scmd->cdb_len = SC_G0_CDBLEN; - scmd->sense_len = CCS_SENSE_LEN; - scmd->cdb.g0_cdb.cmd = SC_MODE_SELECT; - scmd->cdb.g0_cdb.lun = scg_lun(scgp); - scmd->cdb.g0_cdb.high_addr = smp ? 1 : 0 | pf ? 0x10 : 0; - scmd->cdb.g0_cdb.count = cnt; - - if (scgp->verbose) { - error("%s ", smp?"Save":"Set "); - scg_prbytes("Mode Parameters", dp, cnt); - } - - scgp->cmdname = "mode select g0"; - - return (scg_cmd(scgp)); -} - -EXPORT int -mode_select_g1(scgp, dp, cnt, smp, pf) - SCSI *scgp; - Uchar *dp; - int cnt; - int smp; - int pf; -{ - register struct scg_cmd *scmd = scgp->scmd; - - fillbytes((caddr_t)scmd, sizeof (*scmd), '\0'); - scmd->addr = (caddr_t)dp; - scmd->size = cnt; - scmd->flags = SCG_DISRE_ENA; - scmd->cdb_len = SC_G1_CDBLEN; - scmd->sense_len = CCS_SENSE_LEN; - scmd->cdb.g1_cdb.cmd = 0x55; - scmd->cdb.g1_cdb.lun = scg_lun(scgp); - scmd->cdb.g0_cdb.high_addr = smp ? 1 : 0 | pf ? 0x10 : 0; - g1_cdblen(&scmd->cdb.g1_cdb, cnt); - - if (scgp->verbose) { - printf("%s ", smp?"Save":"Set "); - scg_prbytes("Mode Parameters", dp, cnt); - } - - scgp->cmdname = "mode select g1"; - - return (scg_cmd(scgp)); -} - -EXPORT int -mode_sense_g0(scgp, dp, cnt, page, pcf) - SCSI *scgp; - Uchar *dp; - int cnt; - int page; - int pcf; -{ - register struct scg_cmd *scmd = scgp->scmd; - - fillbytes((caddr_t)scmd, sizeof (*scmd), '\0'); - scmd->addr = (caddr_t)dp; - scmd->size = 0xFF; - scmd->size = cnt; - scmd->flags = SCG_RECV_DATA|SCG_DISRE_ENA; - scmd->cdb_len = SC_G0_CDBLEN; - scmd->sense_len = CCS_SENSE_LEN; - scmd->cdb.g0_cdb.cmd = SC_MODE_SENSE; - scmd->cdb.g0_cdb.lun = scg_lun(scgp); -#ifdef nonono - scmd->cdb.g0_cdb.high_addr = 1<<4; /* DBD Disable Block desc. */ -#endif - scmd->cdb.g0_cdb.mid_addr = (page&0x3F) | ((pcf<<6)&0xC0); - scmd->cdb.g0_cdb.count = page ? 0xFF : 24; - scmd->cdb.g0_cdb.count = cnt; - - scgp->cmdname = "mode sense g0"; - - if (scg_cmd(scgp) < 0) - return (-1); - if (scgp->verbose) scg_prbytes("Mode Sense Data", dp, cnt - scg_getresid(scgp)); - return (0); -} - -EXPORT int -mode_sense_g1(scgp, dp, cnt, page, pcf) - SCSI *scgp; - Uchar *dp; - int cnt; - int page; - int pcf; -{ - register struct scg_cmd *scmd = scgp->scmd; - - fillbytes((caddr_t)scmd, sizeof (*scmd), '\0'); - scmd->addr = (caddr_t)dp; - scmd->size = cnt; - scmd->flags = SCG_RECV_DATA|SCG_DISRE_ENA; - scmd->cdb_len = SC_G1_CDBLEN; - scmd->sense_len = CCS_SENSE_LEN; - scmd->cdb.g1_cdb.cmd = 0x5A; - scmd->cdb.g1_cdb.lun = scg_lun(scgp); -#ifdef nonono - scmd->cdb.g0_cdb.high_addr = 1<<4; /* DBD Disable Block desc. */ -#endif - scmd->cdb.g1_cdb.addr[0] = (page&0x3F) | ((pcf<<6)&0xC0); - g1_cdblen(&scmd->cdb.g1_cdb, cnt); - - scgp->cmdname = "mode sense g1"; - - if (scg_cmd(scgp) < 0) - return (-1); - if (scgp->verbose) scg_prbytes("Mode Sense Data", dp, cnt - scg_getresid(scgp)); - return (0); -} - -struct trackdesc { - Uchar res0; - -#if defined(_BIT_FIELDS_LTOH) /* Intel byteorder */ - Ucbit control : 4; - Ucbit adr : 4; -#else /* Motorola byteorder */ - Ucbit adr : 4; - Ucbit control : 4; -#endif - - Uchar track; - Uchar res3; - Uchar addr[4]; -}; - -struct diskinfo { - struct tocheader hd; - struct trackdesc desc[1]; -}; - -struct siheader { - Uchar len[2]; - Uchar finished; - Uchar unfinished; -}; - -struct sidesc { - Uchar sess_number; - Uchar res1; - Uchar track; - Uchar res3; - Uchar addr[4]; -}; - -struct sinfo { - struct siheader hd; - struct sidesc desc[1]; -}; - -struct trackheader { - Uchar mode; - Uchar res[3]; - Uchar addr[4]; -}; -#define TRM_ZERO 0 -#define TRM_USER_ECC 1 /* 2048 bytes user data + 288 Bytes ECC/EDC */ -#define TRM_USER 2 /* All user data (2336 bytes) */ - - -EXPORT int -read_tochdr(scgp, dp, fp, lp) - SCSI *scgp; - cdr_t *dp; - int *fp; - int *lp; -{ - struct tocheader *tp; - char xb[256]; - int len; - - tp = (struct tocheader *)xb; - - fillbytes((caddr_t)xb, sizeof (xb), '\0'); - if (read_toc(scgp, xb, 0, sizeof (struct tocheader), 0, FMT_TOC) < 0) { - if (scgp->silent == 0) - errmsgno(EX_BAD, "Cannot read TOC header\n"); - return (-1); - } - len = a_to_u_2_byte(tp->len) + sizeof (struct tocheader)-2; - if (len >= 4) { - if (fp) - *fp = tp->first; - if (lp) - *lp = tp->last; - return (0); - } - return (-1); -} - -EXPORT int -read_cdtext(scgp) - SCSI *scgp; -{ - struct tocheader *tp; - char xb[256]; - int len; - char xxb[10000]; - - tp = (struct tocheader *)xb; - - fillbytes((caddr_t)xb, sizeof (xb), '\0'); - if (read_toc(scgp, xb, 0, sizeof (struct tocheader), 0, FMT_CDTEXT) < 0) { - if (scgp->silent == 0 || scgp->verbose > 0) - errmsgno(EX_BAD, "Cannot read CD-Text header\n"); - return (-1); - } - len = a_to_u_2_byte(tp->len) + sizeof (struct tocheader)-2; - printf("CD-Text len: %d\n", len); - - if (read_toc(scgp, xxb, 0, len, 0, FMT_CDTEXT) < 0) { - if (scgp->silent == 0) - errmsgno(EX_BAD, "Cannot read CD-Text\n"); - return (-1); - } - { - FILE *f = fileopen("cdtext.dat", "wctb"); - filewrite(f, xxb, len); - } - return (0); -} - -EXPORT int -read_trackinfo(scgp, track, offp, msfp, adrp, controlp, modep) - SCSI *scgp; - int track; - long *offp; - struct msf *msfp; - int *adrp; - int *controlp; - int *modep; -{ - struct diskinfo *dp; - char xb[256]; - int len; - - dp = (struct diskinfo *)xb; - - fillbytes((caddr_t)xb, sizeof (xb), '\0'); - if (read_toc(scgp, xb, track, sizeof (struct diskinfo), 0, FMT_TOC) < 0) { - if (scgp->silent <= 0) - errmsgno(EX_BAD, "Cannot read TOC\n"); - return (-1); - } - len = a_to_u_2_byte(dp->hd.len) + sizeof (struct tocheader)-2; - if (len < (int)sizeof (struct diskinfo)) - return (-1); - - if (offp) - *offp = a_to_4_byte(dp->desc[0].addr); - if (adrp) - *adrp = dp->desc[0].adr; - if (controlp) - *controlp = dp->desc[0].control; - - if (msfp) { - scgp->silent++; - if (read_toc(scgp, xb, track, sizeof (struct diskinfo), 1, FMT_TOC) - >= 0) { - msfp->msf_min = dp->desc[0].addr[1]; - msfp->msf_sec = dp->desc[0].addr[2]; - msfp->msf_frame = dp->desc[0].addr[3]; - } else if (read_toc(scgp, xb, track, sizeof (struct diskinfo), 0, FMT_TOC) - >= 0) { - /* - * Some drives (e.g. the Philips CDD-522) don't support - * to read the TOC in MSF mode. - */ - long off = a_to_4_byte(dp->desc[0].addr); - - lba_to_msf(off, msfp); - } else { - msfp->msf_min = 0; - msfp->msf_sec = 0; - msfp->msf_frame = 0; - } - scgp->silent--; - } - - if (modep == NULL) - return (0); - - if (track == 0xAA) { - *modep = -1; - return (0); - } - - fillbytes((caddr_t)xb, sizeof (xb), '\0'); - - scgp->silent++; - if (read_header(scgp, xb, *offp, 8, 0) >= 0) { - *modep = xb[0]; - } else if (read_track_info_philips(scgp, xb, track, 14) >= 0) { - *modep = xb[0xb] & 0xF; - } else { - *modep = -1; - } - scgp->silent--; - return (0); -} - -EXPORT int -read_B0(scgp, isbcd, b0p, lop) - SCSI *scgp; - BOOL isbcd; - long *b0p; - long *lop; -{ - struct fdiskinfo *dp; - struct ftrackdesc *tp; - char xb[8192]; - char *pe; - int len; - long l; - - dp = (struct fdiskinfo *)xb; - - fillbytes((caddr_t)xb, sizeof (xb), '\0'); - if (read_toc_philips(scgp, xb, 1, sizeof (struct tocheader), 0, FMT_FULLTOC) < 0) { - return (-1); - } - len = a_to_u_2_byte(dp->hd.len) + sizeof (struct tocheader)-2; - if (len < (int)sizeof (struct fdiskinfo)) - return (-1); - if (read_toc_philips(scgp, xb, 1, len, 0, FMT_FULLTOC) < 0) { - return (-1); - } - if (scgp->verbose) { - scg_prbytes("TOC data: ", (Uchar *)xb, - len > (int)sizeof (xb) - scg_getresid(scgp) ? - sizeof (xb) - scg_getresid(scgp) : len); - - tp = &dp->desc[0]; - pe = &xb[len]; - - while ((char *)tp < pe) { - scg_prbytes("ENT: ", (Uchar *)tp, 11); - tp++; - } - } - tp = &dp->desc[0]; - pe = &xb[len]; - - for (; (char *)tp < pe; tp++) { - if (tp->sess_number != dp->hd.last) - continue; - if (tp->point != 0xB0) - continue; - if (scgp->verbose) - scg_prbytes("B0: ", (Uchar *)tp, 11); - if (isbcd) { - l = msf_to_lba(from_bcd(tp->amin), - from_bcd(tp->asec), - from_bcd(tp->aframe), TRUE); - } else { - l = msf_to_lba(tp->amin, - tp->asec, - tp->aframe, TRUE); - } - if (b0p) - *b0p = l; - - if (scgp->verbose) - printf("B0 start: %ld\n", l); - - if (isbcd) { - l = msf_to_lba(from_bcd(tp->pmin), - from_bcd(tp->psec), - from_bcd(tp->pframe), TRUE); - } else { - l = msf_to_lba(tp->pmin, - tp->psec, - tp->pframe, TRUE); - } - - if (scgp->verbose) - printf("B0 lout: %ld\n", l); - if (lop) - *lop = l; - return (0); - } - return (-1); -} - - -/* - * Return address of first track in last session (SCSI-3/mmc version). - */ -EXPORT int -read_session_offset(scgp, offp) - SCSI *scgp; - long *offp; -{ - struct diskinfo *dp; - char xb[256]; - int len; - - dp = (struct diskinfo *)xb; - - fillbytes((caddr_t)xb, sizeof (xb), '\0'); - if (read_toc(scgp, (caddr_t)xb, 0, sizeof (struct tocheader), 0, FMT_SINFO) < 0) - return (-1); - - if (scgp->verbose) - scg_prbytes("tocheader: ", - (Uchar *)xb, sizeof (struct tocheader) - scg_getresid(scgp)); - - len = a_to_u_2_byte(dp->hd.len) + sizeof (struct tocheader)-2; - if (len > (int)sizeof (xb)) { - errmsgno(EX_BAD, "Session info too big.\n"); - return (-1); - } - if (read_toc(scgp, (caddr_t)xb, 0, len, 0, FMT_SINFO) < 0) - return (-1); - - if (scgp->verbose) - scg_prbytes("tocheader: ", - (Uchar *)xb, len - scg_getresid(scgp)); - - dp = (struct diskinfo *)xb; - if (offp) - *offp = a_to_u_4_byte(dp->desc[0].addr); - return (0); -} - -/* - * Return address of first track in last session (pre SCSI-3 version). - */ -EXPORT int -read_session_offset_philips(scgp, offp) - SCSI *scgp; - long *offp; -{ - struct sinfo *sp; - char xb[256]; - int len; - - sp = (struct sinfo *)xb; - - fillbytes((caddr_t)xb, sizeof (xb), '\0'); - if (read_toc_philips(scgp, (caddr_t)xb, 0, sizeof (struct siheader), 0, FMT_SINFO) < 0) - return (-1); - len = a_to_u_2_byte(sp->hd.len) + sizeof (struct siheader)-2; - if (len > (int)sizeof (xb)) { - errmsgno(EX_BAD, "Session info too big.\n"); - return (-1); - } - if (read_toc_philips(scgp, (caddr_t)xb, 0, len, 0, FMT_SINFO) < 0) - return (-1); - /* - * Old drives return the number of finished sessions in first/finished - * a descriptor is returned for each session. - * New drives return the number of the first and last session - * one descriptor for the last finished session is returned - * as in SCSI-3 - * In all cases the lowest session number is set to 1. - */ - sp = (struct sinfo *)xb; - if (offp) - *offp = a_to_u_4_byte(sp->desc[sp->hd.finished-1].addr); - return (0); -} - -EXPORT int -sense_secsize(scgp, current) - SCSI *scgp; - int current; -{ - Uchar mode[0x100]; - Uchar *p; - Uchar *ep; - int len; - int secsize = -1; - - scgp->silent++; - (void) unit_ready(scgp); - scgp->silent--; - - /* XXX Quick and dirty, musz verallgemeinert werden !!! */ - - fillbytes(mode, sizeof (mode), '\0'); - scgp->silent++; - - len = sizeof (struct scsi_mode_header) + - sizeof (struct scsi_mode_blockdesc); - /* - * Wenn wir hier get_mode_params() nehmen bekommen wir die Warnung: - * Warning: controller returns wrong page 1 for All pages page (3F). - */ - if (mode_sense(scgp, mode, len, 0x3F, current?0:2) < 0) { - fillbytes(mode, sizeof (mode), '\0'); - if (mode_sense(scgp, mode, len, 0, current?0:2) < 0) { /* VU (block desc) */ - scgp->silent--; - return (-1); - } - } - if (mode[3] == 8) { - if (scgp->debug) { - printf("Density: 0x%X\n", mode[4]); - printf("Blocks: %ld\n", a_to_u_3_byte(&mode[5])); - printf("Blocklen:%ld\n", a_to_u_3_byte(&mode[9])); - } - secsize = a_to_u_3_byte(&mode[9]); - } - fillbytes(mode, sizeof (mode), '\0'); - /* - * The ACARD TECH AEC-7720 ATAPI<->SCSI adaptor - * chokes if we try to transfer more than 0x40 bytes with - * mode_sense of all pages. So try to avoid to run this - * command if possible. - */ - if (scgp->debug && - mode_sense(scgp, mode, 0xFE, 0x3F, current?0:2) >= 0) { /* All Pages */ - - ep = mode+mode[0]; /* Points to last byte of data */ - p = &mode[4]; - p += mode[3]; - printf("Pages: "); - while (p < ep) { - printf("0x%X ", *p&0x3F); - p += p[1]+2; - } - printf("\n"); - } - scgp->silent--; - - return (secsize); -} - -EXPORT int -select_secsize(scgp, secsize) - SCSI *scgp; - int secsize; -{ - struct scsi_mode_data md; - int count = sizeof (struct scsi_mode_header) + - sizeof (struct scsi_mode_blockdesc); - - (void) test_unit_ready(scgp); /* clear any error situation */ - - fillbytes((caddr_t)&md, sizeof (md), '\0'); - md.header.blockdesc_len = 8; - i_to_3_byte(md.blockdesc.lblen, secsize); - - return (mode_select(scgp, (Uchar *)&md, count, 0, scgp->inq->data_format >= 2)); -} - -EXPORT BOOL -is_cddrive(scgp) - SCSI *scgp; -{ - return (scgp->inq->type == INQ_ROMD || scgp->inq->type == INQ_WORM); -} - -EXPORT BOOL -is_unknown_dev(scgp) - SCSI *scgp; -{ - return (scgp->dev == DEV_UNKNOWN); -} - -#ifndef DEBUG -#define DEBUG -#endif -#ifdef DEBUG - -EXPORT int -read_scsi(scgp, bp, addr, cnt) - SCSI *scgp; - caddr_t bp; - long addr; - int cnt; -{ - if (addr <= G0_MAXADDR && cnt < 256 && !is_atapi) - return (read_g0(scgp, bp, addr, cnt)); - else - return (read_g1(scgp, bp, addr, cnt)); -} - -EXPORT int -read_g0(scgp, bp, addr, cnt) - SCSI *scgp; - caddr_t bp; - long addr; - int cnt; -{ - register struct scg_cmd *scmd = scgp->scmd; - - if (scgp->cap->c_bsize <= 0) - raisecond("capacity_not_set", 0L); - - fillbytes((caddr_t)scmd, sizeof (*scmd), '\0'); - scmd->addr = bp; - scmd->size = cnt*scgp->cap->c_bsize; - scmd->flags = SCG_RECV_DATA|SCG_DISRE_ENA; - scmd->cdb_len = SC_G0_CDBLEN; - scmd->sense_len = CCS_SENSE_LEN; - scmd->cdb.g0_cdb.cmd = SC_READ; - scmd->cdb.g0_cdb.lun = scg_lun(scgp); - g0_cdbaddr(&scmd->cdb.g0_cdb, addr); - scmd->cdb.g0_cdb.count = cnt; -/* scmd->cdb.g0_cdb.vu_56 = 1;*/ - - scgp->cmdname = "read_g0"; - - return (scg_cmd(scgp)); -} - -EXPORT int -read_g1(scgp, bp, addr, cnt) - SCSI *scgp; - caddr_t bp; - long addr; - int cnt; -{ - register struct scg_cmd *scmd = scgp->scmd; - - if (scgp->cap->c_bsize <= 0) - raisecond("capacity_not_set", 0L); - - fillbytes((caddr_t)scmd, sizeof (*scmd), '\0'); - scmd->addr = bp; - scmd->size = cnt*scgp->cap->c_bsize; - scmd->flags = SCG_RECV_DATA|SCG_DISRE_ENA; - scmd->cdb_len = SC_G1_CDBLEN; - scmd->sense_len = CCS_SENSE_LEN; - scmd->cdb.g1_cdb.cmd = SC_EREAD; - scmd->cdb.g1_cdb.lun = scg_lun(scgp); - g1_cdbaddr(&scmd->cdb.g1_cdb, addr); - g1_cdblen(&scmd->cdb.g1_cdb, cnt); - - scgp->cmdname = "read_g1"; - - return (scg_cmd(scgp)); -} -#endif /* DEBUG */ - -EXPORT BOOL -getdev(scgp, print) - SCSI *scgp; - BOOL print; -{ - BOOL got_inquiry = TRUE; - char vendor_info[8+1]; - char prod_ident[16+1]; - char prod_revision[4+1]; - int inq_len = 0; - register struct scg_cmd *scmd = scgp->scmd; - register struct scsi_inquiry *inq = scgp->inq; - - - fillbytes((caddr_t)inq, sizeof (*inq), '\0'); - scgp->dev = DEV_UNKNOWN; - scgp->silent++; - (void) unit_ready(scgp); - if (scmd->error >= SCG_FATAL && - !(scmd->scb.chk && scmd->sense_count > 0)) { - scgp->silent--; - return (FALSE); - } - - -/* if (scmd->error < SCG_FATAL || scmd->scb.chk && scmd->sense_count > 0){*/ - - if (inquiry(scgp, (caddr_t)inq, sizeof (*inq)) < 0) { - got_inquiry = FALSE; - } else { - inq_len = sizeof (*inq) - scg_getresid(scgp); - } - if (!got_inquiry) { - if (scgp->verbose) { - printf( - "error: %d scb.chk: %d sense_count: %d sense.code: 0x%x\n", - scmd->error, scmd->scb.chk, - scmd->sense_count, scmd->sense.code); - } - /* - * Folgende Kontroller kennen das Kommando - * INQUIRY nicht: - * - * ADAPTEC ACB-4000, ACB-4010, ACB 4070 - * SYSGEN SC4000 - * - * Leider reagieren ACB40X0 und ACB5500 identisch - * wenn drive not ready (code == not ready), - * sie sind dann nicht zu unterscheiden. - */ - - if (scmd->scb.chk && scmd->sense_count == 4) { - /* Test auf SYSGEN */ - (void) qic02(scgp, 0x12); /* soft lock on */ - if (qic02(scgp, 1) < 0) { /* soft lock off */ - scgp->dev = DEV_ACB40X0; -/* scgp->dev = acbdev();*/ - } else { - scgp->dev = DEV_SC4000; - inq->type = INQ_SEQD; - inq->removable = 1; - } - } - } else if (scgp->verbose) { - int i; - int len = inq->add_len + 5; - Uchar ibuf[256+5]; - Uchar *ip = (Uchar *)inq; - Uchar c; - - if (len > (int)sizeof (*inq) && - inquiry(scgp, (caddr_t)ibuf, inq->add_len+5) >= 0) { - len = inq->add_len+5 - scg_getresid(scgp); - ip = ibuf; - } else { - len = sizeof (*inq); - } - printf("Inquiry Data : "); - for (i = 0; i < len; i++) { - c = ip[i]; - if (c >= ' ' && c < 0177) - printf("%c", c); - else - printf("."); - } - printf("\n"); - } - - strncpy(vendor_info, inq->vendor_info, sizeof (inq->vendor_info)); - strncpy(prod_ident, inq->prod_ident, sizeof (inq->prod_ident)); - strncpy(prod_revision, inq->prod_revision, sizeof (inq->prod_revision)); - - vendor_info[sizeof (inq->vendor_info)] = '\0'; - prod_ident[sizeof (inq->prod_ident)] = '\0'; - prod_revision[sizeof (inq->prod_revision)] = '\0'; - - switch (inq->type) { - - case INQ_DASD: - if (inq->add_len == 0 && inq->vendor_info[0] != '\0') { - Uchar *p; - /* - * NT-4.0 creates fake inquiry data for IDE disks. - * Unfortunately, it does not set add_len wo we - * check if vendor_info, prod_ident and prod_revision - * contains valid chars for a CCS inquiry. - */ - if (inq_len >= 36) - inq->add_len = 31; - - for (p = (Uchar *)&inq->vendor_info[0]; - p < (Uchar *)&inq->prod_revision[4]; - p++) { - if (*p < 0x20 || *p > 0x7E) { - inq->add_len = 0; - break; - } - } - } - if (inq->add_len == 0) { - if (scgp->dev == DEV_UNKNOWN && got_inquiry) { - scgp->dev = DEV_ACB5500; - strcpy(inq->vendor_info, - "ADAPTEC ACB-5500 FAKE"); - - } else switch (scgp->dev) { - - case DEV_ACB40X0: - strcpy(inq->vendor_info, - "ADAPTEC ACB-40X0 FAKE"); - break; - case DEV_ACB4000: - strcpy(inq->vendor_info, - "ADAPTEC ACB-4000 FAKE"); - break; - case DEV_ACB4010: - strcpy(inq->vendor_info, - "ADAPTEC ACB-4010 FAKE"); - break; - case DEV_ACB4070: - strcpy(inq->vendor_info, - "ADAPTEC ACB-4070 FAKE"); - break; - } - } else if (inq->add_len < 31) { - scgp->dev = DEV_NON_CCS_DSK; - - } else if (strbeg("EMULEX", vendor_info)) { - if (strbeg("MD21", prod_ident)) - scgp->dev = DEV_MD21; - if (strbeg("MD23", prod_ident)) - scgp->dev = DEV_MD23; - else - scgp->dev = DEV_CCS_GENDISK; - } else if (strbeg("ADAPTEC", vendor_info)) { - if (strbeg("ACB-4520", prod_ident)) - scgp->dev = DEV_ACB4520A; - if (strbeg("ACB-4525", prod_ident)) - scgp->dev = DEV_ACB4525; - else - scgp->dev = DEV_CCS_GENDISK; - } else if (strbeg("SONY", vendor_info) && - strbeg("SMO-C501", prod_ident)) { - scgp->dev = DEV_SONY_SMO; - } else { - scgp->dev = DEV_CCS_GENDISK; - } - break; - - case INQ_SEQD: - if (scgp->dev == DEV_SC4000) { - strcpy(inq->vendor_info, - "SYSGEN SC4000 FAKE"); - } else if (inq->add_len == 0 && - inq->removable && - inq->ansi_version == 1) { - scgp->dev = DEV_MT02; - strcpy(inq->vendor_info, - "EMULEX MT02 FAKE"); - } - break; - -/* case INQ_OPTD:*/ - case INQ_ROMD: - case INQ_WORM: - if (strbeg("RXT-800S", prod_ident)) - scgp->dev = DEV_RXT800S; - - /* - * Start of CD-Recorders: - */ - if (strbeg("ACER", vendor_info)) { - if (strbeg("CR-4020C", prod_ident)) - scgp->dev = DEV_RICOH_RO_1420C; - - } else if (strbeg("CREATIVE", vendor_info)) { - if (strbeg("CDR2000", prod_ident)) - scgp->dev = DEV_RICOH_RO_1060C; - - } else if (strbeg("GRUNDIG", vendor_info)) { - if (strbeg("CDR100IPW", prod_ident)) - scgp->dev = DEV_CDD_2000; - - } else if (strbeg("JVC", vendor_info)) { - if (strbeg("XR-W2001", prod_ident)) - scgp->dev = DEV_TEAC_CD_R50S; - else if (strbeg("XR-W2010", prod_ident)) - scgp->dev = DEV_TEAC_CD_R50S; - else if (strbeg("R2626", prod_ident)) - scgp->dev = DEV_TEAC_CD_R50S; - - } else if (strbeg("MITSBISH", vendor_info)) { - -#ifdef XXXX_REALLY - /* It's MMC compliant */ - if (strbeg("CDRW226", prod_ident)) - scgp->dev = DEV_MMC_CDRW; -#else - /* EMPTY */ -#endif - - } else if (strbeg("MITSUMI", vendor_info)) { - /* Don't know any product string */ - scgp->dev = DEV_CDD_522; - - } else if (strbeg("OPTIMA", vendor_info)) { - if (strbeg("CD-R 650", prod_ident)) - scgp->dev = DEV_SONY_CDU_924; - - } else if (strbeg("PHILIPS", vendor_info) || - strbeg("IMS", vendor_info) || - strbeg("KODAK", vendor_info) || - strbeg("HP", vendor_info)) { - - if (strbeg("CDD521/00", prod_ident)) - scgp->dev = DEV_CDD_521_OLD; - else if (strbeg("CDD521/02", prod_ident)) - scgp->dev = DEV_CDD_521_OLD; /* PCD 200R? */ - else if (strbeg("CDD521", prod_ident)) - scgp->dev = DEV_CDD_521; - - if (strbeg("CDD522", prod_ident)) - scgp->dev = DEV_CDD_522; - if (strbeg("PCD225", prod_ident)) - scgp->dev = DEV_CDD_522; - if (strbeg("KHSW/OB", prod_ident)) /* PCD600 */ - scgp->dev = DEV_PCD_600; - if (strbeg("CDR-240", prod_ident)) - scgp->dev = DEV_CDD_2000; - - if (strbeg("CDD20", prod_ident)) - scgp->dev = DEV_CDD_2000; - if (strbeg("CDD26", prod_ident)) - scgp->dev = DEV_CDD_2600; - - if (strbeg("C4324/C4325", prod_ident)) - scgp->dev = DEV_CDD_2000; - if (strbeg("CD-Writer 6020", prod_ident)) - scgp->dev = DEV_CDD_2600; - - } else if (strbeg("PINNACLE", vendor_info)) { - if (strbeg("RCD-1000", prod_ident)) - scgp->dev = DEV_TEAC_CD_R50S; - if (strbeg("RCD5020", prod_ident)) - scgp->dev = DEV_TEAC_CD_R50S; - if (strbeg("RCD5040", prod_ident)) - scgp->dev = DEV_TEAC_CD_R50S; - if (strbeg("RCD 4X4", prod_ident)) - scgp->dev = DEV_TEAC_CD_R50S; - - } else if (strbeg("PIONEER", vendor_info)) { - if (strbeg("CD-WO DW-S114X", prod_ident)) - scgp->dev = DEV_PIONEER_DW_S114X; - else if (strbeg("CD-WO DR-R504X", prod_ident)) /* Reoprt from philip@merge.com */ - scgp->dev = DEV_PIONEER_DW_S114X; - else if (strbeg("DVD-R DVR-S101", prod_ident)) - scgp->dev = DEV_PIONEER_DVDR_S101; - - } else if (strbeg("PLASMON", vendor_info)) { - if (strbeg("RF4100", prod_ident)) - scgp->dev = DEV_PLASMON_RF_4100; - else if (strbeg("CDR4220", prod_ident)) - scgp->dev = DEV_CDD_2000; - - } else if (strbeg("PLEXTOR", vendor_info)) { - if (strbeg("CD-R PX-R24CS", prod_ident)) - scgp->dev = DEV_RICOH_RO_1420C; - - } else if (strbeg("RICOH", vendor_info)) { - if (strbeg("RO-1420C", prod_ident)) - scgp->dev = DEV_RICOH_RO_1420C; - if (strbeg("RO1060C", prod_ident)) - scgp->dev = DEV_RICOH_RO_1060C; - - } else if (strbeg("SAF", vendor_info)) { /* Smart & Friendly */ - if (strbeg("CD-R2004", prod_ident) || - strbeg("CD-R2006 ", prod_ident)) - scgp->dev = DEV_SONY_CDU_924; - else if (strbeg("CD-R2006PLUS", prod_ident)) - scgp->dev = DEV_TEAC_CD_R50S; - else if (strbeg("CD-RW226", prod_ident)) - scgp->dev = DEV_TEAC_CD_R50S; - else if (strbeg("CD-R4012", prod_ident)) - scgp->dev = DEV_TEAC_CD_R50S; - - } else if (strbeg("SANYO", vendor_info)) { - if (strbeg("CD-WO CRD-R24S", prod_ident)) - scgp->dev = DEV_CDD_521; - - } else if (strbeg("SONY", vendor_info)) { - if (strbeg("CD-R CDU92", prod_ident) || - strbeg("CD-R CDU94", prod_ident)) - scgp->dev = DEV_SONY_CDU_924; - - } else if (strbeg("TEAC", vendor_info)) { - if (strbeg("CD-R50S", prod_ident) || - strbeg("CD-R55S", prod_ident)) - scgp->dev = DEV_TEAC_CD_R50S; - - } else if (strbeg("TRAXDATA", vendor_info) || - strbeg("Traxdata", vendor_info)) { - if (strbeg("CDR4120", prod_ident)) - scgp->dev = DEV_TEAC_CD_R50S; - - } else if (strbeg("T.YUDEN", vendor_info)) { - if (strbeg("CD-WO EW-50", prod_ident)) - scgp->dev = DEV_TYUDEN_EW50; - - } else if (strbeg("WPI", vendor_info)) { /* Wearnes */ - if (strbeg("CDR-632P", prod_ident)) - scgp->dev = DEV_CDD_2600; - - } else if (strbeg("YAMAHA", vendor_info)) { - if (strbeg("CDR10", prod_ident)) - scgp->dev = DEV_YAMAHA_CDR_100; - if (strbeg("CDR200", prod_ident)) - scgp->dev = DEV_YAMAHA_CDR_400; - if (strbeg("CDR400", prod_ident)) - scgp->dev = DEV_YAMAHA_CDR_400; - - } else if (strbeg("MATSHITA", vendor_info)) { - if (strbeg("CD-R CW-7501", prod_ident)) - scgp->dev = DEV_MATSUSHITA_7501; - if (strbeg("CD-R CW-7502", prod_ident)) - scgp->dev = DEV_MATSUSHITA_7502; - } - if (scgp->dev == DEV_UNKNOWN) { - /* - * We do not have Manufacturer strings for - * the following drives. - */ - if (strbeg("CDS615E", prod_ident)) /* Olympus */ - scgp->dev = DEV_SONY_CDU_924; - } - if (scgp->dev == DEV_UNKNOWN && inq->type == INQ_ROMD) { - BOOL cdrr = FALSE; - BOOL cdwr = FALSE; - BOOL cdrrw = FALSE; - BOOL cdwrw = FALSE; - BOOL dvd = FALSE; - BOOL dvdwr = FALSE; - - scgp->dev = DEV_CDROM; - - if (mmc_check(scgp, &cdrr, &cdwr, &cdrrw, &cdwrw, - &dvd, &dvdwr)) - scgp->dev = DEV_MMC_CDROM; - if (cdwr) - scgp->dev = DEV_MMC_CDR; - if (cdwrw) - scgp->dev = DEV_MMC_CDRW; - if (dvd) - scgp->dev = DEV_MMC_DVD; - if (dvdwr) - scgp->dev = DEV_MMC_DVD_WR; - } - break; - - case INQ_PROCD: - if (strbeg("BERTHOLD", vendor_info)) { - if (strbeg("", prod_ident)) - scgp->dev = DEV_HRSCAN; - } - break; - - case INQ_SCAN: - scgp->dev = DEV_MS300A; - break; - } - scgp->silent--; - if (!print) - return (TRUE); - - if (scgp->dev == DEV_UNKNOWN && !got_inquiry) { -#ifdef PRINT_INQ_ERR - scg_printerr(scgp); -#endif - return (FALSE); - } - - printinq(scgp, stdout); - return (TRUE); -} - -EXPORT void -printinq(scgp, f) - SCSI *scgp; - FILE *f; -{ - register struct scsi_inquiry *inq = scgp->inq; - - fprintf(f, "Device type : "); - scg_fprintdev(f, inq); - fprintf(f, "Version : %d\n", inq->ansi_version); - fprintf(f, "Response Format: %d\n", inq->data_format); - if (inq->data_format >= 2) { - fprintf(f, "Capabilities : "); - if (inq->aenc) fprintf(f, "AENC "); - if (inq->termiop) fprintf(f, "TERMIOP "); - if (inq->reladr) fprintf(f, "RELADR "); - if (inq->wbus32) fprintf(f, "WBUS32 "); - if (inq->wbus16) fprintf(f, "WBUS16 "); - if (inq->sync) fprintf(f, "SYNC "); - if (inq->linked) fprintf(f, "LINKED "); - if (inq->cmdque) fprintf(f, "CMDQUE "); - if (inq->softreset) fprintf(f, "SOFTRESET "); - fprintf(f, "\n"); - } - if (inq->add_len >= 31 || - inq->vendor_info[0] || - inq->prod_ident[0] || - inq->prod_revision[0]) { - fprintf(f, "Vendor_info : '%.8s'\n", inq->vendor_info); - fprintf(f, "Identifikation : '%.16s'\n", inq->prod_ident); - fprintf(f, "Revision : '%.4s'\n", inq->prod_revision); - } -} - -EXPORT void -printdev(scgp) - SCSI *scgp; -{ - printf("Device seems to be: "); - - switch (scgp->dev) { - - case DEV_UNKNOWN: printf("unknown"); break; - case DEV_ACB40X0: printf("Adaptec 4000/4010/4070"); break; - case DEV_ACB4000: printf("Adaptec 4000"); break; - case DEV_ACB4010: printf("Adaptec 4010"); break; - case DEV_ACB4070: printf("Adaptec 4070"); break; - case DEV_ACB5500: printf("Adaptec 5500"); break; - case DEV_ACB4520A: printf("Adaptec 4520A"); break; - case DEV_ACB4525: printf("Adaptec 4525"); break; - case DEV_MD21: printf("Emulex MD21"); break; - case DEV_MD23: printf("Emulex MD23"); break; - case DEV_NON_CCS_DSK: printf("Generic NON CCS Disk"); break; - case DEV_CCS_GENDISK: printf("Generic CCS Disk"); break; - case DEV_SONY_SMO: printf("Sony SMO-C501"); break; - case DEV_MT02: printf("Emulex MT02"); break; - case DEV_SC4000: printf("Sysgen SC4000"); break; - case DEV_RXT800S: printf("Maxtor RXT800S"); break; - case DEV_HRSCAN: printf("Berthold HR-Scanner"); break; - case DEV_MS300A: printf("Microtek MS300A"); break; - - case DEV_CDROM: printf("Generic CD-ROM"); break; - case DEV_MMC_CDROM: printf("Generic mmc CD-ROM"); break; - case DEV_MMC_CDR: printf("Generic mmc CD-R"); break; - case DEV_MMC_CDRW: printf("Generic mmc CD-RW"); break; - case DEV_MMC_DVD: printf("Generic mmc2 DVD-ROM"); break; - case DEV_MMC_DVD_WR: printf("Generic mmc2 DVD-R/DVD-RW/DVD-RAM"); break; - case DEV_CDD_521_OLD: printf("Philips old CDD-521"); break; - case DEV_CDD_521: printf("Philips CDD-521"); break; - case DEV_CDD_522: printf("Philips CDD-522"); break; - case DEV_PCD_600: printf("Kodak PCD-600"); break; - case DEV_CDD_2000: printf("Philips CDD-2000"); break; - case DEV_CDD_2600: printf("Philips CDD-2600"); break; - case DEV_YAMAHA_CDR_100:printf("Yamaha CDR-100"); break; - case DEV_YAMAHA_CDR_400:printf("Yamaha CDR-400"); break; - case DEV_PLASMON_RF_4100:printf("Plasmon RF-4100"); break; - case DEV_SONY_CDU_924: printf("Sony CDU-924S"); break; - case DEV_RICOH_RO_1060C:printf("Ricoh RO-1060C"); break; - case DEV_RICOH_RO_1420C:printf("Ricoh RO-1420C"); break; - case DEV_TEAC_CD_R50S: printf("Teac CD-R50S"); break; - case DEV_MATSUSHITA_7501:printf("Matsushita CW-7501"); break; - case DEV_MATSUSHITA_7502:printf("Matsushita CW-7502"); break; - - case DEV_PIONEER_DW_S114X: printf("Pioneer DW-S114X"); break; - case DEV_PIONEER_DVDR_S101:printf("Pioneer DVD-R S101"); break; - - default: printf("Missing Entry for dev %d", - scgp->dev); break; - - } - printf(".\n"); - -} - -EXPORT BOOL -do_inquiry(scgp, print) - SCSI *scgp; - int print; -{ - if (getdev(scgp, print)) { - if (print) - printdev(scgp); - return (TRUE); - } else { - return (FALSE); - } -} - -EXPORT BOOL -recovery_needed(scgp, dp) - SCSI *scgp; - cdr_t *dp; -{ - int err; - register struct scg_cmd *scmd = scgp->scmd; - - scgp->silent++; - err = test_unit_ready(scgp); - scgp->silent--; - - if (err >= 0) - return (FALSE); - else if (scmd->error >= SCG_FATAL) /* nicht selektierbar */ - return (FALSE); - - if (scmd->sense.code < 0x70) /* non extended Sense */ - return (FALSE); - - /* XXX Old Philips code */ - return (((struct scsi_ext_sense *)&scmd->sense)->sense_code == 0xD0); -} - -EXPORT int -scsi_load(scgp, dp) - SCSI *scgp; - cdr_t *dp; -{ - int key; - int code; - - if ((dp->cdr_flags & CDR_CADDYLOAD) == 0) { - if (scsi_start_stop_unit(scgp, 1, 1, dp && (dp->cdr_cmdflags&F_IMMED)) >= 0) - return (0); - } - - if (wait_unit_ready(scgp, 60)) - return (0); - - key = scg_sense_key(scgp); - code = scg_sense_code(scgp); - - if (key == SC_NOT_READY && (code == 0x3A || code == 0x30)) { - errmsgno(EX_BAD, "Cannot load media with %s drive!\n", - (dp->cdr_flags & CDR_CADDYLOAD) ? "caddy" : "this"); - errmsgno(EX_BAD, "Try to load media by hand.\n"); - } - return (-1); -} - -EXPORT int -scsi_unload(scgp, dp) - SCSI *scgp; - cdr_t *dp; -{ - return (scsi_start_stop_unit(scgp, 0, 1, dp && (dp->cdr_cmdflags&F_IMMED))); -} - -EXPORT int -scsi_cdr_write(scgp, bp, sectaddr, size, blocks, islast) - SCSI *scgp; - caddr_t bp; /* address of buffer */ - long sectaddr; /* disk address (sector) to put */ - long size; /* number of bytes to transfer */ - int blocks; /* sector count */ - BOOL islast; /* last write for track */ -{ - return (write_xg1(scgp, bp, sectaddr, size, blocks)); -} - -EXPORT struct cd_mode_page_2A * -mmc_cap(scgp, modep) - SCSI *scgp; - Uchar *modep; -{ - int len; - int val; - Uchar mode[0x100]; - struct cd_mode_page_2A *mp; - struct cd_mode_page_2A *mp2; - - -retry: - fillbytes((caddr_t)mode, sizeof (mode), '\0'); - - if (!get_mode_params(scgp, 0x2A, "CD capabilities", - mode, (Uchar *)0, (Uchar *)0, (Uchar *)0, &len)) { - - if (scg_sense_key(scgp) == SC_NOT_READY) { - if (wait_unit_ready(scgp, 60)) - goto retry; - } - return (NULL); /* Pre SCSI-3/mmc drive */ - } - - if (len == 0) /* Pre SCSI-3/mmc drive */ - return (NULL); - - mp = (struct cd_mode_page_2A *) - (mode + sizeof (struct scsi_mode_header) + - ((struct scsi_mode_header *)mode)->blockdesc_len); - - /* - * Do some heuristics against pre SCSI-3/mmc VU page 2A - * We should test for a minimum p_len of 0x14, but some - * buggy CD-ROM readers ommit the write speed values. - */ - if (mp->p_len < 0x10) - return (NULL); - - val = a_to_u_2_byte(mp->max_read_speed); - if (val != 0 && val < 176) - return (NULL); - - val = a_to_u_2_byte(mp->cur_read_speed); - if (val != 0 && val < 176) - return (NULL); - - len -= sizeof (struct scsi_mode_header) + - ((struct scsi_mode_header *)mode)->blockdesc_len; - if (modep) - mp2 = (struct cd_mode_page_2A *)modep; - else - mp2 = malloc(len); - if (mp2) - movebytes(mp, mp2, len); - - return (mp2); -} - -EXPORT void -mmc_getval(mp, cdrrp, cdwrp, cdrrwp, cdwrwp, dvdp, dvdwp) - struct cd_mode_page_2A *mp; - BOOL *cdrrp; /* CD ROM */ - BOOL *cdwrp; /* CD-R writer */ - BOOL *cdrrwp; /* CD-RW reader */ - BOOL *cdwrwp; /* CD-RW writer */ - BOOL *dvdp; /* DVD reader */ - BOOL *dvdwp; /* DVD writer */ -{ - BOOL isdvd; /* Any DVD reader */ - BOOL isdvd_wr; /* DVD writer (R / RAM) */ - BOOL iscd_wr; /* CD writer */ - - iscd_wr = (mp->cd_r_write != 0) || /* SCSI-3/mmc CD-R */ - (mp->cd_rw_write != 0); /* SCSI-3/mmc CD-RW */ - - if (cdrrp) - *cdrrp = (mp->cd_r_read != 0); /* SCSI-3/mmc CD */ - if (cdwrp) - *cdwrp = (mp->cd_r_write != 0); /* SCSI-3/mmc CD-R */ - - if (cdrrwp) - *cdrrwp = (mp->cd_rw_read != 0); /* SCSI-3/mmc CD */ - if (cdwrwp) - *cdwrwp = (mp->cd_rw_write != 0); /* SCSI-3/mmc CD-RW */ - - isdvd = /* SCSI-3/mmc2 DVD */ - (mp->dvd_ram_read + mp->dvd_r_read + - mp->dvd_rom_read) != 0; - - isdvd_wr = /* SCSI-3/mmc2 DVD writer*/ - (mp->dvd_ram_write + mp->dvd_r_write) != 0; - - if (dvdp) - *dvdp = isdvd; - if (dvdwp) - *dvdwp = isdvd_wr; -} - -EXPORT BOOL -is_mmc(scgp, cdwp, dvdwp) - SCSI *scgp; - BOOL *cdwp; /* CD writer */ - BOOL *dvdwp; /* DVD writer */ -{ - BOOL cdwr = FALSE; - BOOL cdwrw = FALSE; - - if (cdwp) - *cdwp = FALSE; - if (dvdwp) - *dvdwp = FALSE; - - if (!mmc_check(scgp, NULL, &cdwr, NULL, &cdwrw, NULL, dvdwp)) - return (FALSE); - - if (cdwp) - *cdwp = cdwr | cdwrw; - - return (TRUE); -} - -EXPORT BOOL -mmc_check(scgp, cdrrp, cdwrp, cdrrwp, cdwrwp, dvdp, dvdwp) - SCSI *scgp; - BOOL *cdrrp; /* CD ROM */ - BOOL *cdwrp; /* CD-R writer */ - BOOL *cdrrwp; /* CD-RW reader */ - BOOL *cdwrwp; /* CD-RW writer */ - BOOL *dvdp; /* DVD reader */ - BOOL *dvdwp; /* DVD writer */ -{ - Uchar mode[0x100]; - BOOL was_atapi; - struct cd_mode_page_2A *mp; - - if (scgp->inq->type != INQ_ROMD) - return (FALSE); - - fillbytes((caddr_t)mode, sizeof (mode), '\0'); - - was_atapi = allow_atapi(scgp, TRUE); - scgp->silent++; - mp = mmc_cap(scgp, mode); - scgp->silent--; - allow_atapi(scgp, was_atapi); - if (mp == NULL) - return (FALSE); - - mmc_getval(mp, cdrrp, cdwrp, cdrrwp, cdwrwp, dvdp, dvdwp); - - return (TRUE); /* Generic SCSI-3/mmc CD */ -} - -LOCAL void -print_speed(fmt, val) - char *fmt; - int val; -{ - printf(" %s: %5d kB/s", fmt, val); - printf(" (CD %3ux,", val/176); - printf(" DVD %2ux,", val/1385); - printf(" BD %2ux)\n", val/4495); -} - -#define DOES(what, flag) printf(" Does %s%s\n", flag?"":"not ", what) -#define IS(what, flag) printf(" Is %s%s\n", flag?"":"not ", what) -#define VAL(what, val) printf(" %s: %d\n", what, val[0]*256 + val[1]) -#define SVAL(what, val) printf(" %s: %s\n", what, val) - -EXPORT void -print_capabilities(scgp) - SCSI *scgp; -{ - BOOL was_atapi; - Uchar mode[0x100]; - struct cd_mode_page_2A *mp; -static const char *bclk[4] = {"32", "16", "24", "24 (I2S)"}; -static const char *load[8] = {"caddy", "tray", "pop-up", "reserved(3)", - "disc changer", "cartridge changer", - "reserved(6)", "reserved(7)" }; -static const char *rotctl[4] = {"CLV/PCAV", "CAV", "reserved(2)", "reserved(3)"}; - - - if (scgp->inq->type != INQ_ROMD) - return; - - fillbytes((caddr_t)mode, sizeof (mode), '\0'); - - was_atapi = allow_atapi(scgp, TRUE); /* Try to switch to 10 byte mode cmds */ - scgp->silent++; - mp = mmc_cap(scgp, mode); - scgp->silent--; - allow_atapi(scgp, was_atapi); - if (mp == NULL) - return; - - printf("\nDrive capabilities, per"); - if (mp->p_len >= 28) - printf(" MMC-3"); - else if (mp->p_len >= 24) - printf(" MMC-2"); - else - printf(" MMC"); - printf(" page 2A:\n\n"); - - DOES("read CD-R media", mp->cd_r_read); - DOES("write CD-R media", mp->cd_r_write); - DOES("read CD-RW media", mp->cd_rw_read); - DOES("write CD-RW media", mp->cd_rw_write); - DOES("read DVD-ROM media", mp->dvd_rom_read); - DOES("read DVD-R media", mp->dvd_r_read); - DOES("write DVD-R media", mp->dvd_r_write); - DOES("read DVD-RAM media", mp->dvd_ram_read); - DOES("write DVD-RAM media", mp->dvd_ram_write); - DOES("support test writing", mp->test_write); - printf("\n"); - DOES("read Mode 2 Form 1 blocks", mp->mode_2_form_1); - DOES("read Mode 2 Form 2 blocks", mp->mode_2_form_2); - DOES("read digital audio blocks", mp->cd_da_supported); - if (mp->cd_da_supported) - DOES("restart non-streamed digital audio reads accurately", mp->cd_da_accurate); - DOES("support Buffer-Underrun-Free recording", mp->BUF); - DOES("read multi-session CDs", mp->multi_session); - DOES("read fixed-packet CD media using Method 2", mp->method2); - DOES("read CD bar code", mp->read_bar_code); - DOES("read R-W subcode information", mp->rw_supported); - if (mp->rw_supported) - DOES("return R-W subcode de-interleaved and error-corrected", mp->rw_deint_corr); - DOES("read raw P-W subcode data from lead in", mp->pw_in_lead_in); - DOES("return CD media catalog number", mp->UPC); - DOES("return CD ISRC information", mp->ISRC); - DOES("support C2 error pointers", mp->c2_pointers); - DOES("deliver composite A/V data", mp->composite); - printf("\n"); - DOES("play audio CDs", mp->audio_play); - if (mp->audio_play) { - VAL("Number of volume control levels", mp->num_vol_levels); - DOES("support individual volume control setting for each channel", mp->sep_chan_vol); - DOES("support independent mute setting for each channel", mp->sep_chan_mute); - DOES("support digital output on port 1", mp->digital_port_1); - DOES("support digital output on port 2", mp->digital_port_2); - if (mp->digital_port_1 || mp->digital_port_2) { - DOES("send digital data LSB-first", mp->LSBF); - DOES("set LRCK high for left-channel data", mp->RCK); - DOES("have valid data on falling edge of clock", mp->BCK); - SVAL("Length of data in BCLKs", bclk[mp->length]); - } - } - printf("\n"); - SVAL("Loading mechanism type", load[mp->loading_type]); - DOES("support ejection of CD via START/STOP command", mp->eject); - DOES("lock media on power up via prevent jumper", mp->prevent_jumper); - DOES("allow media to be locked in the drive via PREVENT/ALLOW command", mp->lock); - IS("currently in a media-locked state", mp->lock_state); - DOES("support changing side of disk", mp->side_change); - DOES("have load-empty-slot-in-changer feature", mp->sw_slot_sel); - DOES("support Individual Disk Present feature", mp->disk_present_rep); - printf("\n"); - print_speed("Maximum read speed", a_to_u_2_byte(mp->max_read_speed)); - print_speed("Current read speed", a_to_u_2_byte(mp->cur_read_speed)); - print_speed("Maximum write speed", a_to_u_2_byte(mp->max_write_speed)); - if (mp->p_len >= 28) - print_speed("Current write speed", a_to_u_2_byte(mp->v3_cur_write_speed)); - else - print_speed("Current write speed", a_to_u_2_byte(mp->cur_write_speed)); - if (mp->p_len >= 28) { - SVAL("Rotational control selected", rotctl[mp->rot_ctl_sel]); - } - VAL("Buffer size in KB", mp->buffer_size); - - if (mp->p_len >= 24) { - VAL("Copy management revision supported", mp->copy_man_rev); - } - - if (mp->p_len >= 28) { - struct cd_wr_speed_performance *pp; - Uint ndesc; - Uint i; - Uint n; - - ndesc = a_to_u_2_byte(mp->num_wr_speed_des); - pp = mp->wr_speed_des; - printf(" Number of supported write speeds: %d\n", ndesc); - for (i = 0; i < ndesc; i++, pp++) { - printf(" Write speed # %d:", i); - n = a_to_u_2_byte(pp->wr_speed_supp); - printf(" %5d kB/s", n); - printf(" %s", rotctl[pp->rot_ctl_sel]); - printf(" (CD %3ux,", n/176); - printf(" DVD %2ux,", n/1385); - printf(" BD %2ux)\n", n/4495); - } - } - - /* Generic SCSI-3/mmc CD */ -} - -EXPORT int -verify(scgp, start, count, bad_block) - SCSI *scgp; - long start; - int count; - long *bad_block; -{ - register struct scg_cmd *scmd = scgp->scmd; - - fillbytes((caddr_t)scmd, sizeof (*scmd), '\0'); - scmd->addr = (caddr_t)0; - scmd->size = 0; - scmd->flags = SCG_DISRE_ENA; - scmd->cdb_len = SC_G1_CDBLEN; - scmd->sense_len = CCS_SENSE_LEN; - scmd->cdb.g1_cdb.cmd = 0x2F; /* Verify */ - scmd->cdb.g1_cdb.lun = scg_lun(scgp); - g1_cdbaddr(&scmd->cdb.g1_cdb, start); - g1_cdblen(&scmd->cdb.g1_cdb, count); - - scgp->cmdname = "verify"; - - if (scg_cmd(scgp) < 0) { - if (scmd->sense.code >= 0x70) { /* extended Sense */ - *bad_block = - a_to_4_byte(&((struct scsi_ext_sense *) - &scmd->sense)->info_1); - } else { - *bad_block = a_to_u_3_byte(&scmd->sense.high_addr); - } - return (-1); - } - return (0); -} diff -Nru cdrtools-2.01.01a33/mkisofs/dvd_file.c cdrtools-3.02a09/mkisofs/dvd_file.c --- cdrtools-2.01.01a33/mkisofs/dvd_file.c 2006-10-03 01:07:11.000000000 +0000 +++ cdrtools-3.02a09/mkisofs/dvd_file.c 2015-12-15 19:15:56.000000000 +0000 @@ -1,13 +1,13 @@ -/* @(#)dvd_file.c 1.6 06/10/03 joerg */ +/* @(#)dvd_file.c 1.15 15/12/15 joerg */ +#include #ifndef lint -static char sccsid[] = - "@(#)dvd_file.c 1.6 06/10/03 joerg"; +static UConst char sccsid[] = + "@(#)dvd_file.c 1.15 15/12/15 joerg"; #endif /* - * DVD_VIDEO code + * DVD_AUD_VID code * Copyright (c) 2002 Olaf Beck - olaf_sc@yahoo.com - * Jörg Schilling - * (making the code portable) + * Copyright (c) 2002-2012 Jörg Schilling */ /* * This program is free software; you can redistribute it and/or modify @@ -21,12 +21,11 @@ * * You should have received a copy of the GNU General Public License along with * this program; see the file COPYING. If not, write to the Free Software - * Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -#ifdef DVD_VIDEO +#ifdef DVD_AUD_VID -#include #include "mkisofs.h" #include #include "dvd_reader.h" @@ -37,11 +36,11 @@ LOCAL void uniq __PR((int sector[], int title[], int title_sets_array[], int sector_sets_array[], int titles)); -LOCAL void DVDFreeFileSetArrays __PR((int * sector, int * title, int * title_sets_array, - int * sector_sets_array)); -EXPORT void DVDFreeFileSet __PR((title_set_info_t * title_set_info)); -EXPORT title_set_info_t * DVDGetFileSet __PR((char * dvd)); -EXPORT int DVDGetFilePad __PR((title_set_info_t * title_set_info, char * name)); +LOCAL void DVDFreeFileSetArrays __PR((int *sector, int *title, int *title_sets_array, + int *sector_sets_array)); +EXPORT void DVDFreeFileSet __PR((title_set_info_t *title_set_info)); +EXPORT title_set_info_t *DVDGetFileSet __PR((char *dvd)); +EXPORT int DVDGetFilePad __PR((title_set_info_t *title_set_info, char *name)); LOCAL void @@ -87,7 +86,7 @@ title_sets_array[i] = title[j]; sector_sets_array[i] = sector[j]; #ifdef DEBUG - fprintf(stderr, "Sector offset is %d\n", sector_sets_array[i]); + fprintf(stderr, _("Sector offset is %d\n"), sector_sets_array[i]); #endif i++; j++; @@ -105,10 +104,10 @@ LOCAL void DVDFreeFileSetArrays(sector, title, title_sets_array, sector_sets_array) - int * sector; - int * title; - int * title_sets_array; - int * sector_sets_array; + int *sector; + int *title; + int *title_sets_array; + int *sector_sets_array; { free(sector); free(title); @@ -118,7 +117,7 @@ EXPORT void DVDFreeFileSet(title_set_info) - title_set_info_t * title_set_info; + title_set_info_t *title_set_info; { free(title_set_info->title_set); free(title_set_info); @@ -126,7 +125,7 @@ EXPORT title_set_info_t * DVDGetFileSet(dvd) - char * dvd; + char *dvd; { /* * TODO Fix close of files if @@ -143,17 +142,17 @@ int i; /* DVD file structures */ - dvd_reader_t * _dvd = NULL; + dvd_reader_t *_dvd = NULL; - ifo_handle_t * vmg_ifo = NULL; - ifo_handle_t * vts_ifo = NULL; + ifo_handle_t *vmg_ifo = NULL; + ifo_handle_t *vts_ifo = NULL; - dvd_file_t * vmg_vob_file = NULL; - dvd_file_t * vmg_ifo_file = NULL; + dvd_file_t *vmg_vob_file = NULL; + dvd_file_t *vmg_ifo_file = NULL; - dvd_file_t * vts_ifo_file = NULL; - dvd_file_t * vts_menu_file = NULL; - dvd_file_t * vts_title_file = NULL; + dvd_file_t *vts_ifo_file = NULL; + dvd_file_t *vts_menu_file = NULL; + dvd_file_t *vts_title_file = NULL; /* The sizes it self of each file */ int ifo; @@ -162,17 +161,17 @@ int title_vob; /* Arrays keeping the title - filset relationship */ - int * sector; - int * title; - int * title_sets_array; - int * sector_sets_array; + int *sector; + int *title; + int *title_sets_array; + int *sector_sets_array; /* DVD Video files */ struct stat fileinfo; char temppoint[PATH_MAX + 1]; /* The Title Set Info struct*/ - title_set_info_t * title_set_info; + title_set_info_t *title_set_info; /* Temporary mount point - to be used later */ char mountpoint[PATH_MAX + 1]; @@ -183,12 +182,14 @@ _dvd = DVDOpen(dvd); if (!_dvd) { - errmsgno(EX_BAD, "Can't open device '%s'.\n", dvd); + errmsgno(EX_BAD, _("Can't open device '%s'.\n"), dvd); return (0); } vmg_ifo = ifoOpen(_dvd, 0); if (!vmg_ifo) { - errmsgno(EX_BAD, "Can't open VMG info for '%s'.\n", dvd); + errmsgno(EX_BAD, _("Can't open VMG info for '%s'.\n"), dvd); + /* Close the DVD */ + DVDClose(_dvd); return (0); } @@ -200,7 +201,7 @@ if (stat(temppoint, &fileinfo) < 0) { /* If we can't stat the file, give up */ - errmsg("Can't stat '%s'.\n", temppoint); + errmsg(_("Can't stat '%s'.\n"), temppoint); return (0); } @@ -252,7 +253,7 @@ if ((vmg_vob_file == 0) && vmg_ifo->vmgi_mat->vmg_last_sector + 1 < 2 * DVDFileSize(vmg_ifo_file)) { - errmsgno(EX_BAD, "IFO is not of correct size aborting.\n"); + errmsgno(EX_BAD, _("IFO is not of correct size aborting.\n")); DVDFreeFileSetArrays(sector, title, title_sets_array, sector_sets_array); DVDFreeFileSet(title_set_info); @@ -260,7 +261,7 @@ } else if ((vmg_vob_file != 0) && (vmg_ifo->vmgi_mat->vmg_last_sector + 1 < 2 * DVDFileSize(vmg_ifo_file) + DVDFileSize(vmg_vob_file))) { - errmsgno(EX_BAD, "Either VIDEO_TS.IFO or VIDEO_TS.VOB is not of correct size."); + errmsgno(EX_BAD, _("Either VIDEO_TS.IFO or VIDEO_TS.VOB is not of correct size.\n")); DVDFreeFileSetArrays(sector, title, title_sets_array, sector_sets_array); DVDFreeFileSet(title_set_info); @@ -304,7 +305,7 @@ snprintf(temppoint, sizeof (temppoint), "%s/VIDEO_TS/VIDEO_TS.VOB", mountpoint); if (stat(temppoint, &fileinfo) < 0) { - errmsg("calc: Can't stat '%s'.\n", temppoint); + errmsg(_("calc: Can't stat '%s'.\n"), temppoint); DVDFreeFileSetArrays(sector, title, title_sets_array, sector_sets_array); DVDFreeFileSet(title_set_info); @@ -337,7 +338,7 @@ "%s/VIDEO_TS/VIDEO_TS.IFO", mountpoint); if (stat(temppoint, &fileinfo) < 0) { - errmsg("calc: Can't stat '%s'.\n", temppoint); + errmsg(_("calc: Can't stat '%s'.\n"), temppoint); DVDFreeFileSetArrays(sector, title, title_sets_array, sector_sets_array); DVDFreeFileSet(title_set_info); @@ -362,7 +363,7 @@ vts_ifo = ifoOpen(_dvd, counter + 1); if (!vts_ifo) { - errmsgno(EX_BAD, "Can't open VTS info.\n"); + errmsgno(EX_BAD, _("Can't open VTS info.\n")); DVDFreeFileSetArrays(sector, title, title_sets_array, sector_sets_array); DVDFreeFileSet(title_set_info); @@ -374,7 +375,7 @@ mountpoint, counter + 1); if (stat(temppoint, &fileinfo) < 0) { - errmsg("calc: Can't stat '%s'.\n", temppoint); + errmsg(_("calc: Can't stat '%s'.\n"), temppoint); DVDFreeFileSetArrays(sector, title, title_sets_array, sector_sets_array); DVDFreeFileSet(title_set_info); @@ -405,7 +406,7 @@ if (vts_ifo->vtsi_mat->vts_last_sector + 1 < 2 * DVDFileSize(vts_ifo_file)) { - errmsgno(EX_BAD, "IFO is not of correct size aborting.\n"); + errmsgno(EX_BAD, _("IFO is not of correct size aborting.\n")); DVDFreeFileSetArrays(sector, title, title_sets_array, sector_sets_array); DVDFreeFileSet(title_set_info); @@ -416,7 +417,7 @@ < 2 * DVDFileSize(vts_ifo_file) + DVDFileSize(vts_title_file) + DVDFileSize(vts_menu_file))) { - errmsgno(EX_BAD, "Either VIDEO_TS.IFO or VIDEO_TS.VOB is not of correct size.\n"); + errmsgno(EX_BAD, _("Either VIDEO_TS.IFO or VIDEO_TS.VOB is not of correct size.\n")); DVDFreeFileSetArrays(sector, title, title_sets_array, sector_sets_array); DVDFreeFileSet(title_set_info); @@ -426,7 +427,7 @@ (vts_ifo->vtsi_mat->vts_last_sector + 1 < 2 * DVDFileSize(vts_ifo_file) + DVDFileSize(vts_title_file))) { - errmsgno(EX_BAD, "Either VIDEO_TS.IFO or VIDEO_TS.VOB is not of correct size.\n"); + errmsgno(EX_BAD, _("Either VIDEO_TS.IFO or VIDEO_TS.VOB is not of correct size.\n")); DVDFreeFileSetArrays(sector, title, title_sets_array, sector_sets_array); DVDFreeFileSet(title_set_info); @@ -436,7 +437,7 @@ (vts_ifo->vtsi_mat->vts_last_sector + 1 < 2 * DVDFileSize(vts_ifo_file) + DVDFileSize(vts_menu_file))) { - errmsgno(EX_BAD, "Either VIDEO_TS.IFO or VIDEO_TS.VOB is not of correct size.\n"); + errmsgno(EX_BAD, _("Either VIDEO_TS.IFO or VIDEO_TS.VOB is not of correct size.\n")); DVDFreeFileSetArrays(sector, title, title_sets_array, sector_sets_array); DVDFreeFileSet(title_set_info); @@ -491,7 +492,7 @@ * come here... */ errmsgno(EX_BAD, - "%s/VIDEO_TS/VTS_%02i_0.IFO appears to be corrupted.\n", + _("%s/VIDEO_TS/VTS_%02i_0.IFO appears to be corrupted.\n"), mountpoint, counter+1); return (0); } @@ -518,7 +519,7 @@ "%s/VIDEO_TS/VTS_%02i_0.VOB", mountpoint, counter + 1); if (stat(temppoint, &fileinfo) < 0) { - errmsg("calc: Can't stat '%s'.\n", temppoint); + errmsg(_("calc: Can't stat '%s'.\n"), temppoint); DVDFreeFileSetArrays(sector, title, title_sets_array, sector_sets_array); DVDFreeFileSet(title_set_info); @@ -592,7 +593,7 @@ mountpoint, counter + 1); if (stat(temppoint, &fileinfo) < 0) { - errmsg("calc: Can't stat '%s'\n", temppoint); + errmsg(_("calc: Can't stat '%s'\n"), temppoint); DVDFreeFileSetArrays(sector, title, title_sets_array, sector_sets_array); DVDFreeFileSet(title_set_info); @@ -645,8 +646,8 @@ EXPORT int DVDGetFilePad(title_set_info, name) - title_set_info_t * title_set_info; - char * name; + title_set_info_t *title_set_info; + char *name; { char title_a[3]; char vob_a[2]; @@ -697,4 +698,4 @@ } } -#endif /*DVD_VIDEO*/ +#endif /*DVD_AUD_VID*/ diff -Nru cdrtools-2.01.01a33/mkisofs/dvd_reader.c cdrtools-3.02a09/mkisofs/dvd_reader.c --- cdrtools-2.01.01a33/mkisofs/dvd_reader.c 2006-10-03 01:08:51.000000000 +0000 +++ cdrtools-3.02a09/mkisofs/dvd_reader.c 2015-12-15 19:16:41.000000000 +0000 @@ -1,7 +1,8 @@ -/* @(#)dvd_reader.c 1.6 06/10/03 joerg */ +/* @(#)dvd_reader.c 1.12 15/12/15 joerg */ +#include #ifndef lint -static char sccsid[] = - "@(#)dvd_reader.c 1.6 06/10/03 joerg"; +static UConst char sccsid[] = + "@(#)dvd_reader.c 1.12 15/12/15 joerg"; #endif /* * Copyright (C) 2001, 2002 Billy Biggs , @@ -35,7 +36,7 @@ * DON'T USE THIS LIBRARY IN ANY OTHER PROGRAM GET THE REAL * LIBDVDREAD INSTEAD */ -#ifdef DVD_VIDEO +#ifdef DVD_AUD_VID #include "mkisofs.h" #include @@ -53,12 +54,12 @@ EXPORT void DVDCloseFile __PR((dvd_file_t *dvd_file)); -LOCAL dvd_file_t * DVDOpenFilePath __PR((dvd_reader_t *dvd, char *filename)); -LOCAL dvd_file_t * DVDOpenVOBPath __PR((dvd_reader_t *dvd, int title, int menu)); -EXPORT dvd_file_t * DVDOpenFile __PR((dvd_reader_t *dvd, int titlenum, +LOCAL dvd_file_t *DVDOpenFilePath __PR((dvd_reader_t *dvd, char *filename)); +LOCAL dvd_file_t *DVDOpenVOBPath __PR((dvd_reader_t *dvd, int title, int menu)); +EXPORT dvd_file_t *DVDOpenFile __PR((dvd_reader_t *dvd, int titlenum, dvd_read_domain_t domain)); -LOCAL dvd_reader_t * DVDOpenPath __PR((const char *path_root)); -EXPORT dvd_reader_t * DVDOpen __PR((const char *path)); +LOCAL dvd_reader_t *DVDOpenPath __PR((const char *path_root)); +EXPORT dvd_reader_t *DVDOpen __PR((const char *path)); EXPORT void DVDClose __PR((dvd_reader_t *dvd)); EXPORT ssize_t DVDFileSize __PR((dvd_file_t *dvd_file)); @@ -94,7 +95,7 @@ "%s/%s", dvd->path_root, filename); - dvd_file = (dvd_file_t *) e_malloc(sizeof (dvd_file_t)); + dvd_file = (dvd_file_t *)e_malloc(sizeof (dvd_file_t)); if (!dvd_file) return (0); dvd_file->dvd = dvd; @@ -125,7 +126,7 @@ dvd_file_t *dvd_file; int i; - dvd_file = (dvd_file_t *) e_malloc(sizeof (dvd_file_t)); + dvd_file = (dvd_file_t *)e_malloc(sizeof (dvd_file_t)); if (!dvd_file) return (0); dvd_file->dvd = dvd; @@ -206,7 +207,7 @@ return (DVDOpenVOBPath(dvd, titlenum, 0)); default: - errmsgno(EX_BAD, "Invalid domain for file open.\n"); + errmsgno(EX_BAD, _("Invalid domain for file open.\n")); return (0); } return (DVDOpenFilePath(dvd, filename)); @@ -223,10 +224,10 @@ { dvd_reader_t *dvd; - dvd = (dvd_reader_t *) e_malloc(sizeof (dvd_reader_t)); + dvd = (dvd_reader_t *)e_malloc(sizeof (dvd_reader_t)); if (!dvd) return (0); - dvd->path_root = strdup(path_root); + dvd->path_root = e_strdup(path_root); return (dvd); } @@ -248,7 +249,7 @@ ret = stat(path, &fileinfo); if (ret < 0) { /* If we can't stat the file, give up */ - errmsg("Can't stat '%s'.\n", path); + errmsg(_("Can't stat '%s'.\n"), path); return (0); } @@ -258,7 +259,7 @@ } /* If it's none of the above, screw it. */ - errmsgno(EX_BAD, "Could not open '%s'.\n", path); + errmsgno(EX_BAD, _("Could not open '%s'.\n"), path); return (0); } @@ -288,4 +289,4 @@ return (dvd_file->filesize); } -#endif /* DVD_VIDEO */ +#endif /* DVD_AUD_VID */ diff -Nru cdrtools-2.01.01a33/mkisofs/eltorito.c cdrtools-3.02a09/mkisofs/eltorito.c --- cdrtools-2.01.01a33/mkisofs/eltorito.c 2007-07-26 21:18:11.000000000 +0000 +++ cdrtools-3.02a09/mkisofs/eltorito.c 2015-11-23 22:03:18.000000000 +0000 @@ -1,7 +1,8 @@ -/* @(#)eltorito.c 1.42 07/07/26 joerg */ +/* @(#)eltorito.c 1.52 15/11/23 joerg */ +#include #ifndef lint -static char sccsid[] = - "@(#)eltorito.c 1.42 07/07/26 joerg"; +static UConst char sccsid[] = + "@(#)eltorito.c 1.52 15/11/23 joerg"; #endif /* @@ -11,7 +12,7 @@ * Written by Michael Fulbright (1996). * * Copyright 1996 RedHat Software, Incorporated - * Copyright (c) 1999-2007 J. Schilling + * Copyright (c) 1999-2015 J. Schilling * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -28,7 +29,6 @@ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -#include #include "mkisofs.h" #include #include @@ -44,11 +44,14 @@ EXPORT void init_boot_catalog __PR((const char *path)); EXPORT void insert_boot_cat __PR((void)); LOCAL void get_torito_desc __PR((struct eltorito_boot_descriptor *boot_desc)); +LOCAL void fill_boot_shdr __PR((struct eltorito_sectionheader_entry *boot_shdr_entry, + int arch)); LOCAL void fill_boot_desc __PR((struct eltorito_defaultboot_entry *boot_desc_entry, struct eltorito_boot_entry_info *boot_entry)); EXPORT void get_boot_entry __PR((void)); EXPORT int new_boot_entry __PR((void)); -LOCAL int tvd_write __PR((FILE * outfile)); +EXPORT void ex_boot_enoent __PR((char *msg, char *pname)); +LOCAL int tvd_write __PR((FILE *outfile)); LOCAL struct eltorito_validation_entry valid_desc; @@ -65,7 +68,7 @@ const char *path; { #ifdef SORTING - struct eltorito_boot_entry_info * cbe; + struct eltorito_boot_entry_info *cbe; for (cbe = first_boot_entry; cbe != NULL; @@ -73,8 +76,8 @@ char *p; if (cbe->boot_image == NULL) - comerrno(EX_BAD, "Missing boot image name, use -eltorito-boot option.\n"); - p = (char *) e_malloc(strlen(cbe->boot_image) + strlen(path) + 2); + comerrno(EX_BAD, _("Missing boot image name, use -eltorito-boot option.\n")); + p = (char *)e_malloc(strlen(cbe->boot_image) + strlen(path) + 2); strcpy(p, path); if (p[strlen(p) - 1] != '/') { strcat(p, "/"); @@ -84,7 +87,7 @@ free(p); } #endif - bootcat_path = (char *) e_malloc(strlen(boot_catalog) + strlen(path) + 2); + bootcat_path = (char *)e_malloc(strlen(boot_catalog) + strlen(path) + 2); strcpy(bootcat_path, path); if (bootcat_path[strlen(bootcat_path) - 1] != '/') { strcat(bootcat_path, "/"); @@ -131,14 +134,14 @@ init_fstatbuf(); - buffer = (char *) e_malloc(SECTOR_SIZE); + buffer = (char *)e_malloc(SECTOR_SIZE); memset(buffer, 0, SECTOR_SIZE); /* * try to find the directory that will contain the boot.cat file * - not very neat, but I can't think of a better way */ - p1 = strdup(boot_catalog); + p1 = e_strdup(boot_catalog); /* get dirname (p1) and basename (p2) of boot.cat */ if ((p2 = strrchr(p1, '/')) != NULL) { @@ -148,9 +151,8 @@ /* find the dirname directory entry */ de = search_tree_file(root, p1); if (!de) { - comerrno(EX_BAD, - "Uh oh, I cant find the boot catalog directory '%s'!\n", - p1); + ex_boot_enoent(_("catalog directory"), p1); + /* NOTREACHED */ } this_dir = 0; @@ -166,9 +168,8 @@ this_dir = dir; if (this_dir == 0) { - comerrno(EX_BAD, - "Uh oh, I cant find the boot catalog directory '%s'!\n", - p3); + ex_boot_enoent(_("catalog directory"), p3); + /* NOTREACHED */ } } else { /* boot.cat is in the root directory */ @@ -201,13 +202,13 @@ s_entry->priority = 32768; iso9660_date(s_entry->isorec.date, fstatbuf.st_mtime); s_entry->inode = TABLE_INODE; - s_entry->dev = (dev_t) UNCACHED_DEVICE; + s_entry->dev = (dev_t)UNCACHED_DEVICE; set_723(s_entry->isorec.volume_sequence_number, volume_sequence_number); - set_733((char *) s_entry->isorec.size, SECTOR_SIZE); + set_733((char *)s_entry->isorec.size, SECTOR_SIZE); s_entry->size = SECTOR_SIZE; s_entry->filedir = this_dir; - s_entry->name = strdup(p2); + s_entry->name = e_strdup(p2); iso9660_file_length(p2, s_entry, 0); /* flag file as necessary */ @@ -231,7 +232,7 @@ sprintf(buffer, "F\t%s\n", s_entry->name); /* copy the TRANS.TBL entry info and clear the buffer */ - s_entry->table = strdup(buffer); + s_entry->table = e_strdup(buffer); memset(buffer, 0, SECTOR_SIZE); /* @@ -257,11 +258,18 @@ struct directory_entry *de2; /* Boot catalog */ int i; int offset; + int arch = 0; + int nentries = 0; struct eltorito_defaultboot_entry boot_desc_record; + struct eltorito_sectionheader_entry boot_shdr_record; +#ifdef __needed__ + struct eltorito_section_entry boot_section_record; +#endif + struct eltorito_sectionheader_entry *last_section_header = 0; memset(boot_desc, 0, sizeof (*boot_desc)); boot_desc->type[0] = 0; - memcpy(boot_desc->id, ISO_STANDARD_ID, sizeof (ISO_STANDARD_ID)); + strncpy(boot_desc->id, ISO_STANDARD_ID, sizeof (boot_desc->id)); boot_desc->version[0] = 1; memcpy(boot_desc->system_id, EL_TORITO_ID, sizeof (EL_TORITO_ID)); @@ -274,19 +282,28 @@ */ de2 = search_tree_file(root, boot_catalog); if (!de2 || !(de2->de_flags & MEMORY_FILE)) { - comerrno(EX_BAD, "Uh oh, I cant find the boot catalog '%s'!\n", - boot_catalog); + ex_boot_enoent(_("catalog"), boot_catalog); + /* NOTREACHED */ } set_731(boot_desc->bootcat_ptr, (unsigned int) get_733(de2->isorec.extent)); /* + * If the platform id for the first (default) boot entry has not been + * explicitly set, we default to EL_TORITO_ARCH_x86 + */ + if ((first_boot_entry->type & ELTORITO_BOOT_ID) == 0) { + first_boot_entry->boot_platform = EL_TORITO_ARCH_x86; + } + arch = first_boot_entry->boot_platform; + + /* * we have the boot image, so write boot catalog information * Next we write out the primary descriptor for the disc */ memset(&valid_desc, 0, sizeof (valid_desc)); valid_desc.headerid[0] = 1; - valid_desc.arch[0] = EL_TORITO_ARCH_x86; + valid_desc.arch[0] = arch; /* Platform id for the default boot */ /* * we'll shove start of publisher id into id field, @@ -296,8 +313,8 @@ memcpy_max(valid_desc.id, publisher, MIN(23, strlen(publisher))); - valid_desc.key1[0] = (char) 0x55; - valid_desc.key2[0] = (char) 0xAA; + valid_desc.key1[0] = (char)0x55; + valid_desc.key2[0] = (char)0xAA; /* compute the checksum */ checksum = 0; @@ -320,18 +337,66 @@ current_boot_entry != NULL; current_boot_entry = current_boot_entry->next, offset += sizeof (boot_desc_record)) { + int newarch = arch; + + if (current_boot_entry->type & ELTORITO_BOOT_ID) + newarch = current_boot_entry->boot_platform; + else + current_boot_entry->boot_platform = arch; - if (offset >= SECTOR_SIZE) { + /* + * El Torito has no such limitation but we currently have... + */ + if (offset >= (SECTOR_SIZE - sizeof (boot_desc_record))) { comerrno(EX_BAD, - "Too many El Torito boot entries\n"); + _("Too many El Torito boot entries\n")); + } + if (current_boot_entry == first_boot_entry) { + ; + /* EMPTY */ + } else if ((current_boot_entry == first_boot_entry->next) || + (arch != newarch) || + (current_boot_entry->type & ELTORITO_SECTION_HEADER)) { + if (last_section_header) + set_721(&last_section_header->entry_count, nentries); + nentries = 1; + last_section_header = (struct eltorito_sectionheader_entry *) + (de2->table + offset); + fill_boot_shdr(&boot_shdr_record, newarch); + memcpy(de2->table + offset, &boot_shdr_record, + sizeof (boot_shdr_record)); + offset += sizeof (boot_desc_record); + } else { + nentries++; /* Add entry to this section header */ } + /* + * This works because a section entry has the same essential + * layout as a default entry (and we do not populate the + * selection criteria fields). + */ fill_boot_desc(&boot_desc_record, current_boot_entry); memcpy(de2->table + offset, &boot_desc_record, sizeof (boot_desc_record)); } + + if (last_section_header) { + set_721(&last_section_header->entry_count, nentries); + last_section_header->header_id[0] = EL_TORITO_SHDR_ID_LAST_SHDR; + } + } /* get_torito_desc(... */ LOCAL void +fill_boot_shdr(boot_shdr_entry, arch) + struct eltorito_sectionheader_entry *boot_shdr_entry; + int arch; +{ + memset(boot_shdr_entry, 0, sizeof (struct eltorito_sectionheader_entry)); + boot_shdr_entry->header_id[0] = EL_TORITO_SHDR_ID_SHDR; + boot_shdr_entry->platform_id[0] = arch; +} + +LOCAL void fill_boot_desc(boot_desc_entry, boot_entry) struct eltorito_defaultboot_entry *boot_desc_entry; struct eltorito_boot_entry_info *boot_entry; @@ -348,12 +413,12 @@ /* now adjust boot catalog lets find boot image first */ de = search_tree_file(root, boot_entry->boot_image); if (!de) { - comerrno(EX_BAD, "Uh oh, I cant find the boot image '%s' !\n", - boot_entry->boot_image); + ex_boot_enoent(_("image"), boot_entry->boot_image); + /* NOTREACHED */ } /* now make the initial/default entry for boot catalog */ memset(boot_desc_entry, 0, sizeof (*boot_desc_entry)); - boot_desc_entry->boot_id[0] = (char) boot_entry->not_bootable ? + boot_desc_entry->boot_id[0] = (char)boot_entry->not_bootable ? EL_TORITO_NOT_BOOTABLE : EL_TORITO_BOOTABLE; /* use default BIOS loadpnt */ @@ -369,30 +434,30 @@ if (verbose > 0) { fprintf(stderr, - "Size of boot image is %d sectors -> ", nsectors); + _("Size of boot image is %d sectors -> "), nsectors); } if (boot_entry->hard_disk_boot) { /* sanity test hard disk boot image */ boot_desc_entry->boot_media[0] = EL_TORITO_MEDIA_HD; if (verbose > 0) - fprintf(stderr, "Emulating a hard disk\n"); + fprintf(stderr, _("Emulating a hard disk\n")); /* read MBR */ bootmbr = open(de->whole_name, O_RDONLY | O_BINARY); if (bootmbr == -1) { - comerr("Error opening boot image '%s' for read.\n", + comerr(_("Error opening boot image '%s' for read.\n"), de->whole_name); } if (read(bootmbr, &disk_mbr, sizeof (disk_mbr)) != sizeof (disk_mbr)) { - comerr("Error reading MBR from boot image '%s'.\n", + comerr(_("Error reading MBR from boot image '%s'.\n"), de->whole_name); } close(bootmbr); if (la_to_u_2_byte(disk_mbr.magic) != MBR_MAGIC) { errmsgno(EX_BAD, - "Warning: boot image '%s' MBR is not a boot sector.\n", + _("Warning: boot image '%s' MBR is not a boot sector.\n"), de->whole_name); } /* find partition type */ @@ -410,7 +475,7 @@ if (boot_desc_entry->sys_type[0] != PARTITION_UNUSED) { comerrno(EX_BAD, - "Boot image '%s' has multiple partitions.\n", + _("Boot image '%s' has multiple partitions.\n"), de->whole_name); } boot_desc_entry->sys_type[0] = @@ -421,20 +486,20 @@ disk_mbr.partition[i].status != PARTITION_ACTIVE) { fprintf(stderr, - "Warning: partition not marked active.\n"); + _("Warning: partition not marked active.\n")); } if (MBR_CYLINDER(s_cyl_sec) != 0 || disk_mbr.partition[i].s_head != 1 || MBR_SECTOR(s_cyl_sec != 1)) { fprintf(stderr, - "Warning: partition does not start at 0/1/1.\n"); + _("Warning: partition does not start at 0/1/1.\n")); } geosec = (MBR_CYLINDER(e_cyl_sec) + 1) * (disk_mbr.partition[i].e_head + 1) * MBR_SECTOR(e_cyl_sec); if (geosec != nsectors) { fprintf(stderr, - "Warning: image size does not match geometry (%d)\n", + _("Warning: image size does not match geometry (%d)\n"), geosec); } #ifdef DEBUG_TORITO @@ -451,7 +516,7 @@ } if (boot_desc_entry->sys_type[0] == PARTITION_UNUSED) { comerrno(EX_BAD, - "Boot image '%s' has no partitions.\n", + _("Boot image '%s' has no partitions.\n"), de->whole_name); } #ifdef DEBUG_TORITO @@ -468,28 +533,28 @@ */ boot_desc_entry->boot_media[0] = EL_TORITO_MEDIA_NOEMUL; if (verbose > 0) - fprintf(stderr, "No emulation\n"); + fprintf(stderr, _("No emulation\n")); } else { /* choose size of emulated floppy based on boot image size */ if (nsectors == 2880) { boot_desc_entry->boot_media[0] = EL_TORITO_MEDIA_144FLOP; if (verbose > 0) - fprintf(stderr, "Emulating a 1440 kB floppy\n"); + fprintf(stderr, _("Emulating a 1440 kB floppy\n")); } else if (nsectors == 5760) { boot_desc_entry->boot_media[0] = EL_TORITO_MEDIA_288FLOP; if (verbose > 0) - fprintf(stderr, "Emulating a 2880 kB floppy\n"); + fprintf(stderr, _("Emulating a 2880 kB floppy\n")); } else if (nsectors == 2400) { boot_desc_entry->boot_media[0] = EL_TORITO_MEDIA_12FLOP; if (verbose > 0) - fprintf(stderr, "Emulating a 1200 kB floppy\n"); + fprintf(stderr, _("Emulating a 1200 kB floppy\n")); } else { comerrno(EX_BAD, - "Error - boot image '%s' has not an allowable size.\n", + _("Error - boot image '%s' has not an allowable size.\n"), de->whole_name); } @@ -520,7 +585,7 @@ bootimage = open(de->whole_name, O_RDWR | O_BINARY); if (bootimage == -1) { comerr( - "Error opening boot image file '%s' for update.\n", + _("Error opening boot image file '%s' for update.\n"), de->whole_name); } /* Compute checksum of boot image, sans 64 bytes */ @@ -529,7 +594,7 @@ while ((len = read(bootimage, csum_buffer, SECTOR_SIZE)) > 0) { if (total_len & 3) { comerrno(EX_BAD, - "Odd alignment at non-end-of-file in boot image '%s'.\n", + _("Odd alignment at non-end-of-file in boot image '%s'.\n"), de->whole_name); } if (total_len < 64) @@ -543,7 +608,7 @@ if (total_len != de->size) { comerrno(EX_BAD, - "Boot image file '%s' changed underneath us!\n", + _("Boot image file '%s' changed underneath us!\n"), de->whole_name); } /* End of file, set position to byte 8 */ @@ -573,7 +638,9 @@ if (!first_boot_entry) { first_boot_entry = current_boot_entry; last_boot_entry = current_boot_entry; + current_boot_entry->boot_platform = EL_TORITO_ARCH_x86; } else { + current_boot_entry->boot_platform = last_boot_entry->boot_platform; last_boot_entry->next = current_boot_entry; last_boot_entry = current_boot_entry; } @@ -587,6 +654,18 @@ } /* + * Exit with a boot no entry message. + */ +EXPORT void +ex_boot_enoent(msg, pname) + char *msg; + char *pname; +{ + comerrno(EX_BAD, _("Uh oh, I cant find the boot %s '%s' inside the target tree.\n"), msg, pname); + /* NOTREACHED */ +} + +/* * Function to write the EVD for the disc. */ LOCAL int @@ -595,7 +674,7 @@ { /* check the boot image is not NULL */ if (!boot_image) { - comerrno(EX_BAD, "No boot image specified.\n"); + comerrno(EX_BAD, _("No boot image specified.\n")); } /* Next we write out the boot volume descriptor for the disc */ get_torito_desc(&gboot_desc); diff -Nru cdrtools-2.01.01a33/mkisofs/exclude.c cdrtools-3.02a09/mkisofs/exclude.c --- cdrtools-2.01.01a33/mkisofs/exclude.c 2006-10-03 10:46:01.000000000 +0000 +++ cdrtools-3.02a09/mkisofs/exclude.c 1970-01-01 00:00:00.000000000 +0000 @@ -1,67 +0,0 @@ -/* @(#)exclude.c 1.11 06/10/03 joerg */ -#ifndef lint -static char sccsid[] = - "@(#)exclude.c 1.11 06/10/03 joerg"; -#endif -/* - * 9-Dec-93 R.-D. Marzusch, marzusch@odiehh.hanse.de: - * added 'exclude' option (-x) to specify pathnames NOT to be included in - * CD image. - */ - -#include -#include -#include -#include -#include -#include - - -/* this allows for 1000 entries to be excluded ... */ -#define MAXEXCL 1000 - -static char *excl[MAXEXCL]; - -void exclude __PR((char *fn)); -int is_excluded __PR((char *fn)); - - -void -exclude(fn) - char *fn; -{ - register int i; - - for (i = 0; excl[i] && i < MAXEXCL; i++) - ; - - if (i == MAXEXCL) { - fprintf(stderr, - "Can't exclude '%s' - too many entries in table\n", - fn); - return; - } - excl[i] = (char *) malloc(strlen(fn) + 1); - if (excl[i] == NULL) { - errmsg("Can't allocate memory for excluded filename\n"); - return; - } - strcpy(excl[i], fn); -} - -int -is_excluded(fn) - char *fn; -{ - register int i; - - /* - * very dumb search method ... - */ - for (i = 0; excl[i] && i < MAXEXCL; i++) { - if (strcmp(excl[i], fn) == 0) { - return (1); /* found -> excluded filenmae */ - } - } - return (0); /* not found -> not excluded */ -} diff -Nru cdrtools-2.01.01a33/mkisofs/exclude.h cdrtools-3.02a09/mkisofs/exclude.h --- cdrtools-2.01.01a33/mkisofs/exclude.h 2004-03-01 23:51:07.000000000 +0000 +++ cdrtools-3.02a09/mkisofs/exclude.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,9 +0,0 @@ -/* @(#)exclude.h 1.3 04/03/02 eric */ -/* - * 9-Dec-93 R.-D. Marzusch, marzusch@odiehh.hanse.de: - * added 'exclude' option (-x) to specify pathnames NOT to be included in - * CD image. - */ - -void exclude __PR((char * fn)); -int is_excluded __PR((char * fn)); diff -Nru cdrtools-2.01.01a33/mkisofs/files.c cdrtools-3.02a09/mkisofs/files.c --- cdrtools-2.01.01a33/mkisofs/files.c 2006-10-03 10:47:07.000000000 +0000 +++ cdrtools-3.02a09/mkisofs/files.c 2010-12-19 19:16:30.000000000 +0000 @@ -1,7 +1,7 @@ -/* @(#)files.c 1.15 06/10/03 joerg */ +/* @(#)files.c 1.19 10/12/19 joerg */ #ifndef lint static char sccsid[] = - "@(#)files.c 1.15 06/10/03 joerg"; + "@(#)files.c 1.19 10/12/19 joerg"; #endif /* @@ -10,6 +10,7 @@ * Written by Eric Youngdale (1993). * * Copyright 1993 Yggdrasil Computing, Incorporated + * Copyright (c) 1999-2010 J. Schilling * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -32,14 +33,14 @@ #include "mkisofs.h" #include #include -#include +#include #ifdef ADD_FILES void add_one_file __PR((char *addpath, char *path)); void add_file_list __PR((int argc, char **argv, int ind)); void add_file __PR((char *filename)); -char * look_up_addition __PR((char **newpath, char *path, +char *look_up_addition __PR((char **newpath, char *path, struct dirent **de)); void nuke_duplicates __PR((char *path, struct dirent **de)); struct dirent *readdir_add_files __PR((char **pathp, char *path, DIR *dir)); @@ -135,7 +136,7 @@ /* add a new node. */ tmp->next = e_malloc(sizeof (*tmp->next)); f = tmp->next; - f->name = strdup(cp); + f->name = e_strdup(cp); f->child = NULL; f->next = NULL; f->add_count = 0; @@ -145,7 +146,7 @@ /* no children. */ f->child = e_malloc(sizeof (*f->child)); f = f->child; - f->name = strdup(cp); + f->name = e_strdup(cp); f->child = NULL; f->next = NULL; f->add_count = 0; @@ -169,8 +170,8 @@ /* Now f really points to where we should add this name. */ f->add_count++; f->adds = realloc(f->adds, sizeof (*f->adds) * f->add_count); - f->adds[f->add_count - 1].path = strdup(path); - f->adds[f->add_count - 1].name = strdup(name); + f->adds[f->add_count - 1].path = e_strdup(path); + f->adds[f->add_count - 1].name = e_strdup(name); } /* @@ -190,7 +191,7 @@ char *dup_arg; while (ind < argc) { - dup_arg = strdup(argv[ind]); + dup_arg = e_strdup(argv[ind]); ptr = strchr(dup_arg, '='); if (ptr == NULL) { free(dup_arg); @@ -219,7 +220,7 @@ } else { f = fopen(filename, "r"); if (f == NULL) { - comerr("Cannot open '%s'.\n", filename); + comerr(_("Cannot open '%s'.\n"), filename); } } while (fgets(buff, sizeof (buff), f)) { @@ -236,7 +237,7 @@ ptr[strlen(ptr) - 1] = 0; p2 = strchr(ptr, '='); if (p2 == NULL) { - comerrno(EX_BAD, "Error in file '%s' line %d: %s\n", + comerrno(EX_BAD, _("Error in file '%s' line %d: %s\n"), filename, count, buff); } *p2 = 0; @@ -264,7 +265,7 @@ return (NULL); /* I don't trust strtok */ - dup_path = strdup(path); + dup_path = e_strdup(path); cp = strtok(dup_path, SPATH_SEPARATOR); while (cp != NULL) { @@ -314,7 +315,7 @@ return; /* I don't trust strtok */ - dup_path = strdup(path); + dup_path = e_strdup(path); cp = strtok(dup_path, SPATH_SEPARATOR); while (cp != NULL) { diff -Nru cdrtools-2.01.01a33/mkisofs/hash.c cdrtools-3.02a09/mkisofs/hash.c --- cdrtools-2.01.01a33/mkisofs/hash.c 2006-10-04 18:04:12.000000000 +0000 +++ cdrtools-3.02a09/mkisofs/hash.c 2016-12-13 21:39:34.000000000 +0000 @@ -1,7 +1,8 @@ -/* @(#)hash.c 1.23 06/10/04 joerg */ +/* @(#)hash.c 1.30 16/12/13 joerg */ +#include #ifndef lint -static char sccsid[] = - "@(#)hash.c 1.23 06/10/04 joerg"; +static UConst char sccsid[] = + "@(#)hash.c 1.30 16/12/13 joerg"; #endif /* @@ -10,7 +11,7 @@ * Written by Eric Youngdale (1993). * * Copyright 1993 Yggdrasil Computing, Incorporated - * Copyright (c) 1999,2000-2006 J. Schilling + * Copyright (c) 1999,2000-2016 J. Schilling * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -46,9 +47,11 @@ * allow to disable the mkisofs inode cache. */ -#include +/* DUPLICATES_ONCE Alex Kopylov cdrtools@bootcd.ru 19.06.2004 */ + #include "mkisofs.h" #include +#include #define NR_HASH (16*1024) @@ -56,11 +59,32 @@ static struct file_hash *hash_table[NR_HASH]; +#ifdef DUPLICATES_ONCE + +#define DIGEST_FAST_SIZE 65536 +#define UNIQUE_FILES_HASH_FN(SIZE) ((SIZE) % NR_HASH) + +#ifndef DIGEST_Init +#define DIGEST_Init SHA3_512_Init +#define DIGEST_Update SHA3_Update +#define DIGEST_Final SHA3_Final +#define DIGEST_CTX SHA3_CTX +#define DIGEST_LENGTH SHA3_512_DIGEST_LENGTH + +#ifdef SHORT_DIGEST +#undef DIGEST_Init +#undef DIGEST_LENGTH +#define DIGEST_Init SHA3_256_Init +#define DIGEST_LENGTH SHA3_256_DIGEST_LENGTH +#endif /* SHORT_DIGEST */ +#endif /* DIGEST_Init */ +#endif + #ifdef HASH_DEBUG EXPORT void debug_hash __PR((void)); #endif EXPORT void add_hash __PR((struct directory_entry *spnt)); -EXPORT struct file_hash *find_hash __PR((dev_t dev, ino_t inode)); +EXPORT struct file_hash *find_hash __PR((struct directory_entry *spnt)); EXPORT void flush_hash __PR((void)); EXPORT void add_directory_hash __PR((dev_t dev, ino_t inode)); EXPORT struct file_hash *find_directory_hash __PR((dev_t dev, ino_t inode)); @@ -70,6 +94,12 @@ LOCAL BOOL isoname_endsok __PR((char *name)); EXPORT int delete_file_hash __PR((struct directory_entry *de)); EXPORT void flush_file_hash __PR((void)); +#ifdef DUPLICATES_ONCE +LOCAL struct directory_entry *compare_files __PR(( + struct directory_entry *spnt1, + struct directory_entry *spnt2)); +LOCAL unsigned char *DIGEST_File __PR((char *name, size_t size)); +#endif #ifdef HASH_DEBUG EXPORT void @@ -111,67 +141,94 @@ struct directory_entry *spnt; { struct file_hash *s_hash; - unsigned int hash_number; + unsigned int hash_number = 0; if (spnt->size == 0 || spnt->starting_block == 0) if (spnt->size != 0 && spnt->starting_block == 0) { comerrno(EX_BAD, - "Non zero-length file '%s' assigned zero extent.\n", + _("Non zero-length file '%s' assigned zero extent.\n"), spnt->name); }; +#ifdef DUPLICATES_ONCE + if (!cache_inodes && !duplicates_once) +#else if (!cache_inodes) +#endif return; if (spnt->dev == UNCACHED_DEVICE && (spnt->inode == TABLE_INODE || spnt->inode == UNCACHED_INODE)) { return; } - hash_number = HASH_FN((unsigned int) spnt->dev, +#ifdef DUPLICATES_ONCE + if (cache_inodes) +#endif + hash_number = HASH_FN((unsigned int) spnt->dev, (unsigned int) spnt->inode); +#ifdef DUPLICATES_ONCE + else if (duplicates_once && + spnt->size && !(spnt->isorec.flags[0] & ISO_DIRECTORY)) + hash_number = UNIQUE_FILES_HASH_FN((unsigned int) spnt->size); +#endif #if 0 if (verbose > 1) fprintf(stderr, "%s ", spnt->name); #endif - s_hash = (struct file_hash *) e_malloc(sizeof (struct file_hash)); + s_hash = (struct file_hash *)e_malloc(sizeof (struct file_hash)); s_hash->next = hash_table[hash_number]; s_hash->inode = spnt->inode; s_hash->dev = spnt->dev; s_hash->nlink = 0; s_hash->starting_block = spnt->starting_block; s_hash->size = spnt->size; -#ifdef SORTING +#if defined(SORTING) || defined(DUPLICATES_ONCE) s_hash->de = spnt; -#endif /* SORTING */ +#endif /* defined(SORTING) || defined(DUPLICATES_ONCE) */ hash_table[hash_number] = s_hash; } -#ifdef PROTOTYPES -EXPORT struct file_hash * -find_hash(dev_t dev, ino_t inode) -#else EXPORT struct file_hash * -find_hash(dev, inode) - dev_t dev; - ino_t inode; -#endif +find_hash(spnt) + struct directory_entry *spnt; { unsigned int hash_number; - struct file_hash *spnt; + struct file_hash *s_hash; +#ifdef DUPLICATES_ONCE + if (!cache_inodes && !duplicates_once) +#else if (!cache_inodes) +#endif return (NULL); - if (dev == UNCACHED_DEVICE && - (inode == TABLE_INODE || inode == UNCACHED_INODE)) + if (spnt->dev == UNCACHED_DEVICE && + (spnt->inode == TABLE_INODE || spnt->inode == UNCACHED_INODE)) return (NULL); - hash_number = HASH_FN((unsigned int) dev, (unsigned int) inode); - spnt = hash_table[hash_number]; - while (spnt) { - if (spnt->inode == inode && spnt->dev == dev) - return (spnt); - spnt = spnt->next; - }; +#ifdef DUPLICATES_ONCE + if (cache_inodes) { +#endif + hash_number = HASH_FN((unsigned int) spnt->dev, + (unsigned int) spnt->inode); + s_hash = hash_table[hash_number]; + while (s_hash) { + if (s_hash->inode == spnt->inode && + s_hash->dev == spnt->dev) + return (s_hash); + s_hash = s_hash->next; + } +#ifdef DUPLICATES_ONCE + } else if (duplicates_once && + spnt->size && !(spnt->isorec.flags[0] & ISO_DIRECTORY)) { + hash_number = UNIQUE_FILES_HASH_FN((unsigned int) spnt->size); + s_hash = hash_table[hash_number]; + while (s_hash) { + if (compare_files(spnt, s_hash->de)) + return (s_hash); + s_hash = s_hash->next; + } + } +#endif return (NULL); } @@ -197,6 +254,88 @@ } } +#ifdef DUPLICATES_ONCE +LOCAL struct directory_entry * +compare_files(spnt1, spnt2) + struct directory_entry *spnt1; + struct directory_entry *spnt2; +{ + if (spnt1->size != spnt2->size) + return (NULL); + + if (!spnt1->digest_fast) + if (!(spnt1->digest_fast = DIGEST_File(spnt1->whole_name, + (spnt1->size > DIGEST_FAST_SIZE) ? + DIGEST_FAST_SIZE : spnt1->size))) + return (NULL); + + if (spnt1->size <= DIGEST_FAST_SIZE) + spnt1->digest_full = spnt1->digest_fast; + + if (!spnt2->digest_fast) + if (!(spnt2->digest_fast = DIGEST_File(spnt2->whole_name, + (spnt2->size > DIGEST_FAST_SIZE) ? + DIGEST_FAST_SIZE : spnt2->size))) + return (NULL); + + if (spnt2->size <= DIGEST_FAST_SIZE) + spnt2->digest_full = spnt2->digest_fast; + + if (memcmp(spnt1->digest_fast, spnt2->digest_fast, + DIGEST_LENGTH * sizeof (unsigned char))) + return (NULL); + + if (!spnt1->digest_full) + if (!(spnt1->digest_full = DIGEST_File(spnt1->whole_name, + spnt1->size))) + return (NULL); + + if (!spnt2->digest_full) + if (!(spnt2->digest_full = DIGEST_File(spnt2->whole_name, + spnt2->size))) + return (NULL); + + if (memcmp(spnt1->digest_full, spnt2->digest_full, + DIGEST_LENGTH * sizeof (unsigned char))) + return (NULL); + + return (spnt2); +} + +LOCAL unsigned char * +DIGEST_File(name, size) + char *name; + size_t size; +{ + DIGEST_CTX digest_ctx; + FILE *infile; + unsigned char buf[32768]; + unsigned char *digest_hash; + size_t cnt; + + DIGEST_Init(&digest_ctx); + + if ((infile = fopen(name, "rb")) == NULL) + return (NULL); + + while (size) { + cnt = (size > sizeof (buf)) ? sizeof (buf) : size; + if ((cnt = fread(buf, 1, cnt, infile)) <= 0) { + fclose(infile); + return (NULL); + } + DIGEST_Update(&digest_ctx, buf, cnt); + size -= cnt; + } + + fclose(infile); + + digest_hash = e_malloc(sizeof (unsigned char) * DIGEST_LENGTH); + DIGEST_Final(digest_hash, &digest_ctx); + return (digest_hash); +} +#endif + static struct file_hash *directory_hash_table[NR_HASH]; #ifdef PROTOTYPES @@ -220,7 +359,7 @@ hash_number = HASH_FN((unsigned int) dev, (unsigned int) inode); - s_hash = (struct file_hash *) e_malloc(sizeof (struct file_hash)); + s_hash = (struct file_hash *)e_malloc(sizeof (struct file_hash)); s_hash->next = directory_hash_table[hash_number]; s_hash->inode = inode; s_hash->dev = dev; @@ -302,7 +441,7 @@ Uchar *p; int sum = 0; - new = (struct name_hash *) e_malloc(sizeof (struct name_hash)); + new = (struct name_hash *)e_malloc(sizeof (struct name_hash)); new->de = de; new->next = NULL; for (p = (Uchar *)de->isorec.name; *p; p++) { @@ -343,7 +482,7 @@ p1 = name; p2 = nh->de->isorec.name; if (debug > 1) - error("Checking name '%s' isorec.name '%s'\n", p1, p2); + error(_("Checking name '%s' isorec.name '%s'\n"), p1, p2); /* Look for end of string, or a mismatch. */ while (1 == 1) { @@ -358,9 +497,9 @@ if (!isoname_endsok(p1) || !isoname_endsok(p2)) { if (debug > 1) { if (!isoname_endsok(p1)) - error("'%s' does NOT END OK\n", p1); + error(_("'%s' does NOT END OK\n"), p1); if (!isoname_endsok(p2)) - error("'%s' does NOT END OK\n", p2); + error(_("'%s' does NOT END OK\n"), p2); } /* * If one file does not end with a valid version number diff -Nru cdrtools-2.01.01a33/mkisofs/ifo_read.c cdrtools-3.02a09/mkisofs/ifo_read.c --- cdrtools-2.01.01a33/mkisofs/ifo_read.c 2006-10-03 01:17:12.000000000 +0000 +++ cdrtools-3.02a09/mkisofs/ifo_read.c 2016-10-23 17:16:00.000000000 +0000 @@ -1,12 +1,12 @@ -/* @(#)ifo_read.c 1.8 06/10/03 joerg */ +/* @(#)ifo_read.c 1.17 16/10/23 joerg */ +#include #ifndef lint -static char sccsid[] = - "@(#)ifo_read.c 1.8 06/10/03 joerg"; +static UConst char sccsid[] = + "@(#)ifo_read.c 1.17 16/10/23 joerg"; #endif /* * Copyright (C) 2002 Olaf Beck - * Jörg Schilling - * (making the code portable) + * Copyright (C) 2002-2016 Jörg Schilling * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -33,9 +33,8 @@ * DON'T USE THIS LIBRARY IN ANY OTHER PROGRAM GET THE REAL * LIBDVDREAD INSTEAD */ -#ifdef DVD_VIDEO +#ifdef DVD_AUD_VID -#include #include "mkisofs.h" #include #include @@ -44,22 +43,22 @@ #include "ifo_read.h" #include "bswap.h" -LOCAL ifo_handle_t * ifoReadVTSI __PR((int file, ifo_handle_t * ifofile)); -LOCAL ifo_handle_t * ifoReadVGMI __PR((int file, ifo_handle_t * ifofile)); -EXPORT ifo_handle_t * ifoOpen __PR((dvd_reader_t *dvd, int title)); +LOCAL ifo_handle_t *ifoReadVTSI __PR((int file, ifo_handle_t *ifofile)); +LOCAL ifo_handle_t *ifoReadVGMI __PR((int file, ifo_handle_t *ifofile)); +EXPORT ifo_handle_t *ifoOpen __PR((dvd_reader_t *dvd, int title)); LOCAL void ifoFree_TT_SRPT __PR((ifo_handle_t *ifofile)); -EXPORT void ifoClose __PR((ifo_handle_t * ifofile)); +EXPORT void ifoClose __PR((ifo_handle_t *ifofile)); LOCAL ifo_handle_t * ifoReadVTSI(file, ifofile) int file; - ifo_handle_t * ifofile; + ifo_handle_t *ifofile; { off_t offset; UInt32_t sector; - vtsi_mat_t * vtsi_mat; + vtsi_mat_t *vtsi_mat; /* Make the VMG part NULL */ ifofile->vmgi_mat = NULL; @@ -79,13 +78,13 @@ offset = 12; if (lseek(file, offset, SEEK_SET) != offset) { - errmsg("Failed to seek VIDEO_TS.IFO.\n"); + errmsg(_("Failed to seek VIDEO_TS.IFO.\n")); ifoClose(ifofile); return (0); } if (read(file, §or, sizeof (sector)) != sizeof (sector)) { - errmsg("Failed to read VIDEO_TS.IFO.\n"); + errmsg(_("Failed to read VIDEO_TS.IFO.\n")); ifoClose(ifofile); return (0); } @@ -99,13 +98,13 @@ offset = 28; if (lseek(file, offset, SEEK_SET) != offset) { - errmsg("Failed to seek VIDEO_TS.IFO.\n"); + errmsg(_("Failed to seek VIDEO_TS.IFO.\n")); ifoClose(ifofile); return (0); } if (read(file, §or, sizeof (sector)) != sizeof (sector)) { - errmsg("Failed to read VIDEO_TS.IFO.\n"); + errmsg(_("Failed to read VIDEO_TS.IFO.\n")); ifoClose(ifofile); return (0); } @@ -120,14 +119,14 @@ offset = 192; if (lseek(file, offset, SEEK_SET) != offset) { - errmsg("Failed to seek VIDEO_TS.IFO.\n"); + errmsg(_("Failed to seek VIDEO_TS.IFO.\n")); ifoClose(ifofile); return (0); } if (read(file, §or, sizeof (sector)) != sizeof (sector)) { - errmsg("Failed to read VIDEO_TS.IFO.\n"); + errmsg(_("Failed to read VIDEO_TS.IFO.\n")); ifoClose(ifofile); return (0); } @@ -142,14 +141,14 @@ offset = 196; if (lseek(file, offset, SEEK_SET) != offset) { - errmsg("Failed to seek VIDEO_TS.IFO.\n"); + errmsg(_("Failed to seek VIDEO_TS.IFO.\n")); ifoClose(ifofile); return (0); } if (read(file, §or, sizeof (sector)) != sizeof (sector)) { - errmsg("Failed to read VIDEO_TS.IFO.\n"); + errmsg(_("Failed to read VIDEO_TS.IFO.\n")); ifoClose(ifofile); return (0); } @@ -165,7 +164,7 @@ LOCAL ifo_handle_t * ifoReadVGMI(file, ifofile) int file; - ifo_handle_t * ifofile; + ifo_handle_t *ifofile; { off_t offset; Uint counter; @@ -192,13 +191,13 @@ offset = 12; if (lseek(file, offset, SEEK_SET) != offset) { - errmsg("Failed to seek VIDEO_TS.IFO.\n"); + errmsg(_("Failed to seek VIDEO_TS.IFO.\n")); ifoClose(ifofile); return (0); } if (read(file, §or, sizeof (sector)) != sizeof (sector)) { - errmsg("Failed to read VIDEO_TS.IFO.\n"); + errmsg(_("Failed to read VIDEO_TS.IFO.\n")); ifoClose(ifofile); return (0); } @@ -212,14 +211,14 @@ offset = 28; if (lseek(file, offset, SEEK_SET) != offset) { - errmsg("Failed to seek VIDEO_TS.IFO.\n"); + errmsg(_("Failed to seek VIDEO_TS.IFO.\n")); ifoClose(ifofile); return (0); } if (read(file, §or, sizeof (sector)) != sizeof (sector)) { - errmsg("Failed to read VIDEO_TS.IFO.\n"); + errmsg(_("Failed to read VIDEO_TS.IFO.\n")); ifoClose(ifofile); return (0); } @@ -234,14 +233,14 @@ offset = 62; if (lseek(file, offset, SEEK_SET) != offset) { - errmsg("Failed to seek VIDEO_TS.IFO.\n"); + errmsg(_("Failed to seek VIDEO_TS.IFO.\n")); ifoClose(ifofile); return (0); } if (read(file, &titles, sizeof (titles)) != sizeof (titles)) { - errmsg("Failed to read VIDEO_TS.IFO.\n"); + errmsg(_("Failed to read VIDEO_TS.IFO.\n")); ifoClose(ifofile); return (0); } @@ -256,14 +255,14 @@ offset = 192; if (lseek(file, offset, SEEK_SET) != offset) { - errmsg("Failed to seek VIDEO_TS.IFO.\n"); + errmsg(_("Failed to seek VIDEO_TS.IFO.\n")); ifoClose(ifofile); return (0); } if (read(file, §or, sizeof (sector)) != sizeof (sector)) { - errmsg("Failed to read VIDEO_TS.IFO.\n"); + errmsg(_("Failed to read VIDEO_TS.IFO.\n")); ifoClose(ifofile); return (0); } @@ -278,14 +277,14 @@ offset = 196; if (lseek(file, offset, SEEK_SET) != offset) { - errmsg("Failed to seek VIDEO_TS.IFO.\n"); + errmsg(_("Failed to seek VIDEO_TS.IFO.\n")); ifoClose(ifofile); return (0); } if (read(file, §or, sizeof (sector)) != sizeof (sector)) { - errmsg("Failed to read VIDEO_TS.IFO.\n"); + errmsg(_("Failed to read VIDEO_TS.IFO.\n")); ifoClose(ifofile); return (0); } @@ -309,12 +308,12 @@ offset = 2048 * vmgi_mat->tt_srpt; if (lseek(file, offset, SEEK_SET) != offset) { - errmsg("Failed to seek VIDEO_TS.IFO.\n"); + errmsg(_("Failed to seek VIDEO_TS.IFO.\n")); return (0); } if (read(file, &titles, sizeof (titles)) != sizeof (titles)) { - errmsg("Failed to read VIDEO_TS.IFO.\n"); + errmsg(_("Failed to read VIDEO_TS.IFO.\n")); return (0); } @@ -334,13 +333,13 @@ for (counter = 0; counter < tt_srpt->nr_of_srpts; counter++) { offset = (2048 * vmgi_mat->tt_srpt) + 8 + (counter * 12) + 8; if (lseek(file, offset, SEEK_SET) != offset) { - errmsg("Failed to seek VIDEO_TS.IFO.\n"); + errmsg(_("Failed to seek VIDEO_TS.IFO.\n")); ifoClose(ifofile); return (0); } if (read(file, §or, sizeof (sector)) != sizeof (sector)) { - errmsg("Failed to read VIDEO_TS.IFO.\n"); + errmsg(_("Failed to read VIDEO_TS.IFO.\n")); ifoClose(ifofile); return (0); } @@ -363,7 +362,6 @@ /* File handles and offset */ int file; - off_t offset; char full_path[ PATH_MAX + 1 ]; /* Identifier of the IFO */ @@ -384,17 +382,16 @@ } if ((file = open(full_path, O_RDONLY | O_BINARY)) == -1) { - errmsg("Failed to open '%s'.\n", full_path); + errmsg(_("Failed to open '%s'.\n"), full_path); free(ifofile); return (0); } - offset = 0; - /* Determine if we have a VMGI or VTSI */ if (read(file, identifier, sizeof (identifier)) != sizeof (identifier)) { - errmsg("Failed to read VIDEO_TS.IFO.\n"); + errmsg(_("Failed to read VIDEO_TS.IFO.\n")); + free(ifofile); return (0); } @@ -407,7 +404,7 @@ close(file); return (ifofile); } else { - errmsgno(EX_BAD, "Giving up this is not a valid IFO file.\n"); + errmsgno(EX_BAD, _("Giving up this is not a valid IFO file.\n")); close(file); free(ifofile); ifofile = 0; @@ -433,7 +430,7 @@ EXPORT void ifoClose(ifofile) - ifo_handle_t * ifofile; + ifo_handle_t *ifofile; { if (!ifofile) @@ -442,7 +439,7 @@ ifoFree_TT_SRPT(ifofile); if (ifofile->vmgi_mat) { - free(ifofile->vtsi_mat); + free(ifofile->vmgi_mat); } if (ifofile->vtsi_mat) { @@ -452,4 +449,4 @@ free(ifofile); ifofile = 0; } -#endif /* DVD_VIDEO */ +#endif /* DVD_AUD_VID */ diff -Nru cdrtools-2.01.01a33/mkisofs/inode.c cdrtools-3.02a09/mkisofs/inode.c --- cdrtools-2.01.01a33/mkisofs/inode.c 2007-07-15 21:01:29.000000000 +0000 +++ cdrtools-3.02a09/mkisofs/inode.c 2016-11-14 19:21:09.000000000 +0000 @@ -1,7 +1,8 @@ -/* @(#)inode.c 1.8 07/07/15 Copyright 2006-2007 J. Schilling */ +/* @(#)inode.c 1.19 16/11/14 Copyright 2006-2016 J. Schilling */ +#include #ifndef lint -static char sccsid[] = - "@(#)inode.c 1.8 07/07/15 Copyright 2006-2007 J. Schilling"; +static UConst char sccsid[] = + "@(#)inode.c 1.19 16/11/14 Copyright 2006-2015 J. Schilling"; #endif /* * Inode and link count handling for ISO-9660/RR @@ -13,24 +14,10 @@ * of asigning the related number to the "extent" field in the ISO * directory record. * - * Copyright (c) 2006-2007 J. Schilling - */ -/* - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 - * as published by the Free Software Foundation. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License along with - * this program; see the file COPYING. If not, write to the Free Software - * Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * Copyright (c) 2006-2016 J. Schilling */ +/*@@C@@*/ -#include #include "mkisofs.h" #include @@ -60,16 +47,22 @@ if (correct_inodes) assign_inodes(root); +#ifdef UDF + if (!use_RockRidge && !use_udf) + return; +#else if (!use_RockRidge) return; - if (!cache_inodes) +#endif + if (!cache_inodes) /* Never FALSE if correct_inodes TRUE */ return; compute_linkcount(dpnt); - assign_linkcount(dpnt); + if (use_RockRidge) /* If we have Rock Ridge extensions, */ + assign_linkcount(dpnt); /* reassign computed linkcount in RR */ if (null_inodes < last_extent) - comerrno(EX_BAD, "Inode number overflow, too many files in file system.\n"); + comerrno(EX_BAD, _("Inode number overflow, too many files in file system.\n")); } /* @@ -114,17 +107,17 @@ s_entry = dpnt->contents; for (s_entry = dpnt->contents; s_entry; s_entry = s_entry->next) { if (s_entry->starting_block == 0) { - s_hash = find_hash(s_entry->dev, s_entry->inode); + s_hash = find_hash(s_entry); /* find_directory_hash() ? */ if (s_hash) s_entry->starting_block = s_hash->starting_block; } if (s_entry->starting_block == 0 && s_entry->size != 0) { - unsigned int e = get_733((char *) s_entry->isorec.extent); + unsigned int e = get_733((char *)s_entry->isorec.extent); if (e != 0) { errmsgno(EX_BAD, - "Implementation botch, fetching extend %d for %s from dir entry.\n", + _("Implementation botch, fetching extend %d for %s from dir entry.\n"), e, s_entry->whole_name); } } @@ -137,9 +130,14 @@ */ if (s_entry->size != 0) continue; +#ifdef UDF if ((s_entry->de_flags & IS_SYMLINK) != 0 && create_udfsymlinks) continue; +#else + if ((s_entry->de_flags & IS_SYMLINK) != 0) + continue; +#endif if (s_entry->isorec.flags[0] & ISO_DIRECTORY) continue; @@ -151,22 +149,22 @@ s_entry->dev = PREV_SESS_DEV; s_entry->inode = null_inodes; } - s_hash = find_hash(s_entry->dev, s_entry->inode); + s_hash = find_hash(s_entry); if (s_hash) { /* * Paranoia: Check for hashed files without proper inode #. */ if (s_hash->starting_block <= last_extent) comerrno(EX_BAD, - "Implementation botch: Hashed file '%s' has illegal inode %X.\n", + _("Implementation botch: Hashed file '%s' has illegal inode %u.\n"), s_entry->whole_name ? s_entry->whole_name : s_entry->name, s_hash->starting_block); - set_733((char *) s_entry->isorec.extent, s_hash->starting_block); + set_733((char *)s_entry->isorec.extent, s_hash->starting_block); s_entry->starting_block = s_hash->starting_block; } else { s_entry->starting_block = null_inodes--; - set_733((char *) s_entry->isorec.extent, s_entry->starting_block); + set_733((char *)s_entry->isorec.extent, s_entry->starting_block); add_hash(s_entry); } if (use_RockRidge) @@ -220,31 +218,35 @@ * With UDF symlinks, the starting_block is a * valid inode number. */ +#ifdef UDF if ((s_entry->de_flags & IS_SYMLINK) != 0 && create_udfsymlinks) { +#else + if ((s_entry->de_flags & IS_SYMLINK) != 0) { +#endif s_entry->inode = s_entry->starting_block; } else { s_entry->inode = null_inodes--; /* Only used for caching */ if (correct_inodes) comerrno(EX_BAD, - "Implementation botch: Unhashed file '%s'.\n", + _("Implementation botch: Unhashed file '%s'.\n"), s_entry->whole_name ? s_entry->whole_name : s_entry->name); } } - s_hash = find_hash(s_entry->dev, s_entry->inode); + s_hash = find_hash(s_entry); if (s_hash) { s_hash->nlink++; } else { add_hash(s_entry); - s_hash = find_hash(s_entry->dev, s_entry->inode); + s_hash = find_hash(s_entry); if (s_hash == NULL) { if (s_entry->dev == UNCACHED_DEVICE && s_entry->inode == TABLE_INODE) { continue; } comerrno(EX_BAD, - "Implementation botch: File '%s' not hashed (dev/ino %llX/%llX).\n", + _("Implementation botch: File '%s' not hashed (dev/ino %llX/%llX).\n"), s_entry->whole_name ? s_entry->whole_name : s_entry->name, (Llong)s_entry->dev, @@ -285,7 +287,7 @@ if (s_entry->de_flags & RESOURCE_FORK) continue; - s_hash = find_hash(s_entry->dev, s_entry->inode); + s_hash = find_hash(s_entry); if (s_hash) { update_nlink(s_entry, s_hash->nlink); } else { @@ -294,7 +296,7 @@ continue; } comerrno(EX_BAD, - "Implementation botch: File '%s' not hashed.\n", + _("Implementation botch: File '%s' not hashed.\n"), s_entry->whole_name ? s_entry->whole_name : s_entry->name); } @@ -327,13 +329,19 @@ while (len >= 4) { if (pnt[3] != 1 && pnt[3] != 2) { errmsgno(EX_BAD, - "**BAD RRVERSION (%d) for %c%c\n", - pnt[3], pnt[0], pnt[1]); + _("**BAD RRVERSION (%d) in '%c%c' field (%2.2X %2.2X).\n"), + pnt[3], pnt[0], pnt[1], pnt[0], pnt[1]); + } + if (pnt[2] < 4) { + errmsgno(EX_BAD, + _("**BAD RRLEN (%d) in '%2.2s' field %2.2X %2.2X.\n"), + pnt[2], pnt, pnt[0], pnt[1]); + break; } if (pnt[0] == 'P' && pnt[1] == 'X') { if ((pnt[2] & 0xFF) < 44) /* Paranoia */ return; - set_733((char *) pnt + 36, value); + set_733((char *)pnt + 36, value); break; } len -= pnt[2]; @@ -358,11 +366,17 @@ while (len >= 4) { if (pnt[3] != 1 && pnt[3] != 2) { errmsgno(EX_BAD, - "**BAD RRVERSION (%d) for %c%c\n", - pnt[3], pnt[0], pnt[1]); + _("**BAD RRVERSION (%d) in '%c%c' field (%2.2X %2.2X).\n"), + pnt[3], pnt[0], pnt[1], pnt[0], pnt[1]); + } + if (pnt[2] < 4) { + errmsgno(EX_BAD, + _("**BAD RRLEN (%d) in '%2.2s' field %2.2X %2.2X.\n"), + pnt[2], pnt, pnt[0], pnt[1]); + break; } if (pnt[0] == 'P' && pnt[1] == 'X') { - set_733((char *) pnt + 12, value); + set_733((char *)pnt + 12, value); break; } len -= pnt[2]; diff -Nru cdrtools-2.01.01a33/mkisofs/iso9660.h cdrtools-3.02a09/mkisofs/iso9660.h --- cdrtools-2.01.01a33/mkisofs/iso9660.h 2007-07-25 22:46:30.000000000 +0000 +++ cdrtools-3.02a09/mkisofs/iso9660.h 2011-06-04 13:05:14.000000000 +0000 @@ -1,4 +1,4 @@ -/* @(#)iso9660.h 1.21 07/07/26 joerg */ +/* @(#)iso9660.h 1.22 11/06/04 joerg */ /* * Header file iso9660.h - assorted structure definitions and typecasts. * specific to iso9660 filesystem. @@ -50,6 +50,7 @@ #define EL_TORITO_ARCH_x86 0 #define EL_TORITO_ARCH_PPC 1 #define EL_TORITO_ARCH_MAC 2 +#define EL_TORITO_ARCH_EFI 0xEF #define EL_TORITO_BOOTABLE 0x88 #define EL_TORITO_NOT_BOOTABLE 0 @@ -147,10 +148,15 @@ }; /* Validation entry for El Torito */ +/* + * headerid must be 1 + * id is the manufacturer ID + * cksum to make the sum of all shorts in this record 0 + */ struct eltorito_validation_entry { char headerid [ISODCL(1, 1)]; /* 711 */ char arch [ISODCL(2, 2)]; - char pad1 [ISODCL(3, 4)]; /* 711 */ + char pad1 [ISODCL(3, 4)]; /* 721 */ char id [ISODCL(5, 28)]; /* CD devel/man*/ char cksum [ISODCL(29, 30)]; char key1 [ISODCL(31, 31)]; @@ -161,7 +167,7 @@ struct eltorito_defaultboot_entry { char boot_id [ISODCL(1, 1)]; /* 711 */ char boot_media [ISODCL(2, 2)]; - char loadseg [ISODCL(3, 4)]; /* 711 */ + char loadseg [ISODCL(3, 4)]; /* 721 */ char sys_type [ISODCL(5, 5)]; char pad1 [ISODCL(6, 6)]; char nsect [ISODCL(7, 8)]; @@ -169,6 +175,29 @@ char pad2 [ISODCL(13, 32)]; }; +/* El Torito section header entry in boot catalog */ +struct eltorito_sectionheader_entry { +#define EL_TORITO_SHDR_ID_SHDR 0x90 +#define EL_TORITO_SHDR_ID_LAST_SHDR 0x91 + char header_id [ISODCL(1, 1)]; /* 711 */ + char platform_id [ISODCL(2, 2)]; + char entry_count [ISODCL(3, 4)]; /* 721 */ + char id [ISODCL(5, 32)]; +}; + +/* El Torito section entry in boot catalog */ +struct eltorito_section_entry { + char boot_id [ISODCL(1, 1)]; /* 711 */ + char boot_media [ISODCL(2, 2)]; + char loadseg [ISODCL(3, 4)]; /* 721 */ + char sys_type [ISODCL(5, 5)]; + char pad1 [ISODCL(6, 6)]; + char nsect [ISODCL(7, 8)]; + char bootoff [ISODCL(9, 12)]; + char sel_criteria [ISODCL(13, 13)]; + char vendor_sel_criteria [ISODCL(14, 32)]; +}; + /* * XXX JS: The next two structures have odd lengths! * Some compilers (e.g. on Sun3/mc68020) padd the structures to even length. diff -Nru cdrtools-2.01.01a33/mkisofs/isonum.c cdrtools-3.02a09/mkisofs/isonum.c --- cdrtools-2.01.01a33/mkisofs/isonum.c 2006-10-08 14:28:42.000000000 +0000 +++ cdrtools-3.02a09/mkisofs/isonum.c 2010-12-19 19:16:30.000000000 +0000 @@ -1,10 +1,11 @@ -/* @(#)isonum.c 1.6 06/10/08 Copyright 2006 J. Schilling */ +/* @(#)isonum.c 1.9 10/12/19 Copyright 2006-2010 J. Schilling */ +#include #ifndef lint -static char sccsid[] = - "@(#)isonum.c 1.6 06/10/08 Copyright 2006 J. Schilling"; +static UConst char sccsid[] = + "@(#)isonum.c 1.9 10/12/19 Copyright 2006-2010 J. Schilling"; #endif /* - * Copyright (c) 2006 J. Schilling + * Copyright (c) 2006-2010 J. Schilling */ /* * This program is free software; you can redistribute it and/or modify @@ -21,7 +22,6 @@ * Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#include #include "mkisofs.h" @@ -172,7 +172,7 @@ Uchar *p = vp; #if 0 if (p[0] != p[3] || p[1] != p[2]) { - comerrno(EX_BAD, "invalid format 7.2.3 number\n"); + comerrno(EX_BAD, _("Invalid format 7.2.3 number\n")); } #endif return (get_721(p)); diff -Nru cdrtools-2.01.01a33/mkisofs/joliet.c cdrtools-3.02a09/mkisofs/joliet.c --- cdrtools-2.01.01a33/mkisofs/joliet.c 2007-07-29 14:31:33.000000000 +0000 +++ cdrtools-3.02a09/mkisofs/joliet.c 2015-12-30 18:04:32.000000000 +0000 @@ -1,14 +1,15 @@ -/* @(#)joliet.c 1.53 07/07/29 joerg */ +/* @(#)joliet.c 1.68 15/12/30 joerg */ +#include #ifndef lint -static char sccsid[] = - "@(#)joliet.c 1.53 07/07/29 joerg"; +static UConst char sccsid[] = + "@(#)joliet.c 1.68 15/12/30 joerg"; #endif /* * File joliet.c - handle Win95/WinNT long file/unicode extensions for iso9660. * * Copyright 1997 Eric Youngdale. * APPLE_HYB James Pearson j.pearson@ge.ucl.ac.uk 22/2/2000 - * Copyright (c) 1999-2007 J. Schilling + * Copyright (c) 1999-2015 J. Schilling * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -82,7 +83,6 @@ * (00)(3f) '?' * (00)(5c) '\' */ -#include #include "mkisofs.h" #include #include @@ -94,6 +94,7 @@ LOCAL struct directory **jpathlist; LOCAL int next_jpath_index = 1; LOCAL int jsort_goof; +LOCAL int jsort_glen; LOCAL char ucs_codes[] = { '\0', /* UCS-level 0 is illegal */ @@ -170,11 +171,17 @@ return; } #ifdef USE_ICONV +#ifdef HAVE_ICONV_CONST +#define __IC_CONST const +#else +#define __IC_CONST +#endif if (use_iconv(inls)) { char *obuf = (char *)ob; size_t osize = 2; /* UCS-2 character size */ - if (iconv(inls->sic_cd2uni, (const char **)&from, fromsizep, + if (iconv(inls->sic_cd2uni, (__IC_CONST char **)&from, + fromsizep, &obuf, &osize) == -1) { int err = geterrno(); @@ -205,7 +212,7 @@ char *ibuf = (char *)ob; size_t isize = 2; /* UCS-2 character size */ - if (iconv(onls->sic_uni2cd, (const char **)&ibuf, &isize, + if (iconv(onls->sic_uni2cd, (__IC_CONST char **)&ibuf, &isize, (char **)&to, tosizep) == -1) { int err = geterrno(); @@ -248,6 +255,7 @@ int j; UInt16_t unichar; unsigned char uc; + int jsize = size; /* * If we get a NULL pointer for the source, it means we have an @@ -270,16 +278,28 @@ * Let all valid unicode characters pass * through (according to charset). Others are set to '_' . */ - uc = tmpbuf[j]; /* temporary copy */ - if (uc != '\0') { /* must be converted */ + if (j < jsize) + uc = tmpbuf[j]; /* temporary copy */ + else + uc = '\0'; + if (uc == '\0') { + jsize = j; + unichar = 0; + } else { /* must be converted */ #ifdef USE_ICONV if (use_iconv(inls)) { Uchar ob[2]; - const char *inbuf = (char *)&tmpbuf[j]; + __IC_CONST char *inbuf = (char *)&tmpbuf[j]; size_t isize = 3; char *obuf = (char *)ob; size_t osize = 2; + /* + * iconv() from glibc ignores osize and thus + * may try to access more than a single multi + * byte character from the input and read from + * non-existent memory. + */ if (iconv(inls->sic_cd2uni, &inbuf, &isize, &obuf, &osize) == -1) { int err = geterrno(); @@ -296,6 +316,14 @@ #endif unichar = sic_c2uni(inls, uc); /* Get the UNICODE */ + /* + * This code is currently also used for UDF formatting. + * Do not enforce silly Microsoft limitations in case + * that we only create UDF extensions. + */ + if (!use_Joliet) + goto all_chars; + if (unichar <= 0x1f || unichar == 0x7f) unichar = '\0'; /* control char */ @@ -315,8 +343,8 @@ */ unichar = '_'; } - } else { - unichar = 0; + all_chars: + ; } buffer[i] = unichar >> 8 & 0xFF; /* final UNICODE */ buffer[i + 1] = unichar & 0xFF; /* conversion */ @@ -357,11 +385,17 @@ while (string[j] != '\0') { Uchar ob[2]; - const char *inbuf = (char *)&string[j]; + __IC_CONST char *inbuf = (char *)&string[j]; size_t isize = 3; char *obuf = (char *)ob; size_t osize = 2; + /* + * iconv() from glibc ignores osize and thus + * may try to access more than a single multi + * byte character from the input and read from + * non-existent memory. + */ if (iconv(inls->sic_cd2uni, &inbuf, &isize, &obuf, &osize) == -1) { int err = geterrno(); @@ -414,7 +448,7 @@ sprintf(jvol_desc->escape_sequences, "%%/%c", ucs_codes[ucs_level]); /* Until we have Unicode path tables, leave these unset. */ - set_733((char *) jvol_desc->path_table_size, jpath_table_size); + set_733((char *)jvol_desc->path_table_size, jpath_table_size); set_731(jvol_desc->type_l_path_table, jpath_table[0]); set_731(jvol_desc->opt_type_l_path_table, jpath_table[1]); set_732(jvol_desc->type_m_path_table, jpath_table[2]); @@ -430,23 +464,23 @@ * so we will just be really lazy and do a char -> short conversion. * We probably will want to filter any characters >= 0x80. */ - convert_to_unicode((Uchar *) jvol_desc->system_id, + convert_to_unicode((Uchar *)jvol_desc->system_id, sizeof (jvol_desc->system_id), NULL, in_nls); - convert_to_unicode((Uchar *) jvol_desc->volume_id, + convert_to_unicode((Uchar *)jvol_desc->volume_id, sizeof (jvol_desc->volume_id), NULL, in_nls); - convert_to_unicode((Uchar *) jvol_desc->volume_set_id, + convert_to_unicode((Uchar *)jvol_desc->volume_set_id, sizeof (jvol_desc->volume_set_id), NULL, in_nls); - convert_to_unicode((Uchar *) jvol_desc->publisher_id, + convert_to_unicode((Uchar *)jvol_desc->publisher_id, sizeof (jvol_desc->publisher_id), NULL, in_nls); - convert_to_unicode((Uchar *) jvol_desc->preparer_id, + convert_to_unicode((Uchar *)jvol_desc->preparer_id, sizeof (jvol_desc->preparer_id), NULL, in_nls); - convert_to_unicode((Uchar *) jvol_desc->application_id, + convert_to_unicode((Uchar *)jvol_desc->application_id, sizeof (jvol_desc->application_id), NULL, in_nls); - convert_to_unicode((Uchar *) jvol_desc->copyright_file_id, + convert_to_unicode((Uchar *)jvol_desc->copyright_file_id, sizeof (jvol_desc->copyright_file_id), NULL, in_nls); - convert_to_unicode((Uchar *) jvol_desc->abstract_file_id, + convert_to_unicode((Uchar *)jvol_desc->abstract_file_id, sizeof (jvol_desc->abstract_file_id), NULL, in_nls); - convert_to_unicode((Uchar *) jvol_desc->bibliographic_file_id, + convert_to_unicode((Uchar *)jvol_desc->bibliographic_file_id, sizeof (jvol_desc->bibliographic_file_id), NULL, in_nls); } @@ -464,8 +498,7 @@ dpnt = node; while (dpnt) { - if ((dpnt->dir_flags & (INHIBIT_JOLIET_ENTRY|INHIBIT_UDF_ENTRY)) != - (INHIBIT_JOLIET_ENTRY|INHIBIT_UDF_ENTRY)) { + if ((dpnt->dir_flags & INHIBIT_JOLIET_ENTRY) == 0) { /* * If we already have an extent for this * (i.e. it came from a multisession disc), then @@ -480,8 +513,7 @@ } /* skip if hidden - but not for the rr_moved dir */ if (dpnt->subdir && - ((dpnt->dir_flags & (INHIBIT_JOLIET_ENTRY|INHIBIT_UDF_ENTRY)) != - (INHIBIT_JOLIET_ENTRY|INHIBIT_UDF_ENTRY) || + ((dpnt->dir_flags & INHIBIT_JOLIET_ENTRY) == 0 || dpnt == reloc_dir)) { assign_joliet_directory_addresses(dpnt->subdir); } @@ -608,14 +640,14 @@ /* First allocate memory for the tables and initialize the memory */ tablesize = jpath_blocks << 11; - jpath_table_m = (char *) e_malloc(tablesize); - jpath_table_l = (char *) e_malloc(tablesize); + jpath_table_m = (char *)e_malloc(tablesize); + jpath_table_l = (char *)e_malloc(tablesize); memset(jpath_table_l, 0, tablesize); memset(jpath_table_m, 0, tablesize); /* Now start filling in the path tables. Start with root directory */ jpath_table_index = 0; - jpathlist = (struct directory **) e_malloc(sizeof (struct directory *) + jpathlist = (struct directory **)e_malloc(sizeof (struct directory *) * next_jpath_index); memset(jpathlist, 0, sizeof (struct directory *) * next_jpath_index); build_jpathlist(root); @@ -641,7 +673,7 @@ for (j = 1; j < next_jpath_index; j++) { dpnt = jpathlist[j]; if (!dpnt) { - comerrno(EX_BAD, "Entry %d not in path tables\n", j); + comerrno(EX_BAD, _("Entry %d not in path tables\n"), j); } npnt = dpnt->de_name; @@ -652,7 +684,7 @@ de = dpnt->self; if (!de) { comerrno(EX_BAD, - "Fatal Joliet goof - directory has amnesia\n"); + _("Fatal Joliet goof - directory has amnesia\n")); } #ifdef APPLE_HYB if (USE_MAC_NAME(de)) @@ -695,8 +727,11 @@ if (!warned) { warned++; errmsgno(EX_BAD, - "Unable to generate sane Joliet path tables - too many directories (%u)\n", + _("Unable to generate sane Joliet path tables - too many directories (%u)\n"), jpindex); + if (!nolimitpathtables) + errmsgno(EX_BAD, + _("Try to use the option -no-limit-pathtables\n")); } if (!nolimitpathtables) exit(EX_BAD); @@ -749,7 +784,7 @@ free(jpathlist); if (jpath_table_index != jpath_table_size) { errmsgno(EX_BAD, - "Joliet path table lengths do not match %d expected: %d\n", + _("Joliet path table lengths do not match %d expected: %d\n"), jpath_table_index, jpath_table_size); } @@ -772,7 +807,7 @@ struct directory *finddir; total_size = ISO_ROUND_UP(dpnt->jsize); - directory_buffer = (char *) e_malloc(total_size); + directory_buffer = (char *)e_malloc(total_size); memset(directory_buffer, 0, total_size); dir_index = 0; @@ -799,7 +834,7 @@ if (s_entry1 == NULL) { /* We got trouble. */ comerrno(EX_BAD, - "Unable to locate relocated directory\n"); + _("Unable to locate relocated directory\n")); } } else { s_entry1 = s_entry; @@ -838,8 +873,8 @@ if ((jrec.flags[0] & ISO_DIRECTORY) != 0) { if (strcmp(s_entry1->name, ".") == 0) { jrec.name_len[0] = 1; - set_733((char *) jrec.extent, dpnt->jextent); - set_733((char *) jrec.size, ISO_ROUND_UP(dpnt->jsize)); + set_733((char *)jrec.extent, dpnt->jextent); + set_733((char *)jrec.size, ISO_ROUND_UP(dpnt->jsize)); } else if (strcmp(s_entry1->name, "..") == 0) { jrec.name_len[0] = 1; if (dpnt->parent == reloc_dir) { @@ -855,13 +890,12 @@ } else { finddir = dpnt->subdir; } - while (1 == 1) { - if (finddir->self == s_entry1) - break; + while (finddir && finddir->self != s_entry1) { finddir = finddir->next; - if (!finddir) { - comerrno(EX_BAD, "Fatal goof - unable to find directory location\n"); - } + } + if (!finddir) { + comerrno(EX_BAD, + _("Fatal goof - unable to find directory location\n")); } set_733((char *)jrec.extent, finddir->jextent); set_733((char *)jrec.size, @@ -910,7 +944,7 @@ if (dpnt->jsize != dir_index) { errmsgno(EX_BAD, - "Unexpected joliet directory length %d expected: %d '%s'\n", + _("Unexpected joliet directory length %d expected: %d '%s'\n"), dpnt->jsize, dir_index, dpnt->de_name); } @@ -1055,8 +1089,8 @@ ltmp[2]; siconvt_t *linls, *rinls; - r = (struct directory_entry **) rr; - l = (struct directory_entry **) ll; + r = (struct directory_entry **)rr; + l = (struct directory_entry **)ll; #ifdef APPLE_HYB /* @@ -1096,9 +1130,21 @@ #endif { errmsgno(EX_BAD, - "Error: %s and %s have the same Joliet name\n", + _("Error: %s and %s have the same Joliet name\n"), (*r)->whole_name, (*l)->whole_name); jsort_goof++; + { + char *p1 = rpnt; + char *p2 = lpnt; + int len = 0; + + for (; *p1 == *p2; p1++, p2++, len++) { + if (*p1 == '\0') + break; + } + if (len > jsort_glen) + jsort_glen = len; + } } } /* @@ -1116,7 +1162,7 @@ if (strcmp(lpnt, "..") == 0) return (1); -#ifdef DVD_VIDEO +#ifdef DVD_AUD_VID /* * There're rumors claiming that some players assume VIDEO_TS.IFO * to be the first file in VIDEO_TS/ catalog. Well, it's basically @@ -1129,7 +1175,7 @@ * XXX to the UDF implementation if we implement decent UDF support * XXX with a separate name space for the UDF file tree. */ - if (dvd_video) { + if (dvd_aud_vid_flag & DVD_SPEC_VIDEO) { if (strcmp(rpnt, "VIDEO_TS.IFO") == 0) return (-1); if (strcmp(lpnt, "VIDEO_TS.IFO") == 0) @@ -1233,6 +1279,7 @@ } jsort_goof = 0; + jsort_glen = 0; #ifdef PROTOTYPES qsort(sortlist, dcount, sizeof (struct directory_entry *), (int (*) (const void *, const void *)) joliet_compare_dirs); @@ -1241,6 +1288,19 @@ joliet_compare_dirs); #endif + if (jsort_goof) { + errmsgno(EX_BAD, + _("Joliet file names differ after %d chars\n"), + jsort_glen); + if (jsort_glen > JLONGMAX) { + errmsgno(EX_BAD, + _("Cannot use Joliet, please remove -J from the option list.\n")); + } else if (jsort_glen > JMAX) { + errmsgno(EX_BAD, + _("Try to use the option -joliet-long\n")); + } + } + /* Now reassemble the linked list in the proper sorted order */ for (i = 0; i < dcount - 1; i++) { sortlist[i]->jnext = sortlist[i + 1]; @@ -1339,8 +1399,8 @@ jroot_record.length[0] = 1 + offsetof(struct iso_directory_record, name[0]); jroot_record.ext_attr_length[0] = 0; - set_733((char *) jroot_record.extent, root->jextent); - set_733((char *) jroot_record.size, ISO_ROUND_UP(root->jsize)); + set_733((char *)jroot_record.extent, root->jextent); + set_733((char *)jroot_record.size, ISO_ROUND_UP(root->jsize)); iso9660_date(jroot_record.date, root_statbuf.st_mtime); jroot_record.flags[0] = ISO_DIRECTORY; jroot_record.file_unit_size[0] = 0; diff -Nru cdrtools-2.01.01a33/mkisofs/mac_label.c cdrtools-3.02a09/mkisofs/mac_label.c --- cdrtools-2.01.01a33/mkisofs/mac_label.c 2007-07-25 22:56:32.000000000 +0000 +++ cdrtools-3.02a09/mkisofs/mac_label.c 2016-10-10 21:17:18.000000000 +0000 @@ -1,11 +1,12 @@ -/* @(#)mac_label.c 1.13 07/07/26 joerg, Copyright 1997, 1998, 1999, 2000 James Pearson */ +/* @(#)mac_label.c 1.21 16/10/10 joerg, Copyright 1997-2000 James Pearson, Copyright 2004-2016 J. Schilling */ +#include #ifndef lint -static char sccsid[] = - "@(#)mac_label.c 1.13 07/07/26 joerg, Copyright 1997, 1998, 1999, 2000 James Pearson"; +static UConst char sccsid[] = + "@(#)mac_label.c 1.21 16/10/10 joerg, Copyright 1997-2000 James Pearson, Copyright 2004-2016 J. Schilling"; #endif /* * Copyright (c) 1997, 1998, 1999, 2000 James Pearson - * Copyright (c) 2004-2007 J. Schilling + * Copyright (c) 2004-2016 J. Schilling * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -45,7 +46,6 @@ /* PREP_BOOT Troy Benjegerdes 2/4/99 */ -#include #include "mkisofs.h" #include "mac_label.h" #include "apple.h" @@ -55,8 +55,10 @@ void gen_prepboot_label __PR((unsigned char *ml)); #endif /* PREP_BOOT */ +#ifdef APPLE_HYB int gen_mac_label __PR((defer * mac_boot)); int autostart __PR((void)); +#endif /* APPLE_HYB */ #ifdef PREP_BOOT void @@ -70,14 +72,14 @@ MacLabel *mac_label = (MacLabel *) ml; if (verbose > 1) { - fprintf(stderr, "Creating %d PReP boot partition(s)\n", + fprintf(stderr, _("Creating %d PReP boot partition(s)\n"), use_prep_boot + use_chrp_boot); } mac_label->fdiskMagic[0] = fdiskMagic0; mac_label->fdiskMagic[1] = fdiskMagic1; if (use_chrp_boot) { - fprintf(stderr, "CHRP boot partition 1\n"); + fprintf(stderr, _("CHRP boot partition 1\n")); mac_label->image[i].boot = 0x80; @@ -108,15 +110,14 @@ for (; i < use_prep_boot + use_chrp_boot; i++) { de = search_tree_file(root, prep_boot_image[i - use_chrp_boot]); if (!de) { - fprintf(stderr, - "Uh oh, I cant find the boot image \"%s\"!\n", + ex_boot_enoent(_("image"), prep_boot_image[i - use_chrp_boot]); - exit(1); + /* NOTREACHED */ } /* get size and block in 512-byte blocks */ block = get_733(de->isorec.extent) * 2048 / 512; size = get_733(de->isorec.size) / 512 + 1; - fprintf(stderr, "PReP boot partition %d is \"%s\"\n", + fprintf(stderr, _("PReP boot partition %d is \"%s\"\n"), i + 1, prep_boot_image[i - use_chrp_boot]); mac_label->image[i].boot = 0x80; @@ -155,6 +156,7 @@ #endif /* PREP_BOOT */ +#ifdef APPLE_HYB int gen_mac_label(mac_boot) defer *mac_boot; @@ -162,7 +164,7 @@ FILE *fp; MacLabel *mac_label; MacPart *mac_part; - char *buffer = (char *) hce->hfs_map; + char *buffer = (char *)hce->hfs_map; int block_size; int have_hfs_boot = 0; char tmp[SECTOR_SIZE]; @@ -174,48 +176,52 @@ /* If we have a boot file, then open and check it */ if (mac_boot->name) { if (stat(mac_boot->name, &stat_buf) < 0) { - sprintf(hce->error, "unable to stat HFS boot file %s", + sprintf(hce->error, _("unable to stat HFS boot file %s"), mac_boot->name); return (-1); } if ((fp = fopen(mac_boot->name, "rb")) == NULL) { - sprintf(hce->error, "unable to open HFS boot file %s", + sprintf(hce->error, _("unable to open HFS boot file %s"), mac_boot->name); return (-1); } if (fread(tmp, 1, SECTOR_SIZE, fp) != SECTOR_SIZE) { - sprintf(hce->error, "unable to read HFS boot file %s", + sprintf(hce->error, _("unable to read HFS boot file %s"), mac_boot->name); + fclose(fp); return (-1); } /* check we have a bootable partition */ - mac_part = (MacPart *) (tmp + HFS_BLOCKSZ); + mac_part = (MacPart *)(tmp + HFS_BLOCKSZ); if (!(IS_MAC_PART(mac_part) && - strncmp((char *) mac_part->pmPartType, pmPartType_2, 12) == 0)) { - sprintf(hce->error, "%s is not a HFS boot file", + strncmp((char *)mac_part->pmPartType, pmPartType_2, 12) == 0)) { + sprintf(hce->error, _("%s is not a HFS boot file"), mac_boot->name); + fclose(fp); return (-1); } /* check we have a boot block as well - last 2 blocks of file */ if (fseek(fp, (off_t)-2 * HFS_BLOCKSZ, SEEK_END) != 0) { - sprintf(hce->error, "unable to seek HFS boot file %s", + sprintf(hce->error, _("unable to seek HFS boot file %s"), mac_boot->name); + fclose(fp); return (-1); } /* overwrite (empty) boot block for our HFS volume */ if (fread(hce->hfs_hdr, 2, HFS_BLOCKSZ, fp) != HFS_BLOCKSZ) { - sprintf(hce->error, "unable to read HFS boot block %s", + sprintf(hce->error, _("unable to read HFS boot block %s"), mac_boot->name); + fclose(fp); return (-1); } fclose(fp); /* check boot block is valid */ - if (d_getw((unsigned char *) hce->hfs_hdr) != HFS_BB_SIGWORD) { + if (d_getw((unsigned char *)hce->hfs_hdr) != HFS_BB_SIGWORD) { sprintf(hce->error, - "%s does not contain a valid boot block", + _("%s does not contain a valid boot block"), mac_boot->name); return (-1); } @@ -234,7 +240,7 @@ mpm[mpc].size = ISO_BLOCKS(mac_boot->size); mpm[mpc].ntype = PM2; - mpm[mpc].type = (char *) mac_part->pmPartType; + mpm[mpc].type = (char *)mac_part->pmPartType; mpm[mpc].start = mac_boot->extent = last_extent; mpm[mpc].name = 0; @@ -258,69 +264,69 @@ mpc++; if (verbose > 1) - fprintf(stderr, "Creating HFS Label %s %s\n", mac_boot->name ? - "with boot file" : "", + fprintf(stderr, _("Creating HFS Label %s %s\n"), mac_boot->name ? + _("with boot file") : "", mac_boot->name ? mac_boot->name : ""); /* for a bootable CD, block size is SECTOR_SIZE */ block_size = have_hfs_boot ? SECTOR_SIZE : HFS_BLOCKSZ; /* create the CD label */ - mac_label = (MacLabel *) buffer; + mac_label = (MacLabel *)buffer; mac_label->sbSig[0] = 'E'; mac_label->sbSig[1] = 'R'; - set_722((char *) mac_label->sbBlkSize, block_size); - set_732((char *) mac_label->sbBlkCount, + set_722((char *)mac_label->sbBlkSize, block_size); + set_732((char *)mac_label->sbBlkCount, last_extent * (SECTOR_SIZE / block_size)); - set_722((char *) mac_label->sbDevType, 1); - set_722((char *) mac_label->sbDevId, 1); + set_722((char *)mac_label->sbDevType, 1); + set_722((char *)mac_label->sbDevId, 1); /* create the partition map entry */ - mac_part = (MacPart *) (buffer + block_size); + mac_part = (MacPart *)(buffer + block_size); mac_part->pmSig[0] = 'P'; mac_part->pmSig[1] = 'M'; - set_732((char *) mac_part->pmMapBlkCnt, mpc + 1); - set_732((char *) mac_part->pmPyPartStart, 1); - set_732((char *) mac_part->pmPartBlkCnt, mpc + 1); - strncpy((char *) mac_part->pmPartName, "Apple", + set_732((char *)mac_part->pmMapBlkCnt, mpc + 1); + set_732((char *)mac_part->pmPyPartStart, 1); + set_732((char *)mac_part->pmPartBlkCnt, mpc + 1); + strncpy((char *)mac_part->pmPartName, "Apple", sizeof (mac_part->pmPartName)); - strncpy((char *) mac_part->pmPartType, "Apple_partition_map", + strncpy((char *)mac_part->pmPartType, "Apple_partition_map", sizeof (mac_part->pmPartType)); - set_732((char *) mac_part->pmLgDataStart, 0); - set_732((char *) mac_part->pmDataCnt, mpc + 1); - set_732((char *) mac_part->pmPartStatus, PM_STAT_DEFAULT); + set_732((char *)mac_part->pmLgDataStart, 0); + set_732((char *)mac_part->pmDataCnt, mpc + 1); + set_732((char *)mac_part->pmPartStatus, PM_STAT_DEFAULT); /* create partition map entries for our partitions */ for (i = 0; i < mpc; i++) { - mac_part = (MacPart *) (buffer + (i + 2) * block_size); + mac_part = (MacPart *)(buffer + (i + 2) * block_size); if (mpm[i].ntype == PM2) { /* get driver label and patch it */ - memcpy((char *) mac_label, tmp, HFS_BLOCKSZ); - set_732((char *) mac_label->sbBlkCount, + memcpy((char *)mac_label, tmp, HFS_BLOCKSZ); + set_732((char *)mac_label->sbBlkCount, last_extent * (SECTOR_SIZE / block_size)); - set_732((char *) mac_label->ddBlock, + set_732((char *)mac_label->ddBlock, (mpm[i].start) * (SECTOR_SIZE / block_size)); - memcpy((char *) mac_part, tmp + HFS_BLOCKSZ, + memcpy((char *)mac_part, tmp + HFS_BLOCKSZ, HFS_BLOCKSZ); - set_732((char *) mac_part->pmMapBlkCnt, mpc + 1); - set_732((char *) mac_part->pmPyPartStart, + set_732((char *)mac_part->pmMapBlkCnt, mpc + 1); + set_732((char *)mac_part->pmPyPartStart, (mpm[i].start) * (SECTOR_SIZE / block_size)); } else { mac_part->pmSig[0] = 'P'; mac_part->pmSig[1] = 'M'; - set_732((char *) mac_part->pmMapBlkCnt, mpc + 1); - set_732((char *) mac_part->pmPyPartStart, + set_732((char *)mac_part->pmMapBlkCnt, mpc + 1); + set_732((char *)mac_part->pmPyPartStart, mpm[i].start * (SECTOR_SIZE / HFS_BLOCKSZ)); - set_732((char *) mac_part->pmPartBlkCnt, + set_732((char *)mac_part->pmPartBlkCnt, mpm[i].size * (SECTOR_SIZE / HFS_BLOCKSZ)); - strncpy((char *) mac_part->pmPartName, mpm[i].name, + strncpy((char *)mac_part->pmPartName, mpm[i].name, sizeof (mac_part->pmPartName)); - strncpy((char *) mac_part->pmPartType, mpm[i].type, + strncpy((char *)mac_part->pmPartType, mpm[i].type, sizeof (mac_part->pmPartType)); - set_732((char *) mac_part->pmLgDataStart, 0); - set_732((char *) mac_part->pmDataCnt, + set_732((char *)mac_part->pmLgDataStart, 0); + set_732((char *)mac_part->pmDataCnt, mpm[i].size * (SECTOR_SIZE / HFS_BLOCKSZ)); - set_732((char *) mac_part->pmPartStatus, + set_732((char *)mac_part->pmPartStatus, PM_STAT_DEFAULT); } } @@ -330,50 +336,50 @@ if (mpc < 3) { /* don't have to interleave with 2048 table */ mac_part->pmSig[0] = 'P'; mac_part->pmSig[1] = 'M'; - set_732((char *) mac_part->pmMapBlkCnt, mpc + 1); - set_732((char *) mac_part->pmPyPartStart, 1); - set_732((char *) mac_part->pmPartBlkCnt, mpc + 1); - strncpy((char *) mac_part->pmPartName, "Apple", + set_732((char *)mac_part->pmMapBlkCnt, mpc + 1); + set_732((char *)mac_part->pmPyPartStart, 1); + set_732((char *)mac_part->pmPartBlkCnt, mpc + 1); + strncpy((char *)mac_part->pmPartName, "Apple", sizeof (mac_part->pmPartName)); - strncpy((char *) mac_part->pmPartType, + strncpy((char *)mac_part->pmPartType, "Apple_partition_map", sizeof (mac_part->pmPartType)); - set_732((char *) mac_part->pmLgDataStart, 0); - set_732((char *) mac_part->pmDataCnt, mpc + 1); - set_732((char *) mac_part->pmPartStatus, + set_732((char *)mac_part->pmLgDataStart, 0); + set_732((char *)mac_part->pmDataCnt, mpc + 1); + set_732((char *)mac_part->pmPartStatus, PM_STAT_DEFAULT); mac_part++; /* +HFS_BLOCKSZ */ } for (i = 0; i < mpc; i++, mac_part++) { - if (mac_part == (MacPart *) (buffer + SECTOR_SIZE)) + if (mac_part == (MacPart *)(buffer + SECTOR_SIZE)) mac_part++; /* jump over 2048 partition */ /* entry */ if (mpm[i].ntype == PM2) { - memcpy((char *) mac_part, tmp + HFS_BLOCKSZ * 2, + memcpy((char *)mac_part, tmp + HFS_BLOCKSZ * 2, HFS_BLOCKSZ); if (!IS_MAC_PART(mac_part)) { mac_part--; continue; } - set_732((char *) mac_part->pmMapBlkCnt, mpc+1); - set_732((char *) mac_part->pmPyPartStart, + set_732((char *)mac_part->pmMapBlkCnt, mpc+1); + set_732((char *)mac_part->pmPyPartStart, mpm[i].start * (SECTOR_SIZE / HFS_BLOCKSZ)); } else { mac_part->pmSig[0] = 'P'; mac_part->pmSig[1] = 'M'; - set_732((char *) mac_part->pmMapBlkCnt, mpc+1); - set_732((char *) mac_part->pmPyPartStart, + set_732((char *)mac_part->pmMapBlkCnt, mpc+1); + set_732((char *)mac_part->pmPyPartStart, mpm[i].start * (SECTOR_SIZE / HFS_BLOCKSZ)); - set_732((char *) mac_part->pmPartBlkCnt, + set_732((char *)mac_part->pmPartBlkCnt, mpm[i].size * (SECTOR_SIZE / HFS_BLOCKSZ)); - strncpy((char *) mac_part->pmPartName, + strncpy((char *)mac_part->pmPartName, mpm[i].name, sizeof (mac_part->pmPartName)); - strncpy((char *) mac_part->pmPartType, + strncpy((char *)mac_part->pmPartType, mpm[i].type, sizeof (mac_part->pmPartType)); - set_732((char *) mac_part->pmLgDataStart, 0); - set_732((char *) mac_part->pmDataCnt, + set_732((char *)mac_part->pmLgDataStart, 0); + set_732((char *)mac_part->pmDataCnt, mpm[i].size * (SECTOR_SIZE / HFS_BLOCKSZ)); - set_732((char *) mac_part->pmPartStatus, + set_732((char *)mac_part->pmPartStatus, PM_STAT_DEFAULT); } } @@ -419,3 +425,4 @@ return (0); } +#endif /* APPLE_HYB */ diff -Nru cdrtools-2.01.01a33/mkisofs/Makefile cdrtools-3.02a09/mkisofs/Makefile --- cdrtools-2.01.01a33/mkisofs/Makefile 2007-07-09 22:04:36.000000000 +0000 +++ cdrtools-3.02a09/mkisofs/Makefile 2016-12-13 21:39:34.000000000 +0000 @@ -1,17 +1,6 @@ -#ident @(#)Makefile 1.31 07/07/10 +#ident @(#)Makefile 1.47 16/12/13 ########################################################################### -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License version 2 -# as published by the Free Software Foundation. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License along with -# this program; see the file COPYING. If not, write to the Free Software -# Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +#@@C@@ ########################################################################### SRCROOT= .. RULESDIR= RULES @@ -22,42 +11,45 @@ TARGET= mkisofs SYMLINKS= mkhybrid CPPOPTS += -DUSE_FIND -CPPOPTS += -I../libfind #CPPOPTS += -DADD_FILES CPPOPTS += -DUSE_LARGEFILES -# -# Comment out if you do not like to ignore deep directories -# when Rock Ridge is not in use -CPPOPTS += -DABORT_DEEP_ISO_ONLY +CPPOPTS += -DAPPLE_HFS_HYB CPPOPTS += -DAPPLE_HYB CPPOPTS += -DUDF -CPPOPTS += -DDVD_VIDEO +CPPOPTS += -DDVD_AUD_VID CPPOPTS += -DSORTING -CPPOPTS += -I../libhfs_iso/ +CPPOPTS += -DDUPLICATES_ONCE +CPPOPTS += -I../libscg +CPPOPTS += -I../libscgcmd +CPPOPTS += -I../libhfs_iso +CPPOPTS += -I../libcdrdeflt CPPOPTS += -DUSE_SCG \ - '-DAPPID_DEFAULT="MKISOFS ISO 9660/HFS FILESYSTEM BUILDER & CDRECORD CD-R/DVD CREATOR (C) 1993 E.YOUNGDALE (C) 1997 J.PEARSON/J.SCHILLING"' \ - -I../cdrecord + '-DAPPID_DEFAULT="MKISOFS ISO9660/HFS/UDF FILESYSTEM BUILDER & CDRECORD CD/DVD/BluRay CREATOR (C) 1993 E.YOUNGDALE (C) 1997 J.PEARSON/J.SCHILLING"' CPPOPTS += -DSCHILY_PRINT CPPOPTS += -DUSE_NLS CPPOPTS += -DUSE_ICONV CPPOPTS += -DINS_BASE=\"${INS_BASE}\" +CPPOPTS += -DTEXT_DOMAIN=\"SCHILY_cdrtools\" CFILES= mkisofs.c tree.c write.c hash.c rock.c inode.c udf.c multi.c \ joliet.c match.c name.c eltorito.c boot.c isonum.c \ scsi.c \ - scsi_cdr.c cd_misc.c \ - modes.c \ apple.c volume.c desktop.c mac_label.c stream.c \ ifo_read.c dvd_file.c dvd_reader.c \ - defaults.c walk.c -HFILES= apple.h bootinfo.h defaults.h diskmbr.h exclude.h \ + walk.c +HFILES= apple.h bootinfo.h defaults.h diskmbr.h \ iso9660.h mac_label.h mactypes.h match.h \ mkisofs.h sunlabel.h udf.h udf_fs.h vms.h \ - ifo_read.h dvd_file.h dvd_reader.h bswap.h ifo_types.h \ - ../cdrecord/defaults.h + ifo_read.h dvd_file.h dvd_reader.h bswap.h ifo_types.h + +# +# LIB_CAP is needed for Linux capability support in librscg. +# +LIBS= -lhfs -lfile -lsiconv -lscgcmd -lrscg -lscg $(LIB_VOLMGT) -lcdrdeflt -ldeflt \ + -lfind -lmdigest -lschily \ + $(LIB_ACL_TEST) $(SCSILIB) $(LIB_SOCKET) \ + $(LIB_ICONV) $(LIB_INTL) $(LIB_CAP) -LIBS= -lhfs -lfile -lsiconv -lrscg -lscg $(LIB_VOLMGT) -ldeflt -lfind -lschily \ - $(LIB_ACL) $(SCSILIB) $(LIB_SOCKET) $(LIB_ICONV) $(LIB_INTL) XMK_FILE= Makefile.man hybridman.mk Makefile.doc ########################################################################### @@ -65,3 +57,6 @@ ########################################################################### count: $(CFILES) $(HFILES) count $r1 + +xtxt: $(CFILES) apple_driver.c + gxgettext -k_ -k__ -kperr $(CFILES) apple_driver.c diff -Nru cdrtools-2.01.01a33/mkisofs/match.c cdrtools-3.02a09/mkisofs/match.c --- cdrtools-2.01.01a33/mkisofs/match.c 2007-07-25 22:45:34.000000000 +0000 +++ cdrtools-3.02a09/mkisofs/match.c 2016-11-27 22:15:05.000000000 +0000 @@ -1,7 +1,8 @@ -/* @(#)match.c 1.25 07/07/26 joerg */ +/* @(#)match.c 1.34 16/11/27 joerg */ +#include #ifndef lint -static char sccsid[] = - "@(#)match.c 1.25 07/07/26 joerg"; +static UConst char sccsid[] = + "@(#)match.c 1.34 16/11/27 joerg"; #endif /* * 27-Mar-96: Jan-Piet Mens @@ -11,17 +12,17 @@ * Re-written 13-Apr-2000 James Pearson * now uses a generic set of routines * Conversions to make the code more portable May 2000 .. March 2004 - * Copyright (c) 2000-2007 J. Schilling + * Copyright (c) 2000-2016 J. Schilling */ -#include -#include +#include #include #include #include #include #include #include +#include #include "match.h" struct match { @@ -31,6 +32,8 @@ typedef struct match match; +static BOOL isort; + static match *mats[MAX_MAT]; static char *mesg[MAX_MAT] = { @@ -64,12 +67,13 @@ s_mat = (sort_match *)malloc(sizeof (sort_match)); if (s_mat == NULL) { - errmsg("Can't allocate memory for sort filename\n"); + errmsg(_("Can't allocate memory for sort filename\n")); return (0); } if ((s_mat->name = strdup(fn)) == NULL) { - errmsg("Can't allocate memory for sort filename\n"); + errmsg(_("Can't allocate memory for sort filename\n")); + free(s_mat); return (0); } @@ -85,8 +89,12 @@ } EXPORT int -add_sort_list(file) - char *file; +add_sort_list(file, valp, pac, pav, opt) + const char *file; + void *valp; + int *pac; + char *const **pav; + const char *opt; { FILE *fp; char name[4096]; @@ -94,9 +102,13 @@ int val; extern int do_sort; + while (*opt == '-') + opt++; + if (*opt == 'i') + isort = TRUE; do_sort++; if ((fp = fopen(file, "r")) == NULL) { - comerr("Can't open sort file list %s\n", file); + comerr(_("Can't open sort file list %s\n"), file); } while (fgets(name, sizeof (name), fp) != NULL) { @@ -112,7 +124,7 @@ /* * XXX old code did not abort here. */ - comerrno(EX_BAD, "Incorrect sort file format\n\t%s", name); + comerrno(EX_BAD, _("Incorrect sort file format\n\t%s\n"), name); continue; } else { *p = '\0'; @@ -134,9 +146,13 @@ int val; { register sort_match *s_mat; + int flags = FNM_PATHNAME; + + if (isort) + flags |= FNM_IGNORECASE; for (s_mat = s_mats; s_mat; s_mat = s_mat->next) { - if (fnmatch(s_mat->name, fn, FNM_PATHNAME) != FNM_NOMATCH) { + if (fnmatch(s_mat->name, fn, flags) != FNM_NOMATCH) { return (s_mat->val); /* found sort value */ } } @@ -172,18 +188,19 @@ match *mat; if (n >= MAX_MAT) { - errmsgno(EX_BAD, "Too many patterns.\n"); + errmsgno(EX_BAD, _("Too many patterns.\n")); return (0); } mat = (match *)malloc(sizeof (match)); if (mat == NULL) { - errmsg("Can't allocate memory for %s filename\n", mesg[n]); + errmsg(_("Can't allocate memory for %s filename\n"), mesg[n]); return (0); } if ((mat->name = strdup(fn)) == NULL) { - errmsg("Can't allocate memory for %s filename\n", mesg[n]); + errmsg(_("Can't allocate memory for %s filename\n"), mesg[n]); + free(mat); return (0); } @@ -226,6 +243,7 @@ return (1); } +#ifdef APPLE_HYB EXPORT int hfs_add_match(fn) char *fn; @@ -236,6 +254,7 @@ return (-1); return (1); } +#endif /* APPLE_HYB */ EXPORT int j_add_match(fn) @@ -269,7 +288,7 @@ int len; if ((fp = fopen(file, "r")) == NULL) { - comerr("Can't open %s file list %s\n", mesg[n], file); + comerr(_("Can't open %s file list %s\n"), mesg[n], file); } while (fgets(name, sizeof (name), fp) != NULL) { @@ -329,6 +348,7 @@ return (1); } +#ifdef APPLE_HYB EXPORT int hfs_add_list(fn) char *fn; @@ -336,6 +356,7 @@ gen_add_list(fn, HFS_HIDE); return (1); } +#endif /* APPLE_HYB */ EXPORT int gen_matches(fn, n) @@ -343,12 +364,17 @@ int n; { register match * mat; + int flags = FNM_PATHNAME; + if (n >= MAX_MAT) return (0); + if (match_igncase) + flags |= FNM_IGNORECASE; + for (mat = mats[n]; mat; mat = mat->next) { - if (fnmatch(mat->name, fn, FNM_PATHNAME) != FNM_NOMATCH) { + if (fnmatch(mat->name, fn, flags) != FNM_NOMATCH) { return (1); /* found -> excluded filename */ } } diff -Nru cdrtools-2.01.01a33/mkisofs/match.h cdrtools-3.02a09/mkisofs/match.h --- cdrtools-2.01.01a33/mkisofs/match.h 2007-07-25 22:45:34.000000000 +0000 +++ cdrtools-3.02a09/mkisofs/match.h 2016-12-12 22:04:00.000000000 +0000 @@ -1,16 +1,16 @@ -/* @(#)match.h 1.14 07/07/26 joerg */ +/* @(#)match.h 1.18 16/12/12 joerg */ /* * 27th March 1996. Added by Jan-Piet Mens for matching regular expressions * in paths. * * Conversions to make the code more portable May 2000 .. March 2004 - * Copyright (c) 2000-2007 J. Schilling + * Copyright (c) 2000-2016 J. Schilling */ #include #ifdef SORTING -#include +#include #define NOT_SORTED INT_MIN #ifdef MAX /* May be defined in param.h */ @@ -52,11 +52,15 @@ #ifdef SORTING extern int add_sort_match __PR((char *fn, int val)); -extern int add_sort_list __PR((char *fn)); +extern int add_sort_list __PR((const char *fn, void *valp, + int *pac, char *const **pav, + const char *opt)); extern int sort_matches __PR((char *fn, int val)); extern void del_sort __PR((void)); #endif /* SORTING */ +extern int match_igncase; + /* * The following are for compatiblity with the separate routines - the * main code should be changed to call the generic routines directly diff -Nru cdrtools-2.01.01a33/mkisofs/mkhybrid.8 cdrtools-3.02a09/mkisofs/mkhybrid.8 --- cdrtools-2.01.01a33/mkisofs/mkhybrid.8 2000-04-30 21:33:47.000000000 +0000 +++ cdrtools-3.02a09/mkisofs/mkhybrid.8 2000-04-30 21:33:47.000000000 +0000 @@ -1,2 +1,2 @@ .so man8/mkisofs.8 -.\" %Z%%M% %I% %E% joerg +.\" @(#)mkhybrid.8 1.1 00/04/30 joerg diff -Nru cdrtools-2.01.01a33/mkisofs/mkisofs.8 cdrtools-3.02a09/mkisofs/mkisofs.8 --- cdrtools-2.01.01a33/mkisofs/mkisofs.8 2007-07-29 22:31:06.000000000 +0000 +++ cdrtools-3.02a09/mkisofs/mkisofs.8 2017-12-10 18:47:50.000000000 +0000 @@ -1,7 +1,8 @@ '\" t .\" To print, first run through tbl .\" -*- nroff -*- -.\" @(#)mkisofs.8 1.123 07/07/30 joerg +.\" @(#)mkisofs.8 1.160 17/12/10 Copyright 1997-2015 J. Schilling +.\"@@C@@ .\" .if t .ds a \v'-0.55m'\h'0.00n'\z.\h'0.40n'\z.\v'0.55m'\h'-0.40n'a .if t .ds o \v'-0.55m'\h'0.00n'\z.\h'0.45n'\z.\v'0.55m'\h'-0.45n'o @@ -15,9 +16,9 @@ .if n .ds o oe .if n .ds u ue .if n .ds s sz -.TH MKISOFS 8 "14 Feb 2003" "Version 2.01" +.TH MKISOFS 8 "2017/12/10" "Version 3.02" .SH NAME -mkisofs \- create an hybrid ISO9660/JOLIET/HFS filesystem with optional Rock Ridge attributes. +mkisofs \- create an hybrid ISO-9660/JOLIET/HFS/UDF filesystem-image with optional Rock Ridge attributes. .SH SYNOPSIS .B mkisofs [ @@ -28,6 +29,7 @@ .I filename ] .I pathspec [pathspec ...] +.br .B mkisofs [ .I options @@ -41,9 +43,20 @@ .br .SH DESCRIPTION .B mkisofs -is effectively a pre-mastering program to generate an ISO9660/JOLIET/HFS hybrid +is effectively a pre-mastering program to generate an ISO-9660/JOLIET/HFS/UDF hybrid filesystem. .PP +ISO-9660/JOLIET/UDF filesystems are limited to a maximum size of 8\ TB. +The maximum size of a single file is 8\ TB (single files in UDF are currently +limited to aprox. 200\ GB). +If you like to have files +larger than 2 \GB, you need to specify +.B \-iso\-level 3 +or above. +If a HFS hybrid is created, the maximum +file size for files in the HFS hybrid is 2\ GB in any case. +.SS "Hybrid filesystem support +.PP .B mkisofs is capable of generating the .B "System Use Sharing Protocol records (SUSP) @@ -51,16 +64,16 @@ by the .B "Rock Ridge Interchange Protocol. This is used to further describe the -files in the iso9660 filesystem to a unix host, and provides information such -as longer filenames, uid/gid, posix permissions, symbolic links, +files in the ISO-9660 filesystem to a UNIX host, and provides information such +as longer filenames, uid/gid, posix permissions, symbolic links, hard links, block and character devices. .PP -If Joliet or HFS hybrid command line options are specified, +If Joliet, HFS or UDF hybrid command line options are specified, .B mkisofs -will create additional filesystem meta data for Joliet or HFS. +will create additional separate filesystem meta data for Joliet, HFS or UDF. The file content in this case refers to the same data blocks on the media. It -will generate a pure ISO9660 filesystem unless the Joliet or HFS hybrid command +will generate a pure ISO-9660 filesystem unless the Joliet, HFS or UDF hybrid command line options are given. .PP .B mkisofs @@ -69,32 +82,35 @@ (or .IR shared ) HFS hybrid filesystem. The same files are seen as HFS files when -accessed from a Macintosh and as ISO9660 files when accessed from other +accessed from a Macintosh and as ISO-9660 files when accessed from other machines. HFS stands for .I Hierarchical File System -and is the native file system used on Macintosh computers. +and is the native file system used on Macintosh computers up to Mac\ OS\ 9. .PP As an alternative, .B mkisofs can generate the -.I Apple Extensions to ISO9660 +.I "Apple Extensions to ISO-9660 +or +.I UDF for each file. These extensions provide each file with CREATOR, TYPE and certain Finder Flags when accessed from a Macintosh. See the .B HFS MACINTOSH FILE FORMATS section below. +.SS "Functional description .PP .B mkisofs takes a snapshot of a given directory tree, and generates a -binary image which will correspond to an ISO9660 or HFS filesystem when +binary image which will correspond to an ISO-9660 or Joliet/HFS/UDF filesystem when written to a block device. .PP -Each file written to the iso9660 filesystem must have a filename in the 8.3 +Each file written to the ISO-9660 filesystem must have a filename in the 8.3 format (8 characters, period, 3 characters, all upper case), even if Rock Ridge -is in use. This filename is used on systems that are not able to make use of +attributes are in use. This filename is used on systems that are not able to make use of the Rock Ridge extensions (such as MS-DOS), and each filename in each directory must be different from the other filenames in the same directory. .B mkisofs -generally tries to form correct names by forcing the unix filename to upper +generally tries to form correct names by forcing the UNIX filename to upper case and truncating as required, but often times this yields unsatisfactory results when there are cases where the truncated names are not all unique. @@ -106,7 +122,7 @@ foo.bar.~1~ - the file foo.bar.~1~ would be written as FOO000.BAR;1 and the file foo.bar would be written as FOO.BAR;1 .PP -When used with various HFS options, +When used with various HFS or UDF options, .B mkisofs will attempt to recognise files stored in a number of Apple/Unix file formats and will copy the data and resource forks as well as any @@ -118,9 +134,12 @@ .PP Note that .B mkisofs -is not designed to communicate with the writer directly. Most writers +is not designed to communicate with writers for optical media directly. +Most writers have proprietary command sets which vary from one manufacturer to -another, and you need a specialized tool to actually burn the disk. +another, and you need a specialized tool like +.B cdrecord +to actually burn the disk. .PP The .B cdrecord @@ -128,16 +147,19 @@ of .B cdrecord is available from -ftp://ftp.berlios.de/pub/cdrecord +.B https://sourceforge.net/projects/cdrtools/files/ +or +.B https://sourceforge.net/projects/cdrtools/files/alpha/ .PP -Also you should know that most cd writers are very particular about timing. +Also you should know that most CD writers are very particular about timing. Once you start to burn a disc, you cannot let their buffer empty before you are done, or you will end up with a corrupt disc. Thus it is critical that you be able to maintain an uninterrupted data stream to the writer for the entire time that the disc is being written. +.SS "Dealing with path names .PP .B pathspec -is the path of the directory tree to be copied into the iso9660 filesystem. +is the path of the directory tree to be copied into the ISO-9660 filesystem. Multiple paths can be specified, and .B mkisofs @@ -145,7 +167,7 @@ image. .PP If the option -.I \-graft\-points +.B \-graft\-points has been specified, it is possible to graft the paths at points other than the root directory, and it is possible to graft files or directories onto the @@ -168,31 +190,46 @@ appear in one of the paths. By default, any directories that are created on the fly like this will have permissions 0555 and appear to be owned by the person running mkisofs. If you wish other permissions or owners of -the intermediate directories, see \-uid, \-gid, \-dir\-mode, \-file\-mode and -\-new\-dir\-mode. +the intermediate directories, see +.BR \-uid , +.BR \-gid , +.BR \-dir\-mode , +.BR \-file\-mode " and +.BR \-new\-dir\-mode . .PP .B mkisofs -will also run on Win9X/NT4 machines when compiled with Cygnus' cygwin +will also run on Win9\fIx\fP/NT\fIx\fP machines when compiled with Cygnus' cygwin (available from http://sourceware.cygnus.com/cygwin/). Therefore most references in this man page to .I Unix -can be replaced with -.IR Win32 . +also apply to +.I Win32 +or +.IR Win64 . .SH OPTIONS .TP .BI \-abstract " FILE -Specifies the abstract file name. +Specifies the abstract file name in the primary volume descriptor. There is space on the disc for 37 characters of information. +The related Joliet entry is limited to 18 characters. This parameter can also be set in the file .B \&.m\&kisofsrc with ABST=filename. If specified in both places, the command line version is used. +.sp +It is up to the user of +.B mkisofs +to include a file with the apropriate name in the created filesystem tree. .TP .BI \-A " application_id +.TP +.BI \-appid " application_id Specifies a text string that will be written into the volume header. This should describe the application that will be on the disc. There -is space on the disc for 128 characters of information. This parameter can +is space on the disc for 128 characters of information. +The related Joliet entry is limited to 64 characters. +This parameter can also be set in the file .B \&.m\&kisofsrc with APPI=id. @@ -201,35 +238,50 @@ .B \-allow\-leading\-dots .TP .B \-ldots -Allow ISO9660 filenames to begin with a period. Usually, a leading dot is +Allow ISO-9660 filenames to begin with a period. Usually, a leading dot is replaced with an underscore in order to maintain MS-DOS compatibility. .br -This violates the ISO9660 standard, but it happens to work on many systems. +This violates the ISO-9660 standard, but it happens to work on many systems. Use with caution. .TP .B \-allow\-lowercase -This options allows lower case characters to appear in iso9660 filenames. +This options allows lower case characters to appear in ISO-9660 filenames. .br -This violates the ISO9660 standard, but it happens to work on some systems. +This violates the ISO-9660 standard, but it happens to work on some systems. Use with caution. .TP +.B \-no\-allow\-lowercase +This resets the effect of +.B \-allow\-lowercase +and even works when +.BR \-U , +.B \-untranslated\-filenames +or +.B \-iso\-level 4 +have been used to allow lowercase filenames. +.TP .B \-allow\-multidot -This options allows more than one dot to appear in iso9660 filenames. +This options allows more than one dot to appear in ISO-9660 filenames. A leading dot is not affected by this option, it may be allowed separately using the .B \-allow\-leading\-dots option. .br -This violates the ISO9660 standard, but it happens to work on many systems. +This violates the ISO-9660 standard, but it happens to work on many systems. Use with caution. .TP .BI \-biblio " FILE -Specifies the bibliographic file name. +Specifies the bibliographic file name in the primary volume descriptor. There is space on the disc for 37 characters of information. +The related Joliet entry is limited to 18 characters. This parameter can also be set in the file .B \&.m\&kisofsrc with BIBLO=filename. If specified in both places, the command line version is used. +.sp +It is up to the user of +.B mkisofs +to include a file with the apropriate name in the created filesystem tree. .TP .B \-cache\-inodes Cache inode and device numbers to find hard links to files. @@ -243,6 +295,10 @@ Be careful when using this option on a filesystem without unique inode numbers as it may result in files containing the wrong content on CD. .sp +See the option +.B \-duplicates\-once +for a method that works on filesystems without unique inode numbers. +.sp If inodes are not cached, .B mkisofs will revert to the old Rrip Version-1.10 (see @@ -288,19 +344,32 @@ .B "correct inode numbers for zero sized files. .TP +.B \-duplicates\-once +Tells +.B mkisofs +to use a message digest checksum to identify identical files as +apparently hard linked files. +This allows +.B mkisofs +to archive inode numbers and hard links even when it is run on +non-POSIX platforms like +.BR DOS . +.TP .BI \-b " eltorito_boot_image +.TP +.BI \-eltorito\-boot " eltorito_boot_image Specifies the path and filename of the boot image to be used when making an "El Torito" bootable CD. The pathname must be relative to the source -path specified to +path and inside the source tree specified to .B mkisofs. This option is required to make an "El Torito" bootable CD. The boot image must be exactly the size of either a 1200, 1440, or a 2880 kB floppy, and .B mkisofs -will use this size when creating the output iso9660 +will use this size when creating the output ISO-9660 filesystem. It is assumed that the first 512 byte sector should be read from the boot image (it is essentially emulating a normal floppy drive). -This will work, for example, if the boot image is a LILO based boot floppy. +This will work, for example, if the boot image is a boot floppy. .sp If the boot image is not an image of a floppy, you need to add one of the options: @@ -308,6 +377,15 @@ If the system should not boot off the emulated disk, use .BR \-no\-boot . .sp +More than one boot entry may be specified, see +.B \-eltorito\-platform +and +.B \-eltorito\-alt\-boot +on how to specify more boot entries. +The first boot entry is the +.BR "default boot entry" . +Additional boot entries are members for a multi boot configuration. +.sp If the .B \-sort option has not been specified, the boot images are sorted @@ -316,9 +394,68 @@ .TP .B \-eltorito\-alt\-boot Start with a new set of "El Torito" boot parameters. -This allows to have more than one El Torito boot on a CD. +This allows to have more than one El Torito boot entry on a CD. A maximum of 63 El Torito boot entries may be put on a single CD. +.sp +The +.B \-eltorito\-alt\-boot +option starts a new boot entry with the same +.I platform id +but no new boot section except when it appears +past the first boot entry which is the default boot entry. +.TP +.BI \-eltorito\-platform " id +Set the "El Torito" platform id for a boot record or a section of boot records. +The. +.I id +parameter may be either: +.RS +.TP +.B x86 +This is the default +.I platform id +value and specifies entries for the PC platform. +If no +.B \-eltorito\-platform +option appears before the first +.B \-eltorito\-boot +option, the default boot entry becomes an entry for the x86 PC platform. +.TP +.B PPC +Boot entries for the Power PC platform. +.TP +.B Mac +Boot entries for the Apple Mac platform. +.TP +.B efi +Boot entries for EFI based PCs. +.TP +.B # +A numeric value specifying any platform id. +.LP +If the option +.B \-eltorito\-platform +appears before the first +.B \-eltorito\-boot +option, it sets the +.I platform id +for the default boot entry. +.LP +If the option +.B \-eltorito\-platform +appears after an +.B \-eltorito\-boot +option and sets the +.I platform id +to a value different from the previous value, +it starts a new set of boot entries. +.LP +The second boot entry and any new +.I platform id +creates a new section header and reduces the number of boot +entries per CD by one. +.RE .TP .BI errctl= " name .TP @@ -556,7 +693,7 @@ .B \-sparc\-boot option has been specified, the first sector of the resulting image will contain a Sun disk label. This disk label specifies slice 0 for the -iso9660 image and slice 1 .\|.\|. slice 7 for the boot images that +ISO-9660 image and slice 1 .\|.\|. slice 7 for the boot images that have been specified with this option. Byte offset 512 .\|.\|. 8191 within each of the additional boot images must contain a primary boot that works for the appropriate sparc architecture. The rest of each @@ -579,7 +716,7 @@ .B mkisofs is called with .BI "\-G " image " \-B " ... -all boot partitions are mapped to the partition that contains the iso9660 +all boot partitions are mapped to the partition that contains the ISO-9660 filesystem image and the generic boot image that is located in the first 16 sectors of the disk is used for all architectures. .TP @@ -589,7 +726,7 @@ The .B generic_boot_image will be placed on the first 16 sectors of the CD. The first 16 sectors -are the sectors that are located before the iso9660 primary volume descriptor. +are the sectors that are located before the ISO-9660 primary volume descriptor. If this option is used together with the .B \-sparc\-boot option, the Sun disk label will overlay the first 512 bytes of the generic @@ -600,6 +737,14 @@ a hard disk image. The hard disk image must begin with a master boot record that contains a single partition. .TP +.BI \-ignore\-error +Ignore errors. +.B mkisofs +by default aborts on several errors, such as read errors. With this option in effect, +.B mkisofs +tries to continue. +Use with care. +.TP .BI \-no\-emul\-boot Specifies that the boot image used to create "El Torito" bootable CDs is a 'no emulation' image. The system will load and execute this image without @@ -629,6 +774,8 @@ section for a description of this table. .TP .BI \-C " last_sess_start,next_sess_start +.TP +.BI \-cdrecord\-params " last_sess_start,next_sess_start This option is needed when .B mkisofs is used to create a CDextra or the image of a second session or a @@ -657,9 +804,11 @@ .B mkisofs will create a filesystem image that is intended to be used for a second session on a CDextra. This is a multi session CD that holds audio data -in the first session and a ISO9660 filesystem in the second session. +in the first session and a ISO-9660 filesystem in the second session. .TP .BI \-c " boot_catalog +.TP +.BI \-eltorito\-catalog " boot_catalog Specifies the path and filename of the boot catalog to be used when making an "El Torito" bootable CD. The pathname must be relative to the source path specified to @@ -681,15 +830,15 @@ Check all filenames imported from old session for compliance with actual .B mkisofs -iso9660 file naming rules. +ISO-9660 file naming rules. It his option is not present, only names with a length > 31 are checked -as these files are a hard violation of the iso9660 standard. +as these files are a hard violation of the ISO-9660 standard. .TP .BI \-check\-session " FILE Check all old sessions for compliance with actual .B mkisofs -iso9660 file naming rules. +ISO-9660 file naming rules. This is a high level option that is a combination of the options: .BI \-M " FILE " "\-C 0,0 \-check\-oldnames For the parameter @@ -699,40 +848,109 @@ option. .TP .BI \-copyright " FILE -Specifies the Copyright file name. +Specifies the Copyright file name in the primary volume descriptor. There is space on the disc for 37 characters of information. +The related Joliet entry is limited to 18 characters. This parameter can also be set in the file .B \&.m\&kisofsrc with COPY=filename. If specified in both places, the command line version is used. +.sp +It is up to the user of +.B mkisofs +to include a file with the apropriate name in the created filesystem tree. .TP .B \-d +.TP +.B \-omit\-period Omit trailing period from files that do not have a period. .br -This violates the ISO9660 standard, but it happens to work on many systems. +This violates the ISO-9660 standard, but it happens to work on many systems. Use with caution. .TP .B \-D -Do not use deep directory relocation, and instead just pack them in the -way we see them. -.br -If ISO9660:1999 has not been selected, -this violates the ISO9660 standard, but it happens to work on many systems. +.TP +.B \-disable\-deep\-relocation +Do not use +.B Rock Ridge +deep directory relocation, and instead just pack directories in the +way they are in the master directory tree. +.sp +This option was needed with old +.B mkisofs +versions to avoid a visible directory +.BR rr_moved . +Since August 2006, +.B mkisofs +correctly hides the +.B rr_moved +directory from the +.B Rock Ridge +filesystem. +.sp +If ISO-9660:1999 has not been selected, +this violates the ISO-9660 standard, but it happens to work on many systems. Use with caution. .TP +.B \-data\-change\-warn +If the size of a file changes while the file is being archived, treat this +condition as a warning only that does not cause +.B mkisofs +to abort. +A warning message is still written if the condition is not otherwise +ignored by another rule from an +.B errctl= +option. +The +.B \-data\-change\-warn +option works as if the last error control option was +.sp + \fBerrctl=\fP\fI"WARN|GROW|SHRINK *"\fP +.sp +.TP +.B \-debug +Increment debug value by one. +.TP .BI \-dir\-mode " mode Overrides the mode of directories used to create the image to .IR mode . -Specifying this option automatically enables Rock Ridge extensions. +See +.B \-new\-dir\-mode +on how to specify a different +.I mode +that is used for directories that do not exist +in the tree specified by the source-path. +Specifying the +.B \-dir\-mode +option automatically enables Rock Ridge extensions. +.br +.ne 4 +.TP +.B \-dvd\-audio +Generate DVD-Audio compliant UDF file system. This is done by sorting the +order of the content of the appropriate files. +.\" Audio is currently not sorted +.\" and by adding padding between the files if needed. +Sorting only works if the DVD-Audio filenames include upper case +characters only. +.sp +Note that in order to get a DVD-Audio compliant filesystem image, you need +to prepare a DVD-Audio compliant directory tree. This means you need to +have a directory AUDIO_TS (all caps) in the root directory of the resulting DVD +and you should have a directory VIDEO_TS. The directory AUDIO_TS needs to +include all needed files (file names must be all caps) for a compliant DVD-Audio +filesystem. +.TP +.B \-dvd\-hybrid +Equivalent to selecting both -dvd-audio and -dvd-video .TP .B \-dvd\-video Generate DVD-Video compliant UDF file system. This is done by sorting the order of the content of the appropriate files and by adding padding between the files if needed. -Note that the sorting only works if the DVD-Video filenames include upper case +Sorting only works if the DVD-Video filenames include upper case characters only. -.br -.br +.sp Note that in order to get a DVD-Video compliant filesystem image, you need to prepare a DVD-Video compliant directory tree. This means you need to have a directory VIDEO_TS (all caps) in the root directory of the resulting DVD @@ -741,6 +959,8 @@ filesystem. .TP .B \-f +.TP +.B \-follow\-links Follow all symbolic links when generating the filesystem. When this option is not in use, symbolic links will be entered using Rock Ridge if enabled, otherwise the file will be ignored. @@ -862,7 +1082,7 @@ .B \-graft\-points Allow to use graft points for filenames. If this option is used, all filenames are checked for graft points. The filename is divided at the first unescaped -equal sign. All occurrences of '\\\\' and '=' characters must be escaped with '\\\\' +equal sign. All occurrences of '\e\e' and '=' characters must be escaped with '\e\e' if .I \-graft\-points has been specified. @@ -870,7 +1090,7 @@ .BI \-hide " glob Hide .I glob -from being seen on the ISO9660 or Rock Ridge directory. +from being seen on the ISO-9660 or Rock Ridge directory. .I glob is a shell wild-card-style pattern that must match any part of the filename or path. @@ -891,7 +1111,7 @@ to be hidden as above. .TP .BI \-hidden " glob -Add the hidden (existence) ISO9660 directory attribute for +Add the hidden (existence) ISO-9660 directory attribute for .IR glob . This attribute will prevent .I glob @@ -936,7 +1156,7 @@ .B TRANS.TBL files from the Joliet tree. These files usually don't make sense in the Joliet World as they list -the real name and the ISO9660 name which may both be different from the +the real name and the ISO-9660 name which may both be different from the Joliet name. .TP .B \-hide\-rr\-moved @@ -945,18 +1165,21 @@ to .B .rr_moved in the Rock Ridge tree. -It seems to be impossible to completely hide the +This option has been introduced when +.B mkisofs +was not able to hide the directory in the Rock Ridge tree. +This version of +.B mkisofs +always automatically hides the .B RR_MOVED -directory from the Rock Ridge tree. -This option only makes the visible tree better to understand for -people who don't know what this directory is for. +directory in the Rock Ridge tree. If you need to have no .B RR_MOVED -directory at all, you should use the +directory at all (even in the ISO-9660 tree), you should use the .B \-D option. Note that in case that the .B \-D -option has been specified, the resulting filesystem is not ISO9660 +option has been specified, the resulting filesystem is not ISO-9660 level-1 compliant and will not be readable on MS-DOS. See also .B NOTES @@ -988,6 +1211,19 @@ .I globs to be hidden as above. +.PD 0 +.TP +.B \-hide\-ignorecase +.TP +.B \-exclude\-ignorecase +.PD +Ignore the case of the filenames with the +.B \-hide* +options +and with the +.B \-exclude\-list +option. + .TP .BI \-input\-charset " charset Set up the input charset that defines the characters used in local file names. @@ -1018,7 +1254,7 @@ section below for more details. .TP .BI \-iso\-level " level -Set the iso9660 conformance level. Valid numbers are 1..3 and 4. +Set the ISO-9660 conformance level. Valid numbers are 1..3 and 4. .sp With level 1, files may only consist of one section and filenames are restricted to 8.3 characters. @@ -1029,7 +1265,7 @@ Starting with this level, mkisofs also allows files to be larger than 4 GB by implementing ISO-9660 multi-extent files. .sp -With all iso9660 levels from 1..3, all filenames are restricted to upper +With all ISO-9660 levels from 1..3, all filenames are restricted to upper case letters, numbers and the underscore (_). The maximum filename length is restricted to 31 characters, the directory nesting level is restricted to 8 and the maximum path length is limited to 255 characters. @@ -1058,7 +1294,7 @@ this putative PVD copy into an El Torito VD. .TP .B \-J -Generate Joliet directory records in addition to regular iso9660 file +Generate Joliet directory records in addition to regular ISO-9660 file names. This is primarily useful when the discs are to be used on Windows-NT or Windows-95 machines. The Joliet filenames are specified in Unicode and each path component can be up to 64 Unicode characters long. @@ -1086,8 +1322,10 @@ section below for more details. .TP .B \-l -Allow full 31 character filenames. Normally the ISO9660 filename will be in an -8.3 format which is compatible with MS-DOS, even though the ISO9660 standard +.TP +.B \-full\-iso9660\-filenames +Allow full 31 character filenames. Normally the ISO-9660 filename will be in an +8.3 format which is compatible with MS-DOS, even though the ISO-9660 standard allows filenames of up to 31 characters. If you use this option, the disc may be difficult to use on a MS-DOS system, but this comes in handy on some other systems (such as the Amiga). @@ -1097,13 +1335,20 @@ Outdated option reserved by POSIX.1-2001, use .B \-allow\-leading\-dots instead. -This option will get POSIX.1-2001 semantics with mkisofs-2.02. +This option will get POSIX.1-2001 semantics with mkisofs-3.02. .TP .BI \-log\-file " log_file Redirect all error, warning and informational messages to .I log_file instead of the standard error. .TP +.B \-long\-rr\-time +Use the long ISO-9660 time format for the file time stamps used in Rock Ridge. +This time format allows to represent year 0 .. year 9999 with a granularity of 10ms. +.sp +The short ISO-9660 time format only allows to represent year 1900 .. year 2155 +with a granularity of 1s. +.TP .BI \-m " glob Exclude .I glob @@ -1137,16 +1382,16 @@ .BI \-exclude\-list " file A file containing a list of .I globs -to be exclude as above. +to be excluded as above. .TP .B \-max\-iso9660\-filenames -Allow 37 chars in iso9660 filenames. +Allow 37 chars in ISO-9660 filenames. This option forces the .B \-N option as the extra name space is taken from the space reserved for ISO-9660 version numbers. .br -This violates the ISO9660 standard, but it happens to work on many systems. +This violates the ISO-9660 standard, but it happens to work on many systems. Although a conforming application needs to provide a buffer space of at least 37 characters, disks created with this option may cause a buffer overflow in the reading operating system. Use with extreme care. @@ -1158,7 +1403,7 @@ or .TP .BI \-dev " device -Specifies path to existing iso9660 image to be merged. The alternate form +Specifies path to existing ISO-9660 image to be merged. The alternate form takes a SCSI device specifier that uses the same syntax as the .B "dev= parameter of @@ -1173,29 +1418,86 @@ .B \-C option. .TP +.BI \-modification\-date " date-spec +Set the +.B modification date +in the primary volume descriptor (PVD) to a value different from the current +time. +This allows e.g. to set up an intentional UUID for +.BR grub . +.sp +.ne 3 +The format of +.I date-spec +is: +.sp +.nf + \fIyyyy\fR[\fImm\fR[\fIdd\fR[\fIhh\fR[\fImm\fR[\fIss\fR]\|]\|]\|]\|][.\fIhh\fR][+-\fIghgm\fR] +.fi +.sp +The fields are +.BR year , +.BR month , +.BR "day of month" , +.BR hour , +.BR minute , +.BR second , +.BR "hundreds of a second" , +.BR "GMT offset in hours and minutes" . +The time is interpreted as local time. +.sp +Year and the GMT offset are four digit fields, all other fields take two digits. +The GMT offset may be between -12 and +13 hours in 15 minute steps. Locations +east to Greenwich have positive values. The value is the sum of the time zone offset +and the effects from daylight saving time. +Omited values are replaced by the minimal possible values. +If the GMT offset is omited, it is computed from the local time value that has been +supplied. +.sp +Between year and month as well as between month and day of month, a separator chosen +from '/' and '-' may appear. In this case, the year may be a two digit number with +values 69..99 representing 1969..1999 and values 00..68 representing 2000..2068. +Between date and time spec, an optional space is permitted. Between hours and minutes +as well as between minutes and seconds, an optional ':' separator is permitted. +This allows +.B mkisofs +to parse the popular POSIX date format created by: +.sp +.nf + \fBdate "+%Y-%m-%d %H:%M:%S %z"\fR +.fi +.sp +Note that the possible range for +.I date-spec +for 32 bit programs is limited to values up to 2038 Jan 19 04:14:07 GMT. +.TP .B \-N -Omit version numbers from ISO9660 file names. +.TP +.B \-omit\-version\-number +Omit version numbers from ISO-9660 file names. .br -This violates the ISO9660 standard, but no one really uses the +This violates the ISO-9660 standard, but no one really uses the version numbers anyway. Use with caution. .TP .BI \-new\-dir\-mode " mode Mode to use when creating new directories in the iso fs image. The default -mode is 0555. +mode in the absence of a +.B \-dir\-mode +option is 0555. .TP .B \-nobak .TP .B \-no\-bak -Do not include backup files files on the iso9660 filesystem. +Do not include backup files files on the ISO-9660 filesystem. If the .B \-no\-bak option is specified, files that contain the characters '~' or '#' or end in '.bak' will not be included (these are typically backup files -for editors under unix). +for editors under UNIX). .TP .B \-no\-limit\-pathtables -A ISO9660 filesystem contains path tables that contain a list of directories. +A ISO-9660 filesystem contains path tables that contain a list of directories. This list may contain many directories but only 65535 of them may be parent directories. When @@ -1204,9 +1506,13 @@ and the resulting filesystem will no longer be usable on .BR DOS . .TP +.B \-no\-long\-rr\-time +Use the short ISO-9660 time format for the file time stamps used in Rock Ridge. +This time format allows to represent year 1990 .. year 2155 with a granularity of one second. +.TP .B \-force\-rr Do not use the automatic Rock Ridge attributes recognition for previous sessions. -This helps to show rotten iso9660 extension records as e.g. created by NERO burning ROM. +This helps to show rotten ISO-9660 extension records as e.g. created by NERO burning ROM. .TP .B \-no\-rr Do not use the Rock Ridge attributes from previous sessions. @@ -1247,7 +1553,7 @@ has been fixed in May 2003. .TP .BI \-o " filename -is the name of the file to which the iso9660 filesystem image should be +is the name of the file to which the ISO-9660 filesystem image should be written. This can be a disk file, a tape drive, or it can correspond directly to the device name of the optical disc writer. If not specified, stdout is used. Note that the output can also be a block special device for a regular @@ -1258,7 +1564,7 @@ Pad the end of the whole image by 150 sectors (300 kB). If the option .B \-B -is used, then there is a padding at the end of the iso9660 partition +is used, then there is a padding at the end of the ISO-9660 partition and before the beginning of the boot partitions. The size of this padding is chosen to make the first boot partition start on a sector number that is a multiple of 16. @@ -1282,7 +1588,7 @@ .BI \-path\-list " file A file containing a list of .I pathspec -directories and filenames to be added to the ISO9660 filesystem. This list +directories and filenames to be added to the ISO-9660 filesystem. This list of pathspecs are processed after any that appear on the command line. If the argument is .IR \- , @@ -1292,22 +1598,28 @@ Outdated option reserved by POSIX.1-2001, use .B \-publisher instead. -This option will get POSIX.1-2001 semantics with mkisofs-2.02. +This option will get POSIX.1-2001 semantics with mkisofs-3.02. .TP .BI \-publisher " publisher_id Specifies a text string that will be written into the volume header. This should describe the publisher of the CDROM, usually with a mailing address and phone number. There is space on the disc for 128 -characters of information. This parameter can also be set in the file +characters of information. +The related Joliet entry is limited to 64 characters. +This parameter can also be set in the file .B \&.m\&kisofsrc with PUBL=. If specified in both places, the command line version is used. .TP .BI \-p " preparer_id +.TP +.BI \-preparer " preparer_id Specifies a text string that will be written into the volume header. This should describe the preparer of the CDROM, usually with a mailing address and phone number. There is space on the disc for 128 -characters of information. This parameter can also be set in the file +characters of information. +The related Joliet entry is limited to 64 characters. +This parameter can also be set in the file .B \&.m\&kisofsrc with PREP=. If specified in both places, the command line version is used. @@ -1363,14 +1675,18 @@ even less verbose. No progress output will be provided. .TP .B \-R +.TP +.B \-rock Generate SUSP and RR records using the Rock Ridge protocol to further describe -the files on the iso9660 filesystem. +the files on the ISO-9660 filesystem. The Rock Ridge protocol is needed in order to add POSIX like file meta data like permissions, extended time stamps, user/group is'd, link counts, inode numbers and symbolic links. The Rock Ridge protocol allows to archive hierarchy trees with unlimited depth. .TP .B \-r +.TP +.B \-rational\-rock This is like the \-R option, but file ownership and modes are set to more useful values. The uid and gid are set to zero, because they are usually only useful on the author's system, and not useful to the @@ -1393,11 +1709,11 @@ .B \-relaxed\-filenames The option .B \-relaxed\-filenames -allows ISO9660 filenames to include digits, upper case characters +allows ISO-9660 filenames to include digits, upper case characters and all other 7 bit ASCII characters (resp. anything except lowercase characters). .br -This violates the ISO9660 standard, but it happens to work on many systems. +This violates the ISO-9660 standard, but it happens to work on many systems. Use with caution. .TP .BI \-root " dir @@ -1415,7 +1731,7 @@ created with the same permissions as other graft points. .TP .B \-rrip110 -Create ISO9660 file system images that follow the old Rrip Version-1.10 standard +Create ISO-9660 file system images that follow the old Rrip Version-1.10 standard from 1993. This option may be needed if you know of systems that do not implement the Rrip protocol correctly and like the file system to be read by such a system. Currently no such system is known. @@ -1425,7 +1741,7 @@ the Rock Ridge attributes do not include inode number information. .TP .B \-rrip112 -Create ISO9660 file system images that follow the new Rrip Version-1.12 standard +Create ISO-9660 file system images that follow the new Rrip Version-1.12 standard from 1994, this is the default. .TP .BI \-old-root " dir @@ -1465,6 +1781,51 @@ intentionally. Accessing several older versions of a file requires support by the operating system to choose which sessions are to be mounted. +.br +.ne 8 +.TP +.B \-short\-rr\-time +Use the short ISO-9660 time format for the file time stamps used in Rock Ridge. +This time format allows to represent year 1990 .. year 2155 with a granularity of one second. +.TP +.BI \-s " sector type +.TP +.BI \-sectype " sector type +Set the +.I sector type +to be used for the output file with the ISO-9660 filesystem. +The +.I sector type +may be one of: +.RS +.TP +.B data +This is the default. It results in standard CD-ROM data sectors with +2048 bytes per sector. +.TP +.B xa1 +This sets the sector type to CD-ROM XA mode 1 with 2056 bytes per sector. +This sector type is the official sector type for multi-session CDs, it +should be used together with the +.B \-XA +option of mkisofs. +It is required to write Kodak Photo CDs and Kodak Picture CDs. +Use the +.B \-xa1 +option from +.B cdrecord +to tell +.B cdrecord +to write CD-ROM XA mode 1 sectors. +Do not use for DVD or BluRay media. +.br +.ne 6 +.TP +.B raw +This sets the sector type to raw audio sectors with 2352 bytes per sector. +This is reserved for future enhancements. +Do not use for DVD or BluRay media. +.RE .TP .BI \-sort " sort file Sort file locations on the media. Sorting is controlled by a file that @@ -1480,10 +1841,17 @@ This option does .B not sort the order of the file names that appear -in the ISO9660 directory. It sorts the order in which the file data is +in the ISO-9660 directory. It sorts the order in which the file data is written to the CD image - which may be useful in order to optimize the data layout on a CD. See README.sort for more details. .TP +.BI \-isort " sort file +Similiar to +.B \-sort +but the case if the filenames in the +.B sort file +is ignored. +.TP .BI \-sparc\-boot " img_sun4,img_sun4c,img_sun4m,img_sun4d,img_sun4e See .B \-B @@ -1496,7 +1864,7 @@ .TP .B \-split\-output Split the output image into several files of approximately 1 GB. -This helps to create DVD sized iso9660 images on operating systems without +This helps to create DVD sized ISO-9660 images on operating systems without large file support. Cdrecord will concatenate more than one file into a single track if writing to a DVD. @@ -1510,7 +1878,7 @@ .BI \-stream\-media\-size " # Select streaming operation and set the media size to # sectors. This allows you to pipe the output of the tar program into mkisofs -and to create a iso9660 filesystem without the need of an intermediate +and to create a ISO-9660 filesystem without the need of an intermediate tar archive file. If this option has been specified, .B mkisofs @@ -1526,7 +1894,7 @@ .sp The option .B \-stream\-media\-size -creates simple iso9660 filesystems only and may not used together with multi-session +creates simple ISO-9660 filesystems only and may not used together with multi-session or hybrid filesystem options. .TP .BI \-stream\-file\-name " name @@ -1561,7 +1929,7 @@ SVr4 disk label at offset 1024 in the first sector of the CD. This disk label specifies slice 0 for the first (usually UFS type) filesystem image that is used to boot the PC and slice 1 for -the iso9660 image. +the ISO-9660 image. Slice 2 spans the whole CD slice 3 .\|.\|. slice 7 may be used for additional filesystem images that have been specified with this option. .sp @@ -1588,6 +1956,8 @@ If specified in both places, the command line version is used. .TP .B \-T +.TP +.B \-translation\-table Generate a file TRANS.TBL in each directory on the CDROM, which can be used on non-Rock Ridge capable systems to help establish the correct file names. There is also information present in the file that indicates the major and @@ -1606,19 +1976,17 @@ It may be set to 1..3 using this option. .TP .B \-UDF -Include -.B UDF -support in the generated filesystem image. -.B UDF -support is currently in alpha status and for this reason, it is not possible -to create UDF only images. +Include a .B UDF -data structures are currently coupled to the Joliet structures, so there are many -pitfalls with the current implementation. +hybrid in the generated filesystem image. +As +.B mkisofs +always creates a ISO-9660 filesystem, +it is not possible to create UDF only images. Note that .B UDF wastes the space from sector ~20 to sector 256 at the beginning of the disk -in addition to the spcae needed for real +in addition to the space needed for real .B UDF data structures. .TP @@ -1657,7 +2025,9 @@ This option is the default on VMS. .TP .B \-U -Allows "Untranslated" filenames, completely violating the iso9660 standards +.TP +.B \-untranslated\-filenames +Allows "Untranslated" filenames, completely violating the ISO-9660 standards described above. Forces on the \-d, \-l, \-N, \-allow\-leading\-dots, \-relaxed\-filenames, \-allow\-lowercase, \-allow\-multidot and \-no\-iso\-translate @@ -1667,10 +2037,10 @@ not recognize ANY extensions. Use with extreme caution. .TP .B \-no\-iso\-translate -Do not translate the characters '#' and '~' which are invalid for iso9660 filenames. +Do not translate the characters '#' and '~' which are invalid for ISO-9660 filenames. These characters are though invalid often used by Microsoft systems. .br -This violates the ISO9660 standard, but it happens to work on many systems. +This violates the ISO-9660 standard, but it happens to work on many systems. Use with caution. .TP .BI \-V " volid @@ -1688,6 +2058,7 @@ .BI \-volset " ID Specifies the volset ID. There is space on the disc for 128 characters of information. +The related Joliet entry is limited to 64 characters. This parameter can also be set in the file .B \&.m\&kisofsrc with VOLS=volset_id. @@ -1730,6 +2101,8 @@ on each command line. .TP .B \-v +.TP +.B \-verbose Verbose execution. If given twice on the command line, extra debug information will be printed. .TP @@ -1753,6 +2126,21 @@ Both now work identical and use filename globbing. A file is excluded if either the last component matches or the whole path matches. .TP +.B \-XA +Generate XA iso-directory attributes with original owner and mode information. +This option is required to create conforming multi session CDs as used by the +Kodak Photo CD and the Kodak Picture CD. +A conforming XA CD uses CD-ROM XA mode 1 sectors, see the +.BI \-sector " xa2 +option for more information. +.TP +.B \-xa +Generate XA iso-directory attributes with rationalized owner and mode information. +User ID and group ID are set to 0. +See +.B \-XA +for more information. +.TP .B \-z Generate special RRIP records for transparently compressed files. This is only of use and interest for hosts that support transparent @@ -1773,7 +2161,7 @@ .SH "HFS OPTIONS .TP .B \-hfs -Create an ISO9660/HFS hybrid CD. This option should be used in conjunction +Create an ISO-9660/HFS hybrid CD. This option should be used in conjunction with the .BR \-map , .B \-magic @@ -1782,12 +2170,12 @@ options given below. .TP .B \-no\-hfs -Do not create an ISO9660/HFS hybrid CD even though other options may imply to do so. +Do not create an ISO-9660/HFS hybrid CD even though other options may imply to do so. .TP .B \-apple -Create an ISO9660 CD with Apple's extensions. Similar to the +Create an ISO-9660 CD with Apple's extensions. Similar to the .B \-hfs -option, except that the Apple Extensions to ISO9660 are added instead of +option, except that the Apple Extensions to ISO-9660 are added instead of creating an HFS hybrid volume. Former .B mkisofs @@ -1850,7 +2238,7 @@ By default, empty Desktop files are added to the HFS volume. .TP .B \-mac\-name -Use the HFS filename as the starting point for the ISO9660, Joliet and +Use the HFS filename as the starting point for the ISO-9660, Joliet and Rock Ridge file names. See the .B HFS MACINTOSH FILE NAMES section below for more information. @@ -1887,7 +2275,7 @@ Hide .I glob from the HFS volume. The file or directory will still exist in the -ISO9660 and/or Joliet directory. +ISO-9660 and/or Joliet directory. .I glob is a shell wild-card-style pattern that must match any part of the filename Multiple globs may be excluded. @@ -1945,6 +2333,12 @@ .BI \-prep\-boot " FILE PReP boot image file. Up to 4 are allowed. See README.prep_boot (Alpha) .TP +.B \-chrp-\boot +Create a CHRP boot in boot partition 1. +See +.B \-prep\-boot +for further information. +.TP .BI \-input\-hfs\-charset " charset Input charset that defines the characters used in HFS file names when used with the @@ -2053,7 +2447,8 @@ This coding is similar to .B UTF-16 with the disadvantage that it only supports -a 16 bit subset of all codes and that 16-bit characters are not compliant with +a 16 bit subset (except when surrogates are used) of all codes +and that 16-bit characters are not compliant with the POSIX filesystem interface. .PP Modern UNIX operating systems may use @@ -2062,13 +2457,13 @@ Each 32-bit character is represented by one or more 8-bit characters. If a character is coded in .B ISO-8859-1 -(used in Central Europe and North America) is maps 1:1 to a +(used in Central Europe and North America) it maps 1:1 to a .BR UTF-32 " or " UTF-16 " coded Unicode character. If a character is coded in .B "7-Bit ASCII (used in USA and other countries with limited character set) -is maps 1:1 to a +it maps 1:1 to a .BR UTF-32 ", " UTF-16 " or " UTF-8 coded Unicode character. Character codes that cannot be represented as a single byte in UTF-8 @@ -2087,7 +2482,7 @@ For all non .B UTF-8 coded operating systems, the actual character -that each byte represents depends on the +that each byte represents, depends on the .I character set or .I codepage @@ -2166,8 +2561,13 @@ .I \-input\-charset option. Defaults to the input HFS character set. .PP -There are a number of character sets built in to -.IR mkisofs . +The +.B default +character set is built into +.BR mkisofs . +A number of further character sets are read in from the filesystem by +.I mkisofs +from a directory relatively to the install path. To get a listing, use .B "mkisofs \-input\-charset help. .PP @@ -2190,9 +2590,9 @@ .BR iconv (1) based character sets, additional character sets can be read from file for any of the character -set options by giving a filename as the argument to the options. The given -file will only be read if its name does not match one of the built in -character sets. +set options by giving a filename as the argument to the options. A given +character set will be read from a file whenever the supplied name contains +a '/'. .PP The format of the character set files is the same as the mapping files available from http://www.unicode.org/Public/MAPPINGS The format of these @@ -2219,8 +2619,8 @@ of older (v1.12) versions of .BR mkisofs . .PP -The ISO9660 file names generated from the input filenames are not converted -from the input character set. The ISO9660 character set is a very limited +The ISO-9660 file names generated from the input filenames are not converted +from the input character set. The ISO-9660 character set is a very limited subset of the ASCII characters, so any conversion would be pointless. .PP Any character that @@ -2369,10 +2769,10 @@ 0/string/GIF8/8BIM GIFf GIF image 0/beshort/0xffd8/8BIM JPEG image data 0/string/SIT!/SIT! SIT! StuffIt Archive -0/string/\\037\\235/LZIV ZIVU standard unix compress -0/string/\\037\\213/GNUz ZIVU gzip compressed data +0/string/\e037\e235/LZIV ZIVU standard unix compress +0/string/\e037\e213/GNUz ZIVU gzip compressed data 0/string/%!/ASPS TEXT Postscript -0/string/\\004%!/ASPS TEXT PC Postscript with a ^D to start +0/string/\e004%!/ASPS TEXT PC Postscript with a ^D to start 4/string/moov/txtt MooV QuickTime movie file (moov) 4/string/mdat/txtt MooV QuickTime movie file (mdat) .TE @@ -2550,14 +2950,14 @@ When using the .B \-apple option, the TYPE and CREATOR are stored in the optional System Use or SUSP field -in the ISO9660 Directory Record - in much the same way as the Rock Ridge +in the ISO-9660 Directory Record - in much the same way as the Rock Ridge attributes are. In fact to make life easy, the Apple extensions are added at the beginning of the existing Rock Ridge attributes (i.e. to get the Apple extensions you get the Rock Ridge extensions as well). .PP -The Apple extensions require the resource fork to be stored as an ISO9660 +The Apple extensions require the resource fork to be stored as an ISO-9660 .I associated -file. This is just like any normal file stored in the ISO9660 filesystem +file. This is just like any normal file stored in the ISO-9660 filesystem except that the associated file flag is set in the Directory Record (bit 2). This file has the same name as the data fork (the file seen by non-Apple machines). Associated files are normally ignored by other OSs @@ -2565,14 +2965,14 @@ When using the .B \-hfs option, the TYPE and CREATOR plus other finder info, are stored in a separate -HFS directory, not visible on the ISO9660 volume. The HFS directory references +HFS directory, not visible on the ISO-9660 volume. The HFS directory references the same data and resource fork files described above. .PP In most cases, it is better to use the .B \-hfs option instead of the .B \-apple -option, as the latter imposes the limited ISO9660 characters allowed in +option, as the latter imposes the limited ISO-9660 characters allowed in filenames. However, the Apple extensions do give the advantage that the files are packed on the disk more efficiently and it may be possible to fit more files on a CD - important when the total size of the source files is @@ -2618,7 +3018,7 @@ to one of the filenames. .PP If an HFS filename exists for a file, then mkisofs can use this name as -the starting point for the ISO9660, Joliet and Rock Ridge filenames using +the starting point for the ISO-9660, Joliet and Rock Ridge filenames using the .B \-mac\-name option. Normal Unix files without an HFS name will still use their Unix name. @@ -2635,12 +3035,12 @@ .IR someimage.gif , then this is the name that would appear on the HFS part of the CD. However, as mkisofs uses the Unix name as the starting point for the other names, then -the ISO9660 name generated will probably be +the ISO-9660 name generated will probably be .I SOMEIMAG.BIN and the Joliet/Rock Ridge would be .IR someimage.gif.bin . Although the actual data (in this case) is a GIF image. This option will use -the HFS filename as the starting point and the ISO9660 name will probably be +the HFS filename as the starting point and the ISO-9660 name will probably be .I SOMEIMAG.GIF and the Joliet/Rock Ridge would be .IR someimage.gif . @@ -2659,7 +3059,7 @@ The character set used can be specified using the .I \-input\-hfs\-charset option. Other built in HFS character sets are: cp10006 (MacGreek), -cp10007 (MacCyrillic), cp10029 (MacLatin2), cp10079 (MacIcelandandic) and +cp10007 (MacCyrillic), cp10029 (MacLatin2), cp10079 (MacIcelandic) and cp10081 (MacTurkish). .PP Note: the character codes used by HFS file names taken from the various @@ -2668,14 +3068,14 @@ the HFS file names will be converted. .PP The existing mkisofs code will filter out any illegal characters for the -ISO9660 and Joliet filenames, but as mkisofs expects to be dealing +ISO-9660 and Joliet filenames, but as mkisofs expects to be dealing directly with Unix names, it leaves the Rock Ridge names as is. But as '/' is a legal HFS filename character, the .B \-mac\-name option converts '/' to a '_' in Rock Ridge filenames. .PP -If the Apple extensions are used, then only the ISO9660 filenames will -appear on the Macintosh. However, as the Macintosh ISO9660 drivers can use +If the Apple extensions are used, then only the ISO-9660 filenames will +appear on the Macintosh. However, as the Macintosh ISO-9660 drivers can use .I Level 2 filenames, then you can use options like .B \-allow\-multidot @@ -2701,10 +3101,10 @@ To give a HFS CD a custom icon, make sure the root (top level) folder includes a standard Macintosh volume icon file. To give a volume a custom icon on a Macintosh, an icon has to be pasted over the volume's icon in the "Get Info" -box of the volume. This creates an invisible file called 'Icon\\r' ('\\r' is +box of the volume. This creates an invisible file called 'Icon\er' ('\er' is the 'carriage return' character) in the root folder. .P -A custom folder icon is very similar - an invisible file called 'Icon\\r' +A custom folder icon is very similar - an invisible file called 'Icon\er' exits in the folder itself. .P Probably the easiest way to create a custom icon that mkisofs can use, is to @@ -2736,10 +3136,10 @@ mkisofs \-\-macbin \-o output source_dir icon_dir .PP The procedure for creating/using custom folder icons is very similar - paste -an icon to folder's "Get Info" box and transfer the resulting 'Icon\\r' +an icon to folder's "Get Info" box and transfer the resulting 'Icon\er' file to the relevant directory in the mkisofs source tree. .PP -You may want to hide the icon files from the ISO9660 and Joliet trees. +You may want to hide the icon files from the ISO-9660 and Joliet trees. .PP To give a custom icon to a Joliet CD, follow the instructions found at: http://www.fadden.com/cdrfaq/faq03.html#[3-21] @@ -2834,6 +3234,7 @@ The application identifier should describe the application that will be on the disc. There is space on the disc for 128 characters of information. +The related Joliet entry is limited to 64 characters. May be overridden using the .B \-A command line option. @@ -2842,6 +3243,7 @@ The copyright information, often the name of a file on the disc containing the copyright notice. There is space in the disc for 37 characters of information. +The related Joliet entry is limited to 18 characters. May be overridden using the .B \-copyright command line option. @@ -2850,6 +3252,7 @@ The abstract information, often the name of a file on the disc containing an abstract. There is space in the disc for 37 characters of information. +The related Joliet entry is limited to 18 characters. May be overridden using the .B \-abstract command line option. @@ -2858,6 +3261,7 @@ The bibliographic information, often the name of a file on the disc containing a bibliography. There is space in the disc for 37 characters of information. +The related Joliet entry is limited to 18 characters. May be overridden using the .B \-bilio command line option. @@ -2866,6 +3270,7 @@ This should describe the preparer of the CDROM, usually with a mailing address and phone number. There is space on the disc for 128 characters of information. +The related Joliet entry is limited to 64 characters. May be overridden using the .B \-p command line option. @@ -2874,6 +3279,7 @@ This should describe the publisher of the CDROM, usually with a mailing address and phone number. There is space on the disc for 128 characters of information. +The related Joliet entry is limited to 64 characters. May be overridden using the .B \-publisher command line option. @@ -2895,6 +3301,7 @@ .B VOLS The Volume Set Name. There is space on the disc for 128 characters of information. +The related Joliet entry is limited to 64 characters. May be overridden using the .B \-volset command line option. @@ -2921,7 +3328,7 @@ .IR cd.iso , where the directory .I cd_dir -will become the root directory if the CD, call: +will become the root directory of the CD ISO image, call: .PP % mkisofs \-o cd.iso cd_dir .PP @@ -2942,11 +3349,11 @@ % mkisofs \-o cd.iso \-r cd_dir .PP To write a tar archive directly to a CD that will later contain a simple -iso9660 filesystem with the tar archive call: +ISO-9660 filesystem with the tar archive call: .PP -% star \-c . | mkisofs \-stream\-media\-size 333000 | \\ +% star \-c . | mkisofs \-stream\-media\-size 333000 | \e .br -cdrecord dev=b,t,l \-dao tsize=333000s \- + cdrecord dev=b,t,l \-dao tsize=333000s \- .PP To create a HFS hybrid CD with the Joliet and Rock Ridge extensions of the source directory @@ -2969,7 +3376,7 @@ .PP % mkisofs \-o cd.iso \-map mapping cd_dir .PP -To create a CD with the 'Apple Extensions to ISO9660', from the source +To create a CD with the 'Apple Extensions to ISO-9660', from the source directories .I cd_dir and @@ -2978,13 +3385,13 @@ are decoded and any other files are given CREATOR and TYPE based on their magic number given in the file "magic": .PP -% mkisofs \-o cd.iso \-apple \-magic magic \-probe \\ +% mkisofs \-o cd.iso \-apple \-magic magic \-probe \e .br cd_dir another_dir .PP The following example puts different files on the CD that all have the name README, but have different contents when seen as a -ISO9660/RockRidge, Joliet or HFS CD. +ISO-9660/RockRidge, Joliet or HFS CD. .PP Current directory contains: .PP @@ -2998,34 +3405,31 @@ CD along with the three README files - but only one will be seen from each of the three filesystems: .PP -% mkisofs \-o cd.iso \-hfs \-J \-r \-graft\-points \\ +% mkisofs \-o cd.iso \-hfs \-J \-r \-graft\-points \e .br - \-hide README.hfs \-hide README.joliet \\ + \-hide README.hfs \-hide README.joliet \e .br - \-hide\-joliet README.hfs \-hide\-joliet README.unix \\ + \-hide\-joliet README.hfs \-hide\-joliet README.unix \e .br - \-hide\-hfs README.joliet \-hide\-hfs README.unix \\ + \-hide\-hfs README.joliet \-hide\-hfs README.unix \e .br - README=README.hfs README=README.joliet \\ + README=README.hfs README=README.joliet \e .br README=README.unix cd_dir .PP i.e. the file README.hfs will be seen as README on the HFS CD and the other two README files will be hidden. Similarly for the Joliet and -ISO9660/RockRidge CD. +ISO-9660/RockRidge CD. .PP There are probably all sorts of strange results possible with combinations of the hide options ... +.PP +To create a DVD-Audio of the DVD-Audio compliant source directory +.IR DVD : +.PP +% mkisofs \-o dvda.iso \-dvd\-audio DVD .SH AUTHOR -.B m\&kisofs -is not based on the standard mk*fs tools for unix, because we must generate -a complete copy of an existing filesystem on a disk in the iso9660 -filesystem. The name m\&kisofs is probably a bit of a misnomer, since it -not only creates the filesystem, but it also populates it as well. -However, the appropriate tool name for a UNIX tool that creates populated -filesystems - mkproto - is not well known. -.PP .br Eric Youngdale or wrote the first versions (1993 .\|.\|. 1998) of the m\&kisofs utility. @@ -3033,14 +3437,15 @@ Yggdrasil Computing, Incorporated. J\*org Schilling wrote the SCSI transport library and its adaptation layer to .B mkisofs -and newer parts (starting from 1999) of the utility, this makes +and newer parts (starting from 1997) of the utility. +J\*org Schilling is the primary maintainer since 1999, this makes .B mkisofs -Copyright (C) 1999, 2000, 2001 J\*org Schilling. +Copyright (C) 1997-2014 J\*org Schilling. .PP -HFS hybrid code Copyright (C) James Pearson 1997, 1998, 1999, 2000, 2001 -.br -libhfs code Copyright (C) 1996, 1997 Robert Leslie -.br +HFS hybrid code Copyright (C) James Pearson 1997 .\|.\|. 2001. +.sp +libhfs code Copyright (C) 1996, 1997 Robert Leslie. +.sp libfile code Copyright (C) Ian F. Darwin 1986, 1987, 1989, 1990, 1991, 1992, 1994, 1995. .SH NOTES @@ -3050,6 +3455,16 @@ .B mkisofs to read the previous session when creating a multi session image. .PP +.B m\&kisofs +is not based on the standard mk*fs tools for unix, because we must generate +a complete copy of an existing filesystem on a disk in the ISO-9660 +filesystem. The name m\&kisofs is probably a bit of a misnomer, since it +not only creates the filesystem, but it also populates it as well. +However, the appropriate tool name for a UNIX tool that creates populated +filesystems - +.B mkproto +- is not well known. +.PP If .B mkisofs is creating a filesystem image with Rock Ridge attributes and the @@ -3059,7 +3474,11 @@ will do deep directory relocation. This results in a directory called .B RR_MOVED -in the root directory of the CD. You cannot avoid this directory. +in the root directory of the CD. You cannot avoid this directory in the +directory tree that is visible with ISO-9660 but it it automatically hidden +in the +.B Rock Ridge +tree. .PP The sparc boot support that is implemented with the .B \-sparc\-boot @@ -3074,18 +3493,6 @@ .SH BUGS .TP \(bu -Any files that have hard links to files not in the tree being copied to the -iso9660 filesystem will have an incorrect file reference count. -.TP -\(bu -Does not check for SUSP record(s) in "." entry of the -root directory to verify the existence of Rock Ridge -enhancements. -.sp -This problem is present when reading old sessions while -adding data in multi-session mode. -.TP -\(bu Does not properly read relocated directories in multi-session mode when adding data. .sp @@ -3098,10 +3505,6 @@ .TP \(bu Does not re-use RR_MOVED when doing multi-session from TRANS.TBL -.TP -\(bu -Does not create whole_name entry for RR_MOVED in multi-session -mode. .PP There may be some other ones. Please, report them to the author. @@ -3160,7 +3563,7 @@ Symbolic links (as with all other non-regular files) are not added to the HFS directory. .PP -Hybrid volumes may be larger than pure ISO9660 volumes +Hybrid volumes may be larger than pure ISO-9660 volumes containing the same data. In some cases (e.g. DVD sized volumes) the hybrid volume may be significantly larger. As an HFS volume gets bigger, so does the allocation block size (the smallest amount of space a file can occupy). @@ -3216,8 +3619,10 @@ .B \-generic\-boot options with the .B \-boot\-hfs\-file -or +the .B \-prep\-boot +or +.B \-chrp\-boot options. .PP .B mkisofs @@ -3227,6 +3632,7 @@ .SH "SEE ALSO .BR cdrecord (1), .BR mkzftree (1), +.BR sfind (1), .BR magic (5), .BR apple_driver (8). @@ -3235,7 +3641,7 @@ .SH AVAILABILITY .B m\&kisofs is available as part of the cdrecord package from -ftp://ftp.berlios.de/pub/cdrecord/ +https://sourceforge.net/projects/cdrtools/files/ .B hfsutils from ftp://ftp.mars.org/pub/hfs @@ -3244,22 +3650,11 @@ is available as part of the zisofs-tools package from ftp://ftp.kernel.org/pub/linux/utils/fs/zisofs/ .SH "MAILING LISTS -If you want to actively take part on the development of m\&kisofs, -and/or mkhybrid, -you may join the cdwriting mailing list by sending mail to: -.nf -.sp - other-cdwrite-request@lists.debian.org -.sp -.fi -and include the word -.I subscribe -in the body. -The mail address of the list is: -.nf +If you want to actively take part on the development of mkisofs, +you may join the developer mailing list via this URL: .sp - cdwrite@lists.debian.org -.fi +.B +https://lists.sourceforge.net/lists/listinfo/cdrtools-developers .SH MAINTAINER .nf @@ -3277,26 +3672,37 @@ If you have support questions, send them to: .PP .B -cdrecord-support@berlios.de -.br -or -.B -other-cdwrite@lists.debian.org +cdrtools-support@lists.sourceforge.net .PP -If you definitly found a bug, send a mail to: +If you definitely found a bug, send a mail to: .PP .B -cdrecord-developers@berlios.de +cdrtools-developers@lists.sourceforge.net .br or .B -schilling@fokus.fhg.de +joerg.schilling@fokus.fraunhofer.de .PP To subscribe, use: .PP .B -http://lists.berlios.de/mailman/listinfo/cdrecord-developers +https://lists.sourceforge.net/lists/listinfo/cdrtools-developers .br or .B -http://lists.berlios.de/mailman/listinfo/cdrecord-support +https://lists.sourceforge.net/lists/listinfo/cdrtools-support +.br +.ne 7 +.SH "INTERFACE STABILITY +The interfaces provided by +.B mkisofs +are designed for long term stability. +As +.B mkisofs +depends on interfaces provided by the underlying operating system, +the stability of the interfaces offered by +.B mkisofs +depends on the interface stability of the OS interfaces. +Modified interfaces in the OS may enforce modified interfaces +in +.BR mkisofs . diff -Nru cdrtools-2.01.01a33/mkisofs/mkisofs.c cdrtools-3.02a09/mkisofs/mkisofs.c --- cdrtools-2.01.01a33/mkisofs/mkisofs.c 2007-08-12 22:07:31.000000000 +0000 +++ cdrtools-3.02a09/mkisofs/mkisofs.c 2017-01-05 19:28:02.000000000 +0000 @@ -1,7 +1,8 @@ -/* @(#)mkisofs.c 1.228 07/08/13 joerg */ +/* @(#)mkisofs.c 1.289 17/01/05 joerg */ +#include #ifndef lint -static char sccsid[] = - "@(#)mkisofs.c 1.228 07/08/13 joerg"; +static UConst char sccsid[] = + "@(#)mkisofs.c 1.289 17/01/05 joerg"; #endif /* * Program mkisofs.c - generate iso9660 filesystem based upon directory @@ -10,7 +11,7 @@ * Written by Eric Youngdale (1993). * * Copyright 1993 Yggdrasil Computing, Incorporated - * Copyright (c) 1999,2000-2007 J. Schilling + * Copyright (c) 1997-2017 J. Schilling * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -31,18 +32,19 @@ /* MAC UDF images by HELIOS Software GmbH support@helios.de */ /* HFS+ by HELIOS Software GmbH support@helios.de */ -#include +/* DUPLICATES_ONCE Alex Kopylov cdrtools@bootcd.ru 19.06.2004 */ + #ifdef USE_FIND -#include "walk.h" -#include "find.h" +#include +#include #endif #include "mkisofs.h" +#include "rock.h" #include #include #include -#include +#include #include "match.h" -#include "exclude.h" #include #include #include @@ -50,10 +52,7 @@ #include "udf.h" #endif -#ifdef NEED_O_BINARY -#include /* for setmode() prototype */ -#endif - +#include /* for setmode() prototype */ #include #ifdef VMS @@ -61,9 +60,7 @@ #endif #ifdef no_more_needed -#ifdef __NetBSD__ -#include -#endif +#include #endif /* no_more_needed */ #include "../cdrecord/version.h" @@ -93,6 +90,9 @@ char *extension_record = NULL; UInt32_t extension_record_extent = 0; int extension_record_size = 0; +BOOL archive_isreg; +dev_t archive_dev; +ino_t archive_ino; /* These variables are associated with command line options */ int check_oldnames = 0; @@ -128,17 +128,17 @@ int verbose = 1; int debug = 0; int gui = 0; +BOOL legacy = FALSE; /* Implement legacy support for historic CLI */ int all_files = 1; /* New default is to include all files */ BOOL Hflag = FALSE; /* Follow links on cmdline (-H) */ BOOL follow_links = FALSE; /* Follow all links (-L) */ -#ifdef IS_CYGWIN +#if defined(__MINGW32__) || defined(_MSC_VER) /* - * Do not cache inodes on Cygwin by default - * See below in main(), cache for 64bit ino_t + * Never cache inodes on DOS or Win-DOS. */ int cache_inodes = 0; #else -int cache_inodes = 1; /* Cache inodes if OS has unique inodes */ +int cache_inodes = -1; /* Cache inodes if OS has unique inodes */ #endif int rationalize = 0; /* Need to call stat_fix() */ int rationalize_uid = 0; @@ -149,7 +149,7 @@ gid_t gid_to_use = 0; /* when rationalizing gid */ int filemode_to_use = 0; /* if non-zero, when rationalizing file mode */ int dirmode_to_use = 0; /* if non-zero, when rationalizing dir mode */ -int new_dir_mode = 0555; +int new_dir_mode = 0555; /* neither -new-dir-mode nor -dir-mode used */ int generate_tables = 0; int dopad = 1; /* Now default to do padding */ int print_size = 0; @@ -186,7 +186,7 @@ char *jcharset; /* CLI Parameter for -jcharset option */ int max_filenames; /* CLI Parameter for -max-iso9660-filenames option */ char *log_file; /* CLI Parameter for -log-file option */ -char *dir_mode_str; /* CLI Parameter for -new-dir-mode option */ +char *new_dirmode_str; /* CLI Parameter for -new-dir-mode option */ char *pathnames; /* CLI Parameter for -help option */ int rationalize_rr; /* CLI Parameter for -path-list option */ char *sectype; /* CLI Parameter for -s option */ @@ -194,6 +194,7 @@ int untranslated_filenames; /* CLI Parameter for -U option */ int pversion; /* CLI Parameter for -version option */ int rationalize_xa; /* CLI Parameter for -xa option */ +ldate modification_date; /* CLI Parameter for -modification-date */ #ifdef APPLE_HYB char *afpfile = ""; /* CLI Parameter for -map option */ char *root_info; /* CLI Parameter for -root-info option */ @@ -217,11 +218,17 @@ LOCAL int walkflags = 0; #endif +extern time_t begun; +extern struct timeval tv_begun; + +LOCAL BOOL data_change_warn; + struct eltorito_boot_entry_info *first_boot_entry = NULL; struct eltorito_boot_entry_info *last_boot_entry = NULL; struct eltorito_boot_entry_info *current_boot_entry = NULL; int use_graft_ptrs; /* Use graft points */ +int match_igncase; /* Ignore case with -exclude-list and -hide* */ int jhide_trans_tbl; /* Hide TRANS.TBL from Joliet tree */ int hide_rr_moved; /* Name RR_MOVED .rr_moved in Rock Ridge tree */ int omit_period = 0; /* Violates iso9660, but these are a pain */ @@ -238,6 +245,7 @@ int nolimitpathtables = 0; /* Don't limit size of pathtable. Violates iso9660 */ int relaxed_filenames = 0; /* For Amiga. Disc will not work with DOS */ int allow_lowercase = 0; /* Allow lower case letters */ +int no_allow_lowercase = 0; /* Do not allow lower case letters */ int allow_multidot = 0; /* Allow more than on dot in filename */ int iso_translate = 1; /* 1 == enables '#', '-' and '~' removal */ int allow_leading_dots = 0; /* DOS cannot read names with leading dots */ @@ -286,6 +294,8 @@ int use_prep_boot = 0; int use_chrp_boot = 0; #endif /* PREP_BOOT */ +#else /* APPLE_HYB */ +int donotwrite_macpart = 1; /* Do not write "hfs" hybrid with UDF */ #endif /* APPLE_HYB */ #ifdef UDF @@ -294,8 +304,11 @@ int create_udfsymlinks = 1; /* include symlinks in UDF */ #endif -#ifdef DVD_VIDEO +#ifdef DVD_AUD_VID +int dvd_audio = 0; +int dvd_hybrid = 0; int dvd_video = 0; +int dvd_aud_vid_flag = DVD_SPEC_NONE; #endif #ifdef SORTING @@ -310,6 +323,11 @@ UInt32_t null_inodes = NULL_INO_MAX; BOOL correct_inodes = TRUE; /* TRUE: add a "correct inodes" fingerprint */ BOOL rrip112 = TRUE; /* TRUE: create Rock Ridge V 1.12 */ +BOOL long_rr_time = FALSE; /* TRUE: use long (17 Byte) time format */ + +#ifdef DUPLICATES_ONCE +int duplicates_once = 0; /* encode duplicate files once */ +#endif siconvt_t *in_nls = NULL; /* input UNICODE conversion table */ siconvt_t *out_nls = NULL; /* output UNICODE conversion table */ @@ -348,15 +366,17 @@ LOCAL int getH __PR((const char *arg, void *valp, int *pac, char *const **pav, const char *opt)); LOCAL int getL __PR((const char *arg, void *valp, int *pac, char *const **pav, const char *opt)); LOCAL int getP __PR((const char *arg, void *valp, int *pac, char *const **pav, const char *opt)); +LOCAL int dolegacy __PR((const char *arg, void *valp, int *pac, char *const **pav, const char *opt)); -#ifdef APPLE_HYB LOCAL int get_boot_image __PR((char *opt_arg)); LOCAL int get_hd_boot __PR((char *opt_arg)); LOCAL int get_ne_boot __PR((char *opt_arg)); LOCAL int get_no_boot __PR((char *opt_arg)); LOCAL int get_boot_addr __PR((char *opt_arg)); LOCAL int get_boot_size __PR((char *opt_arg)); +LOCAL int get_boot_platid __PR((char *opt_arg)); LOCAL int get_boot_table __PR((char *opt_arg)); +#ifdef APPLE_HYB #ifdef PREP_BOOT LOCAL int get_prep_boot __PR((char *opt_arg)); LOCAL int get_chrp_boot __PR((char *opt_arg)); @@ -376,7 +396,13 @@ LOCAL int hfs_xdbl __PR((void)); LOCAL int hfs_xhfs __PR((void)); LOCAL int hfs_nohfs __PR((void)); +#endif /* APPLE_HYB */ +LOCAL void ldate_error __PR((char *arg)); +LOCAL char *strntoi __PR((char *p, int n, int *ip)); +LOCAL int mosize __PR((int y, int m)); +LOCAL char *parse_date __PR((char *arg, struct tm *tp)); +LOCAL int get_ldate __PR((char *opt_arg, void *valp)); LOCAL int get_boot_image(opt_arg) @@ -388,7 +414,7 @@ /* on disk */ if (boot_image == NULL || *boot_image == '\0') { comerrno(EX_BAD, - "Required Eltorito boot image pathname missing\n"); + _("Required Eltorito boot image pathname missing\n")); } get_boot_entry(); current_boot_entry->boot_image = boot_image; @@ -438,7 +464,7 @@ use_eltorito++; val = strtol(opt_arg, &ptr, 0); if (*ptr || val < 0 || val >= 0x10000) { - comerrno(EX_BAD, "Boot image load address invalid.\n"); + comerrno(EX_BAD, _("Boot image load address invalid.\n")); } load_addr = val; get_boot_entry(); @@ -457,7 +483,7 @@ val = strtol(opt_arg, &ptr, 0); if (*ptr || val < 0 || val >= 0x10000) { comerrno(EX_BAD, - "Boot image load size invalid.\n"); + _("Boot image load size invalid.\n")); } load_size = val; get_boot_entry(); @@ -466,6 +492,45 @@ } LOCAL int +get_boot_platid(opt_arg) + char *opt_arg; +{ + long val; + char *ptr; + + use_eltorito++; + if (streql(opt_arg, "x86")) { + val = EL_TORITO_ARCH_x86; + } else if (streql(opt_arg, "PPC")) { + val = EL_TORITO_ARCH_PPC; + } else if (streql(opt_arg, "Mac")) { + val = EL_TORITO_ARCH_MAC; + } else if (streql(opt_arg, "efi")) { + val = EL_TORITO_ARCH_EFI; + } else { + val = strtol(opt_arg, &ptr, 0); + if (*ptr || val < 0 || val >= 0x100) { + comerrno(EX_BAD, _("Bad boot system ID.\n")); + } + } + + /* + * If there is already a boot entry and the boot file name has been set + * for this boot entry and the new platform id differs from the + * previous value, we start a new boot section. + */ + if (current_boot_entry && + current_boot_entry->boot_image != NULL && + current_boot_entry->boot_platform != val) { + new_boot_entry(); + } + get_boot_entry(); + current_boot_entry->type |= ELTORITO_BOOT_ID; + current_boot_entry->boot_platform = val; + return (1); +} + +LOCAL int get_boot_table(opt_arg) char *opt_arg; { @@ -476,6 +541,7 @@ return (1); } +#ifdef APPLE_HYB #ifdef PREP_BOOT LOCAL int get_prep_boot(opt_arg) @@ -484,13 +550,13 @@ use_prep_boot++; if (use_prep_boot > 4 - use_chrp_boot) { comerrno(EX_BAD, - "Maximum of 4 PRep+CHRP partition entries are allowed\n"); + _("Maximum of 4 PRep+CHRP partition entries are allowed\n")); } /* pathname of the boot image on cd */ prep_boot_image[use_prep_boot - 1] = opt_arg; if (prep_boot_image[use_prep_boot - 1] == NULL) { comerrno(EX_BAD, - "Required PReP boot image pathname missing\n"); + _("Required PReP boot image pathname missing\n")); } return (1); } @@ -504,7 +570,7 @@ use_chrp_boot = 1; if (use_prep_boot > 3) { comerrno(EX_BAD, - "Maximum of 4 PRep+CHRP partition entries are allowed\n"); + _("Maximum of 4 PRep+CHRP partition entries are allowed\n")); } return (1); } @@ -607,7 +673,7 @@ hfs_select |= DO_XHFS; #else errmsgno(EX_BAD, - "Warning: --osx-hfs only works on MacOS X ... ignoring\n"); + _("Warning: --osx-hfs only works on MacOS X ... ignoring\n")); #endif return (1); } @@ -621,6 +687,211 @@ #endif /* APPLE_HYB */ +LOCAL void +ldate_error(arg) + char *arg; +{ + comerrno(EX_BAD, _("Ilegal date specification '%s'.\n"), arg); +} + +LOCAL char * +strntoi(p, n, ip) + char *p; + int n; + int *ip; +{ + int i = 0; + int digits = 0; + int c; + + while (*p) { + if (digits >= n) + break; + c = *p; + if (c < '0' || c > '9') + break; + p++; + digits++; + i *= 10; + i += c - '0'; + } + *ip = i; + + return (p); +} + +#define dysize(A) (((A)%4)? 365 : (((A)%100) == 0 && ((A)%400)) ? 365 : 366) + +static int dmsize[12] = {31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31}; + +LOCAL int +mosize(y, m) + int y; + int m; +{ + + if (m == 1 && dysize(y) == 366) + return (29); + return (dmsize[m]); +} + +LOCAL char * +parse_date(arg, tp) + char *arg; + struct tm *tp; +{ + char *oarg = arg; + char *p; + + tp->tm_mon = tp->tm_hour = tp->tm_min = tp->tm_sec = 0; + tp->tm_mday = 1; + tp->tm_isdst = -1; + + p = strchr(arg, '/'); + if (p == NULL) + p = strchr(arg, '-'); + if (p) { + if ((p - arg) != 2 && (p - arg) != 4) + ldate_error(oarg); + p = strntoi(arg, 4, &tp->tm_year); + if ((p - arg) != 2 && (p - arg) != 4) + ldate_error(oarg); + if ((p - arg) == 2) { + if (tp->tm_year < 69) + tp->tm_year += 100; + } else { + tp->tm_year -= 1900; + } + if (*p == '/' || *p == '-') + p++; + } else if (strlen(arg) < 4) { + ldate_error(oarg); + } else { + p = strntoi(arg, 4, &tp->tm_year); + if ((p - arg) != 4) + ldate_error(oarg); + tp->tm_year -= 1900; + } + if (*p == '\0' || strchr(".+-", *p)) + return (p); + arg = p; + p = strntoi(arg, 2, &tp->tm_mon); + if ((p - arg) != 2) + ldate_error(oarg); + tp->tm_mon -= 1; + if (tp->tm_mon < 0 || tp->tm_mon >= 12) + ldate_error(oarg); + if (*p == '/' || *p == '-') + p++; + if (*p == '\0' || strchr(".+-", *p)) + return (p); + arg = p; + p = strntoi(arg, 2, &tp->tm_mday); + if ((p - arg) != 2) + ldate_error(oarg); + if (tp->tm_mday < 1 || tp->tm_mday > mosize(tp->tm_year+1900, tp->tm_mon)) + ldate_error(oarg); + if (*p == ' ') + p++; + if (*p == '\0' || strchr(".+-", *p)) + return (p); + arg = p; + p = strntoi(arg, 2, &tp->tm_hour); + if ((p - arg) != 2) + ldate_error(oarg); + if (tp->tm_hour > 23) + ldate_error(oarg); + if (*p == ':') + p++; + if (*p == '\0' || strchr(".+-", *p)) + return (p); + arg = p; + p = strntoi(arg, 2, &tp->tm_min); + if ((p - arg) != 2) + ldate_error(oarg); + if (tp->tm_min > 59) + ldate_error(oarg); + if (*p == ':') + p++; + if (*p == '\0' || strchr(".+-", *p)) + return (p); + arg = p; + p = strntoi(arg, 2, &tp->tm_sec); + if ((p - arg) != 2) + ldate_error(oarg); + if (tp->tm_sec > 61) + ldate_error(oarg); + return (p); +} + +/* + * Parse a date spec similar to: + * YYYY[MM[DD[HH[MM[SS]]]]][.hh][+-GHGM] + */ +LOCAL int +get_ldate(opt_arg, valp) + char *opt_arg; + void *valp; +{ + time_t t; + int usec = 0; + int gmtoff = -100; + struct tm tm; + char *p; + char *arg; + + p = parse_date(opt_arg, &tm); + if (*p == '.') { + p++; + arg = p; + p = strntoi(arg, 2, &usec); + if ((p - arg) != 2) + ldate_error(opt_arg); + if (usec > 99) + ldate_error(opt_arg); + usec *= 10000; + } + if (*p == ' ') + p++; + if (*p == '+' || *p == '-') { + int i; + char *s = p++; + + arg = p; + p = strntoi(arg, 2, &gmtoff); + if ((p - arg) != 2) + ldate_error(opt_arg); + arg = p; + p = strntoi(arg, 2, &i); + if ((p - arg) != 2) + ldate_error(opt_arg); + if (i > 59) + ldate_error(opt_arg); + gmtoff *= 60; + gmtoff += i; + if (gmtoff % 15) + ldate_error(opt_arg); + if (*s == '-') + gmtoff *= -1; + gmtoff /= 15; + if (gmtoff < -48 || gmtoff > 52) + ldate_error(opt_arg); + } + if (*p != '\0') + ldate_error(opt_arg); + + seterrno(0); + t = mktime(&tm); + if (t == -1 && geterrno() != 0) + comerr(_("Date '%s' is out of range.\n"), opt_arg); + + ((ldate *)valp)->l_sec = t; + ((ldate *)valp)->l_usec = usec; + ((ldate *)valp)->l_gmtoff = gmtoff; + + return (1); +} + #ifdef USE_FIND /* ARGSUSED */ LOCAL int @@ -640,7 +911,7 @@ /* ARGSUSED */ LOCAL int -getH(arg, valp, pac, pav, opt) /* Follow symlinks encounterd on cmdline */ +getH(arg, valp, pac, pav, opt) /* Follow symlinks encountered on cmdline */ const char *arg; void *valp; int *pac; @@ -648,6 +919,18 @@ const char *opt; { /*error("getH\n");*/ + if (opt[0] == '-' && opt[1] == 'H' && opt[2] == '\0') { +#ifdef APPLE_HYB + if (legacy) { + errmsgno(EX_BAD, _("The option '-H' is deprecated since 2002.\n")); + errmsgno(EX_BAD, _("The option '-H' was disabled in 2006.\n")); + errmsgno(EX_BAD, _("Use '-map' instead of '-H' as documented instead of using the legacy mode.\n")); + afpfile = (char *)arg; + return (1); + } +#endif + return (BADFLAG); /* POSIX -H is not yet active */ + } follow_links = FALSE; Hflag = TRUE; #ifdef USE_FIND @@ -666,6 +949,17 @@ const char *opt; { /*error("getL\n");*/ + if (opt[0] == '-' && opt[1] == 'L' && opt[2] == '\0') { + if (legacy) { + errmsgno(EX_BAD, _("The option '-L' is deprecated since 2002.\n")); + errmsgno(EX_BAD, _("The option '-L' was disabled in 2006.\n")); + errmsgno(EX_BAD, + _("Use '-allow-leading-dots' instead of '-L' as documented instead of using the legacy mode.\n")); + allow_leading_dots = TRUE; + return (1); + } + return (BADFLAG); /* POSIX -L is not yet active */ + } follow_links = TRUE; Hflag = FALSE; #ifdef USE_FIND @@ -684,6 +978,16 @@ const char *opt; { /*error("getP\n");*/ + if (opt[0] == '-' && opt[1] == 'P' && opt[2] == '\0') { + if (legacy) { + errmsgno(EX_BAD, _("The option '-P' is deprecated since 2002.\n")); + errmsgno(EX_BAD, _("The option '-P' was disabled in 2006.\n")); + errmsgno(EX_BAD, _("Use '-publisher' instead of '-P' as documented instead of using the legacy mode.\n")); + publisher = (char *)arg; + return (1); + } + return (BADFLAG); /* POSIX -P is not yet active */ + } follow_links = FALSE; Hflag = FALSE; #ifdef USE_FIND @@ -692,6 +996,27 @@ return (1); } +LOCAL struct ga_flags *gl_flags; +/* ARGSUSED */ +LOCAL int +dolegacy(arg, valp, pac, pav, opt) /* Follow symlinks encountered on cmdline */ + const char *arg; + void *valp; + int *pac; + char *const **pav; + const char *opt; +{ + legacy = TRUE; +#ifdef APPLE_HYB + gl_flags[2].ga_format = "H&"; /* Apple Hybrid "-map" */ +#endif +#ifdef OPT_L_HAS_ARG /* never ;-) */ + gl_flags[4].ga_format = "L&"; /* -allow-leading-dots */ +#endif + gl_flags[6].ga_format = "P&"; /* -publisher */ + return (1); +} + struct mki_option { /* * The long option information. @@ -714,352 +1039,429 @@ const char *doc; }; + LOCAL int save_pname = 0; LOCAL const struct mki_option mki_options[] = { #ifdef USE_FIND {{"find~", NULL, (getpargfun)getfind }, - "\1file... [find expr.]\1Option separator: Use find command line to the right"}, + __("\1file... [find expr.]\1Option separator: Use find command line to the right")}, #endif + /* + * The options -H/-L/-P did have different meaning in old releases of + * mkisofs. In October 2002, mkisofs introduced a warning that the + * short options -H/-L/-P should not be used with the old meaning + * anymore. The long options should be used instead. The options + * -H/-L/-P previously have been associated with the following long + * options: + * + * -H -map 2000..2002 + * -L -allow-leading-dots 1995..2002 + * -P -publisher 1993..2002 + * + * Since December 2006, the short options -H/-L/-P have been disabled + * for their old meaning. + * + * Warning: for the -legacy mode, the entries for -H/-L/-P need to stay + * at their current index in mki_options[] or dolegacy() needs to be + * changed to fit the modification. + */ {{"posix-H~", &walkflags, getH }, - "Follow symbolic links encountered on command line"}, -/* {{"H~", &walkflags, getH },*/ -/* NULL},*/ + __("Follow symbolic links encountered on command line")}, + {{"H~", &walkflags, getH }, +#ifdef LATER + NULL}, +#else + __("\2")}, +#endif {{"posix-L~", &walkflags, getL }, - "Follow all symbolic links"}, -/* {{"L~", &walkflags, getL },*/ -/* NULL},*/ + __("Follow all symbolic links")}, + {{"L~", &walkflags, getL }, +#ifdef LATER + NULL}, +#else + __("\2")}, +#endif {{"posix-P~", &walkflags, getP }, - "Do not follow symbolic links (default)"}, -/* {{"P~", &walkflags, getP },*/ -/* NULL},*/ + __("Do not follow symbolic links (default)")}, + {{"P~", &walkflags, getP }, +#ifdef LATER + NULL}, +#else + __("\2")}, +#endif {{"abstract*", &abstract }, - "\1FILE\1Set Abstract filename"}, + __("\1FILE\1Set Abstract filename")}, {{"A*,appid*", &appid }, - "\1ID\1Set Application ID"}, + __("\1ID\1Set Application ID")}, {{"biblio*", &biblio }, - "\1FILE\1Set Bibliographic filename"}, + __("\1FILE\1Set Bibliographic filename")}, + /* + * If this includes UWIN, we need to modify the condition. + */ +#if !defined(__MINGW32__) && !defined(_MSC_VER) {{"cache-inodes", &cache_inodes }, - "Cache inodes (needed to detect hard links)"}, + __("Cache inodes (needed to detect hard links)")}, +#endif {{"no-cache-inodes%0", &cache_inodes }, - "Do not cache inodes (if filesystem has no unique unides)"}, + __("Do not cache inodes (if filesystem has no unique inodes)")}, {{"rrip110%0", &rrip112 }, - "Create old Rock Ridge V 1.10"}, + __("Create old Rock Ridge V 1.10")}, {{"rrip112", &rrip112 }, - "Create new Rock Ridge V 1.12 (default)"}, + __("Create new Rock Ridge V 1.12 (default)")}, +#ifdef DUPLICATES_ONCE + {{"duplicates-once", &duplicates_once}, + __("Optimize storage by encoding duplicate files once")}, +#endif {{"check-oldnames", &check_oldnames }, - "Check all imported ISO9660 names from old session"}, + __("Check all imported ISO9660 names from old session")}, {{"check-session*", &check_image }, - "\1FILE\1Check all ISO9660 names from previous session"}, + __("\1FILE\1Check all ISO9660 names from previous session")}, {{"copyright*", ©right }, - "\1FILE\1Set Copyright filename"}, + __("\1FILE\1Set Copyright filename")}, {{"debug+", &debug }, - "Set debug flag"}, + __("Set debug flag")}, + {{"ignore-error", &ignerr }, + __("Ignore errors")}, {{"b& ,eltorito-boot&", NULL, (getpargfun)get_boot_image }, - "\1FILE\1Set El Torito boot image name"}, + __("\1FILE\1Set El Torito boot image name")}, {{"eltorito-alt-boot~", NULL, (getpargfun)new_boot_entry }, - "Start specifying alternative El Torito boot parameters"}, + __("Start specifying alternative El Torito boot parameters")}, + {{"eltorito-platform&", NULL, (getpargfun)get_boot_platid }, + __("\1ID\1Set El Torito platform id for the next boot entry")}, {{"B&,sparc-boot&", NULL, (getpargfun)scan_sparc_boot }, - "\1FILES\1Set sparc boot image names"}, + __("\1FILES\1Set sparc boot image names")}, {{"sunx86-boot&", NULL, (getpargfun)scan_sunx86_boot }, - "\1FILES\1Set sunx86 boot image names"}, + __("\1FILES\1Set sunx86 boot image names")}, {{"G*,generic-boot*", &genboot_image }, - "\1FILE\1Set generic boot image name"}, + __("\1FILE\1Set generic boot image name")}, {{"sparc-label&", NULL, (getpargfun)sparc_boot_label }, - "\1label text\1Set sparc boot disk label"}, + __("\1label text\1Set sparc boot disk label")}, {{"sunx86-label&", NULL, (getpargfun)sunx86_boot_label }, - "\1label text\1Set sunx86 boot disk label"}, + __("\1label text\1Set sunx86 boot disk label")}, {{"c* ,eltorito-catalog*", &boot_catalog }, - "\1FILE\1Set El Torito boot catalog name"}, + __("\1FILE\1Set El Torito boot catalog name")}, {{"C*,cdrecord-params*", &cdrecord_data }, - "\1PARAMS\1Magic paramters from cdrecord"}, + __("\1PARAMS\1Magic paramters from cdrecord")}, {{"d,omit-period", &omit_period }, - "Omit trailing periods from filenames (violates ISO9660)"}, + __("Omit trailing periods from filenames (violates ISO9660)")}, + {{"data-change-warn", &data_change_warn }, + __("Treat data/size changes as warning only")}, {{"dir-mode*", &dirmode_str }, - "\1mode\1Make the mode of all directories this mode."}, + __("\1mode\1Make the mode of all directories this mode.")}, {{"D,disable-deep-relocation", &disable_deep_reloc }, - "Disable deep directory relocation (violates ISO9660)"}, + __("Disable deep directory relocation (violates ISO9660)")}, {{"file-mode*", &filemode_str }, - "\1mode\1Make the mode of all plain files this mode."}, + __("\1mode\1Make the mode of all plain files this mode.")}, {{"errctl&", NULL, (getpargfun)errconfig }, - "\1name\1Read error control defs from file or inline."}, + __("\1name\1Read error control defs from file or inline.")}, {{"f,follow-links", &follow_links }, - "Follow symbolic links"}, + __("Follow symbolic links")}, {{"gid*", &gid_str }, - "\1gid\1Make the group owner of all files this gid."}, + __("\1gid\1Make the group owner of all files this gid.")}, {{"graft-points", &use_graft_ptrs }, - "Allow to use graft points for filenames"}, + __("Allow to use graft points for filenames")}, {{"root*", &reloc_root }, - "\1DIR\1Set root directory for all new files and directories"}, + __("\1DIR\1Set root directory for all new files and directories")}, {{"old-root*", &reloc_old_root }, - "\1DIR\1Set root directory in previous session that is searched for files"}, + __("\1DIR\1Set root directory in previous session that is searched for files")}, {{"help", &help }, - "Print option help"}, + __("Print option help")}, {{"hide& ", NULL, (getpargfun)i_add_match }, - "\1GLOBFILE\1Hide ISO9660/RR file"}, + __("\1GLOBFILE\1Hide ISO9660/RR file")}, {{"hide-list&", NULL, (getpargfun)i_add_list }, - "\1FILE\1File with list of ISO9660/RR files to hide"}, + __("\1FILE\1File with list of ISO9660/RR files to hide")}, {{"hidden& ", NULL, (getpargfun)h_add_match }, - "\1GLOBFILE\1Set hidden attribute on ISO9660 file"}, + __("\1GLOBFILE\1Set hidden attribute on ISO9660 file")}, {{"hidden-list&", NULL, (getpargfun)h_add_list }, - "\1FILE\1File with list of ISO9660 files with hidden attribute"}, + __("\1FILE\1File with list of ISO9660 files with hidden attribute")}, {{"hide-joliet& ", NULL, (getpargfun)j_add_match }, - "\1GLOBFILE\1Hide Joliet file"}, + __("\1GLOBFILE\1Hide Joliet file")}, {{"hide-joliet-list&", NULL, (getpargfun)j_add_list }, - "\1FILE\1File with list of Joliet files to hide"}, + __("\1FILE\1File with list of Joliet files to hide")}, #ifdef UDF {{"hide-udf& ", NULL, (getpargfun)u_add_match }, - "\1GLOBFILE\1Hide UDF file"}, + __("\1GLOBFILE\1Hide UDF file")}, {{"hide-udf-list&", NULL, (getpargfun)u_add_list }, - "\1FILE\1File with list of UDF files to hide"}, + __("\1FILE\1File with list of UDF files to hide")}, #endif {{"hide-joliet-trans-tbl", &jhide_trans_tbl}, - "Hide TRANS.TBL from Joliet tree"}, + __("Hide TRANS.TBL from Joliet tree")}, {{"hide-rr-moved", &hide_rr_moved }, - "Rename RR_MOVED to .rr_moved in Rock Ridge tree"}, + __("Rename RR_MOVED to .rr_moved in Rock Ridge tree")}, {{"gui", &gui}, - "Switch behaviour for GUI"}, + __("Switch behaviour for GUI")}, {{"input-charset*", &icharset }, - "\1CHARSET\1Local input charset for file name conversion"}, + __("\1CHARSET\1Local input charset for file name conversion")}, {{"output-charset*", &ocharset }, - "\1CHARSET\1Output charset for file name conversion"}, + __("\1CHARSET\1Output charset for file name conversion")}, {{"iso-level#", &iso9660_level }, - "\1LEVEL\1Set ISO9660 conformance level (1..3) or 4 for ISO9660 version 2"}, + __("\1LEVEL\1Set ISO9660 conformance level (1..3) or 4 for ISO9660 version 2")}, {{"J,joliet", &use_Joliet }, - "Generate Joliet directory information"}, + __("Generate Joliet directory information")}, {{"joliet-long", &joliet_long }, - "Allow Joliet file names to be 103 Unicode characters"}, + __("Allow Joliet file names to be 103 Unicode characters")}, {{"jcharset*", &jcharset }, - "\1CHARSET\1Local charset for Joliet directory information"}, + __("\1CHARSET\1Local charset for Joliet directory information")}, {{"l,full-iso9660-filenames", &full_iso9660_filenames }, - "Allow full 31 character filenames for ISO9660 names"}, + __("Allow full 31 character filenames for ISO9660 names")}, {{"max-iso9660-filenames", &max_filenames }, - "Allow 37 character filenames for ISO9660 names (violates ISO9660)"}, + __("Allow 37 character filenames for ISO9660 names (violates ISO9660)")}, {{"allow-leading-dots", &allow_leading_dots }, - "Allow ISO9660 filenames to start with '.' (violates ISO9660)"}, + __("Allow ISO9660 filenames to start with '.' (violates ISO9660)")}, {{"ldots", &allow_leading_dots }, - "Allow ISO9660 filenames to start with '.' (violates ISO9660)"}, + __("Allow ISO9660 filenames to start with '.' (violates ISO9660)")}, {{"log-file*", &log_file }, - "\1LOG_FILE\1Re-direct messages to LOG_FILE"}, + __("\1LOG_FILE\1Re-direct messages to LOG_FILE")}, + {{"long-rr-time%1", &long_rr_time }, + __("Use long Rock Ridge time format")}, {{"m& ,exclude& ", NULL, (getpargfun)add_match }, - "\1GLOBFILE\1Exclude file name"}, + __("\1GLOBFILE\1Exclude file name")}, {{"exclude-list&", NULL, (getpargfun)add_list}, - "\1FILE\1File with list of file names to exclude"}, + __("\1FILE\1File with list of file names to exclude")}, + + {{"hide-ignorecase", &match_igncase }, + __("Ignore case with -exclude-list and -hide* options")}, + {{"exclude-ignorecase", &match_igncase }, + NULL}, + + {{"modification-date&", &modification_date, (getpargfun)get_ldate }, + __("\1DATE\1Set the modification date field of the PVD")}, + {{"nobak%0", &all_files }, + __("Do not include backup files")}, + {{"no-bak%0", &all_files}, + __("Do not include backup files")}, {{"pad", &dopad }, - "Pad output to a multiple of 32k (default)"}, + __("Pad output to a multiple of 32k (default)")}, {{"no-pad%0", &dopad }, - "Do not pad output to a multiple of 32k"}, + __("Do not pad output to a multiple of 32k")}, {{"no-limit-pathtables", &nolimitpathtables }, - "Allow more than 65535 parent directories (violates ISO9660)"}, + __("Allow more than 65535 parent directories (violates ISO9660)")}, + {{"no-long-rr-time%0", &long_rr_time }, + __("Use short Rock Ridge time format")}, {{"M*,prev-session*", &merge_image }, - "\1FILE\1Set path to previous session to merge"}, + __("\1FILE\1Set path to previous session to merge")}, {{"dev*", &merge_image }, - "\1SCSIdev\1Set path to previous session to merge"}, + __("\1SCSIdev\1Set path to previous session to merge")}, {{"N,omit-version-number", &omit_version_number }, - "Omit version number from ISO9660 filename (violates ISO9660)"}, - {{"new-dir-mode*", &dir_mode_str }, - "\1mode\1Mode used when creating new directories."}, + __("Omit version number from ISO9660 filename (violates ISO9660)")}, + {{"new-dir-mode*", &new_dirmode_str }, + __("\1mode\1Mode used when creating new directories.")}, {{"force-rr", &force_rr }, - "Inhibit automatic Rock Ridge detection for previous session"}, + __("Inhibit automatic Rock Ridge detection for previous session")}, {{"no-rr", &no_rr }, - "Inhibit reading of Rock Ridge attributes from previous session"}, + __("Inhibit reading of Rock Ridge attributes from previous session")}, {{"no-split-symlink-components%0", &split_SL_component }, - "Inhibit splitting symlink components"}, + __("Inhibit splitting symlink components")}, {{"no-split-symlink-fields%0", &split_SL_field }, - "Inhibit splitting symlink fields"}, + __("Inhibit splitting symlink fields")}, {{"o* ,output* ", &outfile }, - "\1FILE\1Set output file name"}, + __("\1FILE\1Set output file name")}, {{"path-list*", &pathnames }, - "\1FILE\1File with list of pathnames to process"}, + __("\1FILE\1File with list of pathnames to process")}, {{"p* ,preparer*", &preparer }, - "\1PREP\1Set Volume preparer"}, + __("\1PREP\1Set Volume preparer")}, {{"print-size", &print_size }, - "Print estimated filesystem size and exit"}, + __("Print estimated filesystem size and exit")}, {{"publisher*", &publisher }, - "\1PUB\1Set Volume publisher"}, + __("\1PUB\1Set Volume publisher")}, {{"quiet%0", &verbose }, - "Run quietly"}, + __("Run quietly")}, {{"r,rational-rock", &rationalize_rr }, - "Generate rationalized Rock Ridge directory information"}, + __("Generate rationalized Rock Ridge directory information")}, {{"R,rock", &use_RockRidge }, - "Generate Rock Ridge directory information"}, + __("Generate Rock Ridge directory information")}, {{"s* ,sectype*", §ype }, - "\1TYPE\1Set output sector type to e.g. data/xa1/raw"}, + __("\1TYPE\1Set output sector type to e.g. data/xa1/raw")}, + {{"short-rr-time%0", &long_rr_time }, + __("Use short Rock Ridge time format")}, #ifdef SORTING - { {"sort&", NULL, (getpargfun)add_sort_list }, - "\1FILE\1Sort file content locations according to rules in FILE"}, + { {"sort&", NULL, add_sort_list }, + __("\1FILE\1Sort file content locations according to rules in FILE")}, + { {"isort&", NULL, add_sort_list }, + __("\1FILE\1Sort file content locations according to rules in FILE (ignore case)")}, #endif /* SORTING */ {{"split-output", &split_output }, - "Split output into files of approx. 1GB size"}, + __("Split output into files of approx. 1GB size")}, {{"stream-file-name*", &stream_filename }, - "\1FILE_NAME\1Set the stream file ISO9660 name (incl. version)"}, + __("\1FILE_NAME\1Set the stream file ISO9660 name (incl. version)")}, {{"stream-media-size#", &stream_media_size }, - "\1#\1Set the size of your CD media in sectors"}, + __("\1#\1Set the size of your CD media in sectors")}, {{"sysid*", &system_id }, - "\1ID\1Set System ID"}, + __("\1ID\1Set System ID")}, {{"T,translation-table", &generate_tables }, - "Generate translation tables for systems that don't understand long filenames"}, + __("Generate translation tables for systems that don't understand long filenames")}, {{"table-name*", &trans_tbl }, - "\1TABLE_NAME\1Translation table file name"}, + __("\1TABLE_NAME\1Translation table file name")}, {{"ucs-level#", &ucs_level }, - "\1LEVEL\1Set Joliet UCS level (1..3)"}, + __("\1LEVEL\1Set Joliet UCS level (1..3)")}, #ifdef UDF {{"udf", &rationalize_udf }, - "Generate rationalized UDF file system"}, + __("Generate rationalized UDF file system")}, {{"UDF", &use_udf }, - "Generate UDF file system"}, + __("Generate UDF file system")}, {{"udf-symlinks", &create_udfsymlinks }, - "Create symbolic links on UDF image (default)"}, + __("Create symbolic links on UDF image (default)")}, {{"no-udf-symlinks%0", &create_udfsymlinks }, - "Do not reate symbolic links on UDF image"}, + __("Do not reate symbolic links on UDF image")}, #endif -#ifdef DVD_VIDEO +#ifdef DVD_AUD_VID + {{"dvd-audio", &dvd_audio }, + "Generate DVD-Audio compliant UDF file system"}, + {{"dvd-hybrid", &dvd_hybrid }, + "Generate a hybrid (DVD-Audio and DVD-Video) compliant UDF file system"}, {{"dvd-video", &dvd_video }, - "Generate DVD-Video compliant UDF file system"}, + __("Generate DVD-Video compliant UDF file system")}, #endif {{"uid*", &uid_str }, - "\1uid\1Make the owner of all files this uid."}, + __("\1uid\1Make the owner of all files this uid.")}, {{"U,untranslated-filenames", &untranslated_filenames }, /* CSTYLED */ - "Allow Untranslated filenames (for HPUX & AIX - violates ISO9660). Forces -l, -d, -N, -allow-leading-dots, -relaxed-filenames, -allow-lowercase, -allow-multidot"}, + __("Allow Untranslated filenames (for HPUX & AIX - violates ISO9660). Forces -l, -d, -N, -allow-leading-dots, -relaxed-filenames, -allow-lowercase, -allow-multidot")}, {{"relaxed-filenames", &relaxed_filenames }, - "Allow 7 bit ASCII except lower case characters (violates ISO9660)"}, + __("Allow 7 bit ASCII except lower case characters (violates ISO9660)")}, {{"no-iso-translate%0", &iso_translate }, - "Do not translate illegal ISO characters '~', '-' and '#' (violates ISO9660)"}, + __("Do not translate illegal ISO characters '~', '-' and '#' (violates ISO9660)")}, {{"allow-lowercase", &allow_lowercase }, - "Allow lower case characters in addition to the current character set (violates ISO9660)"}, + __("Allow lower case characters in addition to the current character set (violates ISO9660)")}, + {{"no-allow-lowercase", &no_allow_lowercase }, + __("Do not allow lower case characters in addition to the current character set.")}, + {{"+allow-lowercase", &no_allow_lowercase }, + NULL}, {{"allow-multidot", &allow_multidot }, - "Allow more than one dot in filenames (e.g. .tar.gz) (violates ISO9660)"}, + __("Allow more than one dot in filenames (e.g. .tar.gz) (violates ISO9660)")}, {{"use-fileversion", &use_fileversion }, - "\1LEVEL\1Use file version # from filesystem"}, + __("\1LEVEL\1Use file version # from filesystem")}, {{"v+,verbose+", &verbose }, - "Verbose"}, + __("Verbose")}, {{"version", &pversion }, - "Print the current version"}, + __("Print the current version")}, {{"V*,volid*", &volume_id }, - "\1ID\1Set Volume ID"}, + __("\1ID\1Set Volume ID")}, {{"volset* ", &volset_id }, - "\1ID\1Set Volume set ID"}, + __("\1ID\1Set Volume set ID")}, {{"volset-size#", &volume_set_size }, - "\1#\1Set Volume set size"}, + __("\1#\1Set Volume set size")}, {{"volset-seqno#", &volume_sequence_number }, - "\1#\1Set Volume set sequence number"}, + __("\1#\1Set Volume set sequence number")}, {{"x& ,old-exclude&", NULL, (getpargfun)add_match }, - "\1FILE\1Exclude file name(depreciated)"}, + __("\1FILE\1Exclude file name(depreciated)")}, {{"hard-disk-boot~", NULL, (getpargfun)get_hd_boot }, - "Boot image is a hard disk image"}, + __("Boot image is a hard disk image")}, {{"no-emul-boot~", NULL, (getpargfun)get_ne_boot }, - "Boot image is 'no emulation' image"}, + __("Boot image is 'no emulation' image")}, {{"no-boot~", NULL, (getpargfun)get_no_boot }, - "Boot image is not bootable"}, + __("Boot image is not bootable")}, {{"boot-load-seg&", NULL, (getpargfun)get_boot_addr }, - "\1#\1Set load segment for boot image"}, + __("\1#\1Set load segment for boot image")}, {{"boot-load-size&", NULL, (getpargfun)get_boot_size }, - "\1#\1Set numbers of load sectors"}, + __("\1#\1Set numbers of load sectors")}, {{"boot-info-table~", NULL, (getpargfun)get_boot_table }, - "Patch boot image with info table"}, + __("Patch boot image with info table")}, {{"XA", &use_XA }, - "Generate XA directory attruibutes"}, + __("Generate XA directory attributes")}, {{"xa", &rationalize_xa }, - "Generate rationalized XA directory attruibutes"}, + __("Generate rationalized XA directory attributes")}, {{"z,transparent-compression", &transparent_compression }, - "Enable transparent compression of files"}, + __("Enable transparent compression of files")}, #ifdef APPLE_HYB {{"hfs-type*", &deftype }, - "\1TYPE\1Set HFS default TYPE"}, + __("\1TYPE\1Set HFS default TYPE")}, {{"hfs-creator", &defcreator }, - "\1CREATOR\1Set HFS default CREATOR"}, + __("\1CREATOR\1Set HFS default CREATOR")}, {{"g,apple", &apple_ext }, - "Add Apple ISO9660 extensions"}, + __("Add Apple ISO9660 extensions")}, {{"h,hfs", &apple_hyb }, - "Create ISO9660/HFS hybrid"}, + __("Create ISO9660/HFS hybrid")}, {{"map*", &afpfile }, - "\1MAPPING_FILE\1Map file extensions to HFS TYPE/CREATOR"}, + __("\1MAPPING_FILE\1Map file extensions to HFS TYPE/CREATOR")}, {{"magic*", &magic_file }, - "\1FILE\1Magic file for HFS TYPE/CREATOR"}, + __("\1FILE\1Magic file for HFS TYPE/CREATOR")}, {{"probe", &probe }, - "Probe all files for Apple/Unix file types"}, + __("Probe all files for Apple/Unix file types")}, {{"mac-name", &use_mac_name }, - "Use Macintosh name for ISO9660/Joliet/RockRidge file name"}, + __("Use Macintosh name for ISO9660/Joliet/RockRidge file name")}, {{"no-mac-files", &nomacfiles }, - "Do not look for Unix/Mac files (depreciated)"}, + __("Do not look for Unix/Mac files (depreciated)")}, {{"boot-hfs-file*", &hfs_boot_file }, - "\1FILE\1Set HFS boot image name"}, + __("\1FILE\1Set HFS boot image name")}, {{"part", &gen_pt }, - "Generate HFS partition table"}, + __("Generate HFS partition table")}, {{"cluster-size&", NULL, (getpargfun)get_bsize }, - "\1SIZE\1Cluster size for PC Exchange Macintosh files"}, + __("\1SIZE\1Cluster size for PC Exchange Macintosh files")}, {{"auto*", &autoname }, - "\1FILE\1Set HFS AutoStart file name"}, + __("\1FILE\1Set HFS AutoStart file name")}, {{"no-desktop%0", &create_dt }, - "Do not create the HFS (empty) Desktop files"}, - {{"hide-hfs&", NULL, (getpargfun)hfs_add_match }, - "\1GLOBFILE\1Hide HFS file"}, + __("Do not create the HFS (empty) Desktop files")}, + {{"hide-hfs& ", NULL, (getpargfun)hfs_add_match }, + __("\1GLOBFILE\1Hide HFS file")}, {{"hide-hfs-list&", NULL, (getpargfun)hfs_add_list }, - "\1FILE\1List of HFS files to hide"}, + __("\1FILE\1List of HFS files to hide")}, {{"hfs-volid*", &hfs_volume_id }, - "\1HFS_VOLID\1Volume name for the HFS partition"}, + __("\1HFS_VOLID\1Volume name for the HFS partition")}, {{"icon-position", &icon_pos }, - "Keep HFS icon position"}, + __("Keep HFS icon position")}, {{"root-info*", &root_info }, - "\1FILE\1finderinfo for root folder"}, + __("\1FILE\1finderinfo for root folder")}, {{"input-hfs-charset*", &hfs_icharset }, - "\1CHARSET\1Local input charset for HFS file name conversion"}, + __("\1CHARSET\1Local input charset for HFS file name conversion")}, {{"output-hfs-charset*", &hfs_ocharset }, - "\1CHARSET\1Output charset for HFS file name conversion"}, + __("\1CHARSET\1Output charset for HFS file name conversion")}, {{"hfs-unlock%0", &hfs_lock }, - "Leave HFS Volume unlocked"}, + __("Leave HFS Volume unlocked")}, {{"hfs-bless*", &hfs_bless }, - "\1FOLDER_NAME\1Name of Folder to be blessed"}, + __("\1FOLDER_NAME\1Name of Folder to be blessed")}, {{"hfs-parms*", &hfs_parms }, - "\1PARAMETERS\1Comma separated list of HFS parameters"}, + __("\1PARAMETERS\1Comma separated list of HFS parameters")}, #ifdef PREP_BOOT {{"prep-boot&", NULL, (getpargfun)get_prep_boot }, - "\1FILE\1PReP boot image file -- up to 4 are allowed"}, + __("\1FILE\1PReP boot image file -- up to 4 are allowed")}, {{"chrp-boot&", NULL, (getpargfun)get_chrp_boot }, - "Add CHRP boot header"}, + __("Add CHRP boot header")}, #endif /* PREP_BOOT */ {{"cap~", NULL, (getpargfun)hfs_cap }, - "-Look for AUFS CAP Macintosh files"}, + __("-Look for AUFS CAP Macintosh files")}, {{"netatalk~", NULL, (getpargfun)hfs_neta}, - "-Look for NETATALK Macintosh files"}, + __("-Look for NETATALK Macintosh files")}, {{"double~", NULL, (getpargfun)hfs_dbl }, - "-Look for AppleDouble Macintosh files"}, + __("-Look for AppleDouble Macintosh files")}, {{"ethershare~", NULL, (getpargfun)hfs_esh }, - "-Look for Helios EtherShare Macintosh files"}, + __("-Look for Helios EtherShare Macintosh files")}, {{"exchange~", NULL, (getpargfun)hfs_fe }, - "-Look for PC Exchange Macintosh files"}, + __("-Look for PC Exchange Macintosh files")}, {{"sgi~", NULL, (getpargfun)hfs_sgi }, - "-Look for SGI Macintosh files"}, + __("-Look for SGI Macintosh files")}, {{"macbin~", NULL, (getpargfun)hfs_mbin }, - "-Look for MacBinary Macintosh files"}, + __("-Look for MacBinary Macintosh files")}, {{"single~", NULL, (getpargfun)hfs_sgl }, - "-Look for AppleSingle Macintosh files"}, + __("-Look for AppleSingle Macintosh files")}, {{"ushare~", NULL, (getpargfun)hfs_esh }, - "-Look for IPT UShare Macintosh files"}, + __("-Look for IPT UShare Macintosh files")}, {{"xinet~", NULL, (getpargfun)hfs_sgi }, - "-Look for XINET Macintosh files"}, + __("-Look for XINET Macintosh files")}, {{"dave~", NULL, (getpargfun)hfs_dave }, - "-Look for DAVE Macintosh files"}, + __("-Look for DAVE Macintosh files")}, {{"sfm~", NULL, (getpargfun)hfs_sfm }, - "-Look for SFM Macintosh files"}, + __("-Look for SFM Macintosh files")}, {{"osx-double~", NULL, (getpargfun)hfs_xdbl }, - "-Look for MacOS X AppleDouble Macintosh files"}, + __("-Look for MacOS X AppleDouble Macintosh files")}, {{"osx-hfs~", NULL, (getpargfun)hfs_xhfs }, - "-Look for MacOS X HFS Macintosh files"}, + __("-Look for MacOS X HFS Macintosh files")}, {{"no-hfs~", NULL, (getpargfun)hfs_nohfs }, - "Do not create ISO9660/HFS hybrid"}, + __("Do not create ISO9660/HFS hybrid")}, #endif /* APPLE_HYB */ + {{"legacy~", NULL, dolegacy }, + __("\2")}, }; #define OPTION_COUNT (sizeof mki_options / sizeof (mki_options[0])) @@ -1069,21 +1471,25 @@ LOCAL void usage __PR((int excode)); EXPORT int iso9660_date __PR((char *result, time_t crtime)); LOCAL void hide_reloc_dir __PR((void)); -LOCAL char * get_pnames __PR((int argc, char * const *argv, int opt, - char *pname, int pnsize, FILE * fp)); +LOCAL char *get_pnames __PR((int argc, char *const *argv, int opt, + char *pname, int pnsize, FILE *fp)); EXPORT int main __PR((int argc, char *argv[])); LOCAL void list_locales __PR((void)); -EXPORT char * findgequal __PR((char *s)); -LOCAL char * escstrcpy __PR((char *to, char *from)); -struct directory * get_graft __PR((char *arg, char *graft_point, char *nodename, +EXPORT char *findgequal __PR((char *s)); +LOCAL char *escstrcpy __PR((char *to, size_t tolen, char *from)); +struct directory *get_graft __PR((char *arg, char *graft_point, size_t glen, + char *nodename, size_t nlen, char **short_namep, BOOL do_insert)); -EXPORT void * e_malloc __PR((size_t size)); +EXPORT void *e_malloc __PR((size_t size)); +EXPORT char *e_strdup __PR((const char *s)); +LOCAL void ovstrcpy __PR((char *p2, char *p1)); +LOCAL void checkarch __PR((char *name)); LOCAL void read_rcfile(appname) char *appname; { - FILE *rcfile = (FILE *) NULL; + FILE *rcfile = (FILE *)NULL; struct rcopts *rco; char *pnt, *pnt1; @@ -1096,7 +1502,7 @@ if (access(filename, R_OK) == 0) rcfile = fopen(filename, "r"); if (!rcfile && errno != ENOENT) - errmsg("Cannot open '%s'.\n", filename); + errmsg(_("Cannot open '%s'.\n"), filename); if (!rcfile) { pnt = getenv("MKISOFSRC"); @@ -1105,7 +1511,7 @@ if (access(filename, R_OK) == 0) rcfile = fopen(filename, "r"); if (!rcfile && errno != ENOENT) - errmsg("Cannot open '%s'.\n", filename); + errmsg(_("Cannot open '%s'.\n"), filename); } } if (!rcfile) { @@ -1121,7 +1527,7 @@ if (access(filename, R_OK) == 0) rcfile = fopen(filename, "r"); if (!rcfile && errno != ENOENT) - errmsg("Cannot open '%s'.\n", filename); + errmsg(_("Cannot open '%s'.\n"), filename); } } if (!rcfile && strlen(appname) + sizeof (rcfn) + 2 <= @@ -1134,13 +1540,13 @@ if (access(filename, R_OK) == 0) rcfile = fopen(filename, "r"); if (!rcfile && errno != ENOENT) - errmsg("Cannot open '%s'.\n", filename); + errmsg(_("Cannot open '%s'.\n"), filename); } } if (!rcfile) return; if (verbose > 0) { - fprintf(stderr, "Using \"%s\"\n", filename); + fprintf(stderr, _("Using \"%s\"\n"), filename); } /* OK, we got it. Now read in the lines and parse them */ linum = 0; @@ -1169,7 +1575,7 @@ pnt++; } if (name == pnt) { - fprintf(stderr, "%s:%d: name required\n", filename, + fprintf(stderr, _("%s:%d: name required\n"), filename, linum); continue; } @@ -1179,7 +1585,7 @@ pnt++; /* silently ignore errors in the rc file. */ if (*pnt != '=') { - fprintf(stderr, "%s:%d: equals sign required after '%.*s'\n", + fprintf(stderr, _("%s:%d: equals sign required after '%.*s'\n"), filename, linum, /* XXX Should not be > int */ (int)(name_end-name), name); @@ -1207,18 +1613,18 @@ /* OK, now figure out which option we have */ for (rco = rcopt; rco->tag; rco++) { if (strcmp(rco->tag, name) == 0) { - *rco->variable = strdup(pnt); + *rco->variable = e_strdup(pnt); break; } } if (rco->tag == NULL) { - fprintf(stderr, "%s:%d: field name \"%s\" unknown\n", + fprintf(stderr, _("%s:%d: field name \"%s\" unknown\n"), filename, linum, name); } } if (ferror(rcfile)) - errmsg("Read error on '%s'.\n", filename); + errmsg(_("Read error on '%s'.\n"), filename); fclose(rcfile); } @@ -1245,41 +1651,48 @@ const char *program_name = "mkisofs"; #ifdef USE_FIND - fprintf(stderr, "Usage: %s [options] [-find] file... [find expression]\n", program_name); + fprintf(stderr, _("Usage: %s [options] [-find] file... [find expression]\n"), program_name); #else - fprintf(stderr, "Usage: %s [options] file...\n", program_name); + fprintf(stderr, _("Usage: %s [options] file...\n"), program_name); #endif - fprintf(stderr, "\nUse %s -help\n", program_name); - fprintf(stderr, "to get a list all of valid options.\n"); + fprintf(stderr, _("\nUse %s -help\n"), program_name); + fprintf(stderr, _("to get a list all of valid options.\n")); #ifdef USE_FIND - fprintf(stderr, "\nUse %s -find -help\n", program_name); - fprintf(stderr, "to get a list of all valid -find options.\n"); + fprintf(stderr, _("\nUse %s -find -help\n"), program_name); + fprintf(stderr, _("to get a list of all valid -find options.\n")); +#endif + error(_("\nMost important Options:\n")); + error(_(" -posix-H Follow sylinks encountered on command line\n")); + error(_(" -posix-L Follow all symlinks\n")); + error(_(" -posix-P Do not follow symlinks (default)\n")); + error(_(" -o FILE, -output FILE Set output file name\n")); + error(_(" -R, -rock Generate Rock Ridge directory information\n")); + error(_(" -r, -rational-rock Generate rationalized Rock Ridge directory info\n")); + error(_(" -J, -joliet Generate Joliet directory information\n")); + error(_(" -print-size Print estimated filesystem size and exit\n")); +#ifdef UDF + error(_(" -UDF Generate UDF file system\n")); #endif - error("\nMost important Options:\n"); - error(" -posix-H Follow sylinks encountered on command line\n"); - error(" -posix-L Follow all symlinks\n"); - error(" -posix-P Do not follow symlinks (default)\n"); - error(" -o FILE, -output FILE Set output file name\n"); - error(" -R, -rock Generate Rock Ridge directory information\n"); - error(" -r, -rational-rock Generate rationalized Rock Ridge directory info\n"); - error(" -J, -joliet Generate Joliet directory information\n"); - error(" -print-size Print estimated filesystem size and exit\n"); - error(" -UDF Generate UDF file system\n"); - error(" -dvd-video Generate DVD-Video compliant UDF file system\n"); - error(" -iso-level LEVEL Set ISO9660 level (1..3) or 4 for ISO9660 v 2\n"); - error(" -V ID, -volid ID Set Volume ID\n"); - error(" -graft-points Allow to use graft points for filenames\n"); - error(" -M FILE, -prev-session FILE Set path to previous session to merge\n"); +#ifdef DVD_AUD_VID + error(_(" -dvd-audio Generate DVD-Audio compliant UDF file system\n")); + error(_(" -dvd-video Generate DVD-Video compliant UDF file system\n")); + error(_(" -dvd-hybrid Generate a hybrid (DVD-Audio/DVD-Video) compliant UDF file system\n")); +#endif + error(_(" -iso-level LEVEL Set ISO9660 level (1..3) or 4 for ISO9660 v 2\n")); + error(_(" -V ID, -volid ID Set Volume ID\n")); + error(_(" -graft-points Allow to use graft points for filenames\n")); + error(_(" -M FILE, -prev-session FILE Set path to previous session to merge\n")); exit(excode); } -const char * optend __PR((const char *fmt)); +const char *optend __PR((const char *fmt)); const char * optend(fmt) const char *fmt; { - int c; + int c; + const char *ofmt = fmt; for (; *fmt != '\0'; fmt++) { c = *fmt; @@ -1289,7 +1702,9 @@ continue; } if (c == ',' || c == '%' || c == '*' || c == '?' || - c == '#' || c == '&' || c == '~' || c == '+') + c == '#' || c == '&' || c == '~') + break; + if (fmt > ofmt && c == '+') break; } @@ -1329,7 +1744,7 @@ len += fprintf(f, "%s%.*s%s%.*s", *fmt == '+' ? "" : (optlen > 1 && twod) ? "--" : "-", - p - fmt, fmt, + (int)(p - fmt), fmt, arg != NULL ? " " : "", arglen, arg != NULL ? arg : ""); fmt = p; @@ -1384,12 +1799,12 @@ int i; #ifdef USE_FIND - fprintf(stderr, "Usage: %s [options] [-find] file... [find expression]\n", program_name); + fprintf(stderr, _("Usage: %s [options] [-find] file... [find expression]\n"), program_name); #else - fprintf(stderr, "Usage: %s [options] file...\n", program_name); + fprintf(stderr, _("Usage: %s [options] file...\n"), program_name); #endif - fprintf(stderr, "Options:\n"); + fprintf(stderr, _("Options:\n")); for (i = 0; i < (int)OPTION_COUNT; i++) { if (docstr(mki_options[i].doc, NULL) != NULL) { int len; @@ -1441,51 +1856,92 @@ /* * Fill in date in the iso9660 format + * This takes 7 bytes and supports year 1900 .. 2155 with 1 second granularity * * The standards state that the timezone offset is in multiples of 15 * minutes, and is what you add to GMT to get the localtime. The U.S. * is always at a negative offset, from -5h to -8h (can vary a little * with DST, I guess). The Linux iso9660 filesystem has had the sign - * of this wrong for ages (mkisofs had it wrong too for the longest time). + * of this wrong for ages (mkisofs had it wrong too until February 1997). */ EXPORT int iso9660_date(result, crtime) char *result; time_t crtime; { - struct tm *local; + struct tm local; + struct tm gmt; - local = localtime(&crtime); - result[0] = local->tm_year; - result[1] = local->tm_mon + 1; - result[2] = local->tm_mday; - result[3] = local->tm_hour; - result[4] = local->tm_min; - result[5] = local->tm_sec; - - /* - * Must recalculate proper timezone offset each time, as some files use - * daylight savings time and some don't... - */ - result[6] = local->tm_yday; /* save yday 'cause gmtime zaps it */ - local = gmtime(&crtime); - local->tm_year -= result[0]; - local->tm_yday -= result[6]; - local->tm_hour -= result[3]; - local->tm_min -= result[4]; - if (local->tm_year < 0) { - local->tm_yday = -1; - } else { - if (local->tm_year > 0) - local->tm_yday = 1; - } + local = *localtime(&crtime); + gmt = *gmtime(&crtime); - result[6] = -(local->tm_min + 60 * - (local->tm_hour + 24 * local->tm_yday)) / 15; + result[0] = local.tm_year; + result[1] = local.tm_mon + 1; + result[2] = local.tm_mday; + result[3] = local.tm_hour; + result[4] = local.tm_min; + result[5] = local.tm_sec; + + local.tm_min -= gmt.tm_min; + local.tm_hour -= gmt.tm_hour; + local.tm_yday -= gmt.tm_yday; + local.tm_year -= gmt.tm_year; + if (local.tm_year) /* Hit new-year limit */ + local.tm_yday = local.tm_year; /* yday = +-1 */ + + result[6] = (local.tm_min + 60 * + (local.tm_hour + 24 * local.tm_yday)) / 15; return (0); } +/* + * Fill in date in the iso9660 long format + * This takes 17 bytes and supports year 0 .. 9999 with 10ms granularity + * If iso9660_ldate() is called with gmtoff set to -100, the gmtoffset for + * the related time is computed via localtime(). For the modification + * date in the PVD, the date and the GMT offset may be defined via the + * -modification-date command line option. + */ +EXPORT int +iso9660_ldate(result, crtime, nsec, gmtoff) + char *result; + time_t crtime; + int nsec; + int gmtoff; +{ + struct tm local; + struct tm gmt; + + local = *localtime(&crtime); + gmt = *gmtime(&crtime); + + /* + * There was a comment here about breaking in the year 2000. + * That's not true, in 2000 tm_year == 100, so 1900+tm_year == 2000. + */ + sprintf(result, "%4.4d%2.2d%2.2d%2.2d%2.2d%2.2d%2.2d", + 1900 + local.tm_year, + local.tm_mon + 1, local.tm_mday, + local.tm_hour, local.tm_min, local.tm_sec, + nsec / 10000000); + + if (gmtoff == -100) { + local.tm_min -= gmt.tm_min; + local.tm_hour -= gmt.tm_hour; + local.tm_yday -= gmt.tm_yday; + local.tm_year -= gmt.tm_year; + if (local.tm_year) /* Hit new-year limit */ + local.tm_yday = local.tm_year; /* yday = +-1 */ + + result[16] = (local.tm_min + 60 * + (local.tm_hour + 24 * local.tm_yday)) / 15; + } else { + result[16] = gmtoff; + } + return (0); +} + /* hide "./rr_moved" if all its contents are hidden */ LOCAL void hide_reloc_dir() @@ -1537,7 +1993,7 @@ #endif if (fp == NULL) - return ((char *) 0); + return ((char *)0); if (fgets(pname, pnsize, fp)) { /* Discard newline */ @@ -1547,7 +2003,7 @@ } return (pname); } - return ((char *) 0); + return ((char *)0); } EXPORT int @@ -1591,52 +2047,55 @@ save_args(argc, argv); #if defined(USE_NLS) - /* - * As long as we do not support gettext(), we only set up LC_CTYPE - * for the automated set up of -input-charset. When upgrading to - * gettext() we need to replace this by setlocale(LC_ALL, ""). - */ - setlocale(LC_CTYPE, ""); + setlocale(LC_ALL, ""); +#if !defined(TEXT_DOMAIN) /* Should be defined by cc -D */ +#define TEXT_DOMAIN "mkisofs" /* Use this only if it weren't */ +#endif + arg = searchfileinpath("share/locale", F_OK, + SIP_ANY_FILE|SIP_NO_PATH, NULL); + if (arg) + (void) bindtextdomain(TEXT_DOMAIN, arg); + else +#ifdef PROTOTYPES + (void) bindtextdomain(TEXT_DOMAIN, INS_BASE "/share/locale"); +#else + (void) bindtextdomain(TEXT_DOMAIN, "/usr/share/locale"); +#endif + (void) textdomain(TEXT_DOMAIN); #endif + if (argc < 2) { - errmsgno(EX_BAD, "Missing pathspec.\n"); + errmsgno(EX_BAD, _("Missing pathspec.\n")); susage(1); } /* Get the defaults from the .mkisofsrc file */ read_rcfile(argv[0]); { - int i, - is, - il; + int i; - is = 1; - il = 0; for (i = 0; i < (int)OPTION_COUNT; i++) { - flags[il] = mki_options[i].opt; - ++il; + flags[i] = mki_options[i].opt; } - flags[il].ga_format = NULL; + flags[i].ga_format = NULL; + gl_flags = flags; } + time(&begun); + gettimeofday(&tv_begun, NULL); + modification_date.l_sec = tv_begun.tv_sec; + modification_date.l_usec = tv_begun.tv_usec; + modification_date.l_gmtoff = -100; -#ifdef IS_CYGWIN - /* - * If we have 64 bit inode numbers, Cygwin should be able to work - * correctly on NTFS. - */ - if (sizeof (ino_t) >= 8) - cache_inodes = 1; -#endif cac--; cav++; - c = getvargs(&cac, &cav, flags, GA_NO_PROPS); + c = getvargs(&cac, &cav, GA_NO_PROPS, flags); if (c < 0) { if (c == BADFLAG && strchr(cav[0], '=')) { argind = argc - cac; goto args_ok; } - error("Bad Option '%s' (error %d %s).\n", + error(_("Bad Option '%s' (error %d %s).\n"), cav[0], c, getargerror(c)); susage(EX_BAD); } @@ -1649,14 +2108,24 @@ if (help) usage(0); if (pversion) { - printf("mkisofs %s (%s-%s-%s) Copyright (C) 1993-1997 Eric Youngdale (C) 1997-2007 Jörg Schilling\n", + printf(_("mkisofs %s (%s-%s-%s)\n\n\ +Copyright (C) 1993-1997 %s\n\ +Copyright (C) 1997-2017 %s\n"), version_string, - HOST_CPU, HOST_VENDOR, HOST_OS); + HOST_CPU, HOST_VENDOR, HOST_OS, + _("Eric Youngdale"), + _("Joerg Schilling")); +#ifdef APPLE_HYB + printf(_("Copyright (C) 1997-2001 James Pearson\n")); +#endif +#ifdef UDF + printf(_("Copyright (C) 2006 HELIOS Software GmbH\n")); +#endif #ifdef OPTION_SILO_BOOT - printf("Warning: this is unofficial (modified) version of mkisofs that incorporates\n"); - printf(" support for a non Sparc compliant boot method called SILO.\n"); - printf(" The official method to create Sparc boot CDs is to use -sparc-boot\n"); - printf(" In case of problems first test with an official version of mkisofs.\n"); + printf(_("Warning: this is unofficial (modified) version of mkisofs that incorporates\n")); + printf(_(" support for a non Sparc compliant boot method called SILO.\n")); + printf(_(" The official method to create Sparc boot CDs is to use -sparc-boot\n")); + printf(_(" In case of problems first test with an official version of mkisofs.\n")); #endif exit(0); } @@ -1680,7 +2149,7 @@ if (fa.primtype == FIND_ERRARG) comexit(fa.error); if (fa.primtype != FIND_ENDARGS) - comerrno(EX_BAD, "Incomplete expression.\n"); + comerrno(EX_BAD, _("Incomplete expression.\n")); plusp = fa.plusp; find_patlen = fa.patlen; walkflags = fa.walkflags; @@ -1695,52 +2164,93 @@ find_pname(find_node, "-exec+") || find_pname(find_node, "-ok")) comerrno(EX_BAD, - "Cannot -exec with '-o -'.\n"); + _("Cannot -exec with '-o -'.\n")); } } if (find_ac <= 0 || find_ac == find_pac) { - errmsgno(EX_BAD, "Missing pathspec for -find.\n"); + errmsgno(EX_BAD, _("Missing pathspec for -find.\n")); susage(EX_BAD); } } #endif +#ifdef DVD_AUD_VID + + dvd_aud_vid_flag = (dvd_audio ? DVD_SPEC_AUDIO : 0) + | (dvd_hybrid ? DVD_SPEC_HYBRD : 0) + | (dvd_video ? DVD_SPEC_VIDEO : 0); + +#endif if (abstract) { if (strlen(abstract) > 37) { comerrno(EX_BAD, - "Abstract filename string too long\n"); + _("Abstract filename string too long (cur. %lld max. 37 chars).\n"), + (Llong)strlen(abstract)); } } if (appid) { if (strlen(appid) > 128) { comerrno(EX_BAD, - "Application-id string too long\n"); + _("Application-id string too long (cur. %lld max. 128 chars).\n"), + (Llong)strlen(appid)); } } if (biblio) { if (strlen(biblio) > 37) { comerrno(EX_BAD, - "Bibliographic filename string too long\n"); + _("Bibliographic filename string too long (cur. %lld max. 37 chars).\n"), + (Llong)strlen(biblio)); } } +#ifdef DUPLICATES_ONCE + /* + * If -duplicates-once was specified, do not implicitly enable + * -cache-inodes. + */ + if (cache_inodes < 0 && duplicates_once) + cache_inodes = 0; +#endif +#if defined(IS_CYGWIN) + /* + * If we have 64 bit inode numbers, Cygwin should be able to work + * correctly on NTFS, otherwise disable caching unless it has + * been enforced via -cache-inodes. + */ + if (cache_inodes < 0 && sizeof (ino_t) < 8) + cache_inodes = 0; +#endif + if (cache_inodes < 0) + cache_inodes = 1; +#ifdef DUPLICATES_ONCE + if (!cache_inodes && !duplicates_once) { +#else if (!cache_inodes) { +#endif correct_inodes = FALSE; if (use_RockRidge) { errmsgno(EX_BAD, - "Warning: Cannot write inode/link information with -no-cache-inodes.\n"); + _("Warning: Cannot write inode/link information with -no-cache-inodes.\n")); } else { errmsgno(EX_BAD, - "Warning: Cannot add inode hints with -no-cache-inodes.\n"); + _("Warning: Cannot add inode hints with -no-cache-inodes.\n")); } } +#if defined(__MINGW32__) + if (cache_inodes) { + cache_inodes = 0; + correct_inodes = FALSE; + errmsgno(EX_BAD, + _("Warning: cannot -cache-inodes on this platform - ignoring.\n")); + } +#endif if (!correct_inodes) rrip112 = FALSE; if (check_image) { check_session++; check_oldnames++; merge_image = check_image; - outfile = "/dev/null"; + outfile = DEV_NULL; /* * cdrecord_data is handled specially in multi.c * as we cannot write to all strings. @@ -1752,7 +2262,8 @@ if (copyright) { if (strlen(copyright) > 37) { comerrno(EX_BAD, - "Copyright filename string too long\n"); + _("Copyright filename string too long (cur. %lld max. 37 chars).\n"), + (Llong)strlen(copyright)); } } if (genboot_image) @@ -1763,6 +2274,8 @@ boot_catalog = BOOT_CATALOG_DEFAULT; if (omit_period && iso9660_level < 4) warn_violate++; + if (data_change_warn) + errconfig("WARN|GROW|SHRINK *"); if (dirmode_str) { char *end = 0; @@ -1770,10 +2283,14 @@ use_RockRidge++; rationalize_dirmode++; - dirmode_to_use = strtol(dirmode_str, &end, 8); + /* + * If -new-dir-mode was specified, new_dir_mode is set + * up later with a value that matches the -new-dir-mode arg. + */ + new_dir_mode = dirmode_to_use = strtol(dirmode_str, &end, 8); if (!end || *end != 0 || dirmode_to_use < 0 || dirmode_to_use > 07777) { - comerrno(EX_BAD, "Bad mode for -dir-mode\n"); + comerrno(EX_BAD, _("Bad mode for -dir-mode\n")); } } if (disable_deep_reloc) @@ -1788,13 +2305,13 @@ filemode_to_use = strtol(filemode_str, &end, 8); if (!end || *end != 0 || filemode_to_use < 0 || filemode_to_use > 07777) { - comerrno(EX_BAD, "Bad mode for -file-mode\n"); + comerrno(EX_BAD, _("Bad mode for -file-mode\n")); } } #ifdef __warn_follow__ if (follow_links) { errmsgno(EX_BAD, - "Warning: -follow-links does not always work correctly; be careful.\n"); + _("Warning: -follow-links does not always work correctly; be careful.\n")); } #endif if (gid_str) { @@ -1806,7 +2323,7 @@ gid_to_use = strtol(gid_str, &end, 0); if (!end || *end != 0) { - comerrno(EX_BAD, "Bad value for -gid\n"); + comerrno(EX_BAD, _("Bad value for -gid\n")); } } switch (iso9660_level) { @@ -1850,7 +2367,7 @@ break; default: - comerrno(EX_BAD, "Illegal iso9660 Level %d, use 1..3 or 4.\n", + comerrno(EX_BAD, _("Illegal iso9660 Level %d, use 1..3 or 4.\n"), iso9660_level); } @@ -1872,15 +2389,15 @@ warn_violate++; if (omit_version_number && iso9660_level < 4) warn_violate++; - if (dir_mode_str) { + if (new_dirmode_str) { char *end = 0; rationalize++; - new_dir_mode = strtol(dir_mode_str, &end, 8); + new_dir_mode = strtol(new_dirmode_str, &end, 8); if (!end || *end != 0 || new_dir_mode < 0 || new_dir_mode > 07777) { - comerrno(EX_BAD, "Bad mode for -new-dir-mode\n"); + comerrno(EX_BAD, _("Bad mode for -new-dir-mode\n")); } } if (sectype) { @@ -1891,19 +2408,21 @@ else if (strcmp(sectype, "raw") == 0) { osecsize = 2352; comerrno(EX_BAD, - "Unsupported sector type '%s'.\n", + _("Unsupported sector type '%s'.\n"), sectype); } } if (preparer) { if (strlen(preparer) > 128) { - comerrno(EX_BAD, "Preparer string too long\n"); + comerrno(EX_BAD, _("Preparer string too long (cur. %lld max. 128 chars).\n"), + (Llong)strlen(preparer)); } } if (publisher) { if (strlen(publisher) > 128) { comerrno(EX_BAD, - "Publisher string too long\n"); + _("Publisher string too long (cur. %lld max. 128 chars).\n"), + (Llong)strlen(publisher)); } } if (rationalize_rr) { @@ -1913,18 +2432,18 @@ if (stream_filename) { if (strlen(stream_filename) > MAX_ISONAME) comerrno(EX_BAD, - "stream-file-name too long (%llu), max is %d.\n", + _("stream-file-name too long (%llu), max is %d.\n"), (Ullong)strlen(stream_filename), MAX_ISONAME); if (strchr(stream_filename, '/')) - comerrno(EX_BAD, "Illegal character '/' in stream-file-name.\n"); + comerrno(EX_BAD, _("Illegal character '/' in stream-file-name.\n")); iso9660_level = 4; } else { - stream_filename = "STREAM.IMG;1"; + stream_filename = omit_version_number ? "STREAM.IMG" : "STREAM.IMG;1"; } if (system_id) { if (strlen(system_id) > 32) { comerrno(EX_BAD, - "System ID string too long\n"); + _("System ID string too long\n")); } } if (trans_tbl) @@ -1932,10 +2451,10 @@ else trans_tbl = "TRANS.TBL"; if (ucs_level < 1 || ucs_level > 3) - comerrno(EX_BAD, "Illegal UCS Level %d, use 1..3.\n", + comerrno(EX_BAD, _("Illegal UCS Level %d, use 1..3.\n"), ucs_level); -#ifdef DVD_VIDEO - if (dvd_video) { +#ifdef DVD_AUD_VID + if (dvd_aud_vid_flag) { if (!use_udf) rationalize_udf++; } @@ -1955,7 +2474,7 @@ uid_to_use = strtol(uid_str, &end, 0); if (!end || *end != 0) { - comerrno(EX_BAD, "Bad value for -uid\n"); + comerrno(EX_BAD, _("Bad value for -uid\n")); } } if (untranslated_filenames && iso9660_level < 4) { @@ -1983,6 +2502,8 @@ allow_multidot++; /* > 1 dots */ warn_violate++; } + if (no_allow_lowercase) + allow_lowercase = 0; if (relaxed_filenames && iso9660_level < 4) warn_violate++; if (iso_translate == 0 && iso9660_level < 4) @@ -1994,29 +2515,31 @@ if (volume_id) { if (strlen(volume_id) > 32) { comerrno(EX_BAD, - "Volume ID string too long\n"); + _("Volume ID string too long (cur. %lld max. 32 chars).\n"), + (Llong)strlen(volume_id)); } } if (volset_id) { if (strlen(volset_id) > 128) { comerrno(EX_BAD, - "Volume set ID string too long\n"); + _("Volume set ID string too long (cur. %lld max. 128 chars).\n"), + (Llong)strlen(volset_id)); } } if (volume_set_size) { if (volume_set_size <= 0) { comerrno(EX_BAD, - "Illegal Volume Set Size %d\n", volume_set_size); + _("Illegal Volume Set Size %d\n"), volume_set_size); } if (volume_set_size > 1) { comerrno(EX_BAD, - "Volume Set Size > 1 not yet supported\n"); + _("Volume Set Size > 1 not yet supported\n")); } } if (volume_sequence_number) { if (volume_sequence_number > volume_set_size) { comerrno(EX_BAD, - "Volume set sequence number too big\n"); + _("Volume set sequence number too big\n")); } } if (rationalize_xa) { @@ -2026,7 +2549,7 @@ if (transparent_compression) { #ifdef VMS comerrno(EX_BAD, - "Transparent compression not supported with VMS\n"); + _("Transparent compression not supported with VMS\n")); #endif } #ifdef APPLE_HYB @@ -2034,7 +2557,7 @@ hfs_ct++; if (strlen(deftype) != 4) { comerrno(EX_BAD, - "HFS default TYPE string has illegal length.\n"); + _("HFS default TYPE string has illegal length.\n")); } } else { deftype = APPLE_TYPE_DEFAULT; @@ -2043,7 +2566,7 @@ hfs_ct++; if (strlen(defcreator) != 4) { comerrno(EX_BAD, - "HFS default CREATOR string has illegal length.\n"); + _("HFS default CREATOR string has illegal length.\n")); } } else { defcreator = APPLE_CREATOR_DEFAULT; @@ -2054,7 +2577,7 @@ hfs_last = MAG_LAST; if (nomacfiles) { errmsgno(EX_BAD, - "Warning: -no-mac-files no longer used ... ignoring\n"); + _("Warning: -no-mac-files no longer used ... ignoring\n")); } if (hfs_boot_file) gen_pt = 1; @@ -2063,45 +2586,170 @@ if (hfs_icharset) use_mac_name = 1; if (hfs_parms) - hfs_parms = strdup(hfs_parms); + hfs_parms = e_strdup(hfs_parms); + + if (apple_hyb && apple_ext) { + comerrno(EX_BAD, _("Can't have both -apple and -hfs options\n")); + } + /* + * if -probe, -macname, any hfs selection and/or mapping file is given, + * but no HFS option, then select apple_hyb + */ + if (!apple_hyb && !apple_ext) { + if (*afpfile || probe || use_mac_name || hfs_select || + hfs_boot_file || magic_file || + hfs_ishidden() || gen_pt || autoname || + afe_size || icon_pos || hfs_ct || + hfs_icharset || hfs_ocharset) { + apple_hyb = 1; +#ifdef UDF + if ((DO_XHFS & hfs_select) && use_udf) { + donotwrite_macpart = 1; + if (!no_apple_hyb) { + error( + _("Warning: no HFS hybrid will be created with -udf and --osx-hfs\n")); + } + } +#endif + } + } +#ifdef UDF + if (!use_udf && create_udfsymlinks) + create_udfsymlinks = 0; +#if 0 + if (use_RockRidge && use_udf && create_udfsymlinks) { + error(_("Warning: cannot create UDF symlinks with activated Rock Ridge\n")); + create_udfsymlinks = 0; + } +#endif +#endif + if (no_apple_hyb) { + donotwrite_macpart = 1; + } + if (apple_hyb && !donotwrite_macpart && do_largefiles > 0) { + do_largefiles = 0; + maxnonlarge = (off_t)0x7FFFFFFF; + error(_("Warning: cannot support large files with -hfs\n")); + } +#ifdef UDF + if (apple_hyb && use_udf && !donotwrite_macpart) { + comerrno(EX_BAD, _("Can't have -hfs with -udf\n")); + } +#endif + if (apple_ext && hfs_boot_file) { + comerrno(EX_BAD, _("Can't have -hfs-boot-file with -apple\n")); + } + if (apple_ext && autoname) { + comerrno(EX_BAD, _("Can't have -auto with -apple\n")); + } + if (apple_hyb && (use_sparcboot || use_sunx86boot)) { + comerrno(EX_BAD, _("Can't have -hfs with -sparc-boot/-sunx86-boot\n")); + } + if (apple_hyb && use_genboot) { + comerrno(EX_BAD, _("Can't have -hfs with -generic-boot\n")); + } +#ifdef PREP_BOOT + if (apple_ext && use_prep_boot) { + comerrno(EX_BAD, _("Can't have -prep-boot with -apple\n")); + } +#endif /* PREP_BOOT */ + + if (apple_hyb || apple_ext) + apple_both = 1; + + if (probe) + /* we need to search for all types of Apple/Unix files */ + hfs_select = ~0; + + if (apple_both && verbose && !(hfs_select || *afpfile || magic_file)) { + errmsgno(EX_BAD, + _("Warning: no Apple/Unix files will be decoded/mapped\n")); + } + if (apple_both && verbose && !afe_size && + (hfs_select & (DO_FEU | DO_FEL))) { + errmsgno(EX_BAD, + _("Warning: assuming PC Exchange cluster size of 512 bytes\n")); + afe_size = 512; + } + if (apple_both) { + /* set up the TYPE/CREATOR mappings */ + hfs_init(afpfile, 0, hfs_select); + } + if (apple_ext && !use_RockRidge) { +#ifdef nonono + /* use RockRidge to set the SystemUse field ... */ + use_RockRidge++; + rationalize_all++; +#else + /* EMPTY */ +#endif + } + if (apple_ext && !(use_XA || use_RockRidge)) { + comerrno(EX_BAD, _("Need either -XA/-xa or -R/-r for -apple to become active.\n")); + } #endif /* APPLE_HYB */ /* + * if the -hide-joliet option has been given, set the Joliet option + */ + if (!use_Joliet && j_ishidden()) + use_Joliet++; +#ifdef UDF + /* + * if the -hide-udf option has been given, set the UDF option + */ + if (!use_udf && u_ishidden()) + use_udf++; +#endif + + if (rationalize_all) { + rationalize++; + rationalize_uid++; + rationalize_gid++; + rationalize_filemode++; + rationalize_dirmode++; + } + + /* * XXX This is a hack until we have a decent separate name handling * XXX for UDF filenames. */ - if (dvd_video && use_Joliet) { +#ifdef DVD_AUD_VID + if (dvd_aud_vid_flag && use_Joliet) { use_Joliet = 0; - error("Warning: Disabling Joliet support for DVD-Video.\n"); + error(_("Warning: Disabling Joliet support for DVD-Video/DVD-Audio.\n")); } +#endif +#ifdef UDF if (use_udf && !use_Joliet) jlen = 255; +#endif if (use_RockRidge && (iso9660_namelen > MAX_ISONAME_V2_RR)) iso9660_namelen = MAX_ISONAME_V2_RR; if (warn_violate) - error("Warning: creating filesystem that does not conform to ISO-9660.\n"); + error(_("Warning: creating filesystem that does not conform to ISO-9660.\n")); if (iso9660_level > 3) - error("Warning: Creating ISO-9660:1999 (version 2) filesystem.\n"); + error(_("Warning: Creating ISO-9660:1999 (version 2) filesystem.\n")); if (iso9660_namelen > LEN_ISONAME) - error("Warning: ISO-9660 filenames longer than %d may cause buffer overflows in the OS.\n", + error(_("Warning: ISO-9660 filenames longer than %d may cause buffer overflows in the OS.\n"), LEN_ISONAME); if (use_Joliet && !use_RockRidge) { - error("Warning: creating filesystem with (nonstandard) Joliet extensions\n"); - error(" but without (standard) Rock Ridge extensions.\n"); - error(" It is highly recommended to add Rock Ridge\n"); + error(_("Warning: creating filesystem with (nonstandard) Joliet extensions\n")); + error(_(" but without (standard) Rock Ridge extensions.\n")); + error(_(" It is highly recommended to add Rock Ridge\n")); } if (transparent_compression) { - error("Warning: using transparent compression. This is a nonstandard Rock Ridge\n"); - error(" extension. The resulting filesystem can only be transparently\n"); - error(" read on Linux. On other operating systems you need to call\n"); - error(" mkzftree by hand to decompress the files.\n"); + error(_("Warning: using transparent compression. This is a nonstandard Rock Ridge\n")); + error(_(" extension. The resulting filesystem can only be transparently\n")); + error(_(" read on Linux. On other operating systems you need to call\n")); + error(_(" mkzftree by hand to decompress the files.\n")); } if (transparent_compression && !use_RockRidge) { - error("Warning: transparent decompression is a Linux Rock Ridge extension, but\n"); - error(" creating filesystem without Rock Ridge attributes; files\n"); - error(" will not be transparently decompressed.\n"); + error(_("Warning: transparent decompression is a Linux Rock Ridge extension, but\n")); + error(_(" creating filesystem without Rock Ridge attributes; files\n")); + error(_(" will not be transparently decompressed.\n")); } #if defined(USE_NLS) && defined(HAVE_NL_LANGINFO) && defined(CODESET) @@ -2121,7 +2769,7 @@ Uchar *p; if (codeset != NULL) - codeset = strdup(codeset); + codeset = e_strdup(codeset); if (codeset == NULL) /* Should not happen */ goto setcharset; if (*codeset == '\0') /* Invalid locale */ @@ -2149,7 +2797,7 @@ free(codeset); if (verbose > 0 && icharset != NULL) { - error("Setting input-charset to '%s' from locale.\n", + error(_("Setting input-charset to '%s' from locale.\n"), icharset); } } @@ -2162,24 +2810,25 @@ #endif if (icharset == NULL) { #if (defined(__CYGWIN32__) || defined(__CYGWIN__) || defined(__DJGPP__)) && !defined(IS_CYGWIN_1) - in_nls = sic_open("cp437"); + icharset = "cp437"; #else - in_nls = sic_open("default"); + icharset = "default"; #endif - } else { - in_nls = sic_open(icharset); } + in_nls = sic_open(icharset); + /* * set the output charset to the same as the input or the given output * charset */ if (ocharset == NULL) { - out_nls = sic_open(in_nls ? in_nls->sic_name : NULL); - } else { - out_nls = sic_open(ocharset); + ocharset = in_nls ? in_nls->sic_name : NULL; } + out_nls = sic_open(ocharset); + if (in_nls == NULL || out_nls == NULL) { /* Unknown charset specified */ - fprintf(stderr, "Unknown charset\nKnown charsets are:\n"); + fprintf(stderr, _("Unknown charset '%s'.\nKnown charsets are:\n"), + in_nls == NULL ? icharset : (ocharset ? ocharset : "NULL")); list_locales(); exit(EX_BAD); } @@ -2191,30 +2840,31 @@ if ((in_nls->sic_cd2uni != NULL || out_nls->sic_cd2uni != NULL) && (in_nls->sic_name != out_nls->sic_name)) { errmsgno(EX_BAD, - "Iconv based locales may change file name length.\n"); + _("Iconv based locales may change file name length.\n")); comerrno(EX_BAD, - "Cannot yet have different -input-charset/-output-charset.\n"); + _("Cannot yet have different -input-charset/-output-charset.\n")); } #endif #ifdef APPLE_HYB if (hfs_icharset == NULL || strcmp(hfs_icharset, "mac-roman") == 0) { - hfs_inls = sic_open("cp10000"); - } else { - hfs_inls = sic_open(hfs_icharset); + hfs_icharset = "cp10000"; } + hfs_inls = sic_open(hfs_icharset); + if (hfs_ocharset == NULL) { - hfs_onls = sic_open(hfs_inls ? hfs_inls->sic_name : NULL); - } else { - if (strcmp(hfs_ocharset, "mac-roman") == 0) - hfs_onls = sic_open("cp10000"); - else - hfs_onls = sic_open(hfs_ocharset); + hfs_ocharset = hfs_inls ? hfs_inls->sic_name : NULL; } + if (hfs_ocharset == NULL || strcmp(hfs_ocharset, "mac-roman") == 0) { + hfs_ocharset = "cp10000"; + } + hfs_onls = sic_open(hfs_ocharset); + if (use_mac_name) apple_hyb = 1; if (apple_hyb && (hfs_inls == NULL || hfs_onls == NULL)) { - fprintf(stderr, "Unknown HFS charset\nKnown charsets are:\n"); + fprintf(stderr, _("Unknown HFS charset '%s'.\nKnown charsets are:\n"), + hfs_inls == NULL ? hfs_icharset : (hfs_ocharset ? hfs_ocharset : "NULL")); list_locales(); exit(EX_BAD); } @@ -2223,9 +2873,9 @@ ((hfs_inls->sic_cd2uni != NULL || hfs_onls->sic_cd2uni != NULL) && (hfs_inls->sic_name != hfs_onls->sic_name))) { errmsgno(EX_BAD, - "Iconv based locales may change file name length.\n"); + _("Iconv based locales may change file name length.\n")); comerrno(EX_BAD, - "Cannot yet have different -input-hfs-charset/-output-hfs-charset.\n"); + _("Cannot yet have different -input-hfs-charset/-output-hfs-charset.\n")); } #endif #endif /* APPLE_HYB */ @@ -2233,7 +2883,7 @@ if (merge_image != NULL) { if (open_merge_image(merge_image) < 0) { /* Complain and die. */ - comerr("Unable to open previous session image '%s'.\n", + comerr(_("Unable to open previous session image '%s'.\n"), merge_image); } } @@ -2247,7 +2897,7 @@ if (setuid(getuid()) < 0) #endif #endif - comerr("Panic cannot set back effective uid.\n"); + comerr(_("Panic cannot set back effective uid.\n")); #ifdef no_more_needed @@ -2257,11 +2907,11 @@ struct rlimit rlp; if (getrlimit(RLIMIT_DATA, &rlp) == -1) - errmsg("Warning: Cannot get rlimit.\n"); + errmsg(_("Warning: Cannot get rlimit.\n")); else { rlp.rlim_cur = 33554432; if (setrlimit(RLIMIT_DATA, &rlp) == -1) - errmsg("Warning: Cannot set rlimit.\n"); + errmsg(_("Warning: Cannot set rlimit.\n")); } } #endif @@ -2270,126 +2920,6 @@ mem_start = (unsigned long) sbrk(0); #endif - /* - * if the -hide-joliet option has been given, set the Joliet option - */ - if (!use_Joliet && j_ishidden()) - use_Joliet++; -#ifdef UDF - /* - * if the -hide-udf option has been given, set the UDF option - */ - if (!use_udf && u_ishidden()) - use_udf++; -#endif - -#ifdef APPLE_HYB - if (apple_hyb && apple_ext) { - comerrno(EX_BAD, "Can't have both -apple and -hfs options\n"); - } - /* - * if -probe, -macname, any hfs selection and/or mapping file is given, - * but no HFS option, then select apple_hyb - */ - if (!apple_hyb && !apple_ext) { - if (*afpfile || probe || use_mac_name || hfs_select || - hfs_boot_file || magic_file || - hfs_ishidden() || gen_pt || autoname || - afe_size || icon_pos || hfs_ct || - hfs_icharset || hfs_ocharset) { - apple_hyb = 1; - if ((DO_XHFS & hfs_select) && use_udf) { - donotwrite_macpart = 1; - if (!no_apple_hyb) { - error( - "Warning: no HFS hybrid will be created with -udf and --osx-hfs\n"); - } - } - } - } -#ifdef UDF - if (!use_udf && create_udfsymlinks) - create_udfsymlinks = 0; -#if 0 - if (use_RockRidge && use_udf && create_udfsymlinks) { - error("Warning: cannot create UDF symlinks with activated Rock Ridge\n"); - create_udfsymlinks = 0; - } -#endif -#endif - if (no_apple_hyb) { - donotwrite_macpart = 1; - } - if (apple_hyb && !donotwrite_macpart) { - do_largefiles = 0; - maxnonlarge = (off_t)0x7FFFFFFF; - error("Warning: cannot support large files with -hfs\n"); - } - if (apple_hyb && use_udf && !donotwrite_macpart) { - comerrno(EX_BAD, "Can't have -hfs with -udf\n"); - } - if (apple_ext && hfs_boot_file) { - comerrno(EX_BAD, "Can't have -hfs-boot-file with -apple\n"); - } - if (apple_ext && autoname) { - comerrno(EX_BAD, "Can't have -auto with -apple\n"); - } - if (apple_hyb && (use_sparcboot || use_sunx86boot)) { - comerrno(EX_BAD, "Can't have -hfs with -sparc-boot/-sunx86-boot\n"); - } - if (apple_hyb && use_genboot) { - comerrno(EX_BAD, "Can't have -hfs with -generic-boot\n"); - } -#ifdef PREP_BOOT - if (apple_ext && use_prep_boot) { - comerrno(EX_BAD, "Can't have -prep-boot with -apple\n"); - } -#endif /* PREP_BOOT */ - - if (apple_hyb || apple_ext) - apple_both = 1; - - if (probe) - /* we need to search for all types of Apple/Unix files */ - hfs_select = ~0; - - if (apple_both && verbose && !(hfs_select || *afpfile || magic_file)) { - errmsgno(EX_BAD, - "Warning: no Apple/Unix files will be decoded/mapped\n"); - } - if (apple_both && verbose && !afe_size && - (hfs_select & (DO_FEU | DO_FEL))) { - errmsgno(EX_BAD, - "Warning: assuming PC Exchange cluster size of 512 bytes\n"); - afe_size = 512; - } - if (apple_both) { - /* set up the TYPE/CREATOR mappings */ - hfs_init(afpfile, 0, hfs_select); - } - if (apple_ext && !use_RockRidge) { -#ifdef nonono - /* use RockRidge to set the SystemUse field ... */ - use_RockRidge++; - rationalize_all++; -#else - /* EMPTY */ -#endif - } - if (apple_ext && !(use_XA || use_RockRidge)) { - comerrno(EX_BAD, "Need either -XA/-xa or -R/-r for -apple to become active.\n"); - } - -#endif /* APPLE_HYB */ - - if (rationalize_all) { - rationalize++; - rationalize_uid++; - rationalize_gid++; - rationalize_filemode++; - rationalize_dirmode++; - } - if (verbose > 1) { fprintf(stderr, "%s (%s-%s-%s)\n", version_string, @@ -2397,16 +2927,16 @@ } if (cdrecord_data == NULL && !check_session && merge_image != NULL) { comerrno(EX_BAD, - "Multisession usage bug: Must specify -C if -M is used.\n"); + _("Multisession usage bug: Must specify -C if -M is used.\n")); } if (cdrecord_data != NULL && merge_image == NULL) { errmsgno(EX_BAD, - "Warning: -C specified without -M: old session data will not be merged.\n"); + _("Warning: -C specified without -M: old session data will not be merged.\n")); } #ifdef APPLE_HYB if (merge_image != NULL && apple_hyb) { errmsgno(EX_BAD, - "Warning: files from previous sessions will not be included in the HFS volume.\n"); + _("Warning: files from previous sessions will not be included in the HFS volume.\n")); } #endif /* APPLE_HYB */ @@ -2417,7 +2947,7 @@ /* "-" means take list from the standard input */ if (strcmp(pathnames, "-") != 0) { if ((pfp = fopen(pathnames, "r")) == NULL) { - comerr("Unable to open pathname list %s.\n", + comerr(_("Unable to open pathname list %s.\n"), pathnames); } } else @@ -2429,7 +2959,7 @@ if ((arg = get_pnames(argc, argv, argind, pname, sizeof (pname), pfp)) == NULL) { if (check_session == 0 && !stream_media_size) { - errmsgno(EX_BAD, "Missing pathspec.\n"); + errmsgno(EX_BAD, _("Missing pathspec.\n")); susage(1); } } @@ -2443,19 +2973,29 @@ save_pname = 1; } if (stream_media_size) { +#ifdef UDF if (use_XA || use_RockRidge || use_udf || use_Joliet) +#else + if (use_XA || use_RockRidge || use_Joliet) +#endif comerrno(EX_BAD, - "Cannot use XA, Rock Ridge, UDF or Joliet with -stream-media-size\n"); + _("Cannot use XA, Rock Ridge, UDF or Joliet with -stream-media-size\n")); if (merge_image) comerrno(EX_BAD, - "Cannot use multi session with -stream-media-size\n"); + _("Cannot use multi session with -stream-media-size\n")); if (use_eltorito || use_sparcboot || use_sunx86boot || +#ifdef APPLE_HYB use_genboot || use_prep_boot || hfs_boot_file) +#else + use_genboot) +#endif comerrno(EX_BAD, - "Cannot use boot options with -stream-media-size\n"); + _("Cannot use boot options with -stream-media-size\n")); +#ifdef APPLE_HYB if (apple_hyb) comerrno(EX_BAD, - "Cannot use Apple hybrid options with -stream-media-size\n"); + _("Cannot use Apple hybrid options with -stream-media-size\n")); +#endif } if (use_RockRidge) { @@ -2473,23 +3013,24 @@ #endif /* END CSTYLED */ } + checkarch(outfile); if (log_file) { FILE *lfp; int i; /* open log file - test that we can open OK */ if ((lfp = fopen(log_file, "w")) == NULL) { - comerr("Can't open logfile: '%s'.\n", log_file); + comerr(_("Can't open logfile: '%s'.\n"), log_file); } fclose(lfp); /* redirect all stderr message to log_file */ - fprintf(stderr, "re-directing all messages to %s\n", log_file); + fprintf(stderr, _("re-directing all messages to %s\n"), log_file); fflush(stderr); /* associate stderr with the log file */ if (freopen(log_file, "w", stderr) == NULL) { - comerr("Can't open logfile: '%s'.\n", log_file); + comerr(_("Can't open logfile: '%s'.\n"), log_file); } if (verbose > 1) { for (i = 0; i < argc; i++) @@ -2507,7 +3048,7 @@ node = NULL; if (node == NULL) { if (use_graft_ptrs && arg != NULL) - node = escstrcpy(nodename, arg); + node = escstrcpy(nodename, sizeof (nodename), arg); else node = arg; } else { @@ -2515,7 +3056,7 @@ * Remove '\\' escape chars which are located * before '\\' and '=' chars */ - node = escstrcpy(nodename, ++node); + node = escstrcpy(nodename, sizeof (nodename), ++node); } /* @@ -2559,7 +3100,7 @@ /* Complain and die. */ if (errno == 0) errno = -1; - comerr("Unable to find previous session PVD '%s'.\n", + comerr(_("Unable to find previous session PVD '%s'.\n"), merge_image); } memcpy(de.isorec.extent, mrootp->extent, 8); @@ -2572,26 +3113,44 @@ readsecs(extent, sector, 1); c = rr_flags((struct iso_directory_record *)sector); if (c & RR_FLAG_XA) - fprintf(stderr, "XA signatures found\n"); + fprintf(stderr, _("XA signatures found\n")); if (c & RR_FLAG_AA) - fprintf(stderr, "AA signatures found\n"); + fprintf(stderr, _("AA signatures found\n")); if (c & ~(RR_FLAG_XA|RR_FLAG_AA)) { + extern int su_version; + extern int rr_version; + extern char er_id[]; + if (c & RR_FLAG_SP) { - fprintf(stderr, "Rock Ridge signatures found\n"); + fprintf(stderr, _("SUSP signatures version %d found\n"), su_version); + if (c & RR_FLAG_ER) { + if (rr_version < 1) { + fprintf(stderr, + _("No valid Rock Ridge signature found\n")); + if (!force_rr) + no_rr++; + } else { + fprintf(stderr, + _("Rock Ridge signatures version %d found\n"), + rr_version); + fprintf(stderr, + _("Rock Ridge id '%s'\n"), er_id); + } + } } else { - fprintf(stderr, "Bad Rock Ridge signatures found (SU record missing)\n"); + fprintf(stderr, _("Bad Rock Ridge signatures found (SU record missing)\n")); if (!force_rr) no_rr++; } } else { - fprintf(stderr, "NO Rock Ridge present\n"); + fprintf(stderr, _("No SUSP/Rock Ridge present\n")); if ((c & (RR_FLAG_XA|RR_FLAG_AA)) == 0) { if (!force_rr) no_rr++; } } if (no_rr) - fprintf(stderr, "Disabling Rock Ridge / XA / AA\n"); + fprintf(stderr, _("Disabling Rock Ridge / XA / AA\n")); } /* * Create an empty root directory. If we ever scan it for real, @@ -2619,8 +3178,8 @@ walkinitstate(&walkstate); if (find_patlen > 0) { - walkstate.patstate = __malloc(sizeof (int) * find_patlen, - "space for pattern state"); + walkstate.patstate = ___malloc(sizeof (int) * find_patlen, + _("space for pattern state")); } find_timeinit(time(0)); @@ -2648,7 +3207,10 @@ graft_point[0] = '\0'; snp = NULL; if (use_graft_ptrs) - graft_dir = get_graft(arg, graft_point, nodename, &snp, FALSE); + graft_dir = get_graft(arg, + graft_point, sizeof (graft_point), + nodename, sizeof (nodename), + &snp, FALSE); if (graft_point[0] != '\0') { arg = nodename; wa.dir = graft_dir; @@ -2669,7 +3231,8 @@ sizeof (pname), pfp)) != NULL) { char graft_point[PATH_MAX + 1]; - get_graft(arg, graft_point, nodename, NULL, TRUE); + get_graft(arg, graft_point, sizeof (graft_point), + nodename, sizeof (nodename), NULL, TRUE); argind++; no_path_names = 0; } @@ -2684,7 +3247,7 @@ * path on the command line */ if (no_path_names && !check_session && !stream_media_size) { - errmsgno(EX_BAD, "No pathnames found.\n"); + errmsgno(EX_BAD, _("No pathnames found.\n")); susage(1); } /* @@ -2694,7 +3257,7 @@ if (merge_image != NULL) { if (merge_previous_session(root, mrootp, reloc_root, reloc_old_root) < 0) { - comerrno(EX_BAD, "Cannot merge previous session.\n"); + comerrno(EX_BAD, _("Cannot merge previous session.\n")); } close_merge_image(); @@ -2704,6 +3267,7 @@ * finish_cl_pl_entries can do its job */ match_cl_re_entries(); + free(mrootp); } #ifdef APPLE_HYB /* free up any HFS filename mapping memory */ @@ -2737,7 +3301,7 @@ goof += sort_tree(root); if (goof) { - comerrno(EX_BAD, "ISO9660/Rock Ridge tree sort failed.\n"); + comerrno(EX_BAD, _("ISO9660/Rock Ridge tree sort failed.\n")); } #ifdef UDF if (use_Joliet || use_udf) { @@ -2747,7 +3311,7 @@ goof += joliet_sort_tree(root); } if (goof) { - comerrno(EX_BAD, "Joliet tree sort failed.\n"); + comerrno(EX_BAD, _("Joliet tree sort failed.\n")); } /* * Fix a couple of things in the root directory so that everything is @@ -2757,23 +3321,23 @@ /* OK, ready to write the file. Open it up, and generate the thing. */ if (print_size) { - discimage = fopen("/dev/null", "wb"); + discimage = fopen(DEV_NULL, "wb"); if (!discimage) { - comerr("Unable to open /dev/null\n"); + comerr(_("Unable to open /dev/null\n")); } } else if (outfile != NULL && !(outfile[0] == '-' && outfile[1] == '\0')) { discimage = fopen(outfile, "wb"); if (!discimage) { - comerr("Unable to open disc image file '%s'.\n", outfile); + comerr(_("Unable to open disc image file '%s'.\n"), outfile); } } else { discimage = stdout; - -#ifdef NEED_O_BINARY setmode(fileno(stdout), O_BINARY); -#endif } +#ifdef HAVE_SETVBUF + setvbuf(discimage, NULL, _IOFBF, 64*1024); +#endif /* Now assign addresses on the disc for the path table. */ @@ -2896,7 +3460,7 @@ opnt->of_start_extent = last_extent; if (opnt->of_size != NULL) { if (verbose > 2) - fprintf(stderr, "Computing size: %-40sStart Block %u\n", + fprintf(stderr, _("Computing size: %-40sStart Block %u\n"), opnt->of_name, last_extent); (*opnt->of_size) (last_extent); } @@ -2911,7 +3475,7 @@ for (opnt = out_list; opnt; opnt = opnt->of_next) { if (opnt->of_generate != NULL) { if (verbose > 2) - fprintf(stderr, "Generating content: %-40s\n", + fprintf(stderr, _("Generating content: %-40s\n"), opnt->of_name); (*opnt->of_generate) (); } @@ -2988,7 +3552,7 @@ if (print_size > 0) { if (verbose > 0) fprintf(stderr, - "Total extents scheduled to be written = %u\n", + _("Total extents scheduled to be written = %u\n"), (last_extent - session_start)); printf("%u\n", (last_extent - session_start)); exit(0); @@ -3009,31 +3573,31 @@ * XXXX of_start_extent set up correctly. */ comerrno(EX_BAD, - "Implementation botch: %s should start at %u but starts at %u.\n", + _("Implementation botch: %s should start at %u but starts at %u.\n"), opnt->of_name, opnt->of_start_extent, last_extent_written); } if (opnt->of_write != NULL) { if (verbose > 1) - fprintf(stderr, "Writing: %-40sStart Block %u\n", + fprintf(stderr, _("Writing: %-40sStart Block %u\n"), opnt->of_name, last_extent_written); (*opnt->of_write) (discimage); if (verbose > 1) - fprintf(stderr, "Done with: %-40sBlock(s) %u\n", + fprintf(stderr, _("Done with: %-40sBlock(s) %u\n"), opnt->of_name, last_extent_written-oext); } } if (last_extent != last_extent_written) { comerrno(EX_BAD, - "Implementation botch: FS should end at %u but ends at %u.\n", + _("Implementation botch: FS should end at %u but ends at %u.\n"), last_extent, last_extent_written); } if (verbose > 0) { #ifdef HAVE_SBRK - fprintf(stderr, "Max brk space used %x\n", + fprintf(stderr, _("Max brk space used %x\n"), (unsigned int)(((unsigned long) sbrk(0)) - mem_start)); #endif - fprintf(stderr, "%u extents written (%u MB)\n", + fprintf(stderr, _("%u extents written (%u MB)\n"), (last_extent-session_start), (last_extent-session_start) >> 9); } @@ -3051,18 +3615,22 @@ n = sic_list(stdout); if (n <= 0) { - errmsgno(EX_BAD, "'%s/lib/siconv/' %s.\n", - INS_BASE, n < 0 ? "missing":"incomplete"); + const char *ins_base = sic_base(); + + if (ins_base == NULL) + ins_base = "$INS_BASE/lib/siconv/"; + errmsgno(EX_BAD, _("Installation problem: '%s' %s.\n"), + ins_base, n < 0 ? _("missing"):_("incomplete")); if (n == 0) { errmsgno(EX_BAD, - "Check '%s/lib/siconv/' for missing translation tables.\n", - INS_BASE); + _("Check '%s' for missing translation tables.\n"), + ins_base); } } #ifdef USE_ICONV if (n > 0) { errmsgno(EX_BAD, - "'iconv -l' lists more available names.\n"); + _("'iconv -l' lists more available names.\n")); } #endif } @@ -3088,8 +3656,9 @@ * Find unescaped equal sign in string. */ LOCAL char * -escstrcpy(to, from) +escstrcpy(to, tolen, from) char *to; + size_t tolen; char *from; { char *p = to; @@ -3097,7 +3666,11 @@ if (debug) error("FROM: '%s'\n", from); - while ((*p = *from++) != '\0') { + to[0] = '\0'; + if (tolen > 0) { + to[--tolen] = '\0'; /* Fill in last nul char */ + } + while ((*p = *from++) != '\0' && tolen-- > 0) { if (*p == '\\') { if ((*p = *from++) == '\0') break; @@ -3114,10 +3687,12 @@ } struct directory * -get_graft(arg, graft_point, nodename, short_namep, do_insert) +get_graft(arg, graft_point, glen, nodename, nlen, short_namep, do_insert) char *arg; char *graft_point; + size_t glen; char *nodename; + size_t nlen; char **short_namep; BOOL do_insert; { @@ -3168,17 +3743,21 @@ /* insert -root prefix */ if (reloc_root != NULL) { - strlcpy(graft_point, reloc_root, PATH_MAX + 1); + strlcpy(graft_point, reloc_root, glen); len = strlen(graft_point); - if (graft_point[len] != '/') + + if ((len < (glen -1)) && + (len == 0 || graft_point[len-1] != '/')) { graft_point[len++] = '/'; + graft_point[len] = '\0'; + } } else { len = 0; } if (node) { *node = '\0'; - escstrcpy(&graft_point[len], arg); + escstrcpy(&graft_point[len], glen - len, arg); *node = '='; } @@ -3192,11 +3771,15 @@ while (*xpnt == PATH_SEPARATOR) { xpnt++; } - strlcpy(graft_point, xpnt, PATH_MAX + 1); + /* + * The string becomes shorter, there is no need to check + * the length. Make sure to support overlapping strings. + */ + ovstrcpy(graft_point, xpnt); } while (xpnt > graft_point); if (node) { - node = escstrcpy(nodename, ++node); + node = escstrcpy(nodename, nlen, ++node); } else { node = arg; } @@ -3215,8 +3798,8 @@ if (status == 0 && S_ISDIR(st.st_mode)) { len = strlen(graft_point); - if ((len <= (sizeof (graft_point) -1)) && - graft_point[len-1] != '/') { + if ((len < (glen -1)) && + (len == 0 || graft_point[len-1] != '/')) { graft_point[len++] = '/'; graft_point[len] = '\0'; } @@ -3267,7 +3850,7 @@ } else { graft_dir = root; if (use_graft_ptrs) - node = escstrcpy(nodename, arg); + node = escstrcpy(nodename, nlen, arg); else node = arg; } @@ -3285,11 +3868,11 @@ * This is a fatal error - the user won't be getting * what they want if we were to proceed. */ - comerr("Invalid node - '%s'.\n", node); + comerr(_("Invalid node - '%s'.\n"), node); } else { if (S_ISDIR(st.st_mode)) { if (debug) { - error("graft_dir: '%s : %s', node: '%s', (scan)\n", + error(_("graft_dir: '%s : %s', node: '%s', (scan)\n"), graft_dir->whole_name, graft_dir->de_name, node); } @@ -3300,7 +3883,7 @@ exit(1); } if (debug) { - error("scan done\n"); + error(_("scan done\n")); } } else { if (short_name == NULL) { @@ -3314,21 +3897,15 @@ } } if (debug) { - error("graft_dir: '%s : %s', node: '%s', short_name: '%s'\n", + error(_("graft_dir: '%s : %s', node: '%s', short_name: '%s'\n"), graft_dir->whole_name, graft_dir->de_name, node, short_name); } if (!do_insert) return (graft_dir); -#ifdef APPLE_HYB - if (!insert_file_entry(graft_dir, node, - short_name, NULL, 0)) -#else if (!insert_file_entry(graft_dir, node, - short_name, NULL)) -#endif /* APPLE_HYB */ - { + short_name, NULL, 0)) { /* * Should we ignore this? */ @@ -3346,8 +3923,10 @@ { void *pt = 0; - if ((size > 0) && ((pt = malloc(size)) == NULL)) { - comerr("Not enough memory\n"); + if (size == 0) + size = 1; + if ((pt = malloc(size)) == NULL) { + comerr(_("Not enough memory\n")); } /* * Not all code is clean yet. @@ -3357,3 +3936,57 @@ memset(pt, 0, size); return (pt); } + +EXPORT char * +e_strdup(s) + const char *s; +{ + char *ret = strdup(s); + + if (s == NULL) + comerr(_("Not enough memory for strdup(%s)\n"), s); + return (ret); +} + +/* + * A strcpy() that works with overlapping buffers + */ +LOCAL void +ovstrcpy(p2, p1) + register char *p2; + register char *p1; +{ + while ((*p2++ = *p1++) != '\0') + ; +} + +LOCAL void +checkarch(name) + char *name; +{ + struct stat stbuf; + + archive_isreg = FALSE; + archive_dev = (dev_t)0; + archive_ino = (ino_t)0; + + if (name == NULL) + return; + if (stat(name, &stbuf) < 0) + return; + + if (S_ISREG(stbuf.st_mode)) { + archive_dev = stbuf.st_dev; + archive_ino = stbuf.st_ino; + archive_isreg = TRUE; + } else if (((stbuf.st_mode & S_IFMT) == 0) || + S_ISFIFO(stbuf.st_mode) || + S_ISSOCK(stbuf.st_mode)) { + /* + * This is a pipe or similar on different UNIX implementations. + * (stbuf.st_mode & S_IFMT) == 0 may happen in stange cases. + */ + archive_dev = NODEV; + archive_ino = (ino_t)-1; + } +} diff -Nru cdrtools-2.01.01a33/mkisofs/mkisofs.h cdrtools-3.02a09/mkisofs/mkisofs.h --- cdrtools-2.01.01a33/mkisofs/mkisofs.h 2007-07-30 18:47:38.000000000 +0000 +++ cdrtools-3.02a09/mkisofs/mkisofs.h 2016-12-13 21:39:34.000000000 +0000 @@ -1,11 +1,11 @@ -/* @(#)mkisofs.h 1.127 07/07/30 joerg */ +/* @(#)mkisofs.h 1.152 16/12/13 joerg */ /* * Header file mkisofs.h - assorted structure definitions and typecasts. * * Written by Eric Youngdale (1993). * * Copyright 1993 Yggdrasil Computing, Incorporated - * Copyright (c) 1999,2000-2007 J. Schilling + * Copyright (c) 1999,2000-2016 J. Schilling * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -24,8 +24,12 @@ /* APPLE_HYB James Pearson j.pearson@ge.ucl.ac.uk 23/2/2000 */ +/* DUPLICATES_ONCE Alex Kopylov cdrtools@bootcd.ru 19.06.2004 */ + #include /* Must be before stdio.h for LARGEFILE support */ -#include +#include +#include +#include #include #include #include /* Needed for for LARGEFILE support */ @@ -33,10 +37,12 @@ #include #include #include -#include +#include +#include +#include /* Define missing prototypes */ #include "scsi.h" -#ifdef DVD_VIDEO +#ifdef DVD_AUD_VID #ifndef UDF #define UDF #endif @@ -89,15 +95,22 @@ #endif /* APPLE_HYB */ +/* + * Our version of "struct timespec". + * Currently only used with UDF. + */ +typedef struct timesp { + time_t tv_sec; + Int32_t tv_nsec; +} timesp; + struct directory_entry { struct directory_entry *next; struct directory_entry *jnext; struct iso_directory_record isorec; unsigned int starting_block; off_t size; -#ifdef USE_LARGEFILES int mxpart; /* Extent number */ -#endif unsigned short priority; unsigned char jreclen; /* Joliet record len */ char *name; @@ -109,8 +122,12 @@ unsigned int de_flags; #ifdef UDF mode_t mode; /* used for udf */ + dev_t rdev; /* used for udf devices */ uid_t uid; /* used for udf */ gid_t gid; /* used for udf */ + timesp atime; /* timespec for atime */ + timesp mtime; /* timespec for mtime */ + timesp ctime; /* timespec for ctime */ #endif ino_t inode; /* Used in the hash table */ dev_t dev; /* Used in the hash table */ @@ -130,6 +147,10 @@ #ifdef UDF int udf_file_entry_sector; /* also used as UDF unique ID */ #endif +#ifdef DUPLICATES_ONCE + unsigned char *digest_fast; + unsigned char *digest_full; +#endif }; struct file_hash { @@ -139,7 +160,7 @@ nlink_t nlink; /* Used to compute new link count */ unsigned int starting_block; off_t size; -#ifdef SORTING +#if defined(SORTING) || defined(DUPLICATES_ONCE) struct directory_entry *de; #endif /* SORTING */ }; @@ -205,7 +226,7 @@ extern struct output_fragment hfs_desc; #endif /* APPLE_HYB */ -#ifdef DVD_VIDEO +#ifdef DVD_AUD_VID /* * This structure holds the information necessary to create a valid * DVD-Video image. Basically it's how much to pad the files so the @@ -232,7 +253,7 @@ int num_titles; title_set_t *title_set; } title_set_info_t; -#endif /* DVD_VIDEO */ +#endif /* DVD_AUD_VID */ /* * This structure describes one complete directory. It has pointers @@ -296,8 +317,23 @@ int boot_info_table; int load_size; int load_addr; + +#define ELTORITO_BOOT_ID 1 +#define ELTORITO_SECTION_HEADER 2 + int type; + /* + * Valid if (type & ELTORITO_BOOT_ID) != 0 + */ + int boot_platform; + }; +typedef struct ldate { + time_t l_sec; + int l_usec; + int l_gmtoff; +} ldate; + extern int goof; extern struct directory *root; extern struct directory *reloc_dir; @@ -346,6 +382,9 @@ extern int new_dir_mode; extern int follow_links; extern int cache_inodes; +#ifdef DUPLICATES_ONCE +extern int duplicates_once; +#endif extern int verbose; extern int debug; extern int gui; @@ -381,13 +420,22 @@ #define JLONGMAX 103 /* out of spec Joliet file name length */ extern int jlen; /* selected maximum Joliet file name length */ -#ifdef DVD_VIDEO +#ifdef DVD_AUD_VID + +#define DVD_SPEC_NONE 0x0 +#define DVD_SPEC_VIDEO 0x1 +#define DVD_SPEC_AUDIO 0x2 +#define DVD_SPEC_HYBRD (DVD_SPEC_VIDEO | DVD_SPEC_AUDIO) +extern int dvd_audio; +extern int dvd_hybrid; extern int dvd_video; -#endif /* DVD_VIDEO */ +extern int dvd_aud_vid_flag; +#endif /* DVD_AUD_VID */ -#ifdef APPLE_HYB extern int donotwrite_macpart; + +#ifdef APPLE_HYB extern int apple_hyb; /* create HFS hybrid */ extern int apple_ext; /* use Apple extensions */ extern int apple_both; /* common flag (for above) */ @@ -444,17 +492,11 @@ char *path, struct directory_entry * self)); -#ifdef APPLE_HYB extern int insert_file_entry __PR((struct directory *, char *, char *, struct stat *, int)); -#else -extern int insert_file_entry __PR((struct directory *, char *, - struct stat *, - char *)); - -#endif /* APPLE_HYB */ - +extern struct directory_entry * + dup_directory_entry __PR((struct directory_entry *s_entry)); extern void generate_iso9660_directories __PR((struct directory *, FILE *)); extern void dump_tree __PR((struct directory * node)); extern struct directory_entry *search_tree_file __PR((struct @@ -468,6 +510,7 @@ extern void insert_boot_cat __PR((void)); extern void get_boot_entry __PR((void)); extern int new_boot_entry __PR((void)); +extern void ex_boot_enoent __PR((char *msg, char *pname)); /* boot.c */ extern int sparc_boot_label __PR((char *label)); @@ -517,6 +560,7 @@ /* multi.c */ extern FILE *in_image; +extern BOOL ignerr; extern int open_merge_image __PR((char *path)); extern int close_merge_image __PR((void)); extern struct iso_directory_record * @@ -556,8 +600,9 @@ /* various */ extern int iso9660_date __PR((char *, time_t)); +extern int iso9660_ldate __PR((char *, time_t, int, int)); extern void add_hash __PR((struct directory_entry *)); -extern struct file_hash *find_hash __PR((dev_t, ino_t)); +extern struct file_hash *find_hash __PR((struct directory_entry *spnt)); extern void flush_hash __PR((void)); extern void add_directory_hash __PR((dev_t, ino_t)); @@ -639,7 +684,7 @@ /* * The callback function for treewalk() from walk.c */ -#ifdef _WALK_H +#ifdef _SCHILY_WALK_H EXPORT int walkfunc __PR((char *nm, struct stat *fs, int type, struct WALK *state)); #endif @@ -648,6 +693,9 @@ extern char *extension_record; extern UInt32_t extension_record_extent; /*extern int n_data_extents;*/ +extern BOOL archive_isreg; +extern dev_t archive_dev; +extern ino_t archive_ino; /* * These are a few goodies that can be specified on the command line, and are @@ -676,9 +724,11 @@ extern UInt32_t null_inodes; extern BOOL correct_inodes; extern BOOL rrip112; +extern BOOL long_rr_time; /* TRUE: use long (17 Byte) time format */ extern char *findgequal __PR((char *)); extern void *e_malloc __PR((size_t)); +extern char *e_strdup __PR((const char *)); /* * Note: always use these macros to avoid problems. @@ -707,34 +757,6 @@ #endif /* APPLE_HYB */ /* - * Rock Ridge defines - */ -#define NEED_RE 1 /* Need Relocated Direcotry */ -#define NEED_PL 2 /* Need Parent link */ -#define NEED_CL 4 /* Need Child link */ -#define NEED_CE 8 /* Need Continuation Area */ -#define NEED_SP 16 /* Need SUSP record */ -#define DID_CHDIR 1024 /* Did chdir() to file dir */ - -#define RR_FLAG_PX 1 /* POSIX attributes */ -#define RR_FLAG_PN 2 /* POSIX device number */ -#define RR_FLAG_SL 4 /* Symlink */ -#define RR_FLAG_NM 8 /* Alternate Name */ -#define RR_FLAG_CL 16 /* Child link */ -#define RR_FLAG_PL 32 /* Parent link */ -#define RR_FLAG_RE 64 /* Relocated Direcotry */ -#define RR_FLAG_TF 128 /* Time stamp */ - -#define RR_FLAG_SP 1024 /* SUSP record */ -#define RR_FLAG_AA 2048 /* Apple Signature record */ -#define RR_FLAG_XA 4096 /* XA signature record */ - -#define RR_FLAG_CE 8192 /* SUSP Continuation aerea */ -#define RR_FLAG_ER 16384 /* Extension record for RR signature */ -#define RR_FLAG_RR 32768 /* RR Signature in every file */ -#define RR_FLAG_ZF 65535 /* Linux compression extension */ - -/* * Inode and device values for special purposes. */ #define PREV_SESS_DEV ((dev_t)-2) @@ -801,9 +823,8 @@ * XXX Eric's wrong comment: * XXX From what I can tell SunOS is the only one with this trouble. */ -#ifdef HAVE_LIMITS_H -#include -#endif +#include + #ifndef NAME_MAX #ifdef FILENAME_MAX #define NAME_MAX FILENAME_MAX @@ -821,6 +842,16 @@ #endif /* + * Cygwin seems to have PATH_MAX == 260 which is less than the usable + * path length. We raise PATH_MAX to at least 1024 for now for all platforms + * unless someone reports problems with mkisofs memory size. + */ +#if PATH_MAX < 1024 +#undef PATH_MAX +#define PATH_MAX 1024 +#endif + +/* * XXX JS: Some structures have odd lengths! * Some compilers (e.g. on Sun3/mc68020) padd the structures to even length. * For this reason, we cannot use sizeof (struct iso_path_table) or @@ -844,8 +875,8 @@ #define memchr(s, c, n) findbytes(s, n, c) #endif #if !defined(HAVE_MEMCPY) && !defined(memcpy) -#define memcpy(s1, s2, n) movebytes(s2, s1, c) +#define memcpy(s1, s2, n) movebytes(s2, s1, n) #endif #if !defined(HAVE_MEMMOVE) && !defined(memmove) -#define memmove(s1, s2, n) movebytes(s2, s1, c) +#define memmove(s1, s2, n) movebytes(s2, s1, n) #endif diff -Nru cdrtools-2.01.01a33/mkisofs/modes.c cdrtools-3.02a09/mkisofs/modes.c --- cdrtools-2.01.01a33/mkisofs/modes.c 2006-09-13 15:35:12.000000000 +0000 +++ cdrtools-3.02a09/mkisofs/modes.c 1970-01-01 00:00:00.000000000 +0000 @@ -1,296 +0,0 @@ -/* @(#)modes.c 1.26 06/09/13 Copyright 1988, 1997-2001, 2004 J. Schilling */ -#ifndef lint -static char sccsid[] = - "@(#)modes.c 1.26 06/09/13 Copyright 1988, 1997-2001, 2004 J. Schilling"; -#endif -/* - * SCSI mode page handling - * - * Copyright (c) 1988, 1997-2001, 2004 J. Schilling - */ -/* - * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. - * - * See the file CDDL.Schily.txt in this distribution for details. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file CDDL.Schily.txt from this distribution. - */ - -#include -#include -#include -#include -#include -#include -#include - -#include "cdrecord.h" - -EXPORT int scsi_compliant; - -LOCAL BOOL has_mode_page __PR((SCSI *scgp, int page, char *pagename, int *lenp)); -EXPORT BOOL get_mode_params __PR((SCSI *scgp, int page, char *pagename, - Uchar *modep, Uchar *cmodep, - Uchar *dmodep, Uchar *smodep, - int *lenp)); -EXPORT BOOL set_mode_params __PR((SCSI *scgp, char *pagename, Uchar *modep, - int len, int save, int secsize)); - -#define XXX - -#ifdef XXX -LOCAL BOOL -has_mode_page(scgp, page, pagename, lenp) - SCSI *scgp; - int page; - char *pagename; - int *lenp; -{ - Uchar mode[0x100]; - int hdlen; - int len = 1; /* Nach SCSI Norm */ - int try = 0; - struct scsi_mode_page_header *mp; - - /* - * ATAPI drives (used e.g. by IOMEGA) from y2k have the worst firmware - * I've seen. They create DMA buffer overruns if we request less than - * 3 bytes with 6 byte mode sense which equals 4 byte with 10 byte mode - * sense. In order to prevent repeated bus resets, we remember this - * bug. - * - * IOMEGA claims that they are using Philips clone drives but a Philips - * drive I own does not have the problem. - */ - if ((scgp->dflags & DRF_MODE_DMA_OVR) != 0) - len = sizeof (struct scsi_mode_header); -again: - fillbytes((caddr_t)mode, sizeof (mode), '\0'); - if (lenp) - *lenp = 0; - - scgp->silent++; - (void) unit_ready(scgp); -/* Maxoptix bringt Aborted cmd 0x0B mit code 0x4E (overlapping cmds)*/ - - /* - * The Matsushita CW-7502 will sometimes deliver a zeroed - * mode page 2A if "Page n default" is used instead of "current". - */ - if (mode_sense(scgp, mode, len, page, 0) < 0) { /* Page n current */ - scgp->silent--; - if (len < (int)sizeof (struct scsi_mode_header) && try == 0) { - len = sizeof (struct scsi_mode_header); - goto again; - } - return (FALSE); - } else { - if (len > 1 && try == 0) { - /* - * If we come here, we got a hard failure with the - * fist try. Remember this (IOMEGA USB) firmware bug. - */ - if ((scgp->dflags & DRF_MODE_DMA_OVR) == 0) { - /* XXX if (!nowarn) */ - errmsgno(EX_BAD, - "Warning: controller creates hard SCSI failure when retrieving %s page.\n", - pagename); - scgp->dflags |= DRF_MODE_DMA_OVR; - } - } - len = ((struct scsi_mode_header *)mode)->sense_data_len + 1; - } - /* - * ATAPI drives as used by IOMEGA may receive a SCSI bus device reset - * in between these two mode sense commands. - */ - (void) unit_ready(scgp); - if (mode_sense(scgp, mode, len, page, 0) < 0) { /* Page n current */ - scgp->silent--; - return (FALSE); - } - scgp->silent--; - - if (scgp->verbose) - scg_prbytes("Mode Sense Data", mode, len - scg_getresid(scgp)); - hdlen = sizeof (struct scsi_mode_header) + - ((struct scsi_mode_header *)mode)->blockdesc_len; - mp = (struct scsi_mode_page_header *)(mode + hdlen); - if (scgp->verbose) - scg_prbytes("Mode Page Data", (Uchar *)mp, mp->p_len+2); - - if (mp->p_len == 0) { - if (!scsi_compliant && try == 0) { - len = hdlen; - /* - * add sizeof page header (page # + len byte) - * (should normaly result in len == 14) - * this allowes to work with: - * Quantum Q210S (wants at least 13) - * MD2x (wants at least 4) - */ - len += 2; - try++; - goto again; - } - /* XXX if (!nowarn) */ - errmsgno(EX_BAD, - "Warning: controller returns zero sized %s page.\n", - pagename); - } - if (!scsi_compliant && - (len < (int)(mp->p_len + hdlen + 2))) { - len = mp->p_len + hdlen + 2; - - /* XXX if (!nowarn) */ - errmsgno(EX_BAD, - "Warning: controller returns wrong size for %s page.\n", - pagename); - } - if (mp->p_code != page) { - /* XXX if (!nowarn) */ - errmsgno(EX_BAD, - "Warning: controller returns wrong page %X for %s page (%X).\n", - mp->p_code, pagename, page); - return (FALSE); - } - - if (lenp) - *lenp = len; - return (mp->p_len > 0); -} -#endif - -EXPORT BOOL -get_mode_params(scgp, page, pagename, modep, cmodep, dmodep, smodep, lenp) - SCSI *scgp; - int page; - char *pagename; - Uchar *modep; - Uchar *cmodep; - Uchar *dmodep; - Uchar *smodep; - int *lenp; -{ - int len; - BOOL ret = TRUE; - -#ifdef XXX - if (lenp) - *lenp = 0; - if (!has_mode_page(scgp, page, pagename, &len)) { - if (!scgp->silent) errmsgno(EX_BAD, - "Warning: controller does not support %s page.\n", - pagename); - return (FALSE); - } - if (lenp) - *lenp = len; -#else - if (lenp == 0) - len = 0xFF; -#endif - - if (modep) { - fillbytes(modep, 0x100, '\0'); - scgp->silent++; - (void) unit_ready(scgp); - scgp->silent--; - if (mode_sense(scgp, modep, len, page, 0) < 0) { /* Page x current */ - errmsgno(EX_BAD, "Cannot get %s data.\n", pagename); - ret = FALSE; - } else if (scgp->verbose) { - scg_prbytes("Mode Sense Data", modep, len - scg_getresid(scgp)); - } - } - - if (cmodep) { - fillbytes(cmodep, 0x100, '\0'); - scgp->silent++; - (void) unit_ready(scgp); - scgp->silent--; - if (mode_sense(scgp, cmodep, len, page, 1) < 0) { /* Page x change */ - errmsgno(EX_BAD, "Cannot get %s mask.\n", pagename); - ret = FALSE; - } else if (scgp->verbose) { - scg_prbytes("Mode Sense Data", cmodep, len - scg_getresid(scgp)); - } - } - - if (dmodep) { - fillbytes(dmodep, 0x100, '\0'); - scgp->silent++; - (void) unit_ready(scgp); - scgp->silent--; - if (mode_sense(scgp, dmodep, len, page, 2) < 0) { /* Page x default */ - errmsgno(EX_BAD, "Cannot get default %s data.\n", - pagename); - ret = FALSE; - } else if (scgp->verbose) { - scg_prbytes("Mode Sense Data", dmodep, len - scg_getresid(scgp)); - } - } - - if (smodep) { - fillbytes(smodep, 0x100, '\0'); - scgp->silent++; - (void) unit_ready(scgp); - scgp->silent--; - if (mode_sense(scgp, smodep, len, page, 3) < 0) { /* Page x saved */ - errmsgno(EX_BAD, "Cannot get saved %s data.\n", pagename); - ret = FALSE; - } else if (scgp->verbose) { - scg_prbytes("Mode Sense Data", smodep, len - scg_getresid(scgp)); - } - } - - return (ret); -} - -EXPORT BOOL -set_mode_params(scgp, pagename, modep, len, save, secsize) - SCSI *scgp; - char *pagename; - Uchar *modep; - int len; - int save; - int secsize; -{ - int i; - - ((struct scsi_modesel_header *)modep)->sense_data_len = 0; - ((struct scsi_modesel_header *)modep)->res2 = 0; - - i = ((struct scsi_mode_header *)modep)->blockdesc_len; - if (i > 0) { - i_to_3_byte( - ((struct scsi_mode_data *)modep)->blockdesc.nlblock, - 0); - if (secsize >= 0) - i_to_3_byte(((struct scsi_mode_data *)modep)->blockdesc.lblen, - secsize); - } - - scgp->silent++; - (void) unit_ready(scgp); - scgp->silent--; - if (save == 0 || mode_select(scgp, modep, len, save, scgp->inq->data_format >= 2) < 0) { - scgp->silent++; - (void) unit_ready(scgp); - scgp->silent--; - if (mode_select(scgp, modep, len, 0, scgp->inq->data_format >= 2) < 0) { - if (scgp->silent == 0) { - errmsgno(EX_BAD, - "Warning: using default %s data.\n", - pagename); - scg_prbytes("Mode Select Data", modep, len); - } - return (FALSE); - } - } - return (TRUE); -} diff -Nru cdrtools-2.01.01a33/mkisofs/multi.c cdrtools-3.02a09/mkisofs/multi.c --- cdrtools-2.01.01a33/mkisofs/multi.c 2007-07-25 22:48:02.000000000 +0000 +++ cdrtools-3.02a09/mkisofs/multi.c 2016-01-05 23:37:52.000000000 +0000 @@ -1,14 +1,15 @@ -/* @(#)multi.c 1.82 07/07/26 joerg */ +/* @(#)multi.c 1.104 16/01/06 joerg */ +#include #ifndef lint -static char sccsid[] = - "@(#)multi.c 1.82 07/07/26 joerg"; +static UConst char sccsid[] = + "@(#)multi.c 1.104 16/01/06 joerg"; #endif /* * File multi.c - scan existing iso9660 image and merge into * iso9660 filesystem. Used for multisession support. * * Written by Eric Youngdale (1996). - * Copyright (c) 1999-2007 J. Schilling + * Copyright (c) 1999-2016 J. Schilling * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -25,13 +26,13 @@ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -#include #include "mkisofs.h" +#include "rock.h" #include #include #include #include -#include /* Needed for printasc() */ +#include /* Needed for printasc() */ #ifdef VMS @@ -70,18 +71,29 @@ struct directory_entry *current, struct stat *statbuf, struct stat *lstatbuf)); +LOCAL BOOL valid_iso_directory __PR((struct iso_directory_record *idr, + int idr_off, + size_t space_left)); LOCAL struct directory_entry ** read_merging_directory __PR((struct iso_directory_record *, int *)); LOCAL int free_mdinfo __PR((struct directory_entry **, int len)); -LOCAL void free_directory_entry __PR((struct directory_entry * dirp)); +LOCAL void free_directory_entry __PR((struct directory_entry *dirp)); +LOCAL int iso_dir_ents __PR((struct directory_entry *de)); +LOCAL void copy_mult_extent __PR((struct directory_entry *se1, + struct directory_entry *se2)); LOCAL void merge_remaining_entries __PR((struct directory *, struct directory_entry **, int)); LOCAL int merge_old_directory_into_tree __PR((struct directory_entry *, struct directory *)); -LOCAL void check_rr_relocation __PR((struct directory_entry * de)); +LOCAL void check_rr_relocation __PR((struct directory_entry *de)); FILE *in_image = NULL; +BOOL ignerr = FALSE; +int su_version = -1; +int rr_version = -1; +int aa_version = -1; +char er_id[256]; #ifndef USE_SCG /* @@ -111,12 +123,12 @@ { int f = fileno(in_image); - if (lseek(f, (off_t) startsecno * SECTOR_SIZE, SEEK_SET) == (off_t) - 1) { - comerr(" Seek error on old image\n"); + if (lseek(f, (off_t)startsecno * SECTOR_SIZE, SEEK_SET) == (off_t)-1) { + comerr(_("Seek error on old image\n")); } if (read(f, buffer, (sectorcount * SECTOR_SIZE)) != (sectorcount * SECTOR_SIZE)) { - comerr(" Read error on old image\n"); + comerr(_("Read error on old image\n")); } return (sectorcount * SECTOR_SIZE); } @@ -176,7 +188,7 @@ *lenp = len; if (!did_xa) { did_xa = 1; - errmsgno(EX_BAD, "Found XA directory extension record.\n"); + errmsgno(EX_BAD, _("Found XA directory extension record.\n")); } } else if (pnt[2] == 0) { char *cp = NULL; @@ -190,16 +202,16 @@ printasc("XA REC:", pnt, len); } if (no_rr == 0) { - errmsgno(EX_BAD, "Disabling RR / XA / AA.\n"); + errmsgno(EX_BAD, _("Disabling RR / XA / AA.\n")); no_rr = 1; } *lenp = 0; if (cp) { - errmsgno(EX_BAD, "Problems with old ISO directory entry for file: '%s'.\n", &cp[33]); + errmsgno(EX_BAD, _("Problems with old ISO directory entry for file: '%s'.\n"), &cp[33]); } - errmsgno(EX_BAD, "Illegal extended directory attributes found (bad XA disk?).\n"); -/* errmsgno(EX_BAD, "Disabling Rock Ridge for old session.\n");*/ - comerrno(EX_BAD, "Try again using the -no-rr option.\n"); + errmsgno(EX_BAD, _("Illegal extended directory attributes found (bad XA disk?).\n")); +/* errmsgno(EX_BAD, _("Disabling Rock Ridge for old session.\n"));*/ + comerrno(EX_BAD, _("Try again using the -no-rr option.\n")); } } if (len >= 4 && pnt[3] != 1 && pnt[3] != 2) { @@ -264,41 +276,56 @@ cont_extent = cont_offset = cont_size = 0; ncount = 0; - flag1 = flag2 = 0; + flag1 = -1; + flag2 = 0; while (len >= 4) { if (pnt[3] != 1 && pnt[3] != 2) { errmsgno(EX_BAD, - "**BAD RRVERSION (%d) for %c%c\n", - pnt[3], pnt[0], pnt[1]); + _("**BAD RRVERSION (%d) in '%c%c' field (%2.2X %2.2X).\n"), + pnt[3], pnt[0], pnt[1], pnt[0], pnt[1]); + return (0); /* JS ??? Is this right ??? */ + } + if (pnt[2] < 4) { + errmsgno(EX_BAD, + _("**BAD RRLEN (%d) in '%2.2s' field %2.2X %2.2X.\n"), + pnt[2], pnt, pnt[0], pnt[1]); return (0); /* JS ??? Is this right ??? */ } ncount++; if (pnt[0] == 'R' && pnt[1] == 'R') flag1 = pnt[4] & 0xff; - if (strncmp((char *) pnt, "PX", 2) == 0) /* POSIX attributes */ - flag2 |= 1; - if (strncmp((char *) pnt, "PN", 2) == 0) /* POSIX device number */ - flag2 |= 2; - if (strncmp((char *) pnt, "SL", 2) == 0) /* Symlink */ - flag2 |= 4; - if (strncmp((char *) pnt, "NM", 2) == 0) /* Alternate Name */ - flag2 |= 8; - if (strncmp((char *) pnt, "CL", 2) == 0) /* Child link */ - flag2 |= 16; - if (strncmp((char *) pnt, "PL", 2) == 0) /* Parent link */ - flag2 |= 32; - if (strncmp((char *) pnt, "RE", 2) == 0) /* Relocated Direcotry */ - flag2 |= 64; - if (strncmp((char *) pnt, "TF", 2) == 0) /* Time stamp */ - flag2 |= 128; - if (strncmp((char *) pnt, "SP", 2) == 0) { /* SUSP record */ - flag2 |= 1024; -/* su_version = pnt[3] & 0xff;*/ - } - if (strncmp((char *) pnt, "AA", 2) == 0) { /* Apple Signature record */ - flag2 |= 2048; -/* aa_version = pnt[3] & 0xff;*/ + if (strncmp((char *)pnt, "PX", 2) == 0) /* POSIX attributes */ + flag2 |= RR_FLAG_PX; + if (strncmp((char *)pnt, "PN", 2) == 0) /* POSIX device number */ + flag2 |= RR_FLAG_PN; + if (strncmp((char *)pnt, "SL", 2) == 0) /* Symlink */ + flag2 |= RR_FLAG_SL; + if (strncmp((char *)pnt, "NM", 2) == 0) /* Alternate Name */ + flag2 |= RR_FLAG_NM; + if (strncmp((char *)pnt, "CL", 2) == 0) /* Child link */ + flag2 |= RR_FLAG_CL; + if (strncmp((char *)pnt, "PL", 2) == 0) /* Parent link */ + flag2 |= RR_FLAG_PL; + if (strncmp((char *)pnt, "RE", 2) == 0) /* Relocated Direcotry */ + flag2 |= RR_FLAG_RE; + if (strncmp((char *)pnt, "TF", 2) == 0) /* Time stamp */ + flag2 |= RR_FLAG_TF; + if (strncmp((char *)pnt, "SP", 2) == 0) { /* SUSP record */ + flag2 |= RR_FLAG_SP; + if (su_version < 0) + su_version = pnt[3] & 0xff; + } + if (strncmp((char *)pnt, "AA", 2) == 0) { /* Apple Signature record */ + flag2 |= RR_FLAG_AA; + if (aa_version < 0) + aa_version = pnt[3] & 0xff; + } + if (strncmp((char *)pnt, "ER", 2) == 0) { + flag2 |= RR_FLAG_ER; /* ER record */ + if (rr_version < 0) + rr_version = pnt[7] & 0xff; /* Ext Version */ + strlcpy(er_id, (char *)&pnt[8], (pnt[4] & 0xFF) + 1); } if (strncmp((char *)pnt, "CE", 2) == 0) { /* Continuation Area */ @@ -306,15 +333,18 @@ cont_offset = get_733(pnt+12); cont_size = get_733(pnt+20); } + if (strncmp((char *)pnt, "ST", 2) == 0) { /* Terminate SUSP */ + break; + } len -= pnt[2]; pnt += pnt[2]; - if (len <= 3 && cont_extent) { - unsigned char sector[SECTOR_SIZE]; + } + if (cont_extent) { + unsigned char sector[SECTOR_SIZE]; - readsecs(cont_extent, sector, 1); - flag2 |= parse_rrflags(§or[cont_offset], cont_size, 1); - } + readsecs(cont_extent, sector, 1); + flag2 |= parse_rrflags(§or[cont_offset], cont_size, 1); } return (flag2); } @@ -328,7 +358,7 @@ int ret = 0; if (find_rr(idr, &pnt, &len)) - ret |= 4096; + ret |= RR_FLAG_XA; ret |= parse_rrflags(pnt, len, 0); return (ret); } @@ -354,12 +384,18 @@ while (len >= 4) { if (pnt[3] != 1 && pnt[3] != 2) { errmsgno(EX_BAD, - "**BAD RRVERSION (%d) for %c%c\n", - pnt[3], pnt[0], pnt[1]); + _("**BAD RRVERSION (%d) in '%c%c' field (%2.2X %2.2X).\n"), + pnt[3], pnt[0], pnt[1], pnt[0], pnt[1]); + return (-1); + } + if (pnt[2] < 4) { + errmsgno(EX_BAD, + _("**BAD RRLEN (%d) in '%2.2s' field %2.2X %2.2X.\n"), + pnt[2], pnt, pnt[0], pnt[1]); return (-1); } - if (strncmp((char *) pnt, "NM", 2) == 0) { - strncpy(name_buf, (char *) pnt + 5, pnt[2] - 5); + if (strncmp((char *)pnt, "NM", 2) == 0) { + strncpy(name_buf, (char *)pnt + 5, pnt[2] - 5); name_buf[pnt[2] - 5] = 0; if (dpnt->name) { size_t nlen = strlen(dpnt->name); @@ -371,26 +407,27 @@ strlen(name_buf) + 1); strcpy(dpnt->name + nlen, name_buf); } else { - dpnt->name = strdup(name_buf); + dpnt->name = e_strdup(name_buf); dpnt->got_rr_name = 1; } /* continue searching for more NM records */ - } else if (strncmp((char *) pnt, "CE", 2) == 0) { + } else if (strncmp((char *)pnt, "CE", 2) == 0) { cont_extent = get_733(pnt + 4); cont_offset = get_733(pnt + 12); cont_size = get_733(pnt + 20); + } else if (strncmp((char *)pnt, "ST", 2) == 0) { + break; } len -= pnt[2]; pnt += pnt[2]; - if (len <= 3 && cont_extent) { - unsigned char sector[SECTOR_SIZE]; + } + if (cont_extent) { + unsigned char sector[SECTOR_SIZE]; - readsecs(cont_extent, sector, 1); - if (parse_rr(§or[cont_offset], - cont_size, dpnt) == -1) - return (-1); - } + readsecs(cont_extent, sector, 1); + if (parse_rr(§or[cont_offset], cont_size, dpnt) == -1) + return (-1); } /* Fall back to the iso name if no RR name found */ @@ -402,7 +439,7 @@ if (cp != NULL) { *cp = '\0'; } - dpnt->name = strdup(name_buf); + dpnt->name = e_strdup(name_buf); } return (0); } /* parse_rr */ @@ -445,8 +482,14 @@ while (len >= 4) { if (pnt[3] != 1 && pnt[3] != 2) { errmsgno(EX_BAD, - "**BAD RRVERSION (%d) for %c%c\n", - pnt[3], pnt[0], pnt[1]); + _("**BAD RRVERSION (%d) in '%c%c' field (%2.2X %2.2X).\n"), + pnt[3], pnt[0], pnt[1], pnt[0], pnt[1]); + return (-1); + } + if (pnt[2] < 4) { + errmsgno(EX_BAD, + _("**BAD RRLEN (%d) in '%2.2s' field %2.2X %2.2X.\n"), + pnt[2], pnt, pnt[0], pnt[1]); return (-1); } @@ -455,56 +498,59 @@ * the same. If it isn't, then we must always write the new * file. */ - if (strncmp((char *) pnt, "PX", 2) == 0) { + if (strncmp((char *)pnt, "PX", 2) == 0) { mode = get_733(pnt + 4); if ((lstatbuf->st_mode & S_IFMT) != (mode & S_IFMT)) { same_file_type = 0; same_file = 0; } } - if (strncmp((char *) pnt, "TF", 2) == 0) { + if (strncmp((char *)pnt, "TF", 2) == 0) { offset = 5; if (pnt[4] & TF_CREATE) { - iso9660_date((char *) time_buf, + iso9660_date((char *)time_buf, lstatbuf->st_ctime); if (memcmp(time_buf, pnt + offset, 7) != 0) same_file = 0; offset += 7; } if (pnt[4] & TF_MODIFY) { - iso9660_date((char *) time_buf, + iso9660_date((char *)time_buf, lstatbuf->st_mtime); if (memcmp(time_buf, pnt + offset, 7) != 0) same_file = 0; offset += 7; } } - if (strncmp((char *) pnt, "CE", 2) == 0) { + if (strncmp((char *)pnt, "CE", 2) == 0) { cont_extent = get_733(pnt + 4); cont_offset = get_733(pnt + 12); cont_size = get_733(pnt + 20); } + if (strncmp((char *)pnt, "ST", 2) == 0) { /* Terminate SUSP */ + break; + } len -= pnt[2]; pnt += pnt[2]; - if (len <= 3 && cont_extent) { - unsigned char sector[SECTOR_SIZE]; + } + if (cont_extent) { + unsigned char sector[SECTOR_SIZE]; - readsecs(cont_extent, sector, 1); - /* - * Continue to scan the extension record. - * Note that this has not been tested yet, but it is - * definitely more correct that calling parse_rr() - * as done in Eric's old code. - */ - pnt = §or[cont_offset]; - len = cont_size; - /* - * Clear the "pending extension record" state as - * we did already read it now. - */ - cont_extent = cont_offset = cont_size = 0; - } + readsecs(cont_extent, sector, 1); + /* + * Continue to scan the extension record. + * Note that this has not been tested yet, but it is + * definitely more correct that calling parse_rr() + * as done in Eric's old code. + */ + pnt = §or[cont_offset]; + len = cont_size; + /* + * Clear the "pending extension record" state as + * we did already read it now. + */ + cont_extent = cont_offset = cont_size = 0; } /* @@ -517,6 +563,103 @@ return (same_file); } +LOCAL BOOL +valid_iso_directory(idr, idr_off, space_left) + struct iso_directory_record *idr; + int idr_off; + size_t space_left; +{ + size_t idr_length = idr->length[0] & 0xFF; + size_t idr_ext_length = idr->ext_attr_length[0] & 0xFF; + size_t idr_namelength = idr->name_len[0] & 0xFF; + int namelimit = space_left - + offsetof(struct iso_directory_record, name[0]); + int nlimit = (idr_namelength < namelimit) ? + idr_namelength : namelimit; + + /* + * Check for sane length entries. + */ + if (idr_length > space_left) { + comerrno(EX_BAD, + _("Bad directory length %zu (> %d available) for '%.*s'.\n"), + idr_length, namelimit, nlimit, idr->name); + } + + if (idr_length == 0) { + if ((idr_off % SECTOR_SIZE) != 0) { + /* + * It marks a valid continuation entry. + */ + return (TRUE); + } else { + comerrno(EX_BAD, + _("Zero directory length for '%.*s'.\n"), + nlimit, idr->name); + } + } + if (idr_length <= offsetof(struct iso_directory_record, name[0])) { + comerrno(EX_BAD, _("Bad directory length %zu (< %zu minimum).\n"), + idr_length, 1 + offsetof(struct iso_directory_record, name[0])); + } + if ((idr_length & 1) != 0) { + comerrno(EX_BAD, _("Odd directory length %zu for '%.*s'.\n"), + idr_length, nlimit, idr->name); + } + + if (idr_namelength == 0) { + comerrno(EX_BAD, _("Zero filename length.\n")); + } + + if (!(idr_namelength & 1)) { + /* + * if nam_len[0] is even, there has to be a pad byte at the end + * to make the directory length even + */ + idr_namelength++; + } + if ((offsetof(struct iso_directory_record, name[0]) + + idr_namelength) > idr_length) { + int xlimit = idr_length - + offsetof(struct iso_directory_record, name[0]) - + idr_ext_length; + + if (xlimit < 0) + xlimit = 0; + if (nlimit < xlimit) + xlimit = nlimit; + comerrno(EX_BAD, _("Bad filename length %zu (> %d) for '%.*s'.\n"), + idr_namelength, xlimit, xlimit, idr->name); + } + if ((offsetof(struct iso_directory_record, name[0]) + + idr_namelength + idr_ext_length) > idr_length) { + int xlimit = idr_length - + offsetof(struct iso_directory_record, name[0]) - + idr_namelength; + + comerrno(EX_BAD, _("Bad extended attribute length %zu (> %d) for '%.*s'.\n"), + idr_ext_length, xlimit, nlimit, idr->name); + } + +#ifdef __do_rr_ + /* check for rock ridge extensions */ + + if (no_rr) { + /* + * Rock Ridge extensions are not present or manually disabled. + */ + return (TRUE); + } else { + int rlen = idr_length - + offsetof(struct iso_directory_record, name[0]) - + idr_namelength; + + /* Check for the minimum of Rock Ridge extensions. */ + } +#endif + return (TRUE); +} + LOCAL struct directory_entry ** read_merging_directory(mrootp, nentp) struct iso_directory_record *mrootp; @@ -531,6 +674,8 @@ UInt32_t len; UInt32_t nbytes; int nent; + int nmult; /* # of multi extent root entries */ + int mx; struct directory_entry **pnt; UInt32_t rlen; struct directory_entry **rtn; @@ -552,7 +697,7 @@ * First, allocate a buffer large enough to read in the entire * directory. */ - dirbuff = (char *) e_malloc(nbytes); + dirbuff = (char *)e_malloc(nbytes); readsecs(get_733(mrootp->extent), dirbuff, nbytes / SECTOR_SIZE); @@ -563,21 +708,33 @@ i = 0; *nentp = 0; nent = 0; - while (i < len) { - idr = (struct iso_directory_record *) & dirbuff[i]; + nmult = 0; + mx = 0; + while ((i + offsetof(struct iso_directory_record, name[0])) < len) { + idr = (struct iso_directory_record *)&dirbuff[i]; + + if (!valid_iso_directory(idr, i, len - i)) + break; + if (idr->length[0] == 0) { i = ISO_ROUND_UP(i); continue; } nent++; + if ((mx & ISO_MULTIEXTENT) == 0 && + (idr->flags[0] & ISO_MULTIEXTENT) != 0) { + nmult++; /* Need a multi extent root entry */ + } + mx = idr->flags[0]; i += idr->length[0]; } /* * Now allocate the buffer which will hold the array we are about to - * return. + * return. We need one entry per real directory entry and in addition + * one multi-extent root entry per multi-extent file. */ - rtn = (struct directory_entry **) e_malloc(nent * sizeof (*rtn)); + rtn = (struct directory_entry **)e_malloc((nent+nmult) * sizeof (*rtn)); /* * Finally, scan the directory one last time, and pick out the relevant @@ -589,17 +746,18 @@ tt_extent = 0; seen_rockridge = 0; tt_size = 0; - while (i < len) { - idr = (struct iso_directory_record *) & dirbuff[i]; - if ((i + (idr->length[0] & 0xFF)) > len) { - comerrno(EX_BAD, "Bad directory length for '%.*s'.\n", - idr->name_len[0] & 0xFF, idr->name); - } + mx = 0; + while ((i + offsetof(struct iso_directory_record, name[0])) < len) { + idr = (struct iso_directory_record *)&dirbuff[i]; + + if (!valid_iso_directory(idr, i, len - i)) + break; + if (idr->length[0] == 0) { i = ISO_ROUND_UP(i); continue; } - *pnt = (struct directory_entry *) e_malloc(sizeof (**rtn)); + *pnt = (struct directory_entry *)e_malloc(sizeof (**rtn)); (*pnt)->next = NULL; #ifdef DEBUG error("IDR name: '%s' ist: %d soll: %d\n", @@ -693,7 +851,7 @@ /* * If the filename len from the old session is more * then 31 chars, there is a high risk of hard violations - * if the ISO9660 standard. + * of the ISO9660 standard. * Run it through our name canonication machine.... */ if (idr->name_len[0] > LEN_ISONAME || check_oldnames) { @@ -702,7 +860,7 @@ if (parse_rr((*pnt)->rr_attributes, rlen, *pnt) == -1) { comerrno(EX_BAD, - "Cannot parse Rock Ridge attributes for '%s'.\n", + _("Cannot parse Rock Ridge attributes for '%s'.\n"), idr->name); } if (((*pnt)->isorec.name_len[0] == 1) && @@ -716,9 +874,9 @@ free((*pnt)->whole_name); } if ((*pnt)->isorec.name[0] == 0) { - (*pnt)->name = strdup("."); + (*pnt)->name = e_strdup("."); } else { - (*pnt)->name = strdup(".."); + (*pnt)->name = e_strdup(".."); } } #ifdef DEBUG @@ -732,14 +890,63 @@ if ((*pnt)->whole_name != NULL) { free((*pnt)->whole_name); } -/* (*pnt)->name = strdup("");*/ - (*pnt)->name = strdup(trans_tbl); +/* (*pnt)->name = e_strdup("");*/ + (*pnt)->name = e_strdup(trans_tbl); tt_extent = get_733(idr->extent); tt_size = get_733(idr->size); if (tt_extent == 0) tt_size = 0; } + /* + * The beginning of a new multi extent directory chain is when + * the last directory had no ISO_MULTIEXTENT flag set and the + * current entry did set ISO_MULTIEXTENT. + */ + if ((mx & ISO_MULTIEXTENT) == 0 && + (idr->flags[0] & ISO_MULTIEXTENT) != 0) { + struct directory_entry *s_entry; + struct iso_directory_record *idr2 = idr; + int i2 = i; + off_t tsize = 0; + + /* + * Sum up the total file size for the multi extent file + */ + while ((i2 + offsetof(struct iso_directory_record, name[0])) < len) { + idr2 = (struct iso_directory_record *)&dirbuff[i2]; + if (idr2->length[0] == 0) { + i2 = ISO_ROUND_UP(i2); + continue; + } + + tsize += get_733(idr2->size); + if ((idr2->flags[0] & ISO_MULTIEXTENT) == 0) + break; + i2 += idr2->length[0]; + } + + s_entry = dup_directory_entry(*pnt); /* dup first for mxroot */ + s_entry->de_flags |= MULTI_EXTENT; + s_entry->de_flags |= INHIBIT_ISO9660_ENTRY|INHIBIT_JOLIET_ENTRY; + s_entry->size = tsize; + s_entry->starting_block = (*pnt)->starting_block; + s_entry->mxroot = s_entry; + s_entry->mxpart = 0; + s_entry->next = *pnt; /* Next in list */ + pnt[1] = pnt[0]; /* Move to next slot */ + *pnt = s_entry; /* First slot is mxroot */ + pnt++; /* Point again to cur. */ + } + if ((mx & ISO_MULTIEXTENT) != 0 || + (idr->flags[0] & ISO_MULTIEXTENT) != 0) { + (*pnt)->de_flags |= MULTI_EXTENT; + (*pnt)->de_flags |= INHIBIT_UDF_ENTRY; + (pnt[-1])->next = *pnt; + (*pnt)->mxroot = (pnt[-1])->mxroot; + (*pnt)->mxpart = (pnt[-1])->mxpart + 1; + } pnt++; + mx = idr->flags[0]; i += idr->length[0]; } #ifdef APPLE_HYB @@ -832,7 +1039,7 @@ * Now actually compare the name, and make sure * that the character at the end is a ' '. */ - if (strncmp((char *) cpnt + 2, + if (strncmp((char *)cpnt + 2, (*pnt)->isorec.name, rlen) == 0 && cpnt[2 + rlen] == ' ' && (p = strchr((char *)&cpnt[2 + rlen], '\t'))) { @@ -853,7 +1060,7 @@ if ((*pnt)->name != NULL) { free((*pnt)->name); } - (*pnt)->name = strdup(p); + (*pnt)->name = e_strdup(p); } break; } @@ -870,17 +1077,17 @@ * found. */ fprintf(stderr, - "Warning: Neither Rock Ridge (-R) nor TRANS.TBL (-T) \n"); + _("Warning: Neither Rock Ridge (-R) nor TRANS.TBL (-T) \n")); fprintf(stderr, - "name translations were found on previous session.\n"); + _("name translations were found on previous session.\n")); fprintf(stderr, - "ISO-9660 file names have been used instead.\n"); + _("ISO-9660 file names have been used instead.\n")); warning_given = 1; } if (dirbuff != NULL) { free(dirbuff); } - *nentp = nent; + *nentp = nent + nmult; return (rtn); } /* read_merging_directory */ @@ -947,7 +1154,7 @@ { int i; int rr; - int retcode = 0; /* Default not found */ + int retcode = -2; /* Default not found */ for (i = 0; i < len; i++) { if (ptr[i] == NULL) { /* Used or empty entry skip */ @@ -982,7 +1189,7 @@ * in tree.c for an explaination of why this must be the case. */ if ((curr_entry->isorec.flags[0] & ISO_DIRECTORY) != 0) { - retcode = 2; /* Flag directory case */ + retcode = i; goto found_it; } /* @@ -995,7 +1202,7 @@ * we probably have a different file, and we need to write it * out again. */ - retcode = 1; /* We found a non directory */ + retcode = i; if (ptr[i]->rr_attributes != NULL) { if ((rr = check_rr_dates(ptr[i], curr_entry, statbuf, @@ -1024,11 +1231,24 @@ memcpy(curr_entry->isorec.extent, ptr[i]->isorec.extent, 8); curr_entry->starting_block = get_733(ptr[i]->isorec.extent); curr_entry->de_flags |= SAFE_TO_REUSE_TABLE_ENTRY; + + if ((curr_entry->isorec.flags[0] & ISO_MULTIEXTENT) || + (ptr[i]->isorec.flags[0] & ISO_MULTIEXTENT)) { + copy_mult_extent(curr_entry, ptr[i]); + } goto found_it; } return (retcode); found_it: + if (ptr[i]->mxroot == ptr[i]) { /* Remove all multi ext. entries */ + int j = i + 1; /* First one will be removed below */ + + while (j < len && ptr[j] && ptr[j]->mxroot == ptr[i]) { + free(ptr[j]); + ptr[j++] = NULL; + } + } if (odpnt != NULL) { *odpnt = ptr[i]; } else { @@ -1039,6 +1259,106 @@ } /* + * Return the number of directory entries for a file. This is usually 1 + * but may be 3 or more in case of multi extent files. + */ +LOCAL int +iso_dir_ents(de) + struct directory_entry *de; +{ + struct directory_entry *de2; + int ret = 0; + + if (de->mxroot == NULL) + return (1); + de2 = de; + while (de2 != NULL && de2->mxroot == de->mxroot) { + ret++; + de2 = de2->next; + } + return (ret); +} + +/* + * Copy old multi-extent directory information from the previous session. + * If both the old session and the current session are created by mkisofs + * then this code could be extremely simple as the information is only copied + * in case that the file did not change since the last session was made. + * As we don't know the other ISO formatter program, any combination of + * multi-extent files and even a single extent file could be possible. + * We need to handle all files the same way ad the old session was created as + * we reuse the data extents from the file in the old session. + */ +LOCAL void +copy_mult_extent(se1, se2) + struct directory_entry *se1; + struct directory_entry *se2; +{ + struct directory_entry *curr_entry = se1; + int len1; + int len2; + int mxpart = 0; + + len1 = iso_dir_ents(se1); + len2 = iso_dir_ents(se2); + + if (len1 == 1) { + /* + * Convert single-extent to multi-extent. + * If *se1 is not multi-extent, *se2 definitely is + * and we need to set up a MULTI_EXTENT directory header. + */ + se1->de_flags |= MULTI_EXTENT; + se1->isorec.flags[0] |= ISO_MULTIEXTENT; + se1->mxroot = curr_entry; + se1->mxpart = 0; + se1 = dup_directory_entry(se1); + curr_entry->de_flags |= INHIBIT_ISO9660_ENTRY|INHIBIT_JOLIET_ENTRY; + se1->de_flags |= INHIBIT_UDF_ENTRY; + se1->next = curr_entry->next; + curr_entry->next = se1; + se1 = curr_entry; + len1 = 2; + } + + while (se2->isorec.flags[0] & ISO_MULTIEXTENT) { + len1--; + len2--; + if (len1 <= 0) { + struct directory_entry *sex = dup_directory_entry(se1); + + sex->mxroot = curr_entry; + sex->next = se1->next; + se1->next = sex; + len1++; + } + memcpy(se1->isorec.extent, se2->isorec.extent, 8); + se1->starting_block = get_733(se2->isorec.extent); + se1->de_flags |= SAFE_TO_REUSE_TABLE_ENTRY; + se1->de_flags |= MULTI_EXTENT; + se1->isorec.flags[0] |= ISO_MULTIEXTENT; + se1->mxroot = curr_entry; + se1->mxpart = mxpart++; + + se1 = se1->next; + se2 = se2->next; + } + memcpy(se1->isorec.extent, se2->isorec.extent, 8); + se1->starting_block = get_733(se2->isorec.extent); + se1->de_flags |= SAFE_TO_REUSE_TABLE_ENTRY; + se1->isorec.flags[0] &= ~ISO_MULTIEXTENT; /* Last entry */ + se1->mxpart = mxpart; + while (len1 > 1) { /* Drop other entries */ + struct directory_entry *sex; + + sex = se1->next; + se1->next = sex->next; + free(sex); + len1--; + } +} + +/* * open_merge_image: Open an existing image. */ int @@ -1100,9 +1420,9 @@ for (i = 0; i < 100; i++) { if (readsecs(file_addr, buffer, sizeof (buffer) / SECTOR_SIZE) != sizeof (buffer)) { - comerr(" Read error on old image %s\n", path); + comerr(_("Read error on old image %s\n"), path); } - vdp = (struct iso_volume_descriptor *) buffer; + vdp = (struct iso_volume_descriptor *)buffer; if ((strncmp(vdp->id, ISO_STANDARD_ID, sizeof (vdp->id)) == 0) && (get_711(vdp->type) == ISO_VD_PRIMARY)) { @@ -1117,18 +1437,18 @@ for (i = 0; i < 2048-3; i++) { sum += p[i] & 0xFF; } - pri = (struct iso_primary_descriptor *) vdp; + pri = (struct iso_primary_descriptor *)vdp; /* Check the blocksize of the image to make sure it is compatible. */ if (get_723(pri->logical_block_size) != SECTOR_SIZE) { errmsgno(EX_BAD, - "Previous session has incompatible sector size %u.\n", + _("Previous session has incompatible sector size %u.\n"), get_723(pri->logical_block_size)); return (NULL); } if (get_723(pri->volume_set_size) != 1) { errmsgno(EX_BAD, - "Previous session has volume set size %u (must be 1).\n", + _("Previous session has volume set size %u (must be 1).\n"), get_723(pri->volume_set_size)); return (NULL); } @@ -1136,12 +1456,13 @@ rootp = (struct iso_directory_record *) e_malloc(sizeof (struct iso_directory_record)); - memcpy(rootp, pri->root_directory_record, sizeof (*rootp)); + memcpy(rootp, pri->root_directory_record, + sizeof (pri->root_directory_record)); for (i = 0; i < 100; i++) { if (readsecs(file_addr, buffer, sizeof (buffer) / SECTOR_SIZE) != sizeof (buffer)) { - comerr(" Read error on old image %s\n", path); + comerr(_("Read error on old image %s\n"), path); } if (strncmp(buffer, "MKI ", 4) == 0) { int sum2; @@ -1152,7 +1473,7 @@ sum2 *= 256; sum2 += p[2047] & 0xFF; if (sum == sum2) { - error("ISO-9660 image includes checksum signature for correct inode numbers.\n"); + error(_("ISO-9660 image includes checksum signature for correct inode numbers.\n")); } else { correct_inodes = FALSE; rrip112 = FALSE; @@ -1192,7 +1513,7 @@ strcat(whole_path, SPATH_SEPARATOR); strcat(whole_path, pnt[i]->name); - pnt[i]->whole_name = strdup(whole_path); + pnt[i]->whole_name = e_strdup(whole_path); } if (pnt[i]->name != NULL && /* strcmp(pnt[i]->name, "") == 0 )*/ @@ -1256,8 +1577,10 @@ if (s_entry->name != NULL && strcmp(s_entry->name, "..") == 0) { continue; } -/* if (strcmp(s_entry->name, "") == 0)*/ - if (strcmp(s_entry->name, trans_tbl) == 0) { +/* if (s_entry->name != NULL &&*/ +/* strcmp(s_entry->name, "") == 0)*/ + if (s_entry->name != NULL && + strcmp(s_entry->name, trans_tbl) == 0) { continue; } if ((s_entry->de_flags & SAFE_TO_REUSE_TABLE_ENTRY) == 0) { @@ -1307,7 +1630,7 @@ *next_brother; char whole_path[PATH_MAX]; - this_dir = (struct directory *) e_malloc(sizeof (struct directory)); + this_dir = (struct directory *)e_malloc(sizeof (struct directory)); memset(this_dir, 0, sizeof (struct directory)); this_dir->next = NULL; this_dir->subdir = NULL; @@ -1327,11 +1650,16 @@ } /* Set the name for this directory. */ - strlcpy(whole_path, parent->de_name, sizeof (whole_path)); - strcat(whole_path, SPATH_SEPARATOR); - strcat(whole_path, dpnt->name); - this_dir->de_name = strdup(whole_path); - this_dir->whole_name = strdup(whole_path); + if (strlcpy(whole_path, parent->de_name, sizeof (whole_path)) >= sizeof (whole_path) || + strlcat(whole_path, SPATH_SEPARATOR, sizeof (whole_path)) >= sizeof (whole_path) || + strlcat(whole_path, dpnt->name, sizeof (whole_path)) >= sizeof (whole_path)) + comerrno(EX_BAD, _("Path name '%s%s%s' exceeds max length %zd\n"), + parent->de_name, + SPATH_SEPARATOR, + dpnt->name, + sizeof (whole_path)); + this_dir->de_name = e_strdup(whole_path); + this_dir->whole_name = e_strdup(whole_path); /* * Now fill this directory using information from the previous session. @@ -1371,11 +1699,16 @@ /* * Set the whole name for this file. */ - strlcpy(whole_path, this_dir->whole_name, sizeof (whole_path)); - strcat(whole_path, SPATH_SEPARATOR); - strcat(whole_path, contents[i]->name); + if (strlcpy(whole_path, this_dir->whole_name, sizeof (whole_path)) >= sizeof (whole_path) || + strlcat(whole_path, SPATH_SEPARATOR, sizeof (whole_path)) >= sizeof (whole_path) || + strlcat(whole_path, contents[i]->name, sizeof (whole_path)) >= sizeof (whole_path)) + comerrno(EX_BAD, _("Path name '%s%s%s' exceeds max length %zd\n"), + this_dir->whole_name, + SPATH_SEPARATOR, + contents[i]->name, + sizeof (whole_path)); - contents[i]->whole_name = strdup(whole_path); + contents[i]->whole_name = e_strdup(whole_path); contents[i]->next = this_dir->contents; contents[i]->filedir = this_dir; @@ -1444,14 +1777,14 @@ if (cdrecord_data == NULL) { comerrno(EX_BAD, - "Special parameters for cdrecord not specified with -C\n"); + _("Special parameters for cdrecord not specified with -C\n")); } /* * Next try and find the ',' in there which delimits the two numbers. */ pnt = strchr(cdrecord_data, ','); if (pnt == NULL) { - comerrno(EX_BAD, "Malformed cdrecord parameters\n"); + comerrno(EX_BAD, _("Malformed cdrecord parameters\n")); } *pnt = '\0'; @@ -1507,7 +1840,7 @@ if (orig_contents == NULL) { if (reloc_old_root) { comerrno(EX_BAD, - "Reading old session failed, cannot execute -old-root.\n"); + _("Reading old session failed, cannot execute -old-root.\n")); } return (0); } @@ -1554,7 +1887,7 @@ if (!new_orig_contents) { comerrno(EX_BAD, - "Reading directory %s in old session failed, cannot execute -old-root.\n", + _("Reading directory %s in old session failed, cannot execute -old-root.\n"), reloc_old_root); } i = -1; @@ -1563,7 +1896,7 @@ if (i == new_n_orig) { comerrno(EX_BAD, - "-old-root (sub)directory %s not found in old session.\n", + _("-old-root (sub)directory %s not found in old session.\n"), reloc_old_root); } @@ -1590,6 +1923,19 @@ &statbuf, &lstatbuf, NULL); if (retcode == -1) return (-1); + /* + * Skip other directory entries for multi-extent files + */ + if (s_entry->de_flags & MULTI_EXTENT) { + struct directory_entry *s_e; + + for (s_e = s_entry->mxroot; + s_e && s_e->mxroot == s_entry->mxroot; + s_e = s_e->next) { + s_entry = s_e; + ; + } + } } merge_remaining_entries(this_dir, orig_contents, n_orig); @@ -1641,14 +1987,14 @@ * The check_prev_session function looks for an identical * entry in the previous session. If we see it, then we copy * the extent number to s_entry, and cross it off the list. - * It returns 2 if it's a directory */ retcode = check_prev_session(orig_contents, n_orig, s_entry, &statbuf, &lstatbuf, &odpnt); if (retcode == -1) return (-1); - if (retcode == 2 && odpnt != NULL) { + if (odpnt != NULL && + (s_entry->isorec.flags[0] & ISO_DIRECTORY) != 0) { int dflag; if (strcmp(s_entry->name, ".") != 0 && @@ -1677,6 +2023,23 @@ odpnt = NULL; } } + if (odpnt) { + free(odpnt); + odpnt = NULL; + } + /* + * Skip other directory entries for multi-extent files + */ + if (s_entry->de_flags & MULTI_EXTENT) { + struct directory_entry *s_e; + + for (s_e = s_entry->mxroot; + s_e && s_e->mxroot == s_entry->mxroot; + s_e = s_e->next) { + s_entry = s_e; + ; + } + } } if (!reloc_old_root) { @@ -1717,9 +2080,17 @@ pnt = parse_xa(pnt, &len, /* dpnt */ 0); while (len >= 4) { if (pnt[3] != 1 && pnt[3] != 2) { - errmsgno(EX_BAD, "**BAD RRVERSION (%d) for %c%c\n", pnt[3], pnt[0], pnt[1]); + errmsgno(EX_BAD, + _("**BAD RRVERSION (%d) in '%c%c' field (%2.2X %2.2X).\n"), + pnt[3], pnt[0], pnt[1], pnt[0], pnt[1]); + } + if (pnt[2] < 4) { + errmsgno(EX_BAD, + _("**BAD RRLEN (%d) in '%2.2s' field %2.2X %2.2X.\n"), + pnt[2], pnt, pnt[0], pnt[1]); + break; } - if (strncmp((char *) pnt, "CL", 2) == 0) { + if (strncmp((char *)pnt, "CL", 2) == 0) { struct dir_extent_link *dlink = e_malloc(sizeof (*dlink)); dlink->extent = get_733(pnt + 4); @@ -1727,7 +2098,7 @@ dlink->next = cl_dirs; cl_dirs = dlink; - } else if (strncmp((char *) pnt, "RE", 2) == 0) { + } else if (strncmp((char *)pnt, "RE", 2) == 0) { struct dir_extent_link *dlink = e_malloc(sizeof (*dlink)); dlink->extent = de->starting_block; @@ -1735,12 +2106,12 @@ dlink->next = re_dirs; re_dirs = dlink; - } else if (strncmp((char *) pnt, "CE", 2) == 0) { + } else if (strncmp((char *)pnt, "CE", 2) == 0) { cont_extent = get_733(pnt + 4); cont_offset = get_733(pnt + 12); cont_size = get_733(pnt + 20); - } else if (strncmp((char *) pnt, "ST", 2) == 0) { + } else if (strncmp((char *)pnt, "ST", 2) == 0) { len = pnt[2]; } len -= pnt[2]; @@ -1819,7 +2190,7 @@ d_entry = d_entry->next; } if (!d_entry) { - comerrno(EX_BAD, "Unable to locate directory parent\n"); + comerrno(EX_BAD, _("Unable to locate directory parent\n")); } if (s_entry->filedir != NULL && s_entry->parent_rec != NULL) { diff -Nru cdrtools-2.01.01a33/mkisofs/name.c cdrtools-3.02a09/mkisofs/name.c --- cdrtools-2.01.01a33/mkisofs/name.c 2007-07-25 22:52:22.000000000 +0000 +++ cdrtools-3.02a09/mkisofs/name.c 2010-12-19 19:16:30.000000000 +0000 @@ -1,7 +1,8 @@ -/* @(#)name.c 1.33 07/07/26 joerg */ +/* @(#)name.c 1.38 10/12/19 joerg */ +#include #ifndef lint -static char sccsid[] = - "@(#)name.c 1.33 07/07/26 joerg"; +static UConst char sccsid[] = + "@(#)name.c 1.38 10/12/19 joerg"; #endif /* @@ -13,7 +14,7 @@ * Almost totally rewritten by J. Schilling (2000). * * Copyright 1993 Yggdrasil Computing, Incorporated - * Copyright (c) 1999,2000-2007 J. Schilling + * Copyright (c) 1999,2000-2010 J. Schilling * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -30,11 +31,10 @@ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -#include #include "mkisofs.h" #include #include -#include +#include void iso9660_check __PR((struct iso_directory_record *idr, struct directory_entry *ndr)); int iso9660_file_length __PR((const char *name, @@ -73,12 +73,12 @@ if (np) *np = ';'; /* Restore new version # */ errmsgno(EX_BAD, - "Old session has illegal name '%.*s' length %d\n", + _("Old session has illegal name '%.*s' length %d\n"), idr->name_len[0], idr->name, idr->name_len[0]); errmsgno(EX_BAD, - "New session will use name '%s'\n", + _("New session will use name '%s'\n"), ndr->isorec.name); } if (p) @@ -124,7 +124,9 @@ int ochars_before_dot; int seen_dot = 0; int seen_semic = 0; +#ifdef Eric_code_does_not_work int tildes = 0; +#endif result = sresult->isorec.name; @@ -273,7 +275,7 @@ /* * Does not work as we may truncate before the dot. */ - error("Truncating '%s' to '%.*s'.\n", + error(_("Truncating '%s' to '%.*s'.\n"), name, current_length, sresult->isorec.name); ignore++; @@ -490,6 +492,7 @@ * In case of name conflicts, this is what would end up being used as * the 'extension'. */ +#ifdef Eric_code_does_not_work if (tildes == 2) { int prio1 = 0; @@ -506,6 +509,7 @@ } priority = prio1; } +#endif /* * If this is not a directory, force a '.' in case we haven't seen one, * and add a version number if we haven't seen one of those either. diff -Nru cdrtools-2.01.01a33/mkisofs/rock.c cdrtools-3.02a09/mkisofs/rock.c --- cdrtools-2.01.01a33/mkisofs/rock.c 2007-06-24 14:55:42.000000000 +0000 +++ cdrtools-3.02a09/mkisofs/rock.c 2012-12-02 13:33:49.000000000 +0000 @@ -1,7 +1,8 @@ -/* @(#)rock.c 1.54 07/06/24 joerg */ +/* @(#)rock.c 1.66 12/12/02 joerg */ +#include #ifndef lint -static char sccsid[] = - "@(#)rock.c 1.54 07/06/24 joerg"; +static UConst char sccsid[] = + "@(#)rock.c 1.66 12/12/02 joerg"; #endif /* * File rock.c - generate RRIP records for iso9660 filesystems. @@ -9,7 +10,7 @@ * Written by Eric Youngdale (1993). * * Copyright 1993 Yggdrasil Computing, Incorporated - * Copyright (c) 1999,2000-2007 J. Schilling + * Copyright (c) 1999,2000-2012 J. Schilling * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -26,8 +27,8 @@ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -#include #include "mkisofs.h" +#include "rock.h" #include #include @@ -55,8 +56,10 @@ #endif /* APPLE_HYB */ #if defined(__QNX__) && !defined(__QNXNTO__) /* Not on Neutrino! never OK? */ #define TF_SIZE (5 + 4 * 7) /* RR Time field */ +#define TF_SIZE_LONG (5 + 4 * 17) /* RR Time field */ #else #define TF_SIZE (5 + 3 * 7) +#define TF_SIZE_LONG (5 + 3 * 17) #endif LOCAL void rstrncpy __PR((char *t, char *f, size_t tlen, @@ -67,11 +70,11 @@ LOCAL void gen_xa __PR((struct stat *lstatbuf)); EXPORT int generate_xa_rr_attributes __PR((char *whole_name, char *name, - struct directory_entry * s_entry, - struct stat * statbuf, - struct stat * lstatbuf, + struct directory_entry *s_entry, + struct stat *statbuf, + struct stat *lstatbuf, int deep_opt)); - char * generate_rr_extension_record __PR((char *id, + char *generate_rr_extension_record __PR((char *id, char *descriptor, char *source, int *size)); @@ -127,26 +130,26 @@ { if (MAYBE_ADD_CE_ENTRY(0)) { errmsgno(EX_BAD, - "Panic: no space, cannot add RR CE entry (%d bytes mising) for %s line %d.\n", + _("Panic: no space, cannot add RR CE entry (%d bytes mising) for %s line %d.\n"), (CE_SIZE + currlen + (ipnt - recstart) - reclimit), field, line); - errmsgno(EX_BAD, "currlen: %d ipnt: %d, recstart: %d\n", + errmsgno(EX_BAD, _("currlen: %d ipnt: %d, recstart: %d\n"), currlen, ipnt, recstart); - errmsgno(EX_BAD, "Send bug report to the maintainer.\n"); - comerrno(EX_BAD, "Aborting.\n"); + errmsgno(EX_BAD, _("Send bug report to the maintainer.\n")); + comerrno(EX_BAD, _("Aborting.\n")); } if (recstart) - set_733((char *) Rock + recstart - 8, ipnt + 28 - recstart); + set_733((char *)Rock + recstart - 8, ipnt + 28 - recstart); Rock[ipnt++] = 'C'; Rock[ipnt++] = 'E'; Rock[ipnt++] = CE_SIZE; Rock[ipnt++] = SU_VERSION; - set_733((char *) Rock + ipnt, 0); + set_733((char *)Rock + ipnt, 0); ipnt += 8; - set_733((char *) Rock + ipnt, 0); + set_733((char *)Rock + ipnt, 0); ipnt += 8; - set_733((char *) Rock + ipnt, 0); + set_733((char *)Rock + ipnt, 0); ipnt += 8; recstart = ipnt; currlen = 0; @@ -196,17 +199,17 @@ /* * Group ID */ - set_722((char *) Rock + ipnt, lstatbuf->st_gid); + set_722((char *)Rock + ipnt, lstatbuf->st_gid); ipnt += 2; /* * User ID */ - set_722((char *) Rock + ipnt, lstatbuf->st_uid); + set_722((char *)Rock + ipnt, lstatbuf->st_uid); ipnt += 2; /* * Attributes */ - set_722((char *) Rock + ipnt, gen_xa_attr(lstatbuf->st_mode)); + set_722((char *)Rock + ipnt, gen_xa_attr(lstatbuf->st_mode)); ipnt += 2; Rock[ipnt++] = 'X'; /* XA Signature */ @@ -224,9 +227,9 @@ #ifdef PROTOTYPES EXPORT int generate_xa_rr_attributes(char *whole_name, char *name, - struct directory_entry * s_entry, - struct stat * statbuf, - struct stat * lstatbuf, + struct directory_entry *s_entry, + struct stat *statbuf, + struct stat *lstatbuf, int deep_opt) #else EXPORT int @@ -379,7 +382,7 @@ } if (use < 0) { comerrno(EX_BAD, - "Negative RR name length residual: %d\n", + _("Negative RR name length residual: %d\n"), use); } @@ -400,11 +403,11 @@ */ #ifdef APPLE_HYB if (USE_MAC_NAME(s_entry)) - rstrncpy((char *) &Rock[ipnt], npnt, use, + rstrncpy((char *)&Rock[ipnt], npnt, use, hfs_inls, out_nls); else #endif /* APPLE_HYB */ - rstrncpy((char *) &Rock[ipnt], npnt, use, + rstrncpy((char *)&Rock[ipnt], npnt, use, in_nls, out_nls); npnt += use; ipnt += use; @@ -426,20 +429,20 @@ } Rock[ipnt++] = SU_VERSION; flagval |= (1 << 0); - set_733((char *) Rock + ipnt, lstatbuf->st_mode); + set_733((char *)Rock + ipnt, lstatbuf->st_mode); ipnt += 8; - set_733((char *) Rock + ipnt, lstatbuf->st_nlink); + set_733((char *)Rock + ipnt, lstatbuf->st_nlink); ipnt += 8; - set_733((char *) Rock + ipnt, lstatbuf->st_uid); + set_733((char *)Rock + ipnt, lstatbuf->st_uid); ipnt += 8; - set_733((char *) Rock + ipnt, lstatbuf->st_gid); + set_733((char *)Rock + ipnt, lstatbuf->st_gid); ipnt += 8; if (rrip112) { /* * We will set up correct inode numbers later * after we did assign them. */ - set_733((char *) Rock + ipnt, 0); + set_733((char *)Rock + ipnt, 0); ipnt += 8; } @@ -461,9 +464,9 @@ flagval |= (1 << 1); #if 1 /* This is the new and only code which uses */ - set_733((char *) Rock + ipnt, major(lstatbuf->st_rdev)); + set_733((char *)Rock + ipnt, major(lstatbuf->st_rdev)); ipnt += 8; - set_733((char *) Rock + ipnt, minor(lstatbuf->st_rdev)); + set_733((char *)Rock + ipnt, minor(lstatbuf->st_rdev)); ipnt += 8; #else /* @@ -506,18 +509,19 @@ int nchar; Uchar *cpnt; Uchar *cpnt1; + BOOL last_sl = FALSE; /* Don't suppress last '/' */ #ifdef HAVE_READLINK nchar = readlink(deep_opt&DID_CHDIR?name:whole_name, (char *)symlink_buff, sizeof (symlink_buff)-1); if (nchar < 0) - errmsg("Cannot read link '%s'.\n", whole_name); + errmsg(_("Cannot read link '%s'.\n"), whole_name); #else nchar = -1; #endif /* HAVE_READLINK */ symlink_buff[nchar < 0 ? 0 : nchar] = 0; - nchar = strlen((char *) symlink_buff); + nchar = strlen((char *)symlink_buff); set_733(s_entry->isorec.size, 0); cpnt = &symlink_buff[0]; flagval |= (1 << 2); @@ -539,7 +543,7 @@ * and continue with splited one */ fprintf(stderr, - "symbolic link ``%s'' to long for one SL System Use Field, splitting", + _("symbolic link ``%s'' to long for one SL System Use Field, splitting"), cpnt); } if (MAYBE_ADD_CE_ENTRY(SL_SIZE + sl_bytes)) @@ -555,7 +559,7 @@ Rock[ipnt++] = SU_VERSION; Rock[ipnt++] = 0; /* Flags */ lenval = 5; - while (*cpnt) { + while (*cpnt || last_sl) { cpnt1 = (Uchar *) strchr((char *)cpnt, '/'); if (cpnt1) { @@ -618,7 +622,10 @@ } break; } - Rock[ipnt++] = SL_ROOT; + if (cpnt == &symlink_buff[0]) + Rock[ipnt++] = SL_ROOT; + else + Rock[ipnt++] = 0; Rock[ipnt++] = 0; /* length is zero */ lenval += 2; } else { @@ -629,7 +636,7 @@ */ if (split_SL_component ? MAYBE_ADD_CE_ENTRY(6) : - MAYBE_ADD_CE_ENTRY(6 + strlen((char *) cpnt))) { + MAYBE_ADD_CE_ENTRY(6 + strlen((char *)cpnt))) { add_CE_entry("SL++", __LINE__); if (cpnt1) { *cpnt1 = '/'; @@ -642,7 +649,7 @@ } break; } - j0 = strlen((char *) cpnt); + j0 = strlen((char *)cpnt); while (j0) { j1 = j0; if (j1 > 0xf8) @@ -663,7 +670,7 @@ SL_CONTINUE : 0); Rock[ipnt++] = j1; strncpy((char *)Rock + ipnt, - (char *) cpnt, j1); + (char *)cpnt, j1); ipnt += j1; lenval += j1 + 2; cpnt += j1; @@ -693,6 +700,11 @@ } } if (cpnt1) { + *cpnt1 = '/'; + if (cpnt1 > symlink_buff && !last_sl && + cpnt1[1] == '\0') { + last_sl = TRUE; + } cpnt = cpnt1 + 1; } else break; @@ -707,29 +719,49 @@ #endif /* S_IFLNK */ /* Add in the Rock Ridge TF time field */ - if (MAYBE_ADD_CE_ENTRY(TF_SIZE)) + if (MAYBE_ADD_CE_ENTRY(long_rr_time ? TF_SIZE_LONG:TF_SIZE)) add_CE_entry("TF", __LINE__); Rock[ipnt++] = 'T'; Rock[ipnt++] = 'F'; - Rock[ipnt++] = TF_SIZE; + Rock[ipnt++] = long_rr_time ? TF_SIZE_LONG:TF_SIZE; Rock[ipnt++] = SU_VERSION; #if defined(__QNX__) && !defined(__QNXNTO__) /* Not on Neutrino! never OK? */ - Rock[ipnt++] = 0x0f; + Rock[ipnt++] = long_rr_time ? 0x8f:0x0f; #else - Rock[ipnt++] = 0x0e; + Rock[ipnt++] = long_rr_time ? 0x8e:0x0e; #endif flagval |= (1 << 7); #if defined(__QNX__) && !defined(__QNXNTO__) /* Not on Neutrino! never OK? */ - iso9660_date((char *) &Rock[ipnt], lstatbuf->st_ftime); - ipnt += 7; + if (long_rr_time) { + iso9660_date((char *)&Rock[ipnt], lstatbuf->st_ftime); + ipnt += 7; + } else { + /* + * XXX Do we have nanoseconds on QNX? + */ + iso9660_ldate((char *)&Rock[ipnt], lstatbuf->st_ftime, 0, -100); + ipnt += 17; + } #endif - iso9660_date((char *) &Rock[ipnt], lstatbuf->st_mtime); - ipnt += 7; - iso9660_date((char *) &Rock[ipnt], lstatbuf->st_atime); - ipnt += 7; - iso9660_date((char *) &Rock[ipnt], lstatbuf->st_ctime); - ipnt += 7; + if (long_rr_time) { + iso9660_ldate((char *)&Rock[ipnt], + lstatbuf->st_mtime, stat_mnsecs(lstatbuf), -100); + ipnt += 17; + iso9660_ldate((char *)&Rock[ipnt], + lstatbuf->st_atime, stat_ansecs(lstatbuf), -100); + ipnt += 17; + iso9660_ldate((char *)&Rock[ipnt], + lstatbuf->st_ctime, stat_cnsecs(lstatbuf), -100); + ipnt += 17; + } else { + iso9660_date((char *)&Rock[ipnt], lstatbuf->st_mtime); + ipnt += 7; + iso9660_date((char *)&Rock[ipnt], lstatbuf->st_atime); + ipnt += 7; + iso9660_date((char *)&Rock[ipnt], lstatbuf->st_ctime); + ipnt += 7; + } /* Add in the Rock Ridge RE (relocated dir) field */ if (deep_opt & NEED_RE) { @@ -749,7 +781,7 @@ Rock[ipnt++] = 'L'; Rock[ipnt++] = PL_SIZE; Rock[ipnt++] = SU_VERSION; - set_733((char *) Rock + ipnt, 0); + set_733((char *)Rock + ipnt, 0); ipnt += 8; flagval |= (1 << 5); } @@ -762,7 +794,7 @@ Rock[ipnt++] = 'L'; Rock[ipnt++] = CL_SIZE; Rock[ipnt++] = SU_VERSION; - set_733((char *) Rock + ipnt, 0); + set_733((char *)Rock + ipnt, 0); ipnt += 8; flagval |= (1 << 4); } @@ -833,7 +865,7 @@ /* 2 bytes for algorithm-specific information */ Rock[ipnt++] = headersize; Rock[ipnt++] = blocksize; - set_733((char *) Rock + ipnt, file_size); /* Real file size */ + set_733((char *)Rock + ipnt, file_size); /* Real file size */ ipnt += 8; } } @@ -854,7 +886,7 @@ /* If there was a CE, fill in the size field */ if (recstart) - set_733((char *) Rock + recstart - 8, ipnt - recstart); + set_733((char *)Rock + recstart - 8, ipnt - recstart); xa_only: s_entry->rr_attributes = (Uchar *) e_malloc(ipnt); @@ -902,9 +934,9 @@ lipnt += len_src; if (lipnt > SECTOR_SIZE) { - comerrno(EX_BAD, "Extension record too long\n"); + comerrno(EX_BAD, _("Extension record too long\n")); } - pnt = (char *) e_malloc(SECTOR_SIZE); + pnt = (char *)e_malloc(SECTOR_SIZE); memset(pnt, 0, SECTOR_SIZE); memcpy(pnt, Rock, lipnt); *size = lipnt; diff -Nru cdrtools-2.01.01a33/mkisofs/rock.h cdrtools-3.02a09/mkisofs/rock.h --- cdrtools-2.01.01a33/mkisofs/rock.h 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/mkisofs/rock.h 2014-04-28 22:22:12.000000000 +0000 @@ -0,0 +1,54 @@ +/* @(#)rock.h 1.3 14/04/29 Copyright 2003-2014 J. Schilling */ +/* + * Header file for the Rock Ridge encoder and parser + * + * Copyright (c) 2003-2014 J. Schilling + */ +/* + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 + * as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with + * this program; see the file COPYING. If not, write to the Free Software + * Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +/* + * Defines for SUSP and Rock Ridge signature flags. + * The first block is defined by RRIP-1.09. + */ +#define RR_FLAG_PX 1 /* POSIX attributes */ +#define RR_FLAG_PN 2 /* POSIX device number */ +#define RR_FLAG_SL 4 /* Symlink */ +#define RR_FLAG_NM 8 /* Alternate Name */ +#define RR_FLAG_CL 16 /* Child link */ +#define RR_FLAG_PL 32 /* Parent link */ +#define RR_FLAG_RE 64 /* Relocated Direcotry */ +#define RR_FLAG_TF 128 /* Time stamp */ + +#define RR_FLAG_SF 256 /* Sparse File */ + +#define RR_FLAG_SP 1024 /* SUSP record */ +#define RR_FLAG_AA 2048 /* Apple Signature record */ +#define RR_FLAG_XA 4096 /* XA signature record */ + +#define RR_FLAG_CE 8192 /* SUSP Continuation aerea */ +#define RR_FLAG_ER 16384 /* Extensions Reference for RR */ +#define RR_FLAG_RR 32768 /* RR Signature in every file */ +#define RR_FLAG_ZF 65535 /* Linux compression extension */ + +/* + * Defines that control the behavior of the Rock Ridge encoder + */ +#define NEED_RE 1 /* Need Relocated Direcotry */ +#define NEED_PL 2 /* Need Parent link */ +#define NEED_CL 4 /* Need Child link */ +#define NEED_CE 8 /* Need Continuation Area */ +#define NEED_SP 16 /* Need SUSP record */ +#define DID_CHDIR 1024 /* Did chdir() to file dir */ diff -Nru cdrtools-2.01.01a33/mkisofs/scsi.c cdrtools-3.02a09/mkisofs/scsi.c --- cdrtools-2.01.01a33/mkisofs/scsi.c 2007-07-26 16:36:52.000000000 +0000 +++ cdrtools-3.02a09/mkisofs/scsi.c 2012-12-02 21:00:54.000000000 +0000 @@ -1,10 +1,11 @@ -/* @(#)scsi.c 1.27 07/07/26 Copyright 1997-2007 J. Schilling */ +/* @(#)scsi.c 1.35 12/12/02 Copyright 1997-2012 J. Schilling */ +#include #ifndef lint -static char sccsid[] = - "@(#)scsi.c 1.27 07/07/26 Copyright 1997-2007 J. Schilling"; +static UConst char sccsid[] = + "@(#)scsi.c 1.35 12/12/02 Copyright 1997-2012 J. Schilling"; #endif /* - * Copyright (c) 1997-2007 J. Schilling + * Copyright (c) 1997-2012 J. Schilling */ /* * This program is free software; you can redistribute it and/or modify @@ -22,9 +23,8 @@ */ #ifdef USE_SCG -#include -#include +#include #include #include #include @@ -34,8 +34,8 @@ #include #include -#include "cdrecord.h" -#include "../cdrecord/defaults.h" +#include "libscgcmd.h" +#include "cdrdeflt.h" /* * NOTICE: You should not make BUF_SIZE more than @@ -93,7 +93,7 @@ #ifdef OLD return (-1); #else - comerr("Read error on old image\n"); + comerr(_("Read error on old image\n")); #endif } @@ -107,13 +107,20 @@ f = fileno(in_image); if (lseek(f, (off_t)startsecno * SECTOR_SIZE, SEEK_SET) == (off_t)-1) { - comerr("Seek error on old image\n"); + comerr(_("Seek error on old image\n")); } if ((amt = read(f, buffer, (sectorcount * SECTOR_SIZE))) != (sectorcount * SECTOR_SIZE)) { + if (ignerr) { + if (amt < 0) + amt = 0; + fillbytes(&((char *)buffer)[amt], + (sectorcount * SECTOR_SIZE) - amt, '\0'); + return (sectorcount * SECTOR_SIZE); /* Should we cheat here too? */ + } if (amt < 0) - comerr("Read error on old image\n"); - comerrno(EX_BAD, "Short read on old image\n"); /* < secnt aber > 0 */ + comerr(_("Read error on old image\n")); + comerrno(EX_BAD, _("Short read on old image\n")); /* < secnt aber > 0 */ } return (sectorcount * SECTOR_SIZE); } @@ -133,17 +140,17 @@ */ scg_remote(); - cdr_defaults(&path, NULL, NULL, NULL); + cdr_defaults(&path, NULL, NULL, NULL, NULL); /* path, debug, verboseopen */ scgp = scg_open(path, errstr, sizeof (errstr), 0, 0); if (scgp == 0) { - errmsg("%s%sCannot open SCSI driver.\n", errstr, errstr[0]?". ":""); + errmsg(_("%s%sCannot open SCSI driver.\n"), errstr, errstr[0]?". ":""); return (-1); } bufsize = scg_bufsize(scgp, BUF_SIZE); if ((buf = scg_getbuf(scgp, bufsize)) == NULL) { - errmsg("Cannot get SCSI I/O buffer.\n"); + errmsg(_("Cannot get SCSI I/O buffer.\n")); scg_close(scgp); return (-1); } diff -Nru cdrtools-2.01.01a33/mkisofs/scsi_cdr.c cdrtools-3.02a09/mkisofs/scsi_cdr.c --- cdrtools-2.01.01a33/mkisofs/scsi_cdr.c 2007-07-08 18:37:18.000000000 +0000 +++ cdrtools-3.02a09/mkisofs/scsi_cdr.c 1970-01-01 00:00:00.000000000 +0000 @@ -1,3108 +0,0 @@ -/* @(#)scsi_cdr.c 1.150 07/07/08 Copyright 1995-2007 J. Schilling */ -#ifndef lint -static char sccsid[] = - "@(#)scsi_cdr.c 1.150 07/07/08 Copyright 1995-2007 J. Schilling"; -#endif -/* - * SCSI command functions for cdrecord - * covering pre-MMC standard functions up to MMC-2 - * - * Copyright (c) 1995-2007 J. Schilling - */ -/* - * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. - * - * See the file CDDL.Schily.txt in this distribution for details. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file CDDL.Schily.txt from this distribution. - */ - -/* - * NOTICE: The Philips CDD 521 has several firmware bugs. - * One of them is not to respond to a SCSI selection - * within 200ms if the general load on the - * SCSI bus is high. To deal with this problem - * most of the SCSI commands are send with the - * SCG_CMD_RETRY flag enabled. - */ -#include - -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include - -#include -#include -#include -#include - -#include "scsimmc.h" -#include "cdrecord.h" - -#define strbeg(s1, s2) (strstr((s2), (s1)) == (s2)) - -EXPORT BOOL unit_ready __PR((SCSI *scgp)); -EXPORT BOOL wait_unit_ready __PR((SCSI *scgp, int secs)); -EXPORT BOOL scsi_in_progress __PR((SCSI *scgp)); -EXPORT BOOL cdr_underrun __PR((SCSI *scgp)); -EXPORT int test_unit_ready __PR((SCSI *scgp)); -EXPORT int rezero_unit __PR((SCSI *scgp)); -EXPORT int request_sense __PR((SCSI *scgp)); -EXPORT int request_sense_b __PR((SCSI *scgp, caddr_t bp, int cnt)); -EXPORT int inquiry __PR((SCSI *scgp, caddr_t, int)); -EXPORT int read_capacity __PR((SCSI *scgp)); -EXPORT void print_capacity __PR((SCSI *scgp, FILE *f)); -EXPORT int scsi_load_unload __PR((SCSI *scgp, int)); -EXPORT int scsi_prevent_removal __PR((SCSI *scgp, int)); -EXPORT int scsi_start_stop_unit __PR((SCSI *scgp, int, int, BOOL immed)); -EXPORT int scsi_set_speed __PR((SCSI *scgp, int readspeed, int writespeed, int rotctl)); -EXPORT int scsi_get_speed __PR((SCSI *scgp, int *readspeedp, int *writespeedp)); -EXPORT int qic02 __PR((SCSI *scgp, int)); -EXPORT int write_xscsi __PR((SCSI *scgp, caddr_t, long, long, int)); -EXPORT int write_xg0 __PR((SCSI *scgp, caddr_t, long, long, int)); -EXPORT int write_xg1 __PR((SCSI *scgp, caddr_t, long, long, int)); -EXPORT int write_xg5 __PR((SCSI *scgp, caddr_t, long, long, int)); -EXPORT int seek_scsi __PR((SCSI *scgp, long addr)); -EXPORT int seek_g0 __PR((SCSI *scgp, long addr)); -EXPORT int seek_g1 __PR((SCSI *scgp, long addr)); -EXPORT int scsi_flush_cache __PR((SCSI *scgp, BOOL immed)); -EXPORT int read_buffer __PR((SCSI *scgp, caddr_t bp, int cnt, int mode)); -EXPORT int write_buffer __PR((SCSI *scgp, char *buffer, long length, int mode, int bufferid, long offset)); -EXPORT int read_subchannel __PR((SCSI *scgp, caddr_t bp, int track, - int cnt, int msf, int subq, int fmt)); -EXPORT int read_toc __PR((SCSI *scgp, caddr_t, int, int, int, int)); -EXPORT int read_toc_philips __PR((SCSI *scgp, caddr_t, int, int, int, int)); -EXPORT int read_header __PR((SCSI *scgp, caddr_t, long, int, int)); -EXPORT int read_disk_info __PR((SCSI *scgp, caddr_t, int)); -EXPORT int read_track_info __PR((SCSI *scgp, caddr_t, int type, int addr, int cnt)); -EXPORT int get_trackinfo __PR((SCSI *scgp, caddr_t, int type, int addr, int cnt)); -EXPORT int read_rzone_info __PR((SCSI *scgp, caddr_t bp, int cnt)); -EXPORT int reserve_tr_rzone __PR((SCSI *scgp, long size)); -EXPORT int read_dvd_structure __PR((SCSI *scgp, caddr_t bp, int cnt, int mt, int addr, int layer, int fmt)); -EXPORT int send_dvd_structure __PR((SCSI *scgp, caddr_t bp, int cnt, int fmt)); -EXPORT int send_opc __PR((SCSI *scgp, caddr_t, int cnt, int doopc)); -EXPORT int read_track_info_philips __PR((SCSI *scgp, caddr_t, int, int)); -EXPORT int scsi_close_tr_session __PR((SCSI *scgp, int type, int track, BOOL immed)); -EXPORT int read_master_cue __PR((SCSI *scgp, caddr_t bp, int sheet, int cnt)); -EXPORT int send_cue_sheet __PR((SCSI *scgp, caddr_t bp, long size)); -EXPORT int read_buff_cap __PR((SCSI *scgp, long *, long *)); -EXPORT int scsi_blank __PR((SCSI *scgp, long addr, int blanktype, BOOL immed)); -EXPORT BOOL allow_atapi __PR((SCSI *scgp, BOOL new)); -EXPORT int mode_select __PR((SCSI *scgp, Uchar *, int, int, int)); -EXPORT int mode_sense __PR((SCSI *scgp, Uchar *dp, int cnt, int page, int pcf)); -EXPORT int mode_select_sg0 __PR((SCSI *scgp, Uchar *, int, int, int)); -EXPORT int mode_sense_sg0 __PR((SCSI *scgp, Uchar *dp, int cnt, int page, int pcf)); -EXPORT int mode_select_g0 __PR((SCSI *scgp, Uchar *, int, int, int)); -EXPORT int mode_select_g1 __PR((SCSI *scgp, Uchar *, int, int, int)); -EXPORT int mode_sense_g0 __PR((SCSI *scgp, Uchar *dp, int cnt, int page, int pcf)); -EXPORT int mode_sense_g1 __PR((SCSI *scgp, Uchar *dp, int cnt, int page, int pcf)); -EXPORT int read_tochdr __PR((SCSI *scgp, cdr_t *, int *, int *)); -EXPORT int read_cdtext __PR((SCSI *scgp)); -EXPORT int read_trackinfo __PR((SCSI *scgp, int, long *, struct msf *, int *, int *, int *)); -EXPORT int read_B0 __PR((SCSI *scgp, BOOL isbcd, long *b0p, long *lop)); -EXPORT int read_session_offset __PR((SCSI *scgp, long *)); -EXPORT int read_session_offset_philips __PR((SCSI *scgp, long *)); -EXPORT int sense_secsize __PR((SCSI *scgp, int current)); -EXPORT int select_secsize __PR((SCSI *scgp, int)); -EXPORT BOOL is_cddrive __PR((SCSI *scgp)); -EXPORT BOOL is_unknown_dev __PR((SCSI *scgp)); -EXPORT int read_scsi __PR((SCSI *scgp, caddr_t, long, int)); -EXPORT int read_g0 __PR((SCSI *scgp, caddr_t, long, int)); -EXPORT int read_g1 __PR((SCSI *scgp, caddr_t, long, int)); -EXPORT BOOL getdev __PR((SCSI *scgp, BOOL)); -EXPORT void printinq __PR((SCSI *scgp, FILE *f)); -EXPORT void printdev __PR((SCSI *scgp)); -EXPORT BOOL do_inquiry __PR((SCSI *scgp, BOOL)); -EXPORT BOOL recovery_needed __PR((SCSI *scgp, cdr_t *)); -EXPORT int scsi_load __PR((SCSI *scgp, cdr_t *)); -EXPORT int scsi_unload __PR((SCSI *scgp, cdr_t *)); -EXPORT int scsi_cdr_write __PR((SCSI *scgp, caddr_t bp, long sectaddr, long size, int blocks, BOOL islast)); -EXPORT struct cd_mode_page_2A * mmc_cap __PR((SCSI *scgp, Uchar *modep)); -EXPORT void mmc_getval __PR((struct cd_mode_page_2A *mp, - BOOL *cdrrp, BOOL *cdwrp, - BOOL *cdrrwp, BOOL *cdwrwp, - BOOL *dvdp, BOOL *dvdwp)); -EXPORT BOOL is_mmc __PR((SCSI *scgp, BOOL *cdwp, BOOL *dvdwp)); -EXPORT BOOL mmc_check __PR((SCSI *scgp, BOOL *cdrrp, BOOL *cdwrp, - BOOL *cdrrwp, BOOL *cdwrwp, - BOOL *dvdp, BOOL *dvdwp)); -LOCAL void print_speed __PR((char *fmt, int val)); -EXPORT void print_capabilities __PR((SCSI *scgp)); -extern int verify __PR((SCSI *scgp, long start, int count, long *bad_block)); - -EXPORT BOOL -unit_ready(scgp) - SCSI *scgp; -{ - register struct scg_cmd *scmd = scgp->scmd; - - if (test_unit_ready(scgp) >= 0) /* alles OK */ - return (TRUE); - else if (scmd->error >= SCG_FATAL) /* nicht selektierbar */ - return (FALSE); - - if (scg_sense_key(scgp) == SC_UNIT_ATTENTION) { - if (test_unit_ready(scgp) >= 0) /* alles OK */ - return (TRUE); - } - if ((scg_cmd_status(scgp) & ST_BUSY) != 0) { - /* - * Busy/reservation_conflict - */ - usleep(500000); - if (test_unit_ready(scgp) >= 0) /* alles OK */ - return (TRUE); - } - if (scg_sense_key(scgp) == -1) { /* non extended Sense */ - if (scg_sense_code(scgp) == 4) /* NOT_READY */ - return (FALSE); - return (TRUE); - } - /* FALSE wenn NOT_READY */ - return (scg_sense_key(scgp) != SC_NOT_READY); -} - -EXPORT BOOL -wait_unit_ready(scgp, secs) - SCSI *scgp; - int secs; -{ - int i; - int c; - int k; - int ret; - int err; - - seterrno(0); - scgp->silent++; - ret = test_unit_ready(scgp); /* eat up unit attention */ - if (ret < 0) { - err = geterrno(); - - if (err == EPERM || err == EACCES) { - scgp->silent--; - return (FALSE); - } - ret = test_unit_ready(scgp); /* got power on condition? */ - } - scgp->silent--; - - if (ret >= 0) /* success that's enough */ - return (TRUE); - - scgp->silent++; - for (i = 0; i < secs && (ret = test_unit_ready(scgp)) < 0; i++) { - if (scgp->scmd->scb.busy != 0) { - sleep(1); - continue; - } - c = scg_sense_code(scgp); - k = scg_sense_key(scgp); - /* - * Abort quickly if it does not make sense to wait. - * 0x30 == Cannot read medium - * 0x3A == Medium not present - */ - if ((k == SC_NOT_READY && (c == 0x3A || c == 0x30)) || - (k == SC_MEDIUM_ERROR)) { - if (scgp->silent <= 1) - scg_printerr(scgp); - scgp->silent--; - return (FALSE); - } - sleep(1); - } - scgp->silent--; - if (ret < 0) - return (FALSE); - return (TRUE); -} - -EXPORT BOOL -scsi_in_progress(scgp) - SCSI *scgp; -{ - if (scg_sense_key(scgp) == SC_NOT_READY && - /* - * Logigal unit not ready operation/long_write in progress - */ - scg_sense_code(scgp) == 0x04 && - (scg_sense_qual(scgp) == 0x04 || /* CyberDr. "format in progress"*/ - scg_sense_qual(scgp) == 0x07 || /* "operation in progress" */ - scg_sense_qual(scgp) == 0x08)) { /* "long write in progress" */ - return (TRUE); - } else { - if (scgp->silent <= 1) - scg_printerr(scgp); - } - return (FALSE); -} - -EXPORT BOOL -cdr_underrun(scgp) - SCSI *scgp; -{ - if ((scg_sense_key(scgp) != SC_ILLEGAL_REQUEST && - scg_sense_key(scgp) != SC_MEDIUM_ERROR)) - return (FALSE); - - if ((scg_sense_code(scgp) == 0x21 && - (scg_sense_qual(scgp) == 0x00 || /* logical block address out of range */ - scg_sense_qual(scgp) == 0x02)) || /* invalid address for write */ - - (scg_sense_code(scgp) == 0x0C && - scg_sense_qual(scgp) == 0x09)) { /* write error - loss of streaming */ - return (TRUE); - } - /* - * XXX Bei manchen Brennern kommt mach dem der Brennvorgang bereits - * XXX eine Weile gelaufen ist ein 5/24/0 Invalid field in CDB. - * XXX Daher sollte man testen ob schon geschrieben wurde... - */ - return (FALSE); -} - -EXPORT int -test_unit_ready(scgp) - SCSI *scgp; -{ - register struct scg_cmd *scmd = scgp->scmd; - - fillbytes((caddr_t)scmd, sizeof (*scmd), '\0'); - scmd->addr = (caddr_t)0; - scmd->size = 0; - scmd->flags = SCG_DISRE_ENA | (scgp->silent ? SCG_SILENT:0); - scmd->cdb_len = SC_G0_CDBLEN; - scmd->sense_len = CCS_SENSE_LEN; - scmd->cdb.g0_cdb.cmd = SC_TEST_UNIT_READY; - scmd->cdb.g0_cdb.lun = scg_lun(scgp); - - scgp->cmdname = "test unit ready"; - - return (scg_cmd(scgp)); -} - -EXPORT int -rezero_unit(scgp) - SCSI *scgp; -{ - register struct scg_cmd *scmd = scgp->scmd; - - fillbytes((caddr_t)scmd, sizeof (*scmd), '\0'); - scmd->addr = (caddr_t)0; - scmd->size = 0; - scmd->flags = SCG_DISRE_ENA; - scmd->cdb_len = SC_G0_CDBLEN; - scmd->sense_len = CCS_SENSE_LEN; - scmd->cdb.g0_cdb.cmd = SC_REZERO_UNIT; - scmd->cdb.g0_cdb.lun = scg_lun(scgp); - - scgp->cmdname = "rezero unit"; - - return (scg_cmd(scgp)); -} - -EXPORT int -request_sense(scgp) - SCSI *scgp; -{ - char sensebuf[CCS_SENSE_LEN]; - char *cmdsave; - - cmdsave = scgp->cmdname; - - if (request_sense_b(scgp, sensebuf, sizeof (sensebuf)) < 0) - return (-1); - scgp->cmdname = cmdsave; - scg_prsense((Uchar *)sensebuf, CCS_SENSE_LEN - scg_getresid(scgp)); - return (0); -} - -EXPORT int -request_sense_b(scgp, bp, cnt) - SCSI *scgp; - caddr_t bp; - int cnt; -{ - register struct scg_cmd *scmd = scgp->scmd; - - - fillbytes((caddr_t)scmd, sizeof (*scmd), '\0'); - scmd->addr = bp; - scmd->size = cnt; - scmd->flags = SCG_RECV_DATA|SCG_DISRE_ENA; - scmd->cdb_len = SC_G0_CDBLEN; - scmd->sense_len = CCS_SENSE_LEN; - scmd->cdb.g0_cdb.cmd = SC_REQUEST_SENSE; - scmd->cdb.g0_cdb.lun = scg_lun(scgp); - scmd->cdb.g0_cdb.count = cnt; - - scgp->cmdname = "request_sense"; - - if (scg_cmd(scgp) < 0) - return (-1); - return (0); -} - -EXPORT int -inquiry(scgp, bp, cnt) - SCSI *scgp; - caddr_t bp; - int cnt; -{ - register struct scg_cmd *scmd = scgp->scmd; - - fillbytes(bp, cnt, '\0'); - fillbytes((caddr_t)scmd, sizeof (*scmd), '\0'); - scmd->addr = bp; - scmd->size = cnt; - scmd->flags = SCG_RECV_DATA|SCG_DISRE_ENA; - scmd->cdb_len = SC_G0_CDBLEN; - scmd->sense_len = CCS_SENSE_LEN; - scmd->cdb.g0_cdb.cmd = SC_INQUIRY; - scmd->cdb.g0_cdb.lun = scg_lun(scgp); - scmd->cdb.g0_cdb.count = cnt; - - scgp->cmdname = "inquiry"; - - if (scg_cmd(scgp) < 0) - return (-1); - if (scgp->verbose) - scg_prbytes("Inquiry Data :", (Uchar *)bp, cnt - scg_getresid(scgp)); - return (0); -} - -EXPORT int -read_capacity(scgp) - SCSI *scgp; -{ - register struct scg_cmd *scmd = scgp->scmd; - - fillbytes((caddr_t)scmd, sizeof (*scmd), '\0'); - scmd->addr = (caddr_t)scgp->cap; - scmd->size = sizeof (struct scsi_capacity); - scmd->flags = SCG_RECV_DATA|SCG_DISRE_ENA; - scmd->cdb_len = SC_G1_CDBLEN; - scmd->sense_len = CCS_SENSE_LEN; - scmd->cdb.g1_cdb.cmd = 0x25; /* Read Capacity */ - scmd->cdb.g1_cdb.lun = scg_lun(scgp); - g1_cdblen(&scmd->cdb.g1_cdb, 0); /* Full Media */ - - scgp->cmdname = "read capacity"; - - if (scg_cmd(scgp) < 0) { - return (-1); - } else { - long cbsize; - long cbaddr; - - /* - * c_bsize & c_baddr are signed Int32_t - * so we use signed int conversion here. - */ - cbsize = a_to_4_byte(&scgp->cap->c_bsize); - cbaddr = a_to_4_byte(&scgp->cap->c_baddr); - scgp->cap->c_bsize = cbsize; - scgp->cap->c_baddr = cbaddr; - } - return (0); -} - -EXPORT void -print_capacity(scgp, f) - SCSI *scgp; - FILE *f; -{ - long kb; - long mb; - long prmb; - double dkb; - - dkb = (scgp->cap->c_baddr+1.0) * (scgp->cap->c_bsize/1024.0); - kb = dkb; - mb = dkb / 1024.0; - prmb = dkb / 1000.0 * 1.024; - fprintf(f, "Capacity: %ld Blocks = %ld kBytes = %ld MBytes = %ld prMB\n", - (long)scgp->cap->c_baddr+1, kb, mb, prmb); - fprintf(f, "Sectorsize: %ld Bytes\n", (long)scgp->cap->c_bsize); -} - -EXPORT int -scsi_load_unload(scgp, load) - SCSI *scgp; - int load; -{ - register struct scg_cmd *scmd = scgp->scmd; - - fillbytes((caddr_t)scmd, sizeof (*scmd), '\0'); - scmd->flags = SCG_DISRE_ENA; - scmd->cdb_len = SC_G5_CDBLEN; - scmd->sense_len = CCS_SENSE_LEN; - scmd->cdb.g5_cdb.cmd = 0xA6; - scmd->cdb.g5_cdb.lun = scg_lun(scgp); - scmd->cdb.g5_cdb.addr[1] = load?3:2; - scmd->cdb.g5_cdb.count[2] = 0; /* slot # */ - - scgp->cmdname = "medium load/unload"; - - if (scg_cmd(scgp) < 0) - return (-1); - return (0); -} - -EXPORT int -scsi_prevent_removal(scgp, prevent) - SCSI *scgp; - int prevent; -{ - register struct scg_cmd *scmd = scgp->scmd; - - fillbytes((caddr_t)scmd, sizeof (*scmd), '\0'); - scmd->flags = SCG_DISRE_ENA; - scmd->cdb_len = SC_G0_CDBLEN; - scmd->sense_len = CCS_SENSE_LEN; - scmd->cdb.g0_cdb.cmd = 0x1E; - scmd->cdb.g0_cdb.lun = scg_lun(scgp); - scmd->cdb.g0_cdb.count = prevent & 1; - - scgp->cmdname = "prevent/allow medium removal"; - - if (scg_cmd(scgp) < 0) - return (-1); - return (0); -} - - -EXPORT int -scsi_start_stop_unit(scgp, flg, loej, immed) - SCSI *scgp; - int flg; - int loej; - BOOL immed; -{ - register struct scg_cmd *scmd = scgp->scmd; - - fillbytes((caddr_t)scmd, sizeof (*scmd), '\0'); - scmd->flags = SCG_DISRE_ENA; - scmd->cdb_len = SC_G0_CDBLEN; - scmd->sense_len = CCS_SENSE_LEN; - scmd->cdb.g0_cdb.cmd = 0x1B; /* Start Stop Unit */ - scmd->cdb.g0_cdb.lun = scg_lun(scgp); - scmd->cdb.g0_cdb.count = (flg ? 1:0) | (loej ? 2:0); - - if (immed) - scmd->cdb.cmd_cdb[1] |= 0x01; - - scgp->cmdname = "start/stop unit"; - - return (scg_cmd(scgp)); -} - -EXPORT int -scsi_set_speed(scgp, readspeed, writespeed, rotctl) - SCSI *scgp; - int readspeed; - int writespeed; - int rotctl; -{ - register struct scg_cmd *scmd = scgp->scmd; - - fillbytes((caddr_t)scmd, sizeof (*scmd), '\0'); - scmd->flags = SCG_DISRE_ENA; - scmd->cdb_len = SC_G5_CDBLEN; - scmd->sense_len = CCS_SENSE_LEN; - scmd->cdb.g5_cdb.cmd = 0xBB; - scmd->cdb.g5_cdb.lun = scg_lun(scgp); - - if (readspeed < 0) - i_to_2_byte(&scmd->cdb.g5_cdb.addr[0], 0xFFFF); - else - i_to_2_byte(&scmd->cdb.g5_cdb.addr[0], readspeed); - if (writespeed < 0) - i_to_2_byte(&scmd->cdb.g5_cdb.addr[2], 0xFFFF); - else - i_to_2_byte(&scmd->cdb.g5_cdb.addr[2], writespeed); - - scmd->cdb.cmd_cdb[1] |= rotctl & 0x03; - - scgp->cmdname = "set cd speed"; - - if (scg_cmd(scgp) < 0) - return (-1); - return (0); -} - -EXPORT int -scsi_get_speed(scgp, readspeedp, writespeedp) - SCSI *scgp; - int *readspeedp; - int *writespeedp; -{ - struct cd_mode_page_2A *mp; - Uchar m[256]; - int val; - - scgp->silent++; - mp = mmc_cap(scgp, m); /* Get MMC capabilities in allocated mp */ - scgp->silent--; - if (mp == NULL) - return (-1); /* Pre SCSI-3/mmc drive */ - - val = a_to_u_2_byte(mp->cur_read_speed); - if (readspeedp) - *readspeedp = val; - - if (mp->p_len >= 28) - val = a_to_u_2_byte(mp->v3_cur_write_speed); - else - val = a_to_u_2_byte(mp->cur_write_speed); - if (writespeedp) - *writespeedp = val; - - return (0); -} - - -EXPORT int -qic02(scgp, cmd) - SCSI *scgp; - int cmd; -{ - register struct scg_cmd *scmd = scgp->scmd; - - fillbytes((caddr_t)scmd, sizeof (*scmd), '\0'); - scmd->addr = (caddr_t)0; - scmd->size = 0; - scmd->flags = SCG_DISRE_ENA; - scmd->cdb_len = SC_G0_CDBLEN; - scmd->sense_len = DEF_SENSE_LEN; - scmd->cdb.g0_cdb.cmd = 0x0D; /* qic02 Sysgen SC4000 */ - scmd->cdb.g0_cdb.lun = scg_lun(scgp); - scmd->cdb.g0_cdb.mid_addr = cmd; - - scgp->cmdname = "qic 02"; - return (scg_cmd(scgp)); -} - -#define G0_MAXADDR 0x1FFFFFL - -EXPORT int -write_xscsi(scgp, bp, addr, size, cnt) - SCSI *scgp; - caddr_t bp; /* address of buffer */ - long addr; /* disk address (sector) to put */ - long size; /* number of bytes to transfer */ - int cnt; /* sectorcount */ -{ - if (addr <= G0_MAXADDR) - return (write_xg0(scgp, bp, addr, size, cnt)); - else - return (write_xg1(scgp, bp, addr, size, cnt)); -} - -EXPORT int -write_xg0(scgp, bp, addr, size, cnt) - SCSI *scgp; - caddr_t bp; /* address of buffer */ - long addr; /* disk address (sector) to put */ - long size; /* number of bytes to transfer */ - int cnt; /* sectorcount */ -{ - register struct scg_cmd *scmd = scgp->scmd; - - fillbytes((caddr_t)scmd, sizeof (*scmd), '\0'); - scmd->addr = bp; - scmd->size = size; - scmd->flags = SCG_DISRE_ENA|SCG_CMD_RETRY; -/* scmd->flags = SCG_DISRE_ENA;*/ - scmd->cdb_len = SC_G0_CDBLEN; - scmd->sense_len = CCS_SENSE_LEN; - scmd->cdb.g0_cdb.cmd = SC_WRITE; - scmd->cdb.g0_cdb.lun = scg_lun(scgp); - g0_cdbaddr(&scmd->cdb.g0_cdb, addr); - scmd->cdb.g0_cdb.count = cnt; - - scgp->cmdname = "write_g0"; - - if (scg_cmd(scgp) < 0) - return (-1); - return (size - scg_getresid(scgp)); -} - -EXPORT int -write_xg1(scgp, bp, addr, size, cnt) - SCSI *scgp; - caddr_t bp; /* address of buffer */ - long addr; /* disk address (sector) to put */ - long size; /* number of bytes to transfer */ - int cnt; /* sectorcount */ -{ - register struct scg_cmd *scmd = scgp->scmd; - - fillbytes((caddr_t)scmd, sizeof (*scmd), '\0'); - scmd->addr = bp; - scmd->size = size; - scmd->flags = SCG_DISRE_ENA|SCG_CMD_RETRY; -/* scmd->flags = SCG_DISRE_ENA;*/ - scmd->cdb_len = SC_G1_CDBLEN; - scmd->sense_len = CCS_SENSE_LEN; - scmd->cdb.g1_cdb.cmd = SC_EWRITE; - scmd->cdb.g1_cdb.lun = scg_lun(scgp); - g1_cdbaddr(&scmd->cdb.g1_cdb, addr); - g1_cdblen(&scmd->cdb.g1_cdb, cnt); - - scgp->cmdname = "write_g1"; - - if (scg_cmd(scgp) < 0) - return (-1); - return (size - scg_getresid(scgp)); -} - -EXPORT int -write_xg5(scgp, bp, addr, size, cnt) - SCSI *scgp; - caddr_t bp; /* address of buffer */ - long addr; /* disk address (sector) to put */ - long size; /* number of bytes to transfer */ - int cnt; /* sectorcount */ -{ - register struct scg_cmd *scmd = scgp->scmd; - - fillbytes((caddr_t)scmd, sizeof (*scmd), '\0'); - scmd->addr = bp; - scmd->size = size; - scmd->flags = SCG_DISRE_ENA|SCG_CMD_RETRY; -/* scmd->flags = SCG_DISRE_ENA;*/ - scmd->cdb_len = SC_G5_CDBLEN; - scmd->sense_len = CCS_SENSE_LEN; - scmd->cdb.g5_cdb.cmd = 0xAA; - scmd->cdb.g5_cdb.lun = scg_lun(scgp); - g5_cdbaddr(&scmd->cdb.g5_cdb, addr); - g5_cdblen(&scmd->cdb.g5_cdb, cnt); - - scgp->cmdname = "write_g5"; - - if (scg_cmd(scgp) < 0) - return (-1); - return (size - scg_getresid(scgp)); -} - -EXPORT int -seek_scsi(scgp, addr) - SCSI *scgp; - long addr; -{ - if (addr <= G0_MAXADDR) - return (seek_g0(scgp, addr)); - else - return (seek_g1(scgp, addr)); -} - -EXPORT int -seek_g0(scgp, addr) - SCSI *scgp; - long addr; -{ - register struct scg_cmd *scmd = scgp->scmd; - - fillbytes((caddr_t)scmd, sizeof (*scmd), '\0'); - scmd->flags = SCG_DISRE_ENA; - scmd->cdb_len = SC_G0_CDBLEN; - scmd->sense_len = CCS_SENSE_LEN; - scmd->cdb.g0_cdb.cmd = 0x0B; /* Seek */ - scmd->cdb.g0_cdb.lun = scg_lun(scgp); - g0_cdbaddr(&scmd->cdb.g0_cdb, addr); - - scgp->cmdname = "seek_g0"; - - return (scg_cmd(scgp)); -} - -EXPORT int -seek_g1(scgp, addr) - SCSI *scgp; - long addr; -{ - register struct scg_cmd *scmd = scgp->scmd; - - fillbytes((caddr_t)scmd, sizeof (*scmd), '\0'); - scmd->flags = SCG_DISRE_ENA; - scmd->cdb_len = SC_G1_CDBLEN; - scmd->sense_len = CCS_SENSE_LEN; - scmd->cdb.g1_cdb.cmd = 0x2B; /* Seek G1 */ - scmd->cdb.g1_cdb.lun = scg_lun(scgp); - g1_cdbaddr(&scmd->cdb.g1_cdb, addr); - - scgp->cmdname = "seek_g1"; - - return (scg_cmd(scgp)); -} - -EXPORT int -scsi_flush_cache(scgp, immed) - SCSI *scgp; - BOOL immed; -{ - register struct scg_cmd *scmd = scgp->scmd; - - fillbytes((caddr_t)scmd, sizeof (*scmd), '\0'); - scmd->flags = SCG_DISRE_ENA; - scmd->cdb_len = SC_G1_CDBLEN; - scmd->sense_len = CCS_SENSE_LEN; - scmd->timeout = 2 * 60; /* Max: sizeof (CDR-cache)/150KB/s */ - scmd->cdb.g1_cdb.cmd = 0x35; - scmd->cdb.g1_cdb.lun = scg_lun(scgp); - - if (immed) - scmd->cdb.cmd_cdb[1] |= 0x02; - - scgp->cmdname = "flush cache"; - - if (scg_cmd(scgp) < 0) - return (-1); - return (0); -} - -EXPORT int -read_buffer(scgp, bp, cnt, mode) - SCSI *scgp; - caddr_t bp; - int cnt; - int mode; -{ - register struct scg_cmd *scmd = scgp->scmd; - - fillbytes((caddr_t)scmd, sizeof (*scmd), '\0'); - scmd->addr = bp; - scmd->size = cnt; - scmd->dma_read = 1; - scmd->cdb_len = SC_G1_CDBLEN; - scmd->sense_len = CCS_SENSE_LEN; - scmd->cdb.g1_cdb.cmd = 0x3C; /* Read Buffer */ - scmd->cdb.g1_cdb.lun = scg_lun(scgp); - scmd->cdb.cmd_cdb[1] |= (mode & 7); - g1_cdblen(&scmd->cdb.g1_cdb, cnt); - - scgp->cmdname = "read buffer"; - - return (scg_cmd(scgp)); -} - -EXPORT int -write_buffer(scgp, buffer, length, mode, bufferid, offset) - SCSI *scgp; - char *buffer; - long length; - int mode; - int bufferid; - long offset; -{ - register struct scg_cmd *scmd = scgp->scmd; - char *cdb; - - fillbytes((caddr_t)scmd, sizeof (*scmd), '\0'); - scmd->addr = buffer; - scmd->size = length; - scmd->flags = SCG_DISRE_ENA|SCG_CMD_RETRY; - scmd->cdb_len = SC_G1_CDBLEN; - scmd->sense_len = CCS_SENSE_LEN; - - cdb = (char *)scmd->cdb.cmd_cdb; - - cdb[0] = 0x3B; - cdb[1] = mode & 7; - cdb[2] = bufferid; - cdb[3] = offset >> 16; - cdb[4] = (offset >> 8) & 0xff; - cdb[5] = offset & 0xff; - cdb[6] = length >> 16; - cdb[7] = (length >> 8) & 0xff; - cdb[8] = length & 0xff; - - scgp->cmdname = "write_buffer"; - - if (scg_cmd(scgp) >= 0) - return (1); - return (0); -} - -EXPORT int -read_subchannel(scgp, bp, track, cnt, msf, subq, fmt) - SCSI *scgp; - caddr_t bp; - int track; - int cnt; - int msf; - int subq; - int fmt; - -{ - register struct scg_cmd *scmd = scgp->scmd; - - fillbytes((caddr_t)scmd, sizeof (*scmd), '\0'); - scmd->addr = bp; - scmd->size = cnt; - scmd->flags = SCG_RECV_DATA|SCG_DISRE_ENA; - scmd->cdb_len = SC_G1_CDBLEN; - scmd->sense_len = CCS_SENSE_LEN; - scmd->cdb.g1_cdb.cmd = 0x42; - scmd->cdb.g1_cdb.lun = scg_lun(scgp); - if (msf) - scmd->cdb.g1_cdb.res = 1; - if (subq) - scmd->cdb.g1_cdb.addr[0] = 0x40; - scmd->cdb.g1_cdb.addr[1] = fmt; - scmd->cdb.g1_cdb.res6 = track; - g1_cdblen(&scmd->cdb.g1_cdb, cnt); - - scgp->cmdname = "read subchannel"; - - if (scg_cmd(scgp) < 0) - return (-1); - return (0); -} - -EXPORT int -read_toc(scgp, bp, track, cnt, msf, fmt) - SCSI *scgp; - caddr_t bp; - int track; - int cnt; - int msf; - int fmt; - -{ - register struct scg_cmd *scmd = scgp->scmd; - - fillbytes((caddr_t)scmd, sizeof (*scmd), '\0'); - scmd->addr = bp; - scmd->size = cnt; - scmd->flags = SCG_RECV_DATA|SCG_DISRE_ENA; - scmd->cdb_len = SC_G1_CDBLEN; - scmd->sense_len = CCS_SENSE_LEN; - scmd->cdb.g1_cdb.cmd = 0x43; - scmd->cdb.g1_cdb.lun = scg_lun(scgp); - if (msf) - scmd->cdb.g1_cdb.res = 1; - scmd->cdb.g1_cdb.addr[0] = fmt & 0x0F; - scmd->cdb.g1_cdb.res6 = track; - g1_cdblen(&scmd->cdb.g1_cdb, cnt); - - scgp->cmdname = "read toc"; - - if (scg_cmd(scgp) < 0) - return (-1); - return (0); -} - -EXPORT int -read_toc_philips(scgp, bp, track, cnt, msf, fmt) - SCSI *scgp; - caddr_t bp; - int track; - int cnt; - int msf; - int fmt; - -{ - register struct scg_cmd *scmd = scgp->scmd; - - fillbytes((caddr_t)scmd, sizeof (*scmd), '\0'); - scmd->addr = bp; - scmd->size = cnt; - scmd->flags = SCG_RECV_DATA|SCG_DISRE_ENA; - scmd->cdb_len = SC_G1_CDBLEN; - scmd->sense_len = CCS_SENSE_LEN; - scmd->timeout = 4 * 60; /* May last 174s on a TEAC CD-R55S */ - scmd->cdb.g1_cdb.cmd = 0x43; - scmd->cdb.g1_cdb.lun = scg_lun(scgp); - if (msf) - scmd->cdb.g1_cdb.res = 1; - scmd->cdb.g1_cdb.res6 = track; - g1_cdblen(&scmd->cdb.g1_cdb, cnt); - - if (fmt & 1) - scmd->cdb.g1_cdb.vu_96 = 1; - if (fmt & 2) - scmd->cdb.g1_cdb.vu_97 = 1; - - scgp->cmdname = "read toc"; - - if (scg_cmd(scgp) < 0) - return (-1); - return (0); -} - -EXPORT int -read_header(scgp, bp, addr, cnt, msf) - SCSI *scgp; - caddr_t bp; - long addr; - int cnt; - int msf; -{ - register struct scg_cmd *scmd = scgp->scmd; - - fillbytes((caddr_t)scmd, sizeof (*scmd), '\0'); - scmd->addr = bp; - scmd->size = cnt; - scmd->flags = SCG_RECV_DATA|SCG_DISRE_ENA; - scmd->cdb_len = SC_G1_CDBLEN; - scmd->sense_len = CCS_SENSE_LEN; - scmd->cdb.g1_cdb.cmd = 0x44; - scmd->cdb.g1_cdb.lun = scg_lun(scgp); - if (msf) - scmd->cdb.g1_cdb.res = 1; - g1_cdbaddr(&scmd->cdb.g1_cdb, addr); - g1_cdblen(&scmd->cdb.g1_cdb, cnt); - - scgp->cmdname = "read header"; - - if (scg_cmd(scgp) < 0) - return (-1); - return (0); -} - -EXPORT int -read_disk_info(scgp, bp, cnt) - SCSI *scgp; - caddr_t bp; - int cnt; - -{ - register struct scg_cmd *scmd = scgp->scmd; - - fillbytes((caddr_t)scmd, sizeof (*scmd), '\0'); - scmd->addr = bp; - scmd->size = cnt; - scmd->flags = SCG_RECV_DATA|SCG_DISRE_ENA; - scmd->cdb_len = SC_G1_CDBLEN; - scmd->sense_len = CCS_SENSE_LEN; - scmd->timeout = 4 * 60; /* Needs up to 2 minutes */ - scmd->cdb.g1_cdb.cmd = 0x51; - scmd->cdb.g1_cdb.lun = scg_lun(scgp); - g1_cdblen(&scmd->cdb.g1_cdb, cnt); - - scgp->cmdname = "read disk info"; - - if (scg_cmd(scgp) < 0) - return (-1); - return (0); -} - -EXPORT int -read_track_info(scgp, bp, type, addr, cnt) - SCSI *scgp; - caddr_t bp; - int type; - int addr; - int cnt; - -{ - register struct scg_cmd *scmd = scgp->scmd; - - fillbytes((caddr_t)scmd, sizeof (*scmd), '\0'); - scmd->addr = bp; - scmd->size = cnt; - scmd->flags = SCG_RECV_DATA|SCG_DISRE_ENA; - scmd->cdb_len = SC_G1_CDBLEN; - scmd->sense_len = CCS_SENSE_LEN; - scmd->timeout = 4 * 60; /* Needs up to 2 minutes */ - scmd->cdb.g1_cdb.cmd = 0x52; - scmd->cdb.g1_cdb.lun = scg_lun(scgp); -/* scmd->cdb.cmd_cdb[1] = type & 0x03;*/ - scmd->cdb.cmd_cdb[1] = type; - g1_cdbaddr(&scmd->cdb.g1_cdb, addr); /* LBA/Track/Session */ - g1_cdblen(&scmd->cdb.g1_cdb, cnt); - - scgp->cmdname = "read track info"; - - if (scg_cmd(scgp) < 0) - return (-1); - return (0); -} - -EXPORT int -get_trackinfo(scgp, bp, type, addr, cnt) - SCSI *scgp; - caddr_t bp; - int type; - int addr; - int cnt; -{ - int len; - int ret; - - fillbytes(bp, cnt, '\0'); - - /* - * Used to be 2 instead of 4 (now). But some Y2k ATAPI drives as used - * by IOMEGA create a DMA overrun if we try to transfer only 2 bytes. - */ - if (read_track_info(scgp, bp, type, addr, 4) < 0) - return (-1); - - len = a_to_u_2_byte(bp); - len += 2; - if (len > cnt) - len = cnt; - ret = read_track_info(scgp, bp, type, addr, len); - -#ifdef DEBUG - if (lverbose > 1) - scg_prbytes("Track info:", (Uchar *)bp, - len-scg_getresid(scgp)); -#endif - return (ret); -} - -EXPORT int -read_rzone_info(scgp, bp, cnt) - SCSI *scgp; - caddr_t bp; - int cnt; -{ - return (get_trackinfo(scgp, bp, TI_TYPE_LBA, 0, cnt)); -} - -EXPORT int -reserve_tr_rzone(scgp, size) - SCSI *scgp; - long size; /* number of blocks */ -{ - register struct scg_cmd *scmd = scgp->scmd; - - fillbytes((caddr_t)scmd, sizeof (*scmd), '\0'); - scmd->addr = (caddr_t)0; - scmd->size = 0; - scmd->flags = SCG_DISRE_ENA|SCG_CMD_RETRY; - scmd->cdb_len = SC_G1_CDBLEN; - scmd->sense_len = CCS_SENSE_LEN; - scmd->cdb.g1_cdb.cmd = 0x53; - scmd->cdb.g1_cdb.lun = scg_lun(scgp); - - i_to_4_byte(&scmd->cdb.g1_cdb.addr[3], size); - - scgp->cmdname = "reserve_track_rzone"; - - if (scg_cmd(scgp) < 0) - return (-1); - return (0); -} - -EXPORT int -read_dvd_structure(scgp, bp, cnt, mt, addr, layer, fmt) - SCSI *scgp; - caddr_t bp; - int cnt; - int mt; - int addr; - int layer; - int fmt; -{ - register struct scg_cmd *scmd = scgp->scmd; - - fillbytes((caddr_t)scmd, sizeof (*scmd), '\0'); - scmd->addr = bp; - scmd->size = cnt; - scmd->flags = SCG_RECV_DATA|SCG_DISRE_ENA; - scmd->cdb_len = SC_G5_CDBLEN; - scmd->sense_len = CCS_SENSE_LEN; - scmd->timeout = 4 * 60; /* Needs up to 2 minutes ??? */ - scmd->cdb.g5_cdb.cmd = 0xAD; - scmd->cdb.g5_cdb.lun = scg_lun(scgp); - scmd->cdb.cmd_cdb[1] |= (mt & 0x0F); /* Media Type */ - g5_cdbaddr(&scmd->cdb.g5_cdb, addr); - g5_cdblen(&scmd->cdb.g5_cdb, cnt); - scmd->cdb.g5_cdb.count[0] = layer; - scmd->cdb.g5_cdb.count[1] = fmt; - - scgp->cmdname = "read dvd structure"; - - if (scg_cmd(scgp) < 0) - return (-1); - return (0); -} - -EXPORT int -send_dvd_structure(scgp, bp, cnt, fmt) - SCSI *scgp; - caddr_t bp; - int cnt; - int fmt; -{ - register struct scg_cmd *scmd = scgp->scmd; - - fillbytes((caddr_t)scmd, sizeof (*scmd), '\0'); - scmd->addr = bp; - scmd->size = cnt; - scmd->flags = SCG_DISRE_ENA; - scmd->cdb_len = SC_G5_CDBLEN; - scmd->sense_len = CCS_SENSE_LEN; - scmd->timeout = 4 * 60; /* Needs up to 2 minutes ??? */ - scmd->cdb.g5_cdb.cmd = 0xBF; - scmd->cdb.g5_cdb.lun = scg_lun(scgp); - g5_cdblen(&scmd->cdb.g5_cdb, cnt); - scmd->cdb.g5_cdb.count[0] = 0; - scmd->cdb.g5_cdb.count[1] = fmt; - - scgp->cmdname = "send dvd structure"; - - if (scg_cmd(scgp) < 0) - return (-1); - return (0); -} - -EXPORT int -send_opc(scgp, bp, cnt, doopc) - SCSI *scgp; - caddr_t bp; - int cnt; - int doopc; -{ - register struct scg_cmd *scmd = scgp->scmd; - - fillbytes((caddr_t)scmd, sizeof (*scmd), '\0'); - scmd->addr = bp; - scmd->size = cnt; - scmd->flags = SCG_DISRE_ENA; - scmd->cdb_len = SC_G1_CDBLEN; - scmd->sense_len = CCS_SENSE_LEN; - scmd->timeout = 60; - scmd->cdb.g1_cdb.cmd = 0x54; - scmd->cdb.g1_cdb.lun = scg_lun(scgp); - scmd->cdb.g1_cdb.reladr = doopc?1:0; - g1_cdblen(&scmd->cdb.g1_cdb, cnt); - - scgp->cmdname = "send opc"; - - if (scg_cmd(scgp) < 0) - return (-1); - return (0); -} - -EXPORT int -read_track_info_philips(scgp, bp, track, cnt) - SCSI *scgp; - caddr_t bp; - int track; - int cnt; - -{ - register struct scg_cmd *scmd = scgp->scmd; - - fillbytes((caddr_t)scmd, sizeof (*scmd), '\0'); - scmd->addr = bp; - scmd->size = cnt; - scmd->flags = SCG_RECV_DATA|SCG_DISRE_ENA; - scmd->cdb_len = SC_G1_CDBLEN; - scmd->sense_len = CCS_SENSE_LEN; - scmd->cdb.g1_cdb.cmd = 0xE5; - scmd->cdb.g1_cdb.lun = scg_lun(scgp); - g1_cdbaddr(&scmd->cdb.g1_cdb, track); - g1_cdblen(&scmd->cdb.g1_cdb, cnt); - - scgp->cmdname = "read track info"; - - if (scg_cmd(scgp) < 0) - return (-1); - return (0); -} - -EXPORT int -scsi_close_tr_session(scgp, type, track, immed) - SCSI *scgp; - int type; - int track; - BOOL immed; -{ - register struct scg_cmd *scmd = scgp->scmd; - - fillbytes((caddr_t)scmd, sizeof (*scmd), '\0'); - scmd->flags = SCG_DISRE_ENA; - scmd->cdb_len = SC_G1_CDBLEN; - scmd->sense_len = CCS_SENSE_LEN; - scmd->timeout = 8 * 60; /* Needs up to 4 minutes */ - scmd->cdb.g1_cdb.cmd = 0x5B; - scmd->cdb.g1_cdb.lun = scg_lun(scgp); - scmd->cdb.g1_cdb.addr[0] = type; - scmd->cdb.g1_cdb.addr[3] = track; - - if (immed) - scmd->cdb.g1_cdb.reladr = 1; -/* scmd->cdb.cmd_cdb[1] |= 0x01;*/ -#ifdef nono - scmd->cdb.g1_cdb.reladr = 1; /* IMM hack to test Mitsumi behaviour*/ -#endif - - scgp->cmdname = "close track/session"; - - if (scg_cmd(scgp) < 0) - return (-1); - return (0); -} - -EXPORT int -read_master_cue(scgp, bp, sheet, cnt) - SCSI *scgp; - caddr_t bp; /* address of master cue sheet */ - int sheet; /* Sheet number */ - int cnt; /* Transfer count */ -{ - register struct scg_cmd *scmd = scgp->scmd; - - fillbytes((caddr_t)scmd, sizeof (*scmd), '\0'); - scmd->addr = bp; - scmd->size = cnt; - scmd->flags = SCG_RECV_DATA|SCG_DISRE_ENA; - scmd->cdb_len = SC_G1_CDBLEN; - scmd->sense_len = CCS_SENSE_LEN; - scmd->cdb.g1_cdb.cmd = 0x59; /* Read master cue */ - scmd->cdb.g1_cdb.lun = scg_lun(scgp); - scmd->cdb.g1_cdb.addr[2] = sheet; - g1_cdblen(&scmd->cdb.g1_cdb, cnt); - - scgp->cmdname = "read master cue"; - - if (scg_cmd(scgp) < 0) - return (-1); - return (0); -} - -EXPORT int -send_cue_sheet(scgp, bp, size) - SCSI *scgp; - caddr_t bp; /* address of cue sheet buffer */ - long size; /* number of bytes to transfer */ -{ - register struct scg_cmd *scmd = scgp->scmd; - - fillbytes((caddr_t)scmd, sizeof (*scmd), '\0'); - scmd->addr = bp; - scmd->size = size; - scmd->flags = SCG_DISRE_ENA; - scmd->cdb_len = SC_G1_CDBLEN; - scmd->sense_len = CCS_SENSE_LEN; - scmd->cdb.g1_cdb.cmd = 0x5D; /* Send CUE sheet */ - scmd->cdb.g1_cdb.lun = scg_lun(scgp); - g1_cdblen(&scmd->cdb.g1_cdb, size); - - scgp->cmdname = "send_cue_sheet"; - - if (scg_cmd(scgp) < 0) - return (-1); - return (size - scmd->resid); -} - -EXPORT int -read_buff_cap(scgp, sp, fp) - SCSI *scgp; - long *sp; /* Size pointer */ - long *fp; /* Free pointer */ -{ - char resp[12]; - Ulong freespace; - Ulong bufsize; - int per; - register struct scg_cmd *scmd = scgp->scmd; - - fillbytes((caddr_t)scmd, sizeof (*scmd), '\0'); - scmd->addr = (caddr_t)resp; - scmd->size = sizeof (resp); - scmd->flags = SCG_RECV_DATA|SCG_DISRE_ENA; - scmd->cdb_len = SC_G1_CDBLEN; - scmd->sense_len = CCS_SENSE_LEN; - scmd->cdb.g1_cdb.cmd = 0x5C; /* Read buffer cap */ - scmd->cdb.g1_cdb.lun = scg_lun(scgp); - g1_cdblen(&scmd->cdb.g1_cdb, sizeof (resp)); - - scgp->cmdname = "read buffer cap"; - - if (scg_cmd(scgp) < 0) - return (-1); - - bufsize = a_to_u_4_byte(&resp[4]); - freespace = a_to_u_4_byte(&resp[8]); - if (sp) - *sp = bufsize; - if (fp) - *fp = freespace; - - if (scgp->verbose || (sp == 0 && fp == 0)) - printf("BFree: %ld K BSize: %ld K\n", freespace >> 10, bufsize >> 10); - - if (bufsize == 0) - return (0); - per = (100 * (bufsize - freespace)) / bufsize; - if (per < 0) - return (0); - if (per > 100) - return (100); - return (per); -} - -EXPORT int -scsi_blank(scgp, addr, blanktype, immed) - SCSI *scgp; - long addr; - int blanktype; - BOOL immed; -{ - register struct scg_cmd *scmd = scgp->scmd; - - fillbytes((caddr_t)scmd, sizeof (*scmd), '\0'); - scmd->flags = SCG_DISRE_ENA; - scmd->cdb_len = SC_G5_CDBLEN; - scmd->sense_len = CCS_SENSE_LEN; - scmd->timeout = 160 * 60; /* full blank at 1x could take 80 minutes */ - scmd->cdb.g5_cdb.cmd = 0xA1; /* Blank */ - scmd->cdb.g0_cdb.high_addr = blanktype; - g1_cdbaddr(&scmd->cdb.g5_cdb, addr); - - if (immed) - scmd->cdb.g5_cdb.res |= 8; -/* scmd->cdb.cmd_cdb[1] |= 0x10;*/ - - scgp->cmdname = "blank unit"; - - return (scg_cmd(scgp)); -} - -/* - * XXX First try to handle ATAPI: - * XXX ATAPI cannot handle SCSI 6 byte commands. - * XXX We try to simulate 6 byte mode sense/select. - */ -LOCAL BOOL is_atapi; - -EXPORT BOOL -allow_atapi(scgp, new) - SCSI *scgp; - BOOL new; -{ - BOOL old = is_atapi; - Uchar mode[256]; - - if (new == old) - return (old); - - scgp->silent++; - /* - * If a bad drive has been reset before, we may need to fire up two - * test unit ready commands to clear status. - */ - (void) unit_ready(scgp); - if (new && - mode_sense_g1(scgp, mode, 8, 0x3F, 0) < 0) { /* All pages current */ - new = FALSE; - } - scgp->silent--; - - is_atapi = new; - return (old); -} - -EXPORT int -mode_select(scgp, dp, cnt, smp, pf) - SCSI *scgp; - Uchar *dp; - int cnt; - int smp; - int pf; -{ - if (is_atapi) - return (mode_select_sg0(scgp, dp, cnt, smp, pf)); - return (mode_select_g0(scgp, dp, cnt, smp, pf)); -} - -EXPORT int -mode_sense(scgp, dp, cnt, page, pcf) - SCSI *scgp; - Uchar *dp; - int cnt; - int page; - int pcf; -{ - if (is_atapi) - return (mode_sense_sg0(scgp, dp, cnt, page, pcf)); - return (mode_sense_g0(scgp, dp, cnt, page, pcf)); -} - -/* - * Simulate mode select g0 with mode select g1. - */ -EXPORT int -mode_select_sg0(scgp, dp, cnt, smp, pf) - SCSI *scgp; - Uchar *dp; - int cnt; - int smp; - int pf; -{ - Uchar xmode[256+4]; - int amt = cnt; - - if (amt < 1 || amt > 255) { - /* XXX clear SCSI error codes ??? */ - return (-1); - } - - if (amt < 4) { /* Data length. medium type & VU */ - amt += 1; - } else { - amt += 4; - movebytes(&dp[4], &xmode[8], cnt-4); - } - xmode[0] = 0; - xmode[1] = 0; - xmode[2] = dp[1]; - xmode[3] = dp[2]; - xmode[4] = 0; - xmode[5] = 0; - i_to_2_byte(&xmode[6], (unsigned int)dp[3]); - - if (scgp->verbose) scg_prbytes("Mode Parameters (un-converted)", dp, cnt); - - return (mode_select_g1(scgp, xmode, amt, smp, pf)); -} - -/* - * Simulate mode sense g0 with mode sense g1. - */ -EXPORT int -mode_sense_sg0(scgp, dp, cnt, page, pcf) - SCSI *scgp; - Uchar *dp; - int cnt; - int page; - int pcf; -{ - Uchar xmode[256+4]; - int amt = cnt; - int len; - - if (amt < 1 || amt > 255) { - /* XXX clear SCSI error codes ??? */ - return (-1); - } - - fillbytes((caddr_t)xmode, sizeof (xmode), '\0'); - if (amt < 4) { /* Data length. medium type & VU */ - amt += 1; - } else { - amt += 4; - } - if (mode_sense_g1(scgp, xmode, amt, page, pcf) < 0) - return (-1); - - amt = cnt - scg_getresid(scgp); -/* - * For tests: Solaris 8 & LG CD-ROM always returns resid == amt - */ -/* amt = cnt;*/ - if (amt > 4) - movebytes(&xmode[8], &dp[4], amt-4); - len = a_to_u_2_byte(xmode); - if (len == 0) { - dp[0] = 0; - } else if (len < 6) { - if (len > 2) - len = 2; - dp[0] = len; - } else { - dp[0] = len - 3; - } - dp[1] = xmode[2]; - dp[2] = xmode[3]; - len = a_to_u_2_byte(&xmode[6]); - dp[3] = len; - - if (scgp->verbose) scg_prbytes("Mode Sense Data (converted)", dp, amt); - return (0); -} - -EXPORT int -mode_select_g0(scgp, dp, cnt, smp, pf) - SCSI *scgp; - Uchar *dp; - int cnt; - int smp; - int pf; -{ - register struct scg_cmd *scmd = scgp->scmd; - - fillbytes((caddr_t)scmd, sizeof (*scmd), '\0'); - scmd->addr = (caddr_t)dp; - scmd->size = cnt; - scmd->flags = SCG_DISRE_ENA; - scmd->cdb_len = SC_G0_CDBLEN; - scmd->sense_len = CCS_SENSE_LEN; - scmd->cdb.g0_cdb.cmd = SC_MODE_SELECT; - scmd->cdb.g0_cdb.lun = scg_lun(scgp); - scmd->cdb.g0_cdb.high_addr = smp ? 1 : 0 | pf ? 0x10 : 0; - scmd->cdb.g0_cdb.count = cnt; - - if (scgp->verbose) { - error("%s ", smp?"Save":"Set "); - scg_prbytes("Mode Parameters", dp, cnt); - } - - scgp->cmdname = "mode select g0"; - - return (scg_cmd(scgp)); -} - -EXPORT int -mode_select_g1(scgp, dp, cnt, smp, pf) - SCSI *scgp; - Uchar *dp; - int cnt; - int smp; - int pf; -{ - register struct scg_cmd *scmd = scgp->scmd; - - fillbytes((caddr_t)scmd, sizeof (*scmd), '\0'); - scmd->addr = (caddr_t)dp; - scmd->size = cnt; - scmd->flags = SCG_DISRE_ENA; - scmd->cdb_len = SC_G1_CDBLEN; - scmd->sense_len = CCS_SENSE_LEN; - scmd->cdb.g1_cdb.cmd = 0x55; - scmd->cdb.g1_cdb.lun = scg_lun(scgp); - scmd->cdb.g0_cdb.high_addr = smp ? 1 : 0 | pf ? 0x10 : 0; - g1_cdblen(&scmd->cdb.g1_cdb, cnt); - - if (scgp->verbose) { - printf("%s ", smp?"Save":"Set "); - scg_prbytes("Mode Parameters", dp, cnt); - } - - scgp->cmdname = "mode select g1"; - - return (scg_cmd(scgp)); -} - -EXPORT int -mode_sense_g0(scgp, dp, cnt, page, pcf) - SCSI *scgp; - Uchar *dp; - int cnt; - int page; - int pcf; -{ - register struct scg_cmd *scmd = scgp->scmd; - - fillbytes((caddr_t)scmd, sizeof (*scmd), '\0'); - scmd->addr = (caddr_t)dp; - scmd->size = 0xFF; - scmd->size = cnt; - scmd->flags = SCG_RECV_DATA|SCG_DISRE_ENA; - scmd->cdb_len = SC_G0_CDBLEN; - scmd->sense_len = CCS_SENSE_LEN; - scmd->cdb.g0_cdb.cmd = SC_MODE_SENSE; - scmd->cdb.g0_cdb.lun = scg_lun(scgp); -#ifdef nonono - scmd->cdb.g0_cdb.high_addr = 1<<4; /* DBD Disable Block desc. */ -#endif - scmd->cdb.g0_cdb.mid_addr = (page&0x3F) | ((pcf<<6)&0xC0); - scmd->cdb.g0_cdb.count = page ? 0xFF : 24; - scmd->cdb.g0_cdb.count = cnt; - - scgp->cmdname = "mode sense g0"; - - if (scg_cmd(scgp) < 0) - return (-1); - if (scgp->verbose) scg_prbytes("Mode Sense Data", dp, cnt - scg_getresid(scgp)); - return (0); -} - -EXPORT int -mode_sense_g1(scgp, dp, cnt, page, pcf) - SCSI *scgp; - Uchar *dp; - int cnt; - int page; - int pcf; -{ - register struct scg_cmd *scmd = scgp->scmd; - - fillbytes((caddr_t)scmd, sizeof (*scmd), '\0'); - scmd->addr = (caddr_t)dp; - scmd->size = cnt; - scmd->flags = SCG_RECV_DATA|SCG_DISRE_ENA; - scmd->cdb_len = SC_G1_CDBLEN; - scmd->sense_len = CCS_SENSE_LEN; - scmd->cdb.g1_cdb.cmd = 0x5A; - scmd->cdb.g1_cdb.lun = scg_lun(scgp); -#ifdef nonono - scmd->cdb.g0_cdb.high_addr = 1<<4; /* DBD Disable Block desc. */ -#endif - scmd->cdb.g1_cdb.addr[0] = (page&0x3F) | ((pcf<<6)&0xC0); - g1_cdblen(&scmd->cdb.g1_cdb, cnt); - - scgp->cmdname = "mode sense g1"; - - if (scg_cmd(scgp) < 0) - return (-1); - if (scgp->verbose) scg_prbytes("Mode Sense Data", dp, cnt - scg_getresid(scgp)); - return (0); -} - -struct trackdesc { - Uchar res0; - -#if defined(_BIT_FIELDS_LTOH) /* Intel byteorder */ - Ucbit control : 4; - Ucbit adr : 4; -#else /* Motorola byteorder */ - Ucbit adr : 4; - Ucbit control : 4; -#endif - - Uchar track; - Uchar res3; - Uchar addr[4]; -}; - -struct diskinfo { - struct tocheader hd; - struct trackdesc desc[1]; -}; - -struct siheader { - Uchar len[2]; - Uchar finished; - Uchar unfinished; -}; - -struct sidesc { - Uchar sess_number; - Uchar res1; - Uchar track; - Uchar res3; - Uchar addr[4]; -}; - -struct sinfo { - struct siheader hd; - struct sidesc desc[1]; -}; - -struct trackheader { - Uchar mode; - Uchar res[3]; - Uchar addr[4]; -}; -#define TRM_ZERO 0 -#define TRM_USER_ECC 1 /* 2048 bytes user data + 288 Bytes ECC/EDC */ -#define TRM_USER 2 /* All user data (2336 bytes) */ - - -EXPORT int -read_tochdr(scgp, dp, fp, lp) - SCSI *scgp; - cdr_t *dp; - int *fp; - int *lp; -{ - struct tocheader *tp; - char xb[256]; - int len; - - tp = (struct tocheader *)xb; - - fillbytes((caddr_t)xb, sizeof (xb), '\0'); - if (read_toc(scgp, xb, 0, sizeof (struct tocheader), 0, FMT_TOC) < 0) { - if (scgp->silent == 0) - errmsgno(EX_BAD, "Cannot read TOC header\n"); - return (-1); - } - len = a_to_u_2_byte(tp->len) + sizeof (struct tocheader)-2; - if (len >= 4) { - if (fp) - *fp = tp->first; - if (lp) - *lp = tp->last; - return (0); - } - return (-1); -} - -EXPORT int -read_cdtext(scgp) - SCSI *scgp; -{ - struct tocheader *tp; - char xb[256]; - int len; - char xxb[10000]; - - tp = (struct tocheader *)xb; - - fillbytes((caddr_t)xb, sizeof (xb), '\0'); - if (read_toc(scgp, xb, 0, sizeof (struct tocheader), 0, FMT_CDTEXT) < 0) { - if (scgp->silent == 0 || scgp->verbose > 0) - errmsgno(EX_BAD, "Cannot read CD-Text header\n"); - return (-1); - } - len = a_to_u_2_byte(tp->len) + sizeof (struct tocheader)-2; - printf("CD-Text len: %d\n", len); - - if (read_toc(scgp, xxb, 0, len, 0, FMT_CDTEXT) < 0) { - if (scgp->silent == 0) - errmsgno(EX_BAD, "Cannot read CD-Text\n"); - return (-1); - } - { - FILE *f = fileopen("cdtext.dat", "wctb"); - filewrite(f, xxb, len); - } - return (0); -} - -EXPORT int -read_trackinfo(scgp, track, offp, msfp, adrp, controlp, modep) - SCSI *scgp; - int track; - long *offp; - struct msf *msfp; - int *adrp; - int *controlp; - int *modep; -{ - struct diskinfo *dp; - char xb[256]; - int len; - - dp = (struct diskinfo *)xb; - - fillbytes((caddr_t)xb, sizeof (xb), '\0'); - if (read_toc(scgp, xb, track, sizeof (struct diskinfo), 0, FMT_TOC) < 0) { - if (scgp->silent <= 0) - errmsgno(EX_BAD, "Cannot read TOC\n"); - return (-1); - } - len = a_to_u_2_byte(dp->hd.len) + sizeof (struct tocheader)-2; - if (len < (int)sizeof (struct diskinfo)) - return (-1); - - if (offp) - *offp = a_to_4_byte(dp->desc[0].addr); - if (adrp) - *adrp = dp->desc[0].adr; - if (controlp) - *controlp = dp->desc[0].control; - - if (msfp) { - scgp->silent++; - if (read_toc(scgp, xb, track, sizeof (struct diskinfo), 1, FMT_TOC) - >= 0) { - msfp->msf_min = dp->desc[0].addr[1]; - msfp->msf_sec = dp->desc[0].addr[2]; - msfp->msf_frame = dp->desc[0].addr[3]; - } else if (read_toc(scgp, xb, track, sizeof (struct diskinfo), 0, FMT_TOC) - >= 0) { - /* - * Some drives (e.g. the Philips CDD-522) don't support - * to read the TOC in MSF mode. - */ - long off = a_to_4_byte(dp->desc[0].addr); - - lba_to_msf(off, msfp); - } else { - msfp->msf_min = 0; - msfp->msf_sec = 0; - msfp->msf_frame = 0; - } - scgp->silent--; - } - - if (modep == NULL) - return (0); - - if (track == 0xAA) { - *modep = -1; - return (0); - } - - fillbytes((caddr_t)xb, sizeof (xb), '\0'); - - scgp->silent++; - if (read_header(scgp, xb, *offp, 8, 0) >= 0) { - *modep = xb[0]; - } else if (read_track_info_philips(scgp, xb, track, 14) >= 0) { - *modep = xb[0xb] & 0xF; - } else { - *modep = -1; - } - scgp->silent--; - return (0); -} - -EXPORT int -read_B0(scgp, isbcd, b0p, lop) - SCSI *scgp; - BOOL isbcd; - long *b0p; - long *lop; -{ - struct fdiskinfo *dp; - struct ftrackdesc *tp; - char xb[8192]; - char *pe; - int len; - long l; - - dp = (struct fdiskinfo *)xb; - - fillbytes((caddr_t)xb, sizeof (xb), '\0'); - if (read_toc_philips(scgp, xb, 1, sizeof (struct tocheader), 0, FMT_FULLTOC) < 0) { - return (-1); - } - len = a_to_u_2_byte(dp->hd.len) + sizeof (struct tocheader)-2; - if (len < (int)sizeof (struct fdiskinfo)) - return (-1); - if (read_toc_philips(scgp, xb, 1, len, 0, FMT_FULLTOC) < 0) { - return (-1); - } - if (scgp->verbose) { - scg_prbytes("TOC data: ", (Uchar *)xb, - len > (int)sizeof (xb) - scg_getresid(scgp) ? - sizeof (xb) - scg_getresid(scgp) : len); - - tp = &dp->desc[0]; - pe = &xb[len]; - - while ((char *)tp < pe) { - scg_prbytes("ENT: ", (Uchar *)tp, 11); - tp++; - } - } - tp = &dp->desc[0]; - pe = &xb[len]; - - for (; (char *)tp < pe; tp++) { - if (tp->sess_number != dp->hd.last) - continue; - if (tp->point != 0xB0) - continue; - if (scgp->verbose) - scg_prbytes("B0: ", (Uchar *)tp, 11); - if (isbcd) { - l = msf_to_lba(from_bcd(tp->amin), - from_bcd(tp->asec), - from_bcd(tp->aframe), TRUE); - } else { - l = msf_to_lba(tp->amin, - tp->asec, - tp->aframe, TRUE); - } - if (b0p) - *b0p = l; - - if (scgp->verbose) - printf("B0 start: %ld\n", l); - - if (isbcd) { - l = msf_to_lba(from_bcd(tp->pmin), - from_bcd(tp->psec), - from_bcd(tp->pframe), TRUE); - } else { - l = msf_to_lba(tp->pmin, - tp->psec, - tp->pframe, TRUE); - } - - if (scgp->verbose) - printf("B0 lout: %ld\n", l); - if (lop) - *lop = l; - return (0); - } - return (-1); -} - - -/* - * Return address of first track in last session (SCSI-3/mmc version). - */ -EXPORT int -read_session_offset(scgp, offp) - SCSI *scgp; - long *offp; -{ - struct diskinfo *dp; - char xb[256]; - int len; - - dp = (struct diskinfo *)xb; - - fillbytes((caddr_t)xb, sizeof (xb), '\0'); - if (read_toc(scgp, (caddr_t)xb, 0, sizeof (struct tocheader), 0, FMT_SINFO) < 0) - return (-1); - - if (scgp->verbose) - scg_prbytes("tocheader: ", - (Uchar *)xb, sizeof (struct tocheader) - scg_getresid(scgp)); - - len = a_to_u_2_byte(dp->hd.len) + sizeof (struct tocheader)-2; - if (len > (int)sizeof (xb)) { - errmsgno(EX_BAD, "Session info too big.\n"); - return (-1); - } - if (read_toc(scgp, (caddr_t)xb, 0, len, 0, FMT_SINFO) < 0) - return (-1); - - if (scgp->verbose) - scg_prbytes("tocheader: ", - (Uchar *)xb, len - scg_getresid(scgp)); - - dp = (struct diskinfo *)xb; - if (offp) - *offp = a_to_u_4_byte(dp->desc[0].addr); - return (0); -} - -/* - * Return address of first track in last session (pre SCSI-3 version). - */ -EXPORT int -read_session_offset_philips(scgp, offp) - SCSI *scgp; - long *offp; -{ - struct sinfo *sp; - char xb[256]; - int len; - - sp = (struct sinfo *)xb; - - fillbytes((caddr_t)xb, sizeof (xb), '\0'); - if (read_toc_philips(scgp, (caddr_t)xb, 0, sizeof (struct siheader), 0, FMT_SINFO) < 0) - return (-1); - len = a_to_u_2_byte(sp->hd.len) + sizeof (struct siheader)-2; - if (len > (int)sizeof (xb)) { - errmsgno(EX_BAD, "Session info too big.\n"); - return (-1); - } - if (read_toc_philips(scgp, (caddr_t)xb, 0, len, 0, FMT_SINFO) < 0) - return (-1); - /* - * Old drives return the number of finished sessions in first/finished - * a descriptor is returned for each session. - * New drives return the number of the first and last session - * one descriptor for the last finished session is returned - * as in SCSI-3 - * In all cases the lowest session number is set to 1. - */ - sp = (struct sinfo *)xb; - if (offp) - *offp = a_to_u_4_byte(sp->desc[sp->hd.finished-1].addr); - return (0); -} - -EXPORT int -sense_secsize(scgp, current) - SCSI *scgp; - int current; -{ - Uchar mode[0x100]; - Uchar *p; - Uchar *ep; - int len; - int secsize = -1; - - scgp->silent++; - (void) unit_ready(scgp); - scgp->silent--; - - /* XXX Quick and dirty, musz verallgemeinert werden !!! */ - - fillbytes(mode, sizeof (mode), '\0'); - scgp->silent++; - - len = sizeof (struct scsi_mode_header) + - sizeof (struct scsi_mode_blockdesc); - /* - * Wenn wir hier get_mode_params() nehmen bekommen wir die Warnung: - * Warning: controller returns wrong page 1 for All pages page (3F). - */ - if (mode_sense(scgp, mode, len, 0x3F, current?0:2) < 0) { - fillbytes(mode, sizeof (mode), '\0'); - if (mode_sense(scgp, mode, len, 0, current?0:2) < 0) { /* VU (block desc) */ - scgp->silent--; - return (-1); - } - } - if (mode[3] == 8) { - if (scgp->debug) { - printf("Density: 0x%X\n", mode[4]); - printf("Blocks: %ld\n", a_to_u_3_byte(&mode[5])); - printf("Blocklen:%ld\n", a_to_u_3_byte(&mode[9])); - } - secsize = a_to_u_3_byte(&mode[9]); - } - fillbytes(mode, sizeof (mode), '\0'); - /* - * The ACARD TECH AEC-7720 ATAPI<->SCSI adaptor - * chokes if we try to transfer more than 0x40 bytes with - * mode_sense of all pages. So try to avoid to run this - * command if possible. - */ - if (scgp->debug && - mode_sense(scgp, mode, 0xFE, 0x3F, current?0:2) >= 0) { /* All Pages */ - - ep = mode+mode[0]; /* Points to last byte of data */ - p = &mode[4]; - p += mode[3]; - printf("Pages: "); - while (p < ep) { - printf("0x%X ", *p&0x3F); - p += p[1]+2; - } - printf("\n"); - } - scgp->silent--; - - return (secsize); -} - -EXPORT int -select_secsize(scgp, secsize) - SCSI *scgp; - int secsize; -{ - struct scsi_mode_data md; - int count = sizeof (struct scsi_mode_header) + - sizeof (struct scsi_mode_blockdesc); - - (void) test_unit_ready(scgp); /* clear any error situation */ - - fillbytes((caddr_t)&md, sizeof (md), '\0'); - md.header.blockdesc_len = 8; - i_to_3_byte(md.blockdesc.lblen, secsize); - - return (mode_select(scgp, (Uchar *)&md, count, 0, scgp->inq->data_format >= 2)); -} - -EXPORT BOOL -is_cddrive(scgp) - SCSI *scgp; -{ - return (scgp->inq->type == INQ_ROMD || scgp->inq->type == INQ_WORM); -} - -EXPORT BOOL -is_unknown_dev(scgp) - SCSI *scgp; -{ - return (scgp->dev == DEV_UNKNOWN); -} - -#ifndef DEBUG -#define DEBUG -#endif -#ifdef DEBUG - -EXPORT int -read_scsi(scgp, bp, addr, cnt) - SCSI *scgp; - caddr_t bp; - long addr; - int cnt; -{ - if (addr <= G0_MAXADDR && cnt < 256 && !is_atapi) - return (read_g0(scgp, bp, addr, cnt)); - else - return (read_g1(scgp, bp, addr, cnt)); -} - -EXPORT int -read_g0(scgp, bp, addr, cnt) - SCSI *scgp; - caddr_t bp; - long addr; - int cnt; -{ - register struct scg_cmd *scmd = scgp->scmd; - - if (scgp->cap->c_bsize <= 0) - raisecond("capacity_not_set", 0L); - - fillbytes((caddr_t)scmd, sizeof (*scmd), '\0'); - scmd->addr = bp; - scmd->size = cnt*scgp->cap->c_bsize; - scmd->flags = SCG_RECV_DATA|SCG_DISRE_ENA; - scmd->cdb_len = SC_G0_CDBLEN; - scmd->sense_len = CCS_SENSE_LEN; - scmd->cdb.g0_cdb.cmd = SC_READ; - scmd->cdb.g0_cdb.lun = scg_lun(scgp); - g0_cdbaddr(&scmd->cdb.g0_cdb, addr); - scmd->cdb.g0_cdb.count = cnt; -/* scmd->cdb.g0_cdb.vu_56 = 1;*/ - - scgp->cmdname = "read_g0"; - - return (scg_cmd(scgp)); -} - -EXPORT int -read_g1(scgp, bp, addr, cnt) - SCSI *scgp; - caddr_t bp; - long addr; - int cnt; -{ - register struct scg_cmd *scmd = scgp->scmd; - - if (scgp->cap->c_bsize <= 0) - raisecond("capacity_not_set", 0L); - - fillbytes((caddr_t)scmd, sizeof (*scmd), '\0'); - scmd->addr = bp; - scmd->size = cnt*scgp->cap->c_bsize; - scmd->flags = SCG_RECV_DATA|SCG_DISRE_ENA; - scmd->cdb_len = SC_G1_CDBLEN; - scmd->sense_len = CCS_SENSE_LEN; - scmd->cdb.g1_cdb.cmd = SC_EREAD; - scmd->cdb.g1_cdb.lun = scg_lun(scgp); - g1_cdbaddr(&scmd->cdb.g1_cdb, addr); - g1_cdblen(&scmd->cdb.g1_cdb, cnt); - - scgp->cmdname = "read_g1"; - - return (scg_cmd(scgp)); -} -#endif /* DEBUG */ - -EXPORT BOOL -getdev(scgp, print) - SCSI *scgp; - BOOL print; -{ - BOOL got_inquiry = TRUE; - char vendor_info[8+1]; - char prod_ident[16+1]; - char prod_revision[4+1]; - int inq_len = 0; - register struct scg_cmd *scmd = scgp->scmd; - register struct scsi_inquiry *inq = scgp->inq; - - - fillbytes((caddr_t)inq, sizeof (*inq), '\0'); - scgp->dev = DEV_UNKNOWN; - scgp->silent++; - (void) unit_ready(scgp); - if (scmd->error >= SCG_FATAL && - !(scmd->scb.chk && scmd->sense_count > 0)) { - scgp->silent--; - return (FALSE); - } - - -/* if (scmd->error < SCG_FATAL || scmd->scb.chk && scmd->sense_count > 0){*/ - - if (inquiry(scgp, (caddr_t)inq, sizeof (*inq)) < 0) { - got_inquiry = FALSE; - } else { - inq_len = sizeof (*inq) - scg_getresid(scgp); - } - if (!got_inquiry) { - if (scgp->verbose) { - printf( - "error: %d scb.chk: %d sense_count: %d sense.code: 0x%x\n", - scmd->error, scmd->scb.chk, - scmd->sense_count, scmd->sense.code); - } - /* - * Folgende Kontroller kennen das Kommando - * INQUIRY nicht: - * - * ADAPTEC ACB-4000, ACB-4010, ACB 4070 - * SYSGEN SC4000 - * - * Leider reagieren ACB40X0 und ACB5500 identisch - * wenn drive not ready (code == not ready), - * sie sind dann nicht zu unterscheiden. - */ - - if (scmd->scb.chk && scmd->sense_count == 4) { - /* Test auf SYSGEN */ - (void) qic02(scgp, 0x12); /* soft lock on */ - if (qic02(scgp, 1) < 0) { /* soft lock off */ - scgp->dev = DEV_ACB40X0; -/* scgp->dev = acbdev();*/ - } else { - scgp->dev = DEV_SC4000; - inq->type = INQ_SEQD; - inq->removable = 1; - } - } - } else if (scgp->verbose) { - int i; - int len = inq->add_len + 5; - Uchar ibuf[256+5]; - Uchar *ip = (Uchar *)inq; - Uchar c; - - if (len > (int)sizeof (*inq) && - inquiry(scgp, (caddr_t)ibuf, inq->add_len+5) >= 0) { - len = inq->add_len+5 - scg_getresid(scgp); - ip = ibuf; - } else { - len = sizeof (*inq); - } - printf("Inquiry Data : "); - for (i = 0; i < len; i++) { - c = ip[i]; - if (c >= ' ' && c < 0177) - printf("%c", c); - else - printf("."); - } - printf("\n"); - } - - strncpy(vendor_info, inq->vendor_info, sizeof (inq->vendor_info)); - strncpy(prod_ident, inq->prod_ident, sizeof (inq->prod_ident)); - strncpy(prod_revision, inq->prod_revision, sizeof (inq->prod_revision)); - - vendor_info[sizeof (inq->vendor_info)] = '\0'; - prod_ident[sizeof (inq->prod_ident)] = '\0'; - prod_revision[sizeof (inq->prod_revision)] = '\0'; - - switch (inq->type) { - - case INQ_DASD: - if (inq->add_len == 0 && inq->vendor_info[0] != '\0') { - Uchar *p; - /* - * NT-4.0 creates fake inquiry data for IDE disks. - * Unfortunately, it does not set add_len wo we - * check if vendor_info, prod_ident and prod_revision - * contains valid chars for a CCS inquiry. - */ - if (inq_len >= 36) - inq->add_len = 31; - - for (p = (Uchar *)&inq->vendor_info[0]; - p < (Uchar *)&inq->prod_revision[4]; - p++) { - if (*p < 0x20 || *p > 0x7E) { - inq->add_len = 0; - break; - } - } - } - if (inq->add_len == 0) { - if (scgp->dev == DEV_UNKNOWN && got_inquiry) { - scgp->dev = DEV_ACB5500; - strcpy(inq->vendor_info, - "ADAPTEC ACB-5500 FAKE"); - - } else switch (scgp->dev) { - - case DEV_ACB40X0: - strcpy(inq->vendor_info, - "ADAPTEC ACB-40X0 FAKE"); - break; - case DEV_ACB4000: - strcpy(inq->vendor_info, - "ADAPTEC ACB-4000 FAKE"); - break; - case DEV_ACB4010: - strcpy(inq->vendor_info, - "ADAPTEC ACB-4010 FAKE"); - break; - case DEV_ACB4070: - strcpy(inq->vendor_info, - "ADAPTEC ACB-4070 FAKE"); - break; - } - } else if (inq->add_len < 31) { - scgp->dev = DEV_NON_CCS_DSK; - - } else if (strbeg("EMULEX", vendor_info)) { - if (strbeg("MD21", prod_ident)) - scgp->dev = DEV_MD21; - if (strbeg("MD23", prod_ident)) - scgp->dev = DEV_MD23; - else - scgp->dev = DEV_CCS_GENDISK; - } else if (strbeg("ADAPTEC", vendor_info)) { - if (strbeg("ACB-4520", prod_ident)) - scgp->dev = DEV_ACB4520A; - if (strbeg("ACB-4525", prod_ident)) - scgp->dev = DEV_ACB4525; - else - scgp->dev = DEV_CCS_GENDISK; - } else if (strbeg("SONY", vendor_info) && - strbeg("SMO-C501", prod_ident)) { - scgp->dev = DEV_SONY_SMO; - } else { - scgp->dev = DEV_CCS_GENDISK; - } - break; - - case INQ_SEQD: - if (scgp->dev == DEV_SC4000) { - strcpy(inq->vendor_info, - "SYSGEN SC4000 FAKE"); - } else if (inq->add_len == 0 && - inq->removable && - inq->ansi_version == 1) { - scgp->dev = DEV_MT02; - strcpy(inq->vendor_info, - "EMULEX MT02 FAKE"); - } - break; - -/* case INQ_OPTD:*/ - case INQ_ROMD: - case INQ_WORM: - if (strbeg("RXT-800S", prod_ident)) - scgp->dev = DEV_RXT800S; - - /* - * Start of CD-Recorders: - */ - if (strbeg("ACER", vendor_info)) { - if (strbeg("CR-4020C", prod_ident)) - scgp->dev = DEV_RICOH_RO_1420C; - - } else if (strbeg("CREATIVE", vendor_info)) { - if (strbeg("CDR2000", prod_ident)) - scgp->dev = DEV_RICOH_RO_1060C; - - } else if (strbeg("GRUNDIG", vendor_info)) { - if (strbeg("CDR100IPW", prod_ident)) - scgp->dev = DEV_CDD_2000; - - } else if (strbeg("JVC", vendor_info)) { - if (strbeg("XR-W2001", prod_ident)) - scgp->dev = DEV_TEAC_CD_R50S; - else if (strbeg("XR-W2010", prod_ident)) - scgp->dev = DEV_TEAC_CD_R50S; - else if (strbeg("R2626", prod_ident)) - scgp->dev = DEV_TEAC_CD_R50S; - - } else if (strbeg("MITSBISH", vendor_info)) { - -#ifdef XXXX_REALLY - /* It's MMC compliant */ - if (strbeg("CDRW226", prod_ident)) - scgp->dev = DEV_MMC_CDRW; -#else - /* EMPTY */ -#endif - - } else if (strbeg("MITSUMI", vendor_info)) { - /* Don't know any product string */ - scgp->dev = DEV_CDD_522; - - } else if (strbeg("OPTIMA", vendor_info)) { - if (strbeg("CD-R 650", prod_ident)) - scgp->dev = DEV_SONY_CDU_924; - - } else if (strbeg("PHILIPS", vendor_info) || - strbeg("IMS", vendor_info) || - strbeg("KODAK", vendor_info) || - strbeg("HP", vendor_info)) { - - if (strbeg("CDD521/00", prod_ident)) - scgp->dev = DEV_CDD_521_OLD; - else if (strbeg("CDD521/02", prod_ident)) - scgp->dev = DEV_CDD_521_OLD; /* PCD 200R? */ - else if (strbeg("CDD521", prod_ident)) - scgp->dev = DEV_CDD_521; - - if (strbeg("CDD522", prod_ident)) - scgp->dev = DEV_CDD_522; - if (strbeg("PCD225", prod_ident)) - scgp->dev = DEV_CDD_522; - if (strbeg("KHSW/OB", prod_ident)) /* PCD600 */ - scgp->dev = DEV_PCD_600; - if (strbeg("CDR-240", prod_ident)) - scgp->dev = DEV_CDD_2000; - - if (strbeg("CDD20", prod_ident)) - scgp->dev = DEV_CDD_2000; - if (strbeg("CDD26", prod_ident)) - scgp->dev = DEV_CDD_2600; - - if (strbeg("C4324/C4325", prod_ident)) - scgp->dev = DEV_CDD_2000; - if (strbeg("CD-Writer 6020", prod_ident)) - scgp->dev = DEV_CDD_2600; - - } else if (strbeg("PINNACLE", vendor_info)) { - if (strbeg("RCD-1000", prod_ident)) - scgp->dev = DEV_TEAC_CD_R50S; - if (strbeg("RCD5020", prod_ident)) - scgp->dev = DEV_TEAC_CD_R50S; - if (strbeg("RCD5040", prod_ident)) - scgp->dev = DEV_TEAC_CD_R50S; - if (strbeg("RCD 4X4", prod_ident)) - scgp->dev = DEV_TEAC_CD_R50S; - - } else if (strbeg("PIONEER", vendor_info)) { - if (strbeg("CD-WO DW-S114X", prod_ident)) - scgp->dev = DEV_PIONEER_DW_S114X; - else if (strbeg("CD-WO DR-R504X", prod_ident)) /* Reoprt from philip@merge.com */ - scgp->dev = DEV_PIONEER_DW_S114X; - else if (strbeg("DVD-R DVR-S101", prod_ident)) - scgp->dev = DEV_PIONEER_DVDR_S101; - - } else if (strbeg("PLASMON", vendor_info)) { - if (strbeg("RF4100", prod_ident)) - scgp->dev = DEV_PLASMON_RF_4100; - else if (strbeg("CDR4220", prod_ident)) - scgp->dev = DEV_CDD_2000; - - } else if (strbeg("PLEXTOR", vendor_info)) { - if (strbeg("CD-R PX-R24CS", prod_ident)) - scgp->dev = DEV_RICOH_RO_1420C; - - } else if (strbeg("RICOH", vendor_info)) { - if (strbeg("RO-1420C", prod_ident)) - scgp->dev = DEV_RICOH_RO_1420C; - if (strbeg("RO1060C", prod_ident)) - scgp->dev = DEV_RICOH_RO_1060C; - - } else if (strbeg("SAF", vendor_info)) { /* Smart & Friendly */ - if (strbeg("CD-R2004", prod_ident) || - strbeg("CD-R2006 ", prod_ident)) - scgp->dev = DEV_SONY_CDU_924; - else if (strbeg("CD-R2006PLUS", prod_ident)) - scgp->dev = DEV_TEAC_CD_R50S; - else if (strbeg("CD-RW226", prod_ident)) - scgp->dev = DEV_TEAC_CD_R50S; - else if (strbeg("CD-R4012", prod_ident)) - scgp->dev = DEV_TEAC_CD_R50S; - - } else if (strbeg("SANYO", vendor_info)) { - if (strbeg("CD-WO CRD-R24S", prod_ident)) - scgp->dev = DEV_CDD_521; - - } else if (strbeg("SONY", vendor_info)) { - if (strbeg("CD-R CDU92", prod_ident) || - strbeg("CD-R CDU94", prod_ident)) - scgp->dev = DEV_SONY_CDU_924; - - } else if (strbeg("TEAC", vendor_info)) { - if (strbeg("CD-R50S", prod_ident) || - strbeg("CD-R55S", prod_ident)) - scgp->dev = DEV_TEAC_CD_R50S; - - } else if (strbeg("TRAXDATA", vendor_info) || - strbeg("Traxdata", vendor_info)) { - if (strbeg("CDR4120", prod_ident)) - scgp->dev = DEV_TEAC_CD_R50S; - - } else if (strbeg("T.YUDEN", vendor_info)) { - if (strbeg("CD-WO EW-50", prod_ident)) - scgp->dev = DEV_TYUDEN_EW50; - - } else if (strbeg("WPI", vendor_info)) { /* Wearnes */ - if (strbeg("CDR-632P", prod_ident)) - scgp->dev = DEV_CDD_2600; - - } else if (strbeg("YAMAHA", vendor_info)) { - if (strbeg("CDR10", prod_ident)) - scgp->dev = DEV_YAMAHA_CDR_100; - if (strbeg("CDR200", prod_ident)) - scgp->dev = DEV_YAMAHA_CDR_400; - if (strbeg("CDR400", prod_ident)) - scgp->dev = DEV_YAMAHA_CDR_400; - - } else if (strbeg("MATSHITA", vendor_info)) { - if (strbeg("CD-R CW-7501", prod_ident)) - scgp->dev = DEV_MATSUSHITA_7501; - if (strbeg("CD-R CW-7502", prod_ident)) - scgp->dev = DEV_MATSUSHITA_7502; - } - if (scgp->dev == DEV_UNKNOWN) { - /* - * We do not have Manufacturer strings for - * the following drives. - */ - if (strbeg("CDS615E", prod_ident)) /* Olympus */ - scgp->dev = DEV_SONY_CDU_924; - } - if (scgp->dev == DEV_UNKNOWN && inq->type == INQ_ROMD) { - BOOL cdrr = FALSE; - BOOL cdwr = FALSE; - BOOL cdrrw = FALSE; - BOOL cdwrw = FALSE; - BOOL dvd = FALSE; - BOOL dvdwr = FALSE; - - scgp->dev = DEV_CDROM; - - if (mmc_check(scgp, &cdrr, &cdwr, &cdrrw, &cdwrw, - &dvd, &dvdwr)) - scgp->dev = DEV_MMC_CDROM; - if (cdwr) - scgp->dev = DEV_MMC_CDR; - if (cdwrw) - scgp->dev = DEV_MMC_CDRW; - if (dvd) - scgp->dev = DEV_MMC_DVD; - if (dvdwr) - scgp->dev = DEV_MMC_DVD_WR; - } - break; - - case INQ_PROCD: - if (strbeg("BERTHOLD", vendor_info)) { - if (strbeg("", prod_ident)) - scgp->dev = DEV_HRSCAN; - } - break; - - case INQ_SCAN: - scgp->dev = DEV_MS300A; - break; - } - scgp->silent--; - if (!print) - return (TRUE); - - if (scgp->dev == DEV_UNKNOWN && !got_inquiry) { -#ifdef PRINT_INQ_ERR - scg_printerr(scgp); -#endif - return (FALSE); - } - - printinq(scgp, stdout); - return (TRUE); -} - -EXPORT void -printinq(scgp, f) - SCSI *scgp; - FILE *f; -{ - register struct scsi_inquiry *inq = scgp->inq; - - fprintf(f, "Device type : "); - scg_fprintdev(f, inq); - fprintf(f, "Version : %d\n", inq->ansi_version); - fprintf(f, "Response Format: %d\n", inq->data_format); - if (inq->data_format >= 2) { - fprintf(f, "Capabilities : "); - if (inq->aenc) fprintf(f, "AENC "); - if (inq->termiop) fprintf(f, "TERMIOP "); - if (inq->reladr) fprintf(f, "RELADR "); - if (inq->wbus32) fprintf(f, "WBUS32 "); - if (inq->wbus16) fprintf(f, "WBUS16 "); - if (inq->sync) fprintf(f, "SYNC "); - if (inq->linked) fprintf(f, "LINKED "); - if (inq->cmdque) fprintf(f, "CMDQUE "); - if (inq->softreset) fprintf(f, "SOFTRESET "); - fprintf(f, "\n"); - } - if (inq->add_len >= 31 || - inq->vendor_info[0] || - inq->prod_ident[0] || - inq->prod_revision[0]) { - fprintf(f, "Vendor_info : '%.8s'\n", inq->vendor_info); - fprintf(f, "Identifikation : '%.16s'\n", inq->prod_ident); - fprintf(f, "Revision : '%.4s'\n", inq->prod_revision); - } -} - -EXPORT void -printdev(scgp) - SCSI *scgp; -{ - printf("Device seems to be: "); - - switch (scgp->dev) { - - case DEV_UNKNOWN: printf("unknown"); break; - case DEV_ACB40X0: printf("Adaptec 4000/4010/4070"); break; - case DEV_ACB4000: printf("Adaptec 4000"); break; - case DEV_ACB4010: printf("Adaptec 4010"); break; - case DEV_ACB4070: printf("Adaptec 4070"); break; - case DEV_ACB5500: printf("Adaptec 5500"); break; - case DEV_ACB4520A: printf("Adaptec 4520A"); break; - case DEV_ACB4525: printf("Adaptec 4525"); break; - case DEV_MD21: printf("Emulex MD21"); break; - case DEV_MD23: printf("Emulex MD23"); break; - case DEV_NON_CCS_DSK: printf("Generic NON CCS Disk"); break; - case DEV_CCS_GENDISK: printf("Generic CCS Disk"); break; - case DEV_SONY_SMO: printf("Sony SMO-C501"); break; - case DEV_MT02: printf("Emulex MT02"); break; - case DEV_SC4000: printf("Sysgen SC4000"); break; - case DEV_RXT800S: printf("Maxtor RXT800S"); break; - case DEV_HRSCAN: printf("Berthold HR-Scanner"); break; - case DEV_MS300A: printf("Microtek MS300A"); break; - - case DEV_CDROM: printf("Generic CD-ROM"); break; - case DEV_MMC_CDROM: printf("Generic mmc CD-ROM"); break; - case DEV_MMC_CDR: printf("Generic mmc CD-R"); break; - case DEV_MMC_CDRW: printf("Generic mmc CD-RW"); break; - case DEV_MMC_DVD: printf("Generic mmc2 DVD-ROM"); break; - case DEV_MMC_DVD_WR: printf("Generic mmc2 DVD-R/DVD-RW/DVD-RAM"); break; - case DEV_CDD_521_OLD: printf("Philips old CDD-521"); break; - case DEV_CDD_521: printf("Philips CDD-521"); break; - case DEV_CDD_522: printf("Philips CDD-522"); break; - case DEV_PCD_600: printf("Kodak PCD-600"); break; - case DEV_CDD_2000: printf("Philips CDD-2000"); break; - case DEV_CDD_2600: printf("Philips CDD-2600"); break; - case DEV_YAMAHA_CDR_100:printf("Yamaha CDR-100"); break; - case DEV_YAMAHA_CDR_400:printf("Yamaha CDR-400"); break; - case DEV_PLASMON_RF_4100:printf("Plasmon RF-4100"); break; - case DEV_SONY_CDU_924: printf("Sony CDU-924S"); break; - case DEV_RICOH_RO_1060C:printf("Ricoh RO-1060C"); break; - case DEV_RICOH_RO_1420C:printf("Ricoh RO-1420C"); break; - case DEV_TEAC_CD_R50S: printf("Teac CD-R50S"); break; - case DEV_MATSUSHITA_7501:printf("Matsushita CW-7501"); break; - case DEV_MATSUSHITA_7502:printf("Matsushita CW-7502"); break; - - case DEV_PIONEER_DW_S114X: printf("Pioneer DW-S114X"); break; - case DEV_PIONEER_DVDR_S101:printf("Pioneer DVD-R S101"); break; - - default: printf("Missing Entry for dev %d", - scgp->dev); break; - - } - printf(".\n"); - -} - -EXPORT BOOL -do_inquiry(scgp, print) - SCSI *scgp; - int print; -{ - if (getdev(scgp, print)) { - if (print) - printdev(scgp); - return (TRUE); - } else { - return (FALSE); - } -} - -EXPORT BOOL -recovery_needed(scgp, dp) - SCSI *scgp; - cdr_t *dp; -{ - int err; - register struct scg_cmd *scmd = scgp->scmd; - - scgp->silent++; - err = test_unit_ready(scgp); - scgp->silent--; - - if (err >= 0) - return (FALSE); - else if (scmd->error >= SCG_FATAL) /* nicht selektierbar */ - return (FALSE); - - if (scmd->sense.code < 0x70) /* non extended Sense */ - return (FALSE); - - /* XXX Old Philips code */ - return (((struct scsi_ext_sense *)&scmd->sense)->sense_code == 0xD0); -} - -EXPORT int -scsi_load(scgp, dp) - SCSI *scgp; - cdr_t *dp; -{ - int key; - int code; - - if ((dp->cdr_flags & CDR_CADDYLOAD) == 0) { - if (scsi_start_stop_unit(scgp, 1, 1, dp && (dp->cdr_cmdflags&F_IMMED)) >= 0) - return (0); - } - - if (wait_unit_ready(scgp, 60)) - return (0); - - key = scg_sense_key(scgp); - code = scg_sense_code(scgp); - - if (key == SC_NOT_READY && (code == 0x3A || code == 0x30)) { - errmsgno(EX_BAD, "Cannot load media with %s drive!\n", - (dp->cdr_flags & CDR_CADDYLOAD) ? "caddy" : "this"); - errmsgno(EX_BAD, "Try to load media by hand.\n"); - } - return (-1); -} - -EXPORT int -scsi_unload(scgp, dp) - SCSI *scgp; - cdr_t *dp; -{ - return (scsi_start_stop_unit(scgp, 0, 1, dp && (dp->cdr_cmdflags&F_IMMED))); -} - -EXPORT int -scsi_cdr_write(scgp, bp, sectaddr, size, blocks, islast) - SCSI *scgp; - caddr_t bp; /* address of buffer */ - long sectaddr; /* disk address (sector) to put */ - long size; /* number of bytes to transfer */ - int blocks; /* sector count */ - BOOL islast; /* last write for track */ -{ - return (write_xg1(scgp, bp, sectaddr, size, blocks)); -} - -EXPORT struct cd_mode_page_2A * -mmc_cap(scgp, modep) - SCSI *scgp; - Uchar *modep; -{ - int len; - int val; - Uchar mode[0x100]; - struct cd_mode_page_2A *mp; - struct cd_mode_page_2A *mp2; - - -retry: - fillbytes((caddr_t)mode, sizeof (mode), '\0'); - - if (!get_mode_params(scgp, 0x2A, "CD capabilities", - mode, (Uchar *)0, (Uchar *)0, (Uchar *)0, &len)) { - - if (scg_sense_key(scgp) == SC_NOT_READY) { - if (wait_unit_ready(scgp, 60)) - goto retry; - } - return (NULL); /* Pre SCSI-3/mmc drive */ - } - - if (len == 0) /* Pre SCSI-3/mmc drive */ - return (NULL); - - mp = (struct cd_mode_page_2A *) - (mode + sizeof (struct scsi_mode_header) + - ((struct scsi_mode_header *)mode)->blockdesc_len); - - /* - * Do some heuristics against pre SCSI-3/mmc VU page 2A - * We should test for a minimum p_len of 0x14, but some - * buggy CD-ROM readers ommit the write speed values. - */ - if (mp->p_len < 0x10) - return (NULL); - - val = a_to_u_2_byte(mp->max_read_speed); - if (val != 0 && val < 176) - return (NULL); - - val = a_to_u_2_byte(mp->cur_read_speed); - if (val != 0 && val < 176) - return (NULL); - - len -= sizeof (struct scsi_mode_header) + - ((struct scsi_mode_header *)mode)->blockdesc_len; - if (modep) - mp2 = (struct cd_mode_page_2A *)modep; - else - mp2 = malloc(len); - if (mp2) - movebytes(mp, mp2, len); - - return (mp2); -} - -EXPORT void -mmc_getval(mp, cdrrp, cdwrp, cdrrwp, cdwrwp, dvdp, dvdwp) - struct cd_mode_page_2A *mp; - BOOL *cdrrp; /* CD ROM */ - BOOL *cdwrp; /* CD-R writer */ - BOOL *cdrrwp; /* CD-RW reader */ - BOOL *cdwrwp; /* CD-RW writer */ - BOOL *dvdp; /* DVD reader */ - BOOL *dvdwp; /* DVD writer */ -{ - BOOL isdvd; /* Any DVD reader */ - BOOL isdvd_wr; /* DVD writer (R / RAM) */ - BOOL iscd_wr; /* CD writer */ - - iscd_wr = (mp->cd_r_write != 0) || /* SCSI-3/mmc CD-R */ - (mp->cd_rw_write != 0); /* SCSI-3/mmc CD-RW */ - - if (cdrrp) - *cdrrp = (mp->cd_r_read != 0); /* SCSI-3/mmc CD */ - if (cdwrp) - *cdwrp = (mp->cd_r_write != 0); /* SCSI-3/mmc CD-R */ - - if (cdrrwp) - *cdrrwp = (mp->cd_rw_read != 0); /* SCSI-3/mmc CD */ - if (cdwrwp) - *cdwrwp = (mp->cd_rw_write != 0); /* SCSI-3/mmc CD-RW */ - - isdvd = /* SCSI-3/mmc2 DVD */ - (mp->dvd_ram_read + mp->dvd_r_read + - mp->dvd_rom_read) != 0; - - isdvd_wr = /* SCSI-3/mmc2 DVD writer*/ - (mp->dvd_ram_write + mp->dvd_r_write) != 0; - - if (dvdp) - *dvdp = isdvd; - if (dvdwp) - *dvdwp = isdvd_wr; -} - -EXPORT BOOL -is_mmc(scgp, cdwp, dvdwp) - SCSI *scgp; - BOOL *cdwp; /* CD writer */ - BOOL *dvdwp; /* DVD writer */ -{ - BOOL cdwr = FALSE; - BOOL cdwrw = FALSE; - - if (cdwp) - *cdwp = FALSE; - if (dvdwp) - *dvdwp = FALSE; - - if (!mmc_check(scgp, NULL, &cdwr, NULL, &cdwrw, NULL, dvdwp)) - return (FALSE); - - if (cdwp) - *cdwp = cdwr | cdwrw; - - return (TRUE); -} - -EXPORT BOOL -mmc_check(scgp, cdrrp, cdwrp, cdrrwp, cdwrwp, dvdp, dvdwp) - SCSI *scgp; - BOOL *cdrrp; /* CD ROM */ - BOOL *cdwrp; /* CD-R writer */ - BOOL *cdrrwp; /* CD-RW reader */ - BOOL *cdwrwp; /* CD-RW writer */ - BOOL *dvdp; /* DVD reader */ - BOOL *dvdwp; /* DVD writer */ -{ - Uchar mode[0x100]; - BOOL was_atapi; - struct cd_mode_page_2A *mp; - - if (scgp->inq->type != INQ_ROMD) - return (FALSE); - - fillbytes((caddr_t)mode, sizeof (mode), '\0'); - - was_atapi = allow_atapi(scgp, TRUE); - scgp->silent++; - mp = mmc_cap(scgp, mode); - scgp->silent--; - allow_atapi(scgp, was_atapi); - if (mp == NULL) - return (FALSE); - - mmc_getval(mp, cdrrp, cdwrp, cdrrwp, cdwrwp, dvdp, dvdwp); - - return (TRUE); /* Generic SCSI-3/mmc CD */ -} - -LOCAL void -print_speed(fmt, val) - char *fmt; - int val; -{ - printf(" %s: %5d kB/s", fmt, val); - printf(" (CD %3ux,", val/176); - printf(" DVD %2ux,", val/1385); - printf(" BD %2ux)\n", val/4495); -} - -#define DOES(what, flag) printf(" Does %s%s\n", flag?"":"not ", what) -#define IS(what, flag) printf(" Is %s%s\n", flag?"":"not ", what) -#define VAL(what, val) printf(" %s: %d\n", what, val[0]*256 + val[1]) -#define SVAL(what, val) printf(" %s: %s\n", what, val) - -EXPORT void -print_capabilities(scgp) - SCSI *scgp; -{ - BOOL was_atapi; - Uchar mode[0x100]; - struct cd_mode_page_2A *mp; -static const char *bclk[4] = {"32", "16", "24", "24 (I2S)"}; -static const char *load[8] = {"caddy", "tray", "pop-up", "reserved(3)", - "disc changer", "cartridge changer", - "reserved(6)", "reserved(7)" }; -static const char *rotctl[4] = {"CLV/PCAV", "CAV", "reserved(2)", "reserved(3)"}; - - - if (scgp->inq->type != INQ_ROMD) - return; - - fillbytes((caddr_t)mode, sizeof (mode), '\0'); - - was_atapi = allow_atapi(scgp, TRUE); /* Try to switch to 10 byte mode cmds */ - scgp->silent++; - mp = mmc_cap(scgp, mode); - scgp->silent--; - allow_atapi(scgp, was_atapi); - if (mp == NULL) - return; - - printf("\nDrive capabilities, per"); - if (mp->p_len >= 28) - printf(" MMC-3"); - else if (mp->p_len >= 24) - printf(" MMC-2"); - else - printf(" MMC"); - printf(" page 2A:\n\n"); - - DOES("read CD-R media", mp->cd_r_read); - DOES("write CD-R media", mp->cd_r_write); - DOES("read CD-RW media", mp->cd_rw_read); - DOES("write CD-RW media", mp->cd_rw_write); - DOES("read DVD-ROM media", mp->dvd_rom_read); - DOES("read DVD-R media", mp->dvd_r_read); - DOES("write DVD-R media", mp->dvd_r_write); - DOES("read DVD-RAM media", mp->dvd_ram_read); - DOES("write DVD-RAM media", mp->dvd_ram_write); - DOES("support test writing", mp->test_write); - printf("\n"); - DOES("read Mode 2 Form 1 blocks", mp->mode_2_form_1); - DOES("read Mode 2 Form 2 blocks", mp->mode_2_form_2); - DOES("read digital audio blocks", mp->cd_da_supported); - if (mp->cd_da_supported) - DOES("restart non-streamed digital audio reads accurately", mp->cd_da_accurate); - DOES("support Buffer-Underrun-Free recording", mp->BUF); - DOES("read multi-session CDs", mp->multi_session); - DOES("read fixed-packet CD media using Method 2", mp->method2); - DOES("read CD bar code", mp->read_bar_code); - DOES("read R-W subcode information", mp->rw_supported); - if (mp->rw_supported) - DOES("return R-W subcode de-interleaved and error-corrected", mp->rw_deint_corr); - DOES("read raw P-W subcode data from lead in", mp->pw_in_lead_in); - DOES("return CD media catalog number", mp->UPC); - DOES("return CD ISRC information", mp->ISRC); - DOES("support C2 error pointers", mp->c2_pointers); - DOES("deliver composite A/V data", mp->composite); - printf("\n"); - DOES("play audio CDs", mp->audio_play); - if (mp->audio_play) { - VAL("Number of volume control levels", mp->num_vol_levels); - DOES("support individual volume control setting for each channel", mp->sep_chan_vol); - DOES("support independent mute setting for each channel", mp->sep_chan_mute); - DOES("support digital output on port 1", mp->digital_port_1); - DOES("support digital output on port 2", mp->digital_port_2); - if (mp->digital_port_1 || mp->digital_port_2) { - DOES("send digital data LSB-first", mp->LSBF); - DOES("set LRCK high for left-channel data", mp->RCK); - DOES("have valid data on falling edge of clock", mp->BCK); - SVAL("Length of data in BCLKs", bclk[mp->length]); - } - } - printf("\n"); - SVAL("Loading mechanism type", load[mp->loading_type]); - DOES("support ejection of CD via START/STOP command", mp->eject); - DOES("lock media on power up via prevent jumper", mp->prevent_jumper); - DOES("allow media to be locked in the drive via PREVENT/ALLOW command", mp->lock); - IS("currently in a media-locked state", mp->lock_state); - DOES("support changing side of disk", mp->side_change); - DOES("have load-empty-slot-in-changer feature", mp->sw_slot_sel); - DOES("support Individual Disk Present feature", mp->disk_present_rep); - printf("\n"); - print_speed("Maximum read speed", a_to_u_2_byte(mp->max_read_speed)); - print_speed("Current read speed", a_to_u_2_byte(mp->cur_read_speed)); - print_speed("Maximum write speed", a_to_u_2_byte(mp->max_write_speed)); - if (mp->p_len >= 28) - print_speed("Current write speed", a_to_u_2_byte(mp->v3_cur_write_speed)); - else - print_speed("Current write speed", a_to_u_2_byte(mp->cur_write_speed)); - if (mp->p_len >= 28) { - SVAL("Rotational control selected", rotctl[mp->rot_ctl_sel]); - } - VAL("Buffer size in KB", mp->buffer_size); - - if (mp->p_len >= 24) { - VAL("Copy management revision supported", mp->copy_man_rev); - } - - if (mp->p_len >= 28) { - struct cd_wr_speed_performance *pp; - Uint ndesc; - Uint i; - Uint n; - - ndesc = a_to_u_2_byte(mp->num_wr_speed_des); - pp = mp->wr_speed_des; - printf(" Number of supported write speeds: %d\n", ndesc); - for (i = 0; i < ndesc; i++, pp++) { - printf(" Write speed # %d:", i); - n = a_to_u_2_byte(pp->wr_speed_supp); - printf(" %5d kB/s", n); - printf(" %s", rotctl[pp->rot_ctl_sel]); - printf(" (CD %3ux,", n/176); - printf(" DVD %2ux,", n/1385); - printf(" BD %2ux)\n", n/4495); - } - } - - /* Generic SCSI-3/mmc CD */ -} - -EXPORT int -verify(scgp, start, count, bad_block) - SCSI *scgp; - long start; - int count; - long *bad_block; -{ - register struct scg_cmd *scmd = scgp->scmd; - - fillbytes((caddr_t)scmd, sizeof (*scmd), '\0'); - scmd->addr = (caddr_t)0; - scmd->size = 0; - scmd->flags = SCG_DISRE_ENA; - scmd->cdb_len = SC_G1_CDBLEN; - scmd->sense_len = CCS_SENSE_LEN; - scmd->cdb.g1_cdb.cmd = 0x2F; /* Verify */ - scmd->cdb.g1_cdb.lun = scg_lun(scgp); - g1_cdbaddr(&scmd->cdb.g1_cdb, start); - g1_cdblen(&scmd->cdb.g1_cdb, count); - - scgp->cmdname = "verify"; - - if (scg_cmd(scgp) < 0) { - if (scmd->sense.code >= 0x70) { /* extended Sense */ - *bad_block = - a_to_4_byte(&((struct scsi_ext_sense *) - &scmd->sense)->info_1); - } else { - *bad_block = a_to_u_3_byte(&scmd->sense.high_addr); - } - return (-1); - } - return (0); -} diff -Nru cdrtools-2.01.01a33/mkisofs/scsi.h cdrtools-3.02a09/mkisofs/scsi.h --- cdrtools-2.01.01a33/mkisofs/scsi.h 2006-10-08 12:37:10.000000000 +0000 +++ cdrtools-3.02a09/mkisofs/scsi.h 2016-11-14 19:00:54.000000000 +0000 @@ -1,27 +1,18 @@ -/* @(#)scsi.h 1.2 06/10/08 Copyright 1997-2004 J. Schilling */ +/* @(#)scsi.h 1.4 16/11/14 Copyright 1997-2016 J. Schilling */ /* - * Copyright (c) 1997-2004 J. Schilling - */ -/* - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 - * as published by the Free Software Foundation. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License along with - * this program; see the file COPYING. If not, write to the Free Software - * Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * Copyright (c) 1997-2016 J. Schilling */ +/*@@C@@*/ #ifndef _SCSI_H #define _SCSI_H -#ifdef USE_SCG +/* + * Implemented inside multi.c in case that USE_SCG has not been defined. + */ extern int readsecs __PR((UInt32_t startsecno, void *buffer, int sectorcount)); + +#ifdef USE_SCG extern int scsidev_open __PR((char *path)); extern int scsidev_close __PR((void)); #endif diff -Nru cdrtools-2.01.01a33/mkisofs/stream.c cdrtools-3.02a09/mkisofs/stream.c --- cdrtools-2.01.01a33/mkisofs/stream.c 2007-02-17 15:48:16.000000000 +0000 +++ cdrtools-3.02a09/mkisofs/stream.c 2015-12-08 20:24:04.000000000 +0000 @@ -1,12 +1,13 @@ -/* @(#)stream.c 1.9 07/02/17 Copyright 2002-2007 J. Schilling */ +/* @(#)stream.c 1.17 15/12/08 Copyright 2002-2015 J. Schilling */ +#include #ifndef lint -static char sccsid[] = - "@(#)stream.c 1.9 07/02/17 Copyright 2002-2007 J. Schilling"; +static UConst char sccsid[] = + "@(#)stream.c 1.17 15/12/08 Copyright 2002-2015 J. Schilling"; #endif /* * ISO-9660 stream (pipe) file module for mkisofs * - * Copyright (c) 2002-2007 J. Schilling + * Copyright (c) 2002-2015 J. Schilling * Implemented after an idea from M.H. Voase */ /* @@ -21,12 +22,12 @@ * * You should have received a copy of the GNU General Public License along with * this program; see the file COPYING. If not, write to the Free Software - * Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -#include #include "mkisofs.h" #include "iso9660.h" +#include LOCAL int size_str_file __PR((UInt32_t starting_extent)); LOCAL int size_str_dir __PR((UInt32_t starting_extent)); @@ -73,6 +74,12 @@ } if (dopad) n += 150; /* Room for final padding */ + + if (n >= avail_extent) { + comerrno(EX_BAD, + _("-stream-media-size %d but must be at least %d\n"), + avail_extent, n+2); + } avail_extent -= n; last_extent += avail_extent + stream_pad; @@ -171,6 +178,7 @@ xfwrite(buf, SECTOR_SIZE, 1, outfile, 0, FALSE); last_extent_written += avail_extent + stream_pad; + free(buf); return (0); } @@ -181,7 +189,7 @@ write_str_dir(outfile) FILE *outfile; { - int to_write; + int reclen; char *buf; buf = e_malloc(SECTOR_SIZE); memset(buf, 0, SECTOR_SIZE); @@ -201,26 +209,27 @@ s_dir.name[0] = 1; /* ".." */ xfwrite(&s_dir, offsetof(struct iso_directory_record, name[0]) + 1, 1, outfile, 0, FALSE); memset(&s_dir, 0, sizeof (struct iso_directory_record)); - s_dir.length[0] = 34 + strlen(stream_filename); + reclen = offsetof(struct iso_directory_record, name[0]) + + strlen(stream_filename); + if (reclen & 1) + reclen++; + s_dir.length[0] = reclen; s_dir.ext_attr_length[0] = 0; - set_733((char *) s_dir.extent, stream_extent); - set_733((char *) s_dir.size, stream_size); + set_733((char *)s_dir.extent, stream_extent); + set_733((char *)s_dir.size, stream_size); iso9660_date(s_dir.date, begun); s_dir.flags[0] = 0; s_dir.file_unit_size[0] = 0; set_723((char *)s_dir.volume_sequence_number, volume_sequence_number); s_dir.name_len[0] = strlen(stream_filename); memcpy(s_dir.name, stream_filename, s_dir.name_len[0]); - xfwrite(&s_dir, offsetof(struct iso_directory_record, name[0]) - + s_dir.name_len[0], 1, outfile, 0, FALSE); + xfwrite(&s_dir, reclen, 1, outfile, 0, FALSE); /* * This calc is: 2 single char directory entries (34) + an additional entry * with filename length stream_filename + round up for even lenght count */ - to_write = (s_dir.name_len[0] % 2) ? 0 : 1; - xfwrite(buf, SECTOR_SIZE - ((3 * 34) + s_dir.name_len[0]) + - to_write, 1, outfile, 0, FALSE); + xfwrite(buf, SECTOR_SIZE - ((2 * 34) + reclen), 1, outfile, 0, FALSE); free(buf); last_extent_written++; return (0); diff -Nru cdrtools-2.01.01a33/mkisofs/tree.c cdrtools-3.02a09/mkisofs/tree.c --- cdrtools-2.01.01a33/mkisofs/tree.c 2007-08-01 16:18:18.000000000 +0000 +++ cdrtools-3.02a09/mkisofs/tree.c 2016-12-13 21:39:34.000000000 +0000 @@ -1,7 +1,8 @@ -/* @(#)tree.c 1.102 07/08/01 joerg */ +/* @(#)tree.c 1.137 16/12/13 joerg */ +#include #ifndef lint -static char sccsid[] = - "@(#)tree.c 1.102 07/08/01 joerg"; +static UConst char sccsid[] = + "@(#)tree.c 1.137 16/12/13 joerg"; #endif /* * File tree.c - scan directory tree and build memory structures for iso9660 @@ -10,7 +11,7 @@ * Written by Eric Youngdale (1993). * * Copyright 1993 Yggdrasil Computing, Incorporated - * Copyright (c) 1999,2000-2007 J. Schilling + * Copyright (c) 1999,2000-2016 J. Schilling * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -30,10 +31,11 @@ /* APPLE_HYB James Pearson j.pearson@ge.ucl.ac.uk 23/2/2000 */ -#include +/* DUPLICATES_ONCE Alex Kopylov cdrtools@bootcd.ru 19.06.2004 */ + #include "mkisofs.h" +#include "rock.h" #include "match.h" -#include "exclude.h" #include #include #include @@ -50,26 +52,18 @@ #include "vms.h" #endif -/* - * Autoconf should be able to figure this one out for us and let us know - * whether the system has memmove or not. - */ -#ifndef HAVE_MEMMOVE -#define memmove(d, s, n) bcopy((s), (d), (n)) -#endif - LOCAL Uchar symlink_buff[PATH_MAX+1]; LOCAL char *filetype __PR((int t)); LOCAL char *rstr __PR((char *s1, char *s2)); -LOCAL void stat_fix __PR((struct stat * st)); +LOCAL void stat_fix __PR((struct stat *st)); EXPORT int stat_filter __PR((char *path, struct stat *st)); EXPORT int lstat_filter __PR((char *path, struct stat *st)); LOCAL int sort_n_finish __PR((struct directory *this_dir)); LOCAL void generate_reloc_directory __PR((void)); -EXPORT void attach_dot_entries __PR((struct directory * dirnode, - struct stat * this_stat, - struct stat * parent_stat)); +EXPORT void attach_dot_entries __PR((struct directory *dirnode, + struct stat *this_stat, + struct stat *parent_stat)); EXPORT char *find_rr_attribute __PR((unsigned char *pnt, int len, char *attr_type)); EXPORT void finish_cl_pl_entries __PR((void)); @@ -84,17 +78,12 @@ char *whole_path, char *short_name, struct stat *statp)); -#ifdef APPLE_HYB EXPORT int insert_file_entry __PR((struct directory *this_dir, char *whole_path, char *short_name, struct stat *statp, int have_rsrc)); -#else -EXPORT int insert_file_entry __PR((struct directory *this_dir, - char *whole_path, - char *short_name, - struct stat *statp)); -#endif +EXPORT struct directory_entry * + dup_directory_entry __PR((struct directory_entry *s_entry)); EXPORT void generate_iso9660_directories __PR((struct directory *node, FILE *outfile)); @@ -106,8 +95,8 @@ char *path, struct directory_entry *de, int flag)); -LOCAL void delete_directory __PR((struct directory * parent, - struct directory * child)); +LOCAL void delete_directory __PR((struct directory *parent, + struct directory *child)); EXPORT int sort_tree __PR((struct directory *node)); EXPORT void dump_tree __PR((struct directory *node)); EXPORT struct directory_entry * @@ -143,7 +132,7 @@ return ("multiplexed blk"); if (S_ISREG(t)) /* 8 */ return ("regular file"); - if (S_ISCNT(t)) /* 9 */ + if (S_ISCTG(t)) /* 9 */ return ("contiguous file"); if (S_ISLNK(t)) /* 10 */ return ("symlink"); @@ -183,11 +172,11 @@ l1 = strlen(s1); l2 = strlen(s2); if (l2 > l1) - return ((char *) NULL); + return ((char *)NULL); if (strcmp(&s1[l1 - l2], s2) == 0) return (&s1[l1 - l2]); - return ((char *) NULL); + return ((char *)NULL); } LOCAL void @@ -344,7 +333,7 @@ if (s_entry1 == s_entry) { comerrno(EX_BAD, - "Fatal goof, file '%s' already in hash table.\n", + _("Fatal goof, file '%s' already in hash table.\n"), s_entry->isorec.name); } /* @@ -413,7 +402,7 @@ newname[new_reclen + 2] = (d3 <= 9 ? '0' + d3 : 'A' + d3 - 10); if (debug) - error("NEW name '%s'\n", newname); + error(_("NEW name '%s'\n"), newname); #ifdef VMS /* Sigh. VAXCRTL seems to be broken here */ @@ -438,7 +427,7 @@ * If we fell off the bottom here, we were in real trouble. */ comerrno(EX_BAD, - "Unable to generate unique name for file %s\n", + _("Unable to generate unique name for file %s\n"), s_entry->name); got_valid_name: @@ -448,7 +437,7 @@ */ if (s_entry->priority < s_entry1->priority) { if (verbose > 0) { - fprintf(stderr, "Using %s for %s%s%s (%s)\n", + fprintf(stderr, _("Using %s for %s%s%s (%s)\n"), newname, this_dir->whole_name, SPATH_SEPARATOR, s_entry->name, s_entry1->name); @@ -505,7 +494,7 @@ } else { delete_file_hash(s_entry1); if (verbose > 0) { - fprintf(stderr, "Using %s for %s%s%s (%s)\n", + fprintf(stderr, _("Using %s for %s%s%s (%s)\n"), newname, this_dir->whole_name, SPATH_SEPARATOR, s_entry1->name, s_entry->name); @@ -612,7 +601,7 @@ table->dev = UNCACHED_DEVICE; set_723(table->isorec.volume_sequence_number, volume_sequence_number); - set_733((char *) table->isorec.size, tablesize); + set_733((char *)table->isorec.size, tablesize); table->size = tablesize; table->filedir = this_dir; if (jhide_trans_tbl) @@ -621,14 +610,14 @@ * Always hide transtable from UDF tree. */ table->de_flags |= INHIBIT_UDF_ENTRY; -/* table->name = strdup("");*/ - table->name = strdup(trans_tbl); +/* table->name = e_strdup("");*/ + table->name = e_strdup(trans_tbl); /* * We use sprintf() to create the strings, for this reason * we need to add one byte for the null character at the * end of the string even though we don't use it. */ - table->table = (char *) e_malloc(ISO_ROUND_UP(tablesize)+1); + table->table = (char *)e_malloc(ISO_ROUND_UP(tablesize)+1); memset(table->table, 0, ISO_ROUND_UP(tablesize)+1); iso9660_file_length(trans_tbl, table, 0); @@ -688,7 +677,7 @@ if (new_reclen > 0xff) { comerrno(EX_BAD, - "Fatal error - RR overflow (reclen %d) for file %s\n", + _("Fatal error - RR overflow (reclen %d) for file %s\n"), new_reclen, s_entry->name); } @@ -697,8 +686,12 @@ status = sort_directory(&this_dir->contents, (reloc_dir == this_dir)); if (status > 0) { - comerrno(EX_BAD, "Unable to sort directory %s\n", + errmsgno(EX_BAD, _("Unable to sort directory %s\n"), this_dir->whole_name); + errmsgno(EX_BAD, + _("If there was more than one directory type argument to mkisofs\n")); + comerrno(EX_BAD, + _("use -graft-points to create different target directory names.\n")); } /* * If we are filling out a TRANS.TBL, generate the entries that will @@ -754,7 +747,7 @@ if (count != tablesize) { comerrno(EX_BAD, - "Translation table size mismatch %d %d\n", + _("Translation table size mismatch %d %d\n"), count, tablesize); } } @@ -800,7 +793,7 @@ */ while (len > 3) { if (pnt[0] == 'C' && pnt[1] == 'E') { - nbytes = get_733((char *) pnt + 20); + nbytes = get_733((char *)pnt + 20); if ((this_dir->ce_bytes & (SECTOR_SIZE - 1)) + nbytes >= SECTOR_SIZE) @@ -841,11 +834,11 @@ root->subdir = reloc_dir; reloc_dir->depth = 1; if (hide_rr_moved) { - reloc_dir->whole_name = strdup("./.rr_moved"); - reloc_dir->de_name = strdup(".rr_moved"); + reloc_dir->whole_name = e_strdup("./.rr_moved"); + reloc_dir->de_name = e_strdup(".rr_moved"); } else { - reloc_dir->whole_name = strdup("./rr_moved"); - reloc_dir->de_name = strdup("rr_moved"); + reloc_dir->whole_name = e_strdup("./rr_moved"); + reloc_dir->de_name = e_strdup("rr_moved"); } reloc_dir->de_path = reloc_dir->de_name; reloc_dir->extent = 0; @@ -870,7 +863,7 @@ s_entry->de_flags |= INHIBIT_UDF_ENTRY; root->contents = s_entry; - root->contents->name = strdup(reloc_dir->de_name); + root->contents->name = e_strdup(reloc_dir->de_name); root->contents->filedir = root; root->contents->isorec.flags[0] = ISO_DIRECTORY; root->contents->priority = 32768; @@ -945,7 +938,7 @@ sizeof (hfsdirent)); } #endif - s_entry->name = strdup(".."); + s_entry->name = e_strdup(".."); s_entry->whole_name = NULL; s_entry->isorec.name_len[0] = 1; s_entry->isorec.flags[0] = ISO_DIRECTORY; @@ -983,7 +976,7 @@ sizeof (hfsdirent)); } #endif - s_entry->name = strdup("."); + s_entry->name = e_strdup("."); s_entry->whole_name = NULL; s_entry->isorec.name_len[0] = 1; s_entry->isorec.flags[0] = ISO_DIRECTORY; @@ -1020,12 +1013,18 @@ while (len >= 4) { if (pnt[3] != 1 && pnt[3] != 2) { errmsgno(EX_BAD, - "**BAD RRVERSION (%d) for %c%c\n", - pnt[3], pnt[0], pnt[1]); + _("**BAD RRVERSION (%d) in '%c%c' field (%2.2X %2.2X).\n"), + pnt[3], pnt[0], pnt[1], pnt[0], pnt[1]); } - if (strncmp((char *) pnt, attr_type, 2) == 0) - return ((char *) pnt); - else if (strncmp((char *) pnt, "ST", 2) == 0) + if (pnt[2] < 4) { + errmsgno(EX_BAD, + _("**BAD RRLEN (%d) in '%2.2s' field %2.2X %2.2X.\n"), + pnt[2], pnt, pnt[0], pnt[1]); + return (NULL); + } + if (strncmp((char *)pnt, attr_type, 2) == 0) + return ((char *)pnt); + else if (strncmp((char *)pnt, "ST", 2) == 0) return (NULL); len -= pnt[2]; pnt += pnt[2]; @@ -1061,7 +1060,7 @@ }; if (!d_entry) { comerrno(EX_BAD, - "Unable to locate directory parent\n"); + _("Unable to locate directory parent\n")); }; if (s_entry->filedir != NULL && s_entry->parent_rec != NULL) { @@ -1124,14 +1123,14 @@ static BOOL did_hint = FALSE; errmsgno(EX_BAD, - "Directories too deep for '%s' (%d) max is %d%s.\n", + _("Directories too deep for '%s' (%d) max is %d%s.\n"), path, this_dir->depth, RR_relocation_depth, - contflag?"; ignored - continuing":""); + contflag?_("; ignored - continuing"):""); if (!did_hint) { did_hint = TRUE; - errmsgno(EX_BAD, "To include the complete directory tree,\n"); - errmsgno(EX_BAD, "use Rock Ridge extensions via -R or -r,\n"); - errmsgno(EX_BAD, "or allow deep ISO9660 directory nesting via -D.\n"); + errmsgno(EX_BAD, _("To include the complete directory tree,\n")); + errmsgno(EX_BAD, _("use Rock Ridge extensions via -R or -r,\n")); + errmsgno(EX_BAD, _("or allow deep ISO9660 directory nesting via -D.\n")); } } @@ -1151,18 +1150,16 @@ struct directory_entry *de; { DIR *current_dir; - char whole_path[PATH_MAX]; + char whole_path[2*PATH_MAX]; /* Avoid stat buffer overflow */ struct dirent *d_entry; - struct directory *parent; int dflag; - char *old_path; extern BOOL nodesc; if (nodesc) return (1); if (verbose > 1) { - fprintf(stderr, "Scanning %s\n", path); + fprintf(stderr, _("Scanning %s\n"), path); } /*#define check_needed*/ #ifdef check_needed @@ -1172,7 +1169,7 @@ * implementing merge directories. */ if (this_dir->dir_flags & DIR_WAS_SCANNED) { - fprintf(stderr, "Already scanned directory %s\n", path); + fprintf(stderr, _("Already scanned directory %s\n"), path); return (1); /* It's a directory */ } #endif @@ -1186,17 +1183,15 @@ * Apparently NFS sometimes allows you to open the directory, but then * refuses to allow you to read the contents. Allow for this */ - old_path = path; - if (current_dir) { errno = 0; d_entry = readdir(current_dir); } - if (!current_dir || !d_entry) { + if (!current_dir || (!d_entry && errno != 0)) { int ret = 1; - errmsg("Unable to open directory %s\n", path); + errmsg(_("Unable to open directory %s\n"), path); if (errno == ENOTDIR) { /* @@ -1210,7 +1205,6 @@ return (ret); } - parent = de->filedir; /* * Set up the struct for the current directory, and insert it into * the tree @@ -1240,19 +1234,38 @@ /* * Now we scan the directory itself, and look at what is inside of it. */ - dflag = 0; + whole_path[0] = '\0'; + dflag = -2; while (1 == 1) { + char *d_name; - /* - * The first time through, skip this, since we already asked - * for the first entry when we opened the directory. - */ - if (dflag) - d_entry = readdir(current_dir); - dflag++; - - if (!d_entry) - break; + if (dflag < 0) { + /* + * Some filesystems do not deliver "." and ".." at all, + * others (on Linux) deliver them in the wrong order. + * Make sure we add "." and ".." before all other + * entries. + */ + if (dflag < -1) + d_name = "."; + else + d_name = ".."; + dflag++; + } else { + /* + * The first time through, skip this, since we already + * asked for the first entry when we opened the + * directory. + */ + if (dflag > 0) { + d_entry = readdir(current_dir); + } else { + dflag++; + } + if (!d_entry) + break; + d_name = d_entry->d_name; + } /* * OK, got a valid entry @@ -1260,13 +1273,13 @@ * If we do not want all files, then pitch the backups. */ if (!all_files) { - if (strchr(d_entry->d_name, '~') || - strchr(d_entry->d_name, '#') || - rstr(d_entry->d_name, ".bak")) { + if (strchr(d_name, '~') || + strchr(d_name, '#') || + rstr(d_name, ".bak")) { if (verbose > 0) { fprintf(stderr, - "Ignoring file %s\n", - d_entry->d_name); + _("Ignoring file %s\n"), + d_name); } continue; } @@ -1277,16 +1290,15 @@ * exclude certain HFS type files/directories for the * time being */ - if (hfs_exclude(d_entry->d_name)) + if (hfs_exclude(d_name)) continue; } #endif /* APPLE_HYB */ - if (strlen(path) + strlen(d_entry->d_name) + 2 > - sizeof (whole_path)) { - errmsgno(EX_BAD, "Path name %s/%s too long.\n", - path, d_entry->d_name); - comerrno(EX_BAD, "Overflow of stat buffer\n"); + if (strlen(path) + strlen(d_name) + 2 > sizeof (whole_path)) { + errmsgno(EX_BAD, _("Path name %s/%s too long.\n"), + path, d_name); + comerrno(EX_BAD, _("Overflow of stat buffer\n")); }; /* @@ -1297,27 +1309,30 @@ if (whole_path[strlen(whole_path) - 1] != '/') strcat(whole_path, "/"); #endif - strcat(whole_path, d_entry->d_name); + strcat(whole_path, d_name); /* * Should we exclude this file ? + * Do no check "." and ".." */ - if (matches(d_entry->d_name) || matches(whole_path)) { + if (!(d_name[0] == '.' && (d_name[1] == '\0' || + (d_name[1] == '.' && d_name[2] == '\0'))) && + (matches(d_name) || matches(whole_path))) { if (verbose > 1) { fprintf(stderr, - "Excluded by match: %s\n", whole_path); + _("Excluded by match: %s\n"), whole_path); } continue; } if (generate_tables && - strcmp(d_entry->d_name, trans_tbl) == 0) { + strcmp(d_name, trans_tbl) == 0) { /* * Ignore this entry. We are going to be generating * new versions of these files, and we need to ignore * any originals that we might have found. */ if (verbose > 1) { - fprintf(stderr, "Excluded: %s\n", whole_path); + fprintf(stderr, _("Excluded: %s\n"), whole_path); } continue; } @@ -1325,11 +1340,11 @@ * If we already have a '.' or a '..' entry, then don't insert * new ones. */ - if (strcmp(d_entry->d_name, ".") == 0 && + if (strcmp(d_name, ".") == 0 && this_dir->dir_flags & DIR_HAS_DOT) { continue; } - if (strcmp(d_entry->d_name, "..") == 0 && + if (strcmp(d_name, "..") == 0 && this_dir->dir_flags & DIR_HAS_DOTDOT) { continue; } @@ -1340,11 +1355,7 @@ /* * This actually adds the entry to the directory in question. */ -#ifdef APPLE_HYB - insert_file_entry(this_dir, whole_path, d_entry->d_name, NULL, 0); -#else - insert_file_entry(this_dir, whole_path, d_entry->d_name, NULL); -#endif /* APPLE_HYB */ + insert_file_entry(this_dir, whole_path, d_name, NULL, 0); } closedir(current_dir); @@ -1385,8 +1396,8 @@ e_malloc(sizeof (struct directory_entry)); memcpy(s_entry1, s_entry, sizeof (struct directory_entry)); s_entry1->table = NULL; - s_entry1->name = strdup(short_name); - s_entry1->whole_name = strdup(whole_path); + s_entry1->name = e_strdup(short_name); + s_entry1->whole_name = e_strdup(whole_path); s_entry1->next = reloc_dir->contents; reloc_dir->contents = s_entry1; s_entry1->priority = 32768; @@ -1404,7 +1415,7 @@ statp->st_size = (off_t)0; statp->st_mode &= 0777; - set_733((char *) s_entry->isorec.size, 0); + set_733((char *)s_entry->isorec.size, 0); s_entry->size = 0; s_entry->isorec.flags[0] = ISO_FILE; s_entry->inode = UNCACHED_INODE; @@ -1429,7 +1440,6 @@ * and the thing it points to is a dir), then we will scan those * trees before we return. */ -#ifdef APPLE_HYB EXPORT int insert_file_entry(this_dir, whole_path, short_name, statp, have_rsrc) struct directory *this_dir; @@ -1437,14 +1447,6 @@ char *short_name; struct stat *statp; int have_rsrc; -#else -EXPORT int -insert_file_entry(this_dir, whole_path, short_name, statp) - struct directory *this_dir; - char *whole_path; - char *short_name; - struct stat *statp; -#endif /* APPLE_HYB */ { struct stat statbuf, lstatbuf; @@ -1453,7 +1455,9 @@ int lstatus; int status; int deep_flag; +#ifdef USE_NO_SCANDIR int no_scandir = 0; +#endif #ifdef APPLE_HYB int x_hfs = 0; @@ -1480,7 +1484,7 @@ * This means that the file doesn't exist, or isn't accessible. * Sometimes this is because of NFS permissions problems. */ - errmsg("Non-existent or inaccessible: %s\n", whole_path); + errmsg(_("Non-existent or inaccessible: %s\n"), whole_path); return (0); } if (S_ISDIR(statbuf.st_mode) && @@ -1516,6 +1520,7 @@ status = 0; STAT_INODE(statbuf) = UNCACHED_INODE; statbuf.st_dev = UNCACHED_DEVICE; +#ifdef UDF if (create_udfsymlinks) { char symlinkcontents[2048]; off_t size = sizeof (symlinkcontents); @@ -1530,18 +1535,21 @@ statbuf.st_mode = lstatbuf.st_mode; } } else { +#endif statbuf.st_size = (off_t)0; statbuf.st_mode = (statbuf.st_mode & ~S_IFMT) | S_IFREG; +#ifdef UDF } +#endif } else { if (follow_links) { /* XXX errno may be wrong! */ - errmsg("Unable to stat file %s - ignoring and continuing.\n", + errmsg(_("Unable to stat file %s - ignoring and continuing.\n"), whole_path); } else { errmsgno(EX_BAD, - "Symlink %s ignored - continuing.\n", + _("Symlink %s ignored - continuing.\n"), whole_path); return (0); /* Non Rock Ridge discs */ /* - ignore all symlinks */ @@ -1564,7 +1572,7 @@ STAT_INODE(statbuf))) { if (!use_RockRidge) { fprintf(stderr, - "Already cached directory seen (%s)\n", + _("Already cached directory seen (%s)\n"), whole_path); return (0); } @@ -1610,8 +1618,7 @@ if (!S_ISDIR(lstatbuf.st_mode) && (statbuf.st_fab_rfm != FAB$C_FIX && statbuf.st_fab_rfm != FAB$C_STMLF)) { fprintf(stderr, - "Warning - file %s has an unsupported VMS record" - " format (%d)\n", + _("Warning - file %s has an unsupported VMS record format (%d)\n"), whole_path, statbuf.st_fab_rfm); } #endif @@ -1619,7 +1626,7 @@ if (S_ISREG(lstatbuf.st_mode) && ((statp != NULL && (status = access(short_name, R_OK))) || (statp == NULL && (status = access(whole_path, R_OK))))) { - errmsg("File %s is not readable - ignoring\n", + errmsg(_("File %s is not readable - ignoring\n"), whole_path); return (0); } @@ -1637,7 +1644,7 @@ #else errno = EFBIG; #endif - errmsg("File %s is too large for current mode - ignoring\n", + errmsg(_("File %s is too large for current mkisofs settings (-iso-level 3 or more required) - ignoring\n"), whole_path); return (0); } @@ -1651,9 +1658,9 @@ strcmp(short_name, "..") != 0) { if (find_directory_hash(statbuf.st_dev, STAT_INODE(statbuf))) { /* comerrno(EX_BAD,*/ -/* "Directory loop - fatal goof (%s %lx %lu).\n",*/ +/* _("Directory loop - fatal goof (%s %lx %lu).\n"),*/ errmsgno(EX_BAD, - "Warning: Directory loop (%s dev: %lx ino: %lu).\n", + _("Warning: Directory loop (%s dev: %lx ino: %lu).\n"), whole_path, (unsigned long) statbuf.st_dev, (unsigned long) STAT_INODE(statbuf)); } @@ -1664,18 +1671,28 @@ !S_ISLNK(lstatbuf.st_mode) && !S_ISREG(lstatbuf.st_mode) && !S_ISDIR(lstatbuf.st_mode)) { fprintf(stderr, - "Unknown file type (%s) %s - ignoring and continuing.\n", - filetype((int) lstatbuf.st_mode), whole_path); + _("Unknown file type (%s) %s - ignoring and continuing.\n"), + filetype((int)lstatbuf.st_mode), whole_path); return (0); } /* * Who knows what trash this is - ignore and continue */ if (status) { - errmsg("Unable to stat file %s - ignoring and continuing.\n", + errmsg(_("Unable to stat file %s - ignoring and continuing.\n"), whole_path); return (0); } + +#if !defined(__MINGW32__) && !defined(_MSC_VER) +#define is_archive(st) ((st).st_dev == archive_dev && (st).st_ino == archive_ino) + if (archive_isreg && is_archive(statbuf)) { + errmsgno(EX_BAD, + _("'%s' is the archive. Not dumped.\n"), whole_path); + return (0); + } +#endif + /* * Check to see if we have already seen this directory node. If so, * then we don't create a new entry for it, but we do want to recurse @@ -1740,7 +1757,7 @@ if ((x_hfs = (hfs_matches(short_name) || hfs_matches(whole_path))) == 1) { if (verbose > 1) { - fprintf(stderr, "Hidden from HFS tree: %s\n", + fprintf(stderr, _("Hidden from HFS tree: %s\n"), whole_path); } } @@ -1797,12 +1814,16 @@ deep_flag = 0; s_entry->table = NULL; - s_entry->name = strdup(short_name); - s_entry->whole_name = strdup(whole_path); + s_entry->name = e_strdup(short_name); + s_entry->whole_name = e_strdup(whole_path); s_entry->de_flags = 0; if (S_ISLNK(lstatbuf.st_mode)) s_entry->de_flags |= IS_SYMLINK; +#ifdef DUPLICATES_ONCE + s_entry->digest_fast = NULL; + s_entry->digest_full = NULL; +#endif /* * If the current directory is hidden, then hide all it's members @@ -1815,7 +1836,7 @@ if (i_matches(short_name) || i_matches(whole_path)) { if (verbose > 1) { fprintf(stderr, - "Hidden from ISO9660 tree: %s\n", + _("Hidden from ISO9660 tree: %s\n"), whole_path); } s_entry->de_flags |= INHIBIT_ISO9660_ENTRY; @@ -1823,7 +1844,7 @@ if (h_matches(short_name) || h_matches(whole_path)) { if (verbose > 1) { fprintf(stderr, - "Hidden ISO9660 attribute: %s\n", + _("Hidden ISO9660 attribute: %s\n"), whole_path); } s_entry->de_flags |= HIDDEN_FILE; @@ -1837,7 +1858,7 @@ if (j_matches(short_name) || j_matches(whole_path)) { if (verbose > 1) { fprintf(stderr, - "Hidden from Joliet tree: %s\n", + _("Hidden from Joliet tree: %s\n"), whole_path); } s_entry->de_flags |= INHIBIT_JOLIET_ENTRY; @@ -1851,7 +1872,7 @@ if (u_matches(short_name) || u_matches(whole_path)) { if (verbose > 1) { fprintf(stderr, - "Hidden from UDF tree: %s\n", + _("Hidden from UDF tree: %s\n"), whole_path); } s_entry->de_flags |= INHIBIT_UDF_ENTRY; @@ -1864,7 +1885,7 @@ */ s_entry->sort = this_dir->sort; -#ifdef DVD_VIDEO +#ifdef DVD_AUD_VID /* * No use at all to do a sort if we don't make a dvd video/audio */ @@ -1878,7 +1899,7 @@ * sort_matches would slow things to a crawl. */ - if (dvd_video) { + if (dvd_aud_vid_flag) { s_entry->sort = assign_dvd_weights(s_entry->name, this_dir, s_entry->sort); /* * Turn on sorting if necessary, regardless of cmd-line options @@ -2026,14 +2047,18 @@ if (S_ISCHR(lstatbuf.st_mode) || S_ISBLK(lstatbuf.st_mode) || S_ISFIFO(lstatbuf.st_mode) || S_ISSOCK(lstatbuf.st_mode) || +#ifdef UDF (S_ISLNK(lstatbuf.st_mode) && !create_udfsymlinks)) { +#else + FALSE) { +#endif s_entry->size = (off_t)0; statbuf.st_size = (off_t)0; } else { s_entry->size = statbuf.st_size; } - set_733((char *) s_entry->isorec.size, statbuf.st_size); + set_733((char *)s_entry->isorec.size, statbuf.st_size); } else { s_entry->isorec.flags[0] |= ISO_DIRECTORY; } @@ -2145,10 +2170,10 @@ case S_IFLNK: #ifdef HAVE_READLINK nchar = readlink(statp?short_name:whole_path, - (char *) symlink_buff, + (char *)symlink_buff, sizeof (symlink_buff)-1); if (nchar < 0) { - errmsg("Cannot read link '%s'.\n", + errmsg(_("Cannot read link '%s'.\n"), statp?short_name:whole_path); } #else @@ -2171,7 +2196,7 @@ s_entry->name); break; }; - s_entry->table = strdup(buffer); + s_entry->table = e_strdup(buffer); } if (S_ISDIR(statbuf.st_mode)) { int dflag; @@ -2182,9 +2207,11 @@ child = find_or_create_directory(this_dir, whole_path, s_entry, 1); +#ifdef USE_NO_SCANDIR if (no_scandir) dflag = 1; else +#endif dflag = scan_directory_tree(child, whole_path, s_entry); @@ -2260,8 +2287,10 @@ * directory */ if (s_entry->hfs_ent && - !(s_entry->de_flags & RELOCATED_DIRECTORY)) + !(s_entry->de_flags & RELOCATED_DIRECTORY) && + (s_entry->isorec.flags[0] & ISO_MULTIEXTENT) == 0) { free(s_entry->hfs_ent); + } s_entry->hfs_ent = NULL; } /* @@ -2297,12 +2326,23 @@ } #ifdef UDF /* set some info used for udf */ - s_entry->mode = statbuf.st_mode; - s_entry->uid = statbuf.st_uid; - s_entry->gid = statbuf.st_gid; + s_entry->mode = lstatbuf.st_mode; + s_entry->rdev = lstatbuf.st_rdev; + s_entry->uid = lstatbuf.st_uid; + s_entry->gid = lstatbuf.st_gid; + s_entry->atime.tv_sec = lstatbuf.st_atime; + s_entry->atime.tv_nsec = stat_ansecs(&lstatbuf); + s_entry->mtime.tv_sec = lstatbuf.st_mtime; + s_entry->mtime.tv_nsec = stat_mnsecs(&lstatbuf); + s_entry->ctime.tv_sec = lstatbuf.st_ctime; + s_entry->ctime.tv_nsec = stat_cnsecs(&lstatbuf); #endif #ifdef USE_LARGEFILES +#ifndef MAX_EXTENT + /* + * Allow to #define MAX_EXTENT from outside for debug purposes. + */ #ifdef PROTOTYPES #define LARGE_EXTENT ((off_t)0xFFFFF800UL) #define MAX_EXTENT ((off_t)0xFFFFFFFEUL) @@ -2310,6 +2350,9 @@ #define LARGE_EXTENT ((off_t)0xFFFFF800L) #define MAX_EXTENT ((off_t)0xFFFFFFFEL) #endif +#else /* MAX_EXTENT */ +#define LARGE_EXTENT MAX_EXTENT & ~(off_t)2047L +#endif /* !MAX_EXTENT */ /* * Break up files greater than (4GB -2) into multiple extents. * The original entry, with ->size untouched, remains for UDF. @@ -2329,13 +2372,11 @@ off_t size; s_entry->de_flags |= MULTI_EXTENT; + s_entry->isorec.flags[0] |= ISO_MULTIEXTENT; s_entry->mxroot = s_entry; s_entry->mxpart = 0; set_733((char *)s_entry->isorec.size, LARGE_EXTENT); - - s_entry1 = (struct directory_entry *) - e_malloc(sizeof (struct directory_entry)); - memcpy(s_entry1, s_entry, sizeof (struct directory_entry)); + s_entry1 = dup_directory_entry(s_entry); s_entry->next = s_entry1; /* @@ -2347,7 +2388,7 @@ #define EOVERFLOW EFBIG #endif errmsgno(EOVERFLOW, - "File %s is too large - hiding from UDF tree.\n", + _("File %s is too large - hiding from UDF tree.\n"), whole_path); s_entry->de_flags |= INHIBIT_UDF_ENTRY; } @@ -2357,7 +2398,6 @@ */ s_entry = s_entry1; s_entry->de_flags |= INHIBIT_UDF_ENTRY; - s_entry->isorec.flags[0] |= ISO_MULTIEXTENT; size = s_entry->size; s_entry->size = LARGE_EXTENT; s_entry->mxpart++; @@ -2366,10 +2406,7 @@ * Additional extents, as needed */ while (size > MAX_EXTENT) { - s_entry1 = (struct directory_entry *) - e_malloc(sizeof (struct directory_entry)); - memcpy(s_entry1, s_entry, - sizeof (struct directory_entry)); + s_entry1 = dup_directory_entry(s_entry); s_entry->next = s_entry1; s_entry = s_entry1; @@ -2388,6 +2425,34 @@ return (1); } +EXPORT struct directory_entry * +dup_directory_entry(s_entry) + struct directory_entry *s_entry; +{ + struct directory_entry *s_entry1; + + s_entry1 = (struct directory_entry *) + e_malloc(sizeof (struct directory_entry)); + memcpy(s_entry1, s_entry, sizeof (struct directory_entry)); + + if (s_entry->rr_attributes) { + s_entry1->rr_attributes = + e_malloc(s_entry->total_rr_attr_size); + memcpy(s_entry1->rr_attributes, s_entry->rr_attributes, + s_entry->total_rr_attr_size); + } + if (s_entry->name) + s_entry1->name = e_strdup(s_entry->name); + if (s_entry->whole_name) + s_entry1->whole_name = e_strdup(s_entry->whole_name); +#ifdef APPLE_HYB + /* + * If we also duplicate s_entry->hfs_ent, we would need to change + * free_one_directory() and other calls to free(s_entry->hfs_ent) too. + */ +#endif + return (s_entry1); +} EXPORT void generate_iso9660_directories(node, outfile) @@ -2464,8 +2529,10 @@ * XXX be found. */ if (path == NULL) { - error("Warning: missing whole name for: '%s'\n", de->name); + error(_("Warning: missing whole name for: '%s'\n"), de->name); path = de->name; + if (path == NULL) + comerrno(EX_BAD, _("Panic no node name.\n")); } pnt = strrchr(path, PATH_SEPARATOR); if (pnt == NULL) { @@ -2525,8 +2592,8 @@ memset(de, 0, sizeof (struct directory_entry)); de->next = parent->contents; parent->contents = de; - de->name = strdup(pnt); - de->whole_name = strdup(path); + de->name = e_strdup(pnt); + de->whole_name = e_strdup(path); de->filedir = parent; de->isorec.flags[0] = ISO_DIRECTORY; de->priority = 32768; @@ -2558,7 +2625,7 @@ /* * Get the Mac directory name */ - get_hfs_dir((char *) path, (char *) pnt, de); + get_hfs_dir((char *)path, (char *)pnt, de); } #endif /* APPLE_HYB */ } @@ -2566,19 +2633,19 @@ * If we don't have a directory for this one yet, then allocate it now, * and patch it into the tree in the appropriate place. */ - dpnt = (struct directory *) e_malloc(sizeof (struct directory)); + dpnt = (struct directory *)e_malloc(sizeof (struct directory)); memset(dpnt, 0, sizeof (struct directory)); dpnt->next = NULL; dpnt->subdir = NULL; dpnt->self = de; dpnt->contents = NULL; - dpnt->whole_name = strdup(path); + dpnt->whole_name = e_strdup(path); cpnt = strrchr(path, PATH_SEPARATOR); if (cpnt) cpnt++; else cpnt = path; - dpnt->de_name = strdup(cpnt); + dpnt->de_name = e_strdup(cpnt); dpnt->de_path = NULL; set_de_path(parent, dpnt); dpnt->size = 0; @@ -2604,7 +2671,7 @@ else sts = stat_filter(parent->whole_name, &xstatbuf); if (debug && parent) { - error("stat parent->whole_name: '%s' -> %d.\n", + error(_("stat parent->whole_name: '%s' -> %d.\n"), parent->whole_name, sts); } if (sts == 0) { @@ -2687,16 +2754,34 @@ * It doesn't exist for real, so we cannot add any * XA or Rock Ridge attributes. */ - if (orig_de == NULL) { + if (orig_de == NULL || (parent == NULL && path[0] == '\0')) { init_fstatbuf(); - if (use_XA || use_RockRidge) { - fstatbuf.st_mode = new_dir_mode | S_IFDIR; - fstatbuf.st_nlink = 2; + fstatbuf.st_mode = new_dir_mode | S_IFDIR; + fstatbuf.st_nlink = 2; + if ((use_XA || use_RockRidge) && + !(parent == NULL && path[0] == '\0')) { + /* + * We cannot set up RR attrubutes for the real + * ISO-9660 root directory. This is why we + * check for parent == NULL && path[0] == '\0'. + */ generate_xa_rr_attributes("", - (char *) pnt, de, + (char *)pnt, de, &fstatbuf, &fstatbuf, deep_flag); } +#ifdef UDF + /* set some info used for udf */ + de->mode = fstatbuf.st_mode; + de->uid = fstatbuf.st_uid; + de->gid = fstatbuf.st_gid; + de->atime.tv_sec = fstatbuf.st_atime; + de->atime.tv_nsec = stat_ansecs(&fstatbuf); + de->mtime.tv_sec = fstatbuf.st_mtime; + de->mtime.tv_nsec = stat_mnsecs(&fstatbuf); + de->ctime.tv_sec = fstatbuf.st_ctime; + de->ctime.tv_nsec = stat_cnsecs(&fstatbuf); +#endif iso9660_date(de->isorec.date, fstatbuf.st_mtime); } if (child) @@ -2719,8 +2804,10 @@ { struct directory *tdir; + if (child == NULL) + return; if (child->contents != NULL) { - comerrno(EX_BAD, "Unable to delete non-empty directory\n"); + comerrno(EX_BAD, _("Unable to delete non-empty directory\n")); } free(child->whole_name); child->whole_name = NULL; @@ -2736,16 +2823,16 @@ if (parent->subdir == child) { parent->subdir = child->next; } else { - for (tdir = parent->subdir; tdir->next != NULL; + for (tdir = parent->subdir; tdir != NULL && tdir->next != NULL; tdir = tdir->next) { if (tdir->next == child) { tdir->next = child->next; break; } } - if (tdir == NULL) { + if (tdir == NULL || tdir->next != child->next) { comerrno(EX_BAD, - "Unable to locate child directory in parent list\n"); + _("Unable to locate child directory in parent list\n")); } } free(child); @@ -2808,13 +2895,13 @@ /* * Strip off next directory name from filename: */ - subdir = strdup(filename); + subdir = e_strdup(filename); if ((p1 = strchr(subdir, '/')) == subdir) { fprintf(stderr, - "call to search_tree_file with an absolute path, stripping\n"); + _("call to search_tree_file with an absolute path, stripping\n")); fprintf(stderr, - "initial path separator. Hope this was intended...\n"); + _("initial path separator. Hope this was intended...\n")); memmove(subdir, subdir + 1, strlen(subdir) - 1); p1 = strchr(subdir, '/'); } @@ -2825,13 +2912,13 @@ *p1 = '\0'; #ifdef DEBUG_TORITO - fprintf(stderr, "Looking for subdir called %s\n", p1); + fprintf(stderr, _("Looking for subdir called %s\n"), p1); #endif rest = p1 + 1; #ifdef DEBUG_TORITO - fprintf(stderr, "Remainder of path name is now %s\n", rest); + fprintf(stderr, _("Remainder of path name is now %s\n"), rest); #endif dpnt = node->subdir; @@ -2844,7 +2931,7 @@ if (strcmp(subdir, dpnt->de_name) == 0) { #ifdef DEBUG_TORITO fprintf(stderr, - "Calling next level with filename = %s", rest); + _("Calling next level with filename = %s\n"), rest); #endif return (search_tree_file(dpnt, rest)); } @@ -2867,7 +2954,7 @@ #endif if (strcmp(filename, depnt->name) == 0) { #ifdef DEBUG_TORITO - fprintf(stderr, "Found our file %s", filename); + fprintf(stderr, _("Found our file %s"), filename); #endif return (depnt); } @@ -2879,17 +2966,17 @@ return (NULL); } #ifdef ERIC_FUN - fprintf(stderr, "We cant get here in search_tree_file :-/ \n"); + fprintf(stderr, _("We cant get here in search_tree_file :-/ \n")); #endif } EXPORT void init_fstatbuf() { - time_t current_time; + struct timeval current_time; if (fstatbuf.st_ctime == 0) { - time(¤t_time); + gettimeofday(¤t_time, NULL); if (rationalize_uid) fstatbuf.st_uid = uid_to_use; else @@ -2898,8 +2985,13 @@ fstatbuf.st_gid = gid_to_use; else fstatbuf.st_gid = getgid(); - fstatbuf.st_ctime = current_time; - fstatbuf.st_mtime = current_time; - fstatbuf.st_atime = current_time; + + current_time.tv_usec *= 1000; + fstatbuf.st_ctime = current_time.tv_sec; + stat_set_ansecs(&fstatbuf, current_time.tv_usec); + fstatbuf.st_mtime = current_time.tv_sec; + stat_set_mnsecs(&fstatbuf, current_time.tv_usec); + fstatbuf.st_atime = current_time.tv_sec; + stat_set_cnsecs(&fstatbuf, current_time.tv_usec); } } diff -Nru cdrtools-2.01.01a33/mkisofs/udf.c cdrtools-3.02a09/mkisofs/udf.c --- cdrtools-2.01.01a33/mkisofs/udf.c 2007-07-29 22:27:09.000000000 +0000 +++ cdrtools-3.02a09/mkisofs/udf.c 2016-11-14 19:21:09.000000000 +0000 @@ -1,33 +1,34 @@ -/* @(#)udf.c 1.30 07/07/30 Copyright 2001-2007 J. Schilling */ +/* @(#)udf.c 1.46 16/11/14 Copyright 2001-2016 J. Schilling */ +#include #ifndef lint -static char sccsid[] = - "@(#)udf.c 1.30 07/07/30 Copyright 2001-2007 J. Schilling"; +static UConst char sccsid[] = + "@(#)udf.c 1.46 16/11/14 Copyright 2001-2016 J. Schilling"; #endif /* * udf.c - UDF support for mkisofs * * Written by Ben Rudiak-Gould (2001). * - * Copyright 2001-2007 J. Schilling. - */ -/* - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 - * as published by the Free Software Foundation. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License along with - * this program; see the file COPYING. If not, write to the Free Software - * Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * Copyright 2001-2016 J. Schilling. */ +/*@@C@@*/ /* * Some remaining issues: * + * - The following functions create directory entries with 2 or + * more AllocationDescriptors: + * + * set_file_entry() + * set_macvolume_filed_entry() + * set_attr_file_entry() + * set_filed_entry() + * + * To support files > 236 GB, we need to be able to deal with a list + * of direcoty entries that span more than one sector. + * + * - The link count may be wrong if -hide-udf is used. + * * - Do not forget to edit joliet.c and remove the VIDEO_TS lines after * we did implement a decent own file name handling for UDF. * @@ -70,11 +71,10 @@ * mechanism to handle this case. I don't know if it's worth the trouble. */ -#ifdef UDF - -#include #include "mkisofs.h" +#ifdef UDF #include +#include #include #include @@ -85,7 +85,7 @@ extern int use_sparcboot; extern struct directory *root; -extern time_t begun; +extern struct timeval tv_begun; static unsigned lba_main_seq; static unsigned lba_main_seq_copy; @@ -97,7 +97,7 @@ static unsigned num_udf_files; static unsigned num_udf_directories; -static unsigned volume_set_id[2]; +static unsigned volume_set_id[2] = { 0, 0 }; #define UDF_MAIN_SEQ_LENGTH (16) #define UDF_INTEG_SEQ_LENGTH (2) @@ -112,6 +112,7 @@ /**************** SIZE ****************/ LOCAL unsigned long getperms __PR((mode_t mode)); +LOCAL unsigned long getflags __PR((mode_t mode)); LOCAL unsigned int directory_size __PR((struct directory *dpnt)); LOCAL void assign_udf_directory_addresses __PR((struct directory *dpnt)); LOCAL void assign_udf_file_entry_addresses __PR((struct directory *dpnt)); @@ -136,6 +137,7 @@ LOCAL void set_charspec __PR((udf_charspec *dst)); LOCAL void set_impl_ident __PR((udf_EntityID *ent)); LOCAL void set_tag __PR((udf_tag *t, unsigned int tid, UInt32_t lba, int crc_length)); +LOCAL void set_timestamp_from_timespec __PR((udf_timestamp *ts, timesp *tsp)); LOCAL void set_timestamp_from_iso_date __PR((udf_timestamp *ts, const char *iso_date_raw)); LOCAL void set_timestamp_from_time_t __PR((udf_timestamp *ts, time_t t)); LOCAL void set_anchor_volume_desc_pointer __PR((unsigned char *buf, UInt32_t lba)); @@ -150,22 +152,22 @@ LOCAL void set_file_set_desc __PR((unsigned char *buf, UInt32_t rba)); LOCAL int set_file_ident_desc __PR((unsigned char *, UInt32_t, char *, int, UInt32_t, unsigned)); LOCAL void set_file_entry __PR((unsigned char *buf, UInt32_t rba, UInt32_t file_rba, - off_t length, const char *iso_date, int is_directory, + off_t length, int is_directory, unsigned link_count, unsigned unique_id, hfsdirent *hfs_ent, - unsigned long res_log_block, mode_t fmode, uid_t fuid, gid_t fgid)); + unsigned long res_log_block, struct directory_entry *de)); LOCAL void udf_size_panic __PR((int n)); LOCAL void set_macvolume_filed_entry __PR((unsigned char *buf, UInt32_t rba, UInt32_t file_rba, - unsigned length, const char *iso_date, int is_directory, + unsigned length, int is_directory, unsigned link_count, unsigned unique_id, hfsdirent *hfs_ent, - mode_t fmode, uid_t fuid, gid_t fgid)); + struct directory_entry *de)); LOCAL void set_attr_file_entry __PR((unsigned char *buf, unsigned rba, unsigned file_rba, - off_t length, const char *iso_date, int is_directory, + off_t length, int is_directory, unsigned link_count, unsigned unique_id, hfsdirent *hfs_ent, - mode_t fmode, uid_t fuid, gid_t fgid)); + struct directory_entry *de)); LOCAL void set_filed_entry __PR((unsigned char *buf, unsigned rba, unsigned file_rba, - unsigned length, const char *iso_date, int is_directory, + unsigned length, int is_directory, unsigned link_count, unsigned unique_id, hfsdirent *hfs_ent, - mode_t fmode, uid_t fuid, gid_t fgid)); + struct directory_entry *de)); LOCAL unsigned int directory_link_count __PR((struct directory *dpnt)); LOCAL void write_one_udf_directory __PR((struct directory *dpnt, FILE *outfile)); LOCAL void write_udf_directories __PR((struct directory *dpnt, FILE *outfile)); @@ -247,6 +249,30 @@ return (m); } +/* + * get UNIX special modes: S_ISUID, S_ISGID, S_ISVTX + * The result is not stored in the UDF permisson but in the flags. + */ +LOCAL unsigned long +#ifdef PROTOTYPES +getflags(mode_t mode) +#else +getflags(mode) + mode_t mode; +#endif +{ + long f = 0; + + if (mode & S_ISUID) + f |= UDF_ICBTAG_FLAG_SETUID; + if (mode & S_ISGID) + f |= UDF_ICBTAG_FLAG_SETGID; + if (mode & S_ISVTX) + f |= UDF_ICBTAG_FLAG_STICKY; + + return (f); +} + LOCAL unsigned directory_size(dpnt) struct directory *dpnt; @@ -294,6 +320,8 @@ if (!(dpnt->dir_flags & INHIBIT_UDF_ENTRY)) { struct directory_entry *de; for (de = dpnt->jcontents; de; de = de->jnext) { + if (de->de_flags & INHIBIT_UDF_ENTRY) + continue; if (!(de->de_flags & RELOCATED_DIRECTORY) && !(de->isorec.flags[0] & ISO_DIRECTORY)) { de->udf_file_entry_sector = last_extent++; @@ -588,6 +616,27 @@ } LOCAL void +set_timestamp_from_timespec(ts, tsp) + udf_timestamp *ts; + timesp *tsp; +{ + struct tm *tmp = gmtime(&tsp->tv_sec); + int usec = tsp->tv_nsec / 1000; + + set16(&ts->type_and_time_zone, 4096); /* "Local time" == GMT */ + set16(&ts->year, 1900 + tmp->tm_year); + set8(&ts->month, tmp->tm_mon + 1); + set8(&ts->day, tmp->tm_mday); + set8(&ts->hour, tmp->tm_hour); + set8(&ts->minute, tmp->tm_min); + set8(&ts->second, tmp->tm_sec); + set8(&ts->centiseconds, usec / 10000); + usec %= 10000; + set8(&ts->hundreds_of_microseconds, usec / 100); + set8(&ts->microseconds, usec % 100); +} + +LOCAL void set_timestamp_from_iso_date(ts, iso_date_raw) udf_timestamp *ts; const char *iso_date_raw; @@ -661,7 +710,7 @@ /*pvd->volume_abstract;*/ /*pvd->volume_copyright_notice;*/ /*pvd->application_ident;*/ - set_timestamp_from_time_t(&pvd->recording_date_and_time, begun); + set_timestamp_from_time_t(&pvd->recording_date_and_time, tv_begun.tv_sec); set_impl_ident(&pvd->impl_ident); set_tag(&pvd->desc_tag, UDF_TAGID_PRIMARY_VOLUME_DESC, lba, 512); } @@ -769,7 +818,7 @@ udf_logical_volume_integrity_desc *lvid = (udf_logical_volume_integrity_desc *)buf; - set_timestamp_from_time_t(&lvid->recording_date, begun); + set_timestamp_from_time_t(&lvid->recording_date, tv_begun.tv_sec); set32(&lvid->integrity_type, UDF_INTEGRITY_TYPE_CLOSE); /*lvid->next_integrity_extent;*/ set64(&lvid->logical_volume_contents_use.unique_id, @@ -797,7 +846,7 @@ { udf_file_set_desc *fsd = (udf_file_set_desc *)buf; - set_timestamp_from_time_t(&fsd->recording_date_and_time, begun); + set_timestamp_from_time_t(&fsd->recording_date_and_time, tv_begun.tv_sec); set16(&fsd->interchange_level, 3); set16(&fsd->maximum_interchange_level, 3); set32(&fsd->character_set_list, 1); @@ -842,7 +891,7 @@ set16(&fid->length_of_impl_use, 0); if (name) { length_of_file_ident = - set_ostaunicode((Uchar *)fid->file_ident, 512, name); + set_ostaunicode((Uchar *)fid->file_ident, 256, name); } else { length_of_file_ident = 0; } @@ -862,34 +911,28 @@ UInt32_t rba, UInt32_t file_rba, off_t length, - const char *iso_date, int is_directory, unsigned link_count, unsigned unique_id, hfsdirent *hfs_ent, unsigned long res_log_block, - mode_t fmode, - uid_t fuid, - gid_t fgid) + struct directory_entry *de) #else -set_file_entry(buf, rba, file_rba, length, iso_date, is_directory, link_count, +set_file_entry(buf, rba, file_rba, length, is_directory, link_count, unique_id, hfs_ent, - res_log_block, fmode, fuid, fgid) + res_log_block, de) unsigned char *buf; UInt32_t rba; UInt32_t file_rba; off_t length; - const char *iso_date; int is_directory; unsigned link_count; unsigned unique_id; hfsdirent *hfs_ent; unsigned long res_log_block; - mode_t fmode; - uid_t fuid; - gid_t fgid; + struct directory_entry *de; #endif { udf_short_ad *allocation_desc; @@ -906,10 +949,46 @@ set16(&fe->icb_tag.strategy_type, 4); /*set16(&fe->icb_tag.strategy_parameter, 0);*/ set16(&fe->icb_tag.maximum_number_of_entries, 1); - if (S_ISLNK(fmode)) { - set8(&fe->icb_tag.file_type, UDF_ICBTAG_FILETYPE_SYMLINK); - } else + + switch (de->mode & S_IFMT) { + +#ifdef S_IFIFO + case S_IFIFO: + set8(&fe->icb_tag.file_type, UDF_ICBTAG_FILETYPE_FIFO); + break; +#endif + +#ifdef S_IFCHR + case S_IFCHR: + set8(&fe->icb_tag.file_type, UDF_ICBTAG_FILETYPE_CHAR_DEV); + break; +#endif + +#ifdef S_IFBLK + case S_IFBLK: + set8(&fe->icb_tag.file_type, UDF_ICBTAG_FILETYPE_BLOCK_DEV); + break; +#endif + + case S_IFREG: + /* FALLTHROUGH */ + default: set8(&fe->icb_tag.file_type, UDF_ICBTAG_FILETYPE_BYTESEQ); + break; + +#ifdef S_IFLNK + case S_IFLNK: + set8(&fe->icb_tag.file_type, UDF_ICBTAG_FILETYPE_SYMLINK); + break; +#endif + +#ifdef S_IFSOCK + case S_IFSOCK: + set8(&fe->icb_tag.file_type, UDF_ICBTAG_FILETYPE_C_ISSOCK); + break; +#endif + } + /*fe->icb_tag.parent_icb_location;*/ /* UDF_ICBTAG_FLAG_SYSTEM shall be set for MS-DOS, OS/2, Win95 and WinNT as of UDF260 3.3.2.1 */ flags = UDF_ICBTAG_FLAG_NONRELOCATABLE | UDF_ICBTAG_FLAG_ARCHIVE | UDF_ICBTAG_FLAG_CONTIGUOUS; @@ -920,17 +999,18 @@ flags |= UDF_ICBTAG_FLAG_SYSTEM; } } + flags |= getflags(de->mode); /* S_ISUID, S_ISGID, S_ISVTX */ set16(&fe->icb_tag.flags, flags); - set32(&fe->permissions, getperms(fmode)); + set32(&fe->permissions, getperms(de->mode)); if (rationalize_uid) set32(&fe->uid, uid_to_use); else - set32(&fe->uid, fuid); + set32(&fe->uid, de->uid); if (rationalize_gid) set32(&fe->gid, gid_to_use); else - set32(&fe->gid, fgid); + set32(&fe->gid, de->gid); set16(&fe->file_link_count, link_count); @@ -939,11 +1019,11 @@ /*fe->record_length;*/ set64(&fe->info_length, length); set64(&fe->logical_blocks_recorded, ISO_BLOCKS(length)); - if (iso_date) { - set_timestamp_from_iso_date(&fe->access_time, iso_date); - fe->modification_time = fe->access_time; - fe->attribute_time = fe->access_time; - } + + set_timestamp_from_timespec(&fe->access_time, &de->atime); + set_timestamp_from_timespec(&fe->modification_time, &de->mtime); + set_timestamp_from_timespec(&fe->attribute_time, &de->ctime); + set32(&fe->checkpoint, 1); if (res_log_block) { @@ -957,16 +1037,30 @@ /* write mac finderinfos etc. required for directories and files */ set32(&fe->length_of_ext_attributes, sizeof (udf_ext_attribute_header_desc) + + sizeof (udf_ext_attribute_dev_spec) + sizeof (udf_ext_attribute_free_ea_space) + sizeof (udf_ext_attribute_dvd_cgms_info) + sizeof (udf_ext_attribute_file_macfinderinfo)); set32(&fe->ext_attribute_header.impl_attributes_location, sizeof (udf_ext_attribute_header_desc)); set32(&fe->ext_attribute_header.application_attributes_location, sizeof (udf_ext_attribute_header_desc) + + sizeof (udf_ext_attribute_dev_spec) + sizeof (udf_ext_attribute_free_ea_space) + sizeof (udf_ext_attribute_dvd_cgms_info) + sizeof (udf_ext_attribute_file_macfinderinfo)); set_tag(&fe->ext_attribute_header.desc_tag, UDF_TAGID_EXT_ATTRIBUTE_HEADER_DESC, rba, sizeof (udf_ext_attribute_header_desc)); + set32(&fe->ext_attribute_dev_spec.attribute_type, 12); + set8(&fe->ext_attribute_dev_spec.attribute_subtype, 1); + set32(&fe->ext_attribute_dev_spec.attribute_length, 24); + set32(&fe->ext_attribute_dev_spec.impl_use_length, 0); + if (S_ISCHR(de->mode) || S_ISBLK(de->mode)) { + set32(&fe->ext_attribute_dev_spec.dev_major, major(de->rdev)); + set32(&fe->ext_attribute_dev_spec.dev_minor, minor(de->rdev)); + } else { + set32(&fe->ext_attribute_dev_spec.dev_major, 0); + set32(&fe->ext_attribute_dev_spec.dev_minor, 0); + } + set32(&fe->ext_attribute_free_ea_space.attribute_type, SECTOR_SIZE); set8(&fe->ext_attribute_free_ea_space.attribute_subtype, 1); set32(&fe->ext_attribute_free_ea_space.attribute_length, 52); @@ -1087,7 +1181,7 @@ int n; { comerrno(EX_BAD, - "Panic: UDF file size error, too many extents (%d).\n", n); + _("Panic: UDF file size error, too many extents (%d).\n"), n); } @@ -1097,29 +1191,23 @@ UInt32_t rba, UInt32_t file_rba, unsigned length, - const char *iso_date, int is_directory, unsigned link_count, unsigned unique_id, hfsdirent *hfs_ent, - mode_t fmode, - uid_t fuid, - gid_t fgid + struct directory_entry *de ) #else -set_macvolume_filed_entry(buf, rba, file_rba, length, iso_date, is_directory, link_count, unique_id, hfs_ent, fmode, fuid, fgid) +set_macvolume_filed_entry(buf, rba, file_rba, length, is_directory, link_count, unique_id, hfs_ent, de) unsigned char *buf; UInt32_t rba; UInt32_t file_rba; unsigned length; - const char *iso_date; int is_directory; unsigned link_count; unsigned unique_id; hfsdirent *hfs_ent; - mode_t fmode; - uid_t fuid; - gid_t fgid; + struct directory_entry *de; #endif { udf_short_ad *allocation_desc; @@ -1147,17 +1235,18 @@ flags |= UDF_ICBTAG_FLAG_SYSTEM; } } + flags |= getflags(de->mode); /* S_ISUID, S_ISGID, S_ISVTX */ set16(&fe->icb_tag.flags, flags); - set32(&fe->permissions, getperms(fmode)); + set32(&fe->permissions, getperms(de->mode)); if (rationalize_uid) set32(&fe->uid, uid_to_use); else - set32(&fe->uid, fuid); + set32(&fe->uid, de->uid); if (rationalize_gid) set32(&fe->gid, gid_to_use); else - set32(&fe->gid, fgid); + set32(&fe->gid, de->gid); set16(&fe->file_link_count, link_count); /*fe->record_format;*/ @@ -1165,11 +1254,11 @@ /*fe->record_length;*/ set64(&fe->info_length, length); set64(&fe->logical_blocks_recorded, ISO_BLOCKS(length)); - if (iso_date) { - set_timestamp_from_iso_date(&fe->access_time, iso_date); - fe->modification_time = fe->access_time; - fe->attribute_time = fe->access_time; - } + + set_timestamp_from_timespec(&fe->access_time, &de->atime); + set_timestamp_from_timespec(&fe->modification_time, &de->mtime); + set_timestamp_from_timespec(&fe->attribute_time, &de->ctime); + set32(&fe->checkpoint, 1); /*fe->ext_attribute_icb;*/ set_impl_ident(&fe->impl_ident); @@ -1296,28 +1385,23 @@ unsigned rba, unsigned file_rba, off_t length, - const char *iso_date, int is_directory, unsigned link_count, unsigned unique_id, hfsdirent *hfs_ent, - mode_t fmode, - uid_t fuid, - gid_t fgid) + struct directory_entry *de +) #else -set_attr_file_entry(buf, rba, file_rba, length, iso_date, is_directory, link_count, unique_id, hfs_ent, fmode, fuid, fgid) +set_attr_file_entry(buf, rba, file_rba, length, is_directory, link_count, unique_id, hfs_ent, de) unsigned char *buf; unsigned rba; unsigned file_rba; off_t length; - const char *iso_date; int is_directory; unsigned link_count; unsigned unique_id; hfsdirent *hfs_ent; - mode_t fmode; - uid_t fuid; - gid_t fgid; + struct directory_entry *de; #endif { udf_short_ad *allocation_desc; @@ -1342,17 +1426,18 @@ flags |= UDF_ICBTAG_FLAG_SYSTEM; } } + flags |= getflags(de->mode); /* S_ISUID, S_ISGID, S_ISVTX */ set16(&fe->icb_tag.flags, flags); - set32(&fe->permissions, getperms(fmode)); + set32(&fe->permissions, getperms(de->mode)); if (rationalize_uid) set32(&fe->uid, uid_to_use); else - set32(&fe->uid, fuid); + set32(&fe->uid, de->uid); if (rationalize_gid) set32(&fe->gid, gid_to_use); else - set32(&fe->gid, fgid); + set32(&fe->gid, de->gid); set16(&fe->file_link_count, link_count); @@ -1365,11 +1450,11 @@ length += 2048 - (length % 2048); set64(&fe->info_length, length); set64(&fe->logical_blocks_recorded, ISO_BLOCKS(length)); - if (iso_date) { - set_timestamp_from_iso_date(&fe->access_time, iso_date); - fe->modification_time = fe->access_time; - fe->attribute_time = fe->access_time; - } + + set_timestamp_from_timespec(&fe->access_time, &de->atime); + set_timestamp_from_timespec(&fe->modification_time, &de->mtime); + set_timestamp_from_timespec(&fe->attribute_time, &de->ctime); + set32(&fe->checkpoint, 1); /*fe->ext_attribute_icb;*/ set_impl_ident(&fe->impl_ident); @@ -1412,28 +1497,22 @@ unsigned rba, unsigned file_rba, unsigned length, - const char *iso_date, int is_directory, unsigned link_count, unsigned unique_id, hfsdirent *hfs_ent, - mode_t fmode, - uid_t fuid, - gid_t fgid) + struct directory_entry *de) #else -set_filed_entry(buf, rba, file_rba, length, iso_date, is_directory, link_count, unique_id, hfs_ent, fmode, fuid, fgid) +set_filed_entry(buf, rba, file_rba, length, is_directory, link_count, unique_id, hfs_ent, de) unsigned char *buf; unsigned rba; unsigned file_rba; unsigned length; - const char *iso_date; int is_directory; unsigned link_count; unsigned unique_id; hfsdirent *hfs_ent; - mode_t fmode; - uid_t fuid; - gid_t fgid; + struct directory_entry *de; #endif { udf_short_ad *allocation_desc; @@ -1461,17 +1540,18 @@ flags |= UDF_ICBTAG_FLAG_SYSTEM; } } + flags |= getflags(de->mode); /* S_ISUID, S_ISGID, S_ISVTX */ set16(&fe->icb_tag.flags, flags); - set32(&fe->permissions, getperms(fmode)); + set32(&fe->permissions, getperms(de->mode)); if (rationalize_uid) set32(&fe->uid, uid_to_use); else - set32(&fe->uid, fuid); + set32(&fe->uid, de->uid); if (rationalize_gid) set32(&fe->gid, gid_to_use); else - set32(&fe->gid, fgid); + set32(&fe->gid, de->gid); set16(&fe->file_link_count, link_count); @@ -1480,11 +1560,11 @@ /*fe->record_length;*/ set64(&fe->info_length, length); set64(&fe->logical_blocks_recorded, ISO_BLOCKS(length)); - if (iso_date) { - set_timestamp_from_iso_date(&fe->access_time, iso_date); - fe->modification_time = fe->access_time; - fe->attribute_time = fe->access_time; - } + + set_timestamp_from_timespec(&fe->access_time, &de->atime); + set_timestamp_from_timespec(&fe->modification_time, &de->mtime); + set_timestamp_from_timespec(&fe->attribute_time, &de->ctime); + set32(&fe->checkpoint, 1); /*fe->ext_attribute_icb;*/ set_impl_ident(&fe->impl_ident); @@ -1654,7 +1734,6 @@ last_extent_written - lba_udf_partition_start, last_extent_written+1 - lba_udf_partition_start, directory_size(dpnt), - dpnt->self->isorec.date, 1, /* is_directory */ directory_link_count(dpnt), (dpnt == root) ? 0 : dpnt->self->udf_file_entry_sector, @@ -1663,9 +1742,7 @@ #else NULL, #endif - dpnt->self->mode, - dpnt->self->uid, - dpnt->self->gid); + dpnt->self); } else { #endif set_filed_entry( @@ -1673,7 +1750,6 @@ last_extent_written - lba_udf_partition_start, last_extent_written+1 - lba_udf_partition_start, directory_size(dpnt), - dpnt->self->isorec.date, 1, /* is_directory */ directory_link_count(dpnt), (dpnt == root) ? 0 : dpnt->self->udf_file_entry_sector, @@ -1682,9 +1758,7 @@ #else NULL, #endif - dpnt->self->mode, - dpnt->self->uid, - dpnt->self->gid); + dpnt->self); #ifdef INSERTMACRESFORK } #endif @@ -1733,7 +1807,7 @@ } if (!de1) { comerrno(EX_BAD, - "Unable to locate relocated directory\n"); + _("Unable to locate relocated directory\n")); } } @@ -1777,15 +1851,21 @@ struct directory *dpnt; FILE *outfile; { - Uchar buf[SECTOR_SIZE]; - unsigned long logical_block = 0; - off_t attr_size = 0; + Uchar buf[SECTOR_SIZE]; + unsigned long logical_block = 0; + off_t attr_size = 0; + struct file_hash *s_hash; + nlink_t nlink; + unsigned int file_id; + memset(buf, 0, SECTOR_SIZE); if (!(dpnt->dir_flags & INHIBIT_UDF_ENTRY)) { struct directory_entry *de; for (de = dpnt->jcontents; de; de = de->jnext) { + if (de->de_flags & INHIBIT_UDF_ENTRY) + continue; if (!(de->de_flags & RELOCATED_DIRECTORY) && !(de->isorec.flags[0] & ISO_DIRECTORY)) { #ifdef INSERTMACRESFORK @@ -1795,16 +1875,23 @@ logical_block = 0; } #endif + if (correct_inodes && + (s_hash = find_hash(de)) != NULL) { + nlink = s_hash->nlink; + file_id = s_hash->starting_block; + } else { + nlink = 1; + file_id = de->udf_file_entry_sector; + } memset(buf, 0, SECTOR_SIZE); set_file_entry( buf, (last_extent_written++) - lba_udf_partition_start, - get_733(de->isorec.extent) - lba_udf_partition_start, + de->starting_block - lba_udf_partition_start, de->size, - de->isorec.date, 0, /* is_directory */ - 1, /* link_count */ - de->udf_file_entry_sector, + nlink, /* link_count */ + file_id, #ifdef APPLE_HYB de->hfs_ent, #else @@ -1815,14 +1902,11 @@ #else 0, #endif - de->mode, - de->uid, - de->gid); + de); xfwrite(buf, SECTOR_SIZE, 1, outfile, 0, FALSE); #ifdef INSERTMACRESFORK if (de->assoc) { - if (ISO_ROUND_UP(de->assoc->size) < ISO_ROUND_UP(de->assoc->size + sizeof (udf_ext_attribute_common))) { attr_size = sizeof (udf_ext_attribute_common); @@ -1832,9 +1916,8 @@ set_attr_file_entry( buf, (last_extent_written++) - lba_udf_partition_start, - get_733(de->assoc->isorec.extent) - lba_udf_partition_start, + de->assoc->starting_block - lba_udf_partition_start, de->assoc->size + SECTOR_SIZE + attr_size, - de->isorec.date, 0, 0, de->udf_file_entry_sector, @@ -1843,9 +1926,7 @@ #else NULL, #endif - de->mode, - de->uid, - de->gid); + de); xfwrite(buf, SECTOR_SIZE, 1, outfile, 0, FALSE); } #endif @@ -1892,8 +1973,10 @@ * volume_set_id needs to be set to a (64-bit) "unique" number. * This will have to do for now. */ - volume_set_id[0] = begun; - volume_set_id[1] = (unsigned)clock(); /* XXX Maybe non-portable */ + if (volume_set_id[0] == 0) { + volume_set_id[0] = tv_begun.tv_sec; + volume_set_id[1] = (unsigned)tv_begun.tv_usec; + } memset(buf, 0, sizeof (buf)); set_primary_vol_desc(buf, last_extent_written++); @@ -2132,6 +2215,7 @@ struct output_fragment udf_padend_avdp_frag = { NULL, udf_padend_avdp_size, NULL, udf_padend_avdp_write, "UDF Pad end" }; /* END CSTYLED */ +#ifdef OLD_DVD_WEIGHTS /* * This function assigns weights as follows: * @@ -2218,6 +2302,287 @@ return (val); } } +#else /* !OLD_DVD_WEIGHTS */ + +/* ======================================================================== */ +/* DVD-Audio patch */ +/* ======================================================================== */ + +/* + * sorts support for DVD-Audio and DVD-Video for mkisofs + * + * Written by Jerome Brock, adpated by Fabrice Nicol to cdrtools-3.00 + * + * (This is a rewrite of the assign_dvd_weights function in cdrtools) + */ + +struct ts_info_rec { + int num; + int sub; +} ts_info; + +#define is_digit(c) ((c >= '0') && (c <= '9')) + +#define get_digit_from_char(c) (c - '0') + +#define get_ts_num(name) (get_digit_from_char(name[4]) * 10 + \ + get_digit_from_char(name[5])) + +#define get_ts_sub_num(name) (get_digit_from_char(name[7])) + +/* + * the end of arrays containing a "" signal value + */ +#define list_end(val) (val[0] == 0) + +/* + * Parses a string representing an {Audio,Video} Title Set + * + * Examples would be: VTS_12_0.IFO, ATS_03_4.AOB, VTS_24_0.BUP + * + * If the string parses correctly, then this function fills the structure + * pointed to by the info parameter with the parsed information and + * returns a pointer to the same structure + * + * returns NULL on failure + */ +LOCAL inline struct ts_info_rec * +parse_ts_info __PR((const char *name, struct ts_info_rec *info)); + +LOCAL inline struct ts_info_rec * +parse_ts_info(name, info) + const char *name; + struct ts_info_rec *info; +{ + if (!(is_digit(name[4]) && is_digit(name[5]) && is_digit(name[7]))) + return (NULL); + + info->num = get_ts_num(name); + info->sub = get_ts_sub_num(name); + + /* + * legal track numbers are 01-99 + */ + if (info->num == 0) + return (NULL); + + /* + * only title set object files can have a non-zero sub + */ + if ((strcmp(name+9, "OB") == 0) && (info->sub != 0)) + return (NULL); + + return (info); +} + +/* + * Searchs array for a string. + * + * The array must contain an empty string, i.e. "", to signal + * that the end of the array has been reached + * + * returns the index of the found string, or -1 if not found + */ +LOCAL inline int +search_array __PR((const char *const array[], const char *str)); + +LOCAL inline int +search_array(array, str) + const char *const array[]; + const char *str; +{ + int idx = 0; + const char *curr = array[idx]; + + while (!list_end(curr) && strncmp(str, curr, strlen(curr)) != 0) + curr = array[++idx]; + + return (list_end(curr) ? -1 : idx); +} + + +#define MAX_INFO_SIZE 3 + +struct dvd_spec_section_rec { + /* + * using "" as end of list marker + */ + const char *const pre[MAX_INFO_SIZE + 1]; /* valid file prefixes in sorts order */ + const char *const ext[MAX_INFO_SIZE + 1]; /* valid file extensions in sorts order */ +}; + +struct dvd_spec_dir_rec { + const char *const name; /* directory name supported by this spec */ + const int spec; /* the dvd_spec that this dir supports, i.e. DVD_SPEC_* flags */ + const struct dvd_spec_section_rec dvd_spec_section[2]; /* [0]=non-ts [1]=ts */ +}; + +static const struct dvd_spec_dir_rec dvd_spec_dirs[] = +{ + /* + * top-level entries (dvd_spec_dir_rec's) are in sorts order + */ + { "AUDIO_TS", (DVD_SPEC_AUDIO | DVD_SPEC_HYBRD), + { { {"AUDIO_PP", "AUDIO_TS", "AUDIO_SV", ""}, + {".IFO", ".VOB", ".BUP", ""}, + }, + { {"ATS_", ""}, + {".IFO", ".AOB", ".BUP", ""}, + }, + }, + }, + { "VIDEO_TS", (DVD_SPEC_VIDEO | DVD_SPEC_HYBRD), + { { {"VIDEO_TS", ""}, + {".IFO", ".VOB", ".BUP", ""}, + }, + { {"VTS_", ""}, + {".IFO", ".VOB", ".BUP", ""}, + }, + }, + }, +}; + +#define DVD_SPEC_DIRS_QTY (sizeof (dvd_spec_dirs) / sizeof (dvd_spec_dirs[0])) + +/* + * This function assigns weights to DVD-Audio and DVD-Video filenames + * + * The weights ensure that the files will be correctly ordered on the + * finished dvd. The actual weight values are not important in the + * absolute sense, i.e. it is not true that file X1 "must" have a + * value of Y1. What is important is that the relative weight values + * maintain the ordering below, i.e. if file X1 is higher on the list + * than file X2, then Y1 > Y2. + * + * Current ordering (and values): + * + * /AUDIO_TS/AUDIO_PP.IFO 20000 + * /AUDIO_TS/AUDIO_TS.IFO 19997 + * /AUDIO_TS/AUDIO_TS.VOB 19996 + * /AUDIO_TS/AUDIO_TS.BUP 19995 + * /AUDIO_TS/AUDIO_SV.IFO 19994 + * /AUDIO_TS/AUDIO_SV.VOB 19993 + * /AUDIO_TS/AUDIO_SV.BUP 19992 + * /AUDIO_TS/ATS_01_0.IFO 19970 + * /AUDIO_TS/ATS_01_0.AOB 19960 + * : : + * /AUDIO_TS/ATS_01_9.AOB 19951 + * /AUDIO_TS/ATS_01_0.BUP 19950 + * : : + * /AUDIO_TS/ATS_99_0.BUP 17010 + * : : + * : : + * : : + * /VIDEO_TS/VIDEO_TS.IFO 15000 + * /VIDEO_TS/VIDEO_TS.VOB 14999 + * /VIDEO_TS/VIDEO_TS.BUP 14998 + * /VIDEO_TS/VTS_01_0.IFO 14970 + * /VIDEO_TS/VTS_01_0.VOB 14960 + * : : + * /VIDEO_TS/VTS_01_9.VOB 14951 + * /VIDEO_TS/VTS_01_0.BUP 14950 + * : : + * /VIDEO_TS/VTS_99_0.BUP 12010 + * + * This ensures that DVD-Audio and Video files are laid out properly on the disc. + * + * Note: JACKET_P files would be easy to add (if they require special sorts handling) + */ +EXPORT int assign_dvd_weights __PR((char *name, struct directory *this_dir, int val)); + +EXPORT int +assign_dvd_weights(name, this_dir, val) + char *name; + struct directory *this_dir; + int val; +{ + const int SORT_BASE = 20000; + const int SORT_TYPE_SIZE = 5000; + + /* + * worst case for PREFIX_SIZE, is + * + * {Audio,Video} Object Set for Title, + * i.e. {A,V}TS_dd_0.VOB - {A,V}TS_dd_9.VOB + * + * so we will allow that much sorts number space for each prefix + * + * EXTENSION_QTY can't possibly be greater than the space we allocated to store the extensions + */ + const int PREFIX_SIZE = 10; + const int EXTENSION_QTY = MAX_INFO_SIZE; + const int TS_SIZE = EXTENSION_QTY * PREFIX_SIZE; + + const struct dvd_spec_dir_rec *dir_spec = NULL; + const struct dvd_spec_section_rec *curr_section = NULL; + + unsigned int sort_type_index = 0; + int prefix_index = 0; + int extension_index = 0; + int is_ts_file = 0; + int found = 0; + int offset = 0; + int sort_type_offset = 0; + + if (this_dir->parent != root) + return (val); + + if (strlen(name) != 12) + return (val); + + for (sort_type_index = 0; sort_type_index < DVD_SPEC_DIRS_QTY; sort_type_index++) { + if (!(dvd_aud_vid_flag & dvd_spec_dirs[sort_type_index].spec)) + continue; + + if (strcmp(this_dir->de_name, dvd_spec_dirs[sort_type_index].name) != 0) + continue; + + dir_spec = &dvd_spec_dirs[sort_type_index]; + + /* + * check for a ts file first since its most likely + */ + for (is_ts_file = 1; is_ts_file >= 0; is_ts_file--) { + + curr_section = &(dir_spec->dvd_spec_section[is_ts_file]); + + if ((prefix_index = search_array(curr_section->pre, name)) == -1) + continue; + + if ((extension_index = search_array(curr_section->ext, name+8)) == -1) + continue; + + found = 1; + goto done_searching; /* break out of both for loops */ + } + } + done_searching: + + if (!found) + return (val); + + if (is_ts_file && (parse_ts_info(name, &ts_info) == NULL)) + return (val); + + if (is_ts_file) { + offset = (ts_info.num * TS_SIZE) + + (extension_index * PREFIX_SIZE) + + ts_info.sub; + } else { + /* + * Since title set numbers start at 01, + * we use the space for the "illegal" 00 + * ts to store the non-ts files. + */ + offset = (prefix_index * EXTENSION_QTY) + extension_index; + } + + sort_type_offset = sort_type_index * SORT_TYPE_SIZE; + + return (SORT_BASE - (offset + sort_type_offset)); +} +#endif /* !OLD_DVD_WEIGHTS */ + #ifndef ENAMETOOLONG #define ENAMETOOLONG EINVAL diff -Nru cdrtools-2.01.01a33/mkisofs/udf_fs.h cdrtools-3.02a09/mkisofs/udf_fs.h --- cdrtools-2.01.01a33/mkisofs/udf_fs.h 2007-06-24 15:15:27.000000000 +0000 +++ cdrtools-3.02a09/mkisofs/udf_fs.h 2013-02-12 22:07:48.000000000 +0000 @@ -1,10 +1,10 @@ -/* @(#)udf_fs.h 1.3 07/06/24 Copyright 2001-2007 J. Schilling */ +/* @(#)udf_fs.h 1.6 13/02/12 Copyright 2001-2013 J. Schilling */ /* * udf_fs.h - UDF structure definitions for mkisofs * * Written by Ben Rudiak-Gould (2001). * - * Copyright 2001-2007 J. Schilling. + * Copyright 2001-2013 J. Schilling. */ /* * This program is free software; you can redistribute it and/or modify @@ -18,7 +18,7 @@ * * You should have received a copy of the GNU General Public License along with * this program; see the file COPYING. If not, write to the Free Software - * Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #ifndef _UDF_FS_H @@ -346,11 +346,25 @@ /*20*/ } udf_icbtag; +/* + * File types + */ +#define UDF_ICBTAG_FILETYPE_UNSPEC 0 +#define UDF_ICBTAG_FILETYPE_UNALL_SPACE 1 +#define UDF_ICBTAG_FILETYPE_PART_INTEG 2 +#define UDF_ICBTAG_FILETYPE_INDIRECT 3 #define UDF_ICBTAG_FILETYPE_DIRECTORY 4 /* ECMA-167 4/14.6.6 */ -#define UDF_ICBTAG_FILETYPE_BYTESEQ 5 -#define UDF_ICBTAG_FILETYPE_EA 8 +#define UDF_ICBTAG_FILETYPE_BYTESEQ 5 /* FILE */ +#define UDF_ICBTAG_FILETYPE_BLOCK_DEV 6 +#define UDF_ICBTAG_FILETYPE_CHAR_DEV 7 +#define UDF_ICBTAG_FILETYPE_EA 8 /* Extended attributes */ +#define UDF_ICBTAG_FILETYPE_FIFO 9 +#define UDF_ICBTAG_FILETYPE_C_ISSOCK 10 +#define UDF_ICBTAG_FILETYPE_T_ENTRY 11 /* Terminal entry */ #define UDF_ICBTAG_FILETYPE_SYMLINK 12 -#define UDF_ICBTAG_FILETYPE_STREAMDIR 13 +#define UDF_ICBTAG_FILETYPE_STREAMDIR 13 + /* 14..247 Reserved */ + /* 248..255 Subject to agreement */ #define UDF_ICBTAG_FLAG_MASK_AD_TYPE 7 /* TR/71 3.5.3 */ #define UDF_ICBTAG_FLAG_SHORT_AD 0 @@ -384,6 +398,20 @@ /*50*/ } udf_ext_attribute_common; +typedef struct udf_ext_attribute_dev_spec_ { /* ECMA-167 4/14.10.7 */ +/* 0*/ udf_Uint32 attribute_type; /* = 12 */ +/* 4*/ udf_Uint8 attribute_subtype; /* = 1 */ +/* 5*/ udf_zerobyte reserved[3]; +/* 8*/ udf_Uint32 attribute_length; /* = 24 */ +/*12*/ udf_Uint32 impl_use_length; /* = 0 */ +/*16*/ udf_Uint32 dev_major; /* major(st_rdev) */ +/*20*/ udf_Uint32 dev_minor; /* minor(st_rdev) */ +#ifdef __needed__ +/*24*/ udf_Uint8 impl_use[0]; +#endif +/*24*/ +} udf_ext_attribute_dev_spec; + typedef struct udf_ext_attribute_free_ea_space_ { /* TR/71 3.6.{2,3} */ /* 0*/ udf_Uint32 attribute_type; /* = 2048 */ /* 4*/ udf_Uint8 attribute_subtype; /* = 1 */ @@ -589,6 +617,7 @@ /*316*/ #else udf_ext_attribute_header_desc ext_attribute_header; + udf_ext_attribute_dev_spec ext_attribute_dev_spec; udf_ext_attribute_free_ea_space ext_attribute_free_ea_space; udf_ext_attribute_dvd_cgms_info ext_attribute_dvd_cgms_info; udf_ext_attribute_file_macfinderinfo ext_attribute_macfinderinfo; diff -Nru cdrtools-2.01.01a33/mkisofs/vms.c cdrtools-3.02a09/mkisofs/vms.c --- cdrtools-2.01.01a33/mkisofs/vms.c 2006-09-13 16:05:00.000000000 +0000 +++ cdrtools-3.02a09/mkisofs/vms.c 2017-07-16 22:04:44.000000000 +0000 @@ -1,7 +1,7 @@ -/* @(#)vms.c 1.10 06/09/13 joerg */ +/* @(#)vms.c 1.11 17/07/17 joerg */ #ifndef lint static char sccsid[] = - "@(#)vms.c 1.10 06/09/13 joerg"; + "@(#)vms.c 1.11 17/07/17 joerg"; #endif /* @@ -295,7 +295,7 @@ while (remain > 0) { use = (remain > SECTOR_SIZE * NSECT - 1 ? NSECT * SECTOR_SIZE : remain); - use = ROUND_UP(use); /* Round up to nearest sector boundary */ + use = ISO_ROUND_UP(use); /* Round up to nearest sector boundary */ memset(buffer, 0, use); rab->rab$l_ubf = buffer; rab->rab$w_usz = sizeof (buffer); diff -Nru cdrtools-2.01.01a33/mkisofs/volume.c cdrtools-3.02a09/mkisofs/volume.c --- cdrtools-2.01.01a33/mkisofs/volume.c 2007-07-25 22:54:15.000000000 +0000 +++ cdrtools-3.02a09/mkisofs/volume.c 2010-12-19 19:16:30.000000000 +0000 @@ -1,11 +1,12 @@ -/* @(#)volume.c 1.21 07/07/26 joerg, Copyright 1997, 1998, 1999, 2000 James Pearson */ +/* @(#)volume.c 1.25 10/12/19 joerg, Copyright 1997, 1998, 1999, 2000 James Pearson, Copyright 2004-2010 J. Schilling */ +#include #ifndef lint -static char sccsid[] = - "@(#)volume.c 1.21 07/07/26 joerg, Copyright 1997, 1998, 1999, 2000 James Pearson"; +static UConst char sccsid[] = + "@(#)volume.c 1.25 10/12/19 joerg, Copyright 1997, 1998, 1999, 2000 James Pearson, Copyright 2004-2010 J. Schilling"; #endif /* * Copyright (c) 1997, 1998, 1999, 2000 James Pearson - * Copyright (c) 2004-2007 J. Schilling + * Copyright (c) 2004-2010 J. Schilling * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -35,9 +36,8 @@ * flag for finding the real directory location JCP 8/1/97 */ -#ifdef APPLE_HYB +#ifdef APPLE_HFS_HYB -#include #include "mkisofs.h" #include #include @@ -224,7 +224,7 @@ Csize = lastCsize = SECTOR_SIZE; if (verbose > 1) - fprintf(stderr, "Creating HFS Volume info\n"); + fprintf(stderr, _("Creating HFS Volume info\n")); /* name or copy ISO volume name to Mac Volume name */ strncpy(vol_name, hfs_volume_id ? hfs_volume_id : volume_id, @@ -258,7 +258,7 @@ */ if ((vblen = get_adj_size(Csize)) < 0) { sprintf(hce->error, - "too many files for HFS volume"); + _("too many files for HFS volume")); return (-1); } vblen += @@ -278,7 +278,7 @@ /* format and mount the "volume" */ if (hfs_format(hce, 0, vol_name) < 0) { - sprintf(hce->error, "can't HFS format %s", vol_name); + sprintf(hce->error, _("can't HFS format %s"), vol_name); return (-1); } /* @@ -291,7 +291,7 @@ adj_size_other(dpnt); } if ((vol = hfs_mount(hce, 0, 0)) == 0) { - sprintf(hce->error, "can't HFS mount %s", vol_name); + sprintf(hce->error, _("can't HFS mount %s"), vol_name); return (-1); } /* save the volume for possible later use */ @@ -365,7 +365,7 @@ return (-1); if (verbose > 1) - fprintf(stderr, "HFS scanning %s\n", node->whole_name); + fprintf(stderr, _("HFS scanning %s\n"), node->whole_name); /* loop through the ISO directory entries and process files */ for (s_entry = node->contents; s_entry; s_entry = s_entry->next) { @@ -412,7 +412,7 @@ * HFS_MAX_FLEN chars */ sprintf(hce->error, - "can't HFS create file %s %s", + _("can't HFS create file %s %s"), s_entry->whole_name, ent->name); return (-1); } else if (i == 0) { @@ -443,13 +443,13 @@ /* warn that we have a new name */ if (new_name && verbose > 0) { - fprintf(stderr, "Using HFS name: %s for %s\n", + fprintf(stderr, _("Using HFS name: %s for %s\n"), ent->name, s_entry->whole_name); } /* open file */ if ((hfp = hfs_open(vol, ent->name)) == 0) { - sprintf(hce->error, "can't HFS open %s", + sprintf(hce->error, _("can't HFS open %s"), s_entry->whole_name); return (-1); } @@ -470,7 +470,7 @@ /* update any HFS file attributes */ if ((hfs_fsetattr(hfp, ent)) < 0) { - sprintf(hce->error, "can't HFS set attributes %s", + sprintf(hce->error, _("can't HFS set attributes %s"), s_entry->whole_name); return (-1); } @@ -499,7 +499,7 @@ /* close the file and update the starting blocks */ if (hfs_close(hfp, dext, rext) < 0) { - sprintf(hce->error, "can't HFS close file %s", + sprintf(hce->error, _("can't HFS close file %s"), s_entry->whole_name); return (-1); } @@ -531,7 +531,7 @@ /* have a problem - can't find the real directory */ if (s_entry1 == NULL) { sprintf(hce->error, - "can't locate relocated directory %s", + _("can't locate relocated directory %s"), s_entry->whole_name); return (-1); } @@ -553,7 +553,7 @@ dpnt = dpnt->next; if (!dpnt) { sprintf(hce->error, - "can't find directory location %s", + _("can't find directory location %s"), s_entry1->whole_name); return (-1); } @@ -593,7 +593,7 @@ * HFS_MAX_FLEN chars */ sprintf(hce->error, - "can't HFS create folder %s", + _("can't HFS create folder %s"), s_entry->whole_name); return (-1); } else if (i == 0) { @@ -624,7 +624,7 @@ /* warn that we have a new name */ if (new_name && verbose > 0) { - fprintf(stderr, "Using HFS name: %s for %s\n", + fprintf(stderr, _("Using HFS name: %s for %s\n"), ent->name, s_entry->whole_name); } @@ -634,7 +634,7 @@ hfs_stat(vol, ent->name, ent); hfs_vsetbless(vol, ent->cnid); if (verbose > 0) { - fprintf(stderr, "Blessing %s (%s)\n", + fprintf(stderr, _("Blessing %s (%s)\n"), ent->name, s_entry->whole_name); } @@ -730,4 +730,4 @@ } } -#endif /* APPLE_HYB */ +#endif /* APPLE_HFS_HYB */ diff -Nru cdrtools-2.01.01a33/mkisofs/walk.c cdrtools-3.02a09/mkisofs/walk.c --- cdrtools-2.01.01a33/mkisofs/walk.c 2006-10-22 11:47:01.000000000 +0000 +++ cdrtools-3.02a09/mkisofs/walk.c 2010-12-19 19:16:30.000000000 +0000 @@ -1,30 +1,33 @@ -/* @(#)walk.c 1.5 06/10/22 Copyright 2005-2006 J. Schilling */ +/* @(#)walk.c 1.11 10/12/19 Copyright 2005-2010 J. Schilling */ +#include #ifndef lint -static char sccsid[] = - "@(#)walk.c 1.5 06/10/22 Copyright 2005-2006 J. Schilling"; +static UConst char sccsid[] = + "@(#)walk.c 1.11 10/12/19 Copyright 2005-2010 J. Schilling"; #endif /* * This file contains the callback code for treewalk() as used * with mkisofs -find. * - * Copyright (c) 2005-2006 J. Schilling + * Copyright (c) 2005-2010 J. Schilling */ /* - * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 + * as published by the Free Software Foundation. * - * See the file CDDL.Schily.txt in this distribution for details. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file CDDL.Schily.txt from this distribution. + * You should have received a copy of the GNU General Public License along with + * this program; see the file COPYING. If not, write to the Free Software + * Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#include #include -#include -#include +#include +#include #include "mkisofs.h" #include @@ -40,18 +43,18 @@ struct WALK *state; { if (type == WALK_NS) { - errmsg("Cannot stat '%s'.\n", nm); + errmsg(_("Cannot stat '%s'.\n"), nm); state->err = 1; return (0); } else if (type == WALK_SLN && (state->walkflags & WALK_PHYS) == 0) { - errmsg("Cannot follow symlink '%s'.\n", nm); + errmsg(_("Cannot follow symlink '%s'.\n"), nm); state->err = 1; return (0); } else if (type == WALK_DNR) { if (state->flags & WALK_WF_NOCHDIR) - errmsg("Cannot chdir to '%s'.\n", nm); + errmsg(_("Cannot chdir to '%s'.\n"), nm); else - errmsg("Cannot read '%s'.\n", nm); + errmsg(_("Cannot read '%s'.\n"), nm); state->err = 1; return (0); } @@ -80,6 +83,9 @@ while (xp[0] == '/') xp += 1; if (xp[0] == '.' && xp[1] == '.' && xp[2] == '/') { + /* + * de == NULL cannot really happen + */ if (de && de != root) { de = de->parent; xp += 2; @@ -91,10 +97,10 @@ break; *p = '\0'; if (debug) { - error("BASE Point:'%s' in '%s : %s' (%s)\n", + error(_("BASE Point:'%s' in '%s : %s' (%s)\n"), xp, - de->whole_name, - de->de_name, + de?de->whole_name:"[null]", + de?de->de_name:"[null]", nm); } de = find_or_create_directory(de, diff -Nru cdrtools-2.01.01a33/mkisofs/write.c cdrtools-3.02a09/mkisofs/write.c --- cdrtools-2.01.01a33/mkisofs/write.c 2007-07-29 23:32:09.000000000 +0000 +++ cdrtools-3.02a09/mkisofs/write.c 2016-12-13 21:39:34.000000000 +0000 @@ -1,7 +1,8 @@ -/* @(#)write.c 1.113 07/07/30 joerg */ +/* @(#)write.c 1.146 16/12/13 joerg */ +#include #ifndef lint -static char sccsid[] = - "@(#)write.c 1.113 07/07/30 joerg"; +static UConst char sccsid[] = + "@(#)write.c 1.146 16/12/13 joerg"; #endif /* * Program write.c - dump memory structures to file for iso9660 filesystem. @@ -9,7 +10,7 @@ * Written by Eric Youngdale (1993). * * Copyright 1993 Yggdrasil Computing, Incorporated - * Copyright (c) 1999-2007 J. Schilling + * Copyright (c) 1999-2016 J. Schilling * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -28,7 +29,8 @@ /* APPLE_HYB James Pearson j.pearson@ge.ucl.ac.uk 23/2/2000 */ -#include +/* DUPLICATES_ONCE Alex Kopylov cdrtools@bootcd.ru 19.06.2004 */ + #include "mkisofs.h" #include #include @@ -38,13 +40,13 @@ #include #include #include -#ifdef DVD_VIDEO +#ifdef DVD_AUD_VID #include "dvd_reader.h" #include "dvd_file.h" #include "ifo_read.h" #endif #ifdef APPLE_HYB -#include +#include #endif #ifdef VMS @@ -54,7 +56,7 @@ #define SIZEOF_UDF_EXT_ATTRIBUTE_COMMON 50 /* Max number of sectors we will write at one time */ -#define NSECT 16 +#define NSECT 32 #define INSERTMACRESFORK 1 @@ -75,6 +77,10 @@ EXPORT struct iso_primary_descriptor vol_desc; LOCAL int vol_desc_sum; +#ifndef APPLE_HFS_HYB + char *hfs_error = __("no error"); +#endif + LOCAL int xawrite __PR((void *buffer, int size, int count, FILE *file, int submode, BOOL islast)); EXPORT void xfwrite __PR((void *buffer, int size, int count, @@ -88,8 +94,10 @@ LOCAL void write_one_file __PR((char *filename, off_t size, FILE *outfile)); #endif +#ifdef UDF LOCAL void write_udf_symlink __PR((char *filename, off_t size, FILE *outfile)); +#endif LOCAL void write_files __PR((FILE *outfile)); #if 0 LOCAL void dump_filelist __PR((void)); @@ -134,19 +142,19 @@ LOCAL int endpad_write __PR((FILE *outfile)); #ifdef APPLE_HYB LOCAL int hfs_pad; -LOCAL int hfs_get_parms __PR((char * key)); +LOCAL int hfs_get_parms __PR((char *key)); LOCAL void hfs_file_gen __PR((UInt32_t start_extent)); LOCAL void gen_prepboot __PR((void)); EXPORT Ulong get_adj_size __PR((int Csize)); EXPORT int adj_size __PR((int Csize, UInt32_t start_extent, int extra)); EXPORT void adj_size_other __PR((struct directory *dpnt)); -LOCAL int hfs_hce_write __PR((FILE * outfile)); +LOCAL int hfs_hce_write __PR((FILE *outfile)); EXPORT int insert_padding_file __PR((int size)); #endif /* APPLE_HYB */ #ifdef SORTING -LOCAL int compare_sort __PR((const void * rr, const void * ll)); -LOCAL void reassign_link_addresses __PR((struct directory * dpnt)); +LOCAL int compare_sort __PR((const void *rr, const void *ll)); +LOCAL void reassign_link_addresses __PR((struct directory *dpnt)); LOCAL int sort_file_addresses __PR((void)); #endif /* SORTING */ @@ -178,11 +186,11 @@ #ifdef XFWRITE_DEBUG if (count != 1 || (size % 2048) != 0) - error("Count: %d, size: %d\n", count, size); + error(_("Count: %d, size: %d\n"), count, size); #endif if (count == 0 || size == 0) { errmsgno(EX_BAD, - "Implementation botch, write 0 bytes (size %d count %d).\n", + _("Implementation botch, write 0 bytes (size %d count %d).\n"), size, count); abort(); } @@ -197,7 +205,7 @@ sprintf(nbuf, "%s_%02d", outfile, idx++); file = freopen(nbuf, "wb", file); if (file == NULL) { - comerr("Cannot open '%s'.\n", nbuf); + comerr(_("Cannot open '%s'.\n"), nbuf); } } while (count) { @@ -210,7 +218,7 @@ got = fwrite(buffer, size, count, file); if (got <= 0) { - comerr("cannot fwrite %d*%d\n", size, count); + comerr(_("cannot fwrite %d*%d\n"), size, count); } /* * This comment is in hope to prevent silly people from @@ -247,7 +255,7 @@ if (amt % 2048) comerrno(EX_BAD, - "Trying to write %d bytes (not a multiple of 2048).\n", + _("Trying to write %d bytes (not a multiple of 2048).\n"), amt); subhdr[0].file_number = subhdr[1].file_number = 0; @@ -268,7 +276,7 @@ subhdr[0].sub_mode = subhdr[1].sub_mode |= (XA_SUBH_EOR|XA_SUBH_EOF); } - n = fwrite(&subhdr, sizeof (subhdr), 1, file); + n = fwrite(subhdr, sizeof (subhdr), 1, file); if (n <= 0) return (n); @@ -295,6 +303,7 @@ UInt32_t last_extent_written = 0; LOCAL Uint path_table_index; EXPORT time_t begun; +EXPORT struct timeval tv_begun; /* * We recursively walk through all of the directories and assign extent @@ -369,7 +378,11 @@ * As we do not need to call write_one_file() recursively * we make buffer static. */ +#ifdef __BEOS__ static char buffer[SECTOR_SIZE * NSECT]; +#else + char buffer[SECTOR_SIZE * NSECT]; +#endif FILE *infile; off_t remain; int use; @@ -382,7 +395,7 @@ if (!errhidden(E_OPEN, filename)) { if (!errwarnonly(E_OPEN, filename)) ; - errmsg("Cannot open '%s'.\n", filename); + errmsg(_("Cannot open '%s'.\n"), filename); (void) errabort(E_OPEN, filename, TRUE); } } @@ -414,10 +427,15 @@ /* boundary */ memset(buffer, 0, use); seterrno(0); - if (infile) + if (infile) { +#ifdef VMS amt = fread(buffer, 1, use, infile); - else +#else + amt = ffileread(infile, buffer, use); +#endif + } else { amt = use; + } if (amt < use && amt != remain) { /* * Note that mkisofs is not star and no 100% archiver. @@ -426,13 +444,17 @@ */ if (geterrno() == 0) { if (!errhidden(amt > remain ? E_GROW:E_SHRINK, filename)) { - if (!errwarnonly(amt < remain ? E_SHRINK:E_GROW, filename)) - ; + if (!errwarnonly(amt < remain ? E_SHRINK:E_GROW, filename)) { + errmsgno(EX_BAD, + _("Try to use the option -data-change-warn\n")); + errmsgno(EX_BAD, + _("Files should not change while mkisofs is running.\n")); + } errmsgno(EX_BAD, - "File '%s' did %s.\n", + _("File '%s' did %s.\n"), filename, amt < remain ? - "shrink":"grow"); + _("shrink"):_("grow")); (void) errabort(amt < remain ? E_SHRINK:E_GROW, filename, TRUE); @@ -440,7 +462,7 @@ } else if (!errhidden(E_READ, filename)) { if (!errwarnonly(E_READ, filename)) ; - errmsg("Cannot read from '%s'\n", filename); + errmsg(_("Cannot read from '%s'\n"), filename); (void) errabort(E_READ, filename, TRUE); } amt = remain; /* Fake success */ @@ -488,10 +510,10 @@ frac = last_extent_written / (1.0 * last_extent); the_end = begun + (now - begun) / frac; #ifndef NO_FLOATINGPOINT - fprintf(stderr, "%6.2f%% done, estimate finish %s", + fprintf(stderr, _("%6.2f%% done, estimate finish %s"), frac * 100., ctime(&the_end)); #else - fprintf(stderr, "%3d.%-02d%% done, estimate finish %s", + fprintf(stderr, _("%3d.%-02d%% done, estimate finish %s"), (int)(frac * 100.), (int)((frac+.00005) * 10000.)%100, ctime(&the_end)); @@ -516,6 +538,7 @@ fclose(infile); } /* write_one_file(... */ +#ifdef UDF LOCAL void write_udf_symlink(filename, size, outfile) char *filename; @@ -527,13 +550,13 @@ int use; if (udf_get_symlinkcontents(filename, buffer, &remain) < 0) { - comerr("Cannot open smylink '%s'\n", filename); + comerr(_("Cannot open smylink '%s'\n"), filename); } if (remain != size) { - comerrno(EX_BAD, "Symlink '%s' did %s.\n", + comerrno(EX_BAD, _("Symlink '%s' did %s.\n"), filename, size > remain ? - "shrink":"grow"); + _("shrink"):_("grow")); } use = (remain > SECTOR_SIZE * NSECT - 1 ? NSECT * SECTOR_SIZE : remain); @@ -543,6 +566,7 @@ last_extent_written += use / SECTOR_SIZE; } /* write_udf_symlink(... */ +#endif LOCAL void write_files(outfile) @@ -557,7 +581,7 @@ /*#define DEBUG*/ #ifdef DEBUG fprintf(stderr, - "The file name is %s and pad is %d, size is %lld and extent is %d\n", + _("The file name is %s and pad is %d, size is %lld and extent is %d\n"), dwpnt->name, dwpnt->pad, (Llong)dwpnt->size, dwpnt->extent); #endif @@ -567,7 +591,7 @@ XA_SUBH_DATA, TRUE); last_extent_written += ISO_BLOCKS(dwpnt->size); table_size += dwpnt->size; -/* fprintf(stderr, "Size %lld ", (Llong)dwpnt->size); */ +/* fprintf(stderr, _("Size %lld "), (Llong)dwpnt->size); */ free(dwpnt->table); dwpnt->table = NULL; } else { @@ -591,7 +615,11 @@ write_one_file(dwpnt->name, dwpnt->size, outfile, dwpnt->off, file_is_resource(dwpnt->name, dwpnt->hfstype) && (dwpnt->size > 0), rba); #else +#ifdef USE_LARGEFILES + write_one_file(dwpnt->name, dwpnt->size, outfile, dwpnt->off, 0, 0); +#else write_one_file(dwpnt->name, dwpnt->size, outfile); +#endif #endif /* APPLE_HYB */ #ifdef UDF } @@ -602,17 +630,17 @@ } -#ifndef DVD_VIDEO -#define dvd_video 0 +#ifndef DVD_AUD_VID +#define dvd_aud_vid_flag 0 #endif #ifndef APPLE_HYB #define apple_hyb 0 #endif -#if defined(APPLE_HYB) || defined(DVD_VIDEO) +#if defined(APPLE_HYB) || defined(DVD_AUD_VID) - if ((apple_hyb && !donotwrite_macpart) || dvd_video) { + if ((apple_hyb && !donotwrite_macpart) || (dvd_aud_vid_flag & DVD_SPEC_VIDEO)) { /* * we may have to pad out ISO files to work with HFS * clump sizes @@ -625,7 +653,7 @@ last_extent_written += dwpnt->pad; } -#endif /* APPLE_HYB || DVD_VIDEO */ +#endif /* APPLE_HYB || DVD_AUD_VID */ dwnext = dwpnt; @@ -643,7 +671,7 @@ dwpnt = dw_head; while (dwpnt) { - fprintf(stderr, "File %s\n", dwpnt->name); + fprintf(stderr, _("File %s\n"), dwpnt->name); dwpnt = dwpnt->next; } fprintf(stderr, "\n"); @@ -661,8 +689,8 @@ struct directory_entry **r, **l; - r = (struct directory_entry **) rr; - l = (struct directory_entry **) ll; + r = (struct directory_entry **)rr; + l = (struct directory_entry **)ll; rpnt = (*r)->isorec.name; lpnt = (*l)->isorec.name; @@ -690,7 +718,7 @@ return (1); #endif errmsgno(EX_BAD, - "Error: '%s' and '%s' have the same ISO9660 name '%s'.\n", + _("Error: '%s' and '%s' have the same ISO9660 name '%s'.\n"), (*r)->whole_name, (*l)->whole_name, rpnt); sort_goof++; @@ -703,7 +731,7 @@ */ if (strcmp((*r)->name, (*l)->name) == 0) { errmsgno(EX_BAD, - "Error: '%s' and '%s' have the same Rock Ridge name '%s'.\n", + _("Error: '%s' and '%s' have the same Rock Ridge name '%s'.\n"), (*r)->whole_name, (*l)->whole_name, (*r)->name); sort_goof++; @@ -811,13 +839,13 @@ sortlist = (struct directory_entry **) e_malloc(sizeof (struct directory_entry *) * dcount); - j = dcount - 1; + j = dcount - xcount; dcount = 0; s_entry = *sort_dir; while (s_entry) { if (s_entry->de_flags & INHIBIT_ISO9660_ENTRY) { /* put any hidden entries at the end of the vector */ - sortlist[j--] = s_entry; + sortlist[j++] = s_entry; } else { sortlist[dcount] = s_entry; dcount++; @@ -830,8 +858,7 @@ /* Each directory is required to contain at least . and .. */ if (dcount < 2) { errmsgno(EX_BAD, - "Directory size too small (. or .. missing ??%s)\n", - "?"); /* Try to avoid a GCC trigraph warning */ + _("Directory size too small (. or .. may be missing)\n")); sort_goof = 1; } else { @@ -872,8 +899,8 @@ root_record.length[0] = 1 + offsetof(struct iso_directory_record, name[0]); root_record.ext_attr_length[0] = 0; - set_733((char *) root_record.extent, root->extent); - set_733((char *) root_record.size, ISO_ROUND_UP(root->size)); + set_733((char *)root_record.extent, root->extent); + set_733((char *)root_record.size, ISO_ROUND_UP(root->size)); iso9660_date(root_record.date, root_statbuf.st_mtime); root_record.flags[0] = ISO_DIRECTORY; root_record.file_unit_size[0] = 0; @@ -897,8 +924,8 @@ int r_sort; int l_sort; - r = (struct deferred_write **) rr; - l = (struct deferred_write **) ll; + r = (struct deferred_write **)rr; + l = (struct deferred_write **)ll; r_sort = (*r)->s_entry->sort; l_sort = (*l)->s_entry->sort; @@ -927,9 +954,9 @@ continue; /* update the start extent */ - s_hash = find_hash(s_entry->dev, s_entry->inode); + s_hash = find_hash(s_entry); if (s_hash) { - set_733((char *) s_entry->isorec.extent, s_hash->starting_block); + set_733((char *)s_entry->isorec.extent, s_hash->starting_block); s_entry->starting_block = s_hash->starting_block; } } @@ -1001,18 +1028,45 @@ for (i = 0, dwpnt = dw_head; i < num; i++, dwpnt = dwpnt->next) { s_entry = dwpnt->s_entry; dwpnt->extent = s_entry->starting_block = start_extent; - set_733((char *) s_entry->isorec.extent, start_extent); - start_extent += ISO_BLOCKS(s_entry->size); -#ifdef DVD_VIDEO + if (s_entry->de_flags & MULTI_EXTENT) { + struct directory_entry *s_e; + UInt32_t ext = start_extent; + + /* + * For unknown reason, we sometimes get mxroot as + * part of the chain and sometime it's missing. + * Be careful to distinct between the mxroot entry and + * others to select both corectly in a conservative way. + */ + s_entry->mxroot->starting_block = start_extent; + set_733((char *)s_entry->mxroot->isorec.extent, + start_extent); + start_extent += ISO_BLOCKS(s_entry->mxroot->size); + + for (s_e = s_entry; + s_e && s_e->mxroot == s_entry->mxroot; + s_e = s_e->next) { + if (s_e == s_entry->mxroot) + continue; + + set_733((char *)s_e->isorec.extent, ext); + s_entry->starting_block = ext; + ext += ISO_BLOCKS(s_e->size); + } + } else { + set_733((char *)s_entry->isorec.extent, start_extent); + start_extent += ISO_BLOCKS(s_entry->size); + } +#ifdef DVD_AUD_VID /* * Shouldn't this be done for every type of sort? Otherwise * we will loose every pad info we add if we sort the files */ - if (dvd_video) { + if (dvd_aud_vid_flag & DVD_SPEC_VIDEO) { start_extent += dwpnt->pad; } -#endif /* DVD_VIDEO */ +#endif /* DVD_AUD_VID */ /* cache start extents for any linked files */ add_hash(s_entry); @@ -1034,16 +1088,16 @@ struct file_hash *s_hash; struct deferred_write *dwpnt; char whole_path[PATH_MAX]; -#ifdef DVD_VIDEO +#ifdef DVD_AUD_VID char dvd_path[PATH_MAX]; - title_set_info_t * title_set_info = NULL; + title_set_info_t *title_set_info = NULL; char *p; #endif BOOL ret = FALSE; while (dpnt) { -#ifdef DVD_VIDEO - if (dvd_video && root == dpnt->parent && +#ifdef DVD_AUD_VID + if ((dvd_aud_vid_flag & DVD_SPEC_VIDEO) && root == dpnt->parent && ((p = strstr(dpnt->whole_name, "VIDEO_TS")) != 0)&& strcmp(p, "VIDEO_TS") == 0) { int maxlen = strlen(dpnt->whole_name)-8+1; @@ -1052,20 +1106,20 @@ maxlen = sizeof (dvd_path); strlcpy(dvd_path, dpnt->whole_name, maxlen); #ifdef DEBUG - fprintf(stderr, "Found 'VIDEO_TS', the path is %s \n", dvd_path); + fprintf(stderr, _("Found 'VIDEO_TS', the path is %s \n"), dvd_path); #endif title_set_info = DVDGetFileSet(dvd_path); if (title_set_info == 0) { /* * Do not switch off -dvd-video but let is fail later. */ -/* dvd_video = 0;*/ - errmsgno(EX_BAD, "Unable to parse DVD-Video structures.\n"); +/* dvd_aud_vid_flag &= ~DVD_SPEC_VIDEO;*/ + errmsgno(EX_BAD, _("Unable to parse DVD-Video structures.\n")); } else { ret = TRUE; } } -#endif /* DVD_VIDEO */ +#endif /* DVD_AUD_VID */ for (s_entry = dpnt->contents; s_entry; s_entry = s_entry->next) { @@ -1083,17 +1137,18 @@ * If this is a multi-extent file, we get mxpart == 1 * from find_hash(). */ - s_hash = find_hash(s_entry->dev, s_entry->inode); + s_hash = find_hash(s_entry); if (s_hash) { if (verbose > 2) { - fprintf(stderr, "Cache hit for '%s%s%s'\n", s_entry->filedir->de_name, + fprintf(stderr, _("Cache hit for '%s%s%s'\n"), + s_entry->filedir->de_name, SPATH_SEPARATOR, s_entry->name); } s_entry->starting_block = s_hash->starting_block; - set_733((char *) s_entry->isorec.extent, + set_733((char *)s_entry->isorec.extent, s_hash->starting_block); - set_733((char *) s_entry->isorec.size, + set_733((char *)s_entry->isorec.size, s_hash->size); #ifdef USE_LARGEFILES if (s_entry->de_flags & MULTI_EXTENT) { @@ -1111,14 +1166,14 @@ */ if (s_entry->mxpart != 1) { comerrno(EX_BAD, - "Panic: Multi extent parts for %s not sorted.\n", + _("Panic: Multi extent parts for %s not sorted.\n"), s_entry->whole_name); } s_entry->mxroot->starting_block = ext; for (s_e = s_entry; s_e && s_e->mxroot == s_entry->mxroot; s_e = s_e->next) { - set_733((char *) s_e->isorec.extent, + set_733((char *)s_e->isorec.extent, ext); ext += ISO_BLOCKS(s_e->size); } @@ -1147,28 +1202,26 @@ strcmp(s_entry->name, "..") != 0 && s_entry->isorec.flags[0] & ISO_DIRECTORY) { finddir = dpnt->subdir; - while (1 == 1) { - if (finddir->self == s_entry) - break; + while (finddir && finddir->self != s_entry) { finddir = finddir->next; - if (!finddir) { -#ifdef DVD_VIDEO - if (title_set_info != 0) { - DVDFreeFileSet(title_set_info); - } -#endif - comerrno(EX_BAD, - "Fatal goof - could not find dir entry for '%s'\n", - s_entry->name); + } + if (!finddir) { +#ifdef DVD_AUD_VID + if (title_set_info != 0) { + DVDFreeFileSet(title_set_info); } +#endif + comerrno(EX_BAD, + _("Fatal goof - could not find dir entry for '%s'\n"), + s_entry->name); } - set_733((char *) s_entry->isorec.extent, + set_733((char *)s_entry->isorec.extent, finddir->extent); s_entry->starting_block = finddir->extent; s_entry->size = ISO_ROUND_UP(finddir->size); total_dir_size += s_entry->size; add_hash(s_entry); - set_733((char *) s_entry->isorec.size, + set_733((char *)s_entry->isorec.size, ISO_ROUND_UP(finddir->size)); continue; } @@ -1177,7 +1230,7 @@ * from the tables. */ if (strcmp(s_entry->name, ".") == 0) { - set_733((char *) s_entry->isorec.extent, + set_733((char *)s_entry->isorec.extent, dpnt->extent); /* @@ -1189,7 +1242,7 @@ add_hash(s_entry); s_entry->starting_block = dpnt->extent; - set_733((char *) s_entry->isorec.size, + set_733((char *)s_entry->isorec.size, ISO_ROUND_UP(dpnt->size)); continue; } @@ -1197,7 +1250,7 @@ if (dpnt == root) { total_dir_size += root->size; } - set_733((char *) s_entry->isorec.extent, + set_733((char *)s_entry->isorec.extent, dpnt->parent->extent); /* @@ -1210,7 +1263,7 @@ add_hash(s_entry); s_entry->starting_block = dpnt->parent->extent; - set_733((char *) s_entry->isorec.size, + set_733((char *)s_entry->isorec.size, ISO_ROUND_UP(dpnt->parent->size)); continue; } @@ -1230,25 +1283,26 @@ /* set the initial padding to zero */ dwpnt->pad = 0; dwpnt->dw_flags = 0; -#ifdef DVD_VIDEO - if (dvd_video && (title_set_info != 0)) { +#ifdef DVD_AUD_VID + if ((dvd_aud_vid_flag & DVD_SPEC_VIDEO) && (title_set_info != 0)) { int pad; pad = DVDGetFilePad(title_set_info, s_entry->name); if (pad < 0) { errmsgno(EX_BAD, - "Implementation botch. Video pad for file %s is %d\n", + _("Implementation botch. Video pad for file %s is %d\n"), s_entry->name, pad), comerrno(EX_BAD, - "Either the *.IFO file is bad or you found a mkisofs bug.\n"); + _("Either the *.IFO file is bad or you found a mkisofs bug.\n")); } dwpnt->pad = pad; if (verbose > 0 && pad != 0) { fprintf(stderr, - "The pad was %d for file %s\n", dwpnt->pad, s_entry->name); + _("The pad was %d for file %s\n"), + dwpnt->pad, s_entry->name); } } -#endif /* DVD_VIDEO */ +#endif /* DVD_AUD_VID */ #ifdef APPLE_HYB /* * maybe an offset to start of the real @@ -1259,13 +1313,6 @@ #else dwpnt->off = (off_t)0; #endif /* APPLE_HYB */ - if (dw_tail) { - dw_tail->next = dwpnt; - dw_tail = dwpnt; - } else { - dw_head = dwpnt; - dw_tail = dwpnt; - } if (s_entry->inode == TABLE_INODE) { dwpnt->table = s_entry->table; dwpnt->name = NULL; @@ -1277,12 +1324,12 @@ strlcpy(whole_path, s_entry->whole_name, sizeof (whole_path)); - dwpnt->name = strdup(whole_path); + dwpnt->name = e_strdup(whole_path); } dwpnt->next = NULL; dwpnt->size = s_entry->size; dwpnt->extent = last_extent; - set_733((char *) s_entry->isorec.extent, + set_733((char *)s_entry->isorec.extent, last_extent); s_entry->starting_block = last_extent; #ifdef USE_LARGEFILES @@ -1297,29 +1344,48 @@ /* * Skip the multi extent root entry. */ - if (s_entry->mxpart == 0) + if (s_entry->mxpart == 0) { + if (dwpnt->name) + free(dwpnt->name); + free(dwpnt); continue; + } /* * The directory is sorted, so we should * see s_entry->mxpart == 1 first. */ if (s_entry->mxpart != 1) { comerrno(EX_BAD, - "Panic: Multi extent parts for %s not sorted.\n", + _("Panic: Multi extent parts for %s not sorted.\n"), s_entry->whole_name); } dwpnt->size = s_entry->mxroot->size; s_entry->mxroot->starting_block = ext; + /* + * Set the mxroot (mxpart == 0) to allow + * the UDF code to fetch the starting + * extent number. + */ + set_733((char *)s_entry->mxroot->isorec.extent, ext); for (s_e = s_entry; s_e && s_e->mxroot == s_entry->mxroot; s_e = s_e->next) { - set_733((char *) s_e->isorec.extent, + if (s_e->mxpart == 0) + continue; + set_733((char *)s_e->isorec.extent, ext); ext += ISO_BLOCKS(s_e->size); } add_hash(s_entry); } #endif + if (dw_tail) { + dw_tail->next = dwpnt; + dw_tail = dwpnt; + } else { + dw_head = dwpnt; + dw_tail = dwpnt; + } add_hash(s_entry); /* * The cache holds the full size of the file @@ -1337,12 +1403,12 @@ } #endif #endif /* APPLE_HYB */ -#ifdef DVD_VIDEO +#ifdef DVD_AUD_VID /* Shouldn't we always add the pad info? */ - if (dvd_video) { + if (dvd_aud_vid_flag & DVD_SPEC_VIDEO) { last_extent += dwpnt->pad; } -#endif /* DVD_VIDEO */ +#endif /* DVD_AUD_VID */ if (verbose > 2) { fprintf(stderr, "%u %d %s\n", s_entry->starting_block, @@ -1351,13 +1417,13 @@ #ifdef DBG_ISO if (ISO_BLOCKS(s_entry->size) > 500) { fprintf(stderr, - "Warning: large file '%s'\n", + _("Warning: large file '%s'\n"), whole_path); fprintf(stderr, - "Starting block is %d\n", + _("Starting block is %d\n"), s_entry->starting_block); fprintf(stderr, - "Reported file size is %lld\n", + _("Reported file size is %lld\n"), (Llong)s_entry->size); } @@ -1367,13 +1433,13 @@ if (last_extent > (800000000 >> 11)) { /* More than 800Mb? Punt */ fprintf(stderr, - "Extent overflow processing file '%s'\n", + _("Extent overflow processing file '%s'\n"), whole_path); fprintf(stderr, - "Starting block is %d\n", + _("Starting block is %d\n"), s_entry->starting_block); fprintf(stderr, - "Reported file size is %lld\n", + _("Reported file size is %lld\n"), (Llong)s_entry->size); exit(1); } @@ -1387,7 +1453,7 @@ * Thus we leave the size 0, and just assign the * extent number. */ - set_733((char *) s_entry->isorec.extent, last_extent); + set_733((char *)s_entry->isorec.extent, last_extent); } if (dpnt->subdir) { if (assign_file_addresses(dpnt->subdir, TRUE)) @@ -1395,15 +1461,15 @@ } dpnt = dpnt->next; } -#ifdef DVD_VIDEO +#ifdef DVD_AUD_VID if (title_set_info != NULL) { DVDFreeFileSet(title_set_info); } - if (dvd_video && !ret && !isnest) { + if ((dvd_aud_vid_flag & DVD_SPEC_VIDEO)&& !ret && !isnest) { errmsgno(EX_BAD, - "Could not find correct 'VIDEO_TS' directory.\n"); + _("Could not find correct 'VIDEO_TS' directory.\n")); } -#endif /* DVD_VIDEO */ +#endif /* DVD_AUD_VID */ return (ret); } /* assign_file_addresses(... */ @@ -1432,10 +1498,25 @@ s_entry_d->whole_name = NULL; } #ifdef APPLE_HYB - if (apple_both && s_entry_d->hfs_ent && !s_entry_d->assoc) + if (apple_both && s_entry_d->hfs_ent && !s_entry_d->assoc && + (s_entry_d->isorec.flags[0] & ISO_MULTIEXTENT) == 0) { free(s_entry_d->hfs_ent); + } #endif /* APPLE_HYB */ +#ifdef DUPLICATES_ONCE + if (s_entry_d->digest_fast) { + + if (s_entry_d->digest_full && + (s_entry_d->digest_full != s_entry_d->digest_fast)) + free(s_entry_d->digest_full); + + free(s_entry_d->digest_fast); + + s_entry_d->digest_fast = NULL; + s_entry_d->digest_full = NULL; + } +#endif free(s_entry_d); s_entry_d = NULL; } @@ -1471,7 +1552,7 @@ unsigned int total_size; total_size = ISO_ROUND_UP(dpnt->size); - directory_buffer = (char *) e_malloc(total_size); + directory_buffer = (char *)e_malloc(total_size); memset(directory_buffer, 0, total_size); dir_index = 0; @@ -1479,14 +1560,13 @@ ce_buffer = NULL; if (ce_size > 0) { - ce_buffer = (char *) e_malloc(ce_size); + ce_buffer = (char *)e_malloc(ce_size); memset(ce_buffer, 0, ce_size); ce_index = 0; - /* Absolute byte address of CE entries for this directory */ + /* Absolute sector address of CE entries for this directory */ ce_address = last_extent_written + (total_size >> 11); - ce_address = ce_address << 11; } s_entry = dpnt->contents; while (s_entry) { @@ -1549,22 +1629,23 @@ #ifdef DEBUG if (ce_size <= 0) { fprintf(stderr, - "Warning: ce_index(%d) && ce_address(%d) not initialized\n", + _("Warning: ce_index(%d) && ce_address(%d) not initialized\n"), ce_index, ce_address); } #endif if (pnt[0] == 'C' && pnt[1] == 'E') { - nbytes = get_733((char *) pnt + 20); + nbytes = get_733((char *)pnt + 20); if ((ce_index & (SECTOR_SIZE - 1)) + nbytes >= SECTOR_SIZE) { ce_index = ISO_ROUND_UP(ce_index); } - set_733((char *) pnt + 4, - (ce_address + ce_index) >> 11); - set_733((char *) pnt + 12, - (ce_address + ce_index) & (SECTOR_SIZE - 1)); + set_733((char *)pnt + 4, + ce_address + (ce_index >> 11)); + set_733((char *)pnt + 12, + ce_index & (SECTOR_SIZE - 1)); + /* @@ -1607,7 +1688,7 @@ if (dpnt->size != dir_index) { errmsgno(EX_BAD, - "Unexpected directory length %lld expected: %d '%s'\n", + _("Unexpected directory length %lld expected: %d '%s'\n"), (Llong)dpnt->size, dir_index, dpnt->de_name); } @@ -1619,7 +1700,7 @@ if (ce_size > 0) { if (ce_index != dpnt->ce_bytes) { errmsgno(EX_BAD, - "Continuation entry record length mismatch %d expected: %d.\n", + _("Continuation entry record length mismatch %d expected: %d.\n"), ce_index, dpnt->ce_bytes); } xfwrite(ce_buffer, ce_size, 1, outfile, 0, FALSE); @@ -1681,8 +1762,8 @@ /* First allocate memory for the tables and initialize the memory */ tablesize = path_blocks << 11; - path_table_m = (char *) e_malloc(tablesize); - path_table_l = (char *) e_malloc(tablesize); + path_table_m = (char *)e_malloc(tablesize); + path_table_l = (char *)e_malloc(tablesize); memset(path_table_l, 0, tablesize); memset(path_table_m, 0, tablesize); @@ -1691,8 +1772,8 @@ */ path_table_index = 0; - pathlist = (struct directory **) e_malloc(sizeof (struct directory *) - * next_path_index); + pathlist = (struct directory **)e_malloc(sizeof (struct directory *) + *next_path_index); memset(pathlist, 0, sizeof (struct directory *) * next_path_index); build_pathlist(root); @@ -1719,7 +1800,7 @@ for (j = 1; j < next_path_index; j++) { dpnt = pathlist[j]; if (!dpnt) { - comerrno(EX_BAD, "Entry %d not in path tables\n", j); + comerrno(EX_BAD, _("Entry %d not in path tables\n"), j); } npnt = dpnt->de_name; @@ -1734,7 +1815,7 @@ de = dpnt->self; if (!de) { comerrno(EX_BAD, - "Fatal ISO9660 goof - directory has amnesia\n"); + _("Fatal ISO9660 goof - directory has amnesia\n")); } namelen = de->isorec.name_len[0]; @@ -1757,8 +1838,11 @@ if (!warned) { warned++; errmsgno(EX_BAD, - "Unable to generate sane path tables - too many directories (%u)\n", + _("Unable to generate sane path tables - too many directories (%u)\n"), dpnt->parent->path_index); + if (!nolimitpathtables) + errmsgno(EX_BAD, + _("Try to use the option -no-limit-pathtables\n")); } if (!nolimitpathtables) exit(EX_BAD); @@ -1785,7 +1869,7 @@ pathlist = NULL; if (path_table_index != path_table_size) { errmsgno(EX_BAD, - "Path table lengths do not match %d expected: %d\n", + _("Path table lengths do not match %d expected: %d\n"), path_table_index, path_table_size); } @@ -1860,20 +1944,20 @@ if (verbose > 2) { #ifdef DBG_ISO fprintf(stderr, - "Total directory extents being written = %u\n", + _("Total directory extents being written = %u\n"), last_extent); #endif #ifdef APPLE_HYB if (apple_hyb && !donotwrite_macpart) fprintf(stderr, - "Total extents scheduled to be written (inc HFS) = %u\n", + _("Total extents scheduled to be written (inc HFS) = %u\n"), last_extent - session_start); else #endif /* APPLE_HYB */ fprintf(stderr, - "Total extents scheduled to be written = %u\n", + _("Total extents scheduled to be written = %u\n"), last_extent - session_start); } /* Now write all of the files that we need. */ @@ -1909,29 +1993,29 @@ #ifdef APPLE_HYB if (apple_hyb && !donotwrite_macpart) { fprintf(stderr, - "Total extents actually written (inc HFS) = %u\n", + _("Total extents actually written (inc HFS) = %u\n"), last_extent_written - session_start); - fprintf(stderr, "(Size of ISO volume = %d, HFS extra = %d)\n", + fprintf(stderr, _("(Size of ISO volume = %d, HFS extra = %d)\n"), last_extent_written - session_start - hfs_extra, hfs_extra); } else #else - fprintf(stderr, "Total extents actually written = %d\n", + fprintf(stderr, _("Total extents actually written = %d\n"), last_extent_written - session_start); #endif /* APPLE_HYB */ /* Hard links throw us off here */ if (should_write != (last_extent - session_start)) { fprintf(stderr, - "Number of extents written not what was predicted. Please fix.\n"); - fprintf(stderr, "Predicted = %d, written = %d\n", + _("Number of extents written not what was predicted. Please fix.\n")); + fprintf(stderr, _("Predicted = %d, written = %d\n"), should_write, last_extent); } - fprintf(stderr, "Total translation table size: %d\n", table_size); - fprintf(stderr, "Total rockridge attributes bytes: %d\n", + fprintf(stderr, _("Total translation table size: %d\n"), table_size); + fprintf(stderr, _("Total rockridge attributes bytes: %d\n"), rockridge_size); - fprintf(stderr, "Total directory bytes: %d\n", total_dir_size); - fprintf(stderr, "Path table size(bytes): %d\n", path_table_size); + fprintf(stderr, _("Total directory bytes: %d\n"), total_dir_size); + fprintf(stderr, _("Path table size(bytes): %d\n"), path_table_size); #ifdef DEBUG fprintf(stderr, @@ -1952,41 +2036,18 @@ { char iso_time[17]; int should_write; - struct tm local; - struct tm gmt; int i; int s; Uchar *cp; +extern ldate modification_date; - time(&begun); - - local = *localtime(&begun); - gmt = *gmtime(&begun); - - /* - * There was a comment here about breaking in the year 2000. - * That's not true, in 2000 tm_year == 100, so 1900+tm_year == 2000. - */ - sprintf(iso_time, "%4.4d%2.2d%2.2d%2.2d%2.2d%2.2d00", - 1900 + local.tm_year, - local.tm_mon + 1, local.tm_mday, - local.tm_hour, local.tm_min, local.tm_sec); - - local.tm_min -= gmt.tm_min; - local.tm_hour -= gmt.tm_hour; - local.tm_yday -= gmt.tm_yday; - local.tm_year -= gmt.tm_year; - if (local.tm_year) /* Hit new-year limit */ - local.tm_yday = local.tm_year; /* yday = +-1 */ - - iso_time[16] = (local.tm_min + 60 * - (local.tm_hour + 24 * local.tm_yday)) / 15; + iso9660_ldate(iso_time, tv_begun.tv_sec, tv_begun.tv_usec * 1000, -100); /* Next we write out the primary descriptor for the disc */ memset(&vol_desc, 0, sizeof (vol_desc)); vol_desc.type[0] = ISO_VD_PRIMARY; - memcpy(vol_desc.id, ISO_STANDARD_ID, sizeof (ISO_STANDARD_ID)); + strncpy(vol_desc.id, ISO_STANDARD_ID, sizeof (vol_desc.id)); vol_desc.version[0] = 1; memset(vol_desc.system_id, ' ', sizeof (vol_desc.system_id)); @@ -1996,7 +2057,7 @@ memcpy_max(vol_desc.volume_id, volume_id, strlen(volume_id)); should_write = last_extent - session_start; - set_733((char *) vol_desc.volume_space_size, should_write); + set_733((char *)vol_desc.volume_space_size, should_write); set_723(vol_desc.volume_set_size, volume_set_size); set_723(vol_desc.volume_sequence_number, volume_sequence_number); set_723(vol_desc.logical_block_size, SECTOR_SIZE); @@ -2005,7 +2066,7 @@ * The path tables are used by DOS based machines to cache directory * locations */ - set_733((char *) vol_desc.path_table_size, path_table_size); + set_733((char *)vol_desc.path_table_size, path_table_size); set_731(vol_desc.type_l_path_table, path_table[0]); set_731(vol_desc.opt_type_l_path_table, path_table[1]); set_732(vol_desc.type_m_path_table, path_table[2]); @@ -2057,8 +2118,12 @@ vol_desc.file_structure_version[0] = 1; FILL_SPACE(application_data); + iso9660_ldate(vol_desc.modification_date, + modification_date.l_sec, + modification_date.l_usec * 1000, + modification_date.l_gmtoff); + memcpy(vol_desc.creation_date, iso_time, 17); - memcpy(vol_desc.modification_date, iso_time, 17); memcpy(vol_desc.expiration_date, "0000000000000000", 17); memcpy(vol_desc.effective_date, iso_time, 17); @@ -2118,7 +2183,7 @@ */ memset(&evol_desc, 0, sizeof (evol_desc)); evol_desc.type[0] = (unsigned char) ISO_VD_END; - memcpy(evol_desc.id, ISO_STANDARD_ID, sizeof (ISO_STANDARD_ID)); + strncpy(evol_desc.id, ISO_STANDARD_ID, sizeof (evol_desc.id)); evol_desc.version[0] = 1; xfwrite(&evol_desc, SECTOR_SIZE, 1, outfile, 0, TRUE); last_extent_written += 1; @@ -2363,9 +2428,9 @@ #endif /* APPLE_HYB */ if (!assign_file_addresses(root, FALSE)) { -#ifdef DVD_VIDEO - if (dvd_video) { - comerrno(EX_BAD, "Unable to make a DVD-Video image.\n"); +#ifdef DVD_AUD_VID + if (dvd_aud_vid_flag & DVD_SPEC_VIDEO) { + comerrno(EX_BAD, _("Unable to make a DVD-Video image.\n")); } #else ; @@ -2443,9 +2508,9 @@ extension_record_extent = starting_extent; s_entry = root->contents; - set_733((char *) s_entry->rr_attributes + s_entry->rr_attr_size - 24, + set_733((char *)s_entry->rr_attributes + s_entry->rr_attr_size - 24, extension_record_extent); - set_733((char *) s_entry->rr_attributes + s_entry->rr_attr_size - 8, + set_733((char *)s_entry->rr_attributes + s_entry->rr_attr_size - 8, extension_record_size); last_extent++; return (0); @@ -2567,7 +2632,7 @@ /* allocate memory for the libhfs/mkisofs extra info */ hce = (hce_mem *) e_malloc(sizeof (hce_mem)); - hce->error = (char *) e_malloc(1024); + hce->error = (char *)e_malloc(1024); /* mark as unallocated for use later */ hce->hfs_ce = hce->hfs_hdr = hce->hfs_map = 0; @@ -2586,7 +2651,7 @@ /* set the HFS parameter string to upper case */ if (hfs_parms) { for (p = hfs_parms; *p; p++) - *p = toupper(*p); + *p = toupper((*p & 0xFF)); } /* set the initial factor to increase Catalog file size */ @@ -2615,7 +2680,11 @@ hce->error[0] = '\0'; /* attempt to create the Mac volume */ +#ifdef APPLE_HFS_HYB Csize = make_mac_volume(root, start_extent); +#else + Csize = -1; +#endif /* if we have a problem ... */ if (Csize < 0) { @@ -2787,7 +2856,7 @@ for (dw = dw_head; dw; dw = dw->next) { s_entry = dw->s_entry; s_entry->starting_block = dw->extent = start_extent; - set_733((char *) s_entry->isorec.extent, start_extent); + set_733((char *)s_entry->isorec.extent, start_extent); size = ROUND_UP(dw->size, Csize) / SECTOR_SIZE; dw->pad = size - ISO_ROUND_UP(dw->size) / SECTOR_SIZE; @@ -2833,9 +2902,9 @@ * find any cached entry and assign new starting * extent */ - s_hash = find_hash(s_entry->dev, s_entry->inode); + s_hash = find_hash(s_entry); if (s_hash) { - set_733((char *) s_entry->isorec.extent, + set_733((char *)s_entry->isorec.extent, s_hash->starting_block); /* not vital - but tidy */ s_entry->starting_block = diff -Nru cdrtools-2.01.01a33/Mocsw cdrtools-3.02a09/Mocsw --- cdrtools-2.01.01a33/Mocsw 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/Mocsw 2013-06-19 20:23:36.000000000 +0000 @@ -0,0 +1,21 @@ +#ident "@(#)Mocsw 1.4 13/06/19 " +########################################################################### +deftgt: +SRCROOT= . +DIRNAME= SRCROOT +RULESDIR= RULES +include $(SRCROOT)/$(RULESDIR)/rules.top +########################################################################### + +USER_NAME :sh= /usr/ucb/whoami || whoami +HOST_NAME :sh= uname -n +DATE :sh= date '+%Y%m%d%H%M%S' + + +deftgt $(ALLTARGETS): + $(MAKE) -f Mcsw DEFAULTSDIR=DEFAULTS_CSW EMAIL=joerg@opencsw.org \ + HOTLINE=http://www.opencsw.org/bugtrack/ \ + PKG_TYPE=OCSW \ + PKGOPTX=PSTAMP=$(USER_NAME)@$(HOST_NAME)-$(DATE) \ + LDOPTX=-Bdirect \ + $@ diff -Nru cdrtools-2.01.01a33/pkgdefs/CSW/CSWcdrtools/Makefile cdrtools-3.02a09/pkgdefs/CSW/CSWcdrtools/Makefile --- cdrtools-2.01.01a33/pkgdefs/CSW/CSWcdrtools/Makefile 2007-06-10 20:46:08.000000000 +0000 +++ cdrtools-3.02a09/pkgdefs/CSW/CSWcdrtools/Makefile 2009-04-04 20:04:40.000000000 +0000 @@ -1,4 +1,4 @@ -#ident %W% %E% %Q% +#ident @(#)Makefile 1.2 09/04/04 ########################################################################### # Sample makefile for creating SVr4 packages ########################################################################### @@ -11,3 +11,5 @@ ########################################################################### include $(SRCROOT)/$(RULESDIR)/rules.pkg ########################################################################### + +VERSION :sh= ../../../proto/`../../../conf/oarch.sh`/opt/csw/bin/cdrecord -version | awk '{ print $2}' diff -Nru cdrtools-2.01.01a33/pkgdefs/CSW/CSWcdrtools/pkginfo cdrtools-3.02a09/pkgdefs/CSW/CSWcdrtools/pkginfo --- cdrtools-2.01.01a33/pkgdefs/CSW/CSWcdrtools/pkginfo 2007-06-21 12:11:08.000000000 +0000 +++ cdrtools-3.02a09/pkgdefs/CSW/CSWcdrtools/pkginfo 2014-12-03 19:26:44.000000000 +0000 @@ -1,10 +1,10 @@ ARCH=i386 PKG=CSWcdrtools #PKG=XXXcdrtools -NAME=cdrtools - tools for ripping from and recording to CDs and DVDs -VERSION=2.01.01a28,REV=2006.7.20 +NAME=cdrtools - Tools for ripping from and recording to CDs and DVDs +VERSION=2.01.01a39,REV=2006.7.20 CATEGORY=application -VENDOR=http://cdrecord.berlios.de/old/private/cdrecord.html packaged for CSW by Jörg Schilling +VENDOR=http://cdrecord.org/private/cdrecord.html packaged for CSW by Jörg Schilling HOTLINE=http://www.blastwave.org/bugtrack/ EMAIL=joerg@blastwave.org BASEDIR=/opt/csw diff -Nru cdrtools-2.01.01a33/pkgdefs/CSW/CSWcdrtools/prototype cdrtools-3.02a09/pkgdefs/CSW/CSWcdrtools/prototype --- cdrtools-2.01.01a33/pkgdefs/CSW/CSWcdrtools/prototype 2007-06-10 13:50:00.000000000 +0000 +++ cdrtools-3.02a09/pkgdefs/CSW/CSWcdrtools/prototype 2011-09-28 19:13:49.000000000 +0000 @@ -3,6 +3,8 @@ i copyright d none bin ? ? ? f none bin/cdda2wav 04755 root bin +f none bin/cdda2mp3 0755 root bin +f none bin/cdda2ogg 0755 root bin f none bin/cdrecord 04755 root bin f none bin/mkisofs 0755 root bin s none bin/mkhybrid=mkisofs @@ -20,10 +22,13 @@ d none share/man ? ? ? d none share/man/man1 ? ? ? f none share/man/man1/cdda2wav.1 0444 root bin +f none share/man/man1/cdda2mp3.1 0444 root bin f none share/man/man1/cdda2ogg.1 0444 root bin f none share/man/man1/cdrecord.1 0444 root bin f none share/man/man1/readcd.1 0444 root bin +f none share/man/man1/rscsi.1 0444 root bin f none share/man/man1/scgcheck.1 0444 root bin +f none share/man/man1/scgskeleton.1 0444 root bin d none share/man/man8 ? ? ? f none share/man/man8/mkisofs.8 0444 root bin f none share/man/man8/mkhybrid.8 0444 root bin @@ -85,4 +90,3 @@ f none share/doc/mkisofs/README.sort 0644 root bin f none share/doc/mkisofs/README.sparcboot 0444 root bin f none share/doc/mkisofs/README.sunx86boot 0644 root bin -s none man=share/man diff -Nru cdrtools-2.01.01a33/pkgdefs/OCSW/CSWcdrtools/checkpkg_override cdrtools-3.02a09/pkgdefs/OCSW/CSWcdrtools/checkpkg_override --- cdrtools-2.01.01a33/pkgdefs/OCSW/CSWcdrtools/checkpkg_override 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/pkgdefs/OCSW/CSWcdrtools/checkpkg_override 2013-06-19 20:24:20.000000000 +0000 @@ -0,0 +1,30 @@ +CSWcdrtools: bad-rpath-entry $ORIGIN/../lib opt/csw/bin/cdda2wav +CSWcdrtools: bad-rpath-entry $ORIGIN/../lib opt/csw/bin/cdrecord +CSWcdrtools: bad-rpath-entry $ORIGIN/../lib opt/csw/bin/devdump +CSWcdrtools: bad-rpath-entry $ORIGIN/../lib opt/csw/bin/isodebug +CSWcdrtools: bad-rpath-entry $ORIGIN/../lib opt/csw/bin/isodump +CSWcdrtools: bad-rpath-entry $ORIGIN/../lib opt/csw/bin/isoinfo +CSWcdrtools: bad-rpath-entry $ORIGIN/../lib opt/csw/bin/isovfy +CSWcdrtools: bad-rpath-entry $ORIGIN/../lib opt/csw/bin/mkisofs +CSWcdrtools: bad-rpath-entry $ORIGIN/../lib opt/csw/bin/readcd +CSWcdrtools: bad-rpath-entry $ORIGIN/../lib opt/csw/bin/scgcheck +CSWcdrtools: bad-rpath-entry $ORIGIN/../lib opt/csw/bin/scgskeleton +CSWcdrtools: bad-rpath-entry $ORIGIN/../lib opt/csw/sbin/rscsi +CSWcdrtools: disallowed-path opt/csw/bin +CSWcdrtools: disallowed-path opt/csw/sbin +CSWcdrtools: disallowed-path opt/csw/share +CSWcdrtools: disallowed-path opt/csw/share/doc +CSWcdrtools: disallowed-path opt/csw/share/man +CSWcdrtools: file-with-bad-content /export/home reloc/share/doc/cdrecord/README.rscsi +CSWcdrtools: file-with-bad-content /export/home reloc/share/doc/rscsi/default-rscsi.sample +CSWcdrtools: file-with-bad-content /usr/local reloc/share/doc/cdda2wav/README +CSWcdrtools: file-with-bad-content /usr/local reloc/share/man/man1/readcd.1 +CSWcdrtools: pkginfo-opencsw-repository-missing +CSWcdrtools: pkgmap-question-mark-perms-in-opt-csw /opt/csw/bin +CSWcdrtools: pkgmap-question-mark-perms-in-opt-csw /opt/csw/sbin +CSWcdrtools: pkgmap-question-mark-perms-in-opt-csw /opt/csw/share +CSWcdrtools: pkgmap-question-mark-perms-in-opt-csw /opt/csw/share/doc +CSWcdrtools: pkgmap-question-mark-perms-in-opt-csw /opt/csw/share/man +CSWcdrtools: pkgmap-question-mark-perms-in-opt-csw /opt/csw/share/man/man1 +CSWcdrtools: pkgmap-question-mark-perms-in-opt-csw /opt/csw/share/man/man4 +CSWcdrtools: pkgmap-question-mark-perms-in-opt-csw /opt/csw/share/man/man8 diff -Nru cdrtools-2.01.01a33/pkgdefs/OCSW/CSWcdrtools/copyright cdrtools-3.02a09/pkgdefs/OCSW/CSWcdrtools/copyright --- cdrtools-2.01.01a33/pkgdefs/OCSW/CSWcdrtools/copyright 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/pkgdefs/OCSW/CSWcdrtools/copyright 2005-02-09 23:41:21.000000000 +0000 @@ -0,0 +1,376 @@ +COMMON DEVELOPMENT AND DISTRIBUTION LICENSE Version 1.0 + +1. Definitions. + + 1.1. "Contributor" means each individual or entity that creates + or contributes to the creation of Modifications. + + 1.2. "Contributor Version" means the combination of the Original + Software, prior Modifications used by a Contributor (if any), + and the Modifications made by that particular Contributor. + + 1.3. "Covered Software" means (a) the Original Software, or (b) + Modifications, or (c) the combination of files containing + Original Software with files containing Modifications, in + each case including portions thereof. + + 1.4. "Executable" means the Covered Software in any form other + than Source Code. + + 1.5. "Initial Developer" means the individual or entity that first + makes Original Software available under this License. + + 1.6. "Larger Work" means a work which combines Covered Software or + portions thereof with code not governed by the terms of this + License. + + 1.7. "License" means this document. + + 1.8. "Licensable" means having the right to grant, to the maximum + extent possible, whether at the time of the initial grant or + subsequently acquired, any and all of the rights conveyed + herein. + + 1.9. "Modifications" means the Source Code and Executable form of + any of the following: + + A. Any file that results from an addition to, deletion from or + modification of the contents of a file containing Original + Software or previous Modifications; + + B. Any new file that contains any part of the Original + Software or previous Modifications; or + + C. Any new file that is contributed or otherwise made + available under the terms of this License. + + 1.10. "Original Software" means the Source Code and Executable + form of computer software code that is originally released + under this License. + + 1.11. "Patent Claims" means any patent claim(s), now owned or + hereafter acquired, including without limitation, method, + process, and apparatus claims, in any patent Licensable by + grantor. + + 1.12. "Source Code" means (a) the common form of computer software + code in which modifications are made and (b) associated + documentation included in or with such code. + + 1.13. "You" (or "Your") means an individual or a legal entity + exercising rights under, and complying with all of the terms + of, this License. For legal entities, "You" includes any + entity which controls, is controlled by, or is under common + control with You. For purposes of this definition, + "control" means (a) the power, direct or indirect, to cause + the direction or management of such entity, whether by + contract or otherwise, or (b) ownership of more than fifty + percent (50%) of the outstanding shares or beneficial + ownership of such entity. + +2. License Grants. + + 2.1. The Initial Developer Grant. + + Conditioned upon Your compliance with Section 3.1 below and + subject to third party intellectual property claims, the Initial + Developer hereby grants You a world-wide, royalty-free, + non-exclusive license: + + (a) under intellectual property rights (other than patent or + trademark) Licensable by Initial Developer, to use, + reproduce, modify, display, perform, sublicense and + distribute the Original Software (or portions thereof), + with or without Modifications, and/or as part of a Larger + Work; and + + (b) under Patent Claims infringed by the making, using or + selling of Original Software, to make, have made, use, + practice, sell, and offer for sale, and/or otherwise + dispose of the Original Software (or portions thereof). + + (c) The licenses granted in Sections 2.1(a) and (b) are + effective on the date Initial Developer first distributes + or otherwise makes the Original Software available to a + third party under the terms of this License. + + (d) Notwithstanding Section 2.1(b) above, no patent license is + granted: (1) for code that You delete from the Original + Software, or (2) for infringements caused by: (i) the + modification of the Original Software, or (ii) the + combination of the Original Software with other software + or devices. + + 2.2. Contributor Grant. + + Conditioned upon Your compliance with Section 3.1 below and + subject to third party intellectual property claims, each + Contributor hereby grants You a world-wide, royalty-free, + non-exclusive license: + + (a) under intellectual property rights (other than patent or + trademark) Licensable by Contributor to use, reproduce, + modify, display, perform, sublicense and distribute the + Modifications created by such Contributor (or portions + thereof), either on an unmodified basis, with other + Modifications, as Covered Software and/or as part of a + Larger Work; and + + (b) under Patent Claims infringed by the making, using, or + selling of Modifications made by that Contributor either + alone and/or in combination with its Contributor Version + (or portions of such combination), to make, use, sell, + offer for sale, have made, and/or otherwise dispose of: + (1) Modifications made by that Contributor (or portions + thereof); and (2) the combination of Modifications made by + that Contributor with its Contributor Version (or portions + of such combination). + + (c) The licenses granted in Sections 2.2(a) and 2.2(b) are + effective on the date Contributor first distributes or + otherwise makes the Modifications available to a third + party. + + (d) Notwithstanding Section 2.2(b) above, no patent license is + granted: (1) for any code that Contributor has deleted + from the Contributor Version; (2) for infringements caused + by: (i) third party modifications of Contributor Version, + or (ii) the combination of Modifications made by that + Contributor with other software (except as part of the + Contributor Version) or other devices; or (3) under Patent + Claims infringed by Covered Software in the absence of + Modifications made by that Contributor. + +3. Distribution Obligations. + + 3.1. Availability of Source Code. + + Any Covered Software that You distribute or otherwise make + available in Executable form must also be made available in Source + Code form and that Source Code form must be distributed only under + the terms of this License. You must include a copy of this + License with every copy of the Source Code form of the Covered + Software You distribute or otherwise make available. You must + inform recipients of any such Covered Software in Executable form + as to how they can obtain such Covered Software in Source Code + form in a reasonable manner on or through a medium customarily + used for software exchange. + + 3.2. Modifications. + + The Modifications that You create or to which You contribute are + governed by the terms of this License. You represent that You + believe Your Modifications are Your original creation(s) and/or + You have sufficient rights to grant the rights conveyed by this + License. + + 3.3. Required Notices. + + You must include a notice in each of Your Modifications that + identifies You as the Contributor of the Modification. You may + not remove or alter any copyright, patent or trademark notices + contained within the Covered Software, or any notices of licensing + or any descriptive text giving attribution to any Contributor or + the Initial Developer. + + 3.4. Application of Additional Terms. + + You may not offer or impose any terms on any Covered Software in + Source Code form that alters or restricts the applicable version + of this License or the recipients' rights hereunder. You may + choose to offer, and to charge a fee for, warranty, support, + indemnity or liability obligations to one or more recipients of + Covered Software. However, you may do so only on Your own behalf, + and not on behalf of the Initial Developer or any Contributor. + You must make it absolutely clear that any such warranty, support, + indemnity or liability obligation is offered by You alone, and You + hereby agree to indemnify the Initial Developer and every + Contributor for any liability incurred by the Initial Developer or + such Contributor as a result of warranty, support, indemnity or + liability terms You offer. + + 3.5. Distribution of Executable Versions. + + You may distribute the Executable form of the Covered Software + under the terms of this License or under the terms of a license of + Your choice, which may contain terms different from this License, + provided that You are in compliance with the terms of this License + and that the license for the Executable form does not attempt to + limit or alter the recipient's rights in the Source Code form from + the rights set forth in this License. If You distribute the + Covered Software in Executable form under a different license, You + must make it absolutely clear that any terms which differ from + this License are offered by You alone, not by the Initial + Developer or Contributor. You hereby agree to indemnify the + Initial Developer and every Contributor for any liability incurred + by the Initial Developer or such Contributor as a result of any + such terms You offer. + + 3.6. Larger Works. + + You may create a Larger Work by combining Covered Software with + other code not governed by the terms of this License and + distribute the Larger Work as a single product. In such a case, + You must make sure the requirements of this License are fulfilled + for the Covered Software. + +4. Versions of the License. + + 4.1. New Versions. + + Sun Microsystems, Inc. is the initial license steward and may + publish revised and/or new versions of this License from time to + time. Each version will be given a distinguishing version number. + Except as provided in Section 4.3, no one other than the license + steward has the right to modify this License. + + 4.2. Effect of New Versions. + + You may always continue to use, distribute or otherwise make the + Covered Software available under the terms of the version of the + License under which You originally received the Covered Software. + If the Initial Developer includes a notice in the Original + Software prohibiting it from being distributed or otherwise made + available under any subsequent version of the License, You must + distribute and make the Covered Software available under the terms + of the version of the License under which You originally received + the Covered Software. Otherwise, You may also choose to use, + distribute or otherwise make the Covered Software available under + the terms of any subsequent version of the License published by + the license steward. + + 4.3. Modified Versions. + + When You are an Initial Developer and You want to create a new + license for Your Original Software, You may create and use a + modified version of this License if You: (a) rename the license + and remove any references to the name of the license steward + (except to note that the license differs from this License); and + (b) otherwise make it clear that the license contains terms which + differ from this License. + +5. DISCLAIMER OF WARRANTY. + + COVERED SOFTWARE IS PROVIDED UNDER THIS LICENSE ON AN "AS IS" + BASIS, WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, + INCLUDING, WITHOUT LIMITATION, WARRANTIES THAT THE COVERED + SOFTWARE IS FREE OF DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR + PURPOSE OR NON-INFRINGING. THE ENTIRE RISK AS TO THE QUALITY AND + PERFORMANCE OF THE COVERED SOFTWARE IS WITH YOU. SHOULD ANY + COVERED SOFTWARE PROVE DEFECTIVE IN ANY RESPECT, YOU (NOT THE + INITIAL DEVELOPER OR ANY OTHER CONTRIBUTOR) ASSUME THE COST OF ANY + NECESSARY SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER OF + WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS LICENSE. NO USE OF + ANY COVERED SOFTWARE IS AUTHORIZED HEREUNDER EXCEPT UNDER THIS + DISCLAIMER. + +6. TERMINATION. + + 6.1. This License and the rights granted hereunder will terminate + automatically if You fail to comply with terms herein and fail to + cure such breach within 30 days of becoming aware of the breach. + Provisions which, by their nature, must remain in effect beyond + the termination of this License shall survive. + + 6.2. If You assert a patent infringement claim (excluding + declaratory judgment actions) against Initial Developer or a + Contributor (the Initial Developer or Contributor against whom You + assert such claim is referred to as "Participant") alleging that + the Participant Software (meaning the Contributor Version where + the Participant is a Contributor or the Original Software where + the Participant is the Initial Developer) directly or indirectly + infringes any patent, then any and all rights granted directly or + indirectly to You by such Participant, the Initial Developer (if + the Initial Developer is not the Participant) and all Contributors + under Sections 2.1 and/or 2.2 of this License shall, upon 60 days + notice from Participant terminate prospectively and automatically + at the expiration of such 60 day notice period, unless if within + such 60 day period You withdraw Your claim with respect to the + Participant Software against such Participant either unilaterally + or pursuant to a written agreement with Participant. + + 6.3. In the event of termination under Sections 6.1 or 6.2 above, + all end user licenses that have been validly granted by You or any + distributor hereunder prior to termination (excluding licenses + granted to You by any distributor) shall survive termination. + +7. LIMITATION OF LIABILITY. + + UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL THEORY, WHETHER TORT + (INCLUDING NEGLIGENCE), CONTRACT, OR OTHERWISE, SHALL YOU, THE + INITIAL DEVELOPER, ANY OTHER CONTRIBUTOR, OR ANY DISTRIBUTOR OF + COVERED SOFTWARE, OR ANY SUPPLIER OF ANY OF SUCH PARTIES, BE + LIABLE TO ANY PERSON FOR ANY INDIRECT, SPECIAL, INCIDENTAL, OR + CONSEQUENTIAL DAMAGES OF ANY CHARACTER INCLUDING, WITHOUT + LIMITATION, DAMAGES FOR LOST PROFITS, LOSS OF GOODWILL, WORK + STOPPAGE, COMPUTER FAILURE OR MALFUNCTION, OR ANY AND ALL OTHER + COMMERCIAL DAMAGES OR LOSSES, EVEN IF SUCH PARTY SHALL HAVE BEEN + INFORMED OF THE POSSIBILITY OF SUCH DAMAGES. THIS LIMITATION OF + LIABILITY SHALL NOT APPLY TO LIABILITY FOR DEATH OR PERSONAL + INJURY RESULTING FROM SUCH PARTY'S NEGLIGENCE TO THE EXTENT + APPLICABLE LAW PROHIBITS SUCH LIMITATION. SOME JURISDICTIONS DO + NOT ALLOW THE EXCLUSION OR LIMITATION OF INCIDENTAL OR + CONSEQUENTIAL DAMAGES, SO THIS EXCLUSION AND LIMITATION MAY NOT + APPLY TO YOU. + +8. U.S. GOVERNMENT END USERS. + + The Covered Software is a "commercial item," as that term is + defined in 48 C.F.R. 2.101 (Oct. 1995), consisting of "commercial + computer software" (as that term is defined at 48 + C.F.R. 252.227-7014(a)(1)) and "commercial computer software + documentation" as such terms are used in 48 C.F.R. 12.212 + (Sept. 1995). Consistent with 48 C.F.R. 12.212 and 48 + C.F.R. 227.7202-1 through 227.7202-4 (June 1995), all + U.S. Government End Users acquire Covered Software with only those + rights set forth herein. This U.S. Government Rights clause is in + lieu of, and supersedes, any other FAR, DFAR, or other clause or + provision that addresses Government rights in computer software + under this License. + +9. MISCELLANEOUS. + + This License represents the complete agreement concerning subject + matter hereof. If any provision of this License is held to be + unenforceable, such provision shall be reformed only to the extent + necessary to make it enforceable. This License shall be governed + by the law of the jurisdiction specified in a notice contained + within the Original Software (except to the extent applicable law, + if any, provides otherwise), excluding such jurisdiction's + conflict-of-law provisions. Any litigation relating to this + License shall be subject to the jurisdiction of the courts located + in the jurisdiction and venue specified in a notice contained + within the Original Software, with the losing party responsible + for costs, including, without limitation, court costs and + reasonable attorneys' fees and expenses. The application of the + United Nations Convention on Contracts for the International Sale + of Goods is expressly excluded. Any law or regulation which + provides that the language of a contract shall be construed + against the drafter shall not apply to this License. You agree + that You alone are responsible for compliance with the United + States export administration regulations (and the export control + laws and regulation of any other countries) when You use, + distribute or otherwise make available any Covered Software. + +10. RESPONSIBILITY FOR CLAIMS. + + As between Initial Developer and the Contributors, each party is + responsible for claims and damages arising, directly or + indirectly, out of its utilization of rights under this License + and You agree to work with Initial Developer and Contributors to + distribute such responsibility on an equitable basis. Nothing + herein is intended or shall be deemed to constitute any admission + of liability. + +-------------------------------------------------------------------- + +NOTICE PURSUANT TO SECTION 9 OF THE COMMON DEVELOPMENT AND +DISTRIBUTION LICENSE (CDDL) + +For Covered Software in this distribution, this License shall +be governed by the laws of Germany (excluding conflict-of-law +provisions). + +Any litigation relating to this License shall be subject to the +jurisdiction and the courts of Berlin Germany, with venue lying +in Berlin Germany. diff -Nru cdrtools-2.01.01a33/pkgdefs/OCSW/CSWcdrtools/depend cdrtools-3.02a09/pkgdefs/OCSW/CSWcdrtools/depend --- cdrtools-2.01.01a33/pkgdefs/OCSW/CSWcdrtools/depend 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/pkgdefs/OCSW/CSWcdrtools/depend 2008-05-01 16:05:43.000000000 +0000 @@ -0,0 +1,4 @@ +P CSWcommon +P CSWschilybase Basic framework from J. Schilling +P CSWschilyutils A collection of utilities from J. Schilling +P CSWpxupgrade Upgrade firmware in Plextor CD/DVD writers diff -Nru cdrtools-2.01.01a33/pkgdefs/OCSW/CSWcdrtools/Makefile cdrtools-3.02a09/pkgdefs/OCSW/CSWcdrtools/Makefile --- cdrtools-2.01.01a33/pkgdefs/OCSW/CSWcdrtools/Makefile 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/pkgdefs/OCSW/CSWcdrtools/Makefile 2009-04-04 20:04:40.000000000 +0000 @@ -0,0 +1,15 @@ +#ident @(#)Makefile 1.2 09/04/04 +########################################################################### +# Sample makefile for creating SVr4 packages +########################################################################### +SRCROOT= ../../.. +RULESDIR= RULES +include $(SRCROOT)/$(RULESDIR)/rules.top +########################################################################### + +include $(SRCROOT)/$(RULESDIR)/rules.csw +########################################################################### +include $(SRCROOT)/$(RULESDIR)/rules.pkg +########################################################################### + +VERSION :sh= ../../../proto/`../../../conf/oarch.sh`/opt/csw/bin/cdrecord -version | awk '{ print $2}' diff -Nru cdrtools-2.01.01a33/pkgdefs/OCSW/CSWcdrtools/pkginfo cdrtools-3.02a09/pkgdefs/OCSW/CSWcdrtools/pkginfo --- cdrtools-2.01.01a33/pkgdefs/OCSW/CSWcdrtools/pkginfo 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/pkgdefs/OCSW/CSWcdrtools/pkginfo 2014-12-03 19:26:44.000000000 +0000 @@ -0,0 +1,10 @@ +ARCH=i386 +PKG=CSWcdrtools +#PKG=XXXcdrtools +NAME=cdrtools - Tools for ripping from and recording to CDs and DVDs +VERSION=2.01.01a39,REV=2006.7.20 +CATEGORY=application +VENDOR=http://cdrecord.org/private/cdrecord.html packaged for CSW by Jörg Schilling +HOTLINE=http://www.blastwave.org/bugtrack/ +EMAIL=joerg@blastwave.org +BASEDIR=/opt/csw diff -Nru cdrtools-2.01.01a33/pkgdefs/OCSW/CSWcdrtools/prototype cdrtools-3.02a09/pkgdefs/OCSW/CSWcdrtools/prototype --- cdrtools-2.01.01a33/pkgdefs/OCSW/CSWcdrtools/prototype 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/pkgdefs/OCSW/CSWcdrtools/prototype 2011-09-28 17:31:02.000000000 +0000 @@ -0,0 +1,95 @@ +i pkginfo +i depend +#i copyright +i checkpkg_override +d none share/doc/cdrtools 0755 root bin +f none share/doc/cdrtools/license=$pkgbase/copyright 0444 root bin +d none bin ? ? ? +f none bin/cdda2wav 04755 root bin +f none bin/cdda2mp3 0755 root bin +f none bin/cdda2ogg 0755 root bin +f none bin/cdrecord 04755 root bin +f none bin/mkisofs 0755 root bin +s none bin/mkhybrid=mkisofs +f none bin/devdump 0755 root bin +f none bin/isodump 0755 root bin +f none bin/isoinfo 0755 root bin +f none bin/isovfy 0755 root bin +f none bin/isodebug 0755 root bin +f none bin/readcd 04755 root bin +f none bin/scgcheck 0755 root bin +f none bin/scgskeleton 0755 root bin +d none sbin ? ? ? +f none sbin/rscsi 4711 root bin +d none share ? ? ? +d none share/man ? ? ? +d none share/man/man1 ? ? ? +f none share/man/man1/cdda2wav.1 0444 root bin +f none share/man/man1/cdda2mp3.1 0444 root bin +f none share/man/man1/cdda2ogg.1 0444 root bin +f none share/man/man1/cdrecord.1 0444 root bin +f none share/man/man1/readcd.1 0444 root bin +f none share/man/man1/rscsi.1 0444 root bin +f none share/man/man1/scgcheck.1 0444 root bin +f none share/man/man1/scgskeleton.1 0444 root bin +d none share/man/man8 ? ? ? +f none share/man/man8/mkisofs.8 0444 root bin +f none share/man/man8/mkhybrid.8 0444 root bin +f none share/man/man8/isoinfo.8 0444 root bin +f none share/man/man8/devdump.8 0444 root bin +f none share/man/man8/isodebug.8 0444 root bin +f none share/man/man8/isodump.8 0444 root bin +f none share/man/man8/isovfy.8 0444 root bin +d none share/man/man4 ? ? ? +d none share/doc ? ? ? +d none share/doc/rscsi 0755 root bin +f none share/doc/rscsi/default-rscsi.sample 0644 root bin +d none share/doc/cdrecord 0755 root bin +f none share/doc/cdrecord/README 0444 root bin +f none share/doc/cdrecord/README.ATAPI 0444 root bin +f none share/doc/cdrecord/README.DiskT@2 0644 root bin +#f none share/doc/cdrecord/README.SSPM 0644 root bin +f none share/doc/cdrecord/README.WORM 0644 root bin +f none share/doc/cdrecord/README.audio 0644 root bin +f none share/doc/cdrecord/README.cdplus 0644 root bin +f none share/doc/cdrecord/README.cdrw 0644 root bin +f none share/doc/cdrecord/README.cdtext 0644 root bin +f none share/doc/cdrecord/README.clone 0664 root bin +#f none share/doc/cdrecord/README.compile 0644 root bin +f none share/doc/cdrecord/README.copy 0644 root bin +#f none share/doc/cdrecord/README.gmake 0644 root bin +#f none share/doc/cdrecord/README.mkisofs 0644 root bin +f none share/doc/cdrecord/README.multi 0644 root bin +f none share/doc/cdrecord/README.parallel 0644 root bin +f none share/doc/cdrecord/README.raw 0644 root bin +f none share/doc/cdrecord/README.rscsi 0644 root bin +#f none share/doc/cdrecord/README.solaris 0644 root bin +f none share/doc/cdrecord/README.solaris-x86-ATAPI-DMA 0644 root bin +f none share/doc/cdrecord/README.solaris-x86-ata-DMA 0644 root bin +f none share/doc/cdrecord/README.sony 0644 root bin +f none share/doc/cdrecord/README.sun-lofi 0644 root bin +#f none share/doc/cdrecord/README.sunos 0644 root bin +f none share/doc/cdrecord/README.verify 0644 root bin +f none share/doc/cdrecord/README.volmgt 0644 root bin +d none share/doc/cdda2wav 0755 root bin +f none share/doc/cdda2wav/README 0644 root bin +d none share/doc/libparanoia 0755 root bin +f none share/doc/libparanoia/README.interface 0644 root bin +f none share/doc/libparanoia/README.paranoia 0444 root bin +d none share/doc/mkisofs 0755 root bin +f none share/doc/mkisofs/README 0444 root bin +f none share/doc/mkisofs/README.compression 0644 root bin +f none share/doc/mkisofs/README.eltorito 0444 root bin +f none share/doc/mkisofs/README.graft_dirs 0444 root bin +f none share/doc/mkisofs/README.hfs_boot 0644 root bin +f none share/doc/mkisofs/README.hfs_magic 0644 root bin +f none share/doc/mkisofs/README.hide 0644 root bin +f none share/doc/mkisofs/README.joliet 0644 root bin +f none share/doc/mkisofs/README.macosx 0644 root bin +f none share/doc/mkisofs/README.mkhybrid 0644 root bin +f none share/doc/mkisofs/README.prep_boot 0664 root bin +f none share/doc/mkisofs/README.rootinfo 0644 root bin +f none share/doc/mkisofs/README.session 0444 root bin +f none share/doc/mkisofs/README.sort 0644 root bin +f none share/doc/mkisofs/README.sparcboot 0444 root bin +f none share/doc/mkisofs/README.sunx86boot 0644 root bin diff -Nru cdrtools-2.01.01a33/PORTING cdrtools-3.02a09/PORTING --- cdrtools-2.01.01a33/PORTING 2002-12-16 20:23:38.000000000 +0000 +++ cdrtools-3.02a09/PORTING 2014-12-03 19:08:36.000000000 +0000 @@ -2,7 +2,9 @@ - The base for porting is the makefile system. Always look into: - ftp://ftp.berlios.de/pub/makefiles + + https://sourceforge.net/projects/schilytools/files/makefiles/ + for a version that might be newer than the one used inside the program that should be ported. @@ -28,9 +30,9 @@ The smake source can be found on: - ftp://ftp.berlios.de/pub/smake/ + https://sourceforge.net/projects/s-make/files/ or - ftp://ftp.berlios.de/pub/smake/alpha + https://sourceforge.net/projects/s-make/files/alpha/ for the most recent version. @@ -122,7 +124,7 @@ More hints for writing the needed SCSI low level transport functions is in: - ftp://ftp.berlios.de/pub/cdrecord/README.scsi-IF + http://sourceforge.net/projects/cdrtools/files/READMEs/README.scsi-IF 4) Test your ported program. @@ -133,7 +135,7 @@ Joerg Schilling -schilling@fokus.fhg.de +joerg.schilling@fokus.fraunhofer.de joerg@schily.isdn.cs.tu-berlin.de js@cs.tu-berlin.de diff -Nru cdrtools-2.01.01a33/readcd/cd_misc.c cdrtools-3.02a09/readcd/cd_misc.c --- cdrtools-2.01.01a33/readcd/cd_misc.c 2006-10-05 19:07:47.000000000 +0000 +++ cdrtools-3.02a09/readcd/cd_misc.c 1970-01-01 00:00:00.000000000 +0000 @@ -1,189 +0,0 @@ -/* @(#)cd_misc.c 1.14 06/10/05 Copyright 1997-2006 J. Schilling */ -#ifndef lint -static char sccsid[] = - "@(#)cd_misc.c 1.14 06/10/05 Copyright 1997-2006 J. Schilling"; -#endif -/* - * Misc CD support routines - * - * Copyright (c) 1997-2006 J. Schilling - */ -/* - * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. - * - * See the file CDDL.Schily.txt in this distribution for details. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file CDDL.Schily.txt from this distribution. - */ - -#include -#include -#include /* Includes for caddr_t */ -#include -#include - -#include "cdrecord.h" - -EXPORT int from_bcd __PR((int b)); -EXPORT int to_bcd __PR((int i)); -EXPORT long msf_to_lba __PR((int m, int s, int f, BOOL force_positive)); -EXPORT BOOL lba_to_msf __PR((long lba, msf_t *mp)); -EXPORT void sec_to_msf __PR((long sec, msf_t *mp)); -EXPORT void print_min_atip __PR((long li, long lo)); -EXPORT BOOL is_cdspeed __PR((int speed)); - -EXPORT int -from_bcd(b) - int b; -{ - return ((b & 0x0F) + 10 * (((b)>> 4) & 0x0F)); -} - -EXPORT int -to_bcd(i) - int i; -{ - return (i % 10 | ((i / 10) % 10) << 4); -} - -EXPORT long -msf_to_lba(m, s, f, force_positive) - int m; - int s; - int f; - BOOL force_positive; -{ - long ret = m * 60 + s; - - ret *= 75; - ret += f; - if (m < 90 || force_positive) - ret -= 150; - else - ret -= 450150; - return (ret); -} - -EXPORT BOOL -lba_to_msf(lba, mp) - long lba; - msf_t *mp; -{ - int m; - int s; - int f; - -#ifdef __follow_redbook__ - if (lba >= -150 && lba < 405000) { /* lba <= 404849 */ -#else - if (lba >= -150) { -#endif - m = (lba + 150) / 60 / 75; - s = (lba + 150 - m*60*75) / 75; - f = (lba + 150 - m*60*75 - s*75); - - } else if (lba >= -45150 && lba <= -151) { - m = (lba + 450150) / 60 / 75; - s = (lba + 450150 - m*60*75) / 75; - f = (lba + 450150 - m*60*75 - s*75); - - } else { - mp->msf_min = -1; - mp->msf_sec = -1; - mp->msf_frame = -1; - - return (FALSE); - } - mp->msf_min = m; - mp->msf_sec = s; - mp->msf_frame = f; - - if (lba > 404849) /* 404850 -> 404999: lead out */ - return (FALSE); - return (TRUE); -} - -EXPORT void -sec_to_msf(sec, mp) - long sec; - msf_t *mp; -{ - int m; - int s; - int f; - - m = (sec) / 60 / 75; - s = (sec - m*60*75) / 75; - f = (sec - m*60*75 - s*75); - - mp->msf_min = m; - mp->msf_sec = s; - mp->msf_frame = f; -} - -EXPORT void -print_min_atip(li, lo) - long li; - long lo; -{ - msf_t msf; - - if (li < 0) { - lba_to_msf(li, &msf); - - printf(" ATIP start of lead in: %ld (%02d:%02d/%02d)\n", - li, msf.msf_min, msf.msf_sec, msf.msf_frame); - } - if (lo > 0) { - lba_to_msf(lo, &msf); - printf(" ATIP start of lead out: %ld (%02d:%02d/%02d)\n", - lo, msf.msf_min, msf.msf_sec, msf.msf_frame); - } -} - -/* - * Make a probability guess whether the speed is related to CD or DVD speed. - */ -EXPORT BOOL -is_cdspeed(speed) - int speed; -{ - int cdspeed; - long cdrest; - int dvdspeed; - long dvdrest; - - cdspeed = speed / 176; - cdrest = cdspeed * 1764; - cdrest = speed * 10 - cdrest; - if (cdrest < 0) - cdrest *= -1; - if (cdrest > 1764/2) - cdrest = 1764 - cdrest; - - /* - * 3324 = 1382 * 2.4 - * speed > 0.9 * 3324 && speed < 1.1 * 3324 - */ - if (speed >= 2990 && speed <= 3656) { - dvdrest = 33240; - dvdrest = speed * 10 - dvdrest; - } else { - dvdspeed = speed / 1385; - dvdrest = dvdspeed * 13850; - dvdrest = speed * 10 - dvdrest; - } - if (dvdrest < 0) - dvdrest *= -1; - if (dvdrest > 13850/2) - dvdrest = 13850 - dvdrest; - - /* - * 1385 / 176.4 = 7.85, so we need to multiply the CD rest by 7.85 - */ - return (dvdrest > (cdrest*8 - cdrest/6)); -} diff -Nru cdrtools-2.01.01a33/readcd/defaults.c cdrtools-3.02a09/readcd/defaults.c --- cdrtools-2.01.01a33/readcd/defaults.c 2006-09-13 15:35:12.000000000 +0000 +++ cdrtools-3.02a09/readcd/defaults.c 1970-01-01 00:00:00.000000000 +0000 @@ -1,235 +0,0 @@ -/* @(#)defaults.c 1.20 06/09/13 Copyright 1998-2006 J. Schilling */ -#ifndef lint -static char sccsid[] = - "@(#)defaults.c 1.20 06/09/13 Copyright 1998-2006 J. Schilling"; -#endif -/* - * Copyright (c) 1998-2006 J. Schilling - */ -/* - * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. - * - * See the file CDDL.Schily.txt in this distribution for details. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file CDDL.Schily.txt from this distribution. - */ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include "cdrecord.h" /* only for getnum() */ -#include "defaults.h" - -LOCAL int open_cdrdefaults __PR((void)); -EXPORT void cdr_defaults __PR((char **devp, int *speedp, long *fsp, char **drvoptp)); -LOCAL void cdr_xdefaults __PR((char **devp, int *speedp, long *fsp, char **drvoptp)); -LOCAL char * strsv __PR((char *s)); - -LOCAL int -open_cdrdefaults() -{ - /* - * WARNING you are only allowed to change this filename if you also - * change the documentation and add a statement that makes clear - * where the official location of the file is why you did choose a - * nonstandard location and that the nonstandard location only refers - * to inofficial cdrecord versions. - * - * I was forced to add this because some people change cdrecord without - * rational reason and then publish the result. As those people - * don't contribute work and don't give support, they are causing extra - * work for me and this way slow down the cdrecord development. - */ - return (defltopen("/etc/default/cdrecord")); -} - -EXPORT void -cdr_defaults(devp, speedp, fsp, drvoptp) - char **devp; - int *speedp; - long *fsp; - char **drvoptp; -{ - char *dev = NULL; - int speed = 0; - long fs = 0L; - - if (devp != NULL) - dev = *devp; - if (speedp != NULL) - speed = *speedp; - if (fsp != NULL) - fs = *fsp; - - if (!dev && devp != NULL) { - *devp = getenv("CDR_DEVICE"); - - if (!*devp && open_cdrdefaults() == 0) { - dev = defltread("CDR_DEVICE="); - if (dev != NULL) - *devp = strsv(dev); - } - } - if (devp != NULL && *devp) - cdr_xdefaults(devp, &speed, &fs, drvoptp); - - if (speed < 0) { - char *p = getenv("CDR_SPEED"); - - if (!p) { - if (open_cdrdefaults() == 0) { - p = defltread("CDR_SPEED="); - } - } - if (p) { - speed = atoi(p); - if (speed < 0 && speed != -1) { - comerrno(EX_BAD, - "Bad speed environment (%s).\n", p); - } - } - } - if (speed >= 0 && speedp != NULL) - *speedp = speed; - - if (fs < 0L) { - char *p = getenv("CDR_FIFOSIZE"); - - if (!p) { - if (open_cdrdefaults() == 0) { - p = defltread("CDR_FIFOSIZE="); - } - } - if (p) { - if (getnum(p, &fs) != 1) { - comerrno(EX_BAD, - "Bad fifo size environment (%s).\n", p); - } - } - } - if (fs > 0L && fsp != NULL) { - char *p = NULL; - long maxfs; - - if (open_cdrdefaults() == 0) { - p = defltread("CDR_MAXFIFOSIZE="); - } - if (p) { - if (getnum(p, &maxfs) != 1) { - comerrno(EX_BAD, - "Bad max fifo size default (%s).\n", p); - } - if (fs > maxfs) - fs = maxfs; - } - *fsp = fs; - } - - - defltclose(); -} - -/* - * All args except "drvoptp" are granted to be non NULL pointers. - */ -LOCAL void -cdr_xdefaults(devp, speedp, fsp, drvoptp) - char **devp; - int *speedp; - long *fsp; - char **drvoptp; -{ - char dname[256]; - char *p = *devp; - char *x = ",:/@"; - - while (*x) { - if (strchr(p, *x)) - return; - x++; - } - js_snprintf(dname, sizeof (dname), "%s=", p); - if (open_cdrdefaults() != 0) - return; - - p = defltread(dname); - if (p != NULL) { - while (*p == '\t' || *p == ' ') - p++; - if ((x = strchr(p, '\t')) != NULL) - *x = '\0'; - else if ((x = strchr(p, ' ')) != NULL) - *x = '\0'; - *devp = strsv(p); - if (x) { - p = ++x; - while (*p == '\t' || *p == ' ') - p++; - if ((x = strchr(p, '\t')) != NULL) - *x = '\0'; - else if ((x = strchr(p, ' ')) != NULL) - *x = '\0'; - if (*speedp < 0) - *speedp = atoi(p); - if (*speedp < 0 && *speedp != -1) { - comerrno(EX_BAD, - "Bad speed in defaults (%s).\n", p); - } - } - if (x) { - p = ++x; - while (*p == '\t' || *p == ' ') - p++; - if ((x = strchr(p, '\t')) != NULL) - *x = '\0'; - else if ((x = strchr(p, ' ')) != NULL) - *x = '\0'; - if (*fsp < 0L) { - if (getnum(p, fsp) != 1) { - comerrno(EX_BAD, - "Bad fifo size in defaults (%s).\n", - p); - } - } - } - if (x) { - p = ++x; - while (*p == '\t' || *p == ' ') - p++; - if ((x = strchr(p, '\t')) != NULL) - *x = '\0'; - else if ((x = strchr(p, ' ')) != NULL) - *x = '\0'; - if (strcmp(p, "\"\"") != '\0') { - /* - * Driver opts found. - */ - if (drvoptp && *drvoptp == NULL) - *drvoptp = strsv(p); - } - } - } -} - -LOCAL char * -strsv(s) - char *s; -{ - char *p; - int len = strlen(s); - - p = malloc(len+1); - if (p) - strcpy(p, s); - return (p); -} diff -Nru cdrtools-2.01.01a33/readcd/io.c cdrtools-3.02a09/readcd/io.c --- cdrtools-2.01.01a33/readcd/io.c 2007-06-10 12:14:07.000000000 +0000 +++ cdrtools-3.02a09/readcd/io.c 2010-12-19 18:39:36.000000000 +0000 @@ -1,10 +1,11 @@ -/* @(#)io.c 1.4 07/06/10 Copyright 1988 J. Schilling */ +/* @(#)io.c 1.8 10/12/19 Copyright 1988-2010 J. Schilling */ +#include #ifndef lint -static char sccsid[] = - "@(#)io.c 1.4 07/06/10 Copyright 1988 J. Schilling"; +static UConst char sccsid[] = + "@(#)io.c 1.8 10/12/19 Copyright 1988-2010 J. Schilling"; #endif /* - * Copyright (c) 1988 J. Schilling + * Copyright (c) 1988-2010 J. Schilling */ /* * The contents of this file are subject to the terms of the @@ -19,14 +20,15 @@ */ #include -#include +#include #include #include #include #include #include #include -#include +#include +#include #include "iodefs.h" @@ -73,15 +75,15 @@ /* printf("cvt_std(\"%s\", %d, %d, %d);\n", linep, *lp, mini, maxi);*/ if (linep[0] == '?') { - printf("Enter a number in the range from %ld to %ld\n", + printf(_("Enter a number in the range from %ld to %ld\n"), mini, maxi); - printf("The default radix is 10\n"); - printf("Precede number with '0x' for hexadecimal or with '0' for octal\n"); - printf("Shorthands are:\n"); - printf("\t'^' for minimum value (%ld)\n", mini); - printf("\t'$' for maximum value (%ld)\n", maxi); - printf("\t'+' for incrementing value to %ld\n", *lp + 1); - printf("\t'-' for decrementing value to %ld\n", *lp - 1); + printf(_("The default radix is 10\n")); + printf(_("Precede number with '0x' for hexadecimal or with '0' for octal\n")); + printf(_("Shorthands are:\n")); + printf(_("\t'^' for minimum value (%ld)\n"), mini); + printf(_("\t'$' for maximum value (%ld)\n"), maxi); + printf(_("\t'+' for incrementing value to %ld\n"), *lp + 1); + printf(_("\t'-' for decrementing value to %ld\n"), *lp - 1); return (FALSE); } if (linep[0] == '^' && *skipwhite(&linep[1]) == '\0') { @@ -95,11 +97,11 @@ if (*lp > mini) l = *lp - 1; } else if (*astol(linep, &l)) { - printf("Not a number: '%s'.\n", linep); + printf(_("Not a number: '%s'.\n"), linep); return (FALSE); } if (l < mini || l > maxi) { - printf("'%s' is out of range.\n", linep); + printf(_("'%s' is out of range.\n"), linep); return (FALSE); } *lp = l; @@ -206,13 +208,16 @@ if (getline(okbuf, sizeof (okbuf)) == EOF) exit(EX_BAD); if (okbuf[0] == '?') { - printf("Enter 'y', 'Y', 'yes' or 'YES' if you agree with the previous asked question.\n"); - printf("All other input will be handled as if the question has beed answered with 'no'.\n"); + printf(_("Enter 'y', 'Y', 'yes' or 'YES' if you agree with the previous asked question.\n")); + printf(_("All other input will be handled as if the question has beed answered with 'no'.\n")); goto again; } if (streql(okbuf, "y") || streql(okbuf, "yes") || streql(okbuf, "Y") || streql(okbuf, "YES")) return (TRUE); - else - return (FALSE); +#if defined(USE_NLS) && defined(HAVE_NL_LANGINFO) && defined(YESSTR) + if (streql(okbuf, nl_langinfo(YESSTR))) + return (TRUE); +#endif + return (FALSE); } diff -Nru cdrtools-2.01.01a33/readcd/Makefile cdrtools-3.02a09/readcd/Makefile --- cdrtools-2.01.01a33/readcd/Makefile 2007-04-06 13:45:51.000000000 +0000 +++ cdrtools-3.02a09/readcd/Makefile 2013-04-21 18:10:14.000000000 +0000 @@ -1,4 +1,4 @@ -#ident @(#)readcd.mk 1.10 07/04/06 +#ident @(#)readcd.mk 1.19 13/04/21 ########################################################################### SRCROOT= .. RULESDIR= RULES @@ -7,24 +7,37 @@ INSDIR= bin TARGET= readcd +INSMODE= 4711 +INSUSR= root CPPOPTS += -I../cdrecord +CPPOPTS += -I../libscg CPPOPTS += -I../libedc +CPPOPTS += -I../libcdrdeflt +CPPOPTS += -DREADCD # Signal that we compile readcd CPPOPTS += -DCLONE_WRITE CPPOPTS += -DUSE_LARGEFILES CPPOPTS += -DSCHILY_PRINT +CPPOPTS += -DINS_BASE=\"${INS_BASE}\" +CPPOPTS += -DTEXT_DOMAIN=\"SCHILY_cdrtools\" CFILES= readcd.c cd_misc.c io.c \ scsi_scan.c \ movesect.c \ - defaults.c \ scsi_cdr.c \ scsi_mmc.c \ - modes.c misc.c + misc.c priv.c HFILES= #LIBS= -lschily $(LIB_SOCKET) -LIBS= -lrscg -lscg $(LIB_VOLMGT) -ledc_ecc_dec -ledc_ecc -ldeflt -lschily $(SCSILIB) $(LIB_SOCKET) +# +# LIB_CAP is needed for Linux capability support in librscg. +# +LIBS= -lscgcmd -lrscg -lscg $(LIB_VOLMGT) -ledc_ecc_dec -ledc_ecc -lcdrdeflt -ldeflt -lschily $(SCSILIB) $(LIB_SOCKET) $(LIB_INTL) $(LIB_CAP) XMK_FILE= Mreadcd.man +cd_misc.c scsi_scan.c scsi_cdr.c misc.c priv.c: + @echo " ==> MAKING SYMLINKS in ." && sh ./MKLINKS +$(ALLTARGETS): cd_misc.c scsi_scan.c scsi_cdr.c priv.c + ########################################################################### include $(SRCROOT)/$(RULESDIR)/rules.cmd ########################################################################### diff -Nru cdrtools-2.01.01a33/readcd/misc.c cdrtools-3.02a09/readcd/misc.c --- cdrtools-2.01.01a33/readcd/misc.c 2006-09-13 15:35:12.000000000 +0000 +++ cdrtools-3.02a09/readcd/misc.c 1970-01-01 00:00:00.000000000 +0000 @@ -1,78 +0,0 @@ -/* @(#)misc.c 1.5 06/09/13 Copyright 1998, 2001-2004 J. Schilling */ -#ifndef lint -static char sccsid[] = - "@(#)misc.c 1.5 06/09/13 Copyright 1998, 2001-2004 J. Schilling"; -#endif -/* - * Misc support functions - * - * Copyright (c) 1998, 2001-2004 J. Schilling - */ -/* - * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. - * - * See the file CDDL.Schily.txt in this distribution for details. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file CDDL.Schily.txt from this distribution. - */ - -#include -#include -#include -#include -#include - -EXPORT void timevaldiff __PR((struct timeval *start, struct timeval *stop)); -EXPORT void prtimediff __PR((const char *fmt, - struct timeval *start, - struct timeval *stop)); - -EXPORT void -timevaldiff(start, stop) - struct timeval *start; - struct timeval *stop; -{ - struct timeval tv; - - tv.tv_sec = stop->tv_sec - start->tv_sec; - tv.tv_usec = stop->tv_usec - start->tv_usec; - while (tv.tv_usec > 1000000) { - tv.tv_usec -= 1000000; - tv.tv_sec += 1; - } - while (tv.tv_usec < 0) { - tv.tv_usec += 1000000; - tv.tv_sec -= 1; - } - *stop = tv; -} - -EXPORT void -prtimediff(fmt, start, stop) - const char *fmt; - struct timeval *start; - struct timeval *stop; -{ - struct timeval tv; - - tv.tv_sec = stop->tv_sec - start->tv_sec; - tv.tv_usec = stop->tv_usec - start->tv_usec; - while (tv.tv_usec > 1000000) { - tv.tv_usec -= 1000000; - tv.tv_sec += 1; - } - while (tv.tv_usec < 0) { - tv.tv_usec += 1000000; - tv.tv_sec -= 1; - } - /* - * We need to cast timeval->* to long because - * of the broken sys/time.h in Linux. - */ - printf("%s%4ld.%03lds\n", fmt, (long)tv.tv_sec, (long)tv.tv_usec/1000); - flush(); -} diff -Nru cdrtools-2.01.01a33/readcd/MKLINKS cdrtools-3.02a09/readcd/MKLINKS --- cdrtools-2.01.01a33/readcd/MKLINKS 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/readcd/MKLINKS 2013-04-21 18:10:14.000000000 +0000 @@ -0,0 +1,40 @@ +#!/bin/sh +########################################################################### +#ident "@(#)MKLINKS 1.6 13/04/21 " +########################################################################### +# Written 2008-2011 by J. Schilling +########################################################################### +# Copyright (c) 2008-2011 J. Schilling +########################################################################### +# The contents of this file are subject to the terms of the +# Common Development and Distribution License, Version 1.0 only +# (the "License"). You may not use this file except in compliance +# with the License. +# +# See the file CDDL.Schily.txt in this distribution for details. +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file CDDL.Schily.txt from this distribution. +########################################################################### +symlink="ln -s" +MKLINKS_TEST=${MKLINKS_TEST-:} +if [ ".$MKLINKS_COPY" = '.' ]; then + rm -f xxzzy.123 xxzzy.345 + echo test > xxzzy.123 + $symlink xxzzy.123 xxzzy.345 + test $? = 0 || symlink=cp + test -r xxzzy.345 || symlink=cp + ${MKLINKS_TEST} -h xxzzy.345 || symlink=cp + rm -f xxzzy.123 xxzzy.345 +else + symlink=cp +fi +########################################################################### + +$symlink ../cdrecord/cd_misc.c . +$symlink ../cdrecord/misc.c . +$symlink ../cdrecord/movesect.c . +$symlink ../cdrecord/scsi_cdr.c . +$symlink ../cdrecord/scsi_mmc.c . +$symlink ../cdrecord/scsi_scan.c . +$symlink ../cdrecord/priv.c . diff -Nru cdrtools-2.01.01a33/readcd/modes.c cdrtools-3.02a09/readcd/modes.c --- cdrtools-2.01.01a33/readcd/modes.c 2006-09-13 15:35:12.000000000 +0000 +++ cdrtools-3.02a09/readcd/modes.c 1970-01-01 00:00:00.000000000 +0000 @@ -1,296 +0,0 @@ -/* @(#)modes.c 1.26 06/09/13 Copyright 1988, 1997-2001, 2004 J. Schilling */ -#ifndef lint -static char sccsid[] = - "@(#)modes.c 1.26 06/09/13 Copyright 1988, 1997-2001, 2004 J. Schilling"; -#endif -/* - * SCSI mode page handling - * - * Copyright (c) 1988, 1997-2001, 2004 J. Schilling - */ -/* - * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. - * - * See the file CDDL.Schily.txt in this distribution for details. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file CDDL.Schily.txt from this distribution. - */ - -#include -#include -#include -#include -#include -#include -#include - -#include "cdrecord.h" - -EXPORT int scsi_compliant; - -LOCAL BOOL has_mode_page __PR((SCSI *scgp, int page, char *pagename, int *lenp)); -EXPORT BOOL get_mode_params __PR((SCSI *scgp, int page, char *pagename, - Uchar *modep, Uchar *cmodep, - Uchar *dmodep, Uchar *smodep, - int *lenp)); -EXPORT BOOL set_mode_params __PR((SCSI *scgp, char *pagename, Uchar *modep, - int len, int save, int secsize)); - -#define XXX - -#ifdef XXX -LOCAL BOOL -has_mode_page(scgp, page, pagename, lenp) - SCSI *scgp; - int page; - char *pagename; - int *lenp; -{ - Uchar mode[0x100]; - int hdlen; - int len = 1; /* Nach SCSI Norm */ - int try = 0; - struct scsi_mode_page_header *mp; - - /* - * ATAPI drives (used e.g. by IOMEGA) from y2k have the worst firmware - * I've seen. They create DMA buffer overruns if we request less than - * 3 bytes with 6 byte mode sense which equals 4 byte with 10 byte mode - * sense. In order to prevent repeated bus resets, we remember this - * bug. - * - * IOMEGA claims that they are using Philips clone drives but a Philips - * drive I own does not have the problem. - */ - if ((scgp->dflags & DRF_MODE_DMA_OVR) != 0) - len = sizeof (struct scsi_mode_header); -again: - fillbytes((caddr_t)mode, sizeof (mode), '\0'); - if (lenp) - *lenp = 0; - - scgp->silent++; - (void) unit_ready(scgp); -/* Maxoptix bringt Aborted cmd 0x0B mit code 0x4E (overlapping cmds)*/ - - /* - * The Matsushita CW-7502 will sometimes deliver a zeroed - * mode page 2A if "Page n default" is used instead of "current". - */ - if (mode_sense(scgp, mode, len, page, 0) < 0) { /* Page n current */ - scgp->silent--; - if (len < (int)sizeof (struct scsi_mode_header) && try == 0) { - len = sizeof (struct scsi_mode_header); - goto again; - } - return (FALSE); - } else { - if (len > 1 && try == 0) { - /* - * If we come here, we got a hard failure with the - * fist try. Remember this (IOMEGA USB) firmware bug. - */ - if ((scgp->dflags & DRF_MODE_DMA_OVR) == 0) { - /* XXX if (!nowarn) */ - errmsgno(EX_BAD, - "Warning: controller creates hard SCSI failure when retrieving %s page.\n", - pagename); - scgp->dflags |= DRF_MODE_DMA_OVR; - } - } - len = ((struct scsi_mode_header *)mode)->sense_data_len + 1; - } - /* - * ATAPI drives as used by IOMEGA may receive a SCSI bus device reset - * in between these two mode sense commands. - */ - (void) unit_ready(scgp); - if (mode_sense(scgp, mode, len, page, 0) < 0) { /* Page n current */ - scgp->silent--; - return (FALSE); - } - scgp->silent--; - - if (scgp->verbose) - scg_prbytes("Mode Sense Data", mode, len - scg_getresid(scgp)); - hdlen = sizeof (struct scsi_mode_header) + - ((struct scsi_mode_header *)mode)->blockdesc_len; - mp = (struct scsi_mode_page_header *)(mode + hdlen); - if (scgp->verbose) - scg_prbytes("Mode Page Data", (Uchar *)mp, mp->p_len+2); - - if (mp->p_len == 0) { - if (!scsi_compliant && try == 0) { - len = hdlen; - /* - * add sizeof page header (page # + len byte) - * (should normaly result in len == 14) - * this allowes to work with: - * Quantum Q210S (wants at least 13) - * MD2x (wants at least 4) - */ - len += 2; - try++; - goto again; - } - /* XXX if (!nowarn) */ - errmsgno(EX_BAD, - "Warning: controller returns zero sized %s page.\n", - pagename); - } - if (!scsi_compliant && - (len < (int)(mp->p_len + hdlen + 2))) { - len = mp->p_len + hdlen + 2; - - /* XXX if (!nowarn) */ - errmsgno(EX_BAD, - "Warning: controller returns wrong size for %s page.\n", - pagename); - } - if (mp->p_code != page) { - /* XXX if (!nowarn) */ - errmsgno(EX_BAD, - "Warning: controller returns wrong page %X for %s page (%X).\n", - mp->p_code, pagename, page); - return (FALSE); - } - - if (lenp) - *lenp = len; - return (mp->p_len > 0); -} -#endif - -EXPORT BOOL -get_mode_params(scgp, page, pagename, modep, cmodep, dmodep, smodep, lenp) - SCSI *scgp; - int page; - char *pagename; - Uchar *modep; - Uchar *cmodep; - Uchar *dmodep; - Uchar *smodep; - int *lenp; -{ - int len; - BOOL ret = TRUE; - -#ifdef XXX - if (lenp) - *lenp = 0; - if (!has_mode_page(scgp, page, pagename, &len)) { - if (!scgp->silent) errmsgno(EX_BAD, - "Warning: controller does not support %s page.\n", - pagename); - return (FALSE); - } - if (lenp) - *lenp = len; -#else - if (lenp == 0) - len = 0xFF; -#endif - - if (modep) { - fillbytes(modep, 0x100, '\0'); - scgp->silent++; - (void) unit_ready(scgp); - scgp->silent--; - if (mode_sense(scgp, modep, len, page, 0) < 0) { /* Page x current */ - errmsgno(EX_BAD, "Cannot get %s data.\n", pagename); - ret = FALSE; - } else if (scgp->verbose) { - scg_prbytes("Mode Sense Data", modep, len - scg_getresid(scgp)); - } - } - - if (cmodep) { - fillbytes(cmodep, 0x100, '\0'); - scgp->silent++; - (void) unit_ready(scgp); - scgp->silent--; - if (mode_sense(scgp, cmodep, len, page, 1) < 0) { /* Page x change */ - errmsgno(EX_BAD, "Cannot get %s mask.\n", pagename); - ret = FALSE; - } else if (scgp->verbose) { - scg_prbytes("Mode Sense Data", cmodep, len - scg_getresid(scgp)); - } - } - - if (dmodep) { - fillbytes(dmodep, 0x100, '\0'); - scgp->silent++; - (void) unit_ready(scgp); - scgp->silent--; - if (mode_sense(scgp, dmodep, len, page, 2) < 0) { /* Page x default */ - errmsgno(EX_BAD, "Cannot get default %s data.\n", - pagename); - ret = FALSE; - } else if (scgp->verbose) { - scg_prbytes("Mode Sense Data", dmodep, len - scg_getresid(scgp)); - } - } - - if (smodep) { - fillbytes(smodep, 0x100, '\0'); - scgp->silent++; - (void) unit_ready(scgp); - scgp->silent--; - if (mode_sense(scgp, smodep, len, page, 3) < 0) { /* Page x saved */ - errmsgno(EX_BAD, "Cannot get saved %s data.\n", pagename); - ret = FALSE; - } else if (scgp->verbose) { - scg_prbytes("Mode Sense Data", smodep, len - scg_getresid(scgp)); - } - } - - return (ret); -} - -EXPORT BOOL -set_mode_params(scgp, pagename, modep, len, save, secsize) - SCSI *scgp; - char *pagename; - Uchar *modep; - int len; - int save; - int secsize; -{ - int i; - - ((struct scsi_modesel_header *)modep)->sense_data_len = 0; - ((struct scsi_modesel_header *)modep)->res2 = 0; - - i = ((struct scsi_mode_header *)modep)->blockdesc_len; - if (i > 0) { - i_to_3_byte( - ((struct scsi_mode_data *)modep)->blockdesc.nlblock, - 0); - if (secsize >= 0) - i_to_3_byte(((struct scsi_mode_data *)modep)->blockdesc.lblen, - secsize); - } - - scgp->silent++; - (void) unit_ready(scgp); - scgp->silent--; - if (save == 0 || mode_select(scgp, modep, len, save, scgp->inq->data_format >= 2) < 0) { - scgp->silent++; - (void) unit_ready(scgp); - scgp->silent--; - if (mode_select(scgp, modep, len, 0, scgp->inq->data_format >= 2) < 0) { - if (scgp->silent == 0) { - errmsgno(EX_BAD, - "Warning: using default %s data.\n", - pagename); - scg_prbytes("Mode Select Data", modep, len); - } - return (FALSE); - } - } - return (TRUE); -} diff -Nru cdrtools-2.01.01a33/readcd/movesect.c cdrtools-3.02a09/readcd/movesect.c --- cdrtools-2.01.01a33/readcd/movesect.c 2006-09-13 15:35:12.000000000 +0000 +++ cdrtools-3.02a09/readcd/movesect.c 1970-01-01 00:00:00.000000000 +0000 @@ -1,96 +0,0 @@ -/* @(#)movesect.c 1.4 06/09/13 Copyright 2001, 2004 J. Schilling */ -#ifndef lint -static char sccsid[] = - "@(#)movesect.c 1.4 06/09/13 Copyright 2001, 2004 J. Schilling"; -#endif -/* - * Copyright (c) 2001, 2004 J. Schilling - */ -/* - * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. - * - * See the file CDDL.Schily.txt in this distribution for details. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file CDDL.Schily.txt from this distribution. - */ - -#include -#include -#include -#include - -#include "cdrecord.h" -#include "movesect.h" - -EXPORT void scatter_secs __PR((track_t *trackp, char *bp, int nsecs)); - -/* - * Scatter input sector size records over buffer to make them - * output sector size. - * - * If input sector size is less than output sector size, - * - * | sector_0 || sector_1 || ... || sector_n || - * - * will be convterted into: - * - * | sector_0 |grass|| sector_1 |grass|| ... || sector_n |grass|| - * - * Sector_n must me moved n * grass_size forward, - * Sector_1 must me moved 1 * grass_size forward - * - * - * If output sector size is less than input sector size, - * - * | sector_0 |grass|| sector_1 |grass|| ... || sector_n |grass|| - * - * will be convterted into: - * - * | sector_0 || sector_1 || ... || sector_n || - * - * Sector_1 must me moved 1 * grass_size backward, - * Sector_n must me moved n * grass_size backward, - * - * Sector_0 must never be moved. - */ -EXPORT void -scatter_secs(trackp, bp, nsecs) - track_t *trackp; - char *bp; - int nsecs; -{ - char *from; - char *to; - int isecsize = trackp->isecsize; - int secsize = trackp->secsize; - int i; - - if (secsize == isecsize) - return; - - nsecs -= 1; /* we do not move sector # 0 */ - - if (secsize < isecsize) { - from = bp + isecsize; - to = bp + secsize; - - for (i = nsecs; i > 0; i--) { - movebytes(from, to, secsize); - from += isecsize; - to += secsize; - } - } else { - from = bp + (nsecs * isecsize); - to = bp + (nsecs * secsize); - - for (i = nsecs; i > 0; i--) { - movebytes(from, to, isecsize); - from -= isecsize; - to -= secsize; - } - } -} diff -Nru cdrtools-2.01.01a33/readcd/movesect.h cdrtools-3.02a09/readcd/movesect.h --- cdrtools-2.01.01a33/readcd/movesect.h 2001-06-02 18:24:52.000000000 +0000 +++ cdrtools-3.02a09/readcd/movesect.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,30 +0,0 @@ -/* @(#)movesect.h 1.1 01/06/02 Copyright 2001 J. Schilling */ -/* - * Copyright (c) 2001 J. Schilling - */ -/* - * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. - * - * See the file CDDL.Schily.txt in this distribution for details. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file CDDL.Schily.txt from this distribution. - */ - -#ifndef _MOVESECT_H -#define _MOVESECT_H - -#define move2352(from, to) movebytes(from, to, 2352) -#define move2336(from, to) movebytes(from, to, 2336) -#define move2048(from, to) movebytes(from, to, 2048) - -#define fill2352(p, val) fillbytes(p, 2352, val) -#define fill2048(p, val) fillbytes(p, 2048, val) -#define fill96(p, val) fillbytes(p, 96, val) - -extern void scatter_secs __PR((track_t *trackp, char *bp, int nsecs)); - -#endif diff -Nru cdrtools-2.01.01a33/readcd/readcd.1 cdrtools-3.02a09/readcd/readcd.1 --- cdrtools-2.01.01a33/readcd/readcd.1 2007-08-12 20:27:18.000000000 +0000 +++ cdrtools-3.02a09/readcd/readcd.1 2017-06-06 18:15:16.000000000 +0000 @@ -1,4 +1,4 @@ -.\" @(#)readcd.1 1.27 07/08/12 Copyright 1996-2006 J. Schilling +.\" @(#)readcd.1 1.50 17/06/06 Copyright 1996-2017 J. Schilling .\" .\" The contents of this file are subject to the terms of the .\" Common Development and Distribution License, Version 1.0 only @@ -6,7 +6,9 @@ .\" with the License. .\" .\" See the file CDDL.Schily.txt in this distribution for details. -." +.\" A copy of the CDDL is also available via the Internet at +.\" http://www.opensource.org/licenses/cddl1.txt +.\" .\" When distributing Covered Code, include this CDDL HEADER in each .\" file and include the License file CDDL.Schily.txt from this distribution. .\" @@ -22,9 +24,9 @@ .if n .ds o oe .if n .ds u ue .if n .ds s sz -.TH READCD 1 "Version 2.0" "J\*org Schilling" "Schily\'s USER COMMANDS" +.TH READCD 1 "Version 3.02 2017/06/06" "J\*org Schilling" "Schily\'s USER COMMANDS" .SH NAME -readcd \- read or write data Compact Discs +readcd \- read or write data Compact Discs or related madia .SH SYNOPSIS .B readcd [ @@ -37,11 +39,287 @@ .B Readcd is used to read or write Compact Discs. .PP +.SS "Device naming" +Most users do not need to care about device naming at all. +If no +.B dev= +option was specified, +.B readcd +implements +.B auto target +support and automagically finds the drive in case that exactly +one CD-ROM type drive is available in the system. +In case that more than one CD-ROM type drive exists on the system, +a list of possible device name parameters may be retrieved with +.B "readcd \-scanbus +or from the target example from the output of +.BR "readcd dev=help" , +then the +.B dev= +parameter may be set based on the device listing. +.PP The .I device -refers to +parameter to the +.B dev= +option +explained below refers to the +.B SCSI\ CAM +standard notation for +.IR scsibus / target / lun +of the CD/DVD/BluRay-Recorder. +If a file /etc/default/cdrecord exists, the parameter to the +.B dev= +option may also be a drive name label in said file (see FILES section). + +.SH OPTIONS +.PP +If no options except the +.I dev= +option have been specified, +.B readcd +goes into interactive mode. +Select a primary function and then follow the instructions. +.PP +.SS "Informative options" +.TP +.B \-help +display version information for +.B readcd +on standard output. +.TP +.B \-version +Print version information and exit. +.TP +.B \-v +Increment the level of general verbosity by one. +This is used e.g. to display the progress of the process. +.SS "Readcd functional options" +.TP +.B \-clone +Do a clone read. Read the CD with all sub-channel data and a full TOC. +The full TOC data will be put into a file with similar name as with the +.B f= +option but the suffix +.B .toc +added. +.sp +Note that reading in +.B clone +mode results in having no error correction at sub-channel level. Even in the main data channel, +there is less error correction than with other read modes. This results in a slightly quality +degradation. Avoid copying audio CDs in +.B clone +mode for this reason. +.TP +.B \-c2scan +Scans the whole CD or the range specified by the +.BI sectors= range +for C2 errors. C2 errors are errors that are uncorrectable after the second +stage of the 24/28 + 28/32 Reed Solomon correction system at audio level +(2352 bytes sector size). If an audio CD has C2 errors, interpolation is needed +to hide the errors. If a data CD has C2 errors, these errors are in most +cases corrected by the ECC/EDC code that makes 2352 bytes out of 2048 data +bytes. The ECC/EDC code should be able to correct about 100 C2 error bytes +per sector. +.sp +If you find C2 errors you may want to reduce the speed using the +.B speed= +option as C2 errors may be a result of dynamic unbalance on the medium. +.TP +.B \-cxscan +Scans the whole CD or the range specified by the +.BI sectors= range +for C1/C2/CU errors. +In non-verbose mode, only a summary is printed. +With +.BR \-v , +a line for each non error free second is printed. +with +.BR \-vv , +a line for each second is printed. +This scan method only works for a few drives. +.TP +.B \-edc\-corr +In this mode, +.B readcd +reads CD data sectors in uncorrected audio mode +and then tries to correct the data using the ECC/EDC decoder library +.\" Das Blöde nroff kan nicht mit ß umgehen (speziell ISO-8859-1 vs. UTF-8) +from Heiko Eissfeldt. As this library implements looping over two layers +of error correction, +.B readcd +may be able to correct more data than the firmware of the CD-ROM drive. +.sp +This option is currently experimental and only applicable with +CD media and currently only supports +plain 2048 Byte CD-ROM sectors. +.TP +.BI f= file +Specify the filename where the output should be written or the input should +be taken from. Using '\-' as filename will cause +.B readcd +to use +.BR stdout " resp. " stdin . +.TP +.B \-factor +Output the speed values for +.BR meshpoints= # +as factor based on +.I "single speed +of the current medium. +This only works if +.B readcd +is able to determine the current medium type. +.TP +.B \-fulltoc +Retrieve a full TOC from the current disk and print it in hex. +.TP +.BR meshpoints= # +Print read-speed at # locations. +The purpose of this option is to create a list of read speed values suitable +for e.g. +.BR gnuplot . +The speed values are calculated assuming that 1000 bytes are one kilobyte +as documented in the SCSI standard. +The output data created for this purpose is written to +.IR stdout . +.TP +.B \-nocorr +Switch the drive into a mode where it ignores read errors in data sectors that +are a result of uncorrectable ECC/EDC errors before reading. +If +.B readcd +completes, the error recovery mode of the drive is switched back to the remembered +old mode. +.TP +.B \-noerror +Do not abort if the high level error checking in +.B readcd +found an uncorrectable error in the data stream. +.TP +.B \-notrunc +Do not truncate the output file when opening it. +.TP +.B \-overhead +Meter the SCSI command overhead time. +This is done by executing several commands 1000 times and printing the +total time used. If you divide the displayed times by 1000, you get +the average overhead time for a single command. +.TP +.B \-pi8scan +Scans the whole DVD or the range specified by the +.BI sectors= range +for +.B pisum8 +errors. +In non-verbose mode, only a summary is printed. +With +.BR \-v , +a line for each non error free block of 8 * 32 kB is printed. +with +.BR \-vv , +a line for each block of 8 * 32 kB is printed. +This scan method only works for a few drives. +.TP +.B \-pifscan +Scans the whole DVD or the range specified by the +.BI sectors= range +for +.B pif +errors. +In non-verbose mode, only a summary is printed. +With +.BR \-v , +a line for each non error free block of 32 kB is printed. +with +.BR \-vv , +a line for each block of 32 kB is printed. +This scan method only works for a few drives. +.TP +.B \-plot +This option modified the behavior for +.BR \-cxscan , +.BR \-pi8scan +and +.BR \-pifscan . +The output is better suited for gnuplot. +.TP +.BI retries= # +Set the retry count for high level retries in +.B readcd +to +.IR # . +The default is to do 128 retries which may be too much if you like to read a CD +with many unreadable sectors. +.TP +.BI sectors= range +Specify a sector range that should be read. +The range is specified by the starting sector number, a minus sign and the +ending sector number. +The end sector is not included in the list, so +.BR sectors= 0-0 +will not read anything and may be used to check for a CD in the drive. +.TP +.BR speed= # +Set the speed factor of the read or write process to #. +# is an integer, representing a multiple of the audio speed. +This is about 150 KB/s for CD-ROM and about 172 KB/s for CD-Audio. +If no +.I speed +option is present, +.B readcd +will use maximum speed. +Only MMC compliant drives will benefit from this option. +The speed of non MMC drives is not changed. +.sp +Using a lower speed may increase the readability of a CD or DVD. +.TP +.B \-w +Switch to write mode. +Writing is only possible to DVD-RAM media. For other media, use +.B cdrecord +instead. +Note that +.B cdrecord +also supports to write DVD-RAM media. +.sp +If this option is not present, +.B readcd +reads from the specified device. +.SS "SCSI options" +.TP +.BI dev= target +Set the SCSI target for the CD/DVD/BluRay-Recorder, see notes above. +A typical target device specification is +.BI dev= 1,6,0 +\&. +If a filename must be provided together with the numerical target +specification, the filename is implementation specific. +The correct filename in this case can be found in the system specific +manuals of the target operating system. +On a +.I FreeBSD +system without +.I CAM +support, you need to use the control device (e.g. +.IR /dev/rcd0.ctl ). +A correct device specification in this case may be +.BI dev= /dev/rcd0.ctl:@ +\&. +.sp +.B \h'-2m'General SCSI addressing +.br +The +.I target device +to the +.B dev= +option +refers to the +.B SCSI\ CAM +standard notation for .IR scsibus / target / lun -of the drive. Communication on +of the CD/DVD/BluRay-Recorder. Communication on .I SunOS is done with the SCSI general driver .B scg. @@ -52,7 +330,7 @@ or .B dev= .IR target , lun . -In the latter case, the drive has to be connected to the default +In the latter case, the CD/DVD/BluRay-Recorder has to be connected to the default SCSI bus of the machine. .IR Scsibus , .I target @@ -77,24 +355,51 @@ may be used instead of .B dev= .IR devicename : scsibus , target , lun . - -.PP +.sp +.B \h'-2m'Remote SCSI addressing +.br To access remote SCSI devices, you need to prepend the SCSI device name by a remote device indicator. The remote device indicator is either .BI REMOTE: user@host: or -.BR .BI REMOTE: host: -.br A valid remote SCSI device name may be: .BI REMOTE: user@host: to allow remote SCSI bus scanning or .BI REMOTE: user@host:1,0,0 to access the SCSI device at .I host -connected to SCSI bus # 1,target 0 lun 0. - -.PP +connected to SCSI bus # 1,target 0, lun 0. +In order to allow remote access to a specific +.IR host , +the +.BR rscsi (1) +program needs to be present and configured on the +.IR host . +.sp +.B \h'-2m'Alternate SCSI transports +.br +.B Cdrecord +is completely based on +.B SCSI +commands but this is no problem as all CD/DVD/BluRay writers +ever made use +.B SCSI +commands for the communication. Even +.B ATAPI +drives are just +.B SCSI +drives that inherently use the +.I "ATA packet interface +as +.B SCSI +command transport layer build into the IDE (ATA) transport. +You may need to specify an alternate transport layer on the command line +if your OS does not implement a fully integrated kernel driver subsystem that +allows to access any drive using +.B SCSI +commands via a single unique user interface. +.sp To access SCSI devices via alternate transport layers, you need to prepend the SCSI device name by a transport layer indicator. The transport layer indicator may be something like @@ -104,19 +409,19 @@ To get a list of supported transport layers for your platform, use .B dev= .IR HELP : - -.PP +.sp +.B \h'-2m'Portability Background +.br To make .B readcd portable to all \s-2UNIX\s0 platforms, the syntax .B dev= .IR devicename : scsibus , target , lun -is preferred as is hides OS specific knowledge about device names from the user. -A specific OS must not necessarily support a way to specify a real device file name nor a +is preferred as it hides OS specific knowledge about device names from the user. +A specific OS may not necessarily support a way to specify a real device file name nor a way to specify .IR scsibus , target , lun . - -.PP +.sp .I Scsibus 0 is the default SCSI bus on the machine. Watch the boot messages for more information or look into @@ -127,85 +432,48 @@ should be used, try the .B \-scanbus option of -.BR cdrecord . - -.SH OPTIONS -.PP -If no options except the -.I dev= -option have been specified, .B readcd -goes into interactive mode. -Select a primary function and then follow the instructions. -.PP -.TP -.B \-version -Print version information and exit. -.TP -.BI dev= target -Sets the SCSI target for the drive, see notes above. -A typical device specification is -.BI dev= 6,0 -\&. -If a filename must be provided together with the numerical target -specification, the filename is implementation specific. -The correct filename in this case can be found in the system specific -manuals of the target operating system. -On a -.I FreeBSD -system without -.I CAM -support, you need to use the control device (e.g. -.IR /dev/rcd0.ctl ). -A correct device specification in this case may be -.BI dev= /dev/rcd0.ctl:@ -\&. -.sp -On Linux, drives connected to a parallel port adapter are mapped -to a virtual SCSI bus. Different adapters are mapped to different -targets on this virtual SCSI bus. +described below. .sp +.B \h'-2m'Using logical names for devices +.br If no .I dev option is present, -.B cdrecord +.B readcd will try to get the device from the .B CDR_DEVICE environment. .sp -If the argument to the +If a file /etc/default/cdrecord exists, and +if the argument to the .B dev= -option does not contain the characters ',', '/', '@' or ':', -it is interpreted as an label name that may be found in the file +option +or the +.B CDR_DEVICE +environment +does not contain the characters ',', '/', '@' or ':', +it is interpreted as a device label name that was defined in the file /etc/default/cdrecord (see FILES section). .sp +.B \h'-2m'Autotarget Mode +.br If no .B dev= -option is present, or if the -.B dev= -option only contains a transport specifyer but no address, +option +and no +.B CDR_DEVICE +environment +is present, or if it +only contains a transport specifyer but no address notation, .B readcd tries to scan the SCSI address space for CD-ROM drives. If exactly one is found, this is used by default. .TP -.BI timeout= # -Set the default SCSI command timeout value to -.IR # " seconds. -The default SCSI command timeout is the minimum timeout used for sending -SCSI commands. -If a SCSI command fails due to a timeout, you may try to raise the -default SCSI command timeout above the timeout value of the failed command. -If the command runs correctly with a raised command timeout, -please report the better timeout value and the corresponding command to -the author of the program. -If no -.I timeout -option is present, a default timeout of 40 seconds is used. -.TP -.BI debug= "#, " -d +.BI debug= "#, " \-d Set the misc debug value to # (with debug=#) or increment -the misc debug level by one (with -d). If you specify -.I -dd, +the misc debug level by one (with \-d). If you specify +.I \-dd, this equals to .BI debug= 2. This may help to find problems while opening a driver for libscg. @@ -219,105 +487,6 @@ .BR scg -driver to modify the kernel debug value while SCSI commands are running. .TP -.BR \-silent ", " \-s -Do not print out a status report for failed SCSI commands. -.TP -.B \-v -Increment the level of general verbosity by one. -This is used e.g. to display the progress of the process. -.TP -.B \-V -Increment the verbose level with respect of SCSI command transport by one. -This helps to debug problems -during the process, that occur in the CD-Recorder. -If you get incomprehensible error messages you should use this flag -to get more detailed output. -.B \-VV -will show data buffer content in addition. -Using -.B \-V -or -.B \-VV -slows down the process. -.TP -.BI f= file -Specify the filename where the output should be written or the inout should -be taken from. Using '-' as filename will cause -.B readcd -to use -.BR stdout " resp. " stdin . -.TP -.B \-w -Switch to write mode. If this option is not present, -.B readcd -reads from the specified device. -.TP -.B \-c2scan -Scans the whole CD or the range specified by the -.BI sectors= range -for C2 errors. C2 errors are errors that are uncorrectable after the second -stage of the 24/28 + 28/32 Reed Solomon correction system at audio level -(2352 bytes sector size). If an audio CD has C2 errors, interpolation is needed -to hide the errors. If a data CD has C2 errors, these errors are in most -cases corrected by the ECC/EDC code that makes 2352 bytes out of 2048 data -bytes. The ECC/EDC code should be able to correct about 100 C2 error bytes -per sector. -.sp -If you find C2 errors you may want to reduce the speed using the -.B speed= -option as C2 errors may be a result of dynamic unbalance on the medium. -.TP -.B \-cxscan -Scans the whole CD or the range specified by the -.BI sectors= range -for C1/C2/CU errors. -In non-verbose mode, only a summary is printed. -With -.BR \-v , -a line for each non error free second is printed. -with -.BR \-vv , -a line for each second is printed. -This scan method only works for a few drives. -.TP -.B \-pi8scan -Scans the whole DVD or the range specified by the -.BI sectors= range -for -.B pisum8 -errors. -In non-verbose mode, only a summary is printed. -With -.BR \-v , -a line for each non error free block of 8 * 32 kB is printed. -with -.BR \-vv , -a line for each block of 8 * 32 kB is printed. -This scan method only works for a few drives. -.TP -.B \-pifscan -Scans the whole DVD or the range specified by the -.BI sectors= range -for -.B pif -errors. -In non-verbose mode, only a summary is printed. -With -.BR \-v , -a line for each non error free block of 32 kB is printed. -with -.BR \-vv , -a line for each block of 32 kB is printed. -This scan method only works for a few drives. -.TP -.B \-plot -This option modified the behavior for -.BR \-cxscan , -.BR \-pi8scan -and -.BR \-pifscan . -The output is better suited for gnuplot. -.TP .B \-scanbus Scan all SCSI devices on all SCSI busses and print the inquiry strings. This option may be used to find SCSI address of the @@ -325,27 +494,29 @@ The numbers printed out as labels are computed by: .B "bus * 100 + target .TP -.BI sectors= range -Specify a sector range that should be read. -The range is specified by the starting sector number, a minus sign and the -ending sector number. -The end sector is not included in the list, so -.BR sectors= 0-0 -will not read anything and may be used to check for a CD in the drive. +.BI scgopts= list +A comma separated list of SCSI options that are handled by libscg. +The implemented options may be uptated indepentendly from applications. +Currently, one option: +.B ignore\-resid +is supported to work around a Linux kernel bug. .TP -.BR speed= # -Set the speed factor of the read or write process to #. -# is an integer, representing a multiple of the audio speed. -This is about 150 KB/s for CD-ROM and about 172 KB/s for CD-Audio. +.BR \-silent ", " \-s +Do not print out a status report for failed SCSI commands. +.TP +.BI timeout= # +Set the default SCSI command timeout value to +.IR # " seconds. +The default SCSI command timeout is the minimum timeout used for sending +SCSI commands. +If a SCSI command fails due to a timeout, you may try to raise the +default SCSI command timeout above the timeout value of the failed command. +If the command runs correctly with a raised command timeout, +please report the better timeout value and the corresponding command to +the author of the program. If no -.I speed -option is present, -.B readcd -will use maximum speed. -Only MMC compliant drives will benefit from this option. -The speed of non MMC drives is not changed. -.sp -Using a lower speed may increase the readability of a CD or DVD. +.I timeout +option is present, a default timeout of 40 seconds is used. .TP .BR ts= # Set the maximum transfer size for a single SCSI command to #. @@ -366,66 +537,19 @@ .B ts= option. .TP -.B \-notrunc -Do not truncate the output file when opening it. -.TP -.B \-fulltoc -Retrieve a full TOC from the current disk and print it in hex. -.TP -.B \-clone -Do a clone read. Read the CD with all sub-channel data and a full TOC. -The full TOC data will be put into a file with similar name as with the -.B f= -option but the suffix -.B .toc -added. -.TP -.B \-noerror -Do not abort if the high level error checking in -.B readcd -found an uncorrectable error in the data stream. -.TP -.B \-nocorr -Switch the drive into a mode where it ignores read errors in data sectors that -are a result of uncorrectable ECC/EDC errors before reading. -If -.B readcd -completes, the error recovery mode of the drive is switched back to the remembered -old mode. -.TP -.BI retries= # -Set the retry count for high level retries in -.B readcd -to -.IR # . -The default is to do 128 retries which may be too much if you like to read a CD -with many unreadable sectors. -.TP -.B \-overhead -Meter the SCSI command overhead time. -This is done by executing several commands 1000 times and printing the -total time used. If you divide the displayed times by 1000, you get -the average overhead time for a single command. -.TP -.BR meshpoints= # -Print read-speed at # locations. -The purpose of this option is to create a list of read speed values suitable -for e.g. -.BR gnuplot . -The speed values are calculated assuming that 1000 bytes are one kilobyte -as documented in the SCSI standard. -The ouput data created for this purpose is written to -.IR stdout . -.TP -.B \-factor -Output the speed values for -.BR meshpoints= # -as factor based on -.I "single speed -of the current medium. -This only works if -.B readcd -is able to determine the current medium type. +.B \-V +Increment the verbose level with respect of SCSI command transport by one. +This helps to debug problems +during the process, that occur in the CD-Recorder. +If you get incomprehensible error messages you should use this flag +to get more detailed output. +.B \-VV +will show data buffer content in addition. +Using +.B \-V +or +.B \-VV +slows down the process. .SH EXAMPLES .PP For all examples below, it will be assumed that the drive is @@ -448,7 +572,7 @@ .BR mkisofs ) to a DVD-RAM, call: .PP - readcd dev=2,0 -w f=cdimage.raw + readcd dev=2,0 \-w f=cdimage.raw .SH ENVIRONMENT .TP @@ -487,10 +611,36 @@ Note that the remote SCSI server program name will be ignored if you log in using an account that has been created with a remote SCSI server program as login shell. +.SH EXIT STATUS +The following exit codes are used: +.TP +.B 0 +No error appeared. +.TP +.B \-1 +A specific error appeared. This may be a usage error caused by an illegal command line +or another error with a problem specific error message from +.BR readcd . +.TP +.B \-2 +An unspecified error appeared during the process of talking to the drive. +See SCSI error message for more informations. The section +.B DIAGNOSTICS +below contains an explanation on how to read SCSI error messages. +.LP +Note that older operating systems and older shells may not support the full 32 bit +range of the exit code +and mask the value with 0xFF. This results in shortened exit codes in the range +.BR 0 .. 255 +where +.B \-1 +is mapped to +.BR 255 . + .SH FILES .SH SEE ALSO .BR cdrecord (1), -.BR mkisofs (1), +.BR mkisofs (8), .BR scg (7), .BR fbk (7), .BR rcmd (3), @@ -538,14 +688,15 @@ .PP When using .B readcd -with the broken +with the .B "Linux SCSI generic driver." You should note that .B readcd -uses a hack, that tries to emulate the functionality of the scg driver. +uses a layer, that tries to emulate the functionality of the scg driver +on top of the drives of the local operating system. Unfortunately, the sg driver on .B Linux -has several severe bugs: +has several flaws: .TP \(bu It cannot see if a SCSI command could not be sent at all. @@ -633,20 +784,10 @@ .SH "MAILING LISTS If you want to actively take part on the development of cdrecord, -you may join the cdwriting mailing list by sending mail to: -.nf -.sp - other-cdwrite-request@lists.debian.org +you may join the developer mailing list via this URL: .sp -.fi -and include the word -.I subscribe -in the body. -The mail address of the list is: -.nf -.sp - cdwrite@lists.debian.org -.fi +.B +https://lists.sourceforge.net/lists/listinfo/cdrtools-developers .SH AUTHOR .nf @@ -658,31 +799,42 @@ .PP Additional information can be found on: .br -http://www.fokus.fhg.de/usr/schilling/cdrecord.html +http://cdrecord.org/private/cdrecord.html .PP If you have support questions, send them to: .PP .B -cdrecord-support@berlios.de -.br -or -.B -other-cdwrite@lists.debian.org +cdrtools-support@lists.sourceforge.net .PP If you have definitely found a bug, send a mail to: .PP .B -cdrecord-developers@berlios.de +cdrtools-developers@lists.sourceforge.net .br or .B -schilling@fokus.fhg.de +joerg.schilling@fokus.fraunhofer.de .PP To subscribe, use: .PP .B -http://lists.berlios.de/mailman/listinfo/cdrecord-developers +https://lists.sourceforge.net/lists/listinfo/cdrtools-developers .br or .B -http://lists.berlios.de/mailman/listinfo/cdrecord-support +https://lists.sourceforge.net/lists/listinfo/cdrtools-support +.br +.ne 7 +.SH "INTERFACE STABILITY +The interfaces provided by +.B readcd +are designed for long term stability. +As +.B readcd +depends on interfaces provided by the underlying operating system, +the stability of the interfaces offered by +.B readcd +depends on the interface stability of the OS interfaces. +Modified interfaces in the OS may enforce modified interfaces +in +.BR readcd . diff -Nru cdrtools-2.01.01a33/readcd/readcd.c cdrtools-3.02a09/readcd/readcd.c --- cdrtools-2.01.01a33/readcd/readcd.c 2007-08-12 20:45:39.000000000 +0000 +++ cdrtools-3.02a09/readcd/readcd.c 2016-01-24 16:15:19.000000000 +0000 @@ -1,12 +1,13 @@ -/* @(#)readcd.c 1.94 07/08/12 Copyright 1987, 1995-2007 J. Schilling */ +/* @(#)readcd.c 1.127 16/01/24 Copyright 1987, 1995-2016 J. Schilling */ +#include #ifndef lint -static char sccsid[] = - "@(#)readcd.c 1.94 07/08/12 Copyright 1987, 1995-2007 J. Schilling"; +static UConst char sccsid[] = + "@(#)readcd.c 1.127 16/01/24 Copyright 1987, 1995-2016 J. Schilling"; #endif /* * Skeleton for the use of the scg genearal SCSI - driver * - * Copyright (c) 1987, 1995-2007 J. Schilling + * Copyright (c) 1987, 1995-2016 J. Schilling */ /* * The contents of this file are subject to the terms of the @@ -15,13 +16,15 @@ * with the License. * * See the file CDDL.Schily.txt in this distribution for details. + * A copy of the CDDL is also available via the Internet at + * http://www.opensource.org/licenses/cddl1.txt * * When distributing Covered Code, include this CDDL HEADER in each * file and include the License file CDDL.Schily.txt from this distribution. */ #include -#include +#include #include #include #include @@ -29,15 +32,11 @@ #include #include #include -#include +#include #include -#ifdef HAVE_PRIV_H -#include -#endif - -#ifdef NEED_O_BINARY -#include /* for setmode() prototype */ -#endif +#include +#include +#include /* for setmode() prototype */ #include #include @@ -47,7 +46,7 @@ #include "scsimmc.h" #define qpto96 __nothing__ #include "cdrecord.h" -#include "defaults.h" +#include "cdrdeflt.h" #undef qpto96 #include "movesect.h" @@ -114,6 +113,7 @@ one_interval_func_t one_interval_func; } cx_scan_procedure_t; +LOCAL BOOL mmc_isplextor __PR((SCSI* scgp)); LOCAL int plextor_init_cx_scan __PR((SCSI* scgp)); LOCAL int plextor_init_pi8_scan __PR((SCSI* scgp)); LOCAL int plextor_init_pif_scan __PR((SCSI* scgp)); @@ -130,13 +130,13 @@ * Currently, Plextor and NEC cx scanning is supported */ cx_scan_procedure_t cx_scan_procedures[] = { - { plextor_init_cx_scan, - plextor_end_scan, - plextor_scan_one_interval }, - - { nec_init_cx_scan, - nec_end_scan, - nec_scan_one_interval }, + { plextor_init_cx_scan, + plextor_end_scan, + plextor_scan_one_interval }, + + { nec_init_cx_scan, + nec_end_scan, + nec_scan_one_interval }, { NULL } }; @@ -146,6 +146,7 @@ int old_secsize; int flags; int exflags; + int excode; char oerr[3]; } exargs; @@ -158,7 +159,9 @@ LOCAL int find_drive __PR((SCSI *scgp, char *dev)); LOCAL void intr __PR((int sig)); LOCAL void exscsi __PR((int excode, void *arg)); +#ifdef __needed__ LOCAL void excdr __PR((int excode, void *arg)); +#endif LOCAL int prstats __PR((void)); LOCAL int prstats_silent __PR((void)); LOCAL void dorw __PR((SCSI *scgp, char *filename, char *sectors)); @@ -226,6 +229,7 @@ LOCAL void ovtime __PR((SCSI *scgp)); LOCAL void add_bad __PR((long addr)); LOCAL void print_bad __PR((void)); +LOCAL void priv_warn __PR((const char *what, const char *msg)); struct timeval starttime; struct timeval stoptime; @@ -233,7 +237,7 @@ int exsig; char *Sbuf; -long Sbufsize; +long Sbufsize = -1L; /*#define MAX_RETRY 32*/ #define MAX_RETRY 128 @@ -273,49 +277,50 @@ usage(ret) int ret; { - error("Usage:\treadcd [options]\n"); - error("options:\n"); - error("\t-version print version information and exit\n"); - error("\tdev=target SCSI target to use\n"); - error("\tf=filename Name of file to read/write\n"); - error("\tsectors=range Range of sectors to read/write\n"); - error("\tspeed=# set speed of drive (MMC only)\n"); - error("\tts=# set maximum transfer size for a single SCSI command\n"); - error("\t-w Switch to write mode\n"); - error("\t-c2scan Do a C2 error scan\n"); - error("\t-cxscan Do a C1/C2/CU scan (only available on a few drives)\n"); - error("\t-pi8scan Do a DVD pisum8 scan (only available on a few drives)\n"); - error("\t-pifscan Do a DVD pif scan (only available on a few drives)\n"); - error("\t-plot Print data suitable for gnuplot\n"); + error(_("Usage:\treadcd [options]\n")); + error(_("Options:\n")); + error(_("\t-version print version information and exit\n")); + error(_("\tdev=target SCSI target to use\n")); + error(_("\tscgopts=spec SCSI options for libscg\n")); + error(_("\tf=filename Name of file to read/write\n")); + error(_("\tsectors=range Range of sectors to read/write\n")); + error(_("\tspeed=# set speed of drive (MMC only)\n")); + error(_("\tts=# set maximum transfer size for a single SCSI command\n")); + error(_("\t-w Switch to write mode\n")); + error(_("\t-c2scan Do a C2 error scan\n")); + error(_("\t-cxscan Do a C1/C2/CU scan (only available on a few drives)\n")); + error(_("\t-pi8scan Do a DVD pisum8 scan (only available on a few drives)\n")); + error(_("\t-pifscan Do a DVD pif scan (only available on a few drives)\n")); + error(_("\t-plot Print data suitable for gnuplot\n")); #ifdef CLONE_WRITE - error("\t-fulltoc Retrieve the full TOC\n"); - error("\t-clone Retrieve the full TOC and all data\n"); - error("\t-edc-corr Try to do user level Reed Solomon repair (experimental)\n"); -#endif - error("\ttimeout=# set the default SCSI command timeout to #.\n"); - error("\tdebug=#,-d Set to # or increment misc debug level\n"); - error("\tkdebug=#,kd=# do Kernel debugging\n"); - error("\t-quiet,-q be more quiet in error retry mode\n"); - error("\t-verbose,-v increment general verbose level by one\n"); - error("\t-Verbose,-V increment SCSI command transport verbose level by one\n"); - error("\t-silent,-s do not print status of failed SCSI commands\n"); - error("\t-scanbus scan the SCSI bus and exit\n"); - error("\t-noerror do not abort on error\n"); + error(_("\t-fulltoc Retrieve the full TOC\n")); + error(_("\t-clone Retrieve the full TOC and all data\n")); + error(_("\t-edc-corr Try to do user level Reed Solomon repair (experimental)\n")); +#endif + error(_("\ttimeout=# set the default SCSI command timeout to #.\n")); + error(_("\tdebug=#,-d Set to # or increment misc debug level\n")); + error(_("\tkdebug=#,kd=# do Kernel debugging\n")); + error(_("\t-quiet,-q be more quiet in error retry mode\n")); + error(_("\t-verbose,-v increment general verbose level by one\n")); + error(_("\t-Verbose,-V increment SCSI command transport verbose level by one\n")); + error(_("\t-silent,-s do not print status of failed SCSI commands\n")); + error(_("\t-scanbus scan the SCSI bus and exit\n")); + error(_("\t-noerror do not abort on error\n")); #ifdef CLONE_WRITE - error("\t-nocorr do not apply error correction in drive\n"); + error(_("\t-nocorr do not apply error correction in drive\n")); #endif - error("\t-notrunc do not truncate outputfile in read mode\n"); - error("\tretries=# set retry count (default is %d)\n", retries); - error("\t-overhead meter SCSI command overhead times\n"); - error("\tmeshpoints=# print read-speed at # locations\n"); - error("\t-factor try to use speed factor with meshpoints=# if possible\n"); + error(_("\t-notrunc do not truncate outputfile in read mode\n")); + error(_("\tretries=# set retry count (default is %d)\n"), retries); + error(_("\t-overhead meter SCSI command overhead times\n")); + error(_("\tmeshpoints=# print read-speed at # locations\n")); + error(_("\t-factor try to use speed factor with meshpoints=# if possible\n")); error("\n"); - error("sectors=0-0 will read nothing, sectors=0-1 will read one sector starting from 0\n"); + error(_("sectors=0-0 will read nothing, sectors=0-1 will read one sector starting from 0\n")); exit(ret); } /* CSTYLED */ -char opts[] = "debug#,d+,kdebug#,kd#,timeout#,quiet,q,verbose+,v+,Verbose+,V+,x+,xd#,silent,s,help,h,version,scanbus,dev*,sectors*,w,c2scan,cxscan,pi8scan,pifscan,plot,fulltoc,clone,edc-corr,noerror,nocorr,notrunc,retries#,factor,f*,speed#,ts&,overhead,meshpoints#"; +char opts[] = "debug#,d+,kdebug#,kd#,timeout#,quiet,q,verbose+,v+,Verbose+,V+,x+,xd#,silent,s,help,h,version,scanbus,dev*,scgopts*,sectors*,w,c2scan,cxscan,pi8scan,pifscan,plot,fulltoc,clone,edc-corr,noerror,nocorr,notrunc,retries#,factor,f*,speed#,ts&,overhead,meshpoints#"; EXPORT int main(ac, av) @@ -323,9 +328,13 @@ char *av[]; { char *dev = NULL; + char *scgopts = NULL; int fcount; int cac; char * const *cav; +#if defined(USE_NLS) + char *dir; +#endif int scsibus = -1; int target = -1; int lun = -1; @@ -342,8 +351,36 @@ char *filename = NULL; char *sectors = NULL; +#ifdef HAVE_SOLARIS_PPRIV + /* + * Try to gain additional privs on Solaris + */ + do_pfexec(ac, av, + PRIV_FILE_DAC_READ, + PRIV_SYS_DEVICES, + PRIV_NET_PRIVADDR, + NULL); +#endif save_args(ac, av); +#if defined(USE_NLS) + (void) setlocale(LC_ALL, ""); +#if !defined(TEXT_DOMAIN) /* Should be defined by cc -D */ +#define TEXT_DOMAIN "cdrecord" /* Use this only if it weren't */ +#endif + dir = searchfileinpath("share/locale", F_OK, + SIP_ANY_FILE|SIP_NO_PATH, NULL); + if (dir) + (void) bindtextdomain(TEXT_DOMAIN, dir); + else +#if defined(PROTOTYPES) && defined(INS_BASE) + (void) bindtextdomain(TEXT_DOMAIN, INS_BASE "/share/locale"); +#else + (void) bindtextdomain(TEXT_DOMAIN, "/usr/share/locale"); +#endif + (void) textdomain(TEXT_DOMAIN); +#endif + cac = --ac; cav = ++av; @@ -357,7 +394,7 @@ &xdebug, &xdebug, &silent, &silent, &help, &help, &pversion, - &scanbus, &dev, §ors, &do_write, + &scanbus, &dev, &scgopts, §ors, &do_write, &c2scan, &cxscan, &pi8scan, &pifscan, &plot, &fulltoc, &clone, @@ -366,15 +403,16 @@ ¬runc, &retries, &do_factor, &filename, &speed, getnum, &Sbufsize, &dooverhead, &meshpoints) < 0) { - errmsgno(EX_BAD, "Bad flag: %s.\n", cav[0]); + errmsgno(EX_BAD, _("Bad flag: %s.\n"), cav[0]); usage(EX_BAD); } if (help) usage(0); if (pversion) { - printf("readcd %s (%s-%s-%s) Copyright (C) 1987, 1995-2007 Jörg Schilling\n", + printf(_("readcd %s (%s-%s-%s) Copyright (C) 1987, 1995-2016 %s\n"), cdr_version, - HOST_CPU, HOST_VENDOR, HOST_OS); + HOST_CPU, HOST_VENDOR, HOST_OS, + _("Joerg Schilling")); exit(0); } @@ -387,7 +425,7 @@ if (fcount == 1) { if (*astoi(cav[0], &target) != '\0') { errmsgno(EX_BAD, - "Target '%s' is not a Number.\n", + _("Target '%s' is not a Number.\n"), cav[0]); usage(EX_BAD); /* NOTREACHED */ @@ -396,7 +434,7 @@ if (fcount == 2) { if (*astoi(cav[0], &lun) != '\0') { errmsgno(EX_BAD, - "Lun is '%s' not a Number.\n", + _("Lun is '%s' not a Number.\n"), cav[0]); usage(EX_BAD); /* NOTREACHED */ @@ -405,7 +443,7 @@ if (fcount == 3) { if (*astoi(cav[0], &scsibus) != '\0') { errmsgno(EX_BAD, - "Scsibus is '%s' not a Number.\n", + _("Scsibus is '%s' not a Number.\n"), cav[0]); usage(EX_BAD); /* NOTREACHED */ @@ -414,9 +452,35 @@ cac--; cav++; } + + /* + * The following scg_open() call needs more privileges, so we check for + * sufficient privileges here. + * The check has been introduced as some Linux distributions miss the + * skills to perceive the necessity for the needed privileges. So we + * warn which features are impaired by actually missing privileges. + */ + if (!priv_eff_priv(SCHILY_PRIV_FILE_DAC_READ)) + priv_warn("file read", "You will not be able to open all needed devices."); +#ifndef __SUNOS5 + /* + * Due to a design bug in the Solaris USCSI ioctl, we don't need + * PRIV_FILE_DAC_WRITE to send SCSI commands and most installations + * probably don't grant PRIV_FILE_DAC_WRITE. Once we need /dev/scg*, + * we would need to test for PRIV_FILE_DAC_WRITE also. + */ + if (!priv_eff_priv(SCHILY_PRIV_FILE_DAC_WRITE)) + priv_warn("file write", "You will not be able to open all needed devices."); +#endif + if (!priv_eff_priv(SCHILY_PRIV_SYS_DEVICES)) + priv_warn("device", + "You may not be able to send all needed SCSI commands, this my cause various unexplainable problems."); + if (!priv_eff_priv(SCHILY_PRIV_NET_PRIVADDR)) + priv_warn("network", "You will not be able to do remote SCSI."); + /*error("dev: '%s'\n", dev);*/ if (!scanbus) - cdr_defaults(&dev, NULL, NULL, NULL); + cdr_defaults(&dev, NULL, NULL, &Sbufsize, NULL); if (debug) { printf("dev: '%s'\n", dev); } @@ -458,7 +522,12 @@ scg_settarget(scgp, scsibus, target, lun); if (scg__open(scgp, NULL) <= 0) - comerr("Cannot open SCSI driver.\n"); + comerr(_("Cannot open SCSI driver.\n")); + } + if (scgopts) { + int i = scg_opts(scgp, scgopts); + if (i <= 0) + exit(i < 0 ? EX_BAD : 0); } scgp->silent = silent; scgp->verbose = verbose; @@ -466,34 +535,35 @@ scgp->kdebug = kdebug; scg_settimeout(scgp, deftimeout); - if (Sbufsize == 0) + if (Sbufsize < 0) Sbufsize = 256*1024L; Sbufsize = scg_bufsize(scgp, Sbufsize); if ((Sbuf = scg_getbuf(scgp, Sbufsize)) == NULL) - comerr("Cannot get SCSI I/O buffer.\n"); + comerr(_("Cannot get SCSI I/O buffer.\n")); -#ifdef HAVE_PRIV_SET - is_suid = priv_ineffect(PRIV_FILE_DAC_READ) && - !priv_ineffect(PRIV_PROC_SETID); /* - * Give up privs we do not need anymore. - * We no longer need: - * file_dac_read,net_privaddr - * We still need: - * sys_devices + * Did we get our privs from suid? */ - priv_set(PRIV_OFF, PRIV_EFFECTIVE, - PRIV_FILE_DAC_READ, PRIV_NET_PRIVADDR, NULL); - priv_set(PRIV_OFF, PRIV_PERMITTED, - PRIV_FILE_DAC_READ, PRIV_NET_PRIVADDR, NULL); - priv_set(PRIV_OFF, PRIV_INHERITABLE, - PRIV_FILE_DAC_READ, PRIV_NET_PRIVADDR, PRIV_SYS_DEVICES, NULL); -#endif + is_suid = priv_from_priv(); /* * This is only for OS that do not support fine grained privs. */ - if (!is_suid) + if (!is_suid) { +#ifdef HAVE_ISSETUGID + is_suid = issetugid(); +#else is_suid = geteuid() != getuid(); +#endif + } + /* + * Drop privs we do not need anymore. + * We no longer need: + * file_dac_read,net_privaddr + * We still need: + * sys_devices + */ + if (is_suid || getuid() != 0) + priv_drop(); /* * We don't need root privilleges anymore. */ @@ -506,7 +576,7 @@ if (setuid(getuid()) < 0) #endif #endif - comerr("Panic cannot set back effective uid.\n"); + comerr(_("Panic cannot set back effective uid.\n")); /* code to use SCG */ @@ -577,15 +647,17 @@ speed = 0xFFFF; scsi_set_speed(scgp, speed, speed, ROTCTL_CLV); if (scsi_get_speed(scgp, &rspeed, &wspeed) >= 0) { - error("Read speed: %5d kB/s (CD %3dx, DVD %2dx, BD %2dx).\n", + error(_("Read speed: %5d kB/s (CD %3dx, DVD %2dx, BD %2dx).\n"), rspeed, rspeed/176, rspeed/1385, rspeed/4495); - error("Write speed: %5d kB/s (CD %3dx, DVD %2dx, BD %2dx).\n", + error(_("Write speed: %5d kB/s (CD %3dx, DVD %2dx, BD %2dx).\n"), wspeed, wspeed/176, wspeed/1385, wspeed/4495); } } exargs.scgp = scgp; exargs.old_secsize = -1; /* exargs.flags = flags;*/ + exargs.exflags = 0; + exargs.excode = 0; exargs.oerr[2] = 0; /* @@ -602,7 +674,7 @@ if (is_suid) { if (scgp->inq->type != INQ_ROMD) - comerrno(EX_BAD, "Not root. Will only work on CD-ROM in suid/priv mode\n"); + comerrno(EX_BAD, _("Not root. Will only work on CD-ROM in suid/priv mode\n")); } if (filename || sectors || c2scan || cxscan || pi8scan || pifscan || @@ -612,8 +684,8 @@ } else { doit(scgp); } - comexit(0); - return (0); + comexit(exargs.excode); + return (exargs.excode); } LOCAL void @@ -622,10 +694,10 @@ { int err = geterrno(); - errmsgno(err, "%s%sCannot open or use SCSI driver.\n", errstr, errstr[0]?". ":""); - errmsgno(EX_BAD, "For possible targets try 'readcd -scanbus'.%s\n", - geteuid() ? " Make sure you are root.":""); - errmsgno(EX_BAD, "For possible transport specifiers try 'readcd dev=help'.\n"); + errmsgno(err, _("%s%sCannot open or use SCSI driver.\n"), errstr, errstr[0]?". ":""); + errmsgno(EX_BAD, _("For possible targets try 'readcd -scanbus'.%s\n"), + geteuid() ? _(" Make sure you are root."):""); + errmsgno(EX_BAD, _("For possible transport specifiers try 'readcd dev=help'.\n")); exit(err); } @@ -636,7 +708,7 @@ { int ntarget; - error("No target specified, trying to find one...\n"); + error(_("No target specified, trying to find one...\n")); ntarget = find_target(scgp, INQ_ROMD, -1); if (ntarget < 0) return (ntarget); @@ -654,16 +726,16 @@ /* * No single CD-ROM or WORM found. */ - errmsgno(EX_BAD, "No CD/DVD/BD-Recorder target found.\n"); - errmsgno(EX_BAD, "Your platform may not allow to scan for SCSI devices.\n"); - comerrno(EX_BAD, "Call 'readcd dev=help' or ask your sysadmin for possible targets.\n"); + errmsgno(EX_BAD, _("No CD/DVD/BD-Recorder target found.\n")); + errmsgno(EX_BAD, _("Your platform may not allow to scan for SCSI devices.\n")); + comerrno(EX_BAD, _("Call 'readcd dev=help' or ask your sysadmin for possible targets.\n")); } else { - errmsgno(EX_BAD, "Too many CD/DVD/BD-Recorder targets found.\n"); + errmsgno(EX_BAD, _("Too many CD/DVD/BD-Recorder targets found.\n")); select_target(scgp, stdout); - comerrno(EX_BAD, "Select a target from the list above and use 'readcd dev=%s%sb,t,l'.\n", + comerrno(EX_BAD, _("Select a target from the list above and use 'readcd dev=%s%sb,t,l'.\n"), dev?dev:"", dev?(dev[strlen(dev)-1] == ':'?"":":"):""); } - error("Using dev=%s%s%d,%d,%d.\n", + error(_("Using dev=%s%s%d,%d,%d.\n"), dev?dev:"", dev?(dev[strlen(dev)-1] == ':'?"":":"):"", scg_scsibus(scgp), scg_target(scgp), scg_lun(scgp)); return (ntarget); @@ -701,7 +773,7 @@ break; if (i == 10) { errmsgno(EX_BAD, - "Waiting for current SCSI command to finish.\n"); + _("Waiting for current SCSI command to finish.\n")); } usleep(100000); } @@ -717,6 +789,7 @@ } } +#ifdef __needed__ LOCAL void excdr(excode, arg) int excode; @@ -728,6 +801,7 @@ /* Do several other restores/statistics here (see cdrecord.c) */ #endif } +#endif /* * Return milliseconds since start time. @@ -740,7 +814,7 @@ int tmsec; if (gettimeofday(&stoptime, (struct timezone *)0) < 0) - comerr("Cannot get time\n"); + comerr(_("Cannot get time\n")); sec = stoptime.tv_sec - starttime.tv_sec; usec = stoptime.tv_usec - starttime.tv_usec; @@ -753,7 +827,7 @@ usec += 1000000; } - error("Time total: %d.%03dsec\n", sec, usec/1000); + error(_("Time total: %d.%03dsec\n"), sec, usec/1000); return (1000*sec + (usec / 1000)); } @@ -768,7 +842,7 @@ int tmsec; if (gettimeofday(&stoptime, (struct timezone *)0) < 0) - comerr("Cannot get time\n"); + comerr(_("Cannot get time\n")); sec = stoptime.tv_sec - starttime.tv_sec; usec = stoptime.tv_usec - starttime.tv_usec; @@ -810,10 +884,10 @@ if (p && *p == '-') p = astol(++p, ¶ms.end); if (p && *p != '\0') - comerrno(EX_BAD, "Not a valid sector range '%s'\n", sectors); + comerrno(EX_BAD, _("Not a valid sector range '%s'\n"), sectors); if (!wait_unit_ready(scgp, 60)) - comerrno(EX_BAD, "Device not ready.\n"); + comerrno(EX_BAD, _("Device not ready.\n")); #ifdef CLONE_WRITE if (fulltoc) { @@ -822,7 +896,7 @@ read_ftoc(scgp, ¶ms, FALSE); } else if (clone || edc_corr) { if (!is_mmc(scgp, NULL, NULL)) - comerrno(EX_BAD, "Unsupported device for clone mode.\n"); + comerrno(EX_BAD, _("Unsupported device for clone mode.\n")); if (!edc_corr) noerror = TRUE; if (retries == MAX_RETRY) @@ -832,7 +906,7 @@ if (clone) if (read_ftoc(scgp, ¶ms, TRUE) < 0) - comerrno(EX_BAD, "Read fulltoc problems.\n"); + comerrno(EX_BAD, _("Read fulltoc problems.\n")); readcd_disk(scgp, ¶ms); } else #endif @@ -882,16 +956,16 @@ for (;;) { if (!wait_unit_ready(scgp, 60)) - comerrno(EX_BAD, "Device not ready.\n"); + comerrno(EX_BAD, _("Device not ready.\n")); - printf("0:read 1:veri 2:erase 3:read buffer 4:cache 5:ovtime 6:cap\n"); - printf("7:wne 8:floppy 9:verify 10:checkcmds 11:read disk 12:write disk\n"); - printf("13:scsireset 14:seektest 15: readda 16: reada 17: c2err\n"); + printf(_("0:read 1:veri 2:erase 3:read buffer 4:cache 5:ovtime 6:cap\n")); + printf(_("7:wne 8:floppy 9:verify 10:checkcmds 11:read disk 12:write disk\n")); + printf(_("13:scsireset 14:seektest 15: readda 16: reada 17: c2err\n")); #ifdef CLONE_WRITE - printf("18:readcd 19: lin 20: full toc\n"); + printf(_("18:readcd 19: lin 20: full toc\n")); #endif - getint("Enter selection:", &i, 0, 20); + getint(_("Enter selection:"), &i, 0, 20); if (didintr) return; @@ -965,10 +1039,10 @@ wait_unit_ready(scgp, 10); if (fread_2448(scgp, &rp, Sbuf, 0, 0) < 0) { - errmsgno(EX_BAD, "read 2448 failed\n"); + errmsgno(EX_BAD, _("read 2448 failed\n")); if (rp.ismmc && fread_2448_16(scgp, &rp, Sbuf, 0, 0) >= 0) { - errmsgno(EX_BAD, "read 2448_16 : OK\n"); + errmsgno(EX_BAD, _("read 2448_16 : OK\n")); funcp = fread_2448_16; } @@ -1076,7 +1150,8 @@ strcpy(filename, "toc.dat"); - if (strcmp(parmp->name, "/dev/null") != 0) { + if (parmp != NULL && + strcmp(parmp->name, "/dev/null") != 0) { len = strlen(parmp->name); if (len > (sizeof (filename)-5)) { @@ -1090,12 +1165,20 @@ fillbytes((caddr_t)xb, sizeof (xb), '\0'); if (read_toc(scgp, xb, 0, sizeof (struct tocheader), 0, FMT_FULLTOC) < 0) { if (scgp->silent == 0 || scgp->verbose > 0) - errmsgno(EX_BAD, "Cannot read TOC header\n"); + errmsgno(EX_BAD, _("Cannot read TOC header\n")); return (-1); } len = a_to_u_2_byte(tp->len) + sizeof (struct tocheader)-2; - error("TOC len: %d. First Session: %d Last Session: %d.\n", len, tp->first, tp->last); + error(_("TOC len: %d. First Session: %d Last Session: %d.\n"), len, tp->first, tp->last); + /* + * XXX there is a bug in some ASPI versions that + * XXX cause a hang with odd transfer lengths. + * XXX We should workaround the problem where it exists + * XXX but the problem may exist elsewhere too. + */ + if (len & 1) + len++; if (read_toc(scgp, xxb, 0, len, 0, FMT_FULLTOC) < 0) { if (len & 1) { /* @@ -1110,7 +1193,7 @@ } } if (scgp->silent == 0) - errmsgno(EX_BAD, "Cannot read full TOC\n"); + errmsgno(EX_BAD, _("Cannot read full TOC\n")); return (-1); } @@ -1118,7 +1201,7 @@ f = fileopen(filename, "wctb"); if (f == NULL) - comerr("Cannot open '%s'.\n", filename); + comerr(_("Cannot open '%s'.\n"), filename); filewrite(f, xxb, len); if (do_sectype) read_sectypes(scgp, f); @@ -1138,7 +1221,7 @@ p = &xxb[4]; for (; p < &xxb[len]; p += 11) { if ((p[3] & 0xFF) == 0xA2) { - error("Lead out %d: %ld\n", p[0], msf_to_lba(p[8], p[9], p[10], TRUE)); + error(_("Lead out %d: %ld\n"), p[0], msf_to_lba(p[8], p[9], p[10], TRUE)); } } return (0); @@ -1156,15 +1239,15 @@ if (f != NULL) filewrite(f, §, 1); if (xdebug) - scg_prbytes("sec 0", (Uchar *)Sbuf, 16); + scg_prbytes(_("sec 0"), (Uchar *)Sbuf, 16); sect = SECT_AUDIO; get_sectype(scgp, scgp->cap->c_baddr-4, §); if (f != NULL) filewrite(f, §, 1); if (xdebug) { - scg_prbytes("sec E", (Uchar *)Sbuf, 16); - error("baddr: %ld\n", (long)scgp->cap->c_baddr); + scg_prbytes(_("sec E"), (Uchar *)Sbuf, 16); + error(_("baddr: %ld\n"), (long)scgp->cap->c_baddr); } } @@ -1189,59 +1272,59 @@ } scgp->silent--; if (i >= _MAX_TRY_) { - error("Sectype (%ld) is CANNOT\n", addr); + error(_("Sectype (%ld) is CANNOT\n"), addr); return; } else if (i > 0) { - error("Sectype (%ld) needed %d retries\n", addr, i); + error(_("Sectype (%ld) needed %d retries\n"), addr, i); } #undef _MAX_TRY_ if (cmpbytes(Sbuf, synchdr, 12) < 12) { if (xdebug) - error("Sectype (%ld) is AUDIO\n", addr); + error(_("Sectype (%ld) is AUDIO\n"), addr); if (st) *st = SECT_AUDIO; return; } if (xdebug) - error("Sectype (%ld) is DATA\n", addr); + error(_("Sectype (%ld) is DATA\n"), addr); if (Sbuf[15] == 0) { if (xdebug) - error("Sectype (%ld) is MODE 0\n", addr); + error(_("Sectype (%ld) is MODE 0\n"), addr); sectype = SECT_MODE_0; } else if (Sbuf[15] == 1) { if (xdebug) - error("Sectype (%ld) is MODE 1\n", addr); + error(_("Sectype (%ld) is MODE 1\n"), addr); sectype = SECT_ROM; } else if (Sbuf[15] == 2) { if (xdebug) - error("Sectype (%ld) is MODE 2\n", addr); + error(_("Sectype (%ld) is MODE 2\n"), addr); if ((Sbuf[16+2] & 0x20) == 0 && (Sbuf[16+4+2] & 0x20) == 0) { if (xdebug) - error("Sectype (%ld) is MODE 2 form 1\n", addr); + error(_("Sectype (%ld) is MODE 2 form 1\n"), addr); sectype = SECT_MODE_2_F1; } else if ((Sbuf[16+2] & 0x20) != 0 && (Sbuf[16+4+2] & 0x20) != 0) { if (xdebug) - error("Sectype (%ld) is MODE 2 form 2\n", addr); + error(_("Sectype (%ld) is MODE 2 form 2\n"), addr); sectype = SECT_MODE_2_F2; } else { if (xdebug) - error("Sectype (%ld) is MODE 2 formless\n", addr); + error(_("Sectype (%ld) is MODE 2 formless\n"), addr); sectype = SECT_MODE_2; } } else { - error("Sectype (%ld) is UNKNOWN\n", addr); + error(_("Sectype (%ld) is UNKNOWN\n"), addr); } if (st) *st = sectype; if (xdebug) - error("Sectype (%ld) is 0x%02X\n", addr, sectype); + error(_("Sectype (%ld) is 0x%02X\n"), addr, sectype); } #endif /* CLONE_WRITE */ @@ -1288,10 +1371,12 @@ select_secsize(scgp, osecsize); domode(scgp, oerr, oretr); - printf("Total of %d hard read errors.\n", rp.errors); - printf("C2 errors total: %d bytes in %d sectors on disk\n", rp.c2_errors, rp.c2_errsecs); - printf("C2 errors rate: %f%% \n", (100.0*rp.c2_errors)/scgp->cap->c_baddr/2352); - printf("C2 errors on worst sector: %d, sectors with 100+ C2 errors: %d\n", rp.c2_maxerrs, rp.c2_badsecs); + printf(_("Total of %d hard read errors.\n"), rp.errors); + printf(_("C2 errors total: %d bytes in %d sectors on disk\n"), rp.c2_errors, rp.c2_errsecs); + printf(_("C2 errors rate: %f%% per byte, %f%% per sector\n"), + (100.0*rp.c2_errors)/scgp->cap->c_baddr/2352, + (100.0*rp.c2_errsecs)/scgp->cap->c_baddr); + printf(_("C2 errors on worst sector: %d, sectors with 100+ C2 errors: %d\n"), rp.c2_maxerrs, rp.c2_badsecs); } @@ -1313,7 +1398,7 @@ if (is_suid) { if (scgp->inq->type != INQ_ROMD) - comerrno(EX_BAD, "Not root. Will only read from CD in suid/priv mode\n"); + comerrno(EX_BAD, _("Not root. Will only read from CD in suid/priv mode\n")); } scgp->silent++; @@ -1327,7 +1412,7 @@ if (parmp != NULL && !askrange && (parmp->start <= parmp->end)) isrange = TRUE; - if ((end <= 0 && isrange) || (askrange && scg_yes("Ignore disk size? "))) + if ((end <= 0 && isrange) || (askrange && scg_yes(_("Ignore disk size? ")))) end = 10000000; /* Hack to read empty (e.g. blank=fast) disks */ if (parmp) { @@ -1341,7 +1426,7 @@ break; } if (sp->start_func == NULL) - comerrno(EX_BAD, "Unsupported drive for -cxscan\n"); + comerrno(EX_BAD, _("Unsupported drive for -cxscan\n")); secs = (end - addr) / 75; /* Compute # of seconds */ @@ -1382,13 +1467,13 @@ if (plot) f = stderr; - fprintf(f, "\n\ntotal result:\n\n"); - fprintf(f, "total: C1: %5d, C2: %5d, CU: %5d\n", + fprintf(f, _("\n\ntotal result:\n\n")); + fprintf(f, _("total: C1: %5d, C2: %5d, CU: %5d\n"), stats.c1_errors, stats.c2_errors, stats.cu_errors); - fprintf(f, "max : C1: %5d, C2: %5d, CU: %5d\n", + fprintf(f, _("max : C1: %5d, C2: %5d, CU: %5d\n"), max_errors.c1_errors, max_errors.c2_errors, max_errors.cu_errors); - fprintf(f, "avg/s: C1: %5.1f, C2: %5.1f, CU: %5.1f\n\n", + fprintf(f, _("avg/s: C1: %5.1f, C2: %5.1f, CU: %5.1f\n\n"), (float)stats.c1_errors/secs, (float)stats.c2_errors/secs, (float)stats.cu_errors/secs); @@ -1414,7 +1499,7 @@ if (is_suid) { if (scgp->inq->type != INQ_ROMD) - comerrno(EX_BAD, "Not root. Will only read from CD in suid/priv mode\n"); + comerrno(EX_BAD, _("Not root. Will only read from CD in suid/priv mode\n")); } scgp->silent++; @@ -1428,7 +1513,7 @@ if (parmp != NULL && !askrange && (parmp->start <= parmp->end)) isrange = TRUE; - if ((end <= 0 && isrange) || (askrange && scg_yes("Ignore disk size? "))) + if ((end <= 0 && isrange) || (askrange && scg_yes(_("Ignore disk size? ")))) end = 10000000; /* Hack to read empty (e.g. blank=fast) disks */ if (parmp) { @@ -1439,9 +1524,9 @@ if (pifscan) { if (plextor_init_pif_scan(scgp) < 0) - comerrno(EX_BAD, "Unsupported drive for -pifscan\n"); + comerrno(EX_BAD, _("Unsupported drive for -pifscan\n")); } else if (plextor_init_pi8_scan(scgp) < 0) - comerrno(EX_BAD, "Unsupported drive for -pi8scan\n"); + comerrno(EX_BAD, _("Unsupported drive for -pi8scan\n")); secs = (end - addr) / (8*16); /* Compute # of blocks */ if (pifscan) @@ -1476,12 +1561,12 @@ if (plot) f = stderr; - fprintf(f, "\n\ntotal result:\n\n"); - fprintf(f, "total: PI: %8d\n", + fprintf(f, _("\n\ntotal result:\n\n")); + fprintf(f, _("total: PI: %8d\n"), stats.pi_errors); - fprintf(f, "max : PI: %8d\n", + fprintf(f, _("max : PI: %8d\n"), max_errors.pi_errors); - fprintf(f, "avg sum: PI: %8.1f\n\n", + fprintf(f, _("avg sum: PI: %8.1f\n\n"), (float)stats.pi_errors/secs); plextor_end_scan(scgp); @@ -1562,7 +1647,7 @@ } return (ret); } else { - comerrno(EX_BAD, "Cannot fread_2448_16 on non MMC drives\n"); + comerrno(EX_BAD, _("Cannot fread_2448_16 on non MMC drives\n")); return (read_da(scgp, bp, addr, cnt, rp->secsize, /* Sync + all headers + user data + EDC/ECC + all subch */ @@ -1585,7 +1670,7 @@ /* NO subchannels */ 0)); } else { - comerrno(EX_BAD, "Cannot fread_2352 on non MMC drives\n"); + comerrno(EX_BAD, _("Cannot fread_2352 on non MMC drives\n")); return (read_da(scgp, bp, addr, cnt, rp->secsize, /* Sync + all headers + user data + EDC/ECC + all subch */ @@ -1597,6 +1682,7 @@ * -ledc_ecc_dec read variant: read CD-DA sectors (2352 bytes) and output * corrected CD-ROM sectors (2048 bytes). */ +int edc_OK = 0; LOCAL int fread_2048(scgp, rp, bp, addr, cnt) SCSI *scgp; @@ -1614,6 +1700,7 @@ BOOL OK = TRUE; rp->secsize = rp->isecsize; + fillbytes(bp, rp->secsize * cnt, '\0'); ret = fread_2352(scgp, rp, bp, addr, cnt); rp->secsize = secsize; @@ -1622,11 +1709,16 @@ to = bp; p = bp; while (i < cnt) { - if (!crc_check((unsigned char *)p, MODE_1)) { - do_decode_L2((unsigned char *)p, MODE_1, FALSE, 0); - if (!crc_check((unsigned char *)p, MODE_1)) - OK = FALSE; -/* error("defect? %d: %d\n", crc_check((unsigned char *)p, MODE_1), addr+i);*/ + int crc; + + crc = crc_check((unsigned char *)p, MODE_1); + ret = do_decode_L2((unsigned char *)p, MODE_1, FALSE, 0); + + if (ret < 0) + OK = FALSE; + if (crc == 0 && ret == 0) { + edc_OK++; + error("Corrected: total %d Block %ld\n", edc_OK, addr+i); } move2048(from, to); from += 2352; @@ -1757,11 +1849,11 @@ for (i = 0; i < cnt; i++, p += (2352+294)) { /* scg_prbytes("XXX ", p, 294);*/ if ((j = cmpbytes(p, zeroblk, 294)) < 294) { - printf("C2 in sector: %3ld first at byte: %4d (0x%02X)", addr+i, + printf(_("C2 in sector: %3ld first at byte: %4d (0x%02X)"), addr+i, j*8 + bitidx(p[j]), p[j]&0xFF); for (j = 0, k = 0; j < 294; j++) k += bits(p[j]); - printf(" total: %4d errors\n", k); + printf(_(" total: %4d errors\n"), k); /* scg_prbytes("XXX ", p, 294);*/ rp->c2_errors += k; if (k > rp->c2_maxerrs) @@ -1931,11 +2023,11 @@ char dummybuf[8192]; if (secsize > sizeof (dummybuf)) { - errmsgno(EX_BAD, "Cannot retry, sector size %d too big.\n", secsize); + errmsgno(EX_BAD, _("Cannot retry, sector size %d too big.\n"), secsize); return (-1); } - errmsgno(EX_BAD, "Retrying from sector %ld.\n", addr); + errmsgno(EX_BAD, _("Retrying from sector %ld.\n"), addr); while (cnt > 0) { error("."); @@ -1979,7 +2071,7 @@ /* errmsgno(err, "Cannot read source disk\n");*/ } else { if (scg_getresid(scgp)) { - error("\nresid: %d\n", scg_getresid(scgp)); + error(_("\nresid: %d\n"), scg_getresid(scgp)); /* * If we use -ledc_ecc_dec for * correction, let the correction @@ -1994,7 +2086,7 @@ if (try >= retries) { error("\n"); - errmsgno(err, "Error on sector %ld not corrected. Total of %d errors.\n", + errmsgno(err, _("Error on sector %ld not corrected. Total of %d errors.\n"), addr, ++rp->errors); if (scgp->silent <= 1 && lverbose > 0) @@ -2004,7 +2096,7 @@ if (!noerror) return (-1); - errmsgno(EX_BAD, "-noerror set, continuing ...\n"); + errmsgno(EX_BAD, _("-noerror set, continuing ...\n")); } else { if (try >= maxtry) maxtry = try; @@ -2012,7 +2104,7 @@ if (try > 1) { error("\n"); errmsgno(EX_BAD, - "Error on sector %ld corrected after %d tries. Total of %d errors.\n", + _("Error on sector %ld corrected after %d tries. Total of %d errors.\n"), addr, try, rp->errors); } } @@ -2054,7 +2146,7 @@ if (is_suid) { if (scgp->inq->type != INQ_ROMD) - comerrno(EX_BAD, "Not root. Will only read from CD in suid/priv mode\n"); + comerrno(EX_BAD, _("Not root. Will only read from CD in suid/priv mode\n")); } if (parmp == NULL || parmp->askrange) @@ -2069,14 +2161,14 @@ end = scgp->cap->c_baddr + 1; scgp->silent--; - if ((end <= 0 && isrange) || (askrange && scg_yes("Ignore disk size? "))) + if ((end <= 0 && isrange) || (askrange && scg_yes(_("Ignore disk size? ")))) end = 10000000; /* Hack to read empty (e.g. blank=fast) disks */ if (parmp) { if (parmp->name) defname = parmp->name; if (defname != NULL) { - error("Copy from SCSI (%d,%d,%d) disk to file '%s'\n", + error(_("Copy from SCSI (%d,%d,%d) disk to file '%s'\n"), scg_scsibus(scgp), scg_target(scgp), scg_lun(scgp), defname); } @@ -2094,22 +2186,22 @@ if (defname == NULL) { defname = "disk.out"; - error("Copy from SCSI (%d,%d,%d) disk to file\n", + error(_("Copy from SCSI (%d,%d,%d) disk to file\n"), scg_scsibus(scgp), scg_target(scgp), scg_lun(scgp)); - error("Enter filename [%s]: ", defname); flush(); + error(_("Enter filename [%s]: "), defname); flush(); (void) getline(filename, sizeof (filename)); } if (askrange) { addr = start; - getlong("Enter starting sector for copy:", &addr, start, end-1); -/* getlong("Enter starting sector for copy:", &addr, -300, end-1);*/ + getlong(_("Enter starting sector for copy:"), &addr, start, end-1); +/* getlong(_("Enter starting sector for copy:"), &addr, -300, end-1);*/ start = addr; } if (askrange) { num = end - addr; - getlong("Enter number of sectors to copy:", &num, 1L, num); + getlong(_("Enter number of sectors to copy:"), &num, 1L, num); end = addr + num; } @@ -2121,7 +2213,7 @@ */ if (edc_corr) cnt = Sbufsize / rp->isecsize; - getlong("Enter number of sectors per copy:", &cnt, 1L, cnt); + getlong(_("Enter number of sectors per copy:"), &cnt, 1L, cnt); } if (filename[0] == '\0') @@ -2129,15 +2221,14 @@ filename[sizeof (filename)-1] = '\0'; if (streql(filename, "-")) { f = stdout; -#ifdef NEED_O_BINARY setmode(STDOUT_FILENO, O_BINARY); -#endif } else if ((f = fileopen(filename, notrunc?"wcub":"wctub")) == NULL) - comerr("Cannot open '%s'.\n", filename); + comerr(_("Cannot open '%s'.\n"), filename); + file_raise(f, FALSE); - error("end: %8ld\n", end); + error(_("end: %8ld\n"), end); if (gettimeofday(&starttime, (struct timezone *)0) < 0) - comerr("Cannot get start time\n"); + comerr(_("Cannot get start time\n")); if (meshpoints > 0) { if ((end-start) < meshpoints) @@ -2170,7 +2261,7 @@ if (is_bd) speed /= 4495.0; } - error("addr: %8ld cnt: %ld", addr, cnt); + error(_("addr: %8ld cnt: %ld"), addr, cnt); printf("%8ld %8.2f\n", addr, speed); if (plot) flush(); @@ -2185,7 +2276,7 @@ flush(); } } - error("addr: %8ld cnt: %ld\r", addr, cnt); + error(_("addr: %8ld cnt: %ld\r"), addr, cnt); scgp->silent++; if ((*rfunc)(scgp, rp, Sbuf, addr, cnt) < 0) { @@ -2196,14 +2287,16 @@ } else if (scgp->silent == 0) { scg_printerr(scgp); } - errmsgno(err, "Cannot read source disk\n"); + errmsgno(err, _("Cannot read source disk\n")); - if (read_retry(scgp, Sbuf, addr, cnt, rfunc, rp) < 0) + if (read_retry(scgp, Sbuf, addr, cnt, rfunc, rp) < 0) { + exargs.excode = -2; goto out; + } } else { scgp->silent--; if (scg_getresid(scgp)) { - error("\nresid: %d\n", scg_getresid(scgp)); + error(_("\nresid: %d\n"), scg_getresid(scgp)); /* * If we use -ledc_ecc_dec for * correction, let the correction @@ -2218,22 +2311,23 @@ if (filewrite(f, Sbuf, cnt * secsize) < 0) { err = geterrno(); error("\n"); - errmsgno(err, "Cannot write '%s'\n", filename); + errmsgno(err, _("Cannot write '%s'\n"), filename); + exargs.excode = err; break; } } - error("addr: %8ld", addr); + error(_("addr: %8ld"), addr); out: error("\n"); msec = prstats(); if (msec == 0) /* Avoid division by zero */ msec = 1; #ifdef OOO - error("Read %.2f kB at %.1f kB/sec.\n", + error(_("Read %.2f kB at %.1f kB/sec.\n"), (double)(addr - start)/(1024.0/scgp->cap->c_bsize), (double)((addr - start)/(1024.0/scgp->cap->c_bsize)) / (0.001*msec)); #else - error("Read %.2f kB at %.1f kB/sec.\n", + error(_("Read %.2f kB at %.1f kB/sec.\n"), (double)(addr - start)/(1024.0/secsize), (double)((addr - start)/(1024.0/secsize)) / (0.001*msec)); #endif @@ -2251,12 +2345,12 @@ long addr = 0L; long cnt; long amt; - long end; + long end = 0L; int msec; int start; if (is_suid) - comerrno(EX_BAD, "Not root. Will not write in suid/priv mode\n"); + comerrno(EX_BAD, _("Not root. Will not write in suid/priv mode\n")); filename[0] = '\0'; if (read_capacity(scgp) >= 0) { @@ -2270,7 +2364,7 @@ if (parmp) { if (parmp->name) defname = parmp->name; - error("Copy from file '%s' to SCSI (%d,%d,%d) disk\n", + error(_("Copy from file '%s' to SCSI (%d,%d,%d) disk\n"), defname, scg_scsibus(scgp), scg_target(scgp), scg_lun(scgp)); @@ -2279,20 +2373,20 @@ end = parmp->end; cnt = Sbufsize / scgp->cap->c_bsize; } else { - error("Copy from file to SCSI (%d,%d,%d) disk\n", + error(_("Copy from file to SCSI (%d,%d,%d) disk\n"), scg_scsibus(scgp), scg_target(scgp), scg_lun(scgp)); - error("Enter filename [%s]: ", defname); flush(); + error(_("Enter filename [%s]: "), defname); flush(); (void) getline(filename, sizeof (filename)); - error("Notice: reading from file always starts at file offset 0.\n"); + error(_("Notice: reading from file always starts at file offset 0.\n")); - getlong("Enter starting sector for copy:", &addr, 0L, end-1); + getlong(_("Enter starting sector for copy:"), &addr, 0L, end-1); start = addr; cnt = end - addr; - getlong("Enter number of sectors to copy:", &end, 1L, end); + getlong(_("Enter number of sectors to copy:"), &end, 1L, end); end = addr + cnt; cnt = Sbufsize / scgp->cap->c_bsize; - getlong("Enter number of sectors per copy:", &cnt, 1L, cnt); + getlong(_("Enter number of sectors per copy:"), &cnt, 1L, cnt); /* error("end: %8ld\n", end);*/ } @@ -2301,15 +2395,13 @@ filename[sizeof (filename)-1] = '\0'; if (streql(filename, "-")) { f = stdin; -#ifdef NEED_O_BINARY setmode(STDIN_FILENO, O_BINARY); -#endif } else if ((f = fileopen(filename, "rub")) == NULL) - comerr("Cannot open '%s'.\n", filename); + comerr(_("Cannot open '%s'.\n"), filename); - error("end: %8ld\n", end); + error(_("end: %8ld\n"), end); if (gettimeofday(&starttime, (struct timezone *)0) < 0) - comerr("Cannot get start time\n"); + comerr(_("Cannot get start time\n")); for (; addr < end; addr += cnt) { if (didintr) @@ -2318,23 +2410,23 @@ if ((addr + cnt) > end) cnt = end - addr; - error("addr: %8ld cnt: %ld\r", addr, cnt); + error(_("addr: %8ld cnt: %ld\r"), addr, cnt); if ((amt = fileread(f, Sbuf, cnt * scgp->cap->c_bsize)) < 0) - comerr("Cannot read '%s'\n", filename); + comerr(_("Cannot read '%s'\n"), filename); if (amt == 0) break; if ((amt / scgp->cap->c_bsize) < cnt) cnt = amt / scgp->cap->c_bsize; if (write_scsi(scgp, Sbuf, addr, cnt) < 0) comerrno(scgp->scmd->ux_errno, - "Cannot write destination disk\n"); + _("Cannot write destination disk\n")); } - error("addr: %8ld\n", addr); + error(_("addr: %8ld\n"), addr); msec = prstats(); if (msec == 0) /* Avoid division by zero */ msec = 1; - error("Wrote %.2f kB at %.1f kB/sec.\n", + error(_("Wrote %.2f kB at %.1f kB/sec.\n"), (double)(addr - start)/(1024.0/scgp->cap->c_bsize), (double)((addr - start)/(1024.0/scgp->cap->c_bsize)) / (0.001*msec)); } @@ -2376,7 +2468,7 @@ print_capacity(scgp, stderr); fillbytes(Sbuf, 50*2352, 0); if (read_g1(scgp, Sbuf, 0, 50) < 0) - errmsg("read CD\n"); + errmsg(_("read CD\n")); f = fileopen("DDA", "wctb"); /* filewrite(f, Sbuf, 50 * 2352 - scg_getresid(scgp));*/ filewrite(f, Sbuf, 50 * 2352); @@ -2482,12 +2574,26 @@ return (csize * clusters + rest); } +LOCAL BOOL +mmc_isplextor(scgp) + SCSI *scgp; +{ + if (scgp->inq != NULL && + strncmp(scgp->inq->inq_vendor_info, "PLEXTOR", 7) == 0) { + return (TRUE); + } + return (FALSE); +} + LOCAL int plextor_init_cx_scan(scgp) SCSI *scgp; { register struct scg_cmd *scmd = scgp->scmd; + if (!mmc_isplextor(scgp)) + return (-1); + fillbytes((caddr_t)scmd, sizeof (*scmd), '\0'); scmd->size = 0; @@ -2510,6 +2616,9 @@ { register struct scg_cmd *scmd = scgp->scmd; + if (!mmc_isplextor(scgp)) + return (-1); + fillbytes((caddr_t)scmd, sizeof (*scmd), '\0'); scmd->size = 0; @@ -2533,6 +2642,9 @@ { register struct scg_cmd *scmd = scgp->scmd; + if (!mmc_isplextor(scgp)) + return (-1); + fillbytes((caddr_t)scmd, sizeof (*scmd), '\0'); scmd->size = 0; @@ -2799,12 +2911,12 @@ fillbytes(mode, sizeof (mode), '\0'); fillbytes(cmode, sizeof (cmode), '\0'); - if (!get_mode_params(scgp, 0x01, "CD error recovery parameter", + if (!get_mode_params(scgp, 0x01, _("CD error recovery parameter"), mode, (Uchar *)0, (Uchar *)cmode, (Uchar *)0, &len)) { return; } if (xdebug) - scg_prbytes("Mode Sense Data", mode, len); + scg_prbytes(_("Mode Sense Data"), mode, len); mode[0] = 0; mode[2] = 0; /* ??? ist manchmal 0x80 */ @@ -2813,7 +2925,7 @@ *p &= 0x3F; if (xdebug) - scg_prbytes("Mode page 1:", p, 0x10); + scg_prbytes(_("Mode page 1:"), p, 0x10); i = p[2]; if (errp != NULL) @@ -2839,12 +2951,12 @@ fillbytes(mode, sizeof (mode), '\0'); fillbytes(cmode, sizeof (cmode), '\0'); - if (!get_mode_params(scgp, 0x01, "CD error recovery parameter", + if (!get_mode_params(scgp, 0x01, _("CD error recovery parameter"), mode, (Uchar *)0, (Uchar *)cmode, (Uchar *)0, &len)) { return; } if (xdebug || (err == -1 && retr == -1)) { - scg_prbytes("Mode Sense Data", mode, len); + scg_prbytes(_("Mode Sense Data"), mode, len); } mode[0] = 0; @@ -2854,32 +2966,32 @@ *p &= 0x3F; if (xdebug || (err == -1 && retr == -1)) - scg_prbytes("Mode page 1:", p, 0x10); + scg_prbytes(_("Mode page 1:"), p, 0x10); i = p[2]; if (err == -1) { - getint("Error handling? ", &i, 0, 255); + getint(_("Error handling? "), &i, 0, 255); p[2] = i; } else { if (xdebug) - error("Error handling set from %02X to %02X\n", + error(_("Error handling set from %02X to %02X\n"), p[2], err); p[2] = err; } i = p[3]; if (retr == -1) { - getint("Retry count? ", &i, 0, 255); + getint(_("Retry count? "), &i, 0, 255); p[3] = i; } else { if (xdebug) - error("Retry count set from %d to %d\n", + error(_("Retry count set from %d to %d\n"), p[3] & 0xFF, retr); p[3] = retr; } if (xdebug || (err == -1 && retr == -1)) - scg_prbytes("Mode Select Data", mode, len); + scg_prbytes(_("Mode Select Data"), mode, len); mode_select(scgp, mode, len, 0, scgp->inq->data_format >= 2); } @@ -2966,10 +3078,10 @@ if (test_unit_ready(scgp) < 0) return; - printf("Doing 1000 'TEST UNIT READY' operations.\n"); + printf(_("Doing 1000 'TEST UNIT READY' operations.\n")); if (gettimeofday(&starttime, (struct timezone *)0) < 0) - comerr("Cannot get start time\n"); + comerr(_("Cannot get start time\n")); for (i = 1000; --i >= 0; ) { (void) test_unit_ready(scgp); @@ -2988,10 +3100,10 @@ scgp->silent--; if (i >= 0) { - printf("Doing 1000 'SEEK_G0 (0)' operations.\n"); + printf(_("Doing 1000 'SEEK_G0 (0)' operations.\n")); if (gettimeofday(&starttime, (struct timezone *)0) < 0) - comerr("Cannot get start time\n"); + comerr(_("Cannot get start time\n")); for (i = 1000; --i >= 0; ) { (void) seek_g0(scgp, 0L); @@ -3009,10 +3121,10 @@ if (i < 0) return; - printf("Doing 1000 'SEEK_G1 (0)' operations.\n"); + printf(_("Doing 1000 'SEEK_G1 (0)' operations.\n")); if (gettimeofday(&starttime, (struct timezone *)0) < 0) - comerr("Cannot get start time\n"); + comerr(_("Cannot get start time\n")); for (i = 1000; --i >= 0; ) { (void) seek_g1(scgp, 0L); @@ -3037,13 +3149,13 @@ maxbad = BAD_INC; badsecs = malloc(maxbad * sizeof (long)); if (badsecs == NULL) - comerr("No memory for bad sector list\n."); + comerr(_("No memory for bad sector list.\n")); } if (nbad >= maxbad) { maxbad += BAD_INC; badsecs = realloc(badsecs, maxbad * sizeof (long)); if (badsecs == NULL) - comerr("No memory to grow bad sector list\n."); + comerr(_("No memory to grow bad sector list.\n")); } badsecs[nbad++] = addr; } @@ -3056,8 +3168,18 @@ if (nbad == 0) return; - error("Max corected retry count was %d (limited to %d).\n", maxtry, retries); - error("The following %d sector(s) could not be read correctly:\n", nbad); + error(_("Max corected retry count was %d (limited to %d).\n"), maxtry, retries); + error(_("The following %d sector(s) could not be read correctly:\n"), nbad); for (i = 0; i < nbad; i++) error("%ld\n", badsecs[i]); + if (edc_corr) + error(_("Corrected by EDC: %d\n"), edc_OK); +} + +LOCAL void +priv_warn(what, msg) + const char *what; + const char *msg; +{ + errmsgno(EX_BAD, "Insufficient '%s' privileges. %s\n", what, msg); } diff -Nru cdrtools-2.01.01a33/readcd/scsi_cdr.c cdrtools-3.02a09/readcd/scsi_cdr.c --- cdrtools-2.01.01a33/readcd/scsi_cdr.c 2007-07-08 18:37:18.000000000 +0000 +++ cdrtools-3.02a09/readcd/scsi_cdr.c 1970-01-01 00:00:00.000000000 +0000 @@ -1,3108 +0,0 @@ -/* @(#)scsi_cdr.c 1.150 07/07/08 Copyright 1995-2007 J. Schilling */ -#ifndef lint -static char sccsid[] = - "@(#)scsi_cdr.c 1.150 07/07/08 Copyright 1995-2007 J. Schilling"; -#endif -/* - * SCSI command functions for cdrecord - * covering pre-MMC standard functions up to MMC-2 - * - * Copyright (c) 1995-2007 J. Schilling - */ -/* - * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. - * - * See the file CDDL.Schily.txt in this distribution for details. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file CDDL.Schily.txt from this distribution. - */ - -/* - * NOTICE: The Philips CDD 521 has several firmware bugs. - * One of them is not to respond to a SCSI selection - * within 200ms if the general load on the - * SCSI bus is high. To deal with this problem - * most of the SCSI commands are send with the - * SCG_CMD_RETRY flag enabled. - */ -#include - -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include - -#include -#include -#include -#include - -#include "scsimmc.h" -#include "cdrecord.h" - -#define strbeg(s1, s2) (strstr((s2), (s1)) == (s2)) - -EXPORT BOOL unit_ready __PR((SCSI *scgp)); -EXPORT BOOL wait_unit_ready __PR((SCSI *scgp, int secs)); -EXPORT BOOL scsi_in_progress __PR((SCSI *scgp)); -EXPORT BOOL cdr_underrun __PR((SCSI *scgp)); -EXPORT int test_unit_ready __PR((SCSI *scgp)); -EXPORT int rezero_unit __PR((SCSI *scgp)); -EXPORT int request_sense __PR((SCSI *scgp)); -EXPORT int request_sense_b __PR((SCSI *scgp, caddr_t bp, int cnt)); -EXPORT int inquiry __PR((SCSI *scgp, caddr_t, int)); -EXPORT int read_capacity __PR((SCSI *scgp)); -EXPORT void print_capacity __PR((SCSI *scgp, FILE *f)); -EXPORT int scsi_load_unload __PR((SCSI *scgp, int)); -EXPORT int scsi_prevent_removal __PR((SCSI *scgp, int)); -EXPORT int scsi_start_stop_unit __PR((SCSI *scgp, int, int, BOOL immed)); -EXPORT int scsi_set_speed __PR((SCSI *scgp, int readspeed, int writespeed, int rotctl)); -EXPORT int scsi_get_speed __PR((SCSI *scgp, int *readspeedp, int *writespeedp)); -EXPORT int qic02 __PR((SCSI *scgp, int)); -EXPORT int write_xscsi __PR((SCSI *scgp, caddr_t, long, long, int)); -EXPORT int write_xg0 __PR((SCSI *scgp, caddr_t, long, long, int)); -EXPORT int write_xg1 __PR((SCSI *scgp, caddr_t, long, long, int)); -EXPORT int write_xg5 __PR((SCSI *scgp, caddr_t, long, long, int)); -EXPORT int seek_scsi __PR((SCSI *scgp, long addr)); -EXPORT int seek_g0 __PR((SCSI *scgp, long addr)); -EXPORT int seek_g1 __PR((SCSI *scgp, long addr)); -EXPORT int scsi_flush_cache __PR((SCSI *scgp, BOOL immed)); -EXPORT int read_buffer __PR((SCSI *scgp, caddr_t bp, int cnt, int mode)); -EXPORT int write_buffer __PR((SCSI *scgp, char *buffer, long length, int mode, int bufferid, long offset)); -EXPORT int read_subchannel __PR((SCSI *scgp, caddr_t bp, int track, - int cnt, int msf, int subq, int fmt)); -EXPORT int read_toc __PR((SCSI *scgp, caddr_t, int, int, int, int)); -EXPORT int read_toc_philips __PR((SCSI *scgp, caddr_t, int, int, int, int)); -EXPORT int read_header __PR((SCSI *scgp, caddr_t, long, int, int)); -EXPORT int read_disk_info __PR((SCSI *scgp, caddr_t, int)); -EXPORT int read_track_info __PR((SCSI *scgp, caddr_t, int type, int addr, int cnt)); -EXPORT int get_trackinfo __PR((SCSI *scgp, caddr_t, int type, int addr, int cnt)); -EXPORT int read_rzone_info __PR((SCSI *scgp, caddr_t bp, int cnt)); -EXPORT int reserve_tr_rzone __PR((SCSI *scgp, long size)); -EXPORT int read_dvd_structure __PR((SCSI *scgp, caddr_t bp, int cnt, int mt, int addr, int layer, int fmt)); -EXPORT int send_dvd_structure __PR((SCSI *scgp, caddr_t bp, int cnt, int fmt)); -EXPORT int send_opc __PR((SCSI *scgp, caddr_t, int cnt, int doopc)); -EXPORT int read_track_info_philips __PR((SCSI *scgp, caddr_t, int, int)); -EXPORT int scsi_close_tr_session __PR((SCSI *scgp, int type, int track, BOOL immed)); -EXPORT int read_master_cue __PR((SCSI *scgp, caddr_t bp, int sheet, int cnt)); -EXPORT int send_cue_sheet __PR((SCSI *scgp, caddr_t bp, long size)); -EXPORT int read_buff_cap __PR((SCSI *scgp, long *, long *)); -EXPORT int scsi_blank __PR((SCSI *scgp, long addr, int blanktype, BOOL immed)); -EXPORT BOOL allow_atapi __PR((SCSI *scgp, BOOL new)); -EXPORT int mode_select __PR((SCSI *scgp, Uchar *, int, int, int)); -EXPORT int mode_sense __PR((SCSI *scgp, Uchar *dp, int cnt, int page, int pcf)); -EXPORT int mode_select_sg0 __PR((SCSI *scgp, Uchar *, int, int, int)); -EXPORT int mode_sense_sg0 __PR((SCSI *scgp, Uchar *dp, int cnt, int page, int pcf)); -EXPORT int mode_select_g0 __PR((SCSI *scgp, Uchar *, int, int, int)); -EXPORT int mode_select_g1 __PR((SCSI *scgp, Uchar *, int, int, int)); -EXPORT int mode_sense_g0 __PR((SCSI *scgp, Uchar *dp, int cnt, int page, int pcf)); -EXPORT int mode_sense_g1 __PR((SCSI *scgp, Uchar *dp, int cnt, int page, int pcf)); -EXPORT int read_tochdr __PR((SCSI *scgp, cdr_t *, int *, int *)); -EXPORT int read_cdtext __PR((SCSI *scgp)); -EXPORT int read_trackinfo __PR((SCSI *scgp, int, long *, struct msf *, int *, int *, int *)); -EXPORT int read_B0 __PR((SCSI *scgp, BOOL isbcd, long *b0p, long *lop)); -EXPORT int read_session_offset __PR((SCSI *scgp, long *)); -EXPORT int read_session_offset_philips __PR((SCSI *scgp, long *)); -EXPORT int sense_secsize __PR((SCSI *scgp, int current)); -EXPORT int select_secsize __PR((SCSI *scgp, int)); -EXPORT BOOL is_cddrive __PR((SCSI *scgp)); -EXPORT BOOL is_unknown_dev __PR((SCSI *scgp)); -EXPORT int read_scsi __PR((SCSI *scgp, caddr_t, long, int)); -EXPORT int read_g0 __PR((SCSI *scgp, caddr_t, long, int)); -EXPORT int read_g1 __PR((SCSI *scgp, caddr_t, long, int)); -EXPORT BOOL getdev __PR((SCSI *scgp, BOOL)); -EXPORT void printinq __PR((SCSI *scgp, FILE *f)); -EXPORT void printdev __PR((SCSI *scgp)); -EXPORT BOOL do_inquiry __PR((SCSI *scgp, BOOL)); -EXPORT BOOL recovery_needed __PR((SCSI *scgp, cdr_t *)); -EXPORT int scsi_load __PR((SCSI *scgp, cdr_t *)); -EXPORT int scsi_unload __PR((SCSI *scgp, cdr_t *)); -EXPORT int scsi_cdr_write __PR((SCSI *scgp, caddr_t bp, long sectaddr, long size, int blocks, BOOL islast)); -EXPORT struct cd_mode_page_2A * mmc_cap __PR((SCSI *scgp, Uchar *modep)); -EXPORT void mmc_getval __PR((struct cd_mode_page_2A *mp, - BOOL *cdrrp, BOOL *cdwrp, - BOOL *cdrrwp, BOOL *cdwrwp, - BOOL *dvdp, BOOL *dvdwp)); -EXPORT BOOL is_mmc __PR((SCSI *scgp, BOOL *cdwp, BOOL *dvdwp)); -EXPORT BOOL mmc_check __PR((SCSI *scgp, BOOL *cdrrp, BOOL *cdwrp, - BOOL *cdrrwp, BOOL *cdwrwp, - BOOL *dvdp, BOOL *dvdwp)); -LOCAL void print_speed __PR((char *fmt, int val)); -EXPORT void print_capabilities __PR((SCSI *scgp)); -extern int verify __PR((SCSI *scgp, long start, int count, long *bad_block)); - -EXPORT BOOL -unit_ready(scgp) - SCSI *scgp; -{ - register struct scg_cmd *scmd = scgp->scmd; - - if (test_unit_ready(scgp) >= 0) /* alles OK */ - return (TRUE); - else if (scmd->error >= SCG_FATAL) /* nicht selektierbar */ - return (FALSE); - - if (scg_sense_key(scgp) == SC_UNIT_ATTENTION) { - if (test_unit_ready(scgp) >= 0) /* alles OK */ - return (TRUE); - } - if ((scg_cmd_status(scgp) & ST_BUSY) != 0) { - /* - * Busy/reservation_conflict - */ - usleep(500000); - if (test_unit_ready(scgp) >= 0) /* alles OK */ - return (TRUE); - } - if (scg_sense_key(scgp) == -1) { /* non extended Sense */ - if (scg_sense_code(scgp) == 4) /* NOT_READY */ - return (FALSE); - return (TRUE); - } - /* FALSE wenn NOT_READY */ - return (scg_sense_key(scgp) != SC_NOT_READY); -} - -EXPORT BOOL -wait_unit_ready(scgp, secs) - SCSI *scgp; - int secs; -{ - int i; - int c; - int k; - int ret; - int err; - - seterrno(0); - scgp->silent++; - ret = test_unit_ready(scgp); /* eat up unit attention */ - if (ret < 0) { - err = geterrno(); - - if (err == EPERM || err == EACCES) { - scgp->silent--; - return (FALSE); - } - ret = test_unit_ready(scgp); /* got power on condition? */ - } - scgp->silent--; - - if (ret >= 0) /* success that's enough */ - return (TRUE); - - scgp->silent++; - for (i = 0; i < secs && (ret = test_unit_ready(scgp)) < 0; i++) { - if (scgp->scmd->scb.busy != 0) { - sleep(1); - continue; - } - c = scg_sense_code(scgp); - k = scg_sense_key(scgp); - /* - * Abort quickly if it does not make sense to wait. - * 0x30 == Cannot read medium - * 0x3A == Medium not present - */ - if ((k == SC_NOT_READY && (c == 0x3A || c == 0x30)) || - (k == SC_MEDIUM_ERROR)) { - if (scgp->silent <= 1) - scg_printerr(scgp); - scgp->silent--; - return (FALSE); - } - sleep(1); - } - scgp->silent--; - if (ret < 0) - return (FALSE); - return (TRUE); -} - -EXPORT BOOL -scsi_in_progress(scgp) - SCSI *scgp; -{ - if (scg_sense_key(scgp) == SC_NOT_READY && - /* - * Logigal unit not ready operation/long_write in progress - */ - scg_sense_code(scgp) == 0x04 && - (scg_sense_qual(scgp) == 0x04 || /* CyberDr. "format in progress"*/ - scg_sense_qual(scgp) == 0x07 || /* "operation in progress" */ - scg_sense_qual(scgp) == 0x08)) { /* "long write in progress" */ - return (TRUE); - } else { - if (scgp->silent <= 1) - scg_printerr(scgp); - } - return (FALSE); -} - -EXPORT BOOL -cdr_underrun(scgp) - SCSI *scgp; -{ - if ((scg_sense_key(scgp) != SC_ILLEGAL_REQUEST && - scg_sense_key(scgp) != SC_MEDIUM_ERROR)) - return (FALSE); - - if ((scg_sense_code(scgp) == 0x21 && - (scg_sense_qual(scgp) == 0x00 || /* logical block address out of range */ - scg_sense_qual(scgp) == 0x02)) || /* invalid address for write */ - - (scg_sense_code(scgp) == 0x0C && - scg_sense_qual(scgp) == 0x09)) { /* write error - loss of streaming */ - return (TRUE); - } - /* - * XXX Bei manchen Brennern kommt mach dem der Brennvorgang bereits - * XXX eine Weile gelaufen ist ein 5/24/0 Invalid field in CDB. - * XXX Daher sollte man testen ob schon geschrieben wurde... - */ - return (FALSE); -} - -EXPORT int -test_unit_ready(scgp) - SCSI *scgp; -{ - register struct scg_cmd *scmd = scgp->scmd; - - fillbytes((caddr_t)scmd, sizeof (*scmd), '\0'); - scmd->addr = (caddr_t)0; - scmd->size = 0; - scmd->flags = SCG_DISRE_ENA | (scgp->silent ? SCG_SILENT:0); - scmd->cdb_len = SC_G0_CDBLEN; - scmd->sense_len = CCS_SENSE_LEN; - scmd->cdb.g0_cdb.cmd = SC_TEST_UNIT_READY; - scmd->cdb.g0_cdb.lun = scg_lun(scgp); - - scgp->cmdname = "test unit ready"; - - return (scg_cmd(scgp)); -} - -EXPORT int -rezero_unit(scgp) - SCSI *scgp; -{ - register struct scg_cmd *scmd = scgp->scmd; - - fillbytes((caddr_t)scmd, sizeof (*scmd), '\0'); - scmd->addr = (caddr_t)0; - scmd->size = 0; - scmd->flags = SCG_DISRE_ENA; - scmd->cdb_len = SC_G0_CDBLEN; - scmd->sense_len = CCS_SENSE_LEN; - scmd->cdb.g0_cdb.cmd = SC_REZERO_UNIT; - scmd->cdb.g0_cdb.lun = scg_lun(scgp); - - scgp->cmdname = "rezero unit"; - - return (scg_cmd(scgp)); -} - -EXPORT int -request_sense(scgp) - SCSI *scgp; -{ - char sensebuf[CCS_SENSE_LEN]; - char *cmdsave; - - cmdsave = scgp->cmdname; - - if (request_sense_b(scgp, sensebuf, sizeof (sensebuf)) < 0) - return (-1); - scgp->cmdname = cmdsave; - scg_prsense((Uchar *)sensebuf, CCS_SENSE_LEN - scg_getresid(scgp)); - return (0); -} - -EXPORT int -request_sense_b(scgp, bp, cnt) - SCSI *scgp; - caddr_t bp; - int cnt; -{ - register struct scg_cmd *scmd = scgp->scmd; - - - fillbytes((caddr_t)scmd, sizeof (*scmd), '\0'); - scmd->addr = bp; - scmd->size = cnt; - scmd->flags = SCG_RECV_DATA|SCG_DISRE_ENA; - scmd->cdb_len = SC_G0_CDBLEN; - scmd->sense_len = CCS_SENSE_LEN; - scmd->cdb.g0_cdb.cmd = SC_REQUEST_SENSE; - scmd->cdb.g0_cdb.lun = scg_lun(scgp); - scmd->cdb.g0_cdb.count = cnt; - - scgp->cmdname = "request_sense"; - - if (scg_cmd(scgp) < 0) - return (-1); - return (0); -} - -EXPORT int -inquiry(scgp, bp, cnt) - SCSI *scgp; - caddr_t bp; - int cnt; -{ - register struct scg_cmd *scmd = scgp->scmd; - - fillbytes(bp, cnt, '\0'); - fillbytes((caddr_t)scmd, sizeof (*scmd), '\0'); - scmd->addr = bp; - scmd->size = cnt; - scmd->flags = SCG_RECV_DATA|SCG_DISRE_ENA; - scmd->cdb_len = SC_G0_CDBLEN; - scmd->sense_len = CCS_SENSE_LEN; - scmd->cdb.g0_cdb.cmd = SC_INQUIRY; - scmd->cdb.g0_cdb.lun = scg_lun(scgp); - scmd->cdb.g0_cdb.count = cnt; - - scgp->cmdname = "inquiry"; - - if (scg_cmd(scgp) < 0) - return (-1); - if (scgp->verbose) - scg_prbytes("Inquiry Data :", (Uchar *)bp, cnt - scg_getresid(scgp)); - return (0); -} - -EXPORT int -read_capacity(scgp) - SCSI *scgp; -{ - register struct scg_cmd *scmd = scgp->scmd; - - fillbytes((caddr_t)scmd, sizeof (*scmd), '\0'); - scmd->addr = (caddr_t)scgp->cap; - scmd->size = sizeof (struct scsi_capacity); - scmd->flags = SCG_RECV_DATA|SCG_DISRE_ENA; - scmd->cdb_len = SC_G1_CDBLEN; - scmd->sense_len = CCS_SENSE_LEN; - scmd->cdb.g1_cdb.cmd = 0x25; /* Read Capacity */ - scmd->cdb.g1_cdb.lun = scg_lun(scgp); - g1_cdblen(&scmd->cdb.g1_cdb, 0); /* Full Media */ - - scgp->cmdname = "read capacity"; - - if (scg_cmd(scgp) < 0) { - return (-1); - } else { - long cbsize; - long cbaddr; - - /* - * c_bsize & c_baddr are signed Int32_t - * so we use signed int conversion here. - */ - cbsize = a_to_4_byte(&scgp->cap->c_bsize); - cbaddr = a_to_4_byte(&scgp->cap->c_baddr); - scgp->cap->c_bsize = cbsize; - scgp->cap->c_baddr = cbaddr; - } - return (0); -} - -EXPORT void -print_capacity(scgp, f) - SCSI *scgp; - FILE *f; -{ - long kb; - long mb; - long prmb; - double dkb; - - dkb = (scgp->cap->c_baddr+1.0) * (scgp->cap->c_bsize/1024.0); - kb = dkb; - mb = dkb / 1024.0; - prmb = dkb / 1000.0 * 1.024; - fprintf(f, "Capacity: %ld Blocks = %ld kBytes = %ld MBytes = %ld prMB\n", - (long)scgp->cap->c_baddr+1, kb, mb, prmb); - fprintf(f, "Sectorsize: %ld Bytes\n", (long)scgp->cap->c_bsize); -} - -EXPORT int -scsi_load_unload(scgp, load) - SCSI *scgp; - int load; -{ - register struct scg_cmd *scmd = scgp->scmd; - - fillbytes((caddr_t)scmd, sizeof (*scmd), '\0'); - scmd->flags = SCG_DISRE_ENA; - scmd->cdb_len = SC_G5_CDBLEN; - scmd->sense_len = CCS_SENSE_LEN; - scmd->cdb.g5_cdb.cmd = 0xA6; - scmd->cdb.g5_cdb.lun = scg_lun(scgp); - scmd->cdb.g5_cdb.addr[1] = load?3:2; - scmd->cdb.g5_cdb.count[2] = 0; /* slot # */ - - scgp->cmdname = "medium load/unload"; - - if (scg_cmd(scgp) < 0) - return (-1); - return (0); -} - -EXPORT int -scsi_prevent_removal(scgp, prevent) - SCSI *scgp; - int prevent; -{ - register struct scg_cmd *scmd = scgp->scmd; - - fillbytes((caddr_t)scmd, sizeof (*scmd), '\0'); - scmd->flags = SCG_DISRE_ENA; - scmd->cdb_len = SC_G0_CDBLEN; - scmd->sense_len = CCS_SENSE_LEN; - scmd->cdb.g0_cdb.cmd = 0x1E; - scmd->cdb.g0_cdb.lun = scg_lun(scgp); - scmd->cdb.g0_cdb.count = prevent & 1; - - scgp->cmdname = "prevent/allow medium removal"; - - if (scg_cmd(scgp) < 0) - return (-1); - return (0); -} - - -EXPORT int -scsi_start_stop_unit(scgp, flg, loej, immed) - SCSI *scgp; - int flg; - int loej; - BOOL immed; -{ - register struct scg_cmd *scmd = scgp->scmd; - - fillbytes((caddr_t)scmd, sizeof (*scmd), '\0'); - scmd->flags = SCG_DISRE_ENA; - scmd->cdb_len = SC_G0_CDBLEN; - scmd->sense_len = CCS_SENSE_LEN; - scmd->cdb.g0_cdb.cmd = 0x1B; /* Start Stop Unit */ - scmd->cdb.g0_cdb.lun = scg_lun(scgp); - scmd->cdb.g0_cdb.count = (flg ? 1:0) | (loej ? 2:0); - - if (immed) - scmd->cdb.cmd_cdb[1] |= 0x01; - - scgp->cmdname = "start/stop unit"; - - return (scg_cmd(scgp)); -} - -EXPORT int -scsi_set_speed(scgp, readspeed, writespeed, rotctl) - SCSI *scgp; - int readspeed; - int writespeed; - int rotctl; -{ - register struct scg_cmd *scmd = scgp->scmd; - - fillbytes((caddr_t)scmd, sizeof (*scmd), '\0'); - scmd->flags = SCG_DISRE_ENA; - scmd->cdb_len = SC_G5_CDBLEN; - scmd->sense_len = CCS_SENSE_LEN; - scmd->cdb.g5_cdb.cmd = 0xBB; - scmd->cdb.g5_cdb.lun = scg_lun(scgp); - - if (readspeed < 0) - i_to_2_byte(&scmd->cdb.g5_cdb.addr[0], 0xFFFF); - else - i_to_2_byte(&scmd->cdb.g5_cdb.addr[0], readspeed); - if (writespeed < 0) - i_to_2_byte(&scmd->cdb.g5_cdb.addr[2], 0xFFFF); - else - i_to_2_byte(&scmd->cdb.g5_cdb.addr[2], writespeed); - - scmd->cdb.cmd_cdb[1] |= rotctl & 0x03; - - scgp->cmdname = "set cd speed"; - - if (scg_cmd(scgp) < 0) - return (-1); - return (0); -} - -EXPORT int -scsi_get_speed(scgp, readspeedp, writespeedp) - SCSI *scgp; - int *readspeedp; - int *writespeedp; -{ - struct cd_mode_page_2A *mp; - Uchar m[256]; - int val; - - scgp->silent++; - mp = mmc_cap(scgp, m); /* Get MMC capabilities in allocated mp */ - scgp->silent--; - if (mp == NULL) - return (-1); /* Pre SCSI-3/mmc drive */ - - val = a_to_u_2_byte(mp->cur_read_speed); - if (readspeedp) - *readspeedp = val; - - if (mp->p_len >= 28) - val = a_to_u_2_byte(mp->v3_cur_write_speed); - else - val = a_to_u_2_byte(mp->cur_write_speed); - if (writespeedp) - *writespeedp = val; - - return (0); -} - - -EXPORT int -qic02(scgp, cmd) - SCSI *scgp; - int cmd; -{ - register struct scg_cmd *scmd = scgp->scmd; - - fillbytes((caddr_t)scmd, sizeof (*scmd), '\0'); - scmd->addr = (caddr_t)0; - scmd->size = 0; - scmd->flags = SCG_DISRE_ENA; - scmd->cdb_len = SC_G0_CDBLEN; - scmd->sense_len = DEF_SENSE_LEN; - scmd->cdb.g0_cdb.cmd = 0x0D; /* qic02 Sysgen SC4000 */ - scmd->cdb.g0_cdb.lun = scg_lun(scgp); - scmd->cdb.g0_cdb.mid_addr = cmd; - - scgp->cmdname = "qic 02"; - return (scg_cmd(scgp)); -} - -#define G0_MAXADDR 0x1FFFFFL - -EXPORT int -write_xscsi(scgp, bp, addr, size, cnt) - SCSI *scgp; - caddr_t bp; /* address of buffer */ - long addr; /* disk address (sector) to put */ - long size; /* number of bytes to transfer */ - int cnt; /* sectorcount */ -{ - if (addr <= G0_MAXADDR) - return (write_xg0(scgp, bp, addr, size, cnt)); - else - return (write_xg1(scgp, bp, addr, size, cnt)); -} - -EXPORT int -write_xg0(scgp, bp, addr, size, cnt) - SCSI *scgp; - caddr_t bp; /* address of buffer */ - long addr; /* disk address (sector) to put */ - long size; /* number of bytes to transfer */ - int cnt; /* sectorcount */ -{ - register struct scg_cmd *scmd = scgp->scmd; - - fillbytes((caddr_t)scmd, sizeof (*scmd), '\0'); - scmd->addr = bp; - scmd->size = size; - scmd->flags = SCG_DISRE_ENA|SCG_CMD_RETRY; -/* scmd->flags = SCG_DISRE_ENA;*/ - scmd->cdb_len = SC_G0_CDBLEN; - scmd->sense_len = CCS_SENSE_LEN; - scmd->cdb.g0_cdb.cmd = SC_WRITE; - scmd->cdb.g0_cdb.lun = scg_lun(scgp); - g0_cdbaddr(&scmd->cdb.g0_cdb, addr); - scmd->cdb.g0_cdb.count = cnt; - - scgp->cmdname = "write_g0"; - - if (scg_cmd(scgp) < 0) - return (-1); - return (size - scg_getresid(scgp)); -} - -EXPORT int -write_xg1(scgp, bp, addr, size, cnt) - SCSI *scgp; - caddr_t bp; /* address of buffer */ - long addr; /* disk address (sector) to put */ - long size; /* number of bytes to transfer */ - int cnt; /* sectorcount */ -{ - register struct scg_cmd *scmd = scgp->scmd; - - fillbytes((caddr_t)scmd, sizeof (*scmd), '\0'); - scmd->addr = bp; - scmd->size = size; - scmd->flags = SCG_DISRE_ENA|SCG_CMD_RETRY; -/* scmd->flags = SCG_DISRE_ENA;*/ - scmd->cdb_len = SC_G1_CDBLEN; - scmd->sense_len = CCS_SENSE_LEN; - scmd->cdb.g1_cdb.cmd = SC_EWRITE; - scmd->cdb.g1_cdb.lun = scg_lun(scgp); - g1_cdbaddr(&scmd->cdb.g1_cdb, addr); - g1_cdblen(&scmd->cdb.g1_cdb, cnt); - - scgp->cmdname = "write_g1"; - - if (scg_cmd(scgp) < 0) - return (-1); - return (size - scg_getresid(scgp)); -} - -EXPORT int -write_xg5(scgp, bp, addr, size, cnt) - SCSI *scgp; - caddr_t bp; /* address of buffer */ - long addr; /* disk address (sector) to put */ - long size; /* number of bytes to transfer */ - int cnt; /* sectorcount */ -{ - register struct scg_cmd *scmd = scgp->scmd; - - fillbytes((caddr_t)scmd, sizeof (*scmd), '\0'); - scmd->addr = bp; - scmd->size = size; - scmd->flags = SCG_DISRE_ENA|SCG_CMD_RETRY; -/* scmd->flags = SCG_DISRE_ENA;*/ - scmd->cdb_len = SC_G5_CDBLEN; - scmd->sense_len = CCS_SENSE_LEN; - scmd->cdb.g5_cdb.cmd = 0xAA; - scmd->cdb.g5_cdb.lun = scg_lun(scgp); - g5_cdbaddr(&scmd->cdb.g5_cdb, addr); - g5_cdblen(&scmd->cdb.g5_cdb, cnt); - - scgp->cmdname = "write_g5"; - - if (scg_cmd(scgp) < 0) - return (-1); - return (size - scg_getresid(scgp)); -} - -EXPORT int -seek_scsi(scgp, addr) - SCSI *scgp; - long addr; -{ - if (addr <= G0_MAXADDR) - return (seek_g0(scgp, addr)); - else - return (seek_g1(scgp, addr)); -} - -EXPORT int -seek_g0(scgp, addr) - SCSI *scgp; - long addr; -{ - register struct scg_cmd *scmd = scgp->scmd; - - fillbytes((caddr_t)scmd, sizeof (*scmd), '\0'); - scmd->flags = SCG_DISRE_ENA; - scmd->cdb_len = SC_G0_CDBLEN; - scmd->sense_len = CCS_SENSE_LEN; - scmd->cdb.g0_cdb.cmd = 0x0B; /* Seek */ - scmd->cdb.g0_cdb.lun = scg_lun(scgp); - g0_cdbaddr(&scmd->cdb.g0_cdb, addr); - - scgp->cmdname = "seek_g0"; - - return (scg_cmd(scgp)); -} - -EXPORT int -seek_g1(scgp, addr) - SCSI *scgp; - long addr; -{ - register struct scg_cmd *scmd = scgp->scmd; - - fillbytes((caddr_t)scmd, sizeof (*scmd), '\0'); - scmd->flags = SCG_DISRE_ENA; - scmd->cdb_len = SC_G1_CDBLEN; - scmd->sense_len = CCS_SENSE_LEN; - scmd->cdb.g1_cdb.cmd = 0x2B; /* Seek G1 */ - scmd->cdb.g1_cdb.lun = scg_lun(scgp); - g1_cdbaddr(&scmd->cdb.g1_cdb, addr); - - scgp->cmdname = "seek_g1"; - - return (scg_cmd(scgp)); -} - -EXPORT int -scsi_flush_cache(scgp, immed) - SCSI *scgp; - BOOL immed; -{ - register struct scg_cmd *scmd = scgp->scmd; - - fillbytes((caddr_t)scmd, sizeof (*scmd), '\0'); - scmd->flags = SCG_DISRE_ENA; - scmd->cdb_len = SC_G1_CDBLEN; - scmd->sense_len = CCS_SENSE_LEN; - scmd->timeout = 2 * 60; /* Max: sizeof (CDR-cache)/150KB/s */ - scmd->cdb.g1_cdb.cmd = 0x35; - scmd->cdb.g1_cdb.lun = scg_lun(scgp); - - if (immed) - scmd->cdb.cmd_cdb[1] |= 0x02; - - scgp->cmdname = "flush cache"; - - if (scg_cmd(scgp) < 0) - return (-1); - return (0); -} - -EXPORT int -read_buffer(scgp, bp, cnt, mode) - SCSI *scgp; - caddr_t bp; - int cnt; - int mode; -{ - register struct scg_cmd *scmd = scgp->scmd; - - fillbytes((caddr_t)scmd, sizeof (*scmd), '\0'); - scmd->addr = bp; - scmd->size = cnt; - scmd->dma_read = 1; - scmd->cdb_len = SC_G1_CDBLEN; - scmd->sense_len = CCS_SENSE_LEN; - scmd->cdb.g1_cdb.cmd = 0x3C; /* Read Buffer */ - scmd->cdb.g1_cdb.lun = scg_lun(scgp); - scmd->cdb.cmd_cdb[1] |= (mode & 7); - g1_cdblen(&scmd->cdb.g1_cdb, cnt); - - scgp->cmdname = "read buffer"; - - return (scg_cmd(scgp)); -} - -EXPORT int -write_buffer(scgp, buffer, length, mode, bufferid, offset) - SCSI *scgp; - char *buffer; - long length; - int mode; - int bufferid; - long offset; -{ - register struct scg_cmd *scmd = scgp->scmd; - char *cdb; - - fillbytes((caddr_t)scmd, sizeof (*scmd), '\0'); - scmd->addr = buffer; - scmd->size = length; - scmd->flags = SCG_DISRE_ENA|SCG_CMD_RETRY; - scmd->cdb_len = SC_G1_CDBLEN; - scmd->sense_len = CCS_SENSE_LEN; - - cdb = (char *)scmd->cdb.cmd_cdb; - - cdb[0] = 0x3B; - cdb[1] = mode & 7; - cdb[2] = bufferid; - cdb[3] = offset >> 16; - cdb[4] = (offset >> 8) & 0xff; - cdb[5] = offset & 0xff; - cdb[6] = length >> 16; - cdb[7] = (length >> 8) & 0xff; - cdb[8] = length & 0xff; - - scgp->cmdname = "write_buffer"; - - if (scg_cmd(scgp) >= 0) - return (1); - return (0); -} - -EXPORT int -read_subchannel(scgp, bp, track, cnt, msf, subq, fmt) - SCSI *scgp; - caddr_t bp; - int track; - int cnt; - int msf; - int subq; - int fmt; - -{ - register struct scg_cmd *scmd = scgp->scmd; - - fillbytes((caddr_t)scmd, sizeof (*scmd), '\0'); - scmd->addr = bp; - scmd->size = cnt; - scmd->flags = SCG_RECV_DATA|SCG_DISRE_ENA; - scmd->cdb_len = SC_G1_CDBLEN; - scmd->sense_len = CCS_SENSE_LEN; - scmd->cdb.g1_cdb.cmd = 0x42; - scmd->cdb.g1_cdb.lun = scg_lun(scgp); - if (msf) - scmd->cdb.g1_cdb.res = 1; - if (subq) - scmd->cdb.g1_cdb.addr[0] = 0x40; - scmd->cdb.g1_cdb.addr[1] = fmt; - scmd->cdb.g1_cdb.res6 = track; - g1_cdblen(&scmd->cdb.g1_cdb, cnt); - - scgp->cmdname = "read subchannel"; - - if (scg_cmd(scgp) < 0) - return (-1); - return (0); -} - -EXPORT int -read_toc(scgp, bp, track, cnt, msf, fmt) - SCSI *scgp; - caddr_t bp; - int track; - int cnt; - int msf; - int fmt; - -{ - register struct scg_cmd *scmd = scgp->scmd; - - fillbytes((caddr_t)scmd, sizeof (*scmd), '\0'); - scmd->addr = bp; - scmd->size = cnt; - scmd->flags = SCG_RECV_DATA|SCG_DISRE_ENA; - scmd->cdb_len = SC_G1_CDBLEN; - scmd->sense_len = CCS_SENSE_LEN; - scmd->cdb.g1_cdb.cmd = 0x43; - scmd->cdb.g1_cdb.lun = scg_lun(scgp); - if (msf) - scmd->cdb.g1_cdb.res = 1; - scmd->cdb.g1_cdb.addr[0] = fmt & 0x0F; - scmd->cdb.g1_cdb.res6 = track; - g1_cdblen(&scmd->cdb.g1_cdb, cnt); - - scgp->cmdname = "read toc"; - - if (scg_cmd(scgp) < 0) - return (-1); - return (0); -} - -EXPORT int -read_toc_philips(scgp, bp, track, cnt, msf, fmt) - SCSI *scgp; - caddr_t bp; - int track; - int cnt; - int msf; - int fmt; - -{ - register struct scg_cmd *scmd = scgp->scmd; - - fillbytes((caddr_t)scmd, sizeof (*scmd), '\0'); - scmd->addr = bp; - scmd->size = cnt; - scmd->flags = SCG_RECV_DATA|SCG_DISRE_ENA; - scmd->cdb_len = SC_G1_CDBLEN; - scmd->sense_len = CCS_SENSE_LEN; - scmd->timeout = 4 * 60; /* May last 174s on a TEAC CD-R55S */ - scmd->cdb.g1_cdb.cmd = 0x43; - scmd->cdb.g1_cdb.lun = scg_lun(scgp); - if (msf) - scmd->cdb.g1_cdb.res = 1; - scmd->cdb.g1_cdb.res6 = track; - g1_cdblen(&scmd->cdb.g1_cdb, cnt); - - if (fmt & 1) - scmd->cdb.g1_cdb.vu_96 = 1; - if (fmt & 2) - scmd->cdb.g1_cdb.vu_97 = 1; - - scgp->cmdname = "read toc"; - - if (scg_cmd(scgp) < 0) - return (-1); - return (0); -} - -EXPORT int -read_header(scgp, bp, addr, cnt, msf) - SCSI *scgp; - caddr_t bp; - long addr; - int cnt; - int msf; -{ - register struct scg_cmd *scmd = scgp->scmd; - - fillbytes((caddr_t)scmd, sizeof (*scmd), '\0'); - scmd->addr = bp; - scmd->size = cnt; - scmd->flags = SCG_RECV_DATA|SCG_DISRE_ENA; - scmd->cdb_len = SC_G1_CDBLEN; - scmd->sense_len = CCS_SENSE_LEN; - scmd->cdb.g1_cdb.cmd = 0x44; - scmd->cdb.g1_cdb.lun = scg_lun(scgp); - if (msf) - scmd->cdb.g1_cdb.res = 1; - g1_cdbaddr(&scmd->cdb.g1_cdb, addr); - g1_cdblen(&scmd->cdb.g1_cdb, cnt); - - scgp->cmdname = "read header"; - - if (scg_cmd(scgp) < 0) - return (-1); - return (0); -} - -EXPORT int -read_disk_info(scgp, bp, cnt) - SCSI *scgp; - caddr_t bp; - int cnt; - -{ - register struct scg_cmd *scmd = scgp->scmd; - - fillbytes((caddr_t)scmd, sizeof (*scmd), '\0'); - scmd->addr = bp; - scmd->size = cnt; - scmd->flags = SCG_RECV_DATA|SCG_DISRE_ENA; - scmd->cdb_len = SC_G1_CDBLEN; - scmd->sense_len = CCS_SENSE_LEN; - scmd->timeout = 4 * 60; /* Needs up to 2 minutes */ - scmd->cdb.g1_cdb.cmd = 0x51; - scmd->cdb.g1_cdb.lun = scg_lun(scgp); - g1_cdblen(&scmd->cdb.g1_cdb, cnt); - - scgp->cmdname = "read disk info"; - - if (scg_cmd(scgp) < 0) - return (-1); - return (0); -} - -EXPORT int -read_track_info(scgp, bp, type, addr, cnt) - SCSI *scgp; - caddr_t bp; - int type; - int addr; - int cnt; - -{ - register struct scg_cmd *scmd = scgp->scmd; - - fillbytes((caddr_t)scmd, sizeof (*scmd), '\0'); - scmd->addr = bp; - scmd->size = cnt; - scmd->flags = SCG_RECV_DATA|SCG_DISRE_ENA; - scmd->cdb_len = SC_G1_CDBLEN; - scmd->sense_len = CCS_SENSE_LEN; - scmd->timeout = 4 * 60; /* Needs up to 2 minutes */ - scmd->cdb.g1_cdb.cmd = 0x52; - scmd->cdb.g1_cdb.lun = scg_lun(scgp); -/* scmd->cdb.cmd_cdb[1] = type & 0x03;*/ - scmd->cdb.cmd_cdb[1] = type; - g1_cdbaddr(&scmd->cdb.g1_cdb, addr); /* LBA/Track/Session */ - g1_cdblen(&scmd->cdb.g1_cdb, cnt); - - scgp->cmdname = "read track info"; - - if (scg_cmd(scgp) < 0) - return (-1); - return (0); -} - -EXPORT int -get_trackinfo(scgp, bp, type, addr, cnt) - SCSI *scgp; - caddr_t bp; - int type; - int addr; - int cnt; -{ - int len; - int ret; - - fillbytes(bp, cnt, '\0'); - - /* - * Used to be 2 instead of 4 (now). But some Y2k ATAPI drives as used - * by IOMEGA create a DMA overrun if we try to transfer only 2 bytes. - */ - if (read_track_info(scgp, bp, type, addr, 4) < 0) - return (-1); - - len = a_to_u_2_byte(bp); - len += 2; - if (len > cnt) - len = cnt; - ret = read_track_info(scgp, bp, type, addr, len); - -#ifdef DEBUG - if (lverbose > 1) - scg_prbytes("Track info:", (Uchar *)bp, - len-scg_getresid(scgp)); -#endif - return (ret); -} - -EXPORT int -read_rzone_info(scgp, bp, cnt) - SCSI *scgp; - caddr_t bp; - int cnt; -{ - return (get_trackinfo(scgp, bp, TI_TYPE_LBA, 0, cnt)); -} - -EXPORT int -reserve_tr_rzone(scgp, size) - SCSI *scgp; - long size; /* number of blocks */ -{ - register struct scg_cmd *scmd = scgp->scmd; - - fillbytes((caddr_t)scmd, sizeof (*scmd), '\0'); - scmd->addr = (caddr_t)0; - scmd->size = 0; - scmd->flags = SCG_DISRE_ENA|SCG_CMD_RETRY; - scmd->cdb_len = SC_G1_CDBLEN; - scmd->sense_len = CCS_SENSE_LEN; - scmd->cdb.g1_cdb.cmd = 0x53; - scmd->cdb.g1_cdb.lun = scg_lun(scgp); - - i_to_4_byte(&scmd->cdb.g1_cdb.addr[3], size); - - scgp->cmdname = "reserve_track_rzone"; - - if (scg_cmd(scgp) < 0) - return (-1); - return (0); -} - -EXPORT int -read_dvd_structure(scgp, bp, cnt, mt, addr, layer, fmt) - SCSI *scgp; - caddr_t bp; - int cnt; - int mt; - int addr; - int layer; - int fmt; -{ - register struct scg_cmd *scmd = scgp->scmd; - - fillbytes((caddr_t)scmd, sizeof (*scmd), '\0'); - scmd->addr = bp; - scmd->size = cnt; - scmd->flags = SCG_RECV_DATA|SCG_DISRE_ENA; - scmd->cdb_len = SC_G5_CDBLEN; - scmd->sense_len = CCS_SENSE_LEN; - scmd->timeout = 4 * 60; /* Needs up to 2 minutes ??? */ - scmd->cdb.g5_cdb.cmd = 0xAD; - scmd->cdb.g5_cdb.lun = scg_lun(scgp); - scmd->cdb.cmd_cdb[1] |= (mt & 0x0F); /* Media Type */ - g5_cdbaddr(&scmd->cdb.g5_cdb, addr); - g5_cdblen(&scmd->cdb.g5_cdb, cnt); - scmd->cdb.g5_cdb.count[0] = layer; - scmd->cdb.g5_cdb.count[1] = fmt; - - scgp->cmdname = "read dvd structure"; - - if (scg_cmd(scgp) < 0) - return (-1); - return (0); -} - -EXPORT int -send_dvd_structure(scgp, bp, cnt, fmt) - SCSI *scgp; - caddr_t bp; - int cnt; - int fmt; -{ - register struct scg_cmd *scmd = scgp->scmd; - - fillbytes((caddr_t)scmd, sizeof (*scmd), '\0'); - scmd->addr = bp; - scmd->size = cnt; - scmd->flags = SCG_DISRE_ENA; - scmd->cdb_len = SC_G5_CDBLEN; - scmd->sense_len = CCS_SENSE_LEN; - scmd->timeout = 4 * 60; /* Needs up to 2 minutes ??? */ - scmd->cdb.g5_cdb.cmd = 0xBF; - scmd->cdb.g5_cdb.lun = scg_lun(scgp); - g5_cdblen(&scmd->cdb.g5_cdb, cnt); - scmd->cdb.g5_cdb.count[0] = 0; - scmd->cdb.g5_cdb.count[1] = fmt; - - scgp->cmdname = "send dvd structure"; - - if (scg_cmd(scgp) < 0) - return (-1); - return (0); -} - -EXPORT int -send_opc(scgp, bp, cnt, doopc) - SCSI *scgp; - caddr_t bp; - int cnt; - int doopc; -{ - register struct scg_cmd *scmd = scgp->scmd; - - fillbytes((caddr_t)scmd, sizeof (*scmd), '\0'); - scmd->addr = bp; - scmd->size = cnt; - scmd->flags = SCG_DISRE_ENA; - scmd->cdb_len = SC_G1_CDBLEN; - scmd->sense_len = CCS_SENSE_LEN; - scmd->timeout = 60; - scmd->cdb.g1_cdb.cmd = 0x54; - scmd->cdb.g1_cdb.lun = scg_lun(scgp); - scmd->cdb.g1_cdb.reladr = doopc?1:0; - g1_cdblen(&scmd->cdb.g1_cdb, cnt); - - scgp->cmdname = "send opc"; - - if (scg_cmd(scgp) < 0) - return (-1); - return (0); -} - -EXPORT int -read_track_info_philips(scgp, bp, track, cnt) - SCSI *scgp; - caddr_t bp; - int track; - int cnt; - -{ - register struct scg_cmd *scmd = scgp->scmd; - - fillbytes((caddr_t)scmd, sizeof (*scmd), '\0'); - scmd->addr = bp; - scmd->size = cnt; - scmd->flags = SCG_RECV_DATA|SCG_DISRE_ENA; - scmd->cdb_len = SC_G1_CDBLEN; - scmd->sense_len = CCS_SENSE_LEN; - scmd->cdb.g1_cdb.cmd = 0xE5; - scmd->cdb.g1_cdb.lun = scg_lun(scgp); - g1_cdbaddr(&scmd->cdb.g1_cdb, track); - g1_cdblen(&scmd->cdb.g1_cdb, cnt); - - scgp->cmdname = "read track info"; - - if (scg_cmd(scgp) < 0) - return (-1); - return (0); -} - -EXPORT int -scsi_close_tr_session(scgp, type, track, immed) - SCSI *scgp; - int type; - int track; - BOOL immed; -{ - register struct scg_cmd *scmd = scgp->scmd; - - fillbytes((caddr_t)scmd, sizeof (*scmd), '\0'); - scmd->flags = SCG_DISRE_ENA; - scmd->cdb_len = SC_G1_CDBLEN; - scmd->sense_len = CCS_SENSE_LEN; - scmd->timeout = 8 * 60; /* Needs up to 4 minutes */ - scmd->cdb.g1_cdb.cmd = 0x5B; - scmd->cdb.g1_cdb.lun = scg_lun(scgp); - scmd->cdb.g1_cdb.addr[0] = type; - scmd->cdb.g1_cdb.addr[3] = track; - - if (immed) - scmd->cdb.g1_cdb.reladr = 1; -/* scmd->cdb.cmd_cdb[1] |= 0x01;*/ -#ifdef nono - scmd->cdb.g1_cdb.reladr = 1; /* IMM hack to test Mitsumi behaviour*/ -#endif - - scgp->cmdname = "close track/session"; - - if (scg_cmd(scgp) < 0) - return (-1); - return (0); -} - -EXPORT int -read_master_cue(scgp, bp, sheet, cnt) - SCSI *scgp; - caddr_t bp; /* address of master cue sheet */ - int sheet; /* Sheet number */ - int cnt; /* Transfer count */ -{ - register struct scg_cmd *scmd = scgp->scmd; - - fillbytes((caddr_t)scmd, sizeof (*scmd), '\0'); - scmd->addr = bp; - scmd->size = cnt; - scmd->flags = SCG_RECV_DATA|SCG_DISRE_ENA; - scmd->cdb_len = SC_G1_CDBLEN; - scmd->sense_len = CCS_SENSE_LEN; - scmd->cdb.g1_cdb.cmd = 0x59; /* Read master cue */ - scmd->cdb.g1_cdb.lun = scg_lun(scgp); - scmd->cdb.g1_cdb.addr[2] = sheet; - g1_cdblen(&scmd->cdb.g1_cdb, cnt); - - scgp->cmdname = "read master cue"; - - if (scg_cmd(scgp) < 0) - return (-1); - return (0); -} - -EXPORT int -send_cue_sheet(scgp, bp, size) - SCSI *scgp; - caddr_t bp; /* address of cue sheet buffer */ - long size; /* number of bytes to transfer */ -{ - register struct scg_cmd *scmd = scgp->scmd; - - fillbytes((caddr_t)scmd, sizeof (*scmd), '\0'); - scmd->addr = bp; - scmd->size = size; - scmd->flags = SCG_DISRE_ENA; - scmd->cdb_len = SC_G1_CDBLEN; - scmd->sense_len = CCS_SENSE_LEN; - scmd->cdb.g1_cdb.cmd = 0x5D; /* Send CUE sheet */ - scmd->cdb.g1_cdb.lun = scg_lun(scgp); - g1_cdblen(&scmd->cdb.g1_cdb, size); - - scgp->cmdname = "send_cue_sheet"; - - if (scg_cmd(scgp) < 0) - return (-1); - return (size - scmd->resid); -} - -EXPORT int -read_buff_cap(scgp, sp, fp) - SCSI *scgp; - long *sp; /* Size pointer */ - long *fp; /* Free pointer */ -{ - char resp[12]; - Ulong freespace; - Ulong bufsize; - int per; - register struct scg_cmd *scmd = scgp->scmd; - - fillbytes((caddr_t)scmd, sizeof (*scmd), '\0'); - scmd->addr = (caddr_t)resp; - scmd->size = sizeof (resp); - scmd->flags = SCG_RECV_DATA|SCG_DISRE_ENA; - scmd->cdb_len = SC_G1_CDBLEN; - scmd->sense_len = CCS_SENSE_LEN; - scmd->cdb.g1_cdb.cmd = 0x5C; /* Read buffer cap */ - scmd->cdb.g1_cdb.lun = scg_lun(scgp); - g1_cdblen(&scmd->cdb.g1_cdb, sizeof (resp)); - - scgp->cmdname = "read buffer cap"; - - if (scg_cmd(scgp) < 0) - return (-1); - - bufsize = a_to_u_4_byte(&resp[4]); - freespace = a_to_u_4_byte(&resp[8]); - if (sp) - *sp = bufsize; - if (fp) - *fp = freespace; - - if (scgp->verbose || (sp == 0 && fp == 0)) - printf("BFree: %ld K BSize: %ld K\n", freespace >> 10, bufsize >> 10); - - if (bufsize == 0) - return (0); - per = (100 * (bufsize - freespace)) / bufsize; - if (per < 0) - return (0); - if (per > 100) - return (100); - return (per); -} - -EXPORT int -scsi_blank(scgp, addr, blanktype, immed) - SCSI *scgp; - long addr; - int blanktype; - BOOL immed; -{ - register struct scg_cmd *scmd = scgp->scmd; - - fillbytes((caddr_t)scmd, sizeof (*scmd), '\0'); - scmd->flags = SCG_DISRE_ENA; - scmd->cdb_len = SC_G5_CDBLEN; - scmd->sense_len = CCS_SENSE_LEN; - scmd->timeout = 160 * 60; /* full blank at 1x could take 80 minutes */ - scmd->cdb.g5_cdb.cmd = 0xA1; /* Blank */ - scmd->cdb.g0_cdb.high_addr = blanktype; - g1_cdbaddr(&scmd->cdb.g5_cdb, addr); - - if (immed) - scmd->cdb.g5_cdb.res |= 8; -/* scmd->cdb.cmd_cdb[1] |= 0x10;*/ - - scgp->cmdname = "blank unit"; - - return (scg_cmd(scgp)); -} - -/* - * XXX First try to handle ATAPI: - * XXX ATAPI cannot handle SCSI 6 byte commands. - * XXX We try to simulate 6 byte mode sense/select. - */ -LOCAL BOOL is_atapi; - -EXPORT BOOL -allow_atapi(scgp, new) - SCSI *scgp; - BOOL new; -{ - BOOL old = is_atapi; - Uchar mode[256]; - - if (new == old) - return (old); - - scgp->silent++; - /* - * If a bad drive has been reset before, we may need to fire up two - * test unit ready commands to clear status. - */ - (void) unit_ready(scgp); - if (new && - mode_sense_g1(scgp, mode, 8, 0x3F, 0) < 0) { /* All pages current */ - new = FALSE; - } - scgp->silent--; - - is_atapi = new; - return (old); -} - -EXPORT int -mode_select(scgp, dp, cnt, smp, pf) - SCSI *scgp; - Uchar *dp; - int cnt; - int smp; - int pf; -{ - if (is_atapi) - return (mode_select_sg0(scgp, dp, cnt, smp, pf)); - return (mode_select_g0(scgp, dp, cnt, smp, pf)); -} - -EXPORT int -mode_sense(scgp, dp, cnt, page, pcf) - SCSI *scgp; - Uchar *dp; - int cnt; - int page; - int pcf; -{ - if (is_atapi) - return (mode_sense_sg0(scgp, dp, cnt, page, pcf)); - return (mode_sense_g0(scgp, dp, cnt, page, pcf)); -} - -/* - * Simulate mode select g0 with mode select g1. - */ -EXPORT int -mode_select_sg0(scgp, dp, cnt, smp, pf) - SCSI *scgp; - Uchar *dp; - int cnt; - int smp; - int pf; -{ - Uchar xmode[256+4]; - int amt = cnt; - - if (amt < 1 || amt > 255) { - /* XXX clear SCSI error codes ??? */ - return (-1); - } - - if (amt < 4) { /* Data length. medium type & VU */ - amt += 1; - } else { - amt += 4; - movebytes(&dp[4], &xmode[8], cnt-4); - } - xmode[0] = 0; - xmode[1] = 0; - xmode[2] = dp[1]; - xmode[3] = dp[2]; - xmode[4] = 0; - xmode[5] = 0; - i_to_2_byte(&xmode[6], (unsigned int)dp[3]); - - if (scgp->verbose) scg_prbytes("Mode Parameters (un-converted)", dp, cnt); - - return (mode_select_g1(scgp, xmode, amt, smp, pf)); -} - -/* - * Simulate mode sense g0 with mode sense g1. - */ -EXPORT int -mode_sense_sg0(scgp, dp, cnt, page, pcf) - SCSI *scgp; - Uchar *dp; - int cnt; - int page; - int pcf; -{ - Uchar xmode[256+4]; - int amt = cnt; - int len; - - if (amt < 1 || amt > 255) { - /* XXX clear SCSI error codes ??? */ - return (-1); - } - - fillbytes((caddr_t)xmode, sizeof (xmode), '\0'); - if (amt < 4) { /* Data length. medium type & VU */ - amt += 1; - } else { - amt += 4; - } - if (mode_sense_g1(scgp, xmode, amt, page, pcf) < 0) - return (-1); - - amt = cnt - scg_getresid(scgp); -/* - * For tests: Solaris 8 & LG CD-ROM always returns resid == amt - */ -/* amt = cnt;*/ - if (amt > 4) - movebytes(&xmode[8], &dp[4], amt-4); - len = a_to_u_2_byte(xmode); - if (len == 0) { - dp[0] = 0; - } else if (len < 6) { - if (len > 2) - len = 2; - dp[0] = len; - } else { - dp[0] = len - 3; - } - dp[1] = xmode[2]; - dp[2] = xmode[3]; - len = a_to_u_2_byte(&xmode[6]); - dp[3] = len; - - if (scgp->verbose) scg_prbytes("Mode Sense Data (converted)", dp, amt); - return (0); -} - -EXPORT int -mode_select_g0(scgp, dp, cnt, smp, pf) - SCSI *scgp; - Uchar *dp; - int cnt; - int smp; - int pf; -{ - register struct scg_cmd *scmd = scgp->scmd; - - fillbytes((caddr_t)scmd, sizeof (*scmd), '\0'); - scmd->addr = (caddr_t)dp; - scmd->size = cnt; - scmd->flags = SCG_DISRE_ENA; - scmd->cdb_len = SC_G0_CDBLEN; - scmd->sense_len = CCS_SENSE_LEN; - scmd->cdb.g0_cdb.cmd = SC_MODE_SELECT; - scmd->cdb.g0_cdb.lun = scg_lun(scgp); - scmd->cdb.g0_cdb.high_addr = smp ? 1 : 0 | pf ? 0x10 : 0; - scmd->cdb.g0_cdb.count = cnt; - - if (scgp->verbose) { - error("%s ", smp?"Save":"Set "); - scg_prbytes("Mode Parameters", dp, cnt); - } - - scgp->cmdname = "mode select g0"; - - return (scg_cmd(scgp)); -} - -EXPORT int -mode_select_g1(scgp, dp, cnt, smp, pf) - SCSI *scgp; - Uchar *dp; - int cnt; - int smp; - int pf; -{ - register struct scg_cmd *scmd = scgp->scmd; - - fillbytes((caddr_t)scmd, sizeof (*scmd), '\0'); - scmd->addr = (caddr_t)dp; - scmd->size = cnt; - scmd->flags = SCG_DISRE_ENA; - scmd->cdb_len = SC_G1_CDBLEN; - scmd->sense_len = CCS_SENSE_LEN; - scmd->cdb.g1_cdb.cmd = 0x55; - scmd->cdb.g1_cdb.lun = scg_lun(scgp); - scmd->cdb.g0_cdb.high_addr = smp ? 1 : 0 | pf ? 0x10 : 0; - g1_cdblen(&scmd->cdb.g1_cdb, cnt); - - if (scgp->verbose) { - printf("%s ", smp?"Save":"Set "); - scg_prbytes("Mode Parameters", dp, cnt); - } - - scgp->cmdname = "mode select g1"; - - return (scg_cmd(scgp)); -} - -EXPORT int -mode_sense_g0(scgp, dp, cnt, page, pcf) - SCSI *scgp; - Uchar *dp; - int cnt; - int page; - int pcf; -{ - register struct scg_cmd *scmd = scgp->scmd; - - fillbytes((caddr_t)scmd, sizeof (*scmd), '\0'); - scmd->addr = (caddr_t)dp; - scmd->size = 0xFF; - scmd->size = cnt; - scmd->flags = SCG_RECV_DATA|SCG_DISRE_ENA; - scmd->cdb_len = SC_G0_CDBLEN; - scmd->sense_len = CCS_SENSE_LEN; - scmd->cdb.g0_cdb.cmd = SC_MODE_SENSE; - scmd->cdb.g0_cdb.lun = scg_lun(scgp); -#ifdef nonono - scmd->cdb.g0_cdb.high_addr = 1<<4; /* DBD Disable Block desc. */ -#endif - scmd->cdb.g0_cdb.mid_addr = (page&0x3F) | ((pcf<<6)&0xC0); - scmd->cdb.g0_cdb.count = page ? 0xFF : 24; - scmd->cdb.g0_cdb.count = cnt; - - scgp->cmdname = "mode sense g0"; - - if (scg_cmd(scgp) < 0) - return (-1); - if (scgp->verbose) scg_prbytes("Mode Sense Data", dp, cnt - scg_getresid(scgp)); - return (0); -} - -EXPORT int -mode_sense_g1(scgp, dp, cnt, page, pcf) - SCSI *scgp; - Uchar *dp; - int cnt; - int page; - int pcf; -{ - register struct scg_cmd *scmd = scgp->scmd; - - fillbytes((caddr_t)scmd, sizeof (*scmd), '\0'); - scmd->addr = (caddr_t)dp; - scmd->size = cnt; - scmd->flags = SCG_RECV_DATA|SCG_DISRE_ENA; - scmd->cdb_len = SC_G1_CDBLEN; - scmd->sense_len = CCS_SENSE_LEN; - scmd->cdb.g1_cdb.cmd = 0x5A; - scmd->cdb.g1_cdb.lun = scg_lun(scgp); -#ifdef nonono - scmd->cdb.g0_cdb.high_addr = 1<<4; /* DBD Disable Block desc. */ -#endif - scmd->cdb.g1_cdb.addr[0] = (page&0x3F) | ((pcf<<6)&0xC0); - g1_cdblen(&scmd->cdb.g1_cdb, cnt); - - scgp->cmdname = "mode sense g1"; - - if (scg_cmd(scgp) < 0) - return (-1); - if (scgp->verbose) scg_prbytes("Mode Sense Data", dp, cnt - scg_getresid(scgp)); - return (0); -} - -struct trackdesc { - Uchar res0; - -#if defined(_BIT_FIELDS_LTOH) /* Intel byteorder */ - Ucbit control : 4; - Ucbit adr : 4; -#else /* Motorola byteorder */ - Ucbit adr : 4; - Ucbit control : 4; -#endif - - Uchar track; - Uchar res3; - Uchar addr[4]; -}; - -struct diskinfo { - struct tocheader hd; - struct trackdesc desc[1]; -}; - -struct siheader { - Uchar len[2]; - Uchar finished; - Uchar unfinished; -}; - -struct sidesc { - Uchar sess_number; - Uchar res1; - Uchar track; - Uchar res3; - Uchar addr[4]; -}; - -struct sinfo { - struct siheader hd; - struct sidesc desc[1]; -}; - -struct trackheader { - Uchar mode; - Uchar res[3]; - Uchar addr[4]; -}; -#define TRM_ZERO 0 -#define TRM_USER_ECC 1 /* 2048 bytes user data + 288 Bytes ECC/EDC */ -#define TRM_USER 2 /* All user data (2336 bytes) */ - - -EXPORT int -read_tochdr(scgp, dp, fp, lp) - SCSI *scgp; - cdr_t *dp; - int *fp; - int *lp; -{ - struct tocheader *tp; - char xb[256]; - int len; - - tp = (struct tocheader *)xb; - - fillbytes((caddr_t)xb, sizeof (xb), '\0'); - if (read_toc(scgp, xb, 0, sizeof (struct tocheader), 0, FMT_TOC) < 0) { - if (scgp->silent == 0) - errmsgno(EX_BAD, "Cannot read TOC header\n"); - return (-1); - } - len = a_to_u_2_byte(tp->len) + sizeof (struct tocheader)-2; - if (len >= 4) { - if (fp) - *fp = tp->first; - if (lp) - *lp = tp->last; - return (0); - } - return (-1); -} - -EXPORT int -read_cdtext(scgp) - SCSI *scgp; -{ - struct tocheader *tp; - char xb[256]; - int len; - char xxb[10000]; - - tp = (struct tocheader *)xb; - - fillbytes((caddr_t)xb, sizeof (xb), '\0'); - if (read_toc(scgp, xb, 0, sizeof (struct tocheader), 0, FMT_CDTEXT) < 0) { - if (scgp->silent == 0 || scgp->verbose > 0) - errmsgno(EX_BAD, "Cannot read CD-Text header\n"); - return (-1); - } - len = a_to_u_2_byte(tp->len) + sizeof (struct tocheader)-2; - printf("CD-Text len: %d\n", len); - - if (read_toc(scgp, xxb, 0, len, 0, FMT_CDTEXT) < 0) { - if (scgp->silent == 0) - errmsgno(EX_BAD, "Cannot read CD-Text\n"); - return (-1); - } - { - FILE *f = fileopen("cdtext.dat", "wctb"); - filewrite(f, xxb, len); - } - return (0); -} - -EXPORT int -read_trackinfo(scgp, track, offp, msfp, adrp, controlp, modep) - SCSI *scgp; - int track; - long *offp; - struct msf *msfp; - int *adrp; - int *controlp; - int *modep; -{ - struct diskinfo *dp; - char xb[256]; - int len; - - dp = (struct diskinfo *)xb; - - fillbytes((caddr_t)xb, sizeof (xb), '\0'); - if (read_toc(scgp, xb, track, sizeof (struct diskinfo), 0, FMT_TOC) < 0) { - if (scgp->silent <= 0) - errmsgno(EX_BAD, "Cannot read TOC\n"); - return (-1); - } - len = a_to_u_2_byte(dp->hd.len) + sizeof (struct tocheader)-2; - if (len < (int)sizeof (struct diskinfo)) - return (-1); - - if (offp) - *offp = a_to_4_byte(dp->desc[0].addr); - if (adrp) - *adrp = dp->desc[0].adr; - if (controlp) - *controlp = dp->desc[0].control; - - if (msfp) { - scgp->silent++; - if (read_toc(scgp, xb, track, sizeof (struct diskinfo), 1, FMT_TOC) - >= 0) { - msfp->msf_min = dp->desc[0].addr[1]; - msfp->msf_sec = dp->desc[0].addr[2]; - msfp->msf_frame = dp->desc[0].addr[3]; - } else if (read_toc(scgp, xb, track, sizeof (struct diskinfo), 0, FMT_TOC) - >= 0) { - /* - * Some drives (e.g. the Philips CDD-522) don't support - * to read the TOC in MSF mode. - */ - long off = a_to_4_byte(dp->desc[0].addr); - - lba_to_msf(off, msfp); - } else { - msfp->msf_min = 0; - msfp->msf_sec = 0; - msfp->msf_frame = 0; - } - scgp->silent--; - } - - if (modep == NULL) - return (0); - - if (track == 0xAA) { - *modep = -1; - return (0); - } - - fillbytes((caddr_t)xb, sizeof (xb), '\0'); - - scgp->silent++; - if (read_header(scgp, xb, *offp, 8, 0) >= 0) { - *modep = xb[0]; - } else if (read_track_info_philips(scgp, xb, track, 14) >= 0) { - *modep = xb[0xb] & 0xF; - } else { - *modep = -1; - } - scgp->silent--; - return (0); -} - -EXPORT int -read_B0(scgp, isbcd, b0p, lop) - SCSI *scgp; - BOOL isbcd; - long *b0p; - long *lop; -{ - struct fdiskinfo *dp; - struct ftrackdesc *tp; - char xb[8192]; - char *pe; - int len; - long l; - - dp = (struct fdiskinfo *)xb; - - fillbytes((caddr_t)xb, sizeof (xb), '\0'); - if (read_toc_philips(scgp, xb, 1, sizeof (struct tocheader), 0, FMT_FULLTOC) < 0) { - return (-1); - } - len = a_to_u_2_byte(dp->hd.len) + sizeof (struct tocheader)-2; - if (len < (int)sizeof (struct fdiskinfo)) - return (-1); - if (read_toc_philips(scgp, xb, 1, len, 0, FMT_FULLTOC) < 0) { - return (-1); - } - if (scgp->verbose) { - scg_prbytes("TOC data: ", (Uchar *)xb, - len > (int)sizeof (xb) - scg_getresid(scgp) ? - sizeof (xb) - scg_getresid(scgp) : len); - - tp = &dp->desc[0]; - pe = &xb[len]; - - while ((char *)tp < pe) { - scg_prbytes("ENT: ", (Uchar *)tp, 11); - tp++; - } - } - tp = &dp->desc[0]; - pe = &xb[len]; - - for (; (char *)tp < pe; tp++) { - if (tp->sess_number != dp->hd.last) - continue; - if (tp->point != 0xB0) - continue; - if (scgp->verbose) - scg_prbytes("B0: ", (Uchar *)tp, 11); - if (isbcd) { - l = msf_to_lba(from_bcd(tp->amin), - from_bcd(tp->asec), - from_bcd(tp->aframe), TRUE); - } else { - l = msf_to_lba(tp->amin, - tp->asec, - tp->aframe, TRUE); - } - if (b0p) - *b0p = l; - - if (scgp->verbose) - printf("B0 start: %ld\n", l); - - if (isbcd) { - l = msf_to_lba(from_bcd(tp->pmin), - from_bcd(tp->psec), - from_bcd(tp->pframe), TRUE); - } else { - l = msf_to_lba(tp->pmin, - tp->psec, - tp->pframe, TRUE); - } - - if (scgp->verbose) - printf("B0 lout: %ld\n", l); - if (lop) - *lop = l; - return (0); - } - return (-1); -} - - -/* - * Return address of first track in last session (SCSI-3/mmc version). - */ -EXPORT int -read_session_offset(scgp, offp) - SCSI *scgp; - long *offp; -{ - struct diskinfo *dp; - char xb[256]; - int len; - - dp = (struct diskinfo *)xb; - - fillbytes((caddr_t)xb, sizeof (xb), '\0'); - if (read_toc(scgp, (caddr_t)xb, 0, sizeof (struct tocheader), 0, FMT_SINFO) < 0) - return (-1); - - if (scgp->verbose) - scg_prbytes("tocheader: ", - (Uchar *)xb, sizeof (struct tocheader) - scg_getresid(scgp)); - - len = a_to_u_2_byte(dp->hd.len) + sizeof (struct tocheader)-2; - if (len > (int)sizeof (xb)) { - errmsgno(EX_BAD, "Session info too big.\n"); - return (-1); - } - if (read_toc(scgp, (caddr_t)xb, 0, len, 0, FMT_SINFO) < 0) - return (-1); - - if (scgp->verbose) - scg_prbytes("tocheader: ", - (Uchar *)xb, len - scg_getresid(scgp)); - - dp = (struct diskinfo *)xb; - if (offp) - *offp = a_to_u_4_byte(dp->desc[0].addr); - return (0); -} - -/* - * Return address of first track in last session (pre SCSI-3 version). - */ -EXPORT int -read_session_offset_philips(scgp, offp) - SCSI *scgp; - long *offp; -{ - struct sinfo *sp; - char xb[256]; - int len; - - sp = (struct sinfo *)xb; - - fillbytes((caddr_t)xb, sizeof (xb), '\0'); - if (read_toc_philips(scgp, (caddr_t)xb, 0, sizeof (struct siheader), 0, FMT_SINFO) < 0) - return (-1); - len = a_to_u_2_byte(sp->hd.len) + sizeof (struct siheader)-2; - if (len > (int)sizeof (xb)) { - errmsgno(EX_BAD, "Session info too big.\n"); - return (-1); - } - if (read_toc_philips(scgp, (caddr_t)xb, 0, len, 0, FMT_SINFO) < 0) - return (-1); - /* - * Old drives return the number of finished sessions in first/finished - * a descriptor is returned for each session. - * New drives return the number of the first and last session - * one descriptor for the last finished session is returned - * as in SCSI-3 - * In all cases the lowest session number is set to 1. - */ - sp = (struct sinfo *)xb; - if (offp) - *offp = a_to_u_4_byte(sp->desc[sp->hd.finished-1].addr); - return (0); -} - -EXPORT int -sense_secsize(scgp, current) - SCSI *scgp; - int current; -{ - Uchar mode[0x100]; - Uchar *p; - Uchar *ep; - int len; - int secsize = -1; - - scgp->silent++; - (void) unit_ready(scgp); - scgp->silent--; - - /* XXX Quick and dirty, musz verallgemeinert werden !!! */ - - fillbytes(mode, sizeof (mode), '\0'); - scgp->silent++; - - len = sizeof (struct scsi_mode_header) + - sizeof (struct scsi_mode_blockdesc); - /* - * Wenn wir hier get_mode_params() nehmen bekommen wir die Warnung: - * Warning: controller returns wrong page 1 for All pages page (3F). - */ - if (mode_sense(scgp, mode, len, 0x3F, current?0:2) < 0) { - fillbytes(mode, sizeof (mode), '\0'); - if (mode_sense(scgp, mode, len, 0, current?0:2) < 0) { /* VU (block desc) */ - scgp->silent--; - return (-1); - } - } - if (mode[3] == 8) { - if (scgp->debug) { - printf("Density: 0x%X\n", mode[4]); - printf("Blocks: %ld\n", a_to_u_3_byte(&mode[5])); - printf("Blocklen:%ld\n", a_to_u_3_byte(&mode[9])); - } - secsize = a_to_u_3_byte(&mode[9]); - } - fillbytes(mode, sizeof (mode), '\0'); - /* - * The ACARD TECH AEC-7720 ATAPI<->SCSI adaptor - * chokes if we try to transfer more than 0x40 bytes with - * mode_sense of all pages. So try to avoid to run this - * command if possible. - */ - if (scgp->debug && - mode_sense(scgp, mode, 0xFE, 0x3F, current?0:2) >= 0) { /* All Pages */ - - ep = mode+mode[0]; /* Points to last byte of data */ - p = &mode[4]; - p += mode[3]; - printf("Pages: "); - while (p < ep) { - printf("0x%X ", *p&0x3F); - p += p[1]+2; - } - printf("\n"); - } - scgp->silent--; - - return (secsize); -} - -EXPORT int -select_secsize(scgp, secsize) - SCSI *scgp; - int secsize; -{ - struct scsi_mode_data md; - int count = sizeof (struct scsi_mode_header) + - sizeof (struct scsi_mode_blockdesc); - - (void) test_unit_ready(scgp); /* clear any error situation */ - - fillbytes((caddr_t)&md, sizeof (md), '\0'); - md.header.blockdesc_len = 8; - i_to_3_byte(md.blockdesc.lblen, secsize); - - return (mode_select(scgp, (Uchar *)&md, count, 0, scgp->inq->data_format >= 2)); -} - -EXPORT BOOL -is_cddrive(scgp) - SCSI *scgp; -{ - return (scgp->inq->type == INQ_ROMD || scgp->inq->type == INQ_WORM); -} - -EXPORT BOOL -is_unknown_dev(scgp) - SCSI *scgp; -{ - return (scgp->dev == DEV_UNKNOWN); -} - -#ifndef DEBUG -#define DEBUG -#endif -#ifdef DEBUG - -EXPORT int -read_scsi(scgp, bp, addr, cnt) - SCSI *scgp; - caddr_t bp; - long addr; - int cnt; -{ - if (addr <= G0_MAXADDR && cnt < 256 && !is_atapi) - return (read_g0(scgp, bp, addr, cnt)); - else - return (read_g1(scgp, bp, addr, cnt)); -} - -EXPORT int -read_g0(scgp, bp, addr, cnt) - SCSI *scgp; - caddr_t bp; - long addr; - int cnt; -{ - register struct scg_cmd *scmd = scgp->scmd; - - if (scgp->cap->c_bsize <= 0) - raisecond("capacity_not_set", 0L); - - fillbytes((caddr_t)scmd, sizeof (*scmd), '\0'); - scmd->addr = bp; - scmd->size = cnt*scgp->cap->c_bsize; - scmd->flags = SCG_RECV_DATA|SCG_DISRE_ENA; - scmd->cdb_len = SC_G0_CDBLEN; - scmd->sense_len = CCS_SENSE_LEN; - scmd->cdb.g0_cdb.cmd = SC_READ; - scmd->cdb.g0_cdb.lun = scg_lun(scgp); - g0_cdbaddr(&scmd->cdb.g0_cdb, addr); - scmd->cdb.g0_cdb.count = cnt; -/* scmd->cdb.g0_cdb.vu_56 = 1;*/ - - scgp->cmdname = "read_g0"; - - return (scg_cmd(scgp)); -} - -EXPORT int -read_g1(scgp, bp, addr, cnt) - SCSI *scgp; - caddr_t bp; - long addr; - int cnt; -{ - register struct scg_cmd *scmd = scgp->scmd; - - if (scgp->cap->c_bsize <= 0) - raisecond("capacity_not_set", 0L); - - fillbytes((caddr_t)scmd, sizeof (*scmd), '\0'); - scmd->addr = bp; - scmd->size = cnt*scgp->cap->c_bsize; - scmd->flags = SCG_RECV_DATA|SCG_DISRE_ENA; - scmd->cdb_len = SC_G1_CDBLEN; - scmd->sense_len = CCS_SENSE_LEN; - scmd->cdb.g1_cdb.cmd = SC_EREAD; - scmd->cdb.g1_cdb.lun = scg_lun(scgp); - g1_cdbaddr(&scmd->cdb.g1_cdb, addr); - g1_cdblen(&scmd->cdb.g1_cdb, cnt); - - scgp->cmdname = "read_g1"; - - return (scg_cmd(scgp)); -} -#endif /* DEBUG */ - -EXPORT BOOL -getdev(scgp, print) - SCSI *scgp; - BOOL print; -{ - BOOL got_inquiry = TRUE; - char vendor_info[8+1]; - char prod_ident[16+1]; - char prod_revision[4+1]; - int inq_len = 0; - register struct scg_cmd *scmd = scgp->scmd; - register struct scsi_inquiry *inq = scgp->inq; - - - fillbytes((caddr_t)inq, sizeof (*inq), '\0'); - scgp->dev = DEV_UNKNOWN; - scgp->silent++; - (void) unit_ready(scgp); - if (scmd->error >= SCG_FATAL && - !(scmd->scb.chk && scmd->sense_count > 0)) { - scgp->silent--; - return (FALSE); - } - - -/* if (scmd->error < SCG_FATAL || scmd->scb.chk && scmd->sense_count > 0){*/ - - if (inquiry(scgp, (caddr_t)inq, sizeof (*inq)) < 0) { - got_inquiry = FALSE; - } else { - inq_len = sizeof (*inq) - scg_getresid(scgp); - } - if (!got_inquiry) { - if (scgp->verbose) { - printf( - "error: %d scb.chk: %d sense_count: %d sense.code: 0x%x\n", - scmd->error, scmd->scb.chk, - scmd->sense_count, scmd->sense.code); - } - /* - * Folgende Kontroller kennen das Kommando - * INQUIRY nicht: - * - * ADAPTEC ACB-4000, ACB-4010, ACB 4070 - * SYSGEN SC4000 - * - * Leider reagieren ACB40X0 und ACB5500 identisch - * wenn drive not ready (code == not ready), - * sie sind dann nicht zu unterscheiden. - */ - - if (scmd->scb.chk && scmd->sense_count == 4) { - /* Test auf SYSGEN */ - (void) qic02(scgp, 0x12); /* soft lock on */ - if (qic02(scgp, 1) < 0) { /* soft lock off */ - scgp->dev = DEV_ACB40X0; -/* scgp->dev = acbdev();*/ - } else { - scgp->dev = DEV_SC4000; - inq->type = INQ_SEQD; - inq->removable = 1; - } - } - } else if (scgp->verbose) { - int i; - int len = inq->add_len + 5; - Uchar ibuf[256+5]; - Uchar *ip = (Uchar *)inq; - Uchar c; - - if (len > (int)sizeof (*inq) && - inquiry(scgp, (caddr_t)ibuf, inq->add_len+5) >= 0) { - len = inq->add_len+5 - scg_getresid(scgp); - ip = ibuf; - } else { - len = sizeof (*inq); - } - printf("Inquiry Data : "); - for (i = 0; i < len; i++) { - c = ip[i]; - if (c >= ' ' && c < 0177) - printf("%c", c); - else - printf("."); - } - printf("\n"); - } - - strncpy(vendor_info, inq->vendor_info, sizeof (inq->vendor_info)); - strncpy(prod_ident, inq->prod_ident, sizeof (inq->prod_ident)); - strncpy(prod_revision, inq->prod_revision, sizeof (inq->prod_revision)); - - vendor_info[sizeof (inq->vendor_info)] = '\0'; - prod_ident[sizeof (inq->prod_ident)] = '\0'; - prod_revision[sizeof (inq->prod_revision)] = '\0'; - - switch (inq->type) { - - case INQ_DASD: - if (inq->add_len == 0 && inq->vendor_info[0] != '\0') { - Uchar *p; - /* - * NT-4.0 creates fake inquiry data for IDE disks. - * Unfortunately, it does not set add_len wo we - * check if vendor_info, prod_ident and prod_revision - * contains valid chars for a CCS inquiry. - */ - if (inq_len >= 36) - inq->add_len = 31; - - for (p = (Uchar *)&inq->vendor_info[0]; - p < (Uchar *)&inq->prod_revision[4]; - p++) { - if (*p < 0x20 || *p > 0x7E) { - inq->add_len = 0; - break; - } - } - } - if (inq->add_len == 0) { - if (scgp->dev == DEV_UNKNOWN && got_inquiry) { - scgp->dev = DEV_ACB5500; - strcpy(inq->vendor_info, - "ADAPTEC ACB-5500 FAKE"); - - } else switch (scgp->dev) { - - case DEV_ACB40X0: - strcpy(inq->vendor_info, - "ADAPTEC ACB-40X0 FAKE"); - break; - case DEV_ACB4000: - strcpy(inq->vendor_info, - "ADAPTEC ACB-4000 FAKE"); - break; - case DEV_ACB4010: - strcpy(inq->vendor_info, - "ADAPTEC ACB-4010 FAKE"); - break; - case DEV_ACB4070: - strcpy(inq->vendor_info, - "ADAPTEC ACB-4070 FAKE"); - break; - } - } else if (inq->add_len < 31) { - scgp->dev = DEV_NON_CCS_DSK; - - } else if (strbeg("EMULEX", vendor_info)) { - if (strbeg("MD21", prod_ident)) - scgp->dev = DEV_MD21; - if (strbeg("MD23", prod_ident)) - scgp->dev = DEV_MD23; - else - scgp->dev = DEV_CCS_GENDISK; - } else if (strbeg("ADAPTEC", vendor_info)) { - if (strbeg("ACB-4520", prod_ident)) - scgp->dev = DEV_ACB4520A; - if (strbeg("ACB-4525", prod_ident)) - scgp->dev = DEV_ACB4525; - else - scgp->dev = DEV_CCS_GENDISK; - } else if (strbeg("SONY", vendor_info) && - strbeg("SMO-C501", prod_ident)) { - scgp->dev = DEV_SONY_SMO; - } else { - scgp->dev = DEV_CCS_GENDISK; - } - break; - - case INQ_SEQD: - if (scgp->dev == DEV_SC4000) { - strcpy(inq->vendor_info, - "SYSGEN SC4000 FAKE"); - } else if (inq->add_len == 0 && - inq->removable && - inq->ansi_version == 1) { - scgp->dev = DEV_MT02; - strcpy(inq->vendor_info, - "EMULEX MT02 FAKE"); - } - break; - -/* case INQ_OPTD:*/ - case INQ_ROMD: - case INQ_WORM: - if (strbeg("RXT-800S", prod_ident)) - scgp->dev = DEV_RXT800S; - - /* - * Start of CD-Recorders: - */ - if (strbeg("ACER", vendor_info)) { - if (strbeg("CR-4020C", prod_ident)) - scgp->dev = DEV_RICOH_RO_1420C; - - } else if (strbeg("CREATIVE", vendor_info)) { - if (strbeg("CDR2000", prod_ident)) - scgp->dev = DEV_RICOH_RO_1060C; - - } else if (strbeg("GRUNDIG", vendor_info)) { - if (strbeg("CDR100IPW", prod_ident)) - scgp->dev = DEV_CDD_2000; - - } else if (strbeg("JVC", vendor_info)) { - if (strbeg("XR-W2001", prod_ident)) - scgp->dev = DEV_TEAC_CD_R50S; - else if (strbeg("XR-W2010", prod_ident)) - scgp->dev = DEV_TEAC_CD_R50S; - else if (strbeg("R2626", prod_ident)) - scgp->dev = DEV_TEAC_CD_R50S; - - } else if (strbeg("MITSBISH", vendor_info)) { - -#ifdef XXXX_REALLY - /* It's MMC compliant */ - if (strbeg("CDRW226", prod_ident)) - scgp->dev = DEV_MMC_CDRW; -#else - /* EMPTY */ -#endif - - } else if (strbeg("MITSUMI", vendor_info)) { - /* Don't know any product string */ - scgp->dev = DEV_CDD_522; - - } else if (strbeg("OPTIMA", vendor_info)) { - if (strbeg("CD-R 650", prod_ident)) - scgp->dev = DEV_SONY_CDU_924; - - } else if (strbeg("PHILIPS", vendor_info) || - strbeg("IMS", vendor_info) || - strbeg("KODAK", vendor_info) || - strbeg("HP", vendor_info)) { - - if (strbeg("CDD521/00", prod_ident)) - scgp->dev = DEV_CDD_521_OLD; - else if (strbeg("CDD521/02", prod_ident)) - scgp->dev = DEV_CDD_521_OLD; /* PCD 200R? */ - else if (strbeg("CDD521", prod_ident)) - scgp->dev = DEV_CDD_521; - - if (strbeg("CDD522", prod_ident)) - scgp->dev = DEV_CDD_522; - if (strbeg("PCD225", prod_ident)) - scgp->dev = DEV_CDD_522; - if (strbeg("KHSW/OB", prod_ident)) /* PCD600 */ - scgp->dev = DEV_PCD_600; - if (strbeg("CDR-240", prod_ident)) - scgp->dev = DEV_CDD_2000; - - if (strbeg("CDD20", prod_ident)) - scgp->dev = DEV_CDD_2000; - if (strbeg("CDD26", prod_ident)) - scgp->dev = DEV_CDD_2600; - - if (strbeg("C4324/C4325", prod_ident)) - scgp->dev = DEV_CDD_2000; - if (strbeg("CD-Writer 6020", prod_ident)) - scgp->dev = DEV_CDD_2600; - - } else if (strbeg("PINNACLE", vendor_info)) { - if (strbeg("RCD-1000", prod_ident)) - scgp->dev = DEV_TEAC_CD_R50S; - if (strbeg("RCD5020", prod_ident)) - scgp->dev = DEV_TEAC_CD_R50S; - if (strbeg("RCD5040", prod_ident)) - scgp->dev = DEV_TEAC_CD_R50S; - if (strbeg("RCD 4X4", prod_ident)) - scgp->dev = DEV_TEAC_CD_R50S; - - } else if (strbeg("PIONEER", vendor_info)) { - if (strbeg("CD-WO DW-S114X", prod_ident)) - scgp->dev = DEV_PIONEER_DW_S114X; - else if (strbeg("CD-WO DR-R504X", prod_ident)) /* Reoprt from philip@merge.com */ - scgp->dev = DEV_PIONEER_DW_S114X; - else if (strbeg("DVD-R DVR-S101", prod_ident)) - scgp->dev = DEV_PIONEER_DVDR_S101; - - } else if (strbeg("PLASMON", vendor_info)) { - if (strbeg("RF4100", prod_ident)) - scgp->dev = DEV_PLASMON_RF_4100; - else if (strbeg("CDR4220", prod_ident)) - scgp->dev = DEV_CDD_2000; - - } else if (strbeg("PLEXTOR", vendor_info)) { - if (strbeg("CD-R PX-R24CS", prod_ident)) - scgp->dev = DEV_RICOH_RO_1420C; - - } else if (strbeg("RICOH", vendor_info)) { - if (strbeg("RO-1420C", prod_ident)) - scgp->dev = DEV_RICOH_RO_1420C; - if (strbeg("RO1060C", prod_ident)) - scgp->dev = DEV_RICOH_RO_1060C; - - } else if (strbeg("SAF", vendor_info)) { /* Smart & Friendly */ - if (strbeg("CD-R2004", prod_ident) || - strbeg("CD-R2006 ", prod_ident)) - scgp->dev = DEV_SONY_CDU_924; - else if (strbeg("CD-R2006PLUS", prod_ident)) - scgp->dev = DEV_TEAC_CD_R50S; - else if (strbeg("CD-RW226", prod_ident)) - scgp->dev = DEV_TEAC_CD_R50S; - else if (strbeg("CD-R4012", prod_ident)) - scgp->dev = DEV_TEAC_CD_R50S; - - } else if (strbeg("SANYO", vendor_info)) { - if (strbeg("CD-WO CRD-R24S", prod_ident)) - scgp->dev = DEV_CDD_521; - - } else if (strbeg("SONY", vendor_info)) { - if (strbeg("CD-R CDU92", prod_ident) || - strbeg("CD-R CDU94", prod_ident)) - scgp->dev = DEV_SONY_CDU_924; - - } else if (strbeg("TEAC", vendor_info)) { - if (strbeg("CD-R50S", prod_ident) || - strbeg("CD-R55S", prod_ident)) - scgp->dev = DEV_TEAC_CD_R50S; - - } else if (strbeg("TRAXDATA", vendor_info) || - strbeg("Traxdata", vendor_info)) { - if (strbeg("CDR4120", prod_ident)) - scgp->dev = DEV_TEAC_CD_R50S; - - } else if (strbeg("T.YUDEN", vendor_info)) { - if (strbeg("CD-WO EW-50", prod_ident)) - scgp->dev = DEV_TYUDEN_EW50; - - } else if (strbeg("WPI", vendor_info)) { /* Wearnes */ - if (strbeg("CDR-632P", prod_ident)) - scgp->dev = DEV_CDD_2600; - - } else if (strbeg("YAMAHA", vendor_info)) { - if (strbeg("CDR10", prod_ident)) - scgp->dev = DEV_YAMAHA_CDR_100; - if (strbeg("CDR200", prod_ident)) - scgp->dev = DEV_YAMAHA_CDR_400; - if (strbeg("CDR400", prod_ident)) - scgp->dev = DEV_YAMAHA_CDR_400; - - } else if (strbeg("MATSHITA", vendor_info)) { - if (strbeg("CD-R CW-7501", prod_ident)) - scgp->dev = DEV_MATSUSHITA_7501; - if (strbeg("CD-R CW-7502", prod_ident)) - scgp->dev = DEV_MATSUSHITA_7502; - } - if (scgp->dev == DEV_UNKNOWN) { - /* - * We do not have Manufacturer strings for - * the following drives. - */ - if (strbeg("CDS615E", prod_ident)) /* Olympus */ - scgp->dev = DEV_SONY_CDU_924; - } - if (scgp->dev == DEV_UNKNOWN && inq->type == INQ_ROMD) { - BOOL cdrr = FALSE; - BOOL cdwr = FALSE; - BOOL cdrrw = FALSE; - BOOL cdwrw = FALSE; - BOOL dvd = FALSE; - BOOL dvdwr = FALSE; - - scgp->dev = DEV_CDROM; - - if (mmc_check(scgp, &cdrr, &cdwr, &cdrrw, &cdwrw, - &dvd, &dvdwr)) - scgp->dev = DEV_MMC_CDROM; - if (cdwr) - scgp->dev = DEV_MMC_CDR; - if (cdwrw) - scgp->dev = DEV_MMC_CDRW; - if (dvd) - scgp->dev = DEV_MMC_DVD; - if (dvdwr) - scgp->dev = DEV_MMC_DVD_WR; - } - break; - - case INQ_PROCD: - if (strbeg("BERTHOLD", vendor_info)) { - if (strbeg("", prod_ident)) - scgp->dev = DEV_HRSCAN; - } - break; - - case INQ_SCAN: - scgp->dev = DEV_MS300A; - break; - } - scgp->silent--; - if (!print) - return (TRUE); - - if (scgp->dev == DEV_UNKNOWN && !got_inquiry) { -#ifdef PRINT_INQ_ERR - scg_printerr(scgp); -#endif - return (FALSE); - } - - printinq(scgp, stdout); - return (TRUE); -} - -EXPORT void -printinq(scgp, f) - SCSI *scgp; - FILE *f; -{ - register struct scsi_inquiry *inq = scgp->inq; - - fprintf(f, "Device type : "); - scg_fprintdev(f, inq); - fprintf(f, "Version : %d\n", inq->ansi_version); - fprintf(f, "Response Format: %d\n", inq->data_format); - if (inq->data_format >= 2) { - fprintf(f, "Capabilities : "); - if (inq->aenc) fprintf(f, "AENC "); - if (inq->termiop) fprintf(f, "TERMIOP "); - if (inq->reladr) fprintf(f, "RELADR "); - if (inq->wbus32) fprintf(f, "WBUS32 "); - if (inq->wbus16) fprintf(f, "WBUS16 "); - if (inq->sync) fprintf(f, "SYNC "); - if (inq->linked) fprintf(f, "LINKED "); - if (inq->cmdque) fprintf(f, "CMDQUE "); - if (inq->softreset) fprintf(f, "SOFTRESET "); - fprintf(f, "\n"); - } - if (inq->add_len >= 31 || - inq->vendor_info[0] || - inq->prod_ident[0] || - inq->prod_revision[0]) { - fprintf(f, "Vendor_info : '%.8s'\n", inq->vendor_info); - fprintf(f, "Identifikation : '%.16s'\n", inq->prod_ident); - fprintf(f, "Revision : '%.4s'\n", inq->prod_revision); - } -} - -EXPORT void -printdev(scgp) - SCSI *scgp; -{ - printf("Device seems to be: "); - - switch (scgp->dev) { - - case DEV_UNKNOWN: printf("unknown"); break; - case DEV_ACB40X0: printf("Adaptec 4000/4010/4070"); break; - case DEV_ACB4000: printf("Adaptec 4000"); break; - case DEV_ACB4010: printf("Adaptec 4010"); break; - case DEV_ACB4070: printf("Adaptec 4070"); break; - case DEV_ACB5500: printf("Adaptec 5500"); break; - case DEV_ACB4520A: printf("Adaptec 4520A"); break; - case DEV_ACB4525: printf("Adaptec 4525"); break; - case DEV_MD21: printf("Emulex MD21"); break; - case DEV_MD23: printf("Emulex MD23"); break; - case DEV_NON_CCS_DSK: printf("Generic NON CCS Disk"); break; - case DEV_CCS_GENDISK: printf("Generic CCS Disk"); break; - case DEV_SONY_SMO: printf("Sony SMO-C501"); break; - case DEV_MT02: printf("Emulex MT02"); break; - case DEV_SC4000: printf("Sysgen SC4000"); break; - case DEV_RXT800S: printf("Maxtor RXT800S"); break; - case DEV_HRSCAN: printf("Berthold HR-Scanner"); break; - case DEV_MS300A: printf("Microtek MS300A"); break; - - case DEV_CDROM: printf("Generic CD-ROM"); break; - case DEV_MMC_CDROM: printf("Generic mmc CD-ROM"); break; - case DEV_MMC_CDR: printf("Generic mmc CD-R"); break; - case DEV_MMC_CDRW: printf("Generic mmc CD-RW"); break; - case DEV_MMC_DVD: printf("Generic mmc2 DVD-ROM"); break; - case DEV_MMC_DVD_WR: printf("Generic mmc2 DVD-R/DVD-RW/DVD-RAM"); break; - case DEV_CDD_521_OLD: printf("Philips old CDD-521"); break; - case DEV_CDD_521: printf("Philips CDD-521"); break; - case DEV_CDD_522: printf("Philips CDD-522"); break; - case DEV_PCD_600: printf("Kodak PCD-600"); break; - case DEV_CDD_2000: printf("Philips CDD-2000"); break; - case DEV_CDD_2600: printf("Philips CDD-2600"); break; - case DEV_YAMAHA_CDR_100:printf("Yamaha CDR-100"); break; - case DEV_YAMAHA_CDR_400:printf("Yamaha CDR-400"); break; - case DEV_PLASMON_RF_4100:printf("Plasmon RF-4100"); break; - case DEV_SONY_CDU_924: printf("Sony CDU-924S"); break; - case DEV_RICOH_RO_1060C:printf("Ricoh RO-1060C"); break; - case DEV_RICOH_RO_1420C:printf("Ricoh RO-1420C"); break; - case DEV_TEAC_CD_R50S: printf("Teac CD-R50S"); break; - case DEV_MATSUSHITA_7501:printf("Matsushita CW-7501"); break; - case DEV_MATSUSHITA_7502:printf("Matsushita CW-7502"); break; - - case DEV_PIONEER_DW_S114X: printf("Pioneer DW-S114X"); break; - case DEV_PIONEER_DVDR_S101:printf("Pioneer DVD-R S101"); break; - - default: printf("Missing Entry for dev %d", - scgp->dev); break; - - } - printf(".\n"); - -} - -EXPORT BOOL -do_inquiry(scgp, print) - SCSI *scgp; - int print; -{ - if (getdev(scgp, print)) { - if (print) - printdev(scgp); - return (TRUE); - } else { - return (FALSE); - } -} - -EXPORT BOOL -recovery_needed(scgp, dp) - SCSI *scgp; - cdr_t *dp; -{ - int err; - register struct scg_cmd *scmd = scgp->scmd; - - scgp->silent++; - err = test_unit_ready(scgp); - scgp->silent--; - - if (err >= 0) - return (FALSE); - else if (scmd->error >= SCG_FATAL) /* nicht selektierbar */ - return (FALSE); - - if (scmd->sense.code < 0x70) /* non extended Sense */ - return (FALSE); - - /* XXX Old Philips code */ - return (((struct scsi_ext_sense *)&scmd->sense)->sense_code == 0xD0); -} - -EXPORT int -scsi_load(scgp, dp) - SCSI *scgp; - cdr_t *dp; -{ - int key; - int code; - - if ((dp->cdr_flags & CDR_CADDYLOAD) == 0) { - if (scsi_start_stop_unit(scgp, 1, 1, dp && (dp->cdr_cmdflags&F_IMMED)) >= 0) - return (0); - } - - if (wait_unit_ready(scgp, 60)) - return (0); - - key = scg_sense_key(scgp); - code = scg_sense_code(scgp); - - if (key == SC_NOT_READY && (code == 0x3A || code == 0x30)) { - errmsgno(EX_BAD, "Cannot load media with %s drive!\n", - (dp->cdr_flags & CDR_CADDYLOAD) ? "caddy" : "this"); - errmsgno(EX_BAD, "Try to load media by hand.\n"); - } - return (-1); -} - -EXPORT int -scsi_unload(scgp, dp) - SCSI *scgp; - cdr_t *dp; -{ - return (scsi_start_stop_unit(scgp, 0, 1, dp && (dp->cdr_cmdflags&F_IMMED))); -} - -EXPORT int -scsi_cdr_write(scgp, bp, sectaddr, size, blocks, islast) - SCSI *scgp; - caddr_t bp; /* address of buffer */ - long sectaddr; /* disk address (sector) to put */ - long size; /* number of bytes to transfer */ - int blocks; /* sector count */ - BOOL islast; /* last write for track */ -{ - return (write_xg1(scgp, bp, sectaddr, size, blocks)); -} - -EXPORT struct cd_mode_page_2A * -mmc_cap(scgp, modep) - SCSI *scgp; - Uchar *modep; -{ - int len; - int val; - Uchar mode[0x100]; - struct cd_mode_page_2A *mp; - struct cd_mode_page_2A *mp2; - - -retry: - fillbytes((caddr_t)mode, sizeof (mode), '\0'); - - if (!get_mode_params(scgp, 0x2A, "CD capabilities", - mode, (Uchar *)0, (Uchar *)0, (Uchar *)0, &len)) { - - if (scg_sense_key(scgp) == SC_NOT_READY) { - if (wait_unit_ready(scgp, 60)) - goto retry; - } - return (NULL); /* Pre SCSI-3/mmc drive */ - } - - if (len == 0) /* Pre SCSI-3/mmc drive */ - return (NULL); - - mp = (struct cd_mode_page_2A *) - (mode + sizeof (struct scsi_mode_header) + - ((struct scsi_mode_header *)mode)->blockdesc_len); - - /* - * Do some heuristics against pre SCSI-3/mmc VU page 2A - * We should test for a minimum p_len of 0x14, but some - * buggy CD-ROM readers ommit the write speed values. - */ - if (mp->p_len < 0x10) - return (NULL); - - val = a_to_u_2_byte(mp->max_read_speed); - if (val != 0 && val < 176) - return (NULL); - - val = a_to_u_2_byte(mp->cur_read_speed); - if (val != 0 && val < 176) - return (NULL); - - len -= sizeof (struct scsi_mode_header) + - ((struct scsi_mode_header *)mode)->blockdesc_len; - if (modep) - mp2 = (struct cd_mode_page_2A *)modep; - else - mp2 = malloc(len); - if (mp2) - movebytes(mp, mp2, len); - - return (mp2); -} - -EXPORT void -mmc_getval(mp, cdrrp, cdwrp, cdrrwp, cdwrwp, dvdp, dvdwp) - struct cd_mode_page_2A *mp; - BOOL *cdrrp; /* CD ROM */ - BOOL *cdwrp; /* CD-R writer */ - BOOL *cdrrwp; /* CD-RW reader */ - BOOL *cdwrwp; /* CD-RW writer */ - BOOL *dvdp; /* DVD reader */ - BOOL *dvdwp; /* DVD writer */ -{ - BOOL isdvd; /* Any DVD reader */ - BOOL isdvd_wr; /* DVD writer (R / RAM) */ - BOOL iscd_wr; /* CD writer */ - - iscd_wr = (mp->cd_r_write != 0) || /* SCSI-3/mmc CD-R */ - (mp->cd_rw_write != 0); /* SCSI-3/mmc CD-RW */ - - if (cdrrp) - *cdrrp = (mp->cd_r_read != 0); /* SCSI-3/mmc CD */ - if (cdwrp) - *cdwrp = (mp->cd_r_write != 0); /* SCSI-3/mmc CD-R */ - - if (cdrrwp) - *cdrrwp = (mp->cd_rw_read != 0); /* SCSI-3/mmc CD */ - if (cdwrwp) - *cdwrwp = (mp->cd_rw_write != 0); /* SCSI-3/mmc CD-RW */ - - isdvd = /* SCSI-3/mmc2 DVD */ - (mp->dvd_ram_read + mp->dvd_r_read + - mp->dvd_rom_read) != 0; - - isdvd_wr = /* SCSI-3/mmc2 DVD writer*/ - (mp->dvd_ram_write + mp->dvd_r_write) != 0; - - if (dvdp) - *dvdp = isdvd; - if (dvdwp) - *dvdwp = isdvd_wr; -} - -EXPORT BOOL -is_mmc(scgp, cdwp, dvdwp) - SCSI *scgp; - BOOL *cdwp; /* CD writer */ - BOOL *dvdwp; /* DVD writer */ -{ - BOOL cdwr = FALSE; - BOOL cdwrw = FALSE; - - if (cdwp) - *cdwp = FALSE; - if (dvdwp) - *dvdwp = FALSE; - - if (!mmc_check(scgp, NULL, &cdwr, NULL, &cdwrw, NULL, dvdwp)) - return (FALSE); - - if (cdwp) - *cdwp = cdwr | cdwrw; - - return (TRUE); -} - -EXPORT BOOL -mmc_check(scgp, cdrrp, cdwrp, cdrrwp, cdwrwp, dvdp, dvdwp) - SCSI *scgp; - BOOL *cdrrp; /* CD ROM */ - BOOL *cdwrp; /* CD-R writer */ - BOOL *cdrrwp; /* CD-RW reader */ - BOOL *cdwrwp; /* CD-RW writer */ - BOOL *dvdp; /* DVD reader */ - BOOL *dvdwp; /* DVD writer */ -{ - Uchar mode[0x100]; - BOOL was_atapi; - struct cd_mode_page_2A *mp; - - if (scgp->inq->type != INQ_ROMD) - return (FALSE); - - fillbytes((caddr_t)mode, sizeof (mode), '\0'); - - was_atapi = allow_atapi(scgp, TRUE); - scgp->silent++; - mp = mmc_cap(scgp, mode); - scgp->silent--; - allow_atapi(scgp, was_atapi); - if (mp == NULL) - return (FALSE); - - mmc_getval(mp, cdrrp, cdwrp, cdrrwp, cdwrwp, dvdp, dvdwp); - - return (TRUE); /* Generic SCSI-3/mmc CD */ -} - -LOCAL void -print_speed(fmt, val) - char *fmt; - int val; -{ - printf(" %s: %5d kB/s", fmt, val); - printf(" (CD %3ux,", val/176); - printf(" DVD %2ux,", val/1385); - printf(" BD %2ux)\n", val/4495); -} - -#define DOES(what, flag) printf(" Does %s%s\n", flag?"":"not ", what) -#define IS(what, flag) printf(" Is %s%s\n", flag?"":"not ", what) -#define VAL(what, val) printf(" %s: %d\n", what, val[0]*256 + val[1]) -#define SVAL(what, val) printf(" %s: %s\n", what, val) - -EXPORT void -print_capabilities(scgp) - SCSI *scgp; -{ - BOOL was_atapi; - Uchar mode[0x100]; - struct cd_mode_page_2A *mp; -static const char *bclk[4] = {"32", "16", "24", "24 (I2S)"}; -static const char *load[8] = {"caddy", "tray", "pop-up", "reserved(3)", - "disc changer", "cartridge changer", - "reserved(6)", "reserved(7)" }; -static const char *rotctl[4] = {"CLV/PCAV", "CAV", "reserved(2)", "reserved(3)"}; - - - if (scgp->inq->type != INQ_ROMD) - return; - - fillbytes((caddr_t)mode, sizeof (mode), '\0'); - - was_atapi = allow_atapi(scgp, TRUE); /* Try to switch to 10 byte mode cmds */ - scgp->silent++; - mp = mmc_cap(scgp, mode); - scgp->silent--; - allow_atapi(scgp, was_atapi); - if (mp == NULL) - return; - - printf("\nDrive capabilities, per"); - if (mp->p_len >= 28) - printf(" MMC-3"); - else if (mp->p_len >= 24) - printf(" MMC-2"); - else - printf(" MMC"); - printf(" page 2A:\n\n"); - - DOES("read CD-R media", mp->cd_r_read); - DOES("write CD-R media", mp->cd_r_write); - DOES("read CD-RW media", mp->cd_rw_read); - DOES("write CD-RW media", mp->cd_rw_write); - DOES("read DVD-ROM media", mp->dvd_rom_read); - DOES("read DVD-R media", mp->dvd_r_read); - DOES("write DVD-R media", mp->dvd_r_write); - DOES("read DVD-RAM media", mp->dvd_ram_read); - DOES("write DVD-RAM media", mp->dvd_ram_write); - DOES("support test writing", mp->test_write); - printf("\n"); - DOES("read Mode 2 Form 1 blocks", mp->mode_2_form_1); - DOES("read Mode 2 Form 2 blocks", mp->mode_2_form_2); - DOES("read digital audio blocks", mp->cd_da_supported); - if (mp->cd_da_supported) - DOES("restart non-streamed digital audio reads accurately", mp->cd_da_accurate); - DOES("support Buffer-Underrun-Free recording", mp->BUF); - DOES("read multi-session CDs", mp->multi_session); - DOES("read fixed-packet CD media using Method 2", mp->method2); - DOES("read CD bar code", mp->read_bar_code); - DOES("read R-W subcode information", mp->rw_supported); - if (mp->rw_supported) - DOES("return R-W subcode de-interleaved and error-corrected", mp->rw_deint_corr); - DOES("read raw P-W subcode data from lead in", mp->pw_in_lead_in); - DOES("return CD media catalog number", mp->UPC); - DOES("return CD ISRC information", mp->ISRC); - DOES("support C2 error pointers", mp->c2_pointers); - DOES("deliver composite A/V data", mp->composite); - printf("\n"); - DOES("play audio CDs", mp->audio_play); - if (mp->audio_play) { - VAL("Number of volume control levels", mp->num_vol_levels); - DOES("support individual volume control setting for each channel", mp->sep_chan_vol); - DOES("support independent mute setting for each channel", mp->sep_chan_mute); - DOES("support digital output on port 1", mp->digital_port_1); - DOES("support digital output on port 2", mp->digital_port_2); - if (mp->digital_port_1 || mp->digital_port_2) { - DOES("send digital data LSB-first", mp->LSBF); - DOES("set LRCK high for left-channel data", mp->RCK); - DOES("have valid data on falling edge of clock", mp->BCK); - SVAL("Length of data in BCLKs", bclk[mp->length]); - } - } - printf("\n"); - SVAL("Loading mechanism type", load[mp->loading_type]); - DOES("support ejection of CD via START/STOP command", mp->eject); - DOES("lock media on power up via prevent jumper", mp->prevent_jumper); - DOES("allow media to be locked in the drive via PREVENT/ALLOW command", mp->lock); - IS("currently in a media-locked state", mp->lock_state); - DOES("support changing side of disk", mp->side_change); - DOES("have load-empty-slot-in-changer feature", mp->sw_slot_sel); - DOES("support Individual Disk Present feature", mp->disk_present_rep); - printf("\n"); - print_speed("Maximum read speed", a_to_u_2_byte(mp->max_read_speed)); - print_speed("Current read speed", a_to_u_2_byte(mp->cur_read_speed)); - print_speed("Maximum write speed", a_to_u_2_byte(mp->max_write_speed)); - if (mp->p_len >= 28) - print_speed("Current write speed", a_to_u_2_byte(mp->v3_cur_write_speed)); - else - print_speed("Current write speed", a_to_u_2_byte(mp->cur_write_speed)); - if (mp->p_len >= 28) { - SVAL("Rotational control selected", rotctl[mp->rot_ctl_sel]); - } - VAL("Buffer size in KB", mp->buffer_size); - - if (mp->p_len >= 24) { - VAL("Copy management revision supported", mp->copy_man_rev); - } - - if (mp->p_len >= 28) { - struct cd_wr_speed_performance *pp; - Uint ndesc; - Uint i; - Uint n; - - ndesc = a_to_u_2_byte(mp->num_wr_speed_des); - pp = mp->wr_speed_des; - printf(" Number of supported write speeds: %d\n", ndesc); - for (i = 0; i < ndesc; i++, pp++) { - printf(" Write speed # %d:", i); - n = a_to_u_2_byte(pp->wr_speed_supp); - printf(" %5d kB/s", n); - printf(" %s", rotctl[pp->rot_ctl_sel]); - printf(" (CD %3ux,", n/176); - printf(" DVD %2ux,", n/1385); - printf(" BD %2ux)\n", n/4495); - } - } - - /* Generic SCSI-3/mmc CD */ -} - -EXPORT int -verify(scgp, start, count, bad_block) - SCSI *scgp; - long start; - int count; - long *bad_block; -{ - register struct scg_cmd *scmd = scgp->scmd; - - fillbytes((caddr_t)scmd, sizeof (*scmd), '\0'); - scmd->addr = (caddr_t)0; - scmd->size = 0; - scmd->flags = SCG_DISRE_ENA; - scmd->cdb_len = SC_G1_CDBLEN; - scmd->sense_len = CCS_SENSE_LEN; - scmd->cdb.g1_cdb.cmd = 0x2F; /* Verify */ - scmd->cdb.g1_cdb.lun = scg_lun(scgp); - g1_cdbaddr(&scmd->cdb.g1_cdb, start); - g1_cdblen(&scmd->cdb.g1_cdb, count); - - scgp->cmdname = "verify"; - - if (scg_cmd(scgp) < 0) { - if (scmd->sense.code >= 0x70) { /* extended Sense */ - *bad_block = - a_to_4_byte(&((struct scsi_ext_sense *) - &scmd->sense)->info_1); - } else { - *bad_block = a_to_u_3_byte(&scmd->sense.high_addr); - } - return (-1); - } - return (0); -} diff -Nru cdrtools-2.01.01a33/readcd/scsi_mmc.c cdrtools-3.02a09/readcd/scsi_mmc.c --- cdrtools-2.01.01a33/readcd/scsi_mmc.c 2007-08-08 23:26:01.000000000 +0000 +++ cdrtools-3.02a09/readcd/scsi_mmc.c 1970-01-01 00:00:00.000000000 +0000 @@ -1,1544 +0,0 @@ -/* @(#)scsi_mmc.c 1.41 07/08/09 Copyright 2002-2007 J. Schilling */ -#ifndef lint -static char sccsid[] = - "@(#)scsi_mmc.c 1.41 07/08/09 Copyright 2002-2007 J. Schilling"; -#endif -/* - * SCSI command functions for cdrecord - * covering MMC-3 level and above - * - * Copyright (c) 2002-2007 J. Schilling - */ -/* - * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. - * - * See the file CDDL.Schily.txt in this distribution for details. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file CDDL.Schily.txt from this distribution. - */ - -/*#define DEBUG*/ - -#include - -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include - -#include -#include -#include -#include - -#include "scsimmc.h" -#include "cdrecord.h" - -extern int xdebug; -extern int lverbose; - -LOCAL struct features { - UInt16_t code; - char *name; -} fl[] = { - { 0x0000, "Profile List", }, - { 0x0001, "Core", }, - { 0x0002, "Morphing", }, - { 0x0003, "Removable Medium", }, - { 0x0004, "Write Protect", }, - - { 0x0010, "Random Readable", }, - - { 0x001D, "Multi Read", }, - { 0x001E, "CD Read", }, - { 0x001F, "DVD Read", }, - - { 0x0020, "Random Writable", }, - { 0x0021, "Incremental Streaming Writable", }, - { 0x0022, "Sector Erasable", }, - { 0x0023, "Formattable", }, - { 0x0024, "Defect Management", }, - { 0x0025, "Write Once", }, - { 0x0026, "Restricted Overwrite", }, - { 0x0027, "CD-RW CAV Write", }, - { 0x0028, "MRW", }, - { 0x0029, "Ehanced Defect Reporting", }, - { 0x002A, "DVD+RW", }, - { 0x002B, "DVD+R", }, - { 0x002C, "Rigid Restricted Overwrite", }, - { 0x002D, "CD Track at Once", }, - { 0x002E, "CD Mastering", }, - { 0x002F, "DVD-R/-RW Write", }, - - { 0x0030, "DDCD Read", }, - { 0x0031, "DDCD-R Write", }, - { 0x0032, "DDCD-RW Write", }, - - { 0x0033, "Layer Jump Recording", }, - - { 0x0037, "CD-RW Write", }, - { 0x0038, "BD-R Pseudo-Overwrite (POW)", }, - - { 0x003A, "DVD+RW/DL Read", }, - { 0x003B, "DVD+R/DL Read", }, - - { 0x0040, "BD Read", }, - { 0x0041, "BD Write", }, - { 0x0042, "Time Safe Recording (TSR)", }, - - { 0x0050, "HD-DVD Read", }, - { 0x0051, "HD-DVD Write", }, - - { 0x0080, "Hybrid Disk Read", }, - - { 0x0100, "Power Management", }, - { 0x0101, "S.M.A.R.T.", }, - { 0x0102, "Embedded Changer", }, - { 0x0103, "CD Audio analog play", }, - { 0x0104, "Microcode Upgrade", }, - { 0x0105, "Time-out", }, - { 0x0106, "DVD-CSS", }, - { 0x0107, "Real Time Streaming", }, - { 0x0108, "Logical Unit Serial Number", }, - { 0x0109, "Media Serial Number", }, - { 0x010A, "Disk Control Blocks", }, - { 0x010B, "DVD CPRM", }, - { 0x010C, "Microcode Information", }, - { 0x010D, "AACS", }, - - { 0x0110, "VCPS", }, -}; - -LOCAL struct profiles { - UInt16_t code; - char *name; -} pl[] = { - { 0x0000, "Reserved", }, - { 0x0001, "Non -removable Disk", }, - { 0x0002, "Removable Disk", }, - { 0x0003, "MO Erasable", }, - { 0x0004, "MO Write Once", }, - { 0x0005, "AS-MO", }, - - /* 0x06..0x07 is reserved */ - - { 0x0008, "CD-ROM", }, - { 0x0009, "CD-R", }, - { 0x000A, "CD-RW", }, - - /* 0x0B..0x0F is reserved */ - - { 0x0010, "DVD-ROM", }, - { 0x0011, "DVD-R sequential recording", }, - { 0x0012, "DVD-RAM", }, - { 0x0013, "DVD-RW restricted overwrite", }, - { 0x0014, "DVD-RW sequential recording", }, - { 0x0015, "DVD-R/DL sequential recording", }, - { 0x0016, "DVD-R/DL layer jump recording", }, - { 0x0017, "DVD-RW/DL", }, - - /* 0x18..0x19 is reserved */ - - { 0x001A, "DVD+RW", }, - { 0x001B, "DVD+R", }, - - { 0x0020, "DDCD-ROM", }, - { 0x0021, "DDCD-R", }, - { 0x0022, "DDCD-RW", }, - - { 0x002A, "DVD+RW/DL", }, - { 0x002B, "DVD+R/DL", }, - - { 0x0040, "BD-ROM", }, - { 0x0041, "BD-R sequential recording", }, - { 0x0042, "BD-R random recording", }, - { 0x0043, "BD-RE", }, - - /* 0x44..0x4F is reserved */ - - { 0x0050, "HD DVD-ROM", }, - { 0x0051, "HD DVD-R", }, - { 0x0052, "HD DVD-RAM", }, - { 0x0053, "HD DVD-RW", }, - - /* 0x54..0x57 is reserved */ - - { 0x0058, "HD DVD-R/DL", }, - - { 0x005A, "HD DVD-RW/DL", }, - - { 0xFFFF, "No standard Profile", }, -}; - - -EXPORT int get_configuration __PR((SCSI *scgp, caddr_t bp, int cnt, int st_feature, int rt)); -LOCAL int get_conflen __PR((SCSI *scgp, int st_feature, int rt)); -EXPORT int get_curprofile __PR((SCSI *scgp)); -LOCAL int get_profiles __PR((SCSI *scgp, caddr_t bp, int cnt)); -EXPORT int has_profile __PR((SCSI *scgp, int profile)); -EXPORT int print_profiles __PR((SCSI *scgp)); -EXPORT int get_proflist __PR((SCSI *scgp, BOOL *wp, BOOL *cdp, BOOL *dvdp, BOOL *dvdplusp, BOOL *ddcdp)); -EXPORT int get_wproflist __PR((SCSI *scgp, BOOL *cdp, BOOL *dvdp, - BOOL *dvdplusp, BOOL *ddcdp)); -EXPORT int get_mediatype __PR((SCSI *scgp)); -EXPORT int get_singlespeed __PR((int mt)); -EXPORT float get_secsps __PR((int mt)); -EXPORT char *get_mclassname __PR((int mt)); - -LOCAL int scsi_get_performance __PR((SCSI *scgp, caddr_t bp, int cnd, int ndesc, int type, int datatype)); -EXPORT int scsi_get_perf_maxspeed __PR((SCSI *scgp, Ulong *readp, Ulong *writep, Ulong *endp)); -EXPORT int scsi_get_perf_curspeed __PR((SCSI *scgp, Ulong *readp, Ulong *writep, Ulong *endp)); -LOCAL int scsi_set_streaming __PR((SCSI *scgp, Ulong *readp, Ulong *writep, Ulong *endp)); -EXPORT int speed_select_mdvd __PR((SCSI *scgp, int readspeed, int writespeed)); -LOCAL char *fname __PR((Uint code)); -LOCAL char *pname __PR((Uint code)); -LOCAL BOOL fname_known __PR((Uint code)); -LOCAL BOOL pname_known __PR((Uint code)); -EXPORT int print_features __PR((SCSI *scgp)); -EXPORT void print_format_capacities __PR((SCSI *scgp)); -EXPORT int get_format_capacities __PR((SCSI *scgp, caddr_t bp, int cnt)); -EXPORT int read_format_capacities __PR((SCSI *scgp, caddr_t bp, int cnt)); - -EXPORT void przone __PR((struct rzone_info *rp)); -EXPORT int get_diskinfo __PR((SCSI *scgp, struct disk_info *dip, int cnt)); -EXPORT void print_diskinfo __PR((struct disk_info *dip, BOOL is_cd)); -EXPORT int prdiskstatus __PR((SCSI *scgp, cdr_t *dp, BOOL is_cd)); -EXPORT int sessstatus __PR((SCSI *scgp, BOOL is_cd, long *offp, long *nwap)); -EXPORT void print_performance_mmc __PR((SCSI *scgp)); - - -/* - * Get feature codes - */ -EXPORT int -get_configuration(scgp, bp, cnt, st_feature, rt) - SCSI *scgp; - caddr_t bp; - int cnt; - int st_feature; - int rt; -{ - register struct scg_cmd *scmd = scgp->scmd; - - fillbytes((caddr_t)scmd, sizeof (*scmd), '\0'); - scmd->addr = bp; - scmd->size = cnt; - scmd->flags = SCG_RECV_DATA|SCG_DISRE_ENA; - scmd->cdb_len = SC_G1_CDBLEN; - scmd->sense_len = CCS_SENSE_LEN; - scmd->cdb.g1_cdb.cmd = 0x46; - scmd->cdb.g1_cdb.lun = scg_lun(scgp); - if (rt & 1) - scmd->cdb.g1_cdb.reladr = 1; - if (rt & 2) - scmd->cdb.g1_cdb.res = 1; - - i_to_2_byte(scmd->cdb.g1_cdb.addr, st_feature); - g1_cdblen(&scmd->cdb.g1_cdb, cnt); - - scgp->cmdname = "get_configuration"; - - return (scg_cmd(scgp)); -} - -/* - * Retrieve feature code list length - */ -LOCAL int -get_conflen(scgp, st_feature, rt) - SCSI *scgp; - int st_feature; - int rt; -{ - Uchar cbuf[8]; - int flen; - int i; - - fillbytes(cbuf, sizeof (cbuf), '\0'); - scgp->silent++; - i = get_configuration(scgp, (char *)cbuf, sizeof (cbuf), st_feature, rt); - scgp->silent--; - if (i < 0) - return (-1); - i = sizeof (cbuf) - scg_getresid(scgp); - if (i < 4) - return (-1); - - flen = a_to_u_4_byte(cbuf); - if (flen < 4) - return (-1); - return (flen); -} - -EXPORT int -get_curprofile(scgp) - SCSI *scgp; -{ - Uchar cbuf[8]; - int amt; - int flen; - int profile; - int i; - - fillbytes(cbuf, sizeof (cbuf), '\0'); - scgp->silent++; - i = get_configuration(scgp, (char *)cbuf, sizeof (cbuf), 0, 0); - scgp->silent--; - if (i < 0) - return (-1); - - amt = sizeof (cbuf) - scg_getresid(scgp); - if (amt < 8) - return (-1); - flen = a_to_u_4_byte(cbuf); - if (flen < 4) - return (-1); - - profile = a_to_u_2_byte(&cbuf[6]); - - if (xdebug > 1) - scg_prbytes("Features: ", cbuf, amt); - - if (xdebug > 0) - printf("feature len: %d current profile 0x%04X len %d\n", - flen, profile, amt); - - return (profile); -} - -LOCAL int -get_profiles(scgp, bp, cnt) - SCSI *scgp; - caddr_t bp; - int cnt; -{ - int amt; - int flen; - int i; - - flen = get_conflen(scgp, 0, 0); - if (flen < 0) - return (-1); - if (cnt < flen) - flen = cnt; - - fillbytes(bp, cnt, '\0'); - scgp->silent++; - i = get_configuration(scgp, (char *)bp, flen, 0, 0); - scgp->silent--; - if (i < 0) - return (-1); - amt = flen - scg_getresid(scgp); - - flen = a_to_u_4_byte(bp); - if ((flen+4) < amt) - amt = flen+4; - - return (amt); -} - -EXPORT int -has_profile(scgp, profile) - SCSI *scgp; - int profile; -{ - Uchar cbuf[1024]; - Uchar *p; - int flen; - int prf; - int i; - int n; - - flen = get_profiles(scgp, (caddr_t)cbuf, sizeof (cbuf)); - if (flen < 0) - return (-1); - - p = cbuf; - p += 8; /* Skip feature header */ - n = p[3]; /* Additional length */ - n /= 4; - p += 4; - - for (i = 0; i < n; i++) { - prf = a_to_u_2_byte(p); - if (xdebug > 0) - printf("Profile: 0x%04X ", prf); - if (profile == prf) - return (1); - p += 4; - } - return (0); -} - -EXPORT int -print_profiles(scgp) - SCSI *scgp; -{ - Uchar cbuf[1024]; - Uchar *p; - int flen; - int curprofile; - int profile; - int i; - int n; - - flen = get_profiles(scgp, (caddr_t)cbuf, sizeof (cbuf)); - if (flen < 0) - return (-1); - - p = cbuf; - if (xdebug > 1) - scg_prbytes("Features: ", cbuf, flen); - - curprofile = a_to_u_2_byte(&p[6]); - if (xdebug > 0) - printf("feature len: %d current profile 0x%04X\n", - flen, curprofile); - - if (pname_known(curprofile)) - printf("Current: %s\n", curprofile == 0 ? "none" : pname(curprofile)); - else - printf("Current: 0x%04X unknown\n", curprofile); - - p += 8; /* Skip feature header */ - n = p[3]; /* Additional length */ - n /= 4; - p += 4; - - for (i = 0; i < n; i++) { - profile = a_to_u_2_byte(p); - if (xdebug > 0) - printf("Profile: 0x%04X ", profile); - else - printf("Profile: "); - if (pname_known(profile)) - printf("%s %s\n", pname(profile), p[2] & 1 ? "(current)":""); - else - printf("0x%04X %s\n", profile, p[2] & 1 ? "(current)":""); - p += 4; - } - return (curprofile); -} - -EXPORT int -get_proflist(scgp, wp, cdp, dvdp, dvdplusp, ddcdp) - SCSI *scgp; - BOOL *wp; - BOOL *cdp; - BOOL *dvdp; - BOOL *dvdplusp; - BOOL *ddcdp; -{ - Uchar cbuf[1024]; - Uchar *p; - int flen; - int curprofile; - int profile; - int i; - int n; - BOOL wr = FALSE; - BOOL cd = FALSE; - BOOL dvd = FALSE; - BOOL dvdplus = FALSE; - BOOL ddcd = FALSE; - - flen = get_profiles(scgp, (caddr_t)cbuf, sizeof (cbuf)); - if (flen < 0) - return (-1); - - p = cbuf; - if (xdebug > 1) - scg_prbytes("Features: ", cbuf, flen); - - curprofile = a_to_u_2_byte(&p[6]); - if (xdebug > 0) - printf("feature len: %d current profile 0x%04X\n", - flen, curprofile); - - p += 8; /* Skip feature header */ - n = p[3]; /* Additional length */ - n /= 4; - p += 4; - - for (i = 0; i < n; i++) { - profile = a_to_u_2_byte(p); - p += 4; - if (profile >= 0x0008 && profile < 0x0010) - cd = TRUE; - if (profile > 0x0008 && profile < 0x0010) - wr = TRUE; - - if (profile >= 0x0010 && profile < 0x0018) - dvd = TRUE; - if (profile > 0x0010 && profile < 0x0018) - wr = TRUE; - - if (profile >= 0x0018 && profile < 0x0020) - dvdplus = TRUE; - if (profile > 0x0018 && profile < 0x0020) - wr = TRUE; - - if (profile >= 0x0020 && profile < 0x0028) - ddcd = TRUE; - if (profile > 0x0020 && profile < 0x0028) - wr = TRUE; - } - if (wp) - *wp = wr; - if (cdp) - *cdp = cd; - if (dvdp) - *dvdp = dvd; - if (dvdplusp) - *dvdplusp = dvdplus; - if (ddcdp) - *ddcdp = ddcd; - - return (curprofile); -} - -EXPORT int -get_wproflist(scgp, cdp, dvdp, dvdplusp, ddcdp) - SCSI *scgp; - BOOL *cdp; - BOOL *dvdp; - BOOL *dvdplusp; - BOOL *ddcdp; -{ - Uchar cbuf[1024]; - Uchar *p; - int flen; - int curprofile; - int profile; - int i; - int n; - BOOL cd = FALSE; - BOOL dvd = FALSE; - BOOL dvdplus = FALSE; - BOOL ddcd = FALSE; - - flen = get_profiles(scgp, (caddr_t)cbuf, sizeof (cbuf)); - if (flen < 0) - return (-1); - p = cbuf; - curprofile = a_to_u_2_byte(&p[6]); - - p += 8; /* Skip feature header */ - n = p[3]; /* Additional length */ - n /= 4; - p += 4; - - for (i = 0; i < n; i++) { - profile = a_to_u_2_byte(p); - p += 4; - if (profile > 0x0008 && profile < 0x0010) - cd = TRUE; - if (profile > 0x0010 && profile < 0x0018) - dvd = TRUE; - if (profile > 0x0018 && profile < 0x0020) - dvdplus = TRUE; - if (profile > 0x0020 && profile < 0x0028) - ddcd = TRUE; - } - if (cdp) - *cdp = cd; - if (dvdp) - *dvdp = dvd; - if (dvdplusp) - *dvdplusp = dvdplus; - if (ddcdp) - *ddcdp = ddcd; - - return (curprofile); -} - -EXPORT int -get_mediatype(scgp) - SCSI *scgp; -{ - int profile = get_curprofile(scgp); - - if (profile < 0x08) - return (MT_NONE); - if (profile >= 0x08 && profile < 0x10) - return (MT_CD); - if (profile >= 0x10 && profile < 0x40) - return (MT_DVD); - if (profile >= 0x40 && profile < 0x50) - return (MT_BD); - if (profile >= 0x50 && profile < 0x60) - return (MT_HDDVD); - - return (MT_NONE); -} - -EXPORT int -get_singlespeed(mt) - int mt; -{ - switch (mt) { - - case MT_CD: - return (176); - - case MT_DVD: - return (1385); - - case MT_BD: - return (4495); - - case MT_HDDVD: - return (4495); /* XXX ??? */ - - case MT_NONE: - default: - return (1); - } -} - -EXPORT float -get_secsps(mt) - int mt; -{ - switch (mt) { - - case MT_CD: - return ((float)75.0); - - case MT_DVD: - return ((float)676.27); - - case MT_BD: - return ((float)2195.07); - - case MT_HDDVD: - return ((float)2195.07); /* XXX ??? */ - - case MT_NONE: - default: - return ((float)75.0); - } -} - -EXPORT char * -get_mclassname(mt) - int mt; -{ - switch (mt) { - - case MT_CD: - return ("CD"); - - case MT_DVD: - return ("DVD"); - - case MT_BD: - return ("BD"); - - case MT_HDDVD: - return ("HD-DVD"); - - case MT_NONE: - default: - return ("NONE"); - } -} - -LOCAL int -scsi_get_performance(scgp, bp, cnt, ndesc, type, datatype) - SCSI *scgp; - caddr_t bp; - int cnt; - int ndesc; - int type; - int datatype; -{ - register struct scg_cmd *scmd = scgp->scmd; - - fillbytes((caddr_t) scmd, sizeof (*scmd), '\0'); - scmd->addr = bp; - scmd->size = cnt; - scmd->flags = SCG_RECV_DATA | SCG_DISRE_ENA; - scmd->cdb_len = SC_G5_CDBLEN; - scmd->sense_len = CCS_SENSE_LEN; - scmd->cdb.g1_cdb.cmd = 0xAC; - scmd->cdb.g1_cdb.lun = scg_lun(scgp); - scmd->cdb.cmd_cdb[1] |= datatype & 0x1F; - scmd->cdb.cmd_cdb[9] = ndesc; - scmd->cdb.cmd_cdb[10] = type; - - scgp->cmdname = "get performance"; - - return (scg_cmd(scgp)); -} - - -EXPORT int -scsi_get_perf_maxspeed(scgp, readp, writep, endp) - SCSI *scgp; - Ulong *readp; - Ulong *writep; - Ulong *endp; -{ - register struct scg_cmd *scmd = scgp->scmd; - struct mmc_performance_header *ph; - struct mmc_write_speed *wsp; -#define MAX_AMT 100 - char buffer[8 + MAX_AMT*16]; - Ulong ul; - int amt; - int i; - int mt = 0; - int ssp = 1; - char *mname = NULL; - - if (xdebug != 0) { - mt = get_mediatype(scgp); - ssp = get_singlespeed(mt); - mname = get_mclassname(mt); - } - fillbytes((caddr_t) buffer, sizeof (buffer), '\0'); - ph = (struct mmc_performance_header *)buffer; - if (scsi_get_performance(scgp, buffer, 8+16, 1, 0x03, 0) < 0) - return (-1); - - amt = (a_to_4_byte(ph->p_datalen) -4)/sizeof (struct mmc_write_speed); - if (amt < 1) - amt = 1; - if (amt > MAX_AMT) - amt = MAX_AMT; - if (scsi_get_performance(scgp, buffer, 8+amt*16, amt, 0x03, 0) < 0) - return (-1); - -#ifdef XDEBUG - error("Bytes: %d\n", scmd->size - scg_getresid(scgp)); - error("header: %ld\n", a_to_4_byte(buffer) + 4); -#endif - - ph = (struct mmc_performance_header *)buffer; - wsp = (struct mmc_write_speed *)(((char *)ph) + - sizeof (struct mmc_performance_header)); - - ul = a_to_u_4_byte(wsp->end_lba); - if (endp) - *endp = ul; - - ul = a_to_u_4_byte(wsp->read_speed); - if (readp) - *readp = ul; - - ul = a_to_u_4_byte(wsp->write_speed); - if (writep) - *writep = ul; - - wsp = (struct mmc_write_speed *)(((char *)ph) + - sizeof (struct mmc_performance_header)); - - i = (a_to_4_byte(buffer) -4)/sizeof (struct mmc_write_speed); - if (i > scmd->cdb.cmd_cdb[9]) - i = scmd->cdb.cmd_cdb[9]; - if (xdebug > 0) - error("MaxSpeed Nperf: %d\n", i); - if (xdebug != 0) for (; --i >= 0; wsp++) { - ul = a_to_u_4_byte(wsp->end_lba); - error("End LBA: %7lu\n", ul); - ul = a_to_u_4_byte(wsp->read_speed); - error("Read Speed: %7lu == %lux %s\n", ul, ul/ssp, mname); - ul = a_to_u_4_byte(wsp->write_speed); - error("Write Speed: %7lu == %lux %s\n", ul, ul/ssp, mname); - error("\n"); - } -#ifdef XDEBUG - scg_prbytes("Performance data:", (Uchar *)buffer, scmd->size - scg_getresid(scgp)); -#endif - - return (0); -#undef MAX_AMT -} - -EXPORT int -scsi_get_perf_curspeed(scgp, readp, writep, endp) - SCSI *scgp; - Ulong *readp; - Ulong *writep; - Ulong *endp; -{ - register struct scg_cmd *scmd = scgp->scmd; - struct mmc_performance_header *ph; - struct mmc_performance *perfp; -#define MAX_AMT 100 - char buffer[8 + MAX_AMT*16]; - Ulong ul; - Ulong end; - Ulong speed; - int amt; - int i; - int mt = 0; - int ssp = 1; - char *mname = NULL; - - if (xdebug != 0) { - mt = get_mediatype(scgp); - ssp = get_singlespeed(mt); - mname = get_mclassname(mt); - } - - if (endp || writep) { - fillbytes((caddr_t) buffer, sizeof (buffer), '\0'); - scgp->silent++; - if (scsi_get_performance(scgp, buffer, 8+16, 1, 0x00, 0x04) < 0) { - scgp->silent--; - goto doread; - } - scgp->silent--; - - ph = (struct mmc_performance_header *)buffer; - amt = (a_to_4_byte(ph->p_datalen) -4)/sizeof (struct mmc_performance); - if (amt < 1) - amt = 1; - if (amt > MAX_AMT) - amt = MAX_AMT; - - if (scsi_get_performance(scgp, buffer, 8+16*amt, amt, 0x00, 0x04) < 0) - return (-1); - -#ifdef XDEBUG - error("Bytes: %d\n", scmd->size - scg_getresid(scgp)); - error("header: %ld\n", a_to_4_byte(buffer) + 4); -#endif - - ph = (struct mmc_performance_header *)buffer; - perfp = (struct mmc_performance *)(((char *)ph) + - sizeof (struct mmc_performance_header)); - - i = (a_to_4_byte(buffer) -4)/sizeof (struct mmc_performance); - if (i > amt) - i = amt; - end = 0; - speed = 0; - for (; --i >= 0; perfp++) { - ul = a_to_u_4_byte(perfp->end_lba); - if (ul > end) { - end = ul; - ul = a_to_u_4_byte(perfp->end_perf); - speed = ul; - } - } - - if (endp) - *endp = end; - - if (writep) - *writep = speed; - - perfp = (struct mmc_performance *)(((char *)ph) + - sizeof (struct mmc_performance_header)); - i = (a_to_4_byte(buffer) -4)/sizeof (struct mmc_performance); - if (i > scmd->cdb.cmd_cdb[9]) - i = scmd->cdb.cmd_cdb[9]; - if (xdebug > 1) - error("CurSpeed Writeperf: %d\n", i); - else if (xdebug < 0) - error("Write Performance:\n"); - if (xdebug != 0) for (; --i >= 0; perfp++) { - ul = a_to_u_4_byte(perfp->start_lba); - error("START LBA: %7lu\n", ul); - ul = a_to_u_4_byte(perfp->end_lba); - error("End LBA: %7lu\n", ul); - ul = a_to_u_4_byte(perfp->start_perf); - error("Start Perf: %7lu == %lux %s\n", ul, ul/ssp, mname); - ul = a_to_u_4_byte(perfp->end_perf); - error("END Perf: %7lu == %lux %s\n", ul, ul/ssp, mname); - error("\n"); - } -#ifdef XDEBUG - scg_prbytes("Performance data:", (Uchar *)buffer, scmd->size - scg_getresid(scgp)); -#endif - } -doread: - if (readp) { - fillbytes((caddr_t) buffer, sizeof (buffer), '\0'); - scgp->silent++; - if (scsi_get_performance(scgp, buffer, 8+16, 1, 0x00, 0x00) < 0) { - scgp->silent--; - return (-1); - } - scgp->silent--; - - ph = (struct mmc_performance_header *)buffer; - amt = (a_to_4_byte(ph->p_datalen) -4)/sizeof (struct mmc_performance); - if (amt < 1) - amt = 1; - if (amt > MAX_AMT) - amt = MAX_AMT; - - if (scsi_get_performance(scgp, buffer, 8+16*amt, amt, 0x00, 0x00) < 0) - return (-1); - -#ifdef XDEBUG - error("Bytes: %d\n", scmd->size - scg_getresid(scgp)); - error("header: %ld\n", a_to_4_byte(buffer) + 4); -#endif - - ph = (struct mmc_performance_header *)buffer; - perfp = (struct mmc_performance *)(((char *)ph) + - sizeof (struct mmc_performance_header)); - - i = (a_to_4_byte(buffer) -4)/sizeof (struct mmc_performance); - if (i > amt) - i = amt; - end = 0; - speed = 0; - for (; --i >= 0; perfp++) { - ul = a_to_u_4_byte(perfp->end_lba); - if (ul > end) { - end = ul; - ul = a_to_u_4_byte(perfp->end_perf); - speed = ul; - } - } - - if (readp) - *readp = speed; - - i = (a_to_4_byte(buffer) -4)/sizeof (struct mmc_performance); - if (i > scmd->cdb.cmd_cdb[9]) - i = scmd->cdb.cmd_cdb[9]; - if (xdebug > 1) - error("CurSpeed Readperf: %d\n", i); - else if (xdebug < 0) - error("Read Performance:\n"); - if (xdebug != 0) for (; --i >= 0; perfp++) { - ul = a_to_u_4_byte(perfp->start_lba); - error("START LBA: %7lu\n", ul); - ul = a_to_u_4_byte(perfp->end_lba); - error("End LBA: %7lu\n", ul); - ul = a_to_u_4_byte(perfp->start_perf); - error("Start Perf: %7lu == %lux %s\n", ul, ul/ssp, mname); - ul = a_to_u_4_byte(perfp->end_perf); - error("END Perf: %7lu == %lux %s\n", ul, ul/ssp, mname); - error("\n"); - } -#ifdef XDEBUG - scg_prbytes("Performance data:", (Uchar *)buffer, scmd->size - scg_getresid(scgp)); -#endif - } - - return (0); -} - -LOCAL int -scsi_set_streaming(scgp, readp, writep, endp) - SCSI *scgp; - Ulong *readp; - Ulong *writep; - Ulong *endp; -{ - register struct scg_cmd *scmd = scgp->scmd; - struct mmc_streaming str; - struct mmc_streaming *sp = &str; - - fillbytes((caddr_t) scmd, sizeof (*scmd), '\0'); - scmd->addr = (caddr_t) sp; - scmd->size = sizeof (*sp); - scmd->flags = SCG_DISRE_ENA; - scmd->cdb_len = SC_G5_CDBLEN; - scmd->sense_len = CCS_SENSE_LEN; - scmd->cdb.g5_cdb.cmd = 0xB6; - scmd->cdb.g5_cdb.lun = scg_lun(scgp); - i_to_2_byte(&scmd->cdb.cmd_cdb[9], sizeof (*sp)); /* Sz not G5 alike */ - - scgp->cmdname = "set streaming"; - - fillbytes(sp, sizeof (*sp), '\0'); - if (endp) - i_to_4_byte(sp->end_lba, *endp); - else - i_to_4_byte(sp->end_lba, 0x7FFFFFFF); - - if (readp) - i_to_4_byte(sp->read_size, *readp); - else - i_to_4_byte(sp->read_size, 0x7FFFFFFF); - - if (writep) - i_to_4_byte(sp->write_size, *writep); - else - i_to_4_byte(sp->write_size, 0x7FFFFFFF); - - i_to_4_byte(sp->read_time, 1000); - i_to_4_byte(sp->write_time, 1000); - -#ifdef DEBUG - scg_prbytes("Streaming data:", (Uchar *)sp, sizeof (*sp)); -#endif - - return (scg_cmd(scgp)); -} - -/* - * set speed using the streaming descriptors - */ -EXPORT int -speed_select_mdvd(scgp, readspeed, writespeed) - SCSI *scgp; - int readspeed; - int writespeed; -{ - Ulong end_lba = 0x7FFFFFFF; - Ulong wspeed = writespeed; - - if (scsi_get_perf_maxspeed(scgp, (Ulong *)NULL, (Ulong *)NULL, &end_lba) < 0) - return (-1); - - if (scsi_set_streaming(scgp, (Ulong *)NULL, &wspeed, &end_lba) < 0) - return (-1); - - return (0); -} - - -LOCAL char * -fname(code) - Uint code; -{ - UInt16_t i; - - for (i = 0; i < sizeof (fl) / sizeof (fl[0]); i++) { - if (code == fl[i].code) - return (fl[i].name); - } - return ("Unknown"); -} - -LOCAL char * -pname(code) - Uint code; -{ - UInt16_t i; - - for (i = 0; i < sizeof (pl) / sizeof (pl[0]); i++) { - if (code == pl[i].code) - return (pl[i].name); - } - return ("Unknown"); -} - -LOCAL BOOL -fname_known(code) - Uint code; -{ - UInt16_t i; - - for (i = 0; i < sizeof (fl) / sizeof (fl[0]); i++) { - if (code == fl[i].code) - return (TRUE); - } - return (FALSE); -} - -LOCAL BOOL -pname_known(code) - Uint code; -{ - UInt16_t i; - - for (i = 0; i < sizeof (pl) / sizeof (pl[0]); i++) { - if (code == pl[i].code) - return (TRUE); - } - return (FALSE); -} - -EXPORT int -print_features(scgp) - SCSI *scgp; -{ - Uchar fbuf[32 * 1024]; - Uchar *p; - Uchar *pend; - int amt; - int flen; - int feature; - int i; - - flen = get_conflen(scgp, 0, 0); - if (flen < 0) - return (-1); - if (sizeof (fbuf) < flen) - flen = sizeof (fbuf); - - fillbytes(fbuf, sizeof (fbuf), '\0'); - scgp->silent++; - i = get_configuration(scgp, (char *)fbuf, sizeof (fbuf), 0, 0); - scgp->silent--; - if (i < 0) - return (-1); - amt = sizeof (fbuf) - scg_getresid(scgp); - - p = fbuf; - pend = &p[sizeof (fbuf) - scg_getresid(scgp)]; - flen = a_to_u_4_byte(p); - if ((flen+4) < amt) - amt = flen+4; - pend = &p[amt]; - if (xdebug > 1) - scg_prbytes("Features: ", fbuf, amt); - - feature = a_to_u_2_byte(&p[6]); - if (xdebug > 0) - printf("feature len: %d current profile 0x%04X len %lld\n", - flen, feature, (Llong)(pend - p)); - - p = fbuf + 8; /* Skip feature header */ - while (p < pend) { - int col; - - col = 0; - feature = a_to_u_2_byte(p); - if (xdebug > 0) - col += printf("Feature: 0x%04X ", feature); - else - col += printf("Feature: "); - if (fname_known(feature)) - col += printf("'%s' ", fname(feature)); - else - col += printf("0x%04X ", feature); - col += printf("%s %s", - p[2] & 1 ? "(current)":"", - p[2] & 2 ? "(persistent)":""); - - if (feature == 0x108) - col += printf(" Serial: '%.*s'", p[3], &p[4]); - if (xdebug > 1 && p[3]) { - if (col < 50) - printf("%*s", 50-col, ""); - scg_fprbytes(stdout, " Data: ", &p[4], p[3]); - } else { - printf("\n"); - } - p += p[3]; - p += 4; - } - return (0); -} - -LOCAL char *fdt[] = { - "Reserved (0)", - "Unformated or Blank Media", - "Formatted Media", - "No Media Present or Unknown Capacity" -}; - -EXPORT void -print_format_capacities(scgp) - SCSI *scgp; -{ - Uchar b[1024]; - int i; - Uchar *p; - - fillbytes(b, sizeof (b), '\0'); - scgp->silent++; - read_format_capacities(scgp, (char *)b, sizeof (b)); - scgp->silent--; - - i = b[3] + 4; - fillbytes(b, sizeof (b), '\0'); - if (read_format_capacities(scgp, (char *)b, i) < 0) - return; - - if (xdebug > 0) { - i = b[3] + 4; - scg_prbytes("Format cap: ", b, i); - } - i = b[3]; - if (i > 0) { - int cnt; - UInt32_t n1; - UInt32_t n2; - printf("\n Capacity Blklen/Sparesz. Type\n"); - for (p = &b[4]; i > 0; i -= 8, p += 8) { - cnt = 0; - n1 = a_to_u_4_byte(p); - n2 = a_to_u_3_byte(&p[5]); - printf("%12lu %16lu %s\n", - (Ulong)n1, (Ulong)n2, - fdt[p[4] & 0x03]); - } - } -} - -EXPORT int -get_format_capacities(scgp, bp, cnt) - SCSI *scgp; - caddr_t bp; - int cnt; -{ - int len = sizeof (struct scsi_format_cap_header); - struct scsi_format_cap_header *hp; - - fillbytes(bp, cnt, '\0'); - if (cnt < len) - return (-1); - if (read_format_capacities(scgp, bp, len) < 0) - return (-1); - - if (scg_getresid(scgp) > 0) - return (-1); - - hp = (struct scsi_format_cap_header *)bp; - len = hp->len; - len += sizeof (struct scsi_format_cap_header); - while (len > cnt) - len -= sizeof (struct scsi_format_cap_desc); - - if (read_format_capacities(scgp, bp, len) < 0) - return (-1); - - len -= scg_getresid(scgp); - return (len); -} - -EXPORT int -read_format_capacities(scgp, bp, cnt) - SCSI *scgp; - caddr_t bp; - int cnt; -{ - register struct scg_cmd *scmd = scgp->scmd; - - fillbytes((caddr_t)scmd, sizeof (*scmd), '\0'); - scmd->addr = bp; - scmd->size = cnt; - scmd->flags = SCG_RECV_DATA|SCG_DISRE_ENA; - scmd->cdb_len = SC_G1_CDBLEN; - scmd->sense_len = CCS_SENSE_LEN; - scmd->cdb.g1_cdb.cmd = 0x23; - scmd->cdb.g1_cdb.lun = scg_lun(scgp); - g1_cdblen(&scmd->cdb.g1_cdb, cnt); - - scgp->cmdname = "read_format_capacities"; - - return (scg_cmd(scgp)); -} - -EXPORT void -przone(rp) - struct rzone_info *rp; -{ - int rsize = a_to_2_byte(rp->data_len)+2; - - if (rsize < 12) - return; - printf("rzone size: %d\n", rsize); - printf("rzone number: %d\n", rp->rzone_num_msb * 256 + rp->rzone_num_lsb); - printf("border number: %d\n", rp->border_num_msb * 256 + rp->border_num_lsb); - printf("ljrs: %d\n", rp->ljrs); - printf("track mode: %d copy: %d\n", rp->trackmode, rp->copy); - printf("damage: %d\n", rp->damage); - printf("reserved track: %d blank: %d incremental: %d fp: %d\n", - rp->rt, rp->blank, - rp->incremental, rp->fp); - printf("data mode: %d\n", rp->datamode); - printf("lra valid: %d\n", rp->lra_v); - printf("nwa valid: %d\n", rp->nwa_v); - printf("rzone start: %ld\n", a_to_4_byte(rp->rzone_start)); - printf("next wr addr: %ld\n", a_to_4_byte(rp->next_recordable_addr)); - printf("free blocks: %ld\n", a_to_4_byte(rp->free_blocks)); - printf("blocking factor: %ld\n", a_to_4_byte(rp->block_factor)); - printf("rzone size: %ld\n", a_to_4_byte(rp->rzone_size)); - printf("last recorded addr: %ld\n", a_to_4_byte(rp->last_recorded_addr)); - if (rsize < 40) - return; - printf("read compat lba: %ld\n", a_to_4_byte(rp->read_compat_lba)); - if (rsize < 44) - return; - printf("next layerjmp addr: %ld\n", a_to_4_byte(rp->next_layer_jump)); - if (rsize < 48) - return; - printf("last layerjmp addr: %ld\n", a_to_4_byte(rp->last_layer_jump)); -} - -EXPORT int -get_diskinfo(scgp, dip, cnt) - SCSI *scgp; - struct disk_info *dip; - int cnt; -{ - int len; - int ret; - - fillbytes((caddr_t)dip, cnt, '\0'); - - /* - * Used to be 2 instead of 4 (now). But some Y2k ATAPI drives as used - * by IOMEGA create a DMA overrun if we try to transfer only 2 bytes. - */ - if (read_disk_info(scgp, (caddr_t)dip, 4) < 0) - return (-1); - len = a_to_u_2_byte(dip->data_len); - len += 2; - if (len > cnt) - len = cnt; - ret = read_disk_info(scgp, (caddr_t)dip, len); - -#ifdef DEBUG - if (lverbose > 1) - scg_prbytes("Disk info:", (Uchar *)dip, - len-scg_getresid(scgp)); -#endif - return (ret); -} - -#define IS(what, flag) printf("Disk Is %s%s\n", flag?"":"not ", what); - -LOCAL char res[] = "reserved"; - -EXPORT void -print_diskinfo(dip, is_cd) - struct disk_info *dip; - BOOL is_cd; -{ -static char *dt_name[] = { "standard", "track resources", "POW resources", res, res, res, res, res }; -static char *ds_name[] = { "empty", "incomplete/appendable", "complete", "illegal" }; -static char *ss_name[] = { "empty", "incomplete/appendable", "illegal", "complete", }; -static char *fd_name[] = { "none", "incomplete", "in progress", "completed", }; - - IS("erasable", dip->erasable); - printf("data type: %s\n", dt_name[dip->dtype]); - printf("disk status: %s\n", ds_name[dip->disk_status]); - printf("session status: %s\n", ss_name[dip->sess_status]); - printf("BG format status: %s\n", fd_name[dip->bg_format_stat]); - printf("first track: %d\n", - dip->first_track); - printf("number of sessions: %d\n", - dip->numsess + dip->numsess_msb * 256); - printf("first track in last sess: %d\n", - dip->first_track_ls + dip->first_track_ls_msb * 256); - printf("last track in last sess: %d\n", - dip->last_track_ls + dip->last_track_ls_msb * 256); - IS("unrestricted", dip->uru); - printf("Disk type: "); - if (is_cd) switch (dip->disk_type) { - - case SES_DA_ROM: printf("CD-DA or CD-ROM"); break; - case SES_CDI: printf("CDI"); break; - case SES_XA: printf("CD-ROM XA"); break; - case SES_UNDEF: printf("undefined"); break; - default: printf("reserved"); break; - } else { - printf("DVD, HD-DVD or BD"); - } - printf("\n"); - if (dip->did_v) - printf("Disk id: 0x%lX\n", a_to_u_4_byte(dip->disk_id)); - - if (is_cd) { - printf("last start of lead in: %ld\n", - msf_to_lba(dip->last_lead_in[1], - dip->last_lead_in[2], - dip->last_lead_in[3], FALSE)); - printf("last start of lead out: %ld\n", - msf_to_lba(dip->last_lead_out[1], - dip->last_lead_out[2], - dip->last_lead_out[3], TRUE)); - } - - if (dip->dbc_v) - printf("Disk bar code: 0x%lX%lX\n", - a_to_u_4_byte(dip->disk_barcode), - a_to_u_4_byte(&dip->disk_barcode[4])); - - if (dip->dac_v) - printf("Disk appl. code: %d\n", dip->disk_appl_code); - - if (dip->num_opc_entries > 0) { - printf("OPC table:\n"); - } -} - -EXPORT int -prdiskstatus(scgp, dp, is_cd) - SCSI *scgp; - cdr_t *dp; - BOOL is_cd; -{ - struct disk_info di; - struct rzone_info rz; - int sessions; - int track; - int tracks; - int t; - int s; - long raddr; - long lastaddr = -1; - long lastsess = -1; - long leadout = -1; - long lo_sess = 0; - long nwa = -1; - long rsize = -1; - long border_size = -1; - int profile; - - profile = get_curprofile(scgp); - if (profile > 0) { - int mt = get_mediatype(scgp); - - printf("Mounted media class: %s\n", - get_mclassname(mt)); - if (pname_known(profile)) { - printf("Mounted media type: %s\n", - pname(profile)); - } - } - get_diskinfo(scgp, &di, sizeof (di)); - print_diskinfo(&di, is_cd); - - sessions = di.numsess + di.numsess_msb * 256; - tracks = di.last_track_ls + di.last_track_ls_msb * 256; - - printf("\nTrack Sess Type Start Addr End Addr Size\n"); - printf("==============================================\n"); - fillbytes((caddr_t)&rz, sizeof (rz), '\0'); - for (t = di.first_track; t <= tracks; t++) { - fillbytes((caddr_t)&rz, sizeof (rz), '\0'); - get_trackinfo(scgp, (caddr_t)&rz, TI_TYPE_TRACK, t, sizeof (rz)); - if (lverbose > 1) - przone(&rz); - track = rz.rzone_num_lsb + rz.rzone_num_msb * 256; - s = rz.border_num_lsb + rz.border_num_msb * 256; - raddr = a_to_4_byte(rz.rzone_start); - if (rsize >= 0) - border_size = raddr - (lastaddr+rsize); - if (!rz.blank && s > lastsess) { /* First track in last sess ? */ - lastaddr = raddr; - lastsess = s; - } - nwa = a_to_4_byte(rz.next_recordable_addr); - rsize = a_to_4_byte(rz.rzone_size); - if (!rz.blank) { - leadout = raddr + rsize; - lo_sess = s; - } - printf("%5d %5d %-6s %-10ld %-10ld %ld", - track, s, - rz.blank ? "Blank" : - rz.trackmode & 4 ? "Data" : "Audio", - raddr, raddr + rsize -1, rsize); - if (lverbose > 0) - printf(" %10ld", border_size); - printf("\n"); - } - printf("\n"); - if (lastaddr >= 0) - printf("Last session start address: %ld\n", lastaddr); - if (leadout >= 0) - printf("Last session leadout start address: %ld\n", leadout); - if (rz.nwa_v) { - printf("Next writable address: %ld\n", nwa); - printf("Remaining writable size: %ld\n", rsize); - } - - return (0); -} - -EXPORT int -sessstatus(scgp, is_cd, offp, nwap) - SCSI *scgp; - BOOL is_cd; - long *offp; - long *nwap; -{ - struct disk_info di; - struct rzone_info rz; - int sessions; - int track; - int tracks; - int t; - int s; - long raddr; - long lastaddr = -1; - long lastsess = -1; - long leadout = -1; - long lo_sess = 0; - long nwa = -1; - long rsize = -1; - long border_size = -1; - - - if (get_diskinfo(scgp, &di, sizeof (di)) < 0) - return (-1); - - sessions = di.numsess + di.numsess_msb * 256; - tracks = di.last_track_ls + di.last_track_ls_msb * 256; - - fillbytes((caddr_t)&rz, sizeof (rz), '\0'); - for (t = di.first_track; t <= tracks; t++) { - fillbytes((caddr_t)&rz, sizeof (rz), '\0'); - if (get_trackinfo(scgp, (caddr_t)&rz, TI_TYPE_TRACK, t, sizeof (rz)) < 0) - return (-1); - track = rz.rzone_num_lsb + rz.rzone_num_msb * 256; - s = rz.border_num_lsb + rz.border_num_msb * 256; - raddr = a_to_4_byte(rz.rzone_start); - if (rsize >= 0) - border_size = raddr - (lastaddr+rsize); - if (!rz.blank && s > lastsess) { /* First track in last sess ? */ - lastaddr = raddr; - lastsess = s; - } - nwa = a_to_4_byte(rz.next_recordable_addr); - rsize = a_to_4_byte(rz.rzone_size); - if (!rz.blank) { - leadout = raddr + rsize; - lo_sess = s; - } - } - if (lastaddr >= 0 && offp != NULL) - *offp = lastaddr; - - if (rz.nwa_v && nwap != NULL) - *nwap = nwa; - - return (0); -} - -EXPORT void -print_performance_mmc(scgp) - SCSI *scgp; -{ - Ulong reads; - Ulong writes; - Ulong ends = 0x7FFFFFFF; - int oxdebug = xdebug; - - /* - * Do not try to fail with old drives... - */ - if (get_curprofile(scgp) < 0) - return; - - if (xdebug == 0) - xdebug = -1; - - printf("\nCurrent performance according to MMC get performance:\n"); - scsi_get_perf_curspeed(scgp, &reads, &writes, &ends); - - printf("\nMaximum performance according to MMC get performance:\n"); - scsi_get_perf_maxspeed(scgp, &reads, &writes, &ends); - - xdebug = oxdebug; -} diff -Nru cdrtools-2.01.01a33/readcd/scsi_scan.c cdrtools-3.02a09/readcd/scsi_scan.c --- cdrtools-2.01.01a33/readcd/scsi_scan.c 2007-07-12 07:04:53.000000000 +0000 +++ cdrtools-3.02a09/readcd/scsi_scan.c 1970-01-01 00:00:00.000000000 +0000 @@ -1,270 +0,0 @@ -/* @(#)scsi_scan.c 1.30 07/07/12 Copyright 1997-2007 J. Schilling */ -#ifndef lint -static char sccsid[] = - "@(#)scsi_scan.c 1.30 07/07/12 Copyright 1997-2007 J. Schilling"; -#endif -/* - * Scan SCSI Bus. - * Stolen from sformat. Need a more general form to - * re-use it in sformat too. - * - * Copyright (c) 1997-2007 J. Schilling - */ -/* - * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. - * - * See the file CDDL.Schily.txt in this distribution for details. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file CDDL.Schily.txt from this distribution. - */ - -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include - -#include "scsi_scan.h" -#include "cdrecord.h" - -LOCAL void print_product __PR((FILE *f, struct scsi_inquiry *ip)); -EXPORT int select_target __PR((SCSI *scgp, FILE *f)); -EXPORT int find_target __PR((SCSI *scgp, int type, int idx)); -LOCAL int _select_target __PR((SCSI *scgp, FILE *f, int type, int idx)); -LOCAL int select_unit __PR((SCSI *scgp, FILE *f)); - -LOCAL void -print_product(f, ip) - FILE *f; - struct scsi_inquiry *ip; -{ - fprintf(f, "'%.8s' ", ip->vendor_info); - fprintf(f, "'%.16s' ", ip->prod_ident); - fprintf(f, "'%.4s' ", ip->prod_revision); - if (ip->add_len < 31) { - fprintf(f, "NON CCS "); - } - scg_fprintdev(f, ip); -} - -EXPORT int -select_target(scgp, f) - SCSI *scgp; - FILE *f; -{ - return (_select_target(scgp, f, -1, -1)); -} - -EXPORT int -find_target(scgp, type, idx) - SCSI *scgp; - int type; - int idx; -{ - return (_select_target(scgp, (FILE *)NULL, type, idx)); -} - -LOCAL int -_select_target(scgp, f, type, idx) - SCSI *scgp; - FILE *f; - int type; - int idx; -{ - int initiator; - int cscsibus = scg_scsibus(scgp); - int ctarget = scg_target(scgp); - int clun = scg_lun(scgp); - int numbus = scg_numbus(scgp); - int n; - int low = -1; - int high = -1; - int amt = -1; - int bus; - int tgt; - int lun = 0; - int err; - BOOL have_tgt; - - if (numbus < 0) - numbus = 1024; - scgp->silent++; - - for (bus = 0; bus < numbus; bus++) { - scg_settarget(scgp, bus, 0, 0); - - if (!scg_havebus(scgp, bus)) - continue; - - initiator = scg_initiator_id(scgp); - if (f) - fprintf(f, "scsibus%d:\n", bus); - - for (tgt = 0; tgt < 16; tgt++) { - n = bus*100 + tgt; - - scg_settarget(scgp, bus, tgt, lun); - seterrno(0); - have_tgt = unit_ready(scgp) || scgp->scmd->error != SCG_FATAL; - err = geterrno(); - if (err == EPERM || err == EACCES) - return (-1); - - if (!have_tgt && tgt > 7) { - if (scgp->scmd->ux_errno == EINVAL) - break; - continue; - } - if (f) { -#ifdef FMT - if (print_disknames(bus, tgt, -1) < 8) - fprintf(f, "\t"); - else - fprintf(f, " "); -#else - fprintf(f, "\t"); -#endif - if (fprintf(f, "%d,%d,%d", bus, tgt, lun) < 8) - fprintf(f, "\t"); - else - fprintf(f, " "); - fprintf(f, "%3d) ", n); - } - if (tgt == initiator) { - if (f) - fprintf(f, "HOST ADAPTOR\n"); - continue; - } - if (!have_tgt) { - /* - * Hack: fd -> -2 means no access - */ - if (f) { - fprintf(f, "%c\n", - scgp->fd == -2 ? '?':'*'); - } - continue; - } - if (low < 0) - low = n; - high = n; - - getdev(scgp, FALSE); - if (f) - print_product(f, scgp->inq); - if (type >= 0 && scgp->inq->type == type) { - amt++; - if (amt == 0) /* amt starts at -1 */ - amt++; - if (amt == idx) { - scgp->silent--; - return (amt); - } - } else if (type < 0) { - amt++; - } - if (amt == 0) /* amt starts at -1 */ - amt++; - } - } - scgp->silent--; - - if (low < 0) { - errmsgno(EX_BAD, "No target found.\n"); - return (0); - } - n = -1; -#ifdef FMT - getint("Select target", &n, low, high); - bus = n/100; - tgt = n%100; - scg_settarget(scgp, bus, tgt, lun); - return (select_unit(scgp)); - -#endif - scg_settarget(scgp, cscsibus, ctarget, clun); - return (amt); -} - -LOCAL int -select_unit(scgp, f) - SCSI *scgp; - FILE *f; -{ - int initiator; - int clun = scg_lun(scgp); - int low = -1; - int high = -1; - int lun; - - scgp->silent++; - - fprintf(f, "scsibus%d target %d:\n", scg_scsibus(scgp), scg_target(scgp)); - - initiator = scg_initiator_id(scgp); - for (lun = 0; lun < 8; lun++) { - -#ifdef FMT - if (print_disknames(scg_scsibus(scgp), scg_target(scgp), lun) < 8) - fprintf(f, "\t"); - else - fprintf(f, " "); -#else - fprintf(f, "\t"); -#endif - if (fprintf(f, "%d,%d,%d", scg_scsibus(scgp), scg_target(scgp), lun) < 8) - fprintf(f, "\t"); - else - fprintf(f, " "); - fprintf(f, "%3d) ", lun); - if (scg_target(scgp) == initiator) { - fprintf(f, "HOST ADAPTOR\n"); - continue; - } - scg_settarget(scgp, scg_scsibus(scgp), scg_target(scgp), lun); - if (!unit_ready(scgp) && scgp->scmd->error == SCG_FATAL) { - fprintf(f, "*\n"); - continue; - } - if (unit_ready(scgp)) { - /* non extended sense illegal lun */ - if (scgp->scmd->sense.code == 0x25) { - fprintf(f, "BAD UNIT\n"); - continue; - } - } - if (low < 0) - low = lun; - high = lun; - - getdev(scgp, FALSE); - print_product(f, scgp->inq); - } - scgp->silent--; - - if (low < 0) { - errmsgno(EX_BAD, "No lun found.\n"); - return (0); - } - lun = -1; -#ifdef FMT - getint("Select lun", &lun, low, high); - scg_settarget(scgp, scg_scsibus(scgp), scg_target(scgp), lun); - format_one(scgp); - return (1); -#endif - - scg_settarget(scgp, scg_scsibus(scgp), scg_target(scgp), clun); - return (1); -} diff -Nru cdrtools-2.01.01a33/readcd/scsi_scan.h cdrtools-3.02a09/readcd/scsi_scan.h --- cdrtools-2.01.01a33/readcd/scsi_scan.h 2006-11-26 00:39:41.000000000 +0000 +++ cdrtools-3.02a09/readcd/scsi_scan.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,25 +0,0 @@ -/* @(#)scsi_scan.h 1.5 06/11/26 Copyright 1997 J. Schilling */ -/* - * Interface to scan SCSI Bus. - * - * Copyright (c) 1997 J. Schilling - */ -/* - * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. - * - * See the file CDDL.Schily.txt in this distribution for details. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file CDDL.Schily.txt from this distribution. - */ - -#ifndef _SCSI_SCAN_H -#define _SCSI_SCAN_H - -extern int select_target __PR((SCSI *scgp, FILE *f)); -extern int find_target __PR((SCSI *scgp, int type, int idx)); - -#endif /* _SCSI_SCAN_H */ diff -Nru cdrtools-2.01.01a33/readcd/version.h cdrtools-3.02a09/readcd/version.h --- cdrtools-2.01.01a33/readcd/version.h 2007-08-12 20:48:21.000000000 +0000 +++ cdrtools-3.02a09/readcd/version.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,6 +0,0 @@ -/* @(#)version.h 1.8 07/08/12 Copyright 2007 J. Schilling */ - -/* - * The version for cdrtools programs - */ -#define VERSION "2.01.01a33" diff -Nru cdrtools-2.01.01a33/README.compile cdrtools-3.02a09/README.compile --- cdrtools-2.01.01a33/README.compile 2007-07-01 13:04:59.000000000 +0000 +++ cdrtools-3.02a09/README.compile 2017-11-28 19:19:10.000000000 +0000 @@ -1,3 +1,5 @@ +# @(#)README.compile 1.35 17/11/28 Copyright 1997-2017 J. Schilling + Short overview for those who don't read manuals: Calling configure manually is outdated because this is a task of the @@ -13,16 +15,16 @@ All results in general will be placed into a directory named OBJ// in the current projects leaf directory. - You **need** either my "smake" program, the SunPRO make + You **need** either the Schily "smake" program, the SunPRO make from /usr/bin/make (SunOS 4.x) or /usr/ccs/bin/make (SunOS 5.x) - or GNU make to compile this program. Read README.gmake for + or GNU make to compile this program. Read READMEs/README.gmake for more information on gmake and a list of the most annoying bugs in gmake. All other make programs are either not smart enough or have bugs. My "smake" source is at: - ftp://ftp.berlios.de/pub/smake/alpha/ + https://sourceforge.net/projects/s-make/files/ It is easy to compile and doesn't need a working make program on your machine. If you don't have a working "make" program on the @@ -42,28 +44,32 @@ ***** Schily makefilesystem you cannot use GNU make. ***** ***** In this case, the automake features of smake are required. ***** + Note that GNU make has major bugs on various platforms and thus cannot + be used at all on VMS and OS/2. GNU make on Cygwin causes problems + because it does not deal with spaces and newlines correctly. + Please read the README's for your operating system too. WARNING Do not use 'mc' to extract the tar file! All mc versions before 4.0.14 cannot extract symbolic links correctly. - The versions of WinZip that support tar archives cannot be used too. + The versions of WinZip that support tar archives cannot be used either. The reason is that they don't support symbolic links. Star and Gnutar do support symbolic links even on win32 systems. To support symbolic links on win32, you need to link with the Cygwin32 POSIX library. - To unpack an archive use: + To unpack an archive, use: - gzip -d < some-arch.tar.gz | tar -xpf - + gzip -d < some-arch.tar.gz | tar xpf - - Replace 'star' by the actual archive name. + Replace 'some-arch.tar.gz' by the actual archive name. - If your Platform does not support hard links or symbolic links, you + If your platform does not support hard links or symbolic links, you first need to compile "star" and then call: - star -xpz -copy-links < some-arch.tar.gz + star -xp -copy-links < some-arch.tar.gz If your platform does not support hard links but supports symbolic links, you only need to call the command above once. @@ -87,10 +93,11 @@ all needed targets. Calling 'make install' will install all needed files. - This program uses a new makefilesystem. This makefilesystem uses - techniques and ideas from the 1980s and 1990s, is designed in a - modular way and allows sources to be combined in a modular way. - For mor information on the modular features read README.SSPM. + This program uses a new makefilesystem, introduced in 1993. This + makefilesystem uses techniques and ideas from the 1980s and 1990s, + is designed in a modular way and allows sources to be combined in a + modular way. For mor information on the modular features read + README.SSPM. The makefilesystem is optimized for a program called 'smake' Copyright 1985 by Jörg Schilling, but SunPro make (the make program @@ -104,10 +111,10 @@ Finding Compilation Results: - To allow this, all binaries and results of a 'compilation' in any form - are placed in sub-directories. This includes automatically generated - include files. Results in general will be placed into - a directory named OBJ// in the current projects + To allow simultaneous compilations, all binaries and results of a + 'compilation' in any form are placed in sub-directories. This includes + automatically generated include files. Results will in general be + placed into a directory named OBJ// in the current project's leaf directory, libraries will be placed into a directory called libs// that is located in the source tree root directory. @@ -121,8 +128,10 @@ To compile a system or sub-system, simply enter 'smake', 'make' or 'Gmake'. Compilation may be initialized at any point of the source - tree of a system. If compilation is started in a sub tree, all objects - in that sub tree will be made. + tree of a system. + + WARNING: If compilation is started in a sub tree, only all objects + in that sub tree will be made. This usually excludes needed libraries. How to install results: @@ -149,14 +158,17 @@ Using a different installation directory: - If your system does not yet use the standard installation path /opt + If your system does not yet use the standard installation path in + + /opt/ + or if you don't like this installation directory, you can easily change the installation directory. You may edit the DEFAULTS file for your system and modify the macro INS_BASE. You may use a different installation directory without editing the - DEFAULTS files. If you like to install everything in /usr/local, call: - + DEFAULTS files. If you like to install everything in the deprecated path + /usr/local, the next paragraph describes the procedure. If your make program supports to propagate make macros to sub make programs which is the case for recent smake releases as well as for a recent gnumake: @@ -165,19 +177,148 @@ or gmake INS_BASE=/usr/local install - If you make program doesn't propagate make macros (e.g. SunPRO make) call: + If your make program doesn't propagate make macros (e.g. SunPRO make), + call: env INS_BASE=/usr/local make -e install + Note that INS_BASE=/usr/local needs to be specified for every operation + that compiles or links programs, as the path may be stored inside the + binaries. + + The location for the root specific configuratin files is controlled + via the INS_RBASE= make macro. The default vaulue for this macro is "/". + If you like to install global default configuration files into + /usr/local/etc instead of /etc, you need to spefify INS_RBASE=/usr/local + + Note that some binaries have $(INS_BASE) and $(INS_RBASE) compiled into. + If you like to like to modify the compiled-in path values, call: + + smake clean + smake INS_BASE=/usr/local INS_RBASE=/usr/local + + +Setting up a different Link mode: + + The following link modes are available: + + static statical linking as in historical UNIX + + dynamic dynamic linking as introduced by SunOS + in 1987, Microsoft's DLLs, ... + The knowledge on how to achieve this for + a particular platform is hidden in the + makefile system. + + profiled Linking against profiled libraries. + Profiled libraries are prepared for the + use with "gprof" (introduced by BSD in the + late 1970s). + + The makefile system sets up a default linkmode in the patform + related defaults file (typically in the file DEFAULTS/Defaults.) + in the projects root directory. This is done with the entry: + + DEFLINKMODE= + + A different linkmode may be selected at compile/link time by e.g. calling: + + smake LINKMODE=dynamic + + If there are already existing binaries, call: + + smake relink LINKMODE=dynamic + + instead. + + +Compiling a different ELF RUNPATH into the binaries: + + In order to allow binaries to work correctly even if the shared + libraries are not in the default search path of the runtime linker, + a RUNPATH needs to be set. + + The ELF RUNPATH is by default derived from $(INS_BASE). If you like to + set INS_BASE=/usr and create binaries that do not include a RUNPATH at all, + call: + + smake relink RUNPATH= + + +Using a different man path prefix: + + Manual pages are by default installed under: + + $(INS_BASE)/$(MANBASE)/man + and MANBASE=share + + If you like a different prefix for man pages, call: + + smake DEFMANBASE=something install + + to install man pages into $(INS_BASE)/something/man/* + + If you like to install man pages under $(INS_BASE)/man/*, call + + smake DEFMANBASE=. install -Using a different C-compiler: +Installing stripped binaries: - If the configured default compiler is not present on the current machine, - the makefilesystem will try an automatic fallback to GCC. For this reason - in most cases you will not need to manually select a compiler. + If you like to install stripped binaries via "smake install", call: - The default C-compiler can be modified in the files in the - DEFAULT directory. If you want to have a different compiler + smake STRIPFLAGS=-s install + + This calls "strip" on every final install path for all executable + binaries. + +Installing to a prototype directory to implement package creation staging: + + If you like to create a prototype directory tree that is used as an + intermediate store for package creation, use the DESTDIR macro: + + smake INS_BASE=/usr/local DESTDIR=/tmp install + + This will compile in "/usr/local" as prefix into all related binaries + and then create a usr/local tree below /tmp (i.e. /tmp/usr/local). + + Note that you need to call "smake clean" before in case that the code + was previously compiled with different defaults with regards to INS_BASE + +Setting different default directory permissions for install directories: + + All directories that are created by the Schily makefile system in the + target directory path when + + smake install + + is called system use a special default 022 that is in DEFINSUMASK= + This causes all directories in the target install path to be created + with 0755 permissions. + + All other directories that are created by the Schily makefile system + use a single global default 002 that is in DEFUMASK= + + If you like to create install directories with e.g. 0775 permissions, + call: + + smake DEFINSUMASK=002 install + +Using a different C compiler: + + The *compiler family* is configured via the CCOM= make macro. This + selects a whole set of related macros that are needed to support a + specific compiler family. + + The *compiler family* usually defines a C compiler and a related + C++ compiler. + + If the configured default compiler family is not present on the current + machine, the makefilesystem will try an automatic fallback to GCC. For + this reason, in most cases, you will not need to manually select a + compiler. + + The default compiler family can be modified in the files in the + DEFAULT directory. If you want to have a different compiler family for one compilation, call: make CCOM=gcc @@ -197,8 +338,8 @@ It is not clear if GCC already supports other platforms in 64 bit mode. As all GCC versions before 3.1 did emit hundreds of compilation - warnings related to 64 bit bugs when compiling itself, there is little - hope that other platforms are already supported in 64 bit mode. + warnings related to 64 bit bugs when compiling itself, so there may be + other platforms are not supported in 64 bit mode. Creating executables using the Sun Studio compiler on Linux: @@ -215,14 +356,44 @@ lines like: "#if defined(__GNUC__) && !defined(__STRICT_ANSI__)" as well as the related #endif. +Creating executables using the clang compiler: + + Simply call: + + make CCOM=clang + + And in order to intentionally create 32 bit or 64 bit binaries, call: + make CCOM=clang64 + or + make CCOM=clang64 + + +Using a different compiler binary name: + + Call: -Getting help from make: + make CC=/opt/instrumented/bin/cc + + Note that all knowledge about the options of a compiler is derived + from the CCOM= variable, so if you like to use an instrumented gcc + variant, you may like to call: + + make CCOM=gcc CC=fluffy-gcc + + You may use CC="fluffy-gcc fluffy-gcc-specific options" if you like + to enforce specific options with the compiler. See hints on cross + compilation below. + + +Getting help from the make file system: For a list of targets call: make .help + .help is a special target that prints help for the makefile system. + Getting more information on the make file system: @@ -235,7 +406,7 @@ For further information read - ftp://ftp.berlios.de/pub/makefiles/PortableSoftware.ps.gz + http://sf.net/projects/schilytools/files/makefiles/PortableSoftware.ps.gz Hints for compilation: @@ -245,7 +416,7 @@ SunPro make will work as is. GNU make need some special preparation. - Read README.gmake for more information on gmake. + Read READMEs/README.gmake for more information on gmake. To use GNU make create a file called 'Gmake' in your search path that contains: @@ -255,14 +426,14 @@ export MAKEPROG exec gmake "$@" - and call 'Gmake' instead of gmake. On Linux there is no gmake, 'make' - on Linux is really a gmake. + and call 'Gmake' instead of gmake. On Linux, there is no gmake, the + program installed as 'make' on Linux is really a gmake. 'Gmake' and 'Gmake.linux' are part of this distribution. Some versions of gmake are very buggy. There are e.g. versions of gmake on some architectures that will not correctly recognize the default - target. In this case call 'make all' or ../Gmake all'. + target. In this case, call 'make all' or '../Gmake all'. Note that pseudo error messages from gmake similar to: @@ -270,7 +441,7 @@ ../RULES/rules.cnf:58: ../incs/sparc-sunos5-cc/Inull: No such file or directory ../RULES/rules.cnf:59: ../incs/sparc-sunos5-cc/rules.cnf: No such file or directory - Are a result of a bug un GNU make. The make file system itself is + are a result of a bug in GNU make. The make file system itself is correct (as you could prove by using smake). If your gmake version still has this bug, send a bug report to: @@ -281,7 +452,7 @@ If you like to use 'smake', please always compile it from source. The packages are located on: - ftp://ftp.berlios.de/pub/smake/alpha/ + https://sourceforge.net/projects/s-make/files/alpha/ Smake has a -D flag to see the actual makefile source used and a -d flag that gives easy to read debugging info. Use smake -xM @@ -292,8 +463,8 @@ The defaults found in the directory DEFAULTS are configured to give minimum warnings. This is made because many people will - be irritated by warning messages and because the GNU c-compiler - will give warnings for perfectly correct and portable c-code. + be irritated by warning messages and because the GNU C compiler + will give warnings for perfectly correct and portable C code. If you want to port code to new platforms or do engineering on the code, you should use the alternate set of defaults found @@ -303,6 +474,19 @@ make DEFAULTSDIR=DEFAULTS_ENG + Note however, that some GCC versions print a lot of wrong warnings + in this mode. Well known problems with GCC warnings are: + + - The recursive printf format "%r" that is in use since ~ 1980 + is not supported and causes a lot of incorrect warnings as + GCC does not know that "%r" takes 2 parameters. + + - The standard C construct "(void) read(fd, buf, sizeof (buf))" + is flagged by some versions of GCC even though the void cast + is a clear expression of the fact that the return code from read + is intentionally ignored. This may cause many useless warnings + for last resort error messages used in programs. + Compiling the project to allow debugging with dbx/gdb: @@ -312,15 +496,38 @@ make clean make COPTX=-g LDOPTX=-g + If your debugger does not like optimized binaries, call something + like: + + make "COPTX=-g -xO0" LDOPTX=-g + or + make "COPTX=-g -O0" LDOPTX=-g + + depending on the option system used by your C compiler. + + +Compiling the project to allow performance monitoring with gprof from BSD: + + If you like to compile for performance monitoriing with gprof, + call: + + make clean + make COPTX=-xpg LDOPTX=-xpg LINKMODE=profiled + + or + make COPTX=-pg LDOPTX=-pg LINKMODE=profiled -Creting Blastwave packages: + depending on the option system used by your C compiler. + + +Creating Blastwave packages: Call: .clean smake -f Mcsw You need the program "fakeroot" and will find the results - in packages/ + in packages/. Note that a single program source tree will allow you to create packages like CSWstar but not the packages CSWschilybase and @@ -332,7 +539,7 @@ If you want to see an example, please have a look at the "star" source. It may be found on: - ftp://ftp.berlios.de/pub/star + http://sourceforge.net/projects/s-tar/files/ Have a look at the manual page, it is included in the distribution. Install the manual page with @@ -345,6 +552,205 @@ man -F +Compiling in a cross compilation environment: + + The Schily autoconf system has been enhanced to support cross + compilation. Schily autoconf is based on GNU autoconf-2.13 and + GNU autoconf does not support cross compilation because it needs + to run scripts on the target system for some of the tests. + + The "configure" script that is delivered with the Schily makefile + system runs more than 770 tests and aprox 70 of them need to be + run on the target system. + + The Schily autoconf system now supports a method to run these ~70 + tests natively on a target system. You either need a target machine + with remote login features or you need an emulator with a method to + copy files into the emulated system and to run binaries on the + emulated system as e.g. the Android emulator. + + We currently deliver three scripts for "remote" execution of + programs on the target system: + + runrmt_ssh runs the commands remove via ssh + runrmt_rsh runs the commands remove via rsh + runrmt_android runs the commands remove via the debug bridge + + If you need to remotely run programs on a system that is not + supported by one of there three scripts, you need to modify one + of them to match your needs. + + To enable Cross Compilation use the following environment variables: + + CONFIG_RMTCALL= Set up to point to a script that does + the remote execution, e.g.: + + CONFIG_RMTCALL=`pwd`/conf/runrmt_ssh + + CONFIG_RMTHOST= Set up to point to your remote host, e.g.: + + CONFIG_RMTHOST=hostname + or + CONFIG_RMTHOST=user@hostname + + use a dummy if you like to use something + like the Android emulator. + + CONFIG_RMTDEBUG= Set to something non-null in order to + let the remote execution script mark + remote comands. This will result in + configure messages like: + + checking bits in minor device number... REMOTE 8 + + If you cannot run commands on the target + platform, you may set: + + CONFIG_RMTDEBUG=true + CONFIG_RMTCALL=: + + carefully watch for the "REMOTE" flagged test + output and later manually edit the file: + + incs//xconfig.h + + Do not forget to manually edit the files: + + incs//align.h + and + incs//avoffset.h + + Note that smake includes automake features that automatically + retrieve system ID information. For this reason, you need to overwrite + related macros from the command line if you like to do a + cross compilation. + + Related make macros: + + K_ARCH= # (sun4v) Kernel ARCH filled from uname -m / arch -k + M_ARCH= # (sun4) Machine filled from arch + P_ARCH= # (sparc) CPU ARCH filled from uname -p / mach + OSNAME= # sunos, linux, .... + OSREL= # 5.11 + OSVERSION= # snv_130 + CCOM= # generic compiler name (e.g. "gcc") + CC= # compiler to call (name for binary) + CC_COM= # compiler to call (name + basic args) + + ARCH= overwrites M_ARCH and P_ARCH + + It is usually suffucient to set ARCH and OSNAME. + + In order to use a cross compiler environment instead of a native compiler, + set the make macro CC_COM or CC to something different than "cc". + + If you are on Linux and like to compile for Android, do the following: + + 1) set up CC acording to the instructions from the cross compiler + tool chain. Important: you need to read the information for your + tool chain. A working setup may look similar to: + + NDK=/home/joerg/android-ndk-r7 + SYSROOT=\$NDK/platforms/android-14/arch-arm + CC="\$NDK/toolchains/arm-linux-androideabi-4.4.3/prebuilt/linux-x86/bin/arm-linux-androideabi-gcc --sysroot=\$SYSROOT" + export NDK + export SYSROOT + export CC + + + 2) set environment variables CONFIG_RMTCALL / CONFIG_RMTHOST, e.g.: + setenv CONFIG_RMTCALL `pwd`/conf/runrmt_android + setenv CONFIG_RMTHOST NONE + + 3) call smake: + + smake ARCH=armv5 OSNAME=linux CCOM=gcc "CC_COM=$CC" + + or + + smake ARCH=armv5 OSNAME=linux CCOM=gcc "CC=$CC" + + +Compiling with the address sanitizer: + + Be careful with a compiler enhancement called "addess sanitizer". + + First a note: the address sanitizer needs a lot of memory when in + 64-bit mode. For this reason, it is recommended to run the tests + in 32-bit mode as it may be impossible to provdie a sufficient amount + of memory for the 64-bit mode. + + 1) The address sanitizer may cause autoconf to behave incorrectly in + case that the compiler options used by the "configure" run include the + address sanitizer. It seems that in addition, the address sanitizer + adds more libraries to the link list and as a result prevents + the correct autoconf decision on whether a specific library from + a "configure" test is needed by some binaries. + + If you are not sure about the current state of the source tree, start + with calling: + + ./.clean + + in the top level source directory. This makes the source tree to behave + as if if was recently unpacked from the tar archive. + + Then run run e.g.: + + cd inc/ + smake CCOM=gcc32 + cd .. + + to prepare the auto-configuration without using the address sanitizer. + This special treatment is needed as the assumptions in the address + sanitizer would not allow us to run the autoconfiguration code + correctly. + + 2) The address sanitizer by default ignores installed SIGSEGV handlers + and thus ignores the intention of the author of the code. + + The correct behavior may be switched on via setting the environment + variable: + + ASAN_OPTIONS=allow_user_segv_handler=true + + As a redult, the command line to compile the code after the + auto-configuration has been done as mentioned above is: + + ASAN_OPTIONS=allow_user_segv_handler=true smake CCOM=gcc32 COPTX="-g -O0 -fsanitize=address" LDOPTX="-g -fsanitize=address" + + 3) If you are on Linux, do not forget to call "ulimit -c unlimited", + before calling the binary. This is needed as the default on Linux is + not to create a core file. + + 4) Set the environment ASAN_OPTIONS= for the execution of the binary + to control the behavior of the Address Sanitizer while the binary + is run. + + If you like to disable the memory leak detection because your program + is a short running program that intentionally does not free() resources + before calling exit(), use: + + ASAN_OPTIONS=allow_user_segv_handler=true:detect_leaks=0 + + If you also like to get a core dump on error to debug, you may like + to use: + + ASAN_OPTIONS=allow_user_segv_handler=true:detect_leaks=0:abort_on_error=1 + + Note that the Address Sanitizer disables the creation of a core file + for 64 bit binaries as the tables used by the Address Sanitizer may + cause the core file to have a size of 16 TB. + + +Compiling with the "Americal fuzzy lop": + + Follow the instruction from above for the address sanitizer, but + use this command line to call the compiler: + + ASAN_OPTIONS=allow_user_segv_handler=true AFL_HARDEN=1 AFL_USE_ASAN=1 smake CC=afl-gcc CCOM=gcc32 + + Author: Joerg Schilling @@ -353,6 +759,6 @@ Germany Email: joerg@schily.isdn.cs.tu-berlin.de, js@cs.tu-berlin.de - schilling@fokus.fhg.de + joerg.schilling@fokus.fraunhofer.de Please mail bugs and suggestions to me. diff -Nru cdrtools-2.01.01a33/READMEs/README.install cdrtools-3.02a09/READMEs/README.install --- cdrtools-2.01.01a33/READMEs/README.install 2002-12-16 20:25:44.000000000 +0000 +++ cdrtools-3.02a09/READMEs/README.install 2014-12-03 19:12:30.000000000 +0000 @@ -12,7 +12,8 @@ If you want to see a better example, please have a look at the "star" source. It may be found on: -ftp://ftp.berlios.de/pub/star +http://sourceforge.net/projects/s-tar/files/ + Have a look at the manual page, it is included in the distribution. Install the manual page with @@ -27,6 +28,6 @@ Germany Email: joerg@schily.isdn.cs.tu-berlin.de, js@cs.tu-berlin.de - schilling@fokus.fhg.de + joerg.schilling@fokus.fraunhofer.de Please mail bugs and suggestions to me. diff -Nru cdrtools-2.01.01a33/READMEs/README.win32 cdrtools-3.02a09/READMEs/README.win32 --- cdrtools-2.01.01a33/READMEs/README.win32 2002-12-16 20:29:45.000000000 +0000 +++ cdrtools-3.02a09/READMEs/README.win32 2014-12-07 13:52:54.000000000 +0000 @@ -1,4 +1,4 @@ -# @(#)README.win32 1.7 02/12/16 Copyright 2000 J. Schilling +# @(#)README.win32 1.10 14/12/07 Copyright 2000-2014 J. Schilling cdrecord-1.8a22 or later can be compiled on Win9X/NT4 using Cygnus' cygwin which is freely available from: @@ -15,7 +15,7 @@ e.g. Start a bash command line window and type: - star -xpz < cdrtools-1.10.tar.gz + star -xpz < cdrtools-3.01.tar.gz don't use winzip to unpack the tar archive, it will not unpack symlinks correctly. @@ -24,7 +24,7 @@ If you have problems with GNU make, get 'smake' from: - ftp://ftp.berlios.de/pub/smake/alpha/ + http://sourceforge.net/projects/s-make/files/alpha/ /*--------------------------------------------------------------------------*/ A bash window is available from the START -> Programs -> Cygnus Solutions @@ -33,7 +33,7 @@ Pre-compiled current 'cdrtools' Win32 binaries which should run on W95, W98 and WNT are available from: - ftp://ftp.berlios.de/pub/cdrecord/alpha/win32 + http://sourceforge.net/projects/cdrtools/files/alpha/win32 To use the pre-compiled binary, put the files cygwin1.dll, mount.exe as well as the files: @@ -49,7 +49,7 @@ for usage, see also: -http://www.fokus.fhg.de/research/cc/glone/employees/joerg.schilling/private/man/cdrecord.html + http://cdrecord.org/ All programs in this directory are Unix command line utilities and know nothing about DOS/WIN. They run in a POSIX subsystem that is supplied by @@ -163,21 +163,16 @@ original Adaptec drivers and is banned from most ftp servers for this reason. -You need a special ASPI driver version on NT-5.0 (Win2000) +If you do not have superuser permission which would allow you to use +the SPTI SCSI interface that is similar to a UNIX ioctl interface, +you need a special ASPI driver version on NT-5.0 (Win2000) -************************************ Seems to be dead -You may get one by downloading +You may get one by searching for: - http://www.poikosoft.com/writer/download.html + wnaspi32.dll -and unpacking the file mightywriter121.exe using unzip. -after you renamed ntaspi32.dll to wnaspi32.dll, cdrecord should work. -************************************ Seems to be dead - -But here is a new source for ASPI drivers: - -http://www.fortunecity.com/skyscraper/solo/719/aspi_drivers.htm +/*--------------------------------------------------------------------------*/ IMPORTANT diff -Nru cdrtools-2.01.01a33/README.SSPM cdrtools-3.02a09/README.SSPM --- cdrtools-2.01.01a33/README.SSPM 2002-12-16 20:25:10.000000000 +0000 +++ cdrtools-3.02a09/README.SSPM 2014-12-03 19:12:07.000000000 +0000 @@ -22,9 +22,9 @@ You may test the new system by first downloading the latest cdrtools package - ftp://ftp.berlios.de/pub/cdrecord/alpha/cdrtools-1.11a11.tar.gz + https://sourceforge.net/projects/cdrtools/files/alpha/ -or newer. Then unpack the source tarball, chdir into the top level +Then unpack the source tarball, chdir into the top level directory of the cdrtools package. Run 'make' and wait until the compilation has finished. @@ -36,7 +36,7 @@ another source. There is currently only one demo source that is ready for testing: - ftp://ftp.berlios.de/pub/star/alpha/star-1.4a08-sspm.tar.gz + http://sourceforge.net/projects/s-tar/files/star-1.4-sspm.tar.gz Unpack this tarball in the top level directory of cdrtools and call 'make' again. The Schily makefile system does recognize that there diff -Nru cdrtools-2.01.01a33/rscsi/Makefile cdrtools-3.02a09/rscsi/Makefile --- cdrtools-2.01.01a33/rscsi/Makefile 2007-06-13 21:46:05.000000000 +0000 +++ cdrtools-3.02a09/rscsi/Makefile 2008-08-01 21:21:12.000000000 +0000 @@ -1,4 +1,4 @@ -#ident @(#)Makefile 1.5 07/06/13 +#ident @(#)Makefile 1.7 08/08/01 ########################################################################### #include $(MAKE_M_ARCH).def SRCROOT= .. @@ -11,11 +11,12 @@ INSMODE= 4711 INSUSR= root #CPPOPTS += -DUSE_REMOTE +CPPOPTS += -I../libscg + CFILES= rscsi.c #HFILES= LIBS= -lscg $(LIB_VOLMGT) -ldeflt -lschily $(SCSILIB) $(LIB_SOCKET) -XMK_FILE= Makefile.dfl Makefile.doc -#XMK_FILE= Makefile.man +XMK_FILE= Makefile.man Makefile.dfl Makefile.doc ########################################################################### include $(SRCROOT)/$(RULESDIR)/rules.cmd diff -Nru cdrtools-2.01.01a33/rscsi/Makefile.dfl cdrtools-3.02a09/rscsi/Makefile.dfl --- cdrtools-2.01.01a33/rscsi/Makefile.dfl 2005-08-09 13:19:33.000000000 +0000 +++ cdrtools-3.02a09/rscsi/Makefile.dfl 2010-05-14 18:17:15.000000000 +0000 @@ -1,4 +1,4 @@ -#ident @(#)Makefile.dfl 1.1 05/08/09 +#ident @(#)Makefile.dfl 1.4 10/05/14 ########################################################################### # Sample makefile for installing non-localized auxiliary files ########################################################################### @@ -7,14 +7,13 @@ include $(SRCROOT)/$(RULESDIR)/rules.top ########################################################################### +INSMODE= 0644 INSDIR= etc/default +INSBASE= $(INS_RBASE:%/=%) TARGET= rscsi +AUXSRCEXT= .dfl #XMK_FILE= Makefile.man ########################################################################### include $(SRCROOT)/$(RULESDIR)/rules.aux ########################################################################### - -PTARGET= rscsi.dfl -rscsi: rscsi.dfl - : diff -Nru cdrtools-2.01.01a33/rscsi/Makefile.man cdrtools-3.02a09/rscsi/Makefile.man --- cdrtools-2.01.01a33/rscsi/Makefile.man 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/rscsi/Makefile.man 2006-02-08 22:50:41.000000000 +0000 @@ -0,0 +1,18 @@ +#ident %W% %E% %Q% +########################################################################### +# Sample makefile for installing manual pages +########################################################################### +SRCROOT= .. +RULESDIR= RULES +include $(SRCROOT)/$(RULESDIR)/rules.top +########################################################################### + +MANDIR= man +TARGETMAN= rscsi +MANSECT= $(MANSECT_CMD) +MANSUFFIX= $(MANSUFF_CMD) +MANFILE= rscsi.1 + +########################################################################### +include $(SRCROOT)/$(RULESDIR)/rules.man +########################################################################### diff -Nru cdrtools-2.01.01a33/rscsi/rscsi.1 cdrtools-3.02a09/rscsi/rscsi.1 --- cdrtools-2.01.01a33/rscsi/rscsi.1 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/rscsi/rscsi.1 2009-11-15 19:27:50.000000000 +0000 @@ -0,0 +1,692 @@ +. \" @(#)rscsi.1 1.5 09/11/15 Copyr 2000-2008 J. Schilling +. \" Manual Seite fuer rscsi +. \" +.if t .ds a \v'-0.55m'\h'0.00n'\z.\h'0.40n'\z.\v'0.55m'\h'-0.40n'a +.if t .ds o \v'-0.55m'\h'0.00n'\z.\h'0.45n'\z.\v'0.55m'\h'-0.45n'o +.if t .ds u \v'-0.55m'\h'0.00n'\z.\h'0.40n'\z.\v'0.55m'\h'-0.40n'u +.if t .ds A \v'-0.77m'\h'0.25n'\z.\h'0.45n'\z.\v'0.77m'\h'-0.70n'A +.if t .ds O \v'-0.77m'\h'0.25n'\z.\h'0.45n'\z.\v'0.77m'\h'-0.70n'O +.if t .ds U \v'-0.77m'\h'0.30n'\z.\h'0.45n'\z.\v'0.77m'\h'-0.75n'U +.if t .ds s \\(*b +.if t .ds S SS +.if n .ds a ae +.if n .ds o oe +.if n .ds u ue +.if n .ds s sz +.TH RSCSI 1 "Release 3.0" "J\*org Schilling" "Schily\'s USER COMMANDS" +.SH NAME +rscsi \- remote generic SCSI transport protocol server +.SH SYNOPSIS +.B /opt/schily/sbin/rscsi + +.SH DESCRIPTION +.IX "rscsi command" "" "\fLrscsi\fP \(em remote generic SCSI transport protocol server" +.IX "remote generic SCSI transport protocol server" "" "remote generic SCSI transport protocol server \(em \fLrscsi\fP" +The +.B rscsi +command is a +remote generic SCSI transport server program. +.B rscsi +is a program that is run locally on the machine with SCSI devices, +it is used by remote programs like +.BR cdrecord (1), +.BR cdda2wav (1), +.BR readcd (1), +and +.BR sformat (1) +that like to access SCSI devices +through an interprocess communication connection +via +.BR libscg . +.B rscsi +is normally started up with an +.BR rexec (3) +or +.BR rcmd (3) +call but it may also be connected via an internal pipe to an +.BR ssh (1) +session that was set up by the remote user. +.LP +The +.B rscsi +program accepts +.BR scg_open , +.BR scg_close , +.B scg_cmd +and +similar requests that are all related to the interface of +.BR libscg . +.B rscsi +performs the commands and then responds with a status indication. +.LP +The +.B rscsi +program is prepared to be installed as a +.B user shell +in the passwd +file to create remote SCSI specific logins and security checking. +.LP +All requests are send to the +.B rscsi +program in +.SM ASCII +and thus are byte order and machine independent. +.LP +All responses are send back in +.SM ASCII +and in one of the following two forms. +.LP +All successful commands (except for the "S" command that sends SCSI commands) have responses of +.IP +.BI A number\en +.LP +where +.I number +is the +.SM ASCII +representation of a decimal number that usually is the return +code of the corresponding system call or function. +.sp +All unsuccessful commands are responded to with +.IP +.BI E error-number \en error-message \en xerror-len\fB\en\fIxerror-txt +.LP +where +.I error-number +is one of the possible error +numbers described in +.BR intro (2), +and +.I error-message +is the corresponding error string as retrieved by +.BR strerror (3), +.I xerror-len +is the length of the additional error text +.I xerror-txt +and may be 0. In case +.I xerror-len +is 0, no +.I xerror-txt +is send. +Note that a failed SCSI command that returned SCSI sense data counts as +a successful command and does not use the default error format. +.LP +.ne 15 +The +.B rscsi +protocol implements the +following commands: +.RS +.br +.ne 7 +.TP 12 +.BI V what \en +Return the +.B version +for several instances of the software in the +.B rscsi +server. +The parameter +.B what +may have the following values: +.RS +.TP +.B 0 +Return +.B SCG_VERSION +from +.B libscg +on the +.B rscsi +server. +This returns the version string for the low level SCSI transport adaptation layer. +.TP +.B 1 +Return +.B SCG_AUTHOR +from +.B libscg +on the +.B rscsi +server. +This returns the author name for the low level SCSI transport adaptation layer. +.TP +.B 2 +Return +.B SCG_SCCS_ID +from +.B libscg +on the +.B rscsi +server. +This returns the SCCS version string for the low level SCSI transport adaptation layer. +.TP +.B 20 +Return +.B SCG_KVERSION +from +.B libscg +on the +.B rscsi +server. +This returns the version of kernel instance of the driver that is underneath the +low level SCSI transport adaptation layer. +.sp +This call may not be supported for all operating systems. +.PP +.sp +This command corresponds to the +.BR scg_version (3) +function from +.BR libscg . +.RE +.br +.ne 7 +.TP +.BI O device \en +Open the specified SCSI +.IR device . +.sp +See the description of the +.B dev= +option in +.BR cdrecord (1) +for more information on possible values of the +.I device +parameter. +.sp +If a device is already open, it is +closed before a new open is performed. +.sp +This command corresponds to the +.BR scg_open (3) +function from +.BR libscg . +.sp +The return value in case of success is 0. +.br +.ne 7 +.TP +.BI C device \en +Close the currently open device or file. The argument +.I device +is ignored. +.sp +This command corresponds to the +.BR scg_close (3) +function from +.BR libscg . +.sp +The return value is the return value from the +.BR scg_close (3) +function. +.br +.ne 7 +.TP +.BI D size \en +Set up the maximum DMA size for the currently open SCSI device. +The +.I size +parameter is the desired DMA size in bytes. +.sp +This command corresponds to the +.BR scg_bufsize (3) +function from +.BR libscg . +.sp +The returned value is the actual DMA size that could be set up. +This value may be lower than the +.I size +parameter. +.br +.ne 7 +.TP +.BI M size \en +Allocate a buffer suitable for SCSI DMA transfers. +.sp +This command corresponds to the +.BR scg_getbuf (3) +function from +.BR libscg . +.sp +The returned value is the actual DMA size that could be set up. +This value may be lower than the +.I size +parameter. +.br +.ne 7 +.TP +.B F\en +Free a previously allocated buffer. +.sp +This command corresponds to the +.BR scg_freebuf (3) +function from +.BR libscg . +.sp +The return value in case of success is 0. +.br +.ne 7 +.TP +.B N\en +Retrieve the maximum permitted value for the SCSI bus number. +.sp +This command corresponds to the +.BR scg_numbus (3) +function from +.BR libscg . +.sp +The return value is the return value from the +.BR scg_numbus (3) +function. +.br +.ne 7 +.TP +.BI B busno \en chan \en +Checks whether there is a SCSI bus with a busnumber that is equal to +.IR busno . +The +.I chan +parameter is currently ignored. +.sp +This command corresponds to the +.BR scg_havebus (3) +function from +.BR libscg . +.sp +The return value is the return value from the +.BR scg_havebus (3) +function. +.br +.ne 7 +.TP +.BI T busno \en chan \en target\fB\en\fIlun\fB\en +Set the SCSI target address to +.IR busno ", " target ", " lun . +The parameter +.I chan +is currently ignored. +.sp +This command corresponds to the +.BR scg_settarget (3) +function from +.BR libscg . +.sp +The return value is the return value from the +.BR scg_havebus (3) +function. +.br +.ne 7 +.TP +.B I\en +Retrieve the SCSI initiator ID for the current SCSI bus. +.sp +This command corresponds to the +.BR scg_initiator_id (3) +function from +.BR libscg . +.sp +The return value is the return value from the +.BR scg_initiator_id (3) +function. +.br +.ne 7 +.TP +.B A\en +Check whether the current target is or may be an ATAPI device. +.sp +This command corresponds to the +.BR scg_isatapi (3) +function from +.BR libscg . +.sp +The return value is the return value from the +.BR scg_isatapi (3) +function. +.br +.ne 7 +.TP +.BI R what \en +Perform a SCSI reset. The parameter +.I what +may have the following values: +.RS +.TP +0 +Test whether a SCSI reset is supported as with the +.B SCG_RESET_NOP +parameter. +.TP +1 +Perform a SCSI target reset as with the +.B SCG_RESET_TGT +parameter. +.TP +2 +Perform a SCSI bus reset as with the +.B SCG_RESET_BUS +parameter. +.PP +.sp +This command corresponds to the +.BR scg_reset (3) +function from +.BR libscg . +.sp +The return value is the return value from the +.BR scg_reset (3) +function. +.RE +.br +.ne 7 +.TP +.BI S count \en flags \en\fIcdb_len\fB\en\fIsense_len\fB\en\fItimeout\fB\en +Send a SCSI command to the currently selected target. +This command takes the following parameters: +.RS +.TP +.B count +The DMA count for this command. If the command is a command that transfers +data to the target, the related data is send directly after the SCSI command descriptor block. +that is described above. +.TP +.B flags +The flags that apply to this SCSI command: +.RS +.TP +.B 1 +Tell the kernel that the SCSI command will transfer data from the target to the host. +This corresponds to the flag value +.BR SCG_RECV_DATA . +.TP +.B 2 +Tell the kernel to send the SCSI command with disconnect/reconnect enabled. +This corresponds to the flag value +.BR SCG_DISRE_ENA . +This flag is not supported on all platforms. +.TP +.B 4 +Make the kernel silent on SCSI errors. +This corresponds to the flag value +.BR SCG_SILENT . +This flag is not supported on all platforms. +.TP +.B 8 +Tell the kernel to retry the SCSI command in case of a retryable SCSI transport error. +This corresponds to the flag value +.BR SCG_CMD_RETRY . +This flag is not supported on all platforms. +.TP +.B 16 +Tell the kernel to send the SCSI command with parity disabled. +This corresponds to the flag value +.BR SCG_NOPARITY . +This flag is not supported on all platforms. +.RE +.TP +.B cdb_len +The SCSI command descriptor length for this command. +The SCSI command descriptor has to be send with the correct length directly after the new line past the +.B timeout +value. +.TP +.B sense_len +The amount of sense data that is expected in return of a failed SCSI command that +produces SCSI sense data. +.TP +.B timeout +The timeout for the SCSI command in seconds. +Fractions of a second may be specified by sending a floating point number. +.PP +The reply for a SCSI command that could be send to the target is: +.sp +.BI A count \en error \en\fIerrno\fB\en\fIscb\fB\en\fIsense_count\fB\en +.TP +.B count +The DMA count of any data returned from the target. +If this count is nonzero, the data is send back directly after the reply block mentioned above. +.TP +.B error +A SCSI error classification from one of the following values: +.RS +.sp +.ne 3 +.TP +.B 0 +No error occurred. +This value corresponds to the value +.B SCG_NO_ERROR . +.sp +.ne 3 +.TP +.B 1 +A retryable error occurred while trying to transport the SCSI command to the target. +This value corresponds to the value +.B SCG_RETRYABLE . +.sp +.ne 3 +.TP +.B 2 +A fatal error occurred while trying to transport the SCSI command to the target. +This value corresponds to the value +.B SCG_FATAL . +.sp +.ne 3 +.TP +.B 3 +A SCSI timeout occurred. +This value corresponds to the value +.B SCG_TIMEOUT . +.RE +.sp +.ne 3 +.TP +.B errno +Any possible +.B "UNIX errno +value for the SCSI command. +.sp +.ne 3 +.TP +.B scb +The SCSI status byte +.sp +.ne 3 +.TP +.B sense_count +The sense count returned for the SCSI command. +The SCSI sense data is send back directly after any possible +SCSI DMA data received from the target. +.sp +This command corresponds to the +.BR scg_cmd (3) +function from +.BR libscg . +.sp +The return value is the return value from the +.BR scg_cmd (3) +function. +.RE +.RE +.LP +Any other command causes +.B rscsi +to exit. +.SH FILES +.TP +/etc/default/rscsi +Default values can be set for the following options in /etc/default/rscsi. +For example: +.sp +.BR DEBUG= /tmp/rscsi.debug +.br +.BR USER= rscsi +.br +.BR ACCESS= "rscsi myhost.mydomain.org 1 -1 3 0" +.sp +All keywords must be on the beginning of a line. +.RS +.TP +.B DEBUG +If you like to get debug information, set this to a file name where +.B rscsi +should put debug information. +.TP +.B USER +The name of a user (local to the RSCSI server) that may use +the services of the +.B rscsi +server. +More than one +.BI USER= name +line is possible. +A line +.BR USER= * +grants access to all users. +.TP +.B ACCESS +This keyword is followed by six parameters separated by a TAB. +The +.B name +of a user (local to the RSCSI server host) that may use +the services of the +.B rscsi +server followed by the +.B "name of a host +from where operation is granted +followed by a +.B "SCSI device +specification that is made of +.B bus-number +.BR channel " (ignored for now) +.B target-id +and +.B lun +that specify a SCSI device that may be accessed if this +.B ACCESS +line matches. +If one or more entries of the +.B bus-number +.B channel +.B target-id +.B lun +specification is set to -1, this matches any possible value +for the related part of the SCSI device specification. +More than one +.BI ACCESS= "name host SCSI-device" +line is possible. +.sp +If standard input of +.B rscsi +is not a socket from a remote host, +.B rscsi +will compare the +.B "host entry +from +.B /etc/default/rscsi +with the following strings: +.RS +.TP 10 +.B PIPE +If +.B stdin +is a +.SM UNIX +pipe. +.sp +If you like to allow remote connections that use the +.B ssh +protocol, you need to use the word +.B PIPE +instead of the real hostname in the matching +.B ACCESS= +line. +.TP +.B ILLEGAL_SOCKET +If +.B getpeername() +does not work for +.BR stdin . +.TP +.B NOT_IP +If +.B getpeername() +works for +.B stdin +but is not connected to an internet socket. +.RE +.RE +.SH "SEE ALSO" +.BR cdrecord (1), +.BR cdda2wav (1), +.BR readcd (1), +.BR sformat (1), +.BR ssh (1), +.BR intro (2), +.BR open (2), +.BR close (2), +.BR read (2), +.BR write (2), +.BR ioctl (2), +.BR getpeername(3) +.BR rcmd (3), +.BR rexec (3), +.BR strerror (3) + +.SH DIAGNOSTICS +All responses are send to the network connection. +They use the form described above. +.SH NOTES +.LP +The possibility to create a debug file by calling +.BI rscsi " file +has been disabled for security reasons. +If you like to debug +.B rscsi +edit +.B /etc/default/rscsi +and insert a +.B DEBUG +entry. +.SH BUGS +.LP +None known. +.SH HISTORY +.LP +The +.B rscsi +command has been developed by J\*org Schilling in June 2000. + +.SH AUTHOR +.nf +J\*org Schilling +Seestr. 110 +D-13353 Berlin +Germany +.fi +.PP +Mail bugs and suggestions to: +.PP +.B +joerg.schilling@fokus.fraunhofer.de +or +.B +js@cs.tu-berlin.de +or +.B +joerg@schily.isdn.cs.tu-berlin.de +.br +.ne 7 +.SH "INTERFACE STABILITY +The interfaces provided by +.B rscsi +are designed for long term stability. +As +.B rscsi +depends on interfaces provided by the underlying operating system, +the stability of the interfaces offered by +.B rscsi +depends on the interface stability of the OS interfaces. +Modified interfaces in the OS may enforce modified interfaces +in +.BR rscsi . diff -Nru cdrtools-2.01.01a33/rscsi/rscsi.c cdrtools-3.02a09/rscsi/rscsi.c --- cdrtools-2.01.01a33/rscsi/rscsi.c 2006-11-26 20:38:12.000000000 +0000 +++ cdrtools-3.02a09/rscsi/rscsi.c 2010-05-24 09:27:48.000000000 +0000 @@ -1,12 +1,13 @@ -/* @(#)rscsi.c 1.32 06/11/26 Copyright 1994,2000-2006 J. Schilling*/ +/* @(#)rscsi.c 1.38 10/05/24 Copyright 1994,2000-2010 J. Schilling*/ +#include #ifndef lint -static char sccsid[] = - "@(#)rscsi.c 1.32 06/11/26 Copyright 1994,2000-2006 J. Schilling"; +static UConst char sccsid[] = + "@(#)rscsi.c 1.38 10/05/24 Copyright 1994,2000-2010 J. Schilling"; #endif /* * Remote SCSI server * - * Copyright (c) 1994,2000-2006 J. Schilling + * Copyright (c) 1994,2000-2010 J. Schilling */ /* * The contents of this file are subject to the terms of the @@ -22,9 +23,7 @@ /*#define FORCE_DEBUG*/ -#include - -#include +#include #include #include /* includes */ #include @@ -33,13 +32,11 @@ #include #ifdef HAVE_SYS_SOCKET_H #define USE_REMOTE -#include -#endif -#ifdef HAVE_SYS_PARAM_H -#include /* BSD-4.2 & Linux need this for MAXHOSTNAMELEN */ +#include #endif +#include /* BSD-4.2 & Linux need this for MAXHOSTNAMELEN */ #include -#include +#include #include #include @@ -49,13 +46,10 @@ #include #include -#include -#ifdef HAVE_ARPA_INET_H -#include /* BeOS does not have */ -#endif /* but inet_ntaoa() is in */ -#ifdef HAVE_NETDB_H -#include -#endif +#include +#include /* BeOS does not have */ + /* but inet_ntaoa() is in */ +#include EXPORT int main __PR((int argc, char **argv)); #ifdef USE_REMOTE @@ -102,13 +96,13 @@ LOCAL char *debug_name; LOCAL FILE *debug_file; -#define DEBUG(fmt) if (debug_file) js_fprintf(debug_file, fmt) -#define DEBUG1(fmt,a) if (debug_file) js_fprintf(debug_file, fmt, a) -#define DEBUG2(fmt,a1,a2) if (debug_file) js_fprintf(debug_file, fmt, a1, a2) -#define DEBUG3(fmt,a1,a2,a3) if (debug_file) js_fprintf(debug_file, fmt, a1, a2, a3) -#define DEBUG4(fmt,a1,a2,a3,a4) if (debug_file) js_fprintf(debug_file, fmt, a1, a2, a3, a4) -#define DEBUG5(fmt,a1,a2,a3,a4,a5) if (debug_file) js_fprintf(debug_file, fmt, a1, a2, a3, a4, a5) -#define DEBUG6(fmt,a1,a2,a3,a4,a5,a6) if (debug_file) js_fprintf(debug_file, fmt, a1, a2, a3, a4, a5, a6) +#define DEBUG(fmt) if (debug_file) js_fprintf(debug_file, fmt) +#define DEBUG1(fmt, a) if (debug_file) js_fprintf(debug_file, fmt, a) +#define DEBUG2(fmt, a1, a2) if (debug_file) js_fprintf(debug_file, fmt, a1, a2) +#define DEBUG3(fmt, a1, a2, a3) if (debug_file) js_fprintf(debug_file, fmt, a1, a2, a3) +#define DEBUG4(fmt, a1, a2, a3, a4) if (debug_file) js_fprintf(debug_file, fmt, a1, a2, a3, a4) +#define DEBUG5(fmt, a1, a2, a3, a4, a5) if (debug_file) js_fprintf(debug_file, fmt, a1, a2, a3, a4, a5) +#define DEBUG6(fmt, a1, a2, a3, a4, a5, a6) if (debug_file) js_fprintf(debug_file, fmt, a1, a2, a3, a4, a5, a6) #endif /* USE_REMOTE */ EXPORT int @@ -146,7 +140,7 @@ /* rscsirespond(-1, geterrno());*/ exit(EX_BAD); } - debug_name=defltread("DEBUG="); + debug_name = defltread("DEBUG="); #ifdef FORCE_DEBUG if (debug_name == NULL && argc <= 0) debug_name = "/tmp/RSCSI"; @@ -169,7 +163,7 @@ */ if (debug_name != NULL) debug_file = fopen(debug_name, "w"); - + if (argc > 0) { if (debug_file == 0) { rscsirespond(-1, geterrno()); @@ -277,7 +271,7 @@ s->sin_family); return ("NOT_IP"); } - + #ifdef HAVE_GETNAMEINFO buffer[0] = '\0'; if (debug_file && @@ -294,13 +288,13 @@ return ("CANNOT_MAP_ADDRESS"); #else /* HAVE_GETNAMEINFO */ #ifdef HAVE_INET_NTOA - (void) js_snprintf(buffer, sizeof(buffer), "%s", inet_ntoa(s->sin_addr)); + (void) js_snprintf(buffer, sizeof (buffer), "%s", inet_ntoa(s->sin_addr)); #else - (void) js_snprintf(buffer, sizeof(buffer), "%x", s->sin_addr.s_addr); + (void) js_snprintf(buffer, sizeof (buffer), "%x", s->sin_addr.s_addr); #endif DEBUG1("rscsid: peername %s\n", buffer); he = gethostbyaddr((char *)&s->sin_addr.s_addr, 4, AF_INET); - DEBUG1("rscsid: peername %s\n", he!=NULL?he->h_name:buffer); + DEBUG1("rscsid: peername %s\n", he != NULL ? he->h_name:buffer); if (he != NULL) return (he->h_name); return (buffer); @@ -356,7 +350,7 @@ continue; p = astoi(p, &lun); - if (*p != '\t' && *p != '\n' && *p != '\r' && *p != '\0') + if (*p != '\t' && *p != '\n' && *p != '\r' && *p != '\0') continue; DEBUG6("ACCESS %s %s %d.%d,%d,%d\n", user, host, bus, chan, tgt, lun); @@ -383,8 +377,8 @@ char *p; plen = strlen(pat); - aux = malloc(plen*sizeof(int)); - state = malloc((plen+1)*sizeof(int)); + aux = malloc(plen*sizeof (int)); + state = malloc((plen+1)*sizeof (int)); if (aux == NULL || state == NULL) { if (aux) free(aux); if (state) free(state); @@ -475,13 +469,19 @@ char *str; char what[CMD_SIZE]; - readarg(what, sizeof(what)); + readarg(what, sizeof (what)); DEBUG1("rscsid: V %s\n", what); - if (scsi_ptr == NULL) { - rscsirespond(-1, EBADF); + + /* + * If there was no 'O'pen command yet, scsi_ptr is NULL + * and our libscg returns values for the library instead + * of returning values for the low level transport. + */ + str = scg_version(scsi_ptr, atoi(what)); + if (str == NULL) { + rscsirespond(-1, EINVAL); return; } - str = scg_version(scsi_ptr, atoi(what)); ret = strlen(str); ret++; /* Include null char */ rscsirespond(ret, geterrno()); @@ -501,7 +501,7 @@ if (scsi_ptr != NULL) (void) scg_close(scsi_ptr); - readarg(device, sizeof(device)); + readarg(device, sizeof (device)); DEBUG1("rscsid: O %s\n", device); if (strncmp(device, "REMOTE", 6) == 0) { scsi_ptr = NULL; @@ -510,7 +510,7 @@ scsi_ptr = NULL; seterrno(EACCES); } else { - scsi_ptr = scg_open(device, errstr, sizeof(errstr), debug, lverbose); + scsi_ptr = scg_open(device, errstr, sizeof (errstr), debug, lverbose); if (scsi_ptr == NULL) { ret = -1; } else { @@ -529,13 +529,13 @@ /* rscsirespond(ret, geterrno());*/ return; } - DEBUG4("rscsid:>A 0 %d.%d,%d,%d\n", + DEBUG4("rscsid:>A 0 %d.%d,%d,%d\n", scg_scsibus(scsi_ptr), 0, scg_target(scsi_ptr), scg_lun(scsi_ptr)); - ret = js_snprintf(rbuf, sizeof(rbuf), "A0\n%d\n%d\n%d\n%d\n", + ret = js_snprintf(rbuf, sizeof (rbuf), "A0\n%d\n%d\n%d\n%d\n", scg_scsibus(scsi_ptr), 0, scg_target(scsi_ptr), @@ -549,7 +549,7 @@ int ret; char device[CMD_SIZE]; - readarg(device, sizeof(device)); + readarg(device, sizeof (device)); DEBUG1("rscsid: C %s\n", device); ret = scg_close(scsi_ptr); rscsirespond(ret, geterrno()); @@ -562,7 +562,7 @@ int ret; char amt[CMD_SIZE]; - readarg(amt, sizeof(amt)); + readarg(amt, sizeof (amt)); DEBUG1("rscsid: D %s\n", amt); if (scsi_ptr == NULL) { rscsirespond(-1, EBADF); @@ -578,7 +578,7 @@ int ret = 0; char amt[CMD_SIZE]; - readarg(amt, sizeof(amt)); + readarg(amt, sizeof (amt)); DEBUG1("rscsid: M %s\n", amt); if (scsi_ptr == NULL) { rscsirespond(-1, EBADF); @@ -596,7 +596,7 @@ int ret = 0; char dummy[CMD_SIZE]; - readarg(dummy, sizeof(dummy)); + readarg(dummy, sizeof (dummy)); DEBUG1("rscsid: F %s\n", dummy); if (scsi_ptr == NULL) { rscsirespond(-1, EBADF); @@ -614,7 +614,7 @@ char dummy[CMD_SIZE]; - readarg(dummy, sizeof(dummy)); + readarg(dummy, sizeof (dummy)); DEBUG1("rscsid: N %s\n", dummy); if (scsi_ptr == NULL) { rscsirespond(-1, EBADF); @@ -631,8 +631,8 @@ char bus[CMD_SIZE]; char chan[CMD_SIZE]; - readarg(bus, sizeof(bus)); - readarg(chan, sizeof(chan)); + readarg(bus, sizeof (bus)); + readarg(chan, sizeof (chan)); DEBUG2("rscsid: B %s.%s\n", bus, chan); if (scsi_ptr == NULL) { rscsirespond(-1, EBADF); @@ -651,10 +651,10 @@ char tgt[CMD_SIZE]; char lun[CMD_SIZE]; - readarg(bus, sizeof(bus)); - readarg(chan, sizeof(chan)); - readarg(tgt, sizeof(tgt)); - readarg(lun, sizeof(lun)); + readarg(bus, sizeof (bus)); + readarg(chan, sizeof (chan)); + readarg(tgt, sizeof (tgt)); + readarg(lun, sizeof (lun)); DEBUG4("rscsid: T %s.%s,%s,%s\n", bus, chan, tgt, lun); if (scsi_ptr == NULL) { rscsirespond(-1, EBADF); @@ -678,7 +678,7 @@ int ret; char dummy[CMD_SIZE]; - readarg(dummy, sizeof(dummy)); + readarg(dummy, sizeof (dummy)); DEBUG1("rscsid: I %s\n", dummy); if (scsi_ptr == NULL) { rscsirespond(-1, EBADF); @@ -698,7 +698,7 @@ int ret; char dummy[CMD_SIZE]; - readarg(dummy, sizeof(dummy)); + readarg(dummy, sizeof (dummy)); DEBUG1("rscsid: A %s\n", dummy); if (scsi_ptr == NULL) { rscsirespond(-1, EBADF); @@ -718,7 +718,7 @@ int ret; char what[CMD_SIZE]; - readarg(what, sizeof(what)); + readarg(what, sizeof (what)); DEBUG1("rscsid: R %s\n", what); if (scsi_ptr == NULL) { rscsirespond(-1, EBADF); @@ -758,11 +758,11 @@ * - sss (e.g. 10) * - sss.uuu (e.g. 10.23) */ - readarg(count, sizeof(count)); - readarg(flags, sizeof(flags)); - readarg(cdb_len, sizeof(cdb_len)); - readarg(sense_len, sizeof(sense_len)); - readarg(timeout, sizeof(timeout)); + readarg(count, sizeof (count)); + readarg(flags, sizeof (flags)); + readarg(cdb_len, sizeof (cdb_len)); + readarg(sense_len, sizeof (sense_len)); + readarg(timeout, sizeof (timeout)); DEBUG5("rscsid: S %s %s %s %s %s", count, flags, cdb_len, sense_len, timeout); csize = atoi(count); cflags = atoi(flags); @@ -778,12 +778,12 @@ voidarg(clen); if ((cflags & SCG_RECV_DATA) == 0 && csize > 0) voidarg(csize); - rscsirespond(-1, scsi_ptr==NULL ? EBADF : EINVAL); + rscsirespond(-1, scsi_ptr == NULL ? EBADF : EINVAL); return; } scmd = scsi_ptr->scmd; - fillbytes((caddr_t)scmd, sizeof(*scmd), '\0'); + fillbytes((caddr_t)scmd, sizeof (*scmd), '\0'); scmd->addr = (caddr_t)Sbuf; scmd->size = csize; scmd->flags = cflags; @@ -825,7 +825,7 @@ *(Uchar *)&scmd->scb, scmd->sense_count); - ret = js_snprintf(rbuf, sizeof(rbuf), "A%d\n%d\n%d\n%d\n%d\n", + ret = js_snprintf(rbuf, sizeof (rbuf), "A%d\n%d\n%d\n%d\n%d\n", n, scmd->error, scmd->ux_errno, @@ -838,7 +838,7 @@ } if ((cflags & SCG_RECV_DATA) == 0) n = 0; - if (n > 0 && ((ret + n) <= sizeof(rbuf))) { + if (n > 0 && ((ret + n) <= sizeof (rbuf))) { movebytes(Sbuf, &rbuf[ret], n); ret += n; n = 0; @@ -909,10 +909,10 @@ { register int i; register int amt; - char buf[512]; + char buf[512]; for (i = 0; i < n; i += amt) { - amt = sizeof(buf); + amt = sizeof (buf); if ((n - i) < amt) amt = n - i; readbuf(buf, amt); @@ -948,13 +948,13 @@ #ifdef SO_SNDBUF while (size > 512 && - setsockopt(STDOUT_FILENO, SOL_SOCKET, SO_SNDBUF, (char *)&size, sizeof (size)) < 0) + setsockopt(STDOUT_FILENO, SOL_SOCKET, SO_SNDBUF, (char *)&size, sizeof (size)) < 0) size -= 512; DEBUG1("rscsid: sndsize: %d\n", size); #endif #ifdef SO_RCVBUF while (size > 512 && - setsockopt(STDIN_FILENO, SOL_SOCKET, SO_RCVBUF, (char *)&size, sizeof (size)) < 0) + setsockopt(STDIN_FILENO, SOL_SOCKET, SO_RCVBUF, (char *)&size, sizeof (size)) < 0) size -= 512; DEBUG1("rscsid: rcvsize: %d\n", size); #endif @@ -996,7 +996,7 @@ char rbuf[CMD_SIZE]; DEBUG1("rscsid:>A %d\n", ret); - (void) js_snprintf(rbuf, sizeof(rbuf), "A%d\n", ret); + (void) js_snprintf(rbuf, sizeof (rbuf), "A%d\n", ret); (void) _nixwrite(STDOUT_FILENO, rbuf, strlen(rbuf)); } @@ -1014,9 +1014,9 @@ xlen = strlen(xstr) + 1; DEBUG3("rscsid:>E %d (%s) [%s]\n", err, str, xstr?xstr:""); - n = js_snprintf(rbuf, sizeof(rbuf), "E%d\n%s\n%d\n", err, str, xlen); + n = js_snprintf(rbuf, sizeof (rbuf), "E%d\n%s\n%d\n", err, str, xlen); - if (xlen > 0 && ((xlen + n) <= sizeof(rbuf))) { + if (xlen > 0 && ((xlen + n) <= sizeof (rbuf))) { movebytes(xstr, &rbuf[n], xlen); n += xlen; xlen = 0; diff -Nru cdrtools-2.01.01a33/RULES/9000-710-hp-ux-cc.rul cdrtools-3.02a09/RULES/9000-710-hp-ux-cc.rul --- cdrtools-2.01.01a33/RULES/9000-710-hp-ux-cc.rul 2007-05-08 11:03:07.000000000 +0000 +++ cdrtools-3.02a09/RULES/9000-710-hp-ux-cc.rul 1970-01-01 00:00:00.000000000 +0000 @@ -1,34 +0,0 @@ -#ident "@(#)9000-725-hp-ux-cc.rul 1.13 07/05/08 " -########################################################################### -# Written 1996 by J. Schilling -########################################################################### -# -# Platform dependent MACROS for HP/UX -# -########################################################################### -# Copyright (c) J. Schilling -########################################################################### -# The contents of this file are subject to the terms of the -# Common Development and Distribution License, Version 1.0 only -# (the "License"). You may not use this file except in compliance -# with the License. -# -# See the file CDDL.Schily.txt in this distribution for details. -# -# When distributing Covered Code, include this CDDL HEADER in each -# file and include the License file CDDL.Schily.txt from this distribution. -########################################################################### -include $(SRCROOT)/$(RULESDIR)/rules.prg -########################################################################### -include $(SRCROOT)/$(RULESDIR)/cc-hp.rul - -OSDEFS += - -KDEFINES= -DKERNEL -D_KERNEL - -LIB_SOCKET= -LIB_MATH= -lm -LIB_KVM= - -LORDER= echo -TSORT= cat diff -Nru cdrtools-2.01.01a33/RULES/9000-710-hp-ux-gcc.rul cdrtools-3.02a09/RULES/9000-710-hp-ux-gcc.rul --- cdrtools-2.01.01a33/RULES/9000-710-hp-ux-gcc.rul 2007-05-09 12:25:30.000000000 +0000 +++ cdrtools-3.02a09/RULES/9000-710-hp-ux-gcc.rul 1970-01-01 00:00:00.000000000 +0000 @@ -1,42 +0,0 @@ -#ident "@(#)9000-725-hp-ux-gcc.rul 1.10 07/05/09 " -########################################################################### -# Written 1996 by J. Schilling -########################################################################### -# -# Platform dependent MACROS for HP/UX -# -########################################################################### -# Copyright (c) J. Schilling -########################################################################### -# The contents of this file are subject to the terms of the -# Common Development and Distribution License, Version 1.0 only -# (the "License"). You may not use this file except in compliance -# with the License. -# -# See the file CDDL.Schily.txt in this distribution for details. -# -# When distributing Covered Code, include this CDDL HEADER in each -# file and include the License file CDDL.Schily.txt from this distribution. -########################################################################### -include $(SRCROOT)/$(RULESDIR)/rules.prg -########################################################################### -include $(SRCROOT)/$(RULESDIR)/cc-gcc.rul - -OSDEFS += - -KDEFINES= -DKERNEL -D_KERNEL - -LIB_PREFIX= lib -LIB_SUFFIX= .a -SHL_SUFFIX= .sl - -LIB_SOCKET= -LIB_MATH= -lm -LIB_KVM= - -#LDOPTS= $(LIBS_PATH) $(LDPATH) $(RUNPATH:-R%=-Wl,-R%) -LDOPTS= $(LIBS_PATH) $(LDPATH) -LNDYNLIB= @ - -LORDER= echo -TSORT= cat diff -Nru cdrtools-2.01.01a33/RULES/9000-712-hp-ux-cc.rul cdrtools-3.02a09/RULES/9000-712-hp-ux-cc.rul --- cdrtools-2.01.01a33/RULES/9000-712-hp-ux-cc.rul 2007-05-08 11:03:07.000000000 +0000 +++ cdrtools-3.02a09/RULES/9000-712-hp-ux-cc.rul 1970-01-01 00:00:00.000000000 +0000 @@ -1,34 +0,0 @@ -#ident "@(#)9000-725-hp-ux-cc.rul 1.13 07/05/08 " -########################################################################### -# Written 1996 by J. Schilling -########################################################################### -# -# Platform dependent MACROS for HP/UX -# -########################################################################### -# Copyright (c) J. Schilling -########################################################################### -# The contents of this file are subject to the terms of the -# Common Development and Distribution License, Version 1.0 only -# (the "License"). You may not use this file except in compliance -# with the License. -# -# See the file CDDL.Schily.txt in this distribution for details. -# -# When distributing Covered Code, include this CDDL HEADER in each -# file and include the License file CDDL.Schily.txt from this distribution. -########################################################################### -include $(SRCROOT)/$(RULESDIR)/rules.prg -########################################################################### -include $(SRCROOT)/$(RULESDIR)/cc-hp.rul - -OSDEFS += - -KDEFINES= -DKERNEL -D_KERNEL - -LIB_SOCKET= -LIB_MATH= -lm -LIB_KVM= - -LORDER= echo -TSORT= cat diff -Nru cdrtools-2.01.01a33/RULES/9000-712-hp-ux-gcc.rul cdrtools-3.02a09/RULES/9000-712-hp-ux-gcc.rul --- cdrtools-2.01.01a33/RULES/9000-712-hp-ux-gcc.rul 2007-05-09 12:25:30.000000000 +0000 +++ cdrtools-3.02a09/RULES/9000-712-hp-ux-gcc.rul 1970-01-01 00:00:00.000000000 +0000 @@ -1,42 +0,0 @@ -#ident "@(#)9000-725-hp-ux-gcc.rul 1.10 07/05/09 " -########################################################################### -# Written 1996 by J. Schilling -########################################################################### -# -# Platform dependent MACROS for HP/UX -# -########################################################################### -# Copyright (c) J. Schilling -########################################################################### -# The contents of this file are subject to the terms of the -# Common Development and Distribution License, Version 1.0 only -# (the "License"). You may not use this file except in compliance -# with the License. -# -# See the file CDDL.Schily.txt in this distribution for details. -# -# When distributing Covered Code, include this CDDL HEADER in each -# file and include the License file CDDL.Schily.txt from this distribution. -########################################################################### -include $(SRCROOT)/$(RULESDIR)/rules.prg -########################################################################### -include $(SRCROOT)/$(RULESDIR)/cc-gcc.rul - -OSDEFS += - -KDEFINES= -DKERNEL -D_KERNEL - -LIB_PREFIX= lib -LIB_SUFFIX= .a -SHL_SUFFIX= .sl - -LIB_SOCKET= -LIB_MATH= -lm -LIB_KVM= - -#LDOPTS= $(LIBS_PATH) $(LDPATH) $(RUNPATH:-R%=-Wl,-R%) -LDOPTS= $(LIBS_PATH) $(LDPATH) -LNDYNLIB= @ - -LORDER= echo -TSORT= cat diff -Nru cdrtools-2.01.01a33/RULES/9000-715-hp-ux-cc.rul cdrtools-3.02a09/RULES/9000-715-hp-ux-cc.rul --- cdrtools-2.01.01a33/RULES/9000-715-hp-ux-cc.rul 2007-05-08 11:03:07.000000000 +0000 +++ cdrtools-3.02a09/RULES/9000-715-hp-ux-cc.rul 1970-01-01 00:00:00.000000000 +0000 @@ -1,34 +0,0 @@ -#ident "@(#)9000-725-hp-ux-cc.rul 1.13 07/05/08 " -########################################################################### -# Written 1996 by J. Schilling -########################################################################### -# -# Platform dependent MACROS for HP/UX -# -########################################################################### -# Copyright (c) J. Schilling -########################################################################### -# The contents of this file are subject to the terms of the -# Common Development and Distribution License, Version 1.0 only -# (the "License"). You may not use this file except in compliance -# with the License. -# -# See the file CDDL.Schily.txt in this distribution for details. -# -# When distributing Covered Code, include this CDDL HEADER in each -# file and include the License file CDDL.Schily.txt from this distribution. -########################################################################### -include $(SRCROOT)/$(RULESDIR)/rules.prg -########################################################################### -include $(SRCROOT)/$(RULESDIR)/cc-hp.rul - -OSDEFS += - -KDEFINES= -DKERNEL -D_KERNEL - -LIB_SOCKET= -LIB_MATH= -lm -LIB_KVM= - -LORDER= echo -TSORT= cat diff -Nru cdrtools-2.01.01a33/RULES/9000-715-hp-ux-gcc.rul cdrtools-3.02a09/RULES/9000-715-hp-ux-gcc.rul --- cdrtools-2.01.01a33/RULES/9000-715-hp-ux-gcc.rul 2007-05-09 12:25:30.000000000 +0000 +++ cdrtools-3.02a09/RULES/9000-715-hp-ux-gcc.rul 1970-01-01 00:00:00.000000000 +0000 @@ -1,42 +0,0 @@ -#ident "@(#)9000-725-hp-ux-gcc.rul 1.10 07/05/09 " -########################################################################### -# Written 1996 by J. Schilling -########################################################################### -# -# Platform dependent MACROS for HP/UX -# -########################################################################### -# Copyright (c) J. Schilling -########################################################################### -# The contents of this file are subject to the terms of the -# Common Development and Distribution License, Version 1.0 only -# (the "License"). You may not use this file except in compliance -# with the License. -# -# See the file CDDL.Schily.txt in this distribution for details. -# -# When distributing Covered Code, include this CDDL HEADER in each -# file and include the License file CDDL.Schily.txt from this distribution. -########################################################################### -include $(SRCROOT)/$(RULESDIR)/rules.prg -########################################################################### -include $(SRCROOT)/$(RULESDIR)/cc-gcc.rul - -OSDEFS += - -KDEFINES= -DKERNEL -D_KERNEL - -LIB_PREFIX= lib -LIB_SUFFIX= .a -SHL_SUFFIX= .sl - -LIB_SOCKET= -LIB_MATH= -lm -LIB_KVM= - -#LDOPTS= $(LIBS_PATH) $(LDPATH) $(RUNPATH:-R%=-Wl,-R%) -LDOPTS= $(LIBS_PATH) $(LDPATH) -LNDYNLIB= @ - -LORDER= echo -TSORT= cat diff -Nru cdrtools-2.01.01a33/RULES/9000-725-hp-ux-cc.rul cdrtools-3.02a09/RULES/9000-725-hp-ux-cc.rul --- cdrtools-2.01.01a33/RULES/9000-725-hp-ux-cc.rul 2007-05-08 11:03:07.000000000 +0000 +++ cdrtools-3.02a09/RULES/9000-725-hp-ux-cc.rul 2014-04-01 12:22:23.000000000 +0000 @@ -1,4 +1,4 @@ -#ident "@(#)9000-725-hp-ux-cc.rul 1.13 07/05/08 " +#ident "@(#)9000-725-hp-ux-cc.rul 1.14 14/04/01 " ########################################################################### # Written 1996 by J. Schilling ########################################################################### @@ -14,13 +14,15 @@ # with the License. # # See the file CDDL.Schily.txt in this distribution for details. +# A copy of the CDDL is also available via the Internet at +# http://www.opensource.org/licenses/cddl1.txt # # When distributing Covered Code, include this CDDL HEADER in each # file and include the License file CDDL.Schily.txt from this distribution. ########################################################################### include $(SRCROOT)/$(RULESDIR)/rules.prg ########################################################################### -include $(SRCROOT)/$(RULESDIR)/cc-hp.rul +include $(SRCROOT)/$(RULESDIR)/cc-$(C_ARCH:cc%=hp%).rul OSDEFS += diff -Nru cdrtools-2.01.01a33/RULES/9000-725-hp-ux-gcc.rul cdrtools-3.02a09/RULES/9000-725-hp-ux-gcc.rul --- cdrtools-2.01.01a33/RULES/9000-725-hp-ux-gcc.rul 2007-05-09 12:25:30.000000000 +0000 +++ cdrtools-3.02a09/RULES/9000-725-hp-ux-gcc.rul 2017-05-02 22:10:30.000000000 +0000 @@ -1,6 +1,6 @@ -#ident "@(#)9000-725-hp-ux-gcc.rul 1.10 07/05/09 " +#ident "@(#)9000-725-hp-ux-gcc.rul 1.11 17/05/03 " ########################################################################### -# Written 1996 by J. Schilling +# Written 1996-2017 by J. Schilling ########################################################################### # # Platform dependent MACROS for HP/UX @@ -14,6 +14,8 @@ # with the License. # # See the file CDDL.Schily.txt in this distribution for details. +# A copy of the CDDL is also available via the Internet at +# http://www.opensource.org/licenses/cddl1.txt # # When distributing Covered Code, include this CDDL HEADER in each # file and include the License file CDDL.Schily.txt from this distribution. @@ -36,6 +38,8 @@ #LDOPTS= $(LIBS_PATH) $(LDPATH) $(RUNPATH:-R%=-Wl,-R%) LDOPTS= $(LIBS_PATH) $(LDPATH) +LDOPTDYN= -b +DYNLD= @echo " ==> LINKING dynamic library \"$@\""; ld LNDYNLIB= @ LORDER= echo diff -Nru cdrtools-2.01.01a33/RULES/9000-735-hp-ux-cc.rul cdrtools-3.02a09/RULES/9000-735-hp-ux-cc.rul --- cdrtools-2.01.01a33/RULES/9000-735-hp-ux-cc.rul 2007-05-08 11:03:07.000000000 +0000 +++ cdrtools-3.02a09/RULES/9000-735-hp-ux-cc.rul 1970-01-01 00:00:00.000000000 +0000 @@ -1,34 +0,0 @@ -#ident "@(#)9000-725-hp-ux-cc.rul 1.13 07/05/08 " -########################################################################### -# Written 1996 by J. Schilling -########################################################################### -# -# Platform dependent MACROS for HP/UX -# -########################################################################### -# Copyright (c) J. Schilling -########################################################################### -# The contents of this file are subject to the terms of the -# Common Development and Distribution License, Version 1.0 only -# (the "License"). You may not use this file except in compliance -# with the License. -# -# See the file CDDL.Schily.txt in this distribution for details. -# -# When distributing Covered Code, include this CDDL HEADER in each -# file and include the License file CDDL.Schily.txt from this distribution. -########################################################################### -include $(SRCROOT)/$(RULESDIR)/rules.prg -########################################################################### -include $(SRCROOT)/$(RULESDIR)/cc-hp.rul - -OSDEFS += - -KDEFINES= -DKERNEL -D_KERNEL - -LIB_SOCKET= -LIB_MATH= -lm -LIB_KVM= - -LORDER= echo -TSORT= cat diff -Nru cdrtools-2.01.01a33/RULES/9000-735-hp-ux-gcc.rul cdrtools-3.02a09/RULES/9000-735-hp-ux-gcc.rul --- cdrtools-2.01.01a33/RULES/9000-735-hp-ux-gcc.rul 2007-05-09 12:25:30.000000000 +0000 +++ cdrtools-3.02a09/RULES/9000-735-hp-ux-gcc.rul 1970-01-01 00:00:00.000000000 +0000 @@ -1,42 +0,0 @@ -#ident "@(#)9000-725-hp-ux-gcc.rul 1.10 07/05/09 " -########################################################################### -# Written 1996 by J. Schilling -########################################################################### -# -# Platform dependent MACROS for HP/UX -# -########################################################################### -# Copyright (c) J. Schilling -########################################################################### -# The contents of this file are subject to the terms of the -# Common Development and Distribution License, Version 1.0 only -# (the "License"). You may not use this file except in compliance -# with the License. -# -# See the file CDDL.Schily.txt in this distribution for details. -# -# When distributing Covered Code, include this CDDL HEADER in each -# file and include the License file CDDL.Schily.txt from this distribution. -########################################################################### -include $(SRCROOT)/$(RULESDIR)/rules.prg -########################################################################### -include $(SRCROOT)/$(RULESDIR)/cc-gcc.rul - -OSDEFS += - -KDEFINES= -DKERNEL -D_KERNEL - -LIB_PREFIX= lib -LIB_SUFFIX= .a -SHL_SUFFIX= .sl - -LIB_SOCKET= -LIB_MATH= -lm -LIB_KVM= - -#LDOPTS= $(LIBS_PATH) $(LDPATH) $(RUNPATH:-R%=-Wl,-R%) -LDOPTS= $(LIBS_PATH) $(LDPATH) -LNDYNLIB= @ - -LORDER= echo -TSORT= cat diff -Nru cdrtools-2.01.01a33/RULES/9000-743-hp-ux-cc.rul cdrtools-3.02a09/RULES/9000-743-hp-ux-cc.rul --- cdrtools-2.01.01a33/RULES/9000-743-hp-ux-cc.rul 2007-05-08 11:03:07.000000000 +0000 +++ cdrtools-3.02a09/RULES/9000-743-hp-ux-cc.rul 1970-01-01 00:00:00.000000000 +0000 @@ -1,34 +0,0 @@ -#ident "@(#)9000-725-hp-ux-cc.rul 1.13 07/05/08 " -########################################################################### -# Written 1996 by J. Schilling -########################################################################### -# -# Platform dependent MACROS for HP/UX -# -########################################################################### -# Copyright (c) J. Schilling -########################################################################### -# The contents of this file are subject to the terms of the -# Common Development and Distribution License, Version 1.0 only -# (the "License"). You may not use this file except in compliance -# with the License. -# -# See the file CDDL.Schily.txt in this distribution for details. -# -# When distributing Covered Code, include this CDDL HEADER in each -# file and include the License file CDDL.Schily.txt from this distribution. -########################################################################### -include $(SRCROOT)/$(RULESDIR)/rules.prg -########################################################################### -include $(SRCROOT)/$(RULESDIR)/cc-hp.rul - -OSDEFS += - -KDEFINES= -DKERNEL -D_KERNEL - -LIB_SOCKET= -LIB_MATH= -lm -LIB_KVM= - -LORDER= echo -TSORT= cat diff -Nru cdrtools-2.01.01a33/RULES/9000-743-hp-ux-gcc.rul cdrtools-3.02a09/RULES/9000-743-hp-ux-gcc.rul --- cdrtools-2.01.01a33/RULES/9000-743-hp-ux-gcc.rul 2007-05-09 12:25:30.000000000 +0000 +++ cdrtools-3.02a09/RULES/9000-743-hp-ux-gcc.rul 1970-01-01 00:00:00.000000000 +0000 @@ -1,42 +0,0 @@ -#ident "@(#)9000-725-hp-ux-gcc.rul 1.10 07/05/09 " -########################################################################### -# Written 1996 by J. Schilling -########################################################################### -# -# Platform dependent MACROS for HP/UX -# -########################################################################### -# Copyright (c) J. Schilling -########################################################################### -# The contents of this file are subject to the terms of the -# Common Development and Distribution License, Version 1.0 only -# (the "License"). You may not use this file except in compliance -# with the License. -# -# See the file CDDL.Schily.txt in this distribution for details. -# -# When distributing Covered Code, include this CDDL HEADER in each -# file and include the License file CDDL.Schily.txt from this distribution. -########################################################################### -include $(SRCROOT)/$(RULESDIR)/rules.prg -########################################################################### -include $(SRCROOT)/$(RULESDIR)/cc-gcc.rul - -OSDEFS += - -KDEFINES= -DKERNEL -D_KERNEL - -LIB_PREFIX= lib -LIB_SUFFIX= .a -SHL_SUFFIX= .sl - -LIB_SOCKET= -LIB_MATH= -lm -LIB_KVM= - -#LDOPTS= $(LIBS_PATH) $(LDPATH) $(RUNPATH:-R%=-Wl,-R%) -LDOPTS= $(LIBS_PATH) $(LDPATH) -LNDYNLIB= @ - -LORDER= echo -TSORT= cat diff -Nru cdrtools-2.01.01a33/RULES/9000-755-hp-ux-cc.rul cdrtools-3.02a09/RULES/9000-755-hp-ux-cc.rul --- cdrtools-2.01.01a33/RULES/9000-755-hp-ux-cc.rul 2007-05-08 11:03:07.000000000 +0000 +++ cdrtools-3.02a09/RULES/9000-755-hp-ux-cc.rul 1970-01-01 00:00:00.000000000 +0000 @@ -1,34 +0,0 @@ -#ident "@(#)9000-725-hp-ux-cc.rul 1.13 07/05/08 " -########################################################################### -# Written 1996 by J. Schilling -########################################################################### -# -# Platform dependent MACROS for HP/UX -# -########################################################################### -# Copyright (c) J. Schilling -########################################################################### -# The contents of this file are subject to the terms of the -# Common Development and Distribution License, Version 1.0 only -# (the "License"). You may not use this file except in compliance -# with the License. -# -# See the file CDDL.Schily.txt in this distribution for details. -# -# When distributing Covered Code, include this CDDL HEADER in each -# file and include the License file CDDL.Schily.txt from this distribution. -########################################################################### -include $(SRCROOT)/$(RULESDIR)/rules.prg -########################################################################### -include $(SRCROOT)/$(RULESDIR)/cc-hp.rul - -OSDEFS += - -KDEFINES= -DKERNEL -D_KERNEL - -LIB_SOCKET= -LIB_MATH= -lm -LIB_KVM= - -LORDER= echo -TSORT= cat diff -Nru cdrtools-2.01.01a33/RULES/9000-755-hp-ux-gcc.rul cdrtools-3.02a09/RULES/9000-755-hp-ux-gcc.rul --- cdrtools-2.01.01a33/RULES/9000-755-hp-ux-gcc.rul 2007-05-09 12:25:30.000000000 +0000 +++ cdrtools-3.02a09/RULES/9000-755-hp-ux-gcc.rul 1970-01-01 00:00:00.000000000 +0000 @@ -1,42 +0,0 @@ -#ident "@(#)9000-725-hp-ux-gcc.rul 1.10 07/05/09 " -########################################################################### -# Written 1996 by J. Schilling -########################################################################### -# -# Platform dependent MACROS for HP/UX -# -########################################################################### -# Copyright (c) J. Schilling -########################################################################### -# The contents of this file are subject to the terms of the -# Common Development and Distribution License, Version 1.0 only -# (the "License"). You may not use this file except in compliance -# with the License. -# -# See the file CDDL.Schily.txt in this distribution for details. -# -# When distributing Covered Code, include this CDDL HEADER in each -# file and include the License file CDDL.Schily.txt from this distribution. -########################################################################### -include $(SRCROOT)/$(RULESDIR)/rules.prg -########################################################################### -include $(SRCROOT)/$(RULESDIR)/cc-gcc.rul - -OSDEFS += - -KDEFINES= -DKERNEL -D_KERNEL - -LIB_PREFIX= lib -LIB_SUFFIX= .a -SHL_SUFFIX= .sl - -LIB_SOCKET= -LIB_MATH= -lm -LIB_KVM= - -#LDOPTS= $(LIBS_PATH) $(LDPATH) $(RUNPATH:-R%=-Wl,-R%) -LDOPTS= $(LIBS_PATH) $(LDPATH) -LNDYNLIB= @ - -LORDER= echo -TSORT= cat diff -Nru cdrtools-2.01.01a33/RULES/9000-777-hp-ux-cc.rul cdrtools-3.02a09/RULES/9000-777-hp-ux-cc.rul --- cdrtools-2.01.01a33/RULES/9000-777-hp-ux-cc.rul 2007-05-08 11:03:07.000000000 +0000 +++ cdrtools-3.02a09/RULES/9000-777-hp-ux-cc.rul 1970-01-01 00:00:00.000000000 +0000 @@ -1,34 +0,0 @@ -#ident "@(#)9000-725-hp-ux-cc.rul 1.13 07/05/08 " -########################################################################### -# Written 1996 by J. Schilling -########################################################################### -# -# Platform dependent MACROS for HP/UX -# -########################################################################### -# Copyright (c) J. Schilling -########################################################################### -# The contents of this file are subject to the terms of the -# Common Development and Distribution License, Version 1.0 only -# (the "License"). You may not use this file except in compliance -# with the License. -# -# See the file CDDL.Schily.txt in this distribution for details. -# -# When distributing Covered Code, include this CDDL HEADER in each -# file and include the License file CDDL.Schily.txt from this distribution. -########################################################################### -include $(SRCROOT)/$(RULESDIR)/rules.prg -########################################################################### -include $(SRCROOT)/$(RULESDIR)/cc-hp.rul - -OSDEFS += - -KDEFINES= -DKERNEL -D_KERNEL - -LIB_SOCKET= -LIB_MATH= -lm -LIB_KVM= - -LORDER= echo -TSORT= cat diff -Nru cdrtools-2.01.01a33/RULES/9000-777-hp-ux-gcc.rul cdrtools-3.02a09/RULES/9000-777-hp-ux-gcc.rul --- cdrtools-2.01.01a33/RULES/9000-777-hp-ux-gcc.rul 2007-05-09 12:25:30.000000000 +0000 +++ cdrtools-3.02a09/RULES/9000-777-hp-ux-gcc.rul 1970-01-01 00:00:00.000000000 +0000 @@ -1,42 +0,0 @@ -#ident "@(#)9000-725-hp-ux-gcc.rul 1.10 07/05/09 " -########################################################################### -# Written 1996 by J. Schilling -########################################################################### -# -# Platform dependent MACROS for HP/UX -# -########################################################################### -# Copyright (c) J. Schilling -########################################################################### -# The contents of this file are subject to the terms of the -# Common Development and Distribution License, Version 1.0 only -# (the "License"). You may not use this file except in compliance -# with the License. -# -# See the file CDDL.Schily.txt in this distribution for details. -# -# When distributing Covered Code, include this CDDL HEADER in each -# file and include the License file CDDL.Schily.txt from this distribution. -########################################################################### -include $(SRCROOT)/$(RULESDIR)/rules.prg -########################################################################### -include $(SRCROOT)/$(RULESDIR)/cc-gcc.rul - -OSDEFS += - -KDEFINES= -DKERNEL -D_KERNEL - -LIB_PREFIX= lib -LIB_SUFFIX= .a -SHL_SUFFIX= .sl - -LIB_SOCKET= -LIB_MATH= -lm -LIB_KVM= - -#LDOPTS= $(LIBS_PATH) $(LDPATH) $(RUNPATH:-R%=-Wl,-R%) -LDOPTS= $(LIBS_PATH) $(LDPATH) -LNDYNLIB= @ - -LORDER= echo -TSORT= cat diff -Nru cdrtools-2.01.01a33/RULES/9000-778-hp-ux-cc.rul cdrtools-3.02a09/RULES/9000-778-hp-ux-cc.rul --- cdrtools-2.01.01a33/RULES/9000-778-hp-ux-cc.rul 2007-05-08 11:03:07.000000000 +0000 +++ cdrtools-3.02a09/RULES/9000-778-hp-ux-cc.rul 1970-01-01 00:00:00.000000000 +0000 @@ -1,34 +0,0 @@ -#ident "@(#)9000-725-hp-ux-cc.rul 1.13 07/05/08 " -########################################################################### -# Written 1996 by J. Schilling -########################################################################### -# -# Platform dependent MACROS for HP/UX -# -########################################################################### -# Copyright (c) J. Schilling -########################################################################### -# The contents of this file are subject to the terms of the -# Common Development and Distribution License, Version 1.0 only -# (the "License"). You may not use this file except in compliance -# with the License. -# -# See the file CDDL.Schily.txt in this distribution for details. -# -# When distributing Covered Code, include this CDDL HEADER in each -# file and include the License file CDDL.Schily.txt from this distribution. -########################################################################### -include $(SRCROOT)/$(RULESDIR)/rules.prg -########################################################################### -include $(SRCROOT)/$(RULESDIR)/cc-hp.rul - -OSDEFS += - -KDEFINES= -DKERNEL -D_KERNEL - -LIB_SOCKET= -LIB_MATH= -lm -LIB_KVM= - -LORDER= echo -TSORT= cat diff -Nru cdrtools-2.01.01a33/RULES/9000-778-hp-ux-gcc.rul cdrtools-3.02a09/RULES/9000-778-hp-ux-gcc.rul --- cdrtools-2.01.01a33/RULES/9000-778-hp-ux-gcc.rul 2007-05-09 12:25:30.000000000 +0000 +++ cdrtools-3.02a09/RULES/9000-778-hp-ux-gcc.rul 1970-01-01 00:00:00.000000000 +0000 @@ -1,42 +0,0 @@ -#ident "@(#)9000-725-hp-ux-gcc.rul 1.10 07/05/09 " -########################################################################### -# Written 1996 by J. Schilling -########################################################################### -# -# Platform dependent MACROS for HP/UX -# -########################################################################### -# Copyright (c) J. Schilling -########################################################################### -# The contents of this file are subject to the terms of the -# Common Development and Distribution License, Version 1.0 only -# (the "License"). You may not use this file except in compliance -# with the License. -# -# See the file CDDL.Schily.txt in this distribution for details. -# -# When distributing Covered Code, include this CDDL HEADER in each -# file and include the License file CDDL.Schily.txt from this distribution. -########################################################################### -include $(SRCROOT)/$(RULESDIR)/rules.prg -########################################################################### -include $(SRCROOT)/$(RULESDIR)/cc-gcc.rul - -OSDEFS += - -KDEFINES= -DKERNEL -D_KERNEL - -LIB_PREFIX= lib -LIB_SUFFIX= .a -SHL_SUFFIX= .sl - -LIB_SOCKET= -LIB_MATH= -lm -LIB_KVM= - -#LDOPTS= $(LIBS_PATH) $(LDPATH) $(RUNPATH:-R%=-Wl,-R%) -LDOPTS= $(LIBS_PATH) $(LDPATH) -LNDYNLIB= @ - -LORDER= echo -TSORT= cat diff -Nru cdrtools-2.01.01a33/RULES/9000-780-hp-ux-cc.rul cdrtools-3.02a09/RULES/9000-780-hp-ux-cc.rul --- cdrtools-2.01.01a33/RULES/9000-780-hp-ux-cc.rul 2007-05-08 11:03:07.000000000 +0000 +++ cdrtools-3.02a09/RULES/9000-780-hp-ux-cc.rul 1970-01-01 00:00:00.000000000 +0000 @@ -1,34 +0,0 @@ -#ident "@(#)9000-725-hp-ux-cc.rul 1.13 07/05/08 " -########################################################################### -# Written 1996 by J. Schilling -########################################################################### -# -# Platform dependent MACROS for HP/UX -# -########################################################################### -# Copyright (c) J. Schilling -########################################################################### -# The contents of this file are subject to the terms of the -# Common Development and Distribution License, Version 1.0 only -# (the "License"). You may not use this file except in compliance -# with the License. -# -# See the file CDDL.Schily.txt in this distribution for details. -# -# When distributing Covered Code, include this CDDL HEADER in each -# file and include the License file CDDL.Schily.txt from this distribution. -########################################################################### -include $(SRCROOT)/$(RULESDIR)/rules.prg -########################################################################### -include $(SRCROOT)/$(RULESDIR)/cc-hp.rul - -OSDEFS += - -KDEFINES= -DKERNEL -D_KERNEL - -LIB_SOCKET= -LIB_MATH= -lm -LIB_KVM= - -LORDER= echo -TSORT= cat diff -Nru cdrtools-2.01.01a33/RULES/9000-780-hp-ux-gcc.rul cdrtools-3.02a09/RULES/9000-780-hp-ux-gcc.rul --- cdrtools-2.01.01a33/RULES/9000-780-hp-ux-gcc.rul 2007-05-09 12:25:30.000000000 +0000 +++ cdrtools-3.02a09/RULES/9000-780-hp-ux-gcc.rul 1970-01-01 00:00:00.000000000 +0000 @@ -1,42 +0,0 @@ -#ident "@(#)9000-725-hp-ux-gcc.rul 1.10 07/05/09 " -########################################################################### -# Written 1996 by J. Schilling -########################################################################### -# -# Platform dependent MACROS for HP/UX -# -########################################################################### -# Copyright (c) J. Schilling -########################################################################### -# The contents of this file are subject to the terms of the -# Common Development and Distribution License, Version 1.0 only -# (the "License"). You may not use this file except in compliance -# with the License. -# -# See the file CDDL.Schily.txt in this distribution for details. -# -# When distributing Covered Code, include this CDDL HEADER in each -# file and include the License file CDDL.Schily.txt from this distribution. -########################################################################### -include $(SRCROOT)/$(RULESDIR)/rules.prg -########################################################################### -include $(SRCROOT)/$(RULESDIR)/cc-gcc.rul - -OSDEFS += - -KDEFINES= -DKERNEL -D_KERNEL - -LIB_PREFIX= lib -LIB_SUFFIX= .a -SHL_SUFFIX= .sl - -LIB_SOCKET= -LIB_MATH= -lm -LIB_KVM= - -#LDOPTS= $(LIBS_PATH) $(LDPATH) $(RUNPATH:-R%=-Wl,-R%) -LDOPTS= $(LIBS_PATH) $(LDPATH) -LNDYNLIB= @ - -LORDER= echo -TSORT= cat diff -Nru cdrtools-2.01.01a33/RULES/9000-782-hp-ux-cc.rul cdrtools-3.02a09/RULES/9000-782-hp-ux-cc.rul --- cdrtools-2.01.01a33/RULES/9000-782-hp-ux-cc.rul 2007-05-08 11:03:07.000000000 +0000 +++ cdrtools-3.02a09/RULES/9000-782-hp-ux-cc.rul 1970-01-01 00:00:00.000000000 +0000 @@ -1,34 +0,0 @@ -#ident "@(#)9000-725-hp-ux-cc.rul 1.13 07/05/08 " -########################################################################### -# Written 1996 by J. Schilling -########################################################################### -# -# Platform dependent MACROS for HP/UX -# -########################################################################### -# Copyright (c) J. Schilling -########################################################################### -# The contents of this file are subject to the terms of the -# Common Development and Distribution License, Version 1.0 only -# (the "License"). You may not use this file except in compliance -# with the License. -# -# See the file CDDL.Schily.txt in this distribution for details. -# -# When distributing Covered Code, include this CDDL HEADER in each -# file and include the License file CDDL.Schily.txt from this distribution. -########################################################################### -include $(SRCROOT)/$(RULESDIR)/rules.prg -########################################################################### -include $(SRCROOT)/$(RULESDIR)/cc-hp.rul - -OSDEFS += - -KDEFINES= -DKERNEL -D_KERNEL - -LIB_SOCKET= -LIB_MATH= -lm -LIB_KVM= - -LORDER= echo -TSORT= cat diff -Nru cdrtools-2.01.01a33/RULES/9000-782-hp-ux-gcc.rul cdrtools-3.02a09/RULES/9000-782-hp-ux-gcc.rul --- cdrtools-2.01.01a33/RULES/9000-782-hp-ux-gcc.rul 2007-05-09 12:25:30.000000000 +0000 +++ cdrtools-3.02a09/RULES/9000-782-hp-ux-gcc.rul 1970-01-01 00:00:00.000000000 +0000 @@ -1,42 +0,0 @@ -#ident "@(#)9000-725-hp-ux-gcc.rul 1.10 07/05/09 " -########################################################################### -# Written 1996 by J. Schilling -########################################################################### -# -# Platform dependent MACROS for HP/UX -# -########################################################################### -# Copyright (c) J. Schilling -########################################################################### -# The contents of this file are subject to the terms of the -# Common Development and Distribution License, Version 1.0 only -# (the "License"). You may not use this file except in compliance -# with the License. -# -# See the file CDDL.Schily.txt in this distribution for details. -# -# When distributing Covered Code, include this CDDL HEADER in each -# file and include the License file CDDL.Schily.txt from this distribution. -########################################################################### -include $(SRCROOT)/$(RULESDIR)/rules.prg -########################################################################### -include $(SRCROOT)/$(RULESDIR)/cc-gcc.rul - -OSDEFS += - -KDEFINES= -DKERNEL -D_KERNEL - -LIB_PREFIX= lib -LIB_SUFFIX= .a -SHL_SUFFIX= .sl - -LIB_SOCKET= -LIB_MATH= -lm -LIB_KVM= - -#LDOPTS= $(LIBS_PATH) $(LDPATH) $(RUNPATH:-R%=-Wl,-R%) -LDOPTS= $(LIBS_PATH) $(LDPATH) -LNDYNLIB= @ - -LORDER= echo -TSORT= cat diff -Nru cdrtools-2.01.01a33/RULES/9000-785-hp-ux-cc.rul cdrtools-3.02a09/RULES/9000-785-hp-ux-cc.rul --- cdrtools-2.01.01a33/RULES/9000-785-hp-ux-cc.rul 2007-05-08 11:03:07.000000000 +0000 +++ cdrtools-3.02a09/RULES/9000-785-hp-ux-cc.rul 1970-01-01 00:00:00.000000000 +0000 @@ -1,34 +0,0 @@ -#ident "@(#)9000-725-hp-ux-cc.rul 1.13 07/05/08 " -########################################################################### -# Written 1996 by J. Schilling -########################################################################### -# -# Platform dependent MACROS for HP/UX -# -########################################################################### -# Copyright (c) J. Schilling -########################################################################### -# The contents of this file are subject to the terms of the -# Common Development and Distribution License, Version 1.0 only -# (the "License"). You may not use this file except in compliance -# with the License. -# -# See the file CDDL.Schily.txt in this distribution for details. -# -# When distributing Covered Code, include this CDDL HEADER in each -# file and include the License file CDDL.Schily.txt from this distribution. -########################################################################### -include $(SRCROOT)/$(RULESDIR)/rules.prg -########################################################################### -include $(SRCROOT)/$(RULESDIR)/cc-hp.rul - -OSDEFS += - -KDEFINES= -DKERNEL -D_KERNEL - -LIB_SOCKET= -LIB_MATH= -lm -LIB_KVM= - -LORDER= echo -TSORT= cat diff -Nru cdrtools-2.01.01a33/RULES/9000-785-hp-ux-gcc.rul cdrtools-3.02a09/RULES/9000-785-hp-ux-gcc.rul --- cdrtools-2.01.01a33/RULES/9000-785-hp-ux-gcc.rul 2007-05-09 12:25:30.000000000 +0000 +++ cdrtools-3.02a09/RULES/9000-785-hp-ux-gcc.rul 1970-01-01 00:00:00.000000000 +0000 @@ -1,42 +0,0 @@ -#ident "@(#)9000-725-hp-ux-gcc.rul 1.10 07/05/09 " -########################################################################### -# Written 1996 by J. Schilling -########################################################################### -# -# Platform dependent MACROS for HP/UX -# -########################################################################### -# Copyright (c) J. Schilling -########################################################################### -# The contents of this file are subject to the terms of the -# Common Development and Distribution License, Version 1.0 only -# (the "License"). You may not use this file except in compliance -# with the License. -# -# See the file CDDL.Schily.txt in this distribution for details. -# -# When distributing Covered Code, include this CDDL HEADER in each -# file and include the License file CDDL.Schily.txt from this distribution. -########################################################################### -include $(SRCROOT)/$(RULESDIR)/rules.prg -########################################################################### -include $(SRCROOT)/$(RULESDIR)/cc-gcc.rul - -OSDEFS += - -KDEFINES= -DKERNEL -D_KERNEL - -LIB_PREFIX= lib -LIB_SUFFIX= .a -SHL_SUFFIX= .sl - -LIB_SOCKET= -LIB_MATH= -lm -LIB_KVM= - -#LDOPTS= $(LIBS_PATH) $(LDPATH) $(RUNPATH:-R%=-Wl,-R%) -LDOPTS= $(LIBS_PATH) $(LDPATH) -LNDYNLIB= @ - -LORDER= echo -TSORT= cat diff -Nru cdrtools-2.01.01a33/RULES/9000-800-hp-ux-cc.rul cdrtools-3.02a09/RULES/9000-800-hp-ux-cc.rul --- cdrtools-2.01.01a33/RULES/9000-800-hp-ux-cc.rul 2007-05-08 11:03:07.000000000 +0000 +++ cdrtools-3.02a09/RULES/9000-800-hp-ux-cc.rul 1970-01-01 00:00:00.000000000 +0000 @@ -1,34 +0,0 @@ -#ident "@(#)9000-725-hp-ux-cc.rul 1.13 07/05/08 " -########################################################################### -# Written 1996 by J. Schilling -########################################################################### -# -# Platform dependent MACROS for HP/UX -# -########################################################################### -# Copyright (c) J. Schilling -########################################################################### -# The contents of this file are subject to the terms of the -# Common Development and Distribution License, Version 1.0 only -# (the "License"). You may not use this file except in compliance -# with the License. -# -# See the file CDDL.Schily.txt in this distribution for details. -# -# When distributing Covered Code, include this CDDL HEADER in each -# file and include the License file CDDL.Schily.txt from this distribution. -########################################################################### -include $(SRCROOT)/$(RULESDIR)/rules.prg -########################################################################### -include $(SRCROOT)/$(RULESDIR)/cc-hp.rul - -OSDEFS += - -KDEFINES= -DKERNEL -D_KERNEL - -LIB_SOCKET= -LIB_MATH= -lm -LIB_KVM= - -LORDER= echo -TSORT= cat diff -Nru cdrtools-2.01.01a33/RULES/9000-800-hp-ux-gcc.rul cdrtools-3.02a09/RULES/9000-800-hp-ux-gcc.rul --- cdrtools-2.01.01a33/RULES/9000-800-hp-ux-gcc.rul 2007-05-09 12:25:30.000000000 +0000 +++ cdrtools-3.02a09/RULES/9000-800-hp-ux-gcc.rul 1970-01-01 00:00:00.000000000 +0000 @@ -1,42 +0,0 @@ -#ident "@(#)9000-725-hp-ux-gcc.rul 1.10 07/05/09 " -########################################################################### -# Written 1996 by J. Schilling -########################################################################### -# -# Platform dependent MACROS for HP/UX -# -########################################################################### -# Copyright (c) J. Schilling -########################################################################### -# The contents of this file are subject to the terms of the -# Common Development and Distribution License, Version 1.0 only -# (the "License"). You may not use this file except in compliance -# with the License. -# -# See the file CDDL.Schily.txt in this distribution for details. -# -# When distributing Covered Code, include this CDDL HEADER in each -# file and include the License file CDDL.Schily.txt from this distribution. -########################################################################### -include $(SRCROOT)/$(RULESDIR)/rules.prg -########################################################################### -include $(SRCROOT)/$(RULESDIR)/cc-gcc.rul - -OSDEFS += - -KDEFINES= -DKERNEL -D_KERNEL - -LIB_PREFIX= lib -LIB_SUFFIX= .a -SHL_SUFFIX= .sl - -LIB_SOCKET= -LIB_MATH= -lm -LIB_KVM= - -#LDOPTS= $(LIBS_PATH) $(LDPATH) $(RUNPATH:-R%=-Wl,-R%) -LDOPTS= $(LIBS_PATH) $(LDPATH) -LNDYNLIB= @ - -LORDER= echo -TSORT= cat diff -Nru cdrtools-2.01.01a33/RULES/9000-820-hp-ux-cc.rul cdrtools-3.02a09/RULES/9000-820-hp-ux-cc.rul --- cdrtools-2.01.01a33/RULES/9000-820-hp-ux-cc.rul 2007-05-08 11:03:07.000000000 +0000 +++ cdrtools-3.02a09/RULES/9000-820-hp-ux-cc.rul 1970-01-01 00:00:00.000000000 +0000 @@ -1,34 +0,0 @@ -#ident "@(#)9000-725-hp-ux-cc.rul 1.13 07/05/08 " -########################################################################### -# Written 1996 by J. Schilling -########################################################################### -# -# Platform dependent MACROS for HP/UX -# -########################################################################### -# Copyright (c) J. Schilling -########################################################################### -# The contents of this file are subject to the terms of the -# Common Development and Distribution License, Version 1.0 only -# (the "License"). You may not use this file except in compliance -# with the License. -# -# See the file CDDL.Schily.txt in this distribution for details. -# -# When distributing Covered Code, include this CDDL HEADER in each -# file and include the License file CDDL.Schily.txt from this distribution. -########################################################################### -include $(SRCROOT)/$(RULESDIR)/rules.prg -########################################################################### -include $(SRCROOT)/$(RULESDIR)/cc-hp.rul - -OSDEFS += - -KDEFINES= -DKERNEL -D_KERNEL - -LIB_SOCKET= -LIB_MATH= -lm -LIB_KVM= - -LORDER= echo -TSORT= cat diff -Nru cdrtools-2.01.01a33/RULES/9000-820-hp-ux-gcc.rul cdrtools-3.02a09/RULES/9000-820-hp-ux-gcc.rul --- cdrtools-2.01.01a33/RULES/9000-820-hp-ux-gcc.rul 2007-05-09 12:25:30.000000000 +0000 +++ cdrtools-3.02a09/RULES/9000-820-hp-ux-gcc.rul 1970-01-01 00:00:00.000000000 +0000 @@ -1,42 +0,0 @@ -#ident "@(#)9000-725-hp-ux-gcc.rul 1.10 07/05/09 " -########################################################################### -# Written 1996 by J. Schilling -########################################################################### -# -# Platform dependent MACROS for HP/UX -# -########################################################################### -# Copyright (c) J. Schilling -########################################################################### -# The contents of this file are subject to the terms of the -# Common Development and Distribution License, Version 1.0 only -# (the "License"). You may not use this file except in compliance -# with the License. -# -# See the file CDDL.Schily.txt in this distribution for details. -# -# When distributing Covered Code, include this CDDL HEADER in each -# file and include the License file CDDL.Schily.txt from this distribution. -########################################################################### -include $(SRCROOT)/$(RULESDIR)/rules.prg -########################################################################### -include $(SRCROOT)/$(RULESDIR)/cc-gcc.rul - -OSDEFS += - -KDEFINES= -DKERNEL -D_KERNEL - -LIB_PREFIX= lib -LIB_SUFFIX= .a -SHL_SUFFIX= .sl - -LIB_SOCKET= -LIB_MATH= -lm -LIB_KVM= - -#LDOPTS= $(LIBS_PATH) $(LDPATH) $(RUNPATH:-R%=-Wl,-R%) -LDOPTS= $(LIBS_PATH) $(LDPATH) -LNDYNLIB= @ - -LORDER= echo -TSORT= cat diff -Nru cdrtools-2.01.01a33/RULES/9000-831-hp-ux-cc.rul cdrtools-3.02a09/RULES/9000-831-hp-ux-cc.rul --- cdrtools-2.01.01a33/RULES/9000-831-hp-ux-cc.rul 2007-05-08 11:03:07.000000000 +0000 +++ cdrtools-3.02a09/RULES/9000-831-hp-ux-cc.rul 1970-01-01 00:00:00.000000000 +0000 @@ -1,34 +0,0 @@ -#ident "@(#)9000-725-hp-ux-cc.rul 1.13 07/05/08 " -########################################################################### -# Written 1996 by J. Schilling -########################################################################### -# -# Platform dependent MACROS for HP/UX -# -########################################################################### -# Copyright (c) J. Schilling -########################################################################### -# The contents of this file are subject to the terms of the -# Common Development and Distribution License, Version 1.0 only -# (the "License"). You may not use this file except in compliance -# with the License. -# -# See the file CDDL.Schily.txt in this distribution for details. -# -# When distributing Covered Code, include this CDDL HEADER in each -# file and include the License file CDDL.Schily.txt from this distribution. -########################################################################### -include $(SRCROOT)/$(RULESDIR)/rules.prg -########################################################################### -include $(SRCROOT)/$(RULESDIR)/cc-hp.rul - -OSDEFS += - -KDEFINES= -DKERNEL -D_KERNEL - -LIB_SOCKET= -LIB_MATH= -lm -LIB_KVM= - -LORDER= echo -TSORT= cat diff -Nru cdrtools-2.01.01a33/RULES/9000-831-hp-ux-gcc.rul cdrtools-3.02a09/RULES/9000-831-hp-ux-gcc.rul --- cdrtools-2.01.01a33/RULES/9000-831-hp-ux-gcc.rul 2007-05-09 12:25:30.000000000 +0000 +++ cdrtools-3.02a09/RULES/9000-831-hp-ux-gcc.rul 1970-01-01 00:00:00.000000000 +0000 @@ -1,42 +0,0 @@ -#ident "@(#)9000-725-hp-ux-gcc.rul 1.10 07/05/09 " -########################################################################### -# Written 1996 by J. Schilling -########################################################################### -# -# Platform dependent MACROS for HP/UX -# -########################################################################### -# Copyright (c) J. Schilling -########################################################################### -# The contents of this file are subject to the terms of the -# Common Development and Distribution License, Version 1.0 only -# (the "License"). You may not use this file except in compliance -# with the License. -# -# See the file CDDL.Schily.txt in this distribution for details. -# -# When distributing Covered Code, include this CDDL HEADER in each -# file and include the License file CDDL.Schily.txt from this distribution. -########################################################################### -include $(SRCROOT)/$(RULESDIR)/rules.prg -########################################################################### -include $(SRCROOT)/$(RULESDIR)/cc-gcc.rul - -OSDEFS += - -KDEFINES= -DKERNEL -D_KERNEL - -LIB_PREFIX= lib -LIB_SUFFIX= .a -SHL_SUFFIX= .sl - -LIB_SOCKET= -LIB_MATH= -lm -LIB_KVM= - -#LDOPTS= $(LIBS_PATH) $(LDPATH) $(RUNPATH:-R%=-Wl,-R%) -LDOPTS= $(LIBS_PATH) $(LDPATH) -LNDYNLIB= @ - -LORDER= echo -TSORT= cat diff -Nru cdrtools-2.01.01a33/RULES/9000-899-hp-ux-cc.rul cdrtools-3.02a09/RULES/9000-899-hp-ux-cc.rul --- cdrtools-2.01.01a33/RULES/9000-899-hp-ux-cc.rul 2007-05-08 11:03:07.000000000 +0000 +++ cdrtools-3.02a09/RULES/9000-899-hp-ux-cc.rul 1970-01-01 00:00:00.000000000 +0000 @@ -1,34 +0,0 @@ -#ident "@(#)9000-725-hp-ux-cc.rul 1.13 07/05/08 " -########################################################################### -# Written 1996 by J. Schilling -########################################################################### -# -# Platform dependent MACROS for HP/UX -# -########################################################################### -# Copyright (c) J. Schilling -########################################################################### -# The contents of this file are subject to the terms of the -# Common Development and Distribution License, Version 1.0 only -# (the "License"). You may not use this file except in compliance -# with the License. -# -# See the file CDDL.Schily.txt in this distribution for details. -# -# When distributing Covered Code, include this CDDL HEADER in each -# file and include the License file CDDL.Schily.txt from this distribution. -########################################################################### -include $(SRCROOT)/$(RULESDIR)/rules.prg -########################################################################### -include $(SRCROOT)/$(RULESDIR)/cc-hp.rul - -OSDEFS += - -KDEFINES= -DKERNEL -D_KERNEL - -LIB_SOCKET= -LIB_MATH= -lm -LIB_KVM= - -LORDER= echo -TSORT= cat diff -Nru cdrtools-2.01.01a33/RULES/9000-899-hp-ux-gcc.rul cdrtools-3.02a09/RULES/9000-899-hp-ux-gcc.rul --- cdrtools-2.01.01a33/RULES/9000-899-hp-ux-gcc.rul 2007-05-09 12:25:30.000000000 +0000 +++ cdrtools-3.02a09/RULES/9000-899-hp-ux-gcc.rul 1970-01-01 00:00:00.000000000 +0000 @@ -1,42 +0,0 @@ -#ident "@(#)9000-725-hp-ux-gcc.rul 1.10 07/05/09 " -########################################################################### -# Written 1996 by J. Schilling -########################################################################### -# -# Platform dependent MACROS for HP/UX -# -########################################################################### -# Copyright (c) J. Schilling -########################################################################### -# The contents of this file are subject to the terms of the -# Common Development and Distribution License, Version 1.0 only -# (the "License"). You may not use this file except in compliance -# with the License. -# -# See the file CDDL.Schily.txt in this distribution for details. -# -# When distributing Covered Code, include this CDDL HEADER in each -# file and include the License file CDDL.Schily.txt from this distribution. -########################################################################### -include $(SRCROOT)/$(RULESDIR)/rules.prg -########################################################################### -include $(SRCROOT)/$(RULESDIR)/cc-gcc.rul - -OSDEFS += - -KDEFINES= -DKERNEL -D_KERNEL - -LIB_PREFIX= lib -LIB_SUFFIX= .a -SHL_SUFFIX= .sl - -LIB_SOCKET= -LIB_MATH= -lm -LIB_KVM= - -#LDOPTS= $(LIBS_PATH) $(LDPATH) $(RUNPATH:-R%=-Wl,-R%) -LDOPTS= $(LIBS_PATH) $(LDPATH) -LNDYNLIB= @ - -LORDER= echo -TSORT= cat diff -Nru cdrtools-2.01.01a33/RULES/alpha-linux-cc.rul cdrtools-3.02a09/RULES/alpha-linux-cc.rul --- cdrtools-2.01.01a33/RULES/alpha-linux-cc.rul 2007-05-09 12:25:30.000000000 +0000 +++ cdrtools-3.02a09/RULES/alpha-linux-cc.rul 1970-01-01 00:00:00.000000000 +0000 @@ -1,45 +0,0 @@ -#ident "@(#)i586-linux-cc.rul 1.11 07/05/09 " -########################################################################### -# Written 1996 by J. Schilling -########################################################################### -# -# Platform dependent MACROS for Linux -# -########################################################################### -# Copyright (c) J. Schilling -########################################################################### -# The contents of this file are subject to the terms of the -# Common Development and Distribution License, Version 1.0 only -# (the "License"). You may not use this file except in compliance -# with the License. -# -# See the file CDDL.Schily.txt in this distribution for details. -# -# When distributing Covered Code, include this CDDL HEADER in each -# file and include the License file CDDL.Schily.txt from this distribution. -########################################################################### -include $(SRCROOT)/$(RULESDIR)/rules.prg -########################################################################### -include $(SRCROOT)/$(RULESDIR)/cc-gcc.rul - -# -# LINUX_SRC_INCLUDE is defined in DEFAULTS/Defaults.linux -# -INCDIRSX += $(LINUX_SRC_INCLUDE) -OSDEFS += - -KDEFINES= -DKERNEL -D_KERNEL - -LIB_PREFIX= lib -LIB_SUFFIX= .a -SHL_SUFFIX= .so.1.0 - -LIB_SOCKET= -LIB_MATH= -lm -LIB_KVM= - -#LDOPTS= $(LIBS_PATH) $(LDPATH) $(RUNPATH:-R%=-Wl,-R%) -LDOPTS= $(LIBS_PATH) $(LDPATH) - -LORDER= echo -TSORT= cat diff -Nru cdrtools-2.01.01a33/RULES/alpha-linux-gcc.rul cdrtools-3.02a09/RULES/alpha-linux-gcc.rul --- cdrtools-2.01.01a33/RULES/alpha-linux-gcc.rul 2007-05-09 12:25:30.000000000 +0000 +++ cdrtools-3.02a09/RULES/alpha-linux-gcc.rul 1970-01-01 00:00:00.000000000 +0000 @@ -1,45 +0,0 @@ -#ident "@(#)i586-linux-gcc.rul 1.11 07/05/09 " -########################################################################### -# Written 1996 by J. Schilling -########################################################################### -# -# Platform dependent MACROS for Linux -# -########################################################################### -# Copyright (c) J. Schilling -########################################################################### -# The contents of this file are subject to the terms of the -# Common Development and Distribution License, Version 1.0 only -# (the "License"). You may not use this file except in compliance -# with the License. -# -# See the file CDDL.Schily.txt in this distribution for details. -# -# When distributing Covered Code, include this CDDL HEADER in each -# file and include the License file CDDL.Schily.txt from this distribution. -########################################################################### -include $(SRCROOT)/$(RULESDIR)/rules.prg -########################################################################### -include $(SRCROOT)/$(RULESDIR)/cc-gcc.rul - -# -# LINUX_SRC_INCLUDE is defined in DEFAULTS/Defaults.linux -# -INCDIRSX += $(LINUX_SRC_INCLUDE) -OSDEFS += - -KDEFINES= -DKERNEL -D_KERNEL - -LIB_PREFIX= lib -LIB_SUFFIX= .a -SHL_SUFFIX= .so.1.0 - -LIB_SOCKET= -LIB_MATH= -lm -LIB_KVM= - -#LDOPTS= $(LIBS_PATH) $(LDPATH) $(RUNPATH:-R%=-Wl,-R%) -LDOPTS= $(LIBS_PATH) $(LDPATH) - -LORDER= echo -TSORT= cat diff -Nru cdrtools-2.01.01a33/RULES/alpha-netbsd-cc.rul cdrtools-3.02a09/RULES/alpha-netbsd-cc.rul --- cdrtools-2.01.01a33/RULES/alpha-netbsd-cc.rul 2007-05-09 12:25:30.000000000 +0000 +++ cdrtools-3.02a09/RULES/alpha-netbsd-cc.rul 1970-01-01 00:00:00.000000000 +0000 @@ -1,41 +0,0 @@ -#ident "@(#)i386-netbsd-cc.rul 1.11 07/05/09 " -########################################################################### -# Written 1997 by J. Schilling -########################################################################### -# -# Platform dependent MACROS for NetBSD -# -########################################################################### -# Copyright (c) J. Schilling -########################################################################### -# The contents of this file are subject to the terms of the -# Common Development and Distribution License, Version 1.0 only -# (the "License"). You may not use this file except in compliance -# with the License. -# -# See the file CDDL.Schily.txt in this distribution for details. -# -# When distributing Covered Code, include this CDDL HEADER in each -# file and include the License file CDDL.Schily.txt from this distribution. -########################################################################### -include $(SRCROOT)/$(RULESDIR)/rules.prg -########################################################################### -include $(SRCROOT)/$(RULESDIR)/cc-gcc.rul - -OSDEFS += -#OSDEFS += -DIS_UNIX - -KDEFINES= -DKERNEL -D_KERNEL - -LIB_PREFIX= lib -LIB_SUFFIX= .a -SHL_SUFFIX= .so.1.0 - -LIB_SOCKET= -LIB_MATH= -lm -LIB_KVM= - -#LDOPTS= $(LIBS_PATH) $(LDPATH) $(RUNPATH:-R%=-Wl,-R%) -LDOPTS= $(LIBS_PATH) $(LDPATH) - -RANLIB= @echo " ==> RANDOMIZING ARCHIVE \"$@\""; ranlib diff -Nru cdrtools-2.01.01a33/RULES/alpha-netbsd-gcc.rul cdrtools-3.02a09/RULES/alpha-netbsd-gcc.rul --- cdrtools-2.01.01a33/RULES/alpha-netbsd-gcc.rul 2007-05-09 12:25:30.000000000 +0000 +++ cdrtools-3.02a09/RULES/alpha-netbsd-gcc.rul 1970-01-01 00:00:00.000000000 +0000 @@ -1,41 +0,0 @@ -#ident "@(#)i386-netbsd-gcc.rul 1.11 07/05/09 " -########################################################################### -# Written 1997 by J. Schilling -########################################################################### -# -# Platform dependent MACROS for NetBSD -# -########################################################################### -# Copyright (c) J. Schilling -########################################################################### -# The contents of this file are subject to the terms of the -# Common Development and Distribution License, Version 1.0 only -# (the "License"). You may not use this file except in compliance -# with the License. -# -# See the file CDDL.Schily.txt in this distribution for details. -# -# When distributing Covered Code, include this CDDL HEADER in each -# file and include the License file CDDL.Schily.txt from this distribution. -########################################################################### -include $(SRCROOT)/$(RULESDIR)/rules.prg -########################################################################### -include $(SRCROOT)/$(RULESDIR)/cc-gcc.rul - -OSDEFS += -#OSDEFS += -DIS_UNIX - -KDEFINES= -DKERNEL -D_KERNEL - -LIB_PREFIX= lib -LIB_SUFFIX= .a -SHL_SUFFIX= .so.1.0 - -LIB_SOCKET= -LIB_MATH= -lm -LIB_KVM= - -#LDOPTS= $(LIBS_PATH) $(LDPATH) $(RUNPATH:-R%=-Wl,-R%) -LDOPTS= $(LIBS_PATH) $(LDPATH) - -RANLIB= @echo " ==> RANDOMIZING ARCHIVE \"$@\""; ranlib diff -Nru cdrtools-2.01.01a33/RULES/alpha-openvms-cc.rul cdrtools-3.02a09/RULES/alpha-openvms-cc.rul --- cdrtools-2.01.01a33/RULES/alpha-openvms-cc.rul 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/RULES/alpha-openvms-cc.rul 2009-10-31 20:44:29.000000000 +0000 @@ -0,0 +1,36 @@ +#ident "@(#)alpha-openvms-cc.rul 1.1 09/10/31 " +########################################################################### +# Written 2009 by J. Schilling +########################################################################### +# +# Platform dependent MACROS for OpenVMS using GNV +# +########################################################################### +# Copyright (c) J. Schilling +########################################################################### +# The contents of this file are subject to the terms of the +# Common Development and Distribution License, Version 1.0 only +# (the "License"). You may not use this file except in compliance +# with the License. +# +# See the file CDDL.Schily.txt in this distribution for details. +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file CDDL.Schily.txt from this distribution. +########################################################################### +include $(SRCROOT)/$(RULESDIR)/rules.prg +########################################################################### +include $(SRCROOT)/$(RULESDIR)/cc-openvms.rul + +OSDEFS += + +KDEFINES= -DKERNEL -D_KERNEL + +#LIB_SOCKET= -lsocket -lnsl -ldl +LIB_SOCKET= +LIB_MATH= -lm +#LIB_KVM= -lkvm +LIB_KVM= + +LORDER= echo +TSORT= cat diff -Nru cdrtools-2.01.01a33/RULES/amd64-bitrig-clang.rul cdrtools-3.02a09/RULES/amd64-bitrig-clang.rul --- cdrtools-2.01.01a33/RULES/amd64-bitrig-clang.rul 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/RULES/amd64-bitrig-clang.rul 2015-11-18 20:43:02.000000000 +0000 @@ -0,0 +1,41 @@ +#ident "@(#)amd64-bitrig-clang.rul 1.2 15/11/18 " +########################################################################### +# Written 2015 by J. Schilling +########################################################################### +# +# Platform dependent MACROS for Bitrig using Clang +# +########################################################################### +# Copyright (c) J. Schilling +########################################################################### +# The contents of this file are subject to the terms of the +# Common Development and Distribution License, Version 1.0 only +# (the "License"). You may not use this file except in compliance +# with the License. +# +# See the file CDDL.Schily.txt in this distribution for details. +# A copy of the CDDL is also available via the Internet at +# http://www.opensource.org/licenses/cddl1.txt +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file CDDL.Schily.txt from this distribution. +########################################################################### +include $(SRCROOT)/$(RULESDIR)/rules.prg +########################################################################### +include $(SRCROOT)/$(RULESDIR)/cc-$(C_ARCH).rul + +OSDEFS += + +KDEFINES= -DKERNEL -D_KERNEL + +LIB_PREFIX= lib +LIB_SUFFIX= .a +SHL_SUFFIX= .so.1.0 + +LIB_SOCKET= +LIB_MATH= -lm +LIB_KVM= + +LDOPTS= $(LIBS_PATH) $(LDPATH) + +RANLIB= @echo " ==> RANDOMIZING ARCHIVE \"$@\""; ranlib diff -Nru cdrtools-2.01.01a33/RULES/amiga-netbsd-cc.rul cdrtools-3.02a09/RULES/amiga-netbsd-cc.rul --- cdrtools-2.01.01a33/RULES/amiga-netbsd-cc.rul 2007-05-09 12:25:30.000000000 +0000 +++ cdrtools-3.02a09/RULES/amiga-netbsd-cc.rul 1970-01-01 00:00:00.000000000 +0000 @@ -1,41 +0,0 @@ -#ident "@(#)i386-netbsd-cc.rul 1.11 07/05/09 " -########################################################################### -# Written 1997 by J. Schilling -########################################################################### -# -# Platform dependent MACROS for NetBSD -# -########################################################################### -# Copyright (c) J. Schilling -########################################################################### -# The contents of this file are subject to the terms of the -# Common Development and Distribution License, Version 1.0 only -# (the "License"). You may not use this file except in compliance -# with the License. -# -# See the file CDDL.Schily.txt in this distribution for details. -# -# When distributing Covered Code, include this CDDL HEADER in each -# file and include the License file CDDL.Schily.txt from this distribution. -########################################################################### -include $(SRCROOT)/$(RULESDIR)/rules.prg -########################################################################### -include $(SRCROOT)/$(RULESDIR)/cc-gcc.rul - -OSDEFS += -#OSDEFS += -DIS_UNIX - -KDEFINES= -DKERNEL -D_KERNEL - -LIB_PREFIX= lib -LIB_SUFFIX= .a -SHL_SUFFIX= .so.1.0 - -LIB_SOCKET= -LIB_MATH= -lm -LIB_KVM= - -#LDOPTS= $(LIBS_PATH) $(LDPATH) $(RUNPATH:-R%=-Wl,-R%) -LDOPTS= $(LIBS_PATH) $(LDPATH) - -RANLIB= @echo " ==> RANDOMIZING ARCHIVE \"$@\""; ranlib diff -Nru cdrtools-2.01.01a33/RULES/amiga-netbsd-gcc.rul cdrtools-3.02a09/RULES/amiga-netbsd-gcc.rul --- cdrtools-2.01.01a33/RULES/amiga-netbsd-gcc.rul 2007-05-09 12:25:30.000000000 +0000 +++ cdrtools-3.02a09/RULES/amiga-netbsd-gcc.rul 1970-01-01 00:00:00.000000000 +0000 @@ -1,41 +0,0 @@ -#ident "@(#)i386-netbsd-gcc.rul 1.11 07/05/09 " -########################################################################### -# Written 1997 by J. Schilling -########################################################################### -# -# Platform dependent MACROS for NetBSD -# -########################################################################### -# Copyright (c) J. Schilling -########################################################################### -# The contents of this file are subject to the terms of the -# Common Development and Distribution License, Version 1.0 only -# (the "License"). You may not use this file except in compliance -# with the License. -# -# See the file CDDL.Schily.txt in this distribution for details. -# -# When distributing Covered Code, include this CDDL HEADER in each -# file and include the License file CDDL.Schily.txt from this distribution. -########################################################################### -include $(SRCROOT)/$(RULESDIR)/rules.prg -########################################################################### -include $(SRCROOT)/$(RULESDIR)/cc-gcc.rul - -OSDEFS += -#OSDEFS += -DIS_UNIX - -KDEFINES= -DKERNEL -D_KERNEL - -LIB_PREFIX= lib -LIB_SUFFIX= .a -SHL_SUFFIX= .so.1.0 - -LIB_SOCKET= -LIB_MATH= -lm -LIB_KVM= - -#LDOPTS= $(LIBS_PATH) $(LDPATH) $(RUNPATH:-R%=-Wl,-R%) -LDOPTS= $(LIBS_PATH) $(LDPATH) - -RANLIB= @echo " ==> RANDOMIZING ARCHIVE \"$@\""; ranlib diff -Nru cdrtools-2.01.01a33/RULES/armv4l-linux-cc.rul cdrtools-3.02a09/RULES/armv4l-linux-cc.rul --- cdrtools-2.01.01a33/RULES/armv4l-linux-cc.rul 2007-05-09 12:25:30.000000000 +0000 +++ cdrtools-3.02a09/RULES/armv4l-linux-cc.rul 1970-01-01 00:00:00.000000000 +0000 @@ -1,45 +0,0 @@ -#ident "@(#)i586-linux-cc.rul 1.11 07/05/09 " -########################################################################### -# Written 1996 by J. Schilling -########################################################################### -# -# Platform dependent MACROS for Linux -# -########################################################################### -# Copyright (c) J. Schilling -########################################################################### -# The contents of this file are subject to the terms of the -# Common Development and Distribution License, Version 1.0 only -# (the "License"). You may not use this file except in compliance -# with the License. -# -# See the file CDDL.Schily.txt in this distribution for details. -# -# When distributing Covered Code, include this CDDL HEADER in each -# file and include the License file CDDL.Schily.txt from this distribution. -########################################################################### -include $(SRCROOT)/$(RULESDIR)/rules.prg -########################################################################### -include $(SRCROOT)/$(RULESDIR)/cc-gcc.rul - -# -# LINUX_SRC_INCLUDE is defined in DEFAULTS/Defaults.linux -# -INCDIRSX += $(LINUX_SRC_INCLUDE) -OSDEFS += - -KDEFINES= -DKERNEL -D_KERNEL - -LIB_PREFIX= lib -LIB_SUFFIX= .a -SHL_SUFFIX= .so.1.0 - -LIB_SOCKET= -LIB_MATH= -lm -LIB_KVM= - -#LDOPTS= $(LIBS_PATH) $(LDPATH) $(RUNPATH:-R%=-Wl,-R%) -LDOPTS= $(LIBS_PATH) $(LDPATH) - -LORDER= echo -TSORT= cat diff -Nru cdrtools-2.01.01a33/RULES/armv4l-linux-gcc.rul cdrtools-3.02a09/RULES/armv4l-linux-gcc.rul --- cdrtools-2.01.01a33/RULES/armv4l-linux-gcc.rul 2007-05-09 12:25:30.000000000 +0000 +++ cdrtools-3.02a09/RULES/armv4l-linux-gcc.rul 1970-01-01 00:00:00.000000000 +0000 @@ -1,45 +0,0 @@ -#ident "@(#)i586-linux-gcc.rul 1.11 07/05/09 " -########################################################################### -# Written 1996 by J. Schilling -########################################################################### -# -# Platform dependent MACROS for Linux -# -########################################################################### -# Copyright (c) J. Schilling -########################################################################### -# The contents of this file are subject to the terms of the -# Common Development and Distribution License, Version 1.0 only -# (the "License"). You may not use this file except in compliance -# with the License. -# -# See the file CDDL.Schily.txt in this distribution for details. -# -# When distributing Covered Code, include this CDDL HEADER in each -# file and include the License file CDDL.Schily.txt from this distribution. -########################################################################### -include $(SRCROOT)/$(RULESDIR)/rules.prg -########################################################################### -include $(SRCROOT)/$(RULESDIR)/cc-gcc.rul - -# -# LINUX_SRC_INCLUDE is defined in DEFAULTS/Defaults.linux -# -INCDIRSX += $(LINUX_SRC_INCLUDE) -OSDEFS += - -KDEFINES= -DKERNEL -D_KERNEL - -LIB_PREFIX= lib -LIB_SUFFIX= .a -SHL_SUFFIX= .so.1.0 - -LIB_SOCKET= -LIB_MATH= -lm -LIB_KVM= - -#LDOPTS= $(LIBS_PATH) $(LDPATH) $(RUNPATH:-R%=-Wl,-R%) -LDOPTS= $(LIBS_PATH) $(LDPATH) - -LORDER= echo -TSORT= cat diff -Nru cdrtools-2.01.01a33/RULES/armv5teb-linux-cc.rul cdrtools-3.02a09/RULES/armv5teb-linux-cc.rul --- cdrtools-2.01.01a33/RULES/armv5teb-linux-cc.rul 2007-05-09 12:25:30.000000000 +0000 +++ cdrtools-3.02a09/RULES/armv5teb-linux-cc.rul 1970-01-01 00:00:00.000000000 +0000 @@ -1,45 +0,0 @@ -#ident "@(#)i586-linux-cc.rul 1.11 07/05/09 " -########################################################################### -# Written 1996 by J. Schilling -########################################################################### -# -# Platform dependent MACROS for Linux -# -########################################################################### -# Copyright (c) J. Schilling -########################################################################### -# The contents of this file are subject to the terms of the -# Common Development and Distribution License, Version 1.0 only -# (the "License"). You may not use this file except in compliance -# with the License. -# -# See the file CDDL.Schily.txt in this distribution for details. -# -# When distributing Covered Code, include this CDDL HEADER in each -# file and include the License file CDDL.Schily.txt from this distribution. -########################################################################### -include $(SRCROOT)/$(RULESDIR)/rules.prg -########################################################################### -include $(SRCROOT)/$(RULESDIR)/cc-gcc.rul - -# -# LINUX_SRC_INCLUDE is defined in DEFAULTS/Defaults.linux -# -INCDIRSX += $(LINUX_SRC_INCLUDE) -OSDEFS += - -KDEFINES= -DKERNEL -D_KERNEL - -LIB_PREFIX= lib -LIB_SUFFIX= .a -SHL_SUFFIX= .so.1.0 - -LIB_SOCKET= -LIB_MATH= -lm -LIB_KVM= - -#LDOPTS= $(LIBS_PATH) $(LDPATH) $(RUNPATH:-R%=-Wl,-R%) -LDOPTS= $(LIBS_PATH) $(LDPATH) - -LORDER= echo -TSORT= cat diff -Nru cdrtools-2.01.01a33/RULES/armv5teb-linux-gcc.rul cdrtools-3.02a09/RULES/armv5teb-linux-gcc.rul --- cdrtools-2.01.01a33/RULES/armv5teb-linux-gcc.rul 2007-05-09 12:25:30.000000000 +0000 +++ cdrtools-3.02a09/RULES/armv5teb-linux-gcc.rul 1970-01-01 00:00:00.000000000 +0000 @@ -1,45 +0,0 @@ -#ident "@(#)i586-linux-gcc.rul 1.11 07/05/09 " -########################################################################### -# Written 1996 by J. Schilling -########################################################################### -# -# Platform dependent MACROS for Linux -# -########################################################################### -# Copyright (c) J. Schilling -########################################################################### -# The contents of this file are subject to the terms of the -# Common Development and Distribution License, Version 1.0 only -# (the "License"). You may not use this file except in compliance -# with the License. -# -# See the file CDDL.Schily.txt in this distribution for details. -# -# When distributing Covered Code, include this CDDL HEADER in each -# file and include the License file CDDL.Schily.txt from this distribution. -########################################################################### -include $(SRCROOT)/$(RULESDIR)/rules.prg -########################################################################### -include $(SRCROOT)/$(RULESDIR)/cc-gcc.rul - -# -# LINUX_SRC_INCLUDE is defined in DEFAULTS/Defaults.linux -# -INCDIRSX += $(LINUX_SRC_INCLUDE) -OSDEFS += - -KDEFINES= -DKERNEL -D_KERNEL - -LIB_PREFIX= lib -LIB_SUFFIX= .a -SHL_SUFFIX= .so.1.0 - -LIB_SOCKET= -LIB_MATH= -lm -LIB_KVM= - -#LDOPTS= $(LIBS_PATH) $(LDPATH) $(RUNPATH:-R%=-Wl,-R%) -LDOPTS= $(LIBS_PATH) $(LDPATH) - -LORDER= echo -TSORT= cat diff -Nru cdrtools-2.01.01a33/RULES/atarist-freemint-gcc.rul cdrtools-3.02a09/RULES/atarist-freemint-gcc.rul --- cdrtools-2.01.01a33/RULES/atarist-freemint-gcc.rul 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/RULES/atarist-freemint-gcc.rul 2008-11-14 21:49:56.000000000 +0000 @@ -0,0 +1,59 @@ +#ident @(#)atarist-freemint-gcc.rul 1.4 08/11/14 +########################################################################### +# Written 2008 by Y. Doyeux +########################################################################### +# +# Platform dependent MACROS for FreeMiNT on ATARI computers +# +########################################################################### +# Copyright (c) J. Schilling +########################################################################### +# The contents of this file are subject to the terms of the +# Common Development and Distribution License, Version 1.0 only +# (the "License"). You may not use this file except in compliance +# with the License. +# +# See the file CDDL.Schily.txt in this distribution for details. +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file CDDL.Schily.txt from this distribution. +########################################################################### +include $(SRCROOT)/$(RULESDIR)/rules.prg +########################################################################### +include $(SRCROOT)/$(RULESDIR)/cc-gcc.rul + +OSDEFS += -DNO_USER_XCVT + +KDEFINES= -DKERNEL -D_KERNEL + +#COPTDYN= -fpic +COPTDYN= + +LIB_PREFIX= lib +LIB_SUFFIX= .a +#SHL_SUFFIX= .so.1.0 +SHL_SUFFIX= + +LIB_SOCKET= -lsocket +LIB_MATH= -lm +LIB_KVM= + +_STACKSIZE= $(_UNIQ)$(STACKSIZE) +__STACKSIZE= $(_STACKSIZE:$(_UNIQ)=0x10000) # Default stack size 64kB +STACK_SIZE= $(__STACKSIZE:$(_UNIQ)%=%) + +LDLIBS= $(LIBS) $(LIBX) && stack -S $(STACK_SIZE) $@ # Hack to set stack size + +#LDOPTS= $(LIBS_PATH) $(LDPATH) $(RUNPATH:-R%=-Wl,-R%) +LDOPTS= $(LIBS_PATH) $(LDPATH) +#LDOPTDYN= -shared -Wl,-soname,$(TARGET) +#LNDYNLIB= @$(RM) $(RM_FORCE) $(PTARGET_BASE).so; $(SYMLINK) $(TARGET) $(PTARGET_BASE).so +LDOPTDYN= +LNDYNLIB= + +# +# ranlib does not work and is not needed +# +#RANLIB= @echo " ==> RANDOMIZING ARCHIVE \"$@\""; ranlib + +LORDER= echo diff -Nru cdrtools-2.01.01a33/RULES/bemac-beos-cc.rul cdrtools-3.02a09/RULES/bemac-beos-cc.rul --- cdrtools-2.01.01a33/RULES/bemac-beos-cc.rul 2007-05-08 11:07:57.000000000 +0000 +++ cdrtools-3.02a09/RULES/bemac-beos-cc.rul 2013-11-04 20:24:57.000000000 +0000 @@ -1,4 +1,4 @@ -#ident @(#)bemac-beos-cc.rul 1.9 07/05/08 +#ident @(#)bemac-beos-cc.rul 1.10 13/11/04 ########################################################################### # Written 1996 by J. Schilling ########################################################################### @@ -14,6 +14,8 @@ # with the License. # # See the file CDDL.Schily.txt in this distribution for details. +# A copy of the CDDL is also available via the Internet at +# http://www.opensource.org/licenses/cddl1.txt # # When distributing Covered Code, include this CDDL HEADER in each # file and include the License file CDDL.Schily.txt from this distribution. @@ -24,7 +26,7 @@ OSDEFS += -CPPOPTS= -O4 -g -i- -I$(ARCHDIR) -I$(OINCSDIR) $(INCDIRS:%=-I%) $(INCDIRSX:%=-I%) $(OSDEFS) +CPPOPTS= -O4 -g -i- -I$(ARCHDIR) -I$(OINCSDIR) $(INCDIRS:%=-I%) $(INCDIRSX:%=-I%) KDEFINES= -DKERNEL -D_KERNEL diff -Nru cdrtools-2.01.01a33/RULES/bemac-beos-mwcc.rul cdrtools-3.02a09/RULES/bemac-beos-mwcc.rul --- cdrtools-2.01.01a33/RULES/bemac-beos-mwcc.rul 2007-05-08 11:07:57.000000000 +0000 +++ cdrtools-3.02a09/RULES/bemac-beos-mwcc.rul 2013-11-04 20:24:57.000000000 +0000 @@ -1,4 +1,4 @@ -#ident @(#)bemac-beos-mwcc.rul 1.9 07/05/08 +#ident @(#)bemac-beos-mwcc.rul 1.10 13/11/04 ########################################################################### # Written 1996 by J. Schilling ########################################################################### @@ -14,6 +14,8 @@ # with the License. # # See the file CDDL.Schily.txt in this distribution for details. +# A copy of the CDDL is also available via the Internet at +# http://www.opensource.org/licenses/cddl1.txt # # When distributing Covered Code, include this CDDL HEADER in each # file and include the License file CDDL.Schily.txt from this distribution. @@ -24,7 +26,7 @@ OSDEFS += -CPPOPTS= -relax_pointers -opt all -sym on -g -i- -I$(ARCHDIR) -I$(OINCSDIR) $(INCDIRS:%=-I%) $(INCDIRSX:%=-I%) $(OSDEFS) +CPPOPTS= -relax_pointers -opt all -sym on -g -i- -I$(ARCHDIR) -I$(OINCSDIR) $(INCDIRS:%=-I%) $(INCDIRSX:%=-I%) KDEFINES= -DKERNEL -D_KERNEL diff -Nru cdrtools-2.01.01a33/RULES/bepc-haiku-cc.rul cdrtools-3.02a09/RULES/bepc-haiku-cc.rul --- cdrtools-2.01.01a33/RULES/bepc-haiku-cc.rul 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/RULES/bepc-haiku-cc.rul 2017-05-28 21:54:36.000000000 +0000 @@ -0,0 +1,58 @@ +#ident "@(#)bepc-haiku-cc.rul 1.6 17/05/28 " +########################################################################### +# Written 1996-2017 by J. Schilling +########################################################################### +# +# Platform dependent MACROS for Haiku, a BeOS like OS +# +########################################################################### +# Copyright (c) J. Schilling +########################################################################### +# The contents of this file are subject to the terms of the +# Common Development and Distribution License, Version 1.0 only +# (the "License"). You may not use this file except in compliance +# with the License. +# +# See the file CDDL.Schily.txt in this distribution for details. +# A copy of the CDDL is also available via the Internet at +# http://www.opensource.org/licenses/cddl1.txt +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file CDDL.Schily.txt from this distribution. +########################################################################### +include $(SRCROOT)/$(RULESDIR)/rules.prg +########################################################################### +include $(SRCROOT)/$(RULESDIR)/cc-g$(C_ARCH).rul + +# +# XXX Old BeOS needs libroot.so to get [efg]cvt() +# XXX New BeOS seems to have this in libc and in addition we include +# XXX strtod.c for floating point conversion on OS without such code. +# XXX For this reason, -DNO_FLOATINGPOINT -DUSE_FLOATINGARGS has been +# XXX removed and printing floating numbers will work with old/new BeOS +# +#OSDEFS += -DNO_FLOATINGPOINT -DUSE_FLOATINGARGS +OSDEFS += + +KDEFINES= -DKERNEL -D_KERNEL + +#CONFFLAGS= i586 + +LIB_PREFIX= lib +LIB_SUFFIX= .a +SHL_SUFFIX= .so.1.0 + +LIB_C= + +#LIB_SOCKET= -lsocket -lbind +LIB_SOCKET= -lnetwork +LIB_MATH= +LIB_KVM= + +#LDOPTS= $(LIBS_PATH) $(LDPATH) $(RUNPATH:-R%=-Wl,-R%) +LDOPTS= $(LIBS_PATH) $(LDPATH) + +LORDER= echo +TSORT= cat + +LN= /bin/ln -s diff -Nru cdrtools-2.01.01a33/RULES/bepc-haiku-gcc.rul cdrtools-3.02a09/RULES/bepc-haiku-gcc.rul --- cdrtools-2.01.01a33/RULES/bepc-haiku-gcc.rul 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/RULES/bepc-haiku-gcc.rul 2017-05-29 11:54:23.000000000 +0000 @@ -0,0 +1,58 @@ +#ident "@(#)bepc-haiku-gcc.rul 1.6 17/05/29 " +########################################################################### +# Written 1996-2017 by J. Schilling +########################################################################### +# +# Platform dependent MACROS for Haiku, a BeOS like OS +# +########################################################################### +# Copyright (c) J. Schilling +########################################################################### +# The contents of this file are subject to the terms of the +# Common Development and Distribution License, Version 1.0 only +# (the "License"). You may not use this file except in compliance +# with the License. +# +# See the file CDDL.Schily.txt in this distribution for details. +# A copy of the CDDL is also available via the Internet at +# http://www.opensource.org/licenses/cddl1.txt +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file CDDL.Schily.txt from this distribution. +########################################################################### +include $(SRCROOT)/$(RULESDIR)/rules.prg +########################################################################### +include $(SRCROOT)/$(RULESDIR)/cc-$(C_ARCH).rul + +# +# XXX Old BeOS needs libroot.so to get [efg]cvt() +# XXX New BeOS seems to have this in libc and in addition we include +# XXX strtod.c for floating point conversion on OS without such code. +# XXX For this reason, -DNO_FLOATINGPOINT -DUSE_FLOATINGARGS has been +# XXX removed and printing floating numbers will work with old/new BeOS +# +#OSDEFS += -DNO_FLOATINGPOINT -DUSE_FLOATINGARGS +OSDEFS += + +KDEFINES= -DKERNEL -D_KERNEL + +#CONFFLAGS= i586 + +LIB_PREFIX= lib +LIB_SUFFIX= .a +SHL_SUFFIX= .so.1.0 + +LIB_C= + +#LIB_SOCKET= -lsocket -lbind +LIB_SOCKET= -lnetwork +LIB_MATH= +LIB_KVM= + +#LDOPTS= $(LIBS_PATH) $(LDPATH) $(RUNPATH:-R%=-Wl,-R%) +LDOPTS= $(LIBS_PATH) $(LDPATH) + +LORDER= echo +TSORT= cat + +LN= /bin/ln -s diff -Nru cdrtools-2.01.01a33/RULES/cc-apollo.rul cdrtools-3.02a09/RULES/cc-apollo.rul --- cdrtools-2.01.01a33/RULES/cc-apollo.rul 2007-05-08 10:32:23.000000000 +0000 +++ cdrtools-3.02a09/RULES/cc-apollo.rul 2017-05-28 21:47:50.000000000 +0000 @@ -1,6 +1,6 @@ -#ident "@(#)cc-apollo.rul 1.8 07/05/08 " +#ident "@(#)cc-apollo.rul 1.18 17/05/28 " ########################################################################### -# Written 2001-2006 by J. Schilling +# Written 2001-2017 by J. Schilling ########################################################################### # # Platform dependent MACROS for DomainOS (sys5.3, 10.4.1) cc @@ -14,16 +14,18 @@ # with the License. # # See the file CDDL.Schily.txt in this distribution for details. +# A copy of the CDDL is also available via the Internet at +# http://www.opensource.org/licenses/cddl1.txt # # When distributing Covered Code, include this CDDL HEADER in each # file and include the License file CDDL.Schily.txt from this distribution. ########################################################################### -CPPFLAGS= -DSCHILY_BUILD $(CPPOPTS) $(CPPOPTX) +CPPFLAGS= -DSCHILY_BUILD $(CPPOPTS) $(CPPOPTX) $(OSINCDIRS:%=-I%) $(OSDEFS) $(OSDEFSX) CFLAGS= $(COPTS) $(CWARNOPTS) $(COPTOPT) $(APOLLOCOPTOPT) $(COPTX) C++FLAGS= $(C++OPTS) $(C++WARNOPTS) $(C++OPTOPT) $(APOLLOC++OPTOPT) $(C++OPTX) -CPPOPTS= -I$(ARCHDIR) -I$(OINCSDIR) $(INCDIRS:%=-I%) $(INCDIRSX:%=-I%) $(OSDEFS) +CPPOPTS= -I$(ARCHDIR) -I$(OINCSDIR) $(INCDIRS:%=-I%) $(INCDIRSX:%=-I%) COPTS= CWOPTS= -W0,-info,4 COPTOPT= -O @@ -40,6 +42,8 @@ LIB_SUFFIX= .a SHL_SUFFIX= .so.1.0 +LIB_C= -lc + LIBS_PATH= -L$(OLIBSDIR) LIBS_PATH_STATIC= -L$(OLIBSDIR_STATIC) @@ -53,9 +57,26 @@ FLOAT_OPTIONS= +__CC_COM= $(_UNIQ)$(CC) +___CC_COM= $(__CC_COM:$(_UNIQ)=$(CC_COM_DEF)) +CC_COM= $(___CC_COM:$(_UNIQ)%=%) + +__CC++_COM= $(_UNIQ)$(CCC) +___CC++_COM= $(__CC++_COM:$(_UNIQ)=$(CC++_COM_DEF)) +CC++_COM= $(___CC++_COM:$(_UNIQ)%=%) + #CC_COM= cc -A systype,bsd4.3 -CC_COM= /bsd4.3/bin/cc -CC= @echo " ==> COMPILING \"$@\""; $(CC_COM) +CC_COM_DEF= /bsd4.3/bin/cc +CC++_COM_DEF= echo "C++ not yet supported"; exit -1; : +# +# Use to comment out C++ projects +# +C++BUILD= $(NUMBER_SIGN) + +CC= $(CC_COM_DEF) +CCC= $(CC++_COM_DEF) + +CCCC= @echo " ==> COMPILING \"$@\""; $(CC_COM) LDCC= @echo " ==> LINKING \"$@\""; $(CC_COM) DYNLD= @echo " ==> LINKING dynamic library \"$@\""; $(CC_COM) RANLIB= @echo " ==> RANDOMIZING ARCHIVE \"$@\""; true @@ -64,15 +85,12 @@ #MKDEP= @echo " ==> MAKING DEPENDENCIES \"$@\""; $(RMDEP); cc -M MKDEP= @echo " ==> MAKING DEPENDENCIES \"$@\""; $(RMDEP); /user/local/com/makedepend MKDEP_OUT= +_MKDIR= $(_MKDIR_SH) MKDIR= $(MKDIR_SH) +INSMKDIR= $(INSMKDIR_SH) -#CC++ = @echo " ==> COMPILING \"$@\""; CC -#LDCC++ = @echo " ==> LINKING \"$@\""; CC -#DYNLDC++ = @echo " ==> LINKING dynamic library \"$@\""; CC -#MKC++DEP= @echo " ==> MAKING DEPENDENCIES \"$@\""; $(RMDEP); CC -xM -#MKC++DEP_OUT= -CC++ = @echo " ==> COMPILING \"$@\""; echo "C++ not yet supported"; exit -1 -LDCC++ = @echo " ==> LINKING \"$@\""; echo "C++ not yet supported"; exit -1 -DYNLDC++ = @echo " ==> LINKING dynamic library \"$@\""; echo "C++ not yet supported"; exit -1 -MKC++DEP= @echo " ==> MAKING DEPENDENCIES \"$@\""; $(RMDEP); echo "C++ not yet supported"; exit -1 +CC++ = @echo " ==> COMPILING \"$@\""; $(CC++_COM) +LDCC++ = @echo " ==> LINKING \"$@\""; $(CC++_COM) +DYNLDC++ = @echo " ==> LINKING dynamic library \"$@\""; $(CC++_COM) +MKC++DEP= @echo " ==> MAKING DEPENDENCIES \"$@\""; $(RMDEP); $(CC++_COM) # makedepend? MKC++DEP_OUT= diff -Nru cdrtools-2.01.01a33/RULES/cc-bemwcc.rul cdrtools-3.02a09/RULES/cc-bemwcc.rul --- cdrtools-2.01.01a33/RULES/cc-bemwcc.rul 2007-05-08 10:32:23.000000000 +0000 +++ cdrtools-3.02a09/RULES/cc-bemwcc.rul 2017-05-28 21:47:50.000000000 +0000 @@ -1,6 +1,6 @@ -#ident @(#)cc-bemwcc.rul 1.9 07/05/08 +#ident @(#)cc-bemwcc.rul 1.17 17/05/28 ########################################################################### -# Written 1996-2006 by J. Schilling +# Written 1996-2017 by J. Schilling ########################################################################### # # Platform dependent MACROS for BeOS mwcc @@ -14,12 +14,14 @@ # with the License. # # See the file CDDL.Schily.txt in this distribution for details. +# A copy of the CDDL is also available via the Internet at +# http://www.opensource.org/licenses/cddl1.txt # # When distributing Covered Code, include this CDDL HEADER in each # file and include the License file CDDL.Schily.txt from this distribution. ########################################################################### -CPPFLAGS= -DSCHILY_BUILD $(CPPOPTS) $(CPPOPTX) +CPPFLAGS= -DSCHILY_BUILD $(CPPOPTS) $(CPPOPTX) $(OSINCDIRS:%=-I%) $(OSDEFS) $(OSDEFSX) CFLAGS= $(COPTS) $(CWARNOPTS) $(COPTOPT) $(BEMWCOPTOPT) $(COPTX) C++FLAGS= $(C++OPTS) $(C++WARNOPTS) $(C++OPTOPT) $(BEMWC++OPTOPT) $(C++OPTX) @@ -36,17 +38,17 @@ # # XXX This is used by bemac-beos-cc.rul # -CPPOPTS= -O4 -g -i- -I$(ARCHDIR) -I$(OINCSDIR) $(INCDIRS:%=-I%) $(INCDIRSX:%=-I%) $(OSDEFS) +CPPOPTS= -O4 -g -i- -I$(ARCHDIR) -I$(OINCSDIR) $(INCDIRS:%=-I%) $(INCDIRSX:%=-I%) # # XXX This is used by bemac-beos-mwcc.rul # -CPPOPTS= -relax_pointers -opt all -sym on -g -i- -I$(ARCHDIR) -I$(OINCSDIR) $(INCDIRS:%=-I%) $(INCDIRSX:%=-I%) $(OSDEFS) +CPPOPTS= -relax_pointers -opt all -sym on -g -i- -I$(ARCHDIR) -I$(OINCSDIR) $(INCDIRS:%=-I%) $(INCDIRSX:%=-I%) # # XXX This is used by powerpc-beos-mwcc.rul # -CPPOPTS= -relax_pointers -opt global -sym on -g -i- -I$(ARCHDIR) -I$(OINCSDIR) $(INCDIRS:%=-I%) $(INCDIRSX:%=-I%) $(OSDEFS) +CPPOPTS= -relax_pointers -opt global -sym on -g -i- -I$(ARCHDIR) -I$(OINCSDIR) $(INCDIRS:%=-I%) $(INCDIRSX:%=-I%) -CPPOPTS= -I$(ARCHDIR) -I$(OINCSDIR) $(INCDIRS:%=-I%) $(INCDIRSX:%=-I%) $(OSDEFS) +CPPOPTS= -I$(ARCHDIR) -I$(OINCSDIR) $(INCDIRS:%=-I%) $(INCDIRSX:%=-I%) COPTS= CWOPTS= -w8 COPTOPT= -opt off @@ -62,6 +64,8 @@ LIB_SUFFIX= .a SHL_SUFFIX= .so +LIB_C= -lc + LIBS_PATH= -L$(OLIBSDIR) LIBS_PATH_STATIC= -L$(OLIBSDIR_STATIC) @@ -80,8 +84,25 @@ FLOAT_OPTIONS= -CC_COM= mwccppc -CC= @echo " ==> COMPILING \"$@\""; $(CC_COM) +__CC_COM= $(_UNIQ)$(CC) +___CC_COM= $(__CC_COM:$(_UNIQ)=$(CC_COM_DEF)) +CC_COM= $(___CC_COM:$(_UNIQ)%=%) + +__CC++_COM= $(_UNIQ)$(CCC) +___CC++_COM= $(__CC++_COM:$(_UNIQ)=$(CC++_COM_DEF)) +CC++_COM= $(___CC++_COM:$(_UNIQ)%=%) + +CC_COM_DEF= mwccppc +CC++_COM_DEF= echo "C++ not yet supported"; exit -1; : +# +# Use to comment out C++ projects +# +C++BUILD= $(NUMBER_SIGN) + +CC= $(CC_COM_DEF) +CCC= $(CC++_COM_DEF) + +CCCC= @echo " ==> COMPILING \"$@\""; $(CC_COM) LDCC= @echo " ==> LINKING \"$@\""; $(CC_COM) DYNLD= @echo " ==> LINKING dynamic library \"$@\""; $(CC_COM) @@ -89,13 +110,8 @@ MKDEP= @echo " ==> MAKING DEPENDENCIES \"$@\""; $(RMDEP); $(CC_COM) -make MKDEP_OUT= -#CC++ = @echo " ==> COMPILING \"$@\""; CC -#LDCC++ = @echo " ==> LINKING \"$@\""; CC -#DYNLDC++ = @echo " ==> LINKING dynamic library \"$@\""; CC -#MKC++DEP= @echo " ==> MAKING DEPENDENCIES \"$@\""; $(RMDEP); CC -xM -#MKC++DEP_OUT= -CC++ = @echo " ==> COMPILING \"$@\""; echo "C++ not yet supported"; exit -1 -LDCC++ = @echo " ==> LINKING \"$@\""; echo "C++ not yet supported"; exit -1 -DYNLDC++ = @echo " ==> LINKING dynamic library \"$@\""; echo "C++ not yet supported"; exit -1 -MKC++DEP= @echo " ==> MAKING DEPENDENCIES \"$@\""; $(RMDEP); echo "C++ not yet supported"; exit -1 +CC++ = @echo " ==> COMPILING \"$@\""; $(CC++_COM) +LDCC++ = @echo " ==> LINKING \"$@\""; $(CC++_COM) +DYNLDC++ = @echo " ==> LINKING dynamic library \"$@\""; $(CC++_COM) +MKC++DEP= @echo " ==> MAKING DEPENDENCIES \"$@\""; $(RMDEP); $(CC++_COM) # -make? MKC++DEP_OUT= diff -Nru cdrtools-2.01.01a33/RULES/cc-clang.rul cdrtools-3.02a09/RULES/cc-clang.rul --- cdrtools-2.01.01a33/RULES/cc-clang.rul 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/RULES/cc-clang.rul 2017-05-28 21:47:50.000000000 +0000 @@ -0,0 +1,90 @@ +#ident "@(#)cc-clang.rul 1.2 17/05/28 " +########################################################################### +# Written 1996-2014 by J. Schilling +########################################################################### +# +# Platform independent MACROS for Clang +# +########################################################################### +# Copyright (c) J. Schilling +########################################################################### +# The contents of this file are subject to the terms of the +# Common Development and Distribution License, Version 1.0 only +# (the "License"). You may not use this file except in compliance +# with the License. +# +# See the file CDDL.Schily.txt in this distribution for details. +# A copy of the CDDL is also available via the Internet at +# http://www.opensource.org/licenses/cddl1.txt +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file CDDL.Schily.txt from this distribution. +########################################################################### + +CLANG_OPT= +CLANG_OPT32= -m32 +CLANG_OPT64= -m64 +CLANG_OPTXX= $(CLANG_OPT$(C_ARCH:clang%=%)) + +CPPFLAGS= -DSCHILY_BUILD $(CPPOPTS) $(CPPOPTX) $(OSINCDIRS:%=-I%) $(OSDEFS) $(OSDEFSX) +CFLAGS= $(COPTS) $(CWARNOPTS) $(COPTOPT) $(CLANGOPTOPT) $(COPTX) +C++FLAGS= $(C++OPTS) $(C++WARNOPTS) $(C++OPTOPT) $(G++OPTOPT) $(C++OPTX) + +CPPOPTS= -I$(ARCHDIR) -I$(OINCSDIR) $(INCDIRS:%=-I%) $(INCDIRSX:%=-I%) +COPTS= $(CLANG_OPTXX) +# -Wtraditional now causes more pain than it helps +CWOPTS= -Wall -Wtraditional +CWOPTS= -Wall -Wno-unknown-pragmas \ + -Wshadow -Wmissing-prototypes -Wstrict-prototypes +COPTOPT= -O +COPTDYN= -fpic +COPTGPROF= -pg +C++OPTS= $(CLANG_OPTXX) +C++WOPTS= $(CWOPTS) +C++OPTOPT= $(COPTOPT) +C++OPTDYN= -fpic +C++OPTGPROF= -pg + +LIB_PREFIX= lib +LIB_SUFFIX= .a +SHL_SUFFIX= .so.1 + +LIB_C= -lc + +LIBS_PATH= -L$(OLIBSDIR) +LIBS_PATH_STATIC= -L$(OLIBSDIR_STATIC) + +LDFLAGS= $(LDOPTS) $(LDOPTX) +LDLIBS= $(LIBS) $(LIBX) + +LDOPTS= $(LIBS_PATH) $(LDPATH) $(RUNPATH:-R%=-Wl,-R%) +LDOPTDYN= -shared -Wl,-soname,$(TARGET) +LNDYNLIB= @$(RM) $(RM_FORCE) $(PTARGET_BASE).so; $(SYMLINK) $(TARGET) $(PTARGET_BASE).so + +FLOAT_OPTIONS= + +__CC_COM= $(_UNIQ)$(CC) +___CC_COM= $(__CC_COM:$(_UNIQ)=$(CC_COM_DEF)) +CC_COM= $(___CC_COM:$(_UNIQ)%=%) + +__CC++_COM= $(_UNIQ)$(CCC) +___CC++_COM= $(__CC++_COM:$(_UNIQ)=$(CC++_COM_DEF)) +CC++_COM= $(___CC++_COM:$(_UNIQ)%=%) + +CC_COM_DEF= clang +CC++_COM_DEF= clang++ +CC= $(CC_COM_DEF) +CCC= $(CC++_COM_DEF) + +CCCC= @echo " ==> COMPILING \"$@\""; $(CC_COM) $(CLANG_OPTXX) +CC++ = @echo " ==> COMPILING \"$@\""; $(CC++_COM) $(CLANG_OPTXX) +LDCC= @echo " ==> LINKING \"$@\""; $(CC_COM) $(CLANG_OPTXX) +LDCC++ = @echo " ==> LINKING \"$@\""; $(CC++_COM) $(CLANG_OPTXX) +DYNLD= @echo " ==> LINKING dynamic library \"$@\""; $(CC_COM) $(CLANG_OPTXX) +DYNLDC++ = @echo " ==> LINKING dynamic library \"$@\""; $(CC++_COM) $(CLANG_OPTXX) + +RMDEP= : +MKDEP= @echo " ==> MAKING DEPENDENCIES \"$@\""; $(RMDEP); $(CC_COM) $(CLANG_OPTXX) -M +MKDEP_OUT= +MKC++DEP= @echo " ==> MAKING DEPENDENCIES \"$@\""; $(RMDEP); $(CC++_COM) $(CLANG_OPTXX) -M +MKC++DEP_OUT= diff -Nru cdrtools-2.01.01a33/RULES/cc-dec.rul cdrtools-3.02a09/RULES/cc-dec.rul --- cdrtools-2.01.01a33/RULES/cc-dec.rul 2007-05-08 10:32:23.000000000 +0000 +++ cdrtools-3.02a09/RULES/cc-dec.rul 2017-05-28 21:47:50.000000000 +0000 @@ -1,6 +1,6 @@ -#ident "@(#)cc-dec.rul 1.7 07/05/08 " +#ident "@(#)cc-dec.rul 1.16 17/05/28 " ########################################################################### -# Written 1998-2006 by J. Schilling +# Written 1998-2017 by J. Schilling ########################################################################### # # Platform dependent MACROS for Digital UNIX cc @@ -14,16 +14,18 @@ # with the License. # # See the file CDDL.Schily.txt in this distribution for details. +# A copy of the CDDL is also available via the Internet at +# http://www.opensource.org/licenses/cddl1.txt # # When distributing Covered Code, include this CDDL HEADER in each # file and include the License file CDDL.Schily.txt from this distribution. ########################################################################### -CPPFLAGS= -DSCHILY_BUILD $(CPPOPTS) $(CPPOPTX) +CPPFLAGS= -DSCHILY_BUILD $(CPPOPTS) $(CPPOPTX) $(OSINCDIRS:%=-I%) $(OSDEFS) $(OSDEFSX) CFLAGS= $(COPTS) $(CWARNOPTS) $(COPTOPT) $(DECCOPTOPT) $(COPTX) C++FLAGS= $(C++OPTS) $(C++WARNOPTS) $(C++OPTOPT) $(DECC++OPTOPT) $(C++OPTX) -CPPOPTS= -I$(ARCHDIR) -I$(OINCSDIR) $(INCDIRS:%=-I%) $(INCDIRSX:%=-I%) $(OSDEFS) +CPPOPTS= -I$(ARCHDIR) -I$(OINCSDIR) $(INCDIRS:%=-I%) $(INCDIRSX:%=-I%) COPTS= CWOPTS= COPTOPT= -O @@ -39,6 +41,8 @@ LIB_SUFFIX= .a SHL_SUFFIX= .so.1.0 +LIB_C= -lc + LIBS_PATH= -L$(OLIBSDIR) -L/usr/ccs/lib LIBS_PATH_STATIC= -L$(OLIBSDIR_STATIC) @@ -52,21 +56,34 @@ FLOAT_OPTIONS= -CC= @echo " ==> COMPILING \"$@\""; cc -LDCC= @echo " ==> LINKING \"$@\""; cc -DYNLD= @echo " ==> LINKING dynamic library \"$@\""; cc +__CC_COM= $(_UNIQ)$(CC) +___CC_COM= $(__CC_COM:$(_UNIQ)=$(CC_COM_DEF)) +CC_COM= $(___CC_COM:$(_UNIQ)%=%) + +__CC++_COM= $(_UNIQ)$(CCC) +___CC++_COM= $(__CC++_COM:$(_UNIQ)=$(CC++_COM_DEF)) +CC++_COM= $(___CC++_COM:$(_UNIQ)%=%) + +CC_COM_DEF= cc +CC++_COM_DEF= echo "C++ not yet supported"; exit -1; : +# +# Use to comment out C++ projects +# +C++BUILD= $(NUMBER_SIGN) + +CC= $(CC_COM_DEF) +CCC= $(CC++_COM_DEF) + +CCCC= @echo " ==> COMPILING \"$@\""; $(CC_COM) +LDCC= @echo " ==> LINKING \"$@\""; $(CC_COM) +DYNLD= @echo " ==> LINKING dynamic library \"$@\""; $(CC_COM) RMDEP= : -MKDEP= @echo " ==> MAKING DEPENDENCIES \"$@\""; $(RMDEP); cc -M +MKDEP= @echo " ==> MAKING DEPENDENCIES \"$@\""; $(RMDEP); $(CC_COM) -M MKDEP_OUT= -#CC++ = @echo " ==> COMPILING \"$@\""; CC -#LDCC++ = @echo " ==> LINKING \"$@\""; CC -#DYNLDC++ = @echo " ==> LINKING dynamic library \"$@\""; CC -#MKC++DEP= @echo " ==> MAKING DEPENDENCIES \"$@\""; $(RMDEP); CC -xM -#MKC++DEP_OUT= -CC++ = @echo " ==> COMPILING \"$@\""; echo "C++ not yet supported"; exit -1 -LDCC++ = @echo " ==> LINKING \"$@\""; echo "C++ not yet supported"; exit -1 -DYNLDC++ = @echo " ==> LINKING dynamic library \"$@\""; echo "C++ not yet supported"; exit -1 -MKC++DEP= @echo " ==> MAKING DEPENDENCIES \"$@\""; $(RMDEP); echo "C++ not yet supported"; exit -1 +CC++ = @echo " ==> COMPILING \"$@\""; $(CC++_COM) +LDCC++ = @echo " ==> LINKING \"$@\""; $(CC++_COM) +DYNLDC++ = @echo " ==> LINKING dynamic library \"$@\""; $(CC++_COM) +MKC++DEP= @echo " ==> MAKING DEPENDENCIES \"$@\""; $(RMDEP); $(CC++_COM) -M MKC++DEP_OUT= diff -Nru cdrtools-2.01.01a33/RULES/cc-dg.rul cdrtools-3.02a09/RULES/cc-dg.rul --- cdrtools-2.01.01a33/RULES/cc-dg.rul 2007-05-08 10:32:23.000000000 +0000 +++ cdrtools-3.02a09/RULES/cc-dg.rul 2017-05-28 21:47:50.000000000 +0000 @@ -1,6 +1,6 @@ -#ident "@(#)cc-dg.rul 1.7 07/05/08 " +#ident "@(#)cc-dg.rul 1.16 17/05/28 " ########################################################################### -# Written 1996-2006 by J. Schilling +# Written 1996-2017 by J. Schilling ########################################################################### # # Platform dependent MACROS for DGUX cc @@ -14,15 +14,17 @@ # with the License. # # See the file CDDL.Schily.txt in this distribution for details. +# A copy of the CDDL is also available via the Internet at +# http://www.opensource.org/licenses/cddl1.txt # # When distributing Covered Code, include this CDDL HEADER in each # file and include the License file CDDL.Schily.txt from this distribution. -CPPFLAGS= -DSCHILY_BUILD $(CPPOPTS) $(CPPOPTX) +CPPFLAGS= -DSCHILY_BUILD $(CPPOPTS) $(CPPOPTX) $(OSINCDIRS:%=-I%) $(OSDEFS) $(OSDEFSX) CFLAGS= $(COPTS) $(CWARNOPTS) $(COPTOPT) $(DGCOPTOPT) $(COPTX) C++FLAGS= $(C++OPTS) $(C++WARNOPTS) $(C++OPTOPT) $(DGC++OPTOPT) $(C++OPTX) -CPPOPTS= -I$(ARCHDIR) -I$(OINCSDIR) $(INCDIRS:%=-I%) $(INCDIRSX:%=-I%) $(OSDEFS) +CPPOPTS= -I$(ARCHDIR) -I$(OINCSDIR) $(INCDIRS:%=-I%) $(INCDIRSX:%=-I%) COPTS= -Xa CWOPTS= -v COPTOPT= -O @@ -38,6 +40,8 @@ LIB_SUFFIX= .a SHL_SUFFIX= .so.1 +LIB_C= -lc + LIBS_PATH= -L$(OLIBSDIR) LIBS_PATH_STATIC= -L$(OLIBSDIR_STATIC) @@ -50,22 +54,35 @@ FLOAT_OPTIONS= -CC= @echo " ==> COMPILING \"$@\""; cc -LDCC= @echo " ==> LINKING \"$@\""; cc -DYNLD= @echo " ==> LINKING dynamic library \"$@\""; cc +__CC_COM= $(_UNIQ)$(CC) +___CC_COM= $(__CC_COM:$(_UNIQ)=$(CC_COM_DEF)) +CC_COM= $(___CC_COM:$(_UNIQ)%=%) + +__CC++_COM= $(_UNIQ)$(CCC) +___CC++_COM= $(__CC++_COM:$(_UNIQ)=$(CC++_COM_DEF)) +CC++_COM= $(___CC++_COM:$(_UNIQ)%=%) + +CC_COM_DEF= cc +CC++_COM_DEF= echo "C++ not yet supported"; exit -1; : +# +# Use to comment out C++ projects +# +C++BUILD= $(NUMBER_SIGN) + +CC= $(CC_COM_DEF) +CCC= $(CC++_COM_DEF) + +CCCC= @echo " ==> COMPILING \"$@\""; $(CC_COM) +LDCC= @echo " ==> LINKING \"$@\""; $(CC_COM) +DYNLD= @echo " ==> LINKING dynamic library \"$@\""; $(CC_COM) RANLIB= @echo " ==> RANDOMIZING ARCHIVE \"$@\""; true RMDEP= : -MKDEP= @echo " ==> MAKING DEPENDENCIES \"$@\""; $(RMDEP); cc -xM +MKDEP= @echo " ==> MAKING DEPENDENCIES \"$@\""; $(RMDEP); $(CC_COM) -xM MKDEP_OUT= -#CC++ = @echo " ==> COMPILING \"$@\""; CC -#LDCC++ = @echo " ==> LINKING \"$@\""; CC -#DYNLDC++ = @echo " ==> LINKING dynamic library \"$@\""; CC -#MKC++DEP= @echo " ==> MAKING DEPENDENCIES \"$@\""; $(RMDEP); CC -xM -#MKC++DEP_OUT= -CC++ = @echo " ==> COMPILING \"$@\""; echo "C++ not yet supported"; exit -1 -LDCC++ = @echo " ==> LINKING \"$@\""; echo "C++ not yet supported"; exit -1 -DYNLDC++ = @echo " ==> LINKING dynamic library \"$@\""; echo "C++ not yet supported"; exit -1 -MKC++DEP= @echo " ==> MAKING DEPENDENCIES \"$@\""; $(RMDEP); echo "C++ not yet supported"; exit -1 +CC++ = @echo " ==> COMPILING \"$@\""; $(CC++_COM) +LDCC++ = @echo " ==> LINKING \"$@\""; $(CC++_COM) +DYNLDC++ = @echo " ==> LINKING dynamic library \"$@\""; $(CC++_COM) +MKC++DEP= @echo " ==> MAKING DEPENDENCIES \"$@\""; $(RMDEP); $(CC++_COM) -xM MKC++DEP_OUT= diff -Nru cdrtools-2.01.01a33/RULES/cc-dumb.rul cdrtools-3.02a09/RULES/cc-dumb.rul --- cdrtools-2.01.01a33/RULES/cc-dumb.rul 2007-05-08 10:32:23.000000000 +0000 +++ cdrtools-3.02a09/RULES/cc-dumb.rul 2017-05-28 21:47:50.000000000 +0000 @@ -1,6 +1,6 @@ -#ident "@(#)cc-dumb.rul 1.7 07/05/08 " +#ident "@(#)cc-dumb.rul 1.16 17/05/28 " ########################################################################### -# Written 1997-2006 by J. Schilling +# Written 1997-2017 by J. Schilling ########################################################################### # # Platform dependent MACROS for unknown systems systems with dumb cc @@ -14,16 +14,18 @@ # with the License. # # See the file CDDL.Schily.txt in this distribution for details. +# A copy of the CDDL is also available via the Internet at +# http://www.opensource.org/licenses/cddl1.txt # # When distributing Covered Code, include this CDDL HEADER in each # file and include the License file CDDL.Schily.txt from this distribution. ########################################################################### -CPPFLAGS= -DSCHILY_BUILD $(CPPOPTS) $(CPPOPTX) +CPPFLAGS= -DSCHILY_BUILD $(CPPOPTS) $(CPPOPTX) $(OSINCDIRS:%=-I%) $(OSDEFS) $(OSDEFSX) CFLAGS= $(COPTS) $(CWARNOPTS) $(COPTOPT) $(DUMBCOPTOPT) $(COPTX) C++FLAGS= $(C++OPTS) $(C++WARNOPTS) $(C++OPTOPT) $(DUMBC++OPTOPT) $(C++OPTX) -CPPOPTS= -I$(ARCHDIR) -I$(OINCSDIR) $(INCDIRS:%=-I%) $(INCDIRSX:%=-I%) $(OSDEFS) +CPPOPTS= -I$(ARCHDIR) -I$(OINCSDIR) $(INCDIRS:%=-I%) $(INCDIRSX:%=-I%) COPTS= CWOPTS= # @@ -42,6 +44,8 @@ LIB_SUFFIX= .a SHL_SUFFIX= .so.1.0 +LIB_C= -lc + LIBS_PATH= -L$(OLIBSDIR) LIBS_PATH_STATIC= -L$(OLIBSDIR_STATIC) @@ -55,22 +59,35 @@ FLOAT_OPTIONS= -CC= @echo " ==> COMPILING \"$@\""; cc -LDCC= @echo " ==> LINKING \"$@\""; cc -DYNLD= @echo " ==> LINKING dynamic library \"$@\""; cc +__CC_COM= $(_UNIQ)$(CC) +___CC_COM= $(__CC_COM:$(_UNIQ)=$(CC_COM_DEF)) +CC_COM= $(___CC_COM:$(_UNIQ)%=%) + +__CC++_COM= $(_UNIQ)$(CCC) +___CC++_COM= $(__CC++_COM:$(_UNIQ)=$(CC++_COM_DEF)) +CC++_COM= $(___CC++_COM:$(_UNIQ)%=%) + +CC_COM_DEF= cc +CC++_COM_DEF= echo "C++ not yet supported"; exit -1; : +# +# Use to comment out C++ projects +# +C++BUILD= $(NUMBER_SIGN) + +CC= $(CC_COM_DEF) +CCC= $(CC++_COM_DEF) + +CCCC= @echo " ==> COMPILING \"$@\""; $(CC_COM) +LDCC= @echo " ==> LINKING \"$@\""; $(CC_COM) +DYNLD= @echo " ==> LINKING dynamic library \"$@\""; $(CC_COM) RMDEP= : -#MKDEP= @echo " ==> MAKING DEPENDENCIES \"$@\""; $(RMDEP); cc -M +#MKDEP= @echo " ==> MAKING DEPENDENCIES \"$@\""; $(RMDEP); $(CC_COM) -M MKDEP= @echo " ==> MAKING DEPENDENCIES \"$@\""; $(RMDEP); echo "Cannot do -M with unknown cc"; : MKDEP_OUT= -#CC++ = @echo " ==> COMPILING \"$@\""; CC -#LDCC++ = @echo " ==> LINKING \"$@\""; CC -#DYNLDC++ = @echo " ==> LINKING dynamic library \"$@\""; CC -#MKC++DEP= @echo " ==> MAKING DEPENDENCIES \"$@\""; $(RMDEP); CC -xM -#MKC++DEP_OUT= -CC++ = @echo " ==> COMPILING \"$@\""; echo "C++ not yet supported"; exit -1 -LDCC++ = @echo " ==> LINKING \"$@\""; echo "C++ not yet supported"; exit -1 -DYNLDC++ = @echo " ==> LINKING dynamic library \"$@\""; echo "C++ not yet supported"; exit -1 -MKC++DEP= @echo " ==> MAKING DEPENDENCIES \"$@\""; $(RMDEP); echo "C++ not yet supported"; exit -1 +CC++ = @echo " ==> COMPILING \"$@\""; $(CC++_COM) +LDCC++ = @echo " ==> LINKING \"$@\""; $(CC++_COM) +DYNLDC++ = @echo " ==> LINKING dynamic library \"$@\""; $(CC++_COM) +MKC++DEP= @echo " ==> MAKING DEPENDENCIES \"$@\""; $(RMDEP); $(CC++_COM); echo "Cannot do -M with unknown CC"; : MKC++DEP_OUT= diff -Nru cdrtools-2.01.01a33/RULES/cc-gcc64.rul cdrtools-3.02a09/RULES/cc-gcc64.rul --- cdrtools-2.01.01a33/RULES/cc-gcc64.rul 2007-05-09 12:25:30.000000000 +0000 +++ cdrtools-3.02a09/RULES/cc-gcc64.rul 1970-01-01 00:00:00.000000000 +0000 @@ -1,69 +0,0 @@ -#ident "@(#)cc-gcc64.rul 1.10 07/05/09 " -########################################################################### -# Written 1996-2006 by J. Schilling -########################################################################### -# -# Platform independent MACROS for GCC -# -########################################################################### -# Copyright (c) J. Schilling -########################################################################### -# The contents of this file are subject to the terms of the -# Common Development and Distribution License, Version 1.0 only -# (the "License"). You may not use this file except in compliance -# with the License. -# -# See the file CDDL.Schily.txt in this distribution for details. -# -# When distributing Covered Code, include this CDDL HEADER in each -# file and include the License file CDDL.Schily.txt from this distribution. -########################################################################### - -CPPFLAGS= -DSCHILY_BUILD $(CPPOPTS) $(CPPOPTX) -CFLAGS= $(COPTS) $(CWARNOPTS) $(COPTOPT) $(GCCOPTOPT) $(COPTX) -C++FLAGS= $(C++OPTS) $(C++WARNOPTS) $(C++OPTOPT) $(G++OPTOPT) $(C++OPTX) - -CPPOPTS= -I$(ARCHDIR) -I$(OINCSDIR) $(INCDIRS:%=-I%) $(INCDIRSX:%=-I%) $(OSDEFS) -COPTS= -m64 -# -Wtraditional now causes more pain than it helps -CWOPTS= -Wall -Wtraditional -CWOPTS= -Wall -Wno-unknown-pragmas \ - -Wshadow -Wmissing-prototypes -Wstrict-prototypes -COPTOPT= -O -COPTDYN= -fpic -COPTGPROF= -pg -C++OPTS= -m64 -C++WOPTS= $(CWOPTS) -C++OPTOPT= $(COPTOPT) -C++OPTDYN= -fpic -C++OPTGPROF= -pg - -LIB_PREFIX= lib -LIB_SUFFIX= .a -SHL_SUFFIX= .so.1 - -LIBS_PATH= -L$(OLIBSDIR) -LIBS_PATH_STATIC= -L$(OLIBSDIR_STATIC) - -LDFLAGS= $(LDOPTS) $(LDOPTX) -LDLIBS= $(LIBS) $(LIBX) - -LDOPTS= $(LIBS_PATH) $(LDPATH) $(RUNPATH:-R%=-Wl,-R%) -LDOPTDYN= -shared -Wl,-soname,$(TARGET) -LNDYNLIB= @$(RM) $(RM_FORCE) $(PTARGET_BASE).so; $(SYMLINK) $(TARGET) $(PTARGET_BASE).so - -FLOAT_OPTIONS= - -CC_COM= gcc -CC= @echo " ==> COMPILING \"$@\""; gcc -m64 -CC++ = @echo " ==> COMPILING \"$@\""; g++ -m64 -LDCC= @echo " ==> LINKING \"$@\""; gcc -m64 -LDCC++ = @echo " ==> LINKING \"$@\""; g++ -m64 -DYNLD= @echo " ==> LINKING dynamic library \"$@\""; gcc -m64 -DYNLDC++ = @echo " ==> LINKING dynamic library \"$@\""; g++ -m64 - -RMDEP= : -MKDEP= @echo " ==> MAKING DEPENDENCIES \"$@\""; $(RMDEP); gcc -m64 -M -MKDEP_OUT= -MKC++DEP= @echo " ==> MAKING DEPENDENCIES \"$@\""; $(RMDEP); g++ -m64 -M -MKC++DEP_OUT= diff -Nru cdrtools-2.01.01a33/RULES/cc-gcc.rul cdrtools-3.02a09/RULES/cc-gcc.rul --- cdrtools-2.01.01a33/RULES/cc-gcc.rul 2007-05-09 12:25:30.000000000 +0000 +++ cdrtools-3.02a09/RULES/cc-gcc.rul 2017-05-28 21:47:50.000000000 +0000 @@ -1,6 +1,6 @@ -#ident "@(#)cc-gcc.rul 1.9 07/05/09 " +#ident "@(#)cc-gcc.rul 1.17 17/05/28 " ########################################################################### -# Written 1996-2006 by J. Schilling +# Written 1996-2014 by J. Schilling ########################################################################### # # Platform independent MACROS for GCC @@ -14,17 +14,24 @@ # with the License. # # See the file CDDL.Schily.txt in this distribution for details. +# A copy of the CDDL is also available via the Internet at +# http://www.opensource.org/licenses/cddl1.txt # # When distributing Covered Code, include this CDDL HEADER in each # file and include the License file CDDL.Schily.txt from this distribution. ########################################################################### -CPPFLAGS= -DSCHILY_BUILD $(CPPOPTS) $(CPPOPTX) +GCC_OPT= +GCC_OPT32= -m32 +GCC_OPT64= -m64 +GCC_OPTXX= $(GCC_OPT$(C_ARCH:gcc%=%)) + +CPPFLAGS= -DSCHILY_BUILD $(CPPOPTS) $(CPPOPTX) $(OSINCDIRS:%=-I%) $(OSDEFS) $(OSDEFSX) CFLAGS= $(COPTS) $(CWARNOPTS) $(COPTOPT) $(GCCOPTOPT) $(COPTX) C++FLAGS= $(C++OPTS) $(C++WARNOPTS) $(C++OPTOPT) $(G++OPTOPT) $(C++OPTX) -CPPOPTS= -I$(ARCHDIR) -I$(OINCSDIR) $(INCDIRS:%=-I%) $(INCDIRSX:%=-I%) $(OSDEFS) -COPTS= +CPPOPTS= -I$(ARCHDIR) -I$(OINCSDIR) $(INCDIRS:%=-I%) $(INCDIRSX:%=-I%) +COPTS= $(GCC_OPTXX) # -Wtraditional now causes more pain than it helps CWOPTS= -Wall -Wtraditional CWOPTS= -Wall -Wno-unknown-pragmas \ @@ -32,7 +39,7 @@ COPTOPT= -O COPTDYN= -fpic COPTGPROF= -pg -C++OPTS= +C++OPTS= $(GCC_OPTXX) C++WOPTS= $(CWOPTS) C++OPTOPT= $(COPTOPT) C++OPTDYN= -fpic @@ -42,6 +49,8 @@ LIB_SUFFIX= .a SHL_SUFFIX= .so.1 +LIB_C= -lc + LIBS_PATH= -L$(OLIBSDIR) LIBS_PATH_STATIC= -L$(OLIBSDIR_STATIC) @@ -54,15 +63,28 @@ FLOAT_OPTIONS= -CC= @echo " ==> COMPILING \"$@\""; gcc -CC++ = @echo " ==> COMPILING \"$@\""; g++ -LDCC= @echo " ==> LINKING \"$@\""; gcc -LDCC++ = @echo " ==> LINKING \"$@\""; g++ -DYNLD= @echo " ==> LINKING dynamic library \"$@\""; gcc -DYNLDC++ = @echo " ==> LINKING dynamic library \"$@\""; g++ +__CC_COM= $(_UNIQ)$(CC) +___CC_COM= $(__CC_COM:$(_UNIQ)=$(CC_COM_DEF)) +CC_COM= $(___CC_COM:$(_UNIQ)%=%) + +__CC++_COM= $(_UNIQ)$(CCC) +___CC++_COM= $(__CC++_COM:$(_UNIQ)=$(CC++_COM_DEF)) +CC++_COM= $(___CC++_COM:$(_UNIQ)%=%) + +CC_COM_DEF= gcc +CC++_COM_DEF= g++ +CC= $(CC_COM_DEF) +CCC= $(CC++_COM_DEF) + +CCCC= @echo " ==> COMPILING \"$@\""; $(CC_COM) $(GCC_OPTXX) +CC++ = @echo " ==> COMPILING \"$@\""; $(CC++_COM) $(GCC_OPTXX) +LDCC= @echo " ==> LINKING \"$@\""; $(CC_COM) $(GCC_OPTXX) +LDCC++ = @echo " ==> LINKING \"$@\""; $(CC++_COM) $(GCC_OPTXX) +DYNLD= @echo " ==> LINKING dynamic library \"$@\""; $(CC_COM) $(GCC_OPTXX) +DYNLDC++ = @echo " ==> LINKING dynamic library \"$@\""; $(CC++_COM) $(GCC_OPTXX) RMDEP= : -MKDEP= @echo " ==> MAKING DEPENDENCIES \"$@\""; $(RMDEP); gcc -M +MKDEP= @echo " ==> MAKING DEPENDENCIES \"$@\""; $(RMDEP); $(CC_COM) $(GCC_OPTXX) -M MKDEP_OUT= -MKC++DEP= @echo " ==> MAKING DEPENDENCIES \"$@\""; $(RMDEP); g++ -M +MKC++DEP= @echo " ==> MAKING DEPENDENCIES \"$@\""; $(RMDEP); $(CC++_COM) $(GCC_OPTXX) -M MKC++DEP_OUT= diff -Nru cdrtools-2.01.01a33/RULES/cc-hp64.rul cdrtools-3.02a09/RULES/cc-hp64.rul --- cdrtools-2.01.01a33/RULES/cc-hp64.rul 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/RULES/cc-hp64.rul 2017-05-28 21:47:50.000000000 +0000 @@ -0,0 +1,98 @@ +#ident "@(#)cc-hp64.rul 1.18 17/05/28 " +########################################################################### +# Written 1996-2017 by J. Schilling +########################################################################### +# +# Platform dependent MACROS for HP/UC cc +# +########################################################################### +# Copyright (c) J. Schilling +########################################################################### +# The contents of this file are subject to the terms of the +# Common Development and Distribution License, Version 1.0 only +# (the "License"). You may not use this file except in compliance +# with the License. +# +# See the file CDDL.Schily.txt in this distribution for details. +# A copy of the CDDL is also available via the Internet at +# http://www.opensource.org/licenses/cddl1.txt +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file CDDL.Schily.txt from this distribution. +########################################################################### + +CPPFLAGS= -DSCHILY_BUILD $(CPPOPTS) $(CPPOPTX) $(OSINCDIRS:%=-I%) $(OSDEFS) $(OSDEFSX) +CFLAGS= $(COPTS) $(CWARNOPTS) $(COPTOPT) $(HPCOPTOPT) $(COPTX) +C++FLAGS= $(C++OPTS) $(C++WARNOPTS) $(C++OPTOPT) $(HPC++OPTOPT) $(C++OPTX) + +CPPOPTS= -I$(ARCHDIR) -I$(OINCSDIR) $(INCDIRS:%=-I%) $(INCDIRSX:%=-I%) +# +# -Ae -> ANSI C (non-bundled C only - bundled C ignores -Ae) +# +DAportable -> Create Parisc-1.1 code +# +HP_CC_ANSI_OPT= -Ae # May be overwritten later from $(OINCSDIR)/rules.cnf +HP_CC_OPT_OPT= -O # May be overwritten later from $(OINCSDIR)/rules.cnf +HP_CC_GPROF_OPT= -G # May be overwritten later from $(OINCSDIR)/rules.cnf + +COPTS= $(HP_CC_ANSI_OPT) +DD64 +#COPTS= $(HP_CC_ANSI_OPT) +DAportable +DD64 +CWOPTS= +COPTOPT= $(HP_CC_OPT_OPT) +COPTDYN= +z +COPTGPROF= $(HP_CC_GPROF_OPT) +C++OPTS= +DD64 +C++WOPTS= +#C++OPTOPT= -O +#C++OPTDYN= -Kpic +#C++OPTGPROF= -xpg + +LIB_PREFIX= lib +LIB_SUFFIX= .a +SHL_SUFFIX= .sl + +LIB_C= -lc + +LIBS_PATH= -L$(OLIBSDIR) +LIBS_PATH_STATIC= -L$(OLIBSDIR_STATIC) + +LDFLAGS= $(LDOPTS) $(LDOPTX) +LDLIBS= $(LIBS) $(LIBX) + +#LDOPTS= $(LIBS_PATH) $(LDPATH) $(RUNPATH) +LDOPTS= $(LIBS_PATH) $(LDPATH) +LDOPTDYN= -Wl,-soname,$(TARGET) +LNDYNLIB= @ + +FLOAT_OPTIONS= + +__CC_COM= $(_UNIQ)$(CC) +___CC_COM= $(__CC_COM:$(_UNIQ)=$(CC_COM_DEF)) +CC_COM= $(___CC_COM:$(_UNIQ)%=%) + +__CC++_COM= $(_UNIQ)$(CCC) +___CC++_COM= $(__CC++_COM:$(_UNIQ)=$(CC++_COM_DEF)) +CC++_COM= $(___CC++_COM:$(_UNIQ)%=%) + +CC_COM_DEF= cc +CC++_COM_DEF= echo "C++ not yet supported"; exit -1; : +# +# Use to comment out C++ projects +# +C++BUILD= $(NUMBER_SIGN) + +CC= $(CC_COM_DEF) +CCC= $(CC++_COM_DEF) + +CCCC= @echo " ==> COMPILING \"$@\""; $(CC_COM) +DD64 +LDCC= @echo " ==> LINKING \"$@\""; $(CC_COM) +DD64 +DYNLD= @echo " ==> LINKING dynamic library \"$@\""; $(CC_COM) +DD64 + +RMDEP= : +MKDEP= @echo " ==> MAKING DEPENDENCIES \"$@\""; $(RMDEP); $(SRCROOT)/conf/mkdep-hpux.sh +MKDEP_OUT= + +CC++ = @echo " ==> COMPILING \"$@\""; $(CC++_COM) +LDCC++ = @echo " ==> LINKING \"$@\""; $(CC++_COM) +DYNLDC++ = @echo " ==> LINKING dynamic library \"$@\""; $(CC++_COM) +MKC++DEP= @echo " ==> MAKING DEPENDENCIES \"$@\""; $(RMDEP); $(CC++_COM); echo "Cannot do -M with unknown CC"; : +MKC++DEP_OUT= diff -Nru cdrtools-2.01.01a33/RULES/cc-hp.rul cdrtools-3.02a09/RULES/cc-hp.rul --- cdrtools-2.01.01a33/RULES/cc-hp.rul 2007-05-08 10:32:23.000000000 +0000 +++ cdrtools-3.02a09/RULES/cc-hp.rul 2017-05-28 21:47:50.000000000 +0000 @@ -1,6 +1,6 @@ -#ident "@(#)cc-hp.rul 1.6 07/05/08 " +#ident "@(#)cc-hp.rul 1.17 17/05/28 " ########################################################################### -# Written 1996-2006 by J. Schilling +# Written 1996-2017 by J. Schilling ########################################################################### # # Platform dependent MACROS for HP/UC cc @@ -14,25 +14,31 @@ # with the License. # # See the file CDDL.Schily.txt in this distribution for details. +# A copy of the CDDL is also available via the Internet at +# http://www.opensource.org/licenses/cddl1.txt # # When distributing Covered Code, include this CDDL HEADER in each # file and include the License file CDDL.Schily.txt from this distribution. ########################################################################### -CPPFLAGS= -DSCHILY_BUILD $(CPPOPTS) $(CPPOPTX) +CPPFLAGS= -DSCHILY_BUILD $(CPPOPTS) $(CPPOPTX) $(OSINCDIRS:%=-I%) $(OSDEFS) $(OSDEFSX) CFLAGS= $(COPTS) $(CWARNOPTS) $(COPTOPT) $(HPCOPTOPT) $(COPTX) C++FLAGS= $(C++OPTS) $(C++WARNOPTS) $(C++OPTOPT) $(HPC++OPTOPT) $(C++OPTX) -CPPOPTS= -I$(ARCHDIR) -I$(OINCSDIR) $(INCDIRS:%=-I%) $(INCDIRSX:%=-I%) $(OSDEFS) +CPPOPTS= -I$(ARCHDIR) -I$(OINCSDIR) $(INCDIRS:%=-I%) $(INCDIRSX:%=-I%) # # -Ae -> ANSI C (non-bundled C only - bundled C ignores -Ae) # +DAportable -> Create Parisc-1.1 code # -COPTS= -Ae +DAportable +HP_CC_ANSI_OPT= -Ae # May be overwritten later from $(OINCSDIR)/rules.cnf +HP_CC_OPT_OPT= -O # May be overwritten later from $(OINCSDIR)/rules.cnf +HP_CC_GPROF_OPT= -G # May be overwritten later from $(OINCSDIR)/rules.cnf + +COPTS= $(HP_CC_ANSI_OPT) +DAportable CWOPTS= -COPTOPT= -O -COPTDYN= -fpic -COPTGPROF= -pg +COPTOPT= $(HP_CC_OPT_OPT) +COPTDYN= +z +COPTGPROF= $(HP_CC_GPROF_OPT) C++OPTS= C++WOPTS= #C++OPTOPT= -O @@ -43,6 +49,8 @@ LIB_SUFFIX= .a SHL_SUFFIX= .sl +LIB_C= -lc + LIBS_PATH= -L$(OLIBSDIR) LIBS_PATH_STATIC= -L$(OLIBSDIR_STATIC) @@ -51,26 +59,42 @@ #LDOPTS= $(LIBS_PATH) $(LDPATH) $(RUNPATH) LDOPTS= $(LIBS_PATH) $(LDPATH) -LDOPTDYN= -shared -Wl,-soname,$(TARGET) +#LDOPTDYN= -Wl,-soname,$(TARGET) +LDOPTDYN= -b LNDYNLIB= @ FLOAT_OPTIONS= -CC= @echo " ==> COMPILING \"$@\""; cc -LDCC= @echo " ==> LINKING \"$@\""; cc -DYNLD= @echo " ==> LINKING dynamic library \"$@\""; cc +__CC_COM= $(_UNIQ)$(CC) +___CC_COM= $(__CC_COM:$(_UNIQ)=$(CC_COM_DEF)) +CC_COM= $(___CC_COM:$(_UNIQ)%=%) + +__CC++_COM= $(_UNIQ)$(CCC) +___CC++_COM= $(__CC++_COM:$(_UNIQ)=$(CC++_COM_DEF)) +CC++_COM= $(___CC++_COM:$(_UNIQ)%=%) + +CC_COM_DEF= cc +CC++_COM_DEF= echo "C++ not yet supported"; exit -1; : +# +# Use to comment out C++ projects +# +C++BUILD= $(NUMBER_SIGN) + +CC= $(CC_COM_DEF) +CCC= $(CC++_COM_DEF) + +CCCC= @echo " ==> COMPILING \"$@\""; $(CC_COM) +LDCC= @echo " ==> LINKING \"$@\""; $(CC_COM) +#DYNLD= @echo " ==> LINKING dynamic library \"$@\""; $(CC_COM) +DYNLD= @echo " ==> LINKING dynamic library \"$@\""; ld RMDEP= : MKDEP= @echo " ==> MAKING DEPENDENCIES \"$@\""; $(RMDEP); $(SRCROOT)/conf/mkdep-hpux.sh MKDEP_OUT= -#CC++ = @echo " ==> COMPILING \"$@\""; CC -#LDCC++ = @echo " ==> LINKING \"$@\""; CC -#DYNLDC++ = @echo " ==> LINKING dynamic library \"$@\""; CC -#MKC++DEP= @echo " ==> MAKING DEPENDENCIES \"$@\""; $(RMDEP); CC -xM -#MKC++DEP_OUT= -CC++ = @echo " ==> COMPILING \"$@\""; echo "C++ not yet supported"; exit -1 -LDCC++ = @echo " ==> LINKING \"$@\""; echo "C++ not yet supported"; exit -1 -DYNLDC++ = @echo " ==> LINKING dynamic library \"$@\""; echo "C++ not yet supported"; exit -1 -MKC++DEP= @echo " ==> MAKING DEPENDENCIES \"$@\""; $(RMDEP); echo "C++ not yet supported"; exit -1 +CC++ = @echo " ==> COMPILING \"$@\""; $(CC++_COM) +LDCC++ = @echo " ==> LINKING \"$@\""; $(CC++_COM) +#DYNLDC++ = @echo " ==> LINKING dynamic library \"$@\""; $(CC++_COM) +DYNLDC++ = @echo " ==> LINKING dynamic library \"$@\""; ld +MKC++DEP= @echo " ==> MAKING DEPENDENCIES \"$@\""; $(RMDEP); $(CC++_COM); echo "Cannot do -M with unknown CC"; : MKC++DEP_OUT= diff -Nru cdrtools-2.01.01a33/RULES/cc-ibm.rul cdrtools-3.02a09/RULES/cc-ibm.rul --- cdrtools-2.01.01a33/RULES/cc-ibm.rul 2007-05-08 10:32:23.000000000 +0000 +++ cdrtools-3.02a09/RULES/cc-ibm.rul 2017-05-28 21:47:50.000000000 +0000 @@ -1,6 +1,6 @@ -#ident "@(#)cc-ibm.rul 1.6 07/05/08 " +#ident "@(#)cc-ibm.rul 1.16 17/05/28 " ########################################################################### -# Written 1996-2006 by J. Schilling +# Written 1996-2017 by J. Schilling ########################################################################### # # Platform dependent MACROS for IBM AIX cc @@ -14,22 +14,34 @@ # with the License. # # See the file CDDL.Schily.txt in this distribution for details. +# A copy of the CDDL is also available via the Internet at +# http://www.opensource.org/licenses/cddl1.txt # # When distributing Covered Code, include this CDDL HEADER in each # file and include the License file CDDL.Schily.txt from this distribution. ########################################################################### -CPPFLAGS= -DSCHILY_BUILD $(CPPOPTS) $(CPPOPTX) +IBMCC_OPT= +IBMCC_OPT32= -q32 +IBMCC_OPT64= -q64 +IBMCC_OPTXX= $(IBMCC_OPT$(C_ARCH:cc%=%)) + +IBMLD_OPT= +IBMLD_OPT32= -b32 +IBMLD_OPT64= -b64 +IBMLC_OPTXX= $(IBMLD_OPT$(C_ARCH:cc%=%)) + +CPPFLAGS= -DSCHILY_BUILD $(CPPOPTS) $(CPPOPTX) $(OSINCDIRS:%=-I%) $(OSDEFS) $(OSDEFSX) CFLAGS= $(COPTS) $(CWARNOPTS) $(COPTOPT) $(IBMCOPTOPT) $(COPTX) C++FLAGS= $(C++OPTS) $(C++WARNOPTS) $(C++OPTOPT) $(IBMC++OPTOPT) $(C++OPTX) -CPPOPTS= -I$(ARCHDIR) -I$(OINCSDIR) $(INCDIRS:%=-I%) $(INCDIRSX:%=-I%) $(OSDEFS) -COPTS= +CPPOPTS= -I$(ARCHDIR) -I$(OINCSDIR) $(INCDIRS:%=-I%) $(INCDIRSX:%=-I%) +COPTS= $(IBMCC_OPTXX) CWOPTS= COPTOPT= -O COPTDYN= -pic COPTGPROF= -pg -C++OPTS= +C++OPTS= $(IBMCC_OPTXX) C++WOPTS= #C++OPTOPT= -O #C++OPTDYN= -Kpic @@ -39,6 +51,8 @@ LIB_SUFFIX= .a SHL_SUFFIX= .so.1.0 +LIB_C= -lc + LIBS_PATH= -L$(OLIBSDIR) LIBS_PATH_STATIC= -L$(OLIBSDIR_STATIC) @@ -52,26 +66,39 @@ FLOAT_OPTIONS= -CC= @echo " ==> COMPILING \"$@\""; cc -LDCC= @echo " ==> LINKING \"$@\""; cc +__CC_COM= $(_UNIQ)$(CC) +___CC_COM= $(__CC_COM:$(_UNIQ)=$(CC_COM_DEF)) +CC_COM= $(___CC_COM:$(_UNIQ)%=%) + +__CC++_COM= $(_UNIQ)$(CCC) +___CC++_COM= $(__CC++_COM:$(_UNIQ)=$(CC++_COM_DEF)) +CC++_COM= $(___CC++_COM:$(_UNIQ)%=%) + +CC_COM_DEF= cc +CC++_COM_DEF= echo "C++ not yet supported"; exit -1; : +# +# Use to comment out C++ projects +# +C++BUILD= $(NUMBER_SIGN) + +CC= $(CC_COM_DEF) +CCC= $(CC++_COM_DEF) + +CCCC= @echo " ==> COMPILING \"$@\""; $(CC_COM) $(IBMCC_OPTXX) +LDCC= @echo " ==> LINKING \"$@\""; $(CC_COM) $(IBMCC_OPTXX) DYNLD= @echo " ==> LINKING dynamic library \"$@\""; ld RMDEP= : -MKDEP= @echo " ==> MAKING DEPENDENCIES \"$@\""; $(RMDEP); $(SRCROOT)/conf/mkdep-aix.sh +MKDEP= @echo " ==> MAKING DEPENDENCIES \"$@\""; $(RMDEP); $(SRCROOT)/conf/mkdep-aix.sh $(IBMCC_OPTXX) MKDEP_OUT= #$RMDEP= : -#$#MKDEP= @echo " ==> MAKING DEPENDENCIES \"$@\""; $(RMDEP); cc -M +#$#MKDEP= @echo " ==> MAKING DEPENDENCIES \"$@\""; $(RMDEP); $(CC_COM) -M #$MKDEP= @echo " ==> MAKING DEPENDENCIES \"$@\""; $(RMDEP); echo "Cannot do -M with IBM'cc"; : #$MKDEP_OUT= -#CC++ = @echo " ==> COMPILING \"$@\""; CC -#LDCC++ = @echo " ==> LINKING \"$@\""; CC -#DYNLDC++ = @echo " ==> LINKING dynamic library \"$@\""; CC -#MKC++DEP= @echo " ==> MAKING DEPENDENCIES \"$@\""; $(RMDEP); CC -xM -#MKC++DEP_OUT= -CC++ = @echo " ==> COMPILING \"$@\""; echo "C++ not yet supported"; exit -1 -LDCC++ = @echo " ==> LINKING \"$@\""; echo "C++ not yet supported"; exit -1 -DYNLDC++ = @echo " ==> LINKING dynamic library \"$@\""; echo "C++ not yet supported"; exit -1 -MKC++DEP= @echo " ==> MAKING DEPENDENCIES \"$@\""; $(RMDEP); echo "C++ not yet supported"; exit -1 +CC++ = @echo " ==> COMPILING \"$@\""; $(CC++_COM) $(IBMCC_OPTXX) +LDCC++ = @echo " ==> LINKING \"$@\""; $(CC++_COM) $(IBMCC_OPTXX) +DYNLDC++ = @echo " ==> LINKING dynamic library \"$@\""; $(CC++_COM) $(IBMCC_OPTXX) +MKC++DEP= @echo " ==> MAKING DEPENDENCIES \"$@\""; $(RMDEP); $(CC++_COM); # mkdep-aix.sh? MKC++DEP_OUT= diff -Nru cdrtools-2.01.01a33/RULES/cc-msc64.rul cdrtools-3.02a09/RULES/cc-msc64.rul --- cdrtools-2.01.01a33/RULES/cc-msc64.rul 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/RULES/cc-msc64.rul 2009-05-17 15:37:19.000000000 +0000 @@ -0,0 +1,28 @@ +#ident "@(#)cc-msc64.rul 1.18 09/05/17 " +########################################################################### +# Written 2009 by J. Schilling +########################################################################### +# +# Platform dependent MACROS for CYGWIN32_NT using MSVC +# +########################################################################### +# Copyright (c) J. Schilling +########################################################################### +# The contents of this file are subject to the terms of the +# Common Development and Distribution License, Version 1.0 only +# (the "License"). You may not use this file except in compliance +# with the License. +# +# See the file CDDL.Schily.txt in this distribution for details. +# A copy of the CDDL is also available via the Internet at +# http://www.opensource.org/licenses/cddl1.txt +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file CDDL.Schily.txt from this distribution. +########################################################################### + +include $(SRCROOT)/$(RULESDIR)/cc-msc.rul + +MSCOPT64= -machine:X64 + +VC=7_64 diff -Nru cdrtools-2.01.01a33/RULES/cc-msc.rul cdrtools-3.02a09/RULES/cc-msc.rul --- cdrtools-2.01.01a33/RULES/cc-msc.rul 2007-05-29 20:15:01.000000000 +0000 +++ cdrtools-3.02a09/RULES/cc-msc.rul 2017-05-28 21:47:50.000000000 +0000 @@ -1,6 +1,6 @@ -#ident "@(#)cc-msc.rul 1.17 07/05/29 " +#ident "@(#)cc-msc.rul 1.27 17/05/28 " ########################################################################### -# Written 2006 by J. Schilling +# Written 2006-2014 by J. Schilling ########################################################################### # # Platform dependent MACROS for CYGWIN32_NT using MSVC @@ -14,16 +14,18 @@ # with the License. # # See the file CDDL.Schily.txt in this distribution for details. +# A copy of the CDDL is also available via the Internet at +# http://www.opensource.org/licenses/cddl1.txt # # When distributing Covered Code, include this CDDL HEADER in each # file and include the License file CDDL.Schily.txt from this distribution. ########################################################################### -CPPFLAGS= -DSCHILY_BUILD $(CPPOPTS) $(CPPOPTX) +CPPFLAGS= -DSCHILY_BUILD $(CPPOPTS) $(CPPOPTX) $(OSINCDIRS:%=-I%) $(OSDEFS) $(OSDEFSX) CFLAGS= $(COPTS) $(CWARNOPTS) $(COPTOPT) $(MSCOPTOPT) $(COPTX) C++FLAGS= $(C++OPTS) $(C++WARNOPTS) $(C++OPTOPT) $(MSC++OPTOPT) $(C++OPTX) -CPPOPTS= -I$(ARCHDIR) -I$(OINCSDIR) $(INCDIRS:%=-I%) $(INCDIRSX:%=-I%) $(OSDEFS) +CPPOPTS= -I$(ARCHDIR) -I$(OINCSDIR) $(INCDIRS:%=-I%) $(INCDIRSX:%=-I%) COPTS= CWOPTS= -W3 COPTOPT= -O2 @@ -46,30 +48,49 @@ LIB_SUFFIX= .lib SHL_SUFFIX= .dll -LIBS_PATH= -libpath:$(OLIBSDIR) -LIBS_PATH_STATIC= -libpath:$(OLIBSDIR_STATIC) +LIB_C= -lc + +#LIBS_PATH= -libpath:$(OLIBSDIR) +#LIBS_PATH_STATIC= -libpath:$(OLIBSDIR_STATIC) +LIBS_PATH= -L$(OLIBSDIR) +LIBS_PATH_STATIC= -L$(OLIBSDIR_STATIC) + +WIN_LIBS= $(WIN32_LIBS) LDFLAGS= $(LDOPTS) $(LDOPTX) -LDLIBS= $(LIBS:-l%=%.lib) $(LIBX:-l%=%.lib) +LDLIBS= $(LIBS:-l%=%.lib) $(LIBX:-l%=%.lib) $(WIN_LIBS:-l%=%.lib) #LDOPTS= $(LIBS_PATH) $(LDPATH) $(RUNPATH) -LDOPTS= -link $(LIBS_PATH) $(LDPATH) +#LDOPTS= -link $(LIBS_PATH) $(LDPATH) +LDOPTS= -link $(LIBS_PATH:-L%=-libpath:%) $(LDPATH:-L%=-libpath:%) #LDOPTDYN= -shared -Wl,-soname,$(TARGET) LDOPTDYN= -dll -def:$(TARGETLIB).def LNDYNLIB= @ FLOAT_OPTIONS= -CC_COM= cl.exe -CC= @echo " ==> COMPILING \"$@\""; $(CC_COM) -nologo -CC++ = @echo " ==> COMPILING \"$@\""; $(CC_COM) -nologo +__CC_COM= $(_UNIQ)$(CC) +___CC_COM= $(__CC_COM:$(_UNIQ)=$(CC_COM_DEF)) +CC_COM= $(___CC_COM:$(_UNIQ)%=%) + +__CC++_COM= $(_UNIQ)$(CCC) +___CC++_COM= $(__CC++_COM:$(_UNIQ)=$(CC++_COM_DEF)) +CC++_COM= $(___CC++_COM:$(_UNIQ)%=%) + +CC_COM_DEF= cl.exe +CC++_COM_DEF= $(CC_COM_DEF) +CC= $(CC_COM_DEF) +CCC= $(CC++_COM_DEF) + +CCCC= @echo " ==> COMPILING \"$@\""; $(CC_COM) -nologo +CC++ = @echo " ==> COMPILING \"$@\""; $(CC++_COM) -nologo OUTPUT_OPTION= -Fo$(O:%=%/)$@ -CC_OUTPUT_FILTER= | tail +2 # Filter cl.exe filename echo +CC_OUTPUT_FILTER= | tail -n +2 # Filter cl.exe filename echo LD_OUTPUT_OPTION= -Fe$@ LDCC= @echo " ==> LINKING \"$@\""; $(CC_COM) -nologo -LDCC++ = @echo " ==> LINKING \"$@\""; $(CC_COM) -nologo +LDCC++ = @echo " ==> LINKING \"$@\""; $(CC++_COM) -nologo DYNLD= @echo " ==> LINKING dynamic library \"$@\""; $(CC_COM) -nologo -DYNLDC++ = @echo " ==> LINKING dynamic library \"$@\""; $(CC_COM) -nologo +DYNLDC++ = @echo " ==> LINKING dynamic library \"$@\""; $(CC++_COM) -nologo DYNLD.o= $(DYNLD) `$(LORDER) $(POFILES) | $(TSORT)` $(LDFLAGS) -out:$@ $(LDLIBS) RANLIB= @echo " ==> RANDOMIZING ARCHIVE \"$@\""; true @@ -97,3 +118,9 @@ include $(DEFLTSROOT)/$(DEFLTSDIR)/$(VCSETUP) OSDEFS += $(WINNTDEFS) + +# +# Tell MKLINKS to copy files instead of linking them +# +MKLINKS_COPY= true +export MKLINKS_COPY diff -Nru cdrtools-2.01.01a33/RULES/cc-msposix.rul cdrtools-3.02a09/RULES/cc-msposix.rul --- cdrtools-2.01.01a33/RULES/cc-msposix.rul 2007-05-08 10:32:23.000000000 +0000 +++ cdrtools-3.02a09/RULES/cc-msposix.rul 2017-05-28 21:47:50.000000000 +0000 @@ -1,6 +1,6 @@ -#ident "@(#)cc-msposix.rul 1.18 07/05/08 " +#ident "@(#)cc-msposix.rul 1.24 17/05/28 " ########################################################################### -# Written 2006-2007 by J. Schilling +# Written 2006-2013 by J. Schilling ########################################################################### # # Platform dependent MACROS for INTERIX using MSVC in POSIX c89 mode @@ -14,16 +14,18 @@ # with the License. # # See the file CDDL.Schily.txt in this distribution for details. +# A copy of the CDDL is also available via the Internet at +# http://www.opensource.org/licenses/cddl1.txt # # When distributing Covered Code, include this CDDL HEADER in each # file and include the License file CDDL.Schily.txt from this distribution. ########################################################################### -CPPFLAGS= -DSCHILY_BUILD $(CPPOPTS) $(CPPOPTX) +CPPFLAGS= -DSCHILY_BUILD $(CPPOPTS) $(CPPOPTX) $(OSINCDIRS:%=-I%) $(OSDEFS) $(OSDEFSX) CFLAGS= $(COPTS) $(CWARNOPTS) $(COPTOPT) $(MSCOPTOPT) $(COPTX) C++FLAGS= $(C++OPTS) $(C++WARNOPTS) $(C++OPTOPT) $(MSC++OPTOPT) $(C++OPTX) -CPPOPTS= -I$(ARCHDIR) -I$(OINCSDIR) $(INCDIRS:%=-I%) $(INCDIRSX:%=-I%) $(OSDEFS) +CPPOPTS= -I$(ARCHDIR) -I$(OINCSDIR) $(INCDIRS:%=-I%) $(INCDIRSX:%=-I%) COPTS= CWOPTS= COPTOPT= -O2 @@ -46,6 +48,8 @@ LIB_SUFFIX= .lib SHL_SUFFIX= .dll +LIB_C= -lc + LIBS_PATH= -L$(OLIBSDIR) LIBS_PATH_STATIC= -L$(OLIBSDIR_STATIC) @@ -60,8 +64,20 @@ FLOAT_OPTIONS= -CC_COM= cc -CC= @echo " ==> COMPILING \"$@\""; $(CC_COM) +__CC_COM= $(_UNIQ)$(CC) +___CC_COM= $(__CC_COM:$(_UNIQ)=$(CC_COM_DEF)) +CC_COM= $(___CC_COM:$(_UNIQ)%=%) + +__CC++_COM= $(_UNIQ)$(CCC) +___CC++_COM= $(__CC++_COM:$(_UNIQ)=$(CC++_COM_DEF)) +CC++_COM= $(___CC++_COM:$(_UNIQ)%=%) + +CC_COM_DEF= cc +CC++_COM_DEF= $(CC_COM_DEF) +CC= $(CC_COM_DEF) +CCC= $(CC++_COM_DEF) + +CCCC= @echo " ==> COMPILING \"$@\""; $(CC_COM) CC++ = @echo " ==> COMPILING \"$@\""; $(CC_COM) #OUTPUT_OPTION= -Fo$(O:%=%/)$@ #LD_OUTPUT_OPTION= -Fe$@ diff -Nru cdrtools-2.01.01a33/RULES/cc-openvms.rul cdrtools-3.02a09/RULES/cc-openvms.rul --- cdrtools-2.01.01a33/RULES/cc-openvms.rul 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/RULES/cc-openvms.rul 2017-05-28 21:47:50.000000000 +0000 @@ -0,0 +1,92 @@ +#ident "@(#)cc-openvms.rul 1.12 17/05/28 " +########################################################################### +# Written 1998-2017 by J. Schilling +########################################################################### +# +# Platform dependent MACROS for GNV OpenVMS cc +# +########################################################################### +# Copyright (c) J. Schilling +########################################################################### +# The contents of this file are subject to the terms of the +# Common Development and Distribution License, Version 1.0 only +# (the "License"). You may not use this file except in compliance +# with the License. +# +# See the file CDDL.Schily.txt in this distribution for details. +# A copy of the CDDL is also available via the Internet at +# http://www.opensource.org/licenses/cddl1.txt +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file CDDL.Schily.txt from this distribution. +########################################################################### + +CPPFLAGS= -DSCHILY_BUILD $(CPPOPTS) $(CPPOPTX) $(OSINCDIRS:%=-I%) $(OSDEFS) $(OSDEFSX) +CFLAGS= $(COPTS) $(CWARNOPTS) $(COPTOPT) $(DECCOPTOPT) $(COPTX) +C++FLAGS= $(C++OPTS) $(C++WARNOPTS) $(C++OPTOPT) $(DECC++OPTOPT) $(C++OPTX) + +CPPOPTS= -I$(ARCHDIR) -I$(OINCSDIR) $(INCDIRS:%=-I%) $(INCDIRSX:%=-I%) +COPTS= +CWOPTS= -verbose +COPTOPT= -O +COPTDYN= -fpic +COPTGPROF= -pg +C++OPTS= +C++WOPTS= +#C++OPTOPT= -O +#C++OPTDYN= -Kpic +#C++OPTGPROF= -xpg + +LIB_PREFIX= +LIB_SUFFIX= .olb +SHL_SUFFIX= .so.1.0 + +LIB_C= -lc + +LIBS_PATH= -L$(OLIBSDIR) -L/usr/ccs/lib +LIBS_PATH_STATIC= -L$(OLIBSDIR_STATIC) + +LDFLAGS= $(LDOPTS) $(LDOPTX) +LDLIBS= $(LIBS) $(LIBX) + +#LDOPTS= $(LIBS_PATH) $(LDPATH) $(RUNPATH) +LDOPTS= $(LIBS_PATH) $(LDPATH) +LDOPTDYN= -shared -Wl,-soname,$(TARGET) +LNDYNLIB= @$(RM) $(RM_FORCE) $(PTARGET_BASE).so; $(SYMLINK) $(TARGET) $(PTARGET_BASE).so + +FLOAT_OPTIONS= + +__CC_COM= $(_UNIQ)$(CC) +___CC_COM= $(__CC_COM:$(_UNIQ)=$(CC_COM_DEF)) +CC_COM= $(___CC_COM:$(_UNIQ)%=%) + +__CC++_COM= $(_UNIQ)$(CCC) +___CC++_COM= $(__CC++_COM:$(_UNIQ)=$(CC++_COM_DEF)) +CC++_COM= $(___CC++_COM:$(_UNIQ)%=%) + +CC_COM_DEF= cc +CC++_COM_DEF= echo "C++ not yet supported"; exit -1; : +# +# Use to comment out C++ projects +# +C++BUILD= $(NUMBER_SIGN) + +CC= $(CC_COM_DEF) +CCC= $(CC++_COM_DEF) + +CCCC= @echo " ==> COMPILING \"$@\""; $(CC_COM) +LDCC= @echo " ==> LINKING \"$@\""; $(CC_COM) +DYNLD= @echo " ==> LINKING dynamic library \"$@\""; $(CC_COM) + +RMDEP= : +# cc -M t.c creates a file t.mms wich t.obj : /EISNER$DRA3/decuserve_user/schilling/t.c lines +#MKDEP= @echo " ==> MAKING DEPENDENCIES \"$@\""; $(RMDEP); $(CC_COM) -M +MKDEP= @echo " ==> MAKING DEPENDENCIES \"$@\""; $(RMDEP); echo "Cannot yet do -M with OpenVMS cc"; : +MKDEP_OUT= + +CC++ = @echo " ==> COMPILING \"$@\""; $(CC++_COM) +LDCC++ = @echo " ==> LINKING \"$@\""; $(CC++_COM) +DYNLDC++ = @echo " ==> LINKING dynamic library \"$@\""; $(CC++_COM) +#MKC++DEP= @echo " ==> MAKING DEPENDENCIES \"$@\""; $(RMDEP); $(CC++_COM) -M +MKC++DEP= @echo " ==> MAKING DEPENDENCIES \"$@\""; $(RMDEP); $(CC++_COM); echo "Cannot yet do -M with OpenVMS CC"; : +MKC++DEP_OUT= diff -Nru cdrtools-2.01.01a33/RULES/cc-pcc.rul cdrtools-3.02a09/RULES/cc-pcc.rul --- cdrtools-2.01.01a33/RULES/cc-pcc.rul 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/RULES/cc-pcc.rul 2017-05-28 21:47:50.000000000 +0000 @@ -0,0 +1,85 @@ +#ident "@(#)cc-pcc.rul 1.8 17/05/28 " +########################################################################### +# Written 2010-2013 by J. Schilling +########################################################################### +# +# Platform independent MACROS for PCC +# +########################################################################### +# Copyright (c) J. Schilling +########################################################################### +# The contents of this file are subject to the terms of the +# Common Development and Distribution License, Version 1.0 only +# (the "License"). You may not use this file except in compliance +# with the License. +# +# See the file CDDL.Schily.txt in this distribution for details. +# A copy of the CDDL is also available via the Internet at +# http://www.opensource.org/licenses/cddl1.txt +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file CDDL.Schily.txt from this distribution. +########################################################################### + +CPPFLAGS= -DSCHILY_BUILD $(CPPOPTS) $(CPPOPTX) $(OSINCDIRS:%=-I%) $(OSDEFS) $(OSDEFSX) +CFLAGS= $(COPTS) $(CWARNOPTS) $(COPTOPT) $(GCCOPTOPT) $(COPTX) +C++FLAGS= $(C++OPTS) $(C++WARNOPTS) $(C++OPTOPT) $(G++OPTOPT) $(C++OPTX) + +CPPOPTS= -I$(ARCHDIR) -I$(OINCSDIR) $(INCDIRS:%=-I%) $(INCDIRSX:%=-I%) +COPTS= +# -Wtraditional now causes more pain than it helps +#*CWOPTS= -Wall -Wtraditional +#*CWOPTS= -Wall -Wno-unknown-pragmas \ +#* -Wshadow -Wmissing-prototypes -Wstrict-prototypes +COPTOPT= -O +COPTDYN= -fpic +COPTGPROF= -pg +C++OPTS= +C++WOPTS= $(CWOPTS) +C++OPTOPT= $(COPTOPT) +C++OPTDYN= -fpic +C++OPTGPROF= -pg + +LIB_PREFIX= lib +LIB_SUFFIX= .a +SHL_SUFFIX= .so.1 + +LIB_C= -lc + +LIBS_PATH= -L$(OLIBSDIR) +LIBS_PATH_STATIC= -L$(OLIBSDIR_STATIC) + +LDFLAGS= $(LDOPTS) $(LDOPTX) +LDLIBS= $(LIBS) $(LIBX) + +LDOPTS= $(LIBS_PATH) $(LDPATH) $(RUNPATH:-R%=-Wl,-R%) +LDOPTDYN= -shared -Wl,-soname,$(TARGET) +LNDYNLIB= @$(RM) $(RM_FORCE) $(PTARGET_BASE).so; $(SYMLINK) $(TARGET) $(PTARGET_BASE).so + +FLOAT_OPTIONS= + +__CC_COM= $(_UNIQ)$(CC) +___CC_COM= $(__CC_COM:$(_UNIQ)=$(CC_COM_DEF)) +CC_COM= $(___CC_COM:$(_UNIQ)%=%) + +__CC++_COM= $(_UNIQ)$(CCC) +___CC++_COM= $(__CC++_COM:$(_UNIQ)=$(CC++_COM_DEF)) +CC++_COM= $(___CC++_COM:$(_UNIQ)%=%) + +CC_COM_DEF= pcc +CC++_COM_DEF= p++ +CC= $(CC_COM_DEF) +CCC= $(CC++_COM_DEF) + +CCCC= @echo " ==> COMPILING \"$@\""; $(CC_COM) +CC++ = @echo " ==> COMPILING \"$@\""; $(CC++_COM) +LDCC= @echo " ==> LINKING \"$@\""; $(CC_COM) +LDCC++ = @echo " ==> LINKING \"$@\""; $(CC++_COM) +DYNLD= @echo " ==> LINKING dynamic library \"$@\""; $(CC_COM) +DYNLDC++ = @echo " ==> LINKING dynamic library \"$@\""; $(CC++_COM) + +RMDEP= : +MKDEP= @echo " ==> MAKING DEPENDENCIES \"$@\""; $(RMDEP); $(CC_COM) -M +MKDEP_OUT= +MKC++DEP= @echo " ==> MAKING DEPENDENCIES \"$@\""; $(RMDEP); $(CC++_COM) -M +MKC++DEP_OUT= diff -Nru cdrtools-2.01.01a33/RULES/cc-sco_os.rul cdrtools-3.02a09/RULES/cc-sco_os.rul --- cdrtools-2.01.01a33/RULES/cc-sco_os.rul 2007-05-08 10:32:23.000000000 +0000 +++ cdrtools-3.02a09/RULES/cc-sco_os.rul 2017-05-28 21:47:50.000000000 +0000 @@ -1,6 +1,6 @@ -#ident "@(#)cc-sco_os.rul 1.8 07/05/08 " +#ident "@(#)cc-sco_os.rul 1.19 17/05/28 " ########################################################################### -# Written 1999 by J. Schilling/Santa Cruz Operation +# Written 1999-2017 by J. Schilling/Santa Cruz Operation ########################################################################### # # Platform dependent MACROS for SCO OpenServer 5 cc @@ -14,16 +14,18 @@ # with the License. # # See the file CDDL.Schily.txt in this distribution for details. +# A copy of the CDDL is also available via the Internet at +# http://www.opensource.org/licenses/cddl1.txt # # When distributing Covered Code, include this CDDL HEADER in each # file and include the License file CDDL.Schily.txt from this distribution. ########################################################################### -CPPFLAGS= -DSCHILY_BUILD $(CPPOPTS) $(CPPOPTX) +CPPFLAGS= -DSCHILY_BUILD $(CPPOPTS) $(CPPOPTX) $(OSINCDIRS:%=-I%) $(OSDEFS) $(OSDEFSX) CFLAGS= $(COPTS) $(CWARNOPTS) $(COPTOPT) $(SCO_OSCOPTOPT) $(COPTX) C++FLAGS= $(C++OPTS) $(C++WARNOPTS) $(C++OPTOPT) $(SCO_OSC++OPTOPT) $(C++OPTX) -CPPOPTS= -I$(ARCHDIR) -I$(OINCSDIR) $(INCDIRS:%=-I%) $(INCDIRSX:%=-I%) $(OSDEFS) +CPPOPTS= -I$(ARCHDIR) -I$(OINCSDIR) $(INCDIRS:%=-I%) $(INCDIRSX:%=-I%) COPTS= -belf CWOPTS= -w3 COPTOPT= -O @@ -39,6 +41,8 @@ LIB_SUFFIX= .a SHL_SUFFIX= .so.1.0 +LIB_C= -lc + LIBS_PATH= -L$(OLIBSDIR) LIBS_PATH_STATIC= -L$(OLIBSDIR_STATIC) @@ -51,23 +55,38 @@ FLOAT_OPTIONS= -CC= @echo " ==> COMPILING \"$@\""; cc -LDCC= @echo " ==> LINKING \"$@\""; cc -DYNLD= @echo " ==> LINKING dynamic library \"$@\""; cc +__CC_COM= $(_UNIQ)$(CC) +___CC_COM= $(__CC_COM:$(_UNIQ)=$(CC_COM_DEF)) +CC_COM= $(___CC_COM:$(_UNIQ)%=%) + +__CC++_COM= $(_UNIQ)$(CCC) +___CC++_COM= $(__CC++_COM:$(_UNIQ)=$(CC++_COM_DEF)) +CC++_COM= $(___CC++_COM:$(_UNIQ)%=%) + +CC_COM_DEF= cc +CC++_COM_DEF= echo "C++ not yet supported"; exit -1; : +# +# Use to comment out C++ projects +# +C++BUILD= $(NUMBER_SIGN) + +CC= $(CC_COM_DEF) +CCC= $(CC++_COM_DEF) + +CCCC= @echo " ==> COMPILING \"$@\""; $(CC_COM) +LDCC= @echo " ==> LINKING \"$@\""; $(CC_COM) +DYNLD= @echo " ==> LINKING dynamic library \"$@\""; $(CC_COM) RANLIB= @echo " ==> RANDOMIZING ARCHIVE \"$@\""; true RMDEP= : MKDEP= @echo " ==> MAKING DEPENDENCIES \"$@\""; $(RMDEP); sh $(SRCROOT)/conf/mkdep-sco.sh MKDEP_OUT= +_MKDIR= $(_MKDIR_SH) MKDIR= $(MKDIR_SH) +INSMKDIR= $(INSMKDIR_SH) -#CC++ = @echo " ==> COMPILING \"$@\""; CC -#LDCC++ = @echo " ==> LINKING \"$@\""; CC -#DYNLDC++ = @echo " ==> LINKING dynamic library \"$@\""; CC -#MKC++DEP= @echo " ==> MAKING DEPENDENCIES \"$@\""; $(RMDEP); CC -xM -#MKC++DEP_OUT= -CC++ = @echo " ==> COMPILING \"$@\""; echo "C++ not yet supported"; exit -1 -LDCC++ = @echo " ==> LINKING \"$@\""; echo "C++ not yet supported"; exit -1 -DYNLDC++ = @echo " ==> LINKING dynamic library \"$@\""; echo "C++ not yet supported"; exit -1 -MKC++DEP= @echo " ==> MAKING DEPENDENCIES \"$@\""; $(RMDEP); echo "C++ not yet supported"; exit -1 +CC++ = @echo " ==> COMPILING \"$@\""; $(CC++_COM) +LDCC++ = @echo " ==> LINKING \"$@\""; $(CC++_COM) +DYNLDC++ = @echo " ==> LINKING dynamic library \"$@\""; $(CC++_COM) +MKC++DEP= @echo " ==> MAKING DEPENDENCIES \"$@\""; $(RMDEP); $(CC++_COM) # mkdep-sco.sh? MKC++DEP_OUT= diff -Nru cdrtools-2.01.01a33/RULES/cc-sco_uw.rul cdrtools-3.02a09/RULES/cc-sco_uw.rul --- cdrtools-2.01.01a33/RULES/cc-sco_uw.rul 2007-05-08 10:32:23.000000000 +0000 +++ cdrtools-3.02a09/RULES/cc-sco_uw.rul 2017-05-28 21:47:50.000000000 +0000 @@ -1,6 +1,6 @@ -#ident "@(#)cc-sco_uw.rul 1.7 07/05/08 " +#ident "@(#)cc-sco_uw.rul 1.16 17/05/28 " ########################################################################### -# Written 1999 by J. Schilling/Santa Cruz Operation +# Written 1999-2017 by J. Schilling/Santa Cruz Operation ########################################################################### # # Platform dependent MACROS for SCO UnixWare 2.x / 7.x cc @@ -14,16 +14,18 @@ # with the License. # # See the file CDDL.Schily.txt in this distribution for details. +# A copy of the CDDL is also available via the Internet at +# http://www.opensource.org/licenses/cddl1.txt # # When distributing Covered Code, include this CDDL HEADER in each # file and include the License file CDDL.Schily.txt from this distribution. ########################################################################### -CPPFLAGS= -DSCHILY_BUILD $(CPPOPTS) $(CPPOPTX) +CPPFLAGS= -DSCHILY_BUILD $(CPPOPTS) $(CPPOPTX) $(OSINCDIRS:%=-I%) $(OSDEFS) $(OSDEFSX) CFLAGS= $(COPTS) $(CWARNOPTS) $(COPTOPT) $(SCO_UWCOPTOPT) $(COPTX) C++FLAGS= $(C++OPTS) $(C++WARNOPTS) $(C++OPTOPT) $(SCO_UWC++OPTOPT) $(C++OPTX) -CPPOPTS= -I$(ARCHDIR) -I$(OINCSDIR) $(INCDIRS:%=-I%) $(INCDIRSX:%=-I%) $(OSDEFS) +CPPOPTS= -I$(ARCHDIR) -I$(OINCSDIR) $(INCDIRS:%=-I%) $(INCDIRSX:%=-I%) COPTS= CWOPTS= -v COPTOPT= -O @@ -40,6 +42,8 @@ LIB_SUFFIX= .a SHL_SUFFIX= .so.1.0 +LIB_C= -lc + LIBS_PATH= -L$(OLIBSDIR) LIBS_PATH_STATIC= -L$(OLIBSDIR_STATIC) @@ -52,23 +56,35 @@ FLOAT_OPTIONS= +__CC_COM= $(_UNIQ)$(CC) +___CC_COM= $(__CC_COM:$(_UNIQ)=$(CC_COM_DEF)) +CC_COM= $(___CC_COM:$(_UNIQ)%=%) + +__CC++_COM= $(_UNIQ)$(CCC) +___CC++_COM= $(__CC++_COM:$(_UNIQ)=$(CC++_COM_DEF)) +CC++_COM= $(___CC++_COM:$(_UNIQ)%=%) + +CC_COM_DEF= cc +CC++_COM_DEF= echo "C++ not yet supported"; exit -1; : +# +# Use to comment out C++ projects +# +C++BUILD= $(NUMBER_SIGN) + +CC= $(CC_COM_DEF) +CCC= $(CC++_COM_DEF) -CC= @echo " ==> COMPILING \"$@\""; cc -LDCC= @echo " ==> LINKING \"$@\""; cc -DYNLD= @echo " ==> LINKING dynamic library \"$@\""; cc +CCCC= @echo " ==> COMPILING \"$@\""; $(CC_COM) +LDCC= @echo " ==> LINKING \"$@\""; $(CC_COM) +DYNLD= @echo " ==> LINKING dynamic library \"$@\""; $(CC_COM) RANLIB= @echo " ==> RANDOMIZING ARCHIVE \"$@\""; true RMDEP= : MKDEP= @echo " ==> MAKING DEPENDENCIES \"$@\""; $(RMDEP); sh $(SRCROOT)/conf/mkdep-sco.sh MKDEP_OUT= -#CC++ = @echo " ==> COMPILING \"$@\""; CC -#LDCC++ = @echo " ==> LINKING \"$@\""; CC -#DYNLDC++ = @echo " ==> LINKING dynamic library \"$@\""; CC -#MKC++DEP= @echo " ==> MAKING DEPENDENCIES \"$@\""; $(RMDEP); CC -xM -#MKC++DEP_OUT= -CC++ = @echo " ==> COMPILING \"$@\""; echo "C++ not yet supported"; exit -1 -LDCC++ = @echo " ==> LINKING \"$@\""; echo "C++ not yet supported"; exit -1 -DYNLDC++ = @echo " ==> LINKING dynamic library \"$@\""; echo "C++ not yet supported"; exit -1 -MKC++DEP= @echo " ==> MAKING DEPENDENCIES \"$@\""; $(RMDEP); echo "C++ not yet supported"; exit -1 +CC++ = @echo " ==> COMPILING \"$@\""; $(CC++_COM) +LDCC++ = @echo " ==> LINKING \"$@\""; $(CC++_COM) +DYNLDC++ = @echo " ==> LINKING dynamic library \"$@\""; $(CC++_COM) +MKC++DEP= @echo " ==> MAKING DEPENDENCIES \"$@\""; $(RMDEP); $(CC++_COM) # mkdep-sco.sh? MKC++DEP_OUT= diff -Nru cdrtools-2.01.01a33/RULES/cc-sgi64.rul cdrtools-3.02a09/RULES/cc-sgi64.rul --- cdrtools-2.01.01a33/RULES/cc-sgi64.rul 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/RULES/cc-sgi64.rul 2017-05-28 21:47:50.000000000 +0000 @@ -0,0 +1,85 @@ +#ident "@(#)cc-sgi64.rul 1.14 17/05/28 " +########################################################################### +# Written 1996-2013 by J. Schilling +########################################################################### +# +# Platform dependent MACROS for Silicon Graphics cc +# +########################################################################### +# Copyright (c) J. Schilling +########################################################################### +# The contents of this file are subject to the terms of the +# Common Development and Distribution License, Version 1.0 only +# (the "License"). You may not use this file except in compliance +# with the License. +# +# See the file CDDL.Schily.txt in this distribution for details. +# A copy of the CDDL is also available via the Internet at +# http://www.opensource.org/licenses/cddl1.txt +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file CDDL.Schily.txt from this distribution. +########################################################################### + +CPPFLAGS= -DSCHILY_BUILD $(CPPOPTS) $(CPPOPTX) $(OSINCDIRS:%=-I%) $(OSDEFS) $(OSDEFSX) +CFLAGS= $(COPTS) $(CWARNOPTS) $(COPTOPT) $(SGICOPTOPT) $(COPTX) +C++FLAGS= $(C++OPTS) $(C++WARNOPTS) $(C++OPTOPT) $(SGIC++OPTOPT) $(C++OPTX) + +CPPOPTS= -I$(ARCHDIR) -I$(OINCSDIR) $(INCDIRS:%=-I%) $(INCDIRSX:%=-I%) +COPTS= -64 +CWOPTS= -fullwarn +COPTOPT= -O +COPTDYN= -Kpic +COPTGPROF= -p1 +C++OPTS= -64 +C++WOPTS= +#C++OPTOPT= -O +#C++OPTDYN= -Kpic +#C++OPTGPROF= -xpg + +LIB_PREFIX= lib +LIB_SUFFIX= .a +SHL_SUFFIX= .so.1 + +LIB_C= -lc + +LIBS_PATH= -L$(OLIBSDIR) +LIBS_PATH_STATIC= -L$(OLIBSDIR_STATIC) + +LDFLAGS= $(LDOPTS) $(LDOPTX) +LDLIBS= $(LIBS) $(LIBX) + +#LDOPTS= $(LIBS_PATH) $(LDPATH) $(RUNPATH) +LDOPTS= $(LIBS_PATH) $(LDPATH) $(LARGEFILE_OPT) +#LDOPTDYN= -dy -G -ztext -h $(TARGET) -ldl +LNDYNLIB= @ + +FLOAT_OPTIONS= + +__CC_COM= $(_UNIQ)$(CC) +___CC_COM= $(__CC_COM:$(_UNIQ)=$(CC_COM_DEF)) +CC_COM= $(___CC_COM:$(_UNIQ)%=%) + +__CC++_COM= $(_UNIQ)$(CCC) +___CC++_COM= $(__CC++_COM:$(_UNIQ)=$(CC++_COM_DEF)) +CC++_COM= $(___CC++_COM:$(_UNIQ)%=%) + +CC_COM_DEF= cc +CC++_COM_DEF= CC +CC= $(CC_COM_DEF) +CCC= $(CC++_COM_DEF) + +CCCC= @echo " ==> COMPILING \"$@\""; $(CC_COM) -64 +LDCC= @echo " ==> LINKING \"$@\""; $(CC_COM) -64 +DYNLD= @echo " ==> LINKING dynamic library \"$@\""; $(CC_COM) -64 +RANLIB= @echo " ==> RANDOMIZING ARCHIVE \"$@\""; true + +RMDEP= : +MKDEP= @echo " ==> MAKING DEPENDENCIES \"$@\""; $(RMDEP); $(CC_COM) -64 -M +MKDEP_OUT= + +CC++ = @echo " ==> COMPILING \"$@\""; $(CC++_COM) -64 +LDCC++ = @echo " ==> LINKING \"$@\""; $(CC++_COM) -64 +DYNLDC++ = @echo " ==> LINKING dynamic library \"$@\""; $(CC++_COM) -64 +MKC++DEP= @echo " ==> MAKING DEPENDENCIES \"$@\""; $(RMDEP); $(CC++_COM) -64 -M +MKC++DEP_OUT= diff -Nru cdrtools-2.01.01a33/RULES/cc-sgi.rul cdrtools-3.02a09/RULES/cc-sgi.rul --- cdrtools-2.01.01a33/RULES/cc-sgi.rul 2007-05-08 10:32:23.000000000 +0000 +++ cdrtools-3.02a09/RULES/cc-sgi.rul 2017-05-28 21:47:50.000000000 +0000 @@ -1,6 +1,6 @@ -#ident "@(#)cc-sgi.rul 1.6 07/05/08 " +#ident "@(#)cc-sgi.rul 1.14 17/05/28 " ########################################################################### -# Written 1996-2006 by J. Schilling +# Written 1996-2013 by J. Schilling ########################################################################### # # Platform dependent MACROS for Silicon Graphics cc @@ -14,16 +14,18 @@ # with the License. # # See the file CDDL.Schily.txt in this distribution for details. +# A copy of the CDDL is also available via the Internet at +# http://www.opensource.org/licenses/cddl1.txt # # When distributing Covered Code, include this CDDL HEADER in each # file and include the License file CDDL.Schily.txt from this distribution. ########################################################################### -CPPFLAGS= -DSCHILY_BUILD $(CPPOPTS) $(CPPOPTX) +CPPFLAGS= -DSCHILY_BUILD $(CPPOPTS) $(CPPOPTX) $(OSINCDIRS:%=-I%) $(OSDEFS) $(OSDEFSX) CFLAGS= $(COPTS) $(CWARNOPTS) $(COPTOPT) $(SGICOPTOPT) $(COPTX) C++FLAGS= $(C++OPTS) $(C++WARNOPTS) $(C++OPTOPT) $(SGIC++OPTOPT) $(C++OPTX) -CPPOPTS= -I$(ARCHDIR) -I$(OINCSDIR) $(INCDIRS:%=-I%) $(INCDIRSX:%=-I%) $(OSDEFS) +CPPOPTS= -I$(ARCHDIR) -I$(OINCSDIR) $(INCDIRS:%=-I%) $(INCDIRSX:%=-I%) COPTS= CWOPTS= -fullwarn COPTOPT= -O @@ -39,6 +41,8 @@ LIB_SUFFIX= .a SHL_SUFFIX= .so.1 +LIB_C= -lc + LIBS_PATH= -L$(OLIBSDIR) LIBS_PATH_STATIC= -L$(OLIBSDIR_STATIC) @@ -52,22 +56,30 @@ FLOAT_OPTIONS= -CC= @echo " ==> COMPILING \"$@\""; cc -LDCC= @echo " ==> LINKING \"$@\""; cc -DYNLD= @echo " ==> LINKING dynamic library \"$@\""; cc +__CC_COM= $(_UNIQ)$(CC) +___CC_COM= $(__CC_COM:$(_UNIQ)=$(CC_COM_DEF)) +CC_COM= $(___CC_COM:$(_UNIQ)%=%) + +__CC++_COM= $(_UNIQ)$(CCC) +___CC++_COM= $(__CC++_COM:$(_UNIQ)=$(CC++_COM_DEF)) +CC++_COM= $(___CC++_COM:$(_UNIQ)%=%) + +CC_COM_DEF= cc +CC++_COM_DEF= CC +CC= $(CC_COM_DEF) +CCC= $(CC++_COM_DEF) + +CCCC= @echo " ==> COMPILING \"$@\""; $(CC_COM) +LDCC= @echo " ==> LINKING \"$@\""; $(CC_COM) +DYNLD= @echo " ==> LINKING dynamic library \"$@\""; $(CC_COM) RANLIB= @echo " ==> RANDOMIZING ARCHIVE \"$@\""; true RMDEP= : -MKDEP= @echo " ==> MAKING DEPENDENCIES \"$@\""; $(RMDEP); cc -M +MKDEP= @echo " ==> MAKING DEPENDENCIES \"$@\""; $(RMDEP); $(CC_COM) -M MKDEP_OUT= -#CC++ = @echo " ==> COMPILING \"$@\""; CC -#LDCC++ = @echo " ==> LINKING \"$@\""; CC -#DYNLDC++ = @echo " ==> LINKING dynamic library \"$@\""; CC -#MKC++DEP= @echo " ==> MAKING DEPENDENCIES \"$@\""; $(RMDEP); CC -xM -#MKC++DEP_OUT= -CC++ = @echo " ==> COMPILING \"$@\""; echo "C++ not yet supported"; exit -1 -LDCC++ = @echo " ==> LINKING \"$@\""; echo "C++ not yet supported"; exit -1 -DYNLDC++ = @echo " ==> LINKING dynamic library \"$@\""; echo "C++ not yet supported"; exit -1 -MKC++DEP= @echo " ==> MAKING DEPENDENCIES \"$@\""; $(RMDEP); echo "C++ not yet supported"; exit -1 +CC++ = @echo " ==> COMPILING \"$@\""; $(CC++_COM) +LDCC++ = @echo " ==> LINKING \"$@\""; $(CC++_COM) +DYNLDC++ = @echo " ==> LINKING dynamic library \"$@\""; $(CC++_COM) +MKC++DEP= @echo " ==> MAKING DEPENDENCIES \"$@\""; $(RMDEP); $(CC++_COM) -M MKC++DEP_OUT= diff -Nru cdrtools-2.01.01a33/RULES/cc-sony.rul cdrtools-3.02a09/RULES/cc-sony.rul --- cdrtools-2.01.01a33/RULES/cc-sony.rul 2007-05-08 10:32:23.000000000 +0000 +++ cdrtools-3.02a09/RULES/cc-sony.rul 2017-05-28 21:47:50.000000000 +0000 @@ -1,5 +1,6 @@ -#ident @(#)cc-sony.rul 1.6 07/05/08 -# Written 1996-2006 by J. Schilling +#ident @(#)cc-sony.rul 1.15 17/05/28 +########################################################################### +# Written 1996-2017 by J. Schilling ########################################################################### # # Platform dependent MACROS for Sony cc @@ -13,16 +14,18 @@ # with the License. # # See the file CDDL.Schily.txt in this distribution for details. +# A copy of the CDDL is also available via the Internet at +# http://www.opensource.org/licenses/cddl1.txt # # When distributing Covered Code, include this CDDL HEADER in each # file and include the License file CDDL.Schily.txt from this distribution. ########################################################################### -CPPFLAGS= -DSCHILY_BUILD $(CPPOPTS) $(CPPOPTX) +CPPFLAGS= -DSCHILY_BUILD $(CPPOPTS) $(CPPOPTX) $(OSINCDIRS:%=-I%) $(OSDEFS) $(OSDEFSX) CFLAGS= $(COPTS) $(CWARNOPTS) $(COPTOPT) $(SONYCOPTOPT) $(COPTX) C++FLAGS= $(C++OPTS) $(C++WARNOPTS) $(C++OPTOPT) $(SONYC++OPTOPT) $(C++OPTX) -CPPOPTS= -I$(ARCHDIR) -I$(OINCSDIR) $(INCDIRS:%=-I%) $(INCDIRSX:%=-I%) $(OSDEFS) +CPPOPTS= -I$(ARCHDIR) -I$(OINCSDIR) $(INCDIRS:%=-I%) $(INCDIRSX:%=-I%) COPTS= CWOPTS= -fullwarn COPTOPT= -O @@ -38,6 +41,8 @@ LIB_SUFFIX= .a SHL_SUFFIX= .so.1 +LIB_C= -lc + LIBS_PATH= -L$(OLIBSDIR) LIBS_PATH_STATIC= -L$(OLIBSDIR_STATIC) @@ -51,22 +56,35 @@ FLOAT_OPTIONS= -CC= @echo " ==> COMPILING \"$@\""; cc -LDCC= @echo " ==> LINKING \"$@\""; cc -DYNLD= @echo " ==> LINKING dynamic library \"$@\""; cc +__CC_COM= $(_UNIQ)$(CC) +___CC_COM= $(__CC_COM:$(_UNIQ)=$(CC_COM_DEF)) +CC_COM= $(___CC_COM:$(_UNIQ)%=%) + +__CC++_COM= $(_UNIQ)$(CCC) +___CC++_COM= $(__CC++_COM:$(_UNIQ)=$(CC++_COM_DEF)) +CC++_COM= $(___CC++_COM:$(_UNIQ)%=%) + +CC_COM_DEF= cc +CC++_COM_DEF= echo "C++ not yet supported"; exit -1; : +# +# Use to comment out C++ projects +# +C++BUILD= $(NUMBER_SIGN) + +CC= $(CC_COM_DEF) +CCC= $(CC++_COM_DEF) + +CCCC= @echo " ==> COMPILING \"$@\""; $(CC_COM) +LDCC= @echo " ==> LINKING \"$@\""; $(CC_COM) +DYNLD= @echo " ==> LINKING dynamic library \"$@\""; $(CC_COM) RANLIB= @echo " ==> RANDOMIZING ARCHIVE \"$@\""; true RMDEP= : -MKDEP= @echo " ==> MAKING DEPENDENCIES \"$@\""; $(RMDEP); cc -M +MKDEP= @echo " ==> MAKING DEPENDENCIES \"$@\""; $(RMDEP); $(CC_COM) -M MKDEP_OUT= -#CC++ = @echo " ==> COMPILING \"$@\""; CC -#LDCC++ = @echo " ==> LINKING \"$@\""; CC -#DYNLDC++ = @echo " ==> LINKING dynamic library \"$@\""; CC -#MKC++DEP= @echo " ==> MAKING DEPENDENCIES \"$@\""; $(RMDEP); CC -xM -#MKC++DEP_OUT= -CC++ = @echo " ==> COMPILING \"$@\""; echo "C++ not yet supported"; exit -1 -LDCC++ = @echo " ==> LINKING \"$@\""; echo "C++ not yet supported"; exit -1 -DYNLDC++ = @echo " ==> LINKING dynamic library \"$@\""; echo "C++ not yet supported"; exit -1 -MKC++DEP= @echo " ==> MAKING DEPENDENCIES \"$@\""; $(RMDEP); echo "C++ not yet supported"; exit -1 +CC++ = @echo " ==> COMPILING \"$@\""; $(CC++_COM) +LDCC++ = @echo " ==> LINKING \"$@\""; $(CC++_COM) +DYNLDC++ = @echo " ==> LINKING dynamic library \"$@\""; $(CC++_COM) +MKC++DEP= @echo " ==> MAKING DEPENDENCIES \"$@\""; $(RMDEP); $(CC++_COM) -M MKC++DEP_OUT= diff -Nru cdrtools-2.01.01a33/RULES/cc-sunpro64.rul cdrtools-3.02a09/RULES/cc-sunpro64.rul --- cdrtools-2.01.01a33/RULES/cc-sunpro64.rul 2007-06-13 22:20:07.000000000 +0000 +++ cdrtools-3.02a09/RULES/cc-sunpro64.rul 1970-01-01 00:00:00.000000000 +0000 @@ -1,68 +0,0 @@ -#ident "@(#)cc-sunpro64.rul 1.9 07/06/14 " -########################################################################### -# Written 1996-2006 by J. Schilling -########################################################################### -# -# Platform dependent MACROS for SunPro (Studio) cc -# -########################################################################### -# Copyright (c) J. Schilling -########################################################################### -# The contents of this file are subject to the terms of the -# Common Development and Distribution License, Version 1.0 only -# (the "License"). You may not use this file except in compliance -# with the License. -# -# See the file CDDL.Schily.txt in this distribution for details. -# -# When distributing Covered Code, include this CDDL HEADER in each -# file and include the License file CDDL.Schily.txt from this distribution. -########################################################################### - -CPPFLAGS= -DSCHILY_BUILD $(CPPOPTS) $(CPPOPTX) -CFLAGS= $(COPTS) $(CWARNOPTS) $(COPTOPT) $(SUNPROCOPTOPT) $(COPTX) -C++FLAGS= $(C++OPTS) $(C++WARNOPTS) $(C++OPTOPT) $(SUNPROC++OPTOPT) $(C++OPTX) - -LINTFLAGS= -Nlevel=4 - -CPPOPTS= -I$(ARCHDIR) -I$(OINCSDIR) $(INCDIRS:%=-I%) $(INCDIRSX:%=-I%) $(OSDEFS) -COPTS= -Xa -xarch=generic64 -CWOPTS= -v -COPTOPT= -O -COPTDYN= -Kpic -COPTGPROF= -xpg -C++OPTS= -xarch=generic64 -C++WOPTS= -C++OPTOPT= -O -C++OPTDYN= -Kpic -C++OPTGPROF= -xpg - -LIB_PREFIX= lib -LIB_SUFFIX= .a -SHL_SUFFIX= .so.1 - -LIBS_PATH= -L$(OLIBSDIR) -LIBS_PATH_STATIC= -L$(OLIBSDIR_STATIC) - -LDFLAGS= $(LDOPTS) $(LDOPTX) -LDLIBS= $(LIBS) $(LIBX) - -LDOPTS= $(LIBS_PATH) $(LDPATH) $(RUNPATH) -LDOPTDYN= -dy -G -ztext -h $(TARGET) -Mlib$(TARGETLIB)-mapvers -ldl -LNDYNLIB= @$(RM) $(RM_FORCE) $(PTARGET_BASE).so; $(SYMLINK) $(TARGET) $(PTARGET_BASE).so - -FLOAT_OPTIONS= - -CC_COM= cc -CC= @echo " ==> COMPILING \"$@\""; $(CC_COM) -xarch=generic64 -CC++ = @echo " ==> COMPILING \"$@\""; CC -xarch=generic64 -LDCC= @echo " ==> LINKING \"$@\""; $(CC_COM) -xarch=generic64 -LDCC++ = @echo " ==> LINKING \"$@\""; CC -xarch=generic64 -DYNLD= @echo " ==> LINKING dynamic library \"$@\""; $(CC_COM) -xarch=generic64 -DYNLDC++ = @echo " ==> LINKING dynamic library \"$@\""; CC -xarch=generic64 - -RMDEP= : -MKDEP= @echo " ==> MAKING DEPENDENCIES \"$@\""; $(RMDEP); $(CC_COM) -xM -xarch=generic64 -MKDEP_OUT= -MKC++DEP= @echo " ==> MAKING DEPENDENCIES \"$@\""; $(RMDEP); CC -xM -xarch=generic64 -MKC++DEP_OUT= diff -Nru cdrtools-2.01.01a33/RULES/cc-sunpro.rul cdrtools-3.02a09/RULES/cc-sunpro.rul --- cdrtools-2.01.01a33/RULES/cc-sunpro.rul 2007-06-13 22:20:07.000000000 +0000 +++ cdrtools-3.02a09/RULES/cc-sunpro.rul 2017-05-28 21:47:50.000000000 +0000 @@ -1,6 +1,6 @@ -#ident "@(#)cc-sunpro.rul 1.8 07/06/14 " +#ident "@(#)cc-sunpro.rul 1.17 17/05/28 " ########################################################################### -# Written 1996-2006 by J. Schilling +# Written 1996-2014 by J. Schilling ########################################################################### # # Platform dependent MACROS for SunPro (Studio) cc @@ -14,25 +14,44 @@ # with the License. # # See the file CDDL.Schily.txt in this distribution for details. +# A copy of the CDDL is also available via the Internet at +# http://www.opensource.org/licenses/cddl1.txt # # When distributing Covered Code, include this CDDL HEADER in each # file and include the License file CDDL.Schily.txt from this distribution. ########################################################################### -CPPFLAGS= -DSCHILY_BUILD $(CPPOPTS) $(CPPOPTX) +CPPFLAGS= -DSCHILY_BUILD $(CPPOPTS) $(CPPOPTX) $(OSINCDIRS:%=-I%) $(OSDEFS) $(OSDEFSX) CFLAGS= $(COPTS) $(CWARNOPTS) $(COPTOPT) $(SUNPROCOPTOPT) $(COPTX) C++FLAGS= $(C++OPTS) $(C++WARNOPTS) $(C++OPTOPT) $(SUNPROC++OPTOPT) $(C++OPTX) - LINTFLAGS= -Nlevel=4 -CPPOPTS= -I$(ARCHDIR) -I$(OINCSDIR) $(INCDIRS:%=-I%) $(INCDIRSX:%=-I%) $(OSDEFS) -COPTS= -Xa +_SUNPROCOPT= $(_UNIQ)$(XARCH_GEN_) +__SUNPROCOPT= $(_SUNPROCOPT:$(_UNIQ)=-xarch=generic) +SUNPROCOPT= $(__SUNPROCOPT:$(_UNIQ)%=%) + +SUN_CC32_OPT= $(SUN_CC64_OPT:-m64=-m32) + +_SUNPROCOPT32= $(_UNIQ)$(SUN_CC32_OPT) +__SUNPROCOPT32= $(_SUNPROCOPT32:$(_UNIQ)=-xarch=generic) +SUNPROCOPT32= $(__SUNPROCOPT32:$(_UNIQ)%=%) + +_SUNPROCOPT64= $(_UNIQ)$(SUN_CC64_OPT) +__SUNPROCOPT64= $(_SUNPROCOPT64:$(_UNIQ)=-xarch=generic64) +SUNPROCOPT64= $(__SUNPROCOPT64:$(_UNIQ)%=%) + +C_ARCH_= $(C_ARCH:suncc%=%) +SUNPROCOPTXX= $(SUNPROCOPT$(C_ARCH_:cc%=%)) +XARCH_GEN= $(SUNPROCOPTXX) + +CPPOPTS= -I$(ARCHDIR) -I$(OINCSDIR) $(INCDIRS:%=-I%) $(INCDIRSX:%=-I%) +COPTS= -Xa $(SUNPROCOPTXX) CWOPTS= -v COPTOPT= -O COPTDYN= -Kpic COPTGPROF= -xpg -C++OPTS= +C++OPTS= $(SUNPROCOPTXX) C++WOPTS= C++OPTOPT= -O C++OPTDYN= -Kpic @@ -42,28 +61,48 @@ LIB_SUFFIX= .a SHL_SUFFIX= .so.1 +LIB_C= -lc + LIBS_PATH= -L$(OLIBSDIR) LIBS_PATH_STATIC= -L$(OLIBSDIR_STATIC) LDFLAGS= $(LDOPTS) $(LDOPTX) LDLIBS= $(LIBS) $(LIBX) +# +# Sunpro C/C++ run on Solaris and Linux and both have linkers +# that support mapfiles +# +MAPVERS= $(_MAPVERS) # This enables to use mapfiles + LDOPTS= $(LIBS_PATH) $(LDPATH) $(RUNPATH) -LDOPTDYN= -dy -G -ztext -h $(TARGET) -Mlib$(TARGETLIB)-mapvers -ldl +LDOPTDYN= -dy -G -ztext -h $(TARGET) $(PMAPVERS:%=-M%) -ldl LNDYNLIB= @$(RM) $(RM_FORCE) $(PTARGET_BASE).so; $(SYMLINK) $(TARGET) $(PTARGET_BASE).so FLOAT_OPTIONS= -CC_COM= cc -CC= @echo " ==> COMPILING \"$@\""; $(CC_COM) -CC++ = @echo " ==> COMPILING \"$@\""; CC -LDCC= @echo " ==> LINKING \"$@\""; $(CC_COM) -LDCC++ = @echo " ==> LINKING \"$@\""; CC -DYNLD= @echo " ==> LINKING dynamic library \"$@\""; $(CC_COM) -DYNLDC++ = @echo " ==> LINKING dynamic library \"$@\""; CC +__CC_COM= $(_UNIQ)$(CC) +___CC_COM= $(__CC_COM:$(_UNIQ)=$(CC_COM_DEF)) +CC_COM= $(___CC_COM:$(_UNIQ)%=%) + +__CC++_COM= $(_UNIQ)$(CCC) +___CC++_COM= $(__CC++_COM:$(_UNIQ)=$(CC++_COM_DEF)) +CC++_COM= $(___CC++_COM:$(_UNIQ)%=%) + +CC_COM_DEF= cc +CC++_COM_DEF= CC +CC= $(CC_COM_DEF) +CCC= $(CC++_COM_DEF) + +CCCC= @echo " ==> COMPILING \"$@\""; $(CC_COM) $(SUNPROCOPTXX) +CC++ = @echo " ==> COMPILING \"$@\""; $(CC++_COM) $(SUNPROCOPTXX) +LDCC= @echo " ==> LINKING \"$@\""; $(CC_COM) $(SUNPROCOPTXX) +LDCC++ = @echo " ==> LINKING \"$@\""; $(CC++_COM) $(SUNPROCOPTXX) +DYNLD= @echo " ==> LINKING dynamic library \"$@\""; $(CC_COM) $(SUNPROCOPTXX) +DYNLDC++ = @echo " ==> LINKING dynamic library \"$@\""; $(CC++_COM) $(SUNPROCOPTXX) RMDEP= : -MKDEP= @echo " ==> MAKING DEPENDENCIES \"$@\""; $(RMDEP); $(CC_COM) -xM +MKDEP= @echo " ==> MAKING DEPENDENCIES \"$@\""; $(RMDEP); $(CC_COM) -xM $(SUNPROCOPTXX) MKDEP_OUT= -MKC++DEP= @echo " ==> MAKING DEPENDENCIES \"$@\""; $(RMDEP); CC -xM +MKC++DEP= @echo " ==> MAKING DEPENDENCIES \"$@\""; $(RMDEP); $(CC++_COM) -xM $(SUNPROCOPTXX) MKC++DEP_OUT= diff -Nru cdrtools-2.01.01a33/RULES/cc-sun.rul cdrtools-3.02a09/RULES/cc-sun.rul --- cdrtools-2.01.01a33/RULES/cc-sun.rul 2007-05-08 10:32:23.000000000 +0000 +++ cdrtools-3.02a09/RULES/cc-sun.rul 2017-05-28 21:47:50.000000000 +0000 @@ -1,6 +1,6 @@ -#ident "@(#)cc-sun.rul 1.6 07/05/08 " +#ident "@(#)cc-sun.rul 1.15 17/05/28 " ########################################################################### -# Written 1996-2006 by J. Schilling +# Written 1996-2017 by J. Schilling ########################################################################### # # Platform dependent MACROS for Sun cc (SunOS 4.x) @@ -14,16 +14,18 @@ # with the License. # # See the file CDDL.Schily.txt in this distribution for details. +# A copy of the CDDL is also available via the Internet at +# http://www.opensource.org/licenses/cddl1.txt # # When distributing Covered Code, include this CDDL HEADER in each # file and include the License file CDDL.Schily.txt from this distribution. ########################################################################### -CPPFLAGS= -DSCHILY_BUILD $(CPPOPTS) $(CPPOPTX) +CPPFLAGS= -DSCHILY_BUILD $(CPPOPTS) $(CPPOPTX) $(OSINCDIRS:%=-I%) $(OSDEFS) $(OSDEFSX) CFLAGS= $(COPTS) $(CWARNOPTS) $(COPTOPT) $(SUNCOPTOPT) $(COPTX) C++FLAGS= $(C++OPTS) $(C++WARNOPTS) $(C++OPTOPT) $(SUNC++OPTOPT) $(C++OPTX) -CPPOPTS= -I$(ARCHDIR) -I$(OINCSDIR) $(INCDIRS:%=-I%) $(INCDIRSX:%=-I%) $(OSDEFS) +CPPOPTS= -I$(ARCHDIR) -I$(OINCSDIR) $(INCDIRS:%=-I%) $(INCDIRSX:%=-I%) COPTS= CWOPTS= COPTOPT= -O @@ -39,6 +41,8 @@ LIB_SUFFIX= .a SHL_SUFFIX= .so.1.0 +LIB_C= -lc + LIBS_PATH= -L$(OLIBSDIR) LIBS_PATH_STATIC= -L$(OLIBSDIR_STATIC) @@ -52,22 +56,35 @@ FLOAT_OPTIONS= -CC= @echo " ==> COMPILING \"$@\""; cc -LDCC= @echo " ==> LINKING \"$@\""; cc +__CC_COM= $(_UNIQ)$(CC) +___CC_COM= $(__CC_COM:$(_UNIQ)=$(CC_COM_DEF)) +CC_COM= $(___CC_COM:$(_UNIQ)%=%) + +__CC++_COM= $(_UNIQ)$(CCC) +___CC++_COM= $(__CC++_COM:$(_UNIQ)=$(CC++_COM_DEF)) +CC++_COM= $(___CC++_COM:$(_UNIQ)%=%) + +CC_COM_DEF= cc +CC++_COM_DEF= echo "C++ not yet supported"; exit -1; : +# +# Use to comment out C++ projects +# +C++BUILD= $(NUMBER_SIGN) + +CC= $(CC_COM_DEF) +CCC= $(CC++_COM_DEF) + +CCCC= @echo " ==> COMPILING \"$@\""; $(CC_COM) +LDCC= @echo " ==> LINKING \"$@\""; $(CC_COM) DYNLD= @echo " ==> LINKING dynamic library \"$@\""; ld RANLIB= @echo " ==> RANDOMIZING ARCHIVE \"$@\""; ranlib RMDEP= : -MKDEP= @echo " ==> MAKING DEPENDENCIES \"$@\""; $(RMDEP); cc -M +MKDEP= @echo " ==> MAKING DEPENDENCIES \"$@\""; $(RMDEP); $(CC_COM) -M MKDEP_OUT= -#CC++ = @echo " ==> COMPILING \"$@\""; CC -#LDCC++ = @echo " ==> LINKING \"$@\""; CC -#DYNLDC++ = @echo " ==> LINKING dynamic library \"$@\""; CC -#MKC++DEP= @echo " ==> MAKING DEPENDENCIES \"$@\""; $(RMDEP); CC -xM -#MKC++DEP_OUT= -CC++ = @echo " ==> COMPILING \"$@\""; echo "C++ not yet supported"; exit -1 -LDCC++ = @echo " ==> LINKING \"$@\""; echo "C++ not yet supported"; exit -1 -DYNLDC++ = @echo " ==> LINKING dynamic library \"$@\""; echo "C++ not yet supported"; exit -1 -MKC++DEP= @echo " ==> MAKING DEPENDENCIES \"$@\""; $(RMDEP); echo "C++ not yet supported"; exit -1 +CC++ = @echo " ==> COMPILING \"$@\""; $(CC++_COM) +LDCC++ = @echo " ==> LINKING \"$@\""; $(CC++_COM) +DYNLDC++ = @echo " ==> LINKING dynamic library \"$@\""; $(CC++_COM) +MKC++DEP= @echo " ==> MAKING DEPENDENCIES \"$@\""; $(RMDEP); $(CC++_COM) -M MKC++DEP_OUT= diff -Nru cdrtools-2.01.01a33/RULES/gmake.wrn cdrtools-3.02a09/RULES/gmake.wrn --- cdrtools-2.01.01a33/RULES/gmake.wrn 2005-04-10 15:48:42.000000000 +0000 +++ cdrtools-3.02a09/RULES/gmake.wrn 2014-12-03 21:15:05.000000000 +0000 @@ -18,4 +18,8 @@ The related bug has been reported to the GNU make maintainers in 1998 but as the bug has not yet been fixed, it seems that GNU make is unmaintained :-( -A working highly portable make program is at ftp://ftp.berlios.de/pub/smake +A working highly portable make program is at + + https://sourceforge.net/projects/s-make/files/ + +You may switch off this warning by calling "gmake GMAKE_NOWARN=true ..." diff -Nru cdrtools-2.01.01a33/RULES/hppa-nextstep-cc.rul cdrtools-3.02a09/RULES/hppa-nextstep-cc.rul --- cdrtools-2.01.01a33/RULES/hppa-nextstep-cc.rul 2007-05-09 12:25:30.000000000 +0000 +++ cdrtools-3.02a09/RULES/hppa-nextstep-cc.rul 2015-03-26 21:34:35.000000000 +0000 @@ -1,6 +1,6 @@ -#ident "@(#)hppa-nextstep-cc.rul 1.10 07/05/09 " +#ident "@(#)hppa-nextstep-cc.rul 1.14 15/03/26 " ########################################################################### -# Written 1996 by J. Schilling +# Written 1996-2015 by J. Schilling ########################################################################### # # Platform dependent MACROS for NeXT Step on hppa (GCC) @@ -14,6 +14,8 @@ # with the License. # # See the file CDDL.Schily.txt in this distribution for details. +# A copy of the CDDL is also available via the Internet at +# http://www.opensource.org/licenses/cddl1.txt # # When distributing Covered Code, include this CDDL HEADER in each # file and include the License file CDDL.Schily.txt from this distribution. @@ -21,6 +23,7 @@ include $(SRCROOT)/$(RULESDIR)/rules.prg ########################################################################### include $(SRCROOT)/$(RULESDIR)/cc-gcc.rul +CC_COM_DEF= cc OSDEFS += @@ -42,11 +45,6 @@ DYNLD= @echo " ==> LINKING dynamic library \"$@\""; ld RANLIB= @echo " ==> RANDOMIZING ARCHIVE \"$@\""; ranlib +_MKDIR= $(_MKDIR_SH) MKDIR= $(MKDIR_SH) - -#### -# XXX Better use something like CC=cc -#### -CC= @echo " ==> COMPILING \"$@\""; cc -LDCC= @echo " ==> LINKING \"$@\""; cc -MKDEP= @echo " ==> MAKING DEPENDENCIES \"$@\""; $(RMDEP); cc -M +INSMKDIR= $(INSMKDIR_SH) diff -Nru cdrtools-2.01.01a33/RULES/hppa-nextstep-gcc.rul cdrtools-3.02a09/RULES/hppa-nextstep-gcc.rul --- cdrtools-2.01.01a33/RULES/hppa-nextstep-gcc.rul 2007-05-09 12:25:30.000000000 +0000 +++ cdrtools-3.02a09/RULES/hppa-nextstep-gcc.rul 2015-03-26 21:34:35.000000000 +0000 @@ -1,6 +1,6 @@ -#ident "@(#)hppa-nextstep-gcc.rul 1.10 07/05/09 " +#ident "@(#)hppa-nextstep-gcc.rul 1.12 15/03/26 " ########################################################################### -# Written 1996 by J. Schilling +# Written 1996-2015 by J. Schilling ########################################################################### # # Platform dependent MACROS for NeXT Step on hppa (GCC) @@ -14,6 +14,8 @@ # with the License. # # See the file CDDL.Schily.txt in this distribution for details. +# A copy of the CDDL is also available via the Internet at +# http://www.opensource.org/licenses/cddl1.txt # # When distributing Covered Code, include this CDDL HEADER in each # file and include the License file CDDL.Schily.txt from this distribution. @@ -42,4 +44,6 @@ DYNLD= @echo " ==> LINKING dynamic library \"$@\""; ld RANLIB= @echo " ==> RANDOMIZING ARCHIVE \"$@\""; ranlib +_MKDIR= $(_MKDIR_SH) MKDIR= $(MKDIR_SH) +INSMKDIR= $(INSMKDIR_SH) diff -Nru cdrtools-2.01.01a33/RULES/i386-bsd-os3-cc.rul cdrtools-3.02a09/RULES/i386-bsd-os3-cc.rul --- cdrtools-2.01.01a33/RULES/i386-bsd-os3-cc.rul 2007-05-09 12:25:30.000000000 +0000 +++ cdrtools-3.02a09/RULES/i386-bsd-os3-cc.rul 2013-11-04 20:24:57.000000000 +0000 @@ -1,4 +1,4 @@ -#ident "@(#)i386-bsd-os3-cc.rul 1.12 07/05/09 " +#ident "@(#)i386-bsd-os3-cc.rul 1.13 13/11/04 " ########################################################################### # Written 1998 by J. Schilling ########################################################################### @@ -14,6 +14,8 @@ # with the License. # # See the file CDDL.Schily.txt in this distribution for details. +# A copy of the CDDL is also available via the Internet at +# http://www.opensource.org/licenses/cddl1.txt # # When distributing Covered Code, include this CDDL HEADER in each # file and include the License file CDDL.Schily.txt from this distribution. @@ -23,7 +25,7 @@ include $(SRCROOT)/$(RULESDIR)/cc-gcc.rul OSDEFS += -CPPOPTS= -I$(ARCHDIR) -I$(OINCSDIR) $(INCDIRS:%=-I%) -I/sys $(INCDIRSX:%=-I%) $(OSDEFS) +CPPOPTS= -I$(ARCHDIR) -I$(OINCSDIR) $(INCDIRS:%=-I%) -I/sys $(INCDIRSX:%=-I%) KDEFINES= -DKERNEL -D_KERNEL diff -Nru cdrtools-2.01.01a33/RULES/i386-bsd-os3-gcc.rul cdrtools-3.02a09/RULES/i386-bsd-os3-gcc.rul --- cdrtools-2.01.01a33/RULES/i386-bsd-os3-gcc.rul 2007-05-09 12:25:30.000000000 +0000 +++ cdrtools-3.02a09/RULES/i386-bsd-os3-gcc.rul 2013-11-04 20:24:57.000000000 +0000 @@ -1,4 +1,4 @@ -#ident "@(#)i386-bsd-os3-gcc.rul 1.12 07/05/09 " +#ident "@(#)i386-bsd-os3-gcc.rul 1.13 13/11/04 " ########################################################################### # Written 1998 by J. Schilling ########################################################################### @@ -14,6 +14,8 @@ # with the License. # # See the file CDDL.Schily.txt in this distribution for details. +# A copy of the CDDL is also available via the Internet at +# http://www.opensource.org/licenses/cddl1.txt # # When distributing Covered Code, include this CDDL HEADER in each # file and include the License file CDDL.Schily.txt from this distribution. @@ -23,7 +25,7 @@ include $(SRCROOT)/$(RULESDIR)/cc-gcc.rul OSDEFS += -CPPOPTS= -I$(ARCHDIR) -I$(OINCSDIR) $(INCDIRS:%=-I%) -I/sys $(INCDIRSX:%=-I%) $(OSDEFS) +CPPOPTS= -I$(ARCHDIR) -I$(OINCSDIR) $(INCDIRS:%=-I%) -I/sys $(INCDIRSX:%=-I%) KDEFINES= -DKERNEL -D_KERNEL diff -Nru cdrtools-2.01.01a33/RULES/i386-bsd-os-cc.rul cdrtools-3.02a09/RULES/i386-bsd-os-cc.rul --- cdrtools-2.01.01a33/RULES/i386-bsd-os-cc.rul 2007-05-09 12:25:30.000000000 +0000 +++ cdrtools-3.02a09/RULES/i386-bsd-os-cc.rul 2013-11-04 20:24:57.000000000 +0000 @@ -1,4 +1,4 @@ -#ident "@(#)i386-bsd-os-cc.rul 1.14 07/05/09 " +#ident "@(#)i386-bsd-os-cc.rul 1.15 13/11/04 " ########################################################################### # Written 1998 by J. Schilling ########################################################################### @@ -14,6 +14,8 @@ # with the License. # # See the file CDDL.Schily.txt in this distribution for details. +# A copy of the CDDL is also available via the Internet at +# http://www.opensource.org/licenses/cddl1.txt # # When distributing Covered Code, include this CDDL HEADER in each # file and include the License file CDDL.Schily.txt from this distribution. @@ -23,7 +25,7 @@ include $(SRCROOT)/$(RULESDIR)/cc-gcc.rul OSDEFS += -CPPOPTS= -I$(ARCHDIR) -I$(OINCSDIR) $(INCDIRS:%=-I%) -I/sys $(INCDIRSX:%=-I%) $(OSDEFS) +CPPOPTS= -I$(ARCHDIR) -I$(OINCSDIR) $(INCDIRS:%=-I%) -I/sys $(INCDIRSX:%=-I%) KDEFINES= -DKERNEL -D_KERNEL diff -Nru cdrtools-2.01.01a33/RULES/i386-bsd-os-gcc.rul cdrtools-3.02a09/RULES/i386-bsd-os-gcc.rul --- cdrtools-2.01.01a33/RULES/i386-bsd-os-gcc.rul 2007-05-09 12:25:30.000000000 +0000 +++ cdrtools-3.02a09/RULES/i386-bsd-os-gcc.rul 2013-11-04 20:24:57.000000000 +0000 @@ -1,4 +1,4 @@ -#ident "@(#)i386-bsd-os-gcc.rul 1.14 07/05/09 " +#ident "@(#)i386-bsd-os-gcc.rul 1.15 13/11/04 " ########################################################################### # Written 1998 by J. Schilling ########################################################################### @@ -14,6 +14,8 @@ # with the License. # # See the file CDDL.Schily.txt in this distribution for details. +# A copy of the CDDL is also available via the Internet at +# http://www.opensource.org/licenses/cddl1.txt # # When distributing Covered Code, include this CDDL HEADER in each # file and include the License file CDDL.Schily.txt from this distribution. @@ -23,7 +25,7 @@ include $(SRCROOT)/$(RULESDIR)/cc-gcc.rul OSDEFS += -CPPOPTS= -I$(ARCHDIR) -I$(OINCSDIR) $(INCDIRS:%=-I%) -I/sys $(INCDIRSX:%=-I%) $(OSDEFS) +CPPOPTS= -I$(ARCHDIR) -I$(OINCSDIR) $(INCDIRS:%=-I%) -I/sys $(INCDIRSX:%=-I%) KDEFINES= -DKERNEL -D_KERNEL diff -Nru cdrtools-2.01.01a33/RULES/i386-cygwin32_nt-cc.rul cdrtools-3.02a09/RULES/i386-cygwin32_nt-cc.rul --- cdrtools-2.01.01a33/RULES/i386-cygwin32_nt-cc.rul 2007-05-09 12:25:30.000000000 +0000 +++ cdrtools-3.02a09/RULES/i386-cygwin32_nt-cc.rul 1970-01-01 00:00:00.000000000 +0000 @@ -1,49 +0,0 @@ -#ident "@(#)i486-cygwin32_nt-cc.rul 1.10 07/05/09 " -########################################################################### -# Written 1998 by B. Bochow -########################################################################### -# -# Platform dependent MACROS for CYGWIN32_NT -# -########################################################################### -# Copyright (c) J. Schilling -########################################################################### -# The contents of this file are subject to the terms of the -# Common Development and Distribution License, Version 1.0 only -# (the "License"). You may not use this file except in compliance -# with the License. -# -# See the file CDDL.Schily.txt in this distribution for details. -# -# When distributing Covered Code, include this CDDL HEADER in each -# file and include the License file CDDL.Schily.txt from this distribution. -########################################################################### -include $(SRCROOT)/$(RULESDIR)/rules.prg -########################################################################### -include $(SRCROOT)/$(RULESDIR)/cc-gcc.rul - -OSDEFS += -mwin32 - -KDEFINES= -#COPTDYN= -fpic -COPTDYN= - -LIB_PREFIX= lib -LIB_SUFFIX= .a -SHL_SUFFIX= .dll - -LIB_SOCKET= -LIB_MATH= -lm -LIB_KVM= - -#LDOPTS= $(LIBS_PATH) $(LDPATH) $(RUNPATH:-R%=-Wl,-R%) -LDOPTS= $(LIBS_PATH) $(LDPATH) -#LDOPTDYN= -shared -Wl,-soname,$(TARGET) -LDOPTDYN= -#LNDYNLIB= @$(RM) $(RM_FORCE) $(PTARGET_BASE).so; $(SYMLINK) $(TARGET) $(PTARGET_BASE).so -LNDYNLIB= - -DYNLD= @echo " ==> LINKING dynamic library \"$@\""; ld - -LORDER= echo -TSORT= cat diff -Nru cdrtools-2.01.01a33/RULES/i386-cygwin32_nt-cl.rul cdrtools-3.02a09/RULES/i386-cygwin32_nt-cl.rul --- cdrtools-2.01.01a33/RULES/i386-cygwin32_nt-cl.rul 2007-04-26 15:03:45.000000000 +0000 +++ cdrtools-3.02a09/RULES/i386-cygwin32_nt-cl.rul 1970-01-01 00:00:00.000000000 +0000 @@ -1,40 +0,0 @@ -#ident "@(#)i486-cygwin32_nt-cl.rul 1.7 07/04/20 " -########################################################################### -# Written 2006 by J. Schilling -########################################################################### -# -# Platform dependent MACROS for CYGWIN32_NT using MSVC -# -########################################################################### -# Copyright (c) J. Schilling -########################################################################### -# The contents of this file are subject to the terms of the -# Common Development and Distribution License, Version 1.0 only -# (the "License"). You may not use this file except in compliance -# with the License. -# -# See the file CDDL.Schily.txt in this distribution for details. -# -# When distributing Covered Code, include this CDDL HEADER in each -# file and include the License file CDDL.Schily.txt from this distribution. -########################################################################### -include $(SRCROOT)/$(RULESDIR)/rules.prg -########################################################################### -_PLATFORM= cygwin -include $(SRCROOT)/$(RULESDIR)/cc-msc.rul - -# -# Supress useless cl warnings like: -# warning C4996: 'strerror' wurde als veraltet deklariert -# Consider using strerror_s instead. -# -OSDEFS += -D_CRT_SECURE_NO_DEPRECATE - -KDEFINES= - -LIB_SOCKET= Ws2_32.lib -LIB_MATH= -LIB_KVM= - -LORDER= echo -TSORT= cat diff -Nru cdrtools-2.01.01a33/RULES/i386-cygwin32_nt-gcc.rul cdrtools-3.02a09/RULES/i386-cygwin32_nt-gcc.rul --- cdrtools-2.01.01a33/RULES/i386-cygwin32_nt-gcc.rul 2007-05-09 12:25:30.000000000 +0000 +++ cdrtools-3.02a09/RULES/i386-cygwin32_nt-gcc.rul 1970-01-01 00:00:00.000000000 +0000 @@ -1,49 +0,0 @@ -#ident "@(#)i486-cygwin32_nt-gcc.rul 1.10 07/05/09 " -########################################################################### -# Written 1998 by B. Bochow -########################################################################### -# -# Platform dependent MACROS for CYGWIN32_NT -# -########################################################################### -# Copyright (c) J. Schilling -########################################################################### -# The contents of this file are subject to the terms of the -# Common Development and Distribution License, Version 1.0 only -# (the "License"). You may not use this file except in compliance -# with the License. -# -# See the file CDDL.Schily.txt in this distribution for details. -# -# When distributing Covered Code, include this CDDL HEADER in each -# file and include the License file CDDL.Schily.txt from this distribution. -########################################################################### -include $(SRCROOT)/$(RULESDIR)/rules.prg -########################################################################### -include $(SRCROOT)/$(RULESDIR)/cc-gcc.rul - -OSDEFS += -mwin32 - -KDEFINES= -#COPTDYN= -fpic -COPTDYN= - -LIB_PREFIX= lib -LIB_SUFFIX= .a -SHL_SUFFIX= .dll - -LIB_SOCKET= -LIB_MATH= -lm -LIB_KVM= - -#LDOPTS= $(LIBS_PATH) $(LDPATH) $(RUNPATH:-R%=-Wl,-R%) -LDOPTS= $(LIBS_PATH) $(LDPATH) -#LDOPTDYN= -shared -Wl,-soname,$(TARGET) -LDOPTDYN= -#LNDYNLIB= @$(RM) $(RM_FORCE) $(PTARGET_BASE).so; $(SYMLINK) $(TARGET) $(PTARGET_BASE).so -LNDYNLIB= - -DYNLD= @echo " ==> LINKING dynamic library \"$@\""; ld - -LORDER= echo -TSORT= cat diff -Nru cdrtools-2.01.01a33/RULES/i386-darwin-cc.rul cdrtools-3.02a09/RULES/i386-darwin-cc.rul --- cdrtools-2.01.01a33/RULES/i386-darwin-cc.rul 2007-05-09 12:25:30.000000000 +0000 +++ cdrtools-3.02a09/RULES/i386-darwin-cc.rul 1970-01-01 00:00:00.000000000 +0000 @@ -1,65 +0,0 @@ -#ident "@(#)power-macintosh-darwin-cc.rul 1.13 07/05/09 " -########################################################################### -# Written 1996 by J. Schilling -########################################################################### -# -# Platform dependent MACROS for Darwin-1.2 ff. (Apple MacOS X) PPC (GCC) -# -########################################################################### -# Copyright (c) J. Schilling -########################################################################### -# The contents of this file are subject to the terms of the -# Common Development and Distribution License, Version 1.0 only -# (the "License"). You may not use this file except in compliance -# with the License. -# -# See the file CDDL.Schily.txt in this distribution for details. -# -# When distributing Covered Code, include this CDDL HEADER in each -# file and include the License file CDDL.Schily.txt from this distribution. -########################################################################### -include $(SRCROOT)/$(RULESDIR)/rules.prg -########################################################################### -include $(SRCROOT)/$(RULESDIR)/cc-gcc.rul - -OSDEFS += - -KDEFINES= -DKERNEL -D_KERNEL - -COPTDYN= -fPIC - -LIB_PREFIX= lib -LIB_SUFFIX= .a -SHL_SUFFIX= .dylib - -LIB_SOCKET= -LIB_MATH= -lm -LIB_KVM= - -#LDOPTS= $(LIBS_PATH) $(LDPATH) $(RUNPATH:-R%=-Wl,-R%) -LDOPTS= $(LIBS_PATH) $(LDPATH) -framework IOKit -framework CoreFoundation -LDOPTDYN= -install_name $(INS_BASE)/lib/$(TARGET) -LDLIBDYN= -lgcc -LNDYNLIB= @ - -DYNLD= @echo " ==> LINKING dynamic library \"$@\""; libtool -dynamic -RANLIB= @echo " ==> RANDOMIZING ARCHIVE \"$@\""; ranlib - -# -# lorder seems not to work on some versions because Apple installed -# a broken /bin/sh that is not POSIX cimpliant an will not -# be able to run the /usr/bin/lorder script. The error messages are: -# type: not found -# type: not found -# lorder: nm: not found -# ... disable it -# -LORDER= echo -TSORT= cat - -#### -# XXX Better use something like CC=cc -#### -CC= @echo " ==> COMPILING \"$@\""; cc -LDCC= @echo " ==> LINKING \"$@\""; cc -MKDEP= @echo " ==> MAKING DEPENDENCIES \"$@\""; $(RMDEP); cc -M diff -Nru cdrtools-2.01.01a33/RULES/i386-darwin-clang.rul cdrtools-3.02a09/RULES/i386-darwin-clang.rul --- cdrtools-2.01.01a33/RULES/i386-darwin-clang.rul 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/RULES/i386-darwin-clang.rul 2014-04-02 09:40:13.000000000 +0000 @@ -0,0 +1,62 @@ +#ident "@(#)i386-darwin-clang.rul 1.2 14/04/02 " +########################################################################### +# Written 1996-2014 by J. Schilling +########################################################################### +# +# Platform dependent MACROS for Darwin-1.2 ff. (Apple MacOS X) x86 (CLANG) +# +########################################################################### +# Copyright (c) J. Schilling +########################################################################### +# The contents of this file are subject to the terms of the +# Common Development and Distribution License, Version 1.0 only +# (the "License"). You may not use this file except in compliance +# with the License. +# +# See the file CDDL.Schily.txt in this distribution for details. +# A copy of the CDDL is also available via the Internet at +# http://www.opensource.org/licenses/cddl1.txt +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file CDDL.Schily.txt from this distribution. +########################################################################### +include $(SRCROOT)/$(RULESDIR)/rules.prg +########################################################################### +include $(SRCROOT)/$(RULESDIR)/cc-$(C_ARCH).rul + +OSDEFS += + +KDEFINES= -DKERNEL -D_KERNEL + +COPTDYN= -fPIC +C++OPTDYN= -fPIC + +LIB_PREFIX= lib +LIB_SUFFIX= .a +SHL_SUFFIX= .dylib + +LIB_SOCKET= +LIB_MATH= -lm +LIB_KVM= + +#LDOPTS= $(LIBS_PATH) $(LDPATH) $(RUNPATH:-R%=-Wl,-R%) +LDFRAMEWORKS= -framework IOKit -framework CoreFoundation +LDOPTS= $(LIBS_PATH) $(LDPATH) $(LDFRAMEWORKS) +LDOPTDYN= -install_name $(INSBASE)/lib/$(TARGET) +LNDYNLIB= @ + +DYNLD= @echo " ==> LINKING dynamic library \"$@\""; libtool -dynamic +DYNLDC++ = @echo " ==> LINKING dynamic library \"$@\""; libtool -dynamic +RANLIB= @echo " ==> RANDOMIZING ARCHIVE \"$@\""; ranlib + +# +# lorder seems not to work on some versions because Apple installed +# a broken /bin/sh that is not POSIX cimpliant an will not +# be able to run the /usr/bin/lorder script. The error messages are: +# type: not found +# type: not found +# lorder: nm: not found +# ... disable it +# +LORDER= echo +TSORT= cat diff -Nru cdrtools-2.01.01a33/RULES/i386-darwin-gcc.rul cdrtools-3.02a09/RULES/i386-darwin-gcc.rul --- cdrtools-2.01.01a33/RULES/i386-darwin-gcc.rul 2007-05-09 12:25:30.000000000 +0000 +++ cdrtools-3.02a09/RULES/i386-darwin-gcc.rul 1970-01-01 00:00:00.000000000 +0000 @@ -1,58 +0,0 @@ -#ident "@(#)power-macintosh-darwin-gcc.rul 1.13 07/05/09 " -########################################################################### -# Written 1996 by J. Schilling -########################################################################### -# -# Platform dependent MACROS for Darwin-1.2 ff. (Apple MacOS X) PPC (GCC) -# -########################################################################### -# Copyright (c) J. Schilling -########################################################################### -# The contents of this file are subject to the terms of the -# Common Development and Distribution License, Version 1.0 only -# (the "License"). You may not use this file except in compliance -# with the License. -# -# See the file CDDL.Schily.txt in this distribution for details. -# -# When distributing Covered Code, include this CDDL HEADER in each -# file and include the License file CDDL.Schily.txt from this distribution. -########################################################################### -include $(SRCROOT)/$(RULESDIR)/rules.prg -########################################################################### -include $(SRCROOT)/$(RULESDIR)/cc-gcc.rul - -OSDEFS += - -KDEFINES= -DKERNEL -D_KERNEL - -COPTDYN= -fPIC - -LIB_PREFIX= lib -LIB_SUFFIX= .a -SHL_SUFFIX= .dylib - -LIB_SOCKET= -LIB_MATH= -lm -LIB_KVM= - -#LDOPTS= $(LIBS_PATH) $(LDPATH) $(RUNPATH:-R%=-Wl,-R%) -LDOPTS= $(LIBS_PATH) $(LDPATH) -framework IOKit -framework CoreFoundation -LDOPTDYN= -install_name $(INS_BASE)/lib/$(TARGET) -LDLIBDYN= -lgcc -LNDYNLIB= @ - -DYNLD= @echo " ==> LINKING dynamic library \"$@\""; libtool -dynamic -RANLIB= @echo " ==> RANDOMIZING ARCHIVE \"$@\""; ranlib - -# -# lorder seems not to work on some versions because Apple installed -# a broken /bin/sh that is not POSIX cimpliant an will not -# be able to run the /usr/bin/lorder script. The error messages are: -# type: not found -# type: not found -# lorder: nm: not found -# ... disable it -# -LORDER= echo -TSORT= cat diff -Nru cdrtools-2.01.01a33/RULES/i386-dragonfly-cc.rul cdrtools-3.02a09/RULES/i386-dragonfly-cc.rul --- cdrtools-2.01.01a33/RULES/i386-dragonfly-cc.rul 2007-05-08 11:03:08.000000000 +0000 +++ cdrtools-3.02a09/RULES/i386-dragonfly-cc.rul 1970-01-01 00:00:00.000000000 +0000 @@ -1,39 +0,0 @@ -#ident "@(#)i386-freebsd-cc.rul 1.8 07/05/08 " -########################################################################### -# Written 1997 by J. Schilling -########################################################################### -# -# Platform dependent MACROS for FreeBSD -# -########################################################################### -# Copyright (c) J. Schilling -########################################################################### -# The contents of this file are subject to the terms of the -# Common Development and Distribution License, Version 1.0 only -# (the "License"). You may not use this file except in compliance -# with the License. -# -# See the file CDDL.Schily.txt in this distribution for details. -# -# When distributing Covered Code, include this CDDL HEADER in each -# file and include the License file CDDL.Schily.txt from this distribution. -########################################################################### -include $(SRCROOT)/$(RULESDIR)/rules.prg -########################################################################### -include $(SRCROOT)/$(RULESDIR)/cc-gcc.rul - -OSDEFS += - -KDEFINES= -DKERNEL -D_KERNEL - -LIB_PREFIX= lib -LIB_SUFFIX= .a -SHL_SUFFIX= .so.1.0 - -LIB_SOCKET= -LIB_MATH= -lm -LIB_KVM= - -LDOPTS= $(LIBS_PATH) $(LDPATH) - -RANLIB= @echo " ==> RANDOMIZING ARCHIVE \"$@\""; ranlib diff -Nru cdrtools-2.01.01a33/RULES/i386-dragonfly-gcc.rul cdrtools-3.02a09/RULES/i386-dragonfly-gcc.rul --- cdrtools-2.01.01a33/RULES/i386-dragonfly-gcc.rul 2007-05-08 11:03:08.000000000 +0000 +++ cdrtools-3.02a09/RULES/i386-dragonfly-gcc.rul 1970-01-01 00:00:00.000000000 +0000 @@ -1,39 +0,0 @@ -#ident "@(#)i386-freebsd-gcc.rul 1.8 07/05/08 " -########################################################################### -# Written 1997 by J. Schilling -########################################################################### -# -# Platform dependent MACROS for FreeBSD -# -########################################################################### -# Copyright (c) J. Schilling -########################################################################### -# The contents of this file are subject to the terms of the -# Common Development and Distribution License, Version 1.0 only -# (the "License"). You may not use this file except in compliance -# with the License. -# -# See the file CDDL.Schily.txt in this distribution for details. -# -# When distributing Covered Code, include this CDDL HEADER in each -# file and include the License file CDDL.Schily.txt from this distribution. -########################################################################### -include $(SRCROOT)/$(RULESDIR)/rules.prg -########################################################################### -include $(SRCROOT)/$(RULESDIR)/cc-gcc.rul - -OSDEFS += - -KDEFINES= -DKERNEL -D_KERNEL - -LIB_PREFIX= lib -LIB_SUFFIX= .a -SHL_SUFFIX= .so.1.0 - -LIB_SOCKET= -LIB_MATH= -lm -LIB_KVM= - -LDOPTS= $(LIBS_PATH) $(LDPATH) - -RANLIB= @echo " ==> RANDOMIZING ARCHIVE \"$@\""; ranlib diff -Nru cdrtools-2.01.01a33/RULES/i386-freebsd-clang.rul cdrtools-3.02a09/RULES/i386-freebsd-clang.rul --- cdrtools-2.01.01a33/RULES/i386-freebsd-clang.rul 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/RULES/i386-freebsd-clang.rul 2014-04-02 21:04:29.000000000 +0000 @@ -0,0 +1,41 @@ +#ident "@(#)i386-freebsd-clang.rul 1.1 14/04/02 " +########################################################################### +# Written 1997-2014 by J. Schilling +########################################################################### +# +# Platform dependent MACROS for FreeBSD using Clang +# +########################################################################### +# Copyright (c) J. Schilling +########################################################################### +# The contents of this file are subject to the terms of the +# Common Development and Distribution License, Version 1.0 only +# (the "License"). You may not use this file except in compliance +# with the License. +# +# See the file CDDL.Schily.txt in this distribution for details. +# A copy of the CDDL is also available via the Internet at +# http://www.opensource.org/licenses/cddl1.txt +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file CDDL.Schily.txt from this distribution. +########################################################################### +include $(SRCROOT)/$(RULESDIR)/rules.prg +########################################################################### +include $(SRCROOT)/$(RULESDIR)/cc-$(C_ARCH).rul + +OSDEFS += + +KDEFINES= -DKERNEL -D_KERNEL + +LIB_PREFIX= lib +LIB_SUFFIX= .a +SHL_SUFFIX= .so.1.0 + +LIB_SOCKET= +LIB_MATH= -lm +LIB_KVM= + +LDOPTS= $(LIBS_PATH) $(LDPATH) + +RANLIB= @echo " ==> RANDOMIZING ARCHIVE \"$@\""; ranlib diff -Nru cdrtools-2.01.01a33/RULES/i386-linux-cc.rul cdrtools-3.02a09/RULES/i386-linux-cc.rul --- cdrtools-2.01.01a33/RULES/i386-linux-cc.rul 2007-05-09 12:25:30.000000000 +0000 +++ cdrtools-3.02a09/RULES/i386-linux-cc.rul 1970-01-01 00:00:00.000000000 +0000 @@ -1,45 +0,0 @@ -#ident "@(#)i586-linux-cc.rul 1.11 07/05/09 " -########################################################################### -# Written 1996 by J. Schilling -########################################################################### -# -# Platform dependent MACROS for Linux -# -########################################################################### -# Copyright (c) J. Schilling -########################################################################### -# The contents of this file are subject to the terms of the -# Common Development and Distribution License, Version 1.0 only -# (the "License"). You may not use this file except in compliance -# with the License. -# -# See the file CDDL.Schily.txt in this distribution for details. -# -# When distributing Covered Code, include this CDDL HEADER in each -# file and include the License file CDDL.Schily.txt from this distribution. -########################################################################### -include $(SRCROOT)/$(RULESDIR)/rules.prg -########################################################################### -include $(SRCROOT)/$(RULESDIR)/cc-gcc.rul - -# -# LINUX_SRC_INCLUDE is defined in DEFAULTS/Defaults.linux -# -INCDIRSX += $(LINUX_SRC_INCLUDE) -OSDEFS += - -KDEFINES= -DKERNEL -D_KERNEL - -LIB_PREFIX= lib -LIB_SUFFIX= .a -SHL_SUFFIX= .so.1.0 - -LIB_SOCKET= -LIB_MATH= -lm -LIB_KVM= - -#LDOPTS= $(LIBS_PATH) $(LDPATH) $(RUNPATH:-R%=-Wl,-R%) -LDOPTS= $(LIBS_PATH) $(LDPATH) - -LORDER= echo -TSORT= cat diff -Nru cdrtools-2.01.01a33/RULES/i386-linux-gcc.rul cdrtools-3.02a09/RULES/i386-linux-gcc.rul --- cdrtools-2.01.01a33/RULES/i386-linux-gcc.rul 2007-05-09 12:25:30.000000000 +0000 +++ cdrtools-3.02a09/RULES/i386-linux-gcc.rul 1970-01-01 00:00:00.000000000 +0000 @@ -1,45 +0,0 @@ -#ident "@(#)i586-linux-gcc.rul 1.11 07/05/09 " -########################################################################### -# Written 1996 by J. Schilling -########################################################################### -# -# Platform dependent MACROS for Linux -# -########################################################################### -# Copyright (c) J. Schilling -########################################################################### -# The contents of this file are subject to the terms of the -# Common Development and Distribution License, Version 1.0 only -# (the "License"). You may not use this file except in compliance -# with the License. -# -# See the file CDDL.Schily.txt in this distribution for details. -# -# When distributing Covered Code, include this CDDL HEADER in each -# file and include the License file CDDL.Schily.txt from this distribution. -########################################################################### -include $(SRCROOT)/$(RULESDIR)/rules.prg -########################################################################### -include $(SRCROOT)/$(RULESDIR)/cc-gcc.rul - -# -# LINUX_SRC_INCLUDE is defined in DEFAULTS/Defaults.linux -# -INCDIRSX += $(LINUX_SRC_INCLUDE) -OSDEFS += - -KDEFINES= -DKERNEL -D_KERNEL - -LIB_PREFIX= lib -LIB_SUFFIX= .a -SHL_SUFFIX= .so.1.0 - -LIB_SOCKET= -LIB_MATH= -lm -LIB_KVM= - -#LDOPTS= $(LIBS_PATH) $(LDPATH) $(RUNPATH:-R%=-Wl,-R%) -LDOPTS= $(LIBS_PATH) $(LDPATH) - -LORDER= echo -TSORT= cat diff -Nru cdrtools-2.01.01a33/RULES/i386-linux-suncc.rul cdrtools-3.02a09/RULES/i386-linux-suncc.rul --- cdrtools-2.01.01a33/RULES/i386-linux-suncc.rul 2007-06-16 13:34:28.000000000 +0000 +++ cdrtools-3.02a09/RULES/i386-linux-suncc.rul 1970-01-01 00:00:00.000000000 +0000 @@ -1,46 +0,0 @@ -#ident "@(#)i586-linux-suncc.rul 1.1 07/06/16 " -########################################################################### -# Written 2007 by J. Schilling -########################################################################### -# -# Platform dependent MACROS for Linux using Sun Studio -# -########################################################################### -# Copyright (c) J. Schilling -########################################################################### -# The contents of this file are subject to the terms of the -# Common Development and Distribution License, Version 1.0 only -# (the "License"). You may not use this file except in compliance -# with the License. -# -# See the file CDDL.Schily.txt in this distribution for details. -# -# When distributing Covered Code, include this CDDL HEADER in each -# file and include the License file CDDL.Schily.txt from this distribution. -########################################################################### -include $(SRCROOT)/$(RULESDIR)/rules.prg -########################################################################### -include $(SRCROOT)/$(RULESDIR)/cc-sunpro.rul -CC_COM= suncc - -# -# LINUX_SRC_INCLUDE is defined in DEFAULTS/Defaults.linux -# -INCDIRSX += $(LINUX_SRC_INCLUDE) -OSDEFS += - -KDEFINES= -DKERNEL -D_KERNEL - -LIB_PREFIX= lib -LIB_SUFFIX= .a -SHL_SUFFIX= .so.1.0 - -LIB_SOCKET= -LIB_MATH= -lm -LIB_KVM= - -#LDOPTS= $(LIBS_PATH) $(LDPATH) $(RUNPATH:-R%=-Wl,-R%) -LDOPTS= $(LIBS_PATH) $(LDPATH) - -LORDER= echo -TSORT= cat diff -Nru cdrtools-2.01.01a33/RULES/i386-mingw32_nt-gcc.rul cdrtools-3.02a09/RULES/i386-mingw32_nt-gcc.rul --- cdrtools-2.01.01a33/RULES/i386-mingw32_nt-gcc.rul 2007-05-08 11:07:57.000000000 +0000 +++ cdrtools-3.02a09/RULES/i386-mingw32_nt-gcc.rul 2015-03-26 21:34:35.000000000 +0000 @@ -1,4 +1,4 @@ -#ident "@(#)i386-mingw32_nt-gcc.rul 1.7 07/05/08 " +#ident "@(#)i386-mingw32_nt-gcc.rul 1.13 15/03/26 " ########################################################################### # # Platform dependent MACROS for Win32/Mingw32 @@ -12,6 +12,8 @@ # with the License. # # See the file CDDL.Schily.txt in this distribution for details. +# A copy of the CDDL is also available via the Internet at +# http://www.opensource.org/licenses/cddl1.txt # # When distributing Covered Code, include this CDDL HEADER in each # file and include the License file CDDL.Schily.txt from this distribution. @@ -21,7 +23,7 @@ include $(SRCROOT)/$(RULESDIR)/cc-gcc.rul OSDEFS += -CPPOPTS= -I/MinGW/Include -I$(ARCHDIR) -I$(OINCSDIR) $(INCDIRS:%=-I%) $(INCDIRSX:%=-I%) $(OSDEFS) +CPPOPTS= -I/MinGW/Include -I$(ARCHDIR) -I$(OINCSDIR) $(INCDIRS:%=-I%) $(INCDIRSX:%=-I%) KDEFINES= -DKERNEL -D_KERNEL @@ -33,12 +35,15 @@ LIB_MATH= -lm LIB_KVM= -LDFLAGS= $(LDOPTS) $(LDOPTX) -LDLIBS= $(LIBS) $(LIBX) -lmgw32 +WIN_LIBS= $(WIN32_LIBS) + +LDLIBS= $(LIBS) $(LIBX) $(WIN_LIBS) -lmingw32 LDOPTS= $(LIBS_PATH) $(LDPATH) LORDER= echo TSORT= cat +_MKDIR= $(_MKDIR_SH) MKDIR= $(MKDIR_SH) +INSMKDIR= $(INSMKDIR_SH) diff -Nru cdrtools-2.01.01a33/RULES/i386-minix-clang.rul cdrtools-3.02a09/RULES/i386-minix-clang.rul --- cdrtools-2.01.01a33/RULES/i386-minix-clang.rul 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/RULES/i386-minix-clang.rul 2015-11-18 20:44:02.000000000 +0000 @@ -0,0 +1,41 @@ +#ident "@(#)i386-minix-clang.rul 1.2 15/11/18 " +########################################################################### +# Written 2015 by J. Schilling +########################################################################### +# +# Platform dependent MACROS for Minix 3 using Clang +# +########################################################################### +# Copyright (c) J. Schilling +########################################################################### +# The contents of this file are subject to the terms of the +# Common Development and Distribution License, Version 1.0 only +# (the "License"). You may not use this file except in compliance +# with the License. +# +# See the file CDDL.Schily.txt in this distribution for details. +# A copy of the CDDL is also available via the Internet at +# http://www.opensource.org/licenses/cddl1.txt +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file CDDL.Schily.txt from this distribution. +########################################################################### +include $(SRCROOT)/$(RULESDIR)/rules.prg +########################################################################### +include $(SRCROOT)/$(RULESDIR)/cc-$(C_ARCH).rul + +OSDEFS += + +KDEFINES= -DKERNEL -D_KERNEL + +LIB_PREFIX= lib +LIB_SUFFIX= .a +SHL_SUFFIX= .so.1.0 + +LIB_SOCKET= +LIB_MATH= -lm +LIB_KVM= + +LDOPTS= $(LIBS_PATH) $(LDPATH) + +RANLIB= @echo " ==> RANDOMIZING ARCHIVE \"$@\""; ranlib diff -Nru cdrtools-2.01.01a33/RULES/i386-nextstep-cc.rul cdrtools-3.02a09/RULES/i386-nextstep-cc.rul --- cdrtools-2.01.01a33/RULES/i386-nextstep-cc.rul 2007-05-09 12:25:30.000000000 +0000 +++ cdrtools-3.02a09/RULES/i386-nextstep-cc.rul 1970-01-01 00:00:00.000000000 +0000 @@ -1,52 +0,0 @@ -#ident "@(#)hppa-nextstep-cc.rul 1.10 07/05/09 " -########################################################################### -# Written 1996 by J. Schilling -########################################################################### -# -# Platform dependent MACROS for NeXT Step on hppa (GCC) -# -########################################################################### -# Copyright (c) J. Schilling -########################################################################### -# The contents of this file are subject to the terms of the -# Common Development and Distribution License, Version 1.0 only -# (the "License"). You may not use this file except in compliance -# with the License. -# -# See the file CDDL.Schily.txt in this distribution for details. -# -# When distributing Covered Code, include this CDDL HEADER in each -# file and include the License file CDDL.Schily.txt from this distribution. -########################################################################### -include $(SRCROOT)/$(RULESDIR)/rules.prg -########################################################################### -include $(SRCROOT)/$(RULESDIR)/cc-gcc.rul - -OSDEFS += - -KDEFINES= -DKERNEL -D_KERNEL - -LIB_PREFIX= lib -LIB_SUFFIX= .a -SHL_SUFFIX= .so.1.0 - -LIB_SOCKET= -LIB_MATH= -lm -LIB_KVM= - -#LDOPTS= $(LIBS_PATH) $(LDPATH) $(RUNPATH:-R%=-Wl,-R%) -LDOPTS= $(LIBS_PATH) $(LDPATH) -LDOPTDYN= -LNDYNLIB= @ - -DYNLD= @echo " ==> LINKING dynamic library \"$@\""; ld -RANLIB= @echo " ==> RANDOMIZING ARCHIVE \"$@\""; ranlib - -MKDIR= $(MKDIR_SH) - -#### -# XXX Better use something like CC=cc -#### -CC= @echo " ==> COMPILING \"$@\""; cc -LDCC= @echo " ==> LINKING \"$@\""; cc -MKDEP= @echo " ==> MAKING DEPENDENCIES \"$@\""; $(RMDEP); cc -M diff -Nru cdrtools-2.01.01a33/RULES/i386-nextstep-gcc.rul cdrtools-3.02a09/RULES/i386-nextstep-gcc.rul --- cdrtools-2.01.01a33/RULES/i386-nextstep-gcc.rul 2007-05-09 12:25:30.000000000 +0000 +++ cdrtools-3.02a09/RULES/i386-nextstep-gcc.rul 1970-01-01 00:00:00.000000000 +0000 @@ -1,52 +0,0 @@ -#ident "@(#)hppa-nextstep-cc.rul 1.10 07/05/09 " -########################################################################### -# Written 1996 by J. Schilling -########################################################################### -# -# Platform dependent MACROS for NeXT Step on hppa (GCC) -# -########################################################################### -# Copyright (c) J. Schilling -########################################################################### -# The contents of this file are subject to the terms of the -# Common Development and Distribution License, Version 1.0 only -# (the "License"). You may not use this file except in compliance -# with the License. -# -# See the file CDDL.Schily.txt in this distribution for details. -# -# When distributing Covered Code, include this CDDL HEADER in each -# file and include the License file CDDL.Schily.txt from this distribution. -########################################################################### -include $(SRCROOT)/$(RULESDIR)/rules.prg -########################################################################### -include $(SRCROOT)/$(RULESDIR)/cc-gcc.rul - -OSDEFS += - -KDEFINES= -DKERNEL -D_KERNEL - -LIB_PREFIX= lib -LIB_SUFFIX= .a -SHL_SUFFIX= .so.1.0 - -LIB_SOCKET= -LIB_MATH= -lm -LIB_KVM= - -#LDOPTS= $(LIBS_PATH) $(LDPATH) $(RUNPATH:-R%=-Wl,-R%) -LDOPTS= $(LIBS_PATH) $(LDPATH) -LDOPTDYN= -LNDYNLIB= @ - -DYNLD= @echo " ==> LINKING dynamic library \"$@\""; ld -RANLIB= @echo " ==> RANDOMIZING ARCHIVE \"$@\""; ranlib - -MKDIR= $(MKDIR_SH) - -#### -# XXX Better use something like CC=cc -#### -CC= @echo " ==> COMPILING \"$@\""; cc -LDCC= @echo " ==> LINKING \"$@\""; cc -MKDEP= @echo " ==> MAKING DEPENDENCIES \"$@\""; $(RMDEP); cc -M diff -Nru cdrtools-2.01.01a33/RULES/i386-openserver-cc.rul cdrtools-3.02a09/RULES/i386-openserver-cc.rul --- cdrtools-2.01.01a33/RULES/i386-openserver-cc.rul 2007-05-08 11:03:08.000000000 +0000 +++ cdrtools-3.02a09/RULES/i386-openserver-cc.rul 2013-07-21 14:31:30.000000000 +0000 @@ -1,4 +1,4 @@ -#ident "@(#)i386-openserver-cc.rul 1.4 07/05/08 " +#ident "@(#)i386-openserver-cc.rul 1.5 13/07/21 " ########################################################################### # Written 1999 by J. Schilling/Santa Cruz Operation ########################################################################### @@ -30,11 +30,6 @@ LIB_MATH= -lm LIB_KVM= -CC= @echo " ==> COMPILING \"$@\""; cc -LDCC= @echo " ==> LINKING \"$@\""; cc -DYNLD= @echo " ==> LINKING dynamic library \"$@\""; cc -RANLIB= @echo " ==> RANDOMIZING ARCHIVE \"$@\""; true - LORDER= echo TSORT= cat diff -Nru cdrtools-2.01.01a33/RULES/i386-openserver-gcc.rul cdrtools-3.02a09/RULES/i386-openserver-gcc.rul --- cdrtools-2.01.01a33/RULES/i386-openserver-gcc.rul 2007-05-08 11:03:08.000000000 +0000 +++ cdrtools-3.02a09/RULES/i386-openserver-gcc.rul 2015-03-26 21:34:35.000000000 +0000 @@ -1,6 +1,6 @@ -#ident "@(#)i386-openserver-gcc.rul 1.7 07/05/08 " +#ident "@(#)i386-openserver-gcc.rul 1.9 15/03/26 " ########################################################################### -# Written 1999 by J. Schilling/Santa Cruz Operation +# Written 1999-2015 by J. Schilling/Santa Cruz Operation ########################################################################### # # Platform dependent MACROS for SCO OpenServer 5 using gcc @@ -14,6 +14,8 @@ # with the License. # # See the file CDDL.Schily.txt in this distribution for details. +# A copy of the CDDL is also available via the Internet at +# http://www.opensource.org/licenses/cddl1.txt # # When distributing Covered Code, include this CDDL HEADER in each # file and include the License file CDDL.Schily.txt from this distribution. @@ -41,4 +43,6 @@ LORDER= echo TSORT= cat +_MKDIR= $(_MKDIR_SH) MKDIR= $(MKDIR_SH) +INSMKDIR= $(INSMKDIR_SH) diff -Nru cdrtools-2.01.01a33/RULES/i486-cygwin32_nt-cc.rul cdrtools-3.02a09/RULES/i486-cygwin32_nt-cc.rul --- cdrtools-2.01.01a33/RULES/i486-cygwin32_nt-cc.rul 2007-05-09 12:25:30.000000000 +0000 +++ cdrtools-3.02a09/RULES/i486-cygwin32_nt-cc.rul 2017-07-06 21:28:49.000000000 +0000 @@ -1,6 +1,6 @@ -#ident "@(#)i486-cygwin32_nt-cc.rul 1.10 07/05/09 " +#ident "@(#)i486-cygwin32_nt-cc.rul 1.12 17/07/06 " ########################################################################### -# Written 1998 by B. Bochow +# Written 1998 by J. Schilling ########################################################################### # # Platform dependent MACROS for CYGWIN32_NT @@ -14,13 +14,15 @@ # with the License. # # See the file CDDL.Schily.txt in this distribution for details. +# A copy of the CDDL is also available via the Internet at +# http://www.opensource.org/licenses/cddl1.txt # # When distributing Covered Code, include this CDDL HEADER in each # file and include the License file CDDL.Schily.txt from this distribution. ########################################################################### include $(SRCROOT)/$(RULESDIR)/rules.prg ########################################################################### -include $(SRCROOT)/$(RULESDIR)/cc-gcc.rul +include $(SRCROOT)/$(RULESDIR)/cc-$(C_ARCH:cc%=gcc%).rul OSDEFS += -mwin32 @@ -39,11 +41,8 @@ #LDOPTS= $(LIBS_PATH) $(LDPATH) $(RUNPATH:-R%=-Wl,-R%) LDOPTS= $(LIBS_PATH) $(LDPATH) #LDOPTDYN= -shared -Wl,-soname,$(TARGET) -LDOPTDYN= #LNDYNLIB= @$(RM) $(RM_FORCE) $(PTARGET_BASE).so; $(SYMLINK) $(TARGET) $(PTARGET_BASE).so LNDYNLIB= -DYNLD= @echo " ==> LINKING dynamic library \"$@\""; ld - LORDER= echo TSORT= cat diff -Nru cdrtools-2.01.01a33/RULES/i486-cygwin32_nt-cl.rul cdrtools-3.02a09/RULES/i486-cygwin32_nt-cl.rul --- cdrtools-2.01.01a33/RULES/i486-cygwin32_nt-cl.rul 2007-04-26 15:03:45.000000000 +0000 +++ cdrtools-3.02a09/RULES/i486-cygwin32_nt-cl.rul 2009-05-21 10:46:53.000000000 +0000 @@ -1,4 +1,4 @@ -#ident "@(#)i486-cygwin32_nt-cl.rul 1.7 07/04/20 " +#ident "@(#)i486-cygwin32_nt-cl.rul 1.8 09/05/21 " ########################################################################### # Written 2006 by J. Schilling ########################################################################### @@ -30,6 +30,14 @@ # OSDEFS += -D_CRT_SECURE_NO_DEPRECATE +# +# Supress useless cl warnings like: +# warning C4996: 'fdopen' wurde als veraltet deklariert +# The POSIX name for this item is deprecated. Instead, use +# the ISO C++ conformant name: _fdopen. +# +OSDEFS += -D_CRT_NONSTDC_NO_DEPRECATE + KDEFINES= LIB_SOCKET= Ws2_32.lib diff -Nru cdrtools-2.01.01a33/RULES/i486-cygwin32_nt-gcc.rul cdrtools-3.02a09/RULES/i486-cygwin32_nt-gcc.rul --- cdrtools-2.01.01a33/RULES/i486-cygwin32_nt-gcc.rul 2007-05-09 12:25:30.000000000 +0000 +++ cdrtools-3.02a09/RULES/i486-cygwin32_nt-gcc.rul 2017-07-06 21:28:49.000000000 +0000 @@ -1,6 +1,6 @@ -#ident "@(#)i486-cygwin32_nt-gcc.rul 1.10 07/05/09 " +#ident "@(#)i486-cygwin32_nt-gcc.rul 1.12 17/07/06 " ########################################################################### -# Written 1998 by B. Bochow +# Written 1998 by J. Schilling ########################################################################### # # Platform dependent MACROS for CYGWIN32_NT @@ -14,13 +14,15 @@ # with the License. # # See the file CDDL.Schily.txt in this distribution for details. +# A copy of the CDDL is also available via the Internet at +# http://www.opensource.org/licenses/cddl1.txt # # When distributing Covered Code, include this CDDL HEADER in each # file and include the License file CDDL.Schily.txt from this distribution. ########################################################################### include $(SRCROOT)/$(RULESDIR)/rules.prg ########################################################################### -include $(SRCROOT)/$(RULESDIR)/cc-gcc.rul +include $(SRCROOT)/$(RULESDIR)/cc-$(C_ARCH).rul OSDEFS += -mwin32 @@ -39,11 +41,8 @@ #LDOPTS= $(LIBS_PATH) $(LDPATH) $(RUNPATH:-R%=-Wl,-R%) LDOPTS= $(LIBS_PATH) $(LDPATH) #LDOPTDYN= -shared -Wl,-soname,$(TARGET) -LDOPTDYN= #LNDYNLIB= @$(RM) $(RM_FORCE) $(PTARGET_BASE).so; $(SYMLINK) $(TARGET) $(PTARGET_BASE).so LNDYNLIB= -DYNLD= @echo " ==> LINKING dynamic library \"$@\""; ld - LORDER= echo TSORT= cat diff -Nru cdrtools-2.01.01a33/RULES/i486-linux-cc.rul cdrtools-3.02a09/RULES/i486-linux-cc.rul --- cdrtools-2.01.01a33/RULES/i486-linux-cc.rul 2007-05-09 12:25:30.000000000 +0000 +++ cdrtools-3.02a09/RULES/i486-linux-cc.rul 1970-01-01 00:00:00.000000000 +0000 @@ -1,45 +0,0 @@ -#ident "@(#)i586-linux-cc.rul 1.11 07/05/09 " -########################################################################### -# Written 1996 by J. Schilling -########################################################################### -# -# Platform dependent MACROS for Linux -# -########################################################################### -# Copyright (c) J. Schilling -########################################################################### -# The contents of this file are subject to the terms of the -# Common Development and Distribution License, Version 1.0 only -# (the "License"). You may not use this file except in compliance -# with the License. -# -# See the file CDDL.Schily.txt in this distribution for details. -# -# When distributing Covered Code, include this CDDL HEADER in each -# file and include the License file CDDL.Schily.txt from this distribution. -########################################################################### -include $(SRCROOT)/$(RULESDIR)/rules.prg -########################################################################### -include $(SRCROOT)/$(RULESDIR)/cc-gcc.rul - -# -# LINUX_SRC_INCLUDE is defined in DEFAULTS/Defaults.linux -# -INCDIRSX += $(LINUX_SRC_INCLUDE) -OSDEFS += - -KDEFINES= -DKERNEL -D_KERNEL - -LIB_PREFIX= lib -LIB_SUFFIX= .a -SHL_SUFFIX= .so.1.0 - -LIB_SOCKET= -LIB_MATH= -lm -LIB_KVM= - -#LDOPTS= $(LIBS_PATH) $(LDPATH) $(RUNPATH:-R%=-Wl,-R%) -LDOPTS= $(LIBS_PATH) $(LDPATH) - -LORDER= echo -TSORT= cat diff -Nru cdrtools-2.01.01a33/RULES/i486-linux-gcc.rul cdrtools-3.02a09/RULES/i486-linux-gcc.rul --- cdrtools-2.01.01a33/RULES/i486-linux-gcc.rul 2007-05-09 12:25:30.000000000 +0000 +++ cdrtools-3.02a09/RULES/i486-linux-gcc.rul 1970-01-01 00:00:00.000000000 +0000 @@ -1,45 +0,0 @@ -#ident "@(#)i586-linux-gcc.rul 1.11 07/05/09 " -########################################################################### -# Written 1996 by J. Schilling -########################################################################### -# -# Platform dependent MACROS for Linux -# -########################################################################### -# Copyright (c) J. Schilling -########################################################################### -# The contents of this file are subject to the terms of the -# Common Development and Distribution License, Version 1.0 only -# (the "License"). You may not use this file except in compliance -# with the License. -# -# See the file CDDL.Schily.txt in this distribution for details. -# -# When distributing Covered Code, include this CDDL HEADER in each -# file and include the License file CDDL.Schily.txt from this distribution. -########################################################################### -include $(SRCROOT)/$(RULESDIR)/rules.prg -########################################################################### -include $(SRCROOT)/$(RULESDIR)/cc-gcc.rul - -# -# LINUX_SRC_INCLUDE is defined in DEFAULTS/Defaults.linux -# -INCDIRSX += $(LINUX_SRC_INCLUDE) -OSDEFS += - -KDEFINES= -DKERNEL -D_KERNEL - -LIB_PREFIX= lib -LIB_SUFFIX= .a -SHL_SUFFIX= .so.1.0 - -LIB_SOCKET= -LIB_MATH= -lm -LIB_KVM= - -#LDOPTS= $(LIBS_PATH) $(LDPATH) $(RUNPATH:-R%=-Wl,-R%) -LDOPTS= $(LIBS_PATH) $(LDPATH) - -LORDER= echo -TSORT= cat diff -Nru cdrtools-2.01.01a33/RULES/i486-linux-suncc.rul cdrtools-3.02a09/RULES/i486-linux-suncc.rul --- cdrtools-2.01.01a33/RULES/i486-linux-suncc.rul 2007-06-16 13:34:28.000000000 +0000 +++ cdrtools-3.02a09/RULES/i486-linux-suncc.rul 1970-01-01 00:00:00.000000000 +0000 @@ -1,46 +0,0 @@ -#ident "@(#)i586-linux-suncc.rul 1.1 07/06/16 " -########################################################################### -# Written 2007 by J. Schilling -########################################################################### -# -# Platform dependent MACROS for Linux using Sun Studio -# -########################################################################### -# Copyright (c) J. Schilling -########################################################################### -# The contents of this file are subject to the terms of the -# Common Development and Distribution License, Version 1.0 only -# (the "License"). You may not use this file except in compliance -# with the License. -# -# See the file CDDL.Schily.txt in this distribution for details. -# -# When distributing Covered Code, include this CDDL HEADER in each -# file and include the License file CDDL.Schily.txt from this distribution. -########################################################################### -include $(SRCROOT)/$(RULESDIR)/rules.prg -########################################################################### -include $(SRCROOT)/$(RULESDIR)/cc-sunpro.rul -CC_COM= suncc - -# -# LINUX_SRC_INCLUDE is defined in DEFAULTS/Defaults.linux -# -INCDIRSX += $(LINUX_SRC_INCLUDE) -OSDEFS += - -KDEFINES= -DKERNEL -D_KERNEL - -LIB_PREFIX= lib -LIB_SUFFIX= .a -SHL_SUFFIX= .so.1.0 - -LIB_SOCKET= -LIB_MATH= -lm -LIB_KVM= - -#LDOPTS= $(LIBS_PATH) $(LDPATH) $(RUNPATH:-R%=-Wl,-R%) -LDOPTS= $(LIBS_PATH) $(LDPATH) - -LORDER= echo -TSORT= cat diff -Nru cdrtools-2.01.01a33/RULES/i486-mingw32_nt-gcc.rul cdrtools-3.02a09/RULES/i486-mingw32_nt-gcc.rul --- cdrtools-2.01.01a33/RULES/i486-mingw32_nt-gcc.rul 2007-05-08 11:07:58.000000000 +0000 +++ cdrtools-3.02a09/RULES/i486-mingw32_nt-gcc.rul 2015-03-26 21:34:35.000000000 +0000 @@ -1,4 +1,4 @@ -#ident "@(#)i486-mingw32_nt-gcc.rul 1.7 07/05/08 " +#ident "@(#)i486-mingw32_nt-gcc.rul 1.12 15/03/26 " ########################################################################### # # Platform dependent MACROS for Win32/Mingw32 @@ -12,6 +12,8 @@ # with the License. # # See the file CDDL.Schily.txt in this distribution for details. +# A copy of the CDDL is also available via the Internet at +# http://www.opensource.org/licenses/cddl1.txt # # When distributing Covered Code, include this CDDL HEADER in each # file and include the License file CDDL.Schily.txt from this distribution. @@ -21,8 +23,7 @@ include $(SRCROOT)/$(RULESDIR)/cc-gcc.rul OSDEFS += - -CPPOPTS= -I/MinGW/Include -I$(ARCHDIR) -I$(OINCSDIR) $(INCDIRS:%=-I%) $(INCDIRSX:%=-I%) $(OSDEFS) +CPPOPTS= -I/MinGW/Include -I$(ARCHDIR) -I$(OINCSDIR) $(INCDIRS:%=-I%) $(INCDIRSX:%=-I%) KDEFINES= -DKERNEL -D_KERNEL @@ -34,11 +35,15 @@ LIB_MATH= -lm LIB_KVM= -LDLIBS= $(LIBS) $(LIBX) -lmgw32 +WIN_LIBS= $(WIN32_LIBS) + +LDLIBS= $(LIBS) $(LIBX) $(WIN_LIBS) -lmingw32 LDOPTS= $(LIBS_PATH) $(LDPATH) LORDER= echo TSORT= cat +_MKDIR= $(_MKDIR_SH) MKDIR= $(MKDIR_SH) +INSMKDIR= $(INSMKDIR_SH) diff -Nru cdrtools-2.01.01a33/RULES/i486-ms-dos-gcc.rul cdrtools-3.02a09/RULES/i486-ms-dos-gcc.rul --- cdrtools-2.01.01a33/RULES/i486-ms-dos-gcc.rul 2007-05-08 11:03:08.000000000 +0000 +++ cdrtools-3.02a09/RULES/i486-ms-dos-gcc.rul 1970-01-01 00:00:00.000000000 +0000 @@ -1,44 +0,0 @@ -#ident "@(#)i386-ms-dos-gcc.rul 1.5 07/05/08 " -########################################################################### -# -# Platform dependent MACROS for MSDOS/DJGPP v2 -# -########################################################################### -# Copyright (c) J. Schilling -########################################################################### -# The contents of this file are subject to the terms of the -# Common Development and Distribution License, Version 1.0 only -# (the "License"). You may not use this file except in compliance -# with the License. -# -# See the file CDDL.Schily.txt in this distribution for details. -# -# When distributing Covered Code, include this CDDL HEADER in each -# file and include the License file CDDL.Schily.txt from this distribution. -########################################################################### -include $(SRCROOT)/$(RULESDIR)/rules.prg -########################################################################### -include $(SRCROOT)/$(RULESDIR)/cc-gcc.rul - -OSDEFS += - -COPTDYN= -COPTGPROF= -pg - -LIB_PREFIX= lib -LIB_SUFFIX= .a -SHL_SUFFIX= .so - -LIB_SOCKET= -LIB_MATH= -lm -LIB_KVM= - -LDOPTS= $(LIBS_PATH) $(LDPATH) -LDOPTDYN= -LNDYNLIB= - -#LDCC= @echo " ==> LINKING \"$@\""; gcc -Wl,--strip-all -DYNLD= @echo " ==> LINKING dynamic library \"$@\""; ld - -LORDER= echo -TSORT= cat diff -Nru cdrtools-2.01.01a33/RULES/i486-unixware-cc.rul cdrtools-3.02a09/RULES/i486-unixware-cc.rul --- cdrtools-2.01.01a33/RULES/i486-unixware-cc.rul 2007-05-08 11:03:08.000000000 +0000 +++ cdrtools-3.02a09/RULES/i486-unixware-cc.rul 1970-01-01 00:00:00.000000000 +0000 @@ -1,36 +0,0 @@ -#ident "@(#)i386-unixware-cc.rul 1.7 07/05/08 " -########################################################################### -# Written 1999 by J. Schilling/Santa Cruz Operation -########################################################################### -# -# Platform dependent MACROS for SCO UnixWare 2.x / 7.x using cc -# -########################################################################### -# Copyright (c) J. Schilling -########################################################################### -# The contents of this file are subject to the terms of the -# Common Development and Distribution License, Version 1.0 only -# (the "License"). You may not use this file except in compliance -# with the License. -# -# See the file CDDL.Schily.txt in this distribution for details. -# -# When distributing Covered Code, include this CDDL HEADER in each -# file and include the License file CDDL.Schily.txt from this distribution. -########################################################################### -include $(SRCROOT)/$(RULESDIR)/rules.prg -########################################################################### -include $(SRCROOT)/$(RULESDIR)/cc-sco_uw.rul - -OSDEFS += -DUNIXWARE -DSVR4 - -KDEFINES= -DKERNEL -D_KERNEL - -LIB_SOCKET= -lsocket -lnsl -ldl -LIB_MATH= -lm -#LIB_KVM= -lkvm -LIB_KVM= - -ARFLAGS= cr -LORDER= echo -TSORT= cat diff -Nru cdrtools-2.01.01a33/RULES/i486-unixware-gcc.rul cdrtools-3.02a09/RULES/i486-unixware-gcc.rul --- cdrtools-2.01.01a33/RULES/i486-unixware-gcc.rul 2007-05-08 11:03:08.000000000 +0000 +++ cdrtools-3.02a09/RULES/i486-unixware-gcc.rul 1970-01-01 00:00:00.000000000 +0000 @@ -1,41 +0,0 @@ -#ident "@(#)i386-unixware-gcc.rul 1.6 07/05/08 " -########################################################################### -# Written 1999 by J. Schilling/Santa Cruz Operation -########################################################################### -# -# Platform dependent MACROS for SCO UnixWare 2.x / 7.x using gcc -# -########################################################################### -# Copyright (c) J. Schilling -########################################################################### -# The contents of this file are subject to the terms of the -# Common Development and Distribution License, Version 1.0 only -# (the "License"). You may not use this file except in compliance -# with the License. -# -# See the file CDDL.Schily.txt in this distribution for details. -# -# When distributing Covered Code, include this CDDL HEADER in each -# file and include the License file CDDL.Schily.txt from this distribution. -########################################################################### -include $(SRCROOT)/$(RULESDIR)/rules.prg -########################################################################### -include $(SRCROOT)/$(RULESDIR)/cc-gcc.rul - -OSDEFS += -DUNIXWARE -DSVR4 - -KDEFINES= -DKERNEL -D_KERNEL - -LIB_PREFIX= lib -LIB_SUFFIX= .a -SHL_SUFFIX= .so.1.0 - -LIB_SOCKET= -lsocket -lnsl -ldl -LIB_MATH= -lm -LIB_KVM= - -LDOPTS= $(LIBS_PATH) $(LDPATH) -LDOPTDYN= -dy -G $(TARGET) - -LORDER= echo -TSORT= cat diff -Nru cdrtools-2.01.01a33/RULES/i586-cygwin32_nt-cc.rul cdrtools-3.02a09/RULES/i586-cygwin32_nt-cc.rul --- cdrtools-2.01.01a33/RULES/i586-cygwin32_nt-cc.rul 2007-05-09 12:25:30.000000000 +0000 +++ cdrtools-3.02a09/RULES/i586-cygwin32_nt-cc.rul 1970-01-01 00:00:00.000000000 +0000 @@ -1,49 +0,0 @@ -#ident "@(#)i486-cygwin32_nt-cc.rul 1.10 07/05/09 " -########################################################################### -# Written 1998 by B. Bochow -########################################################################### -# -# Platform dependent MACROS for CYGWIN32_NT -# -########################################################################### -# Copyright (c) J. Schilling -########################################################################### -# The contents of this file are subject to the terms of the -# Common Development and Distribution License, Version 1.0 only -# (the "License"). You may not use this file except in compliance -# with the License. -# -# See the file CDDL.Schily.txt in this distribution for details. -# -# When distributing Covered Code, include this CDDL HEADER in each -# file and include the License file CDDL.Schily.txt from this distribution. -########################################################################### -include $(SRCROOT)/$(RULESDIR)/rules.prg -########################################################################### -include $(SRCROOT)/$(RULESDIR)/cc-gcc.rul - -OSDEFS += -mwin32 - -KDEFINES= -#COPTDYN= -fpic -COPTDYN= - -LIB_PREFIX= lib -LIB_SUFFIX= .a -SHL_SUFFIX= .dll - -LIB_SOCKET= -LIB_MATH= -lm -LIB_KVM= - -#LDOPTS= $(LIBS_PATH) $(LDPATH) $(RUNPATH:-R%=-Wl,-R%) -LDOPTS= $(LIBS_PATH) $(LDPATH) -#LDOPTDYN= -shared -Wl,-soname,$(TARGET) -LDOPTDYN= -#LNDYNLIB= @$(RM) $(RM_FORCE) $(PTARGET_BASE).so; $(SYMLINK) $(TARGET) $(PTARGET_BASE).so -LNDYNLIB= - -DYNLD= @echo " ==> LINKING dynamic library \"$@\""; ld - -LORDER= echo -TSORT= cat diff -Nru cdrtools-2.01.01a33/RULES/i586-cygwin32_nt-cl.rul cdrtools-3.02a09/RULES/i586-cygwin32_nt-cl.rul --- cdrtools-2.01.01a33/RULES/i586-cygwin32_nt-cl.rul 2007-04-26 15:03:45.000000000 +0000 +++ cdrtools-3.02a09/RULES/i586-cygwin32_nt-cl.rul 1970-01-01 00:00:00.000000000 +0000 @@ -1,40 +0,0 @@ -#ident "@(#)i486-cygwin32_nt-cl.rul 1.7 07/04/20 " -########################################################################### -# Written 2006 by J. Schilling -########################################################################### -# -# Platform dependent MACROS for CYGWIN32_NT using MSVC -# -########################################################################### -# Copyright (c) J. Schilling -########################################################################### -# The contents of this file are subject to the terms of the -# Common Development and Distribution License, Version 1.0 only -# (the "License"). You may not use this file except in compliance -# with the License. -# -# See the file CDDL.Schily.txt in this distribution for details. -# -# When distributing Covered Code, include this CDDL HEADER in each -# file and include the License file CDDL.Schily.txt from this distribution. -########################################################################### -include $(SRCROOT)/$(RULESDIR)/rules.prg -########################################################################### -_PLATFORM= cygwin -include $(SRCROOT)/$(RULESDIR)/cc-msc.rul - -# -# Supress useless cl warnings like: -# warning C4996: 'strerror' wurde als veraltet deklariert -# Consider using strerror_s instead. -# -OSDEFS += -D_CRT_SECURE_NO_DEPRECATE - -KDEFINES= - -LIB_SOCKET= Ws2_32.lib -LIB_MATH= -LIB_KVM= - -LORDER= echo -TSORT= cat diff -Nru cdrtools-2.01.01a33/RULES/i586-cygwin32_nt-gcc.rul cdrtools-3.02a09/RULES/i586-cygwin32_nt-gcc.rul --- cdrtools-2.01.01a33/RULES/i586-cygwin32_nt-gcc.rul 2007-05-09 12:25:30.000000000 +0000 +++ cdrtools-3.02a09/RULES/i586-cygwin32_nt-gcc.rul 1970-01-01 00:00:00.000000000 +0000 @@ -1,49 +0,0 @@ -#ident "@(#)i486-cygwin32_nt-gcc.rul 1.10 07/05/09 " -########################################################################### -# Written 1998 by B. Bochow -########################################################################### -# -# Platform dependent MACROS for CYGWIN32_NT -# -########################################################################### -# Copyright (c) J. Schilling -########################################################################### -# The contents of this file are subject to the terms of the -# Common Development and Distribution License, Version 1.0 only -# (the "License"). You may not use this file except in compliance -# with the License. -# -# See the file CDDL.Schily.txt in this distribution for details. -# -# When distributing Covered Code, include this CDDL HEADER in each -# file and include the License file CDDL.Schily.txt from this distribution. -########################################################################### -include $(SRCROOT)/$(RULESDIR)/rules.prg -########################################################################### -include $(SRCROOT)/$(RULESDIR)/cc-gcc.rul - -OSDEFS += -mwin32 - -KDEFINES= -#COPTDYN= -fpic -COPTDYN= - -LIB_PREFIX= lib -LIB_SUFFIX= .a -SHL_SUFFIX= .dll - -LIB_SOCKET= -LIB_MATH= -lm -LIB_KVM= - -#LDOPTS= $(LIBS_PATH) $(LDPATH) $(RUNPATH:-R%=-Wl,-R%) -LDOPTS= $(LIBS_PATH) $(LDPATH) -#LDOPTDYN= -shared -Wl,-soname,$(TARGET) -LDOPTDYN= -#LNDYNLIB= @$(RM) $(RM_FORCE) $(PTARGET_BASE).so; $(SYMLINK) $(TARGET) $(PTARGET_BASE).so -LNDYNLIB= - -DYNLD= @echo " ==> LINKING dynamic library \"$@\""; ld - -LORDER= echo -TSORT= cat diff -Nru cdrtools-2.01.01a33/RULES/i586-linux-cc.rul cdrtools-3.02a09/RULES/i586-linux-cc.rul --- cdrtools-2.01.01a33/RULES/i586-linux-cc.rul 2007-05-09 12:25:30.000000000 +0000 +++ cdrtools-3.02a09/RULES/i586-linux-cc.rul 2015-03-26 21:30:41.000000000 +0000 @@ -1,4 +1,4 @@ -#ident "@(#)i586-linux-cc.rul 1.11 07/05/09 " +#ident "@(#)i586-linux-cc.rul 1.14 15/03/26 " ########################################################################### # Written 1996 by J. Schilling ########################################################################### @@ -14,13 +14,15 @@ # with the License. # # See the file CDDL.Schily.txt in this distribution for details. +# A copy of the CDDL is also available via the Internet at +# http://www.opensource.org/licenses/cddl1.txt # # When distributing Covered Code, include this CDDL HEADER in each # file and include the License file CDDL.Schily.txt from this distribution. ########################################################################### include $(SRCROOT)/$(RULESDIR)/rules.prg ########################################################################### -include $(SRCROOT)/$(RULESDIR)/cc-gcc.rul +include $(SRCROOT)/$(RULESDIR)/cc-g$(C_ARCH).rul # # LINUX_SRC_INCLUDE is defined in DEFAULTS/Defaults.linux @@ -39,7 +41,11 @@ LIB_KVM= #LDOPTS= $(LIBS_PATH) $(LDPATH) $(RUNPATH:-R%=-Wl,-R%) -LDOPTS= $(LIBS_PATH) $(LDPATH) +# +# Uncomment the next line in case you are on an old Linux version that +# does not support the -R linker flag. +# +#LDOPTS= $(LIBS_PATH) $(LDPATH) LORDER= echo TSORT= cat diff -Nru cdrtools-2.01.01a33/RULES/i586-linux-clang.rul cdrtools-3.02a09/RULES/i586-linux-clang.rul --- cdrtools-2.01.01a33/RULES/i586-linux-clang.rul 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/RULES/i586-linux-clang.rul 2014-04-02 21:04:29.000000000 +0000 @@ -0,0 +1,51 @@ +#ident "@(#)i586-linux-clang.rul 1.1 14/04/02 " +########################################################################### +# Written 1996-2014 by J. Schilling +########################################################################### +# +# Platform dependent MACROS for Linux using Clang +# +########################################################################### +# Copyright (c) J. Schilling +########################################################################### +# The contents of this file are subject to the terms of the +# Common Development and Distribution License, Version 1.0 only +# (the "License"). You may not use this file except in compliance +# with the License. +# +# See the file CDDL.Schily.txt in this distribution for details. +# A copy of the CDDL is also available via the Internet at +# http://www.opensource.org/licenses/cddl1.txt +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file CDDL.Schily.txt from this distribution. +########################################################################### +include $(SRCROOT)/$(RULESDIR)/rules.prg +########################################################################### +include $(SRCROOT)/$(RULESDIR)/cc-$(C_ARCH).rul + +# +# LINUX_SRC_INCLUDE is defined in DEFAULTS/Defaults.linux +# +INCDIRSX += $(LINUX_SRC_INCLUDE) +OSDEFS += + +KDEFINES= -DKERNEL -D_KERNEL + +LIB_PREFIX= lib +LIB_SUFFIX= .a +SHL_SUFFIX= .so.1.0 + +LIB_SOCKET= +LIB_MATH= -lm +LIB_KVM= + +#LDOPTS= $(LIBS_PATH) $(LDPATH) $(RUNPATH:-R%=-Wl,-R%) +# +# Uncomment the next line in case you are on an old Linux version that +# does not support the -R linker flag. +# +#LDOPTS= $(LIBS_PATH) $(LDPATH) + +LORDER= echo +TSORT= cat diff -Nru cdrtools-2.01.01a33/RULES/i586-linux-gcc.rul cdrtools-3.02a09/RULES/i586-linux-gcc.rul --- cdrtools-2.01.01a33/RULES/i586-linux-gcc.rul 2007-05-09 12:25:30.000000000 +0000 +++ cdrtools-3.02a09/RULES/i586-linux-gcc.rul 2015-03-26 21:30:41.000000000 +0000 @@ -1,4 +1,4 @@ -#ident "@(#)i586-linux-gcc.rul 1.11 07/05/09 " +#ident "@(#)i586-linux-gcc.rul 1.14 15/03/26 " ########################################################################### # Written 1996 by J. Schilling ########################################################################### @@ -14,13 +14,15 @@ # with the License. # # See the file CDDL.Schily.txt in this distribution for details. +# A copy of the CDDL is also available via the Internet at +# http://www.opensource.org/licenses/cddl1.txt # # When distributing Covered Code, include this CDDL HEADER in each # file and include the License file CDDL.Schily.txt from this distribution. ########################################################################### include $(SRCROOT)/$(RULESDIR)/rules.prg ########################################################################### -include $(SRCROOT)/$(RULESDIR)/cc-gcc.rul +include $(SRCROOT)/$(RULESDIR)/cc-$(C_ARCH).rul # # LINUX_SRC_INCLUDE is defined in DEFAULTS/Defaults.linux @@ -39,7 +41,11 @@ LIB_KVM= #LDOPTS= $(LIBS_PATH) $(LDPATH) $(RUNPATH:-R%=-Wl,-R%) -LDOPTS= $(LIBS_PATH) $(LDPATH) +# +# Uncomment the next line in case you are on an old Linux version that +# does not support the -R linker flag. +# +#LDOPTS= $(LIBS_PATH) $(LDPATH) LORDER= echo TSORT= cat diff -Nru cdrtools-2.01.01a33/RULES/i586-linux-suncc.rul cdrtools-3.02a09/RULES/i586-linux-suncc.rul --- cdrtools-2.01.01a33/RULES/i586-linux-suncc.rul 2007-06-16 13:34:28.000000000 +0000 +++ cdrtools-3.02a09/RULES/i586-linux-suncc.rul 2014-04-01 11:59:09.000000000 +0000 @@ -1,6 +1,6 @@ -#ident "@(#)i586-linux-suncc.rul 1.1 07/06/16 " +#ident "@(#)i586-linux-suncc.rul 1.6 14/04/01 " ########################################################################### -# Written 2007 by J. Schilling +# Written 2007-2014 by J. Schilling ########################################################################### # # Platform dependent MACROS for Linux using Sun Studio @@ -14,14 +14,17 @@ # with the License. # # See the file CDDL.Schily.txt in this distribution for details. +# A copy of the CDDL is also available via the Internet at +# http://www.opensource.org/licenses/cddl1.txt # # When distributing Covered Code, include this CDDL HEADER in each # file and include the License file CDDL.Schily.txt from this distribution. ########################################################################### include $(SRCROOT)/$(RULESDIR)/rules.prg ########################################################################### -include $(SRCROOT)/$(RULESDIR)/cc-sunpro.rul -CC_COM= suncc +include $(SRCROOT)/$(RULESDIR)/cc-$(C_ARCH:cc%=sunpro%).rul +CC_COM_DEF= suncc +CC++_COM_DEF= sunCC # # LINUX_SRC_INCLUDE is defined in DEFAULTS/Defaults.linux @@ -40,7 +43,13 @@ LIB_KVM= #LDOPTS= $(LIBS_PATH) $(LDPATH) $(RUNPATH:-R%=-Wl,-R%) -LDOPTS= $(LIBS_PATH) $(LDPATH) +# +# Uncomment the next line in case you are on an old Linux version that +# does not support the -R linker flag. +# +#LDOPTS= $(LIBS_PATH) $(LDPATH) + +LDOPTDYN= -dy -G -Wl,-shared -Wl,-soname,$(TARGET) LORDER= echo TSORT= cat diff -Nru cdrtools-2.01.01a33/RULES/i586-mingw32_nt-gcc.rul cdrtools-3.02a09/RULES/i586-mingw32_nt-gcc.rul --- cdrtools-2.01.01a33/RULES/i586-mingw32_nt-gcc.rul 2007-05-08 11:07:58.000000000 +0000 +++ cdrtools-3.02a09/RULES/i586-mingw32_nt-gcc.rul 2015-03-26 21:34:35.000000000 +0000 @@ -1,4 +1,4 @@ -#ident "@(#)i586-mingw32_nt-gcc.rul 1.7 07/05/08 " +#ident "@(#)i586-mingw32_nt-gcc.rul 1.12 15/03/26 " ########################################################################### # # Platform dependent MACROS for Win32/Mingw32 @@ -12,6 +12,8 @@ # with the License. # # See the file CDDL.Schily.txt in this distribution for details. +# A copy of the CDDL is also available via the Internet at +# http://www.opensource.org/licenses/cddl1.txt # # When distributing Covered Code, include this CDDL HEADER in each # file and include the License file CDDL.Schily.txt from this distribution. @@ -21,7 +23,7 @@ include $(SRCROOT)/$(RULESDIR)/cc-gcc.rul OSDEFS += -CPPOPTS= -I/MinGW/Include -I$(ARCHDIR) -I$(OINCSDIR) $(INCDIRS:%=-I%) $(INCDIRSX:%=-I%) $(OSDEFS) +CPPOPTS= -I/MinGW/Include -I$(ARCHDIR) -I$(OINCSDIR) $(INCDIRS:%=-I%) $(INCDIRSX:%=-I%) KDEFINES= -DKERNEL -D_KERNEL @@ -33,11 +35,15 @@ LIB_MATH= -lm LIB_KVM= -LDLIBS= $(LIBS) $(LIBX) -lmgw32 +WIN_LIBS= $(WIN32_LIBS) + +LDLIBS= $(LIBS) $(LIBX) $(WIN_LIBS) -lmingw32 LDOPTS= $(LIBS_PATH) $(LDPATH) LORDER= echo TSORT= cat +_MKDIR= $(_MKDIR_SH) MKDIR= $(MKDIR_SH) +INSMKDIR= $(INSMKDIR_SH) diff -Nru cdrtools-2.01.01a33/RULES/i586-ms-dos-gcc.rul cdrtools-3.02a09/RULES/i586-ms-dos-gcc.rul --- cdrtools-2.01.01a33/RULES/i586-ms-dos-gcc.rul 2007-05-08 11:03:08.000000000 +0000 +++ cdrtools-3.02a09/RULES/i586-ms-dos-gcc.rul 1970-01-01 00:00:00.000000000 +0000 @@ -1,44 +0,0 @@ -#ident "@(#)i386-ms-dos-gcc.rul 1.5 07/05/08 " -########################################################################### -# -# Platform dependent MACROS for MSDOS/DJGPP v2 -# -########################################################################### -# Copyright (c) J. Schilling -########################################################################### -# The contents of this file are subject to the terms of the -# Common Development and Distribution License, Version 1.0 only -# (the "License"). You may not use this file except in compliance -# with the License. -# -# See the file CDDL.Schily.txt in this distribution for details. -# -# When distributing Covered Code, include this CDDL HEADER in each -# file and include the License file CDDL.Schily.txt from this distribution. -########################################################################### -include $(SRCROOT)/$(RULESDIR)/rules.prg -########################################################################### -include $(SRCROOT)/$(RULESDIR)/cc-gcc.rul - -OSDEFS += - -COPTDYN= -COPTGPROF= -pg - -LIB_PREFIX= lib -LIB_SUFFIX= .a -SHL_SUFFIX= .so - -LIB_SOCKET= -LIB_MATH= -lm -LIB_KVM= - -LDOPTS= $(LIBS_PATH) $(LDPATH) -LDOPTDYN= -LNDYNLIB= - -#LDCC= @echo " ==> LINKING \"$@\""; gcc -Wl,--strip-all -DYNLD= @echo " ==> LINKING dynamic library \"$@\""; ld - -LORDER= echo -TSORT= cat diff -Nru cdrtools-2.01.01a33/RULES/i586-pyro-cc.rul cdrtools-3.02a09/RULES/i586-pyro-cc.rul --- cdrtools-2.01.01a33/RULES/i586-pyro-cc.rul 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/RULES/i586-pyro-cc.rul 2012-12-02 22:42:59.000000000 +0000 @@ -0,0 +1,53 @@ +#ident "@(#)i586-pyro-cc.rul 1.1 12/12/02 " +########################################################################### +# Written 1996 by J. Schilling +########################################################################### +# +# Platform dependent MACROS for Pyro +# +########################################################################### +# Copyright (c) J. Schilling +########################################################################### +# The contents of this file are subject to the terms of the +# Common Development and Distribution License, Version 1.0 only +# (the "License"). You may not use this file except in compliance +# with the License. +# +# See the file CDDL.Schily.txt in this distribution for details. +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file CDDL.Schily.txt from this distribution. +########################################################################### +include $(SRCROOT)/$(RULESDIR)/rules.prg +########################################################################### +include $(SRCROOT)/$(RULESDIR)/cc-gcc.rul + +OSDEFS += + +KDEFINES= -DKERNEL -D_KERNEL + +LIB_PREFIX= lib +LIB_SUFFIX= .a +SHL_SUFFIX= .so.1.0 + +LIB_SOCKET= +LIB_MATH= -lm +LIB_KVM= + +#LDOPTS= $(LIBS_PATH) $(LDPATH) $(RUNPATH:-R%=-Wl,-R%) +# +# Uncomment the next line in case you are on an old Linker version that +# does not support the -R linker flag. +# +#LDOPTS= $(LIBS_PATH) $(LDPATH) + +LORDER= echo +TSORT= cat + +# +# The current developement system has these files in /boot/NIX/coreutils/bin +# +LN= /boot/NIX/coreutils/bin/ln +SYMLINK= /boot/NIX/coreutils/bin/ln -s +RM= /boot/NIX/coreutils/bin/rm +MV= /boot/NIX/coreutils/bin/mv diff -Nru cdrtools-2.01.01a33/RULES/i586-pyro-gcc.rul cdrtools-3.02a09/RULES/i586-pyro-gcc.rul --- cdrtools-2.01.01a33/RULES/i586-pyro-gcc.rul 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/RULES/i586-pyro-gcc.rul 2012-12-02 22:42:59.000000000 +0000 @@ -0,0 +1,53 @@ +#ident "@(#)i586-pyro-gcc.rul 1.1 12/12/02 " +########################################################################### +# Written 1996 by J. Schilling +########################################################################### +# +# Platform dependent MACROS for Pyro +# +########################################################################### +# Copyright (c) J. Schilling +########################################################################### +# The contents of this file are subject to the terms of the +# Common Development and Distribution License, Version 1.0 only +# (the "License"). You may not use this file except in compliance +# with the License. +# +# See the file CDDL.Schily.txt in this distribution for details. +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file CDDL.Schily.txt from this distribution. +########################################################################### +include $(SRCROOT)/$(RULESDIR)/rules.prg +########################################################################### +include $(SRCROOT)/$(RULESDIR)/cc-gcc.rul + +OSDEFS += + +KDEFINES= -DKERNEL -D_KERNEL + +LIB_PREFIX= lib +LIB_SUFFIX= .a +SHL_SUFFIX= .so.1.0 + +LIB_SOCKET= +LIB_MATH= -lm +LIB_KVM= + +#LDOPTS= $(LIBS_PATH) $(LDPATH) $(RUNPATH:-R%=-Wl,-R%) +# +# Uncomment the next line in case you are on an old Linker version that +# does not support the -R linker flag. +# +#LDOPTS= $(LIBS_PATH) $(LDPATH) + +LORDER= echo +TSORT= cat + +# +# The current developement system has these files in /boot/NIX/coreutils/bin +# +LN= /boot/NIX/coreutils/bin/ln +SYMLINK= /boot/NIX/coreutils/bin/ln -s +RM= /boot/NIX/coreutils/bin/rm +MV= /boot/NIX/coreutils/bin/mv diff -Nru cdrtools-2.01.01a33/RULES/i586-syllable-cc.rul cdrtools-3.02a09/RULES/i586-syllable-cc.rul --- cdrtools-2.01.01a33/RULES/i586-syllable-cc.rul 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/RULES/i586-syllable-cc.rul 2009-02-01 23:02:53.000000000 +0000 @@ -0,0 +1,53 @@ +#ident "@(#)i586-syllable-cc.rul 1.3 09/02/02 " +########################################################################### +# Written 1996 by J. Schilling +########################################################################### +# +# Platform dependent MACROS for Syllable +# +########################################################################### +# Copyright (c) J. Schilling +########################################################################### +# The contents of this file are subject to the terms of the +# Common Development and Distribution License, Version 1.0 only +# (the "License"). You may not use this file except in compliance +# with the License. +# +# See the file CDDL.Schily.txt in this distribution for details. +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file CDDL.Schily.txt from this distribution. +########################################################################### +include $(SRCROOT)/$(RULESDIR)/rules.prg +########################################################################### +include $(SRCROOT)/$(RULESDIR)/cc-gcc.rul + +OSDEFS += + +KDEFINES= -DKERNEL -D_KERNEL + +LIB_PREFIX= lib +LIB_SUFFIX= .a +SHL_SUFFIX= .so.1.0 + +LIB_SOCKET= +LIB_MATH= -lm +LIB_KVM= + +#LDOPTS= $(LIBS_PATH) $(LDPATH) $(RUNPATH:-R%=-Wl,-R%) +# +# Uncomment the next line in case you are on an old Linker version that +# does not support the -R linker flag. +# +#LDOPTS= $(LIBS_PATH) $(LDPATH) + +LORDER= echo +TSORT= cat + +# +# The current developement system has these files in /bin +# +#LN= /usr/indexes/bin/ln +#SYMLINK= /usr/indexes/bin/ln -s +#RM= /usr/indexes/bin/rm +#MV= /usr/indexes/bin/mv diff -Nru cdrtools-2.01.01a33/RULES/i586-syllable-gcc.rul cdrtools-3.02a09/RULES/i586-syllable-gcc.rul --- cdrtools-2.01.01a33/RULES/i586-syllable-gcc.rul 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/RULES/i586-syllable-gcc.rul 2009-02-01 23:02:53.000000000 +0000 @@ -0,0 +1,53 @@ +#ident "@(#)i586-syllable-gcc.rul 1.3 09/02/02 " +########################################################################### +# Written 1996 by J. Schilling +########################################################################### +# +# Platform dependent MACROS for Syllable +# +########################################################################### +# Copyright (c) J. Schilling +########################################################################### +# The contents of this file are subject to the terms of the +# Common Development and Distribution License, Version 1.0 only +# (the "License"). You may not use this file except in compliance +# with the License. +# +# See the file CDDL.Schily.txt in this distribution for details. +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file CDDL.Schily.txt from this distribution. +########################################################################### +include $(SRCROOT)/$(RULESDIR)/rules.prg +########################################################################### +include $(SRCROOT)/$(RULESDIR)/cc-gcc.rul + +OSDEFS += + +KDEFINES= -DKERNEL -D_KERNEL + +LIB_PREFIX= lib +LIB_SUFFIX= .a +SHL_SUFFIX= .so.1.0 + +LIB_SOCKET= +LIB_MATH= -lm +LIB_KVM= + +#LDOPTS= $(LIBS_PATH) $(LDPATH) $(RUNPATH:-R%=-Wl,-R%) +# +# Uncomment the next line in case you are on an old Linker version that +# does not support the -R linker flag. +# +#LDOPTS= $(LIBS_PATH) $(LDPATH) + +LORDER= echo +TSORT= cat + +# +# The current developement system has these files in /bin +# +#LN= /usr/indexes/bin/ln +#SYMLINK= /usr/indexes/bin/ln -s +#RM= /usr/indexes/bin/rm +#MV= /usr/indexes/bin/mv diff -Nru cdrtools-2.01.01a33/RULES/i586-unixware-cc.rul cdrtools-3.02a09/RULES/i586-unixware-cc.rul --- cdrtools-2.01.01a33/RULES/i586-unixware-cc.rul 2007-05-08 11:03:08.000000000 +0000 +++ cdrtools-3.02a09/RULES/i586-unixware-cc.rul 1970-01-01 00:00:00.000000000 +0000 @@ -1,36 +0,0 @@ -#ident "@(#)i386-unixware-cc.rul 1.7 07/05/08 " -########################################################################### -# Written 1999 by J. Schilling/Santa Cruz Operation -########################################################################### -# -# Platform dependent MACROS for SCO UnixWare 2.x / 7.x using cc -# -########################################################################### -# Copyright (c) J. Schilling -########################################################################### -# The contents of this file are subject to the terms of the -# Common Development and Distribution License, Version 1.0 only -# (the "License"). You may not use this file except in compliance -# with the License. -# -# See the file CDDL.Schily.txt in this distribution for details. -# -# When distributing Covered Code, include this CDDL HEADER in each -# file and include the License file CDDL.Schily.txt from this distribution. -########################################################################### -include $(SRCROOT)/$(RULESDIR)/rules.prg -########################################################################### -include $(SRCROOT)/$(RULESDIR)/cc-sco_uw.rul - -OSDEFS += -DUNIXWARE -DSVR4 - -KDEFINES= -DKERNEL -D_KERNEL - -LIB_SOCKET= -lsocket -lnsl -ldl -LIB_MATH= -lm -#LIB_KVM= -lkvm -LIB_KVM= - -ARFLAGS= cr -LORDER= echo -TSORT= cat diff -Nru cdrtools-2.01.01a33/RULES/i586-unixware-gcc.rul cdrtools-3.02a09/RULES/i586-unixware-gcc.rul --- cdrtools-2.01.01a33/RULES/i586-unixware-gcc.rul 2007-05-08 11:03:08.000000000 +0000 +++ cdrtools-3.02a09/RULES/i586-unixware-gcc.rul 1970-01-01 00:00:00.000000000 +0000 @@ -1,41 +0,0 @@ -#ident "@(#)i386-unixware-gcc.rul 1.6 07/05/08 " -########################################################################### -# Written 1999 by J. Schilling/Santa Cruz Operation -########################################################################### -# -# Platform dependent MACROS for SCO UnixWare 2.x / 7.x using gcc -# -########################################################################### -# Copyright (c) J. Schilling -########################################################################### -# The contents of this file are subject to the terms of the -# Common Development and Distribution License, Version 1.0 only -# (the "License"). You may not use this file except in compliance -# with the License. -# -# See the file CDDL.Schily.txt in this distribution for details. -# -# When distributing Covered Code, include this CDDL HEADER in each -# file and include the License file CDDL.Schily.txt from this distribution. -########################################################################### -include $(SRCROOT)/$(RULESDIR)/rules.prg -########################################################################### -include $(SRCROOT)/$(RULESDIR)/cc-gcc.rul - -OSDEFS += -DUNIXWARE -DSVR4 - -KDEFINES= -DKERNEL -D_KERNEL - -LIB_PREFIX= lib -LIB_SUFFIX= .a -SHL_SUFFIX= .so.1.0 - -LIB_SOCKET= -lsocket -lnsl -ldl -LIB_MATH= -lm -LIB_KVM= - -LDOPTS= $(LIBS_PATH) $(LDPATH) -LDOPTDYN= -dy -G $(TARGET) - -LORDER= echo -TSORT= cat diff -Nru cdrtools-2.01.01a33/RULES/i686-cygwin32_nt-cc.rul cdrtools-3.02a09/RULES/i686-cygwin32_nt-cc.rul --- cdrtools-2.01.01a33/RULES/i686-cygwin32_nt-cc.rul 2007-05-09 12:25:30.000000000 +0000 +++ cdrtools-3.02a09/RULES/i686-cygwin32_nt-cc.rul 1970-01-01 00:00:00.000000000 +0000 @@ -1,49 +0,0 @@ -#ident "@(#)i486-cygwin32_nt-cc.rul 1.10 07/05/09 " -########################################################################### -# Written 1998 by B. Bochow -########################################################################### -# -# Platform dependent MACROS for CYGWIN32_NT -# -########################################################################### -# Copyright (c) J. Schilling -########################################################################### -# The contents of this file are subject to the terms of the -# Common Development and Distribution License, Version 1.0 only -# (the "License"). You may not use this file except in compliance -# with the License. -# -# See the file CDDL.Schily.txt in this distribution for details. -# -# When distributing Covered Code, include this CDDL HEADER in each -# file and include the License file CDDL.Schily.txt from this distribution. -########################################################################### -include $(SRCROOT)/$(RULESDIR)/rules.prg -########################################################################### -include $(SRCROOT)/$(RULESDIR)/cc-gcc.rul - -OSDEFS += -mwin32 - -KDEFINES= -#COPTDYN= -fpic -COPTDYN= - -LIB_PREFIX= lib -LIB_SUFFIX= .a -SHL_SUFFIX= .dll - -LIB_SOCKET= -LIB_MATH= -lm -LIB_KVM= - -#LDOPTS= $(LIBS_PATH) $(LDPATH) $(RUNPATH:-R%=-Wl,-R%) -LDOPTS= $(LIBS_PATH) $(LDPATH) -#LDOPTDYN= -shared -Wl,-soname,$(TARGET) -LDOPTDYN= -#LNDYNLIB= @$(RM) $(RM_FORCE) $(PTARGET_BASE).so; $(SYMLINK) $(TARGET) $(PTARGET_BASE).so -LNDYNLIB= - -DYNLD= @echo " ==> LINKING dynamic library \"$@\""; ld - -LORDER= echo -TSORT= cat diff -Nru cdrtools-2.01.01a33/RULES/i686-cygwin32_nt-cl.rul cdrtools-3.02a09/RULES/i686-cygwin32_nt-cl.rul --- cdrtools-2.01.01a33/RULES/i686-cygwin32_nt-cl.rul 2007-04-26 15:03:45.000000000 +0000 +++ cdrtools-3.02a09/RULES/i686-cygwin32_nt-cl.rul 1970-01-01 00:00:00.000000000 +0000 @@ -1,40 +0,0 @@ -#ident "@(#)i486-cygwin32_nt-cl.rul 1.7 07/04/20 " -########################################################################### -# Written 2006 by J. Schilling -########################################################################### -# -# Platform dependent MACROS for CYGWIN32_NT using MSVC -# -########################################################################### -# Copyright (c) J. Schilling -########################################################################### -# The contents of this file are subject to the terms of the -# Common Development and Distribution License, Version 1.0 only -# (the "License"). You may not use this file except in compliance -# with the License. -# -# See the file CDDL.Schily.txt in this distribution for details. -# -# When distributing Covered Code, include this CDDL HEADER in each -# file and include the License file CDDL.Schily.txt from this distribution. -########################################################################### -include $(SRCROOT)/$(RULESDIR)/rules.prg -########################################################################### -_PLATFORM= cygwin -include $(SRCROOT)/$(RULESDIR)/cc-msc.rul - -# -# Supress useless cl warnings like: -# warning C4996: 'strerror' wurde als veraltet deklariert -# Consider using strerror_s instead. -# -OSDEFS += -D_CRT_SECURE_NO_DEPRECATE - -KDEFINES= - -LIB_SOCKET= Ws2_32.lib -LIB_MATH= -LIB_KVM= - -LORDER= echo -TSORT= cat diff -Nru cdrtools-2.01.01a33/RULES/i686-cygwin32_nt-gcc.rul cdrtools-3.02a09/RULES/i686-cygwin32_nt-gcc.rul --- cdrtools-2.01.01a33/RULES/i686-cygwin32_nt-gcc.rul 2007-05-09 12:25:30.000000000 +0000 +++ cdrtools-3.02a09/RULES/i686-cygwin32_nt-gcc.rul 1970-01-01 00:00:00.000000000 +0000 @@ -1,49 +0,0 @@ -#ident "@(#)i486-cygwin32_nt-gcc.rul 1.10 07/05/09 " -########################################################################### -# Written 1998 by B. Bochow -########################################################################### -# -# Platform dependent MACROS for CYGWIN32_NT -# -########################################################################### -# Copyright (c) J. Schilling -########################################################################### -# The contents of this file are subject to the terms of the -# Common Development and Distribution License, Version 1.0 only -# (the "License"). You may not use this file except in compliance -# with the License. -# -# See the file CDDL.Schily.txt in this distribution for details. -# -# When distributing Covered Code, include this CDDL HEADER in each -# file and include the License file CDDL.Schily.txt from this distribution. -########################################################################### -include $(SRCROOT)/$(RULESDIR)/rules.prg -########################################################################### -include $(SRCROOT)/$(RULESDIR)/cc-gcc.rul - -OSDEFS += -mwin32 - -KDEFINES= -#COPTDYN= -fpic -COPTDYN= - -LIB_PREFIX= lib -LIB_SUFFIX= .a -SHL_SUFFIX= .dll - -LIB_SOCKET= -LIB_MATH= -lm -LIB_KVM= - -#LDOPTS= $(LIBS_PATH) $(LDPATH) $(RUNPATH:-R%=-Wl,-R%) -LDOPTS= $(LIBS_PATH) $(LDPATH) -#LDOPTDYN= -shared -Wl,-soname,$(TARGET) -LDOPTDYN= -#LNDYNLIB= @$(RM) $(RM_FORCE) $(PTARGET_BASE).so; $(SYMLINK) $(TARGET) $(PTARGET_BASE).so -LNDYNLIB= - -DYNLD= @echo " ==> LINKING dynamic library \"$@\""; ld - -LORDER= echo -TSORT= cat diff -Nru cdrtools-2.01.01a33/RULES/i686-cygwin32_wow64-cl64.rul cdrtools-3.02a09/RULES/i686-cygwin32_wow64-cl64.rul --- cdrtools-2.01.01a33/RULES/i686-cygwin32_wow64-cl64.rul 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/RULES/i686-cygwin32_wow64-cl64.rul 2009-05-17 15:36:54.000000000 +0000 @@ -0,0 +1,40 @@ +#ident "@(#)i686-cygwin32_wow64-cl64.rul 1.8 09/05/17 " +########################################################################### +# Written 2006 by J. Schilling +########################################################################### +# +# Platform dependent MACROS for CYGWIN32_WOW64 using MSVC +# +########################################################################### +# Copyright (c) J. Schilling +########################################################################### +# The contents of this file are subject to the terms of the +# Common Development and Distribution License, Version 1.0 only +# (the "License"). You may not use this file except in compliance +# with the License. +# +# See the file CDDL.Schily.txt in this distribution for details. +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file CDDL.Schily.txt from this distribution. +########################################################################### +include $(SRCROOT)/$(RULESDIR)/rules.prg +########################################################################### +_PLATFORM= cygwin +include $(SRCROOT)/$(RULESDIR)/cc-msc64.rul + +# +# Supress useless cl warnings like: +# warning C4996: 'strerror' wurde als veraltet deklariert +# Consider using strerror_s instead. +# +OSDEFS += -D_CRT_SECURE_NO_DEPRECATE + +KDEFINES= + +LIB_SOCKET= Ws2_32.lib +LIB_MATH= +LIB_KVM= + +LORDER= echo +TSORT= cat diff -Nru cdrtools-2.01.01a33/RULES/i686-linux-cc.rul cdrtools-3.02a09/RULES/i686-linux-cc.rul --- cdrtools-2.01.01a33/RULES/i686-linux-cc.rul 2007-05-09 12:25:30.000000000 +0000 +++ cdrtools-3.02a09/RULES/i686-linux-cc.rul 1970-01-01 00:00:00.000000000 +0000 @@ -1,45 +0,0 @@ -#ident "@(#)i586-linux-cc.rul 1.11 07/05/09 " -########################################################################### -# Written 1996 by J. Schilling -########################################################################### -# -# Platform dependent MACROS for Linux -# -########################################################################### -# Copyright (c) J. Schilling -########################################################################### -# The contents of this file are subject to the terms of the -# Common Development and Distribution License, Version 1.0 only -# (the "License"). You may not use this file except in compliance -# with the License. -# -# See the file CDDL.Schily.txt in this distribution for details. -# -# When distributing Covered Code, include this CDDL HEADER in each -# file and include the License file CDDL.Schily.txt from this distribution. -########################################################################### -include $(SRCROOT)/$(RULESDIR)/rules.prg -########################################################################### -include $(SRCROOT)/$(RULESDIR)/cc-gcc.rul - -# -# LINUX_SRC_INCLUDE is defined in DEFAULTS/Defaults.linux -# -INCDIRSX += $(LINUX_SRC_INCLUDE) -OSDEFS += - -KDEFINES= -DKERNEL -D_KERNEL - -LIB_PREFIX= lib -LIB_SUFFIX= .a -SHL_SUFFIX= .so.1.0 - -LIB_SOCKET= -LIB_MATH= -lm -LIB_KVM= - -#LDOPTS= $(LIBS_PATH) $(LDPATH) $(RUNPATH:-R%=-Wl,-R%) -LDOPTS= $(LIBS_PATH) $(LDPATH) - -LORDER= echo -TSORT= cat diff -Nru cdrtools-2.01.01a33/RULES/i686-linux-gcc.rul cdrtools-3.02a09/RULES/i686-linux-gcc.rul --- cdrtools-2.01.01a33/RULES/i686-linux-gcc.rul 2007-05-09 12:25:30.000000000 +0000 +++ cdrtools-3.02a09/RULES/i686-linux-gcc.rul 1970-01-01 00:00:00.000000000 +0000 @@ -1,45 +0,0 @@ -#ident "@(#)i586-linux-gcc.rul 1.11 07/05/09 " -########################################################################### -# Written 1996 by J. Schilling -########################################################################### -# -# Platform dependent MACROS for Linux -# -########################################################################### -# Copyright (c) J. Schilling -########################################################################### -# The contents of this file are subject to the terms of the -# Common Development and Distribution License, Version 1.0 only -# (the "License"). You may not use this file except in compliance -# with the License. -# -# See the file CDDL.Schily.txt in this distribution for details. -# -# When distributing Covered Code, include this CDDL HEADER in each -# file and include the License file CDDL.Schily.txt from this distribution. -########################################################################### -include $(SRCROOT)/$(RULESDIR)/rules.prg -########################################################################### -include $(SRCROOT)/$(RULESDIR)/cc-gcc.rul - -# -# LINUX_SRC_INCLUDE is defined in DEFAULTS/Defaults.linux -# -INCDIRSX += $(LINUX_SRC_INCLUDE) -OSDEFS += - -KDEFINES= -DKERNEL -D_KERNEL - -LIB_PREFIX= lib -LIB_SUFFIX= .a -SHL_SUFFIX= .so.1.0 - -LIB_SOCKET= -LIB_MATH= -lm -LIB_KVM= - -#LDOPTS= $(LIBS_PATH) $(LDPATH) $(RUNPATH:-R%=-Wl,-R%) -LDOPTS= $(LIBS_PATH) $(LDPATH) - -LORDER= echo -TSORT= cat diff -Nru cdrtools-2.01.01a33/RULES/i686-linux-suncc.rul cdrtools-3.02a09/RULES/i686-linux-suncc.rul --- cdrtools-2.01.01a33/RULES/i686-linux-suncc.rul 2007-06-16 13:34:28.000000000 +0000 +++ cdrtools-3.02a09/RULES/i686-linux-suncc.rul 1970-01-01 00:00:00.000000000 +0000 @@ -1,46 +0,0 @@ -#ident "@(#)i586-linux-suncc.rul 1.1 07/06/16 " -########################################################################### -# Written 2007 by J. Schilling -########################################################################### -# -# Platform dependent MACROS for Linux using Sun Studio -# -########################################################################### -# Copyright (c) J. Schilling -########################################################################### -# The contents of this file are subject to the terms of the -# Common Development and Distribution License, Version 1.0 only -# (the "License"). You may not use this file except in compliance -# with the License. -# -# See the file CDDL.Schily.txt in this distribution for details. -# -# When distributing Covered Code, include this CDDL HEADER in each -# file and include the License file CDDL.Schily.txt from this distribution. -########################################################################### -include $(SRCROOT)/$(RULESDIR)/rules.prg -########################################################################### -include $(SRCROOT)/$(RULESDIR)/cc-sunpro.rul -CC_COM= suncc - -# -# LINUX_SRC_INCLUDE is defined in DEFAULTS/Defaults.linux -# -INCDIRSX += $(LINUX_SRC_INCLUDE) -OSDEFS += - -KDEFINES= -DKERNEL -D_KERNEL - -LIB_PREFIX= lib -LIB_SUFFIX= .a -SHL_SUFFIX= .so.1.0 - -LIB_SOCKET= -LIB_MATH= -lm -LIB_KVM= - -#LDOPTS= $(LIBS_PATH) $(LDPATH) $(RUNPATH:-R%=-Wl,-R%) -LDOPTS= $(LIBS_PATH) $(LDPATH) - -LORDER= echo -TSORT= cat diff -Nru cdrtools-2.01.01a33/RULES/i686-mingw32_nt-gcc.rul cdrtools-3.02a09/RULES/i686-mingw32_nt-gcc.rul --- cdrtools-2.01.01a33/RULES/i686-mingw32_nt-gcc.rul 2007-05-08 11:07:58.000000000 +0000 +++ cdrtools-3.02a09/RULES/i686-mingw32_nt-gcc.rul 2015-03-26 21:34:35.000000000 +0000 @@ -1,4 +1,4 @@ -#ident "@(#)i686-mingw32_nt-gcc.rul 1.7 07/05/08 " +#ident "@(#)i686-mingw32_nt-gcc.rul 1.12 15/03/26 " ########################################################################### # # Platform dependent MACROS for Win32/Mingw32 @@ -12,6 +12,8 @@ # with the License. # # See the file CDDL.Schily.txt in this distribution for details. +# A copy of the CDDL is also available via the Internet at +# http://www.opensource.org/licenses/cddl1.txt # # When distributing Covered Code, include this CDDL HEADER in each # file and include the License file CDDL.Schily.txt from this distribution. @@ -21,7 +23,7 @@ include $(SRCROOT)/$(RULESDIR)/cc-gcc.rul OSDEFS += -CPPOPTS= -I/MinGW/Include -I$(ARCHDIR) -I$(OINCSDIR) $(INCDIRS:%=-I%) $(INCDIRSX:%=-I%) $(OSDEFS) +CPPOPTS= -I/MinGW/Include -I$(ARCHDIR) -I$(OINCSDIR) $(INCDIRS:%=-I%) $(INCDIRSX:%=-I%) KDEFINES= -DKERNEL -D_KERNEL @@ -33,11 +35,15 @@ LIB_MATH= -lm LIB_KVM= -LDLIBS= $(LIBS) $(LIBX) -lmgw32 +WIN_LIBS= $(WIN32_LIBS) + +LDLIBS= $(LIBS) $(LIBX) $(WIN_LIBS) -lmingw32 LDOPTS= $(LIBS_PATH) $(LDPATH) LORDER= echo TSORT= cat +_MKDIR= $(_MKDIR_SH) MKDIR= $(MKDIR_SH) +INSMKDIR= $(INSMKDIR_SH) diff -Nru cdrtools-2.01.01a33/RULES/i686-ms-dos-gcc.rul cdrtools-3.02a09/RULES/i686-ms-dos-gcc.rul --- cdrtools-2.01.01a33/RULES/i686-ms-dos-gcc.rul 2007-05-08 11:03:08.000000000 +0000 +++ cdrtools-3.02a09/RULES/i686-ms-dos-gcc.rul 1970-01-01 00:00:00.000000000 +0000 @@ -1,44 +0,0 @@ -#ident "@(#)i386-ms-dos-gcc.rul 1.5 07/05/08 " -########################################################################### -# -# Platform dependent MACROS for MSDOS/DJGPP v2 -# -########################################################################### -# Copyright (c) J. Schilling -########################################################################### -# The contents of this file are subject to the terms of the -# Common Development and Distribution License, Version 1.0 only -# (the "License"). You may not use this file except in compliance -# with the License. -# -# See the file CDDL.Schily.txt in this distribution for details. -# -# When distributing Covered Code, include this CDDL HEADER in each -# file and include the License file CDDL.Schily.txt from this distribution. -########################################################################### -include $(SRCROOT)/$(RULESDIR)/rules.prg -########################################################################### -include $(SRCROOT)/$(RULESDIR)/cc-gcc.rul - -OSDEFS += - -COPTDYN= -COPTGPROF= -pg - -LIB_PREFIX= lib -LIB_SUFFIX= .a -SHL_SUFFIX= .so - -LIB_SOCKET= -LIB_MATH= -lm -LIB_KVM= - -LDOPTS= $(LIBS_PATH) $(LDPATH) -LDOPTDYN= -LNDYNLIB= - -#LDCC= @echo " ==> LINKING \"$@\""; gcc -Wl,--strip-all -DYNLD= @echo " ==> LINKING dynamic library \"$@\""; ld - -LORDER= echo -TSORT= cat diff -Nru cdrtools-2.01.01a33/RULES/i786-cygwin32_nt-cc.rul cdrtools-3.02a09/RULES/i786-cygwin32_nt-cc.rul --- cdrtools-2.01.01a33/RULES/i786-cygwin32_nt-cc.rul 2007-05-09 12:25:30.000000000 +0000 +++ cdrtools-3.02a09/RULES/i786-cygwin32_nt-cc.rul 1970-01-01 00:00:00.000000000 +0000 @@ -1,49 +0,0 @@ -#ident "@(#)i486-cygwin32_nt-cc.rul 1.10 07/05/09 " -########################################################################### -# Written 1998 by B. Bochow -########################################################################### -# -# Platform dependent MACROS for CYGWIN32_NT -# -########################################################################### -# Copyright (c) J. Schilling -########################################################################### -# The contents of this file are subject to the terms of the -# Common Development and Distribution License, Version 1.0 only -# (the "License"). You may not use this file except in compliance -# with the License. -# -# See the file CDDL.Schily.txt in this distribution for details. -# -# When distributing Covered Code, include this CDDL HEADER in each -# file and include the License file CDDL.Schily.txt from this distribution. -########################################################################### -include $(SRCROOT)/$(RULESDIR)/rules.prg -########################################################################### -include $(SRCROOT)/$(RULESDIR)/cc-gcc.rul - -OSDEFS += -mwin32 - -KDEFINES= -#COPTDYN= -fpic -COPTDYN= - -LIB_PREFIX= lib -LIB_SUFFIX= .a -SHL_SUFFIX= .dll - -LIB_SOCKET= -LIB_MATH= -lm -LIB_KVM= - -#LDOPTS= $(LIBS_PATH) $(LDPATH) $(RUNPATH:-R%=-Wl,-R%) -LDOPTS= $(LIBS_PATH) $(LDPATH) -#LDOPTDYN= -shared -Wl,-soname,$(TARGET) -LDOPTDYN= -#LNDYNLIB= @$(RM) $(RM_FORCE) $(PTARGET_BASE).so; $(SYMLINK) $(TARGET) $(PTARGET_BASE).so -LNDYNLIB= - -DYNLD= @echo " ==> LINKING dynamic library \"$@\""; ld - -LORDER= echo -TSORT= cat diff -Nru cdrtools-2.01.01a33/RULES/i786-cygwin32_nt-cl.rul cdrtools-3.02a09/RULES/i786-cygwin32_nt-cl.rul --- cdrtools-2.01.01a33/RULES/i786-cygwin32_nt-cl.rul 2007-04-26 15:03:45.000000000 +0000 +++ cdrtools-3.02a09/RULES/i786-cygwin32_nt-cl.rul 1970-01-01 00:00:00.000000000 +0000 @@ -1,40 +0,0 @@ -#ident "@(#)i486-cygwin32_nt-cl.rul 1.7 07/04/20 " -########################################################################### -# Written 2006 by J. Schilling -########################################################################### -# -# Platform dependent MACROS for CYGWIN32_NT using MSVC -# -########################################################################### -# Copyright (c) J. Schilling -########################################################################### -# The contents of this file are subject to the terms of the -# Common Development and Distribution License, Version 1.0 only -# (the "License"). You may not use this file except in compliance -# with the License. -# -# See the file CDDL.Schily.txt in this distribution for details. -# -# When distributing Covered Code, include this CDDL HEADER in each -# file and include the License file CDDL.Schily.txt from this distribution. -########################################################################### -include $(SRCROOT)/$(RULESDIR)/rules.prg -########################################################################### -_PLATFORM= cygwin -include $(SRCROOT)/$(RULESDIR)/cc-msc.rul - -# -# Supress useless cl warnings like: -# warning C4996: 'strerror' wurde als veraltet deklariert -# Consider using strerror_s instead. -# -OSDEFS += -D_CRT_SECURE_NO_DEPRECATE - -KDEFINES= - -LIB_SOCKET= Ws2_32.lib -LIB_MATH= -LIB_KVM= - -LORDER= echo -TSORT= cat diff -Nru cdrtools-2.01.01a33/RULES/i786-cygwin32_nt-gcc.rul cdrtools-3.02a09/RULES/i786-cygwin32_nt-gcc.rul --- cdrtools-2.01.01a33/RULES/i786-cygwin32_nt-gcc.rul 2007-05-09 12:25:30.000000000 +0000 +++ cdrtools-3.02a09/RULES/i786-cygwin32_nt-gcc.rul 1970-01-01 00:00:00.000000000 +0000 @@ -1,49 +0,0 @@ -#ident "@(#)i486-cygwin32_nt-gcc.rul 1.10 07/05/09 " -########################################################################### -# Written 1998 by B. Bochow -########################################################################### -# -# Platform dependent MACROS for CYGWIN32_NT -# -########################################################################### -# Copyright (c) J. Schilling -########################################################################### -# The contents of this file are subject to the terms of the -# Common Development and Distribution License, Version 1.0 only -# (the "License"). You may not use this file except in compliance -# with the License. -# -# See the file CDDL.Schily.txt in this distribution for details. -# -# When distributing Covered Code, include this CDDL HEADER in each -# file and include the License file CDDL.Schily.txt from this distribution. -########################################################################### -include $(SRCROOT)/$(RULESDIR)/rules.prg -########################################################################### -include $(SRCROOT)/$(RULESDIR)/cc-gcc.rul - -OSDEFS += -mwin32 - -KDEFINES= -#COPTDYN= -fpic -COPTDYN= - -LIB_PREFIX= lib -LIB_SUFFIX= .a -SHL_SUFFIX= .dll - -LIB_SOCKET= -LIB_MATH= -lm -LIB_KVM= - -#LDOPTS= $(LIBS_PATH) $(LDPATH) $(RUNPATH:-R%=-Wl,-R%) -LDOPTS= $(LIBS_PATH) $(LDPATH) -#LDOPTDYN= -shared -Wl,-soname,$(TARGET) -LDOPTDYN= -#LNDYNLIB= @$(RM) $(RM_FORCE) $(PTARGET_BASE).so; $(SYMLINK) $(TARGET) $(PTARGET_BASE).so -LNDYNLIB= - -DYNLD= @echo " ==> LINKING dynamic library \"$@\""; ld - -LORDER= echo -TSORT= cat diff -Nru cdrtools-2.01.01a33/RULES/i786-mingw32_nt-gcc.rul cdrtools-3.02a09/RULES/i786-mingw32_nt-gcc.rul --- cdrtools-2.01.01a33/RULES/i786-mingw32_nt-gcc.rul 2007-05-08 11:07:58.000000000 +0000 +++ cdrtools-3.02a09/RULES/i786-mingw32_nt-gcc.rul 2015-03-26 21:34:35.000000000 +0000 @@ -1,4 +1,4 @@ -#ident "@(#)i786-mingw32_nt-gcc.rul 1.7 07/05/08 " +#ident "@(#)i786-mingw32_nt-gcc.rul 1.12 15/03/26 " ########################################################################### # # Platform dependent MACROS for Win32/Mingw32 @@ -12,6 +12,8 @@ # with the License. # # See the file CDDL.Schily.txt in this distribution for details. +# A copy of the CDDL is also available via the Internet at +# http://www.opensource.org/licenses/cddl1.txt # # When distributing Covered Code, include this CDDL HEADER in each # file and include the License file CDDL.Schily.txt from this distribution. @@ -21,7 +23,7 @@ include $(SRCROOT)/$(RULESDIR)/cc-gcc.rul OSDEFS += -CPPOPTS= -I/MinGW/Include -I$(ARCHDIR) -I$(OINCSDIR) $(INCDIRS:%=-I%) $(INCDIRSX:%=-I%) $(OSDEFS) +CPPOPTS= -I/MinGW/Include -I$(ARCHDIR) -I$(OINCSDIR) $(INCDIRS:%=-I%) $(INCDIRSX:%=-I%) KDEFINES= -DKERNEL -D_KERNEL @@ -33,11 +35,15 @@ LIB_MATH= -lm LIB_KVM= -LDLIBS= $(LIBS) $(LIBX) -lmgw32 +WIN_LIBS= $(WIN32_LIBS) + +LDLIBS= $(LIBS) $(LIBX) $(WIN_LIBS) -lmingw32 LDOPTS= $(LIBS_PATH) $(LDPATH) LORDER= echo TSORT= cat +_MKDIR= $(_MKDIR_SH) MKDIR= $(MKDIR_SH) +INSMKDIR= $(INSMKDIR_SH) diff -Nru cdrtools-2.01.01a33/RULES/i786-ms-dos-gcc.rul cdrtools-3.02a09/RULES/i786-ms-dos-gcc.rul --- cdrtools-2.01.01a33/RULES/i786-ms-dos-gcc.rul 2007-05-08 11:03:08.000000000 +0000 +++ cdrtools-3.02a09/RULES/i786-ms-dos-gcc.rul 1970-01-01 00:00:00.000000000 +0000 @@ -1,44 +0,0 @@ -#ident "@(#)i386-ms-dos-gcc.rul 1.5 07/05/08 " -########################################################################### -# -# Platform dependent MACROS for MSDOS/DJGPP v2 -# -########################################################################### -# Copyright (c) J. Schilling -########################################################################### -# The contents of this file are subject to the terms of the -# Common Development and Distribution License, Version 1.0 only -# (the "License"). You may not use this file except in compliance -# with the License. -# -# See the file CDDL.Schily.txt in this distribution for details. -# -# When distributing Covered Code, include this CDDL HEADER in each -# file and include the License file CDDL.Schily.txt from this distribution. -########################################################################### -include $(SRCROOT)/$(RULESDIR)/rules.prg -########################################################################### -include $(SRCROOT)/$(RULESDIR)/cc-gcc.rul - -OSDEFS += - -COPTDYN= -COPTGPROF= -pg - -LIB_PREFIX= lib -LIB_SUFFIX= .a -SHL_SUFFIX= .so - -LIB_SOCKET= -LIB_MATH= -lm -LIB_KVM= - -LDOPTS= $(LIBS_PATH) $(LDPATH) -LDOPTDYN= -LNDYNLIB= - -#LDCC= @echo " ==> LINKING \"$@\""; gcc -Wl,--strip-all -DYNLD= @echo " ==> LINKING dynamic library \"$@\""; ld - -LORDER= echo -TSORT= cat diff -Nru cdrtools-2.01.01a33/RULES/i86pc-sunos5-cc64.rul cdrtools-3.02a09/RULES/i86pc-sunos5-cc64.rul --- cdrtools-2.01.01a33/RULES/i86pc-sunos5-cc64.rul 2007-05-08 11:03:08.000000000 +0000 +++ cdrtools-3.02a09/RULES/i86pc-sunos5-cc64.rul 1970-01-01 00:00:00.000000000 +0000 @@ -1,37 +0,0 @@ -#ident "@(#)i86pc-sunos5-cc64.rul 1.5 07/05/08 " -########################################################################### -# Written 1996 by J. Schilling -########################################################################### -# -# Platform dependent MACROS for SunOS 5.x on PC -# -########################################################################### -# Copyright (c) J. Schilling -########################################################################### -# The contents of this file are subject to the terms of the -# Common Development and Distribution License, Version 1.0 only -# (the "License"). You may not use this file except in compliance -# with the License. -# -# See the file CDDL.Schily.txt in this distribution for details. -# -# When distributing Covered Code, include this CDDL HEADER in each -# file and include the License file CDDL.Schily.txt from this distribution. -########################################################################### -include $(SRCROOT)/$(RULESDIR)/rules.prg -########################################################################### -include $(SRCROOT)/$(RULESDIR)/cc-sunpro64.rul - -OSDEFS += -D__SVR4 -DSVR4 - -KDEFINES= -DKERNEL -D_KERNEL - - -LIB_SOCKET= -lsocket -lnsl -ldl -LIB_MATH= -lm -LIB_KVM= -lkvm -lelf -LIB_VOLMGT= -lvolmgt - -LDOPTDYN= -dy -G -ztext -h $(TARGET) -Mlib$(TARGETLIB)-mapvers -ldl - -ARFLAGS= crs diff -Nru cdrtools-2.01.01a33/RULES/i86pc-sunos5-cc.rul cdrtools-3.02a09/RULES/i86pc-sunos5-cc.rul --- cdrtools-2.01.01a33/RULES/i86pc-sunos5-cc.rul 2007-05-08 11:03:08.000000000 +0000 +++ cdrtools-3.02a09/RULES/i86pc-sunos5-cc.rul 2014-03-28 16:43:53.000000000 +0000 @@ -1,4 +1,4 @@ -#ident "@(#)i86pc-sunos5-cc.rul 1.11 07/05/08 " +#ident "@(#)i86pc-sunos5-cc.rul 1.13 14/03/28 " ########################################################################### # Written 1996 by J. Schilling ########################################################################### @@ -14,13 +14,15 @@ # with the License. # # See the file CDDL.Schily.txt in this distribution for details. +# A copy of the CDDL is also available via the Internet at +# http://www.opensource.org/licenses/cddl1.txt # # When distributing Covered Code, include this CDDL HEADER in each # file and include the License file CDDL.Schily.txt from this distribution. ########################################################################### include $(SRCROOT)/$(RULESDIR)/rules.prg ########################################################################### -include $(SRCROOT)/$(RULESDIR)/cc-sunpro.rul +include $(SRCROOT)/$(RULESDIR)/cc-$(C_ARCH:cc%=sunpro%).rul OSDEFS += -D__SVR4 -DSVR4 @@ -32,6 +34,4 @@ LIB_KVM= -lkvm -lelf LIB_VOLMGT= -lvolmgt -LDOPTDYN= -dy -G -ztext -h $(TARGET) -Mlib$(TARGETLIB)-mapvers -ldl - ARFLAGS= crs diff -Nru cdrtools-2.01.01a33/RULES/i86pc-sunos5-clang.rul cdrtools-3.02a09/RULES/i86pc-sunos5-clang.rul --- cdrtools-2.01.01a33/RULES/i86pc-sunos5-clang.rul 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/RULES/i86pc-sunos5-clang.rul 2014-04-07 20:28:58.000000000 +0000 @@ -0,0 +1,47 @@ +#ident "@(#)i86pc-sunos5-clang.rul 1.2 14/04/07 " +########################################################################### +# Written 1996-2014 by J. Schilling +########################################################################### +# +# Platform dependent MACROS for SunOS 5.x for PC using Clang +# +########################################################################### +# Copyright (c) J. Schilling +########################################################################### +# The contents of this file are subject to the terms of the +# Common Development and Distribution License, Version 1.0 only +# (the "License"). You may not use this file except in compliance +# with the License. +# +# See the file CDDL.Schily.txt in this distribution for details. +# A copy of the CDDL is also available via the Internet at +# http://www.opensource.org/licenses/cddl1.txt +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file CDDL.Schily.txt from this distribution. +########################################################################### +include $(SRCROOT)/$(RULESDIR)/rules.prg +########################################################################### +include $(SRCROOT)/$(RULESDIR)/cc-$(C_ARCH).rul + +OSDEFS += -D__SVR4 -DSVR4 +KDEFINES= -DKERNEL -D_KERNEL + +LIB_SOCKET= -lsocket -lnsl -ldl +LIB_MATH= -lm +LIB_KVM= -lkvm -lelf +LIB_VOLMGT= -lvolmgt + +# +# Solaris comes with a linker that supports mapfiles +# +MAPVERS= $(_MAPVERS) # This enables to use mapfiles + +# +# We should use -Wl,-ztext here, but gcc does not create fully compliant +# object files. +# +#LDOPTDYN= -dy -G -h $(TARGET) $(PMAPVERS:%=-Wl,-M%) -ldl +LDOPTDYN= -Wl,-dy -Wl,-G -Wl,-h$(TARGET) $(PMAPVERS:%=-Wl,-M%) -ldl + +ARFLAGS= crs diff -Nru cdrtools-2.01.01a33/RULES/i86pc-sunos5-gcc64.rul cdrtools-3.02a09/RULES/i86pc-sunos5-gcc64.rul --- cdrtools-2.01.01a33/RULES/i86pc-sunos5-gcc64.rul 2007-05-08 11:03:08.000000000 +0000 +++ cdrtools-3.02a09/RULES/i86pc-sunos5-gcc64.rul 1970-01-01 00:00:00.000000000 +0000 @@ -1,39 +0,0 @@ -#ident "@(#)i86pc-sunos5-gcc64.rul 1.7 07/05/08 " -########################################################################### -# Written 1996 by J. Schilling -########################################################################### -# -# Platform dependent MACROS for SunOS 5.x for PC -# -########################################################################### -# Copyright (c) J. Schilling -########################################################################### -# The contents of this file are subject to the terms of the -# Common Development and Distribution License, Version 1.0 only -# (the "License"). You may not use this file except in compliance -# with the License. -# -# See the file CDDL.Schily.txt in this distribution for details. -# -# When distributing Covered Code, include this CDDL HEADER in each -# file and include the License file CDDL.Schily.txt from this distribution. -########################################################################### -include $(SRCROOT)/$(RULESDIR)/rules.prg -########################################################################### -include $(SRCROOT)/$(RULESDIR)/cc-gcc64.rul - -OSDEFS += -D__SVR4 -DSVR4 -KDEFINES= -DKERNEL -D_KERNEL - -LIB_SOCKET= -lsocket -lnsl -ldl -LIB_MATH= -lm -LIB_KVM= -lkvm -lelf -LIB_VOLMGT= -lvolmgt - -# -# We should use -Wl,-ztext here, but gcc does not create fully compliant -# object files. -# -LDOPTDYN= -dy -G -h $(TARGET) -Wl,-Mlib$(TARGETLIB)-mapvers -ldl - -ARFLAGS= crs diff -Nru cdrtools-2.01.01a33/RULES/i86pc-sunos5-gcc.rul cdrtools-3.02a09/RULES/i86pc-sunos5-gcc.rul --- cdrtools-2.01.01a33/RULES/i86pc-sunos5-gcc.rul 2007-05-08 11:03:08.000000000 +0000 +++ cdrtools-3.02a09/RULES/i86pc-sunos5-gcc.rul 2014-03-28 16:43:53.000000000 +0000 @@ -1,4 +1,4 @@ -#ident "@(#)i86pc-sunos5-gcc.rul 1.13 07/05/08 " +#ident "@(#)i86pc-sunos5-gcc.rul 1.15 14/03/28 " ########################################################################### # Written 1996 by J. Schilling ########################################################################### @@ -14,13 +14,15 @@ # with the License. # # See the file CDDL.Schily.txt in this distribution for details. +# A copy of the CDDL is also available via the Internet at +# http://www.opensource.org/licenses/cddl1.txt # # When distributing Covered Code, include this CDDL HEADER in each # file and include the License file CDDL.Schily.txt from this distribution. ########################################################################### include $(SRCROOT)/$(RULESDIR)/rules.prg ########################################################################### -include $(SRCROOT)/$(RULESDIR)/cc-gcc.rul +include $(SRCROOT)/$(RULESDIR)/cc-$(C_ARCH).rul OSDEFS += -D__SVR4 -DSVR4 KDEFINES= -DKERNEL -D_KERNEL @@ -31,9 +33,14 @@ LIB_VOLMGT= -lvolmgt # +# Solaris comes with a linker that supports mapfiles +# +MAPVERS= $(_MAPVERS) # This enables to use mapfiles + +# # We should use -Wl,-ztext here, but gcc does not create fully compliant # object files. # -LDOPTDYN= -dy -G -h $(TARGET) -Wl,-Mlib$(TARGETLIB)-mapvers -ldl +LDOPTDYN= -dy -G -h $(TARGET) $(PMAPVERS:%=-Wl,-M%) -ldl ARFLAGS= crs diff -Nru cdrtools-2.01.01a33/RULES/i86pc-sunos5-pcc.rul cdrtools-3.02a09/RULES/i86pc-sunos5-pcc.rul --- cdrtools-2.01.01a33/RULES/i86pc-sunos5-pcc.rul 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/RULES/i86pc-sunos5-pcc.rul 2013-01-09 19:06:19.000000000 +0000 @@ -0,0 +1,40 @@ +#ident "@(#)i86pc-sunos5-pcc.rul 1.3 13/01/09 " +########################################################################### +# Written 2010-2013 by J. Schilling +########################################################################### +# +# Platform dependent MACROS for SunOS 5.x for PC +# +########################################################################### +# Copyright (c) J. Schilling +########################################################################### +# The contents of this file are subject to the terms of the +# Common Development and Distribution License, Version 1.0 only +# (the "License"). You may not use this file except in compliance +# with the License. +# +# See the file CDDL.Schily.txt in this distribution for details. +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file CDDL.Schily.txt from this distribution. +########################################################################### +include $(SRCROOT)/$(RULESDIR)/rules.prg +########################################################################### +include $(SRCROOT)/$(RULESDIR)/cc-pcc.rul + +OSDEFS += -D__SVR4 -DSVR4 +KDEFINES= -DKERNEL -D_KERNEL + +LIB_SOCKET= -lsocket -lnsl -ldl +LIB_MATH= -lm +LIB_KVM= -lkvm -lelf +LIB_VOLMGT= -lvolmgt + +# +# Solaris comes with a linker that supports mapfiles +# +MAPVERS= $(_MAPVERS) # This enables to use mapfiles + +LDOPTDYN= -dy -G -Wl,-ztext -h $(TARGET) $(PMAPVERS:%=-Wl,-M%) -ldl + +ARFLAGS= crs diff -Nru cdrtools-2.01.01a33/RULES/ia64-linux-cc.rul cdrtools-3.02a09/RULES/ia64-linux-cc.rul --- cdrtools-2.01.01a33/RULES/ia64-linux-cc.rul 2007-05-09 12:25:30.000000000 +0000 +++ cdrtools-3.02a09/RULES/ia64-linux-cc.rul 1970-01-01 00:00:00.000000000 +0000 @@ -1,45 +0,0 @@ -#ident "@(#)i586-linux-cc.rul 1.11 07/05/09 " -########################################################################### -# Written 1996 by J. Schilling -########################################################################### -# -# Platform dependent MACROS for Linux -# -########################################################################### -# Copyright (c) J. Schilling -########################################################################### -# The contents of this file are subject to the terms of the -# Common Development and Distribution License, Version 1.0 only -# (the "License"). You may not use this file except in compliance -# with the License. -# -# See the file CDDL.Schily.txt in this distribution for details. -# -# When distributing Covered Code, include this CDDL HEADER in each -# file and include the License file CDDL.Schily.txt from this distribution. -########################################################################### -include $(SRCROOT)/$(RULESDIR)/rules.prg -########################################################################### -include $(SRCROOT)/$(RULESDIR)/cc-gcc.rul - -# -# LINUX_SRC_INCLUDE is defined in DEFAULTS/Defaults.linux -# -INCDIRSX += $(LINUX_SRC_INCLUDE) -OSDEFS += - -KDEFINES= -DKERNEL -D_KERNEL - -LIB_PREFIX= lib -LIB_SUFFIX= .a -SHL_SUFFIX= .so.1.0 - -LIB_SOCKET= -LIB_MATH= -lm -LIB_KVM= - -#LDOPTS= $(LIBS_PATH) $(LDPATH) $(RUNPATH:-R%=-Wl,-R%) -LDOPTS= $(LIBS_PATH) $(LDPATH) - -LORDER= echo -TSORT= cat diff -Nru cdrtools-2.01.01a33/RULES/ia64-linux-gcc.rul cdrtools-3.02a09/RULES/ia64-linux-gcc.rul --- cdrtools-2.01.01a33/RULES/ia64-linux-gcc.rul 2007-05-09 12:25:30.000000000 +0000 +++ cdrtools-3.02a09/RULES/ia64-linux-gcc.rul 1970-01-01 00:00:00.000000000 +0000 @@ -1,45 +0,0 @@ -#ident "@(#)i586-linux-gcc.rul 1.11 07/05/09 " -########################################################################### -# Written 1996 by J. Schilling -########################################################################### -# -# Platform dependent MACROS for Linux -# -########################################################################### -# Copyright (c) J. Schilling -########################################################################### -# The contents of this file are subject to the terms of the -# Common Development and Distribution License, Version 1.0 only -# (the "License"). You may not use this file except in compliance -# with the License. -# -# See the file CDDL.Schily.txt in this distribution for details. -# -# When distributing Covered Code, include this CDDL HEADER in each -# file and include the License file CDDL.Schily.txt from this distribution. -########################################################################### -include $(SRCROOT)/$(RULESDIR)/rules.prg -########################################################################### -include $(SRCROOT)/$(RULESDIR)/cc-gcc.rul - -# -# LINUX_SRC_INCLUDE is defined in DEFAULTS/Defaults.linux -# -INCDIRSX += $(LINUX_SRC_INCLUDE) -OSDEFS += - -KDEFINES= -DKERNEL -D_KERNEL - -LIB_PREFIX= lib -LIB_SUFFIX= .a -SHL_SUFFIX= .so.1.0 - -LIB_SOCKET= -LIB_MATH= -lm -LIB_KVM= - -#LDOPTS= $(LIBS_PATH) $(LDPATH) $(RUNPATH:-R%=-Wl,-R%) -LDOPTS= $(LIBS_PATH) $(LDPATH) - -LORDER= echo -TSORT= cat diff -Nru cdrtools-2.01.01a33/RULES/ip17-irix-cc.rul cdrtools-3.02a09/RULES/ip17-irix-cc.rul --- cdrtools-2.01.01a33/RULES/ip17-irix-cc.rul 2007-05-08 11:03:08.000000000 +0000 +++ cdrtools-3.02a09/RULES/ip17-irix-cc.rul 1970-01-01 00:00:00.000000000 +0000 @@ -1,38 +0,0 @@ -#ident "@(#)ip22-irix-cc.rul 1.9 07/05/08 " -########################################################################### -# Written 1996 by J. Schilling -########################################################################### -# -# Platform dependent MACROS for Silicon Graphics IRIX -# -########################################################################### -# Copyright (c) J. Schilling -########################################################################### -# The contents of this file are subject to the terms of the -# Common Development and Distribution License, Version 1.0 only -# (the "License"). You may not use this file except in compliance -# with the License. -# -# See the file CDDL.Schily.txt in this distribution for details. -# -# When distributing Covered Code, include this CDDL HEADER in each -# file and include the License file CDDL.Schily.txt from this distribution. -########################################################################### -include $(SRCROOT)/$(RULESDIR)/rules.prg -########################################################################### -include $(SRCROOT)/$(RULESDIR)/cc-sgi.rul - -OSDEFS += -D__SVR4 -DSVR4 $(LARGEFILE_OPT) - -KDEFINES= -DKERNEL -D_KERNEL - -LIB_SOCKET= -LIB_MATH= -lm -LIB_KVM= - -ARFLAGS= crs -# -# lorder seems not to work on some machines, disable it -# -LORDER= echo -TSORT= cat diff -Nru cdrtools-2.01.01a33/RULES/ip17-irix-gcc.rul cdrtools-3.02a09/RULES/ip17-irix-gcc.rul --- cdrtools-2.01.01a33/RULES/ip17-irix-gcc.rul 2007-05-09 12:25:30.000000000 +0000 +++ cdrtools-3.02a09/RULES/ip17-irix-gcc.rul 1970-01-01 00:00:00.000000000 +0000 @@ -1,45 +0,0 @@ -#ident "@(#)ip22-irix-gcc.rul 1.11 07/05/09 " -########################################################################### -# Written 1996 by J. Schilling -########################################################################### -# -# Platform dependent MACROS for Silicon Graphics IRIX -# -########################################################################### -# Copyright (c) J. Schilling -########################################################################### -# The contents of this file are subject to the terms of the -# Common Development and Distribution License, Version 1.0 only -# (the "License"). You may not use this file except in compliance -# with the License. -# -# See the file CDDL.Schily.txt in this distribution for details. -# -# When distributing Covered Code, include this CDDL HEADER in each -# file and include the License file CDDL.Schily.txt from this distribution. -########################################################################### -include $(SRCROOT)/$(RULESDIR)/rules.prg -########################################################################### -include $(SRCROOT)/$(RULESDIR)/cc-gcc.rul - -OSDEFS += -D__SVR4 -DSVR4 - -KDEFINES= -DKERNEL -D_KERNEL - -LIB_SOCKET= -LIB_MATH= -lm -LIB_KVM= - -#LDOPTS= $(LIBS_PATH) $(LDPATH) $(RUNPATH:-R%=-Wl,-R%) -LDOPTS= $(LIBS_PATH) $(LDPATH) -LDOPTDYN= -LNDYNLIB= @ - -FLOAT_OPTIONS= - -ARFLAGS= crs -# -# lorder seems not to work on some machines, disable it -# -LORDER= echo -TSORT= cat diff -Nru cdrtools-2.01.01a33/RULES/ip20-irix-cc.rul cdrtools-3.02a09/RULES/ip20-irix-cc.rul --- cdrtools-2.01.01a33/RULES/ip20-irix-cc.rul 2007-05-08 11:03:08.000000000 +0000 +++ cdrtools-3.02a09/RULES/ip20-irix-cc.rul 1970-01-01 00:00:00.000000000 +0000 @@ -1,38 +0,0 @@ -#ident "@(#)ip22-irix-cc.rul 1.9 07/05/08 " -########################################################################### -# Written 1996 by J. Schilling -########################################################################### -# -# Platform dependent MACROS for Silicon Graphics IRIX -# -########################################################################### -# Copyright (c) J. Schilling -########################################################################### -# The contents of this file are subject to the terms of the -# Common Development and Distribution License, Version 1.0 only -# (the "License"). You may not use this file except in compliance -# with the License. -# -# See the file CDDL.Schily.txt in this distribution for details. -# -# When distributing Covered Code, include this CDDL HEADER in each -# file and include the License file CDDL.Schily.txt from this distribution. -########################################################################### -include $(SRCROOT)/$(RULESDIR)/rules.prg -########################################################################### -include $(SRCROOT)/$(RULESDIR)/cc-sgi.rul - -OSDEFS += -D__SVR4 -DSVR4 $(LARGEFILE_OPT) - -KDEFINES= -DKERNEL -D_KERNEL - -LIB_SOCKET= -LIB_MATH= -lm -LIB_KVM= - -ARFLAGS= crs -# -# lorder seems not to work on some machines, disable it -# -LORDER= echo -TSORT= cat diff -Nru cdrtools-2.01.01a33/RULES/ip20-irix-gcc.rul cdrtools-3.02a09/RULES/ip20-irix-gcc.rul --- cdrtools-2.01.01a33/RULES/ip20-irix-gcc.rul 2007-05-09 12:25:30.000000000 +0000 +++ cdrtools-3.02a09/RULES/ip20-irix-gcc.rul 1970-01-01 00:00:00.000000000 +0000 @@ -1,45 +0,0 @@ -#ident "@(#)ip22-irix-gcc.rul 1.11 07/05/09 " -########################################################################### -# Written 1996 by J. Schilling -########################################################################### -# -# Platform dependent MACROS for Silicon Graphics IRIX -# -########################################################################### -# Copyright (c) J. Schilling -########################################################################### -# The contents of this file are subject to the terms of the -# Common Development and Distribution License, Version 1.0 only -# (the "License"). You may not use this file except in compliance -# with the License. -# -# See the file CDDL.Schily.txt in this distribution for details. -# -# When distributing Covered Code, include this CDDL HEADER in each -# file and include the License file CDDL.Schily.txt from this distribution. -########################################################################### -include $(SRCROOT)/$(RULESDIR)/rules.prg -########################################################################### -include $(SRCROOT)/$(RULESDIR)/cc-gcc.rul - -OSDEFS += -D__SVR4 -DSVR4 - -KDEFINES= -DKERNEL -D_KERNEL - -LIB_SOCKET= -LIB_MATH= -lm -LIB_KVM= - -#LDOPTS= $(LIBS_PATH) $(LDPATH) $(RUNPATH:-R%=-Wl,-R%) -LDOPTS= $(LIBS_PATH) $(LDPATH) -LDOPTDYN= -LNDYNLIB= @ - -FLOAT_OPTIONS= - -ARFLAGS= crs -# -# lorder seems not to work on some machines, disable it -# -LORDER= echo -TSORT= cat diff -Nru cdrtools-2.01.01a33/RULES/ip22-irix-cc.rul cdrtools-3.02a09/RULES/ip22-irix-cc.rul --- cdrtools-2.01.01a33/RULES/ip22-irix-cc.rul 2007-05-08 11:03:08.000000000 +0000 +++ cdrtools-3.02a09/RULES/ip22-irix-cc.rul 2014-04-01 12:26:15.000000000 +0000 @@ -1,4 +1,4 @@ -#ident "@(#)ip22-irix-cc.rul 1.9 07/05/08 " +#ident "@(#)ip22-irix-cc.rul 1.10 14/04/01 " ########################################################################### # Written 1996 by J. Schilling ########################################################################### @@ -14,13 +14,15 @@ # with the License. # # See the file CDDL.Schily.txt in this distribution for details. +# A copy of the CDDL is also available via the Internet at +# http://www.opensource.org/licenses/cddl1.txt # # When distributing Covered Code, include this CDDL HEADER in each # file and include the License file CDDL.Schily.txt from this distribution. ########################################################################### include $(SRCROOT)/$(RULESDIR)/rules.prg ########################################################################### -include $(SRCROOT)/$(RULESDIR)/cc-sgi.rul +include $(SRCROOT)/$(RULESDIR)/cc-$(C_ARCH:cc%=sgi%).rul OSDEFS += -D__SVR4 -DSVR4 $(LARGEFILE_OPT) diff -Nru cdrtools-2.01.01a33/RULES/ip22-irix-gcc.rul cdrtools-3.02a09/RULES/ip22-irix-gcc.rul --- cdrtools-2.01.01a33/RULES/ip22-irix-gcc.rul 2007-05-09 12:25:30.000000000 +0000 +++ cdrtools-3.02a09/RULES/ip22-irix-gcc.rul 2015-11-30 21:04:35.000000000 +0000 @@ -1,4 +1,4 @@ -#ident "@(#)ip22-irix-gcc.rul 1.11 07/05/09 " +#ident "@(#)ip22-irix-gcc.rul 1.13 15/11/30 " ########################################################################### # Written 1996 by J. Schilling ########################################################################### @@ -14,13 +14,16 @@ # with the License. # # See the file CDDL.Schily.txt in this distribution for details. +# A copy of the CDDL is also available via the Internet at +# http://www.opensource.org/licenses/cddl1.txt # # When distributing Covered Code, include this CDDL HEADER in each # file and include the License file CDDL.Schily.txt from this distribution. ########################################################################### include $(SRCROOT)/$(RULESDIR)/rules.prg ########################################################################### -include $(SRCROOT)/$(RULESDIR)/cc-gcc.rul +include $(SRCROOT)/$(RULESDIR)/cc-$(C_ARCH).rul +GCC_OPT64= -mabi=64 OSDEFS += -D__SVR4 -DSVR4 diff -Nru cdrtools-2.01.01a33/RULES/ip27-irix-cc.rul cdrtools-3.02a09/RULES/ip27-irix-cc.rul --- cdrtools-2.01.01a33/RULES/ip27-irix-cc.rul 2007-05-08 11:03:08.000000000 +0000 +++ cdrtools-3.02a09/RULES/ip27-irix-cc.rul 1970-01-01 00:00:00.000000000 +0000 @@ -1,38 +0,0 @@ -#ident "@(#)ip22-irix-cc.rul 1.9 07/05/08 " -########################################################################### -# Written 1996 by J. Schilling -########################################################################### -# -# Platform dependent MACROS for Silicon Graphics IRIX -# -########################################################################### -# Copyright (c) J. Schilling -########################################################################### -# The contents of this file are subject to the terms of the -# Common Development and Distribution License, Version 1.0 only -# (the "License"). You may not use this file except in compliance -# with the License. -# -# See the file CDDL.Schily.txt in this distribution for details. -# -# When distributing Covered Code, include this CDDL HEADER in each -# file and include the License file CDDL.Schily.txt from this distribution. -########################################################################### -include $(SRCROOT)/$(RULESDIR)/rules.prg -########################################################################### -include $(SRCROOT)/$(RULESDIR)/cc-sgi.rul - -OSDEFS += -D__SVR4 -DSVR4 $(LARGEFILE_OPT) - -KDEFINES= -DKERNEL -D_KERNEL - -LIB_SOCKET= -LIB_MATH= -lm -LIB_KVM= - -ARFLAGS= crs -# -# lorder seems not to work on some machines, disable it -# -LORDER= echo -TSORT= cat diff -Nru cdrtools-2.01.01a33/RULES/ip27-irix-gcc.rul cdrtools-3.02a09/RULES/ip27-irix-gcc.rul --- cdrtools-2.01.01a33/RULES/ip27-irix-gcc.rul 2007-05-09 12:25:30.000000000 +0000 +++ cdrtools-3.02a09/RULES/ip27-irix-gcc.rul 1970-01-01 00:00:00.000000000 +0000 @@ -1,45 +0,0 @@ -#ident "@(#)ip22-irix-gcc.rul 1.11 07/05/09 " -########################################################################### -# Written 1996 by J. Schilling -########################################################################### -# -# Platform dependent MACROS for Silicon Graphics IRIX -# -########################################################################### -# Copyright (c) J. Schilling -########################################################################### -# The contents of this file are subject to the terms of the -# Common Development and Distribution License, Version 1.0 only -# (the "License"). You may not use this file except in compliance -# with the License. -# -# See the file CDDL.Schily.txt in this distribution for details. -# -# When distributing Covered Code, include this CDDL HEADER in each -# file and include the License file CDDL.Schily.txt from this distribution. -########################################################################### -include $(SRCROOT)/$(RULESDIR)/rules.prg -########################################################################### -include $(SRCROOT)/$(RULESDIR)/cc-gcc.rul - -OSDEFS += -D__SVR4 -DSVR4 - -KDEFINES= -DKERNEL -D_KERNEL - -LIB_SOCKET= -LIB_MATH= -lm -LIB_KVM= - -#LDOPTS= $(LIBS_PATH) $(LDPATH) $(RUNPATH:-R%=-Wl,-R%) -LDOPTS= $(LIBS_PATH) $(LDPATH) -LDOPTDYN= -LNDYNLIB= @ - -FLOAT_OPTIONS= - -ARFLAGS= crs -# -# lorder seems not to work on some machines, disable it -# -LORDER= echo -TSORT= cat diff -Nru cdrtools-2.01.01a33/RULES/ip28-irix-cc.rul cdrtools-3.02a09/RULES/ip28-irix-cc.rul --- cdrtools-2.01.01a33/RULES/ip28-irix-cc.rul 2007-05-08 11:03:08.000000000 +0000 +++ cdrtools-3.02a09/RULES/ip28-irix-cc.rul 1970-01-01 00:00:00.000000000 +0000 @@ -1,38 +0,0 @@ -#ident "@(#)ip22-irix-cc.rul 1.9 07/05/08 " -########################################################################### -# Written 1996 by J. Schilling -########################################################################### -# -# Platform dependent MACROS for Silicon Graphics IRIX -# -########################################################################### -# Copyright (c) J. Schilling -########################################################################### -# The contents of this file are subject to the terms of the -# Common Development and Distribution License, Version 1.0 only -# (the "License"). You may not use this file except in compliance -# with the License. -# -# See the file CDDL.Schily.txt in this distribution for details. -# -# When distributing Covered Code, include this CDDL HEADER in each -# file and include the License file CDDL.Schily.txt from this distribution. -########################################################################### -include $(SRCROOT)/$(RULESDIR)/rules.prg -########################################################################### -include $(SRCROOT)/$(RULESDIR)/cc-sgi.rul - -OSDEFS += -D__SVR4 -DSVR4 $(LARGEFILE_OPT) - -KDEFINES= -DKERNEL -D_KERNEL - -LIB_SOCKET= -LIB_MATH= -lm -LIB_KVM= - -ARFLAGS= crs -# -# lorder seems not to work on some machines, disable it -# -LORDER= echo -TSORT= cat diff -Nru cdrtools-2.01.01a33/RULES/ip28-irix-gcc.rul cdrtools-3.02a09/RULES/ip28-irix-gcc.rul --- cdrtools-2.01.01a33/RULES/ip28-irix-gcc.rul 2007-05-09 12:25:30.000000000 +0000 +++ cdrtools-3.02a09/RULES/ip28-irix-gcc.rul 1970-01-01 00:00:00.000000000 +0000 @@ -1,45 +0,0 @@ -#ident "@(#)ip22-irix-gcc.rul 1.11 07/05/09 " -########################################################################### -# Written 1996 by J. Schilling -########################################################################### -# -# Platform dependent MACROS for Silicon Graphics IRIX -# -########################################################################### -# Copyright (c) J. Schilling -########################################################################### -# The contents of this file are subject to the terms of the -# Common Development and Distribution License, Version 1.0 only -# (the "License"). You may not use this file except in compliance -# with the License. -# -# See the file CDDL.Schily.txt in this distribution for details. -# -# When distributing Covered Code, include this CDDL HEADER in each -# file and include the License file CDDL.Schily.txt from this distribution. -########################################################################### -include $(SRCROOT)/$(RULESDIR)/rules.prg -########################################################################### -include $(SRCROOT)/$(RULESDIR)/cc-gcc.rul - -OSDEFS += -D__SVR4 -DSVR4 - -KDEFINES= -DKERNEL -D_KERNEL - -LIB_SOCKET= -LIB_MATH= -lm -LIB_KVM= - -#LDOPTS= $(LIBS_PATH) $(LDPATH) $(RUNPATH:-R%=-Wl,-R%) -LDOPTS= $(LIBS_PATH) $(LDPATH) -LDOPTDYN= -LNDYNLIB= @ - -FLOAT_OPTIONS= - -ARFLAGS= crs -# -# lorder seems not to work on some machines, disable it -# -LORDER= echo -TSORT= cat diff -Nru cdrtools-2.01.01a33/RULES/ip30-irix-cc.rul cdrtools-3.02a09/RULES/ip30-irix-cc.rul --- cdrtools-2.01.01a33/RULES/ip30-irix-cc.rul 2007-05-08 11:03:08.000000000 +0000 +++ cdrtools-3.02a09/RULES/ip30-irix-cc.rul 1970-01-01 00:00:00.000000000 +0000 @@ -1,38 +0,0 @@ -#ident "@(#)ip22-irix-cc.rul 1.9 07/05/08 " -########################################################################### -# Written 1996 by J. Schilling -########################################################################### -# -# Platform dependent MACROS for Silicon Graphics IRIX -# -########################################################################### -# Copyright (c) J. Schilling -########################################################################### -# The contents of this file are subject to the terms of the -# Common Development and Distribution License, Version 1.0 only -# (the "License"). You may not use this file except in compliance -# with the License. -# -# See the file CDDL.Schily.txt in this distribution for details. -# -# When distributing Covered Code, include this CDDL HEADER in each -# file and include the License file CDDL.Schily.txt from this distribution. -########################################################################### -include $(SRCROOT)/$(RULESDIR)/rules.prg -########################################################################### -include $(SRCROOT)/$(RULESDIR)/cc-sgi.rul - -OSDEFS += -D__SVR4 -DSVR4 $(LARGEFILE_OPT) - -KDEFINES= -DKERNEL -D_KERNEL - -LIB_SOCKET= -LIB_MATH= -lm -LIB_KVM= - -ARFLAGS= crs -# -# lorder seems not to work on some machines, disable it -# -LORDER= echo -TSORT= cat diff -Nru cdrtools-2.01.01a33/RULES/ip30-irix-gcc.rul cdrtools-3.02a09/RULES/ip30-irix-gcc.rul --- cdrtools-2.01.01a33/RULES/ip30-irix-gcc.rul 2007-05-09 12:25:30.000000000 +0000 +++ cdrtools-3.02a09/RULES/ip30-irix-gcc.rul 1970-01-01 00:00:00.000000000 +0000 @@ -1,45 +0,0 @@ -#ident "@(#)ip22-irix-gcc.rul 1.11 07/05/09 " -########################################################################### -# Written 1996 by J. Schilling -########################################################################### -# -# Platform dependent MACROS for Silicon Graphics IRIX -# -########################################################################### -# Copyright (c) J. Schilling -########################################################################### -# The contents of this file are subject to the terms of the -# Common Development and Distribution License, Version 1.0 only -# (the "License"). You may not use this file except in compliance -# with the License. -# -# See the file CDDL.Schily.txt in this distribution for details. -# -# When distributing Covered Code, include this CDDL HEADER in each -# file and include the License file CDDL.Schily.txt from this distribution. -########################################################################### -include $(SRCROOT)/$(RULESDIR)/rules.prg -########################################################################### -include $(SRCROOT)/$(RULESDIR)/cc-gcc.rul - -OSDEFS += -D__SVR4 -DSVR4 - -KDEFINES= -DKERNEL -D_KERNEL - -LIB_SOCKET= -LIB_MATH= -lm -LIB_KVM= - -#LDOPTS= $(LIBS_PATH) $(LDPATH) $(RUNPATH:-R%=-Wl,-R%) -LDOPTS= $(LIBS_PATH) $(LDPATH) -LDOPTDYN= -LNDYNLIB= @ - -FLOAT_OPTIONS= - -ARFLAGS= crs -# -# lorder seems not to work on some machines, disable it -# -LORDER= echo -TSORT= cat diff -Nru cdrtools-2.01.01a33/RULES/ip32-irix-cc.rul cdrtools-3.02a09/RULES/ip32-irix-cc.rul --- cdrtools-2.01.01a33/RULES/ip32-irix-cc.rul 2007-05-08 11:03:08.000000000 +0000 +++ cdrtools-3.02a09/RULES/ip32-irix-cc.rul 1970-01-01 00:00:00.000000000 +0000 @@ -1,38 +0,0 @@ -#ident "@(#)ip22-irix-cc.rul 1.9 07/05/08 " -########################################################################### -# Written 1996 by J. Schilling -########################################################################### -# -# Platform dependent MACROS for Silicon Graphics IRIX -# -########################################################################### -# Copyright (c) J. Schilling -########################################################################### -# The contents of this file are subject to the terms of the -# Common Development and Distribution License, Version 1.0 only -# (the "License"). You may not use this file except in compliance -# with the License. -# -# See the file CDDL.Schily.txt in this distribution for details. -# -# When distributing Covered Code, include this CDDL HEADER in each -# file and include the License file CDDL.Schily.txt from this distribution. -########################################################################### -include $(SRCROOT)/$(RULESDIR)/rules.prg -########################################################################### -include $(SRCROOT)/$(RULESDIR)/cc-sgi.rul - -OSDEFS += -D__SVR4 -DSVR4 $(LARGEFILE_OPT) - -KDEFINES= -DKERNEL -D_KERNEL - -LIB_SOCKET= -LIB_MATH= -lm -LIB_KVM= - -ARFLAGS= crs -# -# lorder seems not to work on some machines, disable it -# -LORDER= echo -TSORT= cat diff -Nru cdrtools-2.01.01a33/RULES/ip32-irix-gcc.rul cdrtools-3.02a09/RULES/ip32-irix-gcc.rul --- cdrtools-2.01.01a33/RULES/ip32-irix-gcc.rul 2007-05-09 12:25:30.000000000 +0000 +++ cdrtools-3.02a09/RULES/ip32-irix-gcc.rul 1970-01-01 00:00:00.000000000 +0000 @@ -1,45 +0,0 @@ -#ident "@(#)ip22-irix-gcc.rul 1.11 07/05/09 " -########################################################################### -# Written 1996 by J. Schilling -########################################################################### -# -# Platform dependent MACROS for Silicon Graphics IRIX -# -########################################################################### -# Copyright (c) J. Schilling -########################################################################### -# The contents of this file are subject to the terms of the -# Common Development and Distribution License, Version 1.0 only -# (the "License"). You may not use this file except in compliance -# with the License. -# -# See the file CDDL.Schily.txt in this distribution for details. -# -# When distributing Covered Code, include this CDDL HEADER in each -# file and include the License file CDDL.Schily.txt from this distribution. -########################################################################### -include $(SRCROOT)/$(RULESDIR)/rules.prg -########################################################################### -include $(SRCROOT)/$(RULESDIR)/cc-gcc.rul - -OSDEFS += -D__SVR4 -DSVR4 - -KDEFINES= -DKERNEL -D_KERNEL - -LIB_SOCKET= -LIB_MATH= -lm -LIB_KVM= - -#LDOPTS= $(LIBS_PATH) $(LDPATH) $(RUNPATH:-R%=-Wl,-R%) -LDOPTS= $(LIBS_PATH) $(LDPATH) -LDOPTDYN= -LNDYNLIB= @ - -FLOAT_OPTIONS= - -ARFLAGS= crs -# -# lorder seems not to work on some machines, disable it -# -LORDER= echo -TSORT= cat diff -Nru cdrtools-2.01.01a33/RULES/local.cnf cdrtools-3.02a09/RULES/local.cnf --- cdrtools-2.01.01a33/RULES/local.cnf 2007-06-05 09:18:19.000000000 +0000 +++ cdrtools-3.02a09/RULES/local.cnf 2015-11-10 20:29:36.000000000 +0000 @@ -1,6 +1,6 @@ -#ident @(#)local.cnf 1.7 07/06/05 +#ident @(#)local.cnf 1.12 15/11/10 ########################################################################### -# Written 1998 by J. Schilling +# Written 1998-2014 by J. Schilling ########################################################################### # # Make Rules for local dynamic configuration @@ -14,27 +14,34 @@ # with the License. # # See the file CDDL.Schily.txt in this distribution for details. +# A copy of the CDDL is also available via the Internet at +# http://www.opensource.org/licenses/cddl1.txt # # When distributing Covered Code, include this CDDL HEADER in each # file and include the License file CDDL.Schily.txt from this distribution. ########################################################################### +configure: autoconf.m4 acgeneral.m4 acspecific.m4 acoldnames.m4 aclocal.m4 \ + local.cnf.in lconfig.h.in + @echo " ==> AUTOCONFIGURING LOCAL \"$@\""; sh ./autoconf + #config: $(ARCHDIR)/local.cnf $(ARCHDIR)/Inull: $(MKDIR) -p $(ARCHDIR) @echo > $@ -$(ARCHDIR)/local.cnf $(ARCHDIR)/lconfig.h: $(ARCHDIR)/Inull \ +$(ARCHDIR)/local.cnf $(ARCHDIR)/lconfig.h: $(LCONFIG_DEP) $(ARCHDIR)/Inull \ configure local.cnf.in lconfig.h.in $(RUL_LCONF) ########################################################################### -RUL_LCONF= @echo " ==> CONFIGURING LOCAL RULES \"$@\""; $(RM_F) $@; \ +RUL_LCONF= @echo " ==> CONFIGURING LOCAL RULES \"$@\""; \ + $(RM_F) $(ARCHDIR)/local.cnf $(ARCHDIR)/lconfig.h; \ cd $(ARCHDIR); \ CONFIG_NOFAIL=TRUE CC="$(XCC_COM)" CFLAGS="$(CFLAGS)" \ - CXXFLAGS="$(C++FLAGS)" CPPFLAGS="$(OSDEFS)" \ - LDFLAGS="$(LDOPTS)" sh ../../configure $(CONFFLAGS) + CXXFLAGS="$(C++FLAGS)" CPPFLAGS="$(OS_DEFS)" \ + LDFLAGS="$(LDOPTS)" sh $(INVERSE_SUBARCHDIR)../../configure $(CONFFLAGS) ########################################################################### include $(ARCHDIR)/Inull include $(ARCHDIR)/local.cnf diff -Nru cdrtools-2.01.01a33/RULES/m68k-linux-cc.rul cdrtools-3.02a09/RULES/m68k-linux-cc.rul --- cdrtools-2.01.01a33/RULES/m68k-linux-cc.rul 2007-05-09 12:25:30.000000000 +0000 +++ cdrtools-3.02a09/RULES/m68k-linux-cc.rul 1970-01-01 00:00:00.000000000 +0000 @@ -1,45 +0,0 @@ -#ident "@(#)i586-linux-cc.rul 1.11 07/05/09 " -########################################################################### -# Written 1996 by J. Schilling -########################################################################### -# -# Platform dependent MACROS for Linux -# -########################################################################### -# Copyright (c) J. Schilling -########################################################################### -# The contents of this file are subject to the terms of the -# Common Development and Distribution License, Version 1.0 only -# (the "License"). You may not use this file except in compliance -# with the License. -# -# See the file CDDL.Schily.txt in this distribution for details. -# -# When distributing Covered Code, include this CDDL HEADER in each -# file and include the License file CDDL.Schily.txt from this distribution. -########################################################################### -include $(SRCROOT)/$(RULESDIR)/rules.prg -########################################################################### -include $(SRCROOT)/$(RULESDIR)/cc-gcc.rul - -# -# LINUX_SRC_INCLUDE is defined in DEFAULTS/Defaults.linux -# -INCDIRSX += $(LINUX_SRC_INCLUDE) -OSDEFS += - -KDEFINES= -DKERNEL -D_KERNEL - -LIB_PREFIX= lib -LIB_SUFFIX= .a -SHL_SUFFIX= .so.1.0 - -LIB_SOCKET= -LIB_MATH= -lm -LIB_KVM= - -#LDOPTS= $(LIBS_PATH) $(LDPATH) $(RUNPATH:-R%=-Wl,-R%) -LDOPTS= $(LIBS_PATH) $(LDPATH) - -LORDER= echo -TSORT= cat diff -Nru cdrtools-2.01.01a33/RULES/m68k-linux-gcc.rul cdrtools-3.02a09/RULES/m68k-linux-gcc.rul --- cdrtools-2.01.01a33/RULES/m68k-linux-gcc.rul 2007-05-09 12:25:30.000000000 +0000 +++ cdrtools-3.02a09/RULES/m68k-linux-gcc.rul 1970-01-01 00:00:00.000000000 +0000 @@ -1,45 +0,0 @@ -#ident "@(#)i586-linux-gcc.rul 1.11 07/05/09 " -########################################################################### -# Written 1996 by J. Schilling -########################################################################### -# -# Platform dependent MACROS for Linux -# -########################################################################### -# Copyright (c) J. Schilling -########################################################################### -# The contents of this file are subject to the terms of the -# Common Development and Distribution License, Version 1.0 only -# (the "License"). You may not use this file except in compliance -# with the License. -# -# See the file CDDL.Schily.txt in this distribution for details. -# -# When distributing Covered Code, include this CDDL HEADER in each -# file and include the License file CDDL.Schily.txt from this distribution. -########################################################################### -include $(SRCROOT)/$(RULESDIR)/rules.prg -########################################################################### -include $(SRCROOT)/$(RULESDIR)/cc-gcc.rul - -# -# LINUX_SRC_INCLUDE is defined in DEFAULTS/Defaults.linux -# -INCDIRSX += $(LINUX_SRC_INCLUDE) -OSDEFS += - -KDEFINES= -DKERNEL -D_KERNEL - -LIB_PREFIX= lib -LIB_SUFFIX= .a -SHL_SUFFIX= .so.1.0 - -LIB_SOCKET= -LIB_MATH= -lm -LIB_KVM= - -#LDOPTS= $(LIBS_PATH) $(LDPATH) $(RUNPATH:-R%=-Wl,-R%) -LDOPTS= $(LIBS_PATH) $(LDPATH) - -LORDER= echo -TSORT= cat diff -Nru cdrtools-2.01.01a33/RULES/m68k-nextstep-cc.rul cdrtools-3.02a09/RULES/m68k-nextstep-cc.rul --- cdrtools-2.01.01a33/RULES/m68k-nextstep-cc.rul 2007-05-09 12:25:30.000000000 +0000 +++ cdrtools-3.02a09/RULES/m68k-nextstep-cc.rul 1970-01-01 00:00:00.000000000 +0000 @@ -1,52 +0,0 @@ -#ident "@(#)hppa-nextstep-cc.rul 1.10 07/05/09 " -########################################################################### -# Written 1996 by J. Schilling -########################################################################### -# -# Platform dependent MACROS for NeXT Step on hppa (GCC) -# -########################################################################### -# Copyright (c) J. Schilling -########################################################################### -# The contents of this file are subject to the terms of the -# Common Development and Distribution License, Version 1.0 only -# (the "License"). You may not use this file except in compliance -# with the License. -# -# See the file CDDL.Schily.txt in this distribution for details. -# -# When distributing Covered Code, include this CDDL HEADER in each -# file and include the License file CDDL.Schily.txt from this distribution. -########################################################################### -include $(SRCROOT)/$(RULESDIR)/rules.prg -########################################################################### -include $(SRCROOT)/$(RULESDIR)/cc-gcc.rul - -OSDEFS += - -KDEFINES= -DKERNEL -D_KERNEL - -LIB_PREFIX= lib -LIB_SUFFIX= .a -SHL_SUFFIX= .so.1.0 - -LIB_SOCKET= -LIB_MATH= -lm -LIB_KVM= - -#LDOPTS= $(LIBS_PATH) $(LDPATH) $(RUNPATH:-R%=-Wl,-R%) -LDOPTS= $(LIBS_PATH) $(LDPATH) -LDOPTDYN= -LNDYNLIB= @ - -DYNLD= @echo " ==> LINKING dynamic library \"$@\""; ld -RANLIB= @echo " ==> RANDOMIZING ARCHIVE \"$@\""; ranlib - -MKDIR= $(MKDIR_SH) - -#### -# XXX Better use something like CC=cc -#### -CC= @echo " ==> COMPILING \"$@\""; cc -LDCC= @echo " ==> LINKING \"$@\""; cc -MKDEP= @echo " ==> MAKING DEPENDENCIES \"$@\""; $(RMDEP); cc -M diff -Nru cdrtools-2.01.01a33/RULES/m68k-nextstep-gcc.rul cdrtools-3.02a09/RULES/m68k-nextstep-gcc.rul --- cdrtools-2.01.01a33/RULES/m68k-nextstep-gcc.rul 2007-05-09 12:25:30.000000000 +0000 +++ cdrtools-3.02a09/RULES/m68k-nextstep-gcc.rul 1970-01-01 00:00:00.000000000 +0000 @@ -1,52 +0,0 @@ -#ident "@(#)hppa-nextstep-cc.rul 1.10 07/05/09 " -########################################################################### -# Written 1996 by J. Schilling -########################################################################### -# -# Platform dependent MACROS for NeXT Step on hppa (GCC) -# -########################################################################### -# Copyright (c) J. Schilling -########################################################################### -# The contents of this file are subject to the terms of the -# Common Development and Distribution License, Version 1.0 only -# (the "License"). You may not use this file except in compliance -# with the License. -# -# See the file CDDL.Schily.txt in this distribution for details. -# -# When distributing Covered Code, include this CDDL HEADER in each -# file and include the License file CDDL.Schily.txt from this distribution. -########################################################################### -include $(SRCROOT)/$(RULESDIR)/rules.prg -########################################################################### -include $(SRCROOT)/$(RULESDIR)/cc-gcc.rul - -OSDEFS += - -KDEFINES= -DKERNEL -D_KERNEL - -LIB_PREFIX= lib -LIB_SUFFIX= .a -SHL_SUFFIX= .so.1.0 - -LIB_SOCKET= -LIB_MATH= -lm -LIB_KVM= - -#LDOPTS= $(LIBS_PATH) $(LDPATH) $(RUNPATH:-R%=-Wl,-R%) -LDOPTS= $(LIBS_PATH) $(LDPATH) -LDOPTDYN= -LNDYNLIB= @ - -DYNLD= @echo " ==> LINKING dynamic library \"$@\""; ld -RANLIB= @echo " ==> RANDOMIZING ARCHIVE \"$@\""; ranlib - -MKDIR= $(MKDIR_SH) - -#### -# XXX Better use something like CC=cc -#### -CC= @echo " ==> COMPILING \"$@\""; cc -LDCC= @echo " ==> LINKING \"$@\""; cc -MKDEP= @echo " ==> MAKING DEPENDENCIES \"$@\""; $(RMDEP); cc -M diff -Nru cdrtools-2.01.01a33/RULES/mac68k-netbsd-cc.rul cdrtools-3.02a09/RULES/mac68k-netbsd-cc.rul --- cdrtools-2.01.01a33/RULES/mac68k-netbsd-cc.rul 2007-05-09 12:25:30.000000000 +0000 +++ cdrtools-3.02a09/RULES/mac68k-netbsd-cc.rul 1970-01-01 00:00:00.000000000 +0000 @@ -1,41 +0,0 @@ -#ident "@(#)i386-netbsd-cc.rul 1.11 07/05/09 " -########################################################################### -# Written 1997 by J. Schilling -########################################################################### -# -# Platform dependent MACROS for NetBSD -# -########################################################################### -# Copyright (c) J. Schilling -########################################################################### -# The contents of this file are subject to the terms of the -# Common Development and Distribution License, Version 1.0 only -# (the "License"). You may not use this file except in compliance -# with the License. -# -# See the file CDDL.Schily.txt in this distribution for details. -# -# When distributing Covered Code, include this CDDL HEADER in each -# file and include the License file CDDL.Schily.txt from this distribution. -########################################################################### -include $(SRCROOT)/$(RULESDIR)/rules.prg -########################################################################### -include $(SRCROOT)/$(RULESDIR)/cc-gcc.rul - -OSDEFS += -#OSDEFS += -DIS_UNIX - -KDEFINES= -DKERNEL -D_KERNEL - -LIB_PREFIX= lib -LIB_SUFFIX= .a -SHL_SUFFIX= .so.1.0 - -LIB_SOCKET= -LIB_MATH= -lm -LIB_KVM= - -#LDOPTS= $(LIBS_PATH) $(LDPATH) $(RUNPATH:-R%=-Wl,-R%) -LDOPTS= $(LIBS_PATH) $(LDPATH) - -RANLIB= @echo " ==> RANDOMIZING ARCHIVE \"$@\""; ranlib diff -Nru cdrtools-2.01.01a33/RULES/mac68k-netbsd-gcc.rul cdrtools-3.02a09/RULES/mac68k-netbsd-gcc.rul --- cdrtools-2.01.01a33/RULES/mac68k-netbsd-gcc.rul 2007-05-09 12:25:30.000000000 +0000 +++ cdrtools-3.02a09/RULES/mac68k-netbsd-gcc.rul 1970-01-01 00:00:00.000000000 +0000 @@ -1,41 +0,0 @@ -#ident "@(#)i386-netbsd-gcc.rul 1.11 07/05/09 " -########################################################################### -# Written 1997 by J. Schilling -########################################################################### -# -# Platform dependent MACROS for NetBSD -# -########################################################################### -# Copyright (c) J. Schilling -########################################################################### -# The contents of this file are subject to the terms of the -# Common Development and Distribution License, Version 1.0 only -# (the "License"). You may not use this file except in compliance -# with the License. -# -# See the file CDDL.Schily.txt in this distribution for details. -# -# When distributing Covered Code, include this CDDL HEADER in each -# file and include the License file CDDL.Schily.txt from this distribution. -########################################################################### -include $(SRCROOT)/$(RULESDIR)/rules.prg -########################################################################### -include $(SRCROOT)/$(RULESDIR)/cc-gcc.rul - -OSDEFS += -#OSDEFS += -DIS_UNIX - -KDEFINES= -DKERNEL -D_KERNEL - -LIB_PREFIX= lib -LIB_SUFFIX= .a -SHL_SUFFIX= .so.1.0 - -LIB_SOCKET= -LIB_MATH= -lm -LIB_KVM= - -#LDOPTS= $(LIBS_PATH) $(LDPATH) $(RUNPATH:-R%=-Wl,-R%) -LDOPTS= $(LIBS_PATH) $(LDPATH) - -RANLIB= @echo " ==> RANDOMIZING ARCHIVE \"$@\""; ranlib diff -Nru cdrtools-2.01.01a33/RULES/macppc-netbsd-cc.rul cdrtools-3.02a09/RULES/macppc-netbsd-cc.rul --- cdrtools-2.01.01a33/RULES/macppc-netbsd-cc.rul 2007-05-09 12:25:30.000000000 +0000 +++ cdrtools-3.02a09/RULES/macppc-netbsd-cc.rul 1970-01-01 00:00:00.000000000 +0000 @@ -1,41 +0,0 @@ -#ident "@(#)i386-netbsd-cc.rul 1.11 07/05/09 " -########################################################################### -# Written 1997 by J. Schilling -########################################################################### -# -# Platform dependent MACROS for NetBSD -# -########################################################################### -# Copyright (c) J. Schilling -########################################################################### -# The contents of this file are subject to the terms of the -# Common Development and Distribution License, Version 1.0 only -# (the "License"). You may not use this file except in compliance -# with the License. -# -# See the file CDDL.Schily.txt in this distribution for details. -# -# When distributing Covered Code, include this CDDL HEADER in each -# file and include the License file CDDL.Schily.txt from this distribution. -########################################################################### -include $(SRCROOT)/$(RULESDIR)/rules.prg -########################################################################### -include $(SRCROOT)/$(RULESDIR)/cc-gcc.rul - -OSDEFS += -#OSDEFS += -DIS_UNIX - -KDEFINES= -DKERNEL -D_KERNEL - -LIB_PREFIX= lib -LIB_SUFFIX= .a -SHL_SUFFIX= .so.1.0 - -LIB_SOCKET= -LIB_MATH= -lm -LIB_KVM= - -#LDOPTS= $(LIBS_PATH) $(LDPATH) $(RUNPATH:-R%=-Wl,-R%) -LDOPTS= $(LIBS_PATH) $(LDPATH) - -RANLIB= @echo " ==> RANDOMIZING ARCHIVE \"$@\""; ranlib diff -Nru cdrtools-2.01.01a33/RULES/macppc-netbsd-gcc.rul cdrtools-3.02a09/RULES/macppc-netbsd-gcc.rul --- cdrtools-2.01.01a33/RULES/macppc-netbsd-gcc.rul 2007-05-09 12:25:30.000000000 +0000 +++ cdrtools-3.02a09/RULES/macppc-netbsd-gcc.rul 1970-01-01 00:00:00.000000000 +0000 @@ -1,41 +0,0 @@ -#ident "@(#)i386-netbsd-gcc.rul 1.11 07/05/09 " -########################################################################### -# Written 1997 by J. Schilling -########################################################################### -# -# Platform dependent MACROS for NetBSD -# -########################################################################### -# Copyright (c) J. Schilling -########################################################################### -# The contents of this file are subject to the terms of the -# Common Development and Distribution License, Version 1.0 only -# (the "License"). You may not use this file except in compliance -# with the License. -# -# See the file CDDL.Schily.txt in this distribution for details. -# -# When distributing Covered Code, include this CDDL HEADER in each -# file and include the License file CDDL.Schily.txt from this distribution. -########################################################################### -include $(SRCROOT)/$(RULESDIR)/rules.prg -########################################################################### -include $(SRCROOT)/$(RULESDIR)/cc-gcc.rul - -OSDEFS += -#OSDEFS += -DIS_UNIX - -KDEFINES= -DKERNEL -D_KERNEL - -LIB_PREFIX= lib -LIB_SUFFIX= .a -SHL_SUFFIX= .so.1.0 - -LIB_SOCKET= -LIB_MATH= -lm -LIB_KVM= - -#LDOPTS= $(LIBS_PATH) $(LDPATH) $(RUNPATH:-R%=-Wl,-R%) -LDOPTS= $(LIBS_PATH) $(LDPATH) - -RANLIB= @echo " ==> RANDOMIZING ARCHIVE \"$@\""; ranlib diff -Nru cdrtools-2.01.01a33/RULES/mips64-linux-cc.rul cdrtools-3.02a09/RULES/mips64-linux-cc.rul --- cdrtools-2.01.01a33/RULES/mips64-linux-cc.rul 2007-05-09 12:25:30.000000000 +0000 +++ cdrtools-3.02a09/RULES/mips64-linux-cc.rul 1970-01-01 00:00:00.000000000 +0000 @@ -1,45 +0,0 @@ -#ident "@(#)i586-linux-cc.rul 1.11 07/05/09 " -########################################################################### -# Written 1996 by J. Schilling -########################################################################### -# -# Platform dependent MACROS for Linux -# -########################################################################### -# Copyright (c) J. Schilling -########################################################################### -# The contents of this file are subject to the terms of the -# Common Development and Distribution License, Version 1.0 only -# (the "License"). You may not use this file except in compliance -# with the License. -# -# See the file CDDL.Schily.txt in this distribution for details. -# -# When distributing Covered Code, include this CDDL HEADER in each -# file and include the License file CDDL.Schily.txt from this distribution. -########################################################################### -include $(SRCROOT)/$(RULESDIR)/rules.prg -########################################################################### -include $(SRCROOT)/$(RULESDIR)/cc-gcc.rul - -# -# LINUX_SRC_INCLUDE is defined in DEFAULTS/Defaults.linux -# -INCDIRSX += $(LINUX_SRC_INCLUDE) -OSDEFS += - -KDEFINES= -DKERNEL -D_KERNEL - -LIB_PREFIX= lib -LIB_SUFFIX= .a -SHL_SUFFIX= .so.1.0 - -LIB_SOCKET= -LIB_MATH= -lm -LIB_KVM= - -#LDOPTS= $(LIBS_PATH) $(LDPATH) $(RUNPATH:-R%=-Wl,-R%) -LDOPTS= $(LIBS_PATH) $(LDPATH) - -LORDER= echo -TSORT= cat diff -Nru cdrtools-2.01.01a33/RULES/mips64-linux-gcc.rul cdrtools-3.02a09/RULES/mips64-linux-gcc.rul --- cdrtools-2.01.01a33/RULES/mips64-linux-gcc.rul 2007-05-09 12:25:30.000000000 +0000 +++ cdrtools-3.02a09/RULES/mips64-linux-gcc.rul 1970-01-01 00:00:00.000000000 +0000 @@ -1,45 +0,0 @@ -#ident "@(#)i586-linux-gcc.rul 1.11 07/05/09 " -########################################################################### -# Written 1996 by J. Schilling -########################################################################### -# -# Platform dependent MACROS for Linux -# -########################################################################### -# Copyright (c) J. Schilling -########################################################################### -# The contents of this file are subject to the terms of the -# Common Development and Distribution License, Version 1.0 only -# (the "License"). You may not use this file except in compliance -# with the License. -# -# See the file CDDL.Schily.txt in this distribution for details. -# -# When distributing Covered Code, include this CDDL HEADER in each -# file and include the License file CDDL.Schily.txt from this distribution. -########################################################################### -include $(SRCROOT)/$(RULESDIR)/rules.prg -########################################################################### -include $(SRCROOT)/$(RULESDIR)/cc-gcc.rul - -# -# LINUX_SRC_INCLUDE is defined in DEFAULTS/Defaults.linux -# -INCDIRSX += $(LINUX_SRC_INCLUDE) -OSDEFS += - -KDEFINES= -DKERNEL -D_KERNEL - -LIB_PREFIX= lib -LIB_SUFFIX= .a -SHL_SUFFIX= .so.1.0 - -LIB_SOCKET= -LIB_MATH= -lm -LIB_KVM= - -#LDOPTS= $(LIBS_PATH) $(LDPATH) $(RUNPATH:-R%=-Wl,-R%) -LDOPTS= $(LIBS_PATH) $(LDPATH) - -LORDER= echo -TSORT= cat diff -Nru cdrtools-2.01.01a33/RULES/mipsel-linux-cc.rul cdrtools-3.02a09/RULES/mipsel-linux-cc.rul --- cdrtools-2.01.01a33/RULES/mipsel-linux-cc.rul 2007-05-09 12:25:30.000000000 +0000 +++ cdrtools-3.02a09/RULES/mipsel-linux-cc.rul 1970-01-01 00:00:00.000000000 +0000 @@ -1,45 +0,0 @@ -#ident "@(#)i586-linux-cc.rul 1.11 07/05/09 " -########################################################################### -# Written 1996 by J. Schilling -########################################################################### -# -# Platform dependent MACROS for Linux -# -########################################################################### -# Copyright (c) J. Schilling -########################################################################### -# The contents of this file are subject to the terms of the -# Common Development and Distribution License, Version 1.0 only -# (the "License"). You may not use this file except in compliance -# with the License. -# -# See the file CDDL.Schily.txt in this distribution for details. -# -# When distributing Covered Code, include this CDDL HEADER in each -# file and include the License file CDDL.Schily.txt from this distribution. -########################################################################### -include $(SRCROOT)/$(RULESDIR)/rules.prg -########################################################################### -include $(SRCROOT)/$(RULESDIR)/cc-gcc.rul - -# -# LINUX_SRC_INCLUDE is defined in DEFAULTS/Defaults.linux -# -INCDIRSX += $(LINUX_SRC_INCLUDE) -OSDEFS += - -KDEFINES= -DKERNEL -D_KERNEL - -LIB_PREFIX= lib -LIB_SUFFIX= .a -SHL_SUFFIX= .so.1.0 - -LIB_SOCKET= -LIB_MATH= -lm -LIB_KVM= - -#LDOPTS= $(LIBS_PATH) $(LDPATH) $(RUNPATH:-R%=-Wl,-R%) -LDOPTS= $(LIBS_PATH) $(LDPATH) - -LORDER= echo -TSORT= cat diff -Nru cdrtools-2.01.01a33/RULES/mipsel-linux-gcc.rul cdrtools-3.02a09/RULES/mipsel-linux-gcc.rul --- cdrtools-2.01.01a33/RULES/mipsel-linux-gcc.rul 2007-05-09 12:25:30.000000000 +0000 +++ cdrtools-3.02a09/RULES/mipsel-linux-gcc.rul 1970-01-01 00:00:00.000000000 +0000 @@ -1,45 +0,0 @@ -#ident "@(#)i586-linux-gcc.rul 1.11 07/05/09 " -########################################################################### -# Written 1996 by J. Schilling -########################################################################### -# -# Platform dependent MACROS for Linux -# -########################################################################### -# Copyright (c) J. Schilling -########################################################################### -# The contents of this file are subject to the terms of the -# Common Development and Distribution License, Version 1.0 only -# (the "License"). You may not use this file except in compliance -# with the License. -# -# See the file CDDL.Schily.txt in this distribution for details. -# -# When distributing Covered Code, include this CDDL HEADER in each -# file and include the License file CDDL.Schily.txt from this distribution. -########################################################################### -include $(SRCROOT)/$(RULESDIR)/rules.prg -########################################################################### -include $(SRCROOT)/$(RULESDIR)/cc-gcc.rul - -# -# LINUX_SRC_INCLUDE is defined in DEFAULTS/Defaults.linux -# -INCDIRSX += $(LINUX_SRC_INCLUDE) -OSDEFS += - -KDEFINES= -DKERNEL -D_KERNEL - -LIB_PREFIX= lib -LIB_SUFFIX= .a -SHL_SUFFIX= .so.1.0 - -LIB_SOCKET= -LIB_MATH= -lm -LIB_KVM= - -#LDOPTS= $(LIBS_PATH) $(LDPATH) $(RUNPATH:-R%=-Wl,-R%) -LDOPTS= $(LIBS_PATH) $(LDPATH) - -LORDER= echo -TSORT= cat diff -Nru cdrtools-2.01.01a33/RULES/mips-linux-cc.rul cdrtools-3.02a09/RULES/mips-linux-cc.rul --- cdrtools-2.01.01a33/RULES/mips-linux-cc.rul 2007-05-09 12:25:30.000000000 +0000 +++ cdrtools-3.02a09/RULES/mips-linux-cc.rul 1970-01-01 00:00:00.000000000 +0000 @@ -1,45 +0,0 @@ -#ident "@(#)i586-linux-cc.rul 1.11 07/05/09 " -########################################################################### -# Written 1996 by J. Schilling -########################################################################### -# -# Platform dependent MACROS for Linux -# -########################################################################### -# Copyright (c) J. Schilling -########################################################################### -# The contents of this file are subject to the terms of the -# Common Development and Distribution License, Version 1.0 only -# (the "License"). You may not use this file except in compliance -# with the License. -# -# See the file CDDL.Schily.txt in this distribution for details. -# -# When distributing Covered Code, include this CDDL HEADER in each -# file and include the License file CDDL.Schily.txt from this distribution. -########################################################################### -include $(SRCROOT)/$(RULESDIR)/rules.prg -########################################################################### -include $(SRCROOT)/$(RULESDIR)/cc-gcc.rul - -# -# LINUX_SRC_INCLUDE is defined in DEFAULTS/Defaults.linux -# -INCDIRSX += $(LINUX_SRC_INCLUDE) -OSDEFS += - -KDEFINES= -DKERNEL -D_KERNEL - -LIB_PREFIX= lib -LIB_SUFFIX= .a -SHL_SUFFIX= .so.1.0 - -LIB_SOCKET= -LIB_MATH= -lm -LIB_KVM= - -#LDOPTS= $(LIBS_PATH) $(LDPATH) $(RUNPATH:-R%=-Wl,-R%) -LDOPTS= $(LIBS_PATH) $(LDPATH) - -LORDER= echo -TSORT= cat diff -Nru cdrtools-2.01.01a33/RULES/mips-linux-gcc.rul cdrtools-3.02a09/RULES/mips-linux-gcc.rul --- cdrtools-2.01.01a33/RULES/mips-linux-gcc.rul 2007-05-09 12:25:30.000000000 +0000 +++ cdrtools-3.02a09/RULES/mips-linux-gcc.rul 1970-01-01 00:00:00.000000000 +0000 @@ -1,45 +0,0 @@ -#ident "@(#)i586-linux-gcc.rul 1.11 07/05/09 " -########################################################################### -# Written 1996 by J. Schilling -########################################################################### -# -# Platform dependent MACROS for Linux -# -########################################################################### -# Copyright (c) J. Schilling -########################################################################### -# The contents of this file are subject to the terms of the -# Common Development and Distribution License, Version 1.0 only -# (the "License"). You may not use this file except in compliance -# with the License. -# -# See the file CDDL.Schily.txt in this distribution for details. -# -# When distributing Covered Code, include this CDDL HEADER in each -# file and include the License file CDDL.Schily.txt from this distribution. -########################################################################### -include $(SRCROOT)/$(RULESDIR)/rules.prg -########################################################################### -include $(SRCROOT)/$(RULESDIR)/cc-gcc.rul - -# -# LINUX_SRC_INCLUDE is defined in DEFAULTS/Defaults.linux -# -INCDIRSX += $(LINUX_SRC_INCLUDE) -OSDEFS += - -KDEFINES= -DKERNEL -D_KERNEL - -LIB_PREFIX= lib -LIB_SUFFIX= .a -SHL_SUFFIX= .so.1.0 - -LIB_SOCKET= -LIB_MATH= -lm -LIB_KVM= - -#LDOPTS= $(LIBS_PATH) $(LDPATH) $(RUNPATH:-R%=-Wl,-R%) -LDOPTS= $(LIBS_PATH) $(LDPATH) - -LORDER= echo -TSORT= cat diff -Nru cdrtools-2.01.01a33/RULES/mk-build.id cdrtools-3.02a09/RULES/mk-build.id --- cdrtools-2.01.01a33/RULES/mk-build.id 2007-05-03 12:58:59.000000000 +0000 +++ cdrtools-3.02a09/RULES/mk-build.id 1970-01-01 00:00:00.000000000 +0000 @@ -1,56 +0,0 @@ -#ident "@(#)mk-smake.id 1.6 07/05/03 " -########################################################################### -# Written 1996 by J. Schilling -########################################################################### -# -# Name of make program (make/gmake/smake) -# -########################################################################### -# Copyright (c) J. Schilling -########################################################################### -# The contents of this file are subject to the terms of the -# Common Development and Distribution License, Version 1.0 only -# (the "License"). You may not use this file except in compliance -# with the License. -# -# See the file CDDL.Schily.txt in this distribution for details. -# -# When distributing Covered Code, include this CDDL HEADER in each -# file and include the License file CDDL.Schily.txt from this distribution. -########################################################################### - -MAKEPROG= $(MAKE_NAME) - -########################################################################### -# -# standard (automatic) machine identification -# -########################################################################### -# -# XP_ARCH = MAKE_ARCH = uname -p = mach # Processor (sparc/mc68020) -# XK_ARCH = MAKE_MACH = uname -m = arch -k # Kernel (sun3/sun4c/sun4m) -# XM_ARCH = MAKE_M_ARCH = arch ~ arch -k # Machine (sun3/sun4) -# -########################################################################### - -XP_ARCH= $(MAKE_ARCH) -XK_ARCH= $(MAKE_MACH) -XM_ARCH= $(MAKE_M_ARCH) - -P_ARCH= $(XP_ARCH) -K_ARCH= $(XK_ARCH) -M_ARCH= $(XM_ARCH) - -_P_ARCH= $(_UNIQ)$(XP_ARCH) -__P_ARCH= $(_P_ARCH:$(_UNIQ)=$(MAKE_MACH)) -P_ARCH= $(__P_ARCH:$(_UNIQ)%=%) - -_M_ARCH= $(_UNIQ)$(MAKE_M_ARCH) -__M_ARCH= $(_M_ARCH:$(_UNIQ)=$(MAKE_MACH)) -M_ARCH= $(__M_ARCH:$(_UNIQ)%=%) - -HOSTNAME= $(MAKE_HOST) -OSNAME= $(MAKE_OS) -OSDEFS= $(MAKE_OSDEFS) -OSREL= $(MAKE_OSREL) -OSVERSION= $(MAKE_OSVERSION) diff -Nru cdrtools-2.01.01a33/RULES/mk-gmake.id cdrtools-3.02a09/RULES/mk-gmake.id --- cdrtools-2.01.01a33/RULES/mk-gmake.id 2007-05-03 12:58:59.000000000 +0000 +++ cdrtools-3.02a09/RULES/mk-gmake.id 2012-12-29 14:44:26.000000000 +0000 @@ -1,4 +1,4 @@ -#ident "@(#)mk-gmake.id 1.16 07/05/03 " +#ident "@(#)mk-gmake.id 1.24 12/12/29 " ########################################################################### # Written 1996 by J. Schilling ########################################################################### @@ -19,7 +19,20 @@ # file and include the License file CDDL.Schily.txt from this distribution. ########################################################################### +_SETENV= $(_UNIQ)$(SETENV) +__SETENV= $(_SETENV:$(_UNIQ)=rules.env) +___SETENV= $(__SETENV:$(_UNIQ)none=rules.nul) +SET_ENV= $(___SETENV:$(_UNIQ)%=%) + +include $(SRCROOT)/$(RULESDIR)/$(SET_ENV) + MAKEPROG= gmake +.SHELLFLAGS= -ce # switch gmake-3.82 ff. to POSIX behavior +WAIT= # gmake is unable to wait for parallel targets + +SPACE= $(_UNIQ:$(_UNIQ)%= ) +PRE_NUMBER= pre\# +NUMBER_SIGN= $(PRE_NUMBER:pre%=%) ########################################################################### # @@ -32,17 +45,27 @@ # XM_ARCH = arch ~ arch -k # Machine (sun3/sun4) # ########################################################################### +# +# Due to a bug in /usr/xpg*/bin/tr on Solaris, we cannot directly translit +# many different chars to '-' using e.g. tr ', /\\()"' ',------' +# This is why we first tranliterate everything to '/ and later to '-' +# +# Due to a bug in *BSDs sed, we cannot use sed 'y%ABC\\%abc-%' +# +########################################################################### ifndef ARCH_DONE +ifndef GMAKE_NOWARN __gmake_warn:= $(shell cat $(SRCROOT)/$(RULESDIR)/gmake.wrn 1>&2; sleep 2) +endif _MACHCMD= (mach || uname -p || true) 2> /dev/null _ARCHCMD= (arch || /usr/ucb/arch || true) 2> /dev/null -XP_ARCH:= $(shell $(_MACHCMD) | tr '[A-Z]' '[a-z]' | tr ', /\\()"' ',//////' | tr ',/' ',\-') -XK_ARCH:= $(shell uname -m | tr '[A-Z]' '[a-z]' | tr ', /\\()"' ',//////' | tr ',/' ',\-') -XM_ARCH:= $(shell $(_ARCHCMD) | tr '[A-Z]' '[a-z]' | tr ', /\\()"' ',//////' | tr ',/' ',\-') +XP_ARCH:= $(shell $(_MACHCMD) | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ, /\\()"' 'abcdefghijklmnopqrstuvwxyz,//////' | tr ',/' ',\-') +XK_ARCH:= $(shell uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ, /\\()"' 'abcdefghijklmnopqrstuvwxyz,//////' | tr ',/' ',\-') +XM_ARCH:= $(shell $(_ARCHCMD) | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ, /\\()"' 'abcdefghijklmnopqrstuvwxyz,//////' | tr ',/' ',\-') P_ARCH= $(XP_ARCH) K_ARCH= $(XK_ARCH) @@ -58,9 +81,9 @@ __M_ARCH= $(_M_ARCH:$(_UNIQ)=$(K_ARCH)) M_ARCH= $(__M_ARCH:$(_UNIQ)%=%) -OSNAME:= $(shell uname -s | tr '[A-Z]' '[a-z]' | tr ', /\\()"' ',//////' | tr ',/' ',-') -OSREL:= $(shell uname -r | tr '[A-Z]' '[a-z]' | tr ', /\\()"' ',//////' | tr ',/' ',-') -OSVERSION:= $(shell uname -v | tr '[A-Z]' '[a-z]' | tr ', /\\()"' ',//////' | tr ',/' ',-') +OSNAME:= $(shell uname -s | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ, /\\()"' 'abcdefghijklmnopqrstuvwxyz,//////' | tr ',/' ',\-') +OSREL:= $(shell uname -r | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ, /\\()"' 'abcdefghijklmnopqrstuvwxyz,//////' | tr ',/' ',\-') +OSVERSION:= $(shell uname -v | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ, /\\()"' 'abcdefghijklmnopqrstuvwxyz,//////' | tr ',/' ',\-') ARCH_DONE= TRUE diff -Nru cdrtools-2.01.01a33/RULES/mk-.id cdrtools-3.02a09/RULES/mk-.id --- cdrtools-2.01.01a33/RULES/mk-.id 2007-05-03 12:58:59.000000000 +0000 +++ cdrtools-3.02a09/RULES/mk-.id 2012-12-29 14:44:26.000000000 +0000 @@ -1,4 +1,4 @@ -#ident "@(#)mk-.id 1.12 07/05/03 " +#ident "@(#)mk-.id 1.18 12/12/29 " ########################################################################### # Written 1996 by J. Schilling ########################################################################### @@ -20,6 +20,11 @@ ########################################################################### MAKEPROG= make # Sun make +WAIT= .WAIT # Sun make notation to wait for parallel targets + +SPACE= $(_UNIQ:$(_UNIQ)%= ) +PRE_NUMBER= pre\# +NUMBER_SIGN= $(PRE_NUMBER:pre\%=%) ########################################################################### # @@ -32,10 +37,17 @@ # XM_ARCH = arch ~ arch -k # Machine (sun3/sun4) # ########################################################################### +# +# Due to a bug in /usr/xpg*/bin/tr on Solaris, we cannot directly translit +# many different chars to '-' using e.g. tr ', /\\()"' ',------' +# +# This is why we use sed 'y%ABC\\%abc-%'. Note that this will not work on *BSD +# +########################################################################### -XP_ARCH:sh= (mach || uname -p || true)2>/dev/null | tr '[A-Z]' '[a-z]' | tr ', /\\()"' ',------' -XK_ARCH:sh= uname -m | tr '[A-Z]' '[a-z]' | tr ', /\\()"' ',------' -XM_ARCH:sh= (arch || /usr/ucb/arch || true)2>/dev/null | tr '[A-Z]' '[a-z]' | tr ', /\\()"' ',------' +XP_ARCH:sh= (mach || uname -p || true)2>/dev/null | sed 'y%ABCDEFGHIJKLMNOPQRSTUVWXYZ, /\\()"%abcdefghijklmnopqrstuvwxyz,------%' +XK_ARCH:sh= uname -m | sed 'y%ABCDEFGHIJKLMNOPQRSTUVWXYZ, /\\()"%abcdefghijklmnopqrstuvwxyz,------%' +XM_ARCH:sh= (arch || /usr/ucb/arch || true)2>/dev/null | sed 'y%ABCDEFGHIJKLMNOPQRSTUVWXYZ, /\\()"%abcdefghijklmnopqrstuvwxyz,------%' P_ARCH= $(XP_ARCH) K_ARCH= $(XK_ARCH) @@ -51,6 +63,6 @@ __M_ARCH= $(_M_ARCH:$(_UNIQ)=$(K_ARCH)) M_ARCH= $(__M_ARCH:$(_UNIQ)%=%) -OSNAME:sh= uname -s | tr '[A-Z]' '[a-z]' | tr ', /\\()"' ',------' -OSREL:sh= uname -r | tr '[A-Z]' '[a-z]' | tr ', /\\()"' ',------' -OSVERSION:sh= uname -v | tr '[A-Z]' '[a-z]' | tr ', /\\()"' ',------' +OSNAME:sh= uname -s | sed 'y%ABCDEFGHIJKLMNOPQRSTUVWXYZ, /\\()"%abcdefghijklmnopqrstuvwxyz,------%' +OSREL:sh= uname -r | sed 'y%ABCDEFGHIJKLMNOPQRSTUVWXYZ, /\\()"%abcdefghijklmnopqrstuvwxyz,------%' +OSVERSION:sh= uname -v | sed 'y%ABCDEFGHIJKLMNOPQRSTUVWXYZ, /\\()"%abcdefghijklmnopqrstuvwxyz,------%' diff -Nru cdrtools-2.01.01a33/RULES/MKLINKS cdrtools-3.02a09/RULES/MKLINKS --- cdrtools-2.01.01a33/RULES/MKLINKS 2007-06-13 22:15:39.000000000 +0000 +++ cdrtools-3.02a09/RULES/MKLINKS 2017-08-01 21:01:26.000000000 +0000 @@ -1,10 +1,10 @@ #!/bin/sh ########################################################################### -#ident "@(#)MKLINKS 1.65 07/06/14 " +#ident "@(#)MKLINKS 1.130 17/08/01 " ########################################################################### -# Written 1996 by J. Schilling +# Written 1996-2015 by J. Schilling ########################################################################### -# Copyright (c) J. Schilling +# Copyright (c) 1996-2015 J. Schilling ########################################################################### # The contents of this file are subject to the terms of the # Common Development and Distribution License, Version 1.0 only @@ -12,192 +12,437 @@ # with the License. # # See the file CDDL.Schily.txt in this distribution for details. +# A copy of the CDDL is also available via the Internet at +# http://www.opensource.org/licenses/cddl1.txt # # When distributing Covered Code, include this CDDL HEADER in each # file and include the License file CDDL.Schily.txt from this distribution. ########################################################################### -ln -s mk-.id mk-make.id -ln -s r-make.c4x r-gmake.c4x -ln -s r-make.c4x-dep r-gmake.c4x-dep -ln -s r-make.obj r-gmake.obj -ln -s 9000-725-hp-ux-cc.rul 9000-710-hp-ux-cc.rul -ln -s 9000-725-hp-ux-cc.rul 9000-712-hp-ux-cc.rul -ln -s 9000-725-hp-ux-cc.rul 9000-715-hp-ux-cc.rul -ln -s 9000-725-hp-ux-cc.rul 9000-735-hp-ux-cc.rul -ln -s 9000-725-hp-ux-cc.rul 9000-743-hp-ux-cc.rul -ln -s 9000-725-hp-ux-cc.rul 9000-755-hp-ux-cc.rul -ln -s 9000-725-hp-ux-cc.rul 9000-777-hp-ux-cc.rul -ln -s 9000-725-hp-ux-cc.rul 9000-778-hp-ux-cc.rul -ln -s 9000-725-hp-ux-cc.rul 9000-780-hp-ux-cc.rul -ln -s 9000-725-hp-ux-cc.rul 9000-782-hp-ux-cc.rul -ln -s 9000-725-hp-ux-cc.rul 9000-785-hp-ux-cc.rul -ln -s 9000-725-hp-ux-cc.rul 9000-800-hp-ux-cc.rul -ln -s 9000-725-hp-ux-cc.rul 9000-820-hp-ux-cc.rul -ln -s 9000-725-hp-ux-cc.rul 9000-831-hp-ux-cc.rul -ln -s 9000-725-hp-ux-cc.rul 9000-899-hp-ux-cc.rul -ln -s 9000-725-hp-ux-gcc.rul 9000-710-hp-ux-gcc.rul -ln -s 9000-725-hp-ux-gcc.rul 9000-712-hp-ux-gcc.rul -ln -s 9000-725-hp-ux-gcc.rul 9000-715-hp-ux-gcc.rul -ln -s 9000-725-hp-ux-gcc.rul 9000-735-hp-ux-gcc.rul -ln -s 9000-725-hp-ux-gcc.rul 9000-743-hp-ux-gcc.rul -ln -s 9000-725-hp-ux-gcc.rul 9000-755-hp-ux-gcc.rul -ln -s 9000-725-hp-ux-gcc.rul 9000-777-hp-ux-gcc.rul -ln -s 9000-725-hp-ux-gcc.rul 9000-778-hp-ux-gcc.rul -ln -s 9000-725-hp-ux-gcc.rul 9000-780-hp-ux-gcc.rul -ln -s 9000-725-hp-ux-gcc.rul 9000-782-hp-ux-gcc.rul -ln -s 9000-725-hp-ux-gcc.rul 9000-785-hp-ux-gcc.rul -ln -s 9000-725-hp-ux-gcc.rul 9000-800-hp-ux-gcc.rul -ln -s 9000-725-hp-ux-gcc.rul 9000-820-hp-ux-gcc.rul -ln -s 9000-725-hp-ux-gcc.rul 9000-831-hp-ux-gcc.rul -ln -s 9000-725-hp-ux-gcc.rul 9000-899-hp-ux-gcc.rul -ln -s hppa-nextstep-cc.rul i386-nextstep-cc.rul -ln -s hppa-nextstep-cc.rul m68k-nextstep-cc.rul -ln -s hppa-nextstep-cc.rul sparc-nextstep-cc.rul -ln -s hppa-nextstep-cc.rul i386-nextstep-gcc.rul -ln -s hppa-nextstep-cc.rul m68k-nextstep-gcc.rul -ln -s hppa-nextstep-cc.rul sparc-nextstep-gcc.rul -ln -s os-irix.id os-irix64.id -ln -s ip22-irix-cc.rul ip17-irix-cc.rul -ln -s ip22-irix-cc.rul ip20-irix-cc.rul -ln -s ip22-irix-cc.rul ip27-irix-cc.rul -ln -s ip22-irix-cc.rul ip28-irix-cc.rul -ln -s ip22-irix-cc.rul ip30-irix-cc.rul -ln -s ip22-irix-cc.rul ip32-irix-cc.rul -ln -s ip22-irix-gcc.rul ip17-irix-gcc.rul -ln -s ip22-irix-gcc.rul ip20-irix-gcc.rul -ln -s ip22-irix-gcc.rul ip27-irix-gcc.rul -ln -s ip22-irix-gcc.rul ip28-irix-gcc.rul -ln -s ip22-irix-gcc.rul ip30-irix-gcc.rul -ln -s ip22-irix-gcc.rul ip32-irix-gcc.rul -ln -s i386-freebsd-cc.rul sparc64-freebsd-cc.rul -ln -s i386-freebsd-gcc.rul sparc64-freebsd-gcc.rul -ln -s i386-freebsd-cc.rul i386-dragonfly-cc.rul -ln -s i386-freebsd-gcc.rul i386-dragonfly-gcc.rul -ln -s i386-netbsd-cc.rul alpha-netbsd-cc.rul -ln -s i386-netbsd-gcc.rul alpha-netbsd-gcc.rul -ln -s i386-netbsd-cc.rul sparc-netbsd-cc.rul -ln -s i386-netbsd-gcc.rul sparc-netbsd-gcc.rul -ln -s i386-netbsd-cc.rul mac68k-netbsd-cc.rul -ln -s i386-netbsd-gcc.rul mac68k-netbsd-gcc.rul -ln -s i386-netbsd-cc.rul amiga-netbsd-cc.rul -ln -s i386-netbsd-gcc.rul amiga-netbsd-gcc.rul -ln -s i386-netbsd-cc.rul macppc-netbsd-cc.rul -ln -s i386-netbsd-gcc.rul macppc-netbsd-gcc.rul -ln -s i386-bsd-os-cc.rul sparc-bsd-os-cc.rul -ln -s i386-bsd-os-gcc.rul sparc-bsd-os-gcc.rul -ln -s i386-bsd-os3-cc.rul sparc-bsd-os3-cc.rul -ln -s i386-bsd-os3-gcc.rul sparc-bsd-os3-gcc.rul -ln -s i586-linux-cc.rul i386-linux-cc.rul -ln -s i586-linux-cc.rul i486-linux-cc.rul -ln -s i586-linux-cc.rul i686-linux-cc.rul -ln -s i586-linux-gcc.rul i386-linux-gcc.rul -ln -s i586-linux-gcc.rul i486-linux-gcc.rul -ln -s i586-linux-gcc.rul i686-linux-gcc.rul -ln -s i586-linux-cc.rul sparc-linux-cc.rul -ln -s i586-linux-gcc.rul sparc-linux-gcc.rul -ln -s i586-linux-cc.rul sparc64-linux-cc.rul -ln -s i586-linux-gcc.rul sparc64-linux-gcc.rul -ln -s i586-linux-cc.rul alpha-linux-cc.rul -ln -s i586-linux-gcc.rul alpha-linux-gcc.rul -ln -s i586-linux-cc.rul ppc-linux-cc.rul -ln -s i586-linux-gcc.rul ppc-linux-gcc.rul -ln -s i586-linux-cc.rul m68k-linux-cc.rul -ln -s i586-linux-gcc.rul m68k-linux-gcc.rul -ln -s i586-linux-cc.rul armv4l-linux-cc.rul -ln -s i586-linux-gcc.rul armv4l-linux-gcc.rul -ln -s i586-linux-cc.rul mips-linux-cc.rul -ln -s i586-linux-gcc.rul mips-linux-gcc.rul -ln -s i586-linux-cc.rul mipsel-linux-cc.rul -ln -s i586-linux-gcc.rul mipsel-linux-gcc.rul -ln -s i586-linux-cc.rul mips64-linux-cc.rul -ln -s i586-linux-gcc.rul mips64-linux-gcc.rul -ln -s i586-linux-cc.rul s390-linux-cc.rul -ln -s i586-linux-gcc.rul s390-linux-gcc.rul -ln -s i586-linux-cc.rul parisc-linux-cc.rul -ln -s i586-linux-gcc.rul parisc-linux-gcc.rul -ln -s i586-linux-cc.rul parisc64-linux-cc.rul -ln -s i586-linux-gcc.rul parisc64-linux-gcc.rul -ln -s i586-linux-cc.rul ia64-linux-cc.rul -ln -s i586-linux-gcc.rul ia64-linux-gcc.rul -ln -s i586-linux-cc.rul x86_64-linux-cc.rul -ln -s i586-linux-gcc.rul x86_64-linux-gcc.rul -ln -s i586-linux-cc.rul armv5teb-linux-cc.rul -ln -s i586-linux-gcc.rul armv5teb-linux-gcc.rul -ln -s i586-linux-suncc.rul i686-linux-suncc.rul -ln -s i586-linux-suncc.rul i486-linux-suncc.rul -ln -s i586-linux-suncc.rul i386-linux-suncc.rul -ln -s x86_64-linux-suncc.rul i386-linux-suncc.rul -ln -s i586-linux-suncc64.rul i686-linux-suncc64.rul -ln -s x86_64-linux-suncc64.rul i686-linux-suncc64.rul -#ln -s os-cygwin32_nt.id os-cygwin_95-4.0.id -#ln -s os-cygwin32_nt.id os-cygwin_98-4.0.id -#ln -s os-cygwin32_nt.id os-cygwin_98-4.10.id -#ln -s os-cygwin32_nt.id os-cygwin_me-4.90.id -#ln -s os-cygwin32_nt.id os-cygwin_nt-4.0.id -#ln -s os-cygwin32_nt.id os-cygwin_nt-5.0.id -#ln -s os-cygwin32_nt.id os-cygwin_nt-5.1.id -ln -s os-cygwin_95-4.0.id os-cygwin_98-4.0.id -ln -s os-unixware.id os-openunix.id -ln -s i486-cygwin32_nt-cc.rul i386-cygwin32_nt-cc.rul -ln -s i486-cygwin32_nt-cc.rul i586-cygwin32_nt-cc.rul -ln -s i486-cygwin32_nt-cc.rul i686-cygwin32_nt-cc.rul -ln -s i486-cygwin32_nt-cc.rul i786-cygwin32_nt-cc.rul -ln -s i486-cygwin32_nt-cl.rul i386-cygwin32_nt-cl.rul -ln -s i486-cygwin32_nt-cl.rul i586-cygwin32_nt-cl.rul -ln -s i486-cygwin32_nt-cl.rul i686-cygwin32_nt-cl.rul -ln -s i486-cygwin32_nt-cl.rul i786-cygwin32_nt-cl.rul -ln -s i486-cygwin32_nt-gcc.rul i386-cygwin32_nt-gcc.rul -ln -s i486-cygwin32_nt-gcc.rul i586-cygwin32_nt-gcc.rul -ln -s i486-cygwin32_nt-gcc.rul i686-cygwin32_nt-gcc.rul -ln -s i486-cygwin32_nt-gcc.rul i786-cygwin32_nt-gcc.rul -ln -s power-macintosh-rhapsody-cc.rul power-macintosh-mac-os10-cc.rul -ln -s power-macintosh-rhapsody-gcc.rul power-macintosh-mac-os10-gcc.rul -ln -s power-macintosh-darwin-cc.rul i386-darwin-cc.rul -ln -s power-macintosh-darwin-gcc.rul i386-darwin-gcc.rul -ln -s sun4-sunos4-cc.rul sun4c-sunos4-cc.rul -ln -s sun4-sunos4-gcc.rul sun4c-sunos4-gcc.rul -ln -s sun4-sunos5-cc.rul sun4c-sunos5-cc.rul -ln -s sun4-sunos5-gcc.rul sun4c-sunos5-gcc.rul -ln -s sun4-sunos4-cc.rul sun4m-sunos4-cc.rul -ln -s sun4-sunos4-gcc.rul sun4m-sunos4-gcc.rul -ln -s sun4-sunos5-cc.rul sun4m-sunos5-cc.rul -ln -s sun4-sunos5-gcc.rul sun4m-sunos5-gcc.rul -ln -s sun4-sunos5-cc.rul sun4d-sunos5-cc.rul -ln -s sun4-sunos5-gcc.rul sun4d-sunos5-gcc.rul -ln -s sun4-sunos5-cc.rul sun4e-sunos5-cc.rul -ln -s sun4-sunos5-gcc.rul sun4e-sunos5-gcc.rul -ln -s sun4-sunos5-cc.rul sun4L-sunos5-cc.rul -ln -s sun4-sunos5-gcc.rul sun4L-sunos5-gcc.rul -ln -s sun4-sunos5-cc.rul sun4u-sunos5-cc.rul -ln -s sun4-sunos5-gcc.rul sun4u-sunos5-gcc.rul -ln -s sun4-sunos5-cc64.rul sun4u-sunos5-cc64.rul -ln -s sun4-sunos5-gcc64.rul sun4u-sunos5-gcc64.rul -ln -s sun4-sunos5-cc.rul sun4us-sunos5-cc.rul -ln -s sun4-sunos5-gcc.rul sun4us-sunos5-gcc.rul -ln -s sun4-sunos5-cc64.rul sun4us-sunos5-cc64.rul -ln -s sun4-sunos5-gcc64.rul sun4us-sunos5-gcc64.rul -ln -s sun4-sunos5-cc.rul sun4v-sunos5-cc.rul -ln -s sun4-sunos5-gcc.rul sun4v-sunos5-gcc.rul -ln -s sun4-sunos5-cc64.rul sun4v-sunos5-cc64.rul -ln -s sun4-sunos5-gcc64.rul sun4v-sunos5-gcc64.rul -ln -s i386-unixware-cc.rul i486-unixware-cc.rul -ln -s i386-unixware-gcc.rul i486-unixware-gcc.rul -ln -s i386-unixware-cc.rul i586-unixware-cc.rul -ln -s i386-unixware-gcc.rul i586-unixware-gcc.rul -ln -s i386-unixware-cc.rul pentium-iii-unixware-cc.rul -ln -s i386-unixware-gcc.rul pentium-iii-unixware-gcc.rul -ln -s i386-unixware-cc.rul pentium-pro-unixware-cc.rul -ln -s i386-unixware-gcc.rul pentium-pro-unixware-gcc.rul -ln -s i386-unixware-cc.rul pentium-4-unixware-cc.rul -ln -s i386-unixware-gcc.rul pentium-4-unixware-gcc.rul -ln -s i386-ms-dos-gcc.rul i486-ms-dos-gcc.rul -ln -s i386-ms-dos-gcc.rul i586-ms-dos-gcc.rul -ln -s i386-ms-dos-gcc.rul i686-ms-dos-gcc.rul -ln -s i386-ms-dos-gcc.rul i786-ms-dos-gcc.rul +if [ -r ldummy.lnk ]; then + if [ $# -le 0 ]; then + exit 0 + fi +fi +########################################################################### +symlink="ln -s" +MKLINKS_TEST=${MKLINKS_TEST-:} +if [ ".$MKLINKS_COPY" = '.' ]; then + rm -f xxzzy.123 xxzzy.345 + echo test > xxzzy.123 + $symlink xxzzy.123 xxzzy.345 + test $? = 0 || symlink=cp + test -r xxzzy.345 || symlink=cp + ${MKLINKS_TEST} -h xxzzy.345 || symlink=cp + rm -f xxzzy.123 xxzzy.345 +else + symlink=cp +fi +########################################################################### + +$symlink ldummy.cnf ldummy.lnk +$symlink mk-.id mk-make.id # -ln -s mk-smake.id mk-build.id -ln -s r-smake.c4x r-build.c4x -ln -s r-smake.c4x-dep r-build.c4x-dep -ln -s r-smake.dep r-build.dep -ln -s r-smake.obj r-build.obj -ln -s r-smake.tag r-build.tag +$symlink mk-smake.id mk-build.id +$symlink r-smake.dep r-build.dep +$symlink r-smake.obj r-build.obj +$symlink r-smake.tag r-build.tag +$symlink r-make.obj r-gmake.obj +$symlink r-make.obj r-sunpro.obj +$symlink r-make.tag r-sunpro.tag + +$symlink cc-clang.rul cc-clang32.rul +$symlink cc-clang.rul cc-clang64.rul +$symlink cc-gcc.rul cc-gcc32.rul +$symlink cc-gcc.rul cc-gcc64.rul +$symlink cc-sunpro.rul cc-sunpro32.rul +$symlink cc-sunpro.rul cc-sunpro64.rul +$symlink cc-ibm.rul cc-ibm32.rul +$symlink cc-ibm.rul cc-ibm64.rul + +if [ -r r-make.c4x ]; then + $symlink r-make.c4x r-gmake.c4x + $symlink r-make.c4x-dep r-gmake.c4x-dep + $symlink r-smake.c4x r-build.c4x + $symlink r-smake.c4x-dep r-build.c4x-dep +fi + +$symlink 9000-725-hp-ux-cc.rul 9000-725-hp-ux-cc64.rul +$symlink 9000-725-hp-ux-cc.rul 9000-710-hp-ux-cc.rul +$symlink 9000-725-hp-ux-cc.rul 9000-712-hp-ux-cc.rul +$symlink 9000-725-hp-ux-cc.rul 9000-715-hp-ux-cc.rul +$symlink 9000-725-hp-ux-cc.rul 9000-735-hp-ux-cc.rul +$symlink 9000-725-hp-ux-cc.rul 9000-743-hp-ux-cc.rul +$symlink 9000-725-hp-ux-cc.rul 9000-755-hp-ux-cc.rul +$symlink 9000-725-hp-ux-cc.rul 9000-777-hp-ux-cc.rul +$symlink 9000-725-hp-ux-cc.rul 9000-778-hp-ux-cc.rul +$symlink 9000-725-hp-ux-cc.rul 9000-780-hp-ux-cc.rul +$symlink 9000-725-hp-ux-cc.rul 9000-782-hp-ux-cc.rul +$symlink 9000-725-hp-ux-cc.rul 9000-785-hp-ux-cc.rul +$symlink 9000-725-hp-ux-cc.rul 9000-800-hp-ux-cc.rul +$symlink 9000-725-hp-ux-cc.rul 9000-820-hp-ux-cc.rul +$symlink 9000-725-hp-ux-cc.rul 9000-831-hp-ux-cc.rul +$symlink 9000-725-hp-ux-cc.rul 9000-899-hp-ux-cc.rul +$symlink 9000-725-hp-ux-cc.rul ia64-hp-ux-cc.rul +$symlink 9000-725-hp-ux-cc64.rul 9000-710-hp-ux-cc64.rul +$symlink 9000-725-hp-ux-cc64.rul 9000-712-hp-ux-cc64.rul +$symlink 9000-725-hp-ux-cc64.rul 9000-715-hp-ux-cc64.rul +$symlink 9000-725-hp-ux-cc64.rul 9000-735-hp-ux-cc64.rul +$symlink 9000-725-hp-ux-cc64.rul 9000-743-hp-ux-cc64.rul +$symlink 9000-725-hp-ux-cc64.rul 9000-755-hp-ux-cc64.rul +$symlink 9000-725-hp-ux-cc64.rul 9000-777-hp-ux-cc64.rul +$symlink 9000-725-hp-ux-cc64.rul 9000-778-hp-ux-cc64.rul +$symlink 9000-725-hp-ux-cc64.rul 9000-780-hp-ux-cc64.rul +$symlink 9000-725-hp-ux-cc64.rul 9000-782-hp-ux-cc64.rul +$symlink 9000-725-hp-ux-cc64.rul 9000-785-hp-ux-cc64.rul +$symlink 9000-725-hp-ux-cc64.rul 9000-800-hp-ux-cc64.rul +$symlink 9000-725-hp-ux-cc64.rul 9000-820-hp-ux-cc64.rul +$symlink 9000-725-hp-ux-cc64.rul 9000-831-hp-ux-cc64.rul +$symlink 9000-725-hp-ux-cc64.rul 9000-899-hp-ux-cc64.rul +$symlink 9000-725-hp-ux-cc64.rul ia64-hp-ux-cc64.rul +$symlink 9000-725-hp-ux-gcc.rul 9000-710-hp-ux-gcc.rul +$symlink 9000-725-hp-ux-gcc.rul 9000-712-hp-ux-gcc.rul +$symlink 9000-725-hp-ux-gcc.rul 9000-715-hp-ux-gcc.rul +$symlink 9000-725-hp-ux-gcc.rul 9000-735-hp-ux-gcc.rul +$symlink 9000-725-hp-ux-gcc.rul 9000-743-hp-ux-gcc.rul +$symlink 9000-725-hp-ux-gcc.rul 9000-755-hp-ux-gcc.rul +$symlink 9000-725-hp-ux-gcc.rul 9000-777-hp-ux-gcc.rul +$symlink 9000-725-hp-ux-gcc.rul 9000-778-hp-ux-gcc.rul +$symlink 9000-725-hp-ux-gcc.rul 9000-780-hp-ux-gcc.rul +$symlink 9000-725-hp-ux-gcc.rul 9000-782-hp-ux-gcc.rul +$symlink 9000-725-hp-ux-gcc.rul 9000-785-hp-ux-gcc.rul +$symlink 9000-725-hp-ux-gcc.rul 9000-800-hp-ux-gcc.rul +$symlink 9000-725-hp-ux-gcc.rul 9000-820-hp-ux-gcc.rul +$symlink 9000-725-hp-ux-gcc.rul 9000-831-hp-ux-gcc.rul +$symlink 9000-725-hp-ux-gcc.rul 9000-899-hp-ux-gcc.rul +$symlink 9000-725-hp-ux-gcc.rul ia64-hp-ux-gcc.rul +$symlink hppa-nextstep-cc.rul i386-nextstep-cc.rul +$symlink hppa-nextstep-cc.rul m68k-nextstep-cc.rul +$symlink hppa-nextstep-cc.rul sparc-nextstep-cc.rul +$symlink hppa-nextstep-cc.rul i386-nextstep-gcc.rul +$symlink hppa-nextstep-cc.rul m68k-nextstep-gcc.rul +$symlink hppa-nextstep-cc.rul sparc-nextstep-gcc.rul +$symlink os-irix.id os-irix64.id +$symlink ip22-irix-cc.rul ip22-irix-cc64.rul +# it is not clear whether the next entry works: +# comment was: does not work because of GCC_OPT64= -mabi=64 +$symlink ip22-irix-gcc.rul ip22-irix-gcc64.rul +$symlink ip22-irix-cc.rul ip17-irix-cc.rul +$symlink ip22-irix-cc.rul ip20-irix-cc.rul +$symlink ip22-irix-cc.rul ip27-irix-cc.rul +$symlink ip22-irix-cc.rul ip28-irix-cc.rul +$symlink ip22-irix-cc.rul ip30-irix-cc.rul +$symlink ip22-irix-cc.rul ip32-irix-cc.rul +$symlink ip22-irix-cc.rul ip35-irix-cc.rul +$symlink ip22-irix-gcc.rul ip17-irix-gcc.rul +$symlink ip22-irix-gcc.rul ip20-irix-gcc.rul +$symlink ip22-irix-gcc.rul ip27-irix-gcc.rul +$symlink ip22-irix-gcc.rul ip28-irix-gcc.rul +$symlink ip22-irix-gcc.rul ip30-irix-gcc.rul +$symlink ip22-irix-gcc.rul ip32-irix-gcc.rul +$symlink ip22-irix-gcc.rul ip35-irix-gcc.rul +$symlink ip22-irix-cc64.rul ip17-irix-cc64.rul +$symlink ip22-irix-cc64.rul ip20-irix-cc64.rul +$symlink ip22-irix-cc64.rul ip27-irix-cc64.rul +$symlink ip22-irix-cc64.rul ip28-irix-cc64.rul +$symlink ip22-irix-cc64.rul ip30-irix-cc64.rul +$symlink ip22-irix-cc64.rul ip32-irix-cc64.rul +$symlink ip22-irix-cc64.rul ip35-irix-cc64.rul +$symlink ip22-irix-gcc64.rul ip17-irix-gcc64.rul +$symlink ip22-irix-gcc64.rul ip20-irix-gcc64.rul +$symlink ip22-irix-gcc64.rul ip27-irix-gcc64.rul +$symlink ip22-irix-gcc64.rul ip28-irix-gcc64.rul +$symlink ip22-irix-gcc64.rul ip30-irix-gcc64.rul +$symlink ip22-irix-gcc64.rul ip32-irix-gcc64.rul +$symlink ip22-irix-gcc64.rul ip35-irix-gcc64.rul +$symlink i386-at386-gnu-cc.rul i686-at386-gnu-cc.rul +$symlink i386-at386-gnu-gcc.rul i686-at386-gnu-gcc.rul +$symlink i386-freebsd-cc.rul sparc64-freebsd-cc.rul +$symlink i386-freebsd-clang.rul i386-freebsd-clang32.rul +$symlink i386-freebsd-clang.rul i386-freebsd-clang64.rul +$symlink i386-freebsd-clang.rul amd64-freebsd-clang.rul +$symlink i386-freebsd-clang.rul amd64-freebsd-clang32.rul +$symlink i386-freebsd-clang.rul amd64-freebsd-clang64.rul +$symlink i386-freebsd-clang.rul arm64-freebsd-clang.rul +$symlink i386-freebsd-clang.rul arm64-freebsd-clang32.rul +$symlink i386-freebsd-clang.rul arm64-freebsd-clang64.rul +$symlink i386-freebsd-gcc.rul sparc64-freebsd-gcc.rul +$symlink i386-freebsd-cc.rul amd64-freebsd-cc.rul +$symlink i386-freebsd-gcc.rul amd64-freebsd-gcc.rul +$symlink i386-freebsd-cc.rul i386-dragonfly-cc.rul +$symlink i386-freebsd-gcc.rul i386-dragonfly-gcc.rul +$symlink i386-freebsd-cc.rul x86_64-dragonfly-cc.rul +$symlink i386-freebsd-gcc.rul x86_64-dragonfly-gcc.rul +$symlink i386-netbsd-cc.rul amd64-netbsd-cc.rul +$symlink i386-netbsd-gcc.rul amd64-netbsd-gcc.rul +$symlink i386-netbsd-cc.rul alpha-netbsd-cc.rul +$symlink i386-netbsd-gcc.rul alpha-netbsd-gcc.rul +$symlink i386-netbsd-cc.rul sparc-netbsd-cc.rul +$symlink i386-netbsd-gcc.rul sparc-netbsd-gcc.rul +$symlink i386-netbsd-cc.rul mac68k-netbsd-cc.rul +$symlink i386-netbsd-gcc.rul mac68k-netbsd-gcc.rul +$symlink i386-netbsd-cc.rul amiga-netbsd-cc.rul +$symlink i386-netbsd-gcc.rul amiga-netbsd-gcc.rul +$symlink i386-netbsd-cc.rul macppc-netbsd-cc.rul +$symlink i386-netbsd-gcc.rul macppc-netbsd-gcc.rul +$symlink i386-openbsd-cc.rul amd64-openbsd-cc.rul +$symlink i386-openbsd-gcc.rul amd64-openbsd-gcc.rul +$symlink amd64-bitrig-clang.rul amd64-bitrig-clang32.rul +$symlink amd64-bitrig-clang.rul amd64-bitrig-clang64.rul +$symlink amd64-bitrig-clang.rul i386-bitrig-clang.rul +$symlink i386-bsd-os-cc.rul sparc-bsd-os-cc.rul +$symlink i386-bsd-os-gcc.rul sparc-bsd-os-gcc.rul +$symlink i386-bsd-os3-cc.rul sparc-bsd-os3-cc.rul +$symlink i386-bsd-os3-gcc.rul sparc-bsd-os3-gcc.rul +$symlink i586-linux-cc.rul i586-linux-cc64.rul +$symlink i586-linux-cc.rul i386-linux-cc.rul +$symlink i586-linux-clang.rul i586-linux-clang32.rul +$symlink i586-linux-clang.rul i586-linux-clang64.rul +$symlink i586-linux-cc.rul i486-linux-cc.rul +$symlink i586-linux-cc.rul i686-linux-cc.rul +$symlink i586-linux-gcc.rul i586-linux-gcc32.rul +$symlink i586-linux-gcc.rul i586-linux-gcc64.rul +$symlink i586-linux-gcc.rul i386-linux-gcc.rul +$symlink i586-linux-gcc.rul i486-linux-gcc.rul +$symlink i586-linux-gcc.rul i686-linux-gcc.rul +$symlink i586-linux-cc.rul sparc-linux-cc.rul +$symlink i586-linux-gcc.rul sparc-linux-gcc.rul +$symlink i586-linux-cc.rul sparc64-linux-cc.rul +$symlink i586-linux-gcc.rul sparc64-linux-gcc.rul +$symlink i586-linux-cc.rul alpha-linux-cc.rul +$symlink i586-linux-gcc.rul alpha-linux-gcc.rul +$symlink i586-linux-cc.rul ppc-linux-cc.rul +$symlink i586-linux-gcc.rul ppc-linux-gcc.rul +$symlink i586-linux-cc.rul ppc64-linux-cc.rul +$symlink i586-linux-gcc.rul ppc64-linux-gcc.rul +$symlink i586-linux-cc.rul ppc64le-linux-cc.rul +$symlink i586-linux-gcc.rul ppc64le-linux-gcc.rul +$symlink i586-linux-cc.rul m68k-linux-cc.rul +$symlink i586-linux-gcc.rul m68k-linux-gcc.rul +$symlink i586-linux-cc.rul armv4l-linux-cc.rul +$symlink i586-linux-gcc.rul armv4l-linux-gcc.rul +$symlink i586-linux-cc.rul armv4tl-linux-cc.rul +$symlink i586-linux-gcc.rul armv4tl-linux-gcc.rul +$symlink i586-linux-cc.rul mips-linux-cc.rul +$symlink i586-linux-gcc.rul mips-linux-gcc.rul +$symlink i586-linux-cc.rul mipsel-linux-cc.rul +$symlink i586-linux-gcc.rul mipsel-linux-gcc.rul +$symlink i586-linux-cc.rul mips64-linux-cc.rul +$symlink i586-linux-gcc.rul mips64-linux-gcc.rul +$symlink i586-linux-cc.rul s390-linux-cc.rul +$symlink i586-linux-gcc.rul s390-linux-gcc.rul +$symlink i586-linux-cc.rul s390x-linux-cc.rul +$symlink i586-linux-gcc.rul s390x-linux-gcc.rul +$symlink i586-linux-cc.rul parisc-linux-cc.rul +$symlink i586-linux-gcc.rul parisc-linux-gcc.rul +$symlink i586-linux-cc.rul parisc64-linux-cc.rul +$symlink i586-linux-gcc.rul parisc64-linux-gcc.rul +$symlink i586-linux-cc.rul ia64-linux-cc.rul +$symlink i586-linux-gcc.rul ia64-linux-gcc.rul +$symlink i586-linux-cc.rul x86_64-linux-cc.rul +$symlink i586-linux-clang.rul x86_64-linux-clang.rul +$symlink i586-linux-clang32.rul x86_64-linux-clang32.rul +$symlink i586-linux-clang64.rul x86_64-linux-clang64.rul +$symlink i586-linux-gcc.rul x86_64-linux-gcc.rul +$symlink i586-linux-cc.rul armv5l-linux-cc.rul +$symlink i586-linux-gcc.rul armv5l-linux-gcc.rul +$symlink i586-linux-cc.rul armv5teb-linux-cc.rul +$symlink i586-linux-gcc.rul armv5teb-linux-gcc.rul +$symlink i586-linux-cc.rul armv5tejl-linux-cc.rul +$symlink i586-linux-gcc.rul armv5tejl-linux-gcc.rul +$symlink i586-linux-cc.rul armv5tel-linux-cc.rul +$symlink i586-linux-gcc.rul armv5tel-linux-gcc.rul +$symlink i586-linux-cc.rul armv6l-linux-cc.rul +$symlink i586-linux-gcc.rul armv6l-linux-gcc.rul +$symlink i586-linux-cc.rul armv7l-linux-cc.rul +$symlink i586-linux-gcc.rul armv7l-linux-gcc.rul +$symlink i586-linux-cc.rul aarch64-linux-cc.rul +$symlink i586-linux-clang.rul aarch64-linux-clang.rul +$symlink i586-linux-clang32.rul aarch64-linux-clang32.rul +$symlink i586-linux-clang64.rul aarch64-linux-clang64.rul +$symlink i586-linux-gcc.rul aarch64-linux-gcc.rul +$symlink i586-linux-gcc32.rul aarch64-linux-gcc32.rul +$symlink i586-linux-gcc64.rul aarch64-linux-gcc64.rul +$symlink i586-linux-cc.rul sh3-linux-cc.rul +$symlink i586-linux-gcc.rul sh3-linux-gcc.rul +$symlink i586-linux-cc.rul sh4-linux-cc.rul +$symlink i586-linux-gcc.rul sh4-linux-gcc.rul +$symlink i586-linux-cc.rul sh4a-linux-cc.rul +$symlink i586-linux-gcc.rul sh4a-linux-gcc.rul +$symlink i586-linux-gcc32.rul x86_64-linux-gcc32.rul +$symlink i586-linux-gcc.rul x86_64-linux-gcc64.rul +$symlink i586-linux-gcc32.rul sparc64-linux-gcc32.rul +$symlink i586-linux-gcc.rul sparc64-linux-gcc64.rul +$symlink i586-linux-gcc32.rul mips64-linux-gcc32.rul +$symlink i586-linux-gcc32.rul parisc64-linux-gcc32.rul +$symlink i586-linux-suncc.rul i586-linux-suncc32.rul +$symlink i586-linux-suncc.rul i586-linux-suncc64.rul +$symlink i586-linux-suncc.rul i686-linux-suncc.rul +$symlink i586-linux-suncc.rul i486-linux-suncc.rul +$symlink i586-linux-suncc.rul i386-linux-suncc.rul +$symlink i586-linux-suncc.rul x86_64-linux-suncc.rul +$symlink i586-linux-suncc64.rul i686-linux-suncc64.rul +$symlink i586-linux-suncc64.rul x86_64-linux-suncc64.rul +$symlink i586-linux-cc.rul i386-gnu-kfreebsd-cc.rul +$symlink i586-linux-gcc.rul i386-gnu-kfreebsd-gcc.rul +$symlink i586-linux-cc.rul i486-gnu-kfreebsd-cc.rul +$symlink i586-linux-gcc.rul i486-gnu-kfreebsd-gcc.rul +$symlink i586-linux-cc.rul i586-gnu-kfreebsd-cc.rul +$symlink i586-linux-gcc.rul i586-gnu-kfreebsd-gcc.rul +$symlink i586-linux-cc.rul i686-gnu-kfreebsd-cc.rul +$symlink i586-linux-gcc.rul i686-gnu-kfreebsd-gcc.rul +$symlink i586-linux-cc.rul amd64-gnu-kfreebsd-cc.rul +$symlink i586-linux-gcc.rul amd64-gnu-kfreebsd-gcc.rul +$symlink i586-linux-gcc32.rul amd64-gnu-kfreebsd-gcc32.rul +$symlink i586-linux-cc.rul x86_64-gnu-kfreebsd-cc.rul +$symlink i586-linux-gcc.rul x86_64-gnu-kfreebsd-gcc.rul +$symlink i586-linux-gcc32.rul x86_64-gnu-kfreebsd-gcc32.rul +#$symlink os-cygwin32_nt.id os-cygwin_95-4.0.id +#$symlink os-cygwin32_nt.id os-cygwin_98-4.0.id +#$symlink os-cygwin32_nt.id os-cygwin_98-4.10.id +#$symlink os-cygwin32_nt.id os-cygwin_me-4.90.id +#$symlink os-cygwin32_nt.id os-cygwin_nt-4.0.id +#$symlink os-cygwin32_nt.id os-cygwin_nt-5.0.id +#$symlink os-cygwin32_nt.id os-cygwin_nt-5.1.id +$symlink os-cygwin_95-4.0.id os-cygwin_98-4.0.id +$symlink os-unixware.id os-openunix.id +$symlink i486-cygwin32_nt-cc.rul i486-cygwin32_nt-cc32.rul +$symlink i486-cygwin32_nt-cc.rul i486-cygwin32_nt-cc64.rul +$symlink i486-cygwin32_nt-gcc.rul i486-cygwin32_nt-gcc32.rul +$symlink i486-cygwin32_nt-gcc.rul i486-cygwin32_nt-gcc64.rul +$symlink i486-cygwin32_nt-cc.rul i386-cygwin32_nt-cc.rul +$symlink i486-cygwin32_nt-cc.rul i586-cygwin32_nt-cc.rul +$symlink i486-cygwin32_nt-cc.rul i686-cygwin32_nt-cc.rul +$symlink i486-cygwin32_nt-cc.rul i786-cygwin32_nt-cc.rul +$symlink i486-cygwin32_nt-cc.rul i686-cygwin32_wow-cc.rul +$symlink i486-cygwin32_nt-cc.rul i786-cygwin32_wow-cc.rul +$symlink i486-cygwin32_nt-cc.rul i686-cygwin32_wow64-cc.rul +$symlink i486-cygwin32_nt-cc.rul i786-cygwin32_wow64-cc.rul +$symlink i486-cygwin32_nt-cc64.rul i686-cygwin32_wow-cc64.rul +$symlink i486-cygwin32_nt-cc64.rul i786-cygwin32_wow-cc64.rul +$symlink i486-cygwin32_nt-cc64.rul i686-cygwin32_wow64-cc64.rul +$symlink i486-cygwin32_nt-cc64.rul i786-cygwin32_wow64-cc64.rul +$symlink i486-cygwin32_nt-cl.rul i386-cygwin32_nt-cl.rul +$symlink i486-cygwin32_nt-cl.rul i586-cygwin32_nt-cl.rul +$symlink i486-cygwin32_nt-cl.rul i686-cygwin32_nt-cl.rul +$symlink i486-cygwin32_nt-cl.rul i786-cygwin32_nt-cl.rul +$symlink i486-cygwin32_nt-cl.rul i686-cygwin32_wow-cl.rul +$symlink i486-cygwin32_nt-cl.rul i786-cygwin32_wow-cl.rul +$symlink i486-cygwin32_nt-cl.rul i686-cygwin32_wow64-cl.rul +$symlink i486-cygwin32_nt-cl.rul i786-cygwin32_wow64-cl.rul +$symlink i686-cygwin32_wow64-cl64.rul i686-cygwin32_nt-cl64.rul +$symlink i686-cygwin32_wow64-cl64.rul i786-cygwin32_nt-cl64.rul +$symlink i686-cygwin32_wow64-cl64.rul i686-cygwin32_wow-cl64.rul +$symlink i686-cygwin32_wow64-cl64.rul i786-cygwin32_wow-cl64.rul +$symlink i486-cygwin32_nt-gcc.rul i386-cygwin32_nt-gcc.rul +$symlink i486-cygwin32_nt-gcc.rul i586-cygwin32_nt-gcc.rul +$symlink i486-cygwin32_nt-gcc.rul i686-cygwin32_nt-gcc.rul +$symlink i486-cygwin32_nt-gcc.rul i786-cygwin32_nt-gcc.rul +$symlink i486-cygwin32_nt-gcc.rul i686-cygwin32_wow-gcc.rul +$symlink i486-cygwin32_nt-gcc.rul i786-cygwin32_wow-gcc.rul +$symlink i486-cygwin32_nt-gcc.rul i686-cygwin32_wow64-gcc.rul +$symlink i486-cygwin32_nt-gcc.rul i786-cygwin32_wow64-gcc.rul +$symlink i486-cygwin32_nt-gcc64.rul i686-cygwin32_wow-gcc64.rul +$symlink i486-cygwin32_nt-gcc64.rul i786-cygwin32_wow-gcc64.rul +$symlink i486-cygwin32_nt-gcc64.rul i686-cygwin32_wow64-gcc64.rul +$symlink i486-cygwin32_nt-gcc64.rul i786-cygwin32_wow64-gcc64.rul +$symlink i486-cygwin32_nt-gcc.rul x86_64-cygwin32_nt-gcc.rul +$symlink i486-cygwin32_nt-gcc32.rul x86_64-cygwin32_nt-gcc32.rul +$symlink i486-cygwin32_nt-gcc64.rul x86_64-cygwin32_nt-gcc64.rul +$symlink power-macintosh-rhapsody-cc.rul power-macintosh-mac-os10-cc.rul +$symlink power-macintosh-rhapsody-gcc.rul power-macintosh-mac-os10-gcc.rul +$symlink power-macintosh-darwin-cc.rul power-macintosh-darwin-cc32.rul +$symlink power-macintosh-darwin-cc.rul power-macintosh-darwin-cc64.rul +$symlink power-macintosh-darwin-gcc.rul power-macintosh-darwin-gcc32.rul +$symlink power-macintosh-darwin-gcc.rul power-macintosh-darwin-gcc64.rul +$symlink power-macintosh-darwin-cc.rul i386-darwin-cc.rul +$symlink power-macintosh-darwin-gcc.rul i386-darwin-gcc.rul +$symlink power-macintosh-darwin-cc64.rul i386-darwin-cc64.rul +$symlink power-macintosh-darwin-gcc64.rul i386-darwin-gcc64.rul +$symlink power-macintosh-darwin-cc32.rul i386-darwin-cc32.rul +$symlink power-macintosh-darwin-gcc32.rul i386-darwin-gcc32.rul +$symlink power-macintosh-darwin-cc.rul x86_64-darwin-cc.rul +$symlink power-macintosh-darwin-gcc.rul x86_64-darwin-gcc.rul +$symlink power-macintosh-darwin-cc64.rul x86_64-darwin-cc64.rul +$symlink power-macintosh-darwin-gcc64.rul x86_64-darwin-gcc64.rul +$symlink power-macintosh-darwin-cc32.rul x86_64-darwin-cc32.rul +$symlink power-macintosh-darwin-gcc32.rul x86_64-darwin-gcc32.rul +$symlink i386-darwin-clang.rul i386-darwin-clang32.rul +$symlink i386-darwin-clang.rul i386-darwin-clang64.rul +$symlink i386-darwin-clang.rul x86_64-darwin-clang.rul +$symlink i386-darwin-clang32.rul x86_64-darwin-clang32.rul +$symlink i386-darwin-clang64.rul x86_64-darwin-clang64.rul +$symlink i86pc-sunos5-cc.rul i86pc-sunos5-cc32.rul +$symlink i86pc-sunos5-cc.rul i86pc-sunos5-cc64.rul +$symlink i86pc-sunos5-clang.rul i86pc-sunos5-clang32.rul +$symlink i86pc-sunos5-clang.rul i86pc-sunos5-clang64.rul +$symlink i86pc-sunos5-gcc.rul i86pc-sunos5-gcc32.rul +$symlink i86pc-sunos5-gcc.rul i86pc-sunos5-gcc64.rul +$symlink sun4-sunos5-gcc.rul aarch64-sunos5-gcc.rul +$symlink sun4-sunos5-gcc.rul aarch64-sunos5-gcc32.rul +$symlink sun4-sunos5-gcc.rul aarch64-sunos5-gcc64.rul +$symlink sun4-sunos5-clang.rul aarch64-sunos5-clang.rul +$symlink sun4-sunos5-clang.rul aarch64-sunos5-clang32.rul +$symlink sun4-sunos5-clang.rul aarch64-sunos5-clang64.rul +$symlink sun4-sunos5-cc.rul sun4-sunos5-cc32.rul +$symlink sun4-sunos5-cc.rul sun4-sunos5-cc64.rul +$symlink sun4-sunos5-clang.rul sun4-sunos5-clang32.rul +$symlink sun4-sunos5-clang.rul sun4-sunos5-clang64.rul +$symlink sun4-sunos5-gcc.rul sun4-sunos5-gcc32.rul +$symlink sun4-sunos5-gcc.rul sun4-sunos5-gcc64.rul +$symlink sun4-sunos4-cc.rul sun4c-sunos4-cc.rul +$symlink sun4-sunos4-gcc.rul sun4c-sunos4-gcc.rul +$symlink sun4-sunos5-cc.rul sun4c-sunos5-cc.rul +$symlink sun4-sunos5-gcc.rul sun4c-sunos5-gcc.rul +$symlink sun4-sunos4-cc.rul sun4m-sunos4-cc.rul +$symlink sun4-sunos4-gcc.rul sun4m-sunos4-gcc.rul +$symlink sun4-sunos5-cc.rul sun4m-sunos5-cc.rul +$symlink sun4-sunos5-gcc.rul sun4m-sunos5-gcc.rul +$symlink sun4-sunos5-cc.rul sun4d-sunos5-cc.rul +$symlink sun4-sunos5-gcc.rul sun4d-sunos5-gcc.rul +$symlink sun4-sunos5-cc.rul sun4e-sunos5-cc.rul +$symlink sun4-sunos5-gcc.rul sun4e-sunos5-gcc.rul +$symlink sun4-sunos5-cc.rul sun4L-sunos5-cc.rul +$symlink sun4-sunos5-gcc.rul sun4L-sunos5-gcc.rul +$symlink sun4-sunos5-cc.rul sun4u-sunos5-cc.rul +$symlink sun4-sunos5-gcc.rul sun4u-sunos5-gcc.rul +$symlink sun4-sunos5-cc64.rul sun4u-sunos5-cc64.rul +$symlink sun4-sunos5-gcc64.rul sun4u-sunos5-gcc64.rul +$symlink sun4-sunos5-cc.rul sun4us-sunos5-cc.rul +$symlink sun4-sunos5-gcc.rul sun4us-sunos5-gcc.rul +$symlink sun4-sunos5-cc64.rul sun4us-sunos5-cc64.rul +$symlink sun4-sunos5-gcc64.rul sun4us-sunos5-gcc64.rul +$symlink sun4-sunos5-cc.rul sun4v-sunos5-cc.rul +$symlink sun4-sunos5-gcc.rul sun4v-sunos5-gcc.rul +$symlink sun4-sunos5-cc64.rul sun4v-sunos5-cc64.rul +$symlink sun4-sunos5-gcc64.rul sun4v-sunos5-gcc64.rul +$symlink i386-unixware-cc.rul i486-unixware-cc.rul +$symlink i386-unixware-gcc.rul i486-unixware-gcc.rul +$symlink i386-unixware-cc.rul i586-unixware-cc.rul +$symlink i386-unixware-gcc.rul i586-unixware-gcc.rul +$symlink i386-unixware-cc.rul pentium-iii-unixware-cc.rul +$symlink i386-unixware-gcc.rul pentium-iii-unixware-gcc.rul +$symlink i386-unixware-cc.rul pentium-pro-unixware-cc.rul +$symlink i386-unixware-gcc.rul pentium-pro-unixware-gcc.rul +$symlink i386-unixware-cc.rul pentium-4-unixware-cc.rul +$symlink i386-unixware-gcc.rul pentium-4-unixware-gcc.rul +$symlink i386-ms-dos-gcc.rul i486-ms-dos-gcc.rul +$symlink i386-ms-dos-gcc.rul i586-ms-dos-gcc.rul +$symlink i386-ms-dos-gcc.rul i686-ms-dos-gcc.rul +$symlink i386-ms-dos-gcc.rul i786-ms-dos-gcc.rul +$symlink atarist-freemint-gcc.rul atariclone-freemint-gcc.rul +$symlink atarist-freemint-gcc.rul atariste-freemint-gcc.rul +$symlink atarist-freemint-gcc.rul ataritt-freemint-gcc.rul +$symlink atarist-freemint-gcc.rul falcon-freemint-gcc.rul +$symlink atarist-freemint-gcc.rul milan-freemint-gcc.rul +$symlink atarist-freemint-gcc.rul hades-freemint-gcc.rul +$symlink atarist-freemint-gcc.rul aranym-freemint-gcc.rul +$symlink bepc-beos-gcc.rul bemac-beos-gcc.rul +$symlink bepc-haiku-cc.rul bemac-haiku-cc.rul +$symlink bepc-haiku-gcc.rul bemac-haiku-gcc.rul +$symlink bepc-haiku-cc.rul x86_64-haiku-cc.rul +$symlink bepc-haiku-gcc.rul x86_64-haiku-gcc.rul +$symlink alpha-openvms-cc.rul alphaserver_ds20_500_mhz-openvms-cc.rul +$symlink rs6000-aix-cc.rul rs6000-aix-cc32.rul +$symlink rs6000-aix-cc.rul rs6000-aix-cc64.rul +$symlink rs6000-aix-gcc.rul rs6000-aix-gcc32.rul +$symlink rs6000-aix-gcc.rul rs6000-aix-gcc64.rul diff -Nru cdrtools-2.01.01a33/RULES/mk-make.id cdrtools-3.02a09/RULES/mk-make.id --- cdrtools-2.01.01a33/RULES/mk-make.id 2007-05-03 12:58:59.000000000 +0000 +++ cdrtools-3.02a09/RULES/mk-make.id 1970-01-01 00:00:00.000000000 +0000 @@ -1,56 +0,0 @@ -#ident "@(#)mk-.id 1.12 07/05/03 " -########################################################################### -# Written 1996 by J. Schilling -########################################################################### -# -# Name of make program (make/gmake/smake) -# -########################################################################### -# Copyright (c) J. Schilling -########################################################################### -# The contents of this file are subject to the terms of the -# Common Development and Distribution License, Version 1.0 only -# (the "License"). You may not use this file except in compliance -# with the License. -# -# See the file CDDL.Schily.txt in this distribution for details. -# -# When distributing Covered Code, include this CDDL HEADER in each -# file and include the License file CDDL.Schily.txt from this distribution. -########################################################################### - -MAKEPROG= make # Sun make - -########################################################################### -# -# standard (automatic) machine identification -# -########################################################################### -# -# XP_ARCH = uname -p = mach # Processor (sparc/mc68020) -# XK_ARCH = uname -m = arch -k # Kernel (sun3/sun4c/sun4m) -# XM_ARCH = arch ~ arch -k # Machine (sun3/sun4) -# -########################################################################### - -XP_ARCH:sh= (mach || uname -p || true)2>/dev/null | tr '[A-Z]' '[a-z]' | tr ', /\\()"' ',------' -XK_ARCH:sh= uname -m | tr '[A-Z]' '[a-z]' | tr ', /\\()"' ',------' -XM_ARCH:sh= (arch || /usr/ucb/arch || true)2>/dev/null | tr '[A-Z]' '[a-z]' | tr ', /\\()"' ',------' - -P_ARCH= $(XP_ARCH) -K_ARCH= $(XK_ARCH) -M_ARCH= $(XM_ARCH) - -_XP_ARCH= $(XP_ARCH:unknown=$(K_ARCH)) - -_P_ARCH= $(_UNIQ)$(_XP_ARCH) -__P_ARCH= $(_P_ARCH:$(_UNIQ)=$(K_ARCH)) -P_ARCH= $(__P_ARCH:$(_UNIQ)%=%) - -_M_ARCH= $(_UNIQ)$(XM_ARCH) -__M_ARCH= $(_M_ARCH:$(_UNIQ)=$(K_ARCH)) -M_ARCH= $(__M_ARCH:$(_UNIQ)%=%) - -OSNAME:sh= uname -s | tr '[A-Z]' '[a-z]' | tr ', /\\()"' ',------' -OSREL:sh= uname -r | tr '[A-Z]' '[a-z]' | tr ', /\\()"' ',------' -OSVERSION:sh= uname -v | tr '[A-Z]' '[a-z]' | tr ', /\\()"' ',------' diff -Nru cdrtools-2.01.01a33/RULES/mk-smake.id cdrtools-3.02a09/RULES/mk-smake.id --- cdrtools-2.01.01a33/RULES/mk-smake.id 2007-05-03 12:58:59.000000000 +0000 +++ cdrtools-3.02a09/RULES/mk-smake.id 2012-12-29 14:44:26.000000000 +0000 @@ -1,4 +1,4 @@ -#ident "@(#)mk-smake.id 1.6 07/05/03 " +#ident "@(#)mk-smake.id 1.10 12/12/29 " ########################################################################### # Written 1996 by J. Schilling ########################################################################### @@ -19,7 +19,18 @@ # file and include the License file CDDL.Schily.txt from this distribution. ########################################################################### +_SETENV= $(_UNIQ)$(SETENV) +__SETENV= $(_SETENV:$(_UNIQ)=rules.env) +___SETENV= $(__SETENV:$(_UNIQ)none=rules.nul) +SET_ENV= $(___SETENV:$(_UNIQ)%=%) + +include $(SRCROOT)/$(RULESDIR)/$(SET_ENV) + MAKEPROG= $(MAKE_NAME) +WAIT= # smake-1.2.1 does not yet wait for parallel targets + +SPACE= $(_UNIQ:$(_UNIQ)%= ) +#NUMBER_SIGN= NUMBER_SIGN is defined internally by smake ########################################################################### # @@ -54,3 +65,12 @@ OSDEFS= $(MAKE_OSDEFS) OSREL= $(MAKE_OSREL) OSVERSION= $(MAKE_OSVERSION) + +# +# Disable Simple Suffix Rules +# +.SSUFFIX_RULES: +# +# Disable Suffix Rules +# +.SUFFIXES: diff -Nru cdrtools-2.01.01a33/RULES/mk-sunpro.id cdrtools-3.02a09/RULES/mk-sunpro.id --- cdrtools-2.01.01a33/RULES/mk-sunpro.id 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/RULES/mk-sunpro.id 2017-05-08 18:43:16.000000000 +0000 @@ -0,0 +1,70 @@ +#ident "@(#)mk-sunpro.id 1.19 17/05/08 " +########################################################################### +# Written 1996-2017 by J. Schilling +########################################################################### +# +# Name of make program (make/gmake/smake) +# +########################################################################### +# Copyright (c) J. Schilling +########################################################################### +# The contents of this file are subject to the terms of the +# Common Development and Distribution License, Version 1.0 only +# (the "License"). You may not use this file except in compliance +# with the License. +# +# See the file CDDL.Schily.txt in this distribution for details. +# A copy of the CDDL is also available via the Internet at +# http://www.opensource.org/licenses/cddl1.txt +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file CDDL.Schily.txt from this distribution. +########################################################################### + +MAKEPROG= $(MAKE_NAME) # Use the new ID from the Schilytools version +WAIT= .WAIT # Sun make notation to wait for parallel targets + +SPACE= $(_UNIQ:$(_UNIQ)%= ) +PRE_NUMBER= pre\# +NUMBER_SIGN= $(PRE_NUMBER:pre\%=%) + +########################################################################### +# +# standard (automatic) machine identification +# +########################################################################### +# +# XP_ARCH = uname -p = mach # Processor (sparc/mc68020) +# XK_ARCH = uname -m = arch -k # Kernel (sun3/sun4c/sun4m) +# XM_ARCH = arch ~ arch -k # Machine (sun3/sun4) +# +########################################################################### +# +# Due to a bug in /usr/xpg*/bin/tr on Solaris, we cannot directly translit +# many different chars to '-' using e.g. tr ', /\\()"' ',------' +# +# This is why we use sed 'y%ABC\\%abc-%'. Note that this will not work on *BSD +# +########################################################################### + +XP_ARCH:sh= (mach || uname -p || true)2>/dev/null | sed 'y%ABCDEFGHIJKLMNOPQRSTUVWXYZ, /\\()"%abcdefghijklmnopqrstuvwxyz,------%' +XK_ARCH:sh= uname -m | sed 'y%ABCDEFGHIJKLMNOPQRSTUVWXYZ, /\\()"%abcdefghijklmnopqrstuvwxyz,------%' +XM_ARCH:sh= (arch || /usr/ucb/arch || true)2>/dev/null | sed 'y%ABCDEFGHIJKLMNOPQRSTUVWXYZ, /\\()"%abcdefghijklmnopqrstuvwxyz,------%' + +P_ARCH= $(XP_ARCH) +K_ARCH= $(XK_ARCH) +M_ARCH= $(XM_ARCH) + +_XP_ARCH= $(XP_ARCH:unknown=$(K_ARCH)) + +_P_ARCH= $(_UNIQ)$(_XP_ARCH) +__P_ARCH= $(_P_ARCH:$(_UNIQ)=$(K_ARCH)) +P_ARCH= $(__P_ARCH:$(_UNIQ)%=%) + +_M_ARCH= $(_UNIQ)$(XM_ARCH) +__M_ARCH= $(_M_ARCH:$(_UNIQ)=$(K_ARCH)) +M_ARCH= $(__M_ARCH:$(_UNIQ)%=%) + +OSNAME:sh= uname -s | sed 'y%ABCDEFGHIJKLMNOPQRSTUVWXYZ, /\\()"%abcdefghijklmnopqrstuvwxyz,------%' +OSREL:sh= uname -r | sed 'y%ABCDEFGHIJKLMNOPQRSTUVWXYZ, /\\()"%abcdefghijklmnopqrstuvwxyz,------%' +OSVERSION:sh= uname -v | sed 'y%ABCDEFGHIJKLMNOPQRSTUVWXYZ, /\\()"%abcdefghijklmnopqrstuvwxyz,------%' diff -Nru cdrtools-2.01.01a33/RULES/os-bitrig.def cdrtools-3.02a09/RULES/os-bitrig.def --- cdrtools-2.01.01a33/RULES/os-bitrig.def 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/RULES/os-bitrig.def 2015-10-08 18:21:24.000000000 +0000 @@ -0,0 +1,23 @@ +#ident "@(#)os-bitrig.def 1.1 15/10/08 " +########################################################################### +# Written 2015 by J. Schilling +########################################################################### +# +# Global os definitions for Bitrig +# +########################################################################### +# Copyright (c) J. Schilling +########################################################################### +# The contents of this file are subject to the terms of the +# Common Development and Distribution License, Version 1.0 only +# (the "License"). You may not use this file except in compliance +# with the License. +# +# See the file CDDL.Schily.txt in this distribution for details. +# A copy of the CDDL is also available via the Internet at +# http://www.opensource.org/licenses/cddl1.txt +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file CDDL.Schily.txt from this distribution. +########################################################################### +MANSTYLE= bsd diff -Nru cdrtools-2.01.01a33/RULES/os-bitrig.id cdrtools-3.02a09/RULES/os-bitrig.id --- cdrtools-2.01.01a33/RULES/os-bitrig.id 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/RULES/os-bitrig.id 2015-10-08 18:21:24.000000000 +0000 @@ -0,0 +1,24 @@ +#ident "@(#)os-bitrig.id 1.1 15/10/08 " +########################################################################### +# Written 2015 by J. Schilling +########################################################################### +# +# OS specific MACRO definitions for Bitrig +# +########################################################################### +# Copyright (c) J. Schilling +########################################################################### +# The contents of this file are subject to the terms of the +# Common Development and Distribution License, Version 1.0 only +# (the "License"). You may not use this file except in compliance +# with the License. +# +# See the file CDDL.Schily.txt in this distribution for details. +# A copy of the CDDL is also available via the Internet at +# http://www.opensource.org/licenses/cddl1.txt +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file CDDL.Schily.txt from this distribution. +########################################################################### +O_ARCH= bitrig +-O_ARCH= -$(O_ARCH) diff -Nru cdrtools-2.01.01a33/RULES/os-cygwin32_wow64.def cdrtools-3.02a09/RULES/os-cygwin32_wow64.def --- cdrtools-2.01.01a33/RULES/os-cygwin32_wow64.def 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/RULES/os-cygwin32_wow64.def 2009-04-11 13:57:39.000000000 +0000 @@ -0,0 +1,22 @@ +#ident "@(#)os-cygwin32_wow64.def 1.3 09/04/11 " +########################################################################### +# Written 1997 by J. Schilling +########################################################################### +# +# Global os definitions for CYGWIN32_WOW64 +# +########################################################################### +# Copyright (c) J. Schilling +########################################################################### +# The contents of this file are subject to the terms of the +# Common Development and Distribution License, Version 1.0 only +# (the "License"). You may not use this file except in compliance +# with the License. +# +# See the file CDDL.Schily.txt in this distribution for details. +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file CDDL.Schily.txt from this distribution. +########################################################################### +MANSTYLE= bsd + diff -Nru cdrtools-2.01.01a33/RULES/os-cygwin32_wow64.id cdrtools-3.02a09/RULES/os-cygwin32_wow64.id --- cdrtools-2.01.01a33/RULES/os-cygwin32_wow64.id 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/RULES/os-cygwin32_wow64.id 2009-04-11 14:08:11.000000000 +0000 @@ -0,0 +1,24 @@ +#ident "@(#)os-cygwin32_wow64.id 1.6 09/04/11 " +########################################################################### +# Written 1997 by J. Schilling +########################################################################### +# +# OS specific MACRO definitions for Cygnus GCC for MS Windows NT +# +########################################################################### +# Copyright (c) J. Schilling +########################################################################### +# The contents of this file are subject to the terms of the +# Common Development and Distribution License, Version 1.0 only +# (the "License"). You may not use this file except in compliance +# with the License. +# +# See the file CDDL.Schily.txt in this distribution for details. +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file CDDL.Schily.txt from this distribution. +########################################################################### +O_ARCH= cygwin32_wow64 +-O_ARCH= -$(O_ARCH) + +#WINNTDEFS += -D_WIN32_WINNT=0x0400 diff -Nru cdrtools-2.01.01a33/RULES/os-cygwin32_wow.def cdrtools-3.02a09/RULES/os-cygwin32_wow.def --- cdrtools-2.01.01a33/RULES/os-cygwin32_wow.def 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/RULES/os-cygwin32_wow.def 2015-06-29 18:21:22.000000000 +0000 @@ -0,0 +1,24 @@ +#ident "@(#)os-cygwin32_wow.def 1.1 15/06/29 " +########################################################################### +# Written 1997 by J. Schilling +########################################################################### +# +# Global os definitions for CYGWIN32_WOW +# +########################################################################### +# Copyright (c) J. Schilling +########################################################################### +# The contents of this file are subject to the terms of the +# Common Development and Distribution License, Version 1.0 only +# (the "License"). You may not use this file except in compliance +# with the License. +# +# See the file CDDL.Schily.txt in this distribution for details. +# A copy of the CDDL is also available via the Internet at +# http://www.opensource.org/licenses/cddl1.txt +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file CDDL.Schily.txt from this distribution. +########################################################################### +MANSTYLE= bsd + diff -Nru cdrtools-2.01.01a33/RULES/os-cygwin32_wow.id cdrtools-3.02a09/RULES/os-cygwin32_wow.id --- cdrtools-2.01.01a33/RULES/os-cygwin32_wow.id 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/RULES/os-cygwin32_wow.id 2015-06-29 18:21:22.000000000 +0000 @@ -0,0 +1,26 @@ +#ident "@(#)os-cygwin32_wow.id 1.1 15/06/29 " +########################################################################### +# Written 1997 by J. Schilling +########################################################################### +# +# OS specific MACRO definitions for Cygnus GCC for MS Windows NT +# +########################################################################### +# Copyright (c) J. Schilling +########################################################################### +# The contents of this file are subject to the terms of the +# Common Development and Distribution License, Version 1.0 only +# (the "License"). You may not use this file except in compliance +# with the License. +# +# See the file CDDL.Schily.txt in this distribution for details. +# A copy of the CDDL is also available via the Internet at +# http://www.opensource.org/licenses/cddl1.txt +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file CDDL.Schily.txt from this distribution. +########################################################################### +O_ARCH= cygwin32_wow +-O_ARCH= -$(O_ARCH) + +#WINNTDEFS += -D_WIN32_WINNT=0x0400 diff -Nru cdrtools-2.01.01a33/RULES/os-cygwin_98-4.0.id cdrtools-3.02a09/RULES/os-cygwin_98-4.0.id --- cdrtools-2.01.01a33/RULES/os-cygwin_98-4.0.id 2007-05-08 11:03:08.000000000 +0000 +++ cdrtools-3.02a09/RULES/os-cygwin_98-4.0.id 1970-01-01 00:00:00.000000000 +0000 @@ -1,23 +0,0 @@ -#ident "@(#)os-cygwin_95-4.0.id 1.2 07/05/08 " -########################################################################### -# Written 2006 by J. Schilling -########################################################################### -# -# OS specific MACRO definitions for Cygnus GCC for MS Windows 4.0 (WIN-95) -# -########################################################################### -# Copyright (c) J. Schilling -########################################################################### -# The contents of this file are subject to the terms of the -# Common Development and Distribution License, Version 1.0 only -# (the "License"). You may not use this file except in compliance -# with the License. -# -# See the file CDDL.Schily.txt in this distribution for details. -# -# When distributing Covered Code, include this CDDL HEADER in each -# file and include the License file CDDL.Schily.txt from this distribution. -########################################################################### -include $(SRCROOT)/$(RULESDIR)/os-cygwin32_nt.id - -OSDEFS += -D_WIN32_WINDOWS=0x0400 diff -Nru cdrtools-2.01.01a33/RULES/os-cygwin_nt-10.0.id cdrtools-3.02a09/RULES/os-cygwin_nt-10.0.id --- cdrtools-2.01.01a33/RULES/os-cygwin_nt-10.0.id 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/RULES/os-cygwin_nt-10.0.id 2015-08-03 21:17:39.000000000 +0000 @@ -0,0 +1,25 @@ +#ident "@(#)os-cygwin_nt-10.0.id 1.1 15/08/03 " +########################################################################### +# Written 2015 by J. Schilling +########################################################################### +# +# OS specific MACRO definitions for Cygnus GCC for MS Windows NT-10.0 (Win 10.0) +# +########################################################################### +# Copyright (c) J. Schilling +########################################################################### +# The contents of this file are subject to the terms of the +# Common Development and Distribution License, Version 1.0 only +# (the "License"). You may not use this file except in compliance +# with the License. +# +# See the file CDDL.Schily.txt in this distribution for details. +# A copy of the CDDL is also available via the Internet at +# http://www.opensource.org/licenses/cddl1.txt +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file CDDL.Schily.txt from this distribution. +########################################################################### +include $(SRCROOT)/$(RULESDIR)/os-cygwin32_nt.id + +WINNTDEFS += -DWINVER=0x0A00 -D_WIN32_WINNT=0x0A00 diff -Nru cdrtools-2.01.01a33/RULES/os-cygwin_nt-10.0-wow64.id cdrtools-3.02a09/RULES/os-cygwin_nt-10.0-wow64.id --- cdrtools-2.01.01a33/RULES/os-cygwin_nt-10.0-wow64.id 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/RULES/os-cygwin_nt-10.0-wow64.id 2015-08-03 21:17:39.000000000 +0000 @@ -0,0 +1,25 @@ +#ident "@(#)os-cygwin_nt-10.0-wow64.id 1.1 15/08/03 " +########################################################################### +# Written 2015 by J. Schilling +########################################################################### +# +# OS specific MACRO definitions for Cygnus GCC for MS Windows NT-10.0 (Win 10.0) +# +########################################################################### +# Copyright (c) J. Schilling +########################################################################### +# The contents of this file are subject to the terms of the +# Common Development and Distribution License, Version 1.0 only +# (the "License"). You may not use this file except in compliance +# with the License. +# +# See the file CDDL.Schily.txt in this distribution for details. +# A copy of the CDDL is also available via the Internet at +# http://www.opensource.org/licenses/cddl1.txt +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file CDDL.Schily.txt from this distribution. +########################################################################### +include $(SRCROOT)/$(RULESDIR)/os-cygwin32_wow64.id + +WINNTDEFS += -DWINVER=0x0A00 -D_WIN32_WINNT=0x0A00 diff -Nru cdrtools-2.01.01a33/RULES/os-cygwin_nt-10.0-wow.id cdrtools-3.02a09/RULES/os-cygwin_nt-10.0-wow.id --- cdrtools-2.01.01a33/RULES/os-cygwin_nt-10.0-wow.id 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/RULES/os-cygwin_nt-10.0-wow.id 2015-08-03 21:17:39.000000000 +0000 @@ -0,0 +1,25 @@ +#ident "@(#)os-cygwin_nt-10.0-wow.id 1.1 15/08/03 " +########################################################################### +# Written 2015 by J. Schilling +########################################################################### +# +# OS specific MACRO definitions for Cygnus GCC for MS Windows NT-10.0 (Win 10.0) +# +########################################################################### +# Copyright (c) J. Schilling +########################################################################### +# The contents of this file are subject to the terms of the +# Common Development and Distribution License, Version 1.0 only +# (the "License"). You may not use this file except in compliance +# with the License. +# +# See the file CDDL.Schily.txt in this distribution for details. +# A copy of the CDDL is also available via the Internet at +# http://www.opensource.org/licenses/cddl1.txt +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file CDDL.Schily.txt from this distribution. +########################################################################### +include $(SRCROOT)/$(RULESDIR)/os-cygwin32_wow.id + +WINNTDEFS += -DWINVER=0x0A00 -D_WIN32_WINNT=0x0A00 diff -Nru cdrtools-2.01.01a33/RULES/os-cygwin_nt-5.2-wow64.id cdrtools-3.02a09/RULES/os-cygwin_nt-5.2-wow64.id --- cdrtools-2.01.01a33/RULES/os-cygwin_nt-5.2-wow64.id 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/RULES/os-cygwin_nt-5.2-wow64.id 2009-04-11 14:08:11.000000000 +0000 @@ -0,0 +1,23 @@ +#ident "@(#)os-cygwin_nt-5.2-wow64.id 1.5 09/04/11 " +########################################################################### +# Written 2006 by J. Schilling +########################################################################### +# +# OS specific MACRO definitions for Cygnus GCC for MS Windows NT-5.2 (Server 2003) +# +########################################################################### +# Copyright (c) J. Schilling +########################################################################### +# The contents of this file are subject to the terms of the +# Common Development and Distribution License, Version 1.0 only +# (the "License"). You may not use this file except in compliance +# with the License. +# +# See the file CDDL.Schily.txt in this distribution for details. +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file CDDL.Schily.txt from this distribution. +########################################################################### +include $(SRCROOT)/$(RULESDIR)/os-cygwin32_wow64.id + +WINNTDEFS += -D_WIN32_WINNT=0x0502 diff -Nru cdrtools-2.01.01a33/RULES/os-cygwin_nt-5.2-wow.id cdrtools-3.02a09/RULES/os-cygwin_nt-5.2-wow.id --- cdrtools-2.01.01a33/RULES/os-cygwin_nt-5.2-wow.id 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/RULES/os-cygwin_nt-5.2-wow.id 2015-06-29 18:21:22.000000000 +0000 @@ -0,0 +1,25 @@ +#ident "@(#)os-cygwin_nt-5.2-wow.id 1.1 15/06/29 " +########################################################################### +# Written 2006 by J. Schilling +########################################################################### +# +# OS specific MACRO definitions for Cygnus GCC for MS Windows NT-5.2 (Server 2003) +# +########################################################################### +# Copyright (c) J. Schilling +########################################################################### +# The contents of this file are subject to the terms of the +# Common Development and Distribution License, Version 1.0 only +# (the "License"). You may not use this file except in compliance +# with the License. +# +# See the file CDDL.Schily.txt in this distribution for details. +# A copy of the CDDL is also available via the Internet at +# http://www.opensource.org/licenses/cddl1.txt +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file CDDL.Schily.txt from this distribution. +########################################################################### +include $(SRCROOT)/$(RULESDIR)/os-cygwin32_wow.id + +WINNTDEFS += -D_WIN32_WINNT=0x0502 diff -Nru cdrtools-2.01.01a33/RULES/os-cygwin_nt-6.0.id cdrtools-3.02a09/RULES/os-cygwin_nt-6.0.id --- cdrtools-2.01.01a33/RULES/os-cygwin_nt-6.0.id 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/RULES/os-cygwin_nt-6.0.id 2009-04-07 22:01:06.000000000 +0000 @@ -0,0 +1,23 @@ +#ident "@(#)os-cygwin_nt-6.0.id 1.5 09/04/08 " +########################################################################### +# Written 2009 by J. Schilling +########################################################################### +# +# OS specific MACRO definitions for Cygnus GCC for MS Windows NT-6.0 (Win Vista) +# +########################################################################### +# Copyright (c) J. Schilling +########################################################################### +# The contents of this file are subject to the terms of the +# Common Development and Distribution License, Version 1.0 only +# (the "License"). You may not use this file except in compliance +# with the License. +# +# See the file CDDL.Schily.txt in this distribution for details. +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file CDDL.Schily.txt from this distribution. +########################################################################### +include $(SRCROOT)/$(RULESDIR)/os-cygwin32_nt.id + +WINNTDEFS += -D_WIN32_WINNT=0x0600 diff -Nru cdrtools-2.01.01a33/RULES/os-cygwin_nt-6.0-wow64.id cdrtools-3.02a09/RULES/os-cygwin_nt-6.0-wow64.id --- cdrtools-2.01.01a33/RULES/os-cygwin_nt-6.0-wow64.id 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/RULES/os-cygwin_nt-6.0-wow64.id 2009-07-26 12:07:15.000000000 +0000 @@ -0,0 +1,23 @@ +#ident "@(#)os-cygwin_nt-6.0-wow64.id 1.1 09/07/26 " +########################################################################### +# Written 2006 by J. Schilling +########################################################################### +# +# OS specific MACRO definitions for Cygnus GCC for MS Windows NT-6.0 (Vista) +# +########################################################################### +# Copyright (c) J. Schilling +########################################################################### +# The contents of this file are subject to the terms of the +# Common Development and Distribution License, Version 1.0 only +# (the "License"). You may not use this file except in compliance +# with the License. +# +# See the file CDDL.Schily.txt in this distribution for details. +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file CDDL.Schily.txt from this distribution. +########################################################################### +include $(SRCROOT)/$(RULESDIR)/os-cygwin32_wow64.id + +WINNTDEFS += -D_WIN32_WINNT=0x0600 diff -Nru cdrtools-2.01.01a33/RULES/os-cygwin_nt-6.0-wow.id cdrtools-3.02a09/RULES/os-cygwin_nt-6.0-wow.id --- cdrtools-2.01.01a33/RULES/os-cygwin_nt-6.0-wow.id 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/RULES/os-cygwin_nt-6.0-wow.id 2015-06-29 18:21:22.000000000 +0000 @@ -0,0 +1,25 @@ +#ident "@(#)os-cygwin_nt-6.0-wow.id 1.1 15/06/29 " +########################################################################### +# Written 2006 by J. Schilling +########################################################################### +# +# OS specific MACRO definitions for Cygnus GCC for MS Windows NT-6.0 (Vista) +# +########################################################################### +# Copyright (c) J. Schilling +########################################################################### +# The contents of this file are subject to the terms of the +# Common Development and Distribution License, Version 1.0 only +# (the "License"). You may not use this file except in compliance +# with the License. +# +# See the file CDDL.Schily.txt in this distribution for details. +# A copy of the CDDL is also available via the Internet at +# http://www.opensource.org/licenses/cddl1.txt +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file CDDL.Schily.txt from this distribution. +########################################################################### +include $(SRCROOT)/$(RULESDIR)/os-cygwin32_wow.id + +WINNTDEFS += -D_WIN32_WINNT=0x0600 diff -Nru cdrtools-2.01.01a33/RULES/os-cygwin_nt-6.1.id cdrtools-3.02a09/RULES/os-cygwin_nt-6.1.id --- cdrtools-2.01.01a33/RULES/os-cygwin_nt-6.1.id 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/RULES/os-cygwin_nt-6.1.id 2009-04-07 22:01:06.000000000 +0000 @@ -0,0 +1,23 @@ +#ident "@(#)os-cygwin_nt-6.1.id 1.5 09/04/08 " +########################################################################### +# Written 2009 by J. Schilling +########################################################################### +# +# OS specific MACRO definitions for Cygnus GCC for MS Windows NT-6.1 (Win 7) +# +########################################################################### +# Copyright (c) J. Schilling +########################################################################### +# The contents of this file are subject to the terms of the +# Common Development and Distribution License, Version 1.0 only +# (the "License"). You may not use this file except in compliance +# with the License. +# +# See the file CDDL.Schily.txt in this distribution for details. +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file CDDL.Schily.txt from this distribution. +########################################################################### +include $(SRCROOT)/$(RULESDIR)/os-cygwin32_nt.id + +WINNTDEFS += -D_WIN32_WINNT=0x0601 diff -Nru cdrtools-2.01.01a33/RULES/os-cygwin_nt-6.1-wow64.id cdrtools-3.02a09/RULES/os-cygwin_nt-6.1-wow64.id --- cdrtools-2.01.01a33/RULES/os-cygwin_nt-6.1-wow64.id 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/RULES/os-cygwin_nt-6.1-wow64.id 2009-07-26 12:07:15.000000000 +0000 @@ -0,0 +1,23 @@ +#ident "@(#)os-cygwin_nt-6.1-wow64.id 1.1 09/07/26 " +########################################################################### +# Written 2006 by J. Schilling +########################################################################### +# +# OS specific MACRO definitions for Cygnus GCC for MS Windows NT-6.1 (Win 7) +# +########################################################################### +# Copyright (c) J. Schilling +########################################################################### +# The contents of this file are subject to the terms of the +# Common Development and Distribution License, Version 1.0 only +# (the "License"). You may not use this file except in compliance +# with the License. +# +# See the file CDDL.Schily.txt in this distribution for details. +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file CDDL.Schily.txt from this distribution. +########################################################################### +include $(SRCROOT)/$(RULESDIR)/os-cygwin32_wow64.id + +WINNTDEFS += -D_WIN32_WINNT=0x0601 diff -Nru cdrtools-2.01.01a33/RULES/os-cygwin_nt-6.1-wow.id cdrtools-3.02a09/RULES/os-cygwin_nt-6.1-wow.id --- cdrtools-2.01.01a33/RULES/os-cygwin_nt-6.1-wow.id 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/RULES/os-cygwin_nt-6.1-wow.id 2015-06-29 18:21:22.000000000 +0000 @@ -0,0 +1,25 @@ +#ident "@(#)os-cygwin_nt-6.1-wow.id 1.1 15/06/29 " +########################################################################### +# Written 2006 by J. Schilling +########################################################################### +# +# OS specific MACRO definitions for Cygnus GCC for MS Windows NT-6.1 (Win 7) +# +########################################################################### +# Copyright (c) J. Schilling +########################################################################### +# The contents of this file are subject to the terms of the +# Common Development and Distribution License, Version 1.0 only +# (the "License"). You may not use this file except in compliance +# with the License. +# +# See the file CDDL.Schily.txt in this distribution for details. +# A copy of the CDDL is also available via the Internet at +# http://www.opensource.org/licenses/cddl1.txt +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file CDDL.Schily.txt from this distribution. +########################################################################### +include $(SRCROOT)/$(RULESDIR)/os-cygwin32_wow.id + +WINNTDEFS += -D_WIN32_WINNT=0x0601 diff -Nru cdrtools-2.01.01a33/RULES/os-cygwin_nt-6.2.id cdrtools-3.02a09/RULES/os-cygwin_nt-6.2.id --- cdrtools-2.01.01a33/RULES/os-cygwin_nt-6.2.id 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/RULES/os-cygwin_nt-6.2.id 2013-09-16 19:04:35.000000000 +0000 @@ -0,0 +1,25 @@ +#ident "@(#)os-cygwin_nt-6.2.id 1.1 13/09/16 " +########################################################################### +# Written 2013 by J. Schilling +########################################################################### +# +# OS specific MACRO definitions for Cygnus GCC for MS Windows NT-6.2 (Win 8) +# +########################################################################### +# Copyright (c) J. Schilling +########################################################################### +# The contents of this file are subject to the terms of the +# Common Development and Distribution License, Version 1.0 only +# (the "License"). You may not use this file except in compliance +# with the License. +# +# See the file CDDL.Schily.txt in this distribution for details. +# A copy of the CDDL is also available via the Internet at +# http://www.opensource.org/licenses/cddl1.txt +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file CDDL.Schily.txt from this distribution. +########################################################################### +include $(SRCROOT)/$(RULESDIR)/os-cygwin32_nt.id + +WINNTDEFS += -D_WIN32_WINNT=0x0602 diff -Nru cdrtools-2.01.01a33/RULES/os-cygwin_nt-6.2-wow64.id cdrtools-3.02a09/RULES/os-cygwin_nt-6.2-wow64.id --- cdrtools-2.01.01a33/RULES/os-cygwin_nt-6.2-wow64.id 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/RULES/os-cygwin_nt-6.2-wow64.id 2013-09-16 19:04:35.000000000 +0000 @@ -0,0 +1,25 @@ +#ident "@(#)os-cygwin_nt-6.2-wow64.id 1.1 13/09/16 " +########################################################################### +# Written 2013 by J. Schilling +########################################################################### +# +# OS specific MACRO definitions for Cygnus GCC for MS Windows NT-6.2 (Win 8) +# +########################################################################### +# Copyright (c) J. Schilling +########################################################################### +# The contents of this file are subject to the terms of the +# Common Development and Distribution License, Version 1.0 only +# (the "License"). You may not use this file except in compliance +# with the License. +# +# See the file CDDL.Schily.txt in this distribution for details. +# A copy of the CDDL is also available via the Internet at +# http://www.opensource.org/licenses/cddl1.txt +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file CDDL.Schily.txt from this distribution. +########################################################################### +include $(SRCROOT)/$(RULESDIR)/os-cygwin32_wow64.id + +WINNTDEFS += -D_WIN32_WINNT=0x0602 diff -Nru cdrtools-2.01.01a33/RULES/os-cygwin_nt-6.2-wow.id cdrtools-3.02a09/RULES/os-cygwin_nt-6.2-wow.id --- cdrtools-2.01.01a33/RULES/os-cygwin_nt-6.2-wow.id 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/RULES/os-cygwin_nt-6.2-wow.id 2015-06-29 18:21:22.000000000 +0000 @@ -0,0 +1,25 @@ +#ident "@(#)os-cygwin_nt-6.2-wow.id 1.1 15/06/29 " +########################################################################### +# Written 2013 by J. Schilling +########################################################################### +# +# OS specific MACRO definitions for Cygnus GCC for MS Windows NT-6.2 (Win 8) +# +########################################################################### +# Copyright (c) J. Schilling +########################################################################### +# The contents of this file are subject to the terms of the +# Common Development and Distribution License, Version 1.0 only +# (the "License"). You may not use this file except in compliance +# with the License. +# +# See the file CDDL.Schily.txt in this distribution for details. +# A copy of the CDDL is also available via the Internet at +# http://www.opensource.org/licenses/cddl1.txt +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file CDDL.Schily.txt from this distribution. +########################################################################### +include $(SRCROOT)/$(RULESDIR)/os-cygwin32_wow.id + +WINNTDEFS += -D_WIN32_WINNT=0x0602 diff -Nru cdrtools-2.01.01a33/RULES/os-cygwin_nt-6.3.id cdrtools-3.02a09/RULES/os-cygwin_nt-6.3.id --- cdrtools-2.01.01a33/RULES/os-cygwin_nt-6.3.id 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/RULES/os-cygwin_nt-6.3.id 2013-09-16 19:04:35.000000000 +0000 @@ -0,0 +1,25 @@ +#ident "@(#)os-cygwin_nt-6.3.id 1.1 13/09/16 " +########################################################################### +# Written 2013 by J. Schilling +########################################################################### +# +# OS specific MACRO definitions for Cygnus GCC for MS Windows NT-6.3 (Win 8.1) +# +########################################################################### +# Copyright (c) J. Schilling +########################################################################### +# The contents of this file are subject to the terms of the +# Common Development and Distribution License, Version 1.0 only +# (the "License"). You may not use this file except in compliance +# with the License. +# +# See the file CDDL.Schily.txt in this distribution for details. +# A copy of the CDDL is also available via the Internet at +# http://www.opensource.org/licenses/cddl1.txt +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file CDDL.Schily.txt from this distribution. +########################################################################### +include $(SRCROOT)/$(RULESDIR)/os-cygwin32_nt.id + +WINNTDEFS += -D_WIN32_WINNT=0x0603 diff -Nru cdrtools-2.01.01a33/RULES/os-cygwin_nt-6.3-wow64.id cdrtools-3.02a09/RULES/os-cygwin_nt-6.3-wow64.id --- cdrtools-2.01.01a33/RULES/os-cygwin_nt-6.3-wow64.id 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/RULES/os-cygwin_nt-6.3-wow64.id 2013-09-16 19:04:35.000000000 +0000 @@ -0,0 +1,25 @@ +#ident "@(#)os-cygwin_nt-6.3-wow64.id 1.1 13/09/16 " +########################################################################### +# Written 2013 by J. Schilling +########################################################################### +# +# OS specific MACRO definitions for Cygnus GCC for MS Windows NT-6.3 (Win 8.1) +# +########################################################################### +# Copyright (c) J. Schilling +########################################################################### +# The contents of this file are subject to the terms of the +# Common Development and Distribution License, Version 1.0 only +# (the "License"). You may not use this file except in compliance +# with the License. +# +# See the file CDDL.Schily.txt in this distribution for details. +# A copy of the CDDL is also available via the Internet at +# http://www.opensource.org/licenses/cddl1.txt +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file CDDL.Schily.txt from this distribution. +########################################################################### +include $(SRCROOT)/$(RULESDIR)/os-cygwin32_wow64.id + +WINNTDEFS += -D_WIN32_WINNT=0x0603 diff -Nru cdrtools-2.01.01a33/RULES/os-cygwin_nt-6.3-wow.id cdrtools-3.02a09/RULES/os-cygwin_nt-6.3-wow.id --- cdrtools-2.01.01a33/RULES/os-cygwin_nt-6.3-wow.id 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/RULES/os-cygwin_nt-6.3-wow.id 2015-06-29 18:21:22.000000000 +0000 @@ -0,0 +1,25 @@ +#ident "@(#)os-cygwin_nt-6.3-wow.id 1.1 15/06/29 " +########################################################################### +# Written 2013 by J. Schilling +########################################################################### +# +# OS specific MACRO definitions for Cygnus GCC for MS Windows NT-6.3 (Win 8.1) +# +########################################################################### +# Copyright (c) J. Schilling +########################################################################### +# The contents of this file are subject to the terms of the +# Common Development and Distribution License, Version 1.0 only +# (the "License"). You may not use this file except in compliance +# with the License. +# +# See the file CDDL.Schily.txt in this distribution for details. +# A copy of the CDDL is also available via the Internet at +# http://www.opensource.org/licenses/cddl1.txt +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file CDDL.Schily.txt from this distribution. +########################################################################### +include $(SRCROOT)/$(RULESDIR)/os-cygwin32_wow.id + +WINNTDEFS += -D_WIN32_WINNT=0x0603 diff -Nru cdrtools-2.01.01a33/RULES/os-cygwin_nt-6.4.id cdrtools-3.02a09/RULES/os-cygwin_nt-6.4.id --- cdrtools-2.01.01a33/RULES/os-cygwin_nt-6.4.id 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/RULES/os-cygwin_nt-6.4.id 2015-08-03 21:17:39.000000000 +0000 @@ -0,0 +1,25 @@ +#ident "@(#)os-cygwin_nt-6.4.id 1.1 15/08/03 " +########################################################################### +# Written 2015 by J. Schilling +########################################################################### +# +# OS specific MACRO definitions for Cygnus GCC for MS Windows NT-6.4 (Win 10.0) +# +########################################################################### +# Copyright (c) J. Schilling +########################################################################### +# The contents of this file are subject to the terms of the +# Common Development and Distribution License, Version 1.0 only +# (the "License"). You may not use this file except in compliance +# with the License. +# +# See the file CDDL.Schily.txt in this distribution for details. +# A copy of the CDDL is also available via the Internet at +# http://www.opensource.org/licenses/cddl1.txt +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file CDDL.Schily.txt from this distribution. +########################################################################### +include $(SRCROOT)/$(RULESDIR)/os-cygwin32_nt.id + +WINNTDEFS += -D_WIN32_WINNT=0x0604 diff -Nru cdrtools-2.01.01a33/RULES/os-cygwin_nt-6.4-wow64.id cdrtools-3.02a09/RULES/os-cygwin_nt-6.4-wow64.id --- cdrtools-2.01.01a33/RULES/os-cygwin_nt-6.4-wow64.id 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/RULES/os-cygwin_nt-6.4-wow64.id 2015-08-03 21:17:39.000000000 +0000 @@ -0,0 +1,25 @@ +#ident "@(#)os-cygwin_nt-6.4-wow64.id 1.1 15/08/03 " +########################################################################### +# Written 2015 by J. Schilling +########################################################################### +# +# OS specific MACRO definitions for Cygnus GCC for MS Windows NT-6.4 (Win 10.0) +# +########################################################################### +# Copyright (c) J. Schilling +########################################################################### +# The contents of this file are subject to the terms of the +# Common Development and Distribution License, Version 1.0 only +# (the "License"). You may not use this file except in compliance +# with the License. +# +# See the file CDDL.Schily.txt in this distribution for details. +# A copy of the CDDL is also available via the Internet at +# http://www.opensource.org/licenses/cddl1.txt +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file CDDL.Schily.txt from this distribution. +########################################################################### +include $(SRCROOT)/$(RULESDIR)/os-cygwin32_wow64.id + +WINNTDEFS += -D_WIN32_WINNT=0x0604 diff -Nru cdrtools-2.01.01a33/RULES/os-cygwin_nt-6.4-wow.id cdrtools-3.02a09/RULES/os-cygwin_nt-6.4-wow.id --- cdrtools-2.01.01a33/RULES/os-cygwin_nt-6.4-wow.id 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/RULES/os-cygwin_nt-6.4-wow.id 2015-08-03 21:17:39.000000000 +0000 @@ -0,0 +1,25 @@ +#ident "@(#)os-cygwin_nt-6.4-wow.id 1.1 15/08/03 " +########################################################################### +# Written 2015 by J. Schilling +########################################################################### +# +# OS specific MACRO definitions for Cygnus GCC for MS Windows NT-6.4 (Win 10.0) +# +########################################################################### +# Copyright (c) J. Schilling +########################################################################### +# The contents of this file are subject to the terms of the +# Common Development and Distribution License, Version 1.0 only +# (the "License"). You may not use this file except in compliance +# with the License. +# +# See the file CDDL.Schily.txt in this distribution for details. +# A copy of the CDDL is also available via the Internet at +# http://www.opensource.org/licenses/cddl1.txt +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file CDDL.Schily.txt from this distribution. +########################################################################### +include $(SRCROOT)/$(RULESDIR)/os-cygwin32_wow.id + +WINNTDEFS += -D_WIN32_WINNT=0x0604 diff -Nru cdrtools-2.01.01a33/RULES/os-freemint.def cdrtools-3.02a09/RULES/os-freemint.def --- cdrtools-2.01.01a33/RULES/os-freemint.def 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/RULES/os-freemint.def 2008-11-08 21:08:16.000000000 +0000 @@ -0,0 +1,21 @@ +#ident @(#)os-freemint.def 1.1 08/11/08 +########################################################################### +# Written 2008 by Y. Doyeux +########################################################################### +# +# Global os definitions for FreeMiNT on ATARI computers +# +########################################################################### +# Copyright (c) J. Schilling +########################################################################### +# The contents of this file are subject to the terms of the +# Common Development and Distribution License, Version 1.0 only +# (the "License"). You may not use this file except in compliance +# with the License. +# +# See the file CDDL.Schily.txt in this distribution for details. +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file CDDL.Schily.txt from this distribution. +########################################################################### +MANSTYLE= bsd diff -Nru cdrtools-2.01.01a33/RULES/os-freemint.id cdrtools-3.02a09/RULES/os-freemint.id --- cdrtools-2.01.01a33/RULES/os-freemint.id 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/RULES/os-freemint.id 2008-11-08 21:08:16.000000000 +0000 @@ -0,0 +1,22 @@ +#ident @(#)os-freemint.id 1.1 08/11/08 +########################################################################### +# Written 2008 by Y. Doyeux +########################################################################### +# +# OS specific MACRO definitions for FreeMiNT on ATARI computers +# +########################################################################### +# Copyright (c) J. Schilling +########################################################################### +# The contents of this file are subject to the terms of the +# Common Development and Distribution License, Version 1.0 only +# (the "License"). You may not use this file except in compliance +# with the License. +# +# See the file CDDL.Schily.txt in this distribution for details. +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file CDDL.Schily.txt from this distribution. +########################################################################### +O_ARCH= freemint +-O_ARCH= -$(O_ARCH) diff -Nru cdrtools-2.01.01a33/RULES/os-gnu-kfreebsd.def cdrtools-3.02a09/RULES/os-gnu-kfreebsd.def --- cdrtools-2.01.01a33/RULES/os-gnu-kfreebsd.def 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/RULES/os-gnu-kfreebsd.def 2012-08-14 21:19:56.000000000 +0000 @@ -0,0 +1,21 @@ +#ident "@(#)os-gnu-kfreebsd.def 1.1 12/08/14 " +########################################################################### +# Written 1997 by J. Schilling +########################################################################### +# +# Global os definitions for Debian with FreeBSD kernel +# +########################################################################### +# Copyright (c) J. Schilling +########################################################################### +# The contents of this file are subject to the terms of the +# Common Development and Distribution License, Version 1.0 only +# (the "License"). You may not use this file except in compliance +# with the License. +# +# See the file CDDL.Schily.txt in this distribution for details. +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file CDDL.Schily.txt from this distribution. +########################################################################### +MANSTYLE= bsd diff -Nru cdrtools-2.01.01a33/RULES/os-gnu-kfreebsd.id cdrtools-3.02a09/RULES/os-gnu-kfreebsd.id --- cdrtools-2.01.01a33/RULES/os-gnu-kfreebsd.id 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/RULES/os-gnu-kfreebsd.id 2012-08-14 21:19:56.000000000 +0000 @@ -0,0 +1,22 @@ +#ident "@(#)os-gnu-kfreebsd.id 1.1 12/08/14 " +########################################################################### +# Written 1996 by J. Schilling +########################################################################### +# +# OS specific MACRO definitions for Debian with FreeBSD kernel +# +########################################################################### +# Copyright (c) J. Schilling +########################################################################### +# The contents of this file are subject to the terms of the +# Common Development and Distribution License, Version 1.0 only +# (the "License"). You may not use this file except in compliance +# with the License. +# +# See the file CDDL.Schily.txt in this distribution for details. +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file CDDL.Schily.txt from this distribution. +########################################################################### +O_ARCH= gnu-kfreebsd +-O_ARCH= -$(O_ARCH) diff -Nru cdrtools-2.01.01a33/RULES/os-haiku.def cdrtools-3.02a09/RULES/os-haiku.def --- cdrtools-2.01.01a33/RULES/os-haiku.def 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/RULES/os-haiku.def 2009-02-03 22:04:44.000000000 +0000 @@ -0,0 +1,21 @@ +#ident "@(#)os-haiku.def 1.1 09/02/03 " +########################################################################### +# Written 1997 by J. Schilling +########################################################################### +# +# Global os definitions for Haiku, a BeOS like OS +# +########################################################################### +# Copyright (c) J. Schilling +########################################################################### +# The contents of this file are subject to the terms of the +# Common Development and Distribution License, Version 1.0 only +# (the "License"). You may not use this file except in compliance +# with the License. +# +# See the file CDDL.Schily.txt in this distribution for details. +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file CDDL.Schily.txt from this distribution. +########################################################################### +MANSTYLE= bsd diff -Nru cdrtools-2.01.01a33/RULES/os-haiku.id cdrtools-3.02a09/RULES/os-haiku.id --- cdrtools-2.01.01a33/RULES/os-haiku.id 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/RULES/os-haiku.id 2009-02-03 22:04:44.000000000 +0000 @@ -0,0 +1,22 @@ +#ident "@(#)os-haiku.id 1.1 09/02/03 " +########################################################################### +# Written 1996 by J. Schilling +########################################################################### +# +# OS specific MACRO definitions for Haiku, a BeOS like OS +# +########################################################################### +# Copyright (c) J. Schilling +########################################################################### +# The contents of this file are subject to the terms of the +# Common Development and Distribution License, Version 1.0 only +# (the "License"). You may not use this file except in compliance +# with the License. +# +# See the file CDDL.Schily.txt in this distribution for details. +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file CDDL.Schily.txt from this distribution. +########################################################################### +O_ARCH= haiku +-O_ARCH= -$(O_ARCH) diff -Nru cdrtools-2.01.01a33/RULES/os-interix-nt-6.0.id cdrtools-3.02a09/RULES/os-interix-nt-6.0.id --- cdrtools-2.01.01a33/RULES/os-interix-nt-6.0.id 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/RULES/os-interix-nt-6.0.id 2013-08-11 16:11:43.000000000 +0000 @@ -0,0 +1,23 @@ +#ident "@(#)os-interix-nt-6.0.id 1.1 13/08/11 " +########################################################################### +# Written 2013 by J. Schilling +########################################################################### +# +# Global os definitions for Interix Systems (SFU) MS Windows NT-6.0 (Win Vista) +# +########################################################################### +# Copyright (c) J. Schilling +########################################################################### +# The contents of this file are subject to the terms of the +# Common Development and Distribution License, Version 1.0 only +# (the "License"). You may not use this file except in compliance +# with the License. +# +# See the file CDDL.Schily.txt in this distribution for details. +# A copy of the CDDL is also available via the Internet at +# http://www.opensource.org/licenses/cddl1.txt +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file CDDL.Schily.txt from this distribution. +########################################################################### +WINNTDEFS += -D_WIN32_WINNT=0x0600 diff -Nru cdrtools-2.01.01a33/RULES/os-interix-nt-6.1.id cdrtools-3.02a09/RULES/os-interix-nt-6.1.id --- cdrtools-2.01.01a33/RULES/os-interix-nt-6.1.id 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/RULES/os-interix-nt-6.1.id 2013-08-11 16:11:43.000000000 +0000 @@ -0,0 +1,23 @@ +#ident "@(#)os-interix-nt-6.1.id 1.1 13/08/11 " +########################################################################### +# Written 2013 by J. Schilling +########################################################################### +# +# Global os definitions for Interix Systems (SFU) MS Windows NT-6.1 (Win 7) +# +########################################################################### +# Copyright (c) J. Schilling +########################################################################### +# The contents of this file are subject to the terms of the +# Common Development and Distribution License, Version 1.0 only +# (the "License"). You may not use this file except in compliance +# with the License. +# +# See the file CDDL.Schily.txt in this distribution for details. +# A copy of the CDDL is also available via the Internet at +# http://www.opensource.org/licenses/cddl1.txt +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file CDDL.Schily.txt from this distribution. +########################################################################### +WINNTDEFS += -D_WIN32_WINNT=0x0601 diff -Nru cdrtools-2.01.01a33/RULES/os-irix64.id cdrtools-3.02a09/RULES/os-irix64.id --- cdrtools-2.01.01a33/RULES/os-irix64.id 2006-05-14 11:55:27.000000000 +0000 +++ cdrtools-3.02a09/RULES/os-irix64.id 1970-01-01 00:00:00.000000000 +0000 @@ -1,22 +0,0 @@ -#ident "@(#)os-irix.id 1.2 06/05/14 " -########################################################################### -# Written 1996 by J. Schilling -########################################################################### -# -# OS specific MACRO definitions for Silicon Graphics IRIX -# -########################################################################### -# Copyright (c) J. Schilling -########################################################################### -# The contents of this file are subject to the terms of the -# Common Development and Distribution License, Version 1.0 only. -# (the "License"). You may not use this file except in compliance -# with the License. -# -# See the file CDDL.Schily.txt in this distribution for details. -# -# When distributing Covered Code, include this CDDL HEADER in each -# file and include the License file CDDL.Schily.txt from this distribution. -########################################################################### -O_ARCH= irix --O_ARCH= -$(O_ARCH) diff -Nru cdrtools-2.01.01a33/RULES/os-mingw32_nt-6.0.id cdrtools-3.02a09/RULES/os-mingw32_nt-6.0.id --- cdrtools-2.01.01a33/RULES/os-mingw32_nt-6.0.id 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/RULES/os-mingw32_nt-6.0.id 2015-12-09 00:14:20.000000000 +0000 @@ -0,0 +1,22 @@ +#ident "@(#)os-mingw32_nt-6.0.id 1.1 15/12/09 " +########################################################################### +# +# OS specific MACRO definitions for Win32/Mingw32 +# +########################################################################### +# Copyright (c) J. Schilling +########################################################################### +# The contents of this file are subject to the terms of the +# Common Development and Distribution License, Version 1.0 only +# (the "License"). You may not use this file except in compliance +# with the License. +# +# See the file CDDL.Schily.txt in this distribution for details. +# A copy of the CDDL is also available via the Internet at +# http://www.opensource.org/licenses/cddl1.txt +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file CDDL.Schily.txt from this distribution. +########################################################################### +O_ARCH= mingw32_nt +-O_ARCH= -$(O_ARCH) diff -Nru cdrtools-2.01.01a33/RULES/os-mingw32_nt-6.1.id cdrtools-3.02a09/RULES/os-mingw32_nt-6.1.id --- cdrtools-2.01.01a33/RULES/os-mingw32_nt-6.1.id 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/RULES/os-mingw32_nt-6.1.id 2015-12-09 00:14:20.000000000 +0000 @@ -0,0 +1,22 @@ +#ident "@(#)os-mingw32_nt-6.1.id 1.1 15/12/09 " +########################################################################### +# +# OS specific MACRO definitions for Win32/Mingw32 +# +########################################################################### +# Copyright (c) J. Schilling +########################################################################### +# The contents of this file are subject to the terms of the +# Common Development and Distribution License, Version 1.0 only +# (the "License"). You may not use this file except in compliance +# with the License. +# +# See the file CDDL.Schily.txt in this distribution for details. +# A copy of the CDDL is also available via the Internet at +# http://www.opensource.org/licenses/cddl1.txt +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file CDDL.Schily.txt from this distribution. +########################################################################### +O_ARCH= mingw32_nt +-O_ARCH= -$(O_ARCH) diff -Nru cdrtools-2.01.01a33/RULES/os-mingw32_nt-6.2.id cdrtools-3.02a09/RULES/os-mingw32_nt-6.2.id --- cdrtools-2.01.01a33/RULES/os-mingw32_nt-6.2.id 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/RULES/os-mingw32_nt-6.2.id 2015-12-09 00:14:20.000000000 +0000 @@ -0,0 +1,22 @@ +#ident "@(#)os-mingw32_nt-6.2.id 1.1 15/12/09 " +########################################################################### +# +# OS specific MACRO definitions for Win32/Mingw32 +# +########################################################################### +# Copyright (c) J. Schilling +########################################################################### +# The contents of this file are subject to the terms of the +# Common Development and Distribution License, Version 1.0 only +# (the "License"). You may not use this file except in compliance +# with the License. +# +# See the file CDDL.Schily.txt in this distribution for details. +# A copy of the CDDL is also available via the Internet at +# http://www.opensource.org/licenses/cddl1.txt +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file CDDL.Schily.txt from this distribution. +########################################################################### +O_ARCH= mingw32_nt +-O_ARCH= -$(O_ARCH) diff -Nru cdrtools-2.01.01a33/RULES/os-mingw32_nt-6.3.id cdrtools-3.02a09/RULES/os-mingw32_nt-6.3.id --- cdrtools-2.01.01a33/RULES/os-mingw32_nt-6.3.id 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/RULES/os-mingw32_nt-6.3.id 2015-12-09 00:14:20.000000000 +0000 @@ -0,0 +1,22 @@ +#ident "@(#)os-mingw32_nt-6.3.id 1.1 15/12/09 " +########################################################################### +# +# OS specific MACRO definitions for Win32/Mingw32 +# +########################################################################### +# Copyright (c) J. Schilling +########################################################################### +# The contents of this file are subject to the terms of the +# Common Development and Distribution License, Version 1.0 only +# (the "License"). You may not use this file except in compliance +# with the License. +# +# See the file CDDL.Schily.txt in this distribution for details. +# A copy of the CDDL is also available via the Internet at +# http://www.opensource.org/licenses/cddl1.txt +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file CDDL.Schily.txt from this distribution. +########################################################################### +O_ARCH= mingw32_nt +-O_ARCH= -$(O_ARCH) diff -Nru cdrtools-2.01.01a33/RULES/os-mingw32_nt-6.4.id cdrtools-3.02a09/RULES/os-mingw32_nt-6.4.id --- cdrtools-2.01.01a33/RULES/os-mingw32_nt-6.4.id 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/RULES/os-mingw32_nt-6.4.id 2015-12-09 00:14:20.000000000 +0000 @@ -0,0 +1,22 @@ +#ident "@(#)os-mingw32_nt-6.4.id 1.1 15/12/09 " +########################################################################### +# +# OS specific MACRO definitions for Win32/Mingw32 +# +########################################################################### +# Copyright (c) J. Schilling +########################################################################### +# The contents of this file are subject to the terms of the +# Common Development and Distribution License, Version 1.0 only +# (the "License"). You may not use this file except in compliance +# with the License. +# +# See the file CDDL.Schily.txt in this distribution for details. +# A copy of the CDDL is also available via the Internet at +# http://www.opensource.org/licenses/cddl1.txt +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file CDDL.Schily.txt from this distribution. +########################################################################### +O_ARCH= mingw32_nt +-O_ARCH= -$(O_ARCH) diff -Nru cdrtools-2.01.01a33/RULES/os-mingw32_nt.def cdrtools-3.02a09/RULES/os-mingw32_nt.def --- cdrtools-2.01.01a33/RULES/os-mingw32_nt.def 2006-05-14 11:55:27.000000000 +0000 +++ cdrtools-3.02a09/RULES/os-mingw32_nt.def 2011-08-04 21:58:56.000000000 +0000 @@ -1,4 +1,4 @@ -#ident "@(#)os-mingw32_nt.def 1.2 06/05/14 " +#ident "@(#)os-mingw32_nt.def 1.3 11/08/04 " ########################################################################### # # Global os definitions for Win32/Mingw32 @@ -7,7 +7,7 @@ # Copyright (c) J. Schilling ########################################################################### # The contents of this file are subject to the terms of the -# Common Development and Distribution License, Version 1.0 only. +# Common Development and Distribution License, Version 1.0 only # (the "License"). You may not use this file except in compliance # with the License. # @@ -17,3 +17,9 @@ # file and include the License file CDDL.Schily.txt from this distribution. ########################################################################### MANSTYLE= bsd + +# +# Tell MKLINKS to run "test -h xxzzy.345 || symlink=cp +# +MKLINKS_TEST= test +export MKLINKS_TEST diff -Nru cdrtools-2.01.01a33/RULES/os-minix.def cdrtools-3.02a09/RULES/os-minix.def --- cdrtools-2.01.01a33/RULES/os-minix.def 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/RULES/os-minix.def 2015-11-08 12:19:44.000000000 +0000 @@ -0,0 +1,23 @@ +#ident "@(#)os-minix.def 1.1 15/11/08 " +########################################################################### +# Written 2015 by J. Schilling +########################################################################### +# +# Global os definitions for Minix +# +########################################################################### +# Copyright (c) J. Schilling +########################################################################### +# The contents of this file are subject to the terms of the +# Common Development and Distribution License, Version 1.0 only +# (the "License"). You may not use this file except in compliance +# with the License. +# +# See the file CDDL.Schily.txt in this distribution for details. +# A copy of the CDDL is also available via the Internet at +# http://www.opensource.org/licenses/cddl1.txt +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file CDDL.Schily.txt from this distribution. +########################################################################### +MANSTYLE= bsd diff -Nru cdrtools-2.01.01a33/RULES/os-minix.id cdrtools-3.02a09/RULES/os-minix.id --- cdrtools-2.01.01a33/RULES/os-minix.id 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/RULES/os-minix.id 2015-11-08 12:19:44.000000000 +0000 @@ -0,0 +1,24 @@ +#ident "@(#)os-minix.id 1.1 15/11/08 " +########################################################################### +# Written 2015 by J. Schilling +########################################################################### +# +# OS specific MACRO definitions for Minix +# +########################################################################### +# Copyright (c) J. Schilling +########################################################################### +# The contents of this file are subject to the terms of the +# Common Development and Distribution License, Version 1.0 only +# (the "License"). You may not use this file except in compliance +# with the License. +# +# See the file CDDL.Schily.txt in this distribution for details. +# A copy of the CDDL is also available via the Internet at +# http://www.opensource.org/licenses/cddl1.txt +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file CDDL.Schily.txt from this distribution. +########################################################################### +O_ARCH= minix +-O_ARCH= -$(O_ARCH) diff -Nru cdrtools-2.01.01a33/RULES/os-openunix.id cdrtools-3.02a09/RULES/os-openunix.id --- cdrtools-2.01.01a33/RULES/os-openunix.id 2006-05-14 11:55:28.000000000 +0000 +++ cdrtools-3.02a09/RULES/os-openunix.id 1970-01-01 00:00:00.000000000 +0000 @@ -1,22 +0,0 @@ -#ident "@(#)os-unixware.id 1.2 06/05/14 " -########################################################################### -# Written 2000 by J. Schilling/Santa Cruz Operation -########################################################################### -# -# OS specific MACRO definitions for UnixWare 7 -# -########################################################################### -# Copyright (c) J. Schilling -########################################################################### -# The contents of this file are subject to the terms of the -# Common Development and Distribution License, Version 1.0 only. -# (the "License"). You may not use this file except in compliance -# with the License. -# -# See the file CDDL.Schily.txt in this distribution for details. -# -# When distributing Covered Code, include this CDDL HEADER in each -# file and include the License file CDDL.Schily.txt from this distribution. -########################################################################### -O_ARCH= unixware --O_ARCH= -$(O_ARCH) diff -Nru cdrtools-2.01.01a33/RULES/os-openvms.def cdrtools-3.02a09/RULES/os-openvms.def --- cdrtools-2.01.01a33/RULES/os-openvms.def 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/RULES/os-openvms.def 2009-10-29 22:50:38.000000000 +0000 @@ -0,0 +1,21 @@ +#ident "@(#)os-openvms.def 1.1 09/10/29 " +########################################################################### +# Written 2009 by J. Schilling +########################################################################### +# +# Global definitions for OpenVMS +# +########################################################################### +# Copyright (c) J. Schilling +########################################################################### +# The contents of this file are subject to the terms of the +# Common Development and Distribution License, Version 1.0 only +# (the "License"). You may not use this file except in compliance +# with the License. +# +# See the file CDDL.Schily.txt in this distribution for details. +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file CDDL.Schily.txt from this distribution. +########################################################################### +MANSTYLE= bsd diff -Nru cdrtools-2.01.01a33/RULES/os-openvms.id cdrtools-3.02a09/RULES/os-openvms.id --- cdrtools-2.01.01a33/RULES/os-openvms.id 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/RULES/os-openvms.id 2009-10-29 22:50:38.000000000 +0000 @@ -0,0 +1,22 @@ +#ident "@(#)os-openvms.id 1.1 09/10/29 " +########################################################################### +# Written 2009 by J. Schilling +########################################################################### +# +# OS specific MACRO definitions for OpenVMS +# +########################################################################### +# Copyright (c) J. Schilling +########################################################################### +# The contents of this file are subject to the terms of the +# Common Development and Distribution License, Version 1.0 only +# (the "License"). You may not use this file except in compliance +# with the License. +# +# See the file CDDL.Schily.txt in this distribution for details. +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file CDDL.Schily.txt from this distribution. +########################################################################### +O_ARCH= openvms +-O_ARCH= -$(O_ARCH) diff -Nru cdrtools-2.01.01a33/RULES/os-pyro.def cdrtools-3.02a09/RULES/os-pyro.def --- cdrtools-2.01.01a33/RULES/os-pyro.def 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/RULES/os-pyro.def 2012-12-02 22:42:59.000000000 +0000 @@ -0,0 +1,21 @@ +#ident "@(#)os-pyro.def 1.1 12/12/02 " +########################################################################### +# Written 2009 by J. Schilling +########################################################################### +# +# Global os definitions for Pyro +# +########################################################################### +# Copyright (c) J. Schilling +########################################################################### +# The contents of this file are subject to the terms of the +# Common Development and Distribution License, Version 1.0 only +# (the "License"). You may not use this file except in compliance +# with the License. +# +# See the file CDDL.Schily.txt in this distribution for details. +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file CDDL.Schily.txt from this distribution. +########################################################################### +MANSTYLE= bsd diff -Nru cdrtools-2.01.01a33/RULES/os-pyro.id cdrtools-3.02a09/RULES/os-pyro.id --- cdrtools-2.01.01a33/RULES/os-pyro.id 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/RULES/os-pyro.id 2012-12-02 22:42:59.000000000 +0000 @@ -0,0 +1,22 @@ +#ident "@(#)os-pyro.id 1.1 12/12/02 " +########################################################################### +# Written 2009 by J. Schilling +########################################################################### +# +# OS specific MACRO definitions for Pyro +# +########################################################################### +# Copyright (c) J. Schilling +########################################################################### +# The contents of this file are subject to the terms of the +# Common Development and Distribution License, Version 1.0 only +# (the "License"). You may not use this file except in compliance +# with the License. +# +# See the file CDDL.Schily.txt in this distribution for details. +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file CDDL.Schily.txt from this distribution. +########################################################################### +O_ARCH= pyro +-O_ARCH= -$(O_ARCH) diff -Nru cdrtools-2.01.01a33/RULES/os-syllable.def cdrtools-3.02a09/RULES/os-syllable.def --- cdrtools-2.01.01a33/RULES/os-syllable.def 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/RULES/os-syllable.def 2009-02-01 12:10:49.000000000 +0000 @@ -0,0 +1,21 @@ +#ident "@(#)os-syllable.def 1.1 09/02/01 " +########################################################################### +# Written 2009 by J. Schilling +########################################################################### +# +# Global os definitions for Syllable +# +########################################################################### +# Copyright (c) J. Schilling +########################################################################### +# The contents of this file are subject to the terms of the +# Common Development and Distribution License, Version 1.0 only +# (the "License"). You may not use this file except in compliance +# with the License. +# +# See the file CDDL.Schily.txt in this distribution for details. +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file CDDL.Schily.txt from this distribution. +########################################################################### +MANSTYLE= bsd diff -Nru cdrtools-2.01.01a33/RULES/os-syllable.id cdrtools-3.02a09/RULES/os-syllable.id --- cdrtools-2.01.01a33/RULES/os-syllable.id 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/RULES/os-syllable.id 2009-02-01 12:10:49.000000000 +0000 @@ -0,0 +1,22 @@ +#ident "@(#)os-syllable.id 1.1 09/02/01 " +########################################################################### +# Written 2009 by J. Schilling +########################################################################### +# +# OS specific MACRO definitions for Syllable +# +########################################################################### +# Copyright (c) J. Schilling +########################################################################### +# The contents of this file are subject to the terms of the +# Common Development and Distribution License, Version 1.0 only +# (the "License"). You may not use this file except in compliance +# with the License. +# +# See the file CDDL.Schily.txt in this distribution for details. +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file CDDL.Schily.txt from this distribution. +########################################################################### +O_ARCH= syllable +-O_ARCH= -$(O_ARCH) diff -Nru cdrtools-2.01.01a33/RULES/parisc64-linux-cc.rul cdrtools-3.02a09/RULES/parisc64-linux-cc.rul --- cdrtools-2.01.01a33/RULES/parisc64-linux-cc.rul 2007-05-09 12:25:30.000000000 +0000 +++ cdrtools-3.02a09/RULES/parisc64-linux-cc.rul 1970-01-01 00:00:00.000000000 +0000 @@ -1,45 +0,0 @@ -#ident "@(#)i586-linux-cc.rul 1.11 07/05/09 " -########################################################################### -# Written 1996 by J. Schilling -########################################################################### -# -# Platform dependent MACROS for Linux -# -########################################################################### -# Copyright (c) J. Schilling -########################################################################### -# The contents of this file are subject to the terms of the -# Common Development and Distribution License, Version 1.0 only -# (the "License"). You may not use this file except in compliance -# with the License. -# -# See the file CDDL.Schily.txt in this distribution for details. -# -# When distributing Covered Code, include this CDDL HEADER in each -# file and include the License file CDDL.Schily.txt from this distribution. -########################################################################### -include $(SRCROOT)/$(RULESDIR)/rules.prg -########################################################################### -include $(SRCROOT)/$(RULESDIR)/cc-gcc.rul - -# -# LINUX_SRC_INCLUDE is defined in DEFAULTS/Defaults.linux -# -INCDIRSX += $(LINUX_SRC_INCLUDE) -OSDEFS += - -KDEFINES= -DKERNEL -D_KERNEL - -LIB_PREFIX= lib -LIB_SUFFIX= .a -SHL_SUFFIX= .so.1.0 - -LIB_SOCKET= -LIB_MATH= -lm -LIB_KVM= - -#LDOPTS= $(LIBS_PATH) $(LDPATH) $(RUNPATH:-R%=-Wl,-R%) -LDOPTS= $(LIBS_PATH) $(LDPATH) - -LORDER= echo -TSORT= cat diff -Nru cdrtools-2.01.01a33/RULES/parisc64-linux-gcc.rul cdrtools-3.02a09/RULES/parisc64-linux-gcc.rul --- cdrtools-2.01.01a33/RULES/parisc64-linux-gcc.rul 2007-05-09 12:25:30.000000000 +0000 +++ cdrtools-3.02a09/RULES/parisc64-linux-gcc.rul 1970-01-01 00:00:00.000000000 +0000 @@ -1,45 +0,0 @@ -#ident "@(#)i586-linux-gcc.rul 1.11 07/05/09 " -########################################################################### -# Written 1996 by J. Schilling -########################################################################### -# -# Platform dependent MACROS for Linux -# -########################################################################### -# Copyright (c) J. Schilling -########################################################################### -# The contents of this file are subject to the terms of the -# Common Development and Distribution License, Version 1.0 only -# (the "License"). You may not use this file except in compliance -# with the License. -# -# See the file CDDL.Schily.txt in this distribution for details. -# -# When distributing Covered Code, include this CDDL HEADER in each -# file and include the License file CDDL.Schily.txt from this distribution. -########################################################################### -include $(SRCROOT)/$(RULESDIR)/rules.prg -########################################################################### -include $(SRCROOT)/$(RULESDIR)/cc-gcc.rul - -# -# LINUX_SRC_INCLUDE is defined in DEFAULTS/Defaults.linux -# -INCDIRSX += $(LINUX_SRC_INCLUDE) -OSDEFS += - -KDEFINES= -DKERNEL -D_KERNEL - -LIB_PREFIX= lib -LIB_SUFFIX= .a -SHL_SUFFIX= .so.1.0 - -LIB_SOCKET= -LIB_MATH= -lm -LIB_KVM= - -#LDOPTS= $(LIBS_PATH) $(LDPATH) $(RUNPATH:-R%=-Wl,-R%) -LDOPTS= $(LIBS_PATH) $(LDPATH) - -LORDER= echo -TSORT= cat diff -Nru cdrtools-2.01.01a33/RULES/parisc-linux-cc.rul cdrtools-3.02a09/RULES/parisc-linux-cc.rul --- cdrtools-2.01.01a33/RULES/parisc-linux-cc.rul 2007-05-09 12:25:30.000000000 +0000 +++ cdrtools-3.02a09/RULES/parisc-linux-cc.rul 1970-01-01 00:00:00.000000000 +0000 @@ -1,45 +0,0 @@ -#ident "@(#)i586-linux-cc.rul 1.11 07/05/09 " -########################################################################### -# Written 1996 by J. Schilling -########################################################################### -# -# Platform dependent MACROS for Linux -# -########################################################################### -# Copyright (c) J. Schilling -########################################################################### -# The contents of this file are subject to the terms of the -# Common Development and Distribution License, Version 1.0 only -# (the "License"). You may not use this file except in compliance -# with the License. -# -# See the file CDDL.Schily.txt in this distribution for details. -# -# When distributing Covered Code, include this CDDL HEADER in each -# file and include the License file CDDL.Schily.txt from this distribution. -########################################################################### -include $(SRCROOT)/$(RULESDIR)/rules.prg -########################################################################### -include $(SRCROOT)/$(RULESDIR)/cc-gcc.rul - -# -# LINUX_SRC_INCLUDE is defined in DEFAULTS/Defaults.linux -# -INCDIRSX += $(LINUX_SRC_INCLUDE) -OSDEFS += - -KDEFINES= -DKERNEL -D_KERNEL - -LIB_PREFIX= lib -LIB_SUFFIX= .a -SHL_SUFFIX= .so.1.0 - -LIB_SOCKET= -LIB_MATH= -lm -LIB_KVM= - -#LDOPTS= $(LIBS_PATH) $(LDPATH) $(RUNPATH:-R%=-Wl,-R%) -LDOPTS= $(LIBS_PATH) $(LDPATH) - -LORDER= echo -TSORT= cat diff -Nru cdrtools-2.01.01a33/RULES/parisc-linux-gcc.rul cdrtools-3.02a09/RULES/parisc-linux-gcc.rul --- cdrtools-2.01.01a33/RULES/parisc-linux-gcc.rul 2007-05-09 12:25:30.000000000 +0000 +++ cdrtools-3.02a09/RULES/parisc-linux-gcc.rul 1970-01-01 00:00:00.000000000 +0000 @@ -1,45 +0,0 @@ -#ident "@(#)i586-linux-gcc.rul 1.11 07/05/09 " -########################################################################### -# Written 1996 by J. Schilling -########################################################################### -# -# Platform dependent MACROS for Linux -# -########################################################################### -# Copyright (c) J. Schilling -########################################################################### -# The contents of this file are subject to the terms of the -# Common Development and Distribution License, Version 1.0 only -# (the "License"). You may not use this file except in compliance -# with the License. -# -# See the file CDDL.Schily.txt in this distribution for details. -# -# When distributing Covered Code, include this CDDL HEADER in each -# file and include the License file CDDL.Schily.txt from this distribution. -########################################################################### -include $(SRCROOT)/$(RULESDIR)/rules.prg -########################################################################### -include $(SRCROOT)/$(RULESDIR)/cc-gcc.rul - -# -# LINUX_SRC_INCLUDE is defined in DEFAULTS/Defaults.linux -# -INCDIRSX += $(LINUX_SRC_INCLUDE) -OSDEFS += - -KDEFINES= -DKERNEL -D_KERNEL - -LIB_PREFIX= lib -LIB_SUFFIX= .a -SHL_SUFFIX= .so.1.0 - -LIB_SOCKET= -LIB_MATH= -lm -LIB_KVM= - -#LDOPTS= $(LIBS_PATH) $(LDPATH) $(RUNPATH:-R%=-Wl,-R%) -LDOPTS= $(LIBS_PATH) $(LDPATH) - -LORDER= echo -TSORT= cat diff -Nru cdrtools-2.01.01a33/RULES/pentium-4-unixware-cc.rul cdrtools-3.02a09/RULES/pentium-4-unixware-cc.rul --- cdrtools-2.01.01a33/RULES/pentium-4-unixware-cc.rul 2007-05-08 11:03:08.000000000 +0000 +++ cdrtools-3.02a09/RULES/pentium-4-unixware-cc.rul 1970-01-01 00:00:00.000000000 +0000 @@ -1,36 +0,0 @@ -#ident "@(#)i386-unixware-cc.rul 1.7 07/05/08 " -########################################################################### -# Written 1999 by J. Schilling/Santa Cruz Operation -########################################################################### -# -# Platform dependent MACROS for SCO UnixWare 2.x / 7.x using cc -# -########################################################################### -# Copyright (c) J. Schilling -########################################################################### -# The contents of this file are subject to the terms of the -# Common Development and Distribution License, Version 1.0 only -# (the "License"). You may not use this file except in compliance -# with the License. -# -# See the file CDDL.Schily.txt in this distribution for details. -# -# When distributing Covered Code, include this CDDL HEADER in each -# file and include the License file CDDL.Schily.txt from this distribution. -########################################################################### -include $(SRCROOT)/$(RULESDIR)/rules.prg -########################################################################### -include $(SRCROOT)/$(RULESDIR)/cc-sco_uw.rul - -OSDEFS += -DUNIXWARE -DSVR4 - -KDEFINES= -DKERNEL -D_KERNEL - -LIB_SOCKET= -lsocket -lnsl -ldl -LIB_MATH= -lm -#LIB_KVM= -lkvm -LIB_KVM= - -ARFLAGS= cr -LORDER= echo -TSORT= cat diff -Nru cdrtools-2.01.01a33/RULES/pentium-4-unixware-gcc.rul cdrtools-3.02a09/RULES/pentium-4-unixware-gcc.rul --- cdrtools-2.01.01a33/RULES/pentium-4-unixware-gcc.rul 2007-05-08 11:03:08.000000000 +0000 +++ cdrtools-3.02a09/RULES/pentium-4-unixware-gcc.rul 1970-01-01 00:00:00.000000000 +0000 @@ -1,41 +0,0 @@ -#ident "@(#)i386-unixware-gcc.rul 1.6 07/05/08 " -########################################################################### -# Written 1999 by J. Schilling/Santa Cruz Operation -########################################################################### -# -# Platform dependent MACROS for SCO UnixWare 2.x / 7.x using gcc -# -########################################################################### -# Copyright (c) J. Schilling -########################################################################### -# The contents of this file are subject to the terms of the -# Common Development and Distribution License, Version 1.0 only -# (the "License"). You may not use this file except in compliance -# with the License. -# -# See the file CDDL.Schily.txt in this distribution for details. -# -# When distributing Covered Code, include this CDDL HEADER in each -# file and include the License file CDDL.Schily.txt from this distribution. -########################################################################### -include $(SRCROOT)/$(RULESDIR)/rules.prg -########################################################################### -include $(SRCROOT)/$(RULESDIR)/cc-gcc.rul - -OSDEFS += -DUNIXWARE -DSVR4 - -KDEFINES= -DKERNEL -D_KERNEL - -LIB_PREFIX= lib -LIB_SUFFIX= .a -SHL_SUFFIX= .so.1.0 - -LIB_SOCKET= -lsocket -lnsl -ldl -LIB_MATH= -lm -LIB_KVM= - -LDOPTS= $(LIBS_PATH) $(LDPATH) -LDOPTDYN= -dy -G $(TARGET) - -LORDER= echo -TSORT= cat diff -Nru cdrtools-2.01.01a33/RULES/pentium-iii-unixware-cc.rul cdrtools-3.02a09/RULES/pentium-iii-unixware-cc.rul --- cdrtools-2.01.01a33/RULES/pentium-iii-unixware-cc.rul 2007-05-08 11:03:08.000000000 +0000 +++ cdrtools-3.02a09/RULES/pentium-iii-unixware-cc.rul 1970-01-01 00:00:00.000000000 +0000 @@ -1,36 +0,0 @@ -#ident "@(#)i386-unixware-cc.rul 1.7 07/05/08 " -########################################################################### -# Written 1999 by J. Schilling/Santa Cruz Operation -########################################################################### -# -# Platform dependent MACROS for SCO UnixWare 2.x / 7.x using cc -# -########################################################################### -# Copyright (c) J. Schilling -########################################################################### -# The contents of this file are subject to the terms of the -# Common Development and Distribution License, Version 1.0 only -# (the "License"). You may not use this file except in compliance -# with the License. -# -# See the file CDDL.Schily.txt in this distribution for details. -# -# When distributing Covered Code, include this CDDL HEADER in each -# file and include the License file CDDL.Schily.txt from this distribution. -########################################################################### -include $(SRCROOT)/$(RULESDIR)/rules.prg -########################################################################### -include $(SRCROOT)/$(RULESDIR)/cc-sco_uw.rul - -OSDEFS += -DUNIXWARE -DSVR4 - -KDEFINES= -DKERNEL -D_KERNEL - -LIB_SOCKET= -lsocket -lnsl -ldl -LIB_MATH= -lm -#LIB_KVM= -lkvm -LIB_KVM= - -ARFLAGS= cr -LORDER= echo -TSORT= cat diff -Nru cdrtools-2.01.01a33/RULES/pentium-iii-unixware-gcc.rul cdrtools-3.02a09/RULES/pentium-iii-unixware-gcc.rul --- cdrtools-2.01.01a33/RULES/pentium-iii-unixware-gcc.rul 2007-05-08 11:03:08.000000000 +0000 +++ cdrtools-3.02a09/RULES/pentium-iii-unixware-gcc.rul 1970-01-01 00:00:00.000000000 +0000 @@ -1,41 +0,0 @@ -#ident "@(#)i386-unixware-gcc.rul 1.6 07/05/08 " -########################################################################### -# Written 1999 by J. Schilling/Santa Cruz Operation -########################################################################### -# -# Platform dependent MACROS for SCO UnixWare 2.x / 7.x using gcc -# -########################################################################### -# Copyright (c) J. Schilling -########################################################################### -# The contents of this file are subject to the terms of the -# Common Development and Distribution License, Version 1.0 only -# (the "License"). You may not use this file except in compliance -# with the License. -# -# See the file CDDL.Schily.txt in this distribution for details. -# -# When distributing Covered Code, include this CDDL HEADER in each -# file and include the License file CDDL.Schily.txt from this distribution. -########################################################################### -include $(SRCROOT)/$(RULESDIR)/rules.prg -########################################################################### -include $(SRCROOT)/$(RULESDIR)/cc-gcc.rul - -OSDEFS += -DUNIXWARE -DSVR4 - -KDEFINES= -DKERNEL -D_KERNEL - -LIB_PREFIX= lib -LIB_SUFFIX= .a -SHL_SUFFIX= .so.1.0 - -LIB_SOCKET= -lsocket -lnsl -ldl -LIB_MATH= -lm -LIB_KVM= - -LDOPTS= $(LIBS_PATH) $(LDPATH) -LDOPTDYN= -dy -G $(TARGET) - -LORDER= echo -TSORT= cat diff -Nru cdrtools-2.01.01a33/RULES/pentium-pro-unixware-cc.rul cdrtools-3.02a09/RULES/pentium-pro-unixware-cc.rul --- cdrtools-2.01.01a33/RULES/pentium-pro-unixware-cc.rul 2007-05-08 11:03:08.000000000 +0000 +++ cdrtools-3.02a09/RULES/pentium-pro-unixware-cc.rul 1970-01-01 00:00:00.000000000 +0000 @@ -1,36 +0,0 @@ -#ident "@(#)i386-unixware-cc.rul 1.7 07/05/08 " -########################################################################### -# Written 1999 by J. Schilling/Santa Cruz Operation -########################################################################### -# -# Platform dependent MACROS for SCO UnixWare 2.x / 7.x using cc -# -########################################################################### -# Copyright (c) J. Schilling -########################################################################### -# The contents of this file are subject to the terms of the -# Common Development and Distribution License, Version 1.0 only -# (the "License"). You may not use this file except in compliance -# with the License. -# -# See the file CDDL.Schily.txt in this distribution for details. -# -# When distributing Covered Code, include this CDDL HEADER in each -# file and include the License file CDDL.Schily.txt from this distribution. -########################################################################### -include $(SRCROOT)/$(RULESDIR)/rules.prg -########################################################################### -include $(SRCROOT)/$(RULESDIR)/cc-sco_uw.rul - -OSDEFS += -DUNIXWARE -DSVR4 - -KDEFINES= -DKERNEL -D_KERNEL - -LIB_SOCKET= -lsocket -lnsl -ldl -LIB_MATH= -lm -#LIB_KVM= -lkvm -LIB_KVM= - -ARFLAGS= cr -LORDER= echo -TSORT= cat diff -Nru cdrtools-2.01.01a33/RULES/pentium-pro-unixware-gcc.rul cdrtools-3.02a09/RULES/pentium-pro-unixware-gcc.rul --- cdrtools-2.01.01a33/RULES/pentium-pro-unixware-gcc.rul 2007-05-08 11:03:08.000000000 +0000 +++ cdrtools-3.02a09/RULES/pentium-pro-unixware-gcc.rul 1970-01-01 00:00:00.000000000 +0000 @@ -1,41 +0,0 @@ -#ident "@(#)i386-unixware-gcc.rul 1.6 07/05/08 " -########################################################################### -# Written 1999 by J. Schilling/Santa Cruz Operation -########################################################################### -# -# Platform dependent MACROS for SCO UnixWare 2.x / 7.x using gcc -# -########################################################################### -# Copyright (c) J. Schilling -########################################################################### -# The contents of this file are subject to the terms of the -# Common Development and Distribution License, Version 1.0 only -# (the "License"). You may not use this file except in compliance -# with the License. -# -# See the file CDDL.Schily.txt in this distribution for details. -# -# When distributing Covered Code, include this CDDL HEADER in each -# file and include the License file CDDL.Schily.txt from this distribution. -########################################################################### -include $(SRCROOT)/$(RULESDIR)/rules.prg -########################################################################### -include $(SRCROOT)/$(RULESDIR)/cc-gcc.rul - -OSDEFS += -DUNIXWARE -DSVR4 - -KDEFINES= -DKERNEL -D_KERNEL - -LIB_PREFIX= lib -LIB_SUFFIX= .a -SHL_SUFFIX= .so.1.0 - -LIB_SOCKET= -lsocket -lnsl -ldl -LIB_MATH= -lm -LIB_KVM= - -LDOPTS= $(LIBS_PATH) $(LDPATH) -LDOPTDYN= -dy -G $(TARGET) - -LORDER= echo -TSORT= cat diff -Nru cdrtools-2.01.01a33/RULES/power-macintosh-darwin-cc.rul cdrtools-3.02a09/RULES/power-macintosh-darwin-cc.rul --- cdrtools-2.01.01a33/RULES/power-macintosh-darwin-cc.rul 2007-05-09 12:25:30.000000000 +0000 +++ cdrtools-3.02a09/RULES/power-macintosh-darwin-cc.rul 2014-04-02 09:40:13.000000000 +0000 @@ -1,6 +1,6 @@ -#ident "@(#)power-macintosh-darwin-cc.rul 1.13 07/05/09 " +#ident "@(#)power-macintosh-darwin-cc.rul 1.21 14/04/02 " ########################################################################### -# Written 1996 by J. Schilling +# Written 1996-2014 by J. Schilling ########################################################################### # # Platform dependent MACROS for Darwin-1.2 ff. (Apple MacOS X) PPC (GCC) @@ -14,19 +14,23 @@ # with the License. # # See the file CDDL.Schily.txt in this distribution for details. +# A copy of the CDDL is also available via the Internet at +# http://www.opensource.org/licenses/cddl1.txt # # When distributing Covered Code, include this CDDL HEADER in each # file and include the License file CDDL.Schily.txt from this distribution. ########################################################################### include $(SRCROOT)/$(RULESDIR)/rules.prg ########################################################################### -include $(SRCROOT)/$(RULESDIR)/cc-gcc.rul +include $(SRCROOT)/$(RULESDIR)/cc-$(C_ARCH:cc%=gcc%).rul +CC_COM_DEF= cc OSDEFS += KDEFINES= -DKERNEL -D_KERNEL COPTDYN= -fPIC +C++OPTDYN= -fPIC LIB_PREFIX= lib LIB_SUFFIX= .a @@ -37,12 +41,14 @@ LIB_KVM= #LDOPTS= $(LIBS_PATH) $(LDPATH) $(RUNPATH:-R%=-Wl,-R%) -LDOPTS= $(LIBS_PATH) $(LDPATH) -framework IOKit -framework CoreFoundation -LDOPTDYN= -install_name $(INS_BASE)/lib/$(TARGET) -LDLIBDYN= -lgcc +LDFRAMEWORKS= -framework IOKit -framework CoreFoundation +LDOPTS= $(LIBS_PATH) $(LDPATH) $(LDFRAMEWORKS) +LDOPTDYN= -install_name $(INSBASE)/lib/$(TARGET) +LDLIBDYN= -lgcc_s.1 LNDYNLIB= @ DYNLD= @echo " ==> LINKING dynamic library \"$@\""; libtool -dynamic +DYNLDC++ = @echo " ==> LINKING dynamic library \"$@\""; libtool -dynamic RANLIB= @echo " ==> RANDOMIZING ARCHIVE \"$@\""; ranlib # @@ -56,10 +62,3 @@ # LORDER= echo TSORT= cat - -#### -# XXX Better use something like CC=cc -#### -CC= @echo " ==> COMPILING \"$@\""; cc -LDCC= @echo " ==> LINKING \"$@\""; cc -MKDEP= @echo " ==> MAKING DEPENDENCIES \"$@\""; $(RMDEP); cc -M diff -Nru cdrtools-2.01.01a33/RULES/power-macintosh-darwin-gcc.rul cdrtools-3.02a09/RULES/power-macintosh-darwin-gcc.rul --- cdrtools-2.01.01a33/RULES/power-macintosh-darwin-gcc.rul 2007-05-09 12:25:30.000000000 +0000 +++ cdrtools-3.02a09/RULES/power-macintosh-darwin-gcc.rul 2014-04-02 09:40:13.000000000 +0000 @@ -1,6 +1,6 @@ -#ident "@(#)power-macintosh-darwin-gcc.rul 1.13 07/05/09 " +#ident "@(#)power-macintosh-darwin-gcc.rul 1.19 14/04/02 " ########################################################################### -# Written 1996 by J. Schilling +# Written 1996-2014 by J. Schilling ########################################################################### # # Platform dependent MACROS for Darwin-1.2 ff. (Apple MacOS X) PPC (GCC) @@ -14,19 +14,22 @@ # with the License. # # See the file CDDL.Schily.txt in this distribution for details. +# A copy of the CDDL is also available via the Internet at +# http://www.opensource.org/licenses/cddl1.txt # # When distributing Covered Code, include this CDDL HEADER in each # file and include the License file CDDL.Schily.txt from this distribution. ########################################################################### include $(SRCROOT)/$(RULESDIR)/rules.prg ########################################################################### -include $(SRCROOT)/$(RULESDIR)/cc-gcc.rul +include $(SRCROOT)/$(RULESDIR)/cc-$(C_ARCH).rul OSDEFS += KDEFINES= -DKERNEL -D_KERNEL COPTDYN= -fPIC +C++OPTDYN= -fPIC LIB_PREFIX= lib LIB_SUFFIX= .a @@ -37,12 +40,14 @@ LIB_KVM= #LDOPTS= $(LIBS_PATH) $(LDPATH) $(RUNPATH:-R%=-Wl,-R%) -LDOPTS= $(LIBS_PATH) $(LDPATH) -framework IOKit -framework CoreFoundation -LDOPTDYN= -install_name $(INS_BASE)/lib/$(TARGET) -LDLIBDYN= -lgcc +LDFRAMEWORKS= -framework IOKit -framework CoreFoundation +LDOPTS= $(LIBS_PATH) $(LDPATH) $(LDFRAMEWORKS) +LDOPTDYN= -install_name $(INSBASE)/lib/$(TARGET) +LDLIBDYN= -lgcc_s.1 LNDYNLIB= @ DYNLD= @echo " ==> LINKING dynamic library \"$@\""; libtool -dynamic +DYNLDC++ = @echo " ==> LINKING dynamic library \"$@\""; libtool -dynamic RANLIB= @echo " ==> RANDOMIZING ARCHIVE \"$@\""; ranlib # diff -Nru cdrtools-2.01.01a33/RULES/power-macintosh-mac-os10-cc.rul cdrtools-3.02a09/RULES/power-macintosh-mac-os10-cc.rul --- cdrtools-2.01.01a33/RULES/power-macintosh-mac-os10-cc.rul 2007-05-09 12:25:30.000000000 +0000 +++ cdrtools-3.02a09/RULES/power-macintosh-mac-os10-cc.rul 1970-01-01 00:00:00.000000000 +0000 @@ -1,62 +0,0 @@ -#ident "@(#)power-macintosh-rhapsody-cc.rul 1.11 07/05/09 " -########################################################################### -# Written 1996 by J. Schilling -########################################################################### -# -# Platform dependent MACROS for NeXT Step 4.x (Apple Rhapsody) PPC (GCC) -# -########################################################################### -# Copyright (c) J. Schilling -########################################################################### -# The contents of this file are subject to the terms of the -# Common Development and Distribution License, Version 1.0 only -# (the "License"). You may not use this file except in compliance -# with the License. -# -# See the file CDDL.Schily.txt in this distribution for details. -# -# When distributing Covered Code, include this CDDL HEADER in each -# file and include the License file CDDL.Schily.txt from this distribution. -########################################################################### -include $(SRCROOT)/$(RULESDIR)/rules.prg -########################################################################### -include $(SRCROOT)/$(RULESDIR)/cc-gcc.rul - -OSDEFS += - -KDEFINES= -DKERNEL -D_KERNEL - -LIB_PREFIX= lib -LIB_SUFFIX= .a -SHL_SUFFIX= .so.1.0 - -LIB_SOCKET= -LIB_MATH= -lm -LIB_KVM= - -#LDOPTS= $(LIBS_PATH) $(LDPATH) $(RUNPATH:-R%=-Wl,-R%) -LDOPTS= $(LIBS_PATH) $(LDPATH) -LDOPTDYN= -LNDYNLIB= @ - -DYNLD= @echo " ==> LINKING dynamic library \"$@\""; ld -RANLIB= @echo " ==> RANDOMIZING ARCHIVE \"$@\""; ranlib - -# -# lorder seems not to work on some versions because Apple installed -# a broken /bin/sh that is not POSIX cimpliant an will not -# be able to run the /usr/bin/lorder script. The error messages are: -# type: not found -# type: not found -# lorder: nm: not found -# ... disable it -# -LORDER= echo -TSORT= cat - -#### -# XXX Better use something like CC=cc -#### -CC= @echo " ==> COMPILING \"$@\""; cc -LDCC= @echo " ==> LINKING \"$@\""; cc -MKDEP= @echo " ==> MAKING DEPENDENCIES \"$@\""; $(RMDEP); cc -M diff -Nru cdrtools-2.01.01a33/RULES/power-macintosh-mac-os10-gcc.rul cdrtools-3.02a09/RULES/power-macintosh-mac-os10-gcc.rul --- cdrtools-2.01.01a33/RULES/power-macintosh-mac-os10-gcc.rul 2007-05-09 12:25:30.000000000 +0000 +++ cdrtools-3.02a09/RULES/power-macintosh-mac-os10-gcc.rul 1970-01-01 00:00:00.000000000 +0000 @@ -1,55 +0,0 @@ -#ident "@(#)power-macintosh-rhapsody-gcc.rul 1.11 07/05/09 " -########################################################################### -# Written 1996 by J. Schilling -########################################################################### -# -# Platform dependent MACROS for NeXT Step 4.x (Apple Rhapsody) PPC (GCC) -# -########################################################################### -# Copyright (c) J. Schilling -########################################################################### -# The contents of this file are subject to the terms of the -# Common Development and Distribution License, Version 1.0 only -# (the "License"). You may not use this file except in compliance -# with the License. -# -# See the file CDDL.Schily.txt in this distribution for details. -# -# When distributing Covered Code, include this CDDL HEADER in each -# file and include the License file CDDL.Schily.txt from this distribution. -########################################################################### -include $(SRCROOT)/$(RULESDIR)/rules.prg -########################################################################### -include $(SRCROOT)/$(RULESDIR)/cc-gcc.rul - -OSDEFS += - -KDEFINES= -DKERNEL -D_KERNEL - -LIB_PREFIX= lib -LIB_SUFFIX= .a -SHL_SUFFIX= .so.1.0 - -LIB_SOCKET= -LIB_MATH= -lm -LIB_KVM= - -#LDOPTS= $(LIBS_PATH) $(LDPATH) $(RUNPATH:-R%=-Wl,-R%) -LDOPTS= $(LIBS_PATH) $(LDPATH) -LDOPTDYN= -LNDYNLIB= @ - -DYNLD= @echo " ==> LINKING dynamic library \"$@\""; ld -RANLIB= @echo " ==> RANDOMIZING ARCHIVE \"$@\""; ranlib - -# -# lorder seems not to work on some versions because Apple installed -# a broken /bin/sh that is not POSIX cimpliant an will not -# be able to run the /usr/bin/lorder script. The error messages are: -# type: not found -# type: not found -# lorder: nm: not found -# ... disable it -# -LORDER= echo -TSORT= cat diff -Nru cdrtools-2.01.01a33/RULES/power-macintosh-rhapsody-cc.rul cdrtools-3.02a09/RULES/power-macintosh-rhapsody-cc.rul --- cdrtools-2.01.01a33/RULES/power-macintosh-rhapsody-cc.rul 2007-05-09 12:25:30.000000000 +0000 +++ cdrtools-3.02a09/RULES/power-macintosh-rhapsody-cc.rul 2013-07-22 21:27:11.000000000 +0000 @@ -1,6 +1,6 @@ -#ident "@(#)power-macintosh-rhapsody-cc.rul 1.11 07/05/09 " +#ident "@(#)power-macintosh-rhapsody-cc.rul 1.13 13/07/22 " ########################################################################### -# Written 1996 by J. Schilling +# Written 1996-2013 by J. Schilling ########################################################################### # # Platform dependent MACROS for NeXT Step 4.x (Apple Rhapsody) PPC (GCC) @@ -14,6 +14,8 @@ # with the License. # # See the file CDDL.Schily.txt in this distribution for details. +# A copy of the CDDL is also available via the Internet at +# http://www.opensource.org/licenses/cddl1.txt # # When distributing Covered Code, include this CDDL HEADER in each # file and include the License file CDDL.Schily.txt from this distribution. @@ -21,6 +23,7 @@ include $(SRCROOT)/$(RULESDIR)/rules.prg ########################################################################### include $(SRCROOT)/$(RULESDIR)/cc-gcc.rul +CC_COM_DEF= cc OSDEFS += @@ -53,10 +56,3 @@ # LORDER= echo TSORT= cat - -#### -# XXX Better use something like CC=cc -#### -CC= @echo " ==> COMPILING \"$@\""; cc -LDCC= @echo " ==> LINKING \"$@\""; cc -MKDEP= @echo " ==> MAKING DEPENDENCIES \"$@\""; $(RMDEP); cc -M diff -Nru cdrtools-2.01.01a33/RULES/powerpc-beos-mwcc.rul cdrtools-3.02a09/RULES/powerpc-beos-mwcc.rul --- cdrtools-2.01.01a33/RULES/powerpc-beos-mwcc.rul 2007-05-08 11:07:58.000000000 +0000 +++ cdrtools-3.02a09/RULES/powerpc-beos-mwcc.rul 2013-11-04 20:24:57.000000000 +0000 @@ -1,4 +1,4 @@ -#ident "@(#)powerpc-beos-mwcc.rul 1.10 07/05/08 " +#ident "@(#)powerpc-beos-mwcc.rul 1.11 13/11/04 " ########################################################################### # Written 1996 by J. Schilling ########################################################################### @@ -14,6 +14,8 @@ # with the License. # # See the file CDDL.Schily.txt in this distribution for details. +# A copy of the CDDL is also available via the Internet at +# http://www.opensource.org/licenses/cddl1.txt # # When distributing Covered Code, include this CDDL HEADER in each # file and include the License file CDDL.Schily.txt from this distribution. @@ -24,7 +26,7 @@ OSDEFS += -CPPOPTS= -relax_pointers -opt global -sym on -g -i- -I$(ARCHDIR) -I$(OINCSDIR) $(INCDIRS:%=-I%) $(INCDIRSX:%=-I%) $(OSDEFS) +CPPOPTS= -relax_pointers -opt global -sym on -g -i- -I$(ARCHDIR) -I$(OINCSDIR) $(INCDIRS:%=-I%) $(INCDIRSX:%=-I%) KDEFINES= -DKERNEL -D_KERNEL diff -Nru cdrtools-2.01.01a33/RULES/ppc-linux-cc.rul cdrtools-3.02a09/RULES/ppc-linux-cc.rul --- cdrtools-2.01.01a33/RULES/ppc-linux-cc.rul 2007-05-09 12:25:30.000000000 +0000 +++ cdrtools-3.02a09/RULES/ppc-linux-cc.rul 1970-01-01 00:00:00.000000000 +0000 @@ -1,45 +0,0 @@ -#ident "@(#)i586-linux-cc.rul 1.11 07/05/09 " -########################################################################### -# Written 1996 by J. Schilling -########################################################################### -# -# Platform dependent MACROS for Linux -# -########################################################################### -# Copyright (c) J. Schilling -########################################################################### -# The contents of this file are subject to the terms of the -# Common Development and Distribution License, Version 1.0 only -# (the "License"). You may not use this file except in compliance -# with the License. -# -# See the file CDDL.Schily.txt in this distribution for details. -# -# When distributing Covered Code, include this CDDL HEADER in each -# file and include the License file CDDL.Schily.txt from this distribution. -########################################################################### -include $(SRCROOT)/$(RULESDIR)/rules.prg -########################################################################### -include $(SRCROOT)/$(RULESDIR)/cc-gcc.rul - -# -# LINUX_SRC_INCLUDE is defined in DEFAULTS/Defaults.linux -# -INCDIRSX += $(LINUX_SRC_INCLUDE) -OSDEFS += - -KDEFINES= -DKERNEL -D_KERNEL - -LIB_PREFIX= lib -LIB_SUFFIX= .a -SHL_SUFFIX= .so.1.0 - -LIB_SOCKET= -LIB_MATH= -lm -LIB_KVM= - -#LDOPTS= $(LIBS_PATH) $(LDPATH) $(RUNPATH:-R%=-Wl,-R%) -LDOPTS= $(LIBS_PATH) $(LDPATH) - -LORDER= echo -TSORT= cat diff -Nru cdrtools-2.01.01a33/RULES/ppc-linux-gcc.rul cdrtools-3.02a09/RULES/ppc-linux-gcc.rul --- cdrtools-2.01.01a33/RULES/ppc-linux-gcc.rul 2007-05-09 12:25:30.000000000 +0000 +++ cdrtools-3.02a09/RULES/ppc-linux-gcc.rul 1970-01-01 00:00:00.000000000 +0000 @@ -1,45 +0,0 @@ -#ident "@(#)i586-linux-gcc.rul 1.11 07/05/09 " -########################################################################### -# Written 1996 by J. Schilling -########################################################################### -# -# Platform dependent MACROS for Linux -# -########################################################################### -# Copyright (c) J. Schilling -########################################################################### -# The contents of this file are subject to the terms of the -# Common Development and Distribution License, Version 1.0 only -# (the "License"). You may not use this file except in compliance -# with the License. -# -# See the file CDDL.Schily.txt in this distribution for details. -# -# When distributing Covered Code, include this CDDL HEADER in each -# file and include the License file CDDL.Schily.txt from this distribution. -########################################################################### -include $(SRCROOT)/$(RULESDIR)/rules.prg -########################################################################### -include $(SRCROOT)/$(RULESDIR)/cc-gcc.rul - -# -# LINUX_SRC_INCLUDE is defined in DEFAULTS/Defaults.linux -# -INCDIRSX += $(LINUX_SRC_INCLUDE) -OSDEFS += - -KDEFINES= -DKERNEL -D_KERNEL - -LIB_PREFIX= lib -LIB_SUFFIX= .a -SHL_SUFFIX= .so.1.0 - -LIB_SOCKET= -LIB_MATH= -lm -LIB_KVM= - -#LDOPTS= $(LIBS_PATH) $(LDPATH) $(RUNPATH:-R%=-Wl,-R%) -LDOPTS= $(LIBS_PATH) $(LDPATH) - -LORDER= echo -TSORT= cat diff -Nru cdrtools-2.01.01a33/RULES/profiled.lnk cdrtools-3.02a09/RULES/profiled.lnk --- cdrtools-2.01.01a33/RULES/profiled.lnk 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/RULES/profiled.lnk 2007-06-29 09:17:31.000000000 +0000 @@ -0,0 +1,22 @@ +#ident "@(#)profiled.lnk 1.1 07/06/29 " +########################################################################### +# Written 2006 by J. Schilling +########################################################################### +# +# Rules for commands that are links statically against internal libs +# +########################################################################### +# Copyright (c) J. Schilling +########################################################################### +# The contents of this file are subject to the terms of the +# Common Development and Distribution License, Version 1.0 only +# (the "License"). You may not use this file except in compliance +# with the License. +# +# See the file CDDL.Schily.txt in this distribution for details. +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file CDDL.Schily.txt from this distribution. +########################################################################### +SHLDIR= /profiled +NO_SHL= no diff -Nru cdrtools-2.01.01a33/RULES/r-build.dep cdrtools-3.02a09/RULES/r-build.dep --- cdrtools-2.01.01a33/RULES/r-build.dep 2006-07-31 12:38:02.000000000 +0000 +++ cdrtools-3.02a09/RULES/r-build.dep 1970-01-01 00:00:00.000000000 +0000 @@ -1,89 +0,0 @@ -#ident "@(#)r-smake.dep 1.12 06/07/31 " -########################################################################### -# Written 1996 by J. Schilling -########################################################################### -# -# Dependency building rules for smake -# -########################################################################### -# Copyright (c) J. Schilling -########################################################################### -# The contents of this file are subject to the terms of the -# Common Development and Distribution License, Version 1.0 only -# (the "License"). You may not use this file except in compliance -# with the License. -# -# See the file CDDL.Schily.txt in this distribution for details. -# -# When distributing Covered Code, include this CDDL HEADER in each -# file and include the License file CDDL.Schily.txt from this distribution. -########################################################################### -DEP_SUFFIX= .d -RMDEP= $(RM) $(RM_FORCE) $(ARCHDIR)/$@ -___C++DEP_FILES= $(C++FILES:%.C=%.d) -__C++DEP_FILES= $(___C++DEP_FILES:%.cc=%.d) -_C++DEP_FILES= $(__C++DEP_FILES:%.cpp=%.d) -C++DEP_FILES= $(_C++DEP_FILES:%.cxx=%.d) -C++PDEP_FILES= $(C++DEP_FILES:%=$(ARCHDIR)/%) -DEP_FILE= $(CFILES:%.c=%.d) $(C++DEP_FILES) -PDEP_FILE= $(CFILES:%.c=$(ARCHDIR)/%.d) $(C++PDEP_FILES) -PALLDEP_FILE= $(CFILES:%.c=$(ARCHDIR)/%.d) $(C++PDEP_FILES) $(ARCHDIR)/$(TARGET).dep -########################################################################### -depend: rmdep $(DEP_FILE) - -rmdep: - $(RM) $(RM_FORCE) $(PALLDEP_FILE) - -########################################################################### -# -# Make the complete path to the architecture subdirectory. -# -########################################################################### -$(ARCHDIR): - $(MKDIR) -p $@ - -########################################################################### -# -# Generate dependency file(s). -# This rules is checked when the dependency file(s) are included. -# -# Modify the the path for .o files to reflect that they are placed in -# $(ARCHDIR). Add the dependency file itself to each line so that -# the dependencies will be rebuilt if a source is newer that the -# appropriate dependency file. -# -########################################################################### -.d: .c - $(MKDEP) $(CPPFLAGS) $(MKDEP_OUT) $< \ - | sed -e 's;^\(.*\)\.$o[ ]*:;\1.$o \1.d:;' > $(ARCHDIR)/$@ - -%.d: %.c - $(MKDEP) $(CPPFLAGS) $(MKDEP_OUT) $< \ - | sed -e 's;^\(.*\)\.$o[ ]*:;\1.$o \1.d:;' > $(ARCHDIR)/$@ - -%.d: %.C - $(MKC++DEP) $(CPPFLAGS) $(MKC++DEP_OUT) $< \ - | sed -e 's;^\(.*\)\.$o[ ]*:;\1.$o \1.d:;' > $(ARCHDIR)/$@ -%.d: %.cc - $(MKC++DEP) $(CPPFLAGS) $(MKC++DEP_OUT) $< \ - | sed -e 's;^\(.*\)\.$o[ ]*:;\1.$o \1.d:;' > $(ARCHDIR)/$@ -%.d: %.cpp - $(MKC++DEP) $(CPPFLAGS) $(MKC++DEP_OUT) $< \ - | sed -e 's;^\(.*\)\.$o[ ]*:;\1.$o \1.d:;' > $(ARCHDIR)/$@ -%.d: %.cxx - $(MKC++DEP) $(CPPFLAGS) $(MKC++DEP_OUT) $< \ - | sed -e 's;^\(.*\)\.$o[ ]*:;\1.$o \1.d:;' > $(ARCHDIR)/$@ - -Dnull: $(ARCHDIR) - @echo > $O/$@ - -#$(DEP_FILE): -# $(MKDEP) $(CPPFLAGS) -f - $(CFILES) \ -# | sed -e 's;^\(.*\.$o[ ]*:\);$(ARCHDIR)/\1;' > $@ - -########################################################################### -# -# Include the dependency file(s) generated from the rules above. -# -########################################################################### --include Dnull $(DEP_FILE) diff -Nru cdrtools-2.01.01a33/RULES/r-build.obj cdrtools-3.02a09/RULES/r-build.obj --- cdrtools-2.01.01a33/RULES/r-build.obj 2007-04-27 09:34:00.000000000 +0000 +++ cdrtools-3.02a09/RULES/r-build.obj 1970-01-01 00:00:00.000000000 +0000 @@ -1,62 +0,0 @@ -#ident @(#)r-smake.obj 1.9 07/04/27 -########################################################################### -# Written 1996 by J. Schilling -########################################################################### -# -# Object building rules for smake -# -########################################################################### -# Copyright (c) J. Schilling -########################################################################### -# The contents of this file are subject to the terms of the -# Common Development and Distribution License, Version 1.0 only -# (the "License"). You may not use this file except in compliance -# with the License. -# -# See the file CDDL.Schily.txt in this distribution for details. -# -# When distributing Covered Code, include this CDDL HEADER in each -# file and include the License file CDDL.Schily.txt from this distribution. -########################################################################### -# This defines a rule that compiles source files from current directory and -# puts the resultant objects directly into $(ARCHDIR), -# to allow concurrent compilation on different platforms. -# Object file names are constructed from $(CFILES) and $(C++FILES). -########################################################################### -ARCHDIRX= -___C++OFILES= $(C++FILES:%.C=%.$o) -__C++OFILES= $(___C++OFILES:%.cc=%.$o) -_C++OFILES= $(__C++OFILES:%.cpp=%.$o) -C++OFILES= $(_C++OFILES:%.cxx=%.$o) -C++POFILES= $(C++OFILES:%=$(ARCHDIR)/%) -OFILES= $(CFILES:%.c=%.$o) $(C++OFILES) -POFILES= $(CFILES:%.c=$(ARCHDIR)/%.$o) $(C++POFILES) -.OBJDIR: $(ARCHDIR) -########################################################################### -__COMPILE.c= $(_UNIQ)$(COMPILE.c) -___COMPILE.c= $(__COMPILE.c:$(_UNIQ)=$(CC) $(CFLAGS) $(CPPFLAGS) -c) -_COMPILE.c= $(___COMPILE.c:$(_UNIQ)%=%) - -__COMPILE.cc= $(_UNIQ)$(COMPILE.cc) -___COMPILE.cc= $(__COMPILE.cc:$(_UNIQ)=$(CC++) $(C++FLAGS) $(CPPFLAGS) -c) -_COMPILE.cc= $(___COMPILE.cc:$(_UNIQ)%=%) - -__OUTPUT_OPTION= $(_UNIQ)$(OUTPUT_OPTION) -___OUTPUT_OPTION= $(__OUTPUT_OPTION:$(_UNIQ)=-o $O/$@) -_OUTPUT_OPTION= $(___OUTPUT_OPTION:$(_UNIQ)%=%) -########################################################################### -%.$o: %.c - $(_COMPILE.c) $(_OUTPUT_OPTION) $< $(CC_OUTPUT_FILTER) -%.$o: %.C - $(_COMPILE.cc) $(_OUTPUT_OPTION) $< $(CC_OUTPUT_FILTER) -%.$o: %.cc - $(_COMPILE.cc) $(_OUTPUT_OPTION) $< $(CC_OUTPUT_FILTER) -%.$o: %.cpp - $(_COMPILE.cc) $(_OUTPUT_OPTION) $< $(CC_OUTPUT_FILTER) -%.$o: %.cxx - $(_COMPILE.cc) $(_OUTPUT_OPTION) $< $(CC_OUTPUT_FILTER) - -#$(ARCHDIR)/%.$o: %.c -# $(CC) $(CFLAGS) $(CPPFLAGS) -c -o $@ $(*F).c - -########################################################################### diff -Nru cdrtools-2.01.01a33/RULES/r-build.tag cdrtools-3.02a09/RULES/r-build.tag --- cdrtools-2.01.01a33/RULES/r-build.tag 2006-05-14 11:55:28.000000000 +0000 +++ cdrtools-3.02a09/RULES/r-build.tag 1970-01-01 00:00:00.000000000 +0000 @@ -1,25 +0,0 @@ -#ident "@(#)r-smake.tag 1.3 06/05/14 " -########################################################################### -# Written 1996 by J. Schilling -########################################################################### -# -# Tag building rules for smake -# -########################################################################### -# Copyright (c) J. Schilling -########################################################################### -# The contents of this file are subject to the terms of the -# Common Development and Distribution License, Version 1.0 only. -# (the "License"). You may not use this file except in compliance -# with the License. -# -# See the file CDDL.Schily.txt in this distribution for details. -# -# When distributing Covered Code, include this CDDL HEADER in each -# file and include the License file CDDL.Schily.txt from this distribution. -########################################################################### -TAGS: $(CFILES) $(HFILES) - $(ETAGS) $r1 - -tags: $(CFILES) $(HFILES) - $(CTAGS) -t $r1 diff -Nru cdrtools-2.01.01a33/RULES/r-gmake.dep cdrtools-3.02a09/RULES/r-gmake.dep --- cdrtools-2.01.01a33/RULES/r-gmake.dep 2006-07-21 12:37:38.000000000 +0000 +++ cdrtools-3.02a09/RULES/r-gmake.dep 2015-04-15 20:35:22.000000000 +0000 @@ -1,4 +1,4 @@ -#ident "@(#)r-gmake.dep 1.13 06/07/21 " +#ident "@(#)r-gmake.dep 1.16 15/04/15 " ########################################################################### # Written 1996 by J. Schilling ########################################################################### @@ -14,6 +14,8 @@ # with the License. # # See the file CDDL.Schily.txt in this distribution for details. +# A copy of the CDDL is also available via the Internet at +# http://www.opensource.org/licenses/cddl1.txt # # When distributing Covered Code, include this CDDL HEADER in each # file and include the License file CDDL.Schily.txt from this distribution. @@ -38,9 +40,11 @@ ########################################################################### # # Make the complete path to the architecture subdirectory. +# Make $(ARCHDIR)/man as well here to avoid this directory to become root +# owned when root later calls "make install". # ########################################################################### -$(ARCHDIR): +$(ARCHDIR) $(ARCHDIR)/man: $(MKDIR) -p $@ ########################################################################### @@ -55,33 +59,31 @@ # ########################################################################### $(ARCHDIR)/%.d: %.c - $(MKDEP) $(CPPFLAGS) $(MKDEP_OUT) $< \ - | sed -e 's;^\(.*\)\.$o[ ]*:;$(ARCHDIR)/\1.$o \1.d:;' > $@ + $(MKDEP) $(CPPFLAGS) $(MKDEP_OUT) $< \ + | sed -e 's;^\(.*\)\.$o[ ]*:;$(ARCHDIR)/\1.$o $(ARCHDIR)/\1.d:;' > $@ $(ARCHDIR)/%.d: %.C - $(MKC++DEP) $(CPPFLAGS) $(MKC++DEP_OUT) $< \ - | sed -e 's;^\(.*\)\.$o[ ]*:;$(ARCHDIR)/\1.$o \1.d:;' > $@ + $(MKC++DEP) $(CPPFLAGS) $(MKC++DEP_OUT) $< \ + | sed -e 's;^\(.*\)\.$o[ ]*:;$(ARCHDIR)/\1.$o $(ARCHDIR)/\1.d:;' > $@ $(ARCHDIR)/%.d: %.cc - $(MKC++DEP) $(CPPFLAGS) $(MKC++DEP_OUT) $< \ - | sed -e 's;^\(.*\)\.$o[ ]*:;$(ARCHDIR)/\1.$o \1.d:;' > $@ + $(MKC++DEP) $(CPPFLAGS) $(MKC++DEP_OUT) $< \ + | sed -e 's;^\(.*\)\.$o[ ]*:;$(ARCHDIR)/\1.$o $(ARCHDIR)/\1.d:;' > $@ $(ARCHDIR)/%.d: %.cpp - $(MKC++DEP) $(CPPFLAGS) $(MKC++DEP_OUT) $< \ - | sed -e 's;^\(.*\)\.$o[ ]*:;$(ARCHDIR)/\1.$o \1.d:;' > $@ + $(MKC++DEP) $(CPPFLAGS) $(MKC++DEP_OUT) $< \ + | sed -e 's;^\(.*\)\.$o[ ]*:;$(ARCHDIR)/\1.$o $(ARCHDIR)/\1.d:;' > $@ $(ARCHDIR)/%.d: %.cxx - $(MKC++DEP) $(CPPFLAGS) $(MKC++DEP_OUT) $< \ - | sed -e 's;^\(.*\)\.$o[ ]*:;$(ARCHDIR)/\1.$o \1.d:;' > $@ - -#$(DEP_FILE): $(DEP_DEP) $(CFILES) -# $(MKDEP) $(CPPFLAGS) $(MKDEP_OUT) $(^:%$(DEP_DEP)=%) \ -# | sed -e 's;^\(.*\)\.$o[ ]*:;$(ARCHDIR)/\1.$o $(DEP_FILE):;' > $@ - -$(PDEP_FILE): $(DEP_DEP) + $(MKC++DEP) $(CPPFLAGS) $(MKC++DEP_OUT) $< \ + | sed -e 's;^\(.*\)\.$o[ ]*:;$(ARCHDIR)/\1.$o $(ARCHDIR)/\1.d:;' > $@ $(PDEP_FILE): $(DEP_DEP) -$(DEP_DEP): $(ARCHDIR) - @if [ ! -f $@ ]; then \ - echo > $@; \ +$(DEP_DEP): + @if [ ! -f $@ ]; then \ + echo " ==> MAKING DIRECTORY \"$(ARCHDIR)\""; \ + $(_MKDIR) -p $(ARCHDIR); \ + echo " ==> MAKING DIRECTORY \"$(ARCHDIR)/man\""; \ + $(_MKDIR) -p $(ARCHDIR)/man; \ + echo > $@; \ fi ########################################################################### diff -Nru cdrtools-2.01.01a33/RULES/r-gmake.obj cdrtools-3.02a09/RULES/r-gmake.obj --- cdrtools-2.01.01a33/RULES/r-gmake.obj 2007-04-27 09:34:00.000000000 +0000 +++ cdrtools-3.02a09/RULES/r-gmake.obj 1970-01-01 00:00:00.000000000 +0000 @@ -1,58 +0,0 @@ -#ident @(#)r-make.obj 1.7 07/04/27 -########################################################################### -# Written 1996 by J. Schilling -########################################################################### -# -# Object building rules for gmake -# -########################################################################### -# Copyright (c) J. Schilling -########################################################################### -# The contents of this file are subject to the terms of the -# Common Development and Distribution License, Version 1.0 only -# (the "License"). You may not use this file except in compliance -# with the License. -# -# See the file CDDL.Schily.txt in this distribution for details. -# -# When distributing Covered Code, include this CDDL HEADER in each -# file and include the License file CDDL.Schily.txt from this distribution. -########################################################################### -# This defines a rule that compiles source files from current directory and -# puts the resultant objects directly into $(ARCHDIR), -# to allow concurrent compilation on different platforms. -# Object file names are constructed from $(CFILES) and $(C++FILES). -########################################################################### -ARCHDIRX= $(ARCHDIR)/ -___C++OFILES= $(C++FILES:%.C=$(ARCHDIR)/%.$o) -__C++OFILES= $(___C++OFILES:%.cc=$(ARCHDIR)/%.$o) -_C++OFILES= $(__C++OFILES:%.cpp=$(ARCHDIR)/%.$o) -C++OFILES= $(_C++OFILES:%.cxx=$(ARCHDIR)/%.$o) -C++POFILES= $(C++OFILES) -OFILES= $(CFILES:%.c=$(ARCHDIR)/%.$o) $(C++OFILES) -POFILES= $(CFILES:%.c=$(ARCHDIR)/%.$o) $(C++POFILES) -########################################################################### -__COMPILE.c= $(_UNIQ)$(COMPILE.c) -___COMPILE.c= $(__COMPILE.c:$(_UNIQ)=$(CC) $(CFLAGS) $(CPPFLAGS) -c) -_COMPILE.c= $(___COMPILE.c:$(_UNIQ)%=%) - -__COMPILE.cc= $(_UNIQ)$(COMPILE.cc) -___COMPILE.cc= $(__COMPILE.cc:$(_UNIQ)=$(CC++) $(C++FLAGS) $(CPPFLAGS) -c) -_COMPILE.cc= $(___COMPILE.cc:$(_UNIQ)%=%) - -__OUTPUT_OPTION= $(_UNIQ)$(OUTPUT_OPTION) -___OUTPUT_OPTION= $(__OUTPUT_OPTION:$(_UNIQ)=-o $@) -_OUTPUT_OPTION= $(___OUTPUT_OPTION:$(_UNIQ)%=%) -########################################################################### - -$(ARCHDIR)/%.$o: %.c - $(_COMPILE.c) $(_OUTPUT_OPTION) $< $(CC_OUTPUT_FILTER) -$(ARCHDIR)/%.$o: %.C - $(_COMPILE.cc) $(_OUTPUT_OPTION) $< $(CC_OUTPUT_FILTER) -$(ARCHDIR)/%.$o: %.cc - $(_COMPILE.cc) $(_OUTPUT_OPTION) $< $(CC_OUTPUT_FILTER) -$(ARCHDIR)/%.$o: %.cpp - $(_COMPILE.cc) $(_OUTPUT_OPTION) $< $(CC_OUTPUT_FILTER) -$(ARCHDIR)/%.$o: %.cxx - $(_COMPILE.cc) $(_OUTPUT_OPTION) $< $(CC_OUTPUT_FILTER) -########################################################################### diff -Nru cdrtools-2.01.01a33/RULES/r-gmake.tag cdrtools-3.02a09/RULES/r-gmake.tag --- cdrtools-2.01.01a33/RULES/r-gmake.tag 2006-05-14 11:55:28.000000000 +0000 +++ cdrtools-3.02a09/RULES/r-gmake.tag 2007-12-01 19:11:45.000000000 +0000 @@ -1,4 +1,4 @@ -#ident "@(#)r-gmake.tag 1.2 06/05/14 " +#ident "@(#)r-gmake.tag 1.3 07/12/01 " ########################################################################### # Written 1996 by J. Schilling ########################################################################### @@ -9,7 +9,7 @@ # Copyright (c) J. Schilling ########################################################################### # The contents of this file are subject to the terms of the -# Common Development and Distribution License, Version 1.0 only. +# Common Development and Distribution License, Version 1.0 only # (the "License"). You may not use this file except in compliance # with the License. # @@ -18,8 +18,8 @@ # When distributing Covered Code, include this CDDL HEADER in each # file and include the License file CDDL.Schily.txt from this distribution. ########################################################################### -TAGS: $(CFILES) $(HFILES) +TAGS: $(CFILES) $(CFILES_TAG) $(HFILES) $(HFILES_TAG) $(ETAGS) $+ -tags: $(CFILES) $(HFILES) +tags: $(CFILES) $(CFILES_TAG) $(HFILES) $(HFILES_TAG) $(CTAGS) -t $+ diff -Nru cdrtools-2.01.01a33/RULES/r-make.dep cdrtools-3.02a09/RULES/r-make.dep --- cdrtools-2.01.01a33/RULES/r-make.dep 2006-07-21 12:37:38.000000000 +0000 +++ cdrtools-3.02a09/RULES/r-make.dep 2015-03-26 21:37:30.000000000 +0000 @@ -1,4 +1,4 @@ -#ident "@(#)r-make.dep 1.8 06/07/21 " +#ident "@(#)r-make.dep 1.10 15/03/26 " ########################################################################### # Written 1996 by J. Schilling ########################################################################### @@ -14,6 +14,8 @@ # with the License. # # See the file CDDL.Schily.txt in this distribution for details. +# A copy of the CDDL is also available via the Internet at +# http://www.opensource.org/licenses/cddl1.txt # # When distributing Covered Code, include this CDDL HEADER in each # file and include the License file CDDL.Schily.txt from this distribution. @@ -41,9 +43,11 @@ ########################################################################### # # Make the complete path to the architecture subdirectory. +# Make $(ARCHDIR)/man as well here to avoid this directory to become root +# owned when root later calls "make install". # ########################################################################### -$(ARCHDIR): +$(ARCHDIR) $(ARCHDIR)/man: $(MKDIR) -p $@ ########################################################################### @@ -65,9 +69,13 @@ $(MKDEP) $(CPPFLAGS) $(MKDEP_OUT) $(CFILES) \ | sed -e 's;^\(.*\)\.$o[ ]*:;$(ARCHDIR)/\1.$o $(DEP_FILE):;' > $@ -$(DEP_DEP): $(ARCHDIR) - @if [ ! -f $@ ]; then \ - echo > $@; \ +$(DEP_DEP): + @if [ ! -f $@ ]; then \ + echo " ==> MAKING DIRECTORY \"$(ARCHDIR)\""; \ + $(_MKDIR) -p $(ARCHDIR); \ + echo " ==> MAKING DIRECTORY \"$(ARCHDIR)/man\""; \ + $(_MKDIR) -p $(ARCHDIR)/man; \ + echo > $@; \ fi ########################################################################### diff -Nru cdrtools-2.01.01a33/RULES/r-make.obj cdrtools-3.02a09/RULES/r-make.obj --- cdrtools-2.01.01a33/RULES/r-make.obj 2007-04-27 09:34:00.000000000 +0000 +++ cdrtools-3.02a09/RULES/r-make.obj 2015-04-15 20:35:47.000000000 +0000 @@ -1,4 +1,4 @@ -#ident @(#)r-make.obj 1.7 07/04/27 +#ident @(#)r-make.obj 1.9 15/04/15 ########################################################################### # Written 1996 by J. Schilling ########################################################################### @@ -14,6 +14,8 @@ # with the License. # # See the file CDDL.Schily.txt in this distribution for details. +# A copy of the CDDL is also available via the Internet at +# http://www.opensource.org/licenses/cddl1.txt # # When distributing Covered Code, include this CDDL HEADER in each # file and include the License file CDDL.Schily.txt from this distribution. @@ -33,7 +35,7 @@ POFILES= $(CFILES:%.c=$(ARCHDIR)/%.$o) $(C++POFILES) ########################################################################### __COMPILE.c= $(_UNIQ)$(COMPILE.c) -___COMPILE.c= $(__COMPILE.c:$(_UNIQ)=$(CC) $(CFLAGS) $(CPPFLAGS) -c) +___COMPILE.c= $(__COMPILE.c:$(_UNIQ)=$(CCCC) $(CFLAGS) $(CPPFLAGS) -c) _COMPILE.c= $(___COMPILE.c:$(_UNIQ)%=%) __COMPILE.cc= $(_UNIQ)$(COMPILE.cc) @@ -45,14 +47,14 @@ _OUTPUT_OPTION= $(___OUTPUT_OPTION:$(_UNIQ)%=%) ########################################################################### -$(ARCHDIR)/%.$o: %.c +$(ARCHDIR)/%.$o: %.c $(_COMPILE.c) $(_OUTPUT_OPTION) $< $(CC_OUTPUT_FILTER) -$(ARCHDIR)/%.$o: %.C +$(ARCHDIR)/%.$o: %.C $(_COMPILE.cc) $(_OUTPUT_OPTION) $< $(CC_OUTPUT_FILTER) -$(ARCHDIR)/%.$o: %.cc +$(ARCHDIR)/%.$o: %.cc $(_COMPILE.cc) $(_OUTPUT_OPTION) $< $(CC_OUTPUT_FILTER) -$(ARCHDIR)/%.$o: %.cpp +$(ARCHDIR)/%.$o: %.cpp $(_COMPILE.cc) $(_OUTPUT_OPTION) $< $(CC_OUTPUT_FILTER) -$(ARCHDIR)/%.$o: %.cxx +$(ARCHDIR)/%.$o: %.cxx $(_COMPILE.cc) $(_OUTPUT_OPTION) $< $(CC_OUTPUT_FILTER) ########################################################################### diff -Nru cdrtools-2.01.01a33/RULES/r-make.tag cdrtools-3.02a09/RULES/r-make.tag --- cdrtools-2.01.01a33/RULES/r-make.tag 2006-05-14 11:55:28.000000000 +0000 +++ cdrtools-3.02a09/RULES/r-make.tag 2007-12-01 19:11:45.000000000 +0000 @@ -1,4 +1,4 @@ -#ident "@(#)r-make.tag 1.2 06/05/14 " +#ident "@(#)r-make.tag 1.3 07/12/01 " ########################################################################### # Written 1996 by J. Schilling ########################################################################### @@ -9,7 +9,7 @@ # Copyright (c) J. Schilling ########################################################################### # The contents of this file are subject to the terms of the -# Common Development and Distribution License, Version 1.0 only. +# Common Development and Distribution License, Version 1.0 only # (the "License"). You may not use this file except in compliance # with the License. # @@ -18,10 +18,8 @@ # When distributing Covered Code, include this CDDL HEADER in each # file and include the License file CDDL.Schily.txt from this distribution. ########################################################################### -TAGS: $(CFILES) $(HFILES) - $(ETAGS) $(CFILES) $(HFILES) - - -tags: $(CFILES) $(HFILES) - $(CTAGS) -t $(CFILES) $(HFILES) +TAGS: $(CFILES) $(CFILES_TAG) $(HFILES) $(HFILES_TAG) + $(ETAGS) $(CFILES) $(CFILES_TAG) $(HFILES) $(HFILES_TAG) +tags: $(CFILES) $(CFILES_TAG) $(HFILES) $(HFILES_TAG) + $(CTAGS) -t $(CFILES) $(CFILES_TAG) $(HFILES) $(HFILES_TAG) diff -Nru cdrtools-2.01.01a33/RULES/rs6000-aix-cc.rul cdrtools-3.02a09/RULES/rs6000-aix-cc.rul --- cdrtools-2.01.01a33/RULES/rs6000-aix-cc.rul 2007-05-08 11:03:08.000000000 +0000 +++ cdrtools-3.02a09/RULES/rs6000-aix-cc.rul 2015-12-01 19:19:28.000000000 +0000 @@ -1,4 +1,4 @@ -#ident "@(#)rs6000-aix-cc.rul 1.10 07/05/08 " +#ident "@(#)rs6000-aix-cc.rul 1.11 15/12/01 " ########################################################################### # Written 1996 by J. Schilling ########################################################################### @@ -14,13 +14,17 @@ # with the License. # # See the file CDDL.Schily.txt in this distribution for details. +# A copy of the CDDL is also available via the Internet at +# http://www.opensource.org/licenses/cddl1.txt # # When distributing Covered Code, include this CDDL HEADER in each # file and include the License file CDDL.Schily.txt from this distribution. ########################################################################### include $(SRCROOT)/$(RULESDIR)/rules.prg ########################################################################### -include $(SRCROOT)/$(RULESDIR)/cc-ibm.rul +include $(SRCROOT)/$(RULESDIR)/cc-$(C_ARCH:cc%=ibm%).rul + +AIX_ARCH= $(IBMCC_OPTXX:-q%=-X%) OSDEFS += -DPROTOTYTPES @@ -31,3 +35,6 @@ #LIB_KVM= -lkvm RANLIB= @echo " ==> RANDOMIZING ARCHIVE \"$@\""; ranlib + +LORDER= lorder $(AIX_ARCH) +AR= @echo " ==> ARCHIVING \"$@\""; ar $(AIX_ARCH) diff -Nru cdrtools-2.01.01a33/RULES/rs6000-aix-gcc.rul cdrtools-3.02a09/RULES/rs6000-aix-gcc.rul --- cdrtools-2.01.01a33/RULES/rs6000-aix-gcc.rul 2007-05-09 12:25:30.000000000 +0000 +++ cdrtools-3.02a09/RULES/rs6000-aix-gcc.rul 2015-11-29 21:13:51.000000000 +0000 @@ -1,4 +1,4 @@ -#ident "@(#)rs6000-aix-gcc.rul 1.9 07/05/09 " +#ident "@(#)rs6000-aix-gcc.rul 1.11 15/11/29 " ########################################################################### # Written 1997 by J. Schilling ########################################################################### @@ -14,13 +14,18 @@ # with the License. # # See the file CDDL.Schily.txt in this distribution for details. +# A copy of the CDDL is also available via the Internet at +# http://www.opensource.org/licenses/cddl1.txt # # When distributing Covered Code, include this CDDL HEADER in each # file and include the License file CDDL.Schily.txt from this distribution. ########################################################################### include $(SRCROOT)/$(RULESDIR)/rules.prg ########################################################################### -include $(SRCROOT)/$(RULESDIR)/cc-gcc.rul +include $(SRCROOT)/$(RULESDIR)/cc-$(C_ARCH).rul +GCC_OPT32= -maix32 +GCC_OPT64= -maix64 +AIX_ARCH= $(GCC_OPTXX:-maix%=-X%) OSDEFS += -DPROTOTYTPES @@ -44,3 +49,6 @@ DYNLD= @echo " ==> LINKING dynamic library \"$@\""; ld RANLIB= @echo " ==> RANDOMIZING ARCHIVE \"$@\""; ranlib + +LORDER= lorder $(AIX_ARCH) +AR= @echo " ==> ARCHIVING \"$@\""; ar $(AIX_ARCH) diff -Nru cdrtools-2.01.01a33/RULES/r-smake.dep cdrtools-3.02a09/RULES/r-smake.dep --- cdrtools-2.01.01a33/RULES/r-smake.dep 2006-07-31 12:38:02.000000000 +0000 +++ cdrtools-3.02a09/RULES/r-smake.dep 2015-03-26 21:37:30.000000000 +0000 @@ -1,4 +1,4 @@ -#ident "@(#)r-smake.dep 1.12 06/07/31 " +#ident "@(#)r-smake.dep 1.15 15/03/26 " ########################################################################### # Written 1996 by J. Schilling ########################################################################### @@ -14,6 +14,8 @@ # with the License. # # See the file CDDL.Schily.txt in this distribution for details. +# A copy of the CDDL is also available via the Internet at +# http://www.opensource.org/licenses/cddl1.txt # # When distributing Covered Code, include this CDDL HEADER in each # file and include the License file CDDL.Schily.txt from this distribution. @@ -28,6 +30,7 @@ DEP_FILE= $(CFILES:%.c=%.d) $(C++DEP_FILES) PDEP_FILE= $(CFILES:%.c=$(ARCHDIR)/%.d) $(C++PDEP_FILES) PALLDEP_FILE= $(CFILES:%.c=$(ARCHDIR)/%.d) $(C++PDEP_FILES) $(ARCHDIR)/$(TARGET).dep +DEP_DEP= $(ARCHDIR)/Dnull ########################################################################### depend: rmdep $(DEP_FILE) @@ -37,9 +40,11 @@ ########################################################################### # # Make the complete path to the architecture subdirectory. +# Make $(ARCHDIR)/man as well here to avoid this directory to become root +# owned when root later calls "make install". # ########################################################################### -$(ARCHDIR): +$(ARCHDIR) $(ARCHDIR)/man: $(MKDIR) -p $@ ########################################################################### @@ -53,9 +58,11 @@ # appropriate dependency file. # ########################################################################### -.d: .c - $(MKDEP) $(CPPFLAGS) $(MKDEP_OUT) $< \ - | sed -e 's;^\(.*\)\.$o[ ]*:;\1.$o \1.d:;' > $(ARCHDIR)/$@ + +# Do not define Simple Suffix Rules anymore +#.d: .c +# $(MKDEP) $(CPPFLAGS) $(MKDEP_OUT) $< \ +# | sed -e 's;^\(.*\)\.$o[ ]*:;\1.$o \1.d:;' > $(ARCHDIR)/$@ %.d: %.c $(MKDEP) $(CPPFLAGS) $(MKDEP_OUT) $< \ @@ -74,8 +81,14 @@ $(MKC++DEP) $(CPPFLAGS) $(MKC++DEP_OUT) $< \ | sed -e 's;^\(.*\)\.$o[ ]*:;\1.$o \1.d:;' > $(ARCHDIR)/$@ -Dnull: $(ARCHDIR) - @echo > $O/$@ +$(DEP_DEP): + @if [ ! -f $@ ]; then \ + echo " ==> MAKING DIRECTORY \"$(ARCHDIR)\""; \ + $(_MKDIR) -p $(ARCHDIR); \ + echo " ==> MAKING DIRECTORY \"$(ARCHDIR)/man\""; \ + $(_MKDIR) -p $(ARCHDIR)/man; \ + echo > $@; \ + fi #$(DEP_FILE): # $(MKDEP) $(CPPFLAGS) -f - $(CFILES) \ @@ -86,4 +99,4 @@ # Include the dependency file(s) generated from the rules above. # ########################################################################### --include Dnull $(DEP_FILE) +-include $(DEP_DEP) $(DEP_FILE) diff -Nru cdrtools-2.01.01a33/RULES/r-smake.obj cdrtools-3.02a09/RULES/r-smake.obj --- cdrtools-2.01.01a33/RULES/r-smake.obj 2007-04-27 09:34:00.000000000 +0000 +++ cdrtools-3.02a09/RULES/r-smake.obj 2013-07-22 21:30:14.000000000 +0000 @@ -1,4 +1,4 @@ -#ident @(#)r-smake.obj 1.9 07/04/27 +#ident @(#)r-smake.obj 1.10 13/07/22 ########################################################################### # Written 1996 by J. Schilling ########################################################################### @@ -14,6 +14,8 @@ # with the License. # # See the file CDDL.Schily.txt in this distribution for details. +# A copy of the CDDL is also available via the Internet at +# http://www.opensource.org/licenses/cddl1.txt # # When distributing Covered Code, include this CDDL HEADER in each # file and include the License file CDDL.Schily.txt from this distribution. @@ -34,7 +36,7 @@ .OBJDIR: $(ARCHDIR) ########################################################################### __COMPILE.c= $(_UNIQ)$(COMPILE.c) -___COMPILE.c= $(__COMPILE.c:$(_UNIQ)=$(CC) $(CFLAGS) $(CPPFLAGS) -c) +___COMPILE.c= $(__COMPILE.c:$(_UNIQ)=$(CCCC) $(CFLAGS) $(CPPFLAGS) -c) _COMPILE.c= $(___COMPILE.c:$(_UNIQ)%=%) __COMPILE.cc= $(_UNIQ)$(COMPILE.cc) @@ -57,6 +59,6 @@ $(_COMPILE.cc) $(_OUTPUT_OPTION) $< $(CC_OUTPUT_FILTER) #$(ARCHDIR)/%.$o: %.c -# $(CC) $(CFLAGS) $(CPPFLAGS) -c -o $@ $(*F).c +# $(CCCC) $(CFLAGS) $(CPPFLAGS) -c -o $@ $(*F).c ########################################################################### diff -Nru cdrtools-2.01.01a33/RULES/r-smake.tag cdrtools-3.02a09/RULES/r-smake.tag --- cdrtools-2.01.01a33/RULES/r-smake.tag 2006-05-14 11:55:28.000000000 +0000 +++ cdrtools-3.02a09/RULES/r-smake.tag 2007-12-01 19:11:45.000000000 +0000 @@ -1,4 +1,4 @@ -#ident "@(#)r-smake.tag 1.3 06/05/14 " +#ident "@(#)r-smake.tag 1.4 07/12/01 " ########################################################################### # Written 1996 by J. Schilling ########################################################################### @@ -9,7 +9,7 @@ # Copyright (c) J. Schilling ########################################################################### # The contents of this file are subject to the terms of the -# Common Development and Distribution License, Version 1.0 only. +# Common Development and Distribution License, Version 1.0 only # (the "License"). You may not use this file except in compliance # with the License. # @@ -18,8 +18,8 @@ # When distributing Covered Code, include this CDDL HEADER in each # file and include the License file CDDL.Schily.txt from this distribution. ########################################################################### -TAGS: $(CFILES) $(HFILES) +TAGS: $(CFILES) $(CFILES_TAG) $(HFILES) $(HFILES_TAG) $(ETAGS) $r1 -tags: $(CFILES) $(HFILES) +tags: $(CFILES) $(CFILES_TAG) $(HFILES) $(HFILES_TAG) $(CTAGS) -t $r1 diff -Nru cdrtools-2.01.01a33/RULES/r-sunpro.dep cdrtools-3.02a09/RULES/r-sunpro.dep --- cdrtools-2.01.01a33/RULES/r-sunpro.dep 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/RULES/r-sunpro.dep 2017-05-08 18:50:41.000000000 +0000 @@ -0,0 +1,94 @@ +#ident "@(#)r-sunpro.dep 1.17 17/05/08 " +########################################################################### +# Written 1996-2017 by J. Schilling +########################################################################### +# +# Dependency building rules for SunPro Make (Schilytools version) +# +########################################################################### +# Copyright (c) J. Schilling +########################################################################### +# The contents of this file are subject to the terms of the +# Common Development and Distribution License, Version 1.0 only +# (the "License"). You may not use this file except in compliance +# with the License. +# +# See the file CDDL.Schily.txt in this distribution for details. +# A copy of the CDDL is also available via the Internet at +# http://www.opensource.org/licenses/cddl1.txt +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file CDDL.Schily.txt from this distribution. +########################################################################### +DEP_SUFFIX= .d +RMDEP= $(RM) $(RM_FORCE) $@ +___C++DEP_FILES= $(C++FILES:%.C=%.d) +__C++DEP_FILES= $(___C++DEP_FILES:%.cc=%.d) +_C++DEP_FILES= $(__C++DEP_FILES:%.cpp=%.d) +C++DEP_FILES= $(_C++DEP_FILES:%.cxx=%.d) +C++PDEP_FILES= $(C++DEP_FILES:%=$(ARCHDIR)/%) +DEP_FILE= $(CFILES:%.c=%.d) $(C++DEP_FILES) +PDEP_FILE= $(CFILES:%.c=$(ARCHDIR)/%.d) $(C++PDEP_FILES) +PALLDEP_FILE= $(CFILES:%.c=$(ARCHDIR)/%.d) $(C++PDEP_FILES) $(ARCHDIR)/$(TARGET).dep +DEP_DEP= $(ARCHDIR)/Dnull +########################################################################### +depend: rmdep $(DEP_FILE) + +rmdep: + $(RM) $(RM_FORCE) $(PALLDEP_FILE) + +########################################################################### +# +# Make the complete path to the architecture subdirectory. +# Make $(ARCHDIR)/man as well here to avoid this directory to become root +# owned when root later calls "make install". +# +########################################################################### +$(ARCHDIR) $(ARCHDIR)/man: + $(MKDIR) -p $@ + +########################################################################### +# +# Generate dependency file(s). +# This rules is checked when the dependency file(s) are included. +# +# Modify the the path for .o files to reflect that they are placed in +# $(ARCHDIR). Add the dependency file itself to each line so that +# the dependencies will be rebuilt if a source is newer that the +# appropriate dependency file. +# +########################################################################### +$(ARCHDIR)/%.d: %.c + $(MKDEP) $(CPPFLAGS) $(MKDEP_OUT) $< \ + | sed -e 's;^\(.*\)\.$o[ ]*:;$(ARCHDIR)/\1.$o $(ARCHDIR)/\1.d:;' > $@ + +$(ARCHDIR)/%.d: %.C + $(MKC++DEP) $(CPPFLAGS) $(MKC++DEP_OUT) $< \ + | sed -e 's;^\(.*\)\.$o[ ]*:;$(ARCHDIR)/\1.$o $(ARCHDIR)/\1.d:;' > $@ +$(ARCHDIR)/%.d: %.cc + $(MKC++DEP) $(CPPFLAGS) $(MKC++DEP_OUT) $< \ + | sed -e 's;^\(.*\)\.$o[ ]*:;$(ARCHDIR)/\1.$o $(ARCHDIR)/\1.d:;' > $@ +$(ARCHDIR)/%.d: %.cpp + $(MKC++DEP) $(CPPFLAGS) $(MKC++DEP_OUT) $< \ + | sed -e 's;^\(.*\)\.$o[ ]*:;$(ARCHDIR)/\1.$o $(ARCHDIR)/\1.d:;' > $@ +$(ARCHDIR)/%.d: %.cxx + $(MKC++DEP) $(CPPFLAGS) $(MKC++DEP_OUT) $< \ + | sed -e 's;^\(.*\)\.$o[ ]*:;$(ARCHDIR)/\1.$o $(ARCHDIR)/\1.d:;' > $@ + +$(PDEP_FILE): $(DEP_DEP) + +$(DEP_DEP): + @if [ ! -f $@ ]; then \ + echo " ==> MAKING DIRECTORY \"$(ARCHDIR)\""; \ + $(_MKDIR) -p $(ARCHDIR); \ + echo " ==> MAKING DIRECTORY \"$(ARCHDIR)/man\""; \ + $(_MKDIR) -p $(ARCHDIR)/man; \ + echo > $@; \ + fi + +########################################################################### +# +# Include the dependency file(s) generated from the rules above. +# +########################################################################### +include $(PDEP_FILE) diff -Nru cdrtools-2.01.01a33/RULES/rules1.dir cdrtools-3.02a09/RULES/rules1.dir --- cdrtools-2.01.01a33/RULES/rules1.dir 2006-05-14 11:55:29.000000000 +0000 +++ cdrtools-3.02a09/RULES/rules1.dir 2011-04-14 16:15:01.000000000 +0000 @@ -1,17 +1,17 @@ -#ident @(#)rules1.dir 1.12 06/05/14 +#ident @(#)rules1.dir 1.16 11/04/14 ########################################################################### # Written 1996 by J. Schilling ########################################################################### # # DIRS contains the names of all directories where sub make should take place # -# The code that is shared bwtween rules.dir and rules.rdi +# The code that is shared between rules.dir and rules.rdi # ########################################################################### # Copyright (c) J. Schilling ########################################################################### # The contents of this file are subject to the terms of the -# Common Development and Distribution License, Version 1.0 only. +# Common Development and Distribution License, Version 1.0 only # (the "License"). You may not use this file except in compliance # with the License. # @@ -24,14 +24,15 @@ $(ALLTARGETS): @list="$(DIRS)"; \ if [ -d TARGETS -a -f TARGETS/__slot ]; then \ - list=`echo TARGETS/[0-9][0-9]* | sed -e 's;TARGETS/[0-9][0-9];;g' | sed -e 's;!@!;/;g'`;\ + list=`echo TARGETS/[0123456789][0123456789]* | \ + sed -e 's;TARGETS/[0123456789][0123456789];;g' | sed -e 's;!@!;/;g'`;\ fi; \ for DIR in $${list} ; \ do \ ( \ echo " ==> MAKING \"$@\" ON SUBDIRECTORY \"$(CURDIR)/$$DIR\"";\ if [ -d ./$$DIR -a -r ./$$DIR/Makefile ] ; then \ - cd ./$$DIR;"$(MAKE)" $(MAKEMACS) XARCH=$(XARCH) DIRNAME=$(CURDIR)/$$DIR $@; \ + cd ./$$DIR && "$(MAKE)" $(MAKEMACS) XARCH=$(XARCH) DIRNAME=$(CURDIR)/$$DIR $@; \ else \ echo "NOTICE: Partial source ($(CURDIR)/$$DIR) missing";\ fi \ @@ -39,11 +40,11 @@ done tinfo: - @[ -d TARGETS -a -f TARGETS/__slot ] && list=`echo TARGETS/[0-9][0-9]*`;\ + @[ -d TARGETS -a -f TARGETS/__slot ] && list=`echo TARGETS/[0123456789][0123456789]*`;\ for i in $${list}; \ do \ (read line < $$i; \ - name=`echo $$i | sed -e 's;TARGETS/[0-9][0-9];;' | sed -e 's;!@!;/;g'`; \ + name=`echo $$i | sed -e 's;TARGETS/[0123456789][0123456789];;' | sed -e 's;!@!;/;g'`; \ echo "$$name - $${line}"; \ ); \ done diff -Nru cdrtools-2.01.01a33/RULES/rules1.top cdrtools-3.02a09/RULES/rules1.top --- cdrtools-2.01.01a33/RULES/rules1.top 2007-05-06 12:51:39.000000000 +0000 +++ cdrtools-3.02a09/RULES/rules1.top 2017-12-06 21:47:03.000000000 +0000 @@ -1,6 +1,6 @@ -#ident "@(#)rules1.top 1.39 07/05/06 " +#ident "@(#)rules1.top 1.54 17/12/06 " ########################################################################### -# Written 1996 by J. Schilling +# Written 1996-2017 by J. Schilling ########################################################################### # # Rules that should be included at top of every Makefile @@ -16,6 +16,8 @@ # with the License. # # See the file CDDL.Schily.txt in this distribution for details. +# A copy of the CDDL is also available via the Internet at +# http://www.opensource.org/licenses/cddl1.txt # # When distributing Covered Code, include this CDDL HEADER in each # file and include the License file CDDL.Schily.txt from this distribution. @@ -99,7 +101,7 @@ _XMAKEPROG= $(__MAKEPROG:$(_UNIQ)%=%) # gmake defines a macro MAKE_COMMAND. If neither MAKE_NAME is defined by -# the make program, not MAKEPROG is set, try this to recognize gmake. +# the make program, nor MAKEPROG is set, try this to recognize gmake. # _MAKE_COMMAND= $(MAKE_COMMAND:%make=gmake) @@ -151,12 +153,31 @@ ########################################################################### # # Set DEST_DIR +# We use "DESTDIR" as external visible name to be compatible to other sw. # ########################################################################### DEST_DIR= $(DESTDIR:%/=%) ########################################################################### # +# Set INSBASE +# +########################################################################### +INSBASE= $(INS_BASE:%/=%) + +########################################################################### +# +# Standard default man install base +# +########################################################################### +DEFMANBASE_DEF= share + +_MANBASE= $(_UNIQ)$(DEFMANBASE) +__MANBASE= $(_MANBASE:$(_UNIQ)=$(DEFMANBASE_DEF)) +MANBASE= $(__MANBASE:$(_UNIQ)%=%) + +########################################################################### +# # Get curent directory name # ########################################################################### @@ -194,6 +215,12 @@ __INCDIRS= $(_INCDIRS:$(_UNIQ)=$(DEFINCDIRS_DEF)) INCDIRS= $(__INCDIRS:$(_UNIQ)%=%) +DEFOSINCDIRS_DEF= # + +_OSINCDIRS= $(_UNIQ)$(DEFOSINCDIRS) +__OSINCDIRS= $(_OSINCDIRS:$(_UNIQ)=$(DEFOSINCDIRS_DEF)) +OSINCDIRS= $(__OSINCDIRS:$(_UNIQ)%=%) + ########################################################################### # # Prepare come macros needed to build $(ARCHDIR) @@ -231,6 +258,18 @@ # See notes about $(SRCROOT)/ vs. $(SRCROOTSL) above. # ########################################################################### +include $(SRCROOT)/$(RULESDIR)/rules.prg + +$(SRCROOTSL)incs: + $(MKDIR_SH) -p $@ + +$(SRCROOTSL)incs/Dnull: $(SRCROOTSL)incs + @if [ ! -f $@ ]; then \ + echo > $@; \ + fi + +include $(SRCROOTSL)incs/Dnull + _DCC= $(SRCROOTSL)incs/Dcc.$(PARCH)$(-O_ARCH) $(_DCC): @@ -282,18 +321,21 @@ # Location for targets: # # - all : see appropriate rules +# - man installman : rules.man # - lint : rules.lnt # - clean, clobber, distclean, relink, rmtarget : rules.clr # - rel : rules.rel -# - install, ibins : rules.ins -# - html, htmlx : rules.htm & sub.htm +# - install, ibins, uninstall : rules.ins +# - html, htmlx, htmlxn : rules.htm & sub.htm # - tarpkg tarpkg1 tarpkg2 : rules.sps # - depend, rmdep : rules.dep # - config : rules.cnf # - tags, TAGS : rules.tag # - .help : rules.hlp # - .version : rules.hlp +# - tests : rules.tst # - tinfo : rules.dir/rules.rdi +# - cstyle : rules.cst # # We do not put '.help', '.version' and 'tinfo' into 'ALLTARGETS' because: # @@ -303,18 +345,43 @@ # # If we would add .help and tinfo, we would get multiple defined target # messages. +# +# Use ALLTARGETS=$(ALLTARGETS_NT) if there should be no directory descend +# for e.g. the "test" target. ########################################################################### -ALLTARGETS= all lint clean clobber distclean ibins depend rmdep \ +ALLTARGETS= all man lint clean clobber cstyle distclean ibins depend rmdep \ + config TAGS tags tests rmtarget relink rel \ + $(INSTALLTARGETS) $(UNINSTALLTARGETS) $(MANTARGETS) $(PKGTARGETS) + +ALLTARGETS_NT= all man lint clean clobber cstyle distclean ibins depend rmdep \ config TAGS tags rmtarget relink rel \ - $(INSTALLTARGETS) $(MANTARGETS) $(PKGTARGETS) + $(INSTALLTARGETS) $(UNINSTALLTARGETS) $(MANTARGETS) $(PKGTARGETS) -INSTALLTARGETS= install -MANTARGETS= html htmlx +INSTALLTARGETS= install installman +UNINSTALLTARGETS= uninstall uninstallman +MANTARGETS= html htmlx htmlxn PKGTARGETS= tarpkg tarpkg1 tarpkg2 .PHONY: $(ALLTARGETS) .help tinfo shell ########################################################################### +# Historic SunPro Make does not understand .PHONY: - use FRC +# SunPro Make from Schilytools supports .PHONY: and sets MAKE_NAME=sunpro +# $(MAKEPROG) is derived from $(SRCROOT)/$(RULESDIR)/mk-$(XMAKEPROG).id +# +# Make $(FRC) empty for all make programs (that usually support .PHONY) +# except for the unfixed old SunPro Make from Sun. +########################################################################### +_FRC= $(_UNIQ)$(MAKEPROG) +__FRC= $(_FRC:$(_UNIQ)make=FRC) +FRC= $(__FRC:$(_UNIQ)%=) + +$(ALLTARGETS) .help tinfo shell: $(FRC) + +FRC: + + +########################################################################### # Allow to start a shell in order to check the environment ########################################################################### shell: diff -Nru cdrtools-2.01.01a33/RULES/rules.aux cdrtools-3.02a09/RULES/rules.aux --- cdrtools-2.01.01a33/RULES/rules.aux 2007-05-06 12:50:26.000000000 +0000 +++ cdrtools-3.02a09/RULES/rules.aux 2010-05-14 18:12:57.000000000 +0000 @@ -1,4 +1,4 @@ -#ident "@(#)rules.aux 1.8 07/05/06 " +#ident "@(#)rules.aux 1.9 10/05/14 " ########################################################################### # Written 1997 by J. Schilling ########################################################################### @@ -18,8 +18,8 @@ # When distributing Covered Code, include this CDDL HEADER in each # file and include the License file CDDL.Schily.txt from this distribution. ########################################################################### -PTARGET= $(TARGET) -SRCFILE= $(TARGET) +PTARGET= $(TARGET)$(AUXSRCEXT) +SRCFILE= $(TARGET)$(AUXSRCEXT) ########################################################################### _INSMODEI= $(_UNIQ)$(INSMODE) diff -Nru cdrtools-2.01.01a33/RULES/rules.clr cdrtools-3.02a09/RULES/rules.clr --- cdrtools-2.01.01a33/RULES/rules.clr 2006-05-14 11:55:28.000000000 +0000 +++ cdrtools-3.02a09/RULES/rules.clr 2010-10-02 19:44:52.000000000 +0000 @@ -1,4 +1,4 @@ -#ident @(#)rules.clr 1.6 06/05/14 +#ident @(#)rules.clr 1.7 10/10/02 ########################################################################### # Written 1996 by J. Schilling ########################################################################### @@ -9,7 +9,7 @@ # Copyright (c) J. Schilling ########################################################################### # The contents of this file are subject to the terms of the -# Common Development and Distribution License, Version 1.0 only. +# Common Development and Distribution License, Version 1.0 only # (the "License"). You may not use this file except in compliance # with the License. # @@ -25,6 +25,7 @@ clean: $(RM) $(RM_FORCE) $(CLEAN_FILES) $(POFILES) \ $(PTARGETC) \ + $(PMAPVERS) \ $(CLEAN_FILEX) \ $(PYOFILES) $(PLOFILES) diff -Nru cdrtools-2.01.01a33/RULES/rules.cmd cdrtools-3.02a09/RULES/rules.cmd --- cdrtools-2.01.01a33/RULES/rules.cmd 2007-05-06 12:50:26.000000000 +0000 +++ cdrtools-3.02a09/RULES/rules.cmd 2016-08-10 20:50:17.000000000 +0000 @@ -1,6 +1,6 @@ -#ident @(#)rules.cmd 1.12 07/05/06 +#ident @(#)rules.cmd 1.15 16/08/10 ########################################################################### -# Written 1996 by J. Schilling +# Written 1996-2013 by J. Schilling ########################################################################### # # Rules for user level commands (usually found in .../bin) @@ -14,6 +14,8 @@ # with the License. # # See the file CDDL.Schily.txt in this distribution for details. +# A copy of the CDDL is also available via the Internet at +# http://www.opensource.org/licenses/cddl1.txt # # When distributing Covered Code, include this CDDL HEADER in each # file and include the License file CDDL.Schily.txt from this distribution. @@ -21,6 +23,8 @@ _EXEEXT= $(EXEEXT) _XEXEEXT= $(XEXEEXT) ########################################################################### +INSFLAGS += $(STRIPFLAGS) +########################################################################### include $(SRCROOT)/$(RULESDIR)/rules.obj include $(SRCROOT)/$(RULESDIR)/rules.dyn ########################################################################### @@ -39,7 +43,6 @@ $(PTARGET): $(OFILES) $(SRCLIBS) $(LDCC) $(_LD_OUTPUT_OPTION) $(POFILES) $(LDFLAGS) $(LDLIBS) -# $(CC) -o $@ $(OFILES) $(LDPATH) $(RUNPATH) $(SRCLIBS) $(LIBS) ########################################################################### include $(SRCROOT)/$(RULESDIR)/sub.htm @@ -49,4 +52,5 @@ include $(SRCROOT)/$(RULESDIR)/rules.tag include $(SRCROOT)/$(RULESDIR)/rules.hlp include $(SRCROOT)/$(RULESDIR)/rules.dep +include $(SRCROOT)/$(RULESDIR)/rules.cst ########################################################################### diff -Nru cdrtools-2.01.01a33/RULES/rules.cnf cdrtools-3.02a09/RULES/rules.cnf --- cdrtools-2.01.01a33/RULES/rules.cnf 2007-06-05 09:18:19.000000000 +0000 +++ cdrtools-3.02a09/RULES/rules.cnf 2015-11-10 20:29:36.000000000 +0000 @@ -1,6 +1,6 @@ -#ident @(#)rules.cnf 1.12 07/06/05 +#ident @(#)rules.cnf 1.17 15/11/10 ########################################################################### -# Written 1998 by J. Schilling +# Written 1998-2013 by J. Schilling ########################################################################### # # Make Rules for global dynamic configuration @@ -14,11 +14,23 @@ # with the License. # # See the file CDDL.Schily.txt in this distribution for details. +# A copy of the CDDL is also available via the Internet at +# http://www.opensource.org/licenses/cddl1.txt # # When distributing Covered Code, include this CDDL HEADER in each # file and include the License file CDDL.Schily.txt from this distribution. ########################################################################### +$(SRCROOT)/autoconf/configure: $(SRCROOT)/autoconf/autoconf.m4 \ + $(SRCROOT)/autoconf/acgeneral.m4 \ + $(SRCROOT)/autoconf/acspecific.m4 \ + $(SRCROOT)/autoconf/acoldnames.m4 \ + $(SRCROOT)/autoconf/aclocal.m4 \ + $(SRCROOT)/autoconf/rules.cnf.in \ + $(SRCROOT)/autoconf/xconfig.h.in + @echo " ==> AUTOCONFIGURING GLOBAL \"$@\""; \ + cd $(SRCROOT)/autoconf && sh ./autoconf + config: $(OINCSDIR)/rules.cnf $(OINCSDIR)/Inull: @@ -34,24 +46,26 @@ _HCC_COM= $(OARCH:%-gcc=gcc) HCC_COM= $(_HCC_COM:%-cc=cc) -_CC_COM= $(_UNIQ)$(CC_COM) -__CC_COM= $(_CC_COM:$(_UNIQ)=$(HCC_COM)) -XCC_COM= $(__CC_COM:$(_UNIQ)%=%) +_XCC_COM= $(_UNIQ)$(CC_COM) +__XCC_COM= $(_XCC_COM:$(_UNIQ)=$(HCC_COM)) +XCC_COM= $(__XCC_COM:$(_UNIQ)%=%) #CONFFLAGS += -cc=$(XCC_COM) $(OINCSDIR)/rules.cnf $(OINCSDIR)/xconfig.h: $(OINCSDIR)/Inull \ - $(SRCROOT)/conf/configure \ - $(SRCROOT)/conf/rules.cnf.in \ - $(SRCROOT)/conf/xconfig.h.in + $(SRCROOT)/autoconf/configure \ + $(SRCROOT)/autoconf/rules.cnf.in \ + $(SRCROOT)/autoconf/xconfig.h.in $(RUL_CONF) ########################################################################### -RUL_CONF= @echo " ==> CONFIGURING RULES \"$@\""; $(RM_F) $@; \ +OS_DEFS= $(OSINCDIRS:%=-I%) $(OSDEFS) $(OSDEFSX) +RUL_CONF= @echo " ==> CONFIGURING RULES \"$@\""; \ + $(RM_F) $(OINCSDIR)/rules.cnf $(OINCSDIR)/xconfig.h; \ cd $(OINCSDIR); \ CONFIG_NOFAIL=TRUE CC="$(XCC_COM)" CFLAGS="$(CFLAGS)" \ - CXXFLAGS="$(C++FLAGS)" CPPFLAGS="$(OSDEFS)" \ - LDFLAGS="$(LDOPTS)" sh ../../conf/configure $(CONFFLAGS) + CXXFLAGS="$(C++FLAGS)" CPPFLAGS="$(OS_DEFS)" \ + LDFLAGS="$(LDOPTS)" sh ../../autoconf/configure $(CONFFLAGS) ########################################################################### include $(OINCSDIR)/Inull include $(OINCSDIR)/rules.cnf diff -Nru cdrtools-2.01.01a33/RULES/rules.cst cdrtools-3.02a09/RULES/rules.cst --- cdrtools-2.01.01a33/RULES/rules.cst 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/RULES/rules.cst 2016-08-10 20:48:48.000000000 +0000 @@ -0,0 +1,33 @@ +#ident @(#)rules.cst 1.1 16/08/10 +########################################################################### +# Written 2016 by J. Schilling +########################################################################### +# +# Rules for "cstyle" +# +########################################################################### +# Copyright (c) J. Schilling +########################################################################### +# The contents of this file are subject to the terms of the +# Common Development and Distribution License, Version 1.0 only +# (the "License"). You may not use this file except in compliance +# with the License. +# +# See the file CDDL.Schily.txt in this distribution for details. +# A copy of the CDDL is also available via the Internet at +# http://www.opensource.org/licenses/cddl1.txt +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file CDDL.Schily.txt from this distribution. +########################################################################### + +CSTYLE= cstyle +CSTYLEOPTS_DEF= -K + +_CSTYLEOPTS= $(_UNIQ)$(CSTYLEOPTS) +__CSTYLEOPTS= $(_CSTYLEOPTS:$(_UNIQ)=$(CSTYLEOPTS_DEF)) +CSTYLE_OPTS= $(__CSTYLEOPTS:$(_UNIQ)%=%) + + +cstyle: $(CFILES) $(HFILES) + $(CSTYLE) $(CSTYLE_OPTS) $(CSTYLEOPTX) $^ diff -Nru cdrtools-2.01.01a33/RULES/rules.csw cdrtools-3.02a09/RULES/rules.csw --- cdrtools-2.01.01a33/RULES/rules.csw 2007-06-16 11:15:29.000000000 +0000 +++ cdrtools-3.02a09/RULES/rules.csw 2011-09-28 13:13:25.000000000 +0000 @@ -1,4 +1,4 @@ -#ident "@(#)rules.csw 1.1 07/06/16 " +#ident "@(#)rules.csw 1.6 11/09/28 " ########################################################################### # Written 2005 by J. Schilling ########################################################################### @@ -33,7 +33,20 @@ $(MKDIR) -p $@ all: $(SRCROOT)/packages/$(OARCH) - pkgmk -o -b `pwd`/$(SRCROOT)/$(PROTODIR)/$(INS_BASE) -d $(SRCROOT)/packages/$(OARCH) -a $(P_ARCH) \ - -v $(VERSION),$(DATE) -f $(PROTOTYPE) BASEDIR=$(INS_BASE) + if [ .$(PKG_RELOC) = .no ]; then \ + pkgmk -o -r `pwd`/$(SRCROOT)/$(PROTODIR)$(PKGROOTX) -d $(SRCROOT)/packages/$(OARCH) \ + -a $(P_ARCH) \ + -v $(VERSION),$(DATE) -f $(PROTOTYPE)_r \ + $(EMAIL:%=EMAIL=%) $(HOTLINE:%=HOTLINE=%) \ + pkgbase=`pwd` \ + $(PKGOPTX); \ + else \ + pkgmk -o -b `pwd`/$(SRCROOT)/$(PROTODIR)/$(INSBASE) -d $(SRCROOT)/packages/$(OARCH) \ + -a $(P_ARCH) \ + -v $(VERSION),$(DATE) -f $(PROTOTYPE) BASEDIR=$(INSBASE) \ + $(EMAIL:%=EMAIL=%) $(HOTLINE:%=HOTLINE=%) \ + pkgbase=`pwd` \ + $(PKGOPTX); \ + fi pkgtrans -s $(SRCROOT)/packages/$(OARCH) $(NAME)-$(VERSION),$(DATE)-$(OS_NAME)$(OSREL)-$(P_ARCH)$(VENDOR).pkg $(PKG) gzip -9f $(SRCROOT)/packages/$(OARCH)/$(NAME)-$(VERSION),$(DATE)-$(OS_NAME)$(OSREL)-$(P_ARCH)$(VENDOR).pkg diff -Nru cdrtools-2.01.01a33/RULES/rules.drv cdrtools-3.02a09/RULES/rules.drv --- cdrtools-2.01.01a33/RULES/rules.drv 2007-05-06 12:50:26.000000000 +0000 +++ cdrtools-3.02a09/RULES/rules.drv 2008-12-27 19:21:15.000000000 +0000 @@ -1,4 +1,4 @@ -#ident @(#)rules.drv 1.7 07/05/06 +#ident @(#)rules.drv 1.8 08/12/27 ########################################################################### # Written 1996 by J. Schilling ########################################################################### @@ -30,7 +30,7 @@ $(PTARGET): $(OFILES) $(SRCLIBS) $(LD) -r -o $@ $(POFILES) $(SRCLIBS) $(LIBS) -INS_BASE= $(INS_KBASE) +INSBASE= $(INS_KBASE:%/=%) CPPOPTS += $(KDEFINES) ########################################################################### include $(SRCROOT)/$(RULESDIR)/sub.htm diff -Nru cdrtools-2.01.01a33/RULES/rules.env cdrtools-3.02a09/RULES/rules.env --- cdrtools-2.01.01a33/RULES/rules.env 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/RULES/rules.env 2009-08-15 19:10:26.000000000 +0000 @@ -0,0 +1,47 @@ +#ident "@(#)rules.env 1.2 09/08/15 " +########################################################################### +# Written 2009 by J. Schilling +########################################################################### +# +# Rules for setting the locale environment to the default "C" +# +########################################################################### +# Copyright (c) J. Schilling +########################################################################### +# The contents of this file are subject to the terms of the +# Common Development and Distribution License, Version 1.0 only +# (the "License"). You may not use this file except in compliance +# with the License. +# +# See the file CDDL.Schily.txt in this distribution for details. +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file CDDL.Schily.txt from this distribution. +########################################################################### +# +# acgeneral.m4 claims that SCO Unix may have problems with setting LANG=C +# so we are careful not to set LANG unless it was already set by someone else +# +########################################################################### + +_LANG= $(_UNIQ)$(LANG) +__LANG= $(_LANG:$(_UNIQ)=NO_LANG) +___LANG= $(__LANG:$(_UNIQ)%=LANG) + +$(___LANG)=C +LC_ALL=C +LC_COLLATE=C +LC_CTYPE=C +LC_MESSAGES=C +LC_MONETARY=C +LC_NUMERIC=C +LC_TIME=C + +export $(___LANG) +export LC_ALL +export LC_COLLATE +export LC_CTYPE +export LC_MESSAGES +export LC_MONETARY +export LC_NUMERIC +export LC_TIME diff -Nru cdrtools-2.01.01a33/RULES/rules.hlp cdrtools-3.02a09/RULES/rules.hlp --- cdrtools-2.01.01a33/RULES/rules.hlp 2007-06-27 12:14:07.000000000 +0000 +++ cdrtools-3.02a09/RULES/rules.hlp 2017-06-27 22:34:25.000000000 +0000 @@ -1,6 +1,6 @@ -#ident "@(#)rules.hlp 1.14 07/06/27 " +#ident "@(#)rules.hlp 1.20 17/06/28 " ########################################################################### -# Written 1996 by J. Schilling +# Written 1996-2017 by J. Schilling ########################################################################### # # Help rules @@ -14,6 +14,8 @@ # with the License. # # See the file CDDL.Schily.txt in this distribution for details. +# A copy of the CDDL is also available via the Internet at +# http://www.opensource.org/licenses/cddl1.txt # # When distributing Covered Code, include this CDDL HEADER in each # file and include the License file CDDL.Schily.txt from this distribution. @@ -21,44 +23,53 @@ # Location for targets: # # - all : see appropriate rules +# - man installman : rules.man # - lint : rules.lnt # - clean, clobber, distclean, relink, rmtarget : rules.clr # - rel : rules.rel # - install, ibins : rules.ins -# - html, htmlx : rules.htm & sub.htm +# - html, htmlx, htmlxn : rules.htm & sub.htm # - tarpkg, tarpkg1 tarpkg2 : rules.sps # - depend, rmdep : rules.dep # - config : rules.cnf # - tags, TAGS : rules.tag # - .help : rules.hlp # - .version : rules.hlp +# - tests : rules.tst # - tinfo : rules.dir/rules.rdi +# - cstyle : rules.cst # ########################################################################### .help: @echo "Usage: make [target]" @echo "Available targets are:" $(ALLTARGETS) @echo " all make the default target" + @echo " man make localized man pages" @echo " lint lint all sources for the default target" @echo " clean remove all made objects and the default target" @echo " clobber remove all from 'clean' and all dependency files" + @echo " cstyle run 'cstyle' on the source files @echo " distclean remove all from 'clobber' and all made files" @echo " for all architectures" @echo " relink remove and relink the default target" @echo " rmtarget remove the default target" @echo " install install the default target to final destination" + @echo " installman install the man pages to final destination" @echo " ibins install the default target to local dir 'bins'" + @echo " uninstall uninstall the default target from final destination" @echo " html create html vesions from the manual pages" @echo " htmlx create enhanced html vesions from the manual pages" + @echo " htmlxn create enhanced html vesions from the manual pages if needed" @echo " tarpkg create an installable tar packet -> tarpkg1 + parpkg2" @echo " tarpkg1 helps to create an installable tar packet - install stage" @echo " tarpkg2 installable tar packet - tar -c stage" - @echo " depend remake the dependency files" + @echo " depend remove dependency file to prepare a remake" @echo " config remake the dynamic configuration files" @echo " tags make vi/ved compatible tag file" @echo " TAGS make emacs compatible tag file" @echo " .help display this help" @echo " .version display version information for the makefile system" + @echo " tests Run conformance tests if available for target" @echo " tinfo display target info for slottable target components" @echo " shell start $(SHELL) with the environment used for compilation" diff -Nru cdrtools-2.01.01a33/RULES/rules.htm cdrtools-3.02a09/RULES/rules.htm --- cdrtools-2.01.01a33/RULES/rules.htm 2007-05-06 13:09:42.000000000 +0000 +++ cdrtools-3.02a09/RULES/rules.htm 2016-01-27 21:59:27.000000000 +0000 @@ -1,4 +1,4 @@ -#ident "@(#)rules.htm 1.3 07/05/06 " +#ident "@(#)rules.htm 1.6 16/01/27 " ########################################################################### # Written 2007 by J. Schilling ########################################################################### @@ -14,6 +14,8 @@ # with the License. # # See the file CDDL.Schily.txt in this distribution for details. +# A copy of the CDDL is also available via the Internet at +# http://www.opensource.org/licenses/cddl1.txt # # When distributing Covered Code, include this CDDL HEADER in each # file and include the License file CDDL.Schily.txt from this distribution. @@ -24,6 +26,22 @@ man2html -cgiurl '$$title.$$section.html' -compress -nodepage \ > $(MANFILE).html +htmlxn: $(MANFILE).html + +$(MANFILE).html: $(MANFILE) + soelim $(MANFILE) | tbl | nroff -u1 -Tlp -man - | col -x | \ + (sed -e 's/XXX/$(MANFILE)/g' $(SRCROOT)/conf/pre.html; \ + man2html -cgiurl '../man$$section$$subsection/$$title.$$section$$subsection.html' -compress -nodepage; \ + cat $(SRCROOT)/conf/post.html) | \ + egrep -v 'HTML|BODY'> $(MANFILE).html + +$(MANFILE).dhtml: $(MANFILE) + soelim $(MANFILE) | tbl | nroff -u1 -Tlp -mdoc - | col -x | \ + (sed -e 's/XXX/$(MANFILE)/g' $(SRCROOT)/conf/pre.html; \ + man2html -cgiurl '../man$$section$$subsection/$$title.$$section$$subsection.html' -compress -nodepage; \ + cat $(SRCROOT)/conf/post.html) | \ + egrep -v 'HTML|BODY'> $(MANFILE).html + htmlx: $(MANFILE) soelim $(MANFILE) | tbl | nroff -u1 -Tlp -man - | col -x | \ (sed -e 's/XXX/$(MANFILE)/g' $(SRCROOT)/conf/pre.html; \ diff -Nru cdrtools-2.01.01a33/RULES/rules.inc cdrtools-3.02a09/RULES/rules.inc --- cdrtools-2.01.01a33/RULES/rules.inc 2007-05-06 12:50:26.000000000 +0000 +++ cdrtools-3.02a09/RULES/rules.inc 2011-07-16 15:02:16.000000000 +0000 @@ -1,4 +1,4 @@ -#ident @(#)rules.inc 1.8 07/05/06 +#ident @(#)rules.inc 1.10 11/07/16 ########################################################################### # Written 1999 by J. Schilling ########################################################################### @@ -18,7 +18,7 @@ # When distributing Covered Code, include this CDDL HEADER in each # file and include the License file CDDL.Schily.txt from this distribution. ########################################################################### -_EXEEXT= $(EXEEXT) +#_EXEEXT= $(EXEEXT) # Do not install as xxx.h.exe _XEXEEXT= $(XEXEEXT) ########################################################################### include $(SRCROOT)/$(RULESDIR)/rules.obj @@ -42,9 +42,14 @@ $(PTARGETCX): $(OFILES) $(SRCLIBS) $(LDCC) $(_LD_OUTPUT_OPTION) $(POFILES) $(LDFLAGS) $(LDLIBS) - +# +# If calling "$(PTARGETC)$(_XEXEEXT)" fails, this may be a cross compilation, +# so retry to run the command under control of "$(CONFIG_RMTCALL)". +# $(PTARGET): $(OINCSDIR) $(PTARGETCX) - @echo " ==> GENERATING include file \"$@\""; $(PTARGETC)$(_XEXEEXT) > $@ + @echo " ==> GENERATING include file \"$@\""; \ + $(PTARGETC)$(_XEXEEXT) > $@ || \ + $(CONFIG_RMTCALL) $(PTARGETC)$(_XEXEEXT) > $@ ########################################################################### include $(SRCROOT)/$(RULESDIR)/sub.htm diff -Nru cdrtools-2.01.01a33/RULES/rules.ins cdrtools-3.02a09/RULES/rules.ins --- cdrtools-2.01.01a33/RULES/rules.ins 2006-05-14 11:55:29.000000000 +0000 +++ cdrtools-3.02a09/RULES/rules.ins 2017-08-01 21:26:44.000000000 +0000 @@ -1,6 +1,6 @@ -#ident @(#)rules.ins 1.15 06/05/14 +#ident @(#)rules.ins 1.27 17/08/01 ########################################################################### -# Written 1996 by J. Schilling +# Written 1996-2017 by J. Schilling ########################################################################### # # Rules for target installation @@ -9,43 +9,46 @@ # Copyright (c) J. Schilling ########################################################################### # The contents of this file are subject to the terms of the -# Common Development and Distribution License, Version 1.0 only. +# Common Development and Distribution License, Version 1.0 only # (the "License"). You may not use this file except in compliance # with the License. # # See the file CDDL.Schily.txt in this distribution for details. +# A copy of the CDDL is also available via the Internet at +# http://www.opensource.org/licenses/cddl1.txt # # When distributing Covered Code, include this CDDL HEADER in each # file and include the License file CDDL.Schily.txt from this distribution. ########################################################################### -$(DEST_DIR)$(INS_BASE)/$(INSDIR): - $(MKDIR) -p $@ +$(DEST_DIR)$(INSBASE)/$(INSDIR)$(SUBINSDIR)$(SUBINS): + $(INSMKDIR) -p $@ $(SRCROOT)/bins/$(OARCH): $(MKDIR) -p $@ -$(DEST_DIR)$(INS_BASE)/$(INSDIR)/$(TARGET)$(_EXEEXT): $(PTARGET) - $(INSTALL) $(PTARGET) $@ +$(DEST_DIR)$(INSBASE)/$(INSDIR)$(SUBINSDIR)$(SUBINS)/$(TARGET)$(_EXEEXT): $(PTARGET) \ + $(DEST_DIR)$(INSBASE)/$(INSDIR)$(SUBINSDIR)$(SUBINS) + $(INSTALL) $(INSFLAGS) $(INSOPTX) $(PTARGET) $@ $(SRCROOT)/bins/$(OARCH)/$(TARGET)$(_EXEEXT): $(PTARGET) - $(INSTALL) $(PTARGET) $@ + $(INSTALL) $(INSFLAGS) $(INSOPTX) $(PTARGET) $@ -PHARDLINKS= $(HARDLINKS:%=$(DEST_DIR)$(INS_BASE)/$(INSDIR)/%$(_EXEEXT)) -hardlinks: $(PHARDLINKS) +PHARDLINKS= $(HARDLINKS:%=$(DEST_DIR)$(INSBASE)/$(INSDIR)$(SUBINSDIR)$(SUBINS)/%$(_EXEEXT)) +hardlinks: finstall $(PHARDLINKS) -PSYMLINKS= $(SYMLINKS:%=$(DEST_DIR)$(INS_BASE)/$(INSDIR)/%$(_EXEEXT)) -symlinks: $(PSYMLINKS) +PSYMLINKS= $(SYMLINKS:%=$(DEST_DIR)$(INSBASE)/$(INSDIR)$(SUBINSDIR)$(SUBINS)/%$(_EXEEXT)) +symlinks: finstall $(PSYMLINKS) _INSMODEINS= $(_UNIQ)$(INSMODEI) __INSMODEINS= $(_INSMODEINS:$(_UNIQ)=$(INSMODEX)) INSMODEINS= $(__INSMODEINS:$(_UNIQ)%=%) -dummy $(PHARDLINKS): $(DEST_DIR)$(INS_BASE)/$(INSDIR)/$(TARGET)$(_EXEEXT) - @echo " ==> INSTALLING link \"$@\""; $(RM) $(RM_FORCE) $@; $(LN) $(DEST_DIR)$(INS_BASE)/$(INSDIR)/$(TARGET)$(_EXEEXT) $@ +dummy $(PHARDLINKS): $(DEST_DIR)$(INSBASE)/$(INSDIR)$(SUBINSDIR)$(SUBINS)/$(TARGET)$(_EXEEXT) + @echo " ==> INSTALLING link \"$@\""; $(RM) $(RM_FORCE) $@; [ ! -d "$(@D)" ] && sh $(SRCROOT)/conf/mkdir-sh -p "$(@D)"; $(LN) $(DEST_DIR)$(INSBASE)/$(INSDIR)$(SUBINSDIR)$(SUBINS)/$(TARGET)$(_EXEEXT) $@ -symdummy $(PSYMLINKS): $(DEST_DIR)$(INS_BASE)/$(INSDIR)/$(TARGET)$(_EXEEXT) - @echo " ==> INSTALLING symlink \"$@\""; $(RM) $(RM_FORCE) $@; $(SYMLINK) $(TARGET)$(_EXEEXT) $@ +symdummy $(PSYMLINKS): $(DEST_DIR)$(INSBASE)/$(INSDIR)$(SUBINSDIR)$(SUBINS)/$(TARGET)$(_EXEEXT) + @echo " ==> INSTALLING symlink \"$@\""; $(RM) $(RM_FORCE) $@; [ ! -d "$(@D)" ] && sh $(SRCROOT)/conf/mkdir-sh -p "$(@D)"; $(SYMLINK) $(TARGET)$(_EXEEXT) $@ -xinstall: +xinstall: finstall @if [ ".$(XMK_FILE)" != . ] ; then \ for XMK_F in $(XMK_FILE) XxZzY-- ; do \ ( \ @@ -61,10 +64,48 @@ done \ fi -install: all $(DEST_DIR)$(INS_BASE)/$(INSDIR) \ - $(DEST_DIR)$(INS_BASE)/$(INSDIR)/$(TARGET)$(_EXEEXT) \ +xuninstall: + @if [ ".$(XMK_FILE)" != . ] ; then \ + for XMK_F in $(XMK_FILE) XxZzY-- ; do \ + ( \ + if [ -r ./$$XMK_F ] ; then \ + echo " ==> MAKING \"uninstall\" ON SUBCOMPONENT \"$(CURDIR)/$$XMK_F\""; \ + "$(MAKE)" -f $$XMK_F $(MAKEMACS) XARCH=$(XARCH) uninstall; \ + else \ + if [ $$XMK_F != XxZzY-- ]; then \ + echo "NOTICE: Partial source ($(DIRNAME)/$$XMK_F) missing";\ + fi \ + fi \ + ); \ + done \ + fi + +man installman: + @if [ ".$(XMK_FILE)" != . ] ; then \ + for XMK_F in $(XMK_FILE) XxZzY-- ; do \ + ( \ + if [ -r ./$$XMK_F ] ; then \ + echo " ==> MAKING \"$@\" ON SUBCOMPONENT \"$(CURDIR)/$$XMK_F\""; \ + "$(MAKE)" -f $$XMK_F $(MAKEMACS) XARCH=$(XARCH) $@; \ + else \ + if [ $$XMK_F != XxZzY-- ]; then \ + echo "NOTICE: Partial source ($(DIRNAME)/$$XMK_F) missing";\ + fi \ + fi \ + ); \ + done \ + fi + +finstall: $(DEST_DIR)$(INSBASE)/$(INSDIR)$(SUBINSDIR)$(SUBINS) \ + $(DEST_DIR)$(INSBASE)/$(INSDIR)$(SUBINSDIR)$(SUBINS)/$(TARGET)$(_EXEEXT) + +install: all finstall \ hardlinks symlinks \ xinstall +uninstall: xuninstall + $(RM) $(RM_FORCE) $(PSYMLINKS) $(PHARDLINKS) \ + $(DEST_DIR)$(INSBASE)/$(INSDIR)$(SUBINSDIR)$(SUBINS)/$(TARGET)$(_EXEEXT) + ibins: all $(SRCROOT)/bins/$(OARCH) \ $(SRCROOT)/bins/$(OARCH)/$(TARGET)$(_EXEEXT) diff -Nru cdrtools-2.01.01a33/RULES/rules.lib cdrtools-3.02a09/RULES/rules.lib --- cdrtools-2.01.01a33/RULES/rules.lib 2007-05-06 12:50:26.000000000 +0000 +++ cdrtools-3.02a09/RULES/rules.lib 2016-08-10 20:50:17.000000000 +0000 @@ -1,4 +1,4 @@ -#ident "@(#)rules.lib 1.10 07/05/06 " +#ident "@(#)rules.lib 1.11 16/08/10 " ########################################################################### # Written 1996 by J. Schilling ########################################################################### @@ -14,6 +14,8 @@ # with the License. # # See the file CDDL.Schily.txt in this distribution for details. +# A copy of the CDDL is also available via the Internet at +# http://www.opensource.org/licenses/cddl1.txt # # When distributing Covered Code, include this CDDL HEADER in each # file and include the License file CDDL.Schily.txt from this distribution. @@ -49,4 +51,5 @@ include $(SRCROOT)/$(RULESDIR)/rules.tag include $(SRCROOT)/$(RULESDIR)/rules.hlp include $(SRCROOT)/$(RULESDIR)/rules.dep +include $(SRCROOT)/$(RULESDIR)/rules.cst ########################################################################### diff -Nru cdrtools-2.01.01a33/RULES/rules.loc cdrtools-3.02a09/RULES/rules.loc --- cdrtools-2.01.01a33/RULES/rules.loc 2007-05-06 12:50:26.000000000 +0000 +++ cdrtools-3.02a09/RULES/rules.loc 2017-07-25 20:47:07.000000000 +0000 @@ -1,4 +1,4 @@ -#ident "@(#)rules.loc 1.7 07/05/06 " +#ident "@(#)rules.loc 1.10 17/06/18 " ########################################################################### # Written 1997 by J. Schilling ########################################################################### @@ -14,6 +14,8 @@ # with the License. # # See the file CDDL.Schily.txt in this distribution for details. +# A copy of the CDDL is also available via the Internet at +# http://www.opensource.org/licenses/cddl1.txt # # When distributing Covered Code, include this CDDL HEADER in each # file and include the License file CDDL.Schily.txt from this distribution. @@ -29,9 +31,11 @@ __INSMODEI= $(_INSMODEI:$(_UNIQ)=$(INSMODEF)) INSMODEI= $(__INSMODEI:$(_UNIQ)%=%) -all: $(ARCHDIR) $(PTARGET) +all: $(PTARGET) -$(PTARGET): $(SRCFILE) +install: $(ARCHDIR) + +$(PTARGET): $(ARCHDIR) $(SRCFILE) $(LOCALIZE) $(SRCFILE) $@ $(ARCHDIR): diff -Nru cdrtools-2.01.01a33/RULES/rules.man cdrtools-3.02a09/RULES/rules.man --- cdrtools-2.01.01a33/RULES/rules.man 2007-05-06 12:56:12.000000000 +0000 +++ cdrtools-3.02a09/RULES/rules.man 2017-08-02 16:51:18.000000000 +0000 @@ -1,6 +1,6 @@ -#ident "@(#)rules.man 1.4 07/05/06 " +#ident "@(#)rules.man 1.9 17/06/18 " ########################################################################### -# Written 1997 by J. Schilling +# Written 1997-2015 by J. Schilling ########################################################################### # # Manual page building rules @@ -14,6 +14,8 @@ # with the License. # # See the file CDDL.Schily.txt in this distribution for details. +# A copy of the CDDL is also available via the Internet at +# http://www.opensource.org/licenses/cddl1.txt # # When distributing Covered Code, include this CDDL HEADER in each # file and include the License file CDDL.Schily.txt from this distribution. @@ -21,7 +23,7 @@ include $(SRCROOT)/$(RULESDIR)/man-$(MANSTYLE).def ########################################################################### -INSDIR= $(MANDIR)/$(MANSECT) +INSDIR= $(MANBASE:%=%/)$(MANDIR)/$(MANSECT) SUBARCHDIR= /$(MANDIR) TARGET= $(TARGETMAN).$(MANSUFFIX) SRCFILE= $(MANFILE) @@ -44,9 +46,13 @@ __INSMODEI= $(_INSMODEI:$(_UNIQ)=$(INSMODEF)) INSMODEI= $(__INSMODEI:$(_UNIQ)%=%) -all: $(ARCHDIR) $(PTARGET) +all man: $(PTARGET) -$(PTARGET): $(SRCFILE) +install installman: $(ARCHDIR) + +installman: man install + +$(PTARGET): $(ARCHDIR) $(SRCFILE) $(LOCALIZE) $(SRCFILE) $@ $(ARCHDIR): diff -Nru cdrtools-2.01.01a33/RULES/rules.mks cdrtools-3.02a09/RULES/rules.mks --- cdrtools-2.01.01a33/RULES/rules.mks 2006-07-21 13:20:42.000000000 +0000 +++ cdrtools-3.02a09/RULES/rules.mks 2008-04-19 16:22:23.000000000 +0000 @@ -1,4 +1,4 @@ -#ident "@(#)rules.mks 1.11 06/07/21 " +#ident "@(#)rules.mks 1.13 08/04/19 " ########################################################################### # Written 1996 by J. Schilling ########################################################################### @@ -23,7 +23,7 @@ @ for MK in $(MK_FILES) ; \ do \ ( \ - if [ -r ./$$MK ] ; then \ + if [ -r ./$$MK ] ; then \ echo " ==> MAKING \"$@\" ON SUBCOMPONENT \"$(CURDIR)/$$MK\""; "$(MAKE)" -f $$MK $(MAKEMACS) XARCH=$(XARCH) $@;\ else \ echo "NOTICE: Partial source ($(CURDIR)/$$MK) missing";\ diff -Nru cdrtools-2.01.01a33/RULES/rules.nul cdrtools-3.02a09/RULES/rules.nul --- cdrtools-2.01.01a33/RULES/rules.nul 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/RULES/rules.nul 2009-08-12 21:16:07.000000000 +0000 @@ -0,0 +1,20 @@ +#ident "@(#)rules.nul 1.1 09/08/12 " +########################################################################### +# Written 2009 by J. Schilling +########################################################################### +# +# NUL dummy rule +# +########################################################################### +# Copyright (c) J. Schilling +########################################################################### +# The contents of this file are subject to the terms of the +# Common Development and Distribution License, Version 1.0 only +# (the "License"). You may not use this file except in compliance +# with the License. +# +# See the file CDDL.Schily.txt in this distribution for details. +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file CDDL.Schily.txt from this distribution. +########################################################################### diff -Nru cdrtools-2.01.01a33/RULES/rules.pkg cdrtools-3.02a09/RULES/rules.pkg --- cdrtools-2.01.01a33/RULES/rules.pkg 2007-06-16 13:30:48.000000000 +0000 +++ cdrtools-3.02a09/RULES/rules.pkg 2017-08-03 22:11:34.000000000 +0000 @@ -1,4 +1,4 @@ -#ident "@(#)rules.pkg 1.1 07/06/16 " +#ident "@(#)rules.pkg 1.6 17/08/04 " ########################################################################### # Written 2005 by J. Schilling ########################################################################### @@ -14,6 +14,8 @@ # with the License. # # See the file CDDL.Schily.txt in this distribution for details. +# A copy of the CDDL is also available via the Internet at +# http://www.opensource.org/licenses/cddl1.txt # # When distributing Covered Code, include this CDDL HEADER in each # file and include the License file CDDL.Schily.txt from this distribution. @@ -47,11 +49,11 @@ pkg1: rm -rf $(PROTODIR) - mkdir -p $(PROTODIR) $(PROTODIR)/$(INS_BASE)/bin $(PROTODIR)/$(INS_BASE)/sbin $(PROTODIR)/$(INS_BASE)/etc \ - $(PROTODIR)/$(INS_BASE)/lib $(PROTODIR)/$(INS_BASE)/share/man - ln -s share/man $(PROTODIR)/$(INS_BASE)/man + mkdir -p $(PROTODIR) $(PROTODIR)/$(INSBASE)/bin $(PROTODIR)/$(INSBASE)/sbin $(PROTODIR)/$(INSBASE)/etc \ + $(PROTODIR)/$(INSBASE)/lib $(PROTODIR)/$(INSBASE)/share/man + ln -s share/man $(PROTODIR)/$(INSBASE)/man if [ ."$(PRE_INST_CMDS)" != . ]; then cd $(PROTODIR) && eval "$(PRE_INST_CMDS)" ; fi - $(MAKE) $(MAKE_FILE) DESTDIR=`pwd`/$(PROTODIR) install + "$(MAKE)" $(MAKE_FILE) DESTDIR=`pwd`/$(PROTODIR) install if [ ."$(POST_INST_CMDS)" != . ]; then cd $(PROTODIR) && eval "$(POST_INST_CMDS)" ; fi -if [ ."$(STRIPLIST)" != . ]; then chmod u+w $(STRIPLIST:%=$(PROTODIR)/%); strip $(STRIPLIST:%=$(PROTODIR)/%); fi -if [ ."$(STRIPXLIST)" != . ]; then chmod u+w $(STRIPXLIST:%=$(PROTODIR)/%); strip -x $(STRIPXLIST:%=$(PROTODIR)/%); fi @@ -85,7 +87,7 @@ ( \ echo " ==> MAKING \"$@\" ON SUBDIRECTORY \"$(CURDIR)/$$DIR\"";\ if [ -d ./$$DIR -a -r ./$$DIR/Makefile ] ; then \ - cd ./$$DIR;"$(MAKE)" $(MAKEMACS) XARCH=$(XARCH) DIRNAME=$(CURDIR)/$$DIR all; \ + cd ./$$DIR && "$(MAKE)" $(MAKEMACS) XARCH=$(XARCH) DIRNAME=$(CURDIR)/$$DIR all; \ else \ echo "NOTICE: Partial source ($(CURDIR)/$$DIR) missing";\ fi \ diff -Nru cdrtools-2.01.01a33/RULES/rules.prg cdrtools-3.02a09/RULES/rules.prg --- cdrtools-2.01.01a33/RULES/rules.prg 2006-07-07 09:42:38.000000000 +0000 +++ cdrtools-3.02a09/RULES/rules.prg 2017-04-16 21:48:25.000000000 +0000 @@ -1,6 +1,6 @@ -#ident "@(#)rules.prg 1.15 06/07/07 " +#ident "@(#)rules.prg 1.23 17/04/16 " ########################################################################### -# Written 1996 by J. Schilling +# Written 1996-2017 by J. Schilling ########################################################################### # # Generic rules for program names @@ -14,6 +14,8 @@ # with the License. # # See the file CDDL.Schily.txt in this distribution for details. +# A copy of the CDDL is also available via the Internet at +# http://www.opensource.org/licenses/cddl1.txt # # When distributing Covered Code, include this CDDL HEADER in each # file and include the License file CDDL.Schily.txt from this distribution. @@ -33,17 +35,26 @@ CLEAN_FILES= core err -SHELL= /bin/sh +# +# Setting $(SHELL) inside a makefile is a really bad idea. +# Since we allow "smake" to default SHELL to /bin/bosh in +# case that /bin/sh is broken but /bin/bosh exists, this +# must not be defined anymore. +# +#SHELL= /bin/sh + LN= /bin/ln SYMLINK= /bin/ln -s RM= /bin/rm MV= /bin/mv -LORDER= lorder -TSORT= tsort +LORDER= $(LORDER_PROG) +TSORT= $(TSORT_PROG) CTAGS= vctags ETAGS= etags UMASK= umask $(UMASK_VAL) UMASK_DEF= 002 +INSUMASK= umask $(INSUMASK_VAL) +INSUMASK_DEF= 022 RM_FORCE= -f RM_RECURS= -r @@ -52,10 +63,15 @@ RM_F= $(RM) $(RM_FORCE) INSMODEF_DEF= 444 +INSMODED_DEF= 755 INSMODEX_DEF= 755 -INSUSR_DEF= bin +INSUSR_DEF= root INSGRP_DEF= bin +_DEFINSUMASK= $(_UNIQ)$(DEFINSUMASK) +__DEFINSUMASK= $(_DEFINSUMASK:$(_UNIQ)=$(INSUMASK_DEF)) +INSUMASK_VAL= $(__DEFINSUMASK:$(_UNIQ)%=%) + _DEFUMASK= $(_UNIQ)$(DEFUMASK) __DEFUMASK= $(_DEFUMASK:$(_UNIQ)=$(UMASK_DEF)) UMASK_VAL= $(__DEFUMASK:$(_UNIQ)%=%) @@ -64,6 +80,10 @@ __DEFINSMODEF= $(_DEFINSMODEF:$(_UNIQ)=$(INSMODEF_DEF)) INSMODEF= $(__DEFINSMODEF:$(_UNIQ)%=%) +_DEFINSMODED= $(_UNIQ)$(DEFINSMODED) +__DEFINSMODED= $(_DEFINSMODED:$(_UNIQ)=$(INSMODED_DEF)) +INSMODED= $(__DEFINSMODED:$(_UNIQ)%=%) + _DEFINSMODEX= $(_UNIQ)$(DEFINSMODEX) __DEFINSMODEX= $(_DEFINSMODEX:$(_UNIQ)=$(INSMODEX_DEF)) INSMODEX= $(__DEFINSMODEX:$(_UNIQ)%=%) @@ -80,7 +100,7 @@ LD= @echo " ==> LINKING \"$@\""; ld LOCALIZE= @echo " ==> LOCALIZING \"$@\""; $(RM_F) $@; cp INSTALL= @echo " ==> INSTALLING \"$@\""; sh $(SRCROOT)/conf/install-sh -c -m $(INSMODEINS) -o $(INSUSR) -g $(INSGRP) -CHMOD= @echo " ==> SEETING PERMISSIONS ON \"$@\""; chmod +CHMOD= @echo " ==> SETTING PERMISSIONS ON \"$@\""; chmod CHOWN= @echo " ==> SETTING OWNER ON \"$@\""; chown CHGRP= @echo " ==> SETTING GROUP ON \"$@\""; chgrp AR= @echo " ==> ARCHIVING \"$@\""; ar @@ -91,5 +111,9 @@ RANLIB= @echo " ==> RANDOMIZING ARCHIVE \"$@\""; true MKDEP= @echo " ==> MAKING DEPENDENCIES \"$@\""; makedepend MKDEP_OUT= -f - +_MKDIR= $(UMASK); mkdir MKDIR= @echo " ==> MAKING DIRECTORY \"$@\""; $(UMASK); mkdir +_MKDIR_SH= $(UMASK); sh $(SRCROOT)/conf/mkdir-sh MKDIR_SH= @echo " ==> MAKING DIRECTORY \"$@\""; $(UMASK); sh $(SRCROOT)/conf/mkdir-sh +INSMKDIR= @echo " ==> MAKING DIRECTORY \"$@\""; $(INSUMASK); mkdir +INSMKDIR_SH= @echo " ==> MAKING DIRECTORY \"$@\""; $(INSUMASK); sh $(SRCROOT)/conf/mkdir-sh diff -Nru cdrtools-2.01.01a33/RULES/rules.rdi cdrtools-3.02a09/RULES/rules.rdi --- cdrtools-2.01.01a33/RULES/rules.rdi 2006-05-14 11:55:29.000000000 +0000 +++ cdrtools-3.02a09/RULES/rules.rdi 2011-04-14 16:15:29.000000000 +0000 @@ -1,16 +1,16 @@ -#ident @(#)rules.rdi 1.9 06/05/14 +#ident @(#)rules.rdi 1.10 11/04/14 ########################################################################### # Written 1996 by J. Schilling ########################################################################### # # DIRS contains the names of all directories where sub make should take place -# This is a modified version for the prokect's root directory +# This is a modified version for the project's root directory # ########################################################################### # Copyright (c) J. Schilling ########################################################################### # The contents of this file are subject to the terms of the -# Common Development and Distribution License, Version 1.0 only. +# Common Development and Distribution License, Version 1.0 only # (the "License"). You may not use this file except in compliance # with the License. # @@ -25,6 +25,10 @@ ########################################################################### include $(SRCROOT)/$(RULESDIR)/rules.hlp ########################################################################### + +# The need for this special variant of rules has been removed by introducing +# the SRCROOTSL macro in RULES/rules1.top +########################################################################### # Due to a serious bug in SunPRO make we cannot include the configuration # rules. SunPRO make inconsistsently shortens rules that start with "./" # and thus wil not find existing rules for a file to be included. diff -Nru cdrtools-2.01.01a33/RULES/rules.rel cdrtools-3.02a09/RULES/rules.rel --- cdrtools-2.01.01a33/RULES/rules.rel 2007-06-10 12:22:15.000000000 +0000 +++ cdrtools-3.02a09/RULES/rules.rel 2015-08-22 16:34:20.000000000 +0000 @@ -1,4 +1,4 @@ -#ident @(#)rules.rel 1.7 07/06/10 +#ident @(#)rules.rel 1.10 15/08/22 ########################################################################### # Written 2001 by J. Schilling ########################################################################### @@ -14,6 +14,8 @@ # with the License. # # See the file CDDL.Schily.txt in this distribution for details. +# A copy of the CDDL is also available via the Internet at +# http://www.opensource.org/licenses/cddl1.txt # # When distributing Covered Code, include this CDDL HEADER in each # file and include the License file CDDL.Schily.txt from this distribution. @@ -23,7 +25,16 @@ REL_SRC_MATCH=cat REL_MAKEFILE_MATCH=cat -rel: $(CFILES:%=release/%) $(HFILES:%=release/%) $(XRELFILES:%=release/%) +DRELFILES= $(CFILES:%=release/%) $(HFILES:%=release/%) $(XRELFILES:%=release/%) + +_RELFILES= $(_UNIQ)$(RELFILES) +__RELFILES= $(_RELFILES:$(_UNIQ)=$(DRELFILES)) +RELFILES_= $(__RELFILES:$(_UNIQ)%=%) + +rel: release/ $(RELDIRS) $(RELFILES_) + +release/: + $(MKDIR) -p $@ release/%.c: %.c rm -f $@ diff -Nru cdrtools-2.01.01a33/RULES/rules.shl cdrtools-3.02a09/RULES/rules.shl --- cdrtools-2.01.01a33/RULES/rules.shl 2007-05-06 12:50:26.000000000 +0000 +++ cdrtools-3.02a09/RULES/rules.shl 2010-10-03 13:30:26.000000000 +0000 @@ -1,4 +1,4 @@ -#ident "@(#)rules.shl 1.13 07/05/06 " +#ident "@(#)rules.shl 1.15 10/10/03 " ########################################################################### # Written 1996 by J. Schilling ########################################################################### @@ -36,6 +36,20 @@ PTARGET= $(OLIBSDIR)/$(TARGET) PTARGET_BASE= $(OLIBSDIR)/$(TARGET_BASE) +_MAPVERS= lib$(TARGETLIB)-mapvers +#MAPVERS= $(_MAPVERS) # Use this in *-os-*cc*.rul to enable mapfiles +PMAPVERS= $(MAPVERS:%=$(ARCHDIR)/$(MAPVERS)) + +$(PTARGET): $(PMAPVERS) + +# +# $(PMAPVERS) may be empty and POSIX does not permit empty target lists. +# We add an impossible target to make sure there is no empty target. +# +$(PMAPVERS) No/TaR/GeT: $(MAPVERS) + @echo " ==> LOCALIZING mapfile \"$@\""; \ + $(CPPX) $(CPPFLAGS) $^ > $@ || $(RM) $(RM_FORCE) $@ + _INSMODEI= $(_UNIQ)$(INSMODE) __INSMODEI= $(_INSMODEI:$(_UNIQ)=$(INSMODEF)) INSMODEI= $(__INSMODEI:$(_UNIQ)%=%) diff -Nru cdrtools-2.01.01a33/RULES/rules.sps cdrtools-3.02a09/RULES/rules.sps --- cdrtools-2.01.01a33/RULES/rules.sps 2007-05-06 12:50:26.000000000 +0000 +++ cdrtools-3.02a09/RULES/rules.sps 2017-08-03 22:11:34.000000000 +0000 @@ -1,6 +1,6 @@ -#ident "@(#)rules.sps 1.13 07/05/06 " +#ident "@(#)rules.sps 1.15 17/08/04 " ########################################################################### -# Written 2005 by J. Schilling +# Written 2005-2013 by J. Schilling ########################################################################### # # Rules for wrapping around other make systems @@ -14,6 +14,8 @@ # with the License. # # See the file CDDL.Schily.txt in this distribution for details. +# A copy of the CDDL is also available via the Internet at +# http://www.opensource.org/licenses/cddl1.txt # # When distributing Covered Code, include this CDDL HEADER in each # file and include the License file CDDL.Schily.txt from this distribution. @@ -39,10 +41,10 @@ ########################################################################### all: $(ARCHDIR)/config.status $(POSTCONFIG) - cd $(ARCHDIR)/; $(MAKE) $(MAKEMACS) $(MAKEOPTS) $@ + cd $(ARCHDIR)/; "$(MAKE)" $(MAKEMACS) $(MAKEOPTS) $@ install: all - cd $(ARCHDIR)/; DESTDIR=$(DEST_DIR) $(MAKE) $(MAKEMACS) $(MAKEOPTS) DESTDIR=$(DEST_DIR) $@ + cd $(ARCHDIR)/; DESTDIR=$(DEST_DIR) "$(MAKE)" $(MAKEMACS) $(MAKEOPTS) DESTDIR=$(DEST_DIR) $@ # # Hack until the --*cc.rul files are updated @@ -50,9 +52,9 @@ _HCC_COM= $(OARCH:%-gcc=gcc) HCC_COM= $(_HCC_COM:%-cc=cc) -_CC_COM= $(_UNIQ)$(CC_COM) -__CC_COM= $(_CC_COM:$(_UNIQ)=$(HCC_COM)) -XCC_COM= $(__CC_COM:$(_UNIQ)%=%) +_XCC_COM= $(_UNIQ)$(CC_COM) +__XCC_COM= $(_XCC_COM:$(_UNIQ)=$(HCC_COM)) +XCC_COM= $(__XCC_COM:$(_UNIQ)%=%) _CONF_SCRIPT= $(_UNIQ)$(CONF_SCRIPT) __CONF_SCRIPT= $(_CONF_SCRIPT:$(_UNIQ)=configure) diff -Nru cdrtools-2.01.01a33/RULES/rules.tag cdrtools-3.02a09/RULES/rules.tag --- cdrtools-2.01.01a33/RULES/rules.tag 2006-05-14 11:55:29.000000000 +0000 +++ cdrtools-3.02a09/RULES/rules.tag 2007-12-01 18:50:52.000000000 +0000 @@ -9,7 +9,7 @@ # Copyright (c) J. Schilling ########################################################################### # The contents of this file are subject to the terms of the -# Common Development and Distribution License, Version 1.0 only. +# Common Development and Distribution License, Version 1.0 only # (the "License"). You may not use this file except in compliance # with the License. # diff -Nru cdrtools-2.01.01a33/RULES/rules.top cdrtools-3.02a09/RULES/rules.top --- cdrtools-2.01.01a33/RULES/rules.top 2006-05-14 11:55:29.000000000 +0000 +++ cdrtools-3.02a09/RULES/rules.top 2017-05-08 22:39:15.000000000 +0000 @@ -1,4 +1,4 @@ -#ident "@(#)rules.top 1.16 06/05/14 " +#ident "@(#)rules.top 1.23 17/05/09 " ########################################################################### # Written 1996 by J. Schilling ########################################################################### @@ -10,16 +10,62 @@ # Copyright (c) J. Schilling ########################################################################### # The contents of this file are subject to the terms of the -# Common Development and Distribution License, Version 1.0 only. +# Common Development and Distribution License, Version 1.0 only # (the "License"). You may not use this file except in compliance # with the License. # # See the file CDDL.Schily.txt in this distribution for details. +# A copy of the CDDL is also available via the Internet at +# http://www.opensource.org/licenses/cddl1.txt # # When distributing Covered Code, include this CDDL HEADER in each # file and include the License file CDDL.Schily.txt from this distribution. ########################################################################### # +# Make sure this becomes the default target +# +########################################################################### +all: + +########################################################################### +# +# First make sure that all symlinks in $(SRCROOT)/$(RULESDIR)/ are present +# +# $(DUMMY_LNK) is needed to work around a Sun make bug that has been +# fixed with Solaris 11 but that is present for all old Solaris versions. +# +########################################################################### +_DUMMY_LNK= $(SRCROOT)/$(RULESDIR)/ldummy.lnk +DUMMY_LNK= $(_DUMMY_LNK:./%=%) + +$(DUMMY_LNK): + @echo " ==> MAKING SYMLINKS in $(SRCROOT)/$(RULESDIR)/" && \ + cd $(SRCROOT)/$(RULESDIR) && sh ./MKLINKS + @echo " ==> MAKING SYMLINKS in $(SRCROOT)/TEMPLATES/" && \ + cd $(SRCROOT)/TEMPLATES && sh ./MKLINKS + +include $(DUMMY_LNK) + +########################################################################### +# +# SunPro make and gmake both include a COMPILE.c in the built in rules. +# Clear this here, to avoid trouble. We are still able to use COMPILE.c= +# command line macros to overwrite this. +# +########################################################################### +COMPILE.c= + +########################################################################### +# +# SunPro make and gmake both include a COMPILE.cc in the built in rules. +# Clear this here, to avoid trouble. We are still able to use COMPILE.cc= +# command line macros to overwrite this. +# +########################################################################### +COMPILE.cc= + +########################################################################### +# # Include global language independent macros # ########################################################################### @@ -27,6 +73,15 @@ ########################################################################### # +# Workaround for GNU make design bug (include does not trigger rule evaluation) +# A correctly working "make" did create the symlinks already while +# including "ldummy.lnk" above. +# +########################################################################### +$(SRCROOT)/$(RULESDIR)/$(XARCH).rul: $(SRCROOT)/$(RULESDIR)/ldummy.lnk + +########################################################################### +# # Include platform dependent macros for C-language here. # # If a project needs other languages too, additional rules may be defined. diff -Nru cdrtools-2.01.01a33/RULES/rules.tpk cdrtools-3.02a09/RULES/rules.tpk --- cdrtools-2.01.01a33/RULES/rules.tpk 2006-05-14 11:55:29.000000000 +0000 +++ cdrtools-3.02a09/RULES/rules.tpk 2017-08-03 22:11:34.000000000 +0000 @@ -1,4 +1,4 @@ -#ident "@(#)rules.tpk 1.4 06/05/14 " +#ident "@(#)rules.tpk 1.8 17/08/04 " ########################################################################### # Written 2005 by J. Schilling ########################################################################### @@ -9,11 +9,13 @@ # Copyright (c) J. Schilling ########################################################################### # The contents of this file are subject to the terms of the -# Common Development and Distribution License, Version 1.0 only. +# Common Development and Distribution License, Version 1.0 only # (the "License"). You may not use this file except in compliance # with the License. # # See the file CDDL.Schily.txt in this distribution for details. +# A copy of the CDDL is also available via the Internet at +# http://www.opensource.org/licenses/cddl1.txt # # When distributing Covered Code, include this CDDL HEADER in each # file and include the License file CDDL.Schily.txt from this distribution. @@ -44,21 +46,23 @@ echo "'$(TARGETAR)'" echo "'$(TARGETAR).tar'" -tarpkg: $(OTARSDIR) tarpkg1 tarpkg2 +tarpkg: $(OTARSDIR) tarpkg0 tarpkg1 tarpkg2 -tarpkg1: +tarpkg0: rm -rf tarpkg - mkdir -p tarpkg tarpkg/$(INS_BASE)/bin tarpkg/$(INS_BASE)/sbin tarpkg/$(INS_BASE)/etc \ - tarpkg/$(INS_BASE)/lib tarpkg/$(INS_BASE)/share/man - ln -s share/man tarpkg/$(INS_BASE)/man + +tarpkg1: + mkdir -p tarpkg tarpkg/$(INSBASE)/bin tarpkg/$(INSBASE)/sbin tarpkg/$(INSBASE)/etc \ + tarpkg/$(INSBASE)/lib tarpkg/$(INSBASE)/share/man + ln -s share/man tarpkg/$(INSBASE)/man if [ ."$(PRE_INST_CMDS)" != . ]; then cd tarpkg && eval "$(PRE_INST_CMDS)" ; fi - $(MAKE) $(MAKE_FILE) DESTDIR=`pwd`/tarpkg install + "$(MAKE)" $(MAKE_FILE) $(MAKEMACS) DESTDIR=`pwd`/tarpkg install if [ ."$(POST_INST_CMDS)" != . ]; then cd tarpkg && eval "$(POST_INST_CMDS)" ; fi -if [ ."$(STRIPLIST)" != . ]; then chmod u+w $(STRIPLIST:%=tarpkg/%); strip $(STRIPLIST:%=tarpkg/%); fi -if [ ."$(STRIPXLIST)" != . ]; then chmod u+w $(STRIPXLIST:%=tarpkg/%); strip -x $(STRIPXLIST:%=tarpkg/%); fi -if [ ."$(MCSLIST)" != . ]; then chmod u+w $(MCSLIST:%=tarpkg/%); mcs -d -a "$(MCS_PROJECTNAME)" $(MCSLIST:%=tarpkg/%); fi if [ ."$(POST_STRIP_CMDS)" != . ]; then cd tarpkg && eval "$(POST_STRIP_CMDS)" ; fi - find tarpkg -print | sort > /tmp/so.$$; diff filelist /tmp/so.$$; rm -f /tmp/so.$$ + find tarpkg -print | sort > /tmp/so.$$$$; diff filelist /tmp/so.$$$$; rm -f /tmp/so.$$$$ tarpkg2: star -C tarpkg/ pkglist=pkglist -cP > $(TARGETAR).tar diff -Nru cdrtools-2.01.01a33/RULES/rules.tst cdrtools-3.02a09/RULES/rules.tst --- cdrtools-2.01.01a33/RULES/rules.tst 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/RULES/rules.tst 2016-06-15 22:19:16.000000000 +0000 @@ -0,0 +1,30 @@ +#ident "@(#)rules.tst 1.1 16/06/16 " +########################################################################### +# Written 2016 by J. Schilling +########################################################################### +# +# Test rules +# +########################################################################### +# Copyright (c) J. Schilling +########################################################################### +# The contents of this file are subject to the terms of the +# Common Development and Distribution License, Version 1.0 only +# (the "License"). You may not use this file except in compliance +# with the License. +# +# See the file CDDL.Schily.txt in this distribution for details. +# A copy of the CDDL is also available via the Internet at +# http://www.opensource.org/licenses/cddl1.txt +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file CDDL.Schily.txt from this distribution. +########################################################################### + +tests: + @DIR=tests; \ + if [ -d ./$$DIR -a -r ./$$DIR/Makefile ] ; then \ + cd ./$$DIR && "$(MAKE)" $(MAKEMACS) XARCH=$(XARCH) DIRNAME=$(CURDIR)/$$DIR $@; \ + else \ + echo "NOTICE: Partial source ($(CURDIR)/$$DIR) missing";\ + fi \ diff -Nru cdrtools-2.01.01a33/RULES/s390-linux-cc.rul cdrtools-3.02a09/RULES/s390-linux-cc.rul --- cdrtools-2.01.01a33/RULES/s390-linux-cc.rul 2007-05-09 12:25:30.000000000 +0000 +++ cdrtools-3.02a09/RULES/s390-linux-cc.rul 1970-01-01 00:00:00.000000000 +0000 @@ -1,45 +0,0 @@ -#ident "@(#)i586-linux-cc.rul 1.11 07/05/09 " -########################################################################### -# Written 1996 by J. Schilling -########################################################################### -# -# Platform dependent MACROS for Linux -# -########################################################################### -# Copyright (c) J. Schilling -########################################################################### -# The contents of this file are subject to the terms of the -# Common Development and Distribution License, Version 1.0 only -# (the "License"). You may not use this file except in compliance -# with the License. -# -# See the file CDDL.Schily.txt in this distribution for details. -# -# When distributing Covered Code, include this CDDL HEADER in each -# file and include the License file CDDL.Schily.txt from this distribution. -########################################################################### -include $(SRCROOT)/$(RULESDIR)/rules.prg -########################################################################### -include $(SRCROOT)/$(RULESDIR)/cc-gcc.rul - -# -# LINUX_SRC_INCLUDE is defined in DEFAULTS/Defaults.linux -# -INCDIRSX += $(LINUX_SRC_INCLUDE) -OSDEFS += - -KDEFINES= -DKERNEL -D_KERNEL - -LIB_PREFIX= lib -LIB_SUFFIX= .a -SHL_SUFFIX= .so.1.0 - -LIB_SOCKET= -LIB_MATH= -lm -LIB_KVM= - -#LDOPTS= $(LIBS_PATH) $(LDPATH) $(RUNPATH:-R%=-Wl,-R%) -LDOPTS= $(LIBS_PATH) $(LDPATH) - -LORDER= echo -TSORT= cat diff -Nru cdrtools-2.01.01a33/RULES/s390-linux-gcc.rul cdrtools-3.02a09/RULES/s390-linux-gcc.rul --- cdrtools-2.01.01a33/RULES/s390-linux-gcc.rul 2007-05-09 12:25:30.000000000 +0000 +++ cdrtools-3.02a09/RULES/s390-linux-gcc.rul 1970-01-01 00:00:00.000000000 +0000 @@ -1,45 +0,0 @@ -#ident "@(#)i586-linux-gcc.rul 1.11 07/05/09 " -########################################################################### -# Written 1996 by J. Schilling -########################################################################### -# -# Platform dependent MACROS for Linux -# -########################################################################### -# Copyright (c) J. Schilling -########################################################################### -# The contents of this file are subject to the terms of the -# Common Development and Distribution License, Version 1.0 only -# (the "License"). You may not use this file except in compliance -# with the License. -# -# See the file CDDL.Schily.txt in this distribution for details. -# -# When distributing Covered Code, include this CDDL HEADER in each -# file and include the License file CDDL.Schily.txt from this distribution. -########################################################################### -include $(SRCROOT)/$(RULESDIR)/rules.prg -########################################################################### -include $(SRCROOT)/$(RULESDIR)/cc-gcc.rul - -# -# LINUX_SRC_INCLUDE is defined in DEFAULTS/Defaults.linux -# -INCDIRSX += $(LINUX_SRC_INCLUDE) -OSDEFS += - -KDEFINES= -DKERNEL -D_KERNEL - -LIB_PREFIX= lib -LIB_SUFFIX= .a -SHL_SUFFIX= .so.1.0 - -LIB_SOCKET= -LIB_MATH= -lm -LIB_KVM= - -#LDOPTS= $(LIBS_PATH) $(LDPATH) $(RUNPATH:-R%=-Wl,-R%) -LDOPTS= $(LIBS_PATH) $(LDPATH) - -LORDER= echo -TSORT= cat diff -Nru cdrtools-2.01.01a33/RULES/sparc64-freebsd-cc.rul cdrtools-3.02a09/RULES/sparc64-freebsd-cc.rul --- cdrtools-2.01.01a33/RULES/sparc64-freebsd-cc.rul 2007-05-08 11:03:08.000000000 +0000 +++ cdrtools-3.02a09/RULES/sparc64-freebsd-cc.rul 1970-01-01 00:00:00.000000000 +0000 @@ -1,39 +0,0 @@ -#ident "@(#)i386-freebsd-cc.rul 1.8 07/05/08 " -########################################################################### -# Written 1997 by J. Schilling -########################################################################### -# -# Platform dependent MACROS for FreeBSD -# -########################################################################### -# Copyright (c) J. Schilling -########################################################################### -# The contents of this file are subject to the terms of the -# Common Development and Distribution License, Version 1.0 only -# (the "License"). You may not use this file except in compliance -# with the License. -# -# See the file CDDL.Schily.txt in this distribution for details. -# -# When distributing Covered Code, include this CDDL HEADER in each -# file and include the License file CDDL.Schily.txt from this distribution. -########################################################################### -include $(SRCROOT)/$(RULESDIR)/rules.prg -########################################################################### -include $(SRCROOT)/$(RULESDIR)/cc-gcc.rul - -OSDEFS += - -KDEFINES= -DKERNEL -D_KERNEL - -LIB_PREFIX= lib -LIB_SUFFIX= .a -SHL_SUFFIX= .so.1.0 - -LIB_SOCKET= -LIB_MATH= -lm -LIB_KVM= - -LDOPTS= $(LIBS_PATH) $(LDPATH) - -RANLIB= @echo " ==> RANDOMIZING ARCHIVE \"$@\""; ranlib diff -Nru cdrtools-2.01.01a33/RULES/sparc64-freebsd-gcc.rul cdrtools-3.02a09/RULES/sparc64-freebsd-gcc.rul --- cdrtools-2.01.01a33/RULES/sparc64-freebsd-gcc.rul 2007-05-08 11:03:08.000000000 +0000 +++ cdrtools-3.02a09/RULES/sparc64-freebsd-gcc.rul 1970-01-01 00:00:00.000000000 +0000 @@ -1,39 +0,0 @@ -#ident "@(#)i386-freebsd-gcc.rul 1.8 07/05/08 " -########################################################################### -# Written 1997 by J. Schilling -########################################################################### -# -# Platform dependent MACROS for FreeBSD -# -########################################################################### -# Copyright (c) J. Schilling -########################################################################### -# The contents of this file are subject to the terms of the -# Common Development and Distribution License, Version 1.0 only -# (the "License"). You may not use this file except in compliance -# with the License. -# -# See the file CDDL.Schily.txt in this distribution for details. -# -# When distributing Covered Code, include this CDDL HEADER in each -# file and include the License file CDDL.Schily.txt from this distribution. -########################################################################### -include $(SRCROOT)/$(RULESDIR)/rules.prg -########################################################################### -include $(SRCROOT)/$(RULESDIR)/cc-gcc.rul - -OSDEFS += - -KDEFINES= -DKERNEL -D_KERNEL - -LIB_PREFIX= lib -LIB_SUFFIX= .a -SHL_SUFFIX= .so.1.0 - -LIB_SOCKET= -LIB_MATH= -lm -LIB_KVM= - -LDOPTS= $(LIBS_PATH) $(LDPATH) - -RANLIB= @echo " ==> RANDOMIZING ARCHIVE \"$@\""; ranlib diff -Nru cdrtools-2.01.01a33/RULES/sparc64-linux-cc.rul cdrtools-3.02a09/RULES/sparc64-linux-cc.rul --- cdrtools-2.01.01a33/RULES/sparc64-linux-cc.rul 2007-05-09 12:25:30.000000000 +0000 +++ cdrtools-3.02a09/RULES/sparc64-linux-cc.rul 1970-01-01 00:00:00.000000000 +0000 @@ -1,45 +0,0 @@ -#ident "@(#)i586-linux-cc.rul 1.11 07/05/09 " -########################################################################### -# Written 1996 by J. Schilling -########################################################################### -# -# Platform dependent MACROS for Linux -# -########################################################################### -# Copyright (c) J. Schilling -########################################################################### -# The contents of this file are subject to the terms of the -# Common Development and Distribution License, Version 1.0 only -# (the "License"). You may not use this file except in compliance -# with the License. -# -# See the file CDDL.Schily.txt in this distribution for details. -# -# When distributing Covered Code, include this CDDL HEADER in each -# file and include the License file CDDL.Schily.txt from this distribution. -########################################################################### -include $(SRCROOT)/$(RULESDIR)/rules.prg -########################################################################### -include $(SRCROOT)/$(RULESDIR)/cc-gcc.rul - -# -# LINUX_SRC_INCLUDE is defined in DEFAULTS/Defaults.linux -# -INCDIRSX += $(LINUX_SRC_INCLUDE) -OSDEFS += - -KDEFINES= -DKERNEL -D_KERNEL - -LIB_PREFIX= lib -LIB_SUFFIX= .a -SHL_SUFFIX= .so.1.0 - -LIB_SOCKET= -LIB_MATH= -lm -LIB_KVM= - -#LDOPTS= $(LIBS_PATH) $(LDPATH) $(RUNPATH:-R%=-Wl,-R%) -LDOPTS= $(LIBS_PATH) $(LDPATH) - -LORDER= echo -TSORT= cat diff -Nru cdrtools-2.01.01a33/RULES/sparc64-linux-gcc.rul cdrtools-3.02a09/RULES/sparc64-linux-gcc.rul --- cdrtools-2.01.01a33/RULES/sparc64-linux-gcc.rul 2007-05-09 12:25:30.000000000 +0000 +++ cdrtools-3.02a09/RULES/sparc64-linux-gcc.rul 1970-01-01 00:00:00.000000000 +0000 @@ -1,45 +0,0 @@ -#ident "@(#)i586-linux-gcc.rul 1.11 07/05/09 " -########################################################################### -# Written 1996 by J. Schilling -########################################################################### -# -# Platform dependent MACROS for Linux -# -########################################################################### -# Copyright (c) J. Schilling -########################################################################### -# The contents of this file are subject to the terms of the -# Common Development and Distribution License, Version 1.0 only -# (the "License"). You may not use this file except in compliance -# with the License. -# -# See the file CDDL.Schily.txt in this distribution for details. -# -# When distributing Covered Code, include this CDDL HEADER in each -# file and include the License file CDDL.Schily.txt from this distribution. -########################################################################### -include $(SRCROOT)/$(RULESDIR)/rules.prg -########################################################################### -include $(SRCROOT)/$(RULESDIR)/cc-gcc.rul - -# -# LINUX_SRC_INCLUDE is defined in DEFAULTS/Defaults.linux -# -INCDIRSX += $(LINUX_SRC_INCLUDE) -OSDEFS += - -KDEFINES= -DKERNEL -D_KERNEL - -LIB_PREFIX= lib -LIB_SUFFIX= .a -SHL_SUFFIX= .so.1.0 - -LIB_SOCKET= -LIB_MATH= -lm -LIB_KVM= - -#LDOPTS= $(LIBS_PATH) $(LDPATH) $(RUNPATH:-R%=-Wl,-R%) -LDOPTS= $(LIBS_PATH) $(LDPATH) - -LORDER= echo -TSORT= cat diff -Nru cdrtools-2.01.01a33/RULES/sparc-bsd-os3-cc.rul cdrtools-3.02a09/RULES/sparc-bsd-os3-cc.rul --- cdrtools-2.01.01a33/RULES/sparc-bsd-os3-cc.rul 2007-05-09 12:25:30.000000000 +0000 +++ cdrtools-3.02a09/RULES/sparc-bsd-os3-cc.rul 1970-01-01 00:00:00.000000000 +0000 @@ -1,54 +0,0 @@ -#ident "@(#)i386-bsd-os3-cc.rul 1.12 07/05/09 " -########################################################################### -# Written 1998 by J. Schilling -########################################################################### -# -# Platform dependent MACROS for BSD/OS -# -########################################################################### -# Copyright (c) J. Schilling -########################################################################### -# The contents of this file are subject to the terms of the -# Common Development and Distribution License, Version 1.0 only -# (the "License"). You may not use this file except in compliance -# with the License. -# -# See the file CDDL.Schily.txt in this distribution for details. -# -# When distributing Covered Code, include this CDDL HEADER in each -# file and include the License file CDDL.Schily.txt from this distribution. -########################################################################### -include $(SRCROOT)/$(RULESDIR)/rules.prg -########################################################################### -include $(SRCROOT)/$(RULESDIR)/cc-gcc.rul - -OSDEFS += -CPPOPTS= -I$(ARCHDIR) -I$(OINCSDIR) $(INCDIRS:%=-I%) -I/sys $(INCDIRSX:%=-I%) $(OSDEFS) - -KDEFINES= -DKERNEL -D_KERNEL - -#COPTDYN= -fpic -COPTDYN= - -LIB_PREFIX= lib -LIB_SUFFIX= .a -#SHL_SUFFIX= .so.1.0 -SHL_SUFFIX= - -LIB_SOCKET= -LIB_MATH= -lm -LIB_KVM= - -#LDOPTS= $(LIBS_PATH) $(LDPATH) $(RUNPATH:-R%=-Wl,-R%) -LDOPTS= $(LIBS_PATH) $(LDPATH) -#LDOPTDYN= -shared -Wl,-soname,$(TARGET) -#LNDYNLIB= @$(RM) $(RM_FORCE) $(PTARGET_BASE).so; $(SYMLINK) $(TARGET) $(PTARGET_BASE).so -LDOPTDYN= -LNDYNLIB= - -# shlicc2 is not present oln older or newer systems -#LDCC= @echo " ==> LINKING \"$@\""; shlicc2 -LDCC= @echo " ==> LINKING \"$@\""; shlicc -#DYNLD= @echo " ==> LINKING dynamic library \"$@\""; gcc -DYNLD= -RANLIB= @echo " ==> RANDOMIZING ARCHIVE \"$@\""; ranlib diff -Nru cdrtools-2.01.01a33/RULES/sparc-bsd-os3-gcc.rul cdrtools-3.02a09/RULES/sparc-bsd-os3-gcc.rul --- cdrtools-2.01.01a33/RULES/sparc-bsd-os3-gcc.rul 2007-05-09 12:25:30.000000000 +0000 +++ cdrtools-3.02a09/RULES/sparc-bsd-os3-gcc.rul 1970-01-01 00:00:00.000000000 +0000 @@ -1,54 +0,0 @@ -#ident "@(#)i386-bsd-os3-gcc.rul 1.12 07/05/09 " -########################################################################### -# Written 1998 by J. Schilling -########################################################################### -# -# Platform dependent MACROS for BSD/OS -# -########################################################################### -# Copyright (c) J. Schilling -########################################################################### -# The contents of this file are subject to the terms of the -# Common Development and Distribution License, Version 1.0 only -# (the "License"). You may not use this file except in compliance -# with the License. -# -# See the file CDDL.Schily.txt in this distribution for details. -# -# When distributing Covered Code, include this CDDL HEADER in each -# file and include the License file CDDL.Schily.txt from this distribution. -########################################################################### -include $(SRCROOT)/$(RULESDIR)/rules.prg -########################################################################### -include $(SRCROOT)/$(RULESDIR)/cc-gcc.rul - -OSDEFS += -CPPOPTS= -I$(ARCHDIR) -I$(OINCSDIR) $(INCDIRS:%=-I%) -I/sys $(INCDIRSX:%=-I%) $(OSDEFS) - -KDEFINES= -DKERNEL -D_KERNEL - -#COPTDYN= -fpic -COPTDYN= - -LIB_PREFIX= lib -LIB_SUFFIX= .a -#SHL_SUFFIX= .so.1.0 -SHL_SUFFIX= - -LIB_SOCKET= -LIB_MATH= -lm -LIB_KVM= - -#LDOPTS= $(LIBS_PATH) $(LDPATH) $(RUNPATH:-R%=-Wl,-R%) -LDOPTS= $(LIBS_PATH) $(LDPATH) -#LDOPTDYN= -shared -Wl,-soname,$(TARGET) -#LNDYNLIB= @$(RM) $(RM_FORCE) $(PTARGET_BASE).so; $(SYMLINK) $(TARGET) $(PTARGET_BASE).so -LDOPTDYN= -LNDYNLIB= - -# shlicc2 is not present oln older or newer systems -#LDCC= @echo " ==> LINKING \"$@\""; shlicc2 -LDCC= @echo " ==> LINKING \"$@\""; shlicc -#DYNLD= @echo " ==> LINKING dynamic library \"$@\""; gcc -DYNLD= -RANLIB= @echo " ==> RANDOMIZING ARCHIVE \"$@\""; ranlib diff -Nru cdrtools-2.01.01a33/RULES/sparc-bsd-os-cc.rul cdrtools-3.02a09/RULES/sparc-bsd-os-cc.rul --- cdrtools-2.01.01a33/RULES/sparc-bsd-os-cc.rul 2007-05-09 12:25:30.000000000 +0000 +++ cdrtools-3.02a09/RULES/sparc-bsd-os-cc.rul 1970-01-01 00:00:00.000000000 +0000 @@ -1,49 +0,0 @@ -#ident "@(#)i386-bsd-os-cc.rul 1.14 07/05/09 " -########################################################################### -# Written 1998 by J. Schilling -########################################################################### -# -# Platform dependent MACROS for BSD/OS -# -########################################################################### -# Copyright (c) J. Schilling -########################################################################### -# The contents of this file are subject to the terms of the -# Common Development and Distribution License, Version 1.0 only -# (the "License"). You may not use this file except in compliance -# with the License. -# -# See the file CDDL.Schily.txt in this distribution for details. -# -# When distributing Covered Code, include this CDDL HEADER in each -# file and include the License file CDDL.Schily.txt from this distribution. -########################################################################### -include $(SRCROOT)/$(RULESDIR)/rules.prg -########################################################################### -include $(SRCROOT)/$(RULESDIR)/cc-gcc.rul - -OSDEFS += -CPPOPTS= -I$(ARCHDIR) -I$(OINCSDIR) $(INCDIRS:%=-I%) -I/sys $(INCDIRSX:%=-I%) $(OSDEFS) - -KDEFINES= -DKERNEL -D_KERNEL - -#COPTDYN= -fpic -COPTDYN= - -LIB_PREFIX= lib -LIB_SUFFIX= .a -#SHL_SUFFIX= .so.1.0 -SHL_SUFFIX= - -LIB_SOCKET= -LIB_MATH= -lm -LIB_KVM= - -#LDOPTS= $(LIBS_PATH) $(LDPATH) $(RUNPATH:-R%=-Wl,-R%) -LDOPTS= $(LIBS_PATH) $(LDPATH) -#LDOPTDYN= -shared -Wl,-soname,$(TARGET) -#LNDYNLIB= @$(RM) $(RM_FORCE) $(PTARGET_BASE).so; $(SYMLINK) $(TARGET) $(PTARGET_BASE).so -LDOPTDYN= -LNDYNLIB= - -RANLIB= @echo " ==> RANDOMIZING ARCHIVE \"$@\""; ranlib diff -Nru cdrtools-2.01.01a33/RULES/sparc-bsd-os-gcc.rul cdrtools-3.02a09/RULES/sparc-bsd-os-gcc.rul --- cdrtools-2.01.01a33/RULES/sparc-bsd-os-gcc.rul 2007-05-09 12:25:30.000000000 +0000 +++ cdrtools-3.02a09/RULES/sparc-bsd-os-gcc.rul 1970-01-01 00:00:00.000000000 +0000 @@ -1,49 +0,0 @@ -#ident "@(#)i386-bsd-os-gcc.rul 1.14 07/05/09 " -########################################################################### -# Written 1998 by J. Schilling -########################################################################### -# -# Platform dependent MACROS for BSD/OS -# -########################################################################### -# Copyright (c) J. Schilling -########################################################################### -# The contents of this file are subject to the terms of the -# Common Development and Distribution License, Version 1.0 only -# (the "License"). You may not use this file except in compliance -# with the License. -# -# See the file CDDL.Schily.txt in this distribution for details. -# -# When distributing Covered Code, include this CDDL HEADER in each -# file and include the License file CDDL.Schily.txt from this distribution. -########################################################################### -include $(SRCROOT)/$(RULESDIR)/rules.prg -########################################################################### -include $(SRCROOT)/$(RULESDIR)/cc-gcc.rul - -OSDEFS += -CPPOPTS= -I$(ARCHDIR) -I$(OINCSDIR) $(INCDIRS:%=-I%) -I/sys $(INCDIRSX:%=-I%) $(OSDEFS) - -KDEFINES= -DKERNEL -D_KERNEL - -#COPTDYN= -fpic -COPTDYN= - -LIB_PREFIX= lib -LIB_SUFFIX= .a -#SHL_SUFFIX= .so.1.0 -SHL_SUFFIX= - -LIB_SOCKET= -LIB_MATH= -lm -LIB_KVM= - -#LDOPTS= $(LIBS_PATH) $(LDPATH) $(RUNPATH:-R%=-Wl,-R%) -LDOPTS= $(LIBS_PATH) $(LDPATH) -#LDOPTDYN= -shared -Wl,-soname,$(TARGET) -#LNDYNLIB= @$(RM) $(RM_FORCE) $(PTARGET_BASE).so; $(SYMLINK) $(TARGET) $(PTARGET_BASE).so -LDOPTDYN= -LNDYNLIB= - -RANLIB= @echo " ==> RANDOMIZING ARCHIVE \"$@\""; ranlib diff -Nru cdrtools-2.01.01a33/RULES/sparc-linux-cc.rul cdrtools-3.02a09/RULES/sparc-linux-cc.rul --- cdrtools-2.01.01a33/RULES/sparc-linux-cc.rul 2007-05-09 12:25:30.000000000 +0000 +++ cdrtools-3.02a09/RULES/sparc-linux-cc.rul 1970-01-01 00:00:00.000000000 +0000 @@ -1,45 +0,0 @@ -#ident "@(#)i586-linux-cc.rul 1.11 07/05/09 " -########################################################################### -# Written 1996 by J. Schilling -########################################################################### -# -# Platform dependent MACROS for Linux -# -########################################################################### -# Copyright (c) J. Schilling -########################################################################### -# The contents of this file are subject to the terms of the -# Common Development and Distribution License, Version 1.0 only -# (the "License"). You may not use this file except in compliance -# with the License. -# -# See the file CDDL.Schily.txt in this distribution for details. -# -# When distributing Covered Code, include this CDDL HEADER in each -# file and include the License file CDDL.Schily.txt from this distribution. -########################################################################### -include $(SRCROOT)/$(RULESDIR)/rules.prg -########################################################################### -include $(SRCROOT)/$(RULESDIR)/cc-gcc.rul - -# -# LINUX_SRC_INCLUDE is defined in DEFAULTS/Defaults.linux -# -INCDIRSX += $(LINUX_SRC_INCLUDE) -OSDEFS += - -KDEFINES= -DKERNEL -D_KERNEL - -LIB_PREFIX= lib -LIB_SUFFIX= .a -SHL_SUFFIX= .so.1.0 - -LIB_SOCKET= -LIB_MATH= -lm -LIB_KVM= - -#LDOPTS= $(LIBS_PATH) $(LDPATH) $(RUNPATH:-R%=-Wl,-R%) -LDOPTS= $(LIBS_PATH) $(LDPATH) - -LORDER= echo -TSORT= cat diff -Nru cdrtools-2.01.01a33/RULES/sparc-linux-gcc.rul cdrtools-3.02a09/RULES/sparc-linux-gcc.rul --- cdrtools-2.01.01a33/RULES/sparc-linux-gcc.rul 2007-05-09 12:25:30.000000000 +0000 +++ cdrtools-3.02a09/RULES/sparc-linux-gcc.rul 1970-01-01 00:00:00.000000000 +0000 @@ -1,45 +0,0 @@ -#ident "@(#)i586-linux-gcc.rul 1.11 07/05/09 " -########################################################################### -# Written 1996 by J. Schilling -########################################################################### -# -# Platform dependent MACROS for Linux -# -########################################################################### -# Copyright (c) J. Schilling -########################################################################### -# The contents of this file are subject to the terms of the -# Common Development and Distribution License, Version 1.0 only -# (the "License"). You may not use this file except in compliance -# with the License. -# -# See the file CDDL.Schily.txt in this distribution for details. -# -# When distributing Covered Code, include this CDDL HEADER in each -# file and include the License file CDDL.Schily.txt from this distribution. -########################################################################### -include $(SRCROOT)/$(RULESDIR)/rules.prg -########################################################################### -include $(SRCROOT)/$(RULESDIR)/cc-gcc.rul - -# -# LINUX_SRC_INCLUDE is defined in DEFAULTS/Defaults.linux -# -INCDIRSX += $(LINUX_SRC_INCLUDE) -OSDEFS += - -KDEFINES= -DKERNEL -D_KERNEL - -LIB_PREFIX= lib -LIB_SUFFIX= .a -SHL_SUFFIX= .so.1.0 - -LIB_SOCKET= -LIB_MATH= -lm -LIB_KVM= - -#LDOPTS= $(LIBS_PATH) $(LDPATH) $(RUNPATH:-R%=-Wl,-R%) -LDOPTS= $(LIBS_PATH) $(LDPATH) - -LORDER= echo -TSORT= cat diff -Nru cdrtools-2.01.01a33/RULES/sparc-netbsd-cc.rul cdrtools-3.02a09/RULES/sparc-netbsd-cc.rul --- cdrtools-2.01.01a33/RULES/sparc-netbsd-cc.rul 2007-05-09 12:25:30.000000000 +0000 +++ cdrtools-3.02a09/RULES/sparc-netbsd-cc.rul 1970-01-01 00:00:00.000000000 +0000 @@ -1,41 +0,0 @@ -#ident "@(#)i386-netbsd-cc.rul 1.11 07/05/09 " -########################################################################### -# Written 1997 by J. Schilling -########################################################################### -# -# Platform dependent MACROS for NetBSD -# -########################################################################### -# Copyright (c) J. Schilling -########################################################################### -# The contents of this file are subject to the terms of the -# Common Development and Distribution License, Version 1.0 only -# (the "License"). You may not use this file except in compliance -# with the License. -# -# See the file CDDL.Schily.txt in this distribution for details. -# -# When distributing Covered Code, include this CDDL HEADER in each -# file and include the License file CDDL.Schily.txt from this distribution. -########################################################################### -include $(SRCROOT)/$(RULESDIR)/rules.prg -########################################################################### -include $(SRCROOT)/$(RULESDIR)/cc-gcc.rul - -OSDEFS += -#OSDEFS += -DIS_UNIX - -KDEFINES= -DKERNEL -D_KERNEL - -LIB_PREFIX= lib -LIB_SUFFIX= .a -SHL_SUFFIX= .so.1.0 - -LIB_SOCKET= -LIB_MATH= -lm -LIB_KVM= - -#LDOPTS= $(LIBS_PATH) $(LDPATH) $(RUNPATH:-R%=-Wl,-R%) -LDOPTS= $(LIBS_PATH) $(LDPATH) - -RANLIB= @echo " ==> RANDOMIZING ARCHIVE \"$@\""; ranlib diff -Nru cdrtools-2.01.01a33/RULES/sparc-netbsd-gcc.rul cdrtools-3.02a09/RULES/sparc-netbsd-gcc.rul --- cdrtools-2.01.01a33/RULES/sparc-netbsd-gcc.rul 2007-05-09 12:25:30.000000000 +0000 +++ cdrtools-3.02a09/RULES/sparc-netbsd-gcc.rul 1970-01-01 00:00:00.000000000 +0000 @@ -1,41 +0,0 @@ -#ident "@(#)i386-netbsd-gcc.rul 1.11 07/05/09 " -########################################################################### -# Written 1997 by J. Schilling -########################################################################### -# -# Platform dependent MACROS for NetBSD -# -########################################################################### -# Copyright (c) J. Schilling -########################################################################### -# The contents of this file are subject to the terms of the -# Common Development and Distribution License, Version 1.0 only -# (the "License"). You may not use this file except in compliance -# with the License. -# -# See the file CDDL.Schily.txt in this distribution for details. -# -# When distributing Covered Code, include this CDDL HEADER in each -# file and include the License file CDDL.Schily.txt from this distribution. -########################################################################### -include $(SRCROOT)/$(RULESDIR)/rules.prg -########################################################################### -include $(SRCROOT)/$(RULESDIR)/cc-gcc.rul - -OSDEFS += -#OSDEFS += -DIS_UNIX - -KDEFINES= -DKERNEL -D_KERNEL - -LIB_PREFIX= lib -LIB_SUFFIX= .a -SHL_SUFFIX= .so.1.0 - -LIB_SOCKET= -LIB_MATH= -lm -LIB_KVM= - -#LDOPTS= $(LIBS_PATH) $(LDPATH) $(RUNPATH:-R%=-Wl,-R%) -LDOPTS= $(LIBS_PATH) $(LDPATH) - -RANLIB= @echo " ==> RANDOMIZING ARCHIVE \"$@\""; ranlib diff -Nru cdrtools-2.01.01a33/RULES/sparc-nextstep-cc.rul cdrtools-3.02a09/RULES/sparc-nextstep-cc.rul --- cdrtools-2.01.01a33/RULES/sparc-nextstep-cc.rul 2007-05-09 12:25:30.000000000 +0000 +++ cdrtools-3.02a09/RULES/sparc-nextstep-cc.rul 1970-01-01 00:00:00.000000000 +0000 @@ -1,52 +0,0 @@ -#ident "@(#)hppa-nextstep-cc.rul 1.10 07/05/09 " -########################################################################### -# Written 1996 by J. Schilling -########################################################################### -# -# Platform dependent MACROS for NeXT Step on hppa (GCC) -# -########################################################################### -# Copyright (c) J. Schilling -########################################################################### -# The contents of this file are subject to the terms of the -# Common Development and Distribution License, Version 1.0 only -# (the "License"). You may not use this file except in compliance -# with the License. -# -# See the file CDDL.Schily.txt in this distribution for details. -# -# When distributing Covered Code, include this CDDL HEADER in each -# file and include the License file CDDL.Schily.txt from this distribution. -########################################################################### -include $(SRCROOT)/$(RULESDIR)/rules.prg -########################################################################### -include $(SRCROOT)/$(RULESDIR)/cc-gcc.rul - -OSDEFS += - -KDEFINES= -DKERNEL -D_KERNEL - -LIB_PREFIX= lib -LIB_SUFFIX= .a -SHL_SUFFIX= .so.1.0 - -LIB_SOCKET= -LIB_MATH= -lm -LIB_KVM= - -#LDOPTS= $(LIBS_PATH) $(LDPATH) $(RUNPATH:-R%=-Wl,-R%) -LDOPTS= $(LIBS_PATH) $(LDPATH) -LDOPTDYN= -LNDYNLIB= @ - -DYNLD= @echo " ==> LINKING dynamic library \"$@\""; ld -RANLIB= @echo " ==> RANDOMIZING ARCHIVE \"$@\""; ranlib - -MKDIR= $(MKDIR_SH) - -#### -# XXX Better use something like CC=cc -#### -CC= @echo " ==> COMPILING \"$@\""; cc -LDCC= @echo " ==> LINKING \"$@\""; cc -MKDEP= @echo " ==> MAKING DEPENDENCIES \"$@\""; $(RMDEP); cc -M diff -Nru cdrtools-2.01.01a33/RULES/sparc-nextstep-gcc.rul cdrtools-3.02a09/RULES/sparc-nextstep-gcc.rul --- cdrtools-2.01.01a33/RULES/sparc-nextstep-gcc.rul 2007-05-09 12:25:30.000000000 +0000 +++ cdrtools-3.02a09/RULES/sparc-nextstep-gcc.rul 1970-01-01 00:00:00.000000000 +0000 @@ -1,52 +0,0 @@ -#ident "@(#)hppa-nextstep-cc.rul 1.10 07/05/09 " -########################################################################### -# Written 1996 by J. Schilling -########################################################################### -# -# Platform dependent MACROS for NeXT Step on hppa (GCC) -# -########################################################################### -# Copyright (c) J. Schilling -########################################################################### -# The contents of this file are subject to the terms of the -# Common Development and Distribution License, Version 1.0 only -# (the "License"). You may not use this file except in compliance -# with the License. -# -# See the file CDDL.Schily.txt in this distribution for details. -# -# When distributing Covered Code, include this CDDL HEADER in each -# file and include the License file CDDL.Schily.txt from this distribution. -########################################################################### -include $(SRCROOT)/$(RULESDIR)/rules.prg -########################################################################### -include $(SRCROOT)/$(RULESDIR)/cc-gcc.rul - -OSDEFS += - -KDEFINES= -DKERNEL -D_KERNEL - -LIB_PREFIX= lib -LIB_SUFFIX= .a -SHL_SUFFIX= .so.1.0 - -LIB_SOCKET= -LIB_MATH= -lm -LIB_KVM= - -#LDOPTS= $(LIBS_PATH) $(LDPATH) $(RUNPATH:-R%=-Wl,-R%) -LDOPTS= $(LIBS_PATH) $(LDPATH) -LDOPTDYN= -LNDYNLIB= @ - -DYNLD= @echo " ==> LINKING dynamic library \"$@\""; ld -RANLIB= @echo " ==> RANDOMIZING ARCHIVE \"$@\""; ranlib - -MKDIR= $(MKDIR_SH) - -#### -# XXX Better use something like CC=cc -#### -CC= @echo " ==> COMPILING \"$@\""; cc -LDCC= @echo " ==> LINKING \"$@\""; cc -MKDEP= @echo " ==> MAKING DEPENDENCIES \"$@\""; $(RMDEP); cc -M diff -Nru cdrtools-2.01.01a33/RULES/sub.htm cdrtools-3.02a09/RULES/sub.htm --- cdrtools-2.01.01a33/RULES/sub.htm 2007-05-06 12:55:00.000000000 +0000 +++ cdrtools-3.02a09/RULES/sub.htm 2011-09-18 11:55:27.000000000 +0000 @@ -1,4 +1,4 @@ -#ident "@(#)sub.htm 1.2 07/05/06 " +#ident "@(#)sub.htm 1.5 11/09/18 " ########################################################################### # Written 2007 by J. Schilling ########################################################################### @@ -19,7 +19,7 @@ # file and include the License file CDDL.Schily.txt from this distribution. ########################################################################### -html htmlx: +html htmlx htmlxn: @if [ ".$(XMK_FILE)" != . ] ; then \ for XMK_F in $(XMK_FILE) XxZzY-- ; do \ ( \ diff -Nru cdrtools-2.01.01a33/RULES/sun3-sunos4-gcc.rul cdrtools-3.02a09/RULES/sun3-sunos4-gcc.rul --- cdrtools-2.01.01a33/RULES/sun3-sunos4-gcc.rul 2007-05-09 12:25:30.000000000 +0000 +++ cdrtools-3.02a09/RULES/sun3-sunos4-gcc.rul 2009-06-06 21:48:52.000000000 +0000 @@ -1,4 +1,4 @@ -#ident "@(#)sun3-sunos4-gcc.rul 1.10 07/05/09 " +#ident "@(#)sun3-sunos4-gcc.rul 1.11 09/06/06 " ########################################################################### # Written 1996 by J. Schilling ########################################################################### @@ -21,6 +21,7 @@ include $(SRCROOT)/$(RULESDIR)/rules.prg ########################################################################### include $(SRCROOT)/$(RULESDIR)/cc-gcc.rul +CWOPTS= -Wall -Wshadow -Wmissing-prototypes -Wstrict-prototypes OSDEFS += diff -Nru cdrtools-2.01.01a33/RULES/sun4c-sunos4-cc.rul cdrtools-3.02a09/RULES/sun4c-sunos4-cc.rul --- cdrtools-2.01.01a33/RULES/sun4c-sunos4-cc.rul 2007-05-08 11:03:08.000000000 +0000 +++ cdrtools-3.02a09/RULES/sun4c-sunos4-cc.rul 1970-01-01 00:00:00.000000000 +0000 @@ -1,34 +0,0 @@ -#ident "@(#)sun4-sunos4-cc.rul 1.8 07/05/08 " -########################################################################### -# Written 1996 by J. Schilling -########################################################################### -# -# Platform dependent MACROS for SunOS 4.x on sparc -# -########################################################################### -# Copyright (c) J. Schilling -########################################################################### -# The contents of this file are subject to the terms of the -# Common Development and Distribution License, Version 1.0 only -# (the "License"). You may not use this file except in compliance -# with the License. -# -# See the file CDDL.Schily.txt in this distribution for details. -# -# When distributing Covered Code, include this CDDL HEADER in each -# file and include the License file CDDL.Schily.txt from this distribution. -########################################################################### -include $(SRCROOT)/$(RULESDIR)/rules.prg -########################################################################### -include $(SRCROOT)/$(RULESDIR)/cc-sun.rul - -OSDEFS += - -KDEFINES= -DKERNEL -D_KERNEL - -LIB_SOCKET= -LIB_MATH= -lm -LIB_KVM= -lkvm - -RANLIB= @echo " ==> RANDOMIZING ARCHIVE \"$@\""; ranlib - diff -Nru cdrtools-2.01.01a33/RULES/sun4c-sunos4-gcc.rul cdrtools-3.02a09/RULES/sun4c-sunos4-gcc.rul --- cdrtools-2.01.01a33/RULES/sun4c-sunos4-gcc.rul 2007-05-08 11:03:08.000000000 +0000 +++ cdrtools-3.02a09/RULES/sun4c-sunos4-gcc.rul 1970-01-01 00:00:00.000000000 +0000 @@ -1,41 +0,0 @@ -#ident "@(#)sun4-sunos4-gcc.rul 1.8 07/05/08 " -########################################################################### -# Written 1996 by J. Schilling -########################################################################### -# -# Platform dependent MACROS for SunOS 4.x on sparc (GCC) -# -########################################################################### -# Copyright (c) J. Schilling -########################################################################### -# The contents of this file are subject to the terms of the -# Common Development and Distribution License, Version 1.0 only -# (the "License"). You may not use this file except in compliance -# with the License. -# -# See the file CDDL.Schily.txt in this distribution for details. -# -# When distributing Covered Code, include this CDDL HEADER in each -# file and include the License file CDDL.Schily.txt from this distribution. -########################################################################### -include $(SRCROOT)/$(RULESDIR)/rules.prg -########################################################################### -include $(SRCROOT)/$(RULESDIR)/cc-gcc.rul - -OSDEFS += - -KDEFINES= -DKERNEL -D_KERNEL - -LIB_PREFIX= lib -LIB_SUFFIX= .a -SHL_SUFFIX= .so.1.0 - -LIB_SOCKET= -LIB_MATH= -lm -LIB_KVM= -lkvm - -LDOPTDYN= -LNDYNLIB= @ - -DYNLD= @echo " ==> LINKING dynamic library \"$@\""; ld -RANLIB= @echo " ==> RANDOMIZING ARCHIVE \"$@\""; ranlib diff -Nru cdrtools-2.01.01a33/RULES/sun4c-sunos5-cc.rul cdrtools-3.02a09/RULES/sun4c-sunos5-cc.rul --- cdrtools-2.01.01a33/RULES/sun4c-sunos5-cc.rul 2007-05-08 11:03:08.000000000 +0000 +++ cdrtools-3.02a09/RULES/sun4c-sunos5-cc.rul 1970-01-01 00:00:00.000000000 +0000 @@ -1,37 +0,0 @@ -#ident "@(#)sun4-sunos5-cc.rul 1.11 07/05/08 " -########################################################################### -# Written 1996 by J. Schilling -########################################################################### -# -# Platform dependent MACROS for SunOS 5.x on sparc -# -########################################################################### -# Copyright (c) J. Schilling -########################################################################### -# The contents of this file are subject to the terms of the -# Common Development and Distribution License, Version 1.0 only -# (the "License"). You may not use this file except in compliance -# with the License. -# -# See the file CDDL.Schily.txt in this distribution for details. -# -# When distributing Covered Code, include this CDDL HEADER in each -# file and include the License file CDDL.Schily.txt from this distribution. -########################################################################### -include $(SRCROOT)/$(RULESDIR)/rules.prg -########################################################################### -include $(SRCROOT)/$(RULESDIR)/cc-sunpro.rul - -OSDEFS += -D__SVR4 -DSVR4 - -KDEFINES= -DKERNEL -D_KERNEL - - -LIB_SOCKET= -lsocket -lnsl -ldl -LIB_MATH= -lm -LIB_KVM= -lkvm -lelf -LIB_VOLMGT= -lvolmgt - -LDOPTDYN= -dy -G -ztext -h $(TARGET) -Mlib$(TARGETLIB)-mapvers -ldl - -ARFLAGS= crs diff -Nru cdrtools-2.01.01a33/RULES/sun4c-sunos5-gcc.rul cdrtools-3.02a09/RULES/sun4c-sunos5-gcc.rul --- cdrtools-2.01.01a33/RULES/sun4c-sunos5-gcc.rul 2007-05-08 11:03:08.000000000 +0000 +++ cdrtools-3.02a09/RULES/sun4c-sunos5-gcc.rul 1970-01-01 00:00:00.000000000 +0000 @@ -1,41 +0,0 @@ -#ident "@(#)sun4-sunos5-gcc.rul 1.13 07/05/08 " -########################################################################### -# Written 1996 by J. Schilling -########################################################################### -# -# Platform dependent MACROS for SunOS 5.x on sparc -# -########################################################################### -# Copyright (c) J. Schilling -########################################################################### -# The contents of this file are subject to the terms of the -# Common Development and Distribution License, Version 1.0 only -# (the "License"). You may not use this file except in compliance -# with the License. -# -# See the file CDDL.Schily.txt in this distribution for details. -# -# When distributing Covered Code, include this CDDL HEADER in each -# file and include the License file CDDL.Schily.txt from this distribution. -########################################################################### -include $(SRCROOT)/$(RULESDIR)/rules.prg -########################################################################### -include $(SRCROOT)/$(RULESDIR)/cc-gcc.rul - -OSDEFS += -D__SVR4 -DSVR4 - -KDEFINES= -DKERNEL -D_KERNEL - - -LIB_SOCKET= -lsocket -lnsl -ldl -LIB_MATH= -lm -LIB_KVM= -lkvm -lelf -LIB_VOLMGT= -lvolmgt - -# -# We should use -Wl,-ztext here, but gcc does not create fully compliant -# object files. -# -LDOPTDYN= -dy -G -h $(TARGET) -Wl,-Mlib$(TARGETLIB)-mapvers -ldl - -ARFLAGS= crs diff -Nru cdrtools-2.01.01a33/RULES/sun4d-sunos5-cc.rul cdrtools-3.02a09/RULES/sun4d-sunos5-cc.rul --- cdrtools-2.01.01a33/RULES/sun4d-sunos5-cc.rul 2007-05-08 11:03:08.000000000 +0000 +++ cdrtools-3.02a09/RULES/sun4d-sunos5-cc.rul 1970-01-01 00:00:00.000000000 +0000 @@ -1,37 +0,0 @@ -#ident "@(#)sun4-sunos5-cc.rul 1.11 07/05/08 " -########################################################################### -# Written 1996 by J. Schilling -########################################################################### -# -# Platform dependent MACROS for SunOS 5.x on sparc -# -########################################################################### -# Copyright (c) J. Schilling -########################################################################### -# The contents of this file are subject to the terms of the -# Common Development and Distribution License, Version 1.0 only -# (the "License"). You may not use this file except in compliance -# with the License. -# -# See the file CDDL.Schily.txt in this distribution for details. -# -# When distributing Covered Code, include this CDDL HEADER in each -# file and include the License file CDDL.Schily.txt from this distribution. -########################################################################### -include $(SRCROOT)/$(RULESDIR)/rules.prg -########################################################################### -include $(SRCROOT)/$(RULESDIR)/cc-sunpro.rul - -OSDEFS += -D__SVR4 -DSVR4 - -KDEFINES= -DKERNEL -D_KERNEL - - -LIB_SOCKET= -lsocket -lnsl -ldl -LIB_MATH= -lm -LIB_KVM= -lkvm -lelf -LIB_VOLMGT= -lvolmgt - -LDOPTDYN= -dy -G -ztext -h $(TARGET) -Mlib$(TARGETLIB)-mapvers -ldl - -ARFLAGS= crs diff -Nru cdrtools-2.01.01a33/RULES/sun4d-sunos5-gcc.rul cdrtools-3.02a09/RULES/sun4d-sunos5-gcc.rul --- cdrtools-2.01.01a33/RULES/sun4d-sunos5-gcc.rul 2007-05-08 11:03:08.000000000 +0000 +++ cdrtools-3.02a09/RULES/sun4d-sunos5-gcc.rul 1970-01-01 00:00:00.000000000 +0000 @@ -1,41 +0,0 @@ -#ident "@(#)sun4-sunos5-gcc.rul 1.13 07/05/08 " -########################################################################### -# Written 1996 by J. Schilling -########################################################################### -# -# Platform dependent MACROS for SunOS 5.x on sparc -# -########################################################################### -# Copyright (c) J. Schilling -########################################################################### -# The contents of this file are subject to the terms of the -# Common Development and Distribution License, Version 1.0 only -# (the "License"). You may not use this file except in compliance -# with the License. -# -# See the file CDDL.Schily.txt in this distribution for details. -# -# When distributing Covered Code, include this CDDL HEADER in each -# file and include the License file CDDL.Schily.txt from this distribution. -########################################################################### -include $(SRCROOT)/$(RULESDIR)/rules.prg -########################################################################### -include $(SRCROOT)/$(RULESDIR)/cc-gcc.rul - -OSDEFS += -D__SVR4 -DSVR4 - -KDEFINES= -DKERNEL -D_KERNEL - - -LIB_SOCKET= -lsocket -lnsl -ldl -LIB_MATH= -lm -LIB_KVM= -lkvm -lelf -LIB_VOLMGT= -lvolmgt - -# -# We should use -Wl,-ztext here, but gcc does not create fully compliant -# object files. -# -LDOPTDYN= -dy -G -h $(TARGET) -Wl,-Mlib$(TARGETLIB)-mapvers -ldl - -ARFLAGS= crs diff -Nru cdrtools-2.01.01a33/RULES/sun4e-sunos5-cc.rul cdrtools-3.02a09/RULES/sun4e-sunos5-cc.rul --- cdrtools-2.01.01a33/RULES/sun4e-sunos5-cc.rul 2007-05-08 11:03:08.000000000 +0000 +++ cdrtools-3.02a09/RULES/sun4e-sunos5-cc.rul 1970-01-01 00:00:00.000000000 +0000 @@ -1,37 +0,0 @@ -#ident "@(#)sun4-sunos5-cc.rul 1.11 07/05/08 " -########################################################################### -# Written 1996 by J. Schilling -########################################################################### -# -# Platform dependent MACROS for SunOS 5.x on sparc -# -########################################################################### -# Copyright (c) J. Schilling -########################################################################### -# The contents of this file are subject to the terms of the -# Common Development and Distribution License, Version 1.0 only -# (the "License"). You may not use this file except in compliance -# with the License. -# -# See the file CDDL.Schily.txt in this distribution for details. -# -# When distributing Covered Code, include this CDDL HEADER in each -# file and include the License file CDDL.Schily.txt from this distribution. -########################################################################### -include $(SRCROOT)/$(RULESDIR)/rules.prg -########################################################################### -include $(SRCROOT)/$(RULESDIR)/cc-sunpro.rul - -OSDEFS += -D__SVR4 -DSVR4 - -KDEFINES= -DKERNEL -D_KERNEL - - -LIB_SOCKET= -lsocket -lnsl -ldl -LIB_MATH= -lm -LIB_KVM= -lkvm -lelf -LIB_VOLMGT= -lvolmgt - -LDOPTDYN= -dy -G -ztext -h $(TARGET) -Mlib$(TARGETLIB)-mapvers -ldl - -ARFLAGS= crs diff -Nru cdrtools-2.01.01a33/RULES/sun4e-sunos5-gcc.rul cdrtools-3.02a09/RULES/sun4e-sunos5-gcc.rul --- cdrtools-2.01.01a33/RULES/sun4e-sunos5-gcc.rul 2007-05-08 11:03:08.000000000 +0000 +++ cdrtools-3.02a09/RULES/sun4e-sunos5-gcc.rul 1970-01-01 00:00:00.000000000 +0000 @@ -1,41 +0,0 @@ -#ident "@(#)sun4-sunos5-gcc.rul 1.13 07/05/08 " -########################################################################### -# Written 1996 by J. Schilling -########################################################################### -# -# Platform dependent MACROS for SunOS 5.x on sparc -# -########################################################################### -# Copyright (c) J. Schilling -########################################################################### -# The contents of this file are subject to the terms of the -# Common Development and Distribution License, Version 1.0 only -# (the "License"). You may not use this file except in compliance -# with the License. -# -# See the file CDDL.Schily.txt in this distribution for details. -# -# When distributing Covered Code, include this CDDL HEADER in each -# file and include the License file CDDL.Schily.txt from this distribution. -########################################################################### -include $(SRCROOT)/$(RULESDIR)/rules.prg -########################################################################### -include $(SRCROOT)/$(RULESDIR)/cc-gcc.rul - -OSDEFS += -D__SVR4 -DSVR4 - -KDEFINES= -DKERNEL -D_KERNEL - - -LIB_SOCKET= -lsocket -lnsl -ldl -LIB_MATH= -lm -LIB_KVM= -lkvm -lelf -LIB_VOLMGT= -lvolmgt - -# -# We should use -Wl,-ztext here, but gcc does not create fully compliant -# object files. -# -LDOPTDYN= -dy -G -h $(TARGET) -Wl,-Mlib$(TARGETLIB)-mapvers -ldl - -ARFLAGS= crs diff -Nru cdrtools-2.01.01a33/RULES/sun4L-sunos5-cc.rul cdrtools-3.02a09/RULES/sun4L-sunos5-cc.rul --- cdrtools-2.01.01a33/RULES/sun4L-sunos5-cc.rul 2007-05-08 11:03:08.000000000 +0000 +++ cdrtools-3.02a09/RULES/sun4L-sunos5-cc.rul 1970-01-01 00:00:00.000000000 +0000 @@ -1,37 +0,0 @@ -#ident "@(#)sun4-sunos5-cc.rul 1.11 07/05/08 " -########################################################################### -# Written 1996 by J. Schilling -########################################################################### -# -# Platform dependent MACROS for SunOS 5.x on sparc -# -########################################################################### -# Copyright (c) J. Schilling -########################################################################### -# The contents of this file are subject to the terms of the -# Common Development and Distribution License, Version 1.0 only -# (the "License"). You may not use this file except in compliance -# with the License. -# -# See the file CDDL.Schily.txt in this distribution for details. -# -# When distributing Covered Code, include this CDDL HEADER in each -# file and include the License file CDDL.Schily.txt from this distribution. -########################################################################### -include $(SRCROOT)/$(RULESDIR)/rules.prg -########################################################################### -include $(SRCROOT)/$(RULESDIR)/cc-sunpro.rul - -OSDEFS += -D__SVR4 -DSVR4 - -KDEFINES= -DKERNEL -D_KERNEL - - -LIB_SOCKET= -lsocket -lnsl -ldl -LIB_MATH= -lm -LIB_KVM= -lkvm -lelf -LIB_VOLMGT= -lvolmgt - -LDOPTDYN= -dy -G -ztext -h $(TARGET) -Mlib$(TARGETLIB)-mapvers -ldl - -ARFLAGS= crs diff -Nru cdrtools-2.01.01a33/RULES/sun4L-sunos5-gcc.rul cdrtools-3.02a09/RULES/sun4L-sunos5-gcc.rul --- cdrtools-2.01.01a33/RULES/sun4L-sunos5-gcc.rul 2007-05-08 11:03:08.000000000 +0000 +++ cdrtools-3.02a09/RULES/sun4L-sunos5-gcc.rul 1970-01-01 00:00:00.000000000 +0000 @@ -1,41 +0,0 @@ -#ident "@(#)sun4-sunos5-gcc.rul 1.13 07/05/08 " -########################################################################### -# Written 1996 by J. Schilling -########################################################################### -# -# Platform dependent MACROS for SunOS 5.x on sparc -# -########################################################################### -# Copyright (c) J. Schilling -########################################################################### -# The contents of this file are subject to the terms of the -# Common Development and Distribution License, Version 1.0 only -# (the "License"). You may not use this file except in compliance -# with the License. -# -# See the file CDDL.Schily.txt in this distribution for details. -# -# When distributing Covered Code, include this CDDL HEADER in each -# file and include the License file CDDL.Schily.txt from this distribution. -########################################################################### -include $(SRCROOT)/$(RULESDIR)/rules.prg -########################################################################### -include $(SRCROOT)/$(RULESDIR)/cc-gcc.rul - -OSDEFS += -D__SVR4 -DSVR4 - -KDEFINES= -DKERNEL -D_KERNEL - - -LIB_SOCKET= -lsocket -lnsl -ldl -LIB_MATH= -lm -LIB_KVM= -lkvm -lelf -LIB_VOLMGT= -lvolmgt - -# -# We should use -Wl,-ztext here, but gcc does not create fully compliant -# object files. -# -LDOPTDYN= -dy -G -h $(TARGET) -Wl,-Mlib$(TARGETLIB)-mapvers -ldl - -ARFLAGS= crs diff -Nru cdrtools-2.01.01a33/RULES/sun4m-sunos4-cc.rul cdrtools-3.02a09/RULES/sun4m-sunos4-cc.rul --- cdrtools-2.01.01a33/RULES/sun4m-sunos4-cc.rul 2007-05-08 11:03:08.000000000 +0000 +++ cdrtools-3.02a09/RULES/sun4m-sunos4-cc.rul 1970-01-01 00:00:00.000000000 +0000 @@ -1,34 +0,0 @@ -#ident "@(#)sun4-sunos4-cc.rul 1.8 07/05/08 " -########################################################################### -# Written 1996 by J. Schilling -########################################################################### -# -# Platform dependent MACROS for SunOS 4.x on sparc -# -########################################################################### -# Copyright (c) J. Schilling -########################################################################### -# The contents of this file are subject to the terms of the -# Common Development and Distribution License, Version 1.0 only -# (the "License"). You may not use this file except in compliance -# with the License. -# -# See the file CDDL.Schily.txt in this distribution for details. -# -# When distributing Covered Code, include this CDDL HEADER in each -# file and include the License file CDDL.Schily.txt from this distribution. -########################################################################### -include $(SRCROOT)/$(RULESDIR)/rules.prg -########################################################################### -include $(SRCROOT)/$(RULESDIR)/cc-sun.rul - -OSDEFS += - -KDEFINES= -DKERNEL -D_KERNEL - -LIB_SOCKET= -LIB_MATH= -lm -LIB_KVM= -lkvm - -RANLIB= @echo " ==> RANDOMIZING ARCHIVE \"$@\""; ranlib - diff -Nru cdrtools-2.01.01a33/RULES/sun4m-sunos4-gcc.rul cdrtools-3.02a09/RULES/sun4m-sunos4-gcc.rul --- cdrtools-2.01.01a33/RULES/sun4m-sunos4-gcc.rul 2007-05-08 11:03:08.000000000 +0000 +++ cdrtools-3.02a09/RULES/sun4m-sunos4-gcc.rul 1970-01-01 00:00:00.000000000 +0000 @@ -1,41 +0,0 @@ -#ident "@(#)sun4-sunos4-gcc.rul 1.8 07/05/08 " -########################################################################### -# Written 1996 by J. Schilling -########################################################################### -# -# Platform dependent MACROS for SunOS 4.x on sparc (GCC) -# -########################################################################### -# Copyright (c) J. Schilling -########################################################################### -# The contents of this file are subject to the terms of the -# Common Development and Distribution License, Version 1.0 only -# (the "License"). You may not use this file except in compliance -# with the License. -# -# See the file CDDL.Schily.txt in this distribution for details. -# -# When distributing Covered Code, include this CDDL HEADER in each -# file and include the License file CDDL.Schily.txt from this distribution. -########################################################################### -include $(SRCROOT)/$(RULESDIR)/rules.prg -########################################################################### -include $(SRCROOT)/$(RULESDIR)/cc-gcc.rul - -OSDEFS += - -KDEFINES= -DKERNEL -D_KERNEL - -LIB_PREFIX= lib -LIB_SUFFIX= .a -SHL_SUFFIX= .so.1.0 - -LIB_SOCKET= -LIB_MATH= -lm -LIB_KVM= -lkvm - -LDOPTDYN= -LNDYNLIB= @ - -DYNLD= @echo " ==> LINKING dynamic library \"$@\""; ld -RANLIB= @echo " ==> RANDOMIZING ARCHIVE \"$@\""; ranlib diff -Nru cdrtools-2.01.01a33/RULES/sun4m-sunos5-cc.rul cdrtools-3.02a09/RULES/sun4m-sunos5-cc.rul --- cdrtools-2.01.01a33/RULES/sun4m-sunos5-cc.rul 2007-05-08 11:03:08.000000000 +0000 +++ cdrtools-3.02a09/RULES/sun4m-sunos5-cc.rul 1970-01-01 00:00:00.000000000 +0000 @@ -1,37 +0,0 @@ -#ident "@(#)sun4-sunos5-cc.rul 1.11 07/05/08 " -########################################################################### -# Written 1996 by J. Schilling -########################################################################### -# -# Platform dependent MACROS for SunOS 5.x on sparc -# -########################################################################### -# Copyright (c) J. Schilling -########################################################################### -# The contents of this file are subject to the terms of the -# Common Development and Distribution License, Version 1.0 only -# (the "License"). You may not use this file except in compliance -# with the License. -# -# See the file CDDL.Schily.txt in this distribution for details. -# -# When distributing Covered Code, include this CDDL HEADER in each -# file and include the License file CDDL.Schily.txt from this distribution. -########################################################################### -include $(SRCROOT)/$(RULESDIR)/rules.prg -########################################################################### -include $(SRCROOT)/$(RULESDIR)/cc-sunpro.rul - -OSDEFS += -D__SVR4 -DSVR4 - -KDEFINES= -DKERNEL -D_KERNEL - - -LIB_SOCKET= -lsocket -lnsl -ldl -LIB_MATH= -lm -LIB_KVM= -lkvm -lelf -LIB_VOLMGT= -lvolmgt - -LDOPTDYN= -dy -G -ztext -h $(TARGET) -Mlib$(TARGETLIB)-mapvers -ldl - -ARFLAGS= crs diff -Nru cdrtools-2.01.01a33/RULES/sun4m-sunos5-gcc.rul cdrtools-3.02a09/RULES/sun4m-sunos5-gcc.rul --- cdrtools-2.01.01a33/RULES/sun4m-sunos5-gcc.rul 2007-05-08 11:03:08.000000000 +0000 +++ cdrtools-3.02a09/RULES/sun4m-sunos5-gcc.rul 1970-01-01 00:00:00.000000000 +0000 @@ -1,41 +0,0 @@ -#ident "@(#)sun4-sunos5-gcc.rul 1.13 07/05/08 " -########################################################################### -# Written 1996 by J. Schilling -########################################################################### -# -# Platform dependent MACROS for SunOS 5.x on sparc -# -########################################################################### -# Copyright (c) J. Schilling -########################################################################### -# The contents of this file are subject to the terms of the -# Common Development and Distribution License, Version 1.0 only -# (the "License"). You may not use this file except in compliance -# with the License. -# -# See the file CDDL.Schily.txt in this distribution for details. -# -# When distributing Covered Code, include this CDDL HEADER in each -# file and include the License file CDDL.Schily.txt from this distribution. -########################################################################### -include $(SRCROOT)/$(RULESDIR)/rules.prg -########################################################################### -include $(SRCROOT)/$(RULESDIR)/cc-gcc.rul - -OSDEFS += -D__SVR4 -DSVR4 - -KDEFINES= -DKERNEL -D_KERNEL - - -LIB_SOCKET= -lsocket -lnsl -ldl -LIB_MATH= -lm -LIB_KVM= -lkvm -lelf -LIB_VOLMGT= -lvolmgt - -# -# We should use -Wl,-ztext here, but gcc does not create fully compliant -# object files. -# -LDOPTDYN= -dy -G -h $(TARGET) -Wl,-Mlib$(TARGETLIB)-mapvers -ldl - -ARFLAGS= crs diff -Nru cdrtools-2.01.01a33/RULES/sun4-sunos5-cc64.rul cdrtools-3.02a09/RULES/sun4-sunos5-cc64.rul --- cdrtools-2.01.01a33/RULES/sun4-sunos5-cc64.rul 2007-05-08 11:03:08.000000000 +0000 +++ cdrtools-3.02a09/RULES/sun4-sunos5-cc64.rul 1970-01-01 00:00:00.000000000 +0000 @@ -1,37 +0,0 @@ -#ident "@(#)sun4-sunos5-cc64.rul 1.6 07/05/08 " -########################################################################### -# Written 1996 by J. Schilling -########################################################################### -# -# Platform dependent MACROS for SunOS 5.x on sparc -# -########################################################################### -# Copyright (c) J. Schilling -########################################################################### -# The contents of this file are subject to the terms of the -# Common Development and Distribution License, Version 1.0 only -# (the "License"). You may not use this file except in compliance -# with the License. -# -# See the file CDDL.Schily.txt in this distribution for details. -# -# When distributing Covered Code, include this CDDL HEADER in each -# file and include the License file CDDL.Schily.txt from this distribution. -########################################################################### -include $(SRCROOT)/$(RULESDIR)/rules.prg -########################################################################### -include $(SRCROOT)/$(RULESDIR)/cc-sunpro64.rul - -OSDEFS += -D__SVR4 -DSVR4 - -KDEFINES= -DKERNEL -D_KERNEL - - -LIB_SOCKET= -lsocket -lnsl -ldl -LIB_MATH= -lm -LIB_KVM= -lkvm -lelf -LIB_VOLMGT= -lvolmgt - -LDOPTDYN= -dy -G -ztext -h $(TARGET) -Mlib$(TARGETLIB)-mapvers -ldl - -ARFLAGS= crs diff -Nru cdrtools-2.01.01a33/RULES/sun4-sunos5-cc.rul cdrtools-3.02a09/RULES/sun4-sunos5-cc.rul --- cdrtools-2.01.01a33/RULES/sun4-sunos5-cc.rul 2007-05-08 11:03:08.000000000 +0000 +++ cdrtools-3.02a09/RULES/sun4-sunos5-cc.rul 2014-04-01 12:08:05.000000000 +0000 @@ -1,4 +1,4 @@ -#ident "@(#)sun4-sunos5-cc.rul 1.11 07/05/08 " +#ident "@(#)sun4-sunos5-cc.rul 1.13 14/04/01 " ########################################################################### # Written 1996 by J. Schilling ########################################################################### @@ -14,13 +14,15 @@ # with the License. # # See the file CDDL.Schily.txt in this distribution for details. +# A copy of the CDDL is also available via the Internet at +# http://www.opensource.org/licenses/cddl1.txt # # When distributing Covered Code, include this CDDL HEADER in each # file and include the License file CDDL.Schily.txt from this distribution. ########################################################################### include $(SRCROOT)/$(RULESDIR)/rules.prg ########################################################################### -include $(SRCROOT)/$(RULESDIR)/cc-sunpro.rul +include $(SRCROOT)/$(RULESDIR)/cc-$(C_ARCH:cc%=sunpro%).rul OSDEFS += -D__SVR4 -DSVR4 @@ -32,6 +34,4 @@ LIB_KVM= -lkvm -lelf LIB_VOLMGT= -lvolmgt -LDOPTDYN= -dy -G -ztext -h $(TARGET) -Mlib$(TARGETLIB)-mapvers -ldl - ARFLAGS= crs diff -Nru cdrtools-2.01.01a33/RULES/sun4-sunos5-clang.rul cdrtools-3.02a09/RULES/sun4-sunos5-clang.rul --- cdrtools-2.01.01a33/RULES/sun4-sunos5-clang.rul 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/RULES/sun4-sunos5-clang.rul 2014-04-02 21:04:29.000000000 +0000 @@ -0,0 +1,46 @@ +#ident "@(#)sun4-sunos5-clang.rul 1.1 14/04/02 " +########################################################################### +# Written 1996-2014 by J. Schilling +########################################################################### +# +# Platform dependent MACROS for SunOS 5.x on sparc for Clang +# +########################################################################### +# Copyright (c) J. Schilling +########################################################################### +# The contents of this file are subject to the terms of the +# Common Development and Distribution License, Version 1.0 only +# (the "License"). You may not use this file except in compliance +# with the License. +# +# See the file CDDL.Schily.txt in this distribution for details. +# A copy of the CDDL is also available via the Internet at +# http://www.opensource.org/licenses/cddl1.txt +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file CDDL.Schily.txt from this distribution. +########################################################################### +include $(SRCROOT)/$(RULESDIR)/rules.prg +########################################################################### +include $(SRCROOT)/$(RULESDIR)/cc-$(C_ARCH).rul + +OSDEFS += -D__SVR4 -DSVR4 +KDEFINES= -DKERNEL -D_KERNEL + +LIB_SOCKET= -lsocket -lnsl -ldl +LIB_MATH= -lm +LIB_KVM= -lkvm -lelf +LIB_VOLMGT= -lvolmgt + +# +# Solaris comes with a linker that supports mapfiles +# +MAPVERS= $(_MAPVERS) # This enables to use mapfiles + +# +# We should use -Wl,-ztext here, but gcc does not create fully compliant +# object files. +# +LDOPTDYN= -dy -G -h $(TARGET) $(PMAPVERS:%=-Wl,-M%) -ldl + +ARFLAGS= crs diff -Nru cdrtools-2.01.01a33/RULES/sun4-sunos5-gcc64.rul cdrtools-3.02a09/RULES/sun4-sunos5-gcc64.rul --- cdrtools-2.01.01a33/RULES/sun4-sunos5-gcc64.rul 2007-05-08 11:03:08.000000000 +0000 +++ cdrtools-3.02a09/RULES/sun4-sunos5-gcc64.rul 1970-01-01 00:00:00.000000000 +0000 @@ -1,39 +0,0 @@ -#ident "@(#)sun4-sunos5-gcc64.rul 1.7 07/05/08 " -########################################################################### -# Written 1996 by J. Schilling -########################################################################### -# -# Platform dependent MACROS for SunOS 5.x on sparc -# -########################################################################### -# Copyright (c) J. Schilling -########################################################################### -# The contents of this file are subject to the terms of the -# Common Development and Distribution License, Version 1.0 only -# (the "License"). You may not use this file except in compliance -# with the License. -# -# See the file CDDL.Schily.txt in this distribution for details. -# -# When distributing Covered Code, include this CDDL HEADER in each -# file and include the License file CDDL.Schily.txt from this distribution. -########################################################################### -include $(SRCROOT)/$(RULESDIR)/rules.prg -########################################################################### -include $(SRCROOT)/$(RULESDIR)/cc-gcc64.rul - -OSDEFS += -D__SVR4 -DSVR4 -KDEFINES= -DKERNEL -D_KERNEL - -LIB_SOCKET= -lsocket -lnsl -ldl -LIB_MATH= -lm -LIB_KVM= -lkvm -lelf -LIB_VOLMGT= -lvolmgt - -# -# We should use -Wl,-ztext here, but gcc does not create fully compliant -# object files. -# -LDOPTDYN= -dy -G -h $(TARGET) -Wl,-Mlib$(TARGETLIB)-mapvers -ldl - -ARFLAGS= crs diff -Nru cdrtools-2.01.01a33/RULES/sun4-sunos5-gcc.rul cdrtools-3.02a09/RULES/sun4-sunos5-gcc.rul --- cdrtools-2.01.01a33/RULES/sun4-sunos5-gcc.rul 2007-05-08 11:03:08.000000000 +0000 +++ cdrtools-3.02a09/RULES/sun4-sunos5-gcc.rul 2014-04-01 12:08:05.000000000 +0000 @@ -1,4 +1,4 @@ -#ident "@(#)sun4-sunos5-gcc.rul 1.13 07/05/08 " +#ident "@(#)sun4-sunos5-gcc.rul 1.15 14/04/01 " ########################################################################### # Written 1996 by J. Schilling ########################################################################### @@ -14,13 +14,15 @@ # with the License. # # See the file CDDL.Schily.txt in this distribution for details. +# A copy of the CDDL is also available via the Internet at +# http://www.opensource.org/licenses/cddl1.txt # # When distributing Covered Code, include this CDDL HEADER in each # file and include the License file CDDL.Schily.txt from this distribution. ########################################################################### include $(SRCROOT)/$(RULESDIR)/rules.prg ########################################################################### -include $(SRCROOT)/$(RULESDIR)/cc-gcc.rul +include $(SRCROOT)/$(RULESDIR)/cc-$(C_ARCH).rul OSDEFS += -D__SVR4 -DSVR4 @@ -33,9 +35,14 @@ LIB_VOLMGT= -lvolmgt # +# Solaris comes with a linker that supports mapfiles +# +MAPVERS= $(_MAPVERS) # This enables to use mapfiles + +# # We should use -Wl,-ztext here, but gcc does not create fully compliant # object files. # -LDOPTDYN= -dy -G -h $(TARGET) -Wl,-Mlib$(TARGETLIB)-mapvers -ldl +LDOPTDYN= -dy -G -h $(TARGET) $(PMAPVERS:%=-Wl,-M%) -ldl ARFLAGS= crs diff -Nru cdrtools-2.01.01a33/RULES/sun4us-sunos5-cc64.rul cdrtools-3.02a09/RULES/sun4us-sunos5-cc64.rul --- cdrtools-2.01.01a33/RULES/sun4us-sunos5-cc64.rul 2007-05-08 11:03:08.000000000 +0000 +++ cdrtools-3.02a09/RULES/sun4us-sunos5-cc64.rul 1970-01-01 00:00:00.000000000 +0000 @@ -1,37 +0,0 @@ -#ident "@(#)sun4-sunos5-cc64.rul 1.6 07/05/08 " -########################################################################### -# Written 1996 by J. Schilling -########################################################################### -# -# Platform dependent MACROS for SunOS 5.x on sparc -# -########################################################################### -# Copyright (c) J. Schilling -########################################################################### -# The contents of this file are subject to the terms of the -# Common Development and Distribution License, Version 1.0 only -# (the "License"). You may not use this file except in compliance -# with the License. -# -# See the file CDDL.Schily.txt in this distribution for details. -# -# When distributing Covered Code, include this CDDL HEADER in each -# file and include the License file CDDL.Schily.txt from this distribution. -########################################################################### -include $(SRCROOT)/$(RULESDIR)/rules.prg -########################################################################### -include $(SRCROOT)/$(RULESDIR)/cc-sunpro64.rul - -OSDEFS += -D__SVR4 -DSVR4 - -KDEFINES= -DKERNEL -D_KERNEL - - -LIB_SOCKET= -lsocket -lnsl -ldl -LIB_MATH= -lm -LIB_KVM= -lkvm -lelf -LIB_VOLMGT= -lvolmgt - -LDOPTDYN= -dy -G -ztext -h $(TARGET) -Mlib$(TARGETLIB)-mapvers -ldl - -ARFLAGS= crs diff -Nru cdrtools-2.01.01a33/RULES/sun4us-sunos5-cc.rul cdrtools-3.02a09/RULES/sun4us-sunos5-cc.rul --- cdrtools-2.01.01a33/RULES/sun4us-sunos5-cc.rul 2007-05-08 11:03:08.000000000 +0000 +++ cdrtools-3.02a09/RULES/sun4us-sunos5-cc.rul 1970-01-01 00:00:00.000000000 +0000 @@ -1,37 +0,0 @@ -#ident "@(#)sun4-sunos5-cc.rul 1.11 07/05/08 " -########################################################################### -# Written 1996 by J. Schilling -########################################################################### -# -# Platform dependent MACROS for SunOS 5.x on sparc -# -########################################################################### -# Copyright (c) J. Schilling -########################################################################### -# The contents of this file are subject to the terms of the -# Common Development and Distribution License, Version 1.0 only -# (the "License"). You may not use this file except in compliance -# with the License. -# -# See the file CDDL.Schily.txt in this distribution for details. -# -# When distributing Covered Code, include this CDDL HEADER in each -# file and include the License file CDDL.Schily.txt from this distribution. -########################################################################### -include $(SRCROOT)/$(RULESDIR)/rules.prg -########################################################################### -include $(SRCROOT)/$(RULESDIR)/cc-sunpro.rul - -OSDEFS += -D__SVR4 -DSVR4 - -KDEFINES= -DKERNEL -D_KERNEL - - -LIB_SOCKET= -lsocket -lnsl -ldl -LIB_MATH= -lm -LIB_KVM= -lkvm -lelf -LIB_VOLMGT= -lvolmgt - -LDOPTDYN= -dy -G -ztext -h $(TARGET) -Mlib$(TARGETLIB)-mapvers -ldl - -ARFLAGS= crs diff -Nru cdrtools-2.01.01a33/RULES/sun4us-sunos5-gcc64.rul cdrtools-3.02a09/RULES/sun4us-sunos5-gcc64.rul --- cdrtools-2.01.01a33/RULES/sun4us-sunos5-gcc64.rul 2007-05-08 11:03:08.000000000 +0000 +++ cdrtools-3.02a09/RULES/sun4us-sunos5-gcc64.rul 1970-01-01 00:00:00.000000000 +0000 @@ -1,39 +0,0 @@ -#ident "@(#)sun4-sunos5-gcc64.rul 1.7 07/05/08 " -########################################################################### -# Written 1996 by J. Schilling -########################################################################### -# -# Platform dependent MACROS for SunOS 5.x on sparc -# -########################################################################### -# Copyright (c) J. Schilling -########################################################################### -# The contents of this file are subject to the terms of the -# Common Development and Distribution License, Version 1.0 only -# (the "License"). You may not use this file except in compliance -# with the License. -# -# See the file CDDL.Schily.txt in this distribution for details. -# -# When distributing Covered Code, include this CDDL HEADER in each -# file and include the License file CDDL.Schily.txt from this distribution. -########################################################################### -include $(SRCROOT)/$(RULESDIR)/rules.prg -########################################################################### -include $(SRCROOT)/$(RULESDIR)/cc-gcc64.rul - -OSDEFS += -D__SVR4 -DSVR4 -KDEFINES= -DKERNEL -D_KERNEL - -LIB_SOCKET= -lsocket -lnsl -ldl -LIB_MATH= -lm -LIB_KVM= -lkvm -lelf -LIB_VOLMGT= -lvolmgt - -# -# We should use -Wl,-ztext here, but gcc does not create fully compliant -# object files. -# -LDOPTDYN= -dy -G -h $(TARGET) -Wl,-Mlib$(TARGETLIB)-mapvers -ldl - -ARFLAGS= crs diff -Nru cdrtools-2.01.01a33/RULES/sun4us-sunos5-gcc.rul cdrtools-3.02a09/RULES/sun4us-sunos5-gcc.rul --- cdrtools-2.01.01a33/RULES/sun4us-sunos5-gcc.rul 2007-05-08 11:03:08.000000000 +0000 +++ cdrtools-3.02a09/RULES/sun4us-sunos5-gcc.rul 1970-01-01 00:00:00.000000000 +0000 @@ -1,41 +0,0 @@ -#ident "@(#)sun4-sunos5-gcc.rul 1.13 07/05/08 " -########################################################################### -# Written 1996 by J. Schilling -########################################################################### -# -# Platform dependent MACROS for SunOS 5.x on sparc -# -########################################################################### -# Copyright (c) J. Schilling -########################################################################### -# The contents of this file are subject to the terms of the -# Common Development and Distribution License, Version 1.0 only -# (the "License"). You may not use this file except in compliance -# with the License. -# -# See the file CDDL.Schily.txt in this distribution for details. -# -# When distributing Covered Code, include this CDDL HEADER in each -# file and include the License file CDDL.Schily.txt from this distribution. -########################################################################### -include $(SRCROOT)/$(RULESDIR)/rules.prg -########################################################################### -include $(SRCROOT)/$(RULESDIR)/cc-gcc.rul - -OSDEFS += -D__SVR4 -DSVR4 - -KDEFINES= -DKERNEL -D_KERNEL - - -LIB_SOCKET= -lsocket -lnsl -ldl -LIB_MATH= -lm -LIB_KVM= -lkvm -lelf -LIB_VOLMGT= -lvolmgt - -# -# We should use -Wl,-ztext here, but gcc does not create fully compliant -# object files. -# -LDOPTDYN= -dy -G -h $(TARGET) -Wl,-Mlib$(TARGETLIB)-mapvers -ldl - -ARFLAGS= crs diff -Nru cdrtools-2.01.01a33/RULES/sun4u-sunos5-cc64.rul cdrtools-3.02a09/RULES/sun4u-sunos5-cc64.rul --- cdrtools-2.01.01a33/RULES/sun4u-sunos5-cc64.rul 2007-05-08 11:03:08.000000000 +0000 +++ cdrtools-3.02a09/RULES/sun4u-sunos5-cc64.rul 1970-01-01 00:00:00.000000000 +0000 @@ -1,37 +0,0 @@ -#ident "@(#)sun4-sunos5-cc64.rul 1.6 07/05/08 " -########################################################################### -# Written 1996 by J. Schilling -########################################################################### -# -# Platform dependent MACROS for SunOS 5.x on sparc -# -########################################################################### -# Copyright (c) J. Schilling -########################################################################### -# The contents of this file are subject to the terms of the -# Common Development and Distribution License, Version 1.0 only -# (the "License"). You may not use this file except in compliance -# with the License. -# -# See the file CDDL.Schily.txt in this distribution for details. -# -# When distributing Covered Code, include this CDDL HEADER in each -# file and include the License file CDDL.Schily.txt from this distribution. -########################################################################### -include $(SRCROOT)/$(RULESDIR)/rules.prg -########################################################################### -include $(SRCROOT)/$(RULESDIR)/cc-sunpro64.rul - -OSDEFS += -D__SVR4 -DSVR4 - -KDEFINES= -DKERNEL -D_KERNEL - - -LIB_SOCKET= -lsocket -lnsl -ldl -LIB_MATH= -lm -LIB_KVM= -lkvm -lelf -LIB_VOLMGT= -lvolmgt - -LDOPTDYN= -dy -G -ztext -h $(TARGET) -Mlib$(TARGETLIB)-mapvers -ldl - -ARFLAGS= crs diff -Nru cdrtools-2.01.01a33/RULES/sun4u-sunos5-cc.rul cdrtools-3.02a09/RULES/sun4u-sunos5-cc.rul --- cdrtools-2.01.01a33/RULES/sun4u-sunos5-cc.rul 2007-05-08 11:03:08.000000000 +0000 +++ cdrtools-3.02a09/RULES/sun4u-sunos5-cc.rul 1970-01-01 00:00:00.000000000 +0000 @@ -1,37 +0,0 @@ -#ident "@(#)sun4-sunos5-cc.rul 1.11 07/05/08 " -########################################################################### -# Written 1996 by J. Schilling -########################################################################### -# -# Platform dependent MACROS for SunOS 5.x on sparc -# -########################################################################### -# Copyright (c) J. Schilling -########################################################################### -# The contents of this file are subject to the terms of the -# Common Development and Distribution License, Version 1.0 only -# (the "License"). You may not use this file except in compliance -# with the License. -# -# See the file CDDL.Schily.txt in this distribution for details. -# -# When distributing Covered Code, include this CDDL HEADER in each -# file and include the License file CDDL.Schily.txt from this distribution. -########################################################################### -include $(SRCROOT)/$(RULESDIR)/rules.prg -########################################################################### -include $(SRCROOT)/$(RULESDIR)/cc-sunpro.rul - -OSDEFS += -D__SVR4 -DSVR4 - -KDEFINES= -DKERNEL -D_KERNEL - - -LIB_SOCKET= -lsocket -lnsl -ldl -LIB_MATH= -lm -LIB_KVM= -lkvm -lelf -LIB_VOLMGT= -lvolmgt - -LDOPTDYN= -dy -G -ztext -h $(TARGET) -Mlib$(TARGETLIB)-mapvers -ldl - -ARFLAGS= crs diff -Nru cdrtools-2.01.01a33/RULES/sun4u-sunos5-gcc64.rul cdrtools-3.02a09/RULES/sun4u-sunos5-gcc64.rul --- cdrtools-2.01.01a33/RULES/sun4u-sunos5-gcc64.rul 2007-05-08 11:03:08.000000000 +0000 +++ cdrtools-3.02a09/RULES/sun4u-sunos5-gcc64.rul 1970-01-01 00:00:00.000000000 +0000 @@ -1,39 +0,0 @@ -#ident "@(#)sun4-sunos5-gcc64.rul 1.7 07/05/08 " -########################################################################### -# Written 1996 by J. Schilling -########################################################################### -# -# Platform dependent MACROS for SunOS 5.x on sparc -# -########################################################################### -# Copyright (c) J. Schilling -########################################################################### -# The contents of this file are subject to the terms of the -# Common Development and Distribution License, Version 1.0 only -# (the "License"). You may not use this file except in compliance -# with the License. -# -# See the file CDDL.Schily.txt in this distribution for details. -# -# When distributing Covered Code, include this CDDL HEADER in each -# file and include the License file CDDL.Schily.txt from this distribution. -########################################################################### -include $(SRCROOT)/$(RULESDIR)/rules.prg -########################################################################### -include $(SRCROOT)/$(RULESDIR)/cc-gcc64.rul - -OSDEFS += -D__SVR4 -DSVR4 -KDEFINES= -DKERNEL -D_KERNEL - -LIB_SOCKET= -lsocket -lnsl -ldl -LIB_MATH= -lm -LIB_KVM= -lkvm -lelf -LIB_VOLMGT= -lvolmgt - -# -# We should use -Wl,-ztext here, but gcc does not create fully compliant -# object files. -# -LDOPTDYN= -dy -G -h $(TARGET) -Wl,-Mlib$(TARGETLIB)-mapvers -ldl - -ARFLAGS= crs diff -Nru cdrtools-2.01.01a33/RULES/sun4u-sunos5-gcc.rul cdrtools-3.02a09/RULES/sun4u-sunos5-gcc.rul --- cdrtools-2.01.01a33/RULES/sun4u-sunos5-gcc.rul 2007-05-08 11:03:08.000000000 +0000 +++ cdrtools-3.02a09/RULES/sun4u-sunos5-gcc.rul 1970-01-01 00:00:00.000000000 +0000 @@ -1,41 +0,0 @@ -#ident "@(#)sun4-sunos5-gcc.rul 1.13 07/05/08 " -########################################################################### -# Written 1996 by J. Schilling -########################################################################### -# -# Platform dependent MACROS for SunOS 5.x on sparc -# -########################################################################### -# Copyright (c) J. Schilling -########################################################################### -# The contents of this file are subject to the terms of the -# Common Development and Distribution License, Version 1.0 only -# (the "License"). You may not use this file except in compliance -# with the License. -# -# See the file CDDL.Schily.txt in this distribution for details. -# -# When distributing Covered Code, include this CDDL HEADER in each -# file and include the License file CDDL.Schily.txt from this distribution. -########################################################################### -include $(SRCROOT)/$(RULESDIR)/rules.prg -########################################################################### -include $(SRCROOT)/$(RULESDIR)/cc-gcc.rul - -OSDEFS += -D__SVR4 -DSVR4 - -KDEFINES= -DKERNEL -D_KERNEL - - -LIB_SOCKET= -lsocket -lnsl -ldl -LIB_MATH= -lm -LIB_KVM= -lkvm -lelf -LIB_VOLMGT= -lvolmgt - -# -# We should use -Wl,-ztext here, but gcc does not create fully compliant -# object files. -# -LDOPTDYN= -dy -G -h $(TARGET) -Wl,-Mlib$(TARGETLIB)-mapvers -ldl - -ARFLAGS= crs diff -Nru cdrtools-2.01.01a33/RULES/sun4v-sunos5-cc64.rul cdrtools-3.02a09/RULES/sun4v-sunos5-cc64.rul --- cdrtools-2.01.01a33/RULES/sun4v-sunos5-cc64.rul 2007-05-08 11:03:08.000000000 +0000 +++ cdrtools-3.02a09/RULES/sun4v-sunos5-cc64.rul 1970-01-01 00:00:00.000000000 +0000 @@ -1,37 +0,0 @@ -#ident "@(#)sun4-sunos5-cc64.rul 1.6 07/05/08 " -########################################################################### -# Written 1996 by J. Schilling -########################################################################### -# -# Platform dependent MACROS for SunOS 5.x on sparc -# -########################################################################### -# Copyright (c) J. Schilling -########################################################################### -# The contents of this file are subject to the terms of the -# Common Development and Distribution License, Version 1.0 only -# (the "License"). You may not use this file except in compliance -# with the License. -# -# See the file CDDL.Schily.txt in this distribution for details. -# -# When distributing Covered Code, include this CDDL HEADER in each -# file and include the License file CDDL.Schily.txt from this distribution. -########################################################################### -include $(SRCROOT)/$(RULESDIR)/rules.prg -########################################################################### -include $(SRCROOT)/$(RULESDIR)/cc-sunpro64.rul - -OSDEFS += -D__SVR4 -DSVR4 - -KDEFINES= -DKERNEL -D_KERNEL - - -LIB_SOCKET= -lsocket -lnsl -ldl -LIB_MATH= -lm -LIB_KVM= -lkvm -lelf -LIB_VOLMGT= -lvolmgt - -LDOPTDYN= -dy -G -ztext -h $(TARGET) -Mlib$(TARGETLIB)-mapvers -ldl - -ARFLAGS= crs diff -Nru cdrtools-2.01.01a33/RULES/sun4v-sunos5-cc.rul cdrtools-3.02a09/RULES/sun4v-sunos5-cc.rul --- cdrtools-2.01.01a33/RULES/sun4v-sunos5-cc.rul 2007-05-08 11:03:08.000000000 +0000 +++ cdrtools-3.02a09/RULES/sun4v-sunos5-cc.rul 1970-01-01 00:00:00.000000000 +0000 @@ -1,37 +0,0 @@ -#ident "@(#)sun4-sunos5-cc.rul 1.11 07/05/08 " -########################################################################### -# Written 1996 by J. Schilling -########################################################################### -# -# Platform dependent MACROS for SunOS 5.x on sparc -# -########################################################################### -# Copyright (c) J. Schilling -########################################################################### -# The contents of this file are subject to the terms of the -# Common Development and Distribution License, Version 1.0 only -# (the "License"). You may not use this file except in compliance -# with the License. -# -# See the file CDDL.Schily.txt in this distribution for details. -# -# When distributing Covered Code, include this CDDL HEADER in each -# file and include the License file CDDL.Schily.txt from this distribution. -########################################################################### -include $(SRCROOT)/$(RULESDIR)/rules.prg -########################################################################### -include $(SRCROOT)/$(RULESDIR)/cc-sunpro.rul - -OSDEFS += -D__SVR4 -DSVR4 - -KDEFINES= -DKERNEL -D_KERNEL - - -LIB_SOCKET= -lsocket -lnsl -ldl -LIB_MATH= -lm -LIB_KVM= -lkvm -lelf -LIB_VOLMGT= -lvolmgt - -LDOPTDYN= -dy -G -ztext -h $(TARGET) -Mlib$(TARGETLIB)-mapvers -ldl - -ARFLAGS= crs diff -Nru cdrtools-2.01.01a33/RULES/sun4v-sunos5-gcc64.rul cdrtools-3.02a09/RULES/sun4v-sunos5-gcc64.rul --- cdrtools-2.01.01a33/RULES/sun4v-sunos5-gcc64.rul 2007-05-08 11:03:08.000000000 +0000 +++ cdrtools-3.02a09/RULES/sun4v-sunos5-gcc64.rul 1970-01-01 00:00:00.000000000 +0000 @@ -1,39 +0,0 @@ -#ident "@(#)sun4-sunos5-gcc64.rul 1.7 07/05/08 " -########################################################################### -# Written 1996 by J. Schilling -########################################################################### -# -# Platform dependent MACROS for SunOS 5.x on sparc -# -########################################################################### -# Copyright (c) J. Schilling -########################################################################### -# The contents of this file are subject to the terms of the -# Common Development and Distribution License, Version 1.0 only -# (the "License"). You may not use this file except in compliance -# with the License. -# -# See the file CDDL.Schily.txt in this distribution for details. -# -# When distributing Covered Code, include this CDDL HEADER in each -# file and include the License file CDDL.Schily.txt from this distribution. -########################################################################### -include $(SRCROOT)/$(RULESDIR)/rules.prg -########################################################################### -include $(SRCROOT)/$(RULESDIR)/cc-gcc64.rul - -OSDEFS += -D__SVR4 -DSVR4 -KDEFINES= -DKERNEL -D_KERNEL - -LIB_SOCKET= -lsocket -lnsl -ldl -LIB_MATH= -lm -LIB_KVM= -lkvm -lelf -LIB_VOLMGT= -lvolmgt - -# -# We should use -Wl,-ztext here, but gcc does not create fully compliant -# object files. -# -LDOPTDYN= -dy -G -h $(TARGET) -Wl,-Mlib$(TARGETLIB)-mapvers -ldl - -ARFLAGS= crs diff -Nru cdrtools-2.01.01a33/RULES/sun4v-sunos5-gcc.rul cdrtools-3.02a09/RULES/sun4v-sunos5-gcc.rul --- cdrtools-2.01.01a33/RULES/sun4v-sunos5-gcc.rul 2007-05-08 11:03:08.000000000 +0000 +++ cdrtools-3.02a09/RULES/sun4v-sunos5-gcc.rul 1970-01-01 00:00:00.000000000 +0000 @@ -1,41 +0,0 @@ -#ident "@(#)sun4-sunos5-gcc.rul 1.13 07/05/08 " -########################################################################### -# Written 1996 by J. Schilling -########################################################################### -# -# Platform dependent MACROS for SunOS 5.x on sparc -# -########################################################################### -# Copyright (c) J. Schilling -########################################################################### -# The contents of this file are subject to the terms of the -# Common Development and Distribution License, Version 1.0 only -# (the "License"). You may not use this file except in compliance -# with the License. -# -# See the file CDDL.Schily.txt in this distribution for details. -# -# When distributing Covered Code, include this CDDL HEADER in each -# file and include the License file CDDL.Schily.txt from this distribution. -########################################################################### -include $(SRCROOT)/$(RULESDIR)/rules.prg -########################################################################### -include $(SRCROOT)/$(RULESDIR)/cc-gcc.rul - -OSDEFS += -D__SVR4 -DSVR4 - -KDEFINES= -DKERNEL -D_KERNEL - - -LIB_SOCKET= -lsocket -lnsl -ldl -LIB_MATH= -lm -LIB_KVM= -lkvm -lelf -LIB_VOLMGT= -lvolmgt - -# -# We should use -Wl,-ztext here, but gcc does not create fully compliant -# object files. -# -LDOPTDYN= -dy -G -h $(TARGET) -Wl,-Mlib$(TARGETLIB)-mapvers -ldl - -ARFLAGS= crs diff -Nru cdrtools-2.01.01a33/RULES/version cdrtools-3.02a09/RULES/version --- cdrtools-2.01.01a33/RULES/version 2006-07-21 14:35:08.000000000 +0000 +++ cdrtools-3.02a09/RULES/version 2007-11-02 19:04:12.000000000 +0000 @@ -1,4 +1,4 @@ -#ident "@(#)version 1.3 06/07/21 " +#ident "@(#)version 1.4 07/11/02 " ########################################################################### # Written 2005 by J. Schilling ########################################################################### @@ -14,4 +14,4 @@ # When distributing Covered Code, include this CDDL HEADER in each # file and include the License file CDDL.Schily.txt from this distribution. -MAKEFILES_VERSION=1.5a04 +MAKEFILES_VERSION=1.5a05 diff -Nru cdrtools-2.01.01a33/RULES/x86_64-linux-cc.rul cdrtools-3.02a09/RULES/x86_64-linux-cc.rul --- cdrtools-2.01.01a33/RULES/x86_64-linux-cc.rul 2007-05-09 12:25:30.000000000 +0000 +++ cdrtools-3.02a09/RULES/x86_64-linux-cc.rul 1970-01-01 00:00:00.000000000 +0000 @@ -1,45 +0,0 @@ -#ident "@(#)i586-linux-cc.rul 1.11 07/05/09 " -########################################################################### -# Written 1996 by J. Schilling -########################################################################### -# -# Platform dependent MACROS for Linux -# -########################################################################### -# Copyright (c) J. Schilling -########################################################################### -# The contents of this file are subject to the terms of the -# Common Development and Distribution License, Version 1.0 only -# (the "License"). You may not use this file except in compliance -# with the License. -# -# See the file CDDL.Schily.txt in this distribution for details. -# -# When distributing Covered Code, include this CDDL HEADER in each -# file and include the License file CDDL.Schily.txt from this distribution. -########################################################################### -include $(SRCROOT)/$(RULESDIR)/rules.prg -########################################################################### -include $(SRCROOT)/$(RULESDIR)/cc-gcc.rul - -# -# LINUX_SRC_INCLUDE is defined in DEFAULTS/Defaults.linux -# -INCDIRSX += $(LINUX_SRC_INCLUDE) -OSDEFS += - -KDEFINES= -DKERNEL -D_KERNEL - -LIB_PREFIX= lib -LIB_SUFFIX= .a -SHL_SUFFIX= .so.1.0 - -LIB_SOCKET= -LIB_MATH= -lm -LIB_KVM= - -#LDOPTS= $(LIBS_PATH) $(LDPATH) $(RUNPATH:-R%=-Wl,-R%) -LDOPTS= $(LIBS_PATH) $(LDPATH) - -LORDER= echo -TSORT= cat diff -Nru cdrtools-2.01.01a33/RULES/x86_64-linux-gcc.rul cdrtools-3.02a09/RULES/x86_64-linux-gcc.rul --- cdrtools-2.01.01a33/RULES/x86_64-linux-gcc.rul 2007-05-09 12:25:30.000000000 +0000 +++ cdrtools-3.02a09/RULES/x86_64-linux-gcc.rul 1970-01-01 00:00:00.000000000 +0000 @@ -1,45 +0,0 @@ -#ident "@(#)i586-linux-gcc.rul 1.11 07/05/09 " -########################################################################### -# Written 1996 by J. Schilling -########################################################################### -# -# Platform dependent MACROS for Linux -# -########################################################################### -# Copyright (c) J. Schilling -########################################################################### -# The contents of this file are subject to the terms of the -# Common Development and Distribution License, Version 1.0 only -# (the "License"). You may not use this file except in compliance -# with the License. -# -# See the file CDDL.Schily.txt in this distribution for details. -# -# When distributing Covered Code, include this CDDL HEADER in each -# file and include the License file CDDL.Schily.txt from this distribution. -########################################################################### -include $(SRCROOT)/$(RULESDIR)/rules.prg -########################################################################### -include $(SRCROOT)/$(RULESDIR)/cc-gcc.rul - -# -# LINUX_SRC_INCLUDE is defined in DEFAULTS/Defaults.linux -# -INCDIRSX += $(LINUX_SRC_INCLUDE) -OSDEFS += - -KDEFINES= -DKERNEL -D_KERNEL - -LIB_PREFIX= lib -LIB_SUFFIX= .a -SHL_SUFFIX= .so.1.0 - -LIB_SOCKET= -LIB_MATH= -lm -LIB_KVM= - -#LDOPTS= $(LIBS_PATH) $(LDPATH) $(RUNPATH:-R%=-Wl,-R%) -LDOPTS= $(LIBS_PATH) $(LDPATH) - -LORDER= echo -TSORT= cat diff -Nru cdrtools-2.01.01a33/RULES/x86-interix-cl.rul cdrtools-3.02a09/RULES/x86-interix-cl.rul --- cdrtools-2.01.01a33/RULES/x86-interix-cl.rul 2007-05-03 15:27:52.000000000 +0000 +++ cdrtools-3.02a09/RULES/x86-interix-cl.rul 2009-05-21 10:46:53.000000000 +0000 @@ -1,4 +1,4 @@ -#ident "@(#)x86-interix-cl.rul 1.4 07/05/03 " +#ident "@(#)x86-interix-cl.rul 1.5 09/05/21 " ########################################################################### # Written 2006 by J. Schilling ########################################################################### @@ -30,6 +30,14 @@ # OSDEFS += -D_CRT_SECURE_NO_DEPRECATE +# +# Supress useless cl warnings like: +# warning C4996: 'fdopen' wurde als veraltet deklariert +# The POSIX name for this item is deprecated. Instead, use +# the ISO C++ conformant name: _fdopen. +# +OSDEFS += -D_CRT_NONSTDC_NO_DEPRECATE + KDEFINES= LIB_SOCKET= Ws2_32.lib diff -Nru cdrtools-2.01.01a33/scgcheck/cd_misc.c cdrtools-3.02a09/scgcheck/cd_misc.c --- cdrtools-2.01.01a33/scgcheck/cd_misc.c 2006-10-05 19:07:47.000000000 +0000 +++ cdrtools-3.02a09/scgcheck/cd_misc.c 1970-01-01 00:00:00.000000000 +0000 @@ -1,189 +0,0 @@ -/* @(#)cd_misc.c 1.14 06/10/05 Copyright 1997-2006 J. Schilling */ -#ifndef lint -static char sccsid[] = - "@(#)cd_misc.c 1.14 06/10/05 Copyright 1997-2006 J. Schilling"; -#endif -/* - * Misc CD support routines - * - * Copyright (c) 1997-2006 J. Schilling - */ -/* - * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. - * - * See the file CDDL.Schily.txt in this distribution for details. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file CDDL.Schily.txt from this distribution. - */ - -#include -#include -#include /* Includes for caddr_t */ -#include -#include - -#include "cdrecord.h" - -EXPORT int from_bcd __PR((int b)); -EXPORT int to_bcd __PR((int i)); -EXPORT long msf_to_lba __PR((int m, int s, int f, BOOL force_positive)); -EXPORT BOOL lba_to_msf __PR((long lba, msf_t *mp)); -EXPORT void sec_to_msf __PR((long sec, msf_t *mp)); -EXPORT void print_min_atip __PR((long li, long lo)); -EXPORT BOOL is_cdspeed __PR((int speed)); - -EXPORT int -from_bcd(b) - int b; -{ - return ((b & 0x0F) + 10 * (((b)>> 4) & 0x0F)); -} - -EXPORT int -to_bcd(i) - int i; -{ - return (i % 10 | ((i / 10) % 10) << 4); -} - -EXPORT long -msf_to_lba(m, s, f, force_positive) - int m; - int s; - int f; - BOOL force_positive; -{ - long ret = m * 60 + s; - - ret *= 75; - ret += f; - if (m < 90 || force_positive) - ret -= 150; - else - ret -= 450150; - return (ret); -} - -EXPORT BOOL -lba_to_msf(lba, mp) - long lba; - msf_t *mp; -{ - int m; - int s; - int f; - -#ifdef __follow_redbook__ - if (lba >= -150 && lba < 405000) { /* lba <= 404849 */ -#else - if (lba >= -150) { -#endif - m = (lba + 150) / 60 / 75; - s = (lba + 150 - m*60*75) / 75; - f = (lba + 150 - m*60*75 - s*75); - - } else if (lba >= -45150 && lba <= -151) { - m = (lba + 450150) / 60 / 75; - s = (lba + 450150 - m*60*75) / 75; - f = (lba + 450150 - m*60*75 - s*75); - - } else { - mp->msf_min = -1; - mp->msf_sec = -1; - mp->msf_frame = -1; - - return (FALSE); - } - mp->msf_min = m; - mp->msf_sec = s; - mp->msf_frame = f; - - if (lba > 404849) /* 404850 -> 404999: lead out */ - return (FALSE); - return (TRUE); -} - -EXPORT void -sec_to_msf(sec, mp) - long sec; - msf_t *mp; -{ - int m; - int s; - int f; - - m = (sec) / 60 / 75; - s = (sec - m*60*75) / 75; - f = (sec - m*60*75 - s*75); - - mp->msf_min = m; - mp->msf_sec = s; - mp->msf_frame = f; -} - -EXPORT void -print_min_atip(li, lo) - long li; - long lo; -{ - msf_t msf; - - if (li < 0) { - lba_to_msf(li, &msf); - - printf(" ATIP start of lead in: %ld (%02d:%02d/%02d)\n", - li, msf.msf_min, msf.msf_sec, msf.msf_frame); - } - if (lo > 0) { - lba_to_msf(lo, &msf); - printf(" ATIP start of lead out: %ld (%02d:%02d/%02d)\n", - lo, msf.msf_min, msf.msf_sec, msf.msf_frame); - } -} - -/* - * Make a probability guess whether the speed is related to CD or DVD speed. - */ -EXPORT BOOL -is_cdspeed(speed) - int speed; -{ - int cdspeed; - long cdrest; - int dvdspeed; - long dvdrest; - - cdspeed = speed / 176; - cdrest = cdspeed * 1764; - cdrest = speed * 10 - cdrest; - if (cdrest < 0) - cdrest *= -1; - if (cdrest > 1764/2) - cdrest = 1764 - cdrest; - - /* - * 3324 = 1382 * 2.4 - * speed > 0.9 * 3324 && speed < 1.1 * 3324 - */ - if (speed >= 2990 && speed <= 3656) { - dvdrest = 33240; - dvdrest = speed * 10 - dvdrest; - } else { - dvdspeed = speed / 1385; - dvdrest = dvdspeed * 13850; - dvdrest = speed * 10 - dvdrest; - } - if (dvdrest < 0) - dvdrest *= -1; - if (dvdrest > 13850/2) - dvdrest = 13850 - dvdrest; - - /* - * 1385 / 176.4 = 7.85, so we need to multiply the CD rest by 7.85 - */ - return (dvdrest > (cdrest*8 - cdrest/6)); -} diff -Nru cdrtools-2.01.01a33/scgcheck/dmaresid.c cdrtools-3.02a09/scgcheck/dmaresid.c --- cdrtools-2.01.01a33/scgcheck/dmaresid.c 2006-09-13 15:51:47.000000000 +0000 +++ cdrtools-3.02a09/scgcheck/dmaresid.c 2010-12-19 17:14:55.000000000 +0000 @@ -1,10 +1,11 @@ -/* @(#)dmaresid.c 1.8 06/09/13 Copyright 1998,2001 J. Schilling */ +/* @(#)dmaresid.c 1.12 10/12/19 Copyright 1998-2010 J. Schilling */ +#include #ifndef lint -static char sccsid[] = - "@(#)dmaresid.c 1.8 06/09/13 Copyright 1998,2001 J. Schilling"; +static UConst char sccsid[] = + "@(#)dmaresid.c 1.12 10/12/19 Copyright 1998-2010 J. Schilling"; #endif /* - * Copyright (c) 1998,2001 J. Schilling + * Copyright (c) 1998-2010 J. Schilling */ /* * The contents of this file are subject to the terms of the @@ -18,12 +19,12 @@ * file and include the License file CDDL.Schily.txt from this distribution. */ -#include -#include +#include #include #include #include #include +#include #include #include @@ -57,127 +58,122 @@ int ret; BOOL passed; - printf("Ready to start test for working DMA residual count? Enter to continue: "); - fprintf(logfile, "**********> Testing for working DMA residual count.\n"); - flushit(); - (void) getline(abuf, sizeof (abuf)); + printf(_("Ready to start test for working DMA residual count? Enter to continue: ")); + (void) chkgetline(abuf, sizeof (abuf)); - printf("**********> Testing for working DMA residual count == 0.\n"); - fprintf(logfile, "**********> Testing for working DMA residual count == 0.\n"); + chkprint(_("**********> Testing for working DMA residual count.\n")); + chkprint(_("**********> Testing for working DMA residual count == 0.\n")); passed = TRUE; dmacnt = cnt; ret = xtinquiry(scgp, cnt, dmacnt); if (ret == dmacnt) { - printf("----------> Wanted %d bytes, got it.\n", dmacnt); - fprintf(logfile, "----------> Wanted %d bytes, got it.\n", dmacnt); + chkprint(_("----------> Wanted %d bytes, got it.\n"), dmacnt); } if (ret != dmacnt) { - printf("----------> Wanted %d bytes, got (%d)\n", dmacnt, ret); - fprintf(logfile, "----------> Wanted %d bytes, got (%d)\n", dmacnt, ret); + chkprint(_("----------> Wanted %d bytes, got (%d)\n"), dmacnt, ret); } if (ret != scg_getdmacnt(scgp)) { passed = FALSE; - printf("----------> Libscg says %d bytes but got (%d)\n", scg_getdmacnt(scgp), ret); - fprintf(logfile, "----------> Libscg says %d bytes but got (%d)\n", scg_getdmacnt(scgp), ret); + chkprint(_("----------> Libscg says %d bytes but got (%d)\n"), scg_getdmacnt(scgp), ret); } if (passed && ret == dmacnt) { - printf("----------> SCSI DMA residual count == 0 test PASSED\n"); - fprintf(logfile, "----------> SCSI DMA residual count == 0 test PASSED\n"); + chkprint(_("----------> SCSI DMA residual count == 0 test PASSED\n")); } else { - printf("----------> SCSI DMA residual count == 0 test FAILED\n"); - fprintf(logfile, "----------> SCSI DMA residual count == 0 test FAILED\n"); + chkprint(_("----------> SCSI DMA residual count == 0 test FAILED\n")); } - printf("Ready to start test for working DMA residual count == DMA count? Enter to continue: "); - fprintf(logfile, "**********> Testing for working DMA residual count == DMA count.\n"); + printf(_("Ready to start test for working DMA residual count == DMA count? Enter to continue: ")); + fprintf(logfile, _("**********> Testing for working DMA residual count == DMA count.\n")); flushit(); (void) getline(abuf, sizeof (abuf)); passed = TRUE; dmacnt = cnt; ret = xtinquiry(scgp, 0, dmacnt); if (ret == 0) { - printf("----------> Wanted 0 bytes, got it.\n"); - fprintf(logfile, "----------> Wanted 0 bytes, got it.\n"); + printf(_("----------> Wanted 0 bytes, got it.\n")); + fprintf(logfile, _("----------> Wanted 0 bytes, got it.\n")); } if (ret != 0) { - printf("----------> Wanted %d bytes, got (%d)\n", 0, ret); - fprintf(logfile, "----------> Wanted %d bytes, got (%d)\n", 0, ret); + printf(_("----------> Wanted %d bytes, got (%d)\n"), 0, ret); + fprintf(logfile, _("----------> Wanted %d bytes, got (%d)\n"), 0, ret); } if (ret != scg_getdmacnt(scgp)) { passed = FALSE; - printf("----------> Libscg says %d bytes but got (%d)\n", scg_getdmacnt(scgp), ret); - fprintf(logfile, "----------> Libscg says %d bytes but got (%d)\n", scg_getdmacnt(scgp), ret); + printf(_("----------> Libscg says %d bytes but got (%d)\n"), scg_getdmacnt(scgp), ret); + fprintf(logfile, _("----------> Libscg says %d bytes but got (%d)\n"), scg_getdmacnt(scgp), ret); } if (passed && ret == 0) { - printf("----------> SCSI DMA residual count == DMA count test PASSED\n"); - fprintf(logfile, "----------> SCSI DMA residual count == DMA count test PASSED\n"); + printf(_("----------> SCSI DMA residual count == DMA count test PASSED\n")); + fprintf(logfile, _("----------> SCSI DMA residual count == DMA count test PASSED\n")); } else { passed = FALSE; - printf("----------> SCSI DMA residual count == DMA count test FAILED\n"); - fprintf(logfile, "----------> SCSI DMA residual count == DMA count test FAILED\n"); + printf(_("----------> SCSI DMA residual count == DMA count test FAILED\n")); + fprintf(logfile, _("----------> SCSI DMA residual count == DMA count test FAILED\n")); } if (!passed) { - printf("----------> SCSI DMA residual count not working - no further tests\n"); - fprintf(logfile, "----------> SCSI DMA residual count not working - no further tests\n"); + printf(_("----------> SCSI DMA residual count not working - no further tests\n")); + fprintf(logfile, _("----------> SCSI DMA residual count not working - no further tests\n")); return; } - printf("Ready to start test for working DMA residual count == 1? Enter to continue: "); - fprintf(logfile, "**********> Testing for working DMA residual count == 1.\n"); + printf(_("Ready to start test for working DMA residual count == 1? Enter to continue: ")); flushit(); (void) getline(abuf, sizeof (abuf)); + chkprint(_("**********> Testing for working DMA residual count == 1.\n")); passed = TRUE; dmacnt = cnt+1; ret = xtinquiry(scgp, cnt, dmacnt); if (ret == cnt) { - printf("----------> Wanted %d bytes, got it.\n", cnt); - fprintf(logfile, "----------> Wanted %d bytes, got it.\n", cnt); + printf(_("----------> Wanted %d bytes, got it.\n"), cnt); + fprintf(logfile, _("----------> Wanted %d bytes, got it.\n"), cnt); } if (ret != cnt) { - printf("----------> Wanted %d bytes, got (%d)\n", cnt, ret); - fprintf(logfile, "----------> Wanted %d bytes, got (%d)\n", cnt, ret); + printf(_("----------> Wanted %d bytes, got (%d)\n"), cnt, ret); + fprintf(logfile, _("----------> Wanted %d bytes, got (%d)\n"), cnt, ret); } if (ret != scg_getdmacnt(scgp)) { passed = FALSE; - printf("----------> Libscg says %d bytes but got (%d)\n", scg_getdmacnt(scgp), ret); - fprintf(logfile, "----------> Libscg says %d bytes but got (%d)\n", scg_getdmacnt(scgp), ret); + printf(_("----------> Libscg says %d bytes but got (%d)\n"), scg_getdmacnt(scgp), ret); + fprintf(logfile, _("----------> Libscg says %d bytes but got (%d)\n"), scg_getdmacnt(scgp), ret); } if (passed && ret == cnt) { - printf("----------> SCSI DMA residual count == 1 test PASSED\n"); - fprintf(logfile, "----------> SCSI DMA residual count == 1 test PASSED\n"); + printf(_("----------> SCSI DMA residual count == 1 test PASSED\n")); + fprintf(logfile, _("----------> SCSI DMA residual count == 1 test PASSED\n")); } else { passed = FALSE; - printf("----------> SCSI DMA residual count == 1 test FAILED\n"); - fprintf(logfile, "----------> SCSI DMA residual count == 1 test FAILED\n"); + printf(_("----------> SCSI DMA residual count == 1 test FAILED\n")); + fprintf(logfile, _("----------> SCSI DMA residual count == 1 test FAILED\n")); } - printf("**********> Testing for working DMA overrun test.\n"); - fprintf(logfile, "**********> Testing for working DMA overrun test.\n"); + printf(_("Ready to start test for working DMA overrun detection? Enter to continue: ")); + flushit(); + (void) getline(abuf, sizeof (abuf)); + chkprint(_("**********> Testing for working DMA overrun detection.\n")); passed = TRUE; dmacnt = cnt-1; ret = xtinquiry(scgp, cnt, dmacnt); if (ret == cnt) { passed = FALSE; - printf("----------> Wanted %d bytes, got it - DMA overrun not blocked.\n", cnt); - fprintf(logfile, "----------> Wanted %d bytes, got it - DMA overrun not blocked.\n", cnt); + printf(_("----------> Wanted %d bytes, got it - DMA overrun not blocked.\n"), cnt); + fprintf(logfile, _("----------> Wanted %d bytes, got it - DMA overrun not blocked.\n"), cnt); } if (ret != dmacnt) { passed = FALSE; - printf("----------> Wanted %d bytes, got (%d)\n", dmacnt, ret); - fprintf(logfile, "----------> Wanted %d bytes, got (%d)\n", dmacnt, ret); + printf(_("----------> Wanted %d bytes, got (%d)\n"), dmacnt, ret); + fprintf(logfile, _("----------> Wanted %d bytes, got (%d)\n"), dmacnt, ret); } if (ret != scg_getdmacnt(scgp)) { passed = FALSE; - printf("----------> Libscg says %d bytes but got (%d)\n", scg_getdmacnt(scgp), ret); - fprintf(logfile, "----------> Libscg says %d bytes but got (%d)\n", scg_getdmacnt(scgp), ret); + printf(_("----------> Libscg says %d bytes but got (%d)\n"), scg_getdmacnt(scgp), ret); + fprintf(logfile, _("----------> Libscg says %d bytes but got (%d)\n"), scg_getdmacnt(scgp), ret); } if (passed && scg_getresid(scgp) < 0) { - printf("----------> SCSI DMA overrun test PASSED\n"); - fprintf(logfile, "----------> SCSI DMA overrun test PASSED\n"); + printf(_("----------> SCSI DMA overrun test PASSED\n")); + fprintf(logfile, _("----------> SCSI DMA overrun test PASSED\n")); } else { - printf("----------> SCSI DMA overrun test FAILED\n"); - fprintf(logfile, "----------> SCSI DMA overrun test FAILED\n"); + printf(_("----------> SCSI DMA overrun test FAILED\n")); + fprintf(logfile, _("----------> SCSI DMA overrun test FAILED\n")); } } @@ -205,7 +201,7 @@ i++; maxcnt = i; rescnt = dmacnt - scg_getresid(scgp); - printf("CDB cnt: %d DMA cnt: %d got really: %d (System says: RDMA cnt: %d resid %d)\n", + printf(_("CDB cnt: %d DMA cnt: %d got really: %d (System says: RDMA cnt: %d resid %d)\n"), cnt, dmacnt, i, rescnt, scg_getresid(scgp)); fillbytes(ibuf, sizeof (ibuf), 0xFF); @@ -219,7 +215,7 @@ if (i > maxcnt) maxcnt = i; rescnt = dmacnt - scg_getresid(scgp); - printf("CDB cnt: %d DMA cnt: %d got really: %d (System says: RDMA cnt: %d resid %d)\n", + printf(_("CDB cnt: %d DMA cnt: %d got really: %d (System says: RDMA cnt: %d resid %d)\n"), cnt, dmacnt, i, rescnt, scg_getresid(scgp)); return (maxcnt); @@ -250,6 +246,6 @@ if (scg_cmd(scgp) < 0) return (-1); if (scgp->verbose) - scg_prbytes("Inquiry Data :", (Uchar *)bp, cnt - scg_getresid(scgp)); + scg_prbytes(_("Inquiry Data :"), (Uchar *)bp, cnt - scg_getresid(scgp)); return (0); } diff -Nru cdrtools-2.01.01a33/scgcheck/Makefile cdrtools-3.02a09/scgcheck/Makefile --- cdrtools-2.01.01a33/scgcheck/Makefile 2007-04-23 22:32:46.000000000 +0000 +++ cdrtools-3.02a09/scgcheck/Makefile 2013-04-21 18:22:24.000000000 +0000 @@ -1,4 +1,4 @@ -#ident @(#)Makefile 1.7 07/04/24 +#ident @(#)Makefile 1.15 13/04/21 ########################################################################### SRCROOT= .. RULESDIR= RULES @@ -7,19 +7,30 @@ INSDIR= bin TARGET= scgcheck +CPPOPTS += -I../libscg CPPOPTS += -I../cdrecord CPPOPTS += -DSCHILY_PRINT +CPPOPTS += -DINS_BASE=\"${INS_BASE}\" +CPPOPTS += -DTEXT_DOMAIN=\"SCHILY_cdrtools\" CFILES= scgcheck.c sense.c dmaresid.c \ - scsi_scan.c scsi_cdr.c cd_misc.c modes.c + scsi_scan.c scsi_cdr.c cd_misc.c HFILES= scgcheck.h version.h #LIBS= -lschily $(LIB_SOCKET) -LIBS= -lrscg -lscg $(LIB_VOLMGT) -lschily $(SCSILIB) $(LIB_SOCKET) +# +# LIB_CAP is needed for Linux capability support in librscg. +# +LIBS= -lscgcmd -lrscg -lscg $(LIB_VOLMGT) -lschily $(SCSILIB) $(LIB_SOCKET) $(LIB_INTL) $(LIB_CAP) XMK_FILE= Makefile.man +scsi_scan.c scsi_cdr.c cd_misc.c: + @echo " ==> MAKING SYMLINKS in ." && sh ./MKLINKS +$(ALLTARGETS): scsi_scan.c scsi_cdr.c + ########################################################################### include $(SRCROOT)/$(RULESDIR)/rules.cmd ########################################################################### count: $(CFILES) $(HFILES) count $r1 + diff -Nru cdrtools-2.01.01a33/scgcheck/MKLINKS cdrtools-3.02a09/scgcheck/MKLINKS --- cdrtools-2.01.01a33/scgcheck/MKLINKS 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/scgcheck/MKLINKS 2011-08-04 21:45:27.000000000 +0000 @@ -0,0 +1,36 @@ +#!/bin/sh +########################################################################### +#ident "@(#)MKLINKS 1.4 11/08/04 " +########################################################################### +# Written 2008-2011 by J. Schilling +########################################################################### +# Copyright (c) 2008-2011 J. Schilling +########################################################################### +# The contents of this file are subject to the terms of the +# Common Development and Distribution License, Version 1.0 only +# (the "License"). You may not use this file except in compliance +# with the License. +# +# See the file CDDL.Schily.txt in this distribution for details. +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file CDDL.Schily.txt from this distribution. +########################################################################### +symlink="ln -s" +MKLINKS_TEST=${MKLINKS_TEST-:} +if [ ".$MKLINKS_COPY" = '.' ]; then + rm -f xxzzy.123 xxzzy.345 + echo test > xxzzy.123 + $symlink xxzzy.123 xxzzy.345 + test $? = 0 || symlink=cp + test -r xxzzy.345 || symlink=cp + ${MKLINKS_TEST} -h xxzzy.345 || symlink=cp + rm -f xxzzy.123 xxzzy.345 +else + symlink=cp +fi +########################################################################### + +$symlink ../cdrecord/cd_misc.c . +$symlink ../cdrecord/scsi_cdr.c . +$symlink ../cdrecord/scsi_scan.c . diff -Nru cdrtools-2.01.01a33/scgcheck/modes.c cdrtools-3.02a09/scgcheck/modes.c --- cdrtools-2.01.01a33/scgcheck/modes.c 2006-09-13 15:35:12.000000000 +0000 +++ cdrtools-3.02a09/scgcheck/modes.c 1970-01-01 00:00:00.000000000 +0000 @@ -1,296 +0,0 @@ -/* @(#)modes.c 1.26 06/09/13 Copyright 1988, 1997-2001, 2004 J. Schilling */ -#ifndef lint -static char sccsid[] = - "@(#)modes.c 1.26 06/09/13 Copyright 1988, 1997-2001, 2004 J. Schilling"; -#endif -/* - * SCSI mode page handling - * - * Copyright (c) 1988, 1997-2001, 2004 J. Schilling - */ -/* - * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. - * - * See the file CDDL.Schily.txt in this distribution for details. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file CDDL.Schily.txt from this distribution. - */ - -#include -#include -#include -#include -#include -#include -#include - -#include "cdrecord.h" - -EXPORT int scsi_compliant; - -LOCAL BOOL has_mode_page __PR((SCSI *scgp, int page, char *pagename, int *lenp)); -EXPORT BOOL get_mode_params __PR((SCSI *scgp, int page, char *pagename, - Uchar *modep, Uchar *cmodep, - Uchar *dmodep, Uchar *smodep, - int *lenp)); -EXPORT BOOL set_mode_params __PR((SCSI *scgp, char *pagename, Uchar *modep, - int len, int save, int secsize)); - -#define XXX - -#ifdef XXX -LOCAL BOOL -has_mode_page(scgp, page, pagename, lenp) - SCSI *scgp; - int page; - char *pagename; - int *lenp; -{ - Uchar mode[0x100]; - int hdlen; - int len = 1; /* Nach SCSI Norm */ - int try = 0; - struct scsi_mode_page_header *mp; - - /* - * ATAPI drives (used e.g. by IOMEGA) from y2k have the worst firmware - * I've seen. They create DMA buffer overruns if we request less than - * 3 bytes with 6 byte mode sense which equals 4 byte with 10 byte mode - * sense. In order to prevent repeated bus resets, we remember this - * bug. - * - * IOMEGA claims that they are using Philips clone drives but a Philips - * drive I own does not have the problem. - */ - if ((scgp->dflags & DRF_MODE_DMA_OVR) != 0) - len = sizeof (struct scsi_mode_header); -again: - fillbytes((caddr_t)mode, sizeof (mode), '\0'); - if (lenp) - *lenp = 0; - - scgp->silent++; - (void) unit_ready(scgp); -/* Maxoptix bringt Aborted cmd 0x0B mit code 0x4E (overlapping cmds)*/ - - /* - * The Matsushita CW-7502 will sometimes deliver a zeroed - * mode page 2A if "Page n default" is used instead of "current". - */ - if (mode_sense(scgp, mode, len, page, 0) < 0) { /* Page n current */ - scgp->silent--; - if (len < (int)sizeof (struct scsi_mode_header) && try == 0) { - len = sizeof (struct scsi_mode_header); - goto again; - } - return (FALSE); - } else { - if (len > 1 && try == 0) { - /* - * If we come here, we got a hard failure with the - * fist try. Remember this (IOMEGA USB) firmware bug. - */ - if ((scgp->dflags & DRF_MODE_DMA_OVR) == 0) { - /* XXX if (!nowarn) */ - errmsgno(EX_BAD, - "Warning: controller creates hard SCSI failure when retrieving %s page.\n", - pagename); - scgp->dflags |= DRF_MODE_DMA_OVR; - } - } - len = ((struct scsi_mode_header *)mode)->sense_data_len + 1; - } - /* - * ATAPI drives as used by IOMEGA may receive a SCSI bus device reset - * in between these two mode sense commands. - */ - (void) unit_ready(scgp); - if (mode_sense(scgp, mode, len, page, 0) < 0) { /* Page n current */ - scgp->silent--; - return (FALSE); - } - scgp->silent--; - - if (scgp->verbose) - scg_prbytes("Mode Sense Data", mode, len - scg_getresid(scgp)); - hdlen = sizeof (struct scsi_mode_header) + - ((struct scsi_mode_header *)mode)->blockdesc_len; - mp = (struct scsi_mode_page_header *)(mode + hdlen); - if (scgp->verbose) - scg_prbytes("Mode Page Data", (Uchar *)mp, mp->p_len+2); - - if (mp->p_len == 0) { - if (!scsi_compliant && try == 0) { - len = hdlen; - /* - * add sizeof page header (page # + len byte) - * (should normaly result in len == 14) - * this allowes to work with: - * Quantum Q210S (wants at least 13) - * MD2x (wants at least 4) - */ - len += 2; - try++; - goto again; - } - /* XXX if (!nowarn) */ - errmsgno(EX_BAD, - "Warning: controller returns zero sized %s page.\n", - pagename); - } - if (!scsi_compliant && - (len < (int)(mp->p_len + hdlen + 2))) { - len = mp->p_len + hdlen + 2; - - /* XXX if (!nowarn) */ - errmsgno(EX_BAD, - "Warning: controller returns wrong size for %s page.\n", - pagename); - } - if (mp->p_code != page) { - /* XXX if (!nowarn) */ - errmsgno(EX_BAD, - "Warning: controller returns wrong page %X for %s page (%X).\n", - mp->p_code, pagename, page); - return (FALSE); - } - - if (lenp) - *lenp = len; - return (mp->p_len > 0); -} -#endif - -EXPORT BOOL -get_mode_params(scgp, page, pagename, modep, cmodep, dmodep, smodep, lenp) - SCSI *scgp; - int page; - char *pagename; - Uchar *modep; - Uchar *cmodep; - Uchar *dmodep; - Uchar *smodep; - int *lenp; -{ - int len; - BOOL ret = TRUE; - -#ifdef XXX - if (lenp) - *lenp = 0; - if (!has_mode_page(scgp, page, pagename, &len)) { - if (!scgp->silent) errmsgno(EX_BAD, - "Warning: controller does not support %s page.\n", - pagename); - return (FALSE); - } - if (lenp) - *lenp = len; -#else - if (lenp == 0) - len = 0xFF; -#endif - - if (modep) { - fillbytes(modep, 0x100, '\0'); - scgp->silent++; - (void) unit_ready(scgp); - scgp->silent--; - if (mode_sense(scgp, modep, len, page, 0) < 0) { /* Page x current */ - errmsgno(EX_BAD, "Cannot get %s data.\n", pagename); - ret = FALSE; - } else if (scgp->verbose) { - scg_prbytes("Mode Sense Data", modep, len - scg_getresid(scgp)); - } - } - - if (cmodep) { - fillbytes(cmodep, 0x100, '\0'); - scgp->silent++; - (void) unit_ready(scgp); - scgp->silent--; - if (mode_sense(scgp, cmodep, len, page, 1) < 0) { /* Page x change */ - errmsgno(EX_BAD, "Cannot get %s mask.\n", pagename); - ret = FALSE; - } else if (scgp->verbose) { - scg_prbytes("Mode Sense Data", cmodep, len - scg_getresid(scgp)); - } - } - - if (dmodep) { - fillbytes(dmodep, 0x100, '\0'); - scgp->silent++; - (void) unit_ready(scgp); - scgp->silent--; - if (mode_sense(scgp, dmodep, len, page, 2) < 0) { /* Page x default */ - errmsgno(EX_BAD, "Cannot get default %s data.\n", - pagename); - ret = FALSE; - } else if (scgp->verbose) { - scg_prbytes("Mode Sense Data", dmodep, len - scg_getresid(scgp)); - } - } - - if (smodep) { - fillbytes(smodep, 0x100, '\0'); - scgp->silent++; - (void) unit_ready(scgp); - scgp->silent--; - if (mode_sense(scgp, smodep, len, page, 3) < 0) { /* Page x saved */ - errmsgno(EX_BAD, "Cannot get saved %s data.\n", pagename); - ret = FALSE; - } else if (scgp->verbose) { - scg_prbytes("Mode Sense Data", smodep, len - scg_getresid(scgp)); - } - } - - return (ret); -} - -EXPORT BOOL -set_mode_params(scgp, pagename, modep, len, save, secsize) - SCSI *scgp; - char *pagename; - Uchar *modep; - int len; - int save; - int secsize; -{ - int i; - - ((struct scsi_modesel_header *)modep)->sense_data_len = 0; - ((struct scsi_modesel_header *)modep)->res2 = 0; - - i = ((struct scsi_mode_header *)modep)->blockdesc_len; - if (i > 0) { - i_to_3_byte( - ((struct scsi_mode_data *)modep)->blockdesc.nlblock, - 0); - if (secsize >= 0) - i_to_3_byte(((struct scsi_mode_data *)modep)->blockdesc.lblen, - secsize); - } - - scgp->silent++; - (void) unit_ready(scgp); - scgp->silent--; - if (save == 0 || mode_select(scgp, modep, len, save, scgp->inq->data_format >= 2) < 0) { - scgp->silent++; - (void) unit_ready(scgp); - scgp->silent--; - if (mode_select(scgp, modep, len, 0, scgp->inq->data_format >= 2) < 0) { - if (scgp->silent == 0) { - errmsgno(EX_BAD, - "Warning: using default %s data.\n", - pagename); - scg_prbytes("Mode Select Data", modep, len); - } - return (FALSE); - } - } - return (TRUE); -} diff -Nru cdrtools-2.01.01a33/scgcheck/scgcheck.1 cdrtools-3.02a09/scgcheck/scgcheck.1 --- cdrtools-2.01.01a33/scgcheck/scgcheck.1 2006-05-14 13:32:56.000000000 +0000 +++ cdrtools-3.02a09/scgcheck/scgcheck.1 2016-01-26 21:48:54.000000000 +0000 @@ -1,12 +1,14 @@ -.\" @(#)scgcheck.1 1.10 06/05/14 Copyright 2000 J. Schilling +.\" @(#)scgcheck.1 1.20 16/01/26 Copyright 2000-2016 J. Schilling .\" .\" The contents of this file are subject to the terms of the -.\" Common Development and Distribution License, Version 1.0 only. +.\" Common Development and Distribution License, Version 1.0 only .\" (the "License"). You may not use this file except in compliance .\" with the License. .\" .\" See the file CDDL.Schily.txt in this distribution for details. -." +.\" A copy of the CDDL is also available via the Internet at +.\" http://www.opensource.org/licenses/cddl1.txt +.\" .\" When distributing Covered Code, include this CDDL HEADER in each .\" file and include the License file CDDL.Schily.txt from this distribution. .\" @@ -22,7 +24,7 @@ .if n .ds o oe .if n .ds u ue .if n .ds s sz -.TH SCGCHECK 1 "Version 2.0" "J\*org Schilling" "Schily\'s USER COMMANDS" +.TH SCGCHECK 1 "Version 3.0 2016/01/26" "J\*org Schilling" "Schily\'s USER COMMANDS" .SH NAME scgcheck \- check and validate the ABI of libscg .SH SYNOPSIS @@ -36,11 +38,56 @@ is used to check and verify the Application Binary Interface of libscg. .PP +.SS "Device naming" +Most users do not need to care about device naming at all, as +in +.B \-auto +mode, +.B scgcheck +implements +.B auto target +support and automagically finds a test drive in case that exactly +one CD-ROM type drive is available in the system. + +.SH OPTIONS +.TP +.B \-version +Print version information and exit. +.TP +.B \-auto +Instead of asking to confirm each test before runing it, +.B scgcheck +tries to do a fully automated test. +.TP +.BI dev= target +Set the SCSI target for the device, see notes above. +A typical target device specification is +.BI dev= 1,6,0 +\&. +If a filename must be provided together with the numerical target +specification, the filename is implementation specific. +The correct filename in this case can be found in the system specific +manuals of the target operating system. +On a +.I FreeBSD +system without +.I CAM +support, you need to use the control device (e.g. +.IR /dev/rcd0.ctl ). +A correct device specification in this case may be +.BI dev= /dev/rcd0.ctl:@ +\&. +.sp +.B \h'-2m'General SCSI addressing +.br The -.I device +.I target device +to the +.B dev= +option refers to .IR scsibus / target / lun -of the drive. Communication on +of the device. Communication on .I SunOS is done with the SCSI general driver .B scg. @@ -51,7 +98,7 @@ or .B dev= .IR target , lun . -In the latter case, the drive has to be connected to the default +In the latter case, the device has to be connected to the default SCSI bus of the machine. .IR Scsibus , .I target @@ -76,35 +123,66 @@ may be used instead of .B dev= .IR devicename : scsibus , target , lun . - -.PP +.sp +.B \h'-2m'Remote SCSI addressing +.br To access remote SCSI devices, you need to prepend the SCSI device name by a remote device indicator. The remote device indicator is either .BI REMOTE: user@host: or -.BR .BI REMOTE: host: -.br A valid remote SCSI device name may be: .BI REMOTE: user@host: to allow remote SCSI bus scanning or .BI REMOTE: user@host:1,0,0 to access the SCSI device at .I host -connected to SCSI bus # 1,target 0 lun 0. - -.PP +connected to SCSI bus # 1,target 0, lun 0. +In order to allow remote access to a specific +.IR host , +the +.BR rscsi (1) +program needs to be present and configured on the +.IR host . +.sp +.B \h'-2m'Alternate SCSI transports +.br +.B ATAPI +drives are just +.B SCSI +drives that inherently use the +.I "ATA packet interface +as +.B SCSI +command transport layer build into the IDE (ATA) transport. +You may need to specify an alternate transport layer on the command line +if your OS does not implement a fully integrated kernel driver subsystem that +allows to access any drive using +.B SCSI +commands via a single unique user interface. +.sp +To access SCSI devices via alternate transport layers, +you need to prepend the SCSI device name by a transport layer indicator. +The transport layer indicator may be something like +.B USCSI: +or +.BR ATAPI: . +To get a list of supported transport layers for your platform, use +.B dev= +.IR HELP : +.sp +.B \h'-2m'Portability Background +.br To make -.B readcd +.B scgcheck portable to all \s-2UNIX\s0 platforms, the syntax .B dev= .IR devicename : scsibus , target , lun -is preferred as is hides OS specific knowledge about device names from the user. -A specific OS must not necessarily support a way to specify a real device file name nor a +is preferred as it hides OS specific knowledge about device names from the user. +A specific OS may not necessarily support a way to specify a real device file name nor a way to specify .IR scsibus , target , lun . - -.PP +.sp .I Scsibus 0 is the default SCSI bus on the machine. Watch the boot messages for more information or look into @@ -115,52 +193,19 @@ should be used, try the .B \-scanbus option of -.BR cdrecord . - -.SH OPTIONS -.TP -.B \-version -Print version information and exit. -.TP -.BI dev= target -Sets the SCSI target default for SCSI Bus scanning test, see notes above. -This allows e.g. to specify to use Solaris USCSI or remote SCSI -for the bus scanning case. - -For the non bus scanning case, a typical device specification is -.BI dev= 6,0 -\&. -If a filename must be provided together with the numerical target -specification, the filename is implementation specific. -The correct filename in this case can be found in the system specific -manuals of the target operating system. -On a -.I FreeBSD -system without -.I CAM -support, you need to use the control device (e.g. -.IR /dev/rcd0.ctl ). -A correct device specification in this case may be -.BI dev= /dev/rcd0.ctl:@ -\&. -.sp -On Linux, drives connected to a parallel port adapter are mapped -to a virtual SCSI bus. Different adapters are mapped to different -targets on this virtual SCSI bus. +.B scgcheck +described below. .sp +.B \h'-2m'Autotarget Mode +.br If no -.I dev -option is present, -.B cdrecord -will try to get the device from the -.B CDR_DEVICE -environment. -.sp -If the argument to the .B dev= -option does not contain the characters ',', '/', '@' or ':', -it is interpreted as an label name that may be found in the file -/etc/default/cdrecord (see FILES section). +option +is present, or if it +only contains a transport specifyer but no address notation, +.B scgcheck +tries to scan the SCSI address space for CD-ROM drives. +If exactly one is found, this is used by default. .TP .BI timeout= # Set the default SCSI command timeout value to @@ -176,10 +221,10 @@ .I timeout option is present, a default timeout of 40 seconds is used. .TP -.BI debug= "#, " -d +.BI debug= "#, " \-d Set the misc debug value to # (with debug=#) or increment -the misc debug level by one (with -d). If you specify -.I -dd, +the misc debug level by one (with \-d). If you specify +.I \-dd, this equals to .BI debug= 2. This may help to find problems while opening a driver for libscg. @@ -193,6 +238,13 @@ .BR scg -driver to modify the kernel debug value while SCSI commands are running. .TP +.BI scgopts= list +A comma separated list of SCSI options that are handled by libscg. +The implemented options may be uptated indepentendly from applications. +Currently, one option: +.B ignore\-resid +is supported to work around a Linux kernel bug. +.TP .BR \-silent ", " \-s Do not print out a status report for failed SCSI commands. .TP @@ -230,7 +282,7 @@ .SH NOTES .PP When using -.B scgckeck +.B scgcheck with the broken .B "Linux SCSI generic driver." You should note that @@ -269,7 +321,7 @@ .sp .RS .nf -readcd: I/O error. test unit ready: scsi sendcmd: no error +scgcheck: I/O error. test unit ready: scsi sendcmd: no error CDB: 00 20 00 00 00 00 status: 0x2 (CHECK CONDITION) Sense Bytes: 70 00 05 00 00 00 00 0A 00 00 00 00 25 00 00 00 00 00 @@ -336,31 +388,27 @@ .PP Additional information can be found on: .br -http://www.fokus.fhg.de/usr/schilling/cdrecord.html +http://cdrecord.org/private/cdrecord.html .PP If you have support questions, send them to: .PP .B -cdrecord-support@berlios.de -.br -or -.B -other-cdwrite@lists.debian.org +cdrtools-support@lists.sourceforge.net .PP If you have definitely found a bug, send a mail to: .PP .B -cdrecord-developers@berlios.de +cdrtools-developers@lists.sourceforge.net .br or .B -schilling@fokus.fhg.de +joerg.schilling@fokus.fraunhofer.de .PP To subscribe, use: .PP .B -http://lists.berlios.de/mailman/listinfo/cdrecord-developers +https://lists.sourceforge.net/lists/listinfo/cdrtools-developers .br or .B -http://lists.berlios.de/mailman/listinfo/cdrecord-support +https://lists.sourceforge.net/lists/listinfo/cdrtools-support diff -Nru cdrtools-2.01.01a33/scgcheck/scgcheck.c cdrtools-3.02a09/scgcheck/scgcheck.c --- cdrtools-2.01.01a33/scgcheck/scgcheck.c 2007-04-23 22:37:20.000000000 +0000 +++ cdrtools-3.02a09/scgcheck/scgcheck.c 2016-01-24 16:32:07.000000000 +0000 @@ -1,10 +1,16 @@ -/* @(#)scgcheck.c 1.9 07/04/24 Copyright 1998-2007 J. Schilling */ +/* @(#)scgcheck.c 1.22 16/01/24 Copyright 1998-2016 J. Schilling */ +#include #ifndef lint -static char sccsid[] = - "@(#)scgcheck.c 1.9 07/04/24 Copyright 1998-2007 J. Schilling"; +static UConst char sccsid[] = + "@(#)scgcheck.c 1.22 16/01/24 Copyright 1998-2016 J. Schilling"; #endif /* - * Copyright (c) 1998-2007 J. Schilling + * Copyright (c) 1998-2016 J. Schilling + * + * Warning: This program has been written to verify the correctness + * of the upper layer interface from the library "libscg". If you + * modify code from the program "scgcheck", you must change the + * name of the program. */ /* * The contents of this file are subject to the terms of the @@ -13,17 +19,19 @@ * with the License. * * See the file CDDL.Schily.txt in this distribution for details. + * A copy of the CDDL is also available via the Internet at + * http://www.opensource.org/licenses/cddl1.txt * * When distributing Covered Code, include this CDDL HEADER in each * file and include the License file CDDL.Schily.txt from this distribution. */ -#include -#include +#include #include #include #include #include +#include #include #include @@ -43,11 +51,16 @@ LOCAL SCSI *doopen __PR((char *dev)); LOCAL void checkversion __PR((SCSI *scgp)); LOCAL void getbuf __PR((SCSI *scgp)); +LOCAL void scg_openerr __PR((char *errstr)); +LOCAL int find_drive __PR((SCSI *scgp, char *sdevname, int flags)); EXPORT void flushit __PR((void)); EXPORT int countopen __PR((void)); +EXPORT int chkprint __PR((const char *, ...)) __printflike__(1, 2); +EXPORT int chkgetline __PR((char *, int)); char *dev; + char *scgopts; int debug; /* print debug messages */ int kdebug; /* kernel debug messages */ int scsi_verbose; /* SCSI verbose flag */ @@ -55,6 +68,7 @@ int silent; /* SCSI silent flag */ int deftimeout = 40; /* default SCSI timeout */ int xdebug; /* extended debug flag */ +BOOL autotest; char *buf; /* The transfer buffer */ long bufsize; /* The size of the transfer buffer */ @@ -71,22 +85,24 @@ usage(ret) int ret; { - error("Usage:\tscgcheck [options]\n"); - error("Options:\n"); - error("\t-version print version information and exit\n"); - error("\tdev=target SCSI target to use\n"); - error("\ttimeout=# set the default SCSI command timeout to #.\n"); - error("\tdebug=#,-d Set to # or increment misc debug level\n"); - error("\tkdebug=#,kd=# do Kernel debugging\n"); - error("\t-verbose,-v increment general verbose level by one\n"); - error("\t-Verbose,-V increment SCSI command transport verbose level by one\n"); - error("\t-silent,-s do not print status of failed SCSI commands\n"); - error("\tf=filename Name of file to write log data to.\n"); + error(_("Usage:\tscgcheck [options]\n")); + error(_("Options:\n")); + error(_("\t-version print version information and exit\n")); + error(_("\tdev=target SCSI target to use\n")); + error(_("\tscgopts=spec SCSI options for libscg\n")); + error(_("\ttimeout=# set the default SCSI command timeout to #.\n")); + error(_("\tdebug=#,-d Set to # or increment misc debug level\n")); + error(_("\tkdebug=#,kd=# do Kernel debugging\n")); + error(_("\t-verbose,-v increment general verbose level by one\n")); + error(_("\t-Verbose,-V increment SCSI command transport verbose level by one\n")); + error(_("\t-silent,-s do not print status of failed SCSI commands\n")); + error(_("\tf=filename Name of file to write log data to.\n")); + error(_("\t-auto try to do a fully automated test\n")); error("\n"); exit(ret); -} +} -char opts[] = "debug#,d+,kdebug#,kd#,timeout#,verbose+,v+,Verbose+,V+,silent,s,x+,xd#,help,h,version,dev*,f*"; +char opts[] = "debug#,d+,kdebug#,kd#,timeout#,verbose+,v+,Verbose+,V+,silent,s,x+,xd#,help,h,version,dev*,scgopts*,f*,auto"; EXPORT int main(ac, av) @@ -103,9 +119,30 @@ BOOL help = FALSE; BOOL pversion = FALSE; char *filename = "check.log"; +#if defined(USE_NLS) + char *dir; +#endif save_args(ac, av); +#if defined(USE_NLS) + (void) setlocale(LC_ALL, ""); +#if !defined(TEXT_DOMAIN) /* Should be defined by cc -D */ +#define TEXT_DOMAIN "scgcheck" /* Use this only if it weren't */ +#endif + dir = searchfileinpath("share/locale", F_OK, + SIP_ANY_FILE|SIP_NO_PATH, NULL); + if (dir) + (void) bindtextdomain(TEXT_DOMAIN, dir); + else +#if defined(PROTOTYPES) && defined(INS_BASE) + (void) bindtextdomain(TEXT_DOMAIN, INS_BASE "/share/locale"); +#else + (void) bindtextdomain(TEXT_DOMAIN, "/usr/share/locale"); +#endif + (void) textdomain(TEXT_DOMAIN); +#endif + cac = --ac; cav = ++av; @@ -118,17 +155,18 @@ &silent, &silent, &xdebug, &xdebug, &help, &help, &pversion, - &dev, - &filename) < 0) { - errmsgno(EX_BAD, "Bad flag: %s.\n", cav[0]); + &dev, &scgopts, + &filename, &autotest) < 0) { + errmsgno(EX_BAD, _("Bad flag: %s.\n"), cav[0]); usage(EX_BAD); } if (help) usage(0); if (pversion) { - printf("scgckeck %s (%s-%s-%s) Copyright (C) 1998-2007 Jörg Schilling\n", + printf(_("scgcheck %s (%s-%s-%s) Copyright (C) 1998-2016 %s\n"), scgc_version, - HOST_CPU, HOST_VENDOR, HOST_OS); + HOST_CPU, HOST_VENDOR, HOST_OS, + _("Joerg Schilling")); exit(0); } @@ -142,21 +180,18 @@ cav++; } if (fcount > 0) - comerrno(EX_BAD, "Bad argument(s).\n"); + comerrno(EX_BAD, _("Bad argument(s).\n")); /*error("dev: '%s'\n", dev);*/ logfile = fileopen(filename, "wct"); if (logfile == NULL) - comerr("Cannot open logfile.\n"); + comerr(_("Cannot open logfile.\n")); - printf("Scgcheck %s (%s-%s-%s) SCSI user level transport library ABI checker.\n\ -Copyright (C) 1998,2001 Jörg Schilling\n", + chkprint(_("Scgcheck %s (%s-%s-%s) SCSI user level transport library ABI checker.\n\ +Copyright (C) 1998-2016 %s\n"), scgc_version, - HOST_CPU, HOST_VENDOR, HOST_OS); - fprintf(logfile, "Scgcheck %s (%s-%s-%s) SCSI user level transport library ABI checker.\n\ -Copyright (C) 1998,2001 Jörg Schilling\n", - scgc_version, - HOST_CPU, HOST_VENDOR, HOST_OS); + HOST_CPU, HOST_VENDOR, HOST_OS, + _("Joerg Schilling")); /* * Call scg_remote() to force loading the remote SCSI transport library * code that is located in librscg instead of the dummy remote routines @@ -166,32 +201,29 @@ basefds = countopen(); if (xdebug) - error("nopen: %d\n", basefds); + error(_("nopen: %d\n"), basefds); - printf("Checking if your implementation supports to scan the SCSI bus.\n"); - fprintf(logfile, "Checking if your implementation supports to scan the SCSI bus.\n"); - printf("Trying to open device: '%s'.\n", dev); - fprintf(logfile, "Trying to open device: '%s'.\n", dev); + chkprint(_("**********> Checking whether your implementation supports to scan the SCSI bus.\n")); + chkprint(_("Trying to open device: '%s'.\n"), dev); scgp = doopen(dev); if (xdebug) { - error("nopen: %d\n", countopen()); - error("Scanopen opened %d new files.\n", countopen() - basefds); + error(_("nopen: %d\n"), countopen()); + error(_("Scanopen opened %d new files.\n"), countopen() - basefds); } device[0] = '\0'; if (scgp == NULL) do { - error("SCSI open failed...\n"); - if (!scg_yes("Retry with different device name? ")) + error(_("SCSI open failed...\n")); + if (!scg_yes(_("Retry with different device name? "))) break; - error("Enter SCSI device name for bus scanning [%s]: ", device); + error(_("Enter SCSI device name for bus scanning [%s]: "), device); flushit(); (void) getline(device, sizeof (device)); if (device[0] == '\0') strcpy(device, "0,6,0"); - printf("Trying to open device: '%s'.\n", device); - fprintf(logfile, "Trying to open device: '%s'.\n", device); + chkprint(_("Trying to open device: '%s'.\n"), device); scgp = doopen(device); } while (scgp == NULL); if (scgp) { @@ -200,36 +232,47 @@ ret = select_target(scgp, stdout); select_target(scgp, logfile); - scg_close(scgp); - scgp = NULL; if (ret < 1) { - printf("----------> SCSI scan bus test: found NO TARGETS\n"); - fprintf(logfile, "----------> SCSI scan bus test: found NO TARGETS\n"); + chkprint(_("----------> SCSI scan bus test: found NO TARGETS\n")); } else { - printf("----------> SCSI scan bus test PASSED\n"); - fprintf(logfile, "----------> SCSI scan bus test PASSED\n"); + chkprint(_("----------> SCSI scan bus test PASSED\n")); } } else { - printf("----------> SCSI scan bus test FAILED\n"); - fprintf(logfile, "----------> SCSI scan bus test FAILED\n"); + chkprint(_("----------> SCSI scan bus test FAILED\n")); } if (xdebug) - error("nopen: %d\n", countopen()); - printf("For the next test we need to open a single SCSI device.\n"); - fprintf(logfile, "For the next test we need to open a single SCSI device.\n"); - printf("Best results will be obtained if you specify a modern CD-ROM drive.\n"); - fprintf(logfile, "Best results will be obtained if you specify a modern CD-ROM drive.\n"); - strcpy(device, "0,6,0"); + error(_("nopen: %d\n"), countopen()); + chkprint(_("For the next test we need to open a single SCSI device.\n")); + chkprint(_("Best results will be obtained if you specify a modern CD-ROM drive.\n")); + + if (scgp) { /* Scanbus works / may work */ + int i; + + i = find_drive(scgp, dev, 0); + if (i < 0) { + scg_openerr(""); + /* NOTREACHED */ + } + snprintf(device, sizeof (device), + "%s%s%d,%d,%d", + dev?dev:"", dev?(dev[strlen(dev)-1] == ':'?"":":"):"", + scg_scsibus(scgp), scg_target(scgp), scg_lun(scgp)); + scg_close(scgp); + scgp = NULL; + } + + if (device[0] == '\0') + strcpy(device, "0,6,0"); do { - error("Enter SCSI device name [%s]: ", device); - flushit(); - (void) getline(device, sizeof (device)); - if (device[0] == '\0') - strcpy(device, "0,6,0"); + char Device[128]; - printf("Trying to open device: '%s'.\n", device); - fprintf(logfile, "Trying to open device: '%s'.\n", device); + error(_("Enter SCSI device name [%s]: "), device); + (void) chkgetline(Device, sizeof (Device)); + if (Device[0] != '\0') + strcpy(device, Device); + + chkprint(_("Trying to open device: '%s'.\n"), device); scgp = doopen(device); if (scgp) { checkversion(scgp); @@ -240,7 +283,7 @@ */ } while (scgp == NULL); if (xdebug) - error("nopen: %d\n", countopen()); + error(_("nopen: %d\n"), countopen()); /* * First try to check which type of SCSI device we * have. @@ -251,9 +294,8 @@ getdev(scgp, TRUE); printinq(scgp, logfile); - printf("Ready to start test for second SCSI open? Enter to continue: "); - flushit(); - (void) getline(abuf, sizeof (abuf)); + printf(_("Ready to start test for second SCSI open? Enter to continue: ")); + (void) chkgetline(abuf, sizeof (abuf)); #define CHECK_SECOND_OPEN #ifdef CHECK_SECOND_OPEN if (!streql(abuf, "n")) { @@ -265,133 +307,132 @@ ret = inquiry(scgp, buf, sizeof (struct scsi_inquiry)); scgp->silent--; if (xdebug) - error("ret: %d key: %d\n", ret, scg_sense_key(scgp)); + error(_("ret: %d key: %d\n"), ret, scg_sense_key(scgp)); if (ret >= 0 || scgp->scmd->error == SCG_RETRYABLE) { - printf("First SCSI open OK - device usable\n"); - printf("Checking for second SCSI open.\n"); - fprintf(logfile, "First SCSI open OK - device usable\n"); - fprintf(logfile, "Checking for second SCSI open.\n"); + chkprint(_("First SCSI open OK - device usable\n")); + chkprint(_("**********> Checking for second SCSI open.\n")); if ((scgp2 = doopen(device)) != NULL) { - printf("Second SCSI open for same device succeeded, %d file descriptor(s) used.\n", - countopen() - oldopen); - fprintf(logfile, - "Second SCSI open for same device succeeded, %d file descriptor(s) used.\n", + /* + * XXX Separates getbuf() fuer scgp2? + */ + chkprint(_("Second SCSI open for same device succeeded, %d additional file descriptor(s) used.\n"), countopen() - oldopen); scgp->silent++; ret = inquiry(scgp, buf, sizeof (struct scsi_inquiry)); scgp->silent--; if (ret >= 0 || scgp->scmd->error == SCG_RETRYABLE) { - printf("Second SCSI open is usable\n"); - fprintf(logfile, "Second SCSI open is usable\n"); + chkprint(_("Second SCSI open is usable\n")); } - printf("Closing second SCSI.\n"); - fprintf(logfile, "Closing second SCSI.\n"); + chkprint(_("Closing second SCSI.\n")); scg_close(scgp2); scgp2 = NULL; - printf("Checking first SCSI.\n"); - fprintf(logfile, "Checking first SCSI.\n"); + chkprint(_("Checking first SCSI.\n")); scgp->silent++; ret = inquiry(scgp, buf, sizeof (struct scsi_inquiry)); scgp->silent--; if (ret >= 0 || scgp->scmd->error == SCG_RETRYABLE) { - printf("First SCSI open is still usable\n"); - printf("Second SCSI open test passed.\n"); - fprintf(logfile, "First SCSI open is still usable\n"); - fprintf(logfile, "Second SCSI open test passed.\n"); + second_ok = TRUE; + chkprint(_("First SCSI open is still usable\n")); + chkprint(_("----------> Second SCSI open test PASSED.\n")); } else if (ret < 0 && scgp->scmd->error == SCG_FATAL) { second_ok = FALSE; - printf("First SCSI open does not work anymore.\n"); - printf("Second SCSI open test FAILED.\n"); - fprintf(logfile, "First SCSI open does not work anymore.\n"); - fprintf(logfile, "Second SCSI open test FAILED.\n"); + chkprint(_("First SCSI open does not work anymore.\n")); + chkprint(_("----------> Second SCSI open test FAILED.\n")); } else { second_ok = FALSE; - printf("First SCSI open has strange problems.\n"); - printf("Second SCSI open test FAILED.\n"); - fprintf(logfile, "First SCSI open has strange problems.\n"); - fprintf(logfile, "Second SCSI open test FAILED.\n"); + chkprint(_("First SCSI open has strange problems.\n")); + chkprint(_("----------> Second SCSI open test FAILED.\n")); } } else { second_ok = FALSE; - printf("Cannot open same SCSI device a second time.\n"); - printf("Second SCSI open test FAILED.\n"); - fprintf(logfile, "Cannot open same SCSI device a second time.\n"); - fprintf(logfile, "Second SCSI open test FAILED.\n"); + chkprint(_("Cannot open same SCSI device a second time.\n")); + chkprint(_("----------> Second SCSI open test FAILED.\n")); } } else { second_ok = FALSE; - printf("First SCSI open is not usable\n"); - printf("Second SCSI open test FAILED.\n"); - fprintf(logfile, "First SCSI open is not usable\n"); - fprintf(logfile, "Second SCSI open test FAILED.\n"); + chkprint(_("First SCSI open is not usable\n")); + chkprint(_("----------> Second SCSI open test FAILED.\n")); } - if (!second_ok && scgp2) { - if (xdebug > 1) - error("scgp %p scgp2 %p\n", scgp, scgp2); - if (scgp) + if (xdebug > 1) + error("scgp %p scgp2 %p\n", scgp, scgp2); + if (scgp2) + scg_close(scgp2); + if (scgp) { + scgp->silent++; + ret = inquiry(scgp, buf, sizeof (struct scsi_inquiry)); + scgp->silent--; + if (ret >= 0 || scgp->scmd->error == SCG_RETRYABLE) { + chkprint(_("First SCSI open is still usable\n")); + } else { + scg_freebuf(scgp); scg_close(scgp); - if (scgp2) - scg_close(scgp2); - scgp = doopen(device); - if (xdebug > 1) - error("scgp %p\n", scgp); + scgp = doopen(device); + getbuf(scgp); + if (xdebug > 1) + error("scgp %p\n", scgp); + } } } #endif /* CHECK_SECOND_OPEN */ - printf("Ready to start test for succeeded command? Enter to continue: "); - flushit(); - (void) getline(abuf, sizeof (abuf)); + printf(_("Ready to start test for succeeded command? Enter to continue: ")); + (void) chkgetline(abuf, sizeof (abuf)); + chkprint(_("**********> Checking for succeeded SCSI command.\n")); scgp->verbose++; ret = inquiry(scgp, buf, sizeof (struct scsi_inquiry)); scg_vsetup(scgp); scg_errfflush(scgp, logfile); scgp->verbose--; + scg_fprbytes(logfile, _("Inquiry Data :"), (Uchar *)buf, + sizeof (struct scsi_inquiry) - scg_getresid(scgp)); + if (ret >= 0 && !scg_cmd_err(scgp)) { - printf("----------> SCSI succeeded command test PASSED\n"); - fprintf(logfile, "----------> SCSI succeeded command test PASSED\n"); + chkprint(_("----------> SCSI succeeded command test PASSED\n")); } else { - printf("----------> SCSI succeeded command test FAILED\n"); - fprintf(logfile, "----------> SCSI succeeded command test FAILED\n"); + chkprint(_("----------> SCSI succeeded command test FAILED\n")); } sensetest(scgp); - printf("----------> SCSI status byte test NOT YET READY\n"); - fprintf(logfile, "----------> SCSI status byte test NOT YET READY\n"); + if (!autotest) + chkprint(_("----------> SCSI status byte test NOT YET READY\n")); /* -scan OK -work OK -fail OK -sense data/count OK -SCSI status -dma resid -->error GOOD/FAIL/timeout/noselect - * ?? - -reset -*/ + * scan OK + * work OK + * fail OK + * sense data/count OK + * SCSI status + * dma resid + * ->error GOOD/FAIL/timeout/noselect + * ?? + * + * reset + */ dmaresid(scgp); - printf("----------> SCSI transport code test NOT YET READY\n"); - fprintf(logfile, "----------> SCSI transport code test NOT YET READY\n"); + chkprint(_("----------> SCSI transport code test NOT YET READY\n")); return (0); } LOCAL SCSI * -doopen(devname) - char *devname; +doopen(sdevname) + char *sdevname; { SCSI *scgp; char errstr[128]; - if ((scgp = scg_open(devname, errstr, sizeof (errstr), debug, lverbose)) == (SCSI *)0) { - errmsg("%s%sCannot open SCSI driver.\n", errstr, errstr[0]?". ":""); - fprintf(logfile, "%s. %s%sCannot open SCSI driver.\n", + if ((scgp = scg_open(sdevname, errstr, sizeof (errstr), debug, lverbose)) == (SCSI *)0) { + errmsg(_("%s%sCannot open SCSI driver.\n"), errstr, errstr[0]?". ":""); + fprintf(logfile, _("%s. %s%sCannot open SCSI driver.\n"), errmsgstr(geterrno()), errstr, errstr[0]?". ":""); - errmsgno(EX_BAD, "For possible targets try 'cdrecord -scanbus'. Make sure you are root.\n"); + errmsgno(EX_BAD, _("For possible targets try 'cdrecord -scanbus'. Make sure you are root.\n")); return (scgp); } scg_settimeout(scgp, deftimeout); + if (scgopts) { + int i = scg_opts(scgp, scgopts); + if (i <= 0) + exit(i < 0 ? EX_BAD : 0); + } scgp->verbose = scsi_verbose; scgp->silent = silent; scgp->debug = debug; @@ -409,49 +450,48 @@ char *auth; /* - * Warning: you are not allowed to modify or to remove this - * version checking code! + * Warning: If you modify this section of code, you must + * change the name of the program. */ vers = scg_version(0, SCG_VERSION); auth = scg_version(0, SCG_AUTHOR); - printf("Using libscg version '%s-%s'\n", auth, vers); - fprintf(logfile, "Using libscg version '%s-%s'\n", auth, vers); + chkprint(_("Using libscg version '%s-%s'\n"), auth, vers); if (auth == 0 || strcmp("schily", auth) != 0) { errmsgno(EX_BAD, - "Warning: using inofficial version of libscg (%s-%s '%s').\n", + _("Warning: using inofficial version of libscg (%s-%s '%s').\n"), auth, vers, scg_version(0, SCG_SCCS_ID)); } vers = scg_version(scgp, SCG_VERSION); auth = scg_version(scgp, SCG_AUTHOR); if (lverbose > 1) - error("Using libscg transport code version '%s-%s'\n", auth, vers); - fprintf(logfile, "Using libscg transport code version '%s-%s'\n", auth, vers); + error(_("Using libscg transport code version '%s-%s'\n"), auth, vers); + fprintf(logfile, _("Using libscg transport code version '%s-%s'\n"), auth, vers); if (auth == 0 || strcmp("schily", auth) != 0) { errmsgno(EX_BAD, - "Warning: using inofficial libscg transport code version (%s-%s '%s').\n", + _("Warning: using inofficial libscg transport code version (%s-%s '%s').\n"), auth, vers, scg_version(scgp, SCG_SCCS_ID)); } vers = scg_version(scgp, SCG_KVERSION); if (vers == NULL) vers = unavail; - fprintf(logfile, "Using kernel transport code version '%s'\n", vers); + fprintf(logfile, _("Using kernel transport code version '%s'\n"), vers); vers = scg_version(scgp, SCG_RVERSION); auth = scg_version(scgp, SCG_RAUTHOR); if (lverbose > 1 && vers && auth) - error("Using remote transport code version '%s-%s'\n", auth, vers); + error(_("Using remote transport code version '%s-%s'\n"), auth, vers); if (auth != 0 && strcmp("schily", auth) != 0) { errmsgno(EX_BAD, - "Warning: using inofficial remote transport code version (%s-%s '%s').\n", + _("Warning: using inofficial remote transport code version (%s-%s '%s').\n"), auth, vers, scg_version(scgp, SCG_RSCCS_ID)); } if (auth == NULL) auth = unavail; if (vers == NULL) vers = unavail; - fprintf(logfile, "Using remote transport code version '%s-%s'\n", auth, vers); + fprintf(logfile, _("Using remote transport code version '%s-%s'\n"), auth, vers); } LOCAL void @@ -459,12 +499,11 @@ SCSI *scgp; { bufsize = scg_bufsize(scgp, MAX_BUF_SIZE); - printf("Max DMA buffer size: %ld\n", bufsize); - fprintf(logfile, "Max DMA buffer size: %ld\n", bufsize); + chkprint(_("Max DMA buffer size: %ld\n"), bufsize); seterrno(0); if ((buf = scg_getbuf(scgp, bufsize)) == NULL) { - errmsg("Cannot get SCSI buffer (%ld bytes).\n", bufsize); - fprintf(logfile, "%s. Cannot get SCSI buffer (%ld bytes).\n", + errmsg(_("Cannot get SCSI buffer (%ld bytes).\n"), bufsize); + fprintf(logfile, _("%s. Cannot get SCSI buffer (%ld bytes).\n"), errmsgstr(geterrno()), bufsize); } else { scg_freebuf(scgp); @@ -472,11 +511,73 @@ bufsize = scg_bufsize(scgp, BUF_SIZE); if (debug) - error("SCSI buffer size: %ld\n", bufsize); + error(_("SCSI buffer size: %ld\n"), bufsize); if ((buf = scg_getbuf(scgp, bufsize)) == NULL) - comerr("Cannot get SCSI I/O buffer.\n"); + comerr(_("Cannot get SCSI I/O buffer.\n")); +} + +LOCAL void +scg_openerr(errstr) + char *errstr; +{ + errmsg(_("%s%sCannot open or use SCSI driver.\n"), errstr, errstr[0]?". ":""); + errmsgno(EX_BAD, _("For possible targets try 'cdrecord -scanbus'.%s\n"), + geteuid() ? _(" Make sure you are root."):""); + errmsgno(EX_BAD, _("For possible transport specifiers try 'cdrecord dev=help'.\n")); + exit(EX_BAD); +} + +LOCAL int +find_drive(scgp, sdevname, flags) + SCSI *scgp; + char *sdevname; + int flags; +{ + int ntarget; + int type = INQ_ROMD; + + if ((flags & F_MSINFO) == 0) + error(_("No target specified, trying to find one...\n")); + ntarget = find_target(scgp, type, -1); + if (ntarget < 0) + return (ntarget); + if (ntarget == 1) { + /* + * Simple case, exactly one CD-ROM found. + */ + find_target(scgp, type, 1); + } else if (ntarget <= 0 && (ntarget = find_target(scgp, type = INQ_WORM, -1)) == 1) { + /* + * Exactly one CD-ROM acting as WORM found. + */ + find_target(scgp, type, 1); + } else if (ntarget <= 0) { + /* + * No single CD-ROM or WORM found. + */ + errmsgno(EX_BAD, _("No CD/DVD/BD-Recorder target found.\n")); + errmsgno(EX_BAD, _("Your platform may not allow to scan for SCSI devices.\n")); + comerrno(EX_BAD, _("Call 'cdrecord dev=help' or ask your sysadmin for possible targets.\n")); + } else { + errmsgno(EX_BAD, _("Too many CD/DVD/BD-Recorder targets found.\n")); +#ifdef nonono + select_target(scgp, stdout); + comerrno(EX_BAD, _("Select a target from the list above and use 'cdrecord dev=%s%sb,t,l'.\n"), + sdevname?sdevname:"", + sdevname?(sdevname[strlen(sdevname)-1] == ':'?"":":"):""); +#endif /* nonono */ + find_target(scgp, type, 1); + } + if ((flags & F_MSINFO) == 0) + error(_("Using dev=%s%s%d,%d,%d.\n"), + sdevname?sdevname:"", + sdevname?(sdevname[strlen(sdevname)-1] == ':'?"":":"):"", + scg_scsibus(scgp), scg_target(scgp), scg_lun(scgp)); + + return (ntarget); } + EXPORT void flushit() { @@ -493,9 +594,62 @@ int nopen = 0; int i; +#ifdef F_GETFD /* XXX how to count open fd on MSC */ for (i = 0; i < 1000; i++) { if (fcntl(i, F_GETFD, 0) >= 0) nopen++; } +#endif return (nopen); } +/*--------------------------------------------------------------------------*/ +#include + +/* VARARGS1 */ +#ifdef PROTOTYPES +EXPORT int +chkprint(const char *fmt, ...) +#else +EXPORT int +chkprint(fmt, va_alist) + char *fmt; + va_dcl +#endif +{ + va_list args; + int ret; + +#ifdef PROTOTYPES + va_start(args, fmt); +#else + va_start(args); +#endif + ret = js_fprintf(stdout, "%r", fmt, args); + va_end(args); + if (ret < 0) + return (ret); +#ifdef PROTOTYPES + va_start(args, fmt); +#else + va_start(args); +#endif + ret = js_fprintf(logfile, "%r", fmt, args); + va_end(args); + return (ret); +} + +EXPORT int +chkgetline(lbuf, len) + char *lbuf; + int len; +{ + flushit(); + if (autotest) { + printf("\n"); + flush(); + if (len > 0) + lbuf[0] = '\0'; + return (0); + } + return (getline(lbuf, len)); +} diff -Nru cdrtools-2.01.01a33/scgcheck/scgcheck.h cdrtools-3.02a09/scgcheck/scgcheck.h --- cdrtools-2.01.01a33/scgcheck/scgcheck.h 2001-03-18 22:49:28.000000000 +0000 +++ cdrtools-3.02a09/scgcheck/scgcheck.h 2008-01-06 18:50:10.000000000 +0000 @@ -1,4 +1,4 @@ -/* @(#)scgcheck.h 1.1 01/03/18 Copyright 2001 J. Schilling */ +/* @(#)scgcheck.h 1.2 08/01/06 Copyright 2001 J. Schilling */ /* * Copyright (c) 2001 J. Schilling */ @@ -18,6 +18,9 @@ * scgcheck.c */ extern void flushit __PR((void)); +extern int countopen __PR((void)); +extern int chkprint __PR((const char *, ...)) __printflike__(1, 2); +extern int chkgetline __PR((char *, int)); /* * sense.c diff -Nru cdrtools-2.01.01a33/scgcheck/scsi_cdr.c cdrtools-3.02a09/scgcheck/scsi_cdr.c --- cdrtools-2.01.01a33/scgcheck/scsi_cdr.c 2007-07-08 18:37:18.000000000 +0000 +++ cdrtools-3.02a09/scgcheck/scsi_cdr.c 1970-01-01 00:00:00.000000000 +0000 @@ -1,3108 +0,0 @@ -/* @(#)scsi_cdr.c 1.150 07/07/08 Copyright 1995-2007 J. Schilling */ -#ifndef lint -static char sccsid[] = - "@(#)scsi_cdr.c 1.150 07/07/08 Copyright 1995-2007 J. Schilling"; -#endif -/* - * SCSI command functions for cdrecord - * covering pre-MMC standard functions up to MMC-2 - * - * Copyright (c) 1995-2007 J. Schilling - */ -/* - * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. - * - * See the file CDDL.Schily.txt in this distribution for details. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file CDDL.Schily.txt from this distribution. - */ - -/* - * NOTICE: The Philips CDD 521 has several firmware bugs. - * One of them is not to respond to a SCSI selection - * within 200ms if the general load on the - * SCSI bus is high. To deal with this problem - * most of the SCSI commands are send with the - * SCG_CMD_RETRY flag enabled. - */ -#include - -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include - -#include -#include -#include -#include - -#include "scsimmc.h" -#include "cdrecord.h" - -#define strbeg(s1, s2) (strstr((s2), (s1)) == (s2)) - -EXPORT BOOL unit_ready __PR((SCSI *scgp)); -EXPORT BOOL wait_unit_ready __PR((SCSI *scgp, int secs)); -EXPORT BOOL scsi_in_progress __PR((SCSI *scgp)); -EXPORT BOOL cdr_underrun __PR((SCSI *scgp)); -EXPORT int test_unit_ready __PR((SCSI *scgp)); -EXPORT int rezero_unit __PR((SCSI *scgp)); -EXPORT int request_sense __PR((SCSI *scgp)); -EXPORT int request_sense_b __PR((SCSI *scgp, caddr_t bp, int cnt)); -EXPORT int inquiry __PR((SCSI *scgp, caddr_t, int)); -EXPORT int read_capacity __PR((SCSI *scgp)); -EXPORT void print_capacity __PR((SCSI *scgp, FILE *f)); -EXPORT int scsi_load_unload __PR((SCSI *scgp, int)); -EXPORT int scsi_prevent_removal __PR((SCSI *scgp, int)); -EXPORT int scsi_start_stop_unit __PR((SCSI *scgp, int, int, BOOL immed)); -EXPORT int scsi_set_speed __PR((SCSI *scgp, int readspeed, int writespeed, int rotctl)); -EXPORT int scsi_get_speed __PR((SCSI *scgp, int *readspeedp, int *writespeedp)); -EXPORT int qic02 __PR((SCSI *scgp, int)); -EXPORT int write_xscsi __PR((SCSI *scgp, caddr_t, long, long, int)); -EXPORT int write_xg0 __PR((SCSI *scgp, caddr_t, long, long, int)); -EXPORT int write_xg1 __PR((SCSI *scgp, caddr_t, long, long, int)); -EXPORT int write_xg5 __PR((SCSI *scgp, caddr_t, long, long, int)); -EXPORT int seek_scsi __PR((SCSI *scgp, long addr)); -EXPORT int seek_g0 __PR((SCSI *scgp, long addr)); -EXPORT int seek_g1 __PR((SCSI *scgp, long addr)); -EXPORT int scsi_flush_cache __PR((SCSI *scgp, BOOL immed)); -EXPORT int read_buffer __PR((SCSI *scgp, caddr_t bp, int cnt, int mode)); -EXPORT int write_buffer __PR((SCSI *scgp, char *buffer, long length, int mode, int bufferid, long offset)); -EXPORT int read_subchannel __PR((SCSI *scgp, caddr_t bp, int track, - int cnt, int msf, int subq, int fmt)); -EXPORT int read_toc __PR((SCSI *scgp, caddr_t, int, int, int, int)); -EXPORT int read_toc_philips __PR((SCSI *scgp, caddr_t, int, int, int, int)); -EXPORT int read_header __PR((SCSI *scgp, caddr_t, long, int, int)); -EXPORT int read_disk_info __PR((SCSI *scgp, caddr_t, int)); -EXPORT int read_track_info __PR((SCSI *scgp, caddr_t, int type, int addr, int cnt)); -EXPORT int get_trackinfo __PR((SCSI *scgp, caddr_t, int type, int addr, int cnt)); -EXPORT int read_rzone_info __PR((SCSI *scgp, caddr_t bp, int cnt)); -EXPORT int reserve_tr_rzone __PR((SCSI *scgp, long size)); -EXPORT int read_dvd_structure __PR((SCSI *scgp, caddr_t bp, int cnt, int mt, int addr, int layer, int fmt)); -EXPORT int send_dvd_structure __PR((SCSI *scgp, caddr_t bp, int cnt, int fmt)); -EXPORT int send_opc __PR((SCSI *scgp, caddr_t, int cnt, int doopc)); -EXPORT int read_track_info_philips __PR((SCSI *scgp, caddr_t, int, int)); -EXPORT int scsi_close_tr_session __PR((SCSI *scgp, int type, int track, BOOL immed)); -EXPORT int read_master_cue __PR((SCSI *scgp, caddr_t bp, int sheet, int cnt)); -EXPORT int send_cue_sheet __PR((SCSI *scgp, caddr_t bp, long size)); -EXPORT int read_buff_cap __PR((SCSI *scgp, long *, long *)); -EXPORT int scsi_blank __PR((SCSI *scgp, long addr, int blanktype, BOOL immed)); -EXPORT BOOL allow_atapi __PR((SCSI *scgp, BOOL new)); -EXPORT int mode_select __PR((SCSI *scgp, Uchar *, int, int, int)); -EXPORT int mode_sense __PR((SCSI *scgp, Uchar *dp, int cnt, int page, int pcf)); -EXPORT int mode_select_sg0 __PR((SCSI *scgp, Uchar *, int, int, int)); -EXPORT int mode_sense_sg0 __PR((SCSI *scgp, Uchar *dp, int cnt, int page, int pcf)); -EXPORT int mode_select_g0 __PR((SCSI *scgp, Uchar *, int, int, int)); -EXPORT int mode_select_g1 __PR((SCSI *scgp, Uchar *, int, int, int)); -EXPORT int mode_sense_g0 __PR((SCSI *scgp, Uchar *dp, int cnt, int page, int pcf)); -EXPORT int mode_sense_g1 __PR((SCSI *scgp, Uchar *dp, int cnt, int page, int pcf)); -EXPORT int read_tochdr __PR((SCSI *scgp, cdr_t *, int *, int *)); -EXPORT int read_cdtext __PR((SCSI *scgp)); -EXPORT int read_trackinfo __PR((SCSI *scgp, int, long *, struct msf *, int *, int *, int *)); -EXPORT int read_B0 __PR((SCSI *scgp, BOOL isbcd, long *b0p, long *lop)); -EXPORT int read_session_offset __PR((SCSI *scgp, long *)); -EXPORT int read_session_offset_philips __PR((SCSI *scgp, long *)); -EXPORT int sense_secsize __PR((SCSI *scgp, int current)); -EXPORT int select_secsize __PR((SCSI *scgp, int)); -EXPORT BOOL is_cddrive __PR((SCSI *scgp)); -EXPORT BOOL is_unknown_dev __PR((SCSI *scgp)); -EXPORT int read_scsi __PR((SCSI *scgp, caddr_t, long, int)); -EXPORT int read_g0 __PR((SCSI *scgp, caddr_t, long, int)); -EXPORT int read_g1 __PR((SCSI *scgp, caddr_t, long, int)); -EXPORT BOOL getdev __PR((SCSI *scgp, BOOL)); -EXPORT void printinq __PR((SCSI *scgp, FILE *f)); -EXPORT void printdev __PR((SCSI *scgp)); -EXPORT BOOL do_inquiry __PR((SCSI *scgp, BOOL)); -EXPORT BOOL recovery_needed __PR((SCSI *scgp, cdr_t *)); -EXPORT int scsi_load __PR((SCSI *scgp, cdr_t *)); -EXPORT int scsi_unload __PR((SCSI *scgp, cdr_t *)); -EXPORT int scsi_cdr_write __PR((SCSI *scgp, caddr_t bp, long sectaddr, long size, int blocks, BOOL islast)); -EXPORT struct cd_mode_page_2A * mmc_cap __PR((SCSI *scgp, Uchar *modep)); -EXPORT void mmc_getval __PR((struct cd_mode_page_2A *mp, - BOOL *cdrrp, BOOL *cdwrp, - BOOL *cdrrwp, BOOL *cdwrwp, - BOOL *dvdp, BOOL *dvdwp)); -EXPORT BOOL is_mmc __PR((SCSI *scgp, BOOL *cdwp, BOOL *dvdwp)); -EXPORT BOOL mmc_check __PR((SCSI *scgp, BOOL *cdrrp, BOOL *cdwrp, - BOOL *cdrrwp, BOOL *cdwrwp, - BOOL *dvdp, BOOL *dvdwp)); -LOCAL void print_speed __PR((char *fmt, int val)); -EXPORT void print_capabilities __PR((SCSI *scgp)); -extern int verify __PR((SCSI *scgp, long start, int count, long *bad_block)); - -EXPORT BOOL -unit_ready(scgp) - SCSI *scgp; -{ - register struct scg_cmd *scmd = scgp->scmd; - - if (test_unit_ready(scgp) >= 0) /* alles OK */ - return (TRUE); - else if (scmd->error >= SCG_FATAL) /* nicht selektierbar */ - return (FALSE); - - if (scg_sense_key(scgp) == SC_UNIT_ATTENTION) { - if (test_unit_ready(scgp) >= 0) /* alles OK */ - return (TRUE); - } - if ((scg_cmd_status(scgp) & ST_BUSY) != 0) { - /* - * Busy/reservation_conflict - */ - usleep(500000); - if (test_unit_ready(scgp) >= 0) /* alles OK */ - return (TRUE); - } - if (scg_sense_key(scgp) == -1) { /* non extended Sense */ - if (scg_sense_code(scgp) == 4) /* NOT_READY */ - return (FALSE); - return (TRUE); - } - /* FALSE wenn NOT_READY */ - return (scg_sense_key(scgp) != SC_NOT_READY); -} - -EXPORT BOOL -wait_unit_ready(scgp, secs) - SCSI *scgp; - int secs; -{ - int i; - int c; - int k; - int ret; - int err; - - seterrno(0); - scgp->silent++; - ret = test_unit_ready(scgp); /* eat up unit attention */ - if (ret < 0) { - err = geterrno(); - - if (err == EPERM || err == EACCES) { - scgp->silent--; - return (FALSE); - } - ret = test_unit_ready(scgp); /* got power on condition? */ - } - scgp->silent--; - - if (ret >= 0) /* success that's enough */ - return (TRUE); - - scgp->silent++; - for (i = 0; i < secs && (ret = test_unit_ready(scgp)) < 0; i++) { - if (scgp->scmd->scb.busy != 0) { - sleep(1); - continue; - } - c = scg_sense_code(scgp); - k = scg_sense_key(scgp); - /* - * Abort quickly if it does not make sense to wait. - * 0x30 == Cannot read medium - * 0x3A == Medium not present - */ - if ((k == SC_NOT_READY && (c == 0x3A || c == 0x30)) || - (k == SC_MEDIUM_ERROR)) { - if (scgp->silent <= 1) - scg_printerr(scgp); - scgp->silent--; - return (FALSE); - } - sleep(1); - } - scgp->silent--; - if (ret < 0) - return (FALSE); - return (TRUE); -} - -EXPORT BOOL -scsi_in_progress(scgp) - SCSI *scgp; -{ - if (scg_sense_key(scgp) == SC_NOT_READY && - /* - * Logigal unit not ready operation/long_write in progress - */ - scg_sense_code(scgp) == 0x04 && - (scg_sense_qual(scgp) == 0x04 || /* CyberDr. "format in progress"*/ - scg_sense_qual(scgp) == 0x07 || /* "operation in progress" */ - scg_sense_qual(scgp) == 0x08)) { /* "long write in progress" */ - return (TRUE); - } else { - if (scgp->silent <= 1) - scg_printerr(scgp); - } - return (FALSE); -} - -EXPORT BOOL -cdr_underrun(scgp) - SCSI *scgp; -{ - if ((scg_sense_key(scgp) != SC_ILLEGAL_REQUEST && - scg_sense_key(scgp) != SC_MEDIUM_ERROR)) - return (FALSE); - - if ((scg_sense_code(scgp) == 0x21 && - (scg_sense_qual(scgp) == 0x00 || /* logical block address out of range */ - scg_sense_qual(scgp) == 0x02)) || /* invalid address for write */ - - (scg_sense_code(scgp) == 0x0C && - scg_sense_qual(scgp) == 0x09)) { /* write error - loss of streaming */ - return (TRUE); - } - /* - * XXX Bei manchen Brennern kommt mach dem der Brennvorgang bereits - * XXX eine Weile gelaufen ist ein 5/24/0 Invalid field in CDB. - * XXX Daher sollte man testen ob schon geschrieben wurde... - */ - return (FALSE); -} - -EXPORT int -test_unit_ready(scgp) - SCSI *scgp; -{ - register struct scg_cmd *scmd = scgp->scmd; - - fillbytes((caddr_t)scmd, sizeof (*scmd), '\0'); - scmd->addr = (caddr_t)0; - scmd->size = 0; - scmd->flags = SCG_DISRE_ENA | (scgp->silent ? SCG_SILENT:0); - scmd->cdb_len = SC_G0_CDBLEN; - scmd->sense_len = CCS_SENSE_LEN; - scmd->cdb.g0_cdb.cmd = SC_TEST_UNIT_READY; - scmd->cdb.g0_cdb.lun = scg_lun(scgp); - - scgp->cmdname = "test unit ready"; - - return (scg_cmd(scgp)); -} - -EXPORT int -rezero_unit(scgp) - SCSI *scgp; -{ - register struct scg_cmd *scmd = scgp->scmd; - - fillbytes((caddr_t)scmd, sizeof (*scmd), '\0'); - scmd->addr = (caddr_t)0; - scmd->size = 0; - scmd->flags = SCG_DISRE_ENA; - scmd->cdb_len = SC_G0_CDBLEN; - scmd->sense_len = CCS_SENSE_LEN; - scmd->cdb.g0_cdb.cmd = SC_REZERO_UNIT; - scmd->cdb.g0_cdb.lun = scg_lun(scgp); - - scgp->cmdname = "rezero unit"; - - return (scg_cmd(scgp)); -} - -EXPORT int -request_sense(scgp) - SCSI *scgp; -{ - char sensebuf[CCS_SENSE_LEN]; - char *cmdsave; - - cmdsave = scgp->cmdname; - - if (request_sense_b(scgp, sensebuf, sizeof (sensebuf)) < 0) - return (-1); - scgp->cmdname = cmdsave; - scg_prsense((Uchar *)sensebuf, CCS_SENSE_LEN - scg_getresid(scgp)); - return (0); -} - -EXPORT int -request_sense_b(scgp, bp, cnt) - SCSI *scgp; - caddr_t bp; - int cnt; -{ - register struct scg_cmd *scmd = scgp->scmd; - - - fillbytes((caddr_t)scmd, sizeof (*scmd), '\0'); - scmd->addr = bp; - scmd->size = cnt; - scmd->flags = SCG_RECV_DATA|SCG_DISRE_ENA; - scmd->cdb_len = SC_G0_CDBLEN; - scmd->sense_len = CCS_SENSE_LEN; - scmd->cdb.g0_cdb.cmd = SC_REQUEST_SENSE; - scmd->cdb.g0_cdb.lun = scg_lun(scgp); - scmd->cdb.g0_cdb.count = cnt; - - scgp->cmdname = "request_sense"; - - if (scg_cmd(scgp) < 0) - return (-1); - return (0); -} - -EXPORT int -inquiry(scgp, bp, cnt) - SCSI *scgp; - caddr_t bp; - int cnt; -{ - register struct scg_cmd *scmd = scgp->scmd; - - fillbytes(bp, cnt, '\0'); - fillbytes((caddr_t)scmd, sizeof (*scmd), '\0'); - scmd->addr = bp; - scmd->size = cnt; - scmd->flags = SCG_RECV_DATA|SCG_DISRE_ENA; - scmd->cdb_len = SC_G0_CDBLEN; - scmd->sense_len = CCS_SENSE_LEN; - scmd->cdb.g0_cdb.cmd = SC_INQUIRY; - scmd->cdb.g0_cdb.lun = scg_lun(scgp); - scmd->cdb.g0_cdb.count = cnt; - - scgp->cmdname = "inquiry"; - - if (scg_cmd(scgp) < 0) - return (-1); - if (scgp->verbose) - scg_prbytes("Inquiry Data :", (Uchar *)bp, cnt - scg_getresid(scgp)); - return (0); -} - -EXPORT int -read_capacity(scgp) - SCSI *scgp; -{ - register struct scg_cmd *scmd = scgp->scmd; - - fillbytes((caddr_t)scmd, sizeof (*scmd), '\0'); - scmd->addr = (caddr_t)scgp->cap; - scmd->size = sizeof (struct scsi_capacity); - scmd->flags = SCG_RECV_DATA|SCG_DISRE_ENA; - scmd->cdb_len = SC_G1_CDBLEN; - scmd->sense_len = CCS_SENSE_LEN; - scmd->cdb.g1_cdb.cmd = 0x25; /* Read Capacity */ - scmd->cdb.g1_cdb.lun = scg_lun(scgp); - g1_cdblen(&scmd->cdb.g1_cdb, 0); /* Full Media */ - - scgp->cmdname = "read capacity"; - - if (scg_cmd(scgp) < 0) { - return (-1); - } else { - long cbsize; - long cbaddr; - - /* - * c_bsize & c_baddr are signed Int32_t - * so we use signed int conversion here. - */ - cbsize = a_to_4_byte(&scgp->cap->c_bsize); - cbaddr = a_to_4_byte(&scgp->cap->c_baddr); - scgp->cap->c_bsize = cbsize; - scgp->cap->c_baddr = cbaddr; - } - return (0); -} - -EXPORT void -print_capacity(scgp, f) - SCSI *scgp; - FILE *f; -{ - long kb; - long mb; - long prmb; - double dkb; - - dkb = (scgp->cap->c_baddr+1.0) * (scgp->cap->c_bsize/1024.0); - kb = dkb; - mb = dkb / 1024.0; - prmb = dkb / 1000.0 * 1.024; - fprintf(f, "Capacity: %ld Blocks = %ld kBytes = %ld MBytes = %ld prMB\n", - (long)scgp->cap->c_baddr+1, kb, mb, prmb); - fprintf(f, "Sectorsize: %ld Bytes\n", (long)scgp->cap->c_bsize); -} - -EXPORT int -scsi_load_unload(scgp, load) - SCSI *scgp; - int load; -{ - register struct scg_cmd *scmd = scgp->scmd; - - fillbytes((caddr_t)scmd, sizeof (*scmd), '\0'); - scmd->flags = SCG_DISRE_ENA; - scmd->cdb_len = SC_G5_CDBLEN; - scmd->sense_len = CCS_SENSE_LEN; - scmd->cdb.g5_cdb.cmd = 0xA6; - scmd->cdb.g5_cdb.lun = scg_lun(scgp); - scmd->cdb.g5_cdb.addr[1] = load?3:2; - scmd->cdb.g5_cdb.count[2] = 0; /* slot # */ - - scgp->cmdname = "medium load/unload"; - - if (scg_cmd(scgp) < 0) - return (-1); - return (0); -} - -EXPORT int -scsi_prevent_removal(scgp, prevent) - SCSI *scgp; - int prevent; -{ - register struct scg_cmd *scmd = scgp->scmd; - - fillbytes((caddr_t)scmd, sizeof (*scmd), '\0'); - scmd->flags = SCG_DISRE_ENA; - scmd->cdb_len = SC_G0_CDBLEN; - scmd->sense_len = CCS_SENSE_LEN; - scmd->cdb.g0_cdb.cmd = 0x1E; - scmd->cdb.g0_cdb.lun = scg_lun(scgp); - scmd->cdb.g0_cdb.count = prevent & 1; - - scgp->cmdname = "prevent/allow medium removal"; - - if (scg_cmd(scgp) < 0) - return (-1); - return (0); -} - - -EXPORT int -scsi_start_stop_unit(scgp, flg, loej, immed) - SCSI *scgp; - int flg; - int loej; - BOOL immed; -{ - register struct scg_cmd *scmd = scgp->scmd; - - fillbytes((caddr_t)scmd, sizeof (*scmd), '\0'); - scmd->flags = SCG_DISRE_ENA; - scmd->cdb_len = SC_G0_CDBLEN; - scmd->sense_len = CCS_SENSE_LEN; - scmd->cdb.g0_cdb.cmd = 0x1B; /* Start Stop Unit */ - scmd->cdb.g0_cdb.lun = scg_lun(scgp); - scmd->cdb.g0_cdb.count = (flg ? 1:0) | (loej ? 2:0); - - if (immed) - scmd->cdb.cmd_cdb[1] |= 0x01; - - scgp->cmdname = "start/stop unit"; - - return (scg_cmd(scgp)); -} - -EXPORT int -scsi_set_speed(scgp, readspeed, writespeed, rotctl) - SCSI *scgp; - int readspeed; - int writespeed; - int rotctl; -{ - register struct scg_cmd *scmd = scgp->scmd; - - fillbytes((caddr_t)scmd, sizeof (*scmd), '\0'); - scmd->flags = SCG_DISRE_ENA; - scmd->cdb_len = SC_G5_CDBLEN; - scmd->sense_len = CCS_SENSE_LEN; - scmd->cdb.g5_cdb.cmd = 0xBB; - scmd->cdb.g5_cdb.lun = scg_lun(scgp); - - if (readspeed < 0) - i_to_2_byte(&scmd->cdb.g5_cdb.addr[0], 0xFFFF); - else - i_to_2_byte(&scmd->cdb.g5_cdb.addr[0], readspeed); - if (writespeed < 0) - i_to_2_byte(&scmd->cdb.g5_cdb.addr[2], 0xFFFF); - else - i_to_2_byte(&scmd->cdb.g5_cdb.addr[2], writespeed); - - scmd->cdb.cmd_cdb[1] |= rotctl & 0x03; - - scgp->cmdname = "set cd speed"; - - if (scg_cmd(scgp) < 0) - return (-1); - return (0); -} - -EXPORT int -scsi_get_speed(scgp, readspeedp, writespeedp) - SCSI *scgp; - int *readspeedp; - int *writespeedp; -{ - struct cd_mode_page_2A *mp; - Uchar m[256]; - int val; - - scgp->silent++; - mp = mmc_cap(scgp, m); /* Get MMC capabilities in allocated mp */ - scgp->silent--; - if (mp == NULL) - return (-1); /* Pre SCSI-3/mmc drive */ - - val = a_to_u_2_byte(mp->cur_read_speed); - if (readspeedp) - *readspeedp = val; - - if (mp->p_len >= 28) - val = a_to_u_2_byte(mp->v3_cur_write_speed); - else - val = a_to_u_2_byte(mp->cur_write_speed); - if (writespeedp) - *writespeedp = val; - - return (0); -} - - -EXPORT int -qic02(scgp, cmd) - SCSI *scgp; - int cmd; -{ - register struct scg_cmd *scmd = scgp->scmd; - - fillbytes((caddr_t)scmd, sizeof (*scmd), '\0'); - scmd->addr = (caddr_t)0; - scmd->size = 0; - scmd->flags = SCG_DISRE_ENA; - scmd->cdb_len = SC_G0_CDBLEN; - scmd->sense_len = DEF_SENSE_LEN; - scmd->cdb.g0_cdb.cmd = 0x0D; /* qic02 Sysgen SC4000 */ - scmd->cdb.g0_cdb.lun = scg_lun(scgp); - scmd->cdb.g0_cdb.mid_addr = cmd; - - scgp->cmdname = "qic 02"; - return (scg_cmd(scgp)); -} - -#define G0_MAXADDR 0x1FFFFFL - -EXPORT int -write_xscsi(scgp, bp, addr, size, cnt) - SCSI *scgp; - caddr_t bp; /* address of buffer */ - long addr; /* disk address (sector) to put */ - long size; /* number of bytes to transfer */ - int cnt; /* sectorcount */ -{ - if (addr <= G0_MAXADDR) - return (write_xg0(scgp, bp, addr, size, cnt)); - else - return (write_xg1(scgp, bp, addr, size, cnt)); -} - -EXPORT int -write_xg0(scgp, bp, addr, size, cnt) - SCSI *scgp; - caddr_t bp; /* address of buffer */ - long addr; /* disk address (sector) to put */ - long size; /* number of bytes to transfer */ - int cnt; /* sectorcount */ -{ - register struct scg_cmd *scmd = scgp->scmd; - - fillbytes((caddr_t)scmd, sizeof (*scmd), '\0'); - scmd->addr = bp; - scmd->size = size; - scmd->flags = SCG_DISRE_ENA|SCG_CMD_RETRY; -/* scmd->flags = SCG_DISRE_ENA;*/ - scmd->cdb_len = SC_G0_CDBLEN; - scmd->sense_len = CCS_SENSE_LEN; - scmd->cdb.g0_cdb.cmd = SC_WRITE; - scmd->cdb.g0_cdb.lun = scg_lun(scgp); - g0_cdbaddr(&scmd->cdb.g0_cdb, addr); - scmd->cdb.g0_cdb.count = cnt; - - scgp->cmdname = "write_g0"; - - if (scg_cmd(scgp) < 0) - return (-1); - return (size - scg_getresid(scgp)); -} - -EXPORT int -write_xg1(scgp, bp, addr, size, cnt) - SCSI *scgp; - caddr_t bp; /* address of buffer */ - long addr; /* disk address (sector) to put */ - long size; /* number of bytes to transfer */ - int cnt; /* sectorcount */ -{ - register struct scg_cmd *scmd = scgp->scmd; - - fillbytes((caddr_t)scmd, sizeof (*scmd), '\0'); - scmd->addr = bp; - scmd->size = size; - scmd->flags = SCG_DISRE_ENA|SCG_CMD_RETRY; -/* scmd->flags = SCG_DISRE_ENA;*/ - scmd->cdb_len = SC_G1_CDBLEN; - scmd->sense_len = CCS_SENSE_LEN; - scmd->cdb.g1_cdb.cmd = SC_EWRITE; - scmd->cdb.g1_cdb.lun = scg_lun(scgp); - g1_cdbaddr(&scmd->cdb.g1_cdb, addr); - g1_cdblen(&scmd->cdb.g1_cdb, cnt); - - scgp->cmdname = "write_g1"; - - if (scg_cmd(scgp) < 0) - return (-1); - return (size - scg_getresid(scgp)); -} - -EXPORT int -write_xg5(scgp, bp, addr, size, cnt) - SCSI *scgp; - caddr_t bp; /* address of buffer */ - long addr; /* disk address (sector) to put */ - long size; /* number of bytes to transfer */ - int cnt; /* sectorcount */ -{ - register struct scg_cmd *scmd = scgp->scmd; - - fillbytes((caddr_t)scmd, sizeof (*scmd), '\0'); - scmd->addr = bp; - scmd->size = size; - scmd->flags = SCG_DISRE_ENA|SCG_CMD_RETRY; -/* scmd->flags = SCG_DISRE_ENA;*/ - scmd->cdb_len = SC_G5_CDBLEN; - scmd->sense_len = CCS_SENSE_LEN; - scmd->cdb.g5_cdb.cmd = 0xAA; - scmd->cdb.g5_cdb.lun = scg_lun(scgp); - g5_cdbaddr(&scmd->cdb.g5_cdb, addr); - g5_cdblen(&scmd->cdb.g5_cdb, cnt); - - scgp->cmdname = "write_g5"; - - if (scg_cmd(scgp) < 0) - return (-1); - return (size - scg_getresid(scgp)); -} - -EXPORT int -seek_scsi(scgp, addr) - SCSI *scgp; - long addr; -{ - if (addr <= G0_MAXADDR) - return (seek_g0(scgp, addr)); - else - return (seek_g1(scgp, addr)); -} - -EXPORT int -seek_g0(scgp, addr) - SCSI *scgp; - long addr; -{ - register struct scg_cmd *scmd = scgp->scmd; - - fillbytes((caddr_t)scmd, sizeof (*scmd), '\0'); - scmd->flags = SCG_DISRE_ENA; - scmd->cdb_len = SC_G0_CDBLEN; - scmd->sense_len = CCS_SENSE_LEN; - scmd->cdb.g0_cdb.cmd = 0x0B; /* Seek */ - scmd->cdb.g0_cdb.lun = scg_lun(scgp); - g0_cdbaddr(&scmd->cdb.g0_cdb, addr); - - scgp->cmdname = "seek_g0"; - - return (scg_cmd(scgp)); -} - -EXPORT int -seek_g1(scgp, addr) - SCSI *scgp; - long addr; -{ - register struct scg_cmd *scmd = scgp->scmd; - - fillbytes((caddr_t)scmd, sizeof (*scmd), '\0'); - scmd->flags = SCG_DISRE_ENA; - scmd->cdb_len = SC_G1_CDBLEN; - scmd->sense_len = CCS_SENSE_LEN; - scmd->cdb.g1_cdb.cmd = 0x2B; /* Seek G1 */ - scmd->cdb.g1_cdb.lun = scg_lun(scgp); - g1_cdbaddr(&scmd->cdb.g1_cdb, addr); - - scgp->cmdname = "seek_g1"; - - return (scg_cmd(scgp)); -} - -EXPORT int -scsi_flush_cache(scgp, immed) - SCSI *scgp; - BOOL immed; -{ - register struct scg_cmd *scmd = scgp->scmd; - - fillbytes((caddr_t)scmd, sizeof (*scmd), '\0'); - scmd->flags = SCG_DISRE_ENA; - scmd->cdb_len = SC_G1_CDBLEN; - scmd->sense_len = CCS_SENSE_LEN; - scmd->timeout = 2 * 60; /* Max: sizeof (CDR-cache)/150KB/s */ - scmd->cdb.g1_cdb.cmd = 0x35; - scmd->cdb.g1_cdb.lun = scg_lun(scgp); - - if (immed) - scmd->cdb.cmd_cdb[1] |= 0x02; - - scgp->cmdname = "flush cache"; - - if (scg_cmd(scgp) < 0) - return (-1); - return (0); -} - -EXPORT int -read_buffer(scgp, bp, cnt, mode) - SCSI *scgp; - caddr_t bp; - int cnt; - int mode; -{ - register struct scg_cmd *scmd = scgp->scmd; - - fillbytes((caddr_t)scmd, sizeof (*scmd), '\0'); - scmd->addr = bp; - scmd->size = cnt; - scmd->dma_read = 1; - scmd->cdb_len = SC_G1_CDBLEN; - scmd->sense_len = CCS_SENSE_LEN; - scmd->cdb.g1_cdb.cmd = 0x3C; /* Read Buffer */ - scmd->cdb.g1_cdb.lun = scg_lun(scgp); - scmd->cdb.cmd_cdb[1] |= (mode & 7); - g1_cdblen(&scmd->cdb.g1_cdb, cnt); - - scgp->cmdname = "read buffer"; - - return (scg_cmd(scgp)); -} - -EXPORT int -write_buffer(scgp, buffer, length, mode, bufferid, offset) - SCSI *scgp; - char *buffer; - long length; - int mode; - int bufferid; - long offset; -{ - register struct scg_cmd *scmd = scgp->scmd; - char *cdb; - - fillbytes((caddr_t)scmd, sizeof (*scmd), '\0'); - scmd->addr = buffer; - scmd->size = length; - scmd->flags = SCG_DISRE_ENA|SCG_CMD_RETRY; - scmd->cdb_len = SC_G1_CDBLEN; - scmd->sense_len = CCS_SENSE_LEN; - - cdb = (char *)scmd->cdb.cmd_cdb; - - cdb[0] = 0x3B; - cdb[1] = mode & 7; - cdb[2] = bufferid; - cdb[3] = offset >> 16; - cdb[4] = (offset >> 8) & 0xff; - cdb[5] = offset & 0xff; - cdb[6] = length >> 16; - cdb[7] = (length >> 8) & 0xff; - cdb[8] = length & 0xff; - - scgp->cmdname = "write_buffer"; - - if (scg_cmd(scgp) >= 0) - return (1); - return (0); -} - -EXPORT int -read_subchannel(scgp, bp, track, cnt, msf, subq, fmt) - SCSI *scgp; - caddr_t bp; - int track; - int cnt; - int msf; - int subq; - int fmt; - -{ - register struct scg_cmd *scmd = scgp->scmd; - - fillbytes((caddr_t)scmd, sizeof (*scmd), '\0'); - scmd->addr = bp; - scmd->size = cnt; - scmd->flags = SCG_RECV_DATA|SCG_DISRE_ENA; - scmd->cdb_len = SC_G1_CDBLEN; - scmd->sense_len = CCS_SENSE_LEN; - scmd->cdb.g1_cdb.cmd = 0x42; - scmd->cdb.g1_cdb.lun = scg_lun(scgp); - if (msf) - scmd->cdb.g1_cdb.res = 1; - if (subq) - scmd->cdb.g1_cdb.addr[0] = 0x40; - scmd->cdb.g1_cdb.addr[1] = fmt; - scmd->cdb.g1_cdb.res6 = track; - g1_cdblen(&scmd->cdb.g1_cdb, cnt); - - scgp->cmdname = "read subchannel"; - - if (scg_cmd(scgp) < 0) - return (-1); - return (0); -} - -EXPORT int -read_toc(scgp, bp, track, cnt, msf, fmt) - SCSI *scgp; - caddr_t bp; - int track; - int cnt; - int msf; - int fmt; - -{ - register struct scg_cmd *scmd = scgp->scmd; - - fillbytes((caddr_t)scmd, sizeof (*scmd), '\0'); - scmd->addr = bp; - scmd->size = cnt; - scmd->flags = SCG_RECV_DATA|SCG_DISRE_ENA; - scmd->cdb_len = SC_G1_CDBLEN; - scmd->sense_len = CCS_SENSE_LEN; - scmd->cdb.g1_cdb.cmd = 0x43; - scmd->cdb.g1_cdb.lun = scg_lun(scgp); - if (msf) - scmd->cdb.g1_cdb.res = 1; - scmd->cdb.g1_cdb.addr[0] = fmt & 0x0F; - scmd->cdb.g1_cdb.res6 = track; - g1_cdblen(&scmd->cdb.g1_cdb, cnt); - - scgp->cmdname = "read toc"; - - if (scg_cmd(scgp) < 0) - return (-1); - return (0); -} - -EXPORT int -read_toc_philips(scgp, bp, track, cnt, msf, fmt) - SCSI *scgp; - caddr_t bp; - int track; - int cnt; - int msf; - int fmt; - -{ - register struct scg_cmd *scmd = scgp->scmd; - - fillbytes((caddr_t)scmd, sizeof (*scmd), '\0'); - scmd->addr = bp; - scmd->size = cnt; - scmd->flags = SCG_RECV_DATA|SCG_DISRE_ENA; - scmd->cdb_len = SC_G1_CDBLEN; - scmd->sense_len = CCS_SENSE_LEN; - scmd->timeout = 4 * 60; /* May last 174s on a TEAC CD-R55S */ - scmd->cdb.g1_cdb.cmd = 0x43; - scmd->cdb.g1_cdb.lun = scg_lun(scgp); - if (msf) - scmd->cdb.g1_cdb.res = 1; - scmd->cdb.g1_cdb.res6 = track; - g1_cdblen(&scmd->cdb.g1_cdb, cnt); - - if (fmt & 1) - scmd->cdb.g1_cdb.vu_96 = 1; - if (fmt & 2) - scmd->cdb.g1_cdb.vu_97 = 1; - - scgp->cmdname = "read toc"; - - if (scg_cmd(scgp) < 0) - return (-1); - return (0); -} - -EXPORT int -read_header(scgp, bp, addr, cnt, msf) - SCSI *scgp; - caddr_t bp; - long addr; - int cnt; - int msf; -{ - register struct scg_cmd *scmd = scgp->scmd; - - fillbytes((caddr_t)scmd, sizeof (*scmd), '\0'); - scmd->addr = bp; - scmd->size = cnt; - scmd->flags = SCG_RECV_DATA|SCG_DISRE_ENA; - scmd->cdb_len = SC_G1_CDBLEN; - scmd->sense_len = CCS_SENSE_LEN; - scmd->cdb.g1_cdb.cmd = 0x44; - scmd->cdb.g1_cdb.lun = scg_lun(scgp); - if (msf) - scmd->cdb.g1_cdb.res = 1; - g1_cdbaddr(&scmd->cdb.g1_cdb, addr); - g1_cdblen(&scmd->cdb.g1_cdb, cnt); - - scgp->cmdname = "read header"; - - if (scg_cmd(scgp) < 0) - return (-1); - return (0); -} - -EXPORT int -read_disk_info(scgp, bp, cnt) - SCSI *scgp; - caddr_t bp; - int cnt; - -{ - register struct scg_cmd *scmd = scgp->scmd; - - fillbytes((caddr_t)scmd, sizeof (*scmd), '\0'); - scmd->addr = bp; - scmd->size = cnt; - scmd->flags = SCG_RECV_DATA|SCG_DISRE_ENA; - scmd->cdb_len = SC_G1_CDBLEN; - scmd->sense_len = CCS_SENSE_LEN; - scmd->timeout = 4 * 60; /* Needs up to 2 minutes */ - scmd->cdb.g1_cdb.cmd = 0x51; - scmd->cdb.g1_cdb.lun = scg_lun(scgp); - g1_cdblen(&scmd->cdb.g1_cdb, cnt); - - scgp->cmdname = "read disk info"; - - if (scg_cmd(scgp) < 0) - return (-1); - return (0); -} - -EXPORT int -read_track_info(scgp, bp, type, addr, cnt) - SCSI *scgp; - caddr_t bp; - int type; - int addr; - int cnt; - -{ - register struct scg_cmd *scmd = scgp->scmd; - - fillbytes((caddr_t)scmd, sizeof (*scmd), '\0'); - scmd->addr = bp; - scmd->size = cnt; - scmd->flags = SCG_RECV_DATA|SCG_DISRE_ENA; - scmd->cdb_len = SC_G1_CDBLEN; - scmd->sense_len = CCS_SENSE_LEN; - scmd->timeout = 4 * 60; /* Needs up to 2 minutes */ - scmd->cdb.g1_cdb.cmd = 0x52; - scmd->cdb.g1_cdb.lun = scg_lun(scgp); -/* scmd->cdb.cmd_cdb[1] = type & 0x03;*/ - scmd->cdb.cmd_cdb[1] = type; - g1_cdbaddr(&scmd->cdb.g1_cdb, addr); /* LBA/Track/Session */ - g1_cdblen(&scmd->cdb.g1_cdb, cnt); - - scgp->cmdname = "read track info"; - - if (scg_cmd(scgp) < 0) - return (-1); - return (0); -} - -EXPORT int -get_trackinfo(scgp, bp, type, addr, cnt) - SCSI *scgp; - caddr_t bp; - int type; - int addr; - int cnt; -{ - int len; - int ret; - - fillbytes(bp, cnt, '\0'); - - /* - * Used to be 2 instead of 4 (now). But some Y2k ATAPI drives as used - * by IOMEGA create a DMA overrun if we try to transfer only 2 bytes. - */ - if (read_track_info(scgp, bp, type, addr, 4) < 0) - return (-1); - - len = a_to_u_2_byte(bp); - len += 2; - if (len > cnt) - len = cnt; - ret = read_track_info(scgp, bp, type, addr, len); - -#ifdef DEBUG - if (lverbose > 1) - scg_prbytes("Track info:", (Uchar *)bp, - len-scg_getresid(scgp)); -#endif - return (ret); -} - -EXPORT int -read_rzone_info(scgp, bp, cnt) - SCSI *scgp; - caddr_t bp; - int cnt; -{ - return (get_trackinfo(scgp, bp, TI_TYPE_LBA, 0, cnt)); -} - -EXPORT int -reserve_tr_rzone(scgp, size) - SCSI *scgp; - long size; /* number of blocks */ -{ - register struct scg_cmd *scmd = scgp->scmd; - - fillbytes((caddr_t)scmd, sizeof (*scmd), '\0'); - scmd->addr = (caddr_t)0; - scmd->size = 0; - scmd->flags = SCG_DISRE_ENA|SCG_CMD_RETRY; - scmd->cdb_len = SC_G1_CDBLEN; - scmd->sense_len = CCS_SENSE_LEN; - scmd->cdb.g1_cdb.cmd = 0x53; - scmd->cdb.g1_cdb.lun = scg_lun(scgp); - - i_to_4_byte(&scmd->cdb.g1_cdb.addr[3], size); - - scgp->cmdname = "reserve_track_rzone"; - - if (scg_cmd(scgp) < 0) - return (-1); - return (0); -} - -EXPORT int -read_dvd_structure(scgp, bp, cnt, mt, addr, layer, fmt) - SCSI *scgp; - caddr_t bp; - int cnt; - int mt; - int addr; - int layer; - int fmt; -{ - register struct scg_cmd *scmd = scgp->scmd; - - fillbytes((caddr_t)scmd, sizeof (*scmd), '\0'); - scmd->addr = bp; - scmd->size = cnt; - scmd->flags = SCG_RECV_DATA|SCG_DISRE_ENA; - scmd->cdb_len = SC_G5_CDBLEN; - scmd->sense_len = CCS_SENSE_LEN; - scmd->timeout = 4 * 60; /* Needs up to 2 minutes ??? */ - scmd->cdb.g5_cdb.cmd = 0xAD; - scmd->cdb.g5_cdb.lun = scg_lun(scgp); - scmd->cdb.cmd_cdb[1] |= (mt & 0x0F); /* Media Type */ - g5_cdbaddr(&scmd->cdb.g5_cdb, addr); - g5_cdblen(&scmd->cdb.g5_cdb, cnt); - scmd->cdb.g5_cdb.count[0] = layer; - scmd->cdb.g5_cdb.count[1] = fmt; - - scgp->cmdname = "read dvd structure"; - - if (scg_cmd(scgp) < 0) - return (-1); - return (0); -} - -EXPORT int -send_dvd_structure(scgp, bp, cnt, fmt) - SCSI *scgp; - caddr_t bp; - int cnt; - int fmt; -{ - register struct scg_cmd *scmd = scgp->scmd; - - fillbytes((caddr_t)scmd, sizeof (*scmd), '\0'); - scmd->addr = bp; - scmd->size = cnt; - scmd->flags = SCG_DISRE_ENA; - scmd->cdb_len = SC_G5_CDBLEN; - scmd->sense_len = CCS_SENSE_LEN; - scmd->timeout = 4 * 60; /* Needs up to 2 minutes ??? */ - scmd->cdb.g5_cdb.cmd = 0xBF; - scmd->cdb.g5_cdb.lun = scg_lun(scgp); - g5_cdblen(&scmd->cdb.g5_cdb, cnt); - scmd->cdb.g5_cdb.count[0] = 0; - scmd->cdb.g5_cdb.count[1] = fmt; - - scgp->cmdname = "send dvd structure"; - - if (scg_cmd(scgp) < 0) - return (-1); - return (0); -} - -EXPORT int -send_opc(scgp, bp, cnt, doopc) - SCSI *scgp; - caddr_t bp; - int cnt; - int doopc; -{ - register struct scg_cmd *scmd = scgp->scmd; - - fillbytes((caddr_t)scmd, sizeof (*scmd), '\0'); - scmd->addr = bp; - scmd->size = cnt; - scmd->flags = SCG_DISRE_ENA; - scmd->cdb_len = SC_G1_CDBLEN; - scmd->sense_len = CCS_SENSE_LEN; - scmd->timeout = 60; - scmd->cdb.g1_cdb.cmd = 0x54; - scmd->cdb.g1_cdb.lun = scg_lun(scgp); - scmd->cdb.g1_cdb.reladr = doopc?1:0; - g1_cdblen(&scmd->cdb.g1_cdb, cnt); - - scgp->cmdname = "send opc"; - - if (scg_cmd(scgp) < 0) - return (-1); - return (0); -} - -EXPORT int -read_track_info_philips(scgp, bp, track, cnt) - SCSI *scgp; - caddr_t bp; - int track; - int cnt; - -{ - register struct scg_cmd *scmd = scgp->scmd; - - fillbytes((caddr_t)scmd, sizeof (*scmd), '\0'); - scmd->addr = bp; - scmd->size = cnt; - scmd->flags = SCG_RECV_DATA|SCG_DISRE_ENA; - scmd->cdb_len = SC_G1_CDBLEN; - scmd->sense_len = CCS_SENSE_LEN; - scmd->cdb.g1_cdb.cmd = 0xE5; - scmd->cdb.g1_cdb.lun = scg_lun(scgp); - g1_cdbaddr(&scmd->cdb.g1_cdb, track); - g1_cdblen(&scmd->cdb.g1_cdb, cnt); - - scgp->cmdname = "read track info"; - - if (scg_cmd(scgp) < 0) - return (-1); - return (0); -} - -EXPORT int -scsi_close_tr_session(scgp, type, track, immed) - SCSI *scgp; - int type; - int track; - BOOL immed; -{ - register struct scg_cmd *scmd = scgp->scmd; - - fillbytes((caddr_t)scmd, sizeof (*scmd), '\0'); - scmd->flags = SCG_DISRE_ENA; - scmd->cdb_len = SC_G1_CDBLEN; - scmd->sense_len = CCS_SENSE_LEN; - scmd->timeout = 8 * 60; /* Needs up to 4 minutes */ - scmd->cdb.g1_cdb.cmd = 0x5B; - scmd->cdb.g1_cdb.lun = scg_lun(scgp); - scmd->cdb.g1_cdb.addr[0] = type; - scmd->cdb.g1_cdb.addr[3] = track; - - if (immed) - scmd->cdb.g1_cdb.reladr = 1; -/* scmd->cdb.cmd_cdb[1] |= 0x01;*/ -#ifdef nono - scmd->cdb.g1_cdb.reladr = 1; /* IMM hack to test Mitsumi behaviour*/ -#endif - - scgp->cmdname = "close track/session"; - - if (scg_cmd(scgp) < 0) - return (-1); - return (0); -} - -EXPORT int -read_master_cue(scgp, bp, sheet, cnt) - SCSI *scgp; - caddr_t bp; /* address of master cue sheet */ - int sheet; /* Sheet number */ - int cnt; /* Transfer count */ -{ - register struct scg_cmd *scmd = scgp->scmd; - - fillbytes((caddr_t)scmd, sizeof (*scmd), '\0'); - scmd->addr = bp; - scmd->size = cnt; - scmd->flags = SCG_RECV_DATA|SCG_DISRE_ENA; - scmd->cdb_len = SC_G1_CDBLEN; - scmd->sense_len = CCS_SENSE_LEN; - scmd->cdb.g1_cdb.cmd = 0x59; /* Read master cue */ - scmd->cdb.g1_cdb.lun = scg_lun(scgp); - scmd->cdb.g1_cdb.addr[2] = sheet; - g1_cdblen(&scmd->cdb.g1_cdb, cnt); - - scgp->cmdname = "read master cue"; - - if (scg_cmd(scgp) < 0) - return (-1); - return (0); -} - -EXPORT int -send_cue_sheet(scgp, bp, size) - SCSI *scgp; - caddr_t bp; /* address of cue sheet buffer */ - long size; /* number of bytes to transfer */ -{ - register struct scg_cmd *scmd = scgp->scmd; - - fillbytes((caddr_t)scmd, sizeof (*scmd), '\0'); - scmd->addr = bp; - scmd->size = size; - scmd->flags = SCG_DISRE_ENA; - scmd->cdb_len = SC_G1_CDBLEN; - scmd->sense_len = CCS_SENSE_LEN; - scmd->cdb.g1_cdb.cmd = 0x5D; /* Send CUE sheet */ - scmd->cdb.g1_cdb.lun = scg_lun(scgp); - g1_cdblen(&scmd->cdb.g1_cdb, size); - - scgp->cmdname = "send_cue_sheet"; - - if (scg_cmd(scgp) < 0) - return (-1); - return (size - scmd->resid); -} - -EXPORT int -read_buff_cap(scgp, sp, fp) - SCSI *scgp; - long *sp; /* Size pointer */ - long *fp; /* Free pointer */ -{ - char resp[12]; - Ulong freespace; - Ulong bufsize; - int per; - register struct scg_cmd *scmd = scgp->scmd; - - fillbytes((caddr_t)scmd, sizeof (*scmd), '\0'); - scmd->addr = (caddr_t)resp; - scmd->size = sizeof (resp); - scmd->flags = SCG_RECV_DATA|SCG_DISRE_ENA; - scmd->cdb_len = SC_G1_CDBLEN; - scmd->sense_len = CCS_SENSE_LEN; - scmd->cdb.g1_cdb.cmd = 0x5C; /* Read buffer cap */ - scmd->cdb.g1_cdb.lun = scg_lun(scgp); - g1_cdblen(&scmd->cdb.g1_cdb, sizeof (resp)); - - scgp->cmdname = "read buffer cap"; - - if (scg_cmd(scgp) < 0) - return (-1); - - bufsize = a_to_u_4_byte(&resp[4]); - freespace = a_to_u_4_byte(&resp[8]); - if (sp) - *sp = bufsize; - if (fp) - *fp = freespace; - - if (scgp->verbose || (sp == 0 && fp == 0)) - printf("BFree: %ld K BSize: %ld K\n", freespace >> 10, bufsize >> 10); - - if (bufsize == 0) - return (0); - per = (100 * (bufsize - freespace)) / bufsize; - if (per < 0) - return (0); - if (per > 100) - return (100); - return (per); -} - -EXPORT int -scsi_blank(scgp, addr, blanktype, immed) - SCSI *scgp; - long addr; - int blanktype; - BOOL immed; -{ - register struct scg_cmd *scmd = scgp->scmd; - - fillbytes((caddr_t)scmd, sizeof (*scmd), '\0'); - scmd->flags = SCG_DISRE_ENA; - scmd->cdb_len = SC_G5_CDBLEN; - scmd->sense_len = CCS_SENSE_LEN; - scmd->timeout = 160 * 60; /* full blank at 1x could take 80 minutes */ - scmd->cdb.g5_cdb.cmd = 0xA1; /* Blank */ - scmd->cdb.g0_cdb.high_addr = blanktype; - g1_cdbaddr(&scmd->cdb.g5_cdb, addr); - - if (immed) - scmd->cdb.g5_cdb.res |= 8; -/* scmd->cdb.cmd_cdb[1] |= 0x10;*/ - - scgp->cmdname = "blank unit"; - - return (scg_cmd(scgp)); -} - -/* - * XXX First try to handle ATAPI: - * XXX ATAPI cannot handle SCSI 6 byte commands. - * XXX We try to simulate 6 byte mode sense/select. - */ -LOCAL BOOL is_atapi; - -EXPORT BOOL -allow_atapi(scgp, new) - SCSI *scgp; - BOOL new; -{ - BOOL old = is_atapi; - Uchar mode[256]; - - if (new == old) - return (old); - - scgp->silent++; - /* - * If a bad drive has been reset before, we may need to fire up two - * test unit ready commands to clear status. - */ - (void) unit_ready(scgp); - if (new && - mode_sense_g1(scgp, mode, 8, 0x3F, 0) < 0) { /* All pages current */ - new = FALSE; - } - scgp->silent--; - - is_atapi = new; - return (old); -} - -EXPORT int -mode_select(scgp, dp, cnt, smp, pf) - SCSI *scgp; - Uchar *dp; - int cnt; - int smp; - int pf; -{ - if (is_atapi) - return (mode_select_sg0(scgp, dp, cnt, smp, pf)); - return (mode_select_g0(scgp, dp, cnt, smp, pf)); -} - -EXPORT int -mode_sense(scgp, dp, cnt, page, pcf) - SCSI *scgp; - Uchar *dp; - int cnt; - int page; - int pcf; -{ - if (is_atapi) - return (mode_sense_sg0(scgp, dp, cnt, page, pcf)); - return (mode_sense_g0(scgp, dp, cnt, page, pcf)); -} - -/* - * Simulate mode select g0 with mode select g1. - */ -EXPORT int -mode_select_sg0(scgp, dp, cnt, smp, pf) - SCSI *scgp; - Uchar *dp; - int cnt; - int smp; - int pf; -{ - Uchar xmode[256+4]; - int amt = cnt; - - if (amt < 1 || amt > 255) { - /* XXX clear SCSI error codes ??? */ - return (-1); - } - - if (amt < 4) { /* Data length. medium type & VU */ - amt += 1; - } else { - amt += 4; - movebytes(&dp[4], &xmode[8], cnt-4); - } - xmode[0] = 0; - xmode[1] = 0; - xmode[2] = dp[1]; - xmode[3] = dp[2]; - xmode[4] = 0; - xmode[5] = 0; - i_to_2_byte(&xmode[6], (unsigned int)dp[3]); - - if (scgp->verbose) scg_prbytes("Mode Parameters (un-converted)", dp, cnt); - - return (mode_select_g1(scgp, xmode, amt, smp, pf)); -} - -/* - * Simulate mode sense g0 with mode sense g1. - */ -EXPORT int -mode_sense_sg0(scgp, dp, cnt, page, pcf) - SCSI *scgp; - Uchar *dp; - int cnt; - int page; - int pcf; -{ - Uchar xmode[256+4]; - int amt = cnt; - int len; - - if (amt < 1 || amt > 255) { - /* XXX clear SCSI error codes ??? */ - return (-1); - } - - fillbytes((caddr_t)xmode, sizeof (xmode), '\0'); - if (amt < 4) { /* Data length. medium type & VU */ - amt += 1; - } else { - amt += 4; - } - if (mode_sense_g1(scgp, xmode, amt, page, pcf) < 0) - return (-1); - - amt = cnt - scg_getresid(scgp); -/* - * For tests: Solaris 8 & LG CD-ROM always returns resid == amt - */ -/* amt = cnt;*/ - if (amt > 4) - movebytes(&xmode[8], &dp[4], amt-4); - len = a_to_u_2_byte(xmode); - if (len == 0) { - dp[0] = 0; - } else if (len < 6) { - if (len > 2) - len = 2; - dp[0] = len; - } else { - dp[0] = len - 3; - } - dp[1] = xmode[2]; - dp[2] = xmode[3]; - len = a_to_u_2_byte(&xmode[6]); - dp[3] = len; - - if (scgp->verbose) scg_prbytes("Mode Sense Data (converted)", dp, amt); - return (0); -} - -EXPORT int -mode_select_g0(scgp, dp, cnt, smp, pf) - SCSI *scgp; - Uchar *dp; - int cnt; - int smp; - int pf; -{ - register struct scg_cmd *scmd = scgp->scmd; - - fillbytes((caddr_t)scmd, sizeof (*scmd), '\0'); - scmd->addr = (caddr_t)dp; - scmd->size = cnt; - scmd->flags = SCG_DISRE_ENA; - scmd->cdb_len = SC_G0_CDBLEN; - scmd->sense_len = CCS_SENSE_LEN; - scmd->cdb.g0_cdb.cmd = SC_MODE_SELECT; - scmd->cdb.g0_cdb.lun = scg_lun(scgp); - scmd->cdb.g0_cdb.high_addr = smp ? 1 : 0 | pf ? 0x10 : 0; - scmd->cdb.g0_cdb.count = cnt; - - if (scgp->verbose) { - error("%s ", smp?"Save":"Set "); - scg_prbytes("Mode Parameters", dp, cnt); - } - - scgp->cmdname = "mode select g0"; - - return (scg_cmd(scgp)); -} - -EXPORT int -mode_select_g1(scgp, dp, cnt, smp, pf) - SCSI *scgp; - Uchar *dp; - int cnt; - int smp; - int pf; -{ - register struct scg_cmd *scmd = scgp->scmd; - - fillbytes((caddr_t)scmd, sizeof (*scmd), '\0'); - scmd->addr = (caddr_t)dp; - scmd->size = cnt; - scmd->flags = SCG_DISRE_ENA; - scmd->cdb_len = SC_G1_CDBLEN; - scmd->sense_len = CCS_SENSE_LEN; - scmd->cdb.g1_cdb.cmd = 0x55; - scmd->cdb.g1_cdb.lun = scg_lun(scgp); - scmd->cdb.g0_cdb.high_addr = smp ? 1 : 0 | pf ? 0x10 : 0; - g1_cdblen(&scmd->cdb.g1_cdb, cnt); - - if (scgp->verbose) { - printf("%s ", smp?"Save":"Set "); - scg_prbytes("Mode Parameters", dp, cnt); - } - - scgp->cmdname = "mode select g1"; - - return (scg_cmd(scgp)); -} - -EXPORT int -mode_sense_g0(scgp, dp, cnt, page, pcf) - SCSI *scgp; - Uchar *dp; - int cnt; - int page; - int pcf; -{ - register struct scg_cmd *scmd = scgp->scmd; - - fillbytes((caddr_t)scmd, sizeof (*scmd), '\0'); - scmd->addr = (caddr_t)dp; - scmd->size = 0xFF; - scmd->size = cnt; - scmd->flags = SCG_RECV_DATA|SCG_DISRE_ENA; - scmd->cdb_len = SC_G0_CDBLEN; - scmd->sense_len = CCS_SENSE_LEN; - scmd->cdb.g0_cdb.cmd = SC_MODE_SENSE; - scmd->cdb.g0_cdb.lun = scg_lun(scgp); -#ifdef nonono - scmd->cdb.g0_cdb.high_addr = 1<<4; /* DBD Disable Block desc. */ -#endif - scmd->cdb.g0_cdb.mid_addr = (page&0x3F) | ((pcf<<6)&0xC0); - scmd->cdb.g0_cdb.count = page ? 0xFF : 24; - scmd->cdb.g0_cdb.count = cnt; - - scgp->cmdname = "mode sense g0"; - - if (scg_cmd(scgp) < 0) - return (-1); - if (scgp->verbose) scg_prbytes("Mode Sense Data", dp, cnt - scg_getresid(scgp)); - return (0); -} - -EXPORT int -mode_sense_g1(scgp, dp, cnt, page, pcf) - SCSI *scgp; - Uchar *dp; - int cnt; - int page; - int pcf; -{ - register struct scg_cmd *scmd = scgp->scmd; - - fillbytes((caddr_t)scmd, sizeof (*scmd), '\0'); - scmd->addr = (caddr_t)dp; - scmd->size = cnt; - scmd->flags = SCG_RECV_DATA|SCG_DISRE_ENA; - scmd->cdb_len = SC_G1_CDBLEN; - scmd->sense_len = CCS_SENSE_LEN; - scmd->cdb.g1_cdb.cmd = 0x5A; - scmd->cdb.g1_cdb.lun = scg_lun(scgp); -#ifdef nonono - scmd->cdb.g0_cdb.high_addr = 1<<4; /* DBD Disable Block desc. */ -#endif - scmd->cdb.g1_cdb.addr[0] = (page&0x3F) | ((pcf<<6)&0xC0); - g1_cdblen(&scmd->cdb.g1_cdb, cnt); - - scgp->cmdname = "mode sense g1"; - - if (scg_cmd(scgp) < 0) - return (-1); - if (scgp->verbose) scg_prbytes("Mode Sense Data", dp, cnt - scg_getresid(scgp)); - return (0); -} - -struct trackdesc { - Uchar res0; - -#if defined(_BIT_FIELDS_LTOH) /* Intel byteorder */ - Ucbit control : 4; - Ucbit adr : 4; -#else /* Motorola byteorder */ - Ucbit adr : 4; - Ucbit control : 4; -#endif - - Uchar track; - Uchar res3; - Uchar addr[4]; -}; - -struct diskinfo { - struct tocheader hd; - struct trackdesc desc[1]; -}; - -struct siheader { - Uchar len[2]; - Uchar finished; - Uchar unfinished; -}; - -struct sidesc { - Uchar sess_number; - Uchar res1; - Uchar track; - Uchar res3; - Uchar addr[4]; -}; - -struct sinfo { - struct siheader hd; - struct sidesc desc[1]; -}; - -struct trackheader { - Uchar mode; - Uchar res[3]; - Uchar addr[4]; -}; -#define TRM_ZERO 0 -#define TRM_USER_ECC 1 /* 2048 bytes user data + 288 Bytes ECC/EDC */ -#define TRM_USER 2 /* All user data (2336 bytes) */ - - -EXPORT int -read_tochdr(scgp, dp, fp, lp) - SCSI *scgp; - cdr_t *dp; - int *fp; - int *lp; -{ - struct tocheader *tp; - char xb[256]; - int len; - - tp = (struct tocheader *)xb; - - fillbytes((caddr_t)xb, sizeof (xb), '\0'); - if (read_toc(scgp, xb, 0, sizeof (struct tocheader), 0, FMT_TOC) < 0) { - if (scgp->silent == 0) - errmsgno(EX_BAD, "Cannot read TOC header\n"); - return (-1); - } - len = a_to_u_2_byte(tp->len) + sizeof (struct tocheader)-2; - if (len >= 4) { - if (fp) - *fp = tp->first; - if (lp) - *lp = tp->last; - return (0); - } - return (-1); -} - -EXPORT int -read_cdtext(scgp) - SCSI *scgp; -{ - struct tocheader *tp; - char xb[256]; - int len; - char xxb[10000]; - - tp = (struct tocheader *)xb; - - fillbytes((caddr_t)xb, sizeof (xb), '\0'); - if (read_toc(scgp, xb, 0, sizeof (struct tocheader), 0, FMT_CDTEXT) < 0) { - if (scgp->silent == 0 || scgp->verbose > 0) - errmsgno(EX_BAD, "Cannot read CD-Text header\n"); - return (-1); - } - len = a_to_u_2_byte(tp->len) + sizeof (struct tocheader)-2; - printf("CD-Text len: %d\n", len); - - if (read_toc(scgp, xxb, 0, len, 0, FMT_CDTEXT) < 0) { - if (scgp->silent == 0) - errmsgno(EX_BAD, "Cannot read CD-Text\n"); - return (-1); - } - { - FILE *f = fileopen("cdtext.dat", "wctb"); - filewrite(f, xxb, len); - } - return (0); -} - -EXPORT int -read_trackinfo(scgp, track, offp, msfp, adrp, controlp, modep) - SCSI *scgp; - int track; - long *offp; - struct msf *msfp; - int *adrp; - int *controlp; - int *modep; -{ - struct diskinfo *dp; - char xb[256]; - int len; - - dp = (struct diskinfo *)xb; - - fillbytes((caddr_t)xb, sizeof (xb), '\0'); - if (read_toc(scgp, xb, track, sizeof (struct diskinfo), 0, FMT_TOC) < 0) { - if (scgp->silent <= 0) - errmsgno(EX_BAD, "Cannot read TOC\n"); - return (-1); - } - len = a_to_u_2_byte(dp->hd.len) + sizeof (struct tocheader)-2; - if (len < (int)sizeof (struct diskinfo)) - return (-1); - - if (offp) - *offp = a_to_4_byte(dp->desc[0].addr); - if (adrp) - *adrp = dp->desc[0].adr; - if (controlp) - *controlp = dp->desc[0].control; - - if (msfp) { - scgp->silent++; - if (read_toc(scgp, xb, track, sizeof (struct diskinfo), 1, FMT_TOC) - >= 0) { - msfp->msf_min = dp->desc[0].addr[1]; - msfp->msf_sec = dp->desc[0].addr[2]; - msfp->msf_frame = dp->desc[0].addr[3]; - } else if (read_toc(scgp, xb, track, sizeof (struct diskinfo), 0, FMT_TOC) - >= 0) { - /* - * Some drives (e.g. the Philips CDD-522) don't support - * to read the TOC in MSF mode. - */ - long off = a_to_4_byte(dp->desc[0].addr); - - lba_to_msf(off, msfp); - } else { - msfp->msf_min = 0; - msfp->msf_sec = 0; - msfp->msf_frame = 0; - } - scgp->silent--; - } - - if (modep == NULL) - return (0); - - if (track == 0xAA) { - *modep = -1; - return (0); - } - - fillbytes((caddr_t)xb, sizeof (xb), '\0'); - - scgp->silent++; - if (read_header(scgp, xb, *offp, 8, 0) >= 0) { - *modep = xb[0]; - } else if (read_track_info_philips(scgp, xb, track, 14) >= 0) { - *modep = xb[0xb] & 0xF; - } else { - *modep = -1; - } - scgp->silent--; - return (0); -} - -EXPORT int -read_B0(scgp, isbcd, b0p, lop) - SCSI *scgp; - BOOL isbcd; - long *b0p; - long *lop; -{ - struct fdiskinfo *dp; - struct ftrackdesc *tp; - char xb[8192]; - char *pe; - int len; - long l; - - dp = (struct fdiskinfo *)xb; - - fillbytes((caddr_t)xb, sizeof (xb), '\0'); - if (read_toc_philips(scgp, xb, 1, sizeof (struct tocheader), 0, FMT_FULLTOC) < 0) { - return (-1); - } - len = a_to_u_2_byte(dp->hd.len) + sizeof (struct tocheader)-2; - if (len < (int)sizeof (struct fdiskinfo)) - return (-1); - if (read_toc_philips(scgp, xb, 1, len, 0, FMT_FULLTOC) < 0) { - return (-1); - } - if (scgp->verbose) { - scg_prbytes("TOC data: ", (Uchar *)xb, - len > (int)sizeof (xb) - scg_getresid(scgp) ? - sizeof (xb) - scg_getresid(scgp) : len); - - tp = &dp->desc[0]; - pe = &xb[len]; - - while ((char *)tp < pe) { - scg_prbytes("ENT: ", (Uchar *)tp, 11); - tp++; - } - } - tp = &dp->desc[0]; - pe = &xb[len]; - - for (; (char *)tp < pe; tp++) { - if (tp->sess_number != dp->hd.last) - continue; - if (tp->point != 0xB0) - continue; - if (scgp->verbose) - scg_prbytes("B0: ", (Uchar *)tp, 11); - if (isbcd) { - l = msf_to_lba(from_bcd(tp->amin), - from_bcd(tp->asec), - from_bcd(tp->aframe), TRUE); - } else { - l = msf_to_lba(tp->amin, - tp->asec, - tp->aframe, TRUE); - } - if (b0p) - *b0p = l; - - if (scgp->verbose) - printf("B0 start: %ld\n", l); - - if (isbcd) { - l = msf_to_lba(from_bcd(tp->pmin), - from_bcd(tp->psec), - from_bcd(tp->pframe), TRUE); - } else { - l = msf_to_lba(tp->pmin, - tp->psec, - tp->pframe, TRUE); - } - - if (scgp->verbose) - printf("B0 lout: %ld\n", l); - if (lop) - *lop = l; - return (0); - } - return (-1); -} - - -/* - * Return address of first track in last session (SCSI-3/mmc version). - */ -EXPORT int -read_session_offset(scgp, offp) - SCSI *scgp; - long *offp; -{ - struct diskinfo *dp; - char xb[256]; - int len; - - dp = (struct diskinfo *)xb; - - fillbytes((caddr_t)xb, sizeof (xb), '\0'); - if (read_toc(scgp, (caddr_t)xb, 0, sizeof (struct tocheader), 0, FMT_SINFO) < 0) - return (-1); - - if (scgp->verbose) - scg_prbytes("tocheader: ", - (Uchar *)xb, sizeof (struct tocheader) - scg_getresid(scgp)); - - len = a_to_u_2_byte(dp->hd.len) + sizeof (struct tocheader)-2; - if (len > (int)sizeof (xb)) { - errmsgno(EX_BAD, "Session info too big.\n"); - return (-1); - } - if (read_toc(scgp, (caddr_t)xb, 0, len, 0, FMT_SINFO) < 0) - return (-1); - - if (scgp->verbose) - scg_prbytes("tocheader: ", - (Uchar *)xb, len - scg_getresid(scgp)); - - dp = (struct diskinfo *)xb; - if (offp) - *offp = a_to_u_4_byte(dp->desc[0].addr); - return (0); -} - -/* - * Return address of first track in last session (pre SCSI-3 version). - */ -EXPORT int -read_session_offset_philips(scgp, offp) - SCSI *scgp; - long *offp; -{ - struct sinfo *sp; - char xb[256]; - int len; - - sp = (struct sinfo *)xb; - - fillbytes((caddr_t)xb, sizeof (xb), '\0'); - if (read_toc_philips(scgp, (caddr_t)xb, 0, sizeof (struct siheader), 0, FMT_SINFO) < 0) - return (-1); - len = a_to_u_2_byte(sp->hd.len) + sizeof (struct siheader)-2; - if (len > (int)sizeof (xb)) { - errmsgno(EX_BAD, "Session info too big.\n"); - return (-1); - } - if (read_toc_philips(scgp, (caddr_t)xb, 0, len, 0, FMT_SINFO) < 0) - return (-1); - /* - * Old drives return the number of finished sessions in first/finished - * a descriptor is returned for each session. - * New drives return the number of the first and last session - * one descriptor for the last finished session is returned - * as in SCSI-3 - * In all cases the lowest session number is set to 1. - */ - sp = (struct sinfo *)xb; - if (offp) - *offp = a_to_u_4_byte(sp->desc[sp->hd.finished-1].addr); - return (0); -} - -EXPORT int -sense_secsize(scgp, current) - SCSI *scgp; - int current; -{ - Uchar mode[0x100]; - Uchar *p; - Uchar *ep; - int len; - int secsize = -1; - - scgp->silent++; - (void) unit_ready(scgp); - scgp->silent--; - - /* XXX Quick and dirty, musz verallgemeinert werden !!! */ - - fillbytes(mode, sizeof (mode), '\0'); - scgp->silent++; - - len = sizeof (struct scsi_mode_header) + - sizeof (struct scsi_mode_blockdesc); - /* - * Wenn wir hier get_mode_params() nehmen bekommen wir die Warnung: - * Warning: controller returns wrong page 1 for All pages page (3F). - */ - if (mode_sense(scgp, mode, len, 0x3F, current?0:2) < 0) { - fillbytes(mode, sizeof (mode), '\0'); - if (mode_sense(scgp, mode, len, 0, current?0:2) < 0) { /* VU (block desc) */ - scgp->silent--; - return (-1); - } - } - if (mode[3] == 8) { - if (scgp->debug) { - printf("Density: 0x%X\n", mode[4]); - printf("Blocks: %ld\n", a_to_u_3_byte(&mode[5])); - printf("Blocklen:%ld\n", a_to_u_3_byte(&mode[9])); - } - secsize = a_to_u_3_byte(&mode[9]); - } - fillbytes(mode, sizeof (mode), '\0'); - /* - * The ACARD TECH AEC-7720 ATAPI<->SCSI adaptor - * chokes if we try to transfer more than 0x40 bytes with - * mode_sense of all pages. So try to avoid to run this - * command if possible. - */ - if (scgp->debug && - mode_sense(scgp, mode, 0xFE, 0x3F, current?0:2) >= 0) { /* All Pages */ - - ep = mode+mode[0]; /* Points to last byte of data */ - p = &mode[4]; - p += mode[3]; - printf("Pages: "); - while (p < ep) { - printf("0x%X ", *p&0x3F); - p += p[1]+2; - } - printf("\n"); - } - scgp->silent--; - - return (secsize); -} - -EXPORT int -select_secsize(scgp, secsize) - SCSI *scgp; - int secsize; -{ - struct scsi_mode_data md; - int count = sizeof (struct scsi_mode_header) + - sizeof (struct scsi_mode_blockdesc); - - (void) test_unit_ready(scgp); /* clear any error situation */ - - fillbytes((caddr_t)&md, sizeof (md), '\0'); - md.header.blockdesc_len = 8; - i_to_3_byte(md.blockdesc.lblen, secsize); - - return (mode_select(scgp, (Uchar *)&md, count, 0, scgp->inq->data_format >= 2)); -} - -EXPORT BOOL -is_cddrive(scgp) - SCSI *scgp; -{ - return (scgp->inq->type == INQ_ROMD || scgp->inq->type == INQ_WORM); -} - -EXPORT BOOL -is_unknown_dev(scgp) - SCSI *scgp; -{ - return (scgp->dev == DEV_UNKNOWN); -} - -#ifndef DEBUG -#define DEBUG -#endif -#ifdef DEBUG - -EXPORT int -read_scsi(scgp, bp, addr, cnt) - SCSI *scgp; - caddr_t bp; - long addr; - int cnt; -{ - if (addr <= G0_MAXADDR && cnt < 256 && !is_atapi) - return (read_g0(scgp, bp, addr, cnt)); - else - return (read_g1(scgp, bp, addr, cnt)); -} - -EXPORT int -read_g0(scgp, bp, addr, cnt) - SCSI *scgp; - caddr_t bp; - long addr; - int cnt; -{ - register struct scg_cmd *scmd = scgp->scmd; - - if (scgp->cap->c_bsize <= 0) - raisecond("capacity_not_set", 0L); - - fillbytes((caddr_t)scmd, sizeof (*scmd), '\0'); - scmd->addr = bp; - scmd->size = cnt*scgp->cap->c_bsize; - scmd->flags = SCG_RECV_DATA|SCG_DISRE_ENA; - scmd->cdb_len = SC_G0_CDBLEN; - scmd->sense_len = CCS_SENSE_LEN; - scmd->cdb.g0_cdb.cmd = SC_READ; - scmd->cdb.g0_cdb.lun = scg_lun(scgp); - g0_cdbaddr(&scmd->cdb.g0_cdb, addr); - scmd->cdb.g0_cdb.count = cnt; -/* scmd->cdb.g0_cdb.vu_56 = 1;*/ - - scgp->cmdname = "read_g0"; - - return (scg_cmd(scgp)); -} - -EXPORT int -read_g1(scgp, bp, addr, cnt) - SCSI *scgp; - caddr_t bp; - long addr; - int cnt; -{ - register struct scg_cmd *scmd = scgp->scmd; - - if (scgp->cap->c_bsize <= 0) - raisecond("capacity_not_set", 0L); - - fillbytes((caddr_t)scmd, sizeof (*scmd), '\0'); - scmd->addr = bp; - scmd->size = cnt*scgp->cap->c_bsize; - scmd->flags = SCG_RECV_DATA|SCG_DISRE_ENA; - scmd->cdb_len = SC_G1_CDBLEN; - scmd->sense_len = CCS_SENSE_LEN; - scmd->cdb.g1_cdb.cmd = SC_EREAD; - scmd->cdb.g1_cdb.lun = scg_lun(scgp); - g1_cdbaddr(&scmd->cdb.g1_cdb, addr); - g1_cdblen(&scmd->cdb.g1_cdb, cnt); - - scgp->cmdname = "read_g1"; - - return (scg_cmd(scgp)); -} -#endif /* DEBUG */ - -EXPORT BOOL -getdev(scgp, print) - SCSI *scgp; - BOOL print; -{ - BOOL got_inquiry = TRUE; - char vendor_info[8+1]; - char prod_ident[16+1]; - char prod_revision[4+1]; - int inq_len = 0; - register struct scg_cmd *scmd = scgp->scmd; - register struct scsi_inquiry *inq = scgp->inq; - - - fillbytes((caddr_t)inq, sizeof (*inq), '\0'); - scgp->dev = DEV_UNKNOWN; - scgp->silent++; - (void) unit_ready(scgp); - if (scmd->error >= SCG_FATAL && - !(scmd->scb.chk && scmd->sense_count > 0)) { - scgp->silent--; - return (FALSE); - } - - -/* if (scmd->error < SCG_FATAL || scmd->scb.chk && scmd->sense_count > 0){*/ - - if (inquiry(scgp, (caddr_t)inq, sizeof (*inq)) < 0) { - got_inquiry = FALSE; - } else { - inq_len = sizeof (*inq) - scg_getresid(scgp); - } - if (!got_inquiry) { - if (scgp->verbose) { - printf( - "error: %d scb.chk: %d sense_count: %d sense.code: 0x%x\n", - scmd->error, scmd->scb.chk, - scmd->sense_count, scmd->sense.code); - } - /* - * Folgende Kontroller kennen das Kommando - * INQUIRY nicht: - * - * ADAPTEC ACB-4000, ACB-4010, ACB 4070 - * SYSGEN SC4000 - * - * Leider reagieren ACB40X0 und ACB5500 identisch - * wenn drive not ready (code == not ready), - * sie sind dann nicht zu unterscheiden. - */ - - if (scmd->scb.chk && scmd->sense_count == 4) { - /* Test auf SYSGEN */ - (void) qic02(scgp, 0x12); /* soft lock on */ - if (qic02(scgp, 1) < 0) { /* soft lock off */ - scgp->dev = DEV_ACB40X0; -/* scgp->dev = acbdev();*/ - } else { - scgp->dev = DEV_SC4000; - inq->type = INQ_SEQD; - inq->removable = 1; - } - } - } else if (scgp->verbose) { - int i; - int len = inq->add_len + 5; - Uchar ibuf[256+5]; - Uchar *ip = (Uchar *)inq; - Uchar c; - - if (len > (int)sizeof (*inq) && - inquiry(scgp, (caddr_t)ibuf, inq->add_len+5) >= 0) { - len = inq->add_len+5 - scg_getresid(scgp); - ip = ibuf; - } else { - len = sizeof (*inq); - } - printf("Inquiry Data : "); - for (i = 0; i < len; i++) { - c = ip[i]; - if (c >= ' ' && c < 0177) - printf("%c", c); - else - printf("."); - } - printf("\n"); - } - - strncpy(vendor_info, inq->vendor_info, sizeof (inq->vendor_info)); - strncpy(prod_ident, inq->prod_ident, sizeof (inq->prod_ident)); - strncpy(prod_revision, inq->prod_revision, sizeof (inq->prod_revision)); - - vendor_info[sizeof (inq->vendor_info)] = '\0'; - prod_ident[sizeof (inq->prod_ident)] = '\0'; - prod_revision[sizeof (inq->prod_revision)] = '\0'; - - switch (inq->type) { - - case INQ_DASD: - if (inq->add_len == 0 && inq->vendor_info[0] != '\0') { - Uchar *p; - /* - * NT-4.0 creates fake inquiry data for IDE disks. - * Unfortunately, it does not set add_len wo we - * check if vendor_info, prod_ident and prod_revision - * contains valid chars for a CCS inquiry. - */ - if (inq_len >= 36) - inq->add_len = 31; - - for (p = (Uchar *)&inq->vendor_info[0]; - p < (Uchar *)&inq->prod_revision[4]; - p++) { - if (*p < 0x20 || *p > 0x7E) { - inq->add_len = 0; - break; - } - } - } - if (inq->add_len == 0) { - if (scgp->dev == DEV_UNKNOWN && got_inquiry) { - scgp->dev = DEV_ACB5500; - strcpy(inq->vendor_info, - "ADAPTEC ACB-5500 FAKE"); - - } else switch (scgp->dev) { - - case DEV_ACB40X0: - strcpy(inq->vendor_info, - "ADAPTEC ACB-40X0 FAKE"); - break; - case DEV_ACB4000: - strcpy(inq->vendor_info, - "ADAPTEC ACB-4000 FAKE"); - break; - case DEV_ACB4010: - strcpy(inq->vendor_info, - "ADAPTEC ACB-4010 FAKE"); - break; - case DEV_ACB4070: - strcpy(inq->vendor_info, - "ADAPTEC ACB-4070 FAKE"); - break; - } - } else if (inq->add_len < 31) { - scgp->dev = DEV_NON_CCS_DSK; - - } else if (strbeg("EMULEX", vendor_info)) { - if (strbeg("MD21", prod_ident)) - scgp->dev = DEV_MD21; - if (strbeg("MD23", prod_ident)) - scgp->dev = DEV_MD23; - else - scgp->dev = DEV_CCS_GENDISK; - } else if (strbeg("ADAPTEC", vendor_info)) { - if (strbeg("ACB-4520", prod_ident)) - scgp->dev = DEV_ACB4520A; - if (strbeg("ACB-4525", prod_ident)) - scgp->dev = DEV_ACB4525; - else - scgp->dev = DEV_CCS_GENDISK; - } else if (strbeg("SONY", vendor_info) && - strbeg("SMO-C501", prod_ident)) { - scgp->dev = DEV_SONY_SMO; - } else { - scgp->dev = DEV_CCS_GENDISK; - } - break; - - case INQ_SEQD: - if (scgp->dev == DEV_SC4000) { - strcpy(inq->vendor_info, - "SYSGEN SC4000 FAKE"); - } else if (inq->add_len == 0 && - inq->removable && - inq->ansi_version == 1) { - scgp->dev = DEV_MT02; - strcpy(inq->vendor_info, - "EMULEX MT02 FAKE"); - } - break; - -/* case INQ_OPTD:*/ - case INQ_ROMD: - case INQ_WORM: - if (strbeg("RXT-800S", prod_ident)) - scgp->dev = DEV_RXT800S; - - /* - * Start of CD-Recorders: - */ - if (strbeg("ACER", vendor_info)) { - if (strbeg("CR-4020C", prod_ident)) - scgp->dev = DEV_RICOH_RO_1420C; - - } else if (strbeg("CREATIVE", vendor_info)) { - if (strbeg("CDR2000", prod_ident)) - scgp->dev = DEV_RICOH_RO_1060C; - - } else if (strbeg("GRUNDIG", vendor_info)) { - if (strbeg("CDR100IPW", prod_ident)) - scgp->dev = DEV_CDD_2000; - - } else if (strbeg("JVC", vendor_info)) { - if (strbeg("XR-W2001", prod_ident)) - scgp->dev = DEV_TEAC_CD_R50S; - else if (strbeg("XR-W2010", prod_ident)) - scgp->dev = DEV_TEAC_CD_R50S; - else if (strbeg("R2626", prod_ident)) - scgp->dev = DEV_TEAC_CD_R50S; - - } else if (strbeg("MITSBISH", vendor_info)) { - -#ifdef XXXX_REALLY - /* It's MMC compliant */ - if (strbeg("CDRW226", prod_ident)) - scgp->dev = DEV_MMC_CDRW; -#else - /* EMPTY */ -#endif - - } else if (strbeg("MITSUMI", vendor_info)) { - /* Don't know any product string */ - scgp->dev = DEV_CDD_522; - - } else if (strbeg("OPTIMA", vendor_info)) { - if (strbeg("CD-R 650", prod_ident)) - scgp->dev = DEV_SONY_CDU_924; - - } else if (strbeg("PHILIPS", vendor_info) || - strbeg("IMS", vendor_info) || - strbeg("KODAK", vendor_info) || - strbeg("HP", vendor_info)) { - - if (strbeg("CDD521/00", prod_ident)) - scgp->dev = DEV_CDD_521_OLD; - else if (strbeg("CDD521/02", prod_ident)) - scgp->dev = DEV_CDD_521_OLD; /* PCD 200R? */ - else if (strbeg("CDD521", prod_ident)) - scgp->dev = DEV_CDD_521; - - if (strbeg("CDD522", prod_ident)) - scgp->dev = DEV_CDD_522; - if (strbeg("PCD225", prod_ident)) - scgp->dev = DEV_CDD_522; - if (strbeg("KHSW/OB", prod_ident)) /* PCD600 */ - scgp->dev = DEV_PCD_600; - if (strbeg("CDR-240", prod_ident)) - scgp->dev = DEV_CDD_2000; - - if (strbeg("CDD20", prod_ident)) - scgp->dev = DEV_CDD_2000; - if (strbeg("CDD26", prod_ident)) - scgp->dev = DEV_CDD_2600; - - if (strbeg("C4324/C4325", prod_ident)) - scgp->dev = DEV_CDD_2000; - if (strbeg("CD-Writer 6020", prod_ident)) - scgp->dev = DEV_CDD_2600; - - } else if (strbeg("PINNACLE", vendor_info)) { - if (strbeg("RCD-1000", prod_ident)) - scgp->dev = DEV_TEAC_CD_R50S; - if (strbeg("RCD5020", prod_ident)) - scgp->dev = DEV_TEAC_CD_R50S; - if (strbeg("RCD5040", prod_ident)) - scgp->dev = DEV_TEAC_CD_R50S; - if (strbeg("RCD 4X4", prod_ident)) - scgp->dev = DEV_TEAC_CD_R50S; - - } else if (strbeg("PIONEER", vendor_info)) { - if (strbeg("CD-WO DW-S114X", prod_ident)) - scgp->dev = DEV_PIONEER_DW_S114X; - else if (strbeg("CD-WO DR-R504X", prod_ident)) /* Reoprt from philip@merge.com */ - scgp->dev = DEV_PIONEER_DW_S114X; - else if (strbeg("DVD-R DVR-S101", prod_ident)) - scgp->dev = DEV_PIONEER_DVDR_S101; - - } else if (strbeg("PLASMON", vendor_info)) { - if (strbeg("RF4100", prod_ident)) - scgp->dev = DEV_PLASMON_RF_4100; - else if (strbeg("CDR4220", prod_ident)) - scgp->dev = DEV_CDD_2000; - - } else if (strbeg("PLEXTOR", vendor_info)) { - if (strbeg("CD-R PX-R24CS", prod_ident)) - scgp->dev = DEV_RICOH_RO_1420C; - - } else if (strbeg("RICOH", vendor_info)) { - if (strbeg("RO-1420C", prod_ident)) - scgp->dev = DEV_RICOH_RO_1420C; - if (strbeg("RO1060C", prod_ident)) - scgp->dev = DEV_RICOH_RO_1060C; - - } else if (strbeg("SAF", vendor_info)) { /* Smart & Friendly */ - if (strbeg("CD-R2004", prod_ident) || - strbeg("CD-R2006 ", prod_ident)) - scgp->dev = DEV_SONY_CDU_924; - else if (strbeg("CD-R2006PLUS", prod_ident)) - scgp->dev = DEV_TEAC_CD_R50S; - else if (strbeg("CD-RW226", prod_ident)) - scgp->dev = DEV_TEAC_CD_R50S; - else if (strbeg("CD-R4012", prod_ident)) - scgp->dev = DEV_TEAC_CD_R50S; - - } else if (strbeg("SANYO", vendor_info)) { - if (strbeg("CD-WO CRD-R24S", prod_ident)) - scgp->dev = DEV_CDD_521; - - } else if (strbeg("SONY", vendor_info)) { - if (strbeg("CD-R CDU92", prod_ident) || - strbeg("CD-R CDU94", prod_ident)) - scgp->dev = DEV_SONY_CDU_924; - - } else if (strbeg("TEAC", vendor_info)) { - if (strbeg("CD-R50S", prod_ident) || - strbeg("CD-R55S", prod_ident)) - scgp->dev = DEV_TEAC_CD_R50S; - - } else if (strbeg("TRAXDATA", vendor_info) || - strbeg("Traxdata", vendor_info)) { - if (strbeg("CDR4120", prod_ident)) - scgp->dev = DEV_TEAC_CD_R50S; - - } else if (strbeg("T.YUDEN", vendor_info)) { - if (strbeg("CD-WO EW-50", prod_ident)) - scgp->dev = DEV_TYUDEN_EW50; - - } else if (strbeg("WPI", vendor_info)) { /* Wearnes */ - if (strbeg("CDR-632P", prod_ident)) - scgp->dev = DEV_CDD_2600; - - } else if (strbeg("YAMAHA", vendor_info)) { - if (strbeg("CDR10", prod_ident)) - scgp->dev = DEV_YAMAHA_CDR_100; - if (strbeg("CDR200", prod_ident)) - scgp->dev = DEV_YAMAHA_CDR_400; - if (strbeg("CDR400", prod_ident)) - scgp->dev = DEV_YAMAHA_CDR_400; - - } else if (strbeg("MATSHITA", vendor_info)) { - if (strbeg("CD-R CW-7501", prod_ident)) - scgp->dev = DEV_MATSUSHITA_7501; - if (strbeg("CD-R CW-7502", prod_ident)) - scgp->dev = DEV_MATSUSHITA_7502; - } - if (scgp->dev == DEV_UNKNOWN) { - /* - * We do not have Manufacturer strings for - * the following drives. - */ - if (strbeg("CDS615E", prod_ident)) /* Olympus */ - scgp->dev = DEV_SONY_CDU_924; - } - if (scgp->dev == DEV_UNKNOWN && inq->type == INQ_ROMD) { - BOOL cdrr = FALSE; - BOOL cdwr = FALSE; - BOOL cdrrw = FALSE; - BOOL cdwrw = FALSE; - BOOL dvd = FALSE; - BOOL dvdwr = FALSE; - - scgp->dev = DEV_CDROM; - - if (mmc_check(scgp, &cdrr, &cdwr, &cdrrw, &cdwrw, - &dvd, &dvdwr)) - scgp->dev = DEV_MMC_CDROM; - if (cdwr) - scgp->dev = DEV_MMC_CDR; - if (cdwrw) - scgp->dev = DEV_MMC_CDRW; - if (dvd) - scgp->dev = DEV_MMC_DVD; - if (dvdwr) - scgp->dev = DEV_MMC_DVD_WR; - } - break; - - case INQ_PROCD: - if (strbeg("BERTHOLD", vendor_info)) { - if (strbeg("", prod_ident)) - scgp->dev = DEV_HRSCAN; - } - break; - - case INQ_SCAN: - scgp->dev = DEV_MS300A; - break; - } - scgp->silent--; - if (!print) - return (TRUE); - - if (scgp->dev == DEV_UNKNOWN && !got_inquiry) { -#ifdef PRINT_INQ_ERR - scg_printerr(scgp); -#endif - return (FALSE); - } - - printinq(scgp, stdout); - return (TRUE); -} - -EXPORT void -printinq(scgp, f) - SCSI *scgp; - FILE *f; -{ - register struct scsi_inquiry *inq = scgp->inq; - - fprintf(f, "Device type : "); - scg_fprintdev(f, inq); - fprintf(f, "Version : %d\n", inq->ansi_version); - fprintf(f, "Response Format: %d\n", inq->data_format); - if (inq->data_format >= 2) { - fprintf(f, "Capabilities : "); - if (inq->aenc) fprintf(f, "AENC "); - if (inq->termiop) fprintf(f, "TERMIOP "); - if (inq->reladr) fprintf(f, "RELADR "); - if (inq->wbus32) fprintf(f, "WBUS32 "); - if (inq->wbus16) fprintf(f, "WBUS16 "); - if (inq->sync) fprintf(f, "SYNC "); - if (inq->linked) fprintf(f, "LINKED "); - if (inq->cmdque) fprintf(f, "CMDQUE "); - if (inq->softreset) fprintf(f, "SOFTRESET "); - fprintf(f, "\n"); - } - if (inq->add_len >= 31 || - inq->vendor_info[0] || - inq->prod_ident[0] || - inq->prod_revision[0]) { - fprintf(f, "Vendor_info : '%.8s'\n", inq->vendor_info); - fprintf(f, "Identifikation : '%.16s'\n", inq->prod_ident); - fprintf(f, "Revision : '%.4s'\n", inq->prod_revision); - } -} - -EXPORT void -printdev(scgp) - SCSI *scgp; -{ - printf("Device seems to be: "); - - switch (scgp->dev) { - - case DEV_UNKNOWN: printf("unknown"); break; - case DEV_ACB40X0: printf("Adaptec 4000/4010/4070"); break; - case DEV_ACB4000: printf("Adaptec 4000"); break; - case DEV_ACB4010: printf("Adaptec 4010"); break; - case DEV_ACB4070: printf("Adaptec 4070"); break; - case DEV_ACB5500: printf("Adaptec 5500"); break; - case DEV_ACB4520A: printf("Adaptec 4520A"); break; - case DEV_ACB4525: printf("Adaptec 4525"); break; - case DEV_MD21: printf("Emulex MD21"); break; - case DEV_MD23: printf("Emulex MD23"); break; - case DEV_NON_CCS_DSK: printf("Generic NON CCS Disk"); break; - case DEV_CCS_GENDISK: printf("Generic CCS Disk"); break; - case DEV_SONY_SMO: printf("Sony SMO-C501"); break; - case DEV_MT02: printf("Emulex MT02"); break; - case DEV_SC4000: printf("Sysgen SC4000"); break; - case DEV_RXT800S: printf("Maxtor RXT800S"); break; - case DEV_HRSCAN: printf("Berthold HR-Scanner"); break; - case DEV_MS300A: printf("Microtek MS300A"); break; - - case DEV_CDROM: printf("Generic CD-ROM"); break; - case DEV_MMC_CDROM: printf("Generic mmc CD-ROM"); break; - case DEV_MMC_CDR: printf("Generic mmc CD-R"); break; - case DEV_MMC_CDRW: printf("Generic mmc CD-RW"); break; - case DEV_MMC_DVD: printf("Generic mmc2 DVD-ROM"); break; - case DEV_MMC_DVD_WR: printf("Generic mmc2 DVD-R/DVD-RW/DVD-RAM"); break; - case DEV_CDD_521_OLD: printf("Philips old CDD-521"); break; - case DEV_CDD_521: printf("Philips CDD-521"); break; - case DEV_CDD_522: printf("Philips CDD-522"); break; - case DEV_PCD_600: printf("Kodak PCD-600"); break; - case DEV_CDD_2000: printf("Philips CDD-2000"); break; - case DEV_CDD_2600: printf("Philips CDD-2600"); break; - case DEV_YAMAHA_CDR_100:printf("Yamaha CDR-100"); break; - case DEV_YAMAHA_CDR_400:printf("Yamaha CDR-400"); break; - case DEV_PLASMON_RF_4100:printf("Plasmon RF-4100"); break; - case DEV_SONY_CDU_924: printf("Sony CDU-924S"); break; - case DEV_RICOH_RO_1060C:printf("Ricoh RO-1060C"); break; - case DEV_RICOH_RO_1420C:printf("Ricoh RO-1420C"); break; - case DEV_TEAC_CD_R50S: printf("Teac CD-R50S"); break; - case DEV_MATSUSHITA_7501:printf("Matsushita CW-7501"); break; - case DEV_MATSUSHITA_7502:printf("Matsushita CW-7502"); break; - - case DEV_PIONEER_DW_S114X: printf("Pioneer DW-S114X"); break; - case DEV_PIONEER_DVDR_S101:printf("Pioneer DVD-R S101"); break; - - default: printf("Missing Entry for dev %d", - scgp->dev); break; - - } - printf(".\n"); - -} - -EXPORT BOOL -do_inquiry(scgp, print) - SCSI *scgp; - int print; -{ - if (getdev(scgp, print)) { - if (print) - printdev(scgp); - return (TRUE); - } else { - return (FALSE); - } -} - -EXPORT BOOL -recovery_needed(scgp, dp) - SCSI *scgp; - cdr_t *dp; -{ - int err; - register struct scg_cmd *scmd = scgp->scmd; - - scgp->silent++; - err = test_unit_ready(scgp); - scgp->silent--; - - if (err >= 0) - return (FALSE); - else if (scmd->error >= SCG_FATAL) /* nicht selektierbar */ - return (FALSE); - - if (scmd->sense.code < 0x70) /* non extended Sense */ - return (FALSE); - - /* XXX Old Philips code */ - return (((struct scsi_ext_sense *)&scmd->sense)->sense_code == 0xD0); -} - -EXPORT int -scsi_load(scgp, dp) - SCSI *scgp; - cdr_t *dp; -{ - int key; - int code; - - if ((dp->cdr_flags & CDR_CADDYLOAD) == 0) { - if (scsi_start_stop_unit(scgp, 1, 1, dp && (dp->cdr_cmdflags&F_IMMED)) >= 0) - return (0); - } - - if (wait_unit_ready(scgp, 60)) - return (0); - - key = scg_sense_key(scgp); - code = scg_sense_code(scgp); - - if (key == SC_NOT_READY && (code == 0x3A || code == 0x30)) { - errmsgno(EX_BAD, "Cannot load media with %s drive!\n", - (dp->cdr_flags & CDR_CADDYLOAD) ? "caddy" : "this"); - errmsgno(EX_BAD, "Try to load media by hand.\n"); - } - return (-1); -} - -EXPORT int -scsi_unload(scgp, dp) - SCSI *scgp; - cdr_t *dp; -{ - return (scsi_start_stop_unit(scgp, 0, 1, dp && (dp->cdr_cmdflags&F_IMMED))); -} - -EXPORT int -scsi_cdr_write(scgp, bp, sectaddr, size, blocks, islast) - SCSI *scgp; - caddr_t bp; /* address of buffer */ - long sectaddr; /* disk address (sector) to put */ - long size; /* number of bytes to transfer */ - int blocks; /* sector count */ - BOOL islast; /* last write for track */ -{ - return (write_xg1(scgp, bp, sectaddr, size, blocks)); -} - -EXPORT struct cd_mode_page_2A * -mmc_cap(scgp, modep) - SCSI *scgp; - Uchar *modep; -{ - int len; - int val; - Uchar mode[0x100]; - struct cd_mode_page_2A *mp; - struct cd_mode_page_2A *mp2; - - -retry: - fillbytes((caddr_t)mode, sizeof (mode), '\0'); - - if (!get_mode_params(scgp, 0x2A, "CD capabilities", - mode, (Uchar *)0, (Uchar *)0, (Uchar *)0, &len)) { - - if (scg_sense_key(scgp) == SC_NOT_READY) { - if (wait_unit_ready(scgp, 60)) - goto retry; - } - return (NULL); /* Pre SCSI-3/mmc drive */ - } - - if (len == 0) /* Pre SCSI-3/mmc drive */ - return (NULL); - - mp = (struct cd_mode_page_2A *) - (mode + sizeof (struct scsi_mode_header) + - ((struct scsi_mode_header *)mode)->blockdesc_len); - - /* - * Do some heuristics against pre SCSI-3/mmc VU page 2A - * We should test for a minimum p_len of 0x14, but some - * buggy CD-ROM readers ommit the write speed values. - */ - if (mp->p_len < 0x10) - return (NULL); - - val = a_to_u_2_byte(mp->max_read_speed); - if (val != 0 && val < 176) - return (NULL); - - val = a_to_u_2_byte(mp->cur_read_speed); - if (val != 0 && val < 176) - return (NULL); - - len -= sizeof (struct scsi_mode_header) + - ((struct scsi_mode_header *)mode)->blockdesc_len; - if (modep) - mp2 = (struct cd_mode_page_2A *)modep; - else - mp2 = malloc(len); - if (mp2) - movebytes(mp, mp2, len); - - return (mp2); -} - -EXPORT void -mmc_getval(mp, cdrrp, cdwrp, cdrrwp, cdwrwp, dvdp, dvdwp) - struct cd_mode_page_2A *mp; - BOOL *cdrrp; /* CD ROM */ - BOOL *cdwrp; /* CD-R writer */ - BOOL *cdrrwp; /* CD-RW reader */ - BOOL *cdwrwp; /* CD-RW writer */ - BOOL *dvdp; /* DVD reader */ - BOOL *dvdwp; /* DVD writer */ -{ - BOOL isdvd; /* Any DVD reader */ - BOOL isdvd_wr; /* DVD writer (R / RAM) */ - BOOL iscd_wr; /* CD writer */ - - iscd_wr = (mp->cd_r_write != 0) || /* SCSI-3/mmc CD-R */ - (mp->cd_rw_write != 0); /* SCSI-3/mmc CD-RW */ - - if (cdrrp) - *cdrrp = (mp->cd_r_read != 0); /* SCSI-3/mmc CD */ - if (cdwrp) - *cdwrp = (mp->cd_r_write != 0); /* SCSI-3/mmc CD-R */ - - if (cdrrwp) - *cdrrwp = (mp->cd_rw_read != 0); /* SCSI-3/mmc CD */ - if (cdwrwp) - *cdwrwp = (mp->cd_rw_write != 0); /* SCSI-3/mmc CD-RW */ - - isdvd = /* SCSI-3/mmc2 DVD */ - (mp->dvd_ram_read + mp->dvd_r_read + - mp->dvd_rom_read) != 0; - - isdvd_wr = /* SCSI-3/mmc2 DVD writer*/ - (mp->dvd_ram_write + mp->dvd_r_write) != 0; - - if (dvdp) - *dvdp = isdvd; - if (dvdwp) - *dvdwp = isdvd_wr; -} - -EXPORT BOOL -is_mmc(scgp, cdwp, dvdwp) - SCSI *scgp; - BOOL *cdwp; /* CD writer */ - BOOL *dvdwp; /* DVD writer */ -{ - BOOL cdwr = FALSE; - BOOL cdwrw = FALSE; - - if (cdwp) - *cdwp = FALSE; - if (dvdwp) - *dvdwp = FALSE; - - if (!mmc_check(scgp, NULL, &cdwr, NULL, &cdwrw, NULL, dvdwp)) - return (FALSE); - - if (cdwp) - *cdwp = cdwr | cdwrw; - - return (TRUE); -} - -EXPORT BOOL -mmc_check(scgp, cdrrp, cdwrp, cdrrwp, cdwrwp, dvdp, dvdwp) - SCSI *scgp; - BOOL *cdrrp; /* CD ROM */ - BOOL *cdwrp; /* CD-R writer */ - BOOL *cdrrwp; /* CD-RW reader */ - BOOL *cdwrwp; /* CD-RW writer */ - BOOL *dvdp; /* DVD reader */ - BOOL *dvdwp; /* DVD writer */ -{ - Uchar mode[0x100]; - BOOL was_atapi; - struct cd_mode_page_2A *mp; - - if (scgp->inq->type != INQ_ROMD) - return (FALSE); - - fillbytes((caddr_t)mode, sizeof (mode), '\0'); - - was_atapi = allow_atapi(scgp, TRUE); - scgp->silent++; - mp = mmc_cap(scgp, mode); - scgp->silent--; - allow_atapi(scgp, was_atapi); - if (mp == NULL) - return (FALSE); - - mmc_getval(mp, cdrrp, cdwrp, cdrrwp, cdwrwp, dvdp, dvdwp); - - return (TRUE); /* Generic SCSI-3/mmc CD */ -} - -LOCAL void -print_speed(fmt, val) - char *fmt; - int val; -{ - printf(" %s: %5d kB/s", fmt, val); - printf(" (CD %3ux,", val/176); - printf(" DVD %2ux,", val/1385); - printf(" BD %2ux)\n", val/4495); -} - -#define DOES(what, flag) printf(" Does %s%s\n", flag?"":"not ", what) -#define IS(what, flag) printf(" Is %s%s\n", flag?"":"not ", what) -#define VAL(what, val) printf(" %s: %d\n", what, val[0]*256 + val[1]) -#define SVAL(what, val) printf(" %s: %s\n", what, val) - -EXPORT void -print_capabilities(scgp) - SCSI *scgp; -{ - BOOL was_atapi; - Uchar mode[0x100]; - struct cd_mode_page_2A *mp; -static const char *bclk[4] = {"32", "16", "24", "24 (I2S)"}; -static const char *load[8] = {"caddy", "tray", "pop-up", "reserved(3)", - "disc changer", "cartridge changer", - "reserved(6)", "reserved(7)" }; -static const char *rotctl[4] = {"CLV/PCAV", "CAV", "reserved(2)", "reserved(3)"}; - - - if (scgp->inq->type != INQ_ROMD) - return; - - fillbytes((caddr_t)mode, sizeof (mode), '\0'); - - was_atapi = allow_atapi(scgp, TRUE); /* Try to switch to 10 byte mode cmds */ - scgp->silent++; - mp = mmc_cap(scgp, mode); - scgp->silent--; - allow_atapi(scgp, was_atapi); - if (mp == NULL) - return; - - printf("\nDrive capabilities, per"); - if (mp->p_len >= 28) - printf(" MMC-3"); - else if (mp->p_len >= 24) - printf(" MMC-2"); - else - printf(" MMC"); - printf(" page 2A:\n\n"); - - DOES("read CD-R media", mp->cd_r_read); - DOES("write CD-R media", mp->cd_r_write); - DOES("read CD-RW media", mp->cd_rw_read); - DOES("write CD-RW media", mp->cd_rw_write); - DOES("read DVD-ROM media", mp->dvd_rom_read); - DOES("read DVD-R media", mp->dvd_r_read); - DOES("write DVD-R media", mp->dvd_r_write); - DOES("read DVD-RAM media", mp->dvd_ram_read); - DOES("write DVD-RAM media", mp->dvd_ram_write); - DOES("support test writing", mp->test_write); - printf("\n"); - DOES("read Mode 2 Form 1 blocks", mp->mode_2_form_1); - DOES("read Mode 2 Form 2 blocks", mp->mode_2_form_2); - DOES("read digital audio blocks", mp->cd_da_supported); - if (mp->cd_da_supported) - DOES("restart non-streamed digital audio reads accurately", mp->cd_da_accurate); - DOES("support Buffer-Underrun-Free recording", mp->BUF); - DOES("read multi-session CDs", mp->multi_session); - DOES("read fixed-packet CD media using Method 2", mp->method2); - DOES("read CD bar code", mp->read_bar_code); - DOES("read R-W subcode information", mp->rw_supported); - if (mp->rw_supported) - DOES("return R-W subcode de-interleaved and error-corrected", mp->rw_deint_corr); - DOES("read raw P-W subcode data from lead in", mp->pw_in_lead_in); - DOES("return CD media catalog number", mp->UPC); - DOES("return CD ISRC information", mp->ISRC); - DOES("support C2 error pointers", mp->c2_pointers); - DOES("deliver composite A/V data", mp->composite); - printf("\n"); - DOES("play audio CDs", mp->audio_play); - if (mp->audio_play) { - VAL("Number of volume control levels", mp->num_vol_levels); - DOES("support individual volume control setting for each channel", mp->sep_chan_vol); - DOES("support independent mute setting for each channel", mp->sep_chan_mute); - DOES("support digital output on port 1", mp->digital_port_1); - DOES("support digital output on port 2", mp->digital_port_2); - if (mp->digital_port_1 || mp->digital_port_2) { - DOES("send digital data LSB-first", mp->LSBF); - DOES("set LRCK high for left-channel data", mp->RCK); - DOES("have valid data on falling edge of clock", mp->BCK); - SVAL("Length of data in BCLKs", bclk[mp->length]); - } - } - printf("\n"); - SVAL("Loading mechanism type", load[mp->loading_type]); - DOES("support ejection of CD via START/STOP command", mp->eject); - DOES("lock media on power up via prevent jumper", mp->prevent_jumper); - DOES("allow media to be locked in the drive via PREVENT/ALLOW command", mp->lock); - IS("currently in a media-locked state", mp->lock_state); - DOES("support changing side of disk", mp->side_change); - DOES("have load-empty-slot-in-changer feature", mp->sw_slot_sel); - DOES("support Individual Disk Present feature", mp->disk_present_rep); - printf("\n"); - print_speed("Maximum read speed", a_to_u_2_byte(mp->max_read_speed)); - print_speed("Current read speed", a_to_u_2_byte(mp->cur_read_speed)); - print_speed("Maximum write speed", a_to_u_2_byte(mp->max_write_speed)); - if (mp->p_len >= 28) - print_speed("Current write speed", a_to_u_2_byte(mp->v3_cur_write_speed)); - else - print_speed("Current write speed", a_to_u_2_byte(mp->cur_write_speed)); - if (mp->p_len >= 28) { - SVAL("Rotational control selected", rotctl[mp->rot_ctl_sel]); - } - VAL("Buffer size in KB", mp->buffer_size); - - if (mp->p_len >= 24) { - VAL("Copy management revision supported", mp->copy_man_rev); - } - - if (mp->p_len >= 28) { - struct cd_wr_speed_performance *pp; - Uint ndesc; - Uint i; - Uint n; - - ndesc = a_to_u_2_byte(mp->num_wr_speed_des); - pp = mp->wr_speed_des; - printf(" Number of supported write speeds: %d\n", ndesc); - for (i = 0; i < ndesc; i++, pp++) { - printf(" Write speed # %d:", i); - n = a_to_u_2_byte(pp->wr_speed_supp); - printf(" %5d kB/s", n); - printf(" %s", rotctl[pp->rot_ctl_sel]); - printf(" (CD %3ux,", n/176); - printf(" DVD %2ux,", n/1385); - printf(" BD %2ux)\n", n/4495); - } - } - - /* Generic SCSI-3/mmc CD */ -} - -EXPORT int -verify(scgp, start, count, bad_block) - SCSI *scgp; - long start; - int count; - long *bad_block; -{ - register struct scg_cmd *scmd = scgp->scmd; - - fillbytes((caddr_t)scmd, sizeof (*scmd), '\0'); - scmd->addr = (caddr_t)0; - scmd->size = 0; - scmd->flags = SCG_DISRE_ENA; - scmd->cdb_len = SC_G1_CDBLEN; - scmd->sense_len = CCS_SENSE_LEN; - scmd->cdb.g1_cdb.cmd = 0x2F; /* Verify */ - scmd->cdb.g1_cdb.lun = scg_lun(scgp); - g1_cdbaddr(&scmd->cdb.g1_cdb, start); - g1_cdblen(&scmd->cdb.g1_cdb, count); - - scgp->cmdname = "verify"; - - if (scg_cmd(scgp) < 0) { - if (scmd->sense.code >= 0x70) { /* extended Sense */ - *bad_block = - a_to_4_byte(&((struct scsi_ext_sense *) - &scmd->sense)->info_1); - } else { - *bad_block = a_to_u_3_byte(&scmd->sense.high_addr); - } - return (-1); - } - return (0); -} diff -Nru cdrtools-2.01.01a33/scgcheck/scsi_scan.c cdrtools-3.02a09/scgcheck/scsi_scan.c --- cdrtools-2.01.01a33/scgcheck/scsi_scan.c 2007-07-12 07:04:53.000000000 +0000 +++ cdrtools-3.02a09/scgcheck/scsi_scan.c 1970-01-01 00:00:00.000000000 +0000 @@ -1,270 +0,0 @@ -/* @(#)scsi_scan.c 1.30 07/07/12 Copyright 1997-2007 J. Schilling */ -#ifndef lint -static char sccsid[] = - "@(#)scsi_scan.c 1.30 07/07/12 Copyright 1997-2007 J. Schilling"; -#endif -/* - * Scan SCSI Bus. - * Stolen from sformat. Need a more general form to - * re-use it in sformat too. - * - * Copyright (c) 1997-2007 J. Schilling - */ -/* - * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. - * - * See the file CDDL.Schily.txt in this distribution for details. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file CDDL.Schily.txt from this distribution. - */ - -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include - -#include "scsi_scan.h" -#include "cdrecord.h" - -LOCAL void print_product __PR((FILE *f, struct scsi_inquiry *ip)); -EXPORT int select_target __PR((SCSI *scgp, FILE *f)); -EXPORT int find_target __PR((SCSI *scgp, int type, int idx)); -LOCAL int _select_target __PR((SCSI *scgp, FILE *f, int type, int idx)); -LOCAL int select_unit __PR((SCSI *scgp, FILE *f)); - -LOCAL void -print_product(f, ip) - FILE *f; - struct scsi_inquiry *ip; -{ - fprintf(f, "'%.8s' ", ip->vendor_info); - fprintf(f, "'%.16s' ", ip->prod_ident); - fprintf(f, "'%.4s' ", ip->prod_revision); - if (ip->add_len < 31) { - fprintf(f, "NON CCS "); - } - scg_fprintdev(f, ip); -} - -EXPORT int -select_target(scgp, f) - SCSI *scgp; - FILE *f; -{ - return (_select_target(scgp, f, -1, -1)); -} - -EXPORT int -find_target(scgp, type, idx) - SCSI *scgp; - int type; - int idx; -{ - return (_select_target(scgp, (FILE *)NULL, type, idx)); -} - -LOCAL int -_select_target(scgp, f, type, idx) - SCSI *scgp; - FILE *f; - int type; - int idx; -{ - int initiator; - int cscsibus = scg_scsibus(scgp); - int ctarget = scg_target(scgp); - int clun = scg_lun(scgp); - int numbus = scg_numbus(scgp); - int n; - int low = -1; - int high = -1; - int amt = -1; - int bus; - int tgt; - int lun = 0; - int err; - BOOL have_tgt; - - if (numbus < 0) - numbus = 1024; - scgp->silent++; - - for (bus = 0; bus < numbus; bus++) { - scg_settarget(scgp, bus, 0, 0); - - if (!scg_havebus(scgp, bus)) - continue; - - initiator = scg_initiator_id(scgp); - if (f) - fprintf(f, "scsibus%d:\n", bus); - - for (tgt = 0; tgt < 16; tgt++) { - n = bus*100 + tgt; - - scg_settarget(scgp, bus, tgt, lun); - seterrno(0); - have_tgt = unit_ready(scgp) || scgp->scmd->error != SCG_FATAL; - err = geterrno(); - if (err == EPERM || err == EACCES) - return (-1); - - if (!have_tgt && tgt > 7) { - if (scgp->scmd->ux_errno == EINVAL) - break; - continue; - } - if (f) { -#ifdef FMT - if (print_disknames(bus, tgt, -1) < 8) - fprintf(f, "\t"); - else - fprintf(f, " "); -#else - fprintf(f, "\t"); -#endif - if (fprintf(f, "%d,%d,%d", bus, tgt, lun) < 8) - fprintf(f, "\t"); - else - fprintf(f, " "); - fprintf(f, "%3d) ", n); - } - if (tgt == initiator) { - if (f) - fprintf(f, "HOST ADAPTOR\n"); - continue; - } - if (!have_tgt) { - /* - * Hack: fd -> -2 means no access - */ - if (f) { - fprintf(f, "%c\n", - scgp->fd == -2 ? '?':'*'); - } - continue; - } - if (low < 0) - low = n; - high = n; - - getdev(scgp, FALSE); - if (f) - print_product(f, scgp->inq); - if (type >= 0 && scgp->inq->type == type) { - amt++; - if (amt == 0) /* amt starts at -1 */ - amt++; - if (amt == idx) { - scgp->silent--; - return (amt); - } - } else if (type < 0) { - amt++; - } - if (amt == 0) /* amt starts at -1 */ - amt++; - } - } - scgp->silent--; - - if (low < 0) { - errmsgno(EX_BAD, "No target found.\n"); - return (0); - } - n = -1; -#ifdef FMT - getint("Select target", &n, low, high); - bus = n/100; - tgt = n%100; - scg_settarget(scgp, bus, tgt, lun); - return (select_unit(scgp)); - -#endif - scg_settarget(scgp, cscsibus, ctarget, clun); - return (amt); -} - -LOCAL int -select_unit(scgp, f) - SCSI *scgp; - FILE *f; -{ - int initiator; - int clun = scg_lun(scgp); - int low = -1; - int high = -1; - int lun; - - scgp->silent++; - - fprintf(f, "scsibus%d target %d:\n", scg_scsibus(scgp), scg_target(scgp)); - - initiator = scg_initiator_id(scgp); - for (lun = 0; lun < 8; lun++) { - -#ifdef FMT - if (print_disknames(scg_scsibus(scgp), scg_target(scgp), lun) < 8) - fprintf(f, "\t"); - else - fprintf(f, " "); -#else - fprintf(f, "\t"); -#endif - if (fprintf(f, "%d,%d,%d", scg_scsibus(scgp), scg_target(scgp), lun) < 8) - fprintf(f, "\t"); - else - fprintf(f, " "); - fprintf(f, "%3d) ", lun); - if (scg_target(scgp) == initiator) { - fprintf(f, "HOST ADAPTOR\n"); - continue; - } - scg_settarget(scgp, scg_scsibus(scgp), scg_target(scgp), lun); - if (!unit_ready(scgp) && scgp->scmd->error == SCG_FATAL) { - fprintf(f, "*\n"); - continue; - } - if (unit_ready(scgp)) { - /* non extended sense illegal lun */ - if (scgp->scmd->sense.code == 0x25) { - fprintf(f, "BAD UNIT\n"); - continue; - } - } - if (low < 0) - low = lun; - high = lun; - - getdev(scgp, FALSE); - print_product(f, scgp->inq); - } - scgp->silent--; - - if (low < 0) { - errmsgno(EX_BAD, "No lun found.\n"); - return (0); - } - lun = -1; -#ifdef FMT - getint("Select lun", &lun, low, high); - scg_settarget(scgp, scg_scsibus(scgp), scg_target(scgp), lun); - format_one(scgp); - return (1); -#endif - - scg_settarget(scgp, scg_scsibus(scgp), scg_target(scgp), clun); - return (1); -} diff -Nru cdrtools-2.01.01a33/scgcheck/sense.c cdrtools-3.02a09/scgcheck/sense.c --- cdrtools-2.01.01a33/scgcheck/sense.c 2006-09-13 15:51:47.000000000 +0000 +++ cdrtools-3.02a09/scgcheck/sense.c 2010-12-19 17:14:55.000000000 +0000 @@ -1,10 +1,11 @@ -/* @(#)sense.c 1.5 06/09/13 Copyright 2001 J. Schilling */ +/* @(#)sense.c 1.11 10/12/19 Copyright 2001-2010 J. Schilling */ +#include #ifndef lint -static char sccsid[] = - "@(#)sense.c 1.5 06/09/13 Copyright 2001 J. Schilling"; +static UConst char sccsid[] = + "@(#)sense.c 1.11 10/12/19 Copyright 2001-2010 J. Schilling"; #endif /* - * Copyright (c) 2001 J. Schilling + * Copyright (c) 2001-2010 J. Schilling */ /* * The contents of this file are subject to the terms of the @@ -18,12 +19,12 @@ * file and include the License file CDDL.Schily.txt from this distribution. */ -#include -#include +#include #include #include #include #include +#include #include #include @@ -58,119 +59,141 @@ int ret; int sense_count = 0; BOOL passed = TRUE; + BOOL needload = FALSE; - printf("Ready to start test for failing command? Enter to continue: "); - fprintf(logfile, "**********> Testing for failed SCSI command.\n"); - flushit(); - (void)getline(abuf, sizeof(abuf)); + printf(_("Ready to start test for failing command? Enter to continue: ")); + (void) chkgetline(abuf, sizeof (abuf)); + chkprint(_("**********> Testing for failed SCSI command.\n")); /* scgp->verbose++;*/ - fillbytes(buf, sizeof(struct scsi_inquiry), '\0'); - fillbytes((caddr_t)scgp->scmd, sizeof(*scgp->scmd), '\0'); - ret = badinquiry(scgp, buf, sizeof(struct scsi_inquiry), CCS_SENSE_LEN); + fillbytes(buf, sizeof (struct scsi_inquiry), '\0'); + fillbytes((caddr_t)scgp->scmd, sizeof (*scgp->scmd), '\0'); + ret = badinquiry(scgp, buf, sizeof (struct scsi_inquiry), CCS_SENSE_LEN); scg_vsetup(scgp); scg_errfflush(scgp, logfile); if (ret >= 0 || !scg_cmd_err(scgp)) { inq_nofail = TRUE; - printf("Inquiry did not fail.\n"); - fprintf(logfile, "Inquiry did not fail.\n"); - printf("This may be because the firmware in your drive is buggy.\n"); - printf("If the current drive is not a CD-ROM drive please restart\n"); - printf("the test utility. Otherwise remove any medium from the drive.\n"); - printf("Ready to start test for failing command? Enter to continue: "); - flushit(); - (void)getline(abuf, sizeof(abuf)); + chkprint(_("Inquiry did not fail.\n")); + printf(_("This may be because the firmware in your drive is buggy.\n")); + printf(_("If the current drive is not a CD-ROM drive please restart\n")); + printf(_("the test utility. Otherwise remove any medium from the drive.\n")); + + printf(_("Ready to start test for failing command? Enter to continue: ")); + (void) chkgetline(abuf, sizeof (abuf)); ret = test_unit_ready(scgp); + scg_vsetup(scgp); + scg_errfflush(scgp, logfile); + +#ifdef XXX +/* + * Another try to let the command fail with "illegal field in cdb" + */ +if (0) { + register struct scg_cmd *scmd = scgp->scmd; + + fillbytes((caddr_t)scmd, sizeof (*scmd), '\0'); + scmd->addr = (caddr_t)scgp->cap; + scmd->size = sizeof (struct scsi_capacity); + scmd->flags = SCG_RECV_DATA|SCG_DISRE_ENA; + scmd->cdb_len = SC_G1_CDBLEN; + scmd->sense_len = CCS_SENSE_LEN; + scmd->cdb.g1_cdb.cmd = 0x25; /* Read Capacity */ + scmd->cdb.g1_cdb.lun = scg_lun(scgp); + g1_cdblen(&scmd->cdb.g1_cdb, 0); /* Full Media */ + +scmd->cdb.cmd_cdb[2] = 0xFF; +scmd->cdb.cmd_cdb[9] = 0xFF; + + scgp->cmdname = "read capacity"; + + if (scg_cmd(scgp) < 0) + ; + +} +#endif + + if (ret >= 0 || !scg_cmd_err(scgp)) { - printf("Test Unit Ready did not fail.\n"); - printf("Ready to eject tray? Enter to continue: "); + printf(_("Test Unit Ready did not fail.\n")); + + printf(_("Ready to eject tray? Enter to continue: ")); flushit(); - (void)getline(abuf, sizeof(abuf)); - scsi_unload(scgp, (cdr_t *)0); - ret = test_unit_ready(scgp); + (void) getline(abuf, sizeof (abuf)); + if (abuf[0] != 'n') { + scsi_unload(scgp, (cdr_t *)0); + needload = TRUE; + ret = test_unit_ready(scgp); + scg_vsetup(scgp); + scg_errfflush(scgp, logfile); + } } } +#ifdef nonono +fprintf(logfile, "XXX\n"); scg_vsetup(scgp); scg_errfflush(scgp, logfile); +#endif /* scgp->verbose--;*/ if (ret < 0 && scgp->scmd->error == SCG_NO_ERROR && scgp->scmd->ux_errno != 0 && *(Uchar *)&scgp->scmd->scb != 0) { - printf("----------> SCSI failed command test PASSED\n"); - fprintf(logfile, "----------> SCSI failed command test PASSED\n"); + chkprint(_("----------> SCSI failed command test PASSED\n")); } else { if (ret >= 0) { - printf("----------> scg_cmd() returns not -1 (%d)\n", ret); - fprintf(logfile, "----------> scg_cmd() returns not -1 (%d)\n", ret); + chkprint(_("----------> scg_cmd() returns not -1 (%d)\n"), ret); } if (scgp->scmd->error != SCG_NO_ERROR) { - printf("----------> SCSI Transport return != SCG_NO_ERROR (%d)\n", scgp->scmd->error); - fprintf(logfile, "----------> SCSI Transport return != SCG_NO_ERROR (%d)\n", scgp->scmd->error); + chkprint(_("----------> SCSI Transport return != SCG_NO_ERROR (%d)\n"), scgp->scmd->error); } if (scgp->scmd->ux_errno == 0) { - printf("----------> UNIX errno set to 0\n"); - fprintf(logfile, "----------> UNIX errno set to 0\n"); + chkprint(_("----------> UNIX errno set to 0\n")); } if (*(Uchar *)&scgp->scmd->scb == 0) { - printf("----------> SCSI status byte set to 0 (0x%x)\n", *(Uchar *)&scgp->scmd->scb & 0xFF); - fprintf(logfile, "----------> SCSI status byte set to 0 (0x%x)\n", *(Uchar *)&scgp->scmd->scb & 0xFF); + chkprint(_("----------> SCSI status byte set to 0 (0x%x)\n"), *(Uchar *)&scgp->scmd->scb & 0xFF); } - printf("----------> SCSI failed command test FAILED\n"); - fprintf(logfile, "----------> SCSI failed command test FAILED\n"); + chkprint(_("----------> SCSI failed command test FAILED\n")); } + if (needload) + scsi_start_stop_unit(scgp, 1, 1, 0); - - printf("Ready to start test for sense data count? Enter to continue: "); - fprintf(logfile, "**********> Testing for SCSI sense data count.\n"); - flushit(); - (void)getline(abuf, sizeof(abuf)); - printf("Testing if at least CCS_SENSE_LEN (%d) is supported...\n", CCS_SENSE_LEN); - fprintf(logfile, "**********> Testing if at least CCS_SENSE_LEN (%d) is supported...\n", CCS_SENSE_LEN); + printf(_("Ready to start test for sense data count? Enter to continue: ")); + (void) chkgetline(abuf, sizeof (abuf)); + chkprint(_("**********> Testing for SCSI sense data count.\n")); + chkprint(_("**********> Testing if at least CCS_SENSE_LEN (%d) is supported...\n"), CCS_SENSE_LEN); ret = sensecount(scgp, CCS_SENSE_LEN); if (ret > sense_count) sense_count = ret; if (ret == CCS_SENSE_LEN) { - printf("----------> Wanted %d sense bytes, got it.\n", CCS_SENSE_LEN); - fprintf(logfile, "----------> Wanted %d sense bytes, got it.\n", CCS_SENSE_LEN); + chkprint(_("----------> Wanted %d sense bytes, got it.\n"), CCS_SENSE_LEN); } if (ret != CCS_SENSE_LEN) { - printf("----------> Minimum standard (CCS) sense length failed\n"); - printf("----------> Wanted %d sense bytes, got (%d)\n", CCS_SENSE_LEN, ret); - fprintf(logfile, "----------> Minimum standard (CCS) sense length failed\n"); - fprintf(logfile, "----------> Wanted %d sense bytes, got (%d)\n", CCS_SENSE_LEN, ret); + chkprint(_("----------> Minimum standard (CCS) sense length failed\n")); + chkprint(_("----------> Wanted %d sense bytes, got (%d)\n"), CCS_SENSE_LEN, ret); } if (ret != scgp->scmd->sense_count) { passed = FALSE; - printf("----------> Libscg says %d sense bytes but got (%d)\n", scgp->scmd->sense_count, ret); - fprintf(logfile, "----------> Libscg says %d sense bytes but got (%d)\n", scgp->scmd->sense_count, ret); + chkprint(_("----------> Libscg says %d sense bytes but got (%d)\n"), scgp->scmd->sense_count, ret); } - printf("Testing for %d bytes of sense data...\n", SCG_MAX_SENSE); - fprintf(logfile, "**********> Testing for %d bytes of sense data...\n", SCG_MAX_SENSE); + chkprint(_("**********> Testing for %d bytes of sense data...\n"), SCG_MAX_SENSE); ret = sensecount(scgp, SCG_MAX_SENSE); if (ret > sense_count) sense_count = ret; if (ret == SCG_MAX_SENSE) { - printf("----------> Wanted %d sense bytes, got it.\n", SCG_MAX_SENSE); - fprintf(logfile, "----------> Wanted %d sense bytes, got it.\n", SCG_MAX_SENSE); + chkprint(_("----------> Wanted %d sense bytes, got it.\n"), SCG_MAX_SENSE); } if (ret != SCG_MAX_SENSE) { - printf("----------> Wanted %d sense bytes, got (%d)\n", SCG_MAX_SENSE, ret); - fprintf(logfile, "----------> Wanted %d sense bytes, got (%d)\n", SCG_MAX_SENSE, ret); + chkprint(_("----------> Wanted %d sense bytes, got (%d)\n"), SCG_MAX_SENSE, ret); } if (ret != scgp->scmd->sense_count) { passed = FALSE; - printf("----------> Libscg says %d sense bytes but got (%d)\n", scgp->scmd->sense_count, ret); - fprintf(logfile, "----------> Libscg says %d sense bytes but got (%d)\n", scgp->scmd->sense_count, ret); + chkprint(_("----------> Libscg says %d sense bytes but got (%d)\n"), scgp->scmd->sense_count, ret); } - printf("----------> Got a maximum of %d sense bytes\n", sense_count); - fprintf(logfile, "----------> Got a maximum of %d sense bytes\n", sense_count); + chkprint(_("----------> Got a maximum of %d sense bytes\n"), sense_count); if (passed && sense_count >= CCS_SENSE_LEN) { - printf("----------> SCSI sense count test PASSED\n"); - fprintf(logfile, "----------> SCSI sense count test PASSED\n"); + chkprint(_("----------> SCSI sense count test PASSED\n")); } else { - printf("----------> SCSI sense count test FAILED\n"); - fprintf(logfile, "----------> SCSI sense count test FAILED\n"); + chkprint(_("----------> SCSI sense count test FAILED\n")); } } @@ -185,39 +208,39 @@ if (sensecnt > SCG_MAX_SENSE) sensecnt = SCG_MAX_SENSE; - + /* scgp->verbose++;*/ scgp->silent++; - fillbytes(buf, sizeof(struct scsi_inquiry), '\0'); - fillbytes((caddr_t)scgp->scmd, sizeof(*scgp->scmd), '\0'); + fillbytes(buf, sizeof (struct scsi_inquiry), '\0'); + fillbytes((caddr_t)scgp->scmd, sizeof (*scgp->scmd), '\0'); fillbytes((caddr_t)scgp->scmd->u_sense.cmd_sense, sensecnt, 0x00); if (inq_nofail) bad_unit_ready(scgp, sensecnt); else - badinquiry(scgp, buf, sizeof(struct scsi_inquiry), sensecnt); - scg_fprbytes(stdout, "Sense Data:", (Uchar *)scgp->scmd->u_sense.cmd_sense, sensecnt); - scg_fprbytes(logfile, "Sense Data:", (Uchar *)scgp->scmd->u_sense.cmd_sense, sensecnt); + badinquiry(scgp, buf, sizeof (struct scsi_inquiry), sensecnt); + scg_fprbytes(stdout, _("Sense Data:"), (Uchar *)scgp->scmd->u_sense.cmd_sense, sensecnt); + scg_fprbytes(logfile, _("Sense Data:"), (Uchar *)scgp->scmd->u_sense.cmd_sense, sensecnt); p = (Uchar *)scgp->scmd->u_sense.cmd_sense; - for (i=sensecnt-1; i >= 0; i--) { + for (i = sensecnt-1; i >= 0; i--) { if (p[i] != 0x00) { break; } } i++; maxcnt = i; -printf("----------> Method 0x00: expected: %d reported: %d max found: %d\n", sensecnt, scgp->scmd->sense_count, maxcnt); +chkprint(_("----------> Method 0x00: expected: %d reported: %d max found: %d\n"), sensecnt, scgp->scmd->sense_count, maxcnt); - fillbytes(buf, sizeof(struct scsi_inquiry), '\0'); - fillbytes((caddr_t)scgp->scmd, sizeof(*scgp->scmd), '\0'); + fillbytes(buf, sizeof (struct scsi_inquiry), '\0'); + fillbytes((caddr_t)scgp->scmd, sizeof (*scgp->scmd), '\0'); fillbytes((caddr_t)scgp->scmd->u_sense.cmd_sense, sensecnt, 0xFF); if (inq_nofail) bad_unit_ready(scgp, sensecnt); else - badinquiry(scgp, buf, sizeof(struct scsi_inquiry), sensecnt); - scg_fprbytes(stdout, "Sense Data:", (Uchar *)scgp->scmd->u_sense.cmd_sense, sensecnt); - scg_fprbytes(logfile, "Sense Data:", (Uchar *)scgp->scmd->u_sense.cmd_sense, sensecnt); + badinquiry(scgp, buf, sizeof (struct scsi_inquiry), sensecnt); + scg_fprbytes(stdout, _("Sense Data:"), (Uchar *)scgp->scmd->u_sense.cmd_sense, sensecnt); + scg_fprbytes(logfile, _("Sense Data:"), (Uchar *)scgp->scmd->u_sense.cmd_sense, sensecnt); p = (Uchar *)scgp->scmd->u_sense.cmd_sense; - for (i=sensecnt-1; i >= 0; i--) { + for (i = sensecnt-1; i >= 0; i--) { if (p[i] != 0xFF) { break; } @@ -225,7 +248,7 @@ i++; if (i > maxcnt) maxcnt = i; -printf("----------> Method 0xFF: expected: %d reported: %d max found: %d\n", sensecnt, scgp->scmd->sense_count, i); +chkprint(_("----------> Method 0xFF: expected: %d reported: %d max found: %d\n"), sensecnt, scgp->scmd->sense_count, i); /* scgp->verbose--;*/ scgp->silent--; @@ -245,7 +268,7 @@ register struct scg_cmd *scmd = scgp->scmd; /* fillbytes(bp, cnt, '\0');*/ -/* fillbytes((caddr_t)scmd, sizeof(*scmd), '\0');*/ +/* fillbytes((caddr_t)scmd, sizeof (*scmd), '\0');*/ scmd->addr = bp; scmd->size = cnt; scmd->flags = SCG_RECV_DATA|SCG_DISRE_ENA; @@ -257,13 +280,13 @@ scmd->cdb.g0_cdb.count = cnt; scmd->cdb.cmd_cdb[3] = 0xFF; - + scgp->cmdname = "inquiry"; if (scg_cmd(scgp) < 0) return (-1); if (scgp->verbose) - scg_prbytes("Inquiry Data :", (Uchar *)bp, cnt - scg_getresid(scgp)); + scg_prbytes(_("Inquiry Data :"), (Uchar *)bp, cnt - scg_getresid(scgp)); return (0); } @@ -274,7 +297,7 @@ { register struct scg_cmd *scmd = scgp->scmd; -/* fillbytes((caddr_t)scmd, sizeof(*scmd), '\0');*/ +/* fillbytes((caddr_t)scmd, sizeof (*scmd), '\0');*/ scmd->addr = (caddr_t)0; scmd->size = 0; scmd->flags = SCG_DISRE_ENA | (scgp->silent ? SCG_SILENT:0); @@ -282,7 +305,7 @@ scmd->sense_len = sensecnt; scmd->cdb.g0_cdb.cmd = SC_TEST_UNIT_READY; scmd->cdb.g0_cdb.lun = scg_lun(scgp); - + scgp->cmdname = "test unit ready"; return (scg_cmd(scgp)); diff -Nru cdrtools-2.01.01a33/scgskeleton/cd_misc.c cdrtools-3.02a09/scgskeleton/cd_misc.c --- cdrtools-2.01.01a33/scgskeleton/cd_misc.c 2006-10-05 19:07:47.000000000 +0000 +++ cdrtools-3.02a09/scgskeleton/cd_misc.c 1970-01-01 00:00:00.000000000 +0000 @@ -1,189 +0,0 @@ -/* @(#)cd_misc.c 1.14 06/10/05 Copyright 1997-2006 J. Schilling */ -#ifndef lint -static char sccsid[] = - "@(#)cd_misc.c 1.14 06/10/05 Copyright 1997-2006 J. Schilling"; -#endif -/* - * Misc CD support routines - * - * Copyright (c) 1997-2006 J. Schilling - */ -/* - * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. - * - * See the file CDDL.Schily.txt in this distribution for details. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file CDDL.Schily.txt from this distribution. - */ - -#include -#include -#include /* Includes for caddr_t */ -#include -#include - -#include "cdrecord.h" - -EXPORT int from_bcd __PR((int b)); -EXPORT int to_bcd __PR((int i)); -EXPORT long msf_to_lba __PR((int m, int s, int f, BOOL force_positive)); -EXPORT BOOL lba_to_msf __PR((long lba, msf_t *mp)); -EXPORT void sec_to_msf __PR((long sec, msf_t *mp)); -EXPORT void print_min_atip __PR((long li, long lo)); -EXPORT BOOL is_cdspeed __PR((int speed)); - -EXPORT int -from_bcd(b) - int b; -{ - return ((b & 0x0F) + 10 * (((b)>> 4) & 0x0F)); -} - -EXPORT int -to_bcd(i) - int i; -{ - return (i % 10 | ((i / 10) % 10) << 4); -} - -EXPORT long -msf_to_lba(m, s, f, force_positive) - int m; - int s; - int f; - BOOL force_positive; -{ - long ret = m * 60 + s; - - ret *= 75; - ret += f; - if (m < 90 || force_positive) - ret -= 150; - else - ret -= 450150; - return (ret); -} - -EXPORT BOOL -lba_to_msf(lba, mp) - long lba; - msf_t *mp; -{ - int m; - int s; - int f; - -#ifdef __follow_redbook__ - if (lba >= -150 && lba < 405000) { /* lba <= 404849 */ -#else - if (lba >= -150) { -#endif - m = (lba + 150) / 60 / 75; - s = (lba + 150 - m*60*75) / 75; - f = (lba + 150 - m*60*75 - s*75); - - } else if (lba >= -45150 && lba <= -151) { - m = (lba + 450150) / 60 / 75; - s = (lba + 450150 - m*60*75) / 75; - f = (lba + 450150 - m*60*75 - s*75); - - } else { - mp->msf_min = -1; - mp->msf_sec = -1; - mp->msf_frame = -1; - - return (FALSE); - } - mp->msf_min = m; - mp->msf_sec = s; - mp->msf_frame = f; - - if (lba > 404849) /* 404850 -> 404999: lead out */ - return (FALSE); - return (TRUE); -} - -EXPORT void -sec_to_msf(sec, mp) - long sec; - msf_t *mp; -{ - int m; - int s; - int f; - - m = (sec) / 60 / 75; - s = (sec - m*60*75) / 75; - f = (sec - m*60*75 - s*75); - - mp->msf_min = m; - mp->msf_sec = s; - mp->msf_frame = f; -} - -EXPORT void -print_min_atip(li, lo) - long li; - long lo; -{ - msf_t msf; - - if (li < 0) { - lba_to_msf(li, &msf); - - printf(" ATIP start of lead in: %ld (%02d:%02d/%02d)\n", - li, msf.msf_min, msf.msf_sec, msf.msf_frame); - } - if (lo > 0) { - lba_to_msf(lo, &msf); - printf(" ATIP start of lead out: %ld (%02d:%02d/%02d)\n", - lo, msf.msf_min, msf.msf_sec, msf.msf_frame); - } -} - -/* - * Make a probability guess whether the speed is related to CD or DVD speed. - */ -EXPORT BOOL -is_cdspeed(speed) - int speed; -{ - int cdspeed; - long cdrest; - int dvdspeed; - long dvdrest; - - cdspeed = speed / 176; - cdrest = cdspeed * 1764; - cdrest = speed * 10 - cdrest; - if (cdrest < 0) - cdrest *= -1; - if (cdrest > 1764/2) - cdrest = 1764 - cdrest; - - /* - * 3324 = 1382 * 2.4 - * speed > 0.9 * 3324 && speed < 1.1 * 3324 - */ - if (speed >= 2990 && speed <= 3656) { - dvdrest = 33240; - dvdrest = speed * 10 - dvdrest; - } else { - dvdspeed = speed / 1385; - dvdrest = dvdspeed * 13850; - dvdrest = speed * 10 - dvdrest; - } - if (dvdrest < 0) - dvdrest *= -1; - if (dvdrest > 13850/2) - dvdrest = 13850 - dvdrest; - - /* - * 1385 / 176.4 = 7.85, so we need to multiply the CD rest by 7.85 - */ - return (dvdrest > (cdrest*8 - cdrest/6)); -} diff -Nru cdrtools-2.01.01a33/scgskeleton/cdrecord.h cdrtools-3.02a09/scgskeleton/cdrecord.h --- cdrtools-2.01.01a33/scgskeleton/cdrecord.h 2007-08-09 22:10:00.000000000 +0000 +++ cdrtools-3.02a09/scgskeleton/cdrecord.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,1206 +0,0 @@ -/* @(#)cdrecord.h 1.194 07/08/10 Copyright 1995-2007 J. Schilling */ -/* - * Definitions for cdrecord - * - * Copyright (c) 1995-2007 J. Schilling - */ -/* - * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. - * - * See the file CDDL.Schily.txt in this distribution for details. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file CDDL.Schily.txt from this distribution. - */ - -/* - * Make sure it is there. We need it for off_t. - */ -#ifndef _INCL_SYS_TYPES_H -#include -#define _INCL_SYS_TYPES_H -#endif - -#ifndef _SCHILY_UTYPES_H -#include -#endif - -/* - * Defines for command line option flags - */ -#define F_DUMMY 0x00000001L /* Do dummy (simulation) writes */ -#define F_TOC 0x00000002L /* Get TOC */ -#define F_EJECT 0x00000004L /* Eject disk after doing the work */ -#define F_LOAD 0x00000008L /* Load disk only */ -#define F_MULTI 0x00000010L /* Create linkable TOC/multi-session */ -#define F_MSINFO 0x00000020L /* Get multi-session info */ -#define F_FIX 0x00000040L /* Fixate disk only */ -#define F_NOFIX 0x00000080L /* Do not fixate disk */ -#define F_VERSION 0x00000100L /* Print version info */ -#define F_CHECKDRIVE 0x00000200L /* Check for driver */ -#define F_INQUIRY 0x00000400L /* Do inquiry */ -#define F_PRCAP 0x00000800L /* Print capabilities */ -#define F_SCANBUS 0x00001000L /* Scan SCSI Bus */ -#define F_RESET 0x00002000L /* Reset SCSI Bus */ -#define F_BLANK 0x00004000L /* Blank CD-RW */ -#define F_PRATIP 0x00008000L /* Print ATIP info */ -#define F_PRDINFO 0x00010000L /* Print disk info (XXX not yet used) */ -#define F_IGNSIZE 0x00020000L /* Ignore disk size */ -#define F_SAO 0x00040000L /* Session at once */ -#define F_RAW 0x00080000L /* Raw mode */ -#define F_WRITE 0x00100000L /* Disk is going to be written */ -#define F_FORCE 0x00200000L /* Force things (e.g. blank on dead disk) */ -#define F_WAITI 0x00400000L /* Wait until data is available on stdin */ -#define F_OVERBURN 0x00800000L /* Allow oveburning */ -#define F_CLONE 0x01000000L /* Do clone writing */ -#define F_STDIN 0x02000000L /* We are using stdin as CD data */ -#define F_IMMED 0x04000000L /* Try tu use IMMED SCSI flag if possible */ -#define F_DLCK 0x08000000L /* Load disk and lock door */ -#define F_SETDROPTS 0x10000000L /* Set driver opts and exit */ -#define F_FORMAT 0x20000000L /* Format media */ -#define F_ABORT 0x40000000L /* Send abort sequence to drive */ -#ifdef PROTOTYPES -#define F_MEDIAINFO 0x80000000UL /* Print media info */ -#else -#define F_MEDIAINFO 0x80000000L /* Print media info */ -#endif - -/* - * Defines for command extended line option flags2 - */ -#define F2_XX 0x01 /* Not yet */ - -#ifdef min -#undef min -#endif -#define min(a, b) ((a) < (b) ? (a):(b)) - -#ifdef max -#undef max -#endif -#define max(a, b) ((a) < (b) ? (b):(a)) - -#undef roundup -#define roundup(x, y) ((((x)+((y)-1))/(y))*(y)) - -/* - * NOTICE: You should not make CDR_BUF_SIZE more than - * the buffer size of the CD-Recorder. - * - * The Philips CDD 521 is the recorder with the smallest buffer. - * It only has 256kB of buffer RAM. - * - * WARNING: Philips CDD 521 dies if CDR_BUF_SIZE is to big. - * If you like to support the CDD 521 keep the buffer - * at 63kB. - */ -/*#define CDR_BUF_SIZE (126*1024)*/ -#define CDR_BUF_SIZE (63*1024) -#define CDR_MAX_BUF_SIZE (256*1024) - -/* - * Never set MIN_GRACE_TIME < 3 seconds. We need to give - * the volume management a chance to settle before we - * start writing. - */ -#ifndef MIN_GRACE_TIME -#define MIN_GRACE_TIME 3 /* 3 seconds */ -#endif -#ifndef GRACE_TIME -#define GRACE_TIME 9 /* 9 seconds */ -#endif - -/* - * Some sector sizes used for reading/writing ... - */ -#define DATA_SEC_SIZE 2048 /* 2048 bytes */ -#define MODE2_SEC_SIZE 2336 /* 2336 bytes */ -#define AUDIO_SEC_SIZE 2352 /* 2352 bytes */ -#define RAW16_SEC_SIZE (2352+16) /* 2368 bytes */ -#define RAW96_SEC_SIZE (2352+96) /* 2448 bytes */ - -#define MAX_TRACK 99 /* Red Book track limit */ - -#define PAD_SECS 15 /* NOTE: pad must be less than BUF_SIZE */ -#define PAD_SIZE (PAD_SECS * DATA_SEC_SIZE) - -/* - * FIFO size must be at least 2x CDR_MAX_BUF_SIZE - */ -#define DEFAULT_FIFOSIZE (4L*1024L*1024L) - -#if !defined(HAVE_LARGEFILES) && SIZEOF_LLONG > SIZEOF_LONG -typedef Llong tsize_t; -#else -typedef off_t tsize_t; -#endif - -#ifdef nono -typedef struct tindex { - int dummy; /* Not yet implemented */ -} tindex_t; -#endif - -typedef struct ofile { - struct ofile *next; /* Next open file */ - int f; /* Open file */ - char *filename; /* File name */ - int refcnt; /* open reference count */ -} ofile_t; - -typedef struct track { - void *xfp; /* Open file for this track from xopen()*/ - char *filename; /* File name for this track */ - - tsize_t itracksize; /* Size of track bytes (-1 == until EOF)*/ - /* This is in units of isecsize */ - tsize_t tracksize; /* Size of track bytes (-1 == until EOF)*/ - /* This is in units of secsize */ - - long trackstart; /* Start sector # of this track */ - long tracksecs; /* Size of this track (sectors) */ - long padsecs; /* Pad size for this track (sectors) */ - long pregapsize; /* Pre-gap size for this track (sectors)*/ - long index0start; /* Index 0 start within this tr(sectors)*/ - int isecsize; /* Read input sector size for this track*/ - int secsize; /* Sector size for this track (bytes) */ - int secspt; /* # of sectors to copy for one transfer*/ - int pktsize; /* # of blocks per write packet */ - Uchar dataoff; /* offset of user data in raw sector */ - Uchar tracks; /* Number of tracks on this disk */ - Uchar track; /* Track # as offset in track[] array */ - Uchar trackno; /* Track # on disk for this track */ - Uchar tracktype; /* Track type (toc type) */ - Uchar dbtype; /* Data block type for this track */ - int sectype; /* Sector type */ - int flags; /* Flags (see below) */ - int nindex; /* Number of indices for track */ - long *tindex; /* Track index descriptor */ - char *isrc; /* ISRC code for this track / disk MCN */ - void *text; /* Opaque CD-Text data (txtptr_t *) */ -} track_t; - -#define track_base(tp) ((tp) - (tp)->track) - -/* - * Defines for tp->flags - */ -#define TI_AUDIO 0x00001 /* File is an audio track */ -#define TI_PREEMP 0x00002 /* Audio track recorded w/preemphasis */ -#define TI_MIX 0x00004 /* This is a mixed mode track */ -#define TI_RAW 0x00008 /* Write this track in raw mode */ -#define TI_PAD 0x00010 /* Pad data track */ -#define TI_SWAB 0x00020 /* Swab audio data */ -#define TI_ISOSIZE 0x00040 /* Use iso size for track */ -#define TI_NOAUHDR 0x00080 /* Don't look for audio header */ -#define TI_FIRST 0x00100 /* This is the first track */ -#define TI_LAST 0x00200 /* This is the last track */ -#define TI_PACKET 0x00400 /* Fixed- or variable-packet track */ -#define TI_NOCLOSE 0x00800 /* Don't close the track after writing */ -#define TI_TAO 0x01000 /* This track is written in TAO mode */ -#define TI_PREGAP 0x02000 /* Prev. track incl. pregap of this tr. */ -#define TI_SCMS 0x04000 /* Force to follow the SCMS rules */ -#define TI_COPY 0x08000 /* Allow digital copy */ -#define TI_SHORT_TRACK 0x10000 /* Ignore min 4 second Red Book std. */ -#define TI_RAW16 0x20000 /* This track uses 16 bytes subch. */ -#define TI_RAW96R 0x40000 /* This track uses 96 bytes RAW subch. */ -#define TI_CLONE 0x80000 /* Special clone treatment needed */ -#define TI_TEXT 0x100000 /* This track holds CD-Text information */ -#define TI_NOCD 0x200000 /* We are not writing a CD track */ -#define TI_SAO 0x400000 /* This track is written in SAO mode */ -#define TI_USEINFO 0x800000 /* Use information from *.inf files */ -#define TI_QUADRO 0x1000000 /* Four Channel Audio Data */ - - -#define is_audio(tp) (((tp)->flags & TI_AUDIO) != 0) -#define is_preemp(tp) (((tp)->flags & TI_PREEMP) != 0) -#define is_pad(tp) (((tp)->flags & TI_PAD) != 0) -#define is_swab(tp) (((tp)->flags & TI_SWAB) != 0) -#define is_first(tp) (((tp)->flags & TI_FIRST) != 0) -#define is_last(tp) (((tp)->flags & TI_LAST) != 0) -#define is_packet(tp) (((tp)->flags & TI_PACKET) != 0) -#define is_noclose(tp) (((tp)->flags & TI_NOCLOSE) != 0) -#define is_tao(tp) (((tp)->flags & TI_TAO) != 0) -#define is_sao(tp) (((tp)->flags & TI_SAO) != 0) -#define is_raw(tp) (((tp)->flags & TI_RAW) != 0) -#define is_raw16(tp) (((tp)->flags & TI_RAW16) != 0) -#define is_raw96(tp) (((tp)->flags & (TI_RAW|TI_RAW16)) == TI_RAW) -#define is_raw96p(tp) (((tp)->flags & (TI_RAW|TI_RAW16|TI_RAW96R)) == TI_RAW) -#define is_raw96r(tp) (((tp)->flags & (TI_RAW|TI_RAW16|TI_RAW96R)) == (TI_RAW|TI_RAW96R)) -#define is_pregap(tp) (((tp)->flags & TI_PREGAP) != 0) -#define is_scms(tp) (((tp)->flags & TI_SCMS) != 0) -#define is_copy(tp) (((tp)->flags & TI_COPY) != 0) -#define is_shorttrk(tp) (((tp)->flags & TI_SHORT_TRACK) != 0) -#define is_clone(tp) (((tp)->flags & TI_CLONE) != 0) -#define is_text(tp) (((tp)->flags & TI_TEXT) != 0) -#define is_quadro(tp) (((tp)->flags & TI_QUADRO) != 0) - -/* - * Defines for toc type / track type - */ -#define TOC_DA 0 /* CD-DA */ -#define TOC_ROM 1 /* CD-ROM */ -#define TOC_XA1 2 /* CD_ROM XA with first track in mode 1 */ -#define TOC_XA2 3 /* CD_ROM XA with first track in mode 2 */ -#define TOC_CDI 4 /* CDI */ - -#define TOC_MASK 7 /* Mask needed for toctname[] */ - -/* - * Additional flags in toc type / trackp->tracktype - * XXX TOCF_DUMMY istr schon in dp->cdr_cmdflags & F_DUMMY - * XXX TOCF_MULTI istr schon in dp->cdr_cmdflags & F_MULTI - */ -#define TOCF_DUMMY 0x10 /* Write in dummy (simulation) mode */ -#define TOCF_MULTI 0x20 /* Multisession (Open Next Programarea) */ - -#define TOCF_MASK 0xF0 /* All possible flags in tracktype */ - -extern char *toc2name[]; /* Convert toc type to name */ -extern int toc2sess[]; /* Convert toc type to session format */ - -/* - * Defines for sector type - * - * Mode is 2 bits - * Aud is 1 bit - * - * Sector is: aud << 2 | mode - */ -#define ST_ROM_MODE1 1 /* CD-ROM in mode 1 (vanilla cdrom) */ -#define ST_ROM_MODE2 2 /* CD-ROM in mode 2 */ -#define ST_AUDIO_NOPRE 4 /* CD-DA stereo without preemphasis */ -#define ST_AUDIO_PRE 5 /* CD-DA stereo with preemphasis */ - -#define ST_PREEMPMASK 0x01 /* Mask for preemphasis bit */ -#define ST_AUDIOMASK 0x04 /* Mask for audio bit */ -#define ST_MODEMASK 0x03 /* Mask for mode bits in sector type */ -#define ST_MASK 0x07 /* Mask needed for sectname[] */ - -/* - * There are 6 different generic basic sector types. - */ -#define ST_MODE_AUDIO 0x00 /* Generic Audio mode */ -#define ST_MODE_0 0x10 /* Generic Zero mode */ -#define ST_MODE_1 0x20 /* Generic CD-ROM mode (ISO/IEC 10149) */ -#define ST_MODE_2 0x30 /* Generic Mode 2 (ISO/IEC 10149) */ -#define ST_MODE_2_FORM_1 0x40 /* Generic Mode 2 form 1 */ -#define ST_MODE_2_FORM_2 0x50 /* Generic Mode 2 form 2 */ -#define ST_MODE_2_MIXED 0x60 /* Generic Mode 2 mixed form (1/2) */ - -#define ST_MODE_MASK 0x70 /* Mask needed to get generic sectype */ - -#define ST_MODE_RAW 0x08 /* Do not touch EDC & subchannels */ -#define ST_NOSCRAMBLE 0x80 /* Do not srcamble sectors */ - -#define SECT_AUDIO (ST_AUDIO_NOPRE | ST_MODE_AUDIO) -#define SECT_AUDIO_NOPRE (ST_AUDIO_NOPRE | ST_MODE_AUDIO) -#define SECT_AUDIO_PRE (ST_AUDIO_PRE | ST_MODE_AUDIO) -#define SECT_MODE_0 (ST_ROM_MODE1 | ST_MODE_0) -#define SECT_ROM (ST_ROM_MODE1 | ST_MODE_1) -#define SECT_MODE_2 (ST_ROM_MODE2 | ST_MODE_2) -#define SECT_MODE_2_F1 (ST_ROM_MODE2 | ST_MODE_2_FORM_1) -#define SECT_MODE_2_F2 (ST_ROM_MODE2 | ST_MODE_2_FORM_2) -#define SECT_MODE_2_MIX (ST_ROM_MODE2 | ST_MODE_2_MIXED) - -extern char *st2name[]; /* Convert sector type to name */ -extern int st2mode[]; /* Convert sector type to control nibble*/ - -/* - * Control nibble bits: - * - * 0 with preemphasis (audio) / incremental (data) - * 1 digital copy permitted - * 2 data (not audio) track - * 3 4 channels (not 2) - */ -#define TM_PREEM 0x1 /* Audio track with preemphasis */ -#define TM_INCREMENTAL 0x1 /* Incremental data track */ -#define TM_ALLOW_COPY 0x2 /* Digital copy permitted */ -#define TM_DATA 0x4 /* This is a data track */ -#define TM_QUADRO 0x8 /* Four channel audio */ - -/* - * Adr nibble: - */ -#define ADR_NONE 0 /* Sub-Q mode info not supplied */ -#define ADR_POS 1 /* Sub-Q encodes position data */ -#define ADR_MCN 2 /* Sub-Q encodes Media Catalog Number */ -#define ADR_ISRC 3 /* Sub-Q encodes ISRC */ - -/* - * Defines for write type (from SCSI-3/mmc) - */ -#define WT_PACKET 0x0 /* Packet writing */ -#define WT_TAO 0x1 /* Track at once */ -#define WT_SAO 0x2 /* Session at once */ -#define WT_RAW 0x3 /* Raw */ -#define WT_LAYER_JUMP 0x4 /* DVD-R/DL Layer jump */ -#define WT_RES_5 0x5 /* Reserved */ -#define WT_RES_6 0x6 /* Reserved */ -#define WT_RES_7 0x7 /* Reserved */ -#define WT_RES_8 0x8 /* Reserved */ -#define WT_RES_9 0x9 /* Reserved */ -#define WT_RES_A 0xA /* Reserved */ -#define WT_RES_B 0xB /* Reserved */ -#define WT_RES_C 0xC /* Reserved */ -#define WT_RES_D 0xD /* Reserved */ -#define WT_RES_E 0xE /* Reserved */ -#define WT_RES_F 0xF /* Reserved */ - -/* - * Data block layout: - * - * - Sync pattern 12 Bytes: 0x00 0xFF 0xFF ... 0xFF 0xFF 0x00 - * - Block header 4 Bytes: | minute | second | frame | mode | - * Mode byte: - * Bits 7, 6, 5 Run-in/Run-out/Link - * Bits 4, 3, 2 Reserved - * Bits 1, 0 Mode - * - Rest of sector see below. - * - * Mode 0 Format: - * 0 12 Bytes Sync header - * 12 4 Bytes Block header with Data mode == 0 - * 16 2336 Bytes of zero data - * - * Mode 1 Format: - * 0 12 Bytes Sync header - * 12 4 Bytes Block header with Data mode == 1 - * 16 2048 Bytes of user data - * 2064 4 Bytes CRC for Bytes 0-2063 - * 2068 8 Bytes Zero fill - * 2076 172 Bytes P parity symbols - * 2248 104 Bytes Q parity symbols - * - * Mode 2 Format (formless): - * 0 12 Bytes Sync header - * 12 4 Bytes Block header with Data mode == 2 - * 16 2336 Bytes of user data - * - * Mode 2 form 1 Format: - * 0 12 Bytes Sync header - * 12 4 Bytes Block header with Data mode == 2 - * 16 4 Bytes subheader first copy - * 20 4 Bytes subheader second copy - * 24 2048 Bytes of user data - * 2072 4 Bytes CRC for Bytes 16-2071 - * 2076 172 Bytes P parity symbols - * 2248 104 Bytes Q parity symbols - * - * Mode 2 form 2 Format: - * 0 12 Bytes Sync header - * 12 4 Bytes Block header with Data mode == 2 - * 16 4 Bytes subheader first copy - * 20 4 Bytes subheader second copy - * 24 2324 Bytes of user data - * 2348 4 Bytes Optional CRC for Bytes 16-2347 - */ - -/* - * Mode Byte definitions (the 4th Byte in the Block header) - */ -#define SH_MODE_DATA 0x00 /* User Data Block */ -#define SH_MODE_RI4 0x20 /* Fourth run in Block */ -#define SH_MODE_RI3 0x40 /* Third run in Block */ -#define SH_MODE_RI2 0x60 /* Second run in Block */ -#define SH_MODE_RI1 0x80 /* First run in Block */ -#define SH_MODE_LINK 0xA0 /* Link Block */ -#define SH_MODE_RO2 0xC0 /* Second run out Block */ -#define SH_MODE_RO1 0xE0 /* First run out Block */ -#define SH_MODE_M0 0x00 /* Mode 0 Data */ -#define SH_MODE_M1 0x01 /* Mode 1 Data */ -#define SH_MODE_M2 0x02 /* Mode 2 Data */ -#define SH_MODE_MR 0x03 /* Reserved */ - -/* - * Defines for data block type (from SCSI-3/mmc) - * - * Mandatory are only: - * DB_ROM_MODE1 (8) Mode 1 (ISO/IEC 10149) - * DB_XA_MODE2 (10) Mode 2-F1 (CD-ROM XA form 1) - * DB_XA_MODE2_MIX (13) Mode 2-MIX (CD-ROM XA 1/2+subhdr) - */ -#define DB_RAW 0 /* 2352 bytes of raw data */ -#define DB_RAW_PQ 1 /* 2368 bytes (raw data + P/Q Subchannel) */ -#define DB_RAW_PW 2 /* 2448 bytes (raw data + P-W Subchannel) */ -#define DB_RAW_PW_R 3 /* 2448 bytes (raw data + P-W raw Subchannel)*/ -#define DB_RES_4 4 /* - Reserved */ -#define DB_RES_5 5 /* - Reserved */ -#define DB_RES_6 6 /* - Reserved */ -#define DB_VU_7 7 /* - Vendor specific */ -#define DB_ROM_MODE1 8 /* 2048 bytes Mode 1 (ISO/IEC 10149) */ -#define DB_ROM_MODE2 9 /* 2336 bytes Mode 2 (ISO/IEC 10149) */ -#define DB_XA_MODE2 10 /* 2048 bytes Mode 2 (CD-ROM XA form 1) */ -#define DB_XA_MODE2_F1 11 /* 2056 bytes Mode 2 (CD-ROM XA form 1) */ -#define DB_XA_MODE2_F2 12 /* 2324 bytes Mode 2 (CD-ROM XA form 2) */ -#define DB_XA_MODE2_MIX 13 /* 2332 bytes Mode 2 (CD-ROM XA 1/2+subhdr) */ -#define DB_RES_14 14 /* - Reserved */ -#define DB_VU_15 15 /* - Vendor specific */ - -extern char *db2name[]; /* Convert data block type to name */ - -/* - * Defines for multi session type (from SCSI-3/mmc) - */ -#define MS_NONE 0 /* No B0 pointer. Next session not allowed*/ -#define MS_FINAL 1 /* B0 = FF:FF:FF. Next session not allowed*/ -#define MS_RES 2 /* Reserved */ -#define MS_MULTI 3 /* B0 = Next PA. Next session allowed */ - -/* - * Defines for session format (from SCSI-3/mmc) - */ -#define SES_DA_ROM 0x00 /* CD-DA or CD-ROM disk */ -#define SES_CDI 0x10 /* CD-I disk */ -#define SES_XA 0x20 /* CD-ROM XA disk */ -#define SES_UNDEF 0xFF /* Undefined disk type (read disk info) */ - -/* - * Defines for blanking of CD-RW discs (from SCSI-3/mmc) - */ -#define BLANK_DISC 0x00 /* Erase the entire disc */ -#define BLANK_MINIMAL 0x01 /* Erase the PMA, 1st session TOC, pregap */ -#define BLANK_TRACK 0x02 /* Erase an incomplete track */ -#define BLANK_UNRESERVE 0x03 /* Unreserve a track */ -#define BLANK_TAIL 0x04 /* Erase the tail of a track */ -#define BLANK_UNCLOSE 0x05 /* Unclose the last session */ -#define BLANK_SESSION 0x06 /* Erase the last session */ - -/* - * Useful definitions for audio tracks - */ -#define msample (44100 * 2) /* one 16bit audio sample */ -#define ssample (msample * 2) /* one stereo sample */ -#define samples(v) ((v) / ssample) /* # of stereo samples */ -#define hsamples(v) ((v) / (ssample/100)) /* 100* # of stereo samples/s*/ -#define fsamples(v) ((v) / (ssample/75)) /* 75* # of stereo samples/s */ - -#define minutes(v) ((int)(samples(v) / 60)) -#define seconds(v) ((int)(samples(v) % 60)) -#define hseconds(v) ((int)(hsamples(v) % 100)) -#define frames(v) ((int)(fsamples(v) % 75)) - -/* - * sector based macros - */ -#define Sminutes(s) ((int)((s) / (60*75))) -#define Sseconds(s) ((int)((s) / 75)) -#define Shseconds(s) ((int)(((s) % 75)*100)/75) -#define Sframes(s) ((int)((s) % 75)) - -typedef struct msf { - char msf_min; - char msf_sec; - char msf_frame; -} msf_t; - -/* - * Definitions for read TOC/PMA/ATIP command - */ -#define FMT_TOC 0 -#define FMT_SINFO 1 -#define FMT_FULLTOC 2 -#define FMT_PMA 3 -#define FMT_ATIP 4 -#define FMT_CDTEXT 5 - -/* - * Definitions for read disk information "recording flags" - * used in UInt16_t "ds_cdrflags". - */ -#define RF_WRITE 0x0001 /* Disk is going to be written */ -#define RF_BLANK 0x0002 /* Disk is going to be erased */ -#define RF_PRATIP 0x0004 /* Print ATIP info */ -#define RF_LEADIN 0x0008 /* Lead-in has been "manually" written */ -#define RF_BURNFREE 0x0010 /* BUFFER underrun free recording */ -#define RF_VARIREC 0x0020 /* Plextor VariRec */ -#define RF_AUDIOMASTER 0x0040 /* Yamaha AudioMaster */ -#define RF_FORCESPEED 0x0080 /* WriteSpeed forced high */ -#define RF_DID_STAT 0x0100 /* Already did call cdrstats() */ -#define RF_DID_CDRSTAT 0x0200 /* Already did call (*dp->cdr_stats)() */ -#define RF_WR_WAIT 0x0400 /* Wait during writing to free bus */ -#define RF_SINGLESESS 0x0800 /* Plextor single sess. mode */ -#define RF_HIDE_CDR 0x1000 /* Plextor hide CDR features */ -#define RF_SPEEDREAD 0x2000 /* Plextor SpeedReed */ -#define RF_GIGAREC 0x4000 /* Plextor GigaRec */ - -/* - * Definitions for read disk information "disk status" - * used in "ds_diskstat". - */ -#define DS_EMPTY 0 /* Empty disk */ -#define DS_APPENDABLE 1 /* Incomplete disk (appendable) */ -#define DS_COMPLETE 2 /* Complete disk (closed/no B0 pointer) */ -#define DS_RESERVED 3 /* Reserved */ - -/* - * Definitions for read disk information "session status" - * used in "ds_sessstat". - */ -#define SS_EMPTY 0 /* Empty session */ -#define SS_APPENDABLE 1 /* Incomplete session */ -#define SS_RESERVED 2 /* Reserved */ -#define SS_COMPLETE 3 /* Complete session (needs DS_COMPLETE) */ - -/* - * Definitions for disk_status write mode - * used in "ds_wrmode". - */ -#define WM_NONE 0 /* No write mode selected */ -#define WM_BLANK 1 /* Blanking mode */ -#define WM_FORMAT 2 /* Formatting */ -#define WM_PACKET 4 /* Packet writing */ -#define WM_TAO 8 /* Track at Once */ -#define WM_SAO 12 /* Session at Once w/ cooked sectors */ -#define WM_SAO_RAW16 13 /* Session at Once RAW+16 byte sectors */ -#define WM_SAO_RAW96P 14 /* Session at Once RAW+96P byte sectors */ -#define WM_SAO_RAW96R 15 /* Session at Once RAW+96R byte sectors */ -#define WM_RAW 16 /* RAW with cooked sectors is impossible*/ -#define WM_RAW_RAW16 17 /* RAW with RAW+16 byte sectors */ -#define WM_RAW_RAW96P 18 /* RAW with RAW+96P byte sectors */ -#define WM_RAW_RAW96R 19 /* RAW with RAW+96R byte sectors */ - -#define wm_base(wm) ((wm)/4*4) /* The basic write mode for this mode */ - -/* - * Definitions for disk_status flags - * used in UInt16_t "ds_flags". - */ -#define DSF_DID_V 0x0001 /* Disk id valid */ -#define DSF_DBC_V 0x0002 /* Disk bar code valid */ -#define DSF_URU 0x0004 /* Disk is for unrestricted use */ -#define DSF_ERA 0x0008 /* Disk is erasable */ -#define DSF_HIGHSP_ERA 0x0010 /* Disk is high speed erasable */ -#define DSF_ULTRASP_ERA 0x0020 /* Disk is ultra speed erasable */ -#define DSF_ULTRASPP_ERA 0x0040 /* Disk is ultra speed+ erasable */ -#define DSF_NOCD 0x0080 /* Disk is not a CD */ - -#define DSF_DVD 0x0100 /* Disk is a DVD */ -#define DSF_DVD_PLUS_R 0x0200 /* Disk is a DVD+R */ -#define DSF_DVD_PLUS_RW 0x0400 /* Disk is a DVD+RW */ -#define DSF_NEED_FORMAT 0x0800 /* Disk needs to be formatted */ -#define DSF_BD 0x1000 /* Disk is a BD */ -#define DSF_BD_RE 0x2000 /* Disk is a BD-RE */ - -/* - * Definitions for disk_status disk type - * used in "ds_type". - */ -#define DST_UNKNOWN 0 -#define DST_CD_ROM 0x08 -#define DST_CD_R 0x09 -#define DST_CD_RW 0x0A -#define DST_DVD_ROM 0x10 -#define DST_DVD_R 0x11 -#define DST_DVD_RAM 0x12 -#define DST_DVD_RW 0x13 -#define DST_DVD_RW_SEQ 0x14 -#define DST_DVD_R_DL 0x15 -#define DST_DVD_R_DL_LJ 0x16 -#define DST_DVD_PLUS_RW 0x1A -#define DST_DVD_PLUS_R 0x1B -#define DST_DVD_PLUS_R_DL 0x2B -#define DST_BD_ROM 0x40 -#define DST_BD_R_SEQ 0x41 -#define DST_BD_R 0x42 -#define DST_BD_RE 0x43 - -typedef struct disk_status dstat_t; - -struct disk_status { - UInt32_t ds_diskid; /* Disk identification */ - UInt16_t ds_cdrflags; /* Recording flags from cdrecord*/ - UInt16_t ds_flags; /* Disk_status flags */ - Uchar ds_wrmode; /* Selected write mode */ - Uchar ds_type; /* Abstract disk type */ - - Uchar ds_disktype; /* Disk type (from TOC/PMA) */ - Uchar ds_diskstat; /* Disk status (MMC) */ - Uchar ds_sessstat; /* Status of last sesion (MMC) */ - Uchar ds_trfirst; /* first track # */ - Uchar ds_trlast; /* last track # */ - Uchar ds_trfirst_ls; /* first track # in last session*/ - Uchar ds_barcode[8]; /* Disk bar code */ - - Int32_t ds_first_leadin; /* Start of first lead in (ATIP)*/ - Int32_t ds_last_leadout; /* Start of last lead out (ATIP)*/ - Int32_t ds_curr_leadin; /* Start of next lead in */ - Int32_t ds_curr_leadout; /* Start of next lead out */ - - Int32_t ds_maxblocks; /* # of official blocks on disk */ - Int32_t ds_maxrblocks; /* # real blocks on disk */ - Int32_t ds_fwa; /* first writable addr */ - - Int32_t ds_startsec; /* Actual start sector */ - Int32_t ds_endsec; /* Actual end sector */ - Int32_t ds_buflow; /* # of times drive buffer empty*/ - - UInt16_t ds_minbuf; /* Minimum drive bufer fill rt. */ - - UInt16_t ds_at_min_speed; /* The minimal ATIP write speed */ - UInt16_t ds_at_max_speed; /* The maximal ATIP write speed */ - UInt16_t ds_dr_cur_rspeed; /* The drive's cur read speed */ - UInt16_t ds_dr_max_rspeed; /* The drive's max read speed */ - UInt16_t ds_dr_cur_wspeed; /* The drive's cur write speed */ - UInt16_t ds_dr_max_wspeed; /* The drive's max write speed */ - UInt16_t ds_wspeed; /* The selected/drive wr. speed */ - - Int32_t ds_layer_break; /* Start of layer break */ -}; - -/* - * First approach of a CDR device abstraction layer. - * This interface will change as long as I did not find the - * optimum that fits for all devices. - * - * Called with pointer to whole track array: - * cdr_send_cue() - * cdr_write_leadin() - * cdr_open_session() - * cdr_fixate() - * - * Called with (track_t *) 0 or pointer to current track: - * cdr_next_wr_address() - * - * Called with pointer to current track: - * cdr_open_track() - * cdr_close_track() - * - * Calling sequence: - * cdr_identify() May modify driver - * Here, the cdr_t will be allocated and - * copied to a new writable area. - * cdr_attach() Get drive properties - * cdr_buffer_cap() - * cdr_getdisktype() GET ATIP - * cdr_init() set TAO for -msinfo - * cdr_check_session XXX ???? - * cdr_opt1() set early options - * cdr_set_speed_dummy(scgp, dp, &speed) - * <--- Grace time processing goes here - * { do_opc(); cdr_blank() } - * cdr_opt2() set late options - * cdr_open_session() set up params (no wrt.) - * do_opc() - * cdr_write_leadin() start writing - * LOOP { - * cdr_open_track() - * cdr_next_wr_address() only TAO / Packet - * write_track_data() - * cdr_close_track() - * } - * write_leadout() XXX should go -> driver! - * cdr_fixate() - * cdr_stats() - */ -/*--------------------------------------------------------------------------*/ -typedef struct cdr_cmd cdr_t; - -#ifdef _SCG_SCSITRANSP_H -struct cdr_cmd { - int cdr_dev; /* Numerical device type */ - UInt32_t cdr_cmdflags; /* Command line options */ - UInt32_t cdr_cmdflags2; /* More cmdline options */ - UInt32_t cdr_flags; /* Drive related flags */ - UInt32_t cdr_flags2; /* More Drive flags */ - UInt8_t cdr_cdrw_support; /* CD-RW write media types */ - UInt8_t cdr_wrmodedef; /* Default write mode */ - UInt16_t cdr_speeddef; /* Default write speed */ - UInt16_t cdr_speedmax; /* Max. write speed */ - - char *cdr_drname; /* Driver ID string */ - char *cdr_drtext; /* Driver ID text */ - struct cd_mode_page_2A *cdr_cdcap; - dstat_t *cdr_dstat; -#ifdef _SCG_SCSIREG_H - cdr_t *(*cdr_identify) __PR((SCSI *scgp, cdr_t *, struct scsi_inquiry *)); /* identify drive */ -#else - cdr_t *(*cdr_identify) __PR((SCSI *scgp, cdr_t *, void *)); /* identify drive */ -#endif - int (*cdr_attach) __PR((SCSI *scgp, cdr_t *)); /* init error decoding etc*/ - int (*cdr_init) __PR((SCSI *scgp, cdr_t *)); /* init drive to useful deflts */ - int (*cdr_getdisktype) __PR((SCSI *scgp, cdr_t *)); /* get disk type */ - int (*cdr_prdiskstatus) __PR((SCSI *scgp, cdr_t *)); /* print disk status */ - int (*cdr_load) __PR((SCSI *scgp, cdr_t *)); /* load disk */ - int (*cdr_unload) __PR((SCSI *scgp, cdr_t *)); /* unload disk */ - int (*cdr_buffer_cap) __PR((SCSI *scgp, long *sizep, long *freep)); /* read buffer capacity */ - int (*cdr_check_recovery) __PR((SCSI *scgp, cdr_t *)); /* check if recover is needed */ - int (*cdr_recover) __PR((SCSI *scgp, cdr_t *, int track)); /* do recover */ - int (*cdr_set_speed_dummy) __PR((SCSI *scgp, cdr_t *, int *speedp)); /* set recording speed & dummy write */ - int (*cdr_set_secsize) __PR((SCSI *scgp, int secsize)); /* set sector size */ - int (*cdr_next_wr_address) __PR((SCSI *scgp, track_t *trackp, long *ap)); /* get next writable addr. */ - int (*cdr_reserve_track) __PR((SCSI *scgp, Ulong len)); /* reserve track for future use */ - int (*cdr_write_trackdata) __PR((SCSI *scgp, caddr_t buf, long daddr, long bytecnt, int seccnt, BOOL islast)); - int (*cdr_gen_cue) __PR((track_t *trackp, void *cuep, BOOL needgap)); /* generate cue sheet */ - int (*cdr_send_cue) __PR((SCSI *scgp, cdr_t *, track_t *trackp)); /* send cue sheet */ - int (*cdr_write_leadin) __PR((SCSI *scgp, cdr_t *, track_t *trackp)); /* write leadin */ - int (*cdr_open_track) __PR((SCSI *scgp, cdr_t *, track_t *trackp)); /* open new track */ - int (*cdr_close_track) __PR((SCSI *scgp, cdr_t *, track_t *trackp)); /* close written track */ - int (*cdr_open_session) __PR((SCSI *scgp, cdr_t *, track_t *trackp)); /* open new session */ - int (*cdr_close_session) __PR((SCSI *scgp, cdr_t *)); /* really needed ??? */ - int (*cdr_abort_session) __PR((SCSI *scgp, cdr_t *)); /* abort current write */ - int (*cdr_session_offset) __PR((SCSI *scgp, long *soff)); /* read session offset*/ - int (*cdr_fixate) __PR((SCSI *scgp, cdr_t *, track_t *trackp)); /* write toc on disk */ - int (*cdr_stats) __PR((SCSI *scgp, cdr_t *)); /* final statistics printing*/ - int (*cdr_blank) __PR((SCSI *scgp, cdr_t *, long addr, int blanktype)); /* blank something */ - int (*cdr_format) __PR((SCSI *scgp, cdr_t *, int fmtflags)); /* format media */ - int (*cdr_opc) __PR((SCSI *scgp, caddr_t bp, int cnt, int doopc)); /* Do OPC */ - int (*cdr_opt1) __PR((SCSI *scgp, cdr_t *)); /* do early option processing*/ - int (*cdr_opt2) __PR((SCSI *scgp, cdr_t *)); /* do late option processing */ -}; -#endif - -/* - * Definitions for cdr_flags - */ -#define CDR_TAO 0x01 /* Drive supports Track at once */ -#define CDR_SAO 0x02 /* Drive supports Sess at once */ -#define CDR_PACKET 0x04 /* Drive supports packet writing*/ -#define CDR_RAW 0x08 /* Drive supports raw writing */ -#define CDR_RAW16 0x10 /* Drive supports RAW raw16 */ -#define CDR_RAW96P 0x20 /* Drive supports RAW raw96 pak */ -#define CDR_RAW96R 0x40 /* Drive supports RAW raw96 raw */ -#ifdef __needed__ -#define CDR_SRAW16 0x100 /* Drive supports SAO raw16 */ -#endif -#define CDR_SRAW96P 0x200 /* Drive supports SAO raw96 pak */ -#define CDR_SRAW96R 0x400 /* Drive supports SAO raw96 raw */ -#define CDR_LAYER_JUMP 0x800 /* Drive s. DVD-R/DL Layer jump */ -#define CDR_SWABAUDIO 0x1000 /* Drive swabs audio data */ -#define CDR_ISREADER 0x2000 /* Drive is s CD-ROM reader */ -#define CDR_TRAYLOAD 0x4000 /* Drive loads CD with tray */ -#define CDR_CADDYLOAD 0x8000 /* Drive loads CD with caddy */ -#define CDR_NO_LOLIMIT 0x10000 /* Drive ignores lead-out limit */ -#define CDR_DVD 0x20000 /* Drive is a DVD drive */ -#define CDR_SIMUL 0x40000 /* Drive is simulated */ -#define CDR_BURNFREE 0x80000 /* Drive sup. BUFund. free rec. */ -#define CDR_VARIREC 0x100000 /* Drive sup. VariRec Plex. */ -#define CDR_AUDIOMASTER 0x200000 /* Drive sup. AudioMaster Yamah.*/ -#define CDR_FORCESPEED 0x400000 /* Drive sup. WriteSpeed ctl. */ -#define CDR_DISKTATTOO 0x800000 /* Drive sup. Yamaha DiskT@2 */ -#define CDR_SINGLESESS 0x1000000 /* Drive sup. single sess. mode */ -#define CDR_HIDE_CDR 0x2000000 /* Drive sup. hide CDR features */ -#define CDR_SPEEDREAD 0x4000000 /* Drive sup. SpeedReed */ -#define CDR_GIGAREC 0x8000000 /* Drive sup. GigaRec Plex. */ -#define CDR_MMC 0x10000000 /* Drive is MMC compliant */ -#define CDR_MMC2 0x20000000 /* Drive is MMC-2 compliant */ -#define CDR_MMC3 0x40000000 /* Drive is MMC-3 compliant */ -#ifdef PROTOTYPES -#define CDR_ALLOC 0x80000000UL /* structure is allocated */ -#else -#define CDR_ALLOC 0x80000000 /* structure is allocated */ -#endif - -/* - * Definitions for cdr_flags - */ -#define CDR2_NOCD 0x01 /* Drive not operating on a CD */ -#define CDR2_BD 0x02 /* Drive is a BluRay drive */ - -/* - * Definitions for cdr_cdrw_support - */ -#define CDR_CDRW_NONE 0x00 /* CD-RW writing not supported */ -#define CDR_CDRW_MULTI 0x01 /* CD-RW multi speed supported */ -#define CDR_CDRW_HIGH 0x02 /* CD-RW high speed supported */ -#define CDR_CDRW_ULTRA 0x04 /* CD-RW ultra high speed supported */ -#define CDR_CDRW_ULTRAP 0x08 /* CD-RW ultra high speed+ supported */ -#define CDR_CDRW_ALL 0xFF /* All bits set: unknown - support all */ - -/* - * cdrecord.c - */ -extern int read_buf __PR((int f, char *bp, int size)); -extern int fill_buf __PR((int f, track_t *trackp, long secno, char *bp, int size)); -extern int get_buf __PR((int f, track_t *trackp, long secno, char **bpp, int size)); -#ifdef _SCG_SCSITRANSP_H -extern int write_secs __PR((SCSI *scgp, cdr_t *dp, char *bp, long startsec, int bytespt, int secspt, BOOL islast)); -extern int pad_track __PR((SCSI *scgp, cdr_t *dp, track_t *trackp, - long startsec, Llong amt, - BOOL dolast, Llong *bytesp)); -extern void load_media __PR((SCSI *scgp, cdr_t *, BOOL)); -extern void unload_media __PR((SCSI *scgp, cdr_t *, UInt32_t)); -extern void reload_media __PR((SCSI *scgp, cdr_t *)); -#endif -extern void raisepri __PR((int)); -extern int getnum __PR((char *arg, long *valp)); - -/* - * cd_misc.c - */ -extern int from_bcd __PR((int b)); -extern int to_bcd __PR((int i)); -extern long msf_to_lba __PR((int m, int s, int f, BOOL force_positive)); -extern BOOL lba_to_msf __PR((long lba, msf_t *mp)); -extern void sec_to_msf __PR((long sec, msf_t *mp)); -extern void print_min_atip __PR((long li, long lo)); -extern BOOL is_cdspeed __PR((int speed)); - -/* - * fifo.c - */ -extern void init_fifo __PR((long)); -extern BOOL init_faio __PR((track_t *track, int)); -extern BOOL await_faio __PR((void)); -extern void kill_faio __PR((void)); -extern int wait_faio __PR((void)); -extern int faio_read_buf __PR((int f, char *bp, int size)); -extern int faio_get_buf __PR((int f, char **bpp, int size)); -extern void fifo_stats __PR((void)); -extern int fifo_percent __PR((BOOL addone)); - -/* - * wm_session.c - */ -#ifdef _SCG_SCSITRANSP_H -extern int write_session_data __PR((SCSI *scgp, cdr_t *dp, track_t *trackp)); -#endif - -/* - * wm_track.c - */ -#ifdef _SCG_SCSITRANSP_H -/*extern int write_track_data __PR((SCSI *scgp, cdr_t *dp, track_t *trackp));*/ -#endif - -/* - * wm_packet.c - */ -#ifdef _SCG_SCSITRANSP_H -extern int write_packet_data __PR((SCSI *scgp, cdr_t *dp, track_t *trackp)); -#endif - -/* - * modes.c - */ -#ifdef _SCG_SCSITRANSP_H -extern BOOL get_mode_params __PR((SCSI *scgp, int page, char *pagename, - Uchar *modep, Uchar *cmodep, - Uchar *dmodep, Uchar *smodep, - int *lenp)); -extern BOOL set_mode_params __PR((SCSI *scgp, char *pagename, Uchar *modep, - int len, int save, int secsize)); -#endif - -/* - * misc.c - */ -#ifdef timerclear -extern void timevaldiff __PR((struct timeval *start, struct timeval *stop)); -extern void prtimediff __PR((const char *fmt, - struct timeval *start, - struct timeval *stop)); -#endif - -/* - * getnum.c - */ -extern int getnum __PR((char *arg, long *valp)); -extern int getllnum __PR((char *arg, Llong *lvalp)); - -/* - * scsi_cdr.c - */ -#ifdef _SCG_SCSITRANSP_H -extern BOOL unit_ready __PR((SCSI *scgp)); -extern BOOL wait_unit_ready __PR((SCSI *scgp, int secs)); -extern BOOL scsi_in_progress __PR((SCSI *scgp)); -extern BOOL cdr_underrun __PR((SCSI *scgp)); -extern int test_unit_ready __PR((SCSI *scgp)); -extern int rezero_unit __PR((SCSI *scgp)); -extern int request_sense __PR((SCSI *scgp)); -extern int request_sense_b __PR((SCSI *scgp, caddr_t bp, int cnt)); -extern int inquiry __PR((SCSI *scgp, caddr_t, int)); -extern int read_capacity __PR((SCSI *scgp)); -#ifdef EOF /* stdio.h has been included */ -extern void print_capacity __PR((SCSI *scgp, FILE *f)); -#endif -extern int scsi_load_unload __PR((SCSI *scgp, int)); -extern int scsi_prevent_removal __PR((SCSI *scgp, int)); -extern int scsi_start_stop_unit __PR((SCSI *scgp, int, int, BOOL immed)); - -#define ROTCTL_CLV 0 /* CLV or PCAV */ -#define ROTCTL_CAV 1 /* True CAV */ - -extern int scsi_set_speed __PR((SCSI *scgp, int readspeed, int writespeed, int rotctl)); -extern int scsi_get_speed __PR((SCSI *scgp, int *readspeedp, int *writespeedp)); -extern int qic02 __PR((SCSI *scgp, int)); -extern int write_xscsi __PR((SCSI *scgp, caddr_t, long, long, int)); -extern int write_xg0 __PR((SCSI *scgp, caddr_t, long, long, int)); -extern int write_xg1 __PR((SCSI *scgp, caddr_t, long, long, int)); -extern int write_xg5 __PR((SCSI *scgp, caddr_t, long, long, int)); -extern int seek_scsi __PR((SCSI *scgp, long addr)); -extern int seek_g0 __PR((SCSI *scgp, long addr)); -extern int seek_g1 __PR((SCSI *scgp, long addr)); -extern int scsi_flush_cache __PR((SCSI *scgp, BOOL immed)); -extern int read_buffer __PR((SCSI *scgp, caddr_t bp, int cnt, int mode)); -extern int write_buffer __PR((SCSI *scgp, char *buffer, long length, int mode, int bufferid, long offset)); -extern int read_subchannel __PR((SCSI *scgp, caddr_t bp, int track, - int cnt, int msf, int subq, int fmt)); -extern int read_toc __PR((SCSI *scgp, caddr_t, int, int, int, int)); -extern int read_toc_philips __PR((SCSI *scgp, caddr_t, int, int, int, int)); -extern int read_header __PR((SCSI *scgp, caddr_t, long, int, int)); -extern int read_disk_info __PR((SCSI *scgp, caddr_t, int)); - -#define TI_TYPE_LBA 0 /* Address is LBA */ -#define TI_TYPE_TRACK 1 /* Address: 0 -> TOC, xx -> Track xx, 0xFF -> Inv Track */ -#define TI_TYPE_SESS 2 /* Address is session # */ -extern int read_track_info __PR((SCSI *scgp, caddr_t, int type, int addr, int cnt)); -extern int get_trackinfo __PR((SCSI *scgp, caddr_t, int type, int addr, int cnt)); -extern int read_rzone_info __PR((SCSI *scgp, caddr_t bp, int cnt)); -extern int reserve_tr_rzone __PR((SCSI *scgp, long size)); -extern int read_dvd_structure __PR((SCSI *scgp, caddr_t bp, int cnt, int mt, int addr, int layer, int fmt)); -extern int send_dvd_structure __PR((SCSI *scgp, caddr_t bp, int cnt, int fmt)); -extern int send_opc __PR((SCSI *scgp, caddr_t, int cnt, int doopc)); - -#define CL_TYPE_STOP_DEICE 0 /* Stop De-icing a DVD+RW Media */ -#define CL_TYPE_TRACK 1 /* Close Track # */ -#define CL_TYPE_SESSION 2 /* Close Session/Border / Stop backgrnd. format */ -#define CL_TYPE_INTER_BORDER 3 /* Close intermediate Border */ -extern int scsi_close_tr_session __PR((SCSI *scgp, int type, int track, BOOL immed)); -extern int read_master_cue __PR((SCSI *scgp, caddr_t bp, int sheet, int cnt)); -extern int send_cue_sheet __PR((SCSI *scgp, caddr_t bp, long size)); -extern int read_buff_cap __PR((SCSI *scgp, long *, long *)); -extern int scsi_blank __PR((SCSI *scgp, long addr, int blanktype, BOOL immed)); -extern BOOL allow_atapi __PR((SCSI *scgp, BOOL new)); -extern int mode_select __PR((SCSI *scgp, Uchar *, int, int, int)); -extern int mode_sense __PR((SCSI *scgp, Uchar *dp, int cnt, int page, int pcf)); -extern int mode_select_sg0 __PR((SCSI *scgp, Uchar *, int, int, int)); -extern int mode_sense_sg0 __PR((SCSI *scgp, Uchar *dp, int cnt, int page, int pcf)); -extern int mode_select_g0 __PR((SCSI *scgp, Uchar *, int, int, int)); -extern int mode_select_g1 __PR((SCSI *scgp, Uchar *, int, int, int)); -extern int mode_sense_g0 __PR((SCSI *scgp, Uchar *dp, int cnt, int page, int pcf)); -extern int mode_sense_g1 __PR((SCSI *scgp, Uchar *dp, int cnt, int page, int pcf)); -extern int read_tochdr __PR((SCSI *scgp, cdr_t *, int *, int *)); -extern int read_cdtext __PR((SCSI *scgp)); -extern int read_trackinfo __PR((SCSI *scgp, int, long *, struct msf *, int *, int *, int *)); -extern int read_B0 __PR((SCSI *scgp, BOOL isbcd, long *b0p, long *lop)); -extern int read_session_offset __PR((SCSI *scgp, long *)); -extern int read_session_offset_philips __PR((SCSI *scgp, long *)); -extern int sense_secsize __PR((SCSI *scgp, int current)); -extern int select_secsize __PR((SCSI *scgp, int)); -extern BOOL is_cddrive __PR((SCSI *scgp)); -extern BOOL is_unknown_dev __PR((SCSI *scgp)); -extern int read_scsi __PR((SCSI *scgp, caddr_t, long, int)); -extern int read_g0 __PR((SCSI *scgp, caddr_t, long, int)); -extern int read_g1 __PR((SCSI *scgp, caddr_t, long, int)); -extern BOOL getdev __PR((SCSI *scgp, BOOL)); -#ifdef EOF /* stdio.h has been included */ -extern void printinq __PR((SCSI *scgp, FILE *f)); -#endif -extern void printdev __PR((SCSI *scgp)); -extern BOOL do_inquiry __PR((SCSI *scgp, BOOL)); -extern BOOL recovery_needed __PR((SCSI *scgp, cdr_t *)); -extern int scsi_load __PR((SCSI *scgp, cdr_t *)); -extern int scsi_unload __PR((SCSI *scgp, cdr_t *)); -extern int scsi_cdr_write __PR((SCSI *scgp, caddr_t bp, long sectaddr, long size, int blocks, BOOL islast)); -extern struct cd_mode_page_2A * mmc_cap __PR((SCSI *scgp, Uchar *modep)); -extern void mmc_getval __PR((struct cd_mode_page_2A *mp, - BOOL *cdrrp, BOOL *cdwrp, - BOOL *cdrrwp, BOOL *cdwrwp, - BOOL *dvdp, BOOL *dvdwp)); -extern BOOL is_mmc __PR((SCSI *scgp, BOOL *cdwp, BOOL *dvdwp)); -extern BOOL mmc_check __PR((SCSI *scgp, BOOL *cdrrp, BOOL *cdwrp, - BOOL *cdrrwp, BOOL *cdwrwp, - BOOL *dvdp, BOOL *dvdwp)); -extern void print_capabilities __PR((SCSI *scgp)); - -extern int verify __PR((SCSI *scgp, long start, int count, long *bad_block)); -#endif - -/* - * scsi_cdr.c - */ -#ifdef _SCG_SCSITRANSP_H -extern void print_capabilities_mmc4 __PR((SCSI *scgp)); -#endif - -/* - * scsi_mmc.c - */ - -/* - * Definitions for the return value of get_mediatype() - */ -#define MT_NONE 0 /* Unknown or unsupported */ -#define MT_CD 1 /* CD type media */ -#define MT_DVD 2 /* DVD type media */ -#define MT_BD 3 /* Blu Ray type media */ -#define MT_HDDVD 4 /* HD-DVD type media */ - -#ifdef _SCG_SCSITRANSP_H -extern int get_configuration __PR((SCSI *scgp, caddr_t bp, int cnt, int st_feature, int rt)); -extern int get_curprofile __PR((SCSI *scgp)); -extern int has_profile __PR((SCSI *scgp, int profile)); -extern int print_profiles __PR((SCSI *scgp)); -extern int get_proflist __PR((SCSI *scgp, BOOL *wp, BOOL *cdp, BOOL *dvdp, - BOOL *dvdplusp, BOOL *ddcdp)); -extern int get_wproflist __PR((SCSI *scgp, BOOL *cdp, BOOL *dvdp, - BOOL *dvdplusp, BOOL *ddcdp)); -extern int get_mediatype __PR((SCSI *scgp)); -#endif /* _SCG_SCSITRANSP_H */ -extern int get_singlespeed __PR((int mt)); -extern float get_secsps __PR((int mt)); -extern char *get_mclassname __PR((int mt)); -#ifdef _SCG_SCSITRANSP_H -extern int print_features __PR((SCSI *scgp)); -extern int check_writemodes_mmc __PR((SCSI *scgp, cdr_t *dp)); -extern int scsi_get_perf_maxspeed __PR((SCSI *scgp, Ulong *readp, Ulong *writep, Ulong *endp)); -extern int scsi_get_perf_curspeed __PR((SCSI *scgp, Ulong *readp, Ulong *writep, Ulong *endp)); -extern int speed_select_mdvd __PR((SCSI *scgp, int readspeed, int writespeed)); -extern void print_format_capacities __PR((SCSI *scgp)); -extern int get_format_capacities __PR((SCSI *scgp, caddr_t bp, int cnt)); -extern int read_format_capacities __PR((SCSI *scgp, caddr_t bp, int cnt)); -#endif /* _SCG_SCSITRANSP_H */ -#ifdef _SCSIMMC_H -extern void przone __PR((struct rzone_info *rp)); -#endif /* _SCSIMMC_H */ -#ifdef _SCG_SCSITRANSP_H -#ifdef _SCSIMMC_H -extern int get_diskinfo __PR((SCSI *scgp, struct disk_info *dip, int cnt)); -extern void print_diskinfo __PR((struct disk_info *dip, BOOL is_cd)); -#endif -extern int prdiskstatus __PR((SCSI *scgp, cdr_t *dp, BOOL is_cd)); -extern int sessstatus __PR((SCSI *scgp, BOOL is_cd, long *offp, long *nwap)); -extern void print_performance_mmc __PR((SCSI *scgp)); -#endif /* _SCG_SCSITRANSP_H */ - -/* - * scsi_mmc4.c - */ -#ifdef _SCG_SCSITRANSP_H -extern int get_supported_cdrw_media_types __PR((SCSI *scgp)); -#endif - -/* - * cdr_drv.c - */ -#ifdef _SCG_SCSITRANSP_H -#ifdef _SCG_SCSIREG_H -extern cdr_t *drive_identify __PR((SCSI *scgp, cdr_t *, struct scsi_inquiry *ip)); -#else -extern cdr_t *drive_identify __PR((SCSI *scgp, cdr_t *, void *ip)); -#endif -extern int drive_attach __PR((SCSI *scgp, cdr_t *)); -#endif -extern int attach_unknown __PR((void)); -#ifdef _SCG_SCSITRANSP_H -extern int blank_dummy __PR((SCSI *scgp, cdr_t *, long addr, int blanktype)); -EXPORT int format_dummy __PR((SCSI *scgp, cdr_t *, int fmtflags)); -extern int drive_getdisktype __PR((SCSI *scgp, cdr_t *dp)); -extern int cmd_ill __PR((SCSI *scgp)); -extern int cmd_dummy __PR((SCSI *scgp, cdr_t *)); -extern int no_sendcue __PR((SCSI *scgp, cdr_t *, track_t *trackp)); -extern int no_diskstatus __PR((SCSI *scgp, cdr_t *)); -extern int buf_dummy __PR((SCSI *scgp, long *sp, long *fp)); -#endif -extern BOOL set_cdrcmds __PR((char *name, cdr_t **dpp)); -#ifdef _SCG_SCSITRANSP_H -extern cdr_t *get_cdrcmds __PR((SCSI *scgp)); -#endif - - -/* - * drv_mmc.c - */ -#ifdef _SCG_SCSITRANSP_H -extern void mmc_opthelp __PR((SCSI *scgp, cdr_t *dp, int excode)); -#endif -extern char *hasdrvopt __PR((char *optstr, char *optname)); -extern char *hasdrvoptx __PR((char *optstr, char *optname, int flag)); -#ifdef _SCG_SCSITRANSP_H -extern struct ricoh_mode_page_30 * get_justlink_ricoh __PR((SCSI *scgp, Uchar *mode)); -#endif - -/* - * isosize.c - */ -extern Llong isosize __PR((int f)); - -/* - * audiosize.c - */ -extern BOOL is_auname __PR((const char *name)); -extern off_t ausize __PR((int f)); -extern BOOL is_wavname __PR((const char *name)); -extern off_t wavsize __PR((int f)); - -/* - * auinfo.c - */ -extern BOOL auinfosize __PR((char *name, track_t *trackp)); -extern void auinfo __PR((char *name, int track, track_t *trackp)); -#ifdef CDTEXT_H -extern textptr_t *gettextptr __PR((int track, track_t *trackp)); -#endif -extern void setmcn __PR((char *mcn, track_t *trackp)); -extern void setisrc __PR((char *isrc, track_t *trackp)); -extern void setindex __PR((char *tindex, track_t *trackp)); - -/* - * diskid.c - */ -extern void pr_manufacturer __PR((msf_t *mp, BOOL rw, BOOL audio)); -extern int manufacturer_id __PR((msf_t *mp)); -extern long disk_rcap __PR((msf_t *mp, long maxblock, BOOL rw, BOOL audio)); - -/*--------------------------------------------------------------------------*/ -/* Test only */ -/*--------------------------------------------------------------------------*/ -#ifdef _SCSIMMC_H -/*extern int do_cue __PR((track_t *trackp, struct mmc_cue **cuep));*/ -#else -/*extern int do_cue __PR((track_t *trackp, void *cuep));*/ -#endif - -/* - * subchan.c - */ -extern int do_leadin __PR((track_t *trackp)); -#ifdef _SCG_SCSITRANSP_H -extern int write_leadin __PR((SCSI *scgp, cdr_t *dp, track_t *trackp, int leadinstart)); -extern int write_leadout __PR((SCSI *scgp, cdr_t *dp, track_t *trackp)); -#endif -extern void fillsubch __PR((track_t *trackp, Uchar *sp, int secno, int nsecs)); -extern void filltpoint __PR((Uchar *sub, int ctrl_adr, int point, msf_t *mp)); -extern void fillttime __PR((Uchar *sub, msf_t *mp)); -extern void qpto96 __PR((Uchar *sub, Uchar *subq, int dop)); -extern void addrw __PR((Uchar *sub, Uchar *subrwptr)); -extern void qwto16 __PR((Uchar *subq, Uchar *subptr)); -extern void subrecodesecs __PR((track_t *trackp, Uchar *bp, int address, int nsecs)); - -/* - * sector.c - */ -extern int encspeed __PR((BOOL be_verbose)); -extern void encsectors __PR((track_t *trackp, Uchar *bp, int address, int nsecs)); -extern void scrsectors __PR((track_t *trackp, Uchar *bp, int address, int nsecs)); -extern void encodesector __PR((Uchar *sp, int sectype, int address)); -extern void fillsector __PR((Uchar *sp, int sectype, int address)); - -/* - * clone.c - */ -extern void clone_toc __PR((track_t *trackp)); -extern void clone_tracktype __PR((track_t *trackp)); - -/* - * cdtext.c - */ -extern BOOL checktextfile __PR((char *fname)); -extern void packtext __PR((int tracks, track_t *trackp)); -#ifdef _SCG_SCSITRANSP_H -extern int write_cdtext __PR((SCSI *scgp, cdr_t *dp, long startsec)); -#endif - -/* - * cue.c - */ -extern int parsecue __PR((char *cuefname, track_t trackp[])); -#ifdef EOF /* stdio.h has been included */ -extern void fparsecue __PR((FILE *f, track_t trackp[])); -#endif diff -Nru cdrtools-2.01.01a33/scgskeleton/defaults.c cdrtools-3.02a09/scgskeleton/defaults.c --- cdrtools-2.01.01a33/scgskeleton/defaults.c 2006-09-13 15:35:12.000000000 +0000 +++ cdrtools-3.02a09/scgskeleton/defaults.c 1970-01-01 00:00:00.000000000 +0000 @@ -1,235 +0,0 @@ -/* @(#)defaults.c 1.20 06/09/13 Copyright 1998-2006 J. Schilling */ -#ifndef lint -static char sccsid[] = - "@(#)defaults.c 1.20 06/09/13 Copyright 1998-2006 J. Schilling"; -#endif -/* - * Copyright (c) 1998-2006 J. Schilling - */ -/* - * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. - * - * See the file CDDL.Schily.txt in this distribution for details. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file CDDL.Schily.txt from this distribution. - */ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include "cdrecord.h" /* only for getnum() */ -#include "defaults.h" - -LOCAL int open_cdrdefaults __PR((void)); -EXPORT void cdr_defaults __PR((char **devp, int *speedp, long *fsp, char **drvoptp)); -LOCAL void cdr_xdefaults __PR((char **devp, int *speedp, long *fsp, char **drvoptp)); -LOCAL char * strsv __PR((char *s)); - -LOCAL int -open_cdrdefaults() -{ - /* - * WARNING you are only allowed to change this filename if you also - * change the documentation and add a statement that makes clear - * where the official location of the file is why you did choose a - * nonstandard location and that the nonstandard location only refers - * to inofficial cdrecord versions. - * - * I was forced to add this because some people change cdrecord without - * rational reason and then publish the result. As those people - * don't contribute work and don't give support, they are causing extra - * work for me and this way slow down the cdrecord development. - */ - return (defltopen("/etc/default/cdrecord")); -} - -EXPORT void -cdr_defaults(devp, speedp, fsp, drvoptp) - char **devp; - int *speedp; - long *fsp; - char **drvoptp; -{ - char *dev = NULL; - int speed = 0; - long fs = 0L; - - if (devp != NULL) - dev = *devp; - if (speedp != NULL) - speed = *speedp; - if (fsp != NULL) - fs = *fsp; - - if (!dev && devp != NULL) { - *devp = getenv("CDR_DEVICE"); - - if (!*devp && open_cdrdefaults() == 0) { - dev = defltread("CDR_DEVICE="); - if (dev != NULL) - *devp = strsv(dev); - } - } - if (devp != NULL && *devp) - cdr_xdefaults(devp, &speed, &fs, drvoptp); - - if (speed < 0) { - char *p = getenv("CDR_SPEED"); - - if (!p) { - if (open_cdrdefaults() == 0) { - p = defltread("CDR_SPEED="); - } - } - if (p) { - speed = atoi(p); - if (speed < 0 && speed != -1) { - comerrno(EX_BAD, - "Bad speed environment (%s).\n", p); - } - } - } - if (speed >= 0 && speedp != NULL) - *speedp = speed; - - if (fs < 0L) { - char *p = getenv("CDR_FIFOSIZE"); - - if (!p) { - if (open_cdrdefaults() == 0) { - p = defltread("CDR_FIFOSIZE="); - } - } - if (p) { - if (getnum(p, &fs) != 1) { - comerrno(EX_BAD, - "Bad fifo size environment (%s).\n", p); - } - } - } - if (fs > 0L && fsp != NULL) { - char *p = NULL; - long maxfs; - - if (open_cdrdefaults() == 0) { - p = defltread("CDR_MAXFIFOSIZE="); - } - if (p) { - if (getnum(p, &maxfs) != 1) { - comerrno(EX_BAD, - "Bad max fifo size default (%s).\n", p); - } - if (fs > maxfs) - fs = maxfs; - } - *fsp = fs; - } - - - defltclose(); -} - -/* - * All args except "drvoptp" are granted to be non NULL pointers. - */ -LOCAL void -cdr_xdefaults(devp, speedp, fsp, drvoptp) - char **devp; - int *speedp; - long *fsp; - char **drvoptp; -{ - char dname[256]; - char *p = *devp; - char *x = ",:/@"; - - while (*x) { - if (strchr(p, *x)) - return; - x++; - } - js_snprintf(dname, sizeof (dname), "%s=", p); - if (open_cdrdefaults() != 0) - return; - - p = defltread(dname); - if (p != NULL) { - while (*p == '\t' || *p == ' ') - p++; - if ((x = strchr(p, '\t')) != NULL) - *x = '\0'; - else if ((x = strchr(p, ' ')) != NULL) - *x = '\0'; - *devp = strsv(p); - if (x) { - p = ++x; - while (*p == '\t' || *p == ' ') - p++; - if ((x = strchr(p, '\t')) != NULL) - *x = '\0'; - else if ((x = strchr(p, ' ')) != NULL) - *x = '\0'; - if (*speedp < 0) - *speedp = atoi(p); - if (*speedp < 0 && *speedp != -1) { - comerrno(EX_BAD, - "Bad speed in defaults (%s).\n", p); - } - } - if (x) { - p = ++x; - while (*p == '\t' || *p == ' ') - p++; - if ((x = strchr(p, '\t')) != NULL) - *x = '\0'; - else if ((x = strchr(p, ' ')) != NULL) - *x = '\0'; - if (*fsp < 0L) { - if (getnum(p, fsp) != 1) { - comerrno(EX_BAD, - "Bad fifo size in defaults (%s).\n", - p); - } - } - } - if (x) { - p = ++x; - while (*p == '\t' || *p == ' ') - p++; - if ((x = strchr(p, '\t')) != NULL) - *x = '\0'; - else if ((x = strchr(p, ' ')) != NULL) - *x = '\0'; - if (strcmp(p, "\"\"") != '\0') { - /* - * Driver opts found. - */ - if (drvoptp && *drvoptp == NULL) - *drvoptp = strsv(p); - } - } - } -} - -LOCAL char * -strsv(s) - char *s; -{ - char *p; - int len = strlen(s); - - p = malloc(len+1); - if (p) - strcpy(p, s); - return (p); -} diff -Nru cdrtools-2.01.01a33/scgskeleton/defaults.h cdrtools-3.02a09/scgskeleton/defaults.h --- cdrtools-2.01.01a33/scgskeleton/defaults.h 2004-02-22 14:53:00.000000000 +0000 +++ cdrtools-3.02a09/scgskeleton/defaults.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,26 +0,0 @@ -/* @(#)defaults.h 1.1 04/02/22 Copyright 1998-2004 J. Schilling */ -/* - * The cdrecord defaults (/etc/default/cdrecord) interface - * - * Copyright (c) 1998-2004 J. Schilling - */ -/* - * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. - * - * See the file CDDL.Schily.txt in this distribution for details. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file CDDL.Schily.txt from this distribution. - */ - -#ifndef _DEFAULTS_H -#define _DEFAULTS_H -/* - * defaults.c - */ -extern void cdr_defaults __PR((char **devp, int *speedp, long *fsp, char **drvoptp)); - -#endif /* _DEFAULTS_H */ diff -Nru cdrtools-2.01.01a33/scgskeleton/io.c cdrtools-3.02a09/scgskeleton/io.c --- cdrtools-2.01.01a33/scgskeleton/io.c 2007-06-10 12:14:07.000000000 +0000 +++ cdrtools-3.02a09/scgskeleton/io.c 1970-01-01 00:00:00.000000000 +0000 @@ -1,218 +0,0 @@ -/* @(#)io.c 1.4 07/06/10 Copyright 1988 J. Schilling */ -#ifndef lint -static char sccsid[] = - "@(#)io.c 1.4 07/06/10 Copyright 1988 J. Schilling"; -#endif -/* - * Copyright (c) 1988 J. Schilling - */ -/* - * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. - * - * See the file CDDL.Schily.txt in this distribution for details. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file CDDL.Schily.txt from this distribution. - */ - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include "iodefs.h" - -struct disk { - int dummy; -}; - -LOCAL char *skipwhite __PR((const char *)); -LOCAL void prt_std __PR((char *, long, long, long, struct disk *)); -EXPORT BOOL cvt_std __PR((char *, long *, long, long, struct disk *)); -extern BOOL getvalue __PR((char *, long *, long, long, - void (*)(char *, long, long, long, struct disk *), - BOOL (*)(char *, long *, long, long, struct disk *), - struct disk *)); -extern BOOL getlong __PR((char *, long *, long, long)); -extern BOOL getint __PR((char *, int *, int, int)); -extern BOOL yes __PR((char *, ...)); - -LOCAL char * -skipwhite(s) - const char *s; -{ - register const Uchar *p = (const Uchar *)s; - - while (*p) { - if (!isspace(*p)) - break; - p++; - } - return ((char *)p); -} - -/* ARGSUSED */ -EXPORT BOOL -cvt_std(linep, lp, mini, maxi, dp) - char *linep; - long *lp; - long mini; - long maxi; - struct disk *dp; -{ - long l = -1L; - -/* printf("cvt_std(\"%s\", %d, %d, %d);\n", linep, *lp, mini, maxi);*/ - - if (linep[0] == '?') { - printf("Enter a number in the range from %ld to %ld\n", - mini, maxi); - printf("The default radix is 10\n"); - printf("Precede number with '0x' for hexadecimal or with '0' for octal\n"); - printf("Shorthands are:\n"); - printf("\t'^' for minimum value (%ld)\n", mini); - printf("\t'$' for maximum value (%ld)\n", maxi); - printf("\t'+' for incrementing value to %ld\n", *lp + 1); - printf("\t'-' for decrementing value to %ld\n", *lp - 1); - return (FALSE); - } - if (linep[0] == '^' && *skipwhite(&linep[1]) == '\0') { - l = mini; - } else if (linep[0] == '$' && *skipwhite(&linep[1]) == '\0') { - l = maxi; - } else if (linep[0] == '+' && *skipwhite(&linep[1]) == '\0') { - if (*lp < maxi) - l = *lp + 1; - } else if (linep[0] == '-' && *skipwhite(&linep[1]) == '\0') { - if (*lp > mini) - l = *lp - 1; - } else if (*astol(linep, &l)) { - printf("Not a number: '%s'.\n", linep); - return (FALSE); - } - if (l < mini || l > maxi) { - printf("'%s' is out of range.\n", linep); - return (FALSE); - } - *lp = l; - return (TRUE); -} - -/* ARGSUSED */ -LOCAL void -prt_std(s, l, mini, maxi, dp) - char *s; - long l; - long mini; - long maxi; - struct disk *dp; -{ - printf("%s %ld (%ld - %ld)/:", s, l, mini, maxi); -} - -EXPORT BOOL -getvalue(s, lp, mini, maxi, prt, cvt, dp) - char *s; - long *lp; - long mini; - long maxi; - void (*prt) __PR((char *, long, long, long, struct disk *)); - BOOL (*cvt) __PR((char *, long *, long, long, struct disk *)); - struct disk *dp; -{ - char line[128]; - char *linep; - - for (;;) { - (*prt)(s, *lp, mini, maxi, dp); - flush(); - line[0] = '\0'; - if (getline(line, 80) == EOF) - exit(EX_BAD); - - linep = skipwhite(line); - /* - * Nicht initialisierte Variablen - * duerfen nicht uebernommen werden - */ - if (linep[0] == '\0' && *lp != -1L) - return (FALSE); - - if (strlen(linep) == 0) { - /* Leere Eingabe */ - /* EMPTY */ - } else if ((*cvt)(linep, lp, mini, maxi, dp)) - return (TRUE); - } - /* NOTREACHED */ -} - -EXPORT BOOL -getlong(s, lp, mini, maxi) - char *s; - long *lp; - long mini; - long maxi; -{ - return (getvalue(s, lp, mini, maxi, prt_std, cvt_std, (void *)0)); -} - -EXPORT BOOL -getint(s, ip, mini, maxi) - char *s; - int *ip; - int mini; - int maxi; -{ - long l = *ip; - BOOL ret; - - ret = getlong(s, &l, (long)mini, (long)maxi); - *ip = l; - return (ret); -} - -/* VARARGS1 */ -#ifdef PROTOTYPES -EXPORT BOOL -yes(char *form, ...) -#else -EXPORT BOOL -yes(form, va_alist) - char *form; - va_dcl -#endif -{ - va_list args; - char okbuf[10]; - -again: -#ifdef PROTOTYPES - va_start(args, form); -#else - va_start(args); -#endif - printf("%r", form, args); - va_end(args); - flush(); - if (getline(okbuf, sizeof (okbuf)) == EOF) - exit(EX_BAD); - if (okbuf[0] == '?') { - printf("Enter 'y', 'Y', 'yes' or 'YES' if you agree with the previous asked question.\n"); - printf("All other input will be handled as if the question has beed answered with 'no'.\n"); - goto again; - } - if (streql(okbuf, "y") || streql(okbuf, "yes") || - streql(okbuf, "Y") || streql(okbuf, "YES")) - return (TRUE); - else - return (FALSE); -} diff -Nru cdrtools-2.01.01a33/scgskeleton/iodefs.h cdrtools-3.02a09/scgskeleton/iodefs.h --- cdrtools-2.01.01a33/scgskeleton/iodefs.h 2007-06-10 12:15:03.000000000 +0000 +++ cdrtools-3.02a09/scgskeleton/iodefs.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,34 +0,0 @@ -/* @(#)iodefs.h 1.1 07/06/10 Copyright 1988-2007 J. Schilling */ -/* - * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. - * - * See the file CDDL.Schily.txt in this distribution for details. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file CDDL.Schily.txt from this distribution. - */ - -#ifndef _IODEFS_H -#define _IODEFS_H - -#include - -/* - * io.c: - */ -#ifdef D_OK_MASK -extern BOOL cvt_std __PR((char *, long *, long, long, - struct disk *)); -extern BOOL getvalue __PR((char *, long *, long, long, - void (*)(char *, long, long, long, struct disk *), - BOOL (*)(char *, long *, long, long, struct disk *), - struct disk *)); -#endif -extern BOOL getlong __PR((char *, long *, long, long)); -extern BOOL getint __PR((char *, int *, int, int)); -extern BOOL yes __PR((char *, ...)) __printflike__(1, 2); - -#endif /* _IODEFS_H */ diff -Nru cdrtools-2.01.01a33/scgskeleton/Makefile cdrtools-3.02a09/scgskeleton/Makefile --- cdrtools-2.01.01a33/scgskeleton/Makefile 2007-06-10 12:22:39.000000000 +0000 +++ cdrtools-3.02a09/scgskeleton/Makefile 2013-04-21 18:22:09.000000000 +0000 @@ -1,4 +1,4 @@ -#ident @(#)Makefile 1.4 07/06/10 +#ident @(#)Makefile 1.18 13/04/21 ########################################################################### SRCROOT= .. RULESDIR= RULES @@ -10,16 +10,28 @@ CPPOPTS += -DUSE_LARGEFILES CPPOPTS += -DSCHILY_PRINT CPPOPTS += -DNO_DOIT +CPPOPTS += -I../libscg +CPPOPTS += -I../libcdrdeflt +CPPOPTS += -I../cdrecord +CPPOPTS += -I../readcd +CPPOPTS += -DINS_BASE=\"${INS_BASE}\" +CPPOPTS += -DTEXT_DOMAIN=\"SCHILY_cdrtools\" CFILES= skel.c \ io.c cd_misc.c scsi_cdr.c \ scsi_scan.c \ - modes.c misc.c \ - defaults.c + misc.c -HFILES= cdrecord.h defaults.h iodefs.h scsi_scan.h scsimmc.h +#HFILES= cdrecord.h iodefs.h scsi_scan.h scsimmc.h +# +# LIB_CAP is needed for Linux capability support in librscg. +# +LIBS= -lscgcmd -lrscg -lscg $(LIB_VOLMGT) -lcdrdeflt -ldeflt -lschily $(SCSILIB) $(LIB_SOCKET) $(LIB_INTL) $(LIB_CAP) +XMK_FILE= Makefile.man -LIBS= -lrscg -lscg $(LIB_VOLMGT) -ldeflt -lschily $(SCSILIB) $(LIB_SOCKET) +cd_misc.c scsi_cdr.c scsi_scan.c io.c misc.c: + @echo " ==> MAKING SYMLINKS in ." && sh ./MKLINKS +$(ALLTARGETS): cd_misc.c scsi_cdr.c scsi_scan.c io.c misc.c ########################################################################### include $(SRCROOT)/$(RULESDIR)/rules.cmd diff -Nru cdrtools-2.01.01a33/scgskeleton/Makefile.man cdrtools-3.02a09/scgskeleton/Makefile.man --- cdrtools-2.01.01a33/scgskeleton/Makefile.man 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/scgskeleton/Makefile.man 2010-05-13 17:02:39.000000000 +0000 @@ -0,0 +1,18 @@ +#ident @(#)Makefile.man 1.1 10/05/13 +########################################################################### +# Sample makefile for installing manual pages +########################################################################### +SRCROOT= .. +RULESDIR= RULES +include $(SRCROOT)/$(RULESDIR)/rules.top +########################################################################### + +MANDIR= man +TARGETMAN= scgskeleton +MANSECT= $(MANSECT_CMD) +MANSUFFIX= $(MANSUFF_CMD) +MANFILE= scgskeleton.1 + +########################################################################### +include $(SRCROOT)/$(RULESDIR)/rules.man +########################################################################### diff -Nru cdrtools-2.01.01a33/scgskeleton/misc.c cdrtools-3.02a09/scgskeleton/misc.c --- cdrtools-2.01.01a33/scgskeleton/misc.c 2006-09-13 15:35:12.000000000 +0000 +++ cdrtools-3.02a09/scgskeleton/misc.c 1970-01-01 00:00:00.000000000 +0000 @@ -1,78 +0,0 @@ -/* @(#)misc.c 1.5 06/09/13 Copyright 1998, 2001-2004 J. Schilling */ -#ifndef lint -static char sccsid[] = - "@(#)misc.c 1.5 06/09/13 Copyright 1998, 2001-2004 J. Schilling"; -#endif -/* - * Misc support functions - * - * Copyright (c) 1998, 2001-2004 J. Schilling - */ -/* - * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. - * - * See the file CDDL.Schily.txt in this distribution for details. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file CDDL.Schily.txt from this distribution. - */ - -#include -#include -#include -#include -#include - -EXPORT void timevaldiff __PR((struct timeval *start, struct timeval *stop)); -EXPORT void prtimediff __PR((const char *fmt, - struct timeval *start, - struct timeval *stop)); - -EXPORT void -timevaldiff(start, stop) - struct timeval *start; - struct timeval *stop; -{ - struct timeval tv; - - tv.tv_sec = stop->tv_sec - start->tv_sec; - tv.tv_usec = stop->tv_usec - start->tv_usec; - while (tv.tv_usec > 1000000) { - tv.tv_usec -= 1000000; - tv.tv_sec += 1; - } - while (tv.tv_usec < 0) { - tv.tv_usec += 1000000; - tv.tv_sec -= 1; - } - *stop = tv; -} - -EXPORT void -prtimediff(fmt, start, stop) - const char *fmt; - struct timeval *start; - struct timeval *stop; -{ - struct timeval tv; - - tv.tv_sec = stop->tv_sec - start->tv_sec; - tv.tv_usec = stop->tv_usec - start->tv_usec; - while (tv.tv_usec > 1000000) { - tv.tv_usec -= 1000000; - tv.tv_sec += 1; - } - while (tv.tv_usec < 0) { - tv.tv_usec += 1000000; - tv.tv_sec -= 1; - } - /* - * We need to cast timeval->* to long because - * of the broken sys/time.h in Linux. - */ - printf("%s%4ld.%03lds\n", fmt, (long)tv.tv_sec, (long)tv.tv_usec/1000); - flush(); -} diff -Nru cdrtools-2.01.01a33/scgskeleton/MKLINKS cdrtools-3.02a09/scgskeleton/MKLINKS --- cdrtools-2.01.01a33/scgskeleton/MKLINKS 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/scgskeleton/MKLINKS 2011-08-04 21:45:27.000000000 +0000 @@ -0,0 +1,38 @@ +#!/bin/sh +########################################################################### +#ident "@(#)MKLINKS 1.7 11/08/04 " +########################################################################### +# Written 2008-2011 by J. Schilling +########################################################################### +# Copyright (c) 2008-2011 J. Schilling +########################################################################### +# The contents of this file are subject to the terms of the +# Common Development and Distribution License, Version 1.0 only +# (the "License"). You may not use this file except in compliance +# with the License. +# +# See the file CDDL.Schily.txt in this distribution for details. +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file CDDL.Schily.txt from this distribution. +########################################################################### +symlink="ln -s" +MKLINKS_TEST=${MKLINKS_TEST-:} +if [ ".$MKLINKS_COPY" = '.' ]; then + rm -f xxzzy.123 xxzzy.345 + echo test > xxzzy.123 + $symlink xxzzy.123 xxzzy.345 + test $? = 0 || symlink=cp + test -r xxzzy.345 || symlink=cp + ${MKLINKS_TEST} -h xxzzy.345 || symlink=cp + rm -f xxzzy.123 xxzzy.345 +else + symlink=cp +fi +########################################################################### + +$symlink ../cdrecord/cd_misc.c . +$symlink ../readcd/io.c . +$symlink ../cdrecord/misc.c . +$symlink ../cdrecord/scsi_cdr.c . +$symlink ../cdrecord/scsi_scan.c . diff -Nru cdrtools-2.01.01a33/scgskeleton/modes.c cdrtools-3.02a09/scgskeleton/modes.c --- cdrtools-2.01.01a33/scgskeleton/modes.c 2006-09-13 15:35:12.000000000 +0000 +++ cdrtools-3.02a09/scgskeleton/modes.c 1970-01-01 00:00:00.000000000 +0000 @@ -1,296 +0,0 @@ -/* @(#)modes.c 1.26 06/09/13 Copyright 1988, 1997-2001, 2004 J. Schilling */ -#ifndef lint -static char sccsid[] = - "@(#)modes.c 1.26 06/09/13 Copyright 1988, 1997-2001, 2004 J. Schilling"; -#endif -/* - * SCSI mode page handling - * - * Copyright (c) 1988, 1997-2001, 2004 J. Schilling - */ -/* - * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. - * - * See the file CDDL.Schily.txt in this distribution for details. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file CDDL.Schily.txt from this distribution. - */ - -#include -#include -#include -#include -#include -#include -#include - -#include "cdrecord.h" - -EXPORT int scsi_compliant; - -LOCAL BOOL has_mode_page __PR((SCSI *scgp, int page, char *pagename, int *lenp)); -EXPORT BOOL get_mode_params __PR((SCSI *scgp, int page, char *pagename, - Uchar *modep, Uchar *cmodep, - Uchar *dmodep, Uchar *smodep, - int *lenp)); -EXPORT BOOL set_mode_params __PR((SCSI *scgp, char *pagename, Uchar *modep, - int len, int save, int secsize)); - -#define XXX - -#ifdef XXX -LOCAL BOOL -has_mode_page(scgp, page, pagename, lenp) - SCSI *scgp; - int page; - char *pagename; - int *lenp; -{ - Uchar mode[0x100]; - int hdlen; - int len = 1; /* Nach SCSI Norm */ - int try = 0; - struct scsi_mode_page_header *mp; - - /* - * ATAPI drives (used e.g. by IOMEGA) from y2k have the worst firmware - * I've seen. They create DMA buffer overruns if we request less than - * 3 bytes with 6 byte mode sense which equals 4 byte with 10 byte mode - * sense. In order to prevent repeated bus resets, we remember this - * bug. - * - * IOMEGA claims that they are using Philips clone drives but a Philips - * drive I own does not have the problem. - */ - if ((scgp->dflags & DRF_MODE_DMA_OVR) != 0) - len = sizeof (struct scsi_mode_header); -again: - fillbytes((caddr_t)mode, sizeof (mode), '\0'); - if (lenp) - *lenp = 0; - - scgp->silent++; - (void) unit_ready(scgp); -/* Maxoptix bringt Aborted cmd 0x0B mit code 0x4E (overlapping cmds)*/ - - /* - * The Matsushita CW-7502 will sometimes deliver a zeroed - * mode page 2A if "Page n default" is used instead of "current". - */ - if (mode_sense(scgp, mode, len, page, 0) < 0) { /* Page n current */ - scgp->silent--; - if (len < (int)sizeof (struct scsi_mode_header) && try == 0) { - len = sizeof (struct scsi_mode_header); - goto again; - } - return (FALSE); - } else { - if (len > 1 && try == 0) { - /* - * If we come here, we got a hard failure with the - * fist try. Remember this (IOMEGA USB) firmware bug. - */ - if ((scgp->dflags & DRF_MODE_DMA_OVR) == 0) { - /* XXX if (!nowarn) */ - errmsgno(EX_BAD, - "Warning: controller creates hard SCSI failure when retrieving %s page.\n", - pagename); - scgp->dflags |= DRF_MODE_DMA_OVR; - } - } - len = ((struct scsi_mode_header *)mode)->sense_data_len + 1; - } - /* - * ATAPI drives as used by IOMEGA may receive a SCSI bus device reset - * in between these two mode sense commands. - */ - (void) unit_ready(scgp); - if (mode_sense(scgp, mode, len, page, 0) < 0) { /* Page n current */ - scgp->silent--; - return (FALSE); - } - scgp->silent--; - - if (scgp->verbose) - scg_prbytes("Mode Sense Data", mode, len - scg_getresid(scgp)); - hdlen = sizeof (struct scsi_mode_header) + - ((struct scsi_mode_header *)mode)->blockdesc_len; - mp = (struct scsi_mode_page_header *)(mode + hdlen); - if (scgp->verbose) - scg_prbytes("Mode Page Data", (Uchar *)mp, mp->p_len+2); - - if (mp->p_len == 0) { - if (!scsi_compliant && try == 0) { - len = hdlen; - /* - * add sizeof page header (page # + len byte) - * (should normaly result in len == 14) - * this allowes to work with: - * Quantum Q210S (wants at least 13) - * MD2x (wants at least 4) - */ - len += 2; - try++; - goto again; - } - /* XXX if (!nowarn) */ - errmsgno(EX_BAD, - "Warning: controller returns zero sized %s page.\n", - pagename); - } - if (!scsi_compliant && - (len < (int)(mp->p_len + hdlen + 2))) { - len = mp->p_len + hdlen + 2; - - /* XXX if (!nowarn) */ - errmsgno(EX_BAD, - "Warning: controller returns wrong size for %s page.\n", - pagename); - } - if (mp->p_code != page) { - /* XXX if (!nowarn) */ - errmsgno(EX_BAD, - "Warning: controller returns wrong page %X for %s page (%X).\n", - mp->p_code, pagename, page); - return (FALSE); - } - - if (lenp) - *lenp = len; - return (mp->p_len > 0); -} -#endif - -EXPORT BOOL -get_mode_params(scgp, page, pagename, modep, cmodep, dmodep, smodep, lenp) - SCSI *scgp; - int page; - char *pagename; - Uchar *modep; - Uchar *cmodep; - Uchar *dmodep; - Uchar *smodep; - int *lenp; -{ - int len; - BOOL ret = TRUE; - -#ifdef XXX - if (lenp) - *lenp = 0; - if (!has_mode_page(scgp, page, pagename, &len)) { - if (!scgp->silent) errmsgno(EX_BAD, - "Warning: controller does not support %s page.\n", - pagename); - return (FALSE); - } - if (lenp) - *lenp = len; -#else - if (lenp == 0) - len = 0xFF; -#endif - - if (modep) { - fillbytes(modep, 0x100, '\0'); - scgp->silent++; - (void) unit_ready(scgp); - scgp->silent--; - if (mode_sense(scgp, modep, len, page, 0) < 0) { /* Page x current */ - errmsgno(EX_BAD, "Cannot get %s data.\n", pagename); - ret = FALSE; - } else if (scgp->verbose) { - scg_prbytes("Mode Sense Data", modep, len - scg_getresid(scgp)); - } - } - - if (cmodep) { - fillbytes(cmodep, 0x100, '\0'); - scgp->silent++; - (void) unit_ready(scgp); - scgp->silent--; - if (mode_sense(scgp, cmodep, len, page, 1) < 0) { /* Page x change */ - errmsgno(EX_BAD, "Cannot get %s mask.\n", pagename); - ret = FALSE; - } else if (scgp->verbose) { - scg_prbytes("Mode Sense Data", cmodep, len - scg_getresid(scgp)); - } - } - - if (dmodep) { - fillbytes(dmodep, 0x100, '\0'); - scgp->silent++; - (void) unit_ready(scgp); - scgp->silent--; - if (mode_sense(scgp, dmodep, len, page, 2) < 0) { /* Page x default */ - errmsgno(EX_BAD, "Cannot get default %s data.\n", - pagename); - ret = FALSE; - } else if (scgp->verbose) { - scg_prbytes("Mode Sense Data", dmodep, len - scg_getresid(scgp)); - } - } - - if (smodep) { - fillbytes(smodep, 0x100, '\0'); - scgp->silent++; - (void) unit_ready(scgp); - scgp->silent--; - if (mode_sense(scgp, smodep, len, page, 3) < 0) { /* Page x saved */ - errmsgno(EX_BAD, "Cannot get saved %s data.\n", pagename); - ret = FALSE; - } else if (scgp->verbose) { - scg_prbytes("Mode Sense Data", smodep, len - scg_getresid(scgp)); - } - } - - return (ret); -} - -EXPORT BOOL -set_mode_params(scgp, pagename, modep, len, save, secsize) - SCSI *scgp; - char *pagename; - Uchar *modep; - int len; - int save; - int secsize; -{ - int i; - - ((struct scsi_modesel_header *)modep)->sense_data_len = 0; - ((struct scsi_modesel_header *)modep)->res2 = 0; - - i = ((struct scsi_mode_header *)modep)->blockdesc_len; - if (i > 0) { - i_to_3_byte( - ((struct scsi_mode_data *)modep)->blockdesc.nlblock, - 0); - if (secsize >= 0) - i_to_3_byte(((struct scsi_mode_data *)modep)->blockdesc.lblen, - secsize); - } - - scgp->silent++; - (void) unit_ready(scgp); - scgp->silent--; - if (save == 0 || mode_select(scgp, modep, len, save, scgp->inq->data_format >= 2) < 0) { - scgp->silent++; - (void) unit_ready(scgp); - scgp->silent--; - if (mode_select(scgp, modep, len, 0, scgp->inq->data_format >= 2) < 0) { - if (scgp->silent == 0) { - errmsgno(EX_BAD, - "Warning: using default %s data.\n", - pagename); - scg_prbytes("Mode Select Data", modep, len); - } - return (FALSE); - } - } - return (TRUE); -} diff -Nru cdrtools-2.01.01a33/scgskeleton/scgskeleton.1 cdrtools-3.02a09/scgskeleton/scgskeleton.1 --- cdrtools-2.01.01a33/scgskeleton/scgskeleton.1 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/scgskeleton/scgskeleton.1 2016-01-26 21:49:24.000000000 +0000 @@ -0,0 +1,443 @@ +.\" @(#)scgskeleton.1 1.4 16/01/26 Copyright 1986-2016 J. Schilling +.\" Manual page for scgskeleton +.\" +.if t .ds a \v'-0.55m'\h'0.00n'\z.\h'0.40n'\z.\v'0.55m'\h'-0.40n'a +.if t .ds o \v'-0.55m'\h'0.00n'\z.\h'0.45n'\z.\v'0.55m'\h'-0.45n'o +.if t .ds u \v'-0.55m'\h'0.00n'\z.\h'0.40n'\z.\v'0.55m'\h'-0.40n'u +.if t .ds A \v'-0.77m'\h'0.25n'\z.\h'0.45n'\z.\v'0.77m'\h'-0.70n'A +.if t .ds O \v'-0.77m'\h'0.25n'\z.\h'0.45n'\z.\v'0.77m'\h'-0.70n'O +.if t .ds U \v'-0.77m'\h'0.30n'\z.\h'0.45n'\z.\v'0.77m'\h'-0.75n'U +.if t .ds s \\(*b +.if t .ds S SS +.if n .ds a ae +.if n .ds o oe +.if n .ds u ue +.if n .ds s sz +.TH SCGSKELETON 1L "2016/01/26" "J\*org Schilling" "Schily\'s USER COMMANDS" +.SH NAME +scgskeleton \- Skeleton program for SCSI transport using libscg +.SH SYNOPSIS +.B +scgskeleton +.BI dev= device +[ +.I options +] +.SH DESCRIPTION +.B Scgskeleton +is s skeleton program to demonstrate the interfaces and capabilities of the SCSI +transport library +.BR libscg . +.PP +.SS "Device naming" +For a list of possible device name parameters call +.B "scgskeleton \-scanbus +or +.B "scgskeleton dev=help +and then use the right +.B dev= +parameter based on the device listing. + +.SH OPTIONS +.TP +.B \-help +Prints a short summary of the +.B p +options and exists. +.TP +.B \-version +Print version information and exit. +.TP +.BI dev= target +Set the SCSI target for the CD/DVD/BluRay-Recorder, see notes above. +A typical target device specification is +.BI dev= 1,6,0 +\&. +If a filename must be provided together with the numerical target +specification, the filename is implementation specific. +The correct filename in this case can be found in the system specific +manuals of the target operating system. +On a +.I FreeBSD +system without +.I CAM +support, you need to use the control device (e.g. +.IR /dev/rcd0.ctl ). +A correct device specification in this case may be +.BI dev= /dev/rcd0.ctl:@ +\&. +.sp +.B \h'-2m'General SCSI addressing +.br +The +.I target device +to the +.B dev= +option +refers to +.IR scsibus / target / lun +of the CD/DVD/BluRay-Recorder. Communication on +.I SunOS +is done with the SCSI general driver +.B scg. +Other operating systems are using a library simulation of this driver. +Possible syntax is: +.B dev= +.IR scsibus , target , lun +or +.B dev= +.IR target , lun . +In the latter case, the CD/DVD/BluRay-Recorder has to be connected to the default +SCSI bus of the machine. +.IR Scsibus , +.I target +and +.I lun +are integer numbers. +Some operating systems or SCSI transport implementations may require to +specify a filename in addition. +In this case the correct syntax for the device is: +.B dev= +.IR devicename : scsibus , target , lun +or +.B dev= +.IR devicename : target , lun . +If the name of the device node that has been specified on such a system +refers to exactly one SCSI device, a shorthand in the form +.B dev= +.IR devicename : @ +or +.B dev= +.IR devicename : @ , lun +may be used instead of +.B dev= +.IR devicename : scsibus , target , lun . +.sp +.B \h'-2m'Remote SCSI addressing +.br +To access remote SCSI devices, you need to prepend the SCSI device name by +a remote device indicator. The remote device indicator is either +.BI REMOTE: user@host: +or +.BI REMOTE: host: +A valid remote SCSI device name may be: +.BI REMOTE: user@host: +to allow remote SCSI bus scanning or +.BI REMOTE: user@host:1,0,0 +to access the SCSI device at +.I host +connected to SCSI bus # 1,target 0, lun 0. +In order to allow remote access to a specific +.IR host , +the +.BR rscsi (1) +program needs to be present and configured on the +.IR host . +.sp +.B \h'-2m'Alternate SCSI transports +.br +.B ATAPI +drives are just +.B SCSI +drives that inherently use the +.I "ATA packet interface +as +.B SCSI +command transport layer build into the IDE (ATA) transport. +You may need to specify an alternate transport layer on the command line +if your OS does not implement a fully integrated kernel driver subsystem that +allows to access any drive using +.B SCSI +commands via a single unique user interface. +.sp +To access SCSI devices via alternate transport layers, +you need to prepend the SCSI device name by a transport layer indicator. +The transport layer indicator may be something like +.B USCSI: +or +.BR ATAPI: . +To get a list of supported transport layers for your platform, use +.B dev= +.IR HELP : +.sp +.B \h'-2m'Portability Background +.br +To make +.B scgskeleton +portable to all \s-2UNIX\s0 platforms, the syntax +.B dev= +.IR devicename : scsibus , target , lun +is preferred as it hides OS specific knowledge about device names from the user. +A specific OS may not necessarily support a way to specify a real device file name nor a +way to specify +.IR scsibus , target , lun . +.sp +.I Scsibus +0 is the default SCSI bus on the machine. Watch the boot messages for more +information or look into +.B /var/adm/messages +for more information about the SCSI configuration of your machine. +If you have problems to figure out what values for +.IR scsibus , target , lun +should be used, try the +.B \-scanbus +option of +.B scgskeleton +described below. +.sp +.B \h'-2m'Using logical names for devices +.br +If no +.I dev +option is present, +.B scgskeleton +will try to get the device from the +.B CDR_DEVICE +environment. +.sp +If a file /etc/default/cdrecord exists, and +if the argument to the +.B dev= +option +or the +.B CDR_DEVICE +environment +does not contain the characters ',', '/', '@' or ':', +it is interpreted as a device label name that was defined in the file +/etc/default/cdrecord (see FILES section). +.sp +.B \h'-2m'Autotarget Mode +.br +If no +.B dev= +option +and no +.B CDR_DEVICE +environment +is present, or if it +only contains a transport specifyer but no address notation, +.B scgskeleton +tries to scan the SCSI address space for CD-ROM drives. +If exactly one is found, this is used by default. +.TP +.BI timeout= # +Set the default SCSI command timeout value to +.IR # " seconds. +The default SCSI command timeout is the minimum timeout used for sending +SCSI commands. +If a SCSI command fails due to a timeout, you may try to raise the +default SCSI command timeout above the timeout value of the failed command. +If the command runs correctly with a raised command timeout, +please report the better timeout value and the corresponding command to +the author of the program. +If no +.I timeout +option is present, a default timeout of 40 seconds is used. +.TP +.BI debug= "#, " -d +Set the misc debug value to # (with debug=#) or increment +the misc debug level by one (with -d). If you specify +.I -dd, +this equals to +.BI debug= 2. +This may help to find problems while opening a driver for libscg. +as well as with sector sizes and sector types. +Using +.B \-debug +slows down the process and may be the reason for a buffer underrun. +.TP +.BR kdebug= "#, " kd= # +Tell the +.BR scg -driver +to modify the kernel debug value while SCSI commands are running. +.TP +.BR \-silent ", " \-s +Do not print out a status report for failed SCSI commands. +.TP +.B \-v +Increment the level of general verbosity by one. +This is used e.g. to display the progress of the process. +.TP +.B \-V +Increment the verbose level with respect of SCSI command transport by one. +This helps to debug problems +during the process, that occur in the CD-Recorder. +If you get incomprehensible error messages you should use this flag +to get more detailed output. +.B \-VV +will show data buffer content in addition. +Using +.B \-V +or +.B \-VV +slows down the process. +.B \-scanbus +Scan all SCSI devices on all SCSI busses and print the inquiry +strings. This option may be used to find SCSI address of the +devices on a system. +The numbers printed out as labels are computed by: +.B "bus * 100 + target +.TP +.BI scgopts= list +A comma separated list of SCSI options that are handled by libscg. +The implemented options may be uptated indepentendly from applications. +Currently, one option: +.B ignore\-resid +is supported to work around a Linux kernel bug. +.TP +.BR ts= # +Set the maximum transfer size for a single SCSI command to #. +The syntax for the +.B ts= +option is the same as for cdrecord fs=# or sdd bs=#. +.sp +If no +.B ts= +option has been specified, +.B scgskeleton +defaults to a transfer size of 256 kB. If libscg gets lower values from the +operating system, the value is reduced to the maximum value that is possible +with the current operating system. +Sometimes, it may help to further reduce the transfer size or to enhance it, +but note that it may take a long time to find a better value by experimenting +with the +.B ts= +option. + + +.SH EXAMPLES +.SH ENVIRONMENT +.TP +.B RSH +If the +.B RSH +environment is present, the remote connection will not be created via +.BR rcmd (3) +but by calling the program pointed to by +.BR RSH . +Use e.g. +.BR RSH= /usr/bin/ssh +to create a secure shell connection. +.sp +Note that this forces +.B cdrecord +to create a pipe to the +.B rsh(1) +program and disallows +.B cdrecord +to directly access the network socket to the remote server. +This makes it impossible to set up performance parameters and slows down +the connection compared to a +.B root +initiated +.B rcmd(3) +connection. +.TP +.B RSCSI +If the +.B RSCSI +environment is present, the remote SCSI server will not be the program +.B /opt/schily/sbin/rscsi +but the program pointed to by +.BR RSCSI . +Note that the remote SCSI server program name will be ignored if you log in +using an account that has been created with a remote SCSI server program as +login shell. +.SH "SEE ALSO" +.BR cdrecord (1), +.BR scg (7), +.BR rcmd (3), +.BR ssh (1). +.SH NOTES +.SH DIAGNOSTICS +.PP +A typical error message for a SCSI command looks like: +.sp +.RS +.nf +scgskeleton: I/O error. test unit ready: scsi sendcmd: no error +CDB: 00 20 00 00 00 00 +status: 0x2 (CHECK CONDITION) +Sense Bytes: 70 00 05 00 00 00 00 0A 00 00 00 00 25 00 00 00 00 00 +Sense Key: 0x5 Illegal Request, Segment 0 +Sense Code: 0x25 Qual 0x00 (logical unit not supported) Fru 0x0 +Sense flags: Blk 0 (not valid) +cmd finished after 0.002s timeout 40s +.fi +.sp +.RE +The first line gives information about the transport of the command. +The text after the first colon gives the error text for the system call +from the view of the kernel. It usually is: +.B "I/O error +unless other problems happen. The next words contain a short description for +the SCSI command that fails. The rest of the line tells you if there were +any problems for the transport of the command over the SCSI bus. +.B "fatal error +means that it was not possible to transport the command (i.e. no device present +at the requested SCSI address). +.PP +The second line prints the SCSI command descriptor block for the failed command. +.PP +The third line gives information on the SCSI status code returned by the +command, if the transport of the command succeeds. +This is error information from the SCSI device. +.PP +The fourth line is a hex dump of the auto request sense information for the +command. +.PP +The fifth line is the error text for the sense key if available, followed +by the segment number that is only valid if the command was a +.I copy +command. If the error message is not directly related to the current command, +the text +.I deferred error +is appended. +.PP +The sixth line is the error text for the sense code and the sense qualifier if available. +If the type of the device is known, the sense data is decoded from tables +in +.IR scsierrs.c " . +The text is followed by the error value for a field replaceable unit. +.PP +The seventh line prints the block number that is related to the failed command +and text for several error flags. The block number may not be valid. +.PP +The eight line reports the timeout set up for this command and the time +that the command really needed to complete. + +.SH BUGS +.SH AUTHOR +.nf +J\*org Schilling +Seestr. 110 +D-13353 Berlin +Germany +.fi +.PP +Additional information can be found on: +.br +http://cdrecord.org/private/cdrecord.html +.PP +If you have support questions, send them to: +.PP +.B +cdrtools-support@lists.sourceforge.net +.PP +If you have definitely found a bug, send a mail to: +.PP +.B +cdrtools-developers@lists.sourceforge.net +.br +or +.B +joerg.schilling@fokus.fraunhofer.de +.PP +To subscribe, use: +.PP +.B +https://lists.sourceforge.net/lists/listinfo/cdrtools-developers +.br +or +.B +https://lists.sourceforge.net/lists/listinfo/cdrtools-support diff -Nru cdrtools-2.01.01a33/scgskeleton/scsi_cdr.c cdrtools-3.02a09/scgskeleton/scsi_cdr.c --- cdrtools-2.01.01a33/scgskeleton/scsi_cdr.c 2007-07-08 18:37:18.000000000 +0000 +++ cdrtools-3.02a09/scgskeleton/scsi_cdr.c 1970-01-01 00:00:00.000000000 +0000 @@ -1,3108 +0,0 @@ -/* @(#)scsi_cdr.c 1.150 07/07/08 Copyright 1995-2007 J. Schilling */ -#ifndef lint -static char sccsid[] = - "@(#)scsi_cdr.c 1.150 07/07/08 Copyright 1995-2007 J. Schilling"; -#endif -/* - * SCSI command functions for cdrecord - * covering pre-MMC standard functions up to MMC-2 - * - * Copyright (c) 1995-2007 J. Schilling - */ -/* - * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. - * - * See the file CDDL.Schily.txt in this distribution for details. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file CDDL.Schily.txt from this distribution. - */ - -/* - * NOTICE: The Philips CDD 521 has several firmware bugs. - * One of them is not to respond to a SCSI selection - * within 200ms if the general load on the - * SCSI bus is high. To deal with this problem - * most of the SCSI commands are send with the - * SCG_CMD_RETRY flag enabled. - */ -#include - -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include - -#include -#include -#include -#include - -#include "scsimmc.h" -#include "cdrecord.h" - -#define strbeg(s1, s2) (strstr((s2), (s1)) == (s2)) - -EXPORT BOOL unit_ready __PR((SCSI *scgp)); -EXPORT BOOL wait_unit_ready __PR((SCSI *scgp, int secs)); -EXPORT BOOL scsi_in_progress __PR((SCSI *scgp)); -EXPORT BOOL cdr_underrun __PR((SCSI *scgp)); -EXPORT int test_unit_ready __PR((SCSI *scgp)); -EXPORT int rezero_unit __PR((SCSI *scgp)); -EXPORT int request_sense __PR((SCSI *scgp)); -EXPORT int request_sense_b __PR((SCSI *scgp, caddr_t bp, int cnt)); -EXPORT int inquiry __PR((SCSI *scgp, caddr_t, int)); -EXPORT int read_capacity __PR((SCSI *scgp)); -EXPORT void print_capacity __PR((SCSI *scgp, FILE *f)); -EXPORT int scsi_load_unload __PR((SCSI *scgp, int)); -EXPORT int scsi_prevent_removal __PR((SCSI *scgp, int)); -EXPORT int scsi_start_stop_unit __PR((SCSI *scgp, int, int, BOOL immed)); -EXPORT int scsi_set_speed __PR((SCSI *scgp, int readspeed, int writespeed, int rotctl)); -EXPORT int scsi_get_speed __PR((SCSI *scgp, int *readspeedp, int *writespeedp)); -EXPORT int qic02 __PR((SCSI *scgp, int)); -EXPORT int write_xscsi __PR((SCSI *scgp, caddr_t, long, long, int)); -EXPORT int write_xg0 __PR((SCSI *scgp, caddr_t, long, long, int)); -EXPORT int write_xg1 __PR((SCSI *scgp, caddr_t, long, long, int)); -EXPORT int write_xg5 __PR((SCSI *scgp, caddr_t, long, long, int)); -EXPORT int seek_scsi __PR((SCSI *scgp, long addr)); -EXPORT int seek_g0 __PR((SCSI *scgp, long addr)); -EXPORT int seek_g1 __PR((SCSI *scgp, long addr)); -EXPORT int scsi_flush_cache __PR((SCSI *scgp, BOOL immed)); -EXPORT int read_buffer __PR((SCSI *scgp, caddr_t bp, int cnt, int mode)); -EXPORT int write_buffer __PR((SCSI *scgp, char *buffer, long length, int mode, int bufferid, long offset)); -EXPORT int read_subchannel __PR((SCSI *scgp, caddr_t bp, int track, - int cnt, int msf, int subq, int fmt)); -EXPORT int read_toc __PR((SCSI *scgp, caddr_t, int, int, int, int)); -EXPORT int read_toc_philips __PR((SCSI *scgp, caddr_t, int, int, int, int)); -EXPORT int read_header __PR((SCSI *scgp, caddr_t, long, int, int)); -EXPORT int read_disk_info __PR((SCSI *scgp, caddr_t, int)); -EXPORT int read_track_info __PR((SCSI *scgp, caddr_t, int type, int addr, int cnt)); -EXPORT int get_trackinfo __PR((SCSI *scgp, caddr_t, int type, int addr, int cnt)); -EXPORT int read_rzone_info __PR((SCSI *scgp, caddr_t bp, int cnt)); -EXPORT int reserve_tr_rzone __PR((SCSI *scgp, long size)); -EXPORT int read_dvd_structure __PR((SCSI *scgp, caddr_t bp, int cnt, int mt, int addr, int layer, int fmt)); -EXPORT int send_dvd_structure __PR((SCSI *scgp, caddr_t bp, int cnt, int fmt)); -EXPORT int send_opc __PR((SCSI *scgp, caddr_t, int cnt, int doopc)); -EXPORT int read_track_info_philips __PR((SCSI *scgp, caddr_t, int, int)); -EXPORT int scsi_close_tr_session __PR((SCSI *scgp, int type, int track, BOOL immed)); -EXPORT int read_master_cue __PR((SCSI *scgp, caddr_t bp, int sheet, int cnt)); -EXPORT int send_cue_sheet __PR((SCSI *scgp, caddr_t bp, long size)); -EXPORT int read_buff_cap __PR((SCSI *scgp, long *, long *)); -EXPORT int scsi_blank __PR((SCSI *scgp, long addr, int blanktype, BOOL immed)); -EXPORT BOOL allow_atapi __PR((SCSI *scgp, BOOL new)); -EXPORT int mode_select __PR((SCSI *scgp, Uchar *, int, int, int)); -EXPORT int mode_sense __PR((SCSI *scgp, Uchar *dp, int cnt, int page, int pcf)); -EXPORT int mode_select_sg0 __PR((SCSI *scgp, Uchar *, int, int, int)); -EXPORT int mode_sense_sg0 __PR((SCSI *scgp, Uchar *dp, int cnt, int page, int pcf)); -EXPORT int mode_select_g0 __PR((SCSI *scgp, Uchar *, int, int, int)); -EXPORT int mode_select_g1 __PR((SCSI *scgp, Uchar *, int, int, int)); -EXPORT int mode_sense_g0 __PR((SCSI *scgp, Uchar *dp, int cnt, int page, int pcf)); -EXPORT int mode_sense_g1 __PR((SCSI *scgp, Uchar *dp, int cnt, int page, int pcf)); -EXPORT int read_tochdr __PR((SCSI *scgp, cdr_t *, int *, int *)); -EXPORT int read_cdtext __PR((SCSI *scgp)); -EXPORT int read_trackinfo __PR((SCSI *scgp, int, long *, struct msf *, int *, int *, int *)); -EXPORT int read_B0 __PR((SCSI *scgp, BOOL isbcd, long *b0p, long *lop)); -EXPORT int read_session_offset __PR((SCSI *scgp, long *)); -EXPORT int read_session_offset_philips __PR((SCSI *scgp, long *)); -EXPORT int sense_secsize __PR((SCSI *scgp, int current)); -EXPORT int select_secsize __PR((SCSI *scgp, int)); -EXPORT BOOL is_cddrive __PR((SCSI *scgp)); -EXPORT BOOL is_unknown_dev __PR((SCSI *scgp)); -EXPORT int read_scsi __PR((SCSI *scgp, caddr_t, long, int)); -EXPORT int read_g0 __PR((SCSI *scgp, caddr_t, long, int)); -EXPORT int read_g1 __PR((SCSI *scgp, caddr_t, long, int)); -EXPORT BOOL getdev __PR((SCSI *scgp, BOOL)); -EXPORT void printinq __PR((SCSI *scgp, FILE *f)); -EXPORT void printdev __PR((SCSI *scgp)); -EXPORT BOOL do_inquiry __PR((SCSI *scgp, BOOL)); -EXPORT BOOL recovery_needed __PR((SCSI *scgp, cdr_t *)); -EXPORT int scsi_load __PR((SCSI *scgp, cdr_t *)); -EXPORT int scsi_unload __PR((SCSI *scgp, cdr_t *)); -EXPORT int scsi_cdr_write __PR((SCSI *scgp, caddr_t bp, long sectaddr, long size, int blocks, BOOL islast)); -EXPORT struct cd_mode_page_2A * mmc_cap __PR((SCSI *scgp, Uchar *modep)); -EXPORT void mmc_getval __PR((struct cd_mode_page_2A *mp, - BOOL *cdrrp, BOOL *cdwrp, - BOOL *cdrrwp, BOOL *cdwrwp, - BOOL *dvdp, BOOL *dvdwp)); -EXPORT BOOL is_mmc __PR((SCSI *scgp, BOOL *cdwp, BOOL *dvdwp)); -EXPORT BOOL mmc_check __PR((SCSI *scgp, BOOL *cdrrp, BOOL *cdwrp, - BOOL *cdrrwp, BOOL *cdwrwp, - BOOL *dvdp, BOOL *dvdwp)); -LOCAL void print_speed __PR((char *fmt, int val)); -EXPORT void print_capabilities __PR((SCSI *scgp)); -extern int verify __PR((SCSI *scgp, long start, int count, long *bad_block)); - -EXPORT BOOL -unit_ready(scgp) - SCSI *scgp; -{ - register struct scg_cmd *scmd = scgp->scmd; - - if (test_unit_ready(scgp) >= 0) /* alles OK */ - return (TRUE); - else if (scmd->error >= SCG_FATAL) /* nicht selektierbar */ - return (FALSE); - - if (scg_sense_key(scgp) == SC_UNIT_ATTENTION) { - if (test_unit_ready(scgp) >= 0) /* alles OK */ - return (TRUE); - } - if ((scg_cmd_status(scgp) & ST_BUSY) != 0) { - /* - * Busy/reservation_conflict - */ - usleep(500000); - if (test_unit_ready(scgp) >= 0) /* alles OK */ - return (TRUE); - } - if (scg_sense_key(scgp) == -1) { /* non extended Sense */ - if (scg_sense_code(scgp) == 4) /* NOT_READY */ - return (FALSE); - return (TRUE); - } - /* FALSE wenn NOT_READY */ - return (scg_sense_key(scgp) != SC_NOT_READY); -} - -EXPORT BOOL -wait_unit_ready(scgp, secs) - SCSI *scgp; - int secs; -{ - int i; - int c; - int k; - int ret; - int err; - - seterrno(0); - scgp->silent++; - ret = test_unit_ready(scgp); /* eat up unit attention */ - if (ret < 0) { - err = geterrno(); - - if (err == EPERM || err == EACCES) { - scgp->silent--; - return (FALSE); - } - ret = test_unit_ready(scgp); /* got power on condition? */ - } - scgp->silent--; - - if (ret >= 0) /* success that's enough */ - return (TRUE); - - scgp->silent++; - for (i = 0; i < secs && (ret = test_unit_ready(scgp)) < 0; i++) { - if (scgp->scmd->scb.busy != 0) { - sleep(1); - continue; - } - c = scg_sense_code(scgp); - k = scg_sense_key(scgp); - /* - * Abort quickly if it does not make sense to wait. - * 0x30 == Cannot read medium - * 0x3A == Medium not present - */ - if ((k == SC_NOT_READY && (c == 0x3A || c == 0x30)) || - (k == SC_MEDIUM_ERROR)) { - if (scgp->silent <= 1) - scg_printerr(scgp); - scgp->silent--; - return (FALSE); - } - sleep(1); - } - scgp->silent--; - if (ret < 0) - return (FALSE); - return (TRUE); -} - -EXPORT BOOL -scsi_in_progress(scgp) - SCSI *scgp; -{ - if (scg_sense_key(scgp) == SC_NOT_READY && - /* - * Logigal unit not ready operation/long_write in progress - */ - scg_sense_code(scgp) == 0x04 && - (scg_sense_qual(scgp) == 0x04 || /* CyberDr. "format in progress"*/ - scg_sense_qual(scgp) == 0x07 || /* "operation in progress" */ - scg_sense_qual(scgp) == 0x08)) { /* "long write in progress" */ - return (TRUE); - } else { - if (scgp->silent <= 1) - scg_printerr(scgp); - } - return (FALSE); -} - -EXPORT BOOL -cdr_underrun(scgp) - SCSI *scgp; -{ - if ((scg_sense_key(scgp) != SC_ILLEGAL_REQUEST && - scg_sense_key(scgp) != SC_MEDIUM_ERROR)) - return (FALSE); - - if ((scg_sense_code(scgp) == 0x21 && - (scg_sense_qual(scgp) == 0x00 || /* logical block address out of range */ - scg_sense_qual(scgp) == 0x02)) || /* invalid address for write */ - - (scg_sense_code(scgp) == 0x0C && - scg_sense_qual(scgp) == 0x09)) { /* write error - loss of streaming */ - return (TRUE); - } - /* - * XXX Bei manchen Brennern kommt mach dem der Brennvorgang bereits - * XXX eine Weile gelaufen ist ein 5/24/0 Invalid field in CDB. - * XXX Daher sollte man testen ob schon geschrieben wurde... - */ - return (FALSE); -} - -EXPORT int -test_unit_ready(scgp) - SCSI *scgp; -{ - register struct scg_cmd *scmd = scgp->scmd; - - fillbytes((caddr_t)scmd, sizeof (*scmd), '\0'); - scmd->addr = (caddr_t)0; - scmd->size = 0; - scmd->flags = SCG_DISRE_ENA | (scgp->silent ? SCG_SILENT:0); - scmd->cdb_len = SC_G0_CDBLEN; - scmd->sense_len = CCS_SENSE_LEN; - scmd->cdb.g0_cdb.cmd = SC_TEST_UNIT_READY; - scmd->cdb.g0_cdb.lun = scg_lun(scgp); - - scgp->cmdname = "test unit ready"; - - return (scg_cmd(scgp)); -} - -EXPORT int -rezero_unit(scgp) - SCSI *scgp; -{ - register struct scg_cmd *scmd = scgp->scmd; - - fillbytes((caddr_t)scmd, sizeof (*scmd), '\0'); - scmd->addr = (caddr_t)0; - scmd->size = 0; - scmd->flags = SCG_DISRE_ENA; - scmd->cdb_len = SC_G0_CDBLEN; - scmd->sense_len = CCS_SENSE_LEN; - scmd->cdb.g0_cdb.cmd = SC_REZERO_UNIT; - scmd->cdb.g0_cdb.lun = scg_lun(scgp); - - scgp->cmdname = "rezero unit"; - - return (scg_cmd(scgp)); -} - -EXPORT int -request_sense(scgp) - SCSI *scgp; -{ - char sensebuf[CCS_SENSE_LEN]; - char *cmdsave; - - cmdsave = scgp->cmdname; - - if (request_sense_b(scgp, sensebuf, sizeof (sensebuf)) < 0) - return (-1); - scgp->cmdname = cmdsave; - scg_prsense((Uchar *)sensebuf, CCS_SENSE_LEN - scg_getresid(scgp)); - return (0); -} - -EXPORT int -request_sense_b(scgp, bp, cnt) - SCSI *scgp; - caddr_t bp; - int cnt; -{ - register struct scg_cmd *scmd = scgp->scmd; - - - fillbytes((caddr_t)scmd, sizeof (*scmd), '\0'); - scmd->addr = bp; - scmd->size = cnt; - scmd->flags = SCG_RECV_DATA|SCG_DISRE_ENA; - scmd->cdb_len = SC_G0_CDBLEN; - scmd->sense_len = CCS_SENSE_LEN; - scmd->cdb.g0_cdb.cmd = SC_REQUEST_SENSE; - scmd->cdb.g0_cdb.lun = scg_lun(scgp); - scmd->cdb.g0_cdb.count = cnt; - - scgp->cmdname = "request_sense"; - - if (scg_cmd(scgp) < 0) - return (-1); - return (0); -} - -EXPORT int -inquiry(scgp, bp, cnt) - SCSI *scgp; - caddr_t bp; - int cnt; -{ - register struct scg_cmd *scmd = scgp->scmd; - - fillbytes(bp, cnt, '\0'); - fillbytes((caddr_t)scmd, sizeof (*scmd), '\0'); - scmd->addr = bp; - scmd->size = cnt; - scmd->flags = SCG_RECV_DATA|SCG_DISRE_ENA; - scmd->cdb_len = SC_G0_CDBLEN; - scmd->sense_len = CCS_SENSE_LEN; - scmd->cdb.g0_cdb.cmd = SC_INQUIRY; - scmd->cdb.g0_cdb.lun = scg_lun(scgp); - scmd->cdb.g0_cdb.count = cnt; - - scgp->cmdname = "inquiry"; - - if (scg_cmd(scgp) < 0) - return (-1); - if (scgp->verbose) - scg_prbytes("Inquiry Data :", (Uchar *)bp, cnt - scg_getresid(scgp)); - return (0); -} - -EXPORT int -read_capacity(scgp) - SCSI *scgp; -{ - register struct scg_cmd *scmd = scgp->scmd; - - fillbytes((caddr_t)scmd, sizeof (*scmd), '\0'); - scmd->addr = (caddr_t)scgp->cap; - scmd->size = sizeof (struct scsi_capacity); - scmd->flags = SCG_RECV_DATA|SCG_DISRE_ENA; - scmd->cdb_len = SC_G1_CDBLEN; - scmd->sense_len = CCS_SENSE_LEN; - scmd->cdb.g1_cdb.cmd = 0x25; /* Read Capacity */ - scmd->cdb.g1_cdb.lun = scg_lun(scgp); - g1_cdblen(&scmd->cdb.g1_cdb, 0); /* Full Media */ - - scgp->cmdname = "read capacity"; - - if (scg_cmd(scgp) < 0) { - return (-1); - } else { - long cbsize; - long cbaddr; - - /* - * c_bsize & c_baddr are signed Int32_t - * so we use signed int conversion here. - */ - cbsize = a_to_4_byte(&scgp->cap->c_bsize); - cbaddr = a_to_4_byte(&scgp->cap->c_baddr); - scgp->cap->c_bsize = cbsize; - scgp->cap->c_baddr = cbaddr; - } - return (0); -} - -EXPORT void -print_capacity(scgp, f) - SCSI *scgp; - FILE *f; -{ - long kb; - long mb; - long prmb; - double dkb; - - dkb = (scgp->cap->c_baddr+1.0) * (scgp->cap->c_bsize/1024.0); - kb = dkb; - mb = dkb / 1024.0; - prmb = dkb / 1000.0 * 1.024; - fprintf(f, "Capacity: %ld Blocks = %ld kBytes = %ld MBytes = %ld prMB\n", - (long)scgp->cap->c_baddr+1, kb, mb, prmb); - fprintf(f, "Sectorsize: %ld Bytes\n", (long)scgp->cap->c_bsize); -} - -EXPORT int -scsi_load_unload(scgp, load) - SCSI *scgp; - int load; -{ - register struct scg_cmd *scmd = scgp->scmd; - - fillbytes((caddr_t)scmd, sizeof (*scmd), '\0'); - scmd->flags = SCG_DISRE_ENA; - scmd->cdb_len = SC_G5_CDBLEN; - scmd->sense_len = CCS_SENSE_LEN; - scmd->cdb.g5_cdb.cmd = 0xA6; - scmd->cdb.g5_cdb.lun = scg_lun(scgp); - scmd->cdb.g5_cdb.addr[1] = load?3:2; - scmd->cdb.g5_cdb.count[2] = 0; /* slot # */ - - scgp->cmdname = "medium load/unload"; - - if (scg_cmd(scgp) < 0) - return (-1); - return (0); -} - -EXPORT int -scsi_prevent_removal(scgp, prevent) - SCSI *scgp; - int prevent; -{ - register struct scg_cmd *scmd = scgp->scmd; - - fillbytes((caddr_t)scmd, sizeof (*scmd), '\0'); - scmd->flags = SCG_DISRE_ENA; - scmd->cdb_len = SC_G0_CDBLEN; - scmd->sense_len = CCS_SENSE_LEN; - scmd->cdb.g0_cdb.cmd = 0x1E; - scmd->cdb.g0_cdb.lun = scg_lun(scgp); - scmd->cdb.g0_cdb.count = prevent & 1; - - scgp->cmdname = "prevent/allow medium removal"; - - if (scg_cmd(scgp) < 0) - return (-1); - return (0); -} - - -EXPORT int -scsi_start_stop_unit(scgp, flg, loej, immed) - SCSI *scgp; - int flg; - int loej; - BOOL immed; -{ - register struct scg_cmd *scmd = scgp->scmd; - - fillbytes((caddr_t)scmd, sizeof (*scmd), '\0'); - scmd->flags = SCG_DISRE_ENA; - scmd->cdb_len = SC_G0_CDBLEN; - scmd->sense_len = CCS_SENSE_LEN; - scmd->cdb.g0_cdb.cmd = 0x1B; /* Start Stop Unit */ - scmd->cdb.g0_cdb.lun = scg_lun(scgp); - scmd->cdb.g0_cdb.count = (flg ? 1:0) | (loej ? 2:0); - - if (immed) - scmd->cdb.cmd_cdb[1] |= 0x01; - - scgp->cmdname = "start/stop unit"; - - return (scg_cmd(scgp)); -} - -EXPORT int -scsi_set_speed(scgp, readspeed, writespeed, rotctl) - SCSI *scgp; - int readspeed; - int writespeed; - int rotctl; -{ - register struct scg_cmd *scmd = scgp->scmd; - - fillbytes((caddr_t)scmd, sizeof (*scmd), '\0'); - scmd->flags = SCG_DISRE_ENA; - scmd->cdb_len = SC_G5_CDBLEN; - scmd->sense_len = CCS_SENSE_LEN; - scmd->cdb.g5_cdb.cmd = 0xBB; - scmd->cdb.g5_cdb.lun = scg_lun(scgp); - - if (readspeed < 0) - i_to_2_byte(&scmd->cdb.g5_cdb.addr[0], 0xFFFF); - else - i_to_2_byte(&scmd->cdb.g5_cdb.addr[0], readspeed); - if (writespeed < 0) - i_to_2_byte(&scmd->cdb.g5_cdb.addr[2], 0xFFFF); - else - i_to_2_byte(&scmd->cdb.g5_cdb.addr[2], writespeed); - - scmd->cdb.cmd_cdb[1] |= rotctl & 0x03; - - scgp->cmdname = "set cd speed"; - - if (scg_cmd(scgp) < 0) - return (-1); - return (0); -} - -EXPORT int -scsi_get_speed(scgp, readspeedp, writespeedp) - SCSI *scgp; - int *readspeedp; - int *writespeedp; -{ - struct cd_mode_page_2A *mp; - Uchar m[256]; - int val; - - scgp->silent++; - mp = mmc_cap(scgp, m); /* Get MMC capabilities in allocated mp */ - scgp->silent--; - if (mp == NULL) - return (-1); /* Pre SCSI-3/mmc drive */ - - val = a_to_u_2_byte(mp->cur_read_speed); - if (readspeedp) - *readspeedp = val; - - if (mp->p_len >= 28) - val = a_to_u_2_byte(mp->v3_cur_write_speed); - else - val = a_to_u_2_byte(mp->cur_write_speed); - if (writespeedp) - *writespeedp = val; - - return (0); -} - - -EXPORT int -qic02(scgp, cmd) - SCSI *scgp; - int cmd; -{ - register struct scg_cmd *scmd = scgp->scmd; - - fillbytes((caddr_t)scmd, sizeof (*scmd), '\0'); - scmd->addr = (caddr_t)0; - scmd->size = 0; - scmd->flags = SCG_DISRE_ENA; - scmd->cdb_len = SC_G0_CDBLEN; - scmd->sense_len = DEF_SENSE_LEN; - scmd->cdb.g0_cdb.cmd = 0x0D; /* qic02 Sysgen SC4000 */ - scmd->cdb.g0_cdb.lun = scg_lun(scgp); - scmd->cdb.g0_cdb.mid_addr = cmd; - - scgp->cmdname = "qic 02"; - return (scg_cmd(scgp)); -} - -#define G0_MAXADDR 0x1FFFFFL - -EXPORT int -write_xscsi(scgp, bp, addr, size, cnt) - SCSI *scgp; - caddr_t bp; /* address of buffer */ - long addr; /* disk address (sector) to put */ - long size; /* number of bytes to transfer */ - int cnt; /* sectorcount */ -{ - if (addr <= G0_MAXADDR) - return (write_xg0(scgp, bp, addr, size, cnt)); - else - return (write_xg1(scgp, bp, addr, size, cnt)); -} - -EXPORT int -write_xg0(scgp, bp, addr, size, cnt) - SCSI *scgp; - caddr_t bp; /* address of buffer */ - long addr; /* disk address (sector) to put */ - long size; /* number of bytes to transfer */ - int cnt; /* sectorcount */ -{ - register struct scg_cmd *scmd = scgp->scmd; - - fillbytes((caddr_t)scmd, sizeof (*scmd), '\0'); - scmd->addr = bp; - scmd->size = size; - scmd->flags = SCG_DISRE_ENA|SCG_CMD_RETRY; -/* scmd->flags = SCG_DISRE_ENA;*/ - scmd->cdb_len = SC_G0_CDBLEN; - scmd->sense_len = CCS_SENSE_LEN; - scmd->cdb.g0_cdb.cmd = SC_WRITE; - scmd->cdb.g0_cdb.lun = scg_lun(scgp); - g0_cdbaddr(&scmd->cdb.g0_cdb, addr); - scmd->cdb.g0_cdb.count = cnt; - - scgp->cmdname = "write_g0"; - - if (scg_cmd(scgp) < 0) - return (-1); - return (size - scg_getresid(scgp)); -} - -EXPORT int -write_xg1(scgp, bp, addr, size, cnt) - SCSI *scgp; - caddr_t bp; /* address of buffer */ - long addr; /* disk address (sector) to put */ - long size; /* number of bytes to transfer */ - int cnt; /* sectorcount */ -{ - register struct scg_cmd *scmd = scgp->scmd; - - fillbytes((caddr_t)scmd, sizeof (*scmd), '\0'); - scmd->addr = bp; - scmd->size = size; - scmd->flags = SCG_DISRE_ENA|SCG_CMD_RETRY; -/* scmd->flags = SCG_DISRE_ENA;*/ - scmd->cdb_len = SC_G1_CDBLEN; - scmd->sense_len = CCS_SENSE_LEN; - scmd->cdb.g1_cdb.cmd = SC_EWRITE; - scmd->cdb.g1_cdb.lun = scg_lun(scgp); - g1_cdbaddr(&scmd->cdb.g1_cdb, addr); - g1_cdblen(&scmd->cdb.g1_cdb, cnt); - - scgp->cmdname = "write_g1"; - - if (scg_cmd(scgp) < 0) - return (-1); - return (size - scg_getresid(scgp)); -} - -EXPORT int -write_xg5(scgp, bp, addr, size, cnt) - SCSI *scgp; - caddr_t bp; /* address of buffer */ - long addr; /* disk address (sector) to put */ - long size; /* number of bytes to transfer */ - int cnt; /* sectorcount */ -{ - register struct scg_cmd *scmd = scgp->scmd; - - fillbytes((caddr_t)scmd, sizeof (*scmd), '\0'); - scmd->addr = bp; - scmd->size = size; - scmd->flags = SCG_DISRE_ENA|SCG_CMD_RETRY; -/* scmd->flags = SCG_DISRE_ENA;*/ - scmd->cdb_len = SC_G5_CDBLEN; - scmd->sense_len = CCS_SENSE_LEN; - scmd->cdb.g5_cdb.cmd = 0xAA; - scmd->cdb.g5_cdb.lun = scg_lun(scgp); - g5_cdbaddr(&scmd->cdb.g5_cdb, addr); - g5_cdblen(&scmd->cdb.g5_cdb, cnt); - - scgp->cmdname = "write_g5"; - - if (scg_cmd(scgp) < 0) - return (-1); - return (size - scg_getresid(scgp)); -} - -EXPORT int -seek_scsi(scgp, addr) - SCSI *scgp; - long addr; -{ - if (addr <= G0_MAXADDR) - return (seek_g0(scgp, addr)); - else - return (seek_g1(scgp, addr)); -} - -EXPORT int -seek_g0(scgp, addr) - SCSI *scgp; - long addr; -{ - register struct scg_cmd *scmd = scgp->scmd; - - fillbytes((caddr_t)scmd, sizeof (*scmd), '\0'); - scmd->flags = SCG_DISRE_ENA; - scmd->cdb_len = SC_G0_CDBLEN; - scmd->sense_len = CCS_SENSE_LEN; - scmd->cdb.g0_cdb.cmd = 0x0B; /* Seek */ - scmd->cdb.g0_cdb.lun = scg_lun(scgp); - g0_cdbaddr(&scmd->cdb.g0_cdb, addr); - - scgp->cmdname = "seek_g0"; - - return (scg_cmd(scgp)); -} - -EXPORT int -seek_g1(scgp, addr) - SCSI *scgp; - long addr; -{ - register struct scg_cmd *scmd = scgp->scmd; - - fillbytes((caddr_t)scmd, sizeof (*scmd), '\0'); - scmd->flags = SCG_DISRE_ENA; - scmd->cdb_len = SC_G1_CDBLEN; - scmd->sense_len = CCS_SENSE_LEN; - scmd->cdb.g1_cdb.cmd = 0x2B; /* Seek G1 */ - scmd->cdb.g1_cdb.lun = scg_lun(scgp); - g1_cdbaddr(&scmd->cdb.g1_cdb, addr); - - scgp->cmdname = "seek_g1"; - - return (scg_cmd(scgp)); -} - -EXPORT int -scsi_flush_cache(scgp, immed) - SCSI *scgp; - BOOL immed; -{ - register struct scg_cmd *scmd = scgp->scmd; - - fillbytes((caddr_t)scmd, sizeof (*scmd), '\0'); - scmd->flags = SCG_DISRE_ENA; - scmd->cdb_len = SC_G1_CDBLEN; - scmd->sense_len = CCS_SENSE_LEN; - scmd->timeout = 2 * 60; /* Max: sizeof (CDR-cache)/150KB/s */ - scmd->cdb.g1_cdb.cmd = 0x35; - scmd->cdb.g1_cdb.lun = scg_lun(scgp); - - if (immed) - scmd->cdb.cmd_cdb[1] |= 0x02; - - scgp->cmdname = "flush cache"; - - if (scg_cmd(scgp) < 0) - return (-1); - return (0); -} - -EXPORT int -read_buffer(scgp, bp, cnt, mode) - SCSI *scgp; - caddr_t bp; - int cnt; - int mode; -{ - register struct scg_cmd *scmd = scgp->scmd; - - fillbytes((caddr_t)scmd, sizeof (*scmd), '\0'); - scmd->addr = bp; - scmd->size = cnt; - scmd->dma_read = 1; - scmd->cdb_len = SC_G1_CDBLEN; - scmd->sense_len = CCS_SENSE_LEN; - scmd->cdb.g1_cdb.cmd = 0x3C; /* Read Buffer */ - scmd->cdb.g1_cdb.lun = scg_lun(scgp); - scmd->cdb.cmd_cdb[1] |= (mode & 7); - g1_cdblen(&scmd->cdb.g1_cdb, cnt); - - scgp->cmdname = "read buffer"; - - return (scg_cmd(scgp)); -} - -EXPORT int -write_buffer(scgp, buffer, length, mode, bufferid, offset) - SCSI *scgp; - char *buffer; - long length; - int mode; - int bufferid; - long offset; -{ - register struct scg_cmd *scmd = scgp->scmd; - char *cdb; - - fillbytes((caddr_t)scmd, sizeof (*scmd), '\0'); - scmd->addr = buffer; - scmd->size = length; - scmd->flags = SCG_DISRE_ENA|SCG_CMD_RETRY; - scmd->cdb_len = SC_G1_CDBLEN; - scmd->sense_len = CCS_SENSE_LEN; - - cdb = (char *)scmd->cdb.cmd_cdb; - - cdb[0] = 0x3B; - cdb[1] = mode & 7; - cdb[2] = bufferid; - cdb[3] = offset >> 16; - cdb[4] = (offset >> 8) & 0xff; - cdb[5] = offset & 0xff; - cdb[6] = length >> 16; - cdb[7] = (length >> 8) & 0xff; - cdb[8] = length & 0xff; - - scgp->cmdname = "write_buffer"; - - if (scg_cmd(scgp) >= 0) - return (1); - return (0); -} - -EXPORT int -read_subchannel(scgp, bp, track, cnt, msf, subq, fmt) - SCSI *scgp; - caddr_t bp; - int track; - int cnt; - int msf; - int subq; - int fmt; - -{ - register struct scg_cmd *scmd = scgp->scmd; - - fillbytes((caddr_t)scmd, sizeof (*scmd), '\0'); - scmd->addr = bp; - scmd->size = cnt; - scmd->flags = SCG_RECV_DATA|SCG_DISRE_ENA; - scmd->cdb_len = SC_G1_CDBLEN; - scmd->sense_len = CCS_SENSE_LEN; - scmd->cdb.g1_cdb.cmd = 0x42; - scmd->cdb.g1_cdb.lun = scg_lun(scgp); - if (msf) - scmd->cdb.g1_cdb.res = 1; - if (subq) - scmd->cdb.g1_cdb.addr[0] = 0x40; - scmd->cdb.g1_cdb.addr[1] = fmt; - scmd->cdb.g1_cdb.res6 = track; - g1_cdblen(&scmd->cdb.g1_cdb, cnt); - - scgp->cmdname = "read subchannel"; - - if (scg_cmd(scgp) < 0) - return (-1); - return (0); -} - -EXPORT int -read_toc(scgp, bp, track, cnt, msf, fmt) - SCSI *scgp; - caddr_t bp; - int track; - int cnt; - int msf; - int fmt; - -{ - register struct scg_cmd *scmd = scgp->scmd; - - fillbytes((caddr_t)scmd, sizeof (*scmd), '\0'); - scmd->addr = bp; - scmd->size = cnt; - scmd->flags = SCG_RECV_DATA|SCG_DISRE_ENA; - scmd->cdb_len = SC_G1_CDBLEN; - scmd->sense_len = CCS_SENSE_LEN; - scmd->cdb.g1_cdb.cmd = 0x43; - scmd->cdb.g1_cdb.lun = scg_lun(scgp); - if (msf) - scmd->cdb.g1_cdb.res = 1; - scmd->cdb.g1_cdb.addr[0] = fmt & 0x0F; - scmd->cdb.g1_cdb.res6 = track; - g1_cdblen(&scmd->cdb.g1_cdb, cnt); - - scgp->cmdname = "read toc"; - - if (scg_cmd(scgp) < 0) - return (-1); - return (0); -} - -EXPORT int -read_toc_philips(scgp, bp, track, cnt, msf, fmt) - SCSI *scgp; - caddr_t bp; - int track; - int cnt; - int msf; - int fmt; - -{ - register struct scg_cmd *scmd = scgp->scmd; - - fillbytes((caddr_t)scmd, sizeof (*scmd), '\0'); - scmd->addr = bp; - scmd->size = cnt; - scmd->flags = SCG_RECV_DATA|SCG_DISRE_ENA; - scmd->cdb_len = SC_G1_CDBLEN; - scmd->sense_len = CCS_SENSE_LEN; - scmd->timeout = 4 * 60; /* May last 174s on a TEAC CD-R55S */ - scmd->cdb.g1_cdb.cmd = 0x43; - scmd->cdb.g1_cdb.lun = scg_lun(scgp); - if (msf) - scmd->cdb.g1_cdb.res = 1; - scmd->cdb.g1_cdb.res6 = track; - g1_cdblen(&scmd->cdb.g1_cdb, cnt); - - if (fmt & 1) - scmd->cdb.g1_cdb.vu_96 = 1; - if (fmt & 2) - scmd->cdb.g1_cdb.vu_97 = 1; - - scgp->cmdname = "read toc"; - - if (scg_cmd(scgp) < 0) - return (-1); - return (0); -} - -EXPORT int -read_header(scgp, bp, addr, cnt, msf) - SCSI *scgp; - caddr_t bp; - long addr; - int cnt; - int msf; -{ - register struct scg_cmd *scmd = scgp->scmd; - - fillbytes((caddr_t)scmd, sizeof (*scmd), '\0'); - scmd->addr = bp; - scmd->size = cnt; - scmd->flags = SCG_RECV_DATA|SCG_DISRE_ENA; - scmd->cdb_len = SC_G1_CDBLEN; - scmd->sense_len = CCS_SENSE_LEN; - scmd->cdb.g1_cdb.cmd = 0x44; - scmd->cdb.g1_cdb.lun = scg_lun(scgp); - if (msf) - scmd->cdb.g1_cdb.res = 1; - g1_cdbaddr(&scmd->cdb.g1_cdb, addr); - g1_cdblen(&scmd->cdb.g1_cdb, cnt); - - scgp->cmdname = "read header"; - - if (scg_cmd(scgp) < 0) - return (-1); - return (0); -} - -EXPORT int -read_disk_info(scgp, bp, cnt) - SCSI *scgp; - caddr_t bp; - int cnt; - -{ - register struct scg_cmd *scmd = scgp->scmd; - - fillbytes((caddr_t)scmd, sizeof (*scmd), '\0'); - scmd->addr = bp; - scmd->size = cnt; - scmd->flags = SCG_RECV_DATA|SCG_DISRE_ENA; - scmd->cdb_len = SC_G1_CDBLEN; - scmd->sense_len = CCS_SENSE_LEN; - scmd->timeout = 4 * 60; /* Needs up to 2 minutes */ - scmd->cdb.g1_cdb.cmd = 0x51; - scmd->cdb.g1_cdb.lun = scg_lun(scgp); - g1_cdblen(&scmd->cdb.g1_cdb, cnt); - - scgp->cmdname = "read disk info"; - - if (scg_cmd(scgp) < 0) - return (-1); - return (0); -} - -EXPORT int -read_track_info(scgp, bp, type, addr, cnt) - SCSI *scgp; - caddr_t bp; - int type; - int addr; - int cnt; - -{ - register struct scg_cmd *scmd = scgp->scmd; - - fillbytes((caddr_t)scmd, sizeof (*scmd), '\0'); - scmd->addr = bp; - scmd->size = cnt; - scmd->flags = SCG_RECV_DATA|SCG_DISRE_ENA; - scmd->cdb_len = SC_G1_CDBLEN; - scmd->sense_len = CCS_SENSE_LEN; - scmd->timeout = 4 * 60; /* Needs up to 2 minutes */ - scmd->cdb.g1_cdb.cmd = 0x52; - scmd->cdb.g1_cdb.lun = scg_lun(scgp); -/* scmd->cdb.cmd_cdb[1] = type & 0x03;*/ - scmd->cdb.cmd_cdb[1] = type; - g1_cdbaddr(&scmd->cdb.g1_cdb, addr); /* LBA/Track/Session */ - g1_cdblen(&scmd->cdb.g1_cdb, cnt); - - scgp->cmdname = "read track info"; - - if (scg_cmd(scgp) < 0) - return (-1); - return (0); -} - -EXPORT int -get_trackinfo(scgp, bp, type, addr, cnt) - SCSI *scgp; - caddr_t bp; - int type; - int addr; - int cnt; -{ - int len; - int ret; - - fillbytes(bp, cnt, '\0'); - - /* - * Used to be 2 instead of 4 (now). But some Y2k ATAPI drives as used - * by IOMEGA create a DMA overrun if we try to transfer only 2 bytes. - */ - if (read_track_info(scgp, bp, type, addr, 4) < 0) - return (-1); - - len = a_to_u_2_byte(bp); - len += 2; - if (len > cnt) - len = cnt; - ret = read_track_info(scgp, bp, type, addr, len); - -#ifdef DEBUG - if (lverbose > 1) - scg_prbytes("Track info:", (Uchar *)bp, - len-scg_getresid(scgp)); -#endif - return (ret); -} - -EXPORT int -read_rzone_info(scgp, bp, cnt) - SCSI *scgp; - caddr_t bp; - int cnt; -{ - return (get_trackinfo(scgp, bp, TI_TYPE_LBA, 0, cnt)); -} - -EXPORT int -reserve_tr_rzone(scgp, size) - SCSI *scgp; - long size; /* number of blocks */ -{ - register struct scg_cmd *scmd = scgp->scmd; - - fillbytes((caddr_t)scmd, sizeof (*scmd), '\0'); - scmd->addr = (caddr_t)0; - scmd->size = 0; - scmd->flags = SCG_DISRE_ENA|SCG_CMD_RETRY; - scmd->cdb_len = SC_G1_CDBLEN; - scmd->sense_len = CCS_SENSE_LEN; - scmd->cdb.g1_cdb.cmd = 0x53; - scmd->cdb.g1_cdb.lun = scg_lun(scgp); - - i_to_4_byte(&scmd->cdb.g1_cdb.addr[3], size); - - scgp->cmdname = "reserve_track_rzone"; - - if (scg_cmd(scgp) < 0) - return (-1); - return (0); -} - -EXPORT int -read_dvd_structure(scgp, bp, cnt, mt, addr, layer, fmt) - SCSI *scgp; - caddr_t bp; - int cnt; - int mt; - int addr; - int layer; - int fmt; -{ - register struct scg_cmd *scmd = scgp->scmd; - - fillbytes((caddr_t)scmd, sizeof (*scmd), '\0'); - scmd->addr = bp; - scmd->size = cnt; - scmd->flags = SCG_RECV_DATA|SCG_DISRE_ENA; - scmd->cdb_len = SC_G5_CDBLEN; - scmd->sense_len = CCS_SENSE_LEN; - scmd->timeout = 4 * 60; /* Needs up to 2 minutes ??? */ - scmd->cdb.g5_cdb.cmd = 0xAD; - scmd->cdb.g5_cdb.lun = scg_lun(scgp); - scmd->cdb.cmd_cdb[1] |= (mt & 0x0F); /* Media Type */ - g5_cdbaddr(&scmd->cdb.g5_cdb, addr); - g5_cdblen(&scmd->cdb.g5_cdb, cnt); - scmd->cdb.g5_cdb.count[0] = layer; - scmd->cdb.g5_cdb.count[1] = fmt; - - scgp->cmdname = "read dvd structure"; - - if (scg_cmd(scgp) < 0) - return (-1); - return (0); -} - -EXPORT int -send_dvd_structure(scgp, bp, cnt, fmt) - SCSI *scgp; - caddr_t bp; - int cnt; - int fmt; -{ - register struct scg_cmd *scmd = scgp->scmd; - - fillbytes((caddr_t)scmd, sizeof (*scmd), '\0'); - scmd->addr = bp; - scmd->size = cnt; - scmd->flags = SCG_DISRE_ENA; - scmd->cdb_len = SC_G5_CDBLEN; - scmd->sense_len = CCS_SENSE_LEN; - scmd->timeout = 4 * 60; /* Needs up to 2 minutes ??? */ - scmd->cdb.g5_cdb.cmd = 0xBF; - scmd->cdb.g5_cdb.lun = scg_lun(scgp); - g5_cdblen(&scmd->cdb.g5_cdb, cnt); - scmd->cdb.g5_cdb.count[0] = 0; - scmd->cdb.g5_cdb.count[1] = fmt; - - scgp->cmdname = "send dvd structure"; - - if (scg_cmd(scgp) < 0) - return (-1); - return (0); -} - -EXPORT int -send_opc(scgp, bp, cnt, doopc) - SCSI *scgp; - caddr_t bp; - int cnt; - int doopc; -{ - register struct scg_cmd *scmd = scgp->scmd; - - fillbytes((caddr_t)scmd, sizeof (*scmd), '\0'); - scmd->addr = bp; - scmd->size = cnt; - scmd->flags = SCG_DISRE_ENA; - scmd->cdb_len = SC_G1_CDBLEN; - scmd->sense_len = CCS_SENSE_LEN; - scmd->timeout = 60; - scmd->cdb.g1_cdb.cmd = 0x54; - scmd->cdb.g1_cdb.lun = scg_lun(scgp); - scmd->cdb.g1_cdb.reladr = doopc?1:0; - g1_cdblen(&scmd->cdb.g1_cdb, cnt); - - scgp->cmdname = "send opc"; - - if (scg_cmd(scgp) < 0) - return (-1); - return (0); -} - -EXPORT int -read_track_info_philips(scgp, bp, track, cnt) - SCSI *scgp; - caddr_t bp; - int track; - int cnt; - -{ - register struct scg_cmd *scmd = scgp->scmd; - - fillbytes((caddr_t)scmd, sizeof (*scmd), '\0'); - scmd->addr = bp; - scmd->size = cnt; - scmd->flags = SCG_RECV_DATA|SCG_DISRE_ENA; - scmd->cdb_len = SC_G1_CDBLEN; - scmd->sense_len = CCS_SENSE_LEN; - scmd->cdb.g1_cdb.cmd = 0xE5; - scmd->cdb.g1_cdb.lun = scg_lun(scgp); - g1_cdbaddr(&scmd->cdb.g1_cdb, track); - g1_cdblen(&scmd->cdb.g1_cdb, cnt); - - scgp->cmdname = "read track info"; - - if (scg_cmd(scgp) < 0) - return (-1); - return (0); -} - -EXPORT int -scsi_close_tr_session(scgp, type, track, immed) - SCSI *scgp; - int type; - int track; - BOOL immed; -{ - register struct scg_cmd *scmd = scgp->scmd; - - fillbytes((caddr_t)scmd, sizeof (*scmd), '\0'); - scmd->flags = SCG_DISRE_ENA; - scmd->cdb_len = SC_G1_CDBLEN; - scmd->sense_len = CCS_SENSE_LEN; - scmd->timeout = 8 * 60; /* Needs up to 4 minutes */ - scmd->cdb.g1_cdb.cmd = 0x5B; - scmd->cdb.g1_cdb.lun = scg_lun(scgp); - scmd->cdb.g1_cdb.addr[0] = type; - scmd->cdb.g1_cdb.addr[3] = track; - - if (immed) - scmd->cdb.g1_cdb.reladr = 1; -/* scmd->cdb.cmd_cdb[1] |= 0x01;*/ -#ifdef nono - scmd->cdb.g1_cdb.reladr = 1; /* IMM hack to test Mitsumi behaviour*/ -#endif - - scgp->cmdname = "close track/session"; - - if (scg_cmd(scgp) < 0) - return (-1); - return (0); -} - -EXPORT int -read_master_cue(scgp, bp, sheet, cnt) - SCSI *scgp; - caddr_t bp; /* address of master cue sheet */ - int sheet; /* Sheet number */ - int cnt; /* Transfer count */ -{ - register struct scg_cmd *scmd = scgp->scmd; - - fillbytes((caddr_t)scmd, sizeof (*scmd), '\0'); - scmd->addr = bp; - scmd->size = cnt; - scmd->flags = SCG_RECV_DATA|SCG_DISRE_ENA; - scmd->cdb_len = SC_G1_CDBLEN; - scmd->sense_len = CCS_SENSE_LEN; - scmd->cdb.g1_cdb.cmd = 0x59; /* Read master cue */ - scmd->cdb.g1_cdb.lun = scg_lun(scgp); - scmd->cdb.g1_cdb.addr[2] = sheet; - g1_cdblen(&scmd->cdb.g1_cdb, cnt); - - scgp->cmdname = "read master cue"; - - if (scg_cmd(scgp) < 0) - return (-1); - return (0); -} - -EXPORT int -send_cue_sheet(scgp, bp, size) - SCSI *scgp; - caddr_t bp; /* address of cue sheet buffer */ - long size; /* number of bytes to transfer */ -{ - register struct scg_cmd *scmd = scgp->scmd; - - fillbytes((caddr_t)scmd, sizeof (*scmd), '\0'); - scmd->addr = bp; - scmd->size = size; - scmd->flags = SCG_DISRE_ENA; - scmd->cdb_len = SC_G1_CDBLEN; - scmd->sense_len = CCS_SENSE_LEN; - scmd->cdb.g1_cdb.cmd = 0x5D; /* Send CUE sheet */ - scmd->cdb.g1_cdb.lun = scg_lun(scgp); - g1_cdblen(&scmd->cdb.g1_cdb, size); - - scgp->cmdname = "send_cue_sheet"; - - if (scg_cmd(scgp) < 0) - return (-1); - return (size - scmd->resid); -} - -EXPORT int -read_buff_cap(scgp, sp, fp) - SCSI *scgp; - long *sp; /* Size pointer */ - long *fp; /* Free pointer */ -{ - char resp[12]; - Ulong freespace; - Ulong bufsize; - int per; - register struct scg_cmd *scmd = scgp->scmd; - - fillbytes((caddr_t)scmd, sizeof (*scmd), '\0'); - scmd->addr = (caddr_t)resp; - scmd->size = sizeof (resp); - scmd->flags = SCG_RECV_DATA|SCG_DISRE_ENA; - scmd->cdb_len = SC_G1_CDBLEN; - scmd->sense_len = CCS_SENSE_LEN; - scmd->cdb.g1_cdb.cmd = 0x5C; /* Read buffer cap */ - scmd->cdb.g1_cdb.lun = scg_lun(scgp); - g1_cdblen(&scmd->cdb.g1_cdb, sizeof (resp)); - - scgp->cmdname = "read buffer cap"; - - if (scg_cmd(scgp) < 0) - return (-1); - - bufsize = a_to_u_4_byte(&resp[4]); - freespace = a_to_u_4_byte(&resp[8]); - if (sp) - *sp = bufsize; - if (fp) - *fp = freespace; - - if (scgp->verbose || (sp == 0 && fp == 0)) - printf("BFree: %ld K BSize: %ld K\n", freespace >> 10, bufsize >> 10); - - if (bufsize == 0) - return (0); - per = (100 * (bufsize - freespace)) / bufsize; - if (per < 0) - return (0); - if (per > 100) - return (100); - return (per); -} - -EXPORT int -scsi_blank(scgp, addr, blanktype, immed) - SCSI *scgp; - long addr; - int blanktype; - BOOL immed; -{ - register struct scg_cmd *scmd = scgp->scmd; - - fillbytes((caddr_t)scmd, sizeof (*scmd), '\0'); - scmd->flags = SCG_DISRE_ENA; - scmd->cdb_len = SC_G5_CDBLEN; - scmd->sense_len = CCS_SENSE_LEN; - scmd->timeout = 160 * 60; /* full blank at 1x could take 80 minutes */ - scmd->cdb.g5_cdb.cmd = 0xA1; /* Blank */ - scmd->cdb.g0_cdb.high_addr = blanktype; - g1_cdbaddr(&scmd->cdb.g5_cdb, addr); - - if (immed) - scmd->cdb.g5_cdb.res |= 8; -/* scmd->cdb.cmd_cdb[1] |= 0x10;*/ - - scgp->cmdname = "blank unit"; - - return (scg_cmd(scgp)); -} - -/* - * XXX First try to handle ATAPI: - * XXX ATAPI cannot handle SCSI 6 byte commands. - * XXX We try to simulate 6 byte mode sense/select. - */ -LOCAL BOOL is_atapi; - -EXPORT BOOL -allow_atapi(scgp, new) - SCSI *scgp; - BOOL new; -{ - BOOL old = is_atapi; - Uchar mode[256]; - - if (new == old) - return (old); - - scgp->silent++; - /* - * If a bad drive has been reset before, we may need to fire up two - * test unit ready commands to clear status. - */ - (void) unit_ready(scgp); - if (new && - mode_sense_g1(scgp, mode, 8, 0x3F, 0) < 0) { /* All pages current */ - new = FALSE; - } - scgp->silent--; - - is_atapi = new; - return (old); -} - -EXPORT int -mode_select(scgp, dp, cnt, smp, pf) - SCSI *scgp; - Uchar *dp; - int cnt; - int smp; - int pf; -{ - if (is_atapi) - return (mode_select_sg0(scgp, dp, cnt, smp, pf)); - return (mode_select_g0(scgp, dp, cnt, smp, pf)); -} - -EXPORT int -mode_sense(scgp, dp, cnt, page, pcf) - SCSI *scgp; - Uchar *dp; - int cnt; - int page; - int pcf; -{ - if (is_atapi) - return (mode_sense_sg0(scgp, dp, cnt, page, pcf)); - return (mode_sense_g0(scgp, dp, cnt, page, pcf)); -} - -/* - * Simulate mode select g0 with mode select g1. - */ -EXPORT int -mode_select_sg0(scgp, dp, cnt, smp, pf) - SCSI *scgp; - Uchar *dp; - int cnt; - int smp; - int pf; -{ - Uchar xmode[256+4]; - int amt = cnt; - - if (amt < 1 || amt > 255) { - /* XXX clear SCSI error codes ??? */ - return (-1); - } - - if (amt < 4) { /* Data length. medium type & VU */ - amt += 1; - } else { - amt += 4; - movebytes(&dp[4], &xmode[8], cnt-4); - } - xmode[0] = 0; - xmode[1] = 0; - xmode[2] = dp[1]; - xmode[3] = dp[2]; - xmode[4] = 0; - xmode[5] = 0; - i_to_2_byte(&xmode[6], (unsigned int)dp[3]); - - if (scgp->verbose) scg_prbytes("Mode Parameters (un-converted)", dp, cnt); - - return (mode_select_g1(scgp, xmode, amt, smp, pf)); -} - -/* - * Simulate mode sense g0 with mode sense g1. - */ -EXPORT int -mode_sense_sg0(scgp, dp, cnt, page, pcf) - SCSI *scgp; - Uchar *dp; - int cnt; - int page; - int pcf; -{ - Uchar xmode[256+4]; - int amt = cnt; - int len; - - if (amt < 1 || amt > 255) { - /* XXX clear SCSI error codes ??? */ - return (-1); - } - - fillbytes((caddr_t)xmode, sizeof (xmode), '\0'); - if (amt < 4) { /* Data length. medium type & VU */ - amt += 1; - } else { - amt += 4; - } - if (mode_sense_g1(scgp, xmode, amt, page, pcf) < 0) - return (-1); - - amt = cnt - scg_getresid(scgp); -/* - * For tests: Solaris 8 & LG CD-ROM always returns resid == amt - */ -/* amt = cnt;*/ - if (amt > 4) - movebytes(&xmode[8], &dp[4], amt-4); - len = a_to_u_2_byte(xmode); - if (len == 0) { - dp[0] = 0; - } else if (len < 6) { - if (len > 2) - len = 2; - dp[0] = len; - } else { - dp[0] = len - 3; - } - dp[1] = xmode[2]; - dp[2] = xmode[3]; - len = a_to_u_2_byte(&xmode[6]); - dp[3] = len; - - if (scgp->verbose) scg_prbytes("Mode Sense Data (converted)", dp, amt); - return (0); -} - -EXPORT int -mode_select_g0(scgp, dp, cnt, smp, pf) - SCSI *scgp; - Uchar *dp; - int cnt; - int smp; - int pf; -{ - register struct scg_cmd *scmd = scgp->scmd; - - fillbytes((caddr_t)scmd, sizeof (*scmd), '\0'); - scmd->addr = (caddr_t)dp; - scmd->size = cnt; - scmd->flags = SCG_DISRE_ENA; - scmd->cdb_len = SC_G0_CDBLEN; - scmd->sense_len = CCS_SENSE_LEN; - scmd->cdb.g0_cdb.cmd = SC_MODE_SELECT; - scmd->cdb.g0_cdb.lun = scg_lun(scgp); - scmd->cdb.g0_cdb.high_addr = smp ? 1 : 0 | pf ? 0x10 : 0; - scmd->cdb.g0_cdb.count = cnt; - - if (scgp->verbose) { - error("%s ", smp?"Save":"Set "); - scg_prbytes("Mode Parameters", dp, cnt); - } - - scgp->cmdname = "mode select g0"; - - return (scg_cmd(scgp)); -} - -EXPORT int -mode_select_g1(scgp, dp, cnt, smp, pf) - SCSI *scgp; - Uchar *dp; - int cnt; - int smp; - int pf; -{ - register struct scg_cmd *scmd = scgp->scmd; - - fillbytes((caddr_t)scmd, sizeof (*scmd), '\0'); - scmd->addr = (caddr_t)dp; - scmd->size = cnt; - scmd->flags = SCG_DISRE_ENA; - scmd->cdb_len = SC_G1_CDBLEN; - scmd->sense_len = CCS_SENSE_LEN; - scmd->cdb.g1_cdb.cmd = 0x55; - scmd->cdb.g1_cdb.lun = scg_lun(scgp); - scmd->cdb.g0_cdb.high_addr = smp ? 1 : 0 | pf ? 0x10 : 0; - g1_cdblen(&scmd->cdb.g1_cdb, cnt); - - if (scgp->verbose) { - printf("%s ", smp?"Save":"Set "); - scg_prbytes("Mode Parameters", dp, cnt); - } - - scgp->cmdname = "mode select g1"; - - return (scg_cmd(scgp)); -} - -EXPORT int -mode_sense_g0(scgp, dp, cnt, page, pcf) - SCSI *scgp; - Uchar *dp; - int cnt; - int page; - int pcf; -{ - register struct scg_cmd *scmd = scgp->scmd; - - fillbytes((caddr_t)scmd, sizeof (*scmd), '\0'); - scmd->addr = (caddr_t)dp; - scmd->size = 0xFF; - scmd->size = cnt; - scmd->flags = SCG_RECV_DATA|SCG_DISRE_ENA; - scmd->cdb_len = SC_G0_CDBLEN; - scmd->sense_len = CCS_SENSE_LEN; - scmd->cdb.g0_cdb.cmd = SC_MODE_SENSE; - scmd->cdb.g0_cdb.lun = scg_lun(scgp); -#ifdef nonono - scmd->cdb.g0_cdb.high_addr = 1<<4; /* DBD Disable Block desc. */ -#endif - scmd->cdb.g0_cdb.mid_addr = (page&0x3F) | ((pcf<<6)&0xC0); - scmd->cdb.g0_cdb.count = page ? 0xFF : 24; - scmd->cdb.g0_cdb.count = cnt; - - scgp->cmdname = "mode sense g0"; - - if (scg_cmd(scgp) < 0) - return (-1); - if (scgp->verbose) scg_prbytes("Mode Sense Data", dp, cnt - scg_getresid(scgp)); - return (0); -} - -EXPORT int -mode_sense_g1(scgp, dp, cnt, page, pcf) - SCSI *scgp; - Uchar *dp; - int cnt; - int page; - int pcf; -{ - register struct scg_cmd *scmd = scgp->scmd; - - fillbytes((caddr_t)scmd, sizeof (*scmd), '\0'); - scmd->addr = (caddr_t)dp; - scmd->size = cnt; - scmd->flags = SCG_RECV_DATA|SCG_DISRE_ENA; - scmd->cdb_len = SC_G1_CDBLEN; - scmd->sense_len = CCS_SENSE_LEN; - scmd->cdb.g1_cdb.cmd = 0x5A; - scmd->cdb.g1_cdb.lun = scg_lun(scgp); -#ifdef nonono - scmd->cdb.g0_cdb.high_addr = 1<<4; /* DBD Disable Block desc. */ -#endif - scmd->cdb.g1_cdb.addr[0] = (page&0x3F) | ((pcf<<6)&0xC0); - g1_cdblen(&scmd->cdb.g1_cdb, cnt); - - scgp->cmdname = "mode sense g1"; - - if (scg_cmd(scgp) < 0) - return (-1); - if (scgp->verbose) scg_prbytes("Mode Sense Data", dp, cnt - scg_getresid(scgp)); - return (0); -} - -struct trackdesc { - Uchar res0; - -#if defined(_BIT_FIELDS_LTOH) /* Intel byteorder */ - Ucbit control : 4; - Ucbit adr : 4; -#else /* Motorola byteorder */ - Ucbit adr : 4; - Ucbit control : 4; -#endif - - Uchar track; - Uchar res3; - Uchar addr[4]; -}; - -struct diskinfo { - struct tocheader hd; - struct trackdesc desc[1]; -}; - -struct siheader { - Uchar len[2]; - Uchar finished; - Uchar unfinished; -}; - -struct sidesc { - Uchar sess_number; - Uchar res1; - Uchar track; - Uchar res3; - Uchar addr[4]; -}; - -struct sinfo { - struct siheader hd; - struct sidesc desc[1]; -}; - -struct trackheader { - Uchar mode; - Uchar res[3]; - Uchar addr[4]; -}; -#define TRM_ZERO 0 -#define TRM_USER_ECC 1 /* 2048 bytes user data + 288 Bytes ECC/EDC */ -#define TRM_USER 2 /* All user data (2336 bytes) */ - - -EXPORT int -read_tochdr(scgp, dp, fp, lp) - SCSI *scgp; - cdr_t *dp; - int *fp; - int *lp; -{ - struct tocheader *tp; - char xb[256]; - int len; - - tp = (struct tocheader *)xb; - - fillbytes((caddr_t)xb, sizeof (xb), '\0'); - if (read_toc(scgp, xb, 0, sizeof (struct tocheader), 0, FMT_TOC) < 0) { - if (scgp->silent == 0) - errmsgno(EX_BAD, "Cannot read TOC header\n"); - return (-1); - } - len = a_to_u_2_byte(tp->len) + sizeof (struct tocheader)-2; - if (len >= 4) { - if (fp) - *fp = tp->first; - if (lp) - *lp = tp->last; - return (0); - } - return (-1); -} - -EXPORT int -read_cdtext(scgp) - SCSI *scgp; -{ - struct tocheader *tp; - char xb[256]; - int len; - char xxb[10000]; - - tp = (struct tocheader *)xb; - - fillbytes((caddr_t)xb, sizeof (xb), '\0'); - if (read_toc(scgp, xb, 0, sizeof (struct tocheader), 0, FMT_CDTEXT) < 0) { - if (scgp->silent == 0 || scgp->verbose > 0) - errmsgno(EX_BAD, "Cannot read CD-Text header\n"); - return (-1); - } - len = a_to_u_2_byte(tp->len) + sizeof (struct tocheader)-2; - printf("CD-Text len: %d\n", len); - - if (read_toc(scgp, xxb, 0, len, 0, FMT_CDTEXT) < 0) { - if (scgp->silent == 0) - errmsgno(EX_BAD, "Cannot read CD-Text\n"); - return (-1); - } - { - FILE *f = fileopen("cdtext.dat", "wctb"); - filewrite(f, xxb, len); - } - return (0); -} - -EXPORT int -read_trackinfo(scgp, track, offp, msfp, adrp, controlp, modep) - SCSI *scgp; - int track; - long *offp; - struct msf *msfp; - int *adrp; - int *controlp; - int *modep; -{ - struct diskinfo *dp; - char xb[256]; - int len; - - dp = (struct diskinfo *)xb; - - fillbytes((caddr_t)xb, sizeof (xb), '\0'); - if (read_toc(scgp, xb, track, sizeof (struct diskinfo), 0, FMT_TOC) < 0) { - if (scgp->silent <= 0) - errmsgno(EX_BAD, "Cannot read TOC\n"); - return (-1); - } - len = a_to_u_2_byte(dp->hd.len) + sizeof (struct tocheader)-2; - if (len < (int)sizeof (struct diskinfo)) - return (-1); - - if (offp) - *offp = a_to_4_byte(dp->desc[0].addr); - if (adrp) - *adrp = dp->desc[0].adr; - if (controlp) - *controlp = dp->desc[0].control; - - if (msfp) { - scgp->silent++; - if (read_toc(scgp, xb, track, sizeof (struct diskinfo), 1, FMT_TOC) - >= 0) { - msfp->msf_min = dp->desc[0].addr[1]; - msfp->msf_sec = dp->desc[0].addr[2]; - msfp->msf_frame = dp->desc[0].addr[3]; - } else if (read_toc(scgp, xb, track, sizeof (struct diskinfo), 0, FMT_TOC) - >= 0) { - /* - * Some drives (e.g. the Philips CDD-522) don't support - * to read the TOC in MSF mode. - */ - long off = a_to_4_byte(dp->desc[0].addr); - - lba_to_msf(off, msfp); - } else { - msfp->msf_min = 0; - msfp->msf_sec = 0; - msfp->msf_frame = 0; - } - scgp->silent--; - } - - if (modep == NULL) - return (0); - - if (track == 0xAA) { - *modep = -1; - return (0); - } - - fillbytes((caddr_t)xb, sizeof (xb), '\0'); - - scgp->silent++; - if (read_header(scgp, xb, *offp, 8, 0) >= 0) { - *modep = xb[0]; - } else if (read_track_info_philips(scgp, xb, track, 14) >= 0) { - *modep = xb[0xb] & 0xF; - } else { - *modep = -1; - } - scgp->silent--; - return (0); -} - -EXPORT int -read_B0(scgp, isbcd, b0p, lop) - SCSI *scgp; - BOOL isbcd; - long *b0p; - long *lop; -{ - struct fdiskinfo *dp; - struct ftrackdesc *tp; - char xb[8192]; - char *pe; - int len; - long l; - - dp = (struct fdiskinfo *)xb; - - fillbytes((caddr_t)xb, sizeof (xb), '\0'); - if (read_toc_philips(scgp, xb, 1, sizeof (struct tocheader), 0, FMT_FULLTOC) < 0) { - return (-1); - } - len = a_to_u_2_byte(dp->hd.len) + sizeof (struct tocheader)-2; - if (len < (int)sizeof (struct fdiskinfo)) - return (-1); - if (read_toc_philips(scgp, xb, 1, len, 0, FMT_FULLTOC) < 0) { - return (-1); - } - if (scgp->verbose) { - scg_prbytes("TOC data: ", (Uchar *)xb, - len > (int)sizeof (xb) - scg_getresid(scgp) ? - sizeof (xb) - scg_getresid(scgp) : len); - - tp = &dp->desc[0]; - pe = &xb[len]; - - while ((char *)tp < pe) { - scg_prbytes("ENT: ", (Uchar *)tp, 11); - tp++; - } - } - tp = &dp->desc[0]; - pe = &xb[len]; - - for (; (char *)tp < pe; tp++) { - if (tp->sess_number != dp->hd.last) - continue; - if (tp->point != 0xB0) - continue; - if (scgp->verbose) - scg_prbytes("B0: ", (Uchar *)tp, 11); - if (isbcd) { - l = msf_to_lba(from_bcd(tp->amin), - from_bcd(tp->asec), - from_bcd(tp->aframe), TRUE); - } else { - l = msf_to_lba(tp->amin, - tp->asec, - tp->aframe, TRUE); - } - if (b0p) - *b0p = l; - - if (scgp->verbose) - printf("B0 start: %ld\n", l); - - if (isbcd) { - l = msf_to_lba(from_bcd(tp->pmin), - from_bcd(tp->psec), - from_bcd(tp->pframe), TRUE); - } else { - l = msf_to_lba(tp->pmin, - tp->psec, - tp->pframe, TRUE); - } - - if (scgp->verbose) - printf("B0 lout: %ld\n", l); - if (lop) - *lop = l; - return (0); - } - return (-1); -} - - -/* - * Return address of first track in last session (SCSI-3/mmc version). - */ -EXPORT int -read_session_offset(scgp, offp) - SCSI *scgp; - long *offp; -{ - struct diskinfo *dp; - char xb[256]; - int len; - - dp = (struct diskinfo *)xb; - - fillbytes((caddr_t)xb, sizeof (xb), '\0'); - if (read_toc(scgp, (caddr_t)xb, 0, sizeof (struct tocheader), 0, FMT_SINFO) < 0) - return (-1); - - if (scgp->verbose) - scg_prbytes("tocheader: ", - (Uchar *)xb, sizeof (struct tocheader) - scg_getresid(scgp)); - - len = a_to_u_2_byte(dp->hd.len) + sizeof (struct tocheader)-2; - if (len > (int)sizeof (xb)) { - errmsgno(EX_BAD, "Session info too big.\n"); - return (-1); - } - if (read_toc(scgp, (caddr_t)xb, 0, len, 0, FMT_SINFO) < 0) - return (-1); - - if (scgp->verbose) - scg_prbytes("tocheader: ", - (Uchar *)xb, len - scg_getresid(scgp)); - - dp = (struct diskinfo *)xb; - if (offp) - *offp = a_to_u_4_byte(dp->desc[0].addr); - return (0); -} - -/* - * Return address of first track in last session (pre SCSI-3 version). - */ -EXPORT int -read_session_offset_philips(scgp, offp) - SCSI *scgp; - long *offp; -{ - struct sinfo *sp; - char xb[256]; - int len; - - sp = (struct sinfo *)xb; - - fillbytes((caddr_t)xb, sizeof (xb), '\0'); - if (read_toc_philips(scgp, (caddr_t)xb, 0, sizeof (struct siheader), 0, FMT_SINFO) < 0) - return (-1); - len = a_to_u_2_byte(sp->hd.len) + sizeof (struct siheader)-2; - if (len > (int)sizeof (xb)) { - errmsgno(EX_BAD, "Session info too big.\n"); - return (-1); - } - if (read_toc_philips(scgp, (caddr_t)xb, 0, len, 0, FMT_SINFO) < 0) - return (-1); - /* - * Old drives return the number of finished sessions in first/finished - * a descriptor is returned for each session. - * New drives return the number of the first and last session - * one descriptor for the last finished session is returned - * as in SCSI-3 - * In all cases the lowest session number is set to 1. - */ - sp = (struct sinfo *)xb; - if (offp) - *offp = a_to_u_4_byte(sp->desc[sp->hd.finished-1].addr); - return (0); -} - -EXPORT int -sense_secsize(scgp, current) - SCSI *scgp; - int current; -{ - Uchar mode[0x100]; - Uchar *p; - Uchar *ep; - int len; - int secsize = -1; - - scgp->silent++; - (void) unit_ready(scgp); - scgp->silent--; - - /* XXX Quick and dirty, musz verallgemeinert werden !!! */ - - fillbytes(mode, sizeof (mode), '\0'); - scgp->silent++; - - len = sizeof (struct scsi_mode_header) + - sizeof (struct scsi_mode_blockdesc); - /* - * Wenn wir hier get_mode_params() nehmen bekommen wir die Warnung: - * Warning: controller returns wrong page 1 for All pages page (3F). - */ - if (mode_sense(scgp, mode, len, 0x3F, current?0:2) < 0) { - fillbytes(mode, sizeof (mode), '\0'); - if (mode_sense(scgp, mode, len, 0, current?0:2) < 0) { /* VU (block desc) */ - scgp->silent--; - return (-1); - } - } - if (mode[3] == 8) { - if (scgp->debug) { - printf("Density: 0x%X\n", mode[4]); - printf("Blocks: %ld\n", a_to_u_3_byte(&mode[5])); - printf("Blocklen:%ld\n", a_to_u_3_byte(&mode[9])); - } - secsize = a_to_u_3_byte(&mode[9]); - } - fillbytes(mode, sizeof (mode), '\0'); - /* - * The ACARD TECH AEC-7720 ATAPI<->SCSI adaptor - * chokes if we try to transfer more than 0x40 bytes with - * mode_sense of all pages. So try to avoid to run this - * command if possible. - */ - if (scgp->debug && - mode_sense(scgp, mode, 0xFE, 0x3F, current?0:2) >= 0) { /* All Pages */ - - ep = mode+mode[0]; /* Points to last byte of data */ - p = &mode[4]; - p += mode[3]; - printf("Pages: "); - while (p < ep) { - printf("0x%X ", *p&0x3F); - p += p[1]+2; - } - printf("\n"); - } - scgp->silent--; - - return (secsize); -} - -EXPORT int -select_secsize(scgp, secsize) - SCSI *scgp; - int secsize; -{ - struct scsi_mode_data md; - int count = sizeof (struct scsi_mode_header) + - sizeof (struct scsi_mode_blockdesc); - - (void) test_unit_ready(scgp); /* clear any error situation */ - - fillbytes((caddr_t)&md, sizeof (md), '\0'); - md.header.blockdesc_len = 8; - i_to_3_byte(md.blockdesc.lblen, secsize); - - return (mode_select(scgp, (Uchar *)&md, count, 0, scgp->inq->data_format >= 2)); -} - -EXPORT BOOL -is_cddrive(scgp) - SCSI *scgp; -{ - return (scgp->inq->type == INQ_ROMD || scgp->inq->type == INQ_WORM); -} - -EXPORT BOOL -is_unknown_dev(scgp) - SCSI *scgp; -{ - return (scgp->dev == DEV_UNKNOWN); -} - -#ifndef DEBUG -#define DEBUG -#endif -#ifdef DEBUG - -EXPORT int -read_scsi(scgp, bp, addr, cnt) - SCSI *scgp; - caddr_t bp; - long addr; - int cnt; -{ - if (addr <= G0_MAXADDR && cnt < 256 && !is_atapi) - return (read_g0(scgp, bp, addr, cnt)); - else - return (read_g1(scgp, bp, addr, cnt)); -} - -EXPORT int -read_g0(scgp, bp, addr, cnt) - SCSI *scgp; - caddr_t bp; - long addr; - int cnt; -{ - register struct scg_cmd *scmd = scgp->scmd; - - if (scgp->cap->c_bsize <= 0) - raisecond("capacity_not_set", 0L); - - fillbytes((caddr_t)scmd, sizeof (*scmd), '\0'); - scmd->addr = bp; - scmd->size = cnt*scgp->cap->c_bsize; - scmd->flags = SCG_RECV_DATA|SCG_DISRE_ENA; - scmd->cdb_len = SC_G0_CDBLEN; - scmd->sense_len = CCS_SENSE_LEN; - scmd->cdb.g0_cdb.cmd = SC_READ; - scmd->cdb.g0_cdb.lun = scg_lun(scgp); - g0_cdbaddr(&scmd->cdb.g0_cdb, addr); - scmd->cdb.g0_cdb.count = cnt; -/* scmd->cdb.g0_cdb.vu_56 = 1;*/ - - scgp->cmdname = "read_g0"; - - return (scg_cmd(scgp)); -} - -EXPORT int -read_g1(scgp, bp, addr, cnt) - SCSI *scgp; - caddr_t bp; - long addr; - int cnt; -{ - register struct scg_cmd *scmd = scgp->scmd; - - if (scgp->cap->c_bsize <= 0) - raisecond("capacity_not_set", 0L); - - fillbytes((caddr_t)scmd, sizeof (*scmd), '\0'); - scmd->addr = bp; - scmd->size = cnt*scgp->cap->c_bsize; - scmd->flags = SCG_RECV_DATA|SCG_DISRE_ENA; - scmd->cdb_len = SC_G1_CDBLEN; - scmd->sense_len = CCS_SENSE_LEN; - scmd->cdb.g1_cdb.cmd = SC_EREAD; - scmd->cdb.g1_cdb.lun = scg_lun(scgp); - g1_cdbaddr(&scmd->cdb.g1_cdb, addr); - g1_cdblen(&scmd->cdb.g1_cdb, cnt); - - scgp->cmdname = "read_g1"; - - return (scg_cmd(scgp)); -} -#endif /* DEBUG */ - -EXPORT BOOL -getdev(scgp, print) - SCSI *scgp; - BOOL print; -{ - BOOL got_inquiry = TRUE; - char vendor_info[8+1]; - char prod_ident[16+1]; - char prod_revision[4+1]; - int inq_len = 0; - register struct scg_cmd *scmd = scgp->scmd; - register struct scsi_inquiry *inq = scgp->inq; - - - fillbytes((caddr_t)inq, sizeof (*inq), '\0'); - scgp->dev = DEV_UNKNOWN; - scgp->silent++; - (void) unit_ready(scgp); - if (scmd->error >= SCG_FATAL && - !(scmd->scb.chk && scmd->sense_count > 0)) { - scgp->silent--; - return (FALSE); - } - - -/* if (scmd->error < SCG_FATAL || scmd->scb.chk && scmd->sense_count > 0){*/ - - if (inquiry(scgp, (caddr_t)inq, sizeof (*inq)) < 0) { - got_inquiry = FALSE; - } else { - inq_len = sizeof (*inq) - scg_getresid(scgp); - } - if (!got_inquiry) { - if (scgp->verbose) { - printf( - "error: %d scb.chk: %d sense_count: %d sense.code: 0x%x\n", - scmd->error, scmd->scb.chk, - scmd->sense_count, scmd->sense.code); - } - /* - * Folgende Kontroller kennen das Kommando - * INQUIRY nicht: - * - * ADAPTEC ACB-4000, ACB-4010, ACB 4070 - * SYSGEN SC4000 - * - * Leider reagieren ACB40X0 und ACB5500 identisch - * wenn drive not ready (code == not ready), - * sie sind dann nicht zu unterscheiden. - */ - - if (scmd->scb.chk && scmd->sense_count == 4) { - /* Test auf SYSGEN */ - (void) qic02(scgp, 0x12); /* soft lock on */ - if (qic02(scgp, 1) < 0) { /* soft lock off */ - scgp->dev = DEV_ACB40X0; -/* scgp->dev = acbdev();*/ - } else { - scgp->dev = DEV_SC4000; - inq->type = INQ_SEQD; - inq->removable = 1; - } - } - } else if (scgp->verbose) { - int i; - int len = inq->add_len + 5; - Uchar ibuf[256+5]; - Uchar *ip = (Uchar *)inq; - Uchar c; - - if (len > (int)sizeof (*inq) && - inquiry(scgp, (caddr_t)ibuf, inq->add_len+5) >= 0) { - len = inq->add_len+5 - scg_getresid(scgp); - ip = ibuf; - } else { - len = sizeof (*inq); - } - printf("Inquiry Data : "); - for (i = 0; i < len; i++) { - c = ip[i]; - if (c >= ' ' && c < 0177) - printf("%c", c); - else - printf("."); - } - printf("\n"); - } - - strncpy(vendor_info, inq->vendor_info, sizeof (inq->vendor_info)); - strncpy(prod_ident, inq->prod_ident, sizeof (inq->prod_ident)); - strncpy(prod_revision, inq->prod_revision, sizeof (inq->prod_revision)); - - vendor_info[sizeof (inq->vendor_info)] = '\0'; - prod_ident[sizeof (inq->prod_ident)] = '\0'; - prod_revision[sizeof (inq->prod_revision)] = '\0'; - - switch (inq->type) { - - case INQ_DASD: - if (inq->add_len == 0 && inq->vendor_info[0] != '\0') { - Uchar *p; - /* - * NT-4.0 creates fake inquiry data for IDE disks. - * Unfortunately, it does not set add_len wo we - * check if vendor_info, prod_ident and prod_revision - * contains valid chars for a CCS inquiry. - */ - if (inq_len >= 36) - inq->add_len = 31; - - for (p = (Uchar *)&inq->vendor_info[0]; - p < (Uchar *)&inq->prod_revision[4]; - p++) { - if (*p < 0x20 || *p > 0x7E) { - inq->add_len = 0; - break; - } - } - } - if (inq->add_len == 0) { - if (scgp->dev == DEV_UNKNOWN && got_inquiry) { - scgp->dev = DEV_ACB5500; - strcpy(inq->vendor_info, - "ADAPTEC ACB-5500 FAKE"); - - } else switch (scgp->dev) { - - case DEV_ACB40X0: - strcpy(inq->vendor_info, - "ADAPTEC ACB-40X0 FAKE"); - break; - case DEV_ACB4000: - strcpy(inq->vendor_info, - "ADAPTEC ACB-4000 FAKE"); - break; - case DEV_ACB4010: - strcpy(inq->vendor_info, - "ADAPTEC ACB-4010 FAKE"); - break; - case DEV_ACB4070: - strcpy(inq->vendor_info, - "ADAPTEC ACB-4070 FAKE"); - break; - } - } else if (inq->add_len < 31) { - scgp->dev = DEV_NON_CCS_DSK; - - } else if (strbeg("EMULEX", vendor_info)) { - if (strbeg("MD21", prod_ident)) - scgp->dev = DEV_MD21; - if (strbeg("MD23", prod_ident)) - scgp->dev = DEV_MD23; - else - scgp->dev = DEV_CCS_GENDISK; - } else if (strbeg("ADAPTEC", vendor_info)) { - if (strbeg("ACB-4520", prod_ident)) - scgp->dev = DEV_ACB4520A; - if (strbeg("ACB-4525", prod_ident)) - scgp->dev = DEV_ACB4525; - else - scgp->dev = DEV_CCS_GENDISK; - } else if (strbeg("SONY", vendor_info) && - strbeg("SMO-C501", prod_ident)) { - scgp->dev = DEV_SONY_SMO; - } else { - scgp->dev = DEV_CCS_GENDISK; - } - break; - - case INQ_SEQD: - if (scgp->dev == DEV_SC4000) { - strcpy(inq->vendor_info, - "SYSGEN SC4000 FAKE"); - } else if (inq->add_len == 0 && - inq->removable && - inq->ansi_version == 1) { - scgp->dev = DEV_MT02; - strcpy(inq->vendor_info, - "EMULEX MT02 FAKE"); - } - break; - -/* case INQ_OPTD:*/ - case INQ_ROMD: - case INQ_WORM: - if (strbeg("RXT-800S", prod_ident)) - scgp->dev = DEV_RXT800S; - - /* - * Start of CD-Recorders: - */ - if (strbeg("ACER", vendor_info)) { - if (strbeg("CR-4020C", prod_ident)) - scgp->dev = DEV_RICOH_RO_1420C; - - } else if (strbeg("CREATIVE", vendor_info)) { - if (strbeg("CDR2000", prod_ident)) - scgp->dev = DEV_RICOH_RO_1060C; - - } else if (strbeg("GRUNDIG", vendor_info)) { - if (strbeg("CDR100IPW", prod_ident)) - scgp->dev = DEV_CDD_2000; - - } else if (strbeg("JVC", vendor_info)) { - if (strbeg("XR-W2001", prod_ident)) - scgp->dev = DEV_TEAC_CD_R50S; - else if (strbeg("XR-W2010", prod_ident)) - scgp->dev = DEV_TEAC_CD_R50S; - else if (strbeg("R2626", prod_ident)) - scgp->dev = DEV_TEAC_CD_R50S; - - } else if (strbeg("MITSBISH", vendor_info)) { - -#ifdef XXXX_REALLY - /* It's MMC compliant */ - if (strbeg("CDRW226", prod_ident)) - scgp->dev = DEV_MMC_CDRW; -#else - /* EMPTY */ -#endif - - } else if (strbeg("MITSUMI", vendor_info)) { - /* Don't know any product string */ - scgp->dev = DEV_CDD_522; - - } else if (strbeg("OPTIMA", vendor_info)) { - if (strbeg("CD-R 650", prod_ident)) - scgp->dev = DEV_SONY_CDU_924; - - } else if (strbeg("PHILIPS", vendor_info) || - strbeg("IMS", vendor_info) || - strbeg("KODAK", vendor_info) || - strbeg("HP", vendor_info)) { - - if (strbeg("CDD521/00", prod_ident)) - scgp->dev = DEV_CDD_521_OLD; - else if (strbeg("CDD521/02", prod_ident)) - scgp->dev = DEV_CDD_521_OLD; /* PCD 200R? */ - else if (strbeg("CDD521", prod_ident)) - scgp->dev = DEV_CDD_521; - - if (strbeg("CDD522", prod_ident)) - scgp->dev = DEV_CDD_522; - if (strbeg("PCD225", prod_ident)) - scgp->dev = DEV_CDD_522; - if (strbeg("KHSW/OB", prod_ident)) /* PCD600 */ - scgp->dev = DEV_PCD_600; - if (strbeg("CDR-240", prod_ident)) - scgp->dev = DEV_CDD_2000; - - if (strbeg("CDD20", prod_ident)) - scgp->dev = DEV_CDD_2000; - if (strbeg("CDD26", prod_ident)) - scgp->dev = DEV_CDD_2600; - - if (strbeg("C4324/C4325", prod_ident)) - scgp->dev = DEV_CDD_2000; - if (strbeg("CD-Writer 6020", prod_ident)) - scgp->dev = DEV_CDD_2600; - - } else if (strbeg("PINNACLE", vendor_info)) { - if (strbeg("RCD-1000", prod_ident)) - scgp->dev = DEV_TEAC_CD_R50S; - if (strbeg("RCD5020", prod_ident)) - scgp->dev = DEV_TEAC_CD_R50S; - if (strbeg("RCD5040", prod_ident)) - scgp->dev = DEV_TEAC_CD_R50S; - if (strbeg("RCD 4X4", prod_ident)) - scgp->dev = DEV_TEAC_CD_R50S; - - } else if (strbeg("PIONEER", vendor_info)) { - if (strbeg("CD-WO DW-S114X", prod_ident)) - scgp->dev = DEV_PIONEER_DW_S114X; - else if (strbeg("CD-WO DR-R504X", prod_ident)) /* Reoprt from philip@merge.com */ - scgp->dev = DEV_PIONEER_DW_S114X; - else if (strbeg("DVD-R DVR-S101", prod_ident)) - scgp->dev = DEV_PIONEER_DVDR_S101; - - } else if (strbeg("PLASMON", vendor_info)) { - if (strbeg("RF4100", prod_ident)) - scgp->dev = DEV_PLASMON_RF_4100; - else if (strbeg("CDR4220", prod_ident)) - scgp->dev = DEV_CDD_2000; - - } else if (strbeg("PLEXTOR", vendor_info)) { - if (strbeg("CD-R PX-R24CS", prod_ident)) - scgp->dev = DEV_RICOH_RO_1420C; - - } else if (strbeg("RICOH", vendor_info)) { - if (strbeg("RO-1420C", prod_ident)) - scgp->dev = DEV_RICOH_RO_1420C; - if (strbeg("RO1060C", prod_ident)) - scgp->dev = DEV_RICOH_RO_1060C; - - } else if (strbeg("SAF", vendor_info)) { /* Smart & Friendly */ - if (strbeg("CD-R2004", prod_ident) || - strbeg("CD-R2006 ", prod_ident)) - scgp->dev = DEV_SONY_CDU_924; - else if (strbeg("CD-R2006PLUS", prod_ident)) - scgp->dev = DEV_TEAC_CD_R50S; - else if (strbeg("CD-RW226", prod_ident)) - scgp->dev = DEV_TEAC_CD_R50S; - else if (strbeg("CD-R4012", prod_ident)) - scgp->dev = DEV_TEAC_CD_R50S; - - } else if (strbeg("SANYO", vendor_info)) { - if (strbeg("CD-WO CRD-R24S", prod_ident)) - scgp->dev = DEV_CDD_521; - - } else if (strbeg("SONY", vendor_info)) { - if (strbeg("CD-R CDU92", prod_ident) || - strbeg("CD-R CDU94", prod_ident)) - scgp->dev = DEV_SONY_CDU_924; - - } else if (strbeg("TEAC", vendor_info)) { - if (strbeg("CD-R50S", prod_ident) || - strbeg("CD-R55S", prod_ident)) - scgp->dev = DEV_TEAC_CD_R50S; - - } else if (strbeg("TRAXDATA", vendor_info) || - strbeg("Traxdata", vendor_info)) { - if (strbeg("CDR4120", prod_ident)) - scgp->dev = DEV_TEAC_CD_R50S; - - } else if (strbeg("T.YUDEN", vendor_info)) { - if (strbeg("CD-WO EW-50", prod_ident)) - scgp->dev = DEV_TYUDEN_EW50; - - } else if (strbeg("WPI", vendor_info)) { /* Wearnes */ - if (strbeg("CDR-632P", prod_ident)) - scgp->dev = DEV_CDD_2600; - - } else if (strbeg("YAMAHA", vendor_info)) { - if (strbeg("CDR10", prod_ident)) - scgp->dev = DEV_YAMAHA_CDR_100; - if (strbeg("CDR200", prod_ident)) - scgp->dev = DEV_YAMAHA_CDR_400; - if (strbeg("CDR400", prod_ident)) - scgp->dev = DEV_YAMAHA_CDR_400; - - } else if (strbeg("MATSHITA", vendor_info)) { - if (strbeg("CD-R CW-7501", prod_ident)) - scgp->dev = DEV_MATSUSHITA_7501; - if (strbeg("CD-R CW-7502", prod_ident)) - scgp->dev = DEV_MATSUSHITA_7502; - } - if (scgp->dev == DEV_UNKNOWN) { - /* - * We do not have Manufacturer strings for - * the following drives. - */ - if (strbeg("CDS615E", prod_ident)) /* Olympus */ - scgp->dev = DEV_SONY_CDU_924; - } - if (scgp->dev == DEV_UNKNOWN && inq->type == INQ_ROMD) { - BOOL cdrr = FALSE; - BOOL cdwr = FALSE; - BOOL cdrrw = FALSE; - BOOL cdwrw = FALSE; - BOOL dvd = FALSE; - BOOL dvdwr = FALSE; - - scgp->dev = DEV_CDROM; - - if (mmc_check(scgp, &cdrr, &cdwr, &cdrrw, &cdwrw, - &dvd, &dvdwr)) - scgp->dev = DEV_MMC_CDROM; - if (cdwr) - scgp->dev = DEV_MMC_CDR; - if (cdwrw) - scgp->dev = DEV_MMC_CDRW; - if (dvd) - scgp->dev = DEV_MMC_DVD; - if (dvdwr) - scgp->dev = DEV_MMC_DVD_WR; - } - break; - - case INQ_PROCD: - if (strbeg("BERTHOLD", vendor_info)) { - if (strbeg("", prod_ident)) - scgp->dev = DEV_HRSCAN; - } - break; - - case INQ_SCAN: - scgp->dev = DEV_MS300A; - break; - } - scgp->silent--; - if (!print) - return (TRUE); - - if (scgp->dev == DEV_UNKNOWN && !got_inquiry) { -#ifdef PRINT_INQ_ERR - scg_printerr(scgp); -#endif - return (FALSE); - } - - printinq(scgp, stdout); - return (TRUE); -} - -EXPORT void -printinq(scgp, f) - SCSI *scgp; - FILE *f; -{ - register struct scsi_inquiry *inq = scgp->inq; - - fprintf(f, "Device type : "); - scg_fprintdev(f, inq); - fprintf(f, "Version : %d\n", inq->ansi_version); - fprintf(f, "Response Format: %d\n", inq->data_format); - if (inq->data_format >= 2) { - fprintf(f, "Capabilities : "); - if (inq->aenc) fprintf(f, "AENC "); - if (inq->termiop) fprintf(f, "TERMIOP "); - if (inq->reladr) fprintf(f, "RELADR "); - if (inq->wbus32) fprintf(f, "WBUS32 "); - if (inq->wbus16) fprintf(f, "WBUS16 "); - if (inq->sync) fprintf(f, "SYNC "); - if (inq->linked) fprintf(f, "LINKED "); - if (inq->cmdque) fprintf(f, "CMDQUE "); - if (inq->softreset) fprintf(f, "SOFTRESET "); - fprintf(f, "\n"); - } - if (inq->add_len >= 31 || - inq->vendor_info[0] || - inq->prod_ident[0] || - inq->prod_revision[0]) { - fprintf(f, "Vendor_info : '%.8s'\n", inq->vendor_info); - fprintf(f, "Identifikation : '%.16s'\n", inq->prod_ident); - fprintf(f, "Revision : '%.4s'\n", inq->prod_revision); - } -} - -EXPORT void -printdev(scgp) - SCSI *scgp; -{ - printf("Device seems to be: "); - - switch (scgp->dev) { - - case DEV_UNKNOWN: printf("unknown"); break; - case DEV_ACB40X0: printf("Adaptec 4000/4010/4070"); break; - case DEV_ACB4000: printf("Adaptec 4000"); break; - case DEV_ACB4010: printf("Adaptec 4010"); break; - case DEV_ACB4070: printf("Adaptec 4070"); break; - case DEV_ACB5500: printf("Adaptec 5500"); break; - case DEV_ACB4520A: printf("Adaptec 4520A"); break; - case DEV_ACB4525: printf("Adaptec 4525"); break; - case DEV_MD21: printf("Emulex MD21"); break; - case DEV_MD23: printf("Emulex MD23"); break; - case DEV_NON_CCS_DSK: printf("Generic NON CCS Disk"); break; - case DEV_CCS_GENDISK: printf("Generic CCS Disk"); break; - case DEV_SONY_SMO: printf("Sony SMO-C501"); break; - case DEV_MT02: printf("Emulex MT02"); break; - case DEV_SC4000: printf("Sysgen SC4000"); break; - case DEV_RXT800S: printf("Maxtor RXT800S"); break; - case DEV_HRSCAN: printf("Berthold HR-Scanner"); break; - case DEV_MS300A: printf("Microtek MS300A"); break; - - case DEV_CDROM: printf("Generic CD-ROM"); break; - case DEV_MMC_CDROM: printf("Generic mmc CD-ROM"); break; - case DEV_MMC_CDR: printf("Generic mmc CD-R"); break; - case DEV_MMC_CDRW: printf("Generic mmc CD-RW"); break; - case DEV_MMC_DVD: printf("Generic mmc2 DVD-ROM"); break; - case DEV_MMC_DVD_WR: printf("Generic mmc2 DVD-R/DVD-RW/DVD-RAM"); break; - case DEV_CDD_521_OLD: printf("Philips old CDD-521"); break; - case DEV_CDD_521: printf("Philips CDD-521"); break; - case DEV_CDD_522: printf("Philips CDD-522"); break; - case DEV_PCD_600: printf("Kodak PCD-600"); break; - case DEV_CDD_2000: printf("Philips CDD-2000"); break; - case DEV_CDD_2600: printf("Philips CDD-2600"); break; - case DEV_YAMAHA_CDR_100:printf("Yamaha CDR-100"); break; - case DEV_YAMAHA_CDR_400:printf("Yamaha CDR-400"); break; - case DEV_PLASMON_RF_4100:printf("Plasmon RF-4100"); break; - case DEV_SONY_CDU_924: printf("Sony CDU-924S"); break; - case DEV_RICOH_RO_1060C:printf("Ricoh RO-1060C"); break; - case DEV_RICOH_RO_1420C:printf("Ricoh RO-1420C"); break; - case DEV_TEAC_CD_R50S: printf("Teac CD-R50S"); break; - case DEV_MATSUSHITA_7501:printf("Matsushita CW-7501"); break; - case DEV_MATSUSHITA_7502:printf("Matsushita CW-7502"); break; - - case DEV_PIONEER_DW_S114X: printf("Pioneer DW-S114X"); break; - case DEV_PIONEER_DVDR_S101:printf("Pioneer DVD-R S101"); break; - - default: printf("Missing Entry for dev %d", - scgp->dev); break; - - } - printf(".\n"); - -} - -EXPORT BOOL -do_inquiry(scgp, print) - SCSI *scgp; - int print; -{ - if (getdev(scgp, print)) { - if (print) - printdev(scgp); - return (TRUE); - } else { - return (FALSE); - } -} - -EXPORT BOOL -recovery_needed(scgp, dp) - SCSI *scgp; - cdr_t *dp; -{ - int err; - register struct scg_cmd *scmd = scgp->scmd; - - scgp->silent++; - err = test_unit_ready(scgp); - scgp->silent--; - - if (err >= 0) - return (FALSE); - else if (scmd->error >= SCG_FATAL) /* nicht selektierbar */ - return (FALSE); - - if (scmd->sense.code < 0x70) /* non extended Sense */ - return (FALSE); - - /* XXX Old Philips code */ - return (((struct scsi_ext_sense *)&scmd->sense)->sense_code == 0xD0); -} - -EXPORT int -scsi_load(scgp, dp) - SCSI *scgp; - cdr_t *dp; -{ - int key; - int code; - - if ((dp->cdr_flags & CDR_CADDYLOAD) == 0) { - if (scsi_start_stop_unit(scgp, 1, 1, dp && (dp->cdr_cmdflags&F_IMMED)) >= 0) - return (0); - } - - if (wait_unit_ready(scgp, 60)) - return (0); - - key = scg_sense_key(scgp); - code = scg_sense_code(scgp); - - if (key == SC_NOT_READY && (code == 0x3A || code == 0x30)) { - errmsgno(EX_BAD, "Cannot load media with %s drive!\n", - (dp->cdr_flags & CDR_CADDYLOAD) ? "caddy" : "this"); - errmsgno(EX_BAD, "Try to load media by hand.\n"); - } - return (-1); -} - -EXPORT int -scsi_unload(scgp, dp) - SCSI *scgp; - cdr_t *dp; -{ - return (scsi_start_stop_unit(scgp, 0, 1, dp && (dp->cdr_cmdflags&F_IMMED))); -} - -EXPORT int -scsi_cdr_write(scgp, bp, sectaddr, size, blocks, islast) - SCSI *scgp; - caddr_t bp; /* address of buffer */ - long sectaddr; /* disk address (sector) to put */ - long size; /* number of bytes to transfer */ - int blocks; /* sector count */ - BOOL islast; /* last write for track */ -{ - return (write_xg1(scgp, bp, sectaddr, size, blocks)); -} - -EXPORT struct cd_mode_page_2A * -mmc_cap(scgp, modep) - SCSI *scgp; - Uchar *modep; -{ - int len; - int val; - Uchar mode[0x100]; - struct cd_mode_page_2A *mp; - struct cd_mode_page_2A *mp2; - - -retry: - fillbytes((caddr_t)mode, sizeof (mode), '\0'); - - if (!get_mode_params(scgp, 0x2A, "CD capabilities", - mode, (Uchar *)0, (Uchar *)0, (Uchar *)0, &len)) { - - if (scg_sense_key(scgp) == SC_NOT_READY) { - if (wait_unit_ready(scgp, 60)) - goto retry; - } - return (NULL); /* Pre SCSI-3/mmc drive */ - } - - if (len == 0) /* Pre SCSI-3/mmc drive */ - return (NULL); - - mp = (struct cd_mode_page_2A *) - (mode + sizeof (struct scsi_mode_header) + - ((struct scsi_mode_header *)mode)->blockdesc_len); - - /* - * Do some heuristics against pre SCSI-3/mmc VU page 2A - * We should test for a minimum p_len of 0x14, but some - * buggy CD-ROM readers ommit the write speed values. - */ - if (mp->p_len < 0x10) - return (NULL); - - val = a_to_u_2_byte(mp->max_read_speed); - if (val != 0 && val < 176) - return (NULL); - - val = a_to_u_2_byte(mp->cur_read_speed); - if (val != 0 && val < 176) - return (NULL); - - len -= sizeof (struct scsi_mode_header) + - ((struct scsi_mode_header *)mode)->blockdesc_len; - if (modep) - mp2 = (struct cd_mode_page_2A *)modep; - else - mp2 = malloc(len); - if (mp2) - movebytes(mp, mp2, len); - - return (mp2); -} - -EXPORT void -mmc_getval(mp, cdrrp, cdwrp, cdrrwp, cdwrwp, dvdp, dvdwp) - struct cd_mode_page_2A *mp; - BOOL *cdrrp; /* CD ROM */ - BOOL *cdwrp; /* CD-R writer */ - BOOL *cdrrwp; /* CD-RW reader */ - BOOL *cdwrwp; /* CD-RW writer */ - BOOL *dvdp; /* DVD reader */ - BOOL *dvdwp; /* DVD writer */ -{ - BOOL isdvd; /* Any DVD reader */ - BOOL isdvd_wr; /* DVD writer (R / RAM) */ - BOOL iscd_wr; /* CD writer */ - - iscd_wr = (mp->cd_r_write != 0) || /* SCSI-3/mmc CD-R */ - (mp->cd_rw_write != 0); /* SCSI-3/mmc CD-RW */ - - if (cdrrp) - *cdrrp = (mp->cd_r_read != 0); /* SCSI-3/mmc CD */ - if (cdwrp) - *cdwrp = (mp->cd_r_write != 0); /* SCSI-3/mmc CD-R */ - - if (cdrrwp) - *cdrrwp = (mp->cd_rw_read != 0); /* SCSI-3/mmc CD */ - if (cdwrwp) - *cdwrwp = (mp->cd_rw_write != 0); /* SCSI-3/mmc CD-RW */ - - isdvd = /* SCSI-3/mmc2 DVD */ - (mp->dvd_ram_read + mp->dvd_r_read + - mp->dvd_rom_read) != 0; - - isdvd_wr = /* SCSI-3/mmc2 DVD writer*/ - (mp->dvd_ram_write + mp->dvd_r_write) != 0; - - if (dvdp) - *dvdp = isdvd; - if (dvdwp) - *dvdwp = isdvd_wr; -} - -EXPORT BOOL -is_mmc(scgp, cdwp, dvdwp) - SCSI *scgp; - BOOL *cdwp; /* CD writer */ - BOOL *dvdwp; /* DVD writer */ -{ - BOOL cdwr = FALSE; - BOOL cdwrw = FALSE; - - if (cdwp) - *cdwp = FALSE; - if (dvdwp) - *dvdwp = FALSE; - - if (!mmc_check(scgp, NULL, &cdwr, NULL, &cdwrw, NULL, dvdwp)) - return (FALSE); - - if (cdwp) - *cdwp = cdwr | cdwrw; - - return (TRUE); -} - -EXPORT BOOL -mmc_check(scgp, cdrrp, cdwrp, cdrrwp, cdwrwp, dvdp, dvdwp) - SCSI *scgp; - BOOL *cdrrp; /* CD ROM */ - BOOL *cdwrp; /* CD-R writer */ - BOOL *cdrrwp; /* CD-RW reader */ - BOOL *cdwrwp; /* CD-RW writer */ - BOOL *dvdp; /* DVD reader */ - BOOL *dvdwp; /* DVD writer */ -{ - Uchar mode[0x100]; - BOOL was_atapi; - struct cd_mode_page_2A *mp; - - if (scgp->inq->type != INQ_ROMD) - return (FALSE); - - fillbytes((caddr_t)mode, sizeof (mode), '\0'); - - was_atapi = allow_atapi(scgp, TRUE); - scgp->silent++; - mp = mmc_cap(scgp, mode); - scgp->silent--; - allow_atapi(scgp, was_atapi); - if (mp == NULL) - return (FALSE); - - mmc_getval(mp, cdrrp, cdwrp, cdrrwp, cdwrwp, dvdp, dvdwp); - - return (TRUE); /* Generic SCSI-3/mmc CD */ -} - -LOCAL void -print_speed(fmt, val) - char *fmt; - int val; -{ - printf(" %s: %5d kB/s", fmt, val); - printf(" (CD %3ux,", val/176); - printf(" DVD %2ux,", val/1385); - printf(" BD %2ux)\n", val/4495); -} - -#define DOES(what, flag) printf(" Does %s%s\n", flag?"":"not ", what) -#define IS(what, flag) printf(" Is %s%s\n", flag?"":"not ", what) -#define VAL(what, val) printf(" %s: %d\n", what, val[0]*256 + val[1]) -#define SVAL(what, val) printf(" %s: %s\n", what, val) - -EXPORT void -print_capabilities(scgp) - SCSI *scgp; -{ - BOOL was_atapi; - Uchar mode[0x100]; - struct cd_mode_page_2A *mp; -static const char *bclk[4] = {"32", "16", "24", "24 (I2S)"}; -static const char *load[8] = {"caddy", "tray", "pop-up", "reserved(3)", - "disc changer", "cartridge changer", - "reserved(6)", "reserved(7)" }; -static const char *rotctl[4] = {"CLV/PCAV", "CAV", "reserved(2)", "reserved(3)"}; - - - if (scgp->inq->type != INQ_ROMD) - return; - - fillbytes((caddr_t)mode, sizeof (mode), '\0'); - - was_atapi = allow_atapi(scgp, TRUE); /* Try to switch to 10 byte mode cmds */ - scgp->silent++; - mp = mmc_cap(scgp, mode); - scgp->silent--; - allow_atapi(scgp, was_atapi); - if (mp == NULL) - return; - - printf("\nDrive capabilities, per"); - if (mp->p_len >= 28) - printf(" MMC-3"); - else if (mp->p_len >= 24) - printf(" MMC-2"); - else - printf(" MMC"); - printf(" page 2A:\n\n"); - - DOES("read CD-R media", mp->cd_r_read); - DOES("write CD-R media", mp->cd_r_write); - DOES("read CD-RW media", mp->cd_rw_read); - DOES("write CD-RW media", mp->cd_rw_write); - DOES("read DVD-ROM media", mp->dvd_rom_read); - DOES("read DVD-R media", mp->dvd_r_read); - DOES("write DVD-R media", mp->dvd_r_write); - DOES("read DVD-RAM media", mp->dvd_ram_read); - DOES("write DVD-RAM media", mp->dvd_ram_write); - DOES("support test writing", mp->test_write); - printf("\n"); - DOES("read Mode 2 Form 1 blocks", mp->mode_2_form_1); - DOES("read Mode 2 Form 2 blocks", mp->mode_2_form_2); - DOES("read digital audio blocks", mp->cd_da_supported); - if (mp->cd_da_supported) - DOES("restart non-streamed digital audio reads accurately", mp->cd_da_accurate); - DOES("support Buffer-Underrun-Free recording", mp->BUF); - DOES("read multi-session CDs", mp->multi_session); - DOES("read fixed-packet CD media using Method 2", mp->method2); - DOES("read CD bar code", mp->read_bar_code); - DOES("read R-W subcode information", mp->rw_supported); - if (mp->rw_supported) - DOES("return R-W subcode de-interleaved and error-corrected", mp->rw_deint_corr); - DOES("read raw P-W subcode data from lead in", mp->pw_in_lead_in); - DOES("return CD media catalog number", mp->UPC); - DOES("return CD ISRC information", mp->ISRC); - DOES("support C2 error pointers", mp->c2_pointers); - DOES("deliver composite A/V data", mp->composite); - printf("\n"); - DOES("play audio CDs", mp->audio_play); - if (mp->audio_play) { - VAL("Number of volume control levels", mp->num_vol_levels); - DOES("support individual volume control setting for each channel", mp->sep_chan_vol); - DOES("support independent mute setting for each channel", mp->sep_chan_mute); - DOES("support digital output on port 1", mp->digital_port_1); - DOES("support digital output on port 2", mp->digital_port_2); - if (mp->digital_port_1 || mp->digital_port_2) { - DOES("send digital data LSB-first", mp->LSBF); - DOES("set LRCK high for left-channel data", mp->RCK); - DOES("have valid data on falling edge of clock", mp->BCK); - SVAL("Length of data in BCLKs", bclk[mp->length]); - } - } - printf("\n"); - SVAL("Loading mechanism type", load[mp->loading_type]); - DOES("support ejection of CD via START/STOP command", mp->eject); - DOES("lock media on power up via prevent jumper", mp->prevent_jumper); - DOES("allow media to be locked in the drive via PREVENT/ALLOW command", mp->lock); - IS("currently in a media-locked state", mp->lock_state); - DOES("support changing side of disk", mp->side_change); - DOES("have load-empty-slot-in-changer feature", mp->sw_slot_sel); - DOES("support Individual Disk Present feature", mp->disk_present_rep); - printf("\n"); - print_speed("Maximum read speed", a_to_u_2_byte(mp->max_read_speed)); - print_speed("Current read speed", a_to_u_2_byte(mp->cur_read_speed)); - print_speed("Maximum write speed", a_to_u_2_byte(mp->max_write_speed)); - if (mp->p_len >= 28) - print_speed("Current write speed", a_to_u_2_byte(mp->v3_cur_write_speed)); - else - print_speed("Current write speed", a_to_u_2_byte(mp->cur_write_speed)); - if (mp->p_len >= 28) { - SVAL("Rotational control selected", rotctl[mp->rot_ctl_sel]); - } - VAL("Buffer size in KB", mp->buffer_size); - - if (mp->p_len >= 24) { - VAL("Copy management revision supported", mp->copy_man_rev); - } - - if (mp->p_len >= 28) { - struct cd_wr_speed_performance *pp; - Uint ndesc; - Uint i; - Uint n; - - ndesc = a_to_u_2_byte(mp->num_wr_speed_des); - pp = mp->wr_speed_des; - printf(" Number of supported write speeds: %d\n", ndesc); - for (i = 0; i < ndesc; i++, pp++) { - printf(" Write speed # %d:", i); - n = a_to_u_2_byte(pp->wr_speed_supp); - printf(" %5d kB/s", n); - printf(" %s", rotctl[pp->rot_ctl_sel]); - printf(" (CD %3ux,", n/176); - printf(" DVD %2ux,", n/1385); - printf(" BD %2ux)\n", n/4495); - } - } - - /* Generic SCSI-3/mmc CD */ -} - -EXPORT int -verify(scgp, start, count, bad_block) - SCSI *scgp; - long start; - int count; - long *bad_block; -{ - register struct scg_cmd *scmd = scgp->scmd; - - fillbytes((caddr_t)scmd, sizeof (*scmd), '\0'); - scmd->addr = (caddr_t)0; - scmd->size = 0; - scmd->flags = SCG_DISRE_ENA; - scmd->cdb_len = SC_G1_CDBLEN; - scmd->sense_len = CCS_SENSE_LEN; - scmd->cdb.g1_cdb.cmd = 0x2F; /* Verify */ - scmd->cdb.g1_cdb.lun = scg_lun(scgp); - g1_cdbaddr(&scmd->cdb.g1_cdb, start); - g1_cdblen(&scmd->cdb.g1_cdb, count); - - scgp->cmdname = "verify"; - - if (scg_cmd(scgp) < 0) { - if (scmd->sense.code >= 0x70) { /* extended Sense */ - *bad_block = - a_to_4_byte(&((struct scsi_ext_sense *) - &scmd->sense)->info_1); - } else { - *bad_block = a_to_u_3_byte(&scmd->sense.high_addr); - } - return (-1); - } - return (0); -} diff -Nru cdrtools-2.01.01a33/scgskeleton/scsimmc.h cdrtools-3.02a09/scgskeleton/scsimmc.h --- cdrtools-2.01.01a33/scgskeleton/scsimmc.h 2006-12-02 22:10:16.000000000 +0000 +++ cdrtools-3.02a09/scgskeleton/scsimmc.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,623 +0,0 @@ -/* @(#)scsimmc.h 1.19 06/12/02 Copyright 1997-2006 J. Schilling */ -/* - * Definitions for SCSI/mmc compliant drives - * - * Copyright (c) 1997-2006 J. Schilling - */ -/* - * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. - * - * See the file CDDL.Schily.txt in this distribution for details. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file CDDL.Schily.txt from this distribution. - */ - -#ifndef _SCSIMMC_H -#define _SCSIMMC_H - -#include -#include - -typedef struct opc { - Uchar opc_speed[2]; - Uchar opc_val[6]; -} opc_t; - -#if defined(_BIT_FIELDS_LTOH) /* Intel bitorder */ - -struct disk_info { - Uchar data_len[2]; /* Data len without this info */ - Ucbit disk_status : 2; /* Status of the disk */ - Ucbit sess_status : 2; /* Status of last session */ - Ucbit erasable : 1; /* Disk is erasable */ - Ucbit dtype : 3; /* Disk information data type */ - Uchar first_track; /* # of first track on disk */ - Uchar numsess; /* # of sessions */ - Uchar first_track_ls; /* First track in last session */ - Uchar last_track_ls; /* Last track in last session */ - Ucbit bg_format_stat : 2; /* Background format status */ - Ucbit dbit : 1; /* Dirty Bit of defect table */ - Ucbit res7_3 : 1; /* Reserved */ - Ucbit dac_v : 1; /* Disk application code valid */ - Ucbit uru : 1; /* This is an unrestricted disk */ - Ucbit dbc_v : 1; /* Disk bar code valid */ - Ucbit did_v : 1; /* Disk id valid */ - Uchar disk_type; /* Disk type */ - Uchar numsess_msb; /* # of sessions (MSB) */ - Uchar first_track_ls_msb; /* First tr. in last ses. (MSB) */ - Uchar last_track_ls_msb; /* Last tr. in last ses. (MSB) */ - Uchar disk_id[4]; /* Disk identification */ - Uchar last_lead_in[4]; /* Last session lead in time */ - Uchar last_lead_out[4]; /* Last session lead out time */ - Uchar disk_barcode[8]; /* Disk bar code */ - Uchar disk_appl_code; /* Disk application code */ - Uchar num_opc_entries; /* # of OPC table entries */ - opc_t opc_table[1]; /* OPC table */ -}; - -#else /* Motorola bitorder */ - -struct disk_info { - Uchar data_len[2]; /* Data len without this info */ - Ucbit dtype : 3; /* Disk information data type */ - Ucbit erasable : 1; /* Disk is erasable */ - Ucbit sess_status : 2; /* Status of last session */ - Ucbit disk_status : 2; /* Status of the disk */ - Uchar first_track; /* # of first track on disk */ - Uchar numsess; /* # of sessions */ - Uchar first_track_ls; /* First track in last session */ - Uchar last_track_ls; /* Last track in last session */ - Ucbit did_v : 1; /* Disk id valid */ - Ucbit dbc_v : 1; /* Disk bar code valid */ - Ucbit uru : 1; /* This is an unrestricted disk */ - Ucbit dac_v : 1; /* Disk application code valid */ - Ucbit res7_3 : 1; /* Reserved */ - Ucbit dbit : 1; /* Dirty Bit of defect table */ - Ucbit bg_format_stat : 2; /* Background format status */ - Uchar disk_type; /* Disk type */ - Uchar numsess_msb; /* # of sessions (MSB) */ - Uchar first_track_ls_msb; /* First tr. in last ses. (MSB) */ - Uchar last_track_ls_msb; /* Last tr. in last ses. (MSB) */ - Uchar disk_id[4]; /* Disk identification */ - Uchar last_lead_in[4]; /* Last session lead in time */ - Uchar last_lead_out[4]; /* Last session lead out time */ - Uchar disk_barcode[8]; /* Disk bar code */ - Uchar disk_appl_code; /* Disk application code */ - Uchar num_opc_entries; /* # of OPC table entries */ - opc_t opc_table[1]; /* OPC table */ -}; - -#endif - -struct cd_mode_data { - struct scsi_mode_header header; - union cd_pagex { - struct cd_mode_page_05 page05; - struct cd_mode_page_2A page2A; - } pagex; -}; - -struct tocheader { - Uchar len[2]; - Uchar first; - Uchar last; -}; - -/* - * Full TOC entry - */ -struct ftrackdesc { - Uchar sess_number; - -#if defined(_BIT_FIELDS_LTOH) /* Intel byteorder */ - Ucbit control : 4; - Ucbit adr : 4; -#else /* Motorola byteorder */ - Ucbit adr : 4; - Ucbit control : 4; -#endif - - Uchar track; - Uchar point; - Uchar amin; - Uchar asec; - Uchar aframe; - Uchar res7; - Uchar pmin; - Uchar psec; - Uchar pframe; -}; - -struct fdiskinfo { - struct tocheader hd; - struct ftrackdesc desc[1]; -}; - - - -#if defined(_BIT_FIELDS_LTOH) /* Intel bitorder */ - -struct atipdesc { - Ucbit ref_speed : 3; /* Reference speed */ - Ucbit res4_3 : 1; /* Reserved */ - Ucbit ind_wr_power : 3; /* Indicative tgt writing power */ - Ucbit res4_7 : 1; /* Reserved (must be "1") */ - Ucbit res5_05 : 6; /* Reserved */ - Ucbit uru : 1; /* Disk is for unrestricted use */ - Ucbit res5_7 : 1; /* Reserved (must be "0") */ - Ucbit a3_v : 1; /* A 3 Values valid */ - Ucbit a2_v : 1; /* A 2 Values valid */ - Ucbit a1_v : 1; /* A 1 Values valid */ - Ucbit sub_type : 3; /* Disc sub type */ - Ucbit erasable : 1; /* Disk is erasable */ - Ucbit res6_7 : 1; /* Reserved (must be "1") */ - Uchar lead_in[4]; /* Lead in time */ - Uchar lead_out[4]; /* Lead out time */ - Uchar res15; /* Reserved */ - Ucbit clv_high : 4; /* Highes usable CLV recording speed */ - Ucbit clv_low : 3; /* Lowest usable CLV recording speed */ - Ucbit res16_7 : 1; /* Reserved (must be "0") */ - Ucbit res17_0 : 1; /* Reserved */ - Ucbit tgt_y_pow : 3; /* Tgt y val of the power mod fun */ - Ucbit power_mult : 3; /* Power multiplication factor */ - Ucbit res17_7 : 1; /* Reserved (must be "0") */ - Ucbit res_18_30 : 4; /* Reserved */ - Ucbit rerase_pwr_ratio: 3; /* Recommended erase/write power*/ - Ucbit res18_7 : 1; /* Reserved (must be "1") */ - Uchar res19; /* Reserved */ - Uchar a2[3]; /* A 2 Values */ - Uchar res23; /* Reserved */ - Uchar a3[3]; /* A 3 Vaules */ - Uchar res27; /* Reserved */ -}; - -#else /* Motorola bitorder */ - -struct atipdesc { - Ucbit res4_7 : 1; /* Reserved (must be "1") */ - Ucbit ind_wr_power : 3; /* Indicative tgt writing power */ - Ucbit res4_3 : 1; /* Reserved */ - Ucbit ref_speed : 3; /* Reference speed */ - Ucbit res5_7 : 1; /* Reserved (must be "0") */ - Ucbit uru : 1; /* Disk is for unrestricted use */ - Ucbit res5_05 : 6; /* Reserved */ - Ucbit res6_7 : 1; /* Reserved (must be "1") */ - Ucbit erasable : 1; /* Disk is erasable */ - Ucbit sub_type : 3; /* Disc sub type */ - Ucbit a1_v : 1; /* A 1 Values valid */ - Ucbit a2_v : 1; /* A 2 Values valid */ - Ucbit a3_v : 1; /* A 3 Values valid */ - Uchar lead_in[4]; /* Lead in time */ - Uchar lead_out[4]; /* Lead out time */ - Uchar res15; /* Reserved */ - Ucbit res16_7 : 1; /* Reserved (must be "0") */ - Ucbit clv_low : 3; /* Lowest usable CLV recording speed */ - Ucbit clv_high : 4; /* Highes usable CLV recording speed */ - Ucbit res17_7 : 1; /* Reserved (must be "0") */ - Ucbit power_mult : 3; /* Power multiplication factor */ - Ucbit tgt_y_pow : 3; /* Tgt y val of the power mod fun */ - Ucbit res17_0 : 1; /* Reserved */ - Ucbit res18_7 : 1; /* Reserved (must be "1") */ - Ucbit rerase_pwr_ratio: 3; /* Recommended erase/write power*/ - Ucbit res_18_30 : 4; /* Reserved */ - Uchar res19; /* Reserved */ - Uchar a2[3]; /* A 2 Values */ - Uchar res23; /* Reserved */ - Uchar a3[3]; /* A 3 Vaules */ - Uchar res27; /* Reserved */ -}; - -#endif - -struct atipinfo { - struct tocheader hd; - struct atipdesc desc; -}; - -/* - * XXX Check how we may merge Track_info & Rzone_info - */ -#if defined(_BIT_FIELDS_LTOH) /* Intel bitorder */ - -struct track_info { - Uchar data_len[2]; /* Data len without this info */ - Uchar track_number; /* Track number for this info */ - Uchar session_number; /* Session number for this info */ - Uchar res4; /* Reserved */ - Ucbit track_mode : 4; /* Track mode (Q-sub control) */ - Ucbit copy : 1; /* This track is a higher copy */ - Ucbit damage : 1; /* if 1 & nwa_valid 0: inc track*/ - Ucbit res5_67 : 2; /* Reserved */ - Ucbit data_mode : 4; /* Data mode of this track */ - Ucbit fp : 1; /* This is a fixed packet track */ - Ucbit packet : 1; /* This track is in packet mode */ - Ucbit blank : 1; /* This is an invisible track */ - Ucbit rt : 1; /* This is a reserved track */ - Ucbit nwa_valid : 1; /* Next writable addr valid */ - Ucbit res7_17 : 7; /* Reserved */ - Uchar track_start[4]; /* Track start address */ - Uchar next_writable_addr[4]; /* Next writable address */ - Uchar free_blocks[4]; /* Free usr blocks in this track*/ - Uchar packet_size[4]; /* Packet size if in fixed mode */ - Uchar track_size[4]; /* # of user data blocks in trk */ -}; - -#else /* Motorola bitorder */ - -struct track_info { - Uchar data_len[2]; /* Data len without this info */ - Uchar track_number; /* Track number for this info */ - Uchar session_number; /* Session number for this info */ - Uchar res4; /* Reserved */ - Ucbit res5_67 : 2; /* Reserved */ - Ucbit damage : 1; /* if 1 & nwa_valid 0: inc track*/ - Ucbit copy : 1; /* This track is a higher copy */ - Ucbit track_mode : 4; /* Track mode (Q-sub control) */ - Ucbit rt : 1; /* This is a reserved track */ - Ucbit blank : 1; /* This is an invisible track */ - Ucbit packet : 1; /* This track is in packet mode */ - Ucbit fp : 1; /* This is a fixed packet track */ - Ucbit data_mode : 4; /* Data mode of this track */ - Ucbit res7_17 : 7; /* Reserved */ - Ucbit nwa_valid : 1; /* Next writable addr valid */ - Uchar track_start[4]; /* Track start address */ - Uchar next_writable_addr[4]; /* Next writable address */ - Uchar free_blocks[4]; /* Free usr blocks in this track*/ - Uchar packet_size[4]; /* Packet size if in fixed mode */ - Uchar track_size[4]; /* # of user data blocks in trk */ -}; - -#endif - -/* - * XXX Check how we may merge Track_info & Rzone_info - */ -#if defined(_BIT_FIELDS_LTOH) /* Intel bitorder */ - -struct rzone_info { - Uchar data_len[2]; /* Data len without this info */ - Uchar rzone_num_lsb; /* RZone number LSB */ - Uchar border_num_lsb; /* Border number LSB */ - Uchar res_4; /* Reserved */ - Ucbit trackmode : 4; /* Track mode */ - Ucbit copy : 1; /* Higher generation CD copy */ - Ucbit damage : 1; /* Damaged RZone */ - Ucbit ljrs : 2; /* Layer jump recording status */ - Ucbit datamode : 4; /* Data mode */ - Ucbit fp : 1; /* Fixed packet */ - Ucbit incremental : 1; /* RZone is to be written incremental */ - Ucbit blank : 1; /* RZone is blank */ - Ucbit rt : 1; /* RZone is reserved */ - Ucbit nwa_v : 1; /* Next WR address is valid */ - Ucbit lra_v : 1; /* Last rec address is valid */ - Ucbit res7_27 : 6; /* Reserved */ - Uchar rzone_start[4]; /* RZone start address */ - Uchar next_recordable_addr[4]; /* Next recordable address */ - Uchar free_blocks[4]; /* Free blocks in RZone */ - Uchar block_factor[4]; /* # of sectors of disc acc unit */ - Uchar rzone_size[4]; /* RZone size */ - Uchar last_recorded_addr[4]; /* Last Recorded addr in RZone */ - Uchar rzone_num_msb; /* RZone number MSB */ - Uchar border_num_msb; /* Border number MSB */ - Uchar res_34_35[2]; /* Reserved */ - Uchar read_compat_lba[4]; /* Read Compatibilty LBA */ - Uchar next_layer_jump[4]; /* Next layer jump address */ - Uchar last_layer_jump[4]; /* Last layer jump address */ -}; - -#else /* Motorola bitorder */ - -struct rzone_info { - Uchar data_len[2]; /* Data len without this info */ - Uchar rzone_num_lsb; /* RZone number LSB */ - Uchar border_num_lsb; /* Border number LSB */ - Uchar res_4; /* Reserved */ - Ucbit ljrs : 2; /* Layer jump recording status */ - Ucbit damage : 1; /* Damaged RZone */ - Ucbit copy : 1; /* Higher generation CD copy */ - Ucbit trackmode : 4; /* Track mode */ - Ucbit rt : 1; /* RZone is reserved */ - Ucbit blank : 1; /* RZone is blank */ - Ucbit incremental : 1; /* RZone is to be written incremental */ - Ucbit fp : 1; /* Fixed packet */ - Ucbit datamode : 4; /* Data mode */ - Ucbit res7_27 : 6; /* Reserved */ - Ucbit lra_v : 1; /* Last rec address is valid */ - Ucbit nwa_v : 1; /* Next WR address is valid */ - Uchar rzone_start[4]; /* RZone start address */ - Uchar next_recordable_addr[4]; /* Next recordable address */ - Uchar free_blocks[4]; /* Free blocks in RZone */ - Uchar block_factor[4]; /* # of sectors of disc acc unit */ - Uchar rzone_size[4]; /* RZone size */ - Uchar last_recorded_addr[4]; /* Last Recorded addr in RZone */ - Uchar rzone_num_msb; /* RZone number MSB */ - Uchar border_num_msb; /* Border number MSB */ - Uchar res_34_35[2]; /* Reserved */ - Uchar read_compat_lba[4]; /* Read Compatibilty LBA */ - Uchar next_layer_jump[4]; /* Next layer jump address */ - Uchar last_layer_jump[4]; /* Last layer jump address */ -}; - -#endif - -/* - * The lrjs values: - */ -#define LRJS_NONE 0 /* DAO/Incremental/Blank */ -#define LRJS_UNSPEC 1 /* WT == LJ but layerjump not set */ -#define LRJS_MANUAL 2 /* Manual layer jump set */ -#define LRJS_INTERVAL 3 /* Jump interval size set */ - -#if defined(_BIT_FIELDS_LTOH) /* Intel bitorder */ - -struct dvd_structure_00 { - Uchar data_len[2]; /* Data len without this info */ - Uchar res23[2]; /* Reserved */ - Ucbit book_version : 4; /* DVD Book version */ - Ucbit book_type : 4; /* DVD Book type */ - Ucbit maximum_rate : 4; /* Maximum data rate (coded) */ - Ucbit disc_size : 4; /* Disc size (coded) */ - Ucbit layer_type : 4; /* Layer type */ - Ucbit track_path : 1; /* 0 = parallel, 1 = opposit dir*/ - Ucbit numlayers : 2; /* Number of Layers (0 == 1) */ - Ucbit res2_7 : 1; /* Reserved */ - Ucbit track_density : 4; /* Track density (coded) */ - Ucbit linear_density : 4; /* Linear data density (coded) */ - Uchar res8; /* Reserved */ - Uchar phys_start[3]; /* Starting Physical sector # */ - Uchar res12; /* Reserved */ - Uchar phys_end[3]; /* End physical data sector # */ - Uchar res16; /* Reserved */ - Uchar end_layer0[3]; /* End sector # in layer */ - Ucbit res20 : 7; /* Reserved */ - Ucbit bca : 1; /* BCA flag bit */ -}; - -#else /* Motorola bitorder */ - -struct dvd_structure_00 { - Uchar data_len[2]; /* Data len without this info */ - Uchar res23[2]; /* Reserved */ - Ucbit book_type : 4; /* DVD Book type */ - Ucbit book_version : 4; /* DVD Book version */ - Ucbit disc_size : 4; /* Disc size (coded) */ - Ucbit maximum_rate : 4; /* Maximum data rate (coded) */ - Ucbit res2_7 : 1; /* Reserved */ - Ucbit numlayers : 2; /* Number of Layers (0 == 1) */ - Ucbit track_path : 1; /* 0 = parallel, 1 = opposit dir*/ - Ucbit layer_type : 4; /* Layer type */ - Ucbit linear_density : 4; /* Linear data density (coded) */ - Ucbit track_density : 4; /* Track density (coded) */ - Uchar res8; /* Reserved */ - Uchar phys_start[3]; /* Starting Physical sector # */ - Uchar res12; /* Reserved */ - Uchar phys_end[3]; /* End physical data sector # */ - Uchar res16; /* Reserved */ - Uchar end_layer0[3]; /* End sector # in layer */ - Ucbit bca : 1; /* BCA flag bit */ - Ucbit res20 : 7; /* Reserved */ -}; - -#endif - -struct dvd_structure_01 { - Uchar data_len[2]; /* Data len without this info */ - Uchar res23[2]; /* Reserved */ - Uchar copyr_prot_type; /* Copyright prot system type */ - Uchar region_mgt_info; /* Region management info */ - Uchar res67[2]; /* Reserved */ -}; - -struct dvd_structure_02 { - Uchar data_len[2]; /* Data len without this info */ - Uchar res23[2]; /* Reserved */ - Uchar key_data[2048]; /* Disc Key data */ -}; - -struct dvd_structure_03 { - Uchar data_len[2]; /* Data len without this info */ - Uchar res23[2]; /* Reserved */ - Uchar bca_info[1]; /* BCA information (12-188 bytes)*/ -}; - -struct dvd_structure_04 { - Uchar data_len[2]; /* Data len without this info */ - Uchar res23[2]; /* Reserved */ - Uchar man_info[2048]; /* Disc manufacturing info */ -}; - -#if defined(_BIT_FIELDS_LTOH) /* Intel bitorder */ - -struct dvd_structure_05 { - Uchar data_len[2]; /* Data len without this info */ - Uchar res23[2]; /* Reserved */ - Ucbit res4_03 : 4; /* Reserved */ - Ucbit cgms : 2; /* CGMS (see below) */ - Ucbit res4_6 : 1; /* Reserved */ - Ucbit cpm : 1; /* This is copyrighted material */ - Uchar res57[3]; /* Reserved */ -}; - -#else /* Motorola bitorder */ - -struct dvd_structure_05 { - Uchar data_len[2]; /* Data len without this info */ - Uchar res23[2]; /* Reserved */ - Ucbit cpm : 1; /* This is copyrighted material */ - Ucbit res4_6 : 1; /* Reserved */ - Ucbit cgms : 2; /* CGMS (see below) */ - Ucbit res4_03 : 4; /* Reserved */ - Uchar res57[3]; /* Reserved */ -}; - -#endif - -#define CGMS_PERMITTED 0 /* Unlimited copy permitted */ -#define CGMS_RES 1 /* Reserved */ -#define CGMS_ONE_COPY 2 /* One copy permitted */ -#define CGMS_NO_COPY 3 /* No copy permitted */ - -struct dvd_structure_0D { - Uchar data_len[2]; /* Data len without this info */ - Uchar res23[2]; /* Reserved */ - Uchar last_rma_sector[2]; /* Last recorded RMA sector # */ - Uchar rmd_bytes[1]; /* Content of Record man area */ -}; - -struct dvd_structure_0E { - Uchar data_len[2]; /* Data len without this info */ - Uchar res23[2]; /* Reserved */ - Uchar field_id; /* Field ID (1) */ - Uchar application_code; /* Disc Application code */ - Uchar phys_data; /* Disc Phisical Data */ - Uchar last_recordable_addr[3]; /* Last addr of recordable area */ - Uchar res_a[2]; /* Reserved */ - Uchar field_id_2; /* Field ID (2) */ - Uchar ind_wr_power; /* Recommended writing power */ - Uchar ind_wavelength; /* Wavelength for ind_wr_power */ - Uchar opt_wr_strategy[4]; /* Optimum write Strategy */ - Uchar res_b[1]; /* Reserved */ - Uchar field_id_3; /* Field ID (3) */ - Uchar man_id[6]; /* Manufacturer ID */ - Uchar res_m1; /* Reserved */ - Uchar field_id_4; /* Field ID (4) */ - Uchar man_id2[6]; /* Manufacturer ID */ - Uchar res_m2; /* Reserved */ -}; - -struct dvd_structure_0F { - Uchar data_len[2]; /* Data len without this info */ - Uchar res23[2]; /* Reserved */ - Uchar res45[2]; /* Reserved */ - Uchar random[2]; /* Random number */ - Uchar year[4]; /* Year (ascii) */ - Uchar month[2]; /* Month (ascii) */ - Uchar day[2]; /* Day (ascii) */ - Uchar hour[2]; /* Hour (ascii) */ - Uchar minute[2]; /* Minute (ascii) */ - Uchar second[2]; /* Second (ascii) */ -}; - -struct dvd_structure_0F_w { - Uchar data_len[2]; /* Data len without this info */ - Uchar res23[2]; /* Reserved */ - Uchar res45[2]; /* Reserved */ - Uchar year[4]; /* Year (ascii) */ - Uchar month[2]; /* Month (ascii) */ - Uchar day[2]; /* Day (ascii) */ - Uchar hour[2]; /* Hour (ascii) */ - Uchar minute[2]; /* Minute (ascii) */ - Uchar second[2]; /* Second (ascii) */ -}; - -struct dvd_structure_20 { - Uchar data_len[2]; /* Data len without this info */ - Uchar res23[2]; /* Reserved */ - Uchar res47[4]; /* Reserved */ - Uchar l0_area_cap[4]; /* Layer 0 area capacity */ -}; - -struct dvd_structure_22 { - Uchar data_len[2]; /* Data len without this info */ - Uchar res23[2]; /* Reserved */ - Uchar res47[4]; /* Reserved */ - Uchar jump_interval_size[4]; /* Jump interval size */ -}; - -struct dvd_structure_23 { - Uchar data_len[2]; /* Data len without this info */ - Uchar res23[2]; /* Reserved */ - Uchar res47[4]; /* Reserved */ - Uchar jump_lba[4]; /* Jump logical block address */ -}; - -struct mmc_cue { - Uchar cs_ctladr; /* CTL/ADR for this track */ - Uchar cs_tno; /* This track number */ - Uchar cs_index; /* Index within this track */ - Uchar cs_dataform; /* Data form */ - Uchar cs_scms; /* Serial copy management */ - Uchar cs_min; /* Absolute time minutes */ - Uchar cs_sec; /* Absolute time seconds */ - Uchar cs_frame; /* Absolute time frames */ -}; - -struct mmc_performance_header { - Uchar p_datalen[4]; /* Performance Data length */ -#if defined(_BIT_FIELDS_LTOH) /* Intel bitorder */ - Ucbit p_exept :1; /* Nominal vs. Exept. conditions*/ - Ucbit p_write :1; /* Write vs. Read performance */ - Ucbit p_res_4 :6; /* Reserved bits... */ -#else /* Motorola bitorder */ - Ucbit p_res_4 :6; /* Reserved bits... */ - Ucbit p_write :1; /* Write vs. Read performance */ - Ucbit p_exept :1; /* Nominal vs. Exept. conditions*/ -#endif - Uchar p_res[3]; /* Reserved bytes */ -}; - - -struct mmc_performance { /* Type == 00 (nominal) */ - Uchar start_lba[4]; /* Starting LBA */ - Uchar start_perf[4]; /* Start Performance */ - Uchar end_lba[4]; /* Ending LBA */ - Uchar end_perf[4]; /* Ending Performance */ -}; - -struct mmc_exceptions { /* Type == 00 (exceptions) */ - Uchar lba[4]; /* LBA */ - Uchar time[2]; /* Time */ -}; - -struct mmc_write_speed { /* Type == 00 (write speed) */ -#if defined(_BIT_FIELDS_LTOH) /* Intel bitorder */ - Ucbit p_mrw :1; /* Suitable for mixed read/write*/ - Ucbit p_exact :1; /* Speed count for whole media */ - Ucbit p_rdd :1; /* Media rotational control */ - Ucbit p_wrc :2; /* Write rotational control */ - Ucbit p_res :3; /* Reserved bits... */ -#else /* Motorola bitorder */ - Ucbit p_res :3; /* Reserved bits... */ - Ucbit p_wrc :2; /* Write rotational control */ - Ucbit p_rdd :1; /* Media rotational control */ - Ucbit p_exact :1; /* Speed count for whole media */ - Ucbit p_mrw :1; /* Suitable for mixed read/write*/ -#endif - Uchar res[3]; /* Reserved Bytes */ - Uchar end_lba[4]; /* Ending LBA */ - Uchar read_speed[4]; /* Read Speed */ - Uchar write_speed[4]; /* Write Speed */ -}; - -#define WRC_DEF_RC 0 /* Media default rotational control */ -#define WRC_CAV 1 /* CAV */ - - -struct mmc_streaming { /* Performance for set streaming*/ -#if defined(_BIT_FIELDS_LTOH) /* Intel bitorder */ - Ucbit p_ra :1; /* Random Acess */ - Ucbit p_exact :1; /* Set values exactly */ - Ucbit p_rdd :1; /* Restore unit defaults */ - Ucbit p_wrc :2; /* Write rotational control */ - Ucbit p_res :3; /* Reserved bits... */ -#else /* Motorola bitorder */ - Ucbit p_res :3; /* Reserved bits... */ - Ucbit p_wrc :2; /* Write rotational control */ - Ucbit p_rdd :1; /* Restore unit defaults */ - Ucbit p_exact :1; /* Set values exactly */ - Ucbit p_ra :1; /* Random Acess */ -#endif - Uchar res[3]; /* Reserved Bytes */ - Uchar start_lba[4]; /* Starting LBA */ - Uchar end_lba[4]; /* Ending LBA */ - Uchar read_size[4]; /* Read Size */ - Uchar read_time[4]; /* Read Time */ - Uchar write_size[4]; /* Write Size */ - Uchar write_time[4]; /* Write Time */ -}; - -#endif /* _SCSIMMC_H */ diff -Nru cdrtools-2.01.01a33/scgskeleton/scsi_scan.c cdrtools-3.02a09/scgskeleton/scsi_scan.c --- cdrtools-2.01.01a33/scgskeleton/scsi_scan.c 2007-07-12 07:04:53.000000000 +0000 +++ cdrtools-3.02a09/scgskeleton/scsi_scan.c 1970-01-01 00:00:00.000000000 +0000 @@ -1,270 +0,0 @@ -/* @(#)scsi_scan.c 1.30 07/07/12 Copyright 1997-2007 J. Schilling */ -#ifndef lint -static char sccsid[] = - "@(#)scsi_scan.c 1.30 07/07/12 Copyright 1997-2007 J. Schilling"; -#endif -/* - * Scan SCSI Bus. - * Stolen from sformat. Need a more general form to - * re-use it in sformat too. - * - * Copyright (c) 1997-2007 J. Schilling - */ -/* - * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. - * - * See the file CDDL.Schily.txt in this distribution for details. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file CDDL.Schily.txt from this distribution. - */ - -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include - -#include "scsi_scan.h" -#include "cdrecord.h" - -LOCAL void print_product __PR((FILE *f, struct scsi_inquiry *ip)); -EXPORT int select_target __PR((SCSI *scgp, FILE *f)); -EXPORT int find_target __PR((SCSI *scgp, int type, int idx)); -LOCAL int _select_target __PR((SCSI *scgp, FILE *f, int type, int idx)); -LOCAL int select_unit __PR((SCSI *scgp, FILE *f)); - -LOCAL void -print_product(f, ip) - FILE *f; - struct scsi_inquiry *ip; -{ - fprintf(f, "'%.8s' ", ip->vendor_info); - fprintf(f, "'%.16s' ", ip->prod_ident); - fprintf(f, "'%.4s' ", ip->prod_revision); - if (ip->add_len < 31) { - fprintf(f, "NON CCS "); - } - scg_fprintdev(f, ip); -} - -EXPORT int -select_target(scgp, f) - SCSI *scgp; - FILE *f; -{ - return (_select_target(scgp, f, -1, -1)); -} - -EXPORT int -find_target(scgp, type, idx) - SCSI *scgp; - int type; - int idx; -{ - return (_select_target(scgp, (FILE *)NULL, type, idx)); -} - -LOCAL int -_select_target(scgp, f, type, idx) - SCSI *scgp; - FILE *f; - int type; - int idx; -{ - int initiator; - int cscsibus = scg_scsibus(scgp); - int ctarget = scg_target(scgp); - int clun = scg_lun(scgp); - int numbus = scg_numbus(scgp); - int n; - int low = -1; - int high = -1; - int amt = -1; - int bus; - int tgt; - int lun = 0; - int err; - BOOL have_tgt; - - if (numbus < 0) - numbus = 1024; - scgp->silent++; - - for (bus = 0; bus < numbus; bus++) { - scg_settarget(scgp, bus, 0, 0); - - if (!scg_havebus(scgp, bus)) - continue; - - initiator = scg_initiator_id(scgp); - if (f) - fprintf(f, "scsibus%d:\n", bus); - - for (tgt = 0; tgt < 16; tgt++) { - n = bus*100 + tgt; - - scg_settarget(scgp, bus, tgt, lun); - seterrno(0); - have_tgt = unit_ready(scgp) || scgp->scmd->error != SCG_FATAL; - err = geterrno(); - if (err == EPERM || err == EACCES) - return (-1); - - if (!have_tgt && tgt > 7) { - if (scgp->scmd->ux_errno == EINVAL) - break; - continue; - } - if (f) { -#ifdef FMT - if (print_disknames(bus, tgt, -1) < 8) - fprintf(f, "\t"); - else - fprintf(f, " "); -#else - fprintf(f, "\t"); -#endif - if (fprintf(f, "%d,%d,%d", bus, tgt, lun) < 8) - fprintf(f, "\t"); - else - fprintf(f, " "); - fprintf(f, "%3d) ", n); - } - if (tgt == initiator) { - if (f) - fprintf(f, "HOST ADAPTOR\n"); - continue; - } - if (!have_tgt) { - /* - * Hack: fd -> -2 means no access - */ - if (f) { - fprintf(f, "%c\n", - scgp->fd == -2 ? '?':'*'); - } - continue; - } - if (low < 0) - low = n; - high = n; - - getdev(scgp, FALSE); - if (f) - print_product(f, scgp->inq); - if (type >= 0 && scgp->inq->type == type) { - amt++; - if (amt == 0) /* amt starts at -1 */ - amt++; - if (amt == idx) { - scgp->silent--; - return (amt); - } - } else if (type < 0) { - amt++; - } - if (amt == 0) /* amt starts at -1 */ - amt++; - } - } - scgp->silent--; - - if (low < 0) { - errmsgno(EX_BAD, "No target found.\n"); - return (0); - } - n = -1; -#ifdef FMT - getint("Select target", &n, low, high); - bus = n/100; - tgt = n%100; - scg_settarget(scgp, bus, tgt, lun); - return (select_unit(scgp)); - -#endif - scg_settarget(scgp, cscsibus, ctarget, clun); - return (amt); -} - -LOCAL int -select_unit(scgp, f) - SCSI *scgp; - FILE *f; -{ - int initiator; - int clun = scg_lun(scgp); - int low = -1; - int high = -1; - int lun; - - scgp->silent++; - - fprintf(f, "scsibus%d target %d:\n", scg_scsibus(scgp), scg_target(scgp)); - - initiator = scg_initiator_id(scgp); - for (lun = 0; lun < 8; lun++) { - -#ifdef FMT - if (print_disknames(scg_scsibus(scgp), scg_target(scgp), lun) < 8) - fprintf(f, "\t"); - else - fprintf(f, " "); -#else - fprintf(f, "\t"); -#endif - if (fprintf(f, "%d,%d,%d", scg_scsibus(scgp), scg_target(scgp), lun) < 8) - fprintf(f, "\t"); - else - fprintf(f, " "); - fprintf(f, "%3d) ", lun); - if (scg_target(scgp) == initiator) { - fprintf(f, "HOST ADAPTOR\n"); - continue; - } - scg_settarget(scgp, scg_scsibus(scgp), scg_target(scgp), lun); - if (!unit_ready(scgp) && scgp->scmd->error == SCG_FATAL) { - fprintf(f, "*\n"); - continue; - } - if (unit_ready(scgp)) { - /* non extended sense illegal lun */ - if (scgp->scmd->sense.code == 0x25) { - fprintf(f, "BAD UNIT\n"); - continue; - } - } - if (low < 0) - low = lun; - high = lun; - - getdev(scgp, FALSE); - print_product(f, scgp->inq); - } - scgp->silent--; - - if (low < 0) { - errmsgno(EX_BAD, "No lun found.\n"); - return (0); - } - lun = -1; -#ifdef FMT - getint("Select lun", &lun, low, high); - scg_settarget(scgp, scg_scsibus(scgp), scg_target(scgp), lun); - format_one(scgp); - return (1); -#endif - - scg_settarget(scgp, scg_scsibus(scgp), scg_target(scgp), clun); - return (1); -} diff -Nru cdrtools-2.01.01a33/scgskeleton/scsi_scan.h cdrtools-3.02a09/scgskeleton/scsi_scan.h --- cdrtools-2.01.01a33/scgskeleton/scsi_scan.h 2006-11-26 00:39:41.000000000 +0000 +++ cdrtools-3.02a09/scgskeleton/scsi_scan.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,25 +0,0 @@ -/* @(#)scsi_scan.h 1.5 06/11/26 Copyright 1997 J. Schilling */ -/* - * Interface to scan SCSI Bus. - * - * Copyright (c) 1997 J. Schilling - */ -/* - * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. - * - * See the file CDDL.Schily.txt in this distribution for details. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file CDDL.Schily.txt from this distribution. - */ - -#ifndef _SCSI_SCAN_H -#define _SCSI_SCAN_H - -extern int select_target __PR((SCSI *scgp, FILE *f)); -extern int find_target __PR((SCSI *scgp, int type, int idx)); - -#endif /* _SCSI_SCAN_H */ diff -Nru cdrtools-2.01.01a33/scgskeleton/skel.c cdrtools-3.02a09/scgskeleton/skel.c --- cdrtools-2.01.01a33/scgskeleton/skel.c 2007-06-10 12:24:03.000000000 +0000 +++ cdrtools-3.02a09/scgskeleton/skel.c 2016-01-24 16:34:45.000000000 +0000 @@ -1,12 +1,13 @@ -/* @(#)skel.c 1.9 07/06/10 Copyright 1987, 1995-2007 J. Schilling */ +/* @(#)skel.c 1.23 16/01/24 Copyright 1987, 1995-2016 J. Schilling */ +#include #ifndef lint -static char sccsid[] = - "@(#)skel.c 1.9 07/06/10 Copyright 1987, 1995-2007 J. Schilling"; +static UConst char sccsid[] = + "@(#)skel.c 1.23 16/01/24 Copyright 1987, 1995-2016 J. Schilling"; #endif /* * Skeleton for the use of the scg genearal SCSI - driver * - * Copyright (c) 1987, 1995-2007 J. Schilling + * Copyright (c) 1987, 1995-2016 J. Schilling */ /* * The contents of this file are subject to the terms of the @@ -15,6 +16,8 @@ * with the License. * * See the file CDDL.Schily.txt in this distribution for details. + * A copy of the CDDL is also available via the Internet at + * http://www.opensource.org/licenses/cddl1.txt * * When distributing Covered Code, include this CDDL HEADER in each * file and include the License file CDDL.Schily.txt from this distribution. @@ -22,22 +25,19 @@ #define SKEL_MAIN #include -#include +#include #include #include #include #include #include #include -#include +#include +#include #include -#ifdef HAVE_PRIV_H -#include -#endif - -#ifdef NEED_O_BINARY -#include /* for setmode() prototype */ -#endif +#include +#include +#include /* for setmode() prototype */ #include #include @@ -45,7 +45,7 @@ #include "scsi_scan.h" #include "cdrecord.h" -#include "defaults.h" +#include "cdrdeflt.h" #include "iodefs.h" char skel_version[] = "1.2"; @@ -58,13 +58,23 @@ char oerr[3]; } exargs; +#ifndef NO_DOIT +#define NEED_PRSTATS +#endif + LOCAL void usage __PR((int ret)); EXPORT int main __PR((int ac, char **av)); LOCAL void intr __PR((int sig)); LOCAL void exscsi __PR((int excode, void *arg)); +#ifdef __needed__ LOCAL void excdr __PR((int excode, void *arg)); +#endif +#ifdef NEED_PRSTATS LOCAL int prstats __PR((void)); +#endif +#ifdef __needed__ LOCAL int prstats_silent __PR((void)); +#endif #ifndef NO_DOIT #include "doit.c" @@ -82,7 +92,7 @@ int exsig; char *Sbuf; -long Sbufsize; +long Sbufsize = -1L; int help; int xdebug; @@ -94,25 +104,26 @@ usage(ret) int ret; { - error("Usage:\tscgskeleton [options]\n"); - error("options:\n"); - error("\t-version print version information and exit\n"); - error("\tdev=target SCSI target to use\n"); - error("\tf=filename Name of file to read/write\n"); - error("\tts=# set maximum transfer size for a single SCSI command\n"); - error("\ttimeout=# set the default SCSI command timeout to #.\n"); - error("\tdebug=#,-d Set to # or increment misc debug level\n"); - error("\tkdebug=#,kd=# do Kernel debugging\n"); - error("\t-quiet,-q be more quiet in error retry mode\n"); - error("\t-verbose,-v increment general verbose level by one\n"); - error("\t-Verbose,-V increment SCSI command transport verbose level by one\n"); - error("\t-silent,-s do not print status of failed SCSI commands\n"); - error("\t-scanbus scan the SCSI bus and exit\n"); + error(_("Usage:\tscgskeleton [options]\n")); + error(_("Options:\n")); + error(_("\t-version print version information and exit\n")); + error(_("\tdev=target SCSI target to use\n")); + error(_("\tscgopts=spec SCSI options for libscg\n")); + error(_("\tf=filename Name of file to read/write\n")); + error(_("\tts=# set maximum transfer size for a single SCSI command\n")); + error(_("\ttimeout=# set the default SCSI command timeout to #.\n")); + error(_("\tdebug=#,-d Set to # or increment misc debug level\n")); + error(_("\tkdebug=#,kd=# do Kernel debugging\n")); + error(_("\t-quiet,-q be more quiet in error retry mode\n")); + error(_("\t-verbose,-v increment general verbose level by one\n")); + error(_("\t-Verbose,-V increment SCSI command transport verbose level by one\n")); + error(_("\t-silent,-s do not print status of failed SCSI commands\n")); + error(_("\t-scanbus scan the SCSI bus and exit\n")); exit(ret); } /* CSTYLED */ -char opts[] = "debug#,d+,kdebug#,kd#,timeout#,quiet,q,verbose+,v+,Verbose+,V+,x+,xd#,silent,s,help,h,version,scanbus,dev*,ts&,f*"; +char opts[] = "debug#,d+,kdebug#,kd#,timeout#,quiet,q,verbose+,v+,Verbose+,V+,x+,xd#,silent,s,help,h,version,scanbus,dev*,scgopts*,ts&,f*"; EXPORT int main(ac, av) @@ -120,9 +131,13 @@ char *av[]; { char *dev = NULL; + char *scgopts = NULL; int fcount; int cac; char * const *cav; +#if defined(USE_NLS) + char *dir; +#endif int scsibus = -1; int target = -1; int lun = -1; @@ -135,9 +150,28 @@ int scanbus = 0; SCSI *scgp; char *filename = NULL; + int err; save_args(ac, av); +#if defined(USE_NLS) + (void) setlocale(LC_ALL, ""); +#if !defined(TEXT_DOMAIN) /* Should be defined by cc -D */ +#define TEXT_DOMAIN "scgskeleton" /* Use this only if it weren't */ +#endif + dir = searchfileinpath("share/locale", F_OK, + SIP_ANY_FILE|SIP_NO_PATH, NULL); + if (dir) + (void) bindtextdomain(TEXT_DOMAIN, dir); + else +#if defined(PROTOTYPES) && defined(INS_BASE) + (void) bindtextdomain(TEXT_DOMAIN, INS_BASE "/share/locale"); +#else + (void) bindtextdomain(TEXT_DOMAIN, "/usr/share/locale"); +#endif + (void) textdomain(TEXT_DOMAIN); +#endif + cac = --ac; cav = ++av; @@ -152,18 +186,19 @@ &silent, &silent, &help, &help, &pversion, &scanbus, - &dev, + &dev, &scgopts, getnum, &Sbufsize, &filename) < 0) { - errmsgno(EX_BAD, "Bad flag: %s.\n", cav[0]); + errmsgno(EX_BAD, _("Bad flag: %s.\n"), cav[0]); usage(EX_BAD); } if (help) usage(0); if (pversion) { - printf("scgskeleton %s (%s-%s-%s) Copyright (C) 1987, 1995-2007 Jörg Schilling\n", + printf(_("scgskeleton %s (%s-%s-%s) Copyright (C) 1987, 1995-2016 %s\n"), skel_version, - HOST_CPU, HOST_VENDOR, HOST_OS); + HOST_CPU, HOST_VENDOR, HOST_OS, + _("Joerg Schilling")); exit(0); } @@ -176,7 +211,7 @@ if (fcount == 1) { if (*astoi(cav[0], &target) != '\0') { errmsgno(EX_BAD, - "Target '%s' is not a Number.\n", + _("Target '%s' is not a Number.\n"), cav[0]); usage(EX_BAD); /* NOTREACHED */ @@ -185,7 +220,7 @@ if (fcount == 2) { if (*astoi(cav[0], &lun) != '\0') { errmsgno(EX_BAD, - "Lun is '%s' not a Number.\n", + _("Lun is '%s' not a Number.\n"), cav[0]); usage(EX_BAD); /* NOTREACHED */ @@ -194,7 +229,7 @@ if (fcount == 3) { if (*astoi(cav[0], &scsibus) != '\0') { errmsgno(EX_BAD, - "Scsibus is '%s' not a Number.\n", + _("Scsibus is '%s' not a Number.\n"), cav[0]); usage(EX_BAD); /* NOTREACHED */ @@ -205,13 +240,13 @@ } /*error("dev: '%s'\n", dev);*/ - cdr_defaults(&dev, NULL, NULL, NULL); + cdr_defaults(&dev, NULL, NULL, &Sbufsize, NULL); if (debug) { - printf("dev: '%s'\n", dev); + printf(_("dev: '%s'\n"), dev); } if (!scanbus && dev == NULL && scsibus == -1 && (target == -1 || lun == -1)) { - errmsgno(EX_BAD, "No SCSI device specified.\n"); + errmsgno(EX_BAD, _("No SCSI device specified.\n")); usage(EX_BAD); } if (dev || scanbus) { @@ -230,11 +265,11 @@ exit(0); } if ((scgp = scg_open(dev, errstr, sizeof (errstr), debug, lverbose)) == (SCSI *)0) { - int err = geterrno(); + err = geterrno(); - errmsgno(err, "%s%sCannot open SCSI driver.\n", errstr, errstr[0]?". ":""); - errmsgno(EX_BAD, "For possible targets try 'scgskeleton -scanbus'. Make sure you are root.\n"); - errmsgno(EX_BAD, "For possible transport specifiers try 'scgskeleton dev=help'.\n"); + errmsgno(err, _("%s%sCannot open SCSI driver.\n"), errstr, errstr[0]?". ":""); + errmsgno(EX_BAD, _("For possible targets try 'scgskeleton -scanbus'. Make sure you are root.\n")); + errmsgno(EX_BAD, _("For possible transport specifiers try 'scgskeleton dev=help'.\n")); exit(err); } } else { @@ -247,7 +282,12 @@ scg_settarget(scgp, scsibus, target, lun); if (scg__open(scgp, NULL) <= 0) - comerr("Cannot open SCSI driver.\n"); + comerr(_("Cannot open SCSI driver.\n")); + } + if (scgopts) { + int i = scg_opts(scgp, scgopts); + if (i <= 0) + exit(i < 0 ? EX_BAD : 0); } scgp->silent = silent; scgp->verbose = verbose; @@ -255,11 +295,11 @@ scgp->kdebug = kdebug; scg_settimeout(scgp, deftimeout); - if (Sbufsize == 0) + if (Sbufsize < 0) Sbufsize = 256*1024L; Sbufsize = scg_bufsize(scgp, Sbufsize); if ((Sbuf = scg_getbuf(scgp, Sbufsize)) == NULL) - comerr("Cannot get SCSI I/O buffer.\n"); + comerr(_("Cannot get SCSI I/O buffer.\n")); #ifdef HAVE_PRIV_SET /* @@ -292,15 +332,20 @@ if (setuid(getuid()) < 0) #endif #endif - comerr("Panic cannot set back effective uid.\n"); + comerr(_("Panic cannot set back effective uid.\n")); /* code to use SCG */ if (scanbus) { - select_target(scgp, stdout); + if (select_target(scgp, stdout) < 0) + exit(EX_BAD); exit(0); } + seterrno(0); do_inquiry(scgp, FALSE); + err = geterrno(); + if (err == EPERM || err == EACCES) + exit(EX_BAD); allow_atapi(scgp, TRUE); /* Try to switch to 10 byte mode cmds */ exargs.scgp = scgp; @@ -356,7 +401,7 @@ break; if (i == 10) { errmsgno(EX_BAD, - "Waiting for current SCSI command to finish.\n"); + _("Waiting for current SCSI command to finish.\n")); } usleep(100000); } @@ -377,6 +422,7 @@ } } +#ifdef __needed__ LOCAL void excdr(excode, arg) int excode; @@ -388,7 +434,9 @@ /* Do several other restores/statistics here (see cdrecord.c) */ #endif } +#endif +#ifdef NEED_PRSTATS /* * Return milliseconds since start time. */ @@ -400,7 +448,7 @@ int tmsec; if (gettimeofday(&stoptime, (struct timezone *)0) < 0) - comerr("Cannot get time\n"); + comerr(_("Cannot get time\n")); sec = stoptime.tv_sec - starttime.tv_sec; usec = stoptime.tv_usec - starttime.tv_usec; @@ -413,10 +461,12 @@ usec += 1000000; } - error("Time total: %d.%03dsec\n", sec, usec/1000); + error(_("Time total: %d.%03dsec\n"), sec, usec/1000); return (1000*sec + (usec / 1000)); } +#endif +#ifdef __needed__ /* * Return milliseconds since start time, but be silent this time. */ @@ -428,7 +478,7 @@ int tmsec; if (gettimeofday(&stoptime, (struct timezone *)0) < 0) - comerr("Cannot get time\n"); + comerr(_("Cannot get time\n")); sec = stoptime.tv_sec - starttime.tv_sec; usec = stoptime.tv_usec - starttime.tv_usec; @@ -443,6 +493,7 @@ return (1000*sec + (usec / 1000)); } +#endif #ifndef DOIT_MAIN LOCAL void @@ -453,12 +504,12 @@ for (;;) { if (!wait_unit_ready(scgp, 60)) - comerrno(EX_BAD, "Device not ready.\n"); + comerrno(EX_BAD, _("Device not ready.\n")); - printf("0:read\n"); + printf(_("0:read\n")); /* printf("7:wne 8:floppy 9:verify 10:checkcmds 11:read disk 12:write disk\n");*/ - getint("Enter selection:", &i, 0, 20); + getint(_("Enter selection:"), &i, 0, 20); if (didintr) return; @@ -466,7 +517,7 @@ /* case 1: read_disk(scgp, 0); break;*/ - default: error("Unimplemented selection %d\n", i); + default: error(_("Unimplemented selection %d\n"), i); } } } diff -Nru cdrtools-2.01.01a33/TARGETS/44libdeflt cdrtools-3.02a09/TARGETS/44libdeflt --- cdrtools-2.01.01a33/TARGETS/44libdeflt 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/TARGETS/44libdeflt 2001-05-02 21:37:30.000000000 +0000 @@ -0,0 +1 @@ +Library to read local defaults from /etc/default/* diff -Nru cdrtools-2.01.01a33/TARGETS/44libscg!@!scg cdrtools-3.02a09/TARGETS/44libscg!@!scg --- cdrtools-2.01.01a33/TARGETS/44libscg!@!scg 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/TARGETS/44libscg!@!scg 2008-07-07 14:50:30.000000000 +0000 @@ -0,0 +1 @@ +Portable SCSI transport library include files diff -Nru cdrtools-2.01.01a33/TARGETS/45libcdrdeflt cdrtools-3.02a09/TARGETS/45libcdrdeflt --- cdrtools-2.01.01a33/TARGETS/45libcdrdeflt 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/TARGETS/45libcdrdeflt 2008-10-25 20:49:02.000000000 +0000 @@ -0,0 +1 @@ +Library to read local defaults from /etc/default/cdrecord via libdeflt diff -Nru cdrtools-2.01.01a33/TARGETS/45libdeflt cdrtools-3.02a09/TARGETS/45libdeflt --- cdrtools-2.01.01a33/TARGETS/45libdeflt 2001-05-02 21:37:30.000000000 +0000 +++ cdrtools-3.02a09/TARGETS/45libdeflt 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -Library to read local defaults from /etc/default/* diff -Nru cdrtools-2.01.01a33/TARGETS/45libedc cdrtools-3.02a09/TARGETS/45libedc --- cdrtools-2.01.01a33/TARGETS/45libedc 2002-08-13 09:50:42.000000000 +0000 +++ cdrtools-3.02a09/TARGETS/45libedc 2006-09-25 12:37:50.000000000 +0000 @@ -1 +1 @@ -Heiko's CD sector formatting Library (not licensed under GPL) +Heiko Eißdeldt's & Jörg Schilling CD sector formatting Library diff -Nru cdrtools-2.01.01a33/TARGETS/45libmdigest cdrtools-3.02a09/TARGETS/45libmdigest --- cdrtools-2.01.01a33/TARGETS/45libmdigest 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/TARGETS/45libmdigest 2009-08-11 21:41:02.000000000 +0000 @@ -0,0 +1 @@ +Message Digest library (containing md5 and other hashes) diff -Nru cdrtools-2.01.01a33/TARGETS/45libscgcmd cdrtools-3.02a09/TARGETS/45libscgcmd --- cdrtools-2.01.01a33/TARGETS/45libscgcmd 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/TARGETS/45libscgcmd 2008-10-25 20:51:33.000000000 +0000 @@ -0,0 +1 @@ +SCSI command library diff -Nru cdrtools-2.01.01a33/TEMPLATES/cmd.mk cdrtools-3.02a09/TEMPLATES/cmd.mk --- cdrtools-2.01.01a33/TEMPLATES/cmd.mk 1997-03-04 15:29:29.000000000 +0000 +++ cdrtools-3.02a09/TEMPLATES/cmd.mk 1970-01-01 00:00:00.000000000 +0000 @@ -1,19 +0,0 @@ -#ident %W% %E% %Q% -########################################################################### -# Sample makefile for general application programs -########################################################################### -SRCROOT= ../.. -RULESDIR= RULES -include $(SRCROOT)/$(RULESDIR)/rules.top -########################################################################### - -INSDIR= bin -TARGET= cfform -#CPPOPTS += -Ispecincl -CFILES= cfform.c -LIBS= -lat -XMK_FILE= Makefile.man - -########################################################################### -include $(SRCROOT)/$(RULESDIR)/rules.cmd -########################################################################### diff -Nru cdrtools-2.01.01a33/TEMPLATES/Defaults.clang cdrtools-3.02a09/TEMPLATES/Defaults.clang --- cdrtools-2.01.01a33/TEMPLATES/Defaults.clang 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/TEMPLATES/Defaults.clang 2015-10-08 18:43:12.000000000 +0000 @@ -0,0 +1,49 @@ +#ident "@(#)Defaults.clang 1.2 15/10/08 " +########################################################################### +# +# global definitions for unknown Systems using CC=clang +# +########################################################################### +# +# Compiler stuff +# +########################################################################### +#DEFCCOM= cc +DEFCCOM= clang +########################################################################### +# +# Link mode for libraries that are part of the makefile system: +# If DEFLINKMODE is set to "static", no dynamic linking will be used +# If DEFLINKMODE is set to "dynamic", dynamic linking will be used +# +########################################################################### +DEFLINKMODE= static + +########################################################################### +# +# If the next line is commented out, compilation is done with max warn level +# If the next line is uncommented, compilation is done with minimal warnings +# +########################################################################### +#CWARNOPTS= + +DEFINCDIRS= $(SRCROOT)/include +DEFOSINCDIRS= +LDPATH= -L/opt/schily/lib +RUNPATH= -R $(INS_BASE)/lib -R /opt/schily/lib -R $(OLIBSDIR) + +########################################################################### +# +# Installation config stuff +# +########################################################################### +INS_BASE= /opt/schily +INS_KBASE= / +INS_RBASE= / +# +DEFUMASK= 002 +# +DEFINSMODEF= 444 +DEFINSMODEX= 755 +DEFINSUSR= bin +DEFINSGRP= bin diff -Nru cdrtools-2.01.01a33/TEMPLATES/Defaults.gcc cdrtools-3.02a09/TEMPLATES/Defaults.gcc --- cdrtools-2.01.01a33/TEMPLATES/Defaults.gcc 2003-11-23 01:20:16.000000000 +0000 +++ cdrtools-3.02a09/TEMPLATES/Defaults.gcc 2015-10-08 18:43:12.000000000 +0000 @@ -1,4 +1,4 @@ -#ident "%W% %E% %Q%" +#ident "@(#)Defaults.gcc 1.2 15/10/08 " ########################################################################### # # global definitions for unknown Systems using CC=gcc @@ -12,6 +12,15 @@ DEFCCOM= gcc ########################################################################### # +# Link mode for libraries that are part of the makefile system: +# If DEFLINKMODE is set to "static", no dynamic linking will be used +# If DEFLINKMODE is set to "dynamic", dynamic linking will be used +# +########################################################################### +DEFLINKMODE= static + +########################################################################### +# # If the next line is commented out, compilation is done with max warn level # If the next line is uncommented, compilation is done with minimal warnings # @@ -19,6 +28,7 @@ #CWARNOPTS= DEFINCDIRS= $(SRCROOT)/include +DEFOSINCDIRS= LDPATH= -L/opt/schily/lib RUNPATH= -R $(INS_BASE)/lib -R /opt/schily/lib -R $(OLIBSDIR) @@ -29,6 +39,7 @@ ########################################################################### INS_BASE= /opt/schily INS_KBASE= / +INS_RBASE= / # DEFUMASK= 002 # diff -Nru cdrtools-2.01.01a33/TEMPLATES/Defaults.xcc cdrtools-3.02a09/TEMPLATES/Defaults.xcc --- cdrtools-2.01.01a33/TEMPLATES/Defaults.xcc 2003-11-23 01:20:28.000000000 +0000 +++ cdrtools-3.02a09/TEMPLATES/Defaults.xcc 2015-10-08 18:43:12.000000000 +0000 @@ -1,4 +1,4 @@ -#ident "%W% %E% %Q%" +#ident "@(#)Defaults.xcc 1.2 15/10/08 " ########################################################################### # # global definitions for unknown Systems using CC=cc @@ -12,6 +12,15 @@ #DEFCCOM= gcc ########################################################################### # +# Link mode for libraries that are part of the makefile system: +# If DEFLINKMODE is set to "static", no dynamic linking will be used +# If DEFLINKMODE is set to "dynamic", dynamic linking will be used +# +########################################################################### +DEFLINKMODE= static + +########################################################################### +# # If the next line is commented out, compilation is done with max warn level # If the next line is uncommented, compilation is done with minimal warnings # @@ -19,6 +28,7 @@ #CWARNOPTS= DEFINCDIRS= $(SRCROOT)/include +DEFOSINCDIRS= LDPATH= -L/opt/schily/lib #RUNPATH= -R $(INS_BASE)/lib -R /opt/schily/lib -R $(OLIBSDIR) Will probably not work @@ -29,6 +39,7 @@ ########################################################################### INS_BASE= /opt/schily INS_KBASE= / +INS_RBASE= / # DEFUMASK= 002 # diff -Nru cdrtools-2.01.01a33/TEMPLATES/inc.mk cdrtools-3.02a09/TEMPLATES/inc.mk --- cdrtools-2.01.01a33/TEMPLATES/inc.mk 1999-08-28 17:22:11.000000000 +0000 +++ cdrtools-3.02a09/TEMPLATES/inc.mk 1970-01-01 00:00:00.000000000 +0000 @@ -1,15 +0,0 @@ -#ident %W% %E% %Q% -########################################################################### -SRCROOT= .. -RULESDIR= RULES -include $(SRCROOT)/$(RULESDIR)/rules.top -########################################################################### - -INSDIR= include -TARGET= align.h -TARGETC= align_test -CFILES= align_test.c - -########################################################################### -include $(SRCROOT)/$(RULESDIR)/rules.inc -########################################################################### diff -Nru cdrtools-2.01.01a33/TEMPLATES/lib.mk cdrtools-3.02a09/TEMPLATES/lib.mk --- cdrtools-2.01.01a33/TEMPLATES/lib.mk 1997-03-04 15:29:30.000000000 +0000 +++ cdrtools-3.02a09/TEMPLATES/lib.mk 1970-01-01 00:00:00.000000000 +0000 @@ -1,19 +0,0 @@ -#ident %W% %E% %Q% -########################################################################### -# Sample makefile for non-shared libraries -########################################################################### -SRCROOT= ../.. -RULESDIR= RULES -include $(SRCROOT)/$(RULESDIR)/rules.top -########################################################################### - -INSDIR= lib -TARGETLIB= aal -CPPOPTS += -DFOKUS -CFILES= aallib.c -LIBS= -XMK_FILE= Makefile.man - -########################################################################### -include $(SRCROOT)/$(RULESDIR)/rules.lib -########################################################################### diff -Nru cdrtools-2.01.01a33/TEMPLATES/Makefile.shl cdrtools-3.02a09/TEMPLATES/Makefile.shl --- cdrtools-2.01.01a33/TEMPLATES/Makefile.shl 1997-03-04 15:29:30.000000000 +0000 +++ cdrtools-3.02a09/TEMPLATES/Makefile.shl 2014-04-03 12:18:03.000000000 +0000 @@ -1,9 +1,11 @@ -#ident %W% %E% %Q% +#ident @(#)Makefile.shl 1.2 14/04/03 ########################################################################### # Sample makefile for shared libraries ########################################################################### SRCROOT= ../.. RULESDIR= RULES +SUBARCHDIR= /pic +INVERSE_SUBARCHDIR= ../ include $(SRCROOT)/$(RULESDIR)/rules.top ########################################################################### diff -Nru cdrtools-2.01.01a33/TEMPLATES/MKLINKS cdrtools-3.02a09/TEMPLATES/MKLINKS --- cdrtools-2.01.01a33/TEMPLATES/MKLINKS 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/TEMPLATES/MKLINKS 2015-03-25 19:13:49.000000000 +0000 @@ -0,0 +1,52 @@ +#!/bin/sh +########################################################################### +#ident "@(#)MKLINKS 1.5 15/03/25 " +########################################################################### +# Written 2008-2015 by J. Schilling +########################################################################### +# Copyright (c) 2008-2015 J. Schilling +########################################################################### +# The contents of this file are subject to the terms of the +# Common Development and Distribution License, Version 1.0 only +# (the "License"). You may not use this file except in compliance +# with the License. +# +# See the file CDDL.Schily.txt in this distribution for details. +# A copy of the CDDL is also available via the Internet at +# http://www.opensource.org/licenses/cddl1.txt +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file CDDL.Schily.txt from this distribution. +########################################################################### +if [ -r ldummy.lnk ]; then + if [ $# -le 0 ]; then + exit 0 + fi +fi +########################################################################### +symlink="ln -s" +MKLINKS_TEST=${MKLINKS_TEST-:} +if [ ".$MKLINKS_COPY" = '.' ]; then + rm -f xxzzy.123 xxzzy.345 + echo test > xxzzy.123 + $symlink xxzzy.123 xxzzy.345 + test $? = 0 || symlink=cp + test -r xxzzy.345 || symlink=cp + ${MKLINKS_TEST} -h xxzzy.345 || symlink=cp + rm -f xxzzy.123 xxzzy.345 +else + symlink=cp +fi +########################################################################### + +$symlink Makefile.cmd ldummy.lnk +$symlink Makefile.cmd cmd.mk +$symlink Makefile.inc inc.mk +$symlink Makefile.lib lib.mk +$symlink Makefile.shl shl.mk + +$symlink temp-clang.rul temp-clang32.rul +$symlink temp-clang.rul temp-clang64.rul + +$symlink temp-gcc.rul temp-gcc32.rul +$symlink temp-gcc.rul temp-gcc64.rul diff -Nru cdrtools-2.01.01a33/TEMPLATES/shl.mk cdrtools-3.02a09/TEMPLATES/shl.mk --- cdrtools-2.01.01a33/TEMPLATES/shl.mk 1997-03-04 15:29:30.000000000 +0000 +++ cdrtools-3.02a09/TEMPLATES/shl.mk 1970-01-01 00:00:00.000000000 +0000 @@ -1,19 +0,0 @@ -#ident %W% %E% %Q% -########################################################################### -# Sample makefile for shared libraries -########################################################################### -SRCROOT= ../.. -RULESDIR= RULES -include $(SRCROOT)/$(RULESDIR)/rules.top -########################################################################### - -INSDIR= lib -TARGETLIB= aal -CPPOPTS += -DFOKUS -CFILES= aallib.c -LIBS= -XMK_FILE= Makefile.man - -########################################################################### -include $(SRCROOT)/$(RULESDIR)/rules.shl -########################################################################### diff -Nru cdrtools-2.01.01a33/TEMPLATES/temp-clang.rul cdrtools-3.02a09/TEMPLATES/temp-clang.rul --- cdrtools-2.01.01a33/TEMPLATES/temp-clang.rul 1970-01-01 00:00:00.000000000 +0000 +++ cdrtools-3.02a09/TEMPLATES/temp-clang.rul 2014-03-31 13:13:40.000000000 +0000 @@ -0,0 +1,48 @@ +#ident "@(#)temp-clang.rul 1.2 14/03/31 " +########################################################################### +# Written 1997-2014 by J. Schilling +########################################################################### +# +# Platform dependent MACROS for unknown CLANG systems +# +########################################################################### +# Copyright (c) J. Schilling +########################################################################### +# The contents of this file are subject to the terms of the +# Common Development and Distribution License, Version 1.0 only +# (the "License"). You may not use this file except in compliance +# with the License. +# +# See the file CDDL.Schily.txt in this distribution for details. +# A copy of the CDDL is also available via the Internet at +# http://www.opensource.org/licenses/cddl1.txt +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file CDDL.Schily.txt from this distribution. +########################################################################### +include $(SRCROOT)/$(RULESDIR)/rules.prg +########################################################################### +include $(SRCROOT)/$(RULESDIR)/cc-$(C_ARCH).rul + +OSDEFS= + +KDEFINES= -DKERNEL -D_KERNEL + +SHL_SUFFIX= .so.1.0 + +#LIB_SOCKET= -lsocket -lnsl -ldl +LIB_SOCKET= +LIB_MATH= -lm +#LIB_KVM= -lkvm +LIB_KVM= + +LDOPTS= $(LIBS_PATH) $(LDPATH) + +RANLIB= @echo " ==> RANDOMIZING ARCHIVE \"$@\""; true +ARFLAGS= cr +#LORDER= lorder +#TSORT= tsort +LORDER= echo +TSORT= cat + +MKDIR= $(MKDIR_SH) diff -Nru cdrtools-2.01.01a33/TEMPLATES/temp-gcc.rul cdrtools-3.02a09/TEMPLATES/temp-gcc.rul --- cdrtools-2.01.01a33/TEMPLATES/temp-gcc.rul 2006-07-03 14:48:46.000000000 +0000 +++ cdrtools-3.02a09/TEMPLATES/temp-gcc.rul 2014-03-31 13:13:40.000000000 +0000 @@ -1,4 +1,4 @@ -#ident "@(#)temp-gcc.rul 1.2 06/07/03 " +#ident "@(#)temp-gcc.rul 1.4 14/03/31 " ########################################################################### # Written 1997 by J. Schilling ########################################################################### @@ -14,13 +14,15 @@ # with the License. # # See the file CDDL.Schily.txt in this distribution for details. +# A copy of the CDDL is also available via the Internet at +# http://www.opensource.org/licenses/cddl1.txt # # When distributing Covered Code, include this CDDL HEADER in each # file and include the License file CDDL.Schily.txt from this distribution. ########################################################################### include $(SRCROOT)/$(RULESDIR)/rules.prg ########################################################################### -include $(SRCROOT)/$(RULESDIR)/gcc.rul +include $(SRCROOT)/$(RULESDIR)/cc-$(C_ARCH).rul OSDEFS= diff -Nru cdrtools-2.01.01a33/TEMPLATES/temp-xcc.rul cdrtools-3.02a09/TEMPLATES/temp-xcc.rul --- cdrtools-2.01.01a33/TEMPLATES/temp-xcc.rul 2006-07-03 14:46:33.000000000 +0000 +++ cdrtools-3.02a09/TEMPLATES/temp-xcc.rul 2009-07-25 23:29:35.000000000 +0000 @@ -1,4 +1,4 @@ -#ident "@(#)temp-xcc.rul 1.2 06/07/03 " +#ident "@(#)temp-xcc.rul 1.3 09/07/26 " ########################################################################### # Written 1997 by J. Schilling ########################################################################### @@ -20,7 +20,7 @@ ########################################################################### include $(SRCROOT)/$(RULESDIR)/rules.prg ########################################################################### -include $(SRCROOT)/$(RULESDIR)/dumbcc.rul +include $(SRCROOT)/$(RULESDIR)/cc-dumb.rul OSDEFS=